@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,189 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useId, useMemo } from "react";
|
|
3
|
-
import { Context } from "radix-ui/internal";
|
|
4
|
-
//#region src/primitives/progress-circle.tsx
|
|
5
|
-
const PROGRESS_CIRCLE_PROVIDER_NAME = "ProgressCircleProvider";
|
|
6
|
-
const [createProgressCircleContext, createProgressCircleScope] = Context.createContextScope(PROGRESS_CIRCLE_PROVIDER_NAME);
|
|
7
|
-
const [ProgressCircleContextProvider, useProgressCircleContext] = createProgressCircleContext(PROGRESS_CIRCLE_PROVIDER_NAME);
|
|
8
|
-
/**
|
|
9
|
-
* Provides context for the ProgressCircle component
|
|
10
|
-
*
|
|
11
|
-
* Manages calculations for rendering the circular progress indicator,
|
|
12
|
-
* including value clamping, sizing, thresholds, and indeterminate state.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```tsx
|
|
16
|
-
* <ProgressCircleProvider
|
|
17
|
-
* value={75}
|
|
18
|
-
* min={0}
|
|
19
|
-
* max={100}
|
|
20
|
-
* size={64}
|
|
21
|
-
* thresholds={[
|
|
22
|
-
* { value: 30, color: 'red', background: 'pink' },
|
|
23
|
-
* { value: 70, color: 'yellow', background: 'lightyellow' },
|
|
24
|
-
* { value: 100, color: 'green', background: 'lightgreen' }
|
|
25
|
-
* ]}
|
|
26
|
-
* >
|
|
27
|
-
* <ProgressCircleSVG>
|
|
28
|
-
* <ProgressCircleIndicator />
|
|
29
|
-
* <ProgressCircleTrack />
|
|
30
|
-
* </ProgressCircleSVG>
|
|
31
|
-
* <ProgressCircleValue />
|
|
32
|
-
* </ProgressCircleProvider>
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @since 0.3.16-canary.0
|
|
36
|
-
*/
|
|
37
|
-
function ProgressCircleProvider({ __scopeProgressCircle, children, formatValue, id: propertyId, max = 100, min = 0, size = 48, startAngle = -90, strokeWidth = 4, thresholds, value }) {
|
|
38
|
-
const uniqueId = useId();
|
|
39
|
-
const id = propertyId ?? uniqueId;
|
|
40
|
-
const validSize = Math.max(0, size);
|
|
41
|
-
const validStrokeWidth = Math.max(0, strokeWidth);
|
|
42
|
-
const validStartAngle = startAngle % 360;
|
|
43
|
-
let validMin = min;
|
|
44
|
-
let validMax = max;
|
|
45
|
-
if (validMin > validMax) [validMin, validMax] = [validMax, validMin];
|
|
46
|
-
const clampedValue = value === null || value === void 0 ? void 0 : clamp(validMin, validMax, value);
|
|
47
|
-
const range = validMax - validMin;
|
|
48
|
-
const percentage = clampedValue !== void 0 && range > 0 ? (clampedValue - validMin) / range * 100 : 0;
|
|
49
|
-
const valueText = clampedValue !== void 0 && formatValue ? formatValue(clampedValue) : `${Math.round(percentage).toString()}%`;
|
|
50
|
-
const sortedThresholds = useMemo(() => thresholds && thresholds.length > 0 ? [...thresholds].toSorted((a, b) => a.value - b.value) : [], [thresholds]);
|
|
51
|
-
const threshold = useMemo(() => {
|
|
52
|
-
if (clampedValue === void 0) return;
|
|
53
|
-
for (const sortedThreshold of sortedThresholds) if (clampedValue <= sortedThreshold.value) return sortedThreshold;
|
|
54
|
-
return sortedThresholds.at(-1);
|
|
55
|
-
}, [sortedThresholds, clampedValue]);
|
|
56
|
-
const center = validSize / 2;
|
|
57
|
-
const radius = Math.max(0, center - validStrokeWidth / 2);
|
|
58
|
-
const circumference = 2 * Math.PI * radius;
|
|
59
|
-
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
60
|
-
const rotationTransform = `rotate(${validStartAngle.toString()}, 0, 0)`;
|
|
61
|
-
return /* @__PURE__ */ jsx(ProgressCircleContextProvider, {
|
|
62
|
-
center,
|
|
63
|
-
circumference,
|
|
64
|
-
clampedValue,
|
|
65
|
-
id,
|
|
66
|
-
max: validMax,
|
|
67
|
-
min: validMin,
|
|
68
|
-
radius,
|
|
69
|
-
rotationTransform,
|
|
70
|
-
scope: __scopeProgressCircle,
|
|
71
|
-
size: validSize,
|
|
72
|
-
strokeDashoffset,
|
|
73
|
-
strokeWidth: validStrokeWidth,
|
|
74
|
-
threshold,
|
|
75
|
-
value: value ?? 0,
|
|
76
|
-
valueText,
|
|
77
|
-
children
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Root component for the progress circle
|
|
82
|
-
*
|
|
83
|
-
* Serves as a wrapper for other progress circle components.
|
|
84
|
-
*
|
|
85
|
-
* @since 0.3.16-canary.0
|
|
86
|
-
*/
|
|
87
|
-
function ProgressCircle({ __scopeProgressCircle, ...props }) {
|
|
88
|
-
return /* @__PURE__ */ jsx("div", { ...props });
|
|
89
|
-
}
|
|
90
|
-
const PROGRESS_CIRCLE_SVG_NAME = "ProgressCircleSVG";
|
|
91
|
-
/**
|
|
92
|
-
* SVG container for the progress circle
|
|
93
|
-
*
|
|
94
|
-
* Renders the SVG with accessibility attributes and supports indeterminate state.
|
|
95
|
-
*
|
|
96
|
-
* @since 0.3.16-canary.0
|
|
97
|
-
*/
|
|
98
|
-
function ProgressCircleSVG({ __scopeProgressCircle, ...props }) {
|
|
99
|
-
const { clampedValue, id, max, min, size, valueText } = useProgressCircleContext(PROGRESS_CIRCLE_SVG_NAME, __scopeProgressCircle);
|
|
100
|
-
return /* @__PURE__ */ jsx("svg", {
|
|
101
|
-
"aria-label": "Progress",
|
|
102
|
-
"aria-valuemax": max,
|
|
103
|
-
"aria-valuemin": min,
|
|
104
|
-
"aria-valuenow": clampedValue,
|
|
105
|
-
"aria-valuetext": clampedValue === void 0 ? void 0 : valueText,
|
|
106
|
-
height: size,
|
|
107
|
-
id,
|
|
108
|
-
role: "progressbar",
|
|
109
|
-
viewBox: `0 0 ${size.toString()} ${size.toString()}`,
|
|
110
|
-
width: size,
|
|
111
|
-
...props
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
const PROGRESS_CIRCLE_TRACK_NAME = "ProgressCircleTrack";
|
|
115
|
-
/**
|
|
116
|
-
* Background circle for the progress indicator
|
|
117
|
-
*
|
|
118
|
-
* Renders the static track of the progress circle.
|
|
119
|
-
*
|
|
120
|
-
* @since 0.3.16-canary.0
|
|
121
|
-
*/
|
|
122
|
-
function ProgressCircleTrack({ __scopeProgressCircle, ...props }) {
|
|
123
|
-
const { center, radius, strokeWidth, threshold } = useProgressCircleContext(PROGRESS_CIRCLE_TRACK_NAME, __scopeProgressCircle);
|
|
124
|
-
return /* @__PURE__ */ jsx("circle", {
|
|
125
|
-
cx: center,
|
|
126
|
-
cy: center,
|
|
127
|
-
fill: "transparent",
|
|
128
|
-
r: radius,
|
|
129
|
-
stroke: threshold?.background ?? "currentColor",
|
|
130
|
-
strokeWidth,
|
|
131
|
-
...props
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
const PROGRESS_CIRCLE_INDICATOR_NAME = "ProgressCircleIndicator";
|
|
135
|
-
/**
|
|
136
|
-
* Foreground circle showing progress
|
|
137
|
-
*
|
|
138
|
-
* Renders the dynamic progress indicator with stroke dash properties.
|
|
139
|
-
*
|
|
140
|
-
* @since 0.3.16-canary.0
|
|
141
|
-
*/
|
|
142
|
-
function ProgressCircleIndicator({ __scopeProgressCircle, ...props }) {
|
|
143
|
-
const { center, circumference, radius, rotationTransform, strokeDashoffset, strokeWidth, threshold } = useProgressCircleContext(PROGRESS_CIRCLE_INDICATOR_NAME, __scopeProgressCircle);
|
|
144
|
-
return /* @__PURE__ */ jsx("circle", {
|
|
145
|
-
cx: center,
|
|
146
|
-
cy: center,
|
|
147
|
-
fill: "transparent",
|
|
148
|
-
r: radius,
|
|
149
|
-
stroke: threshold?.color ?? "currentColor",
|
|
150
|
-
strokeDasharray: circumference,
|
|
151
|
-
strokeDashoffset,
|
|
152
|
-
strokeLinecap: "round",
|
|
153
|
-
strokeWidth,
|
|
154
|
-
transform: rotationTransform,
|
|
155
|
-
...props
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
const PROGRESS_CIRCLE_VALUE_NAME = "ProgressCircleValue";
|
|
159
|
-
/**
|
|
160
|
-
* Displays the current progress value
|
|
161
|
-
*
|
|
162
|
-
* Supports custom content or default value text rendering.
|
|
163
|
-
*
|
|
164
|
-
* @since 0.3.16-canary.0
|
|
165
|
-
*/
|
|
166
|
-
function ProgressCircleValue({ __scopeProgressCircle, children, ...props }) {
|
|
167
|
-
const { clampedValue, valueText } = useProgressCircleContext(PROGRESS_CIRCLE_VALUE_NAME, __scopeProgressCircle);
|
|
168
|
-
if (typeof children === "function") return children({
|
|
169
|
-
value: clampedValue,
|
|
170
|
-
valueText
|
|
171
|
-
});
|
|
172
|
-
return /* @__PURE__ */ jsx("div", {
|
|
173
|
-
...props,
|
|
174
|
-
children: children ?? valueText
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Clamps a value within a specified min/max range
|
|
179
|
-
*
|
|
180
|
-
* @param min - Minimum value
|
|
181
|
-
* @param max - Maximum value
|
|
182
|
-
* @param value - Value to clamp
|
|
183
|
-
* @returns Clamped value
|
|
184
|
-
*/
|
|
185
|
-
function clamp(min, max, value) {
|
|
186
|
-
return Math.min(max, Math.max(min, value));
|
|
187
|
-
}
|
|
188
|
-
//#endregion
|
|
189
|
-
export { ProgressCircleIndicator as Indicator, ProgressCircleIndicator, ProgressCircle, ProgressCircle as Root, ProgressCircleProvider, ProgressCircleProvider as Provider, ProgressCircleSVG, ProgressCircleSVG as SVG, ProgressCircleTrack, ProgressCircleTrack as Track, ProgressCircleValue, ProgressCircleValue as Value, createProgressCircleScope };
|
package/dist/variants/alert.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/alert.ts
|
|
3
|
-
/**
|
|
4
|
-
* @since 0.3.16-canary.0
|
|
5
|
-
*/
|
|
6
|
-
const alertVariants = tv({
|
|
7
|
-
base: "group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
|
8
|
-
defaultVariants: { variant: "default" },
|
|
9
|
-
variants: { variant: {
|
|
10
|
-
default: "bg-card text-card-foreground",
|
|
11
|
-
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
12
|
-
} }
|
|
13
|
-
});
|
|
14
|
-
//#endregion
|
|
15
|
-
export { alertVariants };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/attachment.ts
|
|
3
|
-
/**
|
|
4
|
-
* File/media attachment card. Size drives padding for the media and content
|
|
5
|
-
* slots; orientation switches between a horizontal row and a vertical tile.
|
|
6
|
-
*
|
|
7
|
-
* @since 0.5.0-canary.3
|
|
8
|
-
*/
|
|
9
|
-
const attachmentVariants = tv({
|
|
10
|
-
base: "group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed",
|
|
11
|
-
defaultVariants: {
|
|
12
|
-
orientation: "horizontal",
|
|
13
|
-
size: "default"
|
|
14
|
-
},
|
|
15
|
-
variants: {
|
|
16
|
-
size: {
|
|
17
|
-
default: "gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2",
|
|
18
|
-
sm: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",
|
|
19
|
-
xs: "gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1"
|
|
20
|
-
},
|
|
21
|
-
orientation: {
|
|
22
|
-
horizontal: "min-w-40 items-center",
|
|
23
|
-
vertical: "w-24 flex-col has-data-[slot=attachment-content]:w-30"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* Media thumbnail — an icon tile or a cover image that reacts to attachment
|
|
29
|
-
* size, orientation, and upload state via the parent `group/attachment`.
|
|
30
|
-
*
|
|
31
|
-
* @since 0.5.0-canary.3
|
|
32
|
-
*/
|
|
33
|
-
const attachmentMediaVariants = tv({
|
|
34
|
-
base: "relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5",
|
|
35
|
-
defaultVariants: { variant: "icon" },
|
|
36
|
-
variants: { variant: {
|
|
37
|
-
icon: "",
|
|
38
|
-
image: "opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
|
|
39
|
-
} }
|
|
40
|
-
});
|
|
41
|
-
//#endregion
|
|
42
|
-
export { attachmentMediaVariants, attachmentVariants };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from "../lib/utils.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/variants/badge.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* @since 0.3.16-canary.0
|
|
6
|
-
*/
|
|
7
|
-
declare const badgeVariants: import("@codefast/tailwind-variants").VariantResolver<{
|
|
8
|
-
variant: {
|
|
9
|
-
default: string;
|
|
10
|
-
destructive: string;
|
|
11
|
-
ghost: string;
|
|
12
|
-
link: string;
|
|
13
|
-
outline: string;
|
|
14
|
-
secondary: string;
|
|
15
|
-
};
|
|
16
|
-
}, Record<string, never>>;
|
|
17
|
-
/**
|
|
18
|
-
* @since 0.3.16-canary.0
|
|
19
|
-
*/
|
|
20
|
-
type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { type BadgeVariants, badgeVariants };
|
package/dist/variants/badge.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/badge.ts
|
|
3
|
-
/**
|
|
4
|
-
* @since 0.3.16-canary.0
|
|
5
|
-
*/
|
|
6
|
-
const badgeVariants = tv({
|
|
7
|
-
base: "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
8
|
-
defaultVariants: { variant: "default" },
|
|
9
|
-
variants: { variant: {
|
|
10
|
-
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
11
|
-
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
12
|
-
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
13
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
14
|
-
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
15
|
-
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80"
|
|
16
|
-
} }
|
|
17
|
-
});
|
|
18
|
-
//#endregion
|
|
19
|
-
export { badgeVariants };
|
package/dist/variants/bubble.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/bubble.ts
|
|
3
|
-
/**
|
|
4
|
-
* Chat bubble surface. Variants paint the nested `bubble-content`, so the color
|
|
5
|
-
* follows the message author regardless of alignment.
|
|
6
|
-
*
|
|
7
|
-
* @since 0.5.0-canary.3
|
|
8
|
-
*/
|
|
9
|
-
const bubbleVariants = tv({
|
|
10
|
-
base: "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",
|
|
11
|
-
defaultVariants: { variant: "default" },
|
|
12
|
-
variants: { variant: {
|
|
13
|
-
default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
|
|
14
|
-
secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
|
|
15
|
-
muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
|
|
16
|
-
tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
|
|
17
|
-
outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
|
|
18
|
-
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
|
|
19
|
-
destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"
|
|
20
|
-
} }
|
|
21
|
-
});
|
|
22
|
-
/**
|
|
23
|
-
* Reaction pill anchored to a bubble corner.
|
|
24
|
-
*
|
|
25
|
-
* @since 0.5.0-canary.3
|
|
26
|
-
*/
|
|
27
|
-
const bubbleReactionsVariants = tv({
|
|
28
|
-
base: "absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",
|
|
29
|
-
defaultVariants: {
|
|
30
|
-
align: "end",
|
|
31
|
-
side: "bottom"
|
|
32
|
-
},
|
|
33
|
-
variants: {
|
|
34
|
-
side: {
|
|
35
|
-
top: "top-0 -translate-y-3/4",
|
|
36
|
-
bottom: "bottom-0 translate-y-3/4"
|
|
37
|
-
},
|
|
38
|
-
align: {
|
|
39
|
-
start: "start-3",
|
|
40
|
-
end: "end-3"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
//#endregion
|
|
45
|
-
export { bubbleReactionsVariants, bubbleVariants };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/button-group.ts
|
|
3
|
-
/**
|
|
4
|
-
* @since 0.3.16-canary.0
|
|
5
|
-
*/
|
|
6
|
-
const buttonGroupVariants = tv({
|
|
7
|
-
base: "group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
8
|
-
defaultVariants: { orientation: "horizontal" },
|
|
9
|
-
variants: { orientation: {
|
|
10
|
-
horizontal: "[&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-e-md!",
|
|
11
|
-
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md!"
|
|
12
|
-
} }
|
|
13
|
-
});
|
|
14
|
-
//#endregion
|
|
15
|
-
export { buttonGroupVariants };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from "../lib/utils.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/variants/button.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* @since 0.3.16-canary.0
|
|
6
|
-
*/
|
|
7
|
-
declare const buttonVariants: import("@codefast/tailwind-variants").VariantResolver<{
|
|
8
|
-
size: {
|
|
9
|
-
default: string;
|
|
10
|
-
xs: string;
|
|
11
|
-
sm: string;
|
|
12
|
-
lg: string;
|
|
13
|
-
icon: string;
|
|
14
|
-
"icon-xs": string;
|
|
15
|
-
"icon-sm": string;
|
|
16
|
-
"icon-lg": string;
|
|
17
|
-
};
|
|
18
|
-
variant: {
|
|
19
|
-
default: string;
|
|
20
|
-
destructive: string;
|
|
21
|
-
ghost: string;
|
|
22
|
-
link: string;
|
|
23
|
-
outline: string;
|
|
24
|
-
secondary: string;
|
|
25
|
-
};
|
|
26
|
-
}, Record<string, never>>;
|
|
27
|
-
/**
|
|
28
|
-
* @since 0.3.16-canary.0
|
|
29
|
-
*/
|
|
30
|
-
type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
31
|
-
//#endregion
|
|
32
|
-
export { type ButtonVariants, buttonVariants };
|
package/dist/variants/button.mjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/button.ts
|
|
3
|
-
/**
|
|
4
|
-
* @since 0.3.16-canary.0
|
|
5
|
-
*/
|
|
6
|
-
const buttonVariants = tv({
|
|
7
|
-
base: "group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
8
|
-
defaultVariants: {
|
|
9
|
-
size: "default",
|
|
10
|
-
variant: "default"
|
|
11
|
-
},
|
|
12
|
-
variants: {
|
|
13
|
-
size: {
|
|
14
|
-
default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
15
|
-
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
16
|
-
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5",
|
|
17
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
18
|
-
icon: "size-9",
|
|
19
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
20
|
-
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
21
|
-
"icon-lg": "size-10"
|
|
22
|
-
},
|
|
23
|
-
variant: {
|
|
24
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
25
|
-
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
26
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
27
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
28
|
-
outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
29
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
//#endregion
|
|
34
|
-
export { buttonVariants };
|
package/dist/variants/empty.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/empty.ts
|
|
3
|
-
/**
|
|
4
|
-
* @since 0.3.16-canary.0
|
|
5
|
-
*/
|
|
6
|
-
const emptyMediaVariants = tv({
|
|
7
|
-
base: "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
8
|
-
defaultVariants: { variant: "default" },
|
|
9
|
-
variants: { variant: {
|
|
10
|
-
default: "bg-transparent",
|
|
11
|
-
icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
|
|
12
|
-
} }
|
|
13
|
-
});
|
|
14
|
-
//#endregion
|
|
15
|
-
export { emptyMediaVariants };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from "../lib/utils.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/variants/field.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* @since 0.3.16-canary.0
|
|
6
|
-
*/
|
|
7
|
-
declare const fieldVariants: import("@codefast/tailwind-variants").VariantResolver<{
|
|
8
|
-
orientation: {
|
|
9
|
-
horizontal: string;
|
|
10
|
-
responsive: string;
|
|
11
|
-
vertical: string;
|
|
12
|
-
};
|
|
13
|
-
}, Record<string, never>>;
|
|
14
|
-
/**
|
|
15
|
-
* @since 0.3.16-canary.0
|
|
16
|
-
*/
|
|
17
|
-
type FieldVariants = VariantProps<typeof fieldVariants>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { type FieldVariants, fieldVariants };
|
package/dist/variants/field.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/field.ts
|
|
3
|
-
/**
|
|
4
|
-
* @since 0.3.16-canary.0
|
|
5
|
-
*/
|
|
6
|
-
const fieldVariants = tv({
|
|
7
|
-
base: "group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
|
|
8
|
-
defaultVariants: { orientation: "vertical" },
|
|
9
|
-
variants: { orientation: {
|
|
10
|
-
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
11
|
-
responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
12
|
-
vertical: "flex-col *:w-full [&>.sr-only]:w-auto"
|
|
13
|
-
} }
|
|
14
|
-
});
|
|
15
|
-
//#endregion
|
|
16
|
-
export { fieldVariants };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/input-group.ts
|
|
3
|
-
/**
|
|
4
|
-
* @since 0.3.16-canary.0
|
|
5
|
-
*/
|
|
6
|
-
const inputGroupVariants = tv({ base: "group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5" });
|
|
7
|
-
/**
|
|
8
|
-
* @since 0.3.16-canary.0
|
|
9
|
-
*/
|
|
10
|
-
const inputGroupAddonVariants = tv({
|
|
11
|
-
base: "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-disabled/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-3px)] [&>svg:not([class*='size-'])]:size-4",
|
|
12
|
-
defaultVariants: { align: "inline-start" },
|
|
13
|
-
variants: { align: {
|
|
14
|
-
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
|
|
15
|
-
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
16
|
-
"inline-end": "order-last pe-2 has-[>button]:-me-1 has-[>kbd]:me-[-0.15rem]",
|
|
17
|
-
"inline-start": "order-first ps-2 has-[>button]:-ms-1 has-[>kbd]:ms-[-0.15rem]"
|
|
18
|
-
} }
|
|
19
|
-
});
|
|
20
|
-
/**
|
|
21
|
-
* @since 0.3.16-canary.0
|
|
22
|
-
*/
|
|
23
|
-
const inputGroupButtonVariants = tv({
|
|
24
|
-
base: "flex items-center gap-2 text-sm shadow-none",
|
|
25
|
-
defaultVariants: { size: "xs" },
|
|
26
|
-
variants: { size: {
|
|
27
|
-
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
28
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0",
|
|
29
|
-
sm: "",
|
|
30
|
-
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5"
|
|
31
|
-
} }
|
|
32
|
-
});
|
|
33
|
-
//#endregion
|
|
34
|
-
export { inputGroupAddonVariants, inputGroupButtonVariants, inputGroupVariants };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from "../lib/utils.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/variants/input-number.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* @since 0.3.16-canary.0
|
|
6
|
-
*/
|
|
7
|
-
declare const inputNumberVariants: import("@codefast/tailwind-variants").VariantResolver<{
|
|
8
|
-
variant: {
|
|
9
|
-
split: {
|
|
10
|
-
field: string;
|
|
11
|
-
};
|
|
12
|
-
stepper: {};
|
|
13
|
-
};
|
|
14
|
-
}, {
|
|
15
|
-
/**
|
|
16
|
-
* Split layout: trailing increment button (always on the inline end).
|
|
17
|
-
*/
|
|
18
|
-
incrementButton: string;
|
|
19
|
-
/**
|
|
20
|
-
* Split layout: leading decrement button (always on the inline start).
|
|
21
|
-
*/
|
|
22
|
-
decrementButton: string;
|
|
23
|
-
/**
|
|
24
|
-
* Editable numeric input.
|
|
25
|
-
*/
|
|
26
|
-
field: string;
|
|
27
|
-
/**
|
|
28
|
-
* Outer container.
|
|
29
|
-
*/
|
|
30
|
-
root: string;
|
|
31
|
-
/**
|
|
32
|
-
* Stepper layout: stacked chevron column on the trailing edge.
|
|
33
|
-
*/
|
|
34
|
-
stepper: string;
|
|
35
|
-
/**
|
|
36
|
-
* Stepper layout: individual chevron button (shared by increment/decrement).
|
|
37
|
-
*/
|
|
38
|
-
stepperButton: string;
|
|
39
|
-
}>;
|
|
40
|
-
/**
|
|
41
|
-
* @since 0.3.16-canary.0
|
|
42
|
-
*/
|
|
43
|
-
type InputNumberVariants = VariantProps<typeof inputNumberVariants>;
|
|
44
|
-
//#endregion
|
|
45
|
-
export { type InputNumberVariants, inputNumberVariants };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/input-number.ts
|
|
3
|
-
/**
|
|
4
|
-
* @since 0.3.16-canary.0
|
|
5
|
-
*/
|
|
6
|
-
const inputNumberVariants = tv({
|
|
7
|
-
defaultVariants: { variant: "stepper" },
|
|
8
|
-
slots: {
|
|
9
|
-
/**
|
|
10
|
-
* Split layout: trailing increment button (always on the inline end).
|
|
11
|
-
*/
|
|
12
|
-
incrementButton: "order-last h-full w-9 shrink-0 rounded-none rounded-e-[calc(var(--radius-md)-1px)] border-s border-s-input text-muted-foreground group-focus-within/input-number:border-s-ring group-has-aria-invalid/input-number:border-s-destructive focus-visible:bg-ring/50 focus-visible:ring-0 group-has-aria-invalid/input-number:focus-visible:bg-destructive/20 dark:group-has-aria-invalid/input-number:focus-visible:bg-destructive/40",
|
|
13
|
-
/**
|
|
14
|
-
* Split layout: leading decrement button (always on the inline start).
|
|
15
|
-
*/
|
|
16
|
-
decrementButton: "order-first h-full w-9 shrink-0 rounded-none rounded-s-[calc(var(--radius-md)-1px)] border-e border-e-input text-muted-foreground group-focus-within/input-number:border-e-ring group-has-aria-invalid/input-number:border-e-destructive focus-visible:bg-ring/50 focus-visible:ring-0 group-has-aria-invalid/input-number:focus-visible:bg-destructive/20 dark:group-has-aria-invalid/input-number:focus-visible:bg-destructive/40",
|
|
17
|
-
/**
|
|
18
|
-
* Editable numeric input.
|
|
19
|
-
*/
|
|
20
|
-
field: "h-full min-w-0 flex-1 bg-transparent px-2.5 py-1 outline-hidden selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed",
|
|
21
|
-
/**
|
|
22
|
-
* Outer container.
|
|
23
|
-
*/
|
|
24
|
-
root: "group/input-number relative flex h-9 w-full min-w-0 items-center overflow-hidden rounded-md border border-input bg-transparent text-base transition-[color,box-shadow] not-has-disabled:shadow-xs focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-disabled:opacity-50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 motion-reduce:transition-none md:text-sm dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
25
|
-
/**
|
|
26
|
-
* Stepper layout: stacked chevron column on the trailing edge.
|
|
27
|
-
*/
|
|
28
|
-
stepper: "order-last grid h-full w-8 shrink-0 divide-y divide-input border-s border-s-input transition-colors group-focus-within/input-number:divide-ring group-focus-within/input-number:border-s-ring group-has-aria-invalid/input-number:divide-destructive group-has-aria-invalid/input-number:border-s-destructive motion-reduce:transition-none *:[button]:focus-visible:bg-ring/50 *:[button]:focus-visible:ring-0 group-has-aria-invalid/input-number:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid/input-number:*:[button]:focus-visible:bg-destructive/40",
|
|
29
|
-
/**
|
|
30
|
-
* Stepper layout: individual chevron button (shared by increment/decrement).
|
|
31
|
-
*/
|
|
32
|
-
stepperButton: "h-auto min-w-0 rounded-none px-0 text-muted-foreground"
|
|
33
|
-
},
|
|
34
|
-
variants: { variant: {
|
|
35
|
-
split: { field: "text-center tabular-nums" },
|
|
36
|
-
stepper: {}
|
|
37
|
-
} }
|
|
38
|
-
});
|
|
39
|
-
//#endregion
|
|
40
|
-
export { inputNumberVariants };
|
package/dist/variants/item.mjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/item.ts
|
|
3
|
-
/**
|
|
4
|
-
* @since 0.3.16-canary.0
|
|
5
|
-
*/
|
|
6
|
-
const itemVariants = tv({
|
|
7
|
-
base: "group/item flex w-full flex-wrap items-center rounded-md border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
|
|
8
|
-
defaultVariants: {
|
|
9
|
-
size: "default",
|
|
10
|
-
variant: "default"
|
|
11
|
-
},
|
|
12
|
-
variants: {
|
|
13
|
-
size: {
|
|
14
|
-
default: "gap-3.5 px-4 py-3.5",
|
|
15
|
-
sm: "gap-2.5 px-3 py-2.5",
|
|
16
|
-
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
17
|
-
},
|
|
18
|
-
variant: {
|
|
19
|
-
default: "border-transparent",
|
|
20
|
-
muted: "border-transparent bg-muted/50",
|
|
21
|
-
outline: "border-border"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* @since 0.3.16-canary.0
|
|
27
|
-
*/
|
|
28
|
-
const itemMediaVariants = tv({
|
|
29
|
-
base: "flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
|
|
30
|
-
defaultVariants: { variant: "default" },
|
|
31
|
-
variants: { variant: {
|
|
32
|
-
default: "bg-transparent",
|
|
33
|
-
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
34
|
-
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
35
|
-
} }
|
|
36
|
-
});
|
|
37
|
-
//#endregion
|
|
38
|
-
export { itemMediaVariants, itemVariants };
|
package/dist/variants/marker.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { tv } from "../lib/utils.mjs";
|
|
2
|
-
//#region src/variants/marker.ts
|
|
3
|
-
/**
|
|
4
|
-
* Inline chat divider — plain label, centered separator rule, or bottom border.
|
|
5
|
-
*
|
|
6
|
-
* @since 0.5.0-canary.3
|
|
7
|
-
*/
|
|
8
|
-
const markerVariants = tv({
|
|
9
|
-
base: "group/marker relative flex min-h-4 w-full items-center gap-2 text-start text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground",
|
|
10
|
-
defaultVariants: { variant: "default" },
|
|
11
|
-
variants: { variant: {
|
|
12
|
-
default: "",
|
|
13
|
-
separator: "before:me-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ms-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
|
|
14
|
-
border: "border-b border-border pb-2"
|
|
15
|
-
} }
|
|
16
|
-
});
|
|
17
|
-
//#endregion
|
|
18
|
-
export { markerVariants };
|