@moondreamsdev/dreamer-ui 1.7.21-test.71 → 1.7.21-test.72
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-azIw49kS.js → Toast-8QfNtQwn.js} +23 -18
- package/dist/Toast-8QfNtQwn.js.map +1 -0
- package/dist/{Toast-CSGGZhR_.cjs → Toast-CMAxxWCR.cjs} +2 -2
- package/dist/Toast-CMAxxWCR.cjs.map +1 -0
- package/dist/components.cjs.js +1 -1
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +67 -67
- 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-CSGGZhR_.cjs.map +0 -1
- package/dist/Toast-azIw49kS.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 g, { createContext as l, useId as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { X as
|
|
5
|
-
import { j as
|
|
2
|
+
import g, { createContext as l, useId as X, useState as x, useEffect as p, useRef as H, useCallback as j, useMemo as z, useContext as A } from "react";
|
|
3
|
+
import { createPortal as V } from "react-dom";
|
|
4
|
+
import { X as F, C as K, E as P, I as Z } from "./X-CIoyLewf.js";
|
|
5
|
+
import { j as _ } from "./join-BmgR_f4v.js";
|
|
6
6
|
function y(...n) {
|
|
7
7
|
return n.filter((e) => typeof e == "string" && e).join(" ").trim() || void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function G({ size: n = 15, color: e = "currentColor", className: u = "inline", ...i }) {
|
|
10
10
|
return /* @__PURE__ */ o(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
@@ -686,7 +686,12 @@ l(null);
|
|
|
686
686
|
l(void 0);
|
|
687
687
|
l(void 0);
|
|
688
688
|
l(void 0);
|
|
689
|
-
|
|
689
|
+
l(null);
|
|
690
|
+
l(null);
|
|
691
|
+
l(void 0);
|
|
692
|
+
l(void 0);
|
|
693
|
+
l(void 0);
|
|
694
|
+
function J() {
|
|
690
695
|
const [n, e] = x(0);
|
|
691
696
|
return p(() => {
|
|
692
697
|
const u = setInterval(() => {
|
|
@@ -783,7 +788,7 @@ function W({
|
|
|
783
788
|
type: r.type ?? "button",
|
|
784
789
|
className: a,
|
|
785
790
|
children: [
|
|
786
|
-
i && /* @__PURE__ */ o(
|
|
791
|
+
i && /* @__PURE__ */ o(J, {}),
|
|
787
792
|
s()
|
|
788
793
|
]
|
|
789
794
|
}
|
|
@@ -806,7 +811,7 @@ function ll(n, e) {
|
|
|
806
811
|
}, [n, e]);
|
|
807
812
|
}
|
|
808
813
|
function nl(n, e) {
|
|
809
|
-
const u =
|
|
814
|
+
const u = H(null), i = j(() => {
|
|
810
815
|
const t = document.getElementById(n);
|
|
811
816
|
if (!t) return;
|
|
812
817
|
const d = t.querySelectorAll('[data-modal-action="true"]');
|
|
@@ -848,13 +853,13 @@ function il({
|
|
|
848
853
|
ariaLabelledBy: m,
|
|
849
854
|
ariaDescribedBy: w
|
|
850
855
|
}) {
|
|
851
|
-
const C =
|
|
856
|
+
const C = X(), E = n || `modal-${C}`, L = n ? `${n}-title` : `modal-title-${C}`, { show: M, shouldRender: N } = Y(e);
|
|
852
857
|
if (nl(E, N), ll(N, u), !N) return null;
|
|
853
|
-
const B = () => i ? g.isValidElement(i) ? /* @__PURE__ */ o("div", { className: "mb-4", children: i }) : /* @__PURE__ */ o("h2", { className: "mb-4 text-xl font-semibold", id: L, children: i }) : null, I = () => 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((
|
|
854
|
-
const { label: S
|
|
855
|
-
return /* @__PURE__ */ o(W, {
|
|
858
|
+
const B = () => i ? g.isValidElement(i) ? /* @__PURE__ */ o("div", { className: "mb-4", children: i }) : /* @__PURE__ */ o("h2", { className: "mb-4 text-xl font-semibold", id: L, children: i }) : null, I = () => 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((O, D) => {
|
|
859
|
+
const { label: $, ...S } = O;
|
|
860
|
+
return /* @__PURE__ */ o(W, { ...S, "data-modal-action": "true", children: $ }, D);
|
|
856
861
|
}) });
|
|
857
|
-
return /* @__PURE__ */ o(q, { children:
|
|
862
|
+
return /* @__PURE__ */ o(q, { children: V(
|
|
858
863
|
/* @__PURE__ */ o(
|
|
859
864
|
"div",
|
|
860
865
|
{
|
|
@@ -892,7 +897,7 @@ function il({
|
|
|
892
897
|
onClick: u,
|
|
893
898
|
"data-modal-close-button": "true",
|
|
894
899
|
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",
|
|
895
|
-
children: /* @__PURE__ */ o(
|
|
900
|
+
children: /* @__PURE__ */ o(G, { size: 18 })
|
|
896
901
|
}
|
|
897
902
|
),
|
|
898
903
|
B(),
|
|
@@ -971,7 +976,7 @@ const ol = l(null), sl = () => {
|
|
|
971
976
|
}, T = {
|
|
972
977
|
info: {
|
|
973
978
|
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
974
|
-
icon: /* @__PURE__ */ o(
|
|
979
|
+
icon: /* @__PURE__ */ o(Z, { size: 20 })
|
|
975
980
|
},
|
|
976
981
|
warning: {
|
|
977
982
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
@@ -1024,7 +1029,7 @@ function fl({
|
|
|
1024
1029
|
{
|
|
1025
1030
|
role: i === "error" ? "alert" : "status",
|
|
1026
1031
|
"aria-live": i === "error" ? void 0 : "polite",
|
|
1027
|
-
className:
|
|
1032
|
+
className: _(
|
|
1028
1033
|
"relative flex items-start p-4 rounded-lg border shadow-lg transition-all ease-in-out",
|
|
1029
1034
|
t && "pb-3",
|
|
1030
1035
|
m.className,
|
|
@@ -1049,7 +1054,7 @@ function fl({
|
|
|
1049
1054
|
{
|
|
1050
1055
|
onClick: f,
|
|
1051
1056
|
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",
|
|
1052
|
-
children: /* @__PURE__ */ o(
|
|
1057
|
+
children: /* @__PURE__ */ o(F, { size: 16 })
|
|
1053
1058
|
}
|
|
1054
1059
|
)
|
|
1055
1060
|
]
|
|
@@ -1065,4 +1070,4 @@ export {
|
|
|
1065
1070
|
y as n,
|
|
1066
1071
|
sl as u
|
|
1067
1072
|
};
|
|
1068
|
-
//# sourceMappingURL=Toast-
|
|
1073
|
+
//# sourceMappingURL=Toast-8QfNtQwn.js.map
|