@zeturn/watercolor-react 1.2.6 → 1.2.8
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.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.d.ts +16 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +2 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/watercolor-react.css +1 -1
- package/dist/watercolor-react.es.js +874 -589
- package/index.d.ts +2 -0
- package/package.json +7 -7
|
@@ -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 { createPortal as h } from "react-dom";
|
|
4
|
-
import { THEME_CONFIG_VERSION as g, THEME_MODES as _, THEME_STORAGE_KEY as v, applyFloatingPosition as y, applyThemeConfig as b, applyThemeConfig as x, createOverlayLayer as S, createThemeController as C, createThemeController as w, createThemeInitScript as T,
|
|
4
|
+
import { THEME_CONFIG_VERSION as g, THEME_MODES as _, THEME_STORAGE_KEY as v, applyFloatingPosition as y, applyThemeConfig as b, applyThemeConfig as x, createOverlayLayer as S, createThemeController as C, createThemeController as w, createThemeInitScript as T, loadProviderThemeConfig as E, loadThemeConfig as D, resetThemeConfig as O, resetThemeConfig as k, resolveThemeMode as A, serializeThemeConfig as j, validateThemeConfig as M } 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 N = Object.create, P = Object.defineProperty, F = Object.getOwnPropertyDescriptor, I = Object.getOwnPropertyNames, L = Object.getPrototypeOf, R = Object.prototype.hasOwnProperty, z = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), B = (e, t, n, r) => {
|
|
7
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = I(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !R.call(e, s) && s !== n && P(e, s, {
|
|
8
8
|
get: ((e) => t[e]).bind(null, s),
|
|
9
|
-
enumerable: !(r =
|
|
9
|
+
enumerable: !(r = F(t, s)) || r.enumerable
|
|
10
10
|
});
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
12
|
+
}, V = (e, t, n) => (n = e == null ? {} : N(L(e)), B(t || !e || !e.__esModule ? P(n, "default", {
|
|
13
13
|
value: e,
|
|
14
14
|
enumerable: !0
|
|
15
|
-
}) : n, e)),
|
|
15
|
+
}) : n, e)), H = [
|
|
16
16
|
"default",
|
|
17
17
|
"bordered",
|
|
18
18
|
"filled"
|
|
19
19
|
];
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function U(e = "default") {
|
|
21
|
+
return H.includes(e) ? e : "default";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function W(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 ee(e = "default", t = "") {
|
|
27
|
+
let n = U(e), r = W(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 te(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 ne = ({ 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 = ee(n, i), g = (n) => {
|
|
41
41
|
if (e[n]?.disabled) return;
|
|
42
|
-
let i =
|
|
42
|
+
let i = te(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 te = ({ items: e = [], multiple: t = !1, variant: n = "default", onToggle: r
|
|
|
84
84
|
}, t))
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
|
-
|
|
87
|
+
ne.displayName = "Accordion";
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/components/Alert/utils.js
|
|
90
|
-
function
|
|
90
|
+
function re(e, t) {
|
|
91
91
|
return [
|
|
92
92
|
"wc-alert",
|
|
93
93
|
`wc-alert--${e}`,
|
|
@@ -96,7 +96,7 @@ function ne(e, t) {
|
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/LocaleReact.tsx
|
|
99
|
-
var
|
|
99
|
+
var G = {
|
|
100
100
|
breadcrumb: "Breadcrumb",
|
|
101
101
|
close: "Close",
|
|
102
102
|
closeDialog: "Close dialog",
|
|
@@ -134,25 +134,25 @@ var re = {
|
|
|
134
134
|
viewImage: (e, t) => `View image ${e}${t ? `: ${t}` : ""}`,
|
|
135
135
|
volume: "Volume",
|
|
136
136
|
videoProgress: "Video progress"
|
|
137
|
-
},
|
|
137
|
+
}, K = n({ messages: G }), q = ({ children: e, locale: t, messages: n }) => {
|
|
138
138
|
let r = l(() => ({
|
|
139
139
|
locale: t,
|
|
140
140
|
messages: {
|
|
141
|
-
...
|
|
141
|
+
...G,
|
|
142
142
|
...n
|
|
143
143
|
}
|
|
144
144
|
}), [t, n]);
|
|
145
|
-
return /* @__PURE__ */ p(
|
|
145
|
+
return /* @__PURE__ */ p(K.Provider, {
|
|
146
146
|
value: r,
|
|
147
147
|
children: e
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
|
-
function
|
|
151
|
-
return a(
|
|
150
|
+
function J() {
|
|
151
|
+
return a(K);
|
|
152
152
|
}
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/components/Alert/Alert.jsx
|
|
155
|
-
var
|
|
155
|
+
var ie = ({ type: e }) => {
|
|
156
156
|
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" })] });
|
|
157
157
|
return /* @__PURE__ */ m("svg", {
|
|
158
158
|
viewBox: "0 0 20 20",
|
|
@@ -169,19 +169,19 @@ var J = ({ type: e }) => {
|
|
|
169
169
|
}), t]
|
|
170
170
|
});
|
|
171
171
|
};
|
|
172
|
-
function
|
|
173
|
-
let [c, l] = d(!0), { messages: u } =
|
|
172
|
+
function Y({ type: e = "info", variant: t = "standard", title: n = "", closable: r = !1, showIcon: i = !0, className: a = "", children: o, onClose: s = () => {} }) {
|
|
173
|
+
let [c, l] = d(!0), { messages: u } = J();
|
|
174
174
|
if (!c) return null;
|
|
175
175
|
let f = () => {
|
|
176
176
|
l(!1), s();
|
|
177
177
|
};
|
|
178
178
|
return /* @__PURE__ */ m("div", {
|
|
179
|
-
className: [...
|
|
179
|
+
className: [...re(e, t), a].filter(Boolean).join(" "),
|
|
180
180
|
role: "alert",
|
|
181
181
|
children: [
|
|
182
182
|
i && /* @__PURE__ */ p("div", {
|
|
183
183
|
className: "wc-alert-icon",
|
|
184
|
-
children: /* @__PURE__ */ p(
|
|
184
|
+
children: /* @__PURE__ */ p(ie, { type: e })
|
|
185
185
|
}),
|
|
186
186
|
/* @__PURE__ */ m("div", {
|
|
187
187
|
className: "wc-alert-content",
|
|
@@ -213,16 +213,16 @@ function ie({ type: e = "info", variant: t = "standard", title: n = "", closable
|
|
|
213
213
|
}
|
|
214
214
|
//#endregion
|
|
215
215
|
//#region src/components/AppBar/AppBar.jsx
|
|
216
|
-
var
|
|
216
|
+
var ae = ({ children: e, position: t = "fixed", color: n = "default", elevation: r = 0, variant: i = "elevation", className: a = "", style: o = {}, ...s }) => /* @__PURE__ */ p("div", {
|
|
217
217
|
className: `wc-appbar wc-appbar--${t} wc-appbar--${n} wc-appbar--elevation-${r} wc-appbar--${i} ${a}`,
|
|
218
218
|
style: o,
|
|
219
219
|
...s,
|
|
220
220
|
children: e
|
|
221
|
-
}),
|
|
222
|
-
function
|
|
221
|
+
}), oe = typeof document > "u" ? o : c;
|
|
222
|
+
function se({ children: e, target: t }) {
|
|
223
223
|
return typeof document > "u" ? null : h(e, (typeof t == "string" ? document.querySelector(t) : t) || document.body);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function ce({ open: e, elementRef: t, refs: n = [], modal: r = !1, lockScroll: i = !1, restoreFocus: a = !0, initialFocus: s = !1, closeOnEscape: c = !0, closeOnPointerDownOutside: l = !0, onEscapeKeyDown: d, onPointerDownOutside: f, zIndex: p }) {
|
|
226
226
|
let m = u(null);
|
|
227
227
|
return o(() => {
|
|
228
228
|
if (!(!e || !t.current || typeof document > "u")) return m.current = S({
|
|
@@ -268,9 +268,9 @@ function se({ open: e, elementRef: t, refs: n = [], modal: r = !1, lockScroll: i
|
|
|
268
268
|
f
|
|
269
269
|
]), m;
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function le({ open: e, anchorRef: t, floatingRef: n, placement: r = "bottom", offset: i = 8, boundaryPadding: a = 8 }) {
|
|
272
272
|
let [o, s] = d(r);
|
|
273
|
-
return
|
|
273
|
+
return oe(() => {
|
|
274
274
|
if (!e || !t.current || !n.current || typeof window > "u") return;
|
|
275
275
|
let o = () => {
|
|
276
276
|
s(y(t.current, n.current, {
|
|
@@ -293,7 +293,7 @@ function ce({ open: e, anchorRef: t, floatingRef: n, placement: r = "bottom", of
|
|
|
293
293
|
}
|
|
294
294
|
//#endregion
|
|
295
295
|
//#region src/components/Autocomplete/Autocomplete.jsx
|
|
296
|
-
var
|
|
296
|
+
var ue = ({ 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 }) => {
|
|
297
297
|
let [R, z] = d(!1), [B, V] = d(""), [H, U] = d(-1), W = u(null), ee = u(null), te = u(null), ne = (e) => e ? typeof e == "object" ? e.label || e.value || "" : String(e) : "", re = (e) => e ? typeof e == "object" ? e.value === void 0 ? e : e.value : e : null, G = F || ne, K = I || re;
|
|
298
298
|
o(() => {
|
|
299
299
|
!_ && e ? V(G(e)) : e || V("");
|
|
@@ -301,7 +301,7 @@ var le = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Typ
|
|
|
301
301
|
let q = () => {
|
|
302
302
|
z(!1), U(-1);
|
|
303
303
|
};
|
|
304
|
-
|
|
304
|
+
ce({
|
|
305
305
|
open: R,
|
|
306
306
|
elementRef: te,
|
|
307
307
|
refs: [W],
|
|
@@ -323,7 +323,7 @@ var le = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Typ
|
|
|
323
323
|
}, oe = () => {
|
|
324
324
|
let e = ["wc-autocomplete__container"];
|
|
325
325
|
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(" ");
|
|
326
|
-
},
|
|
326
|
+
}, se = (e, t) => {
|
|
327
327
|
let n = ["wc-autocomplete__option"];
|
|
328
328
|
return ie(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(" ");
|
|
329
329
|
}, le = (e) => {
|
|
@@ -481,7 +481,7 @@ var le = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Typ
|
|
|
481
481
|
className: "wc-autocomplete__options",
|
|
482
482
|
children: J.map((e, t) => /* @__PURE__ */ m("div", {
|
|
483
483
|
id: `${X}-option-${t}`,
|
|
484
|
-
className:
|
|
484
|
+
className: se(e, t),
|
|
485
485
|
role: "option",
|
|
486
486
|
"aria-selected": ie(e),
|
|
487
487
|
onClick: () => pe(e),
|
|
@@ -510,40 +510,40 @@ var le = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Typ
|
|
|
510
510
|
]
|
|
511
511
|
});
|
|
512
512
|
};
|
|
513
|
-
|
|
513
|
+
ue.displayName = "Autocomplete";
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region src/components/Avatar/utils.js
|
|
516
|
-
function
|
|
516
|
+
function de({ size: e, variant: t, color: n, src: r, imgError: i }) {
|
|
517
517
|
let a = ["wc-avatar"];
|
|
518
518
|
return typeof e == "string" && a.push(`wc-avatar--${e}`), a.push(`wc-avatar--${t}`), (!r || i) && a.push(`wc-avatar--${n}`), a;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function fe(e) {
|
|
521
521
|
let t = {};
|
|
522
522
|
return typeof e == "number" && (t.width = `${e}px`, t.height = `${e}px`, t.fontSize = `${e * .4}px`), t;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function pe(e) {
|
|
525
525
|
if (!e) return "";
|
|
526
526
|
let t = e.trim(), n = t.charAt(0);
|
|
527
527
|
if (/[\u4e00-\u9fa5]/.test(n)) return n;
|
|
528
528
|
let r = t.split(/\s+/).filter(Boolean);
|
|
529
529
|
return r.length === 1 ? r[0].charAt(0).toUpperCase() : (r[0].charAt(0) + r[1].charAt(0)).toUpperCase();
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function me(e) {
|
|
532
532
|
e(!0);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function he(e) {
|
|
535
535
|
e(!1);
|
|
536
536
|
}
|
|
537
537
|
//#endregion
|
|
538
538
|
//#region src/components/Avatar/Avatar.jsx
|
|
539
|
-
var
|
|
540
|
-
let [c, l] = d(!1), u =
|
|
539
|
+
var X = ({ src: e = "", alt: t = "", size: n = "md", variant: r = "circular", color: i = "default", children: a = "", className: o = "", ...s }) => {
|
|
540
|
+
let [c, l] = d(!1), u = de({
|
|
541
541
|
size: n,
|
|
542
542
|
variant: r,
|
|
543
543
|
color: i,
|
|
544
544
|
src: e,
|
|
545
545
|
imgError: c
|
|
546
|
-
}).concat(o).filter(Boolean).join(" "), f =
|
|
546
|
+
}).concat(o).filter(Boolean).join(" "), f = fe(n), m = pe(a), h = () => me(l), g = () => he(l);
|
|
547
547
|
return /* @__PURE__ */ p("div", {
|
|
548
548
|
className: u,
|
|
549
549
|
style: f,
|
|
@@ -560,10 +560,10 @@ var he = ({ src: e = "", alt: t = "", size: n = "md", variant: r = "circular", c
|
|
|
560
560
|
}) : null
|
|
561
561
|
});
|
|
562
562
|
};
|
|
563
|
-
|
|
563
|
+
X.displayName = "Avatar";
|
|
564
564
|
//#endregion
|
|
565
565
|
//#region src/components/Badge/utils.js
|
|
566
|
-
var
|
|
566
|
+
var ge = [
|
|
567
567
|
"primary",
|
|
568
568
|
"secondary",
|
|
569
569
|
"success",
|
|
@@ -574,20 +574,20 @@ var X = [
|
|
|
574
574
|
"cyan",
|
|
575
575
|
"pink"
|
|
576
576
|
];
|
|
577
|
-
function ge(e) {
|
|
578
|
-
return X.includes(e);
|
|
579
|
-
}
|
|
580
577
|
function _e(e) {
|
|
581
|
-
return ge(e)
|
|
578
|
+
return ge.includes(e);
|
|
579
|
+
}
|
|
580
|
+
function ve(e) {
|
|
581
|
+
return _e(e) ? e : "primary";
|
|
582
582
|
}
|
|
583
|
-
function
|
|
584
|
-
let i = ["wc-badge", `wc-badge--${
|
|
583
|
+
function ye({ variant: e, size: t, dot: n, className: r }) {
|
|
584
|
+
let i = ["wc-badge", `wc-badge--${ve(e)}`];
|
|
585
585
|
return n ? i.push(`wc-badge--dot-${t}`) : i.push(`wc-badge--${t}`), r && i.push(r), i.filter(Boolean).join(" ");
|
|
586
586
|
}
|
|
587
587
|
//#endregion
|
|
588
588
|
//#region src/components/Badge/Badge.jsx
|
|
589
|
-
var
|
|
590
|
-
className:
|
|
589
|
+
var be = ({ children: e, variant: t = "primary", size: n = "md", dot: r = !1, className: i = "", ...a }) => /* @__PURE__ */ p("span", {
|
|
590
|
+
className: ye({
|
|
591
591
|
variant: t,
|
|
592
592
|
size: n,
|
|
593
593
|
dot: r,
|
|
@@ -596,10 +596,10 @@ var ye = ({ children: e, variant: t = "primary", size: n = "md", dot: r = !1, cl
|
|
|
596
596
|
...a,
|
|
597
597
|
children: !r && e
|
|
598
598
|
});
|
|
599
|
-
|
|
599
|
+
be.displayName = "Badge";
|
|
600
600
|
//#endregion
|
|
601
601
|
//#region src/components/Banner/utils.js
|
|
602
|
-
function
|
|
602
|
+
function xe(e, t, n) {
|
|
603
603
|
let r = [
|
|
604
604
|
"wc-banner",
|
|
605
605
|
`wc-banner--${e}`,
|
|
@@ -607,18 +607,18 @@ function be(e, t, n) {
|
|
|
607
607
|
];
|
|
608
608
|
return n && r.push("wc-banner--sticky"), r.join(" ");
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function Se(e) {
|
|
611
611
|
return { zIndex: e };
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Ce(e, t) {
|
|
614
614
|
e(!1), t && t();
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function we(e) {
|
|
617
617
|
e && e();
|
|
618
618
|
}
|
|
619
619
|
//#endregion
|
|
620
620
|
//#region src/components/Banner/Banner.jsx
|
|
621
|
-
var
|
|
621
|
+
var Te = ({ type: e }) => {
|
|
622
622
|
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" })] });
|
|
623
623
|
return /* @__PURE__ */ m("svg", {
|
|
624
624
|
viewBox: "0 0 20 20",
|
|
@@ -635,13 +635,13 @@ var we = ({ type: e }) => {
|
|
|
635
635
|
}), t]
|
|
636
636
|
});
|
|
637
637
|
};
|
|
638
|
-
function
|
|
639
|
-
let [_, v] = d(!0), { messages: y } =
|
|
638
|
+
function Ee({ 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 }) {
|
|
639
|
+
let [_, v] = d(!0), { messages: y } = J();
|
|
640
640
|
if (!_) return null;
|
|
641
|
-
let b =
|
|
642
|
-
|
|
641
|
+
let b = xe(t, n, l), x = Se(u), S = () => {
|
|
642
|
+
Ce(v, f);
|
|
643
643
|
}, C = () => {
|
|
644
|
-
|
|
644
|
+
we(h);
|
|
645
645
|
}, w = g && e.Children.count(g) > 0;
|
|
646
646
|
return /* @__PURE__ */ p("div", {
|
|
647
647
|
className: b,
|
|
@@ -653,7 +653,7 @@ function Te({ type: t = "info", position: n = "top", title: r = "", message: i =
|
|
|
653
653
|
children: [
|
|
654
654
|
o && /* @__PURE__ */ p("div", {
|
|
655
655
|
className: "wc-banner-icon",
|
|
656
|
-
children: /* @__PURE__ */ p(
|
|
656
|
+
children: /* @__PURE__ */ p(Te, { type: t })
|
|
657
657
|
}),
|
|
658
658
|
/* @__PURE__ */ m("div", {
|
|
659
659
|
className: "wc-banner-text",
|
|
@@ -693,22 +693,22 @@ function Te({ type: t = "info", position: n = "top", title: r = "", message: i =
|
|
|
693
693
|
}
|
|
694
694
|
//#endregion
|
|
695
695
|
//#region src/components/Blockquote/utils.js
|
|
696
|
-
function
|
|
696
|
+
function De(e = "", t = "default", n = !0, r = !0, i = "medium", a = "default") {
|
|
697
697
|
let o = ["wc-blockquote"];
|
|
698
698
|
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(" ");
|
|
699
699
|
}
|
|
700
700
|
//#endregion
|
|
701
701
|
//#region src/components/Card/utils.js
|
|
702
|
-
function
|
|
702
|
+
function Oe(e = "", t = "minimal", n = "default", r = "medium", i = !1, a = !0) {
|
|
703
703
|
let o = ["wc-card"];
|
|
704
704
|
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(" ");
|
|
705
705
|
}
|
|
706
706
|
//#endregion
|
|
707
707
|
//#region src/components/Card/Card.jsx
|
|
708
|
-
var
|
|
708
|
+
var ke = ({ 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, ..._ }) => {
|
|
709
709
|
let v = a || !!d;
|
|
710
710
|
return /* @__PURE__ */ m("div", {
|
|
711
|
-
className:
|
|
711
|
+
className: Oe(s, n, r, i, v, o),
|
|
712
712
|
style: u,
|
|
713
713
|
onClick: (e) => {
|
|
714
714
|
v && d && d(e);
|
|
@@ -744,11 +744,11 @@ var Oe = ({ children: e, title: t = "", variant: n = "minimal", color: r = "defa
|
|
|
744
744
|
]
|
|
745
745
|
});
|
|
746
746
|
};
|
|
747
|
-
|
|
747
|
+
ke.displayName = "Card";
|
|
748
748
|
//#endregion
|
|
749
749
|
//#region src/components/Blockquote/Blockquote.jsx
|
|
750
|
-
function
|
|
751
|
-
return r === "card" ? /* @__PURE__ */ m(
|
|
750
|
+
function Ae({ cite: e = "", children: t, className: n = "", variant: r = "default", noBorder: i = !0, interactive: a = !0, size: o = "medium", color: s = "default", ...c }) {
|
|
751
|
+
return r === "card" ? /* @__PURE__ */ m(ke, {
|
|
752
752
|
variant: "filled",
|
|
753
753
|
color: s,
|
|
754
754
|
size: o,
|
|
@@ -764,7 +764,7 @@ function ke({ cite: e = "", children: t, className: n = "", variant: r = "defaul
|
|
|
764
764
|
children: ["— ", e]
|
|
765
765
|
})]
|
|
766
766
|
}) : /* @__PURE__ */ m("blockquote", {
|
|
767
|
-
className:
|
|
767
|
+
className: De(n, r, i, a, o, s),
|
|
768
768
|
...c,
|
|
769
769
|
children: [/* @__PURE__ */ p("p", {
|
|
770
770
|
className: "quote-text",
|
|
@@ -791,32 +791,32 @@ var Z = {
|
|
|
791
791
|
16: "4rem",
|
|
792
792
|
20: "5rem",
|
|
793
793
|
24: "6rem"
|
|
794
|
-
},
|
|
794
|
+
}, je = {
|
|
795
795
|
flex: "flex",
|
|
796
796
|
block: "block",
|
|
797
797
|
inline: "inline",
|
|
798
798
|
"inline-block": "inline-block",
|
|
799
799
|
none: "hidden",
|
|
800
800
|
grid: "grid"
|
|
801
|
-
},
|
|
801
|
+
}, Me = {
|
|
802
802
|
row: "flex-row",
|
|
803
803
|
column: "flex-col",
|
|
804
804
|
"row-reverse": "flex-row-reverse",
|
|
805
805
|
"column-reverse": "flex-col-reverse"
|
|
806
|
-
},
|
|
806
|
+
}, Ne = {
|
|
807
807
|
"flex-start": "justify-start",
|
|
808
808
|
center: "justify-center",
|
|
809
809
|
"flex-end": "justify-end",
|
|
810
810
|
"space-between": "justify-between",
|
|
811
811
|
"space-around": "justify-around",
|
|
812
812
|
"space-evenly": "justify-evenly"
|
|
813
|
-
},
|
|
813
|
+
}, Pe = {
|
|
814
814
|
"flex-start": "items-start",
|
|
815
815
|
center: "items-center",
|
|
816
816
|
"flex-end": "items-end",
|
|
817
817
|
stretch: "items-stretch",
|
|
818
818
|
baseline: "items-baseline"
|
|
819
|
-
},
|
|
819
|
+
}, Fe = {
|
|
820
820
|
wrap: "flex-wrap",
|
|
821
821
|
nowrap: "flex-nowrap",
|
|
822
822
|
"wrap-reverse": "flex-wrap-reverse"
|
|
@@ -824,9 +824,9 @@ var Z = {
|
|
|
824
824
|
function Q(e) {
|
|
825
825
|
return typeof e == "number" ? `${e}px` : e;
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function Ie(e) {
|
|
828
828
|
let t = ["wc-box"];
|
|
829
|
-
if (e.display &&
|
|
829
|
+
if (e.display && je[e.display] && t.push(je[e.display]), e.flexDirection && Me[e.flexDirection] && t.push(Me[e.flexDirection]), e.justifyContent && Ne[e.justifyContent] && t.push(Ne[e.justifyContent]), e.alignItems && Pe[e.alignItems] && t.push(Pe[e.alignItems]), e.flexWrap && Fe[e.flexWrap] && t.push(Fe[e.flexWrap]), e.gap !== void 0) {
|
|
830
830
|
let n = e.gap.toString();
|
|
831
831
|
[
|
|
832
832
|
"0",
|
|
@@ -846,7 +846,7 @@ function Fe(e) {
|
|
|
846
846
|
}
|
|
847
847
|
return t;
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function Le(e) {
|
|
850
850
|
let t = {};
|
|
851
851
|
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) {
|
|
852
852
|
let n = Z[e.px] || Q(e.px);
|
|
@@ -868,9 +868,9 @@ function Ie(e) {
|
|
|
868
868
|
}
|
|
869
869
|
//#endregion
|
|
870
870
|
//#region src/components/Box/Box.jsx
|
|
871
|
-
function
|
|
871
|
+
function Re({ 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 }) {
|
|
872
872
|
return /* @__PURE__ */ p(e, {
|
|
873
|
-
className:
|
|
873
|
+
className: Ie({
|
|
874
874
|
display: v,
|
|
875
875
|
flexDirection: y,
|
|
876
876
|
justifyContent: b,
|
|
@@ -879,7 +879,7 @@ function Le({ component: e = "div", children: t, className: n = "", p: r, pt: i,
|
|
|
879
879
|
gap: C
|
|
880
880
|
}).concat(n).filter(Boolean).join(" "),
|
|
881
881
|
style: {
|
|
882
|
-
...
|
|
882
|
+
...Le({
|
|
883
883
|
p: r,
|
|
884
884
|
pt: i,
|
|
885
885
|
pr: a,
|
|
@@ -919,7 +919,7 @@ function Le({ component: e = "div", children: t, className: n = "", p: r, pt: i,
|
|
|
919
919
|
}
|
|
920
920
|
//#endregion
|
|
921
921
|
//#region src/components/Breadcrumb/utils.js
|
|
922
|
-
function
|
|
922
|
+
function ze(e, t, n, r) {
|
|
923
923
|
let i = [...e];
|
|
924
924
|
if (t && i.length && i[0].label !== "首页" && i.unshift({
|
|
925
925
|
label: "首页",
|
|
@@ -939,45 +939,45 @@ function Re(e, t, n, r) {
|
|
|
939
939
|
}
|
|
940
940
|
return i;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function Be(e) {
|
|
943
943
|
return `wc-breadcrumb wc-breadcrumb--${e}`;
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function Ve(e, t) {
|
|
946
946
|
let n = ["wc-breadcrumb-item"];
|
|
947
947
|
return e === t - 1 && n.push("wc-breadcrumb-item--current"), n.join(" ");
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function He(e) {
|
|
950
950
|
let t = ["wc-breadcrumb-link"];
|
|
951
951
|
return e && t.push("wc-breadcrumb-link--disabled"), t.join(" ");
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Ue(e, t, n, r, i) {
|
|
954
954
|
return t.disabled || t.isEllipsis || n === r - 1 ? (e.preventDefault(), !1) : (i && i(e, t, n), !0);
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function We(e, t, n, r) {
|
|
957
957
|
return e !== t - 1 && !n && !r;
|
|
958
958
|
}
|
|
959
959
|
//#endregion
|
|
960
960
|
//#region src/components/Breadcrumb/Breadcrumb.jsx
|
|
961
|
-
function
|
|
962
|
-
let { messages: c } =
|
|
961
|
+
function Ge({ items: t = [], separator: n = "/", variant: r = "default", showHome: i = !1, homeIcon: a = "🏠", maxItems: o = 0, onItemClick: s }) {
|
|
962
|
+
let { messages: c } = J(), l = e.useMemo(() => ze(t, i, a, o), [
|
|
963
963
|
t,
|
|
964
964
|
i,
|
|
965
965
|
a,
|
|
966
966
|
o
|
|
967
967
|
]), u = (e, t, n) => {
|
|
968
|
-
|
|
968
|
+
Ue(e, t, n, l.length, s);
|
|
969
969
|
};
|
|
970
970
|
return /* @__PURE__ */ p("nav", {
|
|
971
|
-
className:
|
|
971
|
+
className: Be(r),
|
|
972
972
|
"aria-label": c.breadcrumb,
|
|
973
973
|
role: "navigation",
|
|
974
974
|
children: /* @__PURE__ */ p("ol", {
|
|
975
975
|
className: "wc-breadcrumb-list",
|
|
976
976
|
children: l.map((e, t) => /* @__PURE__ */ m("li", {
|
|
977
|
-
className:
|
|
978
|
-
children: [
|
|
977
|
+
className: Ve(t, l.length),
|
|
978
|
+
children: [We(t, l.length, e.disabled, e.isEllipsis) ? e.href ? /* @__PURE__ */ m("a", {
|
|
979
979
|
href: e.href,
|
|
980
|
-
className:
|
|
980
|
+
className: He(e.disabled),
|
|
981
981
|
onClick: (n) => u(n, e, t),
|
|
982
982
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
983
983
|
className: "wc-breadcrumb-icon",
|
|
@@ -986,13 +986,13 @@ function We({ items: t = [], separator: n = "/", variant: r = "default", showHom
|
|
|
986
986
|
}) : /* @__PURE__ */ m("button", {
|
|
987
987
|
type: "button",
|
|
988
988
|
onClick: (n) => u(n, e, t),
|
|
989
|
-
className:
|
|
989
|
+
className: He(e.disabled),
|
|
990
990
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
991
991
|
className: "wc-breadcrumb-icon",
|
|
992
992
|
dangerouslySetInnerHTML: { __html: e.icon }
|
|
993
993
|
}), e.label]
|
|
994
994
|
}) : /* @__PURE__ */ m("span", {
|
|
995
|
-
className:
|
|
995
|
+
className: He(!0),
|
|
996
996
|
"aria-current": "page",
|
|
997
997
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
998
998
|
className: "wc-breadcrumb-icon",
|
|
@@ -1008,7 +1008,7 @@ function We({ items: t = [], separator: n = "/", variant: r = "default", showHom
|
|
|
1008
1008
|
}
|
|
1009
1009
|
//#endregion
|
|
1010
1010
|
//#region src/components/Button/utils.js
|
|
1011
|
-
var
|
|
1011
|
+
var Ke = [
|
|
1012
1012
|
"primary",
|
|
1013
1013
|
"secondary",
|
|
1014
1014
|
"filled",
|
|
@@ -1023,23 +1023,23 @@ var Ge = [
|
|
|
1023
1023
|
"cyan",
|
|
1024
1024
|
"pink"
|
|
1025
1025
|
];
|
|
1026
|
-
function Ke(e) {
|
|
1027
|
-
return Ge.includes(e);
|
|
1028
|
-
}
|
|
1029
1026
|
function qe(e) {
|
|
1030
|
-
return Ke(e)
|
|
1027
|
+
return Ke.includes(e);
|
|
1031
1028
|
}
|
|
1032
1029
|
function Je(e) {
|
|
1030
|
+
return qe(e) ? e : "primary";
|
|
1031
|
+
}
|
|
1032
|
+
function Ye(e) {
|
|
1033
1033
|
let { variant: t, size: n, disabled: r, loading: i, fullWidth: a, uppercase: o, rounded: s, buttonStyle: c = "default" } = e, l = ["wc-btn"];
|
|
1034
|
-
return l.push(`wc-btn--style-${c}`), l.push(`wc-btn--${
|
|
1034
|
+
return l.push(`wc-btn--style-${c}`), l.push(`wc-btn--${Je(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;
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function Xe({ event: e, disabled: t, loading: n, href: r, target: i, onClick: a }) {
|
|
1037
1037
|
!t && !n && (r && window.open(r, i), a?.(e));
|
|
1038
1038
|
}
|
|
1039
1039
|
//#endregion
|
|
1040
1040
|
//#region src/components/Button/Button.jsx
|
|
1041
|
-
var
|
|
1042
|
-
let T =
|
|
1041
|
+
var Ze = ({ 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 }) => {
|
|
1042
|
+
let T = Ye({
|
|
1043
1043
|
variant: t,
|
|
1044
1044
|
buttonStyle: n,
|
|
1045
1045
|
size: r,
|
|
@@ -1049,7 +1049,7 @@ var Xe = ({ children: e, variant: t = "primary", buttonStyle: n = "default", siz
|
|
|
1049
1049
|
uppercase: h,
|
|
1050
1050
|
rounded: f
|
|
1051
1051
|
}).concat(S).filter(Boolean).join(" "), E = { ...C }, D = (e) => {
|
|
1052
|
-
|
|
1052
|
+
Xe({
|
|
1053
1053
|
event: e,
|
|
1054
1054
|
disabled: i,
|
|
1055
1055
|
loading: a,
|
|
@@ -1113,10 +1113,10 @@ var Xe = ({ children: e, variant: t = "primary", buttonStyle: n = "default", siz
|
|
|
1113
1113
|
]
|
|
1114
1114
|
});
|
|
1115
1115
|
};
|
|
1116
|
-
|
|
1116
|
+
Ze.displayName = "Button";
|
|
1117
1117
|
//#endregion
|
|
1118
1118
|
//#region src/components/Card/CardActions.jsx
|
|
1119
|
-
var
|
|
1119
|
+
var Qe = ({ children: e, disableSpacing: t = !1, disablePadding: n = !1, justifyContent: r = "flex-start", className: i = "", ...a }) => /* @__PURE__ */ p("div", {
|
|
1120
1120
|
className: [
|
|
1121
1121
|
"wc-card-actions",
|
|
1122
1122
|
"wc-flex",
|
|
@@ -1135,10 +1135,10 @@ var Ze = ({ children: e, disableSpacing: t = !1, disablePadding: n = !1, justify
|
|
|
1135
1135
|
...a,
|
|
1136
1136
|
children: e
|
|
1137
1137
|
});
|
|
1138
|
-
|
|
1138
|
+
Qe.displayName = "CardActions";
|
|
1139
1139
|
//#endregion
|
|
1140
1140
|
//#region src/components/Card/CardContent.jsx
|
|
1141
|
-
var
|
|
1141
|
+
var $e = ({ children: e, disablePadding: t = !1, padding: n = "normal", className: r = "", ...i }) => /* @__PURE__ */ p("div", {
|
|
1142
1142
|
className: [
|
|
1143
1143
|
"wc-card-content",
|
|
1144
1144
|
!t && {
|
|
@@ -1152,22 +1152,22 @@ var Qe = ({ children: e, disablePadding: t = !1, padding: n = "normal", classNam
|
|
|
1152
1152
|
...i,
|
|
1153
1153
|
children: e
|
|
1154
1154
|
});
|
|
1155
|
-
|
|
1155
|
+
$e.displayName = "CardContent";
|
|
1156
1156
|
//#endregion
|
|
1157
1157
|
//#region src/components/Checkbox/Checkbox.jsx
|
|
1158
|
-
var
|
|
1158
|
+
var et = [
|
|
1159
1159
|
"primary",
|
|
1160
1160
|
"secondary",
|
|
1161
1161
|
"success",
|
|
1162
1162
|
"warning",
|
|
1163
1163
|
"error",
|
|
1164
1164
|
"info"
|
|
1165
|
-
],
|
|
1165
|
+
], tt = [
|
|
1166
1166
|
"sm",
|
|
1167
1167
|
"md",
|
|
1168
1168
|
"lg"
|
|
1169
|
-
],
|
|
1170
|
-
let _ = s(), [v, y] = d(!1), b =
|
|
1169
|
+
], nt = ({ 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 }) => {
|
|
1170
|
+
let _ = s(), [v, y] = d(!1), b = et.includes(o) ? o : "primary", x = tt.includes(a) ? a : "md", S = [
|
|
1171
1171
|
"wc-checkbox",
|
|
1172
1172
|
`wc-checkbox--${x}`,
|
|
1173
1173
|
(e || n) && (n ? "wc-checkbox--indeterminate" : "wc-checkbox--checked"),
|
|
@@ -1237,26 +1237,26 @@ var $e = [
|
|
|
1237
1237
|
]
|
|
1238
1238
|
});
|
|
1239
1239
|
};
|
|
1240
|
-
|
|
1240
|
+
nt.displayName = "Checkbox";
|
|
1241
1241
|
//#endregion
|
|
1242
1242
|
//#region src/components/Chip/utils.jsx
|
|
1243
|
-
function
|
|
1243
|
+
function rt(e) {
|
|
1244
1244
|
let { size: t = "md", variant: n = "filled", color: r = "default", clickable: i = !1, disabled: a = !1, className: o = "" } = e, s = ["wc-chip"];
|
|
1245
1245
|
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(" ");
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function it(e, t, n, r) {
|
|
1248
1248
|
t && !n && r && r(e);
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function at(e, t, n) {
|
|
1251
1251
|
e.stopPropagation(), !t && n && n(e);
|
|
1252
1252
|
}
|
|
1253
|
-
function
|
|
1253
|
+
function ot() {
|
|
1254
1254
|
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";
|
|
1255
1255
|
}
|
|
1256
1256
|
//#endregion
|
|
1257
1257
|
//#region src/components/Chip/Chip.jsx
|
|
1258
|
-
function
|
|
1259
|
-
let { messages: g } =
|
|
1258
|
+
function st({ 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 }) {
|
|
1259
|
+
let { messages: g } = J(), _ = rt({
|
|
1260
1260
|
size: o,
|
|
1261
1261
|
variant: a,
|
|
1262
1262
|
color: s,
|
|
@@ -1264,9 +1264,9 @@ function ot({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1264
1264
|
disabled: r,
|
|
1265
1265
|
className: f
|
|
1266
1266
|
}), v = (e) => {
|
|
1267
|
-
|
|
1267
|
+
it(e, i, r, l);
|
|
1268
1268
|
}, y = (e) => {
|
|
1269
|
-
|
|
1269
|
+
at(e, r, u);
|
|
1270
1270
|
}, b = (e) => {
|
|
1271
1271
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), v(e));
|
|
1272
1272
|
};
|
|
@@ -1305,7 +1305,7 @@ function ot({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1305
1305
|
"aria-hidden": "true",
|
|
1306
1306
|
children: /* @__PURE__ */ p("path", {
|
|
1307
1307
|
fillRule: "evenodd",
|
|
1308
|
-
d:
|
|
1308
|
+
d: ot(),
|
|
1309
1309
|
clipRule: "evenodd"
|
|
1310
1310
|
})
|
|
1311
1311
|
})
|
|
@@ -1315,7 +1315,7 @@ function ot({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1315
1315
|
}
|
|
1316
1316
|
//#endregion
|
|
1317
1317
|
//#region src/components/CircularProgress/utils.js
|
|
1318
|
-
function
|
|
1318
|
+
function ct(e, t) {
|
|
1319
1319
|
let n = typeof e == "string" ? parseInt(e, 10) : e, r = n / 2, i = (n - t) / 2;
|
|
1320
1320
|
return {
|
|
1321
1321
|
sizeNumber: n,
|
|
@@ -1324,21 +1324,21 @@ function st(e, t) {
|
|
|
1324
1324
|
circumference: 2 * Math.PI * i
|
|
1325
1325
|
};
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function lt(e, t, n) {
|
|
1328
1328
|
return e === "determinate" ? n - t / 100 * n : 0;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function ut(e) {
|
|
1331
1331
|
let { color: t = "primary", variant: n = "indeterminate", overlay: r = !1, centered: i = !1, inline: a = !1, className: o = "" } = e, s = ["wc-circular-progress"];
|
|
1332
1332
|
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);
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1334
|
+
function dt(e) {
|
|
1335
1335
|
let t = ["wc-circular-progress-circle"];
|
|
1336
1336
|
return e === "indeterminate" && t.push("wc-circular-progress-circle--indeterminate"), t.filter(Boolean);
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1338
|
+
function ft(e) {
|
|
1339
1339
|
return Math.round(e);
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1341
|
+
function pt(e) {
|
|
1342
1342
|
let { value: t = 0, variant: n } = e, r = {
|
|
1343
1343
|
role: "progressbar",
|
|
1344
1344
|
"aria-valuemin": 0,
|
|
@@ -1348,15 +1348,15 @@ function ft(e) {
|
|
|
1348
1348
|
}
|
|
1349
1349
|
//#endregion
|
|
1350
1350
|
//#region src/components/CircularProgress/CircularProgress.jsx
|
|
1351
|
-
function
|
|
1352
|
-
let { messages: d } =
|
|
1351
|
+
function mt({ 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 }) {
|
|
1352
|
+
let { messages: d } = J(), { sizeNumber: f, center: h, radius: g, circumference: _ } = ct(t, n), v = lt(r, e, _), y = ut({
|
|
1353
1353
|
color: i,
|
|
1354
1354
|
variant: r,
|
|
1355
1355
|
overlay: o,
|
|
1356
1356
|
centered: s,
|
|
1357
1357
|
inline: c,
|
|
1358
1358
|
className: l
|
|
1359
|
-
}).join(" "), b =
|
|
1359
|
+
}).join(" "), b = dt(r).join(" "), x = pt({
|
|
1360
1360
|
value: e,
|
|
1361
1361
|
variant: r
|
|
1362
1362
|
});
|
|
@@ -1391,51 +1391,303 @@ function pt({ value: e = 0, size: t = 40, thickness: n = 3.6, variant: r = "inde
|
|
|
1391
1391
|
})]
|
|
1392
1392
|
}), a && /* @__PURE__ */ m("div", {
|
|
1393
1393
|
className: "wc-circular-progress-value",
|
|
1394
|
-
children: [
|
|
1394
|
+
children: [ft(e), "%"]
|
|
1395
1395
|
})]
|
|
1396
1396
|
});
|
|
1397
1397
|
}
|
|
1398
1398
|
//#endregion
|
|
1399
1399
|
//#region src/components/ColorPicker/utils.js
|
|
1400
|
-
function
|
|
1400
|
+
function ht(e) {
|
|
1401
|
+
return /^#([0-9A-F]{3}){1,2}$/i.test(e);
|
|
1402
|
+
}
|
|
1403
|
+
function gt(e) {
|
|
1401
1404
|
let { size: t = "md", shape: n = "circle", disabled: r = !1, className: i = "" } = e, a = ["wc-color-picker"];
|
|
1402
1405
|
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);
|
|
1403
1406
|
}
|
|
1404
|
-
function
|
|
1405
|
-
!t && n && n(e.target.value);
|
|
1406
|
-
}
|
|
1407
|
-
function gt(e) {
|
|
1407
|
+
function _t(e) {
|
|
1408
1408
|
return { backgroundColor: e };
|
|
1409
1409
|
}
|
|
1410
1410
|
//#endregion
|
|
1411
1411
|
//#region src/components/ColorPicker/ColorPicker.jsx
|
|
1412
|
-
|
|
1413
|
-
|
|
1412
|
+
var vt = [
|
|
1413
|
+
"#111827",
|
|
1414
|
+
"#4b5563",
|
|
1415
|
+
"#ffffff",
|
|
1416
|
+
"#2563eb",
|
|
1417
|
+
"#7c3aed",
|
|
1418
|
+
"#db2777",
|
|
1419
|
+
"#dc2626",
|
|
1420
|
+
"#ea580c",
|
|
1421
|
+
"#d97706",
|
|
1422
|
+
"#16a34a",
|
|
1423
|
+
"#0891b2",
|
|
1424
|
+
"#0f766e"
|
|
1425
|
+
];
|
|
1426
|
+
function yt(e) {
|
|
1427
|
+
if (!e || typeof e != "string") return "#ffffff";
|
|
1428
|
+
let t = e.trim();
|
|
1429
|
+
return ht(t) ? t.length === 4 ? `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`.toLowerCase() : t.toLowerCase() : "#ffffff";
|
|
1430
|
+
}
|
|
1431
|
+
function bt({ value: e = "#ffffff", onChange: t, size: n = "md", shape: r = "circle", disabled: i = !1, swatches: a = vt, className: s = "" }) {
|
|
1432
|
+
let { messages: c } = J(), l = yt(e), [f, h] = d(!1), [g, _] = d(l), v = u(null), y = u(null);
|
|
1433
|
+
o(() => {
|
|
1434
|
+
_(l);
|
|
1435
|
+
}, [l]);
|
|
1436
|
+
let b = () => {
|
|
1437
|
+
h(!1);
|
|
1438
|
+
};
|
|
1439
|
+
ce({
|
|
1440
|
+
open: f,
|
|
1441
|
+
elementRef: y,
|
|
1442
|
+
refs: [v],
|
|
1443
|
+
closeOnEscape: !0,
|
|
1444
|
+
closeOnPointerDownOutside: !0,
|
|
1445
|
+
onEscapeKeyDown: b,
|
|
1446
|
+
onPointerDownOutside: b,
|
|
1447
|
+
zIndex: 1e3
|
|
1448
|
+
});
|
|
1449
|
+
let x = gt({
|
|
1414
1450
|
size: n,
|
|
1415
1451
|
shape: r,
|
|
1416
1452
|
disabled: i,
|
|
1417
|
-
className:
|
|
1418
|
-
}).join(" "), l =
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1453
|
+
className: s
|
|
1454
|
+
}).join(" "), S = _t(l), C = (e) => {
|
|
1455
|
+
let n = yt(e);
|
|
1456
|
+
_(n), t?.(n);
|
|
1457
|
+
}, w = (e) => {
|
|
1458
|
+
let t = e.target.value;
|
|
1459
|
+
_(t), ht(t) && C(t);
|
|
1460
|
+
}, T = () => {
|
|
1461
|
+
i || h((e) => !e);
|
|
1462
|
+
};
|
|
1463
|
+
return /* @__PURE__ */ m("span", {
|
|
1464
|
+
className: x,
|
|
1465
|
+
ref: v,
|
|
1466
|
+
children: [/* @__PURE__ */ p("button", {
|
|
1467
|
+
type: "button",
|
|
1427
1468
|
disabled: i,
|
|
1428
|
-
className: "wc-color-
|
|
1429
|
-
"aria-label":
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1469
|
+
className: "wc-color-picker__trigger",
|
|
1470
|
+
"aria-label": c.colorPicker,
|
|
1471
|
+
"aria-haspopup": "dialog",
|
|
1472
|
+
"aria-expanded": f,
|
|
1473
|
+
onClick: T,
|
|
1474
|
+
children: /* @__PURE__ */ p("span", {
|
|
1475
|
+
className: "wc-color-picker__preview",
|
|
1476
|
+
style: S
|
|
1477
|
+
})
|
|
1478
|
+
}), f && /* @__PURE__ */ m("div", {
|
|
1479
|
+
className: "wc-color-picker__popover",
|
|
1480
|
+
ref: y,
|
|
1481
|
+
role: "dialog",
|
|
1482
|
+
"aria-label": c.colorPicker,
|
|
1483
|
+
children: [/* @__PURE__ */ m("div", {
|
|
1484
|
+
className: "wc-color-picker__current",
|
|
1485
|
+
children: [/* @__PURE__ */ p("span", {
|
|
1486
|
+
className: "wc-color-picker__current-preview",
|
|
1487
|
+
style: S
|
|
1488
|
+
}), /* @__PURE__ */ m("label", {
|
|
1489
|
+
className: "wc-color-picker__field",
|
|
1490
|
+
children: [/* @__PURE__ */ p("span", {
|
|
1491
|
+
className: "wc-color-picker__field-label",
|
|
1492
|
+
children: "Hex"
|
|
1493
|
+
}), /* @__PURE__ */ p("input", {
|
|
1494
|
+
className: "wc-color-picker__hex-input",
|
|
1495
|
+
value: g,
|
|
1496
|
+
onChange: w,
|
|
1497
|
+
onBlur: () => _(l),
|
|
1498
|
+
spellCheck: !1,
|
|
1499
|
+
inputMode: "text"
|
|
1500
|
+
})]
|
|
1501
|
+
})]
|
|
1502
|
+
}), /* @__PURE__ */ p("div", {
|
|
1503
|
+
className: "wc-color-picker__swatches",
|
|
1504
|
+
role: "listbox",
|
|
1505
|
+
"aria-label": "Color swatches",
|
|
1506
|
+
children: a.map((e) => {
|
|
1507
|
+
let t = yt(e), n = t === l;
|
|
1508
|
+
return /* @__PURE__ */ p("button", {
|
|
1509
|
+
type: "button",
|
|
1510
|
+
className: `wc-color-picker__swatch ${n ? "wc-color-picker__swatch--selected" : ""}`,
|
|
1511
|
+
style: _t(t),
|
|
1512
|
+
"aria-label": t,
|
|
1513
|
+
"aria-selected": n,
|
|
1514
|
+
role: "option",
|
|
1515
|
+
onClick: () => C(t)
|
|
1516
|
+
}, t);
|
|
1517
|
+
})
|
|
1518
|
+
})]
|
|
1519
|
+
})]
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
//#endregion
|
|
1523
|
+
//#region src/components/CodeBlock/utils.js
|
|
1524
|
+
var xt = {
|
|
1525
|
+
javascript: /* @__PURE__ */ "await.async.break.case.catch.class.const.continue.default.else.export.extends.finally.for.from.function.if.import.let.new.return.switch.throw.try.typeof.var.while".split("."),
|
|
1526
|
+
typescript: /* @__PURE__ */ "await.async.break.case.catch.class.const.continue.default.else.export.extends.finally.for.from.function.if.import.interface.let.new.return.type.switch.throw.try.typeof.var.while".split("."),
|
|
1527
|
+
python: /* @__PURE__ */ "and.as.async.await.class.def.elif.else.except.False.finally.for.from.if.import.in.is.lambda.None.not.or.pass.raise.return.True.try.while.with.yield".split("."),
|
|
1528
|
+
json: [
|
|
1529
|
+
"true",
|
|
1530
|
+
"false",
|
|
1531
|
+
"null"
|
|
1532
|
+
],
|
|
1533
|
+
css: [
|
|
1534
|
+
"important",
|
|
1535
|
+
"media",
|
|
1536
|
+
"supports"
|
|
1537
|
+
],
|
|
1538
|
+
shell: [
|
|
1539
|
+
"cd",
|
|
1540
|
+
"cp",
|
|
1541
|
+
"curl",
|
|
1542
|
+
"echo",
|
|
1543
|
+
"export",
|
|
1544
|
+
"git",
|
|
1545
|
+
"grep",
|
|
1546
|
+
"mkdir",
|
|
1547
|
+
"npm",
|
|
1548
|
+
"pnpm",
|
|
1549
|
+
"rm",
|
|
1550
|
+
"yarn"
|
|
1551
|
+
]
|
|
1552
|
+
};
|
|
1553
|
+
function St(e = "") {
|
|
1554
|
+
let t = String(e || "").trim().toLowerCase();
|
|
1555
|
+
return t === "js" || t === "jsx" ? "javascript" : t === "ts" || t === "tsx" ? "typescript" : t === "py" ? "python" : t === "sh" || t === "bash" || t === "zsh" ? "shell" : t || "text";
|
|
1556
|
+
}
|
|
1557
|
+
function Ct(e = "") {
|
|
1558
|
+
let t = St(e);
|
|
1559
|
+
return {
|
|
1560
|
+
javascript: "JavaScript",
|
|
1561
|
+
typescript: "TypeScript",
|
|
1562
|
+
python: "Python",
|
|
1563
|
+
json: "JSON",
|
|
1564
|
+
shell: "Shell",
|
|
1565
|
+
css: "CSS",
|
|
1566
|
+
html: "HTML",
|
|
1567
|
+
diff: "Diff",
|
|
1568
|
+
text: "Text"
|
|
1569
|
+
}[t] || t.toUpperCase();
|
|
1570
|
+
}
|
|
1571
|
+
function wt(e = "", t = !1) {
|
|
1572
|
+
return t ? e.startsWith("+") && !e.startsWith("+++") ? "added" : e.startsWith("-") && !e.startsWith("---") ? "removed" : "context" : "context";
|
|
1573
|
+
}
|
|
1574
|
+
function Tt(e = "", t = !1) {
|
|
1575
|
+
let n = wt(e, t);
|
|
1576
|
+
return n === "added" || n === "removed" ? e.slice(1) : e;
|
|
1577
|
+
}
|
|
1578
|
+
function Et(e, t) {
|
|
1579
|
+
t && e.push({
|
|
1580
|
+
type: "text",
|
|
1581
|
+
value: t
|
|
1582
|
+
});
|
|
1583
|
+
}
|
|
1584
|
+
function Dt(e = "", t = "text") {
|
|
1585
|
+
let n = St(t), r = xt[n] || [], i = r.length ? r.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|") : null, a = new RegExp([
|
|
1586
|
+
"(?<comment>#.*$|//.*$|/\\*[\\s\\S]*?\\*/)",
|
|
1587
|
+
"(?<string>`[^`]*`|\"(?:\\\\.|[^\"\\\\])*\"|'(?:\\\\.|[^'\\\\])*')",
|
|
1588
|
+
"(?<number>\\b\\d+(?:\\.\\d+)?\\b)",
|
|
1589
|
+
n === "json" ? "(?<key>\"(?:\\\\.|[^\"\\\\])*\"(?=\\s*:))" : null,
|
|
1590
|
+
i ? `(?<keyword>\\b(?:${i})\\b)` : null,
|
|
1591
|
+
"(?<operator>[{}()[\\].,;:+\\-*/%=<>!|&]+)"
|
|
1592
|
+
].filter(Boolean).join("|"), "g"), o = [], s = 0;
|
|
1593
|
+
for (let t of e.matchAll(a)) {
|
|
1594
|
+
t.index > s && Et(o, e.slice(s, t.index));
|
|
1595
|
+
let n = t.groups || {}, r = Object.entries(n).find(([, e]) => e !== void 0)?.[0] || "text";
|
|
1596
|
+
o.push({
|
|
1597
|
+
type: r,
|
|
1598
|
+
value: t[0]
|
|
1599
|
+
}), s = t.index + t[0].length;
|
|
1600
|
+
}
|
|
1601
|
+
return Et(o, e.slice(s)), o;
|
|
1602
|
+
}
|
|
1603
|
+
async function Ot(e) {
|
|
1604
|
+
if (typeof navigator < "u" && navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
|
|
1605
|
+
if (typeof document > "u") return !1;
|
|
1606
|
+
let t = document.createElement("textarea");
|
|
1607
|
+
t.value = e, t.setAttribute("readonly", ""), t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select();
|
|
1608
|
+
let n = document.execCommand("copy");
|
|
1609
|
+
return document.body.removeChild(t), n;
|
|
1610
|
+
}
|
|
1611
|
+
//#endregion
|
|
1612
|
+
//#region src/components/CodeBlock/CodeBlock.jsx
|
|
1613
|
+
var kt = () => /* @__PURE__ */ m("svg", {
|
|
1614
|
+
className: "wc-code-block__icon",
|
|
1615
|
+
viewBox: "0 0 24 24",
|
|
1616
|
+
"aria-hidden": "true",
|
|
1617
|
+
children: [/* @__PURE__ */ p("path", { d: "M8 8h10v12H8z" }), /* @__PURE__ */ p("path", { d: "M6 16H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })]
|
|
1618
|
+
}), At = () => /* @__PURE__ */ p("svg", {
|
|
1619
|
+
className: "wc-code-block__icon",
|
|
1620
|
+
viewBox: "0 0 24 24",
|
|
1621
|
+
"aria-hidden": "true",
|
|
1622
|
+
children: /* @__PURE__ */ p("path", { d: "m5 12 4 4L19 6" })
|
|
1623
|
+
});
|
|
1624
|
+
function jt({ code: e = "", language: t = "text", title: n, showLanguage: r = !0, showLineNumbers: i = !0, showCopyButton: a = !0, diff: o = !1, wrap: s = !1, maxHeight: c, className: u = "", style: f, onCopy: h, ...g }) {
|
|
1625
|
+
let _ = St(o ? "diff" : t), [v, y] = d(!1), b = l(() => String(e ?? "").replace(/\n$/, "").split("\n"), [e]), x = async () => {
|
|
1626
|
+
await Ot(String(e ?? "")) && (y(!0), h?.(String(e ?? "")), window.setTimeout(() => y(!1), 1400));
|
|
1627
|
+
};
|
|
1628
|
+
return /* @__PURE__ */ m("figure", {
|
|
1629
|
+
className: [
|
|
1630
|
+
"wc-code-block",
|
|
1631
|
+
s && "wc-code-block--wrap",
|
|
1632
|
+
o && "wc-code-block--diff",
|
|
1633
|
+
u
|
|
1634
|
+
].filter(Boolean).join(" "),
|
|
1635
|
+
style: f,
|
|
1636
|
+
...g,
|
|
1637
|
+
children: [/* @__PURE__ */ m("figcaption", {
|
|
1638
|
+
className: "wc-code-block__header",
|
|
1639
|
+
children: [/* @__PURE__ */ p("span", {
|
|
1640
|
+
className: "wc-code-block__title",
|
|
1641
|
+
children: n || (r ? Ct(_) : "Code")
|
|
1642
|
+
}), /* @__PURE__ */ m("div", {
|
|
1643
|
+
className: "wc-code-block__actions",
|
|
1644
|
+
children: [r && n && /* @__PURE__ */ p("span", {
|
|
1645
|
+
className: "wc-code-block__language",
|
|
1646
|
+
children: Ct(_)
|
|
1647
|
+
}), a && /* @__PURE__ */ p("button", {
|
|
1648
|
+
className: "wc-code-block__copy",
|
|
1649
|
+
type: "button",
|
|
1650
|
+
onClick: x,
|
|
1651
|
+
"aria-label": v ? "Copied code" : "Copy code",
|
|
1652
|
+
title: v ? "已复制" : "复制代码",
|
|
1653
|
+
children: p(v ? At : kt, {})
|
|
1654
|
+
})]
|
|
1655
|
+
})]
|
|
1656
|
+
}), /* @__PURE__ */ p("pre", {
|
|
1657
|
+
className: "wc-code-block__pre",
|
|
1658
|
+
style: c ? { maxHeight: c } : void 0,
|
|
1659
|
+
children: /* @__PURE__ */ p("code", {
|
|
1660
|
+
className: `language-${_}`,
|
|
1661
|
+
children: b.map((e, t) => {
|
|
1662
|
+
let n = wt(e, o), r = Tt(e, o);
|
|
1663
|
+
return /* @__PURE__ */ m("span", {
|
|
1664
|
+
className: `wc-code-block__line wc-code-block__line--${n}`,
|
|
1665
|
+
children: [
|
|
1666
|
+
i && /* @__PURE__ */ p("span", {
|
|
1667
|
+
className: "wc-code-block__number",
|
|
1668
|
+
children: t + 1
|
|
1669
|
+
}),
|
|
1670
|
+
o && /* @__PURE__ */ p("span", {
|
|
1671
|
+
className: "wc-code-block__marker",
|
|
1672
|
+
children: n === "added" ? "+" : n === "removed" ? "−" : " "
|
|
1673
|
+
}),
|
|
1674
|
+
/* @__PURE__ */ m("span", {
|
|
1675
|
+
className: "wc-code-block__code",
|
|
1676
|
+
children: [Dt(r, _).map((e, t) => /* @__PURE__ */ p("span", {
|
|
1677
|
+
className: `wc-code-token wc-code-token--${e.type}`,
|
|
1678
|
+
children: e.value
|
|
1679
|
+
}, `${t}-${e.value}`)), r === "" ? "\n" : null]
|
|
1680
|
+
})
|
|
1681
|
+
]
|
|
1682
|
+
}, `${t}-${e}`);
|
|
1683
|
+
})
|
|
1684
|
+
})
|
|
1433
1685
|
})]
|
|
1434
1686
|
});
|
|
1435
1687
|
}
|
|
1436
1688
|
//#endregion
|
|
1437
1689
|
//#region src/components/Container/utils.js
|
|
1438
|
-
var
|
|
1690
|
+
var Mt = {
|
|
1439
1691
|
xs: "max-w-xs",
|
|
1440
1692
|
sm: "max-w-sm",
|
|
1441
1693
|
md: "max-w-md",
|
|
@@ -1443,15 +1695,15 @@ var vt = {
|
|
|
1443
1695
|
xl: "max-w-6xl",
|
|
1444
1696
|
"2xl": "max-w-7xl"
|
|
1445
1697
|
};
|
|
1446
|
-
function
|
|
1698
|
+
function Nt(e) {
|
|
1447
1699
|
let { maxWidth: t = "lg", fluid: n = !1, fixed: r = !1, className: i = "" } = e, a = ["mx-auto px-4 sm:px-6 lg:px-8"];
|
|
1448
|
-
return n || r ? a.push("w-full") : t &&
|
|
1700
|
+
return n || r ? a.push("w-full") : t && Mt[t] && a.push(Mt[t]), i && a.push(i), a.filter(Boolean);
|
|
1449
1701
|
}
|
|
1450
1702
|
//#endregion
|
|
1451
1703
|
//#region src/components/Container/Container.jsx
|
|
1452
|
-
function
|
|
1704
|
+
function Pt({ maxWidth: e = "lg", fluid: t = !1, fixed: n = !1, className: r = "", children: i }) {
|
|
1453
1705
|
return /* @__PURE__ */ p("div", {
|
|
1454
|
-
className:
|
|
1706
|
+
className: Nt({
|
|
1455
1707
|
maxWidth: e,
|
|
1456
1708
|
fluid: t,
|
|
1457
1709
|
fixed: n,
|
|
@@ -1462,17 +1714,17 @@ function bt({ maxWidth: e = "lg", fluid: t = !1, fixed: n = !1, className: r = "
|
|
|
1462
1714
|
}
|
|
1463
1715
|
//#endregion
|
|
1464
1716
|
//#region src/components/Copy/utils.js
|
|
1465
|
-
function
|
|
1717
|
+
function Ft(e) {
|
|
1466
1718
|
let { variant: t = "default", size: n = "md", copied: r = !1, copyError: i = !1, className: a = "" } = e, o = ["wc-copy"];
|
|
1467
1719
|
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);
|
|
1468
1720
|
}
|
|
1469
|
-
function
|
|
1721
|
+
function It(e, t, n, r) {
|
|
1470
1722
|
return t ? "错误" : e ? r : n;
|
|
1471
1723
|
}
|
|
1472
|
-
function
|
|
1724
|
+
function Lt(e, t, n, r) {
|
|
1473
1725
|
return t ? r : e ? n : "";
|
|
1474
1726
|
}
|
|
1475
|
-
async function
|
|
1727
|
+
async function Rt(e) {
|
|
1476
1728
|
try {
|
|
1477
1729
|
if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
|
|
1478
1730
|
{
|
|
@@ -1485,18 +1737,18 @@ async function wt(e) {
|
|
|
1485
1737
|
return console.warn("复制失败:", e), !1;
|
|
1486
1738
|
}
|
|
1487
1739
|
}
|
|
1488
|
-
async function
|
|
1489
|
-
await
|
|
1740
|
+
async function zt(e, t, n, r, i, a, o, s) {
|
|
1741
|
+
await Rt(e) ? (r(!0), i(!1), t(e)) : (r(!1), i(!0), n(/* @__PURE__ */ Error("复制失败"))), o && a && (a(!0), setTimeout(() => a(!1), 1500)), setTimeout(() => {
|
|
1490
1742
|
r(!1), i(!1);
|
|
1491
1743
|
}, s);
|
|
1492
1744
|
}
|
|
1493
|
-
function
|
|
1745
|
+
function Bt(e, t) {
|
|
1494
1746
|
let n = "wc-copy-tooltip";
|
|
1495
1747
|
return e && (n += " wc-copy-tooltip--success"), t && (n += " wc-copy-tooltip--error"), n;
|
|
1496
1748
|
}
|
|
1497
1749
|
//#endregion
|
|
1498
1750
|
//#region src/components/Copy/Copy.jsx
|
|
1499
|
-
var
|
|
1751
|
+
var Vt = ({ copied: e, error: t }) => e ? /* @__PURE__ */ m("svg", {
|
|
1500
1752
|
viewBox: "0 0 20 20",
|
|
1501
1753
|
fill: "none",
|
|
1502
1754
|
stroke: "currentColor",
|
|
@@ -1536,15 +1788,15 @@ var Dt = ({ copied: e, error: t }) => e ? /* @__PURE__ */ m("svg", {
|
|
|
1536
1788
|
rx: "2"
|
|
1537
1789
|
}), /* @__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" })]
|
|
1538
1790
|
});
|
|
1539
|
-
function
|
|
1540
|
-
let [v, y] = d(!1), [b, x] = d(!1), [S, C] = d(!1), w =
|
|
1791
|
+
function Ht({ 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: _ }) {
|
|
1792
|
+
let [v, y] = d(!1), [b, x] = d(!1), [S, C] = d(!1), w = Ft({
|
|
1541
1793
|
variant: t,
|
|
1542
1794
|
size: n,
|
|
1543
1795
|
copied: v,
|
|
1544
1796
|
copyError: b,
|
|
1545
1797
|
className: h
|
|
1546
|
-
}).join(" "), T =
|
|
1547
|
-
await
|
|
1798
|
+
}).join(" "), T = It(v, b, a, o), E = Lt(v, b, s, c), D = Bt(v, b), O = async () => {
|
|
1799
|
+
await zt(e, u, f, y, x, C, i, l);
|
|
1548
1800
|
}, k = (e) => {
|
|
1549
1801
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), O());
|
|
1550
1802
|
};
|
|
@@ -1564,7 +1816,7 @@ function Ot({ text: e, variant: t = "default", size: n = "md", showLabel: r = !0
|
|
|
1564
1816
|
className: "wc-copy-action",
|
|
1565
1817
|
children: [_ ? /* @__PURE__ */ p(_, { className: "wc-copy-icon" }) : /* @__PURE__ */ p("span", {
|
|
1566
1818
|
className: "wc-copy-icon",
|
|
1567
|
-
children: /* @__PURE__ */ p(
|
|
1819
|
+
children: /* @__PURE__ */ p(Vt, {
|
|
1568
1820
|
copied: v,
|
|
1569
1821
|
error: b
|
|
1570
1822
|
})
|
|
@@ -1583,20 +1835,20 @@ function Ot({ text: e, variant: t = "default", size: n = "md", showLabel: r = !0
|
|
|
1583
1835
|
}
|
|
1584
1836
|
//#endregion
|
|
1585
1837
|
//#region src/components/DatePicker/utils.js
|
|
1586
|
-
function
|
|
1838
|
+
function Ut(e, t = "YYYY-MM-DD") {
|
|
1587
1839
|
if (!e || !(e instanceof Date)) return "";
|
|
1588
1840
|
let n = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getDate()).padStart(2, "0");
|
|
1589
1841
|
return t.replace("YYYY", n).replace("MM", r).replace("DD", i);
|
|
1590
1842
|
}
|
|
1591
|
-
function
|
|
1843
|
+
function Wt(e) {
|
|
1592
1844
|
if (!e) return !1;
|
|
1593
1845
|
let t = /* @__PURE__ */ new Date();
|
|
1594
1846
|
return e.toDateString() === t.toDateString();
|
|
1595
1847
|
}
|
|
1596
|
-
function
|
|
1848
|
+
function Gt(e, t) {
|
|
1597
1849
|
return !e || !t ? !1 : e.toDateString() === t.toDateString();
|
|
1598
1850
|
}
|
|
1599
|
-
function
|
|
1851
|
+
function Kt(e) {
|
|
1600
1852
|
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);
|
|
1601
1853
|
for (let e = a - 1; e >= 0; e--) s.push({
|
|
1602
1854
|
day: c.getDate() - e,
|
|
@@ -1616,7 +1868,7 @@ function Mt(e) {
|
|
|
1616
1868
|
});
|
|
1617
1869
|
return s;
|
|
1618
1870
|
}
|
|
1619
|
-
function
|
|
1871
|
+
function qt(e = "md", t = "default", n = !1, r = !1, i = !1) {
|
|
1620
1872
|
let a = [
|
|
1621
1873
|
"wc-datepicker-wrapper",
|
|
1622
1874
|
`wc-datepicker-wrapper--${e}`,
|
|
@@ -1624,17 +1876,17 @@ function Nt(e = "md", t = "default", n = !1, r = !1, i = !1) {
|
|
|
1624
1876
|
];
|
|
1625
1877
|
return n && a.push("wc-datepicker-wrapper--disabled"), r && a.push("wc-datepicker-wrapper--focused"), i && a.push("wc-datepicker-wrapper--open"), a.join(" ");
|
|
1626
1878
|
}
|
|
1627
|
-
function
|
|
1879
|
+
function Jt(e, t) {
|
|
1628
1880
|
let n = ["wc-datepicker-day"];
|
|
1629
|
-
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 &&
|
|
1881
|
+
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 && Gt(e.date, t) && n.push("wc-datepicker-day--selected"), Wt(e.date) && n.push("wc-datepicker-day--today"), n.join(" ");
|
|
1630
1882
|
}
|
|
1631
1883
|
//#endregion
|
|
1632
1884
|
//#region src/components/DatePicker/DatePicker.jsx
|
|
1633
|
-
function
|
|
1634
|
-
let { messages: v } =
|
|
1885
|
+
function Yt({ 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 = "", ..._ }) {
|
|
1886
|
+
let { messages: v } = J(), y = u(null), b = u(null), x = s(), [S, C] = d(!1), [w, T] = d(() => e ? new Date(e) : /* @__PURE__ */ new Date()), [E, D] = d(e ? new Date(e) : null);
|
|
1635
1887
|
o(() => {
|
|
1636
1888
|
D(e ? new Date(e) : null);
|
|
1637
|
-
}, [e]),
|
|
1889
|
+
}, [e]), ce({
|
|
1638
1890
|
open: S,
|
|
1639
1891
|
elementRef: b,
|
|
1640
1892
|
refs: [y],
|
|
@@ -1644,7 +1896,7 @@ function Ft({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1644
1896
|
onPointerDownOutside: () => C(!1),
|
|
1645
1897
|
zIndex: 1e3
|
|
1646
1898
|
});
|
|
1647
|
-
let O = E ?
|
|
1899
|
+
let O = E ? Ut(E, c) : "", k = () => {
|
|
1648
1900
|
r || C((e) => !e);
|
|
1649
1901
|
}, A = (e) => {
|
|
1650
1902
|
r || (e.key === "Enter" || e.key === " " || e.key === "ArrowDown" ? (e.preventDefault(), C(!0)) : e.key === "Escape" && C(!1));
|
|
@@ -1665,7 +1917,7 @@ function Ft({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1665
1917
|
}, F = (e) => {
|
|
1666
1918
|
let { date: t } = e;
|
|
1667
1919
|
return !!(f && t < (f instanceof Date ? f : new Date(f)) || h && t > (h instanceof Date ? h : new Date(h)));
|
|
1668
|
-
}, I =
|
|
1920
|
+
}, I = Kt(w), L = [
|
|
1669
1921
|
"日",
|
|
1670
1922
|
"一",
|
|
1671
1923
|
"二",
|
|
@@ -1673,7 +1925,7 @@ function Ft({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1673
1925
|
"四",
|
|
1674
1926
|
"五",
|
|
1675
1927
|
"六"
|
|
1676
|
-
], R = `${w.getFullYear()}年${w.getMonth() + 1}月`, z = [
|
|
1928
|
+
], R = `${w.getFullYear()}年${w.getMonth() + 1}月`, z = [qt(i, a, r, !1, S), g].filter(Boolean).join(" ");
|
|
1677
1929
|
return /* @__PURE__ */ m("div", {
|
|
1678
1930
|
className: "wc-datepicker",
|
|
1679
1931
|
ref: y,
|
|
@@ -1752,11 +2004,11 @@ function Ft({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1752
2004
|
className: "wc-datepicker-days",
|
|
1753
2005
|
children: I.map((e) => /* @__PURE__ */ p("button", {
|
|
1754
2006
|
type: "button",
|
|
1755
|
-
className:
|
|
2007
|
+
className: Jt(e, E),
|
|
1756
2008
|
disabled: F(e),
|
|
1757
|
-
"aria-label":
|
|
1758
|
-
"aria-selected":
|
|
1759
|
-
"aria-current":
|
|
2009
|
+
"aria-label": Ut(e.date, "YYYY-MM-DD"),
|
|
2010
|
+
"aria-selected": Gt(e.date, E),
|
|
2011
|
+
"aria-current": Wt(e.date) ? "date" : void 0,
|
|
1760
2012
|
onClick: () => M(e),
|
|
1761
2013
|
children: e.day
|
|
1762
2014
|
}, `${e.month}-${e.day}`))
|
|
@@ -1781,7 +2033,7 @@ function Ft({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1781
2033
|
}
|
|
1782
2034
|
//#endregion
|
|
1783
2035
|
//#region src/components/Button/Fab.jsx
|
|
1784
|
-
var
|
|
2036
|
+
var Xt = ({ 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 }) => {
|
|
1785
2037
|
let [g, _] = d(!1), v = ["circular", "extended"], y = [
|
|
1786
2038
|
"sm",
|
|
1787
2039
|
"md",
|
|
@@ -1822,10 +2074,10 @@ var It = ({ variant: e = "circular", size: t = "md", color: n = "primary", disab
|
|
|
1822
2074
|
})]
|
|
1823
2075
|
});
|
|
1824
2076
|
};
|
|
1825
|
-
|
|
2077
|
+
Xt.displayName = "Fab";
|
|
1826
2078
|
//#endregion
|
|
1827
2079
|
//#region src/components/Feed/Feed.jsx
|
|
1828
|
-
var
|
|
2080
|
+
var Zt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "var(--wc-accent)", dotSize: i = 8, lineWidth: a = 1, onItemClick: o }) => {
|
|
1829
2081
|
let s = Array.isArray(e.children) && e.children.length, c = typeof i == "number" ? `${i}px` : i, l = typeof a == "number" ? `${a}px` : a, u = {
|
|
1830
2082
|
"--feed-color": r,
|
|
1831
2083
|
"--feed-dot-size": c,
|
|
@@ -1866,7 +2118,7 @@ var Lt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1866
2118
|
}),
|
|
1867
2119
|
s && /* @__PURE__ */ p("ul", {
|
|
1868
2120
|
className: "wc-feed-children",
|
|
1869
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
2121
|
+
children: e.children.map((e) => /* @__PURE__ */ p(Zt, {
|
|
1870
2122
|
item: e,
|
|
1871
2123
|
showAvatar: t,
|
|
1872
2124
|
variant: n,
|
|
@@ -1879,7 +2131,7 @@ var Lt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1879
2131
|
]
|
|
1880
2132
|
})]
|
|
1881
2133
|
});
|
|
1882
|
-
},
|
|
2134
|
+
}, Qt = ({ items: e = [], variant: t = "timeline", showAvatar: n = !0, color: r = "var(--wc-accent)", dotSize: i = 8, lineWidth: a = 1, onItemClick: o, className: s = "" }) => {
|
|
1883
2135
|
let c = typeof a == "number" ? `${a}px` : a, l = {
|
|
1884
2136
|
"--feed-color": r,
|
|
1885
2137
|
"--feed-line-width": c
|
|
@@ -1887,7 +2139,7 @@ var Lt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1887
2139
|
return /* @__PURE__ */ p("ul", {
|
|
1888
2140
|
className: `wc-feed-list ${t} ${s}`,
|
|
1889
2141
|
style: l,
|
|
1890
|
-
children: e.map((e) => /* @__PURE__ */ p(
|
|
2142
|
+
children: e.map((e) => /* @__PURE__ */ p(Zt, {
|
|
1891
2143
|
item: e,
|
|
1892
2144
|
variant: t,
|
|
1893
2145
|
showAvatar: n,
|
|
@@ -1898,10 +2150,10 @@ var Lt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1898
2150
|
}, e.id || e.time))
|
|
1899
2151
|
});
|
|
1900
2152
|
};
|
|
1901
|
-
|
|
2153
|
+
Qt.displayName = "Feed";
|
|
1902
2154
|
//#endregion
|
|
1903
2155
|
//#region src/components/Feature/utils.js
|
|
1904
|
-
var
|
|
2156
|
+
var $t = ({ align: e, size: t, background: n, reverse: r, vertical: i, clickable: a, disabled: o, className: s }) => [
|
|
1905
2157
|
"wc-feature-card",
|
|
1906
2158
|
a && "wc-feature-card--clickable",
|
|
1907
2159
|
o && "wc-feature-card--disabled",
|
|
@@ -1912,29 +2164,29 @@ var zt = ({ align: e, size: t, background: n, reverse: r, vertical: i, clickable
|
|
|
1912
2164
|
`wc-feature-card--${e}`,
|
|
1913
2165
|
s
|
|
1914
2166
|
].filter(Boolean);
|
|
1915
|
-
function
|
|
2167
|
+
function en(e) {
|
|
1916
2168
|
return ["wc-feature-icon", `wc-feature-icon--${e}`].filter(Boolean);
|
|
1917
2169
|
}
|
|
1918
|
-
function
|
|
2170
|
+
function tn(e) {
|
|
1919
2171
|
return ["wc-feature-content", `wc-feature-content--${e}`].filter(Boolean);
|
|
1920
2172
|
}
|
|
1921
|
-
function
|
|
2173
|
+
function nn(e) {
|
|
1922
2174
|
return ["wc-feature-title", `wc-feature-title--${e}`].filter(Boolean);
|
|
1923
2175
|
}
|
|
1924
|
-
var
|
|
1925
|
-
function
|
|
2176
|
+
var rn = (e) => ["wc-feature-description", `wc-feature-description--${e}`].filter(Boolean);
|
|
2177
|
+
function an(e, t, n) {
|
|
1926
2178
|
!t && n && n(e);
|
|
1927
2179
|
}
|
|
1928
|
-
function
|
|
2180
|
+
function on(e, t) {
|
|
1929
2181
|
e.stopPropagation(), t && t(e);
|
|
1930
2182
|
}
|
|
1931
|
-
function
|
|
2183
|
+
function sn(e) {
|
|
1932
2184
|
return e;
|
|
1933
2185
|
}
|
|
1934
2186
|
//#endregion
|
|
1935
2187
|
//#region src/components/Feature/Feature.jsx
|
|
1936
|
-
var
|
|
1937
|
-
let b =
|
|
2188
|
+
var cn = ({ 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 = {} }) => {
|
|
2189
|
+
let b = $t({
|
|
1938
2190
|
align: a,
|
|
1939
2191
|
size: i,
|
|
1940
2192
|
background: o,
|
|
@@ -1943,7 +2195,7 @@ var qt = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1943
2195
|
clickable: !!h,
|
|
1944
2196
|
disabled: !1,
|
|
1945
2197
|
className: v
|
|
1946
|
-
}).join(" "), x =
|
|
2198
|
+
}).join(" "), x = en(r).join(" "), S = tn(a).join(" "), C = nn(i).join(" "), w = rn(i).join(" "), T = {
|
|
1947
2199
|
...c ? { background: c } : {},
|
|
1948
2200
|
...y
|
|
1949
2201
|
}, E = typeof r == "number" ? `${r}px` : r, D = h ? {
|
|
@@ -1956,7 +2208,7 @@ var qt = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1956
2208
|
return /* @__PURE__ */ m("div", {
|
|
1957
2209
|
className: `${b} ${s === "default" ? "" : `wc-feature-card--${s}`}`,
|
|
1958
2210
|
style: T,
|
|
1959
|
-
onClick: (e) =>
|
|
2211
|
+
onClick: (e) => an(e, !1, h),
|
|
1960
2212
|
...D,
|
|
1961
2213
|
children: [n && /* @__PURE__ */ p("div", {
|
|
1962
2214
|
className: x,
|
|
@@ -1967,7 +2219,7 @@ var qt = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1967
2219
|
children: typeof n == "string" ? /* @__PURE__ */ p("span", {
|
|
1968
2220
|
className: "wc-feature-icon__inner",
|
|
1969
2221
|
dangerouslySetInnerHTML: { __html: n }
|
|
1970
|
-
}) :
|
|
2222
|
+
}) : sn(n)
|
|
1971
2223
|
}), /* @__PURE__ */ m("div", {
|
|
1972
2224
|
className: S,
|
|
1973
2225
|
children: [
|
|
@@ -1982,17 +2234,17 @@ var qt = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1982
2234
|
d && /* @__PURE__ */ p("a", {
|
|
1983
2235
|
href: f,
|
|
1984
2236
|
className: "wc-feature-cta",
|
|
1985
|
-
onClick: (e) =>
|
|
2237
|
+
onClick: (e) => on(e, g),
|
|
1986
2238
|
children: d
|
|
1987
2239
|
})
|
|
1988
2240
|
]
|
|
1989
2241
|
})]
|
|
1990
2242
|
});
|
|
1991
2243
|
};
|
|
1992
|
-
|
|
2244
|
+
cn.displayName = "Feature";
|
|
1993
2245
|
//#endregion
|
|
1994
2246
|
//#region src/components/FileInput/FileInput.jsx
|
|
1995
|
-
var
|
|
2247
|
+
var ln = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
1996
2248
|
className: e,
|
|
1997
2249
|
"aria-hidden": "true",
|
|
1998
2250
|
children: /* @__PURE__ */ m("svg", {
|
|
@@ -2002,7 +2254,7 @@ var Jt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
2002
2254
|
strokeWidth: "2",
|
|
2003
2255
|
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" })]
|
|
2004
2256
|
})
|
|
2005
|
-
}),
|
|
2257
|
+
}), un = ({ multiple: e = !1, variant: t = "block", accept: n = "", label: r = "选择文件", description: i = "或拖放到这里", disabled: a = !1, onChange: o, onInvalid: s, className: c = "", style: l = {} }) => {
|
|
2006
2258
|
let [u, h] = d(!1), g = (e) => {
|
|
2007
2259
|
if (!n) return !0;
|
|
2008
2260
|
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));
|
|
@@ -2045,7 +2297,7 @@ var Jt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
2045
2297
|
"aria-label": r,
|
|
2046
2298
|
onChange: _
|
|
2047
2299
|
}),
|
|
2048
|
-
t === "block" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
2300
|
+
t === "block" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ln, { className: "wc-file-input__upload-icon" }), /* @__PURE__ */ m("span", {
|
|
2049
2301
|
className: "wc-file-input-content",
|
|
2050
2302
|
children: [/* @__PURE__ */ p("strong", {
|
|
2051
2303
|
className: "wc-file-input-content__title",
|
|
@@ -2063,14 +2315,14 @@ var Jt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
2063
2315
|
children: "+"
|
|
2064
2316
|
}), r]
|
|
2065
2317
|
}),
|
|
2066
|
-
t === "icon" && /* @__PURE__ */ p(
|
|
2318
|
+
t === "icon" && /* @__PURE__ */ p(ln, { className: "wc-file-icon" })
|
|
2067
2319
|
]
|
|
2068
2320
|
});
|
|
2069
2321
|
};
|
|
2070
|
-
|
|
2322
|
+
un.displayName = "FileInput";
|
|
2071
2323
|
//#endregion
|
|
2072
2324
|
//#region src/components/Form/FormControl.jsx
|
|
2073
|
-
var
|
|
2325
|
+
var dn = n(null), fn = ({ 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 }) => {
|
|
2074
2326
|
let f = l(() => ({
|
|
2075
2327
|
disabled: e,
|
|
2076
2328
|
error: t,
|
|
@@ -2092,7 +2344,7 @@ var Xt = n(null), Zt = ({ disabled: e = !1, error: t = !1, required: n = !1, var
|
|
|
2092
2344
|
t && "form-control--error",
|
|
2093
2345
|
s
|
|
2094
2346
|
].filter(Boolean).join(" ");
|
|
2095
|
-
return /* @__PURE__ */ p(
|
|
2347
|
+
return /* @__PURE__ */ p(dn.Provider, {
|
|
2096
2348
|
value: f,
|
|
2097
2349
|
children: /* @__PURE__ */ p("div", {
|
|
2098
2350
|
className: m,
|
|
@@ -2102,10 +2354,10 @@ var Xt = n(null), Zt = ({ disabled: e = !1, error: t = !1, required: n = !1, var
|
|
|
2102
2354
|
})
|
|
2103
2355
|
});
|
|
2104
2356
|
};
|
|
2105
|
-
|
|
2357
|
+
fn.displayName = "FormControl";
|
|
2106
2358
|
//#endregion
|
|
2107
2359
|
//#region src/components/Form/FormControlLabel.jsx
|
|
2108
|
-
var
|
|
2360
|
+
var pn = ({ 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 }) => {
|
|
2109
2361
|
let f = (e) => {
|
|
2110
2362
|
n || l?.(e);
|
|
2111
2363
|
}, h = [
|
|
@@ -2144,10 +2396,10 @@ var Qt = ({ label: e, labelPlacement: t = "end", disabled: n = !1, required: r =
|
|
|
2144
2396
|
]
|
|
2145
2397
|
});
|
|
2146
2398
|
};
|
|
2147
|
-
|
|
2399
|
+
pn.displayName = "FormControlLabel";
|
|
2148
2400
|
//#endregion
|
|
2149
2401
|
//#region src/components/Form/FormGroup.jsx
|
|
2150
|
-
var
|
|
2402
|
+
var mn = ({ row: e = !1, spacing: t = "normal", className: n = "", style: r = {}, children: i, ...a }) => /* @__PURE__ */ p("div", {
|
|
2151
2403
|
className: [
|
|
2152
2404
|
"form-group",
|
|
2153
2405
|
e && "form-group--row",
|
|
@@ -2159,11 +2411,11 @@ var $t = ({ row: e = !1, spacing: t = "normal", className: n = "", style: r = {}
|
|
|
2159
2411
|
...a,
|
|
2160
2412
|
children: i
|
|
2161
2413
|
});
|
|
2162
|
-
|
|
2414
|
+
mn.displayName = "FormGroup";
|
|
2163
2415
|
//#endregion
|
|
2164
2416
|
//#region src/components/Form/FormHelperText.jsx
|
|
2165
|
-
var
|
|
2166
|
-
let h = a(
|
|
2417
|
+
var hn = ({ 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 }) => {
|
|
2418
|
+
let h = a(dn) || {}, g = t || h.error, _ = e || h.disabled;
|
|
2167
2419
|
return /* @__PURE__ */ p("p", {
|
|
2168
2420
|
id: c,
|
|
2169
2421
|
className: [
|
|
@@ -2183,55 +2435,55 @@ var en = ({ disabled: e = !1, error: t = !1, filled: n = !1, focused: r = !1, ma
|
|
|
2183
2435
|
children: f
|
|
2184
2436
|
});
|
|
2185
2437
|
};
|
|
2186
|
-
|
|
2438
|
+
hn.displayName = "FormHelperText";
|
|
2187
2439
|
//#endregion
|
|
2188
2440
|
//#region src/components/Grid/utils.js
|
|
2189
|
-
var
|
|
2441
|
+
var gn = {
|
|
2190
2442
|
xs: "xs",
|
|
2191
2443
|
sm: "sm",
|
|
2192
2444
|
md: "md",
|
|
2193
2445
|
lg: "lg",
|
|
2194
2446
|
xl: "xl"
|
|
2195
|
-
},
|
|
2447
|
+
}, _n = {
|
|
2196
2448
|
row: "wc-grid-container--row",
|
|
2197
2449
|
column: "wc-grid-container--column",
|
|
2198
2450
|
"row-reverse": "wc-grid-container--row-reverse",
|
|
2199
2451
|
"column-reverse": "wc-grid-container--column-reverse"
|
|
2200
|
-
},
|
|
2452
|
+
}, vn = {
|
|
2201
2453
|
"flex-start": "wc-grid-container--justify-start",
|
|
2202
2454
|
center: "wc-grid-container--justify-center",
|
|
2203
2455
|
"flex-end": "wc-grid-container--justify-end",
|
|
2204
2456
|
"space-between": "wc-grid-container--justify-between",
|
|
2205
2457
|
"space-around": "wc-grid-container--justify-around",
|
|
2206
2458
|
"space-evenly": "wc-grid-container--justify-evenly"
|
|
2207
|
-
},
|
|
2459
|
+
}, yn = {
|
|
2208
2460
|
"flex-start": "wc-grid-container--align-start",
|
|
2209
2461
|
center: "wc-grid-container--align-center",
|
|
2210
2462
|
"flex-end": "wc-grid-container--align-end",
|
|
2211
2463
|
stretch: "wc-grid-container--align-stretch",
|
|
2212
2464
|
baseline: "wc-grid-container--align-baseline"
|
|
2213
|
-
},
|
|
2465
|
+
}, bn = (e) => {
|
|
2214
2466
|
let { direction: t = "row", justifyContent: n = "flex-start", alignItems: r = "stretch", spacing: i = 0 } = e, a = ["wc-grid", "wc-grid-container"];
|
|
2215
|
-
return
|
|
2216
|
-
},
|
|
2467
|
+
return _n[t] && a.push(_n[t]), vn[n] && a.push(vn[n]), yn[r] && a.push(yn[r]), a.push(...Sn(i)), a;
|
|
2468
|
+
}, xn = (e) => {
|
|
2217
2469
|
let { xs: t, sm: n, md: r, lg: i, xl: a } = e, o = ["wc-grid", "wc-grid-item"];
|
|
2218
|
-
return Object.entries(
|
|
2470
|
+
return Object.entries(gn).forEach(([t, n]) => {
|
|
2219
2471
|
let r = e[t];
|
|
2220
|
-
r !== void 0 && o.push(...
|
|
2472
|
+
r !== void 0 && o.push(...Cn(r, n));
|
|
2221
2473
|
}), o;
|
|
2222
|
-
},
|
|
2474
|
+
}, Sn = (e) => {
|
|
2223
2475
|
let t = Number(e);
|
|
2224
2476
|
return [`wc-grid-container--spacing-${Number.isFinite(t) ? Math.max(0, Math.min(12, Math.round(t))) : 0}`];
|
|
2225
|
-
},
|
|
2477
|
+
}, Cn = (e, t) => {
|
|
2226
2478
|
if (e === !1 || e == null) return [];
|
|
2227
2479
|
if (e === "auto") return [`wc-grid-item--${t}-auto`];
|
|
2228
2480
|
if (e === !0) return [`wc-grid-item--${t}-true`];
|
|
2229
2481
|
let n = Number(e);
|
|
2230
2482
|
return Number.isFinite(n) && n >= 1 && n <= 12 ? [`wc-grid-item--${t}-${Math.round(n)}`] : [];
|
|
2231
|
-
},
|
|
2483
|
+
}, wn = (e) => {
|
|
2232
2484
|
let { container: t = !1, item: n = !1, className: r = "" } = e, i = [];
|
|
2233
|
-
return t && i.push(...
|
|
2234
|
-
},
|
|
2485
|
+
return t && i.push(...bn(e)), n && i.push(...xn(e)), r && i.push(r), i;
|
|
2486
|
+
}, Tn = (e) => {
|
|
2235
2487
|
let t = { ...e };
|
|
2236
2488
|
return t.spacing !== void 0 && (t.spacing = Number(t.spacing) || 0), [
|
|
2237
2489
|
"xs",
|
|
@@ -2246,8 +2498,8 @@ var tn = {
|
|
|
2246
2498
|
isNaN(r) || (t[e] = Math.max(1, Math.min(12, r)));
|
|
2247
2499
|
}
|
|
2248
2500
|
}), t;
|
|
2249
|
-
},
|
|
2250
|
-
className:
|
|
2501
|
+
}, En = ({ 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", {
|
|
2502
|
+
className: wn(Tn({
|
|
2251
2503
|
container: e,
|
|
2252
2504
|
item: t,
|
|
2253
2505
|
xs: n,
|
|
@@ -2265,10 +2517,10 @@ var tn = {
|
|
|
2265
2517
|
...h,
|
|
2266
2518
|
children: m
|
|
2267
2519
|
});
|
|
2268
|
-
|
|
2520
|
+
En.displayName = "Grid";
|
|
2269
2521
|
//#endregion
|
|
2270
2522
|
//#region src/components/HoverCard/HoverCard.jsx
|
|
2271
|
-
var
|
|
2523
|
+
var Dn = ({ 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 }) => {
|
|
2272
2524
|
let T = s(), [E, D] = d(!1), O = u(null), k = u(null), A = u(null), j = u(null), M = `${T}-trigger`, N = () => {
|
|
2273
2525
|
clearTimeout(O.current), clearTimeout(k.current);
|
|
2274
2526
|
}, P = () => {
|
|
@@ -2293,14 +2545,14 @@ var pn = ({ triggerText: e = "Hover me", cardData: t = {}, variant: n = "default
|
|
|
2293
2545
|
"hover-card-popup",
|
|
2294
2546
|
`hover-card-position-${a}`,
|
|
2295
2547
|
`hover-card-card-size-${i}`
|
|
2296
|
-
].join(" "), z =
|
|
2548
|
+
].join(" "), z = le({
|
|
2297
2549
|
open: E,
|
|
2298
2550
|
anchorRef: j,
|
|
2299
2551
|
floatingRef: A,
|
|
2300
2552
|
placement: a,
|
|
2301
2553
|
offset: 8
|
|
2302
2554
|
});
|
|
2303
|
-
return
|
|
2555
|
+
return ce({
|
|
2304
2556
|
open: E,
|
|
2305
2557
|
elementRef: A,
|
|
2306
2558
|
refs: [j],
|
|
@@ -2330,7 +2582,7 @@ var pn = ({ triggerText: e = "Hover me", cardData: t = {}, variant: n = "default
|
|
|
2330
2582
|
tabIndex: g ? -1 : 0,
|
|
2331
2583
|
"aria-describedby": E ? T : void 0,
|
|
2332
2584
|
children: S || e
|
|
2333
|
-
}), E && /* @__PURE__ */ p(
|
|
2585
|
+
}), E && /* @__PURE__ */ p(se, { children: /* @__PURE__ */ m("div", {
|
|
2334
2586
|
ref: A,
|
|
2335
2587
|
id: T,
|
|
2336
2588
|
className: `${R} hover-card-position-${z}`.trim(),
|
|
@@ -2379,10 +2631,10 @@ var pn = ({ triggerText: e = "Hover me", cardData: t = {}, variant: n = "default
|
|
|
2379
2631
|
}) })]
|
|
2380
2632
|
});
|
|
2381
2633
|
};
|
|
2382
|
-
|
|
2634
|
+
Dn.displayName = "HoverCard";
|
|
2383
2635
|
//#endregion
|
|
2384
2636
|
//#region ../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
|
|
2385
|
-
var
|
|
2637
|
+
var On = /* @__PURE__ */ z(((e) => {
|
|
2386
2638
|
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;
|
|
2387
2639
|
function b(e) {
|
|
2388
2640
|
if (typeof e == "object" && e) {
|
|
@@ -2438,7 +2690,7 @@ var mn = /* @__PURE__ */ R(((e) => {
|
|
|
2438
2690
|
}, e.isValidElementType = function(e) {
|
|
2439
2691
|
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);
|
|
2440
2692
|
}, e.typeOf = b;
|
|
2441
|
-
})),
|
|
2693
|
+
})), kn = /* @__PURE__ */ z(((e) => {
|
|
2442
2694
|
process.env.NODE_ENV !== "production" && (function() {
|
|
2443
2695
|
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;
|
|
2444
2696
|
function b(e) {
|
|
@@ -2514,9 +2766,9 @@ var mn = /* @__PURE__ */ R(((e) => {
|
|
|
2514
2766
|
}
|
|
2515
2767
|
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = R, e.isContextProvider = z, e.isElement = B, e.isForwardRef = V, e.isFragment = H, e.isLazy = U, e.isMemo = W, e.isPortal = ee, e.isProfiler = te, e.isStrictMode = ne, e.isSuspense = re, e.isValidElementType = b, e.typeOf = x;
|
|
2516
2768
|
})();
|
|
2517
|
-
})),
|
|
2518
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
2519
|
-
})),
|
|
2769
|
+
})), An = /* @__PURE__ */ z(((e, t) => {
|
|
2770
|
+
process.env.NODE_ENV === "production" ? t.exports = On() : t.exports = kn();
|
|
2771
|
+
})), jn = /* @__PURE__ */ z(((e, t) => {
|
|
2520
2772
|
var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
2521
2773
|
function a(e) {
|
|
2522
2774
|
if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
|
|
@@ -2549,14 +2801,14 @@ var mn = /* @__PURE__ */ R(((e) => {
|
|
|
2549
2801
|
}
|
|
2550
2802
|
return s;
|
|
2551
2803
|
};
|
|
2552
|
-
})),
|
|
2804
|
+
})), Mn = /* @__PURE__ */ z(((e, t) => {
|
|
2553
2805
|
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
2554
|
-
})),
|
|
2806
|
+
})), Nn = /* @__PURE__ */ z(((e, t) => {
|
|
2555
2807
|
t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
2556
|
-
})),
|
|
2808
|
+
})), Pn = /* @__PURE__ */ z(((e, t) => {
|
|
2557
2809
|
var n = function() {};
|
|
2558
2810
|
if (process.env.NODE_ENV !== "production") {
|
|
2559
|
-
var r =
|
|
2811
|
+
var r = Mn(), i = {}, a = Nn();
|
|
2560
2812
|
n = function(e) {
|
|
2561
2813
|
var t = "Warning: " + e;
|
|
2562
2814
|
typeof console < "u" && console.error(t);
|
|
@@ -2589,8 +2841,8 @@ var mn = /* @__PURE__ */ R(((e) => {
|
|
|
2589
2841
|
o.resetWarningCache = function() {
|
|
2590
2842
|
process.env.NODE_ENV !== "production" && (i = {});
|
|
2591
2843
|
}, t.exports = o;
|
|
2592
|
-
})),
|
|
2593
|
-
var n =
|
|
2844
|
+
})), Fn = /* @__PURE__ */ z(((e, t) => {
|
|
2845
|
+
var n = An(), r = jn(), i = Mn(), a = Nn(), o = Pn(), s = function() {};
|
|
2594
2846
|
process.env.NODE_ENV !== "production" && (s = function(e) {
|
|
2595
2847
|
var t = "Warning: " + e;
|
|
2596
2848
|
typeof console < "u" && console.error(t);
|
|
@@ -2848,8 +3100,8 @@ var mn = /* @__PURE__ */ R(((e) => {
|
|
|
2848
3100
|
}
|
|
2849
3101
|
return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
|
|
2850
3102
|
};
|
|
2851
|
-
})),
|
|
2852
|
-
var n =
|
|
3103
|
+
})), In = /* @__PURE__ */ z(((e, t) => {
|
|
3104
|
+
var n = Mn();
|
|
2853
3105
|
function r() {}
|
|
2854
3106
|
function i() {}
|
|
2855
3107
|
i.resetWarningCache = r, t.exports = function() {
|
|
@@ -2888,42 +3140,42 @@ var mn = /* @__PURE__ */ R(((e) => {
|
|
|
2888
3140
|
};
|
|
2889
3141
|
return a.PropTypes = a, a;
|
|
2890
3142
|
};
|
|
2891
|
-
})), $ = /* @__PURE__ */
|
|
3143
|
+
})), $ = /* @__PURE__ */ V((/* @__PURE__ */ z(((e, t) => {
|
|
2892
3144
|
if (process.env.NODE_ENV !== "production") {
|
|
2893
|
-
var n =
|
|
2894
|
-
t.exports =
|
|
2895
|
-
} else t.exports =
|
|
2896
|
-
})))(), 1),
|
|
3145
|
+
var n = An();
|
|
3146
|
+
t.exports = Fn()(n.isElement, !0);
|
|
3147
|
+
} else t.exports = In()();
|
|
3148
|
+
})))(), 1), Ln = ({ className: e, style: t }) => /* @__PURE__ */ p("span", {
|
|
2897
3149
|
className: e,
|
|
2898
3150
|
style: t
|
|
2899
|
-
}),
|
|
3151
|
+
}), Rn = {
|
|
2900
3152
|
lucide: () => import("@zeturn/watercolor-icons-lucide-react"),
|
|
2901
3153
|
heroicons: () => import("@zeturn/watercolor-icons-heroicons-react"),
|
|
2902
3154
|
tabler: () => import("@zeturn/watercolor-icons-tabler-react"),
|
|
2903
3155
|
phosphor: () => import("@zeturn/watercolor-icons-phosphor-react"),
|
|
2904
3156
|
feather: () => import("@zeturn/watercolor-icons-feather")
|
|
2905
|
-
},
|
|
2906
|
-
let t =
|
|
3157
|
+
}, zn = (e) => {
|
|
3158
|
+
let t = Rn[e];
|
|
2907
3159
|
return t ? t() : Promise.resolve(null);
|
|
2908
|
-
},
|
|
3160
|
+
}, Bn = (e, t) => r(() => e().then((e) => ({ default: t(e || {}) })).catch((e) => (console.warn("[Icon] 动态导入失败,已回退到占位符图标。", e), { default: Ln }))), Vn = (e, t, n) => {
|
|
2909
3161
|
switch (e) {
|
|
2910
|
-
case "lucide": return
|
|
2911
|
-
case "heroicons": return
|
|
2912
|
-
case "tabler": return
|
|
2913
|
-
case "phosphor": return
|
|
3162
|
+
case "lucide": return Bn(() => zn("lucide"), (e) => e.getIcon?.(t) || Ln);
|
|
3163
|
+
case "heroicons": return Bn(() => zn("heroicons"), (e) => e.getIcon?.(t, n) || Ln);
|
|
3164
|
+
case "tabler": return Bn(() => zn("tabler"), (e) => e.getIcon?.(t) || Ln);
|
|
3165
|
+
case "phosphor": return Bn(() => zn("phosphor"), (e) => e.getIcon?.(t) || Ln);
|
|
2914
3166
|
default: return null;
|
|
2915
3167
|
}
|
|
2916
|
-
},
|
|
3168
|
+
}, Hn = (e) => typeof e == "number" ? e : {
|
|
2917
3169
|
xs: 16,
|
|
2918
3170
|
sm: 20,
|
|
2919
3171
|
md: 24,
|
|
2920
3172
|
lg: 32,
|
|
2921
3173
|
xl: 48
|
|
2922
|
-
}[e] || parseInt(e) || 24,
|
|
3174
|
+
}[e] || parseInt(e) || 24, Un = ({ library: e = "lucide", name: n = "", html: i = "", size: a = 24, color: o = "currentColor", strokeWidth: s = 2, variant: c = "outline", className: u = "", children: d, ...f }) => {
|
|
2923
3175
|
let m = l(() => {
|
|
2924
3176
|
if (!n) return null;
|
|
2925
3177
|
try {
|
|
2926
|
-
return
|
|
3178
|
+
return Vn(e, n, c);
|
|
2927
3179
|
} catch {
|
|
2928
3180
|
return console.warn(`Icon "${n}" not found in library "${e}"`), null;
|
|
2929
3181
|
}
|
|
@@ -2933,7 +3185,7 @@ var mn = /* @__PURE__ */ R(((e) => {
|
|
|
2933
3185
|
c
|
|
2934
3186
|
]), h = l(() => e === "feather" && n ? r(async () => {
|
|
2935
3187
|
try {
|
|
2936
|
-
let e =
|
|
3188
|
+
let e = Hn(a), { getFeatherSvg: t } = await zn("feather") || {}, r = await t(n, {
|
|
2937
3189
|
width: e,
|
|
2938
3190
|
height: e,
|
|
2939
3191
|
strokeWidth: Number(s)
|
|
@@ -2954,13 +3206,13 @@ var mn = /* @__PURE__ */ R(((e) => {
|
|
|
2954
3206
|
]), g = l(() => e === "html" && i ? i : "", [e, i]), _ = l(() => {
|
|
2955
3207
|
let e = {};
|
|
2956
3208
|
if (o && o !== "currentColor" && (e.color = o), a) {
|
|
2957
|
-
let t =
|
|
3209
|
+
let t = Hn(a);
|
|
2958
3210
|
e.width = `${t}px`, e.height = `${t}px`;
|
|
2959
3211
|
}
|
|
2960
3212
|
return e;
|
|
2961
3213
|
}, [o, a]), v = l(() => {
|
|
2962
3214
|
let t = {
|
|
2963
|
-
size:
|
|
3215
|
+
size: Hn(a),
|
|
2964
3216
|
color: o,
|
|
2965
3217
|
...f
|
|
2966
3218
|
};
|
|
@@ -3001,7 +3253,7 @@ var mn = /* @__PURE__ */ R(((e) => {
|
|
|
3001
3253
|
children: d
|
|
3002
3254
|
});
|
|
3003
3255
|
};
|
|
3004
|
-
|
|
3256
|
+
Un.propTypes = {
|
|
3005
3257
|
library: $.default.oneOf([
|
|
3006
3258
|
"lucide",
|
|
3007
3259
|
"heroicons",
|
|
@@ -3025,7 +3277,7 @@ kn.propTypes = {
|
|
|
3025
3277
|
};
|
|
3026
3278
|
//#endregion
|
|
3027
3279
|
//#region src/components/Button/IconButton.jsx
|
|
3028
|
-
var
|
|
3280
|
+
var Wn = ({ 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 }) => {
|
|
3029
3281
|
let f = [
|
|
3030
3282
|
"default",
|
|
3031
3283
|
"primary",
|
|
@@ -3067,11 +3319,44 @@ var An = ({ color: e = "default", size: t = "md", edge: n = !1, disabled: r = !1
|
|
|
3067
3319
|
})
|
|
3068
3320
|
});
|
|
3069
3321
|
};
|
|
3070
|
-
|
|
3322
|
+
Wn.displayName = "IconButton";
|
|
3071
3323
|
//#endregion
|
|
3072
3324
|
//#region src/components/ImageGallery/ImageGallery.jsx
|
|
3073
|
-
var
|
|
3074
|
-
|
|
3325
|
+
var Gn = () => /* @__PURE__ */ m("svg", {
|
|
3326
|
+
className: "gallery-icon",
|
|
3327
|
+
viewBox: "0 0 24 24",
|
|
3328
|
+
"aria-hidden": "true",
|
|
3329
|
+
children: [/* @__PURE__ */ p("path", { d: "M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z" }), /* @__PURE__ */ p("circle", {
|
|
3330
|
+
cx: "12",
|
|
3331
|
+
cy: "12",
|
|
3332
|
+
r: "2.75"
|
|
3333
|
+
})]
|
|
3334
|
+
}), Kn = () => /* @__PURE__ */ m("svg", {
|
|
3335
|
+
className: "gallery-icon",
|
|
3336
|
+
viewBox: "0 0 24 24",
|
|
3337
|
+
"aria-hidden": "true",
|
|
3338
|
+
children: [
|
|
3339
|
+
/* @__PURE__ */ p("path", { d: "M12 3v11" }),
|
|
3340
|
+
/* @__PURE__ */ p("path", { d: "m7 10 5 5 5-5" }),
|
|
3341
|
+
/* @__PURE__ */ p("path", { d: "M5 20h14" })
|
|
3342
|
+
]
|
|
3343
|
+
}), qn = () => /* @__PURE__ */ m("svg", {
|
|
3344
|
+
className: "gallery-icon",
|
|
3345
|
+
viewBox: "0 0 24 24",
|
|
3346
|
+
"aria-hidden": "true",
|
|
3347
|
+
children: [/* @__PURE__ */ p("path", { d: "m6 6 12 12" }), /* @__PURE__ */ p("path", { d: "M18 6 6 18" })]
|
|
3348
|
+
}), Jn = () => /* @__PURE__ */ p("svg", {
|
|
3349
|
+
className: "gallery-icon",
|
|
3350
|
+
viewBox: "0 0 24 24",
|
|
3351
|
+
"aria-hidden": "true",
|
|
3352
|
+
children: /* @__PURE__ */ p("path", { d: "m15 18-6-6 6-6" })
|
|
3353
|
+
}), Yn = () => /* @__PURE__ */ p("svg", {
|
|
3354
|
+
className: "gallery-icon",
|
|
3355
|
+
viewBox: "0 0 24 24",
|
|
3356
|
+
"aria-hidden": "true",
|
|
3357
|
+
children: /* @__PURE__ */ p("path", { d: "m9 6 6 6-6 6" })
|
|
3358
|
+
}), Xn = ({ 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 }) => {
|
|
3359
|
+
let [w, T] = d(-1), [E, D] = d(1), { messages: O } = J(), k = u ? Math.ceil(e.length / f) : 1, A = {
|
|
3075
3360
|
sm: "75%",
|
|
3076
3361
|
md: "66.67%",
|
|
3077
3362
|
lg: "56.25%",
|
|
@@ -3150,14 +3435,14 @@ var jn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3150
3435
|
onClick: (e) => {
|
|
3151
3436
|
e.stopPropagation(), M(t);
|
|
3152
3437
|
},
|
|
3153
|
-
children:
|
|
3438
|
+
children: /* @__PURE__ */ p(Gn, {})
|
|
3154
3439
|
}), l && /* @__PURE__ */ p("button", {
|
|
3155
3440
|
className: "gallery-action-btn gallery-download-btn",
|
|
3156
3441
|
"aria-label": O.downloadImage(t + 1),
|
|
3157
3442
|
onClick: (t) => {
|
|
3158
3443
|
t.stopPropagation(), N(e);
|
|
3159
3444
|
},
|
|
3160
|
-
children:
|
|
3445
|
+
children: /* @__PURE__ */ p(Kn, {})
|
|
3161
3446
|
})]
|
|
3162
3447
|
})
|
|
3163
3448
|
})]
|
|
@@ -3216,7 +3501,7 @@ var jn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3216
3501
|
className: "gallery-lightbox-close",
|
|
3217
3502
|
"aria-label": O.closeLightbox,
|
|
3218
3503
|
onClick: P,
|
|
3219
|
-
children:
|
|
3504
|
+
children: /* @__PURE__ */ p(qn, {})
|
|
3220
3505
|
}),
|
|
3221
3506
|
/* @__PURE__ */ p("div", {
|
|
3222
3507
|
className: "gallery-lightbox-image-container",
|
|
@@ -3245,7 +3530,7 @@ var jn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3245
3530
|
disabled: w === 0,
|
|
3246
3531
|
"aria-label": O.previousImage,
|
|
3247
3532
|
onClick: F,
|
|
3248
|
-
children:
|
|
3533
|
+
children: /* @__PURE__ */ p(Jn, {})
|
|
3249
3534
|
}),
|
|
3250
3535
|
/* @__PURE__ */ m("span", {
|
|
3251
3536
|
className: "gallery-lightbox-counter",
|
|
@@ -3260,14 +3545,15 @@ var jn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3260
3545
|
disabled: w === e.length - 1,
|
|
3261
3546
|
"aria-label": O.nextImage,
|
|
3262
3547
|
onClick: I,
|
|
3263
|
-
children:
|
|
3548
|
+
children: /* @__PURE__ */ p(Yn, {})
|
|
3264
3549
|
})
|
|
3265
3550
|
]
|
|
3266
3551
|
}),
|
|
3267
3552
|
l && /* @__PURE__ */ p("button", {
|
|
3268
3553
|
className: "gallery-action-btn gallery-download-btn",
|
|
3554
|
+
"aria-label": O.downloadImage(w + 1),
|
|
3269
3555
|
onClick: () => N(e[w]),
|
|
3270
|
-
children:
|
|
3556
|
+
children: /* @__PURE__ */ p(Kn, {})
|
|
3271
3557
|
})
|
|
3272
3558
|
]
|
|
3273
3559
|
})
|
|
@@ -3275,10 +3561,10 @@ var jn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3275
3561
|
]
|
|
3276
3562
|
});
|
|
3277
3563
|
};
|
|
3278
|
-
|
|
3564
|
+
Xn.displayName = "ImageGallery";
|
|
3279
3565
|
//#endregion
|
|
3280
3566
|
//#region src/composition.ts
|
|
3281
|
-
var
|
|
3567
|
+
var Zn = [
|
|
3282
3568
|
"none",
|
|
3283
3569
|
"2xs",
|
|
3284
3570
|
"xs",
|
|
@@ -3288,40 +3574,40 @@ var Mn = [
|
|
|
3288
3574
|
"xl",
|
|
3289
3575
|
"2xl",
|
|
3290
3576
|
"3xl"
|
|
3291
|
-
],
|
|
3577
|
+
], Qn = [
|
|
3292
3578
|
"stretch",
|
|
3293
3579
|
"start",
|
|
3294
3580
|
"center",
|
|
3295
3581
|
"end"
|
|
3296
|
-
],
|
|
3582
|
+
], $n = [
|
|
3297
3583
|
"sm",
|
|
3298
3584
|
"md",
|
|
3299
3585
|
"lg",
|
|
3300
3586
|
"xl",
|
|
3301
3587
|
"full"
|
|
3302
|
-
],
|
|
3588
|
+
], er = [
|
|
3303
3589
|
"none",
|
|
3304
3590
|
"sm",
|
|
3305
3591
|
"md",
|
|
3306
3592
|
"lg"
|
|
3307
|
-
],
|
|
3593
|
+
], tr = [
|
|
3308
3594
|
"start",
|
|
3309
3595
|
"center",
|
|
3310
3596
|
"end",
|
|
3311
3597
|
"between",
|
|
3312
3598
|
"around"
|
|
3313
|
-
],
|
|
3599
|
+
], nr = [
|
|
3314
3600
|
"equal",
|
|
3315
3601
|
"sidebar",
|
|
3316
3602
|
"sidebar-end",
|
|
3317
3603
|
"wide-start",
|
|
3318
3604
|
"wide-end"
|
|
3319
|
-
],
|
|
3605
|
+
], rr = [
|
|
3320
3606
|
"none",
|
|
3321
3607
|
"sm",
|
|
3322
3608
|
"md",
|
|
3323
3609
|
"lg"
|
|
3324
|
-
],
|
|
3610
|
+
], ir = ({ as: e = "div", gap: t = "md", align: n = "center", justify: r = "start", wrap: i = !0, className: a = "", children: o, ...s }) => /* @__PURE__ */ p(e, {
|
|
3325
3611
|
className: ["wc-inline", a].filter(Boolean).join(" "),
|
|
3326
3612
|
"data-gap": t,
|
|
3327
3613
|
"data-align": n,
|
|
@@ -3330,18 +3616,18 @@ var Mn = [
|
|
|
3330
3616
|
...s,
|
|
3331
3617
|
children: o
|
|
3332
3618
|
});
|
|
3333
|
-
|
|
3619
|
+
ir.displayName = "Inline", ir.propTypes = {
|
|
3334
3620
|
as: $.default.elementType,
|
|
3335
|
-
gap: $.default.oneOf(
|
|
3336
|
-
align: $.default.oneOf(
|
|
3337
|
-
justify: $.default.oneOf(
|
|
3621
|
+
gap: $.default.oneOf(Zn),
|
|
3622
|
+
align: $.default.oneOf(Qn),
|
|
3623
|
+
justify: $.default.oneOf(tr),
|
|
3338
3624
|
wrap: $.default.bool,
|
|
3339
3625
|
className: $.default.string,
|
|
3340
3626
|
children: $.default.node
|
|
3341
3627
|
};
|
|
3342
3628
|
//#endregion
|
|
3343
3629
|
//#region src/components/Input/Input.jsx
|
|
3344
|
-
var
|
|
3630
|
+
var ar = ({ 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 }) => {
|
|
3345
3631
|
let [R, z] = d(!1), [B, V] = d(!!e), H = u(null), U = s(), W = k || U;
|
|
3346
3632
|
return o(() => {
|
|
3347
3633
|
V(!!e);
|
|
@@ -3412,28 +3698,28 @@ var Bn = ({ value: e = "", onChange: t, type: n = "text", placeholder: r = "", d
|
|
|
3412
3698
|
]
|
|
3413
3699
|
});
|
|
3414
3700
|
};
|
|
3415
|
-
|
|
3701
|
+
ar.displayName = "Input";
|
|
3416
3702
|
//#endregion
|
|
3417
3703
|
//#region src/components/List/utils.js
|
|
3418
|
-
var
|
|
3704
|
+
var or = (e) => {
|
|
3419
3705
|
let { dense: t = !1, disablePadding: n = !1, variant: r, className: i = "" } = e, a = ["list"];
|
|
3420
3706
|
return t && a.push("list--dense"), n && a.push("list--no-padding"), r && a.push(`list--${r}`), i && a.push(i), a;
|
|
3421
|
-
},
|
|
3707
|
+
}, sr = (e) => {
|
|
3422
3708
|
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"];
|
|
3423
3709
|
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;
|
|
3424
|
-
},
|
|
3710
|
+
}, cr = (e) => {
|
|
3425
3711
|
let { position: t = "start", className: n = "" } = e, r = ["list-item-icon"];
|
|
3426
3712
|
return t && r.push(`list-item-icon--${t}`), n && r.push(n), r;
|
|
3427
|
-
},
|
|
3713
|
+
}, lr = (e) => {
|
|
3428
3714
|
let { inset: t = !1, className: n = "" } = e, r = ["list-item-text"];
|
|
3429
3715
|
return t && r.push("list-item-text--inset"), n && r.push(n), r;
|
|
3430
|
-
},
|
|
3431
|
-
let s =
|
|
3716
|
+
}, ur = n({ dense: !1 }), dr = ({ children: e, dense: t = !1, disablePadding: n = !1, nav: r = !1, subheader: i = "", className: a = "", ...o }) => {
|
|
3717
|
+
let s = or({
|
|
3432
3718
|
dense: t,
|
|
3433
3719
|
disablePadding: n,
|
|
3434
3720
|
className: a
|
|
3435
3721
|
}).concat(r ? "list--nav" : []).join(" ");
|
|
3436
|
-
return /* @__PURE__ */ p(
|
|
3722
|
+
return /* @__PURE__ */ p(ur.Provider, {
|
|
3437
3723
|
value: { dense: t },
|
|
3438
3724
|
children: /* @__PURE__ */ m("div", {
|
|
3439
3725
|
role: r ? "navigation" : "list",
|
|
@@ -3445,8 +3731,8 @@ var Vn = (e) => {
|
|
|
3445
3731
|
}), e]
|
|
3446
3732
|
})
|
|
3447
3733
|
});
|
|
3448
|
-
},
|
|
3449
|
-
let { dense: d } = a(
|
|
3734
|
+
}, fr = ({ 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 }) => {
|
|
3735
|
+
let { dense: d } = a(ur) || { dense: !1 }, f = sr({
|
|
3450
3736
|
button: t,
|
|
3451
3737
|
disabled: n,
|
|
3452
3738
|
divider: r,
|
|
@@ -3463,15 +3749,15 @@ var Vn = (e) => {
|
|
|
3463
3749
|
...u,
|
|
3464
3750
|
children: e
|
|
3465
3751
|
});
|
|
3466
|
-
},
|
|
3467
|
-
className:
|
|
3752
|
+
}, pr = ({ children: e, position: t = "start", className: n = "", ...r }) => /* @__PURE__ */ p("span", {
|
|
3753
|
+
className: cr({
|
|
3468
3754
|
position: t,
|
|
3469
3755
|
className: n
|
|
3470
3756
|
}).join(" "),
|
|
3471
3757
|
...r,
|
|
3472
3758
|
children: e
|
|
3473
|
-
}),
|
|
3474
|
-
className:
|
|
3759
|
+
}), mr = ({ primary: e = "", secondary: t = "", inset: n = !1, className: r = "", ...i }) => /* @__PURE__ */ m("div", {
|
|
3760
|
+
className: lr({
|
|
3475
3761
|
inset: n,
|
|
3476
3762
|
className: r
|
|
3477
3763
|
}).join(" "),
|
|
@@ -3483,37 +3769,37 @@ var Vn = (e) => {
|
|
|
3483
3769
|
className: "list-item-text-secondary",
|
|
3484
3770
|
children: t
|
|
3485
3771
|
})]
|
|
3486
|
-
}),
|
|
3772
|
+
}), hr = ({ size: e, variant: t, disabled: n, className: r }) => {
|
|
3487
3773
|
let i = [
|
|
3488
3774
|
"wc-menu",
|
|
3489
3775
|
`wc-menu--${e}`,
|
|
3490
3776
|
`wc-menu--${t}`
|
|
3491
3777
|
];
|
|
3492
3778
|
return n && i.push("wc-menu--disabled"), r && i.push(r), i;
|
|
3493
|
-
},
|
|
3779
|
+
}, gr = (e, t) => [
|
|
3494
3780
|
"wc-menu__menu",
|
|
3495
3781
|
`wc-menu__menu--${e}`,
|
|
3496
3782
|
t
|
|
3497
|
-
],
|
|
3783
|
+
], _r = ({ disabled: e }) => ["wc-menu__button", e ? "wc-menu__button--disabled" : ""], vr = (e) => {
|
|
3498
3784
|
let t = ["wc-menu__item"];
|
|
3499
3785
|
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;
|
|
3500
|
-
},
|
|
3786
|
+
}, yr = (e) => ["wc-menu__arrow", e ? "wc-menu__arrow--open" : ""], br = (e, t, n, r, i) => {
|
|
3501
3787
|
t || (n(!e), e ? i && i() : r && r());
|
|
3502
|
-
},
|
|
3788
|
+
}, xr = (e, t, n, r, i) => {
|
|
3503
3789
|
e.disabled || e.divider || (n && n(e, t), r(!1), i && i());
|
|
3504
|
-
},
|
|
3505
|
-
let [T, E] = d(!1), D = s(), O = u(null), k = u(null), A = u(null), j =
|
|
3790
|
+
}, Sr = (e) => e.startsWith("top") ? "top" : "bottom", Cr = ({ items: e = [], triggerText: t = "选择选项", placement: n = "bottom-start", size: r = "md", variant: i = "default", disabled: a = !1, trigger: c = "click", illustration: l = "", illustrationAlt: f = "示意图", cardTitle: h = "", cardDescription: g = "", onSelect: _, onOpen: v, onClose: y, children: b, triggerContent: x, menuContent: S, className: C = "", ...w }) => {
|
|
3791
|
+
let [T, E] = d(!1), D = s(), O = u(null), k = u(null), A = u(null), j = hr({
|
|
3506
3792
|
size: r,
|
|
3507
3793
|
variant: i,
|
|
3508
3794
|
disabled: a,
|
|
3509
3795
|
className: C
|
|
3510
|
-
}).join(" "), M =
|
|
3796
|
+
}).join(" "), M = gr(n, i === "card" ? "wc-menu__menu--card" : "").join(" "), N = _r({ disabled: a }).join(" "), P = yr(T).join(" "), F = i === "card" ? {
|
|
3511
3797
|
minWidth: "320px",
|
|
3512
3798
|
maxWidth: "450px"
|
|
3513
3799
|
} : { minWidth: "120px" }, I = () => {
|
|
3514
|
-
|
|
3800
|
+
br(T, a, E, v, y);
|
|
3515
3801
|
}, L = (e, t) => {
|
|
3516
|
-
|
|
3802
|
+
xr(e, t, _, E, y);
|
|
3517
3803
|
}, R = () => {
|
|
3518
3804
|
T && (E(!1), y?.());
|
|
3519
3805
|
}, z = (e = "first") => {
|
|
@@ -3525,14 +3811,14 @@ var Vn = (e) => {
|
|
|
3525
3811
|
o(() => {
|
|
3526
3812
|
T && queueMicrotask(() => z("first"));
|
|
3527
3813
|
}, [T]);
|
|
3528
|
-
let B =
|
|
3814
|
+
let B = le({
|
|
3529
3815
|
open: T,
|
|
3530
3816
|
anchorRef: A,
|
|
3531
3817
|
floatingRef: k,
|
|
3532
|
-
placement:
|
|
3818
|
+
placement: Sr(n),
|
|
3533
3819
|
offset: 6
|
|
3534
3820
|
});
|
|
3535
|
-
|
|
3821
|
+
ce({
|
|
3536
3822
|
open: T,
|
|
3537
3823
|
elementRef: k,
|
|
3538
3824
|
refs: [A],
|
|
@@ -3546,7 +3832,7 @@ var Vn = (e) => {
|
|
|
3546
3832
|
});
|
|
3547
3833
|
let V = (e) => {
|
|
3548
3834
|
a || (e.key === "ArrowDown" || e.key === "Enter" || e.key === " " ? (e.preventDefault(), T ? z("next") : (E(!0), v?.())) : e.key === "ArrowUp" && (e.preventDefault(), T ? z("previous") : (E(!0), v?.(), queueMicrotask(() => z("last")))));
|
|
3549
|
-
}, H = T ? /* @__PURE__ */ p(
|
|
3835
|
+
}, H = T ? /* @__PURE__ */ p(se, { children: /* @__PURE__ */ p("div", {
|
|
3550
3836
|
ref: k,
|
|
3551
3837
|
className: `${M} wc-menu__menu--resolved-${B}`.trim(),
|
|
3552
3838
|
id: D,
|
|
@@ -3584,7 +3870,7 @@ var Vn = (e) => {
|
|
|
3584
3870
|
}, e.key || t) : /* @__PURE__ */ m("button", {
|
|
3585
3871
|
type: "button",
|
|
3586
3872
|
role: "menuitem",
|
|
3587
|
-
className:
|
|
3873
|
+
className: vr(e).join(" "),
|
|
3588
3874
|
disabled: e.disabled,
|
|
3589
3875
|
onClick: () => L(e, t),
|
|
3590
3876
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
@@ -3602,7 +3888,7 @@ var Vn = (e) => {
|
|
|
3602
3888
|
}, e.key || t) : /* @__PURE__ */ m("button", {
|
|
3603
3889
|
type: "button",
|
|
3604
3890
|
role: "menuitem",
|
|
3605
|
-
className:
|
|
3891
|
+
className: vr(e).join(" "),
|
|
3606
3892
|
disabled: e.disabled,
|
|
3607
3893
|
onClick: () => L(e, t),
|
|
3608
3894
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
@@ -3644,41 +3930,41 @@ var Vn = (e) => {
|
|
|
3644
3930
|
}), H]
|
|
3645
3931
|
});
|
|
3646
3932
|
};
|
|
3647
|
-
|
|
3933
|
+
Cr.displayName = "Menu";
|
|
3648
3934
|
//#endregion
|
|
3649
3935
|
//#region src/components/Modal/utils.js
|
|
3650
|
-
function
|
|
3936
|
+
function wr({ size: e = "md", fullWidth: t = !1, fullScreen: n = !1, scroll: r = "paper", position: i = "center", className: a = "" } = {}) {
|
|
3651
3937
|
let o = ["wc-modal"];
|
|
3652
3938
|
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(" ");
|
|
3653
3939
|
}
|
|
3654
|
-
function
|
|
3940
|
+
function Tr({ centered: e = !0, position: t = "center" } = {}) {
|
|
3655
3941
|
let n = ["wc-modal-overlay"];
|
|
3656
3942
|
return (e || t === "center") && n.push("wc-modal-overlay--centered"), t && t !== "center" && n.push(`wc-modal-overlay--${t}`), n.join(" ");
|
|
3657
3943
|
}
|
|
3658
|
-
function
|
|
3944
|
+
function Er(e, t, n = 0) {
|
|
3659
3945
|
e(!1), t && (n > 0 ? setTimeout(() => {
|
|
3660
3946
|
t();
|
|
3661
3947
|
}, n) : t());
|
|
3662
3948
|
}
|
|
3663
3949
|
//#endregion
|
|
3664
3950
|
//#region src/components/Modal/Modal.jsx
|
|
3665
|
-
var
|
|
3666
|
-
let M = s(), [N, P] = d(e || t), F = u(null), { messages: I } =
|
|
3951
|
+
var Dr = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWidth: a = null, closable: c = !0, showCloseButton: l = !0, maskClosable: f = !0, closeOnOverlay: h = !0, disableBackdropClick: g = !1, disableEscapeKeyDown: _ = !1, centered: v = !0, fullWidth: y = !1, fullScreen: b = !1, position: x = "center", scroll: S = "paper", lockScroll: C = !0, zIndex: w = 1e3, showOverlay: T = !0, className: E = "", onClose: D, children: O, header: k, footer: A, ...j }) => {
|
|
3952
|
+
let M = s(), [N, P] = d(e || t), F = u(null), { messages: I } = J(), L = e || t;
|
|
3667
3953
|
o(() => {
|
|
3668
3954
|
P(L);
|
|
3669
3955
|
}, [L]);
|
|
3670
|
-
let R =
|
|
3956
|
+
let R = wr({
|
|
3671
3957
|
size: a || r,
|
|
3672
3958
|
fullWidth: y,
|
|
3673
3959
|
fullScreen: b,
|
|
3674
3960
|
scroll: S,
|
|
3675
3961
|
position: x,
|
|
3676
3962
|
className: E
|
|
3677
|
-
}), z =
|
|
3963
|
+
}), z = Tr({
|
|
3678
3964
|
centered: x === "center" || v,
|
|
3679
3965
|
position: x
|
|
3680
3966
|
}), B = i(() => {
|
|
3681
|
-
|
|
3967
|
+
Er(P, D);
|
|
3682
3968
|
}, [D]), V = i(() => {
|
|
3683
3969
|
f && h && !g && B();
|
|
3684
3970
|
}, [
|
|
@@ -3687,7 +3973,7 @@ var cr = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3687
3973
|
B,
|
|
3688
3974
|
f
|
|
3689
3975
|
]);
|
|
3690
|
-
if (
|
|
3976
|
+
if (ce({
|
|
3691
3977
|
open: N,
|
|
3692
3978
|
elementRef: F,
|
|
3693
3979
|
modal: !0,
|
|
@@ -3700,7 +3986,7 @@ var cr = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3700
3986
|
zIndex: w
|
|
3701
3987
|
}), !N) return null;
|
|
3702
3988
|
let H = c && l !== !1;
|
|
3703
|
-
return /* @__PURE__ */ p(
|
|
3989
|
+
return /* @__PURE__ */ p(se, { children: /* @__PURE__ */ m("div", {
|
|
3704
3990
|
className: z,
|
|
3705
3991
|
style: { zIndex: w },
|
|
3706
3992
|
onClick: V,
|
|
@@ -3715,7 +4001,7 @@ var cr = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3715
4001
|
tabIndex: -1,
|
|
3716
4002
|
...j,
|
|
3717
4003
|
children: [
|
|
3718
|
-
H && /* @__PURE__ */ p(
|
|
4004
|
+
H && /* @__PURE__ */ p(Ze, {
|
|
3719
4005
|
variant: "text",
|
|
3720
4006
|
size: "sm",
|
|
3721
4007
|
className: "wc-modal__close",
|
|
@@ -3747,10 +4033,10 @@ var cr = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3747
4033
|
})]
|
|
3748
4034
|
}) });
|
|
3749
4035
|
};
|
|
3750
|
-
|
|
4036
|
+
Dr.displayName = "Modal";
|
|
3751
4037
|
//#endregion
|
|
3752
4038
|
//#region src/components/NumberAnimation/NumberAnimation.jsx
|
|
3753
|
-
var
|
|
4039
|
+
var Or = ({ 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 }) => {
|
|
3754
4040
|
let [b, x] = d(n), [S, C] = d(!1), w = u(null), T = u(null), E = (i) => {
|
|
3755
4041
|
w.current === null && (w.current = i);
|
|
3756
4042
|
let a = Math.min((i - w.current) / t, 1);
|
|
@@ -3796,8 +4082,8 @@ var lr = ({ active: e = !0, duration: t = 3e3, from: n = 0, to: r, locale: i = "
|
|
|
3796
4082
|
};
|
|
3797
4083
|
//#endregion
|
|
3798
4084
|
//#region src/components/Pagination/Pagination.jsx
|
|
3799
|
-
function
|
|
3800
|
-
let { messages: h } =
|
|
4085
|
+
function kr({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCount: a = 1, boundaryCount: s = 1, size: c = "md", className: u = "", ...f }) {
|
|
4086
|
+
let { messages: h } = J(), [g, _] = d(e);
|
|
3801
4087
|
o(() => {
|
|
3802
4088
|
_(e);
|
|
3803
4089
|
}, [e]);
|
|
@@ -3891,38 +4177,38 @@ function ur({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCoun
|
|
|
3891
4177
|
}
|
|
3892
4178
|
//#endregion
|
|
3893
4179
|
//#region src/components/Page/Page.jsx
|
|
3894
|
-
var
|
|
4180
|
+
var Ar = ({ as: e = "div", size: t = "lg", gutter: n = "md", className: r = "", children: i, ...a }) => /* @__PURE__ */ p(e, {
|
|
3895
4181
|
className: ["wc-page", r].filter(Boolean).join(" "),
|
|
3896
4182
|
"data-size": t,
|
|
3897
4183
|
"data-gutter": n,
|
|
3898
4184
|
...a,
|
|
3899
4185
|
children: i
|
|
3900
4186
|
});
|
|
3901
|
-
|
|
4187
|
+
Ar.displayName = "Page", Ar.propTypes = {
|
|
3902
4188
|
as: $.default.elementType,
|
|
3903
|
-
size: $.default.oneOf(
|
|
3904
|
-
gutter: $.default.oneOf(
|
|
4189
|
+
size: $.default.oneOf($n),
|
|
4190
|
+
gutter: $.default.oneOf(er),
|
|
3905
4191
|
className: $.default.string,
|
|
3906
4192
|
children: $.default.node
|
|
3907
4193
|
};
|
|
3908
4194
|
//#endregion
|
|
3909
4195
|
//#region src/components/Paper/utils.js
|
|
3910
|
-
var
|
|
4196
|
+
var jr = {
|
|
3911
4197
|
ELEVATION: "elevation",
|
|
3912
4198
|
OUTLINED: "outlined"
|
|
3913
|
-
},
|
|
4199
|
+
}, Mr = {
|
|
3914
4200
|
SQUARE: "square",
|
|
3915
4201
|
ROUNDED_SM: "rounded-sm",
|
|
3916
4202
|
ROUNDED_LG: "rounded-lg",
|
|
3917
4203
|
ROUNDED_XL: "rounded-xl",
|
|
3918
4204
|
ROUNDED_2XL: "rounded-2xl",
|
|
3919
4205
|
ROUNDED_FULL: "rounded-full"
|
|
3920
|
-
},
|
|
4206
|
+
}, Nr = {
|
|
3921
4207
|
SM: "sm",
|
|
3922
4208
|
MD: "md",
|
|
3923
4209
|
LG: "lg",
|
|
3924
4210
|
XL: "xl"
|
|
3925
|
-
},
|
|
4211
|
+
}, Pr = {
|
|
3926
4212
|
DEFAULT: "default",
|
|
3927
4213
|
PRIMARY: "primary",
|
|
3928
4214
|
SUCCESS: "success",
|
|
@@ -3930,21 +4216,21 @@ var fr = {
|
|
|
3930
4216
|
ERROR: "error",
|
|
3931
4217
|
INFO: "info"
|
|
3932
4218
|
};
|
|
3933
|
-
function
|
|
3934
|
-
let { variant: t =
|
|
3935
|
-
if (t ===
|
|
4219
|
+
function Fr(e = {}) {
|
|
4220
|
+
let { variant: t = jr.ELEVATION, elevation: n = 1, square: r = !1, shape: i = null, size: a = null, color: o = Pr.DEFAULT, hoverable: s = !1, clickable: c = !1, gradient: l = !1, frosted: u = !1, textured: d = !1, className: f = "" } = e, p = ["wc-paper"];
|
|
4221
|
+
if (t === jr.OUTLINED) p.push("wc-paper--outlined");
|
|
3936
4222
|
else {
|
|
3937
4223
|
p.push("wc-paper--elevation");
|
|
3938
4224
|
let e = Math.max(0, Math.min(24, Math.floor(Number(n) || 0)));
|
|
3939
4225
|
p.push(`wc-paper--elevation-${e}`);
|
|
3940
4226
|
}
|
|
3941
|
-
return r ? p.push("wc-paper--square") : i &&
|
|
4227
|
+
return r ? p.push("wc-paper--square") : i && Mr[i.toUpperCase()] && p.push(`wc-paper--${i}`), a && Nr[a.toUpperCase()] && p.push(`wc-paper--${a}`), o !== Pr.DEFAULT && Pr[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(" ");
|
|
3942
4228
|
}
|
|
3943
4229
|
//#endregion
|
|
3944
4230
|
//#region src/components/Paper/Paper.jsx
|
|
3945
|
-
function
|
|
4231
|
+
function Ir({ 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 }) {
|
|
3946
4232
|
return /* @__PURE__ */ p(e, {
|
|
3947
|
-
className:
|
|
4233
|
+
className: Fr({
|
|
3948
4234
|
variant: t,
|
|
3949
4235
|
elevation: Math.max(0, Math.min(24, Math.floor(Number(n) || 0))),
|
|
3950
4236
|
square: r,
|
|
@@ -3975,19 +4261,19 @@ function _r({ component: e = "div", variant: t = "elevation", elevation: n = 1,
|
|
|
3975
4261
|
}
|
|
3976
4262
|
//#endregion
|
|
3977
4263
|
//#region src/components/Popover/Popover.jsx
|
|
3978
|
-
function
|
|
3979
|
-
let { messages: f } =
|
|
4264
|
+
function Lr({ open: t, onOpenChange: n, triggerText: r = "打开弹窗", trigger: i, placement: a = "bottom", offset: o = 8, children: c, className: l = "" }) {
|
|
4265
|
+
let { messages: f } = J(), h = s(), [g, _] = d(!1), v = t != null, y = u(null), b = u(null), x = v ? t : g, S = (e) => {
|
|
3980
4266
|
v || _(e), n?.(e);
|
|
3981
4267
|
}, C = () => S(!1), w = () => {
|
|
3982
4268
|
S(!x);
|
|
3983
|
-
}, T =
|
|
4269
|
+
}, T = le({
|
|
3984
4270
|
open: x,
|
|
3985
4271
|
anchorRef: y,
|
|
3986
4272
|
floatingRef: b,
|
|
3987
4273
|
placement: a,
|
|
3988
4274
|
offset: o
|
|
3989
4275
|
});
|
|
3990
|
-
|
|
4276
|
+
ce({
|
|
3991
4277
|
open: x,
|
|
3992
4278
|
elementRef: b,
|
|
3993
4279
|
refs: [y],
|
|
@@ -4015,7 +4301,7 @@ function vr({ open: t, onOpenChange: n, triggerText: r = "打开弹窗", trigger
|
|
|
4015
4301
|
});
|
|
4016
4302
|
return /* @__PURE__ */ m("div", {
|
|
4017
4303
|
className: `wc-popover-container ${l}`.trim(),
|
|
4018
|
-
children: [E, x && /* @__PURE__ */ p(
|
|
4304
|
+
children: [E, x && /* @__PURE__ */ p(se, { children: /* @__PURE__ */ p("div", {
|
|
4019
4305
|
ref: b,
|
|
4020
4306
|
id: h,
|
|
4021
4307
|
className: `wc-popover-content wc-popover-content--${T}`.trim(),
|
|
@@ -4028,7 +4314,7 @@ function vr({ open: t, onOpenChange: n, triggerText: r = "打开弹窗", trigger
|
|
|
4028
4314
|
}
|
|
4029
4315
|
//#endregion
|
|
4030
4316
|
//#region src/components/PricingTable/PricingTable.jsx
|
|
4031
|
-
function
|
|
4317
|
+
function Rr({ plans: e = [], columns: t = 3, className: n = "" }) {
|
|
4032
4318
|
let r = { gridTemplateColumns: `repeat(${t}, minmax(0,1fr))` };
|
|
4033
4319
|
return /* @__PURE__ */ p("div", {
|
|
4034
4320
|
className: `pricing-grid ${n}`.trim(),
|
|
@@ -4058,8 +4344,8 @@ function yr({ plans: e = [], columns: t = 3, className: n = "" }) {
|
|
|
4058
4344
|
}
|
|
4059
4345
|
//#endregion
|
|
4060
4346
|
//#region src/components/Progress/Progress.jsx
|
|
4061
|
-
var
|
|
4062
|
-
let { messages: c } =
|
|
4347
|
+
var zr = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primary", size: i = "md", animated: a = !1, className: o = "", ...s }) => {
|
|
4348
|
+
let { messages: c } = J(), l = [
|
|
4063
4349
|
"primary",
|
|
4064
4350
|
"success",
|
|
4065
4351
|
"warning",
|
|
@@ -4099,11 +4385,11 @@ var br = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primar
|
|
|
4099
4385
|
})]
|
|
4100
4386
|
});
|
|
4101
4387
|
};
|
|
4102
|
-
|
|
4388
|
+
zr.displayName = "Progress";
|
|
4103
4389
|
//#endregion
|
|
4104
4390
|
//#region src/components/Radio/Radio.jsx
|
|
4105
|
-
var
|
|
4106
|
-
function
|
|
4391
|
+
var Br = n(null);
|
|
4392
|
+
function Vr({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", row: o = !1, required: s = !1, error: c = "", helperText: l = "", size: u = "md", color: f = "primary", children: h, className: g = "" }) {
|
|
4107
4393
|
let [_, v] = d(e), y = e !== void 0, b = y ? e : _, x = i((e) => {
|
|
4108
4394
|
r || (y || v(e), t?.(e));
|
|
4109
4395
|
}, [
|
|
@@ -4111,7 +4397,7 @@ function Sr({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", r
|
|
|
4111
4397
|
y,
|
|
4112
4398
|
t
|
|
4113
4399
|
]), S = ["wc-radio-group", g].filter(Boolean).join(" "), C = ["wc-radio-group-content", o && "wc-radio-group-content--row"].filter(Boolean).join(" ");
|
|
4114
|
-
return /* @__PURE__ */ p(
|
|
4400
|
+
return /* @__PURE__ */ p(Br.Provider, {
|
|
4115
4401
|
value: {
|
|
4116
4402
|
value: b,
|
|
4117
4403
|
updateValue: x,
|
|
@@ -4148,8 +4434,8 @@ function Sr({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", r
|
|
|
4148
4434
|
})
|
|
4149
4435
|
});
|
|
4150
4436
|
}
|
|
4151
|
-
function
|
|
4152
|
-
let h = a(
|
|
4437
|
+
function Hr({ value: e, checked: t, onChange: n, label: r, name: i, disabled: o = !1, color: s = "primary", size: c = "md", className: l = "", children: u, ...f }) {
|
|
4438
|
+
let h = a(Br), 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 = [
|
|
4153
4439
|
"wc-radio",
|
|
4154
4440
|
`wc-radio--${y}`,
|
|
4155
4441
|
v && "wc-radio--disabled",
|
|
@@ -4190,11 +4476,11 @@ function Cr({ value: e, checked: t, onChange: n, label: r, name: i, disabled: o
|
|
|
4190
4476
|
]
|
|
4191
4477
|
});
|
|
4192
4478
|
}
|
|
4193
|
-
|
|
4479
|
+
Hr.displayName = "Radio", Vr.displayName = "RadioGroup";
|
|
4194
4480
|
//#endregion
|
|
4195
4481
|
//#region src/components/Rating/Rating.jsx
|
|
4196
|
-
var
|
|
4197
|
-
let [l, u] = d(0), [f, m] = d(e), { messages: h } =
|
|
4482
|
+
var Ur = ({ value: e = 0, max: t = 5, readOnly: n = !1, onChange: r = () => {}, className: i = "", style: a = {}, ariaLabel: s, ...c }) => {
|
|
4483
|
+
let [l, u] = d(0), [f, m] = d(e), { messages: h } = J();
|
|
4198
4484
|
o(() => m(e), [e]);
|
|
4199
4485
|
let g = (e) => {
|
|
4200
4486
|
if (n) return;
|
|
@@ -4224,14 +4510,14 @@ var wr = ({ value: e = 0, max: t = 5, readOnly: n = !1, onChange: r = () => {},
|
|
|
4224
4510
|
})
|
|
4225
4511
|
});
|
|
4226
4512
|
};
|
|
4227
|
-
|
|
4513
|
+
Ur.displayName = "Rating";
|
|
4228
4514
|
//#endregion
|
|
4229
4515
|
//#region src/components/Select/Select.jsx
|
|
4230
|
-
var
|
|
4516
|
+
var Wr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Select an option", label: i = "", helperText: a = "", error: o = !1, errorMessage: c = "", required: l = !1, disabled: f = !1, multiple: h = !1, clearable: g = !1, fullWidth: _ = !1, size: v = "md", variant: y = "filled", color: b = "primary", maxHeight: x = 200, name: S = "", id: C = "", className: w = "", style: T = {}, onFocus: E, onBlur: D, onSearch: O, renderOption: k, renderValue: A, ...j }) => {
|
|
4231
4517
|
let [M, N] = d(!1), [P, F] = d(!1), [I, L] = d(-1), R = u(null), z = u(null), B = () => {
|
|
4232
4518
|
N(!1), F(!1), L(-1);
|
|
4233
4519
|
};
|
|
4234
|
-
|
|
4520
|
+
ce({
|
|
4235
4521
|
open: M,
|
|
4236
4522
|
elementRef: z,
|
|
4237
4523
|
refs: [R],
|
|
@@ -4398,17 +4684,17 @@ var Tr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4398
4684
|
]
|
|
4399
4685
|
});
|
|
4400
4686
|
};
|
|
4401
|
-
|
|
4687
|
+
Wr.displayName = "Select";
|
|
4402
4688
|
//#endregion
|
|
4403
4689
|
//#region src/components/Skeleton/Skeleton.jsx
|
|
4404
|
-
var
|
|
4690
|
+
var Gr = {
|
|
4405
4691
|
text: "wc-skeleton--text",
|
|
4406
4692
|
rectangular: "wc-skeleton--rectangular",
|
|
4407
4693
|
rounded: "wc-skeleton--rounded",
|
|
4408
4694
|
circular: "wc-skeleton--circular"
|
|
4409
|
-
},
|
|
4410
|
-
let { messages: c } =
|
|
4411
|
-
let t = ["wc-skeleton",
|
|
4695
|
+
}, Kr = ({ animation: e = "pulse", component: t = "div", height: n, width: r, variant: i = "text", style: a = {}, className: o = "", ...s }) => {
|
|
4696
|
+
let { messages: c } = J(), u = l(() => {
|
|
4697
|
+
let t = ["wc-skeleton", Gr[i] || Gr.text];
|
|
4412
4698
|
return e === "pulse" && t.push("wc-skeleton--pulse"), e === "wave" && t.push("wc-skeleton--wave"), t.join(" ");
|
|
4413
4699
|
}, [e, i]), d = { ...a };
|
|
4414
4700
|
return r !== void 0 && (d.width = typeof r == "number" ? `${r}px` : r), n !== void 0 && (d.height = typeof n == "number" ? `${n}px` : n), !r && !n && (i === "circular" ? (d.width = "40px", d.height = "40px") : i === "text" ? (d.width = "100%", d.height = "16px") : (d.width = "100%", d.height = "128px")), /* @__PURE__ */ p(t, {
|
|
@@ -4420,7 +4706,7 @@ var Er = {
|
|
|
4420
4706
|
"aria-busy": "true",
|
|
4421
4707
|
...s
|
|
4422
4708
|
});
|
|
4423
|
-
},
|
|
4709
|
+
}, qr = ({ 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 = {}, ..._ }) => {
|
|
4424
4710
|
let [v, y] = d(e === void 0 ? t : e), b = s();
|
|
4425
4711
|
o(() => {
|
|
4426
4712
|
e !== void 0 && y(e);
|
|
@@ -4467,14 +4753,14 @@ var Er = {
|
|
|
4467
4753
|
})]
|
|
4468
4754
|
});
|
|
4469
4755
|
};
|
|
4470
|
-
|
|
4756
|
+
qr.displayName = "Slider";
|
|
4471
4757
|
//#endregion
|
|
4472
4758
|
//#region src/components/SlideOver/SlideOver.jsx
|
|
4473
|
-
var
|
|
4474
|
-
let c = u(null), { messages: l } =
|
|
4759
|
+
var Jr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width: r = 400, children: a, header: o, footer: s }) => {
|
|
4760
|
+
let c = u(null), { messages: l } = J(), d = i(() => {
|
|
4475
4761
|
t?.();
|
|
4476
4762
|
}, [t]);
|
|
4477
|
-
return
|
|
4763
|
+
return ce({
|
|
4478
4764
|
open: e,
|
|
4479
4765
|
elementRef: c,
|
|
4480
4766
|
modal: !0,
|
|
@@ -4485,7 +4771,7 @@ var kr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4485
4771
|
closeOnPointerDownOutside: !1,
|
|
4486
4772
|
onEscapeKeyDown: d,
|
|
4487
4773
|
zIndex: 3e3
|
|
4488
|
-
}), /* @__PURE__ */ p(
|
|
4774
|
+
}), /* @__PURE__ */ p(se, { children: e ? /* @__PURE__ */ m("div", {
|
|
4489
4775
|
className: "wc-slideover-wrapper",
|
|
4490
4776
|
children: [/* @__PURE__ */ p("div", {
|
|
4491
4777
|
className: "wc-slideover-overlay",
|
|
@@ -4524,7 +4810,7 @@ var kr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4524
4810
|
]
|
|
4525
4811
|
})]
|
|
4526
4812
|
}) : null });
|
|
4527
|
-
},
|
|
4813
|
+
}, Yr = ({ as: e = "div", ratio: t = "equal", gap: n = "xl", align: r = "stretch", collapse: i = "md", className: a = "", children: o, ...s }) => /* @__PURE__ */ p(e, {
|
|
4528
4814
|
className: ["wc-split", a].filter(Boolean).join(" "),
|
|
4529
4815
|
"data-ratio": t,
|
|
4530
4816
|
"data-gap": n,
|
|
@@ -4533,34 +4819,34 @@ var kr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4533
4819
|
...s,
|
|
4534
4820
|
children: o
|
|
4535
4821
|
});
|
|
4536
|
-
|
|
4822
|
+
Yr.displayName = "Split", Yr.propTypes = {
|
|
4537
4823
|
as: $.default.elementType,
|
|
4538
|
-
ratio: $.default.oneOf(
|
|
4539
|
-
gap: $.default.oneOf(
|
|
4540
|
-
align: $.default.oneOf(
|
|
4541
|
-
collapse: $.default.oneOf(
|
|
4824
|
+
ratio: $.default.oneOf(nr),
|
|
4825
|
+
gap: $.default.oneOf(Zn),
|
|
4826
|
+
align: $.default.oneOf(Qn),
|
|
4827
|
+
collapse: $.default.oneOf(rr),
|
|
4542
4828
|
className: $.default.string,
|
|
4543
4829
|
children: $.default.node
|
|
4544
4830
|
};
|
|
4545
4831
|
//#endregion
|
|
4546
4832
|
//#region src/components/Stack/Stack.jsx
|
|
4547
|
-
var
|
|
4833
|
+
var Xr = ({ as: e = "div", gap: t = "md", align: n = "stretch", className: r = "", children: i, ...a }) => /* @__PURE__ */ p(e, {
|
|
4548
4834
|
className: ["wc-stack", r].filter(Boolean).join(" "),
|
|
4549
4835
|
"data-gap": t,
|
|
4550
4836
|
"data-align": n,
|
|
4551
4837
|
...a,
|
|
4552
4838
|
children: i
|
|
4553
4839
|
});
|
|
4554
|
-
|
|
4840
|
+
Xr.displayName = "Stack", Xr.propTypes = {
|
|
4555
4841
|
as: $.default.elementType,
|
|
4556
|
-
gap: $.default.oneOf(
|
|
4557
|
-
align: $.default.oneOf(
|
|
4842
|
+
gap: $.default.oneOf(Zn),
|
|
4843
|
+
align: $.default.oneOf(Qn),
|
|
4558
4844
|
className: $.default.string,
|
|
4559
4845
|
children: $.default.node
|
|
4560
4846
|
};
|
|
4561
4847
|
//#endregion
|
|
4562
4848
|
//#region src/components/Snackbar/Snackbar.jsx
|
|
4563
|
-
var
|
|
4849
|
+
var Zr = ({ severity: e }) => {
|
|
4564
4850
|
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" })] });
|
|
4565
4851
|
return /* @__PURE__ */ m("svg", {
|
|
4566
4852
|
viewBox: "0 0 20 20",
|
|
@@ -4577,11 +4863,11 @@ var Mr = ({ severity: e }) => {
|
|
|
4577
4863
|
}), t]
|
|
4578
4864
|
});
|
|
4579
4865
|
};
|
|
4580
|
-
function
|
|
4866
|
+
function Qr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r = "", severity: i = "info", variant: a = "standard", autoHideDuration: s = 6e3, anchorOrigin: c = {
|
|
4581
4867
|
vertical: "bottom",
|
|
4582
4868
|
horizontal: "left"
|
|
4583
4869
|
}, action: l = "", closable: u = !0, showIcon: f = !0, showProgress: g = !1, onClose: _ = () => {}, onUpdateModelValue: v, onAction: y = () => {}, children: b }) {
|
|
4584
|
-
let { messages: x } =
|
|
4870
|
+
let { messages: x } = J(), S = t !== void 0, [C, w] = d(S ? t : e), [T, E] = d(100);
|
|
4585
4871
|
o(() => {
|
|
4586
4872
|
let n = S ? t : e;
|
|
4587
4873
|
w(n), n && E(100);
|
|
@@ -4628,7 +4914,7 @@ function Nr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4628
4914
|
children: [
|
|
4629
4915
|
f && /* @__PURE__ */ p("div", {
|
|
4630
4916
|
className: "wc-snackbar__icon",
|
|
4631
|
-
children: /* @__PURE__ */ p(
|
|
4917
|
+
children: /* @__PURE__ */ p(Zr, { severity: i })
|
|
4632
4918
|
}),
|
|
4633
4919
|
/* @__PURE__ */ m("div", {
|
|
4634
4920
|
className: "wc-snackbar__content",
|
|
@@ -4676,7 +4962,7 @@ function Nr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4676
4962
|
}
|
|
4677
4963
|
//#endregion
|
|
4678
4964
|
//#region src/components/Status/utils.js
|
|
4679
|
-
var
|
|
4965
|
+
var $r = [
|
|
4680
4966
|
"default",
|
|
4681
4967
|
"success",
|
|
4682
4968
|
"error",
|
|
@@ -4685,7 +4971,7 @@ var Pr = [
|
|
|
4685
4971
|
"pending",
|
|
4686
4972
|
"processing",
|
|
4687
4973
|
"cancelled"
|
|
4688
|
-
],
|
|
4974
|
+
], ei = [
|
|
4689
4975
|
"auto",
|
|
4690
4976
|
"pulse",
|
|
4691
4977
|
"spin",
|
|
@@ -4695,7 +4981,7 @@ var Pr = [
|
|
|
4695
4981
|
"breathe",
|
|
4696
4982
|
"ripple",
|
|
4697
4983
|
"glow"
|
|
4698
|
-
],
|
|
4984
|
+
], ti = {
|
|
4699
4985
|
default: {
|
|
4700
4986
|
text: "默认",
|
|
4701
4987
|
color: "var(--wc-text-tertiary)"
|
|
@@ -4729,29 +5015,29 @@ var Pr = [
|
|
|
4729
5015
|
color: "var(--wc-text-disabled)"
|
|
4730
5016
|
}
|
|
4731
5017
|
};
|
|
4732
|
-
function
|
|
4733
|
-
return
|
|
5018
|
+
function ni(e) {
|
|
5019
|
+
return $r.includes(e);
|
|
4734
5020
|
}
|
|
4735
|
-
function
|
|
4736
|
-
return
|
|
5021
|
+
function ri(e) {
|
|
5022
|
+
return ni(e) ? e : "default";
|
|
4737
5023
|
}
|
|
4738
|
-
function
|
|
4739
|
-
let o =
|
|
5024
|
+
function ii({ status: e, size: t, showText: n, animated: r, animationType: i = "auto", className: a }) {
|
|
5025
|
+
let o = ri(e), s = [
|
|
4740
5026
|
"wc-status",
|
|
4741
5027
|
`wc-status--${o}`,
|
|
4742
5028
|
`wc-status--${t}`
|
|
4743
5029
|
];
|
|
4744
5030
|
if (n && s.push("wc-status--with-text"), r) {
|
|
4745
|
-
let e =
|
|
5031
|
+
let e = oi(o, i);
|
|
4746
5032
|
s.push("wc-status--animated", `wc-status--${e}`);
|
|
4747
5033
|
}
|
|
4748
5034
|
return a && s.push(a), s.filter(Boolean).join(" ");
|
|
4749
5035
|
}
|
|
4750
|
-
function
|
|
4751
|
-
return
|
|
5036
|
+
function ai(e) {
|
|
5037
|
+
return ti[e]?.text || ti.default.text;
|
|
4752
5038
|
}
|
|
4753
|
-
function
|
|
4754
|
-
return t !== "auto" &&
|
|
5039
|
+
function oi(e, t = "auto") {
|
|
5040
|
+
return t !== "auto" && ei.includes(t) ? t : {
|
|
4755
5041
|
processing: "spin",
|
|
4756
5042
|
pending: "pulse",
|
|
4757
5043
|
success: "bounce",
|
|
@@ -4764,15 +5050,15 @@ function Vr(e, t = "auto") {
|
|
|
4764
5050
|
}
|
|
4765
5051
|
//#endregion
|
|
4766
5052
|
//#region src/components/Status/Status.jsx
|
|
4767
|
-
var
|
|
4768
|
-
let s =
|
|
5053
|
+
var si = ({ status: e = "default", size: t = "md", showText: n = !1, animated: r = !1, animationType: i = "auto", className: a = "", ...o }) => {
|
|
5054
|
+
let s = ii({
|
|
4769
5055
|
status: e,
|
|
4770
5056
|
size: t,
|
|
4771
5057
|
showText: n,
|
|
4772
5058
|
animated: r,
|
|
4773
5059
|
animationType: i,
|
|
4774
5060
|
className: a
|
|
4775
|
-
}), c =
|
|
5061
|
+
}), c = ai(e);
|
|
4776
5062
|
return /* @__PURE__ */ p("span", {
|
|
4777
5063
|
className: s,
|
|
4778
5064
|
role: "status",
|
|
@@ -4785,11 +5071,11 @@ var Hr = ({ status: e = "default", size: t = "md", showText: n = !1, animated: r
|
|
|
4785
5071
|
})
|
|
4786
5072
|
});
|
|
4787
5073
|
};
|
|
4788
|
-
|
|
5074
|
+
si.displayName = "Status";
|
|
4789
5075
|
//#endregion
|
|
4790
5076
|
//#region src/components/Switch/Switch.jsx
|
|
4791
|
-
var
|
|
4792
|
-
let { messages: d } =
|
|
5077
|
+
var ci = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", disabled: i = !1, required: a = !1, color: o = "primary", size: c = "md", className: l = "", ...u }) => {
|
|
5078
|
+
let { messages: d } = J(), f = s(), h = `${f}-input`, g = [
|
|
4793
5079
|
"primary",
|
|
4794
5080
|
"success",
|
|
4795
5081
|
"warning",
|
|
@@ -4850,20 +5136,20 @@ var Ur = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", di
|
|
|
4850
5136
|
})]
|
|
4851
5137
|
});
|
|
4852
5138
|
};
|
|
4853
|
-
|
|
5139
|
+
ci.displayName = "Switch";
|
|
4854
5140
|
//#endregion
|
|
4855
5141
|
//#region src/components/Table/Table.jsx
|
|
4856
|
-
var
|
|
5142
|
+
var li = n({
|
|
4857
5143
|
size: "md",
|
|
4858
5144
|
dense: !1,
|
|
4859
5145
|
hover: !1,
|
|
4860
5146
|
striped: !1
|
|
4861
|
-
}),
|
|
5147
|
+
}), ui = ({ size: e = "md", stickyHeader: t = !1, dense: n = !1, hover: r = !1, striped: i = !1, children: a, className: o = "", ...s }) => /* @__PURE__ */ p("div", {
|
|
4862
5148
|
className: `wc-table-container${t ? " wc-table-container--sticky" : ""} ${o}`,
|
|
4863
5149
|
...s,
|
|
4864
5150
|
children: /* @__PURE__ */ p("table", {
|
|
4865
5151
|
className: `wc-table wc-table--${e}${r ? " wc-table--hover" : ""}${i ? " wc-table--striped" : ""}${n ? " wc-table--dense" : ""}`,
|
|
4866
|
-
children: /* @__PURE__ */ p(
|
|
5152
|
+
children: /* @__PURE__ */ p(li.Provider, {
|
|
4867
5153
|
value: {
|
|
4868
5154
|
size: e,
|
|
4869
5155
|
dense: n,
|
|
@@ -4875,24 +5161,24 @@ var Wr = n({
|
|
|
4875
5161
|
})
|
|
4876
5162
|
})
|
|
4877
5163
|
});
|
|
4878
|
-
|
|
4879
|
-
var
|
|
4880
|
-
let { stickyHeader: r } = a(
|
|
5164
|
+
ui.displayName = "Table";
|
|
5165
|
+
var di = ({ children: e, className: t = "", ...n }) => {
|
|
5166
|
+
let { stickyHeader: r } = a(li);
|
|
4881
5167
|
return /* @__PURE__ */ p("thead", {
|
|
4882
5168
|
className: `wc-table-head${r ? " wc-table-head--sticky" : ""} ${t}`,
|
|
4883
5169
|
...n,
|
|
4884
5170
|
children: e
|
|
4885
5171
|
});
|
|
4886
5172
|
};
|
|
4887
|
-
|
|
4888
|
-
var
|
|
5173
|
+
di.displayName = "TableHead";
|
|
5174
|
+
var fi = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ p("tbody", {
|
|
4889
5175
|
className: `wc-table-body ${t}`,
|
|
4890
5176
|
...n,
|
|
4891
5177
|
children: e
|
|
4892
5178
|
});
|
|
4893
|
-
|
|
4894
|
-
var
|
|
4895
|
-
let c = a(
|
|
5179
|
+
fi.displayName = "TableBody";
|
|
5180
|
+
var pi = ({ hover: e, selected: t = !1, clickable: n = !1, children: r, className: i = "", onClick: o, ...s }) => {
|
|
5181
|
+
let c = a(li);
|
|
4896
5182
|
return /* @__PURE__ */ p("tr", {
|
|
4897
5183
|
className: [
|
|
4898
5184
|
"wc-table-row",
|
|
@@ -4906,9 +5192,9 @@ var Jr = ({ hover: e, selected: t = !1, clickable: n = !1, children: r, classNam
|
|
|
4906
5192
|
children: r
|
|
4907
5193
|
});
|
|
4908
5194
|
};
|
|
4909
|
-
|
|
4910
|
-
var
|
|
4911
|
-
let d = a(
|
|
5195
|
+
pi.displayName = "TableRow";
|
|
5196
|
+
var mi = ({ component: e = "td", align: t = "inherit", padding: n = "normal", size: r, sortDirection: i = !1, variant: o = "body", scope: s, children: c, className: l = "", ...u }) => {
|
|
5197
|
+
let d = a(li), f = r || (d.dense ? "small" : "medium");
|
|
4912
5198
|
return /* @__PURE__ */ p(e, {
|
|
4913
5199
|
className: [
|
|
4914
5200
|
"wc-table-cell",
|
|
@@ -4925,14 +5211,14 @@ var Yr = ({ component: e = "td", align: t = "inherit", padding: n = "normal", si
|
|
|
4925
5211
|
children: c
|
|
4926
5212
|
});
|
|
4927
5213
|
};
|
|
4928
|
-
|
|
4929
|
-
var
|
|
4930
|
-
Head:
|
|
4931
|
-
Body:
|
|
4932
|
-
Row:
|
|
4933
|
-
Cell:
|
|
4934
|
-
}),
|
|
4935
|
-
let l = s(), { messages: u } =
|
|
5214
|
+
mi.displayName = "TableCell";
|
|
5215
|
+
var hi = Object.assign(ui, {
|
|
5216
|
+
Head: di,
|
|
5217
|
+
Body: fi,
|
|
5218
|
+
Row: pi,
|
|
5219
|
+
Cell: mi
|
|
5220
|
+
}), gi = ({ tabs: e = [], activeIndex: t, onChange: n, variant: r = "default", children: i, className: a = "", ...c }) => {
|
|
5221
|
+
let l = s(), { messages: u } = J(), [f, h] = d(t || 0), g = t !== void 0, _ = g ? t : f;
|
|
4936
5222
|
o(() => {
|
|
4937
5223
|
g && h(t);
|
|
4938
5224
|
}, [t, g]);
|
|
@@ -4992,10 +5278,10 @@ var Xr = Object.assign(Gr, {
|
|
|
4992
5278
|
})]
|
|
4993
5279
|
});
|
|
4994
5280
|
};
|
|
4995
|
-
|
|
5281
|
+
gi.displayName = "Tabs";
|
|
4996
5282
|
//#endregion
|
|
4997
5283
|
//#region src/components/TextField/TextField.jsx
|
|
4998
|
-
var
|
|
5284
|
+
var _i = ({ 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 }) => {
|
|
4999
5285
|
let [z, B] = d(!1), [V, H] = d(!!e);
|
|
5000
5286
|
o(() => {
|
|
5001
5287
|
H(!!e);
|
|
@@ -5082,39 +5368,39 @@ var Qr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
5082
5368
|
]
|
|
5083
5369
|
});
|
|
5084
5370
|
};
|
|
5085
|
-
|
|
5371
|
+
_i.displayName = "TextField";
|
|
5086
5372
|
//#endregion
|
|
5087
5373
|
//#region src/components/Toolbar/utils.js
|
|
5088
|
-
var
|
|
5374
|
+
var vi = (e, t, n = "") => {
|
|
5089
5375
|
let r = ["flex items-center w-full"];
|
|
5090
5376
|
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(" ");
|
|
5091
|
-
},
|
|
5092
|
-
className:
|
|
5377
|
+
}, yi = ({ children: e, variant: t = "regular", disableGutters: n = !1, className: r = "", style: i = {}, ...a }) => /* @__PURE__ */ p("div", {
|
|
5378
|
+
className: vi(t, n, r),
|
|
5093
5379
|
style: i,
|
|
5094
5380
|
...a,
|
|
5095
5381
|
children: e
|
|
5096
|
-
}),
|
|
5382
|
+
}), bi = {
|
|
5097
5383
|
top: "wc-tooltip--top",
|
|
5098
5384
|
bottom: "wc-tooltip--bottom",
|
|
5099
5385
|
left: "wc-tooltip--left",
|
|
5100
5386
|
right: "wc-tooltip--right"
|
|
5101
|
-
},
|
|
5387
|
+
}, xi = [
|
|
5102
5388
|
"top",
|
|
5103
5389
|
"bottom",
|
|
5104
5390
|
"left",
|
|
5105
5391
|
"right"
|
|
5106
5392
|
];
|
|
5107
|
-
function
|
|
5108
|
-
return
|
|
5393
|
+
function Si(e) {
|
|
5394
|
+
return xi.includes(e);
|
|
5109
5395
|
}
|
|
5110
|
-
function
|
|
5111
|
-
return
|
|
5396
|
+
function Ci(e) {
|
|
5397
|
+
return bi[e] || bi.top;
|
|
5112
5398
|
}
|
|
5113
5399
|
//#endregion
|
|
5114
5400
|
//#region src/components/Tooltip/Tooltip.jsx
|
|
5115
|
-
function
|
|
5116
|
-
|
|
5117
|
-
let [i, a] = d(!1), o = s(), c = u(null), l = u(null), f =
|
|
5401
|
+
function wi({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
5402
|
+
Si(t) || console.warn(`Invalid tooltip placement: ${t}. Using 'top' as default.`);
|
|
5403
|
+
let [i, a] = d(!1), o = s(), c = u(null), l = u(null), f = Ci(le({
|
|
5118
5404
|
open: i,
|
|
5119
5405
|
anchorRef: c,
|
|
5120
5406
|
floatingRef: l,
|
|
@@ -5133,7 +5419,7 @@ function ai({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
|
5133
5419
|
onMouseLeave: g,
|
|
5134
5420
|
onFocus: h,
|
|
5135
5421
|
onBlur: g,
|
|
5136
|
-
children: [n, i && /* @__PURE__ */ p(
|
|
5422
|
+
children: [n, i && /* @__PURE__ */ p(se, { children: /* @__PURE__ */ p("div", {
|
|
5137
5423
|
ref: l,
|
|
5138
5424
|
id: o,
|
|
5139
5425
|
className: `wc-tooltip ${f}`,
|
|
@@ -5144,7 +5430,7 @@ function ai({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
|
5144
5430
|
}
|
|
5145
5431
|
//#endregion
|
|
5146
5432
|
//#region src/components/Typography/utils.js
|
|
5147
|
-
var
|
|
5433
|
+
var Ti = {
|
|
5148
5434
|
h1: "h1",
|
|
5149
5435
|
h2: "h2",
|
|
5150
5436
|
h3: "h3",
|
|
@@ -5158,7 +5444,7 @@ var oi = {
|
|
|
5158
5444
|
caption: "span",
|
|
5159
5445
|
overline: "span",
|
|
5160
5446
|
button: "span"
|
|
5161
|
-
},
|
|
5447
|
+
}, Ei = {
|
|
5162
5448
|
h1: "wc-typography--h1",
|
|
5163
5449
|
h2: "wc-typography--h2",
|
|
5164
5450
|
h3: "wc-typography--h3",
|
|
@@ -5172,7 +5458,7 @@ var oi = {
|
|
|
5172
5458
|
caption: "wc-typography--caption",
|
|
5173
5459
|
overline: "wc-typography--overline",
|
|
5174
5460
|
button: "wc-typography--button"
|
|
5175
|
-
},
|
|
5461
|
+
}, Di = {
|
|
5176
5462
|
inherit: "wc-typography--color-inherit",
|
|
5177
5463
|
primary: "wc-typography--color-primary",
|
|
5178
5464
|
secondary: "wc-typography--color-secondary",
|
|
@@ -5182,12 +5468,12 @@ var oi = {
|
|
|
5182
5468
|
textPrimary: "wc-typography--color-text-primary",
|
|
5183
5469
|
textSecondary: "wc-typography--color-text-secondary",
|
|
5184
5470
|
textDisabled: "wc-typography--color-text-disabled"
|
|
5185
|
-
},
|
|
5471
|
+
}, Oi = {
|
|
5186
5472
|
left: "wc-typography--align-left",
|
|
5187
5473
|
center: "wc-typography--align-center",
|
|
5188
5474
|
right: "wc-typography--align-right",
|
|
5189
5475
|
justify: "wc-typography--align-justify"
|
|
5190
|
-
},
|
|
5476
|
+
}, ki = {
|
|
5191
5477
|
h1: "1.2",
|
|
5192
5478
|
h2: "1.2",
|
|
5193
5479
|
h3: "1.3",
|
|
@@ -5202,15 +5488,15 @@ var oi = {
|
|
|
5202
5488
|
overline: "1.4",
|
|
5203
5489
|
button: "1.4"
|
|
5204
5490
|
};
|
|
5205
|
-
function
|
|
5206
|
-
return t ||
|
|
5491
|
+
function Ai(e, t) {
|
|
5492
|
+
return t || Ti[e] || "p";
|
|
5207
5493
|
}
|
|
5208
|
-
function
|
|
5494
|
+
function ji(e, t, n, r, i, a = "") {
|
|
5209
5495
|
return [
|
|
5210
5496
|
"wc-typography",
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
n === "inherit" ? null :
|
|
5497
|
+
Ei[e],
|
|
5498
|
+
Di[t],
|
|
5499
|
+
n === "inherit" ? null : Oi[n],
|
|
5214
5500
|
r ? "wc-typography--gutter-bottom" : null,
|
|
5215
5501
|
i ? "wc-typography--no-wrap" : null,
|
|
5216
5502
|
a
|
|
@@ -5218,19 +5504,19 @@ function fi(e, t, n, r, i, a = "") {
|
|
|
5218
5504
|
}
|
|
5219
5505
|
//#endregion
|
|
5220
5506
|
//#region src/components/Typography/Typography.jsx
|
|
5221
|
-
var
|
|
5222
|
-
className:
|
|
5507
|
+
var Mi = ({ 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), {
|
|
5508
|
+
className: ji(e, n, r, i, a, s),
|
|
5223
5509
|
style: {
|
|
5224
|
-
lineHeight:
|
|
5510
|
+
lineHeight: ki[e],
|
|
5225
5511
|
...c
|
|
5226
5512
|
},
|
|
5227
5513
|
...l,
|
|
5228
5514
|
children: o
|
|
5229
5515
|
});
|
|
5230
|
-
|
|
5516
|
+
Mi.displayName = "Typography";
|
|
5231
5517
|
//#endregion
|
|
5232
5518
|
//#region src/components/TypingText/utils.js
|
|
5233
|
-
var
|
|
5519
|
+
var Ni = class {
|
|
5234
5520
|
constructor(e, t = {}) {
|
|
5235
5521
|
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 || (() => {});
|
|
5236
5522
|
}
|
|
@@ -5251,9 +5537,9 @@ var mi = class {
|
|
|
5251
5537
|
updateText(e) {
|
|
5252
5538
|
this.text = e, this.reset(), this.start();
|
|
5253
5539
|
}
|
|
5254
|
-
},
|
|
5540
|
+
}, Pi = ({ 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 }) => {
|
|
5255
5541
|
let [f, h] = d(""), g = u(null);
|
|
5256
|
-
return o(() => (g.current = new
|
|
5542
|
+
return o(() => (g.current = new Ni(e, {
|
|
5257
5543
|
speed: t,
|
|
5258
5544
|
pause: n,
|
|
5259
5545
|
loop: r,
|
|
@@ -5277,11 +5563,11 @@ var mi = class {
|
|
|
5277
5563
|
}), a && /* @__PURE__ */ p("span", { className: "typing-cursor" })]
|
|
5278
5564
|
});
|
|
5279
5565
|
};
|
|
5280
|
-
|
|
5566
|
+
Pi.displayName = "TypingText";
|
|
5281
5567
|
//#endregion
|
|
5282
5568
|
//#region src/components/Input/VerificationCodeInput.jsx
|
|
5283
|
-
var
|
|
5284
|
-
let { messages: c } =
|
|
5569
|
+
var Fi = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus: i = !1, className: a = "", ...s }) => {
|
|
5570
|
+
let { messages: c } = J(), l = u([]);
|
|
5285
5571
|
o(() => {
|
|
5286
5572
|
typeof t == "string" && t.split("").forEach((e, t) => {
|
|
5287
5573
|
l.current[t] && (l.current[t].value = e);
|
|
@@ -5328,23 +5614,61 @@ var gi = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus:
|
|
|
5328
5614
|
}, t))
|
|
5329
5615
|
});
|
|
5330
5616
|
};
|
|
5331
|
-
|
|
5617
|
+
Fi.displayName = "VerificationCodeInput";
|
|
5332
5618
|
//#endregion
|
|
5333
5619
|
//#region src/components/VideoPlayer/utils.js
|
|
5334
|
-
function
|
|
5620
|
+
function Ii(e) {
|
|
5335
5621
|
return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
5336
5622
|
}
|
|
5337
|
-
function
|
|
5623
|
+
function Li(e, t) {
|
|
5338
5624
|
let n = e.currentTarget.getBoundingClientRect();
|
|
5339
5625
|
return (e.clientX - n.left) / n.width * t;
|
|
5340
5626
|
}
|
|
5341
|
-
function
|
|
5627
|
+
function Ri(e) {
|
|
5342
5628
|
e && (document.fullscreenElement ? document.exitFullscreen?.() : e.requestFullscreen?.());
|
|
5343
5629
|
}
|
|
5344
5630
|
//#endregion
|
|
5345
5631
|
//#region src/components/VideoPlayer/VideoPlayer.jsx
|
|
5346
|
-
var
|
|
5347
|
-
|
|
5632
|
+
var zi = () => /* @__PURE__ */ p("svg", {
|
|
5633
|
+
className: "video-icon",
|
|
5634
|
+
viewBox: "0 0 24 24",
|
|
5635
|
+
"aria-hidden": "true",
|
|
5636
|
+
children: /* @__PURE__ */ p("path", { d: "M8 5.5v13l10-6.5-10-6.5Z" })
|
|
5637
|
+
}), Bi = () => /* @__PURE__ */ m("svg", {
|
|
5638
|
+
className: "video-icon",
|
|
5639
|
+
viewBox: "0 0 24 24",
|
|
5640
|
+
"aria-hidden": "true",
|
|
5641
|
+
children: [/* @__PURE__ */ p("path", { d: "M8 6v12" }), /* @__PURE__ */ p("path", { d: "M16 6v12" })]
|
|
5642
|
+
}), Vi = () => /* @__PURE__ */ m("svg", {
|
|
5643
|
+
className: "video-icon",
|
|
5644
|
+
viewBox: "0 0 24 24",
|
|
5645
|
+
"aria-hidden": "true",
|
|
5646
|
+
children: [
|
|
5647
|
+
/* @__PURE__ */ p("path", { d: "M4 10v4h4l5 4V6L8 10H4Z" }),
|
|
5648
|
+
/* @__PURE__ */ p("path", { d: "M16 9.5a4 4 0 0 1 0 5" }),
|
|
5649
|
+
/* @__PURE__ */ p("path", { d: "M18.5 7a7.5 7.5 0 0 1 0 10" })
|
|
5650
|
+
]
|
|
5651
|
+
}), Hi = () => /* @__PURE__ */ m("svg", {
|
|
5652
|
+
className: "video-icon",
|
|
5653
|
+
viewBox: "0 0 24 24",
|
|
5654
|
+
"aria-hidden": "true",
|
|
5655
|
+
children: [
|
|
5656
|
+
/* @__PURE__ */ p("path", { d: "M4 10v4h4l5 4V6L8 10H4Z" }),
|
|
5657
|
+
/* @__PURE__ */ p("path", { d: "m17 10 4 4" }),
|
|
5658
|
+
/* @__PURE__ */ p("path", { d: "m21 10-4 4" })
|
|
5659
|
+
]
|
|
5660
|
+
}), Ui = () => /* @__PURE__ */ m("svg", {
|
|
5661
|
+
className: "video-icon",
|
|
5662
|
+
viewBox: "0 0 24 24",
|
|
5663
|
+
"aria-hidden": "true",
|
|
5664
|
+
children: [
|
|
5665
|
+
/* @__PURE__ */ p("path", { d: "M8 4H4v4" }),
|
|
5666
|
+
/* @__PURE__ */ p("path", { d: "M16 4h4v4" }),
|
|
5667
|
+
/* @__PURE__ */ p("path", { d: "M20 16v4h-4" }),
|
|
5668
|
+
/* @__PURE__ */ p("path", { d: "M4 16v4h4" })
|
|
5669
|
+
]
|
|
5670
|
+
}), Wi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i = {}, ...a }) => {
|
|
5671
|
+
let { messages: s } = J(), c = u(null), [l, f] = d(!1), [h, g] = d(0), [_, v] = d(.7), [y, b] = d(!1), [x, S] = d(0), [C, w] = d(0), T = Ii(C), E = Ii(x), D = () => {
|
|
5348
5672
|
let e = c.current;
|
|
5349
5673
|
e && (e.paused ? e.play() : e.pause());
|
|
5350
5674
|
}, O = () => {
|
|
@@ -5352,14 +5676,14 @@ var bi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5352
5676
|
e && (S(e.duration || 0), w(e.currentTime), g(e.duration ? e.currentTime / e.duration * 100 : 0), f(!e.paused));
|
|
5353
5677
|
}, k = (e) => {
|
|
5354
5678
|
let t = c.current;
|
|
5355
|
-
t && (t.currentTime =
|
|
5679
|
+
t && (t.currentTime = Li(e, x));
|
|
5356
5680
|
}, A = () => {
|
|
5357
5681
|
b((e) => {
|
|
5358
5682
|
let t = !e;
|
|
5359
5683
|
return c.current && (c.current.muted = t), t;
|
|
5360
5684
|
});
|
|
5361
5685
|
}, j = () => {
|
|
5362
|
-
|
|
5686
|
+
Ri(c.current?.parentElement);
|
|
5363
5687
|
};
|
|
5364
5688
|
return o(() => {
|
|
5365
5689
|
c.current && (c.current.volume = _);
|
|
@@ -5387,7 +5711,7 @@ var bi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5387
5711
|
className: "ctrl-btn",
|
|
5388
5712
|
"aria-label": l ? s.pauseVideo : s.playVideo,
|
|
5389
5713
|
onClick: D,
|
|
5390
|
-
children: l ?
|
|
5714
|
+
children: p(l ? Bi : zi, {})
|
|
5391
5715
|
}),
|
|
5392
5716
|
/* @__PURE__ */ p("div", {
|
|
5393
5717
|
className: "progress",
|
|
@@ -5415,7 +5739,7 @@ var bi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5415
5739
|
className: "ctrl-btn",
|
|
5416
5740
|
"aria-label": y ? s.unmuteVideo : s.muteVideo,
|
|
5417
5741
|
onClick: A,
|
|
5418
|
-
children: y ?
|
|
5742
|
+
children: p(y ? Hi : Vi, {})
|
|
5419
5743
|
}),
|
|
5420
5744
|
/* @__PURE__ */ p("input", {
|
|
5421
5745
|
className: "volume",
|
|
@@ -5431,16 +5755,16 @@ var bi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5431
5755
|
className: "ctrl-btn",
|
|
5432
5756
|
"aria-label": s.enterFullscreen,
|
|
5433
5757
|
onClick: j,
|
|
5434
|
-
children:
|
|
5758
|
+
children: /* @__PURE__ */ p(Ui, {})
|
|
5435
5759
|
})
|
|
5436
5760
|
]
|
|
5437
5761
|
})]
|
|
5438
5762
|
});
|
|
5439
5763
|
};
|
|
5440
|
-
|
|
5764
|
+
Wi.displayName = "VideoPlayer";
|
|
5441
5765
|
//#endregion
|
|
5442
5766
|
//#region src/components/Watermark/utils.js
|
|
5443
|
-
var
|
|
5767
|
+
var Gi = {
|
|
5444
5768
|
content: "",
|
|
5445
5769
|
cross: !1,
|
|
5446
5770
|
debug: !1,
|
|
@@ -5468,14 +5792,14 @@ var xi = {
|
|
|
5468
5792
|
yOffset: 0,
|
|
5469
5793
|
zIndex: 10
|
|
5470
5794
|
};
|
|
5471
|
-
function
|
|
5795
|
+
function Ki(e) {
|
|
5472
5796
|
if (typeof e == "string" && e.startsWith("var(")) {
|
|
5473
5797
|
let t = e.match(/--[^, )]+/);
|
|
5474
5798
|
if (t) return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim() || e;
|
|
5475
5799
|
}
|
|
5476
5800
|
return e;
|
|
5477
5801
|
}
|
|
5478
|
-
function
|
|
5802
|
+
function qi(e) {
|
|
5479
5803
|
let t = document.createElement("canvas"), n = t.getContext("2d"), r = e.width, i = e.height;
|
|
5480
5804
|
if (!e.image && e.content) {
|
|
5481
5805
|
n.font = `${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;
|
|
@@ -5491,14 +5815,14 @@ function Ci(e) {
|
|
|
5491
5815
|
}, i.src = e.image;
|
|
5492
5816
|
});
|
|
5493
5817
|
let a = (e.content || "").split(/\n/);
|
|
5494
|
-
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ?
|
|
5818
|
+
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ? Ki(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);
|
|
5495
5819
|
let o = -(a.length - 1) * e.lineHeight / 2;
|
|
5496
5820
|
return a.forEach((t, r) => {
|
|
5497
5821
|
let i = o + r * e.lineHeight;
|
|
5498
5822
|
n.fillText(t, 0, i);
|
|
5499
5823
|
}), Promise.resolve(t.toDataURL());
|
|
5500
5824
|
}
|
|
5501
|
-
function
|
|
5825
|
+
function Ji(e, t) {
|
|
5502
5826
|
let n = {
|
|
5503
5827
|
position: e.fullscreen ? "fixed" : "absolute",
|
|
5504
5828
|
top: 0,
|
|
@@ -5517,15 +5841,15 @@ function wi(e, t) {
|
|
|
5517
5841
|
}
|
|
5518
5842
|
//#endregion
|
|
5519
5843
|
//#region src/components/Watermark/Watermark.jsx
|
|
5520
|
-
var
|
|
5844
|
+
var Yi = (e) => {
|
|
5521
5845
|
let t = {
|
|
5522
|
-
...
|
|
5846
|
+
...Gi,
|
|
5523
5847
|
...e
|
|
5524
5848
|
}, [n, r] = d(""), i = !!t.content || !!t.image;
|
|
5525
5849
|
o(() => {
|
|
5526
5850
|
if (!i) return;
|
|
5527
5851
|
let e = !0;
|
|
5528
|
-
return
|
|
5852
|
+
return qi(t).then((t) => {
|
|
5529
5853
|
e && r(t);
|
|
5530
5854
|
}), () => {
|
|
5531
5855
|
e = !1;
|
|
@@ -5534,7 +5858,7 @@ var Ti = (e) => {
|
|
|
5534
5858
|
let { children: e, ...n } = t;
|
|
5535
5859
|
return JSON.stringify(n);
|
|
5536
5860
|
}, [t]), i]);
|
|
5537
|
-
let a = l(() => i ?
|
|
5861
|
+
let a = l(() => i ? Ji(t, n) : {}, [
|
|
5538
5862
|
n,
|
|
5539
5863
|
i,
|
|
5540
5864
|
t
|
|
@@ -5544,53 +5868,10 @@ var Ti = (e) => {
|
|
|
5544
5868
|
style: a
|
|
5545
5869
|
}), t.children] }) : t.children || null;
|
|
5546
5870
|
};
|
|
5547
|
-
|
|
5871
|
+
Yi.displayName = "Watermark";
|
|
5548
5872
|
//#endregion
|
|
5549
5873
|
//#region src/ThemeReact.tsx
|
|
5550
|
-
var
|
|
5551
|
-
async function Oi(e, t, n, r) {
|
|
5552
|
-
if (typeof fetch > "u") return {
|
|
5553
|
-
ok: !1,
|
|
5554
|
-
url: e,
|
|
5555
|
-
errors: [{
|
|
5556
|
-
path: "$",
|
|
5557
|
-
message: "Theme config URL or fetch is unavailable."
|
|
5558
|
-
}],
|
|
5559
|
-
warnings: []
|
|
5560
|
-
};
|
|
5561
|
-
try {
|
|
5562
|
-
let i = await fetch(e, {
|
|
5563
|
-
cache: "no-store",
|
|
5564
|
-
signal: r
|
|
5565
|
-
});
|
|
5566
|
-
if (!n()) return null;
|
|
5567
|
-
if (!i.ok) return {
|
|
5568
|
-
ok: !1,
|
|
5569
|
-
url: e,
|
|
5570
|
-
errors: [{
|
|
5571
|
-
path: "$",
|
|
5572
|
-
message: `Theme request failed with ${i.status}.`
|
|
5573
|
-
}],
|
|
5574
|
-
warnings: []
|
|
5575
|
-
};
|
|
5576
|
-
let a = await i.json();
|
|
5577
|
-
return n() ? {
|
|
5578
|
-
...x(a, { target: t }),
|
|
5579
|
-
url: e
|
|
5580
|
-
} : null;
|
|
5581
|
-
} catch (t) {
|
|
5582
|
-
return n() ? {
|
|
5583
|
-
ok: !1,
|
|
5584
|
-
url: e,
|
|
5585
|
-
errors: [{
|
|
5586
|
-
path: "$",
|
|
5587
|
-
message: t instanceof Error ? t.message : "Theme request failed."
|
|
5588
|
-
}],
|
|
5589
|
-
warnings: []
|
|
5590
|
-
} : null;
|
|
5591
|
-
}
|
|
5592
|
-
}
|
|
5593
|
-
var ki = ({ 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 }) => {
|
|
5874
|
+
var Xi = n(void 0), Zi = typeof window > "u" ? o : c, Qi = ({ 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 }) => {
|
|
5594
5875
|
let y = u(null);
|
|
5595
5876
|
y.current ||= w({
|
|
5596
5877
|
target: a,
|
|
@@ -5604,62 +5885,66 @@ var ki = ({ children: e, config: t, defaultMode: n = "system", themeUrl: r, targ
|
|
|
5604
5885
|
mode: b.mode,
|
|
5605
5886
|
resolvedMode: b.resolvedMode,
|
|
5606
5887
|
dark: b.dark
|
|
5607
|
-
}), T = u(S.resolvedMode),
|
|
5608
|
-
|
|
5888
|
+
}), T = u(S.resolvedMode), D = u(a), O = u(0), A = u(g), j = u(_), M = u(v);
|
|
5889
|
+
A.current = g, j.current = _, M.current = v, Zi(() => {
|
|
5609
5890
|
let e = b.subscribe((e) => {
|
|
5610
|
-
C(e), T.current !== e.resolvedMode && (T.current = e.resolvedMode,
|
|
5891
|
+
C(e), T.current !== e.resolvedMode && (T.current = e.resolvedMode, A.current?.(e.resolvedMode));
|
|
5611
5892
|
});
|
|
5612
5893
|
return b.start(), () => {
|
|
5613
5894
|
e(), b.destroy();
|
|
5614
5895
|
};
|
|
5615
|
-
}, [b]),
|
|
5896
|
+
}, [b]), Zi(() => {
|
|
5616
5897
|
s !== void 0 && b.setMode(s);
|
|
5617
5898
|
}, [b, s]), o(() => {
|
|
5618
|
-
let e = ++
|
|
5899
|
+
let e = ++O.current, n = D.current, i = typeof AbortController > "u" ? null : new AbortController();
|
|
5619
5900
|
if (t !== void 0) {
|
|
5620
5901
|
let e = x(t, { target: n });
|
|
5621
|
-
e.ok ?
|
|
5622
|
-
} else r ||
|
|
5623
|
-
return r &&
|
|
5624
|
-
|
|
5902
|
+
e.ok ? j.current?.(e) : M.current?.(e);
|
|
5903
|
+
} else r || k(n);
|
|
5904
|
+
return r && E(r, {
|
|
5905
|
+
target: n,
|
|
5906
|
+
isCurrent: () => e === O.current,
|
|
5907
|
+
signal: i?.signal
|
|
5908
|
+
}).then((e) => {
|
|
5909
|
+
e && (e.ok ? j.current?.(e) : i?.signal.aborted || M.current?.(e));
|
|
5625
5910
|
}), () => {
|
|
5626
5911
|
i?.abort();
|
|
5627
5912
|
};
|
|
5628
5913
|
}, [t, r]), o(() => {
|
|
5629
|
-
let e =
|
|
5630
|
-
return () =>
|
|
5914
|
+
let e = D.current;
|
|
5915
|
+
return () => k(e);
|
|
5631
5916
|
}, []);
|
|
5632
|
-
let
|
|
5917
|
+
let N = i((e) => {
|
|
5633
5918
|
s === void 0 && b.setMode(e), h?.(e);
|
|
5634
5919
|
}, [
|
|
5635
5920
|
b,
|
|
5636
5921
|
s,
|
|
5637
5922
|
h
|
|
5638
|
-
]),
|
|
5923
|
+
]), P = i(() => {
|
|
5639
5924
|
let e = b.resolvedMode === "dark" ? "light" : "dark";
|
|
5640
5925
|
s === void 0 && b.setMode(e), h?.(e);
|
|
5641
5926
|
}, [
|
|
5642
5927
|
b,
|
|
5643
5928
|
s,
|
|
5644
5929
|
h
|
|
5645
|
-
]),
|
|
5930
|
+
]), F = l(() => ({
|
|
5646
5931
|
...S,
|
|
5647
|
-
setMode:
|
|
5648
|
-
toggleMode:
|
|
5932
|
+
setMode: N,
|
|
5933
|
+
toggleMode: P
|
|
5649
5934
|
}), [
|
|
5650
5935
|
S,
|
|
5651
|
-
|
|
5652
|
-
|
|
5936
|
+
N,
|
|
5937
|
+
P
|
|
5653
5938
|
]);
|
|
5654
|
-
return /* @__PURE__ */ p(
|
|
5655
|
-
value:
|
|
5939
|
+
return /* @__PURE__ */ p(Xi.Provider, {
|
|
5940
|
+
value: F,
|
|
5656
5941
|
children: e
|
|
5657
5942
|
});
|
|
5658
5943
|
};
|
|
5659
|
-
function
|
|
5660
|
-
let e = a(
|
|
5944
|
+
function $i() {
|
|
5945
|
+
let e = a(Xi);
|
|
5661
5946
|
if (!e) throw Error("useTheme must be used within ThemeProvider");
|
|
5662
5947
|
return e;
|
|
5663
5948
|
}
|
|
5664
5949
|
//#endregion
|
|
5665
|
-
export {
|
|
5950
|
+
export { ne as Accordion, Y as Alert, ae as AppBar, ue as Autocomplete, X as Avatar, be as Badge, Ee as Banner, Ae as Blockquote, Re as Box, Ge as Breadcrumb, Ze as Button, ke as Card, Qe as CardActions, $e as CardContent, nt as Checkbox, st as Chip, mt as CircularProgress, jt as CodeBlock, bt as ColorPicker, Pt as Container, Ht as Copy, Yt as DatePicker, Xt as Fab, cn as Feature, Qt as Feed, un as FileInput, fn as FormControl, pn as FormControlLabel, mn as FormGroup, hn as FormHelperText, En as Grid, Dn as HoverCard, Un as Icon, Wn as IconButton, Xn as ImageGallery, ir as Inline, ar as Input, dr as List, fr as ListItem, pr as ListItemIcon, mr as ListItemText, q as LocaleProvider, Cr as Menu, Dr as Modal, Or as NumberAnimation, Ar as Page, kr as Pagination, Ir as Paper, Lr as Popover, Rr as PricingTable, zr as Progress, Hr as Radio, Vr as RadioGroup, Ur as Rating, Wr as Select, Kr as Skeleton, Jr as SlideOver, qr as Slider, Qr as Snackbar, Yr as Split, Xr as Stack, si as Status, ci as Switch, g as THEME_CONFIG_VERSION, _ as THEME_MODES, v as THEME_STORAGE_KEY, hi as Table, fi as TableBody, mi as TableCell, di as TableHead, pi as TableRow, gi as Tabs, _i as TextField, Qi as ThemeProvider, yi as Toolbar, wi as Tooltip, Pi as TypingText, Mi as Typography, Fi as VerificationCodeInput, Wi as VideoPlayer, Yi as Watermark, b as applyThemeConfig, C as createThemeController, T as createThemeInitScript, G as defaultLocaleMessages, D as loadThemeConfig, O as resetThemeConfig, A as resolveThemeMode, j as serializeThemeConfig, J as useLocale, $i as useTheme, M as validateThemeConfig };
|