@moondreamsdev/dreamer-ui 1.7.10-test.76 → 1.7.10-test.78
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-DbTFpNki.js → Toast-3JTotorY.js} +51 -49
- package/dist/Toast-3JTotorY.js.map +1 -0
- package/dist/Toast-CwNeqQlH.cjs +2 -0
- package/dist/Toast-CwNeqQlH.cjs.map +1 -0
- package/dist/components.cjs.js +1 -1
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +4 -3
- 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-CYWqQHPx.cjs +0 -2
- package/dist/Toast-CYWqQHPx.cjs.map +0 -1
- package/dist/Toast-DbTFpNki.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as t, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { X as
|
|
5
|
-
import { j as
|
|
1
|
+
import { jsx as t, Fragment as S, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import q, { createContext as e, useId as $, useState as v, useEffect as p, useRef as F, useCallback as z, useMemo as E, useContext as T } from "react";
|
|
3
|
+
import { createPortal as H } from "react-dom";
|
|
4
|
+
import { X as K, C as P, E as U, I as V } from "./X-CIoyLewf.js";
|
|
5
|
+
import { j as X } from "./join-BmgR_f4v.js";
|
|
6
6
|
function N(...l) {
|
|
7
7
|
return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Z({ size: l = 15, color: r = "currentColor", className: i = "inline", ...n }) {
|
|
10
10
|
return /* @__PURE__ */ t(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
@@ -114,7 +114,9 @@ e(null);
|
|
|
114
114
|
e(null);
|
|
115
115
|
e(null);
|
|
116
116
|
e(null);
|
|
117
|
-
|
|
117
|
+
e(null);
|
|
118
|
+
e(null);
|
|
119
|
+
function G() {
|
|
118
120
|
const [l, r] = v(0);
|
|
119
121
|
return p(() => {
|
|
120
122
|
const i = setInterval(() => {
|
|
@@ -132,7 +134,7 @@ function J() {
|
|
|
132
134
|
i
|
|
133
135
|
)) });
|
|
134
136
|
}
|
|
135
|
-
const
|
|
137
|
+
const J = {
|
|
136
138
|
base: "",
|
|
137
139
|
primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
|
|
138
140
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
|
|
@@ -140,7 +142,7 @@ const Q = {
|
|
|
140
142
|
outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
|
|
141
143
|
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
|
|
142
144
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
|
|
143
|
-
},
|
|
145
|
+
}, Q = {
|
|
144
146
|
stripped: "",
|
|
145
147
|
fitted: "size-fit",
|
|
146
148
|
sm: "px-2 py-1 text-sm",
|
|
@@ -148,7 +150,7 @@ const Q = {
|
|
|
148
150
|
lg: "px-6 py-3 text-lg",
|
|
149
151
|
icon: "p-1 w-fit aspect-square",
|
|
150
152
|
full: "p-2 w-full"
|
|
151
|
-
},
|
|
153
|
+
}, W = {
|
|
152
154
|
none: "rounded-none",
|
|
153
155
|
sm: "rounded-sm",
|
|
154
156
|
md: "rounded-md",
|
|
@@ -159,7 +161,7 @@ const Q = {
|
|
|
159
161
|
size: "md",
|
|
160
162
|
rounded: "md"
|
|
161
163
|
};
|
|
162
|
-
function
|
|
164
|
+
function Y({
|
|
163
165
|
variant: l = w.variant,
|
|
164
166
|
size: r,
|
|
165
167
|
rounded: i = w.rounded,
|
|
@@ -171,9 +173,9 @@ function _({
|
|
|
171
173
|
l === "link" && !r ? s = "fitted" : s = r || w.size;
|
|
172
174
|
const u = N(
|
|
173
175
|
"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
J[l],
|
|
177
|
+
Q[s],
|
|
178
|
+
W[i],
|
|
177
179
|
n && "relative pointer-events-none",
|
|
178
180
|
o
|
|
179
181
|
);
|
|
@@ -203,19 +205,19 @@ function _({
|
|
|
203
205
|
type: d.type ?? "button",
|
|
204
206
|
className: u,
|
|
205
207
|
children: [
|
|
206
|
-
n && /* @__PURE__ */ t(
|
|
208
|
+
n && /* @__PURE__ */ t(G, {}),
|
|
207
209
|
/* @__PURE__ */ t("span", { className: N(n && "invisible"), children: d.children })
|
|
208
210
|
]
|
|
209
211
|
}
|
|
210
212
|
);
|
|
211
213
|
}
|
|
212
|
-
function
|
|
214
|
+
function _(l) {
|
|
213
215
|
const [r, i] = v(!1), [n, o] = v(!1);
|
|
214
216
|
return p(() => {
|
|
215
217
|
l ? (o(!0), setTimeout(() => i(!0), 10)) : (i(!1), setTimeout(() => o(!1), 150));
|
|
216
218
|
}, [l]), { show: r, shouldRender: n };
|
|
217
219
|
}
|
|
218
|
-
function
|
|
220
|
+
function R(l, r) {
|
|
219
221
|
p(() => {
|
|
220
222
|
const i = (n) => {
|
|
221
223
|
n.key === "Escape" && l && r();
|
|
@@ -225,8 +227,8 @@ function ee(l, r) {
|
|
|
225
227
|
};
|
|
226
228
|
}, [l, r]);
|
|
227
229
|
}
|
|
228
|
-
function
|
|
229
|
-
const i =
|
|
230
|
+
function ee(l, r) {
|
|
231
|
+
const i = F(null), n = z(() => {
|
|
230
232
|
const o = document.getElementById(l);
|
|
231
233
|
if (!o) return;
|
|
232
234
|
const a = o.querySelectorAll('[data-modal-action="true"]');
|
|
@@ -252,7 +254,7 @@ function le(l, r) {
|
|
|
252
254
|
document.body.style.overflow = "auto", i.current instanceof HTMLElement && i.current.focus();
|
|
253
255
|
}), [r, n]);
|
|
254
256
|
}
|
|
255
|
-
function
|
|
257
|
+
function le({
|
|
256
258
|
id: l,
|
|
257
259
|
isOpen: r,
|
|
258
260
|
onClose: i,
|
|
@@ -267,13 +269,13 @@ function ne({
|
|
|
267
269
|
ariaLabelledBy: f,
|
|
268
270
|
ariaDescribedBy: g
|
|
269
271
|
}) {
|
|
270
|
-
const h =
|
|
271
|
-
if (
|
|
272
|
-
const M = () => n ?
|
|
273
|
-
const { label: B,
|
|
274
|
-
return /* @__PURE__ */ t(
|
|
272
|
+
const h = $(), k = l || `modal-${h}`, C = l ? `${l}-title` : `modal-title-${h}`, { show: j, shouldRender: x } = _(r);
|
|
273
|
+
if (ee(k, x), R(x, i), !x) return null;
|
|
274
|
+
const M = () => n ? q.isValidElement(n) ? /* @__PURE__ */ t("div", { className: "mb-4", children: n }) : /* @__PURE__ */ t("h2", { className: "mb-4 text-xl font-semibold", id: C, children: n }) : null, A = () => c.length === 0 ? null : /* @__PURE__ */ t("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((I, O) => {
|
|
275
|
+
const { label: B, ...D } = I;
|
|
276
|
+
return /* @__PURE__ */ t(Y, { ...D, "data-modal-action": "true", children: B }, O);
|
|
275
277
|
}) });
|
|
276
|
-
return /* @__PURE__ */ t(
|
|
278
|
+
return /* @__PURE__ */ t(S, { children: H(
|
|
277
279
|
/* @__PURE__ */ t(
|
|
278
280
|
"div",
|
|
279
281
|
{
|
|
@@ -311,7 +313,7 @@ function ne({
|
|
|
311
313
|
onClick: i,
|
|
312
314
|
"data-modal-close-button": "true",
|
|
313
315
|
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",
|
|
314
|
-
children: /* @__PURE__ */ t(
|
|
316
|
+
children: /* @__PURE__ */ t(Z, { size: 18 })
|
|
315
317
|
}
|
|
316
318
|
),
|
|
317
319
|
M(),
|
|
@@ -326,7 +328,7 @@ function ne({
|
|
|
326
328
|
document.body
|
|
327
329
|
) });
|
|
328
330
|
}
|
|
329
|
-
function
|
|
331
|
+
function ue({
|
|
330
332
|
type: l,
|
|
331
333
|
message: r,
|
|
332
334
|
cancelText: i,
|
|
@@ -365,7 +367,7 @@ function de({
|
|
|
365
367
|
[c, s, o, a]
|
|
366
368
|
);
|
|
367
369
|
return /* @__PURE__ */ t(
|
|
368
|
-
|
|
370
|
+
le,
|
|
369
371
|
{
|
|
370
372
|
...d,
|
|
371
373
|
title: u || c.defaultTitle,
|
|
@@ -377,31 +379,31 @@ function de({
|
|
|
377
379
|
}
|
|
378
380
|
);
|
|
379
381
|
}
|
|
380
|
-
const
|
|
381
|
-
const l = T(
|
|
382
|
+
const ne = e(null), de = () => {
|
|
383
|
+
const l = T(ne);
|
|
382
384
|
if (!l)
|
|
383
385
|
throw new Error("DropdownMenu components must be used within a DropdownMenu component");
|
|
384
386
|
return l;
|
|
385
|
-
},
|
|
386
|
-
const l = T(
|
|
387
|
+
}, te = e(null), ce = () => {
|
|
388
|
+
const l = T(te);
|
|
387
389
|
if (!l)
|
|
388
390
|
throw new Error("Tabs components must be used within a Tabs component");
|
|
389
391
|
return l;
|
|
390
|
-
},
|
|
392
|
+
}, L = {
|
|
391
393
|
info: {
|
|
392
394
|
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
393
|
-
icon: /* @__PURE__ */ t(
|
|
395
|
+
icon: /* @__PURE__ */ t(V, { size: 20 })
|
|
394
396
|
},
|
|
395
397
|
warning: {
|
|
396
398
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
397
|
-
icon: /* @__PURE__ */ t(
|
|
399
|
+
icon: /* @__PURE__ */ t(U, { size: 20 })
|
|
398
400
|
},
|
|
399
401
|
error: {
|
|
400
402
|
className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
|
|
401
|
-
icon: /* @__PURE__ */ t(
|
|
403
|
+
icon: /* @__PURE__ */ t(P, { size: 20 })
|
|
402
404
|
}
|
|
403
405
|
};
|
|
404
|
-
function
|
|
406
|
+
function me({
|
|
405
407
|
id: l,
|
|
406
408
|
title: r,
|
|
407
409
|
description: i,
|
|
@@ -412,7 +414,7 @@ function fe({
|
|
|
412
414
|
customTypes: u,
|
|
413
415
|
customComponent: d
|
|
414
416
|
}) {
|
|
415
|
-
const [c, m] = v(!1), f =
|
|
417
|
+
const [c, m] = v(!1), f = z(() => {
|
|
416
418
|
m(!0), setTimeout(() => {
|
|
417
419
|
s == null || s(l);
|
|
418
420
|
}, 150);
|
|
@@ -437,13 +439,13 @@ function fe({
|
|
|
437
439
|
onRemove: s
|
|
438
440
|
}
|
|
439
441
|
);
|
|
440
|
-
const g = (u == null ? void 0 : u[n]) ||
|
|
442
|
+
const g = (u == null ? void 0 : u[n]) || L[n] || L.info;
|
|
441
443
|
return /* @__PURE__ */ b(
|
|
442
444
|
"div",
|
|
443
445
|
{
|
|
444
446
|
role: n === "error" ? "alert" : "status",
|
|
445
447
|
"aria-live": n === "error" ? void 0 : "polite",
|
|
446
|
-
className:
|
|
448
|
+
className: X(
|
|
447
449
|
"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",
|
|
448
450
|
o && "pb-3",
|
|
449
451
|
g.className,
|
|
@@ -468,7 +470,7 @@ function fe({
|
|
|
468
470
|
{
|
|
469
471
|
onClick: f,
|
|
470
472
|
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",
|
|
471
|
-
children: /* @__PURE__ */ t(
|
|
473
|
+
children: /* @__PURE__ */ t(K, { size: 16 })
|
|
472
474
|
}
|
|
473
475
|
)
|
|
474
476
|
]
|
|
@@ -476,12 +478,12 @@ function fe({
|
|
|
476
478
|
);
|
|
477
479
|
}
|
|
478
480
|
export {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
481
|
+
ue as A,
|
|
482
|
+
ne as D,
|
|
483
|
+
me as T,
|
|
484
|
+
te as a,
|
|
485
|
+
ce as b,
|
|
484
486
|
N as n,
|
|
485
|
-
|
|
487
|
+
de as u
|
|
486
488
|
};
|
|
487
|
-
//# sourceMappingURL=Toast-
|
|
489
|
+
//# sourceMappingURL=Toast-3JTotorY.js.map
|