@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,25 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
export function useOrientation() {
|
|
3
|
+
const [orientation, setOrientation] = useState(() => {
|
|
4
|
+
if (typeof window !== 'undefined') {
|
|
5
|
+
return window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
|
|
6
|
+
}
|
|
7
|
+
return 'portrait';
|
|
8
|
+
});
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (typeof window === 'undefined') {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const handleResize = () => {
|
|
14
|
+
setOrientation(window.innerHeight > window.innerWidth ? 'portrait' : 'landscape');
|
|
15
|
+
};
|
|
16
|
+
window.addEventListener('resize', handleResize);
|
|
17
|
+
window.addEventListener('orientationchange', handleResize);
|
|
18
|
+
handleResize();
|
|
19
|
+
return () => {
|
|
20
|
+
window.removeEventListener('resize', handleResize);
|
|
21
|
+
window.removeEventListener('orientationchange', handleResize);
|
|
22
|
+
};
|
|
23
|
+
}, []);
|
|
24
|
+
return orientation;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { User } from '@supabase/supabase-js';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
export interface UserContextType {
|
|
4
|
+
user: User | null;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const UserContext: import("react").Context<UserContextType>;
|
|
8
|
+
export interface UserContextProviderProps {
|
|
9
|
+
user: User | null;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function UserContextProvider({ user, isLoading, children, }: UserContextProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function useUser(): UserContextType;
|
|
15
|
+
//# sourceMappingURL=use-user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-user.d.ts","sourceRoot":"","sources":["../../src/hooks/use-user.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAiB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAKlE,MAAM,WAAW,eAAe;IAI9B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAIlB,SAAS,EAAE,OAAO,CAAC;CACpB;AAaD,eAAO,MAAM,WAAW,0CAAsD,CAAC;AAK/E,MAAM,WAAW,wBAAwB;IAIvC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAIlB,SAAS,CAAC,EAAE,OAAO,CAAC;IAIpB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAKD,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,SAAiB,EACjB,QAAQ,GACT,EAAE,wBAAwB,2CAE1B;AAMD,wBAAgB,OAAO,IAAI,eAAe,CAQzC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
|
+
const defaultContextValue = {
|
|
4
|
+
isLoading: false,
|
|
5
|
+
user: null,
|
|
6
|
+
};
|
|
7
|
+
export const UserContext = createContext(defaultContextValue);
|
|
8
|
+
export function UserContextProvider({ user, isLoading = false, children, }) {
|
|
9
|
+
return _jsx(UserContext.Provider, { value: { isLoading, user }, children: children });
|
|
10
|
+
}
|
|
11
|
+
export function useUser() {
|
|
12
|
+
const context = useContext(UserContext);
|
|
13
|
+
if (context === undefined) {
|
|
14
|
+
throw new Error('useUser must be used within a UserContextProvider');
|
|
15
|
+
}
|
|
16
|
+
return context;
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function Accordion({
|
|
4
|
+
...props
|
|
5
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
6
|
+
declare function AccordionItem({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Item>): import('react/jsx-runtime').JSX.Element;
|
|
10
|
+
declare function AccordionTrigger({
|
|
11
|
+
className,
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<
|
|
15
|
+
typeof AccordionPrimitive.Trigger
|
|
16
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
17
|
+
declare function AccordionContent({
|
|
18
|
+
className,
|
|
19
|
+
children,
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<
|
|
22
|
+
typeof AccordionPrimitive.Content
|
|
23
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
24
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
25
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/shadcn/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAOpF;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAQtD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAgBzD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAUzD;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import { ChevronDownIcon } from 'lucide-react';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
|
|
6
|
+
function Accordion({ ...props }) {
|
|
7
|
+
return _jsx(AccordionPrimitive.Root, { 'data-slot': 'accordion', ...props });
|
|
8
|
+
}
|
|
9
|
+
function AccordionItem({ className, ...props }) {
|
|
10
|
+
return _jsx(AccordionPrimitive.Item, {
|
|
11
|
+
className: cn('border-b last:border-b-0', className),
|
|
12
|
+
'data-slot': 'accordion-item',
|
|
13
|
+
...props,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
17
|
+
return _jsx(AccordionPrimitive.Header, {
|
|
18
|
+
children: _jsxs(AccordionPrimitive.Trigger, {
|
|
19
|
+
className: cn(
|
|
20
|
+
'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',
|
|
21
|
+
className,
|
|
22
|
+
),
|
|
23
|
+
'data-slot': 'accordion-trigger',
|
|
24
|
+
...props,
|
|
25
|
+
children: [
|
|
26
|
+
children,
|
|
27
|
+
_jsx(ChevronDownIcon, {
|
|
28
|
+
className:
|
|
29
|
+
'text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200',
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
}),
|
|
33
|
+
className: 'flex',
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function AccordionContent({ className, children, ...props }) {
|
|
37
|
+
return _jsx(AccordionPrimitive.Content, {
|
|
38
|
+
className:
|
|
39
|
+
'data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm',
|
|
40
|
+
'data-slot': 'accordion-content',
|
|
41
|
+
...props,
|
|
42
|
+
children: _jsx('div', { children: children, className: cn('pt-0 pb-4', className) }),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function AlertDialog({
|
|
4
|
+
...props
|
|
5
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
6
|
+
declare function AlertDialogTrigger({
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<
|
|
9
|
+
typeof AlertDialogPrimitive.Trigger
|
|
10
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
11
|
+
declare function AlertDialogPortal({
|
|
12
|
+
...props
|
|
13
|
+
}: React.ComponentProps<
|
|
14
|
+
typeof AlertDialogPrimitive.Portal
|
|
15
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
16
|
+
declare function AlertDialogOverlay({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: React.ComponentProps<
|
|
20
|
+
typeof AlertDialogPrimitive.Overlay
|
|
21
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
22
|
+
declare function AlertDialogContent({
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<
|
|
26
|
+
typeof AlertDialogPrimitive.Content
|
|
27
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
28
|
+
declare function AlertDialogHeader({
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
32
|
+
declare function AlertDialogFooter({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
36
|
+
declare function AlertDialogTitle({
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<
|
|
40
|
+
typeof AlertDialogPrimitive.Title
|
|
41
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
42
|
+
declare function AlertDialogDescription({
|
|
43
|
+
className,
|
|
44
|
+
...props
|
|
45
|
+
}: React.ComponentProps<
|
|
46
|
+
typeof AlertDialogPrimitive.Description
|
|
47
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
48
|
+
declare function AlertDialogAction({
|
|
49
|
+
className,
|
|
50
|
+
...props
|
|
51
|
+
}: React.ComponentProps<
|
|
52
|
+
typeof AlertDialogPrimitive.Action
|
|
53
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
54
|
+
declare function AlertDialogCancel({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: React.ComponentProps<
|
|
58
|
+
typeof AlertDialogPrimitive.Cancel
|
|
59
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
60
|
+
export {
|
|
61
|
+
AlertDialog,
|
|
62
|
+
AlertDialogPortal,
|
|
63
|
+
AlertDialogOverlay,
|
|
64
|
+
AlertDialogTrigger,
|
|
65
|
+
AlertDialogContent,
|
|
66
|
+
AlertDialogHeader,
|
|
67
|
+
AlertDialogFooter,
|
|
68
|
+
AlertDialogTitle,
|
|
69
|
+
AlertDialogDescription,
|
|
70
|
+
AlertDialogAction,
|
|
71
|
+
AlertDialogCancel,
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../src/shadcn/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAOxF;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAO3D;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAOhG;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAW3D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAc3D;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ9E;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ9E;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC,2CAQzD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,WAAW,CAAC,2CAQ/D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAO1D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAO1D;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
import { buttonVariants } from './button';
|
|
6
|
+
|
|
7
|
+
function AlertDialog({ ...props }) {
|
|
8
|
+
return _jsx(AlertDialogPrimitive.Root, { 'data-slot': 'alert-dialog', ...props });
|
|
9
|
+
}
|
|
10
|
+
function AlertDialogTrigger({ ...props }) {
|
|
11
|
+
return _jsx(AlertDialogPrimitive.Trigger, { 'data-slot': 'alert-dialog-trigger', ...props });
|
|
12
|
+
}
|
|
13
|
+
function AlertDialogPortal({ ...props }) {
|
|
14
|
+
return _jsx(AlertDialogPrimitive.Portal, { 'data-slot': 'alert-dialog-portal', ...props });
|
|
15
|
+
}
|
|
16
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
17
|
+
return _jsx(AlertDialogPrimitive.Overlay, {
|
|
18
|
+
className: cn(
|
|
19
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
|
|
20
|
+
className,
|
|
21
|
+
),
|
|
22
|
+
'data-slot': 'alert-dialog-overlay',
|
|
23
|
+
...props,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function AlertDialogContent({ className, ...props }) {
|
|
27
|
+
return _jsxs(AlertDialogPortal, {
|
|
28
|
+
children: [
|
|
29
|
+
_jsx(AlertDialogOverlay, {}),
|
|
30
|
+
_jsx(AlertDialogPrimitive.Content, {
|
|
31
|
+
className: cn(
|
|
32
|
+
'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',
|
|
33
|
+
className,
|
|
34
|
+
),
|
|
35
|
+
'data-slot': 'alert-dialog-content',
|
|
36
|
+
...props,
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
42
|
+
return _jsx('div', {
|
|
43
|
+
className: cn('flex flex-col gap-2 text-center sm:text-left', className),
|
|
44
|
+
'data-slot': 'alert-dialog-header',
|
|
45
|
+
...props,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
49
|
+
return _jsx('div', {
|
|
50
|
+
className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className),
|
|
51
|
+
'data-slot': 'alert-dialog-footer',
|
|
52
|
+
...props,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
56
|
+
return _jsx(AlertDialogPrimitive.Title, {
|
|
57
|
+
className: cn('text-lg font-semibold', className),
|
|
58
|
+
'data-slot': 'alert-dialog-title',
|
|
59
|
+
...props,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
63
|
+
return _jsx(AlertDialogPrimitive.Description, {
|
|
64
|
+
className: cn('text-muted-foreground text-sm', className),
|
|
65
|
+
'data-slot': 'alert-dialog-description',
|
|
66
|
+
...props,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function AlertDialogAction({ className, ...props }) {
|
|
70
|
+
return _jsx(AlertDialogPrimitive.Action, {
|
|
71
|
+
className: cn(buttonVariants(), className),
|
|
72
|
+
...props,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function AlertDialogCancel({ className, ...props }) {
|
|
76
|
+
return _jsx(AlertDialogPrimitive.Cancel, {
|
|
77
|
+
className: cn(buttonVariants({ variant: 'outline' }), className),
|
|
78
|
+
...props,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
AlertDialog,
|
|
83
|
+
AlertDialogPortal,
|
|
84
|
+
AlertDialogOverlay,
|
|
85
|
+
AlertDialogTrigger,
|
|
86
|
+
AlertDialogContent,
|
|
87
|
+
AlertDialogHeader,
|
|
88
|
+
AlertDialogFooter,
|
|
89
|
+
AlertDialogTitle,
|
|
90
|
+
AlertDialogDescription,
|
|
91
|
+
AlertDialogAction,
|
|
92
|
+
AlertDialogCancel,
|
|
93
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import { type VariantProps } from '../utils/cn';
|
|
3
|
+
declare const alertVariants: (
|
|
4
|
+
props?:
|
|
5
|
+
| ({
|
|
6
|
+
variant?: 'default' | 'destructive' | undefined;
|
|
7
|
+
} & (
|
|
8
|
+
| {
|
|
9
|
+
class?: import('cva').ClassValue;
|
|
10
|
+
className?: never;
|
|
11
|
+
}
|
|
12
|
+
| {
|
|
13
|
+
class?: never;
|
|
14
|
+
className?: import('cva').ClassValue;
|
|
15
|
+
}
|
|
16
|
+
))
|
|
17
|
+
| undefined,
|
|
18
|
+
) => string;
|
|
19
|
+
declare function Alert({
|
|
20
|
+
className,
|
|
21
|
+
variant,
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<'div'> &
|
|
24
|
+
VariantProps<typeof alertVariants>): import('react/jsx-runtime').JSX.Element;
|
|
25
|
+
declare function AlertTitle({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
29
|
+
declare function AlertDescription({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
33
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
34
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/shadcn/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzD,QAAA,MAAM,aAAa;;;;;;;;0BAYjB,CAAC;AAEH,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,2CASlE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW7E;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cn, cva } from '../utils/cn';
|
|
3
|
+
|
|
4
|
+
const alertVariants = cva({
|
|
5
|
+
base: 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',
|
|
6
|
+
defaultVariants: {
|
|
7
|
+
variant: 'default',
|
|
8
|
+
},
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: 'bg-card text-card-foreground',
|
|
12
|
+
destructive:
|
|
13
|
+
'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
function Alert({ className, variant, ...props }) {
|
|
18
|
+
return _jsx('div', {
|
|
19
|
+
className: cn(alertVariants({ variant }), className),
|
|
20
|
+
'data-slot': 'alert',
|
|
21
|
+
role: 'alert',
|
|
22
|
+
...props,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function AlertTitle({ className, ...props }) {
|
|
26
|
+
return _jsx('div', {
|
|
27
|
+
className: cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className),
|
|
28
|
+
'data-slot': 'alert-title',
|
|
29
|
+
...props,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function AlertDescription({ className, ...props }) {
|
|
33
|
+
return _jsx('div', {
|
|
34
|
+
className: cn(
|
|
35
|
+
'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',
|
|
36
|
+
className,
|
|
37
|
+
),
|
|
38
|
+
'data-slot': 'alert-description',
|
|
39
|
+
...props,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
2
|
+
declare function AspectRatio({
|
|
3
|
+
...props
|
|
4
|
+
}: React.ComponentProps<typeof AspectRatioPrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
5
|
+
export { AspectRatio };
|
|
6
|
+
//# sourceMappingURL=aspect-ratio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../src/shadcn/aspect-ratio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAErE,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAOxF;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
2
|
+
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
function AspectRatio({ ...props }) {
|
|
5
|
+
return _jsx(AspectRatioPrimitive.Root, { 'data-slot': 'aspect-ratio', ...props });
|
|
6
|
+
}
|
|
7
|
+
export { AspectRatio };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function Avatar({
|
|
4
|
+
className,
|
|
5
|
+
...props
|
|
6
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
7
|
+
declare function AvatarImage({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Image>): import('react/jsx-runtime').JSX.Element;
|
|
11
|
+
declare function AvatarFallback({
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import('react/jsx-runtime').JSX.Element;
|
|
15
|
+
export { Avatar, AvatarImage, AvatarFallback };
|
|
16
|
+
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/shadcn/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAQzF;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQ/F;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,QAAQ,CAAC,2CAQvD;AAED,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
3
|
+
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
|
|
6
|
+
function Avatar({ className, ...props }) {
|
|
7
|
+
return _jsx(AvatarPrimitive.Root, {
|
|
8
|
+
className: cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className),
|
|
9
|
+
'data-slot': 'avatar',
|
|
10
|
+
...props,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function AvatarImage({ className, ...props }) {
|
|
14
|
+
return _jsx(AvatarPrimitive.Image, {
|
|
15
|
+
className: cn('aspect-square size-full', className),
|
|
16
|
+
'data-slot': 'avatar-image',
|
|
17
|
+
...props,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function AvatarFallback({ className, ...props }) {
|
|
21
|
+
return _jsx(AvatarPrimitive.Fallback, {
|
|
22
|
+
className: cn('bg-muted flex size-full items-center justify-center rounded-full', className),
|
|
23
|
+
'data-slot': 'avatar-fallback',
|
|
24
|
+
...props,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import { type VariantProps } from '../utils/cn';
|
|
3
|
+
declare const badgeVariants: (
|
|
4
|
+
props?:
|
|
5
|
+
| ({
|
|
6
|
+
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | undefined;
|
|
7
|
+
} & (
|
|
8
|
+
| {
|
|
9
|
+
class?: import('cva').ClassValue;
|
|
10
|
+
className?: never;
|
|
11
|
+
}
|
|
12
|
+
| {
|
|
13
|
+
class?: never;
|
|
14
|
+
className?: import('cva').ClassValue;
|
|
15
|
+
}
|
|
16
|
+
))
|
|
17
|
+
| undefined,
|
|
18
|
+
) => string;
|
|
19
|
+
declare function Badge({
|
|
20
|
+
className,
|
|
21
|
+
variant,
|
|
22
|
+
asChild,
|
|
23
|
+
...props
|
|
24
|
+
}: React.ComponentProps<'span'> &
|
|
25
|
+
VariantProps<typeof badgeVariants> & {
|
|
26
|
+
asChild?: boolean;
|
|
27
|
+
}): import('react/jsx-runtime').JSX.Element;
|
|
28
|
+
export { Badge, badgeVariants };
|
|
29
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/shadcn/badge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzD,QAAA,MAAM,aAAa;;;;;;;;0BAejB,CAAC;AAEH,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,2CAU3F;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
2
|
+
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { cn, cva } from '../utils/cn';
|
|
4
|
+
|
|
5
|
+
const badgeVariants = cva({
|
|
6
|
+
base: 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',
|
|
7
|
+
defaultVariants: {
|
|
8
|
+
variant: 'default',
|
|
9
|
+
},
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
|
|
13
|
+
destructive:
|
|
14
|
+
'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
15
|
+
outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
|
|
16
|
+
secondary:
|
|
17
|
+
'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
function Badge({ className, variant, asChild = false, ...props }) {
|
|
22
|
+
const Comp = asChild ? Slot : 'span';
|
|
23
|
+
return _jsx(Comp, {
|
|
24
|
+
className: cn(badgeVariants({ variant }), className),
|
|
25
|
+
'data-slot': 'badge',
|
|
26
|
+
...props,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
declare function Breadcrumb({
|
|
3
|
+
...props
|
|
4
|
+
}: React.ComponentProps<'nav'>): import('react/jsx-runtime').JSX.Element;
|
|
5
|
+
declare function BreadcrumbList({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<'ol'>): import('react/jsx-runtime').JSX.Element;
|
|
9
|
+
declare function BreadcrumbItem({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<'li'>): import('react/jsx-runtime').JSX.Element;
|
|
13
|
+
declare function BreadcrumbLink({
|
|
14
|
+
asChild,
|
|
15
|
+
className,
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<'a'> & {
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
}): import('react/jsx-runtime').JSX.Element;
|
|
20
|
+
declare function BreadcrumbPage({
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<'span'>): import('react/jsx-runtime').JSX.Element;
|
|
24
|
+
declare function BreadcrumbSeparator({
|
|
25
|
+
children,
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<'li'>): import('react/jsx-runtime').JSX.Element;
|
|
29
|
+
declare function BreadcrumbEllipsis({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<'span'>): import('react/jsx-runtime').JSX.Element;
|
|
33
|
+
export {
|
|
34
|
+
Breadcrumb,
|
|
35
|
+
BreadcrumbList,
|
|
36
|
+
BreadcrumbItem,
|
|
37
|
+
BreadcrumbLink,
|
|
38
|
+
BreadcrumbPage,
|
|
39
|
+
BreadcrumbSeparator,
|
|
40
|
+
BreadcrumbEllipsis,
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/shadcn/breadcrumb.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ5D;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAW1E;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAQ1E;AAED,iBAAS,cAAc,CAAC,EACtB,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,2CAUA;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAU5E;AAED,iBAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAYzF;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAahF;AAED,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
2
|
+
import { ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
|
|
6
|
+
function Breadcrumb({ ...props }) {
|
|
7
|
+
return _jsx('nav', { 'aria-label': 'breadcrumb', 'data-slot': 'breadcrumb', ...props });
|
|
8
|
+
}
|
|
9
|
+
function BreadcrumbList({ className, ...props }) {
|
|
10
|
+
return _jsx('ol', {
|
|
11
|
+
className: cn(
|
|
12
|
+
'text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5',
|
|
13
|
+
className,
|
|
14
|
+
),
|
|
15
|
+
'data-slot': 'breadcrumb-list',
|
|
16
|
+
...props,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
20
|
+
return _jsx('li', {
|
|
21
|
+
className: cn('inline-flex items-center gap-1.5', className),
|
|
22
|
+
'data-slot': 'breadcrumb-item',
|
|
23
|
+
...props,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
27
|
+
const Comp = asChild ? Slot : 'a';
|
|
28
|
+
return _jsx(Comp, {
|
|
29
|
+
className: cn('hover:text-foreground transition-colors', className),
|
|
30
|
+
'data-slot': 'breadcrumb-link',
|
|
31
|
+
...props,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
35
|
+
return _jsx('span', {
|
|
36
|
+
'aria-current': 'page',
|
|
37
|
+
'aria-disabled': 'true',
|
|
38
|
+
className: cn('text-foreground font-normal', className),
|
|
39
|
+
'data-slot': 'breadcrumb-page',
|
|
40
|
+
...props,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
44
|
+
return _jsx('li', {
|
|
45
|
+
'aria-hidden': 'true',
|
|
46
|
+
className: cn('[&>svg]:size-3.5', className),
|
|
47
|
+
'data-slot': 'breadcrumb-separator',
|
|
48
|
+
role: 'presentation',
|
|
49
|
+
...props,
|
|
50
|
+
children: children ?? _jsx(ChevronRight, {}),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function BreadcrumbEllipsis({ className, ...props }) {
|
|
54
|
+
return _jsxs('span', {
|
|
55
|
+
'aria-hidden': 'true',
|
|
56
|
+
className: cn('flex size-9 items-center justify-center', className),
|
|
57
|
+
'data-slot': 'breadcrumb-ellipsis',
|
|
58
|
+
role: 'presentation',
|
|
59
|
+
...props,
|
|
60
|
+
children: [
|
|
61
|
+
_jsx(MoreHorizontal, { className: 'size-4' }),
|
|
62
|
+
_jsx('span', { children: 'More', className: 'sr-only' }),
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
Breadcrumb,
|
|
68
|
+
BreadcrumbList,
|
|
69
|
+
BreadcrumbItem,
|
|
70
|
+
BreadcrumbLink,
|
|
71
|
+
BreadcrumbPage,
|
|
72
|
+
BreadcrumbSeparator,
|
|
73
|
+
BreadcrumbEllipsis,
|
|
74
|
+
};
|