@zeturn/watercolor-react 1.2.1 → 1.2.3
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/ThemeReact.d.ts +9 -1
- package/dist/ThemeReact.d.ts.map +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -2
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/SlideOver/SlideOver.d.ts +1 -2
- package/dist/components/SlideOver/SlideOver.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/interactions.d.ts +27 -0
- package/dist/interactions.d.ts.map +1 -0
- package/dist/watercolor-react.css +1 -1
- package/dist/watercolor-react.es.js +1082 -881
- package/index.d.ts +9 -0
- package/package.json +9 -9
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import e, { Suspense as t, createContext as n, lazy as r, useCallback as i, useContext as a, useEffect as o, useId as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
2
2
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import { THEME_CONFIG_VERSION as
|
|
3
|
+
import { createPortal as h } from "react-dom";
|
|
4
|
+
import { THEME_CONFIG_VERSION as g, THEME_MODES as _, THEME_STORAGE_KEY as v, applyFloatingPosition as y, applyThemeConfig as b, applyThemeConfig as x, createOverlayLayer as S, createThemeController as C, createThemeController as w, createThemeInitScript as T, loadThemeConfig as E, resetThemeConfig as D, resetThemeConfig as O, resolveThemeMode as k, serializeThemeConfig as A, validateThemeConfig as j } from "@zeturn/watercolor-core";
|
|
5
5
|
//#region \0rolldown/runtime.js
|
|
6
|
-
var
|
|
7
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
6
|
+
var M = Object.create, N = Object.defineProperty, P = Object.getOwnPropertyDescriptor, F = Object.getOwnPropertyNames, I = Object.getPrototypeOf, L = Object.prototype.hasOwnProperty, R = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), z = (e, t, n, r) => {
|
|
7
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = F(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !L.call(e, s) && s !== n && N(e, s, {
|
|
8
8
|
get: ((e) => t[e]).bind(null, s),
|
|
9
|
-
enumerable: !(r =
|
|
9
|
+
enumerable: !(r = P(t, s)) || r.enumerable
|
|
10
10
|
});
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
12
|
+
}, B = (e, t, n) => (n = e == null ? {} : M(I(e)), z(t || !e || !e.__esModule ? N(n, "default", {
|
|
13
13
|
value: e,
|
|
14
14
|
enumerable: !0
|
|
15
|
-
}) : n, e)),
|
|
15
|
+
}) : n, e)), V = [
|
|
16
16
|
"default",
|
|
17
17
|
"bordered",
|
|
18
18
|
"filled"
|
|
19
19
|
];
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function H(e = "default") {
|
|
21
|
+
return V.includes(e) ? e : "default";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function U(e) {
|
|
24
24
|
return e ? typeof e == "string" ? e : Array.isArray(e) ? e.filter(Boolean).join(" ") : typeof e == "object" ? Object.entries(e).filter(([, e]) => e).map(([e]) => e).join(" ") : "" : "";
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
let n =
|
|
26
|
+
function W(e = "default", t = "") {
|
|
27
|
+
let n = H(e), r = U(t);
|
|
28
28
|
return [
|
|
29
29
|
"wc-accordion",
|
|
30
30
|
n === "default" ? "" : `wc-accordion--${n}`,
|
|
31
31
|
r
|
|
32
32
|
].filter(Boolean).join(" ");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ee(e = [], t, n = !1) {
|
|
35
35
|
return n ? e.includes(t) ? e.filter((e) => e !== t) : [...e, t] : e.includes(t) ? [] : [t];
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/components/Accordion/Accordion.jsx
|
|
39
|
-
var
|
|
40
|
-
let l = s(), [u, f] = d([]), h =
|
|
39
|
+
var te = ({ items: e = [], multiple: t = !1, variant: n = "default", onToggle: r, className: i = "", style: a = {}, "aria-label": o, ...c }) => {
|
|
40
|
+
let l = s(), [u, f] = d([]), h = W(n, i), g = (n) => {
|
|
41
41
|
if (e[n]?.disabled) return;
|
|
42
|
-
let i =
|
|
42
|
+
let i = ee(u, n, t);
|
|
43
43
|
f(i), r?.(n, i.includes(n));
|
|
44
44
|
}, _ = (e) => u.includes(e);
|
|
45
45
|
return /* @__PURE__ */ p("div", {
|
|
@@ -84,10 +84,10 @@ var U = ({ items: e = [], multiple: t = !1, variant: n = "default", onToggle: r,
|
|
|
84
84
|
}, t))
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
|
-
|
|
87
|
+
te.displayName = "Accordion";
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region ../core/src/components/Alert/utils.jsx
|
|
90
|
-
function
|
|
90
|
+
function ne(e, t) {
|
|
91
91
|
return [
|
|
92
92
|
"wc-alert",
|
|
93
93
|
`wc-alert--${e}`,
|
|
@@ -96,7 +96,7 @@ function W(e, t) {
|
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/components/Alert/Alert.jsx
|
|
99
|
-
var
|
|
99
|
+
var re = ({ type: e }) => {
|
|
100
100
|
let t = e === "success" ? /* @__PURE__ */ p("path", { d: "m6.8 10.1 2.1 2.1 4.4-4.6" }) : e === "info" ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("path", { d: "M10 9v4" }), /* @__PURE__ */ p("path", { d: "M10 6.5h.01" })] }) : e === "warning" ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("path", { d: "M10 6.5v4.2" }), /* @__PURE__ */ p("path", { d: "M10 13.5h.01" })] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("path", { d: "m7.5 7.5 5 5" }), /* @__PURE__ */ p("path", { d: "m12.5 7.5-5 5" })] });
|
|
101
101
|
return /* @__PURE__ */ m("svg", {
|
|
102
102
|
viewBox: "0 0 20 20",
|
|
@@ -113,19 +113,19 @@ var ee = ({ type: e }) => {
|
|
|
113
113
|
}), t]
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
|
-
function
|
|
116
|
+
function ie({ type: e = "info", variant: t = "standard", title: n = "", closable: r = !1, showIcon: i = !0, className: a = "", children: o, onClose: s = () => {} }) {
|
|
117
117
|
let [c, l] = d(!0);
|
|
118
118
|
if (!c) return null;
|
|
119
119
|
let u = () => {
|
|
120
120
|
l(!1), s();
|
|
121
121
|
};
|
|
122
122
|
return /* @__PURE__ */ m("div", {
|
|
123
|
-
className: [...
|
|
123
|
+
className: [...ne(e, t), a].filter(Boolean).join(" "),
|
|
124
124
|
role: "alert",
|
|
125
125
|
children: [
|
|
126
126
|
i && /* @__PURE__ */ p("div", {
|
|
127
127
|
className: "wc-alert-icon",
|
|
128
|
-
children: /* @__PURE__ */ p(
|
|
128
|
+
children: /* @__PURE__ */ p(re, { type: e })
|
|
129
129
|
}),
|
|
130
130
|
/* @__PURE__ */ m("div", {
|
|
131
131
|
className: "wc-alert-content",
|
|
@@ -157,67 +157,148 @@ function te({ type: e = "info", variant: t = "standard", title: n = "", closable
|
|
|
157
157
|
}
|
|
158
158
|
//#endregion
|
|
159
159
|
//#region src/components/AppBar/AppBar.jsx
|
|
160
|
-
var
|
|
160
|
+
var G = ({ children: e, position: t = "fixed", color: n = "default", elevation: r = 0, variant: i = "elevation", className: a = "", style: o = {}, ...s }) => /* @__PURE__ */ p("div", {
|
|
161
161
|
className: `wc-appbar wc-appbar--${t} wc-appbar--${n} wc-appbar--elevation-${r} wc-appbar--${i} ${a}`,
|
|
162
162
|
style: o,
|
|
163
163
|
...s,
|
|
164
164
|
children: e
|
|
165
|
-
}),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
}), K = typeof document > "u" ? o : c;
|
|
166
|
+
function q({ children: e, target: t }) {
|
|
167
|
+
return typeof document > "u" ? null : h(e, (typeof t == "string" ? document.querySelector(t) : t) || document.body);
|
|
168
|
+
}
|
|
169
|
+
function ae({ open: e, elementRef: t, refs: n = [], modal: r = !1, lockScroll: i = !1, restoreFocus: a = !0, initialFocus: s = !1, closeOnEscape: c = !0, closeOnPointerDownOutside: l = !0, onEscapeKeyDown: d, onPointerDownOutside: f, zIndex: p }) {
|
|
170
|
+
let m = u(null);
|
|
171
|
+
return o(() => {
|
|
172
|
+
if (!(!e || !t.current || typeof document > "u")) return m.current = S({
|
|
173
|
+
element: t.current,
|
|
174
|
+
refs: n.map((e) => e?.current || e).filter(Boolean),
|
|
175
|
+
modal: r,
|
|
176
|
+
lockScroll: i,
|
|
177
|
+
restoreFocus: a,
|
|
178
|
+
initialFocus: s,
|
|
179
|
+
closeOnEscape: c,
|
|
180
|
+
closeOnPointerDownOutside: l,
|
|
181
|
+
onEscapeKeyDown: d,
|
|
182
|
+
onPointerDownOutside: f,
|
|
183
|
+
zIndex: p
|
|
184
|
+
}), () => {
|
|
185
|
+
m.current?.destroy(), m.current = null;
|
|
186
|
+
};
|
|
187
|
+
}, [
|
|
188
|
+
e,
|
|
189
|
+
t,
|
|
190
|
+
r,
|
|
191
|
+
i,
|
|
192
|
+
a,
|
|
193
|
+
s,
|
|
194
|
+
c,
|
|
195
|
+
l,
|
|
196
|
+
d,
|
|
197
|
+
f,
|
|
198
|
+
p
|
|
199
|
+
]), o(() => {
|
|
200
|
+
m.current?.update({
|
|
201
|
+
refs: n.map((e) => e?.current || e).filter(Boolean),
|
|
202
|
+
closeOnEscape: c,
|
|
203
|
+
closeOnPointerDownOutside: l,
|
|
204
|
+
onEscapeKeyDown: d,
|
|
205
|
+
onPointerDownOutside: f
|
|
206
|
+
});
|
|
207
|
+
}, [
|
|
208
|
+
n,
|
|
209
|
+
c,
|
|
210
|
+
l,
|
|
211
|
+
d,
|
|
212
|
+
f
|
|
213
|
+
]), m;
|
|
214
|
+
}
|
|
215
|
+
function J({ open: e, anchorRef: t, floatingRef: n, placement: r = "bottom", offset: i = 8, boundaryPadding: a = 8 }) {
|
|
216
|
+
let [o, s] = d(r);
|
|
217
|
+
return K(() => {
|
|
218
|
+
if (!e || !t.current || !n.current || typeof window > "u") return;
|
|
219
|
+
let o = () => {
|
|
220
|
+
s(y(t.current, n.current, {
|
|
221
|
+
placement: r,
|
|
222
|
+
offset: i,
|
|
223
|
+
boundaryPadding: a
|
|
224
|
+
}).placement);
|
|
172
225
|
};
|
|
173
|
-
return
|
|
174
|
-
|
|
226
|
+
return o(), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
|
|
227
|
+
window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0);
|
|
175
228
|
};
|
|
176
|
-
}, [
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
229
|
+
}, [
|
|
230
|
+
e,
|
|
231
|
+
t,
|
|
232
|
+
n,
|
|
233
|
+
r,
|
|
234
|
+
i,
|
|
235
|
+
a
|
|
236
|
+
]), o;
|
|
237
|
+
}
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region src/components/Autocomplete/Autocomplete.jsx
|
|
240
|
+
var Y = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Type to search...", label: i = "", helperText: a = "", error: c = !1, errorMessage: l = "", required: f = !1, disabled: h = !1, readonly: g = !1, multiple: _ = !1, freeSolo: v = !1, clearable: y = !0, fullWidth: b = !1, size: x = "md", variant: S = "filled", minSearchLength: C = 0, noOptionsText: w = "No options found", name: T = "", id: E = "", className: D = "", style: O = {}, onFocus: k, onBlur: A, onInputChange: j, filterOptions: M, renderOption: N, renderInput: P, getOptionLabel: F, getOptionValue: I, ...L }) => {
|
|
241
|
+
let [R, z] = d(!1), [B, V] = d(""), [H, U] = d(-1), W = u(null), ee = u(null), te = u(null), ne = (e) => e ? typeof e == "object" ? e.label || e.value || "" : String(e) : "", re = (e) => e ? typeof e == "object" ? e.value === void 0 ? e : e.value : e : null, ie = F || ne, G = I || re;
|
|
242
|
+
o(() => {
|
|
243
|
+
!_ && e ? V(ie(e)) : e || V("");
|
|
244
|
+
}, [e, _]);
|
|
245
|
+
let K = () => {
|
|
246
|
+
z(!1), U(-1);
|
|
247
|
+
};
|
|
248
|
+
ae({
|
|
249
|
+
open: R,
|
|
250
|
+
elementRef: te,
|
|
251
|
+
refs: [W],
|
|
252
|
+
closeOnEscape: !0,
|
|
253
|
+
closeOnPointerDownOutside: !0,
|
|
254
|
+
onEscapeKeyDown: K,
|
|
255
|
+
onPointerDownOutside: K,
|
|
256
|
+
zIndex: 1e3
|
|
257
|
+
});
|
|
258
|
+
let q = M ? M(n, B) : ((e, t) => !t || t.length < C ? e : e.filter((e) => ie(e).toLowerCase().includes(t.toLowerCase())))(n, B), J = (t) => {
|
|
259
|
+
let n = G(t);
|
|
260
|
+
return _ && Array.isArray(e) ? e.some((e) => G(e) === n) : G(e) === n;
|
|
180
261
|
}, Y = () => {
|
|
181
262
|
let e = ["wc-autocomplete"];
|
|
182
263
|
return b && e.push("wc-autocomplete--full-width"), e.concat(D).filter(Boolean).join(" ");
|
|
183
|
-
},
|
|
264
|
+
}, oe = () => {
|
|
184
265
|
let e = ["wc-autocomplete__label"];
|
|
185
266
|
return e.push(`wc-autocomplete__label--${x}`), c && e.push("wc-autocomplete__label--error"), e.join(" ");
|
|
186
|
-
},
|
|
267
|
+
}, se = () => {
|
|
187
268
|
let e = ["wc-autocomplete__container"];
|
|
188
269
|
return e.push(`wc-autocomplete__container--${S}`), e.push(`wc-autocomplete__container--${x}`), h && e.push("wc-autocomplete__container--disabled"), c && e.push("wc-autocomplete__container--error"), R && e.push("wc-autocomplete__container--open"), e.join(" ");
|
|
189
|
-
},
|
|
270
|
+
}, ce = (e, t) => {
|
|
190
271
|
let n = ["wc-autocomplete__option"];
|
|
191
272
|
return J(e) && n.push("wc-autocomplete__option--selected"), t === H && n.push("wc-autocomplete__option--highlighted"), e.disabled && n.push("wc-autocomplete__option--disabled"), n.join(" ");
|
|
192
|
-
},
|
|
273
|
+
}, le = (e) => {
|
|
193
274
|
z(!0), k?.(e);
|
|
194
|
-
},
|
|
275
|
+
}, ue = (e) => {
|
|
195
276
|
setTimeout(() => {
|
|
196
277
|
z(!1), A?.(e);
|
|
197
278
|
}, 200);
|
|
198
|
-
},
|
|
279
|
+
}, de = (e) => {
|
|
199
280
|
let n = e.target.value;
|
|
200
281
|
V(n), z(!0), U(-1), j?.(n), v && t?.({ target: {
|
|
201
282
|
name: T,
|
|
202
283
|
value: n
|
|
203
284
|
} });
|
|
204
|
-
},
|
|
205
|
-
e.stopPropagation(), V(""),
|
|
285
|
+
}, fe = (e) => {
|
|
286
|
+
e.stopPropagation(), V(""), K(), t?.({ target: {
|
|
206
287
|
name: T,
|
|
207
288
|
value: _ ? [] : null
|
|
208
289
|
} });
|
|
209
|
-
},
|
|
290
|
+
}, pe = (n) => {
|
|
210
291
|
if (n.disabled) return;
|
|
211
|
-
let r =
|
|
292
|
+
let r = G(n), i;
|
|
212
293
|
if (_) {
|
|
213
|
-
let t = Array.isArray(e) ? [...e] : [], a = t.findIndex((e) =>
|
|
294
|
+
let t = Array.isArray(e) ? [...e] : [], a = t.findIndex((e) => G(e) === r);
|
|
214
295
|
a > -1 ? t.splice(a, 1) : t.push(n), i = t, V("");
|
|
215
|
-
} else i = n, V(
|
|
296
|
+
} else i = n, V(ie(n)), K();
|
|
216
297
|
U(-1), t?.({ target: {
|
|
217
298
|
name: T,
|
|
218
299
|
value: i
|
|
219
300
|
} });
|
|
220
|
-
},
|
|
301
|
+
}, me = (e) => {
|
|
221
302
|
if (!R && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
|
|
222
303
|
z(!0), e.preventDefault();
|
|
223
304
|
return;
|
|
@@ -230,14 +311,14 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
230
311
|
e.preventDefault(), U((e) => Math.max(e - 1, 0));
|
|
231
312
|
break;
|
|
232
313
|
case "Enter":
|
|
233
|
-
e.preventDefault(), H >= 0 && H < q.length &&
|
|
314
|
+
e.preventDefault(), H >= 0 && H < q.length && pe(q[H]);
|
|
234
315
|
break;
|
|
235
316
|
case "Escape":
|
|
236
|
-
|
|
317
|
+
K(), ee.current?.blur();
|
|
237
318
|
break;
|
|
238
319
|
default: break;
|
|
239
320
|
}
|
|
240
|
-
},
|
|
321
|
+
}, he = s(), X = E || T || he;
|
|
241
322
|
return /* @__PURE__ */ m("div", {
|
|
242
323
|
className: Y(),
|
|
243
324
|
ref: W,
|
|
@@ -245,21 +326,21 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
245
326
|
children: [
|
|
246
327
|
i && /* @__PURE__ */ m("label", {
|
|
247
328
|
htmlFor: X,
|
|
248
|
-
className:
|
|
329
|
+
className: oe(),
|
|
249
330
|
children: [i, f && /* @__PURE__ */ p("span", {
|
|
250
331
|
className: "wc-autocomplete__required",
|
|
251
332
|
children: "*"
|
|
252
333
|
})]
|
|
253
334
|
}),
|
|
254
335
|
/* @__PURE__ */ m("div", {
|
|
255
|
-
className:
|
|
336
|
+
className: se(),
|
|
256
337
|
children: [P ? P({
|
|
257
338
|
id: X,
|
|
258
339
|
value: B,
|
|
259
|
-
onChange:
|
|
260
|
-
onFocus:
|
|
261
|
-
onBlur:
|
|
262
|
-
onKeyDown:
|
|
340
|
+
onChange: de,
|
|
341
|
+
onFocus: le,
|
|
342
|
+
onBlur: ue,
|
|
343
|
+
onKeyDown: me,
|
|
263
344
|
placeholder: r,
|
|
264
345
|
disabled: h,
|
|
265
346
|
readonly: g,
|
|
@@ -276,10 +357,10 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
276
357
|
className: "wc-autocomplete__input",
|
|
277
358
|
placeholder: r,
|
|
278
359
|
value: B,
|
|
279
|
-
onChange:
|
|
280
|
-
onFocus:
|
|
281
|
-
onBlur:
|
|
282
|
-
onKeyDown:
|
|
360
|
+
onChange: de,
|
|
361
|
+
onFocus: le,
|
|
362
|
+
onBlur: ue,
|
|
363
|
+
onKeyDown: me,
|
|
283
364
|
disabled: h,
|
|
284
365
|
readOnly: g,
|
|
285
366
|
autoComplete: "off",
|
|
@@ -293,7 +374,7 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
293
374
|
children: [y && B && /* @__PURE__ */ p("button", {
|
|
294
375
|
type: "button",
|
|
295
376
|
className: "wc-autocomplete__clear",
|
|
296
|
-
onClick:
|
|
377
|
+
onClick: fe,
|
|
297
378
|
tabIndex: -1,
|
|
298
379
|
children: /* @__PURE__ */ m("svg", {
|
|
299
380
|
viewBox: "0 0 24 24",
|
|
@@ -333,6 +414,7 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
333
414
|
})]
|
|
334
415
|
}),
|
|
335
416
|
R && B.length >= C && /* @__PURE__ */ p("div", {
|
|
417
|
+
ref: te,
|
|
336
418
|
className: "wc-autocomplete__dropdown",
|
|
337
419
|
id: `${X}-options`,
|
|
338
420
|
role: "listbox",
|
|
@@ -343,14 +425,14 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
343
425
|
className: "wc-autocomplete__options",
|
|
344
426
|
children: q.map((e, t) => /* @__PURE__ */ m("div", {
|
|
345
427
|
id: `${X}-option-${t}`,
|
|
346
|
-
className:
|
|
428
|
+
className: ce(e, t),
|
|
347
429
|
role: "option",
|
|
348
430
|
"aria-selected": J(e),
|
|
349
|
-
onClick: () =>
|
|
431
|
+
onClick: () => pe(e),
|
|
350
432
|
onMouseEnter: () => U(t),
|
|
351
433
|
children: [N ? N(e, { selected: J(e) }) : /* @__PURE__ */ p("span", {
|
|
352
434
|
className: "wc-autocomplete__option-text",
|
|
353
|
-
children:
|
|
435
|
+
children: ie(e)
|
|
354
436
|
}), J(e) && /* @__PURE__ */ p("svg", {
|
|
355
437
|
className: "wc-autocomplete__option-check",
|
|
356
438
|
viewBox: "0 0 24 24",
|
|
@@ -359,7 +441,7 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
359
441
|
strokeWidth: "2",
|
|
360
442
|
children: /* @__PURE__ */ p("polyline", { points: "20,6 9,17 4,12" })
|
|
361
443
|
})]
|
|
362
|
-
},
|
|
444
|
+
}, G(e) || t))
|
|
363
445
|
})
|
|
364
446
|
}),
|
|
365
447
|
(c || a) && /* @__PURE__ */ p("div", { children: c ? /* @__PURE__ */ p("p", {
|
|
@@ -372,40 +454,40 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
372
454
|
]
|
|
373
455
|
});
|
|
374
456
|
};
|
|
375
|
-
|
|
457
|
+
Y.displayName = "Autocomplete";
|
|
376
458
|
//#endregion
|
|
377
459
|
//#region ../core/src/components/Avatar/utils.jsx
|
|
378
|
-
function
|
|
460
|
+
function oe({ size: e, variant: t, color: n, src: r, imgError: i }) {
|
|
379
461
|
let a = ["wc-avatar"];
|
|
380
462
|
return typeof e == "string" && a.push(`wc-avatar--${e}`), a.push(`wc-avatar--${t}`), (!r || i) && a.push(`wc-avatar--${n}`), a;
|
|
381
463
|
}
|
|
382
|
-
function
|
|
464
|
+
function se(e) {
|
|
383
465
|
let t = {};
|
|
384
466
|
return typeof e == "number" && (t.width = `${e}px`, t.height = `${e}px`, t.fontSize = `${e * .4}px`), t;
|
|
385
467
|
}
|
|
386
|
-
function
|
|
468
|
+
function ce(e) {
|
|
387
469
|
if (!e) return "";
|
|
388
470
|
let t = e.trim(), n = t.charAt(0);
|
|
389
471
|
if (/[\u4e00-\u9fa5]/.test(n)) return n;
|
|
390
472
|
let r = t.split(/\s+/).filter(Boolean);
|
|
391
473
|
return r.length === 1 ? r[0].charAt(0).toUpperCase() : (r[0].charAt(0) + r[1].charAt(0)).toUpperCase();
|
|
392
474
|
}
|
|
393
|
-
function
|
|
475
|
+
function le(e) {
|
|
394
476
|
e(!0);
|
|
395
477
|
}
|
|
396
|
-
function
|
|
478
|
+
function ue(e) {
|
|
397
479
|
e(!1);
|
|
398
480
|
}
|
|
399
481
|
//#endregion
|
|
400
482
|
//#region src/components/Avatar/Avatar.jsx
|
|
401
|
-
var
|
|
402
|
-
let [c, l] = d(!1), u =
|
|
483
|
+
var de = ({ src: e = "", alt: t = "", size: n = "md", variant: r = "circular", color: i = "default", children: a = "", className: o = "", ...s }) => {
|
|
484
|
+
let [c, l] = d(!1), u = oe({
|
|
403
485
|
size: n,
|
|
404
486
|
variant: r,
|
|
405
487
|
color: i,
|
|
406
488
|
src: e,
|
|
407
489
|
imgError: c
|
|
408
|
-
}).concat(o).filter(Boolean).join(" "), f =
|
|
490
|
+
}).concat(o).filter(Boolean).join(" "), f = se(n), m = ce(a), h = () => le(l), g = () => ue(l);
|
|
409
491
|
return /* @__PURE__ */ p("div", {
|
|
410
492
|
className: u,
|
|
411
493
|
style: f,
|
|
@@ -422,10 +504,10 @@ var ie = ({ src: e = "", alt: t = "", size: n = "md", variant: r = "circular", c
|
|
|
422
504
|
}) : null
|
|
423
505
|
});
|
|
424
506
|
};
|
|
425
|
-
|
|
507
|
+
de.displayName = "Avatar";
|
|
426
508
|
//#endregion
|
|
427
509
|
//#region ../core/src/components/Badge/utils.js
|
|
428
|
-
var
|
|
510
|
+
var fe = [
|
|
429
511
|
"primary",
|
|
430
512
|
"secondary",
|
|
431
513
|
"success",
|
|
@@ -436,20 +518,20 @@ var ae = [
|
|
|
436
518
|
"cyan",
|
|
437
519
|
"pink"
|
|
438
520
|
];
|
|
439
|
-
function
|
|
440
|
-
return
|
|
521
|
+
function pe(e) {
|
|
522
|
+
return fe.includes(e);
|
|
441
523
|
}
|
|
442
|
-
function
|
|
443
|
-
return
|
|
524
|
+
function me(e) {
|
|
525
|
+
return pe(e) ? e : "primary";
|
|
444
526
|
}
|
|
445
|
-
function
|
|
446
|
-
let i = ["wc-badge", `wc-badge--${
|
|
527
|
+
function he({ variant: e, size: t, dot: n, className: r }) {
|
|
528
|
+
let i = ["wc-badge", `wc-badge--${me(e)}`];
|
|
447
529
|
return n ? i.push(`wc-badge--dot-${t}`) : i.push(`wc-badge--${t}`), r && i.push(r), i.filter(Boolean).join(" ");
|
|
448
530
|
}
|
|
449
531
|
//#endregion
|
|
450
532
|
//#region src/components/Badge/Badge.jsx
|
|
451
|
-
var
|
|
452
|
-
className:
|
|
533
|
+
var X = ({ children: e, variant: t = "primary", size: n = "md", dot: r = !1, className: i = "", ...a }) => /* @__PURE__ */ p("span", {
|
|
534
|
+
className: he({
|
|
453
535
|
variant: t,
|
|
454
536
|
size: n,
|
|
455
537
|
dot: r,
|
|
@@ -458,10 +540,10 @@ var le = ({ children: e, variant: t = "primary", size: n = "md", dot: r = !1, cl
|
|
|
458
540
|
...a,
|
|
459
541
|
children: !r && e
|
|
460
542
|
});
|
|
461
|
-
|
|
543
|
+
X.displayName = "Badge";
|
|
462
544
|
//#endregion
|
|
463
545
|
//#region ../core/src/components/Banner/utils.js
|
|
464
|
-
function
|
|
546
|
+
function ge(e, t, n) {
|
|
465
547
|
let r = [
|
|
466
548
|
"wc-banner",
|
|
467
549
|
`wc-banner--${e}`,
|
|
@@ -469,18 +551,18 @@ function ue(e, t, n) {
|
|
|
469
551
|
];
|
|
470
552
|
return n && r.push("wc-banner--sticky"), r.join(" ");
|
|
471
553
|
}
|
|
472
|
-
function
|
|
554
|
+
function _e(e) {
|
|
473
555
|
return { zIndex: e };
|
|
474
556
|
}
|
|
475
|
-
function
|
|
557
|
+
function ve(e, t) {
|
|
476
558
|
e(!1), t && t();
|
|
477
559
|
}
|
|
478
|
-
function
|
|
560
|
+
function ye(e) {
|
|
479
561
|
e && e();
|
|
480
562
|
}
|
|
481
563
|
//#endregion
|
|
482
564
|
//#region src/components/Banner/Banner.jsx
|
|
483
|
-
var
|
|
565
|
+
var be = ({ type: e }) => {
|
|
484
566
|
let t = e === "success" ? /* @__PURE__ */ p("path", { d: "m6.8 10.1 2.1 2.1 4.4-4.6" }) : e === "info" ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("path", { d: "M10 9v4" }), /* @__PURE__ */ p("path", { d: "M10 6.5h.01" })] }) : e === "warning" ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("path", { d: "M10 6.5v4.2" }), /* @__PURE__ */ p("path", { d: "M10 13.5h.01" })] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("path", { d: "m7.5 7.5 5 5" }), /* @__PURE__ */ p("path", { d: "m12.5 7.5-5 5" })] });
|
|
485
567
|
return /* @__PURE__ */ m("svg", {
|
|
486
568
|
viewBox: "0 0 20 20",
|
|
@@ -497,13 +579,13 @@ var pe = ({ type: e }) => {
|
|
|
497
579
|
}), t]
|
|
498
580
|
});
|
|
499
581
|
};
|
|
500
|
-
function
|
|
582
|
+
function xe({ type: t = "info", position: n = "top", title: r = "", message: i = "", closable: a = !0, showIcon: o = !0, showDefaultAction: s = !1, actionText: c = "立即行动", sticky: l = !0, zIndex: u = 1e3, onClose: f, onAction: h, children: g }) {
|
|
501
583
|
let [_, v] = d(!0);
|
|
502
584
|
if (!_) return null;
|
|
503
|
-
let y =
|
|
504
|
-
|
|
585
|
+
let y = ge(t, n, l), b = _e(u), x = () => {
|
|
586
|
+
ve(v, f);
|
|
505
587
|
}, S = () => {
|
|
506
|
-
|
|
588
|
+
ye(h);
|
|
507
589
|
}, C = g && e.Children.count(g) > 0;
|
|
508
590
|
return /* @__PURE__ */ p("div", {
|
|
509
591
|
className: y,
|
|
@@ -515,7 +597,7 @@ function me({ type: t = "info", position: n = "top", title: r = "", message: i =
|
|
|
515
597
|
children: [
|
|
516
598
|
o && /* @__PURE__ */ p("div", {
|
|
517
599
|
className: "wc-banner-icon",
|
|
518
|
-
children: /* @__PURE__ */ p(
|
|
600
|
+
children: /* @__PURE__ */ p(be, { type: t })
|
|
519
601
|
}),
|
|
520
602
|
/* @__PURE__ */ m("div", {
|
|
521
603
|
className: "wc-banner-text",
|
|
@@ -555,22 +637,22 @@ function me({ type: t = "info", position: n = "top", title: r = "", message: i =
|
|
|
555
637
|
}
|
|
556
638
|
//#endregion
|
|
557
639
|
//#region ../core/src/components/Blockquote/utils.js
|
|
558
|
-
function
|
|
640
|
+
function Se(e = "", t = "default", n = !0, r = !0, i = "medium", a = "default") {
|
|
559
641
|
let o = ["wc-blockquote"];
|
|
560
642
|
return t && t !== "default" && t !== "card" && o.push(`wc-blockquote--${t}`), n && o.push("wc-blockquote--no-border"), r && o.push("wc-blockquote--interactive"), i && i !== "medium" && o.push(`wc-blockquote--${i}`), a && a !== "default" && o.push(`wc-blockquote--${a}`), e && o.push(e), o.filter(Boolean).join(" ");
|
|
561
643
|
}
|
|
562
644
|
//#endregion
|
|
563
645
|
//#region ../core/src/components/Card/utils.jsx
|
|
564
|
-
function
|
|
646
|
+
function Ce(e = "", t = "minimal", n = "default", r = "medium", i = !1, a = !0) {
|
|
565
647
|
let o = ["wc-card"];
|
|
566
648
|
return t && o.push(`wc-card--${t}`), n && n !== "default" && o.push(`wc-card--${n}`), r && r !== "medium" && o.push(`wc-card--${r}`), i && o.push("wc-card--interactive"), a && o.push("wc-card--no-border"), e && o.push(e), o.filter(Boolean).join(" ");
|
|
567
649
|
}
|
|
568
650
|
//#endregion
|
|
569
651
|
//#region src/components/Card/Card.jsx
|
|
570
|
-
var
|
|
652
|
+
var we = ({ children: e, title: t = "", variant: n = "minimal", color: r = "default", size: i = "medium", interactive: a = !1, noBorder: o = !0, className: s = "", header: c = null, footer: l = null, style: u = {}, onClick: d, onMouseEnter: f, onMouseLeave: h, onKeyDown: g, ..._ }) => {
|
|
571
653
|
let v = a || !!d;
|
|
572
654
|
return /* @__PURE__ */ m("div", {
|
|
573
|
-
className:
|
|
655
|
+
className: Ce(s, n, r, i, v, o),
|
|
574
656
|
style: u,
|
|
575
657
|
onClick: (e) => {
|
|
576
658
|
v && d && d(e);
|
|
@@ -606,11 +688,11 @@ var _e = ({ children: e, title: t = "", variant: n = "minimal", color: r = "defa
|
|
|
606
688
|
]
|
|
607
689
|
});
|
|
608
690
|
};
|
|
609
|
-
|
|
691
|
+
we.displayName = "Card";
|
|
610
692
|
//#endregion
|
|
611
693
|
//#region src/components/Blockquote/Blockquote.jsx
|
|
612
|
-
function
|
|
613
|
-
return r === "card" ? /* @__PURE__ */ m(
|
|
694
|
+
function Te({ cite: e = "", children: t, className: n = "", variant: r = "default", noBorder: i = !0, interactive: a = !0, size: o = "medium", color: s = "default", ...c }) {
|
|
695
|
+
return r === "card" ? /* @__PURE__ */ m(we, {
|
|
614
696
|
variant: "filled",
|
|
615
697
|
color: s,
|
|
616
698
|
size: o,
|
|
@@ -626,7 +708,7 @@ function ve({ cite: e = "", children: t, className: n = "", variant: r = "defaul
|
|
|
626
708
|
children: ["— ", e]
|
|
627
709
|
})]
|
|
628
710
|
}) : /* @__PURE__ */ m("blockquote", {
|
|
629
|
-
className:
|
|
711
|
+
className: Se(n, r, i, a, o, s),
|
|
630
712
|
...c,
|
|
631
713
|
children: [/* @__PURE__ */ p("p", {
|
|
632
714
|
className: "quote-text",
|
|
@@ -653,32 +735,32 @@ var Z = {
|
|
|
653
735
|
16: "4rem",
|
|
654
736
|
20: "5rem",
|
|
655
737
|
24: "6rem"
|
|
656
|
-
},
|
|
738
|
+
}, Ee = {
|
|
657
739
|
flex: "flex",
|
|
658
740
|
block: "block",
|
|
659
741
|
inline: "inline",
|
|
660
742
|
"inline-block": "inline-block",
|
|
661
743
|
none: "hidden",
|
|
662
744
|
grid: "grid"
|
|
663
|
-
},
|
|
745
|
+
}, De = {
|
|
664
746
|
row: "flex-row",
|
|
665
747
|
column: "flex-col",
|
|
666
748
|
"row-reverse": "flex-row-reverse",
|
|
667
749
|
"column-reverse": "flex-col-reverse"
|
|
668
|
-
},
|
|
750
|
+
}, Oe = {
|
|
669
751
|
"flex-start": "justify-start",
|
|
670
752
|
center: "justify-center",
|
|
671
753
|
"flex-end": "justify-end",
|
|
672
754
|
"space-between": "justify-between",
|
|
673
755
|
"space-around": "justify-around",
|
|
674
756
|
"space-evenly": "justify-evenly"
|
|
675
|
-
},
|
|
757
|
+
}, ke = {
|
|
676
758
|
"flex-start": "items-start",
|
|
677
759
|
center: "items-center",
|
|
678
760
|
"flex-end": "items-end",
|
|
679
761
|
stretch: "items-stretch",
|
|
680
762
|
baseline: "items-baseline"
|
|
681
|
-
},
|
|
763
|
+
}, Ae = {
|
|
682
764
|
wrap: "flex-wrap",
|
|
683
765
|
nowrap: "flex-nowrap",
|
|
684
766
|
"wrap-reverse": "flex-wrap-reverse"
|
|
@@ -686,9 +768,9 @@ var Z = {
|
|
|
686
768
|
function Q(e) {
|
|
687
769
|
return typeof e == "number" ? `${e}px` : e;
|
|
688
770
|
}
|
|
689
|
-
function
|
|
771
|
+
function je(e) {
|
|
690
772
|
let t = ["wc-box"];
|
|
691
|
-
if (e.display &&
|
|
773
|
+
if (e.display && Ee[e.display] && t.push(Ee[e.display]), e.flexDirection && De[e.flexDirection] && t.push(De[e.flexDirection]), e.justifyContent && Oe[e.justifyContent] && t.push(Oe[e.justifyContent]), e.alignItems && ke[e.alignItems] && t.push(ke[e.alignItems]), e.flexWrap && Ae[e.flexWrap] && t.push(Ae[e.flexWrap]), e.gap !== void 0) {
|
|
692
774
|
let n = e.gap.toString();
|
|
693
775
|
[
|
|
694
776
|
"0",
|
|
@@ -708,7 +790,7 @@ function we(e) {
|
|
|
708
790
|
}
|
|
709
791
|
return t;
|
|
710
792
|
}
|
|
711
|
-
function
|
|
793
|
+
function Me(e) {
|
|
712
794
|
let t = {};
|
|
713
795
|
if (e.p !== void 0 && (t.padding = Z[e.p] || Q(e.p)), e.pt !== void 0 && (t.paddingTop = Z[e.pt] || Q(e.pt)), e.pr !== void 0 && (t.paddingRight = Z[e.pr] || Q(e.pr)), e.pb !== void 0 && (t.paddingBottom = Z[e.pb] || Q(e.pb)), e.pl !== void 0 && (t.paddingLeft = Z[e.pl] || Q(e.pl)), e.px !== void 0) {
|
|
714
796
|
let n = Z[e.px] || Q(e.px);
|
|
@@ -730,9 +812,9 @@ function Te(e) {
|
|
|
730
812
|
}
|
|
731
813
|
//#endregion
|
|
732
814
|
//#region src/components/Box/Box.jsx
|
|
733
|
-
function
|
|
815
|
+
function Ne({ component: e = "div", children: t, className: n = "", p: r, pt: i, pr: a, pb: o, pl: s, px: c, py: l, m: u, mt: d, mr: f, mb: m, ml: h, mx: g, my: _, display: v, flexDirection: y, justifyContent: b, alignItems: x, flexWrap: S, gap: C, bgcolor: w, color: T, border: E, borderRadius: D, width: O, height: k, minWidth: A, minHeight: j, maxWidth: M, maxHeight: N, style: P = {}, ...F }) {
|
|
734
816
|
return /* @__PURE__ */ p(e, {
|
|
735
|
-
className:
|
|
817
|
+
className: je({
|
|
736
818
|
display: v,
|
|
737
819
|
flexDirection: y,
|
|
738
820
|
justifyContent: b,
|
|
@@ -741,7 +823,7 @@ function Ee({ component: e = "div", children: t, className: n = "", p: r, pt: i,
|
|
|
741
823
|
gap: C
|
|
742
824
|
}).concat(n).filter(Boolean).join(" "),
|
|
743
825
|
style: {
|
|
744
|
-
...
|
|
826
|
+
...Me({
|
|
745
827
|
p: r,
|
|
746
828
|
pt: i,
|
|
747
829
|
pr: a,
|
|
@@ -781,7 +863,7 @@ function Ee({ component: e = "div", children: t, className: n = "", p: r, pt: i,
|
|
|
781
863
|
}
|
|
782
864
|
//#endregion
|
|
783
865
|
//#region ../core/src/components/Breadcrumb/utils.js
|
|
784
|
-
function
|
|
866
|
+
function Pe(e, t, n, r) {
|
|
785
867
|
let i = [...e];
|
|
786
868
|
if (t && i.length && i[0].label !== "首页" && i.unshift({
|
|
787
869
|
label: "首页",
|
|
@@ -801,45 +883,45 @@ function De(e, t, n, r) {
|
|
|
801
883
|
}
|
|
802
884
|
return i;
|
|
803
885
|
}
|
|
804
|
-
function
|
|
886
|
+
function Fe(e) {
|
|
805
887
|
return `wc-breadcrumb wc-breadcrumb--${e}`;
|
|
806
888
|
}
|
|
807
|
-
function
|
|
889
|
+
function Ie(e, t) {
|
|
808
890
|
let n = ["wc-breadcrumb-item"];
|
|
809
891
|
return e === t - 1 && n.push("wc-breadcrumb-item--current"), n.join(" ");
|
|
810
892
|
}
|
|
811
|
-
function
|
|
893
|
+
function Le(e) {
|
|
812
894
|
let t = ["wc-breadcrumb-link"];
|
|
813
895
|
return e && t.push("wc-breadcrumb-link--disabled"), t.join(" ");
|
|
814
896
|
}
|
|
815
|
-
function
|
|
897
|
+
function Re(e, t, n, r, i) {
|
|
816
898
|
return t.disabled || t.isEllipsis || n === r - 1 ? (e.preventDefault(), !1) : (i && i(e, t, n), !0);
|
|
817
899
|
}
|
|
818
|
-
function
|
|
900
|
+
function ze(e, t, n, r) {
|
|
819
901
|
return e !== t - 1 && !n && !r;
|
|
820
902
|
}
|
|
821
903
|
//#endregion
|
|
822
904
|
//#region src/components/Breadcrumb/Breadcrumb.jsx
|
|
823
|
-
function
|
|
824
|
-
let c = e.useMemo(() =>
|
|
905
|
+
function Be({ items: t = [], separator: n = "/", variant: r = "default", showHome: i = !1, homeIcon: a = "🏠", maxItems: o = 0, onItemClick: s }) {
|
|
906
|
+
let c = e.useMemo(() => Pe(t, i, a, o), [
|
|
825
907
|
t,
|
|
826
908
|
i,
|
|
827
909
|
a,
|
|
828
910
|
o
|
|
829
911
|
]), l = (e, t, n) => {
|
|
830
|
-
|
|
912
|
+
Re(e, t, n, c.length, s);
|
|
831
913
|
};
|
|
832
914
|
return /* @__PURE__ */ p("nav", {
|
|
833
|
-
className:
|
|
915
|
+
className: Fe(r),
|
|
834
916
|
"aria-label": "面包屑导航",
|
|
835
917
|
role: "navigation",
|
|
836
918
|
children: /* @__PURE__ */ p("ol", {
|
|
837
919
|
className: "wc-breadcrumb-list",
|
|
838
920
|
children: c.map((e, t) => /* @__PURE__ */ m("li", {
|
|
839
|
-
className:
|
|
840
|
-
children: [
|
|
921
|
+
className: Ie(t, c.length),
|
|
922
|
+
children: [ze(t, c.length, e.disabled, e.isEllipsis) ? e.href ? /* @__PURE__ */ m("a", {
|
|
841
923
|
href: e.href,
|
|
842
|
-
className:
|
|
924
|
+
className: Le(e.disabled),
|
|
843
925
|
onClick: (n) => l(n, e, t),
|
|
844
926
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
845
927
|
className: "wc-breadcrumb-icon",
|
|
@@ -848,13 +930,13 @@ function Ne({ items: t = [], separator: n = "/", variant: r = "default", showHom
|
|
|
848
930
|
}) : /* @__PURE__ */ m("button", {
|
|
849
931
|
type: "button",
|
|
850
932
|
onClick: (n) => l(n, e, t),
|
|
851
|
-
className:
|
|
933
|
+
className: Le(e.disabled),
|
|
852
934
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
853
935
|
className: "wc-breadcrumb-icon",
|
|
854
936
|
dangerouslySetInnerHTML: { __html: e.icon }
|
|
855
937
|
}), e.label]
|
|
856
938
|
}) : /* @__PURE__ */ m("span", {
|
|
857
|
-
className:
|
|
939
|
+
className: Le(!0),
|
|
858
940
|
"aria-current": "page",
|
|
859
941
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
860
942
|
className: "wc-breadcrumb-icon",
|
|
@@ -870,7 +952,7 @@ function Ne({ items: t = [], separator: n = "/", variant: r = "default", showHom
|
|
|
870
952
|
}
|
|
871
953
|
//#endregion
|
|
872
954
|
//#region ../core/src/components/Button/utils.jsx
|
|
873
|
-
var
|
|
955
|
+
var Ve = [
|
|
874
956
|
"primary",
|
|
875
957
|
"secondary",
|
|
876
958
|
"filled",
|
|
@@ -885,23 +967,23 @@ var Pe = [
|
|
|
885
967
|
"cyan",
|
|
886
968
|
"pink"
|
|
887
969
|
];
|
|
888
|
-
function
|
|
889
|
-
return
|
|
970
|
+
function He(e) {
|
|
971
|
+
return Ve.includes(e);
|
|
890
972
|
}
|
|
891
|
-
function
|
|
892
|
-
return
|
|
973
|
+
function Ue(e) {
|
|
974
|
+
return He(e) ? e : "primary";
|
|
893
975
|
}
|
|
894
|
-
function
|
|
976
|
+
function We(e) {
|
|
895
977
|
let { variant: t, size: n, disabled: r, loading: i, fullWidth: a, uppercase: o, rounded: s, buttonStyle: c = "default" } = e, l = ["wc-btn"];
|
|
896
|
-
return l.push(`wc-btn--style-${c}`), l.push(`wc-btn--${
|
|
978
|
+
return l.push(`wc-btn--style-${c}`), l.push(`wc-btn--${Ue(t)}`), l.push(`wc-btn--${n}`), (r || i) && l.push("wc-btn--disabled"), i && l.push("wc-btn--loading"), a && l.push("wc-btn--full-width"), o && l.push("wc-btn--uppercase"), s === !1 || s === "none" ? l.push("wc-btn--rounded-none") : typeof s == "string" ? l.push(`wc-btn--rounded-${s}`) : l.push("wc-btn--rounded"), l;
|
|
897
979
|
}
|
|
898
|
-
function
|
|
980
|
+
function Ge({ event: e, disabled: t, loading: n, href: r, target: i, onClick: a }) {
|
|
899
981
|
!t && !n && (r && window.open(r, i), a?.(e));
|
|
900
982
|
}
|
|
901
983
|
//#endregion
|
|
902
984
|
//#region src/components/Button/Button.jsx
|
|
903
|
-
var
|
|
904
|
-
let T =
|
|
985
|
+
var Ke = ({ children: e, variant: t = "primary", buttonStyle: n = "default", size: r = "md", disabled: i = !1, loading: a = !1, fullWidth: o = !1, type: s = "button", href: c = null, target: l = "_self", startIcon: u = null, endIcon: d = null, rounded: f = !0, uppercase: h = !1, ripple: g = !0, onClick: _, onMouseOver: v, onMouseOut: y, onFocus: b, onBlur: x, className: S = "", style: C = {}, ...w }) => {
|
|
986
|
+
let T = We({
|
|
905
987
|
variant: t,
|
|
906
988
|
buttonStyle: n,
|
|
907
989
|
size: r,
|
|
@@ -911,7 +993,7 @@ var ze = ({ children: e, variant: t = "primary", buttonStyle: n = "default", siz
|
|
|
911
993
|
uppercase: h,
|
|
912
994
|
rounded: f
|
|
913
995
|
}).concat(S).filter(Boolean).join(" "), E = { ...C }, D = (e) => {
|
|
914
|
-
|
|
996
|
+
Ge({
|
|
915
997
|
event: e,
|
|
916
998
|
disabled: i,
|
|
917
999
|
loading: a,
|
|
@@ -975,10 +1057,10 @@ var ze = ({ children: e, variant: t = "primary", buttonStyle: n = "default", siz
|
|
|
975
1057
|
]
|
|
976
1058
|
});
|
|
977
1059
|
};
|
|
978
|
-
|
|
1060
|
+
Ke.displayName = "Button";
|
|
979
1061
|
//#endregion
|
|
980
1062
|
//#region src/components/Card/CardActions.jsx
|
|
981
|
-
var
|
|
1063
|
+
var qe = ({ children: e, disableSpacing: t = !1, disablePadding: n = !1, justifyContent: r = "flex-start", className: i = "", ...a }) => /* @__PURE__ */ p("div", {
|
|
982
1064
|
className: [
|
|
983
1065
|
"wc-card-actions",
|
|
984
1066
|
"wc-flex",
|
|
@@ -997,10 +1079,10 @@ var Be = ({ children: e, disableSpacing: t = !1, disablePadding: n = !1, justify
|
|
|
997
1079
|
...a,
|
|
998
1080
|
children: e
|
|
999
1081
|
});
|
|
1000
|
-
|
|
1082
|
+
qe.displayName = "CardActions";
|
|
1001
1083
|
//#endregion
|
|
1002
1084
|
//#region src/components/Card/CardContent.jsx
|
|
1003
|
-
var
|
|
1085
|
+
var Je = ({ children: e, disablePadding: t = !1, padding: n = "normal", className: r = "", ...i }) => /* @__PURE__ */ p("div", {
|
|
1004
1086
|
className: [
|
|
1005
1087
|
"wc-card-content",
|
|
1006
1088
|
!t && {
|
|
@@ -1014,22 +1096,22 @@ var Ve = ({ children: e, disablePadding: t = !1, padding: n = "normal", classNam
|
|
|
1014
1096
|
...i,
|
|
1015
1097
|
children: e
|
|
1016
1098
|
});
|
|
1017
|
-
|
|
1099
|
+
Je.displayName = "CardContent";
|
|
1018
1100
|
//#endregion
|
|
1019
1101
|
//#region src/components/Checkbox/Checkbox.jsx
|
|
1020
|
-
var
|
|
1102
|
+
var Ye = [
|
|
1021
1103
|
"primary",
|
|
1022
1104
|
"secondary",
|
|
1023
1105
|
"success",
|
|
1024
1106
|
"warning",
|
|
1025
1107
|
"error",
|
|
1026
1108
|
"info"
|
|
1027
|
-
],
|
|
1109
|
+
], Xe = [
|
|
1028
1110
|
"sm",
|
|
1029
1111
|
"md",
|
|
1030
1112
|
"lg"
|
|
1031
|
-
],
|
|
1032
|
-
let _ = s(), [v, y] = d(!1), b =
|
|
1113
|
+
], Ze = ({ checked: e = !1, onChange: t, indeterminate: n = !1, disabled: r = !1, required: i = !1, size: a = "md", color: o = "primary", label: c = "", labelPlacement: l = "end", value: u = !0, name: f, className: h = "", ...g }) => {
|
|
1114
|
+
let _ = s(), [v, y] = d(!1), b = Ye.includes(o) ? o : "primary", x = Xe.includes(a) ? a : "md", S = [
|
|
1033
1115
|
"wc-checkbox",
|
|
1034
1116
|
`wc-checkbox--${x}`,
|
|
1035
1117
|
(e || n) && (n ? "wc-checkbox--indeterminate" : "wc-checkbox--checked"),
|
|
@@ -1099,26 +1181,26 @@ var He = [
|
|
|
1099
1181
|
]
|
|
1100
1182
|
});
|
|
1101
1183
|
};
|
|
1102
|
-
|
|
1184
|
+
Ze.displayName = "Checkbox";
|
|
1103
1185
|
//#endregion
|
|
1104
1186
|
//#region ../core/src/components/Chip/utils.jsx
|
|
1105
|
-
function
|
|
1187
|
+
function Qe(e) {
|
|
1106
1188
|
let { size: t = "md", variant: n = "filled", color: r = "default", clickable: i = !1, disabled: a = !1, className: o = "" } = e, s = ["wc-chip"];
|
|
1107
1189
|
return s.push(`wc-chip--${t}`), s.push(`wc-chip--${n}`), s.push(`wc-chip--${r}`), i && !a && s.push("wc-chip--clickable"), a && s.push("wc-chip--disabled"), o && s.push(o), s.filter(Boolean).join(" ");
|
|
1108
1190
|
}
|
|
1109
|
-
function
|
|
1191
|
+
function $e(e, t, n, r) {
|
|
1110
1192
|
t && !n && r && r(e);
|
|
1111
1193
|
}
|
|
1112
|
-
function
|
|
1194
|
+
function et(e, t, n) {
|
|
1113
1195
|
e.stopPropagation(), !t && n && n(e);
|
|
1114
1196
|
}
|
|
1115
|
-
function
|
|
1197
|
+
function tt() {
|
|
1116
1198
|
return "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z";
|
|
1117
1199
|
}
|
|
1118
1200
|
//#endregion
|
|
1119
1201
|
//#region src/components/Chip/Chip.jsx
|
|
1120
|
-
function
|
|
1121
|
-
let g =
|
|
1202
|
+
function nt({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1, clickable: i = !1, variant: a = "filled", size: o = "md", color: s = "default", deleteIcon: c = null, onClick: l, onDelete: u, children: d, className: f = "", ...h }) {
|
|
1203
|
+
let g = Qe({
|
|
1122
1204
|
size: o,
|
|
1123
1205
|
variant: a,
|
|
1124
1206
|
color: s,
|
|
@@ -1126,9 +1208,9 @@ function Ye({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1126
1208
|
disabled: r,
|
|
1127
1209
|
className: f
|
|
1128
1210
|
}), _ = (e) => {
|
|
1129
|
-
|
|
1211
|
+
$e(e, i, r, l);
|
|
1130
1212
|
}, v = (e) => {
|
|
1131
|
-
|
|
1213
|
+
et(e, r, u);
|
|
1132
1214
|
}, y = (e) => {
|
|
1133
1215
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), _(e));
|
|
1134
1216
|
};
|
|
@@ -1167,7 +1249,7 @@ function Ye({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1167
1249
|
"aria-hidden": "true",
|
|
1168
1250
|
children: /* @__PURE__ */ p("path", {
|
|
1169
1251
|
fillRule: "evenodd",
|
|
1170
|
-
d:
|
|
1252
|
+
d: tt(),
|
|
1171
1253
|
clipRule: "evenodd"
|
|
1172
1254
|
})
|
|
1173
1255
|
})
|
|
@@ -1177,7 +1259,7 @@ function Ye({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1177
1259
|
}
|
|
1178
1260
|
//#endregion
|
|
1179
1261
|
//#region ../core/src/components/CircularProgress/utils.jsx
|
|
1180
|
-
function
|
|
1262
|
+
function rt(e, t) {
|
|
1181
1263
|
let n = typeof e == "string" ? parseInt(e, 10) : e, r = n / 2, i = (n - t) / 2;
|
|
1182
1264
|
return {
|
|
1183
1265
|
sizeNumber: n,
|
|
@@ -1186,21 +1268,21 @@ function Xe(e, t) {
|
|
|
1186
1268
|
circumference: 2 * Math.PI * i
|
|
1187
1269
|
};
|
|
1188
1270
|
}
|
|
1189
|
-
function
|
|
1271
|
+
function it(e, t, n) {
|
|
1190
1272
|
return e === "determinate" ? n - t / 100 * n : 0;
|
|
1191
1273
|
}
|
|
1192
|
-
function
|
|
1274
|
+
function at(e) {
|
|
1193
1275
|
let { color: t = "primary", variant: n = "indeterminate", overlay: r = !1, centered: i = !1, inline: a = !1, className: o = "" } = e, s = ["wc-circular-progress"];
|
|
1194
1276
|
return s.push(`wc-circular-progress--${t}`), n === "indeterminate" && s.push("wc-circular-progress--indeterminate"), r && s.push("wc-circular-progress--overlay"), i && s.push("wc-circular-progress--centered"), a && s.push("wc-circular-progress--inline"), o && s.push(o), s.filter(Boolean);
|
|
1195
1277
|
}
|
|
1196
|
-
function
|
|
1278
|
+
function ot(e) {
|
|
1197
1279
|
let t = ["wc-circular-progress-circle"];
|
|
1198
1280
|
return e === "indeterminate" && t.push("wc-circular-progress-circle--indeterminate"), t.filter(Boolean);
|
|
1199
1281
|
}
|
|
1200
|
-
function
|
|
1282
|
+
function st(e) {
|
|
1201
1283
|
return Math.round(e);
|
|
1202
1284
|
}
|
|
1203
|
-
function
|
|
1285
|
+
function ct(e) {
|
|
1204
1286
|
let { value: t = 0, variant: n } = e, r = {
|
|
1205
1287
|
role: "progressbar",
|
|
1206
1288
|
"aria-valuemin": 0,
|
|
@@ -1210,18 +1292,18 @@ function tt(e) {
|
|
|
1210
1292
|
}
|
|
1211
1293
|
//#endregion
|
|
1212
1294
|
//#region src/components/CircularProgress/CircularProgress.jsx
|
|
1213
|
-
function
|
|
1214
|
-
let { sizeNumber: d, center: f, radius: h, circumference: g } =
|
|
1295
|
+
function lt({ value: e = 0, size: t = 40, thickness: n = 3.6, variant: r = "indeterminate", color: i = "primary", showValue: a = !1, overlay: o = !1, centered: s = !1, inline: c = !1, className: l = "", ...u }) {
|
|
1296
|
+
let { sizeNumber: d, center: f, radius: h, circumference: g } = rt(t, n), _ = it(r, e, g), v = at({
|
|
1215
1297
|
color: i,
|
|
1216
1298
|
variant: r,
|
|
1217
1299
|
overlay: o,
|
|
1218
1300
|
centered: s,
|
|
1219
1301
|
inline: c,
|
|
1220
1302
|
className: l
|
|
1221
|
-
}).join(" "), y =
|
|
1303
|
+
}).join(" "), y = ot(r).join(" ");
|
|
1222
1304
|
return /* @__PURE__ */ m("div", {
|
|
1223
1305
|
className: v,
|
|
1224
|
-
...
|
|
1306
|
+
...ct({
|
|
1225
1307
|
value: e,
|
|
1226
1308
|
variant: r
|
|
1227
1309
|
}),
|
|
@@ -1252,38 +1334,38 @@ function nt({ value: e = 0, size: t = 40, thickness: n = 3.6, variant: r = "inde
|
|
|
1252
1334
|
})]
|
|
1253
1335
|
}), a && /* @__PURE__ */ m("div", {
|
|
1254
1336
|
className: "wc-circular-progress-value",
|
|
1255
|
-
children: [
|
|
1337
|
+
children: [st(e), "%"]
|
|
1256
1338
|
})]
|
|
1257
1339
|
});
|
|
1258
1340
|
}
|
|
1259
1341
|
//#endregion
|
|
1260
1342
|
//#region ../core/src/components/ColorPicker/utils.jsx
|
|
1261
|
-
function
|
|
1343
|
+
function ut(e) {
|
|
1262
1344
|
let { size: t = "md", shape: n = "circle", disabled: r = !1, className: i = "" } = e, a = ["wc-color-picker"];
|
|
1263
1345
|
return a.push(`wc-color-picker--${t}`), a.push(`wc-color-picker--${n}`), r && a.push("wc-color-picker--disabled"), i && a.push(i), a.filter(Boolean);
|
|
1264
1346
|
}
|
|
1265
|
-
function
|
|
1347
|
+
function dt(e, t, n) {
|
|
1266
1348
|
!t && n && n(e.target.value);
|
|
1267
1349
|
}
|
|
1268
|
-
function
|
|
1350
|
+
function ft(e) {
|
|
1269
1351
|
return { backgroundColor: e };
|
|
1270
1352
|
}
|
|
1271
1353
|
//#endregion
|
|
1272
1354
|
//#region src/components/ColorPicker/ColorPicker.jsx
|
|
1273
|
-
function
|
|
1274
|
-
let o = e ?? "", s =
|
|
1355
|
+
function pt({ value: e = "#ffffff", onChange: t, size: n = "md", shape: r = "circle", disabled: i = !1, className: a = "" }) {
|
|
1356
|
+
let o = e ?? "", s = ut({
|
|
1275
1357
|
size: n,
|
|
1276
1358
|
shape: r,
|
|
1277
1359
|
disabled: i,
|
|
1278
1360
|
className: a
|
|
1279
|
-
}).join(" "), c =
|
|
1361
|
+
}).join(" "), c = ft(o);
|
|
1280
1362
|
return /* @__PURE__ */ m("label", {
|
|
1281
1363
|
className: s,
|
|
1282
1364
|
children: [/* @__PURE__ */ p("input", {
|
|
1283
1365
|
type: "color",
|
|
1284
1366
|
value: o,
|
|
1285
1367
|
onChange: (e) => {
|
|
1286
|
-
|
|
1368
|
+
dt(e, i, t);
|
|
1287
1369
|
},
|
|
1288
1370
|
disabled: i,
|
|
1289
1371
|
className: "wc-color-picker__input"
|
|
@@ -1295,7 +1377,7 @@ function ot({ value: e = "#ffffff", onChange: t, size: n = "md", shape: r = "cir
|
|
|
1295
1377
|
}
|
|
1296
1378
|
//#endregion
|
|
1297
1379
|
//#region ../core/src/components/Container/utils.jsx
|
|
1298
|
-
var
|
|
1380
|
+
var mt = {
|
|
1299
1381
|
xs: "max-w-xs",
|
|
1300
1382
|
sm: "max-w-sm",
|
|
1301
1383
|
md: "max-w-md",
|
|
@@ -1303,15 +1385,15 @@ var st = {
|
|
|
1303
1385
|
xl: "max-w-6xl",
|
|
1304
1386
|
"2xl": "max-w-7xl"
|
|
1305
1387
|
};
|
|
1306
|
-
function
|
|
1388
|
+
function ht(e) {
|
|
1307
1389
|
let { maxWidth: t = "lg", fluid: n = !1, fixed: r = !1, className: i = "" } = e, a = ["mx-auto px-4 sm:px-6 lg:px-8"];
|
|
1308
|
-
return n || r ? a.push("w-full") : t &&
|
|
1390
|
+
return n || r ? a.push("w-full") : t && mt[t] && a.push(mt[t]), i && a.push(i), a.filter(Boolean);
|
|
1309
1391
|
}
|
|
1310
1392
|
//#endregion
|
|
1311
1393
|
//#region src/components/Container/Container.jsx
|
|
1312
|
-
function
|
|
1394
|
+
function gt({ maxWidth: e = "lg", fluid: t = !1, fixed: n = !1, className: r = "", children: i }) {
|
|
1313
1395
|
return /* @__PURE__ */ p("div", {
|
|
1314
|
-
className:
|
|
1396
|
+
className: ht({
|
|
1315
1397
|
maxWidth: e,
|
|
1316
1398
|
fluid: t,
|
|
1317
1399
|
fixed: n,
|
|
@@ -1322,17 +1404,17 @@ function lt({ maxWidth: e = "lg", fluid: t = !1, fixed: n = !1, className: r = "
|
|
|
1322
1404
|
}
|
|
1323
1405
|
//#endregion
|
|
1324
1406
|
//#region ../core/src/components/Copy/utils.jsx
|
|
1325
|
-
function
|
|
1407
|
+
function _t(e) {
|
|
1326
1408
|
let { variant: t = "default", size: n = "md", copied: r = !1, copyError: i = !1, className: a = "" } = e, o = ["wc-copy"];
|
|
1327
1409
|
return o.push(`wc-copy--${t}`), o.push(`wc-copy--${n}`), r && o.push("wc-copy--copied"), i && o.push("wc-copy--error"), a && o.push(a), o.filter(Boolean);
|
|
1328
1410
|
}
|
|
1329
|
-
function
|
|
1411
|
+
function vt(e, t, n, r) {
|
|
1330
1412
|
return t ? "错误" : e ? r : n;
|
|
1331
1413
|
}
|
|
1332
|
-
function
|
|
1414
|
+
function yt(e, t, n, r) {
|
|
1333
1415
|
return t ? r : e ? n : "";
|
|
1334
1416
|
}
|
|
1335
|
-
async function
|
|
1417
|
+
async function bt(e) {
|
|
1336
1418
|
try {
|
|
1337
1419
|
if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
|
|
1338
1420
|
{
|
|
@@ -1345,18 +1427,18 @@ async function pt(e) {
|
|
|
1345
1427
|
return console.warn("复制失败:", e), !1;
|
|
1346
1428
|
}
|
|
1347
1429
|
}
|
|
1348
|
-
async function
|
|
1349
|
-
await
|
|
1430
|
+
async function xt(e, t, n, r, i, a, o, s) {
|
|
1431
|
+
await bt(e) ? (r(!0), i(!1), t(e)) : (r(!1), i(!0), n(/* @__PURE__ */ Error("复制失败"))), o && a && (a(!0), setTimeout(() => a(!1), 1500)), setTimeout(() => {
|
|
1350
1432
|
r(!1), i(!1);
|
|
1351
1433
|
}, s);
|
|
1352
1434
|
}
|
|
1353
|
-
function
|
|
1435
|
+
function St(e, t) {
|
|
1354
1436
|
let n = "wc-copy-tooltip";
|
|
1355
1437
|
return e && (n += " wc-copy-tooltip--success"), t && (n += " wc-copy-tooltip--error"), n;
|
|
1356
1438
|
}
|
|
1357
1439
|
//#endregion
|
|
1358
1440
|
//#region src/components/Copy/Copy.jsx
|
|
1359
|
-
var
|
|
1441
|
+
var Ct = ({ copied: e, error: t }) => e ? /* @__PURE__ */ m("svg", {
|
|
1360
1442
|
viewBox: "0 0 20 20",
|
|
1361
1443
|
fill: "none",
|
|
1362
1444
|
stroke: "currentColor",
|
|
@@ -1396,15 +1478,15 @@ var gt = ({ copied: e, error: t }) => e ? /* @__PURE__ */ m("svg", {
|
|
|
1396
1478
|
rx: "2"
|
|
1397
1479
|
}), /* @__PURE__ */ p("path", { d: "M13.5 6.5v-1A2 2 0 0 0 11.5 3.5h-7a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h2" })]
|
|
1398
1480
|
});
|
|
1399
|
-
function
|
|
1400
|
-
let [v, y] = d(!1), [b, x] = d(!1), [S, C] = d(!1), w =
|
|
1481
|
+
function wt({ text: e, variant: t = "default", size: n = "md", showLabel: r = !0, showTooltip: i = !0, copyLabel: a = "复制", copiedLabel: o = "已复制", tooltipSuccess: s = "复制成功!", tooltipError: c = "复制失败", resetDelay: l = 2e3, onCopy: u = () => {}, onError: f = () => {}, className: h = "", children: g, icon: _ }) {
|
|
1482
|
+
let [v, y] = d(!1), [b, x] = d(!1), [S, C] = d(!1), w = _t({
|
|
1401
1483
|
variant: t,
|
|
1402
1484
|
size: n,
|
|
1403
1485
|
copied: v,
|
|
1404
1486
|
copyError: b,
|
|
1405
1487
|
className: h
|
|
1406
|
-
}).join(" "), T =
|
|
1407
|
-
await
|
|
1488
|
+
}).join(" "), T = vt(v, b, a, o), E = yt(v, b, s, c), D = St(v, b), O = async () => {
|
|
1489
|
+
await xt(e, u, f, y, x, C, i, l);
|
|
1408
1490
|
}, k = (e) => {
|
|
1409
1491
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), O());
|
|
1410
1492
|
};
|
|
@@ -1424,7 +1506,7 @@ function _t({ text: e, variant: t = "default", size: n = "md", showLabel: r = !0
|
|
|
1424
1506
|
className: "wc-copy-action",
|
|
1425
1507
|
children: [_ ? /* @__PURE__ */ p(_, { className: "wc-copy-icon" }) : /* @__PURE__ */ p("span", {
|
|
1426
1508
|
className: "wc-copy-icon",
|
|
1427
|
-
children: /* @__PURE__ */ p(
|
|
1509
|
+
children: /* @__PURE__ */ p(Ct, {
|
|
1428
1510
|
copied: v,
|
|
1429
1511
|
error: b
|
|
1430
1512
|
})
|
|
@@ -1443,20 +1525,20 @@ function _t({ text: e, variant: t = "default", size: n = "md", showLabel: r = !0
|
|
|
1443
1525
|
}
|
|
1444
1526
|
//#endregion
|
|
1445
1527
|
//#region ../core/src/components/DatePicker/utils.jsx
|
|
1446
|
-
function
|
|
1528
|
+
function Tt(e, t = "YYYY-MM-DD") {
|
|
1447
1529
|
if (!e || !(e instanceof Date)) return "";
|
|
1448
1530
|
let n = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getDate()).padStart(2, "0");
|
|
1449
1531
|
return t.replace("YYYY", n).replace("MM", r).replace("DD", i);
|
|
1450
1532
|
}
|
|
1451
|
-
function
|
|
1533
|
+
function Et(e) {
|
|
1452
1534
|
if (!e) return !1;
|
|
1453
1535
|
let t = /* @__PURE__ */ new Date();
|
|
1454
1536
|
return e.toDateString() === t.toDateString();
|
|
1455
1537
|
}
|
|
1456
|
-
function
|
|
1538
|
+
function Dt(e, t) {
|
|
1457
1539
|
return !e || !t ? !1 : e.toDateString() === t.toDateString();
|
|
1458
1540
|
}
|
|
1459
|
-
function
|
|
1541
|
+
function Ot(e) {
|
|
1460
1542
|
let t = e.getFullYear(), n = e.getMonth(), r = new Date(t, n, 1), i = new Date(t, n + 1, 0), a = r.getDay(), o = i.getDate(), s = [], c = new Date(t, n - 1, 0);
|
|
1461
1543
|
for (let e = a - 1; e >= 0; e--) s.push({
|
|
1462
1544
|
day: c.getDate() - e,
|
|
@@ -1476,7 +1558,7 @@ function xt(e) {
|
|
|
1476
1558
|
});
|
|
1477
1559
|
return s;
|
|
1478
1560
|
}
|
|
1479
|
-
function
|
|
1561
|
+
function kt(e = "md", t = "default", n = !1, r = !1, i = !1) {
|
|
1480
1562
|
let a = [
|
|
1481
1563
|
"wc-datepicker-wrapper",
|
|
1482
1564
|
`wc-datepicker-wrapper--${e}`,
|
|
@@ -1484,44 +1566,48 @@ function St(e = "md", t = "default", n = !1, r = !1, i = !1) {
|
|
|
1484
1566
|
];
|
|
1485
1567
|
return n && a.push("wc-datepicker-wrapper--disabled"), r && a.push("wc-datepicker-wrapper--focused"), i && a.push("wc-datepicker-wrapper--open"), a.join(" ");
|
|
1486
1568
|
}
|
|
1487
|
-
function
|
|
1569
|
+
function At(e, t) {
|
|
1488
1570
|
let n = ["wc-datepicker-day"];
|
|
1489
|
-
return e.month === "prev" && n.push("wc-datepicker-day--prev"), e.month === "next" && n.push("wc-datepicker-day--next"), e.month === "current" && n.push("wc-datepicker-day--current"), t &&
|
|
1571
|
+
return e.month === "prev" && n.push("wc-datepicker-day--prev"), e.month === "next" && n.push("wc-datepicker-day--next"), e.month === "current" && n.push("wc-datepicker-day--current"), t && Dt(e.date, t) && n.push("wc-datepicker-day--selected"), Et(e.date) && n.push("wc-datepicker-day--today"), n.join(" ");
|
|
1490
1572
|
}
|
|
1491
1573
|
//#endregion
|
|
1492
1574
|
//#region src/components/DatePicker/DatePicker.jsx
|
|
1493
|
-
function
|
|
1494
|
-
let v = u(null), y = s(), [
|
|
1575
|
+
function jt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选择日期", disabled: r = !1, size: i = "md", variant: a = "default", format: c = "YYYY-MM-DD", showToday: l = !0, minDate: f = null, maxDate: h = null, className: g = "", ..._ }) {
|
|
1576
|
+
let v = u(null), y = u(null), b = s(), [x, S] = d(!1), [C, w] = d(() => e ? new Date(e) : /* @__PURE__ */ new Date()), [T, E] = d(e ? new Date(e) : null);
|
|
1495
1577
|
o(() => {
|
|
1496
|
-
|
|
1497
|
-
}, [e]),
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1578
|
+
E(e ? new Date(e) : null);
|
|
1579
|
+
}, [e]), ae({
|
|
1580
|
+
open: x,
|
|
1581
|
+
elementRef: y,
|
|
1582
|
+
refs: [v],
|
|
1583
|
+
closeOnEscape: !0,
|
|
1584
|
+
closeOnPointerDownOutside: !0,
|
|
1585
|
+
onEscapeKeyDown: () => S(!1),
|
|
1586
|
+
onPointerDownOutside: () => S(!1),
|
|
1587
|
+
zIndex: 1e3
|
|
1588
|
+
});
|
|
1589
|
+
let D = T ? Tt(T, c) : "", O = () => {
|
|
1590
|
+
r || S((e) => !e);
|
|
1507
1591
|
}, k = (e) => {
|
|
1508
|
-
|
|
1592
|
+
r || (e.key === "Enter" || e.key === " " || e.key === "ArrowDown" ? (e.preventDefault(), S(!0)) : e.key === "Escape" && S(!1));
|
|
1593
|
+
}, A = (e) => {
|
|
1594
|
+
w((t) => {
|
|
1509
1595
|
let n = new Date(t);
|
|
1510
1596
|
return n.setMonth(n.getMonth() + e), n;
|
|
1511
1597
|
});
|
|
1512
|
-
},
|
|
1513
|
-
if (
|
|
1598
|
+
}, j = (e) => {
|
|
1599
|
+
if (P(e)) return;
|
|
1514
1600
|
let n = new Date(e.date);
|
|
1515
|
-
|
|
1516
|
-
}, j = () => {
|
|
1517
|
-
let e = /* @__PURE__ */ new Date();
|
|
1518
|
-
T(e), t(e), x(!1);
|
|
1601
|
+
E(n), t(n), S(!1);
|
|
1519
1602
|
}, M = () => {
|
|
1520
|
-
|
|
1521
|
-
|
|
1603
|
+
let e = /* @__PURE__ */ new Date();
|
|
1604
|
+
E(e), t(e), S(!1);
|
|
1605
|
+
}, N = () => {
|
|
1606
|
+
E(null), t(null), S(!1);
|
|
1607
|
+
}, P = (e) => {
|
|
1522
1608
|
let { date: t } = e;
|
|
1523
1609
|
return !!(f && t < (f instanceof Date ? f : new Date(f)) || h && t > (h instanceof Date ? h : new Date(h)));
|
|
1524
|
-
},
|
|
1610
|
+
}, F = Ot(C), I = [
|
|
1525
1611
|
"日",
|
|
1526
1612
|
"一",
|
|
1527
1613
|
"二",
|
|
@@ -1529,27 +1615,27 @@ function wt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1529
1615
|
"四",
|
|
1530
1616
|
"五",
|
|
1531
1617
|
"六"
|
|
1532
|
-
],
|
|
1618
|
+
], L = `${C.getFullYear()}年${C.getMonth() + 1}月`, R = [kt(i, a, r, !1, x), g].filter(Boolean).join(" ");
|
|
1533
1619
|
return /* @__PURE__ */ m("div", {
|
|
1534
1620
|
className: "wc-datepicker",
|
|
1535
1621
|
ref: v,
|
|
1536
1622
|
..._,
|
|
1537
1623
|
children: [/* @__PURE__ */ m("div", {
|
|
1538
|
-
className:
|
|
1539
|
-
onClick:
|
|
1624
|
+
className: R,
|
|
1625
|
+
onClick: O,
|
|
1540
1626
|
children: [/* @__PURE__ */ p("input", {
|
|
1541
1627
|
type: "text",
|
|
1542
|
-
id:
|
|
1628
|
+
id: b,
|
|
1543
1629
|
className: "wc-datepicker-input",
|
|
1544
|
-
value:
|
|
1630
|
+
value: D,
|
|
1545
1631
|
placeholder: n,
|
|
1546
1632
|
disabled: r,
|
|
1547
1633
|
readOnly: !0,
|
|
1548
1634
|
role: "combobox",
|
|
1549
1635
|
"aria-haspopup": "dialog",
|
|
1550
|
-
"aria-expanded":
|
|
1551
|
-
"aria-controls": `${
|
|
1552
|
-
onKeyDown:
|
|
1636
|
+
"aria-expanded": x,
|
|
1637
|
+
"aria-controls": `${b}-calendar`,
|
|
1638
|
+
onKeyDown: k
|
|
1553
1639
|
}), /* @__PURE__ */ p("span", {
|
|
1554
1640
|
className: "wc-datepicker-icon",
|
|
1555
1641
|
"aria-hidden": "true",
|
|
@@ -1567,9 +1653,10 @@ function wt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1567
1653
|
}), /* @__PURE__ */ p("path", { d: "M16 3v4M8 3v4M3 10h18" })]
|
|
1568
1654
|
})
|
|
1569
1655
|
})]
|
|
1570
|
-
}),
|
|
1656
|
+
}), x && /* @__PURE__ */ m("div", {
|
|
1657
|
+
ref: y,
|
|
1571
1658
|
className: "wc-datepicker-dropdown",
|
|
1572
|
-
id: `${
|
|
1659
|
+
id: `${b}-calendar`,
|
|
1573
1660
|
role: "dialog",
|
|
1574
1661
|
"aria-label": "选择日期",
|
|
1575
1662
|
children: [
|
|
@@ -1580,39 +1667,39 @@ function wt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1580
1667
|
type: "button",
|
|
1581
1668
|
className: "wc-datepicker-nav",
|
|
1582
1669
|
"aria-label": "上个月",
|
|
1583
|
-
onClick: () =>
|
|
1670
|
+
onClick: () => A(-1),
|
|
1584
1671
|
children: "‹"
|
|
1585
1672
|
}),
|
|
1586
1673
|
/* @__PURE__ */ p("span", {
|
|
1587
1674
|
className: "wc-datepicker-title",
|
|
1588
|
-
children:
|
|
1675
|
+
children: L
|
|
1589
1676
|
}),
|
|
1590
1677
|
/* @__PURE__ */ p("button", {
|
|
1591
1678
|
type: "button",
|
|
1592
1679
|
className: "wc-datepicker-nav",
|
|
1593
1680
|
"aria-label": "下个月",
|
|
1594
|
-
onClick: () =>
|
|
1681
|
+
onClick: () => A(1),
|
|
1595
1682
|
children: "›"
|
|
1596
1683
|
})
|
|
1597
1684
|
]
|
|
1598
1685
|
}),
|
|
1599
1686
|
/* @__PURE__ */ p("div", {
|
|
1600
1687
|
className: "wc-datepicker-weekdays",
|
|
1601
|
-
children:
|
|
1688
|
+
children: I.map((e) => /* @__PURE__ */ p("div", {
|
|
1602
1689
|
className: "wc-datepicker-weekday",
|
|
1603
1690
|
children: e
|
|
1604
1691
|
}, e))
|
|
1605
1692
|
}),
|
|
1606
1693
|
/* @__PURE__ */ p("div", {
|
|
1607
1694
|
className: "wc-datepicker-days",
|
|
1608
|
-
children:
|
|
1695
|
+
children: F.map((e) => /* @__PURE__ */ p("button", {
|
|
1609
1696
|
type: "button",
|
|
1610
|
-
className:
|
|
1611
|
-
disabled:
|
|
1612
|
-
"aria-label":
|
|
1613
|
-
"aria-selected":
|
|
1614
|
-
"aria-current":
|
|
1615
|
-
onClick: () =>
|
|
1697
|
+
className: At(e, T),
|
|
1698
|
+
disabled: P(e),
|
|
1699
|
+
"aria-label": Tt(e.date, "YYYY-MM-DD"),
|
|
1700
|
+
"aria-selected": Dt(e.date, T),
|
|
1701
|
+
"aria-current": Et(e.date) ? "date" : void 0,
|
|
1702
|
+
onClick: () => j(e),
|
|
1616
1703
|
children: e.day
|
|
1617
1704
|
}, `${e.month}-${e.day}`))
|
|
1618
1705
|
}),
|
|
@@ -1621,12 +1708,12 @@ function wt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1621
1708
|
children: [/* @__PURE__ */ p("button", {
|
|
1622
1709
|
type: "button",
|
|
1623
1710
|
className: "wc-datepicker-today",
|
|
1624
|
-
onClick:
|
|
1711
|
+
onClick: M,
|
|
1625
1712
|
children: "今天"
|
|
1626
1713
|
}), /* @__PURE__ */ p("button", {
|
|
1627
1714
|
type: "button",
|
|
1628
1715
|
className: "wc-datepicker-clear",
|
|
1629
|
-
onClick:
|
|
1716
|
+
onClick: N,
|
|
1630
1717
|
children: "清除"
|
|
1631
1718
|
})]
|
|
1632
1719
|
})
|
|
@@ -1636,7 +1723,7 @@ function wt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1636
1723
|
}
|
|
1637
1724
|
//#endregion
|
|
1638
1725
|
//#region src/components/Button/Fab.jsx
|
|
1639
|
-
var
|
|
1726
|
+
var Mt = ({ variant: e = "circular", size: t = "md", color: n = "primary", disabled: r = !1, label: i = "", icon: a = "", children: o, onClick: s, onFocus: c, onBlur: l, className: u = "", style: f = {}, ...h }) => {
|
|
1640
1727
|
let [g, _] = d(!1), v = ["circular", "extended"], y = [
|
|
1641
1728
|
"sm",
|
|
1642
1729
|
"md",
|
|
@@ -1677,10 +1764,10 @@ var Tt = ({ variant: e = "circular", size: t = "md", color: n = "primary", disab
|
|
|
1677
1764
|
})]
|
|
1678
1765
|
});
|
|
1679
1766
|
};
|
|
1680
|
-
|
|
1767
|
+
Mt.displayName = "Fab";
|
|
1681
1768
|
//#endregion
|
|
1682
1769
|
//#region src/components/Feed/Feed.jsx
|
|
1683
|
-
var
|
|
1770
|
+
var Nt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "var(--wc-accent)", dotSize: i = 8, lineWidth: a = 1, onItemClick: o }) => {
|
|
1684
1771
|
let s = Array.isArray(e.children) && e.children.length, c = typeof i == "number" ? `${i}px` : i, l = typeof a == "number" ? `${a}px` : a, u = {
|
|
1685
1772
|
"--feed-color": r,
|
|
1686
1773
|
"--feed-dot-size": c,
|
|
@@ -1722,7 +1809,7 @@ var Et = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1722
1809
|
}),
|
|
1723
1810
|
s && /* @__PURE__ */ p("ul", {
|
|
1724
1811
|
className: "wc-feed-children",
|
|
1725
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
1812
|
+
children: e.children.map((e) => /* @__PURE__ */ p(Nt, {
|
|
1726
1813
|
item: e,
|
|
1727
1814
|
showAvatar: t,
|
|
1728
1815
|
variant: n,
|
|
@@ -1735,7 +1822,7 @@ var Et = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1735
1822
|
]
|
|
1736
1823
|
})]
|
|
1737
1824
|
});
|
|
1738
|
-
},
|
|
1825
|
+
}, Pt = ({ items: e = [], variant: t = "timeline", showAvatar: n = !0, color: r = "var(--wc-accent)", dotSize: i = 8, lineWidth: a = 1, onItemClick: o, className: s = "" }) => {
|
|
1739
1826
|
let c = typeof a == "number" ? `${a}px` : a, l = {
|
|
1740
1827
|
"--feed-color": r,
|
|
1741
1828
|
"--feed-line-width": c
|
|
@@ -1743,7 +1830,7 @@ var Et = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1743
1830
|
return /* @__PURE__ */ p("ul", {
|
|
1744
1831
|
className: `wc-feed-list ${t} ${s}`,
|
|
1745
1832
|
style: l,
|
|
1746
|
-
children: e.map((e) => /* @__PURE__ */ p(
|
|
1833
|
+
children: e.map((e) => /* @__PURE__ */ p(Nt, {
|
|
1747
1834
|
item: e,
|
|
1748
1835
|
variant: t,
|
|
1749
1836
|
showAvatar: n,
|
|
@@ -1754,10 +1841,10 @@ var Et = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1754
1841
|
}, e.id || e.time))
|
|
1755
1842
|
});
|
|
1756
1843
|
};
|
|
1757
|
-
|
|
1844
|
+
Pt.displayName = "Feed";
|
|
1758
1845
|
//#endregion
|
|
1759
1846
|
//#region ../core/src/components/Feature/utils.jsx
|
|
1760
|
-
var
|
|
1847
|
+
var Ft = ({ align: e, size: t, background: n, reverse: r, vertical: i, clickable: a, disabled: o, className: s }) => [
|
|
1761
1848
|
"wc-feature-card",
|
|
1762
1849
|
a && "wc-feature-card--clickable",
|
|
1763
1850
|
o && "wc-feature-card--disabled",
|
|
@@ -1768,29 +1855,29 @@ var Ot = ({ align: e, size: t, background: n, reverse: r, vertical: i, clickable
|
|
|
1768
1855
|
`wc-feature-card--${e}`,
|
|
1769
1856
|
s
|
|
1770
1857
|
].filter(Boolean);
|
|
1771
|
-
function
|
|
1858
|
+
function It(e) {
|
|
1772
1859
|
return ["wc-feature-icon", `wc-feature-icon--${e}`].filter(Boolean);
|
|
1773
1860
|
}
|
|
1774
|
-
function
|
|
1861
|
+
function Lt(e) {
|
|
1775
1862
|
return ["wc-feature-content", `wc-feature-content--${e}`].filter(Boolean);
|
|
1776
1863
|
}
|
|
1777
|
-
function
|
|
1864
|
+
function Rt(e) {
|
|
1778
1865
|
return ["wc-feature-title", `wc-feature-title--${e}`].filter(Boolean);
|
|
1779
1866
|
}
|
|
1780
|
-
var
|
|
1781
|
-
function
|
|
1867
|
+
var zt = (e) => ["wc-feature-description", `wc-feature-description--${e}`].filter(Boolean);
|
|
1868
|
+
function Bt(e, t, n) {
|
|
1782
1869
|
!t && n && n(e);
|
|
1783
1870
|
}
|
|
1784
|
-
function
|
|
1871
|
+
function Vt(e, t) {
|
|
1785
1872
|
e.stopPropagation(), t && t(e);
|
|
1786
1873
|
}
|
|
1787
|
-
function
|
|
1874
|
+
function Ht(e) {
|
|
1788
1875
|
return e;
|
|
1789
1876
|
}
|
|
1790
1877
|
//#endregion
|
|
1791
1878
|
//#region src/components/Feature/Feature.jsx
|
|
1792
|
-
var
|
|
1793
|
-
let b =
|
|
1879
|
+
var Ut = ({ title: e = "Awesome Feature", description: t = "Feature description goes here.", icon: n = "", iconSize: r = 48, size: i = "md", align: a = "left", background: o = "default", variant: s = "default", bgColor: c = "", reverse: l = !1, vertical: u = !1, ctaLabel: d = "", ctaHref: f = "#", onClick: h, onCtaClick: g, children: _, className: v = "", style: y = {} }) => {
|
|
1880
|
+
let b = Ft({
|
|
1794
1881
|
align: a,
|
|
1795
1882
|
size: i,
|
|
1796
1883
|
background: o,
|
|
@@ -1799,7 +1886,7 @@ var It = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1799
1886
|
clickable: !!h,
|
|
1800
1887
|
disabled: !1,
|
|
1801
1888
|
className: v
|
|
1802
|
-
}).join(" "), x =
|
|
1889
|
+
}).join(" "), x = It(r).join(" "), S = Lt(a).join(" "), C = Rt(i).join(" "), w = zt(i).join(" "), T = {
|
|
1803
1890
|
...c ? { background: c } : {},
|
|
1804
1891
|
...y
|
|
1805
1892
|
}, E = typeof r == "number" ? `${r}px` : r, D = h ? {
|
|
@@ -1812,7 +1899,7 @@ var It = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1812
1899
|
return /* @__PURE__ */ m("div", {
|
|
1813
1900
|
className: `${b} ${s === "default" ? "" : `wc-feature-card--${s}`}`,
|
|
1814
1901
|
style: T,
|
|
1815
|
-
onClick: (e) =>
|
|
1902
|
+
onClick: (e) => Bt(e, !1, h),
|
|
1816
1903
|
...D,
|
|
1817
1904
|
children: [n && /* @__PURE__ */ p("div", {
|
|
1818
1905
|
className: x,
|
|
@@ -1823,7 +1910,7 @@ var It = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1823
1910
|
children: typeof n == "string" ? /* @__PURE__ */ p("span", {
|
|
1824
1911
|
className: "wc-feature-icon__inner",
|
|
1825
1912
|
dangerouslySetInnerHTML: { __html: n }
|
|
1826
|
-
}) :
|
|
1913
|
+
}) : Ht(n)
|
|
1827
1914
|
}), /* @__PURE__ */ m("div", {
|
|
1828
1915
|
className: S,
|
|
1829
1916
|
children: [
|
|
@@ -1838,17 +1925,17 @@ var It = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1838
1925
|
d && /* @__PURE__ */ p("a", {
|
|
1839
1926
|
href: f,
|
|
1840
1927
|
className: "wc-feature-cta",
|
|
1841
|
-
onClick: (e) =>
|
|
1928
|
+
onClick: (e) => Vt(e, g),
|
|
1842
1929
|
children: d
|
|
1843
1930
|
})
|
|
1844
1931
|
]
|
|
1845
1932
|
})]
|
|
1846
1933
|
});
|
|
1847
1934
|
};
|
|
1848
|
-
|
|
1935
|
+
Ut.displayName = "Feature";
|
|
1849
1936
|
//#endregion
|
|
1850
1937
|
//#region src/components/FileInput/FileInput.jsx
|
|
1851
|
-
var
|
|
1938
|
+
var Wt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
1852
1939
|
className: e,
|
|
1853
1940
|
"aria-hidden": "true",
|
|
1854
1941
|
children: /* @__PURE__ */ m("svg", {
|
|
@@ -1858,7 +1945,7 @@ var Lt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
1858
1945
|
strokeWidth: "2",
|
|
1859
1946
|
children: [/* @__PURE__ */ p("path", { d: "M12 16V4m0 0L7 9m5-5 5 5" }), /* @__PURE__ */ p("path", { d: "M5 14v4a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-4" })]
|
|
1860
1947
|
})
|
|
1861
|
-
}),
|
|
1948
|
+
}), Gt = ({ multiple: e = !1, variant: t = "block", accept: n = "", label: r = "选择文件", description: i = "或拖放到这里", disabled: a = !1, onChange: o, onInvalid: s, className: c = "", style: l = {} }) => {
|
|
1862
1949
|
let [u, h] = d(!1), g = (e) => {
|
|
1863
1950
|
if (!n) return !0;
|
|
1864
1951
|
let t = n.split(",").map((e) => e.trim().toLowerCase()), r = [...e].filter((e) => !t.some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.toLowerCase().startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t));
|
|
@@ -1901,7 +1988,7 @@ var Lt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
1901
1988
|
"aria-label": r,
|
|
1902
1989
|
onChange: _
|
|
1903
1990
|
}),
|
|
1904
|
-
t === "block" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
1991
|
+
t === "block" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Wt, { className: "wc-file-input__upload-icon" }), /* @__PURE__ */ m("span", {
|
|
1905
1992
|
className: "wc-file-input-content",
|
|
1906
1993
|
children: [/* @__PURE__ */ p("strong", {
|
|
1907
1994
|
className: "wc-file-input-content__title",
|
|
@@ -1919,14 +2006,14 @@ var Lt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
1919
2006
|
children: "+"
|
|
1920
2007
|
}), r]
|
|
1921
2008
|
}),
|
|
1922
|
-
t === "icon" && /* @__PURE__ */ p(
|
|
2009
|
+
t === "icon" && /* @__PURE__ */ p(Wt, { className: "wc-file-icon" })
|
|
1923
2010
|
]
|
|
1924
2011
|
});
|
|
1925
2012
|
};
|
|
1926
|
-
|
|
2013
|
+
Gt.displayName = "FileInput";
|
|
1927
2014
|
//#endregion
|
|
1928
2015
|
//#region src/components/Form/FormControl.jsx
|
|
1929
|
-
var
|
|
2016
|
+
var Kt = n(null), qt = ({ disabled: e = !1, error: t = !1, required: n = !1, variant: r = "filled", size: i = "md", fullWidth: a = !1, margin: o = "normal", className: s = "", style: c = {}, children: u, ...d }) => {
|
|
1930
2017
|
let f = l(() => ({
|
|
1931
2018
|
disabled: e,
|
|
1932
2019
|
error: t,
|
|
@@ -1948,7 +2035,7 @@ var zt = n(null), Bt = ({ disabled: e = !1, error: t = !1, required: n = !1, var
|
|
|
1948
2035
|
t && "form-control--error",
|
|
1949
2036
|
s
|
|
1950
2037
|
].filter(Boolean).join(" ");
|
|
1951
|
-
return /* @__PURE__ */ p(
|
|
2038
|
+
return /* @__PURE__ */ p(Kt.Provider, {
|
|
1952
2039
|
value: f,
|
|
1953
2040
|
children: /* @__PURE__ */ p("div", {
|
|
1954
2041
|
className: m,
|
|
@@ -1958,10 +2045,10 @@ var zt = n(null), Bt = ({ disabled: e = !1, error: t = !1, required: n = !1, var
|
|
|
1958
2045
|
})
|
|
1959
2046
|
});
|
|
1960
2047
|
};
|
|
1961
|
-
|
|
2048
|
+
qt.displayName = "FormControl";
|
|
1962
2049
|
//#endregion
|
|
1963
2050
|
//#region src/components/Form/FormControlLabel.jsx
|
|
1964
|
-
var
|
|
2051
|
+
var Jt = ({ label: e, labelPlacement: t = "end", disabled: n = !1, required: r = !1, checked: i, value: a, control: o, className: s = "", style: c = {}, onChange: l, children: u, ...d }) => {
|
|
1965
2052
|
let f = (e) => {
|
|
1966
2053
|
n || l?.(e);
|
|
1967
2054
|
}, h = [
|
|
@@ -2000,10 +2087,10 @@ var Vt = ({ label: e, labelPlacement: t = "end", disabled: n = !1, required: r =
|
|
|
2000
2087
|
]
|
|
2001
2088
|
});
|
|
2002
2089
|
};
|
|
2003
|
-
|
|
2090
|
+
Jt.displayName = "FormControlLabel";
|
|
2004
2091
|
//#endregion
|
|
2005
2092
|
//#region src/components/Form/FormGroup.jsx
|
|
2006
|
-
var
|
|
2093
|
+
var Yt = ({ row: e = !1, spacing: t = "normal", className: n = "", style: r = {}, children: i, ...a }) => /* @__PURE__ */ p("div", {
|
|
2007
2094
|
className: [
|
|
2008
2095
|
"form-group",
|
|
2009
2096
|
e && "form-group--row",
|
|
@@ -2015,11 +2102,11 @@ var Ht = ({ row: e = !1, spacing: t = "normal", className: n = "", style: r = {}
|
|
|
2015
2102
|
...a,
|
|
2016
2103
|
children: i
|
|
2017
2104
|
});
|
|
2018
|
-
|
|
2105
|
+
Yt.displayName = "FormGroup";
|
|
2019
2106
|
//#endregion
|
|
2020
2107
|
//#region src/components/Form/FormHelperText.jsx
|
|
2021
|
-
var
|
|
2022
|
-
let h = a(
|
|
2108
|
+
var Xt = ({ disabled: e = !1, error: t = !1, filled: n = !1, focused: r = !1, margin: i = "normal", required: o = !1, variant: s = "filled", id: c, size: l = "md", className: u = "", style: d = {}, children: f, ...m }) => {
|
|
2109
|
+
let h = a(Kt) || {}, g = t || h.error, _ = e || h.disabled;
|
|
2023
2110
|
return /* @__PURE__ */ p("p", {
|
|
2024
2111
|
id: c,
|
|
2025
2112
|
className: [
|
|
@@ -2039,55 +2126,55 @@ var Ut = ({ disabled: e = !1, error: t = !1, filled: n = !1, focused: r = !1, ma
|
|
|
2039
2126
|
children: f
|
|
2040
2127
|
});
|
|
2041
2128
|
};
|
|
2042
|
-
|
|
2129
|
+
Xt.displayName = "FormHelperText";
|
|
2043
2130
|
//#endregion
|
|
2044
2131
|
//#region ../core/src/components/Grid/utils.jsx
|
|
2045
|
-
var
|
|
2132
|
+
var Zt = {
|
|
2046
2133
|
xs: "xs",
|
|
2047
2134
|
sm: "sm",
|
|
2048
2135
|
md: "md",
|
|
2049
2136
|
lg: "lg",
|
|
2050
2137
|
xl: "xl"
|
|
2051
|
-
},
|
|
2138
|
+
}, Qt = {
|
|
2052
2139
|
row: "wc-grid-container--row",
|
|
2053
2140
|
column: "wc-grid-container--column",
|
|
2054
2141
|
"row-reverse": "wc-grid-container--row-reverse",
|
|
2055
2142
|
"column-reverse": "wc-grid-container--column-reverse"
|
|
2056
|
-
},
|
|
2143
|
+
}, $t = {
|
|
2057
2144
|
"flex-start": "wc-grid-container--justify-start",
|
|
2058
2145
|
center: "wc-grid-container--justify-center",
|
|
2059
2146
|
"flex-end": "wc-grid-container--justify-end",
|
|
2060
2147
|
"space-between": "wc-grid-container--justify-between",
|
|
2061
2148
|
"space-around": "wc-grid-container--justify-around",
|
|
2062
2149
|
"space-evenly": "wc-grid-container--justify-evenly"
|
|
2063
|
-
},
|
|
2150
|
+
}, en = {
|
|
2064
2151
|
"flex-start": "wc-grid-container--align-start",
|
|
2065
2152
|
center: "wc-grid-container--align-center",
|
|
2066
2153
|
"flex-end": "wc-grid-container--align-end",
|
|
2067
2154
|
stretch: "wc-grid-container--align-stretch",
|
|
2068
2155
|
baseline: "wc-grid-container--align-baseline"
|
|
2069
|
-
},
|
|
2156
|
+
}, tn = (e) => {
|
|
2070
2157
|
let { direction: t = "row", justifyContent: n = "flex-start", alignItems: r = "stretch", spacing: i = 0 } = e, a = ["wc-grid", "wc-grid-container"];
|
|
2071
|
-
return
|
|
2072
|
-
},
|
|
2158
|
+
return Qt[t] && a.push(Qt[t]), $t[n] && a.push($t[n]), en[r] && a.push(en[r]), a.push(...rn(i)), a;
|
|
2159
|
+
}, nn = (e) => {
|
|
2073
2160
|
let { xs: t, sm: n, md: r, lg: i, xl: a } = e, o = ["wc-grid", "wc-grid-item"];
|
|
2074
|
-
return Object.entries(
|
|
2161
|
+
return Object.entries(Zt).forEach(([t, n]) => {
|
|
2075
2162
|
let r = e[t];
|
|
2076
|
-
r !== void 0 && o.push(...
|
|
2163
|
+
r !== void 0 && o.push(...an(r, n));
|
|
2077
2164
|
}), o;
|
|
2078
|
-
},
|
|
2165
|
+
}, rn = (e) => {
|
|
2079
2166
|
let t = Number(e);
|
|
2080
2167
|
return [`wc-grid-container--spacing-${Number.isFinite(t) ? Math.max(0, Math.min(12, Math.round(t))) : 0}`];
|
|
2081
|
-
},
|
|
2168
|
+
}, an = (e, t) => {
|
|
2082
2169
|
if (e === !1 || e == null) return [];
|
|
2083
2170
|
if (e === "auto") return [`wc-grid-item--${t}-auto`];
|
|
2084
2171
|
if (e === !0) return [`wc-grid-item--${t}-true`];
|
|
2085
2172
|
let n = Number(e);
|
|
2086
2173
|
return Number.isFinite(n) && n >= 1 && n <= 12 ? [`wc-grid-item--${t}-${Math.round(n)}`] : [];
|
|
2087
|
-
},
|
|
2174
|
+
}, on = (e) => {
|
|
2088
2175
|
let { container: t = !1, item: n = !1, className: r = "" } = e, i = [];
|
|
2089
|
-
return t && i.push(...
|
|
2090
|
-
},
|
|
2176
|
+
return t && i.push(...tn(e)), n && i.push(...nn(e)), r && i.push(r), i;
|
|
2177
|
+
}, sn = (e) => {
|
|
2091
2178
|
let t = { ...e };
|
|
2092
2179
|
return t.spacing !== void 0 && (t.spacing = Number(t.spacing) || 0), [
|
|
2093
2180
|
"xs",
|
|
@@ -2102,8 +2189,8 @@ var Wt = {
|
|
|
2102
2189
|
isNaN(r) || (t[e] = Math.max(1, Math.min(12, r)));
|
|
2103
2190
|
}
|
|
2104
2191
|
}), t;
|
|
2105
|
-
},
|
|
2106
|
-
className:
|
|
2192
|
+
}, cn = ({ container: e = !1, item: t = !1, xs: n, sm: r, md: i, lg: a, xl: o, spacing: s = 0, direction: c = "row", justifyContent: l = "flex-start", alignItems: u = "stretch", className: d = "", style: f = {}, children: m, ...h }) => /* @__PURE__ */ p("div", {
|
|
2193
|
+
className: on(sn({
|
|
2107
2194
|
container: e,
|
|
2108
2195
|
item: t,
|
|
2109
2196
|
xs: n,
|
|
@@ -2121,57 +2208,79 @@ var Wt = {
|
|
|
2121
2208
|
...h,
|
|
2122
2209
|
children: m
|
|
2123
2210
|
});
|
|
2124
|
-
|
|
2211
|
+
cn.displayName = "Grid";
|
|
2125
2212
|
//#endregion
|
|
2126
2213
|
//#region src/components/HoverCard/HoverCard.jsx
|
|
2127
|
-
var
|
|
2128
|
-
let T = s(), [E, D] = d(!1), O = u(null), k = u(null), A = u(null), j = `${T}-trigger`,
|
|
2214
|
+
var ln = ({ triggerText: e = "Hover me", cardData: t = {}, variant: n = "default", size: r = "md", cardSize: i = "md", position: a = "top", delay: c = 300, hideDelay: l = 100, showArrow: h = !1, disabled: g = !1, onShow: _, onHide: v, onAction: y, className: b = "", style: x = {}, children: S, card: C, ...w }) => {
|
|
2215
|
+
let T = s(), [E, D] = d(!1), O = u(null), k = u(null), A = u(null), j = u(null), M = `${T}-trigger`, N = () => {
|
|
2129
2216
|
clearTimeout(O.current), clearTimeout(k.current);
|
|
2130
|
-
},
|
|
2131
|
-
g || (
|
|
2217
|
+
}, P = () => {
|
|
2218
|
+
g || (N(), O.current = setTimeout(() => {
|
|
2132
2219
|
D(!0), _?.();
|
|
2133
2220
|
}, c));
|
|
2134
|
-
},
|
|
2135
|
-
g || (
|
|
2221
|
+
}, F = () => {
|
|
2222
|
+
g || (N(), k.current = setTimeout(() => {
|
|
2136
2223
|
D(!1), v?.();
|
|
2137
2224
|
}, l));
|
|
2138
2225
|
};
|
|
2139
|
-
o(() => () =>
|
|
2140
|
-
let
|
|
2226
|
+
o(() => () => N(), []);
|
|
2227
|
+
let I = (e) => {
|
|
2141
2228
|
y?.(e), e?.onClick?.();
|
|
2142
|
-
},
|
|
2229
|
+
}, L = [
|
|
2143
2230
|
"hover-card-container",
|
|
2144
2231
|
`hover-card-${n}`,
|
|
2145
2232
|
`hover-card-size-${r}`,
|
|
2146
2233
|
g && "hover-card-disabled",
|
|
2147
2234
|
b
|
|
2148
|
-
].filter(Boolean).join(" "),
|
|
2235
|
+
].filter(Boolean).join(" "), R = [
|
|
2149
2236
|
"hover-card-popup",
|
|
2150
2237
|
`hover-card-position-${a}`,
|
|
2151
2238
|
`hover-card-card-size-${i}`
|
|
2152
|
-
].join(" ")
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2239
|
+
].join(" "), z = J({
|
|
2240
|
+
open: E,
|
|
2241
|
+
anchorRef: j,
|
|
2242
|
+
floatingRef: A,
|
|
2243
|
+
placement: a,
|
|
2244
|
+
offset: 8
|
|
2245
|
+
});
|
|
2246
|
+
return ae({
|
|
2247
|
+
open: E,
|
|
2248
|
+
elementRef: A,
|
|
2249
|
+
refs: [j],
|
|
2250
|
+
closeOnEscape: !0,
|
|
2251
|
+
closeOnPointerDownOutside: !0,
|
|
2252
|
+
onEscapeKeyDown: () => {
|
|
2253
|
+
D(!1), v?.(), j.current?.focus();
|
|
2254
|
+
},
|
|
2255
|
+
onPointerDownOutside: () => {
|
|
2256
|
+
D(!1), v?.();
|
|
2257
|
+
},
|
|
2258
|
+
zIndex: 1e3
|
|
2259
|
+
}), /* @__PURE__ */ m("div", {
|
|
2260
|
+
className: L,
|
|
2261
|
+
onMouseEnter: P,
|
|
2262
|
+
onMouseLeave: F,
|
|
2263
|
+
onTouchStart: P,
|
|
2264
|
+
onTouchEnd: F,
|
|
2265
|
+
onFocus: P,
|
|
2266
|
+
onBlur: F,
|
|
2161
2267
|
style: x,
|
|
2162
2268
|
...w,
|
|
2163
2269
|
children: [/* @__PURE__ */ p("span", {
|
|
2164
|
-
|
|
2270
|
+
ref: j,
|
|
2271
|
+
id: M,
|
|
2165
2272
|
className: "hover-card-trigger",
|
|
2166
2273
|
tabIndex: g ? -1 : 0,
|
|
2167
2274
|
"aria-describedby": E ? T : void 0,
|
|
2168
2275
|
children: S || e
|
|
2169
|
-
}), E && /* @__PURE__ */ m("div", {
|
|
2276
|
+
}), E && /* @__PURE__ */ p(q, { children: /* @__PURE__ */ m("div", {
|
|
2170
2277
|
ref: A,
|
|
2171
2278
|
id: T,
|
|
2172
|
-
className:
|
|
2279
|
+
className: `${R} hover-card-position-${z}`.trim(),
|
|
2173
2280
|
role: "dialog",
|
|
2174
2281
|
"aria-labelledby": t.title ? `${T}-title` : void 0,
|
|
2282
|
+
onMouseEnter: P,
|
|
2283
|
+
onMouseLeave: F,
|
|
2175
2284
|
children: [h && /* @__PURE__ */ p("div", { className: `hover-card-arrow hover-card-arrow-${a}` }), /* @__PURE__ */ p("div", {
|
|
2176
2285
|
className: "hover-card-content",
|
|
2177
2286
|
children: C ? typeof C == "function" ? C(t) : C : /* @__PURE__ */ m(f, { children: [t.image && /* @__PURE__ */ p("div", {
|
|
@@ -2203,20 +2312,20 @@ var tn = ({ triggerText: e = "Hover me", cardData: t = {}, variant: n = "default
|
|
|
2203
2312
|
className: "hover-card-actions",
|
|
2204
2313
|
children: t.actions.map((e, t) => /* @__PURE__ */ p("button", {
|
|
2205
2314
|
className: "hover-card-action-btn",
|
|
2206
|
-
onClick: () =>
|
|
2315
|
+
onClick: () => I(e),
|
|
2207
2316
|
children: e.label
|
|
2208
2317
|
}, t))
|
|
2209
2318
|
})
|
|
2210
2319
|
]
|
|
2211
2320
|
})] })
|
|
2212
2321
|
})]
|
|
2213
|
-
})]
|
|
2322
|
+
}) })]
|
|
2214
2323
|
});
|
|
2215
2324
|
};
|
|
2216
|
-
|
|
2325
|
+
ln.displayName = "HoverCard";
|
|
2217
2326
|
//#endregion
|
|
2218
2327
|
//#region ../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
|
|
2219
|
-
var
|
|
2328
|
+
var un = /* @__PURE__ */ R(((e) => {
|
|
2220
2329
|
var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
|
|
2221
2330
|
function b(e) {
|
|
2222
2331
|
if (typeof e == "object" && e) {
|
|
@@ -2272,7 +2381,7 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2272
2381
|
}, e.isValidElementType = function(e) {
|
|
2273
2382
|
return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
|
|
2274
2383
|
}, e.typeOf = b;
|
|
2275
|
-
})),
|
|
2384
|
+
})), dn = /* @__PURE__ */ R(((e) => {
|
|
2276
2385
|
process.env.NODE_ENV !== "production" && (function() {
|
|
2277
2386
|
var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
|
|
2278
2387
|
function b(e) {
|
|
@@ -2343,14 +2452,14 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2343
2452
|
function ne(e) {
|
|
2344
2453
|
return x(e) === a;
|
|
2345
2454
|
}
|
|
2346
|
-
function
|
|
2455
|
+
function re(e) {
|
|
2347
2456
|
return x(e) === f;
|
|
2348
2457
|
}
|
|
2349
|
-
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = R, e.isContextProvider = z, e.isElement = B, e.isForwardRef = V, e.isFragment = H, e.isLazy = U, e.isMemo = W, e.isPortal = ee, e.isProfiler = te, e.isStrictMode = ne, e.isSuspense =
|
|
2458
|
+
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = R, e.isContextProvider = z, e.isElement = B, e.isForwardRef = V, e.isFragment = H, e.isLazy = U, e.isMemo = W, e.isPortal = ee, e.isProfiler = te, e.isStrictMode = ne, e.isSuspense = re, e.isValidElementType = b, e.typeOf = x;
|
|
2350
2459
|
})();
|
|
2351
|
-
})),
|
|
2352
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
2353
|
-
})),
|
|
2460
|
+
})), fn = /* @__PURE__ */ R(((e, t) => {
|
|
2461
|
+
process.env.NODE_ENV === "production" ? t.exports = un() : t.exports = dn();
|
|
2462
|
+
})), pn = /* @__PURE__ */ R(((e, t) => {
|
|
2354
2463
|
var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
2355
2464
|
function a(e) {
|
|
2356
2465
|
if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
|
|
@@ -2383,14 +2492,14 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2383
2492
|
}
|
|
2384
2493
|
return s;
|
|
2385
2494
|
};
|
|
2386
|
-
})),
|
|
2495
|
+
})), mn = /* @__PURE__ */ R(((e, t) => {
|
|
2387
2496
|
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
2388
|
-
})),
|
|
2497
|
+
})), hn = /* @__PURE__ */ R(((e, t) => {
|
|
2389
2498
|
t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
2390
|
-
})),
|
|
2499
|
+
})), gn = /* @__PURE__ */ R(((e, t) => {
|
|
2391
2500
|
var n = function() {};
|
|
2392
2501
|
if (process.env.NODE_ENV !== "production") {
|
|
2393
|
-
var r =
|
|
2502
|
+
var r = mn(), i = {}, a = hn();
|
|
2394
2503
|
n = function(e) {
|
|
2395
2504
|
var t = "Warning: " + e;
|
|
2396
2505
|
typeof console < "u" && console.error(t);
|
|
@@ -2423,8 +2532,8 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2423
2532
|
o.resetWarningCache = function() {
|
|
2424
2533
|
process.env.NODE_ENV !== "production" && (i = {});
|
|
2425
2534
|
}, t.exports = o;
|
|
2426
|
-
})),
|
|
2427
|
-
var n =
|
|
2535
|
+
})), _n = /* @__PURE__ */ R(((e, t) => {
|
|
2536
|
+
var n = fn(), r = pn(), i = mn(), a = hn(), o = gn(), s = function() {};
|
|
2428
2537
|
process.env.NODE_ENV !== "production" && (s = function(e) {
|
|
2429
2538
|
var t = "Warning: " + e;
|
|
2430
2539
|
typeof console < "u" && console.error(t);
|
|
@@ -2682,8 +2791,8 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2682
2791
|
}
|
|
2683
2792
|
return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
|
|
2684
2793
|
};
|
|
2685
|
-
})),
|
|
2686
|
-
var n =
|
|
2794
|
+
})), vn = /* @__PURE__ */ R(((e, t) => {
|
|
2795
|
+
var n = mn();
|
|
2687
2796
|
function r() {}
|
|
2688
2797
|
function i() {}
|
|
2689
2798
|
i.resetWarningCache = r, t.exports = function() {
|
|
@@ -2722,42 +2831,42 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2722
2831
|
};
|
|
2723
2832
|
return a.PropTypes = a, a;
|
|
2724
2833
|
};
|
|
2725
|
-
})), $ = /* @__PURE__ */
|
|
2834
|
+
})), $ = /* @__PURE__ */ B((/* @__PURE__ */ R(((e, t) => {
|
|
2726
2835
|
if (process.env.NODE_ENV !== "production") {
|
|
2727
|
-
var n =
|
|
2728
|
-
t.exports =
|
|
2729
|
-
} else t.exports =
|
|
2730
|
-
})))(), 1),
|
|
2836
|
+
var n = fn();
|
|
2837
|
+
t.exports = _n()(n.isElement, !0);
|
|
2838
|
+
} else t.exports = vn()();
|
|
2839
|
+
})))(), 1), yn = ({ className: e, style: t }) => /* @__PURE__ */ p("span", {
|
|
2731
2840
|
className: e,
|
|
2732
2841
|
style: t
|
|
2733
|
-
}),
|
|
2842
|
+
}), bn = {
|
|
2734
2843
|
lucide: () => import("@zeturn/watercolor-icons-lucide-react"),
|
|
2735
2844
|
heroicons: () => import("@zeturn/watercolor-icons-heroicons-react"),
|
|
2736
2845
|
tabler: () => import("@zeturn/watercolor-icons-tabler-react"),
|
|
2737
2846
|
phosphor: () => import("@zeturn/watercolor-icons-phosphor-react"),
|
|
2738
2847
|
feather: () => import("@zeturn/watercolor-icons-feather")
|
|
2739
|
-
},
|
|
2740
|
-
let t =
|
|
2848
|
+
}, xn = (e) => {
|
|
2849
|
+
let t = bn[e];
|
|
2741
2850
|
return t ? t() : Promise.resolve(null);
|
|
2742
|
-
},
|
|
2851
|
+
}, Sn = (e, t) => r(() => e().then((e) => ({ default: t(e || {}) })).catch((e) => (console.warn("[Icon] 动态导入失败,已回退到占位符图标。", e), { default: yn }))), Cn = (e, t, n) => {
|
|
2743
2852
|
switch (e) {
|
|
2744
|
-
case "lucide": return
|
|
2745
|
-
case "heroicons": return
|
|
2746
|
-
case "tabler": return
|
|
2747
|
-
case "phosphor": return
|
|
2853
|
+
case "lucide": return Sn(() => xn("lucide"), (e) => e.getIcon?.(t) || yn);
|
|
2854
|
+
case "heroicons": return Sn(() => xn("heroicons"), (e) => e.getIcon?.(t, n) || yn);
|
|
2855
|
+
case "tabler": return Sn(() => xn("tabler"), (e) => e.getIcon?.(t) || yn);
|
|
2856
|
+
case "phosphor": return Sn(() => xn("phosphor"), (e) => e.getIcon?.(t) || yn);
|
|
2748
2857
|
default: return null;
|
|
2749
2858
|
}
|
|
2750
|
-
},
|
|
2859
|
+
}, wn = (e) => typeof e == "number" ? e : {
|
|
2751
2860
|
xs: 16,
|
|
2752
2861
|
sm: 20,
|
|
2753
2862
|
md: 24,
|
|
2754
2863
|
lg: 32,
|
|
2755
2864
|
xl: 48
|
|
2756
|
-
}[e] || parseInt(e) || 24,
|
|
2865
|
+
}[e] || parseInt(e) || 24, Tn = ({ library: e = "lucide", name: n = "", html: i = "", size: a = 24, color: o = "currentColor", strokeWidth: s = 2, variant: c = "outline", className: u = "", children: d, ...f }) => {
|
|
2757
2866
|
let m = l(() => {
|
|
2758
2867
|
if (!n) return null;
|
|
2759
2868
|
try {
|
|
2760
|
-
return
|
|
2869
|
+
return Cn(e, n, c);
|
|
2761
2870
|
} catch {
|
|
2762
2871
|
return console.warn(`Icon "${n}" not found in library "${e}"`), null;
|
|
2763
2872
|
}
|
|
@@ -2767,7 +2876,7 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2767
2876
|
c
|
|
2768
2877
|
]), h = l(() => e === "feather" && n ? r(async () => {
|
|
2769
2878
|
try {
|
|
2770
|
-
let e =
|
|
2879
|
+
let e = wn(a), { getFeatherSvg: t } = await xn("feather") || {}, r = await t(n, {
|
|
2771
2880
|
width: e,
|
|
2772
2881
|
height: e,
|
|
2773
2882
|
strokeWidth: Number(s)
|
|
@@ -2788,13 +2897,13 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2788
2897
|
]), g = l(() => e === "html" && i ? i : "", [e, i]), _ = l(() => {
|
|
2789
2898
|
let e = {};
|
|
2790
2899
|
if (o && o !== "currentColor" && (e.color = o), a) {
|
|
2791
|
-
let t =
|
|
2900
|
+
let t = wn(a);
|
|
2792
2901
|
e.width = `${t}px`, e.height = `${t}px`;
|
|
2793
2902
|
}
|
|
2794
2903
|
return e;
|
|
2795
2904
|
}, [o, a]), v = l(() => {
|
|
2796
2905
|
let t = {
|
|
2797
|
-
size:
|
|
2906
|
+
size: wn(a),
|
|
2798
2907
|
color: o,
|
|
2799
2908
|
...f
|
|
2800
2909
|
};
|
|
@@ -2835,7 +2944,7 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2835
2944
|
children: d
|
|
2836
2945
|
});
|
|
2837
2946
|
};
|
|
2838
|
-
|
|
2947
|
+
Tn.propTypes = {
|
|
2839
2948
|
library: $.default.oneOf([
|
|
2840
2949
|
"lucide",
|
|
2841
2950
|
"heroicons",
|
|
@@ -2859,7 +2968,7 @@ vn.propTypes = {
|
|
|
2859
2968
|
};
|
|
2860
2969
|
//#endregion
|
|
2861
2970
|
//#region src/components/Button/IconButton.jsx
|
|
2862
|
-
var
|
|
2971
|
+
var En = ({ color: e = "default", size: t = "md", edge: n = !1, disabled: r = !1, icon: i = "", children: a, onClick: o, onFocus: s, onBlur: c, className: l = "", style: u = {}, ...d }) => {
|
|
2863
2972
|
let f = [
|
|
2864
2973
|
"default",
|
|
2865
2974
|
"primary",
|
|
@@ -2901,10 +3010,10 @@ var yn = ({ color: e = "default", size: t = "md", edge: n = !1, disabled: r = !1
|
|
|
2901
3010
|
})
|
|
2902
3011
|
});
|
|
2903
3012
|
};
|
|
2904
|
-
|
|
3013
|
+
En.displayName = "IconButton";
|
|
2905
3014
|
//#endregion
|
|
2906
3015
|
//#region src/components/ImageGallery/ImageGallery.jsx
|
|
2907
|
-
var
|
|
3016
|
+
var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", columns: i = 3, gap: a = 16, showInfo: s = !0, showCount: c = !0, showDownload: l = !1, showPagination: u = !1, itemsPerPage: f = 12, lazyLoad: h = !0, loading: g = !1, className: _ = "", style: v = {}, onSelect: y, onDownload: b, onLightboxOpen: x, onLightboxClose: S, ...C }) => {
|
|
2908
3017
|
let [w, T] = d(-1), [E, D] = d(1), O = u ? Math.ceil(e.length / f) : 1, k = {
|
|
2909
3018
|
sm: "75%",
|
|
2910
3019
|
md: "66.67%",
|
|
@@ -3109,10 +3218,10 @@ var bn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3109
3218
|
]
|
|
3110
3219
|
});
|
|
3111
3220
|
};
|
|
3112
|
-
|
|
3221
|
+
Dn.displayName = "ImageGallery";
|
|
3113
3222
|
//#endregion
|
|
3114
3223
|
//#region src/composition.ts
|
|
3115
|
-
var
|
|
3224
|
+
var On = [
|
|
3116
3225
|
"none",
|
|
3117
3226
|
"2xs",
|
|
3118
3227
|
"xs",
|
|
@@ -3122,40 +3231,40 @@ var xn = [
|
|
|
3122
3231
|
"xl",
|
|
3123
3232
|
"2xl",
|
|
3124
3233
|
"3xl"
|
|
3125
|
-
],
|
|
3234
|
+
], kn = [
|
|
3126
3235
|
"stretch",
|
|
3127
3236
|
"start",
|
|
3128
3237
|
"center",
|
|
3129
3238
|
"end"
|
|
3130
|
-
],
|
|
3239
|
+
], An = [
|
|
3131
3240
|
"sm",
|
|
3132
3241
|
"md",
|
|
3133
3242
|
"lg",
|
|
3134
3243
|
"xl",
|
|
3135
3244
|
"full"
|
|
3136
|
-
],
|
|
3245
|
+
], jn = [
|
|
3137
3246
|
"none",
|
|
3138
3247
|
"sm",
|
|
3139
3248
|
"md",
|
|
3140
3249
|
"lg"
|
|
3141
|
-
],
|
|
3250
|
+
], Mn = [
|
|
3142
3251
|
"start",
|
|
3143
3252
|
"center",
|
|
3144
3253
|
"end",
|
|
3145
3254
|
"between",
|
|
3146
3255
|
"around"
|
|
3147
|
-
],
|
|
3256
|
+
], Nn = [
|
|
3148
3257
|
"equal",
|
|
3149
3258
|
"sidebar",
|
|
3150
3259
|
"sidebar-end",
|
|
3151
3260
|
"wide-start",
|
|
3152
3261
|
"wide-end"
|
|
3153
|
-
],
|
|
3262
|
+
], Pn = [
|
|
3154
3263
|
"none",
|
|
3155
3264
|
"sm",
|
|
3156
3265
|
"md",
|
|
3157
3266
|
"lg"
|
|
3158
|
-
],
|
|
3267
|
+
], Fn = ({ as: e = "div", gap: t = "md", align: n = "center", justify: r = "start", wrap: i = !0, className: a = "", children: o, ...s }) => /* @__PURE__ */ p(e, {
|
|
3159
3268
|
className: ["wc-inline", a].filter(Boolean).join(" "),
|
|
3160
3269
|
"data-gap": t,
|
|
3161
3270
|
"data-align": n,
|
|
@@ -3164,18 +3273,18 @@ var xn = [
|
|
|
3164
3273
|
...s,
|
|
3165
3274
|
children: o
|
|
3166
3275
|
});
|
|
3167
|
-
|
|
3276
|
+
Fn.displayName = "Inline", Fn.propTypes = {
|
|
3168
3277
|
as: $.default.elementType,
|
|
3169
|
-
gap: $.default.oneOf(
|
|
3170
|
-
align: $.default.oneOf(
|
|
3171
|
-
justify: $.default.oneOf(
|
|
3278
|
+
gap: $.default.oneOf(On),
|
|
3279
|
+
align: $.default.oneOf(kn),
|
|
3280
|
+
justify: $.default.oneOf(Mn),
|
|
3172
3281
|
wrap: $.default.bool,
|
|
3173
3282
|
className: $.default.string,
|
|
3174
3283
|
children: $.default.node
|
|
3175
3284
|
};
|
|
3176
3285
|
//#endregion
|
|
3177
3286
|
//#region src/components/Input/Input.jsx
|
|
3178
|
-
var
|
|
3287
|
+
var In = ({ value: e = "", onChange: t, type: n = "text", placeholder: r = "", disabled: i = !1, readonly: a = !1, required: c = !1, autoFocus: l = !1, maxLength: f, minLength: h, size: g = "md", variant: _ = "filled", color: v = "primary", error: y = !1, helperText: b = "", label: x = "", startAdornment: S = null, endAdornment: C = null, fullWidth: w = !1, multiline: T = !1, rows: E = 4, autoComplete: D = "off", name: O = "", id: k = "", className: A = "", style: j = {}, onFocus: M, onBlur: N, onKeyDown: P, onKeyUp: F, onKeyPress: I, ...L }) => {
|
|
3179
3288
|
let [R, z] = d(!1), [B, V] = d(!!e), H = u(null), U = s(), W = k || U;
|
|
3180
3289
|
return o(() => {
|
|
3181
3290
|
V(!!e);
|
|
@@ -3246,28 +3355,28 @@ var kn = ({ value: e = "", onChange: t, type: n = "text", placeholder: r = "", d
|
|
|
3246
3355
|
]
|
|
3247
3356
|
});
|
|
3248
3357
|
};
|
|
3249
|
-
|
|
3358
|
+
In.displayName = "Input";
|
|
3250
3359
|
//#endregion
|
|
3251
3360
|
//#region ../core/src/components/List/utils.jsx
|
|
3252
|
-
var
|
|
3361
|
+
var Ln = (e) => {
|
|
3253
3362
|
let { dense: t = !1, disablePadding: n = !1, variant: r, className: i = "" } = e, a = ["list"];
|
|
3254
3363
|
return t && a.push("list--dense"), n && a.push("list--no-padding"), r && a.push(`list--${r}`), i && a.push(i), a;
|
|
3255
|
-
},
|
|
3364
|
+
}, Rn = (e) => {
|
|
3256
3365
|
let { button: t = !1, disabled: n = !1, divider: r = !1, dense: i = !1, selected: a = !1, disableGutters: o = !1, draggable: s = !1, multiselect: c = !1, className: l = "" } = e, u = ["list-item"];
|
|
3257
3366
|
return t && u.push("list-item--button"), n && u.push("list-item--disabled"), r && u.push("list-item--divider"), i && u.push("list-item--dense"), a && u.push("list-item--selected"), o && u.push("list-item--no-gutters"), s && u.push("list-item--draggable"), c && u.push("list-item--multiselect"), l && u.push(l), u;
|
|
3258
|
-
},
|
|
3367
|
+
}, zn = (e) => {
|
|
3259
3368
|
let { position: t = "start", className: n = "" } = e, r = ["list-item-icon"];
|
|
3260
3369
|
return t && r.push(`list-item-icon--${t}`), n && r.push(n), r;
|
|
3261
|
-
},
|
|
3370
|
+
}, Bn = (e) => {
|
|
3262
3371
|
let { inset: t = !1, className: n = "" } = e, r = ["list-item-text"];
|
|
3263
3372
|
return t && r.push("list-item-text--inset"), n && r.push(n), r;
|
|
3264
|
-
},
|
|
3265
|
-
let s =
|
|
3373
|
+
}, Vn = n({ dense: !1 }), Hn = ({ children: e, dense: t = !1, disablePadding: n = !1, nav: r = !1, subheader: i = "", className: a = "", ...o }) => {
|
|
3374
|
+
let s = Ln({
|
|
3266
3375
|
dense: t,
|
|
3267
3376
|
disablePadding: n,
|
|
3268
3377
|
className: a
|
|
3269
3378
|
}).concat(r ? "list--nav" : []).join(" ");
|
|
3270
|
-
return /* @__PURE__ */ p(
|
|
3379
|
+
return /* @__PURE__ */ p(Vn.Provider, {
|
|
3271
3380
|
value: { dense: t },
|
|
3272
3381
|
children: /* @__PURE__ */ m("div", {
|
|
3273
3382
|
role: r ? "navigation" : "list",
|
|
@@ -3279,8 +3388,8 @@ var An = (e) => {
|
|
|
3279
3388
|
}), e]
|
|
3280
3389
|
})
|
|
3281
3390
|
});
|
|
3282
|
-
},
|
|
3283
|
-
let { dense: d } = a(
|
|
3391
|
+
}, Un = ({ children: e, button: t = !1, disabled: n = !1, divider: r = !1, selected: i = !1, disableGutters: o = !1, multiselect: s = !1, component: c, className: l = "", ...u }) => {
|
|
3392
|
+
let { dense: d } = a(Vn) || { dense: !1 }, f = Rn({
|
|
3284
3393
|
button: t,
|
|
3285
3394
|
disabled: n,
|
|
3286
3395
|
divider: r,
|
|
@@ -3297,15 +3406,15 @@ var An = (e) => {
|
|
|
3297
3406
|
...u,
|
|
3298
3407
|
children: e
|
|
3299
3408
|
});
|
|
3300
|
-
},
|
|
3301
|
-
className:
|
|
3409
|
+
}, Wn = ({ children: e, position: t = "start", className: n = "", ...r }) => /* @__PURE__ */ p("span", {
|
|
3410
|
+
className: zn({
|
|
3302
3411
|
position: t,
|
|
3303
3412
|
className: n
|
|
3304
3413
|
}).join(" "),
|
|
3305
3414
|
...r,
|
|
3306
3415
|
children: e
|
|
3307
|
-
}),
|
|
3308
|
-
className:
|
|
3416
|
+
}), Gn = ({ primary: e = "", secondary: t = "", inset: n = !1, className: r = "", ...i }) => /* @__PURE__ */ m("div", {
|
|
3417
|
+
className: Bn({
|
|
3309
3418
|
inset: n,
|
|
3310
3419
|
className: r
|
|
3311
3420
|
}).join(" "),
|
|
@@ -3317,64 +3426,155 @@ var An = (e) => {
|
|
|
3317
3426
|
className: "list-item-text-secondary",
|
|
3318
3427
|
children: t
|
|
3319
3428
|
})]
|
|
3320
|
-
}),
|
|
3429
|
+
}), Kn = ({ size: e, variant: t, disabled: n, className: r }) => {
|
|
3321
3430
|
let i = [
|
|
3322
3431
|
"wc-menu",
|
|
3323
3432
|
`wc-menu--${e}`,
|
|
3324
3433
|
`wc-menu--${t}`
|
|
3325
3434
|
];
|
|
3326
3435
|
return n && i.push("wc-menu--disabled"), r && i.push(r), i;
|
|
3327
|
-
},
|
|
3436
|
+
}, qn = (e, t) => [
|
|
3328
3437
|
"wc-menu__menu",
|
|
3329
3438
|
`wc-menu__menu--${e}`,
|
|
3330
3439
|
t
|
|
3331
|
-
],
|
|
3440
|
+
], Jn = ({ disabled: e }) => ["wc-menu__button", e ? "wc-menu__button--disabled" : ""], Yn = (e) => {
|
|
3332
3441
|
let t = ["wc-menu__item"];
|
|
3333
3442
|
return e.divider && t.push("wc-menu__divider"), e.disabled && t.push("wc-menu__item--disabled"), e.selected && t.push("wc-menu__item--selected"), e.danger && t.push("wc-menu__item--danger"), t;
|
|
3334
|
-
},
|
|
3443
|
+
}, Xn = (e) => ["wc-menu__arrow", e ? "wc-menu__arrow--open" : ""], Zn = (e, t, n, r, i) => {
|
|
3335
3444
|
t || (n(!e), e ? i && i() : r && r());
|
|
3336
|
-
},
|
|
3445
|
+
}, Qn = (e, t, n, r, i) => {
|
|
3337
3446
|
e.disabled || e.divider || (n && n(e, t), r(!1), i && i());
|
|
3338
|
-
},
|
|
3339
|
-
let
|
|
3340
|
-
e(t);
|
|
3341
|
-
};
|
|
3342
|
-
return {
|
|
3343
|
-
add: () => document.addEventListener("click", t),
|
|
3344
|
-
remove: () => document.removeEventListener("click", t)
|
|
3345
|
-
};
|
|
3346
|
-
}, qn = ({ items: e = [], triggerText: t = "选择选项", placement: n = "bottom-start", size: r = "md", variant: i = "default", disabled: a = !1, trigger: s = "click", illustration: c = "", illustrationAlt: l = "示意图", cardTitle: f = "", cardDescription: h = "", onSelect: g, onOpen: _, onClose: v, children: y, triggerContent: b, menuContent: x, className: S = "", ...C }) => {
|
|
3347
|
-
let [w, T] = d(!1), E = u(null), D = u(null), O = zn({
|
|
3447
|
+
}, $n = (e) => e.startsWith("top") ? "top" : "bottom", er = ({ items: e = [], triggerText: t = "选择选项", placement: n = "bottom-start", size: r = "md", variant: i = "default", disabled: a = !1, trigger: c = "click", illustration: l = "", illustrationAlt: f = "示意图", cardTitle: h = "", cardDescription: g = "", onSelect: _, onOpen: v, onClose: y, children: b, triggerContent: x, menuContent: S, className: C = "", ...w }) => {
|
|
3448
|
+
let [T, E] = d(!1), D = s(), O = u(null), k = u(null), A = u(null), j = Kn({
|
|
3348
3449
|
size: r,
|
|
3349
3450
|
variant: i,
|
|
3350
3451
|
disabled: a,
|
|
3351
|
-
className:
|
|
3352
|
-
}).join(" "),
|
|
3452
|
+
className: C
|
|
3453
|
+
}).join(" "), M = qn(n, i === "card" ? "wc-menu__menu--card" : "").join(" "), N = Jn({ disabled: a }).join(" "), P = Xn(T).join(" "), F = i === "card" ? {
|
|
3353
3454
|
minWidth: "320px",
|
|
3354
3455
|
maxWidth: "450px"
|
|
3355
|
-
} : { minWidth: "120px" },
|
|
3356
|
-
|
|
3357
|
-
},
|
|
3358
|
-
|
|
3359
|
-
},
|
|
3360
|
-
|
|
3456
|
+
} : { minWidth: "120px" }, I = () => {
|
|
3457
|
+
Zn(T, a, E, v, y);
|
|
3458
|
+
}, L = (e, t) => {
|
|
3459
|
+
Qn(e, t, _, E, y);
|
|
3460
|
+
}, R = () => {
|
|
3461
|
+
T && (E(!1), y?.());
|
|
3462
|
+
}, z = (e = "first") => {
|
|
3463
|
+
let t = Array.from(k.current?.querySelectorAll("[role=\"menuitem\"]:not(:disabled)") || []);
|
|
3464
|
+
if (!t.length) return;
|
|
3465
|
+
let n = t.indexOf(document.activeElement), r = e === "last" ? t.length - 1 : 0;
|
|
3466
|
+
e === "next" && (r = n < 0 ? 0 : (n + 1) % t.length), e === "previous" && (r = n <= 0 ? t.length - 1 : n - 1), t[r]?.focus();
|
|
3467
|
+
};
|
|
3468
|
+
o(() => {
|
|
3469
|
+
T && queueMicrotask(() => z("first"));
|
|
3470
|
+
}, [T]);
|
|
3471
|
+
let B = J({
|
|
3472
|
+
open: T,
|
|
3473
|
+
anchorRef: A,
|
|
3474
|
+
floatingRef: k,
|
|
3475
|
+
placement: $n(n),
|
|
3476
|
+
offset: 6
|
|
3361
3477
|
});
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3478
|
+
ae({
|
|
3479
|
+
open: T,
|
|
3480
|
+
elementRef: k,
|
|
3481
|
+
refs: [A],
|
|
3482
|
+
closeOnEscape: !0,
|
|
3483
|
+
closeOnPointerDownOutside: !0,
|
|
3484
|
+
onEscapeKeyDown: () => {
|
|
3485
|
+
R(), A.current?.focus();
|
|
3486
|
+
},
|
|
3487
|
+
onPointerDownOutside: R,
|
|
3488
|
+
zIndex: 1e3
|
|
3489
|
+
});
|
|
3490
|
+
let V = (e) => {
|
|
3491
|
+
a || (e.key === "ArrowDown" || e.key === "Enter" || e.key === " " ? (e.preventDefault(), T ? z("next") : (E(!0), v?.())) : e.key === "ArrowUp" && (e.preventDefault(), T ? z("previous") : (E(!0), v?.(), queueMicrotask(() => z("last")))));
|
|
3492
|
+
}, H = T ? /* @__PURE__ */ p(q, { children: /* @__PURE__ */ p("div", {
|
|
3493
|
+
ref: k,
|
|
3494
|
+
className: `${M} wc-menu__menu--resolved-${B}`.trim(),
|
|
3495
|
+
id: D,
|
|
3496
|
+
style: F,
|
|
3497
|
+
role: "menu",
|
|
3498
|
+
onKeyDown: (e) => {
|
|
3499
|
+
e.key === "ArrowDown" ? (e.preventDefault(), z("next")) : e.key === "ArrowUp" ? (e.preventDefault(), z("previous")) : e.key === "Home" ? (e.preventDefault(), z("first")) : e.key === "End" ? (e.preventDefault(), z("last")) : e.key === "Tab" && R();
|
|
3500
|
+
},
|
|
3501
|
+
children: S || (i === "card" ? /* @__PURE__ */ m("div", {
|
|
3502
|
+
className: "wc-menu__card",
|
|
3503
|
+
children: [/* @__PURE__ */ m("div", {
|
|
3504
|
+
className: "wc-menu__card-illustration",
|
|
3505
|
+
children: [l ? /* @__PURE__ */ p("img", {
|
|
3506
|
+
src: l,
|
|
3507
|
+
alt: f,
|
|
3508
|
+
className: "wc-menu__illustration-image"
|
|
3509
|
+
}) : /* @__PURE__ */ p("div", {
|
|
3510
|
+
className: "wc-menu__illustration-placeholder",
|
|
3511
|
+
children: /* @__PURE__ */ p("span", { children: "🎨" })
|
|
3512
|
+
}), (h || g) && /* @__PURE__ */ m("div", {
|
|
3513
|
+
className: "wc-menu__card-info",
|
|
3514
|
+
children: [h && /* @__PURE__ */ p("h4", {
|
|
3515
|
+
className: "wc-menu__card-title",
|
|
3516
|
+
children: h
|
|
3517
|
+
}), g && /* @__PURE__ */ p("p", {
|
|
3518
|
+
className: "wc-menu__card-description",
|
|
3519
|
+
children: g
|
|
3520
|
+
})]
|
|
3521
|
+
})]
|
|
3522
|
+
}), /* @__PURE__ */ p("div", {
|
|
3523
|
+
className: "wc-menu__card-list",
|
|
3524
|
+
children: e.map((e, t) => e.divider ? /* @__PURE__ */ p("div", {
|
|
3525
|
+
className: "wc-menu__divider",
|
|
3526
|
+
role: "separator"
|
|
3527
|
+
}, e.key || t) : /* @__PURE__ */ m("button", {
|
|
3528
|
+
type: "button",
|
|
3529
|
+
role: "menuitem",
|
|
3530
|
+
className: Yn(e).join(" "),
|
|
3531
|
+
disabled: e.disabled,
|
|
3532
|
+
onClick: () => L(e, t),
|
|
3533
|
+
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
3534
|
+
className: "wc-menu__icon",
|
|
3535
|
+
children: e.icon
|
|
3536
|
+
}), /* @__PURE__ */ p("span", {
|
|
3537
|
+
className: "wc-menu__label",
|
|
3538
|
+
children: e.label
|
|
3539
|
+
})]
|
|
3540
|
+
}, e.key || t))
|
|
3541
|
+
})]
|
|
3542
|
+
}) : e.map((e, t) => e.divider ? /* @__PURE__ */ p("div", {
|
|
3543
|
+
className: "wc-menu__divider",
|
|
3544
|
+
role: "separator"
|
|
3545
|
+
}, e.key || t) : /* @__PURE__ */ m("button", {
|
|
3546
|
+
type: "button",
|
|
3547
|
+
role: "menuitem",
|
|
3548
|
+
className: Yn(e).join(" "),
|
|
3549
|
+
disabled: e.disabled,
|
|
3550
|
+
onClick: () => L(e, t),
|
|
3551
|
+
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
3552
|
+
className: "wc-menu__icon",
|
|
3553
|
+
children: e.icon
|
|
3554
|
+
}), /* @__PURE__ */ p("span", {
|
|
3555
|
+
className: "wc-menu__label",
|
|
3556
|
+
children: e.label
|
|
3557
|
+
})]
|
|
3558
|
+
}, e.key || t)))
|
|
3559
|
+
}) }) : null;
|
|
3560
|
+
return /* @__PURE__ */ m("div", {
|
|
3561
|
+
className: j,
|
|
3562
|
+
ref: O,
|
|
3563
|
+
...w,
|
|
3366
3564
|
children: [/* @__PURE__ */ p("div", {
|
|
3367
3565
|
className: "wc-menu__trigger",
|
|
3368
|
-
onClick:
|
|
3369
|
-
|
|
3370
|
-
|
|
3566
|
+
onClick: I,
|
|
3567
|
+
onKeyDown: V,
|
|
3568
|
+
ref: A,
|
|
3569
|
+
children: x || b || /* @__PURE__ */ m("button", {
|
|
3371
3570
|
type: "button",
|
|
3372
|
-
className:
|
|
3571
|
+
className: N,
|
|
3373
3572
|
disabled: a,
|
|
3374
3573
|
"aria-haspopup": "menu",
|
|
3375
|
-
"aria-expanded":
|
|
3574
|
+
"aria-expanded": T,
|
|
3575
|
+
"aria-controls": T ? D : void 0,
|
|
3376
3576
|
children: [t, /* @__PURE__ */ p("span", {
|
|
3377
|
-
className:
|
|
3577
|
+
className: P,
|
|
3378
3578
|
children: /* @__PURE__ */ p("svg", {
|
|
3379
3579
|
viewBox: "0 0 24 24",
|
|
3380
3580
|
fill: "none",
|
|
@@ -3384,150 +3584,73 @@ var An = (e) => {
|
|
|
3384
3584
|
})
|
|
3385
3585
|
})]
|
|
3386
3586
|
})
|
|
3387
|
-
}),
|
|
3388
|
-
className: k,
|
|
3389
|
-
style: M,
|
|
3390
|
-
role: "menu",
|
|
3391
|
-
children: x || (i === "card" ? /* @__PURE__ */ m("div", {
|
|
3392
|
-
className: "wc-menu__card",
|
|
3393
|
-
children: [/* @__PURE__ */ m("div", {
|
|
3394
|
-
className: "wc-menu__card-illustration",
|
|
3395
|
-
children: [c ? /* @__PURE__ */ p("img", {
|
|
3396
|
-
src: c,
|
|
3397
|
-
alt: l,
|
|
3398
|
-
className: "wc-menu__illustration-image"
|
|
3399
|
-
}) : /* @__PURE__ */ p("div", {
|
|
3400
|
-
className: "wc-menu__illustration-placeholder",
|
|
3401
|
-
children: /* @__PURE__ */ p("span", { children: "🎨" })
|
|
3402
|
-
}), (f || h) && /* @__PURE__ */ m("div", {
|
|
3403
|
-
className: "wc-menu__card-info",
|
|
3404
|
-
children: [f && /* @__PURE__ */ p("h4", {
|
|
3405
|
-
className: "wc-menu__card-title",
|
|
3406
|
-
children: f
|
|
3407
|
-
}), h && /* @__PURE__ */ p("p", {
|
|
3408
|
-
className: "wc-menu__card-description",
|
|
3409
|
-
children: h
|
|
3410
|
-
})]
|
|
3411
|
-
})]
|
|
3412
|
-
}), /* @__PURE__ */ p("div", {
|
|
3413
|
-
className: "wc-menu__card-list",
|
|
3414
|
-
children: e.map((e, t) => e.divider ? /* @__PURE__ */ p("div", {
|
|
3415
|
-
className: "wc-menu__divider",
|
|
3416
|
-
role: "separator"
|
|
3417
|
-
}, e.key || t) : /* @__PURE__ */ m("button", {
|
|
3418
|
-
type: "button",
|
|
3419
|
-
role: "menuitem",
|
|
3420
|
-
className: Hn(e).join(" "),
|
|
3421
|
-
disabled: e.disabled,
|
|
3422
|
-
onClick: () => P(e, t),
|
|
3423
|
-
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
3424
|
-
className: "wc-menu__icon",
|
|
3425
|
-
children: e.icon
|
|
3426
|
-
}), /* @__PURE__ */ p("span", {
|
|
3427
|
-
className: "wc-menu__label",
|
|
3428
|
-
children: e.label
|
|
3429
|
-
})]
|
|
3430
|
-
}, e.key || t))
|
|
3431
|
-
})]
|
|
3432
|
-
}) : e.map((e, t) => e.divider ? /* @__PURE__ */ p("div", {
|
|
3433
|
-
className: "wc-menu__divider",
|
|
3434
|
-
role: "separator"
|
|
3435
|
-
}, e.key || t) : /* @__PURE__ */ m("button", {
|
|
3436
|
-
type: "button",
|
|
3437
|
-
role: "menuitem",
|
|
3438
|
-
className: Hn(e).join(" "),
|
|
3439
|
-
disabled: e.disabled,
|
|
3440
|
-
onClick: () => P(e, t),
|
|
3441
|
-
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
3442
|
-
className: "wc-menu__icon",
|
|
3443
|
-
children: e.icon
|
|
3444
|
-
}), /* @__PURE__ */ p("span", {
|
|
3445
|
-
className: "wc-menu__label",
|
|
3446
|
-
children: e.label
|
|
3447
|
-
})]
|
|
3448
|
-
}, e.key || t)))
|
|
3449
|
-
})]
|
|
3587
|
+
}), H]
|
|
3450
3588
|
});
|
|
3451
3589
|
};
|
|
3452
|
-
|
|
3590
|
+
er.displayName = "Menu";
|
|
3453
3591
|
//#endregion
|
|
3454
3592
|
//#region ../core/src/components/Modal/utils.js
|
|
3455
|
-
function
|
|
3593
|
+
function tr({ size: e = "md", fullWidth: t = !1, fullScreen: n = !1, scroll: r = "paper", position: i = "center", className: a = "" } = {}) {
|
|
3456
3594
|
let o = ["wc-modal"];
|
|
3457
3595
|
return e && !n && o.push(`wc-modal--${e}`), n && o.push("wc-modal--fullscreen"), t && !n && o.push("wc-modal--full-width"), r === "body" ? o.push("wc-modal--scroll-body") : o.push("wc-modal--scroll-paper"), i && i !== "center" && o.push(`wc-modal--${i}`), a && o.push(a), o.filter(Boolean).join(" ");
|
|
3458
3596
|
}
|
|
3459
|
-
function
|
|
3597
|
+
function nr({ centered: e = !0, position: t = "center" } = {}) {
|
|
3460
3598
|
let n = ["wc-modal-overlay"];
|
|
3461
3599
|
return (e || t === "center") && n.push("wc-modal-overlay--centered"), t && t !== "center" && n.push(`wc-modal-overlay--${t}`), n.join(" ");
|
|
3462
3600
|
}
|
|
3463
|
-
function
|
|
3601
|
+
function rr(e, t, n = 0) {
|
|
3464
3602
|
e(!1), t && (n > 0 ? setTimeout(() => {
|
|
3465
3603
|
t();
|
|
3466
3604
|
}, n) : t());
|
|
3467
3605
|
}
|
|
3468
|
-
function Zn(e, t, n) {
|
|
3469
|
-
e.key === "Escape" && t && n();
|
|
3470
|
-
}
|
|
3471
|
-
function Qn(e) {
|
|
3472
|
-
if (e) {
|
|
3473
|
-
let t = e.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])");
|
|
3474
|
-
t.length > 0 ? t[0].focus() : e.focus();
|
|
3475
|
-
}
|
|
3476
|
-
}
|
|
3477
|
-
function $n(e) {
|
|
3478
|
-
if (!e) return () => {};
|
|
3479
|
-
let t = e.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])"), n = t[0], r = t[t.length - 1], i = (e) => {
|
|
3480
|
-
e.key === "Tab" && (e.shiftKey ? document.activeElement === n && (e.preventDefault(), r?.focus()) : document.activeElement === r && (e.preventDefault(), n?.focus()));
|
|
3481
|
-
};
|
|
3482
|
-
return e.addEventListener("keydown", i), () => {
|
|
3483
|
-
e.removeEventListener("keydown", i);
|
|
3484
|
-
};
|
|
3485
|
-
}
|
|
3486
3606
|
//#endregion
|
|
3487
3607
|
//#region src/components/Modal/Modal.jsx
|
|
3488
|
-
var
|
|
3489
|
-
let M = s(), [N, P] = d(e || t), F = u(null), I =
|
|
3608
|
+
var ir = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWidth: a = null, closable: c = !0, showCloseButton: l = !0, maskClosable: f = !0, closeOnOverlay: h = !0, disableBackdropClick: g = !1, disableEscapeKeyDown: _ = !1, centered: v = !0, fullWidth: y = !1, fullScreen: b = !1, position: x = "center", scroll: S = "paper", lockScroll: C = !0, zIndex: w = 1e3, showOverlay: T = !0, className: E = "", onClose: D, children: O, header: k, footer: A, ...j }) => {
|
|
3609
|
+
let M = s(), [N, P] = d(e || t), F = u(null), I = e || t;
|
|
3490
3610
|
o(() => {
|
|
3491
|
-
P(
|
|
3492
|
-
}, [
|
|
3493
|
-
let
|
|
3494
|
-
size:
|
|
3611
|
+
P(I);
|
|
3612
|
+
}, [I]);
|
|
3613
|
+
let L = tr({
|
|
3614
|
+
size: a || r,
|
|
3495
3615
|
fullWidth: y,
|
|
3496
3616
|
fullScreen: b,
|
|
3497
3617
|
scroll: S,
|
|
3498
3618
|
position: x,
|
|
3499
3619
|
className: E
|
|
3500
|
-
}),
|
|
3620
|
+
}), R = nr({
|
|
3501
3621
|
centered: x === "center" || v,
|
|
3502
3622
|
position: x
|
|
3503
|
-
}),
|
|
3504
|
-
|
|
3505
|
-
},
|
|
3506
|
-
|
|
3507
|
-
}, U = (e) => {
|
|
3508
|
-
Zn(e, a && !_, V);
|
|
3509
|
-
};
|
|
3510
|
-
if (o(() => {
|
|
3511
|
-
if (N) return I.current = document.activeElement, setTimeout(() => {
|
|
3512
|
-
F.current && (Qn(F.current), L.current = $n(F.current));
|
|
3513
|
-
}, 100), document.addEventListener("keydown", U), C && (document.body.style.overflow = "hidden"), () => {
|
|
3514
|
-
document.removeEventListener("keydown", U), L.current &&= (L.current(), null), I.current && I.current.focus && I.current.focus(), C && (document.body.style.overflow = "");
|
|
3515
|
-
};
|
|
3623
|
+
}), z = i(() => {
|
|
3624
|
+
rr(P, D);
|
|
3625
|
+
}, [D]), B = i(() => {
|
|
3626
|
+
f && h && !g && z();
|
|
3516
3627
|
}, [
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
])
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3628
|
+
h,
|
|
3629
|
+
g,
|
|
3630
|
+
z,
|
|
3631
|
+
f
|
|
3632
|
+
]);
|
|
3633
|
+
if (ae({
|
|
3634
|
+
open: N,
|
|
3635
|
+
elementRef: F,
|
|
3636
|
+
modal: !0,
|
|
3637
|
+
lockScroll: C,
|
|
3638
|
+
restoreFocus: !0,
|
|
3639
|
+
initialFocus: !0,
|
|
3640
|
+
closeOnEscape: c && !_,
|
|
3641
|
+
closeOnPointerDownOutside: !1,
|
|
3642
|
+
onEscapeKeyDown: z,
|
|
3643
|
+
zIndex: w
|
|
3644
|
+
}), !N) return null;
|
|
3645
|
+
let V = c && l !== !1;
|
|
3646
|
+
return /* @__PURE__ */ p(q, { children: /* @__PURE__ */ m("div", {
|
|
3647
|
+
className: R,
|
|
3525
3648
|
style: { zIndex: w },
|
|
3526
|
-
onClick:
|
|
3649
|
+
onClick: B,
|
|
3527
3650
|
"data-testid": "modal-overlay",
|
|
3528
3651
|
children: [T && /* @__PURE__ */ p("div", { className: "wc-modal__overlay" }), /* @__PURE__ */ m("div", {
|
|
3529
3652
|
ref: F,
|
|
3530
|
-
className:
|
|
3653
|
+
className: L,
|
|
3531
3654
|
onClick: (e) => e.stopPropagation(),
|
|
3532
3655
|
role: "dialog",
|
|
3533
3656
|
"aria-modal": "true",
|
|
@@ -3535,11 +3658,11 @@ var er = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3535
3658
|
tabIndex: -1,
|
|
3536
3659
|
...j,
|
|
3537
3660
|
children: [
|
|
3538
|
-
|
|
3661
|
+
V && /* @__PURE__ */ p(Ke, {
|
|
3539
3662
|
variant: "text",
|
|
3540
3663
|
size: "sm",
|
|
3541
3664
|
className: "wc-modal__close",
|
|
3542
|
-
onClick:
|
|
3665
|
+
onClick: z,
|
|
3543
3666
|
"aria-label": "关闭",
|
|
3544
3667
|
children: /* @__PURE__ */ p("svg", {
|
|
3545
3668
|
viewBox: "0 0 24 24",
|
|
@@ -3565,12 +3688,12 @@ var er = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3565
3688
|
})
|
|
3566
3689
|
]
|
|
3567
3690
|
})]
|
|
3568
|
-
})
|
|
3691
|
+
}) });
|
|
3569
3692
|
};
|
|
3570
|
-
|
|
3693
|
+
ir.displayName = "Modal";
|
|
3571
3694
|
//#endregion
|
|
3572
3695
|
//#region src/components/NumberAnimation/NumberAnimation.jsx
|
|
3573
|
-
var
|
|
3696
|
+
var ar = ({ active: e = !0, duration: t = 3e3, from: n = 0, to: r, locale: i = "", precision: a = 0, showSeparator: s = !1, prefix: c = "", suffix: l = "", separator: f = "", formatter: m = null, easing: h = "linear", onFinish: g, className: _ = "", style: v = {}, ...y }) => {
|
|
3574
3697
|
let [b, x] = d(n), [S, C] = d(!1), w = u(null), T = u(null), E = (i) => {
|
|
3575
3698
|
w.current === null && (w.current = i);
|
|
3576
3699
|
let a = Math.min((i - w.current) / t, 1);
|
|
@@ -3616,7 +3739,7 @@ var tr = ({ active: e = !0, duration: t = 3e3, from: n = 0, to: r, locale: i = "
|
|
|
3616
3739
|
};
|
|
3617
3740
|
//#endregion
|
|
3618
3741
|
//#region src/components/Pagination/Pagination.jsx
|
|
3619
|
-
function
|
|
3742
|
+
function or({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCount: a = 1, boundaryCount: s = 1, size: c = "md", className: u = "", ...f }) {
|
|
3620
3743
|
let [h, g] = d(e);
|
|
3621
3744
|
o(() => {
|
|
3622
3745
|
g(e);
|
|
@@ -3711,38 +3834,38 @@ function nr({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCoun
|
|
|
3711
3834
|
}
|
|
3712
3835
|
//#endregion
|
|
3713
3836
|
//#region src/components/Page/Page.jsx
|
|
3714
|
-
var
|
|
3837
|
+
var sr = ({ as: e = "div", size: t = "lg", gutter: n = "md", className: r = "", children: i, ...a }) => /* @__PURE__ */ p(e, {
|
|
3715
3838
|
className: ["wc-page", r].filter(Boolean).join(" "),
|
|
3716
3839
|
"data-size": t,
|
|
3717
3840
|
"data-gutter": n,
|
|
3718
3841
|
...a,
|
|
3719
3842
|
children: i
|
|
3720
3843
|
});
|
|
3721
|
-
|
|
3844
|
+
sr.displayName = "Page", sr.propTypes = {
|
|
3722
3845
|
as: $.default.elementType,
|
|
3723
|
-
size: $.default.oneOf(
|
|
3724
|
-
gutter: $.default.oneOf(
|
|
3846
|
+
size: $.default.oneOf(An),
|
|
3847
|
+
gutter: $.default.oneOf(jn),
|
|
3725
3848
|
className: $.default.string,
|
|
3726
3849
|
children: $.default.node
|
|
3727
3850
|
};
|
|
3728
3851
|
//#endregion
|
|
3729
3852
|
//#region ../core/src/components/Paper/utils.jsx
|
|
3730
|
-
var
|
|
3853
|
+
var cr = {
|
|
3731
3854
|
ELEVATION: "elevation",
|
|
3732
3855
|
OUTLINED: "outlined"
|
|
3733
|
-
},
|
|
3856
|
+
}, lr = {
|
|
3734
3857
|
SQUARE: "square",
|
|
3735
3858
|
ROUNDED_SM: "rounded-sm",
|
|
3736
3859
|
ROUNDED_LG: "rounded-lg",
|
|
3737
3860
|
ROUNDED_XL: "rounded-xl",
|
|
3738
3861
|
ROUNDED_2XL: "rounded-2xl",
|
|
3739
3862
|
ROUNDED_FULL: "rounded-full"
|
|
3740
|
-
},
|
|
3863
|
+
}, ur = {
|
|
3741
3864
|
SM: "sm",
|
|
3742
3865
|
MD: "md",
|
|
3743
3866
|
LG: "lg",
|
|
3744
3867
|
XL: "xl"
|
|
3745
|
-
},
|
|
3868
|
+
}, dr = {
|
|
3746
3869
|
DEFAULT: "default",
|
|
3747
3870
|
PRIMARY: "primary",
|
|
3748
3871
|
SUCCESS: "success",
|
|
@@ -3750,21 +3873,21 @@ var ir = {
|
|
|
3750
3873
|
ERROR: "error",
|
|
3751
3874
|
INFO: "info"
|
|
3752
3875
|
};
|
|
3753
|
-
function
|
|
3754
|
-
let { variant: t =
|
|
3755
|
-
if (t ===
|
|
3876
|
+
function fr(e = {}) {
|
|
3877
|
+
let { variant: t = cr.ELEVATION, elevation: n = 1, square: r = !1, shape: i = null, size: a = null, color: o = dr.DEFAULT, hoverable: s = !1, clickable: c = !1, gradient: l = !1, frosted: u = !1, textured: d = !1, className: f = "" } = e, p = ["wc-paper"];
|
|
3878
|
+
if (t === cr.OUTLINED) p.push("wc-paper--outlined");
|
|
3756
3879
|
else {
|
|
3757
3880
|
p.push("wc-paper--elevation");
|
|
3758
3881
|
let e = Math.max(0, Math.min(24, Math.floor(Number(n) || 0)));
|
|
3759
3882
|
p.push(`wc-paper--elevation-${e}`);
|
|
3760
3883
|
}
|
|
3761
|
-
return r ? p.push("wc-paper--square") : i &&
|
|
3884
|
+
return r ? p.push("wc-paper--square") : i && lr[i.toUpperCase()] && p.push(`wc-paper--${i}`), a && ur[a.toUpperCase()] && p.push(`wc-paper--${a}`), o !== dr.DEFAULT && dr[o.toUpperCase()] && p.push(`wc-paper--${o}`), s && p.push("wc-paper--hoverable"), c && p.push("wc-paper--clickable"), l && p.push("wc-paper--gradient"), u && p.push("wc-paper--frosted"), d && p.push("wc-paper--textured"), f && p.push(f), p.join(" ");
|
|
3762
3885
|
}
|
|
3763
3886
|
//#endregion
|
|
3764
3887
|
//#region src/components/Paper/Paper.jsx
|
|
3765
|
-
function
|
|
3888
|
+
function pr({ component: e = "div", variant: t = "elevation", elevation: n = 1, square: r = !1, hoverable: i = !1, clickable: a = !1, color: o = "default", size: s = null, shape: c = null, gradient: l = !1, frosted: u = !1, textured: d = !1, className: f = "", children: m, onClick: h, onMouseEnter: g, onMouseLeave: _, onKeyDown: v, style: y = {}, ...b }) {
|
|
3766
3889
|
return /* @__PURE__ */ p(e, {
|
|
3767
|
-
className:
|
|
3890
|
+
className: fr({
|
|
3768
3891
|
variant: t,
|
|
3769
3892
|
elevation: Math.max(0, Math.min(24, Math.floor(Number(n) || 0))),
|
|
3770
3893
|
square: r,
|
|
@@ -3795,70 +3918,60 @@ function lr({ component: e = "div", variant: t = "elevation", elevation: n = 1,
|
|
|
3795
3918
|
}
|
|
3796
3919
|
//#endregion
|
|
3797
3920
|
//#region src/components/Popover/Popover.jsx
|
|
3798
|
-
function
|
|
3799
|
-
let
|
|
3800
|
-
|
|
3801
|
-
},
|
|
3802
|
-
|
|
3803
|
-
},
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
o(() => {}, [b, t]), o(() => (C && (D(), window.addEventListener("resize", D), window.addEventListener("scroll", D), document.addEventListener("mousedown", O)), () => {
|
|
3825
|
-
window.removeEventListener("resize", D), window.removeEventListener("scroll", D), document.removeEventListener("mousedown", O);
|
|
3826
|
-
}), [C, D]);
|
|
3827
|
-
let O = (e) => {
|
|
3828
|
-
S.current && !S.current.contains(e.target) && !x.current.contains(e.target) && T();
|
|
3829
|
-
}, k = a ? e.cloneElement(a, {
|
|
3830
|
-
ref: x,
|
|
3831
|
-
onClick: E,
|
|
3832
|
-
"aria-expanded": C,
|
|
3921
|
+
function mr({ open: t, onOpenChange: n, triggerText: r = "打开弹窗", trigger: i, placement: a = "bottom", offset: o = 8, children: c, className: l = "" }) {
|
|
3922
|
+
let f = s(), [h, g] = d(!1), _ = t != null, v = u(null), y = u(null), b = _ ? t : h, x = (e) => {
|
|
3923
|
+
_ || g(e), n?.(e);
|
|
3924
|
+
}, S = () => x(!1), C = () => {
|
|
3925
|
+
x(!b);
|
|
3926
|
+
}, w = J({
|
|
3927
|
+
open: b,
|
|
3928
|
+
anchorRef: v,
|
|
3929
|
+
floatingRef: y,
|
|
3930
|
+
placement: a,
|
|
3931
|
+
offset: o
|
|
3932
|
+
});
|
|
3933
|
+
ae({
|
|
3934
|
+
open: b,
|
|
3935
|
+
elementRef: y,
|
|
3936
|
+
refs: [v],
|
|
3937
|
+
closeOnEscape: !0,
|
|
3938
|
+
closeOnPointerDownOutside: !0,
|
|
3939
|
+
onEscapeKeyDown: S,
|
|
3940
|
+
onPointerDownOutside: S,
|
|
3941
|
+
zIndex: 2e3
|
|
3942
|
+
});
|
|
3943
|
+
let T = i ? e.cloneElement(i, {
|
|
3944
|
+
ref: v,
|
|
3945
|
+
onClick: C,
|
|
3946
|
+
"aria-expanded": b,
|
|
3833
3947
|
"aria-haspopup": "dialog",
|
|
3834
|
-
"aria-controls":
|
|
3948
|
+
"aria-controls": f
|
|
3835
3949
|
}) : /* @__PURE__ */ p("button", {
|
|
3836
|
-
ref:
|
|
3950
|
+
ref: v,
|
|
3837
3951
|
type: "button",
|
|
3838
3952
|
className: "wc-popover-trigger",
|
|
3839
|
-
onClick:
|
|
3840
|
-
"aria-expanded":
|
|
3953
|
+
onClick: C,
|
|
3954
|
+
"aria-expanded": b,
|
|
3841
3955
|
"aria-haspopup": "dialog",
|
|
3842
|
-
"aria-controls":
|
|
3956
|
+
"aria-controls": f,
|
|
3843
3957
|
children: r
|
|
3844
3958
|
});
|
|
3845
3959
|
return /* @__PURE__ */ m("div", {
|
|
3846
|
-
className: `wc-popover-container ${
|
|
3847
|
-
children: [
|
|
3848
|
-
ref:
|
|
3849
|
-
id:
|
|
3850
|
-
className: `wc-popover-content wc-popover-content--${
|
|
3960
|
+
className: `wc-popover-container ${l}`.trim(),
|
|
3961
|
+
children: [T, b && /* @__PURE__ */ p(q, { children: /* @__PURE__ */ p("div", {
|
|
3962
|
+
ref: y,
|
|
3963
|
+
id: f,
|
|
3964
|
+
className: `wc-popover-content wc-popover-content--${w}`.trim(),
|
|
3851
3965
|
role: "dialog",
|
|
3852
3966
|
"aria-label": "弹出内容",
|
|
3853
3967
|
tabIndex: -1,
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
}), document.body)]
|
|
3968
|
+
children: c
|
|
3969
|
+
}) })]
|
|
3857
3970
|
});
|
|
3858
3971
|
}
|
|
3859
3972
|
//#endregion
|
|
3860
3973
|
//#region src/components/PricingTable/PricingTable.jsx
|
|
3861
|
-
function
|
|
3974
|
+
function hr({ plans: e = [], columns: t = 3, className: n = "" }) {
|
|
3862
3975
|
let r = { gridTemplateColumns: `repeat(${t}, minmax(0,1fr))` };
|
|
3863
3976
|
return /* @__PURE__ */ p("div", {
|
|
3864
3977
|
className: `pricing-grid ${n}`.trim(),
|
|
@@ -3888,7 +4001,7 @@ function dr({ plans: e = [], columns: t = 3, className: n = "" }) {
|
|
|
3888
4001
|
}
|
|
3889
4002
|
//#endregion
|
|
3890
4003
|
//#region src/components/Progress/Progress.jsx
|
|
3891
|
-
var
|
|
4004
|
+
var gr = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primary", size: i = "md", animated: a = !1, className: o = "", ...s }) => {
|
|
3892
4005
|
let c = [
|
|
3893
4006
|
"primary",
|
|
3894
4007
|
"success",
|
|
@@ -3929,11 +4042,11 @@ var fr = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primar
|
|
|
3929
4042
|
})]
|
|
3930
4043
|
});
|
|
3931
4044
|
};
|
|
3932
|
-
|
|
4045
|
+
gr.displayName = "Progress";
|
|
3933
4046
|
//#endregion
|
|
3934
4047
|
//#region src/components/Radio/Radio.jsx
|
|
3935
|
-
var
|
|
3936
|
-
function
|
|
4048
|
+
var _r = n(null);
|
|
4049
|
+
function vr({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", row: o = !1, required: s = !1, error: c = "", helperText: l = "", size: u = "md", color: f = "primary", children: h, className: g = "" }) {
|
|
3937
4050
|
let [_, v] = d(e), y = e !== void 0, b = y ? e : _, x = i((e) => {
|
|
3938
4051
|
r || (y || v(e), t?.(e));
|
|
3939
4052
|
}, [
|
|
@@ -3941,7 +4054,7 @@ function mr({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", r
|
|
|
3941
4054
|
y,
|
|
3942
4055
|
t
|
|
3943
4056
|
]), S = ["wc-radio-group", g].filter(Boolean).join(" "), C = ["wc-radio-group-content", o && "wc-radio-group-content--row"].filter(Boolean).join(" ");
|
|
3944
|
-
return /* @__PURE__ */ p(
|
|
4057
|
+
return /* @__PURE__ */ p(_r.Provider, {
|
|
3945
4058
|
value: {
|
|
3946
4059
|
value: b,
|
|
3947
4060
|
updateValue: x,
|
|
@@ -3978,8 +4091,8 @@ function mr({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", r
|
|
|
3978
4091
|
})
|
|
3979
4092
|
});
|
|
3980
4093
|
}
|
|
3981
|
-
function
|
|
3982
|
-
let h = a(
|
|
4094
|
+
function yr({ value: e, checked: t, onChange: n, label: r, name: i, disabled: o = !1, color: s = "primary", size: c = "md", className: l = "", children: u, ...f }) {
|
|
4095
|
+
let h = a(_r), g = h ? h.value === e : t === void 0 ? void 0 : t, _ = h ? h.name : i, v = h && h.disabled || o, y = c || h && h.size || "md", b = s || h && h.color || "primary", [x, S] = d(!1), C = [
|
|
3983
4096
|
"wc-radio",
|
|
3984
4097
|
`wc-radio--${y}`,
|
|
3985
4098
|
v && "wc-radio--disabled",
|
|
@@ -4020,10 +4133,10 @@ function hr({ value: e, checked: t, onChange: n, label: r, name: i, disabled: o
|
|
|
4020
4133
|
]
|
|
4021
4134
|
});
|
|
4022
4135
|
}
|
|
4023
|
-
|
|
4136
|
+
yr.displayName = "Radio", vr.displayName = "RadioGroup";
|
|
4024
4137
|
//#endregion
|
|
4025
4138
|
//#region src/components/Rating/Rating.jsx
|
|
4026
|
-
var
|
|
4139
|
+
var br = ({ value: e = 0, max: t = 5, readOnly: n = !1, onChange: r = () => {}, className: i = "", style: a = {}, ...s }) => {
|
|
4027
4140
|
let [c, l] = d(0), [u, f] = d(e);
|
|
4028
4141
|
o(() => f(e), [e]);
|
|
4029
4142
|
let m = (e) => {
|
|
@@ -4054,80 +4167,96 @@ var gr = ({ value: e = 0, max: t = 5, readOnly: n = !1, onChange: r = () => {},
|
|
|
4054
4167
|
})
|
|
4055
4168
|
});
|
|
4056
4169
|
};
|
|
4057
|
-
|
|
4170
|
+
br.displayName = "Rating";
|
|
4058
4171
|
//#endregion
|
|
4059
4172
|
//#region src/components/Select/Select.jsx
|
|
4060
|
-
var
|
|
4061
|
-
let [
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4173
|
+
var xr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Select an option", label: i = "", helperText: a = "", error: o = !1, errorMessage: c = "", required: l = !1, disabled: f = !1, multiple: h = !1, clearable: g = !1, fullWidth: _ = !1, size: v = "md", variant: y = "filled", color: b = "primary", maxHeight: x = 200, name: S = "", id: C = "", className: w = "", style: T = {}, onFocus: E, onBlur: D, onSearch: O, renderOption: k, renderValue: A, ...j }) => {
|
|
4174
|
+
let [M, N] = d(!1), [P, F] = d(!1), [I, L] = d(-1), R = u(null), z = u(null), B = () => {
|
|
4175
|
+
N(!1), F(!1), L(-1);
|
|
4176
|
+
};
|
|
4177
|
+
ae({
|
|
4178
|
+
open: M,
|
|
4179
|
+
elementRef: z,
|
|
4180
|
+
refs: [R],
|
|
4181
|
+
closeOnEscape: !0,
|
|
4182
|
+
closeOnPointerDownOutside: !0,
|
|
4183
|
+
onEscapeKeyDown: B,
|
|
4184
|
+
onPointerDownOutside: B,
|
|
4185
|
+
zIndex: 1e3
|
|
4186
|
+
});
|
|
4187
|
+
let V = h ? n.filter((t) => e.includes(t.value)) : n.find((t) => t.value === e), H = () => {
|
|
4071
4188
|
let e = ["wc-select"];
|
|
4072
|
-
return e.push(`wc-select--${
|
|
4073
|
-
},
|
|
4074
|
-
|
|
4075
|
-
|
|
4189
|
+
return e.push(`wc-select--${y}`), e.push(`wc-select--${v}`), o && e.push("wc-select--error"), f && e.push("wc-select--disabled"), M && e.push("wc-select--open"), P && e.push("wc-select--focused"), _ && e.push("wc-select--full-width"), h && e.push("wc-select--multiple"), e.concat(w).filter(Boolean).join(" ");
|
|
4190
|
+
}, U = () => {
|
|
4191
|
+
if (!f) {
|
|
4192
|
+
let e = !M;
|
|
4193
|
+
N(e), F(e), L(e ? Math.max(0, n.findIndex((e) => !e.disabled)) : -1);
|
|
4194
|
+
}
|
|
4195
|
+
}, W = (n) => {
|
|
4076
4196
|
if (n.disabled) return;
|
|
4077
4197
|
let r;
|
|
4078
|
-
if (
|
|
4198
|
+
if (h) {
|
|
4079
4199
|
let t = Array.isArray(e) ? e : [];
|
|
4080
4200
|
r = t.includes(n.value) ? t.filter((e) => e !== n.value) : [...t, n.value];
|
|
4081
|
-
} else r = n.value,
|
|
4201
|
+
} else r = n.value, B();
|
|
4082
4202
|
t?.({ target: {
|
|
4083
|
-
name:
|
|
4203
|
+
name: S,
|
|
4084
4204
|
value: r
|
|
4085
4205
|
} });
|
|
4086
|
-
},
|
|
4206
|
+
}, ee = (e) => {
|
|
4087
4207
|
e.stopPropagation(), t?.({ target: {
|
|
4088
|
-
name:
|
|
4089
|
-
value:
|
|
4208
|
+
name: S,
|
|
4209
|
+
value: h ? [] : ""
|
|
4090
4210
|
} });
|
|
4091
|
-
},
|
|
4092
|
-
|
|
4093
|
-
},
|
|
4211
|
+
}, te = (e) => {
|
|
4212
|
+
F(!0), E?.(e);
|
|
4213
|
+
}, ne = (e) => {
|
|
4094
4214
|
setTimeout(() => {
|
|
4095
|
-
|
|
4215
|
+
R.current?.contains(document.activeElement) || (F(!1), D?.(e));
|
|
4096
4216
|
}, 100);
|
|
4097
|
-
},
|
|
4098
|
-
|
|
4099
|
-
|
|
4217
|
+
}, re = (e) => {
|
|
4218
|
+
if (f) return;
|
|
4219
|
+
let t = n.map((e, t) => ({
|
|
4220
|
+
option: e,
|
|
4221
|
+
index: t
|
|
4222
|
+
})).filter(({ option: e }) => !e.disabled), r = (e) => {
|
|
4223
|
+
if (!t.length) return;
|
|
4224
|
+
let n = t.findIndex(({ index: e }) => e === I);
|
|
4225
|
+
L(t[n < 0 ? 0 : (n + e + t.length) % t.length].index);
|
|
4226
|
+
};
|
|
4227
|
+
e.key === "Enter" || e.key === " " ? (e.preventDefault(), M && I >= 0 ? W(n[I]) : U()) : e.key === "ArrowDown" ? (e.preventDefault(), M ? r(1) : (N(!0), F(!0), L(t[0]?.index ?? -1))) : e.key === "ArrowUp" ? (e.preventDefault(), M ? r(-1) : (N(!0), F(!0), L(t[t.length - 1]?.index ?? -1))) : e.key === "Home" ? (e.preventDefault(), L(t[0]?.index ?? -1)) : e.key === "End" ? (e.preventDefault(), L(t[t.length - 1]?.index ?? -1)) : e.key === "Escape" && B();
|
|
4228
|
+
}, ie = () => h && Array.isArray(V) ? V.length === 0 ? /* @__PURE__ */ p("span", {
|
|
4100
4229
|
className: "wc-select__placeholder",
|
|
4101
4230
|
children: r
|
|
4102
4231
|
}) : /* @__PURE__ */ p("div", {
|
|
4103
4232
|
className: "wc-select__chips",
|
|
4104
|
-
children:
|
|
4233
|
+
children: V.map((e) => /* @__PURE__ */ p("span", {
|
|
4105
4234
|
className: "wc-select__chip",
|
|
4106
|
-
children:
|
|
4235
|
+
children: A ? A(e) : e.label || e.value
|
|
4107
4236
|
}, e.value))
|
|
4108
|
-
}) :
|
|
4237
|
+
}) : V ? A ? A(V) : V.label || V.value : /* @__PURE__ */ p("span", {
|
|
4109
4238
|
className: "wc-select__placeholder",
|
|
4110
4239
|
children: r
|
|
4111
4240
|
}), G = () => {
|
|
4112
4241
|
let e = ["wc-select__label"];
|
|
4113
|
-
return e.push(`wc-select__label--${
|
|
4242
|
+
return e.push(`wc-select__label--${v}`), o && e.push("wc-select__label--error"), (P || V) && e.push("wc-select__label--active"), e.join(" ");
|
|
4114
4243
|
}, K = () => {
|
|
4115
4244
|
let e = ["wc-select__container"];
|
|
4116
|
-
return e.push(`wc-select__container--${
|
|
4245
|
+
return e.push(`wc-select__container--${y}`), e.push(`wc-select__container--${v}`), f && e.push("wc-select__container--disabled"), o && e.push("wc-select__container--error"), P && e.push("wc-select__container--focused"), M && e.push("wc-select__container--open"), e.join(" ");
|
|
4117
4246
|
}, q = (e, t) => {
|
|
4118
4247
|
let n = ["wc-select__option"];
|
|
4119
4248
|
return t && n.push("wc-select__option--selected"), e.disabled && n.push("wc-select__option--disabled"), n.join(" ");
|
|
4120
|
-
}, J = s(), Y =
|
|
4249
|
+
}, J = s(), Y = C || S || J;
|
|
4121
4250
|
return /* @__PURE__ */ m("div", {
|
|
4122
|
-
className:
|
|
4123
|
-
style:
|
|
4124
|
-
ref:
|
|
4251
|
+
className: H(),
|
|
4252
|
+
style: T,
|
|
4253
|
+
ref: R,
|
|
4125
4254
|
children: [
|
|
4126
4255
|
i && /* @__PURE__ */ m("label", {
|
|
4127
4256
|
htmlFor: Y,
|
|
4128
4257
|
id: `${Y}-label`,
|
|
4129
4258
|
className: G(),
|
|
4130
|
-
children: [i,
|
|
4259
|
+
children: [i, l && /* @__PURE__ */ p("span", {
|
|
4131
4260
|
className: "wc-select__required",
|
|
4132
4261
|
children: "*"
|
|
4133
4262
|
})]
|
|
@@ -4137,39 +4266,40 @@ var _r = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4137
4266
|
children: [/* @__PURE__ */ m("div", {
|
|
4138
4267
|
className: "wc-select__control",
|
|
4139
4268
|
id: Y,
|
|
4140
|
-
onClick:
|
|
4141
|
-
onFocus:
|
|
4142
|
-
onBlur:
|
|
4143
|
-
onKeyDown:
|
|
4144
|
-
tabIndex:
|
|
4269
|
+
onClick: U,
|
|
4270
|
+
onFocus: te,
|
|
4271
|
+
onBlur: ne,
|
|
4272
|
+
onKeyDown: re,
|
|
4273
|
+
tabIndex: f ? -1 : 0,
|
|
4145
4274
|
role: "combobox",
|
|
4146
|
-
"aria-expanded":
|
|
4275
|
+
"aria-expanded": M,
|
|
4147
4276
|
"aria-haspopup": "listbox",
|
|
4148
4277
|
"aria-labelledby": i ? `${Y}-label` : void 0,
|
|
4149
4278
|
"aria-controls": `${Y}-options`,
|
|
4150
|
-
"aria-
|
|
4151
|
-
"aria-
|
|
4279
|
+
"aria-activedescendant": M && I >= 0 ? `${Y}-option-${I}` : void 0,
|
|
4280
|
+
"aria-disabled": f,
|
|
4281
|
+
"aria-required": l,
|
|
4152
4282
|
children: [/* @__PURE__ */ p("div", {
|
|
4153
4283
|
className: "wc-select__value",
|
|
4154
|
-
children:
|
|
4284
|
+
children: ie()
|
|
4155
4285
|
}), /* @__PURE__ */ m("div", {
|
|
4156
4286
|
className: "wc-select__indicators",
|
|
4157
|
-
children: [
|
|
4287
|
+
children: [g && (V || h && e?.length > 0) && /* @__PURE__ */ p("button", {
|
|
4158
4288
|
type: "button",
|
|
4159
4289
|
className: "wc-select__clear",
|
|
4160
|
-
onClick:
|
|
4290
|
+
onClick: ee,
|
|
4161
4291
|
tabIndex: -1,
|
|
4162
4292
|
children: "×"
|
|
4163
4293
|
}), /* @__PURE__ */ p("div", {
|
|
4164
|
-
className: `wc-select__arrow${
|
|
4294
|
+
className: `wc-select__arrow${M ? " wc-select__arrow--open" : ""}`,
|
|
4165
4295
|
children: "▼"
|
|
4166
4296
|
})]
|
|
4167
4297
|
})]
|
|
4168
|
-
}),
|
|
4298
|
+
}), M && /* @__PURE__ */ p("div", {
|
|
4169
4299
|
className: "wc-select__dropdown",
|
|
4170
4300
|
id: `${Y}-options`,
|
|
4171
|
-
style: { maxHeight:
|
|
4172
|
-
ref:
|
|
4301
|
+
style: { maxHeight: x },
|
|
4302
|
+
ref: z,
|
|
4173
4303
|
children: /* @__PURE__ */ p("div", {
|
|
4174
4304
|
className: "wc-select__options",
|
|
4175
4305
|
role: "listbox",
|
|
@@ -4177,15 +4307,17 @@ var _r = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4177
4307
|
className: "wc-select__no-options",
|
|
4178
4308
|
children: "没有可选项"
|
|
4179
4309
|
}) : n.map((t, n) => {
|
|
4180
|
-
let r =
|
|
4310
|
+
let r = h ? Array.isArray(e) && e.includes(t.value) : e === t.value;
|
|
4181
4311
|
return /* @__PURE__ */ m("div", {
|
|
4312
|
+
id: `${Y}-option-${n}`,
|
|
4182
4313
|
className: q(t, r),
|
|
4183
|
-
onClick: () =>
|
|
4314
|
+
onClick: () => W(t),
|
|
4184
4315
|
role: "option",
|
|
4185
4316
|
"aria-selected": r,
|
|
4317
|
+
"data-active": I === n ? "true" : void 0,
|
|
4186
4318
|
children: [/* @__PURE__ */ p("span", {
|
|
4187
4319
|
className: "wc-select__option-text",
|
|
4188
|
-
children:
|
|
4320
|
+
children: k ? k(t) : t.label || t.value
|
|
4189
4321
|
}), r && /* @__PURE__ */ p("svg", {
|
|
4190
4322
|
className: "wc-select__option-check",
|
|
4191
4323
|
viewBox: "0 0 24 24",
|
|
@@ -4199,9 +4331,9 @@ var _r = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4199
4331
|
})
|
|
4200
4332
|
})]
|
|
4201
4333
|
}),
|
|
4202
|
-
(
|
|
4334
|
+
(o || a) && /* @__PURE__ */ p("div", { children: o ? /* @__PURE__ */ p("p", {
|
|
4203
4335
|
className: "wc-select__error",
|
|
4204
|
-
children:
|
|
4336
|
+
children: c || o
|
|
4205
4337
|
}) : /* @__PURE__ */ p("p", {
|
|
4206
4338
|
className: "wc-select__helper",
|
|
4207
4339
|
children: a
|
|
@@ -4209,17 +4341,17 @@ var _r = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4209
4341
|
]
|
|
4210
4342
|
});
|
|
4211
4343
|
};
|
|
4212
|
-
|
|
4344
|
+
xr.displayName = "Select";
|
|
4213
4345
|
//#endregion
|
|
4214
4346
|
//#region src/components/Skeleton/Skeleton.jsx
|
|
4215
|
-
var
|
|
4347
|
+
var Sr = {
|
|
4216
4348
|
text: "wc-skeleton--text",
|
|
4217
4349
|
rectangular: "wc-skeleton--rectangular",
|
|
4218
4350
|
rounded: "wc-skeleton--rounded",
|
|
4219
4351
|
circular: "wc-skeleton--circular"
|
|
4220
|
-
},
|
|
4352
|
+
}, Cr = ({ animation: e = "pulse", component: t = "div", height: n, width: r, variant: i = "text", style: a = {}, className: o = "", ...s }) => {
|
|
4221
4353
|
let c = l(() => {
|
|
4222
|
-
let t = ["wc-skeleton",
|
|
4354
|
+
let t = ["wc-skeleton", Sr[i] || Sr.text];
|
|
4223
4355
|
return e === "pulse" && t.push("wc-skeleton--pulse"), e === "wave" && t.push("wc-skeleton--wave"), t.join(" ");
|
|
4224
4356
|
}, [e, i]), u = { ...a };
|
|
4225
4357
|
return r !== void 0 && (u.width = typeof r == "number" ? `${r}px` : r), n !== void 0 && (u.height = typeof n == "number" ? `${n}px` : n), !r && !n && (i === "circular" ? (u.width = "40px", u.height = "40px") : i === "text" ? (u.width = "100%", u.height = "16px") : (u.width = "100%", u.height = "128px")), /* @__PURE__ */ p(t, {
|
|
@@ -4231,7 +4363,7 @@ var vr = {
|
|
|
4231
4363
|
"aria-busy": "true",
|
|
4232
4364
|
...s
|
|
4233
4365
|
});
|
|
4234
|
-
},
|
|
4366
|
+
}, wr = ({ value: e, defaultValue: t = 0, min: n = 0, max: r = 100, step: i = 1, disabled: a = !1, label: c = "", valueLabelDisplay: u = "off", onChange: f = () => {}, className: h = "", style: g = {}, ..._ }) => {
|
|
4235
4367
|
let [v, y] = d(e === void 0 ? t : e), b = s();
|
|
4236
4368
|
o(() => {
|
|
4237
4369
|
e !== void 0 && y(e);
|
|
@@ -4278,27 +4410,29 @@ var vr = {
|
|
|
4278
4410
|
})]
|
|
4279
4411
|
});
|
|
4280
4412
|
};
|
|
4281
|
-
|
|
4413
|
+
wr.displayName = "Slider";
|
|
4282
4414
|
//#endregion
|
|
4283
4415
|
//#region src/components/SlideOver/SlideOver.jsx
|
|
4284
|
-
var
|
|
4285
|
-
let c = u(null), l =
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4416
|
+
var Tr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width: r = 400, children: a, header: o, footer: s }) => {
|
|
4417
|
+
let c = u(null), l = i(() => {
|
|
4418
|
+
t?.();
|
|
4419
|
+
}, [t]);
|
|
4420
|
+
return ae({
|
|
4421
|
+
open: e,
|
|
4422
|
+
elementRef: c,
|
|
4423
|
+
modal: !0,
|
|
4424
|
+
lockScroll: !0,
|
|
4425
|
+
restoreFocus: !0,
|
|
4426
|
+
initialFocus: !0,
|
|
4427
|
+
closeOnEscape: !0,
|
|
4428
|
+
closeOnPointerDownOutside: !1,
|
|
4429
|
+
onEscapeKeyDown: l,
|
|
4430
|
+
zIndex: 3e3
|
|
4431
|
+
}), /* @__PURE__ */ p(q, { children: e ? /* @__PURE__ */ m("div", {
|
|
4298
4432
|
className: "wc-slideover-wrapper",
|
|
4299
4433
|
children: [/* @__PURE__ */ p("div", {
|
|
4300
4434
|
className: "wc-slideover-overlay",
|
|
4301
|
-
onClick:
|
|
4435
|
+
onClick: l
|
|
4302
4436
|
}), /* @__PURE__ */ m("div", {
|
|
4303
4437
|
ref: c,
|
|
4304
4438
|
className: `wc-slideover-panel wc-slideover-${n}`,
|
|
@@ -4307,13 +4441,13 @@ var xr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4307
4441
|
"aria-modal": "true",
|
|
4308
4442
|
tabIndex: -1,
|
|
4309
4443
|
children: [
|
|
4310
|
-
|
|
4444
|
+
o && /* @__PURE__ */ p("header", {
|
|
4311
4445
|
className: "wc-slideover-header",
|
|
4312
|
-
children:
|
|
4446
|
+
children: o
|
|
4313
4447
|
}),
|
|
4314
4448
|
/* @__PURE__ */ p("div", {
|
|
4315
4449
|
className: "wc-slideover-body",
|
|
4316
|
-
children:
|
|
4450
|
+
children: a
|
|
4317
4451
|
}),
|
|
4318
4452
|
s && /* @__PURE__ */ p("footer", {
|
|
4319
4453
|
className: "wc-slideover-footer",
|
|
@@ -4322,7 +4456,7 @@ var xr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4322
4456
|
/* @__PURE__ */ p("button", {
|
|
4323
4457
|
className: "wc-slideover-close",
|
|
4324
4458
|
type: "button",
|
|
4325
|
-
onClick:
|
|
4459
|
+
onClick: l,
|
|
4326
4460
|
"aria-label": "关闭",
|
|
4327
4461
|
children: /* @__PURE__ */ p("svg", {
|
|
4328
4462
|
viewBox: "0 0 24 24",
|
|
@@ -4332,8 +4466,8 @@ var xr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4332
4466
|
})
|
|
4333
4467
|
]
|
|
4334
4468
|
})]
|
|
4335
|
-
}) : null
|
|
4336
|
-
},
|
|
4469
|
+
}) : null });
|
|
4470
|
+
}, Er = ({ as: e = "div", ratio: t = "equal", gap: n = "xl", align: r = "stretch", collapse: i = "md", className: a = "", children: o, ...s }) => /* @__PURE__ */ p(e, {
|
|
4337
4471
|
className: ["wc-split", a].filter(Boolean).join(" "),
|
|
4338
4472
|
"data-ratio": t,
|
|
4339
4473
|
"data-gap": n,
|
|
@@ -4342,34 +4476,34 @@ var xr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4342
4476
|
...s,
|
|
4343
4477
|
children: o
|
|
4344
4478
|
});
|
|
4345
|
-
|
|
4479
|
+
Er.displayName = "Split", Er.propTypes = {
|
|
4346
4480
|
as: $.default.elementType,
|
|
4347
|
-
ratio: $.default.oneOf(
|
|
4348
|
-
gap: $.default.oneOf(
|
|
4349
|
-
align: $.default.oneOf(
|
|
4350
|
-
collapse: $.default.oneOf(
|
|
4481
|
+
ratio: $.default.oneOf(Nn),
|
|
4482
|
+
gap: $.default.oneOf(On),
|
|
4483
|
+
align: $.default.oneOf(kn),
|
|
4484
|
+
collapse: $.default.oneOf(Pn),
|
|
4351
4485
|
className: $.default.string,
|
|
4352
4486
|
children: $.default.node
|
|
4353
4487
|
};
|
|
4354
4488
|
//#endregion
|
|
4355
4489
|
//#region src/components/Stack/Stack.jsx
|
|
4356
|
-
var
|
|
4490
|
+
var Dr = ({ as: e = "div", gap: t = "md", align: n = "stretch", className: r = "", children: i, ...a }) => /* @__PURE__ */ p(e, {
|
|
4357
4491
|
className: ["wc-stack", r].filter(Boolean).join(" "),
|
|
4358
4492
|
"data-gap": t,
|
|
4359
4493
|
"data-align": n,
|
|
4360
4494
|
...a,
|
|
4361
4495
|
children: i
|
|
4362
4496
|
});
|
|
4363
|
-
|
|
4497
|
+
Dr.displayName = "Stack", Dr.propTypes = {
|
|
4364
4498
|
as: $.default.elementType,
|
|
4365
|
-
gap: $.default.oneOf(
|
|
4366
|
-
align: $.default.oneOf(
|
|
4499
|
+
gap: $.default.oneOf(On),
|
|
4500
|
+
align: $.default.oneOf(kn),
|
|
4367
4501
|
className: $.default.string,
|
|
4368
4502
|
children: $.default.node
|
|
4369
4503
|
};
|
|
4370
4504
|
//#endregion
|
|
4371
4505
|
//#region src/components/Snackbar/Snackbar.jsx
|
|
4372
|
-
var
|
|
4506
|
+
var Or = ({ severity: e }) => {
|
|
4373
4507
|
let t = e === "success" ? /* @__PURE__ */ p("path", { d: "m6.8 10.1 2.1 2.1 4.4-4.6" }) : e === "info" ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("path", { d: "M10 9v4" }), /* @__PURE__ */ p("path", { d: "M10 6.5h.01" })] }) : e === "warning" ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("path", { d: "M10 6.5v4.2" }), /* @__PURE__ */ p("path", { d: "M10 13.5h.01" })] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("path", { d: "m7.5 7.5 5 5" }), /* @__PURE__ */ p("path", { d: "m12.5 7.5-5 5" })] });
|
|
4374
4508
|
return /* @__PURE__ */ m("svg", {
|
|
4375
4509
|
viewBox: "0 0 20 20",
|
|
@@ -4386,10 +4520,10 @@ var wr = ({ severity: e }) => {
|
|
|
4386
4520
|
}), t]
|
|
4387
4521
|
});
|
|
4388
4522
|
};
|
|
4389
|
-
function
|
|
4523
|
+
function kr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r = "", severity: i = "info", variant: a = "standard", autoHideDuration: s = 6e3, anchorOrigin: c = {
|
|
4390
4524
|
vertical: "bottom",
|
|
4391
4525
|
horizontal: "left"
|
|
4392
|
-
}, action: l = "", closable: u = !0, showIcon: f = !0, showProgress:
|
|
4526
|
+
}, action: l = "", closable: u = !0, showIcon: f = !0, showProgress: g = !1, onClose: _ = () => {}, onUpdateModelValue: v, onAction: y = () => {}, children: b }) {
|
|
4393
4527
|
let x = t !== void 0, [S, C] = d(x ? t : e), [w, T] = d(100);
|
|
4394
4528
|
o(() => {
|
|
4395
4529
|
let n = x ? t : e;
|
|
@@ -4399,7 +4533,7 @@ function Tr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4399
4533
|
let e = Date.now(), t = setTimeout(() => {
|
|
4400
4534
|
E();
|
|
4401
4535
|
}, s);
|
|
4402
|
-
if (
|
|
4536
|
+
if (g) {
|
|
4403
4537
|
let n = setInterval(() => {
|
|
4404
4538
|
let t = Date.now() - e, r = Math.max(0, 100 - t / s * 100);
|
|
4405
4539
|
T(r), r <= 0 && clearInterval(n);
|
|
@@ -4412,7 +4546,7 @@ function Tr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4412
4546
|
}, [
|
|
4413
4547
|
S,
|
|
4414
4548
|
s,
|
|
4415
|
-
|
|
4549
|
+
g
|
|
4416
4550
|
]);
|
|
4417
4551
|
let E = () => {
|
|
4418
4552
|
x ? v?.(!1) : C(!1), _();
|
|
@@ -4428,7 +4562,7 @@ function Tr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4428
4562
|
position: "fixed",
|
|
4429
4563
|
zIndex: 1400
|
|
4430
4564
|
}, { vertical: A, horizontal: j } = c;
|
|
4431
|
-
return A === "top" ? k.top = "20px" : k.bottom = "20px", j === "left" ? k.left = "20px" : j === "right" ? k.right = "20px" : (k.left = "50%", k.transform = "translateX(-50%)"),
|
|
4565
|
+
return A === "top" ? k.top = "20px" : k.bottom = "20px", j === "left" ? k.left = "20px" : j === "right" ? k.right = "20px" : (k.left = "50%", k.transform = "translateX(-50%)"), h(/* @__PURE__ */ m("div", {
|
|
4432
4566
|
className: O.join(" "),
|
|
4433
4567
|
style: k,
|
|
4434
4568
|
role: "alert",
|
|
@@ -4437,7 +4571,7 @@ function Tr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4437
4571
|
children: [
|
|
4438
4572
|
f && /* @__PURE__ */ p("div", {
|
|
4439
4573
|
className: "wc-snackbar__icon",
|
|
4440
|
-
children: /* @__PURE__ */ p(
|
|
4574
|
+
children: /* @__PURE__ */ p(Or, { severity: i })
|
|
4441
4575
|
}),
|
|
4442
4576
|
/* @__PURE__ */ m("div", {
|
|
4443
4577
|
className: "wc-snackbar__content",
|
|
@@ -4473,7 +4607,7 @@ function Tr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4473
4607
|
children: /* @__PURE__ */ p("path", { d: "m6 6 8 8M14 6l-8 8" })
|
|
4474
4608
|
})
|
|
4475
4609
|
}),
|
|
4476
|
-
|
|
4610
|
+
g && s > 0 && /* @__PURE__ */ p("div", {
|
|
4477
4611
|
className: "wc-snackbar__progress",
|
|
4478
4612
|
children: /* @__PURE__ */ p("div", {
|
|
4479
4613
|
className: "wc-snackbar__progress-bar",
|
|
@@ -4485,7 +4619,7 @@ function Tr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4485
4619
|
}
|
|
4486
4620
|
//#endregion
|
|
4487
4621
|
//#region ../core/src/components/Status/utils.js
|
|
4488
|
-
var
|
|
4622
|
+
var Ar = [
|
|
4489
4623
|
"default",
|
|
4490
4624
|
"success",
|
|
4491
4625
|
"error",
|
|
@@ -4494,7 +4628,7 @@ var Er = [
|
|
|
4494
4628
|
"pending",
|
|
4495
4629
|
"processing",
|
|
4496
4630
|
"cancelled"
|
|
4497
|
-
],
|
|
4631
|
+
], jr = [
|
|
4498
4632
|
"auto",
|
|
4499
4633
|
"pulse",
|
|
4500
4634
|
"spin",
|
|
@@ -4504,7 +4638,7 @@ var Er = [
|
|
|
4504
4638
|
"breathe",
|
|
4505
4639
|
"ripple",
|
|
4506
4640
|
"glow"
|
|
4507
|
-
],
|
|
4641
|
+
], Mr = {
|
|
4508
4642
|
default: {
|
|
4509
4643
|
text: "默认",
|
|
4510
4644
|
color: "var(--wc-text-tertiary)"
|
|
@@ -4538,29 +4672,29 @@ var Er = [
|
|
|
4538
4672
|
color: "var(--wc-text-disabled)"
|
|
4539
4673
|
}
|
|
4540
4674
|
};
|
|
4541
|
-
function
|
|
4542
|
-
return
|
|
4675
|
+
function Nr(e) {
|
|
4676
|
+
return Ar.includes(e);
|
|
4543
4677
|
}
|
|
4544
|
-
function
|
|
4545
|
-
return
|
|
4678
|
+
function Pr(e) {
|
|
4679
|
+
return Nr(e) ? e : "default";
|
|
4546
4680
|
}
|
|
4547
|
-
function
|
|
4548
|
-
let o =
|
|
4681
|
+
function Fr({ status: e, size: t, showText: n, animated: r, animationType: i = "auto", className: a }) {
|
|
4682
|
+
let o = Pr(e), s = [
|
|
4549
4683
|
"wc-status",
|
|
4550
4684
|
`wc-status--${o}`,
|
|
4551
4685
|
`wc-status--${t}`
|
|
4552
4686
|
];
|
|
4553
4687
|
if (n && s.push("wc-status--with-text"), r) {
|
|
4554
|
-
let e =
|
|
4688
|
+
let e = Lr(o, i);
|
|
4555
4689
|
s.push("wc-status--animated", `wc-status--${e}`);
|
|
4556
4690
|
}
|
|
4557
4691
|
return a && s.push(a), s.filter(Boolean).join(" ");
|
|
4558
4692
|
}
|
|
4559
|
-
function
|
|
4560
|
-
return
|
|
4693
|
+
function Ir(e) {
|
|
4694
|
+
return Mr[e]?.text || Mr.default.text;
|
|
4561
4695
|
}
|
|
4562
|
-
function
|
|
4563
|
-
return t !== "auto" &&
|
|
4696
|
+
function Lr(e, t = "auto") {
|
|
4697
|
+
return t !== "auto" && jr.includes(t) ? t : {
|
|
4564
4698
|
processing: "spin",
|
|
4565
4699
|
pending: "pulse",
|
|
4566
4700
|
success: "bounce",
|
|
@@ -4573,15 +4707,15 @@ function Nr(e, t = "auto") {
|
|
|
4573
4707
|
}
|
|
4574
4708
|
//#endregion
|
|
4575
4709
|
//#region src/components/Status/Status.jsx
|
|
4576
|
-
var
|
|
4577
|
-
let s =
|
|
4710
|
+
var Rr = ({ status: e = "default", size: t = "md", showText: n = !1, animated: r = !1, animationType: i = "auto", className: a = "", ...o }) => {
|
|
4711
|
+
let s = Fr({
|
|
4578
4712
|
status: e,
|
|
4579
4713
|
size: t,
|
|
4580
4714
|
showText: n,
|
|
4581
4715
|
animated: r,
|
|
4582
4716
|
animationType: i,
|
|
4583
4717
|
className: a
|
|
4584
|
-
}), c =
|
|
4718
|
+
}), c = Ir(e);
|
|
4585
4719
|
return /* @__PURE__ */ p("span", {
|
|
4586
4720
|
className: s,
|
|
4587
4721
|
title: c,
|
|
@@ -4593,10 +4727,10 @@ var Pr = ({ status: e = "default", size: t = "md", showText: n = !1, animated: r
|
|
|
4593
4727
|
})
|
|
4594
4728
|
});
|
|
4595
4729
|
};
|
|
4596
|
-
|
|
4730
|
+
Rr.displayName = "Status";
|
|
4597
4731
|
//#endregion
|
|
4598
4732
|
//#region src/components/Switch/Switch.jsx
|
|
4599
|
-
var
|
|
4733
|
+
var zr = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", disabled: i = !1, required: a = !1, color: o = "primary", size: c = "md", className: l = "", ...u }) => {
|
|
4600
4734
|
let d = s(), f = `${d}-input`, h = [
|
|
4601
4735
|
"primary",
|
|
4602
4736
|
"success",
|
|
@@ -4657,20 +4791,20 @@ var Fr = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", di
|
|
|
4657
4791
|
})]
|
|
4658
4792
|
});
|
|
4659
4793
|
};
|
|
4660
|
-
|
|
4794
|
+
zr.displayName = "Switch";
|
|
4661
4795
|
//#endregion
|
|
4662
4796
|
//#region src/components/Table/Table.jsx
|
|
4663
|
-
var
|
|
4797
|
+
var Br = n({
|
|
4664
4798
|
size: "md",
|
|
4665
4799
|
dense: !1,
|
|
4666
4800
|
hover: !1,
|
|
4667
4801
|
striped: !1
|
|
4668
|
-
}),
|
|
4802
|
+
}), Vr = ({ size: e = "md", stickyHeader: t = !1, dense: n = !1, hover: r = !1, striped: i = !1, children: a, className: o = "", ...s }) => /* @__PURE__ */ p("div", {
|
|
4669
4803
|
className: `wc-table-container${t ? " wc-table-container--sticky" : ""} ${o}`,
|
|
4670
4804
|
...s,
|
|
4671
4805
|
children: /* @__PURE__ */ p("table", {
|
|
4672
4806
|
className: `wc-table wc-table--${e}${r ? " wc-table--hover" : ""}${i ? " wc-table--striped" : ""}${n ? " wc-table--dense" : ""}`,
|
|
4673
|
-
children: /* @__PURE__ */ p(
|
|
4807
|
+
children: /* @__PURE__ */ p(Br.Provider, {
|
|
4674
4808
|
value: {
|
|
4675
4809
|
size: e,
|
|
4676
4810
|
dense: n,
|
|
@@ -4682,24 +4816,24 @@ var Ir = n({
|
|
|
4682
4816
|
})
|
|
4683
4817
|
})
|
|
4684
4818
|
});
|
|
4685
|
-
|
|
4686
|
-
var
|
|
4687
|
-
let { stickyHeader: r } = a(
|
|
4819
|
+
Vr.displayName = "Table";
|
|
4820
|
+
var Hr = ({ children: e, className: t = "", ...n }) => {
|
|
4821
|
+
let { stickyHeader: r } = a(Br);
|
|
4688
4822
|
return /* @__PURE__ */ p("thead", {
|
|
4689
4823
|
className: `wc-table-head${r ? " wc-table-head--sticky" : ""} ${t}`,
|
|
4690
4824
|
...n,
|
|
4691
4825
|
children: e
|
|
4692
4826
|
});
|
|
4693
4827
|
};
|
|
4694
|
-
|
|
4695
|
-
var
|
|
4828
|
+
Hr.displayName = "TableHead";
|
|
4829
|
+
var Ur = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ p("tbody", {
|
|
4696
4830
|
className: `wc-table-body ${t}`,
|
|
4697
4831
|
...n,
|
|
4698
4832
|
children: e
|
|
4699
4833
|
});
|
|
4700
|
-
|
|
4701
|
-
var
|
|
4702
|
-
let c = a(
|
|
4834
|
+
Ur.displayName = "TableBody";
|
|
4835
|
+
var Wr = ({ hover: e, selected: t = !1, clickable: n = !1, children: r, className: i = "", onClick: o, ...s }) => {
|
|
4836
|
+
let c = a(Br);
|
|
4703
4837
|
return /* @__PURE__ */ p("tr", {
|
|
4704
4838
|
className: [
|
|
4705
4839
|
"wc-table-row",
|
|
@@ -4713,9 +4847,9 @@ var Br = ({ hover: e, selected: t = !1, clickable: n = !1, children: r, classNam
|
|
|
4713
4847
|
children: r
|
|
4714
4848
|
});
|
|
4715
4849
|
};
|
|
4716
|
-
|
|
4717
|
-
var
|
|
4718
|
-
let d = a(
|
|
4850
|
+
Wr.displayName = "TableRow";
|
|
4851
|
+
var Gr = ({ component: e = "td", align: t = "inherit", padding: n = "normal", size: r, sortDirection: i = !1, variant: o = "body", scope: s, children: c, className: l = "", ...u }) => {
|
|
4852
|
+
let d = a(Br), f = r || (d.dense ? "small" : "medium");
|
|
4719
4853
|
return /* @__PURE__ */ p(e, {
|
|
4720
4854
|
className: [
|
|
4721
4855
|
"wc-table-cell",
|
|
@@ -4732,13 +4866,13 @@ var Vr = ({ component: e = "td", align: t = "inherit", padding: n = "normal", si
|
|
|
4732
4866
|
children: c
|
|
4733
4867
|
});
|
|
4734
4868
|
};
|
|
4735
|
-
|
|
4736
|
-
var
|
|
4737
|
-
Head:
|
|
4738
|
-
Body:
|
|
4739
|
-
Row:
|
|
4740
|
-
Cell:
|
|
4741
|
-
}),
|
|
4869
|
+
Gr.displayName = "TableCell";
|
|
4870
|
+
var Kr = Object.assign(Vr, {
|
|
4871
|
+
Head: Hr,
|
|
4872
|
+
Body: Ur,
|
|
4873
|
+
Row: Wr,
|
|
4874
|
+
Cell: Gr
|
|
4875
|
+
}), qr = ({ tabs: e = [], activeIndex: t, onChange: n, variant: r = "default", children: i, className: a = "", ...c }) => {
|
|
4742
4876
|
let l = s(), [u, f] = d(t || 0), h = t !== void 0, g = h ? t : u;
|
|
4743
4877
|
o(() => {
|
|
4744
4878
|
h && f(t);
|
|
@@ -4799,10 +4933,10 @@ var Hr = Object.assign(Lr, {
|
|
|
4799
4933
|
})]
|
|
4800
4934
|
});
|
|
4801
4935
|
};
|
|
4802
|
-
|
|
4936
|
+
qr.displayName = "Tabs";
|
|
4803
4937
|
//#endregion
|
|
4804
4938
|
//#region src/components/TextField/TextField.jsx
|
|
4805
|
-
var
|
|
4939
|
+
var Jr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeholder: i = "", helperText: a = "", error: s = "", required: c = !1, disabled: l = !1, readonly: u = !1, autoFocus: f = !1, fullWidth: h = !1, multiline: g = !1, rows: _ = 4, maxRows: v, minRows: y, variant: b = "filled", size: x = "md", color: S = "primary", startAdornment: C = null, endAdornment: w = null, maxLength: T, minLength: E, pattern: D, autoComplete: O = "off", name: k = "", id: A = "", className: j = "", style: M = {}, onFocus: N, onBlur: P, onKeyDown: F, onKeyUp: I, onKeyPress: L, ...R }) => {
|
|
4806
4940
|
let [z, B] = d(!1), [V, H] = d(!!e);
|
|
4807
4941
|
o(() => {
|
|
4808
4942
|
H(!!e);
|
|
@@ -4820,17 +4954,17 @@ var Wr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
4820
4954
|
}, ne = () => {
|
|
4821
4955
|
let e = ["wc-textfield__container"];
|
|
4822
4956
|
return e.push(`wc-textfield__container--${b}`), e.push(`wc-textfield__container--${x}`), s && e.push("wc-textfield__container--error"), l && e.push("wc-textfield__container--disabled"), z && e.push("wc-textfield__container--focused"), V && e.push("wc-textfield__container--has-value"), e.filter(Boolean).join(" ");
|
|
4823
|
-
},
|
|
4957
|
+
}, re = () => {
|
|
4824
4958
|
let e = ["wc-textfield__label"];
|
|
4825
4959
|
return e.push(`wc-textfield__label--${x}`), s && e.push("wc-textfield__label--error"), z && e.push("wc-textfield__label--focused"), e.filter(Boolean).join(" ");
|
|
4826
|
-
},
|
|
4960
|
+
}, ie = g ? "textarea" : "input", G = A || k || `textfield-${Math.random().toString(36).substr(2, 9)}`, K = !!s;
|
|
4827
4961
|
return /* @__PURE__ */ m("div", {
|
|
4828
4962
|
className: te(),
|
|
4829
4963
|
style: M,
|
|
4830
4964
|
children: [
|
|
4831
4965
|
r && /* @__PURE__ */ m("label", {
|
|
4832
|
-
htmlFor:
|
|
4833
|
-
className:
|
|
4966
|
+
htmlFor: G,
|
|
4967
|
+
className: re(),
|
|
4834
4968
|
children: [r, c && /* @__PURE__ */ p("span", {
|
|
4835
4969
|
className: "wc-textfield__required",
|
|
4836
4970
|
children: "*"
|
|
@@ -4843,9 +4977,9 @@ var Wr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
4843
4977
|
className: "wc-textfield__adornment wc-textfield__adornment--start",
|
|
4844
4978
|
children: C
|
|
4845
4979
|
}),
|
|
4846
|
-
/* @__PURE__ */ p(
|
|
4980
|
+
/* @__PURE__ */ p(ie, {
|
|
4847
4981
|
className: g ? "wc-textfield__input wc-textfield__textarea" : "wc-textfield__input",
|
|
4848
|
-
id:
|
|
4982
|
+
id: G,
|
|
4849
4983
|
type: g ? void 0 : n,
|
|
4850
4984
|
value: e,
|
|
4851
4985
|
onChange: U,
|
|
@@ -4867,9 +5001,9 @@ var Wr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
4867
5001
|
name: k,
|
|
4868
5002
|
...R
|
|
4869
5003
|
}),
|
|
4870
|
-
(w ||
|
|
5004
|
+
(w || K) && /* @__PURE__ */ m("div", {
|
|
4871
5005
|
className: "wc-textfield__adornment wc-textfield__adornment--end",
|
|
4872
|
-
children: [
|
|
5006
|
+
children: [K && /* @__PURE__ */ p("svg", {
|
|
4873
5007
|
className: "wc-textfield__error-icon",
|
|
4874
5008
|
fill: "currentColor",
|
|
4875
5009
|
viewBox: "0 0 20 20",
|
|
@@ -4882,68 +5016,76 @@ var Wr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
4882
5016
|
})
|
|
4883
5017
|
]
|
|
4884
5018
|
}),
|
|
4885
|
-
(a ||
|
|
4886
|
-
className: `wc-textfield__helper-text ${
|
|
4887
|
-
children:
|
|
5019
|
+
(a || K) && /* @__PURE__ */ p("div", {
|
|
5020
|
+
className: `wc-textfield__helper-text ${K ? "wc-textfield__helper-text--error" : ""}`,
|
|
5021
|
+
children: K ? s : a
|
|
4888
5022
|
})
|
|
4889
5023
|
]
|
|
4890
5024
|
});
|
|
4891
5025
|
};
|
|
4892
|
-
|
|
5026
|
+
Jr.displayName = "TextField";
|
|
4893
5027
|
//#endregion
|
|
4894
5028
|
//#region ../core/src/components/Toolbar/utils.js
|
|
4895
|
-
var
|
|
5029
|
+
var Yr = (e, t, n = "") => {
|
|
4896
5030
|
let r = ["flex items-center w-full"];
|
|
4897
5031
|
return e === "dense" ? r.push("min-h-12 py-2") : r.push("min-h-16 py-3"), t || r.push("px-4 sm:px-6 lg:px-8"), n && r.push(n), r.join(" ");
|
|
4898
|
-
},
|
|
4899
|
-
className:
|
|
5032
|
+
}, Xr = ({ children: e, variant: t = "regular", disableGutters: n = !1, className: r = "", style: i = {}, ...a }) => /* @__PURE__ */ p("div", {
|
|
5033
|
+
className: Yr(t, n, r),
|
|
4900
5034
|
style: i,
|
|
4901
5035
|
...a,
|
|
4902
5036
|
children: e
|
|
4903
|
-
}),
|
|
5037
|
+
}), Zr = {
|
|
4904
5038
|
top: "wc-tooltip--top",
|
|
4905
5039
|
bottom: "wc-tooltip--bottom",
|
|
4906
5040
|
left: "wc-tooltip--left",
|
|
4907
5041
|
right: "wc-tooltip--right"
|
|
4908
|
-
},
|
|
5042
|
+
}, Qr = [
|
|
4909
5043
|
"top",
|
|
4910
5044
|
"bottom",
|
|
4911
5045
|
"left",
|
|
4912
5046
|
"right"
|
|
4913
5047
|
];
|
|
4914
|
-
function
|
|
4915
|
-
return
|
|
5048
|
+
function $r(e) {
|
|
5049
|
+
return Qr.includes(e);
|
|
4916
5050
|
}
|
|
4917
|
-
function
|
|
4918
|
-
return
|
|
5051
|
+
function ei(e) {
|
|
5052
|
+
return Zr[e] || Zr.top;
|
|
4919
5053
|
}
|
|
4920
5054
|
//#endregion
|
|
4921
5055
|
//#region src/components/Tooltip/Tooltip.jsx
|
|
4922
|
-
function
|
|
4923
|
-
|
|
4924
|
-
let [i, a] = d(!1), o = s(), c =
|
|
5056
|
+
function ti({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
5057
|
+
$r(t) || console.warn(`Invalid tooltip placement: ${t}. Using 'top' as default.`);
|
|
5058
|
+
let [i, a] = d(!1), o = s(), c = u(null), l = u(null), f = ei(J({
|
|
5059
|
+
open: i,
|
|
5060
|
+
anchorRef: c,
|
|
5061
|
+
floatingRef: l,
|
|
5062
|
+
placement: t,
|
|
5063
|
+
offset: 8
|
|
5064
|
+
})), h = () => {
|
|
4925
5065
|
a(!0);
|
|
4926
|
-
},
|
|
5066
|
+
}, g = () => {
|
|
4927
5067
|
a(!1);
|
|
4928
5068
|
};
|
|
4929
5069
|
return /* @__PURE__ */ m("span", {
|
|
5070
|
+
ref: c,
|
|
4930
5071
|
className: `wc-tooltip-wrapper ${r}`.trim(),
|
|
4931
5072
|
"aria-describedby": i ? o : void 0,
|
|
4932
|
-
onMouseEnter:
|
|
4933
|
-
onMouseLeave:
|
|
4934
|
-
onFocus:
|
|
4935
|
-
onBlur:
|
|
4936
|
-
children: [n, i && /* @__PURE__ */ p("div", {
|
|
5073
|
+
onMouseEnter: h,
|
|
5074
|
+
onMouseLeave: g,
|
|
5075
|
+
onFocus: h,
|
|
5076
|
+
onBlur: g,
|
|
5077
|
+
children: [n, i && /* @__PURE__ */ p(q, { children: /* @__PURE__ */ p("div", {
|
|
5078
|
+
ref: l,
|
|
4937
5079
|
id: o,
|
|
4938
|
-
className: `wc-tooltip ${
|
|
5080
|
+
className: `wc-tooltip ${f}`,
|
|
4939
5081
|
role: "tooltip",
|
|
4940
5082
|
children: e
|
|
4941
|
-
})]
|
|
5083
|
+
}) })]
|
|
4942
5084
|
});
|
|
4943
5085
|
}
|
|
4944
5086
|
//#endregion
|
|
4945
5087
|
//#region ../core/src/components/Typography/utils.js
|
|
4946
|
-
var
|
|
5088
|
+
var ni = {
|
|
4947
5089
|
h1: "h1",
|
|
4948
5090
|
h2: "h2",
|
|
4949
5091
|
h3: "h3",
|
|
@@ -4957,7 +5099,7 @@ var Qr = {
|
|
|
4957
5099
|
caption: "span",
|
|
4958
5100
|
overline: "span",
|
|
4959
5101
|
button: "span"
|
|
4960
|
-
},
|
|
5102
|
+
}, ri = {
|
|
4961
5103
|
h1: "wc-typography--h1",
|
|
4962
5104
|
h2: "wc-typography--h2",
|
|
4963
5105
|
h3: "wc-typography--h3",
|
|
@@ -4971,7 +5113,7 @@ var Qr = {
|
|
|
4971
5113
|
caption: "wc-typography--caption",
|
|
4972
5114
|
overline: "wc-typography--overline",
|
|
4973
5115
|
button: "wc-typography--button"
|
|
4974
|
-
},
|
|
5116
|
+
}, ii = {
|
|
4975
5117
|
inherit: "wc-typography--color-inherit",
|
|
4976
5118
|
primary: "wc-typography--color-primary",
|
|
4977
5119
|
secondary: "wc-typography--color-secondary",
|
|
@@ -4981,12 +5123,12 @@ var Qr = {
|
|
|
4981
5123
|
textPrimary: "wc-typography--color-text-primary",
|
|
4982
5124
|
textSecondary: "wc-typography--color-text-secondary",
|
|
4983
5125
|
textDisabled: "wc-typography--color-text-disabled"
|
|
4984
|
-
},
|
|
5126
|
+
}, ai = {
|
|
4985
5127
|
left: "wc-typography--align-left",
|
|
4986
5128
|
center: "wc-typography--align-center",
|
|
4987
5129
|
right: "wc-typography--align-right",
|
|
4988
5130
|
justify: "wc-typography--align-justify"
|
|
4989
|
-
},
|
|
5131
|
+
}, oi = {
|
|
4990
5132
|
h1: "1.2",
|
|
4991
5133
|
h2: "1.2",
|
|
4992
5134
|
h3: "1.3",
|
|
@@ -5001,15 +5143,15 @@ var Qr = {
|
|
|
5001
5143
|
overline: "1.4",
|
|
5002
5144
|
button: "1.4"
|
|
5003
5145
|
};
|
|
5004
|
-
function
|
|
5005
|
-
return t ||
|
|
5146
|
+
function si(e, t) {
|
|
5147
|
+
return t || ni[e] || "p";
|
|
5006
5148
|
}
|
|
5007
|
-
function
|
|
5149
|
+
function ci(e, t, n, r, i, a = "") {
|
|
5008
5150
|
return [
|
|
5009
5151
|
"wc-typography",
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
n === "inherit" ? null :
|
|
5152
|
+
ri[e],
|
|
5153
|
+
ii[t],
|
|
5154
|
+
n === "inherit" ? null : ai[n],
|
|
5013
5155
|
r ? "wc-typography--gutter-bottom" : null,
|
|
5014
5156
|
i ? "wc-typography--no-wrap" : null,
|
|
5015
5157
|
a
|
|
@@ -5017,19 +5159,19 @@ function ii(e, t, n, r, i, a = "") {
|
|
|
5017
5159
|
}
|
|
5018
5160
|
//#endregion
|
|
5019
5161
|
//#region src/components/Typography/Typography.jsx
|
|
5020
|
-
var
|
|
5021
|
-
className:
|
|
5162
|
+
var li = ({ variant: e = "body1", component: t, color: n = "inherit", align: r = "inherit", gutterBottom: i = !1, noWrap: a = !1, children: o, className: s = "", style: c = {}, ...l }) => /* @__PURE__ */ p(si(e, t), {
|
|
5163
|
+
className: ci(e, n, r, i, a, s),
|
|
5022
5164
|
style: {
|
|
5023
|
-
lineHeight:
|
|
5165
|
+
lineHeight: oi[e],
|
|
5024
5166
|
...c
|
|
5025
5167
|
},
|
|
5026
5168
|
...l,
|
|
5027
5169
|
children: o
|
|
5028
5170
|
});
|
|
5029
|
-
|
|
5171
|
+
li.displayName = "Typography";
|
|
5030
5172
|
//#endregion
|
|
5031
5173
|
//#region ../core/src/components/TypingText/utils.jsx
|
|
5032
|
-
var
|
|
5174
|
+
var ui = class {
|
|
5033
5175
|
constructor(e, t = {}) {
|
|
5034
5176
|
this.text = e, this.speed = t.speed || 100, this.pause = t.pause || 1500, this.loop = t.loop || !1, this.erase = t.erase || !1, this.index = 0, this.direction = 1, this.timer = null, this.onUpdate = t.onUpdate || (() => {});
|
|
5035
5177
|
}
|
|
@@ -5050,9 +5192,9 @@ var oi = class {
|
|
|
5050
5192
|
updateText(e) {
|
|
5051
5193
|
this.text = e, this.reset(), this.start();
|
|
5052
5194
|
}
|
|
5053
|
-
},
|
|
5195
|
+
}, di = ({ text: e = "Hello, Watercolor UI!", speed: t = 100, pause: n = 1500, loop: r = !1, erase: i = !1, showCursor: a = !0, className: s = "", style: c = {}, ...l }) => {
|
|
5054
5196
|
let [f, h] = d(""), g = u(null);
|
|
5055
|
-
return o(() => (g.current = new
|
|
5197
|
+
return o(() => (g.current = new ui(e, {
|
|
5056
5198
|
speed: t,
|
|
5057
5199
|
pause: n,
|
|
5058
5200
|
loop: r,
|
|
@@ -5076,10 +5218,10 @@ var oi = class {
|
|
|
5076
5218
|
}), a && /* @__PURE__ */ p("span", { className: "typing-cursor" })]
|
|
5077
5219
|
});
|
|
5078
5220
|
};
|
|
5079
|
-
|
|
5221
|
+
di.displayName = "TypingText";
|
|
5080
5222
|
//#endregion
|
|
5081
5223
|
//#region src/components/Input/VerificationCodeInput.jsx
|
|
5082
|
-
var
|
|
5224
|
+
var fi = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus: i = !1, className: a = "", ...s }) => {
|
|
5083
5225
|
let c = u([]);
|
|
5084
5226
|
o(() => {
|
|
5085
5227
|
typeof t == "string" && t.split("").forEach((e, t) => {
|
|
@@ -5126,23 +5268,23 @@ var ci = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus:
|
|
|
5126
5268
|
}, t))
|
|
5127
5269
|
});
|
|
5128
5270
|
};
|
|
5129
|
-
|
|
5271
|
+
fi.displayName = "VerificationCodeInput";
|
|
5130
5272
|
//#endregion
|
|
5131
5273
|
//#region ../core/src/components/VideoPlayer/utils.js
|
|
5132
|
-
function
|
|
5274
|
+
function pi(e) {
|
|
5133
5275
|
return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
5134
5276
|
}
|
|
5135
|
-
function
|
|
5277
|
+
function mi(e, t) {
|
|
5136
5278
|
let n = e.currentTarget.getBoundingClientRect();
|
|
5137
5279
|
return (e.clientX - n.left) / n.width * t;
|
|
5138
5280
|
}
|
|
5139
|
-
function
|
|
5281
|
+
function hi(e) {
|
|
5140
5282
|
e && (document.fullscreenElement ? document.exitFullscreen?.() : e.requestFullscreen?.());
|
|
5141
5283
|
}
|
|
5142
5284
|
//#endregion
|
|
5143
5285
|
//#region src/components/VideoPlayer/VideoPlayer.jsx
|
|
5144
|
-
var
|
|
5145
|
-
let s = u(null), [c, l] = d(!1), [f, h] = d(0), [g, _] = d(.7), [v, y] = d(!1), [b, x] = d(0), [S, C] = d(0), w =
|
|
5286
|
+
var gi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i = {}, ...a }) => {
|
|
5287
|
+
let s = u(null), [c, l] = d(!1), [f, h] = d(0), [g, _] = d(.7), [v, y] = d(!1), [b, x] = d(0), [S, C] = d(0), w = pi(S), T = pi(b), E = () => {
|
|
5146
5288
|
let e = s.current;
|
|
5147
5289
|
e && (e.paused ? e.play() : e.pause());
|
|
5148
5290
|
}, D = () => {
|
|
@@ -5150,14 +5292,14 @@ var fi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5150
5292
|
e && (x(e.duration || 0), C(e.currentTime), h(e.duration ? e.currentTime / e.duration * 100 : 0), l(!e.paused));
|
|
5151
5293
|
}, O = (e) => {
|
|
5152
5294
|
let t = s.current;
|
|
5153
|
-
t && (t.currentTime =
|
|
5295
|
+
t && (t.currentTime = mi(e, b));
|
|
5154
5296
|
}, k = () => {
|
|
5155
5297
|
y((e) => {
|
|
5156
5298
|
let t = !e;
|
|
5157
5299
|
return s.current && (s.current.muted = t), t;
|
|
5158
5300
|
});
|
|
5159
5301
|
}, A = () => {
|
|
5160
|
-
|
|
5302
|
+
hi(s.current?.parentElement);
|
|
5161
5303
|
};
|
|
5162
5304
|
return o(() => {
|
|
5163
5305
|
s.current && (s.current.volume = g);
|
|
@@ -5234,10 +5376,10 @@ var fi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5234
5376
|
})]
|
|
5235
5377
|
});
|
|
5236
5378
|
};
|
|
5237
|
-
|
|
5379
|
+
gi.displayName = "VideoPlayer";
|
|
5238
5380
|
//#endregion
|
|
5239
5381
|
//#region ../core/src/components/Watermark/utils.js
|
|
5240
|
-
var
|
|
5382
|
+
var _i = {
|
|
5241
5383
|
content: "",
|
|
5242
5384
|
cross: !1,
|
|
5243
5385
|
debug: !1,
|
|
@@ -5265,14 +5407,14 @@ var pi = {
|
|
|
5265
5407
|
yOffset: 0,
|
|
5266
5408
|
zIndex: 10
|
|
5267
5409
|
};
|
|
5268
|
-
function
|
|
5410
|
+
function vi(e) {
|
|
5269
5411
|
if (typeof e == "string" && e.startsWith("var(")) {
|
|
5270
5412
|
let t = e.match(/--[^, )]+/);
|
|
5271
5413
|
if (t) return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim() || e;
|
|
5272
5414
|
}
|
|
5273
5415
|
return e;
|
|
5274
5416
|
}
|
|
5275
|
-
function
|
|
5417
|
+
function yi(e) {
|
|
5276
5418
|
let t = document.createElement("canvas"), n = t.getContext("2d"), r = e.width, i = e.height;
|
|
5277
5419
|
if (!e.image && e.content) {
|
|
5278
5420
|
n.font = `${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;
|
|
@@ -5288,14 +5430,14 @@ function hi(e) {
|
|
|
5288
5430
|
}, i.src = e.image;
|
|
5289
5431
|
});
|
|
5290
5432
|
let a = (e.content || "").split(/\n/);
|
|
5291
|
-
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ?
|
|
5433
|
+
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ? vi(e.fontColor) : e.fontColor, n.font = `${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`, n.translate(r / 2, i / 2), n.rotate(e.rotate * Math.PI / 180);
|
|
5292
5434
|
let o = -(a.length - 1) * e.lineHeight / 2;
|
|
5293
5435
|
return a.forEach((t, r) => {
|
|
5294
5436
|
let i = o + r * e.lineHeight;
|
|
5295
5437
|
n.fillText(t, 0, i);
|
|
5296
5438
|
}), Promise.resolve(t.toDataURL());
|
|
5297
5439
|
}
|
|
5298
|
-
function
|
|
5440
|
+
function bi(e, t) {
|
|
5299
5441
|
let n = {
|
|
5300
5442
|
position: e.fullscreen ? "fixed" : "absolute",
|
|
5301
5443
|
top: 0,
|
|
@@ -5314,15 +5456,15 @@ function gi(e, t) {
|
|
|
5314
5456
|
}
|
|
5315
5457
|
//#endregion
|
|
5316
5458
|
//#region src/components/Watermark/Watermark.jsx
|
|
5317
|
-
var
|
|
5459
|
+
var xi = (e) => {
|
|
5318
5460
|
let t = {
|
|
5319
|
-
...
|
|
5461
|
+
..._i,
|
|
5320
5462
|
...e
|
|
5321
5463
|
}, [n, r] = d(""), i = !!t.content || !!t.image;
|
|
5322
5464
|
o(() => {
|
|
5323
5465
|
if (!i) return;
|
|
5324
5466
|
let e = !0;
|
|
5325
|
-
return
|
|
5467
|
+
return yi(t).then((t) => {
|
|
5326
5468
|
e && r(t);
|
|
5327
5469
|
}), () => {
|
|
5328
5470
|
e = !1;
|
|
@@ -5331,7 +5473,7 @@ var _i = (e) => {
|
|
|
5331
5473
|
let { children: e, ...n } = t;
|
|
5332
5474
|
return JSON.stringify(n);
|
|
5333
5475
|
}, [t]), i]);
|
|
5334
|
-
let a = l(() => i ?
|
|
5476
|
+
let a = l(() => i ? bi(t, n) : {}, [
|
|
5335
5477
|
n,
|
|
5336
5478
|
i,
|
|
5337
5479
|
t
|
|
@@ -5341,63 +5483,122 @@ var _i = (e) => {
|
|
|
5341
5483
|
style: a
|
|
5342
5484
|
}), t.children] }) : t.children || null;
|
|
5343
5485
|
};
|
|
5344
|
-
|
|
5486
|
+
xi.displayName = "Watermark";
|
|
5345
5487
|
//#endregion
|
|
5346
5488
|
//#region src/ThemeReact.tsx
|
|
5347
|
-
var
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5489
|
+
var Si = n(void 0), Ci = typeof window > "u" ? o : c;
|
|
5490
|
+
async function wi(e, t, n, r) {
|
|
5491
|
+
if (typeof fetch > "u") return {
|
|
5492
|
+
ok: !1,
|
|
5493
|
+
url: e,
|
|
5494
|
+
errors: [{
|
|
5495
|
+
path: "$",
|
|
5496
|
+
message: "Theme config URL or fetch is unavailable."
|
|
5497
|
+
}],
|
|
5498
|
+
warnings: []
|
|
5499
|
+
};
|
|
5500
|
+
try {
|
|
5501
|
+
let i = await fetch(e, {
|
|
5502
|
+
cache: "no-store",
|
|
5503
|
+
signal: r
|
|
5504
|
+
});
|
|
5505
|
+
if (!n()) return null;
|
|
5506
|
+
if (!i.ok) return {
|
|
5507
|
+
ok: !1,
|
|
5508
|
+
url: e,
|
|
5509
|
+
errors: [{
|
|
5510
|
+
path: "$",
|
|
5511
|
+
message: `Theme request failed with ${i.status}.`
|
|
5512
|
+
}],
|
|
5513
|
+
warnings: []
|
|
5514
|
+
};
|
|
5515
|
+
let a = await i.json();
|
|
5516
|
+
return n() ? {
|
|
5517
|
+
...x(a, { target: t }),
|
|
5518
|
+
url: e
|
|
5519
|
+
} : null;
|
|
5520
|
+
} catch (t) {
|
|
5521
|
+
return n() ? {
|
|
5522
|
+
ok: !1,
|
|
5523
|
+
url: e,
|
|
5524
|
+
errors: [{
|
|
5525
|
+
path: "$",
|
|
5526
|
+
message: t instanceof Error ? t.message : "Theme request failed."
|
|
5527
|
+
}],
|
|
5528
|
+
warnings: []
|
|
5529
|
+
} : null;
|
|
5530
|
+
}
|
|
5531
|
+
}
|
|
5532
|
+
var Ti = ({ children: e, config: t, defaultMode: n = "system", themeUrl: r, target: a, mode: s, initialResolvedMode: c, storageKey: f, storage: m, onModeChange: h, onResolvedModeChange: g, onThemeLoad: _, onThemeError: v }) => {
|
|
5533
|
+
let y = u(null);
|
|
5534
|
+
y.current ||= w({
|
|
5535
|
+
target: a,
|
|
5536
|
+
initialMode: s ?? n,
|
|
5537
|
+
initialResolvedMode: c,
|
|
5538
|
+
storageKey: f,
|
|
5539
|
+
storage: m,
|
|
5540
|
+
readStorage: s === void 0
|
|
5354
5541
|
});
|
|
5355
|
-
let
|
|
5356
|
-
mode:
|
|
5357
|
-
resolvedMode:
|
|
5358
|
-
dark:
|
|
5359
|
-
}),
|
|
5360
|
-
_.current =
|
|
5361
|
-
let e =
|
|
5362
|
-
|
|
5542
|
+
let b = y.current, [S, C] = d({
|
|
5543
|
+
mode: b.mode,
|
|
5544
|
+
resolvedMode: b.resolvedMode,
|
|
5545
|
+
dark: b.dark
|
|
5546
|
+
}), T = u(S.resolvedMode), E = u(a), D = u(0), k = u(g), A = u(_), j = u(v);
|
|
5547
|
+
k.current = g, A.current = _, j.current = v, Ci(() => {
|
|
5548
|
+
let e = b.subscribe((e) => {
|
|
5549
|
+
C(e), T.current !== e.resolvedMode && (T.current = e.resolvedMode, k.current?.(e.resolvedMode));
|
|
5363
5550
|
});
|
|
5364
|
-
return
|
|
5365
|
-
e(),
|
|
5551
|
+
return b.start(), () => {
|
|
5552
|
+
e(), b.destroy();
|
|
5553
|
+
};
|
|
5554
|
+
}, [b]), Ci(() => {
|
|
5555
|
+
s !== void 0 && b.setMode(s);
|
|
5556
|
+
}, [b, s]), o(() => {
|
|
5557
|
+
let e = ++D.current, n = E.current, i = typeof AbortController > "u" ? null : new AbortController();
|
|
5558
|
+
if (t !== void 0) {
|
|
5559
|
+
let e = x(t, { target: n });
|
|
5560
|
+
e.ok ? A.current?.(e) : j.current?.(e);
|
|
5561
|
+
} else r || O(n);
|
|
5562
|
+
return r && wi(r, n, () => e === D.current, i?.signal).then((e) => {
|
|
5563
|
+
e && (e.ok ? A.current?.(e) : i?.signal.aborted || j.current?.(e));
|
|
5564
|
+
}), () => {
|
|
5565
|
+
i?.abort();
|
|
5366
5566
|
};
|
|
5367
|
-
}, [
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5567
|
+
}, [t, r]), o(() => {
|
|
5568
|
+
let e = E.current;
|
|
5569
|
+
return () => O(e);
|
|
5570
|
+
}, []);
|
|
5571
|
+
let M = i((e) => {
|
|
5572
|
+
s === void 0 && b.setMode(e), h?.(e);
|
|
5372
5573
|
}, [
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
]),
|
|
5377
|
-
let e =
|
|
5378
|
-
|
|
5574
|
+
b,
|
|
5575
|
+
s,
|
|
5576
|
+
h
|
|
5577
|
+
]), N = i(() => {
|
|
5578
|
+
let e = b.resolvedMode === "dark" ? "light" : "dark";
|
|
5579
|
+
s === void 0 && b.setMode(e), h?.(e);
|
|
5379
5580
|
}, [
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
]),
|
|
5384
|
-
...
|
|
5385
|
-
setMode:
|
|
5386
|
-
toggleMode:
|
|
5581
|
+
b,
|
|
5582
|
+
s,
|
|
5583
|
+
h
|
|
5584
|
+
]), P = l(() => ({
|
|
5585
|
+
...S,
|
|
5586
|
+
setMode: M,
|
|
5587
|
+
toggleMode: N
|
|
5387
5588
|
}), [
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5589
|
+
S,
|
|
5590
|
+
M,
|
|
5591
|
+
N
|
|
5391
5592
|
]);
|
|
5392
|
-
return /* @__PURE__ */ p(
|
|
5393
|
-
value:
|
|
5593
|
+
return /* @__PURE__ */ p(Si.Provider, {
|
|
5594
|
+
value: P,
|
|
5394
5595
|
children: e
|
|
5395
5596
|
});
|
|
5396
5597
|
};
|
|
5397
|
-
function
|
|
5398
|
-
let e = a(
|
|
5598
|
+
function Ei() {
|
|
5599
|
+
let e = a(Si);
|
|
5399
5600
|
if (!e) throw Error("useTheme must be used within ThemeProvider");
|
|
5400
5601
|
return e;
|
|
5401
5602
|
}
|
|
5402
5603
|
//#endregion
|
|
5403
|
-
export {
|
|
5604
|
+
export { te as Accordion, ie as Alert, G as AppBar, Y as Autocomplete, de as Avatar, X as Badge, xe as Banner, Te as Blockquote, Ne as Box, Be as Breadcrumb, Ke as Button, we as Card, qe as CardActions, Je as CardContent, Ze as Checkbox, nt as Chip, lt as CircularProgress, pt as ColorPicker, gt as Container, wt as Copy, jt as DatePicker, Mt as Fab, Ut as Feature, Pt as Feed, Gt as FileInput, qt as FormControl, Jt as FormControlLabel, Yt as FormGroup, Xt as FormHelperText, cn as Grid, ln as HoverCard, Tn as Icon, En as IconButton, Dn as ImageGallery, Fn as Inline, In as Input, Hn as List, Un as ListItem, Wn as ListItemIcon, Gn as ListItemText, er as Menu, ir as Modal, ar as NumberAnimation, sr as Page, or as Pagination, pr as Paper, mr as Popover, hr as PricingTable, gr as Progress, yr as Radio, vr as RadioGroup, br as Rating, xr as Select, Cr as Skeleton, Tr as SlideOver, wr as Slider, kr as Snackbar, Er as Split, Dr as Stack, Rr as Status, zr as Switch, g as THEME_CONFIG_VERSION, _ as THEME_MODES, v as THEME_STORAGE_KEY, Kr as Table, Ur as TableBody, Gr as TableCell, Hr as TableHead, Wr as TableRow, qr as Tabs, Jr as TextField, Ti as ThemeProvider, Xr as Toolbar, ti as Tooltip, di as TypingText, li as Typography, fi as VerificationCodeInput, gi as VideoPlayer, xi as Watermark, b as applyThemeConfig, C as createThemeController, T as createThemeInitScript, E as loadThemeConfig, D as resetThemeConfig, k as resolveThemeMode, A as serializeThemeConfig, Ei as useTheme, j as validateThemeConfig };
|