beez-ui 0.4.2 → 0.5.1
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 +35 -27
- package/README.md +28 -5
- package/dist/adapters/unpic-image.js +92 -14
- package/dist/components/alert-dialog.js +444 -26
- package/dist/components/alert.js +153 -18
- package/dist/components/animated-theme-toggler.js +215 -76
- package/dist/components/avatar.js +247 -15
- package/dist/components/badge.js +18 -16
- package/dist/components/button.js +85 -28
- package/dist/components/calendar.js +327 -68
- package/dist/components/card.js +39 -9
- package/dist/components/carousel.js +454 -84
- package/dist/components/checkbox.js +50 -3
- package/dist/components/data-table.js +827 -583
- package/dist/components/dialog.js +363 -22
- package/dist/components/dropdown-menu.d.ts +1 -0
- package/dist/components/dropdown-menu.js +544 -32
- package/dist/components/filter-query-bar.js +809 -468
- package/dist/components/filter-query-grammar.js +781 -736
- package/dist/components/form.js +305 -43
- package/dist/components/highlighter.js +142 -87
- package/dist/components/hover-card.js +97 -7
- package/dist/components/input-group.js +261 -41
- package/dist/components/input.js +8 -2
- package/dist/components/label.js +38 -3
- package/dist/components/link.js +45 -7
- package/dist/components/pagination.js +332 -16
- package/dist/components/popover.js +222 -16
- package/dist/components/radio-group.js +85 -5
- package/dist/components/select.js +451 -22
- package/dist/components/separator.js +43 -3
- package/dist/components/sheet.js +345 -22
- package/dist/components/sidebar.js +1385 -193
- package/dist/components/skeleton.js +6 -2
- package/dist/components/svgs/whatsappIcon.js +11 -1
- package/dist/components/switch.js +55 -3
- package/dist/components/table.js +288 -18
- package/dist/components/tabs.js +161 -18
- package/dist/components/textarea.js +7 -2
- package/dist/components/themed-toaster.js +63 -20
- package/dist/components/tooltip.js +128 -9
- package/dist/components/typing-animation.js +335 -150
- package/dist/constants/sidebar.js +1 -4
- package/dist/hooks/use-mobile.js +8 -8
- package/dist/hooks/use-sidebar-persistence.js +27 -27
- package/dist/lib/image-dimensions.js +2 -2
- package/dist/lib/year-month-filter.js +38 -40
- package/dist/next.js +69 -17
- package/dist/providers/beez-ui-provider.js +48 -7
- package/dist/providers/native-provider.js +40 -6
- package/dist/styles.css +1 -1
- package/dist/tanstack.js +35 -23
- package/package.json +4 -1
|
@@ -1,42 +1,460 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
4
5
|
import { cn } from "../lib/utils.js";
|
|
5
6
|
import { Button } from "./button.js";
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
function AlertDialog(t0) {
|
|
9
|
+
const $ = _c(4);
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = props;
|
|
15
|
+
} else {
|
|
16
|
+
props = $[1];
|
|
17
|
+
}
|
|
18
|
+
let t1;
|
|
19
|
+
if ($[2] !== props) {
|
|
20
|
+
t1 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Root, {
|
|
21
|
+
"data-slot": "alert-dialog",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
$[2] = props;
|
|
25
|
+
$[3] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t1 = $[3];
|
|
28
|
+
}
|
|
29
|
+
return t1;
|
|
8
30
|
}
|
|
9
|
-
function AlertDialogTrigger(
|
|
10
|
-
|
|
31
|
+
function AlertDialogTrigger(t0) {
|
|
32
|
+
const $ = _c(4);
|
|
33
|
+
let props;
|
|
34
|
+
if ($[0] !== t0) {
|
|
35
|
+
({...props} = t0);
|
|
36
|
+
$[0] = t0;
|
|
37
|
+
$[1] = props;
|
|
38
|
+
} else {
|
|
39
|
+
props = $[1];
|
|
40
|
+
}
|
|
41
|
+
let t1;
|
|
42
|
+
if ($[2] !== props) {
|
|
43
|
+
t1 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Trigger, {
|
|
44
|
+
"data-slot": "alert-dialog-trigger",
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
$[2] = props;
|
|
48
|
+
$[3] = t1;
|
|
49
|
+
} else {
|
|
50
|
+
t1 = $[3];
|
|
51
|
+
}
|
|
52
|
+
return t1;
|
|
11
53
|
}
|
|
12
|
-
function AlertDialogPortal(
|
|
13
|
-
|
|
54
|
+
function AlertDialogPortal(t0) {
|
|
55
|
+
const $ = _c(4);
|
|
56
|
+
let props;
|
|
57
|
+
if ($[0] !== t0) {
|
|
58
|
+
({...props} = t0);
|
|
59
|
+
$[0] = t0;
|
|
60
|
+
$[1] = props;
|
|
61
|
+
} else {
|
|
62
|
+
props = $[1];
|
|
63
|
+
}
|
|
64
|
+
let t1;
|
|
65
|
+
if ($[2] !== props) {
|
|
66
|
+
t1 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Portal, {
|
|
67
|
+
"data-slot": "alert-dialog-portal",
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
$[2] = props;
|
|
71
|
+
$[3] = t1;
|
|
72
|
+
} else {
|
|
73
|
+
t1 = $[3];
|
|
74
|
+
}
|
|
75
|
+
return t1;
|
|
14
76
|
}
|
|
15
|
-
function AlertDialogOverlay(
|
|
16
|
-
|
|
77
|
+
function AlertDialogOverlay(t0) {
|
|
78
|
+
const $ = _c(8);
|
|
79
|
+
let className;
|
|
80
|
+
let props;
|
|
81
|
+
if ($[0] !== t0) {
|
|
82
|
+
({className, ...props} = t0);
|
|
83
|
+
$[0] = t0;
|
|
84
|
+
$[1] = className;
|
|
85
|
+
$[2] = props;
|
|
86
|
+
} else {
|
|
87
|
+
className = $[1];
|
|
88
|
+
props = $[2];
|
|
89
|
+
}
|
|
90
|
+
let t1;
|
|
91
|
+
if ($[3] !== className) {
|
|
92
|
+
t1 = cn("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className);
|
|
93
|
+
$[3] = className;
|
|
94
|
+
$[4] = t1;
|
|
95
|
+
} else {
|
|
96
|
+
t1 = $[4];
|
|
97
|
+
}
|
|
98
|
+
let t2;
|
|
99
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
100
|
+
t2 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Overlay, {
|
|
101
|
+
"data-slot": "alert-dialog-overlay",
|
|
102
|
+
className: t1,
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
$[5] = props;
|
|
106
|
+
$[6] = t1;
|
|
107
|
+
$[7] = t2;
|
|
108
|
+
} else {
|
|
109
|
+
t2 = $[7];
|
|
110
|
+
}
|
|
111
|
+
return t2;
|
|
17
112
|
}
|
|
18
|
-
function AlertDialogContent(
|
|
19
|
-
|
|
113
|
+
function AlertDialogContent(t0) {
|
|
114
|
+
const $ = _c(11);
|
|
115
|
+
let className;
|
|
116
|
+
let props;
|
|
117
|
+
let t1;
|
|
118
|
+
if ($[0] !== t0) {
|
|
119
|
+
({className, size: t1, ...props} = t0);
|
|
120
|
+
$[0] = t0;
|
|
121
|
+
$[1] = className;
|
|
122
|
+
$[2] = props;
|
|
123
|
+
$[3] = t1;
|
|
124
|
+
} else {
|
|
125
|
+
className = $[1];
|
|
126
|
+
props = $[2];
|
|
127
|
+
t1 = $[3];
|
|
128
|
+
}
|
|
129
|
+
const size = t1 === undefined ? "default" : t1;
|
|
130
|
+
let t2;
|
|
131
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
132
|
+
t2 = /* @__PURE__ */ _jsx(AlertDialogOverlay, {});
|
|
133
|
+
$[4] = t2;
|
|
134
|
+
} else {
|
|
135
|
+
t2 = $[4];
|
|
136
|
+
}
|
|
137
|
+
let t3;
|
|
138
|
+
if ($[5] !== className) {
|
|
139
|
+
t3 = cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100svh-2rem)] overflow-y-auto overscroll-contain w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className);
|
|
140
|
+
$[5] = className;
|
|
141
|
+
$[6] = t3;
|
|
142
|
+
} else {
|
|
143
|
+
t3 = $[6];
|
|
144
|
+
}
|
|
145
|
+
let t4;
|
|
146
|
+
if ($[7] !== props || $[8] !== size || $[9] !== t3) {
|
|
147
|
+
t4 = /* @__PURE__ */ _jsxs(AlertDialogPortal, { children: [t2, /* @__PURE__ */ _jsx(AlertDialogPrimitive.Content, {
|
|
148
|
+
"data-slot": "alert-dialog-content",
|
|
149
|
+
"data-size": size,
|
|
150
|
+
className: t3,
|
|
151
|
+
...props
|
|
152
|
+
})] });
|
|
153
|
+
$[7] = props;
|
|
154
|
+
$[8] = size;
|
|
155
|
+
$[9] = t3;
|
|
156
|
+
$[10] = t4;
|
|
157
|
+
} else {
|
|
158
|
+
t4 = $[10];
|
|
159
|
+
}
|
|
160
|
+
return t4;
|
|
20
161
|
}
|
|
21
|
-
function AlertDialogHeader(
|
|
22
|
-
|
|
162
|
+
function AlertDialogHeader(t0) {
|
|
163
|
+
const $ = _c(8);
|
|
164
|
+
let className;
|
|
165
|
+
let props;
|
|
166
|
+
if ($[0] !== t0) {
|
|
167
|
+
({className, ...props} = t0);
|
|
168
|
+
$[0] = t0;
|
|
169
|
+
$[1] = className;
|
|
170
|
+
$[2] = props;
|
|
171
|
+
} else {
|
|
172
|
+
className = $[1];
|
|
173
|
+
props = $[2];
|
|
174
|
+
}
|
|
175
|
+
let t1;
|
|
176
|
+
if ($[3] !== className) {
|
|
177
|
+
t1 = cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className);
|
|
178
|
+
$[3] = className;
|
|
179
|
+
$[4] = t1;
|
|
180
|
+
} else {
|
|
181
|
+
t1 = $[4];
|
|
182
|
+
}
|
|
183
|
+
let t2;
|
|
184
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
185
|
+
t2 = /* @__PURE__ */ _jsx("div", {
|
|
186
|
+
"data-slot": "alert-dialog-header",
|
|
187
|
+
className: t1,
|
|
188
|
+
...props
|
|
189
|
+
});
|
|
190
|
+
$[5] = props;
|
|
191
|
+
$[6] = t1;
|
|
192
|
+
$[7] = t2;
|
|
193
|
+
} else {
|
|
194
|
+
t2 = $[7];
|
|
195
|
+
}
|
|
196
|
+
return t2;
|
|
23
197
|
}
|
|
24
|
-
function AlertDialogFooter(
|
|
25
|
-
|
|
198
|
+
function AlertDialogFooter(t0) {
|
|
199
|
+
const $ = _c(8);
|
|
200
|
+
let className;
|
|
201
|
+
let props;
|
|
202
|
+
if ($[0] !== t0) {
|
|
203
|
+
({className, ...props} = t0);
|
|
204
|
+
$[0] = t0;
|
|
205
|
+
$[1] = className;
|
|
206
|
+
$[2] = props;
|
|
207
|
+
} else {
|
|
208
|
+
className = $[1];
|
|
209
|
+
props = $[2];
|
|
210
|
+
}
|
|
211
|
+
let t1;
|
|
212
|
+
if ($[3] !== className) {
|
|
213
|
+
t1 = cn("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className);
|
|
214
|
+
$[3] = className;
|
|
215
|
+
$[4] = t1;
|
|
216
|
+
} else {
|
|
217
|
+
t1 = $[4];
|
|
218
|
+
}
|
|
219
|
+
let t2;
|
|
220
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
221
|
+
t2 = /* @__PURE__ */ _jsx("div", {
|
|
222
|
+
"data-slot": "alert-dialog-footer",
|
|
223
|
+
className: t1,
|
|
224
|
+
...props
|
|
225
|
+
});
|
|
226
|
+
$[5] = props;
|
|
227
|
+
$[6] = t1;
|
|
228
|
+
$[7] = t2;
|
|
229
|
+
} else {
|
|
230
|
+
t2 = $[7];
|
|
231
|
+
}
|
|
232
|
+
return t2;
|
|
26
233
|
}
|
|
27
|
-
function AlertDialogMedia(
|
|
28
|
-
|
|
234
|
+
function AlertDialogMedia(t0) {
|
|
235
|
+
const $ = _c(8);
|
|
236
|
+
let className;
|
|
237
|
+
let props;
|
|
238
|
+
if ($[0] !== t0) {
|
|
239
|
+
({className, ...props} = t0);
|
|
240
|
+
$[0] = t0;
|
|
241
|
+
$[1] = className;
|
|
242
|
+
$[2] = props;
|
|
243
|
+
} else {
|
|
244
|
+
className = $[1];
|
|
245
|
+
props = $[2];
|
|
246
|
+
}
|
|
247
|
+
let t1;
|
|
248
|
+
if ($[3] !== className) {
|
|
249
|
+
t1 = cn("mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8", className);
|
|
250
|
+
$[3] = className;
|
|
251
|
+
$[4] = t1;
|
|
252
|
+
} else {
|
|
253
|
+
t1 = $[4];
|
|
254
|
+
}
|
|
255
|
+
let t2;
|
|
256
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
257
|
+
t2 = /* @__PURE__ */ _jsx("div", {
|
|
258
|
+
"data-slot": "alert-dialog-media",
|
|
259
|
+
className: t1,
|
|
260
|
+
...props
|
|
261
|
+
});
|
|
262
|
+
$[5] = props;
|
|
263
|
+
$[6] = t1;
|
|
264
|
+
$[7] = t2;
|
|
265
|
+
} else {
|
|
266
|
+
t2 = $[7];
|
|
267
|
+
}
|
|
268
|
+
return t2;
|
|
29
269
|
}
|
|
30
|
-
function AlertDialogTitle(
|
|
31
|
-
|
|
270
|
+
function AlertDialogTitle(t0) {
|
|
271
|
+
const $ = _c(8);
|
|
272
|
+
let className;
|
|
273
|
+
let props;
|
|
274
|
+
if ($[0] !== t0) {
|
|
275
|
+
({className, ...props} = t0);
|
|
276
|
+
$[0] = t0;
|
|
277
|
+
$[1] = className;
|
|
278
|
+
$[2] = props;
|
|
279
|
+
} else {
|
|
280
|
+
className = $[1];
|
|
281
|
+
props = $[2];
|
|
282
|
+
}
|
|
283
|
+
let t1;
|
|
284
|
+
if ($[3] !== className) {
|
|
285
|
+
t1 = cn("font-heading text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className);
|
|
286
|
+
$[3] = className;
|
|
287
|
+
$[4] = t1;
|
|
288
|
+
} else {
|
|
289
|
+
t1 = $[4];
|
|
290
|
+
}
|
|
291
|
+
let t2;
|
|
292
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
293
|
+
t2 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Title, {
|
|
294
|
+
"data-slot": "alert-dialog-title",
|
|
295
|
+
className: t1,
|
|
296
|
+
...props
|
|
297
|
+
});
|
|
298
|
+
$[5] = props;
|
|
299
|
+
$[6] = t1;
|
|
300
|
+
$[7] = t2;
|
|
301
|
+
} else {
|
|
302
|
+
t2 = $[7];
|
|
303
|
+
}
|
|
304
|
+
return t2;
|
|
32
305
|
}
|
|
33
|
-
function AlertDialogDescription(
|
|
34
|
-
|
|
306
|
+
function AlertDialogDescription(t0) {
|
|
307
|
+
const $ = _c(8);
|
|
308
|
+
let className;
|
|
309
|
+
let props;
|
|
310
|
+
if ($[0] !== t0) {
|
|
311
|
+
({className, ...props} = t0);
|
|
312
|
+
$[0] = t0;
|
|
313
|
+
$[1] = className;
|
|
314
|
+
$[2] = props;
|
|
315
|
+
} else {
|
|
316
|
+
className = $[1];
|
|
317
|
+
props = $[2];
|
|
318
|
+
}
|
|
319
|
+
let t1;
|
|
320
|
+
if ($[3] !== className) {
|
|
321
|
+
t1 = cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className);
|
|
322
|
+
$[3] = className;
|
|
323
|
+
$[4] = t1;
|
|
324
|
+
} else {
|
|
325
|
+
t1 = $[4];
|
|
326
|
+
}
|
|
327
|
+
let t2;
|
|
328
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
329
|
+
t2 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Description, {
|
|
330
|
+
"data-slot": "alert-dialog-description",
|
|
331
|
+
className: t1,
|
|
332
|
+
...props
|
|
333
|
+
});
|
|
334
|
+
$[5] = props;
|
|
335
|
+
$[6] = t1;
|
|
336
|
+
$[7] = t2;
|
|
337
|
+
} else {
|
|
338
|
+
t2 = $[7];
|
|
339
|
+
}
|
|
340
|
+
return t2;
|
|
35
341
|
}
|
|
36
|
-
function AlertDialogAction(
|
|
37
|
-
|
|
342
|
+
function AlertDialogAction(t0) {
|
|
343
|
+
const $ = _c(14);
|
|
344
|
+
let className;
|
|
345
|
+
let props;
|
|
346
|
+
let t1;
|
|
347
|
+
let t2;
|
|
348
|
+
if ($[0] !== t0) {
|
|
349
|
+
({className, variant: t1, size: t2, ...props} = t0);
|
|
350
|
+
$[0] = t0;
|
|
351
|
+
$[1] = className;
|
|
352
|
+
$[2] = props;
|
|
353
|
+
$[3] = t1;
|
|
354
|
+
$[4] = t2;
|
|
355
|
+
} else {
|
|
356
|
+
className = $[1];
|
|
357
|
+
props = $[2];
|
|
358
|
+
t1 = $[3];
|
|
359
|
+
t2 = $[4];
|
|
360
|
+
}
|
|
361
|
+
const variant = t1 === undefined ? "default" : t1;
|
|
362
|
+
const size = t2 === undefined ? "default" : t2;
|
|
363
|
+
let t3;
|
|
364
|
+
if ($[5] !== className) {
|
|
365
|
+
t3 = cn(className);
|
|
366
|
+
$[5] = className;
|
|
367
|
+
$[6] = t3;
|
|
368
|
+
} else {
|
|
369
|
+
t3 = $[6];
|
|
370
|
+
}
|
|
371
|
+
let t4;
|
|
372
|
+
if ($[7] !== props || $[8] !== t3) {
|
|
373
|
+
t4 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Action, {
|
|
374
|
+
"data-slot": "alert-dialog-action",
|
|
375
|
+
className: t3,
|
|
376
|
+
...props
|
|
377
|
+
});
|
|
378
|
+
$[7] = props;
|
|
379
|
+
$[8] = t3;
|
|
380
|
+
$[9] = t4;
|
|
381
|
+
} else {
|
|
382
|
+
t4 = $[9];
|
|
383
|
+
}
|
|
384
|
+
let t5;
|
|
385
|
+
if ($[10] !== size || $[11] !== t4 || $[12] !== variant) {
|
|
386
|
+
t5 = /* @__PURE__ */ _jsx(Button, {
|
|
387
|
+
variant,
|
|
388
|
+
size,
|
|
389
|
+
asChild: true,
|
|
390
|
+
children: t4
|
|
391
|
+
});
|
|
392
|
+
$[10] = size;
|
|
393
|
+
$[11] = t4;
|
|
394
|
+
$[12] = variant;
|
|
395
|
+
$[13] = t5;
|
|
396
|
+
} else {
|
|
397
|
+
t5 = $[13];
|
|
398
|
+
}
|
|
399
|
+
return t5;
|
|
38
400
|
}
|
|
39
|
-
function AlertDialogCancel(
|
|
40
|
-
|
|
401
|
+
function AlertDialogCancel(t0) {
|
|
402
|
+
const $ = _c(14);
|
|
403
|
+
let className;
|
|
404
|
+
let props;
|
|
405
|
+
let t1;
|
|
406
|
+
let t2;
|
|
407
|
+
if ($[0] !== t0) {
|
|
408
|
+
({className, variant: t1, size: t2, ...props} = t0);
|
|
409
|
+
$[0] = t0;
|
|
410
|
+
$[1] = className;
|
|
411
|
+
$[2] = props;
|
|
412
|
+
$[3] = t1;
|
|
413
|
+
$[4] = t2;
|
|
414
|
+
} else {
|
|
415
|
+
className = $[1];
|
|
416
|
+
props = $[2];
|
|
417
|
+
t1 = $[3];
|
|
418
|
+
t2 = $[4];
|
|
419
|
+
}
|
|
420
|
+
const variant = t1 === undefined ? "outline" : t1;
|
|
421
|
+
const size = t2 === undefined ? "default" : t2;
|
|
422
|
+
let t3;
|
|
423
|
+
if ($[5] !== className) {
|
|
424
|
+
t3 = cn(className);
|
|
425
|
+
$[5] = className;
|
|
426
|
+
$[6] = t3;
|
|
427
|
+
} else {
|
|
428
|
+
t3 = $[6];
|
|
429
|
+
}
|
|
430
|
+
let t4;
|
|
431
|
+
if ($[7] !== props || $[8] !== t3) {
|
|
432
|
+
t4 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Cancel, {
|
|
433
|
+
"data-slot": "alert-dialog-cancel",
|
|
434
|
+
className: t3,
|
|
435
|
+
...props
|
|
436
|
+
});
|
|
437
|
+
$[7] = props;
|
|
438
|
+
$[8] = t3;
|
|
439
|
+
$[9] = t4;
|
|
440
|
+
} else {
|
|
441
|
+
t4 = $[9];
|
|
442
|
+
}
|
|
443
|
+
let t5;
|
|
444
|
+
if ($[10] !== size || $[11] !== t4 || $[12] !== variant) {
|
|
445
|
+
t5 = /* @__PURE__ */ _jsx(Button, {
|
|
446
|
+
variant,
|
|
447
|
+
size,
|
|
448
|
+
asChild: true,
|
|
449
|
+
children: t4
|
|
450
|
+
});
|
|
451
|
+
$[10] = size;
|
|
452
|
+
$[11] = t4;
|
|
453
|
+
$[12] = variant;
|
|
454
|
+
$[13] = t5;
|
|
455
|
+
} else {
|
|
456
|
+
t5 = $[13];
|
|
457
|
+
}
|
|
458
|
+
return t5;
|
|
41
459
|
}
|
|
42
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger
|
|
460
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
package/dist/components/alert.js
CHANGED
|
@@ -1,28 +1,163 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
4
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
7
|
const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
defaultVariants: {
|
|
13
|
-
variant: "default",
|
|
14
|
-
},
|
|
8
|
+
variants: { variant: {
|
|
9
|
+
default: "bg-card text-card-foreground",
|
|
10
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
11
|
+
} },
|
|
12
|
+
defaultVariants: { variant: "default" }
|
|
15
13
|
});
|
|
16
|
-
function Alert(
|
|
17
|
-
|
|
14
|
+
function Alert(t0) {
|
|
15
|
+
const $ = _c(10);
|
|
16
|
+
let className;
|
|
17
|
+
let props;
|
|
18
|
+
let variant;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({className, variant, ...props} = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = className;
|
|
23
|
+
$[2] = props;
|
|
24
|
+
$[3] = variant;
|
|
25
|
+
} else {
|
|
26
|
+
className = $[1];
|
|
27
|
+
props = $[2];
|
|
28
|
+
variant = $[3];
|
|
29
|
+
}
|
|
30
|
+
let t1;
|
|
31
|
+
if ($[4] !== className || $[5] !== variant) {
|
|
32
|
+
t1 = cn(alertVariants({ variant }), className);
|
|
33
|
+
$[4] = className;
|
|
34
|
+
$[5] = variant;
|
|
35
|
+
$[6] = t1;
|
|
36
|
+
} else {
|
|
37
|
+
t1 = $[6];
|
|
38
|
+
}
|
|
39
|
+
let t2;
|
|
40
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
41
|
+
t2 = /* @__PURE__ */ _jsx("div", {
|
|
42
|
+
"data-slot": "alert",
|
|
43
|
+
role: "alert",
|
|
44
|
+
className: t1,
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
$[7] = props;
|
|
48
|
+
$[8] = t1;
|
|
49
|
+
$[9] = t2;
|
|
50
|
+
} else {
|
|
51
|
+
t2 = $[9];
|
|
52
|
+
}
|
|
53
|
+
return t2;
|
|
18
54
|
}
|
|
19
|
-
function AlertTitle(
|
|
20
|
-
|
|
55
|
+
function AlertTitle(t0) {
|
|
56
|
+
const $ = _c(8);
|
|
57
|
+
let className;
|
|
58
|
+
let props;
|
|
59
|
+
if ($[0] !== t0) {
|
|
60
|
+
({className, ...props} = t0);
|
|
61
|
+
$[0] = t0;
|
|
62
|
+
$[1] = className;
|
|
63
|
+
$[2] = props;
|
|
64
|
+
} else {
|
|
65
|
+
className = $[1];
|
|
66
|
+
props = $[2];
|
|
67
|
+
}
|
|
68
|
+
let t1;
|
|
69
|
+
if ($[3] !== className) {
|
|
70
|
+
t1 = cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className);
|
|
71
|
+
$[3] = className;
|
|
72
|
+
$[4] = t1;
|
|
73
|
+
} else {
|
|
74
|
+
t1 = $[4];
|
|
75
|
+
}
|
|
76
|
+
let t2;
|
|
77
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
78
|
+
t2 = /* @__PURE__ */ _jsx("div", {
|
|
79
|
+
"data-slot": "alert-title",
|
|
80
|
+
className: t1,
|
|
81
|
+
...props
|
|
82
|
+
});
|
|
83
|
+
$[5] = props;
|
|
84
|
+
$[6] = t1;
|
|
85
|
+
$[7] = t2;
|
|
86
|
+
} else {
|
|
87
|
+
t2 = $[7];
|
|
88
|
+
}
|
|
89
|
+
return t2;
|
|
21
90
|
}
|
|
22
|
-
function AlertDescription(
|
|
23
|
-
|
|
91
|
+
function AlertDescription(t0) {
|
|
92
|
+
const $ = _c(8);
|
|
93
|
+
let className;
|
|
94
|
+
let props;
|
|
95
|
+
if ($[0] !== t0) {
|
|
96
|
+
({className, ...props} = t0);
|
|
97
|
+
$[0] = t0;
|
|
98
|
+
$[1] = className;
|
|
99
|
+
$[2] = props;
|
|
100
|
+
} else {
|
|
101
|
+
className = $[1];
|
|
102
|
+
props = $[2];
|
|
103
|
+
}
|
|
104
|
+
let t1;
|
|
105
|
+
if ($[3] !== className) {
|
|
106
|
+
t1 = cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className);
|
|
107
|
+
$[3] = className;
|
|
108
|
+
$[4] = t1;
|
|
109
|
+
} else {
|
|
110
|
+
t1 = $[4];
|
|
111
|
+
}
|
|
112
|
+
let t2;
|
|
113
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
114
|
+
t2 = /* @__PURE__ */ _jsx("div", {
|
|
115
|
+
"data-slot": "alert-description",
|
|
116
|
+
className: t1,
|
|
117
|
+
...props
|
|
118
|
+
});
|
|
119
|
+
$[5] = props;
|
|
120
|
+
$[6] = t1;
|
|
121
|
+
$[7] = t2;
|
|
122
|
+
} else {
|
|
123
|
+
t2 = $[7];
|
|
124
|
+
}
|
|
125
|
+
return t2;
|
|
24
126
|
}
|
|
25
|
-
function AlertAction(
|
|
26
|
-
|
|
127
|
+
function AlertAction(t0) {
|
|
128
|
+
const $ = _c(8);
|
|
129
|
+
let className;
|
|
130
|
+
let props;
|
|
131
|
+
if ($[0] !== t0) {
|
|
132
|
+
({className, ...props} = t0);
|
|
133
|
+
$[0] = t0;
|
|
134
|
+
$[1] = className;
|
|
135
|
+
$[2] = props;
|
|
136
|
+
} else {
|
|
137
|
+
className = $[1];
|
|
138
|
+
props = $[2];
|
|
139
|
+
}
|
|
140
|
+
let t1;
|
|
141
|
+
if ($[3] !== className) {
|
|
142
|
+
t1 = cn("absolute top-2 right-2", className);
|
|
143
|
+
$[3] = className;
|
|
144
|
+
$[4] = t1;
|
|
145
|
+
} else {
|
|
146
|
+
t1 = $[4];
|
|
147
|
+
}
|
|
148
|
+
let t2;
|
|
149
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
150
|
+
t2 = /* @__PURE__ */ _jsx("div", {
|
|
151
|
+
"data-slot": "alert-action",
|
|
152
|
+
className: t1,
|
|
153
|
+
...props
|
|
154
|
+
});
|
|
155
|
+
$[5] = props;
|
|
156
|
+
$[6] = t1;
|
|
157
|
+
$[7] = t2;
|
|
158
|
+
} else {
|
|
159
|
+
t2 = $[7];
|
|
160
|
+
}
|
|
161
|
+
return t2;
|
|
27
162
|
}
|
|
28
163
|
export { Alert, AlertTitle, AlertDescription, AlertAction };
|