@zeturn/watercolor-react 1.1.43 → 1.1.45
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/README.md +1 -1
- package/dist/src/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/src/components/Icon/Icon.d.ts +9 -10
- package/dist/src/components/Icon/Icon.d.ts.map +1 -1
- package/dist/src/components/List/List.d.ts +2 -1
- package/dist/src/components/List/List.d.ts.map +1 -1
- package/dist/watercolor-react.css +1 -1
- package/dist/watercolor-react.es.js +361 -644
- package/dist/watercolor-react.umd.js +7 -17
- package/index.d.ts +78 -0
- package/package.json +18 -12
- package/style.css +1 -0
- package/dist/index.d.ts +0 -2
|
@@ -36,474 +36,179 @@ function D(e = [], t, n = !1) {
|
|
|
36
36
|
return n ? e.includes(t) ? e.filter((e) => e !== t) : [...e, t] : e.includes(t) ? [] : [t];
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
|
-
//#region ../../node_modules/react/cjs/react-jsx-runtime.production.
|
|
39
|
+
//#region ../../node_modules/react/cjs/react-jsx-runtime.production.js
|
|
40
40
|
var O = /* @__PURE__ */ y(((e) => {
|
|
41
|
-
var t =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var s, c = {}, l = null, u = null;
|
|
49
|
-
for (s in r !== void 0 && (l = "" + r), t.key !== void 0 && (l = "" + t.key), t.ref !== void 0 && (u = t.ref), t) i.call(t, s) && !o.hasOwnProperty(s) && (c[s] = t[s]);
|
|
50
|
-
if (e && e.defaultProps) for (s in t = e.defaultProps, t) c[s] === void 0 && (c[s] = t[s]);
|
|
51
|
-
return {
|
|
52
|
-
$$typeof: n,
|
|
41
|
+
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
42
|
+
function r(e, n, r) {
|
|
43
|
+
var i = null;
|
|
44
|
+
if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
|
|
45
|
+
else r = n;
|
|
46
|
+
return n = r.ref, {
|
|
47
|
+
$$typeof: t,
|
|
53
48
|
type: e,
|
|
54
|
-
key:
|
|
55
|
-
ref:
|
|
56
|
-
props:
|
|
57
|
-
_owner: a.current
|
|
49
|
+
key: i,
|
|
50
|
+
ref: n === void 0 ? null : n,
|
|
51
|
+
props: r
|
|
58
52
|
};
|
|
59
53
|
}
|
|
60
|
-
e.Fragment =
|
|
54
|
+
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
61
55
|
})), k = /* @__PURE__ */ y(((e) => {
|
|
62
56
|
process.env.NODE_ENV !== "production" && (function() {
|
|
63
|
-
|
|
64
|
-
function _(e) {
|
|
65
|
-
if (typeof e != "object" || !e) return null;
|
|
66
|
-
var t = h && e[h] || e[g];
|
|
67
|
-
return typeof t == "function" ? t : null;
|
|
68
|
-
}
|
|
69
|
-
var v = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
70
|
-
function y(e) {
|
|
71
|
-
b("error", e, [...arguments].slice(1));
|
|
72
|
-
}
|
|
73
|
-
function b(e, t, n) {
|
|
74
|
-
var r = v.ReactDebugCurrentFrame.getStackAddendum();
|
|
75
|
-
r !== "" && (t += "%s", n = n.concat([r]));
|
|
76
|
-
var i = n.map(function(e) {
|
|
77
|
-
return String(e);
|
|
78
|
-
});
|
|
79
|
-
i.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, i);
|
|
80
|
-
}
|
|
81
|
-
var x = !1, C = !1, w = !1, T = !1, E = !1, D = Symbol.for("react.module.reference");
|
|
82
|
-
function O(e) {
|
|
83
|
-
return !!(typeof e == "string" || typeof e == "function" || e === i || e === o || E || e === a || e === u || e === d || T || e === m || x || C || w || typeof e == "object" && e && (e.$$typeof === p || e.$$typeof === f || e.$$typeof === s || e.$$typeof === c || e.$$typeof === l || e.$$typeof === D || e.getModuleId !== void 0));
|
|
84
|
-
}
|
|
85
|
-
function k(e, t, n) {
|
|
86
|
-
var r = e.displayName;
|
|
87
|
-
if (r) return r;
|
|
88
|
-
var i = t.displayName || t.name || "";
|
|
89
|
-
return i === "" ? n : n + "(" + i + ")";
|
|
90
|
-
}
|
|
91
|
-
function A(e) {
|
|
92
|
-
return e.displayName || "Context";
|
|
93
|
-
}
|
|
94
|
-
function j(e) {
|
|
57
|
+
function t(e) {
|
|
95
58
|
if (e == null) return null;
|
|
96
|
-
if (typeof e
|
|
59
|
+
if (typeof e == "function") return e.$$typeof === k ? null : e.displayName || e.name || null;
|
|
97
60
|
if (typeof e == "string") return e;
|
|
98
61
|
switch (e) {
|
|
99
|
-
case
|
|
100
|
-
case
|
|
101
|
-
case
|
|
102
|
-
case
|
|
103
|
-
case
|
|
104
|
-
case
|
|
62
|
+
case _: return "Fragment";
|
|
63
|
+
case y: return "Profiler";
|
|
64
|
+
case v: return "StrictMode";
|
|
65
|
+
case w: return "Suspense";
|
|
66
|
+
case T: return "SuspenseList";
|
|
67
|
+
case O: return "Activity";
|
|
105
68
|
}
|
|
106
|
-
if (typeof e == "object") switch (e.$$typeof) {
|
|
107
|
-
case
|
|
108
|
-
case
|
|
109
|
-
case
|
|
110
|
-
case
|
|
111
|
-
var
|
|
112
|
-
return
|
|
113
|
-
case
|
|
114
|
-
|
|
69
|
+
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
70
|
+
case g: return "Portal";
|
|
71
|
+
case x: return e.displayName || "Context";
|
|
72
|
+
case b: return (e._context.displayName || "Context") + ".Consumer";
|
|
73
|
+
case C:
|
|
74
|
+
var n = e.render;
|
|
75
|
+
return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
76
|
+
case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
|
|
77
|
+
case D:
|
|
78
|
+
n = e._payload, e = e._init;
|
|
115
79
|
try {
|
|
116
|
-
return
|
|
117
|
-
} catch {
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
80
|
+
return t(e(n));
|
|
81
|
+
} catch {}
|
|
120
82
|
}
|
|
121
83
|
return null;
|
|
122
84
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
V.__reactDisabledLog = !0;
|
|
126
|
-
function H() {
|
|
127
|
-
if (N === 0) {
|
|
128
|
-
P = console.log, F = console.info, I = console.warn, L = console.error, R = console.group, z = console.groupCollapsed, B = console.groupEnd;
|
|
129
|
-
var e = {
|
|
130
|
-
configurable: !0,
|
|
131
|
-
enumerable: !0,
|
|
132
|
-
value: V,
|
|
133
|
-
writable: !0
|
|
134
|
-
};
|
|
135
|
-
Object.defineProperties(console, {
|
|
136
|
-
info: e,
|
|
137
|
-
log: e,
|
|
138
|
-
warn: e,
|
|
139
|
-
error: e,
|
|
140
|
-
group: e,
|
|
141
|
-
groupCollapsed: e,
|
|
142
|
-
groupEnd: e
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
N++;
|
|
146
|
-
}
|
|
147
|
-
function U() {
|
|
148
|
-
if (N--, N === 0) {
|
|
149
|
-
var e = {
|
|
150
|
-
configurable: !0,
|
|
151
|
-
enumerable: !0,
|
|
152
|
-
writable: !0
|
|
153
|
-
};
|
|
154
|
-
Object.defineProperties(console, {
|
|
155
|
-
log: M({}, e, { value: P }),
|
|
156
|
-
info: M({}, e, { value: F }),
|
|
157
|
-
warn: M({}, e, { value: I }),
|
|
158
|
-
error: M({}, e, { value: L }),
|
|
159
|
-
group: M({}, e, { value: R }),
|
|
160
|
-
groupCollapsed: M({}, e, { value: z }),
|
|
161
|
-
groupEnd: M({}, e, { value: B })
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
N < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
165
|
-
}
|
|
166
|
-
var W = v.ReactCurrentDispatcher, G;
|
|
167
|
-
function K(e, t, n) {
|
|
168
|
-
if (G === void 0) try {
|
|
169
|
-
throw Error();
|
|
170
|
-
} catch (e) {
|
|
171
|
-
var r = e.stack.trim().match(/\n( *(at )?)/);
|
|
172
|
-
G = r && r[1] || "";
|
|
173
|
-
}
|
|
174
|
-
return "\n" + G + e;
|
|
85
|
+
function n(e) {
|
|
86
|
+
return "" + e;
|
|
175
87
|
}
|
|
176
|
-
|
|
177
|
-
function Y(e, t) {
|
|
178
|
-
if (!e || q) return "";
|
|
179
|
-
var n = J.get(e);
|
|
180
|
-
if (n !== void 0) return n;
|
|
181
|
-
var r;
|
|
182
|
-
q = !0;
|
|
183
|
-
var i = Error.prepareStackTrace;
|
|
184
|
-
Error.prepareStackTrace = void 0;
|
|
185
|
-
var a = W.current;
|
|
186
|
-
W.current = null, H();
|
|
88
|
+
function r(e) {
|
|
187
89
|
try {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
if (Object.defineProperty(o.prototype, "props", { set: function() {
|
|
193
|
-
throw Error();
|
|
194
|
-
} }), typeof Reflect == "object" && Reflect.construct) {
|
|
195
|
-
try {
|
|
196
|
-
Reflect.construct(o, []);
|
|
197
|
-
} catch (e) {
|
|
198
|
-
r = e;
|
|
199
|
-
}
|
|
200
|
-
Reflect.construct(e, [], o);
|
|
201
|
-
} else {
|
|
202
|
-
try {
|
|
203
|
-
o.call();
|
|
204
|
-
} catch (e) {
|
|
205
|
-
r = e;
|
|
206
|
-
}
|
|
207
|
-
e.call(o.prototype);
|
|
208
|
-
}
|
|
209
|
-
} else {
|
|
210
|
-
try {
|
|
211
|
-
throw Error();
|
|
212
|
-
} catch (e) {
|
|
213
|
-
r = e;
|
|
214
|
-
}
|
|
215
|
-
e();
|
|
216
|
-
}
|
|
217
|
-
} catch (t) {
|
|
218
|
-
if (t && r && typeof t.stack == "string") {
|
|
219
|
-
for (var s = t.stack.split("\n"), c = r.stack.split("\n"), l = s.length - 1, u = c.length - 1; l >= 1 && u >= 0 && s[l] !== c[u];) u--;
|
|
220
|
-
for (; l >= 1 && u >= 0; l--, u--) if (s[l] !== c[u]) {
|
|
221
|
-
if (l !== 1 || u !== 1) do
|
|
222
|
-
if (l--, u--, u < 0 || s[l] !== c[u]) {
|
|
223
|
-
var d = "\n" + s[l].replace(" at new ", " at ");
|
|
224
|
-
return e.displayName && d.includes("<anonymous>") && (d = d.replace("<anonymous>", e.displayName)), typeof e == "function" && J.set(e, d), d;
|
|
225
|
-
}
|
|
226
|
-
while (l >= 1 && u >= 0);
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
} finally {
|
|
231
|
-
q = !1, W.current = a, U(), Error.prepareStackTrace = i;
|
|
232
|
-
}
|
|
233
|
-
var f = e ? e.displayName || e.name : "", p = f ? K(f) : "";
|
|
234
|
-
return typeof e == "function" && J.set(e, p), p;
|
|
235
|
-
}
|
|
236
|
-
function X(e, t, n) {
|
|
237
|
-
return Y(e, !1);
|
|
238
|
-
}
|
|
239
|
-
function ee(e) {
|
|
240
|
-
var t = e.prototype;
|
|
241
|
-
return !!(t && t.isReactComponent);
|
|
242
|
-
}
|
|
243
|
-
function te(e, t, n) {
|
|
244
|
-
if (e == null) return "";
|
|
245
|
-
if (typeof e == "function") return Y(e, ee(e));
|
|
246
|
-
if (typeof e == "string") return K(e);
|
|
247
|
-
switch (e) {
|
|
248
|
-
case u: return K("Suspense");
|
|
249
|
-
case d: return K("SuspenseList");
|
|
90
|
+
n(e);
|
|
91
|
+
var t = !1;
|
|
92
|
+
} catch {
|
|
93
|
+
t = !0;
|
|
250
94
|
}
|
|
251
|
-
if (
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
var r = e, i = r._payload, a = r._init;
|
|
256
|
-
try {
|
|
257
|
-
return te(a(i), t, n);
|
|
258
|
-
} catch {}
|
|
95
|
+
if (t) {
|
|
96
|
+
t = console;
|
|
97
|
+
var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
98
|
+
return r.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), n(e);
|
|
259
99
|
}
|
|
260
|
-
return "";
|
|
261
|
-
}
|
|
262
|
-
var ne = Object.prototype.hasOwnProperty, re = {}, ie = v.ReactDebugCurrentFrame;
|
|
263
|
-
function ae(e) {
|
|
264
|
-
if (e) {
|
|
265
|
-
var t = e._owner, n = te(e.type, e._source, t ? t.type : null);
|
|
266
|
-
ie.setExtraStackFrame(n);
|
|
267
|
-
} else ie.setExtraStackFrame(null);
|
|
268
|
-
}
|
|
269
|
-
function oe(e, t, n, r, i) {
|
|
270
|
-
var a = Function.call.bind(ne);
|
|
271
|
-
for (var o in e) if (a(e, o)) {
|
|
272
|
-
var s = void 0;
|
|
273
|
-
try {
|
|
274
|
-
if (typeof e[o] != "function") {
|
|
275
|
-
var c = Error((r || "React class") + ": " + n + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
276
|
-
throw c.name = "Invariant Violation", c;
|
|
277
|
-
}
|
|
278
|
-
s = e[o](t, o, r, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
279
|
-
} catch (e) {
|
|
280
|
-
s = e;
|
|
281
|
-
}
|
|
282
|
-
s && !(s instanceof Error) && (ae(i), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", r || "React class", n, o, typeof s), ae(null)), s instanceof Error && !(s.message in re) && (re[s.message] = !0, ae(i), y("Failed %s type: %s", n, s.message), ae(null));
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
var se = Array.isArray;
|
|
286
|
-
function ce(e) {
|
|
287
|
-
return se(e);
|
|
288
100
|
}
|
|
289
|
-
function
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
function le(e) {
|
|
101
|
+
function i(e) {
|
|
102
|
+
if (e === _) return "<>";
|
|
103
|
+
if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
|
|
293
104
|
try {
|
|
294
|
-
|
|
105
|
+
var n = t(e);
|
|
106
|
+
return n ? "<" + n + ">" : "<...>";
|
|
295
107
|
} catch {
|
|
296
|
-
return
|
|
108
|
+
return "<...>";
|
|
297
109
|
}
|
|
298
110
|
}
|
|
299
|
-
function
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
function de(e) {
|
|
303
|
-
if (le(e)) return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Z(e)), ue(e);
|
|
111
|
+
function a() {
|
|
112
|
+
var e = A.A;
|
|
113
|
+
return e === null ? null : e.getOwner();
|
|
304
114
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
ref: !0,
|
|
308
|
-
__self: !0,
|
|
309
|
-
__source: !0
|
|
310
|
-
}, Q, me, he = {};
|
|
311
|
-
function ge(e) {
|
|
312
|
-
if (ne.call(e, "ref")) {
|
|
313
|
-
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
314
|
-
if (t && t.isReactWarning) return !1;
|
|
315
|
-
}
|
|
316
|
-
return e.ref !== void 0;
|
|
115
|
+
function o() {
|
|
116
|
+
return Error("react-stack-top-frame");
|
|
317
117
|
}
|
|
318
|
-
function
|
|
319
|
-
if (
|
|
118
|
+
function s(e) {
|
|
119
|
+
if (j.call(e, "key")) {
|
|
320
120
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
321
121
|
if (t && t.isReactWarning) return !1;
|
|
322
122
|
}
|
|
323
123
|
return e.key !== void 0;
|
|
324
124
|
}
|
|
325
|
-
function
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
he[n] || (y("Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref", j(fe.current.type), e.ref), he[n] = !0);
|
|
125
|
+
function c(e, t) {
|
|
126
|
+
function n() {
|
|
127
|
+
P || (P = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
329
128
|
}
|
|
330
|
-
}
|
|
331
|
-
function ye(e, t) {
|
|
332
|
-
var n = function() {
|
|
333
|
-
Q || (Q = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
334
|
-
};
|
|
335
129
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
336
130
|
get: n,
|
|
337
131
|
configurable: !0
|
|
338
132
|
});
|
|
339
133
|
}
|
|
340
|
-
function
|
|
341
|
-
var
|
|
342
|
-
|
|
343
|
-
};
|
|
344
|
-
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
345
|
-
get: n,
|
|
346
|
-
configurable: !0
|
|
347
|
-
});
|
|
134
|
+
function l() {
|
|
135
|
+
var e = t(this.type);
|
|
136
|
+
return F[e] || (F[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
348
137
|
}
|
|
349
|
-
|
|
350
|
-
var
|
|
351
|
-
|
|
138
|
+
function u(e, t, n, r, i, a) {
|
|
139
|
+
var o = n.ref;
|
|
140
|
+
return e = {
|
|
141
|
+
$$typeof: h,
|
|
352
142
|
type: e,
|
|
353
143
|
key: t,
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
144
|
+
props: n,
|
|
145
|
+
_owner: r
|
|
146
|
+
}, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
|
|
147
|
+
enumerable: !1,
|
|
148
|
+
value: null
|
|
149
|
+
}) : Object.defineProperty(e, "ref", {
|
|
150
|
+
enumerable: !1,
|
|
151
|
+
get: l
|
|
152
|
+
}), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
153
|
+
configurable: !1,
|
|
154
|
+
enumerable: !1,
|
|
155
|
+
writable: !0,
|
|
156
|
+
value: 0
|
|
157
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
359
158
|
configurable: !1,
|
|
360
159
|
enumerable: !1,
|
|
361
160
|
writable: !0,
|
|
362
|
-
value:
|
|
363
|
-
}), Object.defineProperty(
|
|
161
|
+
value: null
|
|
162
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
364
163
|
configurable: !1,
|
|
365
164
|
enumerable: !1,
|
|
366
|
-
writable: !
|
|
165
|
+
writable: !0,
|
|
367
166
|
value: i
|
|
368
|
-
}), Object.defineProperty(
|
|
167
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
369
168
|
configurable: !1,
|
|
370
169
|
enumerable: !1,
|
|
371
|
-
writable: !
|
|
170
|
+
writable: !0,
|
|
372
171
|
value: a
|
|
373
|
-
}), Object.freeze && (Object.freeze(
|
|
374
|
-
};
|
|
375
|
-
function Se(e, t, n, r, i) {
|
|
376
|
-
var a, o = {}, s = null, c = null;
|
|
377
|
-
for (a in n !== void 0 && (de(n), s = "" + n), _e(t) && (de(t.key), s = "" + t.key), ge(t) && (c = t.ref, ve(t, i)), t) ne.call(t, a) && !pe.hasOwnProperty(a) && (o[a] = t[a]);
|
|
378
|
-
if (e && e.defaultProps) {
|
|
379
|
-
var l = e.defaultProps;
|
|
380
|
-
for (a in l) o[a] === void 0 && (o[a] = l[a]);
|
|
381
|
-
}
|
|
382
|
-
if (s || c) {
|
|
383
|
-
var u = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
384
|
-
s && ye(o, u), c && be(o, u);
|
|
385
|
-
}
|
|
386
|
-
return xe(e, s, c, i, r, fe.current, o);
|
|
387
|
-
}
|
|
388
|
-
var Ce = v.ReactCurrentOwner, we = v.ReactDebugCurrentFrame;
|
|
389
|
-
function Te(e) {
|
|
390
|
-
if (e) {
|
|
391
|
-
var t = e._owner, n = te(e.type, e._source, t ? t.type : null);
|
|
392
|
-
we.setExtraStackFrame(n);
|
|
393
|
-
} else we.setExtraStackFrame(null);
|
|
394
|
-
}
|
|
395
|
-
var Ee = !1;
|
|
396
|
-
function De(e) {
|
|
397
|
-
return typeof e == "object" && !!e && e.$$typeof === n;
|
|
398
|
-
}
|
|
399
|
-
function Oe() {
|
|
400
|
-
if (Ce.current) {
|
|
401
|
-
var e = j(Ce.current.type);
|
|
402
|
-
if (e) return "\n\nCheck the render method of `" + e + "`.";
|
|
403
|
-
}
|
|
404
|
-
return "";
|
|
405
|
-
}
|
|
406
|
-
function ke(e) {
|
|
407
|
-
if (e !== void 0) {
|
|
408
|
-
var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
|
|
409
|
-
return "\n\nCheck your code at " + t + ":" + n + ".";
|
|
410
|
-
}
|
|
411
|
-
return "";
|
|
412
|
-
}
|
|
413
|
-
var Ae = {};
|
|
414
|
-
function je(e) {
|
|
415
|
-
var t = Oe();
|
|
416
|
-
if (!t) {
|
|
417
|
-
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
418
|
-
n && (t = "\n\nCheck the top-level render call using <" + n + ">.");
|
|
419
|
-
}
|
|
420
|
-
return t;
|
|
421
|
-
}
|
|
422
|
-
function Me(e, t) {
|
|
423
|
-
if (!(!e._store || e._store.validated || e.key != null)) {
|
|
424
|
-
e._store.validated = !0;
|
|
425
|
-
var n = je(t);
|
|
426
|
-
if (!Ae[n]) {
|
|
427
|
-
Ae[n] = !0;
|
|
428
|
-
var r = "";
|
|
429
|
-
e && e._owner && e._owner !== Ce.current && (r = " It was passed a child from " + j(e._owner.type) + "."), Te(e), y("Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.", n, r), Te(null);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
172
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
432
173
|
}
|
|
433
|
-
function
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
function Pe(e) {
|
|
447
|
-
var t = e.type;
|
|
448
|
-
if (!(t == null || typeof t == "string")) {
|
|
449
|
-
var n;
|
|
450
|
-
if (typeof t == "function") n = t.propTypes;
|
|
451
|
-
else if (typeof t == "object" && (t.$$typeof === l || t.$$typeof === f)) n = t.propTypes;
|
|
452
|
-
else return;
|
|
453
|
-
if (n) {
|
|
454
|
-
var r = j(t);
|
|
455
|
-
oe(n, e.props, "prop", r, e);
|
|
456
|
-
} else t.PropTypes !== void 0 && !Ee && (Ee = !0, y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j(t) || "Unknown"));
|
|
457
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
function Fe(e) {
|
|
461
|
-
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
462
|
-
var r = t[n];
|
|
463
|
-
if (r !== "children" && r !== "key") {
|
|
464
|
-
Te(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", r), Te(null);
|
|
465
|
-
break;
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
e.ref !== null && (Te(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), Te(null));
|
|
469
|
-
}
|
|
470
|
-
var Ie = {};
|
|
471
|
-
function Le(e, t, r, a, o, s) {
|
|
472
|
-
var c = O(e);
|
|
473
|
-
if (!c) {
|
|
474
|
-
var l = "";
|
|
475
|
-
(e === void 0 || typeof e == "object" && e && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
476
|
-
var u = ke(o);
|
|
477
|
-
u ? l += u : l += Oe();
|
|
478
|
-
var d;
|
|
479
|
-
e === null ? d = "null" : ce(e) ? d = "array" : e !== void 0 && e.$$typeof === n ? (d = "<" + (j(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, l);
|
|
480
|
-
}
|
|
481
|
-
var f = Se(e, t, r, o, s);
|
|
482
|
-
if (f == null) return f;
|
|
483
|
-
if (c) {
|
|
484
|
-
var p = t.children;
|
|
485
|
-
if (p !== void 0) if (a) if (ce(p)) {
|
|
486
|
-
for (var m = 0; m < p.length; m++) Ne(p[m], e);
|
|
487
|
-
Object.freeze && Object.freeze(p);
|
|
488
|
-
} else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
489
|
-
else Ne(p, e);
|
|
490
|
-
}
|
|
491
|
-
if (ne.call(t, "key")) {
|
|
492
|
-
var h = j(e), g = Object.keys(t).filter(function(e) {
|
|
174
|
+
function d(e, n, i, o, l, d) {
|
|
175
|
+
var p = n.children;
|
|
176
|
+
if (p !== void 0) if (o) if (M(p)) {
|
|
177
|
+
for (o = 0; o < p.length; o++) f(p[o]);
|
|
178
|
+
Object.freeze && Object.freeze(p);
|
|
179
|
+
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
180
|
+
else f(p);
|
|
181
|
+
if (j.call(n, "key")) {
|
|
182
|
+
p = t(e);
|
|
183
|
+
var m = Object.keys(n).filter(function(e) {
|
|
493
184
|
return e !== "key";
|
|
494
|
-
})
|
|
495
|
-
|
|
185
|
+
});
|
|
186
|
+
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", R[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), R[p + o] = !0);
|
|
496
187
|
}
|
|
497
|
-
|
|
188
|
+
if (p = null, i !== void 0 && (r(i), p = "" + i), s(n) && (r(n.key), p = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
|
|
189
|
+
else i = n;
|
|
190
|
+
return p && c(i, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), u(e, p, i, a(), l, d);
|
|
498
191
|
}
|
|
499
|
-
function
|
|
500
|
-
|
|
192
|
+
function f(e) {
|
|
193
|
+
p(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? p(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
501
194
|
}
|
|
502
|
-
function
|
|
503
|
-
return
|
|
195
|
+
function p(e) {
|
|
196
|
+
return typeof e == "object" && !!e && e.$$typeof === h;
|
|
504
197
|
}
|
|
505
|
-
var
|
|
506
|
-
|
|
198
|
+
var m = S("react"), h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), x = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), A = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, M = Array.isArray, N = console.createTask ? console.createTask : function() {
|
|
199
|
+
return null;
|
|
200
|
+
};
|
|
201
|
+
m = { react_stack_bottom_frame: function(e) {
|
|
202
|
+
return e();
|
|
203
|
+
} };
|
|
204
|
+
var P, F = {}, I = m.react_stack_bottom_frame.bind(m, o)(), L = N(i(o)), R = {};
|
|
205
|
+
e.Fragment = _, e.jsx = function(e, t, n) {
|
|
206
|
+
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
207
|
+
return d(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
|
|
208
|
+
}, e.jsxs = function(e, t, n) {
|
|
209
|
+
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
210
|
+
return d(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
|
|
211
|
+
};
|
|
507
212
|
})();
|
|
508
213
|
})), A = (/* @__PURE__ */ y(((e, t) => {
|
|
509
214
|
process.env.NODE_ENV === "production" ? t.exports = O() : t.exports = k();
|
|
@@ -1683,17 +1388,17 @@ function Xe(e) {
|
|
|
1683
1388
|
//#endregion
|
|
1684
1389
|
//#region src/components/ColorPicker/ColorPicker.jsx
|
|
1685
1390
|
function Ze({ value: e = "#ffffff", onChange: t, size: n = "md", shape: r = "circle", disabled: i = !1, className: a = "" }) {
|
|
1686
|
-
let o = Je({
|
|
1391
|
+
let o = e ?? "", s = Je({
|
|
1687
1392
|
size: n,
|
|
1688
1393
|
shape: r,
|
|
1689
1394
|
disabled: i,
|
|
1690
1395
|
className: a
|
|
1691
|
-
}).join(" "),
|
|
1396
|
+
}).join(" "), c = Xe(o);
|
|
1692
1397
|
return /* @__PURE__ */ (0, A.jsxs)("label", {
|
|
1693
|
-
className:
|
|
1398
|
+
className: s,
|
|
1694
1399
|
children: [/* @__PURE__ */ (0, A.jsx)("input", {
|
|
1695
1400
|
type: "color",
|
|
1696
|
-
value:
|
|
1401
|
+
value: o,
|
|
1697
1402
|
onChange: (e) => {
|
|
1698
1403
|
Ye(e, i, t);
|
|
1699
1404
|
},
|
|
@@ -1701,7 +1406,7 @@ function Ze({ value: e = "#ffffff", onChange: t, size: n = "md", shape: r = "cir
|
|
|
1701
1406
|
className: "wc-color-picker__input"
|
|
1702
1407
|
}), /* @__PURE__ */ (0, A.jsx)("span", {
|
|
1703
1408
|
className: "wc-color-picker__preview",
|
|
1704
|
-
style:
|
|
1409
|
+
style: c
|
|
1705
1410
|
})]
|
|
1706
1411
|
});
|
|
1707
1412
|
}
|
|
@@ -3016,25 +2721,37 @@ var It = /* @__PURE__ */ y(((e) => {
|
|
|
3016
2721
|
})))(), 1), Gt = ({ className: e, style: t }) => /* @__PURE__ */ (0, A.jsx)("span", {
|
|
3017
2722
|
className: e,
|
|
3018
2723
|
style: t
|
|
3019
|
-
}), Kt =
|
|
2724
|
+
}), Kt = {
|
|
2725
|
+
lucide: "@zeturn/watercolor-icons-lucide-react",
|
|
2726
|
+
heroicons: "@zeturn/watercolor-icons-heroicons-react",
|
|
2727
|
+
tabler: "@zeturn/watercolor-icons-tabler-react",
|
|
2728
|
+
phosphor: "@zeturn/watercolor-icons-phosphor-react",
|
|
2729
|
+
feather: "@zeturn/watercolor-icons-feather"
|
|
2730
|
+
}, qt = (e) => {
|
|
2731
|
+
let t = Kt[e];
|
|
2732
|
+
return t ? import(
|
|
2733
|
+
/* @vite-ignore */
|
|
2734
|
+
t
|
|
2735
|
+
) : Promise.resolve(null);
|
|
2736
|
+
}, Jt = (e, t) => r(() => e().then((e) => ({ default: t(e || {}) })).catch((e) => (console.warn("[Icon] 动态导入失败,已回退到占位符图标。", e), { default: Gt }))), Yt = (e, t, n) => {
|
|
3020
2737
|
switch (e) {
|
|
3021
|
-
case "lucide": return
|
|
3022
|
-
case "heroicons": return
|
|
3023
|
-
case "tabler": return
|
|
3024
|
-
case "phosphor": return
|
|
2738
|
+
case "lucide": return Jt(() => qt("lucide"), (e) => e.getIcon?.(t) || Gt);
|
|
2739
|
+
case "heroicons": return Jt(() => qt("heroicons"), (e) => e.getIcon?.(t, n) || Gt);
|
|
2740
|
+
case "tabler": return Jt(() => qt("tabler"), (e) => e.getIcon?.(t) || Gt);
|
|
2741
|
+
case "phosphor": return Jt(() => qt("phosphor"), (e) => e.getIcon?.(t) || Gt);
|
|
3025
2742
|
default: return null;
|
|
3026
2743
|
}
|
|
3027
|
-
},
|
|
2744
|
+
}, Xt = (e) => typeof e == "number" ? e : {
|
|
3028
2745
|
xs: 16,
|
|
3029
2746
|
sm: 20,
|
|
3030
2747
|
md: 24,
|
|
3031
2748
|
lg: 32,
|
|
3032
2749
|
xl: 48
|
|
3033
|
-
}[e] || parseInt(e) || 24,
|
|
2750
|
+
}[e] || parseInt(e) || 24, Zt = ({ library: e = "lucide", name: n = "", html: i = "", size: a = 24, color: o = "currentColor", strokeWidth: s = 2, variant: l = "outline", className: u = "", children: d, ...f }) => {
|
|
3034
2751
|
let p = c(() => {
|
|
3035
2752
|
if (!n) return null;
|
|
3036
2753
|
try {
|
|
3037
|
-
return
|
|
2754
|
+
return Yt(e, n, l);
|
|
3038
2755
|
} catch {
|
|
3039
2756
|
return console.warn(`Icon "${n}" not found in library "${e}"`), null;
|
|
3040
2757
|
}
|
|
@@ -3044,7 +2761,7 @@ var It = /* @__PURE__ */ y(((e) => {
|
|
|
3044
2761
|
l
|
|
3045
2762
|
]), m = c(() => e === "feather" && n ? r(async () => {
|
|
3046
2763
|
try {
|
|
3047
|
-
let e =
|
|
2764
|
+
let e = Xt(a), { getFeatherSvg: t } = await qt("feather") || {}, r = await t(n, {
|
|
3048
2765
|
width: e,
|
|
3049
2766
|
height: e,
|
|
3050
2767
|
strokeWidth: Number(s)
|
|
@@ -3065,13 +2782,13 @@ var It = /* @__PURE__ */ y(((e) => {
|
|
|
3065
2782
|
]), h = c(() => e === "html" && i ? i : "", [e, i]), g = c(() => {
|
|
3066
2783
|
let e = {};
|
|
3067
2784
|
if (o && o !== "currentColor" && (e.color = o), a) {
|
|
3068
|
-
let t =
|
|
2785
|
+
let t = Xt(a);
|
|
3069
2786
|
e.width = `${t}px`, e.height = `${t}px`;
|
|
3070
2787
|
}
|
|
3071
2788
|
return e;
|
|
3072
2789
|
}, [o, a]), _ = c(() => {
|
|
3073
2790
|
let t = {
|
|
3074
|
-
size:
|
|
2791
|
+
size: Xt(a),
|
|
3075
2792
|
color: o,
|
|
3076
2793
|
...f
|
|
3077
2794
|
};
|
|
@@ -3112,7 +2829,7 @@ var It = /* @__PURE__ */ y(((e) => {
|
|
|
3112
2829
|
children: d
|
|
3113
2830
|
});
|
|
3114
2831
|
};
|
|
3115
|
-
|
|
2832
|
+
Zt.propTypes = {
|
|
3116
2833
|
library: $.default.oneOf([
|
|
3117
2834
|
"lucide",
|
|
3118
2835
|
"heroicons",
|
|
@@ -3136,7 +2853,7 @@ Yt.propTypes = {
|
|
|
3136
2853
|
};
|
|
3137
2854
|
//#endregion
|
|
3138
2855
|
//#region src/components/Button/IconButton.jsx
|
|
3139
|
-
var
|
|
2856
|
+
var Qt = ({ 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: d = {}, ...f }) => {
|
|
3140
2857
|
let [p, m] = u(!1), h = [
|
|
3141
2858
|
"default",
|
|
3142
2859
|
"primary",
|
|
@@ -3184,10 +2901,10 @@ var Xt = ({ color: e = "default", size: t = "md", edge: n = !1, disabled: r = !1
|
|
|
3184
2901
|
})
|
|
3185
2902
|
});
|
|
3186
2903
|
};
|
|
3187
|
-
|
|
2904
|
+
Qt.displayName = "IconButton";
|
|
3188
2905
|
//#endregion
|
|
3189
2906
|
//#region src/components/ImageGallery/ImageGallery.jsx
|
|
3190
|
-
var
|
|
2907
|
+
var $t = ({ 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: d = !1, itemsPerPage: f = 12, lazyLoad: p = !0, loading: m = !1, className: h = "", style: g = {}, onSelect: _, onDownload: v, onLightboxOpen: y, onLightboxClose: b, ...x }) => {
|
|
3191
2908
|
let [S, C] = u(-1), [w, T] = u(1), E = d ? Math.ceil(e.length / f) : 1, D = {
|
|
3192
2909
|
sm: "75%",
|
|
3193
2910
|
md: "66.67%",
|
|
@@ -3392,10 +3109,10 @@ var Zt = ({ images: e = [], title: t = "", layout: n = "grid", size: r = "md", c
|
|
|
3392
3109
|
]
|
|
3393
3110
|
});
|
|
3394
3111
|
};
|
|
3395
|
-
|
|
3112
|
+
$t.displayName = "ImageGallery";
|
|
3396
3113
|
//#endregion
|
|
3397
3114
|
//#region src/components/Input/Input.jsx
|
|
3398
|
-
var
|
|
3115
|
+
var en = ({ value: e = "", onChange: t, type: n = "text", placeholder: r = "", disabled: i = !1, readonly: a = !1, required: c = !1, autoFocus: d = !1, maxLength: f, minLength: p, size: m = "md", variant: h = "filled", color: g = "primary", error: _ = !1, helperText: v = "", label: y = "", startAdornment: b = null, endAdornment: x = null, fullWidth: S = !1, multiline: C = !1, rows: w = 4, autoComplete: T = "off", name: E = "", id: D = "", className: O = "", style: k = {}, onFocus: j, onBlur: M, onKeyDown: N, onKeyUp: P, onKeyPress: F, ...I }) => {
|
|
3399
3116
|
let [L, R] = u(!1), [z, B] = u(!!e), V = l(null), H = s(), U = D || H;
|
|
3400
3117
|
return o(() => {
|
|
3401
3118
|
B(!!e);
|
|
@@ -3466,38 +3183,38 @@ var Qt = ({ value: e = "", onChange: t, type: n = "text", placeholder: r = "", d
|
|
|
3466
3183
|
]
|
|
3467
3184
|
});
|
|
3468
3185
|
};
|
|
3469
|
-
|
|
3186
|
+
en.displayName = "Input";
|
|
3470
3187
|
//#endregion
|
|
3471
3188
|
//#region ../core/src/components/List/utils.jsx
|
|
3472
|
-
var
|
|
3189
|
+
var tn = (e) => {
|
|
3473
3190
|
let { dense: t = !1, disablePadding: n = !1, variant: r, className: i = "" } = e, a = ["list"];
|
|
3474
3191
|
return t && a.push("list--dense"), n && a.push("list--no-padding"), r && a.push(`list--${r}`), i && a.push(i), a;
|
|
3475
|
-
},
|
|
3192
|
+
}, nn = (e) => {
|
|
3476
3193
|
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"];
|
|
3477
3194
|
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;
|
|
3478
|
-
},
|
|
3195
|
+
}, rn = (e) => {
|
|
3479
3196
|
let { position: t = "start", className: n = "" } = e, r = ["list-item-icon"];
|
|
3480
3197
|
return t && r.push(`list-item-icon--${t}`), n && r.push(n), r;
|
|
3481
|
-
},
|
|
3198
|
+
}, an = (e) => {
|
|
3482
3199
|
let { inset: t = !1, className: n = "" } = e, r = ["list-item-text"];
|
|
3483
3200
|
return t && r.push("list-item-text--inset"), n && r.push(n), r;
|
|
3484
|
-
},
|
|
3485
|
-
let
|
|
3201
|
+
}, on = n({ dense: !1 }), sn = ({ children: e, dense: t = !1, disablePadding: n = !1, nav: r = !1, subheader: i = "", className: a = "", ...o }) => {
|
|
3202
|
+
let s = tn({
|
|
3486
3203
|
dense: t,
|
|
3487
3204
|
disablePadding: n,
|
|
3488
|
-
className:
|
|
3205
|
+
className: a
|
|
3489
3206
|
}).join(" ");
|
|
3490
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
3207
|
+
return /* @__PURE__ */ (0, A.jsx)(on.Provider, {
|
|
3491
3208
|
value: { dense: t },
|
|
3492
3209
|
children: /* @__PURE__ */ (0, A.jsx)("div", {
|
|
3493
|
-
role: "list",
|
|
3494
|
-
className:
|
|
3495
|
-
...
|
|
3210
|
+
role: r ? "navigation" : "list",
|
|
3211
|
+
className: s,
|
|
3212
|
+
...o,
|
|
3496
3213
|
children: e
|
|
3497
3214
|
})
|
|
3498
3215
|
});
|
|
3499
|
-
},
|
|
3500
|
-
let { dense: d } = a(
|
|
3216
|
+
}, cn = ({ 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 }) => {
|
|
3217
|
+
let { dense: d } = a(on) || { dense: !1 }, f = nn({
|
|
3501
3218
|
button: t,
|
|
3502
3219
|
disabled: n,
|
|
3503
3220
|
divider: r,
|
|
@@ -3514,15 +3231,15 @@ var $t = (e) => {
|
|
|
3514
3231
|
...u,
|
|
3515
3232
|
children: e
|
|
3516
3233
|
});
|
|
3517
|
-
},
|
|
3518
|
-
className:
|
|
3234
|
+
}, ln = ({ children: e, position: t = "start", className: n = "", ...r }) => /* @__PURE__ */ (0, A.jsx)("span", {
|
|
3235
|
+
className: rn({
|
|
3519
3236
|
position: t,
|
|
3520
3237
|
className: n
|
|
3521
3238
|
}).join(" "),
|
|
3522
3239
|
...r,
|
|
3523
3240
|
children: e
|
|
3524
|
-
}),
|
|
3525
|
-
className:
|
|
3241
|
+
}), un = ({ primary: e = "", secondary: t = "", inset: n = !1, className: r = "", ...i }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
3242
|
+
className: an({
|
|
3526
3243
|
inset: n,
|
|
3527
3244
|
className: r
|
|
3528
3245
|
}).join(" "),
|
|
@@ -3534,25 +3251,25 @@ var $t = (e) => {
|
|
|
3534
3251
|
className: "list-item-text-secondary",
|
|
3535
3252
|
children: t
|
|
3536
3253
|
})]
|
|
3537
|
-
}),
|
|
3254
|
+
}), dn = ({ size: e, variant: t, disabled: n, className: r }) => {
|
|
3538
3255
|
let i = [
|
|
3539
3256
|
"wc-menu",
|
|
3540
3257
|
`wc-menu--${e}`,
|
|
3541
3258
|
`wc-menu--${t}`
|
|
3542
3259
|
];
|
|
3543
3260
|
return n && i.push("wc-menu--disabled"), r && i.push(r), i;
|
|
3544
|
-
},
|
|
3261
|
+
}, fn = (e, t) => [
|
|
3545
3262
|
"wc-menu__menu",
|
|
3546
3263
|
`wc-menu__menu--${e}`,
|
|
3547
3264
|
t
|
|
3548
|
-
],
|
|
3265
|
+
], pn = ({ disabled: e }) => ["wc-menu__button", e ? "wc-menu__button--disabled" : ""], mn = (e) => {
|
|
3549
3266
|
let t = ["wc-menu__item"];
|
|
3550
3267
|
return e.divider && t.push("wc-menu__divider"), e.disabled && t.push("wc-menu__item--disabled"), t;
|
|
3551
|
-
},
|
|
3268
|
+
}, hn = (e) => ["wc-menu__arrow", e ? "wc-menu__arrow--open" : ""], gn = (e, t, n, r, i) => {
|
|
3552
3269
|
t || (n(!e), e ? i && i() : r && r());
|
|
3553
|
-
},
|
|
3270
|
+
}, _n = (e, t, n, r, i) => {
|
|
3554
3271
|
e.disabled || e.divider || (n && n(e, t), r(!1), i && i());
|
|
3555
|
-
},
|
|
3272
|
+
}, vn = (e) => {
|
|
3556
3273
|
let t = (t) => {
|
|
3557
3274
|
e(t);
|
|
3558
3275
|
};
|
|
@@ -3560,20 +3277,20 @@ var $t = (e) => {
|
|
|
3560
3277
|
add: () => document.addEventListener("click", t),
|
|
3561
3278
|
remove: () => document.removeEventListener("click", t)
|
|
3562
3279
|
};
|
|
3563
|
-
},
|
|
3564
|
-
let [S, C] = u(!1), w = l(null), T = l(null), E =
|
|
3280
|
+
}, yn = ({ items: e = [], triggerText: t = "选择选项", placement: n = "bottom-start", size: r = "md", variant: i = "default", disabled: a = !1, trigger: s = "click", illustration: c = "", illustrationAlt: d = "示意图", cardTitle: f = "", cardDescription: p = "", onSelect: m, onOpen: h, onClose: g, children: _, triggerContent: v, menuContent: y, className: b = "", ...x }) => {
|
|
3281
|
+
let [S, C] = u(!1), w = l(null), T = l(null), E = dn({
|
|
3565
3282
|
size: r,
|
|
3566
3283
|
variant: i,
|
|
3567
3284
|
disabled: a,
|
|
3568
3285
|
className: b
|
|
3569
|
-
}).join(" "), D =
|
|
3286
|
+
}).join(" "), D = fn(n, i === "card" ? "wc-menu__menu--card" : "").join(" "), O = pn({ disabled: a }).join(" "), k = hn(S).join(" "), j = i === "card" ? {
|
|
3570
3287
|
minWidth: "320px",
|
|
3571
3288
|
maxWidth: "450px"
|
|
3572
3289
|
} : { minWidth: "120px" }, M = () => {
|
|
3573
|
-
|
|
3290
|
+
gn(S, a, C, h, g);
|
|
3574
3291
|
}, N = (e, t) => {
|
|
3575
|
-
|
|
3576
|
-
}, P =
|
|
3292
|
+
_n(e, t, m, C, g);
|
|
3293
|
+
}, P = vn((e) => {
|
|
3577
3294
|
w.current && !w.current.contains(e.target) && (C(!1), g && g());
|
|
3578
3295
|
});
|
|
3579
3296
|
return o(() => (S ? P.add() : P.remove(), () => P.remove()), [S]), /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
@@ -3628,7 +3345,7 @@ var $t = (e) => {
|
|
|
3628
3345
|
}), /* @__PURE__ */ (0, A.jsx)("div", {
|
|
3629
3346
|
className: "wc-menu__card-list",
|
|
3630
3347
|
children: e.map((e, t) => e.divider ? /* @__PURE__ */ (0, A.jsx)("div", { className: "wc-menu__divider" }, e.key || t) : /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
3631
|
-
className:
|
|
3348
|
+
className: mn(e).join(" "),
|
|
3632
3349
|
onClick: () => N(e, t),
|
|
3633
3350
|
children: [e.icon && /* @__PURE__ */ (0, A.jsx)("span", {
|
|
3634
3351
|
className: "wc-menu__icon",
|
|
@@ -3640,7 +3357,7 @@ var $t = (e) => {
|
|
|
3640
3357
|
}, e.key || t))
|
|
3641
3358
|
})]
|
|
3642
3359
|
}) : e.map((e, t) => e.divider ? /* @__PURE__ */ (0, A.jsx)("div", { className: "wc-menu__divider" }, e.key || t) : /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
3643
|
-
className:
|
|
3360
|
+
className: mn(e).join(" "),
|
|
3644
3361
|
onClick: () => N(e, t),
|
|
3645
3362
|
children: [e.icon && /* @__PURE__ */ (0, A.jsx)("span", {
|
|
3646
3363
|
className: "wc-menu__icon",
|
|
@@ -3653,32 +3370,32 @@ var $t = (e) => {
|
|
|
3653
3370
|
})]
|
|
3654
3371
|
});
|
|
3655
3372
|
};
|
|
3656
|
-
|
|
3373
|
+
yn.displayName = "Menu";
|
|
3657
3374
|
//#endregion
|
|
3658
3375
|
//#region ../core/src/components/Modal/utils.js
|
|
3659
|
-
function
|
|
3376
|
+
function bn({ size: e = "md", fullWidth: t = !1, fullScreen: n = !1, scroll: r = "paper", position: i = "center", className: a = "" } = {}) {
|
|
3660
3377
|
let o = ["wc-modal"];
|
|
3661
3378
|
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(" ");
|
|
3662
3379
|
}
|
|
3663
|
-
function
|
|
3380
|
+
function xn({ centered: e = !0, position: t = "center" } = {}) {
|
|
3664
3381
|
let n = ["wc-modal-overlay"];
|
|
3665
3382
|
return (e || t === "center") && n.push("wc-modal-overlay--centered"), t && t !== "center" && n.push(`wc-modal-overlay--${t}`), n.join(" ");
|
|
3666
3383
|
}
|
|
3667
|
-
function
|
|
3384
|
+
function Sn(e, t, n = 0) {
|
|
3668
3385
|
e(!1), t && (n > 0 ? setTimeout(() => {
|
|
3669
3386
|
t();
|
|
3670
3387
|
}, n) : t());
|
|
3671
3388
|
}
|
|
3672
|
-
function
|
|
3389
|
+
function Cn(e, t, n) {
|
|
3673
3390
|
e.key === "Escape" && t && n();
|
|
3674
3391
|
}
|
|
3675
|
-
function
|
|
3392
|
+
function wn(e) {
|
|
3676
3393
|
if (e) {
|
|
3677
3394
|
let t = e.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])");
|
|
3678
3395
|
t.length > 0 ? t[0].focus() : e.focus();
|
|
3679
3396
|
}
|
|
3680
3397
|
}
|
|
3681
|
-
function
|
|
3398
|
+
function Tn(e) {
|
|
3682
3399
|
if (!e) return () => {};
|
|
3683
3400
|
let t = e.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])"), n = t[0], r = t[t.length - 1], i = (e) => {
|
|
3684
3401
|
e.key === "Tab" && (e.shiftKey ? document.activeElement === n && (e.preventDefault(), r?.focus()) : document.activeElement === r && (e.preventDefault(), n?.focus()));
|
|
@@ -3689,31 +3406,31 @@ function Cn(e) {
|
|
|
3689
3406
|
}
|
|
3690
3407
|
//#endregion
|
|
3691
3408
|
//#region src/components/Modal/Modal.jsx
|
|
3692
|
-
var
|
|
3409
|
+
var En = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWidth: i = null, closable: a = !0, showCloseButton: s = !0, maskClosable: c = !0, closeOnOverlay: d = !0, disableBackdropClick: p = !1, disableEscapeKeyDown: m = !1, centered: h = !0, fullWidth: g = !1, fullScreen: _ = !1, position: v = "center", scroll: y = "paper", lockScroll: b = !0, zIndex: x = 1e3, showOverlay: S = !0, className: C = "", onClose: w, children: T, header: E, footer: D, ...O }) => {
|
|
3693
3410
|
let [k, j] = u(e || t), M = l(null), N = l(null), P = l(null), F = e || t;
|
|
3694
3411
|
o(() => {
|
|
3695
3412
|
j(F);
|
|
3696
3413
|
}, [F]);
|
|
3697
|
-
let I =
|
|
3414
|
+
let I = bn({
|
|
3698
3415
|
size: i || r,
|
|
3699
3416
|
fullWidth: g,
|
|
3700
3417
|
fullScreen: _,
|
|
3701
3418
|
scroll: y,
|
|
3702
3419
|
position: v,
|
|
3703
3420
|
className: C
|
|
3704
|
-
}), L =
|
|
3421
|
+
}), L = xn({
|
|
3705
3422
|
centered: v === "center" || h,
|
|
3706
3423
|
position: v
|
|
3707
3424
|
}), R = () => {
|
|
3708
|
-
|
|
3425
|
+
Sn(j, w);
|
|
3709
3426
|
}, z = () => {
|
|
3710
3427
|
(c || d) && !p && R();
|
|
3711
3428
|
}, B = (e) => {
|
|
3712
|
-
|
|
3429
|
+
Cn(e, a && !m, R);
|
|
3713
3430
|
};
|
|
3714
3431
|
if (o(() => {
|
|
3715
3432
|
if (k) return N.current = document.activeElement, setTimeout(() => {
|
|
3716
|
-
M.current && (
|
|
3433
|
+
M.current && (wn(M.current), P.current = Tn(M.current));
|
|
3717
3434
|
}, 100), document.addEventListener("keydown", B), b && (document.body.style.overflow = "hidden"), () => {
|
|
3718
3435
|
document.removeEventListener("keydown", B), P.current &&= (P.current(), null), N.current && N.current.focus && N.current.focus(), b && (document.body.style.overflow = "");
|
|
3719
3436
|
};
|
|
@@ -3767,10 +3484,10 @@ var wn = ({ visible: e = !1, open: t = !1, title: n = "", size: r = "md", maxWid
|
|
|
3767
3484
|
})]
|
|
3768
3485
|
}), document.body);
|
|
3769
3486
|
};
|
|
3770
|
-
|
|
3487
|
+
En.displayName = "Modal";
|
|
3771
3488
|
//#endregion
|
|
3772
3489
|
//#region src/components/NumberAnimation/NumberAnimation.jsx
|
|
3773
|
-
var
|
|
3490
|
+
var Dn = ({ active: e = !0, duration: t = 3e3, from: n = 0, to: r, locale: i = "", precision: a = 0, showSeparator: s = !1, prefix: c = "", suffix: d = "", separator: f = "", formatter: p = null, easing: m = "linear", onFinish: h, className: g = "", style: _ = {}, ...v }) => {
|
|
3774
3491
|
let [y, b] = u(n), [x, S] = u(!1), C = l(null), w = l(null), T = (i) => {
|
|
3775
3492
|
C.current === null && (C.current = i);
|
|
3776
3493
|
let a = Math.min((i - C.current) / t, 1);
|
|
@@ -3816,7 +3533,7 @@ var Tn = ({ active: e = !0, duration: t = 3e3, from: n = 0, to: r, locale: i = "
|
|
|
3816
3533
|
};
|
|
3817
3534
|
//#endregion
|
|
3818
3535
|
//#region src/components/Pagination/Pagination.jsx
|
|
3819
|
-
function
|
|
3536
|
+
function On({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCount: a = 1, boundaryCount: s = 1, size: l = "md", className: d = "", ...f }) {
|
|
3820
3537
|
let [p, m] = u(e);
|
|
3821
3538
|
o(() => {
|
|
3822
3539
|
m(e);
|
|
@@ -3901,22 +3618,22 @@ function En({ value: e = 1, onChange: t, total: n, pageSize: r = 10, siblingCoun
|
|
|
3901
3618
|
}
|
|
3902
3619
|
//#endregion
|
|
3903
3620
|
//#region ../core/src/components/Paper/utils.jsx
|
|
3904
|
-
var
|
|
3621
|
+
var kn = {
|
|
3905
3622
|
ELEVATION: "elevation",
|
|
3906
3623
|
OUTLINED: "outlined"
|
|
3907
|
-
},
|
|
3624
|
+
}, An = {
|
|
3908
3625
|
SQUARE: "square",
|
|
3909
3626
|
ROUNDED_SM: "rounded-sm",
|
|
3910
3627
|
ROUNDED_LG: "rounded-lg",
|
|
3911
3628
|
ROUNDED_XL: "rounded-xl",
|
|
3912
3629
|
ROUNDED_2XL: "rounded-2xl",
|
|
3913
3630
|
ROUNDED_FULL: "rounded-full"
|
|
3914
|
-
},
|
|
3631
|
+
}, jn = {
|
|
3915
3632
|
SM: "sm",
|
|
3916
3633
|
MD: "md",
|
|
3917
3634
|
LG: "lg",
|
|
3918
3635
|
XL: "xl"
|
|
3919
|
-
},
|
|
3636
|
+
}, Mn = {
|
|
3920
3637
|
DEFAULT: "default",
|
|
3921
3638
|
PRIMARY: "primary",
|
|
3922
3639
|
SUCCESS: "success",
|
|
@@ -3924,20 +3641,20 @@ var Dn = {
|
|
|
3924
3641
|
ERROR: "error",
|
|
3925
3642
|
INFO: "info"
|
|
3926
3643
|
};
|
|
3927
|
-
function
|
|
3928
|
-
let { variant: t =
|
|
3929
|
-
if (t ===
|
|
3644
|
+
function Nn(e = {}) {
|
|
3645
|
+
let { variant: t = kn.ELEVATION, elevation: n = 1, square: r = !1, shape: i = null, size: a = null, color: o = Mn.DEFAULT, hoverable: s = !1, clickable: c = !1, gradient: l = !1, frosted: u = !1, textured: d = !1, className: f = "" } = e, p = ["wc-paper"];
|
|
3646
|
+
if (t === kn.OUTLINED) p.push("wc-paper--outlined");
|
|
3930
3647
|
else {
|
|
3931
3648
|
p.push("wc-paper--elevation");
|
|
3932
3649
|
let e = Math.max(0, Math.min(24, Math.floor(Number(n) || 0)));
|
|
3933
3650
|
p.push(`wc-paper--elevation-${e}`);
|
|
3934
3651
|
}
|
|
3935
|
-
return r ? p.push("wc-paper--square") : i &&
|
|
3652
|
+
return r ? p.push("wc-paper--square") : i && An[i.toUpperCase()] && p.push(`wc-paper--${i}`), a && jn[a.toUpperCase()] && p.push(`wc-paper--${a}`), o !== Mn.DEFAULT && Mn[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(" ");
|
|
3936
3653
|
}
|
|
3937
3654
|
//#endregion
|
|
3938
3655
|
//#region src/components/Paper/Paper.jsx
|
|
3939
|
-
function
|
|
3940
|
-
let p =
|
|
3656
|
+
function Pn({ variant: e = "elevation", elevation: t = 1, square: n = !1, hoverable: r = !1, clickable: i = !1, color: a = "default", size: o = null, className: s = "", children: c, onClick: l, onMouseEnter: u, onMouseLeave: d, ...f }) {
|
|
3657
|
+
let p = Nn({
|
|
3941
3658
|
variant: e,
|
|
3942
3659
|
elevation: Math.max(0, Math.min(24, Math.floor(Number(t) || 0))),
|
|
3943
3660
|
square: n,
|
|
@@ -3964,7 +3681,7 @@ function Mn({ variant: e = "elevation", elevation: t = 1, square: n = !1, hovera
|
|
|
3964
3681
|
}
|
|
3965
3682
|
//#endregion
|
|
3966
3683
|
//#region src/components/Popover/Popover.jsx
|
|
3967
|
-
function
|
|
3684
|
+
function Fn({ open: t, onOpenChange: n, triggerText: r = "打开弹窗", trigger: a, placement: s = "bottom", offset: c = 8, children: f, className: p = "" }) {
|
|
3968
3685
|
let [m, h] = u(!1), g = t != null, _ = l(null), v = l(null), y = g ? t : m, b = (e) => {
|
|
3969
3686
|
g || h(e), n?.(e);
|
|
3970
3687
|
}, x = () => b(!1), S = () => {
|
|
@@ -4018,7 +3735,7 @@ function Nn({ open: t, onOpenChange: n, triggerText: r = "打开弹窗", trigger
|
|
|
4018
3735
|
}
|
|
4019
3736
|
//#endregion
|
|
4020
3737
|
//#region src/components/PricingTable/PricingTable.jsx
|
|
4021
|
-
function
|
|
3738
|
+
function In({ plans: e = [], columns: t = 3, className: n = "" }) {
|
|
4022
3739
|
let r = { gridTemplateColumns: `repeat(${t}, minmax(0,1fr))` };
|
|
4023
3740
|
return /* @__PURE__ */ (0, A.jsx)("div", {
|
|
4024
3741
|
className: `pricing-grid ${n}`.trim(),
|
|
@@ -4048,7 +3765,7 @@ function Pn({ plans: e = [], columns: t = 3, className: n = "" }) {
|
|
|
4048
3765
|
}
|
|
4049
3766
|
//#endregion
|
|
4050
3767
|
//#region src/components/Progress/Progress.jsx
|
|
4051
|
-
var
|
|
3768
|
+
var Ln = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primary", size: i = "md", animated: a = !1, className: o = "", ...s }) => {
|
|
4052
3769
|
let c = [
|
|
4053
3770
|
"primary",
|
|
4054
3771
|
"success",
|
|
@@ -4084,11 +3801,11 @@ var Fn = ({ value: e = 0, label: t = "", showPercent: n = !1, color: r = "primar
|
|
|
4084
3801
|
})]
|
|
4085
3802
|
});
|
|
4086
3803
|
};
|
|
4087
|
-
|
|
3804
|
+
Ln.displayName = "Progress";
|
|
4088
3805
|
//#endregion
|
|
4089
3806
|
//#region src/components/Radio/Radio.jsx
|
|
4090
|
-
var
|
|
4091
|
-
function
|
|
3807
|
+
var Rn = n(null);
|
|
3808
|
+
function zn({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", row: o = !1, required: s = !1, error: c = "", helperText: l = "", size: d = "md", color: f = "primary", children: p, className: m = "" }) {
|
|
4092
3809
|
let [h, g] = u(e), _ = e !== void 0, v = _ ? e : h, y = i((e) => {
|
|
4093
3810
|
r || (_ || g(e), t?.(e));
|
|
4094
3811
|
}, [
|
|
@@ -4096,7 +3813,7 @@ function Ln({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", r
|
|
|
4096
3813
|
_,
|
|
4097
3814
|
t
|
|
4098
3815
|
]), b = ["wc-radio-group", m].filter(Boolean).join(" "), x = ["wc-radio-group-content", o ? "flex flex-wrap gap-4" : "space-y-2"].filter(Boolean).join(" ");
|
|
4099
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
3816
|
+
return /* @__PURE__ */ (0, A.jsx)(Rn.Provider, {
|
|
4100
3817
|
value: {
|
|
4101
3818
|
value: v,
|
|
4102
3819
|
updateValue: y,
|
|
@@ -4133,8 +3850,8 @@ function Ln({ value: e, onChange: t, name: n, disabled: r = !1, label: a = "", r
|
|
|
4133
3850
|
})
|
|
4134
3851
|
});
|
|
4135
3852
|
}
|
|
4136
|
-
function
|
|
4137
|
-
let p = a(
|
|
3853
|
+
function Bn({ value: e, checked: t, onChange: n, label: r, name: i, disabled: o = !1, color: s = "primary", size: c = "md", className: l = "", children: d, ...f }) {
|
|
3854
|
+
let p = a(Rn), m = p ? p.value === e : t === void 0 ? void 0 : t, h = p ? p.name : i, g = p && p.disabled || o, _ = c || p && p.size || "md", v = s || p && p.color || "primary", [y, b] = u(!1), x = [
|
|
4138
3855
|
"wc-radio",
|
|
4139
3856
|
`wc-radio--${_}`,
|
|
4140
3857
|
g && "wc-radio--disabled",
|
|
@@ -4174,10 +3891,10 @@ function Rn({ value: e, checked: t, onChange: n, label: r, name: i, disabled: o
|
|
|
4174
3891
|
]
|
|
4175
3892
|
});
|
|
4176
3893
|
}
|
|
4177
|
-
|
|
3894
|
+
Bn.displayName = "Radio", zn.displayName = "RadioGroup";
|
|
4178
3895
|
//#endregion
|
|
4179
3896
|
//#region src/components/Rating/Rating.jsx
|
|
4180
|
-
var
|
|
3897
|
+
var Vn = ({ value: e = 0, max: t = 5, readOnly: n = !1, onChange: r = () => {}, className: i = "", style: a = {}, ...s }) => {
|
|
4181
3898
|
let [c, l] = u(0), [d, f] = u(e);
|
|
4182
3899
|
o(() => f(e), [e]), o(() => {
|
|
4183
3900
|
if (document.getElementById("wc-rating-style")) return;
|
|
@@ -4213,7 +3930,7 @@ var zn = ({ value: e = 0, max: t = 5, readOnly: n = !1, onChange: r = () => {},
|
|
|
4213
3930
|
...s,
|
|
4214
3931
|
children: h
|
|
4215
3932
|
});
|
|
4216
|
-
},
|
|
3933
|
+
}, Hn = ({ value: e = "", onChange: t, options: n = [], placeholder: r = "Select an option", label: i = "", helperText: a = "", error: s = !1, errorMessage: c = "", required: d = !1, disabled: f = !1, multiple: p = !1, clearable: m = !1, fullWidth: h = !1, size: g = "md", variant: _ = "filled", color: v = "primary", maxHeight: y = 200, name: b = "", id: x = "", className: S = "", style: C = {}, onFocus: w, onBlur: T, onSearch: E, renderOption: D, renderValue: O, ...k }) => {
|
|
4217
3934
|
let [j, M] = u(!1), [N, P] = u(!1), F = l(null), I = l(null);
|
|
4218
3935
|
o(() => {
|
|
4219
3936
|
let e = (e) => {
|
|
@@ -4356,17 +4073,17 @@ var zn = ({ value: e = 0, max: t = 5, readOnly: n = !1, onChange: r = () => {},
|
|
|
4356
4073
|
]
|
|
4357
4074
|
});
|
|
4358
4075
|
};
|
|
4359
|
-
|
|
4076
|
+
Hn.displayName = "Select";
|
|
4360
4077
|
//#endregion
|
|
4361
4078
|
//#region src/components/Skeleton/Skeleton.jsx
|
|
4362
|
-
var
|
|
4079
|
+
var Un = {
|
|
4363
4080
|
text: "wc-skeleton--text",
|
|
4364
4081
|
rectangular: "wc-skeleton--rectangular",
|
|
4365
4082
|
rounded: "wc-skeleton--rounded",
|
|
4366
4083
|
circular: "wc-skeleton--circular"
|
|
4367
|
-
},
|
|
4084
|
+
}, Wn = ({ animation: e = "pulse", component: t = "div", height: n, width: r, variant: i = "text", style: a = {}, className: s = "", ...l }) => {
|
|
4368
4085
|
let u = c(() => {
|
|
4369
|
-
let t = ["wc-skeleton",
|
|
4086
|
+
let t = ["wc-skeleton", Un[i] || Un.text];
|
|
4370
4087
|
return e === "pulse" && t.push("wc-skeleton--pulse"), e === "wave" && t.push("wc-skeleton--wave"), t.join(" ");
|
|
4371
4088
|
}, [e, i]);
|
|
4372
4089
|
o(() => {
|
|
@@ -4383,7 +4100,7 @@ var Vn = {
|
|
|
4383
4100
|
"aria-live": "polite",
|
|
4384
4101
|
...l
|
|
4385
4102
|
});
|
|
4386
|
-
},
|
|
4103
|
+
}, Gn = ({ value: e, defaultValue: t = 0, min: n = 0, max: r = 100, step: i = 1, disabled: a = !1, label: s = "", valueLabelDisplay: l = "off", onChange: d = () => {}, className: f = "", style: p = {}, ...m }) => {
|
|
4387
4104
|
let [h, g] = u(e === void 0 ? t : e);
|
|
4388
4105
|
o(() => {
|
|
4389
4106
|
e !== void 0 && g(e);
|
|
@@ -4432,7 +4149,7 @@ var Vn = {
|
|
|
4432
4149
|
})
|
|
4433
4150
|
]
|
|
4434
4151
|
});
|
|
4435
|
-
},
|
|
4152
|
+
}, Kn = ({ open: e = !1, onClose: t = () => {}, placement: n = "right", width: r = 400, children: i, header: a, footer: s }) => (o(() => {
|
|
4436
4153
|
if (!e) return;
|
|
4437
4154
|
let n = (e) => {
|
|
4438
4155
|
e.key === "Escape" && t();
|
|
@@ -4483,13 +4200,13 @@ var Vn = {
|
|
|
4483
4200
|
.slideover-enter{opacity:0;transform:translateX(${n === "right" ? "100%" : "-100%"});}
|
|
4484
4201
|
` })
|
|
4485
4202
|
]
|
|
4486
|
-
}) : null, document.body)),
|
|
4203
|
+
}) : null, document.body)), qn = {
|
|
4487
4204
|
success: "✓",
|
|
4488
4205
|
info: "ℹ",
|
|
4489
4206
|
warning: "⚠",
|
|
4490
4207
|
error: "✕"
|
|
4491
4208
|
};
|
|
4492
|
-
function
|
|
4209
|
+
function Jn({ open: e = !1, modelValue: t = void 0, message: n = "", title: r = "", severity: i = "info", variant: a = "filled", autoHideDuration: s = 6e3, anchorOrigin: c = {
|
|
4493
4210
|
vertical: "bottom",
|
|
4494
4211
|
horizontal: "left"
|
|
4495
4212
|
}, action: l = "", closable: d = !0, showIcon: p = !0, showProgress: m = !1, onClose: h = () => {}, onUpdateModelValue: g, onAction: _ = () => {}, children: v }) {
|
|
@@ -4540,7 +4257,7 @@ function Kn({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4540
4257
|
children: [
|
|
4541
4258
|
p && /* @__PURE__ */ (0, A.jsx)("div", {
|
|
4542
4259
|
className: "wc-snackbar__icon",
|
|
4543
|
-
children:
|
|
4260
|
+
children: qn[i]
|
|
4544
4261
|
}),
|
|
4545
4262
|
/* @__PURE__ */ (0, A.jsxs)("div", {
|
|
4546
4263
|
className: "wc-snackbar__content",
|
|
@@ -4580,7 +4297,7 @@ function Kn({ open: e = !1, modelValue: t = void 0, message: n = "", title: r =
|
|
|
4580
4297
|
}
|
|
4581
4298
|
//#endregion
|
|
4582
4299
|
//#region ../core/src/components/Status/utils.js
|
|
4583
|
-
var
|
|
4300
|
+
var Yn = [
|
|
4584
4301
|
"default",
|
|
4585
4302
|
"success",
|
|
4586
4303
|
"error",
|
|
@@ -4589,7 +4306,7 @@ var qn = [
|
|
|
4589
4306
|
"pending",
|
|
4590
4307
|
"processing",
|
|
4591
4308
|
"cancelled"
|
|
4592
|
-
],
|
|
4309
|
+
], Xn = [
|
|
4593
4310
|
"auto",
|
|
4594
4311
|
"pulse",
|
|
4595
4312
|
"spin",
|
|
@@ -4599,7 +4316,7 @@ var qn = [
|
|
|
4599
4316
|
"breathe",
|
|
4600
4317
|
"ripple",
|
|
4601
4318
|
"glow"
|
|
4602
|
-
],
|
|
4319
|
+
], Zn = {
|
|
4603
4320
|
default: {
|
|
4604
4321
|
text: "默认",
|
|
4605
4322
|
color: "#9ca3af",
|
|
@@ -4641,29 +4358,29 @@ var qn = [
|
|
|
4641
4358
|
darkColor: "#475569"
|
|
4642
4359
|
}
|
|
4643
4360
|
};
|
|
4644
|
-
function
|
|
4645
|
-
return
|
|
4361
|
+
function Qn(e) {
|
|
4362
|
+
return Yn.includes(e);
|
|
4646
4363
|
}
|
|
4647
|
-
function
|
|
4648
|
-
return
|
|
4364
|
+
function $n(e) {
|
|
4365
|
+
return Qn(e) ? e : "default";
|
|
4649
4366
|
}
|
|
4650
|
-
function
|
|
4651
|
-
let o =
|
|
4367
|
+
function er({ status: e, size: t, showText: n, animated: r, animationType: i = "auto", className: a }) {
|
|
4368
|
+
let o = $n(e), s = [
|
|
4652
4369
|
"wc-status",
|
|
4653
4370
|
`wc-status--${o}`,
|
|
4654
4371
|
`wc-status--${t}`
|
|
4655
4372
|
];
|
|
4656
4373
|
if (n && s.push("wc-status--with-text"), r) {
|
|
4657
|
-
let e =
|
|
4374
|
+
let e = nr(o, i);
|
|
4658
4375
|
s.push("wc-status--animated", `wc-status--${e}`);
|
|
4659
4376
|
}
|
|
4660
4377
|
return a && s.push(a), s.filter(Boolean).join(" ");
|
|
4661
4378
|
}
|
|
4662
|
-
function
|
|
4663
|
-
return
|
|
4379
|
+
function tr(e) {
|
|
4380
|
+
return Zn[e]?.text || Zn.default.text;
|
|
4664
4381
|
}
|
|
4665
|
-
function
|
|
4666
|
-
return t !== "auto" &&
|
|
4382
|
+
function nr(e, t = "auto") {
|
|
4383
|
+
return t !== "auto" && Xn.includes(t) ? t : {
|
|
4667
4384
|
processing: "spin",
|
|
4668
4385
|
pending: "pulse",
|
|
4669
4386
|
success: "bounce",
|
|
@@ -4676,15 +4393,15 @@ function er(e, t = "auto") {
|
|
|
4676
4393
|
}
|
|
4677
4394
|
//#endregion
|
|
4678
4395
|
//#region src/components/Status/Status.jsx
|
|
4679
|
-
var
|
|
4680
|
-
let s =
|
|
4396
|
+
var rr = ({ status: e = "default", size: t = "md", showText: n = !1, animated: r = !1, animationType: i = "auto", className: a = "", ...o }) => {
|
|
4397
|
+
let s = er({
|
|
4681
4398
|
status: e,
|
|
4682
4399
|
size: t,
|
|
4683
4400
|
showText: n,
|
|
4684
4401
|
animated: r,
|
|
4685
4402
|
animationType: i,
|
|
4686
4403
|
className: a
|
|
4687
|
-
}), c =
|
|
4404
|
+
}), c = tr(e);
|
|
4688
4405
|
return /* @__PURE__ */ (0, A.jsx)("span", {
|
|
4689
4406
|
className: s,
|
|
4690
4407
|
title: c,
|
|
@@ -4695,10 +4412,10 @@ var tr = ({ status: e = "default", size: t = "md", showText: n = !1, animated: r
|
|
|
4695
4412
|
})
|
|
4696
4413
|
});
|
|
4697
4414
|
};
|
|
4698
|
-
|
|
4415
|
+
rr.displayName = "Status";
|
|
4699
4416
|
//#endregion
|
|
4700
4417
|
//#region src/components/Switch/Switch.jsx
|
|
4701
|
-
var
|
|
4418
|
+
var ir = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", disabled: i = !1, required: a = !1, color: o = "primary", size: c = "md", className: l = "", ...u }) => {
|
|
4702
4419
|
let d = s(), f = [
|
|
4703
4420
|
"primary",
|
|
4704
4421
|
"success",
|
|
@@ -4755,20 +4472,20 @@ var nr = ({ checked: e = !1, onChange: t, label: n = "", description: r = "", di
|
|
|
4755
4472
|
})]
|
|
4756
4473
|
});
|
|
4757
4474
|
};
|
|
4758
|
-
|
|
4475
|
+
ir.displayName = "Switch";
|
|
4759
4476
|
//#endregion
|
|
4760
4477
|
//#region src/components/Table/Table.jsx
|
|
4761
|
-
var
|
|
4478
|
+
var ar = n({
|
|
4762
4479
|
size: "md",
|
|
4763
4480
|
dense: !1,
|
|
4764
4481
|
hover: !1,
|
|
4765
4482
|
striped: !1
|
|
4766
|
-
}),
|
|
4483
|
+
}), or = ({ size: e = "md", stickyHeader: t = !1, dense: n = !1, hover: r = !1, striped: i = !1, children: a, className: o = "", ...s }) => /* @__PURE__ */ (0, A.jsx)("div", {
|
|
4767
4484
|
className: `wc-table-container${t ? " wc-table-container--sticky" : ""} ${o}`,
|
|
4768
4485
|
...s,
|
|
4769
4486
|
children: /* @__PURE__ */ (0, A.jsx)("table", {
|
|
4770
4487
|
className: `wc-table wc-table--${e}${r ? " wc-table--hover" : ""}${i ? " wc-table--striped" : ""}${n ? " wc-table--dense" : ""}`,
|
|
4771
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
4488
|
+
children: /* @__PURE__ */ (0, A.jsx)(ar.Provider, {
|
|
4772
4489
|
value: {
|
|
4773
4490
|
size: e,
|
|
4774
4491
|
dense: n,
|
|
@@ -4780,24 +4497,24 @@ var rr = n({
|
|
|
4780
4497
|
})
|
|
4781
4498
|
})
|
|
4782
4499
|
});
|
|
4783
|
-
|
|
4784
|
-
var
|
|
4785
|
-
let { stickyHeader: r } = a(
|
|
4500
|
+
or.displayName = "Table";
|
|
4501
|
+
var sr = ({ children: e, className: t = "", ...n }) => {
|
|
4502
|
+
let { stickyHeader: r } = a(ar);
|
|
4786
4503
|
return /* @__PURE__ */ (0, A.jsx)("thead", {
|
|
4787
4504
|
className: `wc-table-head${r ? " wc-table-head--sticky" : ""} ${t}`,
|
|
4788
4505
|
...n,
|
|
4789
4506
|
children: e
|
|
4790
4507
|
});
|
|
4791
4508
|
};
|
|
4792
|
-
|
|
4793
|
-
var
|
|
4509
|
+
sr.displayName = "TableHead";
|
|
4510
|
+
var cr = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ (0, A.jsx)("tbody", {
|
|
4794
4511
|
className: `wc-table-body ${t}`,
|
|
4795
4512
|
...n,
|
|
4796
4513
|
children: e
|
|
4797
4514
|
});
|
|
4798
|
-
|
|
4799
|
-
var
|
|
4800
|
-
let c = a(
|
|
4515
|
+
cr.displayName = "TableBody";
|
|
4516
|
+
var lr = ({ hover: e, selected: t = !1, clickable: n = !1, children: r, className: i = "", onClick: o, ...s }) => {
|
|
4517
|
+
let c = a(ar);
|
|
4801
4518
|
return /* @__PURE__ */ (0, A.jsx)("tr", {
|
|
4802
4519
|
className: [
|
|
4803
4520
|
"wc-table-row",
|
|
@@ -4811,9 +4528,9 @@ var sr = ({ hover: e, selected: t = !1, clickable: n = !1, children: r, classNam
|
|
|
4811
4528
|
children: r
|
|
4812
4529
|
});
|
|
4813
4530
|
};
|
|
4814
|
-
|
|
4815
|
-
var
|
|
4816
|
-
let d = a(
|
|
4531
|
+
lr.displayName = "TableRow";
|
|
4532
|
+
var ur = ({ component: e = "td", align: t = "inherit", padding: n = "normal", size: r, sortDirection: i = !1, variant: o = "body", scope: s, children: c, className: l = "", ...u }) => {
|
|
4533
|
+
let d = a(ar), f = r || (d.dense ? "small" : "medium");
|
|
4817
4534
|
return /* @__PURE__ */ (0, A.jsx)(e, {
|
|
4818
4535
|
className: [
|
|
4819
4536
|
"wc-table-cell",
|
|
@@ -4830,13 +4547,13 @@ var cr = ({ component: e = "td", align: t = "inherit", padding: n = "normal", si
|
|
|
4830
4547
|
children: c
|
|
4831
4548
|
});
|
|
4832
4549
|
};
|
|
4833
|
-
|
|
4834
|
-
var
|
|
4835
|
-
Head:
|
|
4836
|
-
Body:
|
|
4837
|
-
Row:
|
|
4838
|
-
Cell:
|
|
4839
|
-
}),
|
|
4550
|
+
ur.displayName = "TableCell";
|
|
4551
|
+
var dr = Object.assign(or, {
|
|
4552
|
+
Head: sr,
|
|
4553
|
+
Body: cr,
|
|
4554
|
+
Row: lr,
|
|
4555
|
+
Cell: ur
|
|
4556
|
+
}), fr = ({ tabs: e = [], activeIndex: t, onChange: n, variant: r = "default", children: i, className: a = "", ...s }) => {
|
|
4840
4557
|
let [c, l] = u(t || 0), d = t !== void 0, f = d ? t : c;
|
|
4841
4558
|
o(() => {
|
|
4842
4559
|
d && l(t);
|
|
@@ -4874,10 +4591,10 @@ var lr = Object.assign(ir, {
|
|
|
4874
4591
|
})]
|
|
4875
4592
|
});
|
|
4876
4593
|
};
|
|
4877
|
-
|
|
4594
|
+
fr.displayName = "Tabs";
|
|
4878
4595
|
//#endregion
|
|
4879
4596
|
//#region src/components/TextField/TextField.jsx
|
|
4880
|
-
var
|
|
4597
|
+
var pr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeholder: i = "", helperText: a = "", error: s = "", required: c = !1, disabled: l = !1, readonly: d = !1, autoFocus: f = !1, fullWidth: p = !1, multiline: m = !1, rows: h = 4, maxRows: g, minRows: _, variant: v = "filled", size: y = "md", color: b = "primary", startAdornment: x = null, endAdornment: S = null, maxLength: C, minLength: w, pattern: T, autoComplete: E = "off", name: D = "", id: O = "", className: k = "", style: j = {}, onFocus: M, onBlur: N, onKeyDown: P, onKeyUp: F, onKeyPress: I, ...L }) => {
|
|
4881
4598
|
let [R, z] = u(!1), [B, V] = u(!!e);
|
|
4882
4599
|
o(() => {
|
|
4883
4600
|
V(!!e);
|
|
@@ -4964,39 +4681,39 @@ var dr = ({ value: e = "", onChange: t, type: n = "text", label: r = "", placeho
|
|
|
4964
4681
|
]
|
|
4965
4682
|
});
|
|
4966
4683
|
};
|
|
4967
|
-
|
|
4684
|
+
pr.displayName = "TextField";
|
|
4968
4685
|
//#endregion
|
|
4969
4686
|
//#region ../core/src/components/Toolbar/utils.js
|
|
4970
|
-
var
|
|
4687
|
+
var mr = (e, t, n = "") => {
|
|
4971
4688
|
let r = ["flex items-center w-full"];
|
|
4972
4689
|
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(" ");
|
|
4973
|
-
},
|
|
4974
|
-
className:
|
|
4690
|
+
}, hr = ({ children: e, variant: t = "regular", disableGutters: n = !1, className: r = "", style: i = {}, ...a }) => /* @__PURE__ */ (0, A.jsx)("div", {
|
|
4691
|
+
className: mr(t, n, r),
|
|
4975
4692
|
style: i,
|
|
4976
4693
|
...a,
|
|
4977
4694
|
children: e
|
|
4978
|
-
}),
|
|
4695
|
+
}), gr = {
|
|
4979
4696
|
top: "wc-tooltip--top",
|
|
4980
4697
|
bottom: "wc-tooltip--bottom",
|
|
4981
4698
|
left: "wc-tooltip--left",
|
|
4982
4699
|
right: "wc-tooltip--right"
|
|
4983
|
-
},
|
|
4700
|
+
}, _r = [
|
|
4984
4701
|
"top",
|
|
4985
4702
|
"bottom",
|
|
4986
4703
|
"left",
|
|
4987
4704
|
"right"
|
|
4988
4705
|
];
|
|
4989
|
-
function
|
|
4990
|
-
return
|
|
4706
|
+
function vr(e) {
|
|
4707
|
+
return _r.includes(e);
|
|
4991
4708
|
}
|
|
4992
|
-
function
|
|
4993
|
-
return
|
|
4709
|
+
function yr(e) {
|
|
4710
|
+
return gr[e] || gr.top;
|
|
4994
4711
|
}
|
|
4995
4712
|
//#endregion
|
|
4996
4713
|
//#region src/components/Tooltip/Tooltip.jsx
|
|
4997
|
-
function
|
|
4998
|
-
|
|
4999
|
-
let [i, a] = u(!1), [o, s] = u(!1), c =
|
|
4714
|
+
function br({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
4715
|
+
vr(t) || console.warn(`Invalid tooltip placement: ${t}. Using 'top' as default.`);
|
|
4716
|
+
let [i, a] = u(!1), [o, s] = u(!1), c = yr(t);
|
|
5000
4717
|
return /* @__PURE__ */ (0, A.jsxs)("span", {
|
|
5001
4718
|
className: `wc-tooltip-wrapper relative inline-block ${r}`,
|
|
5002
4719
|
onMouseEnter: () => {
|
|
@@ -5013,7 +4730,7 @@ function vr({ text: e, placement: t = "top", children: n, className: r = "" }) {
|
|
|
5013
4730
|
}
|
|
5014
4731
|
//#endregion
|
|
5015
4732
|
//#region ../core/src/components/Typography/utils.js
|
|
5016
|
-
var
|
|
4733
|
+
var xr = {
|
|
5017
4734
|
h1: "h1",
|
|
5018
4735
|
h2: "h2",
|
|
5019
4736
|
h3: "h3",
|
|
@@ -5027,7 +4744,7 @@ var yr = {
|
|
|
5027
4744
|
caption: "span",
|
|
5028
4745
|
overline: "span",
|
|
5029
4746
|
button: "span"
|
|
5030
|
-
},
|
|
4747
|
+
}, Sr = {
|
|
5031
4748
|
h1: "text-6xl font-light tracking-tight",
|
|
5032
4749
|
h2: "text-5xl font-light tracking-tight",
|
|
5033
4750
|
h3: "text-4xl font-normal",
|
|
@@ -5041,7 +4758,7 @@ var yr = {
|
|
|
5041
4758
|
caption: "text-xs font-normal",
|
|
5042
4759
|
overline: "text-xs font-medium uppercase tracking-wide",
|
|
5043
4760
|
button: "text-sm font-medium uppercase tracking-wide"
|
|
5044
|
-
},
|
|
4761
|
+
}, Cr = {
|
|
5045
4762
|
inherit: "text-inherit",
|
|
5046
4763
|
primary: "text-primary-600 dark:text-primary-400",
|
|
5047
4764
|
secondary: "text-neutral-600 dark:text-neutral-400",
|
|
@@ -5051,12 +4768,12 @@ var yr = {
|
|
|
5051
4768
|
textPrimary: "text-neutral-900 dark:text-neutral-100",
|
|
5052
4769
|
textSecondary: "text-neutral-600 dark:text-neutral-400",
|
|
5053
4770
|
textDisabled: "text-neutral-400 dark:text-neutral-600"
|
|
5054
|
-
},
|
|
4771
|
+
}, wr = {
|
|
5055
4772
|
left: "text-left",
|
|
5056
4773
|
center: "text-center",
|
|
5057
4774
|
right: "text-right",
|
|
5058
4775
|
justify: "text-justify"
|
|
5059
|
-
},
|
|
4776
|
+
}, Tr = {
|
|
5060
4777
|
h1: "1.2",
|
|
5061
4778
|
h2: "1.2",
|
|
5062
4779
|
h3: "1.3",
|
|
@@ -5071,14 +4788,14 @@ var yr = {
|
|
|
5071
4788
|
overline: "1.4",
|
|
5072
4789
|
button: "1.4"
|
|
5073
4790
|
};
|
|
5074
|
-
function
|
|
5075
|
-
return t ||
|
|
4791
|
+
function Er(e, t) {
|
|
4792
|
+
return t || xr[e] || "p";
|
|
5076
4793
|
}
|
|
5077
|
-
function
|
|
4794
|
+
function Dr(e, t, n, r, i, a = "") {
|
|
5078
4795
|
return [
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
n === "inherit" ? null :
|
|
4796
|
+
Sr[e],
|
|
4797
|
+
Cr[t],
|
|
4798
|
+
n === "inherit" ? null : wr[n],
|
|
5082
4799
|
r ? "mb-4" : null,
|
|
5083
4800
|
i ? "truncate" : null,
|
|
5084
4801
|
a
|
|
@@ -5086,19 +4803,19 @@ function Tr(e, t, n, r, i, a = "") {
|
|
|
5086
4803
|
}
|
|
5087
4804
|
//#endregion
|
|
5088
4805
|
//#region src/components/Typography/Typography.jsx
|
|
5089
|
-
var
|
|
5090
|
-
className:
|
|
4806
|
+
var Or = ({ 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__ */ (0, A.jsx)(Er(e, t), {
|
|
4807
|
+
className: Dr(e, n, r, i, a, s),
|
|
5091
4808
|
style: {
|
|
5092
|
-
lineHeight:
|
|
4809
|
+
lineHeight: Tr[e],
|
|
5093
4810
|
...c
|
|
5094
4811
|
},
|
|
5095
4812
|
...l,
|
|
5096
4813
|
children: o
|
|
5097
4814
|
});
|
|
5098
|
-
|
|
4815
|
+
Or.displayName = "Typography";
|
|
5099
4816
|
//#endregion
|
|
5100
4817
|
//#region ../core/src/components/TypingText/utils.jsx
|
|
5101
|
-
var
|
|
4818
|
+
var kr = class {
|
|
5102
4819
|
constructor(e, t = {}) {
|
|
5103
4820
|
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 || (() => {});
|
|
5104
4821
|
}
|
|
@@ -5119,9 +4836,9 @@ var Dr = class {
|
|
|
5119
4836
|
updateText(e) {
|
|
5120
4837
|
this.text = e, this.reset(), this.start();
|
|
5121
4838
|
}
|
|
5122
|
-
},
|
|
4839
|
+
}, Ar = ({ text: e = "Hello, Watercolor UI!", speed: t = 100, pause: n = 1500, loop: r = !1, erase: i = !1, showCursor: a = !0, className: s = "", style: c = {}, ...d }) => {
|
|
5123
4840
|
let [f, p] = u(""), m = l(null);
|
|
5124
|
-
return o(() => (m.current = new
|
|
4841
|
+
return o(() => (m.current = new kr(e, {
|
|
5125
4842
|
speed: t,
|
|
5126
4843
|
pause: n,
|
|
5127
4844
|
loop: r,
|
|
@@ -5145,10 +4862,10 @@ var Dr = class {
|
|
|
5145
4862
|
}), a && /* @__PURE__ */ (0, A.jsx)("span", { className: "typing-cursor" })]
|
|
5146
4863
|
});
|
|
5147
4864
|
};
|
|
5148
|
-
|
|
4865
|
+
Ar.displayName = "TypingText";
|
|
5149
4866
|
//#endregion
|
|
5150
4867
|
//#region src/components/Input/VerificationCodeInput.jsx
|
|
5151
|
-
var
|
|
4868
|
+
var jr = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus: i = !1, className: a = "", ...s }) => {
|
|
5152
4869
|
let c = l([]);
|
|
5153
4870
|
o(() => {
|
|
5154
4871
|
typeof t == "string" && t.split("").forEach((e, t) => {
|
|
@@ -5195,23 +4912,23 @@ var kr = ({ length: e = 6, value: t = "", onChange: n, onComplete: r, autoFocus:
|
|
|
5195
4912
|
}, t))
|
|
5196
4913
|
});
|
|
5197
4914
|
};
|
|
5198
|
-
|
|
4915
|
+
jr.displayName = "VerificationCodeInput";
|
|
5199
4916
|
//#endregion
|
|
5200
4917
|
//#region ../core/src/components/VideoPlayer/utils.js
|
|
5201
|
-
function
|
|
4918
|
+
function Mr(e) {
|
|
5202
4919
|
return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
5203
4920
|
}
|
|
5204
|
-
function
|
|
4921
|
+
function Nr(e, t) {
|
|
5205
4922
|
let n = e.currentTarget.getBoundingClientRect();
|
|
5206
4923
|
return (e.clientX - n.left) / n.width * t;
|
|
5207
4924
|
}
|
|
5208
|
-
function
|
|
4925
|
+
function Pr(e) {
|
|
5209
4926
|
e && (document.fullscreenElement ? document.exitFullscreen?.() : e.requestFullscreen?.());
|
|
5210
4927
|
}
|
|
5211
4928
|
//#endregion
|
|
5212
4929
|
//#region src/components/VideoPlayer/VideoPlayer.jsx
|
|
5213
|
-
var
|
|
5214
|
-
let s = l(null), [c, d] = u(!1), [f, p] = u(0), [m, h] = u(.7), [g, _] = u(!1), [v, y] = u(0), [b, x] = u(0), S =
|
|
4930
|
+
var Fr = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i = {}, ...a }) => {
|
|
4931
|
+
let s = l(null), [c, d] = u(!1), [f, p] = u(0), [m, h] = u(.7), [g, _] = u(!1), [v, y] = u(0), [b, x] = u(0), S = Mr(b), C = Mr(v), w = () => {
|
|
5215
4932
|
let e = s.current;
|
|
5216
4933
|
e && (e.paused ? e.play() : e.pause());
|
|
5217
4934
|
}, T = () => {
|
|
@@ -5219,14 +4936,14 @@ var Nr = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5219
4936
|
e && (y(e.duration || 0), x(e.currentTime), p(e.duration ? e.currentTime / e.duration * 100 : 0), d(!e.paused));
|
|
5220
4937
|
}, E = (e) => {
|
|
5221
4938
|
let t = s.current;
|
|
5222
|
-
t && (t.currentTime =
|
|
4939
|
+
t && (t.currentTime = Nr(e, v));
|
|
5223
4940
|
}, D = () => {
|
|
5224
4941
|
_((e) => {
|
|
5225
4942
|
let t = !e;
|
|
5226
4943
|
return s.current && (s.current.muted = t), t;
|
|
5227
4944
|
});
|
|
5228
4945
|
}, O = () => {
|
|
5229
|
-
|
|
4946
|
+
Pr(s.current?.parentElement);
|
|
5230
4947
|
};
|
|
5231
4948
|
return o(() => {
|
|
5232
4949
|
s.current && (s.current.volume = m);
|
|
@@ -5294,10 +5011,10 @@ var Nr = ({ src: e, autoplay: t = !1, loop: n = !1, className: r = "", style: i
|
|
|
5294
5011
|
})]
|
|
5295
5012
|
});
|
|
5296
5013
|
};
|
|
5297
|
-
|
|
5014
|
+
Fr.displayName = "VideoPlayer";
|
|
5298
5015
|
//#endregion
|
|
5299
5016
|
//#region ../core/src/components/Watermark/utils.js
|
|
5300
|
-
var
|
|
5017
|
+
var Ir = {
|
|
5301
5018
|
content: "",
|
|
5302
5019
|
cross: !1,
|
|
5303
5020
|
debug: !1,
|
|
@@ -5325,14 +5042,14 @@ var Pr = {
|
|
|
5325
5042
|
yOffset: 0,
|
|
5326
5043
|
zIndex: 10
|
|
5327
5044
|
};
|
|
5328
|
-
function
|
|
5045
|
+
function Lr(e) {
|
|
5329
5046
|
if (typeof e == "string" && e.startsWith("var(")) {
|
|
5330
5047
|
let t = e.match(/--[^, )]+/);
|
|
5331
5048
|
if (t) return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim() || e;
|
|
5332
5049
|
}
|
|
5333
5050
|
return e;
|
|
5334
5051
|
}
|
|
5335
|
-
function
|
|
5052
|
+
function Rr(e) {
|
|
5336
5053
|
let t = document.createElement("canvas"), n = t.getContext("2d"), r = e.width, i = e.height;
|
|
5337
5054
|
if (!e.image && e.content) {
|
|
5338
5055
|
n.font = `${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;
|
|
@@ -5348,14 +5065,14 @@ function Ir(e) {
|
|
|
5348
5065
|
}, i.src = e.image;
|
|
5349
5066
|
});
|
|
5350
5067
|
let a = (e.content || "").split(/\n/);
|
|
5351
|
-
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ?
|
|
5068
|
+
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ? Lr(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);
|
|
5352
5069
|
let o = -(a.length - 1) * e.lineHeight / 2;
|
|
5353
5070
|
return a.forEach((t, r) => {
|
|
5354
5071
|
let i = o + r * e.lineHeight;
|
|
5355
5072
|
n.fillText(t, 0, i);
|
|
5356
5073
|
}), Promise.resolve(t.toDataURL());
|
|
5357
5074
|
}
|
|
5358
|
-
function
|
|
5075
|
+
function zr(e, t) {
|
|
5359
5076
|
let n = {
|
|
5360
5077
|
position: e.fullscreen ? "fixed" : "absolute",
|
|
5361
5078
|
top: 0,
|
|
@@ -5374,15 +5091,15 @@ function Lr(e, t) {
|
|
|
5374
5091
|
}
|
|
5375
5092
|
//#endregion
|
|
5376
5093
|
//#region src/components/Watermark/Watermark.jsx
|
|
5377
|
-
var
|
|
5094
|
+
var Br = (e) => {
|
|
5378
5095
|
let t = {
|
|
5379
|
-
...
|
|
5096
|
+
...Ir,
|
|
5380
5097
|
...e
|
|
5381
5098
|
}, [n, r] = u(""), i = !!t.content || !!t.image;
|
|
5382
5099
|
o(() => {
|
|
5383
5100
|
if (!i) return;
|
|
5384
5101
|
let e = !0;
|
|
5385
|
-
return
|
|
5102
|
+
return Rr(t).then((t) => {
|
|
5386
5103
|
e && r(t);
|
|
5387
5104
|
}), () => {
|
|
5388
5105
|
e = !1;
|
|
@@ -5391,7 +5108,7 @@ var Rr = (e) => {
|
|
|
5391
5108
|
let { children: e, ...n } = t;
|
|
5392
5109
|
return JSON.stringify(n);
|
|
5393
5110
|
}, [t]), i]);
|
|
5394
|
-
let a = c(() => i ?
|
|
5111
|
+
let a = c(() => i ? zr(t, n) : {}, [
|
|
5395
5112
|
n,
|
|
5396
5113
|
i,
|
|
5397
5114
|
t
|
|
@@ -5401,10 +5118,10 @@ var Rr = (e) => {
|
|
|
5401
5118
|
style: a
|
|
5402
5119
|
}), t.children] }) : t.children || null;
|
|
5403
5120
|
};
|
|
5404
|
-
|
|
5121
|
+
Br.displayName = "Watermark";
|
|
5405
5122
|
//#endregion
|
|
5406
5123
|
//#region src/utils/theme.ts
|
|
5407
|
-
function
|
|
5124
|
+
function Vr(e) {
|
|
5408
5125
|
let t = document.documentElement;
|
|
5409
5126
|
e.primary && Object.entries(e.primary).forEach(([e, n]) => {
|
|
5410
5127
|
t.style.setProperty(`--wc-primary-${e}`, n);
|
|
@@ -5430,15 +5147,15 @@ function zr(e) {
|
|
|
5430
5147
|
t.style.setProperty(`--wc-teal-${e}`, n);
|
|
5431
5148
|
}), e.indigo && Object.entries(e.indigo).forEach(([e, n]) => {
|
|
5432
5149
|
t.style.setProperty(`--wc-indigo-${e}`, n);
|
|
5433
|
-
}), e.fonts &&
|
|
5150
|
+
}), e.fonts && Ur(e.fonts), e.radius && Object.entries(e.radius).forEach(([e, n]) => {
|
|
5434
5151
|
let r = `--wc-radius-${e}`;
|
|
5435
5152
|
t.style.setProperty(r, n);
|
|
5436
5153
|
});
|
|
5437
5154
|
}
|
|
5438
|
-
function
|
|
5155
|
+
function Hr(e) {
|
|
5439
5156
|
console.warn("applyCSSTheme is deprecated. Use loadThemeConfig() for file-based themes.");
|
|
5440
5157
|
}
|
|
5441
|
-
function
|
|
5158
|
+
function Ur(e) {
|
|
5442
5159
|
let t = document.documentElement, n = [];
|
|
5443
5160
|
e.chinese && n.push(`"${e.chinese}"`), e.english && n.push(`"${e.english}"`);
|
|
5444
5161
|
let r = e.fallback || "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"";
|
|
@@ -5446,14 +5163,14 @@ function Vr(e) {
|
|
|
5446
5163
|
let i = n.join(", ");
|
|
5447
5164
|
t.style.setProperty("--wc-font-family", i), t.style.setProperty("--wc-font-chinese", e.chinese || ""), t.style.setProperty("--wc-font-english", e.english || ""), document.body.style.fontFamily = i;
|
|
5448
5165
|
}
|
|
5449
|
-
function
|
|
5166
|
+
function Wr(e) {
|
|
5450
5167
|
let t = document.documentElement;
|
|
5451
5168
|
e ? t.classList.add("dark") : t.classList.remove("dark");
|
|
5452
5169
|
}
|
|
5453
|
-
function
|
|
5170
|
+
function Gr() {
|
|
5454
5171
|
return document.documentElement.classList.contains("dark");
|
|
5455
5172
|
}
|
|
5456
|
-
var
|
|
5173
|
+
var Kr = { default: {
|
|
5457
5174
|
primary: {
|
|
5458
5175
|
50: "#eff6ff",
|
|
5459
5176
|
100: "#dbeafe",
|
|
@@ -5479,16 +5196,16 @@ var Wr = { default: {
|
|
|
5479
5196
|
900: "#312e81"
|
|
5480
5197
|
}
|
|
5481
5198
|
} };
|
|
5482
|
-
function
|
|
5199
|
+
function qr(e) {
|
|
5483
5200
|
if (console.warn("applyTheme is deprecated. Use loadThemeConfig() for file-based themes."), e === "default") {
|
|
5484
|
-
let t =
|
|
5485
|
-
|
|
5201
|
+
let t = Kr[e];
|
|
5202
|
+
Vr({
|
|
5486
5203
|
primary: t.primary,
|
|
5487
5204
|
secondary: t.secondary
|
|
5488
5205
|
});
|
|
5489
5206
|
} else console.warn(`Theme "${e}" is no longer supported. Please use theme.config.json file.`);
|
|
5490
5207
|
}
|
|
5491
|
-
var
|
|
5208
|
+
var Jr = {
|
|
5492
5209
|
system: {
|
|
5493
5210
|
english: "system-ui",
|
|
5494
5211
|
chinese: "system-ui",
|
|
@@ -5525,10 +5242,10 @@ var Kr = {
|
|
|
5525
5242
|
fallback: "\"Roboto\", \"Noto Sans SC\", sans-serif"
|
|
5526
5243
|
}
|
|
5527
5244
|
};
|
|
5528
|
-
function
|
|
5529
|
-
|
|
5245
|
+
function Yr(e) {
|
|
5246
|
+
Ur(Jr[e]);
|
|
5530
5247
|
}
|
|
5531
|
-
function
|
|
5248
|
+
function Xr() {
|
|
5532
5249
|
let e = document.documentElement;
|
|
5533
5250
|
return {
|
|
5534
5251
|
chinese: e.style.getPropertyValue("--wc-font-chinese") || void 0,
|
|
@@ -5536,7 +5253,7 @@ function Jr() {
|
|
|
5536
5253
|
fallback: e.style.getPropertyValue("--wc-font-family") || void 0
|
|
5537
5254
|
};
|
|
5538
5255
|
}
|
|
5539
|
-
async function
|
|
5256
|
+
async function Zr(e = "/theme.config.json") {
|
|
5540
5257
|
if (!(typeof window > "u" || typeof fetch > "u")) try {
|
|
5541
5258
|
let t = await fetch(e, { cache: "no-store" });
|
|
5542
5259
|
if (!t.ok) {
|
|
@@ -5544,29 +5261,29 @@ async function Yr(e = "/theme.config.json") {
|
|
|
5544
5261
|
return;
|
|
5545
5262
|
}
|
|
5546
5263
|
let n = await t.json();
|
|
5547
|
-
|
|
5264
|
+
Vr(n), n.fonts && Ur(n.fonts), console.info("[Watercolor UI] Theme loaded from theme.config.json");
|
|
5548
5265
|
} catch (e) {
|
|
5549
5266
|
console.warn("[Watercolor UI] 无法加载自定义 theme.config.json:", e), console.info("[Watercolor UI] Using default theme");
|
|
5550
5267
|
}
|
|
5551
5268
|
}
|
|
5552
|
-
typeof window < "u" &&
|
|
5269
|
+
typeof window < "u" && Zr();
|
|
5553
5270
|
//#endregion
|
|
5554
5271
|
//#region src/utils/themeManager.ts
|
|
5555
|
-
function
|
|
5556
|
-
return
|
|
5272
|
+
function Qr() {
|
|
5273
|
+
return Kr.default;
|
|
5557
5274
|
}
|
|
5558
|
-
function
|
|
5275
|
+
function $r(e = "default", t = !1) {
|
|
5559
5276
|
let n = typeof window < "u" && typeof document < "u", r = null, i = null;
|
|
5560
5277
|
if (n) try {
|
|
5561
5278
|
r = localStorage.getItem("wc-color"), i = localStorage.getItem("wc-scheme");
|
|
5562
5279
|
} catch {}
|
|
5563
5280
|
let a = r || e, o = i ? i === "dark" : t;
|
|
5564
5281
|
if (n) {
|
|
5565
|
-
let e =
|
|
5566
|
-
|
|
5282
|
+
let e = Qr();
|
|
5283
|
+
Vr({
|
|
5567
5284
|
primary: e.primary,
|
|
5568
5285
|
secondary: e.secondary
|
|
5569
|
-
}),
|
|
5286
|
+
}), Wr(o);
|
|
5570
5287
|
}
|
|
5571
5288
|
return {
|
|
5572
5289
|
get color() {
|
|
@@ -5577,8 +5294,8 @@ function Zr(e = "default", t = !1) {
|
|
|
5577
5294
|
},
|
|
5578
5295
|
setColor: (e) => {
|
|
5579
5296
|
if (e !== a && (a = e, n)) {
|
|
5580
|
-
let t =
|
|
5581
|
-
|
|
5297
|
+
let t = Qr();
|
|
5298
|
+
Vr({
|
|
5582
5299
|
primary: t.primary,
|
|
5583
5300
|
secondary: t.secondary
|
|
5584
5301
|
});
|
|
@@ -5589,7 +5306,7 @@ function Zr(e = "default", t = !1) {
|
|
|
5589
5306
|
},
|
|
5590
5307
|
toggleDark: () => {
|
|
5591
5308
|
if (o = !o, n) {
|
|
5592
|
-
|
|
5309
|
+
Wr(o);
|
|
5593
5310
|
try {
|
|
5594
5311
|
localStorage.setItem("wc-scheme", o ? "dark" : "light");
|
|
5595
5312
|
} catch {}
|
|
@@ -5599,26 +5316,26 @@ function Zr(e = "default", t = !1) {
|
|
|
5599
5316
|
}
|
|
5600
5317
|
//#endregion
|
|
5601
5318
|
//#region src/ThemeReact.tsx
|
|
5602
|
-
var
|
|
5603
|
-
let [t, n] = u(
|
|
5604
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
5319
|
+
var ei = n(void 0), ti = $r(), ni = ({ children: e }) => {
|
|
5320
|
+
let [t, n] = u(ti.color), [r, i] = u(ti.dark);
|
|
5321
|
+
return /* @__PURE__ */ (0, A.jsx)(ei.Provider, {
|
|
5605
5322
|
value: {
|
|
5606
5323
|
color: t,
|
|
5607
5324
|
setColor: (e) => {
|
|
5608
|
-
|
|
5325
|
+
ti.setColor(e), n(e);
|
|
5609
5326
|
},
|
|
5610
5327
|
dark: r,
|
|
5611
5328
|
toggleDark: () => {
|
|
5612
|
-
|
|
5329
|
+
ti.toggleDark(), i(ti.dark);
|
|
5613
5330
|
}
|
|
5614
5331
|
},
|
|
5615
5332
|
children: e
|
|
5616
5333
|
});
|
|
5617
5334
|
};
|
|
5618
|
-
function
|
|
5619
|
-
let e = a(
|
|
5335
|
+
function ri() {
|
|
5336
|
+
let e = a(ei);
|
|
5620
5337
|
if (!e) throw Error("useTheme must be used within ThemeProvider");
|
|
5621
5338
|
return e;
|
|
5622
5339
|
}
|
|
5623
5340
|
//#endregion
|
|
5624
|
-
export { j as Accordion, F as Alert, I as AppBar, L as Autocomplete, U as Avatar, J as Badge, ie as Banner, ce as Blockquote, ge as Box, Ce as Breadcrumb, ke as Button, se as Card, Ae as CardActions, je as CardContent, Pe as Checkbox, Be as Chip, qe as CircularProgress, Ze as ColorPicker, et as Container, ct as Copy, ht as DatePicker, gt as Fab, Dt as Feature, vt as Feed, Ot as FileInput, At as FormControl, jt as FormControlLabel, Mt as FormGroup, Nt as FormHelperText, Pt as Grid, Ft as HoverCard,
|
|
5341
|
+
export { j as Accordion, F as Alert, I as AppBar, L as Autocomplete, U as Avatar, J as Badge, ie as Banner, ce as Blockquote, ge as Box, Ce as Breadcrumb, ke as Button, se as Card, Ae as CardActions, je as CardContent, Pe as Checkbox, Be as Chip, qe as CircularProgress, Ze as ColorPicker, et as Container, ct as Copy, ht as DatePicker, gt as Fab, Dt as Feature, vt as Feed, Ot as FileInput, At as FormControl, jt as FormControlLabel, Mt as FormGroup, Nt as FormHelperText, Pt as Grid, Ft as HoverCard, Zt as Icon, Qt as IconButton, $t as ImageGallery, en as Input, sn as List, cn as ListItem, ln as ListItemIcon, un as ListItemText, yn as Menu, En as Modal, Dn as NumberAnimation, On as Pagination, Pn as Paper, Fn as Popover, In as PricingTable, Ln as Progress, Bn as Radio, zn as RadioGroup, Vn as Rating, Hn as Select, Wn as Skeleton, Kn as SlideOver, Gn as Slider, Jn as Snackbar, rr as Status, ir as Switch, dr as Table, cr as TableBody, ur as TableCell, sr as TableHead, lr as TableRow, fr as Tabs, pr as TextField, ni as ThemeProvider, hr as Toolbar, br as Tooltip, Ar as TypingText, Or as Typography, jr as VerificationCodeInput, Fr as VideoPlayer, Br as Watermark, Hr as applyCSSTheme, Yr as applyFontTheme, qr as applyTheme, Jr as fontThemes, Xr as getCurrentFonts, Gr as isDarkMode, Zr as loadThemeConfig, Ur as setFonts, Vr as setTheme, Kr as themes, Wr as toggleDarkMode, ri as useTheme };
|