@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,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useInView, useMotionValue, useSpring } from "motion/react";
|
|
4
|
-
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
5
4
|
import { cn } from "../../lib/utilities.js";
|
|
6
5
|
import counting_number_module from "./counting-number.module.js";
|
|
7
|
-
|
|
6
|
+
import * as __rspack_external_react from "react";
|
|
7
|
+
const CountingNumber = /*#__PURE__*/ __rspack_external_react.forwardRef(({ number, fromNumber = 0, padStart = false, inView = false, inViewMargin = "0px", inViewOnce = true, decimalSeparator = ".", transition = {
|
|
8
8
|
stiffness: 90,
|
|
9
9
|
damping: 50
|
|
10
10
|
}, decimalPlaces = 0, className, ...props }, ref)=>{
|
|
11
|
-
const localRef = useRef(null);
|
|
12
|
-
useImperativeHandle(ref, ()=>localRef.current, []);
|
|
11
|
+
const localRef = __rspack_external_react.useRef(null);
|
|
12
|
+
__rspack_external_react.useImperativeHandle(ref, ()=>localRef.current, []);
|
|
13
13
|
const numberStr = number.toString();
|
|
14
14
|
const decimals = numberStr.includes(".") ? numberStr.split(".")[1]?.length ?? 0 : 0;
|
|
15
15
|
const resolvedDecimalPlaces = "number" == typeof decimalPlaces ? decimalPlaces : decimals;
|
|
@@ -20,14 +20,14 @@ const CountingNumber = /*#__PURE__*/ forwardRef(({ number, fromNumber = 0, padSt
|
|
|
20
20
|
margin: inViewMargin
|
|
21
21
|
});
|
|
22
22
|
const isInView = !inView || inViewResult;
|
|
23
|
-
useEffect(()=>{
|
|
23
|
+
__rspack_external_react.useEffect(()=>{
|
|
24
24
|
if (isInView) motionValue.set(number);
|
|
25
25
|
}, [
|
|
26
26
|
isInView,
|
|
27
27
|
motionValue,
|
|
28
28
|
number
|
|
29
29
|
]);
|
|
30
|
-
useEffect(()=>{
|
|
30
|
+
__rspack_external_react.useEffect(()=>{
|
|
31
31
|
const unsubscribe = springValue.on("change", (latest)=>{
|
|
32
32
|
if (!localRef.current) return;
|
|
33
33
|
let formatted = resolvedDecimalPlaces > 0 ? latest.toFixed(resolvedDecimalPlaces) : Math.round(latest).toString();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/counting-number.js","sources":["../../../src/components/ui/counting-number.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {useInView, useMotionValue, useSpring, type SpringOptions, type UseInViewOptions} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./counting-number.module.css\";\r\n\r\n/** Props accepted by {@link CountingNumber}. */\r\nexport interface CountingNumberProps extends React.HTMLAttributes<HTMLSpanElement> {\r\n /** Final numeric value to animate toward. @default undefined */\r\n number: number;\r\n /** Initial numeric value used before the spring animation starts. @default 0 */\r\n fromNumber?: number;\r\n /** Pads the integer portion so it matches the target value width. @default false */\r\n padStart?: boolean;\r\n /** Delays the animation until the element enters the viewport. @default false */\r\n inView?: boolean;\r\n /** Margin passed to the in-view observer when `inView` is enabled. @default \"0px\" */\r\n inViewMargin?: UseInViewOptions[\"margin\"];\r\n /** Prevents the in-view animation from replaying after the first reveal. @default true */\r\n inViewOnce?: boolean;\r\n /** Character used between the integer and decimal portions. @default \".\" */\r\n decimalSeparator?: string;\r\n /** Spring physics applied to the counting animation. @default {stiffness: 90, damping: 50} */\r\n transition?: SpringOptions;\r\n /** Number of decimal places rendered during the animation. @default 0 */\r\n decimalPlaces?: number;\r\n}\r\n\r\n/**\r\n * Animates a number value with a spring and writes the formatted value into a span.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<span>` 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 * <CountingNumber number={1250} />\r\n * ```\r\n *\r\n * @see {@link CountingNumberProps} for available props\r\n */\r\nconst CountingNumber = React.forwardRef<HTMLSpanElement, CountingNumberProps>(\r\n (\r\n {\r\n number,\r\n fromNumber = 0,\r\n padStart = false,\r\n inView = false,\r\n inViewMargin = \"0px\",\r\n inViewOnce = true,\r\n decimalSeparator = \".\",\r\n transition = {stiffness: 90, damping: 50},\r\n decimalPlaces = 0,\r\n className,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const localRef = React.useRef<HTMLSpanElement>(null);\r\n\r\n React.useImperativeHandle(ref, () => localRef.current!, []);\r\n\r\n const numberStr = number.toString();\r\n const decimals = numberStr.includes(\".\") ? (numberStr.split(\".\")[1]?.length ?? 0) : 0;\r\n const resolvedDecimalPlaces = typeof decimalPlaces === \"number\" ? decimalPlaces : decimals;\r\n\r\n const motionValue = useMotionValue(fromNumber);\r\n const springValue = useSpring(motionValue, transition);\r\n const inViewResult = useInView(localRef, {\r\n once: inViewOnce,\r\n margin: inViewMargin,\r\n });\r\n const isInView = !inView || inViewResult;\r\n\r\n React.useEffect(() => {\r\n if (isInView) {\r\n motionValue.set(number);\r\n }\r\n }, [isInView, motionValue, number]);\r\n\r\n React.useEffect(() => {\r\n const unsubscribe = springValue.on(\"change\", (latest) => {\r\n if (!localRef.current) {\r\n return;\r\n }\r\n\r\n let formatted = resolvedDecimalPlaces > 0 ? latest.toFixed(resolvedDecimalPlaces) : Math.round(latest).toString();\r\n\r\n if (resolvedDecimalPlaces > 0) {\r\n formatted = formatted.replace(\".\", decimalSeparator);\r\n }\r\n\r\n if (padStart) {\r\n const finalIntegerLength = Math.floor(Math.abs(number)).toString().length;\r\n const [integerPart, fractionPart] = formatted.split(decimalSeparator);\r\n const paddedInteger = integerPart.padStart(finalIntegerLength, \"0\");\r\n formatted = fractionPart ? `${paddedInteger}${decimalSeparator}${fractionPart}` : paddedInteger;\r\n }\r\n\r\n localRef.current.textContent = formatted;\r\n });\r\n\r\n return () => {\r\n unsubscribe();\r\n };\r\n }, [decimalSeparator, number, padStart, resolvedDecimalPlaces, springValue]);\r\n\r\n const finalIntegerLength = Math.floor(Math.abs(number)).toString().length;\r\n const suffix = resolvedDecimalPlaces > 0 ? `${decimalSeparator}${\"0\".repeat(resolvedDecimalPlaces)}` : \"\";\r\n const initialText = padStart ? `${\"0\".padStart(finalIntegerLength, \"0\")}${suffix}` : `0${suffix}`;\r\n\r\n return (\r\n <span\r\n ref={localRef}\r\n className={cn(styles.countingNumber, className)}\r\n {...props}>\r\n {initialText}\r\n </span>\r\n );\r\n },\r\n);\r\n\r\nCountingNumber.displayName = \"CountingNumber\";\r\n\r\nexport {CountingNumber};\r\n"],"names":["CountingNumber","React","number","fromNumber","padStart","inView","inViewMargin","inViewOnce","decimalSeparator","transition","decimalPlaces","className","props","ref","localRef","numberStr","decimals","resolvedDecimalPlaces","motionValue","useMotionValue","springValue","useSpring","inViewResult","useInView","isInView","unsubscribe","latest","formatted","Math","finalIntegerLength","integerPart","fractionPart","paddedInteger","suffix","initialText","cn","styles"],"mappings":";;;;;;AA8CA,MAAMA,iBAAiB,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/counting-number.js","sources":["../../../src/components/ui/counting-number.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {useInView, useMotionValue, useSpring, type SpringOptions, type UseInViewOptions} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./counting-number.module.css\";\r\n\r\n/** Props accepted by {@link CountingNumber}. */\r\nexport interface CountingNumberProps extends React.HTMLAttributes<HTMLSpanElement> {\r\n /** Final numeric value to animate toward. @default undefined */\r\n number: number;\r\n /** Initial numeric value used before the spring animation starts. @default 0 */\r\n fromNumber?: number;\r\n /** Pads the integer portion so it matches the target value width. @default false */\r\n padStart?: boolean;\r\n /** Delays the animation until the element enters the viewport. @default false */\r\n inView?: boolean;\r\n /** Margin passed to the in-view observer when `inView` is enabled. @default \"0px\" */\r\n inViewMargin?: UseInViewOptions[\"margin\"];\r\n /** Prevents the in-view animation from replaying after the first reveal. @default true */\r\n inViewOnce?: boolean;\r\n /** Character used between the integer and decimal portions. @default \".\" */\r\n decimalSeparator?: string;\r\n /** Spring physics applied to the counting animation. @default {stiffness: 90, damping: 50} */\r\n transition?: SpringOptions;\r\n /** Number of decimal places rendered during the animation. @default 0 */\r\n decimalPlaces?: number;\r\n}\r\n\r\n/**\r\n * Animates a number value with a spring and writes the formatted value into a span.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<span>` 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 * <CountingNumber number={1250} />\r\n * ```\r\n *\r\n * @see {@link CountingNumberProps} for available props\r\n */\r\nconst CountingNumber = React.forwardRef<HTMLSpanElement, CountingNumberProps>(\r\n (\r\n {\r\n number,\r\n fromNumber = 0,\r\n padStart = false,\r\n inView = false,\r\n inViewMargin = \"0px\",\r\n inViewOnce = true,\r\n decimalSeparator = \".\",\r\n transition = {stiffness: 90, damping: 50},\r\n decimalPlaces = 0,\r\n className,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const localRef = React.useRef<HTMLSpanElement>(null);\r\n\r\n React.useImperativeHandle(ref, () => localRef.current!, []);\r\n\r\n const numberStr = number.toString();\r\n const decimals = numberStr.includes(\".\") ? (numberStr.split(\".\")[1]?.length ?? 0) : 0;\r\n const resolvedDecimalPlaces = typeof decimalPlaces === \"number\" ? decimalPlaces : decimals;\r\n\r\n const motionValue = useMotionValue(fromNumber);\r\n const springValue = useSpring(motionValue, transition);\r\n const inViewResult = useInView(localRef, {\r\n once: inViewOnce,\r\n margin: inViewMargin,\r\n });\r\n const isInView = !inView || inViewResult;\r\n\r\n React.useEffect(() => {\r\n if (isInView) {\r\n motionValue.set(number);\r\n }\r\n }, [isInView, motionValue, number]);\r\n\r\n React.useEffect(() => {\r\n const unsubscribe = springValue.on(\"change\", (latest) => {\r\n if (!localRef.current) {\r\n return;\r\n }\r\n\r\n let formatted = resolvedDecimalPlaces > 0 ? latest.toFixed(resolvedDecimalPlaces) : Math.round(latest).toString();\r\n\r\n if (resolvedDecimalPlaces > 0) {\r\n formatted = formatted.replace(\".\", decimalSeparator);\r\n }\r\n\r\n if (padStart) {\r\n const finalIntegerLength = Math.floor(Math.abs(number)).toString().length;\r\n const [integerPart, fractionPart] = formatted.split(decimalSeparator);\r\n const paddedInteger = integerPart.padStart(finalIntegerLength, \"0\");\r\n formatted = fractionPart ? `${paddedInteger}${decimalSeparator}${fractionPart}` : paddedInteger;\r\n }\r\n\r\n localRef.current.textContent = formatted;\r\n });\r\n\r\n return () => {\r\n unsubscribe();\r\n };\r\n }, [decimalSeparator, number, padStart, resolvedDecimalPlaces, springValue]);\r\n\r\n const finalIntegerLength = Math.floor(Math.abs(number)).toString().length;\r\n const suffix = resolvedDecimalPlaces > 0 ? `${decimalSeparator}${\"0\".repeat(resolvedDecimalPlaces)}` : \"\";\r\n const initialText = padStart ? `${\"0\".padStart(finalIntegerLength, \"0\")}${suffix}` : `0${suffix}`;\r\n\r\n return (\r\n <span\r\n ref={localRef}\r\n className={cn(styles.countingNumber, className)}\r\n {...props}>\r\n {initialText}\r\n </span>\r\n );\r\n },\r\n);\r\n\r\nCountingNumber.displayName = \"CountingNumber\";\r\n\r\nexport {CountingNumber};\r\n"],"names":["CountingNumber","React","number","fromNumber","padStart","inView","inViewMargin","inViewOnce","decimalSeparator","transition","decimalPlaces","className","props","ref","localRef","numberStr","decimals","resolvedDecimalPlaces","motionValue","useMotionValue","springValue","useSpring","inViewResult","useInView","isInView","unsubscribe","latest","formatted","Math","finalIntegerLength","integerPart","fractionPart","paddedInteger","suffix","initialText","cn","styles"],"mappings":";;;;;;AA8CA,MAAMA,iBAAiB,WAAHA,GAAGC,wBAAAA,UAAgB,CACrC,CACE,EACEC,MAAM,EACNC,aAAa,CAAC,EACdC,WAAW,KAAK,EAChBC,SAAS,KAAK,EACdC,e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ACD,oBAAoB;gBAC/DF,YAAYI,eAAe,GAAGC,gBAAgBxB,mBAAmBuB,cAAc,GAAGC;YACpF;YAEAlB,SAAS,OAAO,CAAC,WAAW,GAAGa;QACjC;QAEA,OAAO;YACLF;QACF;IACF,GAAG;QAACjB;QAAkBN;QAAQE;QAAUa;QAAuBG;KAAY;IAE3E,MAAMS,qBAAqBD,KAAK,KAAK,CAACA,KAAK,GAAG,CAAC1B,SAAS,QAAQ,GAAG,MAAM;IACzE,MAAM+B,SAAShB,wBAAwB,IAAI,GAAGT,mBAAmB,IAAI,MAAM,CAACS,wBAAwB,GAAG;IACvG,MAAMiB,cAAc9B,WAAW,GAAG,IAAI,QAAQ,CAACyB,oBAAoB,OAAOI,QAAQ,GAAG,CAAC,CAAC,EAAEA,QAAQ;IAEjG,OAAO,WAAP,GACE,IAAC;QACC,KAAKnB;QACL,WAAWqB,GAAGC,uBAAAA,cAAqB,EAAEzB;QACpC,GAAGC,KAAK;kBACRsB;;AAGP;AAGFlC,eAAe,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/counting-number.module.css","webpack://./src/components/ui/counting-number.module.css"],"names":[],"mappings":"AAAA;ECCE,kCAAkC;EAClC,qBAAqB;AACvB","sourcesContent":[".countingNumber{display:inline-block;font-variant-numeric:tabular-nums}",".countingNumber {\n font-variant-numeric: tabular-nums;\n display: inline-block;\n}\n"],"sourceRoot":""}
|
|
@@ -3,18 +3,18 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { Dialog } from "@base-ui/react/dialog";
|
|
4
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import { forwardRef, isValidElement } from "react";
|
|
7
6
|
import { cn } from "../../lib/utilities.js";
|
|
8
7
|
import dialog_module from "./dialog.module.js";
|
|
8
|
+
import * as __rspack_external_react from "react";
|
|
9
9
|
function dialog_Dialog(props) {
|
|
10
10
|
return /*#__PURE__*/ jsx(Dialog.Root, {
|
|
11
11
|
...props
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
dialog_Dialog.displayName = "Dialog";
|
|
15
|
-
const DialogTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
15
|
+
const DialogTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
16
16
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
17
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
17
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
18
18
|
return /*#__PURE__*/ jsx(Dialog.Trigger, {
|
|
19
19
|
ref: ref,
|
|
20
20
|
...otherProps,
|
|
@@ -60,7 +60,7 @@ function DialogOverlay(props) {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
DialogOverlay.displayName = "DialogOverlay";
|
|
63
|
-
const DialogContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
63
|
+
const DialogContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
64
64
|
const { className, children, render, ...otherProps } = props;
|
|
65
65
|
return /*#__PURE__*/ jsxs(DialogPortal, {
|
|
66
66
|
children: [
|
|
@@ -83,7 +83,7 @@ const DialogContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
83
83
|
DialogContent.displayName = "DialogContent";
|
|
84
84
|
function DialogHeader(props) {
|
|
85
85
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
86
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
86
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
87
87
|
return useRender({
|
|
88
88
|
defaultTagName: "div",
|
|
89
89
|
render: renderProp,
|
|
@@ -97,7 +97,7 @@ function DialogHeader(props) {
|
|
|
97
97
|
DialogHeader.displayName = "DialogHeader";
|
|
98
98
|
function DialogFooter(props) {
|
|
99
99
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
100
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
100
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
101
101
|
return useRender({
|
|
102
102
|
defaultTagName: "div",
|
|
103
103
|
render: renderProp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/dialog.js","sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Dialog as BaseDialog} from \"@base-ui/react/dialog\";\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 \"./dialog.module.css\";\r\n\r\ninterface DialogProps extends React.ComponentPropsWithRef<typeof BaseDialog.Root> {}\r\n\r\ninterface DialogTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Trigger>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog trigger styles. @default undefined */\r\n className?: string;\r\n /** Backward-compatible child-slot API that maps the child element to `render`. @default false @deprecated Prefer Base UI's `render` prop. */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface DialogCloseProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Close>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog close control styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface DialogOverlayProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Backdrop>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog backdrop styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface DialogContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Popup>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog content styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface DialogHeaderProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /** Additional CSS classes merged with the dialog header layout styles. @default undefined */\r\n className?: string;\r\n /** Custom element or render callback used to replace the default header container. @default undefined */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /** Backward-compatible child-slot API that maps the child element to `render`. @default false @deprecated Prefer the `render` prop. */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface DialogFooterProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /** Additional CSS classes merged with the dialog footer layout styles. @default undefined */\r\n className?: string;\r\n /** Custom element or render callback used to replace the default footer container. @default undefined */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /** Backward-compatible child-slot API that maps the child element to `render`. @default false @deprecated Prefer the `render` prop. */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface DialogTitleProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Title>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog title styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface DialogDescriptionProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Description>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog description styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Coordinates modal dialog state, focus management, and accessibility semantics.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default and coordinates descendant dialog parts\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports composition through descendant `render` props\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <Dialog>\r\n * <DialogTrigger>Open</DialogTrigger>\r\n * <DialogContent>\r\n * <DialogTitle>Details</DialogTitle>\r\n * </DialogContent>\r\n * </Dialog>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction Dialog(props: Readonly<Dialog.Props>): React.ReactElement {\r\n return <BaseDialog.Root {...props} />;\r\n}\r\nDialog.displayName = \"Dialog\";\r\n\r\n/**\r\n * Opens the dialog from an interactive trigger element.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogTrigger>Open</DialogTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst DialogTrigger = React.forwardRef<HTMLButtonElement, DialogTrigger.Props>(\r\n (props: Readonly<DialogTrigger.Props>, ref): React.ReactElement => {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild support is part of the public API.\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseDialog.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseDialog.Trigger>\r\n );\r\n },\r\n);\r\nDialogTrigger.displayName = \"DialogTrigger\";\r\n\r\n/**\r\n * Portals dialog descendants outside the local DOM hierarchy.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default and portals descendants into the document body\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Does not expose a `render` prop because it only controls mounting context\r\n * - Styling via CSS Modules with `--ac-*` custom properties through descendant components\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <DialogPortal>\r\n * <DialogOverlay />\r\n * <DialogContent />\r\n * </DialogPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst DialogPortal = BaseDialog.Portal;\r\nDialogPortal.displayName = \"DialogPortal\";\r\n\r\n/**\r\n * Closes the dialog from an interactive control inside the modal.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogClose>Dismiss</DialogClose>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogClose(props: Readonly<DialogClose.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Close\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.close, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Close>\r\n );\r\n}\r\nDialogClose.displayName = \"DialogClose\";\r\n\r\n/**\r\n * Renders the dimmed backdrop behind dialog content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogOverlay />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogOverlay(props: Readonly<DialogOverlay.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Backdrop\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.backdrop, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\nDialogOverlay.displayName = \"DialogOverlay\";\r\n\r\n/**\r\n * Renders the dialog popup inside a portal with its backdrop.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogContent>\r\n * <DialogTitle>Details</DialogTitle>\r\n * </DialogContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst DialogContent = React.forwardRef<React.ComponentRef<typeof BaseDialog.Popup>, DialogContent.Props>(\r\n (props: Readonly<DialogContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <DialogPortal>\r\n <DialogOverlay />\r\n <BaseDialog.Popup\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.popup, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Popup>\r\n </DialogPortal>\r\n );\r\n },\r\n);\r\nDialogContent.displayName = \"DialogContent\";\r\n\r\n/**\r\n * Lays out the title and supporting content at the top of a dialog.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogHeader>\r\n * <DialogTitle>Details</DialogTitle>\r\n * </DialogHeader>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogHeader(props: Readonly<DialogHeader.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild support is part of the public API.\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.header, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\nDialogHeader.displayName = \"DialogHeader\";\r\n\r\n/**\r\n * Lays out dialog actions and secondary controls at the bottom edge.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogFooter>\r\n * <DialogClose>Close</DialogClose>\r\n * </DialogFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogFooter(props: Readonly<DialogFooter.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild support is part of the public API.\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.footer, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\nDialogFooter.displayName = \"DialogFooter\";\r\n\r\n/**\r\n * Renders the accessible heading for dialog content.\r\n *\r\n * @remarks\r\n * - Renders an `<h2>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogTitle>Details</DialogTitle>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogTitle(props: Readonly<DialogTitle.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Title\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"h2\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.title, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Title>\r\n );\r\n}\r\nDialogTitle.displayName = \"DialogTitle\";\r\n\r\n/**\r\n * Renders supporting copy beneath the dialog title.\r\n *\r\n * @remarks\r\n * - Renders a `<p>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogDescription>Review the details before continuing.</DialogDescription>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogDescription(props: Readonly<DialogDescription.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Description\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"p\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.description, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Description>\r\n );\r\n}\r\nDialogDescription.displayName = \"DialogDescription\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Dialog {\r\n export type Props = DialogProps;\r\n export type State = BaseDialog.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogTrigger {\r\n export type Props = DialogTriggerProps;\r\n export type State = BaseDialog.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogClose {\r\n export type Props = DialogCloseProps;\r\n export type State = BaseDialog.Close.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogOverlay {\r\n export type Props = DialogOverlayProps;\r\n export type State = BaseDialog.Backdrop.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogContent {\r\n export type Props = DialogContentProps;\r\n export type State = BaseDialog.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogHeader {\r\n export type Props = DialogHeaderProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogFooter {\r\n export type Props = DialogFooterProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogTitle {\r\n export type Props = DialogTitleProps;\r\n export type State = BaseDialog.Title.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogDescription {\r\n export type Props = DialogDescriptionProps;\r\n export type State = BaseDialog.Description.State;\r\n}\r\n\r\nexport {\r\n Dialog,\r\n DialogClose,\r\n DialogContent,\r\n DialogDescription,\r\n DialogFooter,\r\n DialogHeader,\r\n DialogOverlay,\r\n DialogPortal,\r\n DialogTitle,\r\n DialogTrigger,\r\n};\r\n"],"names":["Dialog","props","BaseDialog","DialogTrigger","React","ref","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","DialogPortal","DialogClose","cn","styles","DialogOverlay","DialogContent","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;;;;AAmFA,SAASA,cAAOC,KAA6B;IAC3C,OAAO,WAAP,GAAO,IAACC,OAAAA,IAAe;QAAE,GAAGD,KAAK;;AACnC;AACAD,cAAO,WAAW,GAAG;AAkBrB,MAAMG,gBAAgB,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ErD,OAAO,WAAP,GACE,IAACC,OAAAA,KAAgB;QACd,GAAGQ,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWI,GAAGC,cAAAA,KAAY,EAAEV;YAAU,GAAG,CAAC;QAC/D;kBACCD;;AAGP;AACAgB,YAAY,WAAW,GAAG;AAkB1B,SAASC,kBAAkBvB,KAAwC;IACjE,MAAM,EAACO,SAAS,EAAED,QAAQ,EAAEE,MAAM,EAAE,GAAGC,YAAW,GAAGT;IAErD,OAAO,WAAP,GACE,IAACC,OAAAA,WAAsB;QACpB,GAAGQ,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWI,GAAGC,cAAAA,WAAkB,EAAEV;YAAU,GAAG,CAAC;QACrE;kBACCD;;AAGP;AACAiB,kBAAkB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/dialog.js","sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Dialog as BaseDialog} from \"@base-ui/react/dialog\";\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 \"./dialog.module.css\";\r\n\r\ninterface DialogProps extends React.ComponentPropsWithRef<typeof BaseDialog.Root> {}\r\n\r\ninterface DialogTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Trigger>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog trigger styles. @default undefined */\r\n className?: string;\r\n /** Backward-compatible child-slot API that maps the child element to `render`. @default false @deprecated Prefer Base UI's `render` prop. */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface DialogCloseProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Close>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog close control styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface DialogOverlayProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Backdrop>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog backdrop styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface DialogContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Popup>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog content styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface DialogHeaderProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /** Additional CSS classes merged with the dialog header layout styles. @default undefined */\r\n className?: string;\r\n /** Custom element or render callback used to replace the default header container. @default undefined */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /** Backward-compatible child-slot API that maps the child element to `render`. @default false @deprecated Prefer the `render` prop. */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface DialogFooterProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /** Additional CSS classes merged with the dialog footer layout styles. @default undefined */\r\n className?: string;\r\n /** Custom element or render callback used to replace the default footer container. @default undefined */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /** Backward-compatible child-slot API that maps the child element to `render`. @default false @deprecated Prefer the `render` prop. */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface DialogTitleProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Title>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog title styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface DialogDescriptionProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Description>, \"className\"> {\r\n /** Additional CSS classes merged with the dialog description styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Coordinates modal dialog state, focus management, and accessibility semantics.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default and coordinates descendant dialog parts\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports composition through descendant `render` props\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <Dialog>\r\n * <DialogTrigger>Open</DialogTrigger>\r\n * <DialogContent>\r\n * <DialogTitle>Details</DialogTitle>\r\n * </DialogContent>\r\n * </Dialog>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction Dialog(props: Readonly<Dialog.Props>): React.ReactElement {\r\n return <BaseDialog.Root {...props} />;\r\n}\r\nDialog.displayName = \"Dialog\";\r\n\r\n/**\r\n * Opens the dialog from an interactive trigger element.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogTrigger>Open</DialogTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst DialogTrigger = React.forwardRef<HTMLButtonElement, DialogTrigger.Props>(\r\n (props: Readonly<DialogTrigger.Props>, ref): React.ReactElement => {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild support is part of the public API.\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseDialog.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseDialog.Trigger>\r\n );\r\n },\r\n);\r\nDialogTrigger.displayName = \"DialogTrigger\";\r\n\r\n/**\r\n * Portals dialog descendants outside the local DOM hierarchy.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default and portals descendants into the document body\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Does not expose a `render` prop because it only controls mounting context\r\n * - Styling via CSS Modules with `--ac-*` custom properties through descendant components\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <DialogPortal>\r\n * <DialogOverlay />\r\n * <DialogContent />\r\n * </DialogPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst DialogPortal = BaseDialog.Portal;\r\nDialogPortal.displayName = \"DialogPortal\";\r\n\r\n/**\r\n * Closes the dialog from an interactive control inside the modal.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogClose>Dismiss</DialogClose>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogClose(props: Readonly<DialogClose.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Close\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.close, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Close>\r\n );\r\n}\r\nDialogClose.displayName = \"DialogClose\";\r\n\r\n/**\r\n * Renders the dimmed backdrop behind dialog content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogOverlay />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogOverlay(props: Readonly<DialogOverlay.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Backdrop\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.backdrop, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\nDialogOverlay.displayName = \"DialogOverlay\";\r\n\r\n/**\r\n * Renders the dialog popup inside a portal with its backdrop.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogContent>\r\n * <DialogTitle>Details</DialogTitle>\r\n * </DialogContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst DialogContent = React.forwardRef<React.ComponentRef<typeof BaseDialog.Popup>, DialogContent.Props>(\r\n (props: Readonly<DialogContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <DialogPortal>\r\n <DialogOverlay />\r\n <BaseDialog.Popup\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.popup, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Popup>\r\n </DialogPortal>\r\n );\r\n },\r\n);\r\nDialogContent.displayName = \"DialogContent\";\r\n\r\n/**\r\n * Lays out the title and supporting content at the top of a dialog.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogHeader>\r\n * <DialogTitle>Details</DialogTitle>\r\n * </DialogHeader>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogHeader(props: Readonly<DialogHeader.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild support is part of the public API.\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.header, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\nDialogHeader.displayName = \"DialogHeader\";\r\n\r\n/**\r\n * Lays out dialog actions and secondary controls at the bottom edge.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogFooter>\r\n * <DialogClose>Close</DialogClose>\r\n * </DialogFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogFooter(props: Readonly<DialogFooter.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild support is part of the public API.\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.footer, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\nDialogFooter.displayName = \"DialogFooter\";\r\n\r\n/**\r\n * Renders the accessible heading for dialog content.\r\n *\r\n * @remarks\r\n * - Renders an `<h2>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogTitle>Details</DialogTitle>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogTitle(props: Readonly<DialogTitle.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Title\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"h2\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.title, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Title>\r\n );\r\n}\r\nDialogTitle.displayName = \"DialogTitle\";\r\n\r\n/**\r\n * Renders supporting copy beneath the dialog title.\r\n *\r\n * @remarks\r\n * - Renders a `<p>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\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 * <DialogDescription>Review the details before continuing.</DialogDescription>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction DialogDescription(props: Readonly<DialogDescription.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Description\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"p\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.description, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Description>\r\n );\r\n}\r\nDialogDescription.displayName = \"DialogDescription\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Dialog {\r\n export type Props = DialogProps;\r\n export type State = BaseDialog.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogTrigger {\r\n export type Props = DialogTriggerProps;\r\n export type State = BaseDialog.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogClose {\r\n export type Props = DialogCloseProps;\r\n export type State = BaseDialog.Close.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogOverlay {\r\n export type Props = DialogOverlayProps;\r\n export type State = BaseDialog.Backdrop.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogContent {\r\n export type Props = DialogContentProps;\r\n export type State = BaseDialog.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogHeader {\r\n export type Props = DialogHeaderProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogFooter {\r\n export type Props = DialogFooterProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogTitle {\r\n export type Props = DialogTitleProps;\r\n export type State = BaseDialog.Title.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DialogDescription {\r\n export type Props = DialogDescriptionProps;\r\n export type State = BaseDialog.Description.State;\r\n}\r\n\r\nexport {\r\n Dialog,\r\n DialogClose,\r\n DialogContent,\r\n DialogDescription,\r\n DialogFooter,\r\n DialogHeader,\r\n DialogOverlay,\r\n DialogPortal,\r\n DialogTitle,\r\n DialogTrigger,\r\n};\r\n"],"names":["Dialog","props","BaseDialog","DialogTrigger","React","ref","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","DialogPortal","DialogClose","cn","styles","DialogOverlay","DialogContent","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;;;;AAmFA,SAASA,cAAOC,KAA6B;IAC3C,OAAO,WAAP,GAAO,IAACC,OAAAA,IAAe;QAAE,GAAGD,KAAK;;AACnC;AACAD,cAAO,WAAW,GAAG;AAkBrB,MAAMG,gBAAgB,WAAHA,GAAGC,wB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AAED,QAAQ,EAAEE,MAAM,EAAE,GAAGC,YAAW,GAAGT;IAErD,OAAO,WAAP,GACE,IAACC,OAAAA,KAAgB;QACd,GAAGQ,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWI,GAAGC,cAAAA,KAAY,EAAEV;YAAU,GAAG,CAAC;QAC/D;kBACCD;;AAGP;AACAgB,YAAY,WAAW,GAAG;AAkB1B,SAASC,kBAAkBvB,KAAwC;IACjE,MAAM,EAACO,SAAS,EAAED,QAAQ,EAAEE,MAAM,EAAE,GAAGC,YAAW,GAAGT;IAErD,OAAO,WAAP,GACE,IAACC,OAAAA,WAAsB;QACpB,GAAGQ,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWI,GAAGC,cAAAA,WAAkB,EAAEV;YAAU,GAAG,CAAC;QACrE;kBACCD;;AAGP;AACAiB,kBAAkB,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/dialog.module.css","webpack://./src/components/ui/dialog.module.css"],"names":[],"mappings":"AAAA;ECCE,kBAAkB;EAClB,kBAAkB;EAClB,+CAA+C;EAC/C,2BAA2B;EAC3B,eAAe;EACf,QAAQ;;EDN0I;IAAuC,kBAAA;ECUzL;;EDV2M;ICazM,UAAU;EACZ;AACF;;ADfoQ;ECkBlQ,sCAAsC;EACtC,kCAAkC;EAClC,kCAAkC;EAClC,sBAAsB;EACtB,2BAA2B;EAC3B,6BAA6B;EAC7B,gBAAgB;EAChB,0BAA0B;EAC1B,kBAAkB;EAClB,qFAAqF;EACrF,YAAY;EACZ,eAAe;EACf,QAAQ;EACR,SAAS;EACT,gBAAgB;EAChB,gCAAgC;EAChC,iEAAiE;;EDlCurB;ICqCtvB,UAAU;IACV,2CAA2C;EAC7C;AACF;;ADxC21B;EC2Cz1B,sBAAsB;EACtB,kBAAkB;EAClB,sBAAsB;EACtB,aAAa;AACf;;AD/C86B;EAAyB;ICmDn8B,gBAAgB;EAClB;AACF;;ADrDg+B;ECwD99B,sBAAsB;EACtB,8BAA8B;EAC9B,8BAA8B;EAC9B,aAAa;AACf;;AD5DukC;EAAyB;ICgE5lC,mBAAmB;IACnB,yBAAyB;EAC3B;AACF;;ADnEqpC;ECsEnpC,4BAA4B;EAC5B,sBAAsB;EACtB,gBAAgB;EAChB,gBAAgB;AAClB;;AD1E8uC;EC6E5uC,iCAAiC;EACjC,4BAA4B;AAC9B;;AD/EwzC;ECkFtzC,kCAAkC;EAClC,iCAAiC;EACjC,eAAe;EACf,cAAc;EACd,wBAAwB;EACxB,sBAAsB;EACtB,sFAAsF;EACtF,gBAAgB;EAChB,YAAY;EACZ,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,UAAU;EACV,oBAAoB;EACpB,kBAAkB;;EDjGsqD;IAAqB;MCqGzsD,qEAAqE;MACrE,2BAA2B;IAC7B;EACF;;EDxGszD;IC2GpzD,iCAAiC;IACjC,oBAAoB;EACtB;AACF","sourcesContent":[".backdrop{background-color:rgba(0,0,0,.5);inset:0;min-height:100dvh;position:fixed;touch-action:none;transition:opacity var(--ac-transition-normal);@supports (-webkit-touch-callout:none){position:absolute}&[data-ending-style],&[data-starting-style]{opacity:0}}.popup{background-color:var(--ac-background);border:1px solid var(--ac-border);border-radius:var(--ac-radius-lg);box-shadow:0 10px 30px -5px rgba(0,0,0,.1),0 4px 10px -5px rgba(0,0,0,.04);box-sizing:border-box;color:var(--ac-foreground);left:50%;max-height:85vh;max-width:calc(100vw - 2rem);overflow-y:auto;padding:var(--ac-space-6);position:fixed;top:50%;touch-action:none;transform:translate(-50%,-50%);transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal);width:32rem;&[data-ending-style],&[data-starting-style]{opacity:0;transform:translate(-50%,-50%) scale(.95)}}.header{display:flex;flex-direction:column;gap:var(--ac-space-1);text-align:center}@media (min-width:640px){.header{text-align:left}}.footer{display:flex;flex-direction:column-reverse;gap:var(--ac-space-2);padding-top:var(--ac-space-4)}@media (min-width:640px){.footer{flex-direction:row;justify-content:flex-end}}.title{font-size:var(--ac-text-lg);font-weight:600;letter-spacing:-.01em;line-height:1.2}.description{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm)}.close{align-items:center;background:transparent;border:none;border-radius:var(--ac-radius-xs);color:var(--ac-muted-foreground);cursor:pointer;display:inline-flex;height:1.5rem;justify-content:center;outline:none;padding:0;position:absolute;right:var(--ac-space-3);top:var(--ac-space-3);transition:background-color var(--ac-transition-fast),color var(--ac-transition-fast);width:1.5rem;@media (hover:hover){&:hover{background-color:color-mix(in oklch,var(--ac-muted),transparent 50%);color:var(--ac-foreground)}}&:focus-visible{outline:2px solid var(--ac-ring);outline-offset:-1px}}",".backdrop {\n touch-action: none;\n min-height: 100dvh;\n transition: opacity var(--ac-transition-normal);\n background-color: #00000080;\n position: fixed;\n inset: 0;\n\n @supports (-webkit-touch-callout: none) {\n position: absolute;\n }\n\n &[data-ending-style], &[data-starting-style] {\n opacity: 0;\n }\n}\n\n.popup {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg);\n box-sizing: border-box;\n color: var(--ac-foreground);\n max-width: calc(100vw - 2rem);\n max-height: 85vh;\n padding: var(--ac-space-6);\n touch-action: none;\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n width: 32rem;\n position: fixed;\n top: 50%;\n left: 50%;\n overflow-y: auto;\n transform: translate(-50%, -50%);\n box-shadow: 0 10px 30px -5px #0000001a, 0 4px 10px -5px #0000000a;\n\n &[data-ending-style], &[data-starting-style] {\n opacity: 0;\n transform: translate(-50%, -50%) scale(.95);\n }\n}\n\n.header {\n gap: var(--ac-space-1);\n text-align: center;\n flex-direction: column;\n display: flex;\n}\n\n@media (width >= 640px) {\n .header {\n text-align: left;\n }\n}\n\n.footer {\n gap: var(--ac-space-2);\n padding-top: var(--ac-space-4);\n flex-direction: column-reverse;\n display: flex;\n}\n\n@media (width >= 640px) {\n .footer {\n flex-direction: row;\n justify-content: flex-end;\n }\n}\n\n.title {\n font-size: var(--ac-text-lg);\n letter-spacing: -.01em;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.description {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n}\n\n.close {\n border-radius: var(--ac-radius-xs);\n color: var(--ac-muted-foreground);\n cursor: pointer;\n height: 1.5rem;\n right: var(--ac-space-3);\n top: var(--ac-space-3);\n transition: background-color var(--ac-transition-fast),color var(--ac-transition-fast);\n background: none;\n border: none;\n outline: none;\n justify-content: center;\n align-items: center;\n width: 1.5rem;\n padding: 0;\n display: inline-flex;\n position: absolute;\n\n @media (hover: hover) {\n &:hover {\n background-color: color-mix(in oklch,var(--ac-muted),transparent 50%);\n color: var(--ac-foreground);\n }\n }\n\n &:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: -1px;\n }\n}\n"],"sourceRoot":""}
|
|
@@ -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/dot-background.module.css","webpack://./src/components/ui/dot-background.module.css"],"names":[],"mappings":"AAAA;ECCE,qEAAqE;EACrE,oBAAoB;EACpB,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,QAAQ;AACV;;ADPgJ;ECU9I,cAAc;AAChB","sourcesContent":[".root{color:color-mix(in oklch,var(--ac-muted-foreground),transparent 20%);height:100%;inset:0;pointer-events:none;position:absolute;width:100%}.dot{color:inherit}",".root {\n color: color-mix(in oklch,var(--ac-muted-foreground),transparent 20%);\n pointer-events: none;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n}\n\n.dot {\n color: inherit;\n}\n"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/ui/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,IAAI,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,WAAY,SAAQ,KAAK,CAAC,qBAAqB,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC;CAAG;AAEpF,UAAU,kBAAmB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,UAAU,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAC5G;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,kBAAmB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,UAAU,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;IAC7G;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,kBAAmB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC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
import { Drawer } from "@base-ui/react/drawer";
|
|
4
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import { forwardRef, isValidElement } from "react";
|
|
7
6
|
import { cn } from "../../lib/utilities.js";
|
|
8
7
|
import drawer_module from "./drawer.module.js";
|
|
8
|
+
import * as __rspack_external_react from "react";
|
|
9
9
|
function drawer_Drawer(props) {
|
|
10
10
|
return /*#__PURE__*/ jsx(Drawer.Root, {
|
|
11
11
|
...props
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
const DrawerTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
14
|
+
const DrawerTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
15
15
|
const { className, children, render, ...otherProps } = props;
|
|
16
16
|
return /*#__PURE__*/ jsx(Drawer.Trigger, {
|
|
17
17
|
ref: ref,
|
|
@@ -41,7 +41,7 @@ function DrawerOverlay(props) {
|
|
|
41
41
|
})
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
const DrawerContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
44
|
+
const DrawerContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
45
45
|
const { className, children, render, ...otherProps } = props;
|
|
46
46
|
return /*#__PURE__*/ jsxs(DrawerPortal, {
|
|
47
47
|
children: [
|
|
@@ -71,7 +71,7 @@ const DrawerContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
71
71
|
});
|
|
72
72
|
function DrawerHeader(props) {
|
|
73
73
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
74
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
74
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
75
75
|
return useRender({
|
|
76
76
|
defaultTagName: "div",
|
|
77
77
|
render: renderProp,
|
|
@@ -84,7 +84,7 @@ function DrawerHeader(props) {
|
|
|
84
84
|
}
|
|
85
85
|
function DrawerFooter(props) {
|
|
86
86
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
87
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
87
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
88
88
|
return useRender({
|
|
89
89
|
defaultTagName: "div",
|
|
90
90
|
render: renderProp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/drawer.js","sources":["../../../src/components/ui/drawer.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Drawer as BaseDrawer} from \"@base-ui/react/drawer\";\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 \"./drawer.module.css\";\r\n\r\ninterface DrawerProps extends React.ComponentPropsWithRef<typeof BaseDrawer.Root> {}\r\n\r\ninterface DrawerTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Trigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface DrawerOverlayProps extends Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Backdrop>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface DrawerContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Popup>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface DrawerHeaderProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface DrawerFooterProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface DrawerTitleProps extends Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Title>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface DrawerDescriptionProps extends Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Description>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Coordinates drawer state and accessibility behavior.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <Drawer>Content</Drawer>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction Drawer(props: Readonly<Drawer.Props>): React.ReactElement {\r\n return <BaseDrawer.Root {...props} />;\r\n}\r\n\r\n/**\r\n * Renders the drawer trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerTrigger>Content</DrawerTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nconst DrawerTrigger = React.forwardRef<HTMLButtonElement, DrawerTrigger.Props>(\r\n (props: Readonly<DrawerTrigger.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {children}\r\n </BaseDrawer.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Provides the drawer portal container.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerPortal>Content</DrawerPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nconst DrawerPortal: typeof BaseDrawer.Portal & {displayName?: string} = BaseDrawer.Portal;\r\n/**\r\n * Renders the drawer close.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerClose>Content</DrawerClose>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nconst DrawerClose: typeof BaseDrawer.Close & {displayName?: string} = BaseDrawer.Close;\r\n\r\n/**\r\n * Renders the drawer overlay.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerOverlay>Content</DrawerOverlay>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction DrawerOverlay(props: Readonly<DrawerOverlay.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Backdrop\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.backdrop, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Renders the drawer content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerContent>Content</DrawerContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nconst DrawerContent = React.forwardRef<React.ComponentRef<typeof BaseDrawer.Popup>, DrawerContent.Props>(\r\n (props: Readonly<DrawerContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <DrawerPortal>\r\n <DrawerOverlay />\r\n <BaseDrawer.Popup\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.popup, className)}, {}),\r\n })}>\r\n <div className={styles.handle} />\r\n <BaseDrawer.Content className={styles.content}>{children}</BaseDrawer.Content>\r\n </BaseDrawer.Popup>\r\n </DrawerPortal>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the drawer header.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerHeader>Content</DrawerHeader>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction DrawerHeader(props: Readonly<DrawerHeader.Props>): React.ReactElement {\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.header, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n/**\r\n * Renders the drawer footer.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerFooter>Content</DrawerFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction DrawerFooter(props: Readonly<DrawerFooter.Props>): React.ReactElement {\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.footer, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n/**\r\n * Renders the drawer title.\r\n *\r\n * @remarks\r\n * - Renders a `<h2>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerTitle>Content</DrawerTitle>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction DrawerTitle(props: Readonly<DrawerTitle.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Title\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"h2\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.title, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDrawer.Title>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the drawer description.\r\n *\r\n * @remarks\r\n * - Renders a `<p>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerDescription>Content</DrawerDescription>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction DrawerDescription(props: Readonly<DrawerDescription.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Description\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"p\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.description, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDrawer.Description>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Drawer {\r\n export type Props = DrawerProps;\r\n export type State = BaseDrawer.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerTrigger {\r\n export type Props = DrawerTriggerProps;\r\n export type State = BaseDrawer.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerOverlay {\r\n export type Props = DrawerOverlayProps;\r\n export type State = BaseDrawer.Backdrop.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerContent {\r\n export type Props = DrawerContentProps;\r\n export type State = BaseDrawer.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerHeader {\r\n export type Props = DrawerHeaderProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerFooter {\r\n export type Props = DrawerFooterProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerTitle {\r\n export type Props = DrawerTitleProps;\r\n export type State = BaseDrawer.Title.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerDescription {\r\n export type Props = DrawerDescriptionProps;\r\n export type State = BaseDrawer.Description.State;\r\n}\r\n\r\nDrawer.displayName = \"Drawer\";\r\nDrawerTrigger.displayName = \"DrawerTrigger\";\r\nDrawerPortal.displayName = \"DrawerPortal\";\r\nDrawerClose.displayName = \"DrawerClose\";\r\nDrawerOverlay.displayName = \"DrawerOverlay\";\r\nDrawerContent.displayName = \"DrawerContent\";\r\nDrawerHeader.displayName = \"DrawerHeader\";\r\nDrawerFooter.displayName = \"DrawerFooter\";\r\nDrawerTitle.displayName = \"DrawerTitle\";\r\nDrawerDescription.displayName = \"DrawerDescription\";\r\n\r\nexport {\r\n Drawer,\r\n DrawerClose,\r\n DrawerContent,\r\n DrawerDescription,\r\n DrawerFooter,\r\n DrawerHeader,\r\n DrawerOverlay,\r\n DrawerPortal,\r\n DrawerTitle,\r\n DrawerTrigger,\r\n};\r\n"],"names":["Drawer","props","BaseDrawer","DrawerTrigger","React","ref","className","children","render","otherProps","useRender","mergeProps","DrawerPortal","DrawerClose","DrawerOverlay","cn","styles","DrawerContent","DrawerHeader","asChild","renderProp","undefined","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":";;;;;;;;AAyGA,SAASA,cAAOC,KAA6B;IAC3C,OAAO,WAAP,GAAO,IAACC,OAAAA,IAAe;QAAE,GAAGD,KAAK;;AACnC;AAiBA,MAAME,gBAAgB,WAAHA,GAAGC,WACpB,CAACH,OAAsCI;IACrC,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,G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BG,cAAc,WAAW,GAAG;AAC5BS,aAAa,WAAW,GAAG;AAC3BC,YAAY,WAAW,GAAG;AAC1BC,cAAc,WAAW,GAAG;AAC5BG,cAAc,WAAW,GAAG;AAC5BC,aAAa,WAAW,GAAG;AAC3BI,aAAa,WAAW,GAAG;AAC3BC,YAAY,WAAW,GAAG;AAC1BC,kBAAkB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/drawer.js","sources":["../../../src/components/ui/drawer.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Drawer as BaseDrawer} from \"@base-ui/react/drawer\";\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 \"./drawer.module.css\";\r\n\r\ninterface DrawerProps extends React.ComponentPropsWithRef<typeof BaseDrawer.Root> {}\r\n\r\ninterface DrawerTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Trigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface DrawerOverlayProps extends Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Backdrop>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface DrawerContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Popup>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface DrawerHeaderProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface DrawerFooterProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface DrawerTitleProps extends Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Title>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface DrawerDescriptionProps extends Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Description>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Coordinates drawer state and accessibility behavior.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <Drawer>Content</Drawer>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction Drawer(props: Readonly<Drawer.Props>): React.ReactElement {\r\n return <BaseDrawer.Root {...props} />;\r\n}\r\n\r\n/**\r\n * Renders the drawer trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerTrigger>Content</DrawerTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nconst DrawerTrigger = React.forwardRef<HTMLButtonElement, DrawerTrigger.Props>(\r\n (props: Readonly<DrawerTrigger.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {children}\r\n </BaseDrawer.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Provides the drawer portal container.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerPortal>Content</DrawerPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nconst DrawerPortal: typeof BaseDrawer.Portal & {displayName?: string} = BaseDrawer.Portal;\r\n/**\r\n * Renders the drawer close.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerClose>Content</DrawerClose>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nconst DrawerClose: typeof BaseDrawer.Close & {displayName?: string} = BaseDrawer.Close;\r\n\r\n/**\r\n * Renders the drawer overlay.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerOverlay>Content</DrawerOverlay>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction DrawerOverlay(props: Readonly<DrawerOverlay.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Backdrop\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.backdrop, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Renders the drawer content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerContent>Content</DrawerContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nconst DrawerContent = React.forwardRef<React.ComponentRef<typeof BaseDrawer.Popup>, DrawerContent.Props>(\r\n (props: Readonly<DrawerContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <DrawerPortal>\r\n <DrawerOverlay />\r\n <BaseDrawer.Popup\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.popup, className)}, {}),\r\n })}>\r\n <div className={styles.handle} />\r\n <BaseDrawer.Content className={styles.content}>{children}</BaseDrawer.Content>\r\n </BaseDrawer.Popup>\r\n </DrawerPortal>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the drawer header.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerHeader>Content</DrawerHeader>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction DrawerHeader(props: Readonly<DrawerHeader.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.header, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n/**\r\n * Renders the drawer footer.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerFooter>Content</DrawerFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction DrawerFooter(props: Readonly<DrawerFooter.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.footer, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n/**\r\n * Renders the drawer title.\r\n *\r\n * @remarks\r\n * - Renders a `<h2>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerTitle>Content</DrawerTitle>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction DrawerTitle(props: Readonly<DrawerTitle.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Title\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"h2\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.title, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDrawer.Title>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the drawer description.\r\n *\r\n * @remarks\r\n * - Renders a `<p>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/drawer | Base UI Drawer}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <DrawerDescription>Content</DrawerDescription>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}\r\n */\r\nfunction DrawerDescription(props: Readonly<DrawerDescription.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Description\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"p\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.description, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDrawer.Description>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Drawer {\r\n export type Props = DrawerProps;\r\n export type State = BaseDrawer.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerTrigger {\r\n export type Props = DrawerTriggerProps;\r\n export type State = BaseDrawer.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerOverlay {\r\n export type Props = DrawerOverlayProps;\r\n export type State = BaseDrawer.Backdrop.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerContent {\r\n export type Props = DrawerContentProps;\r\n export type State = BaseDrawer.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerHeader {\r\n export type Props = DrawerHeaderProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerFooter {\r\n export type Props = DrawerFooterProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerTitle {\r\n export type Props = DrawerTitleProps;\r\n export type State = BaseDrawer.Title.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace DrawerDescription {\r\n export type Props = DrawerDescriptionProps;\r\n export type State = BaseDrawer.Description.State;\r\n}\r\n\r\nDrawer.displayName = \"Drawer\";\r\nDrawerTrigger.displayName = \"DrawerTrigger\";\r\nDrawerPortal.displayName = \"DrawerPortal\";\r\nDrawerClose.displayName = \"DrawerClose\";\r\nDrawerOverlay.displayName = \"DrawerOverlay\";\r\nDrawerContent.displayName = \"DrawerContent\";\r\nDrawerHeader.displayName = \"DrawerHeader\";\r\nDrawerFooter.displayName = \"DrawerFooter\";\r\nDrawerTitle.displayName = \"DrawerTitle\";\r\nDrawerDescription.displayName = \"DrawerDescription\";\r\n\r\nexport {\r\n Drawer,\r\n DrawerClose,\r\n DrawerContent,\r\n DrawerDescription,\r\n DrawerFooter,\r\n DrawerHeader,\r\n DrawerOverlay,\r\n DrawerPortal,\r\n DrawerTitle,\r\n DrawerTrigger,\r\n};\r\n"],"names":["Drawer","props","BaseDrawer","DrawerTrigger","React","ref","className","children","render","otherProps","useRender","mergeProps","DrawerPortal","DrawerClose","DrawerOverlay","cn","styles","DrawerContent","DrawerHeader","asChild","renderProp","undefined","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":";;;;;;;;AAyGA,SAASA,cAAOC,KAA6B;IAC3C,OAAO,WAAP,GAAO,IAACC,OAAAA,IAAe;QAAE,GAAGD,KAAK;;AACnC;AAiBA,MAAME,gBAAgB,WAAHA,GAAGC,wBAAAA,UAAgB,CACpC,CAACH,OAAsCI;IACrC,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,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U,GAAG,CAAC;QACrE;kBACCC;;AAGP;AAkDAP,cAAO,WAAW,GAAG;AACrBG,cAAc,WAAW,GAAG;AAC5BS,aAAa,WAAW,GAAG;AAC3BC,YAAY,WAAW,GAAG;AAC1BC,cAAc,WAAW,GAAG;AAC5BG,cAAc,WAAW,GAAG;AAC5BC,aAAa,WAAW,GAAG;AAC3BI,aAAa,WAAW,GAAG;AAC3BC,YAAY,WAAW,GAAG;AAC1BC,kBAAkB,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/drawer.module.css","webpack://./src/components/ui/drawer.module.css"],"names":[],"mappings":"AAAA;ECCE,+CAA+C;EAC/C,WAAW;EACX,2BAA2B;EAC3B,eAAe;EACf,QAAQ;;EDLkH;IAAuC,kBAAA;ECSjK;AACF;;ADVsL;ECapL,UAAU;AACZ;;ADd4P;ECiB1P,sCAAsC;EACtC,kCAAkC;EAClC,0DAA0D;EAC1D,eAAe;EACf,2BAA2B;EAC3B,sBAAsB;EACtB,iBAAiB;EACjB,8DAA8D;EAC9D,qFAAqF;EACrF,WAAW;EACX,gBAAgB;EAChB,sBAAsB;EACtB,gBAAgB;EAChB,aAAa;EACb,eAAe;EACf,SAAS;EACT,wCAAwC;AAC1C;;ADlC6vB;ECqC3vB,UAAU;EACV,2BAA2B;AAC7B;;ADvCw1B;EC0Ct1B,kCAAkC;EAClC,oBAAoB;EACpB,WAAW;EACX,cAAc;EACd,cAAc;AAChB;;AD/C67B;ECkD37B,sBAAsB;EACtB,sBAAsB;EACtB,aAAa;AACf;;ADrD+/B;ECwD7/B,sBAAsB;EACtB,kBAAkB;EAClB,aAAa;AACf;;AD3D4jC;EC8D1jC,sBAAsB;EACtB,sBAAsB;EACtB,gBAAgB;EAChB,aAAa;AACf;;ADlE6oC;EAAyB;ICsElqC,gBAAgB;EAClB;AACF;;ADxE+rC;EC2E7rC,4BAA4B;EAC5B,gBAAgB;AAClB;;AD7EkvC;ECgFhvC,iCAAiC;EACjC,4BAA4B;AAC9B","sourcesContent":[".backdrop{background-color:rgba(0,0,0,.55);inset:0;position:fixed;transition:opacity var(--ac-transition-normal);z-index:50;@supports (-webkit-touch-callout:none){position:absolute}}.backdrop[data-ending-style],.backdrop[data-starting-style]{opacity:0}.popup{background-color:var(--ac-background);border:1px solid var(--ac-border);border-bottom:0;border-radius:var(--ac-radius-lg) var(--ac-radius-lg) 0 0;inset-inline:0;bottom:0;box-shadow:0 -16px 40px -16px rgba(0,0,0,.35);color:var(--ac-foreground);display:flex;flex-direction:column;gap:var(--ac-space-4);margin-top:6rem;min-height:10rem;padding:var(--ac-space-4) var(--ac-space-4) var(--ac-space-6);position:fixed;transition:transform var(--ac-transition-normal),opacity var(--ac-transition-normal);z-index:51}.popup[data-ending-style],.popup[data-starting-style]{opacity:0;transform:translateY(1rem)}.handle{background-color:var(--ac-border);border-radius:999px;height:.25rem;margin:0 auto;width:4rem}.content{display:flex;flex-direction:column;gap:var(--ac-space-4)}.header{display:grid;gap:var(--ac-space-1);text-align:center}.footer{display:flex;flex-direction:column;gap:var(--ac-space-2);margin-top:auto}@media (min-width:640px){.header{text-align:left}}.title{font-size:var(--ac-text-lg);font-weight:600}.description{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm)}",".backdrop {\n transition: opacity var(--ac-transition-normal);\n z-index: 50;\n background-color: #0000008c;\n position: fixed;\n inset: 0;\n\n @supports (-webkit-touch-callout: none) {\n position: absolute;\n }\n}\n\n.backdrop[data-ending-style], .backdrop[data-starting-style] {\n opacity: 0;\n}\n\n.popup {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg) var(--ac-radius-lg) 0 0;\n inset-inline: 0;\n color: var(--ac-foreground);\n gap: var(--ac-space-4);\n min-height: 10rem;\n padding: var(--ac-space-4) var(--ac-space-4) var(--ac-space-6);\n transition: transform var(--ac-transition-normal),opacity var(--ac-transition-normal);\n z-index: 51;\n border-bottom: 0;\n flex-direction: column;\n margin-top: 6rem;\n display: flex;\n position: fixed;\n bottom: 0;\n box-shadow: 0 -16px 40px -16px #00000059;\n}\n\n.popup[data-ending-style], .popup[data-starting-style] {\n opacity: 0;\n transform: translateY(1rem);\n}\n\n.handle {\n background-color: var(--ac-border);\n border-radius: 999px;\n width: 4rem;\n height: .25rem;\n margin: 0 auto;\n}\n\n.content {\n gap: var(--ac-space-4);\n flex-direction: column;\n display: flex;\n}\n\n.header {\n gap: var(--ac-space-1);\n text-align: center;\n display: grid;\n}\n\n.footer {\n gap: var(--ac-space-2);\n flex-direction: column;\n margin-top: auto;\n display: flex;\n}\n\n@media (width >= 640px) {\n .header {\n text-align: left;\n }\n}\n\n.title {\n font-size: var(--ac-text-lg);\n font-weight: 600;\n}\n\n.description {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n}\n"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,IAAI,IAAI,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,iBAAkB,SAAQ,KAAK,CAAC,qBAAqB,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC;CAAG;AAExF,UAAU,wBAAyB,SAAQ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C;IACjC,KAAY,KAAK,GAAG,6BAA6B,CAAC;IAClD,KAAY,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC;CACjD;AAGD,kBAAU,qBAAqB,CAAC;IAC9B,KAAY,KAAK,GAAG,0BAA0B,CAAC;IAC/C,KAAY,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC;CAC9C;AAGD,kBAAU,iBAAiB,CAAC;IAC1B,KAAY,KAAK,GAAG,sBAAsB,CAAC;IAC3C,KAAY,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC;CAC/C;AAGD,kBAAU,qBAAqB,CAAC;IAC9B,KAAY,KAAK,GAAG,0BAA0B,CAAC;IAC/C,KAAY,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC;CAC9C;AAGD,kBAAU,oBAAoB,CAAC;IAC7B,KAAY,KAAK,GAAG,yBAAyB,CAAC;IAC9C,KAAY,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAC3C;AAkBD,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,GACpB,CAAC"}
|
|
@@ -4,9 +4,9 @@ import { Menu } from "@base-ui/react/menu";
|
|
|
4
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
7
|
-
import { forwardRef, isValidElement } from "react";
|
|
8
7
|
import { cn } from "../../lib/utilities.js";
|
|
9
8
|
import dropdown_menu_module from "./dropdown-menu.module.js";
|
|
9
|
+
import * as __rspack_external_react from "react";
|
|
10
10
|
function DropdownMenu(props) {
|
|
11
11
|
return /*#__PURE__*/ jsx(Menu.Root, {
|
|
12
12
|
...props
|
|
@@ -16,9 +16,9 @@ const DropdownMenuGroup = Menu.Group;
|
|
|
16
16
|
const DropdownMenuPortal = Menu.Portal;
|
|
17
17
|
const DropdownMenuRadioGroup = Menu.RadioGroup;
|
|
18
18
|
const DropdownMenuSub = Menu.SubmenuRoot;
|
|
19
|
-
const DropdownMenuTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
19
|
+
const DropdownMenuTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
20
20
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
21
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
21
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
22
22
|
return /*#__PURE__*/ jsx(Menu.Trigger, {
|
|
23
23
|
ref: ref,
|
|
24
24
|
...otherProps,
|
|
@@ -73,7 +73,7 @@ function DropdownMenuSubContent(props) {
|
|
|
73
73
|
})
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
const DropdownMenuContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
76
|
+
const DropdownMenuContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
77
77
|
const { className, children, render, ...otherProps } = props;
|
|
78
78
|
return /*#__PURE__*/ jsx(DropdownMenuPortal, {
|
|
79
79
|
children: /*#__PURE__*/ jsx(Menu.Positioner, {
|
|
@@ -100,7 +100,7 @@ const DropdownMenuContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
100
100
|
});
|
|
101
101
|
function DropdownMenuItem(props) {
|
|
102
102
|
const { asChild = false, children, className, inset = false, render, ...otherProps } = props;
|
|
103
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
103
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
104
104
|
return /*#__PURE__*/ jsx(Menu.Item, {
|
|
105
105
|
...otherProps,
|
|
106
106
|
render: useRender({
|
|
@@ -190,7 +190,7 @@ function DropdownMenuSeparator(props) {
|
|
|
190
190
|
}
|
|
191
191
|
function DropdownMenuShortcut(props) {
|
|
192
192
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
193
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
193
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
194
194
|
return useRender({
|
|
195
195
|
defaultTagName: "span",
|
|
196
196
|
render: renderProp,
|