@moondreamsdev/dreamer-ui 1.7.19-test.30 → 1.7.19-test.32
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-Dv7sTwn6.js → Toast-D4qSDezX.js} +26 -21
- package/dist/Toast-D4qSDezX.js.map +1 -0
- package/dist/{Toast-D2o1yaLW.cjs → Toast-DJOTAvA4.cjs} +2 -2
- package/dist/Toast-DJOTAvA4.cjs.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +356 -349
- 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-D2o1yaLW.cjs.map +0 -1
- package/dist/Toast-Dv7sTwn6.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 h, { createContext as l, useId as H, useState as x, useEffect as p, useRef as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { X as
|
|
2
|
+
import h, { createContext as l, useId as H, useState as x, useEffect as p, useRef as X, useCallback as j, useMemo as z, useContext as A } from "react";
|
|
3
|
+
import { createPortal as F } from "react-dom";
|
|
4
|
+
import { X as P, C as V, E as Z, I as K } 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
|
{
|
|
@@ -526,7 +526,12 @@ l(null);
|
|
|
526
526
|
l(void 0);
|
|
527
527
|
l(void 0);
|
|
528
528
|
l(void 0);
|
|
529
|
-
|
|
529
|
+
l(null);
|
|
530
|
+
l(null);
|
|
531
|
+
l(void 0);
|
|
532
|
+
l(void 0);
|
|
533
|
+
l(void 0);
|
|
534
|
+
function _() {
|
|
530
535
|
const [n, i] = x(0);
|
|
531
536
|
return p(() => {
|
|
532
537
|
const u = setInterval(() => {
|
|
@@ -544,7 +549,7 @@ function Y() {
|
|
|
544
549
|
u
|
|
545
550
|
)) });
|
|
546
551
|
}
|
|
547
|
-
const
|
|
552
|
+
const G = {
|
|
548
553
|
base: "focus:outline-current",
|
|
549
554
|
primary: "bg-primary text-primary-foreground hover:bg-primary/80 focus:outline-primary outline-offset-2 disabled:bg-muted disabled:text-muted-foreground",
|
|
550
555
|
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",
|
|
@@ -552,7 +557,7 @@ const _ = {
|
|
|
552
557
|
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",
|
|
553
558
|
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted-foreground focus:outline-current",
|
|
554
559
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/80 focus:outline-destructive outline-offset-2 disabled:bg-muted disabled:text-muted-foreground"
|
|
555
|
-
},
|
|
560
|
+
}, J = {
|
|
556
561
|
stripped: "",
|
|
557
562
|
fitted: "size-fit leading-0",
|
|
558
563
|
sm: "px-2 py-1 text-sm",
|
|
@@ -583,8 +588,8 @@ function W({
|
|
|
583
588
|
n === "link" && !i ? a = "fitted" : a = i || k.size;
|
|
584
589
|
const s = y(
|
|
585
590
|
"appearance-none not-disabled:hover:cursor-pointer outline outline-transparent disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
586
|
-
|
|
587
|
-
|
|
591
|
+
G[n],
|
|
592
|
+
J[a],
|
|
588
593
|
U[u],
|
|
589
594
|
e && "relative pointer-events-none",
|
|
590
595
|
t
|
|
@@ -623,7 +628,7 @@ function W({
|
|
|
623
628
|
type: r.type ?? "button",
|
|
624
629
|
className: s,
|
|
625
630
|
children: [
|
|
626
|
-
e && /* @__PURE__ */ o(
|
|
631
|
+
e && /* @__PURE__ */ o(_, {}),
|
|
627
632
|
v()
|
|
628
633
|
]
|
|
629
634
|
}
|
|
@@ -646,7 +651,7 @@ function ll(n, i) {
|
|
|
646
651
|
}, [n, i]);
|
|
647
652
|
}
|
|
648
653
|
function nl(n, i) {
|
|
649
|
-
const u =
|
|
654
|
+
const u = X(null), e = j(() => {
|
|
650
655
|
const t = document.getElementById(n);
|
|
651
656
|
if (!t) return;
|
|
652
657
|
const d = t.querySelectorAll('[data-modal-action="true"]');
|
|
@@ -688,13 +693,13 @@ function el({
|
|
|
688
693
|
ariaLabelledBy: m,
|
|
689
694
|
ariaDescribedBy: w
|
|
690
695
|
}) {
|
|
691
|
-
const C = H(), E = n || `modal-${C}`, L = n ? `${n}-title` : `modal-title-${C}`, { show:
|
|
696
|
+
const C = H(), E = n || `modal-${C}`, L = n ? `${n}-title` : `modal-title-${C}`, { show: I, shouldRender: N } = R(i);
|
|
692
697
|
if (nl(E, N), ll(N, u), !N) return null;
|
|
693
|
-
const
|
|
698
|
+
const M = () => e ? h.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, B = () => 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((D, O) => {
|
|
694
699
|
const { label: S, ...$ } = D;
|
|
695
700
|
return /* @__PURE__ */ o(W, { ...$, "data-modal-action": "true", children: S }, O);
|
|
696
701
|
}) });
|
|
697
|
-
return /* @__PURE__ */ o(q, { children:
|
|
702
|
+
return /* @__PURE__ */ o(q, { children: F(
|
|
698
703
|
/* @__PURE__ */ o(
|
|
699
704
|
"div",
|
|
700
705
|
{
|
|
@@ -721,7 +726,7 @@ function el({
|
|
|
721
726
|
tabIndex: -1,
|
|
722
727
|
className: g(
|
|
723
728
|
"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in",
|
|
724
|
-
|
|
729
|
+
I ? "opacity-100 scale-100" : "opacity-0 scale-90",
|
|
725
730
|
a
|
|
726
731
|
),
|
|
727
732
|
children: [
|
|
@@ -732,10 +737,10 @@ function el({
|
|
|
732
737
|
onClick: u,
|
|
733
738
|
"data-modal-close-button": "true",
|
|
734
739
|
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",
|
|
735
|
-
children: /* @__PURE__ */ o(
|
|
740
|
+
children: /* @__PURE__ */ o(Y, { size: 18 })
|
|
736
741
|
}
|
|
737
742
|
),
|
|
738
|
-
|
|
743
|
+
M(),
|
|
739
744
|
t,
|
|
740
745
|
B()
|
|
741
746
|
]
|
|
@@ -815,11 +820,11 @@ const ol = l(null), vl = () => {
|
|
|
815
820
|
},
|
|
816
821
|
warning: {
|
|
817
822
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
818
|
-
icon: /* @__PURE__ */ o(
|
|
823
|
+
icon: /* @__PURE__ */ o(Z, { size: 20 })
|
|
819
824
|
},
|
|
820
825
|
error: {
|
|
821
826
|
className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
|
|
822
|
-
icon: /* @__PURE__ */ o(
|
|
827
|
+
icon: /* @__PURE__ */ o(V, { size: 20 })
|
|
823
828
|
}
|
|
824
829
|
};
|
|
825
830
|
function fl({
|
|
@@ -889,7 +894,7 @@ function fl({
|
|
|
889
894
|
{
|
|
890
895
|
onClick: f,
|
|
891
896
|
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",
|
|
892
|
-
children: /* @__PURE__ */ o(
|
|
897
|
+
children: /* @__PURE__ */ o(P, { size: 16 })
|
|
893
898
|
}
|
|
894
899
|
)
|
|
895
900
|
]
|
|
@@ -905,4 +910,4 @@ export {
|
|
|
905
910
|
y as n,
|
|
906
911
|
vl as u
|
|
907
912
|
};
|
|
908
|
-
//# sourceMappingURL=Toast-
|
|
913
|
+
//# sourceMappingURL=Toast-D4qSDezX.js.map
|