@codefast/ui 1.0.0-canary.6 → 1.0.0-canary.7
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/CHANGELOG.md +9 -0
- package/README.md +59 -355
- package/dist/components/accordion.d.ts +37 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +33 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +102 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +75 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +38 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +32 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/aspect-ratio.d.ts +13 -0
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +13 -0
- package/dist/components/aspect-ratio.js.map +1 -0
- package/dist/components/{attachment.d.mts → attachment.d.ts} +21 -55
- package/dist/components/attachment.d.ts.map +1 -0
- package/dist/components/attachment.js +65 -0
- package/dist/components/attachment.js.map +1 -0
- package/dist/components/avatar.d.ts +55 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +44 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +15 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +15 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +62 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +52 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/bubble.d.ts +50 -0
- package/dist/components/bubble.d.ts.map +1 -0
- package/dist/components/bubble.js +34 -0
- package/dist/components/bubble.js.map +1 -0
- package/dist/components/button-group.d.ts +32 -0
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +29 -0
- package/dist/components/button-group.js.map +1 -0
- package/dist/components/button.d.ts +16 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +18 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +27 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +96 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/card.d.ts +62 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +49 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/{carousel.d.mts → carousel.d.ts} +25 -52
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +137 -0
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/chart.d.ts +101 -0
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +217 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox-cards.d.ts +23 -0
- package/dist/components/checkbox-cards.d.ts.map +1 -0
- package/dist/components/checkbox-cards.js +22 -0
- package/dist/components/checkbox-cards.js.map +1 -0
- package/dist/components/checkbox-group.d.ts +21 -0
- package/dist/components/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox-group.js +21 -0
- package/dist/components/checkbox-group.js.map +1 -0
- package/dist/components/checkbox.d.ts +13 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +15 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.d.ts +29 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +25 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/command.d.ts +91 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +71 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/context-menu.d.ts +136 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +99 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/dialog.d.ts +86 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +64 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/direction.d.ts +19 -0
- package/dist/components/direction.d.ts.map +1 -0
- package/dist/components/direction.js +17 -0
- package/dist/components/direction.js.map +1 -0
- package/dist/components/drawer.d.ts +74 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +57 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +136 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +99 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/empty.d.ts +53 -0
- package/dist/components/empty.d.ts.map +1 -0
- package/dist/components/empty.js +44 -0
- package/dist/components/empty.js.map +1 -0
- package/dist/components/field.d.ts +95 -0
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +86 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/{form.d.mts → form.d.ts} +15 -33
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +97 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/hover-card.d.ts +37 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +32 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/input-group.d.ts +56 -0
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +56 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input-number.d.ts +15 -0
- package/dist/components/input-number.d.ts.map +1 -0
- package/dist/components/input-number.js +31 -0
- package/dist/components/input-number.js.map +1 -0
- package/dist/components/input-otp.d.ts +40 -0
- package/dist/components/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp.js +41 -0
- package/dist/components/input-otp.js.map +1 -0
- package/dist/components/input-password.d.ts +13 -0
- package/dist/components/input-password.d.ts.map +1 -0
- package/dist/components/input-password.js +19 -0
- package/dist/components/input-password.js.map +1 -0
- package/dist/components/input-search.d.ts +17 -0
- package/dist/components/input-search.d.ts.map +1 -0
- package/dist/components/input-search.js +24 -0
- package/dist/components/input-search.js.map +1 -0
- package/dist/components/input.d.ts +12 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +13 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/item.d.ts +88 -0
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +71 -0
- package/dist/components/item.js.map +1 -0
- package/dist/components/kbd.d.ts +20 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +19 -0
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/label.d.ts +13 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +14 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/{marker.d.mts → marker.d.ts} +9 -21
- package/dist/components/marker.d.ts.map +1 -0
- package/dist/components/marker.js +28 -0
- package/dist/components/marker.js.map +1 -0
- package/dist/components/menubar.d.ts +144 -0
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +105 -0
- package/dist/components/menubar.js.map +1 -0
- package/dist/components/message-scroller.d.ts +67 -0
- package/dist/components/message-scroller.d.ts.map +1 -0
- package/dist/components/message-scroller.js +46 -0
- package/dist/components/message-scroller.js.map +1 -0
- package/dist/components/{message.d.mts → message.d.ts} +11 -31
- package/dist/components/message.d.ts.map +1 -0
- package/dist/components/message.js +43 -0
- package/dist/components/message.js.map +1 -0
- package/dist/components/native-select.d.ts +30 -0
- package/dist/components/native-select.d.ts.map +1 -0
- package/dist/components/native-select.js +26 -0
- package/dist/components/native-select.js.map +1 -0
- package/dist/components/navigation-menu.d.ts +71 -0
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +58 -0
- package/dist/components/navigation-menu.js.map +1 -0
- package/dist/components/pagination.d.ts +70 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +51 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/popover.d.ts +69 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +56 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress-circle.d.ts +72 -0
- package/dist/components/progress-circle.d.ts.map +1 -0
- package/dist/components/progress-circle.js +58 -0
- package/dist/components/progress-circle.js.map +1 -0
- package/dist/components/progress.d.ts +13 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +16 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-cards.d.ts +21 -0
- package/dist/components/radio-cards.d.ts.map +1 -0
- package/dist/components/radio-cards.js +21 -0
- package/dist/components/radio-cards.js.map +1 -0
- package/dist/components/radio-group.d.ts +21 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +20 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/radio.d.ts +14 -0
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +14 -0
- package/dist/components/radio.js.map +1 -0
- package/dist/components/resizable.d.ts +31 -0
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +26 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/scroll-area.d.ts +27 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +29 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +87 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +70 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +23 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +21 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +88 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +69 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sidebar.d.ts +231 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +279 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/skeleton.d.ts +12 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +13 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +13 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +21 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/sonner.d.ts +14 -0
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +32 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/spinner.d.ts +14 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +30 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/switch.d.ts +15 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +14 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +68 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +55 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +38 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +33 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +12 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +13 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/toggle-group.d.ts +30 -0
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +42 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.d.ts +15 -0
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +14 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tooltip.d.ts +45 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +38 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/hooks/{use-animated-value.d.mts → use-animated-value.d.ts} +2 -4
- package/dist/hooks/use-animated-value.d.ts.map +1 -0
- package/dist/hooks/use-animated-value.js +73 -0
- package/dist/hooks/use-animated-value.js.map +1 -0
- package/dist/hooks/{use-copy-to-clipboard.d.mts → use-copy-to-clipboard.d.ts} +6 -11
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.js +48 -0
- package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
- package/dist/hooks/{use-is-mobile.d.mts → use-is-mobile.d.ts} +2 -4
- package/dist/hooks/use-is-mobile.d.ts.map +1 -0
- package/dist/hooks/use-is-mobile.js +25 -0
- package/dist/hooks/use-is-mobile.js.map +1 -0
- package/dist/hooks/{use-media-query.d.mts → use-media-query.d.ts} +2 -4
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +55 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/hooks/use-message-scroller-commands.d.ts +22 -0
- package/dist/hooks/use-message-scroller-commands.d.ts.map +1 -0
- package/dist/hooks/use-message-scroller-commands.js +190 -0
- package/dist/hooks/use-message-scroller-commands.js.map +1 -0
- package/dist/hooks/use-message-scroller-controller.d.ts +12 -0
- package/dist/hooks/use-message-scroller-controller.d.ts.map +1 -0
- package/dist/hooks/use-message-scroller-controller.js +471 -0
- package/dist/hooks/use-message-scroller-controller.js.map +1 -0
- package/dist/hooks/use-message-scroller-refs.d.ts +54 -0
- package/dist/hooks/use-message-scroller-refs.d.ts.map +1 -0
- package/dist/hooks/use-message-scroller-refs.js +88 -0
- package/dist/hooks/use-message-scroller-refs.js.map +1 -0
- package/dist/hooks/{use-mutation-observer.d.mts → use-mutation-observer.d.ts} +3 -6
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
- package/dist/hooks/use-mutation-observer.js +42 -0
- package/dist/hooks/use-mutation-observer.js.map +1 -0
- package/dist/hooks/{use-pagination.d.mts → use-pagination.d.ts} +21 -28
- package/dist/hooks/use-pagination.d.ts.map +1 -0
- package/dist/hooks/use-pagination.js +117 -0
- package/dist/hooks/use-pagination.js.map +1 -0
- package/dist/index.d.ts +181 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +94 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/message-scroller/{geometry.d.mts → geometry.d.ts} +40 -73
- package/dist/lib/message-scroller/geometry.d.ts.map +1 -0
- package/dist/lib/message-scroller/geometry.js +246 -0
- package/dist/lib/message-scroller/geometry.js.map +1 -0
- package/dist/lib/message-scroller/{stores.d.mts → stores.d.ts} +3 -5
- package/dist/lib/message-scroller/stores.d.ts.map +1 -0
- package/dist/lib/message-scroller/stores.js +64 -0
- package/dist/lib/message-scroller/stores.js.map +1 -0
- package/dist/lib/message-scroller/types.d.ts +170 -0
- package/dist/lib/message-scroller/types.d.ts.map +1 -0
- package/dist/lib/message-scroller/types.js +66 -0
- package/dist/lib/message-scroller/types.js.map +1 -0
- package/dist/lib/message-scroller/{utils.d.mts → utils.d.ts} +2 -3
- package/dist/lib/message-scroller/utils.d.ts.map +1 -0
- package/dist/lib/message-scroller/utils.js +11 -0
- package/dist/lib/message-scroller/utils.js.map +1 -0
- package/dist/lib/{use-render.d.mts → use-render.d.ts} +14 -19
- package/dist/lib/use-render.d.ts.map +1 -0
- package/dist/lib/use-render.js +119 -0
- package/dist/lib/use-render.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/{utils.mjs → utils.js} +1 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/primitives/checkbox-group.d.ts +135 -0
- package/dist/primitives/checkbox-group.d.ts.map +1 -0
- package/dist/primitives/checkbox-group.js +120 -0
- package/dist/primitives/checkbox-group.js.map +1 -0
- package/dist/primitives/input-number.d.ts +109 -0
- package/dist/primitives/input-number.d.ts.map +1 -0
- package/dist/primitives/input-number.js +479 -0
- package/dist/primitives/input-number.js.map +1 -0
- package/dist/primitives/input.d.ts +77 -0
- package/dist/primitives/input.d.ts.map +1 -0
- package/dist/primitives/input.js +83 -0
- package/dist/primitives/input.js.map +1 -0
- package/dist/primitives/message-scroller.d.ts +43 -0
- package/dist/primitives/message-scroller.d.ts.map +1 -0
- package/dist/primitives/message-scroller.js +210 -0
- package/dist/primitives/message-scroller.js.map +1 -0
- package/dist/primitives/progress-circle.d.ts +166 -0
- package/dist/primitives/progress-circle.d.ts.map +1 -0
- package/dist/primitives/progress-circle.js +171 -0
- package/dist/primitives/progress-circle.js.map +1 -0
- package/dist/variants/{alert.d.mts → alert.d.ts} +8 -9
- package/dist/variants/alert.d.ts.map +1 -0
- package/dist/variants/alert.js +24 -0
- package/dist/variants/alert.js.map +1 -0
- package/dist/variants/{attachment.d.mts → attachment.d.ts} +17 -18
- package/dist/variants/attachment.d.ts.map +1 -0
- package/dist/variants/attachment.js +54 -0
- package/dist/variants/attachment.js.map +1 -0
- package/dist/variants/badge.d.ts +21 -0
- package/dist/variants/badge.d.ts.map +1 -0
- package/dist/variants/badge.js +28 -0
- package/dist/variants/badge.js.map +1 -0
- package/dist/variants/{bubble.d.mts → bubble.d.ts} +21 -22
- package/dist/variants/bubble.d.ts.map +1 -0
- package/dist/variants/bubble.js +57 -0
- package/dist/variants/bubble.js.map +1 -0
- package/dist/variants/{button-group.d.mts → button-group.d.ts} +8 -9
- package/dist/variants/button-group.d.ts.map +1 -0
- package/dist/variants/button-group.js +24 -0
- package/dist/variants/button-group.js.map +1 -0
- package/dist/variants/button.d.ts +31 -0
- package/dist/variants/button.d.ts.map +1 -0
- package/dist/variants/button.js +39 -0
- package/dist/variants/button.js.map +1 -0
- package/dist/variants/{empty.d.mts → empty.d.ts} +8 -9
- package/dist/variants/empty.d.ts.map +1 -0
- package/dist/variants/empty.js +24 -0
- package/dist/variants/empty.js.map +1 -0
- package/dist/variants/field.d.ts +18 -0
- package/dist/variants/field.d.ts.map +1 -0
- package/dist/variants/field.js +25 -0
- package/dist/variants/field.js.map +1 -0
- package/dist/variants/{input-group.d.mts → input-group.d.ts} +16 -17
- package/dist/variants/input-group.d.ts.map +1 -0
- package/dist/variants/input-group.js +55 -0
- package/dist/variants/input-group.js.map +1 -0
- package/dist/variants/input-number.d.ts +44 -0
- package/dist/variants/input-number.d.ts.map +1 -0
- package/dist/variants/input-number.js +51 -0
- package/dist/variants/input-number.js.map +1 -0
- package/dist/variants/{item.d.mts → item.d.ts} +19 -20
- package/dist/variants/item.d.ts.map +1 -0
- package/dist/variants/item.js +50 -0
- package/dist/variants/item.js.map +1 -0
- package/dist/variants/{marker.d.mts → marker.d.ts} +9 -10
- package/dist/variants/marker.d.ts.map +1 -0
- package/dist/variants/marker.js +27 -0
- package/dist/variants/marker.js.map +1 -0
- package/dist/variants/{navigation-menu.d.mts → navigation-menu.d.ts} +4 -5
- package/dist/variants/navigation-menu.d.ts.map +1 -0
- package/dist/variants/navigation-menu.js +15 -0
- package/dist/variants/navigation-menu.js.map +1 -0
- package/dist/variants/progress-circle.d.ts +51 -0
- package/dist/variants/progress-circle.d.ts.map +1 -0
- package/dist/variants/progress-circle.js +36 -0
- package/dist/variants/progress-circle.js.map +1 -0
- package/dist/variants/scroll-area.d.ts +23 -0
- package/dist/variants/scroll-area.d.ts.map +1 -0
- package/dist/variants/scroll-area.js +63 -0
- package/dist/variants/scroll-area.js.map +1 -0
- package/dist/variants/separator.d.ts +22 -0
- package/dist/variants/separator.d.ts.map +1 -0
- package/dist/variants/separator.js +30 -0
- package/dist/variants/separator.js.map +1 -0
- package/dist/variants/sheet.d.ts +19 -0
- package/dist/variants/sheet.d.ts.map +1 -0
- package/dist/variants/sheet.js +26 -0
- package/dist/variants/sheet.js.map +1 -0
- package/dist/variants/sidebar.d.ts +22 -0
- package/dist/variants/sidebar.d.ts.map +1 -0
- package/dist/variants/sidebar.js +30 -0
- package/dist/variants/sidebar.js.map +1 -0
- package/dist/variants/{tabs.d.mts → tabs.d.ts} +8 -9
- package/dist/variants/tabs.d.ts.map +1 -0
- package/dist/variants/tabs.js +24 -0
- package/dist/variants/tabs.js.map +1 -0
- package/dist/variants/toggle.d.ts +22 -0
- package/dist/variants/toggle.d.ts.map +1 -0
- package/dist/variants/toggle.js +30 -0
- package/dist/variants/toggle.js.map +1 -0
- package/package.json +257 -260
- package/src/components/accordion.tsx +1 -1
- package/src/components/alert-dialog.tsx +1 -1
- package/src/components/aspect-ratio.tsx +1 -1
- package/src/components/attachment.tsx +1 -1
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +1 -1
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/bubble.tsx +1 -1
- package/src/components/button-group.tsx +1 -1
- package/src/components/button.tsx +1 -1
- package/src/components/checkbox.tsx +1 -1
- package/src/components/collapsible.tsx +1 -1
- package/src/components/context-menu.tsx +1 -1
- package/src/components/dialog.tsx +1 -1
- package/src/components/direction.tsx +1 -1
- package/src/components/dropdown-menu.tsx +1 -1
- package/src/components/form.tsx +2 -2
- package/src/components/hover-card.tsx +1 -1
- package/src/components/item.tsx +1 -1
- package/src/components/label.tsx +1 -1
- package/src/components/marker.tsx +1 -1
- package/src/components/menubar.tsx +1 -1
- package/src/components/navigation-menu.tsx +1 -1
- package/src/components/popover.tsx +1 -1
- package/src/components/progress.tsx +1 -1
- package/src/components/radio-cards.tsx +1 -1
- package/src/components/radio-group.tsx +1 -1
- package/src/components/scroll-area.tsx +1 -1
- package/src/components/select.tsx +1 -1
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +1 -1
- package/src/components/sidebar.tsx +9 -2
- package/src/components/slider.tsx +1 -1
- package/src/components/spinner.tsx +1 -1
- package/src/components/switch.tsx +1 -1
- package/src/components/tabs.tsx +1 -1
- package/src/components/toggle-group.tsx +1 -1
- package/src/components/toggle.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/lib/message-scroller/geometry.ts +6 -2
- package/src/lib/message-scroller/stores.ts +2 -2
- package/src/primitives/checkbox-group.tsx +5 -6
- package/dist/components/accordion.d.mts +0 -52
- package/dist/components/accordion.mjs +0 -65
- package/dist/components/alert-dialog.d.mts +0 -135
- package/dist/components/alert-dialog.mjs +0 -130
- package/dist/components/alert.d.mts +0 -51
- package/dist/components/alert.mjs +0 -50
- package/dist/components/aspect-ratio.d.mts +0 -16
- package/dist/components/aspect-ratio.mjs +0 -14
- package/dist/components/attachment.mjs +0 -112
- package/dist/components/avatar.d.mts +0 -75
- package/dist/components/avatar.mjs +0 -67
- package/dist/components/badge.d.mts +0 -21
- package/dist/components/badge.mjs +0 -20
- package/dist/components/breadcrumb.d.mts +0 -85
- package/dist/components/breadcrumb.mjs +0 -89
- package/dist/components/bubble.d.mts +0 -67
- package/dist/components/bubble.mjs +0 -58
- package/dist/components/button-group.d.mts +0 -45
- package/dist/components/button-group.mjs +0 -43
- package/dist/components/button.d.mts +0 -24
- package/dist/components/button.mjs +0 -35
- package/dist/components/calendar.d.mts +0 -43
- package/dist/components/calendar.mjs +0 -117
- package/dist/components/card.d.mts +0 -85
- package/dist/components/card.mjs +0 -76
- package/dist/components/carousel.mjs +0 -172
- package/dist/components/chart.d.mts +0 -135
- package/dist/components/chart.mjs +0 -214
- package/dist/components/checkbox-cards.d.mts +0 -29
- package/dist/components/checkbox-cards.mjs +0 -36
- package/dist/components/checkbox-group.d.mts +0 -28
- package/dist/components/checkbox-group.mjs +0 -32
- package/dist/components/checkbox.d.mts +0 -17
- package/dist/components/checkbox.mjs +0 -22
- package/dist/components/collapsible.d.mts +0 -36
- package/dist/components/collapsible.mjs +0 -32
- package/dist/components/command.d.mts +0 -127
- package/dist/components/command.mjs +0 -125
- package/dist/components/context-menu.d.mts +0 -188
- package/dist/components/context-menu.mjs +0 -172
- package/dist/components/dialog.d.mts +0 -115
- package/dist/components/dialog.mjs +0 -121
- package/dist/components/direction.d.mts +0 -24
- package/dist/components/direction.mjs +0 -18
- package/dist/components/drawer.d.mts +0 -101
- package/dist/components/drawer.mjs +0 -97
- package/dist/components/dropdown-menu.d.mts +0 -189
- package/dist/components/dropdown-menu.mjs +0 -178
- package/dist/components/empty.d.mts +0 -73
- package/dist/components/empty.mjs +0 -70
- package/dist/components/field.d.mts +0 -131
- package/dist/components/field.mjs +0 -135
- package/dist/components/form.mjs +0 -113
- package/dist/components/hover-card.d.mts +0 -50
- package/dist/components/hover-card.mjs +0 -49
- package/dist/components/input-group.d.mts +0 -79
- package/dist/components/input-group.mjs +0 -87
- package/dist/components/input-number.d.mts +0 -36
- package/dist/components/input-number.mjs +0 -86
- package/dist/components/input-otp.d.mts +0 -53
- package/dist/components/input-otp.mjs +0 -62
- package/dist/components/input-password.d.mts +0 -19
- package/dist/components/input-password.mjs +0 -38
- package/dist/components/input-search.d.mts +0 -26
- package/dist/components/input-search.mjs +0 -51
- package/dist/components/input.d.mts +0 -17
- package/dist/components/input.mjs +0 -16
- package/dist/components/item.d.mts +0 -123
- package/dist/components/item.mjs +0 -120
- package/dist/components/kbd.d.mts +0 -27
- package/dist/components/kbd.mjs +0 -25
- package/dist/components/label.d.mts +0 -17
- package/dist/components/label.mjs +0 -16
- package/dist/components/marker.mjs +0 -42
- package/dist/components/menubar.d.mts +0 -202
- package/dist/components/menubar.mjs +0 -188
- package/dist/components/message-scroller.d.mts +0 -89
- package/dist/components/message-scroller.mjs +0 -77
- package/dist/components/message.mjs +0 -66
- package/dist/components/native-select.d.mts +0 -41
- package/dist/components/native-select.mjs +0 -46
- package/dist/components/navigation-menu.d.mts +0 -100
- package/dist/components/navigation-menu.mjs +0 -103
- package/dist/components/pagination.d.mts +0 -94
- package/dist/components/pagination.mjs +0 -107
- package/dist/components/popover.d.mts +0 -93
- package/dist/components/popover.mjs +0 -88
- package/dist/components/progress-circle.d.mts +0 -89
- package/dist/components/progress-circle.mjs +0 -80
- package/dist/components/progress.d.mts +0 -18
- package/dist/components/progress.mjs +0 -21
- package/dist/components/radio-cards.d.mts +0 -26
- package/dist/components/radio-cards.mjs +0 -35
- package/dist/components/radio-group.d.mts +0 -28
- package/dist/components/radio-group.mjs +0 -31
- package/dist/components/radio.d.mts +0 -20
- package/dist/components/radio.mjs +0 -18
- package/dist/components/resizable.d.mts +0 -41
- package/dist/components/resizable.mjs +0 -36
- package/dist/components/scroll-area.d.mts +0 -39
- package/dist/components/scroll-area.mjs +0 -56
- package/dist/components/select.d.mts +0 -122
- package/dist/components/select.mjs +0 -131
- package/dist/components/separator.d.mts +0 -32
- package/dist/components/separator.mjs +0 -33
- package/dist/components/sheet.d.mts +0 -119
- package/dist/components/sheet.mjs +0 -123
- package/dist/components/sidebar.d.mts +0 -320
- package/dist/components/sidebar.mjs +0 -414
- package/dist/components/skeleton.d.mts +0 -16
- package/dist/components/skeleton.mjs +0 -15
- package/dist/components/slider.d.mts +0 -21
- package/dist/components/slider.mjs +0 -41
- package/dist/components/sonner.d.mts +0 -16
- package/dist/components/sonner.mjs +0 -32
- package/dist/components/spinner.d.mts +0 -20
- package/dist/components/spinner.mjs +0 -42
- package/dist/components/switch.d.mts +0 -20
- package/dist/components/switch.mjs +0 -21
- package/dist/components/table.d.mts +0 -93
- package/dist/components/table.mjs +0 -89
- package/dist/components/tabs.d.mts +0 -53
- package/dist/components/tabs.mjs +0 -53
- package/dist/components/textarea.d.mts +0 -16
- package/dist/components/textarea.mjs +0 -15
- package/dist/components/toggle-group.d.mts +0 -46
- package/dist/components/toggle-group.mjs +0 -58
- package/dist/components/toggle.d.mts +0 -20
- package/dist/components/toggle.mjs +0 -20
- package/dist/components/tooltip.d.mts +0 -61
- package/dist/components/tooltip.mjs +0 -59
- package/dist/hooks/use-animated-value.mjs +0 -65
- package/dist/hooks/use-copy-to-clipboard.mjs +0 -44
- package/dist/hooks/use-is-mobile.mjs +0 -27
- package/dist/hooks/use-media-query.mjs +0 -51
- package/dist/hooks/use-message-scroller-commands.d.mts +0 -39
- package/dist/hooks/use-message-scroller-commands.mjs +0 -165
- package/dist/hooks/use-message-scroller-controller.d.mts +0 -19
- package/dist/hooks/use-message-scroller-controller.mjs +0 -382
- package/dist/hooks/use-message-scroller-refs.d.mts +0 -60
- package/dist/hooks/use-message-scroller-refs.mjs +0 -77
- package/dist/hooks/use-mutation-observer.mjs +0 -42
- package/dist/hooks/use-pagination.mjs +0 -122
- package/dist/index.d.mts +0 -96
- package/dist/index.mjs +0 -95
- package/dist/lib/message-scroller/geometry.mjs +0 -199
- package/dist/lib/message-scroller/stores.mjs +0 -52
- package/dist/lib/message-scroller/types.d.mts +0 -171
- package/dist/lib/message-scroller/types.mjs +0 -53
- package/dist/lib/message-scroller/utils.mjs +0 -12
- package/dist/lib/use-render.mjs +0 -84
- package/dist/lib/utils.d.mts +0 -2
- package/dist/primitives/checkbox-group.d.mts +0 -154
- package/dist/primitives/checkbox-group.mjs +0 -137
- package/dist/primitives/input-number.d.mts +0 -119
- package/dist/primitives/input-number.mjs +0 -532
- package/dist/primitives/input.d.mts +0 -81
- package/dist/primitives/input.mjs +0 -80
- package/dist/primitives/message-scroller.d.mts +0 -88
- package/dist/primitives/message-scroller.mjs +0 -240
- package/dist/primitives/progress-circle.d.mts +0 -195
- package/dist/primitives/progress-circle.mjs +0 -189
- package/dist/variants/alert.mjs +0 -15
- package/dist/variants/attachment.mjs +0 -42
- package/dist/variants/badge.d.mts +0 -22
- package/dist/variants/badge.mjs +0 -19
- package/dist/variants/bubble.mjs +0 -45
- package/dist/variants/button-group.mjs +0 -15
- package/dist/variants/button.d.mts +0 -32
- package/dist/variants/button.mjs +0 -34
- package/dist/variants/empty.mjs +0 -15
- package/dist/variants/field.d.mts +0 -19
- package/dist/variants/field.mjs +0 -16
- package/dist/variants/input-group.mjs +0 -34
- package/dist/variants/input-number.d.mts +0 -45
- package/dist/variants/input-number.mjs +0 -40
- package/dist/variants/item.mjs +0 -38
- package/dist/variants/marker.mjs +0 -18
- package/dist/variants/navigation-menu.mjs +0 -8
- package/dist/variants/progress-circle.d.mts +0 -52
- package/dist/variants/progress-circle.mjs +0 -45
- package/dist/variants/scroll-area.d.mts +0 -24
- package/dist/variants/scroll-area.mjs +0 -58
- package/dist/variants/separator.d.mts +0 -23
- package/dist/variants/separator.mjs +0 -25
- package/dist/variants/sheet.d.mts +0 -20
- package/dist/variants/sheet.mjs +0 -17
- package/dist/variants/sidebar.d.mts +0 -23
- package/dist/variants/sidebar.mjs +0 -25
- package/dist/variants/tabs.mjs +0 -15
- package/dist/variants/toggle.d.mts +0 -23
- package/dist/variants/toggle.mjs +0 -25
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { cn } from "../lib/utils.mjs";
|
|
2
|
-
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
3
|
-
import { Slot } from "radix-ui";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/breadcrumb.tsx
|
|
6
|
-
/**
|
|
7
|
-
* @since 0.3.16-canary.0
|
|
8
|
-
*/
|
|
9
|
-
function Breadcrumb({ ...props }) {
|
|
10
|
-
return /* @__PURE__ */ jsx("nav", {
|
|
11
|
-
"aria-label": "breadcrumb",
|
|
12
|
-
"data-slot": "breadcrumb",
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @since 0.3.16-canary.0
|
|
18
|
-
*/
|
|
19
|
-
function BreadcrumbList({ className, ...props }) {
|
|
20
|
-
return /* @__PURE__ */ jsx("ol", {
|
|
21
|
-
className: cn("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground sm:gap-2.5", className),
|
|
22
|
-
"data-slot": "breadcrumb-list",
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @since 0.3.16-canary.0
|
|
28
|
-
*/
|
|
29
|
-
function BreadcrumbItem({ className, ...props }) {
|
|
30
|
-
return /* @__PURE__ */ jsx("li", {
|
|
31
|
-
className: cn("inline-flex items-center gap-1.5", className),
|
|
32
|
-
"data-slot": "breadcrumb-item",
|
|
33
|
-
...props
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @since 0.3.16-canary.0
|
|
38
|
-
*/
|
|
39
|
-
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
40
|
-
return /* @__PURE__ */ jsx(asChild ? Slot.Root : "a", {
|
|
41
|
-
className: cn("transition-colors hover:text-foreground", className),
|
|
42
|
-
"data-slot": "breadcrumb-link",
|
|
43
|
-
...props
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @since 0.3.16-canary.0
|
|
48
|
-
*/
|
|
49
|
-
function BreadcrumbPage({ className, ...props }) {
|
|
50
|
-
return /* @__PURE__ */ jsx("span", {
|
|
51
|
-
"aria-current": "page",
|
|
52
|
-
"aria-disabled": "true",
|
|
53
|
-
className: cn("font-normal text-foreground", className),
|
|
54
|
-
"data-slot": "breadcrumb-page",
|
|
55
|
-
role: "link",
|
|
56
|
-
...props
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* @since 0.3.16-canary.0
|
|
61
|
-
*/
|
|
62
|
-
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
63
|
-
return /* @__PURE__ */ jsx("li", {
|
|
64
|
-
"aria-hidden": "true",
|
|
65
|
-
className: cn("[&>svg]:size-3.5", className),
|
|
66
|
-
"data-slot": "breadcrumb-separator",
|
|
67
|
-
role: "presentation",
|
|
68
|
-
...props,
|
|
69
|
-
children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, { className: "rtl:rotate-180" })
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* @since 0.3.16-canary.0
|
|
74
|
-
*/
|
|
75
|
-
function BreadcrumbEllipsis({ className, ...props }) {
|
|
76
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
77
|
-
"aria-hidden": "true",
|
|
78
|
-
className: cn("flex size-5 items-center justify-center [&>svg]:size-4", className),
|
|
79
|
-
"data-slot": "breadcrumb-ellipsis",
|
|
80
|
-
role: "presentation",
|
|
81
|
-
...props,
|
|
82
|
-
children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
83
|
-
className: "sr-only",
|
|
84
|
-
children: "More"
|
|
85
|
-
})]
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
//#endregion
|
|
89
|
-
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { BubbleReactionsVariants, BubbleVariants } from "../variants/bubble.mjs";
|
|
2
|
-
import { ComponentProps, JSX } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/bubble.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Vertical stack of consecutive bubbles from one author.
|
|
7
|
-
*
|
|
8
|
-
* @since 0.5.0-canary.3
|
|
9
|
-
*/
|
|
10
|
-
type BubbleGroupProps = ComponentProps<"div">;
|
|
11
|
-
/**
|
|
12
|
-
* @since 0.5.0-canary.3
|
|
13
|
-
*/
|
|
14
|
-
declare function BubbleGroup({
|
|
15
|
-
className,
|
|
16
|
-
...props
|
|
17
|
-
}: BubbleGroupProps): JSX.Element;
|
|
18
|
-
/**
|
|
19
|
-
* Chat bubble wrapper. `variant` colors the content; `align` sets the side.
|
|
20
|
-
*
|
|
21
|
-
* @since 0.5.0-canary.3
|
|
22
|
-
*/
|
|
23
|
-
interface BubbleProps extends ComponentProps<"div">, BubbleVariants {
|
|
24
|
-
align?: "start" | "end";
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @since 0.5.0-canary.3
|
|
28
|
-
*/
|
|
29
|
-
declare function Bubble({
|
|
30
|
-
align,
|
|
31
|
-
className,
|
|
32
|
-
variant,
|
|
33
|
-
...props
|
|
34
|
-
}: BubbleProps): JSX.Element;
|
|
35
|
-
/**
|
|
36
|
-
* The bubble's colored surface; render as a button/link with `asChild`.
|
|
37
|
-
*
|
|
38
|
-
* @since 0.5.0-canary.3
|
|
39
|
-
*/
|
|
40
|
-
interface BubbleContentProps extends ComponentProps<"div"> {
|
|
41
|
-
asChild?: boolean;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @since 0.5.0-canary.3
|
|
45
|
-
*/
|
|
46
|
-
declare function BubbleContent({
|
|
47
|
-
asChild,
|
|
48
|
-
className,
|
|
49
|
-
...props
|
|
50
|
-
}: BubbleContentProps): JSX.Element;
|
|
51
|
-
/**
|
|
52
|
-
* Reaction pill overlapping a bubble corner.
|
|
53
|
-
*
|
|
54
|
-
* @since 0.5.0-canary.3
|
|
55
|
-
*/
|
|
56
|
-
interface BubbleReactionsProps extends ComponentProps<"div">, BubbleReactionsVariants {}
|
|
57
|
-
/**
|
|
58
|
-
* @since 0.5.0-canary.3
|
|
59
|
-
*/
|
|
60
|
-
declare function BubbleReactions({
|
|
61
|
-
align,
|
|
62
|
-
className,
|
|
63
|
-
side,
|
|
64
|
-
...props
|
|
65
|
-
}: BubbleReactionsProps): JSX.Element;
|
|
66
|
-
//#endregion
|
|
67
|
-
export { Bubble, BubbleContent, type BubbleContentProps, BubbleGroup, type BubbleGroupProps, type BubbleProps, BubbleReactions, type BubbleReactionsProps };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { cn } from "../lib/utils.mjs";
|
|
2
|
-
import { bubbleReactionsVariants, bubbleVariants } from "../variants/bubble.mjs";
|
|
3
|
-
import { Slot } from "radix-ui";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/bubble.tsx
|
|
6
|
-
/**
|
|
7
|
-
* @since 0.5.0-canary.3
|
|
8
|
-
*/
|
|
9
|
-
function BubbleGroup({ className, ...props }) {
|
|
10
|
-
return /* @__PURE__ */ jsx("div", {
|
|
11
|
-
className: cn("flex min-w-0 flex-col gap-2", className),
|
|
12
|
-
"data-slot": "bubble-group",
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @since 0.5.0-canary.3
|
|
18
|
-
*/
|
|
19
|
-
function Bubble({ align = "start", className, variant = "default", ...props }) {
|
|
20
|
-
return /* @__PURE__ */ jsx("div", {
|
|
21
|
-
className: bubbleVariants({
|
|
22
|
-
className,
|
|
23
|
-
variant
|
|
24
|
-
}),
|
|
25
|
-
"data-align": align,
|
|
26
|
-
"data-slot": "bubble",
|
|
27
|
-
"data-variant": variant,
|
|
28
|
-
...props
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @since 0.5.0-canary.3
|
|
33
|
-
*/
|
|
34
|
-
function BubbleContent({ asChild = false, className, ...props }) {
|
|
35
|
-
return /* @__PURE__ */ jsx(asChild ? Slot.Root : "div", {
|
|
36
|
-
className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-start [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50", className),
|
|
37
|
-
"data-slot": "bubble-content",
|
|
38
|
-
...props
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @since 0.5.0-canary.3
|
|
43
|
-
*/
|
|
44
|
-
function BubbleReactions({ align = "end", className, side = "bottom", ...props }) {
|
|
45
|
-
return /* @__PURE__ */ jsx("div", {
|
|
46
|
-
className: bubbleReactionsVariants({
|
|
47
|
-
align,
|
|
48
|
-
className,
|
|
49
|
-
side
|
|
50
|
-
}),
|
|
51
|
-
"data-align": align,
|
|
52
|
-
"data-side": side,
|
|
53
|
-
"data-slot": "bubble-reactions",
|
|
54
|
-
...props
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
58
|
-
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Separator } from "./separator.mjs";
|
|
2
|
-
import { ButtonGroupVariants } from "../variants/button-group.mjs";
|
|
3
|
-
import { ComponentProps, JSX } from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/components/button-group.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* @since 0.3.16-canary.0
|
|
8
|
-
*/
|
|
9
|
-
type ButtonGroupProps = ComponentProps<"div"> & ButtonGroupVariants;
|
|
10
|
-
/**
|
|
11
|
-
* @since 0.3.16-canary.0
|
|
12
|
-
*/
|
|
13
|
-
declare function ButtonGroup({
|
|
14
|
-
className,
|
|
15
|
-
orientation,
|
|
16
|
-
...props
|
|
17
|
-
}: ButtonGroupProps): JSX.Element;
|
|
18
|
-
/**
|
|
19
|
-
* @since 0.3.16-canary.0
|
|
20
|
-
*/
|
|
21
|
-
interface ButtonGroupTextProps extends ComponentProps<"div"> {
|
|
22
|
-
asChild?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @since 0.3.16-canary.0
|
|
26
|
-
*/
|
|
27
|
-
declare function ButtonGroupText({
|
|
28
|
-
asChild,
|
|
29
|
-
className,
|
|
30
|
-
...props
|
|
31
|
-
}: ButtonGroupTextProps): JSX.Element;
|
|
32
|
-
/**
|
|
33
|
-
* @since 0.3.16-canary.0
|
|
34
|
-
*/
|
|
35
|
-
type ButtonGroupSeparatorProps = ComponentProps<typeof Separator>;
|
|
36
|
-
/**
|
|
37
|
-
* @since 0.3.16-canary.0
|
|
38
|
-
*/
|
|
39
|
-
declare function ButtonGroupSeparator({
|
|
40
|
-
className,
|
|
41
|
-
orientation,
|
|
42
|
-
...props
|
|
43
|
-
}: ButtonGroupSeparatorProps): JSX.Element;
|
|
44
|
-
//#endregion
|
|
45
|
-
export { ButtonGroup, type ButtonGroupProps, ButtonGroupSeparator, type ButtonGroupSeparatorProps, ButtonGroupText, type ButtonGroupTextProps };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { cn } from "../lib/utils.mjs";
|
|
2
|
-
import { Separator as Separator$1 } from "./separator.mjs";
|
|
3
|
-
import { buttonGroupVariants } from "../variants/button-group.mjs";
|
|
4
|
-
import { Slot } from "radix-ui";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
//#region src/components/button-group.tsx
|
|
7
|
-
/**
|
|
8
|
-
* @since 0.3.16-canary.0
|
|
9
|
-
*/
|
|
10
|
-
function ButtonGroup({ className, orientation, ...props }) {
|
|
11
|
-
return /* @__PURE__ */ jsx("div", {
|
|
12
|
-
className: buttonGroupVariants({
|
|
13
|
-
orientation,
|
|
14
|
-
className
|
|
15
|
-
}),
|
|
16
|
-
"data-orientation": orientation,
|
|
17
|
-
"data-slot": "button-group",
|
|
18
|
-
role: "group",
|
|
19
|
-
...props
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @since 0.3.16-canary.0
|
|
24
|
-
*/
|
|
25
|
-
function ButtonGroupText({ asChild = false, className, ...props }) {
|
|
26
|
-
return /* @__PURE__ */ jsx(asChild ? Slot.Root : "div", {
|
|
27
|
-
className: cn("flex items-center gap-2 rounded-md border bg-muted px-2.5 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
28
|
-
...props
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @since 0.3.16-canary.0
|
|
33
|
-
*/
|
|
34
|
-
function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
|
|
35
|
-
return /* @__PURE__ */ jsx(Separator$1, {
|
|
36
|
-
className: cn("relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto", className),
|
|
37
|
-
"data-slot": "button-group-separator",
|
|
38
|
-
orientation,
|
|
39
|
-
...props
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ButtonVariants } from "../variants/button.mjs";
|
|
2
|
-
import { ComponentProps, JSX } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/button.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* @since 0.3.16-canary.0
|
|
7
|
-
*/
|
|
8
|
-
type ButtonProps = ComponentProps<"button"> & ButtonVariants & {
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
type?: ComponentProps<"button">["type"];
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* @since 0.3.16-canary.0
|
|
14
|
-
*/
|
|
15
|
-
declare function Button({
|
|
16
|
-
asChild,
|
|
17
|
-
className,
|
|
18
|
-
size,
|
|
19
|
-
type,
|
|
20
|
-
variant,
|
|
21
|
-
...props
|
|
22
|
-
}: ButtonProps): JSX.Element;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { Button, type ButtonProps };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { buttonVariants } from "../variants/button.mjs";
|
|
2
|
-
import { Slot } from "radix-ui";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/button.tsx
|
|
5
|
-
/**
|
|
6
|
-
* @since 0.3.16-canary.0
|
|
7
|
-
*/
|
|
8
|
-
function Button({ asChild = false, className, size, type = "button", variant, ...props }) {
|
|
9
|
-
const Comp = asChild ? Slot.Root : "button";
|
|
10
|
-
if (asChild) return /* @__PURE__ */ jsx(Comp, {
|
|
11
|
-
className: buttonVariants({
|
|
12
|
-
className,
|
|
13
|
-
size,
|
|
14
|
-
variant
|
|
15
|
-
}),
|
|
16
|
-
"data-size": size,
|
|
17
|
-
"data-slot": "button",
|
|
18
|
-
"data-variant": variant,
|
|
19
|
-
...props
|
|
20
|
-
});
|
|
21
|
-
return /* @__PURE__ */ jsx("button", {
|
|
22
|
-
className: buttonVariants({
|
|
23
|
-
className,
|
|
24
|
-
size,
|
|
25
|
-
variant
|
|
26
|
-
}),
|
|
27
|
-
"data-size": size,
|
|
28
|
-
"data-slot": "button",
|
|
29
|
-
"data-variant": variant,
|
|
30
|
-
type,
|
|
31
|
-
...props
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
|
-
export { Button };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Button } from "./button.mjs";
|
|
2
|
-
import { DayButton, DayPicker, Locale } from "@daypicker/react";
|
|
3
|
-
import { ComponentProps, JSX } from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/components/calendar.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* @since 0.3.16-canary.0
|
|
8
|
-
*/
|
|
9
|
-
type CalendarProps = ComponentProps<typeof DayPicker> & {
|
|
10
|
-
buttonVariant?: ComponentProps<typeof Button>["variant"];
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* @since 0.3.16-canary.0
|
|
14
|
-
*/
|
|
15
|
-
declare function Calendar({
|
|
16
|
-
buttonVariant,
|
|
17
|
-
captionLayout,
|
|
18
|
-
className,
|
|
19
|
-
classNames,
|
|
20
|
-
components,
|
|
21
|
-
formatters,
|
|
22
|
-
locale,
|
|
23
|
-
showOutsideDays,
|
|
24
|
-
...props
|
|
25
|
-
}: CalendarProps): JSX.Element;
|
|
26
|
-
/**
|
|
27
|
-
* @since 0.3.16-canary.0
|
|
28
|
-
*/
|
|
29
|
-
type CalendarDayButtonProps = ComponentProps<typeof DayButton> & {
|
|
30
|
-
locale?: Partial<Locale>;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* @since 0.3.16-canary.0
|
|
34
|
-
*/
|
|
35
|
-
declare function CalendarDayButton({
|
|
36
|
-
className,
|
|
37
|
-
day,
|
|
38
|
-
locale,
|
|
39
|
-
modifiers,
|
|
40
|
-
...props
|
|
41
|
-
}: CalendarDayButtonProps): JSX.Element;
|
|
42
|
-
//#endregion
|
|
43
|
-
export { Calendar, CalendarDayButton, type CalendarDayButtonProps, type CalendarProps };
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { cn } from "../lib/utils.mjs";
|
|
2
|
-
import { buttonVariants } from "../variants/button.mjs";
|
|
3
|
-
import { Button } from "./button.mjs";
|
|
4
|
-
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { DayPicker, getDefaultClassNames } from "@daypicker/react";
|
|
7
|
-
import { useEffect, useRef } from "react";
|
|
8
|
-
//#region src/components/calendar.tsx
|
|
9
|
-
/**
|
|
10
|
-
* @since 0.3.16-canary.0
|
|
11
|
-
*/
|
|
12
|
-
function Calendar({ buttonVariant = "ghost", captionLayout = "label", className, classNames, components, formatters, locale, showOutsideDays = true, ...props }) {
|
|
13
|
-
const defaultClassNames = getDefaultClassNames();
|
|
14
|
-
return /* @__PURE__ */ jsx(DayPicker, {
|
|
15
|
-
captionLayout,
|
|
16
|
-
className: cn("group/calendar bg-background p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
|
|
17
|
-
classNames: {
|
|
18
|
-
root: cn("w-fit", defaultClassNames.root),
|
|
19
|
-
months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
|
|
20
|
-
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
21
|
-
nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
|
|
22
|
-
button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
|
|
23
|
-
button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
|
|
24
|
-
month_caption: cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
|
|
25
|
-
dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
|
|
26
|
-
dropdown_root: cn("relative rounded-(--cell-radius) border border-input shadow-xs has-focus:border-ring has-focus:ring-3 has-focus:ring-ring/50", defaultClassNames.dropdown_root),
|
|
27
|
-
dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
28
|
-
caption_label: cn("font-medium select-none", captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-(--cell-radius) ps-2 pe-1 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
|
|
29
|
-
month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
|
|
30
|
-
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
31
|
-
weekday: cn("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
|
|
32
|
-
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
33
|
-
week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
34
|
-
week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
|
|
35
|
-
day: cn("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)", defaultClassNames.day),
|
|
36
|
-
range_start: cn("relative isolate z-0 rounded-s-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:inset-e-0 after:w-4 after:bg-muted", defaultClassNames.range_start),
|
|
37
|
-
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
38
|
-
range_end: cn("relative isolate z-0 rounded-e-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:inset-s-0 after:w-4 after:bg-muted", defaultClassNames.range_end),
|
|
39
|
-
today: cn("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
40
|
-
outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
41
|
-
disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
42
|
-
hidden: cn("invisible", defaultClassNames.hidden),
|
|
43
|
-
...classNames
|
|
44
|
-
},
|
|
45
|
-
components: {
|
|
46
|
-
Chevron: CalendarChevron,
|
|
47
|
-
DayButton: (dayButtonProps) => /* @__PURE__ */ jsx(CalendarDayButton, {
|
|
48
|
-
locale,
|
|
49
|
-
...dayButtonProps
|
|
50
|
-
}),
|
|
51
|
-
Root: CalendarRoot,
|
|
52
|
-
WeekNumber: CalendarWeekNumber,
|
|
53
|
-
...components
|
|
54
|
-
},
|
|
55
|
-
formatters: {
|
|
56
|
-
formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
|
|
57
|
-
...formatters
|
|
58
|
-
},
|
|
59
|
-
locale,
|
|
60
|
-
showOutsideDays,
|
|
61
|
-
...props
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
function CalendarChevron({ className, orientation, ...props }) {
|
|
65
|
-
if (orientation === "left") return /* @__PURE__ */ jsx(ChevronLeftIcon, {
|
|
66
|
-
className: cn("size-4 rtl:rotate-180", className),
|
|
67
|
-
...props
|
|
68
|
-
});
|
|
69
|
-
if (orientation === "right") return /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
70
|
-
className: cn("size-4 rtl:rotate-180", className),
|
|
71
|
-
...props
|
|
72
|
-
});
|
|
73
|
-
return /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
74
|
-
className: cn("size-4", className),
|
|
75
|
-
...props
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
function CalendarRoot({ rootRef, ...props }) {
|
|
79
|
-
return /* @__PURE__ */ jsx("div", {
|
|
80
|
-
ref: rootRef,
|
|
81
|
-
"data-slot": "calendar",
|
|
82
|
-
...props
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
function CalendarWeekNumber({ children, ...props }) {
|
|
86
|
-
return /* @__PURE__ */ jsx("td", {
|
|
87
|
-
...props,
|
|
88
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
89
|
-
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
90
|
-
children
|
|
91
|
-
})
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* @since 0.3.16-canary.0
|
|
96
|
-
*/
|
|
97
|
-
function CalendarDayButton({ className, day, locale, modifiers, ...props }) {
|
|
98
|
-
const defaultClassNames = getDefaultClassNames();
|
|
99
|
-
const ref = useRef(null);
|
|
100
|
-
useEffect(() => {
|
|
101
|
-
if (modifiers.focused) ref.current?.focus();
|
|
102
|
-
}, [modifiers.focused]);
|
|
103
|
-
return /* @__PURE__ */ jsx(Button, {
|
|
104
|
-
ref,
|
|
105
|
-
className: cn("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-focused/day:relative group-data-focused/day:z-10 group-data-focused/day:border-ring group-data-focused/day:ring-3 group-data-focused/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
|
|
106
|
-
"data-day": day.date.toLocaleDateString(locale?.code),
|
|
107
|
-
"data-range-end": modifiers.range_end,
|
|
108
|
-
"data-range-middle": modifiers.range_middle,
|
|
109
|
-
"data-range-start": modifiers.range_start,
|
|
110
|
-
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
111
|
-
size: "icon",
|
|
112
|
-
variant: "ghost",
|
|
113
|
-
...props
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
//#endregion
|
|
117
|
-
export { Calendar, CalendarDayButton };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/card.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* @since 0.3.16-canary.0
|
|
6
|
-
*/
|
|
7
|
-
type CardProps = ComponentProps<"div"> & {
|
|
8
|
-
size?: "default" | "sm";
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @since 0.3.16-canary.0
|
|
12
|
-
*/
|
|
13
|
-
declare function Card({
|
|
14
|
-
className,
|
|
15
|
-
size,
|
|
16
|
-
...props
|
|
17
|
-
}: CardProps): JSX.Element;
|
|
18
|
-
/**
|
|
19
|
-
* @since 0.3.16-canary.0
|
|
20
|
-
*/
|
|
21
|
-
type CardHeaderProps = ComponentProps<"div">;
|
|
22
|
-
/**
|
|
23
|
-
* @since 0.3.16-canary.0
|
|
24
|
-
*/
|
|
25
|
-
declare function CardHeader({
|
|
26
|
-
className,
|
|
27
|
-
...props
|
|
28
|
-
}: CardHeaderProps): JSX.Element;
|
|
29
|
-
/**
|
|
30
|
-
* @since 0.3.16-canary.0
|
|
31
|
-
*/
|
|
32
|
-
type CardTitleProps = ComponentProps<"div">;
|
|
33
|
-
/**
|
|
34
|
-
* @since 0.3.16-canary.0
|
|
35
|
-
*/
|
|
36
|
-
declare function CardTitle({
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: CardTitleProps): JSX.Element;
|
|
40
|
-
/**
|
|
41
|
-
* @since 0.3.16-canary.0
|
|
42
|
-
*/
|
|
43
|
-
type CardDescriptionProps = ComponentProps<"div">;
|
|
44
|
-
/**
|
|
45
|
-
* @since 0.3.16-canary.0
|
|
46
|
-
*/
|
|
47
|
-
declare function CardDescription({
|
|
48
|
-
className,
|
|
49
|
-
...props
|
|
50
|
-
}: CardDescriptionProps): JSX.Element;
|
|
51
|
-
/**
|
|
52
|
-
* @since 0.3.16-canary.0
|
|
53
|
-
*/
|
|
54
|
-
type CardContentProps = ComponentProps<"div">;
|
|
55
|
-
/**
|
|
56
|
-
* @since 0.3.16-canary.0
|
|
57
|
-
*/
|
|
58
|
-
declare function CardContent({
|
|
59
|
-
className,
|
|
60
|
-
...props
|
|
61
|
-
}: CardContentProps): JSX.Element;
|
|
62
|
-
/**
|
|
63
|
-
* @since 0.3.16-canary.0
|
|
64
|
-
*/
|
|
65
|
-
type CardFooterProps = ComponentProps<"div">;
|
|
66
|
-
/**
|
|
67
|
-
* @since 0.3.16-canary.0
|
|
68
|
-
*/
|
|
69
|
-
declare function CardFooter({
|
|
70
|
-
className,
|
|
71
|
-
...props
|
|
72
|
-
}: CardFooterProps): JSX.Element;
|
|
73
|
-
/**
|
|
74
|
-
* @since 0.3.16-canary.0
|
|
75
|
-
*/
|
|
76
|
-
type CardActionProps = ComponentProps<"div">;
|
|
77
|
-
/**
|
|
78
|
-
* @since 0.3.16-canary.0
|
|
79
|
-
*/
|
|
80
|
-
declare function CardAction({
|
|
81
|
-
className,
|
|
82
|
-
...props
|
|
83
|
-
}: CardActionProps): JSX.Element;
|
|
84
|
-
//#endregion
|
|
85
|
-
export { Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps };
|
package/dist/components/card.mjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { cn } from "../lib/utils.mjs";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
//#region src/components/card.tsx
|
|
4
|
-
/**
|
|
5
|
-
* @since 0.3.16-canary.0
|
|
6
|
-
*/
|
|
7
|
-
function Card({ className, size = "default", ...props }) {
|
|
8
|
-
return /* @__PURE__ */ jsx("div", {
|
|
9
|
-
className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
|
|
10
|
-
"data-size": size,
|
|
11
|
-
"data-slot": "card",
|
|
12
|
-
...props
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @since 0.3.16-canary.0
|
|
17
|
-
*/
|
|
18
|
-
function CardHeader({ className, ...props }) {
|
|
19
|
-
return /* @__PURE__ */ jsx("div", {
|
|
20
|
-
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className),
|
|
21
|
-
"data-slot": "card-header",
|
|
22
|
-
...props
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @since 0.3.16-canary.0
|
|
27
|
-
*/
|
|
28
|
-
function CardTitle({ className, ...props }) {
|
|
29
|
-
return /* @__PURE__ */ jsx("div", {
|
|
30
|
-
className: cn("font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm", className),
|
|
31
|
-
"data-slot": "card-title",
|
|
32
|
-
...props
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* @since 0.3.16-canary.0
|
|
37
|
-
*/
|
|
38
|
-
function CardDescription({ className, ...props }) {
|
|
39
|
-
return /* @__PURE__ */ jsx("div", {
|
|
40
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
41
|
-
"data-slot": "card-description",
|
|
42
|
-
...props
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* @since 0.3.16-canary.0
|
|
47
|
-
*/
|
|
48
|
-
function CardContent({ className, ...props }) {
|
|
49
|
-
return /* @__PURE__ */ jsx("div", {
|
|
50
|
-
className: cn("px-(--card-spacing)", className),
|
|
51
|
-
"data-slot": "card-content",
|
|
52
|
-
...props
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* @since 0.3.16-canary.0
|
|
57
|
-
*/
|
|
58
|
-
function CardFooter({ className, ...props }) {
|
|
59
|
-
return /* @__PURE__ */ jsx("div", {
|
|
60
|
-
className: cn("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)", className),
|
|
61
|
-
"data-slot": "card-footer",
|
|
62
|
-
...props
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* @since 0.3.16-canary.0
|
|
67
|
-
*/
|
|
68
|
-
function CardAction({ className, ...props }) {
|
|
69
|
-
return /* @__PURE__ */ jsx("div", {
|
|
70
|
-
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
71
|
-
"data-slot": "card-action",
|
|
72
|
-
...props
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
//#endregion
|
|
76
|
-
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|