@moondreamsdev/dreamer-ui 1.7.19-test.52 → 1.7.19-test.54
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-BUMsR6kq.js → Toast-BKPAmlx3.js} +22 -17
- package/dist/Toast-BKPAmlx3.js.map +1 -0
- package/dist/{Toast-BkQpefyg.cjs → Toast-Cc565Mvl.cjs} +2 -2
- package/dist/Toast-Cc565Mvl.cjs.map +1 -0
- package/dist/components.cjs.js +1 -1
- package/dist/components.esm.js +63 -63
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.cjs.js.map +1 -1
- package/dist/providers.esm.js +87 -79
- package/dist/providers.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/Toast-BUMsR6kq.js.map +0 -1
- package/dist/Toast-BkQpefyg.cjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as e, 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 H, useState as x, useEffect as p, useRef as V, useCallback as j, useMemo as z, useContext as A } from "react";
|
|
3
|
+
import { createPortal as F } from "react-dom";
|
|
4
|
+
import { X as J, C as K, E as P, I as X } from "./X-CIoyLewf.js";
|
|
5
|
+
import { j as Z } 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 _({ size: n = 15, color: i = "currentColor", className: u = "inline", ...o }) {
|
|
10
10
|
return /* @__PURE__ */ e(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
@@ -601,7 +601,12 @@ l(null);
|
|
|
601
601
|
l(void 0);
|
|
602
602
|
l(void 0);
|
|
603
603
|
l(void 0);
|
|
604
|
-
|
|
604
|
+
l(null);
|
|
605
|
+
l(null);
|
|
606
|
+
l(void 0);
|
|
607
|
+
l(void 0);
|
|
608
|
+
l(void 0);
|
|
609
|
+
function G() {
|
|
605
610
|
const [n, i] = x(0);
|
|
606
611
|
return p(() => {
|
|
607
612
|
const u = setInterval(() => {
|
|
@@ -698,7 +703,7 @@ function Y({
|
|
|
698
703
|
type: r.type ?? "button",
|
|
699
704
|
className: v,
|
|
700
705
|
children: [
|
|
701
|
-
o && /* @__PURE__ */ e(
|
|
706
|
+
o && /* @__PURE__ */ e(G, {}),
|
|
702
707
|
s()
|
|
703
708
|
]
|
|
704
709
|
}
|
|
@@ -721,7 +726,7 @@ function ll(n, i) {
|
|
|
721
726
|
}, [n, i]);
|
|
722
727
|
}
|
|
723
728
|
function nl(n, i) {
|
|
724
|
-
const u =
|
|
729
|
+
const u = V(null), o = j(() => {
|
|
725
730
|
const t = document.getElementById(n);
|
|
726
731
|
if (!t) return;
|
|
727
732
|
const d = t.querySelectorAll('[data-modal-action="true"]');
|
|
@@ -763,13 +768,13 @@ function ol({
|
|
|
763
768
|
ariaLabelledBy: m,
|
|
764
769
|
ariaDescribedBy: w
|
|
765
770
|
}) {
|
|
766
|
-
const C =
|
|
771
|
+
const C = H(), E = n || `modal-${C}`, L = n ? `${n}-title` : `modal-title-${C}`, { show: M, shouldRender: N } = R(i);
|
|
767
772
|
if (nl(E, N), ll(N, u), !N) return null;
|
|
768
773
|
const B = () => o ? g.isValidElement(o) ? /* @__PURE__ */ e("div", { className: "mb-4", children: o }) : /* @__PURE__ */ e("h2", { className: "mb-4 text-xl font-semibold", id: L, children: o }) : null, I = () => c.length === 0 ? null : /* @__PURE__ */ e("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) => {
|
|
769
|
-
const { label:
|
|
770
|
-
return /* @__PURE__ */ e(Y, {
|
|
774
|
+
const { label: S, ...$ } = D;
|
|
775
|
+
return /* @__PURE__ */ e(Y, { ...$, "data-modal-action": "true", children: S }, O);
|
|
771
776
|
}) });
|
|
772
|
-
return /* @__PURE__ */ e(q, { children:
|
|
777
|
+
return /* @__PURE__ */ e(q, { children: F(
|
|
773
778
|
/* @__PURE__ */ e(
|
|
774
779
|
"div",
|
|
775
780
|
{
|
|
@@ -807,7 +812,7 @@ function ol({
|
|
|
807
812
|
onClick: u,
|
|
808
813
|
"data-modal-close-button": "true",
|
|
809
814
|
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",
|
|
810
|
-
children: /* @__PURE__ */ e(
|
|
815
|
+
children: /* @__PURE__ */ e(_, { size: 18 })
|
|
811
816
|
}
|
|
812
817
|
),
|
|
813
818
|
B(),
|
|
@@ -886,7 +891,7 @@ const el = l(null), sl = () => {
|
|
|
886
891
|
}, T = {
|
|
887
892
|
info: {
|
|
888
893
|
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
889
|
-
icon: /* @__PURE__ */ e(
|
|
894
|
+
icon: /* @__PURE__ */ e(X, { size: 20 })
|
|
890
895
|
},
|
|
891
896
|
warning: {
|
|
892
897
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
@@ -939,7 +944,7 @@ function fl({
|
|
|
939
944
|
{
|
|
940
945
|
role: o === "error" ? "alert" : "status",
|
|
941
946
|
"aria-live": o === "error" ? void 0 : "polite",
|
|
942
|
-
className:
|
|
947
|
+
className: Z(
|
|
943
948
|
"relative flex items-start p-4 rounded-lg border shadow-lg transition-all ease-in-out",
|
|
944
949
|
t && "pb-3",
|
|
945
950
|
m.className,
|
|
@@ -964,7 +969,7 @@ function fl({
|
|
|
964
969
|
{
|
|
965
970
|
onClick: f,
|
|
966
971
|
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",
|
|
967
|
-
children: /* @__PURE__ */ e(
|
|
972
|
+
children: /* @__PURE__ */ e(J, { size: 16 })
|
|
968
973
|
}
|
|
969
974
|
)
|
|
970
975
|
]
|
|
@@ -980,4 +985,4 @@ export {
|
|
|
980
985
|
y as n,
|
|
981
986
|
sl as u
|
|
982
987
|
};
|
|
983
|
-
//# sourceMappingURL=Toast-
|
|
988
|
+
//# sourceMappingURL=Toast-BKPAmlx3.js.map
|