@moondreamsdev/dreamer-ui 1.7.10-test.2 → 1.7.10-test.21

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