@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/async-boundary.js","sources":["../../../src/components/ui/async-boundary.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {ErrorBoundary, type ErrorBoundaryProps} from \"./error-boundary\";\r\nimport {Spinner} from \"./spinner\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link AsyncBoundary} component.\r\n *\r\n * @remarks\r\n * Extends the shared error boundary contract with a Suspense fallback so async child\r\n * trees can handle loading and error states through a single composition primitive.\r\n */\r\ninterface AsyncBoundaryProps extends Omit<ErrorBoundaryProps, \"children\"> {\r\n /**\r\n * Content that may suspend or throw during rendering.\r\n */\r\n children: React.ReactNode;\r\n /**\r\n * Fallback UI rendered while descendants are suspended.\r\n *\r\n * @default <Spinner />\r\n */\r\n loadingFallback?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Combines Suspense loading behavior with error boundary recovery semantics.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible composition component.\r\n *\r\n * Wrap async child trees with this component to centralize loading and error handling.\r\n * The loading fallback is rendered by `React.Suspense`, while rendering errors are\r\n * delegated to the shared client-side {@link ErrorBoundary}.\r\n *\r\n * @example\r\n * ```tsx\r\n * <AsyncBoundary loadingFallback={<CardSkeleton />}>\r\n * <AsyncDataPanel />\r\n * </AsyncBoundary>\r\n * ```\r\n *\r\n * @see {@link AsyncBoundaryProps} for available props\r\n */\r\nfunction AsyncBoundary({children, loadingFallback, ...errorBoundaryProps}: Readonly<AsyncBoundaryProps>): React.JSX.Element {\r\n return (\r\n <ErrorBoundary {...errorBoundaryProps}>\r\n <React.Suspense fallback={loadingFallback ?? <Spinner />}>{children}</React.Suspense>\r\n </ErrorBoundary>\r\n );\r\n}\r\n\r\nAsyncBoundary.displayName = \"AsyncBoundary\";\r\n\r\nexport {AsyncBoundary};\r\nexport type {AsyncBoundaryProps};\r\n"],"names":["AsyncBoundary","children","loadingFallback","errorBoundaryProps","ErrorBoundary","React","Spinner"],"mappings":";;;;AA4CA,SAASA,cAAc,EAACC,QAAQ,EAAEC,eAAe,EAAE,GAAGC,oBAAiD;IACrG,OAAO,WAAP,GACE,IAACC,eAAaA;QAAE,GAAGD,kBAAkB;kBACnC,kBAACE,
|
|
1
|
+
{"version":3,"file":"components/ui/async-boundary.js","sources":["../../../src/components/ui/async-boundary.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {ErrorBoundary, type ErrorBoundaryProps} from \"./error-boundary\";\r\nimport {Spinner} from \"./spinner\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link AsyncBoundary} component.\r\n *\r\n * @remarks\r\n * Extends the shared error boundary contract with a Suspense fallback so async child\r\n * trees can handle loading and error states through a single composition primitive.\r\n */\r\ninterface AsyncBoundaryProps extends Omit<ErrorBoundaryProps, \"children\"> {\r\n /**\r\n * Content that may suspend or throw during rendering.\r\n */\r\n children: React.ReactNode;\r\n /**\r\n * Fallback UI rendered while descendants are suspended.\r\n *\r\n * @default <Spinner />\r\n */\r\n loadingFallback?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Combines Suspense loading behavior with error boundary recovery semantics.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible composition component.\r\n *\r\n * Wrap async child trees with this component to centralize loading and error handling.\r\n * The loading fallback is rendered by `React.Suspense`, while rendering errors are\r\n * delegated to the shared client-side {@link ErrorBoundary}.\r\n *\r\n * @example\r\n * ```tsx\r\n * <AsyncBoundary loadingFallback={<CardSkeleton />}>\r\n * <AsyncDataPanel />\r\n * </AsyncBoundary>\r\n * ```\r\n *\r\n * @see {@link AsyncBoundaryProps} for available props\r\n */\r\nfunction AsyncBoundary({children, loadingFallback, ...errorBoundaryProps}: Readonly<AsyncBoundaryProps>): React.JSX.Element {\r\n return (\r\n <ErrorBoundary {...errorBoundaryProps}>\r\n <React.Suspense fallback={loadingFallback ?? <Spinner />}>{children}</React.Suspense>\r\n </ErrorBoundary>\r\n );\r\n}\r\n\r\nAsyncBoundary.displayName = \"AsyncBoundary\";\r\n\r\nexport {AsyncBoundary};\r\nexport type {AsyncBoundaryProps};\r\n"],"names":["AsyncBoundary","children","loadingFallback","errorBoundaryProps","ErrorBoundary","React","Spinner"],"mappings":";;;;AA4CA,SAASA,cAAc,EAACC,QAAQ,EAAEC,eAAe,EAAE,GAAGC,oBAAiD;IACrG,OAAO,WAAP,GACE,IAACC,eAAaA;QAAE,GAAGD,kBAAkB;kBACnC,kBAACE,wBAAAA,QAAc;YAAC,UAAUH,mBAAmB,WAAnBA,GAAmB,IAACI,SAAOA,CAAAA;sBAAML;;;AAGjE;AAEAD,cAAc,WAAW,GAAG"}
|
|
@@ -40,10 +40,7 @@ interface AvatarFallbackProps extends Omit<React.ComponentPropsWithRef<typeof Ba
|
|
|
40
40
|
*
|
|
41
41
|
* @see {@link https://base-ui.com/react/components/avatar | Base UI Documentation}
|
|
42
42
|
*/
|
|
43
|
-
declare
|
|
44
|
-
declare namespace Avatar {
|
|
45
|
-
var displayName: string;
|
|
46
|
-
}
|
|
43
|
+
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
47
44
|
/**
|
|
48
45
|
* Renders the primary avatar image inside the avatar root.
|
|
49
46
|
*
|
|
@@ -60,10 +57,7 @@ declare namespace Avatar {
|
|
|
60
57
|
*
|
|
61
58
|
* @see {@link https://base-ui.com/react/components/avatar | Base UI Documentation}
|
|
62
59
|
*/
|
|
63
|
-
declare
|
|
64
|
-
declare namespace AvatarImage {
|
|
65
|
-
var displayName: string;
|
|
66
|
-
}
|
|
60
|
+
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarImageProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
67
61
|
/**
|
|
68
62
|
* Renders fallback content when the avatar image is unavailable.
|
|
69
63
|
*
|
|
@@ -80,10 +74,7 @@ declare namespace AvatarImage {
|
|
|
80
74
|
*
|
|
81
75
|
* @see {@link https://base-ui.com/react/components/avatar | Base UI Documentation}
|
|
82
76
|
*/
|
|
83
|
-
declare
|
|
84
|
-
declare namespace AvatarFallback {
|
|
85
|
-
var displayName: string;
|
|
86
|
-
}
|
|
77
|
+
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarFallbackProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
87
78
|
declare namespace Avatar {
|
|
88
79
|
type Props = AvatarProps;
|
|
89
80
|
type State = BaseAvatar.Root.State;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,IAAI,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAG3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,UAAU,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAClG,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,UAAU,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,UAAU,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IACxG,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,UAAU,mBAAoB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,UAAU,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;IAC9G,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,IAAI,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAG3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,UAAU,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAClG,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,UAAU,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,UAAU,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IACxG,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,UAAU,mBAAoB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,UAAU,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;IAC9G,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,MAAM,kGAeV,CAAC;AAGH;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,WAAW,wGAcf,CAAC;AAGH;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,cAAc,0GAelB,CAAC;AAIH,kBAAU,MAAM,CAAC;IACf,KAAY,KAAK,GAAG,WAAW,CAAC;IAChC,KAAY,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;CAC3C;AAGD,kBAAU,WAAW,CAAC;IACpB,KAAY,KAAK,GAAG,gBAAgB,CAAC;IACrC,KAAY,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC;CAC5C;AAGD,kBAAU,cAAc,CAAC;IACvB,KAAY,KAAK,GAAG,mBAAmB,CAAC;IACxC,KAAY,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;CAC/C;AAED,OAAO,EAAC,MAAM,EAAE,cAAc,EAAE,WAAW,EAAC,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Avatar } from "@base-ui/react/avatar";
|
|
3
|
+
import { Avatar as avatar_Avatar } from "@base-ui/react/avatar";
|
|
4
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import "react";
|
|
7
6
|
import { cn } from "../../lib/utilities.js";
|
|
8
7
|
import avatar_module from "./avatar.module.js";
|
|
9
|
-
|
|
8
|
+
import * as __rspack_external_react from "react";
|
|
9
|
+
const ui_avatar_Avatar = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
10
10
|
const { className, children, render, ...otherProps } = props;
|
|
11
|
-
return /*#__PURE__*/ jsx(
|
|
11
|
+
return /*#__PURE__*/ jsx(avatar_Avatar.Root, {
|
|
12
12
|
...otherProps,
|
|
13
|
+
ref: forwardedRef,
|
|
13
14
|
render: useRender({
|
|
14
15
|
defaultTagName: "span",
|
|
15
16
|
render: render,
|
|
@@ -19,12 +20,13 @@ function avatar_Avatar(props) {
|
|
|
19
20
|
}),
|
|
20
21
|
children: children
|
|
21
22
|
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
});
|
|
24
|
+
ui_avatar_Avatar.displayName = "Avatar";
|
|
25
|
+
const avatar_AvatarImage = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
25
26
|
const { className, render, ...otherProps } = props;
|
|
26
|
-
return /*#__PURE__*/ jsx(
|
|
27
|
+
return /*#__PURE__*/ jsx(avatar_Avatar.Image, {
|
|
27
28
|
...otherProps,
|
|
29
|
+
ref: forwardedRef,
|
|
28
30
|
render: useRender({
|
|
29
31
|
defaultTagName: "img",
|
|
30
32
|
render: render,
|
|
@@ -33,12 +35,13 @@ function AvatarImage(props) {
|
|
|
33
35
|
}, {})
|
|
34
36
|
})
|
|
35
37
|
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
});
|
|
39
|
+
avatar_AvatarImage.displayName = "AvatarImage";
|
|
40
|
+
const avatar_AvatarFallback = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
39
41
|
const { className, children, render, ...otherProps } = props;
|
|
40
|
-
return /*#__PURE__*/ jsx(
|
|
42
|
+
return /*#__PURE__*/ jsx(avatar_Avatar.Fallback, {
|
|
41
43
|
...otherProps,
|
|
44
|
+
ref: forwardedRef,
|
|
42
45
|
render: useRender({
|
|
43
46
|
defaultTagName: "span",
|
|
44
47
|
render: render,
|
|
@@ -48,8 +51,8 @@ function AvatarFallback(props) {
|
|
|
48
51
|
}),
|
|
49
52
|
children: children
|
|
50
53
|
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { AvatarFallback, AvatarImage,
|
|
54
|
+
});
|
|
55
|
+
avatar_AvatarFallback.displayName = "AvatarFallback";
|
|
56
|
+
export { avatar_AvatarFallback as AvatarFallback, avatar_AvatarImage as AvatarImage, ui_avatar_Avatar as Avatar };
|
|
54
57
|
|
|
55
58
|
//# sourceMappingURL=avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/avatar.js","sources":["../../../src/components/ui/avatar.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Avatar as BaseAvatar} from \"@base-ui/react/avatar\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\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 \"./avatar.module.css\";\r\n\r\n/**\r\n * Props for the shared avatar root.\r\n */\r\ninterface AvatarProps extends Omit<React.ComponentPropsWithRef<typeof BaseAvatar.Root>, \"className\"> {\r\n /** Additional CSS classes merged with the avatar root styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Props for the shared avatar image.\r\n */\r\ninterface AvatarImageProps extends Omit<React.ComponentPropsWithRef<typeof BaseAvatar.Image>, \"className\"> {\r\n /** Additional CSS classes merged with the avatar image styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Props for the shared avatar fallback.\r\n */\r\ninterface AvatarFallbackProps extends Omit<React.ComponentPropsWithRef<typeof BaseAvatar.Fallback>, \"className\"> {\r\n /** Additional CSS classes merged with the avatar fallback styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Displays a user avatar container with shared sizing and shape styles.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/avatar | Base UI Avatar}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <Avatar>\r\n * <AvatarImage src=\"/profile.png\" alt=\"Profile\" />\r\n * <AvatarFallback>AO</AvatarFallback>\r\n * </Avatar>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/avatar | Base UI Documentation}\r\n */\r\
|
|
1
|
+
{"version":3,"file":"components/ui/avatar.js","sources":["../../../src/components/ui/avatar.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Avatar as BaseAvatar} from \"@base-ui/react/avatar\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\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 \"./avatar.module.css\";\r\n\r\n/**\r\n * Props for the shared avatar root.\r\n */\r\ninterface AvatarProps extends Omit<React.ComponentPropsWithRef<typeof BaseAvatar.Root>, \"className\"> {\r\n /** Additional CSS classes merged with the avatar root styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Props for the shared avatar image.\r\n */\r\ninterface AvatarImageProps extends Omit<React.ComponentPropsWithRef<typeof BaseAvatar.Image>, \"className\"> {\r\n /** Additional CSS classes merged with the avatar image styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Props for the shared avatar fallback.\r\n */\r\ninterface AvatarFallbackProps extends Omit<React.ComponentPropsWithRef<typeof BaseAvatar.Fallback>, \"className\"> {\r\n /** Additional CSS classes merged with the avatar fallback styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Displays a user avatar container with shared sizing and shape styles.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/avatar | Base UI Avatar}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <Avatar>\r\n * <AvatarImage src=\"/profile.png\" alt=\"Profile\" />\r\n * <AvatarFallback>AO</AvatarFallback>\r\n * </Avatar>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/avatar | Base UI Documentation}\r\n */\r\nconst Avatar = React.forwardRef<HTMLSpanElement, Avatar.Props>(function Avatar(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAvatar.Root\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"span\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.root, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseAvatar.Root>\r\n );\r\n});\r\nAvatar.displayName = \"Avatar\";\r\n\r\n/**\r\n * Renders the primary avatar image inside the avatar root.\r\n *\r\n * @remarks\r\n * - Renders an `<img>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/avatar | Base UI Avatar}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <AvatarImage src=\"/profile.png\" alt=\"Profile\" />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/avatar | Base UI Documentation}\r\n */\r\nconst AvatarImage = React.forwardRef<HTMLImageElement, AvatarImage.Props>(function AvatarImage(props, forwardedRef) {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAvatar.Image\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"img\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.image, className)}, {}),\r\n })}\r\n />\r\n );\r\n});\r\nAvatarImage.displayName = \"AvatarImage\";\r\n\r\n/**\r\n * Renders fallback content when the avatar image is unavailable.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/avatar | Base UI Avatar}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <AvatarFallback>AO</AvatarFallback>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/avatar | Base UI Documentation}\r\n */\r\nconst AvatarFallback = React.forwardRef<HTMLSpanElement, AvatarFallback.Props>(function AvatarFallback(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAvatar.Fallback\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"span\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.fallback, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseAvatar.Fallback>\r\n );\r\n});\r\nAvatarFallback.displayName = \"AvatarFallback\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Avatar {\r\n export type Props = AvatarProps;\r\n export type State = BaseAvatar.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AvatarImage {\r\n export type Props = AvatarImageProps;\r\n export type State = BaseAvatar.Image.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AvatarFallback {\r\n export type Props = AvatarFallbackProps;\r\n export type State = BaseAvatar.Fallback.State;\r\n}\r\n\r\nexport {Avatar, AvatarFallback, AvatarImage};\r\n"],"names":["Avatar","React","props","forwardedRef","className","children","render","otherProps","BaseAvatar","useRender","mergeProps","cn","styles","AvatarImage","AvatarFallback"],"mappings":";;;;;;;;AAqDA,MAAMA,mBAAS,WAAHA,GAAGC,wBAAAA,UAAgB,CAAgC,SAAgBC,KAAK,EAAEC,YAAY;IAChG,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErD,OAAO,WAAP,GACE,IAACM,cAAAA,IAAe;QACb,GAAGD,UAAU;QACd,KAAKJ;QACL,QAAQM,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,cAAAA,IAAW,EAAER;YAAU,GAAG,CAAC;QAC9D;kBACCC;;AAGP;AACAL,iBAAO,WAAW,GAAG;AAkBrB,MAAMa,qBAAc,WAAHA,GAAGZ,wBAAAA,UAAgB,CAAsC,SAAqBC,KAAK,EAAEC,YAAY;IAChH,MAAM,EAACC,SAAS,EAAEE,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAE3C,OAAO,WAAP,GACE,IAACM,cAAAA,KAAgB;QACd,GAAGD,UAAU;QACd,KAAKJ;QACL,QAAQM,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,cAAAA,KAAY,EAAER;YAAU,GAAG,CAAC;QAC/D;;AAGN;AACAS,mBAAY,WAAW,GAAG;AAkB1B,MAAMC,wBAAiB,WAAHA,GAAGb,wBAAAA,UAAgB,CAAwC,SAAwBC,KAAK,EAAEC,YAAY;IACxH,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErD,OAAO,WAAP,GACE,IAACM,cAAAA,QAAmB;QACjB,GAAGD,UAAU;QACd,KAAKJ;QACL,QAAQM,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,cAAAA,QAAe,EAAER;YAAU,GAAG,CAAC;QAClE;kBACCC;;AAGP;AACAS,sBAAe,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/avatar.module.css","webpack://./src/components/ui/avatar.module.css"],"names":[],"mappings":"AAAA;ECCE,qBAAqB;EACrB,cAAc;EACd,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,cAAc;EACd,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;ADV6J;ECa3J,eAAe;EACf,iBAAiB;AACnB;;ADfsM;ECkBpM,WAAW;EACX,YAAY;AACd;;ADpB8O;ECuB5O,iCAAiC;EACjC,iCAAiC;EACjC,4BAA4B;EAC5B,qBAAqB;EACrB,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;EAChB,aAAa;AACf","sourcesContent":[".root{align-items:center;border-radius:9999px;display:flex;flex-shrink:0;height:2.5rem;justify-content:center;overflow:hidden;position:relative;width:2.5rem}.image{aspect-ratio:1/1;object-fit:cover}.fallback,.image{height:100%;width:100%}.fallback{align-items:center;background-color:var(--ac-muted);border-radius:9999px;color:var(--ac-muted-foreground);display:flex;font-size:var(--ac-text-sm);font-weight:500;justify-content:center}",".root {\n border-radius: 9999px;\n flex-shrink: 0;\n justify-content: center;\n align-items: center;\n width: 2.5rem;\n height: 2.5rem;\n display: flex;\n position: relative;\n overflow: hidden;\n}\n\n.image {\n aspect-ratio: 1;\n object-fit: cover;\n}\n\n.fallback, .image {\n width: 100%;\n height: 100%;\n}\n\n.fallback {\n background-color: var(--ac-muted);\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n border-radius: 9999px;\n justify-content: center;\n align-items: center;\n font-weight: 500;\n display: flex;\n}\n"],"sourceRoot":""}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { motion } from "motion/react";
|
|
4
|
-
import { forwardRef, useId } from "react";
|
|
5
4
|
import { cn } from "../../lib/utilities.js";
|
|
6
5
|
import background_beams_module from "./background-beams.module.js";
|
|
7
|
-
|
|
6
|
+
import * as __rspack_external_react from "react";
|
|
7
|
+
const BackgroundBeams = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
8
8
|
const { className, ...restProps } = props;
|
|
9
|
-
const id = useId();
|
|
9
|
+
const id = __rspack_external_react.useId();
|
|
10
10
|
const paths = [
|
|
11
11
|
"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875",
|
|
12
12
|
"M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/background-beams.js","sources":["../../../src/components/ui/background-beams.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./background-beams.module.css\";\r\n\r\n/** Props accepted by {@link BackgroundBeams}. */\r\nexport interface BackgroundBeamsProps extends React.ComponentPropsWithoutRef<\"div\"> {}\r\n\r\n/**\r\n * Renders animated aurora-style beams that sweep across the background.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<div>` element containing animated SVG paths\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 * <BackgroundBeams />\r\n * ```\r\n *\r\n * @see {@link BackgroundBeamsProps} for available props\r\n */\r\nconst BackgroundBeams = React.forwardRef<HTMLDivElement, BackgroundBeamsProps>(\r\n (props: Readonly<BackgroundBeamsProps>, ref): React.JSX.Element => {\r\n const {className, ...restProps} = props;\r\n const id = React.useId();\r\n const paths = [\r\n \"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875\",\r\n \"M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867\",\r\n \"M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859\",\r\n \"M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851\",\r\n \"M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843\",\r\n \"M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835\",\r\n \"M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827\",\r\n \"M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819\",\r\n \"M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811\",\r\n \"M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803\",\r\n \"M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795\",\r\n \"M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787\",\r\n \"M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779\",\r\n \"M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771\",\r\n \"M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763\",\r\n \"M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755\",\r\n \"M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747\",\r\n \"M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739\",\r\n \"M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731\",\r\n \"M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723\",\r\n \"M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715\",\r\n \"M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707\",\r\n \"M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699\",\r\n \"M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691\",\r\n \"M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683\",\r\n \"M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675\",\r\n \"M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667\",\r\n \"M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659\",\r\n \"M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651\",\r\n \"M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643\",\r\n \"M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635\",\r\n \"M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627\",\r\n \"M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619\",\r\n \"M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611\",\r\n \"M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603\",\r\n \"M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595\",\r\n \"M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587\",\r\n \"M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579\",\r\n \"M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571\",\r\n \"M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563\",\r\n \"M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555\",\r\n \"M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547\",\r\n \"M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539\",\r\n \"M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531\",\r\n \"M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523\",\r\n \"M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515\",\r\n \"M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507\",\r\n \"M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499\",\r\n \"M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491\",\r\n \"M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483\",\r\n ];\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(styles.root, className)}\r\n {...restProps}>\r\n <svg\r\n className={styles.svg}\r\n width='100%'\r\n height='100%'\r\n viewBox='0 0 696 316'\r\n fill='none'\r\n xmlns='http://www.w3.org/2000/svg'>\r\n <path\r\n d='M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419'\r\n stroke='url(#paint0_radial_242_278)'\r\n strokeOpacity='0.05'\r\n strokeWidth='0.5'\r\n />\r\n\r\n {paths.map((path, index) => {\r\n const gradientId = `${id}-linear-gradient-${index}`;\r\n return (\r\n <motion.path\r\n key={`path-${index}`}\r\n d={path}\r\n stroke={`url(#${gradientId})`}\r\n strokeOpacity='0.4'\r\n strokeWidth='0.5'\r\n />\r\n );\r\n })}\r\n <defs>\r\n {paths.map((path, index) => {\r\n const gradientId = `${id}-linear-gradient-${index}`;\r\n return (\r\n <motion.linearGradient\r\n id={gradientId}\r\n key={`gradient-${path}-${index}`}\r\n initial={{x1: \"0%\", x2: \"0%\", y1: \"0%\", y2: \"0%\"}}\r\n animate={{\r\n x1: [\"0%\", \"100%\"],\r\n x2: [\"0%\", \"95%\"],\r\n y1: [\"0%\", \"100%\"],\r\n y2: [\"0%\", `${93 + Math.random() * 8}%`],\r\n }}\r\n transition={{\r\n duration: Math.random() * 10 + 10,\r\n ease: \"easeInOut\",\r\n repeat: Infinity,\r\n delay: Math.random() * 10,\r\n }}>\r\n <stop\r\n stopColor='#18CCFC'\r\n stopOpacity='0'\r\n />\r\n <stop stopColor='#18CCFC' />\r\n <stop\r\n offset='32.5%'\r\n stopColor='#6344F5'\r\n />\r\n <stop\r\n offset='100%'\r\n stopColor='#AE48FF'\r\n stopOpacity='0'\r\n />\r\n </motion.linearGradient>\r\n );\r\n })}\r\n\r\n <radialGradient\r\n id='paint0_radial_242_278'\r\n cx='0'\r\n cy='0'\r\n r='1'\r\n gradientUnits='userSpaceOnUse'\r\n gradientTransform='translate(352 34) rotate(90) scale(555 1560.62)'>\r\n <stop\r\n offset='0.0666667'\r\n stopColor='#d4d4d4'\r\n />\r\n <stop\r\n offset='0.243243'\r\n stopColor='#d4d4d4'\r\n />\r\n <stop\r\n offset='0.43594'\r\n stopColor='white'\r\n stopOpacity='0'\r\n />\r\n </radialGradient>\r\n </defs>\r\n </svg>\r\n </div>\r\n );\r\n },\r\n);\r\n\r\nBackgroundBeams.displayName = \"BackgroundBeams\";\r\n\r\nexport {BackgroundBeams};\r\n"],"names":["BackgroundBeams","React","props","ref","className","restProps","id","paths","cn","styles","path","index","gradientId","motion","Math","Infinity"],"mappings":";;;;;;AA2BA,MAAMA,kBAAkB,WAAHA,GAAGC,WACtB,CAACC,OAAuCC;IACtC,MAAM,EAACC,SAAS,EAAE,GAAGC,WAAU,GAAGH;IAClC,MAAMI,KAAKL;IACX,MAAMM,QAAQ;QACZ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IAED,OAAO,WAAP,GACE,IAAC;QACC,KAAKJ;QACL,WAAWK,GAAGC,wBAAAA,IAAW,EAAEL;QAC1B,GAAGC,SAAS;kBACb,mBAAC;YACC,WAAWI,wBAAAA,GAAU;YACrB,OAAM;YACN,QAAO;YACP,SAAQ;YACR,MAAK;YACL,OAAM;;8BACN,IAAC;oBACC,GAAE;oBACF,QAAO;oBACP,eAAc;oBACd,aAAY;;gBAGbF,MAAM,GAAG,CAAC,CAACG,MAAMC;oBAChB,MAAMC,aAAa,GAAGN,GAAG,iBAAiB,EAAEK,OAAO;oBACnD,OAAO,WAAP,GACE,IAACE,OAAO,IAAI;wBAEV,GAAGH;wBACH,QAAQ,CAAC,KAAK,EAAEE,WAAW,CAAC,CAAC;wBAC7B,eAAc;wBACd,aAAY;uBAJP,CAAC,KAAK,EAAED,OAAO;gBAO1B;8BACA,KAAC;;wBACEJ,MAAM,GAAG,CAAC,CAACG,MAAMC;4BAChB,MAAMC,aAAa,GAAGN,GAAG,iBAAiB,EAAEK,OAAO;4BACnD,OAAO,WAAP,GACE,KAACE,OAAO,cAAc;gCACpB,IAAID;gCAEJ,SAAS;oCAAC,IAAI;oCAAM,IAAI;oCAAM,IAAI;oCAAM,IAAI;gCAAI;gCAChD,SAAS;oCACP,IAAI;wCAAC;wCAAM;qCAAO;oCAClB,IAAI;wCAAC;wCAAM;qCAAM;oCACjB,IAAI;wCAAC;wCAAM;qCAAO;oCAClB,IAAI;wCAAC;wCAAM,GAAG,KAAKE,AAAgB,IAAhBA,KAAK,MAAM,GAAO,CAAC,CAAC;qCAAC;gCAC1C;gCACA,YAAY;oCACV,UAAUA,AAAgB,KAAhBA,KAAK,MAAM,KAAU;oCAC/B,MAAM;oCACN,QAAQC;oCACR,OAAOD,AAAgB,KAAhBA,KAAK,MAAM;gCACpB;;kDACA,IAAC;wCACC,WAAU;wCACV,aAAY;;kDAEd,IAAC;wCAAK,WAAU;;kDAChB,IAAC;wCACC,QAAO;wCACP,WAAU;;kDAEZ,IAAC;wCACC,QAAO;wCACP,WAAU;wCACV,aAAY;;;+BA1BT,CAAC,SAAS,EAAEJ,KAAK,CAAC,EAAEC,OAAO;wBA8BtC;sCAEA,KAAC;4BACC,IAAG;4BACH,IAAG;4BACH,IAAG;4BACH,GAAE;4BACF,eAAc;4BACd,mBAAkB;;8CAClB,IAAC;oCACC,QAAO;oCACP,WAAU;;8CAEZ,IAAC;oCACC,QAAO;oCACP,WAAU;;8CAEZ,IAAC;oCACC,QAAO;oCACP,WAAU;oCACV,aAAY;;;;;;;;;AAO1B;AAGFX,gBAAgB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/background-beams.js","sources":["../../../src/components/ui/background-beams.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./background-beams.module.css\";\r\n\r\n/** Props accepted by {@link BackgroundBeams}. */\r\nexport interface BackgroundBeamsProps extends React.ComponentPropsWithoutRef<\"div\"> {}\r\n\r\n/**\r\n * Renders animated aurora-style beams that sweep across the background.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<div>` element containing animated SVG paths\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 * <BackgroundBeams />\r\n * ```\r\n *\r\n * @see {@link BackgroundBeamsProps} for available props\r\n */\r\nconst BackgroundBeams = React.forwardRef<HTMLDivElement, BackgroundBeamsProps>(\r\n (props: Readonly<BackgroundBeamsProps>, ref): React.JSX.Element => {\r\n const {className, ...restProps} = props;\r\n const id = React.useId();\r\n const paths = [\r\n \"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875\",\r\n \"M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867\",\r\n \"M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859\",\r\n \"M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851\",\r\n \"M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843\",\r\n \"M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835\",\r\n \"M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827\",\r\n \"M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819\",\r\n \"M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811\",\r\n \"M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803\",\r\n \"M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795\",\r\n \"M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787\",\r\n \"M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779\",\r\n \"M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771\",\r\n \"M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763\",\r\n \"M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755\",\r\n \"M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747\",\r\n \"M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739\",\r\n \"M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731\",\r\n \"M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723\",\r\n \"M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715\",\r\n \"M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707\",\r\n \"M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699\",\r\n \"M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691\",\r\n \"M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683\",\r\n \"M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675\",\r\n \"M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667\",\r\n \"M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659\",\r\n \"M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651\",\r\n \"M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643\",\r\n \"M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635\",\r\n \"M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627\",\r\n \"M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619\",\r\n \"M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611\",\r\n \"M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603\",\r\n \"M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595\",\r\n \"M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587\",\r\n \"M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579\",\r\n \"M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571\",\r\n \"M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563\",\r\n \"M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555\",\r\n \"M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547\",\r\n \"M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539\",\r\n \"M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531\",\r\n \"M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523\",\r\n \"M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515\",\r\n \"M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507\",\r\n \"M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499\",\r\n \"M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491\",\r\n \"M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483\",\r\n ];\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(styles.root, className)}\r\n {...restProps}>\r\n <svg\r\n className={styles.svg}\r\n width='100%'\r\n height='100%'\r\n viewBox='0 0 696 316'\r\n fill='none'\r\n xmlns='http://www.w3.org/2000/svg'>\r\n <path\r\n d='M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419'\r\n stroke='url(#paint0_radial_242_278)'\r\n strokeOpacity='0.05'\r\n strokeWidth='0.5'\r\n />\r\n\r\n {paths.map((path, index) => {\r\n const gradientId = `${id}-linear-gradient-${index}`;\r\n return (\r\n <motion.path\r\n key={`path-${index}`}\r\n d={path}\r\n stroke={`url(#${gradientId})`}\r\n strokeOpacity='0.4'\r\n strokeWidth='0.5'\r\n />\r\n );\r\n })}\r\n <defs>\r\n {paths.map((path, index) => {\r\n const gradientId = `${id}-linear-gradient-${index}`;\r\n return (\r\n <motion.linearGradient\r\n id={gradientId}\r\n key={`gradient-${path}-${index}`}\r\n initial={{x1: \"0%\", x2: \"0%\", y1: \"0%\", y2: \"0%\"}}\r\n animate={{\r\n x1: [\"0%\", \"100%\"],\r\n x2: [\"0%\", \"95%\"],\r\n y1: [\"0%\", \"100%\"],\r\n y2: [\"0%\", `${93 + Math.random() * 8}%`],\r\n }}\r\n transition={{\r\n duration: Math.random() * 10 + 10,\r\n ease: \"easeInOut\",\r\n repeat: Infinity,\r\n delay: Math.random() * 10,\r\n }}>\r\n <stop\r\n stopColor='#18CCFC'\r\n stopOpacity='0'\r\n />\r\n <stop stopColor='#18CCFC' />\r\n <stop\r\n offset='32.5%'\r\n stopColor='#6344F5'\r\n />\r\n <stop\r\n offset='100%'\r\n stopColor='#AE48FF'\r\n stopOpacity='0'\r\n />\r\n </motion.linearGradient>\r\n );\r\n })}\r\n\r\n <radialGradient\r\n id='paint0_radial_242_278'\r\n cx='0'\r\n cy='0'\r\n r='1'\r\n gradientUnits='userSpaceOnUse'\r\n gradientTransform='translate(352 34) rotate(90) scale(555 1560.62)'>\r\n <stop\r\n offset='0.0666667'\r\n stopColor='#d4d4d4'\r\n />\r\n <stop\r\n offset='0.243243'\r\n stopColor='#d4d4d4'\r\n />\r\n <stop\r\n offset='0.43594'\r\n stopColor='white'\r\n stopOpacity='0'\r\n />\r\n </radialGradient>\r\n </defs>\r\n </svg>\r\n </div>\r\n );\r\n },\r\n);\r\n\r\nBackgroundBeams.displayName = \"BackgroundBeams\";\r\n\r\nexport {BackgroundBeams};\r\n"],"names":["BackgroundBeams","React","props","ref","className","restProps","id","paths","cn","styles","path","index","gradientId","motion","Math","Infinity"],"mappings":";;;;;;AA2BA,MAAMA,kBAAkB,WAAHA,GAAGC,wBAAAA,UAAgB,CACtC,CAACC,OAAuCC;IACtC,MAAM,EAACC,SAAS,EAAE,GAAGC,WAAU,GAAGH;IAClC,MAAMI,KAAKL,wBAAAA,KAAW;IACtB,MAAMM,QAAQ;QACZ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IAED,OAAO,WAAP,GACE,IAAC;QACC,KAAKJ;QACL,WAAWK,GAAGC,wBAAAA,IAAW,EAAEL;QAC1B,GAAGC,SAAS;kBACb,mBAAC;YACC,WAAWI,wBAAAA,GAAU;YACrB,OAAM;YACN,QAAO;YACP,SAAQ;YACR,MAAK;YACL,OAAM;;8BACN,IAAC;oBACC,GAAE;oBACF,QAAO;oBACP,eAAc;oBACd,aAAY;;gBAGbF,MAAM,GAAG,CAAC,CAACG,MAAMC;oBAChB,MAAMC,aAAa,GAAGN,GAAG,iBAAiB,EAAEK,OAAO;oBACnD,OAAO,WAAP,GACE,IAACE,OAAO,IAAI;wBAEV,GAAGH;wBACH,QAAQ,CAAC,KAAK,EAAEE,WAAW,CAAC,CAAC;wBAC7B,eAAc;wBACd,aAAY;uBAJP,CAAC,KAAK,EAAED,OAAO;gBAO1B;8BACA,KAAC;;wBACEJ,MAAM,GAAG,CAAC,CAACG,MAAMC;4BAChB,MAAMC,aAAa,GAAGN,GAAG,iBAAiB,EAAEK,OAAO;4BACnD,OAAO,WAAP,GACE,KAACE,OAAO,cAAc;gCACpB,IAAID;gCAEJ,SAAS;oCAAC,IAAI;oCAAM,IAAI;oCAAM,IAAI;oCAAM,IAAI;gCAAI;gCAChD,SAAS;oCACP,IAAI;wCAAC;wCAAM;qCAAO;oCAClB,IAAI;wCAAC;wCAAM;qCAAM;oCACjB,IAAI;wCAAC;wCAAM;qCAAO;oCAClB,IAAI;wCAAC;wCAAM,GAAG,KAAKE,AAAgB,IAAhBA,KAAK,MAAM,GAAO,CAAC,CAAC;qCAAC;gCAC1C;gCACA,YAAY;oCACV,UAAUA,AAAgB,KAAhBA,KAAK,MAAM,KAAU;oCAC/B,MAAM;oCACN,QAAQC;oCACR,OAAOD,AAAgB,KAAhBA,KAAK,MAAM;gCACpB;;kDACA,IAAC;wCACC,WAAU;wCACV,aAAY;;kDAEd,IAAC;wCAAK,WAAU;;kDAChB,IAAC;wCACC,QAAO;wCACP,WAAU;;kDAEZ,IAAC;wCACC,QAAO;wCACP,WAAU;wCACV,aAAY;;;+BA1BT,CAAC,SAAS,EAAEJ,KAAK,CAAC,EAAEC,OAAO;wBA8BtC;sCAEA,KAAC;4BACC,IAAG;4BACH,IAAG;4BACH,IAAG;4BACH,GAAE;4BACF,eAAc;4BACd,mBAAkB;;8CAClB,IAAC;oCACC,QAAO;oCACP,WAAU;;8CAEZ,IAAC;oCACC,QAAO;oCACP,WAAU;;8CAEZ,IAAC;oCACC,QAAO;oCACP,WAAU;oCACV,aAAY;;;;;;;;;AAO1B;AAGFX,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/background-beams.module.css","webpack://./src/components/ui/background-beams.module.css"],"names":[],"mappings":"AAAA;ECCE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,eAAe;EACf,sBAAsB;AACxB;;ADNkG;ECShG,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,QAAQ;AACV;;ADb8J;ECgB5J,oBAAoB;EACpB,UAAU;AACZ","sourcesContent":[".root{align-items:center;display:flex;justify-content:center;mask-repeat:no-repeat;mask-size:40px}.root,.svg{height:100%;inset:0;position:absolute;width:100%}.svg{pointer-events:none;z-index:0}",".root {\n justify-content: center;\n align-items: center;\n display: flex;\n mask-size: 40px;\n mask-repeat: no-repeat;\n}\n\n.root, .svg {\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n}\n\n.svg {\n pointer-events: none;\n z-index: 0;\n}\n"],"sourceRoot":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { cn } from "../../lib/utilities.js";
|
|
4
3
|
import badge_module from "./badge.module.js";
|
|
4
|
+
import * as __rspack_external_react from "react";
|
|
5
5
|
const variantStyles = {
|
|
6
6
|
default: badge_module["default"],
|
|
7
7
|
secondary: badge_module.secondary,
|
|
@@ -11,7 +11,7 @@ const variantStyles = {
|
|
|
11
11
|
function badgeVariants({ variant = "default", className } = {}) {
|
|
12
12
|
return cn(badge_module.badge, variantStyles[variant], className);
|
|
13
13
|
}
|
|
14
|
-
const Badge = /*#__PURE__*/ forwardRef(({ className, variant = "default", ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
14
|
+
const Badge = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, variant = "default", ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
15
15
|
ref: ref,
|
|
16
16
|
className: badgeVariants({
|
|
17
17
|
variant,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/badge.js","sources":["../../../src/components/ui/badge.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./badge.module.css\";\r\n\r\n/**\r\n * Defines the supported visual treatments for the Badge component.\r\n */\r\nexport type BadgeVariant = \"default\" | \"secondary\" | \"destructive\" | \"outline\";\r\n\r\n/**\r\n * Represents the options accepted by the internal badge class generator.\r\n *\r\n * @remarks\r\n * This helper mirrors the public Badge styling API and exists so callers can derive\r\n * consistent class names without rendering the component itself.\r\n *\r\n * @default variant `\"default\"`\r\n */\r\ninterface BadgeVariantOptions {\r\n /**\r\n * The visual emphasis applied to the badge surface.\r\n *\r\n * @default \"default\"\r\n */\r\n variant?: BadgeVariant;\r\n /**\r\n * Additional CSS classes merged with the generated badge classes.\r\n */\r\n className?: string;\r\n}\r\n\r\nconst variantStyles: Record<BadgeVariant, string> = {\r\n default: styles.default!,\r\n secondary: styles.secondary!,\r\n destructive: styles.destructive!,\r\n outline: styles.outline!,\r\n};\r\n\r\n/**\r\n * Represents the configurable props for the Badge component.\r\n *\r\n * @remarks\r\n * Extends standard `<div>` attributes so badges can expose data attributes, ARIA\r\n * state, and event handlers while preserving the library's visual variants.\r\n *\r\n * @default variant `\"default\"`\r\n */\r\nexport interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Additional CSS classes merged with the computed badge classes.\r\n */\r\n className?: string;\r\n /**\r\n * The visual variant used to communicate importance or status.\r\n *\r\n * @default \"default\"\r\n */\r\n variant?: BadgeVariant;\r\n}\r\n\r\n/**\r\n * Generates the CSS class list for a badge variant.\r\n *\r\n * @remarks\r\n * This utility is useful when another component needs badge styling but cannot render\r\n * the Badge component directly. It always includes the base badge classes.\r\n *\r\n * @example\r\n * ```tsx\r\n * <span className={badgeVariants({variant: \"outline\"})}>Beta</span>\r\n * ```\r\n *\r\n * @see {@link Badge}\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nfunction badgeVariants({variant = \"default\", className}: Readonly<BadgeVariantOptions> = {}): string {\r\n return cn(styles.badge, variantStyles[variant], className);\r\n}\r\n\r\n/**\r\n * A compact status label for surfacing metadata, categories, or state.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a styled `<div>` with pill-like spacing and variant-driven colors.\r\n * Use it for small, high-signal labels such as statuses, tags, or counters.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Badge variant=\"secondary\">New</Badge>\r\n * ```\r\n *\r\n * @see {@link badgeVariants} — Generates matching badge classes without rendering.\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(({className, variant = \"default\", ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={badgeVariants({variant, className})}\r\n {...props}\r\n />\r\n));\r\nBadge.displayName = \"Badge\";\r\n\r\nexport {Badge, badgeVariants};\r\n"],"names":["variantStyles","styles","badgeVariants","variant","className","cn","Badge","React","props","ref"],"mappings":";;;;AAgCA,MAAMA,gBAA8C;IAClD,SAASC,YAAAA,CAAAA,UAAc;IACvB,WAAWA,aAAAA,SAAgB;IAC3B,aAAaA,aAAAA,WAAkB;IAC/B,SAASA,aAAAA,OAAc;AACzB;AAuCA,SAASC,cAAc,EAACC,UAAU,SAAS,EAAEC,SAAS,EAAgC,GAAG,CAAC,CAAC;IACzF,OAAOC,GAAGJ,aAAAA,KAAY,EAAED,aAAa,CAACG,QAAQ,EAAEC;AAClD;AAmBA,MAAME,QAAQ,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/badge.js","sources":["../../../src/components/ui/badge.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./badge.module.css\";\r\n\r\n/**\r\n * Defines the supported visual treatments for the Badge component.\r\n */\r\nexport type BadgeVariant = \"default\" | \"secondary\" | \"destructive\" | \"outline\";\r\n\r\n/**\r\n * Represents the options accepted by the internal badge class generator.\r\n *\r\n * @remarks\r\n * This helper mirrors the public Badge styling API and exists so callers can derive\r\n * consistent class names without rendering the component itself.\r\n *\r\n * @default variant `\"default\"`\r\n */\r\ninterface BadgeVariantOptions {\r\n /**\r\n * The visual emphasis applied to the badge surface.\r\n *\r\n * @default \"default\"\r\n */\r\n variant?: BadgeVariant;\r\n /**\r\n * Additional CSS classes merged with the generated badge classes.\r\n */\r\n className?: string;\r\n}\r\n\r\nconst variantStyles: Record<BadgeVariant, string> = {\r\n default: styles.default!,\r\n secondary: styles.secondary!,\r\n destructive: styles.destructive!,\r\n outline: styles.outline!,\r\n};\r\n\r\n/**\r\n * Represents the configurable props for the Badge component.\r\n *\r\n * @remarks\r\n * Extends standard `<div>` attributes so badges can expose data attributes, ARIA\r\n * state, and event handlers while preserving the library's visual variants.\r\n *\r\n * @default variant `\"default\"`\r\n */\r\nexport interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Additional CSS classes merged with the computed badge classes.\r\n */\r\n className?: string;\r\n /**\r\n * The visual variant used to communicate importance or status.\r\n *\r\n * @default \"default\"\r\n */\r\n variant?: BadgeVariant;\r\n}\r\n\r\n/**\r\n * Generates the CSS class list for a badge variant.\r\n *\r\n * @remarks\r\n * This utility is useful when another component needs badge styling but cannot render\r\n * the Badge component directly. It always includes the base badge classes.\r\n *\r\n * @example\r\n * ```tsx\r\n * <span className={badgeVariants({variant: \"outline\"})}>Beta</span>\r\n * ```\r\n *\r\n * @see {@link Badge}\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nfunction badgeVariants({variant = \"default\", className}: Readonly<BadgeVariantOptions> = {}): string {\r\n return cn(styles.badge, variantStyles[variant], className);\r\n}\r\n\r\n/**\r\n * A compact status label for surfacing metadata, categories, or state.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a styled `<div>` with pill-like spacing and variant-driven colors.\r\n * Use it for small, high-signal labels such as statuses, tags, or counters.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Badge variant=\"secondary\">New</Badge>\r\n * ```\r\n *\r\n * @see {@link badgeVariants} — Generates matching badge classes without rendering.\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(({className, variant = \"default\", ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={badgeVariants({variant, className})}\r\n {...props}\r\n />\r\n));\r\nBadge.displayName = \"Badge\";\r\n\r\nexport {Badge, badgeVariants};\r\n"],"names":["variantStyles","styles","badgeVariants","variant","className","cn","Badge","React","props","ref"],"mappings":";;;;AAgCA,MAAMA,gBAA8C;IAClD,SAASC,YAAAA,CAAAA,UAAc;IACvB,WAAWA,aAAAA,SAAgB;IAC3B,aAAaA,aAAAA,WAAkB;IAC/B,SAASA,aAAAA,OAAc;AACzB;AAuCA,SAASC,cAAc,EAACC,UAAU,SAAS,EAAEC,SAAS,EAAgC,GAAG,CAAC,CAAC;IACzF,OAAOC,GAAGJ,aAAAA,KAAY,EAAED,aAAa,CAACG,QAAQ,EAAEC;AAClD;AAmBA,MAAME,QAAQ,WAAHA,GAAGC,wBAAAA,UAAgB,CAA6B,CAAC,EAACH,SAAS,EAAED,UAAU,SAAS,EAAE,GAAGK,OAAM,EAAEC,MAAAA,WAAAA,GACtG,IAAC;QACC,KAAKA;QACL,WAAWP,cAAc;YAACC;YAASC;QAAS;QAC3C,GAAGI,KAAK;;AAGbF,MAAM,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/badge.module.css","webpack://./src/components/ui/badge.module.css"],"names":[],"mappings":"AAAA;ECCE,kCAAkC;EAClC,4BAA4B;EAC5B,kCAAkC;EAClC,sFAAsF;EACtF,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,gBAAgB;EAChB,oBAAoB;;EDTiQ;ICYnR,oBAAoB;IACpB,cAAc;IACd,aAAa;IACb,cAAc;EAChB;AACF;;ADjB2V;ECoBzV,mCAAmC;EACnC,mCAAmC;EACnC,uBAAuB;;EDtB8a;IAAqB;MC0Btd,uEAAuE;IACzE;EACF;AACF;;AD7B6iB;ECgC3iB,qCAAqC;EACrC,qCAAqC;EACrC,uBAAuB;;EDlCsoB;IAAqB;MCsC9qB,yEAAyE;IAC3E;EACF;AACF;;ADzCuwB;EC4CrwB,uCAAuC;EACvC,2BAA2B;EAC3B,uBAAuB;;ED9C01B;IAAqB;MCkDl4B,2EAA2E;IAC7E;EACF;AACF;;ADrD69B;ECwD39B,kCAAkC;EAClC,2BAA2B;EAC3B,uBAAuB;AACzB","sourcesContent":[".badge{align-items:center;border-radius:var(--ac-radius-md);display:inline-flex;font-size:var(--ac-text-xs);font-weight:600;line-height:1.6;padding:.125rem var(--ac-space-2);transition:background-color var(--ac-transition-fast),color var(--ac-transition-fast);white-space:nowrap;& svg{flex-shrink:0;height:.75rem;pointer-events:none;width:.75rem}}.default{background-color:var(--ac-primary);border:1px solid transparent;color:var(--ac-primary-foreground);@media (hover:hover){&:hover{background-color:color-mix(in oklch,var(--ac-primary),transparent 20%)}}}.secondary{background-color:var(--ac-secondary);border:1px solid transparent;color:var(--ac-secondary-foreground);@media (hover:hover){&:hover{background-color:color-mix(in oklch,var(--ac-secondary),transparent 20%)}}}.destructive{background-color:var(--ac-destructive);border:1px solid transparent;color:var(--ac-background);@media (hover:hover){&:hover{background-color:color-mix(in oklch,var(--ac-destructive),transparent 20%)}}}.outline{background-color:transparent;border:1px solid var(--ac-border);color:var(--ac-foreground)}",".badge {\n border-radius: var(--ac-radius-md);\n font-size: var(--ac-text-xs);\n padding: .125rem var(--ac-space-2);\n transition: background-color var(--ac-transition-fast),color var(--ac-transition-fast);\n white-space: nowrap;\n align-items: center;\n font-weight: 600;\n line-height: 1.6;\n display: inline-flex;\n\n & svg {\n pointer-events: none;\n flex-shrink: 0;\n width: .75rem;\n height: .75rem;\n }\n}\n\n.default {\n background-color: var(--ac-primary);\n color: var(--ac-primary-foreground);\n border: 1px solid #0000;\n\n @media (hover: hover) {\n &:hover {\n background-color: color-mix(in oklch,var(--ac-primary),transparent 20%);\n }\n }\n}\n\n.secondary {\n background-color: var(--ac-secondary);\n color: var(--ac-secondary-foreground);\n border: 1px solid #0000;\n\n @media (hover: hover) {\n &:hover {\n background-color: color-mix(in oklch,var(--ac-secondary),transparent 20%);\n }\n }\n}\n\n.destructive {\n background-color: var(--ac-destructive);\n color: var(--ac-background);\n border: 1px solid #0000;\n\n @media (hover: hover) {\n &:hover {\n background-color: color-mix(in oklch,var(--ac-destructive),transparent 20%);\n }\n }\n}\n\n.outline {\n border: 1px solid var(--ac-border);\n color: var(--ac-foreground);\n background-color: #0000;\n}\n"],"sourceRoot":""}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
3
|
-
import { cloneElement, forwardRef, isValidElement } from "react";
|
|
4
3
|
import { cn } from "../../lib/utilities.js";
|
|
5
4
|
import breadcrumb_module from "./breadcrumb.module.js";
|
|
6
|
-
|
|
5
|
+
import * as __rspack_external_react from "react";
|
|
6
|
+
const Breadcrumb = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, separator: _separator, ...props }, ref)=>/*#__PURE__*/ jsx("nav", {
|
|
7
7
|
ref: ref,
|
|
8
8
|
"aria-label": "breadcrumb",
|
|
9
9
|
className: cn(breadcrumb_module.root, className),
|
|
10
10
|
...props
|
|
11
11
|
}));
|
|
12
|
-
const BreadcrumbList = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("ol", {
|
|
12
|
+
const BreadcrumbList = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("ol", {
|
|
13
13
|
ref: ref,
|
|
14
14
|
className: cn(breadcrumb_module.list, className),
|
|
15
15
|
...props
|
|
16
16
|
}));
|
|
17
|
-
const BreadcrumbItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("li", {
|
|
17
|
+
const BreadcrumbItem = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("li", {
|
|
18
18
|
ref: ref,
|
|
19
19
|
className: cn(breadcrumb_module.item, className),
|
|
20
20
|
...props
|
|
21
21
|
}));
|
|
22
|
-
const BreadcrumbLink = /*#__PURE__*/ forwardRef(({ asChild = false, className, children, ...props }, ref)=>{
|
|
22
|
+
const BreadcrumbLink = /*#__PURE__*/ __rspack_external_react.forwardRef(({ asChild = false, className, children, ...props }, ref)=>{
|
|
23
23
|
const mergedClassName = cn(breadcrumb_module.link, className);
|
|
24
|
-
if (asChild && /*#__PURE__*/ isValidElement(children)) {
|
|
24
|
+
if (asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children)) {
|
|
25
25
|
const child = children;
|
|
26
|
-
return /*#__PURE__*/ cloneElement(child, {
|
|
26
|
+
return /*#__PURE__*/ __rspack_external_react.cloneElement(child, {
|
|
27
27
|
...props,
|
|
28
28
|
ref,
|
|
29
29
|
className: cn(mergedClassName, child.props.className)
|
|
@@ -36,7 +36,7 @@ const BreadcrumbLink = /*#__PURE__*/ forwardRef(({ asChild = false, className, c
|
|
|
36
36
|
children: children
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
-
const BreadcrumbPage = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("span", {
|
|
39
|
+
const BreadcrumbPage = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("span", {
|
|
40
40
|
ref: ref,
|
|
41
41
|
role: "link",
|
|
42
42
|
"aria-current": "page",
|
|
@@ -44,7 +44,7 @@ const BreadcrumbPage = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>
|
|
|
44
44
|
className: cn(breadcrumb_module.page, className),
|
|
45
45
|
...props
|
|
46
46
|
}));
|
|
47
|
-
const BreadcrumbSeparator = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsx("li", {
|
|
47
|
+
const BreadcrumbSeparator = /*#__PURE__*/ __rspack_external_react.forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsx("li", {
|
|
48
48
|
ref: ref,
|
|
49
49
|
role: "presentation",
|
|
50
50
|
"aria-hidden": "true",
|
|
@@ -52,7 +52,7 @@ const BreadcrumbSeparator = /*#__PURE__*/ forwardRef(({ children, className, ...
|
|
|
52
52
|
...props,
|
|
53
53
|
children: children ?? /*#__PURE__*/ jsx(ChevronRight, {})
|
|
54
54
|
}));
|
|
55
|
-
const BreadcrumbEllipsis = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs("span", {
|
|
55
|
+
const BreadcrumbEllipsis = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs("span", {
|
|
56
56
|
ref: ref,
|
|
57
57
|
role: "presentation",
|
|
58
58
|
"aria-hidden": "true",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/breadcrumb.js","sources":["../../../src/components/ui/breadcrumb.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/label-has-associated-control */\r\n\r\nimport {ChevronRight, MoreHorizontal} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./breadcrumb.module.css\";\r\n\r\n/**\r\n * Props for the {@link Breadcrumb} component.\r\n */\r\nexport interface BreadcrumbProps extends React.ComponentPropsWithoutRef<\"nav\"> {\r\n /** Reserved separator content prop for custom breadcrumb compositions. @default undefined */\r\n separator?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Props for the {@link BreadcrumbList} component.\r\n */\r\nexport type BreadcrumbListProps = React.ComponentPropsWithoutRef<\"ol\">;\r\n\r\n/**\r\n * Props for the {@link BreadcrumbItem} component.\r\n */\r\nexport type BreadcrumbItemProps = React.ComponentPropsWithoutRef<\"li\">;\r\n\r\n/**\r\n * Props for the {@link BreadcrumbLink} component.\r\n */\r\nexport interface BreadcrumbLinkProps extends React.ComponentPropsWithoutRef<\"a\"> {\r\n /** Enables rendering an existing anchor-compatible child element. @default false */\r\n asChild?: boolean;\r\n}\r\n\r\n/**\r\n * Props for the {@link BreadcrumbPage} component.\r\n */\r\nexport type BreadcrumbPageProps = React.ComponentPropsWithoutRef<\"span\">;\r\n\r\n/**\r\n * Props for the {@link BreadcrumbSeparator} component.\r\n */\r\nexport type BreadcrumbSeparatorProps = React.ComponentPropsWithoutRef<\"li\">;\r\n\r\n/**\r\n * Props for the {@link BreadcrumbEllipsis} component.\r\n */\r\nexport type BreadcrumbEllipsisProps = React.ComponentPropsWithoutRef<\"span\">;\r\n\r\n/**\r\n * Provides semantic breadcrumb navigation for hierarchical page structures.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<nav>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <Breadcrumb>\r\n * <BreadcrumbList>\r\n * <BreadcrumbItem>\r\n * <BreadcrumbLink href='/'>Home</BreadcrumbLink>\r\n * </BreadcrumbItem>\r\n * </BreadcrumbList>\r\n * </Breadcrumb>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbProps} for available props\r\n */\r\nconst Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(\r\n ({className, separator: _separator, ...props}: Readonly<BreadcrumbProps>, ref): React.JSX.Element => (\r\n <nav\r\n ref={ref}\r\n aria-label='breadcrumb'\r\n className={cn(styles.root, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Groups breadcrumb items inside an ordered list.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<ol>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbList>\r\n * <BreadcrumbItem />\r\n * </BreadcrumbList>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbListProps} for available props\r\n */\r\nconst BreadcrumbList = React.forwardRef<HTMLOListElement, BreadcrumbListProps>(\r\n ({className, ...props}: Readonly<BreadcrumbListProps>, ref): React.JSX.Element => (\r\n <ol\r\n ref={ref}\r\n className={cn(styles.list, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Wraps a single breadcrumb node within the list.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<li>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbItem>\r\n * <BreadcrumbLink href='/docs'>Docs</BreadcrumbLink>\r\n * </BreadcrumbItem>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbItemProps} for available props\r\n */\r\nconst BreadcrumbItem = React.forwardRef<HTMLLIElement, BreadcrumbItemProps>(\r\n ({className, ...props}: Readonly<BreadcrumbItemProps>, ref): React.JSX.Element => (\r\n <li\r\n ref={ref}\r\n className={cn(styles.item, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders a navigable breadcrumb link with optional child element composition.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<a>` element by default\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbLink href='/settings'>Settings</BreadcrumbLink>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbLinkProps} for available props\r\n */\r\nconst BreadcrumbLink = React.forwardRef<HTMLAnchorElement, BreadcrumbLinkProps>(\r\n ({asChild = false, className, children, ...props}: Readonly<BreadcrumbLinkProps>, ref): React.JSX.Element => {\r\n const mergedClassName = cn(styles.link, className);\r\n\r\n if (asChild && React.isValidElement(children)) {\r\n const child = children as React.ReactElement<React.ComponentPropsWithoutRef<\"a\"> & {ref?: React.Ref<HTMLAnchorElement>}>;\r\n\r\n // eslint-disable-next-line react-x/no-clone-element -- replaces Radix Slot while preserving asChild prop merging\r\n return React.cloneElement(child, {\r\n ...props,\r\n ref,\r\n className: cn(mergedClassName, child.props.className),\r\n });\r\n }\r\n\r\n return (\r\n <a\r\n ref={ref}\r\n className={mergedClassName}\r\n {...props}>\r\n {children}\r\n </a>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Marks the current page within the breadcrumb trail.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<span>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbPage>Current page</BreadcrumbPage>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbPageProps} for available props\r\n */\r\nconst BreadcrumbPage = React.forwardRef<HTMLSpanElement, BreadcrumbPageProps>(\r\n ({className, ...props}: Readonly<BreadcrumbPageProps>, ref): React.JSX.Element => (\r\n <span\r\n ref={ref}\r\n role='link'\r\n aria-current='page'\r\n aria-disabled='true'\r\n className={cn(styles.page, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Displays visual separation between breadcrumb items.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<li>` element\r\n * - Defaults to a `ChevronRight` separator icon when `children` is not provided\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbSeparator />\r\n * ```\r\n *\r\n * @example Custom separator\r\n * ```tsx\r\n * <BreadcrumbSeparator>/</BreadcrumbSeparator>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbSeparatorProps} for available props\r\n */\r\nconst BreadcrumbSeparator = React.forwardRef<HTMLLIElement, BreadcrumbSeparatorProps>(\r\n ({children, className, ...props}: Readonly<BreadcrumbSeparatorProps>, ref): React.JSX.Element => (\r\n <li\r\n ref={ref}\r\n role='presentation'\r\n aria-hidden='true'\r\n className={cn(styles.separator, className)}\r\n {...props}>\r\n {children ?? <ChevronRight />}\r\n </li>\r\n ),\r\n);\r\n\r\n/**\r\n * Indicates collapsed breadcrumb items in truncated navigation trails.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<span>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbEllipsis />\r\n * ```\r\n *\r\n * @see {@link BreadcrumbEllipsisProps} for available props\r\n */\r\nconst BreadcrumbEllipsis = React.forwardRef<HTMLSpanElement, BreadcrumbEllipsisProps>(\r\n ({className, ...props}: Readonly<BreadcrumbEllipsisProps>, ref): React.JSX.Element => (\r\n <span\r\n ref={ref}\r\n role='presentation'\r\n aria-hidden='true'\r\n className={cn(styles.ellipsis, className)}\r\n {...props}>\r\n <MoreHorizontal />\r\n <span className={styles.srOnly}>More</span>\r\n </span>\r\n ),\r\n);\r\n\r\nBreadcrumb.displayName = \"Breadcrumb\";\r\nBreadcrumbList.displayName = \"BreadcrumbList\";\r\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\r\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\r\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\r\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\r\nBreadcrumbEllipsis.displayName = \"BreadcrumbEllipsis\";\r\n\r\nexport {Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator};\r\n"],"names":["Breadcrumb","React","className","_separator","props","ref","cn","styles","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","asChild","children","mergedClassName","child","BreadcrumbPage","BreadcrumbSeparator","ChevronRight","BreadcrumbEllipsis","MoreHorizontal"],"mappings":";;;;;AAsEA,MAAMA,aAAa,WAAHA,GAAGC,WACjB,CAAC,EAACC,SAAS,EAAE,WAAWC,UAAU,EAAE,GAAGC,OAAiC,EAAEC,MAAAA,WAAAA,GACxE,IAAC;QACC,KAAKA;QACL,cAAW;QACX,WAAWC,GAAGC,kBAAAA,IAAW,EAAEL;QAC1B,GAAGE,KAAK;;AAsBf,MAAMI,iBAAiB,WAAHA,GAAGP,WACrB,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAqC,EAAEC,MAAAA,WAAAA,GACrD,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,kBAAAA,IAAW,EAAEL;QAC1B,GAAGE,KAAK;;AAsBf,MAAMK,iBAAiB,WAAHA,GAAGR,WACrB,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAqC,EAAEC,MAAAA,WAAAA,GACrD,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,kBAAAA,IAAW,EAAEL;QAC1B,GAAGE,KAAK;;AAoBf,MAAMM,iBAAiB,WAAHA,GAAGT,WACrB,CAAC,EAACU,UAAU,KAAK,EAAET,SAAS,EAAEU,QAAQ,EAAE,GAAGR,OAAqC,EAAEC;IAChF,MAAMQ,kBAAkBP,GAAGC,kBAAAA,IAAW,EAAEL;IAExC,IAAIS,WAAW,WAAXA,GAAWV,eAAqBW,WAAW;QAC7C,MAAME,QAAQF;QAGd,OAAO,WAAP,GAAOX,aAAmBa,OAAO;YAC/B,GAAGV,KAAK;YACRC;YACA,WAAWC,GAAGO,iBAAiBC,MAAM,KAAK,CAAC,SAAS;QACtD;IACF;IAEA,OAAO,WAAP,GACE,IAAC;QACC,KAAKT;QACL,WAAWQ;QACV,GAAGT,KAAK;kBACRQ;;AAGP;AAkBF,MAAMG,iBAAiB,WAAHA,GAAGd,WACrB,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAqC,EAAEC,MAAAA,WAAAA,GACrD,IAAC;QACC,KAAKA;QACL,MAAK;QACL,gBAAa;QACb,iBAAc;QACd,WAAWC,GAAGC,kBAAAA,IAAW,EAAEL;QAC1B,GAAGE,KAAK;;AA0Bf,MAAMY,sBAAsB,WAAHA,GAAGf,WAC1B,CAAC,EAACW,QAAQ,EAAEV,SAAS,EAAE,GAAGE,OAA0C,EAAEC,MAAAA,WAAAA,GACpE,IAAC;QACC,KAAKA;QACL,MAAK;QACL,eAAY;QACZ,WAAWC,GAAGC,kBAAAA,SAAgB,EAAEL;QAC/B,GAAGE,KAAK;kBACRQ,YAAY,WAAZA,GAAY,IAACK,cAAYA,CAAAA;;AAoBhC,MAAMC,qBAAqB,WAAHA,GAAGjB,WACzB,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAyC,EAAEC,MAAAA,WAAAA,GACzD,KAAC;QACC,KAAKA;QACL,MAAK;QACL,eAAY;QACZ,WAAWC,GAAGC,kBAAAA,QAAe,EAAEL;QAC9B,GAAGE,KAAK;;0BACT,IAACe,gBAAcA,CAAAA;0BACf,IAAC;gBAAK,WAAWZ,kBAAAA,MAAa;0BAAE;;;;AAKtCP,WAAW,WAAW,GAAG;AACzBQ,eAAe,WAAW,GAAG;AAC7BC,eAAe,WAAW,GAAG;AAC7BC,eAAe,WAAW,GAAG;AAC7BK,eAAe,WAAW,GAAG;AAC7BC,oBAAoB,WAAW,GAAG;AAClCE,mBAAmB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/breadcrumb.js","sources":["../../../src/components/ui/breadcrumb.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/label-has-associated-control */\r\n\r\nimport {ChevronRight, MoreHorizontal} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./breadcrumb.module.css\";\r\n\r\n/**\r\n * Props for the {@link Breadcrumb} component.\r\n */\r\nexport interface BreadcrumbProps extends React.ComponentPropsWithoutRef<\"nav\"> {\r\n /** Reserved separator content prop for custom breadcrumb compositions. @default undefined */\r\n separator?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Props for the {@link BreadcrumbList} component.\r\n */\r\nexport type BreadcrumbListProps = React.ComponentPropsWithoutRef<\"ol\">;\r\n\r\n/**\r\n * Props for the {@link BreadcrumbItem} component.\r\n */\r\nexport type BreadcrumbItemProps = React.ComponentPropsWithoutRef<\"li\">;\r\n\r\n/**\r\n * Props for the {@link BreadcrumbLink} component.\r\n */\r\nexport interface BreadcrumbLinkProps extends React.ComponentPropsWithoutRef<\"a\"> {\r\n /** Enables rendering an existing anchor-compatible child element. @default false */\r\n asChild?: boolean;\r\n}\r\n\r\n/**\r\n * Props for the {@link BreadcrumbPage} component.\r\n */\r\nexport type BreadcrumbPageProps = React.ComponentPropsWithoutRef<\"span\">;\r\n\r\n/**\r\n * Props for the {@link BreadcrumbSeparator} component.\r\n */\r\nexport type BreadcrumbSeparatorProps = React.ComponentPropsWithoutRef<\"li\">;\r\n\r\n/**\r\n * Props for the {@link BreadcrumbEllipsis} component.\r\n */\r\nexport type BreadcrumbEllipsisProps = React.ComponentPropsWithoutRef<\"span\">;\r\n\r\n/**\r\n * Provides semantic breadcrumb navigation for hierarchical page structures.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<nav>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <Breadcrumb>\r\n * <BreadcrumbList>\r\n * <BreadcrumbItem>\r\n * <BreadcrumbLink href='/'>Home</BreadcrumbLink>\r\n * </BreadcrumbItem>\r\n * </BreadcrumbList>\r\n * </Breadcrumb>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbProps} for available props\r\n */\r\nconst Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(\r\n ({className, separator: _separator, ...props}: Readonly<BreadcrumbProps>, ref): React.JSX.Element => (\r\n <nav\r\n ref={ref}\r\n aria-label='breadcrumb'\r\n className={cn(styles.root, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Groups breadcrumb items inside an ordered list.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<ol>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbList>\r\n * <BreadcrumbItem />\r\n * </BreadcrumbList>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbListProps} for available props\r\n */\r\nconst BreadcrumbList = React.forwardRef<HTMLOListElement, BreadcrumbListProps>(\r\n ({className, ...props}: Readonly<BreadcrumbListProps>, ref): React.JSX.Element => (\r\n <ol\r\n ref={ref}\r\n className={cn(styles.list, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Wraps a single breadcrumb node within the list.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<li>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbItem>\r\n * <BreadcrumbLink href='/docs'>Docs</BreadcrumbLink>\r\n * </BreadcrumbItem>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbItemProps} for available props\r\n */\r\nconst BreadcrumbItem = React.forwardRef<HTMLLIElement, BreadcrumbItemProps>(\r\n ({className, ...props}: Readonly<BreadcrumbItemProps>, ref): React.JSX.Element => (\r\n <li\r\n ref={ref}\r\n className={cn(styles.item, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders a navigable breadcrumb link with optional child element composition.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<a>` element by default\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbLink href='/settings'>Settings</BreadcrumbLink>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbLinkProps} for available props\r\n */\r\nconst BreadcrumbLink = React.forwardRef<HTMLAnchorElement, BreadcrumbLinkProps>(\r\n ({asChild = false, className, children, ...props}: Readonly<BreadcrumbLinkProps>, ref): React.JSX.Element => {\r\n const mergedClassName = cn(styles.link, className);\r\n\r\n if (asChild && React.isValidElement(children)) {\r\n const child = children as React.ReactElement<React.ComponentPropsWithoutRef<\"a\"> & {ref?: React.Ref<HTMLAnchorElement>}>;\r\n\r\n // eslint-disable-next-line react-x/no-clone-element -- replaces Radix Slot while preserving asChild prop merging\r\n return React.cloneElement(child, {\r\n ...props,\r\n ref,\r\n className: cn(mergedClassName, child.props.className),\r\n });\r\n }\r\n\r\n return (\r\n <a\r\n ref={ref}\r\n className={mergedClassName}\r\n {...props}>\r\n {children}\r\n </a>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Marks the current page within the breadcrumb trail.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<span>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbPage>Current page</BreadcrumbPage>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbPageProps} for available props\r\n */\r\nconst BreadcrumbPage = React.forwardRef<HTMLSpanElement, BreadcrumbPageProps>(\r\n ({className, ...props}: Readonly<BreadcrumbPageProps>, ref): React.JSX.Element => (\r\n <span\r\n ref={ref}\r\n role='link'\r\n aria-current='page'\r\n aria-disabled='true'\r\n className={cn(styles.page, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Displays visual separation between breadcrumb items.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders an `<li>` element\r\n * - Defaults to a `ChevronRight` separator icon when `children` is not provided\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbSeparator />\r\n * ```\r\n *\r\n * @example Custom separator\r\n * ```tsx\r\n * <BreadcrumbSeparator>/</BreadcrumbSeparator>\r\n * ```\r\n *\r\n * @see {@link BreadcrumbSeparatorProps} for available props\r\n */\r\nconst BreadcrumbSeparator = React.forwardRef<HTMLLIElement, BreadcrumbSeparatorProps>(\r\n ({children, className, ...props}: Readonly<BreadcrumbSeparatorProps>, ref): React.JSX.Element => (\r\n <li\r\n ref={ref}\r\n role='presentation'\r\n aria-hidden='true'\r\n className={cn(styles.separator, className)}\r\n {...props}>\r\n {children ?? <ChevronRight />}\r\n </li>\r\n ),\r\n);\r\n\r\n/**\r\n * Indicates collapsed breadcrumb items in truncated navigation trails.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<span>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <BreadcrumbEllipsis />\r\n * ```\r\n *\r\n * @see {@link BreadcrumbEllipsisProps} for available props\r\n */\r\nconst BreadcrumbEllipsis = React.forwardRef<HTMLSpanElement, BreadcrumbEllipsisProps>(\r\n ({className, ...props}: Readonly<BreadcrumbEllipsisProps>, ref): React.JSX.Element => (\r\n <span\r\n ref={ref}\r\n role='presentation'\r\n aria-hidden='true'\r\n className={cn(styles.ellipsis, className)}\r\n {...props}>\r\n <MoreHorizontal />\r\n <span className={styles.srOnly}>More</span>\r\n </span>\r\n ),\r\n);\r\n\r\nBreadcrumb.displayName = \"Breadcrumb\";\r\nBreadcrumbList.displayName = \"BreadcrumbList\";\r\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\r\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\r\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\r\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\r\nBreadcrumbEllipsis.displayName = \"BreadcrumbEllipsis\";\r\n\r\nexport {Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator};\r\n"],"names":["Breadcrumb","React","className","_separator","props","ref","cn","styles","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","asChild","children","mergedClassName","child","BreadcrumbPage","BreadcrumbSeparator","ChevronRight","BreadcrumbEllipsis","MoreHorizontal"],"mappings":";;;;;AAsEA,MAAMA,aAAa,WAAHA,GAAGC,wBAAAA,UAAgB,CACjC,CAAC,EAACC,SAAS,EAAE,WAAWC,UAAU,EAAE,GAAGC,OAAiC,EAAEC,MAAAA,WAAAA,GACxE,IAAC;QACC,KAAKA;QACL,cAAW;QACX,WAAWC,GAAGC,kBAAAA,IAAW,EAAEL;QAC1B,GAAGE,KAAK;;AAsBf,MAAMI,iBAAiB,WAAHA,GAAGP,wBAAAA,UAAgB,CACrC,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAqC,EAAEC,MAAAA,WAAAA,GACrD,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,kBAAAA,IAAW,EAAEL;QAC1B,GAAGE,KAAK;;AAsBf,MAAMK,iBAAiB,WAAHA,GAAGR,wBAAAA,UAAgB,CACrC,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAqC,EAAEC,MAAAA,WAAAA,GACrD,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,kBAAAA,IAAW,EAAEL;QAC1B,GAAGE,KAAK;;AAoBf,MAAMM,iBAAiB,WAAHA,GAAGT,wBAAAA,UAAgB,CACrC,CAAC,EAACU,UAAU,KAAK,EAAET,SAAS,EAAEU,QAAQ,EAAE,GAAGR,OAAqC,EAAEC;IAChF,MAAMQ,kBAAkBP,GAAGC,kBAAAA,IAAW,EAAEL;IAExC,IAAIS,WAAW,WAAXA,GAAWV,wBAAAA,cAAoB,CAACW,WAAW;QAC7C,MAAME,QAAQF;QAGd,OAAO,WAAP,GAAOX,wBAAAA,YAAkB,CAACa,OAAO;YAC/B,GAAGV,KAAK;YACRC;YACA,WAAWC,GAAGO,iBAAiBC,MAAM,KAAK,CAAC,SAAS;QACtD;IACF;IAEA,OAAO,WAAP,GACE,IAAC;QACC,KAAKT;QACL,WAAWQ;QACV,GAAGT,KAAK;kBACRQ;;AAGP;AAkBF,MAAMG,iBAAiB,WAAHA,GAAGd,wBAAAA,UAAgB,CACrC,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAqC,EAAEC,MAAAA,WAAAA,GACrD,IAAC;QACC,KAAKA;QACL,MAAK;QACL,gBAAa;QACb,iBAAc;QACd,WAAWC,GAAGC,kBAAAA,IAAW,EAAEL;QAC1B,GAAGE,KAAK;;AA0Bf,MAAMY,sBAAsB,WAAHA,GAAGf,wBAAAA,UAAgB,CAC1C,CAAC,EAACW,QAAQ,EAAEV,SAAS,EAAE,GAAGE,OAA0C,EAAEC,MAAAA,WAAAA,GACpE,IAAC;QACC,KAAKA;QACL,MAAK;QACL,eAAY;QACZ,WAAWC,GAAGC,kBAAAA,SAAgB,EAAEL;QAC/B,GAAGE,KAAK;kBACRQ,YAAY,WAAZA,GAAY,IAACK,cAAYA,CAAAA;;AAoBhC,MAAMC,qBAAqB,WAAHA,GAAGjB,wBAAAA,UAAgB,CACzC,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAyC,EAAEC,MAAAA,WAAAA,GACzD,KAAC;QACC,KAAKA;QACL,MAAK;QACL,eAAY;QACZ,WAAWC,GAAGC,kBAAAA,QAAe,EAAEL;QAC9B,GAAGE,KAAK;;0BACT,IAACe,gBAAcA,CAAAA;0BACf,IAAC;gBAAK,WAAWZ,kBAAAA,MAAa;0BAAE;;;;AAKtCP,WAAW,WAAW,GAAG;AACzBQ,eAAe,WAAW,GAAG;AAC7BC,eAAe,WAAW,GAAG;AAC7BC,eAAe,WAAW,GAAG;AAC7BK,eAAe,WAAW,GAAG;AAC7BC,oBAAoB,WAAW,GAAG;AAClCE,mBAAmB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/breadcrumb.module.css","webpack://./src/components/ui/breadcrumb.module.css"],"names":[],"mappings":"AAAA;ECCE,cAAc;AAChB;;ADFoB;ECKlB,iCAAiC;EACjC,4BAA4B;EAC5B,mBAAmB;EACnB,sBAAsB;EACtB,sBAAsB;EACtB,eAAe;EACf,SAAS;EACT,UAAU;EACV,gBAAgB;EAChB,aAAa;AACf;;ADfqN;EAAyB;ICmB1O,gDAAgD;EAClD;AACF;;ADrBqS;ECwBnS,mBAAmB;EACnB,sBAAsB;EACtB,YAAY;EACZ,oBAAoB;AACtB;;AD5BoX;EC+BlX,cAAc;EACd,2CAA2C;EAC3C,qBAAqB;AACvB;;ADlCwc;EAAqB;ICsCzd,2BAA2B;EAC7B;AACF;;ADxCqgB;EC2CngB,2BAA2B;EAC3B,gBAAgB;AAClB;;AD7CsjB;ECgDpjB,iCAAiC;EACjC,cAAc;EACd,uBAAuB;EACvB,mBAAmB;EACnB,oBAAoB;AACtB;;ADrD8qB;ECwD5qB,cAAc;EACd,eAAe;AACjB;;AD1D0tB;EC6DxtB,iCAAiC;EACjC,yBAAyB;EACzB,wBAAwB;EACxB,cAAc;EACd,uBAAuB;EACvB,mBAAmB;EACnB,oBAAoB;EACpB,kBAAkB;AACpB;;ADrEo5B;ECwEl5B,WAAW;EACX,YAAY;AACd;;AD1Ey7B;EC6Ev7B,mBAAmB;EACnB,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,WAAW;EACX,YAAY;EACZ,UAAU;EACV,kBAAkB;EAClB,gBAAgB;AAClB","sourcesContent":[".root{display:block}.list{align-items:center;color:var(--ac-muted-foreground);display:flex;flex-wrap:wrap;font-size:var(--ac-text-sm);gap:var(--ac-space-2);list-style:none;margin:0;padding:0;word-break:break-word}@media (min-width:640px){.list{gap:calc(var(--ac-space-2) + var(--ac-space-1))}}.item{align-items:center;display:inline-flex;gap:var(--ac-space-2);min-width:0}.link{color:inherit;text-decoration:none;transition:color var(--ac-transition-fast)}@media (hover:hover){.link:hover{color:var(--ac-foreground)}}.page{color:var(--ac-foreground);font-weight:500}.separator{align-items:center;color:var(--ac-muted-foreground);display:inline-flex;flex-shrink:0;justify-content:center}.separator>svg{height:.875rem;width:.875rem}.ellipsis{align-items:center;color:var(--ac-muted-foreground);display:inline-flex;flex-shrink:0;height:var(--ac-size-lg);justify-content:center;position:relative;width:var(--ac-size-lg)}.ellipsis>svg{height:1rem;width:1rem}.srOnly{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0;white-space:nowrap}",".root {\n display: block;\n}\n\n.list {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-2);\n word-break: break-word;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n}\n\n@media (width >= 640px) {\n .list {\n gap: calc(var(--ac-space-2) + var(--ac-space-1));\n }\n}\n\n.item {\n align-items: center;\n gap: var(--ac-space-2);\n min-width: 0;\n display: inline-flex;\n}\n\n.link {\n color: inherit;\n transition: color var(--ac-transition-fast);\n text-decoration: none;\n}\n\n@media (hover: hover) {\n .link:hover {\n color: var(--ac-foreground);\n }\n}\n\n.page {\n color: var(--ac-foreground);\n font-weight: 500;\n}\n\n.separator {\n color: var(--ac-muted-foreground);\n flex-shrink: 0;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n}\n\n.separator > svg {\n width: .875rem;\n height: .875rem;\n}\n\n.ellipsis {\n color: var(--ac-muted-foreground);\n height: var(--ac-size-lg);\n width: var(--ac-size-lg);\n flex-shrink: 0;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n position: relative;\n}\n\n.ellipsis > svg {\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,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { motion, useMotionValue, useSpring } from "motion/react";
|
|
4
|
-
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
5
4
|
import { cn } from "../../lib/utilities.js";
|
|
6
5
|
import bubble_background_module from "./bubble-background.module.js";
|
|
7
|
-
|
|
6
|
+
import * as __rspack_external_react from "react";
|
|
7
|
+
const BubbleBackground = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, children, interactive = false, transition = {
|
|
8
8
|
stiffness: 100,
|
|
9
9
|
damping: 20
|
|
10
10
|
}, colors = {
|
|
@@ -15,13 +15,13 @@ const BubbleBackground = /*#__PURE__*/ forwardRef(({ className, children, intera
|
|
|
15
15
|
fifth: "180,180,50",
|
|
16
16
|
sixth: "140,100,255"
|
|
17
17
|
}, ...props }, ref)=>{
|
|
18
|
-
const containerRef = useRef(null);
|
|
19
|
-
useImperativeHandle(ref, ()=>containerRef.current, []);
|
|
18
|
+
const containerRef = __rspack_external_react.useRef(null);
|
|
19
|
+
__rspack_external_react.useImperativeHandle(ref, ()=>containerRef.current, []);
|
|
20
20
|
const mouseX = useMotionValue(0);
|
|
21
21
|
const mouseY = useMotionValue(0);
|
|
22
22
|
const springX = useSpring(mouseX, transition);
|
|
23
23
|
const springY = useSpring(mouseY, transition);
|
|
24
|
-
useEffect(()=>{
|
|
24
|
+
__rspack_external_react.useEffect(()=>{
|
|
25
25
|
if (!interactive) return;
|
|
26
26
|
const currentContainer = containerRef.current;
|
|
27
27
|
if (!currentContainer) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/bubble-background.js","sources":["../../../src/components/ui/bubble-background.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type SpringOptions, type Transition, useMotionValue, useSpring} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./bubble-background.module.css\";\r\n\r\n/** Configurable bubble color channels consumed by the CSS module. */\r\nexport interface BubbleBackgroundColors {\r\n /** Primary bubble RGB triplet. @default \"18,113,255\" */\r\n first: string;\r\n /** Secondary bubble RGB triplet. @default \"221,74,255\" */\r\n second: string;\r\n /** Tertiary bubble RGB triplet. @default \"0,220,255\" */\r\n third: string;\r\n /** Fourth bubble RGB triplet. @default \"200,50,50\" */\r\n fourth: string;\r\n /** Fifth bubble RGB triplet. @default \"180,180,50\" */\r\n fifth: string;\r\n /** Sixth bubble RGB triplet used by the interactive layer. @default \"140,100,255\" */\r\n sixth: string;\r\n}\r\n\r\n/** Props accepted by {@link BubbleBackground}. */\r\nexport interface BubbleBackgroundProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /** Enables mouse-following motion for the interactive bubble layer. @default false */\r\n interactive?: boolean;\r\n /** Spring configuration applied to the interactive bubble motion. @default {stiffness: 100, damping: 20} */\r\n transition?: SpringOptions;\r\n /** Overrides the CSS custom property color palette for the bubbles. @default {first: \"18,113,255\", second: \"221,74,255\", third: \"0,220,255\", fourth: \"200,50,50\", fifth: \"180,180,50\", sixth: \"140,100,255\"} */\r\n colors?: BubbleBackgroundColors;\r\n}\r\n\r\ntype BubbleStyleProperties = React.CSSProperties & {\r\n \"--ac-bubble-first-color\": string;\r\n \"--ac-bubble-second-color\": string;\r\n \"--ac-bubble-third-color\": string;\r\n \"--ac-bubble-fourth-color\": string;\r\n \"--ac-bubble-fifth-color\": string;\r\n \"--ac-bubble-sixth-color\": string;\r\n};\r\n\r\n/**\r\n * Renders drifting gradient bubbles with an optional interactive cursor follower.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<div>` 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 * <BubbleBackground interactive />\r\n * ```\r\n *\r\n * @see {@link BubbleBackgroundProps} for available props\r\n */\r\nconst BubbleBackground = React.forwardRef<HTMLDivElement, BubbleBackgroundProps>(\r\n (\r\n {\r\n className,\r\n children,\r\n interactive = false,\r\n transition = {stiffness: 100, damping: 20},\r\n colors = {\r\n first: \"18,113,255\",\r\n second: \"221,74,255\",\r\n third: \"0,220,255\",\r\n fourth: \"200,50,50\",\r\n fifth: \"180,180,50\",\r\n sixth: \"140,100,255\",\r\n },\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const containerRef = React.useRef<HTMLDivElement>(null);\r\n\r\n React.useImperativeHandle(ref, () => containerRef.current!, []);\r\n\r\n const mouseX = useMotionValue(0);\r\n const mouseY = useMotionValue(0);\r\n const springX = useSpring(mouseX, transition);\r\n const springY = useSpring(mouseY, transition);\r\n\r\n React.useEffect(() => {\r\n if (!interactive) {\r\n return;\r\n }\r\n\r\n const currentContainer = containerRef.current;\r\n if (!currentContainer) {\r\n return;\r\n }\r\n\r\n const handleMouseMove = (event: MouseEvent): void => {\r\n const rect = currentContainer.getBoundingClientRect();\r\n const centerX = rect.left + rect.width / 2;\r\n const centerY = rect.top + rect.height / 2;\r\n mouseX.set(event.clientX - centerX);\r\n mouseY.set(event.clientY - centerY);\r\n };\r\n\r\n currentContainer.addEventListener(\"mousemove\", handleMouseMove);\r\n\r\n return () => {\r\n currentContainer.removeEventListener(\"mousemove\", handleMouseMove);\r\n };\r\n }, [interactive, mouseX, mouseY]);\r\n\r\n const style: BubbleStyleProperties = {\r\n \"--ac-bubble-first-color\": colors.first,\r\n \"--ac-bubble-second-color\": colors.second,\r\n \"--ac-bubble-third-color\": colors.third,\r\n \"--ac-bubble-fourth-color\": colors.fourth,\r\n \"--ac-bubble-fifth-color\": colors.fifth,\r\n \"--ac-bubble-sixth-color\": colors.sixth,\r\n };\r\n\r\n return (\r\n <div\r\n ref={containerRef}\r\n className={cn(styles.root, className)}\r\n style={style}\r\n {...props}>\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={styles.hiddenSvg}\r\n aria-hidden='true'>\r\n <defs>\r\n <filter id='goo'>\r\n <feGaussianBlur\r\n in='SourceGraphic'\r\n stdDeviation='10'\r\n result='blur'\r\n />\r\n <feColorMatrix\r\n in='blur'\r\n mode='matrix'\r\n values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -8'\r\n result='goo'\r\n />\r\n <feBlend\r\n in='SourceGraphic'\r\n in2='goo'\r\n />\r\n </filter>\r\n </defs>\r\n </svg>\r\n\r\n <div className={styles.filterLayer}>\r\n <motion.div\r\n className={cn(styles.bubble, styles.bubbleFirst)}\r\n animate={{y: [-50, 50, -50]}}\r\n transition={{duration: 30, ease: \"easeInOut\", repeat: Infinity}}\r\n />\r\n\r\n <motion.div\r\n className={cn(styles.rotator, styles.rotatorSecond)}\r\n animate={{rotate: 360}}\r\n transition={\r\n {\r\n duration: 20,\r\n ease: \"linear\",\r\n repeat: Infinity,\r\n repeatType: \"reverse\",\r\n } satisfies Transition\r\n }>\r\n <div className={cn(styles.bubble, styles.bubbleSecond)} />\r\n </motion.div>\r\n\r\n <motion.div\r\n className={cn(styles.rotator, styles.rotatorThird)}\r\n animate={{rotate: 360}}\r\n transition={{duration: 40, ease: \"linear\", repeat: Infinity}}>\r\n <div className={cn(styles.bubble, styles.bubbleThird)} />\r\n </motion.div>\r\n\r\n <motion.div\r\n className={cn(styles.bubble, styles.bubbleFourth)}\r\n animate={{x: [-50, 50, -50]}}\r\n transition={{duration: 40, ease: \"easeInOut\", repeat: Infinity}}\r\n />\r\n\r\n <motion.div\r\n className={cn(styles.rotator, styles.rotatorFifth)}\r\n animate={{rotate: 360}}\r\n transition={{duration: 20, ease: \"linear\", repeat: Infinity}}>\r\n <div className={cn(styles.bubble, styles.bubbleFifth)} />\r\n </motion.div>\r\n\r\n {interactive ? (\r\n <motion.div\r\n className={cn(styles.bubble, styles.bubbleInteractive)}\r\n style={{x: springX, y: springY}}\r\n />\r\n ) : null}\r\n </div>\r\n\r\n {children}\r\n </div>\r\n );\r\n },\r\n);\r\n\r\nBubbleBackground.displayName = \"BubbleBackground\";\r\n\r\nexport {BubbleBackground};\r\n"],"names":["BubbleBackground","React","className","children","interactive","transition","colors","props","ref","containerRef","mouseX","useMotionValue","mouseY","springX","useSpring","springY","currentContainer","handleMouseMove","event","rect","centerX","centerY","style","cn","styles","motion","Infinity"],"mappings":";;;;;;AA2DA,MAAMA,mBAAmB,WAAHA,GAAGC,WACvB,CACE,EACEC,SAAS,EACTC,QAAQ,EACRC,cAAc,KAAK,EACnBC,aAAa;IAAC,WAAW;IAAK,SAAS;AAAE,CAAC,EAC1CC,SAAS;IACP,OAAO;IACP,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,OAAO;IACP,OAAO;AACT,CAAC,EACD,GAAGC,OACJ,EACDC;IAEA,MAAMC,eAAeR,OAA6B;IAElDA,oBAA0BO,KAAK,IAAMC,aAAa,OAAO,EAAG,EAAE;IAE9D,MAAMC,SAASC,eAAe;IAC9B,MAAMC,SAASD,eAAe;IAC9B,MAAME,UAAUC,UAAUJ,QAAQL;IAClC,MAAMU,UAAUD,UAAUF,QAAQP;IAElCJ,UAAgB;QACd,IAAI,CAACG,aACH;QAGF,MAAMY,mBAAmBP,aAAa,OAAO;QAC7C,IAAI,CAACO,kBACH;QAGF,MAAMC,kBAAkB,CAACC;YACvB,MAAMC,OAAOH,iBAAiB,qBAAqB;YACnD,MAAMI,UAAUD,KAAK,IAAI,GAAGA,KAAK,KAAK,GAAG;YACzC,MAAME,UAAUF,KAAK,GAAG,GAAGA,KAAK,MAAM,GAAG;YACzCT,OAAO,GAAG,CAACQ,MAAM,OAAO,GAAGE;YAC3BR,OAAO,GAAG,CAACM,MAAM,OAAO,GAAGG;QAC7B;QAEAL,iBAAiB,gBAAgB,CAAC,aAAaC;QAE/C,OAAO;YACLD,iBAAiB,mBAAmB,CAAC,aAAaC;QACpD;IACF,GAAG;QAACb;QAAaM;QAAQE;KAAO;IAEhC,MAAMU,QAA+B;QACnC,2BAA2BhB,OAAO,KAAK;QACvC,4BAA4BA,OAAO,MAAM;QACzC,2BAA2BA,OAAO,KAAK;QACvC,4BAA4BA,OAAO,MAAM;QACzC,2BAA2BA,OAAO,KAAK;QACvC,2BAA2BA,OAAO,KAAK;IACzC;IAEA,OAAO,WAAP,GACE,KAAC;QACC,KAAKG;QACL,WAAWc,GAAGC,yBAAAA,IAAW,EAAEtB;QAC3B,OAAOoB;QACN,GAAGf,KAAK;;0BACT,IAAC;gBACC,OAAM;gBACN,WAAWiB,yBAAAA,SAAgB;gBAC3B,eAAY;0BACZ,kBAAC;8BACC,mBAAC;wBAAO,IAAG;;0CACT,IAAC;gCACC,IAAG;gCACH,cAAa;gCACb,QAAO;;0CAET,IAAC;gCACC,IAAG;gCACH,MAAK;gCACL,QAAO;gCACP,QAAO;;0CAET,IAAC;gCACC,IAAG;gCACH,KAAI;;;;;;0BAMZ,KAAC;gBAAI,WAAWA,yBAAAA,WAAkB;;kCAChC,IAACC,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,WAAkB;wBAC/C,SAAS;4BAAC,GAAG;gCAAC;gCAAK;gCAAI;6BAAI;wBAAA;wBAC3B,YAAY;4BAAC,UAAU;4BAAI,MAAM;4BAAa,QAAQE;wBAAQ;;kCAGhE,IAACD,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,OAAc,EAAEA,yBAAAA,aAAoB;wBAClD,SAAS;4BAAC,QAAQ;wBAAG;wBACrB,YACE;4BACE,UAAU;4BACV,MAAM;4BACN,QAAQE;4BACR,YAAY;wBACd;kCAEF,kBAAC;4BAAI,WAAWH,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,YAAmB;;;kCAGvD,IAACC,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,OAAc,EAAEA,yBAAAA,YAAmB;wBACjD,SAAS;4BAAC,QAAQ;wBAAG;wBACrB,YAAY;4BAAC,UAAU;4BAAI,MAAM;4BAAU,QAAQE;wBAAQ;kCAC3D,kBAAC;4BAAI,WAAWH,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,WAAkB;;;kCAGtD,IAACC,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,YAAmB;wBAChD,SAAS;4BAAC,GAAG;gCAAC;gCAAK;gCAAI;6BAAI;wBAAA;wBAC3B,YAAY;4BAAC,UAAU;4BAAI,MAAM;4BAAa,QAAQE;wBAAQ;;kCAGhE,IAACD,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,OAAc,EAAEA,yBAAAA,YAAmB;wBACjD,SAAS;4BAAC,QAAQ;wBAAG;wBACrB,YAAY;4BAAC,UAAU;4BAAI,MAAM;4BAAU,QAAQE;wBAAQ;kCAC3D,kBAAC;4BAAI,WAAWH,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,WAAkB;;;oBAGrDpB,cAAc,WAAdA,GACC,IAACqB,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,iBAAwB;wBACrD,OAAO;4BAAC,GAAGX;4BAAS,GAAGE;wBAAO;yBAE9B;;;YAGLZ;;;AAGP;AAGFH,iBAAiB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/bubble-background.js","sources":["../../../src/components/ui/bubble-background.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type SpringOptions, type Transition, useMotionValue, useSpring} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./bubble-background.module.css\";\r\n\r\n/** Configurable bubble color channels consumed by the CSS module. */\r\nexport interface BubbleBackgroundColors {\r\n /** Primary bubble RGB triplet. @default \"18,113,255\" */\r\n first: string;\r\n /** Secondary bubble RGB triplet. @default \"221,74,255\" */\r\n second: string;\r\n /** Tertiary bubble RGB triplet. @default \"0,220,255\" */\r\n third: string;\r\n /** Fourth bubble RGB triplet. @default \"200,50,50\" */\r\n fourth: string;\r\n /** Fifth bubble RGB triplet. @default \"180,180,50\" */\r\n fifth: string;\r\n /** Sixth bubble RGB triplet used by the interactive layer. @default \"140,100,255\" */\r\n sixth: string;\r\n}\r\n\r\n/** Props accepted by {@link BubbleBackground}. */\r\nexport interface BubbleBackgroundProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /** Enables mouse-following motion for the interactive bubble layer. @default false */\r\n interactive?: boolean;\r\n /** Spring configuration applied to the interactive bubble motion. @default {stiffness: 100, damping: 20} */\r\n transition?: SpringOptions;\r\n /** Overrides the CSS custom property color palette for the bubbles. @default {first: \"18,113,255\", second: \"221,74,255\", third: \"0,220,255\", fourth: \"200,50,50\", fifth: \"180,180,50\", sixth: \"140,100,255\"} */\r\n colors?: BubbleBackgroundColors;\r\n}\r\n\r\ntype BubbleStyleProperties = React.CSSProperties & {\r\n \"--ac-bubble-first-color\": string;\r\n \"--ac-bubble-second-color\": string;\r\n \"--ac-bubble-third-color\": string;\r\n \"--ac-bubble-fourth-color\": string;\r\n \"--ac-bubble-fifth-color\": string;\r\n \"--ac-bubble-sixth-color\": string;\r\n};\r\n\r\n/**\r\n * Renders drifting gradient bubbles with an optional interactive cursor follower.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<div>` 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 * <BubbleBackground interactive />\r\n * ```\r\n *\r\n * @see {@link BubbleBackgroundProps} for available props\r\n */\r\nconst BubbleBackground = React.forwardRef<HTMLDivElement, BubbleBackgroundProps>(\r\n (\r\n {\r\n className,\r\n children,\r\n interactive = false,\r\n transition = {stiffness: 100, damping: 20},\r\n colors = {\r\n first: \"18,113,255\",\r\n second: \"221,74,255\",\r\n third: \"0,220,255\",\r\n fourth: \"200,50,50\",\r\n fifth: \"180,180,50\",\r\n sixth: \"140,100,255\",\r\n },\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const containerRef = React.useRef<HTMLDivElement>(null);\r\n\r\n React.useImperativeHandle(ref, () => containerRef.current!, []);\r\n\r\n const mouseX = useMotionValue(0);\r\n const mouseY = useMotionValue(0);\r\n const springX = useSpring(mouseX, transition);\r\n const springY = useSpring(mouseY, transition);\r\n\r\n React.useEffect(() => {\r\n if (!interactive) {\r\n return;\r\n }\r\n\r\n const currentContainer = containerRef.current;\r\n if (!currentContainer) {\r\n return;\r\n }\r\n\r\n const handleMouseMove = (event: MouseEvent): void => {\r\n const rect = currentContainer.getBoundingClientRect();\r\n const centerX = rect.left + rect.width / 2;\r\n const centerY = rect.top + rect.height / 2;\r\n mouseX.set(event.clientX - centerX);\r\n mouseY.set(event.clientY - centerY);\r\n };\r\n\r\n currentContainer.addEventListener(\"mousemove\", handleMouseMove);\r\n\r\n return () => {\r\n currentContainer.removeEventListener(\"mousemove\", handleMouseMove);\r\n };\r\n }, [interactive, mouseX, mouseY]);\r\n\r\n const style: BubbleStyleProperties = {\r\n \"--ac-bubble-first-color\": colors.first,\r\n \"--ac-bubble-second-color\": colors.second,\r\n \"--ac-bubble-third-color\": colors.third,\r\n \"--ac-bubble-fourth-color\": colors.fourth,\r\n \"--ac-bubble-fifth-color\": colors.fifth,\r\n \"--ac-bubble-sixth-color\": colors.sixth,\r\n };\r\n\r\n return (\r\n <div\r\n ref={containerRef}\r\n className={cn(styles.root, className)}\r\n style={style}\r\n {...props}>\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={styles.hiddenSvg}\r\n aria-hidden='true'>\r\n <defs>\r\n <filter id='goo'>\r\n <feGaussianBlur\r\n in='SourceGraphic'\r\n stdDeviation='10'\r\n result='blur'\r\n />\r\n <feColorMatrix\r\n in='blur'\r\n mode='matrix'\r\n values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -8'\r\n result='goo'\r\n />\r\n <feBlend\r\n in='SourceGraphic'\r\n in2='goo'\r\n />\r\n </filter>\r\n </defs>\r\n </svg>\r\n\r\n <div className={styles.filterLayer}>\r\n <motion.div\r\n className={cn(styles.bubble, styles.bubbleFirst)}\r\n animate={{y: [-50, 50, -50]}}\r\n transition={{duration: 30, ease: \"easeInOut\", repeat: Infinity}}\r\n />\r\n\r\n <motion.div\r\n className={cn(styles.rotator, styles.rotatorSecond)}\r\n animate={{rotate: 360}}\r\n transition={\r\n {\r\n duration: 20,\r\n ease: \"linear\",\r\n repeat: Infinity,\r\n repeatType: \"reverse\",\r\n } satisfies Transition\r\n }>\r\n <div className={cn(styles.bubble, styles.bubbleSecond)} />\r\n </motion.div>\r\n\r\n <motion.div\r\n className={cn(styles.rotator, styles.rotatorThird)}\r\n animate={{rotate: 360}}\r\n transition={{duration: 40, ease: \"linear\", repeat: Infinity}}>\r\n <div className={cn(styles.bubble, styles.bubbleThird)} />\r\n </motion.div>\r\n\r\n <motion.div\r\n className={cn(styles.bubble, styles.bubbleFourth)}\r\n animate={{x: [-50, 50, -50]}}\r\n transition={{duration: 40, ease: \"easeInOut\", repeat: Infinity}}\r\n />\r\n\r\n <motion.div\r\n className={cn(styles.rotator, styles.rotatorFifth)}\r\n animate={{rotate: 360}}\r\n transition={{duration: 20, ease: \"linear\", repeat: Infinity}}>\r\n <div className={cn(styles.bubble, styles.bubbleFifth)} />\r\n </motion.div>\r\n\r\n {interactive ? (\r\n <motion.div\r\n className={cn(styles.bubble, styles.bubbleInteractive)}\r\n style={{x: springX, y: springY}}\r\n />\r\n ) : null}\r\n </div>\r\n\r\n {children}\r\n </div>\r\n );\r\n },\r\n);\r\n\r\nBubbleBackground.displayName = \"BubbleBackground\";\r\n\r\nexport {BubbleBackground};\r\n"],"names":["BubbleBackground","React","className","children","interactive","transition","colors","props","ref","containerRef","mouseX","useMotionValue","mouseY","springX","useSpring","springY","currentContainer","handleMouseMove","event","rect","centerX","centerY","style","cn","styles","motion","Infinity"],"mappings":";;;;;;AA2DA,MAAMA,mBAAmB,WAAHA,GAAGC,wBAAAA,UAAgB,CACvC,CACE,EACEC,SAAS,EACTC,QAAQ,EACRC,cAAc,KAAK,EACnBC,aAAa;IAAC,WAAW;IAAK,SAAS;AAAE,CAAC,EAC1CC,SAAS;IACP,OAAO;IACP,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,OAAO;IACP,OAAO;AACT,CAAC,EACD,GAAGC,OACJ,EACDC;IAEA,MAAMC,eAAeR,wBAAAA,MAAY,CAAiB;IAElDA,wBAAAA,mBAAyB,CAACO,KAAK,IAAMC,aAAa,OAAO,EAAG,EAAE;IAE9D,MAAMC,SAASC,eAAe;IAC9B,MAAMC,SAASD,eAAe;IAC9B,MAAME,UAAUC,UAAUJ,QAAQL;IAClC,MAAMU,UAAUD,UAAUF,QAAQP;IAElCJ,wBAAAA,SAAe,CAAC;QACd,IAAI,CAACG,aACH;QAGF,MAAMY,mBAAmBP,aAAa,OAAO;QAC7C,IAAI,CAACO,kBACH;QAGF,MAAMC,kBAAkB,CAACC;YACvB,MAAMC,OAAOH,iBAAiB,qBAAqB;YACnD,MAAMI,UAAUD,KAAK,IAAI,GAAGA,KAAK,KAAK,GAAG;YACzC,MAAME,UAAUF,KAAK,GAAG,GAAGA,KAAK,MAAM,GAAG;YACzCT,OAAO,GAAG,CAACQ,MAAM,OAAO,GAAGE;YAC3BR,OAAO,GAAG,CAACM,MAAM,OAAO,GAAGG;QAC7B;QAEAL,iBAAiB,gBAAgB,CAAC,aAAaC;QAE/C,OAAO;YACLD,iBAAiB,mBAAmB,CAAC,aAAaC;QACpD;IACF,GAAG;QAACb;QAAaM;QAAQE;KAAO;IAEhC,MAAMU,QAA+B;QACnC,2BAA2BhB,OAAO,KAAK;QACvC,4BAA4BA,OAAO,MAAM;QACzC,2BAA2BA,OAAO,KAAK;QACvC,4BAA4BA,OAAO,MAAM;QACzC,2BAA2BA,OAAO,KAAK;QACvC,2BAA2BA,OAAO,KAAK;IACzC;IAEA,OAAO,WAAP,GACE,KAAC;QACC,KAAKG;QACL,WAAWc,GAAGC,yBAAAA,IAAW,EAAEtB;QAC3B,OAAOoB;QACN,GAAGf,KAAK;;0BACT,IAAC;gBACC,OAAM;gBACN,WAAWiB,yBAAAA,SAAgB;gBAC3B,eAAY;0BACZ,kBAAC;8BACC,mBAAC;wBAAO,IAAG;;0CACT,IAAC;gCACC,IAAG;gCACH,cAAa;gCACb,QAAO;;0CAET,IAAC;gCACC,IAAG;gCACH,MAAK;gCACL,QAAO;gCACP,QAAO;;0CAET,IAAC;gCACC,IAAG;gCACH,KAAI;;;;;;0BAMZ,KAAC;gBAAI,WAAWA,yBAAAA,WAAkB;;kCAChC,IAACC,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,WAAkB;wBAC/C,SAAS;4BAAC,GAAG;gCAAC;gCAAK;gCAAI;6BAAI;wBAAA;wBAC3B,YAAY;4BAAC,UAAU;4BAAI,MAAM;4BAAa,QAAQE;wBAAQ;;kCAGhE,IAACD,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,OAAc,EAAEA,yBAAAA,aAAoB;wBAClD,SAAS;4BAAC,QAAQ;wBAAG;wBACrB,YACE;4BACE,UAAU;4BACV,MAAM;4BACN,QAAQE;4BACR,YAAY;wBACd;kCAEF,kBAAC;4BAAI,WAAWH,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,YAAmB;;;kCAGvD,IAACC,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,OAAc,EAAEA,yBAAAA,YAAmB;wBACjD,SAAS;4BAAC,QAAQ;wBAAG;wBACrB,YAAY;4BAAC,UAAU;4BAAI,MAAM;4BAAU,QAAQE;wBAAQ;kCAC3D,kBAAC;4BAAI,WAAWH,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,WAAkB;;;kCAGtD,IAACC,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,YAAmB;wBAChD,SAAS;4BAAC,GAAG;gCAAC;gCAAK;gCAAI;6BAAI;wBAAA;wBAC3B,YAAY;4BAAC,UAAU;4BAAI,MAAM;4BAAa,QAAQE;wBAAQ;;kCAGhE,IAACD,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,OAAc,EAAEA,yBAAAA,YAAmB;wBACjD,SAAS;4BAAC,QAAQ;wBAAG;wBACrB,YAAY;4BAAC,UAAU;4BAAI,MAAM;4BAAU,QAAQE;wBAAQ;kCAC3D,kBAAC;4BAAI,WAAWH,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,WAAkB;;;oBAGrDpB,cAAc,WAAdA,GACC,IAACqB,OAAO,GAAG;wBACT,WAAWF,GAAGC,yBAAAA,MAAa,EAAEA,yBAAAA,iBAAwB;wBACrD,OAAO;4BAAC,GAAGX;4BAAS,GAAGE;wBAAO;yBAE9B;;;YAGLZ;;;AAGP;AAGFH,iBAAiB,WAAW,GAAG"}
|