From b49e8ab4704a2585adeb48d27bd03dc214fd1db3 Mon Sep 17 00:00:00 2001 From: jackson Date: Tue, 19 Nov 2024 11:49:00 +0000 Subject: [PATCH 1/2] Storybook refactor --- .storybook/main.ts | 21 +- .storybook/{preview.ts => preview.tsx} | 17 +- package-lock.json | 179 +++--------------- package.json | 7 +- src/components/Pax/PaxSearchForm.stories.tsx | 8 +- src/components/Typography.stories.tsx | 25 --- src/components/mui/Autocomplete.stories.tsx | 31 +++ src/components/mui/Card.stories.tsx | 30 +++ src/components/mui/Checkbox.stories.tsx | 19 ++ src/components/mui/Datepicker.stories.tsx | 21 ++ src/components/mui/FormSpecimens.mdx | 48 +++++ src/components/mui/RadioGroup.stories.tsx | 51 +++++ src/components/mui/Select.stories.tsx | 57 ++++++ src/components/mui/Slider.stories.tsx | 27 +++ src/components/mui/TextField.stories.tsx | 18 ++ src/components/mui/Theme.mdx | 15 ++ src/components/mui/ThemeSource.tsx | 11 ++ src/components/mui/Timepicker.stories.tsx | 21 ++ src/components/mui/ToggleButton.stories.tsx | 47 +++++ src/components/mui/TypeSpecimen.stories.tsx | 81 ++++++++ src/components/mui/Typography.mdx | 28 +++ src/components/mui/Typography.stories.tsx | 29 +++ .../storybookExports/Buttons.component.tsx | 21 ++ .../mui/storybookExports/Card.component.tsx | 14 ++ .../storybookExports/FormFields.component.tsx | 68 +++++++ .../storybookExports/Typography.component.tsx | 9 + 26 files changed, 715 insertions(+), 188 deletions(-) rename .storybook/{preview.ts => preview.tsx} (64%) delete mode 100644 src/components/Typography.stories.tsx create mode 100644 src/components/mui/Autocomplete.stories.tsx create mode 100644 src/components/mui/Card.stories.tsx create mode 100644 src/components/mui/Checkbox.stories.tsx create mode 100644 src/components/mui/Datepicker.stories.tsx create mode 100644 src/components/mui/FormSpecimens.mdx create mode 100644 src/components/mui/RadioGroup.stories.tsx create mode 100644 src/components/mui/Select.stories.tsx create mode 100644 src/components/mui/Slider.stories.tsx create mode 100644 src/components/mui/TextField.stories.tsx create mode 100644 src/components/mui/Theme.mdx create mode 100644 src/components/mui/ThemeSource.tsx create mode 100644 src/components/mui/Timepicker.stories.tsx create mode 100644 src/components/mui/ToggleButton.stories.tsx create mode 100644 src/components/mui/TypeSpecimen.stories.tsx create mode 100644 src/components/mui/Typography.mdx create mode 100644 src/components/mui/Typography.stories.tsx create mode 100644 src/components/mui/storybookExports/Buttons.component.tsx create mode 100644 src/components/mui/storybookExports/Card.component.tsx create mode 100644 src/components/mui/storybookExports/FormFields.component.tsx create mode 100644 src/components/mui/storybookExports/Typography.component.tsx diff --git a/.storybook/main.ts b/.storybook/main.ts index c28ffef..826d5fa 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -1,7 +1,7 @@ import type { StorybookConfig } from '@storybook/react-webpack5'; const config: StorybookConfig = { stories: [ - '../src/**/*.stories.mdx', + '../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)' ], @@ -14,6 +14,7 @@ const config: StorybookConfig = { '@storybook/addon-themes', '@storybook/addon-webpack5-compiler-babel', '@storybook/addon-a11y', + '@kemuridama/storybook-addon-github', ], framework: { @@ -24,7 +25,23 @@ const config: StorybookConfig = { docs: {}, typescript: { - reactDocgen: 'react-docgen-typescript' + reactDocgen: 'react-docgen-typescript', + reactDocgenTypescriptOptions: { + // Speeds up Storybook build time + compilerOptions: { + allowSyntheticDefaultImports: false, + esModuleInterop: false, + }, + // Makes union prop types like variant and size appear as select controls + shouldExtractLiteralValuesFromEnum: true, + // Makes string and boolean types that can be undefined appear as inputs and switches + shouldRemoveUndefinedFromOptional: true, + // Filter out third-party props from node_modules except @mui packages + propFilter: (prop) => + prop.parent + ? !/node_modules\/(?!@mui)/.test(prop.parent.fileName) + : true, + }, }, webpackFinal: async config => { // Grab the existing rule that handles SVG imports diff --git a/.storybook/preview.ts b/.storybook/preview.tsx similarity index 64% rename from .storybook/preview.ts rename to .storybook/preview.tsx index 49b3203..62af35a 100644 --- a/.storybook/preview.ts +++ b/.storybook/preview.tsx @@ -1,4 +1,7 @@ +import * as React from 'react'; import { Preview, ReactRenderer } from "@storybook/react"; +import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment'; +import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; import { fn } from '@storybook/test'; import { withTests } from '@storybook/addon-jest'; import { withThemeFromJSXProvider } from '@storybook/addon-themes'; @@ -26,16 +29,26 @@ const preview: Preview = { }), withTests({ results, - }) + }), + (Story) => ( + + + + ) ], parameters: { - actions: { onClick: fn() }, + actions: { onClick: fn(), argTypesRegex: '^on[A-Z].*' }, controls: { + expanded: true, // Adds the description and default columns matchers: { color: /(background|color)$/i, date: /Date$/, }, }, + github: { + repository: "UKHomeOffice/drt-react", + branch: "main", + } }, }; diff --git a/package-lock.json b/package-lock.json index e350755..ebae341 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@emotion/styled": "^11.11.5", "@fontsource/material-icons": "^5.0.18", "@fontsource/roboto": "^5.0.13", + "@kemuridama/storybook-addon-github": "^1.3.0", "@mui/icons-material": "5.16.5", "@mui/lab": "5.0.0-alpha.119", "@mui/material": "5.16.5", @@ -3000,6 +3001,16 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@kemuridama/storybook-addon-github": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@kemuridama/storybook-addon-github/-/storybook-addon-github-1.3.0.tgz", + "integrity": "sha512-GGab1pODf4TVaLoheLs9RL20Jbw2JIkYvU0R8znEI0HKjLpNVzV9SBHKVr5Nt+Lih44UfY9qcl3MQtgQ6frUbQ==", + "peerDependencies": { + "@storybook/components": "^7 || ^8", + "@storybook/manager-api": "^7 || ^8", + "react": "^17 || ^18" + } + }, "node_modules/@mdx-js/react": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.0.tgz", @@ -4186,7 +4197,6 @@ "version": "8.3.6", "resolved": "https://registry.npmjs.org/@storybook/components/-/components-8.3.6.tgz", "integrity": "sha512-TXuoGZY7X3iixF45lXkYOFk8k2q9OHcqHyHyem1gATLLQXgyOvDgzm+VB7uKBNzssRQPEE+La70nfG8bq/viRw==", - "dev": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" @@ -4199,7 +4209,6 @@ "version": "8.3.6", "resolved": "https://registry.npmjs.org/@storybook/core/-/core-8.3.6.tgz", "integrity": "sha512-frwfgf0EJ7QL29DWZ5bla/g0eOOWqJGd14t+VUBlpP920zB6sdDfo7+p9JoCjD9u08lGeFDqbPNKayUk+0qDag==", - "dev": true, "dependencies": { "@storybook/csf": "^0.1.11", "@types/express": "^4.17.21", @@ -4244,7 +4253,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "aix" @@ -4260,7 +4268,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "android" @@ -4276,7 +4283,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "android" @@ -4292,7 +4298,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "android" @@ -4308,7 +4313,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -4324,7 +4328,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -4340,7 +4343,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -4356,7 +4358,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -4372,7 +4373,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4388,7 +4388,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4404,7 +4403,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4420,7 +4418,6 @@ "cpu": [ "loong64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4436,7 +4433,6 @@ "cpu": [ "mips64el" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4452,7 +4448,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4468,7 +4463,6 @@ "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4484,7 +4478,6 @@ "cpu": [ "s390x" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4500,7 +4493,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4516,7 +4508,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "netbsd" @@ -4532,7 +4523,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "openbsd" @@ -4548,7 +4538,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "openbsd" @@ -4564,7 +4553,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "sunos" @@ -4580,7 +4568,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -4596,7 +4583,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -4612,7 +4598,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -4625,7 +4610,6 @@ "version": "0.23.1", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", - "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -4664,7 +4648,6 @@ "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, "bin": { "semver": "bin/semver.js" }, @@ -4676,7 +4659,6 @@ "version": "0.1.11", "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.11.tgz", "integrity": "sha512-dHYFQH3mA+EtnCkHXzicbLgsvzYjcDJ1JWsogbItZogkPHgSJM/Wr71uMkcvw8v9mmCyP4NpXJuu6bPoVsOnzg==", - "dev": true, "dependencies": { "type-fest": "^2.19.0" } @@ -4737,7 +4719,6 @@ "version": "8.3.6", "resolved": "https://registry.npmjs.org/@storybook/manager-api/-/manager-api-8.3.6.tgz", "integrity": "sha512-Xt5VFZcL+G/9uzaHjzWFhxRNrP+4rPhSRKEvCZorAbC9+Hv+ZDs1JSZS5wMb4WKpXBZ0rwDVOLwngqbVtfRHuQ==", - "dev": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" @@ -5489,7 +5470,6 @@ "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", - "dev": true, "dependencies": { "@types/connect": "*", "@types/node": "*" @@ -5499,7 +5479,6 @@ "version": "3.4.38", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dev": true, "dependencies": { "@types/node": "*" } @@ -5531,7 +5510,6 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", - "dev": true, "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -5543,7 +5521,6 @@ "version": "4.19.6", "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", - "dev": true, "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -5578,8 +5555,7 @@ "node_modules/@types/http-errors": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", - "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", - "dev": true + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", @@ -5672,8 +5648,7 @@ "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", - "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "dev": true + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/node": { "version": "22.8.2", @@ -5697,14 +5672,12 @@ "node_modules/@types/qs": { "version": "6.9.16", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.16.tgz", - "integrity": "sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==", - "dev": true + "integrity": "sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==" }, "node_modules/@types/range-parser": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", - "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "dev": true + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" }, "node_modules/@types/react": { "version": "18.3.12", @@ -5748,7 +5721,6 @@ "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", - "dev": true, "dependencies": { "@types/mime": "^1", "@types/node": "*" @@ -5758,7 +5730,6 @@ "version": "1.15.7", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", - "dev": true, "dependencies": { "@types/http-errors": "*", "@types/node": "*", @@ -6275,7 +6246,6 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -6547,8 +6517,7 @@ "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/array-includes": { "version": "3.1.8", @@ -6695,7 +6664,6 @@ "version": "0.16.1", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.16.1.tgz", "integrity": "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==", - "dev": true, "dependencies": { "tslib": "^2.0.1" }, @@ -6719,7 +6687,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, "dependencies": { "possible-typed-array-names": "^1.0.0" }, @@ -7040,7 +7007,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/better-opn/-/better-opn-3.0.2.tgz", "integrity": "sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==", - "dev": true, "dependencies": { "open": "^8.0.4" }, @@ -7064,7 +7030,6 @@ "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", - "dev": true, "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -7088,7 +7053,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "dependencies": { "ms": "2.0.0" } @@ -7096,8 +7060,7 @@ "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/boolbase": { "version": "1.0.0", @@ -7129,8 +7092,7 @@ "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 + "integrity": "sha512-nfulgvOR6S4gt9UKCeGJOuSGBPGiFT6oQ/2UBnvTY/5aQ1PnksW72fhZkM30DzoRRv2WpwZf1vHHEr3mtuXIWQ==" }, "node_modules/browserslist": { "version": "4.24.2", @@ -7181,7 +7143,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, "engines": { "node": ">= 0.8" } @@ -7190,7 +7151,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -7542,7 +7502,6 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, "dependencies": { "safe-buffer": "5.2.1" }, @@ -7554,7 +7513,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -7568,7 +7526,6 @@ "version": "0.7.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -7576,8 +7533,7 @@ "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/core-js-compat": { "version": "3.38.1", @@ -8077,7 +8033,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -8094,7 +8049,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "dev": true, "engines": { "node": ">=8" } @@ -8129,7 +8083,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, "engines": { "node": ">= 0.8" } @@ -8147,7 +8100,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -8319,8 +8271,7 @@ "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { "version": "1.5.49", @@ -8355,7 +8306,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "dev": true, "engines": { "node": ">= 0.8" } @@ -8466,7 +8416,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -8478,7 +8427,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -8627,7 +8575,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.6.0.tgz", "integrity": "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==", - "dev": true, "dependencies": { "debug": "^4.3.4" }, @@ -8646,8 +8593,7 @@ "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "node_modules/escape-string-regexp": { "version": "4.0.0", @@ -8935,7 +8881,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -8993,7 +8938,6 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -9072,7 +9016,6 @@ "version": "4.21.1", "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", - "dev": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -9114,7 +9057,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "dependencies": { "ms": "2.0.0" } @@ -9122,8 +9064,7 @@ "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -9253,7 +9194,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", - "dev": true, "dependencies": { "debug": "2.6.9", "encodeurl": "~2.0.0", @@ -9271,7 +9211,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "dependencies": { "ms": "2.0.0" } @@ -9279,8 +9218,7 @@ "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/find-cache-dir": { "version": "3.3.2", @@ -9382,7 +9320,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, "dependencies": { "is-callable": "^1.1.3" } @@ -9493,7 +9430,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -9502,7 +9438,6 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -9606,7 +9541,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -9883,7 +9817,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -9929,7 +9862,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -9941,7 +9873,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -9953,7 +9884,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -9965,7 +9895,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, "dependencies": { "has-symbols": "^1.0.3" }, @@ -10190,7 +10119,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -10242,7 +10170,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -10392,8 +10319,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/install-peers": { "version": "1.0.4", @@ -10422,7 +10348,6 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, "engines": { "node": ">= 0.10" } @@ -10443,7 +10368,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -10535,7 +10459,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -10591,7 +10514,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, "bin": { "is-docker": "cli.js" }, @@ -10645,7 +10567,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -10844,7 +10765,6 @@ "version": "1.1.13", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, "dependencies": { "which-typed-array": "^1.1.14" }, @@ -10899,7 +10819,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, "dependencies": { "is-docker": "^2.0.0" }, @@ -11953,7 +11872,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz", "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==", - "dev": true, "engines": { "node": ">=12.0.0" } @@ -12312,7 +12230,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -12342,7 +12259,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "dev": true, "funding": { "url": "https://github.com/sponsors/sindresorhus" } @@ -12365,7 +12281,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -12399,7 +12314,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, "bin": { "mime": "cli.js" }, @@ -12560,7 +12474,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -12664,7 +12577,6 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -12774,7 +12686,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, "dependencies": { "ee-first": "1.1.1" }, @@ -12810,7 +12721,6 @@ "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, "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", @@ -12970,7 +12880,6 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, "engines": { "node": ">= 0.8" } @@ -13057,8 +12966,7 @@ "node_modules/path-to-regexp": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", - "dev": true + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" }, "node_modules/path-type": { "version": "4.0.0", @@ -13216,7 +13124,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -13898,7 +13805,6 @@ "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, "engines": { "node": ">= 0.6.0" } @@ -13944,7 +13850,6 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -13987,7 +13892,6 @@ "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, "dependencies": { "side-channel": "^1.0.6" }, @@ -14036,7 +13940,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -14045,7 +13948,6 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -14188,7 +14090,6 @@ "version": "0.23.9", "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.9.tgz", "integrity": "sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==", - "dev": true, "dependencies": { "ast-types": "^0.16.1", "esprima": "~4.0.0", @@ -14204,7 +14105,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -14715,8 +14615,7 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { "version": "1.80.4", @@ -14888,7 +14787,6 @@ "version": "0.19.0", "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", - "dev": true, "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -14912,7 +14810,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "dependencies": { "ms": "2.0.0" } @@ -14920,14 +14817,12 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/send/node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, "engines": { "node": ">= 0.8" } @@ -14944,7 +14839,6 @@ "version": "1.16.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", - "dev": true, "dependencies": { "encodeurl": "~2.0.0", "escape-html": "~1.0.3", @@ -14959,7 +14853,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -14990,8 +14883,7 @@ "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/shebang-command": { "version": "2.0.0", @@ -15018,7 +14910,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -15152,7 +15043,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, "engines": { "node": ">= 0.8" } @@ -15173,7 +15063,6 @@ "version": "8.3.6", "resolved": "https://registry.npmjs.org/storybook/-/storybook-8.3.6.tgz", "integrity": "sha512-9GVbtej6ZzPRUM7KRQ7848506FfHrUiJGqPuIQdoSJd09EmuEoLjmLAgEOmrHBQKgGYMaM7Vh9GsTLim6vwZTQ==", - "dev": true, "dependencies": { "@storybook/core": "8.3.6" }, @@ -15729,8 +15618,7 @@ "node_modules/tiny-invariant": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", - "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", - "dev": true + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" }, "node_modules/tinyrainbow": { "version": "1.2.0", @@ -15772,7 +15660,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, "engines": { "node": ">=0.6" } @@ -15917,7 +15804,6 @@ "version": "2.19.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", - "dev": true, "engines": { "node": ">=12.20" }, @@ -15929,7 +15815,6 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -16135,7 +16020,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, "engines": { "node": ">= 0.8" } @@ -16253,7 +16137,6 @@ "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, "dependencies": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", @@ -16277,7 +16160,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, "engines": { "node": ">= 0.4.0" } @@ -16313,7 +16195,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, "engines": { "node": ">= 0.8" } @@ -16619,7 +16500,6 @@ "version": "1.1.15", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", - "dev": true, "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", @@ -16683,7 +16563,6 @@ "version": "8.18.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "dev": true, "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index 3a27f96..4de88f3 100644 --- a/package.json +++ b/package.json @@ -98,13 +98,11 @@ "@emotion/styled": "^11.11.5", "@fontsource/material-icons": "^5.0.18", "@fontsource/roboto": "^5.0.13", + "@kemuridama/storybook-addon-github": "^1.3.0", "@mui/icons-material": "5.16.5", "@mui/lab": "5.0.0-alpha.119", "@mui/material": "5.16.5", "@mui/x-date-pickers": "^6.20.2", - "moment": "^2.29.4", - "moment-timezone": "^0.5.43", - "momentjs": "^2.0.0", "@storybook/addon-a11y": "^8.1.10", "@storybook/icons": "^1.2.9", "@svgr/webpack": "^8.1.0", @@ -113,6 +111,9 @@ "dayjs": "^1.11.13", "esbuild": "^0.24.0", "install-peers": "^1.0.4", + "moment": "^2.29.4", + "moment-timezone": "^0.5.43", + "momentjs": "^2.0.0", "postcss": "^8.4.38", "sass-loader": "^14.2.1", "style-loader": "^4.0.0" diff --git a/src/components/Pax/PaxSearchForm.stories.tsx b/src/components/Pax/PaxSearchForm.stories.tsx index af68af7..279c5b2 100644 --- a/src/components/Pax/PaxSearchForm.stories.tsx +++ b/src/components/Pax/PaxSearchForm.stories.tsx @@ -1,6 +1,4 @@ import * as React from 'react'; -import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment'; -import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider"; import { DatePicker } from '@mui/x-date-pickers'; import { TimePicker } from '@mui/x-date-pickers/TimePicker'; import {InfoTooltip} from '../ui/InfoTooltip'; @@ -55,14 +53,14 @@ export const PaxFormLayout: Story = { render: () => { const [args, updateArgs] = useArgs(); - const handleChangeDay = ( event: React.MouseEvent, newValue: string | null) => { + const handleChangeDay = (event: React.MouseEvent, newValue: string | null) => { updateArgs({ ...args, day: newValue }); }; - const handleChangeTime = ( event: React.MouseEvent, newValue: string | null) => { + const handleChangeTime = (event: React.MouseEvent, newValue: string | null) => { updateArgs({ ...args, time: newValue @@ -78,7 +76,6 @@ export const PaxFormLayout: Story = { }; return ( - ({ maxWidth: '600px', padding: 2, @@ -124,7 +121,6 @@ export const PaxFormLayout: Story = { {args.timeMachine ? 'On' : 'Off'} - ) } }; diff --git a/src/components/Typography.stories.tsx b/src/components/Typography.stories.tsx deleted file mode 100644 index 7d2c991..0000000 --- a/src/components/Typography.stories.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from 'react'; -import { Typography as MuiTypography } from "@mui/material"; - -import type {Meta, StoryObj} from '@storybook/react'; - -const meta: Meta = { - title: "DRT Components/MUI Components/Typography", - component: MuiTypography, -}; - -export default meta; -type Story = StoryObj; - -export const TitleTypography: Story = { - render: (storyContext) => { - return <> - H1. The quick brown fox jumps over the lazy dog - H2. The quick brown fox jumps over the lazy dog - H3. The quick brown fox jumps over the lazy dog - H4. The quick brown fox jumps over the lazy dog - H5. The quick brown fox jumps over the lazy dog - H6. The quick brown fox jumps over the lazy dog - - } -}; diff --git a/src/components/mui/Autocomplete.stories.tsx b/src/components/mui/Autocomplete.stories.tsx new file mode 100644 index 0000000..698d7fa --- /dev/null +++ b/src/components/mui/Autocomplete.stories.tsx @@ -0,0 +1,31 @@ +import * as React from 'react'; +import { TextField, Autocomplete as MuiAutocomplete } from "./storybookExports/FormFields.component"; + +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + title: "DRT Components/MUI Components/Forms/Autocomplete", + component: MuiAutocomplete, +}; + +export default meta; +type Story = StoryObj; + +const options = [ + {label: '(LHR) Heathrow', value: 'LHR'}, + {label: '(LGW) Gatwick', value: 'LHR'}, + {label: '(LCY) City', value: 'LHR'}, + {label: '(STN) Stanstead', value: 'LHR'}, + {label: '(SEN) Southend', value: 'LHR'}, +] + +export const Autocomplete: Story = { + args: { + autoComplete: true, + noOptionsText: 'No airports found', + options: options, + sx: {width: 300}, + renderInput: (params) => , + disabled: false, + } +}; diff --git a/src/components/mui/Card.stories.tsx b/src/components/mui/Card.stories.tsx new file mode 100644 index 0000000..f4c96df --- /dev/null +++ b/src/components/mui/Card.stories.tsx @@ -0,0 +1,30 @@ +import * as React from 'react'; +import { Card as MuiCard, CardContent } from "./storybookExports/Card.component"; + +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + title: "DRT Components/MUI Components/Card", + component: MuiCard, + args: { + sx: { + width: '300px', + height: '200px', + } + }, + argTypes: { + variant: { + options: ['elevation', 'outlined','appbar'], + control: {type: 'radio'} + }, + } +}; + +export default meta; +type Story = StoryObj; + +export const Card: Story = { + render: (args) => { + return + } +}; diff --git a/src/components/mui/Checkbox.stories.tsx b/src/components/mui/Checkbox.stories.tsx new file mode 100644 index 0000000..4253d86 --- /dev/null +++ b/src/components/mui/Checkbox.stories.tsx @@ -0,0 +1,19 @@ +import * as React from 'react'; +import { FormGroup, Checkbox as MuiCheckbox, FormControlLabel } from "./storybookExports/FormFields.component"; + +import { useArgs } from '@storybook/preview-api'; +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + title: "DRT Components/MUI Components/Forms/Checkbox", + component: MuiCheckbox, +}; + +export default meta; +type Story = StoryObj; + +export const Checkbox: Story = { + render: (storyContext) => { + return } label="Checkbox 1" /> + } +}; diff --git a/src/components/mui/Datepicker.stories.tsx b/src/components/mui/Datepicker.stories.tsx new file mode 100644 index 0000000..a40d00e --- /dev/null +++ b/src/components/mui/Datepicker.stories.tsx @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { DatePicker as MuiDatepicker } from "./storybookExports/FormFields.component"; + +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + title: "DRT Components/MUI Components/Forms/DatePicker", + component: MuiDatepicker, + args: { + label: "Basic date picker", + }, +}; + +export default meta; +type Story = StoryObj; + +export const DatePicker: Story = { + render: (args) => { + return + } +}; diff --git a/src/components/mui/FormSpecimens.mdx b/src/components/mui/FormSpecimens.mdx new file mode 100644 index 0000000..0da0fdc --- /dev/null +++ b/src/components/mui/FormSpecimens.mdx @@ -0,0 +1,48 @@ + +{ /* MuiFormDocs.mdx */ } + +import { Meta, Canvas } from '@storybook/blocks'; +import * as TextFieldStories from './TextField.stories'; +import * as SelectStories from './Select.stories'; +import * as DatepickerStories from './Datepicker.stories'; +import * as TimepickerStories from './Timepicker.stories'; +import * as AutocompleteStories from './Autocomplete.stories'; +import * as CheckboxStories from './Checkbox.stories'; +import * as RadioGroupStories from './RadioGroup.stories'; +import * as ToggleButtonStories from './ToggleButton.stories'; + +import * as SliderStories from './Slider.stories'; + + + + +# Form Specimens + +### Autocomplete + + +### Checkbox + + +### Datepicker + + +### RadioGroup + + +### Select + + +### Slider + + +### TextField + + +### Timepicker + + +### Toggle Button + + + diff --git a/src/components/mui/RadioGroup.stories.tsx b/src/components/mui/RadioGroup.stories.tsx new file mode 100644 index 0000000..e88e3ed --- /dev/null +++ b/src/components/mui/RadioGroup.stories.tsx @@ -0,0 +1,51 @@ +import * as React from 'react'; +import { RadioGroup as MuiRadioGroup, Radio, FormControl,FormControlLabel, FormLabel } from "./storybookExports/FormFields.component"; + +import { useArgs } from '@storybook/preview-api'; +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + title: "DRT Components/MUI Components/Forms/Radio Group", + component: MuiRadioGroup, + args: { + value: "Radio option 1", + }, + argTypes: { + value: { + options: [ "Radio option 1", "Radio option 2", "Radio option 3"], + control: { + type: 'radio' + } + } + }, +}; + +export default meta; +type Story = StoryObj; + +export const RadioGroup: Story = { + render: (storyContext) => { + const [args, updateArgs] = useArgs(); + + const handleChange = (event: React.ChangeEvent, newValue: string | null) => { + updateArgs({ + ...args, + value: newValue + }); + }; + + return ( + + Radio Group + + { meta.argTypes?.value?.options?.map((option) => { + return } label={option} /> + })} + + + ) + } +}; diff --git a/src/components/mui/Select.stories.tsx b/src/components/mui/Select.stories.tsx new file mode 100644 index 0000000..73f54fa --- /dev/null +++ b/src/components/mui/Select.stories.tsx @@ -0,0 +1,57 @@ +import * as React from 'react'; +import { Select as MuiSelect, MenuItem, FormControl, InputLabel } from "./storybookExports/FormFields.component"; +import { SelectChangeEvent } from "@mui/material"; + +import { useArgs } from '@storybook/preview-api'; +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + title: "DRT Components/MUI Components/Forms/Select", + component: MuiSelect, + args: { + value: "Menu item 1" + }, + argTypes: { + value: { + options: [ "Menu item 1", "Menu item 2", "Menu item 3"], + control: { + type: 'select' + } + } + } +}; + +const options = [ + {value: 1, } +] + +export default meta; +type Story = StoryObj; + +export const Select: Story = { + render: (storyContext) => { + const [args, updateArgs] = useArgs(); + + const handleSelect = (event: SelectChangeEvent, child: React.ReactNode) => { + console.log('hello', event.target.value as string) + updateArgs({ + ...args, + value: event.target.value as string + }); + }; + + return ( + + Basic select + + Menu item 1 + Menu item 2 + Menu item 3 + + + ) + } +}; diff --git a/src/components/mui/Slider.stories.tsx b/src/components/mui/Slider.stories.tsx new file mode 100644 index 0000000..9d112be --- /dev/null +++ b/src/components/mui/Slider.stories.tsx @@ -0,0 +1,27 @@ +import * as React from 'react'; +import { Slider as MuiSlider } from "./storybookExports/FormFields.component"; +import drtTheme from '../../drt-theme'; + +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + title: "DRT Components/MUI Components/Forms/Slider", + component: MuiSlider, + args: { + min: 0, + max: 100, + sx: { + maxWidth: '200px', + maxHeight: '200px', + } + }, +}; + +export default meta; +type Story = StoryObj; + +export const Slider: Story = { + render: ({...args}) => { + return + } +}; diff --git a/src/components/mui/TextField.stories.tsx b/src/components/mui/TextField.stories.tsx new file mode 100644 index 0000000..ef990e4 --- /dev/null +++ b/src/components/mui/TextField.stories.tsx @@ -0,0 +1,18 @@ +import * as React from 'react'; +import { TextField as MuiTextField } from "./storybookExports/FormFields.component"; + +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + title: "DRT Components/MUI Components/Forms/TextField", + component: MuiTextField, +}; + +export default meta; +type Story = StoryObj; + +export const TextField: Story = { + args: { + label: 'Basic textfield', + } +}; diff --git a/src/components/mui/Theme.mdx b/src/components/mui/Theme.mdx new file mode 100644 index 0000000..7408746 --- /dev/null +++ b/src/components/mui/Theme.mdx @@ -0,0 +1,15 @@ + +import { Meta, Canvas, Source } from '@storybook/blocks'; +import drtTheme from '../../drt-theme' + + + +# MUI Theme Reference + +This is the theme object returned from mui's [useTheme()](https://mui.com/material-ui/customization/theming/#accessing-the-theme-in-a-component) component hook. + +**NOTE:** This only displays theme variables, and does not document any theme helper function, such as [theme.spacing()](https://mui.com/material-ui/customization/spacing/) or [breakpoint media queries](https://mui.com/material-ui/customization/spacing/). + + + + diff --git a/src/components/mui/ThemeSource.tsx b/src/components/mui/ThemeSource.tsx new file mode 100644 index 0000000..ca014de --- /dev/null +++ b/src/components/mui/ThemeSource.tsx @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { Source } from '@storybook/blocks'; +import { useTheme } from '@mui/material'; + + +export const ThemeSource = () => { + const theme = useTheme(); + return ( + + ) +} diff --git a/src/components/mui/Timepicker.stories.tsx b/src/components/mui/Timepicker.stories.tsx new file mode 100644 index 0000000..6a2fa07 --- /dev/null +++ b/src/components/mui/Timepicker.stories.tsx @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { TimePicker as MuiTimePicker } from "./storybookExports/FormFields.component"; + +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + title: "DRT Components/MUI Components/Forms/TimePicker", + component: MuiTimePicker, + args: { + label: "Basic time picker", + } +}; + +export default meta; +type Story = StoryObj; + +export const TimePicker: Story = { + render: (args) => { + return + } +}; diff --git a/src/components/mui/ToggleButton.stories.tsx b/src/components/mui/ToggleButton.stories.tsx new file mode 100644 index 0000000..bb262e1 --- /dev/null +++ b/src/components/mui/ToggleButton.stories.tsx @@ -0,0 +1,47 @@ +import * as React from 'react'; +import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment'; +import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider"; +import { DatePicker } from '@mui/x-date-pickers'; +import { TimePicker } from '@mui/x-date-pickers/TimePicker'; +import {InfoTooltip} from '../ui/InfoTooltip'; + + +import { useArgs } from '@storybook/preview-api'; +import type { Meta, StoryObj } from '@storybook/react'; +import { ToggleButton as MuiToggleButton, ToggleButtonGroup } from "./storybookExports/Buttons.component"; + +const meta: Meta = { + title: "DRT Components/MUI Components/Forms/ToggleButton", + component: ToggleButtonGroup, + args: { + value: "yesterday", + sx: { + maxWidth: '400px' + } + }, +}; + +export default meta; +type Story = StoryObj; + +export const ToggleButton: Story = { + + render: (storyContext) => { + const [args, updateArgs] = useArgs(); + + const handleChange = (event: React.MouseEvent, newValue: string | null) => { + updateArgs({ + ...args, + value: newValue + }); + }; + + return ( + + Yesterday + Today + Tomorrow + + ) + } +}; diff --git a/src/components/mui/TypeSpecimen.stories.tsx b/src/components/mui/TypeSpecimen.stories.tsx new file mode 100644 index 0000000..aac151e --- /dev/null +++ b/src/components/mui/TypeSpecimen.stories.tsx @@ -0,0 +1,81 @@ +import * as React from 'react'; +import { Typography as MuiTypography } from "./storybookExports/Typography.component"; + +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + tags: ['!dev'], + title: "DRT Components/MUI Components/Typography", + component: MuiTypography, + args: { + children: 'The quick brown fox jumps over the lazy dog' + }, + argTypes: { + variant: { + options: ['body1', 'body2', 'button', 'caption', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'inherit', 'overline', 'subtitle1', 'subtitle2'], + control: {type: 'select'} + }, + color: { + options: ['primary', 'secondary', 'error', 'info', 'success', 'warning'], + control: {type: 'radio'} + } + } +}; + +export default meta; +type Story = StoryObj; + +export const Title: Story = { + render: (args) => { + return <> + H1. The quick brown fox jumps over the lazy dog + H2. The quick brown fox jumps over the lazy dog + H3. The quick brown fox jumps over the lazy dog + H4. The quick brown fox jumps over the lazy dog + H5. The quick brown fox jumps over the lazy dog + H6. The quick brown fox jumps over the lazy dog + + } +}; + +export const Subtitle1: Story = { + render: (args) => { + return subtitle1: The quick brown dog jumps over the lazy fox + } +}; +export const Subtitle2: Story = { + render: (args) => { + return subtitle2: The quick brown dog jumps over the lazy fox + } +}; + +export const Body1: Story = { + render: (args) => { + return body1: Lorem ipsum dolor sit amet, adipiscing elit. Vestibulum suscipit feugiat ultricies. Morbi porta justo sit amet nunc luctus, at luctus sapien tempus. Aenean sollicitudin consectetur mauris sed fringilla. + } +}; + +export const Body2: Story = { + render: (args) => { + return body2: Fusce eu arcu in risus mattis congue vel sed mi. Aenean nibh leo, imperdiet ut accumsan sit amet, iaculis ac diam. Vestibulum finibus ornare nisl, id ullamcorper magna placerat vel. Aliquam id blanditligula. Curabitur suscipit eget nisi quis vestibulum. Donec bibendum lacus vitae lacus varius convallis. + } +}; + +export const Button: Story = { + render: (args) => { + return button: Click me! + } +}; + +export const Caption: Story = { + render: (args) => { + return caption: Lorem ipsum dolor sit amet + } +}; + +export const Overline: Story = { + render: (storyContext) => { + return overline: The quick brown dog jumps over the lazy fox. + } +}; + diff --git a/src/components/mui/Typography.mdx b/src/components/mui/Typography.mdx new file mode 100644 index 0000000..92b97fd --- /dev/null +++ b/src/components/mui/Typography.mdx @@ -0,0 +1,28 @@ + +import { Meta, Canvas, Source } from '@storybook/blocks'; +import drtTheme from '../../drt-theme' +import * as TypographyStories from './Typography.stories'; +import * as TypeSpecimen from './TypeSpecimen.stories'; + + + +# Type Specimens +## Title text +In the type scale, headlines span from a range of 1 through 6. Headlines are the largest text on the screen, reserved for short, important text or numerals. + +## Subtitle text +Subtitles are smaller than headlines. They are typically reserved for medium-emphasis text that is shorter in length. + + +## Body text +Body text comes in ranges 1-2, and it’s typically used for long-form writing as it works well for small text sizes. + + +## Caption & Overline text +Caption and overline text (text with a line above it) are the smallest font sizes. They are used sparingly to annotate imagery or to introduce a headline. + +## Button text +Button text is a call to action used by different types of buttons (such as text, outlined and contained buttons) and in tabs, dialogs, and cards. + + + diff --git a/src/components/mui/Typography.stories.tsx b/src/components/mui/Typography.stories.tsx new file mode 100644 index 0000000..8acc1f9 --- /dev/null +++ b/src/components/mui/Typography.stories.tsx @@ -0,0 +1,29 @@ +import * as React from 'react'; +import { Typography as MuiTypography } from "./storybookExports/Typography.component"; + +import type {Meta, StoryObj} from '@storybook/react'; + +const meta: Meta = { + title: "DRT Components/MUI Components/Typography/Component", + component: MuiTypography, + args: { + variant: 'body1', + color: 'textPrimary', + children: 'The quick brown fox jumps over the lazy dog', + }, + argTypes: { + children: { + name: 'text', + }, + } +}; + +export default meta; +type Story = StoryObj; + +export const Component : Story = { + render: ({children, ...rest}) => { + return {children} + } +} + diff --git a/src/components/mui/storybookExports/Buttons.component.tsx b/src/components/mui/storybookExports/Buttons.component.tsx new file mode 100644 index 0000000..a675a2c --- /dev/null +++ b/src/components/mui/storybookExports/Buttons.component.tsx @@ -0,0 +1,21 @@ +import React from 'react'; +import { + Button as MuiButton, + ButtonProps as MuiButtonProps, + IconButton as MuiIconButton, + IconButtonProps as MuiIconButtonProps, + ToggleButton as MuiToggleButton, + ToggleButtonProps as MuiToggleButtonProps, + ToggleButtonGroup as MuiToggleButtonGroup, + ToggleButtonGroupProps as MuiToggleButtonGroupProps +} from '@mui/material'; + +export interface ButtonProps extends MuiButtonProps {} +export interface IconButtonProps extends MuiIconButtonProps {} +export interface ToggleButtonProps extends MuiToggleButtonProps {} +export interface ToggleButtonGroupProps extends MuiToggleButtonGroupProps {} + +export const Button = ({children, ...rest}: ButtonProps) => { children }; +export const IconButton = ({children, ...rest}: IconButtonProps) => { children }; +export const ToggleButton = ({children, ...rest}: ToggleButtonProps) => { children }; +export const ToggleButtonGroup = ({children, ...rest}: ToggleButtonGroupProps) => { children }; diff --git a/src/components/mui/storybookExports/Card.component.tsx b/src/components/mui/storybookExports/Card.component.tsx new file mode 100644 index 0000000..8524e93 --- /dev/null +++ b/src/components/mui/storybookExports/Card.component.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import { + Card as MuiCard, + CardProps as MuiCardProps, + CardContent as MuiCardContent, + CardContentProps as MuiCardContentProps, +} from '@mui/material'; + +export interface CardProps extends MuiCardProps {} + +export interface CardContentProps extends MuiCardContentProps {} + +export const Card = ({children, ...rest}: CardProps) => { children }; +export const CardContent = ({children, ...rest}: CardContentProps) => { children }; diff --git a/src/components/mui/storybookExports/FormFields.component.tsx b/src/components/mui/storybookExports/FormFields.component.tsx new file mode 100644 index 0000000..b79804a --- /dev/null +++ b/src/components/mui/storybookExports/FormFields.component.tsx @@ -0,0 +1,68 @@ +import React from 'react'; +import { + FormGroup as MuiFormGroup, + FormGroupProps as MuiFormGroupProps, + FormControl as MuiFormControl, + FormControlProps as MuiFormControlProps, + FormControlLabel as MuiFormControlLabel, + FormControlLabelProps as MuiFormControlLabelProps, + InputLabel as MuiInputLabel, + InputLabelProps as MuiInputLabelProps, + FormLabel as MuiFormLabel, + FormLabelProps as MuiFormLabelProps, + TextField as MuiTextField, + TextFieldProps as MuiTextFieldProps, + Select as MuiSelect, + SelectProps as MuiSelectProps, + MenuItem as MuiMenuItem, + MenuItemProps as MuiMenuItemProps, + Autocomplete as MuiAutocomplete, + AutocompleteProps as MuiAutocompleteProps, + Checkbox as MuiCheckbox, + CheckboxProps as MuiCheckboxProps, + RadioGroup as MuiRadioGroup, + RadioGroupProps as MuiRadioGroupProps, + Radio as MuiRadio, + RadioProps as MuiRadioProps, + Slider as MuiSlider, + SliderProps as MuiSliderProps, +} from '@mui/material'; + +import { + DatePicker as MuiDatepicker, + DatePickerProps as MuiDatePickerProps, + TimePicker as MuiTimePicker, + TimePickerProps as MuiTimePickerProps, +} from '@mui/x-date-pickers'; + +export type FormGroupProps = {} & MuiFormGroupProps; +export type FormControlProps = {} & MuiFormControlProps; +export type FormControlLabelProps = {} & MuiFormControlLabelProps; +export type InputLabelProps = {} & MuiInputLabelProps; +export type FormLabelProps = {} & MuiFormLabelProps; +export type TextFieldProps = {} & MuiTextFieldProps; +export type SelectProps = {} & MuiSelectProps; +export type MenuItemProps = {} & MuiMenuItemProps; +export type DatePickerProps = {} & MuiDatePickerProps; +export type TimePickerProps = {} & MuiTimePickerProps; +export type AutocompleteProps = {} & MuiAutocompleteProps<{ label: string; value: string | number }, boolean | undefined, boolean | undefined, boolean | undefined>; +export type CheckboxProps = {} & MuiCheckboxProps; +export type RadioGroupProps = {} & MuiRadioGroupProps; +export type RadioProps = {} & MuiRadioProps; +export type SliderProps = {} & MuiSliderProps; + +export const FormGroup = ({ children, ...rest }: FormGroupProps) => { children }; +export const FormControl = ({ children, ...rest }: FormControlProps) => { children }; +export const FormControlLabel = ({ ...rest }: FormControlLabelProps) => ; +export const InputLabel = ({ children, ...rest }: InputLabelProps) => { children }; +export const FormLabel = ({ children, ...rest }: FormLabelProps) => { children }; +export const TextField = ({ ...rest }: TextFieldProps) => ; +export const Select = ({ ...rest }: SelectProps) => ; +export const MenuItem = ({ value, children }: MenuItemProps) => { children }; +export const DatePicker = ({ ...rest }: DatePickerProps) => ; +export const TimePicker = ({ ...rest }: TimePickerProps) => ; +export const Autocomplete = ({ ...rest }: AutocompleteProps) => ; +export const Checkbox = ({ ...rest }: CheckboxProps) => ; +export const RadioGroup = ({ children, ...rest }: RadioGroupProps) => { children }; +export const Radio = ({ ...rest }: RadioProps) => ; +export const Slider = ({ ...rest }: SliderProps) => ; diff --git a/src/components/mui/storybookExports/Typography.component.tsx b/src/components/mui/storybookExports/Typography.component.tsx new file mode 100644 index 0000000..8b897d7 --- /dev/null +++ b/src/components/mui/storybookExports/Typography.component.tsx @@ -0,0 +1,9 @@ +import React from 'react'; +import { + Typography as MuiTypography, + TypographyProps as MuiTypographyProps, +} from '@mui/material'; + +export interface TypographyProps extends MuiTypographyProps {} + +export const Typography = ({children, ...rest }: TypographyProps) => { children }; From 1cf98a1bc3d28a3cb82610c79a04f7b1cbc590bc Mon Sep 17 00:00:00 2001 From: jackson Date: Thu, 21 Nov 2024 13:50:44 +0000 Subject: [PATCH 2/2] not needed --- src/components/mui/ThemeSource.tsx | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 src/components/mui/ThemeSource.tsx diff --git a/src/components/mui/ThemeSource.tsx b/src/components/mui/ThemeSource.tsx deleted file mode 100644 index ca014de..0000000 --- a/src/components/mui/ThemeSource.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; -import { Source } from '@storybook/blocks'; -import { useTheme } from '@mui/material'; - - -export const ThemeSource = () => { - const theme = useTheme(); - return ( - - ) -}