@moondreamsdev/dreamer-ui 1.7.10-test.6 → 1.7.10-test.60
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-B3M1ink_.js → Toast-BlBkhebg.js} +219 -174
- package/dist/Toast-BlBkhebg.js.map +1 -0
- package/dist/Toast-Dv-kzKej.cjs +2 -0
- package/dist/Toast-Dv-kzKej.cjs.map +1 -0
- package/dist/Window-5IZnBJt9.cjs +2 -0
- package/dist/Window-5IZnBJt9.cjs.map +1 -0
- package/dist/{Window-CT479Oxr.js → Window-uX5BuBwi.js} +184 -112
- package/dist/Window-uX5BuBwi.js.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +2132 -1510
- 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/callout/Callout.d.ts +23 -0
- package/dist/src/components/callout/index.d.ts +1 -0
- package/dist/src/components/callout/variants.d.ts +9 -0
- package/dist/src/components/code/Code.d.ts +9 -0
- package/dist/src/components/code/hooks.d.ts +8 -0
- package/dist/src/components/code/index.d.ts +1 -0
- package/dist/src/components/code/variants.d.ts +7 -0
- package/dist/src/components/code-block/CodeBlock.d.ts +4 -3
- package/dist/src/components/code-block/classes.d.ts +5 -0
- package/dist/src/components/code-block/constants.d.ts +2 -0
- package/dist/src/components/code-block/format.d.ts +5 -0
- package/dist/src/components/code-block/hooks.d.ts +0 -52
- package/dist/src/components/code-block/index.d.ts +2 -2
- package/dist/src/components/code-block/tokenize.d.ts +20 -0
- package/dist/src/components/code-block/types.d.ts +54 -0
- package/dist/src/components/code-block/util.d.ts +2 -0
- package/dist/src/components/disclosure/Disclosure.d.ts +22 -0
- package/dist/src/components/disclosure/index.d.ts +1 -0
- package/dist/src/components/drawer/Drawer.d.ts +35 -0
- package/dist/src/components/drawer/hooks.d.ts +23 -0
- package/dist/src/components/drawer/index.d.ts +1 -0
- package/dist/src/components/index.d.ts +5 -0
- package/dist/src/components/popover/Popover.d.ts +14 -0
- package/dist/src/components/popover/index.d.ts +1 -0
- package/dist/src/symbols/CaretCollapse.d.ts +2 -0
- package/dist/src/symbols/CaretExpand.d.ts +2 -0
- package/dist/src/symbols/DeepRing.d.ts +2 -0
- package/dist/src/symbols/index.d.ts +3 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/mergeRefs.d.ts +2 -0
- package/dist/symbols.cjs.js +1 -1
- package/dist/symbols.esm.js +21 -18
- package/dist/theme.css +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.cjs.js.map +1 -1
- package/dist/utils.esm.js +14 -6
- package/dist/utils.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/Toast-B3M1ink_.js.map +0 -1
- package/dist/Toast-DjhpxFq-.cjs +0 -2
- package/dist/Toast-DjhpxFq-.cjs.map +0 -1
- package/dist/Window-CT479Oxr.js.map +0 -1
- package/dist/Window-oF6fyFBX.cjs +0 -2
- package/dist/Window-oF6fyFBX.cjs.map +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { X as
|
|
5
|
-
import { j as
|
|
6
|
-
function N(...
|
|
7
|
-
return
|
|
1
|
+
import { jsx as t, Fragment as q, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import D, { createContext as e, useId as F, useState as h, useEffect as g, useRef as H, useCallback as T, useMemo as E, useContext as P } from "react";
|
|
3
|
+
import { createPortal as V } from "react-dom";
|
|
4
|
+
import { X as K, C as X, E as Z, I as G } from "./X-CIoyLewf.js";
|
|
5
|
+
import { j as J } from "./join-BmgR_f4v.js";
|
|
6
|
+
function N(...l) {
|
|
7
|
+
return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
return /* @__PURE__ */
|
|
9
|
+
function Q({ size: l = 15, color: r = "currentColor", className: i = "inline", ...n }) {
|
|
10
|
+
return /* @__PURE__ */ t(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
13
|
-
...
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
16
|
-
className:
|
|
13
|
+
...n,
|
|
14
|
+
width: l,
|
|
15
|
+
height: l,
|
|
16
|
+
className: i,
|
|
17
17
|
viewBox: "0 0 15 15",
|
|
18
18
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
-
children: /* @__PURE__ */
|
|
19
|
+
children: /* @__PURE__ */ t(
|
|
20
20
|
"path",
|
|
21
21
|
{
|
|
22
22
|
d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
|
|
23
|
-
fill:
|
|
23
|
+
fill: r,
|
|
24
24
|
fillRule: "evenodd",
|
|
25
25
|
clipRule: "evenodd"
|
|
26
26
|
}
|
|
@@ -28,52 +28,97 @@ function U({ size: e = 15, color: l = "currentColor", className: n = "inline", .
|
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
function x(...
|
|
32
|
-
return
|
|
31
|
+
function x(...l) {
|
|
32
|
+
return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
34
|
+
e(void 0);
|
|
35
|
+
e(null);
|
|
36
|
+
e(null);
|
|
37
|
+
e(null);
|
|
38
|
+
e(null);
|
|
39
|
+
e(null);
|
|
40
|
+
e(null);
|
|
41
|
+
e(null);
|
|
42
|
+
e(null);
|
|
43
|
+
e(null);
|
|
44
|
+
e(null);
|
|
45
|
+
e(null);
|
|
46
|
+
e(null);
|
|
47
|
+
e(null);
|
|
48
|
+
e(null);
|
|
49
|
+
e(null);
|
|
50
|
+
e(void 0);
|
|
51
|
+
e(void 0);
|
|
52
|
+
e(null);
|
|
53
|
+
e(void 0);
|
|
54
|
+
e(void 0);
|
|
55
|
+
e(null);
|
|
56
|
+
e(null);
|
|
57
|
+
e(null);
|
|
58
|
+
e(null);
|
|
59
|
+
e(null);
|
|
60
|
+
e(null);
|
|
61
|
+
e(null);
|
|
62
|
+
e(null);
|
|
63
|
+
e(null);
|
|
64
|
+
e(null);
|
|
65
|
+
e(null);
|
|
66
|
+
e(null);
|
|
67
|
+
e(null);
|
|
68
|
+
e(null);
|
|
69
|
+
e(null);
|
|
70
|
+
e(null);
|
|
71
|
+
e(null);
|
|
72
|
+
e(null);
|
|
73
|
+
e(null);
|
|
74
|
+
e(null);
|
|
75
|
+
e(null);
|
|
76
|
+
e(null);
|
|
77
|
+
e(null);
|
|
78
|
+
e(null);
|
|
79
|
+
e(null);
|
|
80
|
+
e(null);
|
|
81
|
+
e(null);
|
|
82
|
+
e(null);
|
|
83
|
+
e(null);
|
|
84
|
+
e(null);
|
|
85
|
+
e(null);
|
|
86
|
+
e(null);
|
|
87
|
+
e(null);
|
|
88
|
+
e(null);
|
|
89
|
+
e(null);
|
|
90
|
+
e(null);
|
|
91
|
+
e(null);
|
|
92
|
+
e(null);
|
|
93
|
+
e(null);
|
|
94
|
+
e(null);
|
|
95
|
+
e(null);
|
|
96
|
+
e(null);
|
|
97
|
+
e(null);
|
|
98
|
+
e(null);
|
|
99
|
+
e(null);
|
|
100
|
+
e(null);
|
|
101
|
+
e(null);
|
|
102
|
+
e(null);
|
|
103
|
+
function U() {
|
|
104
|
+
const [l, r] = h(0);
|
|
60
105
|
return g(() => {
|
|
61
|
-
const
|
|
62
|
-
|
|
106
|
+
const i = setInterval(() => {
|
|
107
|
+
r((n) => (n + 1) % 3);
|
|
63
108
|
}, 500);
|
|
64
|
-
return () => clearInterval(
|
|
65
|
-
}, []), /* @__PURE__ */
|
|
109
|
+
return () => clearInterval(i);
|
|
110
|
+
}, []), /* @__PURE__ */ t("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((i) => /* @__PURE__ */ t(
|
|
66
111
|
"div",
|
|
67
112
|
{
|
|
68
113
|
className: N(
|
|
69
114
|
"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",
|
|
70
|
-
|
|
115
|
+
l === i && "transform -translate-y-1"
|
|
71
116
|
)
|
|
72
117
|
},
|
|
73
|
-
|
|
118
|
+
i
|
|
74
119
|
)) });
|
|
75
120
|
}
|
|
76
|
-
const
|
|
121
|
+
const W = {
|
|
77
122
|
base: "",
|
|
78
123
|
primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
|
|
79
124
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
|
|
@@ -81,7 +126,7 @@ const G = {
|
|
|
81
126
|
outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
|
|
82
127
|
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
|
|
83
128
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
|
|
84
|
-
},
|
|
129
|
+
}, Y = {
|
|
85
130
|
stripped: "",
|
|
86
131
|
fitted: "size-fit",
|
|
87
132
|
sm: "px-2 py-1 text-sm",
|
|
@@ -89,7 +134,7 @@ const G = {
|
|
|
89
134
|
lg: "px-6 py-3 text-lg",
|
|
90
135
|
icon: "p-1 w-fit aspect-square",
|
|
91
136
|
full: "p-2 w-full"
|
|
92
|
-
},
|
|
137
|
+
}, _ = {
|
|
93
138
|
none: "rounded-none",
|
|
94
139
|
sm: "rounded-sm",
|
|
95
140
|
md: "rounded-md",
|
|
@@ -100,48 +145,48 @@ const G = {
|
|
|
100
145
|
size: "md",
|
|
101
146
|
rounded: "md"
|
|
102
147
|
};
|
|
103
|
-
function
|
|
104
|
-
variant:
|
|
105
|
-
size:
|
|
106
|
-
rounded:
|
|
107
|
-
loading:
|
|
108
|
-
linkTo:
|
|
148
|
+
function R({
|
|
149
|
+
variant: l = w.variant,
|
|
150
|
+
size: r,
|
|
151
|
+
rounded: i = w.rounded,
|
|
152
|
+
loading: n,
|
|
153
|
+
linkTo: a,
|
|
109
154
|
linkProps: o,
|
|
110
155
|
type: s = "button",
|
|
111
156
|
className: u,
|
|
112
157
|
...d
|
|
113
158
|
}) {
|
|
114
159
|
let c;
|
|
115
|
-
|
|
160
|
+
l === "link" && !r ? c = "fitted" : c = r || w.size;
|
|
116
161
|
const m = N(
|
|
117
162
|
"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
163
|
+
W[l],
|
|
164
|
+
Y[c],
|
|
165
|
+
_[i],
|
|
166
|
+
n && "relative pointer-events-none",
|
|
167
|
+
a && "relative",
|
|
123
168
|
u
|
|
124
169
|
);
|
|
125
170
|
return /* @__PURE__ */ b(
|
|
126
171
|
"button",
|
|
127
172
|
{
|
|
128
173
|
...d,
|
|
129
|
-
role:
|
|
174
|
+
role: a ? "link" : d.role,
|
|
130
175
|
"aria-label": d["aria-label"] || (o == null ? void 0 : o["aria-label"]),
|
|
131
176
|
"aria-description": d["aria-description"] || (o == null ? void 0 : o["aria-description"]),
|
|
132
|
-
"aria-disabled": d.disabled ||
|
|
133
|
-
"aria-busy":
|
|
177
|
+
"aria-disabled": d.disabled || n,
|
|
178
|
+
"aria-busy": n,
|
|
134
179
|
type: s,
|
|
135
180
|
className: m,
|
|
136
181
|
children: [
|
|
137
|
-
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
182
|
+
n && /* @__PURE__ */ t(U, {}),
|
|
183
|
+
/* @__PURE__ */ t("span", { className: N(n && "invisible"), children: d.children }),
|
|
184
|
+
a && !d.disabled && /* @__PURE__ */ t(
|
|
140
185
|
"a",
|
|
141
186
|
{
|
|
142
187
|
...o,
|
|
143
188
|
"aria-hidden": !0,
|
|
144
|
-
href:
|
|
189
|
+
href: a,
|
|
145
190
|
rel: (o == null ? void 0 : o.rel) || "noreferrer",
|
|
146
191
|
className: "absolute inset-0"
|
|
147
192
|
}
|
|
@@ -150,32 +195,32 @@ function Y({
|
|
|
150
195
|
}
|
|
151
196
|
);
|
|
152
197
|
}
|
|
153
|
-
function
|
|
154
|
-
const [
|
|
198
|
+
function $(l) {
|
|
199
|
+
const [r, i] = h(!1), [n, a] = h(!1);
|
|
155
200
|
return g(() => {
|
|
156
|
-
|
|
157
|
-
}, [
|
|
201
|
+
l ? (a(!0), setTimeout(() => i(!0), 10)) : (i(!1), setTimeout(() => a(!1), 150));
|
|
202
|
+
}, [l]), { show: r, shouldRender: n };
|
|
158
203
|
}
|
|
159
|
-
function ee(
|
|
204
|
+
function ee(l, r) {
|
|
160
205
|
g(() => {
|
|
161
|
-
const
|
|
162
|
-
|
|
206
|
+
const i = (n) => {
|
|
207
|
+
n.key === "Escape" && l && r();
|
|
163
208
|
};
|
|
164
|
-
return document.addEventListener("keydown",
|
|
165
|
-
document.removeEventListener("keydown",
|
|
209
|
+
return document.addEventListener("keydown", i), l && (document.body.style.overflow = "hidden"), () => {
|
|
210
|
+
document.removeEventListener("keydown", i), document.body.style.overflow = "auto";
|
|
166
211
|
};
|
|
167
|
-
}, [
|
|
212
|
+
}, [l, r]);
|
|
168
213
|
}
|
|
169
|
-
function
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
if (!
|
|
173
|
-
const o =
|
|
214
|
+
function le(l, r) {
|
|
215
|
+
const i = H(null), n = T(() => {
|
|
216
|
+
const a = document.getElementById(l);
|
|
217
|
+
if (!a) return;
|
|
218
|
+
const o = a.querySelectorAll('[data-modal-action="true"]');
|
|
174
219
|
if (o.length > 0) {
|
|
175
220
|
o[0].focus();
|
|
176
221
|
return;
|
|
177
222
|
}
|
|
178
|
-
const s =
|
|
223
|
+
const s = a.querySelectorAll(
|
|
179
224
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
180
225
|
);
|
|
181
226
|
if (s.length > 0) {
|
|
@@ -187,18 +232,18 @@ function te(e, l) {
|
|
|
187
232
|
s[0].focus();
|
|
188
233
|
return;
|
|
189
234
|
}
|
|
190
|
-
|
|
191
|
-
}, [
|
|
192
|
-
g(() => (
|
|
193
|
-
document.body.style.overflow = "auto",
|
|
194
|
-
}), [
|
|
235
|
+
a.focus();
|
|
236
|
+
}, [l]);
|
|
237
|
+
g(() => (r && (i.current = document.activeElement, n()), () => {
|
|
238
|
+
document.body.style.overflow = "auto", i.current instanceof HTMLElement && i.current.focus();
|
|
239
|
+
}), [r, n]);
|
|
195
240
|
}
|
|
196
|
-
function
|
|
197
|
-
id:
|
|
198
|
-
isOpen:
|
|
199
|
-
onClose:
|
|
200
|
-
title:
|
|
201
|
-
children:
|
|
241
|
+
function ne({
|
|
242
|
+
id: l,
|
|
243
|
+
isOpen: r,
|
|
244
|
+
onClose: i,
|
|
245
|
+
title: n,
|
|
246
|
+
children: a,
|
|
202
247
|
contentOnly: o = !1,
|
|
203
248
|
className: s,
|
|
204
249
|
overlayClassName: u,
|
|
@@ -206,58 +251,58 @@ function re({
|
|
|
206
251
|
actions: c = [],
|
|
207
252
|
disableCloseOnOverlayClick: m = !1,
|
|
208
253
|
ariaLabelledBy: f,
|
|
209
|
-
ariaDescribedBy:
|
|
254
|
+
ariaDescribedBy: p
|
|
210
255
|
}) {
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
213
|
-
const j = () =>
|
|
214
|
-
const { label:
|
|
215
|
-
return /* @__PURE__ */
|
|
256
|
+
const v = F(), k = l || `modal-${v}`, C = l ? `${l}-title` : `modal-title-${v}`, { show: z, shouldRender: y } = $(r);
|
|
257
|
+
if (le(k, y), ee(y, i), !y) return null;
|
|
258
|
+
const j = () => n ? D.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) => {
|
|
259
|
+
const { label: B, className: M, ...S } = I;
|
|
260
|
+
return /* @__PURE__ */ t(R, { className: M, type: "button", ...S, "data-modal-action": "true", children: B }, O);
|
|
216
261
|
}) });
|
|
217
|
-
return /* @__PURE__ */
|
|
218
|
-
/* @__PURE__ */
|
|
262
|
+
return /* @__PURE__ */ t(q, { children: V(
|
|
263
|
+
/* @__PURE__ */ t(
|
|
219
264
|
"div",
|
|
220
265
|
{
|
|
221
|
-
"aria-labelledby": f ??
|
|
222
|
-
"aria-describedby":
|
|
266
|
+
"aria-labelledby": f ?? n ? C : void 0,
|
|
267
|
+
"aria-describedby": p,
|
|
223
268
|
role: "dialog",
|
|
224
269
|
"aria-modal": "true",
|
|
225
270
|
className: "fixed inset-0 z-[100] overflow-y-auto",
|
|
226
271
|
children: /* @__PURE__ */ b("div", { className: "flex min-h-screen items-center justify-center p-4", children: [
|
|
227
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ t(
|
|
228
273
|
"div",
|
|
229
274
|
{
|
|
230
275
|
className: x("fixed inset-0 bg-black/20 transition-all", u),
|
|
231
276
|
onClick: () => {
|
|
232
|
-
m ||
|
|
277
|
+
m || i();
|
|
233
278
|
}
|
|
234
279
|
}
|
|
235
280
|
),
|
|
236
|
-
o && /* @__PURE__ */
|
|
281
|
+
o && /* @__PURE__ */ t("div", { className: x("relative w-fit", s), children: a }),
|
|
237
282
|
!o && /* @__PURE__ */ b(
|
|
238
283
|
"div",
|
|
239
284
|
{
|
|
240
285
|
id: k,
|
|
241
286
|
tabIndex: -1,
|
|
242
287
|
className: x(
|
|
243
|
-
"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",
|
|
288
|
+
"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in duration-75",
|
|
244
289
|
z ? "opacity-100 scale-100" : "opacity-0 scale-90",
|
|
245
290
|
s
|
|
246
291
|
),
|
|
247
292
|
children: [
|
|
248
|
-
!d && /* @__PURE__ */
|
|
293
|
+
!d && /* @__PURE__ */ t(
|
|
249
294
|
"button",
|
|
250
295
|
{
|
|
251
296
|
type: "button",
|
|
252
|
-
onClick:
|
|
297
|
+
onClick: i,
|
|
253
298
|
"data-modal-close-button": "true",
|
|
254
299
|
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",
|
|
255
|
-
children: /* @__PURE__ */
|
|
300
|
+
children: /* @__PURE__ */ t(Q, { size: 18 })
|
|
256
301
|
}
|
|
257
302
|
),
|
|
258
303
|
j(),
|
|
259
|
-
|
|
260
|
-
|
|
304
|
+
a,
|
|
305
|
+
A()
|
|
261
306
|
]
|
|
262
307
|
}
|
|
263
308
|
)
|
|
@@ -268,25 +313,25 @@ function re({
|
|
|
268
313
|
) });
|
|
269
314
|
}
|
|
270
315
|
function de({
|
|
271
|
-
type:
|
|
272
|
-
message:
|
|
273
|
-
cancelText:
|
|
274
|
-
confirmText:
|
|
275
|
-
onConfirm:
|
|
316
|
+
type: l,
|
|
317
|
+
message: r,
|
|
318
|
+
cancelText: i,
|
|
319
|
+
confirmText: n,
|
|
320
|
+
onConfirm: a,
|
|
276
321
|
onClose: o,
|
|
277
322
|
destructive: s = !1,
|
|
278
323
|
title: u,
|
|
279
324
|
...d
|
|
280
325
|
}) {
|
|
281
|
-
const c = E(() =>
|
|
282
|
-
confirm:
|
|
283
|
-
cancel:
|
|
326
|
+
const c = E(() => l === "confirm" ? {
|
|
327
|
+
confirm: n || "Confirm",
|
|
328
|
+
cancel: i || "Cancel",
|
|
284
329
|
defaultTitle: u || "Confirm Action"
|
|
285
330
|
} : {
|
|
286
|
-
confirm:
|
|
331
|
+
confirm: n || "OK",
|
|
287
332
|
cancel: null,
|
|
288
333
|
defaultTitle: u || "Alert"
|
|
289
|
-
}, [
|
|
334
|
+
}, [l, n, u, i]), m = E(
|
|
290
335
|
() => [
|
|
291
336
|
...c.cancel ? [
|
|
292
337
|
{
|
|
@@ -299,112 +344,112 @@ function de({
|
|
|
299
344
|
label: c.confirm,
|
|
300
345
|
variant: s ? "destructive" : "primary",
|
|
301
346
|
onClick: () => {
|
|
302
|
-
|
|
347
|
+
a == null || a(), o();
|
|
303
348
|
}
|
|
304
349
|
}
|
|
305
350
|
],
|
|
306
|
-
[c, s,
|
|
351
|
+
[c, s, a, o]
|
|
307
352
|
);
|
|
308
|
-
return /* @__PURE__ */
|
|
309
|
-
|
|
353
|
+
return /* @__PURE__ */ t(
|
|
354
|
+
ne,
|
|
310
355
|
{
|
|
311
356
|
...d,
|
|
312
357
|
title: u || c.defaultTitle,
|
|
313
358
|
onClose: o,
|
|
314
359
|
actions: m,
|
|
315
|
-
disableCloseOnOverlayClick:
|
|
316
|
-
hideCloseButton:
|
|
317
|
-
children: typeof
|
|
360
|
+
disableCloseOnOverlayClick: l === "confirm",
|
|
361
|
+
hideCloseButton: l === "confirm",
|
|
362
|
+
children: typeof r == "string" ? /* @__PURE__ */ t("p", { className: "text-sm", children: r }) : r
|
|
318
363
|
}
|
|
319
364
|
);
|
|
320
365
|
}
|
|
321
|
-
const
|
|
322
|
-
const
|
|
323
|
-
if (!
|
|
366
|
+
const te = e(null), ue = () => {
|
|
367
|
+
const l = P(te);
|
|
368
|
+
if (!l)
|
|
324
369
|
throw new Error("Tabs components must be used within a Tabs component");
|
|
325
|
-
return
|
|
370
|
+
return l;
|
|
326
371
|
}, L = {
|
|
327
372
|
info: {
|
|
328
373
|
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
329
|
-
icon: /* @__PURE__ */
|
|
374
|
+
icon: /* @__PURE__ */ t(G, { size: 20 })
|
|
330
375
|
},
|
|
331
376
|
warning: {
|
|
332
377
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
333
|
-
icon: /* @__PURE__ */
|
|
378
|
+
icon: /* @__PURE__ */ t(Z, { size: 20 })
|
|
334
379
|
},
|
|
335
380
|
error: {
|
|
336
381
|
className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
|
|
337
|
-
icon: /* @__PURE__ */
|
|
382
|
+
icon: /* @__PURE__ */ t(X, { size: 20 })
|
|
338
383
|
}
|
|
339
384
|
};
|
|
340
385
|
function ce({
|
|
341
|
-
id:
|
|
342
|
-
title:
|
|
343
|
-
description:
|
|
344
|
-
type:
|
|
345
|
-
action:
|
|
386
|
+
id: l,
|
|
387
|
+
title: r,
|
|
388
|
+
description: i,
|
|
389
|
+
type: n = "info",
|
|
390
|
+
action: a,
|
|
346
391
|
duration: o = 5e3,
|
|
347
392
|
onRemove: s,
|
|
348
393
|
customTypes: u,
|
|
349
394
|
customComponent: d
|
|
350
395
|
}) {
|
|
351
|
-
const [c, m] =
|
|
396
|
+
const [c, m] = h(!1), f = T(() => {
|
|
352
397
|
m(!0), setTimeout(() => {
|
|
353
|
-
s == null || s(
|
|
398
|
+
s == null || s(l);
|
|
354
399
|
}, 150);
|
|
355
|
-
}, [
|
|
400
|
+
}, [l, s]);
|
|
356
401
|
if (g(() => {
|
|
357
402
|
if (o > 0) {
|
|
358
|
-
const
|
|
403
|
+
const v = setTimeout(() => {
|
|
359
404
|
f();
|
|
360
405
|
}, o);
|
|
361
|
-
return () => clearTimeout(
|
|
406
|
+
return () => clearTimeout(v);
|
|
362
407
|
}
|
|
363
|
-
}, [o,
|
|
364
|
-
return /* @__PURE__ */
|
|
408
|
+
}, [o, l, s, f]), d)
|
|
409
|
+
return /* @__PURE__ */ t(
|
|
365
410
|
d,
|
|
366
411
|
{
|
|
367
|
-
id:
|
|
368
|
-
title:
|
|
369
|
-
description:
|
|
370
|
-
type:
|
|
371
|
-
action:
|
|
412
|
+
id: l,
|
|
413
|
+
title: r,
|
|
414
|
+
description: i,
|
|
415
|
+
type: n,
|
|
416
|
+
action: a,
|
|
372
417
|
duration: o,
|
|
373
418
|
onRemove: s
|
|
374
419
|
}
|
|
375
420
|
);
|
|
376
|
-
const
|
|
421
|
+
const p = (u == null ? void 0 : u[n]) || L[n] || L.info;
|
|
377
422
|
return /* @__PURE__ */ b(
|
|
378
423
|
"div",
|
|
379
424
|
{
|
|
380
|
-
role:
|
|
381
|
-
"aria-live":
|
|
382
|
-
className:
|
|
425
|
+
role: n === "error" ? "alert" : "status",
|
|
426
|
+
"aria-live": n === "error" ? void 0 : "polite",
|
|
427
|
+
className: J(
|
|
383
428
|
"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",
|
|
384
|
-
|
|
385
|
-
|
|
429
|
+
a && "pb-3",
|
|
430
|
+
p.className,
|
|
386
431
|
c ? "opacity-0 translate-x-full" : "opacity-100 translate-x-0"
|
|
387
432
|
),
|
|
388
433
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ t("div", { className: "flex-shrink-0 mr-3", children: p.icon }),
|
|
390
435
|
/* @__PURE__ */ b("div", { className: "flex-grow min-w-0", children: [
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
|
|
393
|
-
|
|
436
|
+
/* @__PURE__ */ t("div", { className: "font-medium text-sm leading-5", children: r }),
|
|
437
|
+
i && /* @__PURE__ */ t("div", { className: "mt-1 text-sm opacity-90 leading-5", children: i }),
|
|
438
|
+
a && /* @__PURE__ */ t("div", { className: "mt-1.5", children: /* @__PURE__ */ t(
|
|
394
439
|
"button",
|
|
395
440
|
{
|
|
396
|
-
onClick:
|
|
441
|
+
onClick: a.onClick,
|
|
397
442
|
className: "text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer",
|
|
398
|
-
children:
|
|
443
|
+
children: a.label
|
|
399
444
|
}
|
|
400
445
|
) })
|
|
401
446
|
] }),
|
|
402
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ t(
|
|
403
448
|
"button",
|
|
404
449
|
{
|
|
405
450
|
onClick: f,
|
|
406
451
|
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",
|
|
407
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ t(K, { size: 16 })
|
|
408
453
|
}
|
|
409
454
|
)
|
|
410
455
|
]
|
|
@@ -414,8 +459,8 @@ function ce({
|
|
|
414
459
|
export {
|
|
415
460
|
de as A,
|
|
416
461
|
ce as T,
|
|
417
|
-
|
|
462
|
+
te as a,
|
|
418
463
|
N as n,
|
|
419
464
|
ue as u
|
|
420
465
|
};
|
|
421
|
-
//# sourceMappingURL=Toast-
|
|
466
|
+
//# sourceMappingURL=Toast-BlBkhebg.js.map
|