@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,4 @@
|
|
|
1
|
+
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M31.3313 8.44657C30.9633 7.08998 29.8791 6.02172 28.5022 5.65916C26.0067 5.00026 16 5.00026 16 5.00026C16 5.00026 5.99333 5.00026 3.4978 5.65916C2.12102 6.02172 1.03665 7.08998 0.668678 8.44657C0 10.9053 0 16.0353 0 16.0353C0 16.0353 0 21.1652 0.668678 23.6242C1.03665 24.9806 2.12102 26.0489 3.4978 26.4116C5.99333 27.0703 16 27.0703 16 27.0703C16 27.0703 26.0067 27.0703 28.5022 26.4116C29.8791 26.0489 30.9633 24.9806 31.3313 23.6242C32 21.1652 32 16.0353 32 16.0353C32 16.0353 32 10.9053 31.3313 8.44657Z" fill="#ED1D24"/>
|
|
3
|
+
<path d="M12.7266 20.6934L21.0902 16.036L12.7266 11.3781V20.6934Z" fill="white"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import {
|
|
4
|
+
ProgressIndicator,
|
|
5
|
+
ProgressIndicatorInterface,
|
|
6
|
+
ProgressIndicatorVariant,
|
|
7
|
+
ReactProps,
|
|
8
|
+
} from '../../';
|
|
9
|
+
|
|
10
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
11
|
+
const meta = {
|
|
12
|
+
title: 'Communication/ProgressIndicator',
|
|
13
|
+
component: ProgressIndicator,
|
|
14
|
+
parameters: {
|
|
15
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
16
|
+
},
|
|
17
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
20
|
+
argTypes: {},
|
|
21
|
+
} satisfies Meta<typeof ProgressIndicator>;
|
|
22
|
+
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
|
|
26
|
+
// Function to create ProgressIndicatorComponent stories
|
|
27
|
+
const createProgressIndicatorStory = (variant: ProgressIndicatorVariant) => {
|
|
28
|
+
const ProgressIndicatorStory: Story = (
|
|
29
|
+
args: ReactProps<ProgressIndicatorInterface>,
|
|
30
|
+
) => (
|
|
31
|
+
<div className="">
|
|
32
|
+
<div className="flex m-4 gap-4 items-center">
|
|
33
|
+
<ProgressIndicator {...args} />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
ProgressIndicatorStory.args = {
|
|
38
|
+
variant: variant,
|
|
39
|
+
value: 50,
|
|
40
|
+
};
|
|
41
|
+
return ProgressIndicatorStory;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const LinearDeterminate =
|
|
45
|
+
createProgressIndicatorStory('linear-determinate');
|
|
46
|
+
|
|
47
|
+
LinearDeterminate.argTypes = {
|
|
48
|
+
value: { control: { type: 'range', min: 0, max: 100 } },
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const CircularIndeterminate = createProgressIndicatorStory(
|
|
52
|
+
'circular-indeterminate',
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
CircularIndeterminate.argTypes = {
|
|
56
|
+
value: { control: { type: 'range', min: 0, max: 100 } },
|
|
57
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactProps, Snackbar, SnackbarInterface } from '../../';
|
|
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: 'Communication/Snackbar',
|
|
8
|
+
component: Snackbar,
|
|
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
|
+
argTypes: {},
|
|
16
|
+
} satisfies Meta<typeof Snackbar>;
|
|
17
|
+
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
|
|
21
|
+
// Function to create Snackbar stories
|
|
22
|
+
const createSnackbarStory = (supportingText: string) => {
|
|
23
|
+
const SnackbarStory: Story = (args: ReactProps<SnackbarInterface>) => (
|
|
24
|
+
<Snackbar {...args} />
|
|
25
|
+
);
|
|
26
|
+
SnackbarStory.args = {
|
|
27
|
+
supportingText: supportingText,
|
|
28
|
+
};
|
|
29
|
+
return SnackbarStory;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const SingleLineSnackbar = createSnackbarStory('Single-line snackbar');
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Button, ReactProps, ToolTip, ToolTipInterface } from '../../lib';
|
|
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: 'Communication/ToolTip',
|
|
7
|
+
component: ToolTip,
|
|
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
|
+
argTypes: {},
|
|
15
|
+
} satisfies Meta<typeof ToolTip>;
|
|
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 createToolTipStory = (
|
|
23
|
+
variant: ReactProps<ToolTipInterface>['variant'],
|
|
24
|
+
auto = false,
|
|
25
|
+
) => {
|
|
26
|
+
const ToolTipStory: Story = (args: ReactProps<ToolTipInterface>) => (
|
|
27
|
+
<div className="h-96 relative">
|
|
28
|
+
<div className="h-96 relative">
|
|
29
|
+
<div className="absolute top-0 left-0">
|
|
30
|
+
<ToolTip
|
|
31
|
+
position="bottom-right"
|
|
32
|
+
{...args}
|
|
33
|
+
text="Cliquez pour plus d'infos"
|
|
34
|
+
title="Info rapide"
|
|
35
|
+
>
|
|
36
|
+
<Button variant={'filledTonal'} label={'Bottom-right'}></Button>
|
|
37
|
+
</ToolTip>
|
|
38
|
+
</div>
|
|
39
|
+
<div className="absolute top-0 left-1/2 -translate-x-1/2">
|
|
40
|
+
<ToolTip
|
|
41
|
+
position="bottom"
|
|
42
|
+
{...args}
|
|
43
|
+
text="Cet élément représente les statistiques globales de votre projet."
|
|
44
|
+
title="Statistiques"
|
|
45
|
+
>
|
|
46
|
+
<Button variant={'filledTonal'} label={'Bottom-center'}></Button>
|
|
47
|
+
</ToolTip>
|
|
48
|
+
</div>
|
|
49
|
+
<div className="absolute top-0 right-0">
|
|
50
|
+
<ToolTip
|
|
51
|
+
position="bottom-left"
|
|
52
|
+
{...args}
|
|
53
|
+
text="Cliquez ici pour télécharger le fichier associé."
|
|
54
|
+
title="Téléchargement"
|
|
55
|
+
>
|
|
56
|
+
<Button variant={'filledTonal'} label={'Bottom-left'}></Button>
|
|
57
|
+
</ToolTip>
|
|
58
|
+
</div>
|
|
59
|
+
<div className="absolute top-1/2 left-0 -translate-y-1/2">
|
|
60
|
+
<ToolTip
|
|
61
|
+
position="right"
|
|
62
|
+
{...args}
|
|
63
|
+
text="Cette action ne peut pas être annulée une fois confirmée."
|
|
64
|
+
title="Attention"
|
|
65
|
+
>
|
|
66
|
+
<Button variant={'filledTonal'} label={'Center-right'}></Button>
|
|
67
|
+
</ToolTip>
|
|
68
|
+
</div>
|
|
69
|
+
<div className="absolute top-1/2 right-0 -translate-y-1/2">
|
|
70
|
+
<ToolTip
|
|
71
|
+
position="left"
|
|
72
|
+
{...args}
|
|
73
|
+
text="Modifiez les paramètres dans l'onglet dédié à la personnalisation."
|
|
74
|
+
title="Personnalisation"
|
|
75
|
+
>
|
|
76
|
+
<Button variant={'filledTonal'} label={'Center-left'}></Button>
|
|
77
|
+
</ToolTip>
|
|
78
|
+
</div>
|
|
79
|
+
<div className="absolute bottom-0 left-0">
|
|
80
|
+
<ToolTip
|
|
81
|
+
position="top-right"
|
|
82
|
+
{...args}
|
|
83
|
+
text="L'action demandée supprimera toutes les données correspondantes."
|
|
84
|
+
title="Suppression de données"
|
|
85
|
+
>
|
|
86
|
+
<Button variant={'filledTonal'} label={'Top-right'}></Button>
|
|
87
|
+
</ToolTip>
|
|
88
|
+
</div>
|
|
89
|
+
<div className="absolute bottom-0 left-1/2 -translate-x-1/2">
|
|
90
|
+
<ToolTip
|
|
91
|
+
position="top"
|
|
92
|
+
{...args}
|
|
93
|
+
text="Double-cliquez pour agrandir l'aperçu de l'élément sélectionné."
|
|
94
|
+
title="Aperçu"
|
|
95
|
+
>
|
|
96
|
+
<Button variant={'filledTonal'} label={'Top-center'}></Button>
|
|
97
|
+
</ToolTip>
|
|
98
|
+
</div>
|
|
99
|
+
<div className="absolute bottom-0 right-0">
|
|
100
|
+
<ToolTip
|
|
101
|
+
position="top-left"
|
|
102
|
+
{...args}
|
|
103
|
+
text="Passez la souris sur d'autres icônes pour plus de détails."
|
|
104
|
+
title="Icones et navigation"
|
|
105
|
+
>
|
|
106
|
+
<Button variant={'filledTonal'} label={'Top-left'}></Button>
|
|
107
|
+
</ToolTip>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
);
|
|
112
|
+
ToolTipStory.args = {
|
|
113
|
+
variant: variant,
|
|
114
|
+
title: 'Title',
|
|
115
|
+
text: 'Supporting line text lorem ipsum dolor sit amet, consectetur',
|
|
116
|
+
buttons: [
|
|
117
|
+
{
|
|
118
|
+
label: 'Label',
|
|
119
|
+
onClick: () => {},
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
label: 'Label',
|
|
123
|
+
onClick: () => {},
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
...(auto ? { position: undefined } : {}),
|
|
127
|
+
};
|
|
128
|
+
return ToolTipStory;
|
|
129
|
+
};
|
|
130
|
+
export const Plain = createToolTipStory('plain');
|
|
131
|
+
export const PlainAuto = createToolTipStory('plain', true);
|
|
132
|
+
export const Rich = createToolTipStory('rich');
|
|
133
|
+
export const RichAuto = createToolTipStory('rich', true);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Card, CardInterface, ReactProps } 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: 'containment/Card',
|
|
7
|
+
component: Card,
|
|
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
|
+
argTypes: {},
|
|
15
|
+
} satisfies Meta<typeof Card>;
|
|
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 createCardStory = (variant: ReactProps<CardInterface>['variant']) => {
|
|
23
|
+
const CardStory: Story = (args: ReactProps<CardInterface>) => (
|
|
24
|
+
<>
|
|
25
|
+
<Card className={'w-[360px] h-[360px]'} {...args}></Card>
|
|
26
|
+
<a className={'group'} href={'https://example.com/'} target={'_blank'}>
|
|
27
|
+
<Card
|
|
28
|
+
isInteractive={true}
|
|
29
|
+
className={'w-[360px] h-[360px]'}
|
|
30
|
+
{...args}
|
|
31
|
+
></Card>
|
|
32
|
+
</a>
|
|
33
|
+
</>
|
|
34
|
+
);
|
|
35
|
+
CardStory.args = {
|
|
36
|
+
variant: variant,
|
|
37
|
+
};
|
|
38
|
+
return CardStory;
|
|
39
|
+
};
|
|
40
|
+
export const Outlined = createCardStory('outlined');
|
|
41
|
+
export const Elevated = createCardStory('elevated');
|
|
42
|
+
export const Filled = createCardStory('filled');
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Carousel, CarouselInterface, CarouselItem, ReactProps } from '../../';
|
|
3
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'containment/Carousel',
|
|
6
|
+
component: Carousel,
|
|
7
|
+
parameters: {
|
|
8
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
9
|
+
},
|
|
10
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
13
|
+
} satisfies Meta<typeof Carousel>;
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
|
|
18
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
19
|
+
|
|
20
|
+
const src: string[] = [
|
|
21
|
+
'https://images.unsplash.com/photo-1738694237335-a537515c0b7b?q=80&w=2342&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
22
|
+
'https://images.unsplash.com/photo-1738189669835-61808a9d5981?q=80&w=2487&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
23
|
+
'https://images.unsplash.com/photo-1737995720044-8d9bd388ff4f?q=80&w=2487&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
24
|
+
'https://images.unsplash.com/photo-1737625751736-49f5d69fe450?q=80&w=2487&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
25
|
+
'https://images.unsplash.com/photo-1737099049906-fdf13033c12b?q=80&w=2487&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
26
|
+
'https://images.unsplash.com/photo-1736182792109-2db1c298a703?q=80&w=2340&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
27
|
+
'https://plus.unsplash.com/premium_photo-1727342635651-6695593ee0d6?q=80&w=2487&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
28
|
+
'https://images.unsplash.com/photo-1734249201319-e7227b1b4f54?q=80&w=2427&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
29
|
+
'https://images.unsplash.com/photo-1733392898848-72e6a57df7fe?q=80&w=2342&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
30
|
+
'https://images.unsplash.com/photo-1512389136781-65f9031df878?q=80&w=2500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const createCarouselStory = (args?: Partial<ReactProps<CarouselInterface>>) => {
|
|
34
|
+
const carouselStory: Story = (args: ReactProps<CarouselInterface>) => (
|
|
35
|
+
<div className="">
|
|
36
|
+
<div className="flex m-4 gap-4 items-center">
|
|
37
|
+
<Carousel
|
|
38
|
+
className={'md:h-[600px] h-[200px]'}
|
|
39
|
+
outputRange={[40, 500]}
|
|
40
|
+
{...args}
|
|
41
|
+
>
|
|
42
|
+
{Array.from({ length: 10 }).map((_, index) => (
|
|
43
|
+
<CarouselItem key={index}>
|
|
44
|
+
<img
|
|
45
|
+
className={'object-cover h-full w-full'}
|
|
46
|
+
alt={'illustration'}
|
|
47
|
+
src={src[index]}
|
|
48
|
+
/>
|
|
49
|
+
</CarouselItem>
|
|
50
|
+
))}
|
|
51
|
+
</Carousel>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
carouselStory.args = {
|
|
56
|
+
onChange: (e) => console.log(e),
|
|
57
|
+
...args,
|
|
58
|
+
};
|
|
59
|
+
return carouselStory;
|
|
60
|
+
};
|
|
61
|
+
export const hero = createCarouselStory();
|
|
62
|
+
export const centerAlignedHero = createCarouselStory();
|
|
63
|
+
export const multiBrowse = createCarouselStory();
|
|
64
|
+
export const unContained = createCarouselStory();
|
|
65
|
+
export const fullScreen = createCarouselStory();
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Divider, DividerInterface, ReactProps } 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: 'Data Display/Divider',
|
|
7
|
+
component: Divider,
|
|
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
|
+
argTypes: {},
|
|
15
|
+
} satisfies Meta<typeof Divider>;
|
|
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 createTabStory = (args?: Partial<ReactProps<DividerInterface>>) => {
|
|
23
|
+
const tabStory: Story = (args: ReactProps<DividerInterface>) => (
|
|
24
|
+
<div className="h-96 w-96 flex">
|
|
25
|
+
<Divider {...args} />
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
tabStory.args = {
|
|
29
|
+
...args,
|
|
30
|
+
};
|
|
31
|
+
return tabStory;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const Horizontal = createTabStory();
|
|
35
|
+
export const Vertical = createTabStory({ orientation: 'vertical' });
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SmoothScroll } from '../../';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
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: 'effect/SmoothScroll',
|
|
8
|
+
component: SmoothScroll,
|
|
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
|
+
argTypes: {},
|
|
16
|
+
} satisfies Meta<typeof SmoothScroll>;
|
|
17
|
+
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
|
|
21
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
22
|
+
|
|
23
|
+
const createSmoothScrollStory = () => {
|
|
24
|
+
const SmoothScrollStory: () => JSX.Element = () => (
|
|
25
|
+
<div className={'h-96'}>
|
|
26
|
+
<SmoothScroll transition={'1s'}>
|
|
27
|
+
<div className={' h-52 bg-primary'} />
|
|
28
|
+
<div className={' h-52 bg-secondary'} />
|
|
29
|
+
<div className={' h-52 bg-tertiary'} />{' '}
|
|
30
|
+
<div className={' h-52 bg-primary'} />
|
|
31
|
+
<div className={' h-52 bg-secondary'} />
|
|
32
|
+
<div className={' h-52 bg-tertiary'} />{' '}
|
|
33
|
+
<div className={' h-52 bg-primary'} />
|
|
34
|
+
<div className={' h-52 bg-secondary'} />
|
|
35
|
+
<div className={' h-52 bg-tertiary'} />{' '}
|
|
36
|
+
<div className={' h-52 bg-primary'} />
|
|
37
|
+
<div className={' h-52 bg-secondary'} />
|
|
38
|
+
<div className={' h-52 bg-tertiary'} />
|
|
39
|
+
</SmoothScroll>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return SmoothScrollStory;
|
|
44
|
+
};
|
|
45
|
+
export const SmoothScrollStory = createSmoothScrollStory();
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import {
|
|
3
|
+
NavigationRailItem,
|
|
4
|
+
NavigationRailItemInterface,
|
|
5
|
+
ReactProps,
|
|
6
|
+
} from '../../../';
|
|
7
|
+
import { faCircleUser as fasCircleUser } from '@fortawesome/free-solid-svg-icons';
|
|
8
|
+
import { faCircleUser as farCircleUser } from '@fortawesome/free-regular-svg-icons';
|
|
9
|
+
|
|
10
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
11
|
+
const meta = {
|
|
12
|
+
title: 'Navigation/Navigation rail item',
|
|
13
|
+
component: NavigationRailItem,
|
|
14
|
+
parameters: {
|
|
15
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
16
|
+
},
|
|
17
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
20
|
+
argTypes: {
|
|
21
|
+
type: { table: { disable: true } },
|
|
22
|
+
icon: { table: { disable: true } },
|
|
23
|
+
},
|
|
24
|
+
} satisfies Meta<typeof NavigationRailItem>;
|
|
25
|
+
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
|
|
29
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
30
|
+
|
|
31
|
+
const createNavigationRailItemStory = (
|
|
32
|
+
args?: Partial<ReactProps<NavigationRailItemInterface>>,
|
|
33
|
+
) => {
|
|
34
|
+
const navigationRailItemStory: Story = (
|
|
35
|
+
args: ReactProps<NavigationRailItemInterface>,
|
|
36
|
+
) => (
|
|
37
|
+
<div className="">
|
|
38
|
+
<div className="flex m-4 gap-4 items-center">
|
|
39
|
+
<NavigationRailItem {...args} />
|
|
40
|
+
<NavigationRailItem {...args} selected />
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
navigationRailItemStory.args = {
|
|
45
|
+
...args,
|
|
46
|
+
|
|
47
|
+
icon: farCircleUser,
|
|
48
|
+
iconSelected: fasCircleUser,
|
|
49
|
+
};
|
|
50
|
+
return navigationRailItemStory;
|
|
51
|
+
};
|
|
52
|
+
export const VerticalIconAndLabel = createNavigationRailItemStory({
|
|
53
|
+
variant: 'vertical',
|
|
54
|
+
label: 'Label',
|
|
55
|
+
});
|
|
56
|
+
export const VerticalIconOnly = createNavigationRailItemStory({
|
|
57
|
+
variant: 'vertical',
|
|
58
|
+
});
|
|
59
|
+
export const HorizontalIconAndLabel = createNavigationRailItemStory({
|
|
60
|
+
variant: 'horizontal',
|
|
61
|
+
label: 'Label',
|
|
62
|
+
});
|
|
63
|
+
export const HorizontalLabelOnly = createNavigationRailItemStory({
|
|
64
|
+
variant: 'vertical',
|
|
65
|
+
});
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { faCircleUser as fasCircleUser } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
import {
|
|
5
|
+
Fab,
|
|
6
|
+
NavigationRail,
|
|
7
|
+
NavigationRailItem,
|
|
8
|
+
NavigationRailSection,
|
|
9
|
+
ReactProps,
|
|
10
|
+
} from '../../../';
|
|
11
|
+
import { NavigationRailInterface } from '../../..//interfaces/navigation-rail.interface';
|
|
12
|
+
import { faCircleUser as farCircleUser } from '@fortawesome/free-regular-svg-icons';
|
|
13
|
+
|
|
14
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
15
|
+
const meta = {
|
|
16
|
+
title: 'Navigation/Navigation rail',
|
|
17
|
+
component: NavigationRail,
|
|
18
|
+
parameters: {
|
|
19
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
20
|
+
},
|
|
21
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
22
|
+
tags: ['autodocs'],
|
|
23
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
24
|
+
argTypes: {},
|
|
25
|
+
} satisfies Meta<typeof NavigationRail>;
|
|
26
|
+
|
|
27
|
+
export default meta;
|
|
28
|
+
type Story = StoryObj<typeof meta>;
|
|
29
|
+
|
|
30
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
31
|
+
|
|
32
|
+
const createStory = (args?: Partial<ReactProps<NavigationRailInterface>>) => {
|
|
33
|
+
const story: Story = (
|
|
34
|
+
args?: Partial<ReactProps<NavigationRailInterface>>,
|
|
35
|
+
) => (
|
|
36
|
+
<div className="w-full h-[90vh] flex bg-surface">
|
|
37
|
+
<NavigationRail alignment={'middle'} {...args}>
|
|
38
|
+
<Fab icon={farCircleUser} label={'Add Timer'} />
|
|
39
|
+
<NavigationRailItem
|
|
40
|
+
icon={farCircleUser}
|
|
41
|
+
iconSelected={fasCircleUser}
|
|
42
|
+
label={'Explorer'}
|
|
43
|
+
selected
|
|
44
|
+
></NavigationRailItem>
|
|
45
|
+
<NavigationRailItem
|
|
46
|
+
icon={farCircleUser}
|
|
47
|
+
iconSelected={fasCircleUser}
|
|
48
|
+
label={'Favoris'}
|
|
49
|
+
></NavigationRailItem>
|
|
50
|
+
<NavigationRailItem
|
|
51
|
+
icon={farCircleUser}
|
|
52
|
+
iconSelected={fasCircleUser}
|
|
53
|
+
label={'Voyages'}
|
|
54
|
+
></NavigationRailItem>
|
|
55
|
+
<NavigationRailItem
|
|
56
|
+
icon={farCircleUser}
|
|
57
|
+
iconSelected={fasCircleUser}
|
|
58
|
+
label={'Messages'}
|
|
59
|
+
></NavigationRailItem>
|
|
60
|
+
<NavigationRailItem
|
|
61
|
+
icon={farCircleUser}
|
|
62
|
+
iconSelected={fasCircleUser}
|
|
63
|
+
label={'Profil'}
|
|
64
|
+
></NavigationRailItem>
|
|
65
|
+
<NavigationRailSection label={'Section Header'}></NavigationRailSection>
|
|
66
|
+
<NavigationRailItem
|
|
67
|
+
icon={farCircleUser}
|
|
68
|
+
iconSelected={fasCircleUser}
|
|
69
|
+
label={'Explorer'}
|
|
70
|
+
></NavigationRailItem>
|
|
71
|
+
<NavigationRailItem
|
|
72
|
+
icon={farCircleUser}
|
|
73
|
+
iconSelected={fasCircleUser}
|
|
74
|
+
label={'Favoris'}
|
|
75
|
+
></NavigationRailItem>
|
|
76
|
+
<NavigationRailItem
|
|
77
|
+
icon={farCircleUser}
|
|
78
|
+
iconSelected={fasCircleUser}
|
|
79
|
+
label={'Voyages'}
|
|
80
|
+
></NavigationRailItem>
|
|
81
|
+
<NavigationRailItem
|
|
82
|
+
icon={farCircleUser}
|
|
83
|
+
iconSelected={fasCircleUser}
|
|
84
|
+
label={'Messages'}
|
|
85
|
+
></NavigationRailItem>
|
|
86
|
+
<NavigationRailItem
|
|
87
|
+
icon={farCircleUser}
|
|
88
|
+
iconSelected={fasCircleUser}
|
|
89
|
+
label={'Profil'}
|
|
90
|
+
></NavigationRailItem>
|
|
91
|
+
<NavigationRailSection label={'Section Header'}></NavigationRailSection>
|
|
92
|
+
<NavigationRailItem
|
|
93
|
+
icon={farCircleUser}
|
|
94
|
+
iconSelected={fasCircleUser}
|
|
95
|
+
label={'Explorer'}
|
|
96
|
+
></NavigationRailItem>
|
|
97
|
+
<NavigationRailItem
|
|
98
|
+
icon={farCircleUser}
|
|
99
|
+
iconSelected={fasCircleUser}
|
|
100
|
+
label={'Favoris'}
|
|
101
|
+
></NavigationRailItem>
|
|
102
|
+
</NavigationRail>
|
|
103
|
+
<div className={'flex-1 bg-surface-container'}></div>
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
story.args = {
|
|
108
|
+
...(args as any),
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return story;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export const PrimaryLabelOnly = createStory();
|
|
115
|
+
|
|
116
|
+
export const PrimaryIconAndLabel = createStory();
|
|
117
|
+
|
|
118
|
+
export const PrimaryIconOnly = createStory();
|
|
119
|
+
|
|
120
|
+
export const SecondaryLabelOnly = createStory();
|
|
121
|
+
|
|
122
|
+
export const SecondaryIconAndLabel = createStory();
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { faHome } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
import { Tab, TabProps, TabsVariant } from '../../../';
|
|
5
|
+
import { fn } from '@storybook/test';
|
|
6
|
+
|
|
7
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Navigation/Tab',
|
|
10
|
+
component: Tab,
|
|
11
|
+
parameters: {
|
|
12
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
13
|
+
},
|
|
14
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
15
|
+
tags: ['autodocs'],
|
|
16
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
17
|
+
argTypes: {
|
|
18
|
+
type: { table: { disable: true } },
|
|
19
|
+
icon: { table: { disable: true } },
|
|
20
|
+
},
|
|
21
|
+
} satisfies Meta<typeof Tab>;
|
|
22
|
+
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
|
|
26
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
27
|
+
|
|
28
|
+
const createTabStory = (variant: TabsVariant, args?: Partial<TabProps>) => {
|
|
29
|
+
const tabStory: Story = (args: TabProps) => (
|
|
30
|
+
<div className="">
|
|
31
|
+
<div className="flex m-4 gap-4 items-center">
|
|
32
|
+
<Tab {...args} />
|
|
33
|
+
<Tab {...args} selected />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
tabStory.args = {
|
|
38
|
+
label: 'Tab',
|
|
39
|
+
variant: variant,
|
|
40
|
+
onClick: fn(),
|
|
41
|
+
onTabSelected: fn(),
|
|
42
|
+
...args,
|
|
43
|
+
};
|
|
44
|
+
return tabStory;
|
|
45
|
+
};
|
|
46
|
+
export const PrimaryIconAndLabel = createTabStory('primary', {
|
|
47
|
+
icon: faHome,
|
|
48
|
+
});
|
|
49
|
+
export const PrimaryIconOnly = createTabStory('primary', {
|
|
50
|
+
label: undefined,
|
|
51
|
+
icon: faHome,
|
|
52
|
+
});
|
|
53
|
+
export const PrimaryLabelOnly = createTabStory('primary');
|
|
54
|
+
export const SecondaryLabelOnly = createTabStory('secondary');
|
|
55
|
+
export const SecondaryIconAndLabel = createTabStory('secondary', {
|
|
56
|
+
icon: faHome,
|
|
57
|
+
});
|