@moondreamsdev/dreamer-ui 1.7.10-test.99 → 1.7.12
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/README.md +2 -11
- package/dist/Toast-DUpf_XxS.js +754 -0
- package/dist/Toast-DUpf_XxS.js.map +1 -0
- package/dist/Toast-Dj3X8g0Q.cjs +2 -0
- package/dist/Toast-Dj3X8g0Q.cjs.map +1 -0
- package/dist/Window-U9c7lCJ4.cjs +2 -0
- package/dist/Window-U9c7lCJ4.cjs.map +1 -0
- package/dist/{Window-uX5BuBwi.js → Window-bavT8vOT.js} +141 -21
- package/dist/Window-bavT8vOT.js.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +4250 -2867
- package/dist/components.esm.js.map +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.esm.js +6 -4
- package/dist/hooks.esm.js.map +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.esm.js +2 -2
- package/dist/src/components/accordion/Accordion.d.ts +36 -0
- package/dist/src/components/accordion/AccordionItem.d.ts +20 -0
- package/dist/src/components/actionmodal/ActionModal.d.ts +34 -0
- package/dist/src/components/avatar/Avatar.d.ts +24 -8
- package/dist/src/components/badge/Badge.d.ts +24 -2
- package/dist/src/components/button/Button.d.ts +22 -1
- package/dist/src/components/button/LoadingDots.d.ts +9 -0
- package/dist/src/components/button/variants.d.ts +4 -1
- package/dist/src/components/calendar/Calendar.d.ts +105 -0
- package/dist/src/components/calendar/hooks.d.ts +40 -0
- package/dist/src/components/calendar/index.d.ts +2 -0
- package/dist/src/components/calendar/variants.d.ts +41 -0
- package/dist/src/components/callout/Callout.d.ts +31 -10
- package/dist/src/components/card/Card.d.ts +29 -7
- package/dist/src/components/carousel/Carousel.d.ts +24 -1
- package/dist/src/components/checkbox/Checkbox.d.ts +37 -1
- package/dist/src/components/clickable/Clickable.d.ts +28 -0
- package/dist/src/components/code/Code.d.ts +18 -0
- package/dist/src/components/code-block/CodeBlock.d.ts +35 -10
- package/dist/src/components/code-block/classes.d.ts +2 -1
- package/dist/src/components/code-block/format.d.ts +2 -1
- package/dist/src/components/code-block/index.d.ts +1 -1
- package/dist/src/components/code-block/tokenize.d.ts +6 -2
- package/dist/src/components/code-block/types.d.ts +24 -1
- package/dist/src/components/disclosure/Disclosure.d.ts +30 -9
- package/dist/src/components/drawer/Drawer.d.ts +35 -10
- package/dist/src/components/dropdown-menu/DropdownMenu.d.ts +34 -0
- package/dist/src/components/dynamic-list/DynamicList.d.ts +68 -0
- package/dist/src/components/dynamic-list/hooks.d.ts +19 -0
- package/dist/src/components/dynamic-list/index.d.ts +2 -0
- package/dist/src/components/dynamic-list/markers.d.ts +8 -0
- package/dist/src/components/dynamic-list/variants.d.ts +4 -0
- package/dist/src/components/error-boundary/ErrorBoundary.d.ts +32 -9
- package/dist/src/components/form/Form.d.ts +28 -0
- package/dist/src/components/form/factories.d.ts +8 -0
- package/dist/src/components/form/hooks.d.ts +9 -0
- package/dist/src/components/form/index.d.ts +3 -0
- package/dist/src/components/form/types.d.ts +91 -0
- package/dist/src/components/form/variants.d.ts +32 -0
- package/dist/src/components/help-icon/HelpIcon.d.ts +48 -0
- package/dist/src/components/help-icon/index.d.ts +1 -0
- package/dist/src/components/index.d.ts +5 -1
- package/dist/src/components/input/Input.d.ts +30 -0
- package/dist/src/components/input/variants.d.ts +2 -0
- package/dist/src/components/label/Label.d.ts +33 -0
- package/dist/src/components/modal/Modal.d.ts +47 -1
- package/dist/src/components/pagination/Pagination.d.ts +36 -4
- package/dist/src/components/popover/Popover.d.ts +53 -3
- package/dist/src/components/radiogroup/RadioGroup.d.ts +33 -0
- package/dist/src/components/radiogroup/RadioGroupItem.d.ts +9 -0
- package/dist/src/components/scroll-area/ScrollArea.d.ts +25 -0
- package/dist/src/components/select/Select.d.ts +49 -0
- package/dist/src/components/separator/Separator.d.ts +23 -5
- package/dist/src/components/skeleton/Skeleton.d.ts +22 -2
- package/dist/src/components/skeleton/variants.d.ts +2 -0
- package/dist/src/components/slider/Slider.d.ts +46 -10
- package/dist/src/components/table/Table.d.ts +96 -0
- package/dist/src/components/table/hooks.d.ts +28 -0
- package/dist/src/components/table/index.d.ts +2 -0
- package/dist/src/components/table/variants.d.ts +14 -0
- package/dist/src/components/tabs/Tabs.d.ts +34 -9
- package/dist/src/components/textarea/Textarea.d.ts +37 -0
- package/dist/src/components/textarea/variants.d.ts +2 -0
- package/dist/src/components/toast/Toast.d.ts +39 -0
- package/dist/src/components/toggle/Toggle.d.ts +29 -0
- package/dist/src/components/tooltip/Tooltip.d.ts +42 -1
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/{components/carousel → hooks}/useScreenSize.d.ts +4 -4
- package/dist/src/symbols/ChevronUp.d.ts +2 -0
- package/dist/src/symbols/GripVertical.d.ts +2 -0
- package/dist/src/symbols/InfoCircledFilled.d.ts +2 -0
- package/dist/src/symbols/Plus.d.ts +2 -0
- package/dist/src/symbols/Trash.d.ts +2 -0
- package/dist/src/symbols/index.d.ts +5 -0
- package/dist/src/symbols/props.d.ts +2 -2
- package/dist/symbols.cjs.js +1 -1
- package/dist/symbols.esm.js +21 -16
- package/dist/theme.css +4 -1
- package/dist/useScreenSize-DiuQZBHb.js +32 -0
- package/dist/useScreenSize-DiuQZBHb.js.map +1 -0
- package/dist/useScreenSize-UGyolnfn.cjs +2 -0
- package/dist/useScreenSize-UGyolnfn.cjs.map +1 -0
- package/package.json +5 -1
- package/dist/Toast-CRG3g8vr.js +0 -512
- package/dist/Toast-CRG3g8vr.js.map +0 -1
- package/dist/Toast-wRAL8PRi.cjs +0 -2
- package/dist/Toast-wRAL8PRi.cjs.map +0 -1
- package/dist/Window-5IZnBJt9.cjs +0 -2
- package/dist/Window-5IZnBJt9.cjs.map +0 -1
- package/dist/Window-uX5BuBwi.js.map +0 -1
- package/dist/src/components/slot/Slot.d.ts +0 -7
- package/dist/src/components/slot/index.d.ts +0 -1
- package/dist/src/components/tooltip/hooks.d.ts +0 -31
package/dist/Toast-CRG3g8vr.js
DELETED
|
@@ -1,512 +0,0 @@
|
|
|
1
|
-
import { jsx as t, Fragment as S, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import $, { createContext as e, useId as q, 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 V, I as X } from "./X-CIoyLewf.js";
|
|
5
|
-
import { j as Z } from "./join-BmgR_f4v.js";
|
|
6
|
-
function N(...l) {
|
|
7
|
-
return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
|
|
8
|
-
}
|
|
9
|
-
function _({ size: l = 15, color: r = "currentColor", className: i = "inline", ...n }) {
|
|
10
|
-
return /* @__PURE__ */ t(
|
|
11
|
-
"svg",
|
|
12
|
-
{
|
|
13
|
-
...n,
|
|
14
|
-
width: l,
|
|
15
|
-
height: l,
|
|
16
|
-
className: i,
|
|
17
|
-
viewBox: "0 0 15 15",
|
|
18
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
-
children: /* @__PURE__ */ t(
|
|
20
|
-
"path",
|
|
21
|
-
{
|
|
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: r,
|
|
24
|
-
fillRule: "evenodd",
|
|
25
|
-
clipRule: "evenodd"
|
|
26
|
-
}
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
function y(...l) {
|
|
32
|
-
return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
|
|
33
|
-
}
|
|
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
|
-
e(null);
|
|
104
|
-
e(null);
|
|
105
|
-
e(null);
|
|
106
|
-
e(null);
|
|
107
|
-
e(null);
|
|
108
|
-
e(null);
|
|
109
|
-
e(null);
|
|
110
|
-
e(null);
|
|
111
|
-
e(null);
|
|
112
|
-
e(null);
|
|
113
|
-
e(null);
|
|
114
|
-
e(null);
|
|
115
|
-
e(null);
|
|
116
|
-
e(null);
|
|
117
|
-
e(null);
|
|
118
|
-
e(null);
|
|
119
|
-
e(null);
|
|
120
|
-
e(null);
|
|
121
|
-
e(null);
|
|
122
|
-
e(null);
|
|
123
|
-
e(null);
|
|
124
|
-
e(null);
|
|
125
|
-
e(null);
|
|
126
|
-
e(null);
|
|
127
|
-
e(null);
|
|
128
|
-
e(null);
|
|
129
|
-
e(null);
|
|
130
|
-
e(null);
|
|
131
|
-
e(null);
|
|
132
|
-
e(null);
|
|
133
|
-
e(null);
|
|
134
|
-
e(null);
|
|
135
|
-
e(null);
|
|
136
|
-
e(null);
|
|
137
|
-
e(null);
|
|
138
|
-
e(null);
|
|
139
|
-
e(null);
|
|
140
|
-
e(null);
|
|
141
|
-
e(null);
|
|
142
|
-
e(null);
|
|
143
|
-
function G() {
|
|
144
|
-
const [l, r] = v(0);
|
|
145
|
-
return p(() => {
|
|
146
|
-
const i = setInterval(() => {
|
|
147
|
-
r((n) => (n + 1) % 3);
|
|
148
|
-
}, 500);
|
|
149
|
-
return () => clearInterval(i);
|
|
150
|
-
}, []), /* @__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(
|
|
151
|
-
"div",
|
|
152
|
-
{
|
|
153
|
-
className: N(
|
|
154
|
-
"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",
|
|
155
|
-
l === i && "transform -translate-y-1"
|
|
156
|
-
)
|
|
157
|
-
},
|
|
158
|
-
i
|
|
159
|
-
)) });
|
|
160
|
-
}
|
|
161
|
-
const J = {
|
|
162
|
-
base: "",
|
|
163
|
-
primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
|
|
164
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
|
|
165
|
-
tertiary: "text-primary hover:text-primary-foreground disabled:text-muted",
|
|
166
|
-
outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
|
|
167
|
-
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
|
|
168
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
|
|
169
|
-
}, Q = {
|
|
170
|
-
stripped: "",
|
|
171
|
-
fitted: "size-fit",
|
|
172
|
-
sm: "px-2 py-1 text-sm",
|
|
173
|
-
md: "px-4 py-2 text-base",
|
|
174
|
-
lg: "px-6 py-3 text-lg",
|
|
175
|
-
icon: "p-1 w-fit aspect-square",
|
|
176
|
-
full: "p-2 w-full"
|
|
177
|
-
}, U = {
|
|
178
|
-
none: "rounded-none",
|
|
179
|
-
sm: "rounded-sm",
|
|
180
|
-
md: "rounded-md",
|
|
181
|
-
lg: "rounded-lg",
|
|
182
|
-
full: "rounded-full"
|
|
183
|
-
}, w = {
|
|
184
|
-
variant: "primary",
|
|
185
|
-
size: "md",
|
|
186
|
-
rounded: "md"
|
|
187
|
-
};
|
|
188
|
-
function W({
|
|
189
|
-
variant: l = w.variant,
|
|
190
|
-
size: r,
|
|
191
|
-
rounded: i = w.rounded,
|
|
192
|
-
loading: n,
|
|
193
|
-
className: o,
|
|
194
|
-
...a
|
|
195
|
-
}) {
|
|
196
|
-
let u;
|
|
197
|
-
l === "link" && !r ? u = "fitted" : u = r || w.size;
|
|
198
|
-
const s = N(
|
|
199
|
-
"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
200
|
-
J[l],
|
|
201
|
-
Q[u],
|
|
202
|
-
U[i],
|
|
203
|
-
n && "relative pointer-events-none",
|
|
204
|
-
o
|
|
205
|
-
);
|
|
206
|
-
if (a.href && !a.disabled)
|
|
207
|
-
return /* @__PURE__ */ t(
|
|
208
|
-
"a",
|
|
209
|
-
{
|
|
210
|
-
...a,
|
|
211
|
-
rel: a.rel ? a.rel : a.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
212
|
-
"aria-label": a["aria-label"],
|
|
213
|
-
"aria-description": a["aria-description"],
|
|
214
|
-
href: a.href,
|
|
215
|
-
className: s,
|
|
216
|
-
children: a.children
|
|
217
|
-
}
|
|
218
|
-
);
|
|
219
|
-
const d = a;
|
|
220
|
-
return /* @__PURE__ */ b(
|
|
221
|
-
"button",
|
|
222
|
-
{
|
|
223
|
-
...d,
|
|
224
|
-
"aria-label": d["aria-label"],
|
|
225
|
-
"aria-description": d["aria-description"],
|
|
226
|
-
"aria-disabled": d.disabled || n,
|
|
227
|
-
"aria-busy": n,
|
|
228
|
-
type: d.type ?? "button",
|
|
229
|
-
className: s,
|
|
230
|
-
children: [
|
|
231
|
-
n && /* @__PURE__ */ t(G, {}),
|
|
232
|
-
/* @__PURE__ */ t("span", { className: N(n && "invisible"), children: d.children })
|
|
233
|
-
]
|
|
234
|
-
}
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
function Y(l) {
|
|
238
|
-
const [r, i] = v(!1), [n, o] = v(!1);
|
|
239
|
-
return p(() => {
|
|
240
|
-
l ? (o(!0), setTimeout(() => i(!0), 10)) : (i(!1), setTimeout(() => o(!1), 150));
|
|
241
|
-
}, [l]), { show: r, shouldRender: n };
|
|
242
|
-
}
|
|
243
|
-
function R(l, r) {
|
|
244
|
-
p(() => {
|
|
245
|
-
const i = (n) => {
|
|
246
|
-
n.key === "Escape" && l && r();
|
|
247
|
-
};
|
|
248
|
-
return document.addEventListener("keydown", i), l && (document.body.style.overflow = "hidden"), () => {
|
|
249
|
-
document.removeEventListener("keydown", i), document.body.style.overflow = "auto";
|
|
250
|
-
};
|
|
251
|
-
}, [l, r]);
|
|
252
|
-
}
|
|
253
|
-
function ee(l, r) {
|
|
254
|
-
const i = F(null), n = z(() => {
|
|
255
|
-
const o = document.getElementById(l);
|
|
256
|
-
if (!o) return;
|
|
257
|
-
const a = o.querySelectorAll('[data-modal-action="true"]');
|
|
258
|
-
if (a.length > 0) {
|
|
259
|
-
a[0].focus();
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
const u = o.querySelectorAll(
|
|
263
|
-
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
264
|
-
);
|
|
265
|
-
if (u.length > 0) {
|
|
266
|
-
const s = Array.from(u).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute("data-modal-close-button") === "true"));
|
|
267
|
-
if (s.length > 0) {
|
|
268
|
-
s[0].focus();
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
u[0].focus();
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
o.focus();
|
|
275
|
-
}, [l]);
|
|
276
|
-
p(() => (r && (i.current = document.activeElement, n()), () => {
|
|
277
|
-
document.body.style.overflow = "auto", i.current instanceof HTMLElement && i.current.focus();
|
|
278
|
-
}), [r, n]);
|
|
279
|
-
}
|
|
280
|
-
function le({
|
|
281
|
-
id: l,
|
|
282
|
-
isOpen: r,
|
|
283
|
-
onClose: i,
|
|
284
|
-
title: n,
|
|
285
|
-
children: o,
|
|
286
|
-
contentOnly: a = !1,
|
|
287
|
-
className: u,
|
|
288
|
-
overlayClassName: s,
|
|
289
|
-
hideCloseButton: d = !1,
|
|
290
|
-
actions: c = [],
|
|
291
|
-
disableCloseOnOverlayClick: m = !1,
|
|
292
|
-
ariaLabelledBy: f,
|
|
293
|
-
ariaDescribedBy: g
|
|
294
|
-
}) {
|
|
295
|
-
const h = q(), k = l || `modal-${h}`, C = l ? `${l}-title` : `modal-title-${h}`, { show: j, shouldRender: x } = Y(r);
|
|
296
|
-
if (ee(k, x), R(x, i), !x) return null;
|
|
297
|
-
const M = () => n ? $.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, B) => {
|
|
298
|
-
const { label: D, ...O } = I;
|
|
299
|
-
return /* @__PURE__ */ t(W, { ...O, "data-modal-action": "true", children: D }, B);
|
|
300
|
-
}) });
|
|
301
|
-
return /* @__PURE__ */ t(S, { children: H(
|
|
302
|
-
/* @__PURE__ */ t(
|
|
303
|
-
"div",
|
|
304
|
-
{
|
|
305
|
-
"aria-labelledby": f ?? n ? C : void 0,
|
|
306
|
-
"aria-describedby": g,
|
|
307
|
-
role: "dialog",
|
|
308
|
-
"aria-modal": "true",
|
|
309
|
-
className: "fixed inset-0 z-[100] overflow-y-auto",
|
|
310
|
-
children: /* @__PURE__ */ b("div", { className: "flex min-h-screen items-center justify-center p-4", children: [
|
|
311
|
-
/* @__PURE__ */ t(
|
|
312
|
-
"div",
|
|
313
|
-
{
|
|
314
|
-
className: y("fixed inset-0 bg-black/20 transition-all", s),
|
|
315
|
-
onClick: () => {
|
|
316
|
-
m || i();
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
),
|
|
320
|
-
a && /* @__PURE__ */ t("div", { className: y("relative w-fit", u), children: o }),
|
|
321
|
-
!a && /* @__PURE__ */ b(
|
|
322
|
-
"div",
|
|
323
|
-
{
|
|
324
|
-
id: k,
|
|
325
|
-
tabIndex: -1,
|
|
326
|
-
className: y(
|
|
327
|
-
"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",
|
|
328
|
-
j ? "opacity-100 scale-100" : "opacity-0 scale-90",
|
|
329
|
-
u
|
|
330
|
-
),
|
|
331
|
-
children: [
|
|
332
|
-
!d && /* @__PURE__ */ t(
|
|
333
|
-
"button",
|
|
334
|
-
{
|
|
335
|
-
type: "button",
|
|
336
|
-
onClick: i,
|
|
337
|
-
"data-modal-close-button": "true",
|
|
338
|
-
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",
|
|
339
|
-
children: /* @__PURE__ */ t(_, { size: 18 })
|
|
340
|
-
}
|
|
341
|
-
),
|
|
342
|
-
M(),
|
|
343
|
-
o,
|
|
344
|
-
A()
|
|
345
|
-
]
|
|
346
|
-
}
|
|
347
|
-
)
|
|
348
|
-
] })
|
|
349
|
-
}
|
|
350
|
-
),
|
|
351
|
-
document.body
|
|
352
|
-
) });
|
|
353
|
-
}
|
|
354
|
-
function se({
|
|
355
|
-
type: l,
|
|
356
|
-
message: r,
|
|
357
|
-
cancelText: i,
|
|
358
|
-
confirmText: n,
|
|
359
|
-
onConfirm: o,
|
|
360
|
-
onClose: a,
|
|
361
|
-
destructive: u = !1,
|
|
362
|
-
title: s,
|
|
363
|
-
...d
|
|
364
|
-
}) {
|
|
365
|
-
const c = E(() => l === "confirm" ? {
|
|
366
|
-
confirm: n || "Confirm",
|
|
367
|
-
cancel: i || "Cancel",
|
|
368
|
-
defaultTitle: s || "Confirm Action"
|
|
369
|
-
} : {
|
|
370
|
-
confirm: n || "OK",
|
|
371
|
-
cancel: null,
|
|
372
|
-
defaultTitle: s || "Alert"
|
|
373
|
-
}, [l, n, s, i]), m = E(
|
|
374
|
-
() => [
|
|
375
|
-
...c.cancel ? [
|
|
376
|
-
{
|
|
377
|
-
label: c.cancel,
|
|
378
|
-
variant: "secondary",
|
|
379
|
-
onClick: a
|
|
380
|
-
}
|
|
381
|
-
] : [],
|
|
382
|
-
{
|
|
383
|
-
label: c.confirm,
|
|
384
|
-
variant: u ? "destructive" : "primary",
|
|
385
|
-
onClick: () => {
|
|
386
|
-
o == null || o(), a();
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
],
|
|
390
|
-
[c, u, o, a]
|
|
391
|
-
);
|
|
392
|
-
return /* @__PURE__ */ t(
|
|
393
|
-
le,
|
|
394
|
-
{
|
|
395
|
-
...d,
|
|
396
|
-
title: s || c.defaultTitle,
|
|
397
|
-
onClose: a,
|
|
398
|
-
actions: m,
|
|
399
|
-
disableCloseOnOverlayClick: l === "confirm",
|
|
400
|
-
hideCloseButton: l === "confirm",
|
|
401
|
-
children: typeof r == "string" ? /* @__PURE__ */ t("p", { className: "text-sm", children: r }) : r
|
|
402
|
-
}
|
|
403
|
-
);
|
|
404
|
-
}
|
|
405
|
-
const ne = e(null), de = () => {
|
|
406
|
-
const l = T(ne);
|
|
407
|
-
if (!l)
|
|
408
|
-
throw new Error("DropdownMenu components must be used within a DropdownMenu component");
|
|
409
|
-
return l;
|
|
410
|
-
}, te = e(null), ce = () => {
|
|
411
|
-
const l = T(te);
|
|
412
|
-
if (!l)
|
|
413
|
-
throw new Error("Tabs components must be used within a Tabs component");
|
|
414
|
-
return l;
|
|
415
|
-
}, L = {
|
|
416
|
-
info: {
|
|
417
|
-
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
418
|
-
icon: /* @__PURE__ */ t(X, { size: 20 })
|
|
419
|
-
},
|
|
420
|
-
warning: {
|
|
421
|
-
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
422
|
-
icon: /* @__PURE__ */ t(V, { size: 20 })
|
|
423
|
-
},
|
|
424
|
-
error: {
|
|
425
|
-
className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
|
|
426
|
-
icon: /* @__PURE__ */ t(P, { size: 20 })
|
|
427
|
-
}
|
|
428
|
-
};
|
|
429
|
-
function me({
|
|
430
|
-
id: l,
|
|
431
|
-
title: r,
|
|
432
|
-
description: i,
|
|
433
|
-
type: n = "info",
|
|
434
|
-
action: o,
|
|
435
|
-
duration: a = 5e3,
|
|
436
|
-
onRemove: u,
|
|
437
|
-
customTypes: s,
|
|
438
|
-
customComponent: d
|
|
439
|
-
}) {
|
|
440
|
-
const [c, m] = v(!1), f = z(() => {
|
|
441
|
-
m(!0), setTimeout(() => {
|
|
442
|
-
u == null || u(l);
|
|
443
|
-
}, 150);
|
|
444
|
-
}, [l, u]);
|
|
445
|
-
if (p(() => {
|
|
446
|
-
if (a > 0) {
|
|
447
|
-
const h = setTimeout(() => {
|
|
448
|
-
f();
|
|
449
|
-
}, a);
|
|
450
|
-
return () => clearTimeout(h);
|
|
451
|
-
}
|
|
452
|
-
}, [a, l, u, f]), d)
|
|
453
|
-
return /* @__PURE__ */ t(
|
|
454
|
-
d,
|
|
455
|
-
{
|
|
456
|
-
id: l,
|
|
457
|
-
title: r,
|
|
458
|
-
description: i,
|
|
459
|
-
type: n,
|
|
460
|
-
action: o,
|
|
461
|
-
duration: a,
|
|
462
|
-
onRemove: u
|
|
463
|
-
}
|
|
464
|
-
);
|
|
465
|
-
const g = (s == null ? void 0 : s[n]) || L[n] || L.info;
|
|
466
|
-
return /* @__PURE__ */ b(
|
|
467
|
-
"div",
|
|
468
|
-
{
|
|
469
|
-
role: n === "error" ? "alert" : "status",
|
|
470
|
-
"aria-live": n === "error" ? void 0 : "polite",
|
|
471
|
-
className: Z(
|
|
472
|
-
"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",
|
|
473
|
-
o && "pb-3",
|
|
474
|
-
g.className,
|
|
475
|
-
c ? "opacity-0 translate-x-full" : "opacity-100 translate-x-0"
|
|
476
|
-
),
|
|
477
|
-
children: [
|
|
478
|
-
/* @__PURE__ */ t("div", { className: "flex-shrink-0 mr-3", children: g.icon }),
|
|
479
|
-
/* @__PURE__ */ b("div", { className: "flex-grow min-w-0", children: [
|
|
480
|
-
/* @__PURE__ */ t("div", { className: "font-medium text-sm leading-5", children: r }),
|
|
481
|
-
i && /* @__PURE__ */ t("div", { className: "mt-1 text-sm opacity-90 leading-5", children: i }),
|
|
482
|
-
o && /* @__PURE__ */ t("div", { className: "mt-1.5", children: /* @__PURE__ */ t(
|
|
483
|
-
"button",
|
|
484
|
-
{
|
|
485
|
-
onClick: o.onClick,
|
|
486
|
-
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",
|
|
487
|
-
children: o.label
|
|
488
|
-
}
|
|
489
|
-
) })
|
|
490
|
-
] }),
|
|
491
|
-
/* @__PURE__ */ t(
|
|
492
|
-
"button",
|
|
493
|
-
{
|
|
494
|
-
onClick: f,
|
|
495
|
-
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",
|
|
496
|
-
children: /* @__PURE__ */ t(K, { size: 16 })
|
|
497
|
-
}
|
|
498
|
-
)
|
|
499
|
-
]
|
|
500
|
-
}
|
|
501
|
-
);
|
|
502
|
-
}
|
|
503
|
-
export {
|
|
504
|
-
se as A,
|
|
505
|
-
ne as D,
|
|
506
|
-
me as T,
|
|
507
|
-
te as a,
|
|
508
|
-
ce as b,
|
|
509
|
-
N as n,
|
|
510
|
-
de as u
|
|
511
|
-
};
|
|
512
|
-
//# sourceMappingURL=Toast-CRG3g8vr.js.map
|