@appica/ui-react 1.0.0 → 1.1.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 +46 -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 +1 -1
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/alert/alert.d.ts +29 -1
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +1 -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 +9 -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 +2 -2
- package/dist/components/autocomplete/autocomplete.js.map +1 -1
- package/dist/components/avatar/avatar.d.ts +16 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/background-pattern/background-pattern-interactive.js +1 -1
- package/dist/components/background-pattern/background-pattern-interactive.js.map +1 -1
- package/dist/components/background-pattern/background-pattern-shared.js +1 -1
- 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 +1 -1
- package/dist/components/background-pattern/background-pattern.js.map +1 -1
- package/dist/components/badge/badge.d.ts +11 -1
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +1 -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 +67 -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 +1 -1
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/button/button-variants.js +1 -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 +1 -1
- package/dist/components/button/button.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 +1 -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 +1 -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 +103 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/carousel/carousel.d.ts +105 -5
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- package/dist/components/carousel/carousel.js +157 -5
- package/dist/components/carousel/carousel.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +1 -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 +1 -1
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/components/chip/chip.d.ts +32 -0
- package/dist/components/chip/chip.d.ts.map +1 -1
- package/dist/components/chip/chip.js +1 -1
- package/dist/components/chip/chip.js.map +1 -1
- package/dist/components/collapsible/collapsible.js +1 -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 +245 -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 +327 -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 +216 -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 +66 -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 +202 -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 +2 -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 +5 -5
- package/dist/components/context-menu/context-menu.js.map +1 -1
- package/dist/components/copy-button/copy-button.d.ts +15 -0
- package/dist/components/copy-button/copy-button.d.ts.map +1 -1
- package/dist/components/copy-button/copy-button.js +1 -1
- 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 +1 -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 +1 -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 +1 -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 +8 -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 +13 -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 +5 -5
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/field/field.js +1 -1
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/fieldset/fieldset.js +1 -1
- package/dist/components/fieldset/fieldset.js.map +1 -1
- package/dist/components/gradient-glow/gradient-glow.d.ts +45 -0
- package/dist/components/gradient-glow/gradient-glow.d.ts.map +1 -1
- package/dist/components/gradient-glow/gradient-glow.js +1 -1
- package/dist/components/gradient-glow/gradient-glow.js.map +1 -1
- package/dist/components/input/input-variants.js +1 -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 +3 -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 +1 -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 +1 -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 +1 -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 +1 -1
- package/dist/components/meter/meter.js.map +1 -1
- package/dist/components/navigation/navigation-link-variants.d.ts +1 -1
- package/dist/components/navigation/navigation-link-variants.js +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +2 -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 +2 -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 +1 -1
- package/dist/components/progress/progress.js.map +1 -1
- package/dist/components/radio/radio.js +1 -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 +1 -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 +301 -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 +1 -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 +2 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -1
- package/dist/components/spinner/spinner.js.map +1 -1
- package/dist/components/switch/switch.d.ts +4 -0
- package/dist/components/switch/switch.d.ts.map +1 -1
- package/dist/components/switch/switch.js +1 -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 +1 -1
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +31 -1
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +1 -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 +26 -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 +1 -1
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/thumbnail/thumbnail.d.ts +20 -0
- package/dist/components/thumbnail/thumbnail.d.ts.map +1 -1
- package/dist/components/thumbnail/thumbnail.js +1 -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 +1 -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 +1 -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 +1 -1
- package/dist/components/toc/toc.js.map +1 -1
- package/dist/components/toggle-group/toggle-group.js +1 -1
- package/dist/components/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/toolbar/toolbar.js +1 -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 +2 -2
- package/dist/components/tooltip/tooltip.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.map +1 -1
- package/dist/hooks/use-local-storage.js.map +1 -1
- package/dist/hooks/use-reduced-motion.d.ts +1 -1
- 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.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -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 +78 -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 +34 -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 +41 -0
- package/dist/internal/color-picker-context.js.map +1 -0
- package/dist/{floating.d.ts → internal/floating.d.ts} +1 -1
- package/dist/internal/floating.d.ts.map +1 -0
- package/dist/internal/floating.js.map +1 -0
- package/dist/{modal.d.ts → internal/modal.d.ts} +1 -1
- package/dist/internal/modal.d.ts.map +1 -0
- package/dist/internal/modal.js.map +1 -0
- package/dist/internal/utils.d.ts.map +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 +328 -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.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.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.map +1 -1
- package/dist/providers/theme-provider/theme-script.js.map +1 -1
- package/package.json +75 -17
- 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 +1 -1
- package/src/components/background-pattern/background-pattern-shared.tsx +1 -1
- package/src/components/background-pattern/background-pattern.test.tsx +1 -1
- package/src/components/background-pattern/background-pattern.tsx +14 -6
- 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 +155 -0
- package/src/components/carousel/carousel.tsx +305 -5
- 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.tsx +11 -5
- package/src/components/copy-button/copy-button.test.tsx +1 -1
- package/src/components/copy-button/copy-button.tsx +16 -1
- 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.tsx +11 -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 +1 -1
- package/src/components/gradient-glow/gradient-glow.tsx +46 -1
- 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/dist/{floating.js → internal/floating.js} +0 -0
- /package/dist/{modal.js → internal/modal.js} +0 -0
- /package/dist/{utils.d.ts → internal/utils.d.ts} +0 -0
- /package/dist/{utils.js → internal/utils.js} +0 -0
- /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,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
|
|
|
@@ -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 { buttonVariants } from '../button/button-variants'
|
|
8
8
|
|
|
9
9
|
type PaginationVariant = 'outline' | 'soft'
|
|
@@ -25,7 +25,15 @@ function usePaginationContext() {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
interface PaginationProps extends React.ComponentPropsWithoutRef<'nav'> {
|
|
28
|
+
/**
|
|
29
|
+
* Link style, shared with every link via context.
|
|
30
|
+
* @default 'outline'
|
|
31
|
+
*/
|
|
28
32
|
variant?: PaginationVariant
|
|
33
|
+
/**
|
|
34
|
+
* Link sizing, shared via context.
|
|
35
|
+
* @default 'md'
|
|
36
|
+
*/
|
|
29
37
|
size?: PaginationSize
|
|
30
38
|
}
|
|
31
39
|
|
|
@@ -65,7 +73,15 @@ type PaginationLinkState = {
|
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
interface PaginationLinkProps extends useRender.ComponentProps<'a', PaginationLinkState> {
|
|
76
|
+
/**
|
|
77
|
+
* Mark the current page. Renders a non-interactive, filled link with `aria-current="page"`.
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
68
80
|
active?: boolean
|
|
81
|
+
/**
|
|
82
|
+
* Make the link non-interactive and dimmed (`aria-disabled`); used for out-of-range controls.
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
69
85
|
disabled?: boolean
|
|
70
86
|
}
|
|
71
87
|
|
|
@@ -48,7 +48,7 @@ describe('Popover', () => {
|
|
|
48
48
|
</Popover>,
|
|
49
49
|
)
|
|
50
50
|
// Never opened, yet present in the DOM (hidden) so a consumer's animated
|
|
51
|
-
// content doesn't re-mount
|
|
51
|
+
// content doesn't re-mount - and re-animate - on every open.
|
|
52
52
|
expect(document.querySelector('[data-slot="popover-content"]')).not.toBeNull()
|
|
53
53
|
expect(screen.getByText('Always in the DOM')).toBeInTheDocument()
|
|
54
54
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { Popover as BasePopover } from '@base-ui/react/popover'
|
|
3
|
-
import { cn } from '../../utils'
|
|
4
|
-
import { type FloatingContentProps, splitFloatingProps } from '../../floating'
|
|
3
|
+
import { cn } from '../../internal/utils'
|
|
4
|
+
import { type FloatingContentProps, splitFloatingProps } from '../../internal/floating'
|
|
5
5
|
|
|
6
6
|
type PopoverProps = React.ComponentProps<typeof BasePopover.Root>
|
|
7
7
|
|
|
@@ -23,6 +23,10 @@ type PopoverContentProps = React.ComponentProps<typeof BasePopover.Popup> &
|
|
|
23
23
|
React.ComponentProps<typeof BasePopover.Positioner>,
|
|
24
24
|
React.ComponentProps<typeof BasePopover.Portal>
|
|
25
25
|
> & {
|
|
26
|
+
/**
|
|
27
|
+
* Render the pointer and the thicker anchored border.
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
26
30
|
arrow?: boolean
|
|
27
31
|
}
|
|
28
32
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { PreviewCard as BasePreviewCard } from '@base-ui/react/preview-card'
|
|
3
|
-
import { cn } from '../../utils'
|
|
4
|
-
import { type FloatingContentProps, splitFloatingProps } from '../../floating'
|
|
3
|
+
import { cn } from '../../internal/utils'
|
|
4
|
+
import { type FloatingContentProps, splitFloatingProps } from '../../internal/floating'
|
|
5
5
|
|
|
6
6
|
type PreviewCardProps = React.ComponentProps<typeof BasePreviewCard.Root>
|
|
7
7
|
|
|
@@ -23,6 +23,10 @@ type PreviewCardContentProps = React.ComponentProps<typeof BasePreviewCard.Popup
|
|
|
23
23
|
React.ComponentProps<typeof BasePreviewCard.Positioner>,
|
|
24
24
|
React.ComponentProps<typeof BasePreviewCard.Portal>
|
|
25
25
|
> & {
|
|
26
|
+
/**
|
|
27
|
+
* Render the pointer and the thicker anchored border.
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
26
30
|
arrow?: boolean
|
|
27
31
|
}
|
|
28
32
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { Progress as BaseProgress } from '@base-ui/react/progress'
|
|
3
|
-
import { cn } from '../../utils'
|
|
3
|
+
import { cn } from '../../internal/utils'
|
|
4
4
|
|
|
5
5
|
type ProgressVariant = 'bar' | 'circular'
|
|
6
6
|
|
|
@@ -8,10 +8,27 @@ type ProgressLabelProps = BaseProgress.Label.Props
|
|
|
8
8
|
type ProgressValueProps = BaseProgress.Value.Props
|
|
9
9
|
|
|
10
10
|
interface ProgressProps extends Omit<BaseProgress.Root.Props, 'value'> {
|
|
11
|
+
/**
|
|
12
|
+
* Horizontal track or SVG ring.
|
|
13
|
+
* @default 'bar'
|
|
14
|
+
*/
|
|
11
15
|
variant?: ProgressVariant
|
|
16
|
+
/**
|
|
17
|
+
* Diameter of the ring in pixels (`circular` only).
|
|
18
|
+
* @default 56
|
|
19
|
+
*/
|
|
12
20
|
size?: number
|
|
21
|
+
/**
|
|
22
|
+
* Track weight in pixels. Defaults to `6` for `bar`, `4` for `circular`.
|
|
23
|
+
* @default 6` / `4
|
|
24
|
+
*/
|
|
13
25
|
thickness?: number
|
|
26
|
+
/**
|
|
27
|
+
* Any CSS color for the fill (e.g. `var(--success-emphasis)`).
|
|
28
|
+
* @default primary token
|
|
29
|
+
*/
|
|
14
30
|
indicatorColor?: string
|
|
31
|
+
/** Current value, from `min` to `max`. Pass `null` for an indeterminate state. */
|
|
15
32
|
value?: number | null
|
|
16
33
|
}
|
|
17
34
|
|
|
@@ -104,7 +104,7 @@ describe('Radio', () => {
|
|
|
104
104
|
expect(onValueChange).not.toHaveBeenCalled()
|
|
105
105
|
})
|
|
106
106
|
|
|
107
|
-
it('
|
|
107
|
+
it('honors controlled value', async () => {
|
|
108
108
|
const user = userEvent.setup()
|
|
109
109
|
const onValueChange = vi.fn()
|
|
110
110
|
render(
|
|
@@ -4,7 +4,7 @@ import * as React from 'react'
|
|
|
4
4
|
import { Radio as BaseRadio } from '@base-ui/react/radio'
|
|
5
5
|
import { LazyMotion, domAnimation, m, useAnimate } from 'motion/react'
|
|
6
6
|
import { useReducedMotion } from '../../hooks/use-reduced-motion'
|
|
7
|
-
import { cn, useComposedRefs } from '../../utils'
|
|
7
|
+
import { cn, useComposedRefs } from '../../internal/utils'
|
|
8
8
|
|
|
9
9
|
const SQUISH_TRANSITION = {
|
|
10
10
|
duration: 0.3,
|
|
@@ -62,7 +62,7 @@ describe('RadioGroup', () => {
|
|
|
62
62
|
</RadioGroup>,
|
|
63
63
|
)
|
|
64
64
|
const group = screen.getByTestId('group')
|
|
65
|
-
// tailwind-merge dedupes conflicting display utilities
|
|
65
|
+
// tailwind-merge dedupes conflicting display utilities - `grid` wins over `flex`.
|
|
66
66
|
expect(group.className).toContain('grid')
|
|
67
67
|
expect(group.className).toContain('grid-cols-2')
|
|
68
68
|
expect(group.className).not.toMatch(/(^|\s)flex(\s|$)/)
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { RadioGroup as BaseRadioGroup } from '@base-ui/react/radio-group'
|
|
3
|
-
import { cn } from '../../utils'
|
|
3
|
+
import { cn } from '../../internal/utils'
|
|
4
4
|
|
|
5
5
|
interface RadioGroupProps extends React.ComponentProps<typeof BaseRadioGroup> {
|
|
6
|
+
/**
|
|
7
|
+
* Lay options out in a row or column; sets which arrow keys move selection.
|
|
8
|
+
* @default 'vertical'
|
|
9
|
+
*/
|
|
6
10
|
orientation?: 'horizontal' | 'vertical'
|
|
7
11
|
}
|
|
8
12
|
|