@karakuri-ui/react 0.3.2 → 0.3.4
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/README.md +27 -4
- package/dist/components/ui/accordion.js +27 -24
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/accordion.mjs +27 -24
- package/dist/components/ui/accordion.mjs.map +1 -1
- package/dist/components/ui/alert.js +45 -27
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/alert.mjs +45 -27
- package/dist/components/ui/alert.mjs.map +1 -1
- package/dist/components/ui/avatar.js +41 -32
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/avatar.mjs +41 -32
- package/dist/components/ui/avatar.mjs.map +1 -1
- package/dist/components/ui/badge.js +46 -43
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/badge.mjs +46 -43
- package/dist/components/ui/badge.mjs.map +1 -1
- package/dist/components/ui/breadcrumb.js +30 -25
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/breadcrumb.mjs +30 -25
- package/dist/components/ui/breadcrumb.mjs.map +1 -1
- package/dist/components/ui/button-group.js +6 -5
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button-group.mjs +6 -5
- package/dist/components/ui/button-group.mjs.map +1 -1
- package/dist/components/ui/button.js +24 -14
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/button.mjs +24 -14
- package/dist/components/ui/button.mjs.map +1 -1
- package/dist/components/ui/card.js +53 -39
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/card.mjs +53 -39
- package/dist/components/ui/card.mjs.map +1 -1
- package/dist/components/ui/chart.d.mts +1 -1
- package/dist/components/ui/chart.d.ts +1 -1
- package/dist/components/ui/chart.js +154 -130
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/chart.mjs +154 -130
- package/dist/components/ui/chart.mjs.map +1 -1
- package/dist/components/ui/checkbox.js +47 -40
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/checkbox.mjs +47 -40
- package/dist/components/ui/checkbox.mjs.map +1 -1
- package/dist/components/ui/divider.js +16 -13
- package/dist/components/ui/divider.js.map +1 -1
- package/dist/components/ui/divider.mjs +16 -13
- package/dist/components/ui/divider.mjs.map +1 -1
- package/dist/components/ui/drawer.js +44 -35
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/drawer.mjs +44 -35
- package/dist/components/ui/drawer.mjs.map +1 -1
- package/dist/components/ui/dropdown.js +31 -24
- package/dist/components/ui/dropdown.js.map +1 -1
- package/dist/components/ui/dropdown.mjs +31 -24
- package/dist/components/ui/dropdown.mjs.map +1 -1
- package/dist/components/ui/field.js +18 -15
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/field.mjs +18 -15
- package/dist/components/ui/field.mjs.map +1 -1
- package/dist/components/ui/icon-button.js +17 -14
- package/dist/components/ui/icon-button.js.map +1 -1
- package/dist/components/ui/icon-button.mjs +17 -14
- package/dist/components/ui/icon-button.mjs.map +1 -1
- package/dist/components/ui/input.js +34 -29
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/input.mjs +34 -29
- package/dist/components/ui/input.mjs.map +1 -1
- package/dist/components/ui/metric-card.js +24 -21
- package/dist/components/ui/metric-card.js.map +1 -1
- package/dist/components/ui/metric-card.mjs +24 -21
- package/dist/components/ui/metric-card.mjs.map +1 -1
- package/dist/components/ui/modal.js +91 -74
- package/dist/components/ui/modal.js.map +1 -1
- package/dist/components/ui/modal.mjs +91 -74
- package/dist/components/ui/modal.mjs.map +1 -1
- package/dist/components/ui/navigation-menu.js +114 -93
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/navigation-menu.mjs +114 -93
- package/dist/components/ui/navigation-menu.mjs.map +1 -1
- package/dist/components/ui/pagination.js +66 -55
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/pagination.mjs +66 -55
- package/dist/components/ui/pagination.mjs.map +1 -1
- package/dist/components/ui/popover.js +39 -36
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/popover.mjs +39 -36
- package/dist/components/ui/popover.mjs.map +1 -1
- package/dist/components/ui/progress.js +73 -64
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/progress.mjs +73 -64
- package/dist/components/ui/progress.mjs.map +1 -1
- package/dist/components/ui/radio-group.js +23 -19
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/radio-group.mjs +23 -19
- package/dist/components/ui/radio-group.mjs.map +1 -1
- package/dist/components/ui/segmented.js +7 -6
- package/dist/components/ui/segmented.js.map +1 -1
- package/dist/components/ui/segmented.mjs +7 -6
- package/dist/components/ui/segmented.mjs.map +1 -1
- package/dist/components/ui/select.js +55 -48
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/select.mjs +55 -48
- package/dist/components/ui/select.mjs.map +1 -1
- package/dist/components/ui/skeleton.js +20 -19
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/skeleton.mjs +20 -19
- package/dist/components/ui/skeleton.mjs.map +1 -1
- package/dist/components/ui/slider.js +68 -58
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/slider.mjs +68 -58
- package/dist/components/ui/slider.mjs.map +1 -1
- package/dist/components/ui/spinner.js +185 -176
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/spinner.mjs +185 -176
- package/dist/components/ui/spinner.mjs.map +1 -1
- package/dist/components/ui/switch.js +39 -28
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/switch.mjs +39 -28
- package/dist/components/ui/switch.mjs.map +1 -1
- package/dist/components/ui/table.js +26 -23
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/table.mjs +26 -23
- package/dist/components/ui/table.mjs.map +1 -1
- package/dist/components/ui/tabs.js +25 -9
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/tabs.mjs +25 -9
- package/dist/components/ui/tabs.mjs.map +1 -1
- package/dist/components/ui/textarea.js +2 -1
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/textarea.mjs +2 -1
- package/dist/components/ui/textarea.mjs.map +1 -1
- package/dist/components/ui/toast.js +104 -80
- package/dist/components/ui/toast.js.map +1 -1
- package/dist/components/ui/toast.mjs +104 -80
- package/dist/components/ui/toast.mjs.map +1 -1
- package/dist/components/ui/toggle-group.js +9 -8
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle-group.mjs +9 -8
- package/dist/components/ui/toggle-group.mjs.map +1 -1
- package/dist/components/ui/toggle.js +3 -2
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/toggle.mjs +3 -2
- package/dist/components/ui/toggle.mjs.map +1 -1
- package/dist/components/ui/tooltip.js +18 -15
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/tooltip.mjs +18 -15
- package/dist/components/ui/tooltip.mjs.map +1 -1
- package/package.json +27 -19
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
5
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
5
6
|
import { cva } from "class-variance-authority";
|
|
6
7
|
import { cn } from "../../lib/utils";
|
|
7
|
-
const DefaultCloseIcon = ({ className }) => /* @__PURE__ */
|
|
8
|
+
const DefaultCloseIcon = ({ className }) => /* @__PURE__ */ jsx(
|
|
8
9
|
"svg",
|
|
9
10
|
{
|
|
10
11
|
className,
|
|
@@ -12,20 +13,20 @@ const DefaultCloseIcon = ({ className }) => /* @__PURE__ */ React.createElement(
|
|
|
12
13
|
viewBox: "0 0 24 24",
|
|
13
14
|
stroke: "currentColor",
|
|
14
15
|
strokeWidth: 2,
|
|
15
|
-
"aria-hidden": "true"
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
"aria-hidden": "true",
|
|
17
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
18
|
+
}
|
|
18
19
|
);
|
|
19
20
|
const ModalStyleContext = React.createContext({
|
|
20
21
|
scrollBehavior: "outside"
|
|
21
22
|
});
|
|
22
23
|
function Modal(props) {
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...props });
|
|
24
25
|
}
|
|
25
26
|
const ModalTrigger = DialogPrimitive.Trigger;
|
|
26
27
|
const ModalPortal = DialogPrimitive.Portal;
|
|
27
28
|
const ModalClose = DialogPrimitive.Close;
|
|
28
|
-
const ModalOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
29
|
+
const ModalOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
29
30
|
DialogPrimitive.Overlay,
|
|
30
31
|
{
|
|
31
32
|
ref,
|
|
@@ -63,61 +64,74 @@ const ModalContent = React.forwardRef(({ className, children, size = "sm", scrol
|
|
|
63
64
|
const isInside = scrollBehavior === "inside";
|
|
64
65
|
const isFull = size === "full";
|
|
65
66
|
const useInsideScroll = isInside || isFull;
|
|
66
|
-
const closeButton = showCloseButton && /* @__PURE__ */
|
|
67
|
+
const closeButton = showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: cn(
|
|
67
68
|
"absolute right-4 top-4 rounded-md p-1",
|
|
68
69
|
"text-text-muted hover:text-foreground",
|
|
69
70
|
"transition-colors duration-fast",
|
|
70
71
|
"focus-visible:focus-ring focus-visible:outline-none",
|
|
71
72
|
"disabled:pointer-events-none"
|
|
72
|
-
)
|
|
73
|
+
), children: [
|
|
74
|
+
closeIcon || /* @__PURE__ */ jsx(DefaultCloseIcon, { className: "icon-sm" }),
|
|
75
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
76
|
+
] });
|
|
73
77
|
if (!useInsideScroll) {
|
|
74
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ jsxs(ModalPortal, { children: [
|
|
79
|
+
/* @__PURE__ */ jsx(ModalOverlay, {}),
|
|
80
|
+
/* @__PURE__ */ jsx(ModalStyleContext.Provider, { value: { scrollBehavior: "outside" }, children: /* @__PURE__ */ jsx(
|
|
81
|
+
DialogPrimitive.Content,
|
|
82
|
+
{
|
|
83
|
+
ref,
|
|
84
|
+
className: cn(
|
|
85
|
+
"fixed inset-0 z-modal overflow-y-auto",
|
|
86
|
+
"focus:outline-none",
|
|
87
|
+
"data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit"
|
|
88
|
+
),
|
|
89
|
+
...props,
|
|
90
|
+
children: /* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ jsxs(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
className: cn(
|
|
94
|
+
"relative w-full rounded-xl bg-background text-foreground shadow-xl overflow-hidden",
|
|
95
|
+
modalContentVariants({ size }),
|
|
96
|
+
className
|
|
97
|
+
),
|
|
98
|
+
onClick: (e) => e.stopPropagation(),
|
|
99
|
+
children: [
|
|
100
|
+
children,
|
|
101
|
+
closeButton
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
) }) })
|
|
105
|
+
}
|
|
106
|
+
) })
|
|
107
|
+
] });
|
|
108
|
+
}
|
|
109
|
+
return /* @__PURE__ */ jsxs(ModalPortal, { children: [
|
|
110
|
+
/* @__PURE__ */ jsx(ModalOverlay, {}),
|
|
111
|
+
/* @__PURE__ */ jsx(ModalStyleContext.Provider, { value: { scrollBehavior: "inside" }, children: /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-modal flex items-center justify-center p-4", children: /* @__PURE__ */ jsxs(
|
|
75
112
|
DialogPrimitive.Content,
|
|
76
113
|
{
|
|
77
114
|
ref,
|
|
78
115
|
className: cn(
|
|
79
|
-
"
|
|
116
|
+
"relative w-full rounded-xl bg-background text-foreground shadow-xl overflow-hidden",
|
|
80
117
|
"focus:outline-none",
|
|
81
|
-
"data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit"
|
|
118
|
+
"data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit",
|
|
119
|
+
modalContentVariants({ size }),
|
|
120
|
+
isInside && "flex flex-col max-h-[85vh]",
|
|
121
|
+
isFull && "flex flex-col h-full",
|
|
122
|
+
className
|
|
82
123
|
),
|
|
83
|
-
...props
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
className
|
|
92
|
-
),
|
|
93
|
-
onClick: (e) => e.stopPropagation()
|
|
94
|
-
},
|
|
95
|
-
children,
|
|
96
|
-
closeButton
|
|
97
|
-
)))
|
|
98
|
-
)));
|
|
99
|
-
}
|
|
100
|
-
return /* @__PURE__ */ React.createElement(ModalPortal, null, /* @__PURE__ */ React.createElement(ModalOverlay, null), /* @__PURE__ */ React.createElement(ModalStyleContext.Provider, { value: { scrollBehavior: "inside" } }, /* @__PURE__ */ React.createElement("div", { className: "fixed inset-0 z-modal flex items-center justify-center p-4" }, /* @__PURE__ */ React.createElement(
|
|
101
|
-
DialogPrimitive.Content,
|
|
102
|
-
{
|
|
103
|
-
ref,
|
|
104
|
-
className: cn(
|
|
105
|
-
"relative w-full rounded-xl bg-background text-foreground shadow-xl overflow-hidden",
|
|
106
|
-
"focus:outline-none",
|
|
107
|
-
"data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit",
|
|
108
|
-
modalContentVariants({ size }),
|
|
109
|
-
isInside && "flex flex-col max-h-[85vh]",
|
|
110
|
-
isFull && "flex flex-col h-full",
|
|
111
|
-
className
|
|
112
|
-
),
|
|
113
|
-
...props
|
|
114
|
-
},
|
|
115
|
-
children,
|
|
116
|
-
closeButton
|
|
117
|
-
))));
|
|
124
|
+
...props,
|
|
125
|
+
children: [
|
|
126
|
+
children,
|
|
127
|
+
closeButton
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
) }) })
|
|
131
|
+
] });
|
|
118
132
|
});
|
|
119
133
|
ModalContent.displayName = "ModalContent";
|
|
120
|
-
const ModalHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
134
|
+
const ModalHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
121
135
|
"div",
|
|
122
136
|
{
|
|
123
137
|
ref,
|
|
@@ -126,7 +140,7 @@ const ModalHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
126
140
|
}
|
|
127
141
|
));
|
|
128
142
|
ModalHeader.displayName = "ModalHeader";
|
|
129
|
-
const ModalTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
143
|
+
const ModalTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
130
144
|
DialogPrimitive.Title,
|
|
131
145
|
{
|
|
132
146
|
ref,
|
|
@@ -135,7 +149,7 @@ const ModalTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
135
149
|
}
|
|
136
150
|
));
|
|
137
151
|
ModalTitle.displayName = "ModalTitle";
|
|
138
|
-
const ModalDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
152
|
+
const ModalDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
139
153
|
DialogPrimitive.Description,
|
|
140
154
|
{
|
|
141
155
|
ref,
|
|
@@ -146,7 +160,7 @@ const ModalDescription = React.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
146
160
|
ModalDescription.displayName = "ModalDescription";
|
|
147
161
|
const ModalBody = React.forwardRef(({ className, ...props }, ref) => {
|
|
148
162
|
const { scrollBehavior } = React.useContext(ModalStyleContext);
|
|
149
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ jsx(
|
|
150
164
|
"div",
|
|
151
165
|
{
|
|
152
166
|
ref,
|
|
@@ -160,7 +174,7 @@ const ModalBody = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
160
174
|
);
|
|
161
175
|
});
|
|
162
176
|
ModalBody.displayName = "ModalBody";
|
|
163
|
-
const ModalFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
177
|
+
const ModalFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
164
178
|
"div",
|
|
165
179
|
{
|
|
166
180
|
ref,
|
|
@@ -175,7 +189,7 @@ ModalFooter.displayName = "ModalFooter";
|
|
|
175
189
|
const AlertModal = AlertDialogPrimitive.Root;
|
|
176
190
|
const AlertModalTrigger = AlertDialogPrimitive.Trigger;
|
|
177
191
|
const AlertModalPortal = AlertDialogPrimitive.Portal;
|
|
178
|
-
const AlertModalOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
192
|
+
const AlertModalOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
179
193
|
AlertDialogPrimitive.Overlay,
|
|
180
194
|
{
|
|
181
195
|
ref,
|
|
@@ -201,23 +215,26 @@ const alertModalContentVariants = cva("", {
|
|
|
201
215
|
size: "sm"
|
|
202
216
|
}
|
|
203
217
|
});
|
|
204
|
-
const AlertModalContent = React.forwardRef(({ className, children, size = "sm", ...props }, ref) => /* @__PURE__ */
|
|
205
|
-
|
|
206
|
-
{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
218
|
+
const AlertModalContent = React.forwardRef(({ className, children, size = "sm", ...props }, ref) => /* @__PURE__ */ jsxs(AlertModalPortal, { children: [
|
|
219
|
+
/* @__PURE__ */ jsx(AlertModalOverlay, {}),
|
|
220
|
+
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-modal flex items-center justify-center p-4", children: /* @__PURE__ */ jsx(
|
|
221
|
+
AlertDialogPrimitive.Content,
|
|
222
|
+
{
|
|
223
|
+
ref,
|
|
224
|
+
className: cn(
|
|
225
|
+
"relative w-full rounded-xl bg-background text-foreground shadow-xl",
|
|
226
|
+
"focus:outline-none",
|
|
227
|
+
"data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit",
|
|
228
|
+
alertModalContentVariants({ size }),
|
|
229
|
+
className
|
|
230
|
+
),
|
|
231
|
+
...props,
|
|
232
|
+
children
|
|
233
|
+
}
|
|
234
|
+
) })
|
|
235
|
+
] }));
|
|
219
236
|
AlertModalContent.displayName = "AlertModalContent";
|
|
220
|
-
const AlertModalHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
237
|
+
const AlertModalHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
221
238
|
"div",
|
|
222
239
|
{
|
|
223
240
|
ref,
|
|
@@ -226,7 +243,7 @@ const AlertModalHeader = React.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
226
243
|
}
|
|
227
244
|
));
|
|
228
245
|
AlertModalHeader.displayName = "AlertModalHeader";
|
|
229
|
-
const AlertModalTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
246
|
+
const AlertModalTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
230
247
|
AlertDialogPrimitive.Title,
|
|
231
248
|
{
|
|
232
249
|
ref,
|
|
@@ -235,7 +252,7 @@ const AlertModalTitle = React.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
235
252
|
}
|
|
236
253
|
));
|
|
237
254
|
AlertModalTitle.displayName = "AlertModalTitle";
|
|
238
|
-
const AlertModalDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
255
|
+
const AlertModalDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
239
256
|
AlertDialogPrimitive.Description,
|
|
240
257
|
{
|
|
241
258
|
ref,
|
|
@@ -244,7 +261,7 @@ const AlertModalDescription = React.forwardRef(({ className, ...props }, ref) =>
|
|
|
244
261
|
}
|
|
245
262
|
));
|
|
246
263
|
AlertModalDescription.displayName = "AlertModalDescription";
|
|
247
|
-
const AlertModalBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
264
|
+
const AlertModalBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
248
265
|
"div",
|
|
249
266
|
{
|
|
250
267
|
ref,
|
|
@@ -253,7 +270,7 @@ const AlertModalBody = React.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
253
270
|
}
|
|
254
271
|
));
|
|
255
272
|
AlertModalBody.displayName = "AlertModalBody";
|
|
256
|
-
const AlertModalFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
273
|
+
const AlertModalFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
257
274
|
"div",
|
|
258
275
|
{
|
|
259
276
|
ref,
|
|
@@ -265,7 +282,7 @@ const AlertModalFooter = React.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
265
282
|
}
|
|
266
283
|
));
|
|
267
284
|
AlertModalFooter.displayName = "AlertModalFooter";
|
|
268
|
-
const AlertModalAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
285
|
+
const AlertModalAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
269
286
|
AlertDialogPrimitive.Action,
|
|
270
287
|
{
|
|
271
288
|
ref,
|
|
@@ -274,7 +291,7 @@ const AlertModalAction = React.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
274
291
|
}
|
|
275
292
|
));
|
|
276
293
|
AlertModalAction.displayName = "AlertModalAction";
|
|
277
|
-
const AlertModalCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
294
|
+
const AlertModalCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
278
295
|
AlertDialogPrimitive.Cancel,
|
|
279
296
|
{
|
|
280
297
|
ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/modal.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\n// ─── Default Close Icon (built-in, no external dependency) ──\nconst DefaultCloseIcon = ({ className }: { className?: string }) => (\n <svg\n className={className}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n aria-hidden=\"true\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n)\n\n// ─── Style Context ──────────────────────────────────────────\ntype ModalStyleContextValue = {\n scrollBehavior: 'inside' | 'outside'\n}\nconst ModalStyleContext = React.createContext<ModalStyleContextValue>({\n scrollBehavior: 'outside',\n})\n\n// ═══════════════════════════════════════════════════════════════\n// Modal (Dialog)\n// ═══════════════════════════════════════════════════════════════\n\n// ─── Modal (Root) — wrapper to keep our own component identity separate from DialogPrimitive.Root ──\nfunction Modal(props: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root {...props} />\n}\n\n// ─── ModalTrigger ───────────────────────────────────────────\nconst ModalTrigger = DialogPrimitive.Trigger\n\n// ─── ModalPortal ────────────────────────────────────────────\nconst ModalPortal = DialogPrimitive.Portal\n\n// ─── ModalClose ─────────────────────────────────────────────\nconst ModalClose = DialogPrimitive.Close\n\n// ─── ModalOverlay ───────────────────────────────────────────\nconst ModalOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-overlay bg-black/50',\n 'data-[state=open]:animate-modal-overlay-enter data-[state=closed]:animate-modal-overlay-exit',\n className\n )}\n {...props}\n />\n))\nModalOverlay.displayName = 'ModalOverlay'\n\n// ─── ModalContent ───────────────────────────────────────────\nconst modalContentVariants = cva('', {\n variants: {\n size: {\n xs: 'max-w-[360px]', // 360px — simple confirmation\n sm: 'max-w-[480px]', // 480px — standard (default)\n md: 'max-w-[600px]', // 600px — standard form\n lg: 'max-w-[760px]', // 760px — complex form\n xl: 'max-w-[960px]', // 960px — table, dashboard\n full: 'max-w-none', // full width (constrained by wrapper padding)\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n})\n\nexport interface ModalContentProps\n extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,\n VariantProps<typeof modalContentVariants> {\n /** Scroll behavior when content overflows */\n scrollBehavior?: 'inside' | 'outside'\n /** Show built-in close button */\n showCloseButton?: boolean\n /** Custom close icon (replaces default X) */\n closeIcon?: React.ReactNode\n}\n\nconst ModalContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n ModalContentProps\n>(({ className, children, size = 'sm', scrollBehavior = 'outside', showCloseButton = true, closeIcon, ...props }, ref) => {\n const isInside = scrollBehavior === 'inside'\n const isFull = size === 'full'\n const useInsideScroll = isInside || isFull\n\n const closeButton = showCloseButton && (\n <DialogPrimitive.Close className={cn(\n 'absolute right-4 top-4 rounded-md p-1',\n 'text-text-muted hover:text-foreground',\n 'transition-colors duration-fast',\n 'focus-visible:focus-ring focus-visible:outline-none',\n 'disabled:pointer-events-none'\n )}>\n {closeIcon || <DefaultCloseIcon className=\"icon-sm\" />}\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )\n\n if (!useInsideScroll) {\n // Outside scroll: DialogPrimitive.Content becomes the full-screen scrollable container.\n // Radix's internal RemoveScroll detects its own root element as scrollable,\n // allowing wheel/touch scroll events to pass through correctly.\n return (\n <ModalPortal>\n <ModalOverlay />\n <ModalStyleContext.Provider value={{ scrollBehavior: 'outside' }}>\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed inset-0 z-modal overflow-y-auto',\n 'focus:outline-none',\n 'data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit',\n )}\n {...props}\n >\n {/* Backdrop click area: closes dialog when clicking outside the panel */}\n <DialogPrimitive.Close asChild>\n <div className=\"flex min-h-full items-center justify-center p-4\">\n <div\n className={cn(\n 'relative w-full rounded-xl bg-background text-foreground shadow-xl overflow-hidden',\n modalContentVariants({ size }),\n className,\n )}\n onClick={(e) => e.stopPropagation()}\n >\n {children}\n {closeButton}\n </div>\n </div>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </ModalStyleContext.Provider>\n </ModalPortal>\n )\n }\n\n // Inside scroll / full: DialogPrimitive.Content is the visual modal panel.\n return (\n <ModalPortal>\n <ModalOverlay />\n <ModalStyleContext.Provider value={{ scrollBehavior: 'inside' }}>\n <div className=\"fixed inset-0 z-modal flex items-center justify-center p-4\">\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'relative w-full rounded-xl bg-background text-foreground shadow-xl overflow-hidden',\n 'focus:outline-none',\n 'data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit',\n modalContentVariants({ size }),\n isInside && 'flex flex-col max-h-[85vh]',\n isFull && 'flex flex-col h-full',\n className,\n )}\n {...props}\n >\n {children}\n {closeButton}\n </DialogPrimitive.Content>\n </div>\n </ModalStyleContext.Provider>\n </ModalPortal>\n )\n})\nModalContent.displayName = 'ModalContent'\n\n// ─── ModalHeader ────────────────────────────────────────────\nconst ModalHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-col gap-1.5 p-6 pb-0', className)}\n {...props}\n />\n))\nModalHeader.displayName = 'ModalHeader'\n\n// ─── ModalTitle ─────────────────────────────────────────────\nconst ModalTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold text-foreground', className)}\n {...props}\n />\n))\nModalTitle.displayName = 'ModalTitle'\n\n// ─── ModalDescription ───────────────────────────────────────\nconst ModalDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-md text-text-muted', className)}\n {...props}\n />\n))\nModalDescription.displayName = 'ModalDescription'\n\n// ─── ModalBody ──────────────────────────────────────────────\nconst ModalBody = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { scrollBehavior } = React.useContext(ModalStyleContext)\n return (\n <div\n ref={ref}\n className={cn(\n 'p-6',\n scrollBehavior === 'inside' && 'flex-1 overflow-y-auto',\n className\n )}\n {...props}\n />\n )\n})\nModalBody.displayName = 'ModalBody'\n\n// ─── ModalFooter ────────────────────────────────────────────\nconst ModalFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex items-center justify-end gap-3 p-6 pt-0',\n className\n )}\n {...props}\n />\n))\nModalFooter.displayName = 'ModalFooter'\n\n// ═══════════════════════════════════════════════════════════════\n// AlertModal (AlertDialog)\n// ═══════════════════════════════════════════════════════════════\n\n// ─── AlertModal (Root) ──────────────────────────────────────\nconst AlertModal = AlertDialogPrimitive.Root\n\n// ─── AlertModalTrigger ──────────────────────────────────────\nconst AlertModalTrigger = AlertDialogPrimitive.Trigger\n\n// ─── AlertModalPortal ───────────────────────────────────────\nconst AlertModalPortal = AlertDialogPrimitive.Portal\n\n// ─── AlertModalOverlay ──────────────────────────────────────\nconst AlertModalOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-overlay bg-black/50',\n 'data-[state=open]:animate-modal-overlay-enter data-[state=closed]:animate-modal-overlay-exit',\n className\n )}\n {...props}\n />\n))\nAlertModalOverlay.displayName = 'AlertModalOverlay'\n\n// ─── AlertModalContent ──────────────────────────────────────\nconst alertModalContentVariants = cva('', {\n variants: {\n size: {\n xs: 'max-w-[360px]', // 360px\n sm: 'max-w-[480px]', // 480px (default)\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n})\n\nexport interface AlertModalContentProps\n extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>,\n VariantProps<typeof alertModalContentVariants> {}\n\nconst AlertModalContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n AlertModalContentProps\n>(({ className, children, size = 'sm', ...props }, ref) => (\n <AlertModalPortal>\n <AlertModalOverlay />\n <div className=\"fixed inset-0 z-modal flex items-center justify-center p-4\">\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n 'relative w-full rounded-xl bg-background text-foreground shadow-xl',\n 'focus:outline-none',\n 'data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit',\n alertModalContentVariants({ size }),\n className\n )}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Content>\n </div>\n </AlertModalPortal>\n))\nAlertModalContent.displayName = 'AlertModalContent'\n\n// ─── AlertModalHeader ───────────────────────────────────────\nconst AlertModalHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-col gap-1.5 p-6 pb-0', className)}\n {...props}\n />\n))\nAlertModalHeader.displayName = 'AlertModalHeader'\n\n// ─── AlertModalTitle ────────────────────────────────────────\nconst AlertModalTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold text-foreground', className)}\n {...props}\n />\n))\nAlertModalTitle.displayName = 'AlertModalTitle'\n\n// ─── AlertModalDescription ──────────────────────────────────\nconst AlertModalDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn('text-md text-text-muted', className)}\n {...props}\n />\n))\nAlertModalDescription.displayName = 'AlertModalDescription'\n\n// ─── AlertModalBody ─────────────────────────────────────────\nconst AlertModalBody = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('p-6', className)}\n {...props}\n />\n))\nAlertModalBody.displayName = 'AlertModalBody'\n\n// ─── AlertModalFooter ───────────────────────────────────────\nconst AlertModalFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex items-center justify-end gap-3 p-6 pt-0',\n className\n )}\n {...props}\n />\n))\nAlertModalFooter.displayName = 'AlertModalFooter'\n\n// ─── AlertModalAction ───────────────────────────────────────\nconst AlertModalAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={className}\n {...props}\n />\n))\nAlertModalAction.displayName = 'AlertModalAction'\n\n// ─── AlertModalCancel ───────────────────────────────────────\nconst AlertModalCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={className}\n {...props}\n />\n))\nAlertModalCancel.displayName = 'AlertModalCancel'\n\n// ─── Exports ────────────────────────────────────────────────\nexport {\n Modal,\n ModalTrigger,\n ModalPortal,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalTitle,\n ModalDescription,\n ModalBody,\n ModalFooter,\n ModalClose,\n modalContentVariants,\n AlertModal,\n AlertModalTrigger,\n AlertModalPortal,\n AlertModalOverlay,\n AlertModalContent,\n AlertModalHeader,\n AlertModalTitle,\n AlertModalDescription,\n AlertModalBody,\n AlertModalFooter,\n AlertModalAction,\n AlertModalCancel,\n alertModalContentVariants,\n}\n"],"mappings":";AAEA,YAAY,WAAW;AACvB,YAAY,qBAAqB;AACjC,YAAY,0BAA0B;AACtC,SAAS,WAA8B;AACvC,SAAS,UAAU;AAGnB,MAAM,mBAAmB,CAAC,EAAE,UAAU,MACpC;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,QAAO;AAAA,IACP,aAAa;AAAA,IACb,eAAY;AAAA;AAAA,EAEZ,oCAAC,UAAK,eAAc,SAAQ,gBAAe,SAAQ,GAAE,wBAAuB;AAC9E;AAOF,MAAM,oBAAoB,MAAM,cAAsC;AAAA,EACpE,gBAAgB;AAClB,CAAC;AAOD,SAAS,MAAM,OAAoE;AACjF,SAAO,oCAAC,gBAAgB,MAAhB,EAAsB,GAAG,OAAO;AAC1C;AAGA,MAAM,eAAe,gBAAgB;AAGrC,MAAM,cAAc,gBAAgB;AAGpC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A,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,iBAAiB,cAAc;AAG/B,MAAM,mBAAmB,MAAM,WAG7B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,qBAAqB;AAAA,EAArB;AAAA,IACC;AAAA,IACA;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,iBAAiB,cAAc;AAG/B,MAAM,mBAAmB,MAAM,WAG7B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,qBAAqB;AAAA,EAArB;AAAA,IACC;AAAA,IACA;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,iBAAiB,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/modal.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\n// ─── Default Close Icon (built-in, no external dependency) ──\nconst DefaultCloseIcon = ({ className }: { className?: string }) => (\n <svg\n className={className}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n aria-hidden=\"true\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n)\n\n// ─── Style Context ──────────────────────────────────────────\ntype ModalStyleContextValue = {\n scrollBehavior: 'inside' | 'outside'\n}\nconst ModalStyleContext = React.createContext<ModalStyleContextValue>({\n scrollBehavior: 'outside',\n})\n\n// ═══════════════════════════════════════════════════════════════\n// Modal (Dialog)\n// ═══════════════════════════════════════════════════════════════\n\n// ─── Modal (Root) — wrapper to keep our own component identity separate from DialogPrimitive.Root ──\nfunction Modal(props: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root {...props} />\n}\n\n// ─── ModalTrigger ───────────────────────────────────────────\nconst ModalTrigger = DialogPrimitive.Trigger\n\n// ─── ModalPortal ────────────────────────────────────────────\nconst ModalPortal = DialogPrimitive.Portal\n\n// ─── ModalClose ─────────────────────────────────────────────\nconst ModalClose = DialogPrimitive.Close\n\n// ─── ModalOverlay ───────────────────────────────────────────\nconst ModalOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-overlay bg-black/50',\n 'data-[state=open]:animate-modal-overlay-enter data-[state=closed]:animate-modal-overlay-exit',\n className\n )}\n {...props}\n />\n))\nModalOverlay.displayName = 'ModalOverlay'\n\n// ─── ModalContent ───────────────────────────────────────────\nconst modalContentVariants = cva('', {\n variants: {\n size: {\n xs: 'max-w-[360px]', // 360px — simple confirmation\n sm: 'max-w-[480px]', // 480px — standard (default)\n md: 'max-w-[600px]', // 600px — standard form\n lg: 'max-w-[760px]', // 760px — complex form\n xl: 'max-w-[960px]', // 960px — table, dashboard\n full: 'max-w-none', // full width (constrained by wrapper padding)\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n})\n\nexport interface ModalContentProps\n extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,\n VariantProps<typeof modalContentVariants> {\n /** Scroll behavior when content overflows */\n scrollBehavior?: 'inside' | 'outside'\n /** Show built-in close button */\n showCloseButton?: boolean\n /** Custom close icon (replaces default X) */\n closeIcon?: React.ReactNode\n}\n\nconst ModalContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n ModalContentProps\n>(({ className, children, size = 'sm', scrollBehavior = 'outside', showCloseButton = true, closeIcon, ...props }, ref) => {\n const isInside = scrollBehavior === 'inside'\n const isFull = size === 'full'\n const useInsideScroll = isInside || isFull\n\n const closeButton = showCloseButton && (\n <DialogPrimitive.Close className={cn(\n 'absolute right-4 top-4 rounded-md p-1',\n 'text-text-muted hover:text-foreground',\n 'transition-colors duration-fast',\n 'focus-visible:focus-ring focus-visible:outline-none',\n 'disabled:pointer-events-none'\n )}>\n {closeIcon || <DefaultCloseIcon className=\"icon-sm\" />}\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )\n\n if (!useInsideScroll) {\n // Outside scroll: DialogPrimitive.Content becomes the full-screen scrollable container.\n // Radix's internal RemoveScroll detects its own root element as scrollable,\n // allowing wheel/touch scroll events to pass through correctly.\n return (\n <ModalPortal>\n <ModalOverlay />\n <ModalStyleContext.Provider value={{ scrollBehavior: 'outside' }}>\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed inset-0 z-modal overflow-y-auto',\n 'focus:outline-none',\n 'data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit',\n )}\n {...props}\n >\n {/* Backdrop click area: closes dialog when clicking outside the panel */}\n <DialogPrimitive.Close asChild>\n <div className=\"flex min-h-full items-center justify-center p-4\">\n <div\n className={cn(\n 'relative w-full rounded-xl bg-background text-foreground shadow-xl overflow-hidden',\n modalContentVariants({ size }),\n className,\n )}\n onClick={(e) => e.stopPropagation()}\n >\n {children}\n {closeButton}\n </div>\n </div>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </ModalStyleContext.Provider>\n </ModalPortal>\n )\n }\n\n // Inside scroll / full: DialogPrimitive.Content is the visual modal panel.\n return (\n <ModalPortal>\n <ModalOverlay />\n <ModalStyleContext.Provider value={{ scrollBehavior: 'inside' }}>\n <div className=\"fixed inset-0 z-modal flex items-center justify-center p-4\">\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'relative w-full rounded-xl bg-background text-foreground shadow-xl overflow-hidden',\n 'focus:outline-none',\n 'data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit',\n modalContentVariants({ size }),\n isInside && 'flex flex-col max-h-[85vh]',\n isFull && 'flex flex-col h-full',\n className,\n )}\n {...props}\n >\n {children}\n {closeButton}\n </DialogPrimitive.Content>\n </div>\n </ModalStyleContext.Provider>\n </ModalPortal>\n )\n})\nModalContent.displayName = 'ModalContent'\n\n// ─── ModalHeader ────────────────────────────────────────────\nconst ModalHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-col gap-1.5 p-6 pb-0', className)}\n {...props}\n />\n))\nModalHeader.displayName = 'ModalHeader'\n\n// ─── ModalTitle ─────────────────────────────────────────────\nconst ModalTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold text-foreground', className)}\n {...props}\n />\n))\nModalTitle.displayName = 'ModalTitle'\n\n// ─── ModalDescription ───────────────────────────────────────\nconst ModalDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-md text-text-muted', className)}\n {...props}\n />\n))\nModalDescription.displayName = 'ModalDescription'\n\n// ─── ModalBody ──────────────────────────────────────────────\nconst ModalBody = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { scrollBehavior } = React.useContext(ModalStyleContext)\n return (\n <div\n ref={ref}\n className={cn(\n 'p-6',\n scrollBehavior === 'inside' && 'flex-1 overflow-y-auto',\n className\n )}\n {...props}\n />\n )\n})\nModalBody.displayName = 'ModalBody'\n\n// ─── ModalFooter ────────────────────────────────────────────\nconst ModalFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex items-center justify-end gap-3 p-6 pt-0',\n className\n )}\n {...props}\n />\n))\nModalFooter.displayName = 'ModalFooter'\n\n// ═══════════════════════════════════════════════════════════════\n// AlertModal (AlertDialog)\n// ═══════════════════════════════════════════════════════════════\n\n// ─── AlertModal (Root) ──────────────────────────────────────\nconst AlertModal = AlertDialogPrimitive.Root\n\n// ─── AlertModalTrigger ──────────────────────────────────────\nconst AlertModalTrigger = AlertDialogPrimitive.Trigger\n\n// ─── AlertModalPortal ───────────────────────────────────────\nconst AlertModalPortal = AlertDialogPrimitive.Portal\n\n// ─── AlertModalOverlay ──────────────────────────────────────\nconst AlertModalOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-overlay bg-black/50',\n 'data-[state=open]:animate-modal-overlay-enter data-[state=closed]:animate-modal-overlay-exit',\n className\n )}\n {...props}\n />\n))\nAlertModalOverlay.displayName = 'AlertModalOverlay'\n\n// ─── AlertModalContent ──────────────────────────────────────\nconst alertModalContentVariants = cva('', {\n variants: {\n size: {\n xs: 'max-w-[360px]', // 360px\n sm: 'max-w-[480px]', // 480px (default)\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n})\n\nexport interface AlertModalContentProps\n extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>,\n VariantProps<typeof alertModalContentVariants> {}\n\nconst AlertModalContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n AlertModalContentProps\n>(({ className, children, size = 'sm', ...props }, ref) => (\n <AlertModalPortal>\n <AlertModalOverlay />\n <div className=\"fixed inset-0 z-modal flex items-center justify-center p-4\">\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n 'relative w-full rounded-xl bg-background text-foreground shadow-xl',\n 'focus:outline-none',\n 'data-[state=open]:animate-modal-content-enter data-[state=closed]:animate-modal-content-exit',\n alertModalContentVariants({ size }),\n className\n )}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Content>\n </div>\n </AlertModalPortal>\n))\nAlertModalContent.displayName = 'AlertModalContent'\n\n// ─── AlertModalHeader ───────────────────────────────────────\nconst AlertModalHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-col gap-1.5 p-6 pb-0', className)}\n {...props}\n />\n))\nAlertModalHeader.displayName = 'AlertModalHeader'\n\n// ─── AlertModalTitle ────────────────────────────────────────\nconst AlertModalTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold text-foreground', className)}\n {...props}\n />\n))\nAlertModalTitle.displayName = 'AlertModalTitle'\n\n// ─── AlertModalDescription ──────────────────────────────────\nconst AlertModalDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn('text-md text-text-muted', className)}\n {...props}\n />\n))\nAlertModalDescription.displayName = 'AlertModalDescription'\n\n// ─── AlertModalBody ─────────────────────────────────────────\nconst AlertModalBody = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('p-6', className)}\n {...props}\n />\n))\nAlertModalBody.displayName = 'AlertModalBody'\n\n// ─── AlertModalFooter ───────────────────────────────────────\nconst AlertModalFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex items-center justify-end gap-3 p-6 pt-0',\n className\n )}\n {...props}\n />\n))\nAlertModalFooter.displayName = 'AlertModalFooter'\n\n// ─── AlertModalAction ───────────────────────────────────────\nconst AlertModalAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={className}\n {...props}\n />\n))\nAlertModalAction.displayName = 'AlertModalAction'\n\n// ─── AlertModalCancel ───────────────────────────────────────\nconst AlertModalCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={className}\n {...props}\n />\n))\nAlertModalCancel.displayName = 'AlertModalCancel'\n\n// ─── Exports ────────────────────────────────────────────────\nexport {\n Modal,\n ModalTrigger,\n ModalPortal,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalTitle,\n ModalDescription,\n ModalBody,\n ModalFooter,\n ModalClose,\n modalContentVariants,\n AlertModal,\n AlertModalTrigger,\n AlertModalPortal,\n AlertModalOverlay,\n AlertModalContent,\n AlertModalHeader,\n AlertModalTitle,\n AlertModalDescription,\n AlertModalBody,\n AlertModalFooter,\n AlertModalAction,\n AlertModalCancel,\n alertModalContentVariants,\n}\n"],"mappings":";AAkBI,cAoFA,YApFA;AAhBJ,YAAY,WAAW;AACvB,YAAY,qBAAqB;AACjC,YAAY,0BAA0B;AACtC,SAAS,WAA8B;AACvC,SAAS,UAAU;AAGnB,MAAM,mBAAmB,CAAC,EAAE,UAAU,MACpC;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,QAAO;AAAA,IACP,aAAa;AAAA,IACb,eAAY;AAAA,IAEZ,8BAAC,UAAK,eAAc,SAAQ,gBA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