@udixio/ui-react 0.4.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.mjs +22 -0
- package/.storybook/main.ts +20 -0
- package/.storybook/preview.ts +1 -0
- package/CHANGELOG.md +63 -0
- package/dist/index.cjs +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2811 -0
- package/dist/lib/components/Button.d.ts +9 -0
- package/dist/lib/components/Button.d.ts.map +1 -0
- package/{src → dist}/lib/components/Card.d.ts +5 -0
- package/dist/lib/components/Card.d.ts.map +1 -0
- package/{src → dist}/lib/components/Carousel.d.ts +6 -0
- package/dist/lib/components/Carousel.d.ts.map +1 -0
- package/{src → dist}/lib/components/CarouselItem.d.ts +4 -0
- package/dist/lib/components/CarouselItem.d.ts.map +1 -0
- package/dist/lib/components/Divider.d.ts +9 -0
- package/dist/lib/components/Divider.d.ts.map +1 -0
- package/dist/lib/components/Fab.d.ts +9 -0
- package/dist/lib/components/Fab.d.ts.map +1 -0
- package/dist/lib/components/IconButton.d.ts +10 -0
- package/dist/lib/components/IconButton.d.ts.map +1 -0
- package/{src → dist}/lib/components/NavigationRail.d.ts +5 -0
- package/dist/lib/components/NavigationRail.d.ts.map +1 -0
- package/{src → dist}/lib/components/NavigationRailItem.d.ts +9 -1
- package/dist/lib/components/NavigationRailItem.d.ts.map +1 -0
- package/dist/lib/components/ProgressIndicator.d.ts +8 -0
- package/dist/lib/components/ProgressIndicator.d.ts.map +1 -0
- package/{src → dist}/lib/components/Slider.d.ts +5 -0
- package/dist/lib/components/Slider.d.ts.map +1 -0
- package/dist/lib/components/Snackbar.d.ts +9 -0
- package/dist/lib/components/Snackbar.d.ts.map +1 -0
- package/{src → dist}/lib/components/Switch.d.ts +5 -0
- package/dist/lib/components/Switch.d.ts.map +1 -0
- package/{src → dist}/lib/components/Tab.d.ts +4 -0
- package/dist/lib/components/Tab.d.ts.map +1 -0
- package/{src → dist}/lib/components/Tabs.d.ts +5 -0
- package/dist/lib/components/Tabs.d.ts.map +1 -0
- package/{src → dist}/lib/components/TextField.d.ts +5 -0
- package/dist/lib/components/TextField.d.ts.map +1 -0
- package/{src → dist}/lib/components/ToolTip.d.ts +5 -0
- package/dist/lib/components/ToolTip.d.ts.map +1 -0
- package/{src → dist}/lib/components/index.d.ts +1 -1
- package/dist/lib/components/index.d.ts.map +1 -0
- package/dist/lib/effects/SyncedFixedWrapper.d.ts.map +1 -0
- package/dist/lib/effects/custom-scroll/custom-scroll.effect.d.ts.map +1 -0
- package/dist/lib/effects/custom-scroll/custom-scroll.interface.d.ts.map +1 -0
- package/dist/lib/effects/custom-scroll/custom-scroll.style.d.ts.map +1 -0
- package/dist/lib/effects/custom-scroll/index.d.ts.map +1 -0
- package/dist/lib/effects/index.d.ts.map +1 -0
- package/dist/lib/effects/ripple/RippleEffect.d.ts.map +1 -0
- package/dist/lib/effects/ripple/index.d.ts.map +1 -0
- package/dist/lib/effects/smooth-scroll.effect.d.ts.map +1 -0
- package/dist/lib/icon/icon.d.ts.map +1 -0
- package/dist/lib/icon/index.d.ts.map +1 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/{src → dist}/lib/interfaces/button.interface.d.ts +9 -3
- package/dist/lib/interfaces/button.interface.d.ts.map +1 -0
- package/{src → dist}/lib/interfaces/card.interface.d.ts +2 -0
- package/dist/lib/interfaces/card.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/carousel-item.interface.d.ts.map +1 -0
- package/{src → dist}/lib/interfaces/carousel.interface.d.ts +3 -2
- package/dist/lib/interfaces/carousel.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/divider.interface.d.ts.map +1 -0
- package/{src → dist}/lib/interfaces/fab.interface.d.ts +2 -1
- package/dist/lib/interfaces/fab.interface.d.ts.map +1 -0
- package/{src → dist}/lib/interfaces/icon-button.interface.d.ts +3 -2
- package/dist/lib/interfaces/icon-button.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/index.d.ts.map +1 -0
- package/{src → dist}/lib/interfaces/navigation-rail-item.interface.d.ts +1 -0
- package/dist/lib/interfaces/navigation-rail-item.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/navigation-rail.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/progress-indicator.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/slider.interface.d.ts.map +1 -0
- package/{src → dist}/lib/interfaces/snackbar.interface.d.ts +1 -1
- package/dist/lib/interfaces/snackbar.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/switch.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/tab.interface.d.ts.map +1 -0
- package/{src → dist}/lib/interfaces/tabs.interface.d.ts +1 -1
- package/dist/lib/interfaces/tabs.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/text-field.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/tooltip.interface.d.ts.map +1 -0
- package/{src → dist}/lib/styles/button.style.d.ts +22 -8
- package/dist/lib/styles/button.style.d.ts.map +1 -0
- package/{src → dist}/lib/styles/card.style.d.ts +2 -0
- package/dist/lib/styles/card.style.d.ts.map +1 -0
- package/dist/lib/styles/carousel-item.style.d.ts.map +1 -0
- package/{src → dist}/lib/styles/carousel.style.d.ts +1 -1
- package/dist/lib/styles/carousel.style.d.ts.map +1 -0
- package/dist/lib/styles/divider.style.d.ts.map +1 -0
- package/{src → dist}/lib/styles/fab.style.d.ts +6 -2
- package/dist/lib/styles/fab.style.d.ts.map +1 -0
- package/{src → dist}/lib/styles/icon-button.style.d.ts +9 -5
- package/dist/lib/styles/icon-button.style.d.ts.map +1 -0
- package/dist/lib/styles/index.d.ts.map +1 -0
- package/{src → dist}/lib/styles/navigation-rail-item.style.d.ts +2 -0
- package/dist/lib/styles/navigation-rail-item.style.d.ts.map +1 -0
- package/dist/lib/styles/navigation-rail.style.d.ts.map +1 -0
- package/dist/lib/styles/progress-indicator.style.d.ts.map +1 -0
- package/dist/lib/styles/slider.style.d.ts.map +1 -0
- package/{src → dist}/lib/styles/snackbar.style.d.ts +2 -2
- package/dist/lib/styles/snackbar.style.d.ts.map +1 -0
- package/dist/lib/styles/switch.style.d.ts.map +1 -0
- package/{src → dist}/lib/styles/tab.style.d.ts +1 -1
- package/dist/lib/styles/tab.style.d.ts.map +1 -0
- package/{src → dist}/lib/styles/tabs.style.d.ts +1 -1
- package/dist/lib/styles/tabs.style.d.ts.map +1 -0
- package/dist/lib/styles/text-field.style.d.ts.map +1 -0
- package/dist/lib/styles/tooltip.style.d.ts.map +1 -0
- package/dist/lib/utils/component-helper.d.ts.map +1 -0
- package/{src → dist}/lib/utils/component.d.ts +1 -1
- package/dist/lib/utils/component.d.ts.map +1 -0
- package/dist/lib/utils/index.d.ts.map +1 -0
- package/dist/lib/utils/string.d.ts.map +1 -0
- package/dist/lib/utils/styles/classnames.d.ts.map +1 -0
- package/dist/lib/utils/styles/get-classname.d.ts.map +1 -0
- package/dist/lib/utils/styles/index.d.ts.map +1 -0
- package/package.json +31 -8
- package/postcss.config.mjs +5 -0
- package/src/index.css +4 -0
- package/src/index.ts +1 -0
- package/src/lib/components/Button.tsx +174 -0
- package/src/lib/components/Card.tsx +36 -0
- package/src/lib/components/Carousel.tsx +196 -0
- package/src/lib/components/CarouselItem.tsx +58 -0
- package/src/lib/components/Divider.tsx +18 -0
- package/src/lib/components/Fab.tsx +122 -0
- package/src/lib/components/IconButton.tsx +155 -0
- package/src/lib/components/NavigationRail.tsx +177 -0
- package/src/lib/components/NavigationRailItem.tsx +211 -0
- package/src/lib/components/ProgressIndicator.tsx +154 -0
- package/src/lib/components/Slider.tsx +366 -0
- package/src/lib/components/Snackbar.tsx +71 -0
- package/src/lib/components/Switch.tsx +99 -0
- package/src/lib/components/Tab.tsx +114 -0
- package/src/lib/components/Tabs.tsx +90 -0
- package/src/lib/components/TextField.tsx +274 -0
- package/src/lib/components/ToolTip.tsx +232 -0
- package/src/lib/components/index.ts +19 -0
- package/src/lib/effects/SyncedFixedWrapper.tsx +62 -0
- package/src/lib/effects/custom-scroll/custom-scroll.effect.tsx +287 -0
- package/src/lib/effects/custom-scroll/custom-scroll.interface.ts +25 -0
- package/src/lib/effects/custom-scroll/custom-scroll.style.ts +32 -0
- package/src/lib/effects/custom-scroll/index.ts +3 -0
- package/src/lib/effects/index.ts +4 -0
- package/src/lib/effects/ripple/RippleEffect.tsx +103 -0
- package/src/lib/effects/ripple/index.tsx +1 -0
- package/src/lib/effects/smooth-scroll.effect.tsx +91 -0
- package/src/lib/icon/icon.tsx +47 -0
- package/src/lib/icon/index.ts +1 -0
- package/src/lib/index.ts +6 -0
- package/src/lib/interfaces/button.interface.ts +54 -0
- package/src/lib/interfaces/card.interface.ts +11 -0
- package/src/lib/interfaces/carousel-item.interface.ts +11 -0
- package/src/lib/interfaces/carousel.interface.ts +22 -0
- package/src/lib/interfaces/divider.interface.ts +7 -0
- package/src/lib/interfaces/fab.interface.ts +20 -0
- package/src/lib/interfaces/icon-button.interface.ts +36 -0
- package/src/lib/interfaces/index.ts +16 -0
- package/src/lib/interfaces/navigation-rail-item.interface.ts +39 -0
- package/src/lib/interfaces/navigation-rail.interface.ts +39 -0
- package/src/lib/interfaces/progress-indicator.interface.ts +35 -0
- package/src/lib/interfaces/slider.interface.ts +27 -0
- package/src/lib/interfaces/snackbar.interface.ts +13 -0
- package/src/lib/interfaces/switch.interface.ts +14 -0
- package/src/lib/interfaces/tab.interface.ts +30 -0
- package/src/lib/interfaces/tabs.interface.ts +22 -0
- package/src/lib/interfaces/text-field.interface.ts +48 -0
- package/src/lib/interfaces/tooltip.interface.ts +35 -0
- package/src/lib/styles/button.style.ts +142 -0
- package/src/lib/styles/card.style.ts +21 -0
- package/src/lib/styles/carousel-item.style.ts +11 -0
- package/src/lib/styles/carousel.style.ts +12 -0
- package/src/lib/styles/divider.style.ts +17 -0
- package/src/lib/styles/fab.style.ts +55 -0
- package/src/lib/styles/icon-button.style.ts +167 -0
- package/src/lib/styles/index.ts +15 -0
- package/src/lib/styles/navigation-rail-item.style.ts +44 -0
- package/src/lib/styles/navigation-rail.style.ts +20 -0
- package/src/lib/styles/progress-indicator.style.ts +43 -0
- package/src/lib/styles/slider.style.ts +27 -0
- package/src/lib/styles/snackbar.style.ts +14 -0
- package/src/lib/styles/switch.style.ts +51 -0
- package/src/lib/styles/tab.style.ts +68 -0
- package/src/lib/styles/tabs.style.ts +13 -0
- package/src/lib/styles/text-field.style.ts +104 -0
- package/src/lib/styles/tooltip.style.ts +37 -0
- package/src/lib/utils/component-helper.ts +134 -0
- package/src/lib/utils/component.ts +34 -0
- package/src/lib/utils/index.ts +7 -0
- package/src/lib/utils/string.ts +9 -0
- package/src/lib/utils/styles/classnames.ts +49 -0
- package/src/lib/utils/styles/get-classname.ts +73 -0
- package/src/lib/utils/styles/index.ts +3 -0
- package/src/stories/action/button.stories.tsx +86 -0
- package/src/stories/action/fab.stories.tsx +54 -0
- package/src/stories/action/icon-button.stories.tsx +134 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +5 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +15 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +3 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +12 -0
- package/src/stories/assets/youtube.svg +4 -0
- package/src/stories/communication/ProgressIndicator.stories.tsx +57 -0
- package/src/stories/communication/SnackBar.stories.tsx +32 -0
- package/src/stories/communication/tool-tip.stories.tsx +133 -0
- package/src/stories/containment/card.stories.tsx +42 -0
- package/src/stories/containment/carousel.stories.tsx +65 -0
- package/src/stories/containment/divider.stories.tsx +35 -0
- package/src/stories/effect/smooth-scroll.stories.tsx +45 -0
- package/src/stories/navigation/navigation-rail/navigation-rail-item.stories.tsx +65 -0
- package/src/stories/navigation/navigation-rail/navigation-rail.stories.tsx +122 -0
- package/src/stories/navigation/tabs/tab.stories.tsx +57 -0
- package/src/stories/navigation/tabs/tabs.stories.tsx +102 -0
- package/src/stories/selection/slider.stories.tsx +85 -0
- package/src/stories/selection/switch.stories.tsx +46 -0
- package/src/stories/text-inputs/text-field.stories.tsx +135 -0
- package/src/tests/Button.spec.tsx +67 -0
- package/src/udixio.css +120 -0
- package/theme.config.ts +7 -0
- package/tsconfig.json +22 -0
- package/tsconfig.lib.json +51 -0
- package/tsconfig.spec.json +37 -0
- package/tsconfig.storybook.json +38 -0
- package/vite.config.ts +77 -0
- package/index.js +0 -5
- package/index.mjs +0 -2823
- package/src/index.d.ts.map +0 -1
- package/src/lib/components/Button.d.ts +0 -7
- package/src/lib/components/Button.d.ts.map +0 -1
- package/src/lib/components/Card.d.ts.map +0 -1
- package/src/lib/components/Carousel.d.ts.map +0 -1
- package/src/lib/components/CarouselItem.d.ts.map +0 -1
- package/src/lib/components/Divided.d.ts +0 -4
- package/src/lib/components/Divided.d.ts.map +0 -1
- package/src/lib/components/Fab.d.ts +0 -4
- package/src/lib/components/Fab.d.ts.map +0 -1
- package/src/lib/components/IconButton.d.ts +0 -5
- package/src/lib/components/IconButton.d.ts.map +0 -1
- package/src/lib/components/NavigationRail.d.ts.map +0 -1
- package/src/lib/components/NavigationRailItem.d.ts.map +0 -1
- package/src/lib/components/ProgressIndicator.d.ts +0 -4
- package/src/lib/components/ProgressIndicator.d.ts.map +0 -1
- package/src/lib/components/Slider.d.ts.map +0 -1
- package/src/lib/components/Snackbar.d.ts +0 -4
- package/src/lib/components/Snackbar.d.ts.map +0 -1
- package/src/lib/components/Switch.d.ts.map +0 -1
- package/src/lib/components/Tab.d.ts.map +0 -1
- package/src/lib/components/Tabs.d.ts.map +0 -1
- package/src/lib/components/TextField.d.ts.map +0 -1
- package/src/lib/components/ToolTip.d.ts.map +0 -1
- package/src/lib/components/index.d.ts.map +0 -1
- package/src/lib/effects/SyncedFixedWrapper.d.ts.map +0 -1
- package/src/lib/effects/custom-scroll/custom-scroll.effect.d.ts.map +0 -1
- package/src/lib/effects/custom-scroll/custom-scroll.interface.d.ts.map +0 -1
- package/src/lib/effects/custom-scroll/custom-scroll.style.d.ts.map +0 -1
- package/src/lib/effects/custom-scroll/index.d.ts.map +0 -1
- package/src/lib/effects/index.d.ts.map +0 -1
- package/src/lib/effects/ripple/RippleEffect.d.ts.map +0 -1
- package/src/lib/effects/ripple/index.d.ts.map +0 -1
- package/src/lib/effects/smooth-scroll.effect.d.ts.map +0 -1
- package/src/lib/icon/icon.d.ts.map +0 -1
- package/src/lib/icon/index.d.ts.map +0 -1
- package/src/lib/index.d.ts.map +0 -1
- package/src/lib/interfaces/button.interface.d.ts.map +0 -1
- package/src/lib/interfaces/card.interface.d.ts.map +0 -1
- package/src/lib/interfaces/carousel-item.interface.d.ts.map +0 -1
- package/src/lib/interfaces/carousel.interface.d.ts.map +0 -1
- package/src/lib/interfaces/divider.interface.d.ts.map +0 -1
- package/src/lib/interfaces/fab.interface.d.ts.map +0 -1
- package/src/lib/interfaces/icon-button.interface.d.ts.map +0 -1
- package/src/lib/interfaces/index.d.ts.map +0 -1
- package/src/lib/interfaces/navigation-rail-item.interface.d.ts.map +0 -1
- package/src/lib/interfaces/navigation-rail.interface.d.ts.map +0 -1
- package/src/lib/interfaces/progress-indicator.interface.d.ts.map +0 -1
- package/src/lib/interfaces/slider.interface.d.ts.map +0 -1
- package/src/lib/interfaces/snackbar.interface.d.ts.map +0 -1
- package/src/lib/interfaces/switch.interface.d.ts.map +0 -1
- package/src/lib/interfaces/tab.interface.d.ts.map +0 -1
- package/src/lib/interfaces/tabs.interface.d.ts.map +0 -1
- package/src/lib/interfaces/text-field.interface.d.ts.map +0 -1
- package/src/lib/interfaces/tooltip.interface.d.ts.map +0 -1
- package/src/lib/styles/button.style.d.ts.map +0 -1
- package/src/lib/styles/card.style.d.ts.map +0 -1
- package/src/lib/styles/carousel-item.style.d.ts.map +0 -1
- package/src/lib/styles/carousel.style.d.ts.map +0 -1
- package/src/lib/styles/divider.style.d.ts.map +0 -1
- package/src/lib/styles/fab.style.d.ts.map +0 -1
- package/src/lib/styles/icon-button.style.d.ts.map +0 -1
- package/src/lib/styles/index.d.ts.map +0 -1
- package/src/lib/styles/navigation-rail-item.style.d.ts.map +0 -1
- package/src/lib/styles/navigation-rail.style.d.ts.map +0 -1
- package/src/lib/styles/progress-indicator.style.d.ts.map +0 -1
- package/src/lib/styles/slider.style.d.ts.map +0 -1
- package/src/lib/styles/snackbar.style.d.ts.map +0 -1
- package/src/lib/styles/switch.style.d.ts.map +0 -1
- package/src/lib/styles/tab.style.d.ts.map +0 -1
- package/src/lib/styles/tabs.style.d.ts.map +0 -1
- package/src/lib/styles/text-field.style.d.ts.map +0 -1
- package/src/lib/styles/tooltip.style.d.ts.map +0 -1
- package/src/lib/utils/component-helper.d.ts.map +0 -1
- package/src/lib/utils/component.d.ts.map +0 -1
- package/src/lib/utils/index.d.ts.map +0 -1
- package/src/lib/utils/string.d.ts.map +0 -1
- package/src/lib/utils/styles/classnames.d.ts.map +0 -1
- package/src/lib/utils/styles/get-classname.d.ts.map +0 -1
- package/src/lib/utils/styles/index.d.ts.map +0 -1
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/{src → dist}/index.d.ts +0 -0
- /package/{src → dist}/lib/effects/SyncedFixedWrapper.d.ts +0 -0
- /package/{src → dist}/lib/effects/custom-scroll/custom-scroll.effect.d.ts +0 -0
- /package/{src → dist}/lib/effects/custom-scroll/custom-scroll.interface.d.ts +0 -0
- /package/{src → dist}/lib/effects/custom-scroll/custom-scroll.style.d.ts +0 -0
- /package/{src → dist}/lib/effects/custom-scroll/index.d.ts +0 -0
- /package/{src → dist}/lib/effects/index.d.ts +0 -0
- /package/{src → dist}/lib/effects/ripple/RippleEffect.d.ts +0 -0
- /package/{src → dist}/lib/effects/ripple/index.d.ts +0 -0
- /package/{src → dist}/lib/effects/smooth-scroll.effect.d.ts +0 -0
- /package/{src → dist}/lib/icon/icon.d.ts +0 -0
- /package/{src → dist}/lib/icon/index.d.ts +0 -0
- /package/{src → dist}/lib/index.d.ts +0 -0
- /package/{src → dist}/lib/interfaces/carousel-item.interface.d.ts +0 -0
- /package/{src → dist}/lib/interfaces/divider.interface.d.ts +0 -0
- /package/{src → dist}/lib/interfaces/index.d.ts +0 -0
- /package/{src → dist}/lib/interfaces/navigation-rail.interface.d.ts +0 -0
- /package/{src → dist}/lib/interfaces/progress-indicator.interface.d.ts +0 -0
- /package/{src → dist}/lib/interfaces/slider.interface.d.ts +0 -0
- /package/{src → dist}/lib/interfaces/switch.interface.d.ts +0 -0
- /package/{src → dist}/lib/interfaces/tab.interface.d.ts +0 -0
- /package/{src → dist}/lib/interfaces/text-field.interface.d.ts +0 -0
- /package/{src → dist}/lib/interfaces/tooltip.interface.d.ts +0 -0
- /package/{src → dist}/lib/styles/carousel-item.style.d.ts +0 -0
- /package/{src → dist}/lib/styles/divider.style.d.ts +0 -0
- /package/{src → dist}/lib/styles/index.d.ts +0 -0
- /package/{src → dist}/lib/styles/navigation-rail.style.d.ts +0 -0
- /package/{src → dist}/lib/styles/progress-indicator.style.d.ts +0 -0
- /package/{src → dist}/lib/styles/slider.style.d.ts +0 -0
- /package/{src → dist}/lib/styles/switch.style.d.ts +0 -0
- /package/{src → dist}/lib/styles/text-field.style.d.ts +0 -0
- /package/{src → dist}/lib/styles/tooltip.style.d.ts +0 -0
- /package/{src → dist}/lib/utils/component-helper.d.ts +0 -0
- /package/{src → dist}/lib/utils/index.d.ts +0 -0
- /package/{src → dist}/lib/utils/string.d.ts +0 -0
- /package/{src → dist}/lib/utils/styles/classnames.d.ts +0 -0
- /package/{src → dist}/lib/utils/styles/get-classname.d.ts +0 -0
- /package/{src → dist}/lib/utils/styles/index.d.ts +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
faCircleUser,
|
|
5
|
+
faHeart,
|
|
6
|
+
faMagnifyingGlass,
|
|
7
|
+
faMessage,
|
|
8
|
+
faPlane,
|
|
9
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
10
|
+
import { ReactProps, Tab, Tabs, TabsInterface, TabsVariant } from '../../../';
|
|
11
|
+
|
|
12
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
13
|
+
const meta = {
|
|
14
|
+
title: 'Navigation/Tabs',
|
|
15
|
+
component: Tabs,
|
|
16
|
+
parameters: {
|
|
17
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
18
|
+
},
|
|
19
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
20
|
+
tags: ['autodocs'],
|
|
21
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
22
|
+
argTypes: {},
|
|
23
|
+
} satisfies Meta<typeof Tabs>;
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
|
|
28
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
29
|
+
|
|
30
|
+
const createTabStory = (
|
|
31
|
+
variant?: TabsVariant,
|
|
32
|
+
args?: Partial<ReactProps<TabsInterface>>,
|
|
33
|
+
) => {
|
|
34
|
+
const tabStory: Story = (args: ReactProps<TabsInterface>) => (
|
|
35
|
+
<div className="w-full flex flex-col gap-8">
|
|
36
|
+
<Tabs {...args} onTabSelected={(tab: any) => console.log(tab)}>
|
|
37
|
+
{
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
args.children.map((child) => child)
|
|
40
|
+
}
|
|
41
|
+
</Tabs>
|
|
42
|
+
<Tabs scrollable {...args} onTabSelected={(tab: any) => console.log(tab)}>
|
|
43
|
+
{
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
args.children.map((child) => child)
|
|
46
|
+
}
|
|
47
|
+
{
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
args.children.slice(1).map((child) => child)
|
|
50
|
+
}
|
|
51
|
+
</Tabs>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
tabStory.args = {
|
|
56
|
+
variant,
|
|
57
|
+
children: [
|
|
58
|
+
<Tab label={'Explorer'} selected></Tab>,
|
|
59
|
+
<Tab label={'Favoris'}></Tab>,
|
|
60
|
+
<Tab label={'Voyages'}></Tab>,
|
|
61
|
+
<Tab label={'Messages'}></Tab>,
|
|
62
|
+
<Tab label={'Profil'}></Tab>,
|
|
63
|
+
],
|
|
64
|
+
...args,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return tabStory;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const PrimaryLabelOnly = createTabStory('primary');
|
|
71
|
+
|
|
72
|
+
export const PrimaryIconAndLabel = createTabStory('primary', {
|
|
73
|
+
children: [
|
|
74
|
+
<Tab label={'Explorer'} icon={faMagnifyingGlass} selected />,
|
|
75
|
+
<Tab label={'Favoris'} icon={faHeart} />,
|
|
76
|
+
<Tab label={'Voyages'} icon={faPlane} />,
|
|
77
|
+
<Tab label={'Messages'} icon={faMessage} />,
|
|
78
|
+
<Tab label={'Profil'} icon={faCircleUser} />,
|
|
79
|
+
],
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const PrimaryIconOnly = createTabStory('primary', {
|
|
83
|
+
children: [
|
|
84
|
+
<Tab icon={faMagnifyingGlass} selected />,
|
|
85
|
+
<Tab icon={faHeart} />,
|
|
86
|
+
<Tab icon={faPlane} />,
|
|
87
|
+
<Tab icon={faMessage} />,
|
|
88
|
+
<Tab icon={faCircleUser} />,
|
|
89
|
+
],
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export const SecondaryLabelOnly = createTabStory('secondary');
|
|
93
|
+
|
|
94
|
+
export const SecondaryIconAndLabel = createTabStory('secondary', {
|
|
95
|
+
children: [
|
|
96
|
+
<Tab label={'Explorer'} icon={faMagnifyingGlass} selected />,
|
|
97
|
+
<Tab label={'Favoris'} icon={faHeart} />,
|
|
98
|
+
<Tab label={'Voyages'} icon={faPlane} />,
|
|
99
|
+
<Tab label={'Messages'} icon={faMessage} />,
|
|
100
|
+
<Tab label={'Profil'} icon={faCircleUser} />,
|
|
101
|
+
],
|
|
102
|
+
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ReactProps, Slider, SliderInterface } from '../../';
|
|
3
|
+
|
|
4
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Selection/Slider',
|
|
7
|
+
component: Slider,
|
|
8
|
+
parameters: {
|
|
9
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
10
|
+
},
|
|
11
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
14
|
+
} satisfies Meta<typeof Slider>;
|
|
15
|
+
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
|
|
19
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
20
|
+
|
|
21
|
+
const createSliderStory = (args?: Partial<ReactProps<SliderInterface>>) => {
|
|
22
|
+
const sliderStory: Story = (args: ReactProps<SliderInterface>) => (
|
|
23
|
+
<div className="">
|
|
24
|
+
<div className="flex flex-col m-4 gap-4 items-center">
|
|
25
|
+
<Slider value={0} min={0} max={100} step={1} {...args} />
|
|
26
|
+
<Slider value={50} min={0} max={100} step={1} {...args} />
|
|
27
|
+
<Slider value={100} min={0} max={100} step={1} {...args} />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
sliderStory.args = {
|
|
32
|
+
name: 'test',
|
|
33
|
+
...args,
|
|
34
|
+
};
|
|
35
|
+
return sliderStory;
|
|
36
|
+
};
|
|
37
|
+
export const continuousSlider = createSliderStory({});
|
|
38
|
+
export const discreteSlider = createSliderStory({
|
|
39
|
+
marks: [
|
|
40
|
+
{
|
|
41
|
+
value: 0,
|
|
42
|
+
label: '0%',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
value: 10,
|
|
46
|
+
label: '10%',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
value: 20,
|
|
50
|
+
label: '20%',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
value: 30,
|
|
54
|
+
label: '30%',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
value: 40,
|
|
58
|
+
label: '40%',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
value: 50,
|
|
62
|
+
label: '50%',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
value: 60,
|
|
66
|
+
label: '60%',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
value: 70,
|
|
70
|
+
label: '70%',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
value: 80,
|
|
74
|
+
label: '80%',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
value: 90,
|
|
78
|
+
label: '90%',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
value: 100,
|
|
82
|
+
label: '100%',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ReactProps, Switch, SwitchInterface } from '../../';
|
|
3
|
+
import { faCheck, faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
|
|
5
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Selection/Switch',
|
|
8
|
+
component: Switch,
|
|
9
|
+
parameters: {
|
|
10
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
11
|
+
},
|
|
12
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
15
|
+
} satisfies Meta<typeof Switch>;
|
|
16
|
+
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
|
|
20
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
21
|
+
|
|
22
|
+
const createSwitchStory = (args?: Partial<ReactProps<SwitchInterface>>) => {
|
|
23
|
+
const switchStory: Story = (args: ReactProps<SwitchInterface>) => (
|
|
24
|
+
<div className="">
|
|
25
|
+
<div className="flex m-4 gap-4 items-center">
|
|
26
|
+
<Switch {...args} />
|
|
27
|
+
<Switch disabled {...args} />
|
|
28
|
+
</div>
|
|
29
|
+
<div className="flex m-4 gap-4 items-center">
|
|
30
|
+
<Switch activeIcon={faCheck} inactiveIcon={faXmark} {...args} />
|
|
31
|
+
<Switch
|
|
32
|
+
activeIcon={faCheck}
|
|
33
|
+
inactiveIcon={faXmark}
|
|
34
|
+
disabled
|
|
35
|
+
{...args}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
switchStory.args = {
|
|
41
|
+
...args,
|
|
42
|
+
};
|
|
43
|
+
return switchStory;
|
|
44
|
+
};
|
|
45
|
+
export const switchSelected = createSwitchStory({ selected: true });
|
|
46
|
+
export const switchUnselected = createSwitchStory({ selected: false });
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
5
|
+
import {
|
|
6
|
+
faCircleXmark,
|
|
7
|
+
faMagnifyingGlass,
|
|
8
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
9
|
+
import {
|
|
10
|
+
IconButton,
|
|
11
|
+
ReactProps,
|
|
12
|
+
TextField,
|
|
13
|
+
TextFieldInterface,
|
|
14
|
+
TextFieldVariant,
|
|
15
|
+
} from '../../';
|
|
16
|
+
|
|
17
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
18
|
+
const meta = {
|
|
19
|
+
title: 'Text Inputs/TextField',
|
|
20
|
+
component: TextField,
|
|
21
|
+
parameters: {
|
|
22
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
23
|
+
},
|
|
24
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
25
|
+
tags: ['autodocs'],
|
|
26
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
27
|
+
argTypes: {},
|
|
28
|
+
} satisfies Meta<typeof TextField>;
|
|
29
|
+
|
|
30
|
+
export default meta;
|
|
31
|
+
type Story = StoryObj<typeof meta>;
|
|
32
|
+
|
|
33
|
+
// Function to create TextField stories
|
|
34
|
+
const createTextFieldStory = (
|
|
35
|
+
variant: TextFieldVariant,
|
|
36
|
+
args?: Partial<ReactProps<TextFieldInterface>>,
|
|
37
|
+
) => {
|
|
38
|
+
const TextFieldStory: Story = (args: ReactProps<TextFieldInterface>) => (
|
|
39
|
+
<div className="">
|
|
40
|
+
<div className="flex m-4 gap-4 items-center">
|
|
41
|
+
<TextField {...args} name={'example' + uuidv4()} value="Input" />
|
|
42
|
+
<TextField
|
|
43
|
+
{...args}
|
|
44
|
+
name={'example' + uuidv4()}
|
|
45
|
+
value="Input"
|
|
46
|
+
errorText="invalid value"
|
|
47
|
+
/>
|
|
48
|
+
<TextField
|
|
49
|
+
{...args}
|
|
50
|
+
name={'example' + uuidv4()}
|
|
51
|
+
value="Input"
|
|
52
|
+
disabled
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
<div className="flex m-4 gap-4 items-center">
|
|
56
|
+
<TextField {...args} name={'example' + uuidv4()} />
|
|
57
|
+
<TextField
|
|
58
|
+
{...args}
|
|
59
|
+
name={'example' + uuidv4()}
|
|
60
|
+
errorText="invalid value"
|
|
61
|
+
/>
|
|
62
|
+
<TextField {...args} name={'example' + uuidv4()} disabled />
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
TextFieldStory.args = {
|
|
67
|
+
variant: variant,
|
|
68
|
+
label: 'Label',
|
|
69
|
+
placeholder: 'Placeholder',
|
|
70
|
+
supportingText: 'Supporting text',
|
|
71
|
+
...args,
|
|
72
|
+
};
|
|
73
|
+
return TextFieldStory;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const Filled = createTextFieldStory('filled');
|
|
77
|
+
|
|
78
|
+
export const FilledTrailingIcon = createTextFieldStory('filled', {
|
|
79
|
+
trailingIcon: (
|
|
80
|
+
<IconButton
|
|
81
|
+
onClick={() => console.log('clicked')}
|
|
82
|
+
arialLabel="Action description"
|
|
83
|
+
icon={faCircleXmark}
|
|
84
|
+
/>
|
|
85
|
+
),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export const FilledLealingIconAndTrailingIcon = createTextFieldStory('filled', {
|
|
89
|
+
leadingIcon: faMagnifyingGlass,
|
|
90
|
+
trailingIcon: (
|
|
91
|
+
<IconButton
|
|
92
|
+
onClick={() => console.log('clicked')}
|
|
93
|
+
arialLabel="Action description"
|
|
94
|
+
icon={faCircleXmark}
|
|
95
|
+
/>
|
|
96
|
+
),
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export const FilledLealingIcon = createTextFieldStory('filled', {
|
|
100
|
+
leadingIcon: faMagnifyingGlass,
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export const Outlined = createTextFieldStory('outlined');
|
|
104
|
+
|
|
105
|
+
export const OutlinedTrailingIcon = createTextFieldStory('outlined', {
|
|
106
|
+
trailingIcon: (
|
|
107
|
+
<IconButton
|
|
108
|
+
onClick={() => console.log('clicked')}
|
|
109
|
+
arialLabel="Action description"
|
|
110
|
+
icon={faCircleXmark}
|
|
111
|
+
/>
|
|
112
|
+
),
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export const OutlinedLealingIconAndTrailingIcon = createTextFieldStory(
|
|
116
|
+
'outlined',
|
|
117
|
+
{
|
|
118
|
+
leadingIcon: faMagnifyingGlass,
|
|
119
|
+
trailingIcon: (
|
|
120
|
+
<IconButton
|
|
121
|
+
onClick={() => console.log('clicked')}
|
|
122
|
+
arialLabel="Action description"
|
|
123
|
+
icon={faCircleXmark}
|
|
124
|
+
/>
|
|
125
|
+
),
|
|
126
|
+
},
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
export const OutlinedLealingIcon = createTextFieldStory('outlined', {
|
|
130
|
+
leadingIcon: faMagnifyingGlass,
|
|
131
|
+
className: () => ({
|
|
132
|
+
textField: 'w-full md:w-fit md:flex-1 ',
|
|
133
|
+
content: 'rounded-full overflow-hidden bg-surface',
|
|
134
|
+
}),
|
|
135
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { fireEvent, render, screen } from '@testing-library/react';
|
|
3
|
+
import { Button } from '../lib/index.js';
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
|
+
import { vi } from 'vitest';
|
|
6
|
+
import { faPlus } from '@fortawesome/free-solid-svg-icons';
|
|
7
|
+
|
|
8
|
+
describe('Button', () => {
|
|
9
|
+
it('renders correctly with default props', () => {
|
|
10
|
+
render(<Button label="Test Button" />);
|
|
11
|
+
|
|
12
|
+
const button = screen.getByText('Test Button');
|
|
13
|
+
expect(button).toBeInTheDocument();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('disables the button when disabled prop is true', () => {
|
|
17
|
+
render(<Button label="Test Button" disabled />);
|
|
18
|
+
|
|
19
|
+
const button = screen.getByText('Test Button').closest('button');
|
|
20
|
+
expect(button).toBeDisabled();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('calls onClick handler when clicked', () => {
|
|
24
|
+
const handleClick = vi.fn();
|
|
25
|
+
render(<Button label="Test Button" onClick={handleClick} />);
|
|
26
|
+
|
|
27
|
+
const button = screen.getByText('Test Button');
|
|
28
|
+
fireEvent.click(button);
|
|
29
|
+
|
|
30
|
+
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('does not call onClick handler when disabled', () => {
|
|
34
|
+
const handleClick = vi.fn();
|
|
35
|
+
render(<Button label="Test Button" onClick={handleClick} disabled />);
|
|
36
|
+
|
|
37
|
+
const button = screen.getByText('Test Button');
|
|
38
|
+
fireEvent.click(button);
|
|
39
|
+
|
|
40
|
+
expect(handleClick).not.toHaveBeenCalled();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('renders with an icon when icon prop is provided', () => {
|
|
44
|
+
render(<Button label="Test Button" icon={faPlus} />);
|
|
45
|
+
|
|
46
|
+
// This is a mock test, so we're not actually checking for the icon
|
|
47
|
+
// In a real test, you would check for the icon element
|
|
48
|
+
const button = screen.getByText('Test Button').closest('button');
|
|
49
|
+
expect(button).toBeInTheDocument();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('renders as an anchor tag when href is provided', () => {
|
|
53
|
+
render(<Button label="Test Button" href="https://example.com" />);
|
|
54
|
+
|
|
55
|
+
const link = screen.getByText('Test Button').closest('a');
|
|
56
|
+
expect(link).toHaveAttribute('href', 'https://example.com');
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('shows loading indicator when loading prop is true', () => {
|
|
60
|
+
render(<Button label="Test Button" loading />);
|
|
61
|
+
|
|
62
|
+
// This is a mock test, so we're not actually checking for the loading indicator
|
|
63
|
+
// In a real test, you would check for the ProgressIndicator component
|
|
64
|
+
const button = screen.getByText('Test Button').closest('button');
|
|
65
|
+
expect(button).toBeInTheDocument();
|
|
66
|
+
});
|
|
67
|
+
});
|
package/src/udixio.css
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
|
|
2
|
+
@plugin "@udixio/tailwind" {
|
|
3
|
+
colorKeys: surface, surface-dim, surface-bright, surface-container-lowest, surface-container-low, surface-container, surface-container-high, surface-container-highest, on-surface, on-surface-variant, outline, outline-variant, inverse-surface, inverse-on-surface, primary, primary-dim, on-primary, primary-container, on-primary-container, primary-fixed, primary-fixed-dim, on-primary-fixed, on-primary-fixed-variant, inverse-primary, secondary, secondary-dim, on-secondary, secondary-container, on-secondary-container, secondary-fixed, secondary-fixed-dim, on-secondary-fixed, on-secondary-fixed-variant, tertiary, tertiary-dim, on-tertiary, tertiary-container, on-tertiary-container, tertiary-fixed, tertiary-fixed-dim, on-tertiary-fixed, on-tertiary-fixed-variant, error, error-dim, on-error, error-container, on-error-container, surface-variant, surface-tint, background, on-background;
|
|
4
|
+
fontStyles: display-large fontWeight[400] fontSize[3.5625] lineHeight[4] letterSpacing[-0.015625] fontFamily[expressive], display-medium fontWeight[400] fontSize[2.8125] lineHeight[3.25] fontFamily[expressive], display-small fontWeight[400] fontSize[2.25] lineHeight[2.75] fontFamily[expressive], headline-large fontWeight[400] fontSize[2] lineHeight[2.5] fontFamily[expressive], headline-medium fontWeight[400] fontSize[1.75] lineHeight[2.25] fontFamily[expressive], headline-small fontWeight[400] fontSize[1.5] lineHeight[2] fontFamily[expressive], title-large fontWeight[400] fontSize[1.375] lineHeight[1.75] fontFamily[neutral], title-medium fontWeight[500] fontSize[1] lineHeight[1.5] fontFamily[neutral] letterSpacing[0.009375], title-small fontWeight[500] fontSize[0.875] lineHeight[1.25] fontFamily[neutral] letterSpacing[0.00625], label-large fontWeight[500] fontSize[0.875] lineHeight[1.25] fontFamily[neutral] letterSpacing[0.00625], label-medium fontWeight[500] fontSize[0.75] lineHeight[1] fontFamily[neutral] letterSpacing[0.03125], label-small fontWeight[500] fontSize[0.6875] lineHeight[1] fontFamily[neutral] letterSpacing[0.03125], body-large fontWeight[400] fontSize[1] lineHeight[1.5625] fontFamily[neutral] letterSpacing[0.03125], body-medium fontWeight[400] fontSize[0.875] lineHeight[1.25] fontFamily[neutral] letterSpacing[0.015625], body-small fontWeight[400] fontSize[0.75] lineHeight[1] fontFamily[neutral] letterSpacing[0.025];
|
|
5
|
+
responsiveBreakPoints: lg 1.125;
|
|
6
|
+
}
|
|
7
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
8
|
+
@theme {
|
|
9
|
+
--color-*: initial;
|
|
10
|
+
--color-surface: #fdf7fe;
|
|
11
|
+
--color-surface-dim: #ded8e4;
|
|
12
|
+
--color-surface-bright: #fdf7fe;
|
|
13
|
+
--color-surface-container-lowest: #ffffff;
|
|
14
|
+
--color-surface-container-low: #f8f1fa;
|
|
15
|
+
--color-surface-container: #f2ecf5;
|
|
16
|
+
--color-surface-container-high: #ece6f0;
|
|
17
|
+
--color-surface-container-highest: #e7e0ec;
|
|
18
|
+
--color-on-surface: #34313a;
|
|
19
|
+
--color-on-surface-variant: #625c6f;
|
|
20
|
+
--color-outline: #7e788c;
|
|
21
|
+
--color-outline-variant: #b6aec4;
|
|
22
|
+
--color-inverse-surface: #0f0d12;
|
|
23
|
+
--color-inverse-on-surface: #f5eff5;
|
|
24
|
+
--color-primary: #655789;
|
|
25
|
+
--color-primary-dim: #594b7c;
|
|
26
|
+
--color-on-primary: #fdf7ff;
|
|
27
|
+
--color-primary-container: #d4c3fd;
|
|
28
|
+
--color-on-primary-container: #493c6c;
|
|
29
|
+
--color-primary-fixed: #d4c3fd;
|
|
30
|
+
--color-primary-fixed-dim: #c6b6ee;
|
|
31
|
+
--color-on-primary-fixed: #352857;
|
|
32
|
+
--color-on-primary-fixed-variant: #524576;
|
|
33
|
+
--color-inverse-primary: #d4c3fd;
|
|
34
|
+
--color-secondary: #625c71;
|
|
35
|
+
--color-secondary-dim: #565065;
|
|
36
|
+
--color-on-secondary: #fdf7ff;
|
|
37
|
+
--color-secondary-container: #e8def8;
|
|
38
|
+
--color-on-secondary-container: #554f63;
|
|
39
|
+
--color-secondary-fixed: #e8def8;
|
|
40
|
+
--color-secondary-fixed-dim: #dad0ea;
|
|
41
|
+
--color-on-secondary-fixed: #423c50;
|
|
42
|
+
--color-on-secondary-fixed-variant: #5f586e;
|
|
43
|
+
--color-tertiary: #7b5270;
|
|
44
|
+
--color-tertiary-dim: #6e4664;
|
|
45
|
+
--color-on-tertiary: #fff7f9;
|
|
46
|
+
--color-tertiary-container: #f4bfe3;
|
|
47
|
+
--color-on-tertiary-container: #5f3956;
|
|
48
|
+
--color-tertiary-fixed: #f4bfe3;
|
|
49
|
+
--color-tertiary-fixed-dim: #e5b2d5;
|
|
50
|
+
--color-on-tertiary-fixed: #4a2642;
|
|
51
|
+
--color-on-tertiary-fixed-variant: #694260;
|
|
52
|
+
--color-error: #a8364b;
|
|
53
|
+
--color-error-dim: #6b0221;
|
|
54
|
+
--color-on-error: #fff7f7;
|
|
55
|
+
--color-error-container: #f97386;
|
|
56
|
+
--color-on-error-container: #6e0523;
|
|
57
|
+
--color-surface-variant: #e7e0ec;
|
|
58
|
+
--color-surface-tint: #655789;
|
|
59
|
+
--color-background: #fdf7fe;
|
|
60
|
+
--color-on-background: #34313a;
|
|
61
|
+
}
|
|
62
|
+
@layer theme {
|
|
63
|
+
.dark {
|
|
64
|
+
--color-surface: #0f0d12;
|
|
65
|
+
--color-surface-dim: #0f0d12;
|
|
66
|
+
--color-surface-bright: #2e2b34;
|
|
67
|
+
--color-surface-container-lowest: #000000;
|
|
68
|
+
--color-surface-container-low: #141218;
|
|
69
|
+
--color-surface-container: #1b181f;
|
|
70
|
+
--color-surface-container-high: #211e26;
|
|
71
|
+
--color-surface-container-highest: #27242d;
|
|
72
|
+
--color-on-surface: #eae3ef;
|
|
73
|
+
--color-on-surface-variant: #afa8bd;
|
|
74
|
+
--color-outline: #797286;
|
|
75
|
+
--color-outline-variant: #4b4557;
|
|
76
|
+
--color-inverse-surface: #fdf7fe;
|
|
77
|
+
--color-inverse-on-surface: #322f34;
|
|
78
|
+
--color-primary: #cdc0ec;
|
|
79
|
+
--color-primary-dim: #bfb2de;
|
|
80
|
+
--color-on-primary: #443a5f;
|
|
81
|
+
--color-primary-container: #574d72;
|
|
82
|
+
--color-on-primary-container: #e9deff;
|
|
83
|
+
--color-primary-fixed: #ded0fe;
|
|
84
|
+
--color-primary-fixed-dim: #d0c3ef;
|
|
85
|
+
--color-on-primary-fixed: #3c3256;
|
|
86
|
+
--color-on-primary-fixed-variant: #594e74;
|
|
87
|
+
--color-inverse-primary: #645980;
|
|
88
|
+
--color-secondary: #cbc2db;
|
|
89
|
+
--color-secondary-dim: #beb5cd;
|
|
90
|
+
--color-on-secondary: #433d51;
|
|
91
|
+
--color-secondary-container: #3e384c;
|
|
92
|
+
--color-on-secondary-container: #c4bbd4;
|
|
93
|
+
--color-secondary-fixed: #e8def8;
|
|
94
|
+
--color-secondary-fixed-dim: #dad0ea;
|
|
95
|
+
--color-on-secondary-fixed: #423c50;
|
|
96
|
+
--color-on-secondary-fixed-variant: #5f586e;
|
|
97
|
+
--color-tertiary: #ffcfef;
|
|
98
|
+
--color-tertiary-dim: #f4bfe3;
|
|
99
|
+
--color-on-tertiary: #69415f;
|
|
100
|
+
--color-tertiary-container: #f4bfe3;
|
|
101
|
+
--color-on-tertiary-container: #5f3956;
|
|
102
|
+
--color-tertiary-fixed: #f4bfe3;
|
|
103
|
+
--color-tertiary-fixed-dim: #e5b2d5;
|
|
104
|
+
--color-on-tertiary-fixed: #4a2642;
|
|
105
|
+
--color-on-tertiary-fixed-variant: #694260;
|
|
106
|
+
--color-error: #f97386;
|
|
107
|
+
--color-error-dim: #c44b5f;
|
|
108
|
+
--color-on-error: #490013;
|
|
109
|
+
--color-error-container: #871c34;
|
|
110
|
+
--color-on-error-container: #ff97a3;
|
|
111
|
+
--color-surface-variant: #27242d;
|
|
112
|
+
--color-surface-tint: #cdc0ec;
|
|
113
|
+
--color-background: #0f0d12;
|
|
114
|
+
--color-on-background: #eae3ef;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
@theme {
|
|
118
|
+
--font-expressive: "Roboto", "sans-serif";
|
|
119
|
+
--font-neutral: "Roboto", "sans-serif";
|
|
120
|
+
}
|
package/theme.config.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"files": [],
|
|
4
|
+
"include": [],
|
|
5
|
+
"references": [
|
|
6
|
+
{
|
|
7
|
+
"path": "../tailwind"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"path": "../theme"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"path": "./tsconfig.lib.json"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"path": "./tsconfig.spec.json"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"path": "./tsconfig.storybook.json"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"baseUrl": ".",
|
|
5
|
+
"rootDir": "src",
|
|
6
|
+
"outDir": "dist",
|
|
7
|
+
"tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo",
|
|
8
|
+
"emitDeclarationOnly": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"jsx": "react-jsx",
|
|
11
|
+
"types": [
|
|
12
|
+
"node",
|
|
13
|
+
"vite/client"
|
|
14
|
+
],
|
|
15
|
+
"lib": [
|
|
16
|
+
"es2022",
|
|
17
|
+
"dom",
|
|
18
|
+
"dom.iterable"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"include": [
|
|
22
|
+
"src/**/*.ts",
|
|
23
|
+
"src/**/*.tsx"
|
|
24
|
+
],
|
|
25
|
+
"references": [
|
|
26
|
+
{
|
|
27
|
+
"path": "../tailwind/tsconfig.lib.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../theme/tsconfig.lib.json"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"exclude": [
|
|
34
|
+
"vite.config.ts",
|
|
35
|
+
"vite.config.mts",
|
|
36
|
+
"vitest.config.ts",
|
|
37
|
+
"vitest.config.mts",
|
|
38
|
+
"src/**/*.test.ts",
|
|
39
|
+
"src/**/*.spec.ts",
|
|
40
|
+
"src/**/*.test.tsx",
|
|
41
|
+
"src/**/*.spec.tsx",
|
|
42
|
+
"src/**/*.test.js",
|
|
43
|
+
"src/**/*.spec.js",
|
|
44
|
+
"src/**/*.test.jsx",
|
|
45
|
+
"src/**/*.spec.jsx",
|
|
46
|
+
"**/*.stories.ts",
|
|
47
|
+
"**/*.stories.js",
|
|
48
|
+
"**/*.stories.jsx",
|
|
49
|
+
"**/*.stories.tsx"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./out-tsc/vitest",
|
|
5
|
+
"types": [
|
|
6
|
+
"vitest/globals",
|
|
7
|
+
"vitest/importMeta",
|
|
8
|
+
"vite/client",
|
|
9
|
+
"node",
|
|
10
|
+
"vitest"
|
|
11
|
+
],
|
|
12
|
+
"module": "nodenext",
|
|
13
|
+
"moduleResolution": "nodenext",
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"jsx": "react-jsx"
|
|
16
|
+
},
|
|
17
|
+
"include": [
|
|
18
|
+
"vite.config.ts",
|
|
19
|
+
"vite.config.mts",
|
|
20
|
+
"vitest.config.ts",
|
|
21
|
+
"vitest.config.mts",
|
|
22
|
+
"src/**/*.test.ts",
|
|
23
|
+
"src/**/*.spec.ts",
|
|
24
|
+
"src/**/*.test.tsx",
|
|
25
|
+
"src/**/*.spec.tsx",
|
|
26
|
+
"src/**/*.test.js",
|
|
27
|
+
"src/**/*.spec.js",
|
|
28
|
+
"src/**/*.test.jsx",
|
|
29
|
+
"src/**/*.spec.jsx",
|
|
30
|
+
"src/**/*.d.ts"
|
|
31
|
+
],
|
|
32
|
+
"references": [
|
|
33
|
+
{
|
|
34
|
+
"path": "./tsconfig.lib.json"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|