@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/number-field.js","sources":["../../../src/components/ui/number-field.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {NumberField as BaseNumberField} from \"@base-ui/react/number-field\";\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 \"./number-field.module.css\";\r\n\r\ntype NumberFieldProps = React.ComponentPropsWithRef<typeof BaseNumberField.Root>;\r\ntype NumberFieldGroupProps = React.ComponentPropsWithRef<typeof BaseNumberField.Group>;\r\ntype NumberFieldInputProps = React.ComponentPropsWithRef<typeof BaseNumberField.Input>;\r\ntype NumberFieldIncrementProps = React.ComponentPropsWithRef<typeof BaseNumberField.Increment>;\r\ntype NumberFieldDecrementProps = React.ComponentPropsWithRef<typeof BaseNumberField.Decrement>;\r\ntype NumberFieldScrubAreaProps = React.ComponentPropsWithRef<typeof BaseNumberField.ScrubArea>;\r\n\r\n/**\r\n * Provides a styled numeric input with optional steppers and scrub support.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on Base UI Number Field primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberField defaultValue={2}>\r\n * <NumberFieldGroup>\r\n * <NumberFieldDecrement />\r\n * <NumberFieldInput />\r\n * <NumberFieldIncrement />\r\n * </NumberFieldGroup>\r\n * </NumberField>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nfunction NumberField(props: Readonly<NumberField.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.Root\r\n {...otherProps}\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 </BaseNumberField.Root>\r\n );\r\n}\r\n\r\n/**\r\n * Wraps the interactive number-field controls in a shared container.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on Base UI Number Field group primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberFieldGroup>\r\n * <NumberFieldInput />\r\n * </NumberFieldGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nconst NumberFieldGroup = React.forwardRef<React.ComponentRef<typeof BaseNumberField.Group>, NumberFieldGroup.Props>(\r\n (props: Readonly<NumberFieldGroup.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.Group\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.group, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseNumberField.Group>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the text input used for numeric entry.\r\n *\r\n * @remarks\r\n * - Renders an `<input>` element by default\r\n * - Built on Base UI Number Field input primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberFieldInput aria-label='Quantity' />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nconst NumberFieldInput = React.forwardRef<React.ComponentRef<typeof BaseNumberField.Input>, NumberFieldInput.Props>(\r\n (props: Readonly<NumberFieldInput.Props>, ref): React.ReactElement => {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.Input\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"input\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.input, className)}, {}),\r\n })}\r\n />\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the increment control for a number field.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on Base UI Number Field increment primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberFieldIncrement />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nfunction NumberFieldIncrement(props: Readonly<NumberFieldIncrement.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.Increment\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.stepper, styles.increment, className)}, {}),\r\n })}>\r\n {children ?? <span className={styles.stepperSymbol}>+</span>}\r\n </BaseNumberField.Increment>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the decrement control for a number field.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on Base UI Number Field decrement primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberFieldDecrement />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nfunction NumberFieldDecrement(props: Readonly<NumberFieldDecrement.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.Decrement\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.stepper, styles.decrement, className)}, {}),\r\n })}>\r\n {children ?? <span className={styles.stepperSymbol}>−</span>}\r\n </BaseNumberField.Decrement>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the scrub handle used for drag-to-adjust interactions.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element by default\r\n * - Built on Base UI Number Field scrub-area primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberFieldScrubArea />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nfunction NumberFieldScrubArea(props: Readonly<NumberFieldScrubArea.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.ScrubArea\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"span\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.scrubArea, className)}, {}),\r\n })}>\r\n {children ?? <span className={styles.scrubHandle}>⋮⋮</span>}\r\n </BaseNumberField.ScrubArea>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberField {\r\n export type Props = NumberFieldProps;\r\n export type State = BaseNumberField.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberFieldGroup {\r\n export type Props = NumberFieldGroupProps;\r\n export type State = BaseNumberField.Group.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberFieldInput {\r\n export type Props = NumberFieldInputProps;\r\n export type State = BaseNumberField.Input.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberFieldIncrement {\r\n export type Props = NumberFieldIncrementProps;\r\n export type State = BaseNumberField.Increment.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberFieldDecrement {\r\n export type Props = NumberFieldDecrementProps;\r\n export type State = BaseNumberField.Decrement.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberFieldScrubArea {\r\n export type Props = NumberFieldScrubAreaProps;\r\n export type State = BaseNumberField.ScrubArea.State;\r\n}\r\n\r\nNumberField.displayName = \"NumberField\";\r\nNumberFieldGroup.displayName = \"NumberFieldGroup\";\r\nNumberFieldInput.displayName = \"NumberFieldInput\";\r\nNumberFieldIncrement.displayName = \"NumberFieldIncrement\";\r\nNumberFieldDecrement.displayName = \"NumberFieldDecrement\";\r\nNumberFieldScrubArea.displayName = \"NumberFieldScrubArea\";\r\n\r\nexport {NumberField, NumberFieldDecrement, NumberFieldGroup, NumberFieldIncrement, NumberFieldInput, NumberFieldScrubArea};\r\n"],"names":["NumberField","props","className","children","render","otherProps","BaseNumberField","useRender","mergeProps","cn","styles","NumberFieldGroup","React","ref","NumberFieldInput","NumberFieldIncrement","NumberFieldDecrement","NumberFieldScrubArea"],"mappings":";;;;;;;;AAqCA,SAASA,yBAAYC,KAAkC;IACrD,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAErD,OAAO,WAAP,GACE,IAACK,YAAAA,IAAoB;QAClB,GAAGD,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,IAAW,EAAER;YAAU,GAAG,CAAC;QAC9D;kBACCC;;AAGP;AAkBA,MAAMQ,mBAAmB,WAAHA,GAAGC,WACvB,CAACX,OAAyCY;IACxC,MAAM,EAACX,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAErD,OAAO,WAAP,GACE,IAACK,YAAAA,KAAqB;QACpB,KAAKO;QACJ,GAAGR,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,KAAY,EAAER;YAAU,GAAG,CAAC;QAC/D;kBACCC;;AAGP;AAiBF,MAAMW,mBAAmB,WAAHA,GAAGF,WACvB,CAACX,OAAyCY;IACxC,MAAM,EAACX,SAAS,EAAEE,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAE3C,OAAO,WAAP,GACE,IAACK,YAAAA,KAAqB;QACpB,KAAKO;QACJ,GAAGR,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,KAAY,EAAER;YAAU,GAAG,CAAC;QAC/D;;AAGN;AAiBF,SAASa,qBAAqBd,KAA2C;IACvE,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAErD,OAAO,WAAP,GACE,IAACK,YAAAA,SAAyB;QACvB,GAAGD,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,OAAc,EAAEA,oBAAAA,SAAgB,EAAER;YAAU,GAAG,CAAC;QACnF;kBACCC,YAAY,WAAZA,GAAY,IAAC;YAAK,WAAWO,oBAAAA,aAAoB;sBAAE;;;AAG1D;AAgBA,SAASM,qBAAqBf,KAA2C;IACvE,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAErD,OAAO,WAAP,GACE,IAACK,YAAAA,SAAyB;QACvB,GAAGD,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,OAAc,EAAEA,oBAAAA,SAAgB,EAAER;YAAU,GAAG,CAAC;QACnF;kBACCC,YAAY,WAAZA,GAAY,IAAC;YAAK,WAAWO,oBAAAA,aAAoB;sBAAE;;;AAG1D;AAgBA,SAASO,qBAAqBhB,KAA2C;IACvE,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAErD,OAAO,WAAP,GACE,IAACK,YAAAA,SAAyB;QACvB,GAAGD,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,SAAgB,EAAER;YAAU,GAAG,CAAC;QACnE;kBACCC,YAAY,WAAZA,GAAY,IAAC;YAAK,WAAWO,oBAAAA,WAAkB;sBAAE;;;AAGxD;AAsCAV,yBAAY,WAAW,GAAG;AAC1BW,iBAAiB,WAAW,GAAG;AAC/BG,iBAAiB,WAAW,GAAG;AAC/BC,qBAAqB,WAAW,GAAG;AACnCC,qBAAqB,WAAW,GAAG;AACnCC,qBAAqB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/number-field.js","sources":["../../../src/components/ui/number-field.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {NumberField as BaseNumberField} from \"@base-ui/react/number-field\";\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 \"./number-field.module.css\";\r\n\r\n/**\r\n * Provides a styled numeric input with optional steppers and scrub support.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on Base UI Number Field primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberField defaultValue={2}>\r\n * <NumberFieldGroup>\r\n * <NumberFieldDecrement />\r\n * <NumberFieldInput />\r\n * <NumberFieldIncrement />\r\n * </NumberFieldGroup>\r\n * </NumberField>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nfunction NumberField(props: Readonly<NumberField.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.Root\r\n {...otherProps}\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 </BaseNumberField.Root>\r\n );\r\n}\r\n\r\n/**\r\n * Wraps the interactive number-field controls in a shared container.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on Base UI Number Field group primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberFieldGroup>\r\n * <NumberFieldInput />\r\n * </NumberFieldGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nconst NumberFieldGroup = React.forwardRef<React.ComponentRef<typeof BaseNumberField.Group>, NumberFieldGroup.Props>(\r\n (props: Readonly<NumberFieldGroup.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.Group\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.group, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseNumberField.Group>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the text input used for numeric entry.\r\n *\r\n * @remarks\r\n * - Renders an `<input>` element by default\r\n * - Built on Base UI Number Field input primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberFieldInput aria-label='Quantity' />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nconst NumberFieldInput = React.forwardRef<React.ComponentRef<typeof BaseNumberField.Input>, NumberFieldInput.Props>(\r\n (props: Readonly<NumberFieldInput.Props>, ref): React.ReactElement => {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.Input\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"input\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.input, className)}, {}),\r\n })}\r\n />\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the increment control for a number field.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on Base UI Number Field increment primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberFieldIncrement />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nfunction NumberFieldIncrement(props: Readonly<NumberFieldIncrement.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.Increment\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.stepper, styles.increment, className)}, {}),\r\n })}>\r\n {children ?? <span className={styles.stepperSymbol}>+</span>}\r\n </BaseNumberField.Increment>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the decrement control for a number field.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on Base UI Number Field decrement primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberFieldDecrement />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nfunction NumberFieldDecrement(props: Readonly<NumberFieldDecrement.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.Decrement\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.stepper, styles.decrement, className)}, {}),\r\n })}>\r\n {children ?? <span className={styles.stepperSymbol}>−</span>}\r\n </BaseNumberField.Decrement>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the scrub handle used for drag-to-adjust interactions.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element by default\r\n * - Built on Base UI Number Field scrub-area primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <NumberFieldScrubArea />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/number-field | Base UI Number Field Docs}\r\n */\r\nfunction NumberFieldScrubArea(props: Readonly<NumberFieldScrubArea.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseNumberField.ScrubArea\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"span\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.scrubArea, className)}, {}),\r\n })}>\r\n {children ?? <span className={styles.scrubHandle}>⋮⋮</span>}\r\n </BaseNumberField.ScrubArea>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberField {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Root>;\r\n export type State = BaseNumberField.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberFieldGroup {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Group>;\r\n export type State = BaseNumberField.Group.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberFieldInput {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Input>;\r\n export type State = BaseNumberField.Input.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberFieldIncrement {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Increment>;\r\n export type State = BaseNumberField.Increment.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberFieldDecrement {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Decrement>;\r\n export type State = BaseNumberField.Decrement.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace NumberFieldScrubArea {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.ScrubArea>;\r\n export type State = BaseNumberField.ScrubArea.State;\r\n}\r\n\r\nNumberField.displayName = \"NumberField\";\r\nNumberFieldGroup.displayName = \"NumberFieldGroup\";\r\nNumberFieldInput.displayName = \"NumberFieldInput\";\r\nNumberFieldIncrement.displayName = \"NumberFieldIncrement\";\r\nNumberFieldDecrement.displayName = \"NumberFieldDecrement\";\r\nNumberFieldScrubArea.displayName = \"NumberFieldScrubArea\";\r\n\r\nexport {NumberField, NumberFieldDecrement, NumberFieldGroup, NumberFieldIncrement, NumberFieldInput, NumberFieldScrubArea};\r\n"],"names":["NumberField","props","className","children","render","otherProps","BaseNumberField","useRender","mergeProps","cn","styles","NumberFieldGroup","React","ref","NumberFieldInput","NumberFieldIncrement","NumberFieldDecrement","NumberFieldScrubArea"],"mappings":";;;;;;;;AA8BA,SAASA,yBAAYC,KAAkC;IACrD,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAErD,OAAO,WAAP,GACE,IAACK,YAAAA,IAAoB;QAClB,GAAGD,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,IAAW,EAAER;YAAU,GAAG,CAAC;QAC9D;kBACCC;;AAGP;AAkBA,MAAMQ,mBAAmB,WAAHA,GAAGC,wBAAAA,UAAgB,CACvC,CAACX,OAAyCY;IACxC,MAAM,EAACX,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAErD,OAAO,WAAP,GACE,IAACK,YAAAA,KAAqB;QACpB,KAAKO;QACJ,GAAGR,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,KAAY,EAAER;YAAU,GAAG,CAAC;QAC/D;kBACCC;;AAGP;AAiBF,MAAMW,mBAAmB,WAAHA,GAAGF,wBAAAA,UAAgB,CACvC,CAACX,OAAyCY;IACxC,MAAM,EAACX,SAAS,EAAEE,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAE3C,OAAO,WAAP,GACE,IAACK,YAAAA,KAAqB;QACpB,KAAKO;QACJ,GAAGR,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,KAAY,EAAER;YAAU,GAAG,CAAC;QAC/D;;AAGN;AAiBF,SAASa,qBAAqBd,KAA2C;IACvE,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAErD,OAAO,WAAP,GACE,IAACK,YAAAA,SAAyB;QACvB,GAAGD,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,OAAc,EAAEA,oBAAAA,SAAgB,EAAER;YAAU,GAAG,CAAC;QACnF;kBACCC,YAAY,WAAZA,GAAY,IAAC;YAAK,WAAWO,oBAAAA,aAAoB;sBAAE;;;AAG1D;AAgBA,SAASM,qBAAqBf,KAA2C;IACvE,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAErD,OAAO,WAAP,GACE,IAACK,YAAAA,SAAyB;QACvB,GAAGD,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,OAAc,EAAEA,oBAAAA,SAAgB,EAAER;YAAU,GAAG,CAAC;QACnF;kBACCC,YAAY,WAAZA,GAAY,IAAC;YAAK,WAAWO,oBAAAA,aAAoB;sBAAE;;;AAG1D;AAgBA,SAASO,qBAAqBhB,KAA2C;IACvE,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAErD,OAAO,WAAP,GACE,IAACK,YAAAA,SAAyB;QACvB,GAAGD,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,oBAAAA,SAAgB,EAAER;YAAU,GAAG,CAAC;QACnE;kBACCC,YAAY,WAAZA,GAAY,IAAC;YAAK,WAAWO,oBAAAA,WAAkB;sBAAE;;;AAGxD;AAsCAV,yBAAY,WAAW,GAAG;AAC1BW,iBAAiB,WAAW,GAAG;AAC/BG,iBAAiB,WAAW,GAAG;AAC/BC,qBAAqB,WAAW,GAAG;AACnCC,qBAAqB,WAAW,GAAG;AACnCC,qBAAqB,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/number-field.module.css","webpack://./src/components/ui/number-field.module.css"],"names":[],"mappings":"AAAA;ECCE,sBAAsB;EACtB,aAAa;AACf;;ADHyC;ECMvC,sCAAsC;EACtC,iCAAiC;EACjC,kCAAkC;EAClC,kCAAkC;EAClC,uFAAuF;EACvF,oBAAoB;EACpB,WAAW;EACX,aAAa;EACb,gBAAgB;EAChB,+BAA+B;;EDfoV;ICkBjX,4BAA4B;IAC5B,oCAAoC;EACtC;;EDpBkc;ICuBhc,mCAAmC;IACnC,+EAA+E;EACjF;AACF;;AD1BwmB;EC6BtmB,+CAA+C;AACjD;;AD9BkqB;ECiChqB,sBAAsB;EACtB,2BAA2B;EAC3B,4BAA4B;EAC5B,YAAY;EACZ,4BAA4B;EAC5B,uBAAuB;EACvB,SAAS;EACT,aAAa;EACb,UAAU;EACV,gBAAgB;;ED1C61B;IC6C32B,iCAAiC;EACnC;;ED9C65B;ICiD35B,gBAAgB;EAClB;;EDlD67B;ICqD37B,mBAAmB;EACrB;AACF;;ADvD89B;EC0D59B,kFAAkF;EAClF,2BAA2B;EAC3B,eAAe;EACf,4BAA4B;EAC5B,iCAAiC;EACjC,4BAA4B;EAC5B,sFAAsF;EACtF,yBAAyB;EACzB,iBAAiB;EACjB,SAAS;EACT,aAAa;EACb,UAAU;EACV,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;EAChB,cAAc;EACd,oBAAoB;;ED1Ew5C;IC6E16C,kCAAkC;IAClC,0CAA0C;IAC1C,UAAU;IACV,kBAAkB;EACpB;;EDjFoiD;ICoFliD,mBAAmB;IACnB,WAAW;EACb;;EDtFmlD;IAAqB;MC0FpmD,kCAAkC;MAClC,kCAAkC;IACpC;EACF;AACF;;AD9F6sD;ECiG3sD,6BAA6B;AAC/B;;ADlGgwD;ECqG9vD,gFAAgF;EAChF,wBAAwB;AAC1B;;ADvGq7D;EC0Gn7D,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,cAAc;EACd,oBAAoB;AACtB;;AD/G2hE;ECkHzhE,iCAAiC;EACjC,2DAA2D;AAC7D;;ADpHkoE;ECuHhoE,4BAA4B;EAC5B,sBAAsB;AACxB","sourcesContent":[".root{display:grid;gap:var(--ac-space-2)}.group{align-items:stretch;background-color:var(--ac-background);border:1px solid var(--ac-input);border-radius:var(--ac-radius-md);box-shadow:0 1px 2px 0 rgba(0,0,0,.04);display:flex;min-height:var(--ac-size-default);overflow:hidden;transition:border-color var(--ac-transition-fast),box-shadow var(--ac-transition-fast);width:100%;&:focus-within{border-color:var(--ac-ring);box-shadow:0 0 0 1px var(--ac-ring)}&:has([aria-invalid=true]),&:has([data-invalid]){border-color:var(--ac-destructive);box-shadow:0 0 0 1px color-mix(in oklch,var(--ac-destructive),transparent 65%)}}.group>*+*{border-inline-start:1px solid var(--ac-border)}.input{background-color:transparent;border:0;box-sizing:border-box;color:var(--ac-foreground);flex:1 1 auto;font-size:var(--ac-text-sm);line-height:1.5;min-width:0;outline:none;padding:0 var(--ac-space-3);&::placeholder{color:var(--ac-muted-foreground)}&:focus-visible{box-shadow:none}&:disabled{cursor:not-allowed}}.scrubArea,.stepper{align-items:center;background-color:color-mix(in oklch,var(--ac-secondary),var(--ac-background) 30%);border:0;color:var(--ac-foreground);cursor:pointer;display:inline-flex;flex:0 0 auto;font-size:var(--ac-text-xs);font-weight:600;justify-content:center;line-height:1;min-width:var(--ac-size-default);outline:none;padding:0 var(--ac-space-2);transition:background-color var(--ac-transition-fast),color var(--ac-transition-fast);user-select:none;&:focus-visible{background-color:var(--ac-accent);box-shadow:inset 0 0 0 1px var(--ac-ring);position:relative;z-index:1}&[data-disabled]{cursor:not-allowed;opacity:.5}@media (hover:hover){&:hover:not([data-disabled]){background-color:var(--ac-accent);color:var(--ac-accent-foreground)}}}.decrement,.increment{width:var(--ac-size-default)}.decrement[data-pressed],.increment[data-pressed],.scrubArea[data-scrubbing]{background-color:color-mix(in oklch,var(--ac-primary),var(--ac-background) 78%);color:var(--ac-primary)}.stepperSymbol{align-items:center;display:inline-flex;justify-content:center;line-height:1;width:1rem}.scrubArea{color:var(--ac-muted-foreground);min-width:calc(var(--ac-size-default) - var(--ac-space-1))}.scrubHandle{font-size:var(--ac-text-sm);letter-spacing:-.15em}",".root {\n gap: var(--ac-space-2);\n display: grid;\n}\n\n.group {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-input);\n border-radius: var(--ac-radius-md);\n min-height: var(--ac-size-default);\n transition: border-color var(--ac-transition-fast),box-shadow var(--ac-transition-fast);\n align-items: stretch;\n width: 100%;\n display: flex;\n overflow: hidden;\n box-shadow: 0 1px 2px #0000000a;\n\n &:focus-within {\n border-color: var(--ac-ring);\n box-shadow: 0 0 0 1px var(--ac-ring);\n }\n\n &:has([aria-invalid=\"true\"]), &:has([data-invalid]) {\n border-color: var(--ac-destructive);\n box-shadow: 0 0 0 1px color-mix(in oklch,var(--ac-destructive),transparent 65%);\n }\n}\n\n.group > * + * {\n border-inline-start: 1px solid var(--ac-border);\n}\n\n.input {\n box-sizing: border-box;\n color: var(--ac-foreground);\n font-size: var(--ac-text-sm);\n min-width: 0;\n padding: 0 var(--ac-space-3);\n background-color: #0000;\n border: 0;\n outline: none;\n flex: auto;\n line-height: 1.5;\n\n &::placeholder {\n color: var(--ac-muted-foreground);\n }\n\n &:focus-visible {\n box-shadow: none;\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n}\n\n.scrubArea, .stepper {\n background-color: color-mix(in oklch,var(--ac-secondary),var(--ac-background) 30%);\n color: var(--ac-foreground);\n cursor: pointer;\n font-size: var(--ac-text-xs);\n min-width: var(--ac-size-default);\n padding: 0 var(--ac-space-2);\n transition: background-color var(--ac-transition-fast),color var(--ac-transition-fast);\n -webkit-user-select: none;\n user-select: none;\n border: 0;\n outline: none;\n flex: none;\n justify-content: center;\n align-items: center;\n font-weight: 600;\n line-height: 1;\n display: inline-flex;\n\n &:focus-visible {\n background-color: var(--ac-accent);\n box-shadow: inset 0 0 0 1px var(--ac-ring);\n z-index: 1;\n position: relative;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: .5;\n }\n\n @media (hover: hover) {\n &:hover:not([data-disabled]) {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n }\n }\n}\n\n.decrement, .increment {\n width: var(--ac-size-default);\n}\n\n.decrement[data-pressed], .increment[data-pressed], .scrubArea[data-scrubbing] {\n background-color: color-mix(in oklch,var(--ac-primary),var(--ac-background) 78%);\n color: var(--ac-primary);\n}\n\n.stepperSymbol {\n justify-content: center;\n align-items: center;\n width: 1rem;\n line-height: 1;\n display: inline-flex;\n}\n\n.scrubArea {\n color: var(--ac-muted-foreground);\n min-width: calc(var(--ac-size-default) - var(--ac-space-1));\n}\n\n.scrubHandle {\n font-size: var(--ac-text-sm);\n letter-spacing: -.15em;\n}\n"],"sourceRoot":""}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
4
|
import { cn } from "../../lib/utilities.js";
|
|
6
5
|
import button_module from "./button.module.js";
|
|
7
6
|
import pagination_module from "./pagination.module.js";
|
|
7
|
+
import * as __rspack_external_react from "react";
|
|
8
8
|
const buttonSizeStyles = {
|
|
9
9
|
default: button_module.sizeDefault,
|
|
10
10
|
icon: button_module.sizeIcon,
|
|
11
11
|
lg: button_module.sizeLg,
|
|
12
12
|
sm: button_module.sizeSm
|
|
13
13
|
};
|
|
14
|
-
const Pagination = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("nav", {
|
|
14
|
+
const Pagination = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("nav", {
|
|
15
15
|
ref: ref,
|
|
16
16
|
role: "navigation",
|
|
17
17
|
"aria-label": "pagination",
|
|
18
18
|
className: cn(pagination_module.root, className),
|
|
19
19
|
...props
|
|
20
20
|
}));
|
|
21
|
-
const PaginationContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("ul", {
|
|
21
|
+
const PaginationContent = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("ul", {
|
|
22
22
|
ref: ref,
|
|
23
23
|
className: cn(pagination_module.content, className),
|
|
24
24
|
...props
|
|
25
25
|
}));
|
|
26
|
-
const PaginationItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("li", {
|
|
26
|
+
const PaginationItem = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("li", {
|
|
27
27
|
ref: ref,
|
|
28
28
|
className: cn(pagination_module.item, className),
|
|
29
29
|
...props
|
|
30
30
|
}));
|
|
31
|
-
const PaginationLink = /*#__PURE__*/ forwardRef(({ className, isActive = false, size = "icon", ...props }, ref)=>/*#__PURE__*/ jsx("a", {
|
|
31
|
+
const PaginationLink = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, isActive = false, size = "icon", ...props }, ref)=>/*#__PURE__*/ jsx("a", {
|
|
32
32
|
ref: ref,
|
|
33
33
|
"aria-current": isActive ? "page" : void 0,
|
|
34
34
|
className: cn(button_module.button, isActive ? button_module.outline : button_module.ghost, buttonSizeStyles[size], pagination_module.link, className),
|
|
35
35
|
...props
|
|
36
36
|
}));
|
|
37
|
-
const PaginationPrevious = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs(PaginationLink, {
|
|
37
|
+
const PaginationPrevious = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs(PaginationLink, {
|
|
38
38
|
ref: ref,
|
|
39
39
|
"aria-label": "Go to previous page",
|
|
40
40
|
size: "default",
|
|
@@ -47,7 +47,7 @@ const PaginationPrevious = /*#__PURE__*/ forwardRef(({ className, ...props }, re
|
|
|
47
47
|
})
|
|
48
48
|
]
|
|
49
49
|
}));
|
|
50
|
-
const PaginationNext = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs(PaginationLink, {
|
|
50
|
+
const PaginationNext = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs(PaginationLink, {
|
|
51
51
|
ref: ref,
|
|
52
52
|
"aria-label": "Go to next page",
|
|
53
53
|
size: "default",
|
|
@@ -60,7 +60,7 @@ const PaginationNext = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>
|
|
|
60
60
|
/*#__PURE__*/ jsx(ChevronRight, {})
|
|
61
61
|
]
|
|
62
62
|
}));
|
|
63
|
-
const PaginationEllipsis = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs("span", {
|
|
63
|
+
const PaginationEllipsis = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs("span", {
|
|
64
64
|
ref: ref,
|
|
65
65
|
"aria-hidden": "true",
|
|
66
66
|
className: cn(pagination_module.ellipsis, className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/pagination.js","sources":["../../../src/components/ui/pagination.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable jsx-a11y/anchor-has-content */\r\n\r\nimport {ChevronLeft, ChevronRight, MoreHorizontal} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport type {ButtonProps} from \"@/components/ui/button\";\r\nimport {cn} from \"@/lib/utilities\";\r\nimport buttonStyles from \"./button.module.css\";\r\nimport styles from \"./pagination.module.css\";\r\n\r\n/**\r\n * Props for the {@link Pagination} component.\r\n */\r\nexport type PaginationProps = React.ComponentPropsWithoutRef<\"nav\">;\r\n\r\n/**\r\n * Props for the {@link PaginationContent} component.\r\n */\r\nexport type PaginationContentProps = React.ComponentPropsWithoutRef<\"ul\">;\r\n\r\n/**\r\n * Props for the {@link PaginationItem} component.\r\n */\r\nexport type PaginationItemProps = React.ComponentPropsWithoutRef<\"li\">;\r\n\r\n/**\r\n * Props for the {@link PaginationLink} component.\r\n */\r\nexport interface PaginationLinkProps extends Pick<ButtonProps, \"size\">, React.ComponentPropsWithoutRef<\"a\"> {\r\n /** Marks the link as the current active page. @default false */\r\n isActive?: boolean;\r\n}\r\n\r\n/**\r\n * Props for the {@link PaginationPrevious} component.\r\n */\r\nexport type PaginationPreviousProps = React.ComponentPropsWithoutRef<typeof PaginationLink>;\r\n\r\n/**\r\n * Props for the {@link PaginationNext} component.\r\n */\r\nexport type PaginationNextProps = React.ComponentPropsWithoutRef<typeof PaginationLink>;\r\n\r\n/**\r\n * Props for the {@link PaginationEllipsis} component.\r\n */\r\nexport type PaginationEllipsisProps = React.ComponentPropsWithoutRef<\"span\">;\r\n\r\nconst buttonSizeStyles: Record<NonNullable<ButtonProps[\"size\"]>, string> = {\r\n default: buttonStyles.sizeDefault,\r\n icon: buttonStyles.sizeIcon,\r\n lg: buttonStyles.sizeLg,\r\n sm: buttonStyles.sizeSm,\r\n};\r\n\r\n/**\r\n * Provides semantic navigation for paginated content.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<nav>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <Pagination>\r\n * <PaginationContent />\r\n * </Pagination>\r\n * ```\r\n *\r\n * @see {@link PaginationProps} for available props\r\n */\r\nconst Pagination = React.forwardRef<HTMLElement, PaginationProps>(\r\n ({className, ...props}: Readonly<PaginationProps>, ref): React.JSX.Element => (\r\n <nav\r\n ref={ref}\r\n role='navigation'\r\n aria-label='pagination'\r\n className={cn(styles.root, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Wraps pagination items in a flex-based list container.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<ul>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationContent>\r\n * <PaginationItem />\r\n * </PaginationContent>\r\n * ```\r\n *\r\n * @see {@link PaginationContentProps} for available props\r\n */\r\nconst PaginationContent = React.forwardRef<HTMLUListElement, PaginationContentProps>(\r\n ({className, ...props}: Readonly<PaginationContentProps>, ref): React.JSX.Element => (\r\n <ul\r\n ref={ref}\r\n className={cn(styles.content, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Wraps an individual pagination control.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<li>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationItem>\r\n * <PaginationLink href='?page=1'>1</PaginationLink>\r\n * </PaginationItem>\r\n * ```\r\n *\r\n * @see {@link PaginationItemProps} for available props\r\n */\r\nconst PaginationItem = React.forwardRef<HTMLLIElement, PaginationItemProps>(\r\n ({className, ...props}: Readonly<PaginationItemProps>, ref): React.JSX.Element => (\r\n <li\r\n ref={ref}\r\n className={cn(styles.item, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders an anchor styled to match pagination controls.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<a>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationLink href='?page=2' isActive>\r\n * 2\r\n * </PaginationLink>\r\n * ```\r\n *\r\n * @see {@link PaginationLinkProps} for available props\r\n */\r\nconst PaginationLink = React.forwardRef<HTMLAnchorElement, PaginationLinkProps>(\r\n ({className, isActive = false, size = \"icon\", ...props}: Readonly<PaginationLinkProps>, ref): React.JSX.Element => {\r\n return (\r\n <a\r\n ref={ref}\r\n aria-current={isActive ? \"page\" : undefined}\r\n className={cn(\r\n buttonStyles.button,\r\n isActive ? buttonStyles.outline : buttonStyles.ghost,\r\n buttonSizeStyles[size],\r\n styles.link,\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the pagination control for navigating to the previous page.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<a>` element through {@link PaginationLink}\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationPrevious href='?page=1' />\r\n * ```\r\n *\r\n * @see {@link PaginationPreviousProps} for available props\r\n */\r\nconst PaginationPrevious = React.forwardRef<HTMLAnchorElement, PaginationPreviousProps>(\r\n ({className, ...props}: Readonly<PaginationPreviousProps>, ref): React.JSX.Element => (\r\n <PaginationLink\r\n ref={ref}\r\n aria-label='Go to previous page'\r\n size='default'\r\n className={cn(styles.previous, className)}\r\n {...props}>\r\n <ChevronLeft />\r\n <span>Previous</span>\r\n </PaginationLink>\r\n ),\r\n);\r\n\r\n/**\r\n * Renders the pagination control for navigating to the next page.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<a>` element through {@link PaginationLink}\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationNext href='?page=3' />\r\n * ```\r\n *\r\n * @see {@link PaginationNextProps} for available props\r\n */\r\nconst PaginationNext = React.forwardRef<HTMLAnchorElement, PaginationNextProps>(\r\n ({className, ...props}: Readonly<PaginationNextProps>, ref): React.JSX.Element => (\r\n <PaginationLink\r\n ref={ref}\r\n aria-label='Go to next page'\r\n size='default'\r\n className={cn(styles.next, className)}\r\n {...props}>\r\n <span>Next</span>\r\n <ChevronRight />\r\n </PaginationLink>\r\n ),\r\n);\r\n\r\n/**\r\n * Indicates truncated page ranges within pagination.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<span>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationEllipsis />\r\n * ```\r\n *\r\n * @see {@link PaginationEllipsisProps} for available props\r\n */\r\nconst PaginationEllipsis = React.forwardRef<HTMLSpanElement, PaginationEllipsisProps>(\r\n ({className, ...props}: Readonly<PaginationEllipsisProps>, ref): React.JSX.Element => (\r\n <span\r\n ref={ref}\r\n aria-hidden='true'\r\n className={cn(styles.ellipsis, className)}\r\n {...props}>\r\n <MoreHorizontal />\r\n <span className={styles.srOnly}>More pages</span>\r\n </span>\r\n ),\r\n);\r\n\r\nPagination.displayName = \"Pagination\";\r\nPaginationContent.displayName = \"PaginationContent\";\r\nPaginationItem.displayName = \"PaginationItem\";\r\nPaginationLink.displayName = \"PaginationLink\";\r\nPaginationPrevious.displayName = \"PaginationPrevious\";\r\nPaginationNext.displayName = \"PaginationNext\";\r\nPaginationEllipsis.displayName = \"PaginationEllipsis\";\r\n\r\nexport {Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious};\r\n"],"names":["buttonSizeStyles","buttonStyles","Pagination","React","className","props","ref","cn","styles","PaginationContent","PaginationItem","PaginationLink","isActive","size","undefined","PaginationPrevious","ChevronLeft","PaginationNext","ChevronRight","PaginationEllipsis","MoreHorizontal"],"mappings":";;;;;;;AAkDA,MAAMA,mBAAqE;IACzE,SAASC,cAAAA,WAAwB;IACjC,MAAMA,cAAAA,QAAqB;IAC3B,IAAIA,cAAAA,MAAmB;IACvB,IAAIA,cAAAA,MAAmB;AACzB;AAmBA,MAAMC,aAAa,WAAHA,GAAGC,WACjB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAiC,EAAEC,MAAAA,WAAAA,GACjD,IAAC;QACC,KAAKA;QACL,MAAK;QACL,cAAW;QACX,WAAWC,GAAGC,kBAAAA,IAAW,EAAEJ;QAC1B,GAAGC,KAAK;;AAsBf,MAAMI,oBAAoB,WAAHA,GAAGN,WACxB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAwC,EAAEC,MAAAA,WAAAA,GACxD,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,kBAAAA,OAAc,EAAEJ;QAC7B,GAAGC,KAAK;;AAsBf,MAAMK,iBAAiB,WAAHA,GAAGP,WACrB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAqC,EAAEC,MAAAA,WAAAA,GACrD,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,kBAAAA,IAAW,EAAEJ;QAC1B,GAAGC,KAAK;;AAsBf,MAAMM,iBAAiB,WAAHA,GAAGR,WACrB,CAAC,EAACC,SAAS,EAAEQ,WAAW,KAAK,EAAEC,OAAO,MAAM,EAAE,GAAGR,OAAqC,EAAEC,MAC/E,WAAP,GACE,IAAC;QACC,KAAKA;QACL,gBAAcM,WAAW,SAASE;QAClC,WAAWP,GACTN,cAAAA,MAAmB,EACnBW,WAAWX,cAAAA,OAAoB,GAAGA,cAAAA,KAAkB,EACpDD,gBAAgB,CAACa,KAAK,EACtBL,kBAAAA,IAAW,EACXJ;QAED,GAAGC,KAAK;;AAqBjB,MAAMU,qBAAqB,WAAHA,GAAGZ,WACzB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAyC,EAAEC,MAAAA,WAAAA,GACzD,KAACK,gBAAcA;QACb,KAAKL;QACL,cAAW;QACX,MAAK;QACL,WAAWC,GAAGC,kBAAAA,QAAe,EAAEJ;QAC9B,GAAGC,KAAK;;0BACT,IAACW,aAAWA,CAAAA;0BACZ,IAAC;0BAAK;;;;AAoBZ,MAAMC,iBAAiB,WAAHA,GAAGd,WACrB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAqC,EAAEC,MAAAA,WAAAA,GACrD,KAACK,gBAAcA;QACb,KAAKL;QACL,cAAW;QACX,MAAK;QACL,WAAWC,GAAGC,kBAAAA,IAAW,EAAEJ;QAC1B,GAAGC,KAAK;;0BACT,IAAC;0BAAK;;0BACN,IAACa,cAAYA,CAAAA;;;AAoBnB,MAAMC,qBAAqB,WAAHA,GAAGhB,WACzB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAyC,EAAEC,MAAAA,WAAAA,GACzD,KAAC;QACC,KAAKA;QACL,eAAY;QACZ,WAAWC,GAAGC,kBAAAA,QAAe,EAAEJ;QAC9B,GAAGC,KAAK;;0BACT,IAACe,gBAAcA,CAAAA;0BACf,IAAC;gBAAK,WAAWZ,kBAAAA,MAAa;0BAAE;;;;AAKtCN,WAAW,WAAW,GAAG;AACzBO,kBAAkB,WAAW,GAAG;AAChCC,eAAe,WAAW,GAAG;AAC7BC,eAAe,WAAW,GAAG;AAC7BI,mBAAmB,WAAW,GAAG;AACjCE,eAAe,WAAW,GAAG;AAC7BE,mBAAmB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/pagination.js","sources":["../../../src/components/ui/pagination.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable jsx-a11y/anchor-has-content */\r\n\r\nimport {ChevronLeft, ChevronRight, MoreHorizontal} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport type {ButtonProps} from \"@/components/ui/button\";\r\nimport {cn} from \"@/lib/utilities\";\r\nimport buttonStyles from \"./button.module.css\";\r\nimport styles from \"./pagination.module.css\";\r\n\r\n/**\r\n * Props for the {@link Pagination} component.\r\n */\r\nexport type PaginationProps = React.ComponentPropsWithoutRef<\"nav\">;\r\n\r\n/**\r\n * Props for the {@link PaginationContent} component.\r\n */\r\nexport type PaginationContentProps = React.ComponentPropsWithoutRef<\"ul\">;\r\n\r\n/**\r\n * Props for the {@link PaginationItem} component.\r\n */\r\nexport type PaginationItemProps = React.ComponentPropsWithoutRef<\"li\">;\r\n\r\n/**\r\n * Props for the {@link PaginationLink} component.\r\n */\r\nexport interface PaginationLinkProps extends Pick<ButtonProps, \"size\">, React.ComponentPropsWithoutRef<\"a\"> {\r\n /** Marks the link as the current active page. @default false */\r\n isActive?: boolean;\r\n}\r\n\r\n/**\r\n * Props for the {@link PaginationPrevious} component.\r\n */\r\nexport type PaginationPreviousProps = React.ComponentPropsWithoutRef<typeof PaginationLink>;\r\n\r\n/**\r\n * Props for the {@link PaginationNext} component.\r\n */\r\nexport type PaginationNextProps = React.ComponentPropsWithoutRef<typeof PaginationLink>;\r\n\r\n/**\r\n * Props for the {@link PaginationEllipsis} component.\r\n */\r\nexport type PaginationEllipsisProps = React.ComponentPropsWithoutRef<\"span\">;\r\n\r\nconst buttonSizeStyles: Record<NonNullable<ButtonProps[\"size\"]>, string> = {\r\n default: buttonStyles.sizeDefault,\r\n icon: buttonStyles.sizeIcon,\r\n lg: buttonStyles.sizeLg,\r\n sm: buttonStyles.sizeSm,\r\n};\r\n\r\n/**\r\n * Provides semantic navigation for paginated content.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<nav>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <Pagination>\r\n * <PaginationContent />\r\n * </Pagination>\r\n * ```\r\n *\r\n * @see {@link PaginationProps} for available props\r\n */\r\nconst Pagination = React.forwardRef<HTMLElement, PaginationProps>(\r\n ({className, ...props}: Readonly<PaginationProps>, ref): React.JSX.Element => (\r\n <nav\r\n ref={ref}\r\n role='navigation'\r\n aria-label='pagination'\r\n className={cn(styles.root, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Wraps pagination items in a flex-based list container.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<ul>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationContent>\r\n * <PaginationItem />\r\n * </PaginationContent>\r\n * ```\r\n *\r\n * @see {@link PaginationContentProps} for available props\r\n */\r\nconst PaginationContent = React.forwardRef<HTMLUListElement, PaginationContentProps>(\r\n ({className, ...props}: Readonly<PaginationContentProps>, ref): React.JSX.Element => (\r\n <ul\r\n ref={ref}\r\n className={cn(styles.content, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Wraps an individual pagination control.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<li>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationItem>\r\n * <PaginationLink href='?page=1'>1</PaginationLink>\r\n * </PaginationItem>\r\n * ```\r\n *\r\n * @see {@link PaginationItemProps} for available props\r\n */\r\nconst PaginationItem = React.forwardRef<HTMLLIElement, PaginationItemProps>(\r\n ({className, ...props}: Readonly<PaginationItemProps>, ref): React.JSX.Element => (\r\n <li\r\n ref={ref}\r\n className={cn(styles.item, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders an anchor styled to match pagination controls.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<a>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationLink href='?page=2' isActive>\r\n * 2\r\n * </PaginationLink>\r\n * ```\r\n *\r\n * @see {@link PaginationLinkProps} for available props\r\n */\r\nconst PaginationLink = React.forwardRef<HTMLAnchorElement, PaginationLinkProps>(\r\n ({className, isActive = false, size = \"icon\", ...props}: Readonly<PaginationLinkProps>, ref): React.JSX.Element => {\r\n return (\r\n <a\r\n ref={ref}\r\n aria-current={isActive ? \"page\" : undefined}\r\n className={cn(\r\n buttonStyles.button,\r\n isActive ? buttonStyles.outline : buttonStyles.ghost,\r\n buttonSizeStyles[size],\r\n styles.link,\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the pagination control for navigating to the previous page.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<a>` element through {@link PaginationLink}\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationPrevious href='?page=1' />\r\n * ```\r\n *\r\n * @see {@link PaginationPreviousProps} for available props\r\n */\r\nconst PaginationPrevious = React.forwardRef<HTMLAnchorElement, PaginationPreviousProps>(\r\n ({className, ...props}: Readonly<PaginationPreviousProps>, ref): React.JSX.Element => (\r\n <PaginationLink\r\n ref={ref}\r\n aria-label='Go to previous page'\r\n size='default'\r\n className={cn(styles.previous, className)}\r\n {...props}>\r\n <ChevronLeft />\r\n <span>Previous</span>\r\n </PaginationLink>\r\n ),\r\n);\r\n\r\n/**\r\n * Renders the pagination control for navigating to the next page.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<a>` element through {@link PaginationLink}\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationNext href='?page=3' />\r\n * ```\r\n *\r\n * @see {@link PaginationNextProps} for available props\r\n */\r\nconst PaginationNext = React.forwardRef<HTMLAnchorElement, PaginationNextProps>(\r\n ({className, ...props}: Readonly<PaginationNextProps>, ref): React.JSX.Element => (\r\n <PaginationLink\r\n ref={ref}\r\n aria-label='Go to next page'\r\n size='default'\r\n className={cn(styles.next, className)}\r\n {...props}>\r\n <span>Next</span>\r\n <ChevronRight />\r\n </PaginationLink>\r\n ),\r\n);\r\n\r\n/**\r\n * Indicates truncated page ranges within pagination.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<span>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <PaginationEllipsis />\r\n * ```\r\n *\r\n * @see {@link PaginationEllipsisProps} for available props\r\n */\r\nconst PaginationEllipsis = React.forwardRef<HTMLSpanElement, PaginationEllipsisProps>(\r\n ({className, ...props}: Readonly<PaginationEllipsisProps>, ref): React.JSX.Element => (\r\n <span\r\n ref={ref}\r\n aria-hidden='true'\r\n className={cn(styles.ellipsis, className)}\r\n {...props}>\r\n <MoreHorizontal />\r\n <span className={styles.srOnly}>More pages</span>\r\n </span>\r\n ),\r\n);\r\n\r\nPagination.displayName = \"Pagination\";\r\nPaginationContent.displayName = \"PaginationContent\";\r\nPaginationItem.displayName = \"PaginationItem\";\r\nPaginationLink.displayName = \"PaginationLink\";\r\nPaginationPrevious.displayName = \"PaginationPrevious\";\r\nPaginationNext.displayName = \"PaginationNext\";\r\nPaginationEllipsis.displayName = \"PaginationEllipsis\";\r\n\r\nexport {Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious};\r\n"],"names":["buttonSizeStyles","buttonStyles","Pagination","React","className","props","ref","cn","styles","PaginationContent","PaginationItem","PaginationLink","isActive","size","undefined","PaginationPrevious","ChevronLeft","PaginationNext","ChevronRight","PaginationEllipsis","MoreHorizontal"],"mappings":";;;;;;;AAkDA,MAAMA,mBAAqE;IACzE,SAASC,cAAAA,WAAwB;IACjC,MAAMA,cAAAA,QAAqB;IAC3B,IAAIA,cAAAA,MAAmB;IACvB,IAAIA,cAAAA,MAAmB;AACzB;AAmBA,MAAMC,aAAa,WAAHA,GAAGC,wBAAAA,UAAgB,CACjC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAiC,EAAEC,MAAAA,WAAAA,GACjD,IAAC;QACC,KAAKA;QACL,MAAK;QACL,cAAW;QACX,WAAWC,GAAGC,kBAAAA,IAAW,EAAEJ;QAC1B,GAAGC,KAAK;;AAsBf,MAAMI,oBAAoB,WAAHA,GAAGN,wBAAAA,UAAgB,CACxC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAwC,EAAEC,MAAAA,WAAAA,GACxD,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,kBAAAA,OAAc,EAAEJ;QAC7B,GAAGC,KAAK;;AAsBf,MAAMK,iBAAiB,WAAHA,GAAGP,wBAAAA,UAAgB,CACrC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAqC,EAAEC,MAAAA,WAAAA,GACrD,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,kBAAAA,IAAW,EAAEJ;QAC1B,GAAGC,KAAK;;AAsBf,MAAMM,iBAAiB,WAAHA,GAAGR,wBAAAA,UAAgB,CACrC,CAAC,EAACC,SAAS,EAAEQ,WAAW,KAAK,EAAEC,OAAO,MAAM,EAAE,GAAGR,OAAqC,EAAEC,MAC/E,WAAP,GACE,IAAC;QACC,KAAKA;QACL,gBAAcM,WAAW,SAASE;QAClC,WAAWP,GACTN,cAAAA,MAAmB,EACnBW,WAAWX,cAAAA,OAAoB,GAAGA,cAAAA,KAAkB,EACpDD,gBAAgB,CAACa,KAAK,EACtBL,kBAAAA,IAAW,EACXJ;QAED,GAAGC,KAAK;;AAqBjB,MAAMU,qBAAqB,WAAHA,GAAGZ,wBAAAA,UAAgB,CACzC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAyC,EAAEC,MAAAA,WAAAA,GACzD,KAACK,gBAAcA;QACb,KAAKL;QACL,cAAW;QACX,MAAK;QACL,WAAWC,GAAGC,kBAAAA,QAAe,EAAEJ;QAC9B,GAAGC,KAAK;;0BACT,IAACW,aAAWA,CAAAA;0BACZ,IAAC;0BAAK;;;;AAoBZ,MAAMC,iBAAiB,WAAHA,GAAGd,wBAAAA,UAAgB,CACrC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAqC,EAAEC,MAAAA,WAAAA,GACrD,KAACK,gBAAcA;QACb,KAAKL;QACL,cAAW;QACX,MAAK;QACL,WAAWC,GAAGC,kBAAAA,IAAW,EAAEJ;QAC1B,GAAGC,KAAK;;0BACT,IAAC;0BAAK;;0BACN,IAACa,cAAYA,CAAAA;;;AAoBnB,MAAMC,qBAAqB,WAAHA,GAAGhB,wBAAAA,UAAgB,CACzC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAyC,EAAEC,MAAAA,WAAAA,GACzD,KAAC;QACC,KAAKA;QACL,eAAY;QACZ,WAAWC,GAAGC,kBAAAA,QAAe,EAAEJ;QAC9B,GAAGC,KAAK;;0BACT,IAACe,gBAAcA,CAAAA;0BACf,IAAC;gBAAK,WAAWZ,kBAAAA,MAAa;0BAAE;;;;AAKtCN,WAAW,WAAW,GAAG;AACzBO,kBAAkB,WAAW,GAAG;AAChCC,eAAe,WAAW,GAAG;AAC7BC,eAAe,WAAW,GAAG;AAC7BI,mBAAmB,WAAW,GAAG;AACjCE,eAAe,WAAW,GAAG;AAC7BE,mBAAmB,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/pagination.module.css","webpack://./src/components/ui/pagination.module.css"],"names":[],"mappings":"AAAA;ECCE,uBAAuB;EACvB,WAAW;EACX,aAAa;AACf;;ADJqD;ECOnD,mBAAmB;EACnB,sBAAsB;EACtB,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,gBAAgB;AAClB;;ADb6J;ECgB3J,aAAa;AACf;;ADjByL;ECoBvL,iCAAiC;EACjC,qBAAqB;AACvB;;ADtBqP;ECyBnP,+CAA+C;AACjD;;AD1B8S;EC6B5S,sBAAsB;AACxB;;AD9BoV;ECiClV,gDAAgD;AAClD;;ADlC0Y;ECqCxY,iCAAiC;EACjC,8BAA8B;EAC9B,6BAA6B;EAC7B,uBAAuB;EACvB,mBAAmB;EACnB,oBAAoB;EACpB,kBAAkB;AACpB;;AD5CgkB;EC+C9jB,cAAc;EACd,WAAW;EACX,YAAY;AACd;;ADlD2oB;ECqDzoB,mBAAmB;EACnB,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,WAAW;EACX,YAAY;EACZ,UAAU;EACV,kBAAkB;EAClB,gBAAgB;AAClB","sourcesContent":[".root{display:flex;justify-content:center;width:100%}.content{align-items:center;flex-direction:row;gap:var(--ac-space-1);list-style:none;margin:0;padding:0}.content,.item{display:flex}.link{min-width:var(--ac-size-default);text-decoration:none}.previous{padding-left:calc(var(--ac-space-3) - .125rem)}.next,.previous{gap:var(--ac-space-1)}.next{padding-right:calc(var(--ac-space-3) - .125rem)}.ellipsis{align-items:center;color:var(--ac-muted-foreground);display:inline-flex;height:var(--ac-size-default);justify-content:center;position:relative;width:var(--ac-size-default)}.ellipsis>svg,.next>svg,.previous>svg{flex-shrink:0;height:1rem;width:1rem}.srOnly{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0;white-space:nowrap}",".root {\n justify-content: center;\n width: 100%;\n display: flex;\n}\n\n.content {\n align-items: center;\n gap: var(--ac-space-1);\n flex-direction: row;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.content, .item {\n display: flex;\n}\n\n.link {\n min-width: var(--ac-size-default);\n text-decoration: none;\n}\n\n.previous {\n padding-left: calc(var(--ac-space-3) - .125rem);\n}\n\n.next, .previous {\n gap: var(--ac-space-1);\n}\n\n.next {\n padding-right: calc(var(--ac-space-3) - .125rem);\n}\n\n.ellipsis {\n color: var(--ac-muted-foreground);\n height: var(--ac-size-default);\n width: var(--ac-size-default);\n justify-content: center;\n align-items: center;\n display: inline-flex;\n position: relative;\n}\n\n.ellipsis > svg, .next > svg, .previous > svg {\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n}\n\n.srOnly {\n clip: rect(0,0,0,0);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n"],"sourceRoot":""}
|
|
@@ -3,17 +3,17 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
4
|
import { Popover } from "@base-ui/react/popover";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import { forwardRef, isValidElement } from "react";
|
|
7
6
|
import { cn } from "../../lib/utilities.js";
|
|
8
7
|
import popover_module from "./popover.module.js";
|
|
8
|
+
import * as __rspack_external_react from "react";
|
|
9
9
|
function popover_Popover(props) {
|
|
10
10
|
return /*#__PURE__*/ jsx(Popover.Root, {
|
|
11
11
|
...props
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
const PopoverTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
14
|
+
const PopoverTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
15
15
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
16
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
16
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
17
17
|
return /*#__PURE__*/ jsx(Popover.Trigger, {
|
|
18
18
|
ref: ref,
|
|
19
19
|
...otherProps,
|
|
@@ -29,7 +29,7 @@ const PopoverTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
29
29
|
});
|
|
30
30
|
function PopoverAnchor(props) {
|
|
31
31
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
32
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
32
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
33
33
|
return useRender({
|
|
34
34
|
defaultTagName: "div",
|
|
35
35
|
render: renderProp,
|
|
@@ -40,7 +40,7 @@ function PopoverAnchor(props) {
|
|
|
40
40
|
})
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
const PopoverContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
43
|
+
const PopoverContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
44
44
|
const { className, children, render, sideOffset = 4, ...otherProps } = props;
|
|
45
45
|
return /*#__PURE__*/ jsx(Popover.Portal, {
|
|
46
46
|
children: /*#__PURE__*/ jsx(Popover.Positioner, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/popover.js","sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {Popover as BasePopover} from \"@base-ui/react/popover\";\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 \"./popover.module.css\";\r\n\r\ninterface PopoverProps extends React.ComponentPropsWithRef<typeof BasePopover.Root> {}\r\n\r\ninterface PopoverTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BasePopover.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 * 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\ninterface PopoverAnchorProps 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\ninterface PopoverContentProps extends Omit<React.ComponentPropsWithRef<typeof BasePopover.Positioner>, \"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 * Offsets the floating content from its anchor in pixels.\r\n * @default 4\r\n */\r\n sideOffset?: number;\r\n}\r\n\r\n/**\r\n * Coordinates popover state and accessibility behavior.\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/popover | Base UI Popover}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <Popover>Content</Popover>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/popover | Base UI Documentation}\r\n */\r\nfunction Popover(props: Readonly<Popover.Props>): React.ReactElement {\r\n return <BasePopover.Root {...props} />;\r\n}\r\n\r\n/**\r\n * Renders the popover 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/popover | Base UI Popover}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <PopoverTrigger>Content</PopoverTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/popover | Base UI Documentation}\r\n */\r\nconst PopoverTrigger = React.forwardRef<HTMLButtonElement, PopoverTrigger.Props>(\r\n (props: Readonly<PopoverTrigger.Props>, ref): React.ReactElement => {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild support is part of the public 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 (\r\n <BasePopover.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BasePopover.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the popover anchor.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/popover | Base UI Popover}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <PopoverAnchor>Content</PopoverAnchor>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/popover | Base UI Documentation}\r\n */\r\nfunction PopoverAnchor(props: Readonly<PopoverAnchor.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild support is part of the public 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.anchor, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n/**\r\n * Renders the popover 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/popover | Base UI Popover}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <PopoverContent>Content</PopoverContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/popover | Base UI Documentation}\r\n */\r\nconst PopoverContent = React.forwardRef<React.ComponentRef<typeof BasePopover.Popup>, PopoverContent.Props>(\r\n (props: Readonly<PopoverContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, sideOffset = 4, ...otherProps} = props;\r\n\r\n return (\r\n <BasePopover.Portal>\r\n <BasePopover.Positioner\r\n sideOffset={sideOffset}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BasePopover.Popup\r\n ref={ref}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.popup, className)}, {}),\r\n })}>\r\n {children}\r\n </BasePopover.Popup>\r\n </BasePopover.Positioner>\r\n </BasePopover.Portal>\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 Popover {\r\n export type Props = PopoverProps;\r\n export type State = BasePopover.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace PopoverTrigger {\r\n export type Props = PopoverTriggerProps;\r\n export type State = BasePopover.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace PopoverAnchor {\r\n export type Props = PopoverAnchorProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace PopoverContent {\r\n export type Props = PopoverContentProps;\r\n export type State = BasePopover.Popup.State;\r\n}\r\n\r\nPopover.displayName = \"Popover\";\r\nPopoverTrigger.displayName = \"PopoverTrigger\";\r\nPopoverAnchor.displayName = \"PopoverAnchor\";\r\nPopoverContent.displayName = \"PopoverContent\";\r\n\r\nexport {Popover, PopoverAnchor, PopoverContent, PopoverTrigger};\r\n"],"names":["Popover","props","BasePopover","PopoverTrigger","React","ref","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","PopoverAnchor","cn","styles","PopoverContent","sideOffset"],"mappings":";;;;;;;;AAyEA,SAASA,gBAAQC,KAA8B;IAC7C,OAAO,WAAP,GAAO,IAACC,QAAAA,IAAgB;QAAE,GAAGD,KAAK;;AACpC;AAiBA,MAAME,iBAAiB,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/popover.js","sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {Popover as BasePopover} from \"@base-ui/react/popover\";\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 \"./popover.module.css\";\r\n\r\ninterface PopoverProps extends React.ComponentPropsWithRef<typeof BasePopover.Root> {}\r\n\r\ninterface PopoverTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BasePopover.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 * 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\ninterface PopoverAnchorProps 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\ninterface PopoverContentProps extends Omit<React.ComponentPropsWithRef<typeof BasePopover.Positioner>, \"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 * Offsets the floating content from its anchor in pixels.\r\n * @default 4\r\n */\r\n sideOffset?: number;\r\n}\r\n\r\n/**\r\n * Coordinates popover state and accessibility behavior.\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/popover | Base UI Popover}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <Popover>Content</Popover>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/popover | Base UI Documentation}\r\n */\r\nfunction Popover(props: Readonly<Popover.Props>): React.ReactElement {\r\n return <BasePopover.Root {...props} />;\r\n}\r\n\r\n/**\r\n * Renders the popover 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/popover | Base UI Popover}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <PopoverTrigger>Content</PopoverTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/popover | Base UI Documentation}\r\n */\r\nconst PopoverTrigger = React.forwardRef<HTMLButtonElement, PopoverTrigger.Props>(\r\n (props: Readonly<PopoverTrigger.Props>, ref): React.ReactElement => {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild support is part of the public 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 (\r\n <BasePopover.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BasePopover.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the popover anchor.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/popover | Base UI Popover}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <PopoverAnchor>Content</PopoverAnchor>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/popover | Base UI Documentation}\r\n */\r\nfunction PopoverAnchor(props: Readonly<PopoverAnchor.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild support is part of the public 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.anchor, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n/**\r\n * Renders the popover 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/popover | Base UI Popover}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <PopoverContent>Content</PopoverContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/popover | Base UI Documentation}\r\n */\r\nconst PopoverContent = React.forwardRef<React.ComponentRef<typeof BasePopover.Popup>, PopoverContent.Props>(\r\n (props: Readonly<PopoverContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, sideOffset = 4, ...otherProps} = props;\r\n\r\n return (\r\n <BasePopover.Portal>\r\n <BasePopover.Positioner\r\n sideOffset={sideOffset}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BasePopover.Popup\r\n ref={ref}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.popup, className)}, {}),\r\n })}>\r\n {children}\r\n </BasePopover.Popup>\r\n </BasePopover.Positioner>\r\n </BasePopover.Portal>\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 Popover {\r\n export type Props = PopoverProps;\r\n export type State = BasePopover.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace PopoverTrigger {\r\n export type Props = PopoverTriggerProps;\r\n export type State = BasePopover.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace PopoverAnchor {\r\n export type Props = PopoverAnchorProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace PopoverContent {\r\n export type Props = PopoverContentProps;\r\n export type State = BasePopover.Popup.State;\r\n}\r\n\r\nPopover.displayName = \"Popover\";\r\nPopoverTrigger.displayName = \"PopoverTrigger\";\r\nPopoverAnchor.displayName = \"PopoverAnchor\";\r\nPopoverContent.displayName = \"PopoverContent\";\r\n\r\nexport {Popover, PopoverAnchor, PopoverContent, PopoverTrigger};\r\n"],"names":["Popover","props","BasePopover","PopoverTrigger","React","ref","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","PopoverAnchor","cn","styles","PopoverContent","sideOffset"],"mappings":";;;;;;;;AAyEA,SAASA,gBAAQC,KAA8B;IAC7C,OAAO,WAAP,GAAO,IAACC,QAAAA,IAAgB;QAAE,GAAGD,KAAK;;AACpC;AAiBA,MAAME,iBAAiB,WAAHA,GAAGC,wBAAAA,UAAgB,CACrC,CAACH,OAAuCI;IAEtC,MAAM,EAACC,UAAU,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGT;IACtE,MAAMU,aAAaL,WAAW,WAAXA,GAAWF,wBAAAA,cAAoB,CAACG,YAAYA,WAAWE;IAE1E,OAAO,WAAP,GACE,IAACP,QAAAA,OAAmB;QAClB,KAAKG;QACJ,GAAGK,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQD;YACR,OAAOE,WAAW;gBAACL;YAAS,GAAG,CAAC;QAClC;kBACCG,aAAaG,SAAYP;;AAGhC;AAkBF,SAASQ,cAAcd,KAAoC;IAEzD,MAAM,EAACK,UAAU,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGT;IACtE,MAAMU,aAAaL,WAAW,WAAXA,GAAWF,wBAAAA,cAAoB,CAACG,YAAYA,WAAWE;IAE1E,OAAOG,UAAU;QACf,gBAAgB;QAChB,QAAQD;QACR,OAAOE,WAAW;YAAC,WAAWG,GAAGC,eAAAA,MAAa,EAAET;QAAU,GAAGE,YAAY;YACvE,UAAUC,aAAaG,SAAYP;QACrC;IACF;AACF;AAiBA,MAAMW,iBAAiB,WAAHA,GAAGd,wBAAAA,UAAgB,CACrC,CAACH,OAAuCI;IACtC,MAAM,EAACG,SAAS,EAAED,QAAQ,EAAEE,MAAM,EAAEU,aAAa,CAAC,EAAE,GAAGT,YAAW,GAAGT;IAErE,OAAO,WAAP,GACE,IAACC,QAAAA,MAAkB;kBACjB,kBAACA,QAAAA,UAAsB;YACrB,YAAYiB;YACX,GAAGT,UAAU;YACd,QAAQE,UAAU;gBAChB,gBAAgB;gBAChB,OAAOC,WAAW;oBAAC,WAAWI,eAAAA,UAAiB;gBAAA,GAAG,CAAC;YACrD;sBACA,kBAACf,QAAAA,KAAiB;gBAChB,KAAKG;gBACL,QAAQO,UAAU;oBAChB,gBAAgB;oBAChB,QAAQH;oBACR,OAAOI,WAAW;wBAAC,WAAWG,GAAGC,eAAAA,KAAY,EAAET;oBAAU,GAAG,CAAC;gBAC/D;0BACCD;;;;AAKX;AA2BFP,gBAAQ,WAAW,GAAG;AACtBG,eAAe,WAAW,GAAG;AAC7BY,cAAc,WAAW,GAAG;AAC5BG,eAAe,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/popover.module.css","webpack://./src/components/ui/popover.module.css"],"names":[],"mappings":"AAAA;ECCE,iBAAiB;AACnB;;ADFyB;ECKvB,WAAW;AACb;;ADNgD;ECS9C,mCAAmC;EACnC,kCAAkC;EAClC,kCAAkC;EAClC,mCAAmC;EACnC,0BAA0B;EAC1B,yCAAyC;EACzC,qFAAqF;EACrF,aAAa;EACb,YAAY;EACZ,uCAAuC;AACzC;;ADnB8Z;ECsB5Z,UAAU;EACV,qBAAqB;AACvB","sourcesContent":[".anchor{display:contents}.positioner{z-index:50}.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,.3);color:var(--ac-popover-foreground);outline:none;padding:var(--ac-space-4);transform-origin:var(--transform-origin);transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal);width:18rem}.popup[data-ending-style],.popup[data-starting-style]{opacity:0;transform:scale(.96)}",".anchor {\n display: contents;\n}\n\n.positioner {\n z-index: 50;\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 color: var(--ac-popover-foreground);\n padding: var(--ac-space-4);\n transform-origin: var(--transform-origin);\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n outline: none;\n width: 18rem;\n box-shadow: 0 16px 40px -16px #0000004d;\n}\n\n.popup[data-ending-style], .popup[data-starting-style] {\n opacity: 0;\n transform: scale(.96);\n}\n"],"sourceRoot":""}
|
|
@@ -25,10 +25,7 @@ export interface ProgressProps extends Omit<React.ComponentPropsWithRef<typeof B
|
|
|
25
25
|
*
|
|
26
26
|
* @see {@link https://base-ui.com/react/components/progress | Base UI Documentation}
|
|
27
27
|
*/
|
|
28
|
-
declare
|
|
29
|
-
declare namespace Progress {
|
|
30
|
-
var displayName: string;
|
|
31
|
-
}
|
|
28
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
29
|
declare namespace Progress {
|
|
33
30
|
type Props = ProgressProps;
|
|
34
31
|
type State = BaseProgress.Root.State;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/components/ui/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,QAAQ,IAAI,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACzG,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/components/ui/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,QAAQ,IAAI,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACzG,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,QAAQ,mGAiBZ,CAAC;AAIH,kBAAU,QAAQ,CAAC;IACjB,KAAY,KAAK,GAAG,aAAa,CAAC;IAClC,KAAY,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;CAC7C;AAED,OAAO,EAAC,QAAQ,EAAC,CAAC"}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Progress } from "@base-ui/react/progress";
|
|
3
|
+
import { Progress as progress_Progress } from "@base-ui/react/progress";
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
-
import "react";
|
|
6
5
|
import { cn } from "../../lib/utilities.js";
|
|
7
6
|
import progress_module from "./progress.module.js";
|
|
8
|
-
|
|
7
|
+
import * as __rspack_external_react from "react";
|
|
8
|
+
const ui_progress_Progress = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
9
9
|
const { className, render, value = 0, ...otherProps } = props;
|
|
10
|
-
return /*#__PURE__*/ jsx(
|
|
10
|
+
return /*#__PURE__*/ jsx(progress_Progress.Root, {
|
|
11
11
|
value: value,
|
|
12
12
|
...otherProps,
|
|
13
|
+
ref: forwardedRef,
|
|
13
14
|
render: useRender({
|
|
14
15
|
defaultTagName: "div",
|
|
15
16
|
render: render
|
|
16
17
|
}),
|
|
17
|
-
children: /*#__PURE__*/ jsx(
|
|
18
|
+
children: /*#__PURE__*/ jsx(progress_Progress.Track, {
|
|
18
19
|
className: cn(progress_module.track, className),
|
|
19
|
-
children: /*#__PURE__*/ jsx(
|
|
20
|
+
children: /*#__PURE__*/ jsx(progress_Progress.Indicator, {
|
|
20
21
|
className: progress_module.indicator
|
|
21
22
|
})
|
|
22
23
|
})
|
|
23
24
|
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export {
|
|
25
|
+
});
|
|
26
|
+
ui_progress_Progress.displayName = "Progress";
|
|
27
|
+
export { ui_progress_Progress as Progress };
|
|
27
28
|
|
|
28
29
|
//# sourceMappingURL=progress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/progress.js","sources":["../../../src/components/ui/progress.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Progress as BaseProgress} from \"@base-ui/react/progress\";\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 \"./progress.module.css\";\r\n\r\n/**\r\n * Props for the shared progress wrapper.\r\n */\r\nexport interface ProgressProps extends Omit<React.ComponentPropsWithRef<typeof BaseProgress.Root>, \"value\"> {\r\n /** Additional CSS classes merged with the progress track styles. @default undefined */\r\n className?: string;\r\n /** The current completion percentage or normalized value rendered by the progress bar. @default 0 */\r\n value?: number;\r\n}\r\n\r\n/**\r\n * Visualizes task completion with a styled track and animated 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/progress | Base UI Progress}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <Progress value={64} />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/progress | Base UI Documentation}\r\n */\r\
|
|
1
|
+
{"version":3,"file":"components/ui/progress.js","sources":["../../../src/components/ui/progress.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Progress as BaseProgress} from \"@base-ui/react/progress\";\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 \"./progress.module.css\";\r\n\r\n/**\r\n * Props for the shared progress wrapper.\r\n */\r\nexport interface ProgressProps extends Omit<React.ComponentPropsWithRef<typeof BaseProgress.Root>, \"value\"> {\r\n /** Additional CSS classes merged with the progress track styles. @default undefined */\r\n className?: string;\r\n /** The current completion percentage or normalized value rendered by the progress bar. @default 0 */\r\n value?: number;\r\n}\r\n\r\n/**\r\n * Visualizes task completion with a styled track and animated 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/progress | Base UI Progress}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <Progress value={64} />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/progress | Base UI Documentation}\r\n */\r\nconst Progress = React.forwardRef<HTMLDivElement, Progress.Props>(function Progress(props, forwardedRef) {\r\n const {className, render, value = 0, ...otherProps} = props;\r\n\r\n return (\r\n <BaseProgress.Root\r\n value={value}\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n })}>\r\n <BaseProgress.Track className={cn(styles.track, className)}>\r\n <BaseProgress.Indicator className={styles.indicator} />\r\n </BaseProgress.Track>\r\n </BaseProgress.Root>\r\n );\r\n});\r\nProgress.displayName = \"Progress\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Progress {\r\n export type Props = ProgressProps;\r\n export type State = BaseProgress.Root.State;\r\n}\r\n\r\nexport {Progress};\r\n"],"names":["Progress","React","props","forwardedRef","className","render","value","otherProps","BaseProgress","useRender","cn","styles"],"mappings":";;;;;;;AAmCA,MAAMA,uBAAW,WAAHA,GAAGC,wBAAAA,UAAgB,CAAiC,SAAkBC,KAAK,EAAEC,YAAY;IACrG,MAAM,EAACC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,CAAC,EAAE,GAAGC,YAAW,GAAGL;IAEtD,OAAO,WAAP,GACE,IAACM,kBAAAA,IAAiB;QAChB,OAAOF;QACN,GAAGC,UAAU;QACd,KAAKJ;QACL,QAAQM,UAAU;YAChB,gBAAgB;YAChB,QAAQJ;QACV;kBACA,kBAACG,kBAAAA,KAAkB;YAAC,WAAWE,GAAGC,gBAAAA,KAAY,EAAEP;sBAC9C,kBAACI,kBAAAA,SAAsB;gBAAC,WAAWG,gBAAAA,SAAgB;;;;AAI3D;AACAX,qBAAS,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/progress.module.css","webpack://./src/components/ui/progress.module.css"],"names":[],"mappings":"AAAA;ECCE,qCAAqC;EACrC,WAAW;EACX,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;ADNsG;ECSpG,qBAAqB;AACvB;;ADV6I;ECa3I,mCAAmC;EACnC,YAAY;EACZ,qBAAqB;AACvB","sourcesContent":[".track{background-color:var(--ac-secondary);height:.5rem;overflow:hidden;position:relative;width:100%}.indicator,.track{border-radius:9999px}.indicator{background-color:var(--ac-primary);height:100%;transition:width .2s ease}",".track {\n background-color: var(--ac-secondary);\n width: 100%;\n height: .5rem;\n position: relative;\n overflow: hidden;\n}\n\n.indicator, .track {\n border-radius: 9999px;\n}\n\n.indicator {\n background-color: var(--ac-primary);\n height: 100%;\n transition: width .2s;\n}\n"],"sourceRoot":""}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Radio } from "@base-ui/react/radio";
|
|
2
2
|
import { RadioGroup as BaseRadioGroup } from "@base-ui/react/radio-group";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
type RadioGroupProps = React.ComponentPropsWithRef<typeof BaseRadioGroup>;
|
|
5
|
-
type RadioGroupItemProps = React.ComponentPropsWithRef<typeof Radio.Root>;
|
|
6
4
|
/**
|
|
7
5
|
* Coordinates radio group state and selection behavior.
|
|
8
6
|
*
|
|
@@ -36,11 +34,11 @@ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<BaseRadioGroup.Pr
|
|
|
36
34
|
*/
|
|
37
35
|
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<Radio.Root.Props<unknown>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
38
36
|
declare namespace RadioGroup {
|
|
39
|
-
type Props =
|
|
37
|
+
type Props = React.ComponentPropsWithRef<typeof BaseRadioGroup>;
|
|
40
38
|
type State = BaseRadioGroup.State;
|
|
41
39
|
}
|
|
42
40
|
declare namespace RadioGroupItem {
|
|
43
|
-
type Props =
|
|
41
|
+
type Props = React.ComponentPropsWithRef<typeof Radio.Root>;
|
|
44
42
|
type State = Radio.Root.State;
|
|
45
43
|
}
|
|
46
44
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAC,UAAU,IAAI,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAGxE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAC,UAAU,IAAI,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAGxE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,UAAU,mHAgBf,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,cAAc,gHAmBnB,CAAC;AAGF,kBAAU,UAAU,CAAC;IACnB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,cAAc,CAAC,CAAC;IACvE,KAAY,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC;CAC1C;AAGD,kBAAU,cAAc,CAAC;IACvB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;IACnE,KAAY,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;CACtC;AAKD,OAAO,EAAC,UAAU,EAAE,cAAc,EAAC,CAAC"}
|
|
@@ -5,10 +5,10 @@ import { Radio } from "@base-ui/react/radio";
|
|
|
5
5
|
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
6
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
7
|
import { Circle } from "lucide-react";
|
|
8
|
-
import { forwardRef } from "react";
|
|
9
8
|
import { cn } from "../../lib/utilities.js";
|
|
10
9
|
import radio_group_module from "./radio-group.module.js";
|
|
11
|
-
|
|
10
|
+
import * as __rspack_external_react from "react";
|
|
11
|
+
const radio_group_RadioGroup = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
12
12
|
const { className, render, ...otherProps } = props;
|
|
13
13
|
return /*#__PURE__*/ jsx(RadioGroup, {
|
|
14
14
|
ref: ref,
|
|
@@ -22,7 +22,7 @@ const radio_group_RadioGroup = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
22
22
|
})
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
|
-
const RadioGroupItem = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
25
|
+
const RadioGroupItem = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
26
26
|
const { className, render, ...otherProps } = props;
|
|
27
27
|
return /*#__PURE__*/ jsx(Radio.Root, {
|
|
28
28
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/radio-group.js","sources":["../../../src/components/ui/radio-group.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {Radio} from \"@base-ui/react/radio\";\r\nimport {RadioGroup as BaseRadioGroup} from \"@base-ui/react/radio-group\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./radio-group.module.css\";\r\n\r\
|
|
1
|
+
{"version":3,"file":"components/ui/radio-group.js","sources":["../../../src/components/ui/radio-group.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {Radio} from \"@base-ui/react/radio\";\r\nimport {RadioGroup as BaseRadioGroup} from \"@base-ui/react/radio-group\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./radio-group.module.css\";\r\n\r\n/**\r\n * Coordinates radio group state and selection behavior.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/radio-group | Base UI Radio Group}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <RadioGroup>Content</RadioGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/radio-group | Base UI Documentation}\r\n */\r\nconst RadioGroup = React.forwardRef<React.ComponentRef<typeof BaseRadioGroup>, RadioGroup.Props>(\r\n (props: Readonly<RadioGroup.Props>, ref): React.ReactElement => {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseRadioGroup\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.group, className)}, {}),\r\n })}\r\n />\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the radio group item.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/radio-group | Base UI Radio Group}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <RadioGroupItem>Content</RadioGroupItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/radio-group | Base UI Documentation}\r\n */\r\nconst RadioGroupItem = React.forwardRef<React.ComponentRef<typeof Radio.Root>, RadioGroupItem.Props>(\r\n (props: Readonly<RadioGroupItem.Props>, ref): React.ReactElement => {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <Radio.Root\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, className)}, {}),\r\n })}>\r\n <Radio.Indicator className={styles.indicator}>\r\n <Circle className={styles.icon} />\r\n </Radio.Indicator>\r\n </Radio.Root>\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 RadioGroup {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseRadioGroup>;\r\n export type State = BaseRadioGroup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace RadioGroupItem {\r\n export type Props = React.ComponentPropsWithRef<typeof Radio.Root>;\r\n export type State = Radio.Root.State;\r\n}\r\n\r\nRadioGroup.displayName = \"RadioGroup\";\r\nRadioGroupItem.displayName = \"RadioGroupItem\";\r\n\r\nexport {RadioGroup, RadioGroupItem};\r\n"],"names":["RadioGroup","React","props","ref","className","render","otherProps","BaseRadioGroup","useRender","mergeProps","cn","styles","RadioGroupItem","Radio","Circle"],"mappings":";;;;;;;;;;AA2BA,MAAMA,yBAAa,WAAHA,GAAGC,wBAAAA,UAAgB,CACjC,CAACC,OAAmCC;IAClC,MAAM,EAACC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAE3C,OAAO,WAAP,GACE,IAACK,YAAcA;QACb,KAAKJ;QACJ,GAAGG,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,mBAAAA,KAAY,EAAEP;YAAU,GAAG,CAAC;QAC/D;;AAGN;AAkBF,MAAMQ,iBAAiB,WAAHA,GAAGX,wBAAAA,UAAgB,CACrC,CAACC,OAAuCC;IACtC,MAAM,EAACC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGJ;IAE3C,OAAO,WAAP,GACE,IAACW,MAAM,IAAI;QACT,KAAKV;QACJ,GAAGG,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,mBAAAA,IAAW,EAAEP;YAAU,GAAG,CAAC;QAC9D;kBACA,kBAACS,MAAM,SAAS;YAAC,WAAWF,mBAAAA,SAAgB;sBAC1C,kBAACG,QAAMA;gBAAC,WAAWH,mBAAAA,IAAW;;;;AAItC;AAeFX,uBAAW,WAAW,GAAG;AACzBY,eAAe,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/radio-group.module.css","webpack://./src/components/ui/radio-group.module.css"],"names":[],"mappings":"AAAA;ECCE,sBAAsB;EACtB,aAAa;AACf;;ADH0C;ECMxC,sCAAsC;EACtC,mCAAmC;EACnC,wBAAwB;EACxB,eAAe;EACf,YAAY;EACZ,6FAA6F;EAC7F,oBAAoB;EACpB,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,oBAAoB;;EDjB6V;ICoB/W,iCAAiC;IACjC,mBAAmB;EACrB;;EDtBqb;ICyBnb,mBAAmB;IACnB,WAAW;EACb;AACF;;AD5Bue;EC+Bre,uBAAuB;EACvB,mBAAmB;EACnB,oBAAoB;AACtB;;ADlCgjB;ECqC9iB,kBAAkB;EAClB,cAAc;EACd,eAAe;AACjB","sourcesContent":[".group{display:grid;gap:var(--ac-space-2)}.item{align-items:center;background-color:var(--ac-background);border:1px solid var(--ac-primary);border-radius:999px;color:var(--ac-primary);cursor:pointer;display:inline-flex;height:1rem;justify-content:center;outline:none;transition:border-color var(--ac-transition-fast),background-color var(--ac-transition-fast);width:1rem;&:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}&[data-disabled]{cursor:not-allowed;opacity:.5}}.indicator{align-items:center;display:inline-flex;justify-content:center}.icon{fill:currentcolor;height:.625rem;width:.625rem}",".group {\n gap: var(--ac-space-2);\n display: grid;\n}\n\n.item {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-primary);\n color: var(--ac-primary);\n cursor: pointer;\n height: 1rem;\n transition: border-color var(--ac-transition-fast),background-color var(--ac-transition-fast);\n border-radius: 999px;\n outline: none;\n justify-content: center;\n align-items: center;\n width: 1rem;\n display: inline-flex;\n\n &:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: .5;\n }\n}\n\n.indicator {\n justify-content: center;\n align-items: center;\n display: inline-flex;\n}\n\n.icon {\n fill: currentColor;\n width: .625rem;\n height: .625rem;\n}\n"],"sourceRoot":""}
|