@moondreamsdev/dreamer-ui 1.7.10-test.3 → 1.7.10-test.31

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.
Files changed (41) hide show
  1. package/dist/{Toast-BSraKTG9.js → Toast-Bsg0i0i0.js} +196 -172
  2. package/dist/Toast-Bsg0i0i0.js.map +1 -0
  3. package/dist/Toast-wCUv2GWn.cjs +2 -0
  4. package/dist/Toast-wCUv2GWn.cjs.map +1 -0
  5. package/dist/{Window-CT479Oxr.js → Window-7myUuX6Y.js} +161 -112
  6. package/dist/Window-7myUuX6Y.js.map +1 -0
  7. package/dist/Window-DvRXD7fx.cjs +2 -0
  8. package/dist/Window-DvRXD7fx.cjs.map +1 -0
  9. package/dist/components.cjs.js +2 -2
  10. package/dist/components.cjs.js.map +1 -1
  11. package/dist/components.esm.js +1714 -1546
  12. package/dist/components.esm.js.map +1 -1
  13. package/dist/providers.cjs.js +1 -1
  14. package/dist/providers.esm.js +1 -1
  15. package/dist/src/components/code-block/CodeBlock.d.ts +4 -3
  16. package/dist/src/components/code-block/classes.d.ts +5 -0
  17. package/dist/src/components/code-block/constants.d.ts +2 -0
  18. package/dist/src/components/code-block/format.d.ts +5 -0
  19. package/dist/src/components/code-block/hooks.d.ts +0 -52
  20. package/dist/src/components/code-block/index.d.ts +2 -2
  21. package/dist/src/components/code-block/tokenize.d.ts +17 -0
  22. package/dist/src/components/code-block/types.d.ts +54 -0
  23. package/dist/src/components/code-block/util.d.ts +2 -0
  24. package/dist/src/components/disclosure/Disclosure.d.ts +22 -0
  25. package/dist/src/components/disclosure/index.d.ts +1 -0
  26. package/dist/src/components/index.d.ts +1 -0
  27. package/dist/src/symbols/CaretCollapse.d.ts +2 -0
  28. package/dist/src/symbols/CaretExpand.d.ts +2 -0
  29. package/dist/src/symbols/index.d.ts +2 -0
  30. package/dist/src/utils/downloadFile.d.ts +1 -1
  31. package/dist/symbols.cjs.js +1 -1
  32. package/dist/symbols.esm.js +20 -18
  33. package/dist/utils.cjs.js.map +1 -1
  34. package/dist/utils.esm.js.map +1 -1
  35. package/package.json +1 -1
  36. package/dist/Toast-BSraKTG9.js.map +0 -1
  37. package/dist/Toast-OM0b2tzD.cjs +0 -2
  38. package/dist/Toast-OM0b2tzD.cjs.map +0 -1
  39. package/dist/Window-CT479Oxr.js.map +0 -1
  40. package/dist/Window-oF6fyFBX.cjs +0 -2
  41. package/dist/Window-oF6fyFBX.cjs.map +0 -1
