@regardio/react 0.3.2
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/LICENSE +9 -0
- package/README.md +133 -0
- package/dist/components/background-slideshow.d.ts +22 -0
- package/dist/components/background-slideshow.d.ts.map +1 -0
- package/dist/components/background-slideshow.js +76 -0
- package/dist/components/blurry-gradient.d.ts +9 -0
- package/dist/components/blurry-gradient.d.ts.map +1 -0
- package/dist/components/blurry-gradient.js +6 -0
- package/dist/components/box.d.ts +17 -0
- package/dist/components/box.d.ts.map +1 -0
- package/dist/components/box.js +25 -0
- package/dist/components/carousel.d.ts +26 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +87 -0
- package/dist/components/countdown.d.ts +2 -0
- package/dist/components/countdown.d.ts.map +1 -0
- package/dist/components/countdown.js +48 -0
- package/dist/components/definition-list.d.ts +40 -0
- package/dist/components/definition-list.d.ts.map +1 -0
- package/dist/components/definition-list.js +57 -0
- package/dist/components/generic-error.d.ts +23 -0
- package/dist/components/generic-error.d.ts.map +1 -0
- package/dist/components/generic-error.js +39 -0
- package/dist/components/heading.d.ts +24 -0
- package/dist/components/heading.d.ts.map +1 -0
- package/dist/components/heading.js +29 -0
- package/dist/components/highlight.d.ts +16 -0
- package/dist/components/highlight.d.ts.map +1 -0
- package/dist/components/highlight.js +19 -0
- package/dist/components/icon-button.d.ts +6 -0
- package/dist/components/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button.js +6 -0
- package/dist/components/if.d.ts +8 -0
- package/dist/components/if.d.ts.map +1 -0
- package/dist/components/if.js +16 -0
- package/dist/components/iframe.d.ts +8 -0
- package/dist/components/iframe.d.ts.map +1 -0
- package/dist/components/iframe.js +3 -0
- package/dist/components/item.d.ts +67 -0
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +309 -0
- package/dist/components/leaflet-map.d.ts +33 -0
- package/dist/components/leaflet-map.d.ts.map +1 -0
- package/dist/components/leaflet-map.js +195 -0
- package/dist/components/link.d.ts +41 -0
- package/dist/components/link.d.ts.map +1 -0
- package/dist/components/link.js +111 -0
- package/dist/components/link.test.d.ts +2 -0
- package/dist/components/link.test.d.ts.map +1 -0
- package/dist/components/link.test.js +204 -0
- package/dist/components/list-item.d.ts +16 -0
- package/dist/components/list-item.d.ts.map +1 -0
- package/dist/components/list-item.js +19 -0
- package/dist/components/maptiler-map.d.ts +26 -0
- package/dist/components/maptiler-map.d.ts.map +1 -0
- package/dist/components/maptiler-map.js +116 -0
- package/dist/components/markdown-container.d.ts +20 -0
- package/dist/components/markdown-container.d.ts.map +1 -0
- package/dist/components/markdown-container.js +93 -0
- package/dist/components/password-input.d.ts +9 -0
- package/dist/components/password-input.d.ts.map +1 -0
- package/dist/components/password-input.js +13 -0
- package/dist/components/picture.d.ts +26 -0
- package/dist/components/picture.d.ts.map +1 -0
- package/dist/components/picture.js +36 -0
- package/dist/components/protected-email.d.ts +9 -0
- package/dist/components/protected-email.d.ts.map +1 -0
- package/dist/components/protected-email.js +16 -0
- package/dist/components/text.d.ts +17 -0
- package/dist/components/text.d.ts.map +1 -0
- package/dist/components/text.js +27 -0
- package/dist/components/unordered-list.d.ts +16 -0
- package/dist/components/unordered-list.d.ts.map +1 -0
- package/dist/components/unordered-list.js +21 -0
- package/dist/hooks/use-current-route-data.d.ts +2 -0
- package/dist/hooks/use-current-route-data.d.ts.map +1 -0
- package/dist/hooks/use-current-route-data.js +12 -0
- package/dist/hooks/use-focus-search.d.ts +3 -0
- package/dist/hooks/use-focus-search.d.ts.map +1 -0
- package/dist/hooks/use-focus-search.js +15 -0
- package/dist/hooks/use-matches-data.d.ts +2 -0
- package/dist/hooks/use-matches-data.d.ts.map +1 -0
- package/dist/hooks/use-matches-data.js +11 -0
- package/dist/hooks/use-media-query.d.ts +2 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +16 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/hooks/use-nonce.d.ts +5 -0
- package/dist/hooks/use-nonce.d.ts.map +1 -0
- package/dist/hooks/use-nonce.js +9 -0
- package/dist/hooks/use-nonce.test.d.ts +2 -0
- package/dist/hooks/use-nonce.test.d.ts.map +1 -0
- package/dist/hooks/use-nonce.test.js +27 -0
- package/dist/hooks/use-orientation.d.ts +3 -0
- package/dist/hooks/use-orientation.d.ts.map +1 -0
- package/dist/hooks/use-orientation.js +25 -0
- package/dist/hooks/use-user.d.ts +15 -0
- package/dist/hooks/use-user.d.ts.map +1 -0
- package/dist/hooks/use-user.js +17 -0
- package/dist/shadcn/accordion.d.ts +25 -0
- package/dist/shadcn/accordion.d.ts.map +1 -0
- package/dist/shadcn/accordion.js +45 -0
- package/dist/shadcn/alert-dialog.d.ts +73 -0
- package/dist/shadcn/alert-dialog.d.ts.map +1 -0
- package/dist/shadcn/alert-dialog.js +93 -0
- package/dist/shadcn/alert.d.ts +34 -0
- package/dist/shadcn/alert.d.ts.map +1 -0
- package/dist/shadcn/alert.js +42 -0
- package/dist/shadcn/aspect-ratio.d.ts +6 -0
- package/dist/shadcn/aspect-ratio.d.ts.map +1 -0
- package/dist/shadcn/aspect-ratio.js +7 -0
- package/dist/shadcn/avatar.d.ts +16 -0
- package/dist/shadcn/avatar.d.ts.map +1 -0
- package/dist/shadcn/avatar.js +27 -0
- package/dist/shadcn/badge.d.ts +29 -0
- package/dist/shadcn/badge.d.ts.map +1 -0
- package/dist/shadcn/badge.js +29 -0
- package/dist/shadcn/breadcrumb.d.ts +42 -0
- package/dist/shadcn/breadcrumb.d.ts.map +1 -0
- package/dist/shadcn/breadcrumb.js +74 -0
- package/dist/shadcn/button.d.ts +38 -0
- package/dist/shadcn/button.d.ts.map +1 -0
- package/dist/shadcn/button.js +38 -0
- package/dist/shadcn/calendar.d.ts +23 -0
- package/dist/shadcn/calendar.d.ts.map +1 -0
- package/dist/shadcn/calendar.js +163 -0
- package/dist/shadcn/card.d.ts +31 -0
- package/dist/shadcn/card.d.ts.map +1 -0
- package/dist/shadcn/card.js +55 -0
- package/dist/shadcn/carousel.d.ts +51 -0
- package/dist/shadcn/carousel.d.ts.map +1 -0
- package/dist/shadcn/carousel.js +161 -0
- package/dist/shadcn/chart.d.ts +103 -0
- package/dist/shadcn/chart.d.ts.map +1 -0
- package/dist/shadcn/chart.js +248 -0
- package/dist/shadcn/checkbox.d.ts +8 -0
- package/dist/shadcn/checkbox.d.ts.map +1 -0
- package/dist/shadcn/checkbox.js +22 -0
- package/dist/shadcn/collapsible.d.ts +16 -0
- package/dist/shadcn/collapsible.d.ts.map +1 -0
- package/dist/shadcn/collapsible.js +19 -0
- package/dist/shadcn/command.d.ts +61 -0
- package/dist/shadcn/command.d.ts.map +1 -0
- package/dist/shadcn/command.js +123 -0
- package/dist/shadcn/context-menu.d.ts +107 -0
- package/dist/shadcn/context-menu.d.ts.map +1 -0
- package/dist/shadcn/context-menu.js +151 -0
- package/dist/shadcn/dialog.d.ts +57 -0
- package/dist/shadcn/dialog.d.ts.map +1 -0
- package/dist/shadcn/dialog.js +96 -0
- package/dist/shadcn/drawer.d.ts +54 -0
- package/dist/shadcn/drawer.d.ts.map +1 -0
- package/dist/shadcn/drawer.js +96 -0
- package/dist/shadcn/dropdown-menu.d.ts +110 -0
- package/dist/shadcn/dropdown-menu.d.ts.map +1 -0
- package/dist/shadcn/dropdown-menu.js +152 -0
- package/dist/shadcn/form.d.ts +59 -0
- package/dist/shadcn/form.d.ts.map +1 -0
- package/dist/shadcn/form.js +99 -0
- package/dist/shadcn/hover-card.d.ts +20 -0
- package/dist/shadcn/hover-card.d.ts.map +1 -0
- package/dist/shadcn/hover-card.js +26 -0
- package/dist/shadcn/input-otp.d.ts +25 -0
- package/dist/shadcn/input-otp.d.ts.map +1 -0
- package/dist/shadcn/input-otp.js +54 -0
- package/dist/shadcn/input.d.ts +14 -0
- package/dist/shadcn/input.d.ts.map +1 -0
- package/dist/shadcn/input.js +48 -0
- package/dist/shadcn/label.d.ts +8 -0
- package/dist/shadcn/label.d.ts.map +1 -0
- package/dist/shadcn/label.js +16 -0
- package/dist/shadcn/menubar.d.ts +108 -0
- package/dist/shadcn/menubar.d.ts.map +1 -0
- package/dist/shadcn/menubar.js +174 -0
- package/dist/shadcn/navigation-menu.d.ts +79 -0
- package/dist/shadcn/navigation-menu.d.ts.map +1 -0
- package/dist/shadcn/navigation-menu.js +108 -0
- package/dist/shadcn/pagination.d.ts +45 -0
- package/dist/shadcn/pagination.d.ts.map +1 -0
- package/dist/shadcn/pagination.js +83 -0
- package/dist/shadcn/popover.d.ts +19 -0
- package/dist/shadcn/popover.d.ts.map +1 -0
- package/dist/shadcn/popover.js +29 -0
- package/dist/shadcn/progress.d.ts +9 -0
- package/dist/shadcn/progress.d.ts.map +1 -0
- package/dist/shadcn/progress.js +17 -0
- package/dist/shadcn/radio-group.d.ts +12 -0
- package/dist/shadcn/radio-group.d.ts.map +1 -0
- package/dist/shadcn/radio-group.js +32 -0
- package/dist/shadcn/resizable.d.ts +20 -0
- package/dist/shadcn/resizable.d.ts.map +1 -0
- package/dist/shadcn/resizable.js +32 -0
- package/dist/shadcn/scroll-area.d.ts +16 -0
- package/dist/shadcn/scroll-area.d.ts.map +1 -0
- package/dist/shadcn/scroll-area.js +40 -0
- package/dist/shadcn/select.d.ts +63 -0
- package/dist/shadcn/select.d.ts.map +1 -0
- package/dist/shadcn/select.js +120 -0
- package/dist/shadcn/separator.d.ts +10 -0
- package/dist/shadcn/separator.d.ts.map +1 -0
- package/dist/shadcn/separator.js +18 -0
- package/dist/shadcn/sheet.d.ts +48 -0
- package/dist/shadcn/sheet.d.ts.map +1 -0
- package/dist/shadcn/sheet.js +99 -0
- package/dist/shadcn/sidebar.d.ts +200 -0
- package/dist/shadcn/sidebar.d.ts.map +1 -0
- package/dist/shadcn/sidebar.js +528 -0
- package/dist/shadcn/skeleton.d.ts +6 -0
- package/dist/shadcn/skeleton.d.ts.map +1 -0
- package/dist/shadcn/skeleton.js +11 -0
- package/dist/shadcn/slider.d.ts +12 -0
- package/dist/shadcn/slider.d.ts.map +1 -0
- package/dist/shadcn/slider.js +50 -0
- package/dist/shadcn/sonner.d.ts +7 -0
- package/dist/shadcn/sonner.d.ts.map +1 -0
- package/dist/shadcn/sonner.js +20 -0
- package/dist/shadcn/switch.d.ts +8 -0
- package/dist/shadcn/switch.d.ts.map +1 -0
- package/dist/shadcn/switch.js +22 -0
- package/dist/shadcn/table.d.ts +35 -0
- package/dist/shadcn/table.d.ts.map +1 -0
- package/dist/shadcn/table.js +73 -0
- package/dist/shadcn/tabs.d.ts +20 -0
- package/dist/shadcn/tabs.d.ts.map +1 -0
- package/dist/shadcn/tabs.js +40 -0
- package/dist/shadcn/textarea.d.ts +7 -0
- package/dist/shadcn/textarea.d.ts.map +1 -0
- package/dist/shadcn/textarea.js +14 -0
- package/dist/shadcn/toggle-group.d.ts +22 -0
- package/dist/shadcn/toggle-group.d.ts.map +1 -0
- package/dist/shadcn/toggle-group.js +43 -0
- package/dist/shadcn/toggle.d.ts +29 -0
- package/dist/shadcn/toggle.d.ts.map +1 -0
- package/dist/shadcn/toggle.js +31 -0
- package/dist/shadcn/tooltip.d.ts +20 -0
- package/dist/shadcn/tooltip.d.ts.map +1 -0
- package/dist/shadcn/tooltip.js +40 -0
- package/dist/stories/BackgroundSlideshow.stories.d.ts +9 -0
- package/dist/stories/BackgroundSlideshow.stories.d.ts.map +1 -0
- package/dist/stories/BackgroundSlideshow.stories.js +60 -0
- package/dist/stories/BlurryGradient.stories.d.ts +11 -0
- package/dist/stories/BlurryGradient.stories.d.ts.map +1 -0
- package/dist/stories/BlurryGradient.stories.js +53 -0
- package/dist/stories/Box.stories.d.ts +13 -0
- package/dist/stories/Box.stories.d.ts.map +1 -0
- package/dist/stories/Box.stories.js +50 -0
- package/dist/stories/Carousel.stories.d.ts +9 -0
- package/dist/stories/Carousel.stories.d.ts.map +1 -0
- package/dist/stories/Carousel.stories.js +30 -0
- package/dist/stories/Countdown.stories.d.ts +7 -0
- package/dist/stories/Countdown.stories.d.ts.map +1 -0
- package/dist/stories/Countdown.stories.js +11 -0
- package/dist/stories/DefinitionList.stories.d.ts +9 -0
- package/dist/stories/DefinitionList.stories.d.ts.map +1 -0
- package/dist/stories/DefinitionList.stories.js +20 -0
- package/dist/stories/GenericError.stories.d.ts +9 -0
- package/dist/stories/GenericError.stories.d.ts.map +1 -0
- package/dist/stories/GenericError.stories.js +39 -0
- package/dist/stories/Heading.stories.d.ts +15 -0
- package/dist/stories/Heading.stories.d.ts.map +1 -0
- package/dist/stories/Heading.stories.js +61 -0
- package/dist/stories/Highlight.stories.d.ts +8 -0
- package/dist/stories/Highlight.stories.d.ts.map +1 -0
- package/dist/stories/Highlight.stories.js +19 -0
- package/dist/stories/IconButton.stories.d.ts +10 -0
- package/dist/stories/IconButton.stories.d.ts.map +1 -0
- package/dist/stories/IconButton.stories.js +32 -0
- package/dist/stories/If.stories.d.ts +13 -0
- package/dist/stories/If.stories.d.ts.map +1 -0
- package/dist/stories/If.stories.js +54 -0
- package/dist/stories/Iframe.stories.d.ts +8 -0
- package/dist/stories/Iframe.stories.d.ts.map +1 -0
- package/dist/stories/Iframe.stories.js +23 -0
- package/dist/stories/Item.stories.d.ts +10 -0
- package/dist/stories/Item.stories.d.ts.map +1 -0
- package/dist/stories/Item.stories.js +32 -0
- package/dist/stories/Link.stories.d.ts +10 -0
- package/dist/stories/Link.stories.d.ts.map +1 -0
- package/dist/stories/Link.stories.js +36 -0
- package/dist/stories/ListItem.stories.d.ts +9 -0
- package/dist/stories/ListItem.stories.d.ts.map +1 -0
- package/dist/stories/ListItem.stories.js +25 -0
- package/dist/stories/MarkdownContainer.stories.d.ts +11 -0
- package/dist/stories/MarkdownContainer.stories.d.ts.map +1 -0
- package/dist/stories/MarkdownContainer.stories.js +66 -0
- package/dist/stories/PasswordInput.stories.d.ts +9 -0
- package/dist/stories/PasswordInput.stories.d.ts.map +1 -0
- package/dist/stories/PasswordInput.stories.js +27 -0
- package/dist/stories/Picture.stories.d.ts +10 -0
- package/dist/stories/Picture.stories.d.ts.map +1 -0
- package/dist/stories/Picture.stories.js +46 -0
- package/dist/stories/ProtectedEmail.stories.d.ts +10 -0
- package/dist/stories/ProtectedEmail.stories.d.ts.map +1 -0
- package/dist/stories/ProtectedEmail.stories.js +34 -0
- package/dist/stories/Text.stories.d.ts +10 -0
- package/dist/stories/Text.stories.d.ts.map +1 -0
- package/dist/stories/Text.stories.js +31 -0
- package/dist/stories/UnorderedList.stories.d.ts +10 -0
- package/dist/stories/UnorderedList.stories.d.ts.map +1 -0
- package/dist/stories/UnorderedList.stories.js +24 -0
- package/dist/test-setup.d.ts +2 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/test-setup.js +1 -0
- package/dist/utils/author.d.ts +9 -0
- package/dist/utils/author.d.ts.map +1 -0
- package/dist/utils/author.js +37 -0
- package/dist/utils/author.test.d.ts +2 -0
- package/dist/utils/author.test.d.ts.map +1 -0
- package/dist/utils/author.test.js +46 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +10 -0
- package/dist/utils/cn.test.d.ts +2 -0
- package/dist/utils/cn.test.d.ts.map +1 -0
- package/dist/utils/cn.test.js +33 -0
- package/dist/utils/is-route-active.d.ts +3 -0
- package/dist/utils/is-route-active.d.ts.map +1 -0
- package/dist/utils/is-route-active.js +54 -0
- package/dist/utils/is-route-active.test.d.ts +2 -0
- package/dist/utils/is-route-active.test.d.ts.map +1 -0
- package/dist/utils/is-route-active.test.js +61 -0
- package/dist/utils/locale.d.ts +22 -0
- package/dist/utils/locale.d.ts.map +1 -0
- package/dist/utils/locale.js +25 -0
- package/dist/utils/locale.test.d.ts +2 -0
- package/dist/utils/locale.test.d.ts.map +1 -0
- package/dist/utils/locale.test.js +99 -0
- package/dist/utils/text.d.ts +7 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +102 -0
- package/dist/utils/text.test.d.ts +2 -0
- package/dist/utils/text.test.d.ts.map +1 -0
- package/dist/utils/text.test.js +122 -0
- package/package.json +117 -0
- package/src/components/background-slideshow.tsx +172 -0
- package/src/components/blurry-gradient.tsx +97 -0
- package/src/components/box.tsx +45 -0
- package/src/components/carousel.tsx +197 -0
- package/src/components/countdown.tsx +82 -0
- package/src/components/definition-list.tsx +90 -0
- package/src/components/generic-error.tsx +104 -0
- package/src/components/heading.tsx +60 -0
- package/src/components/highlight.tsx +53 -0
- package/src/components/icon-button.tsx +20 -0
- package/src/components/if.tsx +29 -0
- package/src/components/iframe.tsx +19 -0
- package/src/components/item.tsx +340 -0
- package/src/components/leaflet-map.tsx +294 -0
- package/src/components/link.test.tsx +387 -0
- package/src/components/link.tsx +206 -0
- package/src/components/list-item.tsx +30 -0
- package/src/components/maptiler-map.tsx +181 -0
- package/src/components/markdown-container.tsx +153 -0
- package/src/components/password-input.tsx +49 -0
- package/src/components/picture.tsx +107 -0
- package/src/components/protected-email.tsx +49 -0
- package/src/components/text.tsx +38 -0
- package/src/components/unordered-list.tsx +32 -0
- package/src/hooks/use-current-route-data.ts +18 -0
- package/src/hooks/use-focus-search.ts +20 -0
- package/src/hooks/use-matches-data.ts +19 -0
- package/src/hooks/use-media-query.ts +33 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/use-nonce.test.ts +35 -0
- package/src/hooks/use-nonce.ts +20 -0
- package/src/hooks/use-orientation.ts +48 -0
- package/src/hooks/use-user.tsx +72 -0
- package/src/stories/BackgroundSlideshow.stories.tsx +68 -0
- package/src/stories/BlurryGradient.stories.tsx +62 -0
- package/src/stories/Box.stories.tsx +83 -0
- package/src/stories/Carousel.stories.tsx +95 -0
- package/src/stories/Countdown.stories.tsx +16 -0
- package/src/stories/DefinitionList.stories.tsx +51 -0
- package/src/stories/GenericError.stories.tsx +58 -0
- package/src/stories/Heading.stories.tsx +82 -0
- package/src/stories/Highlight.stories.tsx +28 -0
- package/src/stories/IconButton.stories.tsx +90 -0
- package/src/stories/If.stories.tsx +72 -0
- package/src/stories/Iframe.stories.tsx +29 -0
- package/src/stories/Item.stories.tsx +79 -0
- package/src/stories/Link.stories.tsx +58 -0
- package/src/stories/ListItem.stories.tsx +37 -0
- package/src/stories/MarkdownContainer.stories.tsx +76 -0
- package/src/stories/PasswordInput.stories.tsx +34 -0
- package/src/stories/Picture.stories.tsx +54 -0
- package/src/stories/ProtectedEmail.stories.tsx +57 -0
- package/src/stories/Text.stories.tsx +44 -0
- package/src/stories/UnorderedList.stories.tsx +73 -0
- package/src/styles/storybook.css +1 -0
- package/src/styles/tailwind.css +7 -0
- package/src/test-setup.ts +1 -0
- package/src/utils/author.test.ts +54 -0
- package/src/utils/author.tsx +73 -0
- package/src/utils/cn.test.ts +48 -0
- package/src/utils/cn.ts +14 -0
- package/src/utils/is-route-active.test.ts +80 -0
- package/src/utils/is-route-active.ts +100 -0
- package/src/utils/locale.test.ts +148 -0
- package/src/utils/locale.ts +127 -0
- package/src/utils/text.test.ts +152 -0
- package/src/utils/text.tsx +209 -0
- package/src/vite-env.d.ts +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
|
|
6
|
+
function Switch({ className, ...props }) {
|
|
7
|
+
return _jsx(SwitchPrimitive.Root, {
|
|
8
|
+
className: cn(
|
|
9
|
+
'peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
|
10
|
+
className,
|
|
11
|
+
),
|
|
12
|
+
'data-slot': 'switch',
|
|
13
|
+
...props,
|
|
14
|
+
children: _jsx(SwitchPrimitive.Thumb, {
|
|
15
|
+
className: cn(
|
|
16
|
+
'bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0',
|
|
17
|
+
),
|
|
18
|
+
'data-slot': 'switch-thumb',
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { Switch };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
declare function Table({
|
|
3
|
+
className,
|
|
4
|
+
...props
|
|
5
|
+
}: React.ComponentProps<'table'>): import('react/jsx-runtime').JSX.Element;
|
|
6
|
+
declare function TableHeader({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<'thead'>): import('react/jsx-runtime').JSX.Element;
|
|
10
|
+
declare function TableBody({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}: React.ComponentProps<'tbody'>): import('react/jsx-runtime').JSX.Element;
|
|
14
|
+
declare function TableFooter({
|
|
15
|
+
className,
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<'tfoot'>): import('react/jsx-runtime').JSX.Element;
|
|
18
|
+
declare function TableRow({
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<'tr'>): import('react/jsx-runtime').JSX.Element;
|
|
22
|
+
declare function TableHead({
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<'th'>): import('react/jsx-runtime').JSX.Element;
|
|
26
|
+
declare function TableCell({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}: React.ComponentProps<'td'>): import('react/jsx-runtime').JSX.Element;
|
|
30
|
+
declare function TableCaption({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<'caption'>): import('react/jsx-runtime').JSX.Element;
|
|
34
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
|
|
35
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/shadcn/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAapE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAQ1E;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAQxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAQ1E;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAWpE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAWrE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAWrE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,2CAQ7E;AAED,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cn } from '../utils/cn';
|
|
3
|
+
|
|
4
|
+
function Table({ className, ...props }) {
|
|
5
|
+
return _jsx('div', {
|
|
6
|
+
children: _jsx('table', {
|
|
7
|
+
className: cn('w-full caption-bottom text-sm', className),
|
|
8
|
+
'data-slot': 'table',
|
|
9
|
+
...props,
|
|
10
|
+
}),
|
|
11
|
+
className: 'relative w-full overflow-x-auto',
|
|
12
|
+
'data-slot': 'table-container',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function TableHeader({ className, ...props }) {
|
|
16
|
+
return _jsx('thead', {
|
|
17
|
+
className: cn('[&_tr]:border-b', className),
|
|
18
|
+
'data-slot': 'table-header',
|
|
19
|
+
...props,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function TableBody({ className, ...props }) {
|
|
23
|
+
return _jsx('tbody', {
|
|
24
|
+
className: cn('[&_tr:last-child]:border-0', className),
|
|
25
|
+
'data-slot': 'table-body',
|
|
26
|
+
...props,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function TableFooter({ className, ...props }) {
|
|
30
|
+
return _jsx('tfoot', {
|
|
31
|
+
className: cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className),
|
|
32
|
+
'data-slot': 'table-footer',
|
|
33
|
+
...props,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function TableRow({ className, ...props }) {
|
|
37
|
+
return _jsx('tr', {
|
|
38
|
+
className: cn(
|
|
39
|
+
'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors',
|
|
40
|
+
className,
|
|
41
|
+
),
|
|
42
|
+
'data-slot': 'table-row',
|
|
43
|
+
...props,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function TableHead({ className, ...props }) {
|
|
47
|
+
return _jsx('th', {
|
|
48
|
+
className: cn(
|
|
49
|
+
'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
|
|
50
|
+
className,
|
|
51
|
+
),
|
|
52
|
+
'data-slot': 'table-head',
|
|
53
|
+
...props,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function TableCell({ className, ...props }) {
|
|
57
|
+
return _jsx('td', {
|
|
58
|
+
className: cn(
|
|
59
|
+
'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
|
|
60
|
+
className,
|
|
61
|
+
),
|
|
62
|
+
'data-slot': 'table-cell',
|
|
63
|
+
...props,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function TableCaption({ className, ...props }) {
|
|
67
|
+
return _jsx('caption', {
|
|
68
|
+
className: cn('text-muted-foreground mt-4 text-sm', className),
|
|
69
|
+
'data-slot': 'table-caption',
|
|
70
|
+
...props,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function Tabs({
|
|
4
|
+
className,
|
|
5
|
+
...props
|
|
6
|
+
}: React.ComponentProps<typeof TabsPrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
7
|
+
declare function TabsList({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof TabsPrimitive.List>): import('react/jsx-runtime').JSX.Element;
|
|
11
|
+
declare function TabsTrigger({
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof TabsPrimitive.Trigger>): import('react/jsx-runtime').JSX.Element;
|
|
15
|
+
declare function TabsContent({
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}: React.ComponentProps<typeof TabsPrimitive.Content>): import('react/jsx-runtime').JSX.Element;
|
|
19
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
20
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/shadcn/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,2CAQrF;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,2CAWzF;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,2CAW/F;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,2CAQ/F;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
+
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
|
|
6
|
+
function Tabs({ className, ...props }) {
|
|
7
|
+
return _jsx(TabsPrimitive.Root, {
|
|
8
|
+
className: cn('flex flex-col gap-2', className),
|
|
9
|
+
'data-slot': 'tabs',
|
|
10
|
+
...props,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function TabsList({ className, ...props }) {
|
|
14
|
+
return _jsx(TabsPrimitive.List, {
|
|
15
|
+
className: cn(
|
|
16
|
+
'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',
|
|
17
|
+
className,
|
|
18
|
+
),
|
|
19
|
+
'data-slot': 'tabs-list',
|
|
20
|
+
...props,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function TabsTrigger({ className, ...props }) {
|
|
24
|
+
return _jsx(TabsPrimitive.Trigger, {
|
|
25
|
+
className: cn(
|
|
26
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
27
|
+
className,
|
|
28
|
+
),
|
|
29
|
+
'data-slot': 'tabs-trigger',
|
|
30
|
+
...props,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function TabsContent({ className, ...props }) {
|
|
34
|
+
return _jsx(TabsPrimitive.Content, {
|
|
35
|
+
className: cn('flex-1 outline-none', className),
|
|
36
|
+
'data-slot': 'tabs-content',
|
|
37
|
+
...props,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/shadcn/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,2CAW1E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cn } from '../utils/cn';
|
|
3
|
+
|
|
4
|
+
function Textarea({ className, ...props }) {
|
|
5
|
+
return _jsx('textarea', {
|
|
6
|
+
className: cn(
|
|
7
|
+
'border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
8
|
+
className,
|
|
9
|
+
),
|
|
10
|
+
'data-slot': 'textarea',
|
|
11
|
+
...props,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export { Textarea };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { type VariantProps } from '../utils/cn';
|
|
4
|
+
import { toggleVariants } from './toggle';
|
|
5
|
+
declare function ToggleGroup({
|
|
6
|
+
className,
|
|
7
|
+
variant,
|
|
8
|
+
size,
|
|
9
|
+
children,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
|
|
12
|
+
VariantProps<typeof toggleVariants>): import('react/jsx-runtime').JSX.Element;
|
|
13
|
+
declare function ToggleGroupItem({
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
variant,
|
|
17
|
+
size,
|
|
18
|
+
...props
|
|
19
|
+
}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &
|
|
20
|
+
VariantProps<typeof toggleVariants>): import('react/jsx-runtime').JSX.Element;
|
|
21
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
22
|
+
//# sourceMappingURL=toggle-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../src/shadcn/toggle-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAO1C,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,2CAiB9F;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,2CAqB9F;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
5
|
+
import { cn } from '../utils/cn';
|
|
6
|
+
import { toggleVariants } from './toggle';
|
|
7
|
+
|
|
8
|
+
const ToggleGroupContext = React.createContext({
|
|
9
|
+
size: 'default',
|
|
10
|
+
variant: 'default',
|
|
11
|
+
});
|
|
12
|
+
function ToggleGroup({ className, variant, size, children, ...props }) {
|
|
13
|
+
return _jsx(ToggleGroupPrimitive.Root, {
|
|
14
|
+
className: cn(
|
|
15
|
+
'group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs',
|
|
16
|
+
className,
|
|
17
|
+
),
|
|
18
|
+
'data-size': size,
|
|
19
|
+
'data-slot': 'toggle-group',
|
|
20
|
+
'data-variant': variant,
|
|
21
|
+
...props,
|
|
22
|
+
children: _jsx(ToggleGroupContext.Provider, { children: children, value: { size, variant } }),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function ToggleGroupItem({ className, children, variant, size, ...props }) {
|
|
26
|
+
const context = React.useContext(ToggleGroupContext);
|
|
27
|
+
return _jsx(ToggleGroupPrimitive.Item, {
|
|
28
|
+
className: cn(
|
|
29
|
+
toggleVariants({
|
|
30
|
+
size: context.size || size,
|
|
31
|
+
variant: context.variant || variant,
|
|
32
|
+
}),
|
|
33
|
+
'min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l',
|
|
34
|
+
className,
|
|
35
|
+
),
|
|
36
|
+
'data-size': context.size || size,
|
|
37
|
+
'data-slot': 'toggle-group-item',
|
|
38
|
+
'data-variant': context.variant || variant,
|
|
39
|
+
...props,
|
|
40
|
+
children: children,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
import { type VariantProps } from '../utils/cn';
|
|
4
|
+
declare const toggleVariants: (
|
|
5
|
+
props?:
|
|
6
|
+
| ({
|
|
7
|
+
size?: 'default' | 'lg' | 'sm' | undefined;
|
|
8
|
+
variant?: 'default' | 'outline' | undefined;
|
|
9
|
+
} & (
|
|
10
|
+
| {
|
|
11
|
+
class?: import('cva').ClassValue;
|
|
12
|
+
className?: never;
|
|
13
|
+
}
|
|
14
|
+
| {
|
|
15
|
+
class?: never;
|
|
16
|
+
className?: import('cva').ClassValue;
|
|
17
|
+
}
|
|
18
|
+
))
|
|
19
|
+
| undefined,
|
|
20
|
+
) => string;
|
|
21
|
+
declare function Toggle({
|
|
22
|
+
className,
|
|
23
|
+
variant,
|
|
24
|
+
size,
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<typeof TogglePrimitive.Root> &
|
|
27
|
+
VariantProps<typeof toggleVariants>): import('react/jsx-runtime').JSX.Element;
|
|
28
|
+
export { Toggle, toggleVariants };
|
|
29
|
+
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/shadcn/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzD,QAAA,MAAM,cAAc;;;;;;;;;0BAkBlB,CAAC;AAEH,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,2CAQzF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
2
|
+
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { cn, cva } from '../utils/cn';
|
|
4
|
+
|
|
5
|
+
const toggleVariants = cva({
|
|
6
|
+
base: "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
7
|
+
defaultVariants: {
|
|
8
|
+
size: 'default',
|
|
9
|
+
variant: 'default',
|
|
10
|
+
},
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
default: 'h-9 px-2 min-w-9',
|
|
14
|
+
lg: 'h-10 px-2.5 min-w-10',
|
|
15
|
+
sm: 'h-8 px-1.5 min-w-8',
|
|
16
|
+
},
|
|
17
|
+
variant: {
|
|
18
|
+
default: 'bg-transparent',
|
|
19
|
+
outline:
|
|
20
|
+
'border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
function Toggle({ className, variant, size, ...props }) {
|
|
25
|
+
return _jsx(TogglePrimitive.Root, {
|
|
26
|
+
className: cn(toggleVariants({ className, size, variant })),
|
|
27
|
+
'data-slot': 'toggle',
|
|
28
|
+
...props,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function TooltipProvider({
|
|
4
|
+
delayDuration,
|
|
5
|
+
...props
|
|
6
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>): import('react/jsx-runtime').JSX.Element;
|
|
7
|
+
declare function Tooltip({
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
10
|
+
declare function TooltipTrigger({
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import('react/jsx-runtime').JSX.Element;
|
|
13
|
+
declare function TooltipContent({
|
|
14
|
+
className,
|
|
15
|
+
sideOffset,
|
|
16
|
+
children,
|
|
17
|
+
...props
|
|
18
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Content>): import('react/jsx-runtime').JSX.Element;
|
|
19
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
20
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/shadcn/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,eAAe,CAAC,EACvB,aAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,2CAQxD;AAED,iBAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAShF;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAO1F;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,UAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAiBvD;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
|
|
5
|
+
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
6
|
+
return _jsx(TooltipPrimitive.Provider, {
|
|
7
|
+
'data-slot': 'tooltip-provider',
|
|
8
|
+
delayDuration: delayDuration,
|
|
9
|
+
...props,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function Tooltip({ ...props }) {
|
|
13
|
+
return _jsx(TooltipProvider, {
|
|
14
|
+
children: _jsx(TooltipPrimitive.Root, { 'data-slot': 'tooltip', ...props }),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function TooltipTrigger({ ...props }) {
|
|
18
|
+
return _jsx(TooltipPrimitive.Trigger, { 'data-slot': 'tooltip-trigger', ...props });
|
|
19
|
+
}
|
|
20
|
+
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
21
|
+
return _jsx(TooltipPrimitive.Portal, {
|
|
22
|
+
children: _jsxs(TooltipPrimitive.Content, {
|
|
23
|
+
className: cn(
|
|
24
|
+
'bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',
|
|
25
|
+
className,
|
|
26
|
+
),
|
|
27
|
+
'data-slot': 'tooltip-content',
|
|
28
|
+
sideOffset: sideOffset,
|
|
29
|
+
...props,
|
|
30
|
+
children: [
|
|
31
|
+
children,
|
|
32
|
+
_jsx(TooltipPrimitive.Arrow, {
|
|
33
|
+
className:
|
|
34
|
+
'bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]',
|
|
35
|
+
}),
|
|
36
|
+
],
|
|
37
|
+
}),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { BackgroundSlideshow } from "../components/background-slideshow";
|
|
3
|
+
declare const meta: Meta<typeof BackgroundSlideshow>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof BackgroundSlideshow>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithoutSlideshow: Story;
|
|
8
|
+
export declare const FastTransition: Story;
|
|
9
|
+
//# sourceMappingURL=BackgroundSlideshow.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackgroundSlideshow.stories.d.ts","sourceRoot":"","sources":["../../src/stories/BackgroundSlideshow.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,mBAAmB,EAEpB,MAAM,oCAAoC,CAAC;AAE5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAO1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AA0BlD,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAQ9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAS5B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { BackgroundSlideshow, } from "../components/background-slideshow";
|
|
2
|
+
const meta = {
|
|
3
|
+
component: BackgroundSlideshow,
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: "fullscreen",
|
|
6
|
+
},
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
title: "Components/BackgroundSlideshow",
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
const sampleImages = [
|
|
12
|
+
{
|
|
13
|
+
at: { de: "Bild 1", en: "Image 1" },
|
|
14
|
+
fn: "image1.jpg",
|
|
15
|
+
hu: 200,
|
|
16
|
+
id: "1",
|
|
17
|
+
po: false,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
at: { de: "Bild 2", en: "Image 2" },
|
|
21
|
+
fn: "image2.jpg",
|
|
22
|
+
hu: 150,
|
|
23
|
+
id: "2",
|
|
24
|
+
po: false,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
at: { de: "Bild 3", en: "Image 3" },
|
|
28
|
+
fn: "image3.jpg",
|
|
29
|
+
hu: 100,
|
|
30
|
+
id: "3",
|
|
31
|
+
po: false,
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
export const Default = {
|
|
35
|
+
args: {
|
|
36
|
+
baseUrl: "https://via.placeholder.com/{format}?text=Image+{id}",
|
|
37
|
+
className: "h-[400px] w-full",
|
|
38
|
+
images: sampleImages,
|
|
39
|
+
locale: "en",
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export const WithoutSlideshow = {
|
|
43
|
+
args: {
|
|
44
|
+
baseUrl: "https://via.placeholder.com/{format}?text=Static",
|
|
45
|
+
className: "h-[400px] w-full",
|
|
46
|
+
images: sampleImages,
|
|
47
|
+
locale: "en",
|
|
48
|
+
slideshow: false,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
export const FastTransition = {
|
|
52
|
+
args: {
|
|
53
|
+
baseUrl: "https://via.placeholder.com/{format}?text=Fast",
|
|
54
|
+
className: "h-[400px] w-full",
|
|
55
|
+
images: sampleImages,
|
|
56
|
+
locale: "en",
|
|
57
|
+
slideshowInterval: 2000,
|
|
58
|
+
transitionDuration: 1000,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { BlurryGradient } from "../components/blurry-gradient";
|
|
3
|
+
declare const meta: Meta<typeof BlurryGradient>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof BlurryGradient>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WarmColors: Story;
|
|
8
|
+
export declare const CoolColors: Story;
|
|
9
|
+
export declare const NatureColors: Story;
|
|
10
|
+
export declare const FullWidth: Story;
|
|
11
|
+
//# sourceMappingURL=BlurryGradient.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlurryGradient.stories.d.ts","sourceRoot":"","sources":["../../src/stories/BlurryGradient.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAOrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { BlurryGradient } from "../components/blurry-gradient";
|
|
2
|
+
const meta = {
|
|
3
|
+
component: BlurryGradient,
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: "centered",
|
|
6
|
+
},
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
title: "Components/BlurryGradient",
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Default = {
|
|
12
|
+
args: {
|
|
13
|
+
neutralColor: "#f0f0f0",
|
|
14
|
+
primaryColor: "#3b82f6",
|
|
15
|
+
secondaryColor: "#8b5cf6",
|
|
16
|
+
style: { height: "400px", width: "400px" },
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export const WarmColors = {
|
|
20
|
+
args: {
|
|
21
|
+
neutralColor: "#fef3c7",
|
|
22
|
+
primaryColor: "#f97316",
|
|
23
|
+
secondaryColor: "#ef4444",
|
|
24
|
+
style: { height: "400px", width: "400px" },
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
export const CoolColors = {
|
|
28
|
+
args: {
|
|
29
|
+
neutralColor: "#e0f2fe",
|
|
30
|
+
primaryColor: "#0ea5e9",
|
|
31
|
+
secondaryColor: "#06b6d4",
|
|
32
|
+
style: { height: "400px", width: "400px" },
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export const NatureColors = {
|
|
36
|
+
args: {
|
|
37
|
+
neutralColor: "#fef9c3",
|
|
38
|
+
primaryColor: "#22c55e",
|
|
39
|
+
secondaryColor: "#84cc16",
|
|
40
|
+
style: { height: "400px", width: "400px" },
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export const FullWidth = {
|
|
44
|
+
args: {
|
|
45
|
+
neutralColor: "#f0f0f0",
|
|
46
|
+
primaryColor: "#3b82f6",
|
|
47
|
+
secondaryColor: "#8b5cf6",
|
|
48
|
+
style: { height: "200px", width: "100%" },
|
|
49
|
+
},
|
|
50
|
+
parameters: {
|
|
51
|
+
layout: "fullscreen",
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Box } from '../components/box';
|
|
3
|
+
declare const meta: Meta<typeof Box>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Box>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Container: Story;
|
|
8
|
+
export declare const Flex: Story;
|
|
9
|
+
export declare const Grid: Story;
|
|
10
|
+
export declare const Code: Story;
|
|
11
|
+
export declare const AsSection: Story;
|
|
12
|
+
export declare const AllVariants: Story;
|
|
13
|
+
//# sourceMappingURL=Box.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Box.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAO1B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;AAElC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAWlB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAWlB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAKlB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAazB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '../components/box';
|
|
3
|
+
const meta = {
|
|
4
|
+
component: Box,
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'padded',
|
|
7
|
+
},
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
title: 'Components/Box',
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const Default = {
|
|
13
|
+
args: {
|
|
14
|
+
children: 'Default Box',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export const Container = {
|
|
18
|
+
args: {
|
|
19
|
+
children: 'Container Box',
|
|
20
|
+
variant: 'container',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export const Flex = {
|
|
24
|
+
args: {
|
|
25
|
+
children: (_jsxs(_Fragment, { children: [_jsx("span", { children: "Flex Item 1" }), _jsx("span", { children: "Flex Item 2" }), _jsx("span", { children: "Flex Item 3" })] })),
|
|
26
|
+
variant: 'flex',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
export const Grid = {
|
|
30
|
+
args: {
|
|
31
|
+
children: (_jsxs(_Fragment, { children: [_jsx("div", { children: "Grid Item 1" }), _jsx("div", { children: "Grid Item 2" }), _jsx("div", { children: "Grid Item 3" })] })),
|
|
32
|
+
variant: 'grid',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export const Code = {
|
|
36
|
+
args: {
|
|
37
|
+
children: "const example = 'code block';",
|
|
38
|
+
variant: 'code',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
export const AsSection = {
|
|
42
|
+
args: {
|
|
43
|
+
as: 'section',
|
|
44
|
+
children: 'This is rendered as a section element',
|
|
45
|
+
variant: 'section',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
export const AllVariants = {
|
|
49
|
+
render: () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: [_jsx(Box, { variant: "primary", children: "Primary (default)" }), _jsx(Box, { variant: "container", children: "Container" }), _jsx(Box, { variant: "flex", children: "Flex" }), _jsx(Box, { variant: "grid", children: "Grid" }), _jsx(Box, { variant: "code", children: "Code" }), _jsx(Box, { variant: "section", children: "Section" }), _jsx(Box, { variant: "aside", children: "Aside" }), _jsx(Box, { variant: "main", children: "Main" })] })),
|
|
50
|
+
};
|