diff --git a/.storybook/main.js b/.storybook/main.ts similarity index 82% rename from .storybook/main.js rename to .storybook/main.ts index bfd34362..72cf78ea 100644 --- a/.storybook/main.js +++ b/.storybook/main.ts @@ -1,4 +1,6 @@ -module.exports = { +import type { StorybookConfig } from "@storybook/react-webpack5"; + +const config: StorybookConfig = { stories: ["../src/**/*.mdx", "../src/**/*.stories.tsx"], addons: [ @@ -7,22 +9,21 @@ module.exports = { "@storybook/addon-a11y", { name: "@storybook/addon-styling-webpack", - options: { rules: [ { test: /\.css$/, sideEffects: true, use: [ - require.resolve("style-loader"), + "style-loader", { - loader: require.resolve("css-loader"), + loader: "css-loader", options: { importLoaders: 1, }, }, { - loader: require.resolve("postcss-loader"), + loader: "postcss-loader", options: { implementation: require.resolve("postcss"), }, @@ -57,3 +58,5 @@ module.exports = { staticDirs: [{ from: "../src/assets", to: "/assets" }], }; + +export default config; diff --git a/.storybook/manager.js b/.storybook/manager.ts similarity index 100% rename from .storybook/manager.js rename to .storybook/manager.ts diff --git a/.storybook/preview.js b/.storybook/preview.tsx similarity index 100% rename from .storybook/preview.js rename to .storybook/preview.tsx diff --git a/.storybook/theme.js b/.storybook/theme.ts similarity index 100% rename from .storybook/theme.js rename to .storybook/theme.ts diff --git a/package.json b/package.json index b51a5c32..8b79d156 100644 --- a/package.json +++ b/package.json @@ -85,6 +85,7 @@ "@testing-library/react-hooks": "8.0.1", "@testing-library/user-event": "14.5.2", "@types/jest": "29.5.14", + "@types/node": "^22.7.9", "@types/prismjs": "1.26.5", "@types/react": "16.14.62", "@types/react-dom": "16.9.25", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a1ecd6b..cdbe1f28 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -108,6 +108,9 @@ importers: '@types/jest': specifier: 29.5.14 version: 29.5.14 + '@types/node': + specifier: ^22.7.9 + version: 22.9.0 '@types/prismjs': specifier: 1.26.5 version: 1.26.5 @@ -1729,11 +1732,8 @@ packages: '@types/mdx@2.0.13': resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} - '@types/node@20.12.8': - resolution: {integrity: sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==} - - '@types/node@22.5.4': - resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==} + '@types/node@22.9.0': + resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -5274,9 +5274,6 @@ packages: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} - undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} @@ -6518,7 +6515,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.9.0 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -6531,7 +6528,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.9.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 @@ -6563,7 +6560,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.9.0 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -6581,7 +6578,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.5.4 + '@types/node': 22.9.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -6603,7 +6600,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.5.4 + '@types/node': 22.9.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -6673,7 +6670,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.5.4 + '@types/node': 22.9.0 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -7025,7 +7022,7 @@ snapshots: '@storybook/builder-webpack5@8.4.7(esbuild@0.23.0)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.3)': dependencies: '@storybook/core-webpack': 8.4.7(storybook@8.4.7(prettier@3.4.2)) - '@types/node': 22.5.4 + '@types/node': 22.9.0 '@types/semver': 7.5.8 browser-assert: 1.2.1 case-sensitive-paths-webpack-plugin: 2.4.0 @@ -7065,7 +7062,7 @@ snapshots: '@storybook/core-webpack@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.9.0 storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 @@ -7316,7 +7313,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.9.0 '@types/html-minifier-terser@6.1.0': {} @@ -7337,7 +7334,7 @@ snapshots: '@types/jsdom@20.0.1': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.9.0 '@types/tough-cookie': 4.0.5 parse5: 7.1.2 @@ -7345,11 +7342,7 @@ snapshots: '@types/mdx@2.0.13': {} - '@types/node@20.12.8': - dependencies: - undici-types: 5.26.5 - - '@types/node@22.5.4': + '@types/node@22.9.0': dependencies: undici-types: 6.19.8 @@ -7373,7 +7366,7 @@ snapshots: '@types/resolve@1.17.1': dependencies: - '@types/node': 20.12.8 + '@types/node': 22.9.0 '@types/resolve@1.20.6': {} @@ -9556,7 +9549,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.9.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -9651,7 +9644,7 @@ snapshots: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 20.12.8 + '@types/node': 22.9.0 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3 @@ -9665,7 +9658,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.9.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -9675,7 +9668,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.5.4 + '@types/node': 22.9.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -9714,7 +9707,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.9.0 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -9749,7 +9742,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.9.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -9777,7 +9770,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.9.0 chalk: 4.1.2 cjs-module-lexer: 1.3.1 collect-v8-coverage: 1.0.2 @@ -9823,7 +9816,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.9.0 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -9842,7 +9835,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.9.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -9851,13 +9844,13 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.5.4 + '@types/node': 22.9.0 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.5.4 + '@types/node': 22.9.0 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -11430,7 +11423,7 @@ snapshots: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.5.4 + '@types/node': 22.9.0 acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 @@ -11558,8 +11551,6 @@ snapshots: has-symbols: 1.1.0 which-boxed-primitive: 1.1.1 - undici-types@5.26.5: {} - undici-types@6.19.8: {} unicode-canonical-property-names-ecmascript@2.0.0: {}