@appica/ui-react 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +91 -0
- package/dist/components/accordion/accordion.d.ts +29 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +210 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/alert/alert.d.ts +32 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/alert.js +203 -0
- package/dist/components/alert/alert.js.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +28 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.js +127 -0
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -0
- package/dist/components/autocomplete/autocomplete.d.ts +48 -0
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/components/autocomplete/autocomplete.js +299 -0
- package/dist/components/autocomplete/autocomplete.js.map +1 -0
- package/dist/components/avatar/avatar.d.ts +29 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.js +115 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/background-pattern/background-pattern-interactive.d.ts +10 -0
- package/dist/components/background-pattern/background-pattern-interactive.d.ts.map +1 -0
- package/dist/components/background-pattern/background-pattern-interactive.js +72 -0
- package/dist/components/background-pattern/background-pattern-interactive.js.map +1 -0
- package/dist/components/background-pattern/background-pattern-shared.d.ts +12 -0
- package/dist/components/background-pattern/background-pattern-shared.d.ts.map +1 -0
- package/dist/components/background-pattern/background-pattern-shared.js +73 -0
- package/dist/components/background-pattern/background-pattern-shared.js.map +1 -0
- package/dist/components/background-pattern/background-pattern.d.ts +23 -0
- package/dist/components/background-pattern/background-pattern.d.ts.map +1 -0
- package/dist/components/background-pattern/background-pattern.js +49 -0
- package/dist/components/background-pattern/background-pattern.js.map +1 -0
- package/dist/components/background-pattern/index.d.ts +4 -0
- package/dist/components/background-pattern/index.d.ts.map +1 -0
- package/dist/components/background-pattern/index.js +3 -0
- package/dist/components/background-pattern/index.js.map +1 -0
- package/dist/components/badge/badge.d.ts +17 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +134 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +24 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.js +106 -0
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/button/button-variants.d.ts +6 -0
- package/dist/components/button/button-variants.d.ts.map +1 -0
- package/dist/components/button/button-variants.js +69 -0
- package/dist/components/button/button-variants.js.map +1 -0
- package/dist/components/button/button.d.ts +10 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +26 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +3 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button-group/button-group-context.d.ts +13 -0
- package/dist/components/button-group/button-group-context.d.ts.map +1 -0
- package/dist/components/button-group/button-group-context.js +7 -0
- package/dist/components/button-group/button-group-context.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +12 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -0
- package/dist/components/button-group/button-group.js +45 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/calendar/calendar.d.ts +14 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -0
- package/dist/components/calendar/calendar.js +228 -0
- package/dist/components/calendar/calendar.js.map +1 -0
- package/dist/components/carousel/carousel.d.ts +128 -0
- package/dist/components/carousel/carousel.d.ts.map +1 -0
- package/dist/components/carousel/carousel.js +795 -0
- package/dist/components/carousel/carousel.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +7 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.js +128 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +9 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox-group/checkbox-group.js +18 -0
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -0
- package/dist/components/chip/chip.d.ts +36 -0
- package/dist/components/chip/chip.d.ts.map +1 -0
- package/dist/components/chip/chip.js +159 -0
- package/dist/components/chip/chip.js.map +1 -0
- package/dist/components/collapsible/collapsible.d.ts +11 -0
- package/dist/components/collapsible/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible/collapsible.js +41 -0
- package/dist/components/collapsible/collapsible.js.map +1 -0
- package/dist/components/combobox/combobox.d.ts +57 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/combobox.js +456 -0
- package/dist/components/combobox/combobox.js.map +1 -0
- package/dist/components/context-menu/context-menu.d.ts +43 -0
- package/dist/components/context-menu/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu/context-menu.js +243 -0
- package/dist/components/context-menu/context-menu.js.map +1 -0
- package/dist/components/copy-button/copy-button.d.ts +15 -0
- package/dist/components/copy-button/copy-button.d.ts.map +1 -0
- package/dist/components/copy-button/copy-button.js +126 -0
- package/dist/components/copy-button/copy-button.js.map +1 -0
- package/dist/components/countdown/countdown.d.ts +26 -0
- package/dist/components/countdown/countdown.d.ts.map +1 -0
- package/dist/components/countdown/countdown.js +111 -0
- package/dist/components/countdown/countdown.js.map +1 -0
- package/dist/components/date-field/date-field.d.ts +25 -0
- package/dist/components/date-field/date-field.d.ts.map +1 -0
- package/dist/components/date-field/date-field.js +403 -0
- package/dist/components/date-field/date-field.js.map +1 -0
- package/dist/components/date-picker/date-picker.d.ts +58 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.js +449 -0
- package/dist/components/date-picker/date-picker.js.map +1 -0
- package/dist/components/dialog/dialog.d.ts +30 -0
- package/dist/components/dialog/dialog.d.ts.map +1 -0
- package/dist/components/dialog/dialog.js +138 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/drawer/drawer.d.ts +39 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/drawer.js +270 -0
- package/dist/components/drawer/drawer.js.map +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +43 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +235 -0
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/field/field.d.ts +15 -0
- package/dist/components/field/field.d.ts.map +1 -0
- package/dist/components/field/field.js +62 -0
- package/dist/components/field/field.js.map +1 -0
- package/dist/components/fieldset/fieldset.d.ts +9 -0
- package/dist/components/fieldset/fieldset.d.ts.map +1 -0
- package/dist/components/fieldset/fieldset.js +20 -0
- package/dist/components/fieldset/fieldset.js.map +1 -0
- package/dist/components/form/form.d.ts +7 -0
- package/dist/components/form/form.d.ts.map +1 -0
- package/dist/components/form/form.js +9 -0
- package/dist/components/form/form.js.map +1 -0
- package/dist/components/gradient-glow/gradient-glow.d.ts +21 -0
- package/dist/components/gradient-glow/gradient-glow.d.ts.map +1 -0
- package/dist/components/gradient-glow/gradient-glow.js +99 -0
- package/dist/components/gradient-glow/gradient-glow.js.map +1 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +3 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/input-variants.d.ts +7 -0
- package/dist/components/input/input-variants.d.ts.map +1 -0
- package/dist/components/input/input-variants.js +52 -0
- package/dist/components/input/input-variants.js.map +1 -0
- package/dist/components/input/input.d.ts +19 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/input/input.js +96 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/kbd/kbd.d.ts +13 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -0
- package/dist/components/kbd/kbd.js +34 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/loader/loader.d.ts +10 -0
- package/dist/components/loader/loader.d.ts.map +1 -0
- package/dist/components/loader/loader.js +137 -0
- package/dist/components/loader/loader.js.map +1 -0
- package/dist/components/menubar/menubar.d.ts +44 -0
- package/dist/components/menubar/menubar.d.ts.map +1 -0
- package/dist/components/menubar/menubar.js +114 -0
- package/dist/components/menubar/menubar.js.map +1 -0
- package/dist/components/meter/meter.d.ts +24 -0
- package/dist/components/meter/meter.d.ts.map +1 -0
- package/dist/components/meter/meter.js +105 -0
- package/dist/components/meter/meter.js.map +1 -0
- package/dist/components/navigation/index.d.ts +4 -0
- package/dist/components/navigation/index.d.ts.map +1 -0
- package/dist/components/navigation/index.js +4 -0
- package/dist/components/navigation/index.js.map +1 -0
- package/dist/components/navigation/navigation-context.d.ts +16 -0
- package/dist/components/navigation/navigation-context.d.ts.map +1 -0
- package/dist/components/navigation/navigation-context.js +10 -0
- package/dist/components/navigation/navigation-context.js.map +1 -0
- package/dist/components/navigation/navigation-link-variants.d.ts +9 -0
- package/dist/components/navigation/navigation-link-variants.d.ts.map +1 -0
- package/dist/components/navigation/navigation-link-variants.js +189 -0
- package/dist/components/navigation/navigation-link-variants.js.map +1 -0
- package/dist/components/navigation/navigation-link.d.ts +20 -0
- package/dist/components/navigation/navigation-link.d.ts.map +1 -0
- package/dist/components/navigation/navigation-link.js +54 -0
- package/dist/components/navigation/navigation-link.js.map +1 -0
- package/dist/components/navigation/navigation.d.ts +21 -0
- package/dist/components/navigation/navigation.d.ts.map +1 -0
- package/dist/components/navigation/navigation.js +41 -0
- package/dist/components/navigation/navigation.js.map +1 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +41 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu/navigation-menu.js +329 -0
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -0
- package/dist/components/number-field/number-field.d.ts +17 -0
- package/dist/components/number-field/number-field.d.ts.map +1 -0
- package/dist/components/number-field/number-field.js +270 -0
- package/dist/components/number-field/number-field.js.map +1 -0
- package/dist/components/otp-field/otp-field.d.ts +19 -0
- package/dist/components/otp-field/otp-field.d.ts.map +1 -0
- package/dist/components/otp-field/otp-field.js +66 -0
- package/dist/components/otp-field/otp-field.js.map +1 -0
- package/dist/components/pagination/pagination.d.ts +29 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/pagination/pagination.js +92 -0
- package/dist/components/pagination/pagination.js.map +1 -0
- package/dist/components/popover/popover.d.ts +22 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/popover/popover.js +108 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/preview-card/preview-card.d.ts +16 -0
- package/dist/components/preview-card/preview-card.d.ts.map +1 -0
- package/dist/components/preview-card/preview-card.js +92 -0
- package/dist/components/preview-card/preview-card.js.map +1 -0
- package/dist/components/progress/progress.d.ts +18 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/progress/progress.js +134 -0
- package/dist/components/progress/progress.js.map +1 -0
- package/dist/components/radio/radio.d.ts +7 -0
- package/dist/components/radio/radio.d.ts.map +1 -0
- package/dist/components/radio/radio.js +73 -0
- package/dist/components/radio/radio.js.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +9 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group.js +19 -0
- package/dist/components/radio-group/radio-group.js.map +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +14 -0
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area/scroll-area.js +87 -0
- package/dist/components/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/select/select.d.ts +36 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/select.js +345 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/separator/separator.d.ts +10 -0
- package/dist/components/separator/separator.d.ts.map +1 -0
- package/dist/components/separator/separator.js +81 -0
- package/dist/components/separator/separator.js.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +9 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.js +27 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/slider/slider.d.ts +11 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/slider/slider.js +187 -0
- package/dist/components/slider/slider.js.map +1 -0
- package/dist/components/sparkline/sparkline.d.ts +39 -0
- package/dist/components/sparkline/sparkline.d.ts.map +1 -0
- package/dist/components/sparkline/sparkline.js +356 -0
- package/dist/components/sparkline/sparkline.js.map +1 -0
- package/dist/components/spinner/spinner.d.ts +10 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.js +179 -0
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/components/switch/switch.d.ts +33 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/switch/switch.js +137 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/table/table.d.ts +34 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/table/table.js +108 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/tabs/tabs.d.ts +35 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.js +192 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/text-animate/text-animate.d.ts +31 -0
- package/dist/components/text-animate/text-animate.d.ts.map +1 -0
- package/dist/components/text-animate/text-animate.js +230 -0
- package/dist/components/text-animate/text-animate.js.map +1 -0
- package/dist/components/textarea/textarea.d.ts +17 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -0
- package/dist/components/textarea/textarea.js +117 -0
- package/dist/components/textarea/textarea.js.map +1 -0
- package/dist/components/thumbnail/thumbnail.d.ts +26 -0
- package/dist/components/thumbnail/thumbnail.d.ts.map +1 -0
- package/dist/components/thumbnail/thumbnail.js +116 -0
- package/dist/components/thumbnail/thumbnail.js.map +1 -0
- package/dist/components/time-field/time-field.d.ts +25 -0
- package/dist/components/time-field/time-field.d.ts.map +1 -0
- package/dist/components/time-field/time-field.js +488 -0
- package/dist/components/time-field/time-field.js.map +1 -0
- package/dist/components/toast/toast.d.ts +59 -0
- package/dist/components/toast/toast.d.ts.map +1 -0
- package/dist/components/toast/toast.js +239 -0
- package/dist/components/toast/toast.js.map +1 -0
- package/dist/components/toc/toc.d.ts +21 -0
- package/dist/components/toc/toc.d.ts.map +1 -0
- package/dist/components/toc/toc.js +185 -0
- package/dist/components/toc/toc.js.map +1 -0
- package/dist/components/toggle/toggle.d.ts +7 -0
- package/dist/components/toggle/toggle.d.ts.map +1 -0
- package/dist/components/toggle/toggle.js +9 -0
- package/dist/components/toggle/toggle.js.map +1 -0
- package/dist/components/toggle-group/toggle-group.d.ts +7 -0
- package/dist/components/toggle-group/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group/toggle-group.js +21 -0
- package/dist/components/toggle-group/toggle-group.js.map +1 -0
- package/dist/components/toolbar/toolbar.d.ts +23 -0
- package/dist/components/toolbar/toolbar.d.ts.map +1 -0
- package/dist/components/toolbar/toolbar.js +56 -0
- package/dist/components/toolbar/toolbar.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +16 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +64 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/floating.d.ts +47 -0
- package/dist/floating.d.ts.map +1 -0
- package/dist/floating.js +35 -0
- package/dist/floating.js.map +1 -0
- package/dist/hooks/use-direction.d.ts +2 -0
- package/dist/hooks/use-direction.d.ts.map +1 -0
- package/dist/hooks/use-direction.js +3 -0
- package/dist/hooks/use-direction.js.map +1 -0
- package/dist/hooks/use-dismissible.d.ts +16 -0
- package/dist/hooks/use-dismissible.d.ts.map +1 -0
- package/dist/hooks/use-dismissible.js +17 -0
- package/dist/hooks/use-dismissible.js.map +1 -0
- package/dist/hooks/use-local-storage.d.ts +24 -0
- package/dist/hooks/use-local-storage.d.ts.map +1 -0
- package/dist/hooks/use-local-storage.js +127 -0
- package/dist/hooks/use-local-storage.js.map +1 -0
- package/dist/hooks/use-media-query.d.ts +20 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +19 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/hooks/use-reduced-motion.d.ts +7 -0
- package/dist/hooks/use-reduced-motion.d.ts.map +1 -0
- package/dist/hooks/use-reduced-motion.js +13 -0
- package/dist/hooks/use-reduced-motion.js.map +1 -0
- package/dist/hooks/use-theme.d.ts +11 -0
- package/dist/hooks/use-theme.d.ts.map +1 -0
- package/dist/hooks/use-theme.js +9 -0
- package/dist/hooks/use-theme.js.map +1 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/modal.d.ts +42 -0
- package/dist/modal.d.ts.map +1 -0
- package/dist/modal.js +18 -0
- package/dist/modal.js.map +1 -0
- package/dist/providers/direction-provider.d.ts +21 -0
- package/dist/providers/direction-provider.d.ts.map +1 -0
- package/dist/providers/direction-provider.js +9 -0
- package/dist/providers/direction-provider.js.map +1 -0
- package/dist/providers/reduced-motion-provider.d.ts +30 -0
- package/dist/providers/reduced-motion-provider.d.ts.map +1 -0
- package/dist/providers/reduced-motion-provider.js +27 -0
- package/dist/providers/reduced-motion-provider.js.map +1 -0
- package/dist/providers/theme-provider/index.d.ts +5 -0
- package/dist/providers/theme-provider/index.d.ts.map +1 -0
- package/dist/providers/theme-provider/index.js +3 -0
- package/dist/providers/theme-provider/index.js.map +1 -0
- package/dist/providers/theme-provider/theme-provider.d.ts +39 -0
- package/dist/providers/theme-provider/theme-provider.d.ts.map +1 -0
- package/dist/providers/theme-provider/theme-provider.js +118 -0
- package/dist/providers/theme-provider/theme-provider.js.map +1 -0
- package/dist/providers/theme-provider/theme-script.d.ts +28 -0
- package/dist/providers/theme-provider/theme-script.d.ts.map +1 -0
- package/dist/providers/theme-provider/theme-script.js +59 -0
- package/dist/providers/theme-provider/theme-script.js.map +1 -0
- package/dist/utils.d.ts +17 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +51 -0
- package/dist/utils.js.map +1 -0
- package/package.json +479 -0
- package/src/components/accordion/accordion.test.tsx +220 -0
- package/src/components/accordion/accordion.tsx +269 -0
- package/src/components/alert/alert.test.tsx +188 -0
- package/src/components/alert/alert.tsx +243 -0
- package/src/components/alert-dialog/alert-dialog.test.tsx +141 -0
- package/src/components/alert-dialog/alert-dialog.tsx +179 -0
- package/src/components/autocomplete/autocomplete.test.tsx +384 -0
- package/src/components/autocomplete/autocomplete.tsx +442 -0
- package/src/components/avatar/avatar.test.tsx +368 -0
- package/src/components/avatar/avatar.tsx +142 -0
- package/src/components/background-pattern/background-pattern-interactive.tsx +93 -0
- package/src/components/background-pattern/background-pattern-shared.tsx +96 -0
- package/src/components/background-pattern/background-pattern.test.tsx +97 -0
- package/src/components/background-pattern/background-pattern.tsx +67 -0
- package/src/components/background-pattern/index.ts +3 -0
- package/src/components/badge/badge.test.tsx +58 -0
- package/src/components/badge/badge.tsx +149 -0
- package/src/components/breadcrumb/breadcrumb.test.tsx +174 -0
- package/src/components/breadcrumb/breadcrumb.tsx +146 -0
- package/src/components/button/button-variants.ts +69 -0
- package/src/components/button/button.test.tsx +79 -0
- package/src/components/button/button.tsx +28 -0
- package/src/components/button/index.ts +2 -0
- package/src/components/button-group/button-group-context.ts +18 -0
- package/src/components/button-group/button-group.test.tsx +223 -0
- package/src/components/button-group/button-group.tsx +59 -0
- package/src/components/calendar/calendar.test.tsx +69 -0
- package/src/components/calendar/calendar.tsx +295 -0
- package/src/components/carousel/carousel.test.tsx +493 -0
- package/src/components/carousel/carousel.tsx +1003 -0
- package/src/components/checkbox/checkbox.test.tsx +100 -0
- package/src/components/checkbox/checkbox.tsx +154 -0
- package/src/components/checkbox-group/checkbox-group.test.tsx +86 -0
- package/src/components/checkbox-group/checkbox-group.tsx +21 -0
- package/src/components/chip/chip.test.tsx +242 -0
- package/src/components/chip/chip.tsx +234 -0
- package/src/components/collapsible/collapsible.test.tsx +126 -0
- package/src/components/collapsible/collapsible.tsx +47 -0
- package/src/components/combobox/combobox.test.tsx +410 -0
- package/src/components/combobox/combobox.tsx +598 -0
- package/src/components/context-menu/context-menu.test.tsx +226 -0
- package/src/components/context-menu/context-menu.tsx +345 -0
- package/src/components/copy-button/copy-button.test.tsx +147 -0
- package/src/components/copy-button/copy-button.tsx +141 -0
- package/src/components/countdown/countdown.test.tsx +130 -0
- package/src/components/countdown/countdown.tsx +170 -0
- package/src/components/date-field/date-field.test.tsx +373 -0
- package/src/components/date-field/date-field.tsx +512 -0
- package/src/components/date-picker/date-picker.test.tsx +291 -0
- package/src/components/date-picker/date-picker.tsx +572 -0
- package/src/components/dialog/dialog.test.tsx +173 -0
- package/src/components/dialog/dialog.tsx +190 -0
- package/src/components/drawer/drawer.test.tsx +191 -0
- package/src/components/drawer/drawer.tsx +365 -0
- package/src/components/dropdown-menu/dropdown-menu.test.tsx +227 -0
- package/src/components/dropdown-menu/dropdown-menu.tsx +341 -0
- package/src/components/field/field.test.tsx +84 -0
- package/src/components/field/field.tsx +71 -0
- package/src/components/fieldset/fieldset.test.tsx +62 -0
- package/src/components/fieldset/fieldset.tsx +24 -0
- package/src/components/form/form.test.tsx +61 -0
- package/src/components/form/form.tsx +11 -0
- package/src/components/gradient-glow/gradient-glow.test.tsx +110 -0
- package/src/components/gradient-glow/gradient-glow.tsx +132 -0
- package/src/components/input/index.ts +2 -0
- package/src/components/input/input-variants.ts +52 -0
- package/src/components/input/input.test.tsx +118 -0
- package/src/components/input/input.tsx +120 -0
- package/src/components/kbd/kbd.test.tsx +119 -0
- package/src/components/kbd/kbd.tsx +48 -0
- package/src/components/loader/loader.test.tsx +57 -0
- package/src/components/loader/loader.tsx +163 -0
- package/src/components/menubar/menubar.test.tsx +162 -0
- package/src/components/menubar/menubar.tsx +226 -0
- package/src/components/meter/meter.test.tsx +172 -0
- package/src/components/meter/meter.tsx +144 -0
- package/src/components/navigation/index.ts +3 -0
- package/src/components/navigation/navigation-context.ts +24 -0
- package/src/components/navigation/navigation-link-variants.ts +197 -0
- package/src/components/navigation/navigation-link.tsx +90 -0
- package/src/components/navigation/navigation.test.tsx +253 -0
- package/src/components/navigation/navigation.tsx +74 -0
- package/src/components/navigation-menu/navigation-menu.test.tsx +258 -0
- package/src/components/navigation-menu/navigation-menu.tsx +410 -0
- package/src/components/number-field/number-field.test.tsx +224 -0
- package/src/components/number-field/number-field.tsx +310 -0
- package/src/components/otp-field/otp-field.test.tsx +113 -0
- package/src/components/otp-field/otp-field.tsx +105 -0
- package/src/components/pagination/pagination.test.tsx +147 -0
- package/src/components/pagination/pagination.tsx +139 -0
- package/src/components/popover/popover.test.tsx +135 -0
- package/src/components/popover/popover.tsx +134 -0
- package/src/components/preview-card/preview-card.test.tsx +99 -0
- package/src/components/preview-card/preview-card.tsx +103 -0
- package/src/components/progress/progress.test.tsx +109 -0
- package/src/components/progress/progress.tsx +151 -0
- package/src/components/radio/radio.test.tsx +141 -0
- package/src/components/radio/radio.tsx +94 -0
- package/src/components/radio-group/radio-group.test.tsx +80 -0
- package/src/components/radio-group/radio-group.tsx +22 -0
- package/src/components/scroll-area/scroll-area.test.tsx +133 -0
- package/src/components/scroll-area/scroll-area.tsx +101 -0
- package/src/components/select/select.test.tsx +251 -0
- package/src/components/select/select.tsx +446 -0
- package/src/components/separator/separator.test.tsx +46 -0
- package/src/components/separator/separator.tsx +95 -0
- package/src/components/skeleton/skeleton.test.tsx +55 -0
- package/src/components/skeleton/skeleton.tsx +33 -0
- package/src/components/slider/slider.test.tsx +123 -0
- package/src/components/slider/slider.tsx +262 -0
- package/src/components/sparkline/sparkline.test.tsx +249 -0
- package/src/components/sparkline/sparkline.tsx +446 -0
- package/src/components/spinner/spinner.test.tsx +57 -0
- package/src/components/spinner/spinner.tsx +219 -0
- package/src/components/switch/switch.test.tsx +100 -0
- package/src/components/switch/switch.tsx +166 -0
- package/src/components/table/table.test.tsx +175 -0
- package/src/components/table/table.tsx +157 -0
- package/src/components/tabs/tabs.test.tsx +165 -0
- package/src/components/tabs/tabs.tsx +246 -0
- package/src/components/text-animate/text-animate.test.tsx +125 -0
- package/src/components/text-animate/text-animate.tsx +354 -0
- package/src/components/textarea/textarea.test.tsx +188 -0
- package/src/components/textarea/textarea.tsx +144 -0
- package/src/components/thumbnail/thumbnail.test.tsx +217 -0
- package/src/components/thumbnail/thumbnail.tsx +139 -0
- package/src/components/time-field/time-field.test.tsx +376 -0
- package/src/components/time-field/time-field.tsx +625 -0
- package/src/components/toast/toast.test.tsx +277 -0
- package/src/components/toast/toast.tsx +377 -0
- package/src/components/toc/toc.test.tsx +197 -0
- package/src/components/toc/toc.tsx +233 -0
- package/src/components/toggle/toggle.test.tsx +109 -0
- package/src/components/toggle/toggle.tsx +10 -0
- package/src/components/toggle-group/toggle-group.test.tsx +95 -0
- package/src/components/toggle-group/toggle-group.tsx +21 -0
- package/src/components/toolbar/toolbar.test.tsx +78 -0
- package/src/components/toolbar/toolbar.tsx +77 -0
- package/src/components/tooltip/tooltip.test.tsx +100 -0
- package/src/components/tooltip/tooltip.tsx +78 -0
- package/src/floating.test.ts +40 -0
- package/src/floating.ts +103 -0
- package/src/globals.d.ts +34 -0
- package/src/hooks/use-direction.ts +3 -0
- package/src/hooks/use-dismissible.ts +33 -0
- package/src/hooks/use-local-storage.test.tsx +63 -0
- package/src/hooks/use-local-storage.ts +190 -0
- package/src/hooks/use-media-query.test.tsx +65 -0
- package/src/hooks/use-media-query.ts +38 -0
- package/src/hooks/use-reduced-motion.ts +17 -0
- package/src/hooks/use-theme.ts +16 -0
- package/src/index.ts +76 -0
- package/src/modal.test.ts +34 -0
- package/src/modal.ts +80 -0
- package/src/providers/direction-provider.test.tsx +20 -0
- package/src/providers/direction-provider.tsx +26 -0
- package/src/providers/reduced-motion-provider.test.tsx +42 -0
- package/src/providers/reduced-motion-provider.tsx +58 -0
- package/src/providers/theme-provider/index.ts +4 -0
- package/src/providers/theme-provider/theme-provider.test.tsx +97 -0
- package/src/providers/theme-provider/theme-provider.tsx +169 -0
- package/src/providers/theme-provider/theme-script.tsx +108 -0
- package/src/test/setup.ts +27 -0
- package/src/test/vitest-axe.d.ts +7 -0
- package/src/utils.test.tsx +63 -0
- package/src/utils.ts +57 -0
- package/styles.css +523 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Switch as Switch$1 } from '@base-ui/react/switch';
|
|
5
|
+
import { LazyMotion, domAnimation, useAnimate, m } from 'motion/react';
|
|
6
|
+
import { useReducedMotion } from '../../hooks/use-reduced-motion.js';
|
|
7
|
+
import { cn, useComposedRefs } from '../../utils.js';
|
|
8
|
+
import { useDirection } from '@base-ui/react/direction-provider';
|
|
9
|
+
|
|
10
|
+
const switchSizes = {
|
|
11
|
+
sm: {
|
|
12
|
+
root: "h-4 w-7.5",
|
|
13
|
+
thumb: "size-3",
|
|
14
|
+
thumbWidthKeyframes: ["0.75rem", "1.25rem", "0.75rem"],
|
|
15
|
+
thumbXKeyframes: [0, "0.3125rem", "0.875rem"],
|
|
16
|
+
check: "size-2.5"
|
|
17
|
+
},
|
|
18
|
+
md: {
|
|
19
|
+
root: "h-5 w-9.5",
|
|
20
|
+
thumb: "size-4",
|
|
21
|
+
thumbWidthKeyframes: ["1rem", "1.6875rem", "1rem"],
|
|
22
|
+
thumbXKeyframes: [0, "0.4375rem", "1.125rem"],
|
|
23
|
+
check: "size-3"
|
|
24
|
+
},
|
|
25
|
+
lg: {
|
|
26
|
+
root: "h-6 w-11.5",
|
|
27
|
+
thumb: "size-5",
|
|
28
|
+
thumbWidthKeyframes: ["1.25rem", "2.125rem", "1.25rem"],
|
|
29
|
+
thumbXKeyframes: [0, "0.5rem", "1.375rem"],
|
|
30
|
+
check: "size-4"
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const THUMB_TRANSITION = { duration: 0.25, ease: [0.4, 0, 0.2, 1] };
|
|
34
|
+
function applyDirection(keyframes, dirSign) {
|
|
35
|
+
if (dirSign === 1) return [...keyframes];
|
|
36
|
+
return keyframes.map((v) => typeof v === "number" ? -v : `-${v}`);
|
|
37
|
+
}
|
|
38
|
+
function SwitchThumb({
|
|
39
|
+
renderProps,
|
|
40
|
+
state,
|
|
41
|
+
dirSign,
|
|
42
|
+
sizeConfig,
|
|
43
|
+
reduced
|
|
44
|
+
}) {
|
|
45
|
+
const { checked } = state;
|
|
46
|
+
const { ref, onDrag, onDragStart, onDragEnd, onAnimationStart, onAnimationEnd, ...htmlProps } = renderProps;
|
|
47
|
+
const xKeyframes = React.useMemo(() => {
|
|
48
|
+
const directional = applyDirection(sizeConfig.thumbXKeyframes, dirSign);
|
|
49
|
+
return checked ? directional : directional.reverse();
|
|
50
|
+
}, [checked, dirSign, sizeConfig]);
|
|
51
|
+
const xFinal = xKeyframes[xKeyframes.length - 1];
|
|
52
|
+
const [scope, animate] = useAnimate();
|
|
53
|
+
const composedRef = useComposedRefs(ref, scope);
|
|
54
|
+
const prevChecked = React.useRef(checked);
|
|
55
|
+
React.useEffect(() => {
|
|
56
|
+
const toggled = prevChecked.current !== checked;
|
|
57
|
+
prevChecked.current = checked;
|
|
58
|
+
if (toggled && !reduced) {
|
|
59
|
+
animate(scope.current, { x: xKeyframes, width: sizeConfig.thumbWidthKeyframes }, THUMB_TRANSITION);
|
|
60
|
+
} else {
|
|
61
|
+
animate(scope.current, { x: xFinal }, { duration: 0 });
|
|
62
|
+
}
|
|
63
|
+
}, [checked, sizeConfig, animate, scope, reduced, xKeyframes, xFinal]);
|
|
64
|
+
return /* @__PURE__ */ jsx(m.span, { ...htmlProps, ref: composedRef, initial: { x: xFinal }, children: /* @__PURE__ */ jsx(
|
|
65
|
+
m.svg,
|
|
66
|
+
{
|
|
67
|
+
className: cn("text-foreground-intense", sizeConfig.check),
|
|
68
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
69
|
+
viewBox: "0 0 12 12",
|
|
70
|
+
fill: "none",
|
|
71
|
+
stroke: "currentColor",
|
|
72
|
+
strokeWidth: "1.5",
|
|
73
|
+
strokeLinecap: "round",
|
|
74
|
+
strokeLinejoin: "round",
|
|
75
|
+
style: { strokeDasharray: 12 },
|
|
76
|
+
initial: false,
|
|
77
|
+
animate: { strokeDashoffset: checked ? 0 : 12 },
|
|
78
|
+
transition: reduced ? { duration: 0 } : {
|
|
79
|
+
strokeDashoffset: {
|
|
80
|
+
duration: checked ? 0.3 : 0,
|
|
81
|
+
ease: "easeOut",
|
|
82
|
+
delay: checked ? 0.25 : 0
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 6l2 2 4-4" })
|
|
86
|
+
}
|
|
87
|
+
) });
|
|
88
|
+
}
|
|
89
|
+
function Switch({ className, size = "md", ...props }) {
|
|
90
|
+
const direction = useDirection();
|
|
91
|
+
const dirSign = direction === "rtl" ? -1 : 1;
|
|
92
|
+
const sizeConfig = switchSizes[size];
|
|
93
|
+
const reduced = useReducedMotion();
|
|
94
|
+
const ariaInvalid = props["aria-invalid"];
|
|
95
|
+
const invalid = ariaInvalid === true || ariaInvalid === "true";
|
|
96
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, strict: true, children: /* @__PURE__ */ jsx(
|
|
97
|
+
Switch$1.Root,
|
|
98
|
+
{
|
|
99
|
+
"data-slot": "switch",
|
|
100
|
+
className: cn(
|
|
101
|
+
"bg-background-strong outline-ring flex shrink-0 rounded-full border border-transparent p-px outline-offset-1",
|
|
102
|
+
sizeConfig.root,
|
|
103
|
+
"transition-background duration-200 motion-reduce:transition-none",
|
|
104
|
+
"data-checked:bg-primary data-checked:outline-ring-primary",
|
|
105
|
+
"data-disabled:not-data-checked:border-border-strong data-disabled:opacity-disabled data-disabled:cursor-not-allowed data-disabled:not-data-checked:border-dashed",
|
|
106
|
+
"data-invalid:border-error data-invalid:not-data-checked:bg-error-subtle data-invalid:outline-ring-error",
|
|
107
|
+
className
|
|
108
|
+
),
|
|
109
|
+
...props,
|
|
110
|
+
...invalid ? { "data-invalid": "" } : {},
|
|
111
|
+
children: /* @__PURE__ */ jsx(
|
|
112
|
+
Switch$1.Thumb,
|
|
113
|
+
{
|
|
114
|
+
"data-slot": "switch-thumb",
|
|
115
|
+
className: cn(
|
|
116
|
+
"group flex items-center justify-center rounded-full bg-white shadow-2xs",
|
|
117
|
+
sizeConfig.thumb,
|
|
118
|
+
"data-checked:bg-primary-foreground"
|
|
119
|
+
),
|
|
120
|
+
render: (renderProps, state) => /* @__PURE__ */ jsx(
|
|
121
|
+
SwitchThumb,
|
|
122
|
+
{
|
|
123
|
+
renderProps,
|
|
124
|
+
state,
|
|
125
|
+
dirSign,
|
|
126
|
+
sizeConfig,
|
|
127
|
+
reduced
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
) });
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { Switch };
|
|
137
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","sources":["../../../src/components/switch/switch.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { Switch as BaseSwitch } from '@base-ui/react/switch'\nimport { LazyMotion, domAnimation, m, useAnimate } from 'motion/react'\nimport { useDirection } from '../../hooks/use-direction'\nimport { useReducedMotion } from '../../hooks/use-reduced-motion'\nimport { cn, useComposedRefs } from '../../utils'\n\nconst switchSizes = {\n sm: {\n root: 'h-4 w-7.5',\n thumb: 'size-3',\n thumbWidthKeyframes: ['0.75rem', '1.25rem', '0.75rem'],\n thumbXKeyframes: [0, '0.3125rem', '0.875rem'],\n check: 'size-2.5',\n },\n md: {\n root: 'h-5 w-9.5',\n thumb: 'size-4',\n thumbWidthKeyframes: ['1rem', '1.6875rem', '1rem'],\n thumbXKeyframes: [0, '0.4375rem', '1.125rem'],\n check: 'size-3',\n },\n lg: {\n root: 'h-6 w-11.5',\n thumb: 'size-5',\n thumbWidthKeyframes: ['1.25rem', '2.125rem', '1.25rem'],\n thumbXKeyframes: [0, '0.5rem', '1.375rem'],\n check: 'size-4',\n },\n} as const\n\ntype SwitchSize = keyof typeof switchSizes\ntype SizeConfig = (typeof switchSizes)[SwitchSize]\n\nconst THUMB_TRANSITION = { duration: 0.25, ease: [0.4, 0, 0.2, 1] satisfies [number, number, number, number] }\n\ntype Keyframe = number | string\n\nfunction applyDirection(keyframes: ReadonlyArray<Keyframe>, dirSign: 1 | -1): Keyframe[] {\n if (dirSign === 1) return [...keyframes]\n return keyframes.map((v) => (typeof v === 'number' ? -v : `-${v}`))\n}\n\nfunction SwitchThumb({\n renderProps,\n state,\n dirSign,\n sizeConfig,\n reduced,\n}: {\n renderProps: React.ComponentPropsWithRef<'span'>\n state: { checked: boolean }\n dirSign: 1 | -1\n sizeConfig: SizeConfig\n reduced: boolean\n}) {\n const { checked } = state\n const { ref, onDrag, onDragStart, onDragEnd, onAnimationStart, onAnimationEnd, ...htmlProps } = renderProps\n\n const xKeyframes = React.useMemo(() => {\n const directional = applyDirection(sizeConfig.thumbXKeyframes, dirSign)\n return checked ? directional : directional.reverse()\n }, [checked, dirSign, sizeConfig])\n\n const xFinal = xKeyframes[xKeyframes.length - 1]\n\n const [scope, animate] = useAnimate()\n const composedRef = useComposedRefs(ref, scope)\n const prevChecked = React.useRef(checked)\n React.useEffect(() => {\n const toggled = prevChecked.current !== checked\n prevChecked.current = checked\n if (toggled && !reduced) {\n animate(scope.current, { x: xKeyframes, width: sizeConfig.thumbWidthKeyframes }, THUMB_TRANSITION)\n } else {\n animate(scope.current, { x: xFinal }, { duration: 0 })\n }\n }, [checked, sizeConfig, animate, scope, reduced, xKeyframes, xFinal])\n\n return (\n <m.span {...htmlProps} ref={composedRef} initial={{ x: xFinal }}>\n <m.svg\n className={cn('text-foreground-intense', sizeConfig.check)}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{ strokeDasharray: 12 }}\n initial={false}\n animate={{ strokeDashoffset: checked ? 0 : 12 }}\n transition={\n reduced\n ? { duration: 0 }\n : {\n strokeDashoffset: {\n duration: checked ? 0.3 : 0,\n ease: 'easeOut',\n delay: checked ? 0.25 : 0,\n },\n }\n }\n >\n <path d=\"M3 6l2 2 4-4\" />\n </m.svg>\n </m.span>\n )\n}\n\ninterface SwitchProps extends React.ComponentProps<typeof BaseSwitch.Root> {\n size?: SwitchSize\n}\n\nfunction Switch({ className, size = 'md', ...props }: SwitchProps) {\n const direction = useDirection()\n const dirSign: 1 | -1 = direction === 'rtl' ? -1 : 1\n const sizeConfig = switchSizes[size]\n const reduced = useReducedMotion()\n\n const ariaInvalid = props['aria-invalid']\n const invalid = ariaInvalid === true || ariaInvalid === 'true'\n\n return (\n <LazyMotion features={domAnimation} strict>\n <BaseSwitch.Root\n data-slot=\"switch\"\n className={cn(\n 'bg-background-strong outline-ring flex shrink-0 rounded-full border border-transparent p-px outline-offset-1',\n sizeConfig.root,\n 'transition-background duration-200 motion-reduce:transition-none',\n 'data-checked:bg-primary data-checked:outline-ring-primary',\n 'data-disabled:not-data-checked:border-border-strong data-disabled:opacity-disabled data-disabled:cursor-not-allowed data-disabled:not-data-checked:border-dashed',\n 'data-invalid:border-error data-invalid:not-data-checked:bg-error-subtle data-invalid:outline-ring-error',\n className,\n )}\n {...props}\n {...(invalid ? { 'data-invalid': '' } : {})}\n >\n <BaseSwitch.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'group flex items-center justify-center rounded-full bg-white shadow-2xs',\n sizeConfig.thumb,\n 'data-checked:bg-primary-foreground',\n )}\n render={(renderProps, state) => (\n <SwitchThumb\n renderProps={renderProps}\n state={state}\n dirSign={dirSign}\n sizeConfig={sizeConfig}\n reduced={reduced}\n />\n )}\n />\n </BaseSwitch.Root>\n </LazyMotion>\n )\n}\n\nexport { Switch }\nexport type { SwitchProps }\n"],"names":["BaseSwitch"],"mappings":";;;;;;;;;AASA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,WAAA,CAAA,CAAA,CAAc;AAAA,CAAA,CAClB,EAAA,CAAA,CAAI;AAAA,CAAA,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CAAA,EAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACN,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACP,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAqB,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,SAAS,CAAA;AAAA,CAAA,CAAA,CAAA,CACrD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAiB,CAAC,CAAA,EAAG,CAAA,CAAA,CAAA,CAAA,CAA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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAEJ,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CACF,EACF,CAAA;AAEJ;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type TableSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
type TableBorderStyle = 'solid' | 'dashed' | 'none';
|
|
4
|
+
interface TableProps extends React.ComponentPropsWithoutRef<'table'> {
|
|
5
|
+
size?: TableSize;
|
|
6
|
+
borderStyle?: TableBorderStyle;
|
|
7
|
+
stripedRows?: boolean;
|
|
8
|
+
stripedColumns?: boolean;
|
|
9
|
+
hoverableRows?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function Table({ size, borderStyle, stripedRows, stripedColumns, hoverableRows, className, ...props }: TableProps): React.JSX.Element;
|
|
12
|
+
interface TableCaptionProps extends React.ComponentPropsWithoutRef<'caption'> {
|
|
13
|
+
position?: 'top' | 'bottom';
|
|
14
|
+
}
|
|
15
|
+
declare function TableCaption({ position, className, ...props }: TableCaptionProps): React.JSX.Element;
|
|
16
|
+
interface TableHeaderProps extends React.ComponentPropsWithoutRef<'thead'> {
|
|
17
|
+
}
|
|
18
|
+
declare function TableHeader({ className, ...props }: TableHeaderProps): React.JSX.Element;
|
|
19
|
+
interface TableBodyProps extends React.ComponentPropsWithoutRef<'tbody'> {
|
|
20
|
+
}
|
|
21
|
+
declare function TableBody({ className, ...props }: TableBodyProps): React.JSX.Element;
|
|
22
|
+
interface TableRowProps extends React.ComponentPropsWithoutRef<'tr'> {
|
|
23
|
+
highlighted?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare function TableRow({ highlighted, className, ...props }: TableRowProps): React.JSX.Element;
|
|
26
|
+
interface TableHeadProps extends React.ComponentPropsWithoutRef<'th'> {
|
|
27
|
+
}
|
|
28
|
+
declare function TableHead({ className, ...props }: TableHeadProps): React.JSX.Element;
|
|
29
|
+
interface TableCellProps extends React.ComponentPropsWithoutRef<'td'> {
|
|
30
|
+
}
|
|
31
|
+
declare function TableCell({ className, ...props }: TableCellProps): React.JSX.Element;
|
|
32
|
+
export { Table, TableCaption, TableHeader, TableBody, TableRow, TableHead, TableCell };
|
|
33
|
+
export type { TableProps, TableCaptionProps, TableHeaderProps, TableBodyProps, TableRowProps, TableHeadProps, TableCellProps, };
|
|
34
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AACnC,KAAK,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAuDnD,UAAU,UAAW,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC;IAClE,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,iBAAS,KAAK,CAAC,EACb,IAAW,EACX,WAAqB,EACrB,WAAmB,EACnB,cAAsB,EACtB,aAAqB,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,UAAU,qBAoBZ;AAED,UAAU,iBAAkB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,SAAS,CAAC;IAC3E,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;CAC5B;AAED,iBAAS,YAAY,CAAC,EAAE,QAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBA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-sm",
|
|
7
|
+
lg: "p-1.5 rounded-xl text-base"
|
|
8
|
+
};
|
|
9
|
+
const sizeCellPad = {
|
|
10
|
+
sm: "[&_th]:p-3 [&_td]:p-3",
|
|
11
|
+
md: "[&_th]:p-3.5 [&_td]:p-3.5",
|
|
12
|
+
lg: "[&_th]:p-4 [&_td]:p-4"
|
|
13
|
+
};
|
|
14
|
+
const sizeHeaderCorners = {
|
|
15
|
+
sm: "[&>thead>tr:first-child>th:first-child]:rounded-ss-sm [&>thead>tr:first-child>th:last-child]:rounded-se-sm [&>thead>tr:last-child>th:first-child]:rounded-es-sm [&>thead>tr:last-child>th:last-child]:rounded-ee-sm",
|
|
16
|
+
md: "[&>thead>tr:first-child>th:first-child]:rounded-ss-md [&>thead>tr:first-child>th:last-child]:rounded-se-md [&>thead>tr:last-child>th:first-child]:rounded-es-md [&>thead>tr:last-child>th:last-child]:rounded-ee-md",
|
|
17
|
+
lg: "[&>thead>tr:first-child>th:first-child]:rounded-ss-lg [&>thead>tr:first-child>th:last-child]:rounded-se-lg [&>thead>tr:last-child>th:first-child]:rounded-es-lg [&>thead>tr:last-child>th:last-child]:rounded-ee-lg"
|
|
18
|
+
};
|
|
19
|
+
const sizeBodyBottomCorners = {
|
|
20
|
+
sm: "[&>tbody:last-of-type>tr:last-child>:first-child]:rounded-es-sm [&>tbody:last-of-type>tr:last-child>:last-child]:rounded-ee-sm",
|
|
21
|
+
md: "[&>tbody:last-of-type>tr:last-child>:first-child]:rounded-es-md [&>tbody:last-of-type>tr:last-child>:last-child]:rounded-ee-md",
|
|
22
|
+
lg: "[&>tbody:last-of-type>tr:last-child>:first-child]:rounded-es-lg [&>tbody:last-of-type>tr:last-child>:last-child]:rounded-ee-lg"
|
|
23
|
+
};
|
|
24
|
+
const sizeBodyTopCornersNoHeader = {
|
|
25
|
+
sm: "[&:not(:has(thead))>tbody:first-of-type>tr:first-child>:first-child]:rounded-ss-sm [&:not(:has(thead))>tbody:first-of-type>tr:first-child>:last-child]:rounded-se-sm",
|
|
26
|
+
md: "[&:not(:has(thead))>tbody:first-of-type>tr:first-child>:first-child]:rounded-ss-md [&:not(:has(thead))>tbody:first-of-type>tr:first-child>:last-child]:rounded-se-md",
|
|
27
|
+
lg: "[&:not(:has(thead))>tbody:first-of-type>tr:first-child>:first-child]:rounded-ss-lg [&:not(:has(thead))>tbody:first-of-type>tr:first-child>:last-child]:rounded-se-lg"
|
|
28
|
+
};
|
|
29
|
+
const borderStyleClasses = {
|
|
30
|
+
solid: "[&_td]:border-border [&>tbody_th]:border-border",
|
|
31
|
+
dashed: "[&_td]:border-border-strong [&_td]:border-dashed [&>tbody_th]:border-border-strong [&>tbody_th]:border-dashed",
|
|
32
|
+
none: "[&_td]:border-b-0 [&>tbody_th]:border-b-0"
|
|
33
|
+
};
|
|
34
|
+
const tableBaseClasses = cn(
|
|
35
|
+
"w-full border-separate border-spacing-0 bg-background text-foreground border border-border-muted align-middle",
|
|
36
|
+
"[&>thead>tr>th]:bg-background-muted",
|
|
37
|
+
"[&>thead>tr>th]:text-foreground-intense [&>thead>tr>th]:font-medium",
|
|
38
|
+
"[&>tbody_th]:text-foreground-intense [&>tbody_th]:font-medium [&>tbody_th]:border-b",
|
|
39
|
+
"[&_td]:align-middle [&_td]:border-b",
|
|
40
|
+
"[&>tbody:last-of-type>tr:last-child>td]:border-b-0",
|
|
41
|
+
"[&>tbody:last-of-type>tr:last-child>th]:border-b-0",
|
|
42
|
+
"[&>tbody>tr[data-highlighted]]:bg-background-subtle"
|
|
43
|
+
);
|
|
44
|
+
const stripedRowsClasses = "[&>tbody>tr:nth-child(2n)]:bg-background-subtle";
|
|
45
|
+
const stripedColumnsClasses = "[&>tbody>tr>:nth-child(2n)]:bg-background-subtle";
|
|
46
|
+
const rowHoverClasses = "[&>tbody>tr]:transition-colors [&>tbody>tr]:duration-200 motion-reduce:[&>tbody>tr]:transition-none [&>tbody>tr:hover]:bg-background-subtle";
|
|
47
|
+
function Table({
|
|
48
|
+
size = "md",
|
|
49
|
+
borderStyle = "solid",
|
|
50
|
+
stripedRows = false,
|
|
51
|
+
stripedColumns = false,
|
|
52
|
+
hoverableRows = false,
|
|
53
|
+
className,
|
|
54
|
+
...props
|
|
55
|
+
}) {
|
|
56
|
+
return /* @__PURE__ */ jsx(
|
|
57
|
+
"table",
|
|
58
|
+
{
|
|
59
|
+
"data-slot": "table",
|
|
60
|
+
className: cn(
|
|
61
|
+
tableBaseClasses,
|
|
62
|
+
sizeOuter[size],
|
|
63
|
+
sizeCellPad[size],
|
|
64
|
+
sizeHeaderCorners[size],
|
|
65
|
+
sizeBodyBottomCorners[size],
|
|
66
|
+
sizeBodyTopCornersNoHeader[size],
|
|
67
|
+
borderStyleClasses[borderStyle],
|
|
68
|
+
stripedRows && stripedRowsClasses,
|
|
69
|
+
stripedColumns && stripedColumnsClasses,
|
|
70
|
+
hoverableRows && rowHoverClasses,
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
...props
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
function TableCaption({ position = "bottom", className, ...props }) {
|
|
78
|
+
return /* @__PURE__ */ jsx(
|
|
79
|
+
"caption",
|
|
80
|
+
{
|
|
81
|
+
"data-slot": "table-caption",
|
|
82
|
+
className: cn(
|
|
83
|
+
"text-foreground-muted",
|
|
84
|
+
position === "top" ? "caption-top pb-4" : "caption-bottom pt-4",
|
|
85
|
+
className
|
|
86
|
+
),
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function TableHeader({ className, ...props }) {
|
|
92
|
+
return /* @__PURE__ */ jsx("thead", { "data-slot": "table-header", className, ...props });
|
|
93
|
+
}
|
|
94
|
+
function TableBody({ className, ...props }) {
|
|
95
|
+
return /* @__PURE__ */ jsx("tbody", { "data-slot": "table-body", className, ...props });
|
|
96
|
+
}
|
|
97
|
+
function TableRow({ highlighted, className, ...props }) {
|
|
98
|
+
return /* @__PURE__ */ jsx("tr", { "data-slot": "table-row", "data-highlighted": highlighted ? "" : void 0, className, ...props });
|
|
99
|
+
}
|
|
100
|
+
function TableHead({ className, ...props }) {
|
|
101
|
+
return /* @__PURE__ */ jsx("th", { "data-slot": "table-head", className: cn("text-start", className), ...props });
|
|
102
|
+
}
|
|
103
|
+
function TableCell({ className, ...props }) {
|
|
104
|
+
return /* @__PURE__ */ jsx("td", { "data-slot": "table-cell", className, ...props });
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow };
|
|
108
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sources":["../../../src/components/table/table.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../../utils'\n\ntype TableSize = 'sm' | 'md' | 'lg'\ntype TableBorderStyle = 'solid' | 'dashed' | 'none'\n\nconst sizeOuter: Record<TableSize, string> = {\n sm: 'p-1 rounded-md text-xs',\n md: 'p-1.25 rounded-lg text-sm',\n lg: 'p-1.5 rounded-xl text-base',\n}\n\nconst sizeCellPad: Record<TableSize, string> = {\n sm: '[&_th]:p-3 [&_td]:p-3',\n md: '[&_th]:p-3.5 [&_td]:p-3.5',\n lg: '[&_th]:p-4 [&_td]:p-4',\n}\n\nconst sizeHeaderCorners: Record<TableSize, string> = {\n sm: '[&>thead>tr:first-child>th:first-child]:rounded-ss-sm [&>thead>tr:first-child>th:last-child]:rounded-se-sm [&>thead>tr:last-child>th:first-child]:rounded-es-sm [&>thead>tr:last-child>th:last-child]:rounded-ee-sm',\n md: '[&>thead>tr:first-child>th:first-child]:rounded-ss-md [&>thead>tr:first-child>th:last-child]:rounded-se-md [&>thead>tr:last-child>th:first-child]:rounded-es-md [&>thead>tr:last-child>th:last-child]:rounded-ee-md',\n lg: '[&>thead>tr:first-child>th:first-child]:rounded-ss-lg [&>thead>tr:first-child>th:last-child]:rounded-se-lg [&>thead>tr:last-child>th:first-child]:rounded-es-lg [&>thead>tr:last-child>th:last-child]:rounded-ee-lg',\n}\n\nconst sizeBodyBottomCorners: Record<TableSize, string> = {\n sm: '[&>tbody:last-of-type>tr:last-child>:first-child]:rounded-es-sm [&>tbody:last-of-type>tr:last-child>:last-child]:rounded-ee-sm',\n md: '[&>tbody:last-of-type>tr:last-child>:first-child]:rounded-es-md [&>tbody:last-of-type>tr:last-child>:last-child]:rounded-ee-md',\n lg: '[&>tbody:last-of-type>tr:last-child>:first-child]:rounded-es-lg [&>tbody:last-of-type>tr:last-child>:last-child]:rounded-ee-lg',\n}\n\nconst sizeBodyTopCornersNoHeader: Record<TableSize, string> = {\n sm: '[&:not(:has(thead))>tbody:first-of-type>tr:first-child>:first-child]:rounded-ss-sm [&:not(:has(thead))>tbody:first-of-type>tr:first-child>:last-child]:rounded-se-sm',\n md: '[&:not(:has(thead))>tbody:first-of-type>tr:first-child>:first-child]:rounded-ss-md [&:not(:has(thead))>tbody:first-of-type>tr:first-child>:last-child]:rounded-se-md',\n lg: '[&:not(:has(thead))>tbody:first-of-type>tr:first-child>:first-child]:rounded-ss-lg [&:not(:has(thead))>tbody:first-of-type>tr:first-child>:last-child]:rounded-se-lg',\n}\n\nconst borderStyleClasses: Record<TableBorderStyle, string> = {\n solid: '[&_td]:border-border [&>tbody_th]:border-border',\n dashed:\n '[&_td]:border-border-strong [&_td]:border-dashed [&>tbody_th]:border-border-strong [&>tbody_th]:border-dashed',\n none: '[&_td]:border-b-0 [&>tbody_th]:border-b-0',\n}\n\nconst tableBaseClasses = cn(\n 'w-full border-separate border-spacing-0 bg-background text-foreground border border-border-muted align-middle',\n '[&>thead>tr>th]:bg-background-muted',\n '[&>thead>tr>th]:text-foreground-intense [&>thead>tr>th]:font-medium',\n '[&>tbody_th]:text-foreground-intense [&>tbody_th]:font-medium [&>tbody_th]:border-b',\n '[&_td]:align-middle [&_td]:border-b',\n '[&>tbody:last-of-type>tr:last-child>td]:border-b-0',\n '[&>tbody:last-of-type>tr:last-child>th]:border-b-0',\n '[&>tbody>tr[data-highlighted]]:bg-background-subtle',\n)\n\nconst stripedRowsClasses = '[&>tbody>tr:nth-child(2n)]:bg-background-subtle'\nconst stripedColumnsClasses = '[&>tbody>tr>:nth-child(2n)]:bg-background-subtle'\nconst rowHoverClasses =\n '[&>tbody>tr]:transition-colors [&>tbody>tr]:duration-200 motion-reduce:[&>tbody>tr]:transition-none [&>tbody>tr:hover]:bg-background-subtle'\n\ninterface TableProps extends React.ComponentPropsWithoutRef<'table'> {\n size?: TableSize\n borderStyle?: TableBorderStyle\n stripedRows?: boolean\n stripedColumns?: boolean\n hoverableRows?: boolean\n}\n\nfunction Table({\n size = 'md',\n borderStyle = 'solid',\n stripedRows = false,\n stripedColumns = false,\n hoverableRows = false,\n className,\n ...props\n}: TableProps) {\n return (\n <table\n data-slot=\"table\"\n className={cn(\n tableBaseClasses,\n sizeOuter[size],\n sizeCellPad[size],\n sizeHeaderCorners[size],\n sizeBodyBottomCorners[size],\n sizeBodyTopCornersNoHeader[size],\n borderStyleClasses[borderStyle],\n stripedRows && stripedRowsClasses,\n stripedColumns && stripedColumnsClasses,\n hoverableRows && rowHoverClasses,\n className,\n )}\n {...props}\n />\n )\n}\n\ninterface TableCaptionProps extends React.ComponentPropsWithoutRef<'caption'> {\n position?: 'top' | 'bottom'\n}\n\nfunction TableCaption({ position = 'bottom', className, ...props }: TableCaptionProps) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\n 'text-foreground-muted',\n position === 'top' ? 'caption-top pb-4' : 'caption-bottom pt-4',\n className,\n )}\n {...props}\n />\n )\n}\n\ninterface TableHeaderProps extends React.ComponentPropsWithoutRef<'thead'> {}\n\nfunction TableHeader({ className, ...props }: TableHeaderProps) {\n return <thead data-slot=\"table-header\" className={className} {...props} />\n}\n\ninterface TableBodyProps extends React.ComponentPropsWithoutRef<'tbody'> {}\n\nfunction TableBody({ className, ...props }: TableBodyProps) {\n return <tbody data-slot=\"table-body\" className={className} {...props} />\n}\n\ninterface TableRowProps extends React.ComponentPropsWithoutRef<'tr'> {\n highlighted?: boolean\n}\n\nfunction TableRow({ highlighted, className, ...props }: TableRowProps) {\n return <tr data-slot=\"table-row\" data-highlighted={highlighted ? '' : undefined} className={className} {...props} />\n}\n\ninterface TableHeadProps extends React.ComponentPropsWithoutRef<'th'> {}\n\nfunction TableHead({ className, ...props }: TableHeadProps) {\n return <th data-slot=\"table-head\" className={cn('text-start', className)} {...props} />\n}\n\ninterface TableCellProps extends React.ComponentPropsWithoutRef<'td'> {}\n\nfunction TableCell({ className, ...props }: TableCellProps) {\n return <td data-slot=\"table-cell\" className={className} {...props} />\n}\n\nexport { Table, TableCaption, TableHeader, TableBody, TableRow, TableHead, TableCell }\nexport type {\n TableProps,\n TableCaptionProps,\n TableHeaderProps,\n TableBodyProps,\n TableRowProps,\n TableHeadProps,\n TableCellProps,\n}\n"],"names":[],"mappings":";;;AAMA,MAAM,SAAA,GAAuC;AAAA,EAC3C,EAAA,EAAI,wBAAA;AAAA,EACJ,EAAA,EAAI,2BAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAEA,MAAM,WAAA,GAAyC;AAAA,EAC7C,EAAA,EAAI,uBAAA;AAAA,EACJ,EAAA,EAAI,2BAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAEA,MAAM,iBAAA,GAA+C;AAAA,EACnD,EAAA,EAAI,qNAAA;AAAA,EACJ,EAAA,EAAI,qNAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAEA,MAAM,qBAAA,GAAmD;AAAA,EACvD,EAAA,EAAI,gIAAA;AAAA,EACJ,EAAA,EAAI,gIAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAEA,MAAM,0BAAA,GAAwD;AAAA,EAC5D,EAAA,EAAI,sKAAA;AAAA,EACJ,EAAA,EAAI,sKAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAEA,MAAM,kBAAA,GAAuD;AAAA,EAC3D,KAAA,E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-authority';
|
|
4
|
+
type TabsVariant = 'pill' | 'line';
|
|
5
|
+
type TabsSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
type TabsTriggerSize = TabsSize | 'icon-sm' | 'icon-md' | 'icon-lg';
|
|
7
|
+
type TabsOrientation = 'horizontal' | 'vertical';
|
|
8
|
+
declare const tabsListVariants: (props?: ({
|
|
9
|
+
variant?: "line" | "pill" | null | undefined;
|
|
10
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
type BaseTabsRootProps = React.ComponentProps<typeof BaseTabs.Root>;
|
|
13
|
+
interface TabsProps extends BaseTabsRootProps {
|
|
14
|
+
variant?: TabsVariant;
|
|
15
|
+
size?: TabsSize;
|
|
16
|
+
orientation?: TabsOrientation;
|
|
17
|
+
}
|
|
18
|
+
declare function Tabs({ variant, size, orientation, className, ...rest }: TabsProps): React.JSX.Element;
|
|
19
|
+
type BaseTabsListProps = React.ComponentProps<typeof BaseTabs.List>;
|
|
20
|
+
interface TabsListProps extends BaseTabsListProps, VariantProps<typeof tabsListVariants> {
|
|
21
|
+
}
|
|
22
|
+
declare function TabsList({ variant: variantProp, size: sizeProp, className, children, ...rest }: TabsListProps): React.JSX.Element;
|
|
23
|
+
type BaseTabsTabProps = React.ComponentProps<typeof BaseTabs.Tab>;
|
|
24
|
+
interface TabsTriggerProps extends BaseTabsTabProps {
|
|
25
|
+
variant?: TabsVariant;
|
|
26
|
+
size?: TabsTriggerSize;
|
|
27
|
+
}
|
|
28
|
+
declare function TabsTrigger({ variant: variantProp, size: sizeProp, className, children, ...rest }: TabsTriggerProps): React.JSX.Element;
|
|
29
|
+
type BaseTabsPanelProps = React.ComponentProps<typeof BaseTabs.Panel>;
|
|
30
|
+
interface TabsContentProps extends BaseTabsPanelProps {
|
|
31
|
+
}
|
|
32
|
+
declare function TabsContent({ className, ...rest }: TabsContentProps): React.JSX.Element;
|
|
33
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
34
|
+
export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps };
|
|
35
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,CAAA;AAClC,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAClC,KAAK,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;AACnE,KAAK,eAAe,GAAG,YAAY,GAAG,UAAU,CAAA;AAkBhD,QAAA,MAAM,gBAAgB;;;8EAwBrB,CAAA;AA8GD,KAAK,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAA;AAEnE,UAAU,SAAU,SAAQ,iBAAiB;IAC3C,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,WAAW,CAAC,EAAE,eAAe,CAAA;CAC9B;AAED,iBAAS,IAAI,CAAC,EAAE,OAAgB,EAAE,IAAW,EAAE,WAA0B,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,qBAazG;AAED,KAAK,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAA;AAEnE,UAAU,aAAc,SAAQ,iBAAiB,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAE3F,iBAAS,QAAQ,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,qBAoBtG;AAED,KAAK,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAA;AAEjE,UAAU,gBAAiB,SAAQ,gBAAgB;IACjD,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,IAAI,CAAC,EAAE,eAAe,CAAA;CACvB;AAED,iBAAS,WAAW,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,qBAgB5G;AAED,KAAK,kBAAkB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAA;AAErE,UAAU,gBAAiB,SAAQ,kBAAkB;CAAG;AAExD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,qBAE5D;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA;AACnD,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { cn } from '../../utils.js';
|
|
7
|
+
|
|
8
|
+
const TabsContext = React.createContext(null);
|
|
9
|
+
function useTabsContext() {
|
|
10
|
+
const ctx = React.useContext(TabsContext);
|
|
11
|
+
if (!ctx) {
|
|
12
|
+
throw new Error("Tabs sub-components must be rendered inside <Tabs>");
|
|
13
|
+
}
|
|
14
|
+
return ctx;
|
|
15
|
+
}
|
|
16
|
+
const tabsListVariants = cva(
|
|
17
|
+
"relative flex w-fit items-center justify-center data-[orientation=vertical]:h-fit data-[orientation=vertical]:flex-col",
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
pill: "gap-0.5 p-0.5 bg-background-muted",
|
|
22
|
+
line: ""
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
sm: "data-[orientation=vertical]:min-w-32",
|
|
26
|
+
md: "data-[orientation=vertical]:min-w-36",
|
|
27
|
+
lg: "data-[orientation=vertical]:min-w-40"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
compoundVariants: [
|
|
31
|
+
{ variant: "pill", size: "sm", class: "rounded-sm" },
|
|
32
|
+
{ variant: "pill", size: "md", class: "rounded-md" },
|
|
33
|
+
{ variant: "pill", size: "lg", class: "rounded-lg" },
|
|
34
|
+
{ variant: "line", size: "sm", class: "data-[orientation=horizontal]:gap-5" },
|
|
35
|
+
{ variant: "line", size: "md", class: "data-[orientation=horizontal]:gap-6" },
|
|
36
|
+
{ variant: "line", size: "lg", class: "data-[orientation=horizontal]:gap-7" }
|
|
37
|
+
],
|
|
38
|
+
defaultVariants: { variant: "pill", size: "md" }
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
const tabsIndicatorVariants = cva(
|
|
42
|
+
"absolute z-0 inset-s-0 transition-[translate,width,height] duration-250 motion-reduce:transition-none data-[orientation=horizontal]:ltr:translate-x-(--active-tab-left) data-[orientation=horizontal]:rtl:-translate-x-(--active-tab-right) data-[orientation=vertical]:translate-y-(--active-tab-top)",
|
|
43
|
+
{
|
|
44
|
+
variants: {
|
|
45
|
+
variant: {
|
|
46
|
+
pill: "w-(--active-tab-width) data-[orientation=horizontal]:top-0.5 data-[orientation=horizontal]:h-[calc(100%-0.25rem)] data-[orientation=vertical]:top-0 data-[orientation=vertical]:bottom-(--active-tab-bottom) data-[orientation=vertical]:inset-s-0.5 data-[orientation=vertical]:h-(--active-tab-height) rounded-[inherit] bg-white shadow-lg",
|
|
47
|
+
line: cn(
|
|
48
|
+
"rounded-full bg-foreground-intense",
|
|
49
|
+
"data-[orientation=horizontal]:bottom-0 data-[orientation=horizontal]:h-0.5 data-[orientation=horizontal]:w-(--active-tab-width)",
|
|
50
|
+
"data-[orientation=vertical]:top-[calc(var(--active-tab-height)/4)] data-[orientation=vertical]:h-[calc(var(--active-tab-height)/2)] data-[orientation=vertical]:w-0.5"
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: { variant: "pill" }
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
const tabsTriggerVariants = cva(
|
|
58
|
+
"group/trigger relative flex shrink-0 cursor-pointer items-stretch data-[orientation=vertical]:w-full text-foreground-strong font-medium select-none outline-ring transition-colors duration-250 motion-reduce:transition-none hover:text-foreground-intense data-active:pointer-events-none data-disabled:opacity-disabled data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='stroke-'])]:stroke-[1.85]",
|
|
59
|
+
{
|
|
60
|
+
variants: {
|
|
61
|
+
variant: {
|
|
62
|
+
pill: "data-active:text-black",
|
|
63
|
+
line: "data-active:text-foreground-intense"
|
|
64
|
+
},
|
|
65
|
+
size: {
|
|
66
|
+
sm: "text-xs [&_svg:not([class*='size-'])]:size-4",
|
|
67
|
+
md: "text-sm [&_svg:not([class*='size-'])]:size-4.5",
|
|
68
|
+
lg: "text-base [&_svg:not([class*='size-'])]:size-5",
|
|
69
|
+
"icon-sm": "text-xs [&_svg:not([class*='size-'])]:size-4",
|
|
70
|
+
"icon-md": "text-sm [&_svg:not([class*='size-'])]:size-4.5",
|
|
71
|
+
"icon-lg": "text-base [&_svg:not([class*='size-'])]:size-5"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
compoundVariants: [
|
|
75
|
+
{ variant: "pill", size: "sm", class: "rounded-sm" },
|
|
76
|
+
{ variant: "pill", size: "md", class: "rounded-md" },
|
|
77
|
+
{ variant: "pill", size: "lg", class: "rounded-lg" },
|
|
78
|
+
{ variant: "pill", size: "icon-sm", class: "rounded-sm" },
|
|
79
|
+
{ variant: "pill", size: "icon-md", class: "rounded-md" },
|
|
80
|
+
{ variant: "pill", size: "icon-lg", class: "rounded-lg" }
|
|
81
|
+
],
|
|
82
|
+
defaultVariants: { variant: "pill", size: "md" }
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
const tabsTriggerInnerVariants = cva(
|
|
86
|
+
"relative isolate flex items-center data-[orientation=horizontal]:justify-center data-[orientation=vertical]:w-full data-[orientation=horizontal]:text-center data-[orientation=vertical]:text-start data-[orientation=horizontal]:whitespace-nowrap transform-gpu transition-transform duration-250 ease-[cubic-bezier(0.175,0.885,0.32,1.5)] motion-reduce:transition-none group-active/trigger:scale-[0.97] group-active/trigger:duration-100 group-active/trigger:ease-in-out group-active/trigger:translate-y-px",
|
|
87
|
+
{
|
|
88
|
+
variants: {
|
|
89
|
+
variant: {
|
|
90
|
+
pill: "before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:pointer-events-none before:transition-colors before:duration-250 group-hover/trigger:before:bg-background-subtle motion-reduce:before:transition-none supports-[font:-apple-system-body]:before:hidden",
|
|
91
|
+
line: ""
|
|
92
|
+
},
|
|
93
|
+
size: {
|
|
94
|
+
sm: "gap-1 py-2",
|
|
95
|
+
md: "gap-1.5 py-2.5",
|
|
96
|
+
lg: "gap-1.5 py-3",
|
|
97
|
+
"icon-sm": "size-8",
|
|
98
|
+
"icon-md": "size-10",
|
|
99
|
+
"icon-lg": "size-12"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
compoundVariants: [
|
|
103
|
+
{
|
|
104
|
+
variant: "pill",
|
|
105
|
+
size: "sm",
|
|
106
|
+
class: "rounded-sm px-3.5 has-data-[icon=end]:pe-2.5 has-data-[icon=start]:ps-2.5"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
variant: "pill",
|
|
110
|
+
size: "md",
|
|
111
|
+
class: "rounded-md px-4.5 has-data-[icon=end]:pe-3 has-data-[icon=start]:ps-3"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
variant: "pill",
|
|
115
|
+
size: "lg",
|
|
116
|
+
class: "rounded-lg px-5.5 has-data-[icon=end]:pe-4 has-data-[icon=start]:ps-4"
|
|
117
|
+
},
|
|
118
|
+
{ variant: "pill", size: "icon-sm", class: "rounded-sm" },
|
|
119
|
+
{ variant: "pill", size: "icon-md", class: "rounded-md" },
|
|
120
|
+
{ variant: "pill", size: "icon-lg", class: "rounded-lg" },
|
|
121
|
+
{
|
|
122
|
+
variant: "line",
|
|
123
|
+
size: "sm",
|
|
124
|
+
class: "data-[orientation=vertical]:ps-3 data-[orientation=vertical]:has-data-[icon=end]:pe-2 data-[orientation=vertical]:has-data-[icon=start]:ps-2"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
variant: "line",
|
|
128
|
+
size: "md",
|
|
129
|
+
class: "data-[orientation=vertical]:ps-4 data-[orientation=vertical]:has-data-[icon=end]:pe-3 data-[orientation=vertical]:has-data-[icon=start]:ps-3"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
variant: "line",
|
|
133
|
+
size: "lg",
|
|
134
|
+
class: "data-[orientation=vertical]:ps-5 data-[orientation=vertical]:has-data-[icon=end]:pe-4 data-[orientation=vertical]:has-data-[icon=start]:ps-4"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
defaultVariants: { variant: "pill", size: "md" }
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
const tabsContentClasses = "outline-none transition-[opacity,filter] duration-400 ease-out motion-reduce:transition-none data-[starting-style]:opacity-0 data-[ending-style]:hidden";
|
|
141
|
+
function Tabs({ variant = "pill", size = "md", orientation = "horizontal", className, ...rest }) {
|
|
142
|
+
const ctx = React.useMemo(() => ({ variant, size, orientation }), [variant, size, orientation]);
|
|
143
|
+
return /* @__PURE__ */ jsx(TabsContext, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
144
|
+
Tabs$1.Root,
|
|
145
|
+
{
|
|
146
|
+
"data-slot": "tabs",
|
|
147
|
+
orientation,
|
|
148
|
+
className: cn("flex gap-6 data-[orientation=horizontal]:flex-col", className),
|
|
149
|
+
...rest
|
|
150
|
+
}
|
|
151
|
+
) });
|
|
152
|
+
}
|
|
153
|
+
function TabsList({ variant: variantProp, size: sizeProp, className, children, ...rest }) {
|
|
154
|
+
const ctx = useTabsContext();
|
|
155
|
+
const variant = variantProp ?? ctx.variant;
|
|
156
|
+
const size = sizeProp ?? ctx.size;
|
|
157
|
+
const listCtx = React.useMemo(
|
|
158
|
+
() => ({ variant, size, orientation: ctx.orientation }),
|
|
159
|
+
[variant, size, ctx.orientation]
|
|
160
|
+
);
|
|
161
|
+
return /* @__PURE__ */ jsxs(Tabs$1.List, { "data-slot": "tabs-list", className: cn(tabsListVariants({ variant, size }), className), ...rest, children: [
|
|
162
|
+
/* @__PURE__ */ jsx(
|
|
163
|
+
Tabs$1.Indicator,
|
|
164
|
+
{
|
|
165
|
+
renderBeforeHydration: true,
|
|
166
|
+
"data-slot": "tabs-indicator",
|
|
167
|
+
className: tabsIndicatorVariants({ variant })
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ jsx(TabsContext, { value: listCtx, children })
|
|
171
|
+
] });
|
|
172
|
+
}
|
|
173
|
+
function TabsTrigger({ variant: variantProp, size: sizeProp, className, children, ...rest }) {
|
|
174
|
+
const ctx = useTabsContext();
|
|
175
|
+
const variant = variantProp ?? ctx.variant;
|
|
176
|
+
const size = sizeProp ?? ctx.size;
|
|
177
|
+
return /* @__PURE__ */ jsx(Tabs$1.Tab, { "data-slot": "tabs-trigger", className: cn(tabsTriggerVariants({ variant, size }), className), ...rest, children: /* @__PURE__ */ jsx(
|
|
178
|
+
"span",
|
|
179
|
+
{
|
|
180
|
+
"data-slot": "tabs-trigger-inner",
|
|
181
|
+
"data-orientation": ctx.orientation,
|
|
182
|
+
className: tabsTriggerInnerVariants({ variant, size }),
|
|
183
|
+
children
|
|
184
|
+
}
|
|
185
|
+
) });
|
|
186
|
+
}
|
|
187
|
+
function TabsContent({ className, ...rest }) {
|
|
188
|
+
return /* @__PURE__ */ jsx(Tabs$1.Panel, { "data-slot": "tabs-content", className: cn(tabsContentClasses, className), ...rest });
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
192
|
+
//# sourceMappingURL=tabs.js.map
|