Skip to content

Commit 5f82db0

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/passkey-graceful-skip
2 parents 6a2a2a5 + 0f9792c commit 5f82db0

16 files changed

Lines changed: 1127 additions & 5850 deletions

.github/workflows/size.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ jobs:
66
env:
77
CI_JOB_NUMBER: 1
88
steps:
9-
- uses: actions/checkout@v1
10-
- uses: andresz1/size-limit-action@v1
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-node@v4
11+
with:
12+
node-version: 20
13+
- uses: andresz1/size-limit-action@v1.8.0
1114
with:
1215
github_token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ node_modules
55
dist
66
.parcel-cache
77
.yalc
8-
*storybook.log
8+
*storybook.log
9+
storybook-static

.storybook/main.ts

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,51 @@ const config: StorybookConfig = {
99
'@storybook/addon-links',
1010
'@storybook/addon-essentials',
1111
'@storybook/addon-interactions',
12-
'@storybook/addon-styling-webpack',
13-
'@storybook/preset-scss'
12+
'@storybook/preset-scss',
1413
],
1514
framework: {
1615
name: '@storybook/react-webpack5',
1716
options: {
1817
strictMode: true,
1918
},
2019
},
20+
// Match the automatic JSX runtime used by tsconfig ("jsx": "react-jsx") so
21+
// story files don't need an explicit `import React`.
22+
swc: (swcConfig) => ({
23+
...swcConfig,
24+
jsc: {
25+
...swcConfig.jsc,
26+
transform: {
27+
...swcConfig.jsc?.transform,
28+
react: {
29+
...swcConfig.jsc?.transform?.react,
30+
runtime: 'automatic',
31+
},
32+
},
33+
},
34+
}),
2135
webpackFinal: async (currentConfig: WebpackConfiguration, { configType }) => {
2236
// get index of css rule
2337
const ruleCssIndex = currentConfig.module.rules.findIndex(
24-
(rule) => rule.test?.toString() === "/\\.css$/"
38+
(rule) => rule.test?.toString() === '/\\.css$/'
2539
);
2640

2741
// map over the 'use' array of the css rule and set the 'module' option to true
2842
currentConfig.module.rules[ruleCssIndex].use.map((item) => {
29-
if (item.loader && item.loader.includes("/css-loader/")) {
43+
if (item.loader && item.loader.includes('/css-loader/')) {
3044
item.options.modules = {
31-
mode: "local",
45+
// The library ships default.css as a plain global stylesheet
46+
// (consumers import it directly), so its class names must NOT be
47+
// scoped/hashed or component className strings won't match. Keep
48+
// everything else as local CSS modules.
49+
mode: (resourcePath: string) =>
50+
resourcePath.replace(/\\/g, '/').endsWith('styles/default.css')
51+
? 'global'
52+
: 'local',
3253
localIdentName:
33-
configType === "PRODUCTION"
34-
? "[local]__[hash:base64:5]"
35-
: "[name]__[local]__[hash:base64:5]",
54+
configType === 'PRODUCTION'
55+
? '[local]__[hash:base64:5]'
56+
: '[name]__[local]__[hash:base64:5]',
3657
};
3758
}
3859

0 commit comments

Comments
 (0)