@zeturn/watercolor-react 1.2.3 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LocaleReact.d.ts +52 -0
- package/dist/LocaleReact.d.ts.map +1 -0
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Banner/Banner.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Chip/Chip.d.ts.map +1 -1
- package/dist/components/CircularProgress/CircularProgress.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/Feed/Feed.d.ts.map +1 -1
- package/dist/components/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/dist/components/Input/VerificationCodeInput.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Progress/Progress.d.ts.map +1 -1
- package/dist/components/Rating/Rating.d.ts +2 -1
- package/dist/components/Rating/Rating.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/SlideOver/SlideOver.d.ts.map +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/dist/components/Status/Status.d.ts.map +1 -1
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/watercolor-react.css +1 -1
- package/dist/watercolor-react.es.js +920 -859
- package/index.d.ts +174 -56
- package/package.json +7 -7
|
@@ -86,7 +86,7 @@ var te = ({ items: e = [], multiple: t = !1, variant: n = "default", onToggle: r
|
|
|
86
86
|
};
|
|
87
87
|
te.displayName = "Accordion";
|
|
88
88
|
//#endregion
|
|
89
|
-
//#region
|
|
89
|
+
//#region src/components/Alert/utils.js
|
|
90
90
|
function ne(e, t) {
|
|
91
91
|
return [
|
|
92
92
|
"wc-alert",
|
|
@@ -95,8 +95,64 @@ function ne(e, t) {
|
|
|
95
95
|
];
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
|
+
//#region src/LocaleReact.tsx
|
|
99
|
+
var re = {
|
|
100
|
+
breadcrumb: "Breadcrumb",
|
|
101
|
+
close: "Close",
|
|
102
|
+
closeDialog: "Close dialog",
|
|
103
|
+
closeLightbox: "Close lightbox",
|
|
104
|
+
closePopover: "Popover content",
|
|
105
|
+
colorPicker: "Choose color",
|
|
106
|
+
circularProgress: "Loading progress",
|
|
107
|
+
downloadImage: (e) => `Download image ${e}`,
|
|
108
|
+
enterFullscreen: "Enter fullscreen",
|
|
109
|
+
loading: "Loading",
|
|
110
|
+
muteVideo: "Mute video",
|
|
111
|
+
nextImage: "Next image",
|
|
112
|
+
nextMonth: "Next month",
|
|
113
|
+
nextPage: "Next page",
|
|
114
|
+
openCalendar: "Choose date",
|
|
115
|
+
openImageInLightbox: (e) => `Open image ${e} in lightbox`,
|
|
116
|
+
page: (e) => `Page ${e}`,
|
|
117
|
+
pagination: "Pagination",
|
|
118
|
+
pauseVideo: "Pause video",
|
|
119
|
+
playVideo: "Play video",
|
|
120
|
+
previousImage: "Previous image",
|
|
121
|
+
previousMonth: "Previous month",
|
|
122
|
+
previousPage: "Previous page",
|
|
123
|
+
progress: "Progress",
|
|
124
|
+
rating: "Rating",
|
|
125
|
+
ratingValue: (e, t) => `${e} of ${t}`,
|
|
126
|
+
remove: "Remove",
|
|
127
|
+
removeItem: (e) => `Remove${e ? ` ${e}` : ""}`,
|
|
128
|
+
rowsPerPage: "Rows per page",
|
|
129
|
+
switchControl: "Switch",
|
|
130
|
+
tabList: "Content sections",
|
|
131
|
+
unmuteVideo: "Unmute video",
|
|
132
|
+
jumpToPage: "Jump to page",
|
|
133
|
+
verificationCodeDigit: (e) => `Verification code digit ${e}`,
|
|
134
|
+
viewImage: (e, t) => `View image ${e}${t ? `: ${t}` : ""}`,
|
|
135
|
+
volume: "Volume",
|
|
136
|
+
videoProgress: "Video progress"
|
|
137
|
+
}, G = n({ messages: re }), K = ({ children: e, locale: t, messages: n }) => {
|
|
138
|
+
let r = l(() => ({
|
|
139
|
+
locale: t,
|
|
140
|
+
messages: {
|
|
141
|
+
...re,
|
|
142
|
+
...n
|
|
143
|
+
}
|
|
144
|
+
}), [t, n]);
|
|
145
|
+
return /* @__PURE__ */ p(G.Provider, {
|
|
146
|
+
value: r,
|
|
147
|
+
children: e
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
function q() {
|
|
151
|
+
return a(G);
|
|
152
|
+
}
|
|
153
|
+
//#endregion
|
|
98
154
|
//#region src/components/Alert/Alert.jsx
|
|
99
|
-
var
|
|
155
|
+
var J = ({ type: e }) => {
|
|
100
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" })] });
|
|
101
157
|
return /* @__PURE__ */ m("svg", {
|
|
102
158
|
viewBox: "0 0 20 20",
|
|
@@ -114,9 +170,9 @@ var re = ({ type: e }) => {
|
|
|
114
170
|
});
|
|
115
171
|
};
|
|
116
172
|
function ie({ type: e = "info", variant: t = "standard", title: n = "", closable: r = !1, showIcon: i = !0, className: a = "", children: o, onClose: s = () => {} }) {
|
|
117
|
-
let [c, l] = d(!0);
|
|
173
|
+
let [c, l] = d(!0), { messages: u } = q();
|
|
118
174
|
if (!c) return null;
|
|
119
|
-
let
|
|
175
|
+
let f = () => {
|
|
120
176
|
l(!1), s();
|
|
121
177
|
};
|
|
122
178
|
return /* @__PURE__ */ m("div", {
|
|
@@ -125,7 +181,7 @@ function ie({ type: e = "info", variant: t = "standard", title: n = "", closable
|
|
|
125
181
|
children: [
|
|
126
182
|
i && /* @__PURE__ */ p("div", {
|
|
127
183
|
className: "wc-alert-icon",
|
|
128
|
-
children: /* @__PURE__ */ p(
|
|
184
|
+
children: /* @__PURE__ */ p(J, { type: e })
|
|
129
185
|
}),
|
|
130
186
|
/* @__PURE__ */ m("div", {
|
|
131
187
|
className: "wc-alert-content",
|
|
@@ -140,8 +196,8 @@ function ie({ type: e = "info", variant: t = "standard", title: n = "", closable
|
|
|
140
196
|
r && /* @__PURE__ */ p("button", {
|
|
141
197
|
type: "button",
|
|
142
198
|
className: "wc-alert-close",
|
|
143
|
-
"aria-label":
|
|
144
|
-
onClick:
|
|
199
|
+
"aria-label": u.close,
|
|
200
|
+
onClick: f,
|
|
145
201
|
children: /* @__PURE__ */ p("svg", {
|
|
146
202
|
viewBox: "0 0 20 20",
|
|
147
203
|
fill: "none",
|
|
@@ -157,16 +213,16 @@ function ie({ type: e = "info", variant: t = "standard", title: n = "", closable
|
|
|
157
213
|
}
|
|
158
214
|
//#endregion
|
|
159
215
|
//#region src/components/AppBar/AppBar.jsx
|
|
160
|
-
var
|
|
216
|
+
var Y = ({ children: e, position: t = "fixed", color: n = "default", elevation: r = 0, variant: i = "elevation", className: a = "", style: o = {}, ...s }) => /* @__PURE__ */ p("div", {
|
|
161
217
|
className: `wc-appbar wc-appbar--${t} wc-appbar--${n} wc-appbar--elevation-${r} wc-appbar--${i} ${a}`,
|
|
162
218
|
style: o,
|
|
163
219
|
...s,
|
|
164
220
|
children: e
|
|
165
|
-
}),
|
|
166
|
-
function
|
|
221
|
+
}), ae = typeof document > "u" ? o : c;
|
|
222
|
+
function oe({ children: e, target: t }) {
|
|
167
223
|
return typeof document > "u" ? null : h(e, (typeof t == "string" ? document.querySelector(t) : t) || document.body);
|
|
168
224
|
}
|
|
169
|
-
function
|
|
225
|
+
function se({ open: e, elementRef: t, refs: n = [], modal: r = !1, lockScroll: i = !1, restoreFocus: a = !0, initialFocus: s = !1, closeOnEscape: c = !0, closeOnPointerDownOutside: l = !0, onEscapeKeyDown: d, onPointerDownOutside: f, zIndex: p }) {
|
|
170
226
|
let m = u(null);
|
|
171
227
|
return o(() => {
|
|
172
228
|
if (!(!e || !t.current || typeof document > "u")) return m.current = S({
|
|
@@ -212,9 +268,9 @@ function ae({ open: e, elementRef: t, refs: n = [], modal: r = !1, lockScroll: i
|
|
|
212
268
|
f
|
|
213
269
|
]), m;
|
|
214
270
|
}
|
|
215
|
-
function
|
|
271
|
+
function ce({ open: e, anchorRef: t, floatingRef: n, placement: r = "bottom", offset: i = 8, boundaryPadding: a = 8 }) {
|
|
216
272
|
let [o, s] = d(r);
|
|
217
|
-
return
|
|
273
|
+
return ae(() => {
|
|
218
274
|
if (!e || !t.current || !n.current || typeof window > "u") return;
|
|
219
275
|
let o = () => {
|
|
220
276
|
s(y(t.current, n.current, {
|
|
@@ -237,39 +293,39 @@ function J({ open: e, anchorRef: t, floatingRef: n, placement: r = "bottom", off
|
|
|
237
293
|
}
|
|
238
294
|
//#endregion
|
|
239
295
|
//#region src/components/Autocomplete/Autocomplete.jsx
|
|
240
|
-
var
|
|
241
|
-
let [R, z] = d(!1), [B, V] = d(""), [H, U] = d(-1), W = u(null), ee = u(null), te = u(null), ne = (e) => e ? typeof e == "object" ? e.label || e.value || "" : String(e) : "", re = (e) => e ? typeof e == "object" ? e.value === void 0 ? e : e.value : e : null,
|
|
296
|
+
var le = ({ 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
|
+
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;
|
|
242
298
|
o(() => {
|
|
243
|
-
!_ && e ? V(
|
|
299
|
+
!_ && e ? V(G(e)) : e || V("");
|
|
244
300
|
}, [e, _]);
|
|
245
|
-
let
|
|
301
|
+
let q = () => {
|
|
246
302
|
z(!1), U(-1);
|
|
247
303
|
};
|
|
248
|
-
|
|
304
|
+
se({
|
|
249
305
|
open: R,
|
|
250
306
|
elementRef: te,
|
|
251
307
|
refs: [W],
|
|
252
308
|
closeOnEscape: !0,
|
|
253
309
|
closeOnPointerDownOutside: !0,
|
|
254
|
-
onEscapeKeyDown:
|
|
255
|
-
onPointerDownOutside:
|
|
310
|
+
onEscapeKeyDown: q,
|
|
311
|
+
onPointerDownOutside: q,
|
|
256
312
|
zIndex: 1e3
|
|
257
313
|
});
|
|
258
|
-
let
|
|
259
|
-
let n =
|
|
260
|
-
return _ && Array.isArray(e) ? e.some((e) =>
|
|
314
|
+
let J = M ? M(n, B) : ((e, t) => !t || t.length < C ? e : e.filter((e) => G(e).toLowerCase().includes(t.toLowerCase())))(n, B), ie = (t) => {
|
|
315
|
+
let n = K(t);
|
|
316
|
+
return _ && Array.isArray(e) ? e.some((e) => K(e) === n) : K(e) === n;
|
|
261
317
|
}, Y = () => {
|
|
262
318
|
let e = ["wc-autocomplete"];
|
|
263
319
|
return b && e.push("wc-autocomplete--full-width"), e.concat(D).filter(Boolean).join(" ");
|
|
264
|
-
},
|
|
320
|
+
}, ae = () => {
|
|
265
321
|
let e = ["wc-autocomplete__label"];
|
|
266
322
|
return e.push(`wc-autocomplete__label--${x}`), c && e.push("wc-autocomplete__label--error"), e.join(" ");
|
|
267
|
-
},
|
|
323
|
+
}, oe = () => {
|
|
268
324
|
let e = ["wc-autocomplete__container"];
|
|
269
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(" ");
|
|
270
326
|
}, ce = (e, t) => {
|
|
271
327
|
let n = ["wc-autocomplete__option"];
|
|
272
|
-
return
|
|
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(" ");
|
|
273
329
|
}, le = (e) => {
|
|
274
330
|
z(!0), k?.(e);
|
|
275
331
|
}, ue = (e) => {
|
|
@@ -283,17 +339,17 @@ var Y = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Type
|
|
|
283
339
|
value: n
|
|
284
340
|
} });
|
|
285
341
|
}, fe = (e) => {
|
|
286
|
-
e.stopPropagation(), V(""),
|
|
342
|
+
e.stopPropagation(), V(""), q(), t?.({ target: {
|
|
287
343
|
name: T,
|
|
288
344
|
value: _ ? [] : null
|
|
289
345
|
} });
|
|
290
346
|
}, pe = (n) => {
|
|
291
347
|
if (n.disabled) return;
|
|
292
|
-
let r =
|
|
348
|
+
let r = K(n), i;
|
|
293
349
|
if (_) {
|
|
294
|
-
let t = Array.isArray(e) ? [...e] : [], a = t.findIndex((e) =>
|
|
350
|
+
let t = Array.isArray(e) ? [...e] : [], a = t.findIndex((e) => K(e) === r);
|
|
295
351
|
a > -1 ? t.splice(a, 1) : t.push(n), i = t, V("");
|
|
296
|
-
} else i = n, V(
|
|
352
|
+
} else i = n, V(G(n)), q();
|
|
297
353
|
U(-1), t?.({ target: {
|
|
298
354
|
name: T,
|
|
299
355
|
value: i
|
|
@@ -303,18 +359,18 @@ var Y = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Type
|
|
|
303
359
|
z(!0), e.preventDefault();
|
|
304
360
|
return;
|
|
305
361
|
}
|
|
306
|
-
if (!(!R ||
|
|
362
|
+
if (!(!R || J.length === 0)) switch (e.key) {
|
|
307
363
|
case "ArrowDown":
|
|
308
|
-
e.preventDefault(), U((e) => Math.min(e + 1,
|
|
364
|
+
e.preventDefault(), U((e) => Math.min(e + 1, J.length - 1));
|
|
309
365
|
break;
|
|
310
366
|
case "ArrowUp":
|
|
311
367
|
e.preventDefault(), U((e) => Math.max(e - 1, 0));
|
|
312
368
|
break;
|
|
313
369
|
case "Enter":
|
|
314
|
-
e.preventDefault(), H >= 0 && H <
|
|
370
|
+
e.preventDefault(), H >= 0 && H < J.length && pe(J[H]);
|
|
315
371
|
break;
|
|
316
372
|
case "Escape":
|
|
317
|
-
|
|
373
|
+
q(), ee.current?.blur();
|
|
318
374
|
break;
|
|
319
375
|
default: break;
|
|
320
376
|
}
|
|
@@ -326,14 +382,14 @@ var Y = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Type
|
|
|
326
382
|
children: [
|
|
327
383
|
i && /* @__PURE__ */ m("label", {
|
|
328
384
|
htmlFor: X,
|
|
329
|
-
className:
|
|
385
|
+
className: ae(),
|
|
330
386
|
children: [i, f && /* @__PURE__ */ p("span", {
|
|
331
387
|
className: "wc-autocomplete__required",
|
|
332
388
|
children: "*"
|
|
333
389
|
})]
|
|
334
390
|
}),
|
|
335
391
|
/* @__PURE__ */ m("div", {
|
|
336
|
-
className:
|
|
392
|
+
className: oe(),
|
|
337
393
|
children: [P ? P({
|
|
338
394
|
id: X,
|
|
339
395
|
value: B,
|
|
@@ -402,7 +458,7 @@ var Y = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Type
|
|
|
402
458
|
]
|
|
403
459
|
})
|
|
404
460
|
}), /* @__PURE__ */ p("div", {
|
|
405
|
-
className: `wc-autocomplete__arrow${R &&
|
|
461
|
+
className: `wc-autocomplete__arrow${R && J.length > 0 ? " wc-autocomplete__arrow--open" : ""}`,
|
|
406
462
|
children: /* @__PURE__ */ p("svg", {
|
|
407
463
|
viewBox: "0 0 24 24",
|
|
408
464
|
fill: "none",
|
|
@@ -418,22 +474,22 @@ var Y = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Type
|
|
|
418
474
|
className: "wc-autocomplete__dropdown",
|
|
419
475
|
id: `${X}-options`,
|
|
420
476
|
role: "listbox",
|
|
421
|
-
children:
|
|
477
|
+
children: J.length === 0 ? /* @__PURE__ */ p("div", {
|
|
422
478
|
className: "wc-autocomplete__no-options",
|
|
423
479
|
children: w
|
|
424
480
|
}) : /* @__PURE__ */ p("div", {
|
|
425
481
|
className: "wc-autocomplete__options",
|
|
426
|
-
children:
|
|
482
|
+
children: J.map((e, t) => /* @__PURE__ */ m("div", {
|
|
427
483
|
id: `${X}-option-${t}`,
|
|
428
484
|
className: ce(e, t),
|
|
429
485
|
role: "option",
|
|
430
|
-
"aria-selected":
|
|
486
|
+
"aria-selected": ie(e),
|
|
431
487
|
onClick: () => pe(e),
|
|
432
488
|
onMouseEnter: () => U(t),
|
|
433
|
-
children: [N ? N(e, { selected:
|
|
489
|
+
children: [N ? N(e, { selected: ie(e) }) : /* @__PURE__ */ p("span", {
|
|
434
490
|
className: "wc-autocomplete__option-text",
|
|
435
|
-
children:
|
|
436
|
-
}),
|
|
491
|
+
children: G(e)
|
|
492
|
+
}), ie(e) && /* @__PURE__ */ p("svg", {
|
|
437
493
|
className: "wc-autocomplete__option-check",
|
|
438
494
|
viewBox: "0 0 24 24",
|
|
439
495
|
fill: "none",
|
|
@@ -441,7 +497,7 @@ var Y = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Type
|
|
|
441
497
|
strokeWidth: "2",
|
|
442
498
|
children: /* @__PURE__ */ p("polyline", { points: "20,6 9,17 4,12" })
|
|
443
499
|
})]
|
|
444
|
-
},
|
|
500
|
+
}, K(e) || t))
|
|
445
501
|
})
|
|
446
502
|
}),
|
|
447
503
|
(c || a) && /* @__PURE__ */ p("div", { children: c ? /* @__PURE__ */ p("p", {
|
|
@@ -454,40 +510,40 @@ var Y = ({ value: e = null, onChange: t, options: n = [], placeholder: r = "Type
|
|
|
454
510
|
]
|
|
455
511
|
});
|
|
456
512
|
};
|
|
457
|
-
|
|
513
|
+
le.displayName = "Autocomplete";
|
|
458
514
|
//#endregion
|
|
459
|
-
//#region
|
|
460
|
-
function
|
|
515
|
+
//#region src/components/Avatar/utils.js
|
|
516
|
+
function ue({ size: e, variant: t, color: n, src: r, imgError: i }) {
|
|
461
517
|
let a = ["wc-avatar"];
|
|
462
518
|
return typeof e == "string" && a.push(`wc-avatar--${e}`), a.push(`wc-avatar--${t}`), (!r || i) && a.push(`wc-avatar--${n}`), a;
|
|
463
519
|
}
|
|
464
|
-
function
|
|
520
|
+
function de(e) {
|
|
465
521
|
let t = {};
|
|
466
522
|
return typeof e == "number" && (t.width = `${e}px`, t.height = `${e}px`, t.fontSize = `${e * .4}px`), t;
|
|
467
523
|
}
|
|
468
|
-
function
|
|
524
|
+
function fe(e) {
|
|
469
525
|
if (!e) return "";
|
|
470
526
|
let t = e.trim(), n = t.charAt(0);
|
|
471
527
|
if (/[\u4e00-\u9fa5]/.test(n)) return n;
|
|
472
528
|
let r = t.split(/\s+/).filter(Boolean);
|
|
473
529
|
return r.length === 1 ? r[0].charAt(0).toUpperCase() : (r[0].charAt(0) + r[1].charAt(0)).toUpperCase();
|
|
474
530
|
}
|
|
475
|
-
function
|
|
531
|
+
function pe(e) {
|
|
476
532
|
e(!0);
|
|
477
533
|
}
|
|
478
|
-
function
|
|
534
|
+
function me(e) {
|
|
479
535
|
e(!1);
|
|
480
536
|
}
|
|
481
537
|
//#endregion
|
|
482
538
|
//#region src/components/Avatar/Avatar.jsx
|
|
483
|
-
var
|
|
484
|
-
let [c, l] = d(!1), u =
|
|
539
|
+
var he = ({ 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 = ue({
|
|
485
541
|
size: n,
|
|
486
542
|
variant: r,
|
|
487
543
|
color: i,
|
|
488
544
|
src: e,
|
|
489
545
|
imgError: c
|
|
490
|
-
}).concat(o).filter(Boolean).join(" "), f =
|
|
546
|
+
}).concat(o).filter(Boolean).join(" "), f = de(n), m = fe(a), h = () => pe(l), g = () => me(l);
|
|
491
547
|
return /* @__PURE__ */ p("div", {
|
|
492
548
|
className: u,
|
|
493
549
|
style: f,
|
|
@@ -504,10 +560,10 @@ var de = ({ src: e = "", alt: t = "", size: n = "md", variant: r = "circular", c
|
|
|
504
560
|
}) : null
|
|
505
561
|
});
|
|
506
562
|
};
|
|
507
|
-
|
|
563
|
+
he.displayName = "Avatar";
|
|
508
564
|
//#endregion
|
|
509
|
-
//#region
|
|
510
|
-
var
|
|
565
|
+
//#region src/components/Badge/utils.js
|
|
566
|
+
var X = [
|
|
511
567
|
"primary",
|
|
512
568
|
"secondary",
|
|
513
569
|
"success",
|
|
@@ -518,20 +574,20 @@ var fe = [
|
|
|
518
574
|
"cyan",
|
|
519
575
|
"pink"
|
|
520
576
|
];
|
|
521
|
-
function
|
|
522
|
-
return
|
|
577
|
+
function ge(e) {
|
|
578
|
+
return X.includes(e);
|
|
523
579
|
}
|
|
524
|
-
function
|
|
525
|
-
return
|
|
580
|
+
function _e(e) {
|
|
581
|
+
return ge(e) ? e : "primary";
|
|
526
582
|
}
|
|
527
|
-
function
|
|
528
|
-
let i = ["wc-badge", `wc-badge--${
|
|
583
|
+
function ve({ variant: e, size: t, dot: n, className: r }) {
|
|
584
|
+
let i = ["wc-badge", `wc-badge--${_e(e)}`];
|
|
529
585
|
return n ? i.push(`wc-badge--dot-${t}`) : i.push(`wc-badge--${t}`), r && i.push(r), i.filter(Boolean).join(" ");
|
|
530
586
|
}
|
|
531
587
|
//#endregion
|
|
532
588
|
//#region src/components/Badge/Badge.jsx
|
|
533
|
-
var
|
|
534
|
-
className:
|
|
589
|
+
var ye = ({ children: e, variant: t = "primary", size: n = "md", dot: r = !1, className: i = "", ...a }) => /* @__PURE__ */ p("span", {
|
|
590
|
+
className: ve({
|
|
535
591
|
variant: t,
|
|
536
592
|
size: n,
|
|
537
593
|
dot: r,
|
|
@@ -540,10 +596,10 @@ var X = ({ children: e, variant: t = "primary", size: n = "md", dot: r = !1, cla
|
|
|
540
596
|
...a,
|
|
541
597
|
children: !r && e
|
|
542
598
|
});
|
|
543
|
-
|
|
599
|
+
ye.displayName = "Badge";
|
|
544
600
|
//#endregion
|
|
545
|
-
//#region
|
|
546
|
-
function
|
|
601
|
+
//#region src/components/Banner/utils.js
|
|
602
|
+
function be(e, t, n) {
|
|
547
603
|
let r = [
|
|
548
604
|
"wc-banner",
|
|
549
605
|
`wc-banner--${e}`,
|
|
@@ -551,18 +607,18 @@ function ge(e, t, n) {
|
|
|
551
607
|
];
|
|
552
608
|
return n && r.push("wc-banner--sticky"), r.join(" ");
|
|
553
609
|
}
|
|
554
|
-
function
|
|
610
|
+
function xe(e) {
|
|
555
611
|
return { zIndex: e };
|
|
556
612
|
}
|
|
557
|
-
function
|
|
613
|
+
function Se(e, t) {
|
|
558
614
|
e(!1), t && t();
|
|
559
615
|
}
|
|
560
|
-
function
|
|
616
|
+
function Ce(e) {
|
|
561
617
|
e && e();
|
|
562
618
|
}
|
|
563
619
|
//#endregion
|
|
564
620
|
//#region src/components/Banner/Banner.jsx
|
|
565
|
-
var
|
|
621
|
+
var we = ({ type: e }) => {
|
|
566
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" })] });
|
|
567
623
|
return /* @__PURE__ */ m("svg", {
|
|
568
624
|
viewBox: "0 0 20 20",
|
|
@@ -579,17 +635,17 @@ var be = ({ type: e }) => {
|
|
|
579
635
|
}), t]
|
|
580
636
|
});
|
|
581
637
|
};
|
|
582
|
-
function
|
|
583
|
-
let [_, v] = d(!0);
|
|
638
|
+
function Te({ 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 } = q();
|
|
584
640
|
if (!_) return null;
|
|
585
|
-
let
|
|
586
|
-
|
|
587
|
-
},
|
|
588
|
-
|
|
589
|
-
},
|
|
641
|
+
let b = be(t, n, l), x = xe(u), S = () => {
|
|
642
|
+
Se(v, f);
|
|
643
|
+
}, C = () => {
|
|
644
|
+
Ce(h);
|
|
645
|
+
}, w = g && e.Children.count(g) > 0;
|
|
590
646
|
return /* @__PURE__ */ p("div", {
|
|
591
|
-
className:
|
|
592
|
-
style:
|
|
647
|
+
className: b,
|
|
648
|
+
style: x,
|
|
593
649
|
role: t === "error" ? "alert" : "status",
|
|
594
650
|
"aria-live": t === "error" ? "assertive" : "polite",
|
|
595
651
|
children: /* @__PURE__ */ m("div", {
|
|
@@ -597,7 +653,7 @@ function xe({ type: t = "info", position: n = "top", title: r = "", message: i =
|
|
|
597
653
|
children: [
|
|
598
654
|
o && /* @__PURE__ */ p("div", {
|
|
599
655
|
className: "wc-banner-icon",
|
|
600
|
-
children: /* @__PURE__ */ p(
|
|
656
|
+
children: /* @__PURE__ */ p(we, { type: t })
|
|
601
657
|
}),
|
|
602
658
|
/* @__PURE__ */ m("div", {
|
|
603
659
|
className: "wc-banner-text",
|
|
@@ -609,18 +665,18 @@ function xe({ type: t = "info", position: n = "top", title: r = "", message: i =
|
|
|
609
665
|
children: i
|
|
610
666
|
})]
|
|
611
667
|
}),
|
|
612
|
-
(
|
|
668
|
+
(w || s) && /* @__PURE__ */ p("div", {
|
|
613
669
|
className: "wc-banner-actions",
|
|
614
|
-
children:
|
|
615
|
-
onClick:
|
|
670
|
+
children: w ? g : /* @__PURE__ */ p("button", {
|
|
671
|
+
onClick: C,
|
|
616
672
|
className: "wc-banner-action-btn",
|
|
617
673
|
children: c
|
|
618
674
|
})
|
|
619
675
|
}),
|
|
620
676
|
a && /* @__PURE__ */ p("button", {
|
|
621
|
-
onClick:
|
|
677
|
+
onClick: S,
|
|
622
678
|
className: "wc-banner-close",
|
|
623
|
-
"aria-label":
|
|
679
|
+
"aria-label": y.close,
|
|
624
680
|
children: /* @__PURE__ */ p("svg", {
|
|
625
681
|
viewBox: "0 0 20 20",
|
|
626
682
|
fill: "none",
|
|
@@ -636,23 +692,23 @@ function xe({ type: t = "info", position: n = "top", title: r = "", message: i =
|
|
|
636
692
|
});
|
|
637
693
|
}
|
|
638
694
|
//#endregion
|
|
639
|
-
//#region
|
|
640
|
-
function
|
|
695
|
+
//#region src/components/Blockquote/utils.js
|
|
696
|
+
function Ee(e = "", t = "default", n = !0, r = !0, i = "medium", a = "default") {
|
|
641
697
|
let o = ["wc-blockquote"];
|
|
642
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(" ");
|
|
643
699
|
}
|
|
644
700
|
//#endregion
|
|
645
|
-
//#region
|
|
646
|
-
function
|
|
701
|
+
//#region src/components/Card/utils.js
|
|
702
|
+
function De(e = "", t = "minimal", n = "default", r = "medium", i = !1, a = !0) {
|
|
647
703
|
let o = ["wc-card"];
|
|
648
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(" ");
|
|
649
705
|
}
|
|
650
706
|
//#endregion
|
|
651
707
|
//#region src/components/Card/Card.jsx
|
|
652
|
-
var
|
|
708
|
+
var Oe = ({ 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, ..._ }) => {
|
|
653
709
|
let v = a || !!d;
|
|
654
710
|
return /* @__PURE__ */ m("div", {
|
|
655
|
-
className:
|
|
711
|
+
className: De(s, n, r, i, v, o),
|
|
656
712
|
style: u,
|
|
657
713
|
onClick: (e) => {
|
|
658
714
|
v && d && d(e);
|
|
@@ -688,11 +744,11 @@ var we = ({ children: e, title: t = "", variant: n = "minimal", color: r = "defa
|
|
|
688
744
|
]
|
|
689
745
|
});
|
|
690
746
|
};
|
|
691
|
-
|
|
747
|
+
Oe.displayName = "Card";
|
|
692
748
|
//#endregion
|
|
693
749
|
//#region src/components/Blockquote/Blockquote.jsx
|
|
694
|
-
function
|
|
695
|
-
return r === "card" ? /* @__PURE__ */ m(
|
|
750
|
+
function ke({ 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(Oe, {
|
|
696
752
|
variant: "filled",
|
|
697
753
|
color: s,
|
|
698
754
|
size: o,
|
|
@@ -708,7 +764,7 @@ function Te({ cite: e = "", children: t, className: n = "", variant: r = "defaul
|
|
|
708
764
|
children: ["— ", e]
|
|
709
765
|
})]
|
|
710
766
|
}) : /* @__PURE__ */ m("blockquote", {
|
|
711
|
-
className:
|
|
767
|
+
className: Ee(n, r, i, a, o, s),
|
|
712
768
|
...c,
|
|
713
769
|
children: [/* @__PURE__ */ p("p", {
|
|
714
770
|
className: "quote-text",
|
|
@@ -720,7 +776,7 @@ function Te({ cite: e = "", children: t, className: n = "", variant: r = "defaul
|
|
|
720
776
|
});
|
|
721
777
|
}
|
|
722
778
|
//#endregion
|
|
723
|
-
//#region
|
|
779
|
+
//#region src/components/Box/utils.js
|
|
724
780
|
var Z = {
|
|
725
781
|
0: "0",
|
|
726
782
|
1: "0.25rem",
|
|
@@ -735,32 +791,32 @@ var Z = {
|
|
|
735
791
|
16: "4rem",
|
|
736
792
|
20: "5rem",
|
|
737
793
|
24: "6rem"
|
|
738
|
-
},
|
|
794
|
+
}, Ae = {
|
|
739
795
|
flex: "flex",
|
|
740
796
|
block: "block",
|
|
741
797
|
inline: "inline",
|
|
742
798
|
"inline-block": "inline-block",
|
|
743
799
|
none: "hidden",
|
|
744
800
|
grid: "grid"
|
|
745
|
-
},
|
|
801
|
+
}, je = {
|
|
746
802
|
row: "flex-row",
|
|
747
803
|
column: "flex-col",
|
|
748
804
|
"row-reverse": "flex-row-reverse",
|
|
749
805
|
"column-reverse": "flex-col-reverse"
|
|
750
|
-
},
|
|
806
|
+
}, Me = {
|
|
751
807
|
"flex-start": "justify-start",
|
|
752
808
|
center: "justify-center",
|
|
753
809
|
"flex-end": "justify-end",
|
|
754
810
|
"space-between": "justify-between",
|
|
755
811
|
"space-around": "justify-around",
|
|
756
812
|
"space-evenly": "justify-evenly"
|
|
757
|
-
},
|
|
813
|
+
}, Ne = {
|
|
758
814
|
"flex-start": "items-start",
|
|
759
815
|
center: "items-center",
|
|
760
816
|
"flex-end": "items-end",
|
|
761
817
|
stretch: "items-stretch",
|
|
762
818
|
baseline: "items-baseline"
|
|
763
|
-
},
|
|
819
|
+
}, Pe = {
|
|
764
820
|
wrap: "flex-wrap",
|
|
765
821
|
nowrap: "flex-nowrap",
|
|
766
822
|
"wrap-reverse": "flex-wrap-reverse"
|
|
@@ -768,9 +824,9 @@ var Z = {
|
|
|
768
824
|
function Q(e) {
|
|
769
825
|
return typeof e == "number" ? `${e}px` : e;
|
|
770
826
|
}
|
|
771
|
-
function
|
|
827
|
+
function Fe(e) {
|
|
772
828
|
let t = ["wc-box"];
|
|
773
|
-
if (e.display &&
|
|
829
|
+
if (e.display && Ae[e.display] && t.push(Ae[e.display]), e.flexDirection && je[e.flexDirection] && t.push(je[e.flexDirection]), e.justifyContent && Me[e.justifyContent] && t.push(Me[e.justifyContent]), e.alignItems && Ne[e.alignItems] && t.push(Ne[e.alignItems]), e.flexWrap && Pe[e.flexWrap] && t.push(Pe[e.flexWrap]), e.gap !== void 0) {
|
|
774
830
|
let n = e.gap.toString();
|
|
775
831
|
[
|
|
776
832
|
"0",
|
|
@@ -790,7 +846,7 @@ function je(e) {
|
|
|
790
846
|
}
|
|
791
847
|
return t;
|
|
792
848
|
}
|
|
793
|
-
function
|
|
849
|
+
function Ie(e) {
|
|
794
850
|
let t = {};
|
|
795
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) {
|
|
796
852
|
let n = Z[e.px] || Q(e.px);
|
|
@@ -812,9 +868,9 @@ function Me(e) {
|
|
|
812
868
|
}
|
|
813
869
|
//#endregion
|
|
814
870
|
//#region src/components/Box/Box.jsx
|
|
815
|
-
function
|
|
871
|
+
function Le({ 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 }) {
|
|
816
872
|
return /* @__PURE__ */ p(e, {
|
|
817
|
-
className:
|
|
873
|
+
className: Fe({
|
|
818
874
|
display: v,
|
|
819
875
|
flexDirection: y,
|
|
820
876
|
justifyContent: b,
|
|
@@ -823,7 +879,7 @@ function Ne({ component: e = "div", children: t, className: n = "", p: r, pt: i,
|
|
|
823
879
|
gap: C
|
|
824
880
|
}).concat(n).filter(Boolean).join(" "),
|
|
825
881
|
style: {
|
|
826
|
-
...
|
|
882
|
+
...Ie({
|
|
827
883
|
p: r,
|
|
828
884
|
pt: i,
|
|
829
885
|
pr: a,
|
|
@@ -862,8 +918,8 @@ function Ne({ component: e = "div", children: t, className: n = "", p: r, pt: i,
|
|
|
862
918
|
});
|
|
863
919
|
}
|
|
864
920
|
//#endregion
|
|
865
|
-
//#region
|
|
866
|
-
function
|
|
921
|
+
//#region src/components/Breadcrumb/utils.js
|
|
922
|
+
function Re(e, t, n, r) {
|
|
867
923
|
let i = [...e];
|
|
868
924
|
if (t && i.length && i[0].label !== "首页" && i.unshift({
|
|
869
925
|
label: "首页",
|
|
@@ -883,66 +939,66 @@ function Pe(e, t, n, r) {
|
|
|
883
939
|
}
|
|
884
940
|
return i;
|
|
885
941
|
}
|
|
886
|
-
function
|
|
942
|
+
function ze(e) {
|
|
887
943
|
return `wc-breadcrumb wc-breadcrumb--${e}`;
|
|
888
944
|
}
|
|
889
|
-
function
|
|
945
|
+
function Be(e, t) {
|
|
890
946
|
let n = ["wc-breadcrumb-item"];
|
|
891
947
|
return e === t - 1 && n.push("wc-breadcrumb-item--current"), n.join(" ");
|
|
892
948
|
}
|
|
893
|
-
function
|
|
949
|
+
function Ve(e) {
|
|
894
950
|
let t = ["wc-breadcrumb-link"];
|
|
895
951
|
return e && t.push("wc-breadcrumb-link--disabled"), t.join(" ");
|
|
896
952
|
}
|
|
897
|
-
function
|
|
953
|
+
function He(e, t, n, r, i) {
|
|
898
954
|
return t.disabled || t.isEllipsis || n === r - 1 ? (e.preventDefault(), !1) : (i && i(e, t, n), !0);
|
|
899
955
|
}
|
|
900
|
-
function
|
|
956
|
+
function Ue(e, t, n, r) {
|
|
901
957
|
return e !== t - 1 && !n && !r;
|
|
902
958
|
}
|
|
903
959
|
//#endregion
|
|
904
960
|
//#region src/components/Breadcrumb/Breadcrumb.jsx
|
|
905
|
-
function
|
|
906
|
-
let c = e.useMemo(() =>
|
|
961
|
+
function We({ items: t = [], separator: n = "/", variant: r = "default", showHome: i = !1, homeIcon: a = "🏠", maxItems: o = 0, onItemClick: s }) {
|
|
962
|
+
let { messages: c } = q(), l = e.useMemo(() => Re(t, i, a, o), [
|
|
907
963
|
t,
|
|
908
964
|
i,
|
|
909
965
|
a,
|
|
910
966
|
o
|
|
911
|
-
]),
|
|
912
|
-
|
|
967
|
+
]), u = (e, t, n) => {
|
|
968
|
+
He(e, t, n, l.length, s);
|
|
913
969
|
};
|
|
914
970
|
return /* @__PURE__ */ p("nav", {
|
|
915
|
-
className:
|
|
916
|
-
"aria-label":
|
|
971
|
+
className: ze(r),
|
|
972
|
+
"aria-label": c.breadcrumb,
|
|
917
973
|
role: "navigation",
|
|
918
974
|
children: /* @__PURE__ */ p("ol", {
|
|
919
975
|
className: "wc-breadcrumb-list",
|
|
920
|
-
children:
|
|
921
|
-
className:
|
|
922
|
-
children: [
|
|
976
|
+
children: l.map((e, t) => /* @__PURE__ */ m("li", {
|
|
977
|
+
className: Be(t, l.length),
|
|
978
|
+
children: [Ue(t, l.length, e.disabled, e.isEllipsis) ? e.href ? /* @__PURE__ */ m("a", {
|
|
923
979
|
href: e.href,
|
|
924
|
-
className:
|
|
925
|
-
onClick: (n) =>
|
|
980
|
+
className: Ve(e.disabled),
|
|
981
|
+
onClick: (n) => u(n, e, t),
|
|
926
982
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
927
983
|
className: "wc-breadcrumb-icon",
|
|
928
984
|
dangerouslySetInnerHTML: { __html: e.icon }
|
|
929
985
|
}), e.label]
|
|
930
986
|
}) : /* @__PURE__ */ m("button", {
|
|
931
987
|
type: "button",
|
|
932
|
-
onClick: (n) =>
|
|
933
|
-
className:
|
|
988
|
+
onClick: (n) => u(n, e, t),
|
|
989
|
+
className: Ve(e.disabled),
|
|
934
990
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
935
991
|
className: "wc-breadcrumb-icon",
|
|
936
992
|
dangerouslySetInnerHTML: { __html: e.icon }
|
|
937
993
|
}), e.label]
|
|
938
994
|
}) : /* @__PURE__ */ m("span", {
|
|
939
|
-
className:
|
|
995
|
+
className: Ve(!0),
|
|
940
996
|
"aria-current": "page",
|
|
941
997
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
942
998
|
className: "wc-breadcrumb-icon",
|
|
943
999
|
dangerouslySetInnerHTML: { __html: e.icon }
|
|
944
1000
|
}), e.label]
|
|
945
|
-
}), t <
|
|
1001
|
+
}), t < l.length - 1 && /* @__PURE__ */ p("span", {
|
|
946
1002
|
className: "wc-breadcrumb-separator",
|
|
947
1003
|
children: n
|
|
948
1004
|
})]
|
|
@@ -951,8 +1007,8 @@ function Be({ items: t = [], separator: n = "/", variant: r = "default", showHom
|
|
|
951
1007
|
});
|
|
952
1008
|
}
|
|
953
1009
|
//#endregion
|
|
954
|
-
//#region
|
|
955
|
-
var
|
|
1010
|
+
//#region src/components/Button/utils.js
|
|
1011
|
+
var Ge = [
|
|
956
1012
|
"primary",
|
|
957
1013
|
"secondary",
|
|
958
1014
|
"filled",
|
|
@@ -967,23 +1023,23 @@ var Ve = [
|
|
|
967
1023
|
"cyan",
|
|
968
1024
|
"pink"
|
|
969
1025
|
];
|
|
970
|
-
function
|
|
971
|
-
return
|
|
1026
|
+
function Ke(e) {
|
|
1027
|
+
return Ge.includes(e);
|
|
972
1028
|
}
|
|
973
|
-
function
|
|
974
|
-
return
|
|
1029
|
+
function qe(e) {
|
|
1030
|
+
return Ke(e) ? e : "primary";
|
|
975
1031
|
}
|
|
976
|
-
function
|
|
1032
|
+
function Je(e) {
|
|
977
1033
|
let { variant: t, size: n, disabled: r, loading: i, fullWidth: a, uppercase: o, rounded: s, buttonStyle: c = "default" } = e, l = ["wc-btn"];
|
|
978
|
-
return l.push(`wc-btn--style-${c}`), l.push(`wc-btn--${
|
|
1034
|
+
return l.push(`wc-btn--style-${c}`), l.push(`wc-btn--${qe(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;
|
|
979
1035
|
}
|
|
980
|
-
function
|
|
1036
|
+
function Ye({ event: e, disabled: t, loading: n, href: r, target: i, onClick: a }) {
|
|
981
1037
|
!t && !n && (r && window.open(r, i), a?.(e));
|
|
982
1038
|
}
|
|
983
1039
|
//#endregion
|
|
984
1040
|
//#region src/components/Button/Button.jsx
|
|
985
|
-
var
|
|
986
|
-
let T =
|
|
1041
|
+
var Xe = ({ 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 = Je({
|
|
987
1043
|
variant: t,
|
|
988
1044
|
buttonStyle: n,
|
|
989
1045
|
size: r,
|
|
@@ -993,7 +1049,7 @@ var Ke = ({ children: e, variant: t = "primary", buttonStyle: n = "default", siz
|
|
|
993
1049
|
uppercase: h,
|
|
994
1050
|
rounded: f
|
|
995
1051
|
}).concat(S).filter(Boolean).join(" "), E = { ...C }, D = (e) => {
|
|
996
|
-
|
|
1052
|
+
Ye({
|
|
997
1053
|
event: e,
|
|
998
1054
|
disabled: i,
|
|
999
1055
|
loading: a,
|
|
@@ -1057,10 +1113,10 @@ var Ke = ({ children: e, variant: t = "primary", buttonStyle: n = "default", siz
|
|
|
1057
1113
|
]
|
|
1058
1114
|
});
|
|
1059
1115
|
};
|
|
1060
|
-
|
|
1116
|
+
Xe.displayName = "Button";
|
|
1061
1117
|
//#endregion
|
|
1062
1118
|
//#region src/components/Card/CardActions.jsx
|
|
1063
|
-
var
|
|
1119
|
+
var Ze = ({ children: e, disableSpacing: t = !1, disablePadding: n = !1, justifyContent: r = "flex-start", className: i = "", ...a }) => /* @__PURE__ */ p("div", {
|
|
1064
1120
|
className: [
|
|
1065
1121
|
"wc-card-actions",
|
|
1066
1122
|
"wc-flex",
|
|
@@ -1079,10 +1135,10 @@ var qe = ({ children: e, disableSpacing: t = !1, disablePadding: n = !1, justify
|
|
|
1079
1135
|
...a,
|
|
1080
1136
|
children: e
|
|
1081
1137
|
});
|
|
1082
|
-
|
|
1138
|
+
Ze.displayName = "CardActions";
|
|
1083
1139
|
//#endregion
|
|
1084
1140
|
//#region src/components/Card/CardContent.jsx
|
|
1085
|
-
var
|
|
1141
|
+
var Qe = ({ children: e, disablePadding: t = !1, padding: n = "normal", className: r = "", ...i }) => /* @__PURE__ */ p("div", {
|
|
1086
1142
|
className: [
|
|
1087
1143
|
"wc-card-content",
|
|
1088
1144
|
!t && {
|
|
@@ -1096,22 +1152,22 @@ var Je = ({ children: e, disablePadding: t = !1, padding: n = "normal", classNam
|
|
|
1096
1152
|
...i,
|
|
1097
1153
|
children: e
|
|
1098
1154
|
});
|
|
1099
|
-
|
|
1155
|
+
Qe.displayName = "CardContent";
|
|
1100
1156
|
//#endregion
|
|
1101
1157
|
//#region src/components/Checkbox/Checkbox.jsx
|
|
1102
|
-
var
|
|
1158
|
+
var $e = [
|
|
1103
1159
|
"primary",
|
|
1104
1160
|
"secondary",
|
|
1105
1161
|
"success",
|
|
1106
1162
|
"warning",
|
|
1107
1163
|
"error",
|
|
1108
1164
|
"info"
|
|
1109
|
-
],
|
|
1165
|
+
], et = [
|
|
1110
1166
|
"sm",
|
|
1111
1167
|
"md",
|
|
1112
1168
|
"lg"
|
|
1113
|
-
],
|
|
1114
|
-
let _ = s(), [v, y] = d(!1), b =
|
|
1169
|
+
], tt = ({ 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 = $e.includes(o) ? o : "primary", x = et.includes(a) ? a : "md", S = [
|
|
1115
1171
|
"wc-checkbox",
|
|
1116
1172
|
`wc-checkbox--${x}`,
|
|
1117
1173
|
(e || n) && (n ? "wc-checkbox--indeterminate" : "wc-checkbox--checked"),
|
|
@@ -1181,46 +1237,46 @@ var Ye = [
|
|
|
1181
1237
|
]
|
|
1182
1238
|
});
|
|
1183
1239
|
};
|
|
1184
|
-
|
|
1240
|
+
tt.displayName = "Checkbox";
|
|
1185
1241
|
//#endregion
|
|
1186
|
-
//#region
|
|
1187
|
-
function
|
|
1242
|
+
//#region src/components/Chip/utils.jsx
|
|
1243
|
+
function nt(e) {
|
|
1188
1244
|
let { size: t = "md", variant: n = "filled", color: r = "default", clickable: i = !1, disabled: a = !1, className: o = "" } = e, s = ["wc-chip"];
|
|
1189
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(" ");
|
|
1190
1246
|
}
|
|
1191
|
-
function
|
|
1247
|
+
function rt(e, t, n, r) {
|
|
1192
1248
|
t && !n && r && r(e);
|
|
1193
1249
|
}
|
|
1194
|
-
function
|
|
1250
|
+
function it(e, t, n) {
|
|
1195
1251
|
e.stopPropagation(), !t && n && n(e);
|
|
1196
1252
|
}
|
|
1197
|
-
function
|
|
1253
|
+
function at() {
|
|
1198
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";
|
|
1199
1255
|
}
|
|
1200
1256
|
//#endregion
|
|
1201
1257
|
//#region src/components/Chip/Chip.jsx
|
|
1202
|
-
function
|
|
1203
|
-
let g =
|
|
1258
|
+
function ot({ 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 } = q(), _ = nt({
|
|
1204
1260
|
size: o,
|
|
1205
1261
|
variant: a,
|
|
1206
1262
|
color: s,
|
|
1207
1263
|
clickable: i,
|
|
1208
1264
|
disabled: r,
|
|
1209
1265
|
className: f
|
|
1210
|
-
}),
|
|
1211
|
-
|
|
1212
|
-
}, v = (e) => {
|
|
1213
|
-
et(e, r, u);
|
|
1266
|
+
}), v = (e) => {
|
|
1267
|
+
rt(e, i, r, l);
|
|
1214
1268
|
}, y = (e) => {
|
|
1215
|
-
(e
|
|
1269
|
+
it(e, r, u);
|
|
1270
|
+
}, b = (e) => {
|
|
1271
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), v(e));
|
|
1216
1272
|
};
|
|
1217
1273
|
return /* @__PURE__ */ m("div", {
|
|
1218
|
-
className:
|
|
1274
|
+
className: _,
|
|
1219
1275
|
role: i ? "button" : void 0,
|
|
1220
1276
|
tabIndex: i && !r ? 0 : void 0,
|
|
1221
1277
|
"aria-disabled": i ? r : void 0,
|
|
1222
|
-
onClick:
|
|
1223
|
-
onKeyDown:
|
|
1278
|
+
onClick: v,
|
|
1279
|
+
onKeyDown: b,
|
|
1224
1280
|
...h,
|
|
1225
1281
|
children: [
|
|
1226
1282
|
d && d.avatar || t ? /* @__PURE__ */ p("div", {
|
|
@@ -1237,9 +1293,9 @@ function nt({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1237
1293
|
}),
|
|
1238
1294
|
n && /* @__PURE__ */ p("button", {
|
|
1239
1295
|
type: "button",
|
|
1240
|
-
onClick:
|
|
1296
|
+
onClick: y,
|
|
1241
1297
|
className: "wc-chip-delete",
|
|
1242
|
-
"aria-label": "
|
|
1298
|
+
"aria-label": g.removeItem(typeof e == "string" ? e : void 0),
|
|
1243
1299
|
children: c || /* @__PURE__ */ p("svg", {
|
|
1244
1300
|
width: "16",
|
|
1245
1301
|
height: "16",
|
|
@@ -1249,7 +1305,7 @@ function nt({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1249
1305
|
"aria-hidden": "true",
|
|
1250
1306
|
children: /* @__PURE__ */ p("path", {
|
|
1251
1307
|
fillRule: "evenodd",
|
|
1252
|
-
d:
|
|
1308
|
+
d: at(),
|
|
1253
1309
|
clipRule: "evenodd"
|
|
1254
1310
|
})
|
|
1255
1311
|
})
|
|
@@ -1258,8 +1314,8 @@ function nt({ label: e = "", avatar: t = "", deletable: n = !1, disabled: r = !1
|
|
|
1258
1314
|
});
|
|
1259
1315
|
}
|
|
1260
1316
|
//#endregion
|
|
1261
|
-
//#region
|
|
1262
|
-
function
|
|
1317
|
+
//#region src/components/CircularProgress/utils.js
|
|
1318
|
+
function st(e, t) {
|
|
1263
1319
|
let n = typeof e == "string" ? parseInt(e, 10) : e, r = n / 2, i = (n - t) / 2;
|
|
1264
1320
|
return {
|
|
1265
1321
|
sizeNumber: n,
|
|
@@ -1268,21 +1324,21 @@ function rt(e, t) {
|
|
|
1268
1324
|
circumference: 2 * Math.PI * i
|
|
1269
1325
|
};
|
|
1270
1326
|
}
|
|
1271
|
-
function
|
|
1327
|
+
function ct(e, t, n) {
|
|
1272
1328
|
return e === "determinate" ? n - t / 100 * n : 0;
|
|
1273
1329
|
}
|
|
1274
|
-
function
|
|
1330
|
+
function lt(e) {
|
|
1275
1331
|
let { color: t = "primary", variant: n = "indeterminate", overlay: r = !1, centered: i = !1, inline: a = !1, className: o = "" } = e, s = ["wc-circular-progress"];
|
|
1276
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);
|
|
1277
1333
|
}
|
|
1278
|
-
function
|
|
1334
|
+
function ut(e) {
|
|
1279
1335
|
let t = ["wc-circular-progress-circle"];
|
|
1280
1336
|
return e === "indeterminate" && t.push("wc-circular-progress-circle--indeterminate"), t.filter(Boolean);
|
|
1281
1337
|
}
|
|
1282
|
-
function
|
|
1338
|
+
function dt(e) {
|
|
1283
1339
|
return Math.round(e);
|
|
1284
1340
|
}
|
|
1285
|
-
function
|
|
1341
|
+
function ft(e) {
|
|
1286
1342
|
let { value: t = 0, variant: n } = e, r = {
|
|
1287
1343
|
role: "progressbar",
|
|
1288
1344
|
"aria-valuemin": 0,
|
|
@@ -1292,92 +1348,94 @@ function ct(e) {
|
|
|
1292
1348
|
}
|
|
1293
1349
|
//#endregion
|
|
1294
1350
|
//#region src/components/CircularProgress/CircularProgress.jsx
|
|
1295
|
-
function
|
|
1296
|
-
let {
|
|
1351
|
+
function pt({ 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 } = q(), { sizeNumber: f, center: h, radius: g, circumference: _ } = st(t, n), v = ct(r, e, _), y = lt({
|
|
1297
1353
|
color: i,
|
|
1298
1354
|
variant: r,
|
|
1299
1355
|
overlay: o,
|
|
1300
1356
|
centered: s,
|
|
1301
1357
|
inline: c,
|
|
1302
1358
|
className: l
|
|
1303
|
-
}).join(" "),
|
|
1359
|
+
}).join(" "), b = ut(r).join(" "), x = ft({
|
|
1360
|
+
value: e,
|
|
1361
|
+
variant: r
|
|
1362
|
+
});
|
|
1304
1363
|
return /* @__PURE__ */ m("div", {
|
|
1305
|
-
className:
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
variant: r
|
|
1309
|
-
}),
|
|
1364
|
+
className: y,
|
|
1365
|
+
"aria-label": d.circularProgress,
|
|
1366
|
+
...x,
|
|
1310
1367
|
...u,
|
|
1311
1368
|
children: [/* @__PURE__ */ m("svg", {
|
|
1312
|
-
width:
|
|
1313
|
-
height:
|
|
1314
|
-
viewBox: `0 0 ${
|
|
1369
|
+
width: f,
|
|
1370
|
+
height: f,
|
|
1371
|
+
viewBox: `0 0 ${f} ${f}`,
|
|
1315
1372
|
className: "wc-circular-progress-svg",
|
|
1316
1373
|
children: [/* @__PURE__ */ p("circle", {
|
|
1317
|
-
cx:
|
|
1318
|
-
cy:
|
|
1319
|
-
r:
|
|
1374
|
+
cx: h,
|
|
1375
|
+
cy: h,
|
|
1376
|
+
r: g,
|
|
1320
1377
|
strokeWidth: n,
|
|
1321
1378
|
stroke: "currentColor",
|
|
1322
1379
|
fill: "none",
|
|
1323
1380
|
className: "wc-circular-progress-bg"
|
|
1324
1381
|
}), /* @__PURE__ */ p("circle", {
|
|
1325
|
-
cx:
|
|
1326
|
-
cy:
|
|
1327
|
-
r:
|
|
1382
|
+
cx: h,
|
|
1383
|
+
cy: h,
|
|
1384
|
+
r: g,
|
|
1328
1385
|
strokeWidth: n,
|
|
1329
1386
|
stroke: "currentColor",
|
|
1330
1387
|
fill: "none",
|
|
1331
|
-
strokeDasharray:
|
|
1332
|
-
strokeDashoffset:
|
|
1333
|
-
className:
|
|
1388
|
+
strokeDasharray: _,
|
|
1389
|
+
strokeDashoffset: v,
|
|
1390
|
+
className: b
|
|
1334
1391
|
})]
|
|
1335
1392
|
}), a && /* @__PURE__ */ m("div", {
|
|
1336
1393
|
className: "wc-circular-progress-value",
|
|
1337
|
-
children: [
|
|
1394
|
+
children: [dt(e), "%"]
|
|
1338
1395
|
})]
|
|
1339
1396
|
});
|
|
1340
1397
|
}
|
|
1341
1398
|
//#endregion
|
|
1342
|
-
//#region
|
|
1343
|
-
function
|
|
1399
|
+
//#region src/components/ColorPicker/utils.js
|
|
1400
|
+
function mt(e) {
|
|
1344
1401
|
let { size: t = "md", shape: n = "circle", disabled: r = !1, className: i = "" } = e, a = ["wc-color-picker"];
|
|
1345
1402
|
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);
|
|
1346
1403
|
}
|
|
1347
|
-
function
|
|
1404
|
+
function ht(e, t, n) {
|
|
1348
1405
|
!t && n && n(e.target.value);
|
|
1349
1406
|
}
|
|
1350
|
-
function
|
|
1407
|
+
function gt(e) {
|
|
1351
1408
|
return { backgroundColor: e };
|
|
1352
1409
|
}
|
|
1353
1410
|
//#endregion
|
|
1354
1411
|
//#region src/components/ColorPicker/ColorPicker.jsx
|
|
1355
|
-
function
|
|
1356
|
-
let o = e ?? "",
|
|
1412
|
+
function _t({ value: e = "#ffffff", onChange: t, size: n = "md", shape: r = "circle", disabled: i = !1, className: a = "" }) {
|
|
1413
|
+
let { messages: o } = q(), s = e ?? "", c = mt({
|
|
1357
1414
|
size: n,
|
|
1358
1415
|
shape: r,
|
|
1359
1416
|
disabled: i,
|
|
1360
1417
|
className: a
|
|
1361
|
-
}).join(" "),
|
|
1418
|
+
}).join(" "), l = gt(s);
|
|
1362
1419
|
return /* @__PURE__ */ m("label", {
|
|
1363
|
-
className:
|
|
1420
|
+
className: c,
|
|
1364
1421
|
children: [/* @__PURE__ */ p("input", {
|
|
1365
1422
|
type: "color",
|
|
1366
|
-
value:
|
|
1423
|
+
value: s,
|
|
1367
1424
|
onChange: (e) => {
|
|
1368
|
-
|
|
1425
|
+
ht(e, i, t);
|
|
1369
1426
|
},
|
|
1370
1427
|
disabled: i,
|
|
1371
|
-
className: "wc-color-picker__input"
|
|
1428
|
+
className: "wc-color-picker__input",
|
|
1429
|
+
"aria-label": o.colorPicker
|
|
1372
1430
|
}), /* @__PURE__ */ p("span", {
|
|
1373
1431
|
className: "wc-color-picker__preview",
|
|
1374
|
-
style:
|
|
1432
|
+
style: l
|
|
1375
1433
|
})]
|
|
1376
1434
|
});
|
|
1377
1435
|
}
|
|
1378
1436
|
//#endregion
|
|
1379
|
-
//#region
|
|
1380
|
-
var
|
|
1437
|
+
//#region src/components/Container/utils.js
|
|
1438
|
+
var vt = {
|
|
1381
1439
|
xs: "max-w-xs",
|
|
1382
1440
|
sm: "max-w-sm",
|
|
1383
1441
|
md: "max-w-md",
|
|
@@ -1385,15 +1443,15 @@ var mt = {
|
|
|
1385
1443
|
xl: "max-w-6xl",
|
|
1386
1444
|
"2xl": "max-w-7xl"
|
|
1387
1445
|
};
|
|
1388
|
-
function
|
|
1446
|
+
function yt(e) {
|
|
1389
1447
|
let { maxWidth: t = "lg", fluid: n = !1, fixed: r = !1, className: i = "" } = e, a = ["mx-auto px-4 sm:px-6 lg:px-8"];
|
|
1390
|
-
return n || r ? a.push("w-full") : t &&
|
|
1448
|
+
return n || r ? a.push("w-full") : t && vt[t] && a.push(vt[t]), i && a.push(i), a.filter(Boolean);
|
|
1391
1449
|
}
|
|
1392
1450
|
//#endregion
|
|
1393
1451
|
//#region src/components/Container/Container.jsx
|
|
1394
|
-
function
|
|
1452
|
+
function bt({ maxWidth: e = "lg", fluid: t = !1, fixed: n = !1, className: r = "", children: i }) {
|
|
1395
1453
|
return /* @__PURE__ */ p("div", {
|
|
1396
|
-
className:
|
|
1454
|
+
className: yt({
|
|
1397
1455
|
maxWidth: e,
|
|
1398
1456
|
fluid: t,
|
|
1399
1457
|
fixed: n,
|
|
@@ -1403,18 +1461,18 @@ function gt({ maxWidth: e = "lg", fluid: t = !1, fixed: n = !1, className: r = "
|
|
|
1403
1461
|
});
|
|
1404
1462
|
}
|
|
1405
1463
|
//#endregion
|
|
1406
|
-
//#region
|
|
1407
|
-
function
|
|
1464
|
+
//#region src/components/Copy/utils.js
|
|
1465
|
+
function xt(e) {
|
|
1408
1466
|
let { variant: t = "default", size: n = "md", copied: r = !1, copyError: i = !1, className: a = "" } = e, o = ["wc-copy"];
|
|
1409
1467
|
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);
|
|
1410
1468
|
}
|
|
1411
|
-
function
|
|
1469
|
+
function St(e, t, n, r) {
|
|
1412
1470
|
return t ? "错误" : e ? r : n;
|
|
1413
1471
|
}
|
|
1414
|
-
function
|
|
1472
|
+
function Ct(e, t, n, r) {
|
|
1415
1473
|
return t ? r : e ? n : "";
|
|
1416
1474
|
}
|
|
1417
|
-
async function
|
|
1475
|
+
async function wt(e) {
|
|
1418
1476
|
try {
|
|
1419
1477
|
if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
|
|
1420
1478
|
{
|
|
@@ -1427,18 +1485,18 @@ async function bt(e) {
|
|
|
1427
1485
|
return console.warn("复制失败:", e), !1;
|
|
1428
1486
|
}
|
|
1429
1487
|
}
|
|
1430
|
-
async function
|
|
1431
|
-
await
|
|
1488
|
+
async function Tt(e, t, n, r, i, a, o, s) {
|
|
1489
|
+
await wt(e) ? (r(!0), i(!1), t(e)) : (r(!1), i(!0), n(/* @__PURE__ */ Error("复制失败"))), o && a && (a(!0), setTimeout(() => a(!1), 1500)), setTimeout(() => {
|
|
1432
1490
|
r(!1), i(!1);
|
|
1433
1491
|
}, s);
|
|
1434
1492
|
}
|
|
1435
|
-
function
|
|
1493
|
+
function Et(e, t) {
|
|
1436
1494
|
let n = "wc-copy-tooltip";
|
|
1437
1495
|
return e && (n += " wc-copy-tooltip--success"), t && (n += " wc-copy-tooltip--error"), n;
|
|
1438
1496
|
}
|
|
1439
1497
|
//#endregion
|
|
1440
1498
|
//#region src/components/Copy/Copy.jsx
|
|
1441
|
-
var
|
|
1499
|
+
var Dt = ({ copied: e, error: t }) => e ? /* @__PURE__ */ m("svg", {
|
|
1442
1500
|
viewBox: "0 0 20 20",
|
|
1443
1501
|
fill: "none",
|
|
1444
1502
|
stroke: "currentColor",
|
|
@@ -1478,15 +1536,15 @@ var Ct = ({ copied: e, error: t }) => e ? /* @__PURE__ */ m("svg", {
|
|
|
1478
1536
|
rx: "2"
|
|
1479
1537
|
}), /* @__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" })]
|
|
1480
1538
|
});
|
|
1481
|
-
function
|
|
1482
|
-
let [v, y] = d(!1), [b, x] = d(!1), [S, C] = d(!1), w =
|
|
1539
|
+
function Ot({ 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: _ }) {
|
|
1540
|
+
let [v, y] = d(!1), [b, x] = d(!1), [S, C] = d(!1), w = xt({
|
|
1483
1541
|
variant: t,
|
|
1484
1542
|
size: n,
|
|
1485
1543
|
copied: v,
|
|
1486
1544
|
copyError: b,
|
|
1487
1545
|
className: h
|
|
1488
|
-
}).join(" "), T =
|
|
1489
|
-
await
|
|
1546
|
+
}).join(" "), T = St(v, b, a, o), E = Ct(v, b, s, c), D = Et(v, b), O = async () => {
|
|
1547
|
+
await Tt(e, u, f, y, x, C, i, l);
|
|
1490
1548
|
}, k = (e) => {
|
|
1491
1549
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), O());
|
|
1492
1550
|
};
|
|
@@ -1506,7 +1564,7 @@ function wt({ text: e, variant: t = "default", size: n = "md", showLabel: r = !0
|
|
|
1506
1564
|
className: "wc-copy-action",
|
|
1507
1565
|
children: [_ ? /* @__PURE__ */ p(_, { className: "wc-copy-icon" }) : /* @__PURE__ */ p("span", {
|
|
1508
1566
|
className: "wc-copy-icon",
|
|
1509
|
-
children: /* @__PURE__ */ p(
|
|
1567
|
+
children: /* @__PURE__ */ p(Dt, {
|
|
1510
1568
|
copied: v,
|
|
1511
1569
|
error: b
|
|
1512
1570
|
})
|
|
@@ -1524,21 +1582,21 @@ function wt({ text: e, variant: t = "default", size: n = "md", showLabel: r = !0
|
|
|
1524
1582
|
});
|
|
1525
1583
|
}
|
|
1526
1584
|
//#endregion
|
|
1527
|
-
//#region
|
|
1528
|
-
function
|
|
1585
|
+
//#region src/components/DatePicker/utils.js
|
|
1586
|
+
function kt(e, t = "YYYY-MM-DD") {
|
|
1529
1587
|
if (!e || !(e instanceof Date)) return "";
|
|
1530
1588
|
let n = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getDate()).padStart(2, "0");
|
|
1531
1589
|
return t.replace("YYYY", n).replace("MM", r).replace("DD", i);
|
|
1532
1590
|
}
|
|
1533
|
-
function
|
|
1591
|
+
function At(e) {
|
|
1534
1592
|
if (!e) return !1;
|
|
1535
1593
|
let t = /* @__PURE__ */ new Date();
|
|
1536
1594
|
return e.toDateString() === t.toDateString();
|
|
1537
1595
|
}
|
|
1538
|
-
function
|
|
1596
|
+
function jt(e, t) {
|
|
1539
1597
|
return !e || !t ? !1 : e.toDateString() === t.toDateString();
|
|
1540
1598
|
}
|
|
1541
|
-
function
|
|
1599
|
+
function Mt(e) {
|
|
1542
1600
|
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);
|
|
1543
1601
|
for (let e = a - 1; e >= 0; e--) s.push({
|
|
1544
1602
|
day: c.getDate() - e,
|
|
@@ -1558,7 +1616,7 @@ function Ot(e) {
|
|
|
1558
1616
|
});
|
|
1559
1617
|
return s;
|
|
1560
1618
|
}
|
|
1561
|
-
function
|
|
1619
|
+
function Nt(e = "md", t = "default", n = !1, r = !1, i = !1) {
|
|
1562
1620
|
let a = [
|
|
1563
1621
|
"wc-datepicker-wrapper",
|
|
1564
1622
|
`wc-datepicker-wrapper--${e}`,
|
|
@@ -1566,48 +1624,48 @@ function kt(e = "md", t = "default", n = !1, r = !1, i = !1) {
|
|
|
1566
1624
|
];
|
|
1567
1625
|
return n && a.push("wc-datepicker-wrapper--disabled"), r && a.push("wc-datepicker-wrapper--focused"), i && a.push("wc-datepicker-wrapper--open"), a.join(" ");
|
|
1568
1626
|
}
|
|
1569
|
-
function
|
|
1627
|
+
function Pt(e, t) {
|
|
1570
1628
|
let n = ["wc-datepicker-day"];
|
|
1571
|
-
return e.month === "prev" && n.push("wc-datepicker-day--prev"), e.month === "next" && n.push("wc-datepicker-day--next"), e.month === "current" && n.push("wc-datepicker-day--current"), t &&
|
|
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 && jt(e.date, t) && n.push("wc-datepicker-day--selected"), At(e.date) && n.push("wc-datepicker-day--today"), n.join(" ");
|
|
1572
1630
|
}
|
|
1573
1631
|
//#endregion
|
|
1574
1632
|
//#region src/components/DatePicker/DatePicker.jsx
|
|
1575
|
-
function
|
|
1576
|
-
let v =
|
|
1633
|
+
function Ft({ 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 = "", ..._ }) {
|
|
1634
|
+
let { messages: v } = q(), 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);
|
|
1577
1635
|
o(() => {
|
|
1578
|
-
|
|
1579
|
-
}, [e]),
|
|
1580
|
-
open:
|
|
1581
|
-
elementRef:
|
|
1582
|
-
refs: [
|
|
1636
|
+
D(e ? new Date(e) : null);
|
|
1637
|
+
}, [e]), se({
|
|
1638
|
+
open: S,
|
|
1639
|
+
elementRef: b,
|
|
1640
|
+
refs: [y],
|
|
1583
1641
|
closeOnEscape: !0,
|
|
1584
1642
|
closeOnPointerDownOutside: !0,
|
|
1585
|
-
onEscapeKeyDown: () =>
|
|
1586
|
-
onPointerDownOutside: () =>
|
|
1643
|
+
onEscapeKeyDown: () => C(!1),
|
|
1644
|
+
onPointerDownOutside: () => C(!1),
|
|
1587
1645
|
zIndex: 1e3
|
|
1588
1646
|
});
|
|
1589
|
-
let
|
|
1590
|
-
r ||
|
|
1591
|
-
}, k = (e) => {
|
|
1592
|
-
r || (e.key === "Enter" || e.key === " " || e.key === "ArrowDown" ? (e.preventDefault(), S(!0)) : e.key === "Escape" && S(!1));
|
|
1647
|
+
let O = E ? kt(E, c) : "", k = () => {
|
|
1648
|
+
r || C((e) => !e);
|
|
1593
1649
|
}, A = (e) => {
|
|
1594
|
-
|
|
1650
|
+
r || (e.key === "Enter" || e.key === " " || e.key === "ArrowDown" ? (e.preventDefault(), C(!0)) : e.key === "Escape" && C(!1));
|
|
1651
|
+
}, j = (e) => {
|
|
1652
|
+
T((t) => {
|
|
1595
1653
|
let n = new Date(t);
|
|
1596
1654
|
return n.setMonth(n.getMonth() + e), n;
|
|
1597
1655
|
});
|
|
1598
|
-
},
|
|
1599
|
-
if (
|
|
1656
|
+
}, M = (e) => {
|
|
1657
|
+
if (F(e)) return;
|
|
1600
1658
|
let n = new Date(e.date);
|
|
1601
|
-
|
|
1602
|
-
}, M = () => {
|
|
1603
|
-
let e = /* @__PURE__ */ new Date();
|
|
1604
|
-
E(e), t(e), S(!1);
|
|
1659
|
+
D(n), t(n), C(!1);
|
|
1605
1660
|
}, N = () => {
|
|
1606
|
-
|
|
1607
|
-
|
|
1661
|
+
let e = /* @__PURE__ */ new Date();
|
|
1662
|
+
D(e), t(e), C(!1);
|
|
1663
|
+
}, P = () => {
|
|
1664
|
+
D(null), t(null), C(!1);
|
|
1665
|
+
}, F = (e) => {
|
|
1608
1666
|
let { date: t } = e;
|
|
1609
1667
|
return !!(f && t < (f instanceof Date ? f : new Date(f)) || h && t > (h instanceof Date ? h : new Date(h)));
|
|
1610
|
-
},
|
|
1668
|
+
}, I = Mt(w), L = [
|
|
1611
1669
|
"日",
|
|
1612
1670
|
"一",
|
|
1613
1671
|
"二",
|
|
@@ -1615,27 +1673,27 @@ function jt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1615
1673
|
"四",
|
|
1616
1674
|
"五",
|
|
1617
1675
|
"六"
|
|
1618
|
-
],
|
|
1676
|
+
], R = `${w.getFullYear()}年${w.getMonth() + 1}月`, z = [Nt(i, a, r, !1, S), g].filter(Boolean).join(" ");
|
|
1619
1677
|
return /* @__PURE__ */ m("div", {
|
|
1620
1678
|
className: "wc-datepicker",
|
|
1621
|
-
ref:
|
|
1679
|
+
ref: y,
|
|
1622
1680
|
..._,
|
|
1623
1681
|
children: [/* @__PURE__ */ m("div", {
|
|
1624
|
-
className:
|
|
1625
|
-
onClick:
|
|
1682
|
+
className: z,
|
|
1683
|
+
onClick: k,
|
|
1626
1684
|
children: [/* @__PURE__ */ p("input", {
|
|
1627
1685
|
type: "text",
|
|
1628
|
-
id:
|
|
1686
|
+
id: x,
|
|
1629
1687
|
className: "wc-datepicker-input",
|
|
1630
|
-
value:
|
|
1688
|
+
value: O,
|
|
1631
1689
|
placeholder: n,
|
|
1632
1690
|
disabled: r,
|
|
1633
1691
|
readOnly: !0,
|
|
1634
1692
|
role: "combobox",
|
|
1635
1693
|
"aria-haspopup": "dialog",
|
|
1636
|
-
"aria-expanded":
|
|
1637
|
-
"aria-controls": `${
|
|
1638
|
-
onKeyDown:
|
|
1694
|
+
"aria-expanded": S,
|
|
1695
|
+
"aria-controls": `${x}-calendar`,
|
|
1696
|
+
onKeyDown: A
|
|
1639
1697
|
}), /* @__PURE__ */ p("span", {
|
|
1640
1698
|
className: "wc-datepicker-icon",
|
|
1641
1699
|
"aria-hidden": "true",
|
|
@@ -1653,12 +1711,12 @@ function jt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1653
1711
|
}), /* @__PURE__ */ p("path", { d: "M16 3v4M8 3v4M3 10h18" })]
|
|
1654
1712
|
})
|
|
1655
1713
|
})]
|
|
1656
|
-
}),
|
|
1657
|
-
ref:
|
|
1714
|
+
}), S && /* @__PURE__ */ m("div", {
|
|
1715
|
+
ref: b,
|
|
1658
1716
|
className: "wc-datepicker-dropdown",
|
|
1659
|
-
id: `${
|
|
1717
|
+
id: `${x}-calendar`,
|
|
1660
1718
|
role: "dialog",
|
|
1661
|
-
"aria-label":
|
|
1719
|
+
"aria-label": v.openCalendar,
|
|
1662
1720
|
children: [
|
|
1663
1721
|
/* @__PURE__ */ m("div", {
|
|
1664
1722
|
className: "wc-datepicker-header",
|
|
@@ -1666,40 +1724,40 @@ function jt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1666
1724
|
/* @__PURE__ */ p("button", {
|
|
1667
1725
|
type: "button",
|
|
1668
1726
|
className: "wc-datepicker-nav",
|
|
1669
|
-
"aria-label":
|
|
1670
|
-
onClick: () =>
|
|
1727
|
+
"aria-label": v.previousMonth,
|
|
1728
|
+
onClick: () => j(-1),
|
|
1671
1729
|
children: "‹"
|
|
1672
1730
|
}),
|
|
1673
1731
|
/* @__PURE__ */ p("span", {
|
|
1674
1732
|
className: "wc-datepicker-title",
|
|
1675
|
-
children:
|
|
1733
|
+
children: R
|
|
1676
1734
|
}),
|
|
1677
1735
|
/* @__PURE__ */ p("button", {
|
|
1678
1736
|
type: "button",
|
|
1679
1737
|
className: "wc-datepicker-nav",
|
|
1680
|
-
"aria-label":
|
|
1681
|
-
onClick: () =>
|
|
1738
|
+
"aria-label": v.nextMonth,
|
|
1739
|
+
onClick: () => j(1),
|
|
1682
1740
|
children: "›"
|
|
1683
1741
|
})
|
|
1684
1742
|
]
|
|
1685
1743
|
}),
|
|
1686
1744
|
/* @__PURE__ */ p("div", {
|
|
1687
1745
|
className: "wc-datepicker-weekdays",
|
|
1688
|
-
children:
|
|
1746
|
+
children: L.map((e) => /* @__PURE__ */ p("div", {
|
|
1689
1747
|
className: "wc-datepicker-weekday",
|
|
1690
1748
|
children: e
|
|
1691
1749
|
}, e))
|
|
1692
1750
|
}),
|
|
1693
1751
|
/* @__PURE__ */ p("div", {
|
|
1694
1752
|
className: "wc-datepicker-days",
|
|
1695
|
-
children:
|
|
1753
|
+
children: I.map((e) => /* @__PURE__ */ p("button", {
|
|
1696
1754
|
type: "button",
|
|
1697
|
-
className:
|
|
1698
|
-
disabled:
|
|
1699
|
-
"aria-label":
|
|
1700
|
-
"aria-selected":
|
|
1701
|
-
"aria-current":
|
|
1702
|
-
onClick: () =>
|
|
1755
|
+
className: Pt(e, E),
|
|
1756
|
+
disabled: F(e),
|
|
1757
|
+
"aria-label": kt(e.date, "YYYY-MM-DD"),
|
|
1758
|
+
"aria-selected": jt(e.date, E),
|
|
1759
|
+
"aria-current": At(e.date) ? "date" : void 0,
|
|
1760
|
+
onClick: () => M(e),
|
|
1703
1761
|
children: e.day
|
|
1704
1762
|
}, `${e.month}-${e.day}`))
|
|
1705
1763
|
}),
|
|
@@ -1708,12 +1766,12 @@ function jt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1708
1766
|
children: [/* @__PURE__ */ p("button", {
|
|
1709
1767
|
type: "button",
|
|
1710
1768
|
className: "wc-datepicker-today",
|
|
1711
|
-
onClick:
|
|
1769
|
+
onClick: N,
|
|
1712
1770
|
children: "今天"
|
|
1713
1771
|
}), /* @__PURE__ */ p("button", {
|
|
1714
1772
|
type: "button",
|
|
1715
1773
|
className: "wc-datepicker-clear",
|
|
1716
|
-
onClick:
|
|
1774
|
+
onClick: P,
|
|
1717
1775
|
children: "清除"
|
|
1718
1776
|
})]
|
|
1719
1777
|
})
|
|
@@ -1723,7 +1781,7 @@ function jt({ value: e = null, onChange: t = () => {}, placeholder: n = "请选
|
|
|
1723
1781
|
}
|
|
1724
1782
|
//#endregion
|
|
1725
1783
|
//#region src/components/Button/Fab.jsx
|
|
1726
|
-
var
|
|
1784
|
+
var It = ({ 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 }) => {
|
|
1727
1785
|
let [g, _] = d(!1), v = ["circular", "extended"], y = [
|
|
1728
1786
|
"sm",
|
|
1729
1787
|
"md",
|
|
@@ -1764,10 +1822,10 @@ var Mt = ({ variant: e = "circular", size: t = "md", color: n = "primary", disab
|
|
|
1764
1822
|
})]
|
|
1765
1823
|
});
|
|
1766
1824
|
};
|
|
1767
|
-
|
|
1825
|
+
It.displayName = "Fab";
|
|
1768
1826
|
//#endregion
|
|
1769
1827
|
//#region src/components/Feed/Feed.jsx
|
|
1770
|
-
var
|
|
1828
|
+
var Lt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "var(--wc-accent)", dotSize: i = 8, lineWidth: a = 1, onItemClick: o }) => {
|
|
1771
1829
|
let s = Array.isArray(e.children) && e.children.length, c = typeof i == "number" ? `${i}px` : i, l = typeof a == "number" ? `${a}px` : a, u = {
|
|
1772
1830
|
"--feed-color": r,
|
|
1773
1831
|
"--feed-dot-size": c,
|
|
@@ -1776,7 +1834,6 @@ var Nt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1776
1834
|
return /* @__PURE__ */ m("li", {
|
|
1777
1835
|
className: `wc-feed-item ${n} ${s ? "has-children" : ""}`,
|
|
1778
1836
|
style: u,
|
|
1779
|
-
role: o ? "button" : void 0,
|
|
1780
1837
|
tabIndex: o ? 0 : void 0,
|
|
1781
1838
|
onClick: (t) => {
|
|
1782
1839
|
t.stopPropagation(), o && o(e);
|
|
@@ -1809,7 +1866,7 @@ var Nt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1809
1866
|
}),
|
|
1810
1867
|
s && /* @__PURE__ */ p("ul", {
|
|
1811
1868
|
className: "wc-feed-children",
|
|
1812
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
1869
|
+
children: e.children.map((e) => /* @__PURE__ */ p(Lt, {
|
|
1813
1870
|
item: e,
|
|
1814
1871
|
showAvatar: t,
|
|
1815
1872
|
variant: n,
|
|
@@ -1822,7 +1879,7 @@ var Nt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1822
1879
|
]
|
|
1823
1880
|
})]
|
|
1824
1881
|
});
|
|
1825
|
-
},
|
|
1882
|
+
}, Rt = ({ items: e = [], variant: t = "timeline", showAvatar: n = !0, color: r = "var(--wc-accent)", dotSize: i = 8, lineWidth: a = 1, onItemClick: o, className: s = "" }) => {
|
|
1826
1883
|
let c = typeof a == "number" ? `${a}px` : a, l = {
|
|
1827
1884
|
"--feed-color": r,
|
|
1828
1885
|
"--feed-line-width": c
|
|
@@ -1830,7 +1887,7 @@ var Nt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1830
1887
|
return /* @__PURE__ */ p("ul", {
|
|
1831
1888
|
className: `wc-feed-list ${t} ${s}`,
|
|
1832
1889
|
style: l,
|
|
1833
|
-
children: e.map((e) => /* @__PURE__ */ p(
|
|
1890
|
+
children: e.map((e) => /* @__PURE__ */ p(Lt, {
|
|
1834
1891
|
item: e,
|
|
1835
1892
|
variant: t,
|
|
1836
1893
|
showAvatar: n,
|
|
@@ -1841,10 +1898,10 @@ var Nt = ({ item: e, showAvatar: t = !0, variant: n = "timeline", color: r = "va
|
|
|
1841
1898
|
}, e.id || e.time))
|
|
1842
1899
|
});
|
|
1843
1900
|
};
|
|
1844
|
-
|
|
1901
|
+
Rt.displayName = "Feed";
|
|
1845
1902
|
//#endregion
|
|
1846
|
-
//#region
|
|
1847
|
-
var
|
|
1903
|
+
//#region src/components/Feature/utils.js
|
|
1904
|
+
var zt = ({ align: e, size: t, background: n, reverse: r, vertical: i, clickable: a, disabled: o, className: s }) => [
|
|
1848
1905
|
"wc-feature-card",
|
|
1849
1906
|
a && "wc-feature-card--clickable",
|
|
1850
1907
|
o && "wc-feature-card--disabled",
|
|
@@ -1855,29 +1912,29 @@ var Ft = ({ align: e, size: t, background: n, reverse: r, vertical: i, clickable
|
|
|
1855
1912
|
`wc-feature-card--${e}`,
|
|
1856
1913
|
s
|
|
1857
1914
|
].filter(Boolean);
|
|
1858
|
-
function
|
|
1915
|
+
function Bt(e) {
|
|
1859
1916
|
return ["wc-feature-icon", `wc-feature-icon--${e}`].filter(Boolean);
|
|
1860
1917
|
}
|
|
1861
|
-
function
|
|
1918
|
+
function Vt(e) {
|
|
1862
1919
|
return ["wc-feature-content", `wc-feature-content--${e}`].filter(Boolean);
|
|
1863
1920
|
}
|
|
1864
|
-
function
|
|
1921
|
+
function Ht(e) {
|
|
1865
1922
|
return ["wc-feature-title", `wc-feature-title--${e}`].filter(Boolean);
|
|
1866
1923
|
}
|
|
1867
|
-
var
|
|
1868
|
-
function
|
|
1924
|
+
var Ut = (e) => ["wc-feature-description", `wc-feature-description--${e}`].filter(Boolean);
|
|
1925
|
+
function Wt(e, t, n) {
|
|
1869
1926
|
!t && n && n(e);
|
|
1870
1927
|
}
|
|
1871
|
-
function
|
|
1928
|
+
function Gt(e, t) {
|
|
1872
1929
|
e.stopPropagation(), t && t(e);
|
|
1873
1930
|
}
|
|
1874
|
-
function
|
|
1931
|
+
function Kt(e) {
|
|
1875
1932
|
return e;
|
|
1876
1933
|
}
|
|
1877
1934
|
//#endregion
|
|
1878
1935
|
//#region src/components/Feature/Feature.jsx
|
|
1879
|
-
var
|
|
1880
|
-
let b =
|
|
1936
|
+
var qt = ({ 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 = {} }) => {
|
|
1937
|
+
let b = zt({
|
|
1881
1938
|
align: a,
|
|
1882
1939
|
size: i,
|
|
1883
1940
|
background: o,
|
|
@@ -1886,7 +1943,7 @@ var Ut = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1886
1943
|
clickable: !!h,
|
|
1887
1944
|
disabled: !1,
|
|
1888
1945
|
className: v
|
|
1889
|
-
}).join(" "), x =
|
|
1946
|
+
}).join(" "), x = Bt(r).join(" "), S = Vt(a).join(" "), C = Ht(i).join(" "), w = Ut(i).join(" "), T = {
|
|
1890
1947
|
...c ? { background: c } : {},
|
|
1891
1948
|
...y
|
|
1892
1949
|
}, E = typeof r == "number" ? `${r}px` : r, D = h ? {
|
|
@@ -1899,7 +1956,7 @@ var Ut = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1899
1956
|
return /* @__PURE__ */ m("div", {
|
|
1900
1957
|
className: `${b} ${s === "default" ? "" : `wc-feature-card--${s}`}`,
|
|
1901
1958
|
style: T,
|
|
1902
|
-
onClick: (e) =>
|
|
1959
|
+
onClick: (e) => Wt(e, !1, h),
|
|
1903
1960
|
...D,
|
|
1904
1961
|
children: [n && /* @__PURE__ */ p("div", {
|
|
1905
1962
|
className: x,
|
|
@@ -1910,7 +1967,7 @@ var Ut = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1910
1967
|
children: typeof n == "string" ? /* @__PURE__ */ p("span", {
|
|
1911
1968
|
className: "wc-feature-icon__inner",
|
|
1912
1969
|
dangerouslySetInnerHTML: { __html: n }
|
|
1913
|
-
}) :
|
|
1970
|
+
}) : Kt(n)
|
|
1914
1971
|
}), /* @__PURE__ */ m("div", {
|
|
1915
1972
|
className: S,
|
|
1916
1973
|
children: [
|
|
@@ -1925,17 +1982,17 @@ var Ut = ({ title: e = "Awesome Feature", description: t = "Feature description
|
|
|
1925
1982
|
d && /* @__PURE__ */ p("a", {
|
|
1926
1983
|
href: f,
|
|
1927
1984
|
className: "wc-feature-cta",
|
|
1928
|
-
onClick: (e) =>
|
|
1985
|
+
onClick: (e) => Gt(e, g),
|
|
1929
1986
|
children: d
|
|
1930
1987
|
})
|
|
1931
1988
|
]
|
|
1932
1989
|
})]
|
|
1933
1990
|
});
|
|
1934
1991
|
};
|
|
1935
|
-
|
|
1992
|
+
qt.displayName = "Feature";
|
|
1936
1993
|
//#endregion
|
|
1937
1994
|
//#region src/components/FileInput/FileInput.jsx
|
|
1938
|
-
var
|
|
1995
|
+
var Jt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
1939
1996
|
className: e,
|
|
1940
1997
|
"aria-hidden": "true",
|
|
1941
1998
|
children: /* @__PURE__ */ m("svg", {
|
|
@@ -1945,7 +2002,7 @@ var Wt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
1945
2002
|
strokeWidth: "2",
|
|
1946
2003
|
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" })]
|
|
1947
2004
|
})
|
|
1948
|
-
}),
|
|
2005
|
+
}), Yt = ({ multiple: e = !1, variant: t = "block", accept: n = "", label: r = "选择文件", description: i = "或拖放到这里", disabled: a = !1, onChange: o, onInvalid: s, className: c = "", style: l = {} }) => {
|
|
1949
2006
|
let [u, h] = d(!1), g = (e) => {
|
|
1950
2007
|
if (!n) return !0;
|
|
1951
2008
|
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));
|
|
@@ -1988,7 +2045,7 @@ var Wt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
1988
2045
|
"aria-label": r,
|
|
1989
2046
|
onChange: _
|
|
1990
2047
|
}),
|
|
1991
|
-
t === "block" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
2048
|
+
t === "block" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Jt, { className: "wc-file-input__upload-icon" }), /* @__PURE__ */ m("span", {
|
|
1992
2049
|
className: "wc-file-input-content",
|
|
1993
2050
|
children: [/* @__PURE__ */ p("strong", {
|
|
1994
2051
|
className: "wc-file-input-content__title",
|
|
@@ -2006,14 +2063,14 @@ var Wt = ({ className: e = "" }) => /* @__PURE__ */ p("span", {
|
|
|
2006
2063
|
children: "+"
|
|
2007
2064
|
}), r]
|
|
2008
2065
|
}),
|
|
2009
|
-
t === "icon" && /* @__PURE__ */ p(
|
|
2066
|
+
t === "icon" && /* @__PURE__ */ p(Jt, { className: "wc-file-icon" })
|
|
2010
2067
|
]
|
|
2011
2068
|
});
|
|
2012
2069
|
};
|
|
2013
|
-
|
|
2070
|
+
Yt.displayName = "FileInput";
|
|
2014
2071
|
//#endregion
|
|
2015
2072
|
//#region src/components/Form/FormControl.jsx
|
|
2016
|
-
var
|
|
2073
|
+
var Xt = n(null), Zt = ({ 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 }) => {
|
|
2017
2074
|
let f = l(() => ({
|
|
2018
2075
|
disabled: e,
|
|
2019
2076
|
error: t,
|
|
@@ -2035,7 +2092,7 @@ var Kt = n(null), qt = ({ disabled: e = !1, error: t = !1, required: n = !1, var
|
|
|
2035
2092
|
t && "form-control--error",
|
|
2036
2093
|
s
|
|
2037
2094
|
].filter(Boolean).join(" ");
|
|
2038
|
-
return /* @__PURE__ */ p(
|
|
2095
|
+
return /* @__PURE__ */ p(Xt.Provider, {
|
|
2039
2096
|
value: f,
|
|
2040
2097
|
children: /* @__PURE__ */ p("div", {
|
|
2041
2098
|
className: m,
|
|
@@ -2045,10 +2102,10 @@ var Kt = n(null), qt = ({ disabled: e = !1, error: t = !1, required: n = !1, var
|
|
|
2045
2102
|
})
|
|
2046
2103
|
});
|
|
2047
2104
|
};
|
|
2048
|
-
|
|
2105
|
+
Zt.displayName = "FormControl";
|
|
2049
2106
|
//#endregion
|
|
2050
2107
|
//#region src/components/Form/FormControlLabel.jsx
|
|
2051
|
-
var
|
|
2108
|
+
var Qt = ({ 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 }) => {
|
|
2052
2109
|
let f = (e) => {
|
|
2053
2110
|
n || l?.(e);
|
|
2054
2111
|
}, h = [
|
|
@@ -2087,10 +2144,10 @@ var Jt = ({ label: e, labelPlacement: t = "end", disabled: n = !1, required: r =
|
|
|
2087
2144
|
]
|
|
2088
2145
|
});
|
|
2089
2146
|
};
|
|
2090
|
-
|
|
2147
|
+
Qt.displayName = "FormControlLabel";
|
|
2091
2148
|
//#endregion
|
|
2092
2149
|
//#region src/components/Form/FormGroup.jsx
|
|
2093
|
-
var
|
|
2150
|
+
var $t = ({ row: e = !1, spacing: t = "normal", className: n = "", style: r = {}, children: i, ...a }) => /* @__PURE__ */ p("div", {
|
|
2094
2151
|
className: [
|
|
2095
2152
|
"form-group",
|
|
2096
2153
|
e && "form-group--row",
|
|
@@ -2102,11 +2159,11 @@ var Yt = ({ row: e = !1, spacing: t = "normal", className: n = "", style: r = {}
|
|
|
2102
2159
|
...a,
|
|
2103
2160
|
children: i
|
|
2104
2161
|
});
|
|
2105
|
-
|
|
2162
|
+
$t.displayName = "FormGroup";
|
|
2106
2163
|
//#endregion
|
|
2107
2164
|
//#region src/components/Form/FormHelperText.jsx
|
|
2108
|
-
var
|
|
2109
|
-
let h = a(
|
|
2165
|
+
var en = ({ 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 }) => {
|
|
2166
|
+
let h = a(Xt) || {}, g = t || h.error, _ = e || h.disabled;
|
|
2110
2167
|
return /* @__PURE__ */ p("p", {
|
|
2111
2168
|
id: c,
|
|
2112
2169
|
className: [
|
|
@@ -2126,55 +2183,55 @@ var Xt = ({ disabled: e = !1, error: t = !1, filled: n = !1, focused: r = !1, ma
|
|
|
2126
2183
|
children: f
|
|
2127
2184
|
});
|
|
2128
2185
|
};
|
|
2129
|
-
|
|
2186
|
+
en.displayName = "FormHelperText";
|
|
2130
2187
|
//#endregion
|
|
2131
|
-
//#region
|
|
2132
|
-
var
|
|
2188
|
+
//#region src/components/Grid/utils.js
|
|
2189
|
+
var tn = {
|
|
2133
2190
|
xs: "xs",
|
|
2134
2191
|
sm: "sm",
|
|
2135
2192
|
md: "md",
|
|
2136
2193
|
lg: "lg",
|
|
2137
2194
|
xl: "xl"
|
|
2138
|
-
},
|
|
2195
|
+
}, nn = {
|
|
2139
2196
|
row: "wc-grid-container--row",
|
|
2140
2197
|
column: "wc-grid-container--column",
|
|
2141
2198
|
"row-reverse": "wc-grid-container--row-reverse",
|
|
2142
2199
|
"column-reverse": "wc-grid-container--column-reverse"
|
|
2143
|
-
},
|
|
2200
|
+
}, rn = {
|
|
2144
2201
|
"flex-start": "wc-grid-container--justify-start",
|
|
2145
2202
|
center: "wc-grid-container--justify-center",
|
|
2146
2203
|
"flex-end": "wc-grid-container--justify-end",
|
|
2147
2204
|
"space-between": "wc-grid-container--justify-between",
|
|
2148
2205
|
"space-around": "wc-grid-container--justify-around",
|
|
2149
2206
|
"space-evenly": "wc-grid-container--justify-evenly"
|
|
2150
|
-
},
|
|
2207
|
+
}, an = {
|
|
2151
2208
|
"flex-start": "wc-grid-container--align-start",
|
|
2152
2209
|
center: "wc-grid-container--align-center",
|
|
2153
2210
|
"flex-end": "wc-grid-container--align-end",
|
|
2154
2211
|
stretch: "wc-grid-container--align-stretch",
|
|
2155
2212
|
baseline: "wc-grid-container--align-baseline"
|
|
2156
|
-
},
|
|
2213
|
+
}, on = (e) => {
|
|
2157
2214
|
let { direction: t = "row", justifyContent: n = "flex-start", alignItems: r = "stretch", spacing: i = 0 } = e, a = ["wc-grid", "wc-grid-container"];
|
|
2158
|
-
return
|
|
2159
|
-
},
|
|
2215
|
+
return nn[t] && a.push(nn[t]), rn[n] && a.push(rn[n]), an[r] && a.push(an[r]), a.push(...cn(i)), a;
|
|
2216
|
+
}, sn = (e) => {
|
|
2160
2217
|
let { xs: t, sm: n, md: r, lg: i, xl: a } = e, o = ["wc-grid", "wc-grid-item"];
|
|
2161
|
-
return Object.entries(
|
|
2218
|
+
return Object.entries(tn).forEach(([t, n]) => {
|
|
2162
2219
|
let r = e[t];
|
|
2163
|
-
r !== void 0 && o.push(...
|
|
2220
|
+
r !== void 0 && o.push(...ln(r, n));
|
|
2164
2221
|
}), o;
|
|
2165
|
-
},
|
|
2222
|
+
}, cn = (e) => {
|
|
2166
2223
|
let t = Number(e);
|
|
2167
2224
|
return [`wc-grid-container--spacing-${Number.isFinite(t) ? Math.max(0, Math.min(12, Math.round(t))) : 0}`];
|
|
2168
|
-
},
|
|
2225
|
+
}, ln = (e, t) => {
|
|
2169
2226
|
if (e === !1 || e == null) return [];
|
|
2170
2227
|
if (e === "auto") return [`wc-grid-item--${t}-auto`];
|
|
2171
2228
|
if (e === !0) return [`wc-grid-item--${t}-true`];
|
|
2172
2229
|
let n = Number(e);
|
|
2173
2230
|
return Number.isFinite(n) && n >= 1 && n <= 12 ? [`wc-grid-item--${t}-${Math.round(n)}`] : [];
|
|
2174
|
-
},
|
|
2231
|
+
}, un = (e) => {
|
|
2175
2232
|
let { container: t = !1, item: n = !1, className: r = "" } = e, i = [];
|
|
2176
|
-
return t && i.push(...
|
|
2177
|
-
},
|
|
2233
|
+
return t && i.push(...on(e)), n && i.push(...sn(e)), r && i.push(r), i;
|
|
2234
|
+
}, dn = (e) => {
|
|
2178
2235
|
let t = { ...e };
|
|
2179
2236
|
return t.spacing !== void 0 && (t.spacing = Number(t.spacing) || 0), [
|
|
2180
2237
|
"xs",
|
|
@@ -2189,8 +2246,8 @@ var Zt = {
|
|
|
2189
2246
|
isNaN(r) || (t[e] = Math.max(1, Math.min(12, r)));
|
|
2190
2247
|
}
|
|
2191
2248
|
}), t;
|
|
2192
|
-
},
|
|
2193
|
-
className:
|
|
2249
|
+
}, fn = ({ 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", {
|
|
2250
|
+
className: un(dn({
|
|
2194
2251
|
container: e,
|
|
2195
2252
|
item: t,
|
|
2196
2253
|
xs: n,
|
|
@@ -2208,10 +2265,10 @@ var Zt = {
|
|
|
2208
2265
|
...h,
|
|
2209
2266
|
children: m
|
|
2210
2267
|
});
|
|
2211
|
-
|
|
2268
|
+
fn.displayName = "Grid";
|
|
2212
2269
|
//#endregion
|
|
2213
2270
|
//#region src/components/HoverCard/HoverCard.jsx
|
|
2214
|
-
var
|
|
2271
|
+
var pn = ({ triggerText: e = "Hover me", cardData: t = {}, variant: n = "default", size: r = "md", cardSize: i = "md", position: a = "top", delay: c = 300, hideDelay: l = 100, showArrow: h = !1, disabled: g = !1, onShow: _, onHide: v, onAction: y, className: b = "", style: x = {}, children: S, card: C, ...w }) => {
|
|
2215
2272
|
let T = s(), [E, D] = d(!1), O = u(null), k = u(null), A = u(null), j = u(null), M = `${T}-trigger`, N = () => {
|
|
2216
2273
|
clearTimeout(O.current), clearTimeout(k.current);
|
|
2217
2274
|
}, P = () => {
|
|
@@ -2236,14 +2293,14 @@ var ln = ({ triggerText: e = "Hover me", cardData: t = {}, variant: n = "default
|
|
|
2236
2293
|
"hover-card-popup",
|
|
2237
2294
|
`hover-card-position-${a}`,
|
|
2238
2295
|
`hover-card-card-size-${i}`
|
|
2239
|
-
].join(" "), z =
|
|
2296
|
+
].join(" "), z = ce({
|
|
2240
2297
|
open: E,
|
|
2241
2298
|
anchorRef: j,
|
|
2242
2299
|
floatingRef: A,
|
|
2243
2300
|
placement: a,
|
|
2244
2301
|
offset: 8
|
|
2245
2302
|
});
|
|
2246
|
-
return
|
|
2303
|
+
return se({
|
|
2247
2304
|
open: E,
|
|
2248
2305
|
elementRef: A,
|
|
2249
2306
|
refs: [j],
|
|
@@ -2273,7 +2330,7 @@ var ln = ({ triggerText: e = "Hover me", cardData: t = {}, variant: n = "default
|
|
|
2273
2330
|
tabIndex: g ? -1 : 0,
|
|
2274
2331
|
"aria-describedby": E ? T : void 0,
|
|
2275
2332
|
children: S || e
|
|
2276
|
-
}), E && /* @__PURE__ */ p(
|
|
2333
|
+
}), E && /* @__PURE__ */ p(oe, { children: /* @__PURE__ */ m("div", {
|
|
2277
2334
|
ref: A,
|
|
2278
2335
|
id: T,
|
|
2279
2336
|
className: `${R} hover-card-position-${z}`.trim(),
|
|
@@ -2322,10 +2379,10 @@ var ln = ({ triggerText: e = "Hover me", cardData: t = {}, variant: n = "default
|
|
|
2322
2379
|
}) })]
|
|
2323
2380
|
});
|
|
2324
2381
|
};
|
|
2325
|
-
|
|
2382
|
+
pn.displayName = "HoverCard";
|
|
2326
2383
|
//#endregion
|
|
2327
2384
|
//#region ../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
|
|
2328
|
-
var
|
|
2385
|
+
var mn = /* @__PURE__ */ R(((e) => {
|
|
2329
2386
|
var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
|
|
2330
2387
|
function b(e) {
|
|
2331
2388
|
if (typeof e == "object" && e) {
|
|
@@ -2381,7 +2438,7 @@ var un = /* @__PURE__ */ R(((e) => {
|
|
|
2381
2438
|
}, e.isValidElementType = function(e) {
|
|
2382
2439
|
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);
|
|
2383
2440
|
}, e.typeOf = b;
|
|
2384
|
-
})),
|
|
2441
|
+
})), hn = /* @__PURE__ */ R(((e) => {
|
|
2385
2442
|
process.env.NODE_ENV !== "production" && (function() {
|
|
2386
2443
|
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
2444
|
function b(e) {
|
|
@@ -2457,9 +2514,9 @@ var un = /* @__PURE__ */ R(((e) => {
|
|
|
2457
2514
|
}
|
|
2458
2515
|
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;
|
|
2459
2516
|
})();
|
|
2460
|
-
})),
|
|
2461
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
2462
|
-
})),
|
|
2517
|
+
})), gn = /* @__PURE__ */ R(((e, t) => {
|
|
2518
|
+
process.env.NODE_ENV === "production" ? t.exports = mn() : t.exports = hn();
|
|
2519
|
+
})), _n = /* @__PURE__ */ R(((e, t) => {
|
|
2463
2520
|
var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
2464
2521
|
function a(e) {
|
|
2465
2522
|
if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
|
|
@@ -2492,14 +2549,14 @@ var un = /* @__PURE__ */ R(((e) => {
|
|
|
2492
2549
|
}
|
|
2493
2550
|
return s;
|
|
2494
2551
|
};
|
|
2495
|
-
})),
|
|
2552
|
+
})), vn = /* @__PURE__ */ R(((e, t) => {
|
|
2496
2553
|
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
2497
|
-
})),
|
|
2554
|
+
})), yn = /* @__PURE__ */ R(((e, t) => {
|
|
2498
2555
|
t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
2499
|
-
})),
|
|
2556
|
+
})), bn = /* @__PURE__ */ R(((e, t) => {
|
|
2500
2557
|
var n = function() {};
|
|
2501
2558
|
if (process.env.NODE_ENV !== "production") {
|
|
2502
|
-
var r =
|
|
2559
|
+
var r = vn(), i = {}, a = yn();
|
|
2503
2560
|
n = function(e) {
|
|
2504
2561
|
var t = "Warning: " + e;
|
|
2505
2562
|
typeof console < "u" && console.error(t);
|
|
@@ -2532,8 +2589,8 @@ var un = /* @__PURE__ */ R(((e) => {
|
|
|
2532
2589
|
o.resetWarningCache = function() {
|
|
2533
2590
|
process.env.NODE_ENV !== "production" && (i = {});
|
|
2534
2591
|
}, t.exports = o;
|
|
2535
|
-
})),
|
|
2536
|
-
var n =
|
|
2592
|
+
})), xn = /* @__PURE__ */ R(((e, t) => {
|
|
2593
|
+
var n = gn(), r = _n(), i = vn(), a = yn(), o = bn(), s = function() {};
|
|
2537
2594
|
process.env.NODE_ENV !== "production" && (s = function(e) {
|
|
2538
2595
|
var t = "Warning: " + e;
|
|
2539
2596
|
typeof console < "u" && console.error(t);
|
|
@@ -2791,8 +2848,8 @@ var un = /* @__PURE__ */ R(((e) => {
|
|
|
2791
2848
|
}
|
|
2792
2849
|
return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
|
|
2793
2850
|
};
|
|
2794
|
-
})),
|
|
2795
|
-
var n =
|
|
2851
|
+
})), Sn = /* @__PURE__ */ R(((e, t) => {
|
|
2852
|
+
var n = vn();
|
|
2796
2853
|
function r() {}
|
|
2797
2854
|
function i() {}
|
|
2798
2855
|
i.resetWarningCache = r, t.exports = function() {
|
|
@@ -2833,40 +2890,40 @@ var un = /* @__PURE__ */ R(((e) => {
|
|
|
2833
2890
|
};
|
|
2834
2891
|
})), $ = /* @__PURE__ */ B((/* @__PURE__ */ R(((e, t) => {
|
|
2835
2892
|
if (process.env.NODE_ENV !== "production") {
|
|
2836
|
-
var n =
|
|
2837
|
-
t.exports =
|
|
2838
|
-
} else t.exports =
|
|
2839
|
-
})))(), 1),
|
|
2893
|
+
var n = gn();
|
|
2894
|
+
t.exports = xn()(n.isElement, !0);
|
|
2895
|
+
} else t.exports = Sn()();
|
|
2896
|
+
})))(), 1), Cn = ({ className: e, style: t }) => /* @__PURE__ */ p("span", {
|
|
2840
2897
|
className: e,
|
|
2841
2898
|
style: t
|
|
2842
|
-
}),
|
|
2899
|
+
}), wn = {
|
|
2843
2900
|
lucide: () => import("@zeturn/watercolor-icons-lucide-react"),
|
|
2844
2901
|
heroicons: () => import("@zeturn/watercolor-icons-heroicons-react"),
|
|
2845
2902
|
tabler: () => import("@zeturn/watercolor-icons-tabler-react"),
|
|
2846
2903
|
phosphor: () => import("@zeturn/watercolor-icons-phosphor-react"),
|
|
2847
2904
|
feather: () => import("@zeturn/watercolor-icons-feather")
|
|
2848
|
-
},
|
|
2849
|
-
let t =
|
|
2905
|
+
}, Tn = (e) => {
|
|
2906
|
+
let t = wn[e];
|
|
2850
2907
|
return t ? t() : Promise.resolve(null);
|
|
2851
|
-
},
|
|
2908
|
+
}, En = (e, t) => r(() => e().then((e) => ({ default: t(e || {}) })).catch((e) => (console.warn("[Icon] 动态导入失败,已回退到占位符图标。", e), { default: Cn }))), Dn = (e, t, n) => {
|
|
2852
2909
|
switch (e) {
|
|
2853
|
-
case "lucide": return
|
|
2854
|
-
case "heroicons": return
|
|
2855
|
-
case "tabler": return
|
|
2856
|
-
case "phosphor": return
|
|
2910
|
+
case "lucide": return En(() => Tn("lucide"), (e) => e.getIcon?.(t) || Cn);
|
|
2911
|
+
case "heroicons": return En(() => Tn("heroicons"), (e) => e.getIcon?.(t, n) || Cn);
|
|
2912
|
+
case "tabler": return En(() => Tn("tabler"), (e) => e.getIcon?.(t) || Cn);
|
|
2913
|
+
case "phosphor": return En(() => Tn("phosphor"), (e) => e.getIcon?.(t) || Cn);
|
|
2857
2914
|
default: return null;
|
|
2858
2915
|
}
|
|
2859
|
-
},
|
|
2916
|
+
}, On = (e) => typeof e == "number" ? e : {
|
|
2860
2917
|
xs: 16,
|
|
2861
2918
|
sm: 20,
|
|
2862
2919
|
md: 24,
|
|
2863
2920
|
lg: 32,
|
|
2864
2921
|
xl: 48
|
|
2865
|
-
}[e] || parseInt(e) || 24,
|
|
2922
|
+
}[e] || parseInt(e) || 24, kn = ({ library: e = "lucide", name: n = "", html: i = "", size: a = 24, color: o = "currentColor", strokeWidth: s = 2, variant: c = "outline", className: u = "", children: d, ...f }) => {
|
|
2866
2923
|
let m = l(() => {
|
|
2867
2924
|
if (!n) return null;
|
|
2868
2925
|
try {
|
|
2869
|
-
return
|
|
2926
|
+
return Dn(e, n, c);
|
|
2870
2927
|
} catch {
|
|
2871
2928
|
return console.warn(`Icon "${n}" not found in library "${e}"`), null;
|
|
2872
2929
|
}
|
|
@@ -2876,7 +2933,7 @@ var un = /* @__PURE__ */ R(((e) => {
|
|
|
2876
2933
|
c
|
|
2877
2934
|
]), h = l(() => e === "feather" && n ? r(async () => {
|
|
2878
2935
|
try {
|
|
2879
|
-
let e =
|
|
2936
|
+
let e = On(a), { getFeatherSvg: t } = await Tn("feather") || {}, r = await t(n, {
|
|
2880
2937
|
width: e,
|
|
2881
2938
|
height: e,
|
|
2882
2939
|
strokeWidth: Number(s)
|
|
@@ -2897,13 +2954,13 @@ var un = /* @__PURE__ */ R(((e) => {
|
|
|
2897
2954
|
]), g = l(() => e === "html" && i ? i : "", [e, i]), _ = l(() => {
|
|
2898
2955
|
let e = {};
|
|
2899
2956
|
if (o && o !== "currentColor" && (e.color = o), a) {
|
|
2900
|
-
let t =
|
|
2957
|
+
let t = On(a);
|
|
2901
2958
|
e.width = `${t}px`, e.height = `${t}px`;
|
|
2902
2959
|
}
|
|
2903
2960
|
return e;
|
|
2904
2961
|
}, [o, a]), v = l(() => {
|
|
2905
2962
|
let t = {
|
|
2906
|
-
size:
|
|
2963
|
+
size: On(a),
|
|
2907
2964
|
color: o,
|
|
2908
2965
|
...f
|
|
2909
2966
|
};
|
|
@@ -2944,7 +3001,7 @@ var un = /* @__PURE__ */ R(((e) => {
|
|
|
2944
3001
|
children: d
|
|
2945
3002
|
});
|
|
2946
3003
|
};
|
|
2947
|
-
|
|
3004
|
+
kn.propTypes = {
|
|
2948
3005
|
library: $.default.oneOf([
|
|
2949
3006
|
"lucide",
|
|
2950
3007
|
"heroicons",
|
|
@@ -2968,7 +3025,7 @@ Tn.propTypes = {
|
|
|
2968
3025
|
};
|
|
2969
3026
|
//#endregion
|
|
2970
3027
|
//#region src/components/Button/IconButton.jsx
|
|
2971
|
-
var
|
|
3028
|
+
var An = ({ 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 }) => {
|
|
2972
3029
|
let f = [
|
|
2973
3030
|
"default",
|
|
2974
3031
|
"primary",
|
|
@@ -3010,16 +3067,16 @@ var En = ({ color: e = "default", size: t = "md", edge: n = !1, disabled: r = !1
|
|
|
3010
3067
|
})
|
|
3011
3068
|
});
|
|
3012
3069
|
};
|
|
3013
|
-
|
|
3070
|
+
An.displayName = "IconButton";
|
|
3014
3071
|
//#endregion
|
|
3015
3072
|
//#region src/components/ImageGallery/ImageGallery.jsx
|
|
3016
|
-
var
|
|
3017
|
-
let [w, T] = d(-1), [E, D] = d(1), O = u ? Math.ceil(e.length / f) : 1,
|
|
3073
|
+
var jn = ({ 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 }) => {
|
|
3074
|
+
let [w, T] = d(-1), [E, D] = d(1), { messages: O } = q(), k = u ? Math.ceil(e.length / f) : 1, A = {
|
|
3018
3075
|
sm: "75%",
|
|
3019
3076
|
md: "66.67%",
|
|
3020
3077
|
lg: "56.25%",
|
|
3021
3078
|
xl: "50%"
|
|
3022
|
-
},
|
|
3079
|
+
}, j = u ? e.slice((E - 1) * f, E * f) : e, M = (t) => {
|
|
3023
3080
|
let n = u ? (E - 1) * f + t : t;
|
|
3024
3081
|
T(n);
|
|
3025
3082
|
let r = e[n];
|
|
@@ -3030,16 +3087,16 @@ var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3030
3087
|
index: n,
|
|
3031
3088
|
image: r
|
|
3032
3089
|
});
|
|
3033
|
-
},
|
|
3090
|
+
}, N = (e) => {
|
|
3034
3091
|
b?.(e);
|
|
3035
3092
|
let t = document.createElement("a");
|
|
3036
3093
|
t.href = e.src, t.download = e.title || "image", document.body.appendChild(t), t.click(), document.body.removeChild(t);
|
|
3037
|
-
},
|
|
3094
|
+
}, P = () => {
|
|
3038
3095
|
T(-1), S?.();
|
|
3039
|
-
},
|
|
3096
|
+
}, F = () => T((e) => e > 0 ? e - 1 : e), I = () => T((t) => t < e.length - 1 ? t + 1 : t);
|
|
3040
3097
|
return o(() => {
|
|
3041
3098
|
let e = (e) => {
|
|
3042
|
-
e.key === "Escape" &&
|
|
3099
|
+
e.key === "Escape" && P(), w !== -1 && (e.key === "ArrowLeft" && F(), e.key === "ArrowRight" && I());
|
|
3043
3100
|
};
|
|
3044
3101
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
3045
3102
|
}, [w]), /* @__PURE__ */ m("div", {
|
|
@@ -3072,15 +3129,12 @@ var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3072
3129
|
columnCount: i,
|
|
3073
3130
|
columnGap: a
|
|
3074
3131
|
} : { gap: a },
|
|
3075
|
-
children:
|
|
3132
|
+
children: j.map((e, t) => /* @__PURE__ */ m("div", {
|
|
3076
3133
|
className: "gallery-item",
|
|
3077
|
-
onClick: () =>
|
|
3078
|
-
tabIndex: 0,
|
|
3079
|
-
role: "button",
|
|
3080
|
-
"aria-label": `查看图片 ${t + 1}`,
|
|
3134
|
+
onClick: () => M(t),
|
|
3081
3135
|
children: [/* @__PURE__ */ m("div", {
|
|
3082
3136
|
className: "gallery-image-container",
|
|
3083
|
-
style: { paddingBottom:
|
|
3137
|
+
style: { paddingBottom: A[r] },
|
|
3084
3138
|
children: [/* @__PURE__ */ p("img", {
|
|
3085
3139
|
src: e.thumbnail || e.src,
|
|
3086
3140
|
alt: e.alt || e.title,
|
|
@@ -3092,16 +3146,16 @@ var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3092
3146
|
className: "gallery-overlay-content",
|
|
3093
3147
|
children: [/* @__PURE__ */ p("button", {
|
|
3094
3148
|
className: "gallery-action-btn gallery-view-btn",
|
|
3095
|
-
"aria-label":
|
|
3149
|
+
"aria-label": O.openImageInLightbox(t + 1),
|
|
3096
3150
|
onClick: (e) => {
|
|
3097
|
-
e.stopPropagation(),
|
|
3151
|
+
e.stopPropagation(), M(t);
|
|
3098
3152
|
},
|
|
3099
3153
|
children: "👁️"
|
|
3100
3154
|
}), l && /* @__PURE__ */ p("button", {
|
|
3101
3155
|
className: "gallery-action-btn gallery-download-btn",
|
|
3102
|
-
"aria-label":
|
|
3156
|
+
"aria-label": O.downloadImage(t + 1),
|
|
3103
3157
|
onClick: (t) => {
|
|
3104
|
-
t.stopPropagation(),
|
|
3158
|
+
t.stopPropagation(), N(e);
|
|
3105
3159
|
},
|
|
3106
3160
|
children: "📥"
|
|
3107
3161
|
})]
|
|
@@ -3119,12 +3173,13 @@ var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3119
3173
|
})]
|
|
3120
3174
|
}, e.id || t))
|
|
3121
3175
|
}),
|
|
3122
|
-
u &&
|
|
3176
|
+
u && k > 1 && /* @__PURE__ */ m("div", {
|
|
3123
3177
|
className: "gallery-pagination",
|
|
3124
3178
|
children: [
|
|
3125
3179
|
/* @__PURE__ */ p("button", {
|
|
3126
3180
|
className: "gallery-page-btn",
|
|
3127
3181
|
disabled: E === 1,
|
|
3182
|
+
"aria-label": O.previousPage,
|
|
3128
3183
|
onClick: () => D((e) => e - 1),
|
|
3129
3184
|
children: "上一页"
|
|
3130
3185
|
}),
|
|
@@ -3134,13 +3189,14 @@ var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3134
3189
|
"第 ",
|
|
3135
3190
|
E,
|
|
3136
3191
|
" 页,共 ",
|
|
3137
|
-
|
|
3192
|
+
k,
|
|
3138
3193
|
" 页"
|
|
3139
3194
|
]
|
|
3140
3195
|
}),
|
|
3141
3196
|
/* @__PURE__ */ p("button", {
|
|
3142
3197
|
className: "gallery-page-btn",
|
|
3143
|
-
disabled: E ===
|
|
3198
|
+
disabled: E === k,
|
|
3199
|
+
"aria-label": O.nextPage,
|
|
3144
3200
|
onClick: () => D((e) => e + 1),
|
|
3145
3201
|
children: "下一页"
|
|
3146
3202
|
})
|
|
@@ -3148,7 +3204,7 @@ var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3148
3204
|
}),
|
|
3149
3205
|
w !== -1 && /* @__PURE__ */ p("div", {
|
|
3150
3206
|
className: "gallery-lightbox",
|
|
3151
|
-
onClick:
|
|
3207
|
+
onClick: P,
|
|
3152
3208
|
role: "dialog",
|
|
3153
3209
|
"aria-modal": "true",
|
|
3154
3210
|
"aria-labelledby": "lightbox-title",
|
|
@@ -3158,7 +3214,8 @@ var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3158
3214
|
children: [
|
|
3159
3215
|
/* @__PURE__ */ p("button", {
|
|
3160
3216
|
className: "gallery-lightbox-close",
|
|
3161
|
-
|
|
3217
|
+
"aria-label": O.closeLightbox,
|
|
3218
|
+
onClick: P,
|
|
3162
3219
|
children: "✕"
|
|
3163
3220
|
}),
|
|
3164
3221
|
/* @__PURE__ */ p("div", {
|
|
@@ -3186,8 +3243,8 @@ var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3186
3243
|
/* @__PURE__ */ p("button", {
|
|
3187
3244
|
className: "gallery-lightbox-nav gallery-lightbox-prev",
|
|
3188
3245
|
disabled: w === 0,
|
|
3189
|
-
"aria-label":
|
|
3190
|
-
onClick:
|
|
3246
|
+
"aria-label": O.previousImage,
|
|
3247
|
+
onClick: F,
|
|
3191
3248
|
children: "‹"
|
|
3192
3249
|
}),
|
|
3193
3250
|
/* @__PURE__ */ m("span", {
|
|
@@ -3201,15 +3258,15 @@ var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3201
3258
|
/* @__PURE__ */ p("button", {
|
|
3202
3259
|
className: "gallery-lightbox-nav gallery-lightbox-next",
|
|
3203
3260
|
disabled: w === e.length - 1,
|
|
3204
|
-
"aria-label":
|
|
3205
|
-
onClick:
|
|
3261
|
+
"aria-label": O.nextImage,
|
|
3262
|
+
onClick: I,
|
|
3206
3263
|
children: "›"
|
|
3207
3264
|
})
|
|
3208
3265
|
]
|
|
3209
3266
|
}),
|
|
3210
3267
|
l && /* @__PURE__ */ p("button", {
|
|
3211
3268
|
className: "gallery-action-btn gallery-download-btn",
|
|
3212
|
-
onClick: () =>
|
|
3269
|
+
onClick: () => N(e[w]),
|
|
3213
3270
|
children: "下载"
|
|
3214
3271
|
})
|
|
3215
3272
|
]
|
|
@@ -3218,10 +3275,10 @@ var Dn = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3218
3275
|
]
|
|
3219
3276
|
});
|
|
3220
3277
|
};
|
|
3221
|
-
|
|
3278
|
+
jn.displayName = "ImageGallery";
|
|
3222
3279
|
//#endregion
|
|
3223
3280
|
//#region src/composition.ts
|
|
3224
|
-
var
|
|
3281
|
+
var Mn = [
|
|
3225
3282
|
"none",
|
|
3226
3283
|
"2xs",
|
|
3227
3284
|
"xs",
|
|
@@ -3231,40 +3288,40 @@ var On = [
|
|
|
3231
3288
|
"xl",
|
|
3232
3289
|
"2xl",
|
|
3233
3290
|
"3xl"
|
|
3234
|
-
],
|
|
3291
|
+
], Nn = [
|
|
3235
3292
|
"stretch",
|
|
3236
3293
|
"start",
|
|
3237
3294
|
"center",
|
|
3238
3295
|
"end"
|
|
3239
|
-
],
|
|
3296
|
+
], Pn = [
|
|
3240
3297
|
"sm",
|
|
3241
3298
|
"md",
|
|
3242
3299
|
"lg",
|
|
3243
3300
|
"xl",
|
|
3244
3301
|
"full"
|
|
3245
|
-
],
|
|
3302
|
+
], Fn = [
|
|
3246
3303
|
"none",
|
|
3247
3304
|
"sm",
|
|
3248
3305
|
"md",
|
|
3249
3306
|
"lg"
|
|
3250
|
-
],
|
|
3307
|
+
], In = [
|
|
3251
3308
|
"start",
|
|
3252
3309
|
"center",
|
|
3253
3310
|
"end",
|
|
3254
3311
|
"between",
|
|
3255
3312
|
"around"
|
|
3256
|
-
],
|
|
3313
|
+
], Ln = [
|
|
3257
3314
|
"equal",
|
|
3258
3315
|
"sidebar",
|
|
3259
3316
|
"sidebar-end",
|
|
3260
3317
|
"wide-start",
|
|
3261
3318
|
"wide-end"
|
|
3262
|
-
],
|
|
3319
|
+
], Rn = [
|
|
3263
3320
|
"none",
|
|
3264
3321
|
"sm",
|
|
3265
3322
|
"md",
|
|
3266
3323
|
"lg"
|
|
3267
|
-
],
|
|
3324
|
+
], zn = ({ as: e = "div", gap: t = "md", align: n = "center", justify: r = "start", wrap: i = !0, className: a = "", children: o, ...s }) => /* @__PURE__ */ p(e, {
|
|
3268
3325
|
className: ["wc-inline", a].filter(Boolean).join(" "),
|
|
3269
3326
|
"data-gap": t,
|
|
3270
3327
|
"data-align": n,
|
|
@@ -3273,18 +3330,18 @@ var On = [
|
|
|
3273
3330
|
...s,
|
|
3274
3331
|
children: o
|
|
3275
3332
|
});
|
|
3276
|
-
|
|
3333
|
+
zn.displayName = "Inline", zn.propTypes = {
|
|
3277
3334
|
as: $.default.elementType,
|
|
3278
|
-
gap: $.default.oneOf(
|
|
3279
|
-
align: $.default.oneOf(
|
|
3280
|
-
justify: $.default.oneOf(
|
|
3335
|
+
gap: $.default.oneOf(Mn),
|
|
3336
|
+
align: $.default.oneOf(Nn),
|
|
3337
|
+
justify: $.default.oneOf(In),
|
|
3281
3338
|
wrap: $.default.bool,
|
|
3282
3339
|
className: $.default.string,
|
|
3283
3340
|
children: $.default.node
|
|
3284
3341
|
};
|
|
3285
3342
|
//#endregion
|
|
3286
3343
|
//#region src/components/Input/Input.jsx
|
|
3287
|
-
var
|
|
3344
|
+
var Bn = ({ 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 }) => {
|
|
3288
3345
|
let [R, z] = d(!1), [B, V] = d(!!e), H = u(null), U = s(), W = k || U;
|
|
3289
3346
|
return o(() => {
|
|
3290
3347
|
V(!!e);
|
|
@@ -3355,28 +3412,28 @@ var In = ({ value: e = "", onChange: t, type: n = "text", placeholder: r = "", d
|
|
|
3355
3412
|
]
|
|
3356
3413
|
});
|
|
3357
3414
|
};
|
|
3358
|
-
|
|
3415
|
+
Bn.displayName = "Input";
|
|
3359
3416
|
//#endregion
|
|
3360
|
-
//#region
|
|
3361
|
-
var
|
|
3417
|
+
//#region src/components/List/utils.js
|
|
3418
|
+
var Vn = (e) => {
|
|
3362
3419
|
let { dense: t = !1, disablePadding: n = !1, variant: r, className: i = "" } = e, a = ["list"];
|
|
3363
3420
|
return t && a.push("list--dense"), n && a.push("list--no-padding"), r && a.push(`list--${r}`), i && a.push(i), a;
|
|
3364
|
-
},
|
|
3421
|
+
}, Hn = (e) => {
|
|
3365
3422
|
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"];
|
|
3366
3423
|
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;
|
|
3367
|
-
},
|
|
3424
|
+
}, Un = (e) => {
|
|
3368
3425
|
let { position: t = "start", className: n = "" } = e, r = ["list-item-icon"];
|
|
3369
3426
|
return t && r.push(`list-item-icon--${t}`), n && r.push(n), r;
|
|
3370
|
-
},
|
|
3427
|
+
}, Wn = (e) => {
|
|
3371
3428
|
let { inset: t = !1, className: n = "" } = e, r = ["list-item-text"];
|
|
3372
3429
|
return t && r.push("list-item-text--inset"), n && r.push(n), r;
|
|
3373
|
-
},
|
|
3374
|
-
let s =
|
|
3430
|
+
}, Gn = n({ dense: !1 }), Kn = ({ children: e, dense: t = !1, disablePadding: n = !1, nav: r = !1, subheader: i = "", className: a = "", ...o }) => {
|
|
3431
|
+
let s = Vn({
|
|
3375
3432
|
dense: t,
|
|
3376
3433
|
disablePadding: n,
|
|
3377
3434
|
className: a
|
|
3378
3435
|
}).concat(r ? "list--nav" : []).join(" ");
|
|
3379
|
-
return /* @__PURE__ */ p(
|
|
3436
|
+
return /* @__PURE__ */ p(Gn.Provider, {
|
|
3380
3437
|
value: { dense: t },
|
|
3381
3438
|
children: /* @__PURE__ */ m("div", {
|
|
3382
3439
|
role: r ? "navigation" : "list",
|
|
@@ -3388,8 +3445,8 @@ var Ln = (e) => {
|
|
|
3388
3445
|
}), e]
|
|
3389
3446
|
})
|
|
3390
3447
|
});
|
|
3391
|
-
},
|
|
3392
|
-
let { dense: d } = a(
|
|
3448
|
+
}, qn = ({ 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 }) => {
|
|
3449
|
+
let { dense: d } = a(Gn) || { dense: !1 }, f = Hn({
|
|
3393
3450
|
button: t,
|
|
3394
3451
|
disabled: n,
|
|
3395
3452
|
divider: r,
|
|
@@ -3406,15 +3463,15 @@ var Ln = (e) => {
|
|
|
3406
3463
|
...u,
|
|
3407
3464
|
children: e
|
|
3408
3465
|
});
|
|
3409
|
-
},
|
|
3410
|
-
className:
|
|
3466
|
+
}, Jn = ({ children: e, position: t = "start", className: n = "", ...r }) => /* @__PURE__ */ p("span", {
|
|
3467
|
+
className: Un({
|
|
3411
3468
|
position: t,
|
|
3412
3469
|
className: n
|
|
3413
3470
|
}).join(" "),
|
|
3414
3471
|
...r,
|
|
3415
3472
|
children: e
|
|
3416
|
-
}),
|
|
3417
|
-
className:
|
|
3473
|
+
}), Yn = ({ primary: e = "", secondary: t = "", inset: n = !1, className: r = "", ...i }) => /* @__PURE__ */ m("div", {
|
|
3474
|
+
className: Wn({
|
|
3418
3475
|
inset: n,
|
|
3419
3476
|
className: r
|
|
3420
3477
|
}).join(" "),
|
|
@@ -3426,37 +3483,37 @@ var Ln = (e) => {
|
|
|
3426
3483
|
className: "list-item-text-secondary",
|
|
3427
3484
|
children: t
|
|
3428
3485
|
})]
|
|
3429
|
-
}),
|
|
3486
|
+
}), Xn = ({ size: e, variant: t, disabled: n, className: r }) => {
|
|
3430
3487
|
let i = [
|
|
3431
3488
|
"wc-menu",
|
|
3432
3489
|
`wc-menu--${e}`,
|
|
3433
3490
|
`wc-menu--${t}`
|
|
3434
3491
|
];
|
|
3435
3492
|
return n && i.push("wc-menu--disabled"), r && i.push(r), i;
|
|
3436
|
-
},
|
|
3493
|
+
}, Zn = (e, t) => [
|
|
3437
3494
|
"wc-menu__menu",
|
|
3438
3495
|
`wc-menu__menu--${e}`,
|
|
3439
3496
|
t
|
|
3440
|
-
],
|
|
3497
|
+
], Qn = ({ disabled: e }) => ["wc-menu__button", e ? "wc-menu__button--disabled" : ""], $n = (e) => {
|
|
3441
3498
|
let t = ["wc-menu__item"];
|
|
3442
3499
|
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;
|
|
3443
|
-
},
|
|
3500
|
+
}, er = (e) => ["wc-menu__arrow", e ? "wc-menu__arrow--open" : ""], tr = (e, t, n, r, i) => {
|
|
3444
3501
|
t || (n(!e), e ? i && i() : r && r());
|
|
3445
|
-
},
|
|
3502
|
+
}, nr = (e, t, n, r, i) => {
|
|
3446
3503
|
e.disabled || e.divider || (n && n(e, t), r(!1), i && i());
|
|
3447
|
-
},
|
|
3448
|
-
let [T, E] = d(!1), D = s(), O = u(null), k = u(null), A = u(null), j =
|
|
3504
|
+
}, rr = (e) => e.startsWith("top") ? "top" : "bottom", ir = ({ 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 }) => {
|
|
3505
|
+
let [T, E] = d(!1), D = s(), O = u(null), k = u(null), A = u(null), j = Xn({
|
|
3449
3506
|
size: r,
|
|
3450
3507
|
variant: i,
|
|
3451
3508
|
disabled: a,
|
|
3452
3509
|
className: C
|
|
3453
|
-
}).join(" "), M =
|
|
3510
|
+
}).join(" "), M = Zn(n, i === "card" ? "wc-menu__menu--card" : "").join(" "), N = Qn({ disabled: a }).join(" "), P = er(T).join(" "), F = i === "card" ? {
|
|
3454
3511
|
minWidth: "320px",
|
|
3455
3512
|
maxWidth: "450px"
|
|
3456
3513
|
} : { minWidth: "120px" }, I = () => {
|
|
3457
|
-
|
|
3514
|
+
tr(T, a, E, v, y);
|
|
3458
3515
|
}, L = (e, t) => {
|
|
3459
|
-
|
|
3516
|
+
nr(e, t, _, E, y);
|
|
3460
3517
|
}, R = () => {
|
|
3461
3518
|
T && (E(!1), y?.());
|
|
3462
3519
|
}, z = (e = "first") => {
|
|
@@ -3468,14 +3525,14 @@ var Ln = (e) => {
|
|
|
3468
3525
|
o(() => {
|
|
3469
3526
|
T && queueMicrotask(() => z("first"));
|
|
3470
3527
|
}, [T]);
|
|
3471
|
-
let B =
|
|
3528
|
+
let B = ce({
|
|
3472
3529
|
open: T,
|
|
3473
3530
|
anchorRef: A,
|
|
3474
3531
|
floatingRef: k,
|
|
3475
|
-
placement:
|
|
3532
|
+
placement: rr(n),
|
|
3476
3533
|
offset: 6
|
|
3477
3534
|
});
|
|
3478
|
-
|
|
3535
|
+
se({
|
|
3479
3536
|
open: T,
|
|
3480
3537
|
elementRef: k,
|
|
3481
3538
|
refs: [A],
|
|
@@ -3489,7 +3546,7 @@ var Ln = (e) => {
|
|
|
3489
3546
|
});
|
|
3490
3547
|
let V = (e) => {
|
|
3491
3548
|
a || (e.key === "ArrowDown" || e.key === "Enter" || e.key === " " ? (e.preventDefault(), T ? z("next") : (E(!0), v?.())) : e.key === "ArrowUp" && (e.preventDefault(), T ? z("previous") : (E(!0), v?.(), queueMicrotask(() => z("last")))));
|
|
3492
|
-
}, H = T ? /* @__PURE__ */ p(
|
|
3549
|
+
}, H = T ? /* @__PURE__ */ p(oe, { children: /* @__PURE__ */ p("div", {
|
|
3493
3550
|
ref: k,
|
|
3494
3551
|
className: `${M} wc-menu__menu--resolved-${B}`.trim(),
|
|
3495
3552
|
id: D,
|
|
@@ -3527,7 +3584,7 @@ var Ln = (e) => {
|
|
|
3527
3584
|
}, e.key || t) : /* @__PURE__ */ m("button", {
|
|
3528
3585
|
type: "button",
|
|
3529
3586
|
role: "menuitem",
|
|
3530
|
-
className:
|
|
3587
|
+
className: $n(e).join(" "),
|
|
3531
3588
|
disabled: e.disabled,
|
|
3532
3589
|
onClick: () => L(e, t),
|
|
3533
3590
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
@@ -3545,7 +3602,7 @@ var Ln = (e) => {
|
|
|
3545
3602
|
}, e.key || t) : /* @__PURE__ */ m("button", {
|
|
3546
3603
|
type: "button",
|
|
3547
3604
|
role: "menuitem",
|
|
3548
|
-
className:
|
|
3605
|
+
className: $n(e).join(" "),
|
|
3549
3606
|
disabled: e.disabled,
|
|
3550
3607
|
onClick: () => L(e, t),
|
|
3551
3608
|
children: [e.icon && /* @__PURE__ */ p("span", {
|
|
@@ -3587,50 +3644,50 @@ var Ln = (e) => {
|
|
|
3587
3644
|
}), H]
|
|
3588
3645
|
});
|
|
3589
3646
|
};
|
|
3590
|
-
|
|
3647
|
+
ir.displayName = "Menu";
|
|
3591
3648
|
//#endregion
|
|
3592
|
-
//#region
|
|
3593
|
-
function
|
|
3649
|
+
//#region src/components/Modal/utils.js
|
|
3650
|
+
function ar({ size: e = "md", fullWidth: t = !1, fullScreen: n = !1, scroll: r = "paper", position: i = "center", className: a = "" } = {}) {
|
|
3594
3651
|
let o = ["wc-modal"];
|
|
3595
3652
|
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(" ");
|
|
3596
3653
|
}
|
|
3597
|
-
function
|
|
3654
|
+
function or({ centered: e = !0, position: t = "center" } = {}) {
|
|
3598
3655
|
let n = ["wc-modal-overlay"];
|
|
3599
3656
|
return (e || t === "center") && n.push("wc-modal-overlay--centered"), t && t !== "center" && n.push(`wc-modal-overlay--${t}`), n.join(" ");
|
|
3600
3657
|
}
|
|
3601
|
-
function
|
|
3658
|
+
function sr(e, t, n = 0) {
|
|
3602
3659
|
e(!1), t && (n > 0 ? setTimeout(() => {
|
|
3603
3660
|
t();
|
|
3604
3661
|
}, n) : t());
|
|
3605
3662
|
}
|
|
3606
3663
|
//#endregion
|
|
3607
3664
|
//#region src/components/Modal/Modal.jsx
|
|
3608
|
-
var
|
|
3609
|
-
let M = s(), [N, P] = d(e || t), F = u(null), I = e || t;
|
|
3665
|
+
var cr = ({ 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 }) => {
|
|
3666
|
+
let M = s(), [N, P] = d(e || t), F = u(null), { messages: I } = q(), L = e || t;
|
|
3610
3667
|
o(() => {
|
|
3611
|
-
P(
|
|
3612
|
-
}, [
|
|
3613
|
-
let
|
|
3668
|
+
P(L);
|
|
3669
|
+
}, [L]);
|
|
3670
|
+
let R = ar({
|
|
3614
3671
|
size: a || r,
|
|
3615
3672
|
fullWidth: y,
|
|
3616
3673
|
fullScreen: b,
|
|
3617
3674
|
scroll: S,
|
|
3618
3675
|
position: x,
|
|
3619
3676
|
className: E
|
|
3620
|
-
}),
|
|
3677
|
+
}), z = or({
|
|
3621
3678
|
centered: x === "center" || v,
|
|
3622
3679
|
position: x
|
|
3623
|
-
}),
|
|
3624
|
-
|
|
3625
|
-
}, [D]),
|
|
3626
|
-
f && h && !g &&
|
|
3680
|
+
}), B = i(() => {
|
|
3681
|
+
sr(P, D);
|
|
3682
|
+
}, [D]), V = i(() => {
|
|
3683
|
+
f && h && !g && B();
|
|
3627
3684
|
}, [
|
|
3628
3685
|
h,
|
|
3629
3686
|
g,
|
|
3630
|
-
|
|
3687
|
+
B,
|
|
3631
3688
|
f
|
|
3632
3689
|
]);
|
|
3633
|
-
if (
|
|
3690
|
+
if (se({
|
|
3634
3691
|
open: N,
|
|
3635
3692
|
elementRef: F,
|
|
3636
3693
|
modal: !0,
|
|
@@ -3639,18 +3696,18 @@ var ir = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3639
3696
|
initialFocus: !0,
|
|
3640
3697
|
closeOnEscape: c && !_,
|
|
3641
3698
|
closeOnPointerDownOutside: !1,
|
|
3642
|
-
onEscapeKeyDown:
|
|
3699
|
+
onEscapeKeyDown: B,
|
|
3643
3700
|
zIndex: w
|
|
3644
3701
|
}), !N) return null;
|
|
3645
|
-
let
|
|
3646
|
-
return /* @__PURE__ */ p(
|
|
3647
|
-
className:
|
|
3702
|
+
let H = c && l !== !1;
|
|
3703
|
+
return /* @__PURE__ */ p(oe, { children: /* @__PURE__ */ m("div", {
|
|
3704
|
+
className: z,
|
|
3648
3705
|
style: { zIndex: w },
|
|
3649
|
-
onClick:
|
|
3706
|
+
onClick: V,
|
|
3650
3707
|
"data-testid": "modal-overlay",
|
|
3651
3708
|
children: [T && /* @__PURE__ */ p("div", { className: "wc-modal__overlay" }), /* @__PURE__ */ m("div", {
|
|
3652
3709
|
ref: F,
|
|
3653
|
-
className:
|
|
3710
|
+
className: R,
|
|
3654
3711
|
onClick: (e) => e.stopPropagation(),
|
|
3655
3712
|
role: "dialog",
|
|
3656
3713
|
"aria-modal": "true",
|
|
@@ -3658,12 +3715,12 @@ var ir = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3658
3715
|
tabIndex: -1,
|
|
3659
3716
|
...j,
|
|
3660
3717
|
children: [
|
|
3661
|
-
|
|
3718
|
+
H && /* @__PURE__ */ p(Xe, {
|
|
3662
3719
|
variant: "text",
|
|
3663
3720
|
size: "sm",
|
|
3664
3721
|
className: "wc-modal__close",
|
|
3665
|
-
onClick:
|
|
3666
|
-
"aria-label":
|
|
3722
|
+
onClick: B,
|
|
3723
|
+
"aria-label": I.closeDialog,
|
|
3667
3724
|
children: /* @__PURE__ */ p("svg", {
|
|
3668
3725
|
viewBox: "0 0 24 24",
|
|
3669
3726
|
"aria-hidden": "true",
|
|
@@ -3690,10 +3747,10 @@ var ir = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3690
3747
|
})]
|
|
3691
3748
|
}) });
|
|
3692
3749
|
};
|
|
3693
|
-
|
|
3750
|
+
cr.displayName = "Modal";
|
|
3694
3751
|
//#endregion
|
|
3695
3752
|
//#region src/components/NumberAnimation/NumberAnimation.jsx
|
|
3696
|
-
var
|
|
3753
|
+
var lr = ({ 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 }) => {
|
|
3697
3754
|
let [b, x] = d(n), [S, C] = d(!1), w = u(null), T = u(null), E = (i) => {
|
|
3698
3755
|
w.current === null && (w.current = i);
|
|
3699
3756
|
let a = Math.min((i - w.current) / t, 1);
|
|
@@ -3739,21 +3796,21 @@ var ar = ({ active: e = !0, duration: t = 3e3, from: n = 0, to: r, locale: i = "
|
|
|
3739
3796
|
};
|
|
3740
3797
|
//#endregion
|
|
3741
3798
|
//#region src/components/Pagination/Pagination.jsx
|
|
3742
|
-
function
|
|
3743
|
-
let
|
|
3799
|
+
function ur({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCount: a = 1, boundaryCount: s = 1, size: c = "md", className: u = "", ...f }) {
|
|
3800
|
+
let { messages: h } = q(), [g, _] = d(e);
|
|
3744
3801
|
o(() => {
|
|
3745
|
-
|
|
3802
|
+
_(e);
|
|
3746
3803
|
}, [e]);
|
|
3747
|
-
let
|
|
3804
|
+
let v = l(() => Math.max(1, Math.ceil(n / r)), [n, r]), y = (e, t) => {
|
|
3748
3805
|
let n = [];
|
|
3749
3806
|
for (let r = e; r <= t; r++) n.push(r);
|
|
3750
3807
|
return n;
|
|
3751
|
-
},
|
|
3752
|
-
if (
|
|
3808
|
+
}, b = l(() => {
|
|
3809
|
+
if (v <= a * 2 + 3 + s * 2) return y(1, v).map((e) => ({
|
|
3753
3810
|
key: e,
|
|
3754
3811
|
num: e
|
|
3755
3812
|
}));
|
|
3756
|
-
let e = Math.max(
|
|
3813
|
+
let e = Math.max(g - a, s + 2), t = Math.min(g + a, v - s - 1), n = e > s + 2, r = t < v - s - 1, i = [];
|
|
3757
3814
|
for (let e = 1; e <= s; e++) i.push({
|
|
3758
3815
|
key: "b" + e,
|
|
3759
3816
|
num: e
|
|
@@ -3770,59 +3827,59 @@ function or({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCoun
|
|
|
3770
3827
|
key: "r-ellipsis",
|
|
3771
3828
|
ellipsis: !0
|
|
3772
3829
|
});
|
|
3773
|
-
for (let e =
|
|
3830
|
+
for (let e = v - s + 1; e <= v; e++) i.push({
|
|
3774
3831
|
key: "e" + e,
|
|
3775
3832
|
num: e
|
|
3776
3833
|
});
|
|
3777
3834
|
return i;
|
|
3778
3835
|
}, [
|
|
3779
|
-
|
|
3780
|
-
|
|
3836
|
+
g,
|
|
3837
|
+
v,
|
|
3781
3838
|
a,
|
|
3782
3839
|
s
|
|
3783
|
-
]),
|
|
3784
|
-
e < 1 || e >
|
|
3840
|
+
]), x = i((e) => {
|
|
3841
|
+
e < 1 || e > v || e === g || (_(e), t?.(e));
|
|
3785
3842
|
}, [
|
|
3786
|
-
|
|
3787
|
-
|
|
3843
|
+
g,
|
|
3844
|
+
v,
|
|
3788
3845
|
t
|
|
3789
3846
|
]);
|
|
3790
|
-
return
|
|
3847
|
+
return v <= 1 ? null : /* @__PURE__ */ m("nav", {
|
|
3791
3848
|
className: [
|
|
3792
3849
|
"pagination",
|
|
3793
3850
|
"wc-pagination",
|
|
3794
3851
|
c === "md" ? "" : `wc-pagination--${c}`,
|
|
3795
3852
|
u
|
|
3796
3853
|
].filter(Boolean).join(" "),
|
|
3797
|
-
"aria-label":
|
|
3854
|
+
"aria-label": h.pagination,
|
|
3798
3855
|
...f,
|
|
3799
3856
|
children: [
|
|
3800
3857
|
/* @__PURE__ */ p("button", {
|
|
3801
3858
|
className: "page-btn wc-page-btn wc-page-btn--prev wc-page-btn--nav",
|
|
3802
|
-
disabled:
|
|
3803
|
-
onClick: () =>
|
|
3804
|
-
"aria-label":
|
|
3859
|
+
disabled: g === 1,
|
|
3860
|
+
onClick: () => x(g - 1),
|
|
3861
|
+
"aria-label": h.previousPage,
|
|
3805
3862
|
children: /* @__PURE__ */ p("svg", {
|
|
3806
3863
|
viewBox: "0 0 24 24",
|
|
3807
3864
|
"aria-hidden": "true",
|
|
3808
3865
|
children: /* @__PURE__ */ p("path", { d: "m15 18-6-6 6-6" })
|
|
3809
3866
|
})
|
|
3810
3867
|
}),
|
|
3811
|
-
|
|
3868
|
+
b.map((e) => e.ellipsis ? /* @__PURE__ */ p("span", {
|
|
3812
3869
|
className: "page-ellipsis",
|
|
3813
3870
|
children: "…"
|
|
3814
3871
|
}, e.key) : /* @__PURE__ */ p("button", {
|
|
3815
|
-
className: `page-btn wc-page-btn${e.num ===
|
|
3816
|
-
onClick: () =>
|
|
3817
|
-
"aria-current": e.num ===
|
|
3818
|
-
"aria-label":
|
|
3872
|
+
className: `page-btn wc-page-btn${e.num === g ? " active wc-page-btn--active" : ""}`,
|
|
3873
|
+
onClick: () => x(e.num),
|
|
3874
|
+
"aria-current": e.num === g ? "page" : void 0,
|
|
3875
|
+
"aria-label": h.page(e.num),
|
|
3819
3876
|
children: e.num
|
|
3820
3877
|
}, e.key)),
|
|
3821
3878
|
/* @__PURE__ */ p("button", {
|
|
3822
3879
|
className: "page-btn wc-page-btn wc-page-btn--next wc-page-btn--nav",
|
|
3823
|
-
disabled:
|
|
3824
|
-
onClick: () =>
|
|
3825
|
-
"aria-label":
|
|
3880
|
+
disabled: g === v,
|
|
3881
|
+
onClick: () => x(g + 1),
|
|
3882
|
+
"aria-label": h.nextPage,
|
|
3826
3883
|
children: /* @__PURE__ */ p("svg", {
|
|
3827
3884
|
viewBox: "0 0 24 24",
|
|
3828
3885
|
"aria-hidden": "true",
|
|
@@ -3834,38 +3891,38 @@ function or({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCoun
|
|
|
3834
3891
|
}
|
|
3835
3892
|
//#endregion
|
|
3836
3893
|
//#region src/components/Page/Page.jsx
|
|
3837
|
-
var
|
|
3894
|
+
var dr = ({ as: e = "div", size: t = "lg", gutter: n = "md", className: r = "", children: i, ...a }) => /* @__PURE__ */ p(e, {
|
|
3838
3895
|
className: ["wc-page", r].filter(Boolean).join(" "),
|
|
3839
3896
|
"data-size": t,
|
|
3840
3897
|
"data-gutter": n,
|
|
3841
3898
|
...a,
|
|
3842
3899
|
children: i
|
|
3843
3900
|
});
|
|
3844
|
-
|
|
3901
|
+
dr.displayName = "Page", dr.propTypes = {
|
|
3845
3902
|
as: $.default.elementType,
|
|
3846
|
-
size: $.default.oneOf(
|
|
3847
|
-
gutter: $.default.oneOf(
|
|
3903
|
+
size: $.default.oneOf(Pn),
|
|
3904
|
+
gutter: $.default.oneOf(Fn),
|
|
3848
3905
|
className: $.default.string,
|
|
3849
3906
|
children: $.default.node
|
|
3850
3907
|
};
|
|
3851
3908
|
//#endregion
|
|
3852
|
-
//#region
|
|
3853
|
-
var
|
|
3909
|
+
//#region src/components/Paper/utils.js
|
|
3910
|
+
var fr = {
|
|
3854
3911
|
ELEVATION: "elevation",
|
|
3855
3912
|
OUTLINED: "outlined"
|
|
3856
|
-
},
|
|
3913
|
+
}, pr = {
|
|
3857
3914
|
SQUARE: "square",
|
|
3858
3915
|
ROUNDED_SM: "rounded-sm",
|
|
3859
3916
|
ROUNDED_LG: "rounded-lg",
|
|
3860
3917
|
ROUNDED_XL: "rounded-xl",
|
|
3861
3918
|
ROUNDED_2XL: "rounded-2xl",
|
|
3862
3919
|
ROUNDED_FULL: "rounded-full"
|
|
3863
|
-
},
|
|
3920
|
+
}, mr = {
|
|
3864
3921
|
SM: "sm",
|
|
3865
3922
|
MD: "md",
|
|
3866
3923
|
LG: "lg",
|
|
3867
3924
|
XL: "xl"
|
|
3868
|
-
},
|
|
3925
|
+
}, hr = {
|
|
3869
3926
|
DEFAULT: "default",
|
|
3870
3927
|
PRIMARY: "primary",
|
|
3871
3928
|
SUCCESS: "success",
|
|
@@ -3873,21 +3930,21 @@ var cr = {
|
|
|
3873
3930
|
ERROR: "error",
|
|
3874
3931
|
INFO: "info"
|
|
3875
3932
|
};
|
|
3876
|
-
function
|
|
3877
|
-
let { variant: t =
|
|
3878
|
-
if (t ===
|
|
3933
|
+
function gr(e = {}) {
|
|
3934
|
+
let { variant: t = fr.ELEVATION, elevation: n = 1, square: r = !1, shape: i = null, size: a = null, color: o = hr.DEFAULT, hoverable: s = !1, clickable: c = !1, gradient: l = !1, frosted: u = !1, textured: d = !1, className: f = "" } = e, p = ["wc-paper"];
|
|
3935
|
+
if (t === fr.OUTLINED) p.push("wc-paper--outlined");
|
|
3879
3936
|
else {
|
|
3880
3937
|
p.push("wc-paper--elevation");
|
|
3881
3938
|
let e = Math.max(0, Math.min(24, Math.floor(Number(n) || 0)));
|
|
3882
3939
|
p.push(`wc-paper--elevation-${e}`);
|
|
3883
3940
|
}
|
|
3884
|
-
return r ? p.push("wc-paper--square") : i &&
|
|
3941
|
+
return r ? p.push("wc-paper--square") : i && pr[i.toUpperCase()] && p.push(`wc-paper--${i}`), a && mr[a.toUpperCase()] && p.push(`wc-paper--${a}`), o !== hr.DEFAULT && hr[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(" ");
|
|
3885
3942
|
}
|
|
3886
3943
|
//#endregion
|
|
3887
3944
|
//#region src/components/Paper/Paper.jsx
|
|
3888
|
-
function
|
|
3945
|
+
function _r({ 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 }) {
|
|
3889
3946
|
return /* @__PURE__ */ p(e, {
|
|
3890
|
-
className:
|
|
3947
|
+
className: gr({
|
|
3891
3948
|
variant: t,
|
|
3892
3949
|
elevation: Math.max(0, Math.min(24, Math.floor(Number(n) || 0))),
|
|
3893
3950
|
square: r,
|
|
@@ -3918,52 +3975,52 @@ function pr({ component: e = "div", variant: t = "elevation", elevation: n = 1,
|
|
|
3918
3975
|
}
|
|
3919
3976
|
//#endregion
|
|
3920
3977
|
//#region src/components/Popover/Popover.jsx
|
|
3921
|
-
function
|
|
3922
|
-
let f = s(), [
|
|
3923
|
-
|
|
3924
|
-
},
|
|
3925
|
-
|
|
3926
|
-
},
|
|
3927
|
-
open:
|
|
3928
|
-
anchorRef:
|
|
3929
|
-
floatingRef:
|
|
3978
|
+
function vr({ open: t, onOpenChange: n, triggerText: r = "打开弹窗", trigger: i, placement: a = "bottom", offset: o = 8, children: c, className: l = "" }) {
|
|
3979
|
+
let { messages: f } = q(), h = s(), [g, _] = d(!1), v = t != null, y = u(null), b = u(null), x = v ? t : g, S = (e) => {
|
|
3980
|
+
v || _(e), n?.(e);
|
|
3981
|
+
}, C = () => S(!1), w = () => {
|
|
3982
|
+
S(!x);
|
|
3983
|
+
}, T = ce({
|
|
3984
|
+
open: x,
|
|
3985
|
+
anchorRef: y,
|
|
3986
|
+
floatingRef: b,
|
|
3930
3987
|
placement: a,
|
|
3931
3988
|
offset: o
|
|
3932
3989
|
});
|
|
3933
|
-
|
|
3934
|
-
open:
|
|
3935
|
-
elementRef:
|
|
3936
|
-
refs: [
|
|
3990
|
+
se({
|
|
3991
|
+
open: x,
|
|
3992
|
+
elementRef: b,
|
|
3993
|
+
refs: [y],
|
|
3937
3994
|
closeOnEscape: !0,
|
|
3938
3995
|
closeOnPointerDownOutside: !0,
|
|
3939
|
-
onEscapeKeyDown:
|
|
3940
|
-
onPointerDownOutside:
|
|
3996
|
+
onEscapeKeyDown: C,
|
|
3997
|
+
onPointerDownOutside: C,
|
|
3941
3998
|
zIndex: 2e3
|
|
3942
3999
|
});
|
|
3943
|
-
let
|
|
3944
|
-
ref:
|
|
3945
|
-
onClick:
|
|
3946
|
-
"aria-expanded":
|
|
4000
|
+
let E = i ? e.cloneElement(i, {
|
|
4001
|
+
ref: y,
|
|
4002
|
+
onClick: w,
|
|
4003
|
+
"aria-expanded": x,
|
|
3947
4004
|
"aria-haspopup": "dialog",
|
|
3948
|
-
"aria-controls":
|
|
4005
|
+
"aria-controls": h
|
|
3949
4006
|
}) : /* @__PURE__ */ p("button", {
|
|
3950
|
-
ref:
|
|
4007
|
+
ref: y,
|
|
3951
4008
|
type: "button",
|
|
3952
4009
|
className: "wc-popover-trigger",
|
|
3953
|
-
onClick:
|
|
3954
|
-
"aria-expanded":
|
|
4010
|
+
onClick: w,
|
|
4011
|
+
"aria-expanded": x,
|
|
3955
4012
|
"aria-haspopup": "dialog",
|
|
3956
|
-
"aria-controls":
|
|
4013
|
+
"aria-controls": h,
|
|
3957
4014
|
children: r
|
|
3958
4015
|
});
|
|
3959
4016
|
return /* @__PURE__ */ m("div", {
|
|
3960
4017
|
className: `wc-popover-container ${l}`.trim(),
|
|
3961
|
-
children: [
|
|
3962
|
-
ref:
|
|
3963
|
-
id:
|
|
3964
|
-
className: `wc-popover-content wc-popover-content--${
|
|
4018
|
+
children: [E, x && /* @__PURE__ */ p(oe, { children: /* @__PURE__ */ p("div", {
|
|
4019
|
+
ref: b,
|
|
4020
|
+
id: h,
|
|
4021
|
+
className: `wc-popover-content wc-popover-content--${T}`.trim(),
|
|
3965
4022
|
role: "dialog",
|
|
3966
|
-
"aria-label":
|
|
4023
|
+
"aria-label": f.closePopover,
|
|
3967
4024
|
tabIndex: -1,
|
|
3968
4025
|
children: c
|
|
3969
4026
|
}) })]
|
|
@@ -3971,7 +4028,7 @@ function mr({ open: t, onOpenChange: n, triggerText: r = "打开弹窗", trigger
|
|
|
3971
4028
|
}
|
|
3972
4029
|
//#endregion
|
|
3973
4030
|
//#region src/components/PricingTable/PricingTable.jsx
|
|
3974
|
-
function
|
|
4031
|
+
function yr({ plans: e = [], columns: t = 3, className: n = "" }) {
|
|
3975
4032
|
let r = { gridTemplateColumns: `repeat(${t}, minmax(0,1fr))` };
|
|
3976
4033
|
return /* @__PURE__ */ p("div", {
|
|
3977
4034
|
className: `pricing-grid ${n}`.trim(),
|
|
@@ -4001,8 +4058,8 @@ function hr({ plans: e = [], columns: t = 3, className: n = "" }) {
|
|
|
4001
4058
|
}
|
|
4002
4059
|
//#endregion
|
|
4003
4060
|
//#region src/components/Progress/Progress.jsx
|
|
4004
|
-
var
|
|
4005
|
-
let c = [
|
|
4061
|
+
var br = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primary", size: i = "md", animated: a = !1, className: o = "", ...s }) => {
|
|
4062
|
+
let { messages: c } = q(), l = [
|
|
4006
4063
|
"primary",
|
|
4007
4064
|
"success",
|
|
4008
4065
|
"warning",
|
|
@@ -4011,11 +4068,11 @@ var gr = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primar
|
|
|
4011
4068
|
"orange",
|
|
4012
4069
|
"cyan",
|
|
4013
4070
|
"pink"
|
|
4014
|
-
].includes(r) ? r : "primary",
|
|
4071
|
+
].includes(r) ? r : "primary", u = Number(e), d = Number.isNaN(u) ? 0 : Math.max(0, Math.min(100, u)), f = ["wc-progress", `wc-progress--${i}`], h = [
|
|
4015
4072
|
"wc-progress__bar",
|
|
4016
|
-
`wc-progress__bar--${
|
|
4073
|
+
`wc-progress__bar--${l}`,
|
|
4017
4074
|
a && "wc-progress__bar--animated"
|
|
4018
|
-
].filter(Boolean).join(" "),
|
|
4075
|
+
].filter(Boolean).join(" "), g = { width: `${d}%` };
|
|
4019
4076
|
return /* @__PURE__ */ m("div", {
|
|
4020
4077
|
className: `wc-progress-wrapper ${o}`,
|
|
4021
4078
|
...s,
|
|
@@ -4026,27 +4083,27 @@ var gr = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primar
|
|
|
4026
4083
|
children: t
|
|
4027
4084
|
}), n && /* @__PURE__ */ m("span", {
|
|
4028
4085
|
className: "wc-progress-percent",
|
|
4029
|
-
children: [Math.round(
|
|
4086
|
+
children: [Math.round(d), "%"]
|
|
4030
4087
|
})]
|
|
4031
4088
|
}), /* @__PURE__ */ p("div", {
|
|
4032
|
-
className:
|
|
4089
|
+
className: f.join(" "),
|
|
4033
4090
|
role: "progressbar",
|
|
4034
|
-
"aria-label": t ||
|
|
4035
|
-
"aria-valuenow":
|
|
4091
|
+
"aria-label": t || c.progress,
|
|
4092
|
+
"aria-valuenow": d,
|
|
4036
4093
|
"aria-valuemin": "0",
|
|
4037
4094
|
"aria-valuemax": "100",
|
|
4038
4095
|
children: /* @__PURE__ */ p("div", {
|
|
4039
|
-
className:
|
|
4040
|
-
style:
|
|
4096
|
+
className: h,
|
|
4097
|
+
style: g
|
|
4041
4098
|
})
|
|
4042
4099
|
})]
|
|
4043
4100
|
});
|
|
4044
4101
|
};
|
|
4045
|
-
|
|
4102
|
+
br.displayName = "Progress";
|
|
4046
4103
|
//#endregion
|
|
4047
4104
|
//#region src/components/Radio/Radio.jsx
|
|
4048
|
-
var
|
|
4049
|
-
function
|
|
4105
|
+
var xr = n(null);
|
|
4106
|
+
function Sr({ 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 = "" }) {
|
|
4050
4107
|
let [_, v] = d(e), y = e !== void 0, b = y ? e : _, x = i((e) => {
|
|
4051
4108
|
r || (y || v(e), t?.(e));
|
|
4052
4109
|
}, [
|
|
@@ -4054,7 +4111,7 @@ function vr({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", r
|
|
|
4054
4111
|
y,
|
|
4055
4112
|
t
|
|
4056
4113
|
]), S = ["wc-radio-group", g].filter(Boolean).join(" "), C = ["wc-radio-group-content", o && "wc-radio-group-content--row"].filter(Boolean).join(" ");
|
|
4057
|
-
return /* @__PURE__ */ p(
|
|
4114
|
+
return /* @__PURE__ */ p(xr.Provider, {
|
|
4058
4115
|
value: {
|
|
4059
4116
|
value: b,
|
|
4060
4117
|
updateValue: x,
|
|
@@ -4091,8 +4148,8 @@ function vr({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", r
|
|
|
4091
4148
|
})
|
|
4092
4149
|
});
|
|
4093
4150
|
}
|
|
4094
|
-
function
|
|
4095
|
-
let h = a(
|
|
4151
|
+
function Cr({ value: e, checked: t, onChange: n, label: r, name: i, disabled: o = !1, color: s = "primary", size: c = "md", className: l = "", children: u, ...f }) {
|
|
4152
|
+
let h = a(xr), 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 = [
|
|
4096
4153
|
"wc-radio",
|
|
4097
4154
|
`wc-radio--${y}`,
|
|
4098
4155
|
v && "wc-radio--disabled",
|
|
@@ -4133,48 +4190,48 @@ function yr({ value: e, checked: t, onChange: n, label: r, name: i, disabled: o
|
|
|
4133
4190
|
]
|
|
4134
4191
|
});
|
|
4135
4192
|
}
|
|
4136
|
-
|
|
4193
|
+
Cr.displayName = "Radio", Sr.displayName = "RadioGroup";
|
|
4137
4194
|
//#endregion
|
|
4138
4195
|
//#region src/components/Rating/Rating.jsx
|
|
4139
|
-
var
|
|
4140
|
-
let [
|
|
4141
|
-
o(() =>
|
|
4142
|
-
let
|
|
4196
|
+
var wr = ({ value: e = 0, max: t = 5, readOnly: n = !1, onChange: r = () => {}, className: i = "", style: a = {}, ariaLabel: s, ...c }) => {
|
|
4197
|
+
let [l, u] = d(0), [f, m] = d(e), { messages: h } = q();
|
|
4198
|
+
o(() => m(e), [e]);
|
|
4199
|
+
let g = (e) => {
|
|
4143
4200
|
if (n) return;
|
|
4144
|
-
let t = e ===
|
|
4145
|
-
|
|
4201
|
+
let t = e === f ? 0 : e;
|
|
4202
|
+
m(t), r(t);
|
|
4146
4203
|
};
|
|
4147
4204
|
return /* @__PURE__ */ p("div", {
|
|
4148
4205
|
className: ["wc-rating", i].filter(Boolean).join(" "),
|
|
4149
4206
|
role: "radiogroup",
|
|
4150
|
-
"aria-label":
|
|
4207
|
+
"aria-label": s || h.rating,
|
|
4151
4208
|
style: a,
|
|
4152
|
-
...
|
|
4209
|
+
...c,
|
|
4153
4210
|
children: Array.from({ length: t }, (e, r) => {
|
|
4154
4211
|
let i = r + 1;
|
|
4155
4212
|
return /* @__PURE__ */ p("button", {
|
|
4156
4213
|
type: "button",
|
|
4157
|
-
className: ["wc-rating-item", (i <=
|
|
4158
|
-
onMouseEnter: () => !n &&
|
|
4159
|
-
onMouseLeave: () => !n &&
|
|
4160
|
-
onClick: () =>
|
|
4214
|
+
className: ["wc-rating-item", (i <= l || i <= f) && "wc-rating-item--active"].filter(Boolean).join(" "),
|
|
4215
|
+
onMouseEnter: () => !n && u(i),
|
|
4216
|
+
onMouseLeave: () => !n && u(0),
|
|
4217
|
+
onClick: () => g(i),
|
|
4161
4218
|
disabled: n,
|
|
4162
|
-
"aria-label":
|
|
4163
|
-
"aria-checked": i ===
|
|
4219
|
+
"aria-label": h.ratingValue(i, t),
|
|
4220
|
+
"aria-checked": i === f,
|
|
4164
4221
|
role: "radio",
|
|
4165
4222
|
children: "★"
|
|
4166
4223
|
}, i);
|
|
4167
4224
|
})
|
|
4168
4225
|
});
|
|
4169
4226
|
};
|
|
4170
|
-
|
|
4227
|
+
wr.displayName = "Rating";
|
|
4171
4228
|
//#endregion
|
|
4172
4229
|
//#region src/components/Select/Select.jsx
|
|
4173
|
-
var
|
|
4230
|
+
var Tr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Select an option", label: i = "", helperText: a = "", error: o = !1, errorMessage: c = "", required: l = !1, disabled: f = !1, multiple: h = !1, clearable: g = !1, fullWidth: _ = !1, size: v = "md", variant: y = "filled", color: b = "primary", maxHeight: x = 200, name: S = "", id: C = "", className: w = "", style: T = {}, onFocus: E, onBlur: D, onSearch: O, renderOption: k, renderValue: A, ...j }) => {
|
|
4174
4231
|
let [M, N] = d(!1), [P, F] = d(!1), [I, L] = d(-1), R = u(null), z = u(null), B = () => {
|
|
4175
4232
|
N(!1), F(!1), L(-1);
|
|
4176
4233
|
};
|
|
4177
|
-
|
|
4234
|
+
se({
|
|
4178
4235
|
open: M,
|
|
4179
4236
|
elementRef: z,
|
|
4180
4237
|
refs: [R],
|
|
@@ -4225,7 +4282,7 @@ var xr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4225
4282
|
L(t[n < 0 ? 0 : (n + e + t.length) % t.length].index);
|
|
4226
4283
|
};
|
|
4227
4284
|
e.key === "Enter" || e.key === " " ? (e.preventDefault(), M && I >= 0 ? W(n[I]) : U()) : e.key === "ArrowDown" ? (e.preventDefault(), M ? r(1) : (N(!0), F(!0), L(t[0]?.index ?? -1))) : e.key === "ArrowUp" ? (e.preventDefault(), M ? r(-1) : (N(!0), F(!0), L(t[t.length - 1]?.index ?? -1))) : e.key === "Home" ? (e.preventDefault(), L(t[0]?.index ?? -1)) : e.key === "End" ? (e.preventDefault(), L(t[t.length - 1]?.index ?? -1)) : e.key === "Escape" && B();
|
|
4228
|
-
},
|
|
4285
|
+
}, G = () => h && Array.isArray(V) ? V.length === 0 ? /* @__PURE__ */ p("span", {
|
|
4229
4286
|
className: "wc-select__placeholder",
|
|
4230
4287
|
children: r
|
|
4231
4288
|
}) : /* @__PURE__ */ p("div", {
|
|
@@ -4237,16 +4294,16 @@ var xr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4237
4294
|
}) : V ? A ? A(V) : V.label || V.value : /* @__PURE__ */ p("span", {
|
|
4238
4295
|
className: "wc-select__placeholder",
|
|
4239
4296
|
children: r
|
|
4240
|
-
}),
|
|
4297
|
+
}), K = () => {
|
|
4241
4298
|
let e = ["wc-select__label"];
|
|
4242
4299
|
return e.push(`wc-select__label--${v}`), o && e.push("wc-select__label--error"), (P || V) && e.push("wc-select__label--active"), e.join(" ");
|
|
4243
|
-
},
|
|
4300
|
+
}, q = () => {
|
|
4244
4301
|
let e = ["wc-select__container"];
|
|
4245
4302
|
return e.push(`wc-select__container--${y}`), e.push(`wc-select__container--${v}`), f && e.push("wc-select__container--disabled"), o && e.push("wc-select__container--error"), P && e.push("wc-select__container--focused"), M && e.push("wc-select__container--open"), e.join(" ");
|
|
4246
|
-
},
|
|
4303
|
+
}, J = (e, t) => {
|
|
4247
4304
|
let n = ["wc-select__option"];
|
|
4248
4305
|
return t && n.push("wc-select__option--selected"), e.disabled && n.push("wc-select__option--disabled"), n.join(" ");
|
|
4249
|
-
},
|
|
4306
|
+
}, ie = s(), Y = C || S || ie;
|
|
4250
4307
|
return /* @__PURE__ */ m("div", {
|
|
4251
4308
|
className: H(),
|
|
4252
4309
|
style: T,
|
|
@@ -4255,14 +4312,14 @@ var xr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4255
4312
|
i && /* @__PURE__ */ m("label", {
|
|
4256
4313
|
htmlFor: Y,
|
|
4257
4314
|
id: `${Y}-label`,
|
|
4258
|
-
className:
|
|
4315
|
+
className: K(),
|
|
4259
4316
|
children: [i, l && /* @__PURE__ */ p("span", {
|
|
4260
4317
|
className: "wc-select__required",
|
|
4261
4318
|
children: "*"
|
|
4262
4319
|
})]
|
|
4263
4320
|
}),
|
|
4264
4321
|
/* @__PURE__ */ m("div", {
|
|
4265
|
-
className:
|
|
4322
|
+
className: q(),
|
|
4266
4323
|
children: [/* @__PURE__ */ m("div", {
|
|
4267
4324
|
className: "wc-select__control",
|
|
4268
4325
|
id: Y,
|
|
@@ -4281,7 +4338,7 @@ var xr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4281
4338
|
"aria-required": l,
|
|
4282
4339
|
children: [/* @__PURE__ */ p("div", {
|
|
4283
4340
|
className: "wc-select__value",
|
|
4284
|
-
children:
|
|
4341
|
+
children: G()
|
|
4285
4342
|
}), /* @__PURE__ */ m("div", {
|
|
4286
4343
|
className: "wc-select__indicators",
|
|
4287
4344
|
children: [g && (V || h && e?.length > 0) && /* @__PURE__ */ p("button", {
|
|
@@ -4310,7 +4367,7 @@ var xr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4310
4367
|
let r = h ? Array.isArray(e) && e.includes(t.value) : e === t.value;
|
|
4311
4368
|
return /* @__PURE__ */ m("div", {
|
|
4312
4369
|
id: `${Y}-option-${n}`,
|
|
4313
|
-
className:
|
|
4370
|
+
className: J(t, r),
|
|
4314
4371
|
onClick: () => W(t),
|
|
4315
4372
|
role: "option",
|
|
4316
4373
|
"aria-selected": r,
|
|
@@ -4341,29 +4398,29 @@ var xr = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Selec
|
|
|
4341
4398
|
]
|
|
4342
4399
|
});
|
|
4343
4400
|
};
|
|
4344
|
-
|
|
4401
|
+
Tr.displayName = "Select";
|
|
4345
4402
|
//#endregion
|
|
4346
4403
|
//#region src/components/Skeleton/Skeleton.jsx
|
|
4347
|
-
var
|
|
4404
|
+
var Er = {
|
|
4348
4405
|
text: "wc-skeleton--text",
|
|
4349
4406
|
rectangular: "wc-skeleton--rectangular",
|
|
4350
4407
|
rounded: "wc-skeleton--rounded",
|
|
4351
4408
|
circular: "wc-skeleton--circular"
|
|
4352
|
-
},
|
|
4353
|
-
let c = l(() => {
|
|
4354
|
-
let t = ["wc-skeleton",
|
|
4409
|
+
}, Dr = ({ animation: e = "pulse", component: t = "div", height: n, width: r, variant: i = "text", style: a = {}, className: o = "", ...s }) => {
|
|
4410
|
+
let { messages: c } = q(), u = l(() => {
|
|
4411
|
+
let t = ["wc-skeleton", Er[i] || Er.text];
|
|
4355
4412
|
return e === "pulse" && t.push("wc-skeleton--pulse"), e === "wave" && t.push("wc-skeleton--wave"), t.join(" ");
|
|
4356
|
-
}, [e, i]),
|
|
4357
|
-
return r !== void 0 && (
|
|
4358
|
-
className: `${
|
|
4359
|
-
style:
|
|
4413
|
+
}, [e, i]), d = { ...a };
|
|
4414
|
+
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, {
|
|
4415
|
+
className: `${u} ${o}`,
|
|
4416
|
+
style: d,
|
|
4360
4417
|
role: "status",
|
|
4361
4418
|
"aria-live": "polite",
|
|
4362
|
-
"aria-label":
|
|
4419
|
+
"aria-label": c.loading,
|
|
4363
4420
|
"aria-busy": "true",
|
|
4364
4421
|
...s
|
|
4365
4422
|
});
|
|
4366
|
-
},
|
|
4423
|
+
}, Or = ({ 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 = {}, ..._ }) => {
|
|
4367
4424
|
let [v, y] = d(e === void 0 ? t : e), b = s();
|
|
4368
4425
|
o(() => {
|
|
4369
4426
|
e !== void 0 && y(e);
|
|
@@ -4410,14 +4467,14 @@ var Sr = {
|
|
|
4410
4467
|
})]
|
|
4411
4468
|
});
|
|
4412
4469
|
};
|
|
4413
|
-
|
|
4470
|
+
Or.displayName = "Slider";
|
|
4414
4471
|
//#endregion
|
|
4415
4472
|
//#region src/components/SlideOver/SlideOver.jsx
|
|
4416
|
-
var
|
|
4417
|
-
let c = u(null), l = i(() => {
|
|
4473
|
+
var kr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width: r = 400, children: a, header: o, footer: s }) => {
|
|
4474
|
+
let c = u(null), { messages: l } = q(), d = i(() => {
|
|
4418
4475
|
t?.();
|
|
4419
4476
|
}, [t]);
|
|
4420
|
-
return
|
|
4477
|
+
return se({
|
|
4421
4478
|
open: e,
|
|
4422
4479
|
elementRef: c,
|
|
4423
4480
|
modal: !0,
|
|
@@ -4426,13 +4483,13 @@ var Tr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4426
4483
|
initialFocus: !0,
|
|
4427
4484
|
closeOnEscape: !0,
|
|
4428
4485
|
closeOnPointerDownOutside: !1,
|
|
4429
|
-
onEscapeKeyDown:
|
|
4486
|
+
onEscapeKeyDown: d,
|
|
4430
4487
|
zIndex: 3e3
|
|
4431
|
-
}), /* @__PURE__ */ p(
|
|
4488
|
+
}), /* @__PURE__ */ p(oe, { children: e ? /* @__PURE__ */ m("div", {
|
|
4432
4489
|
className: "wc-slideover-wrapper",
|
|
4433
4490
|
children: [/* @__PURE__ */ p("div", {
|
|
4434
4491
|
className: "wc-slideover-overlay",
|
|
4435
|
-
onClick:
|
|
4492
|
+
onClick: d
|
|
4436
4493
|
}), /* @__PURE__ */ m("div", {
|
|
4437
4494
|
ref: c,
|
|
4438
4495
|
className: `wc-slideover-panel wc-slideover-${n}`,
|
|
@@ -4456,8 +4513,8 @@ var Tr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4456
4513
|
/* @__PURE__ */ p("button", {
|
|
4457
4514
|
className: "wc-slideover-close",
|
|
4458
4515
|
type: "button",
|
|
4459
|
-
onClick:
|
|
4460
|
-
"aria-label":
|
|
4516
|
+
onClick: d,
|
|
4517
|
+
"aria-label": l.closeDialog,
|
|
4461
4518
|
children: /* @__PURE__ */ p("svg", {
|
|
4462
4519
|
viewBox: "0 0 24 24",
|
|
4463
4520
|
"aria-hidden": "true",
|
|
@@ -4467,7 +4524,7 @@ var Tr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4467
4524
|
]
|
|
4468
4525
|
})]
|
|
4469
4526
|
}) : null });
|
|
4470
|
-
},
|
|
4527
|
+
}, Ar = ({ as: e = "div", ratio: t = "equal", gap: n = "xl", align: r = "stretch", collapse: i = "md", className: a = "", children: o, ...s }) => /* @__PURE__ */ p(e, {
|
|
4471
4528
|
className: ["wc-split", a].filter(Boolean).join(" "),
|
|
4472
4529
|
"data-ratio": t,
|
|
4473
4530
|
"data-gap": n,
|
|
@@ -4476,34 +4533,34 @@ var Tr = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width:
|
|
|
4476
4533
|
...s,
|
|
4477
4534
|
children: o
|
|
4478
4535
|
});
|
|
4479
|
-
|
|
4536
|
+
Ar.displayName = "Split", Ar.propTypes = {
|
|
4480
4537
|
as: $.default.elementType,
|
|
4481
|
-
ratio: $.default.oneOf(
|
|
4482
|
-
gap: $.default.oneOf(
|
|
4483
|
-
align: $.default.oneOf(
|
|
4484
|
-
collapse: $.default.oneOf(
|
|
4538
|
+
ratio: $.default.oneOf(Ln),
|
|
4539
|
+
gap: $.default.oneOf(Mn),
|
|
4540
|
+
align: $.default.oneOf(Nn),
|
|
4541
|
+
collapse: $.default.oneOf(Rn),
|
|
4485
4542
|
className: $.default.string,
|
|
4486
4543
|
children: $.default.node
|
|
4487
4544
|
};
|
|
4488
4545
|
//#endregion
|
|
4489
4546
|
//#region src/components/Stack/Stack.jsx
|
|
4490
|
-
var
|
|
4547
|
+
var jr = ({ as: e = "div", gap: t = "md", align: n = "stretch", className: r = "", children: i, ...a }) => /* @__PURE__ */ p(e, {
|
|
4491
4548
|
className: ["wc-stack", r].filter(Boolean).join(" "),
|
|
4492
4549
|
"data-gap": t,
|
|
4493
4550
|
"data-align": n,
|
|
4494
4551
|
...a,
|
|
4495
4552
|
children: i
|
|
4496
4553
|
});
|
|
4497
|
-
|
|
4554
|
+
jr.displayName = "Stack", jr.propTypes = {
|
|
4498
4555
|
as: $.default.elementType,
|
|
4499
|
-
gap: $.default.oneOf(
|
|
4500
|
-
align: $.default.oneOf(
|
|
4556
|
+
gap: $.default.oneOf(Mn),
|
|
4557
|
+
align: $.default.oneOf(Nn),
|
|
4501
4558
|
className: $.default.string,
|
|
4502
4559
|
children: $.default.node
|
|
4503
4560
|
};
|
|
4504
4561
|
//#endregion
|
|
4505
4562
|
//#region src/components/Snackbar/Snackbar.jsx
|
|
4506
|
-
var
|
|
4563
|
+
var Mr = ({ severity: e }) => {
|
|
4507
4564
|
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" })] });
|
|
4508
4565
|
return /* @__PURE__ */ m("svg", {
|
|
4509
4566
|
viewBox: "0 0 20 20",
|
|
@@ -4520,23 +4577,23 @@ var Or = ({ severity: e }) => {
|
|
|
4520
4577
|
}), t]
|
|
4521
4578
|
});
|
|
4522
4579
|
};
|
|
4523
|
-
function
|
|
4580
|
+
function Nr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r = "", severity: i = "info", variant: a = "standard", autoHideDuration: s = 6e3, anchorOrigin: c = {
|
|
4524
4581
|
vertical: "bottom",
|
|
4525
4582
|
horizontal: "left"
|
|
4526
4583
|
}, action: l = "", closable: u = !0, showIcon: f = !0, showProgress: g = !1, onClose: _ = () => {}, onUpdateModelValue: v, onAction: y = () => {}, children: b }) {
|
|
4527
|
-
let x = t !== void 0, [
|
|
4584
|
+
let { messages: x } = q(), S = t !== void 0, [C, w] = d(S ? t : e), [T, E] = d(100);
|
|
4528
4585
|
o(() => {
|
|
4529
|
-
let n =
|
|
4530
|
-
|
|
4586
|
+
let n = S ? t : e;
|
|
4587
|
+
w(n), n && E(100);
|
|
4531
4588
|
}, [e, t]), o(() => {
|
|
4532
|
-
if (!
|
|
4589
|
+
if (!C || s <= 0) return;
|
|
4533
4590
|
let e = Date.now(), t = setTimeout(() => {
|
|
4534
|
-
|
|
4591
|
+
D();
|
|
4535
4592
|
}, s);
|
|
4536
4593
|
if (g) {
|
|
4537
4594
|
let n = setInterval(() => {
|
|
4538
4595
|
let t = Date.now() - e, r = Math.max(0, 100 - t / s * 100);
|
|
4539
|
-
|
|
4596
|
+
E(r), r <= 0 && clearInterval(n);
|
|
4540
4597
|
}, 50);
|
|
4541
4598
|
return () => {
|
|
4542
4599
|
clearTimeout(t), clearInterval(n);
|
|
@@ -4544,34 +4601,34 @@ function kr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4544
4601
|
}
|
|
4545
4602
|
return () => clearTimeout(t);
|
|
4546
4603
|
}, [
|
|
4547
|
-
|
|
4604
|
+
C,
|
|
4548
4605
|
s,
|
|
4549
4606
|
g
|
|
4550
4607
|
]);
|
|
4551
|
-
let
|
|
4552
|
-
|
|
4553
|
-
},
|
|
4608
|
+
let D = () => {
|
|
4609
|
+
S ? v?.(!1) : w(!1), _();
|
|
4610
|
+
}, O = () => {
|
|
4554
4611
|
y();
|
|
4555
4612
|
};
|
|
4556
|
-
if (!
|
|
4557
|
-
let
|
|
4613
|
+
if (!C) return null;
|
|
4614
|
+
let k = [
|
|
4558
4615
|
"wc-snackbar",
|
|
4559
4616
|
`wc-snackbar--${a}`,
|
|
4560
4617
|
`wc-snackbar--${i}`
|
|
4561
|
-
],
|
|
4618
|
+
], A = {
|
|
4562
4619
|
position: "fixed",
|
|
4563
4620
|
zIndex: 1400
|
|
4564
|
-
}, { vertical:
|
|
4565
|
-
return
|
|
4566
|
-
className:
|
|
4567
|
-
style:
|
|
4621
|
+
}, { vertical: j, horizontal: M } = c;
|
|
4622
|
+
return j === "top" ? A.top = "20px" : A.bottom = "20px", M === "left" ? A.left = "20px" : M === "right" ? A.right = "20px" : (A.left = "50%", A.transform = "translateX(-50%)"), h(/* @__PURE__ */ m("div", {
|
|
4623
|
+
className: k.join(" "),
|
|
4624
|
+
style: A,
|
|
4568
4625
|
role: "alert",
|
|
4569
4626
|
"aria-live": "assertive",
|
|
4570
4627
|
"aria-atomic": "true",
|
|
4571
4628
|
children: [
|
|
4572
4629
|
f && /* @__PURE__ */ p("div", {
|
|
4573
4630
|
className: "wc-snackbar__icon",
|
|
4574
|
-
children: /* @__PURE__ */ p(
|
|
4631
|
+
children: /* @__PURE__ */ p(Mr, { severity: i })
|
|
4575
4632
|
}),
|
|
4576
4633
|
/* @__PURE__ */ m("div", {
|
|
4577
4634
|
className: "wc-snackbar__content",
|
|
@@ -4588,15 +4645,15 @@ function kr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4588
4645
|
children: b?.action || /* @__PURE__ */ p("button", {
|
|
4589
4646
|
type: "button",
|
|
4590
4647
|
className: "wc-snackbar__action",
|
|
4591
|
-
onClick:
|
|
4648
|
+
onClick: O,
|
|
4592
4649
|
children: l
|
|
4593
4650
|
})
|
|
4594
4651
|
}),
|
|
4595
4652
|
u && /* @__PURE__ */ p("button", {
|
|
4596
4653
|
type: "button",
|
|
4597
4654
|
className: "wc-snackbar__close",
|
|
4598
|
-
"aria-label":
|
|
4599
|
-
onClick:
|
|
4655
|
+
"aria-label": x.close,
|
|
4656
|
+
onClick: D,
|
|
4600
4657
|
children: /* @__PURE__ */ p("svg", {
|
|
4601
4658
|
viewBox: "0 0 20 20",
|
|
4602
4659
|
fill: "none",
|
|
@@ -4611,15 +4668,15 @@ function kr({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4611
4668
|
className: "wc-snackbar__progress",
|
|
4612
4669
|
children: /* @__PURE__ */ p("div", {
|
|
4613
4670
|
className: "wc-snackbar__progress-bar",
|
|
4614
|
-
style: { width: `${
|
|
4671
|
+
style: { width: `${T}%` }
|
|
4615
4672
|
})
|
|
4616
4673
|
})
|
|
4617
4674
|
]
|
|
4618
4675
|
}), document.body);
|
|
4619
4676
|
}
|
|
4620
4677
|
//#endregion
|
|
4621
|
-
//#region
|
|
4622
|
-
var
|
|
4678
|
+
//#region src/components/Status/utils.js
|
|
4679
|
+
var Pr = [
|
|
4623
4680
|
"default",
|
|
4624
4681
|
"success",
|
|
4625
4682
|
"error",
|
|
@@ -4628,7 +4685,7 @@ var Ar = [
|
|
|
4628
4685
|
"pending",
|
|
4629
4686
|
"processing",
|
|
4630
4687
|
"cancelled"
|
|
4631
|
-
],
|
|
4688
|
+
], Fr = [
|
|
4632
4689
|
"auto",
|
|
4633
4690
|
"pulse",
|
|
4634
4691
|
"spin",
|
|
@@ -4638,7 +4695,7 @@ var Ar = [
|
|
|
4638
4695
|
"breathe",
|
|
4639
4696
|
"ripple",
|
|
4640
4697
|
"glow"
|
|
4641
|
-
],
|
|
4698
|
+
], Ir = {
|
|
4642
4699
|
default: {
|
|
4643
4700
|
text: "默认",
|
|
4644
4701
|
color: "var(--wc-text-tertiary)"
|
|
@@ -4672,29 +4729,29 @@ var Ar = [
|
|
|
4672
4729
|
color: "var(--wc-text-disabled)"
|
|
4673
4730
|
}
|
|
4674
4731
|
};
|
|
4675
|
-
function
|
|
4676
|
-
return
|
|
4732
|
+
function Lr(e) {
|
|
4733
|
+
return Pr.includes(e);
|
|
4677
4734
|
}
|
|
4678
|
-
function
|
|
4679
|
-
return
|
|
4735
|
+
function Rr(e) {
|
|
4736
|
+
return Lr(e) ? e : "default";
|
|
4680
4737
|
}
|
|
4681
|
-
function
|
|
4682
|
-
let o =
|
|
4738
|
+
function zr({ status: e, size: t, showText: n, animated: r, animationType: i = "auto", className: a }) {
|
|
4739
|
+
let o = Rr(e), s = [
|
|
4683
4740
|
"wc-status",
|
|
4684
4741
|
`wc-status--${o}`,
|
|
4685
4742
|
`wc-status--${t}`
|
|
4686
4743
|
];
|
|
4687
4744
|
if (n && s.push("wc-status--with-text"), r) {
|
|
4688
|
-
let e =
|
|
4745
|
+
let e = Vr(o, i);
|
|
4689
4746
|
s.push("wc-status--animated", `wc-status--${e}`);
|
|
4690
4747
|
}
|
|
4691
4748
|
return a && s.push(a), s.filter(Boolean).join(" ");
|
|
4692
4749
|
}
|
|
4693
|
-
function
|
|
4694
|
-
return
|
|
4750
|
+
function Br(e) {
|
|
4751
|
+
return Ir[e]?.text || Ir.default.text;
|
|
4695
4752
|
}
|
|
4696
|
-
function
|
|
4697
|
-
return t !== "auto" &&
|
|
4753
|
+
function Vr(e, t = "auto") {
|
|
4754
|
+
return t !== "auto" && Fr.includes(t) ? t : {
|
|
4698
4755
|
processing: "spin",
|
|
4699
4756
|
pending: "pulse",
|
|
4700
4757
|
success: "bounce",
|
|
@@ -4707,17 +4764,18 @@ function Lr(e, t = "auto") {
|
|
|
4707
4764
|
}
|
|
4708
4765
|
//#endregion
|
|
4709
4766
|
//#region src/components/Status/Status.jsx
|
|
4710
|
-
var
|
|
4711
|
-
let s =
|
|
4767
|
+
var Hr = ({ status: e = "default", size: t = "md", showText: n = !1, animated: r = !1, animationType: i = "auto", className: a = "", ...o }) => {
|
|
4768
|
+
let s = zr({
|
|
4712
4769
|
status: e,
|
|
4713
4770
|
size: t,
|
|
4714
4771
|
showText: n,
|
|
4715
4772
|
animated: r,
|
|
4716
4773
|
animationType: i,
|
|
4717
4774
|
className: a
|
|
4718
|
-
}), c =
|
|
4775
|
+
}), c = Br(e);
|
|
4719
4776
|
return /* @__PURE__ */ p("span", {
|
|
4720
4777
|
className: s,
|
|
4778
|
+
role: "status",
|
|
4721
4779
|
title: c,
|
|
4722
4780
|
"aria-label": c,
|
|
4723
4781
|
...o,
|
|
@@ -4727,11 +4785,11 @@ var Rr = ({ status: e = "default", size: t = "md", showText: n = !1, animated: r
|
|
|
4727
4785
|
})
|
|
4728
4786
|
});
|
|
4729
4787
|
};
|
|
4730
|
-
|
|
4788
|
+
Hr.displayName = "Status";
|
|
4731
4789
|
//#endregion
|
|
4732
4790
|
//#region src/components/Switch/Switch.jsx
|
|
4733
|
-
var
|
|
4734
|
-
let d =
|
|
4791
|
+
var Ur = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", disabled: i = !1, required: a = !1, color: o = "primary", size: c = "md", className: l = "", ...u }) => {
|
|
4792
|
+
let { messages: d } = q(), f = s(), h = `${f}-input`, g = [
|
|
4735
4793
|
"primary",
|
|
4736
4794
|
"success",
|
|
4737
4795
|
"warning",
|
|
@@ -4740,24 +4798,24 @@ var zr = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", di
|
|
|
4740
4798
|
"orange",
|
|
4741
4799
|
"cyan",
|
|
4742
4800
|
"pink"
|
|
4743
|
-
].includes(o) ? o : "primary",
|
|
4801
|
+
].includes(o) ? o : "primary", _ = [
|
|
4744
4802
|
"sm",
|
|
4745
4803
|
"md",
|
|
4746
4804
|
"lg"
|
|
4747
|
-
].includes(c) ? c : "md",
|
|
4805
|
+
].includes(c) ? c : "md", v = [
|
|
4748
4806
|
"wc-switch",
|
|
4749
|
-
`wc-switch--${
|
|
4750
|
-
|
|
4807
|
+
`wc-switch--${g}`,
|
|
4808
|
+
_ !== "md" && `wc-switch--${_}`,
|
|
4751
4809
|
i && "wc-switch--disabled",
|
|
4752
4810
|
l
|
|
4753
|
-
].filter(Boolean).join(" "),
|
|
4811
|
+
].filter(Boolean).join(" "), y = (e) => {
|
|
4754
4812
|
i || !t || t(e.target.checked);
|
|
4755
4813
|
};
|
|
4756
4814
|
return /* @__PURE__ */ m("div", {
|
|
4757
4815
|
className: "wc-switch-wrapper",
|
|
4758
4816
|
children: [n && /* @__PURE__ */ m("label", {
|
|
4759
|
-
id:
|
|
4760
|
-
htmlFor:
|
|
4817
|
+
id: f,
|
|
4818
|
+
htmlFor: h,
|
|
4761
4819
|
className: "wc-switch__label",
|
|
4762
4820
|
children: [n, a && /* @__PURE__ */ p("span", {
|
|
4763
4821
|
className: "wc-switch__required",
|
|
@@ -4766,19 +4824,20 @@ var zr = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", di
|
|
|
4766
4824
|
}), /* @__PURE__ */ m("div", {
|
|
4767
4825
|
className: "wc-switch__container",
|
|
4768
4826
|
children: [/* @__PURE__ */ m("label", {
|
|
4769
|
-
className:
|
|
4827
|
+
className: v,
|
|
4770
4828
|
"aria-disabled": i,
|
|
4771
4829
|
children: [/* @__PURE__ */ p("input", {
|
|
4772
4830
|
type: "checkbox",
|
|
4773
|
-
id:
|
|
4831
|
+
id: h,
|
|
4774
4832
|
className: "wc-switch__input",
|
|
4775
4833
|
checked: e,
|
|
4776
4834
|
disabled: i,
|
|
4777
|
-
"aria-labelledby": n ?
|
|
4835
|
+
"aria-labelledby": n ? f : void 0,
|
|
4836
|
+
"aria-label": n ? void 0 : d.switchControl,
|
|
4778
4837
|
"aria-checked": e,
|
|
4779
4838
|
required: a,
|
|
4780
4839
|
role: "switch",
|
|
4781
|
-
onChange:
|
|
4840
|
+
onChange: y,
|
|
4782
4841
|
...u
|
|
4783
4842
|
}), /* @__PURE__ */ p("span", {
|
|
4784
4843
|
className: "wc-switch__track",
|
|
@@ -4791,20 +4850,20 @@ var zr = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", di
|
|
|
4791
4850
|
})]
|
|
4792
4851
|
});
|
|
4793
4852
|
};
|
|
4794
|
-
|
|
4853
|
+
Ur.displayName = "Switch";
|
|
4795
4854
|
//#endregion
|
|
4796
4855
|
//#region src/components/Table/Table.jsx
|
|
4797
|
-
var
|
|
4856
|
+
var Wr = n({
|
|
4798
4857
|
size: "md",
|
|
4799
4858
|
dense: !1,
|
|
4800
4859
|
hover: !1,
|
|
4801
4860
|
striped: !1
|
|
4802
|
-
}),
|
|
4861
|
+
}), Gr = ({ size: e = "md", stickyHeader: t = !1, dense: n = !1, hover: r = !1, striped: i = !1, children: a, className: o = "", ...s }) => /* @__PURE__ */ p("div", {
|
|
4803
4862
|
className: `wc-table-container${t ? " wc-table-container--sticky" : ""} ${o}`,
|
|
4804
4863
|
...s,
|
|
4805
4864
|
children: /* @__PURE__ */ p("table", {
|
|
4806
4865
|
className: `wc-table wc-table--${e}${r ? " wc-table--hover" : ""}${i ? " wc-table--striped" : ""}${n ? " wc-table--dense" : ""}`,
|
|
4807
|
-
children: /* @__PURE__ */ p(
|
|
4866
|
+
children: /* @__PURE__ */ p(Wr.Provider, {
|
|
4808
4867
|
value: {
|
|
4809
4868
|
size: e,
|
|
4810
4869
|
dense: n,
|
|
@@ -4816,24 +4875,24 @@ var Br = n({
|
|
|
4816
4875
|
})
|
|
4817
4876
|
})
|
|
4818
4877
|
});
|
|
4819
|
-
|
|
4820
|
-
var
|
|
4821
|
-
let { stickyHeader: r } = a(
|
|
4878
|
+
Gr.displayName = "Table";
|
|
4879
|
+
var Kr = ({ children: e, className: t = "", ...n }) => {
|
|
4880
|
+
let { stickyHeader: r } = a(Wr);
|
|
4822
4881
|
return /* @__PURE__ */ p("thead", {
|
|
4823
4882
|
className: `wc-table-head${r ? " wc-table-head--sticky" : ""} ${t}`,
|
|
4824
4883
|
...n,
|
|
4825
4884
|
children: e
|
|
4826
4885
|
});
|
|
4827
4886
|
};
|
|
4828
|
-
|
|
4829
|
-
var
|
|
4887
|
+
Kr.displayName = "TableHead";
|
|
4888
|
+
var qr = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ p("tbody", {
|
|
4830
4889
|
className: `wc-table-body ${t}`,
|
|
4831
4890
|
...n,
|
|
4832
4891
|
children: e
|
|
4833
4892
|
});
|
|
4834
|
-
|
|
4835
|
-
var
|
|
4836
|
-
let c = a(
|
|
4893
|
+
qr.displayName = "TableBody";
|
|
4894
|
+
var Jr = ({ hover: e, selected: t = !1, clickable: n = !1, children: r, className: i = "", onClick: o, ...s }) => {
|
|
4895
|
+
let c = a(Wr);
|
|
4837
4896
|
return /* @__PURE__ */ p("tr", {
|
|
4838
4897
|
className: [
|
|
4839
4898
|
"wc-table-row",
|
|
@@ -4847,9 +4906,9 @@ var Wr = ({ hover: e, selected: t = !1, clickable: n = !1, children: r, classNam
|
|
|
4847
4906
|
children: r
|
|
4848
4907
|
});
|
|
4849
4908
|
};
|
|
4850
|
-
|
|
4851
|
-
var
|
|
4852
|
-
let d = a(
|
|
4909
|
+
Jr.displayName = "TableRow";
|
|
4910
|
+
var Yr = ({ component: e = "td", align: t = "inherit", padding: n = "normal", size: r, sortDirection: i = !1, variant: o = "body", scope: s, children: c, className: l = "", ...u }) => {
|
|
4911
|
+
let d = a(Wr), f = r || (d.dense ? "small" : "medium");
|
|
4853
4912
|
return /* @__PURE__ */ p(e, {
|
|
4854
4913
|
className: [
|
|
4855
4914
|
"wc-table-cell",
|
|
@@ -4866,29 +4925,29 @@ var Gr = ({ component: e = "td", align: t = "inherit", padding: n = "normal", si
|
|
|
4866
4925
|
children: c
|
|
4867
4926
|
});
|
|
4868
4927
|
};
|
|
4869
|
-
|
|
4870
|
-
var
|
|
4871
|
-
Head:
|
|
4872
|
-
Body:
|
|
4873
|
-
Row:
|
|
4874
|
-
Cell:
|
|
4875
|
-
}),
|
|
4876
|
-
let l = s(),
|
|
4928
|
+
Yr.displayName = "TableCell";
|
|
4929
|
+
var Xr = Object.assign(Gr, {
|
|
4930
|
+
Head: Kr,
|
|
4931
|
+
Body: qr,
|
|
4932
|
+
Row: Jr,
|
|
4933
|
+
Cell: Yr
|
|
4934
|
+
}), Zr = ({ tabs: e = [], activeIndex: t, onChange: n, variant: r = "default", children: i, className: a = "", ...c }) => {
|
|
4935
|
+
let l = s(), { messages: u } = q(), [f, h] = d(t || 0), g = t !== void 0, _ = g ? t : f;
|
|
4877
4936
|
o(() => {
|
|
4878
|
-
|
|
4879
|
-
}, [t,
|
|
4880
|
-
let
|
|
4937
|
+
g && h(t);
|
|
4938
|
+
}, [t, g]);
|
|
4939
|
+
let v = [
|
|
4881
4940
|
"wc-tabs",
|
|
4882
4941
|
r === "pills" && "wc-tabs--pills",
|
|
4883
4942
|
r === "underline" && "wc-tabs--underline",
|
|
4884
4943
|
(r === "default" || !["pills", "underline"].includes(r)) && "wc-tabs--default",
|
|
4885
4944
|
a
|
|
4886
|
-
].filter(Boolean).join(" "),
|
|
4945
|
+
].filter(Boolean).join(" "), y = (e, t) => {
|
|
4887
4946
|
let n = ["wc-tab"];
|
|
4888
|
-
return
|
|
4889
|
-
},
|
|
4890
|
-
t.disabled || (
|
|
4891
|
-
},
|
|
4947
|
+
return _ === e && n.push("wc-tab--active"), n.join(" ");
|
|
4948
|
+
}, b = (e, t) => {
|
|
4949
|
+
t.disabled || (g || h(e), n && n(e, t));
|
|
4950
|
+
}, x = e[_], S = (t, n) => {
|
|
4892
4951
|
if (![
|
|
4893
4952
|
"ArrowLeft",
|
|
4894
4953
|
"ArrowRight",
|
|
@@ -4899,25 +4958,25 @@ var Kr = Object.assign(Vr, {
|
|
|
4899
4958
|
let r = e.map((e, t) => e.disabled ? -1 : t).filter((e) => e >= 0);
|
|
4900
4959
|
if (!r.length) return;
|
|
4901
4960
|
let i = r.indexOf(n), a;
|
|
4902
|
-
a = t.key === "Home" ? r[0] : t.key === "End" ? r[r.length - 1] : t.key === "ArrowRight" ? r[(i + 1) % r.length] : r[(i - 1 + r.length) % r.length],
|
|
4961
|
+
a = t.key === "Home" ? r[0] : t.key === "End" ? r[r.length - 1] : t.key === "ArrowRight" ? r[(i + 1) % r.length] : r[(i - 1 + r.length) % r.length], b(a, e[a]), t.currentTarget.parentElement?.querySelectorAll("[role=\"tab\"]")[a]?.focus();
|
|
4903
4962
|
};
|
|
4904
4963
|
return /* @__PURE__ */ m("div", {
|
|
4905
4964
|
className: "wc-tabs-wrapper",
|
|
4906
4965
|
...c,
|
|
4907
4966
|
children: [/* @__PURE__ */ p("div", {
|
|
4908
|
-
className:
|
|
4967
|
+
className: v,
|
|
4909
4968
|
role: "tablist",
|
|
4910
|
-
"aria-label":
|
|
4969
|
+
"aria-label": u.tabList,
|
|
4911
4970
|
children: e.map((e, t) => /* @__PURE__ */ p("button", {
|
|
4912
|
-
className:
|
|
4913
|
-
onClick: () =>
|
|
4914
|
-
onKeyDown: (e) =>
|
|
4971
|
+
className: y(t, e.disabled),
|
|
4972
|
+
onClick: () => b(t, e),
|
|
4973
|
+
onKeyDown: (e) => S(e, t),
|
|
4915
4974
|
disabled: e.disabled,
|
|
4916
4975
|
id: `${l}-tab-${t}`,
|
|
4917
4976
|
role: "tab",
|
|
4918
|
-
"aria-selected":
|
|
4977
|
+
"aria-selected": _ === t,
|
|
4919
4978
|
"aria-controls": `${l}-panel`,
|
|
4920
|
-
tabIndex:
|
|
4979
|
+
tabIndex: _ === t ? 0 : -1,
|
|
4921
4980
|
type: "button",
|
|
4922
4981
|
children: e.title
|
|
4923
4982
|
}, e.key || t))
|
|
@@ -4925,18 +4984,18 @@ var Kr = Object.assign(Vr, {
|
|
|
4925
4984
|
id: `${l}-panel`,
|
|
4926
4985
|
className: "wc-tab-content",
|
|
4927
4986
|
role: "tabpanel",
|
|
4928
|
-
"aria-labelledby": `${l}-tab-${
|
|
4987
|
+
"aria-labelledby": `${l}-tab-${_}`,
|
|
4929
4988
|
children: typeof i == "function" ? i({
|
|
4930
|
-
activeTab:
|
|
4931
|
-
activeIndex:
|
|
4989
|
+
activeTab: x,
|
|
4990
|
+
activeIndex: _
|
|
4932
4991
|
}) : i
|
|
4933
4992
|
})]
|
|
4934
4993
|
});
|
|
4935
4994
|
};
|
|
4936
|
-
|
|
4995
|
+
Zr.displayName = "Tabs";
|
|
4937
4996
|
//#endregion
|
|
4938
4997
|
//#region src/components/TextField/TextField.jsx
|
|
4939
|
-
var
|
|
4998
|
+
var Qr = ({ 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 }) => {
|
|
4940
4999
|
let [z, B] = d(!1), [V, H] = d(!!e);
|
|
4941
5000
|
o(() => {
|
|
4942
5001
|
H(!!e);
|
|
@@ -4957,13 +5016,13 @@ var Jr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
4957
5016
|
}, re = () => {
|
|
4958
5017
|
let e = ["wc-textfield__label"];
|
|
4959
5018
|
return e.push(`wc-textfield__label--${x}`), s && e.push("wc-textfield__label--error"), z && e.push("wc-textfield__label--focused"), e.filter(Boolean).join(" ");
|
|
4960
|
-
},
|
|
5019
|
+
}, G = g ? "textarea" : "input", K = A || k || `textfield-${Math.random().toString(36).substr(2, 9)}`, q = !!s;
|
|
4961
5020
|
return /* @__PURE__ */ m("div", {
|
|
4962
5021
|
className: te(),
|
|
4963
5022
|
style: M,
|
|
4964
5023
|
children: [
|
|
4965
5024
|
r && /* @__PURE__ */ m("label", {
|
|
4966
|
-
htmlFor:
|
|
5025
|
+
htmlFor: K,
|
|
4967
5026
|
className: re(),
|
|
4968
5027
|
children: [r, c && /* @__PURE__ */ p("span", {
|
|
4969
5028
|
className: "wc-textfield__required",
|
|
@@ -4977,9 +5036,9 @@ var Jr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
4977
5036
|
className: "wc-textfield__adornment wc-textfield__adornment--start",
|
|
4978
5037
|
children: C
|
|
4979
5038
|
}),
|
|
4980
|
-
/* @__PURE__ */ p(
|
|
5039
|
+
/* @__PURE__ */ p(G, {
|
|
4981
5040
|
className: g ? "wc-textfield__input wc-textfield__textarea" : "wc-textfield__input",
|
|
4982
|
-
id:
|
|
5041
|
+
id: K,
|
|
4983
5042
|
type: g ? void 0 : n,
|
|
4984
5043
|
value: e,
|
|
4985
5044
|
onChange: U,
|
|
@@ -5001,9 +5060,9 @@ var Jr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
5001
5060
|
name: k,
|
|
5002
5061
|
...R
|
|
5003
5062
|
}),
|
|
5004
|
-
(w ||
|
|
5063
|
+
(w || q) && /* @__PURE__ */ m("div", {
|
|
5005
5064
|
className: "wc-textfield__adornment wc-textfield__adornment--end",
|
|
5006
|
-
children: [
|
|
5065
|
+
children: [q && /* @__PURE__ */ p("svg", {
|
|
5007
5066
|
className: "wc-textfield__error-icon",
|
|
5008
5067
|
fill: "currentColor",
|
|
5009
5068
|
viewBox: "0 0 20 20",
|
|
@@ -5016,46 +5075,46 @@ var Jr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
5016
5075
|
})
|
|
5017
5076
|
]
|
|
5018
5077
|
}),
|
|
5019
|
-
(a ||
|
|
5020
|
-
className: `wc-textfield__helper-text ${
|
|
5021
|
-
children:
|
|
5078
|
+
(a || q) && /* @__PURE__ */ p("div", {
|
|
5079
|
+
className: `wc-textfield__helper-text ${q ? "wc-textfield__helper-text--error" : ""}`,
|
|
5080
|
+
children: q ? s : a
|
|
5022
5081
|
})
|
|
5023
5082
|
]
|
|
5024
5083
|
});
|
|
5025
5084
|
};
|
|
5026
|
-
|
|
5085
|
+
Qr.displayName = "TextField";
|
|
5027
5086
|
//#endregion
|
|
5028
|
-
//#region
|
|
5029
|
-
var
|
|
5087
|
+
//#region src/components/Toolbar/utils.js
|
|
5088
|
+
var $r = (e, t, n = "") => {
|
|
5030
5089
|
let r = ["flex items-center w-full"];
|
|
5031
5090
|
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(" ");
|
|
5032
|
-
},
|
|
5033
|
-
className:
|
|
5091
|
+
}, ei = ({ children: e, variant: t = "regular", disableGutters: n = !1, className: r = "", style: i = {}, ...a }) => /* @__PURE__ */ p("div", {
|
|
5092
|
+
className: $r(t, n, r),
|
|
5034
5093
|
style: i,
|
|
5035
5094
|
...a,
|
|
5036
5095
|
children: e
|
|
5037
|
-
}),
|
|
5096
|
+
}), ti = {
|
|
5038
5097
|
top: "wc-tooltip--top",
|
|
5039
5098
|
bottom: "wc-tooltip--bottom",
|
|
5040
5099
|
left: "wc-tooltip--left",
|
|
5041
5100
|
right: "wc-tooltip--right"
|
|
5042
|
-
},
|
|
5101
|
+
}, ni = [
|
|
5043
5102
|
"top",
|
|
5044
5103
|
"bottom",
|
|
5045
5104
|
"left",
|
|
5046
5105
|
"right"
|
|
5047
5106
|
];
|
|
5048
|
-
function
|
|
5049
|
-
return
|
|
5107
|
+
function ri(e) {
|
|
5108
|
+
return ni.includes(e);
|
|
5050
5109
|
}
|
|
5051
|
-
function
|
|
5052
|
-
return
|
|
5110
|
+
function ii(e) {
|
|
5111
|
+
return ti[e] || ti.top;
|
|
5053
5112
|
}
|
|
5054
5113
|
//#endregion
|
|
5055
5114
|
//#region src/components/Tooltip/Tooltip.jsx
|
|
5056
|
-
function
|
|
5057
|
-
|
|
5058
|
-
let [i, a] = d(!1), o = s(), c = u(null), l = u(null), f =
|
|
5115
|
+
function ai({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
5116
|
+
ri(t) || console.warn(`Invalid tooltip placement: ${t}. Using 'top' as default.`);
|
|
5117
|
+
let [i, a] = d(!1), o = s(), c = u(null), l = u(null), f = ii(ce({
|
|
5059
5118
|
open: i,
|
|
5060
5119
|
anchorRef: c,
|
|
5061
5120
|
floatingRef: l,
|
|
@@ -5074,7 +5133,7 @@ function ti({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
|
5074
5133
|
onMouseLeave: g,
|
|
5075
5134
|
onFocus: h,
|
|
5076
5135
|
onBlur: g,
|
|
5077
|
-
children: [n, i && /* @__PURE__ */ p(
|
|
5136
|
+
children: [n, i && /* @__PURE__ */ p(oe, { children: /* @__PURE__ */ p("div", {
|
|
5078
5137
|
ref: l,
|
|
5079
5138
|
id: o,
|
|
5080
5139
|
className: `wc-tooltip ${f}`,
|
|
@@ -5084,8 +5143,8 @@ function ti({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
|
5084
5143
|
});
|
|
5085
5144
|
}
|
|
5086
5145
|
//#endregion
|
|
5087
|
-
//#region
|
|
5088
|
-
var
|
|
5146
|
+
//#region src/components/Typography/utils.js
|
|
5147
|
+
var oi = {
|
|
5089
5148
|
h1: "h1",
|
|
5090
5149
|
h2: "h2",
|
|
5091
5150
|
h3: "h3",
|
|
@@ -5099,7 +5158,7 @@ var ni = {
|
|
|
5099
5158
|
caption: "span",
|
|
5100
5159
|
overline: "span",
|
|
5101
5160
|
button: "span"
|
|
5102
|
-
},
|
|
5161
|
+
}, si = {
|
|
5103
5162
|
h1: "wc-typography--h1",
|
|
5104
5163
|
h2: "wc-typography--h2",
|
|
5105
5164
|
h3: "wc-typography--h3",
|
|
@@ -5113,7 +5172,7 @@ var ni = {
|
|
|
5113
5172
|
caption: "wc-typography--caption",
|
|
5114
5173
|
overline: "wc-typography--overline",
|
|
5115
5174
|
button: "wc-typography--button"
|
|
5116
|
-
},
|
|
5175
|
+
}, ci = {
|
|
5117
5176
|
inherit: "wc-typography--color-inherit",
|
|
5118
5177
|
primary: "wc-typography--color-primary",
|
|
5119
5178
|
secondary: "wc-typography--color-secondary",
|
|
@@ -5123,12 +5182,12 @@ var ni = {
|
|
|
5123
5182
|
textPrimary: "wc-typography--color-text-primary",
|
|
5124
5183
|
textSecondary: "wc-typography--color-text-secondary",
|
|
5125
5184
|
textDisabled: "wc-typography--color-text-disabled"
|
|
5126
|
-
},
|
|
5185
|
+
}, li = {
|
|
5127
5186
|
left: "wc-typography--align-left",
|
|
5128
5187
|
center: "wc-typography--align-center",
|
|
5129
5188
|
right: "wc-typography--align-right",
|
|
5130
5189
|
justify: "wc-typography--align-justify"
|
|
5131
|
-
},
|
|
5190
|
+
}, ui = {
|
|
5132
5191
|
h1: "1.2",
|
|
5133
5192
|
h2: "1.2",
|
|
5134
5193
|
h3: "1.3",
|
|
@@ -5143,15 +5202,15 @@ var ni = {
|
|
|
5143
5202
|
overline: "1.4",
|
|
5144
5203
|
button: "1.4"
|
|
5145
5204
|
};
|
|
5146
|
-
function
|
|
5147
|
-
return t ||
|
|
5205
|
+
function di(e, t) {
|
|
5206
|
+
return t || oi[e] || "p";
|
|
5148
5207
|
}
|
|
5149
|
-
function
|
|
5208
|
+
function fi(e, t, n, r, i, a = "") {
|
|
5150
5209
|
return [
|
|
5151
5210
|
"wc-typography",
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
n === "inherit" ? null :
|
|
5211
|
+
si[e],
|
|
5212
|
+
ci[t],
|
|
5213
|
+
n === "inherit" ? null : li[n],
|
|
5155
5214
|
r ? "wc-typography--gutter-bottom" : null,
|
|
5156
5215
|
i ? "wc-typography--no-wrap" : null,
|
|
5157
5216
|
a
|
|
@@ -5159,19 +5218,19 @@ function ci(e, t, n, r, i, a = "") {
|
|
|
5159
5218
|
}
|
|
5160
5219
|
//#endregion
|
|
5161
5220
|
//#region src/components/Typography/Typography.jsx
|
|
5162
|
-
var
|
|
5163
|
-
className:
|
|
5221
|
+
var pi = ({ 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(di(e, t), {
|
|
5222
|
+
className: fi(e, n, r, i, a, s),
|
|
5164
5223
|
style: {
|
|
5165
|
-
lineHeight:
|
|
5224
|
+
lineHeight: ui[e],
|
|
5166
5225
|
...c
|
|
5167
5226
|
},
|
|
5168
5227
|
...l,
|
|
5169
5228
|
children: o
|
|
5170
5229
|
});
|
|
5171
|
-
|
|
5230
|
+
pi.displayName = "Typography";
|
|
5172
5231
|
//#endregion
|
|
5173
|
-
//#region
|
|
5174
|
-
var
|
|
5232
|
+
//#region src/components/TypingText/utils.js
|
|
5233
|
+
var mi = class {
|
|
5175
5234
|
constructor(e, t = {}) {
|
|
5176
5235
|
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 || (() => {});
|
|
5177
5236
|
}
|
|
@@ -5192,9 +5251,9 @@ var ui = class {
|
|
|
5192
5251
|
updateText(e) {
|
|
5193
5252
|
this.text = e, this.reset(), this.start();
|
|
5194
5253
|
}
|
|
5195
|
-
},
|
|
5254
|
+
}, hi = ({ 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 }) => {
|
|
5196
5255
|
let [f, h] = d(""), g = u(null);
|
|
5197
|
-
return o(() => (g.current = new
|
|
5256
|
+
return o(() => (g.current = new mi(e, {
|
|
5198
5257
|
speed: t,
|
|
5199
5258
|
pause: n,
|
|
5200
5259
|
loop: r,
|
|
@@ -5218,29 +5277,29 @@ var ui = class {
|
|
|
5218
5277
|
}), a && /* @__PURE__ */ p("span", { className: "typing-cursor" })]
|
|
5219
5278
|
});
|
|
5220
5279
|
};
|
|
5221
|
-
|
|
5280
|
+
hi.displayName = "TypingText";
|
|
5222
5281
|
//#endregion
|
|
5223
5282
|
//#region src/components/Input/VerificationCodeInput.jsx
|
|
5224
|
-
var
|
|
5225
|
-
let c = u([]);
|
|
5283
|
+
var gi = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus: i = !1, className: a = "", ...s }) => {
|
|
5284
|
+
let { messages: c } = q(), l = u([]);
|
|
5226
5285
|
o(() => {
|
|
5227
5286
|
typeof t == "string" && t.split("").forEach((e, t) => {
|
|
5228
|
-
|
|
5287
|
+
l.current[t] && (l.current[t].value = e);
|
|
5229
5288
|
});
|
|
5230
5289
|
}, [t]), o(() => {
|
|
5231
|
-
i &&
|
|
5290
|
+
i && l.current[0] && l.current[0].focus();
|
|
5232
5291
|
}, [i]);
|
|
5233
|
-
let
|
|
5234
|
-
let t =
|
|
5292
|
+
let d = (e) => {
|
|
5293
|
+
let t = l.current[e];
|
|
5235
5294
|
t && t.focus();
|
|
5236
|
-
},
|
|
5295
|
+
}, f = () => l.current.map((e) => e ? e.value : "").join(""), m = (t) => (i) => {
|
|
5237
5296
|
let a = i.target.value.replace(/[^0-9a-zA-Z]/g, "");
|
|
5238
5297
|
i.target.value = a.toUpperCase();
|
|
5239
|
-
let o =
|
|
5240
|
-
n?.(o), a && t < e - 1 &&
|
|
5241
|
-
},
|
|
5242
|
-
t.key === "Backspace" && !t.target.value && e > 0 && (t.preventDefault(),
|
|
5243
|
-
},
|
|
5298
|
+
let o = f();
|
|
5299
|
+
n?.(o), a && t < e - 1 && d(t + 1), o.length === e && r?.(o);
|
|
5300
|
+
}, h = (e) => (t) => {
|
|
5301
|
+
t.key === "Backspace" && !t.target.value && e > 0 && (t.preventDefault(), d(e - 1));
|
|
5302
|
+
}, g = (e) => {
|
|
5244
5303
|
e.target.select();
|
|
5245
5304
|
};
|
|
5246
5305
|
return /* @__PURE__ */ p("div", {
|
|
@@ -5249,12 +5308,12 @@ var fi = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus:
|
|
|
5249
5308
|
t.preventDefault();
|
|
5250
5309
|
let i = (t.clipboardData?.getData("text") || "").trim().slice(0, e);
|
|
5251
5310
|
i && (i.split("").forEach((e, t) => {
|
|
5252
|
-
|
|
5311
|
+
l.current[t] && (l.current[t].value = e);
|
|
5253
5312
|
}), n?.(i), i.length === e && r?.(i));
|
|
5254
5313
|
},
|
|
5255
5314
|
...s,
|
|
5256
5315
|
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ p("input", {
|
|
5257
|
-
ref: (e) =>
|
|
5316
|
+
ref: (e) => l.current[t] = e,
|
|
5258
5317
|
id: `wc-input-code-${t}`,
|
|
5259
5318
|
name: `wc-input-code-${t}`,
|
|
5260
5319
|
className: "wc-input-code__box",
|
|
@@ -5262,100 +5321,101 @@ var fi = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus:
|
|
|
5262
5321
|
maxLength: 1,
|
|
5263
5322
|
autoComplete: "one-time-code",
|
|
5264
5323
|
inputMode: "numeric",
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5324
|
+
"aria-label": c.verificationCodeDigit(t + 1),
|
|
5325
|
+
onInput: m(t),
|
|
5326
|
+
onKeyDown: h(t),
|
|
5327
|
+
onFocus: g
|
|
5268
5328
|
}, t))
|
|
5269
5329
|
});
|
|
5270
5330
|
};
|
|
5271
|
-
|
|
5331
|
+
gi.displayName = "VerificationCodeInput";
|
|
5272
5332
|
//#endregion
|
|
5273
|
-
//#region
|
|
5274
|
-
function
|
|
5333
|
+
//#region src/components/VideoPlayer/utils.js
|
|
5334
|
+
function _i(e) {
|
|
5275
5335
|
return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
5276
5336
|
}
|
|
5277
|
-
function
|
|
5337
|
+
function vi(e, t) {
|
|
5278
5338
|
let n = e.currentTarget.getBoundingClientRect();
|
|
5279
5339
|
return (e.clientX - n.left) / n.width * t;
|
|
5280
5340
|
}
|
|
5281
|
-
function
|
|
5341
|
+
function yi(e) {
|
|
5282
5342
|
e && (document.fullscreenElement ? document.exitFullscreen?.() : e.requestFullscreen?.());
|
|
5283
5343
|
}
|
|
5284
5344
|
//#endregion
|
|
5285
5345
|
//#region src/components/VideoPlayer/VideoPlayer.jsx
|
|
5286
|
-
var
|
|
5287
|
-
let s = u(null), [
|
|
5288
|
-
let e =
|
|
5346
|
+
var bi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i = {}, ...a }) => {
|
|
5347
|
+
let { messages: s } = q(), 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 = _i(C), E = _i(x), D = () => {
|
|
5348
|
+
let e = c.current;
|
|
5289
5349
|
e && (e.paused ? e.play() : e.pause());
|
|
5290
|
-
},
|
|
5291
|
-
let e =
|
|
5292
|
-
e && (
|
|
5293
|
-
},
|
|
5294
|
-
let t =
|
|
5295
|
-
t && (t.currentTime =
|
|
5296
|
-
},
|
|
5297
|
-
|
|
5350
|
+
}, O = () => {
|
|
5351
|
+
let e = c.current;
|
|
5352
|
+
e && (S(e.duration || 0), w(e.currentTime), g(e.duration ? e.currentTime / e.duration * 100 : 0), f(!e.paused));
|
|
5353
|
+
}, k = (e) => {
|
|
5354
|
+
let t = c.current;
|
|
5355
|
+
t && (t.currentTime = vi(e, x));
|
|
5356
|
+
}, A = () => {
|
|
5357
|
+
b((e) => {
|
|
5298
5358
|
let t = !e;
|
|
5299
|
-
return
|
|
5359
|
+
return c.current && (c.current.muted = t), t;
|
|
5300
5360
|
});
|
|
5301
|
-
},
|
|
5302
|
-
|
|
5361
|
+
}, j = () => {
|
|
5362
|
+
yi(c.current?.parentElement);
|
|
5303
5363
|
};
|
|
5304
5364
|
return o(() => {
|
|
5305
|
-
|
|
5306
|
-
}, [
|
|
5307
|
-
let e =
|
|
5308
|
-
e && (e.muted =
|
|
5365
|
+
c.current && (c.current.volume = _);
|
|
5366
|
+
}, [_]), o(() => {
|
|
5367
|
+
let e = c.current;
|
|
5368
|
+
e && (e.muted = y, e.loop = n, t && e.play());
|
|
5309
5369
|
}, [
|
|
5310
5370
|
t,
|
|
5311
5371
|
n,
|
|
5312
|
-
|
|
5372
|
+
y
|
|
5313
5373
|
]), /* @__PURE__ */ m("div", {
|
|
5314
5374
|
className: `video-wrapper ${r}`,
|
|
5315
5375
|
style: i,
|
|
5316
5376
|
...a,
|
|
5317
5377
|
children: [/* @__PURE__ */ p("video", {
|
|
5318
|
-
ref:
|
|
5378
|
+
ref: c,
|
|
5319
5379
|
className: "video-el",
|
|
5320
5380
|
src: e,
|
|
5321
|
-
onTimeUpdate:
|
|
5322
|
-
onEnded: () =>
|
|
5381
|
+
onTimeUpdate: O,
|
|
5382
|
+
onEnded: () => f(!1)
|
|
5323
5383
|
}), /* @__PURE__ */ m("div", {
|
|
5324
5384
|
className: "controls",
|
|
5325
5385
|
children: [
|
|
5326
5386
|
/* @__PURE__ */ p("button", {
|
|
5327
5387
|
className: "ctrl-btn",
|
|
5328
|
-
"aria-label":
|
|
5329
|
-
onClick:
|
|
5330
|
-
children:
|
|
5388
|
+
"aria-label": l ? s.pauseVideo : s.playVideo,
|
|
5389
|
+
onClick: D,
|
|
5390
|
+
children: l ? "❚❚" : "▶️"
|
|
5331
5391
|
}),
|
|
5332
5392
|
/* @__PURE__ */ p("div", {
|
|
5333
5393
|
className: "progress",
|
|
5334
5394
|
role: "slider",
|
|
5335
5395
|
tabIndex: 0,
|
|
5336
|
-
"aria-label":
|
|
5337
|
-
"aria-valuenow": Math.round(
|
|
5396
|
+
"aria-label": s.videoProgress,
|
|
5397
|
+
"aria-valuenow": Math.round(h),
|
|
5338
5398
|
"aria-valuemin": 0,
|
|
5339
5399
|
"aria-valuemax": 100,
|
|
5340
|
-
onClick:
|
|
5400
|
+
onClick: k,
|
|
5341
5401
|
children: /* @__PURE__ */ p("div", {
|
|
5342
5402
|
className: "progress-bar",
|
|
5343
|
-
style: { width: `${
|
|
5403
|
+
style: { width: `${h}%` }
|
|
5344
5404
|
})
|
|
5345
5405
|
}),
|
|
5346
5406
|
/* @__PURE__ */ m("span", {
|
|
5347
5407
|
className: "time",
|
|
5348
5408
|
children: [
|
|
5349
|
-
|
|
5409
|
+
T,
|
|
5350
5410
|
" / ",
|
|
5351
|
-
|
|
5411
|
+
E
|
|
5352
5412
|
]
|
|
5353
5413
|
}),
|
|
5354
5414
|
/* @__PURE__ */ p("button", {
|
|
5355
5415
|
className: "ctrl-btn",
|
|
5356
|
-
"aria-label":
|
|
5357
|
-
onClick:
|
|
5358
|
-
children:
|
|
5416
|
+
"aria-label": y ? s.unmuteVideo : s.muteVideo,
|
|
5417
|
+
onClick: A,
|
|
5418
|
+
children: y ? "🔇" : "🔊"
|
|
5359
5419
|
}),
|
|
5360
5420
|
/* @__PURE__ */ p("input", {
|
|
5361
5421
|
className: "volume",
|
|
@@ -5363,23 +5423,24 @@ var gi = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5363
5423
|
min: "0",
|
|
5364
5424
|
max: "1",
|
|
5365
5425
|
step: "0.05",
|
|
5366
|
-
value:
|
|
5367
|
-
|
|
5426
|
+
value: _,
|
|
5427
|
+
"aria-label": s.volume,
|
|
5428
|
+
onChange: (e) => v(Number(e.target.value))
|
|
5368
5429
|
}),
|
|
5369
5430
|
/* @__PURE__ */ p("button", {
|
|
5370
5431
|
className: "ctrl-btn",
|
|
5371
|
-
"aria-label":
|
|
5372
|
-
onClick:
|
|
5432
|
+
"aria-label": s.enterFullscreen,
|
|
5433
|
+
onClick: j,
|
|
5373
5434
|
children: "⛶"
|
|
5374
5435
|
})
|
|
5375
5436
|
]
|
|
5376
5437
|
})]
|
|
5377
5438
|
});
|
|
5378
5439
|
};
|
|
5379
|
-
|
|
5440
|
+
bi.displayName = "VideoPlayer";
|
|
5380
5441
|
//#endregion
|
|
5381
|
-
//#region
|
|
5382
|
-
var
|
|
5442
|
+
//#region src/components/Watermark/utils.js
|
|
5443
|
+
var xi = {
|
|
5383
5444
|
content: "",
|
|
5384
5445
|
cross: !1,
|
|
5385
5446
|
debug: !1,
|
|
@@ -5407,14 +5468,14 @@ var _i = {
|
|
|
5407
5468
|
yOffset: 0,
|
|
5408
5469
|
zIndex: 10
|
|
5409
5470
|
};
|
|
5410
|
-
function
|
|
5471
|
+
function Si(e) {
|
|
5411
5472
|
if (typeof e == "string" && e.startsWith("var(")) {
|
|
5412
5473
|
let t = e.match(/--[^, )]+/);
|
|
5413
5474
|
if (t) return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim() || e;
|
|
5414
5475
|
}
|
|
5415
5476
|
return e;
|
|
5416
5477
|
}
|
|
5417
|
-
function
|
|
5478
|
+
function Ci(e) {
|
|
5418
5479
|
let t = document.createElement("canvas"), n = t.getContext("2d"), r = e.width, i = e.height;
|
|
5419
5480
|
if (!e.image && e.content) {
|
|
5420
5481
|
n.font = `${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;
|
|
@@ -5430,14 +5491,14 @@ function yi(e) {
|
|
|
5430
5491
|
}, i.src = e.image;
|
|
5431
5492
|
});
|
|
5432
5493
|
let a = (e.content || "").split(/\n/);
|
|
5433
|
-
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ?
|
|
5494
|
+
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ? Si(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);
|
|
5434
5495
|
let o = -(a.length - 1) * e.lineHeight / 2;
|
|
5435
5496
|
return a.forEach((t, r) => {
|
|
5436
5497
|
let i = o + r * e.lineHeight;
|
|
5437
5498
|
n.fillText(t, 0, i);
|
|
5438
5499
|
}), Promise.resolve(t.toDataURL());
|
|
5439
5500
|
}
|
|
5440
|
-
function
|
|
5501
|
+
function wi(e, t) {
|
|
5441
5502
|
let n = {
|
|
5442
5503
|
position: e.fullscreen ? "fixed" : "absolute",
|
|
5443
5504
|
top: 0,
|
|
@@ -5456,15 +5517,15 @@ function bi(e, t) {
|
|
|
5456
5517
|
}
|
|
5457
5518
|
//#endregion
|
|
5458
5519
|
//#region src/components/Watermark/Watermark.jsx
|
|
5459
|
-
var
|
|
5520
|
+
var Ti = (e) => {
|
|
5460
5521
|
let t = {
|
|
5461
|
-
...
|
|
5522
|
+
...xi,
|
|
5462
5523
|
...e
|
|
5463
5524
|
}, [n, r] = d(""), i = !!t.content || !!t.image;
|
|
5464
5525
|
o(() => {
|
|
5465
5526
|
if (!i) return;
|
|
5466
5527
|
let e = !0;
|
|
5467
|
-
return
|
|
5528
|
+
return Ci(t).then((t) => {
|
|
5468
5529
|
e && r(t);
|
|
5469
5530
|
}), () => {
|
|
5470
5531
|
e = !1;
|
|
@@ -5473,7 +5534,7 @@ var xi = (e) => {
|
|
|
5473
5534
|
let { children: e, ...n } = t;
|
|
5474
5535
|
return JSON.stringify(n);
|
|
5475
5536
|
}, [t]), i]);
|
|
5476
|
-
let a = l(() => i ?
|
|
5537
|
+
let a = l(() => i ? wi(t, n) : {}, [
|
|
5477
5538
|
n,
|
|
5478
5539
|
i,
|
|
5479
5540
|
t
|
|
@@ -5483,11 +5544,11 @@ var xi = (e) => {
|
|
|
5483
5544
|
style: a
|
|
5484
5545
|
}), t.children] }) : t.children || null;
|
|
5485
5546
|
};
|
|
5486
|
-
|
|
5547
|
+
Ti.displayName = "Watermark";
|
|
5487
5548
|
//#endregion
|
|
5488
5549
|
//#region src/ThemeReact.tsx
|
|
5489
|
-
var
|
|
5490
|
-
async function
|
|
5550
|
+
var Ei = n(void 0), Di = typeof window > "u" ? o : c;
|
|
5551
|
+
async function Oi(e, t, n, r) {
|
|
5491
5552
|
if (typeof fetch > "u") return {
|
|
5492
5553
|
ok: !1,
|
|
5493
5554
|
url: e,
|
|
@@ -5529,7 +5590,7 @@ async function wi(e, t, n, r) {
|
|
|
5529
5590
|
} : null;
|
|
5530
5591
|
}
|
|
5531
5592
|
}
|
|
5532
|
-
var
|
|
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 }) => {
|
|
5533
5594
|
let y = u(null);
|
|
5534
5595
|
y.current ||= w({
|
|
5535
5596
|
target: a,
|
|
@@ -5544,14 +5605,14 @@ var Ti = ({ children: e, config: t, defaultMode: n = "system", themeUrl: r, targ
|
|
|
5544
5605
|
resolvedMode: b.resolvedMode,
|
|
5545
5606
|
dark: b.dark
|
|
5546
5607
|
}), T = u(S.resolvedMode), E = u(a), D = u(0), k = u(g), A = u(_), j = u(v);
|
|
5547
|
-
k.current = g, A.current = _, j.current = v,
|
|
5608
|
+
k.current = g, A.current = _, j.current = v, Di(() => {
|
|
5548
5609
|
let e = b.subscribe((e) => {
|
|
5549
5610
|
C(e), T.current !== e.resolvedMode && (T.current = e.resolvedMode, k.current?.(e.resolvedMode));
|
|
5550
5611
|
});
|
|
5551
5612
|
return b.start(), () => {
|
|
5552
5613
|
e(), b.destroy();
|
|
5553
5614
|
};
|
|
5554
|
-
}, [b]),
|
|
5615
|
+
}, [b]), Di(() => {
|
|
5555
5616
|
s !== void 0 && b.setMode(s);
|
|
5556
5617
|
}, [b, s]), o(() => {
|
|
5557
5618
|
let e = ++D.current, n = E.current, i = typeof AbortController > "u" ? null : new AbortController();
|
|
@@ -5559,7 +5620,7 @@ var Ti = ({ children: e, config: t, defaultMode: n = "system", themeUrl: r, targ
|
|
|
5559
5620
|
let e = x(t, { target: n });
|
|
5560
5621
|
e.ok ? A.current?.(e) : j.current?.(e);
|
|
5561
5622
|
} else r || O(n);
|
|
5562
|
-
return r &&
|
|
5623
|
+
return r && Oi(r, n, () => e === D.current, i?.signal).then((e) => {
|
|
5563
5624
|
e && (e.ok ? A.current?.(e) : i?.signal.aborted || j.current?.(e));
|
|
5564
5625
|
}), () => {
|
|
5565
5626
|
i?.abort();
|
|
@@ -5590,15 +5651,15 @@ var Ti = ({ children: e, config: t, defaultMode: n = "system", themeUrl: r, targ
|
|
|
5590
5651
|
M,
|
|
5591
5652
|
N
|
|
5592
5653
|
]);
|
|
5593
|
-
return /* @__PURE__ */ p(
|
|
5654
|
+
return /* @__PURE__ */ p(Ei.Provider, {
|
|
5594
5655
|
value: P,
|
|
5595
5656
|
children: e
|
|
5596
5657
|
});
|
|
5597
5658
|
};
|
|
5598
|
-
function
|
|
5599
|
-
let e = a(
|
|
5659
|
+
function Ai() {
|
|
5660
|
+
let e = a(Ei);
|
|
5600
5661
|
if (!e) throw Error("useTheme must be used within ThemeProvider");
|
|
5601
5662
|
return e;
|
|
5602
5663
|
}
|
|
5603
5664
|
//#endregion
|
|
5604
|
-
export { te as Accordion, ie as Alert,
|
|
5665
|
+
export { te as Accordion, ie as Alert, Y as AppBar, le as Autocomplete, he as Avatar, ye as Badge, Te as Banner, ke as Blockquote, Le as Box, We as Breadcrumb, Xe as Button, Oe as Card, Ze as CardActions, Qe as CardContent, tt as Checkbox, ot as Chip, pt as CircularProgress, _t as ColorPicker, bt as Container, Ot as Copy, Ft as DatePicker, It as Fab, qt as Feature, Rt as Feed, Yt as FileInput, Zt as FormControl, Qt as FormControlLabel, $t as FormGroup, en as FormHelperText, fn as Grid, pn as HoverCard, kn as Icon, An as IconButton, jn as ImageGallery, zn as Inline, Bn as Input, Kn as List, qn as ListItem, Jn as ListItemIcon, Yn as ListItemText, K as LocaleProvider, ir as Menu, cr as Modal, lr as NumberAnimation, dr as Page, ur as Pagination, _r as Paper, vr as Popover, yr as PricingTable, br as Progress, Cr as Radio, Sr as RadioGroup, wr as Rating, Tr as Select, Dr as Skeleton, kr as SlideOver, Or as Slider, Nr as Snackbar, Ar as Split, jr as Stack, Hr as Status, Ur as Switch, g as THEME_CONFIG_VERSION, _ as THEME_MODES, v as THEME_STORAGE_KEY, Xr as Table, qr as TableBody, Yr as TableCell, Kr as TableHead, Jr as TableRow, Zr as Tabs, Qr as TextField, ki as ThemeProvider, ei as Toolbar, ai as Tooltip, hi as TypingText, pi as Typography, gi as VerificationCodeInput, bi as VideoPlayer, Ti as Watermark, b as applyThemeConfig, C as createThemeController, T as createThemeInitScript, re as defaultLocaleMessages, E as loadThemeConfig, D as resetThemeConfig, k as resolveThemeMode, A as serializeThemeConfig, q as useLocale, Ai as useTheme, j as validateThemeConfig };
|