@moondreamsdev/dreamer-ui 1.7.10-test.96 → 1.7.10-test.98
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/dist/{Toast-DViQDtwi.js → Toast-CRG3g8vr.js} +113 -165
- package/dist/Toast-CRG3g8vr.js.map +1 -0
- package/dist/Toast-wRAL8PRi.cjs +2 -0
- package/dist/Toast-wRAL8PRi.cjs.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +2247 -1938
- package/dist/components.esm.js.map +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.esm.js +1 -1
- package/dist/src/components/avatar/Avatar.d.ts +23 -0
- package/dist/src/components/avatar/icons.d.ts +30 -0
- package/dist/src/components/avatar/index.d.ts +1 -0
- package/dist/src/components/avatar/variants.d.ts +8 -0
- package/dist/src/components/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/Toast-DViQDtwi.js.map +0 -1
- package/dist/Toast-uSNJQ3wU.cjs +0 -2
- package/dist/Toast-uSNJQ3wU.cjs.map +0 -1
|
@@ -1,66 +1,12 @@
|
|
|
1
|
-
import { jsx as t, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { X as
|
|
5
|
-
import { j as
|
|
6
|
-
function
|
|
1
|
+
import { jsx as t, Fragment as S, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import $, { createContext as e, useId as q, useState as v, useEffect as p, useRef as F, useCallback as z, useMemo as E, useContext as T } from "react";
|
|
3
|
+
import { createPortal as H } from "react-dom";
|
|
4
|
+
import { X as K, C as P, E as V, I as X } from "./X-CIoyLewf.js";
|
|
5
|
+
import { j as Z } from "./join-BmgR_f4v.js";
|
|
6
|
+
function N(...l) {
|
|
7
7
|
return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
size: l = 15,
|
|
11
|
-
color: r = "currentColor",
|
|
12
|
-
className: i = "inline",
|
|
13
|
-
...n
|
|
14
|
-
}) {
|
|
15
|
-
return /* @__PURE__ */ t(
|
|
16
|
-
"svg",
|
|
17
|
-
{
|
|
18
|
-
...n,
|
|
19
|
-
width: l,
|
|
20
|
-
height: l,
|
|
21
|
-
className: i,
|
|
22
|
-
viewBox: "0 0 15 15",
|
|
23
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
-
children: /* @__PURE__ */ t(
|
|
25
|
-
"path",
|
|
26
|
-
{
|
|
27
|
-
d: "M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",
|
|
28
|
-
fill: r,
|
|
29
|
-
fillRule: "evenodd",
|
|
30
|
-
clipRule: "evenodd"
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
function de({
|
|
37
|
-
size: l = 15,
|
|
38
|
-
color: r = "currentColor",
|
|
39
|
-
className: i = "inline",
|
|
40
|
-
...n
|
|
41
|
-
}) {
|
|
42
|
-
return /* @__PURE__ */ t(
|
|
43
|
-
"svg",
|
|
44
|
-
{
|
|
45
|
-
...n,
|
|
46
|
-
width: l,
|
|
47
|
-
height: l,
|
|
48
|
-
className: i,
|
|
49
|
-
viewBox: "0 0 15 15",
|
|
50
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
51
|
-
children: /* @__PURE__ */ t(
|
|
52
|
-
"path",
|
|
53
|
-
{
|
|
54
|
-
d: "M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",
|
|
55
|
-
fill: r,
|
|
56
|
-
fillRule: "evenodd",
|
|
57
|
-
clipRule: "evenodd"
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
function X({ size: l = 15, color: r = "currentColor", className: i = "inline", ...n }) {
|
|
9
|
+
function _({ size: l = 15, color: r = "currentColor", className: i = "inline", ...n }) {
|
|
64
10
|
return /* @__PURE__ */ t(
|
|
65
11
|
"svg",
|
|
66
12
|
{
|
|
@@ -190,9 +136,13 @@ e(null);
|
|
|
190
136
|
e(null);
|
|
191
137
|
e(null);
|
|
192
138
|
e(null);
|
|
193
|
-
|
|
139
|
+
e(null);
|
|
140
|
+
e(null);
|
|
141
|
+
e(null);
|
|
142
|
+
e(null);
|
|
143
|
+
function G() {
|
|
194
144
|
const [l, r] = v(0);
|
|
195
|
-
return
|
|
145
|
+
return p(() => {
|
|
196
146
|
const i = setInterval(() => {
|
|
197
147
|
r((n) => (n + 1) % 3);
|
|
198
148
|
}, 500);
|
|
@@ -200,7 +150,7 @@ function _() {
|
|
|
200
150
|
}, []), /* @__PURE__ */ t("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((i) => /* @__PURE__ */ t(
|
|
201
151
|
"div",
|
|
202
152
|
{
|
|
203
|
-
className:
|
|
153
|
+
className: N(
|
|
204
154
|
"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",
|
|
205
155
|
l === i && "transform -translate-y-1"
|
|
206
156
|
)
|
|
@@ -208,7 +158,7 @@ function _() {
|
|
|
208
158
|
i
|
|
209
159
|
)) });
|
|
210
160
|
}
|
|
211
|
-
const
|
|
161
|
+
const J = {
|
|
212
162
|
base: "",
|
|
213
163
|
primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
|
|
214
164
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
|
|
@@ -216,7 +166,7 @@ const G = {
|
|
|
216
166
|
outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
|
|
217
167
|
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
|
|
218
168
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
|
|
219
|
-
},
|
|
169
|
+
}, Q = {
|
|
220
170
|
stripped: "",
|
|
221
171
|
fitted: "size-fit",
|
|
222
172
|
sm: "px-2 py-1 text-sm",
|
|
@@ -224,49 +174,49 @@ const G = {
|
|
|
224
174
|
lg: "px-6 py-3 text-lg",
|
|
225
175
|
icon: "p-1 w-fit aspect-square",
|
|
226
176
|
full: "p-2 w-full"
|
|
227
|
-
},
|
|
177
|
+
}, U = {
|
|
228
178
|
none: "rounded-none",
|
|
229
179
|
sm: "rounded-sm",
|
|
230
180
|
md: "rounded-md",
|
|
231
181
|
lg: "rounded-lg",
|
|
232
182
|
full: "rounded-full"
|
|
233
|
-
},
|
|
183
|
+
}, w = {
|
|
234
184
|
variant: "primary",
|
|
235
185
|
size: "md",
|
|
236
186
|
rounded: "md"
|
|
237
187
|
};
|
|
238
|
-
function
|
|
239
|
-
variant: l =
|
|
188
|
+
function W({
|
|
189
|
+
variant: l = w.variant,
|
|
240
190
|
size: r,
|
|
241
|
-
rounded: i =
|
|
191
|
+
rounded: i = w.rounded,
|
|
242
192
|
loading: n,
|
|
243
|
-
className:
|
|
244
|
-
...
|
|
193
|
+
className: o,
|
|
194
|
+
...a
|
|
245
195
|
}) {
|
|
246
196
|
let u;
|
|
247
|
-
l === "link" && !r ? u = "fitted" : u = r ||
|
|
248
|
-
const s =
|
|
197
|
+
l === "link" && !r ? u = "fitted" : u = r || w.size;
|
|
198
|
+
const s = N(
|
|
249
199
|
"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
200
|
+
J[l],
|
|
201
|
+
Q[u],
|
|
202
|
+
U[i],
|
|
253
203
|
n && "relative pointer-events-none",
|
|
254
|
-
|
|
204
|
+
o
|
|
255
205
|
);
|
|
256
|
-
if (
|
|
206
|
+
if (a.href && !a.disabled)
|
|
257
207
|
return /* @__PURE__ */ t(
|
|
258
208
|
"a",
|
|
259
209
|
{
|
|
260
|
-
...
|
|
261
|
-
rel:
|
|
262
|
-
"aria-label":
|
|
263
|
-
"aria-description":
|
|
264
|
-
href:
|
|
210
|
+
...a,
|
|
211
|
+
rel: a.rel ? a.rel : a.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
212
|
+
"aria-label": a["aria-label"],
|
|
213
|
+
"aria-description": a["aria-description"],
|
|
214
|
+
href: a.href,
|
|
265
215
|
className: s,
|
|
266
|
-
children:
|
|
216
|
+
children: a.children
|
|
267
217
|
}
|
|
268
218
|
);
|
|
269
|
-
const d =
|
|
219
|
+
const d = a;
|
|
270
220
|
return /* @__PURE__ */ b(
|
|
271
221
|
"button",
|
|
272
222
|
{
|
|
@@ -278,20 +228,20 @@ function U({
|
|
|
278
228
|
type: d.type ?? "button",
|
|
279
229
|
className: s,
|
|
280
230
|
children: [
|
|
281
|
-
n && /* @__PURE__ */ t(
|
|
282
|
-
/* @__PURE__ */ t("span", { className:
|
|
231
|
+
n && /* @__PURE__ */ t(G, {}),
|
|
232
|
+
/* @__PURE__ */ t("span", { className: N(n && "invisible"), children: d.children })
|
|
283
233
|
]
|
|
284
234
|
}
|
|
285
235
|
);
|
|
286
236
|
}
|
|
287
|
-
function
|
|
288
|
-
const [r, i] = v(!1), [n,
|
|
289
|
-
return
|
|
290
|
-
l ? (
|
|
237
|
+
function Y(l) {
|
|
238
|
+
const [r, i] = v(!1), [n, o] = v(!1);
|
|
239
|
+
return p(() => {
|
|
240
|
+
l ? (o(!0), setTimeout(() => i(!0), 10)) : (i(!1), setTimeout(() => o(!1), 150));
|
|
291
241
|
}, [l]), { show: r, shouldRender: n };
|
|
292
242
|
}
|
|
293
|
-
function
|
|
294
|
-
|
|
243
|
+
function R(l, r) {
|
|
244
|
+
p(() => {
|
|
295
245
|
const i = (n) => {
|
|
296
246
|
n.key === "Escape" && l && r();
|
|
297
247
|
};
|
|
@@ -301,15 +251,15 @@ function Y(l, r) {
|
|
|
301
251
|
}, [l, r]);
|
|
302
252
|
}
|
|
303
253
|
function ee(l, r) {
|
|
304
|
-
const i =
|
|
305
|
-
const
|
|
306
|
-
if (!
|
|
307
|
-
const
|
|
308
|
-
if (
|
|
309
|
-
|
|
254
|
+
const i = F(null), n = z(() => {
|
|
255
|
+
const o = document.getElementById(l);
|
|
256
|
+
if (!o) return;
|
|
257
|
+
const a = o.querySelectorAll('[data-modal-action="true"]');
|
|
258
|
+
if (a.length > 0) {
|
|
259
|
+
a[0].focus();
|
|
310
260
|
return;
|
|
311
261
|
}
|
|
312
|
-
const u =
|
|
262
|
+
const u = o.querySelectorAll(
|
|
313
263
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
314
264
|
);
|
|
315
265
|
if (u.length > 0) {
|
|
@@ -321,9 +271,9 @@ function ee(l, r) {
|
|
|
321
271
|
u[0].focus();
|
|
322
272
|
return;
|
|
323
273
|
}
|
|
324
|
-
|
|
274
|
+
o.focus();
|
|
325
275
|
}, [l]);
|
|
326
|
-
|
|
276
|
+
p(() => (r && (i.current = document.activeElement, n()), () => {
|
|
327
277
|
document.body.style.overflow = "auto", i.current instanceof HTMLElement && i.current.focus();
|
|
328
278
|
}), [r, n]);
|
|
329
279
|
}
|
|
@@ -332,8 +282,8 @@ function le({
|
|
|
332
282
|
isOpen: r,
|
|
333
283
|
onClose: i,
|
|
334
284
|
title: n,
|
|
335
|
-
children:
|
|
336
|
-
contentOnly:
|
|
285
|
+
children: o,
|
|
286
|
+
contentOnly: a = !1,
|
|
337
287
|
className: u,
|
|
338
288
|
overlayClassName: s,
|
|
339
289
|
hideCloseButton: d = !1,
|
|
@@ -342,17 +292,17 @@ function le({
|
|
|
342
292
|
ariaLabelledBy: f,
|
|
343
293
|
ariaDescribedBy: g
|
|
344
294
|
}) {
|
|
345
|
-
const
|
|
346
|
-
if (ee(
|
|
347
|
-
const
|
|
348
|
-
const { label:
|
|
349
|
-
return /* @__PURE__ */ t(
|
|
295
|
+
const h = q(), k = l || `modal-${h}`, C = l ? `${l}-title` : `modal-title-${h}`, { show: j, shouldRender: x } = Y(r);
|
|
296
|
+
if (ee(k, x), R(x, i), !x) return null;
|
|
297
|
+
const M = () => n ? $.isValidElement(n) ? /* @__PURE__ */ t("div", { className: "mb-4", children: n }) : /* @__PURE__ */ t("h2", { className: "mb-4 text-xl font-semibold", id: C, children: n }) : null, A = () => c.length === 0 ? null : /* @__PURE__ */ t("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: c.map((I, B) => {
|
|
298
|
+
const { label: D, ...O } = I;
|
|
299
|
+
return /* @__PURE__ */ t(W, { ...O, "data-modal-action": "true", children: D }, B);
|
|
350
300
|
}) });
|
|
351
|
-
return /* @__PURE__ */ t(
|
|
301
|
+
return /* @__PURE__ */ t(S, { children: H(
|
|
352
302
|
/* @__PURE__ */ t(
|
|
353
303
|
"div",
|
|
354
304
|
{
|
|
355
|
-
"aria-labelledby": f ?? n ?
|
|
305
|
+
"aria-labelledby": f ?? n ? C : void 0,
|
|
356
306
|
"aria-describedby": g,
|
|
357
307
|
role: "dialog",
|
|
358
308
|
"aria-modal": "true",
|
|
@@ -367,15 +317,15 @@ function le({
|
|
|
367
317
|
}
|
|
368
318
|
}
|
|
369
319
|
),
|
|
370
|
-
|
|
371
|
-
!
|
|
320
|
+
a && /* @__PURE__ */ t("div", { className: y("relative w-fit", u), children: o }),
|
|
321
|
+
!a && /* @__PURE__ */ b(
|
|
372
322
|
"div",
|
|
373
323
|
{
|
|
374
|
-
id:
|
|
324
|
+
id: k,
|
|
375
325
|
tabIndex: -1,
|
|
376
326
|
className: y(
|
|
377
327
|
"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in duration-75",
|
|
378
|
-
|
|
328
|
+
j ? "opacity-100 scale-100" : "opacity-0 scale-90",
|
|
379
329
|
u
|
|
380
330
|
),
|
|
381
331
|
children: [
|
|
@@ -386,12 +336,12 @@ function le({
|
|
|
386
336
|
onClick: i,
|
|
387
337
|
"data-modal-close-button": "true",
|
|
388
338
|
className: "rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",
|
|
389
|
-
children: /* @__PURE__ */ t(
|
|
339
|
+
children: /* @__PURE__ */ t(_, { size: 18 })
|
|
390
340
|
}
|
|
391
341
|
),
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
342
|
+
M(),
|
|
343
|
+
o,
|
|
344
|
+
A()
|
|
395
345
|
]
|
|
396
346
|
}
|
|
397
347
|
)
|
|
@@ -401,18 +351,18 @@ function le({
|
|
|
401
351
|
document.body
|
|
402
352
|
) });
|
|
403
353
|
}
|
|
404
|
-
function
|
|
354
|
+
function se({
|
|
405
355
|
type: l,
|
|
406
356
|
message: r,
|
|
407
357
|
cancelText: i,
|
|
408
358
|
confirmText: n,
|
|
409
|
-
onConfirm:
|
|
410
|
-
onClose:
|
|
359
|
+
onConfirm: o,
|
|
360
|
+
onClose: a,
|
|
411
361
|
destructive: u = !1,
|
|
412
362
|
title: s,
|
|
413
363
|
...d
|
|
414
364
|
}) {
|
|
415
|
-
const c =
|
|
365
|
+
const c = E(() => l === "confirm" ? {
|
|
416
366
|
confirm: n || "Confirm",
|
|
417
367
|
cancel: i || "Cancel",
|
|
418
368
|
defaultTitle: s || "Confirm Action"
|
|
@@ -420,31 +370,31 @@ function ce({
|
|
|
420
370
|
confirm: n || "OK",
|
|
421
371
|
cancel: null,
|
|
422
372
|
defaultTitle: s || "Alert"
|
|
423
|
-
}, [l, n, s, i]), m =
|
|
373
|
+
}, [l, n, s, i]), m = E(
|
|
424
374
|
() => [
|
|
425
375
|
...c.cancel ? [
|
|
426
376
|
{
|
|
427
377
|
label: c.cancel,
|
|
428
378
|
variant: "secondary",
|
|
429
|
-
onClick:
|
|
379
|
+
onClick: a
|
|
430
380
|
}
|
|
431
381
|
] : [],
|
|
432
382
|
{
|
|
433
383
|
label: c.confirm,
|
|
434
384
|
variant: u ? "destructive" : "primary",
|
|
435
385
|
onClick: () => {
|
|
436
|
-
|
|
386
|
+
o == null || o(), a();
|
|
437
387
|
}
|
|
438
388
|
}
|
|
439
389
|
],
|
|
440
|
-
[c, u,
|
|
390
|
+
[c, u, o, a]
|
|
441
391
|
);
|
|
442
392
|
return /* @__PURE__ */ t(
|
|
443
393
|
le,
|
|
444
394
|
{
|
|
445
395
|
...d,
|
|
446
396
|
title: s || c.defaultTitle,
|
|
447
|
-
onClose:
|
|
397
|
+
onClose: a,
|
|
448
398
|
actions: m,
|
|
449
399
|
disableCloseOnOverlayClick: l === "confirm",
|
|
450
400
|
hideCloseButton: l === "confirm",
|
|
@@ -452,54 +402,54 @@ function ce({
|
|
|
452
402
|
}
|
|
453
403
|
);
|
|
454
404
|
}
|
|
455
|
-
const ne = e(null),
|
|
456
|
-
const l =
|
|
405
|
+
const ne = e(null), de = () => {
|
|
406
|
+
const l = T(ne);
|
|
457
407
|
if (!l)
|
|
458
408
|
throw new Error("DropdownMenu components must be used within a DropdownMenu component");
|
|
459
409
|
return l;
|
|
460
|
-
}, te = e(null),
|
|
461
|
-
const l =
|
|
410
|
+
}, te = e(null), ce = () => {
|
|
411
|
+
const l = T(te);
|
|
462
412
|
if (!l)
|
|
463
413
|
throw new Error("Tabs components must be used within a Tabs component");
|
|
464
414
|
return l;
|
|
465
|
-
},
|
|
415
|
+
}, L = {
|
|
466
416
|
info: {
|
|
467
417
|
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
468
|
-
icon: /* @__PURE__ */ t(
|
|
418
|
+
icon: /* @__PURE__ */ t(X, { size: 20 })
|
|
469
419
|
},
|
|
470
420
|
warning: {
|
|
471
421
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
472
|
-
icon: /* @__PURE__ */ t(
|
|
422
|
+
icon: /* @__PURE__ */ t(V, { size: 20 })
|
|
473
423
|
},
|
|
474
424
|
error: {
|
|
475
425
|
className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
|
|
476
|
-
icon: /* @__PURE__ */ t(
|
|
426
|
+
icon: /* @__PURE__ */ t(P, { size: 20 })
|
|
477
427
|
}
|
|
478
428
|
};
|
|
479
|
-
function
|
|
429
|
+
function me({
|
|
480
430
|
id: l,
|
|
481
431
|
title: r,
|
|
482
432
|
description: i,
|
|
483
433
|
type: n = "info",
|
|
484
|
-
action:
|
|
485
|
-
duration:
|
|
434
|
+
action: o,
|
|
435
|
+
duration: a = 5e3,
|
|
486
436
|
onRemove: u,
|
|
487
437
|
customTypes: s,
|
|
488
438
|
customComponent: d
|
|
489
439
|
}) {
|
|
490
|
-
const [c, m] = v(!1), f =
|
|
440
|
+
const [c, m] = v(!1), f = z(() => {
|
|
491
441
|
m(!0), setTimeout(() => {
|
|
492
442
|
u == null || u(l);
|
|
493
443
|
}, 150);
|
|
494
444
|
}, [l, u]);
|
|
495
|
-
if (
|
|
496
|
-
if (
|
|
497
|
-
const
|
|
445
|
+
if (p(() => {
|
|
446
|
+
if (a > 0) {
|
|
447
|
+
const h = setTimeout(() => {
|
|
498
448
|
f();
|
|
499
|
-
},
|
|
500
|
-
return () => clearTimeout(
|
|
449
|
+
}, a);
|
|
450
|
+
return () => clearTimeout(h);
|
|
501
451
|
}
|
|
502
|
-
}, [
|
|
452
|
+
}, [a, l, u, f]), d)
|
|
503
453
|
return /* @__PURE__ */ t(
|
|
504
454
|
d,
|
|
505
455
|
{
|
|
@@ -507,20 +457,20 @@ function be({
|
|
|
507
457
|
title: r,
|
|
508
458
|
description: i,
|
|
509
459
|
type: n,
|
|
510
|
-
action:
|
|
511
|
-
duration:
|
|
460
|
+
action: o,
|
|
461
|
+
duration: a,
|
|
512
462
|
onRemove: u
|
|
513
463
|
}
|
|
514
464
|
);
|
|
515
|
-
const g = (s == null ? void 0 : s[n]) ||
|
|
465
|
+
const g = (s == null ? void 0 : s[n]) || L[n] || L.info;
|
|
516
466
|
return /* @__PURE__ */ b(
|
|
517
467
|
"div",
|
|
518
468
|
{
|
|
519
469
|
role: n === "error" ? "alert" : "status",
|
|
520
470
|
"aria-live": n === "error" ? void 0 : "polite",
|
|
521
|
-
className:
|
|
471
|
+
className: Z(
|
|
522
472
|
"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",
|
|
523
|
-
|
|
473
|
+
o && "pb-3",
|
|
524
474
|
g.className,
|
|
525
475
|
c ? "opacity-0 translate-x-full" : "opacity-100 translate-x-0"
|
|
526
476
|
),
|
|
@@ -529,12 +479,12 @@ function be({
|
|
|
529
479
|
/* @__PURE__ */ b("div", { className: "flex-grow min-w-0", children: [
|
|
530
480
|
/* @__PURE__ */ t("div", { className: "font-medium text-sm leading-5", children: r }),
|
|
531
481
|
i && /* @__PURE__ */ t("div", { className: "mt-1 text-sm opacity-90 leading-5", children: i }),
|
|
532
|
-
|
|
482
|
+
o && /* @__PURE__ */ t("div", { className: "mt-1.5", children: /* @__PURE__ */ t(
|
|
533
483
|
"button",
|
|
534
484
|
{
|
|
535
|
-
onClick:
|
|
485
|
+
onClick: o.onClick,
|
|
536
486
|
className: "text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer",
|
|
537
|
-
children:
|
|
487
|
+
children: o.label
|
|
538
488
|
}
|
|
539
489
|
) })
|
|
540
490
|
] }),
|
|
@@ -543,7 +493,7 @@ function be({
|
|
|
543
493
|
{
|
|
544
494
|
onClick: f,
|
|
545
495
|
className: "flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0",
|
|
546
|
-
children: /* @__PURE__ */ t(
|
|
496
|
+
children: /* @__PURE__ */ t(K, { size: 16 })
|
|
547
497
|
}
|
|
548
498
|
)
|
|
549
499
|
]
|
|
@@ -551,14 +501,12 @@ function be({
|
|
|
551
501
|
);
|
|
552
502
|
}
|
|
553
503
|
export {
|
|
554
|
-
|
|
504
|
+
se as A,
|
|
555
505
|
ne as D,
|
|
556
|
-
|
|
506
|
+
me as T,
|
|
557
507
|
te as a,
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
se as o,
|
|
562
|
-
me as u
|
|
508
|
+
ce as b,
|
|
509
|
+
N as n,
|
|
510
|
+
de as u
|
|
563
511
|
};
|
|
564
|
-
//# sourceMappingURL=Toast-
|
|
512
|
+
//# sourceMappingURL=Toast-CRG3g8vr.js.map
|