-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into auth/pm-14949/update-tde-decryption-option-text
- Loading branch information
Showing
319 changed files
with
5,562 additions
and
1,200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* eslint-disable no-undef */ | ||
/* eslint-disable no-undef, @typescript-eslint/no-require-imports */ | ||
module.exports = { | ||
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
apps/browser/src/autofill/content/components/.lit-storybook/main.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { dirname, join } from "path"; | ||
import path from "path"; | ||
import type { StorybookConfig } from "@storybook/web-components-webpack5"; | ||
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin"; | ||
import remarkGfm from "remark-gfm"; | ||
|
||
const getAbsolutePath = (value: string): string => | ||
dirname(require.resolve(join(value, "package.json"))); | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../lit-stories/**/*.lit-stories.@(js|jsx|ts|tsx)"], | ||
addons: [ | ||
getAbsolutePath("@storybook/addon-links"), | ||
getAbsolutePath("@storybook/addon-essentials"), | ||
getAbsolutePath("@storybook/addon-a11y"), | ||
getAbsolutePath("@storybook/addon-designs"), | ||
getAbsolutePath("@storybook/addon-interactions"), | ||
{ | ||
name: "@storybook/addon-docs", | ||
options: { | ||
mdxPluginOptions: { | ||
mdxCompileOptions: { | ||
remarkPlugins: [remarkGfm], | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
framework: { | ||
name: getAbsolutePath("@storybook/web-components-webpack5"), | ||
options: { | ||
legacyRootApi: true, | ||
}, | ||
}, | ||
core: { | ||
disableTelemetry: true, | ||
}, | ||
env: (existingConfig) => ({ | ||
...existingConfig, | ||
FLAGS: JSON.stringify({}), | ||
}), | ||
webpackFinal: async (config) => { | ||
if (config.resolve) { | ||
config.resolve.plugins = [ | ||
new TsconfigPathsPlugin({ | ||
configFile: path.resolve(__dirname, "../../../../../tsconfig.json"), | ||
}), | ||
] as any; | ||
} | ||
|
||
if (config.module && config.module.rules) { | ||
config.module.rules.push({ | ||
test: /\.(ts|tsx)$/, | ||
exclude: /node_modules/, | ||
use: [ | ||
{ | ||
loader: require.resolve("ts-loader"), | ||
}, | ||
], | ||
}); | ||
} | ||
return config; | ||
}, | ||
docs: {}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
.../browser/src/autofill/content/components/lit-stories/buttons/action-button.lit-stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Meta, StoryObj } from "@storybook/web-components"; | ||
|
||
import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum"; | ||
|
||
import { ActionButton } from "../../buttons/action-button"; | ||
|
||
type Args = { | ||
buttonText: string; | ||
disabled: boolean; | ||
theme: Theme; | ||
buttonAction: (e: Event) => void; | ||
}; | ||
|
||
export default { | ||
title: "Components/Buttons/Action Button", | ||
argTypes: { | ||
buttonText: { control: "text" }, | ||
disabled: { control: "boolean" }, | ||
theme: { control: "select", options: [...Object.values(ThemeTypes)] }, | ||
buttonAction: { control: false }, | ||
}, | ||
args: { | ||
buttonText: "Click Me", | ||
disabled: false, | ||
theme: ThemeTypes.Light, | ||
buttonAction: () => alert("Clicked"), | ||
}, | ||
} as Meta<Args>; | ||
|
||
const Template = (args: Args) => ActionButton({ ...args }); | ||
|
||
export const Default: StoryObj<Args> = { | ||
render: Template, | ||
}; |
34 changes: 34 additions & 0 deletions
34
apps/browser/src/autofill/content/components/lit-stories/buttons/badge-button.lit-stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Meta, StoryObj } from "@storybook/web-components"; | ||
|
||
import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum"; | ||
|
||
import { BadgeButton } from "../../buttons/badge-button"; | ||
|
||
type Args = { | ||
buttonAction: (e: Event) => void; | ||
buttonText: string; | ||
disabled?: boolean; | ||
theme: Theme; | ||
}; | ||
|
||
export default { | ||
title: "Components/Buttons/Badge Button", | ||
argTypes: { | ||
buttonText: { control: "text" }, | ||
disabled: { control: "boolean" }, | ||
theme: { control: "select", options: [...Object.values(ThemeTypes)] }, | ||
buttonAction: { control: false }, | ||
}, | ||
args: { | ||
buttonText: "Click Me", | ||
disabled: false, | ||
theme: ThemeTypes.Light, | ||
buttonAction: () => alert("Clicked"), | ||
}, | ||
} as Meta<Args>; | ||
|
||
const Template = (args: Args) => BadgeButton({ ...args }); | ||
|
||
export const Default: StoryObj<Args> = { | ||
render: Template, | ||
}; |
Oops, something went wrong.