@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,151 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
3
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
5
|
+
import { cn } from '../utils/cn';
|
|
6
|
+
|
|
7
|
+
function ContextMenu({ ...props }) {
|
|
8
|
+
return _jsx(ContextMenuPrimitive.Root, { 'data-slot': 'context-menu', ...props });
|
|
9
|
+
}
|
|
10
|
+
function ContextMenuTrigger({ ...props }) {
|
|
11
|
+
return _jsx(ContextMenuPrimitive.Trigger, { 'data-slot': 'context-menu-trigger', ...props });
|
|
12
|
+
}
|
|
13
|
+
function ContextMenuGroup({ ...props }) {
|
|
14
|
+
return _jsx(ContextMenuPrimitive.Group, { 'data-slot': 'context-menu-group', ...props });
|
|
15
|
+
}
|
|
16
|
+
function ContextMenuPortal({ ...props }) {
|
|
17
|
+
return _jsx(ContextMenuPrimitive.Portal, { 'data-slot': 'context-menu-portal', ...props });
|
|
18
|
+
}
|
|
19
|
+
function ContextMenuSub({ ...props }) {
|
|
20
|
+
return _jsx(ContextMenuPrimitive.Sub, { 'data-slot': 'context-menu-sub', ...props });
|
|
21
|
+
}
|
|
22
|
+
function ContextMenuRadioGroup({ ...props }) {
|
|
23
|
+
return _jsx(ContextMenuPrimitive.RadioGroup, {
|
|
24
|
+
'data-slot': 'context-menu-radio-group',
|
|
25
|
+
...props,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function ContextMenuSubTrigger({ className, inset, children, ...props }) {
|
|
29
|
+
return _jsxs(ContextMenuPrimitive.SubTrigger, {
|
|
30
|
+
className: cn(
|
|
31
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
32
|
+
className,
|
|
33
|
+
),
|
|
34
|
+
'data-inset': inset,
|
|
35
|
+
'data-slot': 'context-menu-sub-trigger',
|
|
36
|
+
...props,
|
|
37
|
+
children: [children, _jsx(ChevronRightIcon, { className: 'ml-auto' })],
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function ContextMenuSubContent({ className, ...props }) {
|
|
41
|
+
return _jsx(ContextMenuPrimitive.SubContent, {
|
|
42
|
+
className: cn(
|
|
43
|
+
'bg-popover text-popover-foreground 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 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 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',
|
|
44
|
+
className,
|
|
45
|
+
),
|
|
46
|
+
'data-slot': 'context-menu-sub-content',
|
|
47
|
+
...props,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function ContextMenuContent({ className, ...props }) {
|
|
51
|
+
return _jsx(ContextMenuPrimitive.Portal, {
|
|
52
|
+
children: _jsx(ContextMenuPrimitive.Content, {
|
|
53
|
+
className: cn(
|
|
54
|
+
'bg-popover text-popover-foreground 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 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 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',
|
|
55
|
+
className,
|
|
56
|
+
),
|
|
57
|
+
'data-slot': 'context-menu-content',
|
|
58
|
+
...props,
|
|
59
|
+
}),
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function ContextMenuItem({ className, inset, variant = 'default', ...props }) {
|
|
63
|
+
return _jsx(ContextMenuPrimitive.Item, {
|
|
64
|
+
className: cn(
|
|
65
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
66
|
+
className,
|
|
67
|
+
),
|
|
68
|
+
'data-inset': inset,
|
|
69
|
+
'data-slot': 'context-menu-item',
|
|
70
|
+
'data-variant': variant,
|
|
71
|
+
...props,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function ContextMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
75
|
+
return _jsxs(ContextMenuPrimitive.CheckboxItem, {
|
|
76
|
+
...(checked !== undefined ? { checked } : {}),
|
|
77
|
+
className: cn(
|
|
78
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
79
|
+
className,
|
|
80
|
+
),
|
|
81
|
+
'data-slot': 'context-menu-checkbox-item',
|
|
82
|
+
...props,
|
|
83
|
+
children: [
|
|
84
|
+
_jsx('span', {
|
|
85
|
+
children: _jsx(ContextMenuPrimitive.ItemIndicator, {
|
|
86
|
+
children: _jsx(CheckIcon, { className: 'size-4' }),
|
|
87
|
+
}),
|
|
88
|
+
className: 'pointer-events-none absolute left-2 flex size-3.5 items-center justify-center',
|
|
89
|
+
}),
|
|
90
|
+
children,
|
|
91
|
+
],
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function ContextMenuRadioItem({ className, children, ...props }) {
|
|
95
|
+
return _jsxs(ContextMenuPrimitive.RadioItem, {
|
|
96
|
+
className: cn(
|
|
97
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
98
|
+
className,
|
|
99
|
+
),
|
|
100
|
+
'data-slot': 'context-menu-radio-item',
|
|
101
|
+
...props,
|
|
102
|
+
children: [
|
|
103
|
+
_jsx('span', {
|
|
104
|
+
children: _jsx(ContextMenuPrimitive.ItemIndicator, {
|
|
105
|
+
children: _jsx(CircleIcon, { className: 'size-2 fill-current' }),
|
|
106
|
+
}),
|
|
107
|
+
className: 'pointer-events-none absolute left-2 flex size-3.5 items-center justify-center',
|
|
108
|
+
}),
|
|
109
|
+
children,
|
|
110
|
+
],
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function ContextMenuLabel({ className, inset, ...props }) {
|
|
114
|
+
return _jsx(ContextMenuPrimitive.Label, {
|
|
115
|
+
className: cn('text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className),
|
|
116
|
+
'data-inset': inset,
|
|
117
|
+
'data-slot': 'context-menu-label',
|
|
118
|
+
...props,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function ContextMenuSeparator({ className, ...props }) {
|
|
122
|
+
return _jsx(ContextMenuPrimitive.Separator, {
|
|
123
|
+
className: cn('bg-border -mx-1 my-1 h-px', className),
|
|
124
|
+
'data-slot': 'context-menu-separator',
|
|
125
|
+
...props,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function ContextMenuShortcut({ className, ...props }) {
|
|
129
|
+
return _jsx('span', {
|
|
130
|
+
className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className),
|
|
131
|
+
'data-slot': 'context-menu-shortcut',
|
|
132
|
+
...props,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
export {
|
|
136
|
+
ContextMenu,
|
|
137
|
+
ContextMenuTrigger,
|
|
138
|
+
ContextMenuContent,
|
|
139
|
+
ContextMenuItem,
|
|
140
|
+
ContextMenuCheckboxItem,
|
|
141
|
+
ContextMenuRadioItem,
|
|
142
|
+
ContextMenuLabel,
|
|
143
|
+
ContextMenuSeparator,
|
|
144
|
+
ContextMenuShortcut,
|
|
145
|
+
ContextMenuGroup,
|
|
146
|
+
ContextMenuPortal,
|
|
147
|
+
ContextMenuSub,
|
|
148
|
+
ContextMenuSubContent,
|
|
149
|
+
ContextMenuSubTrigger,
|
|
150
|
+
ContextMenuRadioGroup,
|
|
151
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function Dialog({
|
|
4
|
+
...props
|
|
5
|
+
}: React.ComponentProps<typeof DialogPrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
6
|
+
declare function DialogTrigger({
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<typeof DialogPrimitive.Trigger>): import('react/jsx-runtime').JSX.Element;
|
|
9
|
+
declare function DialogPortal({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof DialogPrimitive.Portal>): import('react/jsx-runtime').JSX.Element;
|
|
12
|
+
declare function DialogClose({
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof DialogPrimitive.Close>): import('react/jsx-runtime').JSX.Element;
|
|
15
|
+
declare function DialogOverlay({
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}: React.ComponentProps<typeof DialogPrimitive.Overlay>): import('react/jsx-runtime').JSX.Element;
|
|
19
|
+
declare function DialogContent({
|
|
20
|
+
className,
|
|
21
|
+
children,
|
|
22
|
+
showCloseButton,
|
|
23
|
+
...props
|
|
24
|
+
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
25
|
+
showCloseButton?: boolean;
|
|
26
|
+
}): import('react/jsx-runtime').JSX.Element;
|
|
27
|
+
declare function DialogHeader({
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
31
|
+
declare function DialogFooter({
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
35
|
+
declare function DialogTitle({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: React.ComponentProps<typeof DialogPrimitive.Title>): import('react/jsx-runtime').JSX.Element;
|
|
39
|
+
declare function DialogDescription({
|
|
40
|
+
className,
|
|
41
|
+
...props
|
|
42
|
+
}: React.ComponentProps<
|
|
43
|
+
typeof DialogPrimitive.Description
|
|
44
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
45
|
+
export {
|
|
46
|
+
Dialog,
|
|
47
|
+
DialogClose,
|
|
48
|
+
DialogContent,
|
|
49
|
+
DialogDescription,
|
|
50
|
+
DialogFooter,
|
|
51
|
+
DialogHeader,
|
|
52
|
+
DialogOverlay,
|
|
53
|
+
DialogPortal,
|
|
54
|
+
DialogTitle,
|
|
55
|
+
DialogTrigger,
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/shadcn/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAO9E;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAOxF;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,2CAOtF;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAOpF;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAWtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IACxD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,2CAyBA;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQ/F;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQ1D;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
import { XIcon } from 'lucide-react';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
|
|
6
|
+
function Dialog({ ...props }) {
|
|
7
|
+
return _jsx(DialogPrimitive.Root, { 'data-slot': 'dialog', ...props });
|
|
8
|
+
}
|
|
9
|
+
function DialogTrigger({ ...props }) {
|
|
10
|
+
return _jsx(DialogPrimitive.Trigger, { 'data-slot': 'dialog-trigger', ...props });
|
|
11
|
+
}
|
|
12
|
+
function DialogPortal({ ...props }) {
|
|
13
|
+
return _jsx(DialogPrimitive.Portal, { 'data-slot': 'dialog-portal', ...props });
|
|
14
|
+
}
|
|
15
|
+
function DialogClose({ ...props }) {
|
|
16
|
+
return _jsx(DialogPrimitive.Close, { 'data-slot': 'dialog-close', ...props });
|
|
17
|
+
}
|
|
18
|
+
function DialogOverlay({ className, ...props }) {
|
|
19
|
+
return _jsx(DialogPrimitive.Overlay, {
|
|
20
|
+
className: cn(
|
|
21
|
+
'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',
|
|
22
|
+
className,
|
|
23
|
+
),
|
|
24
|
+
'data-slot': 'dialog-overlay',
|
|
25
|
+
...props,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
29
|
+
return _jsxs(DialogPortal, {
|
|
30
|
+
children: [
|
|
31
|
+
_jsx(DialogOverlay, {}),
|
|
32
|
+
_jsxs(DialogPrimitive.Content, {
|
|
33
|
+
className: cn(
|
|
34
|
+
'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',
|
|
35
|
+
className,
|
|
36
|
+
),
|
|
37
|
+
'data-slot': 'dialog-content',
|
|
38
|
+
...props,
|
|
39
|
+
children: [
|
|
40
|
+
children,
|
|
41
|
+
showCloseButton &&
|
|
42
|
+
_jsxs(DialogPrimitive.Close, {
|
|
43
|
+
children: [
|
|
44
|
+
_jsx(XIcon, {}),
|
|
45
|
+
_jsx('span', { children: 'Close', className: 'sr-only' }),
|
|
46
|
+
],
|
|
47
|
+
className:
|
|
48
|
+
"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
49
|
+
'data-slot': 'dialog-close',
|
|
50
|
+
}),
|
|
51
|
+
],
|
|
52
|
+
}),
|
|
53
|
+
],
|
|
54
|
+
'data-slot': 'dialog-portal',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function DialogHeader({ className, ...props }) {
|
|
58
|
+
return _jsx('div', {
|
|
59
|
+
className: cn('flex flex-col gap-2 text-center sm:text-left', className),
|
|
60
|
+
'data-slot': 'dialog-header',
|
|
61
|
+
...props,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function DialogFooter({ className, ...props }) {
|
|
65
|
+
return _jsx('div', {
|
|
66
|
+
className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className),
|
|
67
|
+
'data-slot': 'dialog-footer',
|
|
68
|
+
...props,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function DialogTitle({ className, ...props }) {
|
|
72
|
+
return _jsx(DialogPrimitive.Title, {
|
|
73
|
+
className: cn('text-lg leading-none font-semibold', className),
|
|
74
|
+
'data-slot': 'dialog-title',
|
|
75
|
+
...props,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function DialogDescription({ className, ...props }) {
|
|
79
|
+
return _jsx(DialogPrimitive.Description, {
|
|
80
|
+
className: cn('text-muted-foreground text-sm', className),
|
|
81
|
+
'data-slot': 'dialog-description',
|
|
82
|
+
...props,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
Dialog,
|
|
87
|
+
DialogClose,
|
|
88
|
+
DialogContent,
|
|
89
|
+
DialogDescription,
|
|
90
|
+
DialogFooter,
|
|
91
|
+
DialogHeader,
|
|
92
|
+
DialogOverlay,
|
|
93
|
+
DialogPortal,
|
|
94
|
+
DialogTitle,
|
|
95
|
+
DialogTrigger,
|
|
96
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
3
|
+
declare function Drawer({
|
|
4
|
+
...props
|
|
5
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
6
|
+
declare function DrawerTrigger({
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import('react/jsx-runtime').JSX.Element;
|
|
9
|
+
declare function DrawerPortal({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Portal>): import('react/jsx-runtime').JSX.Element;
|
|
12
|
+
declare function DrawerClose({
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Close>): import('react/jsx-runtime').JSX.Element;
|
|
15
|
+
declare function DrawerOverlay({
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Overlay>): import('react/jsx-runtime').JSX.Element;
|
|
19
|
+
declare function DrawerContent({
|
|
20
|
+
className,
|
|
21
|
+
children,
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Content>): import('react/jsx-runtime').JSX.Element;
|
|
24
|
+
declare function DrawerHeader({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
28
|
+
declare function DrawerFooter({
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
32
|
+
declare function DrawerTitle({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Title>): import('react/jsx-runtime').JSX.Element;
|
|
36
|
+
declare function DrawerDescription({
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<
|
|
40
|
+
typeof DrawerPrimitive.Description
|
|
41
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
42
|
+
export {
|
|
43
|
+
Drawer,
|
|
44
|
+
DrawerPortal,
|
|
45
|
+
DrawerOverlay,
|
|
46
|
+
DrawerTrigger,
|
|
47
|
+
DrawerClose,
|
|
48
|
+
DrawerContent,
|
|
49
|
+
DrawerHeader,
|
|
50
|
+
DrawerFooter,
|
|
51
|
+
DrawerTitle,
|
|
52
|
+
DrawerDescription,
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/shadcn/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAGjD,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAO9E;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAOxF;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,2CAOtF;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAOpF;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAWtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAqBtD;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQ/F;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQ1D;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
|
|
5
|
+
function Drawer({ ...props }) {
|
|
6
|
+
return _jsx(DrawerPrimitive.Root, { 'data-slot': 'drawer', ...props });
|
|
7
|
+
}
|
|
8
|
+
function DrawerTrigger({ ...props }) {
|
|
9
|
+
return _jsx(DrawerPrimitive.Trigger, { 'data-slot': 'drawer-trigger', ...props });
|
|
10
|
+
}
|
|
11
|
+
function DrawerPortal({ ...props }) {
|
|
12
|
+
return _jsx(DrawerPrimitive.Portal, { 'data-slot': 'drawer-portal', ...props });
|
|
13
|
+
}
|
|
14
|
+
function DrawerClose({ ...props }) {
|
|
15
|
+
return _jsx(DrawerPrimitive.Close, { 'data-slot': 'drawer-close', ...props });
|
|
16
|
+
}
|
|
17
|
+
function DrawerOverlay({ className, ...props }) {
|
|
18
|
+
return _jsx(DrawerPrimitive.Overlay, {
|
|
19
|
+
className: cn(
|
|
20
|
+
'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',
|
|
21
|
+
className,
|
|
22
|
+
),
|
|
23
|
+
'data-slot': 'drawer-overlay',
|
|
24
|
+
...props,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function DrawerContent({ className, children, ...props }) {
|
|
28
|
+
return _jsxs(DrawerPortal, {
|
|
29
|
+
children: [
|
|
30
|
+
_jsx(DrawerOverlay, {}),
|
|
31
|
+
_jsxs(DrawerPrimitive.Content, {
|
|
32
|
+
className: cn(
|
|
33
|
+
'group/drawer-content bg-background fixed z-50 flex h-auto flex-col',
|
|
34
|
+
'data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b',
|
|
35
|
+
'data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t',
|
|
36
|
+
'data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm',
|
|
37
|
+
'data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm',
|
|
38
|
+
className,
|
|
39
|
+
),
|
|
40
|
+
'data-slot': 'drawer-content',
|
|
41
|
+
...props,
|
|
42
|
+
children: [
|
|
43
|
+
_jsx('div', {
|
|
44
|
+
className:
|
|
45
|
+
'bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block',
|
|
46
|
+
}),
|
|
47
|
+
children,
|
|
48
|
+
],
|
|
49
|
+
}),
|
|
50
|
+
],
|
|
51
|
+
'data-slot': 'drawer-portal',
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function DrawerHeader({ className, ...props }) {
|
|
55
|
+
return _jsx('div', {
|
|
56
|
+
className: cn(
|
|
57
|
+
'flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left',
|
|
58
|
+
className,
|
|
59
|
+
),
|
|
60
|
+
'data-slot': 'drawer-header',
|
|
61
|
+
...props,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function DrawerFooter({ className, ...props }) {
|
|
65
|
+
return _jsx('div', {
|
|
66
|
+
className: cn('mt-auto flex flex-col gap-2 p-4', className),
|
|
67
|
+
'data-slot': 'drawer-footer',
|
|
68
|
+
...props,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function DrawerTitle({ className, ...props }) {
|
|
72
|
+
return _jsx(DrawerPrimitive.Title, {
|
|
73
|
+
className: cn('text-foreground font-semibold', className),
|
|
74
|
+
'data-slot': 'drawer-title',
|
|
75
|
+
...props,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function DrawerDescription({ className, ...props }) {
|
|
79
|
+
return _jsx(DrawerPrimitive.Description, {
|
|
80
|
+
className: cn('text-muted-foreground text-sm', className),
|
|
81
|
+
'data-slot': 'drawer-description',
|
|
82
|
+
...props,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
Drawer,
|
|
87
|
+
DrawerPortal,
|
|
88
|
+
DrawerOverlay,
|
|
89
|
+
DrawerTrigger,
|
|
90
|
+
DrawerClose,
|
|
91
|
+
DrawerContent,
|
|
92
|
+
DrawerHeader,
|
|
93
|
+
DrawerFooter,
|
|
94
|
+
DrawerTitle,
|
|
95
|
+
DrawerDescription,
|
|
96
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function DropdownMenu({
|
|
4
|
+
...props
|
|
5
|
+
}: React.ComponentProps<
|
|
6
|
+
typeof DropdownMenuPrimitive.Root
|
|
7
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
8
|
+
declare function DropdownMenuPortal({
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<
|
|
11
|
+
typeof DropdownMenuPrimitive.Portal
|
|
12
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
13
|
+
declare function DropdownMenuTrigger({
|
|
14
|
+
...props
|
|
15
|
+
}: React.ComponentProps<
|
|
16
|
+
typeof DropdownMenuPrimitive.Trigger
|
|
17
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
18
|
+
declare function DropdownMenuContent({
|
|
19
|
+
className,
|
|
20
|
+
sideOffset,
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<
|
|
23
|
+
typeof DropdownMenuPrimitive.Content
|
|
24
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
25
|
+
declare function DropdownMenuGroup({
|
|
26
|
+
...props
|
|
27
|
+
}: React.ComponentProps<
|
|
28
|
+
typeof DropdownMenuPrimitive.Group
|
|
29
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
30
|
+
declare function DropdownMenuItem({
|
|
31
|
+
className,
|
|
32
|
+
inset,
|
|
33
|
+
variant,
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
36
|
+
inset?: boolean;
|
|
37
|
+
variant?: 'default' | 'destructive';
|
|
38
|
+
}): import('react/jsx-runtime').JSX.Element;
|
|
39
|
+
declare function DropdownMenuCheckboxItem({
|
|
40
|
+
className,
|
|
41
|
+
children,
|
|
42
|
+
checked,
|
|
43
|
+
...props
|
|
44
|
+
}: React.ComponentProps<
|
|
45
|
+
typeof DropdownMenuPrimitive.CheckboxItem
|
|
46
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
47
|
+
declare function DropdownMenuRadioGroup({
|
|
48
|
+
...props
|
|
49
|
+
}: React.ComponentProps<
|
|
50
|
+
typeof DropdownMenuPrimitive.RadioGroup
|
|
51
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
52
|
+
declare function DropdownMenuRadioItem({
|
|
53
|
+
className,
|
|
54
|
+
children,
|
|
55
|
+
...props
|
|
56
|
+
}: React.ComponentProps<
|
|
57
|
+
typeof DropdownMenuPrimitive.RadioItem
|
|
58
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
59
|
+
declare function DropdownMenuLabel({
|
|
60
|
+
className,
|
|
61
|
+
inset,
|
|
62
|
+
...props
|
|
63
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
64
|
+
inset?: boolean;
|
|
65
|
+
}): import('react/jsx-runtime').JSX.Element;
|
|
66
|
+
declare function DropdownMenuSeparator({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}: React.ComponentProps<
|
|
70
|
+
typeof DropdownMenuPrimitive.Separator
|
|
71
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
72
|
+
declare function DropdownMenuShortcut({
|
|
73
|
+
className,
|
|
74
|
+
...props
|
|
75
|
+
}: React.ComponentProps<'span'>): import('react/jsx-runtime').JSX.Element;
|
|
76
|
+
declare function DropdownMenuSub({
|
|
77
|
+
...props
|
|
78
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import('react/jsx-runtime').JSX.Element;
|
|
79
|
+
declare function DropdownMenuSubTrigger({
|
|
80
|
+
className,
|
|
81
|
+
inset,
|
|
82
|
+
children,
|
|
83
|
+
...props
|
|
84
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
85
|
+
inset?: boolean;
|
|
86
|
+
}): import('react/jsx-runtime').JSX.Element;
|
|
87
|
+
declare function DropdownMenuSubContent({
|
|
88
|
+
className,
|
|
89
|
+
...props
|
|
90
|
+
}: React.ComponentProps<
|
|
91
|
+
typeof DropdownMenuPrimitive.SubContent
|
|
92
|
+
>): import('react/jsx-runtime').JSX.Element;
|
|
93
|
+
export {
|
|
94
|
+
DropdownMenu,
|
|
95
|
+
DropdownMenuPortal,
|
|
96
|
+
DropdownMenuTrigger,
|
|
97
|
+
DropdownMenuContent,
|
|
98
|
+
DropdownMenuGroup,
|
|
99
|
+
DropdownMenuLabel,
|
|
100
|
+
DropdownMenuItem,
|
|
101
|
+
DropdownMenuCheckboxItem,
|
|
102
|
+
DropdownMenuRadioGroup,
|
|
103
|
+
DropdownMenuRadioItem,
|
|
104
|
+
DropdownMenuSeparator,
|
|
105
|
+
DropdownMenuShortcut,
|
|
106
|
+
DropdownMenuSub,
|
|
107
|
+
DropdownMenuSubTrigger,
|
|
108
|
+
DropdownMenuSubContent,
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/shadcn/dropdown-menu.tsx"],"names":[],"mappings":"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"}
|