@arolariu/components 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/EXAMPLES.md +2510 -0
- package/dist/components/ui/accordion.js +3 -3
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/accordion_module.css.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +4 -16
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +21 -17
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert-dialog_module.css +1 -1
- package/dist/components/ui/alert-dialog_module.css.map +1 -1
- package/dist/components/ui/alert.js +4 -4
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/alert_module.css.map +1 -1
- package/dist/components/ui/aspect-ratio.js +2 -2
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/aspect-ratio_module.css.map +1 -1
- package/dist/components/ui/async-boundary.js +2 -2
- package/dist/components/ui/async-boundary.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +3 -12
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +18 -15
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/avatar_module.css.map +1 -1
- package/dist/components/ui/background-beams.js +3 -3
- package/dist/components/ui/background-beams.js.map +1 -1
- package/dist/components/ui/background-beams_module.css.map +1 -1
- package/dist/components/ui/badge.js +2 -2
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/badge_module.css.map +1 -1
- package/dist/components/ui/breadcrumb.js +10 -10
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/breadcrumb_module.css.map +1 -1
- package/dist/components/ui/bubble-background.js +5 -5
- package/dist/components/ui/bubble-background.js.map +1 -1
- package/dist/components/ui/bubble-background_module.css.map +1 -1
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button-group.d.ts.map +1 -1
- package/dist/components/ui/button-group.js +6 -6
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button-group_module.css.map +1 -1
- package/dist/components/ui/button.js +4 -4
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/button_module.css.map +1 -1
- package/dist/components/ui/calendar.d.ts +3 -5
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +9 -9
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/calendar_module.css.map +1 -1
- package/dist/components/ui/card-skeleton.js +2 -2
- package/dist/components/ui/card-skeleton.js.map +1 -1
- package/dist/components/ui/card-skeleton_module.css.map +1 -1
- package/dist/components/ui/card.js +8 -8
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/card_module.css.map +1 -1
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +16 -16
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/carousel_module.css +1 -1
- package/dist/components/ui/carousel_module.css.map +1 -1
- package/dist/components/ui/chart.d.ts +6 -3
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +70 -70
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/chart_module.css.map +1 -1
- package/dist/components/ui/checkbox-group.d.ts +2 -6
- package/dist/components/ui/checkbox-group.d.ts.map +1 -1
- package/dist/components/ui/checkbox-group.js +8 -7
- package/dist/components/ui/checkbox-group.js.map +1 -1
- package/dist/components/ui/checkbox-group_module.css.map +1 -1
- package/dist/components/ui/checkbox.d.ts +3 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +6 -3
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/checkbox_module.css.map +1 -1
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +4 -4
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/collapsible_module.css.map +1 -1
- package/dist/components/ui/combobox.d.ts +335 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +206 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/combobox.module.js +23 -0
- package/dist/components/ui/combobox.module.js.map +1 -0
- package/dist/components/ui/combobox_module.css +142 -0
- package/dist/components/ui/combobox_module.css.map +1 -0
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +62 -53
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/command_module.css +1 -1
- package/dist/components/ui/command_module.css.map +1 -1
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +6 -6
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/context-menu_module.css.map +1 -1
- package/dist/components/ui/copy-button.js +6 -6
- package/dist/components/ui/copy-button.js.map +1 -1
- package/dist/components/ui/copy-button_module.css.map +1 -1
- package/dist/components/ui/counting-number.js +6 -6
- package/dist/components/ui/counting-number.js.map +1 -1
- package/dist/components/ui/counting-number_module.css.map +1 -1
- package/dist/components/ui/dialog.js +6 -6
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dialog_module.css +1 -1
- package/dist/components/ui/dialog_module.css.map +1 -1
- package/dist/components/ui/dot-background_module.css.map +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +5 -5
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/drawer_module.css.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +6 -6
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu_module.css.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +10 -16
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +73 -65
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/dropdrawer_module.css.map +1 -1
- package/dist/components/ui/empty.js +7 -7
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/empty_module.css.map +1 -1
- package/dist/components/ui/error-boundary.js +2 -2
- package/dist/components/ui/error-boundary.js.map +1 -1
- package/dist/components/ui/error-boundary_module.css.map +1 -1
- package/dist/components/ui/field.js +12 -12
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/field_module.css.map +1 -1
- package/dist/components/ui/fireworks-background.js +6 -6
- package/dist/components/ui/fireworks-background.js.map +1 -1
- package/dist/components/ui/fireworks-background_module.css.map +1 -1
- package/dist/components/ui/flip-button.js +5 -5
- package/dist/components/ui/flip-button.js.map +1 -1
- package/dist/components/ui/flip-button_module.css.map +1 -1
- package/dist/components/ui/focus-scope.js +6 -6
- package/dist/components/ui/focus-scope.js.map +1 -1
- package/dist/components/ui/focus-scope_module.css.map +1 -1
- package/dist/components/ui/form-skeleton.js +2 -2
- package/dist/components/ui/form-skeleton.js.map +1 -1
- package/dist/components/ui/form-skeleton_module.css.map +1 -1
- package/dist/components/ui/form.d.ts +3 -3
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +13 -13
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/form_module.css.map +1 -1
- package/dist/components/ui/gradient-background.js +2 -2
- package/dist/components/ui/gradient-background.js.map +1 -1
- package/dist/components/ui/gradient-background_module.css.map +1 -1
- package/dist/components/ui/gradient-text.js +2 -2
- package/dist/components/ui/gradient-text.js.map +1 -1
- package/dist/components/ui/gradient-text_module.css.map +1 -1
- package/dist/components/ui/highlight-text.js +4 -4
- package/dist/components/ui/highlight-text.js.map +1 -1
- package/dist/components/ui/highlight-text_module.css.map +1 -1
- package/dist/components/ui/hole-background.js +21 -21
- package/dist/components/ui/hole-background.js.map +1 -1
- package/dist/components/ui/hole-background_module.css.map +1 -1
- package/dist/components/ui/hover-card.js +3 -3
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/hover-card_module.css.map +1 -1
- package/dist/components/ui/input-group.js +7 -7
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-group_module.css.map +1 -1
- package/dist/components/ui/input-otp.d.ts +3 -3
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +6 -6
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input-otp_module.css.map +1 -1
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/input_module.css.map +1 -1
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/item.d.ts.map +1 -1
- package/dist/components/ui/item.js +13 -13
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/item_module.css.map +1 -1
- package/dist/components/ui/kbd.js +3 -3
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/kbd_module.css.map +1 -1
- package/dist/components/ui/label.js +2 -2
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/label_module.css.map +1 -1
- package/dist/components/ui/list-skeleton.js +2 -2
- package/dist/components/ui/list-skeleton.js.map +1 -1
- package/dist/components/ui/list-skeleton_module.css.map +1 -1
- package/dist/components/ui/loading-overlay.js +2 -2
- package/dist/components/ui/loading-overlay.js.map +1 -1
- package/dist/components/ui/loading-overlay_module.css.map +1 -1
- package/dist/components/ui/menubar.d.ts +11 -13
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +4 -4
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/menubar_module.css.map +1 -1
- package/dist/components/ui/meter.d.ts +8 -24
- package/dist/components/ui/meter.d.ts.map +1 -1
- package/dist/components/ui/meter.js +23 -19
- package/dist/components/ui/meter.js.map +1 -1
- package/dist/components/ui/meter_module.css.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +3 -12
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +15 -12
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/navigation-menu_module.css +1 -1
- package/dist/components/ui/navigation-menu_module.css.map +1 -1
- package/dist/components/ui/number-field.d.ts +6 -12
- package/dist/components/ui/number-field.d.ts.map +1 -1
- package/dist/components/ui/number-field.js +3 -3
- package/dist/components/ui/number-field.js.map +1 -1
- package/dist/components/ui/number-field_module.css.map +1 -1
- package/dist/components/ui/pagination.js +8 -8
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/pagination_module.css.map +1 -1
- package/dist/components/ui/popover.js +5 -5
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/popover_module.css.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -4
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +10 -9
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/progress_module.css.map +1 -1
- package/dist/components/ui/radio-group.d.ts +2 -4
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +3 -3
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/radio-group_module.css.map +1 -1
- package/dist/components/ui/resizable.d.ts +13 -29
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +8 -7
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/resizable_module.css.map +1 -1
- package/dist/components/ui/ripple-button.js +9 -9
- package/dist/components/ui/ripple-button.js.map +1 -1
- package/dist/components/ui/ripple-button_module.css.map +1 -1
- package/dist/components/ui/scratcher.d.ts +1 -1
- package/dist/components/ui/scratcher.d.ts.map +1 -1
- package/dist/components/ui/scratcher.js +5 -4
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scratcher_module.css.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +2 -4
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +2 -2
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/scroll-area_module.css.map +1 -1
- package/dist/components/ui/select.js +4 -4
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/select_module.css.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -4
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +9 -8
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/separator_module.css.map +1 -1
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +6 -6
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sheet_module.css.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +36 -36
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/sidebar_module.css.map +1 -1
- package/dist/components/ui/skeleton.js +2 -2
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/skeleton_module.css.map +1 -1
- package/dist/components/ui/slider.js +2 -2
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/slider_module.css.map +1 -1
- package/dist/components/ui/spinner.js +2 -2
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/spinner_module.css.map +1 -1
- package/dist/components/ui/stepper.js +2 -2
- package/dist/components/ui/stepper.js.map +1 -1
- package/dist/components/ui/stepper_module.css.map +1 -1
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/switch_module.css.map +1 -1
- package/dist/components/ui/table-skeleton.js +2 -2
- package/dist/components/ui/table-skeleton.js.map +1 -1
- package/dist/components/ui/table-skeleton_module.css.map +1 -1
- package/dist/components/ui/table.js +9 -9
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/table_module.css.map +1 -1
- package/dist/components/ui/tabs.js +3 -3
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/tabs_module.css.map +1 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/textarea_module.css.map +1 -1
- package/dist/components/ui/timeline.js +5 -5
- package/dist/components/ui/timeline.js.map +1 -1
- package/dist/components/ui/timeline_module.css.map +1 -1
- package/dist/components/ui/{sonner.d.ts → toast.d.ts} +15 -6
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/{sonner.js → toast.js} +43 -42
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toast.module.js +34 -0
- package/dist/components/ui/toast.module.js.map +1 -0
- package/dist/components/ui/{sonner_module.css → toast_module.css} +35 -35
- package/dist/components/ui/toast_module.css.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +2 -8
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +14 -12
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle-group_module.css.map +1 -1
- package/dist/components/ui/toggle.js +2 -2
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/toggle_module.css.map +1 -1
- package/dist/components/ui/toolbar.d.ts +10 -30
- package/dist/components/ui/toolbar.d.ts.map +1 -1
- package/dist/components/ui/toolbar.js +28 -23
- package/dist/components/ui/toolbar.js.map +1 -1
- package/dist/components/ui/toolbar_module.css.map +1 -1
- package/dist/components/ui/tooltip.js +4 -4
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/tooltip_module.css.map +1 -1
- package/dist/components/ui/typewriter.js +4 -4
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/components/ui/typewriter_module.css.map +1 -1
- package/dist/components/ui/visually-hidden.js +2 -2
- package/dist/components/ui/visually-hidden.js.map +1 -1
- package/dist/components/ui/visually-hidden_module.css.map +1 -1
- package/dist/hooks/useAnnounce.js +5 -5
- package/dist/hooks/useAnnounce.js.map +1 -1
- package/dist/hooks/useClipboard.d.ts +77 -0
- package/dist/hooks/useClipboard.d.ts.map +1 -0
- package/dist/hooks/useClipboard.js +42 -0
- package/dist/hooks/useClipboard.js.map +1 -0
- package/dist/hooks/useControllableState.d.ts +54 -0
- package/dist/hooks/useControllableState.d.ts.map +1 -0
- package/dist/hooks/useControllableState.js +29 -0
- package/dist/hooks/useControllableState.js.map +1 -0
- package/dist/hooks/useDebounce.d.ts +33 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/hooks/useDebounce.js +20 -0
- package/dist/hooks/useDebounce.js.map +1 -0
- package/dist/hooks/useEventCallback.d.ts +34 -0
- package/dist/hooks/useEventCallback.d.ts.map +1 -0
- package/dist/hooks/useEventCallback.js +12 -0
- package/dist/hooks/useEventCallback.js.map +1 -0
- package/dist/hooks/useFocusManager.js +6 -6
- package/dist/hooks/useFocusManager.js.map +1 -1
- package/dist/hooks/useFocusVisible.js +5 -5
- package/dist/hooks/useFocusVisible.js.map +1 -1
- package/dist/hooks/useId.d.ts +30 -0
- package/dist/hooks/useId.d.ts.map +1 -0
- package/dist/hooks/useId.js +9 -0
- package/dist/hooks/useId.js.map +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +51 -0
- package/dist/hooks/useIntersectionObserver.d.ts.map +1 -0
- package/dist/hooks/useIntersectionObserver.js +25 -0
- package/dist/hooks/useIntersectionObserver.js.map +1 -0
- package/dist/hooks/useInterval.d.ts +55 -0
- package/dist/hooks/useInterval.d.ts.map +1 -0
- package/dist/hooks/useInterval.js +24 -0
- package/dist/hooks/useInterval.js.map +1 -0
- package/dist/hooks/useLocalStorage.d.ts +43 -0
- package/dist/hooks/useLocalStorage.d.ts.map +1 -0
- package/dist/hooks/useLocalStorage.js +53 -0
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useMediaQuery.js +3 -3
- package/dist/hooks/useMediaQuery.js.map +1 -1
- package/dist/hooks/useMergedRefs.d.ts +27 -0
- package/dist/hooks/useMergedRefs.d.ts.map +1 -0
- package/dist/hooks/useMergedRefs.js +11 -0
- package/dist/hooks/useMergedRefs.js.map +1 -0
- package/dist/hooks/useOnClickOutside.d.ts +32 -0
- package/dist/hooks/useOnClickOutside.d.ts.map +1 -0
- package/dist/hooks/useOnClickOutside.js +23 -0
- package/dist/hooks/useOnClickOutside.js.map +1 -0
- package/dist/hooks/usePrevious.d.ts +33 -0
- package/dist/hooks/usePrevious.d.ts.map +1 -0
- package/dist/hooks/usePrevious.js +14 -0
- package/dist/hooks/usePrevious.js.map +1 -0
- package/dist/hooks/useThrottle.d.ts +37 -0
- package/dist/hooks/useThrottle.d.ts.map +1 -0
- package/dist/hooks/useThrottle.js +34 -0
- package/dist/hooks/useThrottle.js.map +1 -0
- package/dist/hooks/useTimeout.d.ts +28 -0
- package/dist/hooks/useTimeout.d.ts.map +1 -0
- package/dist/hooks/useTimeout.js +24 -0
- package/dist/hooks/useTimeout.js.map +1 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +17 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -1
- package/dist/lib/utilities.d.ts +2 -3
- package/dist/lib/utilities.d.ts.map +1 -1
- package/dist/lib/utilities.js.map +1 -1
- package/dist/motion/Collapse.js +2 -2
- package/dist/motion/Collapse.js.map +1 -1
- package/dist/motion/Collapse_module.css.map +1 -1
- package/dist/motion/tokens.js +5 -5
- package/dist/motion/tokens.js.map +1 -1
- package/package.json +88 -10
- package/src/components/ui/alert-dialog.tsx +15 -8
- package/src/components/ui/avatar.tsx +9 -6
- package/src/components/ui/calendar.tsx +9 -14
- package/src/components/ui/carousel.tsx +2 -0
- package/src/components/ui/chart.tsx +65 -62
- package/src/components/ui/checkbox-group.tsx +4 -5
- package/src/components/ui/checkbox.tsx +10 -2
- package/src/components/ui/collapsible.tsx +1 -0
- package/src/components/ui/combobox.module.css +158 -0
- package/src/components/ui/combobox.tsx +569 -0
- package/src/components/ui/command.tsx +31 -15
- package/src/components/ui/context-menu.tsx +3 -0
- package/src/components/ui/drawer.tsx +2 -0
- package/src/components/ui/dropdown-menu.tsx +3 -0
- package/src/components/ui/dropdrawer.tsx +80 -62
- package/src/components/ui/form.tsx +28 -3
- package/src/components/ui/input-otp.tsx +3 -3
- package/src/components/ui/menubar.tsx +9 -10
- package/src/components/ui/meter.tsx +16 -17
- package/src/components/ui/navigation-menu.tsx +41 -33
- package/src/components/ui/number-field.tsx +6 -13
- package/src/components/ui/progress.tsx +3 -2
- package/src/components/ui/radio-group.tsx +2 -5
- package/src/components/ui/resizable.tsx +15 -18
- package/src/components/ui/scratcher.tsx +6 -10
- package/src/components/ui/scroll-area.tsx +2 -5
- package/src/components/ui/separator.tsx +4 -3
- package/src/components/ui/sheet.tsx +3 -0
- package/src/components/ui/sidebar.tsx +1 -0
- package/src/components/ui/{sonner.module.css → toast.module.css} +1 -1
- package/src/components/ui/{sonner.tsx → toast.tsx} +22 -14
- package/src/components/ui/toggle-group.tsx +6 -4
- package/src/components/ui/toolbar.tsx +20 -21
- package/src/hooks/useClipboard.tsx +137 -0
- package/src/hooks/useControllableState.tsx +81 -0
- package/src/hooks/useDebounce.tsx +50 -0
- package/src/hooks/useEventCallback.tsx +47 -0
- package/src/hooks/useId.tsx +36 -0
- package/src/hooks/useIntersectionObserver.tsx +81 -0
- package/src/hooks/useInterval.tsx +80 -0
- package/src/hooks/useLocalStorage.tsx +111 -0
- package/src/hooks/useMergedRefs.tsx +48 -0
- package/src/hooks/useOnClickOutside.tsx +55 -0
- package/src/hooks/usePrevious.tsx +44 -0
- package/src/hooks/useThrottle.tsx +78 -0
- package/src/hooks/useTimeout.tsx +51 -0
- package/src/index.ts +27 -4
- package/src/lib/utilities.ts +4 -4
- package/src/motion/tokens.ts +4 -4
- package/src/stories/DesignPrinciples.mdx +48 -0
- package/src/stories/GettingStarted.mdx +92 -0
- package/src/stories/Welcome.mdx +44 -0
- package/dist/components/ui/sonner.d.ts.map +0 -1
- package/dist/components/ui/sonner.js.map +0 -1
- package/dist/components/ui/sonner.module.js +0 -34
- package/dist/components/ui/sonner.module.js.map +0 -1
- package/dist/components/ui/sonner_module.css.map +0 -1
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Meter as BaseMeter } from "@base-ui/react/meter";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
type MeterProps = React.ComponentPropsWithRef<typeof BaseMeter.Root>;
|
|
4
|
-
type MeterTrackProps = React.ComponentPropsWithRef<typeof BaseMeter.Track>;
|
|
5
|
-
type MeterIndicatorProps = React.ComponentPropsWithRef<typeof BaseMeter.Indicator>;
|
|
6
|
-
type MeterLabelProps = React.ComponentPropsWithRef<typeof BaseMeter.Label>;
|
|
7
3
|
/**
|
|
8
4
|
* Displays a scalar measurement within a known range.
|
|
9
5
|
*
|
|
@@ -23,10 +19,7 @@ type MeterLabelProps = React.ComponentPropsWithRef<typeof BaseMeter.Label>;
|
|
|
23
19
|
*
|
|
24
20
|
* @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}
|
|
25
21
|
*/
|
|
26
|
-
declare
|
|
27
|
-
declare namespace Meter {
|
|
28
|
-
var displayName: string;
|
|
29
|
-
}
|
|
22
|
+
declare const Meter: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MeterRootProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
23
|
/**
|
|
31
24
|
* Renders the background track for a meter.
|
|
32
25
|
*
|
|
@@ -41,10 +34,7 @@ declare namespace Meter {
|
|
|
41
34
|
*
|
|
42
35
|
* @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}
|
|
43
36
|
*/
|
|
44
|
-
declare
|
|
45
|
-
declare namespace MeterTrack {
|
|
46
|
-
var displayName: string;
|
|
47
|
-
}
|
|
37
|
+
declare const MeterTrack: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MeterTrackProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
48
38
|
/**
|
|
49
39
|
* Renders the filled indicator that reflects the current meter value.
|
|
50
40
|
*
|
|
@@ -59,10 +49,7 @@ declare namespace MeterTrack {
|
|
|
59
49
|
*
|
|
60
50
|
* @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}
|
|
61
51
|
*/
|
|
62
|
-
declare
|
|
63
|
-
declare namespace MeterIndicator {
|
|
64
|
-
var displayName: string;
|
|
65
|
-
}
|
|
52
|
+
declare const MeterIndicator: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MeterIndicatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
66
53
|
/**
|
|
67
54
|
* Renders the accessible label associated with a meter.
|
|
68
55
|
*
|
|
@@ -77,24 +64,21 @@ declare namespace MeterIndicator {
|
|
|
77
64
|
*
|
|
78
65
|
* @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}
|
|
79
66
|
*/
|
|
80
|
-
declare
|
|
81
|
-
declare namespace MeterLabel {
|
|
82
|
-
var displayName: string;
|
|
83
|
-
}
|
|
67
|
+
declare const MeterLabel: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MeterLabelProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
84
68
|
declare namespace Meter {
|
|
85
|
-
type Props =
|
|
69
|
+
type Props = React.ComponentPropsWithRef<typeof BaseMeter.Root>;
|
|
86
70
|
type State = BaseMeter.Root.State;
|
|
87
71
|
}
|
|
88
72
|
declare namespace MeterTrack {
|
|
89
|
-
type Props =
|
|
73
|
+
type Props = React.ComponentPropsWithRef<typeof BaseMeter.Track>;
|
|
90
74
|
type State = BaseMeter.Track.State;
|
|
91
75
|
}
|
|
92
76
|
declare namespace MeterIndicator {
|
|
93
|
-
type Props =
|
|
77
|
+
type Props = React.ComponentPropsWithRef<typeof BaseMeter.Indicator>;
|
|
94
78
|
type State = BaseMeter.Indicator.State;
|
|
95
79
|
}
|
|
96
80
|
declare namespace MeterLabel {
|
|
97
|
-
type Props =
|
|
81
|
+
type Props = React.ComponentPropsWithRef<typeof BaseMeter.Label>;
|
|
98
82
|
type State = BaseMeter.Label.State;
|
|
99
83
|
}
|
|
100
84
|
export { Meter, MeterIndicator, MeterLabel, MeterTrack };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meter.d.ts","sourceRoot":"","sources":["../../../src/components/ui/meter.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,IAAI,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,
|
|
1
|
+
{"version":3,"file":"meter.d.ts","sourceRoot":"","sources":["../../../src/components/ui/meter.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,IAAI,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,KAAK,gLAeT,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,UAAU,iLAed,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,cAAc,qLAelB,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,UAAU,mLAed,CAAC;AAGH,kBAAU,KAAK,CAAC;IACd,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;IACvE,KAAY,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;CAC1C;AAGD,kBAAU,UAAU,CAAC;IACnB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;IACxE,KAAY,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;CAC3C;AAGD,kBAAU,cAAc,CAAC;IACvB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5E,KAAY,KAAK,GAAG,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC;CAC/C;AAGD,kBAAU,UAAU,CAAC;IACnB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;IACxE,KAAY,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;CAC3C;AAOD,OAAO,EAAC,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAC,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
|
-
import { Meter } from "@base-ui/react/meter";
|
|
4
|
+
import { Meter as meter_Meter } from "@base-ui/react/meter";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import "react";
|
|
7
6
|
import { cn } from "../../lib/utilities.js";
|
|
8
7
|
import meter_module from "./meter.module.js";
|
|
9
|
-
|
|
8
|
+
import * as __rspack_external_react from "react";
|
|
9
|
+
const ui_meter_Meter = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
10
10
|
const { className, children, render, ...otherProps } = props;
|
|
11
|
-
return /*#__PURE__*/ jsx(
|
|
11
|
+
return /*#__PURE__*/ jsx(meter_Meter.Root, {
|
|
12
12
|
...otherProps,
|
|
13
|
+
ref: forwardedRef,
|
|
13
14
|
render: useRender({
|
|
14
15
|
defaultTagName: "div",
|
|
15
16
|
render: render,
|
|
@@ -19,11 +20,12 @@ function meter_Meter(props) {
|
|
|
19
20
|
}),
|
|
20
21
|
children: children
|
|
21
22
|
});
|
|
22
|
-
}
|
|
23
|
-
|
|
23
|
+
});
|
|
24
|
+
const meter_MeterTrack = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
24
25
|
const { className, children, render, ...otherProps } = props;
|
|
25
|
-
return /*#__PURE__*/ jsx(
|
|
26
|
+
return /*#__PURE__*/ jsx(meter_Meter.Track, {
|
|
26
27
|
...otherProps,
|
|
28
|
+
ref: forwardedRef,
|
|
27
29
|
render: useRender({
|
|
28
30
|
defaultTagName: "div",
|
|
29
31
|
render: render,
|
|
@@ -33,11 +35,12 @@ function MeterTrack(props) {
|
|
|
33
35
|
}),
|
|
34
36
|
children: children
|
|
35
37
|
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
+
});
|
|
39
|
+
const meter_MeterIndicator = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
38
40
|
const { className, children, render, ...otherProps } = props;
|
|
39
|
-
return /*#__PURE__*/ jsx(
|
|
41
|
+
return /*#__PURE__*/ jsx(meter_Meter.Indicator, {
|
|
40
42
|
...otherProps,
|
|
43
|
+
ref: forwardedRef,
|
|
41
44
|
render: useRender({
|
|
42
45
|
defaultTagName: "div",
|
|
43
46
|
render: render,
|
|
@@ -47,11 +50,12 @@ function MeterIndicator(props) {
|
|
|
47
50
|
}),
|
|
48
51
|
children: children
|
|
49
52
|
});
|
|
50
|
-
}
|
|
51
|
-
|
|
53
|
+
});
|
|
54
|
+
const meter_MeterLabel = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
52
55
|
const { className, children, render, ...otherProps } = props;
|
|
53
|
-
return /*#__PURE__*/ jsx(
|
|
56
|
+
return /*#__PURE__*/ jsx(meter_Meter.Label, {
|
|
54
57
|
...otherProps,
|
|
58
|
+
ref: forwardedRef,
|
|
55
59
|
render: useRender({
|
|
56
60
|
defaultTagName: "span",
|
|
57
61
|
render: render,
|
|
@@ -61,11 +65,11 @@ function MeterLabel(props) {
|
|
|
61
65
|
}),
|
|
62
66
|
children: children
|
|
63
67
|
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
export { MeterIndicator, MeterLabel, MeterTrack,
|
|
68
|
+
});
|
|
69
|
+
ui_meter_Meter.displayName = "Meter";
|
|
70
|
+
meter_MeterTrack.displayName = "MeterTrack";
|
|
71
|
+
meter_MeterIndicator.displayName = "MeterIndicator";
|
|
72
|
+
meter_MeterLabel.displayName = "MeterLabel";
|
|
73
|
+
export { meter_MeterIndicator as MeterIndicator, meter_MeterLabel as MeterLabel, meter_MeterTrack as MeterTrack, ui_meter_Meter as Meter };
|
|
70
74
|
|
|
71
75
|
//# sourceMappingURL=meter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/meter.js","sources":["../../../src/components/ui/meter.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {Meter as BaseMeter} from \"@base-ui/react/meter\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./meter.module.css\";\r\n\r\
|
|
1
|
+
{"version":3,"file":"components/ui/meter.js","sources":["../../../src/components/ui/meter.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {Meter as BaseMeter} from \"@base-ui/react/meter\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./meter.module.css\";\r\n\r\n/**\r\n * Displays a scalar measurement within a known range.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on Base UI Meter primitives\r\n * - Intended for values such as storage usage, health, or completion\r\n *\r\n * @example\r\n * ```tsx\r\n * <Meter value={72}>\r\n * <MeterTrack>\r\n * <MeterIndicator />\r\n * </MeterTrack>\r\n * </Meter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}\r\n */\r\nconst Meter = React.forwardRef<HTMLDivElement, Meter.Props>(function Meter(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMeter.Root\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.root, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseMeter.Root>\r\n );\r\n});\r\n\r\n/**\r\n * Renders the background track for a meter.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on Base UI Meter track primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <MeterTrack />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}\r\n */\r\nconst MeterTrack = React.forwardRef<HTMLDivElement, MeterTrack.Props>(function MeterTrack(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMeter.Track\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.track, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseMeter.Track>\r\n );\r\n});\r\n\r\n/**\r\n * Renders the filled indicator that reflects the current meter value.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on Base UI Meter indicator primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <MeterIndicator />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}\r\n */\r\nconst MeterIndicator = React.forwardRef<HTMLDivElement, MeterIndicator.Props>(function MeterIndicator(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMeter.Indicator\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.indicator, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseMeter.Indicator>\r\n );\r\n});\r\n\r\n/**\r\n * Renders the accessible label associated with a meter.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element by default\r\n * - Built on Base UI Meter label primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <MeterLabel>Storage used</MeterLabel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}\r\n */\r\nconst MeterLabel = React.forwardRef<HTMLSpanElement, MeterLabel.Props>(function MeterLabel(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMeter.Label\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"span\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.label, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseMeter.Label>\r\n );\r\n});\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Meter {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseMeter.Root>;\r\n export type State = BaseMeter.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace MeterTrack {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseMeter.Track>;\r\n export type State = BaseMeter.Track.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace MeterIndicator {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseMeter.Indicator>;\r\n export type State = BaseMeter.Indicator.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace MeterLabel {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseMeter.Label>;\r\n export type State = BaseMeter.Label.State;\r\n}\r\n\r\nMeter.displayName = \"Meter\";\r\nMeterTrack.displayName = \"MeterTrack\";\r\nMeterIndicator.displayName = \"MeterIndicator\";\r\nMeterLabel.displayName = \"MeterLabel\";\r\n\r\nexport {Meter, MeterIndicator, MeterLabel, MeterTrack};\r\n"],"names":["Meter","React","props","forwardedRef","className","children","render","otherProps","BaseMeter","useRender","mergeProps","cn","styles","MeterTrack","MeterIndicator","MeterLabel"],"mappings":";;;;;;;;AA6BA,MAAMA,iBAAQ,WAAHA,GAAGC,wBAAAA,UAAgB,CAA8B,SAAeC,KAAK,EAAEC,YAAY;IAC5F,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErD,OAAO,WAAP,GACE,IAACM,YAAAA,IAAc;QACZ,GAAGD,UAAU;QACd,KAAKJ;QACL,QAAQM,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,aAAAA,IAAW,EAAER;YAAU,GAAG,CAAC;QAC9D;kBACCC;;AAGP;AAgBA,MAAMQ,mBAAa,WAAHA,GAAGZ,wBAAAA,UAAgB,CAAmC,SAAoBC,KAAK,EAAEC,YAAY;IAC3G,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErD,OAAO,WAAP,GACE,IAACM,YAAAA,KAAe;QACb,GAAGD,UAAU;QACd,KAAKJ;QACL,QAAQM,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,aAAAA,KAAY,EAAER;YAAU,GAAG,CAAC;QAC/D;kBACCC;;AAGP;AAgBA,MAAMS,uBAAiB,WAAHA,GAAGb,wBAAAA,UAAgB,CAAuC,SAAwBC,KAAK,EAAEC,YAAY;IACvH,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErD,OAAO,WAAP,GACE,IAACM,YAAAA,SAAmB;QACjB,GAAGD,UAAU;QACd,KAAKJ;QACL,QAAQM,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,aAAAA,SAAgB,EAAER;YAAU,GAAG,CAAC;QACnE;kBACCC;;AAGP;AAgBA,MAAMU,mBAAa,WAAHA,GAAGd,wBAAAA,UAAgB,CAAoC,SAAoBC,KAAK,EAAEC,YAAY;IAC5G,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErD,OAAO,WAAP,GACE,IAACM,YAAAA,KAAe;QACb,GAAGD,UAAU;QACd,KAAKJ;QACL,QAAQM,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,aAAAA,KAAY,EAAER;YAAU,GAAG,CAAC;QAC/D;kBACCC;;AAGP;AA0BAL,eAAM,WAAW,GAAG;AACpBa,iBAAW,WAAW,GAAG;AACzBC,qBAAe,WAAW,GAAG;AAC7BC,iBAAW,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/meter.module.css","webpack://./src/components/ui/meter.module.css"],"names":[],"mappings":"AAAA;ECCE,sBAAsB;EACtB,aAAa;AACf;;ADHyC;ECMvC,2BAA2B;EAC3B,4BAA4B;EAC5B,gBAAgB;EAChB,gBAAgB;AAClB;;ADVuI;ECarI,qCAAqC;EACrC,gFAAgF;EAChF,qBAAqB;EACrB,WAAW;EACX,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;ADpBkV;ECuBhV,0GAA0G;EAC1G,sBAAsB;EACtB,eAAe;EACf,2CAA2C;AAC7C","sourcesContent":[".root{display:grid;gap:var(--ac-space-2)}.label{color:var(--ac-foreground);font-size:var(--ac-text-sm);font-weight:500;line-height:1.4}.track{background-color:var(--ac-secondary);border-radius:9999px;box-shadow:inset 0 0 0 1px color-mix(in oklch,var(--ac-border),transparent 20%);height:.5rem;overflow:hidden;position:relative;width:100%}.indicator{background:linear-gradient(90deg,color-mix(in oklch,var(--ac-primary),#fff 10%) 0,var(--ac-primary) 100%);border-radius:inherit;height:inherit;transition:width var(--ac-transition-slow)}",".root {\n gap: var(--ac-space-2);\n display: grid;\n}\n\n.label {\n color: var(--ac-foreground);\n font-size: var(--ac-text-sm);\n font-weight: 500;\n line-height: 1.4;\n}\n\n.track {\n background-color: var(--ac-secondary);\n box-shadow: inset 0 0 0 1px color-mix(in oklch,var(--ac-border),transparent 20%);\n border-radius: 9999px;\n width: 100%;\n height: .5rem;\n position: relative;\n overflow: hidden;\n}\n\n.indicator {\n background: linear-gradient(90deg,color-mix(in oklch,var(--ac-primary),#fff 10%) 0,var(--ac-primary) 100%);\n border-radius: inherit;\n height: inherit;\n transition: width var(--ac-transition-slow);\n}\n"],"sourceRoot":""}
|
|
@@ -132,10 +132,7 @@ declare const NavigationMenuItem: React.ForwardRefExoticComponent<Omit<import("@
|
|
|
132
132
|
*
|
|
133
133
|
* @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}
|
|
134
134
|
*/
|
|
135
|
-
declare
|
|
136
|
-
declare namespace NavigationMenuTrigger {
|
|
137
|
-
var displayName: string;
|
|
138
|
-
}
|
|
135
|
+
declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<NavigationMenuTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
139
136
|
/**
|
|
140
137
|
* Renders the navigation menu content.
|
|
141
138
|
*
|
|
@@ -151,10 +148,7 @@ declare namespace NavigationMenuTrigger {
|
|
|
151
148
|
*
|
|
152
149
|
* @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}
|
|
153
150
|
*/
|
|
154
|
-
declare
|
|
155
|
-
declare namespace NavigationMenuContent {
|
|
156
|
-
var displayName: string;
|
|
157
|
-
}
|
|
151
|
+
declare const NavigationMenuContent: React.ForwardRefExoticComponent<Omit<NavigationMenuContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
158
152
|
/**
|
|
159
153
|
* Renders the navigation menu link.
|
|
160
154
|
*
|
|
@@ -170,10 +164,7 @@ declare namespace NavigationMenuContent {
|
|
|
170
164
|
*
|
|
171
165
|
* @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}
|
|
172
166
|
*/
|
|
173
|
-
declare
|
|
174
|
-
declare namespace NavigationMenuLink {
|
|
175
|
-
var displayName: string;
|
|
176
|
-
}
|
|
167
|
+
declare const NavigationMenuLink: React.ForwardRefExoticComponent<Omit<NavigationMenuLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
177
168
|
/**
|
|
178
169
|
* Renders the navigation menu viewport.
|
|
179
170
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/navigation-menu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,cAAc,IAAI,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,2EAA2E;AAC3E,wBAAgB,0BAA0B,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,UAAU,mBAAoB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAClH;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,uBAA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IAChC,KAAY,KAAK,GAAG,4BAA4B,CAAC;IACjD,KAAY,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAC3C;AAWD,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,GACvB,CAAC"}
|
|
@@ -4,9 +4,9 @@ import { mergeProps } from "@base-ui/react/merge-props";
|
|
|
4
4
|
import { NavigationMenu } from "@base-ui/react/navigation-menu";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
import { ChevronDown } from "lucide-react";
|
|
7
|
-
import { isValidElement } from "react";
|
|
8
7
|
import { cn } from "../../lib/utilities.js";
|
|
9
8
|
import navigation_menu_module from "./navigation-menu.module.js";
|
|
9
|
+
import * as __rspack_external_react from "react";
|
|
10
10
|
function navigationMenuTriggerStyle(className) {
|
|
11
11
|
return cn(navigation_menu_module.trigger, className);
|
|
12
12
|
}
|
|
@@ -42,10 +42,11 @@ function NavigationMenuList(props) {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
const NavigationMenuItem = NavigationMenu.Item;
|
|
45
|
-
|
|
45
|
+
const navigation_menu_NavigationMenuTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
46
46
|
const { className, children, render, ...otherProps } = props;
|
|
47
47
|
return /*#__PURE__*/ jsxs(NavigationMenu.Trigger, {
|
|
48
48
|
...otherProps,
|
|
49
|
+
ref: forwardedRef,
|
|
49
50
|
render: useRender({
|
|
50
51
|
defaultTagName: "button",
|
|
51
52
|
render: render,
|
|
@@ -60,11 +61,12 @@ function NavigationMenuTrigger(props) {
|
|
|
60
61
|
})
|
|
61
62
|
]
|
|
62
63
|
});
|
|
63
|
-
}
|
|
64
|
-
|
|
64
|
+
});
|
|
65
|
+
const navigation_menu_NavigationMenuContent = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
65
66
|
const { className, children, render, ...otherProps } = props;
|
|
66
67
|
return /*#__PURE__*/ jsx(NavigationMenu.Content, {
|
|
67
68
|
...otherProps,
|
|
69
|
+
ref: forwardedRef,
|
|
68
70
|
render: useRender({
|
|
69
71
|
defaultTagName: "div",
|
|
70
72
|
render: render,
|
|
@@ -74,11 +76,12 @@ function NavigationMenuContent(props) {
|
|
|
74
76
|
}),
|
|
75
77
|
children: children
|
|
76
78
|
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
+
});
|
|
80
|
+
const navigation_menu_NavigationMenuLink = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
79
81
|
const { className, children, render, ...otherProps } = props;
|
|
80
82
|
return /*#__PURE__*/ jsx(NavigationMenu.Link, {
|
|
81
83
|
...otherProps,
|
|
84
|
+
ref: forwardedRef,
|
|
82
85
|
render: useRender({
|
|
83
86
|
defaultTagName: "a",
|
|
84
87
|
render: render,
|
|
@@ -88,7 +91,7 @@ function NavigationMenuLink(props) {
|
|
|
88
91
|
}),
|
|
89
92
|
children: children
|
|
90
93
|
});
|
|
91
|
-
}
|
|
94
|
+
});
|
|
92
95
|
function NavigationMenuViewport(props) {
|
|
93
96
|
const { className, children, render, ...otherProps } = props;
|
|
94
97
|
return /*#__PURE__*/ jsx("div", {
|
|
@@ -126,7 +129,7 @@ function NavigationMenuViewport(props) {
|
|
|
126
129
|
}
|
|
127
130
|
function NavigationMenuIndicator(props) {
|
|
128
131
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
129
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
132
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
130
133
|
return useRender({
|
|
131
134
|
defaultTagName: "div",
|
|
132
135
|
render: renderProp,
|
|
@@ -142,11 +145,11 @@ function NavigationMenuIndicator(props) {
|
|
|
142
145
|
navigation_menu_NavigationMenu.displayName = "NavigationMenu";
|
|
143
146
|
NavigationMenuList.displayName = "NavigationMenuList";
|
|
144
147
|
NavigationMenuItem.displayName = "NavigationMenuItem";
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
navigation_menu_NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
149
|
+
navigation_menu_NavigationMenuContent.displayName = "NavigationMenuContent";
|
|
150
|
+
navigation_menu_NavigationMenuLink.displayName = "NavigationMenuLink";
|
|
148
151
|
NavigationMenuViewport.displayName = "NavigationMenuViewport";
|
|
149
152
|
NavigationMenuIndicator.displayName = "NavigationMenuIndicator";
|
|
150
|
-
export {
|
|
153
|
+
export { NavigationMenuIndicator, NavigationMenuItem, NavigationMenuList, NavigationMenuViewport, navigationMenuTriggerStyle, navigation_menu_NavigationMenu as NavigationMenu, navigation_menu_NavigationMenuContent as NavigationMenuContent, navigation_menu_NavigationMenuLink as NavigationMenuLink, navigation_menu_NavigationMenuTrigger as NavigationMenuTrigger };
|
|
151
154
|
|
|
152
155
|
//# sourceMappingURL=navigation-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/navigation-menu.js","sources":["../../../src/components/ui/navigation-menu.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {NavigationMenu as BaseNavigationMenu} from \"@base-ui/react/navigation-menu\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {ChevronDown} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./navigation-menu.module.css\";\r\n\r\n/** Returns the CSS classes used by the navigation menu trigger wrapper. */\r\nexport function navigationMenuTriggerStyle(className?: string): string {\r\n return cn(styles.trigger, className);\r\n}\r\n\r\ninterface NavigationMenuProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.Root>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuListProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.List>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.Trigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.Content>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuLinkProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.Link>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuViewportProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.Viewport>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuIndicatorProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\n/**\r\n * Coordinates navigation menu state and accessibility behavior.\r\n *\r\n * @remarks\r\n * - Renders a `<nav>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenu>Content</NavigationMenu>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenu(props: Readonly<NavigationMenu.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNavigationMenu.Root\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"nav\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.root, className)}, {}),\r\n })}>\r\n {children}\r\n <NavigationMenuViewport />\r\n </BaseNavigationMenu.Root>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the navigation menu list.\r\n *\r\n * @remarks\r\n * - Renders a `<ul>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuList>Content</NavigationMenuList>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenuList(props: Readonly<NavigationMenuList.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNavigationMenu.List\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"ul\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.list, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseNavigationMenu.List>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the navigation menu item.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuItem>Content</NavigationMenuItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nconst NavigationMenuItem = BaseNavigationMenu.Item;\r\n\r\n/**\r\n * Renders the navigation menu trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuTrigger>Content</NavigationMenuTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenuTrigger(props: Readonly<NavigationMenuTrigger.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNavigationMenu.Trigger\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.trigger, className)}, {}),\r\n })}>\r\n {children}\r\n <ChevronDown className={styles.triggerIcon} />\r\n </BaseNavigationMenu.Trigger>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the navigation menu content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuContent>Content</NavigationMenuContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenuContent(props: Readonly<NavigationMenuContent.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNavigationMenu.Content\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.content, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseNavigationMenu.Content>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the navigation menu link.\r\n *\r\n * @remarks\r\n * - Renders a `<a>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuLink>Content</NavigationMenuLink>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenuLink(props: Readonly<NavigationMenuLink.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNavigationMenu.Link\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"a\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.link, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseNavigationMenu.Link>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the navigation menu viewport.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuViewport>Content</NavigationMenuViewport>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenuViewport(props: Readonly<NavigationMenuViewport.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <div className={styles.viewportWrapper}>\r\n <BaseNavigationMenu.Portal>\r\n <BaseNavigationMenu.Positioner\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseNavigationMenu.Popup\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.popup}, {}),\r\n })}>\r\n <BaseNavigationMenu.Viewport\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.viewport, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseNavigationMenu.Viewport>\r\n </BaseNavigationMenu.Popup>\r\n </BaseNavigationMenu.Positioner>\r\n </BaseNavigationMenu.Portal>\r\n </div>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the navigation menu indicator.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuIndicator>Content</NavigationMenuIndicator>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenuIndicator(props: Readonly<NavigationMenuIndicator.Props>): React.ReactElement {\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.indicator, className)}, otherProps, {\r\n children: renderProp ? undefined : (children ?? <div className={styles.indicatorInner} />),\r\n }),\r\n });\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenu {\r\n export type Props = NavigationMenuProps;\r\n export type State = BaseNavigationMenu.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuList {\r\n export type Props = NavigationMenuListProps;\r\n export type State = BaseNavigationMenu.List.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuTrigger {\r\n export type Props = NavigationMenuTriggerProps;\r\n export type State = BaseNavigationMenu.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuContent {\r\n export type Props = NavigationMenuContentProps;\r\n export type State = BaseNavigationMenu.Content.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuLink {\r\n export type Props = NavigationMenuLinkProps;\r\n export type State = BaseNavigationMenu.Link.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuViewport {\r\n export type Props = NavigationMenuViewportProps;\r\n export type State = BaseNavigationMenu.Viewport.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuIndicator {\r\n export type Props = NavigationMenuIndicatorProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\nNavigationMenu.displayName = \"NavigationMenu\";\r\nNavigationMenuList.displayName = \"NavigationMenuList\";\r\nNavigationMenuItem.displayName = \"NavigationMenuItem\";\r\nNavigationMenuTrigger.displayName = \"NavigationMenuTrigger\";\r\nNavigationMenuContent.displayName = \"NavigationMenuContent\";\r\nNavigationMenuLink.displayName = \"NavigationMenuLink\";\r\nNavigationMenuViewport.displayName = \"NavigationMenuViewport\";\r\nNavigationMenuIndicator.displayName = \"NavigationMenuIndicator\";\r\n\r\nexport {\r\n NavigationMenu,\r\n NavigationMenuContent,\r\n NavigationMenuIndicator,\r\n NavigationMenuItem,\r\n NavigationMenuLink,\r\n NavigationMenuList,\r\n NavigationMenuTrigger,\r\n NavigationMenuViewport,\r\n};\r\n"],"names":["navigationMenuTriggerStyle","className","cn","styles","NavigationMenu","props","children","render","otherProps","BaseNavigationMenu","useRender","mergeProps","NavigationMenuViewport","NavigationMenuList","NavigationMenuItem","NavigationMenuTrigger","ChevronDown","NavigationMenuContent","NavigationMenuLink","NavigationMenuIndicator","asChild","renderProp","React","undefined"],"mappings":";;;;;;;;;AAYO,SAASA,2BAA2BC,SAAkB;IAC3D,OAAOC,GAAGC,uBAAAA,OAAc,EAAEF;AAC5B;AAoFA,SAASG,+BAAeC,KAAqC;IAC3D,MAAM,EAACJ,SAAS,EAAEK,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGH;IAErD,OAAO,WAAP,GACE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WC;IAE1E,OAAOG,UAAU;QACf,gBAAgB;QAChB,QAAQW;QACR,OAAOV,WAAW;YAAC,WAAWT,GAAGC,uBAAAA,SAAgB,EAAEF;QAAU,GAAGO,YAAY;YAC1E,UAAUa,aAAaE,SAAajB,YAAY,WAAZA,GAAY,IAAC;gBAAI,WAAWH,uBAAAA,cAAqB;;QACvF;IACF;AACF;AA4CAC,+BAAe,WAAW,GAAG;AAC7BS,mBAAmB,WAAW,GAAG;AACjCC,mBAAmB,WAAW,GAAG;AACjCC,sBAAsB,WAAW,GAAG;AACpCE,sBAAsB,WAAW,GAAG;AACpCC,mBAAmB,WAAW,GAAG;AACjCN,uBAAuB,WAAW,GAAG;AACrCO,wBAAwB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/navigation-menu.js","sources":["../../../src/components/ui/navigation-menu.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {NavigationMenu as BaseNavigationMenu} from \"@base-ui/react/navigation-menu\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {ChevronDown} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./navigation-menu.module.css\";\r\n\r\n/** Returns the CSS classes used by the navigation menu trigger wrapper. */\r\nexport function navigationMenuTriggerStyle(className?: string): string {\r\n return cn(styles.trigger, className);\r\n}\r\n\r\ninterface NavigationMenuProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.Root>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuListProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.List>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.Trigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.Content>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuLinkProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.Link>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuViewportProps extends Omit<React.ComponentPropsWithRef<typeof BaseNavigationMenu.Viewport>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface NavigationMenuIndicatorProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\n/**\r\n * Coordinates navigation menu state and accessibility behavior.\r\n *\r\n * @remarks\r\n * - Renders a `<nav>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenu>Content</NavigationMenu>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenu(props: Readonly<NavigationMenu.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNavigationMenu.Root\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"nav\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.root, className)}, {}),\r\n })}>\r\n {children}\r\n <NavigationMenuViewport />\r\n </BaseNavigationMenu.Root>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the navigation menu list.\r\n *\r\n * @remarks\r\n * - Renders a `<ul>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuList>Content</NavigationMenuList>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenuList(props: Readonly<NavigationMenuList.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNavigationMenu.List\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"ul\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.list, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseNavigationMenu.List>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the navigation menu item.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuItem>Content</NavigationMenuItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nconst NavigationMenuItem = BaseNavigationMenu.Item;\r\n\r\n/**\r\n * Renders the navigation menu trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuTrigger>Content</NavigationMenuTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nconst NavigationMenuTrigger = React.forwardRef<HTMLButtonElement, NavigationMenuTrigger.Props>(\r\n function NavigationMenuTrigger(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNavigationMenu.Trigger\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.trigger, className)}, {}),\r\n })}>\r\n {children}\r\n <ChevronDown className={styles.triggerIcon} />\r\n </BaseNavigationMenu.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the navigation menu content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuContent>Content</NavigationMenuContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nconst NavigationMenuContent = React.forwardRef<HTMLDivElement, NavigationMenuContent.Props>(\r\n function NavigationMenuContent(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNavigationMenu.Content\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.content, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseNavigationMenu.Content>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the navigation menu link.\r\n *\r\n * @remarks\r\n * - Renders a `<a>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuLink>Content</NavigationMenuLink>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nconst NavigationMenuLink = React.forwardRef<HTMLAnchorElement, NavigationMenuLink.Props>(function NavigationMenuLink(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNavigationMenu.Link\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"a\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.link, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseNavigationMenu.Link>\r\n );\r\n});\r\n\r\n/**\r\n * Renders the navigation menu viewport.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuViewport>Content</NavigationMenuViewport>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenuViewport(props: Readonly<NavigationMenuViewport.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <div className={styles.viewportWrapper}>\r\n <BaseNavigationMenu.Portal>\r\n <BaseNavigationMenu.Positioner\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseNavigationMenu.Popup\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.popup}, {}),\r\n })}>\r\n <BaseNavigationMenu.Viewport\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.viewport, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseNavigationMenu.Viewport>\r\n </BaseNavigationMenu.Popup>\r\n </BaseNavigationMenu.Positioner>\r\n </BaseNavigationMenu.Portal>\r\n </div>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the navigation menu indicator.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <NavigationMenuIndicator>Content</NavigationMenuIndicator>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}\r\n */\r\nfunction NavigationMenuIndicator(props: Readonly<NavigationMenuIndicator.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.indicator, className)}, otherProps, {\r\n children: renderProp ? undefined : (children ?? <div className={styles.indicatorInner} />),\r\n }),\r\n });\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenu {\r\n export type Props = NavigationMenuProps;\r\n export type State = BaseNavigationMenu.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuList {\r\n export type Props = NavigationMenuListProps;\r\n export type State = BaseNavigationMenu.List.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuTrigger {\r\n export type Props = NavigationMenuTriggerProps;\r\n export type State = BaseNavigationMenu.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuContent {\r\n export type Props = NavigationMenuContentProps;\r\n export type State = BaseNavigationMenu.Content.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuLink {\r\n export type Props = NavigationMenuLinkProps;\r\n export type State = BaseNavigationMenu.Link.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuViewport {\r\n export type Props = NavigationMenuViewportProps;\r\n export type State = BaseNavigationMenu.Viewport.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NavigationMenuIndicator {\r\n export type Props = NavigationMenuIndicatorProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\nNavigationMenu.displayName = \"NavigationMenu\";\r\nNavigationMenuList.displayName = \"NavigationMenuList\";\r\nNavigationMenuItem.displayName = \"NavigationMenuItem\";\r\nNavigationMenuTrigger.displayName = \"NavigationMenuTrigger\";\r\nNavigationMenuContent.displayName = \"NavigationMenuContent\";\r\nNavigationMenuLink.displayName = \"NavigationMenuLink\";\r\nNavigationMenuViewport.displayName = \"NavigationMenuViewport\";\r\nNavigationMenuIndicator.displayName = \"NavigationMenuIndicator\";\r\n\r\nexport {\r\n NavigationMenu,\r\n NavigationMenuContent,\r\n NavigationMenuIndicator,\r\n NavigationMenuItem,\r\n NavigationMenuLink,\r\n NavigationMenuList,\r\n NavigationMenuTrigger,\r\n NavigationMenuViewport,\r\n};\r\n"],"names":["navigationMenuTriggerStyle","className","cn","styles","NavigationMenu","props","children","render","otherProps","BaseNavigationMenu","useRender","mergeProps","NavigationMenuViewport","NavigationMenuList","NavigationMenuItem","NavigationMenuTrigger","React","forwardedRef","ChevronDown","NavigationMenuContent","NavigationMenuLink","NavigationMenuIndicator","asChild","renderProp","undefined"],"mappings":";;;;;;;;;AAYO,SAASA,2BAA2BC,SAAkB;IAC3D,OAAOC,GAAGC,uBAAAA,OAAc,EAAEF;AAC5B;AAoFA,SAASG,+BAAeC,KAAqC;IAC3D,MAAM,EAACJ,SAAS,EAAEK,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGH;IAErD,OAAO,WAAP,GACE,KAACI,eAAAA,IAAuB;QACrB,GAAG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wBAAwBhB,KAA8C;IAE7E,MAAM,EAACiB,UAAU,KAAK,EAAEhB,QAAQ,EAAEL,SAAS,EAAEM,MAAM,EAAE,GAAGC,YAAW,GAAGH;IACtE,MAAMkB,aAAaD,WAAW,WAAXA,GAAWN,wBAAAA,cAAoB,CAACV,YAAYA,WAAWC;IAE1E,OAAOG,UAAU;QACf,gBAAgB;QAChB,QAAQa;QACR,OAAOZ,WAAW;YAAC,WAAWT,GAAGC,uBAAAA,SAAgB,EAAEF;QAAU,GAAGO,YAAY;YAC1E,UAAUe,aAAaC,SAAalB,YAAY,WAAZA,GAAY,IAAC;gBAAI,WAAWH,uBAAAA,cAAqB;;QACvF;IACF;AACF;AA4CAC,+BAAe,WAAW,GAAG;AAC7BS,mBAAmB,WAAW,GAAG;AACjCC,mBAAmB,WAAW,GAAG;AACjCC,sCAAsB,WAAW,GAAG;AACpCI,sCAAsB,WAAW,GAAG;AACpCC,mCAAmB,WAAW,GAAG;AACjCR,uBAAuB,WAAW,GAAG;AACrCS,wBAAwB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/navigation-menu.module.css","webpack://./src/components/ui/navigation-menu.module.css"],"names":[],"mappings":"AAAA;ECCE,uBAAuB;EACvB,aAAa;EACb,kBAAkB;AACpB;;ADJ4D;ECO1D,SAAS;EACT,UAAU;EACV,gBAAgB;EAChB,aAAa;AACf;;ADXkH;ECchH,mBAAmB;EACnB,sBAAsB;AACxB;;ADhB0K;ECmBxK,sCAAsC;EACtC,kCAAkC;EAClC,2BAA2B;EAC3B,eAAe;EACf,4BAA4B;EAC5B,kCAAkC;EAClC,4BAA4B;EAC5B,sFAAsF;EACtF,YAAY;EACZ,aAAa;EACb,uBAAuB;EACvB,gBAAgB;EAChB,oBAAoB;AACtB;;ADhCyiB;ECmCviB,kCAAkC;EAClC,kCAAkC;AACpC;;ADrCuqB;ECwCrqB,eAAe;EACf,iDAAiD;EACjD,cAAc;AAChB;;AD3CkwB;EC8ChwB,yBAAyB;AAC3B;;AD/C4zB;ECkD1zB,WAAW;AACb;;ADnDg1B;ECsD90B,kCAAkC;EAClC,cAAc;EACd,aAAa;EACb,mBAAmB;EACnB,qBAAqB;EACrB,oBAAoB;AACtB;;AD5D+8B;EC+D78B,iCAAiC;EACjC,mBAAmB;AACrB;;ADjEuhC;ECoErhC,8BAA8B;EAC9B,uBAAuB;EACvB,WAAW;EACX,aAAa;EACb,kBAAkB;EAClB,SAAS;EACT,OAAO;AACT;;AD3EupC;EC8ErpC,WAAW;AACb;;AD/E8qC;ECkF5qC,mCAAmC;EACnC,kCAAkC;EAClC,kCAAkC;EAClC,gBAAgB;EAChB,uCAAuC;AACzC;;ADvFy1C;EC0Fv1C,oCAAoC;EACpC,gFAAgF;EAChF,2DAA2D;AAC7D;;AD7FihD;ECgG/gD,uBAAuB;EACvB,WAAW;EACX,aAAa;EACb,aAAa;AACf;;ADpGwlD;ECuGtlD,kCAAkC;EAClC,2CAA2C;EAC3C,cAAc;EACd,eAAe;EACf,4CAA4C;AAC9C","sourcesContent":[".root{display:flex;justify-content:center;position:relative}.list{display:flex;list-style:none;margin:0;padding:0}.list,.trigger{align-items:center;gap:var(--ac-space-1)}.trigger{background-color:var(--ac-background);border:none;border-radius:var(--ac-radius-md);color:var(--ac-foreground);cursor:pointer;display:inline-flex;font-size:var(--ac-text-sm);font-weight:500;justify-content:center;min-height:var(--ac-size-default);outline:none;padding:0 var(--ac-space-3);transition:background-color var(--ac-transition-fast),color var(--ac-transition-fast)}.trigger:focus-visible,.trigger:hover,.trigger[data-open]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.triggerIcon{height:.875rem;transition:transform var(--ac-transition-normal);width:.875rem}.trigger[data-open] .triggerIcon{transform:rotate(180deg)}.content{width:100%}.link{align-items:center;border-radius:var(--ac-radius-sm);color:inherit;display:inline-flex;outline:none;text-decoration:none}.link:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.viewportWrapper{display:flex;justify-content:center;left:0;padding-top:var(--ac-space-2);position:absolute;top:100%;width:100%}.positioner{z-index:40}.popup{background-color:var(--ac-popover);border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);box-shadow:0 16px 40px -16px rgba(0,0,0,.25);overflow:hidden}.viewport{height:var(--ac-nav-content-height);transition:width var(--ac-transition-normal),height var(--ac-transition-normal);width:min(100vw - 2rem,var(--ac-nav-content-width,20rem))}.indicator{display:flex;height:.5rem;justify-content:center;width:100%}.indicatorInner{background-color:var(--ac-border);border-top-left-radius:var(--ac-radius-xs);height:.625rem;transform:translateY(.125rem) rotate(45deg);width:.625rem}",".root {\n justify-content: center;\n display: flex;\n position: relative;\n}\n\n.list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n}\n\n.list, .trigger {\n align-items: center;\n gap: var(--ac-space-1);\n}\n\n.trigger {\n background-color: var(--ac-background);\n border-radius: var(--ac-radius-md);\n color: var(--ac-foreground);\n cursor: pointer;\n font-size: var(--ac-text-sm);\n min-height: var(--ac-size-default);\n padding: 0 var(--ac-space-3);\n transition: background-color var(--ac-transition-fast),color var(--ac-transition-fast);\n border: none;\n outline: none;\n justify-content: center;\n font-weight: 500;\n display: inline-flex;\n}\n\n.trigger:focus-visible, .trigger:hover, .trigger[data-open] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.triggerIcon {\n height: .875rem;\n transition: transform var(--ac-transition-normal);\n width: .875rem;\n}\n\n.trigger[data-open] .triggerIcon {\n transform: rotate(180deg);\n}\n\n.content {\n width: 100%;\n}\n\n.link {\n border-radius: var(--ac-radius-sm);\n color: inherit;\n outline: none;\n align-items: center;\n text-decoration: none;\n display: inline-flex;\n}\n\n.link:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.viewportWrapper {\n padding-top: var(--ac-space-2);\n justify-content: center;\n width: 100%;\n display: flex;\n position: absolute;\n top: 100%;\n left: 0;\n}\n\n.positioner {\n z-index: 40;\n}\n\n.popup {\n background-color: var(--ac-popover);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n overflow: hidden;\n box-shadow: 0 16px 40px -16px #00000040;\n}\n\n.viewport {\n height: var(--ac-nav-content-height);\n transition: width var(--ac-transition-normal),height var(--ac-transition-normal);\n width: min(100vw - 2rem,var(--ac-nav-content-width, 20rem));\n}\n\n.indicator {\n justify-content: center;\n width: 100%;\n height: .5rem;\n display: flex;\n}\n\n.indicatorInner {\n background-color: var(--ac-border);\n border-top-left-radius: var(--ac-radius-xs);\n width: .625rem;\n height: .625rem;\n transform: translateY(.125rem) rotate(45deg);\n}\n"],"sourceRoot":""}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { NumberField as BaseNumberField } from "@base-ui/react/number-field";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
type NumberFieldProps = React.ComponentPropsWithRef<typeof BaseNumberField.Root>;
|
|
4
|
-
type NumberFieldGroupProps = React.ComponentPropsWithRef<typeof BaseNumberField.Group>;
|
|
5
|
-
type NumberFieldInputProps = React.ComponentPropsWithRef<typeof BaseNumberField.Input>;
|
|
6
|
-
type NumberFieldIncrementProps = React.ComponentPropsWithRef<typeof BaseNumberField.Increment>;
|
|
7
|
-
type NumberFieldDecrementProps = React.ComponentPropsWithRef<typeof BaseNumberField.Decrement>;
|
|
8
|
-
type NumberFieldScrubAreaProps = React.ComponentPropsWithRef<typeof BaseNumberField.ScrubArea>;
|
|
9
3
|
/**
|
|
10
4
|
* Provides a styled numeric input with optional steppers and scrub support.
|
|
11
5
|
*
|
|
@@ -117,27 +111,27 @@ declare namespace NumberFieldScrubArea {
|
|
|
117
111
|
var displayName: string;
|
|
118
112
|
}
|
|
119
113
|
declare namespace NumberField {
|
|
120
|
-
type Props =
|
|
114
|
+
type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Root>;
|
|
121
115
|
type State = BaseNumberField.Root.State;
|
|
122
116
|
}
|
|
123
117
|
declare namespace NumberFieldGroup {
|
|
124
|
-
type Props =
|
|
118
|
+
type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Group>;
|
|
125
119
|
type State = BaseNumberField.Group.State;
|
|
126
120
|
}
|
|
127
121
|
declare namespace NumberFieldInput {
|
|
128
|
-
type Props =
|
|
122
|
+
type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Input>;
|
|
129
123
|
type State = BaseNumberField.Input.State;
|
|
130
124
|
}
|
|
131
125
|
declare namespace NumberFieldIncrement {
|
|
132
|
-
type Props =
|
|
126
|
+
type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Increment>;
|
|
133
127
|
type State = BaseNumberField.Increment.State;
|
|
134
128
|
}
|
|
135
129
|
declare namespace NumberFieldDecrement {
|
|
136
|
-
type Props =
|
|
130
|
+
type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Decrement>;
|
|
137
131
|
type State = BaseNumberField.Decrement.State;
|
|
138
132
|
}
|
|
139
133
|
declare namespace NumberFieldScrubArea {
|
|
140
|
-
type Props =
|
|
134
|
+
type Props = React.ComponentPropsWithRef<typeof BaseNumberField.ScrubArea>;
|
|
141
135
|
type State = BaseNumberField.ScrubArea.State;
|
|
142
136
|
}
|
|
143
137
|
export { NumberField, NumberFieldDecrement, NumberFieldGroup, NumberFieldIncrement, NumberFieldInput, NumberFieldScrubArea };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field.d.ts","sourceRoot":"","sources":["../../../src/components/ui/number-field.tsx"],"names":[],"mappings":"AAGA,OAA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,CAAC;CAChD;AAGD,kBAAU,gBAAgB,CAAC;IACzB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9E,KAAY,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC;CACjD;AAGD,kBAAU,gBAAgB,CAAC;IACzB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9E,KAAY,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC;CACjD;AAGD,kBAAU,oBAAoB,CAAC;IAC7B,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;IAClF,KAAY,KAAK,GAAG,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC;CACrD;AAGD,kBAAU,oBAAoB,CAAC;IAC7B,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;IAClF,KAAY,KAAK,GAAG,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC;CACrD;AAGD,kBAAU,oBAAoB,CAAC;IAC7B,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;IAClF,KAAY,KAAK,GAAG,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC;CACrD;AASD,OAAO,EAAC,WAAW,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAC,CAAC"}
|
|
@@ -3,9 +3,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
4
|
import { NumberField } from "@base-ui/react/number-field";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import { forwardRef } from "react";
|
|
7
6
|
import { cn } from "../../lib/utilities.js";
|
|
8
7
|
import number_field_module from "./number-field.module.js";
|
|
8
|
+
import * as __rspack_external_react from "react";
|
|
9
9
|
function number_field_NumberField(props) {
|
|
10
10
|
const { className, children, render, ...otherProps } = props;
|
|
11
11
|
return /*#__PURE__*/ jsx(NumberField.Root, {
|
|
@@ -20,7 +20,7 @@ function number_field_NumberField(props) {
|
|
|
20
20
|
children: children
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
const NumberFieldGroup = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
23
|
+
const NumberFieldGroup = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
24
24
|
const { className, children, render, ...otherProps } = props;
|
|
25
25
|
return /*#__PURE__*/ jsx(NumberField.Group, {
|
|
26
26
|
ref: ref,
|
|
@@ -35,7 +35,7 @@ const NumberFieldGroup = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
35
35
|
children: children
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
|
-
const NumberFieldInput = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
38
|
+
const NumberFieldInput = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
39
39
|
const { className, render, ...otherProps } = props;
|
|
40
40
|
return /*#__PURE__*/ jsx(NumberField.Input, {
|
|
41
41
|
ref: ref,
|