@moondreamsdev/dreamer-ui 1.7.19-test.4 → 1.7.19-test.40

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 (44) hide show
  1. package/dist/{Toast-sGVog8Ve.js → Toast-BI4RNVuu.js} +300 -160
  2. package/dist/Toast-BI4RNVuu.js.map +1 -0
  3. package/dist/Toast-bA4KM60V.cjs +2 -0
  4. package/dist/Toast-bA4KM60V.cjs.map +1 -0
  5. package/dist/components.cjs.js +2 -2
  6. package/dist/components.cjs.js.map +1 -1
  7. package/dist/components.esm.js +1814 -1682
  8. package/dist/components.esm.js.map +1 -1
  9. package/dist/providers.cjs.js +1 -1
  10. package/dist/providers.cjs.js.map +1 -1
  11. package/dist/providers.esm.js +23 -25
  12. package/dist/providers.esm.js.map +1 -1
  13. package/dist/src/components/badge/variants.d.ts +1 -1
  14. package/dist/src/components/button/variants.d.ts +7 -7
  15. package/dist/src/components/checkbox/Checkbox.d.ts +1 -1
  16. package/dist/src/components/copy-button/CopyButton.d.ts +61 -0
  17. package/dist/src/components/copy-button/index.d.ts +1 -0
  18. package/dist/src/components/dropdown-menu/DropdownMenu.d.ts +14 -12
  19. package/dist/src/components/form/Form.d.ts +8 -4
  20. package/dist/src/components/form/factories.d.ts +2 -1
  21. package/dist/src/components/form/index.d.ts +1 -1
  22. package/dist/src/components/form/types.d.ts +12 -2
  23. package/dist/src/components/index.d.ts +1 -0
  24. package/dist/src/components/input/variants.d.ts +4 -3
  25. package/dist/src/components/scroll-area/ScrollArea.d.ts +1 -0
  26. package/dist/src/components/slider/variants.d.ts +2 -2
  27. package/dist/src/components/tabs/Tabs.d.ts +29 -9
  28. package/dist/src/components/tabs/index.d.ts +1 -1
  29. package/dist/src/components/textarea/Textarea.d.ts +3 -3
  30. package/dist/src/components/textarea/variants.d.ts +3 -2
  31. package/dist/src/symbols/DotsVertical.d.ts +2 -0
  32. package/dist/src/symbols/ExternalLink.d.ts +2 -0
  33. package/dist/src/symbols/OpenInNewWindow.d.ts +2 -0
  34. package/dist/src/symbols/index.d.ts +3 -0
  35. package/dist/styles.css +1 -1
  36. package/dist/symbols.cjs.js +1 -1
  37. package/dist/symbols.cjs.js.map +1 -1
  38. package/dist/symbols.esm.js +107 -38
  39. package/dist/symbols.esm.js.map +1 -1
  40. package/dist/theme.css +2 -0
  41. package/package.json +1 -1
  42. package/dist/Toast-Brvqmcwe.cjs +0 -2
  43. package/dist/Toast-Brvqmcwe.cjs.map +0 -1
  44. package/dist/Toast-sGVog8Ve.js.map +0 -1
@@ -1,26 +1,26 @@
1
- import { jsx as i, Fragment as q, jsxs as b } from "react/jsx-runtime";
2
- import g, { createContext as l, useId as F, useState as x, useEffect as p, useRef as H, useCallback as j, useMemo as z, useContext as A } from "react";
3
- import { createPortal as Z } from "react-dom";
4
- import { X as V, C as K, E as P, I as Q } from "./X-CIoyLewf.js";
5
- import { j as X } from "./join-BmgR_f4v.js";
1
+ import { jsx as o, Fragment as q, jsxs as b } from "react/jsx-runtime";
2
+ import g, { createContext as l, useId as H, useState as x, useEffect as p, useRef as X, useCallback as A, useMemo as z, useContext as j } from "react";
3
+ import { createPortal as F } from "react-dom";
4
+ import { X as V, C as Z, E as K, I as P } from "./X-CIoyLewf.js";
5
+ import { j as Q } from "./join-BmgR_f4v.js";
6
6
  function y(...n) {
7
- return n.filter((u) => typeof u == "string" && u).join(" ").trim() || void 0;
7
+ return n.filter((i) => typeof i == "string" && i).join(" ").trim() || void 0;
8
8
  }
