@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,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GroupImperativeHandle, PanelImperativeHandle } from "react-resizable-panels";
|
|
3
3
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
4
|
-
export type {
|
|
4
|
+
export type { GroupImperativeHandle, PanelImperativeHandle };
|
|
5
5
|
/**
|
|
6
6
|
* Props for the {@link ResizablePanelGroup} component.
|
|
7
7
|
*/
|
|
8
|
-
export type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePrimitive.
|
|
8
|
+
export type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePrimitive.Group>;
|
|
9
9
|
/**
|
|
10
10
|
* Props for the {@link ResizablePanel} component.
|
|
11
11
|
*/
|
|
@@ -15,7 +15,7 @@ export type ResizablePanelProps = React.ComponentProps<typeof ResizablePrimitive
|
|
|
15
15
|
*
|
|
16
16
|
* @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
|
|
17
17
|
*/
|
|
18
|
-
export interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.
|
|
18
|
+
export interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.Separator> {
|
|
19
19
|
/**
|
|
20
20
|
* Renders a visual drag grip inside the resize handle to indicate that adjacent panels can be resized.
|
|
21
21
|
*
|
|
@@ -28,19 +28,21 @@ export interface ResizableHandleProps extends React.ComponentProps<typeof Resiza
|
|
|
28
28
|
* Wraps `react-resizable-panels` panel groups with shared styles.
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
* - Third-party wrapper component
|
|
31
|
+
* - Third-party wrapper component (v4 API: `Group` with `orientation` prop)
|
|
32
32
|
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* ```tsx
|
|
36
|
-
* <ResizablePanelGroup
|
|
36
|
+
* <ResizablePanelGroup orientation='horizontal'>...</ResizablePanelGroup>
|
|
37
37
|
* ```
|
|
38
38
|
*
|
|
39
39
|
* @see {@link ResizablePanelGroupProps} for available props
|
|
40
40
|
* @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
|
|
41
|
-
* @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}
|
|
42
41
|
*/
|
|
43
|
-
declare
|
|
42
|
+
declare function ResizablePanelGroup({ className, ...props }: Readonly<ResizablePanelGroupProps>): React.JSX.Element;
|
|
43
|
+
declare namespace ResizablePanelGroup {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
44
46
|
/**
|
|
45
47
|
* Re-exports the underlying resizable panel primitive for consistent composition.
|
|
46
48
|
*
|
|
@@ -50,35 +52,18 @@ declare const ResizablePanelGroup: React.ForwardRefExoticComponent<ResizablePane
|
|
|
50
52
|
*
|
|
51
53
|
* @example
|
|
52
54
|
* ```tsx
|
|
53
|
-
* <ResizablePanel defaultSize=
|
|
55
|
+
* <ResizablePanel defaultSize="50%">Content</ResizablePanel>
|
|
54
56
|
* ```
|
|
55
57
|
*
|
|
56
58
|
* @see {@link ResizablePanelProps} for available props
|
|
57
59
|
* @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
|
|
58
|
-
* @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}
|
|
59
60
|
*/
|
|
60
|
-
declare const ResizablePanel:
|
|
61
|
-
className?: string;
|
|
62
|
-
collapsedSize?: number | undefined;
|
|
63
|
-
collapsible?: boolean | undefined;
|
|
64
|
-
defaultSize?: number | undefined;
|
|
65
|
-
id?: string;
|
|
66
|
-
maxSize?: number | undefined;
|
|
67
|
-
minSize?: number | undefined;
|
|
68
|
-
onCollapse?: ResizablePrimitive.PanelOnCollapse;
|
|
69
|
-
onExpand?: ResizablePrimitive.PanelOnExpand;
|
|
70
|
-
onResize?: ResizablePrimitive.PanelOnResize;
|
|
71
|
-
order?: number;
|
|
72
|
-
style?: object;
|
|
73
|
-
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
74
|
-
} & {
|
|
75
|
-
children?: import("react").ReactNode | undefined;
|
|
76
|
-
} & React.RefAttributes<ImperativePanelHandle>>;
|
|
61
|
+
declare const ResizablePanel: typeof ResizablePrimitive.Panel;
|
|
77
62
|
/**
|
|
78
63
|
* Renders a draggable resize handle between resizable panels.
|
|
79
64
|
*
|
|
80
65
|
* @remarks
|
|
81
|
-
* - Third-party wrapper component
|
|
66
|
+
* - Third-party wrapper component (v4 API: `Separator`)
|
|
82
67
|
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
83
68
|
*
|
|
84
69
|
* @example
|
|
@@ -88,7 +73,6 @@ declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAtt
|
|
|
88
73
|
*
|
|
89
74
|
* @see {@link ResizableHandleProps} for available props
|
|
90
75
|
* @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
|
|
91
|
-
* @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}
|
|
92
76
|
*/
|
|
93
77
|
declare function ResizableHandle({ withHandle, className, children, ...props }: Readonly<ResizableHandleProps>): React.JSX.Element;
|
|
94
78
|
declare namespace ResizableHandle {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/resizable.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/resizable.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,qBAAqB,EAAE,qBAAqB,EAAC,MAAM,wBAAwB,CAAC;AACzF,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAM7D,YAAY,EAAC,qBAAqB,EAAE,qBAAqB,EAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,SAAS,CAAC;IACrG;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;GAcG;AACH,iBAAS,mBAAmB,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,QAAQ,CAAC,wBAAwB,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAOzG;kBAPQ,mBAAmB;;;AAS5B;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,cAAc,iCAA2B,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,iBAAS,eAAe,CAAC,EAAC,UAAkB,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAC,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAa/H;kBAbQ,eAAe;;;AAmBxB,OAAO,EAAC,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAC,CAAC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { GripVertical } from "lucide-react";
|
|
4
|
-
import
|
|
5
|
-
import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
|
|
4
|
+
import "react";
|
|
6
5
|
import { cn } from "../../lib/utilities.js";
|
|
7
6
|
import resizable_module from "./resizable.module.js";
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import * as __rspack_external_react_resizable_panels_8d5960a0 from "react-resizable-panels";
|
|
8
|
+
function ResizablePanelGroup({ className, ...props }) {
|
|
9
|
+
return /*#__PURE__*/ jsx(__rspack_external_react_resizable_panels_8d5960a0.Group, {
|
|
10
10
|
className: cn(resizable_module.group, className),
|
|
11
11
|
...props
|
|
12
|
-
})
|
|
13
|
-
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
const ResizablePanel = __rspack_external_react_resizable_panels_8d5960a0.Panel;
|
|
14
15
|
function ResizableHandle({ withHandle = false, className, children, ...props }) {
|
|
15
|
-
return /*#__PURE__*/ jsxs(
|
|
16
|
+
return /*#__PURE__*/ jsxs(__rspack_external_react_resizable_panels_8d5960a0.Separator, {
|
|
16
17
|
className: cn(resizable_module.handle, className),
|
|
17
18
|
...props,
|
|
18
19
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/resizable.js","sources":["../../../src/components/ui/resizable.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable react/jsx-handler-names */\r\n\r\nimport {GripVertical} from \"lucide-react\";\r\nimport * as React from \"react\";\r\nimport type {
|
|
1
|
+
{"version":3,"file":"components/ui/resizable.js","sources":["../../../src/components/ui/resizable.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable react/jsx-handler-names */\r\n\r\nimport {GripVertical} from \"lucide-react\";\r\nimport * as React from \"react\";\r\nimport type {GroupImperativeHandle, PanelImperativeHandle} from \"react-resizable-panels\";\r\nimport * as ResizablePrimitive from \"react-resizable-panels\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./resizable.module.css\";\r\n\r\nexport type {GroupImperativeHandle, PanelImperativeHandle};\r\n\r\n/**\r\n * Props for the {@link ResizablePanelGroup} component.\r\n */\r\nexport type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePrimitive.Group>;\r\n\r\n/**\r\n * Props for the {@link ResizablePanel} component.\r\n */\r\nexport type ResizablePanelProps = React.ComponentProps<typeof ResizablePrimitive.Panel>;\r\n\r\n/**\r\n * Props for the {@link ResizableHandle} component.\r\n *\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\nexport interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.Separator> {\r\n /**\r\n * Renders a visual drag grip inside the resize handle to indicate that adjacent panels can be resized.\r\n *\r\n * @default false\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\n withHandle?: boolean;\r\n}\r\n\r\n/**\r\n * Wraps `react-resizable-panels` panel groups with shared styles.\r\n *\r\n * @remarks\r\n * - Third-party wrapper component (v4 API: `Group` with `orientation` prop)\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <ResizablePanelGroup orientation='horizontal'>...</ResizablePanelGroup>\r\n * ```\r\n *\r\n * @see {@link ResizablePanelGroupProps} for available props\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\nfunction ResizablePanelGroup({className, ...props}: Readonly<ResizablePanelGroupProps>): React.JSX.Element {\r\n return (\r\n <ResizablePrimitive.Group\r\n className={cn(styles.group, className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Re-exports the underlying resizable panel primitive for consistent composition.\r\n *\r\n * @remarks\r\n * - Third-party wrapper component\r\n * - Styling is applied by parent panel group and handles\r\n *\r\n * @example\r\n * ```tsx\r\n * <ResizablePanel defaultSize=\"50%\">Content</ResizablePanel>\r\n * ```\r\n *\r\n * @see {@link ResizablePanelProps} for available props\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\nconst ResizablePanel = ResizablePrimitive.Panel;\r\n\r\n/**\r\n * Renders a draggable resize handle between resizable panels.\r\n *\r\n * @remarks\r\n * - Third-party wrapper component (v4 API: `Separator`)\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <ResizableHandle withHandle />\r\n * ```\r\n *\r\n * @see {@link ResizableHandleProps} for available props\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\nfunction ResizableHandle({withHandle = false, className, children, ...props}: Readonly<ResizableHandleProps>): React.JSX.Element {\r\n return (\r\n <ResizablePrimitive.Separator\r\n className={cn(styles.handle, className)}\r\n {...props}>\r\n {Boolean(withHandle) && (\r\n <div className={styles.handleGrip}>\r\n <GripVertical className={styles.handleGripIcon} />\r\n </div>\r\n )}\r\n {children}\r\n </ResizablePrimitive.Separator>\r\n );\r\n}\r\n\r\nResizablePanelGroup.displayName = \"ResizablePanelGroup\";\r\nResizablePanel.displayName = \"ResizablePanel\";\r\nResizableHandle.displayName = \"ResizableHandle\";\r\n\r\nexport {ResizableHandle, ResizablePanel, ResizablePanelGroup};\r\n"],"names":["ResizablePanelGroup","className","props","ResizablePrimitive","cn","styles","ResizablePanel","ResizableHandle","withHandle","children","Boolean","GripVertical"],"mappings":";;;;;;;AAuDA,SAASA,oBAAoB,EAACC,SAAS,EAAE,GAAGC,OAA0C;IACpF,OAAO,WAAP,GACE,IAACC,kDAAAA,KAAwB;QACvB,WAAWC,GAAGC,iBAAAA,KAAY,EAAEJ;QAC3B,GAAGC,KAAK;;AAGf;AAiBA,MAAMI,iBAAiBH,kDAAAA,KAAwB;AAiB/C,SAASI,gBAAgB,EAACC,aAAa,KAAK,EAAEP,SAAS,EAAEQ,QAAQ,EAAE,GAAGP,OAAsC;IAC1G,OAAO,WAAP,GACE,KAACC,kDAAAA,SAA4B;QAC3B,WAAWC,GAAGC,iBAAAA,MAAa,EAAEJ;QAC5B,GAAGC,KAAK;;YACRQ,QAAQF,eAAe,WAAfA,GACP,IAAC;gBAAI,WAAWH,iBAAAA,UAAiB;0BAC/B,kBAACM,cAAYA;oBAAC,WAAWN,iBAAAA,cAAqB;;;YAGjDI;;;AAGP;AAEAT,oBAAoB,WAAW,GAAG;AAClCM,eAAe,WAAW,GAAG;AAC7BC,gBAAgB,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/resizable.module.css","webpack://./src/components/ui/resizable.module.css"],"names":[],"mappings":"AAAA;ECCE,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;ADJ2C;ECOzC,sBAAsB;AACxB;;ADR6G;ECW3G,kCAAkC;EAClC,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,UAAU;EACV,aAAa;EACb,kBAAkB;AACpB;;ADlBuP;ECqBrP,WAAW;EACX,cAAc;EACd,aAAa;EACb,kBAAkB;EAClB,SAAS;EACT,2BAA2B;AAC7B;;AD3BiW;EC8B/V,mEAAmE;AACrE;;AD/B0b;ECkCxb,WAAW;EACX,WAAW;AACb;;ADpC6f;ECuC3f,WAAW;EACX,cAAc;EACd,MAAM;EACN,OAAO;EACP,2BAA2B;AAC7B;;AD5CinB;EC+C/mB,sCAAsC;EACtC,kCAAkC;EAClC,kCAAkC;EAClC,UAAU;EACV,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,YAAY;EACZ,aAAa;EACb,kBAAkB;AACpB;;ADzDm1B;EC4Dj1B,wBAAwB;AAC1B;;AD7Do6B;ECgEl6B,cAAc;EACd,eAAe;AACjB","sourcesContent":[".group{display:flex;height:100%;width:100%}.group[data-panel-group-direction=vertical]{flex-direction:column}.handle{align-items:center;background-color:var(--ac-border);display:flex;justify-content:center;outline:none;position:relative;width:1px}.handle:after{content:\"\";inset-block:0;left:50%;position:absolute;transform:translateX(-50%);width:.25rem}.handle:focus-visible{box-shadow:0 0 0 1px var(--ac-ring),0 0 0 2px var(--ac-background)}.handle[data-panel-group-direction=vertical]{height:1px;width:100%}.handle[data-panel-group-direction=vertical]:after{height:.25rem;left:0;top:0;transform:translateY(-50%);width:100%}.handleGrip{align-items:center;background-color:var(--ac-background);border:1px solid var(--ac-border);border-radius:var(--ac-radius-sm);display:flex;height:1rem;justify-content:center;position:relative;width:.75rem;z-index:1}.handle[data-panel-group-direction=vertical] .handleGrip{transform:rotate(90deg)}.handleGripIcon{height:.625rem;width:.625rem}",".group {\n width: 100%;\n height: 100%;\n display: flex;\n}\n\n.group[data-panel-group-direction=\"vertical\"] {\n flex-direction: column;\n}\n\n.handle {\n background-color: var(--ac-border);\n outline: none;\n justify-content: center;\n align-items: center;\n width: 1px;\n display: flex;\n position: relative;\n}\n\n.handle:after {\n content: \"\";\n inset-block: 0;\n width: .25rem;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.handle:focus-visible {\n box-shadow: 0 0 0 1px var(--ac-ring),0 0 0 2px var(--ac-background);\n}\n\n.handle[data-panel-group-direction=\"vertical\"] {\n width: 100%;\n height: 1px;\n}\n\n.handle[data-panel-group-direction=\"vertical\"]:after {\n width: 100%;\n height: .25rem;\n top: 0;\n left: 0;\n transform: translateY(-50%);\n}\n\n.handleGrip {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-sm);\n z-index: 1;\n justify-content: center;\n align-items: center;\n width: .75rem;\n height: 1rem;\n display: flex;\n position: relative;\n}\n\n.handle[data-panel-group-direction=\"vertical\"] .handleGrip {\n transform: rotate(90deg);\n}\n\n.handleGripIcon {\n width: .625rem;\n height: .625rem;\n}\n"],"sourceRoot":""}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { motion } from "motion/react";
|
|
4
|
-
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
5
4
|
import { cn } from "../../lib/utilities.js";
|
|
6
5
|
import ripple_button_module from "./ripple-button.module.js";
|
|
7
|
-
|
|
6
|
+
import * as __rspack_external_react from "react";
|
|
7
|
+
const RippleButton = /*#__PURE__*/ __rspack_external_react.forwardRef(({ children, onClick, className, rippleClassName, scale = 10, transition = {
|
|
8
8
|
duration: 0.6,
|
|
9
9
|
ease: "easeOut"
|
|
10
10
|
}, ...props }, ref)=>{
|
|
11
11
|
const { key: _ignoredKey, ...restProps } = props;
|
|
12
|
-
const [ripples, setRipples] = useState([]);
|
|
13
|
-
const buttonRef = useRef(null);
|
|
14
|
-
const timeoutIdsRef = useRef([]);
|
|
15
|
-
useImperativeHandle(ref, ()=>buttonRef.current, []);
|
|
16
|
-
useEffect(()=>()=>{
|
|
12
|
+
const [ripples, setRipples] = __rspack_external_react.useState([]);
|
|
13
|
+
const buttonRef = __rspack_external_react.useRef(null);
|
|
14
|
+
const timeoutIdsRef = __rspack_external_react.useRef([]);
|
|
15
|
+
__rspack_external_react.useImperativeHandle(ref, ()=>buttonRef.current, []);
|
|
16
|
+
__rspack_external_react.useEffect(()=>()=>{
|
|
17
17
|
timeoutIdsRef.current.forEach((timeoutId)=>{
|
|
18
18
|
globalThis.window.clearTimeout(timeoutId);
|
|
19
19
|
});
|
|
20
20
|
}, []);
|
|
21
|
-
const createRipple = useCallback((event)=>{
|
|
21
|
+
const createRipple = __rspack_external_react.useCallback((event)=>{
|
|
22
22
|
const button = buttonRef.current;
|
|
23
23
|
if (!button) return;
|
|
24
24
|
const rect = button.getBoundingClientRect();
|
|
@@ -41,7 +41,7 @@ const RippleButton = /*#__PURE__*/ forwardRef(({ children, onClick, className, r
|
|
|
41
41
|
timeoutId
|
|
42
42
|
];
|
|
43
43
|
}, []);
|
|
44
|
-
const handleClick = useCallback((event)=>{
|
|
44
|
+
const handleClick = __rspack_external_react.useCallback((event)=>{
|
|
45
45
|
createRipple(event);
|
|
46
46
|
onClick?.(event);
|
|
47
47
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/ripple-button.js","sources":["../../../src/components/ui/ripple-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type HTMLMotionProps, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./ripple-button.module.css\";\r\n\r\ninterface Ripple {\r\n id: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Props accepted by {@link RippleButton}. */\r\nexport interface RippleButtonProps extends HTMLMotionProps<\"button\"> {\r\n /** Button contents rendered above the ripple layer. @default undefined */\r\n children: React.ReactNode;\r\n /** Additional CSS classes merged with each generated ripple. @default undefined */\r\n rippleClassName?: string;\r\n /** Final expansion scale applied to each ripple animation. @default 10 */\r\n scale?: number;\r\n /** Motion timing used for each ripple animation. @default {duration: 0.6, ease: \"easeOut\"} */\r\n transition?: Transition;\r\n}\r\n\r\n/**\r\n * Renders a pressable button that emits animated ripples from the click position.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<button>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <RippleButton>Click me</RippleButton>\r\n * ```\r\n *\r\n * @see {@link RippleButtonProps} for available props\r\n */\r\nconst RippleButton = React.forwardRef<HTMLButtonElement, RippleButtonProps>(\r\n ({children, onClick, className, rippleClassName, scale = 10, transition = {duration: 0.6, ease: \"easeOut\"}, ...props}, ref) => {\r\n // eslint-disable-next-line sonarjs/no-unused-vars -- removing React key avoids implicit key spreading\r\n const {key: _ignoredKey, ...restProps} = props;\r\n const [ripples, setRipples] = React.useState<ReadonlyArray<Ripple>>([]);\r\n const buttonRef = React.useRef<HTMLButtonElement>(null);\r\n const timeoutIdsRef = React.useRef<ReadonlyArray<number>>([]);\r\n\r\n React.useImperativeHandle(ref, () => buttonRef.current!, []);\r\n\r\n React.useEffect(\r\n () => () => {\r\n timeoutIdsRef.current.forEach((timeoutId) => {\r\n globalThis.window.clearTimeout(timeoutId);\r\n });\r\n },\r\n [],\r\n );\r\n\r\n const createRipple = React.useCallback((event: React.MouseEvent<HTMLButtonElement>): void => {\r\n const button = buttonRef.current;\r\n if (!button) {\r\n return;\r\n }\r\n\r\n const rect = button.getBoundingClientRect();\r\n const x = event.clientX - rect.left;\r\n const y = event.clientY - rect.top;\r\n\r\n const newRipple: Ripple = {\r\n id: Date.now(),\r\n x,\r\n y,\r\n };\r\n\r\n setRipples((previousRipples) => [...previousRipples, newRipple]);\r\n\r\n const timeoutId = globalThis.window.setTimeout(() => {\r\n setRipples((previousRipples) => previousRipples.filter((ripple) => ripple.id !== newRipple.id));\r\n }, 600);\r\n\r\n timeoutIdsRef.current = [...timeoutIdsRef.current, timeoutId];\r\n }, []);\r\n\r\n const handleClick = React.useCallback(\r\n (event: React.MouseEvent<HTMLButtonElement>): void => {\r\n createRipple(event);\r\n onClick?.(event);\r\n },\r\n [createRipple, onClick],\r\n );\r\n\r\n return (\r\n <motion.button\r\n ref={buttonRef}\r\n onClick={handleClick}\r\n whileTap={{scale: 0.95}}\r\n whileHover={{scale: 1.05}}\r\n className={cn(styles.button, className)}\r\n {...restProps}>\r\n <span className={styles.content}>{children}</span>\r\n {ripples.map((ripple) => (\r\n <motion.span\r\n key={ripple.id}\r\n initial={{scale: 0, opacity: 0.5}}\r\n animate={{scale, opacity: 0}}\r\n transition={transition}\r\n className={cn(styles.ripple, rippleClassName)}\r\n style={{\r\n top: ripple.y - 10,\r\n left: ripple.x - 10,\r\n }}\r\n />\r\n ))}\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nRippleButton.displayName = \"RippleButton\";\r\n\r\nexport {RippleButton};\r\n"],"names":["RippleButton","React","children","onClick","className","rippleClassName","scale","transition","props","ref","_ignoredKey","restProps","ripples","setRipples","buttonRef","timeoutIdsRef","timeoutId","globalThis","createRipple","event","button","rect","x","y","newRipple","Date","previousRipples","ripple","handleClick","motion","cn","styles"],"mappings":";;;;;;AA0CA,MAAMA,eAAe,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/ripple-button.js","sources":["../../../src/components/ui/ripple-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type HTMLMotionProps, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./ripple-button.module.css\";\r\n\r\ninterface Ripple {\r\n id: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Props accepted by {@link RippleButton}. */\r\nexport interface RippleButtonProps extends HTMLMotionProps<\"button\"> {\r\n /** Button contents rendered above the ripple layer. @default undefined */\r\n children: React.ReactNode;\r\n /** Additional CSS classes merged with each generated ripple. @default undefined */\r\n rippleClassName?: string;\r\n /** Final expansion scale applied to each ripple animation. @default 10 */\r\n scale?: number;\r\n /** Motion timing used for each ripple animation. @default {duration: 0.6, ease: \"easeOut\"} */\r\n transition?: Transition;\r\n}\r\n\r\n/**\r\n * Renders a pressable button that emits animated ripples from the click position.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<button>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <RippleButton>Click me</RippleButton>\r\n * ```\r\n *\r\n * @see {@link RippleButtonProps} for available props\r\n */\r\nconst RippleButton = React.forwardRef<HTMLButtonElement, RippleButtonProps>(\r\n ({children, onClick, className, rippleClassName, scale = 10, transition = {duration: 0.6, ease: \"easeOut\"}, ...props}, ref) => {\r\n // eslint-disable-next-line sonarjs/no-unused-vars -- removing React key avoids implicit key spreading\r\n const {key: _ignoredKey, ...restProps} = props;\r\n const [ripples, setRipples] = React.useState<ReadonlyArray<Ripple>>([]);\r\n const buttonRef = React.useRef<HTMLButtonElement>(null);\r\n const timeoutIdsRef = React.useRef<ReadonlyArray<number>>([]);\r\n\r\n React.useImperativeHandle(ref, () => buttonRef.current!, []);\r\n\r\n React.useEffect(\r\n () => () => {\r\n timeoutIdsRef.current.forEach((timeoutId) => {\r\n globalThis.window.clearTimeout(timeoutId);\r\n });\r\n },\r\n [],\r\n );\r\n\r\n const createRipple = React.useCallback((event: React.MouseEvent<HTMLButtonElement>): void => {\r\n const button = buttonRef.current;\r\n if (!button) {\r\n return;\r\n }\r\n\r\n const rect = button.getBoundingClientRect();\r\n const x = event.clientX - rect.left;\r\n const y = event.clientY - rect.top;\r\n\r\n const newRipple: Ripple = {\r\n id: Date.now(),\r\n x,\r\n y,\r\n };\r\n\r\n setRipples((previousRipples) => [...previousRipples, newRipple]);\r\n\r\n const timeoutId = globalThis.window.setTimeout(() => {\r\n setRipples((previousRipples) => previousRipples.filter((ripple) => ripple.id !== newRipple.id));\r\n }, 600);\r\n\r\n timeoutIdsRef.current = [...timeoutIdsRef.current, timeoutId];\r\n }, []);\r\n\r\n const handleClick = React.useCallback(\r\n (event: React.MouseEvent<HTMLButtonElement>): void => {\r\n createRipple(event);\r\n onClick?.(event);\r\n },\r\n [createRipple, onClick],\r\n );\r\n\r\n return (\r\n <motion.button\r\n ref={buttonRef}\r\n onClick={handleClick}\r\n whileTap={{scale: 0.95}}\r\n whileHover={{scale: 1.05}}\r\n className={cn(styles.button, className)}\r\n {...restProps}>\r\n <span className={styles.content}>{children}</span>\r\n {ripples.map((ripple) => (\r\n <motion.span\r\n key={ripple.id}\r\n initial={{scale: 0, opacity: 0.5}}\r\n animate={{scale, opacity: 0}}\r\n transition={transition}\r\n className={cn(styles.ripple, rippleClassName)}\r\n style={{\r\n top: ripple.y - 10,\r\n left: ripple.x - 10,\r\n }}\r\n />\r\n ))}\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nRippleButton.displayName = \"RippleButton\";\r\n\r\nexport {RippleButton};\r\n"],"names":["RippleButton","React","children","onClick","className","rippleClassName","scale","transition","props","ref","_ignoredKey","restProps","ripples","setRipples","buttonRef","timeoutIdsRef","timeoutId","globalThis","createRipple","event","button","rect","x","y","newRipple","Date","previousRipples","ripple","handleClick","motion","cn","styles"],"mappings":";;;;;;AA0CA,MAAMA,eAAe,WAAHA,GAAGC,wBAAAA,UAAgB,CACnC,CAAC,EAACC,QAAQ,EAAEC,OAAO,EAAEC,SAAS,EAAEC,eAAe,EAAEC,QAAQ,EAAE,EAAEC,aAAa;IAAC,UAAU;IAAK,MAAM;AAAS,CAAC,EAAE,GAAGC,OAAM,EAAEC;IAErH,MAAM,EAAC,KAAKC,WAAW,EAAE,GAAGC,WAAU,GAAGH;IACzC,MAAM,CAACI,SAASC,WAAW,GAAGZ,wBAAAA,QAAc,CAAwB,EAAE;IACtE,MAAMa,YAAYb,wBAAAA,MAAY,CAAoB;IAClD,MAAMc,gBAAgBd,wBAAAA,MAAY,CAAwB,EAAE;IAE5DA,wBAAAA,mBAAyB,CAACQ,KAAK,IAAMK,UAAU,OAAO,EAAG,EAAE;IAE3Db,wBAAAA,SAAe,CACb,IAAM;YACJc,cAAc,OAAO,CAAC,OAAO,CAAC,CAACC;gBAC7BC,WAAW,MAAM,CAAC,YAAY,CAACD;YACjC;QACF,GACA,EAAE;IAGJ,MAAME,eAAejB,wBAAAA,WAAiB,CAAC,CAACkB;QACtC,MAAMC,SAASN,UAAU,OAAO;QAChC,IAAI,CAACM,QACH;QAGF,MAAMC,OAAOD,OAAO,qBAAqB;QACzC,MAAME,IAAIH,MAAM,OAAO,GAAGE,KAAK,IAAI;QACnC,MAAME,IAAIJ,MAAM,OAAO,GAAGE,KAAK,GAAG;QAElC,MAAMG,YAAoB;YACxB,IAAIC,KAAK,GAAG;YACZH;YACAC;QACF;QAEAV,WAAW,CAACa,kBAAoB;mBAAIA;gBAAiBF;aAAU;QAE/D,MAAMR,YAAYC,WAAW,MAAM,CAAC,UAAU,CAAC;YAC7CJ,WAAW,CAACa,kBAAoBA,gBAAgB,MAAM,CAAC,CAACC,SAAWA,OAAO,EAAE,KAAKH,UAAU,EAAE;QAC/F,GAAG;QAEHT,cAAc,OAAO,GAAG;eAAIA,cAAc,OAAO;YAAEC;SAAU;IAC/D,GAAG,EAAE;IAEL,MAAMY,cAAc3B,wBAAAA,WAAiB,CACnC,CAACkB;QACCD,aAAaC;QACbhB,UAAUgB;IACZ,GACA;QAACD;QAAcf;KAAQ;IAGzB,OAAO,WAAP,GACE,KAAC0B,OAAO,MAAM;QACZ,KAAKf;QACL,SAASc;QACT,UAAU;YAAC,OAAO;QAAI;QACtB,YAAY;YAAC,OAAO;QAAI;QACxB,WAAWE,GAAGC,qBAAAA,MAAa,EAAE3B;QAC5B,GAAGO,SAAS;;0BACb,IAAC;gBAAK,WAAWoB,qBAAAA,OAAc;0BAAG7B;;YACjCU,QAAQ,GAAG,CAAC,CAACe,SAAAA,WAAAA,GACZ,IAACE,OAAO,IAAI;oBAEV,SAAS;wBAAC,OAAO;wBAAG,SAAS;oBAAG;oBAChC,SAAS;wBAACvB;wBAAO,SAAS;oBAAC;oBAC3B,YAAYC;oBACZ,WAAWuB,GAAGC,qBAAAA,MAAa,EAAE1B;oBAC7B,OAAO;wBACL,KAAKsB,OAAO,CAAC,GAAG;wBAChB,MAAMA,OAAO,CAAC,GAAG;oBACnB;mBARKA,OAAO,EAAE;;;AAaxB;AAGF3B,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/ripple-button.module.css","webpack://./src/components/ui/ripple-button.module.css"],"names":[],"mappings":"AAAA;ECCE,6BAA6B;EAC7B,kCAAkC;EAClC,mCAAmC;EACnC,eAAe;EACf,4BAA4B;EAC5B,SAAS;EACT,uBAAuB;EACvB,mBAAmB;EACnB,cAAc;EACd,mBAAmB;EACnB,gBAAgB;EAChB,oBAAoB;EACpB,kBAAkB;EAClB,gBAAgB;AAClB;;ADf+S;ECkB7S,iCAAiC;EACjC,mBAAmB;AACrB;;ADpByX;ECuBvX,UAAU;EACV,kBAAkB;AACpB;;ADzB8Z;EC4B5Z,wCAAwC;EACxC,oBAAoB;EACpB,qBAAqB;EACrB,cAAc;EACd,eAAe;EACf,kBAAkB;AACpB","sourcesContent":[".button{align-items:center;background:var(--ac-primary);border:0;border-radius:var(--ac-radius-lg);color:var(--ac-primary-foreground);cursor:pointer;display:inline-flex;font-size:var(--ac-text-sm);font-weight:500;height:2.5rem;justify-content:center;overflow:hidden;padding:.5rem 1rem;position:relative}.button:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.content{position:relative;z-index:1}.ripple{background:var(--ac-primary-foreground);border-radius:9999px;height:1.25rem;pointer-events:none;position:absolute;width:1.25rem}",".button {\n background: var(--ac-primary);\n border-radius: var(--ac-radius-lg);\n color: var(--ac-primary-foreground);\n cursor: pointer;\n font-size: var(--ac-text-sm);\n border: 0;\n justify-content: center;\n align-items: center;\n height: 2.5rem;\n padding: .5rem 1rem;\n font-weight: 500;\n display: inline-flex;\n position: relative;\n overflow: hidden;\n}\n\n.button:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.content {\n z-index: 1;\n position: relative;\n}\n\n.ripple {\n background: var(--ac-primary-foreground);\n pointer-events: none;\n border-radius: 9999px;\n width: 1.25rem;\n height: 1.25rem;\n position: absolute;\n}\n"],"sourceRoot":""}
|
|
@@ -32,5 +32,5 @@ export interface ScratcherProps {
|
|
|
32
32
|
*
|
|
33
33
|
* @see {@link ScratcherProps} for available props
|
|
34
34
|
*/
|
|
35
|
-
export declare const Scratcher: React.
|
|
35
|
+
export declare const Scratcher: React.ForwardRefExoticComponent<ScratcherProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
36
|
//# sourceMappingURL=scratcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratcher.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scratcher.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAKzD,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,uGAAuG;IACvG,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAKD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"scratcher.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scratcher.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAKzD,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,uGAAuG;IACvG,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAKD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS,uFAiJpB,CAAC"}
|
|
@@ -10,7 +10,7 @@ const defaultGradientColors = [
|
|
|
10
10
|
"#FDCC92"
|
|
11
11
|
];
|
|
12
12
|
const ignoreAnimationError = ()=>null;
|
|
13
|
-
const
|
|
13
|
+
const scratcher_Scratcher = /*#__PURE__*/ react.forwardRef(function({ width, height, minScratchPercentage = 50, onComplete, children, className, gradientColors = defaultGradientColors }, forwardedRef) {
|
|
14
14
|
const canvasRef = useRef(null);
|
|
15
15
|
const [isScratching, setIsScratching] = useState(false);
|
|
16
16
|
const [isComplete, setIsComplete] = useState(false);
|
|
@@ -119,6 +119,7 @@ const Scratcher = ({ width, height, minScratchPercentage = 50, onComplete, child
|
|
|
119
119
|
scratch
|
|
120
120
|
]);
|
|
121
121
|
return /*#__PURE__*/ jsxs(motion.div, {
|
|
122
|
+
ref: forwardedRef,
|
|
122
123
|
className: cn(scratcher_module.root, className),
|
|
123
124
|
style: {
|
|
124
125
|
width,
|
|
@@ -138,8 +139,8 @@ const Scratcher = ({ width, height, minScratchPercentage = 50, onComplete, child
|
|
|
138
139
|
children
|
|
139
140
|
]
|
|
140
141
|
});
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export { Scratcher };
|
|
142
|
+
});
|
|
143
|
+
scratcher_Scratcher.displayName = "Scratcher";
|
|
144
|
+
export { scratcher_Scratcher as Scratcher };
|
|
144
145
|
|
|
145
146
|
//# sourceMappingURL=scratcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/scratcher.js","sources":["../../../src/components/ui/scratcher.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, useAnimation} from \"motion/react\";\r\nimport React, {useEffect, useRef, useState} from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./scratcher.module.css\";\r\n\r\n/** Props accepted by {@link Scratcher}. */\r\nexport interface ScratcherProps {\r\n /** Content revealed after the overlay is scratched away. @default undefined */\r\n children: React.ReactNode;\r\n /** Width of the scratch card surface in pixels. @default undefined */\r\n width: number;\r\n /** Height of the scratch card surface in pixels. @default undefined */\r\n height: number;\r\n /** Percentage of cleared pixels required before completion fires. @default 50 */\r\n minScratchPercentage?: number;\r\n /** Additional CSS classes merged with the scratch card container. @default undefined */\r\n className?: string;\r\n /** Callback invoked once the scratch completion threshold is reached. @default undefined */\r\n onComplete?: () => void;\r\n /** Three-stop gradient used for the scratchable overlay. @default [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"] */\r\n gradientColors?: [string, string, string];\r\n}\r\n\r\nconst defaultGradientColors: [string, string, string] = [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"];\r\nconst ignoreAnimationError = (): null => null;\r\n\r\n/**\r\n * Renders a scratch-card reveal surface with animated completion feedback.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<div>` element containing a `<canvas>`\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <Scratcher width={320} height={180}>Prize unlocked</Scratcher>\r\n * ```\r\n *\r\n * @see {@link ScratcherProps} for available props\r\n */\r\nexport const Scratcher: React.FC<ScratcherProps> = ({\r\n width,\r\n height,\r\n minScratchPercentage = 50,\r\n onComplete,\r\n children,\r\n className,\r\n gradientColors = defaultGradientColors,\r\n}): React.JSX.Element => {\r\n const canvasRef = useRef<HTMLCanvasElement>(null);\r\n const [isScratching, setIsScratching] = useState(false);\r\n const [isComplete, setIsComplete] = useState(false);\r\n\r\n const controls = useAnimation();\r\n\r\n useEffect(() => {\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n context.fillStyle = \"#ccc\";\r\n context.fillRect(0, 0, canvas.width, canvas.height);\r\n const gradient = context.createLinearGradient(0, 0, canvas.width, canvas.height);\r\n gradient.addColorStop(0, gradientColors[0]);\r\n gradient.addColorStop(0.5, gradientColors[1]);\r\n gradient.addColorStop(1, gradientColors[2]);\r\n context.fillStyle = gradient;\r\n context.fillRect(0, 0, canvas.width, canvas.height);\r\n }, [gradientColors]);\r\n\r\n const scratch = React.useCallback((clientX: number, clientY: number): void => {\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n const rect = canvas.getBoundingClientRect();\r\n const x = clientX - rect.left + 16;\r\n const y = clientY - rect.top + 16;\r\n context.globalCompositeOperation = \"destination-out\";\r\n context.beginPath();\r\n context.arc(x, y, 30, 0, Math.PI * 2);\r\n context.fill();\r\n }, []);\r\n\r\n const startAnimation = React.useCallback(async (): Promise<void> => {\r\n await controls.start({\r\n scale: [1, 1.5, 1],\r\n rotate: [0, 10, -10, 10, -10, 0],\r\n transition: {duration: 0.5},\r\n });\r\n\r\n onComplete?.();\r\n }, [controls, onComplete]);\r\n\r\n const checkCompletion = React.useCallback((): void => {\r\n if (isComplete) {\r\n return;\r\n }\r\n\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n const imageData = context.getImageData(0, 0, canvas.width, canvas.height);\r\n const pixels = imageData.data;\r\n const totalPixels = pixels.length / 4;\r\n let clearPixels = 0;\r\n\r\n for (let index = 3; index < pixels.length; index += 4) {\r\n if (pixels[index] === 0) {\r\n clearPixels += 1;\r\n }\r\n }\r\n\r\n const percentage = (clearPixels / totalPixels) * 100;\r\n if (percentage >= minScratchPercentage) {\r\n setIsComplete(true);\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n startAnimation().catch(ignoreAnimationError);\r\n }\r\n }, [isComplete, minScratchPercentage, startAnimation]);\r\n\r\n useEffect(() => {\r\n const handleDocumentMouseMove = (event: MouseEvent): void => {\r\n if (isScratching) {\r\n scratch(event.clientX, event.clientY);\r\n }\r\n };\r\n\r\n const handleDocumentTouchMove = (event: TouchEvent): void => {\r\n if (!isScratching) {\r\n return;\r\n }\r\n\r\n const [touch] = event.touches;\r\n if (!touch) {\r\n return;\r\n }\r\n\r\n scratch(touch.clientX, touch.clientY);\r\n };\r\n\r\n const handleDocumentPointerEnd = (): void => {\r\n setIsScratching(false);\r\n checkCompletion();\r\n };\r\n\r\n globalThis.document.addEventListener(\"mousemove\", handleDocumentMouseMove);\r\n globalThis.document.addEventListener(\"touchmove\", handleDocumentTouchMove);\r\n globalThis.document.addEventListener(\"mouseup\", handleDocumentPointerEnd);\r\n globalThis.document.addEventListener(\"touchend\", handleDocumentPointerEnd);\r\n globalThis.document.addEventListener(\"touchcancel\", handleDocumentPointerEnd);\r\n\r\n return () => {\r\n globalThis.document.removeEventListener(\"mousemove\", handleDocumentMouseMove);\r\n globalThis.document.removeEventListener(\"touchmove\", handleDocumentTouchMove);\r\n globalThis.document.removeEventListener(\"mouseup\", handleDocumentPointerEnd);\r\n globalThis.document.removeEventListener(\"touchend\", handleDocumentPointerEnd);\r\n globalThis.document.removeEventListener(\"touchcancel\", handleDocumentPointerEnd);\r\n };\r\n }, [checkCompletion, isScratching, scratch]);\r\n\r\n return (\r\n <motion.div\r\n className={cn(styles.root, className)}\r\n style={{\r\n width,\r\n height,\r\n cursor:\r\n \"url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto\",\r\n }}\r\n animate={controls}>\r\n <canvas\r\n ref={canvasRef}\r\n width={width}\r\n height={height}\r\n className={styles.canvas}\r\n onMouseDown={() => setIsScratching(true)}\r\n onTouchStart={() => setIsScratching(true)}\r\n />\r\n {children}\r\n </motion.div>\r\n );\r\n};\r\n\r\nScratcher.displayName = \"Scratcher\";\r\n"],"names":["defaultGradientColors","ignoreAnimationError","Scratcher","width","height","minScratchPercentage","onComplete","children","className","gradientColors","canvasRef","useRef","isScratching","setIsScratching","useState","isComplete","setIsComplete","controls","useAnimation","useEffect","canvas","context","gradient","scratch","React","clientX","clientY","rect","x","y","Math","startAnimation","checkCompletion","imageData","pixels","totalPixels","clearPixels","index","percentage","handleDocumentMouseMove","event","handleDocumentTouchMove","touch","handleDocumentPointerEnd","globalThis","motion","cn","styles"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"components/ui/scratcher.js","sources":["../../../src/components/ui/scratcher.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, useAnimation} from \"motion/react\";\r\nimport React, {useEffect, useRef, useState} from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./scratcher.module.css\";\r\n\r\n/** Props accepted by {@link Scratcher}. */\r\nexport interface ScratcherProps {\r\n /** Content revealed after the overlay is scratched away. @default undefined */\r\n children: React.ReactNode;\r\n /** Width of the scratch card surface in pixels. @default undefined */\r\n width: number;\r\n /** Height of the scratch card surface in pixels. @default undefined */\r\n height: number;\r\n /** Percentage of cleared pixels required before completion fires. @default 50 */\r\n minScratchPercentage?: number;\r\n /** Additional CSS classes merged with the scratch card container. @default undefined */\r\n className?: string;\r\n /** Callback invoked once the scratch completion threshold is reached. @default undefined */\r\n onComplete?: () => void;\r\n /** Three-stop gradient used for the scratchable overlay. @default [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"] */\r\n gradientColors?: [string, string, string];\r\n}\r\n\r\nconst defaultGradientColors: [string, string, string] = [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"];\r\nconst ignoreAnimationError = (): null => null;\r\n\r\n/**\r\n * Renders a scratch-card reveal surface with animated completion feedback.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<div>` element containing a `<canvas>`\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <Scratcher width={320} height={180}>Prize unlocked</Scratcher>\r\n * ```\r\n *\r\n * @see {@link ScratcherProps} for available props\r\n */\r\nexport const Scratcher = React.forwardRef<HTMLDivElement, ScratcherProps>(function Scratcher(\r\n {width, height, minScratchPercentage = 50, onComplete, children, className, gradientColors = defaultGradientColors},\r\n forwardedRef,\r\n) {\r\n const canvasRef = useRef<HTMLCanvasElement>(null);\r\n const [isScratching, setIsScratching] = useState(false);\r\n const [isComplete, setIsComplete] = useState(false);\r\n\r\n const controls = useAnimation();\r\n\r\n useEffect(() => {\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n context.fillStyle = \"#ccc\";\r\n context.fillRect(0, 0, canvas.width, canvas.height);\r\n const gradient = context.createLinearGradient(0, 0, canvas.width, canvas.height);\r\n gradient.addColorStop(0, gradientColors[0]);\r\n gradient.addColorStop(0.5, gradientColors[1]);\r\n gradient.addColorStop(1, gradientColors[2]);\r\n context.fillStyle = gradient;\r\n context.fillRect(0, 0, canvas.width, canvas.height);\r\n }, [gradientColors]);\r\n\r\n const scratch = React.useCallback((clientX: number, clientY: number): void => {\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n const rect = canvas.getBoundingClientRect();\r\n const x = clientX - rect.left + 16;\r\n const y = clientY - rect.top + 16;\r\n context.globalCompositeOperation = \"destination-out\";\r\n context.beginPath();\r\n context.arc(x, y, 30, 0, Math.PI * 2);\r\n context.fill();\r\n }, []);\r\n\r\n const startAnimation = React.useCallback(async (): Promise<void> => {\r\n await controls.start({\r\n scale: [1, 1.5, 1],\r\n rotate: [0, 10, -10, 10, -10, 0],\r\n transition: {duration: 0.5},\r\n });\r\n\r\n onComplete?.();\r\n }, [controls, onComplete]);\r\n\r\n const checkCompletion = React.useCallback((): void => {\r\n if (isComplete) {\r\n return;\r\n }\r\n\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n const imageData = context.getImageData(0, 0, canvas.width, canvas.height);\r\n const pixels = imageData.data;\r\n const totalPixels = pixels.length / 4;\r\n let clearPixels = 0;\r\n\r\n for (let index = 3; index < pixels.length; index += 4) {\r\n if (pixels[index] === 0) {\r\n clearPixels += 1;\r\n }\r\n }\r\n\r\n const percentage = (clearPixels / totalPixels) * 100;\r\n if (percentage >= minScratchPercentage) {\r\n setIsComplete(true);\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n startAnimation().catch(ignoreAnimationError);\r\n }\r\n }, [isComplete, minScratchPercentage, startAnimation]);\r\n\r\n useEffect(() => {\r\n const handleDocumentMouseMove = (event: MouseEvent): void => {\r\n if (isScratching) {\r\n scratch(event.clientX, event.clientY);\r\n }\r\n };\r\n\r\n const handleDocumentTouchMove = (event: TouchEvent): void => {\r\n if (!isScratching) {\r\n return;\r\n }\r\n\r\n const [touch] = event.touches;\r\n if (!touch) {\r\n return;\r\n }\r\n\r\n scratch(touch.clientX, touch.clientY);\r\n };\r\n\r\n const handleDocumentPointerEnd = (): void => {\r\n setIsScratching(false);\r\n checkCompletion();\r\n };\r\n\r\n globalThis.document.addEventListener(\"mousemove\", handleDocumentMouseMove);\r\n globalThis.document.addEventListener(\"touchmove\", handleDocumentTouchMove);\r\n globalThis.document.addEventListener(\"mouseup\", handleDocumentPointerEnd);\r\n globalThis.document.addEventListener(\"touchend\", handleDocumentPointerEnd);\r\n globalThis.document.addEventListener(\"touchcancel\", handleDocumentPointerEnd);\r\n\r\n return () => {\r\n globalThis.document.removeEventListener(\"mousemove\", handleDocumentMouseMove);\r\n globalThis.document.removeEventListener(\"touchmove\", handleDocumentTouchMove);\r\n globalThis.document.removeEventListener(\"mouseup\", handleDocumentPointerEnd);\r\n globalThis.document.removeEventListener(\"touchend\", handleDocumentPointerEnd);\r\n globalThis.document.removeEventListener(\"touchcancel\", handleDocumentPointerEnd);\r\n };\r\n }, [checkCompletion, isScratching, scratch]);\r\n\r\n return (\r\n <motion.div\r\n ref={forwardedRef}\r\n className={cn(styles.root, className)}\r\n style={{\r\n width,\r\n height,\r\n cursor:\r\n \"url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto\",\r\n }}\r\n animate={controls}>\r\n <canvas\r\n ref={canvasRef}\r\n width={width}\r\n height={height}\r\n className={styles.canvas}\r\n onMouseDown={() => setIsScratching(true)}\r\n onTouchStart={() => setIsScratching(true)}\r\n />\r\n {children}\r\n </motion.div>\r\n );\r\n});\r\n\r\nScratcher.displayName = \"Scratcher\";\r\n"],"names":["defaultGradientColors","ignoreAnimationError","Scratcher","React","width","height","minScratchPercentage","onComplete","children","className","gradientColors","forwardedRef","canvasRef","useRef","isScratching","setIsScratching","useState","isComplete","setIsComplete","controls","useAnimation","useEffect","canvas","context","gradient","scratch","clientX","clientY","rect","x","y","Math","startAnimation","checkCompletion","imageData","pixels","totalPixels","clearPixels","index","percentage","handleDocumentMouseMove","event","handleDocumentTouchMove","touch","handleDocumentPointerEnd","globalThis","motion","cn","styles"],"mappings":"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"}
|
|
@@ -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/scratcher.module.css","webpack://./src/components/ui/scratcher.module.css"],"names":[],"mappings":"AAAA;ECCE,yBAAyB;EACzB,iBAAiB;EACjB,kBAAkB;AACpB;;ADJyC;ECOvC,kBAAkB;EAClB,QAAQ;AACV","sourcesContent":[".root{position:relative;user-select:none}.canvas{inset:0;position:absolute}",".root {\n -webkit-user-select: none;\n user-select: none;\n position: relative;\n}\n\n.canvas {\n position: absolute;\n inset: 0;\n}\n"],"sourceRoot":""}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ScrollArea as BaseScrollArea } from "@base-ui/react/scroll-area";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
type ScrollAreaProps = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;
|
|
4
|
-
type ScrollBarProps = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;
|
|
5
3
|
/**
|
|
6
4
|
* Coordinates scroll area layout and scrolling behavior.
|
|
7
5
|
*
|
|
@@ -38,11 +36,11 @@ declare namespace ScrollBar {
|
|
|
38
36
|
var displayName: string;
|
|
39
37
|
}
|
|
40
38
|
declare namespace ScrollArea {
|
|
41
|
-
type Props =
|
|
39
|
+
type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;
|
|
42
40
|
type State = BaseScrollArea.Root.State;
|
|
43
41
|
}
|
|
44
42
|
declare namespace ScrollBar {
|
|
45
|
-
type Props =
|
|
43
|
+
type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;
|
|
46
44
|
type State = BaseScrollArea.Scrollbar.State;
|
|
47
45
|
}
|
|
48
46
|
export { ScrollArea, ScrollBar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,IAAI,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAExE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,IAAI,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAExE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,UAAU,qLAqBf,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,YAAY,CAoBvE;kBApBQ,SAAS;;;AAuBlB,kBAAU,UAAU,CAAC;IACnB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;IAC5E,KAAY,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;CAC/C;AAGD,kBAAU,SAAS,CAAC;IAClB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;IACjF,KAAY,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC;CACpD;AAKD,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,CAAC"}
|
|
@@ -3,10 +3,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
4
|
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import { forwardRef } from "react";
|
|
7
6
|
import { cn } from "../../lib/utilities.js";
|
|
8
7
|
import scroll_area_module from "./scroll-area.module.js";
|
|
9
|
-
|
|
8
|
+
import * as __rspack_external_react from "react";
|
|
9
|
+
const scroll_area_ScrollArea = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
10
10
|
const { className, children, render, ...otherProps } = props;
|
|
11
11
|
return /*#__PURE__*/ jsxs(ScrollArea.Root, {
|
|
12
12
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/scroll-area.js","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {ScrollArea as BaseScrollArea} from \"@base-ui/react/scroll-area\";\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 \"./scroll-area.module.css\";\r\n\r\
|
|
1
|
+
{"version":3,"file":"components/ui/scroll-area.js","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {ScrollArea as BaseScrollArea} from \"@base-ui/react/scroll-area\";\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 \"./scroll-area.module.css\";\r\n\r\n/**\r\n * Coordinates scroll area layout and scrolling 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/scroll-area | Base UI Scroll Area}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ScrollArea>Content</ScrollArea>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/scroll-area | Base UI Documentation}\r\n */\r\nconst ScrollArea = React.forwardRef<React.ComponentRef<typeof BaseScrollArea.Root>, ScrollArea.Props>(\r\n (props: Readonly<ScrollArea.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseScrollArea.Root\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.root, className)}, {}),\r\n })}>\r\n <BaseScrollArea.Viewport className={styles.viewport}>\r\n <BaseScrollArea.Content className={styles.content}>{children}</BaseScrollArea.Content>\r\n </BaseScrollArea.Viewport>\r\n <ScrollBar />\r\n <BaseScrollArea.Corner className={styles.corner} />\r\n </BaseScrollArea.Root>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the scroll bar.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/scroll-area | Base UI Scroll Area}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ScrollBar>Content</ScrollBar>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/scroll-area | Base UI Documentation}\r\n */\r\nfunction ScrollBar(props: Readonly<ScrollBar.Props>): React.ReactElement {\r\n const {className, orientation = \"vertical\", render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseScrollArea.Scrollbar\r\n orientation={orientation}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(styles.scrollbar, orientation === \"vertical\" ? styles.vertical : styles.horizontal, className),\r\n },\r\n {},\r\n ),\r\n })}>\r\n <BaseScrollArea.Thumb className={styles.thumb} />\r\n </BaseScrollArea.Scrollbar>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ScrollArea {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;\r\n export type State = BaseScrollArea.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ScrollBar {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;\r\n export type State = BaseScrollArea.Scrollbar.State;\r\n}\r\n\r\nScrollArea.displayName = \"ScrollArea\";\r\nScrollBar.displayName = \"ScrollBar\";\r\n\r\nexport {ScrollArea, ScrollBar};\r\n"],"names":["ScrollArea","React","props","ref","className","children","render","otherProps","BaseScrollArea","useRender","mergeProps","cn","styles","ScrollBar","orientation"],"mappings":";;;;;;;;AAyBA,MAAMA,yBAAa,WAAHA,GAAGC,wBAAAA,UAAgB,CACjC,CAACC,OAAmCC;IAClC,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErD,OAAO,WAAP,GACE,KAACM,WAAAA,IAAmB;QAClB,KAAKL;QACJ,GAAGI,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,mBAAAA,IAAW,EAAER;YAAU,GAAG,CAAC;QAC9D;;0BACA,IAACI,WAAAA,QAAuB;gBAAC,WAAWI,mBAAAA,QAAe;0BACjD,kBAACJ,WAAAA,OAAsB;oBAAC,WAAWI,mBAAAA,OAAc;8BAAGP;;;0BAEtD,IAACQ,WAASA,CAAAA;0BACV,IAACL,WAAAA,MAAqB;gBAAC,WAAWI,mBAAAA,MAAa;;;;AAGrD;AAkBF,SAASC,UAAUX,KAAgC;IACjD,MAAM,EAACE,SAAS,EAAEU,cAAc,UAAU,EAAER,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErE,OAAO,WAAP,GACE,IAACM,WAAAA,SAAwB;QACvB,aAAaM;QACZ,GAAGP,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WACL;gBACE,WAAWC,GAAGC,mBAAAA,SAAgB,EAAEE,AAAgB,eAAhBA,cAA6BF,mBAAAA,QAAe,GAAGA,mBAAAA,UAAiB,EAAER;YACpG,GACA,CAAC;QAEL;kBACA,kBAACI,WAAAA,KAAoB;YAAC,WAAWI,mBAAAA,KAAY;;;AAGnD;AAcAZ,uBAAW,WAAW,GAAG;AACzBa,UAAU,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/scroll-area.module.css","webpack://./src/components/ui/scroll-area.module.css"],"names":[],"mappings":"AAAA;ECCE,kBAAkB;EAClB,gBAAgB;AAClB;;ADHwC;ECMtC,sBAAsB;EACtB,WAAW;EACX,YAAY;AACd;;ADT+F;ECY7F,eAAe;AACjB;;ADbuH;ECgBrH,kBAAkB;EAClB,sDAAsD;EACtD,yBAAyB;EACzB,iBAAiB;EACjB,aAAa;AACf;;ADrBwO;ECwBtO,4BAA4B;EAC5B,cAAc;EACd,YAAY;EACZ,YAAY;AACd;;AD5B0T;EC+BxT,2BAA2B;EAC3B,sBAAsB;EACtB,WAAW;EACX,eAAe;EACf,YAAY;AACd;;ADpCma;ECuCja,kCAAkC;EAClC,oBAAoB;EACpB,OAAO;EACP,kBAAkB;AACpB;;AD3Cyf;EC8Cvf,uBAAuB;AACzB","sourcesContent":[".root{overflow:hidden;position:relative}.viewport{border-radius:inherit;height:100%;width:100%}.content{min-width:100%}.scrollbar{display:flex;touch-action:none;transition:background-color var(--ac-transition-fast);user-select:none}.vertical{border-left:1px solid transparent;height:100%;padding:1px;width:.625rem}.horizontal{border-top:1px solid transparent;flex-direction:column;height:.625rem;padding:1px;width:100%}.thumb{background-color:var(--ac-border);border-radius:999px;flex:1;position:relative}.corner{background-color:transparent}",".root {\n position: relative;\n overflow: hidden;\n}\n\n.viewport {\n border-radius: inherit;\n width: 100%;\n height: 100%;\n}\n\n.content {\n min-width: 100%;\n}\n\n.scrollbar {\n touch-action: none;\n transition: background-color var(--ac-transition-fast);\n -webkit-user-select: none;\n user-select: none;\n display: flex;\n}\n\n.vertical {\n border-left: 1px solid #0000;\n width: .625rem;\n height: 100%;\n padding: 1px;\n}\n\n.horizontal {\n border-top: 1px solid #0000;\n flex-direction: column;\n width: 100%;\n height: .625rem;\n padding: 1px;\n}\n\n.thumb {\n background-color: var(--ac-border);\n border-radius: 999px;\n flex: 1;\n position: relative;\n}\n\n.corner {\n background-color: #0000;\n}\n"],"sourceRoot":""}
|
|
@@ -4,12 +4,12 @@ import { mergeProps } from "@base-ui/react/merge-props";
|
|
|
4
4
|
import { Select } from "@base-ui/react/select";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
7
|
-
import { forwardRef, useCallback } from "react";
|
|
8
7
|
import { cn } from "../../lib/utilities.js";
|
|
9
8
|
import select_module from "./select.module.js";
|
|
9
|
+
import * as __rspack_external_react from "react";
|
|
10
10
|
function select_Select(props) {
|
|
11
11
|
const { onValueChange, ...otherProps } = props;
|
|
12
|
-
const handleChange = useCallback((value)=>{
|
|
12
|
+
const handleChange = __rspack_external_react.useCallback((value)=>{
|
|
13
13
|
if (onValueChange && "string" == typeof value) onValueChange(value);
|
|
14
14
|
}, [
|
|
15
15
|
onValueChange
|
|
@@ -24,7 +24,7 @@ const SelectGroup = Select.Group;
|
|
|
24
24
|
SelectGroup.displayName = "SelectGroup";
|
|
25
25
|
const SelectValue = Select.Value;
|
|
26
26
|
SelectValue.displayName = "SelectValue";
|
|
27
|
-
const SelectTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
27
|
+
const SelectTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
28
28
|
const { className, children, render, ...otherProps } = props;
|
|
29
29
|
return /*#__PURE__*/ jsxs(Select.Trigger, {
|
|
30
30
|
ref: ref,
|
|
@@ -82,7 +82,7 @@ function SelectScrollDownButton(props) {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
85
|
-
const SelectContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
85
|
+
const SelectContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
86
86
|
const { className, children, render, sideOffset = 4, ...otherProps } = props;
|
|
87
87
|
return /*#__PURE__*/ jsx(Select.Portal, {
|
|
88
88
|
children: /*#__PURE__*/ jsx(Select.Positioner, {
|