welcome-ui 10.0.0-alpha.5 → 10.0.0-alpha.6
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/Button.css +1 -1
- package/dist/Button.js +41 -41
- package/dist/Drawer.js +132 -111
- package/dist/DropdownMenu.js +251 -238
- package/dist/Icon.js +16 -12
- package/dist/InputText.css +1 -1
- package/dist/InputText.js +48 -48
- package/dist/Link.css +1 -1
- package/dist/Link.js +48 -48
- package/dist/Search.css +1 -1
- package/dist/Search.js +137 -132
- package/dist/Textarea.css +1 -1
- package/dist/Textarea.js +24 -18
- package/dist/Toast.js +163 -126
- package/dist/types/components/Icon/icons.d.ts +4 -3
- package/dist/types/components/Textarea/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/Toast.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Toast.css';
|
|
3
|
-
import { jsxs as
|
|
3
|
+
import { jsxs as k, jsx as y, Fragment as B } from "react/jsx-runtime";
|
|
4
4
|
import * as f from "react";
|
|
5
5
|
import { useRef as Y, useCallback as j, useEffect as S, useState as fe, forwardRef as Z, cloneElement as ge } from "react";
|
|
6
6
|
import { c as L } from "./index-PAaZGbyz.js";
|
|
7
7
|
import { Button as K } from "./Button.js";
|
|
8
8
|
import { CloseButton as Q } from "./CloseButton.js";
|
|
9
9
|
import { Icon as V } from "./Icon.js";
|
|
10
|
-
import { Text as
|
|
10
|
+
import { Text as C } from "./Text.js";
|
|
11
11
|
import { f as J } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
12
12
|
let ye = { data: "" }, be = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || ye, he = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, ve = /\/\*[^]*?\*\/| +/g, W = /\n+/g, w = (e, t) => {
|
|
13
13
|
let a = "", s = "", i = "";
|
|
@@ -25,21 +25,21 @@ let ye = { data: "" }, be = (e) => typeof window == "object" ? ((e ? e.querySele
|
|
|
25
25
|
return e;
|
|
26
26
|
}, xe = (e, t, a, s, i) => {
|
|
27
27
|
let o = X(e), r = v[o] || (v[o] = ((l) => {
|
|
28
|
-
let
|
|
29
|
-
for (;
|
|
30
|
-
return "go" +
|
|
28
|
+
let p = 0, c = 11;
|
|
29
|
+
for (; p < l.length; ) c = 101 * c + l.charCodeAt(p++) >>> 0;
|
|
30
|
+
return "go" + c;
|
|
31
31
|
})(o));
|
|
32
32
|
if (!v[r]) {
|
|
33
|
-
let l = o !== e ? e : ((
|
|
34
|
-
let
|
|
35
|
-
for (;
|
|
36
|
-
return
|
|
33
|
+
let l = o !== e ? e : ((p) => {
|
|
34
|
+
let c, d, m = [{}];
|
|
35
|
+
for (; c = he.exec(p.replace(ve, "")); ) c[4] ? m.shift() : c[3] ? (d = c[3].replace(W, " ").trim(), m.unshift(m[0][d] = m[0][d] || {})) : m[0][c[1]] = c[2].replace(W, " ").trim();
|
|
36
|
+
return m[0];
|
|
37
37
|
})(e);
|
|
38
38
|
v[r] = w(i ? { ["@keyframes " + r]: l } : l, a ? "" : "." + r);
|
|
39
39
|
}
|
|
40
40
|
let n = a && v.g ? v.g : null;
|
|
41
|
-
return a && (v.g = v[r]), ((l, c, d
|
|
42
|
-
|
|
41
|
+
return a && (v.g = v[r]), ((l, p, c, d) => {
|
|
42
|
+
d ? p.data = p.data.replace(d, l) : p.data.indexOf(l) === -1 && (p.data = c ? l + p.data : p.data + l);
|
|
43
43
|
})(v[r], t, s, n), r;
|
|
44
44
|
}, we = (e, t, a) => e.reduce((s, i, o) => {
|
|
45
45
|
let r = t[o];
|
|
@@ -49,13 +49,13 @@ let ye = { data: "" }, be = (e) => typeof window == "object" ? ((e ? e.querySele
|
|
|
49
49
|
}
|
|
50
50
|
return s + i + (r ?? "");
|
|
51
51
|
}, "");
|
|
52
|
-
function
|
|
52
|
+
function A(e) {
|
|
53
53
|
let t = this || {}, a = e.call ? e(t.p) : e;
|
|
54
54
|
return xe(a.unshift ? a.raw ? we(a, [].slice.call(arguments, 1), t.p) : a.reduce((s, i) => Object.assign(s, i && i.call ? i(t.p) : i), {}) : a, be(t.target), t.g, t.o, t.k);
|
|
55
55
|
}
|
|
56
56
|
let ee, R, F;
|
|
57
|
-
|
|
58
|
-
let x =
|
|
57
|
+
A.bind({ g: 1 });
|
|
58
|
+
let x = A.bind({ k: 1 });
|
|
59
59
|
function _e(e, t, a, s) {
|
|
60
60
|
w.p = t, ee = e, R = a, F = s;
|
|
61
61
|
}
|
|
@@ -65,14 +65,14 @@ function _(e, t) {
|
|
|
65
65
|
let s = arguments;
|
|
66
66
|
function i(o, r) {
|
|
67
67
|
let n = Object.assign({}, o), l = n.className || i.className;
|
|
68
|
-
a.p = Object.assign({ theme: R && R() }, n), a.o = / *go\d+/.test(l), n.className =
|
|
69
|
-
let
|
|
70
|
-
return e[0] && (
|
|
68
|
+
a.p = Object.assign({ theme: R && R() }, n), a.o = / *go\d+/.test(l), n.className = A.apply(a, s) + (l ? " " + l : "");
|
|
69
|
+
let p = e;
|
|
70
|
+
return e[0] && (p = n.as || e, delete n.as), F && p[0] && F(n), ee(p, n);
|
|
71
71
|
}
|
|
72
72
|
return i;
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
var Ne = (e) => typeof e == "function",
|
|
75
|
+
var Ne = (e) => typeof e == "function", D = (e, t) => Ne(e) ? e(t) : e, je = /* @__PURE__ */ (() => {
|
|
76
76
|
let e = 0;
|
|
77
77
|
return () => (++e).toString();
|
|
78
78
|
})(), te = /* @__PURE__ */ (() => {
|
|
@@ -84,7 +84,7 @@ var Ne = (e) => typeof e == "function", A = (e, t) => Ne(e) ? e(t) : e, je = /*
|
|
|
84
84
|
}
|
|
85
85
|
return e;
|
|
86
86
|
};
|
|
87
|
-
})(),
|
|
87
|
+
})(), ke = 20, M = "default", ae = (e, t) => {
|
|
88
88
|
let { toastLimit: a } = e.settings;
|
|
89
89
|
switch (t.type) {
|
|
90
90
|
case 0:
|
|
@@ -105,11 +105,11 @@ var Ne = (e) => typeof e == "function", A = (e, t) => Ne(e) ? e(t) : e, je = /*
|
|
|
105
105
|
let o = t.time - (e.pausedAt || 0);
|
|
106
106
|
return { ...e, pausedAt: void 0, toasts: e.toasts.map((r) => ({ ...r, pauseDuration: r.pauseDuration + o })) };
|
|
107
107
|
}
|
|
108
|
-
}, O = [], re = { toasts: [], pausedAt: void 0, settings: { toastLimit:
|
|
108
|
+
}, O = [], re = { toasts: [], pausedAt: void 0, settings: { toastLimit: ke } }, h = {}, se = (e, t = M) => {
|
|
109
109
|
h[t] = ae(h[t] || re, e), O.forEach(([a, s]) => {
|
|
110
110
|
a === t && s(h[t]);
|
|
111
111
|
});
|
|
112
|
-
}, oe = (e) => Object.keys(h).forEach((t) => se(e, t)),
|
|
112
|
+
}, oe = (e) => Object.keys(h).forEach((t) => se(e, t)), ze = (e) => Object.keys(h).find((t) => h[t].toasts.some((a) => a.id === e)), q = (e = M) => (t) => {
|
|
113
113
|
se(t, e);
|
|
114
114
|
}, $e = { blank: 4e3, error: 4e3, success: 2e3, loading: 1 / 0, custom: 4e3 }, Ee = (e = {}, t = M) => {
|
|
115
115
|
let [a, s] = fe(h[t] || re), i = Y(h[t]);
|
|
@@ -118,81 +118,81 @@ var Ne = (e) => typeof e == "function", A = (e, t) => Ne(e) ? e(t) : e, je = /*
|
|
|
118
118
|
r > -1 && O.splice(r, 1);
|
|
119
119
|
}), [t]);
|
|
120
120
|
let o = a.toasts.map((r) => {
|
|
121
|
-
var n, l,
|
|
122
|
-
return { ...e, ...e[r.type], ...r, removeDelay: r.removeDelay || ((n = e[r.type]) == null ? void 0 : n.removeDelay) || (e == null ? void 0 : e.removeDelay), duration: r.duration || ((l = e[r.type]) == null ? void 0 : l.duration) || (e == null ? void 0 : e.duration) || $e[r.type], style: { ...e.style, ...(
|
|
121
|
+
var n, l, p;
|
|
122
|
+
return { ...e, ...e[r.type], ...r, removeDelay: r.removeDelay || ((n = e[r.type]) == null ? void 0 : n.removeDelay) || (e == null ? void 0 : e.removeDelay), duration: r.duration || ((l = e[r.type]) == null ? void 0 : l.duration) || (e == null ? void 0 : e.duration) || $e[r.type], style: { ...e.style, ...(p = e[r.type]) == null ? void 0 : p.style, ...r.style } };
|
|
123
123
|
});
|
|
124
124
|
return { ...a, toasts: o };
|
|
125
125
|
}, Te = (e, t = "blank", a) => ({ createdAt: Date.now(), visible: !0, dismissed: !1, type: t, ariaProps: { role: "status", "aria-live": "polite" }, message: e, pauseDuration: 0, ...a, id: (a == null ? void 0 : a.id) || je() }), $ = (e) => (t, a) => {
|
|
126
126
|
let s = Te(t, e, a);
|
|
127
|
-
return
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
return q(s.toasterId || ze(s.id))({ type: 2, toast: s }), s.id;
|
|
128
|
+
}, u = (e, t) => $("blank")(e, t);
|
|
129
|
+
u.error = $("error");
|
|
130
|
+
u.success = $("success");
|
|
131
|
+
u.loading = $("loading");
|
|
132
|
+
u.custom = $("custom");
|
|
133
|
+
u.dismiss = (e, t) => {
|
|
134
134
|
let a = { type: 3, toastId: e };
|
|
135
|
-
t ?
|
|
135
|
+
t ? q(t)(a) : oe(a);
|
|
136
136
|
};
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
u.dismissAll = (e) => u.dismiss(void 0, e);
|
|
138
|
+
u.remove = (e, t) => {
|
|
139
139
|
let a = { type: 4, toastId: e };
|
|
140
|
-
t ?
|
|
140
|
+
t ? q(t)(a) : oe(a);
|
|
141
141
|
};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
let s =
|
|
142
|
+
u.removeAll = (e) => u.remove(void 0, e);
|
|
143
|
+
u.promise = (e, t, a) => {
|
|
144
|
+
let s = u.loading(t.loading, { ...a, ...a == null ? void 0 : a.loading });
|
|
145
145
|
return typeof e == "function" && (e = e()), e.then((i) => {
|
|
146
|
-
let o = t.success ?
|
|
147
|
-
return o ?
|
|
146
|
+
let o = t.success ? D(t.success, i) : void 0;
|
|
147
|
+
return o ? u.success(o, { id: s, ...a, ...a == null ? void 0 : a.success }) : u.dismiss(s), i;
|
|
148
148
|
}).catch((i) => {
|
|
149
|
-
let o = t.error ?
|
|
150
|
-
o ?
|
|
149
|
+
let o = t.error ? D(t.error, i) : void 0;
|
|
150
|
+
o ? u.error(o, { id: s, ...a, ...a == null ? void 0 : a.error }) : u.dismiss(s);
|
|
151
151
|
}), e;
|
|
152
152
|
};
|
|
153
|
-
var Oe = 1e3,
|
|
154
|
-
let { toasts: a, pausedAt: s } = Ee(e, t), i = Y(/* @__PURE__ */ new Map()).current, o = j((
|
|
155
|
-
if (i.has(
|
|
153
|
+
var Oe = 1e3, De = (e, t = "default") => {
|
|
154
|
+
let { toasts: a, pausedAt: s } = Ee(e, t), i = Y(/* @__PURE__ */ new Map()).current, o = j((d, m = Oe) => {
|
|
155
|
+
if (i.has(d)) return;
|
|
156
156
|
let g = setTimeout(() => {
|
|
157
|
-
i.delete(
|
|
158
|
-
},
|
|
159
|
-
i.set(
|
|
157
|
+
i.delete(d), r({ type: 4, toastId: d });
|
|
158
|
+
}, m);
|
|
159
|
+
i.set(d, g);
|
|
160
160
|
}, []);
|
|
161
161
|
S(() => {
|
|
162
162
|
if (s) return;
|
|
163
|
-
let
|
|
163
|
+
let d = Date.now(), m = a.map((g) => {
|
|
164
164
|
if (g.duration === 1 / 0) return;
|
|
165
|
-
let E = (g.duration || 0) + g.pauseDuration - (
|
|
165
|
+
let E = (g.duration || 0) + g.pauseDuration - (d - g.createdAt);
|
|
166
166
|
if (E < 0) {
|
|
167
|
-
g.visible &&
|
|
167
|
+
g.visible && u.dismiss(g.id);
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
|
-
return setTimeout(() =>
|
|
170
|
+
return setTimeout(() => u.dismiss(g.id, t), E);
|
|
171
171
|
});
|
|
172
172
|
return () => {
|
|
173
|
-
|
|
173
|
+
m.forEach((g) => g && clearTimeout(g));
|
|
174
174
|
};
|
|
175
175
|
}, [a, s, t]);
|
|
176
|
-
let r = j(
|
|
176
|
+
let r = j(q(t), [t]), n = j(() => {
|
|
177
177
|
r({ type: 5, time: Date.now() });
|
|
178
|
-
}, [r]), l = j((
|
|
179
|
-
r({ type: 1, toast: { id:
|
|
180
|
-
}, [r]),
|
|
178
|
+
}, [r]), l = j((d, m) => {
|
|
179
|
+
r({ type: 1, toast: { id: d, height: m } });
|
|
180
|
+
}, [r]), p = j(() => {
|
|
181
181
|
s && r({ type: 6, time: Date.now() });
|
|
182
|
-
}, [s, r]),
|
|
183
|
-
let { reverseOrder: g = !1, gutter: E = 8, defaultPosition: G } =
|
|
184
|
-
return
|
|
182
|
+
}, [s, r]), c = j((d, m) => {
|
|
183
|
+
let { reverseOrder: g = !1, gutter: E = 8, defaultPosition: G } = m || {}, I = a.filter((b) => (b.position || G) === (d.position || G) && b.height), me = I.findIndex((b) => b.id === d.id), U = I.filter((b, P) => P < me && b.visible).length;
|
|
184
|
+
return I.filter((b) => b.visible).slice(...g ? [U + 1] : [0, U]).reduce((b, P) => b + (P.height || 0) + E, 0);
|
|
185
185
|
}, [a]);
|
|
186
186
|
return S(() => {
|
|
187
|
-
a.forEach((
|
|
188
|
-
if (
|
|
187
|
+
a.forEach((d) => {
|
|
188
|
+
if (d.dismissed) o(d.id, d.removeDelay);
|
|
189
189
|
else {
|
|
190
|
-
let
|
|
191
|
-
|
|
190
|
+
let m = i.get(d.id);
|
|
191
|
+
m && (clearTimeout(m), i.delete(d.id));
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
|
-
}, [a, o]), { toasts: a, handlers: { updateHeight: l, startPause: n, endPause:
|
|
195
|
-
},
|
|
194
|
+
}, [a, o]), { toasts: a, handlers: { updateHeight: l, startPause: n, endPause: p, calculateOffset: c } };
|
|
195
|
+
}, Ae = x`
|
|
196
196
|
from {
|
|
197
197
|
transform: scale(0) rotate(45deg);
|
|
198
198
|
opacity: 0;
|
|
@@ -200,7 +200,7 @@ from {
|
|
|
200
200
|
to {
|
|
201
201
|
transform: scale(1) rotate(45deg);
|
|
202
202
|
opacity: 1;
|
|
203
|
-
}`,
|
|
203
|
+
}`, qe = x`
|
|
204
204
|
from {
|
|
205
205
|
transform: scale(0);
|
|
206
206
|
opacity: 0;
|
|
@@ -208,7 +208,7 @@ from {
|
|
|
208
208
|
to {
|
|
209
209
|
transform: scale(1);
|
|
210
210
|
opacity: 1;
|
|
211
|
-
}`,
|
|
211
|
+
}`, Ie = x`
|
|
212
212
|
from {
|
|
213
213
|
transform: scale(0) rotate(90deg);
|
|
214
214
|
opacity: 0;
|
|
@@ -216,7 +216,7 @@ from {
|
|
|
216
216
|
to {
|
|
217
217
|
transform: scale(1) rotate(90deg);
|
|
218
218
|
opacity: 1;
|
|
219
|
-
}`,
|
|
219
|
+
}`, Pe = _("div")`
|
|
220
220
|
width: 20px;
|
|
221
221
|
opacity: 0;
|
|
222
222
|
height: 20px;
|
|
@@ -225,14 +225,14 @@ to {
|
|
|
225
225
|
position: relative;
|
|
226
226
|
transform: rotate(45deg);
|
|
227
227
|
|
|
228
|
-
animation: ${
|
|
228
|
+
animation: ${Ae} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
229
229
|
forwards;
|
|
230
230
|
animation-delay: 100ms;
|
|
231
231
|
|
|
232
232
|
&:after,
|
|
233
233
|
&:before {
|
|
234
234
|
content: '';
|
|
235
|
-
animation: ${
|
|
235
|
+
animation: ${qe} 0.15s ease-out forwards;
|
|
236
236
|
animation-delay: 150ms;
|
|
237
237
|
position: absolute;
|
|
238
238
|
border-radius: 3px;
|
|
@@ -245,7 +245,7 @@ to {
|
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
&:before {
|
|
248
|
-
animation: ${
|
|
248
|
+
animation: ${Ie} 0.15s ease-out forwards;
|
|
249
249
|
animation-delay: 180ms;
|
|
250
250
|
transform: rotate(90deg);
|
|
251
251
|
}
|
|
@@ -256,7 +256,7 @@ to {
|
|
|
256
256
|
to {
|
|
257
257
|
transform: rotate(360deg);
|
|
258
258
|
}
|
|
259
|
-
`,
|
|
259
|
+
`, Ce = _("div")`
|
|
260
260
|
width: 12px;
|
|
261
261
|
height: 12px;
|
|
262
262
|
box-sizing: border-box;
|
|
@@ -340,7 +340,7 @@ to {
|
|
|
340
340
|
forwards;
|
|
341
341
|
`, We = ({ toast: e }) => {
|
|
342
342
|
let { icon: t, type: a, iconTheme: s } = e;
|
|
343
|
-
return t !== void 0 ? typeof t == "string" ? f.createElement(Ue, null, t) : t : a === "blank" ? null : f.createElement(He, null, f.createElement(
|
|
343
|
+
return t !== void 0 ? typeof t == "string" ? f.createElement(Ue, null, t) : t : a === "blank" ? null : f.createElement(He, null, f.createElement(Ce, { ...s }), a !== "loading" && f.createElement(Me, null, a === "error" ? f.createElement(Pe, { ...s }) : f.createElement(Le, { ...s })));
|
|
344
344
|
}, Be = (e) => `
|
|
345
345
|
0% {transform: translate3d(0,${e * -200}%,0) scale(.6); opacity:.5;}
|
|
346
346
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
@@ -370,7 +370,7 @@ to {
|
|
|
370
370
|
let a = e.includes("top") ? 1 : -1, [s, i] = te() ? [Ze, Ke] : [Be(a), Ye(a)];
|
|
371
371
|
return { animation: t ? `${x(s)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${x(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)` };
|
|
372
372
|
}, Xe = f.memo(({ toast: e, position: t, style: a, children: s }) => {
|
|
373
|
-
let i = e.height ? Je(e.position || t || "top-center", e.visible) : { opacity: 0 }, o = f.createElement(We, { toast: e }), r = f.createElement(Ve, { ...e.ariaProps },
|
|
373
|
+
let i = e.height ? Je(e.position || t || "top-center", e.visible) : { opacity: 0 }, o = f.createElement(We, { toast: e }), r = f.createElement(Ve, { ...e.ariaProps }, D(e.message, e));
|
|
374
374
|
return f.createElement(Qe, { className: e.className, style: { ...i, ...a, ...e.style } }, typeof s == "function" ? s({ icon: o, message: r }) : f.createElement(f.Fragment, null, o, r));
|
|
375
375
|
});
|
|
376
376
|
_e(f.createElement);
|
|
@@ -388,16 +388,16 @@ var et = ({ id: e, className: t, style: a, onHeightUpdate: s, children: i }) =>
|
|
|
388
388
|
}, tt = (e, t) => {
|
|
389
389
|
let a = e.includes("top"), s = a ? { top: 0 } : { bottom: 0 }, i = e.includes("center") ? { justifyContent: "center" } : e.includes("right") ? { justifyContent: "flex-end" } : {};
|
|
390
390
|
return { left: 0, right: 0, display: "flex", position: "absolute", transition: te() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)", transform: `translateY(${t * (a ? 1 : -1)}px)`, ...s, ...i };
|
|
391
|
-
}, at =
|
|
391
|
+
}, at = A`
|
|
392
392
|
z-index: 9999;
|
|
393
393
|
> * {
|
|
394
394
|
pointer-events: auto;
|
|
395
395
|
}
|
|
396
396
|
`, T = 16, ie = ({ reverseOrder: e, position: t = "top-center", toastOptions: a, gutter: s, children: i, toasterId: o, containerStyle: r, containerClassName: n }) => {
|
|
397
|
-
let { toasts: l, handlers:
|
|
398
|
-
return f.createElement("div", { "data-rht-toaster": o || "", style: { position: "fixed", zIndex: 9999, top: T, left: T, right: T, bottom: T, pointerEvents: "none", ...r }, className: n, onMouseEnter:
|
|
399
|
-
let
|
|
400
|
-
return f.createElement(et, { id:
|
|
397
|
+
let { toasts: l, handlers: p } = De(a, o);
|
|
398
|
+
return f.createElement("div", { "data-rht-toaster": o || "", style: { position: "fixed", zIndex: 9999, top: T, left: T, right: T, bottom: T, pointerEvents: "none", ...r }, className: n, onMouseEnter: p.startPause, onMouseLeave: p.endPause }, l.map((c) => {
|
|
399
|
+
let d = c.position || t, m = p.calculateOffset(c, { reverseOrder: e, gutter: s, defaultPosition: t }), g = tt(d, m);
|
|
400
|
+
return f.createElement(et, { id: c.id, key: c.id, onHeightUpdate: p.updateHeight, className: c.visible ? at : "", style: g }, c.type === "custom" ? D(c.message, c) : i ? i(c) : f.createElement(Xe, { toast: c, position: d }));
|
|
401
401
|
}));
|
|
402
402
|
};
|
|
403
403
|
const rt = "_root_q0jyz_2", st = "_icon_q0jyz_17", ot = "_progress_q0jyz_40", it = "_snackbar_q0jyz_63", nt = "_growl_q0jyz_71", lt = "_content_q0jyz_79", ct = "_title_q0jyz_91", H = {
|
|
@@ -427,35 +427,54 @@ const rt = "_root_q0jyz_2", st = "_icon_q0jyz_17", ot = "_progress_q0jyz_40", it
|
|
|
427
427
|
showProgressBar: r = !1,
|
|
428
428
|
title: n,
|
|
429
429
|
variant: l = "info",
|
|
430
|
-
...
|
|
431
|
-
},
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
430
|
+
...p
|
|
431
|
+
}, c) => /* @__PURE__ */ k(
|
|
432
|
+
"div",
|
|
433
|
+
{
|
|
434
|
+
className: N("root", `variant-${l}`, t),
|
|
435
|
+
"data-wui-persistent": !0,
|
|
436
|
+
onClick: (d) => d.stopPropagation(),
|
|
437
|
+
ref: c,
|
|
438
|
+
...p,
|
|
439
|
+
children: [
|
|
440
|
+
/* @__PURE__ */ k("div", { className: N("growl"), children: [
|
|
441
|
+
l ? /* @__PURE__ */ y(V, { className: N("icon"), name: pe[l], size: "lg" }) : null,
|
|
442
|
+
/* @__PURE__ */ k("div", { className: N("content"), children: [
|
|
443
|
+
/* @__PURE__ */ k("span", { children: [
|
|
444
|
+
/* @__PURE__ */ y(C, { variant: "body-md-strong", children: n }),
|
|
445
|
+
/* @__PURE__ */ y(C, { variant: "body-md", children: e })
|
|
446
|
+
] }),
|
|
447
|
+
a ? /* @__PURE__ */ y(B, { children: a }) : null
|
|
448
|
+
] }),
|
|
449
|
+
i ? /* @__PURE__ */ y(
|
|
450
|
+
Q,
|
|
451
|
+
{
|
|
452
|
+
className: N("close-button"),
|
|
453
|
+
onClick: (d) => {
|
|
454
|
+
d.preventDefault(), d.stopPropagation(), o == null || o();
|
|
455
|
+
},
|
|
456
|
+
size: "sm"
|
|
457
|
+
}
|
|
458
|
+
) : null
|
|
438
459
|
] }),
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
)
|
|
453
|
-
] })
|
|
460
|
+
/* @__PURE__ */ y(
|
|
461
|
+
"div",
|
|
462
|
+
{
|
|
463
|
+
className: N(r && "progress"),
|
|
464
|
+
style: {
|
|
465
|
+
"--duration": i ? `${s}ms` : "5000ms"
|
|
466
|
+
},
|
|
467
|
+
children: /* @__PURE__ */ y("div", { className: N("progress-bar") })
|
|
468
|
+
}
|
|
469
|
+
)
|
|
470
|
+
]
|
|
471
|
+
}
|
|
472
|
+
)
|
|
454
473
|
);
|
|
455
474
|
ne.displayName = "Toast.Growl";
|
|
456
475
|
const le = J((e, t) => /* @__PURE__ */ y(K, { ref: t, size: "md", variant: "secondary", ...e }));
|
|
457
476
|
le.displayName = "Toast.GrowlAction";
|
|
458
|
-
const
|
|
477
|
+
const z = L(H), ce = Z(
|
|
459
478
|
({
|
|
460
479
|
children: e,
|
|
461
480
|
className: t,
|
|
@@ -466,24 +485,42 @@ const k = L(H), ce = Z(
|
|
|
466
485
|
onClose: r,
|
|
467
486
|
variant: n = "info",
|
|
468
487
|
...l
|
|
469
|
-
},
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
488
|
+
}, p) => /* @__PURE__ */ k(
|
|
489
|
+
"div",
|
|
490
|
+
{
|
|
491
|
+
className: z("root", `variant-${n}`, t),
|
|
492
|
+
"data-wui-persistent": !0,
|
|
493
|
+
onClick: (c) => c.stopPropagation(),
|
|
494
|
+
ref: p,
|
|
495
|
+
...l,
|
|
496
|
+
children: [
|
|
497
|
+
/* @__PURE__ */ k("div", { className: z("snackbar"), children: [
|
|
498
|
+
n ? /* @__PURE__ */ y(V, { className: z("icon"), name: pe[n], size: "lg" }) : null,
|
|
499
|
+
/* @__PURE__ */ y(C, { variant: "body-md-strong", children: e }),
|
|
500
|
+
a ? /* @__PURE__ */ y(B, { children: a }) : null,
|
|
501
|
+
i ? /* @__PURE__ */ y(
|
|
502
|
+
Q,
|
|
503
|
+
{
|
|
504
|
+
onClick: (c) => {
|
|
505
|
+
c.preventDefault(), c.stopPropagation(), r == null || r();
|
|
506
|
+
},
|
|
507
|
+
size: "sm"
|
|
508
|
+
}
|
|
509
|
+
) : null
|
|
510
|
+
] }),
|
|
511
|
+
/* @__PURE__ */ y(
|
|
512
|
+
"div",
|
|
513
|
+
{
|
|
514
|
+
className: z("progress", o && "hide-progress-bar"),
|
|
515
|
+
style: {
|
|
516
|
+
"--duration": i ? `${s}ms` : "5000ms"
|
|
517
|
+
},
|
|
518
|
+
children: /* @__PURE__ */ y("div", { className: z("progress-bar") })
|
|
519
|
+
}
|
|
520
|
+
)
|
|
521
|
+
]
|
|
522
|
+
}
|
|
523
|
+
)
|
|
487
524
|
);
|
|
488
525
|
ce.displayName = "Toast.Snackbar";
|
|
489
526
|
const de = J((e, t) => /* @__PURE__ */ y(K, { ref: t, size: "md", variant: "secondary", ...e }));
|
|
@@ -498,11 +535,11 @@ const dt = L(H), pe = {
|
|
|
498
535
|
info: 7e3,
|
|
499
536
|
success: 7e3,
|
|
500
537
|
warning: 8e3
|
|
501
|
-
},
|
|
502
|
-
|
|
538
|
+
}, ue = ({ children: e, className: t, ...a }) => /* @__PURE__ */ y("p", { className: dt("title", t), ...a, children: e });
|
|
539
|
+
ue.displayName = "Toast.Title";
|
|
503
540
|
const xt = (e, t) => {
|
|
504
541
|
const s = ("type" in e ? e.type.displayName || e.type.name : void 0) === "Growl" ? "top-right" : "bottom-center", i = () => {
|
|
505
|
-
t.onClose && t.onClose(),
|
|
542
|
+
t != null && t.onClose && t.onClose(), u.dismiss(t == null ? void 0 : t.id);
|
|
506
543
|
}, o = e.props.variant || "info", r = {
|
|
507
544
|
duration: pt[o],
|
|
508
545
|
position: s,
|
|
@@ -514,7 +551,7 @@ const xt = (e, t) => {
|
|
|
514
551
|
},
|
|
515
552
|
...t
|
|
516
553
|
};
|
|
517
|
-
return
|
|
554
|
+
return u(
|
|
518
555
|
ge(e, { duration: r.duration, onClose: i }),
|
|
519
556
|
r
|
|
520
557
|
);
|
|
@@ -525,7 +562,7 @@ const wt = Object.assign(ie, {
|
|
|
525
562
|
GrowlAction: le,
|
|
526
563
|
Snackbar: ce,
|
|
527
564
|
SnackbarAction: de,
|
|
528
|
-
Title:
|
|
565
|
+
Title: ue
|
|
529
566
|
});
|
|
530
567
|
export {
|
|
531
568
|
pe as ICON,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const arrows: readonly ["angle-left-b", "angle-right-b", "angle-up", "angle-down", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "left-arrow-to-left", "arrow-to-right", "top-arrow-to-top", "arrow-to-bottom", "angle-double-left", "angle-double-right", "angle-left", "angle-right"];
|
|
2
|
-
export declare const actions: readonly ["asterisk", "info-circle", "chart-line", "plus", "chart-line", "archive-alt", "arrows-merge-v", "arrows-shrink-v", "apps", "user-check", "user-plus", "user-times", "check", "times", "trash", "import", "upload", "draggable-dots", "copy", "pen", "left-arrow-from-left", "arrow-from-right", "resize-handle", "arrow-resize-diagonal", "external-link-alt", "heart-solid", "heart", "filter", "eye", "eye-slash", "link", "sign-out-alt", "bars", "ellipsis-v", "ellipsis-h", "move-arrow", "bell", "print", "bolt-alt", "redo", "save", "search", "setting", "share-alt", "share"];
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const actions: readonly ["asterisk", "info-circle", "chart-line", "plus", "chart-line", "archive-alt", "arrows-merge-v", "arrows-shrink-v", "apps", "edit", "user-check", "user-plus", "user-times", "check", "times", "trash", "import", "upload", "draggable-dots", "copy", "pen", "left-arrow-from-left", "arrow-from-right", "resize-handle", "arrow-resize-diagonal", "external-link-alt", "heart-solid", "heart", "filter", "eye", "eye-slash", "link", "sign-out-alt", "bars", "ellipsis-v", "ellipsis-h", "move-arrow", "bell", "print", "bolt-alt", "redo", "save", "search", "setting", "share-alt", "share"];
|
|
3
|
+
export declare const chat: string[];
|
|
4
|
+
export declare const miscellaneous: readonly ["music", "rocket", "file-alt", "user-square", "book-reader", "file-question-alt", "sad-solid", "smile-beam-solid", "sad", "smile-beam", "sign-right", "exclamation-triangle", "exclamation-circle", "exclamation-octagon", "chart-pie", "paperclip", "chart-bar", "fire", "user-check", "apps", "trophy", "bookmark-solid", "bookmark", "clock", "comment-alt-lines", "file-edit-alt", "illustration", "calendar", "users-alt", "globe", "graduation-cap", "envelope", "equal-circle", "minus", "venus", "mars", "estate", "info-circle", "columns", "english-to-chinese", "bag-alt", "chart-line", "map-marker-alt", "lock-alt", "flag", "at", "user", "user-circle", "clipboard-check", "building", "compass", "phone", "pin", "microphone", "user-search", "house-user", "star-solid", "star", "coins", "euro-circle", "file-search-alt", "question-circle", "gift", "birthday-cake", "bunting-flags", "tag-alt", "tablet", "mobile", "video", "plus-circle", "pen", "check-circle", "certified", "plug"];
|
|
4
5
|
export declare const player: readonly ["play", "stop-circle-solid", "pause-circle-solid", "previous", "step-forward", "expand-arrows-alt", "compress-arrows", "screen-share", "stop-screen-share", "microphone", "microphone-slash", "cast", "cast-connected", "cast-unavailable", "video", "video-slash", "airplay", "history", "playlist", "volume-up", "volume-mute", "closed-captioning"];
|
|
5
6
|
export declare const wtf: readonly ["package", "basketball", "book-alt", "lightbulb-alt", "life-ring", "calculator-alt", "camera", "shopping-cart", "clipboard-notes", "coffee", "ruler", "desktop", "hard-hat", "credit-card", "moon-solid", "moon", "crosshair", "crown", "restaurant", "diamond", "industry", "fingerprint", "flag", "flag-solid", "setting", "handshake", "hashtag", "headphones", "heart", "estate", "balance-scale", "key-skeleton", "leaf", "map", "masonry", "masonry-plus", "megaphone", "microphone", "processor", "euro-circle", "mountains", "pen", "images", "chart-pie-alt", "pizza-slice", "puzzle-piece-solid", "puzzle-piece", "shield", "wrench", "sparkles", "server", "sun", "hunting", "thumbs-up", "thumbs-down", "trees", "sofa", "exit", "redo", "play", "ban"];
|
|
6
7
|
export declare const foldersAndFiles: readonly ["folder", "folder-open", "folder-full", "file", "image"];
|
|
@@ -8,4 +9,4 @@ export declare const markdown: readonly ["bold", "arrow", "brackets-curly", "ita
|
|
|
8
9
|
export declare const brands: readonly ["behance", "dribbble", "facebook", "github", "google", "instagram", "linkedin", "npm", "pinterest", "slack", "stackoverflow", "tiktok", "twitch", "x", "xing", "youtube", "zapier"];
|
|
9
10
|
export declare const welcome: readonly ["symbol", "wttj"];
|
|
10
11
|
export declare const flags: readonly ["flag-fr", "flag-en", "flag-us"];
|
|
11
|
-
export declare const icons: readonly ["asterisk", "info-circle", "chart-line", "plus", "chart-line", "archive-alt", "arrows-merge-v", "arrows-shrink-v", "apps", "user-check", "user-plus", "user-times", "check", "times", "trash", "import", "upload", "draggable-dots", "copy", "pen", "left-arrow-from-left", "arrow-from-right", "resize-handle", "arrow-resize-diagonal", "external-link-alt", "heart-solid", "heart", "filter", "eye", "eye-slash", "link", "sign-out-alt", "bars", "ellipsis-v", "ellipsis-h", "move-arrow", "bell", "print", "bolt-alt", "redo", "save", "search", "setting", "share-alt", "share", "angle-left-b", "angle-right-b", "angle-up", "angle-down", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "left-arrow-to-left", "arrow-to-right", "top-arrow-to-top", "arrow-to-bottom", "angle-double-left", "angle-double-right", "angle-left", "angle-right", "behance", "dribbble", "facebook", "github", "google", "instagram", "linkedin", "npm", "pinterest", "slack", "stackoverflow", "tiktok", "twitch", "x", "xing", "youtube", "zapier", "folder", "folder-open", "folder-full", "file", "image", "flag-fr", "flag-en", "flag-us", "bold", "arrow", "brackets-curly", "italic", "list-ol-alt", "list-ul", "quote", "text-strike-through", "heading", "heading-1", "heading-2", "heading-3", "heading-4", "heading-5", "heading-6", "font", "underline", "music", "
|
|
12
|
+
export declare const icons: readonly ["asterisk", "info-circle", "chart-line", "plus", "chart-line", "archive-alt", "arrows-merge-v", "arrows-shrink-v", "apps", "edit", "user-check", "user-plus", "user-times", "check", "times", "trash", "import", "upload", "draggable-dots", "copy", "pen", "left-arrow-from-left", "arrow-from-right", "resize-handle", "arrow-resize-diagonal", "external-link-alt", "heart-solid", "heart", "filter", "eye", "eye-slash", "link", "sign-out-alt", "bars", "ellipsis-v", "ellipsis-h", "move-arrow", "bell", "print", "bolt-alt", "redo", "save", "search", "setting", "share-alt", "share", "angle-left-b", "angle-right-b", "angle-up", "angle-down", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "left-arrow-to-left", "arrow-to-right", "top-arrow-to-top", "arrow-to-bottom", "angle-double-left", "angle-double-right", "angle-left", "angle-right", "behance", "dribbble", "facebook", "github", "google", "instagram", "linkedin", "npm", "pinterest", "slack", "stackoverflow", "tiktok", "twitch", "x", "xing", "youtube", "zapier", ...string[], "folder", "folder-open", "folder-full", "file", "image", "flag-fr", "flag-en", "flag-us", "bold", "arrow", "brackets-curly", "italic", "list-ol-alt", "list-ul", "quote", "text-strike-through", "heading", "heading-1", "heading-2", "heading-3", "heading-4", "heading-5", "heading-6", "font", "underline", "music", "rocket", "file-alt", "user-square", "book-reader", "file-question-alt", "sad-solid", "smile-beam-solid", "sad", "smile-beam", "sign-right", "exclamation-triangle", "exclamation-circle", "exclamation-octagon", "chart-pie", "paperclip", "chart-bar", "fire", "user-check", "apps", "trophy", "bookmark-solid", "bookmark", "clock", "comment-alt-lines", "file-edit-alt", "illustration", "calendar", "users-alt", "globe", "graduation-cap", "envelope", "equal-circle", "minus", "venus", "mars", "estate", "info-circle", "columns", "english-to-chinese", "bag-alt", "chart-line", "map-marker-alt", "lock-alt", "flag", "at", "user", "user-circle", "clipboard-check", "building", "compass", "phone", "pin", "microphone", "user-search", "house-user", "star-solid", "star", "coins", "euro-circle", "file-search-alt", "question-circle", "gift", "birthday-cake", "bunting-flags", "tag-alt", "tablet", "mobile", "video", "plus-circle", "pen", "check-circle", "certified", "plug", "play", "stop-circle-solid", "pause-circle-solid", "previous", "step-forward", "expand-arrows-alt", "compress-arrows", "screen-share", "stop-screen-share", "microphone", "microphone-slash", "cast", "cast-connected", "cast-unavailable", "video", "video-slash", "airplay", "history", "playlist", "volume-up", "volume-mute", "closed-captioning", "symbol", "wttj", "package", "basketball", "book-alt", "lightbulb-alt", "life-ring", "calculator-alt", "camera", "shopping-cart", "clipboard-notes", "coffee", "ruler", "desktop", "hard-hat", "credit-card", "moon-solid", "moon", "crosshair", "crown", "restaurant", "diamond", "industry", "fingerprint", "flag", "flag-solid", "setting", "handshake", "hashtag", "headphones", "heart", "estate", "balance-scale", "key-skeleton", "leaf", "map", "masonry", "masonry-plus", "megaphone", "microphone", "processor", "euro-circle", "mountains", "pen", "images", "chart-pie-alt", "pizza-slice", "puzzle-piece-solid", "puzzle-piece", "shield", "wrench", "sparkles", "server", "sun", "hunting", "thumbs-up", "thumbs-down", "trees", "sofa", "exit", "redo", "play", "ban"];
|