@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/card.js","sources":["../../../src/components/ui/card.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./card.module.css\";\r\n\r\n/**\r\n * Represents the shared styling props supported by the Card root container.\r\n *\r\n * @remarks\r\n * Extends native `<div>` attributes so cards can participate in semantic layouts,\r\n * landmarks, and custom event handling while exposing a documented class override.\r\n */\r\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Additional CSS classes merged with the default card surface styles.\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Represents the shared styling props supported by card layout sections.\r\n *\r\n * @remarks\r\n * Use these props for presentational card regions such as headers, content blocks,\r\n * action rows, and footers. All standard `<div>` attributes continue to work.\r\n */\r\ninterface CardSectionProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Additional CSS classes merged with the section's default spacing styles.\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * A card container for grouping related content into a bordered surface.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a styled `<div>` with the library's card border, background, and shadow.\r\n * Compose it with {@link CardHeader}, {@link CardContent}, and {@link CardFooter}\r\n * to create structured panels without depending on a Base UI primitive.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Card>\r\n * <CardHeader>\r\n * <CardTitle>Team activity</CardTitle>\r\n * <CardDescription>Latest changes across your workspace.</CardDescription>\r\n * </CardHeader>\r\n * <CardContent>{children}</CardContent>\r\n * <CardFooter>Updated 2 minutes ago</CardFooter>\r\n * </Card>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.card, className)}\r\n {...props}\r\n />\r\n));\r\nCard.displayName = \"Card\";\r\n\r\n/**\r\n * A header region for card titles, descriptions, and top-level actions.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a `<div>` with vertical spacing tuned for leading card content.\r\n * Place {@link CardTitle}, {@link CardDescription}, and optional controls inside it.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardHeader>\r\n * <CardTitle>Revenue</CardTitle>\r\n * <CardDescription>Monthly recurring revenue overview.</CardDescription>\r\n * </CardHeader>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardHeader = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.header, className)}\r\n {...props}\r\n />\r\n));\r\nCardHeader.displayName = \"CardHeader\";\r\n\r\n/**\r\n * A prominent title slot for the primary heading inside a card.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a styled `<div>` for visual hierarchy. Provide semantic heading elements\r\n * inside it when the surrounding document outline requires explicit heading levels.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardTitle>Security overview</CardTitle>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardTitle = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.title, className)}\r\n {...props}\r\n />\r\n));\r\nCardTitle.displayName = \"CardTitle\";\r\n\r\n/**\r\n * A muted text block for supporting information beneath a card title.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a styled `<div>` intended for secondary copy, helper messaging, or status\r\n * summaries that contextualize the main card heading.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardDescription>Track response times and alert volume in one place.</CardDescription>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardDescription = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.description, className)}\r\n {...props}\r\n />\r\n));\r\nCardDescription.displayName = \"CardDescription\";\r\n\r\n/**\r\n * A compact action slot aligned alongside card header content.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a `<div>` positioned for buttons, menus, or status badges that should sit\r\n * at the top edge of the card without disturbing header spacing.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardAction>\r\n * <Button size=\"sm\">Manage</Button>\r\n * </CardAction>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardAction = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.action, className)}\r\n {...props}\r\n />\r\n));\r\nCardAction.displayName = \"CardAction\";\r\n\r\n/**\r\n * The main content region for card body content.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a `<div>` with interior spacing optimized for text, forms, charts, or any\r\n * other primary card content placed between the header and footer.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardContent>\r\n * <p>Your subscription renews on March 31.</p>\r\n * </CardContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardContent = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.content, className)}\r\n {...props}\r\n />\r\n));\r\nCardContent.displayName = \"CardContent\";\r\n\r\n/**\r\n * A footer region for actions, summaries, or secondary metadata.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a flex-enabled `<div>` that sits at the bottom of the card and is commonly\r\n * used for buttons, timestamps, totals, or other closing UI elements.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardFooter>\r\n * <Button>Save changes</Button>\r\n * </CardFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardFooter = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.footer, className)}\r\n {...props}\r\n />\r\n));\r\nCardFooter.displayName = \"CardFooter\";\r\n\r\nexport {Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle};\r\n"],"names":["Card","React","className","props","ref","cn","styles","CardHeader","CardTitle","CardDescription","CardAction","CardContent","CardFooter"],"mappings":";;;;AAyDA,MAAMA,OAAO,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/card.js","sources":["../../../src/components/ui/card.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./card.module.css\";\r\n\r\n/**\r\n * Represents the shared styling props supported by the Card root container.\r\n *\r\n * @remarks\r\n * Extends native `<div>` attributes so cards can participate in semantic layouts,\r\n * landmarks, and custom event handling while exposing a documented class override.\r\n */\r\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Additional CSS classes merged with the default card surface styles.\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Represents the shared styling props supported by card layout sections.\r\n *\r\n * @remarks\r\n * Use these props for presentational card regions such as headers, content blocks,\r\n * action rows, and footers. All standard `<div>` attributes continue to work.\r\n */\r\ninterface CardSectionProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Additional CSS classes merged with the section's default spacing styles.\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * A card container for grouping related content into a bordered surface.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a styled `<div>` with the library's card border, background, and shadow.\r\n * Compose it with {@link CardHeader}, {@link CardContent}, and {@link CardFooter}\r\n * to create structured panels without depending on a Base UI primitive.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Card>\r\n * <CardHeader>\r\n * <CardTitle>Team activity</CardTitle>\r\n * <CardDescription>Latest changes across your workspace.</CardDescription>\r\n * </CardHeader>\r\n * <CardContent>{children}</CardContent>\r\n * <CardFooter>Updated 2 minutes ago</CardFooter>\r\n * </Card>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.card, className)}\r\n {...props}\r\n />\r\n));\r\nCard.displayName = \"Card\";\r\n\r\n/**\r\n * A header region for card titles, descriptions, and top-level actions.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a `<div>` with vertical spacing tuned for leading card content.\r\n * Place {@link CardTitle}, {@link CardDescription}, and optional controls inside it.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardHeader>\r\n * <CardTitle>Revenue</CardTitle>\r\n * <CardDescription>Monthly recurring revenue overview.</CardDescription>\r\n * </CardHeader>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardHeader = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.header, className)}\r\n {...props}\r\n />\r\n));\r\nCardHeader.displayName = \"CardHeader\";\r\n\r\n/**\r\n * A prominent title slot for the primary heading inside a card.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a styled `<div>` for visual hierarchy. Provide semantic heading elements\r\n * inside it when the surrounding document outline requires explicit heading levels.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardTitle>Security overview</CardTitle>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardTitle = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.title, className)}\r\n {...props}\r\n />\r\n));\r\nCardTitle.displayName = \"CardTitle\";\r\n\r\n/**\r\n * A muted text block for supporting information beneath a card title.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a styled `<div>` intended for secondary copy, helper messaging, or status\r\n * summaries that contextualize the main card heading.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardDescription>Track response times and alert volume in one place.</CardDescription>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardDescription = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.description, className)}\r\n {...props}\r\n />\r\n));\r\nCardDescription.displayName = \"CardDescription\";\r\n\r\n/**\r\n * A compact action slot aligned alongside card header content.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a `<div>` positioned for buttons, menus, or status badges that should sit\r\n * at the top edge of the card without disturbing header spacing.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardAction>\r\n * <Button size=\"sm\">Manage</Button>\r\n * </CardAction>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardAction = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.action, className)}\r\n {...props}\r\n />\r\n));\r\nCardAction.displayName = \"CardAction\";\r\n\r\n/**\r\n * The main content region for card body content.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a `<div>` with interior spacing optimized for text, forms, charts, or any\r\n * other primary card content placed between the header and footer.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardContent>\r\n * <p>Your subscription renews on March 31.</p>\r\n * </CardContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardContent = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.content, className)}\r\n {...props}\r\n />\r\n));\r\nCardContent.displayName = \"CardContent\";\r\n\r\n/**\r\n * A footer region for actions, summaries, or secondary metadata.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a flex-enabled `<div>` that sits at the bottom of the card and is commonly\r\n * used for buttons, timestamps, totals, or other closing UI elements.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CardFooter>\r\n * <Button>Save changes</Button>\r\n * </CardFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst CardFooter = React.forwardRef<HTMLDivElement, CardSectionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.footer, className)}\r\n {...props}\r\n />\r\n));\r\nCardFooter.displayName = \"CardFooter\";\r\n\r\nexport {Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle};\r\n"],"names":["Card","React","className","props","ref","cn","styles","CardHeader","CardTitle","CardDescription","CardAction","CardContent","CardFooter"],"mappings":";;;;AAyDA,MAAMA,OAAO,WAAHA,GAAGC,wBAAAA,UAAgB,CAA4B,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GAC/E,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,YAAAA,IAAW,EAAEJ;QAC1B,GAAGC,KAAK;;AAGbH,KAAK,WAAW,GAAG;AAqBnB,MAAMO,aAAa,WAAHA,GAAGN,wBAAAA,UAAgB,CAAmC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GAC5F,IAAC;QACC,KAAKA;QACL,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AAW,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/card.module.css","webpack://./src/components/ui/card.module.css"],"names":[],"mappings":"AAAA;ECCE,gCAAgC;EAChC,kCAAkC;EAClC,kCAAkC;EAClC,gCAAgC;EAChC,+BAA+B;AACjC;;ADNiL;ECS/K,sBAAsB;EACtB,0BAA0B;EAC1B,sBAAsB;EACtB,aAAa;AACf;;ADb4Q;ECgB1Q,4BAA4B;EAC5B,sBAAsB;EACtB,gBAAgB;EAChB,cAAc;AAChB;;ADpBmW;ECuBjW,iCAAiC;EACjC,4BAA4B;AAC9B;;ADzB6a;EC4B3a,sBAAsB;EACtB,iBAAiB;AACnB;;AD9B4d;ECiC1d,8CAA8C;AAChD;;ADlC2hB;ECqCzhB,mBAAmB;EACnB,aAAa;AACf","sourcesContent":[".card{background-color:var(--ac-card);border:1px solid var(--ac-border);border-radius:var(--ac-radius-lg);box-shadow:0 1px 3px 0 rgba(0,0,0,.05);color:var(--ac-card-foreground)}.header{display:flex;flex-direction:column;gap:var(--ac-space-1);padding:var(--ac-space-6)}.title{font-size:var(--ac-text-lg);font-weight:600;letter-spacing:-.01em;line-height:1}.description{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm)}.action{align-self:flex-start;margin-left:auto}.content,.footer{padding:0 var(--ac-space-6) var(--ac-space-6)}.footer{align-items:center;display:flex}",".card {\n background-color: var(--ac-card);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg);\n color: var(--ac-card-foreground);\n box-shadow: 0 1px 3px #0000000d;\n}\n\n.header {\n gap: var(--ac-space-1);\n padding: var(--ac-space-6);\n flex-direction: column;\n display: flex;\n}\n\n.title {\n font-size: var(--ac-text-lg);\n letter-spacing: -.01em;\n font-weight: 600;\n line-height: 1;\n}\n\n.description {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n}\n\n.action {\n align-self: flex-start;\n margin-left: auto;\n}\n\n.content, .footer {\n padding: 0 var(--ac-space-6) var(--ac-space-6);\n}\n\n.footer {\n align-items: center;\n display: flex;\n}\n"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../src/components/ui/carousel.tsx"],"names":[],"mappings":"AAGA,OAAO,gBAAgB,EAAE,EAAC,KAAK,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEjF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,KAAK,WAAW,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACjE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAChD,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAE/C;;GAEG;AACH,KAAK,aAAa,GAAG;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;CACrC,CAAC;AAuBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,QAAA,MAAM,QAAQ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Y,EAAC,eAAe,EAAE,cAAc,EAAE,aAAa,EAAC,CAAC"}
|
|
@@ -3,41 +3,41 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
4
|
import embla_carousel_react from "embla-carousel-react";
|
|
5
5
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
6
|
-
import { createContext, forwardRef, useCallback, useContext, useEffect, useState } from "react";
|
|
7
6
|
import { Button } from "./button.js";
|
|
8
7
|
import { cn } from "../../lib/utilities.js";
|
|
9
8
|
import carousel_module from "./carousel.module.js";
|
|
10
|
-
|
|
9
|
+
import * as __rspack_external_react from "react";
|
|
10
|
+
const CarouselContext = /*#__PURE__*/ __rspack_external_react.createContext(null);
|
|
11
11
|
function useCarousel() {
|
|
12
|
-
const context = useContext(CarouselContext);
|
|
12
|
+
const context = __rspack_external_react.useContext(CarouselContext);
|
|
13
13
|
if (!context) throw new Error("useCarousel must be used within a <Carousel />");
|
|
14
14
|
return context;
|
|
15
15
|
}
|
|
16
|
-
const Carousel = /*#__PURE__*/ forwardRef(({ orientation, opts, setApi, plugins, className, children, ...props }, ref)=>{
|
|
16
|
+
const Carousel = /*#__PURE__*/ __rspack_external_react.forwardRef(({ orientation, opts, setApi, plugins, className, children, ...props }, ref)=>{
|
|
17
17
|
const resolvedOrientation = orientation ?? (opts?.axis === "y" ? "vertical" : "horizontal");
|
|
18
18
|
const resolvedAxis = "vertical" === resolvedOrientation ? "y" : "x";
|
|
19
19
|
const [carouselRef, api] = embla_carousel_react({
|
|
20
20
|
...opts,
|
|
21
21
|
axis: resolvedAxis
|
|
22
22
|
}, plugins);
|
|
23
|
-
const [canScrollPrev, setCanScrollPrev] = useState(false);
|
|
24
|
-
const [canScrollNext, setCanScrollNext] = useState(false);
|
|
25
|
-
const onSelect = useCallback((emblaApi)=>{
|
|
23
|
+
const [canScrollPrev, setCanScrollPrev] = __rspack_external_react.useState(false);
|
|
24
|
+
const [canScrollNext, setCanScrollNext] = __rspack_external_react.useState(false);
|
|
25
|
+
const onSelect = __rspack_external_react.useCallback((emblaApi)=>{
|
|
26
26
|
if (!emblaApi) return;
|
|
27
27
|
setCanScrollPrev(emblaApi.canScrollPrev());
|
|
28
28
|
setCanScrollNext(emblaApi.canScrollNext());
|
|
29
29
|
}, []);
|
|
30
|
-
const scrollPrev = useCallback(()=>{
|
|
30
|
+
const scrollPrev = __rspack_external_react.useCallback(()=>{
|
|
31
31
|
api?.scrollPrev();
|
|
32
32
|
}, [
|
|
33
33
|
api
|
|
34
34
|
]);
|
|
35
|
-
const scrollNext = useCallback(()=>{
|
|
35
|
+
const scrollNext = __rspack_external_react.useCallback(()=>{
|
|
36
36
|
api?.scrollNext();
|
|
37
37
|
}, [
|
|
38
38
|
api
|
|
39
39
|
]);
|
|
40
|
-
const handleKeyDown = useCallback((event)=>{
|
|
40
|
+
const handleKeyDown = __rspack_external_react.useCallback((event)=>{
|
|
41
41
|
if ("horizontal" === orientation) {
|
|
42
42
|
if ("ArrowLeft" === event.key) {
|
|
43
43
|
event.preventDefault();
|
|
@@ -60,14 +60,14 @@ const Carousel = /*#__PURE__*/ forwardRef(({ orientation, opts, setApi, plugins,
|
|
|
60
60
|
scrollNext,
|
|
61
61
|
scrollPrev
|
|
62
62
|
]);
|
|
63
|
-
useEffect(()=>{
|
|
63
|
+
__rspack_external_react.useEffect(()=>{
|
|
64
64
|
if (!api || !setApi) return;
|
|
65
65
|
setApi(api);
|
|
66
66
|
}, [
|
|
67
67
|
api,
|
|
68
68
|
setApi
|
|
69
69
|
]);
|
|
70
|
-
useEffect(()=>{
|
|
70
|
+
__rspack_external_react.useEffect(()=>{
|
|
71
71
|
if (!api) return;
|
|
72
72
|
onSelect(api);
|
|
73
73
|
api.on("reInit", onSelect);
|
|
@@ -106,7 +106,7 @@ const Carousel = /*#__PURE__*/ forwardRef(({ orientation, opts, setApi, plugins,
|
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
Carousel.displayName = "Carousel";
|
|
109
|
-
const CarouselContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
109
|
+
const CarouselContent = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>{
|
|
110
110
|
const { carouselRef, orientation } = useCarousel();
|
|
111
111
|
return /*#__PURE__*/ jsx("div", {
|
|
112
112
|
ref: carouselRef,
|
|
@@ -120,7 +120,7 @@ const CarouselContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=
|
|
|
120
120
|
});
|
|
121
121
|
});
|
|
122
122
|
CarouselContent.displayName = "CarouselContent";
|
|
123
|
-
const CarouselItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
123
|
+
const CarouselItem = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>{
|
|
124
124
|
const { orientation } = useCarousel();
|
|
125
125
|
return /*#__PURE__*/ jsx("div", {
|
|
126
126
|
ref: ref,
|
|
@@ -132,7 +132,7 @@ const CarouselItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
134
|
CarouselItem.displayName = "CarouselItem";
|
|
135
|
-
const CarouselPrevious = /*#__PURE__*/ forwardRef(({ children, className, variant = "outline", size = "icon", ...props }, ref)=>{
|
|
135
|
+
const CarouselPrevious = /*#__PURE__*/ __rspack_external_react.forwardRef(({ children, className, variant = "outline", size = "icon", ...props }, ref)=>{
|
|
136
136
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
137
137
|
const mergedProps = mergeProps({
|
|
138
138
|
onClick: scrollPrev,
|
|
@@ -157,7 +157,7 @@ const CarouselPrevious = /*#__PURE__*/ forwardRef(({ children, className, varian
|
|
|
157
157
|
});
|
|
158
158
|
});
|
|
159
159
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
160
|
-
const CarouselNext = /*#__PURE__*/ forwardRef(({ children, className, variant = "outline", size = "icon", ...props }, ref)=>{
|
|
160
|
+
const CarouselNext = /*#__PURE__*/ __rspack_external_react.forwardRef(({ children, className, variant = "outline", size = "icon", ...props }, ref)=>{
|
|
161
161
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
162
162
|
const mergedProps = mergeProps({
|
|
163
163
|
onClick: scrollNext,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/carousel.js","sources":["../../../src/components/ui/carousel.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport useEmblaCarousel, {type UseEmblaCarouselType} from \"embla-carousel-react\";\r\nimport {ArrowLeft, ArrowRight} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {Button} from \"@/components/ui/button\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./carousel.module.css\";\r\n\r\ntype CarouselApi = NonNullable<UseEmblaCarouselType[1]>;\r\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\r\ntype CarouselOptions = UseCarouselParameters[0];\r\ntype CarouselPlugin = UseCarouselParameters[1];\r\n\r\n/**\r\n * Carousel configuration props.\r\n */\r\ntype CarouselProps = {\r\n /**\r\n * Embla carousel options forwarded to the underlying carousel instance.\r\n * @default undefined\r\n */\r\n opts?: CarouselOptions;\r\n /**\r\n * Embla plugins applied to the carousel instance.\r\n * @default undefined\r\n */\r\n plugins?: CarouselPlugin;\r\n /**\r\n * Axis orientation used for layout and keyboard navigation. This prop also\r\n * controls Embla's internal `axis` option (`\"x\"` for horizontal and `\"y\"`\r\n * for vertical).\r\n * @default \"horizontal\"\r\n */\r\n orientation?: \"horizontal\" | \"vertical\";\r\n /**\r\n * Callback invoked with the initialized Embla API instance.\r\n * @default undefined\r\n */\r\n setApi?: (api: CarouselApi) => void;\r\n};\r\n\r\ntype CarouselContextProps = {\r\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\r\n api: ReturnType<typeof useEmblaCarousel>[1];\r\n scrollPrev: () => void;\r\n scrollNext: () => void;\r\n canScrollPrev: boolean;\r\n canScrollNext: boolean;\r\n} & CarouselProps;\r\n\r\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\r\n\r\nfunction useCarousel(): CarouselContextProps {\r\n const context = React.useContext(CarouselContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useCarousel must be used within a <Carousel />\");\r\n }\r\n\r\n return context;\r\n}\r\n\r\n/**\r\n * Provides a compound carousel container powered by Embla.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element\r\n * - Built on `embla-carousel-react`\r\n * - Exposes context for content, items, and navigation controls\r\n *\r\n * @example\r\n * ```tsx\r\n * <Carousel>\r\n * <CarouselContent>\r\n * <CarouselItem>Slide 1</CarouselItem>\r\n * <CarouselItem>Slide 2</CarouselItem>\r\n * </CarouselContent>\r\n * <CarouselPrevious />\r\n * <CarouselNext />\r\n * </Carousel>\r\n * ```\r\n *\r\n * @param props.opts - Embla options forwarded to the carousel instance. Common\r\n * options include `loop` for infinite scrolling, `align` for slide alignment,\r\n * `slidesToScroll` to control navigation increments, `dragFree` for momentum\r\n * dragging, `duration` for transition timing, and `startIndex` for the initial\r\n * slide.\r\n * @param props.plugins - Embla plugins applied to the carousel instance.\r\n *\r\n * @example With autoplay\r\n * ```tsx\r\n * import Autoplay from \"embla-carousel-autoplay\";\r\n *\r\n * <Carousel plugins={[Autoplay({delay: 3000})]}>\r\n * <CarouselContent>...</CarouselContent>\r\n * </Carousel>\r\n * ```\r\n *\r\n * @param props.setApi - Optional callback for advanced Embla API access after\r\n * initialization, useful for custom controls, analytics, or external state\r\n * synchronization.\r\n *\r\n * @see {@link https://www.embla-carousel.com/get-started/react/ | Embla React Docs}\r\n */\r\nconst Carousel = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselProps>(\r\n ({orientation, opts, setApi, plugins, className, children, ...props}, ref) => {\r\n // Derive axis from orientation, or orientation from opts.axis, defaulting to horizontal.\r\n const resolvedOrientation = orientation ?? (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\");\r\n const resolvedAxis = resolvedOrientation === \"vertical\" ? \"y\" : \"x\";\r\n\r\n const [carouselRef, api] = useEmblaCarousel(\r\n {\r\n ...opts,\r\n axis: resolvedAxis,\r\n },\r\n plugins,\r\n );\r\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\r\n const [canScrollNext, setCanScrollNext] = React.useState(false);\r\n\r\n const onSelect = React.useCallback((emblaApi: CarouselApi) => {\r\n if (!emblaApi) {\r\n return;\r\n }\r\n\r\n setCanScrollPrev(emblaApi.canScrollPrev());\r\n setCanScrollNext(emblaApi.canScrollNext());\r\n }, []);\r\n\r\n const scrollPrev = React.useCallback(() => {\r\n api?.scrollPrev();\r\n }, [api]);\r\n\r\n const scrollNext = React.useCallback(() => {\r\n api?.scrollNext();\r\n }, [api]);\r\n\r\n const handleKeyDown = React.useCallback(\r\n (event: React.KeyboardEvent<HTMLDivElement>) => {\r\n if (orientation === \"horizontal\") {\r\n if (event.key === \"ArrowLeft\") {\r\n event.preventDefault();\r\n scrollPrev();\r\n } else if (event.key === \"ArrowRight\") {\r\n event.preventDefault();\r\n scrollNext();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if (event.key === \"ArrowUp\") {\r\n event.preventDefault();\r\n scrollPrev();\r\n } else if (event.key === \"ArrowDown\") {\r\n event.preventDefault();\r\n scrollNext();\r\n }\r\n },\r\n [orientation, scrollNext, scrollPrev],\r\n );\r\n\r\n React.useEffect(() => {\r\n if (!api || !setApi) {\r\n return;\r\n }\r\n\r\n setApi(api);\r\n }, [api, setApi]);\r\n\r\n React.useEffect(() => {\r\n if (!api) {\r\n return;\r\n }\r\n\r\n onSelect(api);\r\n api.on(\"reInit\", onSelect);\r\n api.on(\"select\", onSelect);\r\n\r\n return () => {\r\n api.off(\"reInit\", onSelect);\r\n api.off(\"select\", onSelect);\r\n };\r\n }, [api, onSelect]);\r\n\r\n return (\r\n <CarouselContext.Provider\r\n value={{\r\n api,\r\n canScrollNext,\r\n canScrollPrev,\r\n carouselRef,\r\n opts,\r\n orientation: resolvedOrientation,\r\n plugins,\r\n scrollNext,\r\n scrollPrev,\r\n setApi,\r\n }}>\r\n <div\r\n ref={ref}\r\n data-orientation={resolvedOrientation}\r\n onKeyDownCapture={handleKeyDown}\r\n className={cn(styles.carousel, className)}\r\n role='region'\r\n aria-roledescription='carousel'\r\n {...props}>\r\n {children}\r\n </div>\r\n </CarouselContext.Provider>\r\n );\r\n },\r\n);\r\nCarousel.displayName = \"Carousel\";\r\n\r\n/**\r\n * Renders the scrollable track that contains carousel slides.\r\n *\r\n * @remarks\r\n * - Renders nested `<div>` elements\r\n * - Built on Embla's viewport and track structure\r\n *\r\n * @example\r\n * ```tsx\r\n * <CarouselContent>\r\n * <CarouselItem>Slide</CarouselItem>\r\n * </CarouselContent>\r\n * ```\r\n *\r\n * @see {@link https://www.embla-carousel.com/get-started/react/ | Embla React Docs}\r\n */\r\nconst CarouselContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {carouselRef, orientation} = useCarousel();\r\n\r\n return (\r\n <div\r\n ref={carouselRef}\r\n className={styles.viewport}>\r\n <div\r\n ref={ref}\r\n data-orientation={orientation}\r\n className={cn(styles.content, orientation === \"vertical\" && styles.contentVertical, className)}\r\n {...props}\r\n />\r\n </div>\r\n );\r\n});\r\nCarouselContent.displayName = \"CarouselContent\";\r\n\r\n/**\r\n * Renders an individual carousel slide.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element\r\n * - Built on the shared carousel context for orientation-aware styling\r\n *\r\n * @example\r\n * ```tsx\r\n * <CarouselItem>Slide content</CarouselItem>\r\n * ```\r\n *\r\n * @see {@link https://www.embla-carousel.com/get-started/react/ | Embla React Docs}\r\n */\r\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {orientation} = useCarousel();\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n role='group'\r\n aria-roledescription='slide'\r\n data-orientation={orientation}\r\n className={cn(styles.item, orientation === \"vertical\" && styles.itemVertical, className)}\r\n {...props}\r\n />\r\n );\r\n});\r\nCarouselItem.displayName = \"CarouselItem\";\r\n\r\n/**\r\n * Renders the previous-slide navigation button.\r\n *\r\n * @remarks\r\n * - Renders the shared `<Button>` component\r\n * - Built on carousel context state and Embla navigation APIs\r\n * - Pass `children` to override the default `ArrowLeft` navigation icon\r\n *\r\n * @example\r\n * ```tsx\r\n * <CarouselPrevious />\r\n * ```\r\n *\r\n * @see {@link https://www.embla-carousel.com/get-started/react/ | Embla React Docs}\r\n */\r\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\r\n ({children, className, variant = \"outline\", size = \"icon\", ...props}, ref) => {\r\n const {orientation, scrollPrev, canScrollPrev} = useCarousel();\r\n const mergedProps = mergeProps<\"button\">({onClick: scrollPrev, disabled: !canScrollPrev}, props);\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant={variant}\r\n size={size}\r\n data-orientation={orientation}\r\n className={cn(styles.navigationButton, styles.previousButton, className)}\r\n {...mergedProps}>\r\n {children ?? <ArrowLeft className={styles.navigationIcon} />}\r\n <span className={styles.srOnly}>Previous slide</span>\r\n </Button>\r\n );\r\n },\r\n);\r\nCarouselPrevious.displayName = \"CarouselPrevious\";\r\n\r\n/**\r\n * Renders the next-slide navigation button.\r\n *\r\n * @remarks\r\n * - Renders the shared `<Button>` component\r\n * - Built on carousel context state and Embla navigation APIs\r\n * - Pass `children` to override the default `ArrowRight` navigation icon\r\n *\r\n * @example\r\n * ```tsx\r\n * <CarouselNext />\r\n * ```\r\n *\r\n * @see {@link https://www.embla-carousel.com/get-started/react/ | Embla React Docs}\r\n */\r\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\r\n ({children, className, variant = \"outline\", size = \"icon\", ...props}, ref) => {\r\n const {orientation, scrollNext, canScrollNext} = useCarousel();\r\n const mergedProps = mergeProps<\"button\">({onClick: scrollNext, disabled: !canScrollNext}, props);\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant={variant}\r\n size={size}\r\n data-orientation={orientation}\r\n className={cn(styles.navigationButton, styles.nextButton, className)}\r\n {...mergedProps}>\r\n {children ?? <ArrowRight className={styles.navigationIcon} />}\r\n <span className={styles.srOnly}>Next slide</span>\r\n </Button>\r\n );\r\n },\r\n);\r\nCarouselNext.displayName = \"CarouselNext\";\r\n\r\nexport {Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CarouselApi};\r\nexport type {CarouselOptions, CarouselPlugin, CarouselProps};\r\n"],"names":["CarouselContext","React","useCarousel","context","Error","Carousel","orientation","opts","setApi","plugins","className","children","props","ref","resolvedOrientation","resolvedAxis","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","emblaApi","scrollPrev","scrollNext","handleKeyDown","event","cn","styles","CarouselContent","CarouselItem","CarouselPrevious","variant","size","mergedProps","mergeProps","Button","ArrowLeft","CarouselNext","ArrowRight"],"mappings":";;;;;;;;;AAsDA,MAAMA,kBAAkB,WAAHA,GAAGC,cAAiD;AAEzE,SAASC;IACP,MAAMC,UAAUF,WAAiBD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AA4CA,MAAME,WAAW,WAAHA,GAAGJ,WACf,CAAC,EAACK,WAAW,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EAAEC;IAEpE,MAAMC,sBAAsBR,eAAgBC,CAAAA,MAAM,SAAS,MAAM,aAAa,YAAW;IACzF,MAAMQ,eAAeD,AAAwB,eAAxBA,sBAAqC,MAAM;IAEhE,MAAM,CAACE,aAAaC,IAAI,GAAGC,qBACzB;QACE,GAAGX,IAAI;QACP,MAA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B;QAAC,SAASZ;QAAY,UAAU,CAACN;IAAa,GAAGP;IAE1F,OAAO,WAAP,GACE,KAAC0B,QAAMA;QACL,KAAKzB;QACL,SAASqB;QACT,MAAMC;QACN,oBAAkB7B;QAClB,WAAWuB,GAAGC,gBAAAA,gBAAuB,EAAEA,gBAAAA,cAAqB,EAAEpB;QAC7D,GAAG0B,WAAW;;YACdzB,YAAY,WAAZA,GAAY,IAAC4B,WAASA;gBAAC,WAAWT,gBAAAA,cAAqB;;0BACxD,IAAC;gBAAK,WAAWA,gBAAAA,MAAa;0BAAE;;;;AAGtC;AAEFG,iBAAiB,WAAW,GAAG;AAiB/B,MAAMO,eAAe,WAAHA,GAAGvC,WACnB,CAAC,EAACU,QAAQ,EAAED,SAAS,EAAEwB,UAAU,SAAS,EAAEC,OAAO,MAAM,EAAE,GAAGvB,OAAM,EAAEC;IACpE,MAAM,EAACP,WAAW,EAAEoB,UAAU,EAAEL,aAAa,EAAC,GAAGnB;IACjD,MAAMkC,cAAcC,WAAqB;QAAC,SAASX;QAAY,UAAU,CAACL;IAAa,GAAGT;IAE1F,OAAO,WAAP,GACE,KAAC0B,QAAMA;QACL,KAAKzB;QACL,SAASqB;QACT,MAAMC;QACN,oBAAkB7B;QAClB,WAAWuB,GAAGC,gBAAAA,gBAAuB,EAAEA,gBAAAA,UAAiB,EAAEpB;QACzD,GAAG0B,WAAW;;YACdzB,YAAY,WAAZA,GAAY,IAAC8B,YAAUA;gBAAC,WAAWX,gBAAAA,cAAqB;;0BACzD,IAAC;gBAAK,WAAWA,gBAAAA,MAAa;0BAAE;;;;AAGtC;AAEFU,aAAa,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/carousel.js","sources":["../../../src/components/ui/carousel.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport useEmblaCarousel, {type UseEmblaCarouselType} from \"embla-carousel-react\";\r\nimport {ArrowLeft, ArrowRight} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {Button} from \"@/components/ui/button\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./carousel.module.css\";\r\n\r\ntype CarouselApi = NonNullable<UseEmblaCarouselType[1]>;\r\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\r\ntype CarouselOptions = UseCarouselParameters[0];\r\ntype CarouselPlugin = UseCarouselParameters[1];\r\n\r\n/**\r\n * Carousel configuration props.\r\n */\r\ntype CarouselProps = {\r\n /**\r\n * Embla carousel options forwarded to the underlying carousel instance.\r\n * @default undefined\r\n */\r\n opts?: CarouselOptions;\r\n /**\r\n * Embla plugins applied to the carousel instance.\r\n * @default undefined\r\n */\r\n plugins?: CarouselPlugin;\r\n /**\r\n * Axis orientation used for layout and keyboard navigation. This prop also\r\n * controls Embla's internal `axis` option (`\"x\"` for horizontal and `\"y\"`\r\n * for vertical).\r\n * @default \"horizontal\"\r\n */\r\n orientation?: \"horizontal\" | \"vertical\";\r\n /**\r\n * Callback invoked with the initialized Embla API instance.\r\n * @default undefined\r\n */\r\n setApi?: (api: CarouselApi) => void;\r\n};\r\n\r\ntype CarouselContextProps = {\r\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\r\n api: ReturnType<typeof useEmblaCarousel>[1];\r\n scrollPrev: () => void;\r\n scrollNext: () => void;\r\n canScrollPrev: boolean;\r\n canScrollNext: boolean;\r\n} & CarouselProps;\r\n\r\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\r\n\r\nfunction useCarousel(): CarouselContextProps {\r\n const context = React.useContext(CarouselContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useCarousel must be used within a <Carousel />\");\r\n }\r\n\r\n return context;\r\n}\r\n\r\n/**\r\n * Provides a compound carousel container powered by Embla.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element\r\n * - Built on `embla-carousel-react`\r\n * - Exposes context for content, items, and navigation controls\r\n *\r\n * @example\r\n * ```tsx\r\n * <Carousel>\r\n * <CarouselContent>\r\n * <CarouselItem>Slide 1</CarouselItem>\r\n * <CarouselItem>Slide 2</CarouselItem>\r\n * </CarouselContent>\r\n * <CarouselPrevious />\r\n * <CarouselNext />\r\n * </Carousel>\r\n * ```\r\n *\r\n * @param props.opts - Embla options forwarded to the carousel instance. Common\r\n * options include `loop` for infinite scrolling, `align` for slide alignment,\r\n * `slidesToScroll` to control navigation increments, `dragFree` for momentum\r\n * dragging, `duration` for transition timing, and `startIndex` for the initial\r\n * slide.\r\n * @param props.plugins - Embla plugins applied to the carousel instance.\r\n *\r\n * @example With autoplay\r\n * ```tsx\r\n * import Autoplay from \"embla-carousel-autoplay\";\r\n *\r\n * <Carousel plugins={[Autoplay({delay: 3000})]}>\r\n * <CarouselContent>...</CarouselContent>\r\n * </Carousel>\r\n * ```\r\n *\r\n * @param props.setApi - Optional callback for advanced Embla API access after\r\n * initialization, useful for custom controls, analytics, or external state\r\n * synchronization.\r\n *\r\n * @see {@link https://www.embla-carousel.com/get-started/react/ | Embla React Docs}\r\n */\r\nconst Carousel = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselProps>(\r\n ({orientation, opts, setApi, plugins, className, children, ...props}, ref) => {\r\n // Derive axis from orientation, or orientation from opts.axis, defaulting to horizontal.\r\n const resolvedOrientation = orientation ?? (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\");\r\n const resolvedAxis = resolvedOrientation === \"vertical\" ? \"y\" : \"x\";\r\n\r\n const [carouselRef, api] = useEmblaCarousel(\r\n {\r\n ...opts,\r\n axis: resolvedAxis,\r\n },\r\n plugins,\r\n );\r\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\r\n const [canScrollNext, setCanScrollNext] = React.useState(false);\r\n\r\n const onSelect = React.useCallback((emblaApi: CarouselApi) => {\r\n if (!emblaApi) {\r\n return;\r\n }\r\n\r\n // eslint-disable-next-line react-hooks-extra/no-direct-set-state-in-use-effect\r\n setCanScrollPrev(emblaApi.canScrollPrev());\r\n // eslint-disable-next-line react-hooks-extra/no-direct-set-state-in-use-effect\r\n setCanScrollNext(emblaApi.canScrollNext());\r\n }, []);\r\n\r\n const scrollPrev = React.useCallback(() => {\r\n api?.scrollPrev();\r\n }, [api]);\r\n\r\n const scrollNext = React.useCallback(() => {\r\n api?.scrollNext();\r\n }, [api]);\r\n\r\n const handleKeyDown = React.useCallback(\r\n (event: React.KeyboardEvent<HTMLDivElement>) => {\r\n if (orientation === \"horizontal\") {\r\n if (event.key === \"ArrowLeft\") {\r\n event.preventDefault();\r\n scrollPrev();\r\n } else if (event.key === \"ArrowRight\") {\r\n event.preventDefault();\r\n scrollNext();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if (event.key === \"ArrowUp\") {\r\n event.preventDefault();\r\n scrollPrev();\r\n } else if (event.key === \"ArrowDown\") {\r\n event.preventDefault();\r\n scrollNext();\r\n }\r\n },\r\n [orientation, scrollNext, scrollPrev],\r\n );\r\n\r\n React.useEffect(() => {\r\n if (!api || !setApi) {\r\n return;\r\n }\r\n\r\n setApi(api);\r\n }, [api, setApi]);\r\n\r\n React.useEffect(() => {\r\n if (!api) {\r\n return;\r\n }\r\n\r\n onSelect(api);\r\n api.on(\"reInit\", onSelect);\r\n api.on(\"select\", onSelect);\r\n\r\n return () => {\r\n api.off(\"reInit\", onSelect);\r\n api.off(\"select\", onSelect);\r\n };\r\n }, [api, onSelect]);\r\n\r\n return (\r\n <CarouselContext.Provider\r\n value={{\r\n api,\r\n canScrollNext,\r\n canScrollPrev,\r\n carouselRef,\r\n opts,\r\n orientation: resolvedOrientation,\r\n plugins,\r\n scrollNext,\r\n scrollPrev,\r\n setApi,\r\n }}>\r\n <div\r\n ref={ref}\r\n data-orientation={resolvedOrientation}\r\n onKeyDownCapture={handleKeyDown}\r\n className={cn(styles.carousel, className)}\r\n role='region'\r\n aria-roledescription='carousel'\r\n {...props}>\r\n {children}\r\n </div>\r\n </CarouselContext.Provider>\r\n );\r\n },\r\n);\r\nCarousel.displayName = \"Carousel\";\r\n\r\n/**\r\n * Renders the scrollable track that contains carousel slides.\r\n *\r\n * @remarks\r\n * - Renders nested `<div>` elements\r\n * - Built on Embla's viewport and track structure\r\n *\r\n * @example\r\n * ```tsx\r\n * <CarouselContent>\r\n * <CarouselItem>Slide</CarouselItem>\r\n * </CarouselContent>\r\n * ```\r\n *\r\n * @see {@link https://www.embla-carousel.com/get-started/react/ | Embla React Docs}\r\n */\r\nconst CarouselContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {carouselRef, orientation} = useCarousel();\r\n\r\n return (\r\n <div\r\n ref={carouselRef}\r\n className={styles.viewport}>\r\n <div\r\n ref={ref}\r\n data-orientation={orientation}\r\n className={cn(styles.content, orientation === \"vertical\" && styles.contentVertical, className)}\r\n {...props}\r\n />\r\n </div>\r\n );\r\n});\r\nCarouselContent.displayName = \"CarouselContent\";\r\n\r\n/**\r\n * Renders an individual carousel slide.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element\r\n * - Built on the shared carousel context for orientation-aware styling\r\n *\r\n * @example\r\n * ```tsx\r\n * <CarouselItem>Slide content</CarouselItem>\r\n * ```\r\n *\r\n * @see {@link https://www.embla-carousel.com/get-started/react/ | Embla React Docs}\r\n */\r\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {orientation} = useCarousel();\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n role='group'\r\n aria-roledescription='slide'\r\n data-orientation={orientation}\r\n className={cn(styles.item, orientation === \"vertical\" && styles.itemVertical, className)}\r\n {...props}\r\n />\r\n );\r\n});\r\nCarouselItem.displayName = \"CarouselItem\";\r\n\r\n/**\r\n * Renders the previous-slide navigation button.\r\n *\r\n * @remarks\r\n * - Renders the shared `<Button>` component\r\n * - Built on carousel context state and Embla navigation APIs\r\n * - Pass `children` to override the default `ArrowLeft` navigation icon\r\n *\r\n * @example\r\n * ```tsx\r\n * <CarouselPrevious />\r\n * ```\r\n *\r\n * @see {@link https://www.embla-carousel.com/get-started/react/ | Embla React Docs}\r\n */\r\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\r\n ({children, className, variant = \"outline\", size = \"icon\", ...props}, ref) => {\r\n const {orientation, scrollPrev, canScrollPrev} = useCarousel();\r\n const mergedProps = mergeProps<\"button\">({onClick: scrollPrev, disabled: !canScrollPrev}, props);\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant={variant}\r\n size={size}\r\n data-orientation={orientation}\r\n className={cn(styles.navigationButton, styles.previousButton, className)}\r\n {...mergedProps}>\r\n {children ?? <ArrowLeft className={styles.navigationIcon} />}\r\n <span className={styles.srOnly}>Previous slide</span>\r\n </Button>\r\n );\r\n },\r\n);\r\nCarouselPrevious.displayName = \"CarouselPrevious\";\r\n\r\n/**\r\n * Renders the next-slide navigation button.\r\n *\r\n * @remarks\r\n * - Renders the shared `<Button>` component\r\n * - Built on carousel context state and Embla navigation APIs\r\n * - Pass `children` to override the default `ArrowRight` navigation icon\r\n *\r\n * @example\r\n * ```tsx\r\n * <CarouselNext />\r\n * ```\r\n *\r\n * @see {@link https://www.embla-carousel.com/get-started/react/ | Embla React Docs}\r\n */\r\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\r\n ({children, className, variant = \"outline\", size = \"icon\", ...props}, ref) => {\r\n const {orientation, scrollNext, canScrollNext} = useCarousel();\r\n const mergedProps = mergeProps<\"button\">({onClick: scrollNext, disabled: !canScrollNext}, props);\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant={variant}\r\n size={size}\r\n data-orientation={orientation}\r\n className={cn(styles.navigationButton, styles.nextButton, className)}\r\n {...mergedProps}>\r\n {children ?? <ArrowRight className={styles.navigationIcon} />}\r\n <span className={styles.srOnly}>Next slide</span>\r\n </Button>\r\n );\r\n },\r\n);\r\nCarouselNext.displayName = \"CarouselNext\";\r\n\r\nexport {Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CarouselApi};\r\nexport type {CarouselOptions, CarouselPlugin, CarouselProps};\r\n"],"names":["CarouselContext","React","useCarousel","context","Error","Carousel","orientation","opts","setApi","plugins","className","children","props","ref","resolvedOrientation","resolvedAxis","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","emblaApi","scrollPrev","scrollNext","handleKeyDown","event","cn","styles","CarouselContent","CarouselItem","CarouselPrevious","variant","size","mergedProps","mergeProps","Button","ArrowLeft","CarouselNext","ArrowRight"],"mappings":";;;;;;;;;AAsDA,MAAMA,kBAAkB,WAAHA,GAAGC,wBAAAA,aAAmB,CAA8B;AAEzE,SAASC;IACP,MAAMC,UAAUF,wBAAAA,UAAgB,CAACD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AA4CA,MAAME,WAAW,WAAHA,GAAGJ,wBAAAA,UAAgB,CAC/B,CAAC,EAACK,WAAW,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EAAEC;IAEpE,MAAMC,sBAAsBR,eAAgBC,CAAAA,MAAM,SAAS,MAAM,aAAa,YAAW;IACzF,MAAMQ,eAAeD,AAAwB,eAAxBA,sBAAqC,MAAM;IAEhE,MAAM,CAACE,aAAaC,IAAI,GAAGC,qBACzB;QACE,GAAGX,IAAI;QACP,MAAMQ;IACR,GACAN;IAEF,MAAM,CAACU,eAAeC,iBAAiB,GAAGnB,wBAAAA,QAAc,CAAC;IACzD,MAAM,CAACoB,eAAeC,iBAAiB,GAAGrB,wBAAAA,QAAc,CAAC;IAEzD,MAAMsB,WAAWtB,wBAAAA,WAAiB,CAAC,CAACuB;QAClC,IAAI,CAACA,UACH;QAIFJ,iBAAiBI,SAAS,aAAa;QAEvCF,iBAAiBE,SAAS,aAAa;IACzC,GAAG,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,oBAAkB7B;QAClB,WAAWuB,GAAGC,gBAAAA,gBAAuB,EAAEA,gBAAAA,cAAqB,EAAEpB;QAC7D,GAAG0B,WAAW;;YACdzB,YAAY,WAAZA,GAAY,IAAC4B,WAASA;gBAAC,WAAWT,gBAAAA,cAAqB;;0BACxD,IAAC;gBAAK,WAAWA,gBAAAA,MAAa;0BAAE;;;;AAGtC;AAEFG,iBAAiB,WAAW,GAAG;AAiB/B,MAAMO,eAAe,WAAHA,GAAGvC,wBAAAA,UAAgB,CACnC,CAAC,EAACU,QAAQ,EAAED,SAAS,EAAEwB,UAAU,SAAS,EAAEC,OAAO,MAAM,EAAE,GAAGvB,OAAM,EAAEC;IACpE,MAAM,EAACP,WAAW,EAAEoB,UAAU,EAAEL,aAAa,EAAC,GAAGnB;IACjD,MAAMkC,cAAcC,WAAqB;QAAC,SAASX;QAAY,UAAU,CAACL;IAAa,GAAGT;IAE1F,OAAO,WAAP,GACE,KAAC0B,QAAMA;QACL,KAAKzB;QACL,SAASqB;QACT,MAAMC;QACN,oBAAkB7B;QAClB,WAAWuB,GAAGC,gBAAAA,gBAAuB,EAAEA,gBAAAA,UAAiB,EAAEpB;QACzD,GAAG0B,WAAW;;YACdzB,YAAY,WAAZA,GAAY,IAAC8B,YAAUA;gBAAC,WAAWX,gBAAAA,cAAqB;;0BACzD,IAAC;gBAAK,WAAWA,gBAAAA,MAAa;0BAAE;;;;AAGtC;AAEFU,aAAa,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/carousel.module.css","webpack://./src/components/ui/carousel.module.css"],"names":[],"mappings":"AAAA;ECCE,kBAAkB;AACpB;;ADF4B;ECK1B,gBAAgB;AAClB;;ADNsD;ECSpD,uCAAuC;EACvC,aAAa;AACf;;ADXmH;ECcjH,cAAc;EACd,sCAAsC;EACtC,sBAAsB;AACxB;;ADjB8M;ECoB5M,YAAY;EACZ,+BAA+B;EAC/B,cAAc;AAChB;;ADvB6Q;EC0B3Q,eAAe;EACf,8BAA8B;AAChC;;AD5BwU;EC+BtU,oBAAoB;EACpB,WAAW;EACX,YAAY;EACZ,kBAAkB;AACpB;;ADnCuZ;ECsCrZ,QAAQ;EACR,2BAA2B;AAC7B;;ADxCye;EC2Cve,SAAS;EACT,yCAAyC;AAC3C;;AD7CwkB;ECgDtkB,WAAW;AACb;;ADjDgoB;ECoD9nB,YAAY;AACd;;ADrDqrB;ECwDnrB,UAAU;AACZ;;ADzD0uB;EC4DxuB,aAAa;AACf;;AD7D8xB;ECgE5xB,WAAW;EACX,YAAY;AACd;;ADlEq0B;ECqEn0B,mBAAmB;EACnB,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,WAAW;EACX,YAAY;EACZ,UAAU;EACV,kBAAkB;EAClB,gBAAgB;AAClB","sourcesContent":[".carousel{position:relative}.viewport{overflow:hidden}.content{display:flex;margin-left:calc(var(--ac-space-4)*-1)}.contentVertical{flex-direction:column;margin-left:0;margin-top:calc(var(--ac-space-4)*-1)}.item{flex:0 0 100%;min-width:0;padding-left:var(--ac-space-4)}.itemVertical{padding-left:0;padding-top:var(--ac-space-4)}.navigationButton{border-radius:999px;height:2rem;position:absolute;width:2rem}.navigationButton[data-orientation=horizontal]{top:50%;transform:translateY(-50%)}.navigationButton[data-orientation=vertical]{left:50%;transform:translateX(-50%) rotate(90deg)}.previousButton[data-orientation=horizontal]{left:-3rem}.nextButton[data-orientation=horizontal]{right:-3rem}.previousButton[data-orientation=vertical]{top:-3rem}.nextButton[data-orientation=vertical]{bottom:-3rem}.navigationIcon{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}",".carousel {\n position: relative;\n}\n\n.viewport {\n overflow: hidden;\n}\n\n.content {\n margin-left: calc(var(--ac-space-4)*-1);\n display: flex;\n}\n\n.contentVertical {\n margin-left: 0;\n margin-top: calc(var(--ac-space-4)*-1);\n flex-direction: column;\n}\n\n.item {\n min-width: 0;\n padding-left: var(--ac-space-4);\n flex: 0 0 100%;\n}\n\n.itemVertical {\n padding-left: 0;\n padding-top: var(--ac-space-4);\n}\n\n.navigationButton {\n border-radius: 999px;\n width: 2rem;\n height: 2rem;\n position: absolute;\n}\n\n.navigationButton[data-orientation=\"horizontal\"] {\n top: 50%;\n transform: translateY(-50%);\n}\n\n.navigationButton[data-orientation=\"vertical\"] {\n left: 50%;\n transform: translateX(-50%) rotate(90deg);\n}\n\n.previousButton[data-orientation=\"horizontal\"] {\n left: -3rem;\n}\n\n.nextButton[data-orientation=\"horizontal\"] {\n right: -3rem;\n}\n\n.previousButton[data-orientation=\"vertical\"] {\n top: -3rem;\n}\n\n.nextButton[data-orientation=\"vertical\"] {\n bottom: -3rem;\n}\n\n.navigationIcon {\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":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import type { DefaultTooltipContentProps, ResponsiveContainerProps } from "recharts";
|
|
2
|
+
import type { DefaultLegendContentProps, DefaultTooltipContentProps, ResponsiveContainerProps, TooltipValueType } from "recharts";
|
|
3
3
|
import * as RechartsPrimitive from "recharts";
|
|
4
4
|
declare const THEMES: {
|
|
5
5
|
readonly light: "";
|
|
@@ -207,7 +207,10 @@ export declare const RadarChart: <DataPointType = any>(props: import("recharts/t
|
|
|
207
207
|
}) => React.ReactElement;
|
|
208
208
|
/** @see {@link https://recharts.github.io/en-US/api/RadialBarChart | RadialBarChart API} */
|
|
209
209
|
export declare const RadialBarChart: <DataPointType = any>(props: import("recharts/types/util/types").PolarChartProps<DataPointType> & {
|
|
210
|
-
ref
|
|
210
|
+
ref? /**
|
|
211
|
+
* Unit suffix appended to rendered values when the payload does not provide one.
|
|
212
|
+
* @default undefined
|
|
213
|
+
*/: React.Ref<SVGSVGElement>;
|
|
211
214
|
}) => React.ReactElement;
|
|
212
215
|
/** @see {@link https://recharts.github.io/en-US/api/ScatterChart | ScatterChart API} */
|
|
213
216
|
export declare const ScatterChart: <DataPointType = any>(props: import("recharts/types/util/types").CartesianChartProps<DataPointType> & {
|
|
@@ -347,5 +350,5 @@ export declare const useActiveTooltipLabel: () => RechartsPrimitive.ActiveLabel;
|
|
|
347
350
|
export declare const useXAxisDomain: (xAxisId?: RechartsPrimitive.AxisId) => RechartsPrimitive.NumberDomain | import("recharts/types/util/types").CategoricalDomain | undefined;
|
|
348
351
|
/** Returns the current Y-axis domain. */
|
|
349
352
|
export declare const useYAxisDomain: (yAxisId?: RechartsPrimitive.AxisId) => RechartsPrimitive.NumberDomain | import("recharts/types/util/types").CategoricalDomain | undefined;
|
|
350
|
-
export type { DefaultLegendContentProps, DefaultTooltipContentProps, TooltipValueType }
|
|
353
|
+
export type { DefaultLegendContentProps, DefaultTooltipContentProps, TooltipValueType };
|
|
351
354
|
//# sourceMappingURL=chart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../../src/components/ui/chart.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,0BAA0B,EAAiB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources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,YAAY,EAAC,yBAAyB,EAAE,0BAA0B,EAAE,gBAAgB,EAAC,CAAC"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, forwardRef, useContext, useId, useMemo } from "react";
|
|
4
|
-
import { Area, AreaChart, Bar, BarChart, BarStack, Brush, CartesianGrid, Cell, ComposedChart, Cross, Curve, Customized, DefaultZIndexes, Dot, ErrorBar, Funnel, FunnelChart, Label, LabelList, Legend, Line, LineChart, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Polygon, Radar, RadarChart, RadialBar, RadialBarChart, Rectangle, ReferenceArea, ReferenceDot, ReferenceLine, ResponsiveContainer, Sankey, Scatter, ScatterChart, Sector, SunburstChart, Symbols, Tooltip, Trapezoid, Treemap, XAxis, YAxis, ZAxis, ZIndexLayer, useActiveTooltipCoordinate, useActiveTooltipDataPoints, useActiveTooltipLabel, useChartHeight, useChartWidth, useIsTooltipActive, useMargin, useOffset, usePlotArea, useXAxisDomain, useYAxisDomain } from "recharts";
|
|
5
3
|
import { cn } from "../../lib/utilities.js";
|
|
6
4
|
import chart_module from "./chart.module.js";
|
|
5
|
+
import * as __rspack_external_react from "react";
|
|
6
|
+
import * as __rspack_external_recharts from "recharts";
|
|
7
7
|
const THEMES = {
|
|
8
8
|
light: "",
|
|
9
9
|
dark: ".dark"
|
|
10
10
|
};
|
|
11
|
-
const ChartContext = /*#__PURE__*/ createContext(null);
|
|
11
|
+
const ChartContext = /*#__PURE__*/ __rspack_external_react.createContext(null);
|
|
12
12
|
function useChart() {
|
|
13
|
-
const context = useContext(ChartContext);
|
|
13
|
+
const context = __rspack_external_react.useContext(ChartContext);
|
|
14
14
|
if (!context) throw new Error("useChart must be used within a <ChartContainer />");
|
|
15
15
|
return context;
|
|
16
16
|
}
|
|
17
|
-
const ChartContainer = /*#__PURE__*/ forwardRef(({ id, config, initialDimension = {
|
|
17
|
+
const ChartContainer = /*#__PURE__*/ __rspack_external_react.forwardRef(({ id, config, initialDimension = {
|
|
18
18
|
width: 320,
|
|
19
19
|
height: 200
|
|
20
20
|
}, className, children, innerResponsiveContainerStyle, aspect, debounce, height, maxHeight, minHeight, minWidth, onResize, width, ...props }, ref)=>{
|
|
21
|
-
const uniqueId = useId();
|
|
21
|
+
const uniqueId = __rspack_external_react.useId();
|
|
22
22
|
const chartId = `chart-${id ?? uniqueId.replaceAll(":", "")}`;
|
|
23
23
|
return /*#__PURE__*/ jsx(ChartContext.Provider, {
|
|
24
24
|
value: {
|
|
@@ -34,7 +34,7 @@ const ChartContainer = /*#__PURE__*/ forwardRef(({ id, config, initialDimension
|
|
|
34
34
|
id: chartId,
|
|
35
35
|
config: config
|
|
36
36
|
}),
|
|
37
|
-
/*#__PURE__*/ jsx(ResponsiveContainer, {
|
|
37
|
+
/*#__PURE__*/ jsx(__rspack_external_recharts.ResponsiveContainer, {
|
|
38
38
|
ref: ref,
|
|
39
39
|
id: id,
|
|
40
40
|
className: className,
|
|
@@ -70,10 +70,10 @@ ${colorConfig.map(([key, itemConfig])=>{
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
-
const ChartTooltip = Tooltip;
|
|
73
|
+
const ChartTooltip = __rspack_external_recharts.Tooltip;
|
|
74
74
|
function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, separator }) {
|
|
75
75
|
const { config } = useChart();
|
|
76
|
-
const tooltipLabel = useMemo(()=>{
|
|
76
|
+
const tooltipLabel = __rspack_external_react.useMemo(()=>{
|
|
77
77
|
if (hideLabel || !payload?.length) return null;
|
|
78
78
|
const [item] = payload;
|
|
79
79
|
const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
|
|
@@ -167,7 +167,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
|
|
|
167
167
|
]
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
const ChartLegend = Legend;
|
|
170
|
+
const ChartLegend = __rspack_external_recharts.Legend;
|
|
171
171
|
function ChartLegendContent({ className, hideIcon = false, nameKey, payload, verticalAlign }) {
|
|
172
172
|
const { config } = useChart();
|
|
173
173
|
if (!payload?.length) return null;
|
|
@@ -217,65 +217,65 @@ Object.assign(ChartLegend, {
|
|
|
217
217
|
displayName: "ChartLegend"
|
|
218
218
|
});
|
|
219
219
|
ChartLegendContent.displayName = "ChartLegendContent";
|
|
220
|
-
const
|
|
221
|
-
const
|
|
222
|
-
const
|
|
223
|
-
const
|
|
224
|
-
const
|
|
225
|
-
const
|
|
226
|
-
const
|
|
227
|
-
const
|
|
228
|
-
const
|
|
229
|
-
const
|
|
230
|
-
const
|
|
231
|
-
const
|
|
232
|
-
const
|
|
233
|
-
const
|
|
234
|
-
const
|
|
235
|
-
const
|
|
236
|
-
const
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
const
|
|
241
|
-
const
|
|
242
|
-
const
|
|
243
|
-
const
|
|
244
|
-
const
|
|
245
|
-
const
|
|
246
|
-
const
|
|
247
|
-
const
|
|
248
|
-
const
|
|
249
|
-
const
|
|
250
|
-
const RechartsLabel =
|
|
251
|
-
const
|
|
252
|
-
const
|
|
253
|
-
const
|
|
254
|
-
const
|
|
255
|
-
const
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
const
|
|
259
|
-
const
|
|
260
|
-
const
|
|
261
|
-
const
|
|
262
|
-
const
|
|
263
|
-
const
|
|
264
|
-
const
|
|
265
|
-
const
|
|
266
|
-
const
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
const
|
|
270
|
-
const
|
|
271
|
-
const
|
|
272
|
-
const
|
|
273
|
-
const
|
|
274
|
-
const
|
|
275
|
-
const
|
|
276
|
-
const
|
|
277
|
-
const
|
|
278
|
-
const
|
|
279
|
-
export {
|
|
220
|
+
const { AreaChart: AreaChart } = __rspack_external_recharts;
|
|
221
|
+
const { BarChart: BarChart } = __rspack_external_recharts;
|
|
222
|
+
const { ComposedChart: ComposedChart } = __rspack_external_recharts;
|
|
223
|
+
const { FunnelChart: FunnelChart } = __rspack_external_recharts;
|
|
224
|
+
const { LineChart: LineChart } = __rspack_external_recharts;
|
|
225
|
+
const { PieChart: PieChart } = __rspack_external_recharts;
|
|
226
|
+
const { RadarChart: RadarChart } = __rspack_external_recharts;
|
|
227
|
+
const { RadialBarChart: RadialBarChart } = __rspack_external_recharts;
|
|
228
|
+
const { ScatterChart: ScatterChart } = __rspack_external_recharts;
|
|
229
|
+
const { Sankey: Sankey } = __rspack_external_recharts;
|
|
230
|
+
const { SunburstChart: SunburstChart } = __rspack_external_recharts;
|
|
231
|
+
const { Treemap: Treemap } = __rspack_external_recharts;
|
|
232
|
+
const { Area: Area } = __rspack_external_recharts;
|
|
233
|
+
const { Bar: Bar } = __rspack_external_recharts;
|
|
234
|
+
const { BarStack: BarStack } = __rspack_external_recharts;
|
|
235
|
+
const { Funnel: Funnel } = __rspack_external_recharts;
|
|
236
|
+
const { Line: Line } = __rspack_external_recharts;
|
|
237
|
+
const { Pie: Pie } = __rspack_external_recharts;
|
|
238
|
+
const { Radar: Radar } = __rspack_external_recharts;
|
|
239
|
+
const { RadialBar: RadialBar } = __rspack_external_recharts;
|
|
240
|
+
const { Scatter: Scatter } = __rspack_external_recharts;
|
|
241
|
+
const { CartesianGrid: CartesianGrid } = __rspack_external_recharts;
|
|
242
|
+
const { PolarAngleAxis: PolarAngleAxis } = __rspack_external_recharts;
|
|
243
|
+
const { PolarGrid: PolarGrid } = __rspack_external_recharts;
|
|
244
|
+
const { PolarRadiusAxis: PolarRadiusAxis } = __rspack_external_recharts;
|
|
245
|
+
const { XAxis: XAxis } = __rspack_external_recharts;
|
|
246
|
+
const { YAxis: YAxis } = __rspack_external_recharts;
|
|
247
|
+
const { ZAxis: ZAxis } = __rspack_external_recharts;
|
|
248
|
+
const { Brush: Brush } = __rspack_external_recharts;
|
|
249
|
+
const { ErrorBar: ErrorBar } = __rspack_external_recharts;
|
|
250
|
+
const { Label: RechartsLabel } = __rspack_external_recharts;
|
|
251
|
+
const { LabelList: LabelList } = __rspack_external_recharts;
|
|
252
|
+
const { ReferenceArea: ReferenceArea } = __rspack_external_recharts;
|
|
253
|
+
const { ReferenceDot: ReferenceDot } = __rspack_external_recharts;
|
|
254
|
+
const { ReferenceLine: ReferenceLine } = __rspack_external_recharts;
|
|
255
|
+
const { ResponsiveContainer: ResponsiveContainer } = __rspack_external_recharts;
|
|
256
|
+
const { Customized: Customized } = __rspack_external_recharts;
|
|
257
|
+
const { Cell: Cell } = __rspack_external_recharts;
|
|
258
|
+
const { Cross: Cross } = __rspack_external_recharts;
|
|
259
|
+
const { Curve: Curve } = __rspack_external_recharts;
|
|
260
|
+
const { Dot: Dot } = __rspack_external_recharts;
|
|
261
|
+
const { Polygon: Polygon } = __rspack_external_recharts;
|
|
262
|
+
const { Rectangle: Rectangle } = __rspack_external_recharts;
|
|
263
|
+
const { Sector: Sector } = __rspack_external_recharts;
|
|
264
|
+
const { Symbols: Symbols } = __rspack_external_recharts;
|
|
265
|
+
const { Trapezoid: Trapezoid } = __rspack_external_recharts;
|
|
266
|
+
const { ZIndexLayer: ZIndexLayer } = __rspack_external_recharts;
|
|
267
|
+
const { DefaultZIndexes: DefaultZIndexes } = __rspack_external_recharts;
|
|
268
|
+
const { useChartWidth: useChartWidth } = __rspack_external_recharts;
|
|
269
|
+
const { useChartHeight: useChartHeight } = __rspack_external_recharts;
|
|
270
|
+
const { useOffset: useOffset } = __rspack_external_recharts;
|
|
271
|
+
const { usePlotArea: usePlotArea } = __rspack_external_recharts;
|
|
272
|
+
const { useMargin: useMargin } = __rspack_external_recharts;
|
|
273
|
+
const { useIsTooltipActive: useIsTooltipActive } = __rspack_external_recharts;
|
|
274
|
+
const { useActiveTooltipCoordinate: useActiveTooltipCoordinate } = __rspack_external_recharts;
|
|
275
|
+
const { useActiveTooltipDataPoints: useActiveTooltipDataPoints } = __rspack_external_recharts;
|
|
276
|
+
const { useActiveTooltipLabel: useActiveTooltipLabel } = __rspack_external_recharts;
|
|
277
|
+
const { useXAxisDomain: useXAxisDomain } = __rspack_external_recharts;
|
|
278
|
+
const { useYAxisDomain: useYAxisDomain } = __rspack_external_recharts;
|
|
279
|
+
export { Area, AreaChart, Bar, BarChart, BarStack, Brush, CartesianGrid, Cell, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ComposedChart, Cross, Curve, Customized, DefaultZIndexes, Dot, ErrorBar, Funnel, FunnelChart, LabelList, Line, LineChart, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Polygon, Radar, RadarChart, RadialBar, RadialBarChart, RechartsLabel, Rectangle, ReferenceArea, ReferenceDot, ReferenceLine, ResponsiveContainer, Sankey, Scatter, ScatterChart, Sector, SunburstChart, Symbols, Trapezoid, Treemap, XAxis, YAxis, ZAxis, ZIndexLayer, useActiveTooltipCoordinate, useActiveTooltipDataPoints, useActiveTooltipLabel, useChartHeight, useChartWidth, useIsTooltipActive, useMargin, useOffset, usePlotArea, useXAxisDomain, useYAxisDomain };
|
|
280
280
|
|
|
281
281
|
//# sourceMappingURL=chart.js.map
|