@codefast/ui 0.8.0 → 0.9.1
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 +38 -0
- package/README.md +78 -39
- package/dist/components/accordion.d.ts +1 -2
- package/dist/components/accordion.js +1 -2
- package/dist/components/alert-dialog.d.ts +1 -2
- package/dist/components/alert-dialog.js +1 -2
- package/dist/components/alert.d.ts +1 -2
- package/dist/components/alert.js +1 -2
- package/dist/components/aspect-ratio.d.ts +1 -2
- package/dist/components/aspect-ratio.js +1 -2
- package/dist/components/attachment.d.ts +1 -2
- package/dist/components/attachment.js +1 -2
- package/dist/components/avatar.d.ts +1 -2
- package/dist/components/avatar.js +1 -2
- package/dist/components/badge.d.ts +1 -2
- package/dist/components/badge.js +1 -2
- package/dist/components/breadcrumb.d.ts +1 -2
- package/dist/components/breadcrumb.js +1 -2
- package/dist/components/bubble.d.ts +1 -2
- package/dist/components/bubble.js +1 -2
- package/dist/components/button-group.d.ts +1 -2
- package/dist/components/button-group.js +1 -2
- package/dist/components/button.d.ts +1 -2
- package/dist/components/button.js +1 -2
- package/dist/components/calendar.d.ts +2 -3
- package/dist/components/calendar.js +1 -2
- package/dist/components/card.d.ts +1 -2
- package/dist/components/card.js +1 -2
- package/dist/components/carousel.d.ts +1 -2
- package/dist/components/carousel.js +1 -2
- package/dist/components/chart.d.ts +1 -2
- package/dist/components/chart.js +1 -2
- package/dist/components/checkbox-cards.d.ts +1 -2
- package/dist/components/checkbox-cards.js +1 -2
- package/dist/components/checkbox-group.d.ts +1 -2
- package/dist/components/checkbox-group.js +1 -2
- package/dist/components/checkbox.d.ts +1 -2
- package/dist/components/checkbox.js +1 -2
- package/dist/components/collapsible.d.ts +1 -2
- package/dist/components/collapsible.js +1 -2
- package/dist/components/command.d.ts +1 -2
- package/dist/components/command.js +1 -2
- package/dist/components/context-menu.d.ts +2 -3
- package/dist/components/context-menu.js +3 -4
- package/dist/components/dialog.d.ts +1 -2
- package/dist/components/dialog.js +1 -2
- package/dist/components/direction.d.ts +1 -2
- package/dist/components/direction.js +1 -2
- package/dist/components/drawer.d.ts +1 -2
- package/dist/components/drawer.js +1 -2
- package/dist/components/dropdown-menu.d.ts +2 -3
- package/dist/components/dropdown-menu.js +3 -4
- package/dist/components/empty.d.ts +1 -2
- package/dist/components/empty.js +1 -2
- package/dist/components/field.d.ts +1 -2
- package/dist/components/field.js +1 -2
- package/dist/components/form.d.ts +1 -2
- package/dist/components/form.js +1 -2
- package/dist/components/hover-card.d.ts +1 -2
- package/dist/components/hover-card.js +1 -2
- package/dist/components/input-group.d.ts +1 -2
- package/dist/components/input-group.js +1 -2
- package/dist/components/input-number.d.ts +1 -2
- package/dist/components/input-number.js +1 -2
- package/dist/components/input-otp.d.ts +1 -2
- package/dist/components/input-otp.js +1 -2
- package/dist/components/input-password.d.ts +1 -2
- package/dist/components/input-password.js +1 -2
- package/dist/components/input-search.d.ts +1 -2
- package/dist/components/input-search.js +2 -3
- package/dist/components/input.d.ts +1 -2
- package/dist/components/input.js +1 -2
- package/dist/components/item.d.ts +1 -2
- package/dist/components/item.js +1 -2
- package/dist/components/kbd.d.ts +1 -2
- package/dist/components/kbd.js +1 -2
- package/dist/components/label.d.ts +1 -2
- package/dist/components/label.js +1 -2
- package/dist/components/marker.d.ts +1 -2
- package/dist/components/marker.js +1 -2
- package/dist/components/menubar.d.ts +2 -3
- package/dist/components/menubar.js +3 -4
- package/dist/components/message-scroller.d.ts +1 -2
- package/dist/components/message-scroller.js +1 -2
- package/dist/components/message.d.ts +1 -2
- package/dist/components/message.js +1 -2
- package/dist/components/native-select.d.ts +1 -2
- package/dist/components/native-select.js +1 -2
- package/dist/components/navigation-menu.d.ts +1 -2
- package/dist/components/navigation-menu.js +1 -2
- package/dist/components/pagination.d.ts +1 -2
- package/dist/components/pagination.js +1 -2
- package/dist/components/popover.d.ts +1 -2
- package/dist/components/popover.js +1 -2
- package/dist/components/progress-circle.d.ts +1 -2
- package/dist/components/progress-circle.js +1 -2
- package/dist/components/progress.d.ts +1 -2
- package/dist/components/progress.js +1 -2
- package/dist/components/radio-cards.d.ts +1 -2
- package/dist/components/radio-cards.js +1 -2
- package/dist/components/radio-group.d.ts +1 -2
- package/dist/components/radio-group.js +1 -2
- package/dist/components/radio.d.ts +1 -2
- package/dist/components/radio.js +1 -2
- package/dist/components/resizable.d.ts +1 -2
- package/dist/components/resizable.js +1 -2
- package/dist/components/scroll-area.d.ts +1 -2
- package/dist/components/scroll-area.js +2 -3
- package/dist/components/select.d.ts +1 -2
- package/dist/components/select.js +1 -2
- package/dist/components/separator.d.ts +1 -2
- package/dist/components/separator.js +2 -3
- package/dist/components/sheet.d.ts +1 -2
- package/dist/components/sheet.js +1 -2
- package/dist/components/sidebar.d.ts +1 -2
- package/dist/components/sidebar.js +1 -2
- package/dist/components/skeleton.d.ts +1 -2
- package/dist/components/skeleton.js +1 -2
- package/dist/components/slider.d.ts +1 -2
- package/dist/components/slider.js +2 -3
- package/dist/components/sonner.d.ts +1 -2
- package/dist/components/sonner.js +1 -2
- package/dist/components/spinner.d.ts +1 -2
- package/dist/components/spinner.js +1 -2
- package/dist/components/switch.d.ts +1 -2
- package/dist/components/switch.js +1 -2
- package/dist/components/table.d.ts +1 -2
- package/dist/components/table.js +1 -2
- package/dist/components/tabs.d.ts +1 -2
- package/dist/components/tabs.js +1 -2
- package/dist/components/textarea.d.ts +1 -2
- package/dist/components/textarea.js +1 -2
- package/dist/components/toggle-group.d.ts +1 -2
- package/dist/components/toggle-group.js +1 -2
- package/dist/components/toggle.d.ts +1 -2
- package/dist/components/toggle.js +1 -2
- package/dist/components/tooltip.d.ts +1 -2
- package/dist/components/tooltip.js +1 -2
- package/dist/hooks/use-animated-value.d.ts +1 -2
- package/dist/hooks/use-animated-value.js +1 -2
- package/dist/hooks/use-copy-to-clipboard.d.ts +1 -2
- package/dist/hooks/use-copy-to-clipboard.js +1 -2
- package/dist/hooks/use-has-hydrated.d.ts +1 -2
- package/dist/hooks/use-has-hydrated.js +1 -2
- package/dist/hooks/use-is-mobile.d.ts +1 -2
- package/dist/hooks/use-is-mobile.js +1 -2
- package/dist/hooks/use-latest.d.ts +1 -2
- package/dist/hooks/use-latest.js +1 -2
- package/dist/hooks/use-media-query.d.ts +1 -2
- package/dist/hooks/use-media-query.js +1 -2
- package/dist/hooks/use-message-scroller-commands.d.ts +4 -3
- package/dist/hooks/use-message-scroller-commands.js +33 -5
- package/dist/hooks/use-message-scroller-controller.d.ts +1 -2
- package/dist/hooks/use-message-scroller-controller.js +76 -13
- package/dist/hooks/use-message-scroller-refs.d.ts +3 -3
- package/dist/hooks/use-message-scroller-refs.js +5 -2
- package/dist/hooks/use-mutation-observer.d.ts +1 -2
- package/dist/hooks/use-mutation-observer.js +1 -2
- package/dist/hooks/use-pagination.d.ts +1 -2
- package/dist/hooks/use-pagination.js +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/lib/message-scroller/geometry.d.ts +3 -4
- package/dist/lib/message-scroller/geometry.js +1 -2
- package/dist/lib/message-scroller/stores.d.ts +1 -2
- package/dist/lib/message-scroller/stores.js +2 -3
- package/dist/lib/message-scroller/types.d.ts +17 -9
- package/dist/lib/message-scroller/types.js +2 -2
- package/dist/lib/use-render.d.ts +2 -3
- package/dist/lib/use-render.js +1 -2
- package/dist/lib/utils.d.ts +1 -2
- package/dist/lib/utils.js +1 -2
- package/dist/primitives/checkbox-group.d.ts +2 -3
- package/dist/primitives/checkbox-group.js +3 -4
- package/dist/primitives/input-number.d.ts +1 -2
- package/dist/primitives/input-number.js +2 -3
- package/dist/primitives/input.d.ts +1 -2
- package/dist/primitives/input.js +1 -2
- package/dist/primitives/message-scroller.d.ts +1 -2
- package/dist/primitives/message-scroller.js +17 -9
- package/dist/primitives/progress-circle.d.ts +1 -2
- package/dist/primitives/progress-circle.js +1 -2
- package/dist/variants/alert.d.ts +1 -2
- package/dist/variants/alert.js +1 -2
- package/dist/variants/attachment.d.ts +1 -2
- package/dist/variants/attachment.js +1 -2
- package/dist/variants/badge.d.ts +1 -2
- package/dist/variants/badge.js +1 -2
- package/dist/variants/bubble.d.ts +1 -2
- package/dist/variants/bubble.js +1 -2
- package/dist/variants/button-group.d.ts +1 -2
- package/dist/variants/button-group.js +1 -2
- package/dist/variants/button.d.ts +1 -2
- package/dist/variants/button.js +1 -2
- package/dist/variants/empty.d.ts +1 -2
- package/dist/variants/empty.js +1 -2
- package/dist/variants/field.d.ts +1 -2
- package/dist/variants/field.js +1 -2
- package/dist/variants/input-group.d.ts +1 -2
- package/dist/variants/input-group.js +1 -2
- package/dist/variants/item.d.ts +1 -2
- package/dist/variants/item.js +1 -2
- package/dist/variants/marker.d.ts +1 -2
- package/dist/variants/marker.js +1 -2
- package/dist/variants/navigation-menu.d.ts +1 -2
- package/dist/variants/navigation-menu.js +1 -2
- package/dist/variants/progress-circle.d.ts +1 -2
- package/dist/variants/progress-circle.js +1 -2
- package/dist/variants/scroll-area.d.ts +1 -2
- package/dist/variants/scroll-area.js +1 -2
- package/dist/variants/separator.d.ts +1 -2
- package/dist/variants/separator.js +1 -2
- package/dist/variants/sheet.d.ts +1 -2
- package/dist/variants/sheet.js +1 -2
- package/dist/variants/sidebar.d.ts +1 -2
- package/dist/variants/sidebar.js +1 -2
- package/dist/variants/tabs.d.ts +1 -2
- package/dist/variants/tabs.js +1 -2
- package/dist/variants/toggle.d.ts +1 -2
- package/dist/variants/toggle.js +1 -2
- package/package.json +12 -129
- package/dist/components/accordion.d.ts.map +0 -1
- package/dist/components/accordion.js.map +0 -1
- package/dist/components/alert-dialog.d.ts.map +0 -1
- package/dist/components/alert-dialog.js.map +0 -1
- package/dist/components/alert.d.ts.map +0 -1
- package/dist/components/alert.js.map +0 -1
- package/dist/components/aspect-ratio.d.ts.map +0 -1
- package/dist/components/aspect-ratio.js.map +0 -1
- package/dist/components/attachment.d.ts.map +0 -1
- package/dist/components/attachment.js.map +0 -1
- package/dist/components/avatar.d.ts.map +0 -1
- package/dist/components/avatar.js.map +0 -1
- package/dist/components/badge.d.ts.map +0 -1
- package/dist/components/badge.js.map +0 -1
- package/dist/components/breadcrumb.d.ts.map +0 -1
- package/dist/components/breadcrumb.js.map +0 -1
- package/dist/components/bubble.d.ts.map +0 -1
- package/dist/components/bubble.js.map +0 -1
- package/dist/components/button-group.d.ts.map +0 -1
- package/dist/components/button-group.js.map +0 -1
- package/dist/components/button.d.ts.map +0 -1
- package/dist/components/button.js.map +0 -1
- package/dist/components/calendar.d.ts.map +0 -1
- package/dist/components/calendar.js.map +0 -1
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/card.js.map +0 -1
- package/dist/components/carousel.d.ts.map +0 -1
- package/dist/components/carousel.js.map +0 -1
- package/dist/components/chart.d.ts.map +0 -1
- package/dist/components/chart.js.map +0 -1
- package/dist/components/checkbox-cards.d.ts.map +0 -1
- package/dist/components/checkbox-cards.js.map +0 -1
- package/dist/components/checkbox-group.d.ts.map +0 -1
- package/dist/components/checkbox-group.js.map +0 -1
- package/dist/components/checkbox.d.ts.map +0 -1
- package/dist/components/checkbox.js.map +0 -1
- package/dist/components/collapsible.d.ts.map +0 -1
- package/dist/components/collapsible.js.map +0 -1
- package/dist/components/command.d.ts.map +0 -1
- package/dist/components/command.js.map +0 -1
- package/dist/components/context-menu.d.ts.map +0 -1
- package/dist/components/context-menu.js.map +0 -1
- package/dist/components/dialog.d.ts.map +0 -1
- package/dist/components/dialog.js.map +0 -1
- package/dist/components/direction.d.ts.map +0 -1
- package/dist/components/direction.js.map +0 -1
- package/dist/components/drawer.d.ts.map +0 -1
- package/dist/components/drawer.js.map +0 -1
- package/dist/components/dropdown-menu.d.ts.map +0 -1
- package/dist/components/dropdown-menu.js.map +0 -1
- package/dist/components/empty.d.ts.map +0 -1
- package/dist/components/empty.js.map +0 -1
- package/dist/components/field.d.ts.map +0 -1
- package/dist/components/field.js.map +0 -1
- package/dist/components/form.d.ts.map +0 -1
- package/dist/components/form.js.map +0 -1
- package/dist/components/hover-card.d.ts.map +0 -1
- package/dist/components/hover-card.js.map +0 -1
- package/dist/components/input-group.d.ts.map +0 -1
- package/dist/components/input-group.js.map +0 -1
- package/dist/components/input-number.d.ts.map +0 -1
- package/dist/components/input-number.js.map +0 -1
- package/dist/components/input-otp.d.ts.map +0 -1
- package/dist/components/input-otp.js.map +0 -1
- package/dist/components/input-password.d.ts.map +0 -1
- package/dist/components/input-password.js.map +0 -1
- package/dist/components/input-search.d.ts.map +0 -1
- package/dist/components/input-search.js.map +0 -1
- package/dist/components/input.d.ts.map +0 -1
- package/dist/components/input.js.map +0 -1
- package/dist/components/item.d.ts.map +0 -1
- package/dist/components/item.js.map +0 -1
- package/dist/components/kbd.d.ts.map +0 -1
- package/dist/components/kbd.js.map +0 -1
- package/dist/components/label.d.ts.map +0 -1
- package/dist/components/label.js.map +0 -1
- package/dist/components/marker.d.ts.map +0 -1
- package/dist/components/marker.js.map +0 -1
- package/dist/components/menubar.d.ts.map +0 -1
- package/dist/components/menubar.js.map +0 -1
- package/dist/components/message-scroller.d.ts.map +0 -1
- package/dist/components/message-scroller.js.map +0 -1
- package/dist/components/message.d.ts.map +0 -1
- package/dist/components/message.js.map +0 -1
- package/dist/components/native-select.d.ts.map +0 -1
- package/dist/components/native-select.js.map +0 -1
- package/dist/components/navigation-menu.d.ts.map +0 -1
- package/dist/components/navigation-menu.js.map +0 -1
- package/dist/components/pagination.d.ts.map +0 -1
- package/dist/components/pagination.js.map +0 -1
- package/dist/components/popover.d.ts.map +0 -1
- package/dist/components/popover.js.map +0 -1
- package/dist/components/progress-circle.d.ts.map +0 -1
- package/dist/components/progress-circle.js.map +0 -1
- package/dist/components/progress.d.ts.map +0 -1
- package/dist/components/progress.js.map +0 -1
- package/dist/components/radio-cards.d.ts.map +0 -1
- package/dist/components/radio-cards.js.map +0 -1
- package/dist/components/radio-group.d.ts.map +0 -1
- package/dist/components/radio-group.js.map +0 -1
- package/dist/components/radio.d.ts.map +0 -1
- package/dist/components/radio.js.map +0 -1
- package/dist/components/resizable.d.ts.map +0 -1
- package/dist/components/resizable.js.map +0 -1
- package/dist/components/scroll-area.d.ts.map +0 -1
- package/dist/components/scroll-area.js.map +0 -1
- package/dist/components/select.d.ts.map +0 -1
- package/dist/components/select.js.map +0 -1
- package/dist/components/separator.d.ts.map +0 -1
- package/dist/components/separator.js.map +0 -1
- package/dist/components/sheet.d.ts.map +0 -1
- package/dist/components/sheet.js.map +0 -1
- package/dist/components/sidebar.d.ts.map +0 -1
- package/dist/components/sidebar.js.map +0 -1
- package/dist/components/skeleton.d.ts.map +0 -1
- package/dist/components/skeleton.js.map +0 -1
- package/dist/components/slider.d.ts.map +0 -1
- package/dist/components/slider.js.map +0 -1
- package/dist/components/sonner.d.ts.map +0 -1
- package/dist/components/sonner.js.map +0 -1
- package/dist/components/spinner.d.ts.map +0 -1
- package/dist/components/spinner.js.map +0 -1
- package/dist/components/switch.d.ts.map +0 -1
- package/dist/components/switch.js.map +0 -1
- package/dist/components/table.d.ts.map +0 -1
- package/dist/components/table.js.map +0 -1
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/tabs.js.map +0 -1
- package/dist/components/textarea.d.ts.map +0 -1
- package/dist/components/textarea.js.map +0 -1
- package/dist/components/toggle-group.d.ts.map +0 -1
- package/dist/components/toggle-group.js.map +0 -1
- package/dist/components/toggle.d.ts.map +0 -1
- package/dist/components/toggle.js.map +0 -1
- package/dist/components/tooltip.d.ts.map +0 -1
- package/dist/components/tooltip.js.map +0 -1
- package/dist/hooks/use-animated-value.d.ts.map +0 -1
- package/dist/hooks/use-animated-value.js.map +0 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +0 -1
- package/dist/hooks/use-copy-to-clipboard.js.map +0 -1
- package/dist/hooks/use-has-hydrated.d.ts.map +0 -1
- package/dist/hooks/use-has-hydrated.js.map +0 -1
- package/dist/hooks/use-is-mobile.d.ts.map +0 -1
- package/dist/hooks/use-is-mobile.js.map +0 -1
- package/dist/hooks/use-latest.d.ts.map +0 -1
- package/dist/hooks/use-latest.js.map +0 -1
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-media-query.js.map +0 -1
- package/dist/hooks/use-message-scroller-commands.d.ts.map +0 -1
- package/dist/hooks/use-message-scroller-commands.js.map +0 -1
- package/dist/hooks/use-message-scroller-controller.d.ts.map +0 -1
- package/dist/hooks/use-message-scroller-controller.js.map +0 -1
- package/dist/hooks/use-message-scroller-refs.d.ts.map +0 -1
- package/dist/hooks/use-message-scroller-refs.js.map +0 -1
- package/dist/hooks/use-mutation-observer.d.ts.map +0 -1
- package/dist/hooks/use-mutation-observer.js.map +0 -1
- package/dist/hooks/use-pagination.d.ts.map +0 -1
- package/dist/hooks/use-pagination.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/message-scroller/geometry.d.ts.map +0 -1
- package/dist/lib/message-scroller/geometry.js.map +0 -1
- package/dist/lib/message-scroller/stores.d.ts.map +0 -1
- package/dist/lib/message-scroller/stores.js.map +0 -1
- package/dist/lib/message-scroller/types.d.ts.map +0 -1
- package/dist/lib/message-scroller/types.js.map +0 -1
- package/dist/lib/use-render.d.ts.map +0 -1
- package/dist/lib/use-render.js.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js.map +0 -1
- package/dist/primitives/checkbox-group.d.ts.map +0 -1
- package/dist/primitives/checkbox-group.js.map +0 -1
- package/dist/primitives/input-number.d.ts.map +0 -1
- package/dist/primitives/input-number.js.map +0 -1
- package/dist/primitives/input.d.ts.map +0 -1
- package/dist/primitives/input.js.map +0 -1
- package/dist/primitives/message-scroller.d.ts.map +0 -1
- package/dist/primitives/message-scroller.js.map +0 -1
- package/dist/primitives/progress-circle.d.ts.map +0 -1
- package/dist/primitives/progress-circle.js.map +0 -1
- package/dist/variants/alert.d.ts.map +0 -1
- package/dist/variants/alert.js.map +0 -1
- package/dist/variants/attachment.d.ts.map +0 -1
- package/dist/variants/attachment.js.map +0 -1
- package/dist/variants/badge.d.ts.map +0 -1
- package/dist/variants/badge.js.map +0 -1
- package/dist/variants/bubble.d.ts.map +0 -1
- package/dist/variants/bubble.js.map +0 -1
- package/dist/variants/button-group.d.ts.map +0 -1
- package/dist/variants/button-group.js.map +0 -1
- package/dist/variants/button.d.ts.map +0 -1
- package/dist/variants/button.js.map +0 -1
- package/dist/variants/empty.d.ts.map +0 -1
- package/dist/variants/empty.js.map +0 -1
- package/dist/variants/field.d.ts.map +0 -1
- package/dist/variants/field.js.map +0 -1
- package/dist/variants/input-group.d.ts.map +0 -1
- package/dist/variants/input-group.js.map +0 -1
- package/dist/variants/item.d.ts.map +0 -1
- package/dist/variants/item.js.map +0 -1
- package/dist/variants/marker.d.ts.map +0 -1
- package/dist/variants/marker.js.map +0 -1
- package/dist/variants/navigation-menu.d.ts.map +0 -1
- package/dist/variants/navigation-menu.js.map +0 -1
- package/dist/variants/progress-circle.d.ts.map +0 -1
- package/dist/variants/progress-circle.js.map +0 -1
- package/dist/variants/scroll-area.d.ts.map +0 -1
- package/dist/variants/scroll-area.js.map +0 -1
- package/dist/variants/separator.d.ts.map +0 -1
- package/dist/variants/separator.js.map +0 -1
- package/dist/variants/sheet.d.ts.map +0 -1
- package/dist/variants/sheet.js.map +0 -1
- package/dist/variants/sidebar.d.ts.map +0 -1
- package/dist/variants/sidebar.js.map +0 -1
- package/dist/variants/tabs.d.ts.map +0 -1
- package/dist/variants/tabs.js.map +0 -1
- package/dist/variants/toggle.d.ts.map +0 -1
- package/dist/variants/toggle.js.map +0 -1
- package/src/components/accordion.tsx +0 -104
- package/src/components/alert-dialog.tsx +0 -274
- package/src/components/alert.tsx +0 -84
- package/src/components/aspect-ratio.tsx +0 -21
- package/src/components/attachment.tsx +0 -264
- package/src/components/avatar.tsx +0 -157
- package/src/components/badge.tsx +0 -31
- package/src/components/breadcrumb.tsx +0 -170
- package/src/components/bubble.tsx +0 -106
- package/src/components/button-group.tsx +0 -89
- package/src/components/button.tsx +0 -51
- package/src/components/calendar.tsx +0 -210
- package/src/components/card.tsx +0 -153
- package/src/components/carousel.tsx +0 -344
- package/src/components/chart.tsx +0 -514
- package/src/components/checkbox-cards.tsx +0 -67
- package/src/components/checkbox-group.tsx +0 -55
- package/src/components/checkbox.tsx +0 -41
- package/src/components/collapsible.tsx +0 -49
- package/src/components/command.tsx +0 -276
- package/src/components/context-menu.tsx +0 -378
- package/src/components/dialog.tsx +0 -226
- package/src/components/direction.tsx +0 -28
- package/src/components/drawer.tsx +0 -191
- package/src/components/dropdown-menu.tsx +0 -387
- package/src/components/empty.tsx +0 -141
- package/src/components/field.tsx +0 -307
- package/src/components/form.tsx +0 -238
- package/src/components/hover-card.tsx +0 -83
- package/src/components/input-group.tsx +0 -171
- package/src/components/input-number.tsx +0 -191
- package/src/components/input-otp.tsx +0 -122
- package/src/components/input-password.tsx +0 -46
- package/src/components/input-search.tsx +0 -77
- package/src/components/input.tsx +0 -32
- package/src/components/item.tsx +0 -244
- package/src/components/kbd.tsx +0 -43
- package/src/components/label.tsx +0 -32
- package/src/components/marker.tsx +0 -86
- package/src/components/menubar.tsx +0 -406
- package/src/components/message-scroller.tsx +0 -199
- package/src/components/message.tsx +0 -159
- package/src/components/native-select.tsx +0 -79
- package/src/components/navigation-menu.tsx +0 -217
- package/src/components/pagination.tsx +0 -182
- package/src/components/popover.tsx +0 -152
- package/src/components/progress-circle.tsx +0 -179
- package/src/components/progress.tsx +0 -37
- package/src/components/radio-cards.tsx +0 -60
- package/src/components/radio-group.tsx +0 -55
- package/src/components/radio.tsx +0 -36
- package/src/components/resizable.tsx +0 -70
- package/src/components/scroll-area.tsx +0 -87
- package/src/components/select.tsx +0 -274
- package/src/components/separator.tsx +0 -54
- package/src/components/sheet.tsx +0 -221
- package/src/components/sidebar.tsx +0 -891
- package/src/components/skeleton.tsx +0 -31
- package/src/components/slider.tsx +0 -62
- package/src/components/sonner.tsx +0 -53
- package/src/components/spinner.tsx +0 -62
- package/src/components/switch.tsx +0 -40
- package/src/components/table.tsx +0 -165
- package/src/components/tabs.tsx +0 -100
- package/src/components/textarea.tsx +0 -31
- package/src/components/toggle-group.tsx +0 -129
- package/src/components/toggle.tsx +0 -26
- package/src/components/tooltip.tsx +0 -103
- package/src/css/foundation/base.css +0 -68
- package/src/css/foundation/motion.css +0 -65
- package/src/css/foundation/source.css +0 -10
- package/src/css/foundation/tokens.css +0 -83
- package/src/css/foundation/utilities.css +0 -451
- package/src/css/foundation/variants.css +0 -108
- package/src/css/preset.css +0 -14
- package/src/css/style.css +0 -11
- package/src/css/themes/amber.css +0 -105
- package/src/css/themes/blue.css +0 -105
- package/src/css/themes/cyan.css +0 -105
- package/src/css/themes/emerald.css +0 -105
- package/src/css/themes/fuchsia.css +0 -105
- package/src/css/themes/gray.css +0 -105
- package/src/css/themes/green.css +0 -105
- package/src/css/themes/indigo.css +0 -105
- package/src/css/themes/lime.css +0 -105
- package/src/css/themes/neutral.css +0 -105
- package/src/css/themes/orange.css +0 -105
- package/src/css/themes/pink.css +0 -105
- package/src/css/themes/purple.css +0 -105
- package/src/css/themes/red.css +0 -105
- package/src/css/themes/rose.css +0 -105
- package/src/css/themes/sky.css +0 -105
- package/src/css/themes/slate.css +0 -105
- package/src/css/themes/stone.css +0 -105
- package/src/css/themes/teal.css +0 -105
- package/src/css/themes/violet.css +0 -105
- package/src/css/themes/yellow.css +0 -105
- package/src/css/themes/zinc.css +0 -105
- package/src/hooks/use-animated-value.ts +0 -95
- package/src/hooks/use-copy-to-clipboard.ts +0 -58
- package/src/hooks/use-has-hydrated.ts +0 -22
- package/src/hooks/use-is-mobile.ts +0 -25
- package/src/hooks/use-latest.ts +0 -23
- package/src/hooks/use-media-query.ts +0 -69
- package/src/hooks/use-message-scroller-commands.ts +0 -312
- package/src/hooks/use-message-scroller-controller.ts +0 -651
- package/src/hooks/use-message-scroller-refs.ts +0 -158
- package/src/hooks/use-mutation-observer.ts +0 -51
- package/src/hooks/use-pagination.ts +0 -166
- package/src/index.ts +0 -751
- package/src/lib/message-scroller/geometry.ts +0 -401
- package/src/lib/message-scroller/stores.ts +0 -88
- package/src/lib/message-scroller/types.ts +0 -336
- package/src/lib/use-render.ts +0 -201
- package/src/lib/utils.ts +0 -5
- package/src/primitives/checkbox-group.tsx +0 -335
- package/src/primitives/input-number.tsx +0 -1030
- package/src/primitives/input.tsx +0 -221
- package/src/primitives/message-scroller.tsx +0 -404
- package/src/primitives/progress-circle.tsx +0 -489
- package/src/variants/alert.ts +0 -30
- package/src/variants/attachment.ts +0 -67
- package/src/variants/badge.ts +0 -35
- package/src/variants/bubble.ts +0 -75
- package/src/variants/button-group.ts +0 -32
- package/src/variants/button.ts +0 -51
- package/src/variants/empty.ts +0 -30
- package/src/variants/field.ts +0 -33
- package/src/variants/input-group.ts +0 -72
- package/src/variants/item.ts +0 -62
- package/src/variants/marker.ts +0 -34
- package/src/variants/navigation-menu.ts +0 -21
- package/src/variants/progress-circle.ts +0 -42
- package/src/variants/scroll-area.ts +0 -69
- package/src/variants/separator.ts +0 -36
- package/src/variants/sheet.ts +0 -33
- package/src/variants/sidebar.ts +0 -37
- package/src/variants/tabs.ts +0 -30
- package/src/variants/toggle.ts +0 -36
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "#/lib/utils";
|
|
4
|
-
|
|
5
|
-
// ── Component: Skeleton ──────────────────────────────────────────────────────────────────────────────────────────────
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @since 0.3.16-canary.0
|
|
9
|
-
*/
|
|
10
|
-
type SkeletonProps = ComponentProps<"div">;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @since 0.3.16-canary.0
|
|
14
|
-
*/
|
|
15
|
-
function Skeleton({ className, ...props }: SkeletonProps): JSX.Element {
|
|
16
|
-
return (
|
|
17
|
-
<div
|
|
18
|
-
className={cn(
|
|
19
|
-
"animate-shimmer rounded-md bg-linear-to-r from-muted via-white/15 to-muted bg-size-[400%_100%]",
|
|
20
|
-
className,
|
|
21
|
-
)}
|
|
22
|
-
data-slot="skeleton"
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
29
|
-
|
|
30
|
-
export { Skeleton };
|
|
31
|
-
export type { SkeletonProps };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import * as SliderPrimitive from "radix-ui/slider";
|
|
2
|
-
import type { ComponentProps, JSX } from "react";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "#/lib/utils";
|
|
6
|
-
|
|
7
|
-
// ── Component: Slider ────────────────────────────────────────────────────────────────────────────────────────────────
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @since 0.3.16-canary.0
|
|
11
|
-
*/
|
|
12
|
-
type SliderProps = ComponentProps<typeof SliderPrimitive.Root>;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @since 0.3.16-canary.0
|
|
16
|
-
*/
|
|
17
|
-
function Slider({ className, defaultValue, max = 100, min = 0, value, ...props }: SliderProps): JSX.Element {
|
|
18
|
-
const _values = useMemo(() => {
|
|
19
|
-
if (Array.isArray(value)) {
|
|
20
|
-
return value;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return Array.isArray(defaultValue) ? defaultValue : [min, max];
|
|
24
|
-
}, [value, defaultValue, min, max]);
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<SliderPrimitive.Root
|
|
28
|
-
className={cn(
|
|
29
|
-
"relative flex w-full touch-none items-center select-none data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col data-disabled:opacity-50",
|
|
30
|
-
className,
|
|
31
|
-
)}
|
|
32
|
-
data-slot="slider"
|
|
33
|
-
defaultValue={defaultValue}
|
|
34
|
-
max={max}
|
|
35
|
-
min={min}
|
|
36
|
-
value={value}
|
|
37
|
-
{...props}
|
|
38
|
-
>
|
|
39
|
-
<SliderPrimitive.Track
|
|
40
|
-
className="relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1"
|
|
41
|
-
data-slot="slider-track"
|
|
42
|
-
>
|
|
43
|
-
<SliderPrimitive.Range
|
|
44
|
-
className="absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
45
|
-
data-slot="slider-range"
|
|
46
|
-
/>
|
|
47
|
-
</SliderPrimitive.Track>
|
|
48
|
-
{Array.from({ length: _values.length }, (_, index) => (
|
|
49
|
-
<SliderPrimitive.Thumb
|
|
50
|
-
key={index}
|
|
51
|
-
className="relative block size-3 shrink-0 rounded-full border border-ring bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"
|
|
52
|
-
data-slot="slider-thumb"
|
|
53
|
-
/>
|
|
54
|
-
))}
|
|
55
|
-
</SliderPrimitive.Root>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
60
|
-
|
|
61
|
-
export { Slider };
|
|
62
|
-
export type { SliderProps };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon } from "lucide-react";
|
|
2
|
-
import { useTheme } from "next-themes";
|
|
3
|
-
import type { CSSProperties, JSX } from "react";
|
|
4
|
-
import type { ToasterProps as SonnerToasterProps } from "sonner";
|
|
5
|
-
import { Toaster as Sonner } from "sonner";
|
|
6
|
-
|
|
7
|
-
// ── Component: Sonner ────────────────────────────────────────────────────────────────────────────────────────────────
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @since 0.3.16-canary.0
|
|
11
|
-
*/
|
|
12
|
-
type ToasterProps = SonnerToasterProps;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @since 0.3.16-canary.0
|
|
16
|
-
*/
|
|
17
|
-
function Toaster({ ...props }: ToasterProps): JSX.Element {
|
|
18
|
-
const { theme = "system" } = useTheme();
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<Sonner
|
|
22
|
-
className="toaster group"
|
|
23
|
-
icons={{
|
|
24
|
-
error: <OctagonXIcon className="size-4" />,
|
|
25
|
-
info: <InfoIcon className="size-4" />,
|
|
26
|
-
loading: <Loader2Icon className="size-4 animate-spin" />,
|
|
27
|
-
success: <CircleCheckIcon className="size-4" />,
|
|
28
|
-
warning: <TriangleAlertIcon className="size-4" />,
|
|
29
|
-
}}
|
|
30
|
-
style={
|
|
31
|
-
{
|
|
32
|
-
"--border-radius": "var(--radius)",
|
|
33
|
-
"--normal-bg": "var(--popover)",
|
|
34
|
-
"--normal-border": "var(--border)",
|
|
35
|
-
"--normal-text": "var(--popover-foreground)",
|
|
36
|
-
} as CSSProperties
|
|
37
|
-
}
|
|
38
|
-
theme={theme as ToasterProps["theme"]}
|
|
39
|
-
toastOptions={{
|
|
40
|
-
classNames: {
|
|
41
|
-
toast: "rounded-2xl",
|
|
42
|
-
},
|
|
43
|
-
}}
|
|
44
|
-
{...props}
|
|
45
|
-
/>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
50
|
-
|
|
51
|
-
export { toast, useSonner } from "sonner";
|
|
52
|
-
export { Toaster };
|
|
53
|
-
export type { ToasterProps };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import * as VisuallyHidden from "radix-ui/visually-hidden";
|
|
2
|
-
import type { ComponentProps, CSSProperties, ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
import { cn } from "#/lib/utils";
|
|
5
|
-
|
|
6
|
-
// ── Component: Spinner ───────────────────────────────────────────────────────────────────────────────────────────────
|
|
7
|
-
|
|
8
|
-
const SPINNER_COUNT = 8;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @since 0.3.16-canary.0
|
|
12
|
-
*/
|
|
13
|
-
interface SpinnerProps extends ComponentProps<"span"> {
|
|
14
|
-
loading?: boolean;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @since 0.3.16-canary.0
|
|
19
|
-
*/
|
|
20
|
-
function Spinner({ children, className, loading = true, ...props }: SpinnerProps): ReactNode {
|
|
21
|
-
if (!loading) {
|
|
22
|
-
return children;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const spinner = (
|
|
26
|
-
<span className={cn("relative flex size-4 items-center justify-center opacity-60", className)} {...props}>
|
|
27
|
-
{Array.from({ length: SPINNER_COUNT }, (_, index) => (
|
|
28
|
-
<span
|
|
29
|
-
key={index}
|
|
30
|
-
className="absolute h-full rotate-(--spinner-rotate) before:block before:h-1/3 before:w-full before:animate-out before:rounded-full before:bg-current before:delay-(--spinner-delay) before:animation-duration-(--spinner-duration) before:fade-out-25 before:repeat-infinite motion-reduce:before:animate-none"
|
|
31
|
-
style={
|
|
32
|
-
{
|
|
33
|
-
"--spinner-delay": `-${((SPINNER_COUNT - index) * 100).toString()}ms`,
|
|
34
|
-
"--spinner-duration": `${(SPINNER_COUNT * 100).toString()}ms`,
|
|
35
|
-
"--spinner-rotate": `${((360 / SPINNER_COUNT) * index).toString()}deg`,
|
|
36
|
-
width: `${(100 / SPINNER_COUNT).toString()}%`,
|
|
37
|
-
} as CSSProperties
|
|
38
|
-
}
|
|
39
|
-
/>
|
|
40
|
-
))}
|
|
41
|
-
</span>
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
if (children === undefined) {
|
|
45
|
-
return spinner;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<span className="relative">
|
|
50
|
-
<span aria-hidden className="invisible contents">
|
|
51
|
-
{children}
|
|
52
|
-
</span>
|
|
53
|
-
<VisuallyHidden.Root>{children}</VisuallyHidden.Root>
|
|
54
|
-
<span className="absolute inset-0 flex items-center justify-center">{spinner}</span>
|
|
55
|
-
</span>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
60
|
-
|
|
61
|
-
export { Spinner };
|
|
62
|
-
export type { SpinnerProps };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as SwitchPrimitives from "radix-ui/switch";
|
|
2
|
-
import type { ComponentProps, JSX } from "react";
|
|
3
|
-
|
|
4
|
-
import { cn } from "#/lib/utils";
|
|
5
|
-
|
|
6
|
-
// ── Component: Switch ────────────────────────────────────────────────────────────────────────────────────────────────
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @since 0.3.16-canary.0
|
|
10
|
-
*/
|
|
11
|
-
type SwitchProps = ComponentProps<typeof SwitchPrimitives.Root> & {
|
|
12
|
-
size?: "default" | "sm";
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @since 0.3.16-canary.0
|
|
17
|
-
*/
|
|
18
|
-
function Switch({ className, size = "default", ...props }: SwitchProps): JSX.Element {
|
|
19
|
-
return (
|
|
20
|
-
<SwitchPrimitives.Root
|
|
21
|
-
className={cn(
|
|
22
|
-
"peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all duration-control ease-snappy outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-4.5 data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
23
|
-
className,
|
|
24
|
-
)}
|
|
25
|
-
data-size={size}
|
|
26
|
-
data-slot="switch"
|
|
27
|
-
{...props}
|
|
28
|
-
>
|
|
29
|
-
<SwitchPrimitives.Thumb
|
|
30
|
-
className="pointer-events-none block rounded-full bg-background ring-0 transition-transform duration-control-indicator ease-spring group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-3.5 group-data-[size=sm]/switch:data-checked:translate-x-2.5 rtl:group-data-[size=default]/switch:data-checked:-translate-x-3.5 rtl:group-data-[size=sm]/switch:data-checked:-translate-x-2.5 dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=default]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
31
|
-
data-slot="switch-thumb"
|
|
32
|
-
/>
|
|
33
|
-
</SwitchPrimitives.Root>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
38
|
-
|
|
39
|
-
export { Switch };
|
|
40
|
-
export type { SwitchProps };
|
package/src/components/table.tsx
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "#/lib/utils";
|
|
4
|
-
|
|
5
|
-
// ── Component: Table ─────────────────────────────────────────────────────────────────────────────────────────────────
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @since 0.3.16-canary.0
|
|
9
|
-
*/
|
|
10
|
-
type TableProps = ComponentProps<"table">;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @since 0.3.16-canary.0
|
|
14
|
-
*/
|
|
15
|
-
function Table({ className, ...props }: TableProps): JSX.Element {
|
|
16
|
-
return (
|
|
17
|
-
<div className="relative w-full overflow-x-auto" data-slot="table-container">
|
|
18
|
-
<table className={cn("w-full caption-bottom text-sm", className)} data-slot="table" {...props} />
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// ── Component: TableHeader ───────────────────────────────────────────────────────────────────────────────────────────
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @since 0.3.16-canary.0
|
|
27
|
-
*/
|
|
28
|
-
type TableHeaderProps = ComponentProps<"thead">;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @since 0.3.16-canary.0
|
|
32
|
-
*/
|
|
33
|
-
function TableHeader({ className, ...props }: TableHeaderProps): JSX.Element {
|
|
34
|
-
return <thead className={cn("[&_tr]:border-b", className)} data-slot="table-header" {...props} />;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// ── Component: TableBody ─────────────────────────────────────────────────────────────────────────────────────────────
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @since 0.3.16-canary.0
|
|
41
|
-
*/
|
|
42
|
-
type TableBodyProps = ComponentProps<"tbody">;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @since 0.3.16-canary.0
|
|
46
|
-
*/
|
|
47
|
-
function TableBody({ className, ...props }: TableBodyProps): JSX.Element {
|
|
48
|
-
return <tbody className={cn("[&_tr:last-child]:border-0", className)} data-slot="table-body" {...props} />;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// ── Component: TableFooter ───────────────────────────────────────────────────────────────────────────────────────────
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @since 0.3.16-canary.0
|
|
55
|
-
*/
|
|
56
|
-
type TableFooterProps = ComponentProps<"tfoot">;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @since 0.3.16-canary.0
|
|
60
|
-
*/
|
|
61
|
-
function TableFooter({ className, ...props }: TableFooterProps): JSX.Element {
|
|
62
|
-
return (
|
|
63
|
-
<tfoot
|
|
64
|
-
className={cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)}
|
|
65
|
-
data-slot="table-footer"
|
|
66
|
-
{...props}
|
|
67
|
-
/>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// ── Component: TableRow ──────────────────────────────────────────────────────────────────────────────────────────────
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* @since 0.3.16-canary.0
|
|
75
|
-
*/
|
|
76
|
-
type TableRowProps = ComponentProps<"tr">;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @since 0.3.16-canary.0
|
|
80
|
-
*/
|
|
81
|
-
function TableRow({ className, ...props }: TableRowProps): JSX.Element {
|
|
82
|
-
return (
|
|
83
|
-
<tr
|
|
84
|
-
className={cn(
|
|
85
|
-
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-selected:bg-muted",
|
|
86
|
-
className,
|
|
87
|
-
)}
|
|
88
|
-
data-slot="table-row"
|
|
89
|
-
{...props}
|
|
90
|
-
/>
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// ── Component: TableHead ─────────────────────────────────────────────────────────────────────────────────────────────
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @since 0.3.16-canary.0
|
|
98
|
-
*/
|
|
99
|
-
type TableHeadProps = ComponentProps<"th">;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @since 0.3.16-canary.0
|
|
103
|
-
*/
|
|
104
|
-
function TableHead({ className, ...props }: TableHeadProps): JSX.Element {
|
|
105
|
-
return (
|
|
106
|
-
<th
|
|
107
|
-
className={cn(
|
|
108
|
-
"h-10 px-2 text-start align-middle font-medium whitespace-nowrap text-foreground has-[[role=checkbox]]:pe-0",
|
|
109
|
-
className,
|
|
110
|
-
)}
|
|
111
|
-
data-slot="table-head"
|
|
112
|
-
{...props}
|
|
113
|
-
/>
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// ── Component: TableCell ─────────────────────────────────────────────────────────────────────────────────────────────
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* @since 0.3.16-canary.0
|
|
121
|
-
*/
|
|
122
|
-
type TableCellProps = ComponentProps<"td">;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* @since 0.3.16-canary.0
|
|
126
|
-
*/
|
|
127
|
-
function TableCell({ className, ...props }: TableCellProps): JSX.Element {
|
|
128
|
-
return (
|
|
129
|
-
<td
|
|
130
|
-
className={cn("p-2 align-middle whitespace-nowrap has-[[role=checkbox]]:pe-0", className)}
|
|
131
|
-
data-slot="table-cell"
|
|
132
|
-
{...props}
|
|
133
|
-
/>
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// ── Component: TableCaption ──────────────────────────────────────────────────────────────────────────────────────────
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* @since 0.3.16-canary.0
|
|
141
|
-
*/
|
|
142
|
-
type TableCaptionProps = ComponentProps<"caption">;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* @since 0.3.16-canary.0
|
|
146
|
-
*/
|
|
147
|
-
function TableCaption({ className, ...props }: TableCaptionProps): JSX.Element {
|
|
148
|
-
return (
|
|
149
|
-
<caption className={cn("mt-4 text-sm text-muted-foreground", className)} data-slot="table-caption" {...props} />
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
154
|
-
|
|
155
|
-
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
156
|
-
export type {
|
|
157
|
-
TableBodyProps,
|
|
158
|
-
TableCaptionProps,
|
|
159
|
-
TableCellProps,
|
|
160
|
-
TableFooterProps,
|
|
161
|
-
TableHeaderProps,
|
|
162
|
-
TableHeadProps,
|
|
163
|
-
TableProps,
|
|
164
|
-
TableRowProps,
|
|
165
|
-
};
|
package/src/components/tabs.tsx
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import * as TabsPrimitive from "radix-ui/tabs";
|
|
2
|
-
import type { ComponentProps, JSX } from "react";
|
|
3
|
-
|
|
4
|
-
import { cn } from "#/lib/utils";
|
|
5
|
-
import type { TabsListVariants } from "#/variants/tabs";
|
|
6
|
-
import { tabsListVariants } from "#/variants/tabs";
|
|
7
|
-
|
|
8
|
-
// ── Component: Tabs ──────────────────────────────────────────────────────────────────────────────────────────────────
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @since 0.3.16-canary.0
|
|
12
|
-
*/
|
|
13
|
-
type TabsProps = ComponentProps<typeof TabsPrimitive.Root>;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @since 0.3.16-canary.0
|
|
17
|
-
*/
|
|
18
|
-
function Tabs({ className, orientation = "horizontal", ...props }: TabsProps): JSX.Element {
|
|
19
|
-
return (
|
|
20
|
-
<TabsPrimitive.Root
|
|
21
|
-
className={cn("group/tabs flex gap-2 data-horizontal:flex-col", className)}
|
|
22
|
-
data-orientation={orientation}
|
|
23
|
-
data-slot="tabs"
|
|
24
|
-
orientation={orientation}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// ── Component: TabsList ──────────────────────────────────────────────────────────────────────────────────────────────
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @since 0.3.16-canary.0
|
|
34
|
-
*/
|
|
35
|
-
type TabsListProps = ComponentProps<typeof TabsPrimitive.List> & TabsListVariants;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @since 0.3.16-canary.0
|
|
39
|
-
*/
|
|
40
|
-
function TabsList({ className, variant = "default", ...props }: TabsListProps): JSX.Element {
|
|
41
|
-
return (
|
|
42
|
-
<TabsPrimitive.List
|
|
43
|
-
className={tabsListVariants({ className, variant })}
|
|
44
|
-
data-slot="tabs-list"
|
|
45
|
-
data-variant={variant}
|
|
46
|
-
{...props}
|
|
47
|
-
/>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// ── Component: TabsTrigger ───────────────────────────────────────────────────────────────────────────────────────────
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @since 0.3.16-canary.0
|
|
55
|
-
*/
|
|
56
|
-
type TabsTriggerProps = ComponentProps<typeof TabsPrimitive.Trigger>;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @since 0.3.16-canary.0
|
|
60
|
-
*/
|
|
61
|
-
function TabsTrigger({ className, ...props }: TabsTriggerProps): JSX.Element {
|
|
62
|
-
return (
|
|
63
|
-
<TabsPrimitive.Trigger
|
|
64
|
-
className={cn(
|
|
65
|
-
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1 has-data-[icon=inline-start]:ps-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
66
|
-
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
67
|
-
"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
|
|
68
|
-
"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:-bottom-1.25 group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-inset-e-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
|
|
69
|
-
className,
|
|
70
|
-
)}
|
|
71
|
-
data-slot="tabs-trigger"
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// ── Component: TabsContent ───────────────────────────────────────────────────────────────────────────────────────────
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* @since 0.3.16-canary.0
|
|
81
|
-
*/
|
|
82
|
-
type TabsContentProps = ComponentProps<typeof TabsPrimitive.Content>;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* @since 0.3.16-canary.0
|
|
86
|
-
*/
|
|
87
|
-
function TabsContent({ className, ...props }: TabsContentProps): JSX.Element {
|
|
88
|
-
return (
|
|
89
|
-
<TabsPrimitive.Content
|
|
90
|
-
className={cn("flex-1 text-sm outline-none", className)}
|
|
91
|
-
data-slot="tabs-content"
|
|
92
|
-
{...props}
|
|
93
|
-
/>
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
98
|
-
|
|
99
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
100
|
-
export type { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "#/lib/utils";
|
|
4
|
-
|
|
5
|
-
// ── Component: Textarea ──────────────────────────────────────────────────────────────────────────────────────────────
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @since 0.3.16-canary.0
|
|
9
|
-
*/
|
|
10
|
-
type TextareaProps = ComponentProps<"textarea">;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @since 0.3.16-canary.0
|
|
14
|
-
*/
|
|
15
|
-
function Textarea({ className, ...props }: TextareaProps): JSX.Element {
|
|
16
|
-
return (
|
|
17
|
-
<textarea
|
|
18
|
-
className={cn(
|
|
19
|
-
"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
20
|
-
className,
|
|
21
|
-
)}
|
|
22
|
-
data-slot="textarea"
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
29
|
-
|
|
30
|
-
export { Textarea };
|
|
31
|
-
export type { TextareaProps };
|