@arolariu/components 1.1.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 +32 -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.js +8 -8
- 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.js +4 -4
- 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.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 +2 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +4 -4
- 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.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 -136
- 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.js +2 -2
- 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.js +2 -2
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/checkbox_module.css.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.js +13 -13
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/combobox_module.css.map +1 -1
- package/dist/components/ui/command.js +40 -40
- 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.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.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.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.js +52 -52
- 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.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.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.js +5 -5
- 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.js +5 -5
- 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.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.js +2 -2
- 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.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_module.css.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.js +2 -2
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/separator_module.css.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.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} +10 -2
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/{sonner.js → toast.js} +40 -40
- 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.js +5 -5
- 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.js +6 -6
- 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.js +6 -6
- package/dist/hooks/useClipboard.js.map +1 -1
- package/dist/hooks/useControllableState.js +3 -3
- package/dist/hooks/useControllableState.js.map +1 -1
- package/dist/hooks/useDebounce.js +3 -3
- package/dist/hooks/useDebounce.js.map +1 -1
- package/dist/hooks/useEventCallback.js +4 -4
- package/dist/hooks/useEventCallback.js.map +1 -1
- 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.js +4 -4
- package/dist/hooks/useId.js.map +1 -1
- package/dist/hooks/useIntersectionObserver.js +3 -3
- package/dist/hooks/useIntersectionObserver.js.map +1 -1
- package/dist/hooks/useInterval.js +4 -4
- package/dist/hooks/useInterval.js.map +1 -1
- package/dist/hooks/useLocalStorage.js +4 -4
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useMediaQuery.js +3 -3
- package/dist/hooks/useMediaQuery.js.map +1 -1
- package/dist/hooks/useMergedRefs.js +2 -2
- package/dist/hooks/useMergedRefs.js.map +1 -1
- package/dist/hooks/useOnClickOutside.js +2 -2
- package/dist/hooks/useOnClickOutside.js.map +1 -1
- package/dist/hooks/usePrevious.js +3 -3
- package/dist/hooks/usePrevious.js.map +1 -1
- package/dist/hooks/useThrottle.js +7 -7
- package/dist/hooks/useThrottle.js.map +1 -1
- package/dist/hooks/useTimeout.js +4 -4
- package/dist/hooks/useTimeout.js.map +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +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/package.json +7 -8
- package/src/components/ui/calendar.tsx +2 -1
- package/src/components/ui/chart.tsx +2 -2
- package/src/components/ui/form.tsx +28 -3
- package/src/components/ui/input-otp.tsx +3 -3
- package/src/components/ui/resizable.tsx +15 -18
- package/src/components/ui/{sonner.module.css → toast.module.css} +1 -1
- package/src/components/ui/{sonner.tsx → toast.tsx} +2 -2
- package/src/index.ts +4 -4
- 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
- package/dist/rslib-runtime.js +0 -39
- package/dist/rslib-runtime.js.map +0 -1
|
@@ -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/command.module.css","webpack://./src/components/ui/command.module.css"],"names":[],"mappings":"AAAA;ECCE,sCAAsC;EACtC,kCAAkC;EAClC,2BAA2B;EAC3B,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,aAAa;EACb,aAAa;EACb,gBAAgB;AAClB;;ADV8L;ECa5L,mBAAmB;EACnB,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,WAAW;EACX,YAAY;EACZ,UAAU;EACV,kBAAkB;EAClB,gBAAgB;AAClB;;ADtBkU;ECyBhU,kBAAkB;EAClB,kBAAkB;EAClB,+CAA+C;EAC/C,aAAa;EACb,2BAA2B;EAC3B,eAAe;EACf,QAAQ;;ED/Byd;IAAuC,kBAAA;ECmCxgB;;EDnC0hB;ICsCxhB,UAAU;EACZ;AACF;;ADxCmlB;EC2CjlB,sCAAsC;EACtC,kCAAkC;EAClC,kCAAkC;EAClC,sBAAsB;EACtB,2BAA2B;EAC3B,4BAA4B;EAC5B,qFAAqF;EACrF,cAAc;EACd,sBAAsB;EACtB,+BAA+B;EAC/B,UAAU;EACV,aAAa;EACb,eAAe;EACf,QAAQ;EACR,SAAS;EACT,gBAAgB;EAChB,gCAAgC;EAChC,iEAAiE;;ED5DiiC;IC+DhmC,UAAU;IACV,2CAA2C;EAC7C;AACF;;ADlEqsC;ECqEnsC,yCAAyC;EACzC,iCAAiC;EACjC,mBAAmB;EACnB,aAAa;AACf;;ADzE6zC;EC4E3zC,eAAe;EACf,+BAA+B;EAC/B,WAAW;EACX,cAAc;EACd,cAAc;AAChB;;ADjF85C;ECoF55C,kCAAkC;EAClC,cAAc;EACd,YAAY;EACZ,gCAAgC;EAChC,uBAAuB;EACvB,SAAS;EACT,aAAa;EACb,WAAW;EACX,eAAe;;ED5F6jD;IC+F1kD,iCAAiC;EACnC;;EDhG4nD;ICmG1nD,mBAAmB;IACnB,WAAW;EACb;AACF;;ADtGwqD;ECyGtqD,4BAA4B;EAC5B,aAAa;EACb,0BAA0B;EAC1B,uCAAuC;EACvC,iCAAiC;EACjC,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,qBAAqB;AACvB;;ADlHq4D;ECqHn4D,4BAA4B;EAC5B,gCAAgC;EAChC,kBAAkB;AACpB;;ADxH09D;EC2Hx9D,cAAc;EACd,cAAc;EACd,gBAAgB;;ED7H2/D;ICgIzgE,sCAAsC;IACtC,8BAA8B;IAC9B,eAAe;EACjB;AACF;;ADpI0mE;ECuIxmE,iCAAiC;EACjC,4BAA4B;EAC5B,qBAAqB;EACrB,4CAA4C;EAC5C,gBAAgB;AAClB;;AD5IswE;EC+IpwE,kCAAkC;EAClC,WAAW;EACX,2CAA2C;AAC7C;;ADlJy2E;ECqJv2E,kCAAkC;EAClC,eAAe;EACf,4BAA4B;EAC5B,mBAAmB;EACnB,sBAAsB;EACtB,gCAAgC;EAChC,sFAAsF;EACtF,yBAAyB;EACzB,iBAAiB;EACjB,aAAa;EACb,gBAAgB;EAChB,aAAa;EACb,kBAAkB;AACpB;;ADlKwqF;ECqKtqF,kCAAkC;EAClC,kCAAkC;AACpC;;ADvKswF;EC0KpwF,WAAW;EACX,oBAAoB;AACtB;;AD5K+zF;EC+K7zF,0CAA0C;AAC5C;;ADhL63F;ECmL33F,oBAAoB;EACpB,cAAc;EACd,cAAc;EACd,eAAe;AACjB;;ADvLs8F;EC0Lp8F,iCAAiC;EACjC,4BAA4B;EAC5B,oBAAoB;EACpB,iBAAiB;AACnB","sourcesContent":[".command{background-color:var(--ac-background);border-radius:var(--ac-radius-md);color:var(--ac-foreground);display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden;width:100%}.srOnly{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0;white-space:nowrap}.backdrop{background-color:rgba(0,0,0,.5);inset:0;min-height:100dvh;position:fixed;touch-action:none;transition:opacity var(--ac-transition-normal);z-index:9999;@supports (-webkit-touch-callout:none){position:absolute}&[data-ending-style],&[data-starting-style]{opacity:0}}.dialogPopup{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);display:flex;flex-direction:column;left:50%;max-height:min(90vh,44rem);overflow:hidden;padding:0;position:fixed;top:50%;transform:translate(-50%,-50%);transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal);width:min(34rem,calc(100vw - 2rem));z-index:10000;&[data-ending-style],&[data-starting-style]{opacity:0;transform:translate(-50%,-50%) scale(.95)}}.inputWrapper{align-items:center;border-bottom:1px solid var(--ac-border);display:flex;padding-inline:var(--ac-space-4)}.searchIcon{flex-shrink:0;height:1.25rem;margin-right:var(--ac-space-3);opacity:.5;width:1.25rem}.input{background-color:transparent;border:0;border-radius:var(--ac-radius-md);color:inherit;font-size:1rem;height:3rem;outline:none;padding-block:var(--ac-space-3);width:100%;&::placeholder{color:var(--ac-muted-foreground)}&:disabled{cursor:not-allowed;opacity:.5}}.list{display:flex;flex:1;flex-direction:column;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:var(--ac-space-2);scroll-padding-block:var(--ac-space-1);-webkit-overflow-scrolling:touch}.empty{font-size:var(--ac-text-sm);padding-block:var(--ac-space-6);text-align:center}.group{color:inherit;overflow:hidden;padding:2px 0;&+.group{border-top:1px solid var(--ac-border);margin-top:2px;padding-top:var(--ac-space-1)}}.groupHeading{color:var(--ac-muted-foreground);font-size:var(--ac-text-xs);font-weight:500;letter-spacing:.02em;padding:var(--ac-space-1) var(--ac-space-3)}.separator{background-color:var(--ac-border);height:1px;margin:var(--ac-space-1) var(--ac-space-1)}.item{align-items:center;border-radius:var(--ac-radius-sm);cursor:pointer;display:flex;font-size:var(--ac-text-sm);gap:var(--ac-space-3);line-height:1.5;outline:none;padding:.5rem var(--ac-space-3);position:relative;transition:background-color var(--ac-transition-fast),color var(--ac-transition-fast);user-select:none}.item[data-selected=true]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.item[data-disabled=true]{opacity:.5;pointer-events:none}.item:focus-visible{box-shadow:inset 0 0 0 2px var(--ac-ring)}.item svg{flex-shrink:0;height:1.25rem;pointer-events:none;width:1.25rem}.shortcut{color:var(--ac-muted-foreground);font-size:var(--ac-text-xs);letter-spacing:.2em;margin-left:auto}",".command {\n background-color: var(--ac-background);\n border-radius: var(--ac-radius-md);\n color: var(--ac-foreground);\n flex-direction: column;\n flex: 1;\n width: 100%;\n min-height: 0;\n display: flex;\n overflow: hidden;\n}\n\n.srOnly {\n clip: rect(0,0,0,0);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.backdrop {\n touch-action: none;\n min-height: 100dvh;\n transition: opacity var(--ac-transition-normal);\n z-index: 9999;\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.dialogPopup {\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-height: min(90vh, 44rem);\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n z-index: 10000;\n flex-direction: column;\n width: min(34rem, 100vw - 2rem);\n padding: 0;\n display: flex;\n position: fixed;\n top: 50%;\n left: 50%;\n overflow: hidden;\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.inputWrapper {\n border-bottom: 1px solid var(--ac-border);\n padding-inline: var(--ac-space-4);\n align-items: center;\n display: flex;\n}\n\n.searchIcon {\n height: 1.25rem;\n margin-right: var(--ac-space-3);\n opacity: .5;\n flex-shrink: 0;\n width: 1.25rem;\n}\n\n.input {\n border-radius: var(--ac-radius-md);\n color: inherit;\n height: 3rem;\n padding-block: var(--ac-space-3);\n background-color: #0000;\n border: 0;\n outline: none;\n width: 100%;\n font-size: 1rem;\n\n &::placeholder {\n color: var(--ac-muted-foreground);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: .5;\n }\n}\n\n.list {\n overscroll-behavior: contain;\n min-height: 0;\n padding: var(--ac-space-2);\n scroll-padding-block: var(--ac-space-1);\n -webkit-overflow-scrolling: touch;\n flex-direction: column;\n flex: 1;\n display: flex;\n overflow: hidden auto;\n}\n\n.empty {\n font-size: var(--ac-text-sm);\n padding-block: var(--ac-space-6);\n text-align: center;\n}\n\n.group {\n color: inherit;\n padding: 2px 0;\n overflow: hidden;\n\n & + .group {\n border-top: 1px solid var(--ac-border);\n padding-top: var(--ac-space-1);\n margin-top: 2px;\n }\n}\n\n.groupHeading {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-xs);\n letter-spacing: .02em;\n padding: var(--ac-space-1) var(--ac-space-3);\n font-weight: 500;\n}\n\n.separator {\n background-color: var(--ac-border);\n height: 1px;\n margin: var(--ac-space-1) var(--ac-space-1);\n}\n\n.item {\n border-radius: var(--ac-radius-sm);\n cursor: pointer;\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-3);\n padding: .5rem var(--ac-space-3);\n transition: background-color var(--ac-transition-fast),color var(--ac-transition-fast);\n -webkit-user-select: none;\n user-select: none;\n outline: none;\n line-height: 1.5;\n display: flex;\n position: relative;\n}\n\n.item[data-selected=\"true\"] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.item[data-disabled=\"true\"] {\n opacity: .5;\n pointer-events: none;\n}\n\n.item:focus-visible {\n box-shadow: inset 0 0 0 2px var(--ac-ring);\n}\n\n.item svg {\n pointer-events: none;\n flex-shrink: 0;\n width: 1.25rem;\n height: 1.25rem;\n}\n\n.shortcut {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-xs);\n letter-spacing: .2em;\n margin-left: auto;\n}\n"],"sourceRoot":""}
|
|
@@ -4,9 +4,9 @@ import { ContextMenu } from "@base-ui/react/context-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 context_menu_module from "./context-menu.module.js";
|
|
9
|
+
import * as __rspack_external_react from "react";
|
|
10
10
|
function context_menu_ContextMenu(props) {
|
|
11
11
|
return /*#__PURE__*/ jsx(ContextMenu.Root, {
|
|
12
12
|
...props
|
|
@@ -16,9 +16,9 @@ const ContextMenuGroup = ContextMenu.Group;
|
|
|
16
16
|
const ContextMenuPortal = ContextMenu.Portal;
|
|
17
17
|
const ContextMenuRadioGroup = ContextMenu.RadioGroup;
|
|
18
18
|
const ContextMenuSub = ContextMenu.SubmenuRoot;
|
|
19
|
-
const ContextMenuTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
19
|
+
const ContextMenuTrigger = /*#__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(ContextMenu.Trigger, {
|
|
23
23
|
ref: ref,
|
|
24
24
|
...otherProps,
|
|
@@ -73,7 +73,7 @@ function ContextMenuSubContent(props) {
|
|
|
73
73
|
})
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
const ContextMenuContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
76
|
+
const ContextMenuContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
77
77
|
const { className, children, render, ...otherProps } = props;
|
|
78
78
|
return /*#__PURE__*/ jsx(ContextMenuPortal, {
|
|
79
79
|
children: /*#__PURE__*/ jsx(ContextMenu.Positioner, {
|
|
@@ -100,7 +100,7 @@ const ContextMenuContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
100
100
|
});
|
|
101
101
|
function ContextMenuItem(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(ContextMenu.Item, {
|
|
105
105
|
...otherProps,
|
|
106
106
|
render: useRender({
|
|
@@ -190,7 +190,7 @@ function ContextMenuSeparator(props) {
|
|
|
190
190
|
}
|
|
191
191
|
function ContextMenuShortcut(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,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/context-menu.js","sources":["../../../src/components/ui/context-menu.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {ContextMenu as BaseContextMenu} from \"@base-ui/react/context-menu\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./context-menu.module.css\";\r\n\r\ninterface ContextMenuProps extends React.ComponentPropsWithRef<typeof BaseContextMenu.Root> {}\r\n\r\ninterface ContextMenuTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Trigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface ContextMenuSubTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.SubmenuTrigger>, \"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 * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n}\r\n\r\ninterface ContextMenuContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Positioner>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface ContextMenuItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Item>, \"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 * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\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 ContextMenuCheckboxItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.CheckboxItem>, \"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 ContextMenuRadioItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.RadioItem>, \"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 ContextMenuLabelProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.GroupLabel>, \"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 * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n}\r\n\r\ninterface ContextMenuSeparatorProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Separator>, \"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 ContextMenuShortcutProps extends React.ComponentPropsWithRef<\"span\"> {\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\n/**\r\n * Coordinates context menu 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/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenu>Content</ContextMenu>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenu(props: Readonly<ContextMenu.Props>): React.ReactElement {\r\n return <BaseContextMenu.Root {...props} />;\r\n}\r\n\r\n/**\r\n * Renders the context menu group.\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/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuGroup>Content</ContextMenuGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuGroup = BaseContextMenu.Group;\r\n/**\r\n * Provides the context menu 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/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuPortal>Content</ContextMenuPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuPortal = BaseContextMenu.Portal;\r\n/**\r\n * Coordinates the context menu radio group.\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/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuRadioGroup>Content</ContextMenuRadioGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuRadioGroup = BaseContextMenu.RadioGroup;\r\n/**\r\n * Coordinates the context menu sub.\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/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSub>Content</ContextMenuSub>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuSub: typeof BaseContextMenu.SubmenuRoot & {displayName?: string} = BaseContextMenu.SubmenuRoot;\r\n\r\n/**\r\n * Renders the context menu trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuTrigger>Content</ContextMenuTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuTrigger = React.forwardRef<React.ComponentRef<typeof BaseContextMenu.Trigger>, ContextMenuTrigger.Props>(\r\n (props: Readonly<ContextMenuTrigger.Props>, ref): 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 (\r\n <BaseContextMenu.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseContextMenu.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the context menu sub trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSubTrigger>Content</ContextMenuSubTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSubTrigger(props: Readonly<ContextMenuSubTrigger.Props>): React.ReactElement {\r\n const {className, children, inset = false, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.SubmenuTrigger\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.subTrigger, inset && styles.inset, className)}, {}),\r\n })}>\r\n {children}\r\n <ChevronRight className={styles.subTriggerIcon} />\r\n </BaseContextMenu.SubmenuTrigger>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu sub 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/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSubContent>Content</ContextMenuSubContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSubContent(props: Readonly<ContextMenuContent.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseContextMenu.Popup\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.content, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.Popup>\r\n </BaseContextMenu.Positioner>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu 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/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuContent>Content</ContextMenuContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuContent = React.forwardRef<React.ComponentRef<typeof BaseContextMenu.Popup>, ContextMenuContent.Props>(\r\n (props: Readonly<ContextMenuContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <ContextMenuPortal>\r\n <BaseContextMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseContextMenu.Popup\r\n ref={ref}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.content, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.Popup>\r\n </BaseContextMenu.Positioner>\r\n </ContextMenuPortal>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the context menu item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuItem>Content</ContextMenuItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuItem(props: Readonly<ContextMenuItem.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, inset = false, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseContextMenu.Item\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.item, inset && styles.inset, className)}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseContextMenu.Item>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu checkbox item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuCheckboxItem>Content</ContextMenuCheckboxItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuCheckboxItem(props: Readonly<ContextMenuCheckboxItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.CheckboxItem\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.indicatorItem, className)}, {}),\r\n })}>\r\n <span className={styles.indicatorSlot}>\r\n <BaseContextMenu.CheckboxItemIndicator>\r\n <Check className={styles.indicatorIcon} />\r\n </BaseContextMenu.CheckboxItemIndicator>\r\n </span>\r\n {children}\r\n </BaseContextMenu.CheckboxItem>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu radio item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuRadioItem>Content</ContextMenuRadioItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuRadioItem(props: Readonly<ContextMenuRadioItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.RadioItem\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.indicatorItem, className)}, {}),\r\n })}>\r\n <span className={styles.indicatorSlot}>\r\n <BaseContextMenu.RadioItemIndicator>\r\n <Circle className={styles.radioIndicatorIcon} />\r\n </BaseContextMenu.RadioItemIndicator>\r\n </span>\r\n {children}\r\n </BaseContextMenu.RadioItem>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu label.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuLabel>Content</ContextMenuLabel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuLabel(props: Readonly<ContextMenuLabel.Props>): React.ReactElement {\r\n const {className, children, inset = false, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.GroupLabel\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.label, inset && styles.inset, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.GroupLabel>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu separator.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSeparator>Content</ContextMenuSeparator>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSeparator(props: Readonly<ContextMenuSeparator.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.Separator\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.separator, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu shortcut.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuShortcut>Content</ContextMenuShortcut>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuShortcut(props: Readonly<ContextMenuShortcut.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: \"span\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.shortcut, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenu {\r\n export type Props = ContextMenuProps;\r\n export type State = BaseContextMenu.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuTrigger {\r\n export type Props = ContextMenuTriggerProps;\r\n export type State = BaseContextMenu.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSubTrigger {\r\n export type Props = ContextMenuSubTriggerProps;\r\n export type State = BaseContextMenu.SubmenuTrigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuContent {\r\n export type Props = ContextMenuContentProps;\r\n export type State = BaseContextMenu.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSubContent {\r\n export type Props = ContextMenuContentProps;\r\n export type State = BaseContextMenu.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuItem {\r\n export type Props = ContextMenuItemProps;\r\n export type State = BaseContextMenu.Item.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuCheckboxItem {\r\n export type Props = ContextMenuCheckboxItemProps;\r\n export type State = BaseContextMenu.CheckboxItem.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuRadioItem {\r\n export type Props = ContextMenuRadioItemProps;\r\n export type State = BaseContextMenu.RadioItem.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuLabel {\r\n export type Props = ContextMenuLabelProps;\r\n export type State = BaseContextMenu.GroupLabel.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSeparator {\r\n export type Props = ContextMenuSeparatorProps;\r\n export type State = BaseContextMenu.Separator.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuShortcut {\r\n export type Props = ContextMenuShortcutProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\nContextMenu.displayName = \"ContextMenu\";\r\nContextMenuGroup.displayName = \"ContextMenuGroup\";\r\nContextMenuPortal.displayName = \"ContextMenuPortal\";\r\nContextMenuRadioGroup.displayName = \"ContextMenuRadioGroup\";\r\nContextMenuSub.displayName = \"ContextMenuSub\";\r\nContextMenuTrigger.displayName = \"ContextMenuTrigger\";\r\nContextMenuSubTrigger.displayName = \"ContextMenuSubTrigger\";\r\nContextMenuSubContent.displayName = \"ContextMenuSubContent\";\r\nContextMenuContent.displayName = \"ContextMenuContent\";\r\nContextMenuItem.displayName = \"ContextMenuItem\";\r\nContextMenuCheckboxItem.displayName = \"ContextMenuCheckboxItem\";\r\nContextMenuRadioItem.displayName = \"ContextMenuRadioItem\";\r\nContextMenuLabel.displayName = \"ContextMenuLabel\";\r\nContextMenuSeparator.displayName = \"ContextMenuSeparator\";\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuCheckboxItem,\r\n ContextMenuContent,\r\n ContextMenuGroup,\r\n ContextMenuItem,\r\n ContextMenuLabel,\r\n ContextMenuPortal,\r\n ContextMenuRadioGroup,\r\n ContextMenuRadioItem,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuTrigger,\r\n};\r\n"],"names":["ContextMenu","props","BaseContextMenu","ContextMenuGroup","ContextMenuPortal","ContextMenuRadioGroup","ContextMenuSub","ContextMenuTrigger","React","ref","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","ContextMenuSubTrigger","inset","cn","styles","ChevronRight","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","Check","ContextMenuRadioItem","Circle","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"mappings":";;;;;;;;;AA0IA,SAASA,yBAAYC,KAAkC;IACrD,OAAO,WAAP,GAAO,IAACC,YAAAA,IAAoB;QAAE,GAAGD,KAAK;;AACxC;AAiBA,MAAME,mBAAmBD,YAAAA,KAAqB;AAgB9C,MAAME,oBAAoBF,YAAAA,MAAsB;AAgBhD,MAAMG,wBAAwBH,YAAAA,UAA0B;AAgBxD,MAAMI,iBAA8EJ,YAAAA,WAA2B;AAiB/G,MAAMK,qBAAqB,WAAHA,GAAGC,WACzB,CAACP,OAA2CQ;IAE1C,MAAM,EAACC,UAAU,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGb;IACtE,MAAMc,aAAaL,WAAW,WAAXA,GAAWF,eAAqBG,YAAYA,WAAWE;IAE1E,OAAO,WAAP,GACE,IAACX,YAAAA,OAAuB;QACtB,KAAKO;QACJ,GAAGK,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQD;YACR,OAAOE,WAAW;gBAACL;YAAS,GAAG,CAAC;QAClC;kBACCG,aAAaG,SAAYP;;AAGhC;AAkBF,SAASQ,sBAAsBlB,KAA4C;IACzE,MAAM,EAACW,SAAS,EAAED,QAAQ,EAAES,QAAQ,KAAK,EAAEP,MAAM,EAAE,GAAGC,YAAW,GAAGb;IAEpE,OAAO,WAAP,GACE,KAACC,YAAAA,cAA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AYP;QACrC;IACF;AACF;AAoEAX,yBAAY,WAAW,GAAG;AAC1BG,iBAAiB,WAAW,GAAG;AAC/BC,kBAAkB,WAAW,GAAG;AAChCC,sBAAsB,WAAW,GAAG;AACpCC,eAAe,WAAW,GAAG;AAC7BC,mBAAmB,WAAW,GAAG;AACjCY,sBAAsB,WAAW,GAAG;AACpCK,sBAAsB,WAAW,GAAG;AACpCC,mBAAmB,WAAW,GAAG;AACjCC,gBAAgB,WAAW,GAAG;AAC9BC,wBAAwB,WAAW,GAAG;AACtCE,qBAAqB,WAAW,GAAG;AACnCE,iBAAiB,WAAW,GAAG;AAC/BC,qBAAqB,WAAW,GAAG;AACnCC,oBAAoB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/context-menu.js","sources":["../../../src/components/ui/context-menu.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {ContextMenu as BaseContextMenu} from \"@base-ui/react/context-menu\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./context-menu.module.css\";\r\n\r\ninterface ContextMenuProps extends React.ComponentPropsWithRef<typeof BaseContextMenu.Root> {}\r\n\r\ninterface ContextMenuTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Trigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface ContextMenuSubTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.SubmenuTrigger>, \"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 * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n}\r\n\r\ninterface ContextMenuContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Positioner>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface ContextMenuItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Item>, \"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 * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\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 ContextMenuCheckboxItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.CheckboxItem>, \"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 ContextMenuRadioItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.RadioItem>, \"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 ContextMenuLabelProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.GroupLabel>, \"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 * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n}\r\n\r\ninterface ContextMenuSeparatorProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Separator>, \"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 ContextMenuShortcutProps extends React.ComponentPropsWithRef<\"span\"> {\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\n/**\r\n * Coordinates context menu 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/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenu>Content</ContextMenu>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenu(props: Readonly<ContextMenu.Props>): React.ReactElement {\r\n return <BaseContextMenu.Root {...props} />;\r\n}\r\n\r\n/**\r\n * Renders the context menu group.\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/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuGroup>Content</ContextMenuGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuGroup = BaseContextMenu.Group;\r\n/**\r\n * Provides the context menu 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/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuPortal>Content</ContextMenuPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuPortal = BaseContextMenu.Portal;\r\n/**\r\n * Coordinates the context menu radio group.\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/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuRadioGroup>Content</ContextMenuRadioGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuRadioGroup = BaseContextMenu.RadioGroup;\r\n/**\r\n * Coordinates the context menu sub.\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/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSub>Content</ContextMenuSub>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuSub: typeof BaseContextMenu.SubmenuRoot & {displayName?: string} = BaseContextMenu.SubmenuRoot;\r\n\r\n/**\r\n * Renders the context menu trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuTrigger>Content</ContextMenuTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuTrigger = React.forwardRef<React.ComponentRef<typeof BaseContextMenu.Trigger>, ContextMenuTrigger.Props>(\r\n (props: Readonly<ContextMenuTrigger.Props>, ref): 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 (\r\n <BaseContextMenu.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseContextMenu.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the context menu sub trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSubTrigger>Content</ContextMenuSubTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSubTrigger(props: Readonly<ContextMenuSubTrigger.Props>): React.ReactElement {\r\n const {className, children, inset = false, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.SubmenuTrigger\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.subTrigger, inset && styles.inset, className)}, {}),\r\n })}>\r\n {children}\r\n <ChevronRight className={styles.subTriggerIcon} />\r\n </BaseContextMenu.SubmenuTrigger>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu sub 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/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSubContent>Content</ContextMenuSubContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSubContent(props: Readonly<ContextMenuContent.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseContextMenu.Popup\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.content, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.Popup>\r\n </BaseContextMenu.Positioner>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu 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/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuContent>Content</ContextMenuContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuContent = React.forwardRef<React.ComponentRef<typeof BaseContextMenu.Popup>, ContextMenuContent.Props>(\r\n (props: Readonly<ContextMenuContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <ContextMenuPortal>\r\n <BaseContextMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseContextMenu.Popup\r\n ref={ref}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.content, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.Popup>\r\n </BaseContextMenu.Positioner>\r\n </ContextMenuPortal>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the context menu item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuItem>Content</ContextMenuItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuItem(props: Readonly<ContextMenuItem.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, inset = false, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseContextMenu.Item\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.item, inset && styles.inset, className)}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseContextMenu.Item>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu checkbox item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuCheckboxItem>Content</ContextMenuCheckboxItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuCheckboxItem(props: Readonly<ContextMenuCheckboxItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.CheckboxItem\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.indicatorItem, className)}, {}),\r\n })}>\r\n <span className={styles.indicatorSlot}>\r\n <BaseContextMenu.CheckboxItemIndicator>\r\n <Check className={styles.indicatorIcon} />\r\n </BaseContextMenu.CheckboxItemIndicator>\r\n </span>\r\n {children}\r\n </BaseContextMenu.CheckboxItem>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu radio item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuRadioItem>Content</ContextMenuRadioItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuRadioItem(props: Readonly<ContextMenuRadioItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.RadioItem\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.indicatorItem, className)}, {}),\r\n })}>\r\n <span className={styles.indicatorSlot}>\r\n <BaseContextMenu.RadioItemIndicator>\r\n <Circle className={styles.radioIndicatorIcon} />\r\n </BaseContextMenu.RadioItemIndicator>\r\n </span>\r\n {children}\r\n </BaseContextMenu.RadioItem>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu label.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuLabel>Content</ContextMenuLabel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuLabel(props: Readonly<ContextMenuLabel.Props>): React.ReactElement {\r\n const {className, children, inset = false, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.GroupLabel\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.label, inset && styles.inset, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.GroupLabel>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu separator.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSeparator>Content</ContextMenuSeparator>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSeparator(props: Readonly<ContextMenuSeparator.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.Separator\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.separator, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu shortcut.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuShortcut>Content</ContextMenuShortcut>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuShortcut(props: Readonly<ContextMenuShortcut.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: \"span\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.shortcut, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenu {\r\n export type Props = ContextMenuProps;\r\n export type State = BaseContextMenu.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuTrigger {\r\n export type Props = ContextMenuTriggerProps;\r\n export type State = BaseContextMenu.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSubTrigger {\r\n export type Props = ContextMenuSubTriggerProps;\r\n export type State = BaseContextMenu.SubmenuTrigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuContent {\r\n export type Props = ContextMenuContentProps;\r\n export type State = BaseContextMenu.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSubContent {\r\n export type Props = ContextMenuContentProps;\r\n export type State = BaseContextMenu.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuItem {\r\n export type Props = ContextMenuItemProps;\r\n export type State = BaseContextMenu.Item.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuCheckboxItem {\r\n export type Props = ContextMenuCheckboxItemProps;\r\n export type State = BaseContextMenu.CheckboxItem.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuRadioItem {\r\n export type Props = ContextMenuRadioItemProps;\r\n export type State = BaseContextMenu.RadioItem.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuLabel {\r\n export type Props = ContextMenuLabelProps;\r\n export type State = BaseContextMenu.GroupLabel.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSeparator {\r\n export type Props = ContextMenuSeparatorProps;\r\n export type State = BaseContextMenu.Separator.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuShortcut {\r\n export type Props = ContextMenuShortcutProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\nContextMenu.displayName = \"ContextMenu\";\r\nContextMenuGroup.displayName = \"ContextMenuGroup\";\r\nContextMenuPortal.displayName = \"ContextMenuPortal\";\r\nContextMenuRadioGroup.displayName = \"ContextMenuRadioGroup\";\r\nContextMenuSub.displayName = \"ContextMenuSub\";\r\nContextMenuTrigger.displayName = \"ContextMenuTrigger\";\r\nContextMenuSubTrigger.displayName = \"ContextMenuSubTrigger\";\r\nContextMenuSubContent.displayName = \"ContextMenuSubContent\";\r\nContextMenuContent.displayName = \"ContextMenuContent\";\r\nContextMenuItem.displayName = \"ContextMenuItem\";\r\nContextMenuCheckboxItem.displayName = \"ContextMenuCheckboxItem\";\r\nContextMenuRadioItem.displayName = \"ContextMenuRadioItem\";\r\nContextMenuLabel.displayName = \"ContextMenuLabel\";\r\nContextMenuSeparator.displayName = \"ContextMenuSeparator\";\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuCheckboxItem,\r\n ContextMenuContent,\r\n ContextMenuGroup,\r\n ContextMenuItem,\r\n ContextMenuLabel,\r\n ContextMenuPortal,\r\n ContextMenuRadioGroup,\r\n ContextMenuRadioItem,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuTrigger,\r\n};\r\n"],"names":["ContextMenu","props","BaseContextMenu","ContextMenuGroup","ContextMenuPortal","ContextMenuRadioGroup","ContextMenuSub","ContextMenuTrigger","React","ref","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","ContextMenuSubTrigger","inset","cn","styles","ChevronRight","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","Check","ContextMenuRadioItem","Circle","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"mappings":";;;;;;;;;AA0IA,SAASA,yBAAYC,KAAkC;IACrD,OAAO,WAAP,GAAO,IAACC,YAAAA,IAAoB;QAAE,GAAGD,KAAK;;AACxC;AAiBA,MAAME,mBAAmBD,YAAAA,KAAqB;AAgB9C,MAAME,oBAAoBF,YAAAA,MAAsB;AAgBhD,MAAMG,wBAAwBH,YAAAA,UAA0B;AAgBxD,MAAM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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/context-menu.module.css","webpack://./src/components/ui/context-menu.module.css"],"names":[],"mappings":"AAAA;ECCE,WAAW;AACb;;ADFuB;ECKrB,mCAAmC;EACnC,kCAAkC;EAClC,kCAAkC;EAClC,mCAAmC;EACnC,mCAAmC;EACnC,gBAAgB;EAChB,0BAA0B;EAC1B,yCAAyC;EACzC,qFAAqF;EACrF,qBAAqB;EACrB,uCAAuC;AACzC;;ADhBoc;ECmBlc,UAAU;EACV,qBAAqB;AACvB;;ADrB6hB;ECwB3hB,kCAAkC;EAClC,cAAc;EACd,eAAe;EACf,4BAA4B;EAC5B,mBAAmB;EACnB,sBAAsB;EACtB,kCAAkC;EAClC,4CAA4C;EAC5C,yBAAyB;EACzB,iBAAiB;EACjB,aAAa;EACb,WAAW;EACX,aAAa;AACf;;ADrC2yB;ECwCzyB,kCAAkC;EAClC,kCAAkC;AACpC;;AD1Cu4B;EC6Cr4B,WAAW;EACX,oBAAoB;AACtB;;AD/C27B;ECkDz7B,gCAAgC;AAClC;;ADnDu+B;ECsDr+B,kCAAkC;EAClC,kCAAkC;AACpC;;ADxDwkC;EC2DtkC,cAAc;EACd,WAAW;EACX,YAAY;EACZ,iBAAiB;AACnB;;AD/D8oC;ECkE5oC,+CAA+C;AACjD;;ADnE4sC;ECsE1sC,YAAY;EACZ,uBAAuB;EACvB,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,oBAAoB;EACpB,kBAAkB;AACpB;;AD7Ey1C;ECgFv1C,cAAc;EACd,eAAe;AACjB;;ADlFy5C;ECqFv5C,kBAAkB;AACpB;;ADtF+7C;ECyF77C,2BAA2B;EAC3B,4BAA4B;EAC5B,4CAA4C;EAC5C,gBAAgB;AAClB;;AD7FyjD;ECgGvjD,+CAA+C;AACjD;;ADjG+mD;ECoG7mD,kCAAkC;EAClC,WAAW;EACX,oDAAoD;AACtD;;ADvG2tD;EC0GztD,iCAAiC;EACjC,4BAA4B;EAC5B,qBAAqB;EACrB,iBAAiB;AACnB","sourcesContent":[".positioner{z-index:50}.content{background-color:var(--ac-popover);border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);box-shadow:0 16px 40px -16px rgba(0,0,0,.35);color:var(--ac-popover-foreground);max-height:var(--available-height);min-width:12rem;overflow-x:hidden;overflow-y:auto;padding:var(--ac-space-1);transform-origin:var(--transform-origin);transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal)}.content[data-ending-style],.content[data-starting-style]{opacity:0;transform:scale(.96)}.item{align-items:center;border-radius:var(--ac-radius-sm);color:inherit;cursor:default;display:flex;font-size:var(--ac-text-sm);gap:var(--ac-space-2);min-height:var(--ac-size-default);outline:none;padding:var(--ac-space-1) var(--ac-space-2);user-select:none;width:100%}.item[data-highlighted]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.item[data-disabled]{opacity:.5;pointer-events:none}.subTrigger{padding-right:var(--ac-space-3)}.subTrigger[data-popup-open]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.subTriggerIcon{flex-shrink:0;height:1rem;margin-left:auto;width:1rem}.indicatorItem{padding-left:calc(var(--ac-space-2) + 1.25rem)}.indicatorSlot{align-items:center;display:inline-flex;height:1rem;justify-content:center;left:var(--ac-space-2);position:absolute;width:1rem}.indicatorIcon,.radioIndicatorIcon{height:.875rem;width:.875rem}.radioIndicatorIcon{fill:currentcolor}.label{color:var(--ac-foreground);font-size:var(--ac-text-sm);font-weight:600;padding:var(--ac-space-1) var(--ac-space-2)}.inset{padding-left:calc(var(--ac-space-2) + 1.25rem)}.separator{background-color:var(--ac-border);height:1px;margin:var(--ac-space-1) calc(var(--ac-space-1)*-1)}.shortcut{color:var(--ac-muted-foreground);font-size:var(--ac-text-xs);letter-spacing:.08em;margin-left:auto}",".positioner {\n z-index: 50;\n}\n\n.content {\n background-color: var(--ac-popover);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n color: var(--ac-popover-foreground);\n max-height: var(--available-height);\n min-width: 12rem;\n padding: var(--ac-space-1);\n transform-origin: var(--transform-origin);\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n overflow: hidden auto;\n box-shadow: 0 16px 40px -16px #00000059;\n}\n\n.content[data-ending-style], .content[data-starting-style] {\n opacity: 0;\n transform: scale(.96);\n}\n\n.item {\n border-radius: var(--ac-radius-sm);\n color: inherit;\n cursor: default;\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-2);\n min-height: var(--ac-size-default);\n padding: var(--ac-space-1) var(--ac-space-2);\n -webkit-user-select: none;\n user-select: none;\n outline: none;\n width: 100%;\n display: flex;\n}\n\n.item[data-highlighted] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.item[data-disabled] {\n opacity: .5;\n pointer-events: none;\n}\n\n.subTrigger {\n padding-right: var(--ac-space-3);\n}\n\n.subTrigger[data-popup-open] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.subTriggerIcon {\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n margin-left: auto;\n}\n\n.indicatorItem {\n padding-left: calc(var(--ac-space-2) + 1.25rem);\n}\n\n.indicatorSlot {\n height: 1rem;\n left: var(--ac-space-2);\n justify-content: center;\n align-items: center;\n width: 1rem;\n display: inline-flex;\n position: absolute;\n}\n\n.indicatorIcon, .radioIndicatorIcon {\n width: .875rem;\n height: .875rem;\n}\n\n.radioIndicatorIcon {\n fill: currentColor;\n}\n\n.label {\n color: var(--ac-foreground);\n font-size: var(--ac-text-sm);\n padding: var(--ac-space-1) var(--ac-space-2);\n font-weight: 600;\n}\n\n.inset {\n padding-left: calc(var(--ac-space-2) + 1.25rem);\n}\n\n.separator {\n background-color: var(--ac-border);\n height: 1px;\n margin: var(--ac-space-1) calc(var(--ac-space-1)*-1);\n}\n\n.shortcut {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-xs);\n letter-spacing: .08em;\n margin-left: auto;\n}\n"],"sourceRoot":""}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Check, Copy } from "lucide-react";
|
|
4
|
-
import { forwardRef, useCallback, useEffect, useRef, useState } from "react";
|
|
5
4
|
import { cn } from "../../lib/utilities.js";
|
|
6
5
|
import copy_button_module from "./copy-button.module.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
6
|
+
import * as __rspack_external_react from "react";
|
|
7
|
+
const CopyButton = /*#__PURE__*/ __rspack_external_react.forwardRef(({ value, timeout = 2000, className, onClick, disabled, ...props }, ref)=>{
|
|
8
|
+
const [copied, setCopied] = __rspack_external_react.useState(false);
|
|
9
|
+
const timeoutRef = __rspack_external_react.useRef(null);
|
|
10
|
+
__rspack_external_react.useEffect(()=>()=>{
|
|
11
11
|
if (null !== timeoutRef.current) globalThis.clearTimeout(timeoutRef.current);
|
|
12
12
|
}, []);
|
|
13
|
-
const handleCopy = useCallback(async (event)=>{
|
|
13
|
+
const handleCopy = __rspack_external_react.useCallback(async (event)=>{
|
|
14
14
|
onClick?.(event);
|
|
15
15
|
const { clipboard } = globalThis.navigator;
|
|
16
16
|
if (event.defaultPrevented || disabled || !clipboard?.writeText) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/copy-button.js","sources":["../../../src/components/ui/copy-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Check, Copy} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./copy-button.module.css\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link CopyButton} component.\r\n *\r\n * @remarks\r\n * Extends native `<button>` attributes while reserving `children` for the internal icon\r\n * swap and exposing a required clipboard value.\r\n */\r\ninterface CopyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\r\n /**\r\n * The text value copied to the clipboard when the button is activated.\r\n */\r\n value: string;\r\n /**\r\n * Duration in milliseconds to show the success state before restoring the copy icon.\r\n *\r\n * @default 2000\r\n */\r\n timeout?: number;\r\n}\r\n\r\n/**\r\n * A compact icon button that copies text to the clipboard.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Client component.\r\n *\r\n * Uses `navigator.clipboard.writeText` when available and swaps from a copy icon to a\r\n * confirmation icon for a configurable duration after a successful copy. If clipboard\r\n * access fails, the button remains interactive without throwing to the UI.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CopyButton value=\"npm install @arolariu/components\" />\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText | MDN Clipboard.writeText}\r\n */\r\nconst CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(\r\n ({value, timeout = 2000, className, onClick, disabled, ...props}, ref) => {\r\n const [copied, setCopied] = React.useState(false);\r\n const timeoutRef = React.useRef<ReturnType<typeof globalThis.setTimeout> | null>(null);\r\n\r\n React.useEffect(\r\n () => () => {\r\n if (timeoutRef.current !== null) {\r\n globalThis.clearTimeout(timeoutRef.current);\r\n }\r\n },\r\n [],\r\n );\r\n\r\n const handleCopy = React.useCallback(\r\n async (event: React.MouseEvent<HTMLButtonElement>) => {\r\n onClick?.(event);\r\n\r\n // eslint-disable-next-line n/no-unsupported-features/node-builtins -- Clipboard access is browser-only and required for this client component.\r\n const {clipboard} = globalThis.navigator;\r\n\r\n if (event.defaultPrevented || disabled || !clipboard?.writeText) {\r\n return;\r\n }\r\n\r\n try {\r\n await clipboard.writeText(value);\r\n setCopied(true);\r\n\r\n if (timeoutRef.current !== null) {\r\n globalThis.clearTimeout(timeoutRef.current);\r\n }\r\n\r\n timeoutRef.current = globalThis.setTimeout(() => {\r\n setCopied(false);\r\n }, timeout);\r\n } catch {\r\n // Clipboard access can fail in unsupported or insecure contexts.\r\n }\r\n },\r\n [disabled, onClick, timeout, value],\r\n );\r\n\r\n return (\r\n <button\r\n ref={ref}\r\n type='button'\r\n aria-label={copied ? \"Copied\" : \"Copy to clipboard\"}\r\n className={cn(styles.copyButton, className)}\r\n disabled={disabled}\r\n onClick={handleCopy}\r\n {...props}>\r\n {copied ? (\r\n <Check\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n ) : (\r\n <Copy\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n )}\r\n </button>\r\n );\r\n },\r\n);\r\nCopyButton.displayName = \"CopyButton\";\r\n\r\nexport {CopyButton};\r\nexport type {CopyButtonProps};\r\n"],"names":["CopyButton","React","value","timeout","className","onClick","disabled","props","ref","copied","setCopied","timeoutRef","globalThis","handleCopy","event","clipboard","cn","styles","Check","Copy"],"mappings":";;;;;;AA6CA,MAAMA,aAAa,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/copy-button.js","sources":["../../../src/components/ui/copy-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Check, Copy} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./copy-button.module.css\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link CopyButton} component.\r\n *\r\n * @remarks\r\n * Extends native `<button>` attributes while reserving `children` for the internal icon\r\n * swap and exposing a required clipboard value.\r\n */\r\ninterface CopyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\r\n /**\r\n * The text value copied to the clipboard when the button is activated.\r\n */\r\n value: string;\r\n /**\r\n * Duration in milliseconds to show the success state before restoring the copy icon.\r\n *\r\n * @default 2000\r\n */\r\n timeout?: number;\r\n}\r\n\r\n/**\r\n * A compact icon button that copies text to the clipboard.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Client component.\r\n *\r\n * Uses `navigator.clipboard.writeText` when available and swaps from a copy icon to a\r\n * confirmation icon for a configurable duration after a successful copy. If clipboard\r\n * access fails, the button remains interactive without throwing to the UI.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CopyButton value=\"npm install @arolariu/components\" />\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText | MDN Clipboard.writeText}\r\n */\r\nconst CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(\r\n ({value, timeout = 2000, className, onClick, disabled, ...props}, ref) => {\r\n const [copied, setCopied] = React.useState(false);\r\n const timeoutRef = React.useRef<ReturnType<typeof globalThis.setTimeout> | null>(null);\r\n\r\n React.useEffect(\r\n () => () => {\r\n if (timeoutRef.current !== null) {\r\n globalThis.clearTimeout(timeoutRef.current);\r\n }\r\n },\r\n [],\r\n );\r\n\r\n const handleCopy = React.useCallback(\r\n async (event: React.MouseEvent<HTMLButtonElement>) => {\r\n onClick?.(event);\r\n\r\n // eslint-disable-next-line n/no-unsupported-features/node-builtins -- Clipboard access is browser-only and required for this client component.\r\n const {clipboard} = globalThis.navigator;\r\n\r\n if (event.defaultPrevented || disabled || !clipboard?.writeText) {\r\n return;\r\n }\r\n\r\n try {\r\n await clipboard.writeText(value);\r\n setCopied(true);\r\n\r\n if (timeoutRef.current !== null) {\r\n globalThis.clearTimeout(timeoutRef.current);\r\n }\r\n\r\n timeoutRef.current = globalThis.setTimeout(() => {\r\n setCopied(false);\r\n }, timeout);\r\n } catch {\r\n // Clipboard access can fail in unsupported or insecure contexts.\r\n }\r\n },\r\n [disabled, onClick, timeout, value],\r\n );\r\n\r\n return (\r\n <button\r\n ref={ref}\r\n type='button'\r\n aria-label={copied ? \"Copied\" : \"Copy to clipboard\"}\r\n className={cn(styles.copyButton, className)}\r\n disabled={disabled}\r\n onClick={handleCopy}\r\n {...props}>\r\n {copied ? (\r\n <Check\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n ) : (\r\n <Copy\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n )}\r\n </button>\r\n );\r\n },\r\n);\r\nCopyButton.displayName = \"CopyButton\";\r\n\r\nexport {CopyButton};\r\nexport type {CopyButtonProps};\r\n"],"names":["CopyButton","React","value","timeout","className","onClick","disabled","props","ref","copied","setCopied","timeoutRef","globalThis","handleCopy","event","clipboard","cn","styles","Check","Copy"],"mappings":";;;;;;AA6CA,MAAMA,aAAa,WAAHA,GAAGC,wBAAAA,UAAgB,CACjC,CAAC,EAACC,KAAK,EAAEC,UAAU,IAAI,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EAAEC;IAChE,MAAM,CAACC,QAAQC,UAAU,GAAGT,wBAAAA,QAAc,CAAC;IAC3C,MAAMU,aAAaV,wBAAAA,MAAY,CAAkD;IAEjFA,wBAAAA,SAAe,CACb,IAAM;YACJ,IAAIU,AAAuB,SAAvBA,WAAW,OAAO,EACpBC,WAAW,YAAY,CAACD,WAAW,OAAO;QAE9C,GACA,EAAE;IAGJ,MAAME,aAAaZ,wBAAAA,WAAiB,CAClC,OAAOa;QACLT,UAAUS;QAGV,MAAM,EAACC,SAAS,EAAC,GAAGH,WAAW,SAAS;QAExC,IAAIE,MAAM,gBAAgB,IAAIR,YAAY,CAACS,WAAW,WACpD;QAGF,IAAI;YACF,MAAMA,UAAU,SAAS,CAACb;YAC1BQ,UAAU;YAEV,IAAIC,AAAuB,SAAvBA,WAAW,OAAO,EACpBC,WAAW,YAAY,CAACD,WAAW,OAAO;YAG5CA,WAAW,OAAO,GAAGC,WAAW,UAAU,CAAC;gBACzCF,UAAU;YACZ,GAAGP;QACL,EAAE,OAAM,CAER;IACF,GACA;QAACG;QAAUD;QAASF;QAASD;KAAM;IAGrC,OAAO,WAAP,GACE,IAAC;QACC,KAAKM;QACL,MAAK;QACL,cAAYC,SAAS,WAAW;QAChC,WAAWO,GAAGC,mBAAAA,UAAiB,EAAEb;QACjC,UAAUE;QACV,SAASO;QACR,GAAGN,KAAK;kBACRE,SAAS,WAATA,GACC,IAACS,OAAKA;YACJ,eAAY;YACZ,WAAWD,mBAAAA,IAAW;2BAGxB,IAACE,MAAIA;YACH,eAAY;YACZ,WAAWF,mBAAAA,IAAW;;;AAKhC;AAEFjB,WAAW,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/copy-button.module.css","webpack://./src/components/ui/copy-button.module.css"],"names":[],"mappings":"AAAA;ECCE,kCAAkC;EAClC,kCAAkC;EAClC,iCAAiC;EACjC,eAAe;EACf,0BAA0B;EAC1B,sFAAsF;EACtF,uBAAuB;EACvB,uBAAuB;EACvB,mBAAmB;EACnB,oBAAoB;;EDVqT;ICavU,iCAAiC;IACjC,mBAAmB;EACrB;;EDf6Y;ICkB3Y,mBAAmB;IACnB,WAAW;EACb;;EDpBsb;IAAqB;MCwBvc,kCAAkC;MAClC,kCAAkC;IACpC;EACF;AACF;;AD5B0iB;EC+BxiB,WAAW;EACX,YAAY;AACd","sourcesContent":[".copyButton{align-items:center;background-color:transparent;border:1px solid var(--ac-border);border-radius:var(--ac-radius-sm);color:var(--ac-muted-foreground);cursor:pointer;display:inline-flex;justify-content:center;padding:var(--ac-space-2);transition:color var(--ac-transition-fast),background-color var(--ac-transition-fast);&:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}&:disabled{cursor:not-allowed;opacity:.6}@media (hover:hover){&:hover:not(:disabled){background-color:var(--ac-accent);color:var(--ac-accent-foreground)}}}.icon{height:1rem;width:1rem}",".copyButton {\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-sm);\n color: var(--ac-muted-foreground);\n cursor: pointer;\n padding: var(--ac-space-2);\n transition: color var(--ac-transition-fast),background-color var(--ac-transition-fast);\n background-color: #0000;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n\n &:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: .6;\n }\n\n @media (hover: hover) {\n &:hover:not(:disabled) {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n }\n }\n}\n\n.icon {\n width: 1rem;\n height: 1rem;\n}\n"],"sourceRoot":""}
|
|
@@ -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,eAAe,KAAK,EACpBC,aAAa,IAAI,EACjBC,mBAAmB,GAAG,EACtBC,aAAa;IAAC,WAAW;IAAI,SAAS;AAAE,CAAC,EACzCC,gBAAgB,CAAC,EACjBC,SAAS,EACT,GAAGC,OACJ,EACDC;IAEA,MAAMC,WAAWb,wBAAAA,MAAY,CAAkB;IAE/CA,wBAAAA,mBAAyB,CAACY,KAAK,IAAMC,SAAS,OAAO,EAAG,EAAE;IAE1D,MAAMC,YAAYb,OAAO,QAAQ;IACjC,MAAMc,WAAWD,UAAU,QAAQ,CAAC,OAAQA,UAAU,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,IAAK;IACpF,MAAME,wBAAwB,AAAyB,YAAzB,OAAOP,gBAA6BA,gBAAgBM;IAElF,MAAME,cAAcC,eAAehB;IACnC,MAAMiB,cAAcC,UAAUH,aAAaT;IAC3C,MAAMa,eAAeC,UAAUT,UAAU;QACvC,MAAMP;QACN,QAAQD;IACV;IACA,MAAMkB,WAAW,CAACnB,UAAUiB;IAE5BrB,wBAAAA,SAAe,CAAC;QACd,IAAIuB,UACFN,YAAY,GAAG,CAAChB;IAEpB,GAAG;QAACsB;QAAUN;QAAahB;KAAO;IAElCD,wBAAAA,S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/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,WAAHA,GAAGC,WACpB,CAACH,OAAsCI;IAErC,MAAM,EAACC,UAAU,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGT;IACtE,MAAMU,aAAaL,WAAW,WAAXA,GAAWF,eAAqBG,YAAYA,WAAWE;IAE1E,OAAO,WAAP,GACE,IAACP,OAAAA,OAAkB;QACjB,KAAKG;QACJ,GAAGK,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQD;YACR,OAAOE,WAAW;gBAACL;YAAS,GAAG,CAAC;QAClC;kBACCG,aAAaG,SAAYP;;AAGhC;AAEFJ,cAAc,WAAW,GAAG;AAqB5B,MAAMY,eAAeb,OAAAA,MAAiB;AACtCa,aAAa,WAAW,GAAG;AAkB3B,SAASC,YAAYf,KAAkC;IACrD,MAAM,EAACO,SAAS,EAAED,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,EA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arB,KAAmC;IAEvD,MAAM,EAACK,UAAU,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGT;IACtE,MAAMU,aAAaL,WAAW,WAAXA,GAAWF,eAAqBG,YAAYA,WAAWE;IAE1E,OAAOG,UAAU;QACf,gBAAgB;QAChB,QAAQD;QACR,OAAOE,WAAW;YAAC,WAAWI,GAAGC,cAAAA,MAAa,EAAEV;QAAU,GAAGE,YAAY;YACvE,UAAUC,aAAaG,SAAYP;QACrC;IACF;AACF;AACAe,aAAa,WAAW,GAAG;AAkB3B,SAASC,YAAYtB,KAAkC;IACrD,MAAM,EAACO,SAAS,EAAED,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
|
+
{"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,wBAAAA,UAAgB,CACpC,CAACH,OAAsCI;IAErC,MAAM,EAACC,UAAU,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGT;IACtE,MAAMU,aAAaL,WAAW,WAAXA,GAAWF,wBAAAA,cAAoB,CAACG,YAAYA,WAAWE;IAE1E,OAAO,WAAP,GACE,IAACP,OAAAA,OAAkB;QACjB,KAAKG;QACJ,GAAGK,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQD;YACR,OAAOE,WAAW;gBAACL;YAAS,GAAG,CAAC;QAClC;kBACCG,aAAaG,SAAYP;;AAGhC;AAEFJ,cAAc,WAAW,GAAG;AAqB5B,MAAMY,eAAeb,OAAAA,MAAiB;AACtCa,aAAa,WAAW,GAAG;AAkB3B,SAASC,YAAYf,KAAkC;IACrD,MAAM,EAACO,SAAS,EAAED,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,cAA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