@appica/ui-react 1.0.0 → 1.2.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/CHANGELOG.md +72 -0
- package/README.md +47 -5
- package/agent-rules.md +41 -0
- package/appica.css +7 -0
- package/dist/components/accordion/accordion.d.ts +24 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +2 -1
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/alert/alert.d.ts +30 -2
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +2 -1
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert-dialog/alert-dialog.d.ts +12 -2
- package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog/alert-dialog.js +10 -5
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts +21 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.js +3 -2
- package/dist/components/autocomplete/autocomplete.js.map +1 -1
- package/dist/components/avatar/avatar.d.ts +17 -1
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +2 -1
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/background-pattern/background-pattern-interactive.d.ts +2 -1
- package/dist/components/background-pattern/background-pattern-interactive.d.ts.map +1 -1
- package/dist/components/background-pattern/background-pattern-interactive.js +4 -2
- package/dist/components/background-pattern/background-pattern-interactive.js.map +1 -1
- package/dist/components/background-pattern/background-pattern-shared.d.ts +3 -2
- package/dist/components/background-pattern/background-pattern-shared.d.ts.map +1 -1
- package/dist/components/background-pattern/background-pattern-shared.js +48 -16
- package/dist/components/background-pattern/background-pattern-shared.js.map +1 -1
- package/dist/components/background-pattern/background-pattern.d.ts +13 -5
- package/dist/components/background-pattern/background-pattern.d.ts.map +1 -1
- package/dist/components/background-pattern/background-pattern.js +13 -4
- package/dist/components/background-pattern/background-pattern.js.map +1 -1
- package/dist/components/background-pattern/index.js +1 -0
- package/dist/components/background-pattern/index.js.map +1 -1
- package/dist/components/badge/badge.d.ts +13 -3
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +2 -1
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/border-beam/border-beam.d.ts +52 -0
- package/dist/components/border-beam/border-beam.d.ts.map +1 -0
- package/dist/components/border-beam/border-beam.js +68 -0
- package/dist/components/border-beam/border-beam.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +8 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +2 -1
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/button/button-variants.d.ts +2 -2
- package/dist/components/button/button-variants.js +2 -1
- package/dist/components/button/button-variants.js.map +1 -1
- package/dist/components/button/button.d.ts +11 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +2 -1
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button/index.js +1 -0
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button-group/button-group-context.js +1 -0
- package/dist/components/button-group/button-group-context.js.map +1 -1
- package/dist/components/button-group/button-group.d.ts +10 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -1
- package/dist/components/button-group/button-group.js +2 -1
- package/dist/components/button-group/button-group.js.map +1 -1
- package/dist/components/calendar/calendar.d.ts +5 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/calendar.js +2 -1
- package/dist/components/calendar/calendar.js.map +1 -1
- package/dist/components/card/card.d.ts +43 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/card.js +104 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/carousel/carousel.d.ts +106 -6
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- package/dist/components/carousel/carousel.js +180 -5
- package/dist/components/carousel/carousel.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +2 -1
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +4 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/dist/components/checkbox-group/checkbox-group.js +2 -1
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/components/chip/chip.d.ts +33 -1
- package/dist/components/chip/chip.d.ts.map +1 -1
- package/dist/components/chip/chip.js +2 -1
- package/dist/components/chip/chip.js.map +1 -1
- package/dist/components/collapsible/collapsible.js +2 -1
- package/dist/components/collapsible/collapsible.js.map +1 -1
- package/dist/components/color-area/color-area.d.ts +53 -0
- package/dist/components/color-area/color-area.d.ts.map +1 -0
- package/dist/components/color-area/color-area.js +246 -0
- package/dist/components/color-area/color-area.js.map +1 -0
- package/dist/components/color-picker/color-picker.d.ts +152 -0
- package/dist/components/color-picker/color-picker.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.js +328 -0
- package/dist/components/color-picker/color-picker.js.map +1 -0
- package/dist/components/color-slider/color-slider.d.ts +48 -0
- package/dist/components/color-slider/color-slider.d.ts.map +1 -0
- package/dist/components/color-slider/color-slider.js +217 -0
- package/dist/components/color-slider/color-slider.js.map +1 -0
- package/dist/components/color-swatch/color-swatch.d.ts +47 -0
- package/dist/components/color-swatch/color-swatch.d.ts.map +1 -0
- package/dist/components/color-swatch/color-swatch.js +67 -0
- package/dist/components/color-swatch/color-swatch.js.map +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.d.ts +62 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.d.ts.map +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.js +203 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.js.map +1 -0
- package/dist/components/combobox/combobox.d.ts +25 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +3 -2
- package/dist/components/combobox/combobox.js.map +1 -1
- package/dist/components/context-menu/context-menu.d.ts +7 -1
- package/dist/components/context-menu/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu/context-menu.js +11 -5
- package/dist/components/context-menu/context-menu.js.map +1 -1
- package/dist/components/copy-button/copy-button.d.ts +18 -1
- package/dist/components/copy-button/copy-button.d.ts.map +1 -1
- package/dist/components/copy-button/copy-button.js +6 -5
- package/dist/components/copy-button/copy-button.js.map +1 -1
- package/dist/components/countdown/countdown.d.ts +14 -0
- package/dist/components/countdown/countdown.d.ts.map +1 -1
- package/dist/components/countdown/countdown.js +2 -1
- package/dist/components/countdown/countdown.js.map +1 -1
- package/dist/components/date-field/date-field.d.ts +35 -0
- package/dist/components/date-field/date-field.d.ts.map +1 -1
- package/dist/components/date-field/date-field.js +2 -1
- package/dist/components/date-field/date-field.js.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +94 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +2 -1
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/dialog/dialog.d.ts +20 -2
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/dialog.js +9 -4
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/drawer/drawer.d.ts +22 -2
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/drawer.js +14 -7
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +7 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.js +11 -5
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/field/field.js +2 -1
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/fieldset/fieldset.js +2 -1
- package/dist/components/fieldset/fieldset.js.map +1 -1
- package/dist/components/form/form.js +1 -0
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/gradient-glow/gradient-glow.d.ts +51 -1
- package/dist/components/gradient-glow/gradient-glow.d.ts.map +1 -1
- package/dist/components/gradient-glow/gradient-glow.js +5 -3
- package/dist/components/gradient-glow/gradient-glow.js.map +1 -1
- package/dist/components/input/index.js +1 -0
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/input-variants.d.ts +1 -1
- package/dist/components/input/input-variants.js +2 -1
- package/dist/components/input/input-variants.js.map +1 -1
- package/dist/components/input/input.d.ts +21 -1
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +4 -3
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/kbd/kbd.d.ts +8 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -1
- package/dist/components/kbd/kbd.js +2 -1
- package/dist/components/kbd/kbd.js.map +1 -1
- package/dist/components/loader/loader.d.ts +8 -0
- package/dist/components/loader/loader.d.ts.map +1 -1
- package/dist/components/loader/loader.js +2 -1
- package/dist/components/loader/loader.js.map +1 -1
- package/dist/components/menubar/menubar.d.ts +8 -0
- package/dist/components/menubar/menubar.d.ts.map +1 -1
- package/dist/components/menubar/menubar.js +2 -1
- package/dist/components/menubar/menubar.js.map +1 -1
- package/dist/components/meter/meter.d.ts +4 -0
- package/dist/components/meter/meter.d.ts.map +1 -1
- package/dist/components/meter/meter.js +2 -1
- package/dist/components/meter/meter.js.map +1 -1
- package/dist/components/navigation/index.js +1 -0
- package/dist/components/navigation/index.js.map +1 -1
- package/dist/components/navigation/navigation-context.js +1 -0
- package/dist/components/navigation/navigation-context.js.map +1 -1
- package/dist/components/navigation/navigation-link-variants.d.ts +2 -2
- package/dist/components/navigation/navigation-link-variants.js +2 -1
- package/dist/components/navigation/navigation-link-variants.js.map +1 -1
- package/dist/components/navigation/navigation-link.d.ts +22 -0
- package/dist/components/navigation/navigation-link.d.ts.map +1 -1
- package/dist/components/navigation/navigation-link.js +2 -1
- package/dist/components/navigation/navigation-link.js.map +1 -1
- package/dist/components/navigation/navigation.d.ts +12 -0
- package/dist/components/navigation/navigation.d.ts.map +1 -1
- package/dist/components/navigation/navigation.js +2 -1
- package/dist/components/navigation/navigation.js.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +33 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +2 -1
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/number-field/number-field.d.ts +14 -0
- package/dist/components/number-field/number-field.d.ts.map +1 -1
- package/dist/components/number-field/number-field.js +2 -1
- package/dist/components/number-field/number-field.js.map +1 -1
- package/dist/components/otp-field/otp-field.d.ts +9 -0
- package/dist/components/otp-field/otp-field.d.ts.map +1 -1
- package/dist/components/otp-field/otp-field.js +2 -1
- package/dist/components/otp-field/otp-field.js.map +1 -1
- package/dist/components/pagination/pagination.d.ts +16 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +2 -1
- package/dist/components/pagination/pagination.js.map +1 -1
- package/dist/components/popover/popover.d.ts +5 -1
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +3 -2
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/preview-card/preview-card.d.ts +5 -1
- package/dist/components/preview-card/preview-card.d.ts.map +1 -1
- package/dist/components/preview-card/preview-card.js +3 -2
- package/dist/components/preview-card/preview-card.js.map +1 -1
- package/dist/components/progress/progress.d.ts +17 -0
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/progress/progress.js +2 -1
- package/dist/components/progress/progress.js.map +1 -1
- package/dist/components/radio/radio.js +2 -1
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/radio-group/radio-group.d.ts +4 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/radio-group.js +2 -1
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/rating/rating.d.ts +79 -0
- package/dist/components/rating/rating.d.ts.map +1 -0
- package/dist/components/rating/rating.js +302 -0
- package/dist/components/rating/rating.js.map +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +13 -0
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area/scroll-area.js +2 -1
- package/dist/components/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/select/select.d.ts +20 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +3 -2
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/separator/separator.d.ts +4 -0
- package/dist/components/separator/separator.d.ts.map +1 -1
- package/dist/components/separator/separator.js +2 -1
- package/dist/components/separator/separator.js.map +1 -1
- package/dist/components/skeleton/skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton.js +2 -1
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/slider/slider.d.ts +5 -0
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/slider/slider.js +2 -1
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/sparkline/sparkline.d.ts +44 -0
- package/dist/components/sparkline/sparkline.d.ts.map +1 -1
- package/dist/components/sparkline/sparkline.js +2 -1
- package/dist/components/sparkline/sparkline.js.map +1 -1
- package/dist/components/spinner/spinner.d.ts +8 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +2 -1
- package/dist/components/spinner/spinner.js.map +1 -1
- package/dist/components/switch/switch.d.ts +19 -15
- package/dist/components/switch/switch.d.ts.map +1 -1
- package/dist/components/switch/switch.js +2 -1
- package/dist/components/switch/switch.js.map +1 -1
- package/dist/components/table/table.d.ts +28 -0
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +2 -1
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +32 -2
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +2 -1
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/text-animate/text-animate.d.ts +31 -0
- package/dist/components/text-animate/text-animate.d.ts.map +1 -1
- package/dist/components/text-animate/text-animate.js +27 -9
- package/dist/components/text-animate/text-animate.js.map +1 -1
- package/dist/components/textarea/textarea.d.ts +15 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -1
- package/dist/components/textarea/textarea.js +2 -1
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/thumbnail/thumbnail.d.ts +22 -2
- package/dist/components/thumbnail/thumbnail.d.ts.map +1 -1
- package/dist/components/thumbnail/thumbnail.js +2 -1
- package/dist/components/thumbnail/thumbnail.js.map +1 -1
- package/dist/components/time-field/time-field.d.ts +35 -0
- package/dist/components/time-field/time-field.d.ts.map +1 -1
- package/dist/components/time-field/time-field.js +2 -1
- package/dist/components/time-field/time-field.js.map +1 -1
- package/dist/components/toast/toast.d.ts +18 -0
- package/dist/components/toast/toast.d.ts.map +1 -1
- package/dist/components/toast/toast.js +2 -1
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/components/toc/toc.d.ts +10 -0
- package/dist/components/toc/toc.d.ts.map +1 -1
- package/dist/components/toc/toc.js +2 -1
- package/dist/components/toc/toc.js.map +1 -1
- package/dist/components/toggle/toggle.js +1 -0
- package/dist/components/toggle/toggle.js.map +1 -1
- package/dist/components/toggle-group/toggle-group.js +2 -1
- package/dist/components/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/toolbar/toolbar.js +2 -1
- package/dist/components/toolbar/toolbar.js.map +1 -1
- package/dist/components/tooltip/tooltip.d.ts +5 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +3 -2
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/hooks/use-direction.js +1 -0
- package/dist/hooks/use-direction.js.map +1 -1
- package/dist/hooks/use-dismissible.d.ts +4 -0
- package/dist/hooks/use-dismissible.d.ts.map +1 -1
- package/dist/hooks/use-dismissible.js +1 -0
- package/dist/hooks/use-dismissible.js.map +1 -1
- package/dist/hooks/use-local-storage.js +1 -0
- package/dist/hooks/use-local-storage.js.map +1 -1
- package/dist/hooks/use-media-query.js +1 -0
- package/dist/hooks/use-media-query.js.map +1 -1
- package/dist/hooks/use-reduced-motion.d.ts +1 -1
- package/dist/hooks/use-reduced-motion.js +1 -0
- package/dist/hooks/use-reduced-motion.js.map +1 -1
- package/dist/hooks/use-theme.d.ts +1 -1
- package/dist/hooks/use-theme.js +1 -0
- package/dist/hooks/use-theme.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/color-control.d.ts +75 -0
- package/dist/internal/color-control.d.ts.map +1 -0
- package/dist/internal/color-control.js +79 -0
- package/dist/internal/color-control.js.map +1 -0
- package/dist/internal/color-math.d.ts +9 -0
- package/dist/internal/color-math.d.ts.map +1 -0
- package/dist/internal/color-math.js +35 -0
- package/dist/internal/color-math.js.map +1 -0
- package/dist/internal/color-picker-context.d.ts +34 -0
- package/dist/internal/color-picker-context.d.ts.map +1 -0
- package/dist/internal/color-picker-context.js +42 -0
- package/dist/internal/color-picker-context.js.map +1 -0
- package/dist/{floating.d.ts → internal/floating.d.ts} +3 -3
- package/dist/internal/floating.d.ts.map +1 -0
- package/dist/{floating.js → internal/floating.js} +1 -0
- package/dist/internal/floating.js.map +1 -0
- package/dist/{modal.d.ts → internal/modal.d.ts} +2 -2
- package/dist/internal/modal.d.ts.map +1 -0
- package/dist/{modal.js → internal/modal.js} +1 -0
- package/dist/internal/modal.js.map +1 -0
- package/dist/{utils.d.ts → internal/utils.d.ts} +2 -2
- package/dist/internal/utils.d.ts.map +1 -0
- package/dist/{utils.js → internal/utils.js} +1 -0
- package/dist/internal/utils.js.map +1 -0
- package/dist/lib/color.d.ts +95 -0
- package/dist/lib/color.d.ts.map +1 -0
- package/dist/lib/color.js +329 -0
- package/dist/lib/color.js.map +1 -0
- package/dist/providers/direction-provider.d.ts +4 -4
- package/dist/providers/direction-provider.d.ts.map +1 -1
- package/dist/providers/direction-provider.js +1 -0
- package/dist/providers/direction-provider.js.map +1 -1
- package/dist/providers/reduced-motion-provider.d.ts +4 -8
- package/dist/providers/reduced-motion-provider.d.ts.map +1 -1
- package/dist/providers/reduced-motion-provider.js +1 -0
- package/dist/providers/reduced-motion-provider.js.map +1 -1
- package/dist/providers/theme-provider/index.js +1 -0
- package/dist/providers/theme-provider/index.js.map +1 -1
- package/dist/providers/theme-provider/theme-provider.d.ts +28 -12
- package/dist/providers/theme-provider/theme-provider.d.ts.map +1 -1
- package/dist/providers/theme-provider/theme-provider.js +1 -0
- package/dist/providers/theme-provider/theme-provider.js.map +1 -1
- package/dist/providers/theme-provider/theme-script.js +1 -0
- package/dist/providers/theme-provider/theme-script.js.map +1 -1
- package/package.json +91 -31
- package/src/components/accordion/accordion.tsx +25 -1
- package/src/components/alert/alert.tsx +30 -2
- package/src/components/alert-dialog/alert-dialog.test.tsx +34 -2
- package/src/components/alert-dialog/alert-dialog.tsx +21 -5
- package/src/components/autocomplete/autocomplete.test.tsx +1 -1
- package/src/components/autocomplete/autocomplete.tsx +22 -2
- package/src/components/avatar/avatar.test.tsx +2 -2
- package/src/components/avatar/avatar.tsx +17 -1
- package/src/components/background-pattern/background-pattern-interactive.tsx +4 -2
- package/src/components/background-pattern/background-pattern-shared.tsx +56 -19
- package/src/components/background-pattern/background-pattern.test.tsx +36 -1
- package/src/components/background-pattern/background-pattern.tsx +24 -9
- package/src/components/badge/badge.tsx +14 -2
- package/src/components/border-beam/border-beam.test.tsx +91 -0
- package/src/components/border-beam/border-beam.tsx +131 -0
- package/src/components/breadcrumb/breadcrumb.tsx +9 -1
- package/src/components/button/button-variants.ts +1 -1
- package/src/components/button/button.tsx +13 -2
- package/src/components/button-group/button-group.tsx +11 -1
- package/src/components/calendar/calendar.tsx +6 -1
- package/src/components/card/card.test.tsx +98 -0
- package/src/components/card/card.tsx +154 -0
- package/src/components/carousel/carousel.test.tsx +179 -0
- package/src/components/carousel/carousel.tsx +329 -6
- package/src/components/checkbox/checkbox.test.tsx +2 -2
- package/src/components/checkbox/checkbox.tsx +1 -1
- package/src/components/checkbox-group/checkbox-group.tsx +5 -1
- package/src/components/chip/chip.tsx +33 -1
- package/src/components/collapsible/collapsible.tsx +1 -1
- package/src/components/color-area/color-area.test.tsx +242 -0
- package/src/components/color-area/color-area.tsx +356 -0
- package/src/components/color-picker/color-picker.test.tsx +286 -0
- package/src/components/color-picker/color-picker.tsx +546 -0
- package/src/components/color-slider/color-slider.test.tsx +222 -0
- package/src/components/color-slider/color-slider.tsx +330 -0
- package/src/components/color-swatch/color-swatch.test.tsx +117 -0
- package/src/components/color-swatch/color-swatch.tsx +119 -0
- package/src/components/color-swatch-picker/color-swatch-picker.test.tsx +287 -0
- package/src/components/color-swatch-picker/color-swatch-picker.tsx +327 -0
- package/src/components/combobox/combobox.test.tsx +1 -1
- package/src/components/combobox/combobox.tsx +26 -2
- package/src/components/context-menu/context-menu.test.tsx +28 -0
- package/src/components/context-menu/context-menu.tsx +16 -5
- package/src/components/copy-button/copy-button.test.tsx +14 -1
- package/src/components/copy-button/copy-button.tsx +27 -6
- package/src/components/countdown/countdown.tsx +15 -1
- package/src/components/date-field/date-field.tsx +36 -1
- package/src/components/date-picker/date-picker.test.tsx +1 -1
- package/src/components/date-picker/date-picker.tsx +95 -1
- package/src/components/dialog/dialog.test.tsx +30 -1
- package/src/components/dialog/dialog.tsx +28 -6
- package/src/components/drawer/drawer.test.tsx +32 -1
- package/src/components/drawer/drawer.tsx +37 -7
- package/src/components/dropdown-menu/dropdown-menu.test.tsx +28 -0
- package/src/components/dropdown-menu/dropdown-menu.tsx +16 -5
- package/src/components/field/field.tsx +1 -1
- package/src/components/fieldset/fieldset.tsx +1 -1
- package/src/components/gradient-glow/gradient-glow.test.tsx +7 -1
- package/src/components/gradient-glow/gradient-glow.tsx +64 -11
- package/src/components/input/input-variants.ts +1 -1
- package/src/components/input/input.tsx +24 -4
- package/src/components/kbd/kbd.tsx +9 -1
- package/src/components/loader/loader.tsx +9 -1
- package/src/components/menubar/menubar.tsx +9 -1
- package/src/components/meter/meter.tsx +5 -1
- package/src/components/navigation/navigation-link-variants.ts +1 -1
- package/src/components/navigation/navigation-link.tsx +23 -1
- package/src/components/navigation/navigation.tsx +23 -3
- package/src/components/navigation-menu/navigation-menu.tsx +34 -1
- package/src/components/number-field/number-field.tsx +15 -1
- package/src/components/otp-field/otp-field.tsx +10 -1
- package/src/components/pagination/pagination.tsx +17 -1
- package/src/components/popover/popover.test.tsx +1 -1
- package/src/components/popover/popover.tsx +6 -2
- package/src/components/preview-card/preview-card.tsx +6 -2
- package/src/components/progress/progress.tsx +18 -1
- package/src/components/radio/radio.test.tsx +1 -1
- package/src/components/radio/radio.tsx +1 -1
- package/src/components/radio-group/radio-group.test.tsx +1 -1
- package/src/components/radio-group/radio-group.tsx +5 -1
- package/src/components/rating/rating.test.tsx +246 -0
- package/src/components/rating/rating.tsx +457 -0
- package/src/components/scroll-area/scroll-area.test.tsx +1 -1
- package/src/components/scroll-area/scroll-area.tsx +14 -1
- package/src/components/select/select.tsx +21 -2
- package/src/components/separator/separator.tsx +5 -1
- package/src/components/skeleton/skeleton.tsx +5 -1
- package/src/components/slider/slider.test.tsx +1 -1
- package/src/components/slider/slider.tsx +6 -1
- package/src/components/sparkline/sparkline.test.tsx +1 -1
- package/src/components/sparkline/sparkline.tsx +45 -1
- package/src/components/spinner/spinner.tsx +9 -1
- package/src/components/switch/switch.test.tsx +1 -1
- package/src/components/switch/switch.tsx +5 -1
- package/src/components/table/table.tsx +29 -1
- package/src/components/tabs/tabs.test.tsx +1 -1
- package/src/components/tabs/tabs.tsx +33 -2
- package/src/components/text-animate/text-animate.test.tsx +62 -0
- package/src/components/text-animate/text-animate.tsx +77 -9
- package/src/components/textarea/textarea.tsx +16 -1
- package/src/components/thumbnail/thumbnail.test.tsx +1 -1
- package/src/components/thumbnail/thumbnail.tsx +21 -1
- package/src/components/time-field/time-field.tsx +36 -1
- package/src/components/toast/toast.test.tsx +1 -1
- package/src/components/toast/toast.tsx +19 -1
- package/src/components/toc/toc.tsx +11 -1
- package/src/components/toggle/toggle.test.tsx +1 -1
- package/src/components/toggle-group/toggle-group.tsx +1 -1
- package/src/components/toolbar/toolbar.tsx +1 -1
- package/src/components/tooltip/tooltip.test.tsx +1 -1
- package/src/components/tooltip/tooltip.tsx +6 -2
- package/src/hooks/use-dismissible.ts +4 -0
- package/src/hooks/use-local-storage.ts +3 -3
- package/src/hooks/use-reduced-motion.ts +1 -1
- package/src/hooks/use-theme.ts +1 -1
- package/src/index.ts +11 -2
- package/src/internal/color-control.ts +178 -0
- package/src/internal/color-math.ts +44 -0
- package/src/internal/color-picker-context.ts +80 -0
- package/src/{floating.ts → internal/floating.ts} +3 -3
- package/src/{modal.ts → internal/modal.ts} +3 -3
- package/src/lib/color.test.ts +178 -0
- package/src/lib/color.ts +471 -0
- package/src/providers/direction-provider.tsx +4 -4
- package/src/providers/reduced-motion-provider.tsx +4 -8
- package/src/providers/theme-provider/theme-provider.tsx +28 -12
- package/src/providers/theme-provider/theme-script.tsx +2 -2
- package/src/test/setup.ts +1 -1
- package/styles.css +28 -4
- package/dist/floating.d.ts.map +0 -1
- package/dist/floating.js.map +0 -1
- package/dist/modal.d.ts.map +0 -1
- package/dist/modal.js.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js.map +0 -1
- /package/src/{floating.test.ts → internal/floating.test.ts} +0 -0
- /package/src/{modal.test.ts → internal/modal.test.ts} +0 -0
- /package/src/{utils.test.tsx → internal/utils.test.tsx} +0 -0
- /package/src/{utils.ts → internal/utils.ts} +0 -0
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { Menu as BaseMenu } from '@base-ui/react/menu'
|
|
5
5
|
import { useReducedMotion } from '../../hooks/use-reduced-motion'
|
|
6
|
-
import { cn } from '../../utils'
|
|
7
|
-
import { type FloatingContentProps, splitFloatingProps } from '../../floating'
|
|
6
|
+
import { cn } from '../../internal/utils'
|
|
7
|
+
import { type FloatingContentProps, splitFloatingProps } from '../../internal/floating'
|
|
8
8
|
import { navigationLinkVariants } from '../navigation/navigation-link-variants'
|
|
9
9
|
|
|
10
10
|
type DropdownMenuSize = 'sm' | 'md' | 'lg'
|
|
@@ -27,6 +27,10 @@ function useDropdownMenuContext() {
|
|
|
27
27
|
type BaseRootProps = React.ComponentProps<typeof BaseMenu.Root>
|
|
28
28
|
|
|
29
29
|
interface DropdownMenuProps extends BaseRootProps {
|
|
30
|
+
/**
|
|
31
|
+
* Scales the popup radius, item padding, and icon size.
|
|
32
|
+
* @default 'md'
|
|
33
|
+
*/
|
|
30
34
|
size?: DropdownMenuSize
|
|
31
35
|
}
|
|
32
36
|
|
|
@@ -60,7 +64,7 @@ const ICON_SIZE: Record<DropdownMenuSize, string> = {
|
|
|
60
64
|
|
|
61
65
|
function popupClassName(size: DropdownMenuSize, className?: string) {
|
|
62
66
|
return cn(
|
|
63
|
-
'max-h-(--available-height) w-(--anchor-width) bg-background border-border-overlay flex flex-col border shadow-2xl outline-none
|
|
67
|
+
'max-h-(--available-height) w-(--anchor-width) bg-background border-border-overlay flex flex-col border shadow-2xl outline-none',
|
|
64
68
|
POPUP_SIZE[size],
|
|
65
69
|
'origin-(--transform-origin)',
|
|
66
70
|
'motion-safe:transition-[opacity,scale] motion-safe:duration-200 motion-safe:ease-[cubic-bezier(0.175,0.885,0.32,1.5)]',
|
|
@@ -77,6 +81,7 @@ type DropdownMenuFloatingProps = FloatingContentProps<
|
|
|
77
81
|
|
|
78
82
|
type DropdownMenuContentProps = Omit<React.ComponentProps<typeof BaseMenu.Popup>, 'className'> &
|
|
79
83
|
DropdownMenuFloatingProps & {
|
|
84
|
+
/** Extra classes on the popup. */
|
|
80
85
|
className?: string
|
|
81
86
|
}
|
|
82
87
|
|
|
@@ -92,7 +97,7 @@ function DropdownMenuContent({ className, children, ...props }: DropdownMenuCont
|
|
|
92
97
|
className={cn('isolate z-50', positioner.className as string | undefined)}
|
|
93
98
|
>
|
|
94
99
|
<BaseMenu.Popup data-slot="dropdown-menu-content" className={popupClassName(size, className)} {...popup}>
|
|
95
|
-
<div className="flex flex-col gap-0.5 overflow-x-hidden overflow-y-auto
|
|
100
|
+
<div className="flex flex-col gap-0.5 overflow-x-hidden overflow-y-auto p-2">{children}</div>
|
|
96
101
|
</BaseMenu.Popup>
|
|
97
102
|
</BaseMenu.Positioner>
|
|
98
103
|
</BaseMenu.Portal>
|
|
@@ -114,6 +119,7 @@ function DropdownMenuItem({ className, ...props }: DropdownMenuItemProps) {
|
|
|
114
119
|
return (
|
|
115
120
|
<BaseMenu.Item
|
|
116
121
|
data-slot="dropdown-menu-item"
|
|
122
|
+
data-orientation="vertical"
|
|
117
123
|
className={cn(navigationLinkVariants({ variant: 'pill', size }), ITEM_BASE, className)}
|
|
118
124
|
{...props}
|
|
119
125
|
/>
|
|
@@ -127,6 +133,7 @@ function DropdownMenuLinkItem({ className, ...props }: DropdownMenuLinkItemProps
|
|
|
127
133
|
return (
|
|
128
134
|
<BaseMenu.LinkItem
|
|
129
135
|
data-slot="dropdown-menu-link-item"
|
|
136
|
+
data-orientation="vertical"
|
|
130
137
|
className={cn(navigationLinkVariants({ variant: 'pill', size }), ITEM_BASE, className)}
|
|
131
138
|
{...props}
|
|
132
139
|
/>
|
|
@@ -183,6 +190,7 @@ function DropdownMenuRadioItem({ className, children, ...props }: DropdownMenuRa
|
|
|
183
190
|
return (
|
|
184
191
|
<BaseMenu.RadioItem
|
|
185
192
|
data-slot="dropdown-menu-radio-item"
|
|
193
|
+
data-orientation="vertical"
|
|
186
194
|
className={cn(navigationLinkVariants({ variant: 'pill', size }), ITEM_BASE, 'justify-between', className)}
|
|
187
195
|
{...props}
|
|
188
196
|
>
|
|
@@ -205,6 +213,7 @@ function DropdownMenuCheckboxItem({ className, children, ...props }: DropdownMen
|
|
|
205
213
|
return (
|
|
206
214
|
<BaseMenu.CheckboxItem
|
|
207
215
|
data-slot="dropdown-menu-checkbox-item"
|
|
216
|
+
data-orientation="vertical"
|
|
208
217
|
className={cn(navigationLinkVariants({ variant: 'pill', size }), ITEM_BASE, 'justify-between', className)}
|
|
209
218
|
{...props}
|
|
210
219
|
>
|
|
@@ -234,6 +243,7 @@ function DropdownMenuSubTrigger({ className, children, ...props }: DropdownMenuS
|
|
|
234
243
|
<BaseMenu.SubmenuTrigger className="group/submenu-trigger outline-hidden" {...props}>
|
|
235
244
|
<span
|
|
236
245
|
data-slot="dropdown-menu-sub-trigger"
|
|
246
|
+
data-orientation="vertical"
|
|
237
247
|
className={cn(navigationLinkVariants({ variant: 'pill', size }), ITEM_BASE, 'justify-between', className)}
|
|
238
248
|
>
|
|
239
249
|
<span className={cn('flex flex-1 items-center', ITEM_TEXT[size])}>{children}</span>
|
|
@@ -245,6 +255,7 @@ function DropdownMenuSubTrigger({ className, children, ...props }: DropdownMenuS
|
|
|
245
255
|
|
|
246
256
|
type DropdownMenuSubContentProps = Omit<React.ComponentProps<typeof BaseMenu.Popup>, 'className'> &
|
|
247
257
|
DropdownMenuFloatingProps & {
|
|
258
|
+
/** Extra classes on the submenu popup. */
|
|
248
259
|
className?: string
|
|
249
260
|
}
|
|
250
261
|
|
|
@@ -261,7 +272,7 @@ function DropdownMenuSubContent({ className, children, ...props }: DropdownMenuS
|
|
|
261
272
|
className={cn('isolate z-50', positioner.className as string | undefined)}
|
|
262
273
|
>
|
|
263
274
|
<BaseMenu.Popup data-slot="dropdown-menu-sub-content" className={popupClassName(size, className)} {...popup}>
|
|
264
|
-
<div className="flex flex-col gap-0.5 overflow-x-hidden overflow-y-auto
|
|
275
|
+
<div className="flex flex-col gap-0.5 overflow-x-hidden overflow-y-auto p-2">{children}</div>
|
|
265
276
|
</BaseMenu.Popup>
|
|
266
277
|
</BaseMenu.Positioner>
|
|
267
278
|
</BaseMenu.Portal>
|
|
@@ -4,7 +4,7 @@ import { axe } from 'vitest-axe'
|
|
|
4
4
|
import { GradientGlow } from './gradient-glow'
|
|
5
5
|
|
|
6
6
|
describe('GradientGlow', () => {
|
|
7
|
-
it('renders its children inside a
|
|
7
|
+
it('renders its children inside a labeled wrapper', () => {
|
|
8
8
|
render(
|
|
9
9
|
<GradientGlow>
|
|
10
10
|
<span>Content</span>
|
|
@@ -33,6 +33,12 @@ describe('GradientGlow', () => {
|
|
|
33
33
|
expect(ring).toHaveAttribute('aria-hidden')
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
+
it('drops the aura but keeps the border ring when glow is off', () => {
|
|
37
|
+
const { container } = render(<GradientGlow glow={false} border />)
|
|
38
|
+
expect(container.querySelector('[data-slot="gradient-glow-aura"]')).toBeNull()
|
|
39
|
+
expect(container.querySelector('[data-slot="gradient-glow-border"]')).not.toBeNull()
|
|
40
|
+
})
|
|
41
|
+
|
|
36
42
|
it('maps the blur prop to a Tailwind utility', () => {
|
|
37
43
|
const { container } = render(<GradientGlow blur="2xl" />)
|
|
38
44
|
const aura = container.querySelector('[data-slot="gradient-glow-aura"]')!
|
|
@@ -1,21 +1,71 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import { cn } from '../../utils'
|
|
2
|
+
import { cn } from '../../internal/utils'
|
|
3
3
|
|
|
4
4
|
type GradientGlowBlur = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'
|
|
5
5
|
type GradientGlowTrigger = 'hover' | 'press'
|
|
6
6
|
|
|
7
7
|
interface GradientGlowProps extends React.ComponentProps<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* First gradient stop.
|
|
10
|
+
* @default '#8EC5FF'
|
|
11
|
+
*/
|
|
8
12
|
from?: string
|
|
13
|
+
/**
|
|
14
|
+
* Middle gradient stop.
|
|
15
|
+
* @default '#EFADF7'
|
|
16
|
+
*/
|
|
9
17
|
via?: string
|
|
18
|
+
/**
|
|
19
|
+
* Last gradient stop.
|
|
20
|
+
* @default '#FFD69B'
|
|
21
|
+
*/
|
|
10
22
|
to?: string
|
|
23
|
+
/**
|
|
24
|
+
* Resting gradient direction in degrees; the animation rotates a full turn around it.
|
|
25
|
+
* @default 95
|
|
26
|
+
*/
|
|
11
27
|
angle?: number
|
|
28
|
+
/**
|
|
29
|
+
* Softness of the glow, mapped to a Tailwind `blur-*` utility.
|
|
30
|
+
* @default 'lg'
|
|
31
|
+
*/
|
|
12
32
|
blur?: GradientGlowBlur
|
|
33
|
+
/**
|
|
34
|
+
* Paint the blurred aura behind the content. Set `false` with `border` for a gradient stroke alone.
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
glow?: boolean
|
|
38
|
+
/**
|
|
39
|
+
* Add a 1px stroke that follows the same animated gradient.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
13
42
|
border?: boolean
|
|
43
|
+
/**
|
|
44
|
+
* Stroke thickness in px when `border` is on.
|
|
45
|
+
* @default 1
|
|
46
|
+
*/
|
|
14
47
|
borderWidth?: number
|
|
48
|
+
/**
|
|
49
|
+
* Seconds for one full rotation (and one breath) of the gradient.
|
|
50
|
+
* @default 4
|
|
51
|
+
*/
|
|
15
52
|
speed?: number
|
|
53
|
+
/**
|
|
54
|
+
* Reveal only on interaction. `'hover'` is pointer-only; `'press'` works on touch. Combine via an array. Omit for
|
|
55
|
+
* always-on.
|
|
56
|
+
*/
|
|
16
57
|
revealOn?: GradientGlowTrigger | GradientGlowTrigger[]
|
|
58
|
+
/** Controlled visibility for programmatic states (loading, etc.); OR-ed with `revealOn`. */
|
|
17
59
|
reveal?: boolean
|
|
60
|
+
/**
|
|
61
|
+
* With `revealOn="hover"`, keep the glow visible on touch devices (which have no hover) instead of hidden.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
18
64
|
showOnTouch?: boolean
|
|
65
|
+
/**
|
|
66
|
+
* Scale the glow down while pressed, to track a child `Button`'s own active-press scale.
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
19
69
|
pressScale?: boolean
|
|
20
70
|
}
|
|
21
71
|
|
|
@@ -36,6 +86,7 @@ function GradientGlow({
|
|
|
36
86
|
to = '#FFD69B',
|
|
37
87
|
angle = 95,
|
|
38
88
|
blur = 'lg',
|
|
89
|
+
glow = true,
|
|
39
90
|
border = false,
|
|
40
91
|
borderWidth = 1,
|
|
41
92
|
speed = 4,
|
|
@@ -95,16 +146,18 @@ function GradientGlow({
|
|
|
95
146
|
style={{ '--gradient-glow-duration': `${speed}s`, ...style } as React.CSSProperties}
|
|
96
147
|
{...props}
|
|
97
148
|
>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
149
|
+
{glow ? (
|
|
150
|
+
<span
|
|
151
|
+
aria-hidden
|
|
152
|
+
data-slot="gradient-glow-aura"
|
|
153
|
+
className={cn(
|
|
154
|
+
'motion-safe:animate-gradient-glow-aura pointer-events-none absolute inset-0 -z-10 rounded-[inherit] opacity-(--gradient-glow-opacity)',
|
|
155
|
+
BLUR_CLASS[blur],
|
|
156
|
+
layerClasses,
|
|
157
|
+
)}
|
|
158
|
+
style={{ background: gradient }}
|
|
159
|
+
/>
|
|
160
|
+
) : null}
|
|
108
161
|
{children}
|
|
109
162
|
{border ? (
|
|
110
163
|
<span
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority'
|
|
2
|
-
import { cn } from '../../utils'
|
|
2
|
+
import { cn } from '../../internal/utils'
|
|
3
3
|
|
|
4
4
|
const inputVariants = cva(
|
|
5
5
|
'w-full border text-foreground outline-none transition-[background-color,border-color,box-shadow] duration-200 motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:shrink-0',
|
|
@@ -3,20 +3,40 @@
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { Input as BaseInput } from '@base-ui/react/input'
|
|
5
5
|
import { type VariantProps } from 'class-variance-authority'
|
|
6
|
-
import { cn, useComposedRefs } from '../../utils'
|
|
6
|
+
import { cn, useComposedRefs } from '../../internal/utils'
|
|
7
7
|
import { inputVariants } from './input-variants'
|
|
8
8
|
|
|
9
9
|
type InputVariant = NonNullable<VariantProps<typeof inputVariants>['variant']>
|
|
10
10
|
type InputSize = NonNullable<VariantProps<typeof inputVariants>['size']>
|
|
11
11
|
|
|
12
12
|
interface InputProps extends Omit<React.ComponentProps<typeof BaseInput>, 'size'> {
|
|
13
|
+
/**
|
|
14
|
+
* Field appearance - bordered or filled.
|
|
15
|
+
* @default 'outline'
|
|
16
|
+
*/
|
|
13
17
|
variant?: InputVariant
|
|
18
|
+
/**
|
|
19
|
+
* Scales height, padding, and text. Named `inputSize` to avoid the native `size` attribute.
|
|
20
|
+
* @default 'md'
|
|
21
|
+
*/
|
|
14
22
|
inputSize?: InputSize
|
|
23
|
+
/**
|
|
24
|
+
* Show a clear (✕) button once the field has a value.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
15
27
|
clearable?: boolean
|
|
28
|
+
/** Adornment rendered before the field, inside the frame. */
|
|
16
29
|
startSlot?: React.ReactNode
|
|
30
|
+
/** Adornment rendered after the field, inside the frame. */
|
|
17
31
|
endSlot?: React.ReactNode
|
|
32
|
+
/** Called when the clear button is pressed. */
|
|
18
33
|
onClear?: () => void
|
|
19
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Props for the inner `<input>` (its own `className`, handlers, the native `size`
|
|
36
|
+
* attribute, …). `size` here is the character count the control is intrinsically wide,
|
|
37
|
+
* not the scale - that is `inputSize`.
|
|
38
|
+
*/
|
|
39
|
+
inputProps?: React.ComponentProps<typeof BaseInput>
|
|
20
40
|
}
|
|
21
41
|
|
|
22
42
|
function setNativeValue(input: HTMLInputElement, value: string) {
|
|
@@ -78,7 +98,7 @@ function Input({
|
|
|
78
98
|
{...(invalid ? { 'data-invalid': '' } : {})}
|
|
79
99
|
>
|
|
80
100
|
{startSlot && (
|
|
81
|
-
<div data-slot="input-start" className="-ms-1 shrink-0">
|
|
101
|
+
<div data-slot="input-start" className="-ms-1 flex shrink-0 items-center">
|
|
82
102
|
{startSlot}
|
|
83
103
|
</div>
|
|
84
104
|
)}
|
|
@@ -108,7 +128,7 @@ function Input({
|
|
|
108
128
|
</button>
|
|
109
129
|
)}
|
|
110
130
|
{endSlot && (
|
|
111
|
-
<div data-slot="input-end" className="-me-1 shrink-0">
|
|
131
|
+
<div data-slot="input-end" className="-me-1 flex shrink-0 items-center">
|
|
112
132
|
{endSlot}
|
|
113
133
|
</div>
|
|
114
134
|
)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import { cn } from '../../utils'
|
|
2
|
+
import { cn } from '../../internal/utils'
|
|
3
3
|
|
|
4
4
|
type KbdSize = 'sm' | 'md' | 'lg'
|
|
5
5
|
|
|
@@ -10,6 +10,10 @@ const SIZE_CLASSES: Record<KbdSize, string> = {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
interface KbdProps extends React.ComponentProps<'kbd'> {
|
|
13
|
+
/**
|
|
14
|
+
* Height, padding, and text scale. Inherited from a `KbdGroup`.
|
|
15
|
+
* @default 'md'
|
|
16
|
+
*/
|
|
13
17
|
size?: KbdSize
|
|
14
18
|
}
|
|
15
19
|
|
|
@@ -29,6 +33,10 @@ function Kbd({ className, size = 'md', ...props }: KbdProps) {
|
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
interface KbdGroupProps extends React.ComponentProps<'span'> {
|
|
36
|
+
/**
|
|
37
|
+
* Default size applied to each child `Kbd` that doesn't set its own.
|
|
38
|
+
* @default 'md'
|
|
39
|
+
*/
|
|
32
40
|
size?: KbdSize
|
|
33
41
|
}
|
|
34
42
|
|
|
@@ -3,12 +3,20 @@
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { LazyMotion, domAnimation, m } from 'motion/react'
|
|
5
5
|
import { useReducedMotion } from '../../hooks/use-reduced-motion'
|
|
6
|
-
import { cn } from '../../utils'
|
|
6
|
+
import { cn } from '../../internal/utils'
|
|
7
7
|
|
|
8
8
|
type LoaderVariant = 'bar' | 'dots'
|
|
9
9
|
|
|
10
10
|
interface LoaderProps extends Omit<React.ComponentProps<'span'>, 'children'> {
|
|
11
|
+
/**
|
|
12
|
+
* The animated shape.
|
|
13
|
+
* @default 'bar'
|
|
14
|
+
*/
|
|
11
15
|
variant?: LoaderVariant
|
|
16
|
+
/**
|
|
17
|
+
* Inherit the surrounding text color (`currentColor`) instead of the primary accent.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
12
20
|
currentColor?: boolean
|
|
13
21
|
}
|
|
14
22
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { Menubar as BaseMenubar } from '@base-ui/react/menubar'
|
|
5
|
-
import { cn } from '../../utils'
|
|
5
|
+
import { cn } from '../../internal/utils'
|
|
6
6
|
import { navigationLinkVariants } from '../navigation/navigation-link-variants'
|
|
7
7
|
import {
|
|
8
8
|
DropdownMenu,
|
|
@@ -44,7 +44,15 @@ function useMenubarContext() {
|
|
|
44
44
|
type BaseMenubarRootProps = React.ComponentProps<typeof BaseMenubar>
|
|
45
45
|
|
|
46
46
|
interface MenubarProps extends BaseMenubarRootProps {
|
|
47
|
+
/**
|
|
48
|
+
* Trigger appearance - hover/active pill, or an animated underline.
|
|
49
|
+
* @default 'pill'
|
|
50
|
+
*/
|
|
47
51
|
variant?: MenubarVariant
|
|
52
|
+
/**
|
|
53
|
+
* Scales the triggers, popups, and items together.
|
|
54
|
+
* @default 'md'
|
|
55
|
+
*/
|
|
48
56
|
size?: MenubarSize
|
|
49
57
|
}
|
|
50
58
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { Meter as BaseMeter } from '@base-ui/react/meter'
|
|
5
|
-
import { cn } from '../../utils'
|
|
5
|
+
import { cn } from '../../internal/utils'
|
|
6
6
|
|
|
7
7
|
type MeterStatus = 'optimum' | 'suboptimum' | 'invalid'
|
|
8
8
|
|
|
@@ -31,9 +31,13 @@ function useMeterContext() {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
interface MeterProps extends BaseMeter.Root.Props {
|
|
34
|
+
/** Upper edge of the "low" zone. Enables status coloring. */
|
|
34
35
|
low?: number
|
|
36
|
+
/** Lower edge of the "high" zone. Enables status coloring. */
|
|
35
37
|
high?: number
|
|
38
|
+
/** The ideal value; the zone it lands in becomes the green "optimum" zone. Enables status coloring. */
|
|
36
39
|
optimum?: number
|
|
40
|
+
/** Override the indicator background class per status (and the no-threshold `default`). */
|
|
37
41
|
statusClassNames?: MeterStatusClassNames
|
|
38
42
|
}
|
|
39
43
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { mergeProps } from '@base-ui/react/merge-props'
|
|
5
5
|
import { useRender } from '@base-ui/react/use-render'
|
|
6
|
-
import { cn, focusableProps } from '../../utils'
|
|
6
|
+
import { cn, focusableProps } from '../../internal/utils'
|
|
7
7
|
import { navigationLinkVariants } from './navigation-link-variants'
|
|
8
8
|
import {
|
|
9
9
|
useNavigationContext,
|
|
@@ -19,12 +19,34 @@ type NavigationLinkState = {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
interface NavigationLinkProps extends useRender.ComponentProps<'a', NavigationLinkState> {
|
|
22
|
+
/**
|
|
23
|
+
* Override the root's variant for this link.
|
|
24
|
+
* @default root
|
|
25
|
+
*/
|
|
22
26
|
variant?: NavigationVariant
|
|
27
|
+
/**
|
|
28
|
+
* Override the root's size for this link.
|
|
29
|
+
* @default root
|
|
30
|
+
*/
|
|
23
31
|
size?: NavigationSize
|
|
32
|
+
/**
|
|
33
|
+
* Override the root's orientation for this link.
|
|
34
|
+
* @default root
|
|
35
|
+
*/
|
|
24
36
|
orientation?: NavigationOrientation
|
|
37
|
+
/** Force the active state, overriding `activeLink`. */
|
|
25
38
|
active?: boolean
|
|
39
|
+
/**
|
|
40
|
+
* Dim the link and remove it from the tab order.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
26
43
|
disabled?: boolean
|
|
44
|
+
/** Matched against the root's `activeLink` to mark this link current. */
|
|
27
45
|
value?: Exclude<NavigationActiveLink, null>
|
|
46
|
+
/**
|
|
47
|
+
* Custom marker for the `indicator` variant.
|
|
48
|
+
* @default chevron
|
|
49
|
+
*/
|
|
28
50
|
indicator?: React.ReactNode
|
|
29
51
|
}
|
|
30
52
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import * as React from 'react'
|
|
4
|
-
import { cn } from '../../utils'
|
|
4
|
+
import { cn } from '../../internal/utils'
|
|
5
5
|
import {
|
|
6
6
|
NavigationContext,
|
|
7
7
|
useNavigationContext,
|
|
@@ -12,14 +12,34 @@ import {
|
|
|
12
12
|
} from './navigation-context'
|
|
13
13
|
|
|
14
14
|
type NavigationBaseProps = Omit<React.ComponentPropsWithoutRef<'nav'>, 'aria-orientation'> & {
|
|
15
|
+
/**
|
|
16
|
+
* Scales link text, padding, and icons.
|
|
17
|
+
* @default 'md'
|
|
18
|
+
*/
|
|
15
19
|
size?: NavigationSize
|
|
20
|
+
/**
|
|
21
|
+
* The `value` of the current link. Stamps the match with `aria-current="page"`.
|
|
22
|
+
* @default null
|
|
23
|
+
*/
|
|
16
24
|
activeLink?: NavigationActiveLink
|
|
17
25
|
}
|
|
18
26
|
|
|
27
|
+
// `orientation` discriminates the union, so both branches repeat the same prop
|
|
28
|
+
// docs - TypeScript surfaces whichever branch the consumer's usage narrows to.
|
|
19
29
|
type NavigationProps = NavigationBaseProps &
|
|
20
30
|
(
|
|
21
|
-
| {
|
|
22
|
-
|
|
31
|
+
| {
|
|
32
|
+
/** Lay the links out as a row or a column. @default 'horizontal' */
|
|
33
|
+
orientation?: 'horizontal'
|
|
34
|
+
/** Active/hover styling. `indicator` is vertical-only. @default 'pill' */
|
|
35
|
+
variant?: Extract<NavigationVariant, 'pill' | 'line'>
|
|
36
|
+
}
|
|
37
|
+
| {
|
|
38
|
+
/** Lay the links out as a row or a column. @default 'horizontal' */
|
|
39
|
+
orientation: 'vertical'
|
|
40
|
+
/** Active/hover styling. `indicator` is vertical-only. @default 'pill' */
|
|
41
|
+
variant?: Extract<NavigationVariant, 'pill' | 'line' | 'indicator'>
|
|
42
|
+
}
|
|
23
43
|
)
|
|
24
44
|
|
|
25
45
|
function Navigation({
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { NavigationMenu as BaseNavigationMenu } from '@base-ui/react/navigation-menu'
|
|
5
5
|
import { useDirection } from '../../hooks/use-direction'
|
|
6
|
-
import { cn } from '../../utils'
|
|
6
|
+
import { cn } from '../../internal/utils'
|
|
7
7
|
import { navigationLinkVariants } from '../navigation/navigation-link-variants'
|
|
8
8
|
|
|
9
9
|
type NavigationMenuVariant = 'pill' | 'line'
|
|
@@ -35,12 +35,40 @@ const NavigationMenuContentContext = React.createContext(false)
|
|
|
35
35
|
type BaseRootProps = React.ComponentProps<typeof BaseNavigationMenu.Root>
|
|
36
36
|
|
|
37
37
|
interface NavigationMenuProps extends BaseRootProps {
|
|
38
|
+
/**
|
|
39
|
+
* Trigger appearance - hover/active pill, or an animated underline.
|
|
40
|
+
* @default 'pill'
|
|
41
|
+
*/
|
|
38
42
|
variant?: NavigationMenuVariant
|
|
43
|
+
/**
|
|
44
|
+
* Scales triggers, popup radius, and link padding.
|
|
45
|
+
* @default 'md'
|
|
46
|
+
*/
|
|
39
47
|
size?: NavigationMenuSize
|
|
48
|
+
/**
|
|
49
|
+
* The open/close indicator shown by each `NavigationMenuIcon`.
|
|
50
|
+
* @default 'chevron'
|
|
51
|
+
*/
|
|
40
52
|
icon?: NavigationMenuIconKind
|
|
53
|
+
/**
|
|
54
|
+
* Render a dimmed, blurred backdrop behind the open panel.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
41
57
|
backdrop?: boolean
|
|
58
|
+
/**
|
|
59
|
+
* Auto-render the portalled positioner + popup. Set `false` to render your own.
|
|
60
|
+
* @default true
|
|
61
|
+
*/
|
|
42
62
|
viewport?: boolean
|
|
63
|
+
/**
|
|
64
|
+
* Animate the popup's size and position between items.
|
|
65
|
+
* @default true
|
|
66
|
+
*/
|
|
43
67
|
morph?: boolean
|
|
68
|
+
/**
|
|
69
|
+
* Gap between the trigger and the auto-rendered popup.
|
|
70
|
+
* @default 6
|
|
71
|
+
*/
|
|
44
72
|
sideOffset?: number
|
|
45
73
|
}
|
|
46
74
|
|
|
@@ -138,6 +166,10 @@ const ICON_SIZE: Record<NavigationMenuSize, string> = {
|
|
|
138
166
|
}
|
|
139
167
|
|
|
140
168
|
type NavigationMenuIconProps = Omit<React.ComponentProps<typeof BaseNavigationMenu.Icon>, 'children'> & {
|
|
169
|
+
/**
|
|
170
|
+
* Override the indicator for this trigger.
|
|
171
|
+
* @default root
|
|
172
|
+
*/
|
|
141
173
|
icon?: NavigationMenuIconKind
|
|
142
174
|
}
|
|
143
175
|
|
|
@@ -241,6 +273,7 @@ type PositionerPicks = Pick<
|
|
|
241
273
|
type PortalPicks = Pick<React.ComponentProps<typeof BaseNavigationMenu.Portal>, 'container'>
|
|
242
274
|
|
|
243
275
|
interface NavigationMenuPositionerProps extends PositionerPicks, PortalPicks {
|
|
276
|
+
/** Extra classes, merged via `tailwind-merge`. */
|
|
244
277
|
className?: string
|
|
245
278
|
}
|
|
246
279
|
|
|
@@ -4,7 +4,7 @@ import * as React from 'react'
|
|
|
4
4
|
import { NumberField as BaseNumberField, type NumberFieldRoot } from '@base-ui/react/number-field'
|
|
5
5
|
import { type VariantProps } from 'class-variance-authority'
|
|
6
6
|
import { AnimatePresence, LazyMotion, domAnimation, m } from 'motion/react'
|
|
7
|
-
import { cn } from '../../utils'
|
|
7
|
+
import { cn } from '../../internal/utils'
|
|
8
8
|
import { useReducedMotion } from '../../hooks/use-reduced-motion'
|
|
9
9
|
import { buttonVariants } from '../button/button-variants'
|
|
10
10
|
import { inputVariants } from '../input/input-variants'
|
|
@@ -84,10 +84,24 @@ function AnimatedNumber({ value, direction }: { value: string; direction: AnimDi
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
interface NumberFieldProps extends Omit<React.ComponentProps<typeof BaseNumberField.Root>, 'className'> {
|
|
87
|
+
/**
|
|
88
|
+
* Field appearance - bordered or filled.
|
|
89
|
+
* @default 'outline'
|
|
90
|
+
*/
|
|
87
91
|
variant?: NumberFieldVariant
|
|
92
|
+
/**
|
|
93
|
+
* Scales field width, steppers, and text.
|
|
94
|
+
* @default 'md'
|
|
95
|
+
*/
|
|
88
96
|
size?: NumberFieldSize
|
|
97
|
+
/** Extra classes on the field root, merged via `tailwind-merge`. */
|
|
89
98
|
className?: string
|
|
99
|
+
/**
|
|
100
|
+
* Placeholder text shown when empty.
|
|
101
|
+
* @default ' '
|
|
102
|
+
*/
|
|
90
103
|
placeholder?: string
|
|
104
|
+
/** Props forwarded to the inner `<input>` (`name`, `onChange`, `aria-*`, `className`, …). */
|
|
91
105
|
inputProps?: React.ComponentProps<typeof BaseNumberField.Input>
|
|
92
106
|
}
|
|
93
107
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { OTPField as BaseOTPField } from '@base-ui/react/otp-field'
|
|
5
5
|
import { type VariantProps } from 'class-variance-authority'
|
|
6
|
-
import { cn } from '../../utils'
|
|
6
|
+
import { cn } from '../../internal/utils'
|
|
7
7
|
import { inputVariants } from '../input/input-variants'
|
|
8
8
|
|
|
9
9
|
type OTPFieldVariant = NonNullable<VariantProps<typeof inputVariants>['variant']>
|
|
@@ -37,8 +37,17 @@ const SEPARATOR_SIZE: Record<OTPFieldSize, string> = {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
interface OTPFieldProps extends Omit<React.ComponentProps<typeof BaseOTPField.Root>, 'className'> {
|
|
40
|
+
/**
|
|
41
|
+
* Slot appearance - bordered or filled.
|
|
42
|
+
* @default 'outline'
|
|
43
|
+
*/
|
|
40
44
|
variant?: OTPFieldVariant
|
|
45
|
+
/**
|
|
46
|
+
* Scales every slot.
|
|
47
|
+
* @default 'md'
|
|
48
|
+
*/
|
|
41
49
|
size?: OTPFieldSize
|
|
50
|
+
/** Extra classes on the root, merged via `tailwind-merge`. */
|
|
42
51
|
className?: string
|
|
43
52
|
}
|
|
44
53
|
|