@@ -1,26 +1,26 @@
1
- import { jsx as r, Fragment as q, jsxs as b } from "react/jsx-runtime";
2
- import $, { createContext as o, useId as D, useState as p, useEffect as g, useRef as H, useCallback as L, useMemo as E, useContext as P } from "react";
3
- import { createPortal as Q } from "react-dom";
4
- import { X, C as Z, E as F, I as J } from "./X-CIoyLewf.js";
5
- import { j as K } from "./join-BmgR_f4v.js";
6
- function N(...e) {
7
- return e.filter((l) => typeof l == "string" && l).join(" ").trim() || void 0;
1
+ import { jsx as n, Fragment as q, jsxs as b } from "react/jsx-runtime";
2
+ import P, { createContext as e, useId as $, useState as p, useEffect as g, useRef as H, useCallback as L, useMemo as E, useContext as X } from "react";
3
+ import { createPortal as D } from "react-dom";
4
+ import { X as F, C as J, E as K, I as Q } from "./X-CIoyLewf.js";
5
+ import { j as V } from "./join-BmgR_f4v.js";
6
+ function N(...l) {
7
+ return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
8
8
  }
9
- function U({ size: e = 15, color: l = "currentColor", className: n = "inline", ...t }) {
10
- return /* @__PURE__ */ r(
9
+ function Y({ size: l = 15, color: r = "currentColor", className: i = "inline", ...t }) {
10
+ return /* @__PURE__ */ n(
11
11
  "svg",
12
12
  {
13
13
  ...t,
14
- width: e,
15
- height: e,
16
- className: n,
14
+ width: l,
15
+ height: l,
16
+ className: i,
17
17
  viewBox: "0 0 15 15",
18
18
  xmlns: "http://www.w3.org/2000/svg",
19
- children: /* @__PURE__ */ r(
19
+ children: /* @__PURE__ */ n(
20
20
  "path",
21
21
  {
22
22
  d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
23
- fill: l,
23
+ fill: r,
24
24
  fillRule: "evenodd",
25
25
  clipRule: "evenodd"
26
26
  }
@@ -28,49 +28,73 @@ function U({ size: e = 15, color: l = "currentColor", className: n = "inline", .
28
28
  }
29
29
  );
30
30
  }
31
- function x(...e) {
32
- return e.filter((l) => typeof l == "string" && l).join(" ").trim() || void 0;
31
+ function x(...l) {
32
+ return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
33
33
  }
34
- o(void 0);
35
- o(null);
36
- o(null);
37
- o(null);
38
- o(null);
39
- o(null);
40
- o(null);
41
- o(null);
42
- o(null);
43
- o(null);
44
- o(null);
45
- o(null);
46
- o(null);
47
- o(null);
48
- o(null);
49
- o(null);
50
- o(void 0);
51
- o(void 0);
52
- o(null);
53
- o(void 0);
54
- o(void 0);
55
- function V() {
56
- const [e, l] = p(0);
34
+ e(void 0);
35
+ e(null);
36
+ e(null);
37
+ e(null);
38
+ e(null);
39
+ e(null);
40
+ e(null);
41
+ e(null);
42
+ e(null);
43
+ e(null);
44
+ e(null);
45
+ e(null);
46
+ e(null);
47
+ e(null);
48
+ e(null);
49
+ e(null);
50
+ e(void 0);
51
+ e(void 0);
52
+ e(null);
53
+ e(void 0);
54
+ e(void 0);
55
+ e(null);
56
+ e(null);
57
+ e(null);
58
+ e(null);
59
+ e(null);
60
+ e(null);
61
+ e(null);
62
+ e(null);
63
+ e(null);
64
+ e(null);
65
+ e(null);
66
+ e(null);
67
+ e(null);
68
+ e(null);
69
+ e(null);
70
+ e(null);
71
+ e(null);
72
+ e(null);
73
+ e(null);
74
+ e(null);
75
+ e(null);
76
+ e(null);
77
+ e(null);
78
+ e(null);
79
+ function Z() {
80
+ const [l, r] = p(0);
57
81
  return g(() => {
58
- const n = setInterval(() => {
59
- l((t) => (t + 1) % 3);
82
+ const i = setInterval(() => {
83
+ r((t) => (t + 1) % 3);
60
84
  }, 500);
61
- return () => clearInterval(n);
62
- }, []), /* @__PURE__ */ r("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((n) => /* @__PURE__ */ r(
85
+ return () => clearInterval(i);
86
+ }, []), /* @__PURE__ */ n("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((i) => /* @__PURE__ */ n(
63
87
  "div",
64
88
  {
65
89
  className: N(
66
90
  "rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",
67
- e === n && "transform -translate-y-1"
91
+ l === i && "transform -translate-y-1"
68
92
  )
69
93
  },
70
- n
94
+ i
71
95
  )) });
72
96
  }
73
- const _ = {
97
+ const G = {
74
98
  base: "",
75
99
  primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
76
100
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
@@ -78,7 +102,7 @@ const _ = {
78
102
  outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
79
103
  link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
80
104
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
81
- }, G = {
105
+ }, U = {
82
106
  stripped: "",
83
107
  fitted: "size-fit",
84
108
  sm: "px-2 py-1 text-sm",
@@ -97,49 +121,49 @@ const _ = {
97
121
  size: "md",
98
122
  rounded: "md"
99
123
  };
100
- function Y({
101
- variant: e = w.variant,
102
- size: l,
103
- rounded: n = w.rounded,
124
+ function _({
125
+ variant: l = w.variant,
126
+ size: r,
127
+ rounded: i = w.rounded,
104
128
  loading: t,
105
- linkTo: i,
106
- linkProps: a,
129
+ linkTo: a,
130
+ linkProps: o,
107
131
  type: s = "button",
108
132
  className: u,
109
133
  ...d
110
134
  }) {
111
135
  let c;
112
- e === "link" && !l ? c = "fitted" : c = l || w.size;
136
+ l === "link" && !r ? c = "fitted" : c = r || w.size;
113
137
  const m = N(
114
138
  "appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
115
- _[e],
116
- G[c],
117
- W[n],
139
+ G[l],
140
+ U[c],
141
+ W[i],
118
142
  t && "relative pointer-events-none",
119
- i && "relative",
143
+ a && "relative",
120
144
  u
121
145
  );
122
146
  return /* @__PURE__ */ b(
123
147
  "button",
124
148
  {
125
149
  ...d,
126
- role: i ? "link" : d.role,
127
- "aria-label": d["aria-label"] || (a == null ? void 0 : a["aria-label"]),
128
- "aria-description": d["aria-description"] || (a == null ? void 0 : a["aria-description"]),
150
+ role: a ? "link" : d.role,
151
+ "aria-label": d["aria-label"] || (o == null ? void 0 : o["aria-label"]),
152
+ "aria-description": d["aria-description"] || (o == null ? void 0 : o["aria-description"]),
129
153
  "aria-disabled": d.disabled || t,
130
154
  "aria-busy": t,
131
155
  type: s,
132
156
  className: m,
133
157
  children: [
134
- t && /* @__PURE__ */ r(V, {}),
135
- /* @__PURE__ */ r("span", { className: N(t && "invisible"), children: d.children }),
136
- i && !d.disabled && /* @__PURE__ */ r(
158
+ t && /* @__PURE__ */ n(Z, {}),
159
+ /* @__PURE__ */ n("span", { className: N(t && "invisible"), children: d.children }),
160
+ a && !d.disabled && /* @__PURE__ */ n(
137
161
  "a",
138
162
  {
139
- ...a,
163
+ ...o,
140
164
  "aria-hidden": !0,
141
- href: i,
142
- rel: (a == null ? void 0 : a.rel) || "noreferrer",
165
+ href: a,
166
+ rel: (o == null ? void 0 : o.rel) || "noreferrer",
143
167
  className: "absolute inset-0"
144
168
  }
145
169
  )
@@ -147,32 +171,32 @@ function Y({
147
171
  }
148
172
  );
149
173
  }
150
- function R(e) {
151
- const [l, n] = p(!1), [t, i] = p(!1);
174
+ function R(l) {
175
+ const [r, i] = p(!1), [t, a] = p(!1);
152
176
  return g(() => {
153
- e ? (i(!0), setTimeout(() => n(!0), 10)) : (n(!1), setTimeout(() => i(!1), 150));
154
- }, [e]), { show: l, shouldRender: t };
177
+ l ? (a(!0), setTimeout(() => i(!0), 10)) : (i(!1), setTimeout(() => a(!1), 150));
178
+ }, [l]), { show: r, shouldRender: t };
155
179
  }
156
- function ee(e, l) {
180
+ function ee(l, r) {
157
181
  g(() => {
158
- const n = (t) => {
159
- t.key === "Escape" && e && l();
182
+ const i = (t) => {
183
+ t.key === "Escape" && l && r();
160
184
  };
161
- return document.addEventListener("keydown", n), e && (document.body.style.overflow = "hidden"), () => {
162
- document.removeEventListener("keydown", n), document.body.style.overflow = "auto";
185
+ return document.addEventListener("keydown", i), l && (document.body.style.overflow = "hidden"), () => {
186
+ document.removeEventListener("keydown", i), document.body.style.overflow = "auto";
163
187
  };
164
- }, [e, l]);
188
+ }, [l, r]);
165
189
  }
166
- function te(e, l) {
167
- const n = H(null), t = L(() => {
168
- const i = document.getElementById(e);
169
- if (!i) return;
170
- const a = i.querySelectorAll('[data-modal-action="true"]');
171
- if (a.length > 0) {
172
- a[0].focus();
190
+ function le(l, r) {
191
+ const i = H(null), t = L(() => {
192
+ const a = document.getElementById(l);
193
+ if (!a) return;
194
+ const o = a.querySelectorAll('[data-modal-action="true"]');
195
+ if (o.length > 0) {
196
+ o[0].focus();
173
197
  return;
174
198
  }
175
- const s = i.querySelectorAll(
199
+ const s = a.querySelectorAll(
176
200
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
177
201
  );
178
202
  if (s.length > 0) {
@@ -184,77 +208,77 @@ function te(e, l) {
184
208
  s[0].focus();
185
209
  return;
186
210
  }
187
- i.focus();
188
- }, [e]);
189
- g(() => (l && (n.current = document.activeElement, t()), () => {
190
- document.body.style.overflow = "auto", n.current instanceof HTMLElement && n.current.focus();
191
- }), [l, t]);
211
+ a.focus();
212
+ }, [l]);
213
+ g(() => (r && (i.current = document.activeElement, t()), () => {
214
+ document.body.style.overflow = "auto", i.current instanceof HTMLElement && i.current.focus();
215
+ }), [r, t]);
192
216
  }
193
- function re({
194
- id: e,
195
- isOpen: l,
196
- onClose: n,
217
+ function te({
218
+ id: l,
219
+ isOpen: r,
220
+ onClose: i,
197
221
  title: t,
198
- children: i,
199
- contentOnly: a = !1,
222
+ children: a,
223
+ contentOnly: o = !1,
200
224
  className: s,
201
225
  overlayClassName: u,
202
226
  hideCloseButton: d = !1,
203
227
  actions: c = [],
204
228
  disableCloseOnOverlayClick: m = !1,
205
229
  ariaLabelledBy: f,
206
- ariaDescribedBy: v
230
+ ariaDescribedBy: h
207
231
  }) {
208
- const h = D(), k = e || `modal-${h}`, C = e ? `${e}-title` : `modal-title-${h}`, { show: z, shouldRender: y } = R(l);
209
- if (te(k, y), ee(y, n), !y) return null;
210
- const j = () => t ? $.isValidElement(t) ? /* @__PURE__ */ r("div", { className: "mb-4", children: t }) : /* @__PURE__ */ r("h2", { className: "mb-4 text-xl font-semibold", id: C, children: t }) : null, A = () => c.length === 0 ? null : /* @__PURE__ */ r("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) => {
211
- const { label: O, className: M, ...S } = I;
212
- return /* @__PURE__ */ r(Y, { className: M, type: "button", ...S, "data-modal-action": "true", children: O }, B);
232
+ const v = $(), k = l || `modal-${v}`, C = l ? `${l}-title` : `modal-title-${v}`, { show: T, shouldRender: y } = R(r);
233
+ if (le(k, y), ee(y, i), !y) return null;
234
+ const j = () => t ? P.isValidElement(t) ? /* @__PURE__ */ n("div", { className: "mb-4", children: t }) : /* @__PURE__ */ n("h2", { className: "mb-4 text-xl font-semibold", id: C, children: t }) : null, I = () => c.length === 0 ? null : /* @__PURE__ */ n("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((A, O) => {
235
+ const { label: B, className: S, ...M } = A;
236
+ return /* @__PURE__ */ n(_, { className: S, type: "button", ...M, "data-modal-action": "true", children: B }, O);
213
237
  }) });
214
- return /* @__PURE__ */ r(q, { children: Q(
215
- /* @__PURE__ */ r(
238
+ return /* @__PURE__ */ n(q, { children: D(
239
+ /* @__PURE__ */ n(
216
240
  "div",
217
241
  {
218
242
  "aria-labelledby": f ?? t ? C : void 0,
219
- "aria-describedby": v,
243
+ "aria-describedby": h,
220
244
  role: "dialog",
221
245
  "aria-modal": "true",
222
246
  className: "fixed inset-0 z-[100] overflow-y-auto",
223
247
  children: /* @__PURE__ */ b("div", { className: "flex min-h-screen items-center justify-center p-4", children: [
224
- /* @__PURE__ */ r(
248
+ /* @__PURE__ */ n(
225
249
  "div",
226
250
  {
227
251
  className: x("fixed inset-0 bg-black/20 transition-all", u),
228
252
  onClick: () => {
229
- m || n();
253
+ m || i();
230
254
  }
231
255
  }
232
256
  ),
233
- a && /* @__PURE__ */ r("div", { className: x("relative w-fit", s), children: i }),
234
- !a && /* @__PURE__ */ b(
257
+ o && /* @__PURE__ */ n("div", { className: x("relative w-fit", s), children: a }),
258
+ !o && /* @__PURE__ */ b(
235
259
  "div",
236
260
  {
237
261
  id: k,
238
262
  tabIndex: -1,
239
263
  className: x(
240
264
  "relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",
241
- z ? "opacity-100 scale-100" : "opacity-0 scale-90",
265
+ T ? "opacity-100 scale-100" : "opacity-0 scale-90",
242
266
  s
243
267
  ),
244
268
  children: [
245
- !d && /* @__PURE__ */ r(
269
+ !d && /* @__PURE__ */ n(
246
270
  "button",
247
271
  {
248
272
  type: "button",
249
- onClick: n,
273
+ onClick: i,
250
274
  "data-modal-close-button": "true",
251
275
  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",
252
- children: /* @__PURE__ */ r(U, { size: 18 })
276
+ children: /* @__PURE__ */ n(Y, { size: 18 })
253
277
  }
254
278
  ),
255
279
  j(),
256
- i,
257
- A()
280
+ a,
281
+ I()
258
282
  ]
259
283
  }
260
284
  )
@@ -265,143 +289,143 @@ function re({
265
289
  ) });
266
290
  }
267
291
  function de({
268
- type: e,
269
- message: l,
270
- cancelText: n,
292
+ type: l,
293
+ message: r,
294
+ cancelText: i,
271
295
  confirmText: t,
272
- onConfirm: i,
273
- onClose: a,
296
+ onConfirm: a,
297
+ onClose: o,
274
298
  destructive: s = !1,
275
299
  title: u,
276
300
  ...d
277
301
  }) {
278
- const c = E(() => e === "confirm" ? {
302
+ const c = E(() => l === "confirm" ? {
279
303
  confirm: t || "Confirm",
280
- cancel: n || "Cancel",
304
+ cancel: i || "Cancel",
281
305
  defaultTitle: u || "Confirm Action"
282
306
  } : {
283
307
  confirm: t || "OK",
284
308
  cancel: null,
285
309
  defaultTitle: u || "Alert"
286
- }, [e, t, u, n]), m = E(
310
+ }, [l, t, u, i]), m = E(
287
311
  () => [
288
312
  ...c.cancel ? [
289
313
  {
290
314
  label: c.cancel,
291
315
  variant: "secondary",
292
- onClick: a
316
+ onClick: o
293
317
  }
294
318
  ] : [],
295
319
  {
296
320
  label: c.confirm,
297
321
  variant: s ? "destructive" : "primary",
298
322
  onClick: () => {
299
- i == null || i(), a();
323
+ a == null || a(), o();
300
324
  }
301
325
  }
302
326
  ],
303
- [c, s, i, a]
327
+ [c, s, a, o]
304
328
  );
305
- return /* @__PURE__ */ r(
306
- re,
329
+ return /* @__PURE__ */ n(
330
+ te,
307
331
  {
308
332
  ...d,
309
333
  title: u || c.defaultTitle,
310
- onClose: a,
334
+ onClose: o,
311
335
  actions: m,
312
- disableCloseOnOverlayClick: e === "confirm",
313
- hideCloseButton: e === "confirm",
314
- children: typeof l == "string" ? /* @__PURE__ */ r("p", { className: "text-sm", children: l }) : l
336
+ disableCloseOnOverlayClick: l === "confirm",
337
+ hideCloseButton: l === "confirm",
338
+ children: typeof r == "string" ? /* @__PURE__ */ n("p", { className: "text-sm", children: r }) : r
315
339
  }
316
340
  );
317
341
  }
318
- const le = o(null), ue = () => {
319
- const e = P(le);
320
- if (!e)
342
+ const ne = e(null), ue = () => {
343
+ const l = X(ne);
344
+ if (!l)
321
345
  throw new Error("Tabs components must be used within a Tabs component");
322
- return e;
323
- }, T = {
346
+ return l;
347
+ }, z = {
324
348
  info: {
325
349
  className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
326
- icon: /* @__PURE__ */ r(J, { size: 20 })
350
+ icon: /* @__PURE__ */ n(Q, { size: 20 })
327
351
  },
328
352
  warning: {
329
353
  className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
330
- icon: /* @__PURE__ */ r(F, { size: 20 })
354
+ icon: /* @__PURE__ */ n(K, { size: 20 })
331
355
  },
332
356
  error: {
333
357
  className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
334
- icon: /* @__PURE__ */ r(Z, { size: 20 })
358
+ icon: /* @__PURE__ */ n(J, { size: 20 })
335
359
  }
336
360
  };
337
361
  function ce({
338
- id: e,
339
- title: l,
340
- description: n,
362
+ id: l,
363
+ title: r,
364
+ description: i,
341
365
  type: t = "info",
342
- action: i,
343
- duration: a = 5e3,
366
+ action: a,
367
+ duration: o = 5e3,
344
368
  onRemove: s,
345
369
  customTypes: u,
346
370
  customComponent: d
347
371
  }) {
348
372
  const [c, m] = p(!1), f = L(() => {
349
373
  m(!0), setTimeout(() => {
350
- s == null || s(e);
374
+ s == null || s(l);
351
375
  }, 150);
352
- }, [e, s]);
376
+ }, [l, s]);
353
377
  if (g(() => {
354
- if (a > 0) {
355
- const h = setTimeout(() => {
378
+ if (o > 0) {
379
+ const v = setTimeout(() => {
356
380
  f();
357
- }, a);
358
- return () => clearTimeout(h);
381
+ }, o);
382
+ return () => clearTimeout(v);
359
383
  }
360
- }, [a, e, s, f]), d)
361
- return /* @__PURE__ */ r(
384
+ }, [o, l, s, f]), d)
385
+ return /* @__PURE__ */ n(
362
386
  d,
363
387
  {
364
- id: e,
365
- title: l,
366
- description: n,
388
+ id: l,
389
+ title: r,
390
+ description: i,
367
391
  type: t,
368
- action: i,
369
- duration: a,
392
+ action: a,
393
+ duration: o,
370
394
  onRemove: s
371
395
  }
372
396
  );
373
- const v = (u == null ? void 0 : u[t]) || T[t] || T.info;
397
+ const h = (u == null ? void 0 : u[t]) || z[t] || z.info;
374
398
  return /* @__PURE__ */ b(
375
399
  "div",
376
400
  {
377
401
  role: t === "error" ? "alert" : "status",
378
402
  "aria-live": t === "error" ? void 0 : "polite",
379
- className: K(
403
+ className: V(
380
404
  "relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",
381
- i && "pb-3",
382
- v.className,
405
+ a && "pb-3",
406
+ h.className,
383
407
  c ? "opacity-0 translate-x-full" : "opacity-100 translate-x-0"
384
408
  ),
385
409
  children: [
386
- /* @__PURE__ */ r("div", { className: "flex-shrink-0 mr-3", children: v.icon }),
410
+ /* @__PURE__ */ n("div", { className: "flex-shrink-0 mr-3", children: h.icon }),
387
411
  /* @__PURE__ */ b("div", { className: "flex-grow min-w-0", children: [
388
- /* @__PURE__ */ r("div", { className: "font-medium text-sm leading-5", children: l }),
389
- n && /* @__PURE__ */ r("div", { className: "mt-1 text-sm opacity-90 leading-5", children: n }),
390
- i && /* @__PURE__ */ r("div", { className: "mt-1.5", children: /* @__PURE__ */ r(
412
+ /* @__PURE__ */ n("div", { className: "font-medium text-sm leading-5", children: r }),
413
+ i && /* @__PURE__ */ n("div", { className: "mt-1 text-sm opacity-90 leading-5", children: i }),
414
+ a && /* @__PURE__ */ n("div", { className: "mt-1.5", children: /* @__PURE__ */ n(
391
415
  "button",
392
416
  {
393
- onClick: i.onClick,
417
+ onClick: a.onClick,
394
418
  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",
395
- children: i.label
419
+ children: a.label
396
420
  }
397
421
  ) })
398
422
  ] }),
399
- /* @__PURE__ */ r(
423
+ /* @__PURE__ */ n(
400
424
  "button",
401
425
  {
402
426
  onClick: f,
403
427
  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",
404
- children: /* @__PURE__ */ r(X, { size: 16 })
428
+ children: /* @__PURE__ */ n(F, { size: 16 })
405
429
  }
406
430
  )
407
431
  ]
@@ -411,8 +435,8 @@ function ce({
411
435
  export {
412
436
  de as A,
413
437
  ce as T,
414
- le as a,
438
+ ne as a,
415
439
  N as n,
416
440
  ue as u
417
441
  };
418
- //# sourceMappingURL=Toast-BSraKTG9.js.map
442
+ //# sourceMappingURL=Toast-Bsg0i0i0.js.map