@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
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,38 @@ All notable changes to **@arolariu/components** are documented here following [K
|
|
|
8
8
|
|
|
9
9
|
## 🎉 Latest Releases
|
|
10
10
|
|
|
11
|
+
### [2.0.0](https://www.npmjs.com/package/@arolariu/components/v/2.0.0) - 2026-04-06
|
|
12
|
+
|
|
13
|
+
**💥 Breaking Changes**
|
|
14
|
+
|
|
15
|
+
- 🔄 **Resizable panels upgraded to v4**: Upgraded `react-resizable-panels` from v3 to v4.
|
|
16
|
+
- `direction` prop renamed to `orientation` (e.g., `<ResizablePanelGroup orientation='horizontal'>`)
|
|
17
|
+
- Size props now use string percentages instead of numbers (`defaultSize="50%"` instead of `defaultSize={50}`)
|
|
18
|
+
- `minSize`, `maxSize`, `collapsedSize` also accept string values (`"20%"`, `"0%"`, etc.)
|
|
19
|
+
- Type `ImperativePanelGroupHandle` renamed to `GroupImperativeHandle`
|
|
20
|
+
- Type `ImperativePanelHandle` renamed to `PanelImperativeHandle`
|
|
21
|
+
- `ResizablePanelGroup` is now a function component (was `ForwardRefExoticComponent`); use the new `useGroupRef()` hook from `react-resizable-panels` for imperative access
|
|
22
|
+
- 📁 **Toast module renamed**: Internal module file renamed from `sonner` to `toast` to reflect the Base UI Toast implementation adopted in v1.0.0. Exported names (`Toaster`, `toast`, `Toast`) are unchanged.
|
|
23
|
+
|
|
24
|
+
**🔧 Improvements**
|
|
25
|
+
|
|
26
|
+
- 🔗 **Fixed rslib bundler compatibility**: Converted all direct re-export statements (`export ... from "external-package"`) to import-then-export pattern across 6 component files (calendar, chart, form, input-otp, resizable, toast). This ensures types and values are properly included in the `/dist/` output.
|
|
27
|
+
- 📖 **Storybook stories and tests**: Added comprehensive test suites and story variants for all components (1300+ tests, 439+ story variants)
|
|
28
|
+
|
|
29
|
+
**📚 Migration Guide**
|
|
30
|
+
|
|
31
|
+
```diff
|
|
32
|
+
- import type {ImperativePanelGroupHandle} from "@arolariu/components";
|
|
33
|
+
+ import type {GroupImperativeHandle} from "@arolariu/components";
|
|
34
|
+
|
|
35
|
+
- <ResizablePanelGroup direction='horizontal'>
|
|
36
|
+
- <ResizablePanel defaultSize={50}>
|
|
37
|
+
+ <ResizablePanelGroup orientation='horizontal'>
|
|
38
|
+
+ <ResizablePanel defaultSize='50%'>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
11
43
|
### [1.1.0](https://www.npmjs.com/package/@arolariu/components/v/1.1.0) - 2026-03-24
|
|
12
44
|
|
|
13
45
|
**✨ New Features**
|
|
@@ -4,9 +4,9 @@ import { Accordion } from "@base-ui/react/accordion";
|
|
|
4
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
import { ChevronDown } from "lucide-react";
|
|
7
|
-
import { forwardRef } from "react";
|
|
8
7
|
import { cn } from "../../lib/utilities.js";
|
|
9
8
|
import accordion_module from "./accordion.module.js";
|
|
9
|
+
import * as __rspack_external_react from "react";
|
|
10
10
|
function accordion_Accordion(props) {
|
|
11
11
|
const { className, render, type = "single" } = props;
|
|
12
12
|
const accordionRender = useRender({
|
|
@@ -69,7 +69,7 @@ function AccordionItem(props) {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
AccordionItem.displayName = "AccordionItem";
|
|
72
|
-
const AccordionTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
72
|
+
const AccordionTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
73
73
|
const { className, children, render, ...otherProps } = props;
|
|
74
74
|
return /*#__PURE__*/ jsx(Accordion.Header, {
|
|
75
75
|
className: accordion_module.header,
|
|
@@ -95,7 +95,7 @@ const AccordionTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
98
|
-
const AccordionContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
98
|
+
const AccordionContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
99
99
|
const { className, children, render, ...otherProps } = props;
|
|
100
100
|
return /*#__PURE__*/ jsx(Accordion.Panel, {
|
|
101
101
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/accordion.js","sources":["../../../src/components/ui/accordion.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Accordion as BaseAccordion} from \"@base-ui/react/accordion\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {ChevronDown} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./accordion.module.css\";\r\n\r\ntype AccordionRootBaseProps = Omit<\r\n React.ComponentPropsWithRef<typeof BaseAccordion.Root>,\r\n \"defaultValue\" | \"multiple\" | \"onValueChange\" | \"value\" | \"className\"\r\n>;\r\n\r\n/**\r\n * Props for the single-item accordion root wrapper.\r\n */\r\ninterface AccordionSingleProps extends AccordionRootBaseProps {\r\n /** Controls whether the accordion only allows one item to be expanded at a time. @default \"single\" */\r\n type?: \"single\";\r\n /** Legacy compatibility flag accepted by the wrapper but not forwarded to Base UI. @default undefined */\r\n collapsible?: boolean;\r\n /** Additional CSS classes merged with the accordion root styles. @default undefined */\r\n className?: string;\r\n /** The initially expanded item value in uncontrolled single mode. @default undefined */\r\n defaultValue?: string;\r\n /** Called when the expanded item changes in single mode. @default undefined */\r\n onValueChange?: (value: string | undefined, eventDetails: unknown) => void;\r\n /** The controlled expanded item value in single mode. @default undefined */\r\n value?: string;\r\n}\r\n\r\n/**\r\n * Props for the multi-item accordion root wrapper.\r\n */\r\ninterface AccordionMultipleProps extends AccordionRootBaseProps {\r\n /** Controls whether the accordion allows multiple items to stay expanded. @default \"multiple\" */\r\n type: \"multiple\";\r\n /** Legacy compatibility flag accepted by the wrapper but not forwarded to Base UI. @default undefined */\r\n collapsible?: boolean;\r\n /** Additional CSS classes merged with the accordion root styles. @default undefined */\r\n className?: string;\r\n /** The initially expanded item values in uncontrolled multi mode. @default undefined */\r\n defaultValue?: string[];\r\n /** Called when the expanded item values change in multi mode. @default undefined */\r\n onValueChange?: (value: string[], eventDetails: unknown) => void;\r\n /** The controlled expanded item values in multi mode. @default undefined */\r\n value?: string[];\r\n}\r\n\r\ntype AccordionSingleRootProps = Omit<AccordionSingleProps, \"className\" | \"collapsible\" | \"render\" | \"type\">;\r\ntype AccordionMultipleRootProps = Omit<AccordionMultipleProps, \"className\" | \"collapsible\" | \"render\" | \"type\">;\r\n\r\n/**\r\n * Props for an accordion item wrapper.\r\n */\r\ninterface AccordionItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseAccordion.Item>, \"className\"> {\r\n /** Additional CSS classes merged with the accordion item styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Props for an accordion trigger wrapper.\r\n */\r\ninterface AccordionTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseAccordion.Trigger>, \"className\"> {\r\n /** Additional CSS classes merged with the accordion trigger styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Props for an accordion content wrapper.\r\n */\r\ninterface AccordionContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseAccordion.Panel>, \"className\"> {\r\n /** Additional CSS classes merged with the accordion content styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Groups disclosure items into a styled accordion container.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/accordion | Base UI Accordion}\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 * <Accordion>\r\n * <AccordionItem value=\"item-1\">\r\n * <AccordionTrigger>Section</AccordionTrigger>\r\n * <AccordionContent>Content</AccordionContent>\r\n * </AccordionItem>\r\n * </Accordion>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/accordion | Base UI Documentation}\r\n */\r\nfunction Accordion(props: Readonly<Accordion.Props>): React.ReactElement {\r\n const {className, render, type = \"single\"} = props;\r\n const accordionRender = useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(className)}, {}),\r\n });\r\n\r\n if (type === \"multiple\") {\r\n const {defaultValue, onValueChange, value, ...otherProps} = omitAccordionWrapperProps(props) as AccordionMultipleRootProps;\r\n\r\n return (\r\n <BaseAccordion.Root\r\n multiple\r\n defaultValue={defaultValue}\r\n onValueChange={onValueChange}\r\n value={value}\r\n {...otherProps}\r\n render={accordionRender}\r\n />\r\n );\r\n }\r\n\r\n const {defaultValue, onValueChange, value, ...otherProps} = omitAccordionWrapperProps(props) as AccordionSingleRootProps;\r\n\r\n return (\r\n <BaseAccordion.Root\r\n multiple={false}\r\n defaultValue={defaultValue ? [defaultValue] : undefined}\r\n onValueChange={(nextValue, eventDetails) => {\r\n onValueChange?.(nextValue[0], eventDetails);\r\n }}\r\n value={value ? [value] : undefined}\r\n {...otherProps}\r\n render={accordionRender}\r\n />\r\n );\r\n}\r\nAccordion.displayName = \"Accordion\";\r\n\r\nfunction omitAccordionWrapperProps(props: Accordion.Props): AccordionSingleRootProps | AccordionMultipleRootProps {\r\n const rootProps: Partial<Accordion.Props> = {...props};\r\n\r\n Reflect.deleteProperty(rootProps, \"className\");\r\n Reflect.deleteProperty(rootProps, \"collapsible\");\r\n Reflect.deleteProperty(rootProps, \"render\");\r\n Reflect.deleteProperty(rootProps, \"type\");\r\n\r\n return rootProps as AccordionSingleRootProps | AccordionMultipleRootProps;\r\n}\r\n\r\n/**\r\n * Wraps a single accordion item with shared border and spacing styles.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/accordion | Base UI Accordion}\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 * <AccordionItem value=\"item-1\">\r\n * <AccordionTrigger>Section</AccordionTrigger>\r\n * <AccordionContent>Content</AccordionContent>\r\n * </AccordionItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/accordion | Base UI Documentation}\r\n */\r\nfunction AccordionItem(props: Readonly<AccordionItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAccordion.Item\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, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseAccordion.Item>\r\n );\r\n}\r\nAccordionItem.displayName = \"AccordionItem\";\r\n\r\n/**\r\n * Toggles an accordion item while rendering the chevron affordance.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/accordion | Base UI Accordion}\r\n * - Supports the `render` prop for element composition\r\n * - Includes a built-in chevron icon; use the `render` prop for full custom trigger rendering or wrap\r\n * the component when you need a different icon treatment\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <AccordionTrigger>Section</AccordionTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/accordion | Base UI Documentation}\r\n */\r\nconst AccordionTrigger = React.forwardRef<React.ComponentRef<typeof BaseAccordion.Trigger>, AccordionTrigger.Props>(\r\n (props: Readonly<AccordionTrigger.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAccordion.Header className={styles.header}>\r\n <BaseAccordion.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.trigger, className)}, {}),\r\n })}>\r\n <span>{children}</span>\r\n <ChevronDown className={styles.icon} />\r\n </BaseAccordion.Trigger>\r\n </BaseAccordion.Header>\r\n );\r\n },\r\n);\r\nAccordionTrigger.displayName = \"AccordionTrigger\";\r\n\r\n/**\r\n * Reveals accordion panel content with shared spacing and animation hooks.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/accordion | Base UI Accordion}\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 * <AccordionContent>Content</AccordionContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/accordion | Base UI Documentation}\r\n */\r\nconst AccordionContent = React.forwardRef<React.ComponentRef<typeof BaseAccordion.Panel>, AccordionContent.Props>(\r\n (props: Readonly<AccordionContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAccordion.Panel\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: styles.panel}, {}),\r\n })}>\r\n <div className={cn(styles.panelInner, className)}>{children}</div>\r\n </BaseAccordion.Panel>\r\n );\r\n },\r\n);\r\nAccordionContent.displayName = \"AccordionContent\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Accordion {\r\n export type Props = AccordionSingleProps | AccordionMultipleProps;\r\n export type State = BaseAccordion.Root.State<string>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AccordionItem {\r\n export type Props = AccordionItemProps;\r\n export type State = BaseAccordion.Item.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AccordionTrigger {\r\n export type Props = AccordionTriggerProps;\r\n export type State = BaseAccordion.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AccordionContent {\r\n export type Props = AccordionContentProps;\r\n export type State = BaseAccordion.Panel.State;\r\n}\r\n\r\nexport {Accordion, AccordionContent, AccordionItem, AccordionTrigger};\r\n"],"names":["Accordion","props","className","render","type","accordionRender","useRender","mergeProps","cn","defaultValue","onValueChange","value","otherProps","omitAccordionWrapperProps","BaseAccordion","undefined","nextValue","eventDetails","rootProps","Reflect","AccordionItem","children","styles","AccordionTrigger","React","ref","ChevronDown","AccordionContent"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"components/ui/accordion.js","sources":["../../../src/components/ui/accordion.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Accordion as BaseAccordion} from \"@base-ui/react/accordion\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {ChevronDown} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./accordion.module.css\";\r\n\r\ntype AccordionRootBaseProps = Omit<\r\n React.ComponentPropsWithRef<typeof BaseAccordion.Root>,\r\n \"defaultValue\" | \"multiple\" | \"onValueChange\" | \"value\" | \"className\"\r\n>;\r\n\r\n/**\r\n * Props for the single-item accordion root wrapper.\r\n */\r\ninterface AccordionSingleProps extends AccordionRootBaseProps {\r\n /** Controls whether the accordion only allows one item to be expanded at a time. @default \"single\" */\r\n type?: \"single\";\r\n /** Legacy compatibility flag accepted by the wrapper but not forwarded to Base UI. @default undefined */\r\n collapsible?: boolean;\r\n /** Additional CSS classes merged with the accordion root styles. @default undefined */\r\n className?: string;\r\n /** The initially expanded item value in uncontrolled single mode. @default undefined */\r\n defaultValue?: string;\r\n /** Called when the expanded item changes in single mode. @default undefined */\r\n onValueChange?: (value: string | undefined, eventDetails: unknown) => void;\r\n /** The controlled expanded item value in single mode. @default undefined */\r\n value?: string;\r\n}\r\n\r\n/**\r\n * Props for the multi-item accordion root wrapper.\r\n */\r\ninterface AccordionMultipleProps extends AccordionRootBaseProps {\r\n /** Controls whether the accordion allows multiple items to stay expanded. @default \"multiple\" */\r\n type: \"multiple\";\r\n /** Legacy compatibility flag accepted by the wrapper but not forwarded to Base UI. @default undefined */\r\n collapsible?: boolean;\r\n /** Additional CSS classes merged with the accordion root styles. @default undefined */\r\n className?: string;\r\n /** The initially expanded item values in uncontrolled multi mode. @default undefined */\r\n defaultValue?: string[];\r\n /** Called when the expanded item values change in multi mode. @default undefined */\r\n onValueChange?: (value: string[], eventDetails: unknown) => void;\r\n /** The controlled expanded item values in multi mode. @default undefined */\r\n value?: string[];\r\n}\r\n\r\ntype AccordionSingleRootProps = Omit<AccordionSingleProps, \"className\" | \"collapsible\" | \"render\" | \"type\">;\r\ntype AccordionMultipleRootProps = Omit<AccordionMultipleProps, \"className\" | \"collapsible\" | \"render\" | \"type\">;\r\n\r\n/**\r\n * Props for an accordion item wrapper.\r\n */\r\ninterface AccordionItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseAccordion.Item>, \"className\"> {\r\n /** Additional CSS classes merged with the accordion item styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Props for an accordion trigger wrapper.\r\n */\r\ninterface AccordionTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseAccordion.Trigger>, \"className\"> {\r\n /** Additional CSS classes merged with the accordion trigger styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Props for an accordion content wrapper.\r\n */\r\ninterface AccordionContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseAccordion.Panel>, \"className\"> {\r\n /** Additional CSS classes merged with the accordion content styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Groups disclosure items into a styled accordion container.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/accordion | Base UI Accordion}\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 * <Accordion>\r\n * <AccordionItem value=\"item-1\">\r\n * <AccordionTrigger>Section</AccordionTrigger>\r\n * <AccordionContent>Content</AccordionContent>\r\n * </AccordionItem>\r\n * </Accordion>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/accordion | Base UI Documentation}\r\n */\r\nfunction Accordion(props: Readonly<Accordion.Props>): React.ReactElement {\r\n const {className, render, type = \"single\"} = props;\r\n const accordionRender = useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(className)}, {}),\r\n });\r\n\r\n if (type === \"multiple\") {\r\n const {defaultValue, onValueChange, value, ...otherProps} = omitAccordionWrapperProps(props) as AccordionMultipleRootProps;\r\n\r\n return (\r\n <BaseAccordion.Root\r\n multiple\r\n defaultValue={defaultValue}\r\n onValueChange={onValueChange}\r\n value={value}\r\n {...otherProps}\r\n render={accordionRender}\r\n />\r\n );\r\n }\r\n\r\n const {defaultValue, onValueChange, value, ...otherProps} = omitAccordionWrapperProps(props) as AccordionSingleRootProps;\r\n\r\n return (\r\n <BaseAccordion.Root\r\n multiple={false}\r\n defaultValue={defaultValue ? [defaultValue] : undefined}\r\n onValueChange={(nextValue, eventDetails) => {\r\n onValueChange?.(nextValue[0], eventDetails);\r\n }}\r\n value={value ? [value] : undefined}\r\n {...otherProps}\r\n render={accordionRender}\r\n />\r\n );\r\n}\r\nAccordion.displayName = \"Accordion\";\r\n\r\nfunction omitAccordionWrapperProps(props: Accordion.Props): AccordionSingleRootProps | AccordionMultipleRootProps {\r\n const rootProps: Partial<Accordion.Props> = {...props};\r\n\r\n Reflect.deleteProperty(rootProps, \"className\");\r\n Reflect.deleteProperty(rootProps, \"collapsible\");\r\n Reflect.deleteProperty(rootProps, \"render\");\r\n Reflect.deleteProperty(rootProps, \"type\");\r\n\r\n return rootProps as AccordionSingleRootProps | AccordionMultipleRootProps;\r\n}\r\n\r\n/**\r\n * Wraps a single accordion item with shared border and spacing styles.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/accordion | Base UI Accordion}\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 * <AccordionItem value=\"item-1\">\r\n * <AccordionTrigger>Section</AccordionTrigger>\r\n * <AccordionContent>Content</AccordionContent>\r\n * </AccordionItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/accordion | Base UI Documentation}\r\n */\r\nfunction AccordionItem(props: Readonly<AccordionItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAccordion.Item\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, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseAccordion.Item>\r\n );\r\n}\r\nAccordionItem.displayName = \"AccordionItem\";\r\n\r\n/**\r\n * Toggles an accordion item while rendering the chevron affordance.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/accordion | Base UI Accordion}\r\n * - Supports the `render` prop for element composition\r\n * - Includes a built-in chevron icon; use the `render` prop for full custom trigger rendering or wrap\r\n * the component when you need a different icon treatment\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <AccordionTrigger>Section</AccordionTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/accordion | Base UI Documentation}\r\n */\r\nconst AccordionTrigger = React.forwardRef<React.ComponentRef<typeof BaseAccordion.Trigger>, AccordionTrigger.Props>(\r\n (props: Readonly<AccordionTrigger.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAccordion.Header className={styles.header}>\r\n <BaseAccordion.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.trigger, className)}, {}),\r\n })}>\r\n <span>{children}</span>\r\n <ChevronDown className={styles.icon} />\r\n </BaseAccordion.Trigger>\r\n </BaseAccordion.Header>\r\n );\r\n },\r\n);\r\nAccordionTrigger.displayName = \"AccordionTrigger\";\r\n\r\n/**\r\n * Reveals accordion panel content with shared spacing and animation hooks.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/accordion | Base UI Accordion}\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 * <AccordionContent>Content</AccordionContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/accordion | Base UI Documentation}\r\n */\r\nconst AccordionContent = React.forwardRef<React.ComponentRef<typeof BaseAccordion.Panel>, AccordionContent.Props>(\r\n (props: Readonly<AccordionContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAccordion.Panel\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: styles.panel}, {}),\r\n })}>\r\n <div className={cn(styles.panelInner, className)}>{children}</div>\r\n </BaseAccordion.Panel>\r\n );\r\n },\r\n);\r\nAccordionContent.displayName = \"AccordionContent\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Accordion {\r\n export type Props = AccordionSingleProps | AccordionMultipleProps;\r\n export type State = BaseAccordion.Root.State<string>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AccordionItem {\r\n export type Props = AccordionItemProps;\r\n export type State = BaseAccordion.Item.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AccordionTrigger {\r\n export type Props = AccordionTriggerProps;\r\n export type State = BaseAccordion.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AccordionContent {\r\n export type Props = AccordionContentProps;\r\n export type State = BaseAccordion.Panel.State;\r\n}\r\n\r\nexport {Accordion, AccordionContent, AccordionItem, AccordionTrigger};\r\n"],"names":["Accordion","props","className","render","type","accordionRender","useRender","mergeProps","cn","defaultValue","onValueChange","value","otherProps","omitAccordionWrapperProps","BaseAccordion","undefined","nextValue","eventDetails","rootProps","Reflect","AccordionItem","children","styles","AccordionTrigger","React","ref","ChevronDown","AccordionContent"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/accordion.module.css","webpack://./src/components/ui/accordion.module.css"],"names":[],"mappings":"AAAA;ECCE,yCAAyC;AAC3C;;ADF+C;ECK7C,aAAa;AACf;;ADNoE;ECSlE,2BAA2B;EAC3B,eAAe;EACf,4BAA4B;EAC5B,mBAAmB;EACnB,sBAAsB;EACtB,4BAA4B;EAC5B,gBAAgB;EAChB,2CAA2C;EAC3C,gBAAgB;EAChB,YAAY;EACZ,aAAa;EACb,8BAA8B;EAC9B,WAAW;EACX,gBAAgB;EAChB,aAAa;;EDvB0X;IAAqB;MC2BxZ,wBAAwB;IAC1B;EACF;;ED7B6b;ICgC3b,kCAAkC;IAClC,iCAAiC;IACjC,mBAAmB;EACrB;;EDnCmiB;ICsCjiB,mBAAmB;IACnB,WAAW;EACb;;EDxCklB;IC2ChlB,yBAAyB;EAC3B;AACF;;AD7CuoB;ECgDroB,iCAAiC;EACjC,YAAY;EACZ,iDAAiD;EACjD,cAAc;EACd,WAAW;AACb;;ADrDowB;ECwDlwB,iCAAiC;EACjC,4BAA4B;EAC5B,8FAA8F;EAC9F,gBAAgB;;ED3Do6B;IC8Dl7B,UAAU;EACZ;AACF;;ADhE6+B;ECmE3+B,8BAA8B;AAChC","sourcesContent":[".item{border-bottom:1px solid var(--ac-border)}.header{display:flex}.trigger{align-items:center;background:transparent;border:none;color:var(--ac-foreground);cursor:pointer;display:flex;font-size:var(--ac-text-sm);font-weight:500;gap:var(--ac-space-3);justify-content:space-between;outline:none;padding:var(--ac-space-3) 0;text-align:left;transition:color var(--ac-transition-fast);width:100%;@media (hover:hover){&:hover{color:var(--ac-primary)}}&:focus-visible{border-radius:var(--ac-radius-sm);outline:2px solid var(--ac-ring);outline-offset:2px}&[data-disabled]{cursor:not-allowed;opacity:.5}&[data-panel-open] .icon{transform:rotate(180deg)}}.icon{color:var(--ac-muted-foreground);flex-shrink:0;height:1rem;transition:transform var(--ac-transition-normal);width:1rem}.panel{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm);overflow:hidden;transition:grid-template-rows var(--ac-transition-normal),opacity var(--ac-transition-normal);&[data-ending-style],&[data-starting-style]{opacity:0}}.panelInner{padding:0 0 var(--ac-space-3)}",".item {\n border-bottom: 1px solid var(--ac-border);\n}\n\n.header {\n display: flex;\n}\n\n.trigger {\n color: var(--ac-foreground);\n cursor: pointer;\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-3);\n padding: var(--ac-space-3) 0;\n text-align: left;\n transition: color var(--ac-transition-fast);\n background: none;\n border: none;\n outline: none;\n justify-content: space-between;\n width: 100%;\n font-weight: 500;\n display: flex;\n\n @media (hover: hover) {\n &:hover {\n color: var(--ac-primary);\n }\n }\n\n &:focus-visible {\n border-radius: var(--ac-radius-sm);\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: .5;\n }\n\n &[data-panel-open] .icon {\n transform: rotate(180deg);\n }\n}\n\n.icon {\n color: var(--ac-muted-foreground);\n height: 1rem;\n transition: transform var(--ac-transition-normal);\n flex-shrink: 0;\n width: 1rem;\n}\n\n.panel {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n transition: grid-template-rows var(--ac-transition-normal),opacity var(--ac-transition-normal);\n overflow: hidden;\n\n &[data-ending-style], &[data-starting-style] {\n opacity: 0;\n }\n}\n\n.panelInner {\n padding: 0 0 var(--ac-space-3);\n}\n"],"sourceRoot":""}
|
|
@@ -3,19 +3,19 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { AlertDialog } from "@base-ui/react/alert-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 alert_dialog_module from "./alert-dialog.module.js";
|
|
9
8
|
import button_module from "./button.module.js";
|
|
9
|
+
import * as __rspack_external_react from "react";
|
|
10
10
|
function alert_dialog_AlertDialog(props) {
|
|
11
11
|
return /*#__PURE__*/ jsx(AlertDialog.Root, {
|
|
12
12
|
...props
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
alert_dialog_AlertDialog.displayName = "AlertDialog";
|
|
16
|
-
const alert_dialog_AlertDialogTrigger = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
|
|
16
|
+
const alert_dialog_AlertDialogTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
17
17
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
18
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
18
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
19
19
|
return /*#__PURE__*/ jsx(AlertDialog.Trigger, {
|
|
20
20
|
...otherProps,
|
|
21
21
|
ref: forwardedRef,
|
|
@@ -46,7 +46,7 @@ function AlertDialogOverlay(props) {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
49
|
-
const alert_dialog_AlertDialogContent = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
|
|
49
|
+
const alert_dialog_AlertDialogContent = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
50
50
|
const { className, children, render, ...otherProps } = props;
|
|
51
51
|
return /*#__PURE__*/ jsxs(AlertDialogPortal, {
|
|
52
52
|
children: [
|
|
@@ -69,7 +69,7 @@ const alert_dialog_AlertDialogContent = /*#__PURE__*/ forwardRef(function(props,
|
|
|
69
69
|
alert_dialog_AlertDialogContent.displayName = "AlertDialogContent";
|
|
70
70
|
function AlertDialogHeader(props) {
|
|
71
71
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
72
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
72
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
73
73
|
return useRender({
|
|
74
74
|
defaultTagName: "div",
|
|
75
75
|
render: renderProp,
|
|
@@ -83,7 +83,7 @@ function AlertDialogHeader(props) {
|
|
|
83
83
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
84
84
|
function AlertDialogFooter(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,
|
|
@@ -125,7 +125,7 @@ function AlertDialogDescription(props) {
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
128
|
-
const alert_dialog_AlertDialogAction = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
|
|
128
|
+
const alert_dialog_AlertDialogAction = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
129
129
|
const { className, children, render, ...otherProps } = props;
|
|
130
130
|
return /*#__PURE__*/ jsx(AlertDialog.Close, {
|
|
131
131
|
...otherProps,
|
|
@@ -141,7 +141,7 @@ const alert_dialog_AlertDialogAction = /*#__PURE__*/ forwardRef(function(props,
|
|
|
141
141
|
});
|
|
142
142
|
});
|
|
143
143
|
alert_dialog_AlertDialogAction.displayName = "AlertDialogAction";
|
|
144
|
-
const alert_dialog_AlertDialogCancel = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
|
|
144
|
+
const alert_dialog_AlertDialogCancel = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
145
145
|
const { className, children, render, ...otherProps } = props;
|
|
146
146
|
return /*#__PURE__*/ jsx(AlertDialog.Close, {
|
|
147
147
|
...otherProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/alert-dialog.js","sources":["../../../src/components/ui/alert-dialog.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {AlertDialog as BaseAlertDialog} from \"@base-ui/react/alert-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 \"./alert-dialog.module.css\";\r\nimport buttonStyles from \"./button.module.css\";\r\n\r\ninterface AlertDialogProps extends React.ComponentPropsWithRef<typeof BaseAlertDialog.Root> {}\r\n\r\ninterface AlertDialogTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Trigger>, \"className\"> {\r\n /** Additional CSS classes merged with the alert-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 AlertDialogOverlayProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Backdrop>, \"className\"> {\r\n /** Additional CSS classes merged with the alert-dialog backdrop styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface AlertDialogContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Popup>, \"className\"> {\r\n /** Additional CSS classes merged with the alert-dialog popup styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface AlertDialogHeaderProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /** Additional CSS classes merged with the alert-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 AlertDialogFooterProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /** Additional CSS classes merged with the alert-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 AlertDialogTitleProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Title>, \"className\"> {\r\n /** Additional CSS classes merged with the alert-dialog title styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface AlertDialogDescriptionProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Description>, \"className\"> {\r\n /** Additional CSS classes merged with the alert-dialog description styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface AlertDialogActionProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Close>, \"className\"> {\r\n /** Additional CSS classes merged with the primary action button styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface AlertDialogCancelProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Close>, \"className\"> {\r\n /** Additional CSS classes merged with the cancel action button styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Coordinates destructive confirmation dialogs with modal accessibility behavior.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default and coordinates descendant alert-dialog parts\r\n * - Built on {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert 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 * <AlertDialog>\r\n * <AlertDialogTrigger>Delete</AlertDialogTrigger>\r\n * <AlertDialogContent>\r\n * <AlertDialogTitle>Are you sure?</AlertDialogTitle>\r\n * </AlertDialogContent>\r\n * </AlertDialog>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialog(props: Readonly<AlertDialog.Props>): React.ReactElement {\r\n return <BaseAlertDialog.Root {...props} />;\r\n}\r\nAlertDialog.displayName = \"AlertDialog\";\r\n\r\n/**\r\n * Opens the alert 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/alert-dialog | Base UI Alert 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 * <AlertDialogTrigger>Delete</AlertDialogTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTrigger.Props>(function AlertDialogTrigger(props, forwardedRef) {\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 <BaseAlertDialog.Trigger\r\n {...otherProps}\r\n ref={forwardedRef}\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 </BaseAlertDialog.Trigger>\r\n );\r\n});\r\nAlertDialogTrigger.displayName = \"AlertDialogTrigger\";\r\n\r\n/**\r\n * Portals alert-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/alert-dialog | Base UI Alert 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 * <AlertDialogPortal>\r\n * <AlertDialogOverlay />\r\n * <AlertDialogContent />\r\n * </AlertDialogPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nconst AlertDialogPortal = BaseAlertDialog.Portal;\r\nAlertDialogPortal.displayName = \"AlertDialogPortal\";\r\n\r\n/**\r\n * Renders the dimmed backdrop behind the alert dialog popup.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert 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 * <AlertDialogOverlay />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialogOverlay(props: Readonly<AlertDialogOverlay.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAlertDialog.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\nAlertDialogOverlay.displayName = \"AlertDialogOverlay\";\r\n\r\n/**\r\n * Renders the alert 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/alert-dialog | Base UI Alert 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 * <AlertDialogContent>\r\n * <AlertDialogTitle>Are you sure?</AlertDialogTitle>\r\n * </AlertDialogContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nconst AlertDialogContent = React.forwardRef<HTMLDivElement, AlertDialogContent.Props>(function AlertDialogContent(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <AlertDialogPortal>\r\n <AlertDialogOverlay />\r\n <BaseAlertDialog.Popup\r\n {...otherProps}\r\n ref={forwardedRef}\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 </BaseAlertDialog.Popup>\r\n </AlertDialogPortal>\r\n );\r\n});\r\nAlertDialogContent.displayName = \"AlertDialogContent\";\r\n\r\n/**\r\n * Lays out the alert dialog heading and supporting 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/alert-dialog | Base UI Alert 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 * <AlertDialogHeader>\r\n * <AlertDialogTitle>Are you sure?</AlertDialogTitle>\r\n * </AlertDialogHeader>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialogHeader(props: Readonly<AlertDialogHeader.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.header, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\r\n\r\n/**\r\n * Lays out confirmation and dismissal actions 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/alert-dialog | Base UI Alert 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 * <AlertDialogFooter>\r\n * <AlertDialogCancel>Cancel</AlertDialogCancel>\r\n * </AlertDialogFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialogFooter(props: Readonly<AlertDialogFooter.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.footer, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\r\n\r\n/**\r\n * Renders the accessible heading for alert 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/alert-dialog | Base UI Alert 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 * <AlertDialogTitle>Are you sure?</AlertDialogTitle>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialogTitle(props: Readonly<AlertDialogTitle.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAlertDialog.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 </BaseAlertDialog.Title>\r\n );\r\n}\r\nAlertDialogTitle.displayName = \"AlertDialogTitle\";\r\n\r\n/**\r\n * Renders supporting copy beneath the alert 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/alert-dialog | Base UI Alert 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 * <AlertDialogDescription>This action cannot be undone.</AlertDialogDescription>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialogDescription(props: Readonly<AlertDialogDescription.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAlertDialog.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 </BaseAlertDialog.Description>\r\n );\r\n}\r\nAlertDialogDescription.displayName = \"AlertDialogDescription\";\r\n\r\n/**\r\n * Renders the primary confirmation action inside the alert dialog.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert 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 * <AlertDialogAction>Continue</AlertDialogAction>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nconst AlertDialogAction = React.forwardRef<HTMLButtonElement, AlertDialogAction.Props>(function AlertDialogAction(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAlertDialog.Close\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(buttonStyles.button, buttonStyles.default, buttonStyles.sizeDefault, className),\r\n },\r\n {},\r\n ),\r\n })}>\r\n {children}\r\n </BaseAlertDialog.Close>\r\n );\r\n});\r\nAlertDialogAction.displayName = \"AlertDialogAction\";\r\n\r\n/**\r\n * Renders the secondary dismissal action inside the alert dialog.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert 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 * <AlertDialogCancel>Cancel</AlertDialogCancel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nconst AlertDialogCancel = React.forwardRef<HTMLButtonElement, AlertDialogCancel.Props>(function AlertDialogCancel(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAlertDialog.Close\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(buttonStyles.button, buttonStyles.outline, buttonStyles.sizeDefault, styles.cancel, className),\r\n },\r\n {},\r\n ),\r\n })}>\r\n {children}\r\n </BaseAlertDialog.Close>\r\n );\r\n});\r\nAlertDialogCancel.displayName = \"AlertDialogCancel\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialog {\r\n export type Props = AlertDialogProps;\r\n export type State = BaseAlertDialog.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogTrigger {\r\n export type Props = AlertDialogTriggerProps;\r\n export type State = BaseAlertDialog.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogOverlay {\r\n export type Props = AlertDialogOverlayProps;\r\n export type State = BaseAlertDialog.Backdrop.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogContent {\r\n export type Props = AlertDialogContentProps;\r\n export type State = BaseAlertDialog.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogHeader {\r\n export type Props = AlertDialogHeaderProps;\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 AlertDialogFooter {\r\n export type Props = AlertDialogFooterProps;\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 AlertDialogTitle {\r\n export type Props = AlertDialogTitleProps;\r\n export type State = BaseAlertDialog.Title.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogDescription {\r\n export type Props = AlertDialogDescriptionProps;\r\n export type State = BaseAlertDialog.Description.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogAction {\r\n export type Props = AlertDialogActionProps;\r\n export type State = BaseAlertDialog.Close.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogCancel {\r\n export type Props = AlertDialogCancelProps;\r\n export type State = BaseAlertDialog.Close.State;\r\n}\r\n\r\nexport {\r\n AlertDialog,\r\n AlertDialogAction,\r\n AlertDialogCancel,\r\n AlertDialogContent,\r\n AlertDialogDescription,\r\n AlertDialogFooter,\r\n AlertDialogHeader,\r\n AlertDialogOverlay,\r\n AlertDialogPortal,\r\n AlertDialogTitle,\r\n AlertDialogTrigger,\r\n};\r\n"],"names":["AlertDialog","props","BaseAlertDialog","AlertDialogTrigger","React","forwardedRef","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","AlertDialogPortal","AlertDialogOverlay","cn","styles","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","buttonStyles","AlertDialogCancel"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"components/ui/alert-dialog.js","sources":["../../../src/components/ui/alert-dialog.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {AlertDialog as BaseAlertDialog} from \"@base-ui/react/alert-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 \"./alert-dialog.module.css\";\r\nimport buttonStyles from \"./button.module.css\";\r\n\r\ninterface AlertDialogProps extends React.ComponentPropsWithRef<typeof BaseAlertDialog.Root> {}\r\n\r\ninterface AlertDialogTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Trigger>, \"className\"> {\r\n /** Additional CSS classes merged with the alert-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 AlertDialogOverlayProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Backdrop>, \"className\"> {\r\n /** Additional CSS classes merged with the alert-dialog backdrop styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface AlertDialogContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Popup>, \"className\"> {\r\n /** Additional CSS classes merged with the alert-dialog popup styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface AlertDialogHeaderProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /** Additional CSS classes merged with the alert-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 AlertDialogFooterProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /** Additional CSS classes merged with the alert-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 AlertDialogTitleProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Title>, \"className\"> {\r\n /** Additional CSS classes merged with the alert-dialog title styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface AlertDialogDescriptionProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Description>, \"className\"> {\r\n /** Additional CSS classes merged with the alert-dialog description styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface AlertDialogActionProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Close>, \"className\"> {\r\n /** Additional CSS classes merged with the primary action button styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface AlertDialogCancelProps extends Omit<React.ComponentPropsWithRef<typeof BaseAlertDialog.Close>, \"className\"> {\r\n /** Additional CSS classes merged with the cancel action button styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Coordinates destructive confirmation dialogs with modal accessibility behavior.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default and coordinates descendant alert-dialog parts\r\n * - Built on {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert 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 * <AlertDialog>\r\n * <AlertDialogTrigger>Delete</AlertDialogTrigger>\r\n * <AlertDialogContent>\r\n * <AlertDialogTitle>Are you sure?</AlertDialogTitle>\r\n * </AlertDialogContent>\r\n * </AlertDialog>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialog(props: Readonly<AlertDialog.Props>): React.ReactElement {\r\n return <BaseAlertDialog.Root {...props} />;\r\n}\r\nAlertDialog.displayName = \"AlertDialog\";\r\n\r\n/**\r\n * Opens the alert 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/alert-dialog | Base UI Alert 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 * <AlertDialogTrigger>Delete</AlertDialogTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTrigger.Props>(function AlertDialogTrigger(props, forwardedRef) {\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 <BaseAlertDialog.Trigger\r\n {...otherProps}\r\n ref={forwardedRef}\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 </BaseAlertDialog.Trigger>\r\n );\r\n});\r\nAlertDialogTrigger.displayName = \"AlertDialogTrigger\";\r\n\r\n/**\r\n * Portals alert-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/alert-dialog | Base UI Alert 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 * <AlertDialogPortal>\r\n * <AlertDialogOverlay />\r\n * <AlertDialogContent />\r\n * </AlertDialogPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nconst AlertDialogPortal = BaseAlertDialog.Portal;\r\nAlertDialogPortal.displayName = \"AlertDialogPortal\";\r\n\r\n/**\r\n * Renders the dimmed backdrop behind the alert dialog popup.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert 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 * <AlertDialogOverlay />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialogOverlay(props: Readonly<AlertDialogOverlay.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAlertDialog.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\nAlertDialogOverlay.displayName = \"AlertDialogOverlay\";\r\n\r\n/**\r\n * Renders the alert 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/alert-dialog | Base UI Alert 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 * <AlertDialogContent>\r\n * <AlertDialogTitle>Are you sure?</AlertDialogTitle>\r\n * </AlertDialogContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nconst AlertDialogContent = React.forwardRef<HTMLDivElement, AlertDialogContent.Props>(function AlertDialogContent(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <AlertDialogPortal>\r\n <AlertDialogOverlay />\r\n <BaseAlertDialog.Popup\r\n {...otherProps}\r\n ref={forwardedRef}\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 </BaseAlertDialog.Popup>\r\n </AlertDialogPortal>\r\n );\r\n});\r\nAlertDialogContent.displayName = \"AlertDialogContent\";\r\n\r\n/**\r\n * Lays out the alert dialog heading and supporting 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/alert-dialog | Base UI Alert 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 * <AlertDialogHeader>\r\n * <AlertDialogTitle>Are you sure?</AlertDialogTitle>\r\n * </AlertDialogHeader>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialogHeader(props: Readonly<AlertDialogHeader.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.header, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\r\n\r\n/**\r\n * Lays out confirmation and dismissal actions 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/alert-dialog | Base UI Alert 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 * <AlertDialogFooter>\r\n * <AlertDialogCancel>Cancel</AlertDialogCancel>\r\n * </AlertDialogFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialogFooter(props: Readonly<AlertDialogFooter.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.footer, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\r\n\r\n/**\r\n * Renders the accessible heading for alert 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/alert-dialog | Base UI Alert 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 * <AlertDialogTitle>Are you sure?</AlertDialogTitle>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialogTitle(props: Readonly<AlertDialogTitle.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAlertDialog.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 </BaseAlertDialog.Title>\r\n );\r\n}\r\nAlertDialogTitle.displayName = \"AlertDialogTitle\";\r\n\r\n/**\r\n * Renders supporting copy beneath the alert 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/alert-dialog | Base UI Alert 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 * <AlertDialogDescription>This action cannot be undone.</AlertDialogDescription>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nfunction AlertDialogDescription(props: Readonly<AlertDialogDescription.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAlertDialog.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 </BaseAlertDialog.Description>\r\n );\r\n}\r\nAlertDialogDescription.displayName = \"AlertDialogDescription\";\r\n\r\n/**\r\n * Renders the primary confirmation action inside the alert dialog.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert 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 * <AlertDialogAction>Continue</AlertDialogAction>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nconst AlertDialogAction = React.forwardRef<HTMLButtonElement, AlertDialogAction.Props>(function AlertDialogAction(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAlertDialog.Close\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(buttonStyles.button, buttonStyles.default, buttonStyles.sizeDefault, className),\r\n },\r\n {},\r\n ),\r\n })}>\r\n {children}\r\n </BaseAlertDialog.Close>\r\n );\r\n});\r\nAlertDialogAction.displayName = \"AlertDialogAction\";\r\n\r\n/**\r\n * Renders the secondary dismissal action inside the alert dialog.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert 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 * <AlertDialogCancel>Cancel</AlertDialogCancel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation}\r\n */\r\nconst AlertDialogCancel = React.forwardRef<HTMLButtonElement, AlertDialogCancel.Props>(function AlertDialogCancel(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseAlertDialog.Close\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(buttonStyles.button, buttonStyles.outline, buttonStyles.sizeDefault, styles.cancel, className),\r\n },\r\n {},\r\n ),\r\n })}>\r\n {children}\r\n </BaseAlertDialog.Close>\r\n );\r\n});\r\nAlertDialogCancel.displayName = \"AlertDialogCancel\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialog {\r\n export type Props = AlertDialogProps;\r\n export type State = BaseAlertDialog.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogTrigger {\r\n export type Props = AlertDialogTriggerProps;\r\n export type State = BaseAlertDialog.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogOverlay {\r\n export type Props = AlertDialogOverlayProps;\r\n export type State = BaseAlertDialog.Backdrop.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogContent {\r\n export type Props = AlertDialogContentProps;\r\n export type State = BaseAlertDialog.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogHeader {\r\n export type Props = AlertDialogHeaderProps;\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 AlertDialogFooter {\r\n export type Props = AlertDialogFooterProps;\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 AlertDialogTitle {\r\n export type Props = AlertDialogTitleProps;\r\n export type State = BaseAlertDialog.Title.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogDescription {\r\n export type Props = AlertDialogDescriptionProps;\r\n export type State = BaseAlertDialog.Description.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogAction {\r\n export type Props = AlertDialogActionProps;\r\n export type State = BaseAlertDialog.Close.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace AlertDialogCancel {\r\n export type Props = AlertDialogCancelProps;\r\n export type State = BaseAlertDialog.Close.State;\r\n}\r\n\r\nexport {\r\n AlertDialog,\r\n AlertDialogAction,\r\n AlertDialogCancel,\r\n AlertDialogContent,\r\n AlertDialogDescription,\r\n AlertDialogFooter,\r\n AlertDialogHeader,\r\n AlertDialogOverlay,\r\n AlertDialogPortal,\r\n AlertDialogTitle,\r\n AlertDialogTrigger,\r\n};\r\n"],"names":["AlertDialog","props","BaseAlertDialog","AlertDialogTrigger","React","forwardedRef","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","AlertDialogPortal","AlertDialogOverlay","cn","styles","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","buttonStyles","AlertDialogCancel"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/alert-dialog.module.css","webpack://./src/components/ui/alert-dialog.module.css"],"names":[],"mappings":"AAAA;ECCE,kBAAkB;EAClB,kBAAkB;EAClB,+CAA+C;EAC/C,WAAW;EACX,2BAA2B;EAC3B,eAAe;EACf,QAAQ;;EDPsJ;IAAuC,kBAAA;ECWrM;;EDXuN;ICcrN,UAAU;EACZ;AACF;;ADhBgR;ECmB9Q,sCAAsC;EACtC,kCAAkC;EAClC,kCAAkC;EAClC,2BAA2B;EAC3B,sBAAsB;EACtB,0BAA0B;EAC1B,qFAAqF;EACrF,WAAW;EACX,+BAA+B;EAC/B,aAAa;EACb,eAAe;EACf,QAAQ;EACR,SAAS;EACT,gCAAgC;EAChC,uCAAuC;AACzC;;ADlCysB;ECqCvsB,UAAU;EACV,2CAA2C;AAC7C;;ADvCmzB;EC0CjzB,kBAAkB;EAClB,sBAAsB;AACxB;;AD5Cm2B;EC+Cj2B,sBAAsB;EACtB,aAAa;AACf;;ADjDs5B;ECoDp5B,8BAA8B;AAChC;;ADrD47B;EAAyB;ICyDj9B,gBAAgB;EAClB;;ED1D2+B;IC6Dz+B,mBAAmB;IACnB,yBAAyB;EAC3B;AACF;;ADhEkiC;ECmEhiC,4BAA4B;EAC5B,gBAAgB;EAChB,iBAAiB;AACnB;;ADtEsmC;ECyEpmC,iCAAiC;EACjC,4BAA4B;AAC9B;;AD3EgrC;EC8E9qC,6BAA6B;AAC/B;;AD/EqtC;EAAyB;ICmF1uC,aAAa;EACf;AACF","sourcesContent":[".backdrop{background-color:rgba(0,0,0,.55);inset:0;min-height:100dvh;position:fixed;touch-action:none;transition:opacity var(--ac-transition-normal);z-index:50;@supports (-webkit-touch-callout:none){position:absolute}&[data-ending-style],&[data-starting-style]{opacity:0}}.popup{background-color:var(--ac-background);border:1px solid var(--ac-border);border-radius:var(--ac-radius-lg);box-shadow:0 20px 40px -12px rgba(0,0,0,.25);color:var(--ac-foreground);display:grid;gap:var(--ac-space-4);left:50%;padding:var(--ac-space-6);position:fixed;top:50%;transform:translate(-50%,-50%);transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal);width:min(32rem,calc(100vw - 2rem));z-index:51}.popup[data-ending-style],.popup[data-starting-style]{opacity:0;transform:translate(-50%,-50%) scale(.96)}.header{flex-direction:column;text-align:center}.footer,.header{display:flex;gap:var(--ac-space-2)}.footer{flex-direction:column-reverse}@media (min-width:640px){.header{text-align:left}.footer{flex-direction:row;justify-content:flex-end}}.title{font-size:var(--ac-text-lg);font-weight:600;line-height:1.25}.description{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm)}.cancel{margin-top:var(--ac-space-2)}@media (min-width:640px){.cancel{margin-top:0}}",".backdrop {\n touch-action: none;\n min-height: 100dvh;\n transition: opacity var(--ac-transition-normal);\n z-index: 50;\n background-color: #0000008c;\n position: fixed;\n inset: 0;\n\n @supports (-webkit-touch-callout: none) {\n position: absolute;\n }\n\n &[data-ending-style], &[data-starting-style] {\n opacity: 0;\n }\n}\n\n.popup {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg);\n color: var(--ac-foreground);\n gap: var(--ac-space-4);\n padding: var(--ac-space-6);\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n z-index: 51;\n width: min(32rem, 100vw - 2rem);\n display: grid;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n box-shadow: 0 20px 40px -12px #00000040;\n}\n\n.popup[data-ending-style], .popup[data-starting-style] {\n opacity: 0;\n transform: translate(-50%, -50%) scale(.96);\n}\n\n.header {\n text-align: center;\n flex-direction: column;\n}\n\n.footer, .header {\n gap: var(--ac-space-2);\n display: flex;\n}\n\n.footer {\n flex-direction: column-reverse;\n}\n\n@media (width >= 640px) {\n .header {\n text-align: left;\n }\n\n .footer {\n flex-direction: row;\n justify-content: flex-end;\n }\n}\n\n.title {\n font-size: var(--ac-text-lg);\n font-weight: 600;\n line-height: 1.25;\n}\n\n.description {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n}\n\n.cancel {\n margin-top: var(--ac-space-2);\n}\n\n@media (width >= 640px) {\n .cancel {\n margin-top: 0;\n }\n}\n"],"sourceRoot":""}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { cn } from "../../lib/utilities.js";
|
|
4
3
|
import alert_module from "./alert.module.js";
|
|
4
|
+
import * as __rspack_external_react from "react";
|
|
5
5
|
const variantStyles = {
|
|
6
6
|
default: alert_module["default"],
|
|
7
7
|
destructive: alert_module.destructive
|
|
8
8
|
};
|
|
9
|
-
const Alert = /*#__PURE__*/ forwardRef(({ className, variant = "default", ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
9
|
+
const Alert = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, variant = "default", ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
10
10
|
ref: ref,
|
|
11
11
|
role: "alert",
|
|
12
12
|
className: cn(alert_module.alert, variantStyles[variant], className),
|
|
13
13
|
...props
|
|
14
14
|
}));
|
|
15
15
|
Alert.displayName = "Alert";
|
|
16
|
-
const AlertTitle = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsx("h5", {
|
|
16
|
+
const AlertTitle = /*#__PURE__*/ __rspack_external_react.forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsx("h5", {
|
|
17
17
|
ref: ref,
|
|
18
18
|
className: cn(alert_module.title, className),
|
|
19
19
|
...props,
|
|
20
20
|
children: children
|
|
21
21
|
}));
|
|
22
22
|
AlertTitle.displayName = "AlertTitle";
|
|
23
|
-
const AlertDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
23
|
+
const AlertDescription = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
24
24
|
ref: ref,
|
|
25
25
|
className: cn(alert_module.description, className),
|
|
26
26
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/alert.js","sources":["../../../src/components/ui/alert.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./alert.module.css\";\r\n\r\n/**\r\n * Defines the supported visual treatments for the Alert component.\r\n */\r\nexport type AlertVariant = \"default\" | \"destructive\";\r\n\r\nconst variantStyles: Record<AlertVariant, string> = {\r\n default: styles.default!,\r\n destructive: styles.destructive!,\r\n};\r\n\r\n/**\r\n * Represents the configurable props for the Alert component.\r\n *\r\n * @remarks\r\n * Extends native `<div>` attributes so alerts can expose ARIA relationships,\r\n * data attributes, and custom event handlers while selecting a visual variant.\r\n *\r\n * @default variant `\"default\"`\r\n */\r\nexport interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Additional CSS classes merged with the base alert surface styles.\r\n */\r\n className?: string;\r\n /**\r\n * The visual tone used to communicate neutral or destructive feedback.\r\n *\r\n * @default \"default\"\r\n */\r\n variant?: AlertVariant;\r\n}\r\n\r\n/**\r\n * A bordered feedback container for inline status, warning, or error messaging.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a `<div>` with `role=\"alert\"` so assistive technologies announce urgent\r\n * content. Use {@link AlertTitle} and {@link AlertDescription} to build a clear,\r\n * accessible message structure.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Alert variant=\"destructive\">\r\n * <AlertTitle>Payment failed</AlertTitle>\r\n * <AlertDescription>Verify your card details and try again.</AlertDescription>\r\n * </Alert>\r\n * ```\r\n *\r\n * @see {@link AlertTitle}\r\n * @see {@link AlertDescription}\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>(({className, variant = \"default\", ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n role='alert'\r\n className={cn(styles.alert, variantStyles[variant], className)}\r\n {...props}\r\n />\r\n));\r\nAlert.displayName = \"Alert\";\r\n\r\n/**\r\n * Represents the configurable props for the AlertTitle component.\r\n *\r\n * @remarks\r\n * Extends native heading attributes and exposes a class override for styling.\r\n */\r\ninterface AlertTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {\r\n /**\r\n * Additional CSS classes merged with the alert title styles.\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * The heading slot for the primary alert message.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders an `<h5>` element styled for compact but prominent messaging. Pair it with\r\n * {@link AlertDescription} when the alert needs supporting explanatory text.\r\n *\r\n * @example\r\n * ```tsx\r\n * <AlertTitle>Heads up</AlertTitle>\r\n * ```\r\n *\r\n * @see {@link AlertDescription}\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst AlertTitle = React.forwardRef<HTMLHeadingElement, AlertTitleProps>(({children, className, ...props}, ref) => (\r\n <h5\r\n ref={ref}\r\n className={cn(styles.title, className)}\r\n {...props}>\r\n {children}\r\n </h5>\r\n));\r\nAlertTitle.displayName = \"AlertTitle\";\r\n\r\n/**\r\n * Represents the configurable props for the AlertDescription component.\r\n *\r\n * @remarks\r\n * Extends native `<div>` attributes so rich supporting content can be rendered inside\r\n * an alert body while preserving the component's spacing and typography.\r\n */\r\ninterface AlertDescriptionProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Additional CSS classes merged with the alert description styles.\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * A supporting content slot for additional alert details.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a styled `<div>` so the alert body can contain paragraphs, lists, links,\r\n * or other rich inline content beneath the title.\r\n *\r\n * @example\r\n * ```tsx\r\n * <AlertDescription>API access will be restored after the billing issue is resolved.</AlertDescription>\r\n * ```\r\n *\r\n * @see {@link AlertTitle}\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst AlertDescription = React.forwardRef<HTMLDivElement, AlertDescriptionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.description, className)}\r\n {...props}\r\n />\r\n));\r\nAlertDescription.displayName = \"AlertDescription\";\r\n\r\nexport {Alert, AlertDescription, AlertTitle};\r\n"],"names":["variantStyles","styles","Alert","React","className","variant","props","ref","cn","AlertTitle","children","AlertDescription"],"mappings":";;;;AAUA,MAAMA,gBAA8C;IAClD,SAASC,YAAAA,CAAAA,UAAc;IACvB,aAAaA,aAAAA,WAAkB;AACjC;AA8CA,MAAMC,QAAQ,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/alert.js","sources":["../../../src/components/ui/alert.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./alert.module.css\";\r\n\r\n/**\r\n * Defines the supported visual treatments for the Alert component.\r\n */\r\nexport type AlertVariant = \"default\" | \"destructive\";\r\n\r\nconst variantStyles: Record<AlertVariant, string> = {\r\n default: styles.default!,\r\n destructive: styles.destructive!,\r\n};\r\n\r\n/**\r\n * Represents the configurable props for the Alert component.\r\n *\r\n * @remarks\r\n * Extends native `<div>` attributes so alerts can expose ARIA relationships,\r\n * data attributes, and custom event handlers while selecting a visual variant.\r\n *\r\n * @default variant `\"default\"`\r\n */\r\nexport interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Additional CSS classes merged with the base alert surface styles.\r\n */\r\n className?: string;\r\n /**\r\n * The visual tone used to communicate neutral or destructive feedback.\r\n *\r\n * @default \"default\"\r\n */\r\n variant?: AlertVariant;\r\n}\r\n\r\n/**\r\n * A bordered feedback container for inline status, warning, or error messaging.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a `<div>` with `role=\"alert\"` so assistive technologies announce urgent\r\n * content. Use {@link AlertTitle} and {@link AlertDescription} to build a clear,\r\n * accessible message structure.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Alert variant=\"destructive\">\r\n * <AlertTitle>Payment failed</AlertTitle>\r\n * <AlertDescription>Verify your card details and try again.</AlertDescription>\r\n * </Alert>\r\n * ```\r\n *\r\n * @see {@link AlertTitle}\r\n * @see {@link AlertDescription}\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>(({className, variant = \"default\", ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n role='alert'\r\n className={cn(styles.alert, variantStyles[variant], className)}\r\n {...props}\r\n />\r\n));\r\nAlert.displayName = \"Alert\";\r\n\r\n/**\r\n * Represents the configurable props for the AlertTitle component.\r\n *\r\n * @remarks\r\n * Extends native heading attributes and exposes a class override for styling.\r\n */\r\ninterface AlertTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {\r\n /**\r\n * Additional CSS classes merged with the alert title styles.\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * The heading slot for the primary alert message.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders an `<h5>` element styled for compact but prominent messaging. Pair it with\r\n * {@link AlertDescription} when the alert needs supporting explanatory text.\r\n *\r\n * @example\r\n * ```tsx\r\n * <AlertTitle>Heads up</AlertTitle>\r\n * ```\r\n *\r\n * @see {@link AlertDescription}\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst AlertTitle = React.forwardRef<HTMLHeadingElement, AlertTitleProps>(({children, className, ...props}, ref) => (\r\n <h5\r\n ref={ref}\r\n className={cn(styles.title, className)}\r\n {...props}>\r\n {children}\r\n </h5>\r\n));\r\nAlertTitle.displayName = \"AlertTitle\";\r\n\r\n/**\r\n * Represents the configurable props for the AlertDescription component.\r\n *\r\n * @remarks\r\n * Extends native `<div>` attributes so rich supporting content can be rendered inside\r\n * an alert body while preserving the component's spacing and typography.\r\n */\r\ninterface AlertDescriptionProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Additional CSS classes merged with the alert description styles.\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * A supporting content slot for additional alert details.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Renders a styled `<div>` so the alert body can contain paragraphs, lists, links,\r\n * or other rich inline content beneath the title.\r\n *\r\n * @example\r\n * ```tsx\r\n * <AlertDescription>API access will be restored after the billing issue is resolved.</AlertDescription>\r\n * ```\r\n *\r\n * @see {@link AlertTitle}\r\n * @see {@link https://base-ui.com/react/overview Base UI documentation}\r\n */\r\nconst AlertDescription = React.forwardRef<HTMLDivElement, AlertDescriptionProps>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.description, className)}\r\n {...props}\r\n />\r\n));\r\nAlertDescription.displayName = \"AlertDescription\";\r\n\r\nexport {Alert, AlertDescription, AlertTitle};\r\n"],"names":["variantStyles","styles","Alert","React","className","variant","props","ref","cn","AlertTitle","children","AlertDescription"],"mappings":";;;;AAUA,MAAMA,gBAA8C;IAClD,SAASC,YAAAA,CAAAA,UAAc;IACvB,aAAaA,aAAAA,WAAkB;AACjC;AA8CA,MAAMC,QAAQ,WAAHA,GAAGC,wBAAAA,UAAgB,CAA6B,CAAC,EAACC,SAAS,EAAEC,UAAU,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACtG,IAAC;QACC,KAAKA;QACL,MAAK;QACL,WAAWC,GAAGP,aAAAA,KAAY,EAAED,aAAa,CAACK,QAAQ,EAAED;QACnD,GAAGE,KAAK;;AAGbJ,MAAM,WAAW,GAAG;AAgCpB,MAAMO,aAAa,WAAHA,GAAGN,wBAAAA,UAAgB,CAAsC,CAAC,EAACO,QAAQ,EAAEN,SAAS,EAAE,GAAGE,OAAM,EAAEC,MAAAA,WAAAA,GACzG,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGP,aAAAA,KAAY,EAAEG;QAC3B,GAAGE,KAAK;kBACRI;;AAGLD,WAAW,WAAW,GAAG;AAiCzB,MAAME,mBAAmB,WAAHA,GAAGR,wBAAAA,UAAgB,CAAwC,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAM,EAAEC,MAAAA,WAAAA,GACvG,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGP,aAAAA,WAAkB,EAAEG;QACjC,GAAGE,KAAK;;AAGbK,iBAAiB,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/alert.module.css","webpack://./src/components/ui/alert.module.css"],"names":[],"mappings":"AAAA;ECCE,kCAAkC;EAClC,kCAAkC;EAClC,4BAA4B;EAC5B,0BAA0B;EAC1B,WAAW;EACX,kBAAkB;;EDN0I;ICS1J,2BAA2B;IAC3B,YAAY;IACZ,uBAAuB;IACvB,sBAAsB;IACtB,WAAW;IACX,kBAAkB;EACpB;;EDfmR;ICkBjR,gEAAgE;EAClE;AACF;;ADpBiW;ECuB/V,sCAAsC;EACtC,2BAA2B;;EDxB8Y;IC2Bva,iCAAiC;EACnC;AACF;;AD7B4d;ECgC1d,uEAAuE;EACvE,4BAA4B;;EDjC8iB;ICoCxkB,4BAA4B;EAC9B;;EDrC4mB;ICwC1mB,gEAAgE;EAClE;AACF;;AD1C8rB;EC6C5rB,sBAAsB;EACtB,gCAAgC;EAChC,gBAAgB;EAChB,gBAAgB;AAClB;;ADjD2xB;ECoDzxB,iCAAiC;EACjC,4BAA4B;EAC5B,gBAAgB;AAClB","sourcesContent":[".alert{border:1px solid var(--ac-border);border-radius:var(--ac-radius-lg);font-size:var(--ac-text-sm);padding:var(--ac-space-4);position:relative;width:100%;& svg{color:var(--ac-foreground);height:1rem;left:var(--ac-space-4);position:absolute;top:var(--ac-space-4);width:1rem}&:has(svg){padding-left:calc(var(--ac-space-4) + 1rem + var(--ac-space-3))}}.default{background-color:var(--ac-background);color:var(--ac-foreground);& .description{color:var(--ac-muted-foreground)}}.destructive{border-color:color-mix(in oklch,var(--ac-destructive),transparent 50%);color:var(--ac-destructive);& svg{color:var(--ac-destructive)}& .description{color:color-mix(in oklch,var(--ac-destructive),transparent 20%)}}.title{font-weight:500;letter-spacing:-.01em;line-height:1.2;margin-bottom:var(--ac-space-1)}.description{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm);line-height:1.5}",".alert {\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg);\n font-size: var(--ac-text-sm);\n padding: var(--ac-space-4);\n width: 100%;\n position: relative;\n\n & svg {\n color: var(--ac-foreground);\n height: 1rem;\n left: var(--ac-space-4);\n top: var(--ac-space-4);\n width: 1rem;\n position: absolute;\n }\n\n &:has(svg) {\n padding-left: calc(var(--ac-space-4) + 1rem + var(--ac-space-3));\n }\n}\n\n.default {\n background-color: var(--ac-background);\n color: var(--ac-foreground);\n\n & .description {\n color: var(--ac-muted-foreground);\n }\n}\n\n.destructive {\n border-color: color-mix(in oklch,var(--ac-destructive),transparent 50%);\n color: var(--ac-destructive);\n\n & svg {\n color: var(--ac-destructive);\n }\n\n & .description {\n color: color-mix(in oklch,var(--ac-destructive),transparent 20%);\n }\n}\n\n.title {\n letter-spacing: -.01em;\n margin-bottom: var(--ac-space-1);\n font-weight: 500;\n line-height: 1.2;\n}\n\n.description {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n line-height: 1.5;\n}\n"],"sourceRoot":""}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { cn } from "../../lib/utilities.js";
|
|
4
3
|
import aspect_ratio_module from "./aspect-ratio.module.js";
|
|
5
|
-
|
|
4
|
+
import * as __rspack_external_react from "react";
|
|
5
|
+
const AspectRatio = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ratio = 1, style, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
6
6
|
ref: ref,
|
|
7
7
|
className: cn(aspect_ratio_module.root, className),
|
|
8
8
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/aspect-ratio.js","sources":["../../../src/components/ui/aspect-ratio.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./aspect-ratio.module.css\";\r\n\r\n/**\r\n * Props for the {@link AspectRatio} component.\r\n */\r\nexport interface AspectRatioProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /** Aspect ratio applied to the wrapper element. @default 1 */\r\n ratio?: number | string;\r\n}\r\n\r\n/**\r\n * Preserves a predictable width-to-height ratio for arbitrary content.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <AspectRatio ratio={16 / 9}>Media</AspectRatio>\r\n * ```\r\n *\r\n * @see {@link AspectRatioProps} for available props\r\n */\r\nconst AspectRatio = React.forwardRef<HTMLDivElement, AspectRatioProps>(\r\n ({className, ratio = 1, style, ...props}: Readonly<AspectRatioProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.root, className)}\r\n style={{...style, aspectRatio: String(ratio)}}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\nAspectRatio.displayName = \"AspectRatio\";\r\n\r\nexport {AspectRatio};\r\n"],"names":["AspectRatio","React","className","ratio","style","props","ref","cn","styles","String"],"mappings":";;;;AA4BA,MAAMA,cAAc,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/aspect-ratio.js","sources":["../../../src/components/ui/aspect-ratio.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./aspect-ratio.module.css\";\r\n\r\n/**\r\n * Props for the {@link AspectRatio} component.\r\n */\r\nexport interface AspectRatioProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /** Aspect ratio applied to the wrapper element. @default 1 */\r\n ratio?: number | string;\r\n}\r\n\r\n/**\r\n * Preserves a predictable width-to-height ratio for arbitrary content.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <AspectRatio ratio={16 / 9}>Media</AspectRatio>\r\n * ```\r\n *\r\n * @see {@link AspectRatioProps} for available props\r\n */\r\nconst AspectRatio = React.forwardRef<HTMLDivElement, AspectRatioProps>(\r\n ({className, ratio = 1, style, ...props}: Readonly<AspectRatioProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.root, className)}\r\n style={{...style, aspectRatio: String(ratio)}}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\nAspectRatio.displayName = \"AspectRatio\";\r\n\r\nexport {AspectRatio};\r\n"],"names":["AspectRatio","React","className","ratio","style","props","ref","cn","styles","String"],"mappings":";;;;AA4BA,MAAMA,cAAc,WAAHA,GAAGC,wBAAAA,UAAgB,CAClC,CAAC,EAACC,SAAS,EAAEC,QAAQ,CAAC,EAAEC,KAAK,EAAE,GAAGC,OAAkC,EAAEC,MAAAA,WAAAA,GACpE,IAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,oBAAAA,IAAW,EAAEN;QAC3B,OAAO;YAAC,GAAGE,KAAK;YAAE,aAAaK,OAAON;QAAM;QAC3C,GAAGE,KAAK;;AAKfL,YAAY,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/aspect-ratio.module.css","webpack://./src/components/ui/aspect-ratio.module.css"],"names":[],"mappings":"AAAA;ECCE,sBAAsB;EACtB,WAAW;EACX,cAAc;EACd,kBAAkB;EAClB,gBAAgB;AAClB","sourcesContent":[".root{border-radius:inherit;display:block;overflow:hidden;position:relative;width:100%}",".root {\n border-radius: inherit;\n width: 100%;\n display: block;\n position: relative;\n overflow: hidden;\n}\n"],"sourceRoot":""}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Suspense } from "react";
|
|
3
2
|
import { ErrorBoundary } from "./error-boundary.js";
|
|
4
3
|
import { Spinner } from "./spinner.js";
|
|
4
|
+
import * as __rspack_external_react from "react";
|
|
5
5
|
function AsyncBoundary({ children, loadingFallback, ...errorBoundaryProps }) {
|
|
6
6
|
return /*#__PURE__*/ jsx(ErrorBoundary, {
|
|
7
7
|
...errorBoundaryProps,
|
|
8
|
-
children: /*#__PURE__*/ jsx(Suspense, {
|
|
8
|
+
children: /*#__PURE__*/ jsx(__rspack_external_react.Suspense, {
|
|
9
9
|
fallback: loadingFallback ?? /*#__PURE__*/ jsx(Spinner, {}),
|
|
10
10
|
children: children
|
|
11
11
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/async-boundary.js","sources":["../../../src/components/ui/async-boundary.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {ErrorBoundary, type ErrorBoundaryProps} from \"./error-boundary\";\r\nimport {Spinner} from \"./spinner\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link AsyncBoundary} component.\r\n *\r\n * @remarks\r\n * Extends the shared error boundary contract with a Suspense fallback so async child\r\n * trees can handle loading and error states through a single composition primitive.\r\n */\r\ninterface AsyncBoundaryProps extends Omit<ErrorBoundaryProps, \"children\"> {\r\n /**\r\n * Content that may suspend or throw during rendering.\r\n */\r\n children: React.ReactNode;\r\n /**\r\n * Fallback UI rendered while descendants are suspended.\r\n *\r\n * @default <Spinner />\r\n */\r\n loadingFallback?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Combines Suspense loading behavior with error boundary recovery semantics.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible composition component.\r\n *\r\n * Wrap async child trees with this component to centralize loading and error handling.\r\n * The loading fallback is rendered by `React.Suspense`, while rendering errors are\r\n * delegated to the shared client-side {@link ErrorBoundary}.\r\n *\r\n * @example\r\n * ```tsx\r\n * <AsyncBoundary loadingFallback={<CardSkeleton />}>\r\n * <AsyncDataPanel />\r\n * </AsyncBoundary>\r\n * ```\r\n *\r\n * @see {@link AsyncBoundaryProps} for available props\r\n */\r\nfunction AsyncBoundary({children, loadingFallback, ...errorBoundaryProps}: Readonly<AsyncBoundaryProps>): React.JSX.Element {\r\n return (\r\n <ErrorBoundary {...errorBoundaryProps}>\r\n <React.Suspense fallback={loadingFallback ?? <Spinner />}>{children}</React.Suspense>\r\n </ErrorBoundary>\r\n );\r\n}\r\n\r\nAsyncBoundary.displayName = \"AsyncBoundary\";\r\n\r\nexport {AsyncBoundary};\r\nexport type {AsyncBoundaryProps};\r\n"],"names":["AsyncBoundary","children","loadingFallback","errorBoundaryProps","ErrorBoundary","React","Spinner"],"mappings":";;;;AA4CA,SAASA,cAAc,EAACC,QAAQ,EAAEC,eAAe,EAAE,GAAGC,oBAAiD;IACrG,OAAO,WAAP,GACE,IAACC,eAAaA;QAAE,GAAGD,kBAAkB;kBACnC,kBAACE,
|
|
1
|
+
{"version":3,"file":"components/ui/async-boundary.js","sources":["../../../src/components/ui/async-boundary.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {ErrorBoundary, type ErrorBoundaryProps} from \"./error-boundary\";\r\nimport {Spinner} from \"./spinner\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link AsyncBoundary} component.\r\n *\r\n * @remarks\r\n * Extends the shared error boundary contract with a Suspense fallback so async child\r\n * trees can handle loading and error states through a single composition primitive.\r\n */\r\ninterface AsyncBoundaryProps extends Omit<ErrorBoundaryProps, \"children\"> {\r\n /**\r\n * Content that may suspend or throw during rendering.\r\n */\r\n children: React.ReactNode;\r\n /**\r\n * Fallback UI rendered while descendants are suspended.\r\n *\r\n * @default <Spinner />\r\n */\r\n loadingFallback?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Combines Suspense loading behavior with error boundary recovery semantics.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible composition component.\r\n *\r\n * Wrap async child trees with this component to centralize loading and error handling.\r\n * The loading fallback is rendered by `React.Suspense`, while rendering errors are\r\n * delegated to the shared client-side {@link ErrorBoundary}.\r\n *\r\n * @example\r\n * ```tsx\r\n * <AsyncBoundary loadingFallback={<CardSkeleton />}>\r\n * <AsyncDataPanel />\r\n * </AsyncBoundary>\r\n * ```\r\n *\r\n * @see {@link AsyncBoundaryProps} for available props\r\n */\r\nfunction AsyncBoundary({children, loadingFallback, ...errorBoundaryProps}: Readonly<AsyncBoundaryProps>): React.JSX.Element {\r\n return (\r\n <ErrorBoundary {...errorBoundaryProps}>\r\n <React.Suspense fallback={loadingFallback ?? <Spinner />}>{children}</React.Suspense>\r\n </ErrorBoundary>\r\n );\r\n}\r\n\r\nAsyncBoundary.displayName = \"AsyncBoundary\";\r\n\r\nexport {AsyncBoundary};\r\nexport type {AsyncBoundaryProps};\r\n"],"names":["AsyncBoundary","children","loadingFallback","errorBoundaryProps","ErrorBoundary","React","Spinner"],"mappings":";;;;AA4CA,SAASA,cAAc,EAACC,QAAQ,EAAEC,eAAe,EAAE,GAAGC,oBAAiD;IACrG,OAAO,WAAP,GACE,IAACC,eAAaA;QAAE,GAAGD,kBAAkB;kBACnC,kBAACE,wBAAAA,QAAc;YAAC,UAAUH,mBAAmB,WAAnBA,GAAmB,IAACI,SAAOA,CAAAA;sBAAML;;;AAGjE;AAEAD,cAAc,WAAW,GAAG"}
|
|
@@ -3,10 +3,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { Avatar as avatar_Avatar } from "@base-ui/react/avatar";
|
|
4
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import { forwardRef } from "react";
|
|
7
6
|
import { cn } from "../../lib/utilities.js";
|
|
8
7
|
import avatar_module from "./avatar.module.js";
|
|
9
|
-
|
|
8
|
+
import * as __rspack_external_react from "react";
|
|
9
|
+
const ui_avatar_Avatar = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
10
10
|
const { className, children, render, ...otherProps } = props;
|
|
11
11
|
return /*#__PURE__*/ jsx(avatar_Avatar.Root, {
|
|
12
12
|
...otherProps,
|
|
@@ -22,7 +22,7 @@ const ui_avatar_Avatar = /*#__PURE__*/ forwardRef(function(props, forwardedRef)
|
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
ui_avatar_Avatar.displayName = "Avatar";
|
|
25
|
-
const avatar_AvatarImage = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
|
|
25
|
+
const avatar_AvatarImage = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
26
26
|
const { className, render, ...otherProps } = props;
|
|
27
27
|
return /*#__PURE__*/ jsx(avatar_Avatar.Image, {
|
|
28
28
|
...otherProps,
|
|
@@ -37,7 +37,7 @@ const avatar_AvatarImage = /*#__PURE__*/ forwardRef(function(props, forwardedRef
|
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
39
|
avatar_AvatarImage.displayName = "AvatarImage";
|
|
40
|
-
const avatar_AvatarFallback = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
|
|
40
|
+
const avatar_AvatarFallback = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
41
41
|
const { className, children, render, ...otherProps } = props;
|
|
42
42
|
return /*#__PURE__*/ jsx(avatar_Avatar.Fallback, {
|
|
43
43
|
...otherProps,
|