diff --git a/.storybook/main.ts b/.storybook/main.ts index 807fa7f7d..ee065ceef 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -1,19 +1,14 @@ +import { fileURLToPath } from "node:url"; import type { StorybookConfig } from "@storybook/react-webpack5"; -import path from "path"; +import path, { dirname } from "path"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); const config: StorybookConfig = { stories: ["../src/stories/**/*.stories.@(ts|tsx)", "../src/stories/**/*.mdx"], - addons: [ - "@storybook/addon-ally", - "@storybook/addon-actions", - "@storybook/addon-backgrounds", - "@storybook/addon-controls", - "@storybook/addon-docs", - "@storybook/addon-toolbars", - "@storybook/addon-viewport", - "@mihkeleidast/storybook-addon-source", - "@storybook/addon-webpack5-compiler-swc", - ], + addons: ["@storybook/addon-a11y", "@storybook/addon-docs", "@storybook/addon-webpack5-compiler-swc"], + features: { interactions: false, sidebarOnboardingChecklist: false }, staticDirs: ["../public"], webpackFinal: async (config) => { config.resolve!.modules = [path.resolve(__dirname, ".."), "node_modules"]; @@ -32,8 +27,5 @@ const config: StorybookConfig = { }, }, }), - typescript: { - reactDocgen: "react-docgen-typescript", - }, }; export default config; diff --git a/.storybook/preview.ts b/.storybook/preview.ts index 8eb3f0622..ff235b031 100644 --- a/.storybook/preview.ts +++ b/.storybook/preview.ts @@ -1,9 +1,8 @@ -import { withJsx } from "@mihkeleidast/storybook-addon-source"; -import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport"; -import type { Preview } from "@storybook/react"; +import { INITIAL_VIEWPORTS } from "storybook/viewport"; +import type { Preview } from "@storybook/react-webpack5"; const preview: Preview = { - decorators: [withJsx], + decorators: [], parameters: { controls: { expanded: true }, options: { @@ -18,7 +17,10 @@ const preview: Preview = { }, layout: "centered", viewport: { - viewports: INITIAL_VIEWPORTS, + options: INITIAL_VIEWPORTS, + }, + docs: { + codePanel: true, }, }, tags: ["autodocs"], diff --git a/package-lock.json b/package-lock.json index c31d8ddda..2827c9d35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@use-gesture/react": "^10.3.1", "axios": "^1.12.2", "country-code-lookup": "^0.0.20", + "dedent": "^1.7.2", "exifreader": "^4.23.7", "fabric": "7.2.0", "file-type": "^21.3.1", @@ -47,17 +48,10 @@ "@rollup/plugin-image": "^2.1.1", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^14.1.0", - "@storybook/addon-a11y": "^8.2.8", - "@storybook/addon-actions": "^8.6.18", - "@storybook/addon-backgrounds": "^8.6.18", - "@storybook/addon-controls": "^8.6.18", - "@storybook/addon-docs": "^8.6.18", - "@storybook/addon-toolbars": "^8.6.18", - "@storybook/addon-viewport": "^8.6.18", - "@storybook/addon-webpack5-compiler-swc": "^1.0.5", - "@storybook/blocks": "^8.2.8", - "@storybook/react": "^8.2.8", - "@storybook/react-webpack5": "^8.2.8", + "@storybook/addon-a11y": "^10.2.10", + "@storybook/addon-docs": "^10.2.10", + "@storybook/addon-webpack5-compiler-swc": "^4.0.3", + "@storybook/react-webpack5": "^10.2.10", "@testing-library/dom": "^9.3.4", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.5", @@ -99,10 +93,10 @@ "rollup-plugin-peer-deps-external": "^2.2.4", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-typescript2": "^0.36.0", - "storybook": "^8.2.8", + "storybook": "^10.2.10", "style-loader": "^3.3.1", "styled-components": "^6.4.1", - "typescript": "^4.8.4" + "typescript": "^5.7.3" }, "peerDependencies": { "@floating-ui/react": ">=0.26.23 <1.0.0", @@ -5125,15 +5119,13 @@ } }, "node_modules/@storybook/addon-a11y": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-8.6.18.tgz", - "integrity": "sha512-LFvudttdIfDTNWprA8/N1vbiWbJRrNscyt2OP9Qwi85E1d3LKLy+e8AWiqY08gpy2OUYujK7AjxfpKtNeddrxw==", + "version": "10.2.10", + "resolved": "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-10.2.10.tgz", + "integrity": "sha512-1S9pDXgvbHhBStGarCvfJ3/rfcaiAcQHRhuM3Nk4WGSIYtC1LCSRuzYdDYU0aNRpdCbCrUA7kUCbqvIE3tH+3Q==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/addon-highlight": "8.6.18", "@storybook/global": "^5.0.0", - "@storybook/test": "8.6.18", "axe-core": "^4.2.0" }, "funding": { @@ -5141,79 +5133,20 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.6.18" - } - }, - "node_modules/@storybook/addon-actions": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-8.6.18.tgz", - "integrity": "sha512-GcYhtE91GjIQTuZlwpTJ8jfMp6NC79nkpe1DGe0eetTpyQqLq1WUt+ACkk0Z5lqq2u8HBc09zCCGw+D8iCLpYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@storybook/global": "^5.0.0", - "@types/uuid": "^9.0.1", - "dequal": "^2.0.2", - "polished": "^4.2.2", - "uuid": "^9.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.6.18" - } - }, - "node_modules/@storybook/addon-backgrounds": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/addon-backgrounds/-/addon-backgrounds-8.6.18.tgz", - "integrity": "sha512-froND3WwvSCYzjEBO8QODStaWNL+aGXqxBEbrMnGYejDFST4qEFkvM2IYWMnLBkRgrgJ0yIqTeDQoyH9b9/8uQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@storybook/global": "^5.0.0", - "memoizerific": "^1.11.3", - "ts-dedent": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.6.18" - } - }, - "node_modules/@storybook/addon-controls": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/addon-controls/-/addon-controls-8.6.18.tgz", - "integrity": "sha512-K09dHDCfGW3cudsfuyfu0Yi49aZ2h7VYK4IXDGo1sfmtzVh4xd3HrZQQMVUeKLcfDP/NnJowT+fLVwg04CLrxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@storybook/global": "^5.0.0", - "dequal": "^2.0.2", - "ts-dedent": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.6.18" + "storybook": "^10.2.10" } }, "node_modules/@storybook/addon-docs": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/addon-docs/-/addon-docs-8.6.18.tgz", - "integrity": "sha512-55ADer0yNmmeR928Y3UAv3r4i7bJSd9LwywsQ+lRol/FNe0ZcwLEz31xL+jVsqQFNnDh/imsDIp8aYapGMtfEQ==", + "version": "10.2.10", + "resolved": "https://registry.npmjs.org/@storybook/addon-docs/-/addon-docs-10.2.10.tgz", + "integrity": "sha512-2wIYtdvZIzPbQ5194M5Igpy8faNbQ135nuO5ZaZ2VuttqGr+IJcGnDP42zYwbAsGs28G8ohpkbSgIzVyJWUhPQ==", "dev": true, "license": "MIT", "dependencies": { "@mdx-js/react": "^3.0.0", - "@storybook/blocks": "8.6.18", - "@storybook/csf-plugin": "8.6.18", - "@storybook/react-dom-shim": "8.6.18", + "@storybook/csf-plugin": "10.2.10", + "@storybook/icons": "^2.0.1", + "@storybook/react-dom-shim": "10.2.10", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "ts-dedent": "^2.0.0" @@ -5223,126 +5156,79 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.6.18" + "storybook": "^10.2.10" } }, - "node_modules/@storybook/addon-highlight": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/addon-highlight/-/addon-highlight-8.6.18.tgz", - "integrity": "sha512-wTFJ1DPM0C8gK6nGTJxH75byayQj7BPAz02fME4AOmT6clrBpVl1zSTFTkXaSr+k4xOfeMR/xNUfVskaXz6T9w==", + "node_modules/@storybook/addon-docs/node_modules/@storybook/csf-plugin": { + "version": "10.2.10", + "resolved": "https://registry.npmjs.org/@storybook/csf-plugin/-/csf-plugin-10.2.10.tgz", + "integrity": "sha512-aFvgaNDAnKMjuyhPK5ialT22pPqMN0XfPBNPeeNVPYztngkdKBa8WFqF/umDd47HxAjebq+vn6uId1xHyOHH3g==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/global": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" + "unplugin": "^2.3.5" }, - "peerDependencies": { - "storybook": "^8.6.18" - } - }, - "node_modules/@storybook/addon-toolbars": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/addon-toolbars/-/addon-toolbars-8.6.18.tgz", - "integrity": "sha512-x037KXCEcNfPISGX485DtiP+8Bw/cOT45plcQa8eiAQVrVcUwYaDoLubE9YV5b5CsSAjX8sDviGTme6ALfq7+w==", - "dev": true, - "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.6.18" - } - }, - "node_modules/@storybook/addon-viewport": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/addon-viewport/-/addon-viewport-8.6.18.tgz", - "integrity": "sha512-z9sDJSkuWQb4BP+Z1+H+y/Q0rFbPSDcw+OBBEhMfRcJPPXavdC2pNQ0GdQNVw+tDwhAXj+U7jehKnMDKaP7TyA==", - "dev": true, - "license": "MIT", - "dependencies": { - "memoizerific": "^1.11.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" + "esbuild": "*", + "rollup": "*", + "storybook": "^10.2.10", + "vite": "*", + "webpack": "*" }, - "peerDependencies": { - "storybook": "^8.6.18" + "peerDependenciesMeta": { + "esbuild": { + "optional": true + }, + "rollup": { + "optional": true + }, + "vite": { + "optional": true + }, + "webpack": { + "optional": true + } } }, "node_modules/@storybook/addon-webpack5-compiler-swc": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@storybook/addon-webpack5-compiler-swc/-/addon-webpack5-compiler-swc-1.0.6.tgz", - "integrity": "sha512-QiZheKKYsUCAtPn9phwtmOBAWBNxnxyfu5E+HUSQIbX94pTwc3ROufJ3g1R/RMQZcklOYXpSI0V8FS1m6aUVkg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@storybook/addon-webpack5-compiler-swc/-/addon-webpack5-compiler-swc-4.0.3.tgz", + "integrity": "sha512-REJZBArIBcqzxmhQY9R1br9hjfcFYdl4FeWD/okx1eRwPZkl49aUhTYqZPrA+MWXfKJkuuNQ5vnfSoR0c9HyvA==", "dev": true, "license": "MIT", "dependencies": { - "@swc/core": "^1.7.3", - "swc-loader": "^0.2.3" + "@swc/core": "^1.13.5", + "swc-loader": "^0.2.6" }, "engines": { "node": ">=18" - } - }, - "node_modules/@storybook/blocks": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/blocks/-/blocks-8.6.18.tgz", - "integrity": "sha512-esZv4msPQ9LxgTb8YUIZhhxVMuI6BPi5bkXtk8c7w7sWuAsqsCe/RnVInn7ooUry2gjnD4hd9+8Eqj0b8oTVoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@storybook/icons": "^1.2.12", - "ts-dedent": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "storybook": "^8.6.18" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "react-dom": { - "optional": true - } + "storybook": "^9.0.0 || ^10.0.0-0 || ^10.1.0-0 || ^10.2.0-0 || ^10.3.0-0 || ^10.4.0-0" } }, "node_modules/@storybook/builder-webpack5": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/builder-webpack5/-/builder-webpack5-8.6.18.tgz", - "integrity": "sha512-rg73TpqIUzXc66c/AaQ4kuc8yiZ+tStvy5fb1OnFYZ9rAeYQejDD0OIIaI2rqtX5XYuxC+yQEGitMntlIMV0og==", + "version": "10.2.10", + "resolved": "https://registry.npmjs.org/@storybook/builder-webpack5/-/builder-webpack5-10.2.10.tgz", + "integrity": "sha512-bIHAXiX9NwZlB5dJ2W+rZcwo1Dkmg0JOwL/F/rB9O4IlkjTsoOe/+BcLchfRdqRk7ENCVFNwaq8aXxnKmiIOMQ==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/core-webpack": "8.6.18", - "@types/semver": "^7.3.4", - "browser-assert": "^1.2.1", + "@storybook/core-webpack": "10.2.10", "case-sensitive-paths-webpack-plugin": "^2.4.0", "cjs-module-lexer": "^1.2.3", - "constants-browserify": "^1.0.0", - "css-loader": "^6.7.1", + "css-loader": "^7.1.2", "es-module-lexer": "^1.5.0", - "fork-ts-checker-webpack-plugin": "^8.0.0", + "fork-ts-checker-webpack-plugin": "^9.1.0", "html-webpack-plugin": "^5.5.0", "magic-string": "^0.30.5", - "path-browserify": "^1.0.1", - "process": "^0.11.10", - "semver": "^7.3.7", - "style-loader": "^3.3.1", - "terser-webpack-plugin": "^5.3.1", + "style-loader": "^4.0.0", + "terser-webpack-plugin": "^5.3.14", "ts-dedent": "^2.0.0", - "url": "^0.11.0", - "util": "^0.12.4", - "util-deprecate": "^1.0.2", "webpack": "5", "webpack-dev-middleware": "^6.1.2", "webpack-hot-middleware": "^2.25.1", @@ -5353,7 +5239,7 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.6.18" + "storybook": "^10.2.10" }, "peerDependenciesMeta": { "typescript": { @@ -5371,69 +5257,27 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, - "node_modules/@storybook/builder-webpack5/node_modules/semver": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", - "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@storybook/components": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/components/-/components-8.6.18.tgz", - "integrity": "sha512-55yViiZzPS/cPBuOeW4QGxGqrusjXVyxuknmbYCIwDtFyyvI/CgbjXRHdxNBaIjz+IlftxvBmmSaOqFG5+/dkA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" - } - }, - "node_modules/@storybook/core": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/core/-/core-8.6.18.tgz", - "integrity": "sha512-dRBP2TnX6fGdS0T2mXBHjkS/3Nlu1ra1huovZVFuM67CYMzrhM/3hX/zru1vWSC5rqY93ZaAhjMciPW4pK5mMQ==", + "node_modules/@storybook/builder-webpack5/node_modules/style-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-4.0.0.tgz", + "integrity": "sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA==", "dev": true, "license": "MIT", - "dependencies": { - "@storybook/theming": "8.6.18", - "better-opn": "^3.0.2", - "browser-assert": "^1.2.1", - "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0", - "esbuild-register": "^3.5.0", - "jsdoc-type-pratt-parser": "^4.0.0", - "process": "^0.11.10", - "recast": "^0.23.5", - "semver": "^7.6.2", - "util": "^0.12.5", - "ws": "^8.2.3" + "engines": { + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/storybook" + "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "prettier": "^2 || ^3" - }, - "peerDependenciesMeta": { - "prettier": { - "optional": true - } + "webpack": "^5.27.0" } }, "node_modules/@storybook/core-webpack": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/core-webpack/-/core-webpack-8.6.18.tgz", - "integrity": "sha512-M+y/DFbiT3CJYQ90wJdXT4WxYImphof1f11StZSxJGo0u5PnCCdCze1qchXubApXRDO2T8HGxurXfhTEMqaGsA==", + "version": "10.2.10", + "resolved": "https://registry.npmjs.org/@storybook/core-webpack/-/core-webpack-10.2.10.tgz", + "integrity": "sha512-bhz20jQWn0UB6GfYeO3oou8w8jXSVs+dgPglsxPr+tOusUuyT5FO270PHixZovVtrHgFAKHLXUEHUNuOvUsMig==", "dev": true, "license": "MIT", "dependencies": { @@ -5444,37 +5288,7 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.6.18" - } - }, - "node_modules/@storybook/core/node_modules/semver": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", - "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@storybook/csf-plugin": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/csf-plugin/-/csf-plugin-8.6.18.tgz", - "integrity": "sha512-x1ioz/L0CwaelCkHci3P31YtvwayN3FBftvwQOPbvRh9qeb4Cpz5IdVDmyvSxxYwXN66uAORNoqgjTi7B4/y5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "unplugin": "^1.3.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.6.18" + "storybook": "^10.2.10" } }, "node_modules/@storybook/global": { @@ -5485,81 +5299,41 @@ "license": "MIT" }, "node_modules/@storybook/icons": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@storybook/icons/-/icons-1.6.0.tgz", - "integrity": "sha512-hcFZIjW8yQz8O8//2WTIXylm5Xsgc+lW9ISLgUk1xGmptIJQRdlhVIXCpSyLrQaaRiyhQRaVg7l3BD9S216BHw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta" - } - }, - "node_modules/@storybook/instrumenter": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-8.6.18.tgz", - "integrity": "sha512-viEC1BGlYyjAzi1Tv3LZjByh7Y3Oh04u6QKsujxdeUbr5rUOH4pa/wCKmxXmY6yWrD4WjcNtojmUvQZN/66FXQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@storybook/global": "^5.0.0", - "@vitest/utils": "^2.1.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.6.18" - } - }, - "node_modules/@storybook/manager-api": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/manager-api/-/manager-api-8.6.18.tgz", - "integrity": "sha512-BjIp12gEMgzFkEsgKpDIbZdnSWTZpm2dlws8WiPJCpgJtG+HWSxZ0/Ms30Au9yfwzQEKRSbV/5zpsKMGc2SIJw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@storybook/icons/-/icons-2.0.2.tgz", + "integrity": "sha512-KZBCpXsshAIjczYNXR/rlxEtCUX/eAbpFNwKi8bcOomrLA4t/SyPz5RF+lVPO2oZBUE4sAkt43mfJUevQDSEEw==", "dev": true, "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, "peerDependencies": { - "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/@storybook/preset-react-webpack": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/preset-react-webpack/-/preset-react-webpack-8.6.18.tgz", - "integrity": "sha512-UkioZsLIyKGQTAdVB3EMx4NyqwIPDRyuDTIQyCwlMcLYCJCs9Ks2ILbM1x1554/iqRIxy8Yv2IBMapK+euCwgg==", + "version": "10.2.10", + "resolved": "https://registry.npmjs.org/@storybook/preset-react-webpack/-/preset-react-webpack-10.2.10.tgz", + "integrity": "sha512-DaV7uKpNF/2iBjcGL81HA7Kx8ZZb9D4MfG1VxpdtmDOKS20YIDNdCFeUbcAkUlG3lhshUGcGL8YiRp3o4b1X6Q==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/core-webpack": "8.6.18", - "@storybook/react": "8.6.18", + "@storybook/core-webpack": "10.2.10", "@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.0c3f3b7.0", - "@types/semver": "^7.3.4", - "find-up": "^5.0.0", + "@types/semver": "^7.7.1", "magic-string": "^0.30.5", - "react-docgen": "^7.0.0", + "react-docgen": "^7.1.1", "resolve": "^1.22.8", - "semver": "^7.3.7", + "semver": "^7.7.3", "tsconfig-paths": "^4.2.0", "webpack": "5" }, - "engines": { - "node": ">=18.0.0" - }, "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "storybook": "^8.6.18" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "storybook": "^10.2.10" }, "peerDependenciesMeta": { "typescript": { @@ -5578,9 +5352,9 @@ } }, "node_modules/@storybook/preset-react-webpack/node_modules/semver": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", - "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", "dev": true, "license": "ISC", "bin": { @@ -5590,52 +5364,28 @@ "node": ">=10" } }, - "node_modules/@storybook/preview-api": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/preview-api/-/preview-api-8.6.18.tgz", - "integrity": "sha512-joXRXh3GdVvzhbfIgmix1xs90p8Q/nja7AhEAC2egn5Pl7SKsIYZUCYI6UdrQANb2myg9P552LKXfPect8llKg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" - } - }, "node_modules/@storybook/react": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/react/-/react-8.6.18.tgz", - "integrity": "sha512-BuLpzMkKtF+UCQCbi+lYVX9cdcAMG86Lu2dDn7UFkPi5HRNFq/zHPSvlz1XDgL0OYMtcqB1aoVzFzcyzUBhhjw==", + "version": "10.2.10", + "resolved": "https://registry.npmjs.org/@storybook/react/-/react-10.2.10.tgz", + "integrity": "sha512-PcsChzPI8lhllB9exV7nFb96093i6sTwIl0jpPjaTFPQCRoueR9E/YeP3qSKQL9xt4cmii0cW7F0RUx25rW93Q==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/components": "8.6.18", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "8.6.18", - "@storybook/preview-api": "8.6.18", - "@storybook/react-dom-shim": "8.6.18", - "@storybook/theming": "8.6.18" - }, - "engines": { - "node": ">=18.0.0" + "@storybook/react-dom-shim": "10.2.10", + "react-docgen": "^8.0.2" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "@storybook/test": "8.6.18", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "storybook": "^8.6.18", - "typescript": ">= 4.2.x" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "storybook": "^10.2.10", + "typescript": ">= 4.9.x" }, "peerDependenciesMeta": { - "@storybook/test": { - "optional": true - }, "typescript": { "optional": true } @@ -5662,9 +5412,9 @@ } }, "node_modules/@storybook/react-dom-shim": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-8.6.18.tgz", - "integrity": "sha512-N4xULcAWZQTUv4jy1/d346Tyb4gufuC3UaLCuU/iVSZ1brYF4OW3ANr+096btbMxY8pR/65lmtoqr5CTGwnBvA==", + "version": "10.2.10", + "resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-10.2.10.tgz", + "integrity": "sha512-TmBrhyLHn8B8rvDHKk5uW5BqzO1M1T+fqFNWg88NIAJOoyX4Uc90FIJjDuN1OJmWKGwB5vLmPwaKBYsTe1yS+w==", "dev": true, "license": "MIT", "funding": { @@ -5672,34 +5422,31 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "storybook": "^8.6.18" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "storybook": "^10.2.10" } }, "node_modules/@storybook/react-webpack5": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/react-webpack5/-/react-webpack5-8.6.18.tgz", - "integrity": "sha512-oh7V2//Nm6O+7J5b7v4l+BTxksMq7thCmy607diwSBZHYz6G2CxcW3GhxWwZzpHoUVX6vOR5Uc94u9+wBuPi7A==", + "version": "10.2.10", + "resolved": "https://registry.npmjs.org/@storybook/react-webpack5/-/react-webpack5-10.2.10.tgz", + "integrity": "sha512-TofUD2dRuOgWOS2RzwfBA5/ihyd9I/FiCjcIUvB4xLo/lXVZVgI9SvjfkRQEPO3EDshxTfKDhtCzzzCe28Tk9g==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/builder-webpack5": "8.6.18", - "@storybook/preset-react-webpack": "8.6.18", - "@storybook/react": "8.6.18" - }, - "engines": { - "node": ">=18.0.0" + "@storybook/builder-webpack5": "10.2.10", + "@storybook/preset-react-webpack": "10.2.10", + "@storybook/react": "10.2.10" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "storybook": "^8.6.18", - "typescript": ">= 4.2.x" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "storybook": "^10.2.10", + "typescript": ">= 4.9.x" }, "peerDependenciesMeta": { "typescript": { @@ -5707,127 +5454,33 @@ } } }, - "node_modules/@storybook/test": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/test/-/test-8.6.18.tgz", - "integrity": "sha512-u/RwfWMyHcH0N2hqfMTw2CoZ58IXdeED3b8NmcHc8bmERB3byI5vVAkwYbcD7+WeRHIiym38ZHi0SRn+IpkO3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@storybook/global": "^5.0.0", - "@storybook/instrumenter": "8.6.18", - "@testing-library/dom": "10.4.0", - "@testing-library/jest-dom": "6.5.0", - "@testing-library/user-event": "14.5.2", - "@vitest/expect": "2.0.5", - "@vitest/spy": "2.0.5" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.6.18" - } - }, - "node_modules/@storybook/test/node_modules/@testing-library/dom": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", - "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^5.0.1", - "aria-query": "5.3.0", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.5.0", - "pretty-format": "^27.0.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@storybook/test/node_modules/@testing-library/jest-dom": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.5.0.tgz", - "integrity": "sha512-xGGHpBXYSHUUr6XsKBfs85TWlYKpTc37cSBBVrXcib2MkHLboWlkClhWF37JKlDb9KEq3dHs+f2xR7XJEWGBxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@adobe/css-tools": "^4.4.0", - "aria-query": "^5.0.0", - "chalk": "^3.0.0", - "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.6.3", - "lodash": "^4.17.21", - "redent": "^3.0.0" - }, - "engines": { - "node": ">=14", - "npm": ">=6", - "yarn": ">=1" - } - }, - "node_modules/@storybook/test/node_modules/@testing-library/jest-dom/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@storybook/test/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", - "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "node_modules/@storybook/react/node_modules/@types/resolve": { + "version": "1.20.6", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.6.tgz", + "integrity": "sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==", "dev": true, "license": "MIT" }, - "node_modules/@storybook/test/node_modules/@testing-library/user-event": { - "version": "14.5.2", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz", - "integrity": "sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==", + "node_modules/@storybook/react/node_modules/react-docgen": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/react-docgen/-/react-docgen-8.0.3.tgz", + "integrity": "sha512-aEZ9qP+/M+58x2qgfSFEWH1BxLyHe5+qkLNJOZQb5iGS017jpbRnoKhNRrXPeA6RfBrZO5wZrT9DMC1UqE1f1w==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12", - "npm": ">=6" - }, - "peerDependencies": { - "@testing-library/dom": ">=7.21.4" - } - }, - "node_modules/@storybook/test/node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dev": true, - "license": "Apache-2.0", "dependencies": { - "dequal": "^2.0.3" - } - }, - "node_modules/@storybook/theming": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-8.6.18.tgz", - "integrity": "sha512-n6OEjEtHupa2PdTwWzRepr7cO8NkDd4rgF6BKLitRbujOspLxzMBEqdphs+QLcuiCIgf33SqmEA64QWnbSMhPw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" + "@babel/core": "^7.28.0", + "@babel/traverse": "^7.28.0", + "@babel/types": "^7.28.2", + "@types/babel__core": "^7.20.5", + "@types/babel__traverse": "^7.20.7", + "@types/doctrine": "^0.0.9", + "@types/resolve": "^1.20.2", + "doctrine": "^3.0.0", + "resolve": "^1.22.1", + "strip-indent": "^4.0.0" }, - "peerDependencies": { - "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" + "engines": { + "node": "^20.9.0 || >=22" } }, "node_modules/@swc/core": { @@ -6332,6 +5985,24 @@ "@babel/types": "^7.28.2" } }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/doctrine": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/@types/doctrine/-/doctrine-0.0.9.tgz", @@ -6527,13 +6198,6 @@ "undici-types": "~5.26.4" } }, - "node_modules/@types/parse-json": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", - "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/prop-types": { "version": "15.7.15", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", @@ -6621,13 +6285,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/uuid": { - "version": "9.0.8", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", - "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/yargs": { "version": "17.0.35", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", @@ -7175,103 +6832,58 @@ } }, "node_modules/@vitest/expect": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz", - "integrity": "sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "2.0.5", - "@vitest/utils": "2.0.5", - "chai": "^5.1.1", - "tinyrainbow": "^1.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/expect/node_modules/@types/estree": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@vitest/expect/node_modules/@vitest/pretty-format": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.5.tgz", - "integrity": "sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^1.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/expect/node_modules/@vitest/utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.5.tgz", - "integrity": "sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.0.5", - "estree-walker": "^3.0.3", - "loupe": "^3.1.1", - "tinyrainbow": "^1.2.0" + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/expect/node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, "node_modules/@vitest/pretty-format": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.9.tgz", - "integrity": "sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", "dev": true, "license": "MIT", "dependencies": { - "tinyrainbow": "^1.2.0" + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/spy": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.5.tgz", - "integrity": "sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^3.0.0" + "tinyspy": "^4.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.9.tgz", - "integrity": "sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.9", - "loupe": "^3.1.2", - "tinyrainbow": "^1.2.0" + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" @@ -8231,37 +7843,6 @@ "node": ">=6.0.0" } }, - "node_modules/better-opn": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/better-opn/-/better-opn-3.0.2.tgz", - "integrity": "sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "open": "^8.0.4" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/better-opn/node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bezier-easing": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/bezier-easing/-/bezier-easing-2.1.0.tgz", @@ -8279,19 +7860,6 @@ "node": "*" } }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -8335,12 +7903,6 @@ "node": ">=8" } }, - "node_modules/browser-assert": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/browser-assert/-/browser-assert-1.2.1.tgz", - "integrity": "sha512-nfulgvOR6S4gt9UKCeGJOuSGBPGiFT6oQ/2UBnvTY/5aQ1PnksW72fhZkM30DzoRRv2WpwZf1vHHEr3mtuXIWQ==", - "dev": true - }, "node_modules/browserslist": { "version": "4.28.2", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", @@ -8429,6 +7991,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/call-bind": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", @@ -8633,41 +8211,19 @@ } }, "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, "funding": { "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" } }, "node_modules/chownr": { @@ -8948,13 +8504,6 @@ "license": "ISC", "optional": true }, - "node_modules/constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", - "dev": true, - "license": "MIT" - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -8977,20 +8526,30 @@ } }, "node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "dev": true, "license": "MIT", "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/country-code-lookup": { @@ -9038,31 +8597,31 @@ } }, "node_modules/css-loader": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.11.0.tgz", - "integrity": "sha512-CTJ+AEQJjq5NzLga5pE39qdiSV56F8ywCIsqNIRF0r7BDgWsN25aazToqAFg7ZrtA/U016xudB3ffgweORxX7g==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.4.tgz", + "integrity": "sha512-vv3J9tlOl04WjiMvHQI/9tmIrCxVrj6PFbHemBB1iihpeRbi/I4h033eoFIhwxBBqLhI0KYFS7yvynBFhIZfTw==", "dev": true, "license": "MIT", "dependencies": { "icss-utils": "^5.1.0", - "postcss": "^8.4.33", + "postcss": "^8.4.40", "postcss-modules-extract-imports": "^3.1.0", "postcss-modules-local-by-default": "^4.0.5", "postcss-modules-scope": "^3.2.0", "postcss-modules-values": "^4.0.0", "postcss-value-parser": "^4.2.0", - "semver": "^7.5.4" + "semver": "^7.6.3" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "@rspack/core": "0.x || 1.x", - "webpack": "^5.0.0" + "@rspack/core": "0.x || ^1.0.0 || ^2.0.0-0", + "webpack": "^5.27.0" }, "peerDependenciesMeta": { "@rspack/core": { @@ -9074,9 +8633,9 @@ } }, "node_modules/css-loader/node_modules/semver": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", - "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", "dev": true, "license": "ISC", "bin": { @@ -9469,11 +9028,18 @@ } }, "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true, - "license": "MIT" + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", + "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } }, "node_modules/deep-eql": { "version": "5.0.2", @@ -9544,6 +9110,36 @@ "node": ">=0.10.0" } }, + "node_modules/default-browser": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz", + "integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -9563,13 +9159,16 @@ } }, "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/define-properties": { @@ -9862,6 +9461,13 @@ "objectorarray": "^1.0.5" } }, + "node_modules/endent/node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true, + "license": "MIT" + }, "node_modules/enhanced-resolve": { "version": "5.21.2", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.21.2.tgz", @@ -10160,6 +9766,8 @@ "integrity": "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "debug": "^4.3.4" }, @@ -10985,16 +10593,16 @@ } }, "node_modules/fork-ts-checker-webpack-plugin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-8.0.0.tgz", - "integrity": "sha512-mX3qW3idpueT2klaQXBzrIM/pHw+T0B/V9KHEvNrqijTq9NFnMZU6oreVxDYcf33P8a5cW+67PjodNHthGnNVg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-9.1.0.tgz", + "integrity": "sha512-mpafl89VFPJmhnJ1ssH+8wmM2b50n+Rew5x42NeI2U78aRWgtkEtGmctp7iT16UjquJTjorEmIfESj3DxdW84Q==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.16.7", "chalk": "^4.1.2", - "chokidar": "^3.5.3", - "cosmiconfig": "^7.0.1", + "chokidar": "^4.0.1", + "cosmiconfig": "^8.2.0", "deepmerge": "^4.2.2", "fs-extra": "^10.0.0", "memfs": "^3.4.1", @@ -11005,8 +10613,7 @@ "tapable": "^2.2.1" }, "engines": { - "node": ">=12.13.0", - "yarn": ">=1.0.0" + "node": ">=14.21.3" }, "peerDependencies": { "typescript": ">3.6.0", @@ -11031,11 +10638,11 @@ "type": "opencollective", "url": "https://opencollective.com/webpack" } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/semver": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", - "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/semver": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", "dev": true, "license": "ISC", "bin": { @@ -12092,19 +11699,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-boolean-object": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", @@ -12303,6 +11897,41 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-map": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", @@ -12860,21 +12489,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-circus/node_modules/dedent": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", - "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, "node_modules/jest-circus/node_modules/jest-diff": { "version": "30.4.1", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.4.1.tgz", @@ -14630,16 +14244,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsdoc-type-pratt-parser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.8.0.tgz", - "integrity": "sha512-iZ8Bdb84lWRuGHamRXFyML07r21pcwBrLkHEuHgEY5UbCouBwv7ECknDRKzsQIXMiqpPymqtIf8TC/shYKB5rw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/jsdom": { "version": "26.1.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz", @@ -15253,13 +14857,6 @@ "tmpl": "1.0.5" } }, - "node_modules/map-or-similar": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/map-or-similar/-/map-or-similar-1.5.0.tgz", - "integrity": "sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==", - "dev": true, - "license": "MIT" - }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -15289,16 +14886,6 @@ "node": ">= 4.0.0" } }, - "node_modules/memoizerific": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/memoizerific/-/memoizerific-1.11.3.tgz", - "integrity": "sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==", - "dev": true, - "license": "MIT", - "dependencies": { - "map-or-similar": "^1.5.0" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -16288,13 +15875,6 @@ "url": "https://github.com/sponsors/eemeli" } }, - "node_modules/path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true, - "license": "MIT" - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -16498,19 +16078,6 @@ "node": ">=8" } }, - "node_modules/polished": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/polished/-/polished-4.3.1.tgz", - "integrity": "sha512-OBatVyC/N7SCW/FaDHrSd+vn0o5cS855TOmYi4OkdWUMSJCET/xip//ch8xGUvtr3i44X9LVyWwQlRMTN3pwSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.17.8" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/possible-typed-array-names": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", @@ -16736,33 +16303,6 @@ "webpack": "^5.0.0" } }, - "node_modules/postcss-loader/node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/postcss-loader/node_modules/semver": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", @@ -17358,16 +16898,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/promise.series": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/promise.series/-/promise.series-0.2.0.tgz", @@ -17462,22 +16992,6 @@ ], "license": "MIT" }, - "node_modules/qs": { - "version": "6.15.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz", - "integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -17795,16 +17309,17 @@ } }, "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "dev": true, "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, "engines": { - "node": ">=8.10.0" + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/recast": { @@ -18353,6 +17868,19 @@ "devOptional": true, "license": "MIT" }, + "node_modules/run-applescript": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -18902,18 +18430,27 @@ } }, "node_modules/storybook": { - "version": "8.6.18", - "resolved": "https://registry.npmjs.org/storybook/-/storybook-8.6.18.tgz", - "integrity": "sha512-p8seiSI6FiVY6P3V0pG+5v7c8pDMehMAFRWEhG5XqIBSQszzOjDnW2rNvm3odoLKfo3V3P6Cs6Hv9ILzymULyQ==", + "version": "10.2.10", + "resolved": "https://registry.npmjs.org/storybook/-/storybook-10.2.10.tgz", + "integrity": "sha512-N4U42qKgzMHS7DjqLz5bY4P7rnvJtYkWFCyKspZr3FhPUuy6CWOae3aYC2BjXkHrdug0Jyta6VxFTuB1tYUKhg==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/core": "8.6.18" + "@storybook/global": "^5.0.0", + "@storybook/icons": "^2.0.1", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/user-event": "^14.6.1", + "@vitest/expect": "3.2.4", + "@vitest/spy": "3.2.4", + "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0", + "open": "^10.2.0", + "recast": "^0.23.5", + "semver": "^7.7.3", + "use-sync-external-store": "^1.5.0", + "ws": "^8.18.0" }, "bin": { - "getstorybook": "bin/index.cjs", - "sb": "bin/index.cjs", - "storybook": "bin/index.cjs" + "storybook": "dist/bin/dispatcher.js" }, "funding": { "type": "opencollective", @@ -18928,6 +18465,65 @@ } } }, + "node_modules/storybook/node_modules/@testing-library/jest-dom": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.9.1.tgz", + "integrity": "sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@adobe/css-tools": "^4.4.0", + "aria-query": "^5.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.6.3", + "picocolors": "^1.1.1", + "redent": "^3.0.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/storybook/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/storybook/node_modules/open": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", + "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "wsl-utils": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/storybook/node_modules/semver": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -19775,9 +19371,9 @@ } }, "node_modules/tinyrainbow": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz", - "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", "dev": true, "license": "MIT", "engines": { @@ -19785,9 +19381,9 @@ } }, "node_modules/tinyspy": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", - "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.4.tgz", + "integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==", "dev": true, "license": "MIT", "engines": { @@ -20086,9 +19682,9 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -20096,7 +19692,7 @@ "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uint8array-extras": { @@ -20192,17 +19788,32 @@ } }, "node_modules/unplugin": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.16.1.tgz", - "integrity": "sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w==", + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.11.tgz", + "integrity": "sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==", "dev": true, "license": "MIT", "dependencies": { - "acorn": "^8.14.0", + "@jridgewell/remapping": "^2.3.5", + "acorn": "^8.15.0", + "picomatch": "^4.0.3", "webpack-virtual-modules": "^0.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.12.0" + } + }, + "node_modules/unplugin/node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/unrs-resolver": { @@ -20281,20 +19892,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.4.tgz", - "integrity": "sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^1.4.1", - "qs": "^6.12.3" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -20307,13 +19904,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/url/node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true, - "license": "MIT" - }, "node_modules/use-deep-compare-effect": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/use-deep-compare-effect/-/use-deep-compare-effect-1.8.1.tgz", @@ -20352,20 +19942,6 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -20380,21 +19956,6 @@ "dev": true, "license": "MIT" }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -21092,6 +20653,38 @@ } } }, + "node_modules/wsl-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", + "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wsl-utils/node_modules/is-wsl": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", + "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/xml": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", diff --git a/package.json b/package.json index a540992fa..7d9a84789 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "@use-gesture/react": "^10.3.1", "axios": "^1.12.2", "country-code-lookup": "^0.0.20", + "dedent": "^1.7.2", "exifreader": "^4.23.7", "fabric": "7.2.0", "file-type": "^21.3.1", @@ -79,17 +80,10 @@ "@rollup/plugin-image": "^2.1.1", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^14.1.0", - "@storybook/addon-a11y": "^8.2.8", - "@storybook/addon-actions": "^8.6.18", - "@storybook/addon-backgrounds": "^8.6.18", - "@storybook/addon-controls": "^8.6.18", - "@storybook/addon-docs": "^8.6.18", - "@storybook/addon-toolbars": "^8.6.18", - "@storybook/addon-viewport": "^8.6.18", - "@storybook/addon-webpack5-compiler-swc": "^1.0.5", - "@storybook/blocks": "^8.2.8", - "@storybook/react": "^8.2.8", - "@storybook/react-webpack5": "^8.2.8", + "@storybook/addon-a11y": "^10.2.10", + "@storybook/addon-docs": "^10.2.10", + "@storybook/addon-webpack5-compiler-swc": "^4.0.3", + "@storybook/react-webpack5": "^10.2.10", "@testing-library/dom": "^9.3.4", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.5", @@ -131,10 +125,10 @@ "rollup-plugin-peer-deps-external": "^2.2.4", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-typescript2": "^0.36.0", - "storybook": "^8.2.8", + "storybook": "^10.2.10", "style-loader": "^3.3.1", "styled-components": "^6.4.1", - "typescript": "^4.8.4" + "typescript": "^5.7.3" }, "lint-staged": { "*.{js,jsx,ts,tsx}": [ diff --git a/src/__tests__/common/data.ts b/src/__tests__/common/data.ts index 78e3bf7f7..133710e2e 100644 --- a/src/__tests__/common/data.ts +++ b/src/__tests__/common/data.ts @@ -1,6 +1,12 @@ +import { ISubmitButtonSchema } from "../../components/fields"; + export const SUBMIT_BUTTON_ID = "submit"; export const SUBMIT_BUTTON_LABEL = "Submit"; export const RESET_BUTTON_ID = "reset"; export const RESET_BUTTON_LABEL = "Reset"; export const ERROR_MESSAGE = "test error message"; export const FRONTEND_ENGINE_ID = "test"; + +export const SUBMIT_BUTTON_SCHEMA: Record = { + "submit-button": { uiType: "submit", label: "Submit" }, +}; diff --git a/src/__tests__/components/elements/wrapper/conditional-renderer.spec.tsx b/src/__tests__/components/elements/wrapper/conditional-renderer.spec.tsx index 61e47e6ee..e8a40f5a3 100644 --- a/src/__tests__/components/elements/wrapper/conditional-renderer.spec.tsx +++ b/src/__tests__/components/elements/wrapper/conditional-renderer.spec.tsx @@ -7,11 +7,11 @@ import { TFrontendEngineFieldSchema, TRestoreMode, } from "../../../../components/frontend-engine"; -import { SUBMIT_BUTTON_SCHEMA } from "../../../../stories/common"; import { ERROR_MESSAGE, FRONTEND_ENGINE_ID, FrontendEngineWithCustomButton, + SUBMIT_BUTTON_SCHEMA, getField, getSubmitButton, getSubmitButtonProps, diff --git a/src/__tests__/components/frontend-engine/frontend-engine.spec.tsx b/src/__tests__/components/frontend-engine/frontend-engine.spec.tsx index 8e108665a..639a72217 100644 --- a/src/__tests__/components/frontend-engine/frontend-engine.spec.tsx +++ b/src/__tests__/components/frontend-engine/frontend-engine.spec.tsx @@ -9,12 +9,12 @@ import { ITextFieldSchema } from "../../../components/fields"; import { ERROR_MESSAGES } from "../../../components/shared"; import { IFrontendEngineData, IFrontendEngineProps, IFrontendEngineRef } from "../../../components/types"; import { IYupValidationRule } from "../../../context-providers"; -import { SUBMIT_BUTTON_SCHEMA } from "../../../stories/common"; import { TestHelper } from "../../../utils"; import { ERROR_MESSAGE, FRONTEND_ENGINE_ID, FrontendEngineWithCustomButton, + SUBMIT_BUTTON_SCHEMA, flushPromise, getErrorMessage, getField, diff --git a/src/custom-typings/heic-to-csp.d.ts b/src/custom-typings/heic-to-csp.d.ts deleted file mode 100644 index 691a599cb..000000000 --- a/src/custom-typings/heic-to-csp.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Ambient module declaration to support importing the CSP build of 'heic-to'. -// The package provides an exports entry for './csp', but with current tsconfig (moduleResolution: 'node') -// TypeScript does not resolve the subpath's declaration file automatically. -// This bridges that gap without needing to switch to 'node16'/'nodenext'/'bundler'. -declare module "heic-to/csp" { - export * from "heic-to/dist/csp/heic-to"; -} diff --git a/src/stories/1-intro/1-intro.mdx b/src/stories/1-intro/1-intro.mdx index 71efcc236..6e0f6f6b3 100644 --- a/src/stories/1-intro/1-intro.mdx +++ b/src/stories/1-intro/1-intro.mdx @@ -1,4 +1,4 @@ -import { Meta } from "@storybook/blocks"; +import { Meta } from "@storybook/addon-docs/blocks"; diff --git a/src/stories/1-intro/form-builder/components/form-builder-tool.tsx b/src/stories/1-intro/form-builder/components/form-builder-tool.tsx index e98c2b28c..01e55955b 100644 --- a/src/stories/1-intro/form-builder/components/form-builder-tool.tsx +++ b/src/stories/1-intro/form-builder/components/form-builder-tool.tsx @@ -4,7 +4,7 @@ import { PencilIcon } from "@lifesg/react-icons/pencil"; import { TabletIcon } from "@lifesg/react-icons/tablet"; import { FormBuilder, IFormBuilderMethods } from "@lifesg/web-form-builder"; import { ISchemaProps } from "@lifesg/web-form-builder/translator"; -import { Unstyled } from "@storybook/blocks"; +import { Unstyled } from "@storybook/addon-docs/blocks"; import { useRef, useState } from "react"; import { ContentWrapper, FrontendEnginePreview, ModeButton, Toolbar, Wrapper } from "./form-builder-tool.styles"; import { SchemaView } from "./schema-view"; @@ -89,7 +89,7 @@ export const FormBuilderTool = () => { return ( diff --git a/src/stories/1-intro/form-builder/docs.mdx b/src/stories/1-intro/form-builder/docs.mdx index 2f2d85ee2..c7b37dd61 100644 --- a/src/stories/1-intro/form-builder/docs.mdx +++ b/src/stories/1-intro/form-builder/docs.mdx @@ -1,4 +1,4 @@ -import { Meta, Unstyled } from "@storybook/blocks"; +import { Meta, Unstyled } from "@storybook/addon-docs/blocks"; import { Wrapper } from "./components/form-builder-tool"; import { FormBuilderTool } from "./components/form-builder-tool"; diff --git a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-array.stories.tsx b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-array.stories.tsx index 92445c60f..dac4fff03 100644 --- a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-array.stories.tsx +++ b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-array.stories.tsx @@ -1,12 +1,11 @@ -import { Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { FrontendEngine } from "../../../components"; import { TFrontendEngineFieldSchema } from "../../../components/frontend-engine"; import { SUBMIT_BUTTON_SCHEMA } from "../../common"; const meta: Meta = { title: "Form/Conditional Rendering/Rules/Arrays", - component: null, parameters: { docs: { page: () => ( diff --git a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-date.stories.tsx b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-date.stories.tsx index 8cf992079..0436826ca 100644 --- a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-date.stories.tsx +++ b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-date.stories.tsx @@ -1,13 +1,12 @@ import { LocalDate } from "@js-joda/core"; -import { Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { FrontendEngine } from "../../../components"; import { TFrontendEngineFieldSchema } from "../../../components/frontend-engine"; import { SUBMIT_BUTTON_SCHEMA } from "../../common"; const meta: Meta = { title: "Form/Conditional Rendering/Rules/Dates", - component: null, parameters: { docs: { page: () => ( diff --git a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-number.stories.tsx b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-number.stories.tsx index f0b0fed6e..9f56f2804 100644 --- a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-number.stories.tsx +++ b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-number.stories.tsx @@ -1,12 +1,11 @@ -import { Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { FrontendEngine } from "../../../components"; import { TFrontendEngineFieldSchema } from "../../../components/frontend-engine"; import { SUBMIT_BUTTON_SCHEMA } from "../../common"; const meta: Meta = { title: "Form/Conditional Rendering/Rules/Numbers", - component: null, parameters: { docs: { page: () => ( diff --git a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-restore-mode.stories.tsx b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-restore-mode.stories.tsx index 3cd085a52..f0b289e06 100644 --- a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-restore-mode.stories.tsx +++ b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-restore-mode.stories.tsx @@ -1,6 +1,6 @@ import { Button } from "@lifesg/react-design-system/button"; -import { Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useRef } from "react"; import { IFrontendEngineData, IFrontendEngineProps, IFrontendEngineRef } from "../../../components/frontend-engine"; import { FrontendEngine, SUBMIT_BUTTON_SCHEMA } from "../../common"; @@ -50,7 +50,6 @@ const DATA: IFrontendEngineData = { const meta: Meta = { title: "Form/Conditional Rendering/Restoring Values", - component: null, parameters: { docs: { page: () => ( diff --git a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-string.stories.tsx b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-string.stories.tsx index e9fce5238..489738b66 100644 --- a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-string.stories.tsx +++ b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering-string.stories.tsx @@ -1,12 +1,11 @@ -import { Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { FrontendEngine } from "../../../components"; import { TFrontendEngineFieldSchema } from "../../../components/frontend-engine"; import { SUBMIT_BUTTON_SCHEMA } from "../../common"; const meta: Meta = { title: "Form/Conditional Rendering/Rules/Strings", - component: null, parameters: { docs: { page: () => ( diff --git a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering.stories.tsx b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering.stories.tsx index bb28688aa..c57102aab 100644 --- a/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering.stories.tsx +++ b/src/stories/2-frontend-engine/conditional-rendering/conditional-rendering.stories.tsx @@ -1,12 +1,11 @@ -import { Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { FrontendEngine } from "../../../components"; import { TFrontendEngineFieldSchema } from "../../../components/frontend-engine"; import { SUBMIT_BUTTON_SCHEMA } from "../../common"; const meta: Meta = { title: "Form/Conditional Rendering/Rules", - component: null, parameters: { docs: { page: () => ( diff --git a/src/stories/2-frontend-engine/frontend-engine.stories.tsx b/src/stories/2-frontend-engine/frontend-engine.stories.tsx index 1d771473e..795eaceb7 100644 --- a/src/stories/2-frontend-engine/frontend-engine.stories.tsx +++ b/src/stories/2-frontend-engine/frontend-engine.stories.tsx @@ -1,9 +1,9 @@ import { Button } from "@lifesg/react-design-system/button"; import { Form } from "@lifesg/react-design-system/form"; import { Typography } from "@lifesg/react-design-system/typography"; -import { action } from "@storybook/addon-actions"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { action } from "storybook/actions"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useEffect, useRef, useState } from "react"; import * as Yup from "yup"; import { TCustomComponentProps, TCustomComponentSchema } from "../../components"; @@ -973,6 +973,7 @@ export const CustomComponent: StoryFn = () => { const ref = useRef(); useEffect(() => { + if (!ref.current) return; const currentFormRef = ref.current; currentFormRef.addFieldEventListener("custom-change", "myCustomComponent", handleEvent); diff --git a/src/stories/2-frontend-engine/validation/validation-story-component.tsx b/src/stories/2-frontend-engine/validation/validation-story-component.tsx index 61fd7da90..67dd867c3 100644 --- a/src/stories/2-frontend-engine/validation/validation-story-component.tsx +++ b/src/stories/2-frontend-engine/validation/validation-story-component.tsx @@ -2,7 +2,7 @@ import { Font } from "@lifesg/react-design-system/theme"; import { Form } from "@lifesg/react-design-system/form"; import { Layout } from "@lifesg/react-design-system/layout"; import { Typography } from "@lifesg/react-design-system/typography"; -import { action } from "@storybook/addon-actions"; +import { action } from "storybook/actions"; import highlightjs from "highlight.js"; import json from "highlight.js/lib/languages/json"; import "highlight.js/styles/monokai.css"; diff --git a/src/stories/2-frontend-engine/validation/validation.mdx b/src/stories/2-frontend-engine/validation/validation.mdx index a0934285e..658dbc9ce 100644 --- a/src/stories/2-frontend-engine/validation/validation.mdx +++ b/src/stories/2-frontend-engine/validation/validation.mdx @@ -1,4 +1,4 @@ -import { Meta } from "@storybook/blocks"; +import { Meta } from "@storybook/addon-docs/blocks"; import startCase from "lodash/startCase"; import sanitize from "sanitize-html"; import { VALIDATION_DESCRIPTIONS } from "./validation.data"; diff --git a/src/stories/2-frontend-engine/validation/validation.stories.tsx b/src/stories/2-frontend-engine/validation/validation.stories.tsx index 2063512c4..e05d375ab 100644 --- a/src/stories/2-frontend-engine/validation/validation.stories.tsx +++ b/src/stories/2-frontend-engine/validation/validation.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, StoryObj } from "@storybook/react"; +import { Meta, StoryObj } from "@storybook/react-webpack5"; import { ValidationStoryComponent } from "./validation-story-component"; import { ALL_VALIDATION_DEMO_FIELD_IDS, diff --git a/src/stories/3-fields/button/button.stories.tsx b/src/stories/3-fields/button/button.stories.tsx index 7a202b837..70b2c6f6f 100644 --- a/src/stories/3-fields/button/button.stories.tsx +++ b/src/stories/3-fields/button/button.stories.tsx @@ -1,7 +1,7 @@ import * as Icons from "@lifesg/react-icons"; -import { action } from "@storybook/addon-actions"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { action } from "storybook/actions"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useEffect, useRef } from "react"; import { IFrontendEngineRef } from "../../../components"; import { IButtonSchema } from "../../../components/fields/button"; @@ -124,6 +124,7 @@ const Template = (id: string, eventName?: string | undefined) => const handleEvent = (e: unknown) => action(eventName)(e); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("button", eventName as any, id, handleEvent); return () => currentFormRef.removeFieldEventListener(eventName, id, handleEvent); diff --git a/src/stories/3-fields/checkbox-group/checkbox-group.stories.tsx b/src/stories/3-fields/checkbox-group/checkbox-group.stories.tsx index 39f8df527..cfd845375 100644 --- a/src/stories/3-fields/checkbox-group/checkbox-group.stories.tsx +++ b/src/stories/3-fields/checkbox-group/checkbox-group.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { TCheckboxGroupSchema } from "../../../components/fields/checkbox-group"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/checkbox-group/checkbox-toggle-group.stories.tsx b/src/stories/3-fields/checkbox-group/checkbox-toggle-group.stories.tsx index caac869c5..d06835347 100644 --- a/src/stories/3-fields/checkbox-group/checkbox-toggle-group.stories.tsx +++ b/src/stories/3-fields/checkbox-group/checkbox-toggle-group.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { TCheckboxGroupSchema } from "../../../components/fields/checkbox-group"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/chips/chips.stories.tsx b/src/stories/3-fields/chips/chips.stories.tsx index f858008d7..b14c28266 100644 --- a/src/stories/3-fields/chips/chips.stories.tsx +++ b/src/stories/3-fields/chips/chips.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { IChipsSchema } from "../../../components/fields/chips"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/contact-field/contact-field.stories.tsx b/src/stories/3-fields/contact-field/contact-field.stories.tsx index 9354741bd..4b11a80f9 100644 --- a/src/stories/3-fields/contact-field/contact-field.stories.tsx +++ b/src/stories/3-fields/contact-field/contact-field.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IContactFieldSchema } from "../../../components/fields"; import { getCountries } from "../../../components/fields/contact-field/data"; import { diff --git a/src/stories/3-fields/date-field/date-field.stories.tsx b/src/stories/3-fields/date-field/date-field.stories.tsx index ab27c8f66..6fb9d5c82 100644 --- a/src/stories/3-fields/date-field/date-field.stories.tsx +++ b/src/stories/3-fields/date-field/date-field.stories.tsx @@ -1,7 +1,7 @@ import { DateTimeFormatter, LocalDate, ResolverStyle } from "@js-joda/core"; import { Locale } from "@js-joda/locale_en-us"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IDateFieldSchema } from "src/components/fields/date-field/types"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/date-range-field/date-range-field.stories.tsx b/src/stories/3-fields/date-range-field/date-range-field.stories.tsx index 53847d7bf..9e826fbb7 100644 --- a/src/stories/3-fields/date-range-field/date-range-field.stories.tsx +++ b/src/stories/3-fields/date-range-field/date-range-field.stories.tsx @@ -1,8 +1,8 @@ import { DateTimeFormatter, LocalDate, ResolverStyle } from "@js-joda/core"; import { Locale } from "@js-joda/locale_en-us"; import { InputRangeProp } from "@lifesg/react-design-system/input-range-select/types"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { TDateRangeFieldSchema } from "src/components/fields/date-range-field/types"; import { CommonFieldStoryProps, DefaultStoryTemplate, ResetStoryTemplate, WarningStoryTemplate } from "../../common"; diff --git a/src/stories/3-fields/e-signature/e-signature.stories.tsx b/src/stories/3-fields/e-signature/e-signature.stories.tsx index b013d6918..4afba87f1 100644 --- a/src/stories/3-fields/e-signature/e-signature.stories.tsx +++ b/src/stories/3-fields/e-signature/e-signature.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IESignatureFieldSchema, IESignatureValue } from "../../../components/fields/e-signature-field"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/email-field/email-field.stories.tsx b/src/stories/3-fields/email-field/email-field.stories.tsx index 2584c5129..825ef5c09 100644 --- a/src/stories/3-fields/email-field/email-field.stories.tsx +++ b/src/stories/3-fields/email-field/email-field.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IEmailFieldSchema } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/error-field/error-field.stories.tsx b/src/stories/3-fields/error-field/error-field.stories.tsx index ad08035cf..3754087ec 100644 --- a/src/stories/3-fields/error-field/error-field.stories.tsx +++ b/src/stories/3-fields/error-field/error-field.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { CommonFieldStoryProps, FrontendEngine, SUBMIT_BUTTON_SCHEMA } from "../../common"; const meta: Meta = { diff --git a/src/stories/3-fields/file-upload/file-upload-events.stories.tsx b/src/stories/3-fields/file-upload/file-upload-events.stories.tsx index 933d837ee..08b868d78 100644 --- a/src/stories/3-fields/file-upload/file-upload-events.stories.tsx +++ b/src/stories/3-fields/file-upload/file-upload-events.stories.tsx @@ -1,6 +1,6 @@ -import { action } from "@storybook/addon-actions"; -import { Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { action } from "storybook/actions"; +import { Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useEffect, useRef } from "react"; import { IFileUploadSchema } from "../../../components/fields"; import { IFrontendEngineRef } from "../../../components/frontend-engine"; @@ -34,6 +34,7 @@ const Template = (eventName: string) => const formRef = useRef(); const handleEvent = (e: unknown) => action(eventName)(e); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("file-upload", eventName as any, id, handleEvent); return () => currentFormRef.removeFieldEventListener("file-upload", eventName as any, id, handleEvent); diff --git a/src/stories/3-fields/file-upload/file-upload.stories.tsx b/src/stories/3-fields/file-upload/file-upload.stories.tsx index cd50fdf6f..c3505f685 100644 --- a/src/stories/3-fields/file-upload/file-upload.stories.tsx +++ b/src/stories/3-fields/file-upload/file-upload.stories.tsx @@ -1,6 +1,6 @@ import { Button } from "@lifesg/react-design-system/button"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useRef } from "react"; import { IFileUploadSchema, IFileUploadValue, TFileUploadErrorMessage } from "../../../components/fields/file-upload"; import { IFrontendEngineRef } from "../../../components/frontend-engine/types"; diff --git a/src/stories/3-fields/hidden-field/hidden-field.stories.tsx b/src/stories/3-fields/hidden-field/hidden-field.stories.tsx index 0de49fa43..8fb0a9308 100644 --- a/src/stories/3-fields/hidden-field/hidden-field.stories.tsx +++ b/src/stories/3-fields/hidden-field/hidden-field.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { THiddenFieldSchema } from "../../../components/fields"; import { CommonFieldStoryProps, DefaultStoryTemplate } from "../../common"; diff --git a/src/stories/3-fields/histogram-slider/histogram-slider.stories.tsx b/src/stories/3-fields/histogram-slider/histogram-slider.stories.tsx index c75a6c4eb..e68b51243 100644 --- a/src/stories/3-fields/histogram-slider/histogram-slider.stories.tsx +++ b/src/stories/3-fields/histogram-slider/histogram-slider.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IHistogramSliderSchema, IHistogramSliderValue } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/image-upload/image-upload-events.stories.tsx b/src/stories/3-fields/image-upload/image-upload-events.stories.tsx index a5a6c1d5b..2a9b06dcc 100644 --- a/src/stories/3-fields/image-upload/image-upload-events.stories.tsx +++ b/src/stories/3-fields/image-upload/image-upload-events.stories.tsx @@ -1,6 +1,6 @@ -import { action } from "@storybook/addon-actions"; -import { Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { action } from "storybook/actions"; +import { Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useCallback, useEffect, useRef, useState } from "react"; import { EImageStatus, IImage, IImageUploadSchema, IUpdateImageStatus } from "../../../components/fields"; import { IFrontendEngineRef } from "../../../components/frontend-engine"; @@ -34,6 +34,7 @@ const Template = (eventName: string) => const formRef = useRef(); const handleEvent = (e: unknown) => action(eventName)(e); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("image-upload", eventName as any, id, handleEvent); return () => currentFormRef.removeFieldEventListener("image-upload", eventName as any, id, handleEvent); @@ -122,6 +123,7 @@ const SaveReviewImagesTemplate = (eventName: string) => ); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("image-upload", eventName as any, id, handleSaveReviewImages); return () => @@ -176,6 +178,7 @@ const ImageUploadReadyOrUploadedTemplate = (eventName: string, customMuted: bool }, 3000); }; + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("image-upload", eventName as any, handleUploadReady); return () => currentFormRef.removeFieldEventListener(eventName, id, handleUploadReady); diff --git a/src/stories/3-fields/image-upload/image-upload.stories.tsx b/src/stories/3-fields/image-upload/image-upload.stories.tsx index 3ba2ad1ba..1e332ae72 100644 --- a/src/stories/3-fields/image-upload/image-upload.stories.tsx +++ b/src/stories/3-fields/image-upload/image-upload.stories.tsx @@ -1,6 +1,6 @@ -import { action } from "@storybook/addon-actions"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { action } from "storybook/actions"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useEffect, useRef } from "react"; import { IImageUploadSchema } from "../../../components/fields"; import { IFrontendEngineRef } from "../../../components/frontend-engine"; @@ -397,6 +397,7 @@ export const WithTooltip: StoryFn = (args: IImageUploadSchem const formRef = useRef(); const handleTooltipClick = (e: unknown) => action("click-tooltip")(e); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("image-upload", "click-tooltip", id, handleTooltipClick); return () => currentFormRef.removeFieldEventListener("image-upload", "click-tooltip", id, handleTooltipClick); diff --git a/src/stories/3-fields/location-field/location-field-events.stories.tsx b/src/stories/3-fields/location-field/location-field-events.stories.tsx index a70f24e3b..ad02e481b 100644 --- a/src/stories/3-fields/location-field/location-field-events.stories.tsx +++ b/src/stories/3-fields/location-field/location-field-events.stories.tsx @@ -1,7 +1,7 @@ import { Typography } from "@lifesg/react-design-system/typography"; -import { action } from "@storybook/addon-actions"; -import { Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { action } from "storybook/actions"; +import { Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useEffect, useRef, useState } from "react"; import { ILocationCoord, @@ -62,6 +62,7 @@ const Template = (eventName: string) => const handleEvent = (e: unknown) => action(eventName)(e); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("location-field", eventName as any, id, handleEvent); return () => currentFormRef.removeFieldEventListener("location-field", eventName as any, id, handleEvent); @@ -96,6 +97,7 @@ const EditPromptTemplate = () => const formRef = useRef(); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("location-field", "click-edit-button", id, handleShowEditPrompt); @@ -181,6 +183,7 @@ const GeolocationTemplate = (detail: TSetCurrentLocationDetail) => }; useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener( @@ -228,6 +231,7 @@ const ConfirmLocationPromptTemplate = () => const formRef = useRef(); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener( "location-field", @@ -536,6 +540,7 @@ const ErrorEventsTemplate = () => }; useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("location-field", "error", id, handleShowErrorModal); @@ -590,6 +595,7 @@ const StrictLocationTemplate = () => }; useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener( "location-field", @@ -644,6 +650,7 @@ const HidePermissionModalTemplate = () => }; useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener( "location-field", @@ -692,6 +699,7 @@ const SetSelectablePinsTemplate = () => const formRef = useRef(); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("location-field", "get-selectable-pins", id, getPins); @@ -775,6 +783,7 @@ const RefreshLocationAndTriggerGetCurrentLocationTemplate = () => }; useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener( "location-field", diff --git a/src/stories/3-fields/location-field/location-field.stories.tsx b/src/stories/3-fields/location-field/location-field.stories.tsx index 41832d560..9d4108679 100644 --- a/src/stories/3-fields/location-field/location-field.stories.tsx +++ b/src/stories/3-fields/location-field/location-field.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useEffect, useRef } from "react"; import { ILocationCoord, ILocationFieldSchema, ILocationFieldValues } from "../../../components/fields"; import { IMapPin } from "../../../components/fields/location-field/location-modal/location-picker/types"; @@ -414,6 +414,7 @@ const IndicateCurrentLocationTemplate = () => const formRef = useRef(); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("location-field", "get-selectable-pins", id, getPins); diff --git a/src/stories/3-fields/masked-field/masked-field.stories.tsx b/src/stories/3-fields/masked-field/masked-field.stories.tsx index 62fcfd66c..f9ebd78c8 100644 --- a/src/stories/3-fields/masked-field/masked-field.stories.tsx +++ b/src/stories/3-fields/masked-field/masked-field.stories.tsx @@ -1,6 +1,6 @@ import * as Icons from "@lifesg/react-icons"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IMaskedFieldSchema } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/multi-select/multi-select.stories.tsx b/src/stories/3-fields/multi-select/multi-select.stories.tsx index 17bdc35c8..529893df6 100644 --- a/src/stories/3-fields/multi-select/multi-select.stories.tsx +++ b/src/stories/3-fields/multi-select/multi-select.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IMultiSelectSchema } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/nested-multi-select/nested-multi-select.stories.tsx b/src/stories/3-fields/nested-multi-select/nested-multi-select.stories.tsx index 123748a4c..f5a44ca79 100644 --- a/src/stories/3-fields/nested-multi-select/nested-multi-select.stories.tsx +++ b/src/stories/3-fields/nested-multi-select/nested-multi-select.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IL1Value, INestedMultiSelectSchema, TL1OptionProps } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/numeric-field/numeric-field.stories.tsx b/src/stories/3-fields/numeric-field/numeric-field.stories.tsx index d196691e7..8114cd303 100644 --- a/src/stories/3-fields/numeric-field/numeric-field.stories.tsx +++ b/src/stories/3-fields/numeric-field/numeric-field.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { INumericFieldSchema } from "../../../components/fields"; import { CommonFieldStoryProps, @@ -137,9 +137,9 @@ WithValidation.args = { validation: [{ required: true }], }; -export const DecimalsValidation = DefaultStoryTemplate( - "numeric-with-decimals-validation" -).bind({}); +export const DecimalsValidation = DefaultStoryTemplate("numeric-with-decimals-validation").bind( + {} +); DecimalsValidation.args = { label: "Number (max 2 decimal places)", uiType: "numeric-field", diff --git a/src/stories/3-fields/otp-verification-field/otp-verification-field.stories.tsx b/src/stories/3-fields/otp-verification-field/otp-verification-field.stories.tsx index cd724e6d5..92d5b5d47 100644 --- a/src/stories/3-fields/otp-verification-field/otp-verification-field.stories.tsx +++ b/src/stories/3-fields/otp-verification-field/otp-verification-field.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import axios from "axios"; import { IOtpVerificationFieldSchema, IOtpVerificationValue } from "../../../components/fields"; import { diff --git a/src/stories/3-fields/radio-button/radio-button.stories.tsx b/src/stories/3-fields/radio-button/radio-button.stories.tsx index 3906b8245..3110a4a0e 100644 --- a/src/stories/3-fields/radio-button/radio-button.stories.tsx +++ b/src/stories/3-fields/radio-button/radio-button.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { TRadioButtonGroupSchema } from "../../../components/fields/radio-button/types"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/radio-button/radio-image-button.stories.tsx b/src/stories/3-fields/radio-button/radio-image-button.stories.tsx index ae472e1a3..bb1bf8781 100644 --- a/src/stories/3-fields/radio-button/radio-image-button.stories.tsx +++ b/src/stories/3-fields/radio-button/radio-image-button.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { TRadioButtonGroupSchema } from "../../../components/fields/radio-button/types"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/radio-button/radio-toggle-button.stories.tsx b/src/stories/3-fields/radio-button/radio-toggle-button.stories.tsx index b5032fdc3..d7b235cba 100644 --- a/src/stories/3-fields/radio-button/radio-toggle-button.stories.tsx +++ b/src/stories/3-fields/radio-button/radio-toggle-button.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { TRadioButtonGroupSchema } from "../../../components/fields/radio-button/types"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/range-select/range-select.stories.tsx b/src/stories/3-fields/range-select/range-select.stories.tsx index 23c7eb5d2..ccdc24bd4 100644 --- a/src/stories/3-fields/range-select/range-select.stories.tsx +++ b/src/stories/3-fields/range-select/range-select.stories.tsx @@ -1,6 +1,6 @@ import { InputRangeProp } from "@lifesg/react-design-system/input-range-select"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IRangeSelectSchema } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/reset-button/reset-button.stories.tsx b/src/stories/3-fields/reset-button/reset-button.stories.tsx index 2c8cac98d..c527576ca 100644 --- a/src/stories/3-fields/reset-button/reset-button.stories.tsx +++ b/src/stories/3-fields/reset-button/reset-button.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { IResetButtonSchema } from "../../../components/fields"; import { CommonFieldStoryProps, FrontendEngine, OVERRIDES_ARG_TYPE } from "../../common"; diff --git a/src/stories/3-fields/select-histogram/select-histogram.stories.tsx b/src/stories/3-fields/select-histogram/select-histogram.stories.tsx index 99f5a4d79..97581fc9c 100644 --- a/src/stories/3-fields/select-histogram/select-histogram.stories.tsx +++ b/src/stories/3-fields/select-histogram/select-histogram.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Heading, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Heading, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IHistogramSliderValue, ISelectHistogramSchema } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/select/select.stories.tsx b/src/stories/3-fields/select/select.stories.tsx index 6ff71df21..181ce6886 100644 --- a/src/stories/3-fields/select/select.stories.tsx +++ b/src/stories/3-fields/select/select.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { ISelectSchema } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/slider/slider.stories.tsx b/src/stories/3-fields/slider/slider.stories.tsx index 6592b0dea..a537a4400 100644 --- a/src/stories/3-fields/slider/slider.stories.tsx +++ b/src/stories/3-fields/slider/slider.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { ISliderSchema } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/submit-button/submit-button.stories.tsx b/src/stories/3-fields/submit-button/submit-button.stories.tsx index c1bab66e2..cc91f8f27 100644 --- a/src/stories/3-fields/submit-button/submit-button.stories.tsx +++ b/src/stories/3-fields/submit-button/submit-button.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { ISubmitButtonSchema } from "../../../components/fields"; import { CommonFieldStoryProps, FrontendEngine, OVERRIDES_ARG_TYPE } from "../../common"; diff --git a/src/stories/3-fields/switch/switch.stories.tsx b/src/stories/3-fields/switch/switch.stories.tsx index 67c7174d1..aeb40998a 100644 --- a/src/stories/3-fields/switch/switch.stories.tsx +++ b/src/stories/3-fields/switch/switch.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { ISwitchSchema } from "../../../components/fields/switch/types"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/text-field/text-field.stories.tsx b/src/stories/3-fields/text-field/text-field.stories.tsx index 0d1069f0e..c54f72284 100644 --- a/src/stories/3-fields/text-field/text-field.stories.tsx +++ b/src/stories/3-fields/text-field/text-field.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { ITextFieldSchema } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/textarea/textarea.stories.tsx b/src/stories/3-fields/textarea/textarea.stories.tsx index 080265d31..e1ba4d18c 100644 --- a/src/stories/3-fields/textarea/textarea.stories.tsx +++ b/src/stories/3-fields/textarea/textarea.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { ITextareaSchema } from "../../../components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/time-field/time-field.stories.tsx b/src/stories/3-fields/time-field/time-field.stories.tsx index be9461958..69b754a5e 100644 --- a/src/stories/3-fields/time-field/time-field.stories.tsx +++ b/src/stories/3-fields/time-field/time-field.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { ITimeFieldSchema } from "src/components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/3-fields/unit-number-field/unit-number-field.stories.tsx b/src/stories/3-fields/unit-number-field/unit-number-field.stories.tsx index c1357a35c..5f6ad6cd7 100644 --- a/src/stories/3-fields/unit-number-field/unit-number-field.stories.tsx +++ b/src/stories/3-fields/unit-number-field/unit-number-field.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IUnitNumberFieldSchema } from "src/components/fields"; import { CommonFieldStoryProps, diff --git a/src/stories/4-elements/accordion/accordion.stories.tsx b/src/stories/4-elements/accordion/accordion.stories.tsx index 095424005..0352d5764 100644 --- a/src/stories/4-elements/accordion/accordion.stories.tsx +++ b/src/stories/4-elements/accordion/accordion.stories.tsx @@ -1,6 +1,6 @@ -import { action } from "@storybook/addon-actions"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { action } from "storybook/actions"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useEffect, useRef } from "react"; import { IFrontendEngineRef } from "../../../components"; import { IAccordionSchema } from "../../../components/elements/accordion/types"; @@ -110,6 +110,7 @@ const EventTemplate = (id: string, eventName: string) => const handleEvent = (e: unknown) => action(eventName)(e); // eslint-disable-next-line react-hooks/rules-of-hooks useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("accordion", eventName as any, id, handleEvent); return () => currentFormRef.removeFieldEventListener("accordion", eventName as any, id, handleEvent); diff --git a/src/stories/4-elements/alert/alert.stories.tsx b/src/stories/4-elements/alert/alert.stories.tsx index bc8df8298..10484d766 100644 --- a/src/stories/4-elements/alert/alert.stories.tsx +++ b/src/stories/4-elements/alert/alert.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { IAlertSchema } from "../../../components/elements"; import { CommonFieldStoryProps, FrontendEngine, OVERRIDES_ARG_TYPE, OverrideStoryTemplate } from "../../common"; diff --git a/src/stories/4-elements/divider/divider.stories.tsx b/src/stories/4-elements/divider/divider.stories.tsx index b0a7bde22..9121a2327 100644 --- a/src/stories/4-elements/divider/divider.stories.tsx +++ b/src/stories/4-elements/divider/divider.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { IDividerSchema } from "../../../components/elements"; import { CommonFieldStoryProps, FrontendEngine, OVERRIDES_ARG_TYPE, OverrideStoryTemplate } from "../../common"; diff --git a/src/stories/4-elements/grid/grid.stories.tsx b/src/stories/4-elements/grid/grid.stories.tsx index f36db5401..02145652e 100644 --- a/src/stories/4-elements/grid/grid.stories.tsx +++ b/src/stories/4-elements/grid/grid.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { IGridSchema } from "../../../components/elements"; import { CommonFieldStoryProps, DefaultStoryTemplate } from "../../common"; diff --git a/src/stories/4-elements/list/list.stories.tsx b/src/stories/4-elements/list/list.stories.tsx index 606981377..9be19ee70 100644 --- a/src/stories/4-elements/list/list.stories.tsx +++ b/src/stories/4-elements/list/list.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { IOrderedListSchema, IUnorderedListSchema } from "../../../components/elements"; import { CommonFieldStoryProps, FrontendEngine } from "../../common"; import { StarIcon } from "@lifesg/react-icons/star"; diff --git a/src/stories/4-elements/popover/popover.stories.tsx b/src/stories/4-elements/popover/popover.stories.tsx index 10fdf97f1..ccebe58e1 100644 --- a/src/stories/4-elements/popover/popover.stories.tsx +++ b/src/stories/4-elements/popover/popover.stories.tsx @@ -1,6 +1,7 @@ import * as Icons from "@lifesg/react-icons"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; +import dedent from "dedent"; import { IPopoverSchema } from "../../../components/elements"; import { CommonFieldStoryProps, FrontendEngine, OVERRIDES_ARG_TYPE, OverrideStoryTemplate } from "../../common"; @@ -60,7 +61,9 @@ const meta: Meta = { options: Object.keys(Icons), }, hint: { - description: `The popover configuration + description: dedent` + The popover configuration +
  • content: Content to display in the popover (string or schema).
  • customOffset: The popover offset.
  • diff --git a/src/stories/4-elements/section/section.stories.tsx b/src/stories/4-elements/section/section.stories.tsx index f52521cdb..89e5d5667 100644 --- a/src/stories/4-elements/section/section.stories.tsx +++ b/src/stories/4-elements/section/section.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { ISectionSchema } from "../../../components/elements/section"; import { CommonFieldStoryProps, FrontendEngine } from "../../common"; diff --git a/src/stories/4-elements/tab/tab.stories.tsx b/src/stories/4-elements/tab/tab.stories.tsx index 926c0b5a8..dd6d6fee3 100644 --- a/src/stories/4-elements/tab/tab.stories.tsx +++ b/src/stories/4-elements/tab/tab.stories.tsx @@ -1,6 +1,6 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { action } from "@storybook/addon-actions"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { action } from "storybook/actions"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { ITabSchema } from "../../../components/elements"; import { CommonFieldStoryProps, @@ -91,6 +91,7 @@ const Template = (id: string) => const handleEvent = (e: unknown) => action("change")(e); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener("tab", "change" as any, id, handleEvent); return () => currentFormRef.removeFieldEventListener("tab", "change" as any, id, handleEvent); diff --git a/src/stories/4-elements/text/text.stories.tsx b/src/stories/4-elements/text/text.stories.tsx index c804cfef3..5d6185b15 100644 --- a/src/stories/4-elements/text/text.stories.tsx +++ b/src/stories/4-elements/text/text.stories.tsx @@ -1,5 +1,6 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; +import dedent from "dedent"; import { ITextSchema } from "../../../components/elements"; import { CommonFieldStoryProps, FrontendEngine, LOREM_IPSUM } from "../../common"; @@ -87,7 +88,9 @@ const meta: Meta = { }, }, weight: { - description: `The weight of the text component.
    + description: dedent` + The weight of the text component.
    + For backward compatibility, numeric values will be mapped to the corresponding weight.
    300: light
    400: regular
    diff --git a/src/stories/4-elements/typography/typography.stories.tsx b/src/stories/4-elements/typography/typography.stories.tsx index 01a5f8425..2f6a23c47 100644 --- a/src/stories/4-elements/typography/typography.stories.tsx +++ b/src/stories/4-elements/typography/typography.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { ITypographySchema } from "../../../components/elements"; import { CommonFieldStoryProps, FrontendEngine, LOREM_IPSUM } from "../../common"; diff --git a/src/stories/4-elements/wrapper/wrapper.stories.tsx b/src/stories/4-elements/wrapper/wrapper.stories.tsx index cde224b5f..f08851722 100644 --- a/src/stories/4-elements/wrapper/wrapper.stories.tsx +++ b/src/stories/4-elements/wrapper/wrapper.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { TWrapperSchema } from "../../../components/elements/wrapper"; import { CommonFieldStoryProps, diff --git a/src/stories/5-custom/array-field/array-field.stories.tsx b/src/stories/5-custom/array-field/array-field.stories.tsx index 8e7b732cb..273d20016 100644 --- a/src/stories/5-custom/array-field/array-field.stories.tsx +++ b/src/stories/5-custom/array-field/array-field.stories.tsx @@ -1,5 +1,6 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; +import dedent from "dedent"; import { IArrayFieldSchema } from "../../../components/custom"; import { IFrontendEngineRef, TFrontendEngineFieldSchema } from "../../../components/types"; import { @@ -79,14 +80,15 @@ const meta: Meta = { }, }, addButton: { - description: `Customisation options for the add button
    + description: dedent` + Customisation options for the add button
    +
    • \`label\` prop overrides the text
    • \`icon\` prop overrides the icon, based on React Icons
    • \`styleType\` prop sets the button style (\`default\`, \`secondary\`, \`light\`, \`link\`)
    `, - table: { type: { summary: "{ label?: string, icon?: string, styleType?: ButtonStyleType }", @@ -94,7 +96,9 @@ const meta: Meta = { }, }, removeButton: { - description: `Customisation options for the remove button
    + description: dedent` + Customisation options for the remove button
    +
    • \`label\` prop overrides the text
    • \`icon\` prop sets the icon, based on React Icons
    • @@ -111,13 +115,14 @@ const meta: Meta = { }, }, removeConfirmationModal: { - description: `Customisation options for the confirmation modal when item is removed
      + description: dedent` + Customisation options for the confirmation modal when item is removed
      +
      • \`title\` prop overrides the confirmation text title
      • \`skip\` prop skips the confirmation modal and removes the item immediately
      `, - table: { type: { summary: "{ title?: string } | { skip: true }", diff --git a/src/stories/5-custom/filter/filter-checkbox-item.stories.tsx b/src/stories/5-custom/filter/filter-checkbox-item.stories.tsx index 2b23756cf..e7b93b980 100644 --- a/src/stories/5-custom/filter/filter-checkbox-item.stories.tsx +++ b/src/stories/5-custom/filter/filter-checkbox-item.stories.tsx @@ -1,5 +1,6 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; +import dedent from "dedent"; import { IFilterCheckboxSchema } from "../../../components/custom/filter/filter-checkbox/types"; import { CommonCustomStoryProps, @@ -27,13 +28,16 @@ const meta: Meta = { argTypes: { ...CommonCustomStoryProps("filter-checkbox"), label: { - description: `A name/description of the purpose of the section which may include an optional hint displayed in a popover.
      + description: dedent` + A name/description of the purpose of the section which may include an optional hint displayed in a popover.
      If string is provided, the entire label will be rendered.
      If object is provided: +
      • mainLabel: Primary text to display.
      • hint.content: Displays an info icon and brings up the content as a popover on click. Accepts a string or schema for more customisation. (See Label Customisation With Schema story)
      • -
      `, +
    + `, table: { type: { summary: diff --git a/src/stories/5-custom/filter/filter-item.stories.tsx b/src/stories/5-custom/filter/filter-item.stories.tsx index 0361763c3..22815b474 100644 --- a/src/stories/5-custom/filter/filter-item.stories.tsx +++ b/src/stories/5-custom/filter/filter-item.stories.tsx @@ -1,5 +1,6 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; +import dedent from "dedent"; import { IFilterItemSchema } from "../../../components/custom/filter/filter-item/types"; import { CommonCustomStoryProps, FrontendEngine, OVERRIDES_ARG_TYPE, OverrideStoryTemplate } from "../../common"; import { IFilterSchema } from "../../../components/custom/filter/filter/types"; @@ -21,13 +22,16 @@ const meta: Meta = { argTypes: { ...CommonCustomStoryProps("filter-item"), label: { - description: `A name/description of the purpose of the section which may include an optional hint displayed in a popover.
    + description: dedent` + A name/description of the purpose of the section which may include an optional hint displayed in a popover.
    If string is provided, the entire label will be rendered.
    If object is provided: +
    • mainLabel: Primary text to display.
    • hint.content: Displays an info icon and brings up the content as a popover on click. Accepts a string or schema for more customisation. (See Label Customisation With Schema story)
    • -
    `, +
+ `, table: { type: { summary: diff --git a/src/stories/5-custom/filter/filter.stories.tsx b/src/stories/5-custom/filter/filter.stories.tsx index 747ee205a..634517391 100644 --- a/src/stories/5-custom/filter/filter.stories.tsx +++ b/src/stories/5-custom/filter/filter.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { CommonCustomStoryProps, FrontendEngine, OVERRIDES_ARG_TYPE, OverrideStoryTemplate } from "../../common"; import { IFilterSchema } from "../../../components/custom/filter/filter/types"; import { useRef } from "react"; diff --git a/src/stories/5-custom/iframe/iframe.stories.tsx b/src/stories/5-custom/iframe/iframe.stories.tsx index 8427acce7..d334c23ee 100644 --- a/src/stories/5-custom/iframe/iframe.stories.tsx +++ b/src/stories/5-custom/iframe/iframe.stories.tsx @@ -1,8 +1,8 @@ import { LoadingDotsSpinner } from "@lifesg/react-design-system/animations"; import { Modal } from "@lifesg/react-design-system/modal"; -import { action } from "@storybook/addon-actions"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn, StoryObj } from "@storybook/react"; +import { action } from "storybook/actions"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn, StoryObj } from "@storybook/react-webpack5"; import { useEffect, useRef, useState } from "react"; import { IFrontendEngineRef } from "../../../components"; import { IIframeSchema } from "../../../components/custom/iframe/types"; diff --git a/src/stories/5-custom/review/review-accordion.stories.tsx b/src/stories/5-custom/review/review-accordion.stories.tsx index 84c7d2443..8a4be47ac 100644 --- a/src/stories/5-custom/review/review-accordion.stories.tsx +++ b/src/stories/5-custom/review/review-accordion.stories.tsx @@ -1,6 +1,6 @@ -import { action } from "@storybook/addon-actions"; -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta, StoryFn } from "@storybook/react"; +import { action } from "storybook/actions"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta, StoryFn } from "@storybook/react-webpack5"; import { useEffect, useRef } from "react"; import { IFrontendEngineRef } from "../../../components"; import { TReviewSchema, TReviewSchemaItem } from "../../../components/custom/review"; @@ -149,6 +149,7 @@ const EventTemplate = (eventName: string) => const formRef = useRef(); const handleEvent = (e: unknown) => action(eventName)(e); useEffect(() => { + if (!formRef.current) return; const currentFormRef = formRef.current; currentFormRef.addFieldEventListener(eventName, id, handleEvent); return () => currentFormRef.removeFieldEventListener(eventName, id, handleEvent); diff --git a/src/stories/5-custom/review/review-box.stories.tsx b/src/stories/5-custom/review/review-box.stories.tsx index e7dcb7309..55ef33eea 100644 --- a/src/stories/5-custom/review/review-box.stories.tsx +++ b/src/stories/5-custom/review/review-box.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { TReviewSchema, TReviewSchemaItem } from "../../../components/custom/review"; import { CommonCustomStoryProps, DefaultStoryTemplate } from "../../common"; diff --git a/src/stories/5-custom/timeline/timeline.stories.tsx b/src/stories/5-custom/timeline/timeline.stories.tsx index 6f2d10644..856a02d6e 100644 --- a/src/stories/5-custom/timeline/timeline.stories.tsx +++ b/src/stories/5-custom/timeline/timeline.stories.tsx @@ -1,5 +1,5 @@ -import { ArgTypes, Heading, Stories, Title } from "@storybook/addon-docs"; -import { Meta } from "@storybook/react"; +import { ArgTypes, Stories, Title } from "@storybook/addon-docs/blocks"; +import { Meta } from "@storybook/react-webpack5"; import { ITimelineSchema } from "../../../components/custom/timeline"; import { CommonCustomStoryProps, DefaultStoryTemplate } from "../../common"; diff --git a/src/stories/common.tsx b/src/stories/common.tsx index 4ae3ffd26..535d9738c 100644 --- a/src/stories/common.tsx +++ b/src/stories/common.tsx @@ -1,9 +1,10 @@ import { Button } from "@lifesg/react-design-system/button"; import { Breakpoint, MediaQuery } from "@lifesg/react-design-system/theme"; -import { action } from "@storybook/addon-actions"; +import { action } from "storybook/actions"; import { ArgTypes, StoryFn } from "@storybook/react"; import { ReactElement, Ref, forwardRef, useRef } from "react"; import styled from "styled-components"; +import dedent from "dedent"; import { IFrontendEngineProps, IYupValidationRule, FrontendEngine as OriginalFrontendEngine } from "../components"; import { IResetButtonSchema, ISubmitButtonSchema } from "../components/fields"; import { IFrontendEngineRef, TFrontendEngineFieldSchema } from "../components/frontend-engine"; @@ -58,8 +59,11 @@ export const CommonFieldStoryProps = (uiType: string, isElement = false): ArgTyp }, }, label: { - description: `A name/description of the purpose of the form element which may include an optional sub-label and popover feature.
- If string is provided, the entire label will be rendered.
If object is provided: + description: dedent` + A name/description of the purpose of the form element which may include an optional sub-label and popover feature.
+ If string is provided, the entire label will be rendered.
+ If object is provided: +
  • mainLabel: Primary text to display.
  • subLabel: Secondary text to display below the mainLabel.
  • @@ -147,21 +151,23 @@ export const CommonCustomStoryWithoutLabelProps = (referenceKey: string): ArgTyp export const COLUMNS_ARG_TYPE: ArgTypes = { columns: { - description: `Specifies the number of columns to be span across in desktop / tablet / mobile viewports. If an array is specified, the format is as such [startCol, endCol].

    - The system automatically determines which grid layout to use based on the properties you provide:
    - V2 Grid System is applied when you use desktop, tablet, or mobile properties
    - V3 Grid System is applied when you use any of the properties xxs, xs, sm, md, lg, xl, or xxl

    - For v2 version:
    - Permitted values:
    - Desktop: 1 - 12 and 1 - 13 if specifying a range.
    Mobile: 1 - 4 and 1 - 5 if specifying a range.

    - Settings are applied by similar to how @max-width works: if desktop is not specified, tablet will be used for desktop and tablet, if tablet is also not specified, mobile will be used for all screen sizes.

    - If all column settings are not specified, element will span across a single column.

    - For v3 version:
    - Permitted values:
    - xxs-md: 1-8 or 1-9 if specifying a range.
    - lg-xxl: 1-12 or 1-13 if specifying a range.

    - Settings are applied by similar to how @max-width works: if lg-xxl is not specified, xxs-md will be used for all screen sizes.

    - If all column settings are not specified, element will span across a single column.

    `, + description: dedent` + Specifies the number of columns to be span across in desktop / tablet / mobile viewports. If an array is specified, the format is as such [startCol, endCol].

    + The system automatically determines which grid layout to use based on the properties you provide:
    + V2 Grid System is applied when you use desktop, tablet, or mobile properties
    + V3 Grid System is applied when you use any of the properties xxs, xs, sm, md, lg, xl, or xxl

    + For v2 version:
    + Permitted values:
    + Desktop: 1 - 12 and 1 - 13 if specifying a range.
    Mobile: 1 - 4 and 1 - 5 if specifying a range.

    + Settings are applied by similar to how @max-width works: if desktop is not specified, tablet will be used for desktop and tablet, if tablet is also not specified, mobile will be used for all screen sizes.

    + If all column settings are not specified, element will span across a single column.

    + For v3 version:
    + Permitted values:
    + xxs-md: 1-8 or 1-9 if specifying a range.
    + lg-xxl: 1-12 or 1-13 if specifying a range.

    + Settings are applied by similar to how @max-width works: if lg-xxl is not specified, xxs-md will be used for all screen sizes.

    + If all column settings are not specified, element will span across a single column.

    + `, table: { type: { summary: `v2: {desktop?: number, tablet?: number, mobile?: number} | v3: {xxs?: number, xs?: number, sm?: number, md?: number, lg?: number, xl?: number, xxl?: number}`, diff --git a/tsconfig.json b/tsconfig.json index e1bcd20f0..3d46dacff 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "isolatedModules": true, // warns if code can’t be correctly interpreted by a single-file transpilation process "noEmit": true, // declares that tsc is only used for type checking and compiler to not output transpiled code /** Module settings **/ - "moduleResolution": "node", // use Nodejs module resolution strategy (else uses classic TS strategy) + "moduleResolution": "bundler", // for use with modern bundler-based projects "baseUrl": "./", // for absolute file resolution "esModuleInterop": true, // allow interop between ESM and CJS/AMD/UMD modules "resolveJsonModule": true, // allow importing .json files