@moondreamsdev/dreamer-ui 1.7.19-test.6 → 1.7.19-test.8

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.
@@ -426,6 +426,16 @@ l(null);
426
426
  l(void 0);
427
427
  l(void 0);
428
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);
429
439
  function _() {
430
440
  const [n, o] = x(0);
431
441
  return p(() => {
@@ -449,7 +459,7 @@ const G = {
449
459
  primary: "bg-primary text-primary-foreground hover:bg-primary/80 disabled:bg-muted disabled:text-muted-foreground",
450
460
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 disabled:bg-muted/80 disabled:text-muted-foreground/80",
451
461
  tertiary: "text-primary hover:text-primary/80 disabled:text-muted-foreground",
452
- outline: "border border-primary text-primary hover:border-primary/80 hover:text-primary/80 disabled:border-muted disabled:text-muted",
462
+ outline: "border border-primary text-primary hover:border-primary/80 hover:text-primary/80 disabled:border-muted-foreground disabled:text-muted-foreground",
453
463
  link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted-foreground",
454
464
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/80 disabled:bg-muted disabled:text-muted-foreground"
455
465
  }, J = {
@@ -476,8 +486,8 @@ function W({
476
486
  size: o,
477
487
  rounded: u = k.rounded,
478
488
  loading: e,
479
- className: d,
480
- ...t
489
+ className: t,
490
+ ...d
481
491
  }) {
482
492
  let a;
483
493
  n === "link" && !o ? a = "fitted" : a = o || k.size;
@@ -487,22 +497,22 @@ function W({
487
497
  J[a],
488
498
  U[u],
489
499
  e && "relative pointer-events-none",
490
- d
500
+ t
491
501
  );
492
- if (t.href && !t.disabled)
502
+ if (d.href && !d.disabled)
493
503
  return /* @__PURE__ */ i(
494
504
  "a",
495
505
  {
496
- ...t,
497
- rel: t.rel ? t.rel : t.target === "_blank" ? "noopener noreferrer" : void 0,
498
- "aria-label": t["aria-label"],
499
- "aria-description": t["aria-description"],
500
- href: t.href,
506
+ ...d,
507
+ rel: d.rel ? d.rel : d.target === "_blank" ? "noopener noreferrer" : void 0,
508
+ "aria-label": d["aria-label"],
509
+ "aria-description": d["aria-description"],
510
+ href: d.href,
501
511
  className: s,
502
- children: t.children
512
+ children: d.children
503
513
  }
504
514
  );
505
- 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) => {
515
+ const r = d, 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) => {
506
516
  if (g.isValidElement(v)) {
507
517
  const f = v.props;
508
518
  return g.cloneElement(v, {
@@ -530,9 +540,9 @@ function W({
530
540
  );
531
541
  }
532
542
  function R(n) {
533
- const [o, u] = x(!1), [e, d] = x(!1);
543
+ const [o, u] = x(!1), [e, t] = x(!1);
534
544
  return p(() => {
535
- n ? (d(!0), setTimeout(() => u(!0), 10)) : (u(!1), setTimeout(() => d(!1), 150));
545
+ n ? (t(!0), setTimeout(() => u(!0), 10)) : (u(!1), setTimeout(() => t(!1), 150));
536
546
  }, [n]), { show: o, shouldRender: e };
537
547
  }
538
548
  function ll(n, o) {
@@ -547,14 +557,14 @@ function ll(n, o) {
547
557
  }
548
558
  function nl(n, o) {
549
559
  const u = H(null), e = j(() => {
550
- const d = document.getElementById(n);
551
- if (!d) return;
552
- const t = d.querySelectorAll('[data-modal-action="true"]');
553
- if (t.length > 0) {
554
- t[0].focus();
560
+ const t = document.getElementById(n);
561
+ if (!t) return;
562
+ const d = t.querySelectorAll('[data-modal-action="true"]');
563
+ if (d.length > 0) {
564
+ d[0].focus();
555
565
  return;
556
566
  }
557
- const a = d.querySelectorAll(
567
+ const a = t.querySelectorAll(
558
568
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
559
569
  );
560
570
  if (a.length > 0) {
@@ -566,7 +576,7 @@ function nl(n, o) {
566
576
  a[0].focus();
567
577
  return;
568
578
  }
569
- d.focus();
579
+ t.focus();
570
580
  }, [n]);
571
581
  p(() => (o && (u.current = document.activeElement, e()), () => {
572
582
  document.body.style.overflow = "auto", u.current instanceof HTMLElement && u.current.focus();
@@ -577,8 +587,8 @@ function el({
577
587
  isOpen: o,
578
588
  onClose: u,
579
589
  title: e,
580
- children: d,
581
- contentOnly: t = !1,
590
+ children: t,
591
+ contentOnly: d = !1,
582
592
  className: a,
583
593
  overlayClassName: s,
584
594
  containerClassName: r,
@@ -613,8 +623,8 @@ function el({
613
623
  }
614
624
  }
615
625
  ),
616
- t && /* @__PURE__ */ i("div", { className: h("relative w-fit", a), children: d }),
617
- !t && /* @__PURE__ */ b(
626
+ d && /* @__PURE__ */ i("div", { className: h("relative w-fit", a), children: t }),
627
+ !d && /* @__PURE__ */ b(
618
628
  "div",
619
629
  {
620
630
  id: E,
@@ -636,7 +646,7 @@ function el({
636
646
  }
637
647
  ),
638
648
  I(),
639
- d,
649
+ t,
640
650
  B()
641
651
  ]
642
652
  }
@@ -652,8 +662,8 @@ function sl({
652
662
  message: o,
653
663
  cancelText: u,
654
664
  confirmText: e,
655
- onConfirm: d,
656
- onClose: t,
665
+ onConfirm: t,
666
+ onClose: d,
657
667
  destructive: a = !1,
658
668
  title: s,
659
669
  ...r
@@ -672,25 +682,25 @@ function sl({
672
682
  {
673
683
  label: c.cancel,
674
684
  variant: "secondary",
675
- onClick: t
685
+ onClick: d
676
686
  }
677
687
  ] : [],
678
688
  {
679
689
  label: c.confirm,
680
690
  variant: a ? "destructive" : "primary",
681
691
  onClick: () => {
682
- d == null || d(), t();
692
+ t == null || t(), d();
683
693
  }
684
694
  }
685
695
  ],
686
- [c, a, d, t]
696
+ [c, a, t, d]
687
697
  );
688
698
  return /* @__PURE__ */ i(
689
699
  el,
690
700
  {
691
701
  ...r,
692
702
  title: s || c.defaultTitle,
693
- onClose: t,
703
+ onClose: d,
694
704
  actions: v,
695
705
  disableCloseOnOverlayClick: n === "confirm",
696
706
  hideCloseButton: n === "confirm",
@@ -727,8 +737,8 @@ function ml({
727
737
  title: o,
728
738
  description: u,
729
739
  type: e = "info",
730
- action: d,
731
- duration: t = 5e3,
740
+ action: t,
741
+ duration: d = 5e3,
732
742
  onRemove: a,
733
743
  customTypes: s,
734
744
  customComponent: r
@@ -739,13 +749,13 @@ function ml({
739
749
  }, 150);
740
750
  }, [n, a]);
741
751
  if (p(() => {
742
- if (t > 0) {
752
+ if (d > 0) {
743
753
  const w = setTimeout(() => {
744
754
  m();
745
- }, t);
755
+ }, d);
746
756
  return () => clearTimeout(w);
747
757
  }
748
- }, [t, n, a, m]), r)
758
+ }, [d, n, a, m]), r)
749
759
  return /* @__PURE__ */ i(
750
760
  r,
751
761
  {
@@ -753,8 +763,8 @@ function ml({
753
763
  title: o,
754
764
  description: u,
755
765
  type: e,
756
- action: d,
757
- duration: t,
766
+ action: t,
767
+ duration: d,
758
768
  onRemove: a
759
769
  }
760
770
  );
@@ -766,7 +776,7 @@ function ml({
766
776
  "aria-live": e === "error" ? void 0 : "polite",
767
777
  className: Q(
768
778
  "relative flex items-start p-4 rounded-lg border shadow-lg transition-all ease-in-out",
769
- d && "pb-3",
779
+ t && "pb-3",
770
780
  f.className,
771
781
  c ? "opacity-0 translate-x-full" : "opacity-100 translate-x-0"
772
782
  ),
@@ -775,12 +785,12 @@ function ml({
775
785
  /* @__PURE__ */ b("div", { className: "flex-grow min-w-0", children: [
776
786
  /* @__PURE__ */ i("div", { className: "font-medium text-sm leading-5", children: o }),
777
787
  u && /* @__PURE__ */ i("div", { className: "mt-1 text-sm opacity-90 leading-5", children: u }),
778
- d && /* @__PURE__ */ i("div", { className: "mt-1.5", children: /* @__PURE__ */ i(
788
+ t && /* @__PURE__ */ i("div", { className: "mt-1.5", children: /* @__PURE__ */ i(
779
789
  "button",
780
790
  {
781
- onClick: d.onClick,
791
+ onClick: t.onClick,
782
792
  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",
783
- children: d.label
793
+ children: t.label
784
794
  }
785
795
  ) })
786
796
  ] }),
@@ -805,4 +815,4 @@ export {
805
815
  y as n,
806
816
  cl as u
807
817
  };
808
- //# sourceMappingURL=Toast-3AlyibD2.js.map
818
+ //# sourceMappingURL=Toast-Cr98a61X.js.map