@moondreamsdev/dreamer-ui 1.7.10-test.6 → 1.7.10-test.60

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