9
- function Y({ size: n = 15, color: u = "currentColor", className: o = "inline", ...e }) {
10
- return /* @__PURE__ */ i(
9
+ function Y({ size: n = 15, color: i = "currentColor", className: u = "inline", ...e }) {
10
+ return /* @__PURE__ */ o(
11
11
  "svg",
12
12
  {
13
13
  ...e,
14
14
  width: n,
15
15
  height: n,
16
- className: o,
16
+ className: u,
17
17
  viewBox: "0 0 15 15",
18
18
  xmlns: "http://www.w3.org/2000/svg",
19
- children: /* @__PURE__ */ i(
19
+ children: /* @__PURE__ */ o(
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: u,
23
+ fill: i,
24
24
  fillRule: "evenodd",
25
25
  clipRule: "evenodd"
26
26
  }
@@ -29,7 +29,7 @@ function Y({ size: n = 15, color: u = "currentColor", className: o = "inline", .
29
29
  );
30
30
  }
31
31
  function h(...n) {
32
- return n.filter((u) => typeof u == "string" && u).join(" ").trim() || void 0;
32
+ return n.filter((i) => typeof i == "string" && i).join(" ").trim() || void 0;
33
33
  }
34
34
  l(void 0);
35
35
  l(null);
@@ -421,32 +421,172 @@ l(null);
421
421
  l(void 0);
422
422
  l(void 0);
423
423
  l(void 0);
424
+ l(null);
425
+ l(null);
426
+ l(void 0);
427
+ l(void 0);
428
+ l(void 0);
429
+ l(null);
430
+ l(null);
431
+ l(void 0);
432
+ l(void 0);
433
+ l(void 0);
434
+ l(null);
435
+ l(null);
436
+ l(void 0);
437
+ l(void 0);
438
+ l(void 0);
439
+ l(null);
440
+ l(null);
441
+ l(void 0);
442
+ l(void 0);
443
+ l(void 0);
444
+ l(null);
445
+ l(null);
446
+ l(void 0);
447
+ l(void 0);
448
+ l(void 0);
449
+ l(null);
450
+ l(null);
451
+ l(void 0);
452
+ l(void 0);
453
+ l(void 0);
454
+ l(null);
455
+ l(null);
456
+ l(void 0);
457
+ l(void 0);
458
+ l(void 0);
459
+ l(null);
460
+ l(null);
461
+ l(void 0);
462
+ l(void 0);
463
+ l(void 0);
464
+ l(null);
465
+ l(null);
466
+ l(void 0);
467
+ l(void 0);
468
+ l(void 0);
469
+ l(null);
470
+ l(null);
471
+ l(void 0);
472
+ l(void 0);
473
+ l(void 0);
474
+ l(null);
475
+ l(null);
476
+ l(void 0);
477
+ l(void 0);
478
+ l(void 0);
479
+ l(null);
480
+ l(null);
481
+ l(void 0);
482
+ l(void 0);
483
+ l(void 0);
484
+ l(null);
485
+ l(null);
486
+ l(void 0);
487
+ l(void 0);
488
+ l(void 0);
489
+ l(null);
490
+ l(null);
491
+ l(void 0);
492
+ l(void 0);
493
+ l(void 0);
494
+ l(null);
495
+ l(null);
496
+ l(void 0);
497
+ l(void 0);
498
+ l(void 0);
499
+ l(null);
500
+ l(null);
501
+ l(void 0);
502
+ l(void 0);
503
+ l(void 0);
504
+ l(null);
505
+ l(null);
506
+ l(void 0);
507
+ l(void 0);
508
+ l(void 0);
509
+ l(null);
510
+ l(null);
511
+ l(void 0);
512
+ l(void 0);
513
+ l(void 0);
514
+ l(null);
515
+ l(null);
516
+ l(void 0);
517
+ l(void 0);
518
+ l(void 0);
519
+ l(null);
520
+ l(null);
521
+ l(void 0);
522
+ l(void 0);
523
+ l(void 0);
524
+ l(null);
525
+ l(null);
526
+ l(void 0);
527
+ l(void 0);
528
+ l(void 0);
529
+ l(null);
530
+ l(null);
531
+ l(void 0);
532
+ l(void 0);
533
+ l(void 0);
534
+ l(null);
535
+ l(null);
536
+ l(void 0);
537
+ l(void 0);
538
+ l(void 0);
539
+ l(null);
540
+ l(null);
541
+ l(void 0);
542
+ l(void 0);
543
+ l(void 0);
544
+ l(null);
545
+ l(null);
546
+ l(void 0);
547
+ l(void 0);
548
+ l(void 0);
549
+ l(null);
550
+ l(null);
551
+ l(void 0);
552
+ l(void 0);
553
+ l(void 0);
554
+ l(null);
555
+ l(null);
556
+ l(void 0);
557
+ l(void 0);
558
+ l(void 0);
559
+ l(null);
560
+ l(null);
561
+ l(void 0);
562
+ l(void 0);
563
+ l(void 0);
424
564
  function _() {
425
- const [n, u] = x(0);
565
+ const [n, i] = x(0);
426
566
  return p(() => {
427
- const o = setInterval(() => {
428
- u((e) => (e + 1) % 3);
567
+ const u = setInterval(() => {
568
+ i((e) => (e + 1) % 3);
429
569
  }, 500);
430
- return () => clearInterval(o);
431
- }, []), /* @__PURE__ */ i("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((o) => /* @__PURE__ */ i(
570
+ return () => clearInterval(u);
571
+ }, []), /* @__PURE__ */ o("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((u) => /* @__PURE__ */ o(
432
572
  "div",
433
573
  {
434
574
  className: y(
435
575
  "rounded-full transition-all ease-in-out size-[0.35em] bg-current",
436
- n === o && "transform -translate-y-1"
576
+ n === u && "transform -translate-y-1"
437
577
  )
438
578
  },
439
- o
579
+ u
440
580
  )) });
441
581
  }
442
582
  const G = {
443
- base: "",
444
- primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
445
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
446
- tertiary: "text-primary hover:text-primary/70 disabled:text-muted-foreground",
447
- outline: "border border-primary text-primary hover:border-primary/85 hover:text-primary/85 disabled:border-muted disabled:text-muted",
448
- link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted-foreground",
449
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
583
+ base: "focus:outline-current",
584
+ primary: "bg-primary text-primary-foreground hover:bg-primary/80 focus:outline-primary outline-offset-2 disabled:bg-muted disabled:text-muted-foreground",
585
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 focus:outline-secondary outline-offset-2 disabled:bg-muted/80 disabled:text-muted-foreground/80",
586
+ tertiary: "text-primary hover:text-primary/80 disabled:text-muted-foreground focus:outline-primary",
587
+ outline: "border border-primary text-primary hover:border-primary/80 hover:text-primary/80 focus:outline-primary outline-offset-2 disabled:border-muted-foreground disabled:text-muted-foreground",
588
+ link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted-foreground focus:outline-current",
589
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/80 focus:outline-destructive outline-offset-2 disabled:bg-muted disabled:text-muted-foreground"
450
590
  }, J = {
451
591
  stripped: "",
452
592
  fitted: "size-fit leading-0",
@@ -468,44 +608,44 @@ const G = {
468
608
  };
469
609
  function W({
470
610
  variant: n = k.variant,
471
- size: u,
472
- rounded: o = k.rounded,
611
+ size: i,
612
+ rounded: u = k.rounded,
473
613
  loading: e,
474
- className: d,
475
- ...t
614
+ className: t,
615
+ ...d
476
616
  }) {
477
617
  let a;
478
- n === "link" && !u ? a = "fitted" : a = u || k.size;
618
+ n === "link" && !i ? a = "fitted" : a = i || k.size;
479
619
  const s = y(
480
- "appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
620
+ "appearance-none not-disabled:hover:cursor-pointer outline outline-transparent disabled:opacity-50 disabled:cursor-not-allowed transition-all",
481
621
  G[n],
482
622
  J[a],
483
- U[o],
623
+ U[u],
484
624
  e && "relative pointer-events-none",
485
- d
625
+ t
486
626
  );
487
- if (t.href && !t.disabled)
488
- return /* @__PURE__ */ i(
627
+ if (d.href && !d.disabled)
628
+ return /* @__PURE__ */ o(
489
629
  "a",
490
630
  {
491
- ...t,
492
- rel: t.rel ? t.rel : t.target === "_blank" ? "noopener noreferrer" : void 0,
493
- "aria-label": t["aria-label"],
494
- "aria-description": t["aria-description"],
495
- href: t.href,
631
+ ...d,
632
+ rel: d.rel ? d.rel : d.target === "_blank" ? "noopener noreferrer" : void 0,
633
+ "aria-label": d["aria-label"],
634
+ "aria-description": d["aria-description"],
635
+ href: d.href,
496
636
  className: s,
497
- children: t.children
637
+ children: d.children
498
638
  }
499
639
  );
500
- const r = t, c = () => r.children ? typeof r.children == "string" || typeof r.children == "number" || typeof r.children == "boolean" ? /* @__PURE__ */ i("span", { className: y(e && "invisible"), children: r.children }) : g.Children.map(r.children, (v, m) => {
501
- if (g.isValidElement(v)) {
502
- const f = v.props;
503
- return g.cloneElement(v, {
504
- key: m,
505
- className: y(e && "invisible", f.className)
640
+ const r = d, v = () => r.children ? typeof r.children == "string" || typeof r.children == "number" || typeof r.children == "boolean" ? /* @__PURE__ */ o("span", { className: y(e && "invisible"), children: r.children }) : g.Children.map(r.children, (c, f) => {
641
+ if (g.isValidElement(c)) {
642
+ const m = c.props;
643
+ return g.cloneElement(c, {
644
+ key: f,
645
+ className: y(e && "invisible", m.className)
506
646
  });
507
647
  }
508
- return v;
648
+ return c;
509
649
  }) : null;
510
650
  return /* @__PURE__ */ b(
511
651
  "button",
@@ -518,38 +658,38 @@ function W({
518
658
  type: r.type ?? "button",
519
659
  className: s,
520
660
  children: [
521
- e && /* @__PURE__ */ i(_, {}),
522
- c()
661
+ e && /* @__PURE__ */ o(_, {}),
662
+ v()
523
663
  ]
524
664
  }
525
665
  );
526
666
  }
527
667
  function R(n) {
528
- const [u, o] = x(!1), [e, d] = x(!1);
668
+ const [i, u] = x(!1), [e, t] = x(!1);
529
669
  return p(() => {
530
- n ? (d(!0), setTimeout(() => o(!0), 10)) : (o(!1), setTimeout(() => d(!1), 150));
531
- }, [n]), { show: u, shouldRender: e };
670
+ n ? (t(!0), setTimeout(() => u(!0), 10)) : (u(!1), setTimeout(() => t(!1), 150));
671
+ }, [n]), { show: i, shouldRender: e };
532
672
  }
533
- function ll(n, u) {
673
+ function ll(n, i) {
534
674
  p(() => {
535
- const o = (e) => {
536
- e.key === "Escape" && n && u();
675
+ const u = (e) => {
676
+ e.key === "Escape" && n && i();
537
677
  };
538
- return document.addEventListener("keydown", o), n && (document.body.style.overflow = "hidden"), () => {
539
- document.removeEventListener("keydown", o), document.body.style.overflow = "auto";
678
+ return document.addEventListener("keydown", u), n && (document.body.style.overflow = "hidden"), () => {
679
+ document.removeEventListener("keydown", u), document.body.style.overflow = "auto";
540
680
  };
541
- }, [n, u]);
681
+ }, [n, i]);
542
682
  }
543
- function nl(n, u) {
544
- const o = H(null), e = j(() => {
545
- const d = document.getElementById(n);
546
- if (!d) return;
547
- const t = d.querySelectorAll('[data-modal-action="true"]');
548
- if (t.length > 0) {
549
- t[0].focus();
683
+ function nl(n, i) {
684
+ const u = X(null), e = A(() => {
685
+ const t = document.getElementById(n);
686
+ if (!t) return;
687
+ const d = t.querySelectorAll('[data-modal-action="true"]');
688
+ if (d.length > 0) {
689
+ d[0].focus();
550
690
  return;
551
691
  }
552
- const a = d.querySelectorAll(
692
+ const a = t.querySelectorAll(
553
693
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
554
694
  );
555
695
  if (a.length > 0) {
@@ -561,78 +701,78 @@ function nl(n, u) {
561
701
  a[0].focus();
562
702
  return;
563
703
  }
564
- d.focus();
704
+ t.focus();
565
705
  }, [n]);
566
- p(() => (u && (o.current = document.activeElement, e()), () => {
567
- document.body.style.overflow = "auto", o.current instanceof HTMLElement && o.current.focus();
568
- }), [u, e]);
706
+ p(() => (i && (u.current = document.activeElement, e()), () => {
707
+ document.body.style.overflow = "auto", u.current instanceof HTMLElement && u.current.focus();
708
+ }), [i, e]);
569
709
  }
570
710
  function el({
571
711
  id: n,
572
- isOpen: u,
573
- onClose: o,
712
+ isOpen: i,
713
+ onClose: u,
574
714
  title: e,
575
- children: d,
576
- contentOnly: t = !1,
715
+ children: t,
716
+ contentOnly: d = !1,
577
717
  className: a,
578
718
  overlayClassName: s,
579
719
  containerClassName: r,
580
- hideCloseButton: c = !1,
581
- actions: v = [],
582
- disableCloseOnOverlayClick: m = !1,
583
- ariaLabelledBy: f,
720
+ hideCloseButton: v = !1,
721
+ actions: c = [],
722
+ disableCloseOnOverlayClick: f = !1,
723
+ ariaLabelledBy: m,
584
724
  ariaDescribedBy: w
585
725
  }) {
586
- const C = F(), E = n || `modal-${C}`, L = n ? `${n}-title` : `modal-title-${C}`, { show: M, shouldRender: N } = R(u);
587
- if (nl(E, N), ll(N, o), !N) return null;
588
- const I = () => e ? g.isValidElement(e) ? /* @__PURE__ */ i("div", { className: "mb-4", children: e }) : /* @__PURE__ */ i("h2", { className: "mb-4 text-xl font-semibold", id: L, children: e }) : null, B = () => v.length === 0 ? null : /* @__PURE__ */ i("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: v.map((D, O) => {
589
- const { label: S, ...$ } = D;
590
- return /* @__PURE__ */ i(W, { ...$, "data-modal-action": "true", children: S }, O);
726
+ const C = H(), E = n || `modal-${C}`, L = n ? `${n}-title` : `modal-title-${C}`, { show: I, shouldRender: N } = R(i);
727
+ if (nl(E, N), ll(N, u), !N) return null;
728
+ const M = () => e ? g.isValidElement(e) ? /* @__PURE__ */ o("div", { className: "mb-4", children: e }) : /* @__PURE__ */ o("h2", { className: "mb-4 text-xl font-semibold", id: L, children: e }) : null, O = () => c.length === 0 ? null : /* @__PURE__ */ o("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((B, D) => {
729
+ const { label: S, ...$ } = B;
730
+ return /* @__PURE__ */ o(W, { ...$, "data-modal-action": "true", children: S }, D);
591
731
  }) });
592
- return /* @__PURE__ */ i(q, { children: Z(
593
- /* @__PURE__ */ i(
732
+ return /* @__PURE__ */ o(q, { children: F(
733
+ /* @__PURE__ */ o(
594
734
  "div",
595
735
  {
596
- "aria-labelledby": f ?? e ? L : void 0,
736
+ "aria-labelledby": m ?? e ? L : void 0,
597
737
  "aria-describedby": w,
598
738
  role: "dialog",
599
739
  "aria-modal": "true",
600
740
  className: "fixed inset-0 z-[100] overflow-y-auto",
601
741
  children: /* @__PURE__ */ b("div", { className: h("flex min-h-screen items-center justify-center p-4", r), children: [
602
- /* @__PURE__ */ i(
742
+ /* @__PURE__ */ o(
603
743
  "div",
604
744
  {
605
745
  className: h("fixed inset-0 bg-black/20 transition-all", s),
606
746
  onClick: () => {
607
- m || o();
747
+ f || u();
608
748
  }
609
749
  }
610
750
  ),
611
- t && /* @__PURE__ */ i("div", { className: h("relative w-fit", a), children: d }),
612
- !t && /* @__PURE__ */ b(
751
+ d && /* @__PURE__ */ o("div", { className: h("relative w-fit", a), children: t }),
752
+ !d && /* @__PURE__ */ b(
613
753
  "div",
614
754
  {
615
755
  id: E,
616
756
  tabIndex: -1,
617
757
  className: h(
618
758
  "relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in",
619
- M ? "opacity-100 scale-100" : "opacity-0 scale-90",
759
+ I ? "opacity-100 scale-100" : "opacity-0 scale-90",
620
760
  a
621
761
  ),
622
762
  children: [
623
- !c && /* @__PURE__ */ i(
763
+ !v && /* @__PURE__ */ o(
624
764
  "button",
625
765
  {
626
766
  type: "button",
627
- onClick: o,
767
+ onClick: u,
628
768
  "data-modal-close-button": "true",
629
769
  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",
630
- children: /* @__PURE__ */ i(Y, { size: 18 })
770
+ children: /* @__PURE__ */ o(Y, { size: 18 })
631
771
  }
632
772
  ),
633
- I(),
634
- d,
635
- B()
773
+ M(),
774
+ t,
775
+ O()
636
776
  ]
637
777
  }
638
778
  )
@@ -644,147 +784,147 @@ function el({
644
784
  }
645
785
  function sl({
646
786
  type: n,
647
- message: u,
648
- cancelText: o,
787
+ message: i,
788
+ cancelText: u,
649
789
  confirmText: e,
650
- onConfirm: d,
651
- onClose: t,
790
+ onConfirm: t,
791
+ onClose: d,
652
792
  destructive: a = !1,
653
793
  title: s,
654
794
  ...r
655
795
  }) {
656
- const c = z(() => n === "confirm" ? {
796
+ const v = z(() => n === "confirm" ? {
657
797
  confirm: e || "Confirm",
658
- cancel: o || "Cancel",
798
+ cancel: u || "Cancel",
659
799
  defaultTitle: s || "Confirm Action"
660
800
  } : {
661
801
  confirm: e || "OK",
662
802
  cancel: null,
663
803
  defaultTitle: s || "Alert"
664
- }, [n, e, s, o]), v = z(
804
+ }, [n, e, s, u]), c = z(
665
805
  () => [
666
- ...c.cancel ? [
806
+ ...v.cancel ? [
667
807
  {
668
- label: c.cancel,
808
+ label: v.cancel,
669
809
  variant: "secondary",
670
- onClick: t
810
+ onClick: d
671
811
  }
672
812
  ] : [],
673
813
  {
674
- label: c.confirm,
814
+ label: v.confirm,
675
815
  variant: a ? "destructive" : "primary",
676
816
  onClick: () => {
677
- d == null || d(), t();
817
+ t == null || t(), d();
678
818
  }
679
819
  }
680
820
  ],
681
- [c, a, d, t]
821
+ [v, a, t, d]
682
822
  );
683
- return /* @__PURE__ */ i(
823
+ return /* @__PURE__ */ o(
684
824
  el,
685
825
  {
686
826
  ...r,
687
- title: s || c.defaultTitle,
688
- onClose: t,
689
- actions: v,
827
+ title: s || v.defaultTitle,
828
+ onClose: d,
829
+ actions: c,
690
830
  disableCloseOnOverlayClick: n === "confirm",
691
831
  hideCloseButton: n === "confirm",
692
- children: typeof u == "string" ? /* @__PURE__ */ i("p", { className: "text-sm", children: u }) : u
832
+ children: typeof i == "string" ? /* @__PURE__ */ o("p", { className: "text-sm", children: i }) : i
693
833
  }
694
834
  );
695
835
  }
696
- const il = l(null), cl = () => {
697
- const n = A(il);
836
+ const ol = l(null), vl = () => {
837
+ const n = j(ol);
698
838
  if (!n)
699
839
  throw new Error("DropdownMenu components must be used within a DropdownMenu component");
700
840
  return n;
701
- }, ul = l(null), vl = () => {
702
- const n = A(ul);
841
+ }, il = l(null), cl = () => {
842
+ const n = j(il);
703
843
  if (!n)
704
844
  throw new Error("Tabs components must be used within a Tabs component");
705
845
  return n;
706
846
  }, T = {
707
847
  info: {
708
848
  className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
709
- icon: /* @__PURE__ */ i(Q, { size: 20 })
849
+ icon: /* @__PURE__ */ o(P, { size: 20 })
710
850
  },
711
851
  warning: {
712
852
  className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
713
- icon: /* @__PURE__ */ i(P, { size: 20 })
853
+ icon: /* @__PURE__ */ o(K, { size: 20 })
714
854
  },
715
855
  error: {
716
856
  className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
717
- icon: /* @__PURE__ */ i(K, { size: 20 })
857
+ icon: /* @__PURE__ */ o(Z, { size: 20 })
718
858
  }
719
859
  };
720
- function ml({
860
+ function fl({
721
861
  id: n,
722
- title: u,
723
- description: o,
862
+ title: i,
863
+ description: u,
724
864
  type: e = "info",
725
- action: d,
726
- duration: t = 5e3,
865
+ action: t,
866
+ duration: d = 5e3,
727
867
  onRemove: a,
728
868
  customTypes: s,
729
869
  customComponent: r
730
870
  }) {
731
- const [c, v] = x(!1), m = j(() => {
732
- v(!0), setTimeout(() => {
871
+ const [v, c] = x(!1), f = A(() => {
872
+ c(!0), setTimeout(() => {
733
873
  a == null || a(n);
734
874
  }, 150);
735
875
  }, [n, a]);
736
876
  if (p(() => {
737
- if (t > 0) {
877
+ if (d > 0) {
738
878
  const w = setTimeout(() => {
739
- m();
740
- }, t);
879
+ f();
880
+ }, d);
741
881
  return () => clearTimeout(w);
742
882
  }
743
- }, [t, n, a, m]), r)
744
- return /* @__PURE__ */ i(
883
+ }, [d, n, a, f]), r)
884
+ return /* @__PURE__ */ o(
745
885
  r,
746
886
  {
747
887
  id: n,
748
- title: u,
749
- description: o,
888
+ title: i,
889
+ description: u,
750
890
  type: e,
751
- action: d,
752
- duration: t,
891
+ action: t,
892
+ duration: d,
753
893
  onRemove: a
754
894
  }
755
895
  );
756
- const f = (s == null ? void 0 : s[e]) || T[e] || T.info;
896
+ const m = (s == null ? void 0 : s[e]) || T[e] || T.info;
757
897
  return /* @__PURE__ */ b(
758
898
  "div",
759
899
  {
760
900
  role: e === "error" ? "alert" : "status",
761
901
  "aria-live": e === "error" ? void 0 : "polite",
762
- className: X(
902
+ className: Q(
763
903
  "relative flex items-start p-4 rounded-lg border shadow-lg transition-all ease-in-out",
764
- d && "pb-3",
765
- f.className,
766
- c ? "opacity-0 translate-x-full" : "opacity-100 translate-x-0"
904
+ t && "pb-3",
905
+ m.className,
906
+ v ? "opacity-0 translate-x-full" : "opacity-100 translate-x-0"
767
907
  ),
768
908
  children: [
769
- /* @__PURE__ */ i("div", { className: "flex-shrink-0 mr-3", children: f.icon }),
909
+ /* @__PURE__ */ o("div", { className: "flex-shrink-0 mr-3", children: m.icon }),
770
910
  /* @__PURE__ */ b("div", { className: "flex-grow min-w-0", children: [
771
- /* @__PURE__ */ i("div", { className: "font-medium text-sm leading-5", children: u }),
772
- o && /* @__PURE__ */ i("div", { className: "mt-1 text-sm opacity-90 leading-5", children: o }),
773
- d && /* @__PURE__ */ i("div", { className: "mt-1.5", children: /* @__PURE__ */ i(
911
+ /* @__PURE__ */ o("div", { className: "font-medium text-sm leading-5", children: i }),
912
+ u && /* @__PURE__ */ o("div", { className: "mt-1 text-sm opacity-90 leading-5", children: u }),
913
+ t && /* @__PURE__ */ o("div", { className: "mt-1.5", children: /* @__PURE__ */ o(
774
914
  "button",
775
915
  {
776
- onClick: d.onClick,
916
+ onClick: t.onClick,
777
917
  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",
778
- children: d.label
918
+ children: t.label
779
919
  }
780
920
  ) })
781
921
  ] }),
782
- /* @__PURE__ */ i(
922
+ /* @__PURE__ */ o(
783
923
  "button",
784
924
  {
785
- onClick: m,
925
+ onClick: f,
786
926
  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",
787
- children: /* @__PURE__ */ i(V, { size: 16 })
927
+ children: /* @__PURE__ */ o(V, { size: 16 })
788
928
  }
789
929
  )
790
930
  ]
@@ -793,11 +933,11 @@ function ml({
793
933
  }
794
934
  export {
795
935
  sl as A,
796
- il as D,
797
- ml as T,
798
- ul as a,
799
- vl as b,
936
+ ol as D,
937
+ fl as T,
938
+ cl as a,
939
+ il as b,
800
940
  y as n,
801
- cl as u
941
+ vl as u
802
942
  };
803
- //# sourceMappingURL=Toast-sGVog8Ve.js.map
943
+ //# sourceMappingURL=Toast-BI4RNVuu.js.map