diff --git a/.changeset/config.json b/.changeset/config.json index 50fc841a..14fd38ad 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -10,6 +10,7 @@ "ignore": [ "*-example", "*-benchmark", - "landing" + "landing", + "@devup-ui/components" ] } \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a51faf29..3ade4bad 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,7 +42,10 @@ jobs: pnpm lint pnpm test - name: Build Landing - run: pnpm -F landing build + run: | + pnpm -F landing build + pnpm -F components build-storybook + mv -r ./packages/components/storybook-static ./apps/landing/public/storybook if: github.event_name == 'push' && github.ref == 'refs/heads/main' - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/.gitignore b/.gitignore index 73883927..a8102526 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,6 @@ codecov.* codecov.*.* lcov.info tarpaulin-report.html -tarpaulin-report.json \ No newline at end of file +tarpaulin-report.json +*storybook.log +storybook-static diff --git a/apps/landing/.gitignore b/apps/landing/.gitignore index 7b149504..9a792a1f 100644 --- a/apps/landing/.gitignore +++ b/apps/landing/.gitignore @@ -12,6 +12,8 @@ public/search.json !.yarn/releases !.yarn/versions +public/storybook + # testing /coverage diff --git a/apps/landing/next.config.ts b/apps/landing/next.config.ts index b558310e..fa5bd714 100644 --- a/apps/landing/next.config.ts +++ b/apps/landing/next.config.ts @@ -9,6 +9,6 @@ export default withMDX( pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'], output: 'export', }, - {}, + { include: ['@devup-ui/components'] }, ), ) diff --git a/apps/landing/package.json b/apps/landing/package.json index 1456feaf..9e4a4579 100644 --- a/apps/landing/package.json +++ b/apps/landing/package.json @@ -13,6 +13,7 @@ "dependencies": { "body-scroll-lock": "3.1.5", "@devup-ui/react": "workspace:*", + "@devup-ui/components": "workspace:*", "@mdx-js/loader": "^3.1.0", "@mdx-js/react": "^3.1.0", "@next/mdx": "^15.3.4", @@ -34,4 +35,4 @@ "glob": "^11.0.3", "remark": "^15.0.1" } -} +} \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/bottom-sheet/page.mdx b/apps/landing/src/app/(detail)/components/bottom-sheet/page.mdx new file mode 100644 index 00000000..8e85ddc0 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/bottom-sheet/page.mdx @@ -0,0 +1 @@ +# Bottom Sheet \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/button/page.mdx b/apps/landing/src/app/(detail)/components/button/page.mdx new file mode 100644 index 00000000..bd8963c0 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/button/page.mdx @@ -0,0 +1,6 @@ +import { Button } from '@devup-ui/components' + +# Button + + + diff --git a/apps/landing/src/app/(detail)/components/checkbox/page.mdx b/apps/landing/src/app/(detail)/components/checkbox/page.mdx new file mode 100644 index 00000000..0cc86aa8 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/checkbox/page.mdx @@ -0,0 +1 @@ +# Checkbox diff --git a/apps/landing/src/app/(detail)/components/color-picker/page.mdx b/apps/landing/src/app/(detail)/components/color-picker/page.mdx new file mode 100644 index 00000000..5a0cb3c1 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/color-picker/page.mdx @@ -0,0 +1 @@ +# Color Picker \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/confirm/page.mdx b/apps/landing/src/app/(detail)/components/confirm/page.mdx new file mode 100644 index 00000000..9add1d26 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/confirm/page.mdx @@ -0,0 +1 @@ +# Confirm \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/date-picker/page.mdx b/apps/landing/src/app/(detail)/components/date-picker/page.mdx new file mode 100644 index 00000000..50b9df4a --- /dev/null +++ b/apps/landing/src/app/(detail)/components/date-picker/page.mdx @@ -0,0 +1 @@ +# Date Picker \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/dropdown/page.mdx b/apps/landing/src/app/(detail)/components/dropdown/page.mdx new file mode 100644 index 00000000..28cdcda1 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/dropdown/page.mdx @@ -0,0 +1 @@ +# Dropdown \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/footer/page.mdx b/apps/landing/src/app/(detail)/components/footer/page.mdx new file mode 100644 index 00000000..c9fb7bf6 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/footer/page.mdx @@ -0,0 +1 @@ +# Footer \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/header/page.mdx b/apps/landing/src/app/(detail)/components/header/page.mdx new file mode 100644 index 00000000..7b163ace --- /dev/null +++ b/apps/landing/src/app/(detail)/components/header/page.mdx @@ -0,0 +1 @@ +# Header \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/label/page.mdx b/apps/landing/src/app/(detail)/components/label/page.mdx new file mode 100644 index 00000000..2ed3f167 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/label/page.mdx @@ -0,0 +1 @@ +# Label diff --git a/apps/landing/src/app/(detail)/components/menu/page.mdx b/apps/landing/src/app/(detail)/components/menu/page.mdx new file mode 100644 index 00000000..22e7054b --- /dev/null +++ b/apps/landing/src/app/(detail)/components/menu/page.mdx @@ -0,0 +1 @@ +# Menu \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/overview/page.tsx b/apps/landing/src/app/(detail)/components/overview/page.tsx index dc03f213..b59d4c54 100644 --- a/apps/landing/src/app/(detail)/components/overview/page.tsx +++ b/apps/landing/src/app/(detail)/components/overview/page.tsx @@ -1,4 +1,5 @@ import { Center, css, Flex, Grid, Text, VStack } from '@devup-ui/react' +import Link from 'next/link' import * as Icons from '@/components/icons/components' @@ -34,278 +35,363 @@ export default function Page() { 'repeat(5, 1fr)', ]} > - -
- -
- - - Button - - -
- -
- -
- - - Text Box - - -
- -
- -
- - - Text area - - -
- -
- -
- - - Dropdown - - -
- -
- -
- - - Radio - - -
- -
- -
- - - Checkbox - - -
- -
- -
- - - Stepper - - -
- -
- -
- - - Toggle - - -
- -
- -
- - - Slider - - -
- -
- -
- - - Date picker - - -
- -
- -
- - - Color picker - - -
- -
- -
- - - Uploader - - -
- -
- -
- - - Pagination - - -
- -
- -
- - - Progress bar - - -
- -
- -
- - - Search - - -
- -
- -
- - - Select - - -
- -
- -
- - - Label - - -
+ + +
+ +
+ + + Button + + +
+ + + +
+ +
+ + + Text box + + +
+ + + +
+ +
+ + + Text area + + +
+ + + +
+ +
+ + + Dropdown + + +
+ + + +
+ +
+ + + Radio + + +
+ + + +
+ +
+ + + Checkbox + + +
+ + + +
+ +
+ + + Stepper + + +
+ + + +
+ +
+ + + Toggle + + +
+ + + +
+ +
+ + + Slider + + +
+ + + +
+ +
+ + + Date picker + + +
+ + + +
+ +
+ + + Color picker + + +
+ + + +
+ +
+ + + Uploader + + +
+ + + +
+ +
+ + + Pagination + + +
+ + + +
+ +
+ + + Progress bar + + +
+ + + +
+ +
+ + + Search + + +
+ + + +
+ +
+ + + Select + + +
+ + + +
+ +
+ + + Label + + +
+ @@ -323,134 +409,174 @@ export default function Page() { ]} overflow="visible" > - -
- -
- - - Footer - - -
- -
- -
- - - Tooltip - - -
- -
- -
- - - Tab - - -
- -
- -
- - - Menu - - -
- -
- -
- - - Header - - -
- -
- -
- - - Confirm - - -
- -
- -
- - - Snackbar - - -
- -
- -
- - - Bottom sheet - - -
+ + +
+ +
+ + + Footer + + +
+ + + +
+ +
+ + + Tooltip + + +
+ + + +
+ +
+ + + Tab + + +
+ + + +
+ +
+ + + Menu + + +
+ + + +
+ +
+ + + Header + + +
+ + + +
+ +
+ + + Confirm + + +
+ + + +
+ +
+ + + Snackbar + + +
+ + + +
+ +
+ + + Bottom sheet + + +
+
@@ -468,22 +594,27 @@ export default function Page() { ]} overflow="visible" > - -
- -
- - - Theme Button - - -
+ + +
+ +
+ + + Theme Button + + +
+
diff --git a/apps/landing/src/app/(detail)/components/pagination/page.mdx b/apps/landing/src/app/(detail)/components/pagination/page.mdx new file mode 100644 index 00000000..4122fb7d --- /dev/null +++ b/apps/landing/src/app/(detail)/components/pagination/page.mdx @@ -0,0 +1 @@ +# Pagination \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/progress-bar/page.mdx b/apps/landing/src/app/(detail)/components/progress-bar/page.mdx new file mode 100644 index 00000000..2d2f5244 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/progress-bar/page.mdx @@ -0,0 +1 @@ +# Progress Bar \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/radio/page.mdx b/apps/landing/src/app/(detail)/components/radio/page.mdx new file mode 100644 index 00000000..4f02c541 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/radio/page.mdx @@ -0,0 +1 @@ +# Radio \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/search/page.mdx b/apps/landing/src/app/(detail)/components/search/page.mdx new file mode 100644 index 00000000..da070d7f --- /dev/null +++ b/apps/landing/src/app/(detail)/components/search/page.mdx @@ -0,0 +1 @@ +# Search diff --git a/apps/landing/src/app/(detail)/components/select/page.mdx b/apps/landing/src/app/(detail)/components/select/page.mdx new file mode 100644 index 00000000..c8a42305 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/select/page.mdx @@ -0,0 +1 @@ +# Select \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/slider/page.mdx b/apps/landing/src/app/(detail)/components/slider/page.mdx new file mode 100644 index 00000000..b6e8eab4 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/slider/page.mdx @@ -0,0 +1 @@ +# Slider \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/snackbar/page.mdx b/apps/landing/src/app/(detail)/components/snackbar/page.mdx new file mode 100644 index 00000000..a4e74fb1 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/snackbar/page.mdx @@ -0,0 +1 @@ +# Snackbar \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/stepper/page.mdx b/apps/landing/src/app/(detail)/components/stepper/page.mdx new file mode 100644 index 00000000..dd8d1281 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/stepper/page.mdx @@ -0,0 +1 @@ +# Stepper \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/tab/page.mdx b/apps/landing/src/app/(detail)/components/tab/page.mdx new file mode 100644 index 00000000..826dec4f --- /dev/null +++ b/apps/landing/src/app/(detail)/components/tab/page.mdx @@ -0,0 +1 @@ +# Tab \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/text-area/page.mdx b/apps/landing/src/app/(detail)/components/text-area/page.mdx new file mode 100644 index 00000000..b1421398 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/text-area/page.mdx @@ -0,0 +1 @@ +# Text Area \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/text-box/page.mdx b/apps/landing/src/app/(detail)/components/text-box/page.mdx new file mode 100644 index 00000000..6291142c --- /dev/null +++ b/apps/landing/src/app/(detail)/components/text-box/page.mdx @@ -0,0 +1 @@ +# Text Box \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/theme-button/page.mdx b/apps/landing/src/app/(detail)/components/theme-button/page.mdx new file mode 100644 index 00000000..a1228e75 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/theme-button/page.mdx @@ -0,0 +1 @@ +# Theme Button \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/toggle/page.mdx b/apps/landing/src/app/(detail)/components/toggle/page.mdx new file mode 100644 index 00000000..c27b5496 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/toggle/page.mdx @@ -0,0 +1 @@ +# Toggle \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/tooltip/page.mdx b/apps/landing/src/app/(detail)/components/tooltip/page.mdx new file mode 100644 index 00000000..e7f4f198 --- /dev/null +++ b/apps/landing/src/app/(detail)/components/tooltip/page.mdx @@ -0,0 +1 @@ +# Tooltip \ No newline at end of file diff --git a/apps/landing/src/app/(detail)/components/uploader/page.mdx b/apps/landing/src/app/(detail)/components/uploader/page.mdx new file mode 100644 index 00000000..c8fc04eb --- /dev/null +++ b/apps/landing/src/app/(detail)/components/uploader/page.mdx @@ -0,0 +1 @@ +# Uploader \ No newline at end of file diff --git a/apps/landing/src/components/icons/components/IconButtonComponent.tsx b/apps/landing/src/components/icons/components/IconButtonComponent.tsx index 9419579c..7d0a2b62 100644 --- a/apps/landing/src/components/icons/components/IconButtonComponent.tsx +++ b/apps/landing/src/components/icons/components/IconButtonComponent.tsx @@ -52,8 +52,8 @@ export default function IconButtonComponent({ strokeMiterlimit="10" /> \n \n {icon && (\n svg': {\n color: 'inherit',\n },\n }}\n top=\"50%\"\n transform=\"translate(-100%, -50%)\"\n >\n {icon}\n \n )}\n \n {children}\n \n \n \n \"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +--- +ToBTreeSet { + styles: { + Static( + ExtractStaticStyle { + property: "background", + value: "color-mix(in srgb,var(--primary,#674DC7) 10%,var(--inputBackground,#2E2E2E) 90%)", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:hover", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "background", + value: "color-mix(in srgb,var(--primary,#674DC7) 100%,#000 15%)", + level: 0, + selector: Some( + Selector( + "&:hover", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "background", + value: "color-mix(in srgb,var(--primary,#674DC7) 100%,#000 30%)", + level: 0, + selector: Some( + Selector( + "&:active", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "background", + value: "color-mix(in srgb,var(--primary,#8163E1) 10%,#FFF 90%)", + level: 0, + selector: Some( + Selector( + "&:hover", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "background", + value: "color-mix(in srgb,var(--primary,#8163E1) 100%,#FFF 15%)", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:hover", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "background", + value: "color-mix(in srgb,var(--primary,#8163E1) 100%,#FFF 30%)", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:active", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "background", + value: "color-mix(in srgb,var(--primary,#8163E1) 20%,#FFF 80%)", + level: 0, + selector: Some( + Selector( + "&:active", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "background", + value: "var(--inputBackground,#FFF)", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "background", + value: "var(--primary,#8163E1)", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "background", + value: "var(--primary,#8163E1)", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:active", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "backgroundColor", + value: "#47474A", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:disabled", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "backgroundColor", + value: "#F0F0F3", + level: 0, + selector: Some( + Selector( + "&:disabled", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "border", + value: "1px solid var(--border,#E4E4E4)", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "border", + value: "1px solid var(--primary,#8163E1)", + level: 0, + selector: Some( + Selector( + "&:active", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "border", + value: "none", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "borderColor", + value: "transparent", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:disabled", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "borderColor", + value: "var(--border,#E4E4E4)", + level: 0, + selector: Some( + Selector( + "&:disabled", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "borderColor", + value: "var(--primary,#8163E1)", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:hover", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "borderRadius", + value: "10px", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "borderRadius", + value: "8px", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "boxSizing", + value: "border-box", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "color", + value: "#000", + level: 0, + selector: Some( + Selector( + "&:active", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "color", + value: "#373737", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:disabled", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "color", + value: "#D6D7DE", + level: 0, + selector: Some( + Selector( + "&:disabled", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "color", + value: "#FFF", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "color", + value: "var(--text,#272727)", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "color", + value: "var(--text,#F6F6F6)", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:active", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "cursor", + value: "not-allowed", + level: 0, + selector: Some( + Selector( + "&:disabled", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "cursor", + value: "pointer", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "fontSize", + value: "14px", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "fontSize", + value: "15px", + level: 4, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "fontWeight", + value: "700", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "letterSpacing", + value: "-0.02em", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "letterSpacing", + value: "-0.03em", + level: 4, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "outline", + value: "2px solid", + level: 0, + selector: Some( + Selector( + "&:focus-visible", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "outlineColor", + value: "var(--primary,#674DC7)", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:hover", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "outlineColor", + value: "var(--primaryFocus,#927CE4)", + level: 0, + selector: Some( + Selector( + ":root[data-theme=dark] &:focus-visible", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "outlineColor", + value: "var(--primaryFocus,#9385D3)", + level: 0, + selector: Some( + Selector( + "&:focus-visible", + ), + ), + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "outlineOffset", + value: "2px", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "position", + value: "relative", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "px", + value: "40px", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "py", + value: "12px", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + Static( + ExtractStaticStyle { + property: "transition", + value: ".25s", + level: 0, + selector: None, + style_order: Some( + 1, + ), + }, + ), + }, + code: "import \"@devup-ui/core/devup-ui.css\";\n
\n \n {icon &&
svg\": { color: \"inherit\" } }} top=\"50%\" transform=\"translate(-100%, -50%)\">\n {icon}\n
}\n \n {children}\n \n
\n
;\n", +} diff --git a/libs/extractor/src/snapshots/extractor__tests__support_transpile_cjs_2.snap.new b/libs/extractor/src/snapshots/extractor__tests__support_transpile_cjs_2.snap.new new file mode 100644 index 00000000..f18461f6 --- /dev/null +++ b/libs/extractor/src/snapshots/extractor__tests__support_transpile_cjs_2.snap.new @@ -0,0 +1,9 @@ +--- +source: libs/extractor/src/lib.rs +assertion_line: 2140 +expression: "ToBTreeSet::from(extract(\"test.cjs\",\nr#\"'use client'\n\nimport type { Conditional } from 'src/types/utils'\n\nimport { DevupTheme } from '../types/theme'\n\n/**\n * Initialize the theme, if you can't use the `ThemeScript` component\n * e.g. in vite\n * @param auto - Whether to use the system theme\n * @param theme - The theme to use\n */\nexport function initTheme(\n auto?: boolean,\n theme?: Conditional,\n): void {\n if (theme) {\n document.documentElement.setAttribute('data-theme', theme)\n } else {\n console.log(\n 'hello',\n typeof process.env.DEVUP_UI_DEFAULT_THEME,\n process.env.DEVUP_UI_DEFAULT_THEME,\n localStorage.getItem('__DF_THEME_SELECTED__') ||\n (auto && window.matchMedia('(prefers-color-scheme:dark)').matches\n ? 'dark'\n : (process.env.DEVUP_UI_DEFAULT_THEME ?? 'default')),\n )\n document.documentElement.setAttribute(\n 'data-theme',\n localStorage.getItem('__DF_THEME_SELECTED__') ||\n (auto && window.matchMedia('(prefers-color-scheme:dark)').matches\n ? 'dark'\n : (process.env.DEVUP_UI_DEFAULT_THEME ?? 'default')),\n )\n }\n}\n\"#,\nExtractOption\n{ package: \"@devup-ui/react\".to_string(), css_file: None }).unwrap())" +--- +ToBTreeSet { + styles: {}, + code: "'use client'\n\nimport type { Conditional } from 'src/types/utils'\n\nimport { DevupTheme } from '../types/theme'\n\n/**\n * Initialize the theme, if you can't use the `ThemeScript` component\n * e.g. in vite\n * @param auto - Whether to use the system theme\n * @param theme - The theme to use\n */\nexport function initTheme(\n auto?: boolean,\n theme?: Conditional,\n): void {\n if (theme) {\n document.documentElement.setAttribute('data-theme', theme)\n } else {\n console.log(\n 'hello',\n typeof process.env.DEVUP_UI_DEFAULT_THEME,\n process.env.DEVUP_UI_DEFAULT_THEME,\n localStorage.getItem('__DF_THEME_SELECTED__') ||\n (auto && window.matchMedia('(prefers-color-scheme:dark)').matches\n ? 'dark'\n : (process.env.DEVUP_UI_DEFAULT_THEME ?? 'default')),\n )\n document.documentElement.setAttribute(\n 'data-theme',\n localStorage.getItem('__DF_THEME_SELECTED__') ||\n (auto && window.matchMedia('(prefers-color-scheme:dark)').matches\n ? 'dark'\n : (process.env.DEVUP_UI_DEFAULT_THEME ?? 'default')),\n )\n }\n}\n", +} diff --git a/packages/components/.storybook/main.ts b/packages/components/.storybook/main.ts new file mode 100644 index 00000000..95c7b0c0 --- /dev/null +++ b/packages/components/.storybook/main.ts @@ -0,0 +1,19 @@ +import { DevupUI } from '@devup-ui/vite-plugin' +import type { StorybookConfig } from '@storybook/react-vite' +import { mergeConfig } from 'vite' + +const config: StorybookConfig = { + stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], + addons: ['@storybook/addon-docs', '@storybook/addon-onboarding'], + framework: { + name: '@storybook/react-vite', + options: {}, + }, + + viteFinal(config) { + return mergeConfig(config, { + plugins: [DevupUI()], + }) + }, +} +export default config diff --git a/packages/components/.storybook/preview.tsx b/packages/components/.storybook/preview.tsx new file mode 100644 index 00000000..42bf4e18 --- /dev/null +++ b/packages/components/.storybook/preview.tsx @@ -0,0 +1,62 @@ +import { setTheme } from '@devup-ui/react' +import { Decorator } from '@storybook/react-vite' +import { useEffect } from 'react' +const preview: import('@storybook/react-vite').Preview = { + parameters: { + layout: 'fullscreen', + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/i, + }, + }, + }, +} + +export default preview + +export const globalTypes = { + theme: { + name: 'Theme', + description: 'Global theme for components', + defaultValue: 'light', + toolbar: { + // The icon for the toolbar item + icon: 'circlehollow', + // Array of options + items: [ + { value: 'default', icon: 'circlehollow', title: 'light' }, + { value: 'dark', icon: 'circle', title: 'dark' }, + ], + // Property that specifies if the name of the item will be displayed + showName: true, + }, + }, +} + +export const withHead: Decorator = (StoryFn) => { + return ( + <> + + + ) +} +export const withTheme: Decorator = (StoryFn, context) => { + // Get values from story parameter first, else fallback to globals + const theme = context.parameters.theme || context.globals.theme + // eslint-disable-next-line react-hooks/rules-of-hooks + useEffect(() => { + setTheme(theme) + }, [theme]) + return ( + <> + + + + ) +} +export const decorators = [withHead, withTheme] diff --git a/packages/components/README.md b/packages/components/README.md new file mode 100644 index 00000000..27b74d93 --- /dev/null +++ b/packages/components/README.md @@ -0,0 +1,149 @@ +
+ Devup UI logo +
+ + +

+ Zero Config, Zero FOUC, Zero Runtime, CSS in JS Preprocessor +

+ +--- + +
+ + +Github Checks +Apache-2.0 License + +NPM Downloads + + +Github Stars + + +Discord + + + + +
+ +--- + +English | [한국어](README_ko.md) + +## Install + +```sh +npm install @devup-ui/react + +# on next.js +npm install @devup-ui/next-plugin + +# on vite +npm install @devup-ui/vite-plugin +``` + +## Features + +- Preprocessor +- Zero Config +- Zero FOUC +- Zero Runtime +- RSC Support +- Must not use JavaScript, client-side logic, or hybrid solutions +- Support Library mode +- Zero Cost Dynamic Theme Support based on CSS Variables +- Theme with Typing +- Smallest size, fastest speed + +## Inspirations + +- Styled System +- Chakra UI +- Theme UI +- Vanilla Extract +- Rainbow Sprinkles +- Kuma UI + +## Comparison Benchmarks + +Next.js Build Time and Build Size (AMD Ryzen 9 9950X, 128GB RAM, Windows 11) + +| Library | Build Time | Build Size | +|-----------|------------|--------------| +| kuma-ui | 20.933s | 57,295,073b | +| chakra-ui | 36.961s | 129,527,610b | +| devup-ui | 15.162s | 48,047,678b | + +## How it works + +Devup UI is a CSS in JS preprocessor that does not require runtime. +Devup UI eliminates the performance degradation of the browser through the CSS in JS preprocessor. +We develop a preprocessor that considers all grammatical cases. + +```jsx +// Before + +// After + +``` + +Variables are fully supported. + +```jsx +// Before + +// After + +``` + +Various expressions and responsiveness are also fully supported. + +```jsx +// Before + b ? "yellow" : variable]}/> +// After + b ? "d2" : "d3"}`} style={{ + "--d2": variable +}}/> +``` + +Support Theme with Typing + +`devup.json` + +```json +{ + "theme": { + "colors": { + "default": { + "text": "#000" + }, + "dark": { + "text": "white" + } + } + } +} +``` + +```jsx +// Type Safe + +``` + +Support Responsive And Pseudo Selector + +You can use responsive and pseudo selector. + +```jsx +// Responsive with Selector + + +// Another way + + +``` diff --git a/packages/components/devup.json b/packages/components/devup.json new file mode 100644 index 00000000..7d9385b9 --- /dev/null +++ b/packages/components/devup.json @@ -0,0 +1,569 @@ +{ + "theme": { + "colors": { + "light": { + "primary": "#674DC7", + "primaryHover": "#4D38AE", + "primaryActive": "#312395", + "primaryBg": "#F4F3FA", + "secondary": "#E3E0F2", + "link": "#7C8EE1", + "text": "#272727", + "background": "#F5F5F5", + "containerBackground": "#FFFFFF", + "border": "#E4E4E4", + "success": "#2CA353", + "warning": "#FF9800", + "error": "#D52B2E", + "info": "#2196F3", + "white": "#FFFFFF", + "black": "#000000", + "title": "#1A1A1A", + "caption": "#787878", + "black50": "#00000080", + "placeHolder": "#9D9D9D", + "base50": "#FFFFFF80", + "footerBackground": "#2F313B", + "footerAward": "#EAEAED", + "footerBody": "#FFFFFF", + "footerTitle": "#F2F2F2", + "footerCaption": "#CACACA", + "white10": "#FFFFFF1A", + "base": "#FFFFFF", + "negativeBase": "#000000", + "inputPlaceholder": "#A9A8AB", + "inputBg": "#FFFFFF", + "inputIcon": "#C3C2C8", + "inputDisabledBg": "#F0F0F3", + "inputDisabledText": "#D6D7DE", + "inputCaption": "#9B9BA6", + "negative20": "#00000033", + "negative10": "#0000001A", + "toggleBg": "#E4E4E4", + "primary50": "#614FC480", + "primary20": "#614FC433", + "tableSearch": "#FFED8A", + "black5": "#0000000D", + "filterBg": "#EFEEF2", + "footerLink": "#B7B5C0", + "familysiteBg": "#828389", + "familysiteTxt": "#272727", + "familyHover": "#A0A1A5", + "footerNavTitle": "#98989D", + "snackBg": "#29292CCC", + "snackLink": "#B2B0EF", + "containerHover": "#EEEEEE", + "kakoBg": "#FFE232", + "kakaoHover": "#F0C81A", + "textFixed": "#272727", + "primaryFocus": "#9385D3", + "containerPush": "#DADAE1", + "selectDisabled": "#C4C5D1", + "selectBoxBg": "#00000012", + "iconBold": "#8D8C9A", + "borderBold": "#BCBCBC", + "gnbBg": "#FFFFFFCC" + }, + "dark": { + "primary": "#8163E1", + "primaryHover": "#A290E7", + "primaryActive": "#BEB3ED", + "primaryBg": "#F4F3FA0D", + "secondary": "#272331", + "link": "#006BFF", + "text": "#F6F6F6", + "background": "#000000", + "containerBackground": "#1E1E1E", + "border": "#434343", + "success": "#4CAF50", + "warning": "#FF9800", + "error": "#FF5B5E", + "info": "#2196F3", + "white": "#FFFFFF", + "black": "#000000", + "title": "#FAFAFA", + "caption": "#787878", + "black50": "#00000080", + "placeHolder": "#9D9D9D", + "base50": "#00000080", + "footerBackground": "#D8D8D8", + "footerAward": "#3D3D3D", + "footerBody": "#404040", + "footerTitle": "#1F1F1F", + "footerCaption": "#7D7D7D", + "white10": "#0000001A", + "base": "#000000", + "negativeBase": "#FFFFFF", + "inputPlaceholder": "#CBCBCB", + "inputBg": "#2E2E2E", + "inputIcon": "#696A6F", + "inputDisabledBg": "#414244", + "inputDisabledText": "#373737", + "inputCaption": "#C3C2C8", + "negative20": "#FFFFFF66", + "negative10": "#FFFFFF1A", + "toggleBg": "#383838", + "primary50": "#7D6DD880", + "primary20": "#7D6DD833", + "tableSearch": "#B55100", + "black5": "#0000000D", + "filterBg": "#4B494F", + "footerLink": "#5E6063", + "familysiteBg": "#B0B0B0", + "familysiteTxt": "#272727", + "familyHover": "#94969E", + "footerNavTitle": "#747276", + "snackBg": "#29292CCC", + "snackLink": "#7C8EE1", + "containerHover": "#3A3A3A", + "kakoBg": "#FFE232", + "kakaoHover": "#FFE232", + "textFixed": "#272727", + "primaryFocus": "#927CE4", + "containerPush": "#606066", + "selectDisabled": "#45464D", + "selectBoxBg": "#FFFFFF12", + "iconBold": "#666577", + "borderBold": "#535353", + "gnbBg": "#000000CC" + } + }, + "typography": { + "buttonM": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "16px", + "lineHeight": 1.2, + "letterSpacing": "0px" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "18px", + "lineHeight": 1.2, + "letterSpacing": "-0.01em" + } + ], + "inputBold": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "14px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "15px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + } + ], + "buttonS": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "15px", + "lineHeight": 1.2, + "letterSpacing": "0px" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "16px", + "lineHeight": 1.2, + "letterSpacing": "-0.01em" + } + ], + "buttonxs": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "14px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "15px", + "lineHeight": 1.2, + "letterSpacing": "-0.03em" + } + ], + "inputPlaceholder": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 400, + "fontSize": "13px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 400, + "fontSize": "14px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + } + ], + "inputText": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 400, + "fontSize": "14px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 400, + "fontSize": "15px", + "lineHeight": 1.2, + "letterSpacing": "-0.03em" + } + ], + "inlineLabelL": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 500, + "fontSize": "16px", + "lineHeight": 1.3, + "letterSpacing": "-0.03em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 500, + "fontSize": "18px", + "lineHeight": 1.3, + "letterSpacing": "-0.03em" + } + ], + "inlineLabelS": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 500, + "fontSize": "12px", + "lineHeight": 1.3, + "letterSpacing": "-0.03em" + }, + "body": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 400, + "fontSize": "15px", + "lineHeight": "24px", + "letterSpacing": "-0.01em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 400, + "fontSize": "16px", + "lineHeight": "24px", + "letterSpacing": "-0.01em" + } + ], + "inputPhBold": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "13px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "14px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + } + ], + "uploadButton": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "14px", + "lineHeight": "24px", + "letterSpacing": "-0.01em" + }, + "pagination": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "14px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + "paginationSelected": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 900, + "fontSize": "15px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + "langMenu": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 500, + "fontSize": "15px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + "langButton": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "14px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "16px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + } + ], + "tableTitle": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "15px", + "lineHeight": 1.2, + "letterSpacing": "-0.01em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "16px", + "lineHeight": 1.2, + "letterSpacing": "-0.01em" + } + ], + "footerL": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 500, + "fontSize": "14px", + "lineHeight": 1.3, + "letterSpacing": "-0.02em" + }, + "footerM": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 300, + "fontSize": "13px", + "lineHeight": "18px", + "letterSpacing": "-0.01em" + }, + "footerMsemibold": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "13px", + "lineHeight": "18px", + "letterSpacing": "-0.01em" + }, + "footerS": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 300, + "fontSize": "12px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + "footerxl": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "15px", + "lineHeight": 1.3, + "letterSpacing": "-0.02em" + }, + "footerSsemibold": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "12px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + "footerxs": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 300, + "fontSize": "10px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + "footerXSsemibold": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "10px", + "lineHeight": "18px", + "letterSpacing": "-0.02em" + }, + "footerNav": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 500, + "fontSize": "15px", + "lineHeight": 1.3, + "letterSpacing": "-0.02em" + }, + "footerList": { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 500, + "fontSize": "14px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + "subMenu": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "15px", + "lineHeight": "24px", + "letterSpacing": "-0.01em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "16px", + "lineHeight": "24px", + "letterSpacing": "-0.01em" + } + ], + "tableText": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 400, + "fontSize": "14px", + "lineHeight": "24px", + "letterSpacing": "-0.01em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 400, + "fontSize": "15px", + "lineHeight": 1.4, + "letterSpacing": "-0.01em" + } + ], + "tableTextBold": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "14px", + "lineHeight": "24px", + "letterSpacing": "-0.01em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 600, + "fontSize": "15px", + "lineHeight": 1.2, + "letterSpacing": "-0.01em" + } + ], + "resetButton": [ + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "14px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + }, + null, + null, + null, + { + "fontFamily": "Pretendard", + "fontStyle": "normal", + "fontWeight": 700, + "fontSize": "15px", + "lineHeight": 1.2, + "letterSpacing": "-0.02em" + } + ] + } + } +} \ No newline at end of file diff --git a/packages/components/package.json b/packages/components/package.json new file mode 100644 index 00000000..6b9c68f1 --- /dev/null +++ b/packages/components/package.json @@ -0,0 +1,68 @@ +{ + "name": "@devup-ui/components", + "description": "Zero Config, Zero FOUC, Zero Runtime, CSS in JS Preprocessor", + "repository": "https://github.com/dev-five-git/devup-ui", + "author": "devfive", + "license": "Apache-2.0", + "homepage": "https://devup-ui.com", + "bugs": { + "url": "https://github.com/dev-five-git/devup-ui/issues", + "email": "contact@devfive.kr" + }, + "keywords": [ + "css", + "css-in-js", + "css-in-js-preprocessor", + "css-in-js-framework", + "react" + ], + "version": "0.1.0", + "type": "module", + "scripts": { + "lint": "eslint", + "build": "tsc && vite build", + "storybook": "storybook dev -p 6006", + "build-storybook": "storybook build" + }, + "publishConfig": { + "access": "public" + }, + "sideEffects": false, + "main": "./dist/index.cjs", + "module": "./dist/index.js", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.cjs" + } + }, + "files": [ + "dist" + ], + "types": "./dist/index.d.ts", + "dependencies": { + "@devup-ui/react": "workspace:*", + "csstype": "^3.1.3", + "react": "^19.1.0", + "clsx": "^2.1" + }, + "devDependencies": { + "@devup-ui/vite-plugin": "workspace:*", + "@storybook/addon-docs": "9.0.15", + "@storybook/addon-onboarding": "^9.0.15", + "@storybook/react-vite": "^9.0.15", + "@types/react": "^19.1.8", + "eslint-plugin-storybook": "9.0.15", + "rollup-plugin-preserve-directives": "^0.4.0", + "storybook": "^9.0.15", + "typescript": "^5.8.3", + "vite": "^6.3.5", + "vite-plugin-dts": "^4.5.4", + "vitest": "^3.2.4" + }, + "peerDependencies": { + "@devup-ui/react": "workspace:*", + "csstype": "*", + "react": "*" + } +} \ No newline at end of file diff --git a/packages/components/setupTests.ts b/packages/components/setupTests.ts new file mode 100644 index 00000000..a9d0dd31 --- /dev/null +++ b/packages/components/setupTests.ts @@ -0,0 +1 @@ +import '@testing-library/jest-dom/vitest' diff --git a/packages/components/src/__tests__/index.browser.test.ts b/packages/components/src/__tests__/index.browser.test.ts new file mode 100644 index 00000000..7c1a48da --- /dev/null +++ b/packages/components/src/__tests__/index.browser.test.ts @@ -0,0 +1,8 @@ +describe('export', () => { + it('should export components', async () => { + const index = await import('../index') + expect({ ...index }).toEqual({ + Button: expect.any(Function), + }) + }) +}) diff --git a/packages/components/src/components/Button/Button.stories.tsx b/packages/components/src/components/Button/Button.stories.tsx new file mode 100644 index 00000000..c4afa0f2 --- /dev/null +++ b/packages/components/src/components/Button/Button.stories.tsx @@ -0,0 +1,111 @@ +import { css } from '@devup-ui/react' +import { Meta, StoryObj } from '@storybook/react-vite' +import { useState } from 'react' + +import { Button } from './index' + +type Story = StoryObj + +// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export +const meta: Meta = { + title: 'Devfive/Button', + component: Button, + decorators: [ + (Story) => ( +
+ +
+ ), + ], +} + +export const Default: Story = { + args: { + children: 'Button Text', + disabled: false, + }, +} + +export const WithIcon: Story = { + args: { + children: 'Button text', + disabled: true, + icon: ( + + + + ), + }, +} + +export const WithForm: Story = { + args: { + children: 'Button text', + type: 'submit', + }, + decorators: [ + (Story, { args }: { args: Story['args'] }) => { + const [submitted, setSubmitted] = useState<{ text?: string }>({}) + const [value, setValue] = useState('') + const [error, setError] = useState('') + + return ( + <> +
{submitted.text}
+
{ + e.preventDefault() + const formData = new FormData(e.target as HTMLFormElement) + const data = Object.fromEntries(formData) + + setSubmitted({ + text: data.text as string, + }) + }} + > + { + setValue(e.target.value) + setError( + !/[0-9]/.test(e.target.value) && e.target.value.length >= 3 + ? 'Include one or more numbers.' + : '', + ) + }} + placeholder="Include one or more numbers." + required + type="text" + /> + + + + ) + }, + ], +} + +export default meta diff --git a/packages/components/src/components/Button/__tests__/__snapshots__/index.browser.test.tsx.snap b/packages/components/src/components/Button/__tests__/__snapshots__/index.browser.test.tsx.snap new file mode 100644 index 00000000..fdc1a277 --- /dev/null +++ b/packages/components/src/components/Button/__tests__/__snapshots__/index.browser.test.tsx.snap @@ -0,0 +1,346 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Button > color should be white 1`] = ` +
+ +
+`; + +exports[`Button > should disable 1`] = ` +
+ +
+`; + +exports[`Button > should have class name when className is provided 1`] = ` +
+ +
+`; + +exports[`Button > should have font size 14px when size is sm and variant is default 1`] = ` +
+ +
+`; + +exports[`Button > should have font size 15px when size is md and variant is primary 1`] = ` +
+ +
+`; + +exports[`Button > should have font size 15px when size is sm and variant is primary 1`] = ` +
+ +
+`; + +exports[`Button > should have text overflow ellipsis when ellipsis is true 1`] = ` +
+ +
+`; + +exports[`Button > should have typography when typography is provided 1`] = ` +
+ +
+`; + +exports[`Button > should not have bg when a wrong size variable is provided 1`] = ` +
+ +
+`; + +exports[`Button > should not have px when a wrong size variable is provided 1`] = ` +
+ +
+`; + +exports[`Button > should not render error color when danger is false and variant is default 1`] = ` + +`; + +exports[`Button > should render 1`] = ` +
+ +
+`; + +exports[`Button > should render default style when variant is default 1`] = ` +
+ +
+`; + +exports[`Button > should render error style when danger is true and variant is default 1`] = ` +
+ +
+`; + +exports[`Button > should render icon when icon is provided 1`] = ` +
+ +
+`; + +exports[`Button > should render primary background color when danger is true and variant is primary 1`] = ` +
+ +
+`; diff --git a/packages/components/src/components/Button/__tests__/index.browser.test.tsx b/packages/components/src/components/Button/__tests__/index.browser.test.tsx new file mode 100644 index 00000000..87b1f717 --- /dev/null +++ b/packages/components/src/components/Button/__tests__/index.browser.test.tsx @@ -0,0 +1,182 @@ +import { css, DevupThemeTypography } from '@devup-ui/react' +import { render } from '@testing-library/react' + +import { Button } from '../index' + +describe('Button', () => { + it('should render', () => { + const { container } = render() + expect(container).toMatchSnapshot() + }) + + it('should render default style when variant is default', () => { + const { container } = render() + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).toHaveStyle({ + color: 'var(--text, #272727)', + }) + }) + + it('should disable', () => { + const { container } = render() + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).toHaveAttribute('disabled') + }) + + it('should render error style when danger is true and variant is default', () => { + const { container } = render() + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).toHaveStyle({ + color: 'var(--error, #D52B2E)', + }) + }) + + it('should render primary background color when danger is true and variant is primary', () => { + const { container } = render( + , + ) + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).toHaveStyle({ + backgroundColor: 'var(--primary, #8163E1)', + }) + }) + + it('should not render error color when danger is false and variant is default', async () => { + const { container } = render() + const button = container.querySelector('button') + expect(button).toHaveStyle({ + color: 'var(--text, #272727)', + }) + expect(button).toMatchSnapshot() + }) + + it('should have class name when className is provided', () => { + const { container } = render() + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).toHaveClass('test') + }) + + it('should not have px when a wrong size variable is provided', () => { + const { container } = render( + // @ts-expect-error + , + ) + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).not.toHaveClass('px-0-16px--1') + }) + + it('should not have bg when a wrong size variable is provided', () => { + const { container } = render( + // @ts-expect-error + , + ) + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).not.toHaveClass( + 'bg-0-color-mix(in srgb,var(--primary,#8163E1) 10%,#FFF 90%)-8380715471663921674-1', + ) + }) + + it('should have text overflow ellipsis when ellipsis is true', () => { + const { container } = render( + , + ) + expect(container).toMatchSnapshot() + const button = container.querySelector('button>div>div') + expect(button).toHaveClass('textOverflow-0-ellipsis--255') + }) + + it('should have font size 15px when size is md and variant is primary', () => { + const { container } = render( + , + ) + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).toHaveClass('fontSize-0-15px--1') + }) + + it('should have font size 15px when size is sm and variant is primary', () => { + const { container } = render( + , + ) + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).toHaveClass('fontSize-0-15px--1') + }) + + it('should have font size 14px when size is sm and variant is default', () => { + const { container } = render( + , + ) + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).toHaveClass('fontSize-0-14px--1') + }) + + it('should render icon when icon is provided', () => { + const { container } = render( + , + ) + expect(container).toMatchSnapshot() + expect(container.querySelector('svg')).toBeInTheDocument() + }) + it('color should be white', () => { + const { container } = render( + , + ) + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).toHaveStyle({ + color: 'var(--text, #272727)', + }) + }) + + it('should have typography when typography is provided', () => { + const { container } = render( + , + ) + expect(container).toMatchSnapshot() + expect(container.querySelector('button')).toHaveClass('typo-inlineLabelS') + }) +}) diff --git a/packages/components/src/components/Button/index.tsx b/packages/components/src/components/Button/index.tsx new file mode 100644 index 00000000..dba686c4 --- /dev/null +++ b/packages/components/src/components/Button/index.tsx @@ -0,0 +1,260 @@ +import { + Box, + Button as DevupButton, + Center, + css, + type DevupThemeTypography, +} from '@devup-ui/react' +import { clsx } from 'clsx' + +type ButtonProps = React.ButtonHTMLAttributes & { + variant?: 'primary' | 'default' + colors?: { + primary?: string + error?: string + text?: string + border?: string + inputBackground?: string + primaryFocus?: string + } + typography?: keyof DevupThemeTypography + danger?: boolean + size?: 'sm' | 'md' | 'lg' + icon?: React.ReactNode + ellipsis?: boolean +} + +const buttonTextEllipsis = css({ + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', +}) + +export function Button({ + variant = 'default', + type = 'button', + colors, + danger = false, + children, + size = 'md', + className, + icon, + ellipsis = false, + typography, + disabled, + ...props +}: ButtonProps): React.ReactElement { + return ( + + + {icon && ( +
svg': { + color: 'inherit', + }, + }} + top="50%" + transform="translate(-100%, -50%)" + > + {icon} +
+ )} + + {children} + +
+
+ ) +} diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts new file mode 100644 index 00000000..e58450b5 --- /dev/null +++ b/packages/components/src/index.ts @@ -0,0 +1 @@ +export { Button } from './components/Button' diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json new file mode 100644 index 00000000..10085d46 --- /dev/null +++ b/packages/components/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "types": ["vite/client", "vitest/importMeta", "vitest/globals", "@testing-library/jest-dom"], + "strict": true, + "target": "ESNext", + "declaration": true, + "declarationMap": true, + "removeComments": true, + "sourceMap": true, + "useDefineForClassFields": true, + "allowJs": false, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true, + "module": "ESNext", + "moduleResolution": "Bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "baseUrl": ".", + "jsx": "react-jsx" + }, + "include": ["src/**/*", ".storybook/**/*", "./setupTests.ts"] +} diff --git a/packages/components/vite.config.ts b/packages/components/vite.config.ts new file mode 100644 index 00000000..6893a9b2 --- /dev/null +++ b/packages/components/vite.config.ts @@ -0,0 +1,65 @@ +import preserveDirectives from 'rollup-plugin-preserve-directives' +import dts from 'vite-plugin-dts' +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + globals: true, + coverage: { + all: true, + thresholds: { + '100': true, + }, + }, + }, + plugins: [ + dts({ + entryRoot: 'src', + staticImport: true, + pathsToAliases: false, + exclude: [ + '**/__tests__/**/*', + '**/*.test.(tsx|ts|js|jsx)', + '**/*.test-d.(tsx|ts|js|jsx)', + 'vite.config.ts', + ], + include: ['**/src/**/*.ts', '**/src/**/*.tsx'], + copyDtsFiles: true, + compilerOptions: { + isolatedModules: false, + declaration: true, + }, + }) as any, + ], + build: { + rollupOptions: { + onwarn: (warning) => { + if (warning.code === 'MODULE_LEVEL_DIRECTIVE') { + return + } + }, + plugins: [preserveDirectives()], + external: (source) => { + return !(source.includes('src') || source.startsWith('.')) + }, + + output: { + dir: 'dist', + preserveModules: true, + preserveModulesRoot: 'src', + + exports: 'named', + assetFileNames({ name }) { + return name?.replace(/^src\//g, '') ?? '' + }, + }, + }, + lib: { + formats: ['es', 'cjs'], + entry: { + index: 'src/index.ts', + }, + }, + outDir: 'dist', + }, +}) diff --git a/packages/react/src/components/__tests__/Box.browser.test.tsx b/packages/react/src/components/__tests__/Box.browser.test.tsx index d7762f52..5b323593 100644 --- a/packages/react/src/components/__tests__/Box.browser.test.tsx +++ b/packages/react/src/components/__tests__/Box.browser.test.tsx @@ -1,10 +1,19 @@ // @ts-nocheck import { Box } from '@devup-ui/react' -import { render } from '@testing-library/react' +import { render, waitFor } from '@testing-library/react' describe('Box', () => { - it('should render', () => { + it('should render', async () => { const { container } = render() - expect(container.children[0]).toHaveStyle('background-color: blue') + + await waitFor( + () => { + expect(container.children[0]).toHaveClass('background-0-blue--255') + }, + { + timeout: 1000, + interval: 10, + }, + ) }) }) diff --git a/packages/react/src/components/__tests__/ThemeScript.browser.test.tsx b/packages/react/src/components/__tests__/ThemeScript.browser.test.tsx index 85318704..e8af8891 100644 --- a/packages/react/src/components/__tests__/ThemeScript.browser.test.tsx +++ b/packages/react/src/components/__tests__/ThemeScript.browser.test.tsx @@ -6,8 +6,10 @@ import { ThemeScript } from '../ThemeScript' describe('ThemeScript', () => { it('should apply ThemeScript', () => { + vi.stubEnv('DEVUP_UI_DEFAULT_THEME', undefined) const { container } = render() expect(container).toMatchSnapshot() + vi.unstubAllEnvs() }) it('should apply ThemeScript with theme', () => { const { container } = render( diff --git a/packages/vite-plugin/src/plugin.ts b/packages/vite-plugin/src/plugin.ts index 53a37f3c..55b60a1a 100644 --- a/packages/vite-plugin/src/plugin.ts +++ b/packages/vite-plugin/src/plugin.ts @@ -78,6 +78,11 @@ export function DevupUI({ return { name: 'devup-ui', config() { + const theme = getDefaultTheme() + const define: Record = {} + if (theme) { + define['process.env.DEVUP_UI_DEFAULT_THEME'] = JSON.stringify(theme) + } const ret: Omit = { server: { watch: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1cab1255..04da0fef 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,6 +44,9 @@ importers: apps/landing: dependencies: + '@devup-ui/components': + specifier: workspace:* + version: link:../../packages/components '@devup-ui/react': specifier: workspace:* version: link:../../packages/react @@ -328,6 +331,58 @@ importers: bindings/devup-ui-wasm: {} + packages/components: + dependencies: + '@devup-ui/react': + specifier: workspace:* + version: link:../react + clsx: + specifier: ^2.1 + version: 2.1.1 + csstype: + specifier: ^3.1.3 + version: 3.1.3 + react: + specifier: ^19.1.0 + version: 19.1.0 + devDependencies: + '@devup-ui/vite-plugin': + specifier: workspace:* + version: link:../vite-plugin + '@storybook/addon-docs': + specifier: 9.0.15 + version: 9.0.15(@types/react@19.1.8)(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0)) + '@storybook/addon-onboarding': + specifier: ^9.0.15 + version: 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0)) + '@storybook/react-vite': + specifier: ^9.0.15 + version: 9.0.15(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rollup@4.44.0)(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))(typescript@5.8.3)(vite@6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1)) + '@types/react': + specifier: ^19.1.8 + version: 19.1.8 + eslint-plugin-storybook: + specifier: 9.0.15 + version: 9.0.15(eslint@9.30.0(jiti@2.4.2))(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))(typescript@5.8.3) + rollup-plugin-preserve-directives: + specifier: ^0.4.0 + version: 0.4.0(rollup@4.44.0) + storybook: + specifier: ^9.0.15 + version: 9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0) + typescript: + specifier: ^5.8.3 + version: 5.8.3 + vite: + specifier: ^6 + version: 6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1) + vite-plugin-dts: + specifier: ^4.5.4 + version: 4.5.4(@types/node@24.0.7)(rollup@4.44.0)(typescript@5.8.3)(vite@6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1)) + vitest: + specifier: ^3.2.4 + version: 3.2.4(@types/debug@4.1.12)(@types/node@24.0.7)(happy-dom@18.0.1)(jiti@2.4.2)(terser@5.43.1) + packages/next-plugin: dependencies: '@devup-ui/webpack-plugin': @@ -1618,6 +1673,15 @@ packages: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} + '@joshwooding/vite-plugin-react-docgen-typescript@0.6.1': + resolution: {integrity: sha512-J4BaTocTOYFkMHIra1JDWrMWpNmBl4EkplIwHEsV8aeUOtdWjwSnln9U7twjMFTAEB7mptNtSKyVi1Y2W9sDJw==} + peerDependencies: + typescript: '>= 4.3.x' + vite: ^6 + peerDependenciesMeta: + typescript: + optional: true + '@jridgewell/gen-mapping@0.3.8': resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} engines: {node: '>=6.0.0'} @@ -2042,6 +2106,65 @@ packages: '@rushstack/ts-command-line@5.0.1': resolution: {integrity: sha512-bsbUucn41UXrQK7wgM8CNM/jagBytEyJqXw/umtI8d68vFm1Jwxh1OtLrlW7uGZgjCWiiPH6ooUNa1aVsuVr3Q==} + '@storybook/addon-docs@9.0.15': + resolution: {integrity: sha512-HOb45DkF23T1tRzakb9q33qnBRso15S/GM28ippPZWi5ZXR9RAyKVgOSMA/ViEpK4ezASxN+Tee+H7m4ksEFZw==} + peerDependencies: + storybook: ^9.0.15 + + '@storybook/addon-onboarding@9.0.15': + resolution: {integrity: sha512-g2FqO0aS6vvjMZdY+0xjV1C7YGcDE0GkuPAv1JqejNYGyX2Z8nuLHy2zqhLIBpfoap4S9PZO+obqEKVeo70Q0Q==} + peerDependencies: + storybook: ^9.0.15 + + '@storybook/builder-vite@9.0.15': + resolution: {integrity: sha512-ogPec1V+e3MgTY5DBlq/6hBBui0Y4TmolYQh0eL3cATHrwZlwkTTDWQfsOnMALd5w+4Jq8n0gk0cQgR5rh1FHw==} + peerDependencies: + storybook: ^9.0.15 + vite: ^6 + + '@storybook/csf-plugin@9.0.15': + resolution: {integrity: sha512-KszyGjrocMiNbkmpBGARF1ugLYMVaw1J8Z31kmwTHsMgMZwAKcOsofJ0fPgFno0yV59DUVkWxVBdPs9V0hhvxA==} + peerDependencies: + storybook: ^9.0.15 + + '@storybook/global@5.0.0': + resolution: {integrity: sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==} + + '@storybook/icons@1.4.0': + resolution: {integrity: sha512-Td73IeJxOyalzvjQL+JXx72jlIYHgs+REaHiREOqfpo3A2AYYG71AUbcv+lg7mEDIweKVCxsMQ0UKo634c8XeA==} + 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 + + '@storybook/react-dom-shim@9.0.15': + resolution: {integrity: sha512-X5VlYKoZSIMU9HEshIwtNzp41nPt4kiJtJ2c5HzFa5F6M8rEHM5n059CGcCZQqff3FnZtK/y6v/kCVZO+8oETA==} + 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: ^9.0.15 + + '@storybook/react-vite@9.0.15': + resolution: {integrity: sha512-OOAywn5x2Ged3LD84+TMwpjZUelFg7Wb8eHkgHE2SzM20XiZrhoKvreqxlzbfey3weBl+bKNhsiWF9BluT8YHg==} + engines: {node: '>=20.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 + storybook: ^9.0.15 + vite: ^6 + + '@storybook/react@9.0.15': + resolution: {integrity: sha512-hewpSH8Ij4Bg7S9Tfw7ecfGPv7YDycRxsfpsDX7Mw3JhLuCdqjpmmTL2RgoNojg7TAW3FPdixcgQi/b4PH50ag==} + engines: {node: '>=20.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 + storybook: ^9.0.15 + typescript: '>= 4.9.x' + peerDependenciesMeta: + typescript: + optional: true + '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} @@ -2079,6 +2202,12 @@ packages: '@types/react-dom': optional: true + '@testing-library/user-event@14.6.1': + resolution: {integrity: sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==} + engines: {node: '>=12', npm: '>=6'} + peerDependencies: + '@testing-library/dom': '>=7.21.4' + '@ts-morph/common@0.20.0': resolution: {integrity: sha512-7uKjByfbPpwuzkstL3L5MQyuXPSKdoNG93Fmi2JoDcTf3pEP731JdRFAduRVkOs8oqxPsXKA+ScrWkdQ8t/I+Q==} @@ -2115,6 +2244,9 @@ packages: '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/doctrine@0.0.9': + resolution: {integrity: sha512-eOIHzCUSH7SMfonMG1LsC2f8vxBFtho6NGBznK41R84YzPuvSBzrhEps33IsQiOW9+VL6NQ9DbjQJznk/S4uRA==} + '@types/eslint-scope@3.7.7': resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} @@ -2171,6 +2303,9 @@ packages: '@types/react@19.1.8': resolution: {integrity: sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g==} + '@types/resolve@1.20.6': + resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} + '@types/stylis@4.2.7': resolution: {integrity: sha512-VgDNokpBoKF+wrdvhAAfS55OMQpL6QRglwTwNC3kIgBrzZxA4WsFj+2eLfEA/uMUDzBcEhYmjSbwQakn/i3ajA==} @@ -2705,6 +2840,10 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} + ast-types@0.16.1: + resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==} + engines: {node: '>=4'} + ast-v8-to-istanbul@0.3.3: resolution: {integrity: sha512-MuXMrSLVVoA6sYN/6Hke18vMzrT4TZNbZIj/hvh0fnYFpO+/kFXcLIaiPwXXWaQUPg4yJD8fj+lfJ7/1EBconw==} @@ -2752,6 +2891,10 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + better-opn@3.0.2: + resolution: {integrity: sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==} + engines: {node: '>=12.0.0'} + better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -2863,6 +3006,10 @@ packages: client-only@0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + code-block-writer@12.0.0: resolution: {integrity: sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==} @@ -2971,6 +3118,10 @@ packages: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} + define-lazy-prop@2.0.0: + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} + define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -2998,6 +3149,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dom-accessibility-api@0.5.16: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} @@ -3079,6 +3234,11 @@ packages: esast-util-from-js@2.0.1: resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==} + esbuild-register@3.6.0: + resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==} + peerDependencies: + esbuild: '>=0.12 <1' + esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} @@ -3139,6 +3299,13 @@ packages: peerDependencies: eslint: '>=5.0.0' + eslint-plugin-storybook@9.0.15: + resolution: {integrity: sha512-HKQtF90khC45uLJhsrMasgaH1Ou+TLzwnuFHDoHDVLryg6yIXRgSTXqRUwge9x6iitEYwUz5Y2YMqg92yzmyQQ==} + engines: {node: '>=20.0.0'} + peerDependencies: + eslint: '>=8' + storybook: ^9.0.15 + eslint-plugin-unused-imports@4.1.4: resolution: {integrity: sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==} peerDependencies: @@ -3315,6 +3482,10 @@ packages: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + find-up@7.0.0: + resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} + engines: {node: '>=18'} + flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -3583,6 +3754,11 @@ packages: is-decimal@2.0.1: resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + is-docker@2.2.1: + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} + hasBin: true + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -3673,6 +3849,10 @@ packages: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} + is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} @@ -4017,6 +4197,9 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} @@ -4108,6 +4291,10 @@ packages: resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==} engines: {node: '>= 0.4'} + open@8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -4314,6 +4501,15 @@ packages: randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + react-docgen-typescript@2.4.0: + resolution: {integrity: sha512-ZtAp5XTO5HRzQctjPU0ybY0RRCQO19X/8fxn3w7y2VVTUbGHDKULPTL4ky3vB05euSgG5NpALhEhDPvQ56wvXg==} + peerDependencies: + typescript: '>= 4.3.x' + + react-docgen@8.0.0: + resolution: {integrity: sha512-kmob/FOTwep7DUWf9KjuenKX0vyvChr3oTdvvPt09V60Iz75FJp+T/0ZeHMbAfJj2WaVWqAPP5Hmm3PYzSPPKg==} + engines: {node: ^20.9.0 || >=22} + react-dom@19.1.0: resolution: {integrity: sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==} peerDependencies: @@ -4347,6 +4543,10 @@ packages: resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} engines: {node: '>=6'} + recast@0.23.11: + resolution: {integrity: sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA==} + engines: {node: '>= 4'} + recma-build-jsx@1.0.0: resolution: {integrity: sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==} @@ -4594,6 +4794,15 @@ packages: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} + storybook@9.0.15: + resolution: {integrity: sha512-r9hwcSMM3dq7dkMveaWFTosrmyHCL2FRrV3JOwVnVWraF6GtCgp2k+r4hsYtyp1bY3zdmK9e4KYzXsGs5q1h/Q==} + hasBin: true + peerDependencies: + prettier: ^2 || ^3 + peerDependenciesMeta: + prettier: + optional: true + streamsearch@1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} @@ -4648,6 +4857,10 @@ packages: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} + strip-indent@4.0.0: + resolution: {integrity: sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==} + engines: {node: '>=12'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -4729,6 +4942,9 @@ packages: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} engines: {node: '>=18'} + tiny-invariant@1.3.3: + resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -4771,9 +4987,17 @@ packages: peerDependencies: typescript: '>=4.8.4' + ts-dedent@2.2.0: + resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} + engines: {node: '>=6.10'} + ts-morph@19.0.0: resolution: {integrity: sha512-D6qcpiJdn46tUqV45vr5UGM2dnIEuTGNxVhg0sk5NX11orcouwj6i1bMqZIz2mZTZB1Hcgy7C3oEVhAT+f6mbQ==} + tsconfig-paths@4.2.0: + resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} + engines: {node: '>=6'} + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -4843,6 +5067,10 @@ packages: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} + unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + unified@11.0.5: resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} @@ -4872,6 +5100,10 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} + unplugin@1.16.1: + resolution: {integrity: sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w==} + engines: {node: '>=14.0.0'} + update-browserslist-db@1.1.3: resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} hasBin: true @@ -4983,6 +5215,9 @@ packages: resolution: {integrity: sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==} engines: {node: '>=10.13.0'} + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + webpack@5.99.9: resolution: {integrity: sha512-brOPwM3JnmOa+7kd3NsmOUOwbDAj8FT9xDsG3IW0MgbN9yZV7Oi/s/+MNQ/EcSMqw7qfoRyXPoeEWT8zLVdVGg==} engines: {node: '>=10.13.0'} @@ -5035,6 +5270,18 @@ packages: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} + ws@8.18.3: + resolution: {integrity: sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} @@ -6415,6 +6662,15 @@ snapshots: '@istanbuljs/schema@0.1.3': {} + '@joshwooding/vite-plugin-react-docgen-typescript@0.6.1(typescript@5.8.3)(vite@6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1))': + dependencies: + glob: 10.4.5 + magic-string: 0.30.17 + react-docgen-typescript: 2.4.0(typescript@5.8.3) + vite: 6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1) + optionalDependencies: + typescript: 5.8.3 + '@jridgewell/gen-mapping@0.3.8': dependencies: '@jridgewell/set-array': 1.2.1 @@ -6935,6 +7191,78 @@ snapshots: transitivePeerDependencies: - '@types/node' + '@storybook/addon-docs@9.0.15(@types/react@19.1.8)(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))': + dependencies: + '@mdx-js/react': 3.1.0(@types/react@19.1.8)(react@19.1.0) + '@storybook/csf-plugin': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0)) + '@storybook/icons': 1.4.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + '@storybook/react-dom-shim': 9.0.15(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0)) + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + storybook: 9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0) + ts-dedent: 2.2.0 + transitivePeerDependencies: + - '@types/react' + + '@storybook/addon-onboarding@9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))': + dependencies: + storybook: 9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0) + + '@storybook/builder-vite@9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))(vite@6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1))': + dependencies: + '@storybook/csf-plugin': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0)) + storybook: 9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0) + ts-dedent: 2.2.0 + vite: 6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1) + + '@storybook/csf-plugin@9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))': + dependencies: + storybook: 9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0) + unplugin: 1.16.1 + + '@storybook/global@5.0.0': {} + + '@storybook/icons@1.4.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': + dependencies: + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + + '@storybook/react-dom-shim@9.0.15(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))': + dependencies: + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + storybook: 9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0) + + '@storybook/react-vite@9.0.15(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rollup@4.44.0)(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))(typescript@5.8.3)(vite@6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1))': + dependencies: + '@joshwooding/vite-plugin-react-docgen-typescript': 0.6.1(typescript@5.8.3)(vite@6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1)) + '@rollup/pluginutils': 5.2.0(rollup@4.44.0) + '@storybook/builder-vite': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))(vite@6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1)) + '@storybook/react': 9.0.15(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))(typescript@5.8.3) + find-up: 7.0.0 + magic-string: 0.30.17 + react: 19.1.0 + react-docgen: 8.0.0 + react-dom: 19.1.0(react@19.1.0) + resolve: 1.22.10 + storybook: 9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0) + tsconfig-paths: 4.2.0 + vite: 6.3.5(@types/node@24.0.7)(jiti@2.4.2)(terser@5.43.1) + transitivePeerDependencies: + - rollup + - supports-color + - typescript + + '@storybook/react@9.0.15(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))(typescript@5.8.3)': + dependencies: + '@storybook/global': 5.0.0 + '@storybook/react-dom-shim': 9.0.15(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0)) + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + storybook: 9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0) + optionalDependencies: + typescript: 5.8.3 + '@swc/counter@0.1.3': {} '@swc/helpers@0.5.15': @@ -6984,6 +7312,10 @@ snapshots: '@types/react': 19.1.8 '@types/react-dom': 19.1.6(@types/react@19.1.8) + '@testing-library/user-event@14.6.1(@testing-library/dom@10.4.0)': + dependencies: + '@testing-library/dom': 10.4.0 + '@ts-morph/common@0.20.0': dependencies: fast-glob: 3.3.3 @@ -7033,6 +7365,8 @@ snapshots: '@types/deep-eql@4.0.2': {} + '@types/doctrine@0.0.9': {} + '@types/eslint-scope@3.7.7': dependencies: '@types/eslint': 9.6.1 @@ -7095,6 +7429,8 @@ snapshots: dependencies: csstype: 3.1.3 + '@types/resolve@1.20.6': {} + '@types/stylis@4.2.7': {} '@types/unist@2.0.11': {} @@ -8043,6 +8379,10 @@ snapshots: assertion-error@2.0.1: {} + ast-types@0.16.1: + dependencies: + tslib: 2.8.1 + ast-v8-to-istanbul@0.3.3: dependencies: '@jridgewell/trace-mapping': 0.3.25 @@ -8098,6 +8438,10 @@ snapshots: balanced-match@1.0.2: {} + better-opn@3.0.2: + dependencies: + open: 8.4.2 + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -8204,6 +8548,8 @@ snapshots: client-only@0.0.1: {} + clsx@2.1.1: {} + code-block-writer@12.0.0: {} collapse-white-space@2.1.0: {} @@ -8308,6 +8654,8 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 + define-lazy-prop@2.0.0: {} + define-properties@1.2.1: dependencies: define-data-property: 1.1.4 @@ -8333,6 +8681,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dom-accessibility-api@0.5.16: {} dom-accessibility-api@0.6.3: {} @@ -8488,6 +8840,13 @@ snapshots: esast-util-from-estree: 2.0.0 vfile-message: 4.0.2 + esbuild-register@3.6.0(esbuild@0.25.5): + dependencies: + debug: 4.4.1 + esbuild: 0.25.5 + transitivePeerDependencies: + - supports-color + esbuild@0.18.20: optionalDependencies: '@esbuild/android-arm': 0.18.20 @@ -8608,6 +8967,15 @@ snapshots: dependencies: eslint: 9.30.0(jiti@2.4.2) + eslint-plugin-storybook@9.0.15(eslint@9.30.0(jiti@2.4.2))(storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0))(typescript@5.8.3): + dependencies: + '@typescript-eslint/utils': 8.34.1(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3) + eslint: 9.30.0(jiti@2.4.2) + storybook: 9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0) + transitivePeerDependencies: + - supports-color + - typescript + eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.30.0(jiti@2.4.2)): dependencies: eslint: 9.30.0(jiti@2.4.2) @@ -8810,6 +9178,12 @@ snapshots: locate-path: 7.2.0 path-exists: 5.0.0 + find-up@7.0.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + unicorn-magic: 0.1.0 + flat-cache@4.0.1: dependencies: flatted: 3.3.3 @@ -9129,6 +9503,8 @@ snapshots: is-decimal@2.0.1: {} + is-docker@2.2.1: {} + is-extglob@2.1.1: {} is-finalizationregistry@1.1.1: @@ -9210,6 +9586,10 @@ snapshots: is-windows@1.0.2: {} + is-wsl@2.2.0: + dependencies: + is-docker: 2.2.1 + isarray@2.0.5: {} isexe@2.0.0: {} @@ -9738,6 +10118,8 @@ snapshots: dependencies: brace-expansion: 2.0.2 + minimist@1.2.8: {} + minipass@7.1.2: {} mkdirp@2.1.6: {} @@ -9829,6 +10211,12 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.1.1 + open@8.4.2: + dependencies: + define-lazy-prop: 2.0.0 + is-docker: 2.2.1 + is-wsl: 2.2.0 + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -10030,6 +10418,25 @@ snapshots: dependencies: safe-buffer: 5.2.1 + react-docgen-typescript@2.4.0(typescript@5.8.3): + dependencies: + typescript: 5.8.3 + + react-docgen@8.0.0: + dependencies: + '@babel/core': 7.27.4 + '@babel/traverse': 7.27.4 + '@babel/types': 7.27.6 + '@types/babel__core': 7.20.5 + '@types/babel__traverse': 7.20.7 + '@types/doctrine': 0.0.9 + '@types/resolve': 1.20.6 + doctrine: 3.0.0 + resolve: 1.22.10 + strip-indent: 4.0.0 + transitivePeerDependencies: + - supports-color + react-dom@19.1.0(react@19.1.0): dependencies: react: 19.1.0 @@ -10064,6 +10471,14 @@ snapshots: pify: 4.0.1 strip-bom: 3.0.0 + recast@0.23.11: + dependencies: + ast-types: 0.16.1 + esprima: 4.0.1 + source-map: 0.6.1 + tiny-invariant: 1.3.3 + tslib: 2.8.1 + recma-build-jsx@1.0.0: dependencies: '@types/estree': 1.0.8 @@ -10428,6 +10843,27 @@ snapshots: es-errors: 1.3.0 internal-slot: 1.1.0 + storybook@9.0.15(@testing-library/dom@10.4.0)(prettier@3.6.0): + dependencies: + '@storybook/global': 5.0.0 + '@testing-library/jest-dom': 6.6.3 + '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.0) + '@vitest/expect': 3.2.4 + '@vitest/spy': 3.2.4 + better-opn: 3.0.2 + esbuild: 0.25.5 + esbuild-register: 3.6.0(esbuild@0.25.5) + recast: 0.23.11 + semver: 7.7.2 + ws: 8.18.3 + optionalDependencies: + prettier: 3.6.0 + transitivePeerDependencies: + - '@testing-library/dom' + - bufferutil + - supports-color + - utf-8-validate + streamsearch@1.1.0: {} string-argv@0.3.2: {} @@ -10507,6 +10943,10 @@ snapshots: dependencies: min-indent: 1.0.1 + strip-indent@4.0.0: + dependencies: + min-indent: 1.0.1 + strip-json-comments@3.1.1: {} strip-literal@3.0.0: @@ -10572,6 +11012,8 @@ snapshots: glob: 10.4.5 minimatch: 9.0.5 + tiny-invariant@1.3.3: {} + tinybench@2.9.0: {} tinyexec@0.3.2: {} @@ -10603,11 +11045,19 @@ snapshots: dependencies: typescript: 5.8.3 + ts-dedent@2.2.0: {} + ts-morph@19.0.0: dependencies: '@ts-morph/common': 0.20.0 code-block-writer: 12.0.0 + tsconfig-paths@4.2.0: + dependencies: + json5: 2.2.3 + minimist: 1.2.8 + strip-bom: 3.0.0 + tslib@2.8.1: {} type-check@0.4.0: @@ -10685,6 +11135,8 @@ snapshots: unicode-property-aliases-ecmascript@2.1.0: {} + unicorn-magic@0.1.0: {} + unified@11.0.5: dependencies: '@types/unist': 3.0.3 @@ -10726,6 +11178,11 @@ snapshots: universalify@2.0.1: {} + unplugin@1.16.1: + dependencies: + acorn: 8.15.0 + webpack-virtual-modules: 0.6.2 + update-browserslist-db@1.1.3(browserslist@4.21.5): dependencies: browserslist: 4.21.5 @@ -10893,6 +11350,8 @@ snapshots: webpack-sources@3.3.3: {} + webpack-virtual-modules@0.6.2: {} + webpack@5.99.9: dependencies: '@types/eslint-scope': 3.7.7 @@ -10990,6 +11449,8 @@ snapshots: string-width: 5.1.2 strip-ansi: 7.1.0 + ws@8.18.3: {} + xtend@4.0.2: {} yallist@3.1.1: {} diff --git a/vitest.config.ts b/vitest.config.ts index 144f82d5..33481a20 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -6,7 +6,13 @@ export default defineConfig({ coverage: { provider: 'v8', include: ['packages/*/src/**'], - exclude: ['packages/*/src/types', 'packages/*/src/**/__tests__'], + exclude: [ + 'packages/*/src/types', + 'packages/*/src/**/__tests__', + '**/*.stories.{ts,tsx}', + ], + cleanOnRerun: true, + reporter: ['text', 'json', 'html'], }, projects: [ { @@ -15,19 +21,26 @@ export default defineConfig({ include: ['packages/*/src/**/__tests__/**/*.test.{ts,tsx}'], exclude: ['packages/*/src/**/__tests__/**/*.browser.test.{ts,tsx}'], globals: true, + environment: 'node', }, }, + { test: { - include: ['packages/*/src/**/__tests__/**/*.browser.test.{ts,tsx}'], name: 'happy-dom', + include: ['packages/*/src/**/__tests__/**/*.browser.test.{ts,tsx}'], environment: 'happy-dom', globals: true, css: true, setupFiles: ['@testing-library/jest-dom/vitest'], }, - plugins: [DevupUI()], + plugins: [ + DevupUI({ + debug: true, + }), + ], }, ], + cache: false, }, })