diff --git a/.storybook/main.ts b/.storybook/main.ts index 4a17bcf5..15eb1f95 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -1,25 +1,26 @@ import type { StorybookConfig } from '@storybook/react-vite'; -import { withoutVitePlugins } from '@storybook/builder-vite' +import { withoutVitePlugins } from '@storybook/builder-vite'; const config: StorybookConfig = { - stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], - addons: [ - '@storybook/addon-links', - '@storybook/addon-essentials', - '@storybook/addon-interactions', - ], - framework: { - name: '@storybook/react-vite', - options: {}, - }, - docs: { - autodocs: 'tag', - }, - async viteFinal(config) { - return { - ...config, - plugins: await withoutVitePlugins(config.plugins, ['vite:dts']), - } - }, + stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], + addons: [ + '@storybook/addon-links', + '@storybook/addon-essentials', + '@storybook/addon-interactions', + ], + framework: { + name: '@storybook/react-vite', + options: {}, + }, + docs: { + autodocs: 'tag', + }, + async viteFinal(config) { + return { + ...config, + plugins: await withoutVitePlugins(config.plugins, ['vite:dts']), + } + }, }; + export default config; diff --git a/.storybook/preview.ts b/.storybook/preview.ts deleted file mode 100644 index ff58bbda..00000000 --- a/.storybook/preview.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Preview } from "@storybook/react"; - -const preview: Preview = { - parameters: { - actions: { argTypesRegex: "^on[A-Z].*" }, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/i, - }, - }, - }, -}; - -export default preview; diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx new file mode 100644 index 00000000..f59bf4e6 --- /dev/null +++ b/.storybook/preview.tsx @@ -0,0 +1,25 @@ +import type { Preview } from '@storybook/react'; +import {Provider} from './../src/lib/Provider'; + +import 'the-new-css-reset/css/reset.css'; + +const preview: Preview = { + parameters: { + actions: { argTypesRegex: '^on[A-Z].*' }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/i, + }, + }, + }, + decorators: [ + (Story) => ( + + + + ), + ], +}; + +export default preview; diff --git a/package.json b/package.json index a7160f6d..1882563d 100644 --- a/package.json +++ b/package.json @@ -58,17 +58,19 @@ "dependencies": { "classnames": "^2.3.2", "css-vars-hook": "^0.6.19", - "lodash": "^4.17.21" + "lodash": "^4.17.21", + "the-new-css-reset": "^1.11.2" }, "devDependencies": { - "@storybook/addon-essentials": "7.6.2", - "@storybook/addon-interactions": "7.6.2", - "@storybook/addon-links": "7.6.2", - "@storybook/blocks": "7.6.2", - "@storybook/react": "7.6.2", - "@storybook/react-vite": "7.6.2", - "@storybook/test": "7.6.2", - "@storybook/types": "7.6.2", + "@storybook/addon-essentials": "7.6.3", + "@storybook/addon-interactions": "7.6.3", + "@storybook/addon-links": "7.6.3", + "@storybook/blocks": "7.6.3", + "@storybook/builder-vite": "7.6.3", + "@storybook/react": "7.6.3", + "@storybook/react-vite": "7.6.3", + "@storybook/test": "7.6.3", + "@storybook/types": "7.6.3", "@testing-library/jest-dom": "6.1.5", "@testing-library/react": "14.1.2", "@types/jest": "29.5.10", @@ -97,8 +99,7 @@ "lint-staged": "15.1.0", "npm-run-all": "4.1.5", "postcss": "8.4.31", - "postcss-nesting": "^12.0.1", - "postcss-preset-env": "^9.3.0", + "postcss-preset-env": "9.3.0", "prettier": "3.1.0", "react": "18.2.0", "react-dom": "18.2.0", @@ -112,6 +113,6 @@ "ts-node": "10.9.1", "typescript": "5.3.2", "vite": "5.0.4", - "vite-plugin-dts": "^3.6.4" + "vite-plugin-dts": "3.6.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f90d4f03..51dbc23d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,32 +14,38 @@ dependencies: lodash: specifier: ^4.17.21 version: 4.17.21 + the-new-css-reset: + specifier: ^1.11.2 + version: 1.11.2 devDependencies: '@storybook/addon-essentials': - specifier: 7.6.2 - version: 7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) + specifier: 7.6.3 + version: 7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) '@storybook/addon-interactions': - specifier: 7.6.2 - version: 7.6.2 + specifier: 7.6.3 + version: 7.6.3 '@storybook/addon-links': - specifier: 7.6.2 - version: 7.6.2(react@18.2.0) + specifier: 7.6.3 + version: 7.6.3(react@18.2.0) '@storybook/blocks': - specifier: 7.6.2 - version: 7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) + specifier: 7.6.3 + version: 7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) + '@storybook/builder-vite': + specifier: 7.6.3 + version: 7.6.3(typescript@5.3.2)(vite@5.0.4) '@storybook/react': - specifier: 7.6.2 - version: 7.6.2(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2) + specifier: 7.6.3 + version: 7.6.3(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2) '@storybook/react-vite': - specifier: 7.6.2 - version: 7.6.2(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2)(vite@5.0.4) + specifier: 7.6.3 + version: 7.6.3(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2)(vite@5.0.4) '@storybook/test': - specifier: 7.6.2 - version: 7.6.2(@types/jest@29.5.10)(jest@29.7.0) + specifier: 7.6.3 + version: 7.6.3(@types/jest@29.5.10)(jest@29.7.0) '@storybook/types': - specifier: 7.6.2 - version: 7.6.2 + specifier: 7.6.3 + version: 7.6.3 '@testing-library/jest-dom': specifier: 6.1.5 version: 6.1.5(@types/jest@29.5.10)(jest@29.7.0) @@ -124,11 +130,8 @@ devDependencies: postcss: specifier: 8.4.31 version: 8.4.31 - postcss-nesting: - specifier: ^12.0.1 - version: 12.0.1(postcss@8.4.31) postcss-preset-env: - specifier: ^9.3.0 + specifier: 9.3.0 version: 9.3.0(postcss@8.4.31) prettier: specifier: 3.1.0 @@ -170,7 +173,7 @@ devDependencies: specifier: 5.0.4 version: 5.0.4(@types/node@20.10.1) vite-plugin-dts: - specifier: ^3.6.4 + specifier: 3.6.4 version: 3.6.4(@types/node@20.10.1)(typescript@5.3.2)(vite@5.0.4) packages: @@ -3559,10 +3562,10 @@ packages: '@sinonjs/commons': 3.0.0 dev: true - /@storybook/addon-actions@7.6.2: - resolution: {integrity: sha512-fcwizWFzfTAHCFI6booF9Tvpv2DZ8f5bE81K2NAMy1ZtIjFgiCUw39ZuXomma73ZaWZqf4tyD1Zci/xXvjgsRg==} + /@storybook/addon-actions@7.6.3: + resolution: {integrity: sha512-f4HXteYE8IJXztAK+ab5heSjXWNWvyIAU63T3Fqe3zmqONwCerUKY54Op+RkAZc/R6aALTxvGRKAH2ff8g2vjQ==} dependencies: - '@storybook/core-events': 7.6.2 + '@storybook/core-events': 7.6.3 '@storybook/global': 5.0.0 '@types/uuid': 9.0.7 dequal: 2.0.3 @@ -3570,18 +3573,18 @@ packages: uuid: 9.0.1 dev: true - /@storybook/addon-backgrounds@7.6.2: - resolution: {integrity: sha512-BEhzlEcW2JJO81jzLMV0xQpVs5bqgnt1TU16m/T4bhL3L4kohJQV0QnEyO0kBnE+7fjW0vyCENtZe1sSO84MuQ==} + /@storybook/addon-backgrounds@7.6.3: + resolution: {integrity: sha512-ZZFNf8FBYBsuXvXdVk3sBgxJTn6s0HznuEE9OmAA7tMsLEDlUiWS9LEvjX2jX5K0kWivHTkJDTXV0NcLL1vWAg==} dependencies: '@storybook/global': 5.0.0 memoizerific: 1.11.3 ts-dedent: 2.2.0 dev: true - /@storybook/addon-controls@7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-F+rqr9kUn/dD3JxvnwS9alOGQo5gFGhF7LEyvnXhjkjSXwHXDX3iCW4N77O+iepZN7tA+jcRKy548UMPbZ//Iw==} + /@storybook/addon-controls@7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-xsM3z+CY1YOPqrcCldQLoon947fbd/o3gSO7hM3NwKiw/2WikExPO3VM4R2oi4W4PvnhkSOIO+ZDRuSs1yFmOg==} dependencies: - '@storybook/blocks': 7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) + '@storybook/blocks': 7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) lodash: 4.17.21 ts-dedent: 2.2.0 transitivePeerDependencies: @@ -3593,27 +3596,27 @@ packages: - supports-color dev: true - /@storybook/addon-docs@7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-2lRXam4PkDC6iU9ugJ2aOlGGgxXS7NjSUe9KgboBTK9mbmNZMD/Yo5KxHEyFBdYcGwumEZd6fWrT8SCipQjT8w==} + /@storybook/addon-docs@7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-2Ts+3EFg9ehkQdbjBWnCH1SE0BdyCLN6hO2N030tGxi0Vko9t9O7NLj5qdBwxLcEzb/XzL4zWukzfU17pktQwA==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: '@jest/transform': 29.7.0 '@mdx-js/react': 2.3.0(react@18.2.0) - '@storybook/blocks': 7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) - '@storybook/client-logger': 7.6.2 - '@storybook/components': 7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) - '@storybook/csf-plugin': 7.6.2 - '@storybook/csf-tools': 7.6.2 + '@storybook/blocks': 7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) + '@storybook/client-logger': 7.6.3 + '@storybook/components': 7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) + '@storybook/csf-plugin': 7.6.3 + '@storybook/csf-tools': 7.6.3 '@storybook/global': 5.0.0 '@storybook/mdx2-csf': 1.1.0 - '@storybook/node-logger': 7.6.2 - '@storybook/postinstall': 7.6.2 - '@storybook/preview-api': 7.6.2 - '@storybook/react-dom-shim': 7.6.2(react-dom@18.2.0)(react@18.2.0) - '@storybook/theming': 7.6.2(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.6.2 + '@storybook/node-logger': 7.6.3 + '@storybook/postinstall': 7.6.3 + '@storybook/preview-api': 7.6.3 + '@storybook/react-dom-shim': 7.6.3(react-dom@18.2.0)(react@18.2.0) + '@storybook/theming': 7.6.3(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.6.3 fs-extra: 11.2.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -3627,25 +3630,25 @@ packages: - supports-color dev: true - /@storybook/addon-essentials@7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-+WQSpluJVYTH54UimYpurGcn5syMlOD1X554F58ElGXucpLacAeeMNfbqPLnpXOZag5w//o1FWjJXhM9plzEdQ==} + /@storybook/addon-essentials@7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-bpbt5O0wcB83VLZg8QMXut+8g+7EF4iuevpwiynN9mbpQFvG49c6SE6T2eFJKTvVb4zszyfcNA0Opne2G83wZw==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - '@storybook/addon-actions': 7.6.2 - '@storybook/addon-backgrounds': 7.6.2 - '@storybook/addon-controls': 7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) - '@storybook/addon-docs': 7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) - '@storybook/addon-highlight': 7.6.2 - '@storybook/addon-measure': 7.6.2 - '@storybook/addon-outline': 7.6.2 - '@storybook/addon-toolbars': 7.6.2 - '@storybook/addon-viewport': 7.6.2 - '@storybook/core-common': 7.6.2 - '@storybook/manager-api': 7.6.2(react-dom@18.2.0)(react@18.2.0) - '@storybook/node-logger': 7.6.2 - '@storybook/preview-api': 7.6.2 + '@storybook/addon-actions': 7.6.3 + '@storybook/addon-backgrounds': 7.6.3 + '@storybook/addon-controls': 7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) + '@storybook/addon-docs': 7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) + '@storybook/addon-highlight': 7.6.3 + '@storybook/addon-measure': 7.6.3 + '@storybook/addon-outline': 7.6.3 + '@storybook/addon-toolbars': 7.6.3 + '@storybook/addon-viewport': 7.6.3 + '@storybook/core-common': 7.6.3 + '@storybook/manager-api': 7.6.3(react-dom@18.2.0)(react@18.2.0) + '@storybook/node-logger': 7.6.3 + '@storybook/preview-api': 7.6.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) ts-dedent: 2.2.0 @@ -3656,24 +3659,24 @@ packages: - supports-color dev: true - /@storybook/addon-highlight@7.6.2: - resolution: {integrity: sha512-HjV/DPUaBtH4HWc2zeZE3Oo8qQ7IWscpsYSa2NvflaMSHw3qaskfBLq60QVvodCvxlxaoQe3GfXx+eNg4mvaBw==} + /@storybook/addon-highlight@7.6.3: + resolution: {integrity: sha512-Z9AJ05XCTzFZPAxQSkQf9/Hazf5/QQI0jYSsvKqt7Vk+03q5727oD9KcIY5IHPYqQqN9fHExQh1eyqY8AnS8mg==} dependencies: '@storybook/global': 5.0.0 dev: true - /@storybook/addon-interactions@7.6.2: - resolution: {integrity: sha512-dKl3QLx/s+DUiB4eJ2ActxS+thykmFSJI2pVxWd7BJixMDsFnBsOytsZMEJYwaQMd6NbrVcC+xQaNzKSSMFLHA==} + /@storybook/addon-interactions@7.6.3: + resolution: {integrity: sha512-Gm2UJvQC8xs9KIbVZQegTLT3VBsEZIRsXy3htNqWjSdoJZK5M4/YJ3jB247CA/Jc+Mkj7d5SlJe+bCGEzjKTbw==} dependencies: '@storybook/global': 5.0.0 - '@storybook/types': 7.6.2 + '@storybook/types': 7.6.3 jest-mock: 27.5.1 polished: 4.2.2 ts-dedent: 2.2.0 dev: true - /@storybook/addon-links@7.6.2(react@18.2.0): - resolution: {integrity: sha512-NPhzm5VZlLBnN7qpKi4YkWG/j9GQUTIQo2KvjDVDrVuY0AzYOypiXjvW2fSlsr71eAL0mam9mK1+pqIeUOg1Sg==} + /@storybook/addon-links@7.6.3(react@18.2.0): + resolution: {integrity: sha512-dUIf6Y0nckxZfVQvQSqcthaycRxy69dCJLo3aORrOPL8NvGz3v1bK0AUded5wv8vnOVxfSx/Zqu7MyFr9xyjOA==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 peerDependenciesMeta: @@ -3686,47 +3689,47 @@ packages: ts-dedent: 2.2.0 dev: true - /@storybook/addon-measure@7.6.2: - resolution: {integrity: sha512-kGX+sE2hXPjES8DSCrf14GcUrk+YKmRwW2cQ2U3nLD0vkCge/mTIsHeuoGFEKJxGeY31s5YqpxRjznF3xV6jYw==} + /@storybook/addon-measure@7.6.3: + resolution: {integrity: sha512-DqxADof04ktA5GSA8XnckYGdVYyC4oN8vfKSGcPzpcKrJ2uVr0BXbcyJAEcJAshEJimmpA6nH5TxabXDFBZgPQ==} dependencies: '@storybook/global': 5.0.0 tiny-invariant: 1.3.1 dev: true - /@storybook/addon-outline@7.6.2: - resolution: {integrity: sha512-Cw05aW4l+BxkT1Yo/+SgKIHQy//9GqhdFmdoMDmMSQlexhNkDXvLNQJ6O/YAUg7xs/1F0egss1XUwfJ52y2NAA==} + /@storybook/addon-outline@7.6.3: + resolution: {integrity: sha512-M7d2tcqBBl+mPBUS6Nrwis50QYSCcmT/uKamud7CnlIWsMH/5GZFfAzGSLY5ETfiGsSFYssOwrXLOV4y0enu2g==} dependencies: '@storybook/global': 5.0.0 ts-dedent: 2.2.0 dev: true - /@storybook/addon-toolbars@7.6.2: - resolution: {integrity: sha512-+5rERGzie5SNSF8xyzr/mGhbob1jSE+kZE6CKSRFvpcdM6DzVLna5oqvF8vkrHE56/4vVbp6xO/pWaENpF9wPA==} + /@storybook/addon-toolbars@7.6.3: + resolution: {integrity: sha512-8GpwOt0J5yLrJhTr9/h0a/LTDjt49FhdvdxiVWLlLMrjIXSIc7j193ZgoHfnlwVhJS5zojcjB+HmRw/E+AneoA==} dev: true - /@storybook/addon-viewport@7.6.2: - resolution: {integrity: sha512-ilwxVxWFuznBz9FRmyuvysxNV4dqwl0k68h5MFCq/VOlC5TzYcR6kWpEA0PwPLHvXTE5v61UYcjRcrIA8eI30g==} + /@storybook/addon-viewport@7.6.3: + resolution: {integrity: sha512-I9FQxHi4W7RUyZut4NziYa+nkBCpD1k2YpEDE5IwSC3lqQpDzFZN89eNWQtZ38tIU4c90jL3L1k69IHvANGHsA==} dependencies: memoizerific: 1.11.3 dev: true - /@storybook/blocks@7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-7cQT/zHOQckr77kGazWpBpL8xEwyu2lb6ujUJeuFMmSTeTbqCBEZy4VIvu3jgX9Z7gyKTHIV2rruGMb8UKdcjA==} + /@storybook/blocks@7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-EyjyNNCZMcV9UnBSujwduiq+F1VLVX/f16fTTPqqZOHigyfrG5LoEYC6dwOC4yO/xfWY+h3qJ51yiugMxVl0Vg==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - '@storybook/channels': 7.6.2 - '@storybook/client-logger': 7.6.2 - '@storybook/components': 7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) - '@storybook/core-events': 7.6.2 + '@storybook/channels': 7.6.3 + '@storybook/client-logger': 7.6.3 + '@storybook/components': 7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) + '@storybook/core-events': 7.6.3 '@storybook/csf': 0.1.2 - '@storybook/docs-tools': 7.6.2 + '@storybook/docs-tools': 7.6.3 '@storybook/global': 5.0.0 - '@storybook/manager-api': 7.6.2(react-dom@18.2.0)(react@18.2.0) - '@storybook/preview-api': 7.6.2 - '@storybook/theming': 7.6.2(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.6.2 + '@storybook/manager-api': 7.6.3(react-dom@18.2.0)(react@18.2.0) + '@storybook/preview-api': 7.6.3 + '@storybook/theming': 7.6.3(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.6.3 '@types/lodash': 4.14.202 color-convert: 2.0.1 dequal: 2.0.3 @@ -3772,8 +3775,8 @@ packages: - supports-color dev: true - /@storybook/builder-vite@7.6.2(typescript@5.3.2)(vite@5.0.4): - resolution: {integrity: sha512-qiRLt/QfSZdztsTyhXnrNscCLx2Hm+OLcK1KGYH1FrG76LY46gmNIKXz+RetLrNdhw/x+8yZLhYvpH50fRe7wA==} + /@storybook/builder-vite@7.6.3(typescript@5.3.2)(vite@5.0.4): + resolution: {integrity: sha512-r/G/6wdwgbhMiMZ8Z+Js8VLjIo7a0DG5SxJorTHSWNi0+jyM+3Qlg3Xj96I8yL4gfTIKWVScHqHprhjRb2E64g==} peerDependencies: '@preact/preset-vite': '*' typescript: '>= 4.3.x' @@ -3787,14 +3790,14 @@ packages: vite-plugin-glimmerx: optional: true dependencies: - '@storybook/channels': 7.6.2 - '@storybook/client-logger': 7.6.2 - '@storybook/core-common': 7.6.2 - '@storybook/csf-plugin': 7.6.2 - '@storybook/node-logger': 7.6.2 - '@storybook/preview': 7.6.2 - '@storybook/preview-api': 7.6.2 - '@storybook/types': 7.6.2 + '@storybook/channels': 7.6.3 + '@storybook/client-logger': 7.6.3 + '@storybook/core-common': 7.6.3 + '@storybook/csf-plugin': 7.6.3 + '@storybook/node-logger': 7.6.3 + '@storybook/preview': 7.6.3 + '@storybook/preview-api': 7.6.3 + '@storybook/types': 7.6.3 '@types/find-cache-dir': 3.2.1 browser-assert: 1.2.1 es-module-lexer: 0.9.3 @@ -3821,6 +3824,17 @@ packages: tiny-invariant: 1.3.1 dev: true + /@storybook/channels@7.6.3: + resolution: {integrity: sha512-o9J0TBbFon16tUlU5V6kJgzAlsloJcS1cTHWqh3VWczohbRm+X1PLNUihJ7Q8kBWXAuuJkgBu7RQH7Ib46WyYg==} + dependencies: + '@storybook/client-logger': 7.6.3 + '@storybook/core-events': 7.6.3 + '@storybook/global': 5.0.0 + qs: 6.11.2 + telejson: 7.2.0 + tiny-invariant: 1.3.1 + dev: true + /@storybook/cli@7.6.2: resolution: {integrity: sha512-E/8S5fStcipTkgItMzn3Q6ZtiHO2Aon8cemd2P7EhYvepgATklMNDWeawu4G83zqyu0BdzQGZDq3LA7z6MW0UA==} hasBin: true @@ -3879,6 +3893,12 @@ packages: '@storybook/global': 5.0.0 dev: true + /@storybook/client-logger@7.6.3: + resolution: {integrity: sha512-BpsCnefrBFdxD6ukMjAblm1D6zB4U5HR1I85VWw6LOqZrfzA6l/1uBxItz0XG96HTjngbvAabWf5k7ZFCx5UCg==} + dependencies: + '@storybook/global': 5.0.0 + dev: true + /@storybook/codemod@7.6.2: resolution: {integrity: sha512-SuVgpW7aAAGz8QAfxw67dh2maiMDFmXyBYLP7yy6F85UXAJpc2u/6zmzUVczxxP+ajv36Pt1Rcz4xeLJA7JK5w==} dependencies: @@ -3900,19 +3920,19 @@ packages: - supports-color dev: true - /@storybook/components@7.6.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-j44xPJlg3w0r3ESw7Iq4Iiiqm5cDyM8tkCxkyYzTdHwf5sQ1xAzSXq/XFRD548hY54VPJq7GW3ov0YRUPWzthg==} + /@storybook/components@7.6.3(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-UNV0WoUo+W0huOLvoEMuqRN/VB4p0CNswrXN1mi/oGWvAFJ8idu63lSuV4uQ/LKxAZ6v3Kpdd+oK/o+OeOoL6w==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: '@radix-ui/react-select': 1.2.2(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-toolbar': 1.0.4(@types/react-dom@18.2.17)(@types/react@18.2.39)(react-dom@18.2.0)(react@18.2.0) - '@storybook/client-logger': 7.6.2 + '@storybook/client-logger': 7.6.3 '@storybook/csf': 0.1.2 '@storybook/global': 5.0.0 - '@storybook/theming': 7.6.2(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.6.2 + '@storybook/theming': 7.6.3(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.6.3 memoizerific: 1.11.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -3923,11 +3943,11 @@ packages: - '@types/react-dom' dev: true - /@storybook/core-client@7.6.2: - resolution: {integrity: sha512-hYSLZM6F2K2WxNoXsI+V+8Ya7mymNrdZpqKhCfQrr8Oi3HPaBRdNWyBD5k96lLp4dHR5ctEUWd8LcdNc+dwGsg==} + /@storybook/core-client@7.6.3: + resolution: {integrity: sha512-RM0Svlajddl8PP4Vq7LK8T22sFefNcTDgo82iRPZzGz0oH8LT0oXGFanj2Nkn0jruOBFClkiJ7EcwrbGJZHELg==} dependencies: - '@storybook/client-logger': 7.6.2 - '@storybook/preview-api': 7.6.2 + '@storybook/client-logger': 7.6.3 + '@storybook/preview-api': 7.6.3 dev: true /@storybook/core-common@7.6.2: @@ -3961,12 +3981,49 @@ packages: - supports-color dev: true + /@storybook/core-common@7.6.3: + resolution: {integrity: sha512-/ZE4BEyGwBHCQCOo681GyBKF4IqCiwVV/ZJCHTMTHFCPLJT2r+Qwv4tnI7xt1kwflOlbBlG6B6CvAqTjjVw/Ew==} + dependencies: + '@storybook/core-events': 7.6.3 + '@storybook/node-logger': 7.6.3 + '@storybook/types': 7.6.3 + '@types/find-cache-dir': 3.2.1 + '@types/node': 18.18.14 + '@types/node-fetch': 2.6.9 + '@types/pretty-hrtime': 1.0.3 + chalk: 4.1.2 + esbuild: 0.18.20 + esbuild-register: 3.5.0(esbuild@0.18.20) + file-system-cache: 2.3.0 + find-cache-dir: 3.3.2 + find-up: 5.0.0 + fs-extra: 11.2.0 + glob: 10.3.10 + handlebars: 4.7.8 + lazy-universal-dotenv: 4.0.0 + node-fetch: 2.7.0 + picomatch: 2.3.1 + pkg-dir: 5.0.0 + pretty-hrtime: 1.0.3 + resolve-from: 5.0.0 + ts-dedent: 2.2.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + /@storybook/core-events@7.6.2: resolution: {integrity: sha512-JciGNDclg3hx+WkXsAzcCBYWk0xsyIbyCAwqN7XVHUpGndR/dl97Qum5MkO9kPb8r5toKpeBOQo5Kxo2GiE0dg==} dependencies: ts-dedent: 2.2.0 dev: true + /@storybook/core-events@7.6.3: + resolution: {integrity: sha512-Vu3JX1mjtR8AX84lyqWsi2s2lhD997jKRWVznI3wx+UpTk8t7TTMLFk2rGYJRjaornhrqwvLYpnmtxRSxW9BOQ==} + dependencies: + ts-dedent: 2.2.0 + dev: true + /@storybook/core-server@7.6.2: resolution: {integrity: sha512-wEUMpSYyP+RxvnMkjX4dMRY7+G/Aev88/LBneqS7wx/qoLiBzN3UeQOhytl+MqCPkPD8XtDezFaBwg+LBcro9g==} dependencies: @@ -4018,10 +4075,10 @@ packages: - utf-8-validate dev: true - /@storybook/csf-plugin@7.6.2: - resolution: {integrity: sha512-6aVZG6vsqHXQ6lBU9SiZRFWTGwuauDcFMRbJEEMMgifWIn7gddUXqYZZ48yjGTdmflsAWZ3K82B90u7whZ1aew==} + /@storybook/csf-plugin@7.6.3: + resolution: {integrity: sha512-8bMYPsWw2tv+fqZ5H436l4x1KLSB6gIcm6snsjyF916yCHG6WcWm+EI6+wNUoySEtrQY2AiwFJqE37wI5OUJFg==} dependencies: - '@storybook/csf-tools': 7.6.2 + '@storybook/csf-tools': 7.6.3 unplugin: 1.5.1 transitivePeerDependencies: - supports-color @@ -4043,6 +4100,22 @@ packages: - supports-color dev: true + /@storybook/csf-tools@7.6.3: + resolution: {integrity: sha512-Zi3pg2pg88/mvBKewkfWhFUR1J4uYpHI5fSjOE+J/FeZObX/DIE7r+wJxZ0UBGyrk0Wy7Jajlb2uSP56Y0i19w==} + dependencies: + '@babel/generator': 7.23.5 + '@babel/parser': 7.23.5 + '@babel/traverse': 7.23.5 + '@babel/types': 7.23.5 + '@storybook/csf': 0.1.2 + '@storybook/types': 7.6.3 + fs-extra: 11.2.0 + recast: 0.23.4 + ts-dedent: 2.2.0 + transitivePeerDependencies: + - supports-color + dev: true + /@storybook/csf@0.0.1: resolution: {integrity: sha512-USTLkZze5gkel8MYCujSRBVIrUQ3YPBrLOx7GNk/0wttvVtlzWXAq9eLbQ4p/NicGxP+3T7KPEMVV//g+yubpw==} dependencies: @@ -4059,12 +4132,12 @@ packages: resolution: {integrity: sha512-JDaBR9lwVY4eSH5W8EGHrhODjygPd6QImRbwjAuJNEnY0Vw4ie3bPkeGfnacB3OBW6u/agqPv2aRlR46JcAQLg==} dev: true - /@storybook/docs-tools@7.6.2: - resolution: {integrity: sha512-mmTW7K36ghNfUouRKu0x1cTCdwircsIXg7+LOen6GHRUdy/6G6Xa176A4zoCp9vAO4UKgAS2N+FJfD/p3sR9Ow==} + /@storybook/docs-tools@7.6.3: + resolution: {integrity: sha512-6MtirRCQIkBeQ3bksPignZgUuFmjWqcFleTEN6vrNEfbCzMlMvuBGfm9tl4sS3n8ATWmKGj87DcJepPOT3FB4A==} dependencies: - '@storybook/core-common': 7.6.2 - '@storybook/preview-api': 7.6.2 - '@storybook/types': 7.6.2 + '@storybook/core-common': 7.6.3 + '@storybook/preview-api': 7.6.3 + '@storybook/types': 7.6.3 '@types/doctrine': 0.0.3 assert: 2.1.0 doctrine: 3.0.0 @@ -4078,29 +4151,29 @@ packages: resolution: {integrity: sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==} dev: true - /@storybook/instrumenter@7.6.2: - resolution: {integrity: sha512-IQQh0troFy0naXJUc47UtqJ1Bcs4SaBBxxCMlUeJLML1w0EjBSNCB6kewTU/DfjlkFm8a7YnEwxPTEh1dZiq8w==} + /@storybook/instrumenter@7.6.3: + resolution: {integrity: sha512-U1cbF0tewMQtKeLinQqUM5Mpcz1z5tsKhV9xAJKguvYVxllWvCA6cVxDM5fc66ws2mXpwFDcb82Kx05lMdmEoA==} dependencies: - '@storybook/channels': 7.6.2 - '@storybook/client-logger': 7.6.2 - '@storybook/core-events': 7.6.2 + '@storybook/channels': 7.6.3 + '@storybook/client-logger': 7.6.3 + '@storybook/core-events': 7.6.3 '@storybook/global': 5.0.0 - '@storybook/preview-api': 7.6.2 + '@storybook/preview-api': 7.6.3 '@vitest/utils': 0.34.6 util: 0.12.5 dev: true - /@storybook/manager-api@7.6.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-g3V0J8Vsik+7EwcMutZ5wjHnwLr4TfhoC+p59vRU13MdLvq0vSGxutkxortjdBrdDM8DJCpTjzA0/ikjf6HAoA==} + /@storybook/manager-api@7.6.3(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-soDH7GZuukkhYRGzlw4jhCm5EzjfkuIAtb37/DFplqxuVbvlyJEVzkMUM2KQO7kq0/8GlWPiZ5mn56wagYyhKQ==} dependencies: - '@storybook/channels': 7.6.2 - '@storybook/client-logger': 7.6.2 - '@storybook/core-events': 7.6.2 + '@storybook/channels': 7.6.3 + '@storybook/client-logger': 7.6.3 + '@storybook/core-events': 7.6.3 '@storybook/csf': 0.1.2 '@storybook/global': 5.0.0 - '@storybook/router': 7.6.2 - '@storybook/theming': 7.6.2(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.6.2 + '@storybook/router': 7.6.3 + '@storybook/theming': 7.6.3(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.6.3 dequal: 2.0.3 lodash: 4.17.21 memoizerific: 1.11.3 @@ -4125,8 +4198,12 @@ packages: resolution: {integrity: sha512-BiHADIHeKDSIJFWXPlNGb7UlR48jlTLcGXmWm68ucFWxkngwG81Tih/lJ1WW2GxTFl2LSrhvO9uKIFBBeVltzA==} dev: true - /@storybook/postinstall@7.6.2: - resolution: {integrity: sha512-UdhdoohivwzljzXFY/KmUtS9UyMNHGQ6YRZsArdkH8qf0TV5F19WXb+yIrkpQVzOCxmD1fvYyiEy/RS4LPvtbA==} + /@storybook/node-logger@7.6.3: + resolution: {integrity: sha512-7yL0CMHuh1DhpUAoKCU0a53DvxBpkUom9SX5RaC1G2A9BK/B3XcHtDPAC0uyUwNCKLJMZo9QtmJspvxWjR0LtA==} + dev: true + + /@storybook/postinstall@7.6.3: + resolution: {integrity: sha512-WpgdpJpY6rionluxjFZLbKiSDjvQJ5cPgufjvBRuXTsnVOsH3JNRWnPdkQkJLT9uTUMoNcyBMxbjYkK3vU6wSg==} dev: true /@storybook/preview-api@7.6.2: @@ -4148,12 +4225,31 @@ packages: util-deprecate: 1.0.2 dev: true - /@storybook/preview@7.6.2: - resolution: {integrity: sha512-VVrtYe55ZU3+2BOaCT96Gwd1D72w8UbPPlnJrMqOF3OI26dRs6U++jtPFg2EdOgmAf67Oxh4M/kwBAi+uIghxA==} + /@storybook/preview-api@7.6.3: + resolution: {integrity: sha512-uPaK7yLE1P++F+IOb/1j9pgdCwfMYZrUPHogF/Mf9r4cfEjDCcIeKgGMcsbU1KnkzNQQGPh8JRzRr/iYnLjswg==} + dependencies: + '@storybook/channels': 7.6.3 + '@storybook/client-logger': 7.6.3 + '@storybook/core-events': 7.6.3 + '@storybook/csf': 0.1.2 + '@storybook/global': 5.0.0 + '@storybook/types': 7.6.3 + '@types/qs': 6.9.10 + dequal: 2.0.3 + lodash: 4.17.21 + memoizerific: 1.11.3 + qs: 6.11.2 + synchronous-promise: 2.0.17 + ts-dedent: 2.2.0 + util-deprecate: 1.0.2 + dev: true + + /@storybook/preview@7.6.3: + resolution: {integrity: sha512-obSmKN8arWSHuLbCDM1H0lTVRMvAP/l7vOi6TQtFi6TxBz9MRCJA3Ugc0PZrbDADVZP+cp0ZJA0JQtAm+SqNAA==} dev: true - /@storybook/react-dom-shim@7.6.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-YyZUzQ56ivh2WIkWnzb57ihIuyk4iMcr4fw7Lpq/Qj7XIJu+SkX/xFhDhvBXj7IFZPfOwMmhl5A7IfcGc43gbQ==} + /@storybook/react-dom-shim@7.6.3(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-UtaEaTQB27aBsAmn5IfAYkX2xl4wWWXkoAO/jUtx86FQ/r85FG0zxh/rac6IgzjYUqzjJtjIeLdeciG/48hMMA==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -4162,8 +4258,8 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true - /@storybook/react-vite@7.6.2(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2)(vite@5.0.4): - resolution: {integrity: sha512-/sPenyGanBO1lTogVprny6/nzTV4KnrOi4C2FsYKeX9n+6NOf3ZIsIJuMA0CjRBRl7tIaIvAJTsQYKdiz2HQyA==} + /@storybook/react-vite@7.6.3(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2)(vite@5.0.4): + resolution: {integrity: sha512-sPrNJbnThmxsSeNj6vyG9pCCnnYzyiS+f7DVy2qeQrXvEuCYiQc503bavE3BKLxqjZQ3SkbhPsiEHcaw3I9x7A==} engines: {node: '>=16'} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -4172,8 +4268,8 @@ packages: dependencies: '@joshwooding/vite-plugin-react-docgen-typescript': 0.3.0(typescript@5.3.2)(vite@5.0.4) '@rollup/pluginutils': 5.1.0 - '@storybook/builder-vite': 7.6.2(typescript@5.3.2)(vite@5.0.4) - '@storybook/react': 7.6.2(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2) + '@storybook/builder-vite': 7.6.3(typescript@5.3.2)(vite@5.0.4) + '@storybook/react': 7.6.3(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2) '@vitejs/plugin-react': 3.1.0(vite@5.0.4) magic-string: 0.30.5 react: 18.2.0 @@ -4189,8 +4285,8 @@ packages: - vite-plugin-glimmerx dev: true - /@storybook/react@7.6.2(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2): - resolution: {integrity: sha512-yS73wAdl/5ibuGN4q1uNUlmVQw3xJd48smRaYqVgBedhKlqTWCX6tKIzT4qQDAl5eAqVo//Baq+e0d2/UvzHmQ==} + /@storybook/react@7.6.3(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2): + resolution: {integrity: sha512-W+530cC0BAU+yBc7NzSXYWR3e8Lo5qMsmFJjWYK7zGW/YZGhSG3mjhF9pDzNM+cMtHvUS6qf5PJPQM8jePpPhg==} engines: {node: '>=16.0.0'} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -4200,13 +4296,13 @@ packages: typescript: optional: true dependencies: - '@storybook/client-logger': 7.6.2 - '@storybook/core-client': 7.6.2 - '@storybook/docs-tools': 7.6.2 + '@storybook/client-logger': 7.6.3 + '@storybook/core-client': 7.6.3 + '@storybook/docs-tools': 7.6.3 '@storybook/global': 5.0.0 - '@storybook/preview-api': 7.6.2 - '@storybook/react-dom-shim': 7.6.2(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.6.2 + '@storybook/preview-api': 7.6.3 + '@storybook/react-dom-shim': 7.6.3(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.6.3 '@types/escodegen': 0.0.6 '@types/estree': 0.0.51 '@types/node': 18.18.14 @@ -4229,10 +4325,10 @@ packages: - supports-color dev: true - /@storybook/router@7.6.2: - resolution: {integrity: sha512-Wf28XTwZwF1CbCKI0/+OtELadaMAqXA2NSU47MBn0S0i4gs4PaI3KQ+0EBx16uYUgcr40A4k9F1UC9y49B1zLA==} + /@storybook/router@7.6.3: + resolution: {integrity: sha512-NZfhJqsXYca9mZCL/LGx6FmZDbrxX2S4ImW7Tqdtcc/sSlZ0BpCDkNUTesCA287cmoKMhXZRh/+bU+C2h2a+bw==} dependencies: - '@storybook/client-logger': 7.6.2 + '@storybook/client-logger': 7.6.3 memoizerific: 1.11.3 qs: 6.11.2 dev: true @@ -4253,13 +4349,13 @@ packages: - supports-color dev: true - /@storybook/test@7.6.2(@types/jest@29.5.10)(jest@29.7.0): - resolution: {integrity: sha512-D1+IV514uw749OdgG3bh0cygkZMcP9QhNc4VvOFKYnQ9cHLB95w4+tjuPmmU4KqJIsPNl3cZ/uLai0mZz+mWrw==} + /@storybook/test@7.6.3(@types/jest@29.5.10)(jest@29.7.0): + resolution: {integrity: sha512-W7rwSign2kM4Oq5RaifSmd9WSKv//QWLQpCpbdn/71hqNmE/SWQdyMLykEZY9RUTfpP6vFHOnWziXhID6Xu3Vg==} dependencies: - '@storybook/client-logger': 7.6.2 - '@storybook/core-events': 7.6.2 - '@storybook/instrumenter': 7.6.2 - '@storybook/preview-api': 7.6.2 + '@storybook/client-logger': 7.6.3 + '@storybook/core-events': 7.6.3 + '@storybook/instrumenter': 7.6.3 + '@storybook/preview-api': 7.6.3 '@testing-library/dom': 9.3.3 '@testing-library/jest-dom': 6.1.5(@types/jest@29.5.10)(jest@29.7.0) '@testing-library/user-event': 14.3.0(@testing-library/dom@9.3.3) @@ -4275,14 +4371,14 @@ packages: - vitest dev: true - /@storybook/theming@7.6.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-Q76SCBRjYQ6Yg8CQEIW2eavM9Bd/zq+ScurIcW3FJLfVrrdsdC+zueoz4d9mS6F6IECczR+O9PxmpbXfaDPHjw==} + /@storybook/theming@7.6.3(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-9ToNU2LM6a2kVBjOXitXEeEOuMurVLhn+uaZO1dJjv8NGnJVYiLwNPwrLsImiUD8/XXNuil972aanBR6+Aj9jw==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) - '@storybook/client-logger': 7.6.2 + '@storybook/client-logger': 7.6.3 '@storybook/global': 5.0.0 memoizerific: 1.11.3 react: 18.2.0 @@ -4298,6 +4394,15 @@ packages: file-system-cache: 2.3.0 dev: true + /@storybook/types@7.6.3: + resolution: {integrity: sha512-vj9Jzg5eR52l8O9512QywbQpNdo67Z6BQWR8QoZRcG+/Bhzt08YI8IZMPQLFMKzcmWDPK0blQ4GfyKDYplMjPA==} + dependencies: + '@storybook/channels': 7.6.3 + '@types/babel__core': 7.20.5 + '@types/express': 4.17.21 + file-system-cache: 2.3.0 + dev: true + /@testing-library/dom@9.3.3: resolution: {integrity: sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==} engines: {node: '>=14'} @@ -12269,6 +12374,10 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /the-new-css-reset@1.11.2: + resolution: {integrity: sha512-m/JQ/srn+e5SAI7MVCZOJ1hoxoE1w1uA96birT52Y9769GN9e0M4K1PBxlz05Vq4HprX11ASBjM2TcQs4WXnXg==} + dev: false + /through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} dependencies: diff --git a/src/lib/Layout/Col.tsx b/src/lib/Layout/Col.tsx index caa6ff09..b7678514 100644 --- a/src/lib/Layout/Col.tsx +++ b/src/lib/Layout/Col.tsx @@ -1,5 +1,5 @@ import type {FC, ReactNode} from 'react'; -import {useEffect} from 'react'; +import {useMemo} from 'react'; import {useLocalTheme} from 'css-vars-hook'; import classNames from 'classnames'; @@ -14,6 +14,14 @@ export type ColProps = Partial & className?: string; }; +const filterUndefined = (target: Record) => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + return Object.fromEntries(Object.entries(target).filter(([_, v]) => v !== undefined)) as Record< + string, + number | string + >; +}; + export const Col: FC = ({ as = 'div', children, @@ -29,24 +37,27 @@ export const Col: FC = ({ offsetLG, offsetXL, }) => { - const {LocalRoot, setTheme} = useLocalTheme(); + const {LocalRoot} = useLocalTheme(); - useEffect(() => { - setTheme({ - xs: xs ?? '', - sm: sm ?? '', - md: md ?? '', - lg: lg ?? '', - xl: xl ?? '', - offsetXS: offsetXS ?? '', - offsetSM: offsetSM ?? '', - offsetMD: offsetMD ?? '', - offsetLG: offsetLG ?? '', - offsetXL: offsetXL ?? '', - }); - }, [setTheme, xs, sm, md, lg, xl, offsetXS, offsetSM, offsetMD, offsetLG, offsetXL]); + const theme = useMemo( + () => + filterUndefined({ + xs: xs ?? '', + sm: sm ?? '', + md: md ?? '', + lg: lg ?? '', + xl: xl ?? '', + offsetXS: offsetXS ?? '', + offsetSM: offsetSM ?? '', + offsetMD: offsetMD ?? '', + offsetLG: offsetLG ?? '', + offsetXL: offsetXL ?? '', + }), + [xs, sm, md, lg, xl, offsetXS, offsetSM, offsetMD, offsetLG, offsetXL] + ); return ( = ({ base = 12, }) => { const width = normalizeWidth(containerWidth); - const {LocalRoot, setTheme} = useLocalTheme(); - useEffect(() => { - setTheme({containerWidth: width, base, gap: `${gap}px`}); - }, [setTheme, width, gap, base]); + const {LocalRoot} = useLocalTheme(); + const theme = useMemo(() => ({containerWidth: width, base, gap: `${gap}px`}), [width, gap, base]); return ( - + {children} ); diff --git a/src/lib/Provider/Provider.tsx b/src/lib/Provider/Provider.tsx index 8591c565..e8244d19 100644 --- a/src/lib/Provider/Provider.tsx +++ b/src/lib/Provider/Provider.tsx @@ -1,6 +1,8 @@ import type {FC, ReactNode} from 'react'; import {RootThemeProvider} from 'css-vars-hook'; -export const Provider: FC<{children?: ReactNode}> = ({children}) => { - return {children}; +import {theme as themeGeneric} from '@/lib/Theme'; + +export const Provider: FC<{children?: ReactNode; theme?: typeof themeGeneric}> = ({children, theme = themeGeneric}) => { + return {children}; }; diff --git a/src/lib/Theme/index.ts b/src/lib/Theme/index.ts index e69de29b..20758c46 100644 --- a/src/lib/Theme/index.ts +++ b/src/lib/Theme/index.ts @@ -0,0 +1 @@ +export {theme} from './theme.ts'; diff --git a/src/lib/Theme/theme.ts b/src/lib/Theme/theme.ts index e69de29b..bc7a0a6c 100644 --- a/src/lib/Theme/theme.ts +++ b/src/lib/Theme/theme.ts @@ -0,0 +1 @@ +export const theme = {}; diff --git a/src/lib/index.ts b/src/lib/index.ts index dd89265c..debb34fa 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,3 +1,6 @@ +/* Bundle css reset before everything else */ +import 'the-new-css-reset/css/reset.css'; + export {Counter} from './CounterDemo'; export {Provider} from './Provider'; export {Col, Row, Container} from './Layout'; diff --git a/src/main.tsx b/src/main.tsx index 3a404590..7acc4c36 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -3,6 +3,8 @@ import ReactDOM from 'react-dom/client'; import App from '@/env/App/App.tsx'; +import 'the-new-css-reset/css/reset.css'; + // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope ReactDOM.createRoot(document.getElementById('root')!).render( diff --git a/tsconfig.linter.json b/tsconfig.linter.json index 1ce7f5bf..74b997b2 100644 --- a/tsconfig.linter.json +++ b/tsconfig.linter.json @@ -1,5 +1,5 @@ { "extends" : "./tsconfig.json", - "include": ["**/*.stories.tsx", "**/*.stories.ts", "*.config.ts", "src", ".eslintrc.cjs"], + "include": ["**/*.stories.tsx", "**/*.stories.ts", "*.config.ts", "src", ".eslintrc.cjs", ".storybook/*.ts", ".storybook/*.ts"], "exclude": ["./dist/**"] } diff --git a/vite.config.ts b/vite.config.ts index 16c14779..d3aae302 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -25,7 +25,7 @@ export default defineConfig({ rollupOptions: { // make sure to externalize deps that shouldn't be bundled // into your library - external: external(), + external: external({whitelist: [/^the-new-css-reset/]}), output: { // Provide global variables to use in the UMD build // for externalized deps