@moondreamsdev/dreamer-ui 1.7.19-test.39 → 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.
- package/dist/{Toast-CZEPUDQt.js → Toast-BI4RNVuu.js} +36 -31
- package/dist/Toast-BI4RNVuu.js.map +1 -0
- package/dist/{Toast-BnmdjceD.cjs → Toast-bA4KM60V.cjs} +2 -2
- package/dist/Toast-bA4KM60V.cjs.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +62 -62
- package/dist/components.esm.js.map +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.esm.js +1 -1
- package/package.json +1 -1
- package/dist/Toast-BnmdjceD.cjs.map +0 -1
- package/dist/Toast-CZEPUDQt.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as o, Fragment as q, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { X as V, C as Z, E as
|
|
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
5
|
import { j as Q } from "./join-BmgR_f4v.js";
|
|
6
6
|
function y(...n) {
|
|
7
7
|
return n.filter((i) => typeof i == "string" && i).join(" ").trim() || void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Y({ size: n = 15, color: i = "currentColor", className: u = "inline", ...e }) {
|
|
10
10
|
return /* @__PURE__ */ o(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
@@ -28,7 +28,7 @@ function X({ size: n = 15, color: i = "currentColor", className: u = "inline", .
|
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function h(...n) {
|
|
32
32
|
return n.filter((i) => typeof i == "string" && i).join(" ").trim() || void 0;
|
|
33
33
|
}
|
|
34
34
|
l(void 0);
|
|
@@ -556,7 +556,12 @@ l(null);
|
|
|
556
556
|
l(void 0);
|
|
557
557
|
l(void 0);
|
|
558
558
|
l(void 0);
|
|
559
|
-
|
|
559
|
+
l(null);
|
|
560
|
+
l(null);
|
|
561
|
+
l(void 0);
|
|
562
|
+
l(void 0);
|
|
563
|
+
l(void 0);
|
|
564
|
+
function _() {
|
|
560
565
|
const [n, i] = x(0);
|
|
561
566
|
return p(() => {
|
|
562
567
|
const u = setInterval(() => {
|
|
@@ -574,7 +579,7 @@ function Y() {
|
|
|
574
579
|
u
|
|
575
580
|
)) });
|
|
576
581
|
}
|
|
577
|
-
const
|
|
582
|
+
const G = {
|
|
578
583
|
base: "focus:outline-current",
|
|
579
584
|
primary: "bg-primary text-primary-foreground hover:bg-primary/80 focus:outline-primary outline-offset-2 disabled:bg-muted disabled:text-muted-foreground",
|
|
580
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",
|
|
@@ -582,7 +587,7 @@ const _ = {
|
|
|
582
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",
|
|
583
588
|
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted-foreground focus:outline-current",
|
|
584
589
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/80 focus:outline-destructive outline-offset-2 disabled:bg-muted disabled:text-muted-foreground"
|
|
585
|
-
},
|
|
590
|
+
}, J = {
|
|
586
591
|
stripped: "",
|
|
587
592
|
fitted: "size-fit leading-0",
|
|
588
593
|
sm: "px-2 py-1 text-sm",
|
|
@@ -613,8 +618,8 @@ function W({
|
|
|
613
618
|
n === "link" && !i ? a = "fitted" : a = i || k.size;
|
|
614
619
|
const s = y(
|
|
615
620
|
"appearance-none not-disabled:hover:cursor-pointer outline outline-transparent disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
616
|
-
|
|
617
|
-
|
|
621
|
+
G[n],
|
|
622
|
+
J[a],
|
|
618
623
|
U[u],
|
|
619
624
|
e && "relative pointer-events-none",
|
|
620
625
|
t
|
|
@@ -632,10 +637,10 @@ function W({
|
|
|
632
637
|
children: d.children
|
|
633
638
|
}
|
|
634
639
|
);
|
|
635
|
-
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 }) :
|
|
636
|
-
if (
|
|
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)) {
|
|
637
642
|
const m = c.props;
|
|
638
|
-
return
|
|
643
|
+
return g.cloneElement(c, {
|
|
639
644
|
key: f,
|
|
640
645
|
className: y(e && "invisible", m.className)
|
|
641
646
|
});
|
|
@@ -653,7 +658,7 @@ function W({
|
|
|
653
658
|
type: r.type ?? "button",
|
|
654
659
|
className: s,
|
|
655
660
|
children: [
|
|
656
|
-
e && /* @__PURE__ */ o(
|
|
661
|
+
e && /* @__PURE__ */ o(_, {}),
|
|
657
662
|
v()
|
|
658
663
|
]
|
|
659
664
|
}
|
|
@@ -676,7 +681,7 @@ function ll(n, i) {
|
|
|
676
681
|
}, [n, i]);
|
|
677
682
|
}
|
|
678
683
|
function nl(n, i) {
|
|
679
|
-
const u =
|
|
684
|
+
const u = X(null), e = A(() => {
|
|
680
685
|
const t = document.getElementById(n);
|
|
681
686
|
if (!t) return;
|
|
682
687
|
const d = t.querySelectorAll('[data-modal-action="true"]');
|
|
@@ -720,11 +725,11 @@ function el({
|
|
|
720
725
|
}) {
|
|
721
726
|
const C = H(), E = n || `modal-${C}`, L = n ? `${n}-title` : `modal-title-${C}`, { show: I, shouldRender: N } = R(i);
|
|
722
727
|
if (nl(E, N), ll(N, u), !N) return null;
|
|
723
|
-
const M = () => e ?
|
|
724
|
-
const { label: S, ...$ } =
|
|
725
|
-
return /* @__PURE__ */ o(W, { ...$, "data-modal-action": "true", children: S },
|
|
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);
|
|
726
731
|
}) });
|
|
727
|
-
return /* @__PURE__ */ o(q, { children:
|
|
732
|
+
return /* @__PURE__ */ o(q, { children: F(
|
|
728
733
|
/* @__PURE__ */ o(
|
|
729
734
|
"div",
|
|
730
735
|
{
|
|
@@ -733,23 +738,23 @@ function el({
|
|
|
733
738
|
role: "dialog",
|
|
734
739
|
"aria-modal": "true",
|
|
735
740
|
className: "fixed inset-0 z-[100] overflow-y-auto",
|
|
736
|
-
children: /* @__PURE__ */ b("div", { className:
|
|
741
|
+
children: /* @__PURE__ */ b("div", { className: h("flex min-h-screen items-center justify-center p-4", r), children: [
|
|
737
742
|
/* @__PURE__ */ o(
|
|
738
743
|
"div",
|
|
739
744
|
{
|
|
740
|
-
className:
|
|
745
|
+
className: h("fixed inset-0 bg-black/20 transition-all", s),
|
|
741
746
|
onClick: () => {
|
|
742
747
|
f || u();
|
|
743
748
|
}
|
|
744
749
|
}
|
|
745
750
|
),
|
|
746
|
-
d && /* @__PURE__ */ o("div", { className:
|
|
751
|
+
d && /* @__PURE__ */ o("div", { className: h("relative w-fit", a), children: t }),
|
|
747
752
|
!d && /* @__PURE__ */ b(
|
|
748
753
|
"div",
|
|
749
754
|
{
|
|
750
755
|
id: E,
|
|
751
756
|
tabIndex: -1,
|
|
752
|
-
className:
|
|
757
|
+
className: h(
|
|
753
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",
|
|
754
759
|
I ? "opacity-100 scale-100" : "opacity-0 scale-90",
|
|
755
760
|
a
|
|
@@ -762,12 +767,12 @@ function el({
|
|
|
762
767
|
onClick: u,
|
|
763
768
|
"data-modal-close-button": "true",
|
|
764
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",
|
|
765
|
-
children: /* @__PURE__ */ o(
|
|
770
|
+
children: /* @__PURE__ */ o(Y, { size: 18 })
|
|
766
771
|
}
|
|
767
772
|
),
|
|
768
773
|
M(),
|
|
769
774
|
t,
|
|
770
|
-
|
|
775
|
+
O()
|
|
771
776
|
]
|
|
772
777
|
}
|
|
773
778
|
)
|
|
@@ -829,23 +834,23 @@ function sl({
|
|
|
829
834
|
);
|
|
830
835
|
}
|
|
831
836
|
const ol = l(null), vl = () => {
|
|
832
|
-
const n =
|
|
837
|
+
const n = j(ol);
|
|
833
838
|
if (!n)
|
|
834
839
|
throw new Error("DropdownMenu components must be used within a DropdownMenu component");
|
|
835
840
|
return n;
|
|
836
841
|
}, il = l(null), cl = () => {
|
|
837
|
-
const n =
|
|
842
|
+
const n = j(il);
|
|
838
843
|
if (!n)
|
|
839
844
|
throw new Error("Tabs components must be used within a Tabs component");
|
|
840
845
|
return n;
|
|
841
846
|
}, T = {
|
|
842
847
|
info: {
|
|
843
848
|
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
844
|
-
icon: /* @__PURE__ */ o(
|
|
849
|
+
icon: /* @__PURE__ */ o(P, { size: 20 })
|
|
845
850
|
},
|
|
846
851
|
warning: {
|
|
847
852
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
848
|
-
icon: /* @__PURE__ */ o(
|
|
853
|
+
icon: /* @__PURE__ */ o(K, { size: 20 })
|
|
849
854
|
},
|
|
850
855
|
error: {
|
|
851
856
|
className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
|
|
@@ -863,7 +868,7 @@ function fl({
|
|
|
863
868
|
customTypes: s,
|
|
864
869
|
customComponent: r
|
|
865
870
|
}) {
|
|
866
|
-
const [v, c] = x(!1), f =
|
|
871
|
+
const [v, c] = x(!1), f = A(() => {
|
|
867
872
|
c(!0), setTimeout(() => {
|
|
868
873
|
a == null || a(n);
|
|
869
874
|
}, 150);
|
|
@@ -935,4 +940,4 @@ export {
|
|
|
935
940
|
y as n,
|
|
936
941
|
vl as u
|
|
937
942
|
};
|
|
938
|
-
//# sourceMappingURL=Toast-
|
|
943
|
+
//# sourceMappingURL=Toast-BI4RNVuu.js.map
|