@moondreamsdev/dreamer-ui 1.7.21-test.72 → 1.7.21-test.73
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-8QfNtQwn.js → Toast-DTBO5RIz.js} +23 -18
- package/dist/{Toast-8QfNtQwn.js.map → Toast-DTBO5RIz.js.map} +1 -1
- package/dist/{Toast-CMAxxWCR.cjs → Toast-TGHbXWGZ.cjs} +2 -2
- package/dist/{Toast-CMAxxWCR.cjs.map → Toast-TGHbXWGZ.cjs.map} +1 -1
- 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/dist/src/components/button/variants.d.ts +1 -1
- package/package.json +1 -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 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((e) => typeof e == "string" && e).join(" ").trim() || void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function _({ size: n = 15, color: e = "currentColor", className: u = "inline", ...i }) {
|
|
10
10
|
return /* @__PURE__ */ o(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
@@ -691,7 +691,12 @@ l(null);
|
|
|
691
691
|
l(void 0);
|
|
692
692
|
l(void 0);
|
|
693
693
|
l(void 0);
|
|
694
|
-
|
|
694
|
+
l(null);
|
|
695
|
+
l(null);
|
|
696
|
+
l(void 0);
|
|
697
|
+
l(void 0);
|
|
698
|
+
l(void 0);
|
|
699
|
+
function G() {
|
|
695
700
|
const [n, e] = x(0);
|
|
696
701
|
return p(() => {
|
|
697
702
|
const u = setInterval(() => {
|
|
@@ -747,7 +752,7 @@ function W({
|
|
|
747
752
|
let v;
|
|
748
753
|
n === "link" && !e ? v = "fitted" : v = e || k.size;
|
|
749
754
|
const a = y(
|
|
750
|
-
"appearance-none not-disabled:hover:cursor-pointer outline outline-transparent disabled:opacity-50 disabled:cursor-not-allowed transition-all inline-flex items-center justify-center",
|
|
755
|
+
"appearance-none not-disabled:hover:cursor-pointer outline outline-transparent disabled:opacity-50 disabled:cursor-not-allowed transition-all inline-flex items-center justify-center gap-0.5",
|
|
751
756
|
Q[n],
|
|
752
757
|
R[v],
|
|
753
758
|
U[u],
|
|
@@ -788,7 +793,7 @@ function W({
|
|
|
788
793
|
type: r.type ?? "button",
|
|
789
794
|
className: a,
|
|
790
795
|
children: [
|
|
791
|
-
i && /* @__PURE__ */ o(
|
|
796
|
+
i && /* @__PURE__ */ o(G, {}),
|
|
792
797
|
s()
|
|
793
798
|
]
|
|
794
799
|
}
|
|
@@ -811,7 +816,7 @@ function ll(n, e) {
|
|
|
811
816
|
}, [n, e]);
|
|
812
817
|
}
|
|
813
818
|
function nl(n, e) {
|
|
814
|
-
const u =
|
|
819
|
+
const u = V(null), i = j(() => {
|
|
815
820
|
const t = document.getElementById(n);
|
|
816
821
|
if (!t) return;
|
|
817
822
|
const d = t.querySelectorAll('[data-modal-action="true"]');
|
|
@@ -853,13 +858,13 @@ function il({
|
|
|
853
858
|
ariaLabelledBy: m,
|
|
854
859
|
ariaDescribedBy: w
|
|
855
860
|
}) {
|
|
856
|
-
const C =
|
|
861
|
+
const C = H(), E = n || `modal-${C}`, L = n ? `${n}-title` : `modal-title-${C}`, { show: M, shouldRender: N } = Y(e);
|
|
857
862
|
if (nl(E, N), ll(N, u), !N) return null;
|
|
858
863
|
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:
|
|
860
|
-
return /* @__PURE__ */ o(W, {
|
|
864
|
+
const { label: S, ...$ } = O;
|
|
865
|
+
return /* @__PURE__ */ o(W, { ...$, "data-modal-action": "true", children: S }, D);
|
|
861
866
|
}) });
|
|
862
|
-
return /* @__PURE__ */ o(q, { children:
|
|
867
|
+
return /* @__PURE__ */ o(q, { children: F(
|
|
863
868
|
/* @__PURE__ */ o(
|
|
864
869
|
"div",
|
|
865
870
|
{
|
|
@@ -897,7 +902,7 @@ function il({
|
|
|
897
902
|
onClick: u,
|
|
898
903
|
"data-modal-close-button": "true",
|
|
899
904
|
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",
|
|
900
|
-
children: /* @__PURE__ */ o(
|
|
905
|
+
children: /* @__PURE__ */ o(_, { size: 18 })
|
|
901
906
|
}
|
|
902
907
|
),
|
|
903
908
|
B(),
|
|
@@ -976,7 +981,7 @@ const ol = l(null), sl = () => {
|
|
|
976
981
|
}, T = {
|
|
977
982
|
info: {
|
|
978
983
|
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
979
|
-
icon: /* @__PURE__ */ o(
|
|
984
|
+
icon: /* @__PURE__ */ o(X, { size: 20 })
|
|
980
985
|
},
|
|
981
986
|
warning: {
|
|
982
987
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
@@ -1029,7 +1034,7 @@ function fl({
|
|
|
1029
1034
|
{
|
|
1030
1035
|
role: i === "error" ? "alert" : "status",
|
|
1031
1036
|
"aria-live": i === "error" ? void 0 : "polite",
|
|
1032
|
-
className:
|
|
1037
|
+
className: Z(
|
|
1033
1038
|
"relative flex items-start p-4 rounded-lg border shadow-lg transition-all ease-in-out",
|
|
1034
1039
|
t && "pb-3",
|
|
1035
1040
|
m.className,
|
|
@@ -1054,7 +1059,7 @@ function fl({
|
|
|
1054
1059
|
{
|
|
1055
1060
|
onClick: f,
|
|
1056
1061
|
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",
|
|
1057
|
-
children: /* @__PURE__ */ o(
|
|
1062
|
+
children: /* @__PURE__ */ o(J, { size: 16 })
|
|
1058
1063
|
}
|
|
1059
1064
|
)
|
|
1060
1065
|
]
|
|
@@ -1070,4 +1075,4 @@ export {
|
|
|
1070
1075
|
y as n,
|
|
1071
1076
|
sl as u
|
|
1072
1077
|
};
|
|
1073
|
-
//# sourceMappingURL=Toast-
|
|
1078
|
+
//# sourceMappingURL=Toast-DTBO5RIz.js.map
|