@zeturn/watercolor-react 1.2.1 → 1.2.2
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/watercolor-react.css +1 -1
- package/dist/watercolor-react.es.js +629 -570
- 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
3
|
import h, { createPortal as g } from "react-dom";
|
|
4
|
-
import { THEME_CONFIG_VERSION as _, THEME_MODES as v, THEME_STORAGE_KEY as y, applyThemeConfig as b,
|
|
4
|
+
import { THEME_CONFIG_VERSION as _, THEME_MODES as v, THEME_STORAGE_KEY as y, applyThemeConfig as b, applyThemeConfig as x, createThemeController as S, createThemeController as C, createThemeInitScript as w, loadThemeConfig as T, resetThemeConfig as E, resetThemeConfig as D, resolveThemeMode as O, serializeThemeConfig as k, validateThemeConfig as A } 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 j = Object.create, M = Object.defineProperty, N = Object.getOwnPropertyDescriptor, P = Object.getOwnPropertyNames, F = Object.getPrototypeOf, I = Object.prototype.hasOwnProperty, L = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), R = (e, t, n, r) => {
|
|
7
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = P(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !I.call(e, s) && s !== n && M(e, s, {
|
|
8
8
|
get: ((e) => t[e]).bind(null, s),
|
|
9
|
-
enumerable: !(r =
|
|
9
|
+
enumerable: !(r = N(t, s)) || r.enumerable
|
|
10
10
|
});
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
12
|
+
}, z = (e, t, n) => (n = e == null ? {} : j(F(e)), R(t || !e || !e.__esModule ? M(n, "default", {
|
|
13
13
|
value: e,
|
|
14
14
|
enumerable: !0
|
|
15
|
-
}) : n, e)),
|
|
15
|
+
}) : n, e)), B = [
|
|
16
16
|
"default",
|
|
17
17
|
"bordered",
|
|
18
18
|
"filled"
|
|
19
19
|
];
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function V(e = "default") {
|
|
21
|
+
return B.includes(e) ? e : "default";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function H(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 U(e = "default", t = "") {
|
|
27
|
+
let n = V(e), r = H(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 W(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 G = ({ 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 = U(n, i), g = (n) => {
|
|
41
41
|
if (e[n]?.disabled) return;
|
|
42
|
-
let i =
|
|
42
|
+
let i = W(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
|
+
G.displayName = "Accordion";
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region ../core/src/components/Alert/utils.jsx
|
|
90
|
-
function
|
|
90
|
+
function ee(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 te = ({ 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 K({ 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: [...ee(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(te, { type: e })
|
|
129
129
|
}),
|
|
130
130
|
/* @__PURE__ */ m("div", {
|
|
131
131
|
className: "wc-alert-content",
|
|
@@ -157,15 +157,15 @@ 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 q = ({ 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
|
-
let [R, z] = d(!1), [B, V] = d(""), [H, U] = d(-1), W = u(null),
|
|
165
|
+
}), J = ({ 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 }) => {
|
|
166
|
+
let [R, z] = d(!1), [B, V] = d(""), [H, U] = d(-1), W = u(null), G = u(null), ee = (e) => e ? typeof e == "object" ? e.label || e.value || "" : String(e) : "", te = (e) => e ? typeof e == "object" ? e.value === void 0 ? e : e.value : e : null, K = F || ee, q = I || te;
|
|
167
167
|
o(() => {
|
|
168
|
-
!_ && e ? V(
|
|
168
|
+
!_ && e ? V(K(e)) : e || V("");
|
|
169
169
|
}, [e, _]), o(() => {
|
|
170
170
|
let e = (e) => {
|
|
171
171
|
W.current && !W.current.contains(e.target) && z(!1);
|
|
@@ -174,10 +174,10 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
174
174
|
document.removeEventListener("mousedown", e);
|
|
175
175
|
};
|
|
176
176
|
}, []);
|
|
177
|
-
let
|
|
178
|
-
let n =
|
|
179
|
-
return _ && Array.isArray(e) ? e.some((e) =>
|
|
180
|
-
},
|
|
177
|
+
let J = M ? M(n, B) : ((e, t) => !t || t.length < C ? e : e.filter((e) => K(e).toLowerCase().includes(t.toLowerCase())))(n, B), Y = (t) => {
|
|
178
|
+
let n = q(t);
|
|
179
|
+
return _ && Array.isArray(e) ? e.some((e) => q(e) === n) : q(e) === n;
|
|
180
|
+
}, ne = () => {
|
|
181
181
|
let e = ["wc-autocomplete"];
|
|
182
182
|
return b && e.push("wc-autocomplete--full-width"), e.concat(D).filter(Boolean).join(" ");
|
|
183
183
|
}, re = () => {
|
|
@@ -188,7 +188,7 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
188
188
|
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
189
|
}, ae = (e, t) => {
|
|
190
190
|
let n = ["wc-autocomplete__option"];
|
|
191
|
-
return
|
|
191
|
+
return Y(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
192
|
}, oe = (e) => {
|
|
193
193
|
z(!0), k?.(e);
|
|
194
194
|
}, se = (e) => {
|
|
@@ -208,11 +208,11 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
208
208
|
} });
|
|
209
209
|
}, ue = (n) => {
|
|
210
210
|
if (n.disabled) return;
|
|
211
|
-
let r =
|
|
211
|
+
let r = q(n), i;
|
|
212
212
|
if (_) {
|
|
213
|
-
let t = Array.isArray(e) ? [...e] : [], a = t.findIndex((e) =>
|
|
213
|
+
let t = Array.isArray(e) ? [...e] : [], a = t.findIndex((e) => q(e) === r);
|
|
214
214
|
a > -1 ? t.splice(a, 1) : t.push(n), i = t, V("");
|
|
215
|
-
} else i = n, V(
|
|
215
|
+
} else i = n, V(K(n)), z(!1);
|
|
216
216
|
U(-1), t?.({ target: {
|
|
217
217
|
name: T,
|
|
218
218
|
value: i
|
|
@@ -222,24 +222,24 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
222
222
|
z(!0), e.preventDefault();
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
|
-
if (!(!R ||
|
|
225
|
+
if (!(!R || J.length === 0)) switch (e.key) {
|
|
226
226
|
case "ArrowDown":
|
|
227
|
-
e.preventDefault(), U((e) => Math.min(e + 1,
|
|
227
|
+
e.preventDefault(), U((e) => Math.min(e + 1, J.length - 1));
|
|
228
228
|
break;
|
|
229
229
|
case "ArrowUp":
|
|
230
230
|
e.preventDefault(), U((e) => Math.max(e - 1, 0));
|
|
231
231
|
break;
|
|
232
232
|
case "Enter":
|
|
233
|
-
e.preventDefault(), H >= 0 && H <
|
|
233
|
+
e.preventDefault(), H >= 0 && H < J.length && ue(J[H]);
|
|
234
234
|
break;
|
|
235
235
|
case "Escape":
|
|
236
|
-
z(!1), U(-1),
|
|
236
|
+
z(!1), U(-1), G.current?.blur();
|
|
237
237
|
break;
|
|
238
238
|
default: break;
|
|
239
239
|
}
|
|
240
240
|
}, fe = s(), X = E || T || fe;
|
|
241
241
|
return /* @__PURE__ */ m("div", {
|
|
242
|
-
className:
|
|
242
|
+
className: ne(),
|
|
243
243
|
ref: W,
|
|
244
244
|
style: O,
|
|
245
245
|
children: [
|
|
@@ -263,7 +263,7 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
263
263
|
placeholder: r,
|
|
264
264
|
disabled: h,
|
|
265
265
|
readonly: g,
|
|
266
|
-
ref:
|
|
266
|
+
ref: G,
|
|
267
267
|
role: "combobox",
|
|
268
268
|
"aria-autocomplete": "list",
|
|
269
269
|
"aria-expanded": R,
|
|
@@ -271,7 +271,7 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
271
271
|
"aria-activedescendant": H >= 0 ? `${X}-option-${H}` : void 0
|
|
272
272
|
}) : /* @__PURE__ */ p("input", {
|
|
273
273
|
id: X,
|
|
274
|
-
ref:
|
|
274
|
+
ref: G,
|
|
275
275
|
type: "text",
|
|
276
276
|
className: "wc-autocomplete__input",
|
|
277
277
|
placeholder: r,
|
|
@@ -321,7 +321,7 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
321
321
|
]
|
|
322
322
|
})
|
|
323
323
|
}), /* @__PURE__ */ p("div", {
|
|
324
|
-
className: `wc-autocomplete__arrow${R &&
|
|
324
|
+
className: `wc-autocomplete__arrow${R && J.length > 0 ? " wc-autocomplete__arrow--open" : ""}`,
|
|
325
325
|
children: /* @__PURE__ */ p("svg", {
|
|
326
326
|
viewBox: "0 0 24 24",
|
|
327
327
|
fill: "none",
|
|
@@ -336,22 +336,22 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
336
336
|
className: "wc-autocomplete__dropdown",
|
|
337
337
|
id: `${X}-options`,
|
|
338
338
|
role: "listbox",
|
|
339
|
-
children:
|
|
339
|
+
children: J.length === 0 ? /* @__PURE__ */ p("div", {
|
|
340
340
|
className: "wc-autocomplete__no-options",
|
|
341
341
|
children: w
|
|
342
342
|
}) : /* @__PURE__ */ p("div", {
|
|
343
343
|
className: "wc-autocomplete__options",
|
|
344
|
-
children:
|
|
344
|
+
children: J.map((e, t) => /* @__PURE__ */ m("div", {
|
|
345
345
|
id: `${X}-option-${t}`,
|
|
346
346
|
className: ae(e, t),
|
|
347
347
|
role: "option",
|
|
348
|
-
"aria-selected":
|
|
348
|
+
"aria-selected": Y(e),
|
|
349
349
|
onClick: () => ue(e),
|
|
350
350
|
onMouseEnter: () => U(t),
|
|
351
|
-
children: [N ? N(e, { selected:
|
|
351
|
+
children: [N ? N(e, { selected: Y(e) }) : /* @__PURE__ */ p("span", {
|
|
352
352
|
className: "wc-autocomplete__option-text",
|
|
353
|
-
children:
|
|
354
|
-
}),
|
|
353
|
+
children: K(e)
|
|
354
|
+
}), Y(e) && /* @__PURE__ */ p("svg", {
|
|
355
355
|
className: "wc-autocomplete__option-check",
|
|
356
356
|
viewBox: "0 0 24 24",
|
|
357
357
|
fill: "none",
|
|
@@ -359,7 +359,7 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
359
359
|
strokeWidth: "2",
|
|
360
360
|
children: /* @__PURE__ */ p("polyline", { points: "20,6 9,17 4,12" })
|
|
361
361
|
})]
|
|
362
|
-
},
|
|
362
|
+
}, q(e) || t))
|
|
363
363
|
})
|
|
364
364
|
}),
|
|
365
365
|
(c || a) && /* @__PURE__ */ p("div", { children: c ? /* @__PURE__ */ p("p", {
|
|
@@ -372,40 +372,40 @@ var ne = ({ children: e, position: t = "fixed", color: n = "default", elevation:
|
|
|
372
372
|
]
|
|
373
373
|
});
|
|
374
374
|
};
|
|
375
|
-
|
|
375
|
+
J.displayName = "Autocomplete";
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region ../core/src/components/Avatar/utils.jsx
|
|
378
|
-
function
|
|
378
|
+
function Y({ size: e, variant: t, color: n, src: r, imgError: i }) {
|
|
379
379
|
let a = ["wc-avatar"];
|
|
380
380
|
return typeof e == "string" && a.push(`wc-avatar--${e}`), a.push(`wc-avatar--${t}`), (!r || i) && a.push(`wc-avatar--${n}`), a;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function ne(e) {
|
|
383
383
|
let t = {};
|
|
384
384
|
return typeof e == "number" && (t.width = `${e}px`, t.height = `${e}px`, t.fontSize = `${e * .4}px`), t;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function re(e) {
|
|
387
387
|
if (!e) return "";
|
|
388
388
|
let t = e.trim(), n = t.charAt(0);
|
|
389
389
|
if (/[\u4e00-\u9fa5]/.test(n)) return n;
|
|
390
390
|
let r = t.split(/\s+/).filter(Boolean);
|
|
391
391
|
return r.length === 1 ? r[0].charAt(0).toUpperCase() : (r[0].charAt(0) + r[1].charAt(0)).toUpperCase();
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function ie(e) {
|
|
394
394
|
e(!0);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function ae(e) {
|
|
397
397
|
e(!1);
|
|
398
398
|
}
|
|
399
399
|
//#endregion
|
|
400
400
|
//#region src/components/Avatar/Avatar.jsx
|
|
401
|
-
var
|
|
402
|
-
let [c, l] = d(!1), u =
|
|
401
|
+
var oe = ({ src: e = "", alt: t = "", size: n = "md", variant: r = "circular", color: i = "default", children: a = "", className: o = "", ...s }) => {
|
|
402
|
+
let [c, l] = d(!1), u = Y({
|
|
403
403
|
size: n,
|
|
404
404
|
variant: r,
|
|
405
405
|
color: i,
|
|
406
406
|
src: e,
|
|
407
407
|
imgError: c
|
|
408
|
-
}).concat(o).filter(Boolean).join(" "), f =
|
|
408
|
+
}).concat(o).filter(Boolean).join(" "), f = ne(n), m = re(a), h = () => ie(l), g = () => ae(l);
|
|
409
409
|
return /* @__PURE__ */ p("div", {
|
|
410
410
|
className: u,
|
|
411
411
|
style: f,
|
|
@@ -422,10 +422,10 @@ var ie = ({ src: e = "", alt: t = "", size: n = "md", variant: r = "circular", c
|
|
|
422
422
|
}) : null
|
|
423
423
|
});
|
|
424
424
|
};
|
|
425
|
-
|
|
425
|
+
oe.displayName = "Avatar";
|
|
426
426
|
//#endregion
|
|
427
427
|
//#region ../core/src/components/Badge/utils.js
|
|
428
|
-
var
|
|
428
|
+
var se = [
|
|
429
429
|
"primary",
|
|
430
430
|
"secondary",
|
|
431
431
|
"success",
|
|
@@ -436,20 +436,20 @@ var ae = [
|
|
|
436
436
|
"cyan",
|
|
437
437
|
"pink"
|
|
438
438
|
];
|
|
439
|
-
function
|
|
440
|
-
return
|
|
439
|
+
function ce(e) {
|
|
440
|
+
return se.includes(e);
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
return
|
|
442
|
+
function le(e) {
|
|
443
|
+
return ce(e) ? e : "primary";
|
|
444
444
|
}
|
|
445
|
-
function
|
|
446
|
-
let i = ["wc-badge", `wc-badge--${
|
|
445
|
+
function ue({ variant: e, size: t, dot: n, className: r }) {
|
|
446
|
+
let i = ["wc-badge", `wc-badge--${le(e)}`];
|
|
447
447
|
return n ? i.push(`wc-badge--dot-${t}`) : i.push(`wc-badge--${t}`), r && i.push(r), i.filter(Boolean).join(" ");
|
|
448
448
|
}
|
|
449
449
|
//#endregion
|
|
450
450
|
//#region src/components/Badge/Badge.jsx
|
|
451
|
-
var
|
|
452
|
-
className:
|
|
451
|
+
var de = ({ children: e, variant: t = "primary", size: n = "md", dot: r = !1, className: i = "", ...a }) => /* @__PURE__ */ p("span", {
|
|
452
|
+
className: ue({
|
|
453
453
|
variant: t,
|
|
454
454
|
size: n,
|
|
455
455
|
dot: r,
|
|
@@ -458,10 +458,10 @@ var le = ({ children: e, variant: t = "primary", size: n = "md", dot: r = !1, cl
|
|
|
458
458
|
...a,
|
|
459
459
|
children: !r && e
|
|
460
460
|
});
|
|
461
|
-
|
|
461
|
+
de.displayName = "Badge";
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region ../core/src/components/Banner/utils.js
|
|
464
|
-
function
|
|
464
|
+
function fe(e, t, n) {
|
|
465
465
|
let r = [
|
|
466
466
|
"wc-banner",
|
|
467
467
|
`wc-banner--${e}`,
|
|
@@ -469,18 +469,18 @@ function ue(e, t, n) {
|
|
|
469
469
|
];
|
|
470
470
|
return n && r.push("wc-banner--sticky"), r.join(" ");
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function X(e) {
|
|
473
473
|
return { zIndex: e };
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function pe(e, t) {
|
|
476
476
|
e(!1), t && t();
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function me(e) {
|
|
479
479
|
e && e();
|
|
480
480
|
}
|
|
481
481
|
//#endregion
|
|
482
482
|
//#region src/components/Banner/Banner.jsx
|
|
483
|
-
var
|
|
483
|
+
var he = ({ type: e }) => {
|
|
484
484
|
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
485
|
return /* @__PURE__ */ m("svg", {
|
|
486
486
|
viewBox: "0 0 20 20",
|
|
@@ -497,13 +497,13 @@ var pe = ({ type: e }) => {
|
|
|
497
497
|
}), t]
|
|
498
498
|
});
|
|
499
499
|
};
|
|
500
|
-
function
|
|
500
|
+
function ge({ 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
501
|
let [_, v] = d(!0);
|
|
502
502
|
if (!_) return null;
|
|
503
|
-
let y =
|
|
504
|
-
|
|
503
|
+
let y = fe(t, n, l), b = X(u), x = () => {
|
|
504
|
+
pe(v, f);
|
|
505
505
|
}, S = () => {
|
|
506
|
-
|
|
506
|
+
me(h);
|
|
507
507
|
}, C = g && e.Children.count(g) > 0;
|
|
508
508
|
return /* @__PURE__ */ p("div", {
|
|
509
509
|
className: y,
|
|
@@ -515,7 +515,7 @@ function me({ type: t = "info", position: n = "top", title: r = "", message: i =
|
|
|
515
515
|
children: [
|
|
516
516
|
o && /* @__PURE__ */ p("div", {
|
|
517
517
|
className: "wc-banner-icon",
|
|
518
|
-
children: /* @__PURE__ */ p(
|
|
518
|
+
children: /* @__PURE__ */ p(he, { type: t })
|
|
519
519
|
}),
|
|
520
520
|
/* @__PURE__ */ m("div", {
|
|
521
521
|
className: "wc-banner-text",
|
|
@@ -555,22 +555,22 @@ function me({ type: t = "info", position: n = "top", title: r = "", message: i =
|
|
|
555
555
|
}
|
|
556
556
|
//#endregion
|
|
557
557
|
//#region ../core/src/components/Blockquote/utils.js
|
|
558
|
-
function
|
|
558
|
+
function _e(e = "", t = "default", n = !0, r = !0, i = "medium", a = "default") {
|
|
559
559
|
let o = ["wc-blockquote"];
|
|
560
560
|
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
561
|
}
|
|
562
562
|
//#endregion
|
|
563
563
|
//#region ../core/src/components/Card/utils.jsx
|
|
564
|
-
function
|
|
564
|
+
function ve(e = "", t = "minimal", n = "default", r = "medium", i = !1, a = !0) {
|
|
565
565
|
let o = ["wc-card"];
|
|
566
566
|
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
567
|
}
|
|
568
568
|
//#endregion
|
|
569
569
|
//#region src/components/Card/Card.jsx
|
|
570
|
-
var
|
|
570
|
+
var ye = ({ 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
571
|
let v = a || !!d;
|
|
572
572
|
return /* @__PURE__ */ m("div", {
|
|
573
|
-
className:
|
|
573
|
+
className: ve(s, n, r, i, v, o),
|
|
574
574
|
style: u,
|
|
575
575
|
onClick: (e) => {
|
|
576
576
|
v && d && d(e);
|
|
@@ -606,11 +606,11 @@ var _e = ({ children: e, title: t = "", variant: n = "minimal", color: r = "defa
|
|
|
606
606
|
]
|
|
607
607
|
});
|
|
608
608
|
};
|
|
609
|
-
|
|
609
|
+
ye.displayName = "Card";
|
|
610
610
|
//#endregion
|
|
611
611
|
//#region src/components/Blockquote/Blockquote.jsx
|
|
612
|
-
function
|
|
613
|
-
return r === "card" ? /* @__PURE__ */ m(
|
|
612
|
+
function be({ cite: e = "", children: t, className: n = "", variant: r = "default", noBorder: i = !0, interactive: a = !0, size: o = "medium", color: s = "default", ...c }) {
|
|
613
|
+
return r === "card" ? /* @__PURE__ */ m(ye, {
|
|
614
614
|
variant: "filled",
|
|
615
615
|
color: s,
|
|
616
616
|
size: o,
|
|
@@ -626,7 +626,7 @@ function ve({ cite: e = "", children: t, className: n = "", variant: r = "defaul
|
|
|
626
626
|
children: ["— ", e]
|
|
627
627
|
})]
|
|
628
628
|
}) : /* @__PURE__ */ m("blockquote", {
|
|
629
|
-
className:
|
|
629
|
+
className: _e(n, r, i, a, o, s),
|
|
630
630
|
...c,
|
|
631
631
|
children: [/* @__PURE__ */ p("p", {
|
|
632
632
|
className: "quote-text",
|
|
@@ -653,32 +653,32 @@ var Z = {
|
|
|
653
653
|
16: "4rem",
|
|
654
654
|
20: "5rem",
|
|
655
655
|
24: "6rem"
|
|
656
|
-
},
|
|
656
|
+
}, xe = {
|
|
657
657
|
flex: "flex",
|
|
658
658
|
block: "block",
|
|
659
659
|
inline: "inline",
|
|
660
660
|
"inline-block": "inline-block",
|
|
661
661
|
none: "hidden",
|
|
662
662
|
grid: "grid"
|
|
663
|
-
},
|
|
663
|
+
}, Se = {
|
|
664
664
|
row: "flex-row",
|
|
665
665
|
column: "flex-col",
|
|
666
666
|
"row-reverse": "flex-row-reverse",
|
|
667
667
|
"column-reverse": "flex-col-reverse"
|
|
668
|
-
},
|
|
668
|
+
}, Ce = {
|
|
669
669
|
"flex-start": "justify-start",
|
|
670
670
|
center: "justify-center",
|
|
671
671
|
"flex-end": "justify-end",
|
|
672
672
|
"space-between": "justify-between",
|
|
673
673
|
"space-around": "justify-around",
|
|
674
674
|
"space-evenly": "justify-evenly"
|
|
675
|
-
},
|
|
675
|
+
}, we = {
|
|
676
676
|
"flex-start": "items-start",
|
|
677
677
|
center: "items-center",
|
|
678
678
|
"flex-end": "items-end",
|
|
679
679
|
stretch: "items-stretch",
|
|
680
680
|
baseline: "items-baseline"
|
|
681
|
-
},
|
|
681
|
+
}, Te = {
|
|
682
682
|
wrap: "flex-wrap",
|
|
683
683
|
nowrap: "flex-nowrap",
|
|
684
684
|
"wrap-reverse": "flex-wrap-reverse"
|
|
@@ -686,9 +686,9 @@ var Z = {
|
|
|
686
686
|
function Q(e) {
|
|
687
687
|
return typeof e == "number" ? `${e}px` : e;
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function Ee(e) {
|
|
690
690
|
let t = ["wc-box"];
|
|
691
|
-
if (e.display &&
|
|
691
|
+
if (e.display && xe[e.display] && t.push(xe[e.display]), e.flexDirection && Se[e.flexDirection] && t.push(Se[e.flexDirection]), e.justifyContent && Ce[e.justifyContent] && t.push(Ce[e.justifyContent]), e.alignItems && we[e.alignItems] && t.push(we[e.alignItems]), e.flexWrap && Te[e.flexWrap] && t.push(Te[e.flexWrap]), e.gap !== void 0) {
|
|
692
692
|
let n = e.gap.toString();
|
|
693
693
|
[
|
|
694
694
|
"0",
|
|
@@ -708,7 +708,7 @@ function we(e) {
|
|
|
708
708
|
}
|
|
709
709
|
return t;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function De(e) {
|
|
712
712
|
let t = {};
|
|
713
713
|
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
714
|
let n = Z[e.px] || Q(e.px);
|
|
@@ -730,9 +730,9 @@ function Te(e) {
|
|
|
730
730
|
}
|
|
731
731
|
//#endregion
|
|
732
732
|
//#region src/components/Box/Box.jsx
|
|
733
|
-
function
|
|
733
|
+
function Oe({ 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
734
|
return /* @__PURE__ */ p(e, {
|
|
735
|
-
className:
|
|
735
|
+
className: Ee({
|
|
736
736
|
display: v,
|
|
737
737
|
flexDirection: y,
|
|
738
738
|
justifyContent: b,
|
|
@@ -741,7 +741,7 @@ function Ee({ component: e = "div", children: t, className: n = "", p: r, pt: i,
|
|
|
741
741
|
gap: C
|
|
742
742
|
}).concat(n).filter(Boolean).join(" "),
|
|
743
743
|
style: {
|
|
744
|
-
...
|
|
744
|
+
...De({
|
|
745
745
|
p: r,
|
|
746
746
|
pt: i,
|
|
747
747
|
pr: a,
|
|
@@ -781,7 +781,7 @@ function Ee({ component: e = "div", children: t, className: n = "", p: r, pt: i,
|
|
|
781
781
|
}
|
|
782
782
|
//#endregion
|
|
783
783
|
//#region ../core/src/components/Breadcrumb/utils.js
|
|
784
|
-
function
|
|
784
|
+
function ke(e, t, n, r) {
|
|
785
785
|
let i = [...e];
|
|
786
786
|
if (t && i.length && i[0].label !== "首页" && i.unshift({
|
|
787
787
|
label: "首页",
|
|
@@ -801,45 +801,45 @@ function De(e, t, n, r) {
|
|
|
801
801
|
}
|
|
802
802
|
return i;
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function Ae(e) {
|
|
805
805
|
return `wc-breadcrumb wc-breadcrumb--${e}`;
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function je(e, t) {
|
|
808
808
|
let n = ["wc-breadcrumb-item"];
|
|
809
809
|
return e === t - 1 && n.push("wc-breadcrumb-item--current"), n.join(" ");
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function Me(e) {
|
|
812
812
|
let t = ["wc-breadcrumb-link"];
|
|
813
813
|
return e && t.push("wc-breadcrumb-link--disabled"), t.join(" ");
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function Ne(e, t, n, r, i) {
|
|
816
816
|
return t.disabled || t.isEllipsis || n === r - 1 ? (e.preventDefault(), !1) : (i && i(e, t, n), !0);
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function Pe(e, t, n, r) {
|
|
819
819
|
return e !== t - 1 && !n && !r;
|
|
820
820
|
}
|
|
821
821
|
//#endregion
|
|
822
822
|
//#region src/components/Breadcrumb/Breadcrumb.jsx
|
|
823
|
-
function
|
|
824
|
-
let c = e.useMemo(() =>
|
|
823
|
+
function Fe({ items: t = [], separator: n = "/", variant: r = "default", showHome: i = !1, homeIcon: a = "🏠", maxItems: o = 0, onItemClick: s }) {
|
|
824
|
+
let c = e.useMemo(() => ke(t, i, a, o), [
|
|
825
825
|
t,
|
|
826
826
|
i,
|
|
827
827
|
a,
|
|
828
828
|
o
|
|
829
829
|
]), l = (e, t, n) => {
|
|
830
|
-
|
|
830
|
+
Ne(e, t, n, c.length, s);
|
|
831
831
|
};
|
|
832
832
|
return /* @__PURE__ */ p("nav", {
|
|
833
|
-
className:
|
|
833
|
+
className: Ae(r),
|
|
834
834
|
"aria-label": "面包屑导航",
|
|
835
835
|
role: "navigation",
|
|
836
836
|
children: /* @__PURE__ */ p("ol", {
|
|
837
837
|
className: "wc-breadcrumb-list",
|
|
838
838
|
children: c.map((e, t) => /* @__PURE__ */ m("li", {
|
|
839
|
-
className:
|
|
840
|
-
children: [
|
|
839
|
+
className: je(t, c.length),
|
|
840
|
+
children: [Pe(t, c.length, e.disabled, e.isEllipsis) ? e.href ? /* @__PURE__ */ m("a", {
|
|
841
841
|
href: e.href,
|
|
842
|
-
className:
|
|
842
|
+
className: Me(e.disabled),
|
|
843
843
|
onClick: (n) => l(n, e, t),
|
|
844
844
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
845
845
|
className: "wc-breadcrumb-icon",
|
|
@@ -848,13 +848,13 @@ function Ne({ items: t = [], separator: n = "/", variant: r = "default", showHom
|
|
|
848
848
|
}) : /* @__PURE__ */ m("button", {
|
|
849
849
|
type: "button",
|
|
850
850
|
onClick: (n) => l(n, e, t),
|
|
851
|
-
className:
|
|
851
|
+
className: Me(e.disabled),
|
|
852
852
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
853
853
|
className: "wc-breadcrumb-icon",
|
|
854
854
|
dangerouslySetInnerHTML: { __html: e.icon }
|
|
855
855
|
}), e.label]
|
|
856
856
|
}) : /* @__PURE__ */ m("span", {
|
|
857
|
-
className:
|
|
857
|
+
className: Me(!0),
|
|
858
858
|
"aria-current": "page",
|
|
859
859
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
860
860
|
className: "wc-breadcrumb-icon",
|
|
@@ -870,7 +870,7 @@ function Ne({ items: t = [], separator: n = "/", variant: r = "default", showHom
|
|
|
870
870
|
}
|
|
871
871
|
//#endregion
|
|
872
872
|
//#region ../core/src/components/Button/utils.jsx
|
|
873
|
-
var
|
|
873
|
+
var Ie = [
|
|
874
874
|
"primary",
|
|
875
875
|
"secondary",
|
|
876
876
|
"filled",
|
|
@@ -885,23 +885,23 @@ var Pe = [
|
|
|
885
885
|
"cyan",
|
|
886
886
|
"pink"
|
|
887
887
|
];
|
|
888
|
-
function
|
|
889
|
-
return
|
|
888
|
+
function Le(e) {
|
|
889
|
+
return Ie.includes(e);
|
|
890
890
|
}
|
|
891
|
-
function
|
|
892
|
-
return
|
|
891
|
+
function Re(e) {
|
|
892
|
+
return Le(e) ? e : "primary";
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function ze(e) {
|
|
895
895
|
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--${
|
|
896
|
+
return l.push(`wc-btn--style-${c}`), l.push(`wc-btn--${Re(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
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Be({ event: e, disabled: t, loading: n, href: r, target: i, onClick: a }) {
|
|
899
899
|
!t && !n && (r && window.open(r, i), a?.(e));
|
|
900
900
|
}
|
|
901
901
|
//#endregion
|
|
902
902
|
//#region src/components/Button/Button.jsx
|
|
903
|
-
var
|
|
904
|
-
let T =
|
|
903
|
+
var Ve = ({ 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 }) => {
|
|
904
|
+
let T = ze({
|
|
905
905
|
variant: t,
|
|
906
906
|
buttonStyle: n,
|
|
907
907
|
size: r,
|
|
@@ -911,7 +911,7 @@ var ze = ({ children: e, variant: t = "primary", buttonStyle: n = "default", siz
|
|
|
911
911
|
uppercase: h,
|
|
912
912
|
rounded: f
|
|
913
913
|
}).concat(S).filter(Boolean).join(" "), E = { ...C }, D = (e) => {
|
|
914
|
-
|
|
914
|
+
Be({
|
|
915
915
|
event: e,
|
|
916
916
|
disabled: i,
|
|
917
917
|
loading: a,
|
|
@@ -975,10 +975,10 @@ var ze = ({ children: e, variant: t = "primary", buttonStyle: n = "default", siz
|
|
|
975
975
|
]
|
|
976
976
|
});
|
|
977
977
|
};
|
|
978
|
-
|
|
978
|
+
Ve.displayName = "Button";
|
|
979
979
|
//#endregion
|
|
980
980
|
//#region src/components/Card/CardActions.jsx
|
|
981
|
-
var
|
|
981
|
+
var He = ({ children: e, disableSpacing: t = !1, disablePadding: n = !1, justifyContent: r = "flex-start", className: i = "", ...a }) => /* @__PURE__ */ p("div", {
|
|
982
982
|
className: [
|
|
983
983
|
"wc-card-actions",
|
|
984
984
|
"wc-flex",
|
|
@@ -997,10 +997,10 @@ var Be = ({ children: e, disableSpacing: t = !1, disablePadding: n = !1, justify
|
|
|
997
997
|
...a,
|
|
998
998
|
children: e
|
|
999
999
|
});
|
|
1000
|
-
|
|
1000
|
+
He.displayName = "CardActions";
|
|
1001
1001
|
//#endregion
|
|
1002
1002
|
//#region src/components/Card/CardContent.jsx
|
|
1003
|
-
var
|
|
1003
|
+
var Ue = ({ children: e, disablePadding: t = !1, padding: n = "normal", className: r = "", ...i }) => /* @__PURE__ */ p("div", {
|
|
1004
1004
|
className: [
|
|
1005
1005
|
"wc-card-content",
|
|
1006
1006
|
!t && {
|
|
@@ -1014,22 +1014,22 @@ var Ve = ({ children: e, disablePadding: t = !1, padding: n = "normal", classNam
|
|
|
1014
1014
|
...i,
|
|
1015
1015
|
children: e
|
|
1016
1016
|
});
|
|
1017
|
-
|
|
1017
|
+
Ue.displayName = "CardContent";
|
|
1018
1018
|
//#endregion
|
|
1019
1019
|
//#region src/components/Checkbox/Checkbox.jsx
|
|
1020
|
-
var
|
|
1020
|
+
var We = [
|
|
1021
1021
|
"primary",
|
|
1022
1022
|
"secondary",
|
|
1023
1023
|
"success",
|
|
1024
1024
|
"warning",
|
|
1025
1025
|
"error",
|
|
1026
1026
|
"info"
|
|
1027
|
-
],
|
|
1027
|
+
], Ge = [
|
|
1028
1028
|
"sm",
|
|
1029
1029
|
"md",
|
|
1030
1030
|
"lg"
|
|
1031
|
-
],
|
|
1032
|
-
let _ = s(), [v, y] = d(!1), b =
|
|
1031
|
+
], Ke = ({ 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 }) => {
|
|
1032
|
+
let _ = s(), [v, y] = d(!1), b = We.includes(o) ? o : "primary", x = Ge.includes(a) ? a : "md", S = [
|
|
1033
1033
|
"wc-checkbox",
|
|
1034
1034
|
`wc-checkbox--${x}`,
|
|
1035
1035
|
(e || n) && (n ? "wc-checkbox--indeterminate" : "wc-checkbox--checked"),
|
|
@@ -1099,26 +1099,26 @@ var He = [
|
|
|
1099
1099
|
]
|
|
1100
1100
|
});
|
|
1101
1101
|
};
|
|
1102
|
-
|
|
1102
|
+
Ke.displayName = "Checkbox";
|
|
1103
1103
|
//#endregion
|
|
1104
1104
|
//#region ../core/src/components/Chip/utils.jsx
|
|
1105
|
-
function
|
|
1105
|
+
function qe(e) {
|
|
1106
1106
|
let { size: t = "md", variant: n = "filled", color: r = "default", clickable: i = !1, disabled: a = !1, className: o = "" } = e, s = ["wc-chip"];
|
|
1107
1107
|
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
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function Je(e, t, n, r) {
|
|
1110
1110
|
t && !n && r && r(e);
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1112
|
+
function Ye(e, t, n) {
|
|
1113
1113
|
e.stopPropagation(), !t && n && n(e);
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function Xe() {
|
|
1116
1116
|
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
1117
|
}
|
|
1118
1118
|
//#endregion
|
|
1119
1119
|
//#region src/components/Chip/Chip.jsx
|
|
1120
|
-
function
|
|
1121
|
-
let g =
|
|
1120
|
+
function Ze({ 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 }) {
|
|
1121
|
+
let g = qe({
|
|
1122
1122
|
size: o,
|
|
1123
1123
|
variant: a,
|
|
1124
1124
|
color: s,
|
|
@@ -1126,9 +1126,9 @@ function Ye({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1126
1126
|
disabled: r,
|
|
1127
1127
|
className: f
|
|
1128
1128
|
}), _ = (e) => {
|
|
1129
|
-
|
|
1129
|
+
Je(e, i, r, l);
|
|
1130
1130
|
}, v = (e) => {
|
|
1131
|
-
|
|
1131
|
+
Ye(e, r, u);
|
|
1132
1132
|
}, y = (e) => {
|
|
1133
1133
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), _(e));
|
|
1134
1134
|
};
|
|
@@ -1167,7 +1167,7 @@ function Ye({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1167
1167
|
"aria-hidden": "true",
|
|
1168
1168
|
children: /* @__PURE__ */ p("path", {
|
|
1169
1169
|
fillRule: "evenodd",
|
|
1170
|
-
d:
|
|
1170
|
+
d: Xe(),
|
|
1171
1171
|
clipRule: "evenodd"
|
|
1172
1172
|
})
|
|
1173
1173
|
})
|
|
@@ -1177,7 +1177,7 @@ function Ye({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1177
1177
|
}
|
|
1178
1178
|
//#endregion
|
|
1179
1179
|
//#region ../core/src/components/CircularProgress/utils.jsx
|
|
1180
|
-
function
|
|
1180
|
+
function Qe(e, t) {
|
|
1181
1181
|
let n = typeof e == "string" ? parseInt(e, 10) : e, r = n / 2, i = (n - t) / 2;
|
|
1182
1182
|
return {
|
|
1183
1183
|
sizeNumber: n,
|
|
@@ -1186,21 +1186,21 @@ function Xe(e, t) {
|
|
|
1186
1186
|
circumference: 2 * Math.PI * i
|
|
1187
1187
|
};
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function $e(e, t, n) {
|
|
1190
1190
|
return e === "determinate" ? n - t / 100 * n : 0;
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function et(e) {
|
|
1193
1193
|
let { color: t = "primary", variant: n = "indeterminate", overlay: r = !1, centered: i = !1, inline: a = !1, className: o = "" } = e, s = ["wc-circular-progress"];
|
|
1194
1194
|
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
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function tt(e) {
|
|
1197
1197
|
let t = ["wc-circular-progress-circle"];
|
|
1198
1198
|
return e === "indeterminate" && t.push("wc-circular-progress-circle--indeterminate"), t.filter(Boolean);
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1200
|
+
function nt(e) {
|
|
1201
1201
|
return Math.round(e);
|
|
1202
1202
|
}
|
|
1203
|
-
function
|
|
1203
|
+
function rt(e) {
|
|
1204
1204
|
let { value: t = 0, variant: n } = e, r = {
|
|
1205
1205
|
role: "progressbar",
|
|
1206
1206
|
"aria-valuemin": 0,
|
|
@@ -1210,18 +1210,18 @@ function tt(e) {
|
|
|
1210
1210
|
}
|
|
1211
1211
|
//#endregion
|
|
1212
1212
|
//#region src/components/CircularProgress/CircularProgress.jsx
|
|
1213
|
-
function
|
|
1214
|
-
let { sizeNumber: d, center: f, radius: h, circumference: g } =
|
|
1213
|
+
function it({ 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 }) {
|
|
1214
|
+
let { sizeNumber: d, center: f, radius: h, circumference: g } = Qe(t, n), _ = $e(r, e, g), v = et({
|
|
1215
1215
|
color: i,
|
|
1216
1216
|
variant: r,
|
|
1217
1217
|
overlay: o,
|
|
1218
1218
|
centered: s,
|
|
1219
1219
|
inline: c,
|
|
1220
1220
|
className: l
|
|
1221
|
-
}).join(" "), y =
|
|
1221
|
+
}).join(" "), y = tt(r).join(" ");
|
|
1222
1222
|
return /* @__PURE__ */ m("div", {
|
|
1223
1223
|
className: v,
|
|
1224
|
-
...
|
|
1224
|
+
...rt({
|
|
1225
1225
|
value: e,
|
|
1226
1226
|
variant: r
|
|
1227
1227
|
}),
|
|
@@ -1252,38 +1252,38 @@ function nt({ value: e = 0, size: t = 40, thickness: n = 3.6, variant: r = "inde
|
|
|
1252
1252
|
})]
|
|
1253
1253
|
}), a && /* @__PURE__ */ m("div", {
|
|
1254
1254
|
className: "wc-circular-progress-value",
|
|
1255
|
-
children: [
|
|
1255
|
+
children: [nt(e), "%"]
|
|
1256
1256
|
})]
|
|
1257
1257
|
});
|
|
1258
1258
|
}
|
|
1259
1259
|
//#endregion
|
|
1260
1260
|
//#region ../core/src/components/ColorPicker/utils.jsx
|
|
1261
|
-
function
|
|
1261
|
+
function at(e) {
|
|
1262
1262
|
let { size: t = "md", shape: n = "circle", disabled: r = !1, className: i = "" } = e, a = ["wc-color-picker"];
|
|
1263
1263
|
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
1264
|
}
|
|
1265
|
-
function
|
|
1265
|
+
function ot(e, t, n) {
|
|
1266
1266
|
!t && n && n(e.target.value);
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function st(e) {
|
|
1269
1269
|
return { backgroundColor: e };
|
|
1270
1270
|
}
|
|
1271
1271
|
//#endregion
|
|
1272
1272
|
//#region src/components/ColorPicker/ColorPicker.jsx
|
|
1273
|
-
function
|
|
1274
|
-
let o = e ?? "", s =
|
|
1273
|
+
function ct({ value: e = "#ffffff", onChange: t, size: n = "md", shape: r = "circle", disabled: i = !1, className: a = "" }) {
|
|
1274
|
+
let o = e ?? "", s = at({
|
|
1275
1275
|
size: n,
|
|
1276
1276
|
shape: r,
|
|
1277
1277
|
disabled: i,
|
|
1278
1278
|
className: a
|
|
1279
|
-
}).join(" "), c =
|
|
1279
|
+
}).join(" "), c = st(o);
|
|
1280
1280
|
return /* @__PURE__ */ m("label", {
|
|
1281
1281
|
className: s,
|
|
1282
1282
|
children: [/* @__PURE__ */ p("input", {
|
|
1283
1283
|
type: "color",
|
|
1284
1284
|
value: o,
|
|
1285
1285
|
onChange: (e) => {
|
|
1286
|
-
|
|
1286
|
+
ot(e, i, t);
|
|
1287
1287
|
},
|
|
1288
1288
|
disabled: i,
|
|
1289
1289
|
className: "wc-color-picker__input"
|
|
@@ -1295,7 +1295,7 @@ function ot({ value: e = "#ffffff", onChange: t, size: n = "md", shape: r = "cir
|
|
|
1295
1295
|
}
|
|
1296
1296
|
//#endregion
|
|
1297
1297
|
//#region ../core/src/components/Container/utils.jsx
|
|
1298
|
-
var
|
|
1298
|
+
var lt = {
|
|
1299
1299
|
xs: "max-w-xs",
|
|
1300
1300
|
sm: "max-w-sm",
|
|
1301
1301
|
md: "max-w-md",
|
|
@@ -1303,15 +1303,15 @@ var st = {
|
|
|
1303
1303
|
xl: "max-w-6xl",
|
|
1304
1304
|
"2xl": "max-w-7xl"
|
|
1305
1305
|
};
|
|
1306
|
-
function
|
|
1306
|
+
function ut(e) {
|
|
1307
1307
|
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 &&
|
|
1308
|
+
return n || r ? a.push("w-full") : t && lt[t] && a.push(lt[t]), i && a.push(i), a.filter(Boolean);
|
|
1309
1309
|
}
|
|
1310
1310
|
//#endregion
|
|
1311
1311
|
//#region src/components/Container/Container.jsx
|
|
1312
|
-
function
|
|
1312
|
+
function dt({ maxWidth: e = "lg", fluid: t = !1, fixed: n = !1, className: r = "", children: i }) {
|
|
1313
1313
|
return /* @__PURE__ */ p("div", {
|
|
1314
|
-
className:
|
|
1314
|
+
className: ut({
|
|
1315
1315
|
maxWidth: e,
|
|
1316
1316
|
fluid: t,
|
|
1317
1317
|
fixed: n,
|
|
@@ -1322,17 +1322,17 @@ function lt({ maxWidth: e = "lg", fluid: t = !1, fixed: n = !1, className: r = "
|
|
|
1322
1322
|
}
|
|
1323
1323
|
//#endregion
|
|
1324
1324
|
//#region ../core/src/components/Copy/utils.jsx
|
|
1325
|
-
function
|
|
1325
|
+
function ft(e) {
|
|
1326
1326
|
let { variant: t = "default", size: n = "md", copied: r = !1, copyError: i = !1, className: a = "" } = e, o = ["wc-copy"];
|
|
1327
1327
|
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
1328
|
}
|
|
1329
|
-
function
|
|
1329
|
+
function pt(e, t, n, r) {
|
|
1330
1330
|
return t ? "错误" : e ? r : n;
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1332
|
+
function mt(e, t, n, r) {
|
|
1333
1333
|
return t ? r : e ? n : "";
|
|
1334
1334
|
}
|
|
1335
|
-
async function
|
|
1335
|
+
async function ht(e) {
|
|
1336
1336
|
try {
|
|
1337
1337
|
if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
|
|
1338
1338
|
{
|
|
@@ -1345,18 +1345,18 @@ async function pt(e) {
|
|
|
1345
1345
|
return console.warn("复制失败:", e), !1;
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
|
-
async function
|
|
1349
|
-
await
|
|
1348
|
+
async function gt(e, t, n, r, i, a, o, s) {
|
|
1349
|
+
await ht(e) ? (r(!0), i(!1), t(e)) : (r(!1), i(!0), n(/* @__PURE__ */ Error("复制失败"))), o && a && (a(!0), setTimeout(() => a(!1), 1500)), setTimeout(() => {
|
|
1350
1350
|
r(!1), i(!1);
|
|
1351
1351
|
}, s);
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1353
|
+
function _t(e, t) {
|
|
1354
1354
|
let n = "wc-copy-tooltip";
|
|
1355
1355
|
return e && (n += " wc-copy-tooltip--success"), t && (n += " wc-copy-tooltip--error"), n;
|
|
1356
1356
|
}
|
|
1357
1357
|
//#endregion
|
|
1358
1358
|
//#region src/components/Copy/Copy.jsx
|
|
1359
|
-
var
|
|
1359
|
+
var vt = ({ copied: e, error: t }) => e ? /* @__PURE__ */ m("svg", {
|
|
1360
1360
|
viewBox: "0 0 20 20",
|
|
1361
1361
|
fill: "none",
|
|
1362
1362
|
stroke: "currentColor",
|
|
@@ -1396,15 +1396,15 @@ var gt = ({ copied: e, error: t }) => e ? /* @__PURE__ */ m("svg", {
|
|
|
1396
1396
|
rx: "2"
|
|
1397
1397
|
}), /* @__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
1398
|
});
|
|
1399
|
-
function
|
|
1400
|
-
let [v, y] = d(!1), [b, x] = d(!1), [S, C] = d(!1), w =
|
|
1399
|
+
function yt({ 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: _ }) {
|
|
1400
|
+
let [v, y] = d(!1), [b, x] = d(!1), [S, C] = d(!1), w = ft({
|
|
1401
1401
|
variant: t,
|
|
1402
1402
|
size: n,
|
|
1403
1403
|
copied: v,
|
|
1404
1404
|
copyError: b,
|
|
1405
1405
|
className: h
|
|
1406
|
-
}).join(" "), T =
|
|
1407
|
-
await
|
|
1406
|
+
}).join(" "), T = pt(v, b, a, o), E = mt(v, b, s, c), D = _t(v, b), O = async () => {
|
|
1407
|
+
await gt(e, u, f, y, x, C, i, l);
|
|
1408
1408
|
}, k = (e) => {
|
|
1409
1409
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), O());
|
|
1410
1410
|
};
|
|
@@ -1424,7 +1424,7 @@ function _t({ text: e, variant: t = "default", size: n = "md", showLabel: r = !0
|
|
|
1424
1424
|
className: "wc-copy-action",
|
|
1425
1425
|
children: [_ ? /* @__PURE__ */ p(_, { className: "wc-copy-icon" }) : /* @__PURE__ */ p("span", {
|
|
1426
1426
|
className: "wc-copy-icon",
|
|
1427
|
-
children: /* @__PURE__ */ p(
|
|
1427
|
+
children: /* @__PURE__ */ p(vt, {
|
|
1428
1428
|
copied: v,
|
|
1429
1429
|
error: b
|
|
1430
1430
|
})
|
|
@@ -1443,20 +1443,20 @@ function _t({ text: e, variant: t = "default", size: n = "md", showLabel: r = !0
|
|
|
1443
1443
|
}
|
|
1444
1444
|
//#endregion
|
|
1445
1445
|
//#region ../core/src/components/DatePicker/utils.jsx
|
|
1446
|
-
function
|
|
1446
|
+
function bt(e, t = "YYYY-MM-DD") {
|
|
1447
1447
|
if (!e || !(e instanceof Date)) return "";
|
|
1448
1448
|
let n = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getDate()).padStart(2, "0");
|
|
1449
1449
|
return t.replace("YYYY", n).replace("MM", r).replace("DD", i);
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1451
|
+
function xt(e) {
|
|
1452
1452
|
if (!e) return !1;
|
|
1453
1453
|
let t = /* @__PURE__ */ new Date();
|
|
1454
1454
|
return e.toDateString() === t.toDateString();
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function St(e, t) {
|
|
1457
1457
|
return !e || !t ? !1 : e.toDateString() === t.toDateString();
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1459
|
+
function Ct(e) {
|
|
1460
1460
|
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
1461
|
for (let e = a - 1; e >= 0; e--) s.push({
|
|
1462
1462
|
day: c.getDate() - e,
|
|
@@ -1476,7 +1476,7 @@ function xt(e) {
|
|
|
1476
1476
|
});
|
|
1477
1477
|
return s;
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1479
|
+
function wt(e = "md", t = "default", n = !1, r = !1, i = !1) {
|
|
1480
1480
|
let a = [
|
|
1481
1481
|
"wc-datepicker-wrapper",
|
|
1482
1482
|
`wc-datepicker-wrapper--${e}`,
|
|
@@ -1484,13 +1484,13 @@ function St(e = "md", t = "default", n = !1, r = !1, i = !1) {
|
|
|
1484
1484
|
];
|
|
1485
1485
|
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
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function Tt(e, t) {
|
|
1488
1488
|
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 &&
|
|
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 && St(e.date, t) && n.push("wc-datepicker-day--selected"), xt(e.date) && n.push("wc-datepicker-day--today"), n.join(" ");
|
|
1490
1490
|
}
|
|
1491
1491
|
//#endregion
|
|
1492
1492
|
//#region src/components/DatePicker/DatePicker.jsx
|
|
1493
|
-
function
|
|
1493
|
+
function Et({ 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 = "", ..._ }) {
|
|
1494
1494
|
let v = u(null), y = s(), [b, x] = d(!1), [S, C] = d(() => e ? new Date(e) : /* @__PURE__ */ new Date()), [w, T] = d(e ? new Date(e) : null);
|
|
1495
1495
|
o(() => {
|
|
1496
1496
|
T(e ? new Date(e) : null);
|
|
@@ -1500,7 +1500,7 @@ function wt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1500
1500
|
};
|
|
1501
1501
|
return document.addEventListener("click", e), () => document.removeEventListener("click", e);
|
|
1502
1502
|
}, []);
|
|
1503
|
-
let E = w ?
|
|
1503
|
+
let E = w ? bt(w, c) : "", D = () => {
|
|
1504
1504
|
r || x((e) => !e);
|
|
1505
1505
|
}, O = (e) => {
|
|
1506
1506
|
r || (e.key === "Enter" || e.key === " " || e.key === "ArrowDown" ? (e.preventDefault(), x(!0)) : e.key === "Escape" && x(!1));
|
|
@@ -1521,7 +1521,7 @@ function wt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1521
1521
|
}, N = (e) => {
|
|
1522
1522
|
let { date: t } = e;
|
|
1523
1523
|
return !!(f && t < (f instanceof Date ? f : new Date(f)) || h && t > (h instanceof Date ? h : new Date(h)));
|
|
1524
|
-
}, P =
|
|
1524
|
+
}, P = Ct(S), F = [
|
|
1525
1525
|
"日",
|
|
1526
1526
|
"一",
|
|
1527
1527
|
"二",
|
|
@@ -1529,7 +1529,7 @@ function wt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1529
1529
|
"四",
|
|
1530
1530
|
"五",
|
|
1531
1531
|
"六"
|
|
1532
|
-
], I = `${S.getFullYear()}年${S.getMonth() + 1}月`, L = [
|
|
1532
|
+
], I = `${S.getFullYear()}年${S.getMonth() + 1}月`, L = [wt(i, a, r, !1, b), g].filter(Boolean).join(" ");
|
|
1533
1533
|
return /* @__PURE__ */ m("div", {
|
|
1534
1534
|
className: "wc-datepicker",
|
|
1535
1535
|
ref: v,
|
|
@@ -1607,11 +1607,11 @@ function wt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1607
1607
|
className: "wc-datepicker-days",
|
|
1608
1608
|
children: P.map((e) => /* @__PURE__ */ p("button", {
|
|
1609
1609
|
type: "button",
|
|
1610
|
-
className:
|
|
1610
|
+
className: Tt(e, w),
|
|
1611
1611
|
disabled: N(e),
|
|
1612
|
-
"aria-label":
|
|
1613
|
-
"aria-selected":
|
|
1614
|
-
"aria-current":
|
|
1612
|
+
"aria-label": bt(e.date, "YYYY-MM-DD"),
|
|
1613
|
+
"aria-selected": St(e.date, w),
|
|
1614
|
+
"aria-current": xt(e.date) ? "date" : void 0,
|
|
1615
1615
|
onClick: () => A(e),
|
|
1616
1616
|
children: e.day
|
|
1617
1617
|
}, `${e.month}-${e.day}`))
|
|
@@ -1636,7 +1636,7 @@ function wt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1636
1636
|
}
|
|
1637
1637
|
//#endregion
|
|
1638
1638
|
//#region src/components/Button/Fab.jsx
|
|
1639
|
-
var
|
|
1639
|
+
var Dt = ({ 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
1640
|
let [g, _] = d(!1), v = ["circular", "extended"], y = [
|
|
1641
1641
|
"sm",
|
|
1642
1642
|
"md",
|
|
@@ -1677,10 +1677,10 @@ var Tt = ({ variant: e = "circular", size: t = "md", color: n = "primary", disab
|
|
|
1677
1677
|
})]
|
|
1678
1678
|
});
|
|
1679
1679
|
};
|
|
1680
|
-
|
|
1680
|
+
Dt.displayName = "Fab";
|
|
1681
1681
|
//#endregion
|
|
1682
1682
|
//#region src/components/Feed/Feed.jsx
|
|
1683
|
-
var
|
|
1683
|
+
var Ot = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "var(--wc-accent)", dotSize: i = 8, lineWidth: a = 1, onItemClick: o }) => {
|
|
1684
1684
|
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
1685
|
"--feed-color": r,
|
|
1686
1686
|
"--feed-dot-size": c,
|
|
@@ -1722,7 +1722,7 @@ var Et = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1722
1722
|
}),
|
|
1723
1723
|
s && /* @__PURE__ */ p("ul", {
|
|
1724
1724
|
className: "wc-feed-children",
|
|
1725
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
1725
|
+
children: e.children.map((e) => /* @__PURE__ */ p(Ot, {
|
|
1726
1726
|
item: e,
|
|
1727
1727
|
showAvatar: t,
|
|
1728
1728
|
variant: n,
|
|
@@ -1735,7 +1735,7 @@ var Et = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1735
1735
|
]
|
|
1736
1736
|
})]
|
|
1737
1737
|
});
|
|
1738
|
-
},
|
|
1738
|
+
}, kt = ({ items: e = [], variant: t = "timeline", showAvatar: n = !0, color: r = "var(--wc-accent)", dotSize: i = 8, lineWidth: a = 1, onItemClick: o, className: s = "" }) => {
|
|
1739
1739
|
let c = typeof a == "number" ? `${a}px` : a, l = {
|
|
1740
1740
|
"--feed-color": r,
|
|
1741
1741
|
"--feed-line-width": c
|
|
@@ -1743,7 +1743,7 @@ var Et = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1743
1743
|
return /* @__PURE__ */ p("ul", {
|
|
1744
1744
|
className: `wc-feed-list ${t} ${s}`,
|
|
1745
1745
|
style: l,
|
|
1746
|
-
children: e.map((e) => /* @__PURE__ */ p(
|
|
1746
|
+
children: e.map((e) => /* @__PURE__ */ p(Ot, {
|
|
1747
1747
|
item: e,
|
|
1748
1748
|
variant: t,
|
|
1749
1749
|
showAvatar: n,
|
|
@@ -1754,10 +1754,10 @@ var Et = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1754
1754
|
}, e.id || e.time))
|
|
1755
1755
|
});
|
|
1756
1756
|
};
|
|
1757
|
-
|
|
1757
|
+
kt.displayName = "Feed";
|
|
1758
1758
|
//#endregion
|
|
1759
1759
|
//#region ../core/src/components/Feature/utils.jsx
|
|
1760
|
-
var
|
|
1760
|
+
var At = ({ align: e, size: t, background: n, reverse: r, vertical: i, clickable: a, disabled: o, className: s }) => [
|
|
1761
1761
|
"wc-feature-card",
|
|
1762
1762
|
a && "wc-feature-card--clickable",
|
|
1763
1763
|
o && "wc-feature-card--disabled",
|
|
@@ -1768,29 +1768,29 @@ var Ot = ({ align: e, size: t, background: n, reverse: r, vertical: i, clickable
|
|
|
1768
1768
|
`wc-feature-card--${e}`,
|
|
1769
1769
|
s
|
|
1770
1770
|
].filter(Boolean);
|
|
1771
|
-
function
|
|
1771
|
+
function jt(e) {
|
|
1772
1772
|
return ["wc-feature-icon", `wc-feature-icon--${e}`].filter(Boolean);
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1774
|
+
function Mt(e) {
|
|
1775
1775
|
return ["wc-feature-content", `wc-feature-content--${e}`].filter(Boolean);
|
|
1776
1776
|
}
|
|
1777
|
-
function
|
|
1777
|
+
function Nt(e) {
|
|
1778
1778
|
return ["wc-feature-title", `wc-feature-title--${e}`].filter(Boolean);
|
|
1779
1779
|
}
|
|
1780
|
-
var
|
|
1781
|
-
function
|
|
1780
|
+
var Pt = (e) => ["wc-feature-description", `wc-feature-description--${e}`].filter(Boolean);
|
|
1781
|
+
function Ft(e, t, n) {
|
|
1782
1782
|
!t && n && n(e);
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1784
|
+
function It(e, t) {
|
|
1785
1785
|
e.stopPropagation(), t && t(e);
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1787
|
+
function Lt(e) {
|
|
1788
1788
|
return e;
|
|
1789
1789
|
}
|
|
1790
1790
|
//#endregion
|
|
1791
1791
|
//#region src/components/Feature/Feature.jsx
|
|
1792
|
-
var
|
|
1793
|
-
let b =
|
|
1792
|
+
var Rt = ({ 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 = {} }) => {
|
|
1793
|
+
let b = At({
|
|
1794
1794
|
align: a,
|
|
1795
1795
|
size: i,
|
|
1796
1796
|
background: o,
|
|
@@ -1799,7 +1799,7 @@ var It = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1799
1799
|
clickable: !!h,
|
|
1800
1800
|
disabled: !1,
|
|
1801
1801
|
className: v
|
|
1802
|
-
}).join(" "), x =
|
|
1802
|
+
}).join(" "), x = jt(r).join(" "), S = Mt(a).join(" "), C = Nt(i).join(" "), w = Pt(i).join(" "), T = {
|
|
1803
1803
|
...c ? { background: c } : {},
|
|
1804
1804
|
...y
|
|
1805
1805
|
}, E = typeof r == "number" ? `${r}px` : r, D = h ? {
|
|
@@ -1812,7 +1812,7 @@ var It = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1812
1812
|
return /* @__PURE__ */ m("div", {
|
|
1813
1813
|
className: `${b} ${s === "default" ? "" : `wc-feature-card--${s}`}`,
|
|
1814
1814
|
style: T,
|
|
1815
|
-
onClick: (e) =>
|
|
1815
|
+
onClick: (e) => Ft(e, !1, h),
|
|
1816
1816
|
...D,
|
|
1817
1817
|
children: [n && /* @__PURE__ */ p("div", {
|
|
1818
1818
|
className: x,
|
|
@@ -1823,7 +1823,7 @@ var It = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1823
1823
|
children: typeof n == "string" ? /* @__PURE__ */ p("span", {
|
|
1824
1824
|
className: "wc-feature-icon__inner",
|
|
1825
1825
|
dangerouslySetInnerHTML: { __html: n }
|
|
1826
|
-
}) :
|
|
1826
|
+
}) : Lt(n)
|
|
1827
1827
|
}), /* @__PURE__ */ m("div", {
|
|
1828
1828
|
className: S,
|
|
1829
1829
|
children: [
|
|
@@ -1838,17 +1838,17 @@ var It = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1838
1838
|
d && /* @__PURE__ */ p("a", {
|
|
1839
1839
|
href: f,
|
|
1840
1840
|
className: "wc-feature-cta",
|
|
1841
|
-
onClick: (e) =>
|
|
1841
|
+
onClick: (e) => It(e, g),
|
|
1842
1842
|
children: d
|
|
1843
1843
|
})
|
|
1844
1844
|
]
|
|
1845
1845
|
})]
|
|
1846
1846
|
});
|
|
1847
1847
|
};
|
|
1848
|
-
|
|
1848
|
+
Rt.displayName = "Feature";
|
|
1849
1849
|
//#endregion
|
|
1850
1850
|
//#region src/components/FileInput/FileInput.jsx
|
|
1851
|
-
var
|
|
1851
|
+
var zt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
1852
1852
|
className: e,
|
|
1853
1853
|
"aria-hidden": "true",
|
|
1854
1854
|
children: /* @__PURE__ */ m("svg", {
|
|
@@ -1858,7 +1858,7 @@ var Lt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
1858
1858
|
strokeWidth: "2",
|
|
1859
1859
|
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
1860
|
})
|
|
1861
|
-
}),
|
|
1861
|
+
}), Bt = ({ multiple: e = !1, variant: t = "block", accept: n = "", label: r = "选择文件", description: i = "或拖放到这里", disabled: a = !1, onChange: o, onInvalid: s, className: c = "", style: l = {} }) => {
|
|
1862
1862
|
let [u, h] = d(!1), g = (e) => {
|
|
1863
1863
|
if (!n) return !0;
|
|
1864
1864
|
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 +1901,7 @@ var Lt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
1901
1901
|
"aria-label": r,
|
|
1902
1902
|
onChange: _
|
|
1903
1903
|
}),
|
|
1904
|
-
t === "block" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
1904
|
+
t === "block" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(zt, { className: "wc-file-input__upload-icon" }), /* @__PURE__ */ m("span", {
|
|
1905
1905
|
className: "wc-file-input-content",
|
|
1906
1906
|
children: [/* @__PURE__ */ p("strong", {
|
|
1907
1907
|
className: "wc-file-input-content__title",
|
|
@@ -1919,14 +1919,14 @@ var Lt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
1919
1919
|
children: "+"
|
|
1920
1920
|
}), r]
|
|
1921
1921
|
}),
|
|
1922
|
-
t === "icon" && /* @__PURE__ */ p(
|
|
1922
|
+
t === "icon" && /* @__PURE__ */ p(zt, { className: "wc-file-icon" })
|
|
1923
1923
|
]
|
|
1924
1924
|
});
|
|
1925
1925
|
};
|
|
1926
|
-
|
|
1926
|
+
Bt.displayName = "FileInput";
|
|
1927
1927
|
//#endregion
|
|
1928
1928
|
//#region src/components/Form/FormControl.jsx
|
|
1929
|
-
var
|
|
1929
|
+
var Vt = n(null), Ht = ({ 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
1930
|
let f = l(() => ({
|
|
1931
1931
|
disabled: e,
|
|
1932
1932
|
error: t,
|
|
@@ -1948,7 +1948,7 @@ var zt = n(null), Bt = ({ disabled: e = !1, error: t = !1, required: n = !1, var
|
|
|
1948
1948
|
t && "form-control--error",
|
|
1949
1949
|
s
|
|
1950
1950
|
].filter(Boolean).join(" ");
|
|
1951
|
-
return /* @__PURE__ */ p(
|
|
1951
|
+
return /* @__PURE__ */ p(Vt.Provider, {
|
|
1952
1952
|
value: f,
|
|
1953
1953
|
children: /* @__PURE__ */ p("div", {
|
|
1954
1954
|
className: m,
|
|
@@ -1958,10 +1958,10 @@ var zt = n(null), Bt = ({ disabled: e = !1, error: t = !1, required: n = !1, var
|
|
|
1958
1958
|
})
|
|
1959
1959
|
});
|
|
1960
1960
|
};
|
|
1961
|
-
|
|
1961
|
+
Ht.displayName = "FormControl";
|
|
1962
1962
|
//#endregion
|
|
1963
1963
|
//#region src/components/Form/FormControlLabel.jsx
|
|
1964
|
-
var
|
|
1964
|
+
var Ut = ({ 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
1965
|
let f = (e) => {
|
|
1966
1966
|
n || l?.(e);
|
|
1967
1967
|
}, h = [
|
|
@@ -2000,10 +2000,10 @@ var Vt = ({ label: e, labelPlacement: t = "end", disabled: n = !1, required: r =
|
|
|
2000
2000
|
]
|
|
2001
2001
|
});
|
|
2002
2002
|
};
|
|
2003
|
-
|
|
2003
|
+
Ut.displayName = "FormControlLabel";
|
|
2004
2004
|
//#endregion
|
|
2005
2005
|
//#region src/components/Form/FormGroup.jsx
|
|
2006
|
-
var
|
|
2006
|
+
var Wt = ({ row: e = !1, spacing: t = "normal", className: n = "", style: r = {}, children: i, ...a }) => /* @__PURE__ */ p("div", {
|
|
2007
2007
|
className: [
|
|
2008
2008
|
"form-group",
|
|
2009
2009
|
e && "form-group--row",
|
|
@@ -2015,11 +2015,11 @@ var Ht = ({ row: e = !1, spacing: t = "normal", className: n = "", style: r = {}
|
|
|
2015
2015
|
...a,
|
|
2016
2016
|
children: i
|
|
2017
2017
|
});
|
|
2018
|
-
|
|
2018
|
+
Wt.displayName = "FormGroup";
|
|
2019
2019
|
//#endregion
|
|
2020
2020
|
//#region src/components/Form/FormHelperText.jsx
|
|
2021
|
-
var
|
|
2022
|
-
let h = a(
|
|
2021
|
+
var Gt = ({ 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 }) => {
|
|
2022
|
+
let h = a(Vt) || {}, g = t || h.error, _ = e || h.disabled;
|
|
2023
2023
|
return /* @__PURE__ */ p("p", {
|
|
2024
2024
|
id: c,
|
|
2025
2025
|
className: [
|
|
@@ -2039,55 +2039,55 @@ var Ut = ({ disabled: e = !1, error: t = !1, filled: n = !1, focused: r = !1, ma
|
|
|
2039
2039
|
children: f
|
|
2040
2040
|
});
|
|
2041
2041
|
};
|
|
2042
|
-
|
|
2042
|
+
Gt.displayName = "FormHelperText";
|
|
2043
2043
|
//#endregion
|
|
2044
2044
|
//#region ../core/src/components/Grid/utils.jsx
|
|
2045
|
-
var
|
|
2045
|
+
var Kt = {
|
|
2046
2046
|
xs: "xs",
|
|
2047
2047
|
sm: "sm",
|
|
2048
2048
|
md: "md",
|
|
2049
2049
|
lg: "lg",
|
|
2050
2050
|
xl: "xl"
|
|
2051
|
-
},
|
|
2051
|
+
}, qt = {
|
|
2052
2052
|
row: "wc-grid-container--row",
|
|
2053
2053
|
column: "wc-grid-container--column",
|
|
2054
2054
|
"row-reverse": "wc-grid-container--row-reverse",
|
|
2055
2055
|
"column-reverse": "wc-grid-container--column-reverse"
|
|
2056
|
-
},
|
|
2056
|
+
}, Jt = {
|
|
2057
2057
|
"flex-start": "wc-grid-container--justify-start",
|
|
2058
2058
|
center: "wc-grid-container--justify-center",
|
|
2059
2059
|
"flex-end": "wc-grid-container--justify-end",
|
|
2060
2060
|
"space-between": "wc-grid-container--justify-between",
|
|
2061
2061
|
"space-around": "wc-grid-container--justify-around",
|
|
2062
2062
|
"space-evenly": "wc-grid-container--justify-evenly"
|
|
2063
|
-
},
|
|
2063
|
+
}, Yt = {
|
|
2064
2064
|
"flex-start": "wc-grid-container--align-start",
|
|
2065
2065
|
center: "wc-grid-container--align-center",
|
|
2066
2066
|
"flex-end": "wc-grid-container--align-end",
|
|
2067
2067
|
stretch: "wc-grid-container--align-stretch",
|
|
2068
2068
|
baseline: "wc-grid-container--align-baseline"
|
|
2069
|
-
},
|
|
2069
|
+
}, Xt = (e) => {
|
|
2070
2070
|
let { direction: t = "row", justifyContent: n = "flex-start", alignItems: r = "stretch", spacing: i = 0 } = e, a = ["wc-grid", "wc-grid-container"];
|
|
2071
|
-
return
|
|
2072
|
-
},
|
|
2071
|
+
return qt[t] && a.push(qt[t]), Jt[n] && a.push(Jt[n]), Yt[r] && a.push(Yt[r]), a.push(...Qt(i)), a;
|
|
2072
|
+
}, Zt = (e) => {
|
|
2073
2073
|
let { xs: t, sm: n, md: r, lg: i, xl: a } = e, o = ["wc-grid", "wc-grid-item"];
|
|
2074
|
-
return Object.entries(
|
|
2074
|
+
return Object.entries(Kt).forEach(([t, n]) => {
|
|
2075
2075
|
let r = e[t];
|
|
2076
|
-
r !== void 0 && o.push(
|
|
2076
|
+
r !== void 0 && o.push(...$t(r, n));
|
|
2077
2077
|
}), o;
|
|
2078
|
-
},
|
|
2078
|
+
}, Qt = (e) => {
|
|
2079
2079
|
let t = Number(e);
|
|
2080
2080
|
return [`wc-grid-container--spacing-${Number.isFinite(t) ? Math.max(0, Math.min(12, Math.round(t))) : 0}`];
|
|
2081
|
-
},
|
|
2081
|
+
}, $t = (e, t) => {
|
|
2082
2082
|
if (e === !1 || e == null) return [];
|
|
2083
2083
|
if (e === "auto") return [`wc-grid-item--${t}-auto`];
|
|
2084
2084
|
if (e === !0) return [`wc-grid-item--${t}-true`];
|
|
2085
2085
|
let n = Number(e);
|
|
2086
2086
|
return Number.isFinite(n) && n >= 1 && n <= 12 ? [`wc-grid-item--${t}-${Math.round(n)}`] : [];
|
|
2087
|
-
},
|
|
2087
|
+
}, en = (e) => {
|
|
2088
2088
|
let { container: t = !1, item: n = !1, className: r = "" } = e, i = [];
|
|
2089
|
-
return t && i.push(...
|
|
2090
|
-
},
|
|
2089
|
+
return t && i.push(...Xt(e)), n && i.push(...Zt(e)), r && i.push(r), i;
|
|
2090
|
+
}, tn = (e) => {
|
|
2091
2091
|
let t = { ...e };
|
|
2092
2092
|
return t.spacing !== void 0 && (t.spacing = Number(t.spacing) || 0), [
|
|
2093
2093
|
"xs",
|
|
@@ -2102,8 +2102,8 @@ var Wt = {
|
|
|
2102
2102
|
isNaN(r) || (t[e] = Math.max(1, Math.min(12, r)));
|
|
2103
2103
|
}
|
|
2104
2104
|
}), t;
|
|
2105
|
-
},
|
|
2106
|
-
className:
|
|
2105
|
+
}, nn = ({ 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", {
|
|
2106
|
+
className: en(tn({
|
|
2107
2107
|
container: e,
|
|
2108
2108
|
item: t,
|
|
2109
2109
|
xs: n,
|
|
@@ -2121,10 +2121,10 @@ var Wt = {
|
|
|
2121
2121
|
...h,
|
|
2122
2122
|
children: m
|
|
2123
2123
|
});
|
|
2124
|
-
|
|
2124
|
+
nn.displayName = "Grid";
|
|
2125
2125
|
//#endregion
|
|
2126
2126
|
//#region src/components/HoverCard/HoverCard.jsx
|
|
2127
|
-
var
|
|
2127
|
+
var rn = ({ 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 }) => {
|
|
2128
2128
|
let T = s(), [E, D] = d(!1), O = u(null), k = u(null), A = u(null), j = `${T}-trigger`, M = () => {
|
|
2129
2129
|
clearTimeout(O.current), clearTimeout(k.current);
|
|
2130
2130
|
}, N = () => {
|
|
@@ -2213,10 +2213,10 @@ var tn = ({ triggerText: e = "Hover me", cardData: t = {}, variant: n = "default
|
|
|
2213
2213
|
})]
|
|
2214
2214
|
});
|
|
2215
2215
|
};
|
|
2216
|
-
|
|
2216
|
+
rn.displayName = "HoverCard";
|
|
2217
2217
|
//#endregion
|
|
2218
2218
|
//#region ../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
|
|
2219
|
-
var
|
|
2219
|
+
var an = /* @__PURE__ */ L(((e) => {
|
|
2220
2220
|
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
2221
|
function b(e) {
|
|
2222
2222
|
if (typeof e == "object" && e) {
|
|
@@ -2272,7 +2272,7 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2272
2272
|
}, e.isValidElementType = function(e) {
|
|
2273
2273
|
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
2274
|
}, e.typeOf = b;
|
|
2275
|
-
})),
|
|
2275
|
+
})), on = /* @__PURE__ */ L(((e) => {
|
|
2276
2276
|
process.env.NODE_ENV !== "production" && (function() {
|
|
2277
2277
|
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
2278
|
function b(e) {
|
|
@@ -2334,23 +2334,23 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2334
2334
|
function W(e) {
|
|
2335
2335
|
return x(e) === m;
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2337
|
+
function G(e) {
|
|
2338
2338
|
return x(e) === r;
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2340
|
+
function ee(e) {
|
|
2341
2341
|
return x(e) === o;
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function te(e) {
|
|
2344
2344
|
return x(e) === a;
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2346
|
+
function K(e) {
|
|
2347
2347
|
return x(e) === f;
|
|
2348
2348
|
}
|
|
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 =
|
|
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 = G, e.isProfiler = ee, e.isStrictMode = te, e.isSuspense = K, e.isValidElementType = b, e.typeOf = x;
|
|
2350
2350
|
})();
|
|
2351
|
-
})),
|
|
2352
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
2353
|
-
})),
|
|
2351
|
+
})), sn = /* @__PURE__ */ L(((e, t) => {
|
|
2352
|
+
process.env.NODE_ENV === "production" ? t.exports = an() : t.exports = on();
|
|
2353
|
+
})), cn = /* @__PURE__ */ L(((e, t) => {
|
|
2354
2354
|
var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
2355
2355
|
function a(e) {
|
|
2356
2356
|
if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
|
|
@@ -2383,14 +2383,14 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2383
2383
|
}
|
|
2384
2384
|
return s;
|
|
2385
2385
|
};
|
|
2386
|
-
})),
|
|
2386
|
+
})), ln = /* @__PURE__ */ L(((e, t) => {
|
|
2387
2387
|
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
2388
|
-
})),
|
|
2388
|
+
})), un = /* @__PURE__ */ L(((e, t) => {
|
|
2389
2389
|
t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
2390
|
-
})),
|
|
2390
|
+
})), dn = /* @__PURE__ */ L(((e, t) => {
|
|
2391
2391
|
var n = function() {};
|
|
2392
2392
|
if (process.env.NODE_ENV !== "production") {
|
|
2393
|
-
var r =
|
|
2393
|
+
var r = ln(), i = {}, a = un();
|
|
2394
2394
|
n = function(e) {
|
|
2395
2395
|
var t = "Warning: " + e;
|
|
2396
2396
|
typeof console < "u" && console.error(t);
|
|
@@ -2423,8 +2423,8 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2423
2423
|
o.resetWarningCache = function() {
|
|
2424
2424
|
process.env.NODE_ENV !== "production" && (i = {});
|
|
2425
2425
|
}, t.exports = o;
|
|
2426
|
-
})),
|
|
2427
|
-
var n =
|
|
2426
|
+
})), fn = /* @__PURE__ */ L(((e, t) => {
|
|
2427
|
+
var n = sn(), r = cn(), i = ln(), a = un(), o = dn(), s = function() {};
|
|
2428
2428
|
process.env.NODE_ENV !== "production" && (s = function(e) {
|
|
2429
2429
|
var t = "Warning: " + e;
|
|
2430
2430
|
typeof console < "u" && console.error(t);
|
|
@@ -2682,8 +2682,8 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2682
2682
|
}
|
|
2683
2683
|
return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
|
|
2684
2684
|
};
|
|
2685
|
-
})),
|
|
2686
|
-
var n =
|
|
2685
|
+
})), pn = /* @__PURE__ */ L(((e, t) => {
|
|
2686
|
+
var n = ln();
|
|
2687
2687
|
function r() {}
|
|
2688
2688
|
function i() {}
|
|
2689
2689
|
i.resetWarningCache = r, t.exports = function() {
|
|
@@ -2722,42 +2722,42 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2722
2722
|
};
|
|
2723
2723
|
return a.PropTypes = a, a;
|
|
2724
2724
|
};
|
|
2725
|
-
})), $ = /* @__PURE__ */
|
|
2725
|
+
})), $ = /* @__PURE__ */ z((/* @__PURE__ */ L(((e, t) => {
|
|
2726
2726
|
if (process.env.NODE_ENV !== "production") {
|
|
2727
|
-
var n =
|
|
2728
|
-
t.exports =
|
|
2729
|
-
} else t.exports =
|
|
2730
|
-
})))(), 1),
|
|
2727
|
+
var n = sn();
|
|
2728
|
+
t.exports = fn()(n.isElement, !0);
|
|
2729
|
+
} else t.exports = pn()();
|
|
2730
|
+
})))(), 1), mn = ({ className: e, style: t }) => /* @__PURE__ */ p("span", {
|
|
2731
2731
|
className: e,
|
|
2732
2732
|
style: t
|
|
2733
|
-
}),
|
|
2733
|
+
}), hn = {
|
|
2734
2734
|
lucide: () => import("@zeturn/watercolor-icons-lucide-react"),
|
|
2735
2735
|
heroicons: () => import("@zeturn/watercolor-icons-heroicons-react"),
|
|
2736
2736
|
tabler: () => import("@zeturn/watercolor-icons-tabler-react"),
|
|
2737
2737
|
phosphor: () => import("@zeturn/watercolor-icons-phosphor-react"),
|
|
2738
2738
|
feather: () => import("@zeturn/watercolor-icons-feather")
|
|
2739
|
-
},
|
|
2740
|
-
let t =
|
|
2739
|
+
}, gn = (e) => {
|
|
2740
|
+
let t = hn[e];
|
|
2741
2741
|
return t ? t() : Promise.resolve(null);
|
|
2742
|
-
},
|
|
2742
|
+
}, _n = (e, t) => r(() => e().then((e) => ({ default: t(e || {}) })).catch((e) => (console.warn("[Icon] 动态导入失败,已回退到占位符图标。", e), { default: mn }))), vn = (e, t, n) => {
|
|
2743
2743
|
switch (e) {
|
|
2744
|
-
case "lucide": return
|
|
2745
|
-
case "heroicons": return
|
|
2746
|
-
case "tabler": return
|
|
2747
|
-
case "phosphor": return
|
|
2744
|
+
case "lucide": return _n(() => gn("lucide"), (e) => e.getIcon?.(t) || mn);
|
|
2745
|
+
case "heroicons": return _n(() => gn("heroicons"), (e) => e.getIcon?.(t, n) || mn);
|
|
2746
|
+
case "tabler": return _n(() => gn("tabler"), (e) => e.getIcon?.(t) || mn);
|
|
2747
|
+
case "phosphor": return _n(() => gn("phosphor"), (e) => e.getIcon?.(t) || mn);
|
|
2748
2748
|
default: return null;
|
|
2749
2749
|
}
|
|
2750
|
-
},
|
|
2750
|
+
}, yn = (e) => typeof e == "number" ? e : {
|
|
2751
2751
|
xs: 16,
|
|
2752
2752
|
sm: 20,
|
|
2753
2753
|
md: 24,
|
|
2754
2754
|
lg: 32,
|
|
2755
2755
|
xl: 48
|
|
2756
|
-
}[e] || parseInt(e) || 24,
|
|
2756
|
+
}[e] || parseInt(e) || 24, bn = ({ 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
2757
|
let m = l(() => {
|
|
2758
2758
|
if (!n) return null;
|
|
2759
2759
|
try {
|
|
2760
|
-
return
|
|
2760
|
+
return vn(e, n, c);
|
|
2761
2761
|
} catch {
|
|
2762
2762
|
return console.warn(`Icon "${n}" not found in library "${e}"`), null;
|
|
2763
2763
|
}
|
|
@@ -2767,7 +2767,7 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2767
2767
|
c
|
|
2768
2768
|
]), h = l(() => e === "feather" && n ? r(async () => {
|
|
2769
2769
|
try {
|
|
2770
|
-
let e =
|
|
2770
|
+
let e = yn(a), { getFeatherSvg: t } = await gn("feather") || {}, r = await t(n, {
|
|
2771
2771
|
width: e,
|
|
2772
2772
|
height: e,
|
|
2773
2773
|
strokeWidth: Number(s)
|
|
@@ -2788,13 +2788,13 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2788
2788
|
]), g = l(() => e === "html" && i ? i : "", [e, i]), _ = l(() => {
|
|
2789
2789
|
let e = {};
|
|
2790
2790
|
if (o && o !== "currentColor" && (e.color = o), a) {
|
|
2791
|
-
let t =
|
|
2791
|
+
let t = yn(a);
|
|
2792
2792
|
e.width = `${t}px`, e.height = `${t}px`;
|
|
2793
2793
|
}
|
|
2794
2794
|
return e;
|
|
2795
2795
|
}, [o, a]), v = l(() => {
|
|
2796
2796
|
let t = {
|
|
2797
|
-
size:
|
|
2797
|
+
size: yn(a),
|
|
2798
2798
|
color: o,
|
|
2799
2799
|
...f
|
|
2800
2800
|
};
|
|
@@ -2835,7 +2835,7 @@ var nn = /* @__PURE__ */ F(((e) => {
|
|
|
2835
2835
|
children: d
|
|
2836
2836
|
});
|
|
2837
2837
|
};
|
|
2838
|
-
|
|
2838
|
+
bn.propTypes = {
|
|
2839
2839
|
library: $.default.oneOf([
|
|
2840
2840
|
"lucide",
|
|
2841
2841
|
"heroicons",
|
|
@@ -2859,7 +2859,7 @@ vn.propTypes = {
|
|
|
2859
2859
|
};
|
|
2860
2860
|
//#endregion
|
|
2861
2861
|
//#region src/components/Button/IconButton.jsx
|
|
2862
|
-
var
|
|
2862
|
+
var xn = ({ 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
2863
|
let f = [
|
|
2864
2864
|
"default",
|
|
2865
2865
|
"primary",
|
|
@@ -2901,10 +2901,10 @@ var yn = ({ color: e = "default", size: t = "md", edge: n = !1, disabled: r = !1
|
|
|
2901
2901
|
})
|
|
2902
2902
|
});
|
|
2903
2903
|
};
|
|
2904
|
-
|
|
2904
|
+
xn.displayName = "IconButton";
|
|
2905
2905
|
//#endregion
|
|
2906
2906
|
//#region src/components/ImageGallery/ImageGallery.jsx
|
|
2907
|
-
var
|
|
2907
|
+
var Sn = ({ 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
2908
|
let [w, T] = d(-1), [E, D] = d(1), O = u ? Math.ceil(e.length / f) : 1, k = {
|
|
2909
2909
|
sm: "75%",
|
|
2910
2910
|
md: "66.67%",
|
|
@@ -3109,10 +3109,10 @@ var bn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3109
3109
|
]
|
|
3110
3110
|
});
|
|
3111
3111
|
};
|
|
3112
|
-
|
|
3112
|
+
Sn.displayName = "ImageGallery";
|
|
3113
3113
|
//#endregion
|
|
3114
3114
|
//#region src/composition.ts
|
|
3115
|
-
var
|
|
3115
|
+
var Cn = [
|
|
3116
3116
|
"none",
|
|
3117
3117
|
"2xs",
|
|
3118
3118
|
"xs",
|
|
@@ -3122,40 +3122,40 @@ var xn = [
|
|
|
3122
3122
|
"xl",
|
|
3123
3123
|
"2xl",
|
|
3124
3124
|
"3xl"
|
|
3125
|
-
],
|
|
3125
|
+
], wn = [
|
|
3126
3126
|
"stretch",
|
|
3127
3127
|
"start",
|
|
3128
3128
|
"center",
|
|
3129
3129
|
"end"
|
|
3130
|
-
],
|
|
3130
|
+
], Tn = [
|
|
3131
3131
|
"sm",
|
|
3132
3132
|
"md",
|
|
3133
3133
|
"lg",
|
|
3134
3134
|
"xl",
|
|
3135
3135
|
"full"
|
|
3136
|
-
],
|
|
3136
|
+
], En = [
|
|
3137
3137
|
"none",
|
|
3138
3138
|
"sm",
|
|
3139
3139
|
"md",
|
|
3140
3140
|
"lg"
|
|
3141
|
-
],
|
|
3141
|
+
], Dn = [
|
|
3142
3142
|
"start",
|
|
3143
3143
|
"center",
|
|
3144
3144
|
"end",
|
|
3145
3145
|
"between",
|
|
3146
3146
|
"around"
|
|
3147
|
-
],
|
|
3147
|
+
], On = [
|
|
3148
3148
|
"equal",
|
|
3149
3149
|
"sidebar",
|
|
3150
3150
|
"sidebar-end",
|
|
3151
3151
|
"wide-start",
|
|
3152
3152
|
"wide-end"
|
|
3153
|
-
],
|
|
3153
|
+
], kn = [
|
|
3154
3154
|
"none",
|
|
3155
3155
|
"sm",
|
|
3156
3156
|
"md",
|
|
3157
3157
|
"lg"
|
|
3158
|
-
],
|
|
3158
|
+
], An = ({ as: e = "div", gap: t = "md", align: n = "center", justify: r = "start", wrap: i = !0, className: a = "", children: o, ...s }) => /* @__PURE__ */ p(e, {
|
|
3159
3159
|
className: ["wc-inline", a].filter(Boolean).join(" "),
|
|
3160
3160
|
"data-gap": t,
|
|
3161
3161
|
"data-align": n,
|
|
@@ -3164,18 +3164,18 @@ var xn = [
|
|
|
3164
3164
|
...s,
|
|
3165
3165
|
children: o
|
|
3166
3166
|
});
|
|
3167
|
-
|
|
3167
|
+
An.displayName = "Inline", An.propTypes = {
|
|
3168
3168
|
as: $.default.elementType,
|
|
3169
|
-
gap: $.default.oneOf(
|
|
3170
|
-
align: $.default.oneOf(
|
|
3171
|
-
justify: $.default.oneOf(
|
|
3169
|
+
gap: $.default.oneOf(Cn),
|
|
3170
|
+
align: $.default.oneOf(wn),
|
|
3171
|
+
justify: $.default.oneOf(Dn),
|
|
3172
3172
|
wrap: $.default.bool,
|
|
3173
3173
|
className: $.default.string,
|
|
3174
3174
|
children: $.default.node
|
|
3175
3175
|
};
|
|
3176
3176
|
//#endregion
|
|
3177
3177
|
//#region src/components/Input/Input.jsx
|
|
3178
|
-
var
|
|
3178
|
+
var jn = ({ 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
3179
|
let [R, z] = d(!1), [B, V] = d(!!e), H = u(null), U = s(), W = k || U;
|
|
3180
3180
|
return o(() => {
|
|
3181
3181
|
V(!!e);
|
|
@@ -3246,28 +3246,28 @@ var kn = ({ value: e = "", onChange: t, type: n = "text", placeholder: r = "", d
|
|
|
3246
3246
|
]
|
|
3247
3247
|
});
|
|
3248
3248
|
};
|
|
3249
|
-
|
|
3249
|
+
jn.displayName = "Input";
|
|
3250
3250
|
//#endregion
|
|
3251
3251
|
//#region ../core/src/components/List/utils.jsx
|
|
3252
|
-
var
|
|
3252
|
+
var Mn = (e) => {
|
|
3253
3253
|
let { dense: t = !1, disablePadding: n = !1, variant: r, className: i = "" } = e, a = ["list"];
|
|
3254
3254
|
return t && a.push("list--dense"), n && a.push("list--no-padding"), r && a.push(`list--${r}`), i && a.push(i), a;
|
|
3255
|
-
},
|
|
3255
|
+
}, Nn = (e) => {
|
|
3256
3256
|
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
3257
|
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
|
-
},
|
|
3258
|
+
}, Pn = (e) => {
|
|
3259
3259
|
let { position: t = "start", className: n = "" } = e, r = ["list-item-icon"];
|
|
3260
3260
|
return t && r.push(`list-item-icon--${t}`), n && r.push(n), r;
|
|
3261
|
-
},
|
|
3261
|
+
}, Fn = (e) => {
|
|
3262
3262
|
let { inset: t = !1, className: n = "" } = e, r = ["list-item-text"];
|
|
3263
3263
|
return t && r.push("list-item-text--inset"), n && r.push(n), r;
|
|
3264
|
-
},
|
|
3265
|
-
let s =
|
|
3264
|
+
}, In = n({ dense: !1 }), Ln = ({ children: e, dense: t = !1, disablePadding: n = !1, nav: r = !1, subheader: i = "", className: a = "", ...o }) => {
|
|
3265
|
+
let s = Mn({
|
|
3266
3266
|
dense: t,
|
|
3267
3267
|
disablePadding: n,
|
|
3268
3268
|
className: a
|
|
3269
3269
|
}).concat(r ? "list--nav" : []).join(" ");
|
|
3270
|
-
return /* @__PURE__ */ p(
|
|
3270
|
+
return /* @__PURE__ */ p(In.Provider, {
|
|
3271
3271
|
value: { dense: t },
|
|
3272
3272
|
children: /* @__PURE__ */ m("div", {
|
|
3273
3273
|
role: r ? "navigation" : "list",
|
|
@@ -3279,8 +3279,8 @@ var An = (e) => {
|
|
|
3279
3279
|
}), e]
|
|
3280
3280
|
})
|
|
3281
3281
|
});
|
|
3282
|
-
},
|
|
3283
|
-
let { dense: d } = a(
|
|
3282
|
+
}, Rn = ({ 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 }) => {
|
|
3283
|
+
let { dense: d } = a(In) || { dense: !1 }, f = Nn({
|
|
3284
3284
|
button: t,
|
|
3285
3285
|
disabled: n,
|
|
3286
3286
|
divider: r,
|
|
@@ -3297,15 +3297,15 @@ var An = (e) => {
|
|
|
3297
3297
|
...u,
|
|
3298
3298
|
children: e
|
|
3299
3299
|
});
|
|
3300
|
-
},
|
|
3301
|
-
className:
|
|
3300
|
+
}, zn = ({ children: e, position: t = "start", className: n = "", ...r }) => /* @__PURE__ */ p("span", {
|
|
3301
|
+
className: Pn({
|
|
3302
3302
|
position: t,
|
|
3303
3303
|
className: n
|
|
3304
3304
|
}).join(" "),
|
|
3305
3305
|
...r,
|
|
3306
3306
|
children: e
|
|
3307
|
-
}),
|
|
3308
|
-
className:
|
|
3307
|
+
}), Bn = ({ primary: e = "", secondary: t = "", inset: n = !1, className: r = "", ...i }) => /* @__PURE__ */ m("div", {
|
|
3308
|
+
className: Fn({
|
|
3309
3309
|
inset: n,
|
|
3310
3310
|
className: r
|
|
3311
3311
|
}).join(" "),
|
|
@@ -3317,25 +3317,25 @@ var An = (e) => {
|
|
|
3317
3317
|
className: "list-item-text-secondary",
|
|
3318
3318
|
children: t
|
|
3319
3319
|
})]
|
|
3320
|
-
}),
|
|
3320
|
+
}), Vn = ({ size: e, variant: t, disabled: n, className: r }) => {
|
|
3321
3321
|
let i = [
|
|
3322
3322
|
"wc-menu",
|
|
3323
3323
|
`wc-menu--${e}`,
|
|
3324
3324
|
`wc-menu--${t}`
|
|
3325
3325
|
];
|
|
3326
3326
|
return n && i.push("wc-menu--disabled"), r && i.push(r), i;
|
|
3327
|
-
},
|
|
3327
|
+
}, Hn = (e, t) => [
|
|
3328
3328
|
"wc-menu__menu",
|
|
3329
3329
|
`wc-menu__menu--${e}`,
|
|
3330
3330
|
t
|
|
3331
|
-
],
|
|
3331
|
+
], Un = ({ disabled: e }) => ["wc-menu__button", e ? "wc-menu__button--disabled" : ""], Wn = (e) => {
|
|
3332
3332
|
let t = ["wc-menu__item"];
|
|
3333
3333
|
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
|
-
},
|
|
3334
|
+
}, Gn = (e) => ["wc-menu__arrow", e ? "wc-menu__arrow--open" : ""], Kn = (e, t, n, r, i) => {
|
|
3335
3335
|
t || (n(!e), e ? i && i() : r && r());
|
|
3336
|
-
},
|
|
3336
|
+
}, qn = (e, t, n, r, i) => {
|
|
3337
3337
|
e.disabled || e.divider || (n && n(e, t), r(!1), i && i());
|
|
3338
|
-
},
|
|
3338
|
+
}, Jn = (e) => {
|
|
3339
3339
|
let t = (t) => {
|
|
3340
3340
|
e(t);
|
|
3341
3341
|
};
|
|
@@ -3343,20 +3343,20 @@ var An = (e) => {
|
|
|
3343
3343
|
add: () => document.addEventListener("click", t),
|
|
3344
3344
|
remove: () => document.removeEventListener("click", t)
|
|
3345
3345
|
};
|
|
3346
|
-
},
|
|
3347
|
-
let [w, T] = d(!1), E = u(null), D = u(null), O =
|
|
3346
|
+
}, Yn = ({ 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 = Vn({
|
|
3348
3348
|
size: r,
|
|
3349
3349
|
variant: i,
|
|
3350
3350
|
disabled: a,
|
|
3351
3351
|
className: S
|
|
3352
|
-
}).join(" "), k =
|
|
3352
|
+
}).join(" "), k = Hn(n, i === "card" ? "wc-menu__menu--card" : "").join(" "), A = Un({ disabled: a }).join(" "), j = Gn(w).join(" "), M = i === "card" ? {
|
|
3353
3353
|
minWidth: "320px",
|
|
3354
3354
|
maxWidth: "450px"
|
|
3355
3355
|
} : { minWidth: "120px" }, N = () => {
|
|
3356
|
-
|
|
3356
|
+
Kn(w, a, T, _, v);
|
|
3357
3357
|
}, P = (e, t) => {
|
|
3358
|
-
|
|
3359
|
-
}, F =
|
|
3358
|
+
qn(e, t, g, T, v);
|
|
3359
|
+
}, F = Jn((e) => {
|
|
3360
3360
|
E.current && !E.current.contains(e.target) && (T(!1), v && v());
|
|
3361
3361
|
});
|
|
3362
3362
|
return o(() => (w ? F.add() : F.remove(), () => F.remove()), [w]), /* @__PURE__ */ m("div", {
|
|
@@ -3417,7 +3417,7 @@ var An = (e) => {
|
|
|
3417
3417
|
}, e.key || t) : /* @__PURE__ */ m("button", {
|
|
3418
3418
|
type: "button",
|
|
3419
3419
|
role: "menuitem",
|
|
3420
|
-
className:
|
|
3420
|
+
className: Wn(e).join(" "),
|
|
3421
3421
|
disabled: e.disabled,
|
|
3422
3422
|
onClick: () => P(e, t),
|
|
3423
3423
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
@@ -3435,7 +3435,7 @@ var An = (e) => {
|
|
|
3435
3435
|
}, e.key || t) : /* @__PURE__ */ m("button", {
|
|
3436
3436
|
type: "button",
|
|
3437
3437
|
role: "menuitem",
|
|
3438
|
-
className:
|
|
3438
|
+
className: Wn(e).join(" "),
|
|
3439
3439
|
disabled: e.disabled,
|
|
3440
3440
|
onClick: () => P(e, t),
|
|
3441
3441
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
@@ -3449,32 +3449,32 @@ var An = (e) => {
|
|
|
3449
3449
|
})]
|
|
3450
3450
|
});
|
|
3451
3451
|
};
|
|
3452
|
-
|
|
3452
|
+
Yn.displayName = "Menu";
|
|
3453
3453
|
//#endregion
|
|
3454
3454
|
//#region ../core/src/components/Modal/utils.js
|
|
3455
|
-
function
|
|
3455
|
+
function Xn({ size: e = "md", fullWidth: t = !1, fullScreen: n = !1, scroll: r = "paper", position: i = "center", className: a = "" } = {}) {
|
|
3456
3456
|
let o = ["wc-modal"];
|
|
3457
3457
|
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
3458
|
}
|
|
3459
|
-
function
|
|
3459
|
+
function Zn({ centered: e = !0, position: t = "center" } = {}) {
|
|
3460
3460
|
let n = ["wc-modal-overlay"];
|
|
3461
3461
|
return (e || t === "center") && n.push("wc-modal-overlay--centered"), t && t !== "center" && n.push(`wc-modal-overlay--${t}`), n.join(" ");
|
|
3462
3462
|
}
|
|
3463
|
-
function
|
|
3463
|
+
function Qn(e, t, n = 0) {
|
|
3464
3464
|
e(!1), t && (n > 0 ? setTimeout(() => {
|
|
3465
3465
|
t();
|
|
3466
3466
|
}, n) : t());
|
|
3467
3467
|
}
|
|
3468
|
-
function
|
|
3468
|
+
function $n(e, t, n) {
|
|
3469
3469
|
e.key === "Escape" && t && n();
|
|
3470
3470
|
}
|
|
3471
|
-
function
|
|
3471
|
+
function er(e) {
|
|
3472
3472
|
if (e) {
|
|
3473
3473
|
let t = e.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])");
|
|
3474
3474
|
t.length > 0 ? t[0].focus() : e.focus();
|
|
3475
3475
|
}
|
|
3476
3476
|
}
|
|
3477
|
-
function
|
|
3477
|
+
function tr(e) {
|
|
3478
3478
|
if (!e) return () => {};
|
|
3479
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
3480
|
e.key === "Tab" && (e.shiftKey ? document.activeElement === n && (e.preventDefault(), r?.focus()) : document.activeElement === r && (e.preventDefault(), n?.focus()));
|
|
@@ -3485,31 +3485,31 @@ function $n(e) {
|
|
|
3485
3485
|
}
|
|
3486
3486
|
//#endregion
|
|
3487
3487
|
//#region src/components/Modal/Modal.jsx
|
|
3488
|
-
var
|
|
3488
|
+
var nr = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWidth: i = null, closable: a = !0, showCloseButton: c = !0, maskClosable: l = !0, closeOnOverlay: f = !0, disableBackdropClick: h = !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 }) => {
|
|
3489
3489
|
let M = s(), [N, P] = d(e || t), F = u(null), I = u(null), L = u(null), R = e || t;
|
|
3490
3490
|
o(() => {
|
|
3491
3491
|
P(R);
|
|
3492
3492
|
}, [R]);
|
|
3493
|
-
let z =
|
|
3493
|
+
let z = Xn({
|
|
3494
3494
|
size: i || r,
|
|
3495
3495
|
fullWidth: y,
|
|
3496
3496
|
fullScreen: b,
|
|
3497
3497
|
scroll: S,
|
|
3498
3498
|
position: x,
|
|
3499
3499
|
className: E
|
|
3500
|
-
}), B =
|
|
3500
|
+
}), B = Zn({
|
|
3501
3501
|
centered: x === "center" || v,
|
|
3502
3502
|
position: x
|
|
3503
3503
|
}), V = () => {
|
|
3504
|
-
|
|
3504
|
+
Qn(P, D);
|
|
3505
3505
|
}, H = () => {
|
|
3506
3506
|
l && f && !h && V();
|
|
3507
3507
|
}, U = (e) => {
|
|
3508
|
-
|
|
3508
|
+
$n(e, a && !_, V);
|
|
3509
3509
|
};
|
|
3510
3510
|
if (o(() => {
|
|
3511
3511
|
if (N) return I.current = document.activeElement, setTimeout(() => {
|
|
3512
|
-
F.current && (
|
|
3512
|
+
F.current && (er(F.current), L.current = tr(F.current));
|
|
3513
3513
|
}, 100), document.addEventListener("keydown", U), C && (document.body.style.overflow = "hidden"), () => {
|
|
3514
3514
|
document.removeEventListener("keydown", U), L.current &&= (L.current(), null), I.current && I.current.focus && I.current.focus(), C && (document.body.style.overflow = "");
|
|
3515
3515
|
};
|
|
@@ -3535,7 +3535,7 @@ var er = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3535
3535
|
tabIndex: -1,
|
|
3536
3536
|
...j,
|
|
3537
3537
|
children: [
|
|
3538
|
-
W && /* @__PURE__ */ p(
|
|
3538
|
+
W && /* @__PURE__ */ p(Ve, {
|
|
3539
3539
|
variant: "text",
|
|
3540
3540
|
size: "sm",
|
|
3541
3541
|
className: "wc-modal__close",
|
|
@@ -3567,10 +3567,10 @@ var er = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3567
3567
|
})]
|
|
3568
3568
|
}), document.body);
|
|
3569
3569
|
};
|
|
3570
|
-
|
|
3570
|
+
nr.displayName = "Modal";
|
|
3571
3571
|
//#endregion
|
|
3572
3572
|
//#region src/components/NumberAnimation/NumberAnimation.jsx
|
|
3573
|
-
var
|
|
3573
|
+
var rr = ({ 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
3574
|
let [b, x] = d(n), [S, C] = d(!1), w = u(null), T = u(null), E = (i) => {
|
|
3575
3575
|
w.current === null && (w.current = i);
|
|
3576
3576
|
let a = Math.min((i - w.current) / t, 1);
|
|
@@ -3616,7 +3616,7 @@ var tr = ({ active: e = !0, duration: t = 3e3, from: n = 0, to: r, locale: i = "
|
|
|
3616
3616
|
};
|
|
3617
3617
|
//#endregion
|
|
3618
3618
|
//#region src/components/Pagination/Pagination.jsx
|
|
3619
|
-
function
|
|
3619
|
+
function ir({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCount: a = 1, boundaryCount: s = 1, size: c = "md", className: u = "", ...f }) {
|
|
3620
3620
|
let [h, g] = d(e);
|
|
3621
3621
|
o(() => {
|
|
3622
3622
|
g(e);
|
|
@@ -3711,38 +3711,38 @@ function nr({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCoun
|
|
|
3711
3711
|
}
|
|
3712
3712
|
//#endregion
|
|
3713
3713
|
//#region src/components/Page/Page.jsx
|
|
3714
|
-
var
|
|
3714
|
+
var ar = ({ as: e = "div", size: t = "lg", gutter: n = "md", className: r = "", children: i, ...a }) => /* @__PURE__ */ p(e, {
|
|
3715
3715
|
className: ["wc-page", r].filter(Boolean).join(" "),
|
|
3716
3716
|
"data-size": t,
|
|
3717
3717
|
"data-gutter": n,
|
|
3718
3718
|
...a,
|
|
3719
3719
|
children: i
|
|
3720
3720
|
});
|
|
3721
|
-
|
|
3721
|
+
ar.displayName = "Page", ar.propTypes = {
|
|
3722
3722
|
as: $.default.elementType,
|
|
3723
|
-
size: $.default.oneOf(
|
|
3724
|
-
gutter: $.default.oneOf(
|
|
3723
|
+
size: $.default.oneOf(Tn),
|
|
3724
|
+
gutter: $.default.oneOf(En),
|
|
3725
3725
|
className: $.default.string,
|
|
3726
3726
|
children: $.default.node
|
|
3727
3727
|
};
|
|
3728
3728
|
//#endregion
|
|
3729
3729
|
//#region ../core/src/components/Paper/utils.jsx
|
|
3730
|
-
var
|
|
3730
|
+
var or = {
|
|
3731
3731
|
ELEVATION: "elevation",
|
|
3732
3732
|
OUTLINED: "outlined"
|
|
3733
|
-
},
|
|
3733
|
+
}, sr = {
|
|
3734
3734
|
SQUARE: "square",
|
|
3735
3735
|
ROUNDED_SM: "rounded-sm",
|
|
3736
3736
|
ROUNDED_LG: "rounded-lg",
|
|
3737
3737
|
ROUNDED_XL: "rounded-xl",
|
|
3738
3738
|
ROUNDED_2XL: "rounded-2xl",
|
|
3739
3739
|
ROUNDED_FULL: "rounded-full"
|
|
3740
|
-
},
|
|
3740
|
+
}, cr = {
|
|
3741
3741
|
SM: "sm",
|
|
3742
3742
|
MD: "md",
|
|
3743
3743
|
LG: "lg",
|
|
3744
3744
|
XL: "xl"
|
|
3745
|
-
},
|
|
3745
|
+
}, lr = {
|
|
3746
3746
|
DEFAULT: "default",
|
|
3747
3747
|
PRIMARY: "primary",
|
|
3748
3748
|
SUCCESS: "success",
|
|
@@ -3750,21 +3750,21 @@ var ir = {
|
|
|
3750
3750
|
ERROR: "error",
|
|
3751
3751
|
INFO: "info"
|
|
3752
3752
|
};
|
|
3753
|
-
function
|
|
3754
|
-
let { variant: t =
|
|
3755
|
-
if (t ===
|
|
3753
|
+
function ur(e = {}) {
|
|
3754
|
+
let { variant: t = or.ELEVATION, elevation: n = 1, square: r = !1, shape: i = null, size: a = null, color: o = lr.DEFAULT, hoverable: s = !1, clickable: c = !1, gradient: l = !1, frosted: u = !1, textured: d = !1, className: f = "" } = e, p = ["wc-paper"];
|
|
3755
|
+
if (t === or.OUTLINED) p.push("wc-paper--outlined");
|
|
3756
3756
|
else {
|
|
3757
3757
|
p.push("wc-paper--elevation");
|
|
3758
3758
|
let e = Math.max(0, Math.min(24, Math.floor(Number(n) || 0)));
|
|
3759
3759
|
p.push(`wc-paper--elevation-${e}`);
|
|
3760
3760
|
}
|
|
3761
|
-
return r ? p.push("wc-paper--square") : i &&
|
|
3761
|
+
return r ? p.push("wc-paper--square") : i && sr[i.toUpperCase()] && p.push(`wc-paper--${i}`), a && cr[a.toUpperCase()] && p.push(`wc-paper--${a}`), o !== lr.DEFAULT && lr[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
3762
|
}
|
|
3763
3763
|
//#endregion
|
|
3764
3764
|
//#region src/components/Paper/Paper.jsx
|
|
3765
|
-
function
|
|
3765
|
+
function dr({ 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
3766
|
return /* @__PURE__ */ p(e, {
|
|
3767
|
-
className:
|
|
3767
|
+
className: ur({
|
|
3768
3768
|
variant: t,
|
|
3769
3769
|
elevation: Math.max(0, Math.min(24, Math.floor(Number(n) || 0))),
|
|
3770
3770
|
square: r,
|
|
@@ -3795,7 +3795,7 @@ function lr({ component: e = "div", variant: t = "elevation", elevation: n = 1,
|
|
|
3795
3795
|
}
|
|
3796
3796
|
//#endregion
|
|
3797
3797
|
//#region src/components/Popover/Popover.jsx
|
|
3798
|
-
function
|
|
3798
|
+
function fr({ open: t, onOpenChange: n, triggerText: r = "打开弹窗", trigger: a, placement: c = "bottom", offset: l = 8, children: f, className: g = "" }) {
|
|
3799
3799
|
let _ = s(), [v, y] = d(!1), b = t != null, x = u(null), S = u(null), C = b ? t : v, w = (e) => {
|
|
3800
3800
|
b || y(e), n?.(e);
|
|
3801
3801
|
}, T = () => w(!1), E = () => {
|
|
@@ -3858,7 +3858,7 @@ function ur({ open: t, onOpenChange: n, triggerText: r = "打开弹窗", trigger
|
|
|
3858
3858
|
}
|
|
3859
3859
|
//#endregion
|
|
3860
3860
|
//#region src/components/PricingTable/PricingTable.jsx
|
|
3861
|
-
function
|
|
3861
|
+
function pr({ plans: e = [], columns: t = 3, className: n = "" }) {
|
|
3862
3862
|
let r = { gridTemplateColumns: `repeat(${t}, minmax(0,1fr))` };
|
|
3863
3863
|
return /* @__PURE__ */ p("div", {
|
|
3864
3864
|
className: `pricing-grid ${n}`.trim(),
|
|
@@ -3888,7 +3888,7 @@ function dr({ plans: e = [], columns: t = 3, className: n = "" }) {
|
|
|
3888
3888
|
}
|
|
3889
3889
|
//#endregion
|
|
3890
3890
|
//#region src/components/Progress/Progress.jsx
|
|
3891
|
-
var
|
|
3891
|
+
var mr = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primary", size: i = "md", animated: a = !1, className: o = "", ...s }) => {
|
|
3892
3892
|
let c = [
|
|
3893
3893
|
"primary",
|
|
3894
3894
|
"success",
|
|
@@ -3929,11 +3929,11 @@ var fr = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primar
|
|
|
3929
3929
|
})]
|
|
3930
3930
|
});
|
|
3931
3931
|
};
|
|
3932
|
-
|
|
3932
|
+
mr.displayName = "Progress";
|
|
3933
3933
|
//#endregion
|
|
3934
3934
|
//#region src/components/Radio/Radio.jsx
|
|
3935
|
-
var
|
|
3936
|
-
function
|
|
3935
|
+
var hr = n(null);
|
|
3936
|
+
function gr({ 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
3937
|
let [_, v] = d(e), y = e !== void 0, b = y ? e : _, x = i((e) => {
|
|
3938
3938
|
r || (y || v(e), t?.(e));
|
|
3939
3939
|
}, [
|
|
@@ -3941,7 +3941,7 @@ function mr({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", r
|
|
|
3941
3941
|
y,
|
|
3942
3942
|
t
|
|
3943
3943
|
]), 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(
|
|
3944
|
+
return /* @__PURE__ */ p(hr.Provider, {
|
|
3945
3945
|
value: {
|
|
3946
3946
|
value: b,
|
|
3947
3947
|
updateValue: x,
|
|
@@ -3978,8 +3978,8 @@ function mr({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", r
|
|
|
3978
3978
|
})
|
|
3979
3979
|
});
|
|
3980
3980
|
}
|
|
3981
|
-
function
|
|
3982
|
-
let h = a(
|
|
3981
|
+
function _r({ value: e, checked: t, onChange: n, label: r, name: i, disabled: o = !1, color: s = "primary", size: c = "md", className: l = "", children: u, ...f }) {
|
|
3982
|
+
let h = a(hr), 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
3983
|
"wc-radio",
|
|
3984
3984
|
`wc-radio--${y}`,
|
|
3985
3985
|
v && "wc-radio--disabled",
|
|
@@ -4020,10 +4020,10 @@ function hr({ value: e, checked: t, onChange: n, label: r, name: i, disabled: o
|
|
|
4020
4020
|
]
|
|
4021
4021
|
});
|
|
4022
4022
|
}
|
|
4023
|
-
|
|
4023
|
+
_r.displayName = "Radio", gr.displayName = "RadioGroup";
|
|
4024
4024
|
//#endregion
|
|
4025
4025
|
//#region src/components/Rating/Rating.jsx
|
|
4026
|
-
var
|
|
4026
|
+
var vr = ({ value: e = 0, max: t = 5, readOnly: n = !1, onChange: r = () => {}, className: i = "", style: a = {}, ...s }) => {
|
|
4027
4027
|
let [c, l] = d(0), [u, f] = d(e);
|
|
4028
4028
|
o(() => f(e), [e]);
|
|
4029
4029
|
let m = (e) => {
|
|
@@ -4054,10 +4054,10 @@ var gr = ({ value: e = 0, max: t = 5, readOnly: n = !1, onChange: r = () => {},
|
|
|
4054
4054
|
})
|
|
4055
4055
|
});
|
|
4056
4056
|
};
|
|
4057
|
-
|
|
4057
|
+
vr.displayName = "Rating";
|
|
4058
4058
|
//#endregion
|
|
4059
4059
|
//#region src/components/Select/Select.jsx
|
|
4060
|
-
var
|
|
4060
|
+
var yr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Select an option", label: i = "", helperText: a = "", error: c = !1, errorMessage: l = "", required: f = !1, disabled: h = !1, multiple: g = !1, clearable: _ = !1, fullWidth: v = !1, size: y = "md", variant: b = "filled", color: x = "primary", maxHeight: S = 200, name: C = "", id: w = "", className: T = "", style: E = {}, onFocus: D, onBlur: O, onSearch: k, renderOption: A, renderValue: j, ...M }) => {
|
|
4061
4061
|
let [N, P] = d(!1), [F, I] = d(!1), L = u(null), R = u(null);
|
|
4062
4062
|
o(() => {
|
|
4063
4063
|
let e = (e) => {
|
|
@@ -4090,13 +4090,13 @@ var _r = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4090
4090
|
} });
|
|
4091
4091
|
}, W = (e) => {
|
|
4092
4092
|
I(!0), D?.(e);
|
|
4093
|
-
},
|
|
4093
|
+
}, G = (e) => {
|
|
4094
4094
|
setTimeout(() => {
|
|
4095
4095
|
L.current?.contains(document.activeElement) || (I(!1), O?.(e));
|
|
4096
4096
|
}, 100);
|
|
4097
|
-
},
|
|
4097
|
+
}, ee = (e) => {
|
|
4098
4098
|
h || (e.key === "Enter" || e.key === " " ? (e.preventDefault(), V()) : e.key === "Escape" && (P(!1), I(!1)));
|
|
4099
|
-
},
|
|
4099
|
+
}, te = () => g && Array.isArray(z) ? z.length === 0 ? /* @__PURE__ */ p("span", {
|
|
4100
4100
|
className: "wc-select__placeholder",
|
|
4101
4101
|
children: r
|
|
4102
4102
|
}) : /* @__PURE__ */ p("div", {
|
|
@@ -4108,50 +4108,50 @@ var _r = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4108
4108
|
}) : z ? j ? j(z) : z.label || z.value : /* @__PURE__ */ p("span", {
|
|
4109
4109
|
className: "wc-select__placeholder",
|
|
4110
4110
|
children: r
|
|
4111
|
-
}),
|
|
4111
|
+
}), K = () => {
|
|
4112
4112
|
let e = ["wc-select__label"];
|
|
4113
4113
|
return e.push(`wc-select__label--${y}`), c && e.push("wc-select__label--error"), (F || z) && e.push("wc-select__label--active"), e.join(" ");
|
|
4114
|
-
},
|
|
4114
|
+
}, q = () => {
|
|
4115
4115
|
let e = ["wc-select__container"];
|
|
4116
4116
|
return e.push(`wc-select__container--${b}`), e.push(`wc-select__container--${y}`), h && e.push("wc-select__container--disabled"), c && e.push("wc-select__container--error"), F && e.push("wc-select__container--focused"), N && e.push("wc-select__container--open"), e.join(" ");
|
|
4117
|
-
},
|
|
4117
|
+
}, J = (e, t) => {
|
|
4118
4118
|
let n = ["wc-select__option"];
|
|
4119
4119
|
return t && n.push("wc-select__option--selected"), e.disabled && n.push("wc-select__option--disabled"), n.join(" ");
|
|
4120
|
-
},
|
|
4120
|
+
}, Y = s(), ne = w || C || Y;
|
|
4121
4121
|
return /* @__PURE__ */ m("div", {
|
|
4122
4122
|
className: B(),
|
|
4123
4123
|
style: E,
|
|
4124
4124
|
ref: L,
|
|
4125
4125
|
children: [
|
|
4126
4126
|
i && /* @__PURE__ */ m("label", {
|
|
4127
|
-
htmlFor:
|
|
4128
|
-
id: `${
|
|
4129
|
-
className:
|
|
4127
|
+
htmlFor: ne,
|
|
4128
|
+
id: `${ne}-label`,
|
|
4129
|
+
className: K(),
|
|
4130
4130
|
children: [i, f && /* @__PURE__ */ p("span", {
|
|
4131
4131
|
className: "wc-select__required",
|
|
4132
4132
|
children: "*"
|
|
4133
4133
|
})]
|
|
4134
4134
|
}),
|
|
4135
4135
|
/* @__PURE__ */ m("div", {
|
|
4136
|
-
className:
|
|
4136
|
+
className: q(),
|
|
4137
4137
|
children: [/* @__PURE__ */ m("div", {
|
|
4138
4138
|
className: "wc-select__control",
|
|
4139
|
-
id:
|
|
4139
|
+
id: ne,
|
|
4140
4140
|
onClick: V,
|
|
4141
4141
|
onFocus: W,
|
|
4142
|
-
onBlur:
|
|
4143
|
-
onKeyDown:
|
|
4142
|
+
onBlur: G,
|
|
4143
|
+
onKeyDown: ee,
|
|
4144
4144
|
tabIndex: h ? -1 : 0,
|
|
4145
4145
|
role: "combobox",
|
|
4146
4146
|
"aria-expanded": N,
|
|
4147
4147
|
"aria-haspopup": "listbox",
|
|
4148
|
-
"aria-labelledby": i ? `${
|
|
4149
|
-
"aria-controls": `${
|
|
4148
|
+
"aria-labelledby": i ? `${ne}-label` : void 0,
|
|
4149
|
+
"aria-controls": `${ne}-options`,
|
|
4150
4150
|
"aria-disabled": h,
|
|
4151
4151
|
"aria-required": f,
|
|
4152
4152
|
children: [/* @__PURE__ */ p("div", {
|
|
4153
4153
|
className: "wc-select__value",
|
|
4154
|
-
children:
|
|
4154
|
+
children: te()
|
|
4155
4155
|
}), /* @__PURE__ */ m("div", {
|
|
4156
4156
|
className: "wc-select__indicators",
|
|
4157
4157
|
children: [_ && (z || g && e?.length > 0) && /* @__PURE__ */ p("button", {
|
|
@@ -4167,7 +4167,7 @@ var _r = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4167
4167
|
})]
|
|
4168
4168
|
}), N && /* @__PURE__ */ p("div", {
|
|
4169
4169
|
className: "wc-select__dropdown",
|
|
4170
|
-
id: `${
|
|
4170
|
+
id: `${ne}-options`,
|
|
4171
4171
|
style: { maxHeight: S },
|
|
4172
4172
|
ref: R,
|
|
4173
4173
|
children: /* @__PURE__ */ p("div", {
|
|
@@ -4179,7 +4179,7 @@ var _r = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4179
4179
|
}) : n.map((t, n) => {
|
|
4180
4180
|
let r = g ? Array.isArray(e) && e.includes(t.value) : e === t.value;
|
|
4181
4181
|
return /* @__PURE__ */ m("div", {
|
|
4182
|
-
className:
|
|
4182
|
+
className: J(t, r),
|
|
4183
4183
|
onClick: () => H(t),
|
|
4184
4184
|
role: "option",
|
|
4185
4185
|
"aria-selected": r,
|
|
@@ -4209,17 +4209,17 @@ var _r = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4209
4209
|
]
|
|
4210
4210
|
});
|
|
4211
4211
|
};
|
|
4212
|
-
|
|
4212
|
+
yr.displayName = "Select";
|
|
4213
4213
|
//#endregion
|
|
4214
4214
|
//#region src/components/Skeleton/Skeleton.jsx
|
|
4215
|
-
var
|
|
4215
|
+
var br = {
|
|
4216
4216
|
text: "wc-skeleton--text",
|
|
4217
4217
|
rectangular: "wc-skeleton--rectangular",
|
|
4218
4218
|
rounded: "wc-skeleton--rounded",
|
|
4219
4219
|
circular: "wc-skeleton--circular"
|
|
4220
|
-
},
|
|
4220
|
+
}, xr = ({ animation: e = "pulse", component: t = "div", height: n, width: r, variant: i = "text", style: a = {}, className: o = "", ...s }) => {
|
|
4221
4221
|
let c = l(() => {
|
|
4222
|
-
let t = ["wc-skeleton",
|
|
4222
|
+
let t = ["wc-skeleton", br[i] || br.text];
|
|
4223
4223
|
return e === "pulse" && t.push("wc-skeleton--pulse"), e === "wave" && t.push("wc-skeleton--wave"), t.join(" ");
|
|
4224
4224
|
}, [e, i]), u = { ...a };
|
|
4225
4225
|
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 +4231,7 @@ var vr = {
|
|
|
4231
4231
|
"aria-busy": "true",
|
|
4232
4232
|
...s
|
|
4233
4233
|
});
|
|
4234
|
-
},
|
|
4234
|
+
}, Sr = ({ 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
4235
|
let [v, y] = d(e === void 0 ? t : e), b = s();
|
|
4236
4236
|
o(() => {
|
|
4237
4237
|
e !== void 0 && y(e);
|
|
@@ -4278,10 +4278,10 @@ var vr = {
|
|
|
4278
4278
|
})]
|
|
4279
4279
|
});
|
|
4280
4280
|
};
|
|
4281
|
-
|
|
4281
|
+
Sr.displayName = "Slider";
|
|
4282
4282
|
//#endregion
|
|
4283
4283
|
//#region src/components/SlideOver/SlideOver.jsx
|
|
4284
|
-
var
|
|
4284
|
+
var Cr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width: r = 400, children: i, header: a, footer: s }) => {
|
|
4285
4285
|
let c = u(null), l = u(null);
|
|
4286
4286
|
return o(() => {
|
|
4287
4287
|
if (!e) return;
|
|
@@ -4333,7 +4333,7 @@ var xr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4333
4333
|
]
|
|
4334
4334
|
})]
|
|
4335
4335
|
}) : null, document.body);
|
|
4336
|
-
},
|
|
4336
|
+
}, wr = ({ as: e = "div", ratio: t = "equal", gap: n = "xl", align: r = "stretch", collapse: i = "md", className: a = "", children: o, ...s }) => /* @__PURE__ */ p(e, {
|
|
4337
4337
|
className: ["wc-split", a].filter(Boolean).join(" "),
|
|
4338
4338
|
"data-ratio": t,
|
|
4339
4339
|
"data-gap": n,
|
|
@@ -4342,34 +4342,34 @@ var xr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4342
4342
|
...s,
|
|
4343
4343
|
children: o
|
|
4344
4344
|
});
|
|
4345
|
-
|
|
4345
|
+
wr.displayName = "Split", wr.propTypes = {
|
|
4346
4346
|
as: $.default.elementType,
|
|
4347
|
-
ratio: $.default.oneOf(
|
|
4348
|
-
gap: $.default.oneOf(
|
|
4349
|
-
align: $.default.oneOf(
|
|
4350
|
-
collapse: $.default.oneOf(
|
|
4347
|
+
ratio: $.default.oneOf(On),
|
|
4348
|
+
gap: $.default.oneOf(Cn),
|
|
4349
|
+
align: $.default.oneOf(wn),
|
|
4350
|
+
collapse: $.default.oneOf(kn),
|
|
4351
4351
|
className: $.default.string,
|
|
4352
4352
|
children: $.default.node
|
|
4353
4353
|
};
|
|
4354
4354
|
//#endregion
|
|
4355
4355
|
//#region src/components/Stack/Stack.jsx
|
|
4356
|
-
var
|
|
4356
|
+
var Tr = ({ as: e = "div", gap: t = "md", align: n = "stretch", className: r = "", children: i, ...a }) => /* @__PURE__ */ p(e, {
|
|
4357
4357
|
className: ["wc-stack", r].filter(Boolean).join(" "),
|
|
4358
4358
|
"data-gap": t,
|
|
4359
4359
|
"data-align": n,
|
|
4360
4360
|
...a,
|
|
4361
4361
|
children: i
|
|
4362
4362
|
});
|
|
4363
|
-
|
|
4363
|
+
Tr.displayName = "Stack", Tr.propTypes = {
|
|
4364
4364
|
as: $.default.elementType,
|
|
4365
|
-
gap: $.default.oneOf(
|
|
4366
|
-
align: $.default.oneOf(
|
|
4365
|
+
gap: $.default.oneOf(Cn),
|
|
4366
|
+
align: $.default.oneOf(wn),
|
|
4367
4367
|
className: $.default.string,
|
|
4368
4368
|
children: $.default.node
|
|
4369
4369
|
};
|
|
4370
4370
|
//#endregion
|
|
4371
4371
|
//#region src/components/Snackbar/Snackbar.jsx
|
|
4372
|
-
var
|
|
4372
|
+
var Er = ({ severity: e }) => {
|
|
4373
4373
|
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
4374
|
return /* @__PURE__ */ m("svg", {
|
|
4375
4375
|
viewBox: "0 0 20 20",
|
|
@@ -4386,7 +4386,7 @@ var wr = ({ severity: e }) => {
|
|
|
4386
4386
|
}), t]
|
|
4387
4387
|
});
|
|
4388
4388
|
};
|
|
4389
|
-
function
|
|
4389
|
+
function Dr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r = "", severity: i = "info", variant: a = "standard", autoHideDuration: s = 6e3, anchorOrigin: c = {
|
|
4390
4390
|
vertical: "bottom",
|
|
4391
4391
|
horizontal: "left"
|
|
4392
4392
|
}, action: l = "", closable: u = !0, showIcon: f = !0, showProgress: h = !1, onClose: _ = () => {}, onUpdateModelValue: v, onAction: y = () => {}, children: b }) {
|
|
@@ -4437,7 +4437,7 @@ function Tr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4437
4437
|
children: [
|
|
4438
4438
|
f && /* @__PURE__ */ p("div", {
|
|
4439
4439
|
className: "wc-snackbar__icon",
|
|
4440
|
-
children: /* @__PURE__ */ p(
|
|
4440
|
+
children: /* @__PURE__ */ p(Er, { severity: i })
|
|
4441
4441
|
}),
|
|
4442
4442
|
/* @__PURE__ */ m("div", {
|
|
4443
4443
|
className: "wc-snackbar__content",
|
|
@@ -4485,7 +4485,7 @@ function Tr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4485
4485
|
}
|
|
4486
4486
|
//#endregion
|
|
4487
4487
|
//#region ../core/src/components/Status/utils.js
|
|
4488
|
-
var
|
|
4488
|
+
var Or = [
|
|
4489
4489
|
"default",
|
|
4490
4490
|
"success",
|
|
4491
4491
|
"error",
|
|
@@ -4494,7 +4494,7 @@ var Er = [
|
|
|
4494
4494
|
"pending",
|
|
4495
4495
|
"processing",
|
|
4496
4496
|
"cancelled"
|
|
4497
|
-
],
|
|
4497
|
+
], kr = [
|
|
4498
4498
|
"auto",
|
|
4499
4499
|
"pulse",
|
|
4500
4500
|
"spin",
|
|
@@ -4504,7 +4504,7 @@ var Er = [
|
|
|
4504
4504
|
"breathe",
|
|
4505
4505
|
"ripple",
|
|
4506
4506
|
"glow"
|
|
4507
|
-
],
|
|
4507
|
+
], Ar = {
|
|
4508
4508
|
default: {
|
|
4509
4509
|
text: "默认",
|
|
4510
4510
|
color: "var(--wc-text-tertiary)"
|
|
@@ -4538,29 +4538,29 @@ var Er = [
|
|
|
4538
4538
|
color: "var(--wc-text-disabled)"
|
|
4539
4539
|
}
|
|
4540
4540
|
};
|
|
4541
|
-
function
|
|
4542
|
-
return
|
|
4541
|
+
function jr(e) {
|
|
4542
|
+
return Or.includes(e);
|
|
4543
4543
|
}
|
|
4544
|
-
function
|
|
4545
|
-
return
|
|
4544
|
+
function Mr(e) {
|
|
4545
|
+
return jr(e) ? e : "default";
|
|
4546
4546
|
}
|
|
4547
|
-
function
|
|
4548
|
-
let o =
|
|
4547
|
+
function Nr({ status: e, size: t, showText: n, animated: r, animationType: i = "auto", className: a }) {
|
|
4548
|
+
let o = Mr(e), s = [
|
|
4549
4549
|
"wc-status",
|
|
4550
4550
|
`wc-status--${o}`,
|
|
4551
4551
|
`wc-status--${t}`
|
|
4552
4552
|
];
|
|
4553
4553
|
if (n && s.push("wc-status--with-text"), r) {
|
|
4554
|
-
let e =
|
|
4554
|
+
let e = Fr(o, i);
|
|
4555
4555
|
s.push("wc-status--animated", `wc-status--${e}`);
|
|
4556
4556
|
}
|
|
4557
4557
|
return a && s.push(a), s.filter(Boolean).join(" ");
|
|
4558
4558
|
}
|
|
4559
|
-
function
|
|
4560
|
-
return
|
|
4559
|
+
function Pr(e) {
|
|
4560
|
+
return Ar[e]?.text || Ar.default.text;
|
|
4561
4561
|
}
|
|
4562
|
-
function
|
|
4563
|
-
return t !== "auto" &&
|
|
4562
|
+
function Fr(e, t = "auto") {
|
|
4563
|
+
return t !== "auto" && kr.includes(t) ? t : {
|
|
4564
4564
|
processing: "spin",
|
|
4565
4565
|
pending: "pulse",
|
|
4566
4566
|
success: "bounce",
|
|
@@ -4573,15 +4573,15 @@ function Nr(e, t = "auto") {
|
|
|
4573
4573
|
}
|
|
4574
4574
|
//#endregion
|
|
4575
4575
|
//#region src/components/Status/Status.jsx
|
|
4576
|
-
var
|
|
4577
|
-
let s =
|
|
4576
|
+
var Ir = ({ status: e = "default", size: t = "md", showText: n = !1, animated: r = !1, animationType: i = "auto", className: a = "", ...o }) => {
|
|
4577
|
+
let s = Nr({
|
|
4578
4578
|
status: e,
|
|
4579
4579
|
size: t,
|
|
4580
4580
|
showText: n,
|
|
4581
4581
|
animated: r,
|
|
4582
4582
|
animationType: i,
|
|
4583
4583
|
className: a
|
|
4584
|
-
}), c =
|
|
4584
|
+
}), c = Pr(e);
|
|
4585
4585
|
return /* @__PURE__ */ p("span", {
|
|
4586
4586
|
className: s,
|
|
4587
4587
|
title: c,
|
|
@@ -4593,10 +4593,10 @@ var Pr = ({ status: e = "default", size: t = "md", showText: n = !1, animated: r
|
|
|
4593
4593
|
})
|
|
4594
4594
|
});
|
|
4595
4595
|
};
|
|
4596
|
-
|
|
4596
|
+
Ir.displayName = "Status";
|
|
4597
4597
|
//#endregion
|
|
4598
4598
|
//#region src/components/Switch/Switch.jsx
|
|
4599
|
-
var
|
|
4599
|
+
var Lr = ({ 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
4600
|
let d = s(), f = `${d}-input`, h = [
|
|
4601
4601
|
"primary",
|
|
4602
4602
|
"success",
|
|
@@ -4657,20 +4657,20 @@ var Fr = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", di
|
|
|
4657
4657
|
})]
|
|
4658
4658
|
});
|
|
4659
4659
|
};
|
|
4660
|
-
|
|
4660
|
+
Lr.displayName = "Switch";
|
|
4661
4661
|
//#endregion
|
|
4662
4662
|
//#region src/components/Table/Table.jsx
|
|
4663
|
-
var
|
|
4663
|
+
var Rr = n({
|
|
4664
4664
|
size: "md",
|
|
4665
4665
|
dense: !1,
|
|
4666
4666
|
hover: !1,
|
|
4667
4667
|
striped: !1
|
|
4668
|
-
}),
|
|
4668
|
+
}), zr = ({ size: e = "md", stickyHeader: t = !1, dense: n = !1, hover: r = !1, striped: i = !1, children: a, className: o = "", ...s }) => /* @__PURE__ */ p("div", {
|
|
4669
4669
|
className: `wc-table-container${t ? " wc-table-container--sticky" : ""} ${o}`,
|
|
4670
4670
|
...s,
|
|
4671
4671
|
children: /* @__PURE__ */ p("table", {
|
|
4672
4672
|
className: `wc-table wc-table--${e}${r ? " wc-table--hover" : ""}${i ? " wc-table--striped" : ""}${n ? " wc-table--dense" : ""}`,
|
|
4673
|
-
children: /* @__PURE__ */ p(
|
|
4673
|
+
children: /* @__PURE__ */ p(Rr.Provider, {
|
|
4674
4674
|
value: {
|
|
4675
4675
|
size: e,
|
|
4676
4676
|
dense: n,
|
|
@@ -4682,24 +4682,24 @@ var Ir = n({
|
|
|
4682
4682
|
})
|
|
4683
4683
|
})
|
|
4684
4684
|
});
|
|
4685
|
-
|
|
4686
|
-
var
|
|
4687
|
-
let { stickyHeader: r } = a(
|
|
4685
|
+
zr.displayName = "Table";
|
|
4686
|
+
var Br = ({ children: e, className: t = "", ...n }) => {
|
|
4687
|
+
let { stickyHeader: r } = a(Rr);
|
|
4688
4688
|
return /* @__PURE__ */ p("thead", {
|
|
4689
4689
|
className: `wc-table-head${r ? " wc-table-head--sticky" : ""} ${t}`,
|
|
4690
4690
|
...n,
|
|
4691
4691
|
children: e
|
|
4692
4692
|
});
|
|
4693
4693
|
};
|
|
4694
|
-
|
|
4695
|
-
var
|
|
4694
|
+
Br.displayName = "TableHead";
|
|
4695
|
+
var Vr = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ p("tbody", {
|
|
4696
4696
|
className: `wc-table-body ${t}`,
|
|
4697
4697
|
...n,
|
|
4698
4698
|
children: e
|
|
4699
4699
|
});
|
|
4700
|
-
|
|
4701
|
-
var
|
|
4702
|
-
let c = a(
|
|
4700
|
+
Vr.displayName = "TableBody";
|
|
4701
|
+
var Hr = ({ hover: e, selected: t = !1, clickable: n = !1, children: r, className: i = "", onClick: o, ...s }) => {
|
|
4702
|
+
let c = a(Rr);
|
|
4703
4703
|
return /* @__PURE__ */ p("tr", {
|
|
4704
4704
|
className: [
|
|
4705
4705
|
"wc-table-row",
|
|
@@ -4713,9 +4713,9 @@ var Br = ({ hover: e, selected: t = !1, clickable: n = !1, children: r, classNam
|
|
|
4713
4713
|
children: r
|
|
4714
4714
|
});
|
|
4715
4715
|
};
|
|
4716
|
-
|
|
4717
|
-
var
|
|
4718
|
-
let d = a(
|
|
4716
|
+
Hr.displayName = "TableRow";
|
|
4717
|
+
var Ur = ({ component: e = "td", align: t = "inherit", padding: n = "normal", size: r, sortDirection: i = !1, variant: o = "body", scope: s, children: c, className: l = "", ...u }) => {
|
|
4718
|
+
let d = a(Rr), f = r || (d.dense ? "small" : "medium");
|
|
4719
4719
|
return /* @__PURE__ */ p(e, {
|
|
4720
4720
|
className: [
|
|
4721
4721
|
"wc-table-cell",
|
|
@@ -4732,13 +4732,13 @@ var Vr = ({ component: e = "td", align: t = "inherit", padding: n = "normal", si
|
|
|
4732
4732
|
children: c
|
|
4733
4733
|
});
|
|
4734
4734
|
};
|
|
4735
|
-
|
|
4736
|
-
var
|
|
4737
|
-
Head:
|
|
4738
|
-
Body:
|
|
4739
|
-
Row:
|
|
4740
|
-
Cell:
|
|
4741
|
-
}),
|
|
4735
|
+
Ur.displayName = "TableCell";
|
|
4736
|
+
var Wr = Object.assign(zr, {
|
|
4737
|
+
Head: Br,
|
|
4738
|
+
Body: Vr,
|
|
4739
|
+
Row: Hr,
|
|
4740
|
+
Cell: Ur
|
|
4741
|
+
}), Gr = ({ tabs: e = [], activeIndex: t, onChange: n, variant: r = "default", children: i, className: a = "", ...c }) => {
|
|
4742
4742
|
let l = s(), [u, f] = d(t || 0), h = t !== void 0, g = h ? t : u;
|
|
4743
4743
|
o(() => {
|
|
4744
4744
|
h && f(t);
|
|
@@ -4799,10 +4799,10 @@ var Hr = Object.assign(Lr, {
|
|
|
4799
4799
|
})]
|
|
4800
4800
|
});
|
|
4801
4801
|
};
|
|
4802
|
-
|
|
4802
|
+
Gr.displayName = "Tabs";
|
|
4803
4803
|
//#endregion
|
|
4804
4804
|
//#region src/components/TextField/TextField.jsx
|
|
4805
|
-
var
|
|
4805
|
+
var Kr = ({ 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
4806
|
let [z, B] = d(!1), [V, H] = d(!!e);
|
|
4807
4807
|
o(() => {
|
|
4808
4808
|
H(!!e);
|
|
@@ -4812,45 +4812,45 @@ var Wr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
4812
4812
|
H(!!n), t?.(e);
|
|
4813
4813
|
}, W = (e) => {
|
|
4814
4814
|
B(!0), N?.(e);
|
|
4815
|
-
},
|
|
4815
|
+
}, G = (e) => {
|
|
4816
4816
|
B(!1), P?.(e);
|
|
4817
|
-
},
|
|
4817
|
+
}, ee = () => {
|
|
4818
4818
|
let e = ["wc-textfield"];
|
|
4819
4819
|
return h && e.push("wc-textfield--full-width"), g && e.push("wc-textfield--multiline"), j && e.push(j), e.filter(Boolean).join(" ");
|
|
4820
|
-
},
|
|
4820
|
+
}, te = () => {
|
|
4821
4821
|
let e = ["wc-textfield__container"];
|
|
4822
4822
|
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
|
-
},
|
|
4823
|
+
}, K = () => {
|
|
4824
4824
|
let e = ["wc-textfield__label"];
|
|
4825
4825
|
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
|
-
},
|
|
4826
|
+
}, q = g ? "textarea" : "input", J = A || k || `textfield-${Math.random().toString(36).substr(2, 9)}`, Y = !!s;
|
|
4827
4827
|
return /* @__PURE__ */ m("div", {
|
|
4828
|
-
className:
|
|
4828
|
+
className: ee(),
|
|
4829
4829
|
style: M,
|
|
4830
4830
|
children: [
|
|
4831
4831
|
r && /* @__PURE__ */ m("label", {
|
|
4832
|
-
htmlFor:
|
|
4833
|
-
className:
|
|
4832
|
+
htmlFor: J,
|
|
4833
|
+
className: K(),
|
|
4834
4834
|
children: [r, c && /* @__PURE__ */ p("span", {
|
|
4835
4835
|
className: "wc-textfield__required",
|
|
4836
4836
|
children: "*"
|
|
4837
4837
|
})]
|
|
4838
4838
|
}),
|
|
4839
4839
|
/* @__PURE__ */ m("div", {
|
|
4840
|
-
className:
|
|
4840
|
+
className: te(),
|
|
4841
4841
|
children: [
|
|
4842
4842
|
C && /* @__PURE__ */ p("div", {
|
|
4843
4843
|
className: "wc-textfield__adornment wc-textfield__adornment--start",
|
|
4844
4844
|
children: C
|
|
4845
4845
|
}),
|
|
4846
|
-
/* @__PURE__ */ p(
|
|
4846
|
+
/* @__PURE__ */ p(q, {
|
|
4847
4847
|
className: g ? "wc-textfield__input wc-textfield__textarea" : "wc-textfield__input",
|
|
4848
|
-
id:
|
|
4848
|
+
id: J,
|
|
4849
4849
|
type: g ? void 0 : n,
|
|
4850
4850
|
value: e,
|
|
4851
4851
|
onChange: U,
|
|
4852
4852
|
onFocus: W,
|
|
4853
|
-
onBlur:
|
|
4853
|
+
onBlur: G,
|
|
4854
4854
|
onKeyDown: F,
|
|
4855
4855
|
onKeyUp: I,
|
|
4856
4856
|
onKeyPress: L,
|
|
@@ -4867,9 +4867,9 @@ var Wr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
4867
4867
|
name: k,
|
|
4868
4868
|
...R
|
|
4869
4869
|
}),
|
|
4870
|
-
(w ||
|
|
4870
|
+
(w || Y) && /* @__PURE__ */ m("div", {
|
|
4871
4871
|
className: "wc-textfield__adornment wc-textfield__adornment--end",
|
|
4872
|
-
children: [
|
|
4872
|
+
children: [Y && /* @__PURE__ */ p("svg", {
|
|
4873
4873
|
className: "wc-textfield__error-icon",
|
|
4874
4874
|
fill: "currentColor",
|
|
4875
4875
|
viewBox: "0 0 20 20",
|
|
@@ -4882,46 +4882,46 @@ var Wr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
4882
4882
|
})
|
|
4883
4883
|
]
|
|
4884
4884
|
}),
|
|
4885
|
-
(a ||
|
|
4886
|
-
className: `wc-textfield__helper-text ${
|
|
4887
|
-
children:
|
|
4885
|
+
(a || Y) && /* @__PURE__ */ p("div", {
|
|
4886
|
+
className: `wc-textfield__helper-text ${Y ? "wc-textfield__helper-text--error" : ""}`,
|
|
4887
|
+
children: Y ? s : a
|
|
4888
4888
|
})
|
|
4889
4889
|
]
|
|
4890
4890
|
});
|
|
4891
4891
|
};
|
|
4892
|
-
|
|
4892
|
+
Kr.displayName = "TextField";
|
|
4893
4893
|
//#endregion
|
|
4894
4894
|
//#region ../core/src/components/Toolbar/utils.js
|
|
4895
|
-
var
|
|
4895
|
+
var qr = (e, t, n = "") => {
|
|
4896
4896
|
let r = ["flex items-center w-full"];
|
|
4897
4897
|
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:
|
|
4898
|
+
}, Jr = ({ children: e, variant: t = "regular", disableGutters: n = !1, className: r = "", style: i = {}, ...a }) => /* @__PURE__ */ p("div", {
|
|
4899
|
+
className: qr(t, n, r),
|
|
4900
4900
|
style: i,
|
|
4901
4901
|
...a,
|
|
4902
4902
|
children: e
|
|
4903
|
-
}),
|
|
4903
|
+
}), Yr = {
|
|
4904
4904
|
top: "wc-tooltip--top",
|
|
4905
4905
|
bottom: "wc-tooltip--bottom",
|
|
4906
4906
|
left: "wc-tooltip--left",
|
|
4907
4907
|
right: "wc-tooltip--right"
|
|
4908
|
-
},
|
|
4908
|
+
}, Xr = [
|
|
4909
4909
|
"top",
|
|
4910
4910
|
"bottom",
|
|
4911
4911
|
"left",
|
|
4912
4912
|
"right"
|
|
4913
4913
|
];
|
|
4914
|
-
function
|
|
4915
|
-
return
|
|
4914
|
+
function Zr(e) {
|
|
4915
|
+
return Xr.includes(e);
|
|
4916
4916
|
}
|
|
4917
|
-
function
|
|
4918
|
-
return
|
|
4917
|
+
function Qr(e) {
|
|
4918
|
+
return Yr[e] || Yr.top;
|
|
4919
4919
|
}
|
|
4920
4920
|
//#endregion
|
|
4921
4921
|
//#region src/components/Tooltip/Tooltip.jsx
|
|
4922
|
-
function
|
|
4923
|
-
|
|
4924
|
-
let [i, a] = d(!1), o = s(), c =
|
|
4922
|
+
function $r({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
4923
|
+
Zr(t) || console.warn(`Invalid tooltip placement: ${t}. Using 'top' as default.`);
|
|
4924
|
+
let [i, a] = d(!1), o = s(), c = Qr(t), l = () => {
|
|
4925
4925
|
a(!0);
|
|
4926
4926
|
}, u = () => {
|
|
4927
4927
|
a(!1);
|
|
@@ -4943,7 +4943,7 @@ function Zr({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
|
4943
4943
|
}
|
|
4944
4944
|
//#endregion
|
|
4945
4945
|
//#region ../core/src/components/Typography/utils.js
|
|
4946
|
-
var
|
|
4946
|
+
var ei = {
|
|
4947
4947
|
h1: "h1",
|
|
4948
4948
|
h2: "h2",
|
|
4949
4949
|
h3: "h3",
|
|
@@ -4957,7 +4957,7 @@ var Qr = {
|
|
|
4957
4957
|
caption: "span",
|
|
4958
4958
|
overline: "span",
|
|
4959
4959
|
button: "span"
|
|
4960
|
-
},
|
|
4960
|
+
}, ti = {
|
|
4961
4961
|
h1: "wc-typography--h1",
|
|
4962
4962
|
h2: "wc-typography--h2",
|
|
4963
4963
|
h3: "wc-typography--h3",
|
|
@@ -4971,7 +4971,7 @@ var Qr = {
|
|
|
4971
4971
|
caption: "wc-typography--caption",
|
|
4972
4972
|
overline: "wc-typography--overline",
|
|
4973
4973
|
button: "wc-typography--button"
|
|
4974
|
-
},
|
|
4974
|
+
}, ni = {
|
|
4975
4975
|
inherit: "wc-typography--color-inherit",
|
|
4976
4976
|
primary: "wc-typography--color-primary",
|
|
4977
4977
|
secondary: "wc-typography--color-secondary",
|
|
@@ -4981,12 +4981,12 @@ var Qr = {
|
|
|
4981
4981
|
textPrimary: "wc-typography--color-text-primary",
|
|
4982
4982
|
textSecondary: "wc-typography--color-text-secondary",
|
|
4983
4983
|
textDisabled: "wc-typography--color-text-disabled"
|
|
4984
|
-
},
|
|
4984
|
+
}, ri = {
|
|
4985
4985
|
left: "wc-typography--align-left",
|
|
4986
4986
|
center: "wc-typography--align-center",
|
|
4987
4987
|
right: "wc-typography--align-right",
|
|
4988
4988
|
justify: "wc-typography--align-justify"
|
|
4989
|
-
},
|
|
4989
|
+
}, ii = {
|
|
4990
4990
|
h1: "1.2",
|
|
4991
4991
|
h2: "1.2",
|
|
4992
4992
|
h3: "1.3",
|
|
@@ -5001,15 +5001,15 @@ var Qr = {
|
|
|
5001
5001
|
overline: "1.4",
|
|
5002
5002
|
button: "1.4"
|
|
5003
5003
|
};
|
|
5004
|
-
function
|
|
5005
|
-
return t ||
|
|
5004
|
+
function ai(e, t) {
|
|
5005
|
+
return t || ei[e] || "p";
|
|
5006
5006
|
}
|
|
5007
|
-
function
|
|
5007
|
+
function oi(e, t, n, r, i, a = "") {
|
|
5008
5008
|
return [
|
|
5009
5009
|
"wc-typography",
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
n === "inherit" ? null :
|
|
5010
|
+
ti[e],
|
|
5011
|
+
ni[t],
|
|
5012
|
+
n === "inherit" ? null : ri[n],
|
|
5013
5013
|
r ? "wc-typography--gutter-bottom" : null,
|
|
5014
5014
|
i ? "wc-typography--no-wrap" : null,
|
|
5015
5015
|
a
|
|
@@ -5017,19 +5017,19 @@ function ii(e, t, n, r, i, a = "") {
|
|
|
5017
5017
|
}
|
|
5018
5018
|
//#endregion
|
|
5019
5019
|
//#region src/components/Typography/Typography.jsx
|
|
5020
|
-
var
|
|
5021
|
-
className:
|
|
5020
|
+
var si = ({ 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(ai(e, t), {
|
|
5021
|
+
className: oi(e, n, r, i, a, s),
|
|
5022
5022
|
style: {
|
|
5023
|
-
lineHeight:
|
|
5023
|
+
lineHeight: ii[e],
|
|
5024
5024
|
...c
|
|
5025
5025
|
},
|
|
5026
5026
|
...l,
|
|
5027
5027
|
children: o
|
|
5028
5028
|
});
|
|
5029
|
-
|
|
5029
|
+
si.displayName = "Typography";
|
|
5030
5030
|
//#endregion
|
|
5031
5031
|
//#region ../core/src/components/TypingText/utils.jsx
|
|
5032
|
-
var
|
|
5032
|
+
var ci = class {
|
|
5033
5033
|
constructor(e, t = {}) {
|
|
5034
5034
|
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
5035
|
}
|
|
@@ -5050,9 +5050,9 @@ var oi = class {
|
|
|
5050
5050
|
updateText(e) {
|
|
5051
5051
|
this.text = e, this.reset(), this.start();
|
|
5052
5052
|
}
|
|
5053
|
-
},
|
|
5053
|
+
}, li = ({ 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
5054
|
let [f, h] = d(""), g = u(null);
|
|
5055
|
-
return o(() => (g.current = new
|
|
5055
|
+
return o(() => (g.current = new ci(e, {
|
|
5056
5056
|
speed: t,
|
|
5057
5057
|
pause: n,
|
|
5058
5058
|
loop: r,
|
|
@@ -5076,10 +5076,10 @@ var oi = class {
|
|
|
5076
5076
|
}), a && /* @__PURE__ */ p("span", { className: "typing-cursor" })]
|
|
5077
5077
|
});
|
|
5078
5078
|
};
|
|
5079
|
-
|
|
5079
|
+
li.displayName = "TypingText";
|
|
5080
5080
|
//#endregion
|
|
5081
5081
|
//#region src/components/Input/VerificationCodeInput.jsx
|
|
5082
|
-
var
|
|
5082
|
+
var ui = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus: i = !1, className: a = "", ...s }) => {
|
|
5083
5083
|
let c = u([]);
|
|
5084
5084
|
o(() => {
|
|
5085
5085
|
typeof t == "string" && t.split("").forEach((e, t) => {
|
|
@@ -5126,23 +5126,23 @@ var ci = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus:
|
|
|
5126
5126
|
}, t))
|
|
5127
5127
|
});
|
|
5128
5128
|
};
|
|
5129
|
-
|
|
5129
|
+
ui.displayName = "VerificationCodeInput";
|
|
5130
5130
|
//#endregion
|
|
5131
5131
|
//#region ../core/src/components/VideoPlayer/utils.js
|
|
5132
|
-
function
|
|
5132
|
+
function di(e) {
|
|
5133
5133
|
return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
5134
5134
|
}
|
|
5135
|
-
function
|
|
5135
|
+
function fi(e, t) {
|
|
5136
5136
|
let n = e.currentTarget.getBoundingClientRect();
|
|
5137
5137
|
return (e.clientX - n.left) / n.width * t;
|
|
5138
5138
|
}
|
|
5139
|
-
function
|
|
5139
|
+
function pi(e) {
|
|
5140
5140
|
e && (document.fullscreenElement ? document.exitFullscreen?.() : e.requestFullscreen?.());
|
|
5141
5141
|
}
|
|
5142
5142
|
//#endregion
|
|
5143
5143
|
//#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 =
|
|
5144
|
+
var mi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i = {}, ...a }) => {
|
|
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 = di(S), T = di(b), E = () => {
|
|
5146
5146
|
let e = s.current;
|
|
5147
5147
|
e && (e.paused ? e.play() : e.pause());
|
|
5148
5148
|
}, D = () => {
|
|
@@ -5150,14 +5150,14 @@ var fi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5150
5150
|
e && (x(e.duration || 0), C(e.currentTime), h(e.duration ? e.currentTime / e.duration * 100 : 0), l(!e.paused));
|
|
5151
5151
|
}, O = (e) => {
|
|
5152
5152
|
let t = s.current;
|
|
5153
|
-
t && (t.currentTime =
|
|
5153
|
+
t && (t.currentTime = fi(e, b));
|
|
5154
5154
|
}, k = () => {
|
|
5155
5155
|
y((e) => {
|
|
5156
5156
|
let t = !e;
|
|
5157
5157
|
return s.current && (s.current.muted = t), t;
|
|
5158
5158
|
});
|
|
5159
5159
|
}, A = () => {
|
|
5160
|
-
|
|
5160
|
+
pi(s.current?.parentElement);
|
|
5161
5161
|
};
|
|
5162
5162
|
return o(() => {
|
|
5163
5163
|
s.current && (s.current.volume = g);
|
|
@@ -5234,10 +5234,10 @@ var fi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5234
5234
|
})]
|
|
5235
5235
|
});
|
|
5236
5236
|
};
|
|
5237
|
-
|
|
5237
|
+
mi.displayName = "VideoPlayer";
|
|
5238
5238
|
//#endregion
|
|
5239
5239
|
//#region ../core/src/components/Watermark/utils.js
|
|
5240
|
-
var
|
|
5240
|
+
var hi = {
|
|
5241
5241
|
content: "",
|
|
5242
5242
|
cross: !1,
|
|
5243
5243
|
debug: !1,
|
|
@@ -5265,14 +5265,14 @@ var pi = {
|
|
|
5265
5265
|
yOffset: 0,
|
|
5266
5266
|
zIndex: 10
|
|
5267
5267
|
};
|
|
5268
|
-
function
|
|
5268
|
+
function gi(e) {
|
|
5269
5269
|
if (typeof e == "string" && e.startsWith("var(")) {
|
|
5270
5270
|
let t = e.match(/--[^, )]+/);
|
|
5271
5271
|
if (t) return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim() || e;
|
|
5272
5272
|
}
|
|
5273
5273
|
return e;
|
|
5274
5274
|
}
|
|
5275
|
-
function
|
|
5275
|
+
function _i(e) {
|
|
5276
5276
|
let t = document.createElement("canvas"), n = t.getContext("2d"), r = e.width, i = e.height;
|
|
5277
5277
|
if (!e.image && e.content) {
|
|
5278
5278
|
n.font = `${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;
|
|
@@ -5288,14 +5288,14 @@ function hi(e) {
|
|
|
5288
5288
|
}, i.src = e.image;
|
|
5289
5289
|
});
|
|
5290
5290
|
let a = (e.content || "").split(/\n/);
|
|
5291
|
-
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ?
|
|
5291
|
+
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ? gi(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
5292
|
let o = -(a.length - 1) * e.lineHeight / 2;
|
|
5293
5293
|
return a.forEach((t, r) => {
|
|
5294
5294
|
let i = o + r * e.lineHeight;
|
|
5295
5295
|
n.fillText(t, 0, i);
|
|
5296
5296
|
}), Promise.resolve(t.toDataURL());
|
|
5297
5297
|
}
|
|
5298
|
-
function
|
|
5298
|
+
function vi(e, t) {
|
|
5299
5299
|
let n = {
|
|
5300
5300
|
position: e.fullscreen ? "fixed" : "absolute",
|
|
5301
5301
|
top: 0,
|
|
@@ -5314,15 +5314,15 @@ function gi(e, t) {
|
|
|
5314
5314
|
}
|
|
5315
5315
|
//#endregion
|
|
5316
5316
|
//#region src/components/Watermark/Watermark.jsx
|
|
5317
|
-
var
|
|
5317
|
+
var yi = (e) => {
|
|
5318
5318
|
let t = {
|
|
5319
|
-
...
|
|
5319
|
+
...hi,
|
|
5320
5320
|
...e
|
|
5321
5321
|
}, [n, r] = d(""), i = !!t.content || !!t.image;
|
|
5322
5322
|
o(() => {
|
|
5323
5323
|
if (!i) return;
|
|
5324
5324
|
let e = !0;
|
|
5325
|
-
return
|
|
5325
|
+
return _i(t).then((t) => {
|
|
5326
5326
|
e && r(t);
|
|
5327
5327
|
}), () => {
|
|
5328
5328
|
e = !1;
|
|
@@ -5331,7 +5331,7 @@ var _i = (e) => {
|
|
|
5331
5331
|
let { children: e, ...n } = t;
|
|
5332
5332
|
return JSON.stringify(n);
|
|
5333
5333
|
}, [t]), i]);
|
|
5334
|
-
let a = l(() => i ?
|
|
5334
|
+
let a = l(() => i ? vi(t, n) : {}, [
|
|
5335
5335
|
n,
|
|
5336
5336
|
i,
|
|
5337
5337
|
t
|
|
@@ -5341,63 +5341,122 @@ var _i = (e) => {
|
|
|
5341
5341
|
style: a
|
|
5342
5342
|
}), t.children] }) : t.children || null;
|
|
5343
5343
|
};
|
|
5344
|
-
|
|
5344
|
+
yi.displayName = "Watermark";
|
|
5345
5345
|
//#endregion
|
|
5346
5346
|
//#region src/ThemeReact.tsx
|
|
5347
|
-
var
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5347
|
+
var bi = n(void 0), xi = typeof window > "u" ? o : c;
|
|
5348
|
+
async function Si(e, t, n, r) {
|
|
5349
|
+
if (typeof fetch > "u") return {
|
|
5350
|
+
ok: !1,
|
|
5351
|
+
url: e,
|
|
5352
|
+
errors: [{
|
|
5353
|
+
path: "$",
|
|
5354
|
+
message: "Theme config URL or fetch is unavailable."
|
|
5355
|
+
}],
|
|
5356
|
+
warnings: []
|
|
5357
|
+
};
|
|
5358
|
+
try {
|
|
5359
|
+
let i = await fetch(e, {
|
|
5360
|
+
cache: "no-store",
|
|
5361
|
+
signal: r
|
|
5362
|
+
});
|
|
5363
|
+
if (!n()) return null;
|
|
5364
|
+
if (!i.ok) return {
|
|
5365
|
+
ok: !1,
|
|
5366
|
+
url: e,
|
|
5367
|
+
errors: [{
|
|
5368
|
+
path: "$",
|
|
5369
|
+
message: `Theme request failed with ${i.status}.`
|
|
5370
|
+
}],
|
|
5371
|
+
warnings: []
|
|
5372
|
+
};
|
|
5373
|
+
let a = await i.json();
|
|
5374
|
+
return n() ? {
|
|
5375
|
+
...x(a, { target: t }),
|
|
5376
|
+
url: e
|
|
5377
|
+
} : null;
|
|
5378
|
+
} catch (t) {
|
|
5379
|
+
return n() ? {
|
|
5380
|
+
ok: !1,
|
|
5381
|
+
url: e,
|
|
5382
|
+
errors: [{
|
|
5383
|
+
path: "$",
|
|
5384
|
+
message: t instanceof Error ? t.message : "Theme request failed."
|
|
5385
|
+
}],
|
|
5386
|
+
warnings: []
|
|
5387
|
+
} : null;
|
|
5388
|
+
}
|
|
5389
|
+
}
|
|
5390
|
+
var Ci = ({ 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 }) => {
|
|
5391
|
+
let y = u(null);
|
|
5392
|
+
y.current ||= C({
|
|
5393
|
+
target: a,
|
|
5394
|
+
initialMode: s ?? n,
|
|
5395
|
+
initialResolvedMode: c,
|
|
5396
|
+
storageKey: f,
|
|
5397
|
+
storage: m,
|
|
5398
|
+
readStorage: s === void 0
|
|
5354
5399
|
});
|
|
5355
|
-
let
|
|
5356
|
-
mode:
|
|
5357
|
-
resolvedMode:
|
|
5358
|
-
dark:
|
|
5359
|
-
}),
|
|
5360
|
-
_.current =
|
|
5361
|
-
let e =
|
|
5362
|
-
|
|
5400
|
+
let b = y.current, [S, w] = d({
|
|
5401
|
+
mode: b.mode,
|
|
5402
|
+
resolvedMode: b.resolvedMode,
|
|
5403
|
+
dark: b.dark
|
|
5404
|
+
}), T = u(S.resolvedMode), E = u(a), O = u(0), k = u(g), A = u(_), j = u(v);
|
|
5405
|
+
k.current = g, A.current = _, j.current = v, xi(() => {
|
|
5406
|
+
let e = b.subscribe((e) => {
|
|
5407
|
+
w(e), T.current !== e.resolvedMode && (T.current = e.resolvedMode, k.current?.(e.resolvedMode));
|
|
5363
5408
|
});
|
|
5364
|
-
return
|
|
5365
|
-
e(),
|
|
5409
|
+
return b.start(), () => {
|
|
5410
|
+
e(), b.destroy();
|
|
5366
5411
|
};
|
|
5367
|
-
}, [
|
|
5368
|
-
|
|
5369
|
-
}, [
|
|
5370
|
-
|
|
5371
|
-
|
|
5412
|
+
}, [b]), xi(() => {
|
|
5413
|
+
s !== void 0 && b.setMode(s);
|
|
5414
|
+
}, [b, s]), o(() => {
|
|
5415
|
+
let e = ++O.current, n = E.current, i = typeof AbortController > "u" ? null : new AbortController();
|
|
5416
|
+
if (t !== void 0) {
|
|
5417
|
+
let e = x(t, { target: n });
|
|
5418
|
+
e.ok ? A.current?.(e) : j.current?.(e);
|
|
5419
|
+
} else r || D(n);
|
|
5420
|
+
return r && Si(r, n, () => e === O.current, i?.signal).then((e) => {
|
|
5421
|
+
e && (e.ok ? A.current?.(e) : i?.signal.aborted || j.current?.(e));
|
|
5422
|
+
}), () => {
|
|
5423
|
+
i?.abort();
|
|
5424
|
+
};
|
|
5425
|
+
}, [t, r]), o(() => {
|
|
5426
|
+
let e = E.current;
|
|
5427
|
+
return () => D(e);
|
|
5428
|
+
}, []);
|
|
5429
|
+
let M = i((e) => {
|
|
5430
|
+
s === void 0 && b.setMode(e), h?.(e);
|
|
5372
5431
|
}, [
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
]),
|
|
5377
|
-
let e =
|
|
5378
|
-
|
|
5432
|
+
b,
|
|
5433
|
+
s,
|
|
5434
|
+
h
|
|
5435
|
+
]), N = i(() => {
|
|
5436
|
+
let e = b.resolvedMode === "dark" ? "light" : "dark";
|
|
5437
|
+
s === void 0 && b.setMode(e), h?.(e);
|
|
5379
5438
|
}, [
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
]),
|
|
5384
|
-
...
|
|
5385
|
-
setMode:
|
|
5386
|
-
toggleMode:
|
|
5439
|
+
b,
|
|
5440
|
+
s,
|
|
5441
|
+
h
|
|
5442
|
+
]), P = l(() => ({
|
|
5443
|
+
...S,
|
|
5444
|
+
setMode: M,
|
|
5445
|
+
toggleMode: N
|
|
5387
5446
|
}), [
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5447
|
+
S,
|
|
5448
|
+
M,
|
|
5449
|
+
N
|
|
5391
5450
|
]);
|
|
5392
|
-
return /* @__PURE__ */ p(
|
|
5393
|
-
value:
|
|
5451
|
+
return /* @__PURE__ */ p(bi.Provider, {
|
|
5452
|
+
value: P,
|
|
5394
5453
|
children: e
|
|
5395
5454
|
});
|
|
5396
5455
|
};
|
|
5397
|
-
function
|
|
5398
|
-
let e = a(
|
|
5456
|
+
function wi() {
|
|
5457
|
+
let e = a(bi);
|
|
5399
5458
|
if (!e) throw Error("useTheme must be used within ThemeProvider");
|
|
5400
5459
|
return e;
|
|
5401
5460
|
}
|
|
5402
5461
|
//#endregion
|
|
5403
|
-
export {
|
|
5462
|
+
export { G as Accordion, K as Alert, q as AppBar, J as Autocomplete, oe as Avatar, de as Badge, ge as Banner, be as Blockquote, Oe as Box, Fe as Breadcrumb, Ve as Button, ye as Card, He as CardActions, Ue as CardContent, Ke as Checkbox, Ze as Chip, it as CircularProgress, ct as ColorPicker, dt as Container, yt as Copy, Et as DatePicker, Dt as Fab, Rt as Feature, kt as Feed, Bt as FileInput, Ht as FormControl, Ut as FormControlLabel, Wt as FormGroup, Gt as FormHelperText, nn as Grid, rn as HoverCard, bn as Icon, xn as IconButton, Sn as ImageGallery, An as Inline, jn as Input, Ln as List, Rn as ListItem, zn as ListItemIcon, Bn as ListItemText, Yn as Menu, nr as Modal, rr as NumberAnimation, ar as Page, ir as Pagination, dr as Paper, fr as Popover, pr as PricingTable, mr as Progress, _r as Radio, gr as RadioGroup, vr as Rating, yr as Select, xr as Skeleton, Cr as SlideOver, Sr as Slider, Dr as Snackbar, wr as Split, Tr as Stack, Ir as Status, Lr as Switch, _ as THEME_CONFIG_VERSION, v as THEME_MODES, y as THEME_STORAGE_KEY, Wr as Table, Vr as TableBody, Ur as TableCell, Br as TableHead, Hr as TableRow, Gr as Tabs, Kr as TextField, Ci as ThemeProvider, Jr as Toolbar, $r as Tooltip, li as TypingText, si as Typography, ui as VerificationCodeInput, mi as VideoPlayer, yi as Watermark, b as applyThemeConfig, S as createThemeController, w as createThemeInitScript, T as loadThemeConfig, E as resetThemeConfig, O as resolveThemeMode, k as serializeThemeConfig, wi as useTheme, A as validateThemeConfig };
|