tango-ui-cw 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -0
- package/dist/index.js +10 -10
- package/dist/index.mjs +1347 -352
- package/package.json +6 -3
package/dist/index.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
var
|
1
|
+
import fe, { useRef as Ke, useState as F, useEffect as pe } from "react";
|
2
|
+
import n from "prop-types";
|
3
|
+
var re = { exports: {} }, H = {};
|
4
4
|
/**
|
5
5
|
* @license React
|
6
6
|
* react-jsx-runtime.production.min.js
|
@@ -10,21 +10,21 @@ var M = { exports: {} }, I = {};
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
12
12
|
*/
|
13
|
-
var
|
14
|
-
function
|
15
|
-
if (
|
16
|
-
|
17
|
-
var
|
18
|
-
function
|
19
|
-
var
|
20
|
-
|
21
|
-
for (
|
22
|
-
if (
|
23
|
-
return { $$typeof:
|
13
|
+
var Ve;
|
14
|
+
function $t() {
|
15
|
+
if (Ve) return H;
|
16
|
+
Ve = 1;
|
17
|
+
var g = fe, t = Symbol.for("react.element"), m = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, l = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
|
18
|
+
function d(p, c, x) {
|
19
|
+
var o, u = {}, v = null, E = null;
|
20
|
+
x !== void 0 && (v = "" + x), c.key !== void 0 && (v = "" + c.key), c.ref !== void 0 && (E = c.ref);
|
21
|
+
for (o in c) a.call(c, o) && !h.hasOwnProperty(o) && (u[o] = c[o]);
|
22
|
+
if (p && p.defaultProps) for (o in c = p.defaultProps, c) u[o] === void 0 && (u[o] = c[o]);
|
23
|
+
return { $$typeof: t, type: p, key: v, ref: E, props: u, _owner: l.current };
|
24
24
|
}
|
25
|
-
return
|
25
|
+
return H.Fragment = m, H.jsx = d, H.jsxs = d, H;
|
26
26
|
}
|
27
|
-
var
|
27
|
+
var G = {};
|
28
28
|
/**
|
29
29
|
* @license React
|
30
30
|
* react-jsx-runtime.development.js
|
@@ -34,91 +34,91 @@ var $ = {};
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
36
36
|
*/
|
37
|
-
var
|
38
|
-
function
|
39
|
-
return
|
40
|
-
var
|
41
|
-
function
|
37
|
+
var ze;
|
38
|
+
function Nt() {
|
39
|
+
return ze || (ze = 1, process.env.NODE_ENV !== "production" && function() {
|
40
|
+
var g = fe, t = Symbol.for("react.element"), m = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), p = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), o = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), E = Symbol.for("react.offscreen"), N = Symbol.iterator, C = "@@iterator";
|
41
|
+
function T(e) {
|
42
42
|
if (e === null || typeof e != "object")
|
43
43
|
return null;
|
44
|
-
var r =
|
44
|
+
var r = N && e[N] || e[C];
|
45
45
|
return typeof r == "function" ? r : null;
|
46
46
|
}
|
47
|
-
var
|
48
|
-
function
|
47
|
+
var R = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
48
|
+
function k(e) {
|
49
49
|
{
|
50
|
-
for (var r = arguments.length,
|
51
|
-
|
52
|
-
|
50
|
+
for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), f = 1; f < r; f++)
|
51
|
+
i[f - 1] = arguments[f];
|
52
|
+
D("error", e, i);
|
53
53
|
}
|
54
54
|
}
|
55
|
-
function
|
55
|
+
function D(e, r, i) {
|
56
56
|
{
|
57
|
-
var
|
58
|
-
|
59
|
-
var
|
60
|
-
return String(
|
57
|
+
var f = R.ReactDebugCurrentFrame, j = f.getStackAddendum();
|
58
|
+
j !== "" && (r += "%s", i = i.concat([j]));
|
59
|
+
var S = i.map(function(y) {
|
60
|
+
return String(y);
|
61
61
|
});
|
62
|
-
|
62
|
+
S.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, S);
|
63
63
|
}
|
64
64
|
}
|
65
|
-
var
|
66
|
-
|
67
|
-
function
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
65
|
+
var V = !1, L = !1, B = !1, X = !1, z = !1, me;
|
66
|
+
me = Symbol.for("react.module.reference");
|
67
|
+
function Qe(e) {
|
68
|
+
return !!(typeof e == "string" || typeof e == "function" || e === a || e === h || z || e === l || e === x || e === o || X || e === E || V || L || B || typeof e == "object" && e !== null && (e.$$typeof === v || e.$$typeof === u || e.$$typeof === d || e.$$typeof === p || e.$$typeof === c || // This needs to include all possible module reference object
|
69
69
|
// types supported by any Flight configuration anywhere since
|
70
70
|
// we don't know which Flight build this will end up being used
|
71
71
|
// with.
|
72
|
-
e.$$typeof ===
|
72
|
+
e.$$typeof === me || e.getModuleId !== void 0));
|
73
73
|
}
|
74
|
-
function
|
75
|
-
var
|
76
|
-
if (
|
77
|
-
return
|
78
|
-
var
|
79
|
-
return
|
74
|
+
function et(e, r, i) {
|
75
|
+
var f = e.displayName;
|
76
|
+
if (f)
|
77
|
+
return f;
|
78
|
+
var j = r.displayName || r.name || "";
|
79
|
+
return j !== "" ? i + "(" + j + ")" : i;
|
80
80
|
}
|
81
|
-
function
|
81
|
+
function he(e) {
|
82
82
|
return e.displayName || "Context";
|
83
83
|
}
|
84
|
-
function
|
84
|
+
function I(e) {
|
85
85
|
if (e == null)
|
86
86
|
return null;
|
87
|
-
if (typeof e.tag == "number" &&
|
87
|
+
if (typeof e.tag == "number" && k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
88
88
|
return e.displayName || e.name || null;
|
89
89
|
if (typeof e == "string")
|
90
90
|
return e;
|
91
91
|
switch (e) {
|
92
|
-
case
|
92
|
+
case a:
|
93
93
|
return "Fragment";
|
94
|
-
case
|
94
|
+
case m:
|
95
95
|
return "Portal";
|
96
|
-
case
|
96
|
+
case h:
|
97
97
|
return "Profiler";
|
98
|
-
case
|
98
|
+
case l:
|
99
99
|
return "StrictMode";
|
100
|
-
case
|
100
|
+
case x:
|
101
101
|
return "Suspense";
|
102
|
-
case
|
102
|
+
case o:
|
103
103
|
return "SuspenseList";
|
104
104
|
}
|
105
105
|
if (typeof e == "object")
|
106
106
|
switch (e.$$typeof) {
|
107
|
-
case
|
107
|
+
case p:
|
108
108
|
var r = e;
|
109
|
-
return
|
110
|
-
case
|
111
|
-
var
|
112
|
-
return
|
113
|
-
case
|
114
|
-
return
|
115
|
-
case
|
116
|
-
var
|
117
|
-
return
|
118
|
-
case
|
119
|
-
var
|
109
|
+
return he(r) + ".Consumer";
|
110
|
+
case d:
|
111
|
+
var i = e;
|
112
|
+
return he(i._context) + ".Provider";
|
113
|
+
case c:
|
114
|
+
return et(e, e.render, "ForwardRef");
|
115
|
+
case u:
|
116
|
+
var f = e.displayName || null;
|
117
|
+
return f !== null ? f : I(e.type) || "Memo";
|
118
|
+
case v: {
|
119
|
+
var j = e, S = j._payload, y = j._init;
|
120
120
|
try {
|
121
|
-
return
|
121
|
+
return I(y(S));
|
122
122
|
} catch {
|
123
123
|
return null;
|
124
124
|
}
|
@@ -126,18 +126,18 @@ function Rr() {
|
|
126
126
|
}
|
127
127
|
return null;
|
128
128
|
}
|
129
|
-
var
|
130
|
-
function
|
129
|
+
var W = Object.assign, J = 0, ge, be, ye, ve, xe, ke, je;
|
130
|
+
function Se() {
|
131
131
|
}
|
132
|
-
|
133
|
-
function
|
132
|
+
Se.__reactDisabledLog = !0;
|
133
|
+
function tt() {
|
134
134
|
{
|
135
|
-
if (
|
136
|
-
|
135
|
+
if (J === 0) {
|
136
|
+
ge = console.log, be = console.info, ye = console.warn, ve = console.error, xe = console.group, ke = console.groupCollapsed, je = console.groupEnd;
|
137
137
|
var e = {
|
138
138
|
configurable: !0,
|
139
139
|
enumerable: !0,
|
140
|
-
value:
|
140
|
+
value: Se,
|
141
141
|
writable: !0
|
142
142
|
};
|
143
143
|
Object.defineProperties(console, {
|
@@ -150,332 +150,332 @@ function Rr() {
|
|
150
150
|
groupEnd: e
|
151
151
|
});
|
152
152
|
}
|
153
|
-
|
153
|
+
J++;
|
154
154
|
}
|
155
155
|
}
|
156
|
-
function
|
156
|
+
function rt() {
|
157
157
|
{
|
158
|
-
if (
|
158
|
+
if (J--, J === 0) {
|
159
159
|
var e = {
|
160
160
|
configurable: !0,
|
161
161
|
enumerable: !0,
|
162
162
|
writable: !0
|
163
163
|
};
|
164
164
|
Object.defineProperties(console, {
|
165
|
-
log:
|
166
|
-
value:
|
165
|
+
log: W({}, e, {
|
166
|
+
value: ge
|
167
167
|
}),
|
168
|
-
info:
|
169
|
-
value:
|
168
|
+
info: W({}, e, {
|
169
|
+
value: be
|
170
170
|
}),
|
171
|
-
warn:
|
172
|
-
value:
|
171
|
+
warn: W({}, e, {
|
172
|
+
value: ye
|
173
173
|
}),
|
174
|
-
error:
|
175
|
-
value:
|
174
|
+
error: W({}, e, {
|
175
|
+
value: ve
|
176
176
|
}),
|
177
|
-
group:
|
178
|
-
value:
|
177
|
+
group: W({}, e, {
|
178
|
+
value: xe
|
179
179
|
}),
|
180
|
-
groupCollapsed:
|
181
|
-
value:
|
180
|
+
groupCollapsed: W({}, e, {
|
181
|
+
value: ke
|
182
182
|
}),
|
183
|
-
groupEnd:
|
184
|
-
value:
|
183
|
+
groupEnd: W({}, e, {
|
184
|
+
value: je
|
185
185
|
})
|
186
186
|
});
|
187
187
|
}
|
188
|
-
|
188
|
+
J < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
189
189
|
}
|
190
190
|
}
|
191
|
-
var
|
192
|
-
function
|
191
|
+
var ne = R.ReactCurrentDispatcher, ae;
|
192
|
+
function Z(e, r, i) {
|
193
193
|
{
|
194
|
-
if (
|
194
|
+
if (ae === void 0)
|
195
195
|
try {
|
196
196
|
throw Error();
|
197
|
-
} catch (
|
198
|
-
var
|
199
|
-
|
197
|
+
} catch (j) {
|
198
|
+
var f = j.stack.trim().match(/\n( *(at )?)/);
|
199
|
+
ae = f && f[1] || "";
|
200
200
|
}
|
201
201
|
return `
|
202
|
-
` +
|
202
|
+
` + ae + e;
|
203
203
|
}
|
204
204
|
}
|
205
|
-
var
|
205
|
+
var se = !1, Q;
|
206
206
|
{
|
207
|
-
var
|
208
|
-
|
207
|
+
var nt = typeof WeakMap == "function" ? WeakMap : Map;
|
208
|
+
Q = new nt();
|
209
209
|
}
|
210
|
-
function
|
211
|
-
if (!e ||
|
210
|
+
function Ce(e, r) {
|
211
|
+
if (!e || se)
|
212
212
|
return "";
|
213
213
|
{
|
214
|
-
var
|
215
|
-
if (
|
216
|
-
return
|
214
|
+
var i = Q.get(e);
|
215
|
+
if (i !== void 0)
|
216
|
+
return i;
|
217
217
|
}
|
218
|
-
var
|
219
|
-
|
220
|
-
var
|
218
|
+
var f;
|
219
|
+
se = !0;
|
220
|
+
var j = Error.prepareStackTrace;
|
221
221
|
Error.prepareStackTrace = void 0;
|
222
|
-
var
|
223
|
-
|
222
|
+
var S;
|
223
|
+
S = ne.current, ne.current = null, tt();
|
224
224
|
try {
|
225
225
|
if (r) {
|
226
|
-
var
|
226
|
+
var y = function() {
|
227
227
|
throw Error();
|
228
228
|
};
|
229
|
-
if (Object.defineProperty(
|
229
|
+
if (Object.defineProperty(y.prototype, "props", {
|
230
230
|
set: function() {
|
231
231
|
throw Error();
|
232
232
|
}
|
233
233
|
}), typeof Reflect == "object" && Reflect.construct) {
|
234
234
|
try {
|
235
|
-
Reflect.construct(
|
236
|
-
} catch (
|
237
|
-
|
235
|
+
Reflect.construct(y, []);
|
236
|
+
} catch (O) {
|
237
|
+
f = O;
|
238
238
|
}
|
239
|
-
Reflect.construct(e, [],
|
239
|
+
Reflect.construct(e, [], y);
|
240
240
|
} else {
|
241
241
|
try {
|
242
|
-
|
243
|
-
} catch (
|
244
|
-
|
242
|
+
y.call();
|
243
|
+
} catch (O) {
|
244
|
+
f = O;
|
245
245
|
}
|
246
|
-
e.call(
|
246
|
+
e.call(y.prototype);
|
247
247
|
}
|
248
248
|
} else {
|
249
249
|
try {
|
250
250
|
throw Error();
|
251
|
-
} catch (
|
252
|
-
|
251
|
+
} catch (O) {
|
252
|
+
f = O;
|
253
253
|
}
|
254
254
|
e();
|
255
255
|
}
|
256
|
-
} catch (
|
257
|
-
if (
|
258
|
-
for (var
|
259
|
-
`),
|
260
|
-
`),
|
261
|
-
|
262
|
-
for (;
|
263
|
-
if (
|
264
|
-
if (
|
256
|
+
} catch (O) {
|
257
|
+
if (O && f && typeof O.stack == "string") {
|
258
|
+
for (var b = O.stack.split(`
|
259
|
+
`), _ = f.stack.split(`
|
260
|
+
`), w = b.length - 1, $ = _.length - 1; w >= 1 && $ >= 0 && b[w] !== _[$]; )
|
261
|
+
$--;
|
262
|
+
for (; w >= 1 && $ >= 0; w--, $--)
|
263
|
+
if (b[w] !== _[$]) {
|
264
|
+
if (w !== 1 || $ !== 1)
|
265
265
|
do
|
266
|
-
if (
|
267
|
-
var
|
268
|
-
` +
|
269
|
-
return e.displayName &&
|
266
|
+
if (w--, $--, $ < 0 || b[w] !== _[$]) {
|
267
|
+
var P = `
|
268
|
+
` + b[w].replace(" at new ", " at ");
|
269
|
+
return e.displayName && P.includes("<anonymous>") && (P = P.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, P), P;
|
270
270
|
}
|
271
|
-
while (
|
271
|
+
while (w >= 1 && $ >= 0);
|
272
272
|
break;
|
273
273
|
}
|
274
274
|
}
|
275
275
|
} finally {
|
276
|
-
|
276
|
+
se = !1, ne.current = S, rt(), Error.prepareStackTrace = j;
|
277
277
|
}
|
278
|
-
var
|
279
|
-
return typeof e == "function" &&
|
278
|
+
var Y = e ? e.displayName || e.name : "", M = Y ? Z(Y) : "";
|
279
|
+
return typeof e == "function" && Q.set(e, M), M;
|
280
280
|
}
|
281
|
-
function
|
282
|
-
return
|
281
|
+
function at(e, r, i) {
|
282
|
+
return Ce(e, !1);
|
283
283
|
}
|
284
|
-
function
|
284
|
+
function st(e) {
|
285
285
|
var r = e.prototype;
|
286
286
|
return !!(r && r.isReactComponent);
|
287
287
|
}
|
288
|
-
function
|
288
|
+
function ee(e, r, i) {
|
289
289
|
if (e == null)
|
290
290
|
return "";
|
291
291
|
if (typeof e == "function")
|
292
|
-
return
|
292
|
+
return Ce(e, st(e));
|
293
293
|
if (typeof e == "string")
|
294
|
-
return
|
294
|
+
return Z(e);
|
295
295
|
switch (e) {
|
296
|
-
case
|
297
|
-
return
|
298
|
-
case
|
299
|
-
return
|
296
|
+
case x:
|
297
|
+
return Z("Suspense");
|
298
|
+
case o:
|
299
|
+
return Z("SuspenseList");
|
300
300
|
}
|
301
301
|
if (typeof e == "object")
|
302
302
|
switch (e.$$typeof) {
|
303
|
-
case
|
304
|
-
return
|
305
|
-
case
|
306
|
-
return
|
307
|
-
case
|
308
|
-
var
|
303
|
+
case c:
|
304
|
+
return at(e.render);
|
305
|
+
case u:
|
306
|
+
return ee(e.type, r, i);
|
307
|
+
case v: {
|
308
|
+
var f = e, j = f._payload, S = f._init;
|
309
309
|
try {
|
310
|
-
return
|
310
|
+
return ee(S(j), r, i);
|
311
311
|
} catch {
|
312
312
|
}
|
313
313
|
}
|
314
314
|
}
|
315
315
|
return "";
|
316
316
|
}
|
317
|
-
var
|
318
|
-
function
|
317
|
+
var K = Object.prototype.hasOwnProperty, Re = {}, Te = R.ReactDebugCurrentFrame;
|
318
|
+
function te(e) {
|
319
319
|
if (e) {
|
320
|
-
var r = e._owner,
|
321
|
-
|
320
|
+
var r = e._owner, i = ee(e.type, e._source, r ? r.type : null);
|
321
|
+
Te.setExtraStackFrame(i);
|
322
322
|
} else
|
323
|
-
|
323
|
+
Te.setExtraStackFrame(null);
|
324
324
|
}
|
325
|
-
function
|
325
|
+
function it(e, r, i, f, j) {
|
326
326
|
{
|
327
|
-
var
|
328
|
-
for (var
|
329
|
-
if (
|
330
|
-
var
|
327
|
+
var S = Function.call.bind(K);
|
328
|
+
for (var y in e)
|
329
|
+
if (S(e, y)) {
|
330
|
+
var b = void 0;
|
331
331
|
try {
|
332
|
-
if (typeof e[
|
333
|
-
var
|
334
|
-
throw
|
332
|
+
if (typeof e[y] != "function") {
|
333
|
+
var _ = Error((f || "React class") + ": " + i + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
334
|
+
throw _.name = "Invariant Violation", _;
|
335
335
|
}
|
336
|
-
|
337
|
-
} catch (
|
338
|
-
|
336
|
+
b = e[y](r, y, f, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
337
|
+
} catch (w) {
|
338
|
+
b = w;
|
339
339
|
}
|
340
|
-
|
340
|
+
b && !(b instanceof Error) && (te(j), k("%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).", f || "React class", i, y, typeof b), te(null)), b instanceof Error && !(b.message in Re) && (Re[b.message] = !0, te(j), k("Failed %s type: %s", i, b.message), te(null));
|
341
341
|
}
|
342
342
|
}
|
343
343
|
}
|
344
|
-
var
|
345
|
-
function
|
346
|
-
return
|
344
|
+
var ot = Array.isArray;
|
345
|
+
function ie(e) {
|
346
|
+
return ot(e);
|
347
347
|
}
|
348
|
-
function
|
348
|
+
function lt(e) {
|
349
349
|
{
|
350
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag,
|
351
|
-
return
|
350
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, i = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
351
|
+
return i;
|
352
352
|
}
|
353
353
|
}
|
354
|
-
function
|
354
|
+
function ct(e) {
|
355
355
|
try {
|
356
|
-
return
|
356
|
+
return we(e), !1;
|
357
357
|
} catch {
|
358
358
|
return !0;
|
359
359
|
}
|
360
360
|
}
|
361
|
-
function
|
361
|
+
function we(e) {
|
362
362
|
return "" + e;
|
363
363
|
}
|
364
|
-
function
|
365
|
-
if (
|
366
|
-
return
|
364
|
+
function $e(e) {
|
365
|
+
if (ct(e))
|
366
|
+
return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", lt(e)), we(e);
|
367
367
|
}
|
368
|
-
var
|
368
|
+
var Ne = R.ReactCurrentOwner, ut = {
|
369
369
|
key: !0,
|
370
370
|
ref: !0,
|
371
371
|
__self: !0,
|
372
372
|
__source: !0
|
373
|
-
}, Ee,
|
374
|
-
function
|
375
|
-
if (
|
373
|
+
}, Ee, _e;
|
374
|
+
function dt(e) {
|
375
|
+
if (K.call(e, "ref")) {
|
376
376
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
377
377
|
if (r && r.isReactWarning)
|
378
378
|
return !1;
|
379
379
|
}
|
380
380
|
return e.ref !== void 0;
|
381
381
|
}
|
382
|
-
function
|
383
|
-
if (
|
382
|
+
function ft(e) {
|
383
|
+
if (K.call(e, "key")) {
|
384
384
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
385
385
|
if (r && r.isReactWarning)
|
386
386
|
return !1;
|
387
387
|
}
|
388
388
|
return e.key !== void 0;
|
389
389
|
}
|
390
|
-
function
|
391
|
-
typeof e.ref == "string" &&
|
390
|
+
function pt(e, r) {
|
391
|
+
typeof e.ref == "string" && Ne.current;
|
392
392
|
}
|
393
|
-
function
|
393
|
+
function mt(e, r) {
|
394
394
|
{
|
395
|
-
var
|
396
|
-
Ee || (Ee = !0,
|
395
|
+
var i = function() {
|
396
|
+
Ee || (Ee = !0, k("%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)", r));
|
397
397
|
};
|
398
|
-
|
399
|
-
get:
|
398
|
+
i.isReactWarning = !0, Object.defineProperty(e, "key", {
|
399
|
+
get: i,
|
400
400
|
configurable: !0
|
401
401
|
});
|
402
402
|
}
|
403
403
|
}
|
404
|
-
function
|
404
|
+
function ht(e, r) {
|
405
405
|
{
|
406
|
-
var
|
407
|
-
|
406
|
+
var i = function() {
|
407
|
+
_e || (_e = !0, k("%s: `ref` 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)", r));
|
408
408
|
};
|
409
|
-
|
410
|
-
get:
|
409
|
+
i.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
410
|
+
get: i,
|
411
411
|
configurable: !0
|
412
412
|
});
|
413
413
|
}
|
414
414
|
}
|
415
|
-
var
|
416
|
-
var
|
415
|
+
var gt = function(e, r, i, f, j, S, y) {
|
416
|
+
var b = {
|
417
417
|
// This tag allows us to uniquely identify this as a React Element
|
418
|
-
$$typeof:
|
418
|
+
$$typeof: t,
|
419
419
|
// Built-in properties that belong on the element
|
420
420
|
type: e,
|
421
421
|
key: r,
|
422
|
-
ref:
|
423
|
-
props:
|
422
|
+
ref: i,
|
423
|
+
props: y,
|
424
424
|
// Record the component responsible for creating this element.
|
425
|
-
_owner:
|
425
|
+
_owner: S
|
426
426
|
};
|
427
|
-
return
|
427
|
+
return b._store = {}, Object.defineProperty(b._store, "validated", {
|
428
428
|
configurable: !1,
|
429
429
|
enumerable: !1,
|
430
430
|
writable: !0,
|
431
431
|
value: !1
|
432
|
-
}), Object.defineProperty(
|
432
|
+
}), Object.defineProperty(b, "_self", {
|
433
433
|
configurable: !1,
|
434
434
|
enumerable: !1,
|
435
435
|
writable: !1,
|
436
|
-
value:
|
437
|
-
}), Object.defineProperty(
|
436
|
+
value: f
|
437
|
+
}), Object.defineProperty(b, "_source", {
|
438
438
|
configurable: !1,
|
439
439
|
enumerable: !1,
|
440
440
|
writable: !1,
|
441
|
-
value:
|
442
|
-
}), Object.freeze && (Object.freeze(
|
441
|
+
value: j
|
442
|
+
}), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
|
443
443
|
};
|
444
|
-
function
|
444
|
+
function bt(e, r, i, f, j) {
|
445
445
|
{
|
446
|
-
var
|
447
|
-
|
448
|
-
for (
|
449
|
-
|
446
|
+
var S, y = {}, b = null, _ = null;
|
447
|
+
i !== void 0 && ($e(i), b = "" + i), ft(r) && ($e(r.key), b = "" + r.key), dt(r) && (_ = r.ref, pt(r, j));
|
448
|
+
for (S in r)
|
449
|
+
K.call(r, S) && !ut.hasOwnProperty(S) && (y[S] = r[S]);
|
450
450
|
if (e && e.defaultProps) {
|
451
|
-
var
|
452
|
-
for (
|
453
|
-
|
451
|
+
var w = e.defaultProps;
|
452
|
+
for (S in w)
|
453
|
+
y[S] === void 0 && (y[S] = w[S]);
|
454
454
|
}
|
455
|
-
if (
|
456
|
-
var
|
457
|
-
|
455
|
+
if (b || _) {
|
456
|
+
var $ = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
457
|
+
b && mt(y, $), _ && ht(y, $);
|
458
458
|
}
|
459
|
-
return
|
459
|
+
return gt(e, b, _, j, f, Ne.current, y);
|
460
460
|
}
|
461
461
|
}
|
462
|
-
var
|
463
|
-
function
|
462
|
+
var oe = R.ReactCurrentOwner, Oe = R.ReactDebugCurrentFrame;
|
463
|
+
function q(e) {
|
464
464
|
if (e) {
|
465
|
-
var r = e._owner,
|
466
|
-
|
465
|
+
var r = e._owner, i = ee(e.type, e._source, r ? r.type : null);
|
466
|
+
Oe.setExtraStackFrame(i);
|
467
467
|
} else
|
468
|
-
|
468
|
+
Oe.setExtraStackFrame(null);
|
469
469
|
}
|
470
|
-
var
|
471
|
-
|
472
|
-
function
|
473
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
470
|
+
var le;
|
471
|
+
le = !1;
|
472
|
+
function ce(e) {
|
473
|
+
return typeof e == "object" && e !== null && e.$$typeof === t;
|
474
474
|
}
|
475
|
-
function
|
475
|
+
function Pe() {
|
476
476
|
{
|
477
|
-
if (
|
478
|
-
var e =
|
477
|
+
if (oe.current) {
|
478
|
+
var e = I(oe.current.type);
|
479
479
|
if (e)
|
480
480
|
return `
|
481
481
|
|
@@ -484,178 +484,1173 @@ Check the render method of \`` + e + "`.";
|
|
484
484
|
return "";
|
485
485
|
}
|
486
486
|
}
|
487
|
-
function
|
487
|
+
function yt(e) {
|
488
488
|
return "";
|
489
489
|
}
|
490
|
-
var
|
491
|
-
function
|
490
|
+
var De = {};
|
491
|
+
function vt(e) {
|
492
492
|
{
|
493
|
-
var r =
|
493
|
+
var r = Pe();
|
494
494
|
if (!r) {
|
495
|
-
var
|
496
|
-
|
495
|
+
var i = typeof e == "string" ? e : e.displayName || e.name;
|
496
|
+
i && (r = `
|
497
497
|
|
498
|
-
Check the top-level render call using <` +
|
498
|
+
Check the top-level render call using <` + i + ">.");
|
499
499
|
}
|
500
500
|
return r;
|
501
501
|
}
|
502
502
|
}
|
503
|
-
function
|
503
|
+
function Fe(e, r) {
|
504
504
|
{
|
505
505
|
if (!e._store || e._store.validated || e.key != null)
|
506
506
|
return;
|
507
507
|
e._store.validated = !0;
|
508
|
-
var
|
509
|
-
if (
|
508
|
+
var i = vt(r);
|
509
|
+
if (De[i])
|
510
510
|
return;
|
511
|
-
|
512
|
-
var
|
513
|
-
e && e._owner && e._owner !==
|
511
|
+
De[i] = !0;
|
512
|
+
var f = "";
|
513
|
+
e && e._owner && e._owner !== oe.current && (f = " It was passed a child from " + I(e._owner.type) + "."), q(e), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, f), q(null);
|
514
514
|
}
|
515
515
|
}
|
516
|
-
function
|
516
|
+
function Ae(e, r) {
|
517
517
|
{
|
518
518
|
if (typeof e != "object")
|
519
519
|
return;
|
520
|
-
if (
|
521
|
-
for (var
|
522
|
-
var
|
523
|
-
|
520
|
+
if (ie(e))
|
521
|
+
for (var i = 0; i < e.length; i++) {
|
522
|
+
var f = e[i];
|
523
|
+
ce(f) && Fe(f, r);
|
524
524
|
}
|
525
|
-
else if (
|
525
|
+
else if (ce(e))
|
526
526
|
e._store && (e._store.validated = !0);
|
527
527
|
else if (e) {
|
528
|
-
var
|
529
|
-
if (typeof
|
530
|
-
for (var
|
531
|
-
|
528
|
+
var j = T(e);
|
529
|
+
if (typeof j == "function" && j !== e.entries)
|
530
|
+
for (var S = j.call(e), y; !(y = S.next()).done; )
|
531
|
+
ce(y.value) && Fe(y.value, r);
|
532
532
|
}
|
533
533
|
}
|
534
534
|
}
|
535
|
-
function
|
535
|
+
function xt(e) {
|
536
536
|
{
|
537
537
|
var r = e.type;
|
538
538
|
if (r == null || typeof r == "string")
|
539
539
|
return;
|
540
|
-
var
|
540
|
+
var i;
|
541
541
|
if (typeof r == "function")
|
542
|
-
|
543
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
542
|
+
i = r.propTypes;
|
543
|
+
else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here.
|
544
544
|
// Inner props are checked in the reconciler.
|
545
|
-
r.$$typeof ===
|
546
|
-
|
545
|
+
r.$$typeof === u))
|
546
|
+
i = r.propTypes;
|
547
547
|
else
|
548
548
|
return;
|
549
|
-
if (
|
550
|
-
var
|
551
|
-
|
552
|
-
} else if (r.PropTypes !== void 0 && !
|
553
|
-
|
554
|
-
var
|
555
|
-
|
549
|
+
if (i) {
|
550
|
+
var f = I(r);
|
551
|
+
it(i, e.props, "prop", f, e);
|
552
|
+
} else if (r.PropTypes !== void 0 && !le) {
|
553
|
+
le = !0;
|
554
|
+
var j = I(r);
|
555
|
+
k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
|
556
556
|
}
|
557
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
557
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
558
558
|
}
|
559
559
|
}
|
560
|
-
function
|
560
|
+
function kt(e) {
|
561
561
|
{
|
562
|
-
for (var r = Object.keys(e.props),
|
563
|
-
var
|
564
|
-
if (
|
565
|
-
|
562
|
+
for (var r = Object.keys(e.props), i = 0; i < r.length; i++) {
|
563
|
+
var f = r[i];
|
564
|
+
if (f !== "children" && f !== "key") {
|
565
|
+
q(e), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), q(null);
|
566
566
|
break;
|
567
567
|
}
|
568
568
|
}
|
569
|
-
e.ref !== null && (
|
569
|
+
e.ref !== null && (q(e), k("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
|
570
570
|
}
|
571
571
|
}
|
572
|
-
var
|
573
|
-
function
|
572
|
+
var Le = {};
|
573
|
+
function Ie(e, r, i, f, j, S) {
|
574
574
|
{
|
575
|
-
var
|
576
|
-
if (!
|
577
|
-
var
|
578
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
579
|
-
var
|
580
|
-
|
581
|
-
var
|
582
|
-
e === null ?
|
575
|
+
var y = Qe(e);
|
576
|
+
if (!y) {
|
577
|
+
var b = "";
|
578
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
579
|
+
var _ = yt();
|
580
|
+
_ ? b += _ : b += Pe();
|
581
|
+
var w;
|
582
|
+
e === null ? w = "null" : ie(e) ? w = "array" : e !== void 0 && e.$$typeof === t ? (w = "<" + (I(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : w = typeof e, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", w, b);
|
583
583
|
}
|
584
|
-
var
|
585
|
-
if (
|
586
|
-
return
|
587
|
-
if (
|
588
|
-
var
|
589
|
-
if (
|
590
|
-
if (
|
591
|
-
if (
|
592
|
-
for (var
|
593
|
-
|
594
|
-
Object.freeze && Object.freeze(
|
584
|
+
var $ = bt(e, r, i, j, S);
|
585
|
+
if ($ == null)
|
586
|
+
return $;
|
587
|
+
if (y) {
|
588
|
+
var P = r.children;
|
589
|
+
if (P !== void 0)
|
590
|
+
if (f)
|
591
|
+
if (ie(P)) {
|
592
|
+
for (var Y = 0; Y < P.length; Y++)
|
593
|
+
Ae(P[Y], e);
|
594
|
+
Object.freeze && Object.freeze(P);
|
595
595
|
} else
|
596
|
-
|
596
|
+
k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
597
597
|
else
|
598
|
-
|
598
|
+
Ae(P, e);
|
599
599
|
}
|
600
|
-
if (
|
601
|
-
var
|
602
|
-
return
|
603
|
-
}),
|
604
|
-
if (!
|
605
|
-
var
|
606
|
-
|
600
|
+
if (K.call(r, "key")) {
|
601
|
+
var M = I(e), O = Object.keys(r).filter(function(wt) {
|
602
|
+
return wt !== "key";
|
603
|
+
}), ue = O.length > 0 ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}";
|
604
|
+
if (!Le[M + ue]) {
|
605
|
+
var Tt = O.length > 0 ? "{" + O.join(": ..., ") + ": ...}" : "{}";
|
606
|
+
k(`A props object containing a "key" prop is being spread into JSX:
|
607
607
|
let props = %s;
|
608
608
|
<%s {...props} />
|
609
609
|
React keys must be passed directly to JSX without using spread:
|
610
610
|
let props = %s;
|
611
|
-
<%s key={someKey} {...props} />`,
|
611
|
+
<%s key={someKey} {...props} />`, ue, M, Tt, M), Le[M + ue] = !0;
|
612
612
|
}
|
613
613
|
}
|
614
|
-
return e ===
|
614
|
+
return e === a ? kt($) : xt($), $;
|
615
615
|
}
|
616
616
|
}
|
617
|
-
function
|
618
|
-
return
|
617
|
+
function jt(e, r, i) {
|
618
|
+
return Ie(e, r, i, !0);
|
619
619
|
}
|
620
|
-
function
|
621
|
-
return
|
620
|
+
function St(e, r, i) {
|
621
|
+
return Ie(e, r, i, !1);
|
622
622
|
}
|
623
|
-
var
|
624
|
-
|
625
|
-
}()),
|
623
|
+
var Ct = St, Rt = jt;
|
624
|
+
G.Fragment = a, G.jsx = Ct, G.jsxs = Rt;
|
625
|
+
}()), G;
|
626
626
|
}
|
627
|
-
var
|
628
|
-
function
|
629
|
-
return
|
627
|
+
var We;
|
628
|
+
function Et() {
|
629
|
+
return We || (We = 1, process.env.NODE_ENV === "production" ? re.exports = $t() : re.exports = Nt()), re.exports;
|
630
630
|
}
|
631
|
-
var
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
631
|
+
var s = Et();
|
632
|
+
const A = (g) => Object.entries(g).reduce((t, [m, a]) => {
|
633
|
+
const l = `${a}px`;
|
634
|
+
switch (m) {
|
635
|
+
case "mt":
|
636
|
+
t.marginTop = typeof a == "number" ? `${a}px` : a;
|
637
|
+
break;
|
638
|
+
case "mr":
|
639
|
+
t.marginRight = typeof a == "number" ? `${a}px` : a;
|
640
|
+
break;
|
641
|
+
case "mb":
|
642
|
+
t.marginBottom = typeof a == "number" ? `${a}px` : a;
|
643
|
+
break;
|
644
|
+
case "ml":
|
645
|
+
t.marginLeft = typeof a == "number" ? `${a}px` : a;
|
646
|
+
break;
|
647
|
+
case "m":
|
648
|
+
t.margin = typeof a == "number" ? `${a}px` : a;
|
649
|
+
break;
|
650
|
+
case "pt":
|
651
|
+
t.paddingTop = l;
|
652
|
+
break;
|
653
|
+
case "pr":
|
654
|
+
t.paddingRight = l;
|
655
|
+
break;
|
656
|
+
case "pb":
|
657
|
+
t.paddingBottom = l;
|
658
|
+
break;
|
659
|
+
case "pl":
|
660
|
+
t.paddingLeft = l;
|
661
|
+
break;
|
662
|
+
case "p":
|
663
|
+
t.padding = l;
|
664
|
+
break;
|
665
|
+
case "br":
|
666
|
+
t.borderRadius = typeof a == "number" ? `${a}px` : a;
|
667
|
+
break;
|
668
|
+
case "bg":
|
669
|
+
t.background = a;
|
670
|
+
break;
|
671
|
+
case "c":
|
672
|
+
t.color = a;
|
673
|
+
break;
|
674
|
+
case "b":
|
675
|
+
t.border = a === 1 ? "1px solid red" : a;
|
676
|
+
break;
|
677
|
+
case "center":
|
678
|
+
t.position = "absolute", t.inset = 0, t.margin = "auto";
|
679
|
+
break;
|
680
|
+
case "pot":
|
681
|
+
t.top = l;
|
682
|
+
break;
|
683
|
+
case "por":
|
684
|
+
t.right = l;
|
685
|
+
break;
|
686
|
+
case "pob":
|
687
|
+
t.bottom = l;
|
688
|
+
break;
|
689
|
+
case "pol":
|
690
|
+
t.left = l;
|
691
|
+
break;
|
692
|
+
case "rel":
|
693
|
+
t.position = "relative";
|
694
|
+
break;
|
695
|
+
case "ab":
|
696
|
+
t.position = "absolute";
|
697
|
+
break;
|
698
|
+
case "fixed":
|
699
|
+
t.position = "fixed";
|
700
|
+
break;
|
701
|
+
case "w":
|
702
|
+
t.width = l;
|
703
|
+
break;
|
704
|
+
case "h":
|
705
|
+
t.height = l;
|
706
|
+
break;
|
707
|
+
case "vw":
|
708
|
+
t.width = `${a}vw`;
|
709
|
+
break;
|
710
|
+
case "vh":
|
711
|
+
t.height = `${a}vh`;
|
712
|
+
break;
|
713
|
+
case "presentw":
|
714
|
+
t.width = `${a}%`;
|
715
|
+
break;
|
716
|
+
case "presenth":
|
717
|
+
t.height = `${a}%`;
|
718
|
+
break;
|
719
|
+
case "mw":
|
720
|
+
t.minWidth = l;
|
721
|
+
break;
|
722
|
+
case "mh":
|
723
|
+
t.minHieght = l;
|
724
|
+
break;
|
725
|
+
case "fl":
|
726
|
+
t.float = "left";
|
727
|
+
break;
|
728
|
+
case "fr":
|
729
|
+
t.float = "right";
|
730
|
+
break;
|
731
|
+
case "size":
|
732
|
+
t.fontSize = l;
|
733
|
+
break;
|
734
|
+
case "tac":
|
735
|
+
t.textAlign = "center";
|
736
|
+
break;
|
737
|
+
case "z":
|
738
|
+
t.zIndex = a;
|
739
|
+
break;
|
740
|
+
case "tran":
|
741
|
+
t.transition = `${a}s`;
|
742
|
+
break;
|
743
|
+
case "flex":
|
744
|
+
t.display = "flex";
|
745
|
+
break;
|
746
|
+
case "aic":
|
747
|
+
t.alignItems = "center";
|
748
|
+
break;
|
749
|
+
case "jcc":
|
750
|
+
t.justifyContent = "center";
|
751
|
+
break;
|
752
|
+
case "jc":
|
753
|
+
t.justifyContent = a;
|
754
|
+
break;
|
755
|
+
case "oh":
|
756
|
+
t.overflow = "hidden";
|
757
|
+
break;
|
758
|
+
case "ohauto":
|
759
|
+
t.overflow = "auto";
|
760
|
+
break;
|
761
|
+
case "op":
|
762
|
+
t.opacity = a;
|
763
|
+
break;
|
764
|
+
case "none":
|
765
|
+
t.display = "none";
|
766
|
+
break;
|
767
|
+
case "ar":
|
768
|
+
t.aspectRatio = a;
|
769
|
+
break;
|
770
|
+
case "ls":
|
771
|
+
t.letterSpacing = l;
|
772
|
+
break;
|
773
|
+
case "lh":
|
774
|
+
t.lineHeight = l;
|
775
|
+
break;
|
776
|
+
case "fwb":
|
777
|
+
t.fontWeight = "bold";
|
778
|
+
break;
|
779
|
+
case "boxsizing":
|
780
|
+
t.boxSizing = "border-box";
|
781
|
+
break;
|
782
|
+
case "boxshadow":
|
783
|
+
t.boxShadow = a;
|
784
|
+
break;
|
785
|
+
case "f":
|
786
|
+
t.flex = typeof a == "number" ? a : `${a}`;
|
787
|
+
break;
|
788
|
+
case "bColor":
|
789
|
+
t.borderColor = a;
|
790
|
+
break;
|
791
|
+
case "bgSize":
|
792
|
+
t.backgroundSize = a;
|
793
|
+
break;
|
794
|
+
case "bgPosition":
|
795
|
+
t.backgroundPosition = a;
|
796
|
+
break;
|
797
|
+
case "bgRepeat":
|
798
|
+
t.backgroundRepeat = a;
|
799
|
+
break;
|
800
|
+
default:
|
801
|
+
t[m] = a;
|
802
|
+
}
|
803
|
+
return t;
|
804
|
+
}, {});
|
805
|
+
function U(g) {
|
806
|
+
const {
|
807
|
+
type: t = "default",
|
808
|
+
size: m = "medium",
|
809
|
+
sx: a = {},
|
810
|
+
style: l = {},
|
811
|
+
className: h = "",
|
812
|
+
// 允许用户自定义 className
|
813
|
+
onClick: d,
|
814
|
+
children: p,
|
815
|
+
disabled: c,
|
816
|
+
outline: x,
|
817
|
+
Neumorphism: o
|
818
|
+
} = g, u = `btn btn-${t} btn-${m} ${c ? "btn-disabled" : ""} ${x ? "btn-outline" : ""} ${o ? "btn-Neumorphism" : ""} ${h}`, E = { ...A(a), ...l };
|
819
|
+
return U.propTypes = {
|
820
|
+
type: n.oneOf(["default", "transparent", "danger", "success"]),
|
821
|
+
// 按钮类型:默认、透明、警告、成功
|
822
|
+
size: n.oneOf(["small", "medium", "large", "huge"]),
|
823
|
+
// 按钮大小
|
824
|
+
sx: n.object,
|
825
|
+
// 自定义样式对象
|
826
|
+
style: n.object,
|
827
|
+
// 用户传入的 style 属性,保证style属性优先级最高
|
828
|
+
onClick: n.func,
|
829
|
+
// 点击事件
|
830
|
+
className: n.string,
|
831
|
+
// 添加 className PropTypes
|
832
|
+
children: n.node.isRequired,
|
833
|
+
// 按钮内容
|
834
|
+
disabled: n.bool,
|
835
|
+
// 是否禁用
|
836
|
+
outline: n.bool,
|
837
|
+
// 是否为轮廓按钮
|
838
|
+
Neumorphism: n.bool
|
839
|
+
// 是否为新拟态风格按钮
|
840
|
+
}, U.defaultProps = {
|
841
|
+
type: "default",
|
842
|
+
size: "medium",
|
843
|
+
sx: {},
|
844
|
+
style: {},
|
845
|
+
onClick: () => {
|
846
|
+
},
|
847
|
+
className: "",
|
848
|
+
// 默认值为空字符串
|
849
|
+
disabled: !1,
|
850
|
+
outline: !1,
|
851
|
+
Neumorphism: !1
|
852
|
+
}, /* @__PURE__ */ s.jsx(
|
853
|
+
"button",
|
854
|
+
{
|
855
|
+
className: u,
|
856
|
+
style: E,
|
857
|
+
onClick: d,
|
858
|
+
disabled: c,
|
859
|
+
outline: x,
|
860
|
+
Neumorphism: o,
|
861
|
+
children: p
|
862
|
+
}
|
863
|
+
);
|
864
|
+
}
|
865
|
+
function Ft({
|
866
|
+
size: g = "medium",
|
867
|
+
sx: t = {},
|
868
|
+
style: m = {},
|
869
|
+
className: a = "",
|
870
|
+
onClick: l,
|
871
|
+
children: h,
|
872
|
+
disabled: d = !1,
|
873
|
+
...p
|
874
|
+
}) {
|
875
|
+
const c = Ke(null), o = { ...A(t), ...m };
|
876
|
+
function u(N) {
|
877
|
+
if (d) return;
|
878
|
+
const C = c.current, T = document.createElement("span"), R = Math.max(C.clientWidth, C.clientHeight), k = R / 2;
|
879
|
+
T.classList.add("ripple"), T.style.width = T.style.height = `${R}px`, T.style.left = `${N.clientX - C.getBoundingClientRect().left - k}px`, T.style.top = `${N.clientY - C.getBoundingClientRect().top - k}px`;
|
880
|
+
const D = C.querySelector(".ripple");
|
881
|
+
D && D.remove(), C.appendChild(T);
|
882
|
+
}
|
883
|
+
const E = `material-btn ${`material-btn-${g}`} ${a} ${d ? "material-btn-disabled" : ""}`;
|
884
|
+
return /* @__PURE__ */ s.jsx(
|
885
|
+
"button",
|
886
|
+
{
|
887
|
+
ref: c,
|
888
|
+
className: E,
|
889
|
+
style: o,
|
890
|
+
onClick: (N) => {
|
891
|
+
u(N), l && l(N);
|
892
|
+
},
|
893
|
+
disabled: d,
|
894
|
+
...p,
|
895
|
+
children: h
|
896
|
+
}
|
897
|
+
);
|
898
|
+
}
|
899
|
+
function At({ label: g, type: t = "text" }) {
|
900
|
+
const [m, a] = F(!1), [l, h] = F(""), d = m || l;
|
901
|
+
return /* @__PURE__ */ s.jsx("div", { className: "materialInput", children: /* @__PURE__ */ s.jsxs("div", { className: "inputWrapper", children: [
|
902
|
+
/* @__PURE__ */ s.jsx(
|
903
|
+
"input",
|
904
|
+
{
|
905
|
+
type: t,
|
906
|
+
className: `materialInputField ${d ? "filled" : ""}`,
|
907
|
+
onFocus: () => a(!0),
|
908
|
+
onBlur: () => a(!1),
|
909
|
+
onChange: (p) => h(p.target.value),
|
910
|
+
value: l
|
646
911
|
}
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
912
|
+
),
|
913
|
+
/* @__PURE__ */ s.jsx("label", { className: `materialLabel ${d ? "float" : ""}`, children: g })
|
914
|
+
] }) });
|
915
|
+
}
|
916
|
+
function Me(g) {
|
917
|
+
const {
|
918
|
+
sx: t = {},
|
919
|
+
style: m = {},
|
920
|
+
className: a = "",
|
921
|
+
disabled: l,
|
922
|
+
onChange: h,
|
923
|
+
showText: d
|
924
|
+
} = g, [p, c] = F("#4caf50"), x = (C) => {
|
925
|
+
const T = C.target.value;
|
926
|
+
c(T), h && h(T);
|
927
|
+
}, o = `color-picker ${l ? "color-picker-disabled" : ""} ${a}`, v = { ...A(t), ...m };
|
928
|
+
Me.propTypes = {
|
929
|
+
sx: n.object,
|
930
|
+
style: n.object,
|
931
|
+
className: n.string,
|
932
|
+
disabled: n.bool,
|
933
|
+
onChange: n.func,
|
934
|
+
showText: n.bool
|
935
|
+
}, Me.defaultProps = {
|
936
|
+
sx: {},
|
937
|
+
style: {},
|
938
|
+
className: "",
|
939
|
+
disabled: !1,
|
940
|
+
onChange: () => {
|
941
|
+
},
|
942
|
+
showText: !1
|
943
|
+
};
|
944
|
+
const E = (C) => {
|
945
|
+
const T = parseInt(C.slice(1, 3), 16), R = parseInt(C.slice(3, 5), 16), k = parseInt(C.slice(5, 7), 16);
|
946
|
+
return `rgb(${T}, ${R}, ${k})`;
|
947
|
+
}, N = (C) => {
|
948
|
+
let T = parseInt(C.slice(1, 3), 16) / 255, R = parseInt(C.slice(3, 5), 16) / 255, k = parseInt(C.slice(5, 7), 16) / 255, D = Math.max(T, R, k), V = Math.min(T, R, k), L, B, X = (D + V) / 2;
|
949
|
+
if (D === V)
|
950
|
+
L = B = 0;
|
951
|
+
else {
|
952
|
+
let z = D - V;
|
953
|
+
switch (B = X > 0.5 ? z / (2 - D - V) : z / (D + V), D) {
|
954
|
+
case T:
|
955
|
+
L = (R - k) / z + (R < k ? 6 : 0);
|
956
|
+
break;
|
957
|
+
case R:
|
958
|
+
L = (k - T) / z + 2;
|
959
|
+
break;
|
960
|
+
case k:
|
961
|
+
L = (T - R) / z + 4;
|
962
|
+
break;
|
653
963
|
}
|
654
|
-
|
964
|
+
L /= 6;
|
965
|
+
}
|
966
|
+
return `hsl(${Math.round(L * 360)}, ${Math.round(B * 100)}%, ${Math.round(X * 100)}%)`;
|
967
|
+
};
|
968
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "color-picker-wrapper", style: v, children: [
|
969
|
+
/* @__PURE__ */ s.jsx(
|
970
|
+
"input",
|
971
|
+
{
|
972
|
+
type: "color",
|
973
|
+
value: p,
|
974
|
+
onChange: x,
|
975
|
+
className: o,
|
976
|
+
disabled: l
|
977
|
+
}
|
978
|
+
),
|
979
|
+
d && /* @__PURE__ */ s.jsxs("div", { className: "color-text", children: [
|
980
|
+
/* @__PURE__ */ s.jsx("div", { children: p.toUpperCase() }),
|
981
|
+
/* @__PURE__ */ s.jsx("div", { children: E(p) }),
|
982
|
+
/* @__PURE__ */ s.jsx("div", { children: N(p) })
|
983
|
+
] })
|
984
|
+
] });
|
985
|
+
}
|
986
|
+
function de(g) {
|
987
|
+
const { type: t, single: m, sx: a = {}, style: l = {}, en: h } = g, p = { ...A(a), ...l };
|
988
|
+
de.propTypes = {
|
989
|
+
type: n.oneOf([
|
990
|
+
"line",
|
991
|
+
"full",
|
992
|
+
"full-line",
|
993
|
+
"year-week",
|
994
|
+
"year-week-line",
|
995
|
+
"week-time",
|
996
|
+
"no-s",
|
997
|
+
"no-s-line",
|
998
|
+
"us-full",
|
999
|
+
"us-full-line"
|
1000
|
+
]),
|
1001
|
+
single: n.bool,
|
1002
|
+
// 控制显示“周”或“星期”
|
1003
|
+
sx: n.object,
|
1004
|
+
// 自定义样式对象
|
1005
|
+
style: n.object,
|
1006
|
+
// 用户传入的 style 属性
|
1007
|
+
en: n.bool
|
1008
|
+
// 控制英文格式
|
1009
|
+
}, de.defaultProps = {
|
1010
|
+
type: void 0,
|
1011
|
+
// 默认无 type 的格式
|
1012
|
+
single: !1,
|
1013
|
+
// 默认显示 "星期"
|
1014
|
+
sx: {},
|
1015
|
+
style: {},
|
1016
|
+
en: !1
|
1017
|
+
// 默认不使用英文
|
1018
|
+
};
|
1019
|
+
const c = (x) => {
|
1020
|
+
const o = new de();
|
1021
|
+
let u = h ? "en-US" : "zh-CN", v = o.toLocaleString(u, { weekday: "long" });
|
1022
|
+
switch (!h && m && (v = v.replace("星期", "周")), x) {
|
1023
|
+
case "line":
|
1024
|
+
return o.toLocaleDateString(u, {
|
1025
|
+
year: "numeric",
|
1026
|
+
month: "2-digit",
|
1027
|
+
day: "2-digit"
|
1028
|
+
}).replaceAll("/", "-");
|
1029
|
+
case "full":
|
1030
|
+
return `${o.toLocaleDateString(u, {
|
1031
|
+
year: "numeric",
|
1032
|
+
month: "2-digit",
|
1033
|
+
day: "2-digit"
|
1034
|
+
})} ${v} ${o.toLocaleTimeString(u, {
|
1035
|
+
hour: "2-digit",
|
1036
|
+
minute: "2-digit",
|
1037
|
+
second: "2-digit"
|
1038
|
+
})}`;
|
1039
|
+
case "full-line":
|
1040
|
+
return `${o.toLocaleDateString(u, {
|
1041
|
+
year: "numeric",
|
1042
|
+
month: "2-digit",
|
1043
|
+
day: "2-digit"
|
1044
|
+
}).replaceAll("/", "-")} ${v} ${o.toLocaleTimeString(u, {
|
1045
|
+
hour: "2-digit",
|
1046
|
+
minute: "2-digit",
|
1047
|
+
second: "2-digit"
|
1048
|
+
})}`;
|
1049
|
+
case "year-week":
|
1050
|
+
return `${o.toLocaleDateString(u, {
|
1051
|
+
year: "numeric",
|
1052
|
+
month: "2-digit",
|
1053
|
+
day: "2-digit"
|
1054
|
+
})} ${v}`;
|
1055
|
+
case "year-week-line":
|
1056
|
+
return `${o.toLocaleDateString(u, {
|
1057
|
+
year: "numeric",
|
1058
|
+
month: "2-digit",
|
1059
|
+
day: "2-digit"
|
1060
|
+
}).replaceAll("/", "-")} ${v}`;
|
1061
|
+
case "week-time":
|
1062
|
+
return `${v} ${o.toLocaleTimeString(u, {
|
1063
|
+
hour: "2-digit",
|
1064
|
+
minute: "2-digit",
|
1065
|
+
second: "2-digit"
|
1066
|
+
})}`;
|
1067
|
+
case "no-s":
|
1068
|
+
return `${o.toLocaleDateString(u, {
|
1069
|
+
year: "numeric",
|
1070
|
+
month: "2-digit",
|
1071
|
+
day: "2-digit"
|
1072
|
+
})} ${v} ${o.toLocaleTimeString(u, {
|
1073
|
+
hour: "2-digit",
|
1074
|
+
minute: "2-digit"
|
1075
|
+
})}`;
|
1076
|
+
case "no-s-line":
|
1077
|
+
return `${o.toLocaleDateString(u, {
|
1078
|
+
year: "numeric",
|
1079
|
+
month: "2-digit",
|
1080
|
+
day: "2-digit"
|
1081
|
+
}).replaceAll("/", "-")} ${v} ${o.toLocaleTimeString(u, {
|
1082
|
+
hour: "2-digit",
|
1083
|
+
minute: "2-digit"
|
1084
|
+
})}`;
|
1085
|
+
case "us-full":
|
1086
|
+
return `${o.toLocaleDateString("en-US", {
|
1087
|
+
year: "numeric",
|
1088
|
+
month: "2-digit",
|
1089
|
+
day: "2-digit"
|
1090
|
+
})} ${v} ${o.toLocaleTimeString(u, {
|
1091
|
+
hour: "2-digit",
|
1092
|
+
minute: "2-digit",
|
1093
|
+
second: "2-digit"
|
1094
|
+
})}`;
|
1095
|
+
case "us-full-line":
|
1096
|
+
return `${o.toLocaleDateString("en-US", {
|
1097
|
+
year: "numeric",
|
1098
|
+
month: "2-digit",
|
1099
|
+
day: "2-digit"
|
1100
|
+
}).replaceAll("/", "-")} ${v} ${o.toLocaleTimeString(u, {
|
1101
|
+
hour: "2-digit",
|
1102
|
+
minute: "2-digit",
|
1103
|
+
second: "2-digit"
|
1104
|
+
})}`;
|
1105
|
+
default:
|
1106
|
+
return o.toLocaleDateString(u, {
|
1107
|
+
year: "numeric",
|
1108
|
+
month: "2-digit",
|
1109
|
+
day: "2-digit"
|
1110
|
+
});
|
1111
|
+
}
|
1112
|
+
};
|
1113
|
+
return /* @__PURE__ */ s.jsx("div", { style: p, children: c(t) });
|
1114
|
+
}
|
1115
|
+
function He(g) {
|
1116
|
+
const {
|
1117
|
+
sx: t = {},
|
1118
|
+
style: m = {},
|
1119
|
+
className: a = "",
|
1120
|
+
disabled: l,
|
1121
|
+
onChange: h,
|
1122
|
+
time: d
|
1123
|
+
} = g, [p, c] = F(""), x = (N) => {
|
1124
|
+
const C = N.target.value;
|
1125
|
+
c(C), h && h(C);
|
1126
|
+
}, o = d ? "datetime-local" : "date", u = `date-picker ${l ? "date-picker-disabled" : ""} ${a}`, E = { ...A(t), ...m };
|
1127
|
+
return /* @__PURE__ */ s.jsx(
|
1128
|
+
"input",
|
1129
|
+
{
|
1130
|
+
type: o,
|
1131
|
+
value: p,
|
1132
|
+
onChange: x,
|
1133
|
+
className: u,
|
1134
|
+
style: E,
|
1135
|
+
disabled: l
|
1136
|
+
}
|
1137
|
+
);
|
1138
|
+
}
|
1139
|
+
He.propTypes = {
|
1140
|
+
sx: n.object,
|
1141
|
+
style: n.object,
|
1142
|
+
className: n.string,
|
1143
|
+
disabled: n.bool,
|
1144
|
+
onChange: n.func,
|
1145
|
+
time: n.bool
|
1146
|
+
// 是否启用时间选择
|
1147
|
+
};
|
1148
|
+
He.defaultProps = {
|
1149
|
+
sx: {},
|
1150
|
+
style: {},
|
1151
|
+
className: "",
|
1152
|
+
disabled: !1,
|
1153
|
+
onChange: () => {
|
1154
|
+
},
|
1155
|
+
time: !1
|
1156
|
+
};
|
1157
|
+
function qe(g) {
|
1158
|
+
const { children: t, title: m, onText: a, cancelText: l, open: h, onClose: d, type: p } = g, [c, x] = F(!1), [o, u] = F(!1);
|
1159
|
+
qe.propTypes = {
|
1160
|
+
children: n.node.isRequired,
|
1161
|
+
title: n.string,
|
1162
|
+
onText: n.string,
|
1163
|
+
cancelText: n.string,
|
1164
|
+
open: n.bool,
|
1165
|
+
onClose: n.func,
|
1166
|
+
type: n.oneOf(["top", "bottom", "left", "right"])
|
1167
|
+
}, qe.defaultProps = {
|
1168
|
+
title: "基础标题",
|
1169
|
+
onText: "确定",
|
1170
|
+
cancelText: "取消",
|
1171
|
+
open: !1,
|
1172
|
+
onClose: () => {
|
1173
|
+
},
|
1174
|
+
type: "right"
|
1175
|
+
}, pe(() => {
|
1176
|
+
h ? (x(!0), u(!1)) : c && (u(!0), setTimeout(() => {
|
1177
|
+
x(!1), u(!1);
|
1178
|
+
}, 300));
|
1179
|
+
}, [h]);
|
1180
|
+
function v() {
|
1181
|
+
console.log("确定按钮"), d && d();
|
1182
|
+
}
|
1183
|
+
return /* @__PURE__ */ s.jsx(s.Fragment, { children: c && /* @__PURE__ */ s.jsx("div", { className: `drawer-overlay ${o ? "fade-out" : "fade-in"}`, children: /* @__PURE__ */ s.jsxs(
|
1184
|
+
"div",
|
1185
|
+
{
|
1186
|
+
className: `drawer-container drawer-${p} ${o ? `come-out-${p}` : `come-in-${p}`}`,
|
1187
|
+
children: [
|
1188
|
+
/* @__PURE__ */ s.jsxs("div", { className: "drawer-header", children: [
|
1189
|
+
/* @__PURE__ */ s.jsx("h3", { children: m }),
|
1190
|
+
/* @__PURE__ */ s.jsx("div", { className: "drawer-closeBtn", onClick: d })
|
1191
|
+
] }),
|
1192
|
+
/* @__PURE__ */ s.jsx("div", { className: "drawer-content", children: t }),
|
1193
|
+
/* @__PURE__ */ s.jsxs("div", { className: "drawer-footer", children: [
|
1194
|
+
/* @__PURE__ */ s.jsx(U, { type: "success", onClick: v, children: a }),
|
1195
|
+
/* @__PURE__ */ s.jsx(U, { onClick: d, children: l })
|
1196
|
+
] })
|
1197
|
+
]
|
1198
|
+
}
|
1199
|
+
) }) });
|
1200
|
+
}
|
1201
|
+
function Ye(g) {
|
1202
|
+
const {
|
1203
|
+
type: t = "default",
|
1204
|
+
size: m = "medium",
|
1205
|
+
sx: a = {},
|
1206
|
+
style: l = {},
|
1207
|
+
className: h = "",
|
1208
|
+
// 允许用户自定义 className
|
1209
|
+
onClick: d,
|
1210
|
+
onChange: p,
|
1211
|
+
value: c,
|
1212
|
+
defaultValue: x = "",
|
1213
|
+
disabled: o = !1,
|
1214
|
+
placeholder: u = "",
|
1215
|
+
maxlength: v
|
1216
|
+
} = g, E = `input input-${t} input-${m} ${o ? "input-disabled" : ""} ${h}`, C = { ...A(a), ...l }, T = t === "password" ? "password" : "text", R = c !== void 0 && p !== void 0;
|
1217
|
+
return Ye.propTypes = {
|
1218
|
+
type: n.oneOf(["default", "textarea", "password"]),
|
1219
|
+
size: n.oneOf(["small", "medium", "large", "huge"]),
|
1220
|
+
sx: n.object,
|
1221
|
+
// 自定义样式对象
|
1222
|
+
style: n.object,
|
1223
|
+
// 用户传入的 style 属性,保证 style 属性优先级最高
|
1224
|
+
onClick: n.func,
|
1225
|
+
// 点击事件
|
1226
|
+
onChange: n.func,
|
1227
|
+
// 输入值变化事件
|
1228
|
+
className: n.string,
|
1229
|
+
// 添加 className PropTypes
|
1230
|
+
value: n.string,
|
1231
|
+
// 输入框的值
|
1232
|
+
defaultValue: n.string,
|
1233
|
+
// 输入框的初始值(非受控模式)
|
1234
|
+
disabled: n.bool,
|
1235
|
+
// 是否禁用
|
1236
|
+
placeholder: n.string,
|
1237
|
+
// 占位符
|
1238
|
+
maxlength: n.number
|
1239
|
+
}, Ye.defaultProps = {
|
1240
|
+
type: "default",
|
1241
|
+
size: "medium",
|
1242
|
+
sx: {},
|
1243
|
+
style: {},
|
1244
|
+
onClick: () => {
|
1245
|
+
},
|
1246
|
+
className: "",
|
1247
|
+
// 默认值为空字符串
|
1248
|
+
onChange: void 0,
|
1249
|
+
value: void 0,
|
1250
|
+
defaultValue: "",
|
1251
|
+
disabled: !1,
|
1252
|
+
placeholder: "",
|
1253
|
+
maxlength: 524288
|
1254
|
+
}, /* @__PURE__ */ s.jsx("div", { children: t === "textarea" ? /* @__PURE__ */ s.jsx(
|
1255
|
+
"textarea",
|
1256
|
+
{
|
1257
|
+
className: E,
|
1258
|
+
style: C,
|
1259
|
+
onClick: d,
|
1260
|
+
onChange: p && ((k) => p(k.target.value)),
|
1261
|
+
value: R ? c : void 0,
|
1262
|
+
defaultValue: R ? void 0 : x,
|
1263
|
+
disabled: o,
|
1264
|
+
placeholder: u,
|
1265
|
+
maxLength: v
|
1266
|
+
}
|
1267
|
+
) : /* @__PURE__ */ s.jsx(
|
1268
|
+
"input",
|
1269
|
+
{
|
1270
|
+
className: E,
|
1271
|
+
style: C,
|
1272
|
+
type: T,
|
1273
|
+
onClick: d,
|
1274
|
+
onChange: p && ((k) => p(k.target.value)),
|
1275
|
+
value: R ? c : void 0,
|
1276
|
+
defaultValue: R ? void 0 : x,
|
1277
|
+
disabled: o,
|
1278
|
+
placeholder: u,
|
1279
|
+
maxLength: v
|
1280
|
+
}
|
1281
|
+
) });
|
1282
|
+
}
|
1283
|
+
function _t(g) {
|
1284
|
+
const { children: t, type: m, className: a = "" } = g, l = `clay-layout clay-layout-${m} ${a}`;
|
1285
|
+
return /* @__PURE__ */ s.jsxs("div", { className: l, children: [
|
1286
|
+
m === "top-middle-bottom" && /* @__PURE__ */ s.jsxs("div", { className: "ultra", children: [
|
1287
|
+
/* @__PURE__ */ s.jsx("header", { className: "clay-header", children: t[0] }),
|
1288
|
+
/* @__PURE__ */ s.jsx("main", { className: "clay-main", children: t[1] }),
|
1289
|
+
/* @__PURE__ */ s.jsx("footer", { className: "clay-footer", children: t[2] })
|
1290
|
+
] }),
|
1291
|
+
m === "top-bottom-split" && /* @__PURE__ */ s.jsxs("div", { className: "ultra", children: [
|
1292
|
+
/* @__PURE__ */ s.jsx("header", { className: "clay-header", children: t[0] }),
|
1293
|
+
/* @__PURE__ */ s.jsxs("main", { className: "clay-main", children: [
|
1294
|
+
/* @__PURE__ */ s.jsx("aside", { className: "clay-aside", children: t[1] }),
|
1295
|
+
/* @__PURE__ */ s.jsx("div", { className: "clay-content", children: t[2] })
|
1296
|
+
] })
|
1297
|
+
] }),
|
1298
|
+
m === "left-right-top-bottom" && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
1299
|
+
/* @__PURE__ */ s.jsx("header", { className: "clay-header", children: t[0] }),
|
1300
|
+
/* @__PURE__ */ s.jsxs("div", { className: "clay-main", children: [
|
1301
|
+
/* @__PURE__ */ s.jsx("aside", { className: "clay-aside", children: t[1] }),
|
1302
|
+
/* @__PURE__ */ s.jsxs("div", { className: "clay-right", children: [
|
1303
|
+
/* @__PURE__ */ s.jsx("header", { className: "clay-header", children: t[2] }),
|
1304
|
+
/* @__PURE__ */ s.jsx("div", { className: "clay-content", children: t[3] })
|
1305
|
+
] })
|
1306
|
+
] })
|
1307
|
+
] }),
|
1308
|
+
m === "left-right-three-parts" && /* @__PURE__ */ s.jsxs("div", { className: "ultra", children: [
|
1309
|
+
/* @__PURE__ */ s.jsx("aside", { className: "clay-aside", children: t[0] }),
|
1310
|
+
/* @__PURE__ */ s.jsxs("div", { className: "clay-right", children: [
|
1311
|
+
/* @__PURE__ */ s.jsx("header", { className: "clay-header", children: t[1] }),
|
1312
|
+
/* @__PURE__ */ s.jsx("main", { className: "clay-main", children: t[2] }),
|
1313
|
+
/* @__PURE__ */ s.jsx("footer", { className: "clay-footer", children: t[3] })
|
1314
|
+
] })
|
1315
|
+
] })
|
1316
|
+
] });
|
1317
|
+
}
|
1318
|
+
_t.propTypes = {
|
1319
|
+
children: n.node.isRequired,
|
1320
|
+
className: n.string,
|
1321
|
+
// 添加 className PropTypes
|
1322
|
+
type: n.oneOf([
|
1323
|
+
"top-middle-bottom",
|
1324
|
+
"top-bottom-split",
|
1325
|
+
"left-right-top-bottom",
|
1326
|
+
"left-right-three-parts"
|
1327
|
+
]).isRequired
|
1328
|
+
};
|
1329
|
+
function Ue(g) {
|
1330
|
+
const {
|
1331
|
+
sx: t = {},
|
1332
|
+
style: m = {},
|
1333
|
+
className: a = "",
|
1334
|
+
onClick: l,
|
1335
|
+
children: h,
|
1336
|
+
size: d = "medium"
|
1337
|
+
} = g, p = `line line-${d} ${h ? "line-has-text" : "line-no-text"} ${a}`, x = { ...A(t), ...m };
|
1338
|
+
return Ue.propTypes = {
|
1339
|
+
sx: n.object,
|
1340
|
+
// 自定义样式对象
|
1341
|
+
size: n.oneOf(["small", "medium", "large", "huge"]),
|
1342
|
+
// 间隔间隙
|
1343
|
+
style: n.object,
|
1344
|
+
// 用户传入的 style 属性,保证style属性优先级最高
|
1345
|
+
onClick: n.func,
|
1346
|
+
// 点击事件
|
1347
|
+
className: n.string,
|
1348
|
+
// 添加 className PropTypes
|
1349
|
+
children: n.node.isRequired
|
1350
|
+
// 按钮内容
|
1351
|
+
}, Ue.defaultProps = {
|
1352
|
+
sx: {},
|
1353
|
+
size: "medium",
|
1354
|
+
style: {},
|
1355
|
+
onClick: () => {
|
1356
|
+
},
|
1357
|
+
className: ""
|
1358
|
+
// 默认值为空字符串
|
1359
|
+
}, /* @__PURE__ */ s.jsx(
|
1360
|
+
"div",
|
1361
|
+
{
|
1362
|
+
style: x,
|
1363
|
+
onClick: l,
|
1364
|
+
className: p,
|
1365
|
+
children: h && /* @__PURE__ */ s.jsx("div", { className: "line-text", children: h })
|
1366
|
+
}
|
1367
|
+
);
|
1368
|
+
}
|
1369
|
+
function Ge(g) {
|
1370
|
+
const {
|
1371
|
+
sx: t = {},
|
1372
|
+
style: m = {},
|
1373
|
+
className: a = "",
|
1374
|
+
onClick: l,
|
1375
|
+
children: h,
|
1376
|
+
color: d = "default",
|
1377
|
+
beauty: p = !1
|
1378
|
+
// 是否使用新样式
|
1379
|
+
} = g, c = A(t), v = {
|
1380
|
+
backgroundColor: d === "default" ? "#ffe28d" : d,
|
1381
|
+
...{
|
1382
|
+
width: "auto",
|
1383
|
+
height: "auto",
|
1384
|
+
display: "inline-block"
|
1385
|
+
},
|
1386
|
+
...p ? {
|
1387
|
+
padding: "4px 8px",
|
1388
|
+
borderRadius: "4px"
|
1389
|
+
} : {},
|
1390
|
+
...c,
|
1391
|
+
...m
|
1392
|
+
};
|
1393
|
+
return /* @__PURE__ */ s.jsx(
|
1394
|
+
"div",
|
1395
|
+
{
|
1396
|
+
style: v,
|
1397
|
+
onClick: l,
|
1398
|
+
className: `mark ${a}`,
|
1399
|
+
children: h
|
1400
|
+
}
|
1401
|
+
);
|
1402
|
+
}
|
1403
|
+
Ge.propTypes = {
|
1404
|
+
color: n.string,
|
1405
|
+
// color 支持颜色单词、#999、rgb
|
1406
|
+
sx: n.object,
|
1407
|
+
// 自定义样式对象
|
1408
|
+
style: n.object,
|
1409
|
+
// 用户传入的 style,保证 style 最高优先级
|
1410
|
+
onClick: n.func,
|
1411
|
+
// 点击事件
|
1412
|
+
className: n.string,
|
1413
|
+
// 自定义 className
|
1414
|
+
children: n.node.isRequired,
|
1415
|
+
// 内容
|
1416
|
+
beauty: n.bool
|
1417
|
+
// 是否应用新样式
|
1418
|
+
};
|
1419
|
+
Ge.defaultProps = {
|
1420
|
+
color: "default",
|
1421
|
+
sx: {},
|
1422
|
+
style: {},
|
1423
|
+
onClick: () => {
|
1424
|
+
},
|
1425
|
+
className: "",
|
1426
|
+
beauty: !1
|
1427
|
+
};
|
1428
|
+
function Be(g) {
|
1429
|
+
const { children: t, title: m, onText: a, cancelText: l, open: h, onClose: d } = g, [p, c] = F(!1), [x, o] = F(!1);
|
1430
|
+
Be.propTypes = {
|
1431
|
+
children: n.node.isRequired,
|
1432
|
+
title: n.string,
|
1433
|
+
onText: n.string,
|
1434
|
+
cancelText: n.string,
|
1435
|
+
open: n.bool,
|
1436
|
+
onClose: n.func
|
1437
|
+
}, Be.defaultProps = {
|
1438
|
+
title: "基础标题",
|
1439
|
+
onText: "确定",
|
1440
|
+
cancelText: "取消",
|
1441
|
+
open: !1,
|
1442
|
+
onClose: () => {
|
1443
|
+
}
|
1444
|
+
}, pe(() => {
|
1445
|
+
h ? (c(!0), o(!1)) : p && (o(!0), setTimeout(() => {
|
1446
|
+
c(!1), o(!1);
|
1447
|
+
}, 300));
|
1448
|
+
}, [h]);
|
1449
|
+
function u() {
|
1450
|
+
console.log("确定按钮"), d && d();
|
655
1451
|
}
|
656
|
-
return
|
1452
|
+
return /* @__PURE__ */ s.jsx(s.Fragment, { children: p && /* @__PURE__ */ s.jsx("div", { className: `modal-overlay ${x ? "fade-out" : "fade-in"}`, children: /* @__PURE__ */ s.jsxs("div", { className: `modal-container ${x ? "scale-out" : "scale-in"}`, children: [
|
1453
|
+
/* @__PURE__ */ s.jsxs("div", { className: "modal-header", children: [
|
1454
|
+
/* @__PURE__ */ s.jsx("h3", { children: m }),
|
1455
|
+
/* @__PURE__ */ s.jsx("div", { className: "modal-closeBtn", onClick: d })
|
1456
|
+
] }),
|
1457
|
+
/* @__PURE__ */ s.jsx("div", { className: "modal-content", children: t }),
|
1458
|
+
/* @__PURE__ */ s.jsxs("div", { className: "modal-footer", children: [
|
1459
|
+
/* @__PURE__ */ s.jsx(U, { type: "success", onClick: u, children: a }),
|
1460
|
+
/* @__PURE__ */ s.jsx(U, { onClick: d, children: l })
|
1461
|
+
] })
|
1462
|
+
] }) }) });
|
1463
|
+
}
|
1464
|
+
function Ot({ type: g = "success", icon: t, message: m }) {
|
1465
|
+
const [a, l] = F(!0), [h, d] = F(!1);
|
1466
|
+
if (pe(() => {
|
1467
|
+
const c = setTimeout(() => {
|
1468
|
+
d(!0), setTimeout(() => {
|
1469
|
+
l(!1);
|
1470
|
+
}, 300);
|
1471
|
+
}, 3e3);
|
1472
|
+
return () => clearTimeout(c);
|
1473
|
+
}, []), !a) return null;
|
1474
|
+
const p = h ? "fade-out" : "";
|
1475
|
+
return /* @__PURE__ */ s.jsxs("div", { className: `notice ${p}`, children: [
|
1476
|
+
/* @__PURE__ */ s.jsx("img", { src: t, alt: g }),
|
1477
|
+
/* @__PURE__ */ s.jsx("span", { children: m })
|
1478
|
+
] });
|
1479
|
+
}
|
1480
|
+
Ot.propTypes = {
|
1481
|
+
type: n.oneOf(["success", "fail", "caution"]),
|
1482
|
+
icon: n.string.isRequired,
|
1483
|
+
message: n.string.isRequired
|
1484
|
+
};
|
1485
|
+
function Je(g) {
|
1486
|
+
const {
|
1487
|
+
size: t = "medium",
|
1488
|
+
sx: m = {},
|
1489
|
+
style: a = {},
|
1490
|
+
className: l = "",
|
1491
|
+
// 允许用户自定义 className
|
1492
|
+
onSearch: h,
|
1493
|
+
value: d,
|
1494
|
+
defaultValue: p = "",
|
1495
|
+
disabled: c = !1,
|
1496
|
+
placeholder: x = "",
|
1497
|
+
path: o = ""
|
1498
|
+
} = g, u = Ke(null), v = `search-input search-input-${t} ${c ? "search-input-disabled" : ""} ${l}`, E = { ...m, ...a }, N = d !== void 0 && h !== void 0;
|
1499
|
+
return Je.propTypes = {
|
1500
|
+
size: n.oneOf(["small", "medium", "large", "huge"]),
|
1501
|
+
sx: n.object,
|
1502
|
+
// 自定义样式对象
|
1503
|
+
style: n.object,
|
1504
|
+
// 用户传入的 style 属性,保证 style 属性优先级最高
|
1505
|
+
onSearch: n.func.isRequired,
|
1506
|
+
// 搜索事件回调
|
1507
|
+
className: n.string,
|
1508
|
+
// 添加 className PropTypes
|
1509
|
+
value: n.string,
|
1510
|
+
// 输入框的值 (受控模式)
|
1511
|
+
defaultValue: n.string,
|
1512
|
+
// 输入框的初始值 (非受控模式)
|
1513
|
+
disabled: n.bool,
|
1514
|
+
// 是否禁用
|
1515
|
+
placeholder: n.string,
|
1516
|
+
// 占位符
|
1517
|
+
path: n.string
|
1518
|
+
// 占位符
|
1519
|
+
}, Je.defaultProps = {
|
1520
|
+
size: "medium",
|
1521
|
+
sx: {},
|
1522
|
+
style: {},
|
1523
|
+
onSearch: () => {
|
1524
|
+
},
|
1525
|
+
className: "",
|
1526
|
+
// 默认值为空字符串
|
1527
|
+
value: void 0,
|
1528
|
+
defaultValue: "",
|
1529
|
+
disabled: !1,
|
1530
|
+
placeholder: "请输入内容",
|
1531
|
+
path: ""
|
1532
|
+
}, /* @__PURE__ */ s.jsxs(
|
1533
|
+
"div",
|
1534
|
+
{
|
1535
|
+
className: "search-container",
|
1536
|
+
style: { position: "relative", width: 300 },
|
1537
|
+
children: [
|
1538
|
+
/* @__PURE__ */ s.jsx(
|
1539
|
+
"input",
|
1540
|
+
{
|
1541
|
+
className: v,
|
1542
|
+
style: E,
|
1543
|
+
ref: N ? void 0 : u,
|
1544
|
+
onKeyDown: (C) => C.key === "Enter" && h(N ? d : u.current.value),
|
1545
|
+
value: N ? d : void 0,
|
1546
|
+
defaultValue: N ? void 0 : p,
|
1547
|
+
disabled: c,
|
1548
|
+
placeholder: x
|
1549
|
+
}
|
1550
|
+
),
|
1551
|
+
/* @__PURE__ */ s.jsx(
|
1552
|
+
"button",
|
1553
|
+
{
|
1554
|
+
className: "search-button",
|
1555
|
+
onClick: () => h(N ? d : u.current.value),
|
1556
|
+
children: o ? /* @__PURE__ */ s.jsx(
|
1557
|
+
"img",
|
1558
|
+
{
|
1559
|
+
src: o,
|
1560
|
+
alt: "search-logo",
|
1561
|
+
style: {
|
1562
|
+
width: 16,
|
1563
|
+
height: 16,
|
1564
|
+
marginTop: 2,
|
1565
|
+
marginBottom: -3
|
1566
|
+
}
|
1567
|
+
}
|
1568
|
+
) : "搜索"
|
1569
|
+
}
|
1570
|
+
)
|
1571
|
+
]
|
1572
|
+
}
|
1573
|
+
);
|
1574
|
+
}
|
1575
|
+
const Xe = fe.forwardRef((g, t) => {
|
1576
|
+
const {
|
1577
|
+
sx: m = {},
|
1578
|
+
style: a = {},
|
1579
|
+
className: l = "",
|
1580
|
+
onClick: h,
|
1581
|
+
children: d,
|
1582
|
+
type: p = "default"
|
1583
|
+
} = g, c = `space space-${p} ${l}`, o = { ...A(m), ...a };
|
1584
|
+
return /* @__PURE__ */ s.jsx(
|
1585
|
+
"div",
|
1586
|
+
{
|
1587
|
+
ref: t,
|
1588
|
+
style: o,
|
1589
|
+
onClick: h,
|
1590
|
+
className: c,
|
1591
|
+
children: d
|
1592
|
+
}
|
1593
|
+
);
|
1594
|
+
});
|
1595
|
+
Xe.propTypes = {
|
1596
|
+
type: n.oneOf([
|
1597
|
+
"default",
|
1598
|
+
"inline",
|
1599
|
+
"circle",
|
1600
|
+
"triangle",
|
1601
|
+
"halfCircle",
|
1602
|
+
"fixed",
|
1603
|
+
"absolute",
|
1604
|
+
"relative"
|
1605
|
+
]),
|
1606
|
+
sx: n.object,
|
1607
|
+
style: n.object,
|
1608
|
+
onClick: n.func,
|
1609
|
+
className: n.string,
|
1610
|
+
children: n.node.isRequired
|
1611
|
+
};
|
1612
|
+
Xe.defaultProps = {
|
1613
|
+
type: "default",
|
1614
|
+
sx: {},
|
1615
|
+
style: {},
|
1616
|
+
onClick: () => {
|
1617
|
+
},
|
1618
|
+
className: ""
|
1619
|
+
};
|
1620
|
+
function Ze({ children: g, tooltipText: t, placement: m = "top" }) {
|
1621
|
+
const a = `tooltip-wrapper tooltip-${m}`;
|
1622
|
+
return /* @__PURE__ */ s.jsxs("div", { className: a, children: [
|
1623
|
+
g,
|
1624
|
+
/* @__PURE__ */ s.jsx("div", { className: "tooltip", children: t })
|
1625
|
+
] });
|
657
1626
|
}
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
1627
|
+
Ze.propTypes = {
|
1628
|
+
children: n.node.isRequired,
|
1629
|
+
// 包裹的子内容
|
1630
|
+
tooltipText: n.string.isRequired,
|
1631
|
+
// Tooltip 显示的文字内容
|
1632
|
+
placement: n.oneOf(["top", "bottom", "right"])
|
1633
|
+
// 支持的方向
|
1634
|
+
};
|
1635
|
+
Ze.defaultProps = {
|
1636
|
+
placement: "top"
|
1637
|
+
};
|
1638
|
+
export {
|
1639
|
+
U as Button,
|
1640
|
+
Me as ColorPicker,
|
1641
|
+
de as Date,
|
1642
|
+
He as DatePicker,
|
1643
|
+
qe as Drawer,
|
1644
|
+
Ye as Input,
|
1645
|
+
_t as Layout,
|
1646
|
+
Ue as Line,
|
1647
|
+
Ge as Mark,
|
1648
|
+
Ft as MaterialButton,
|
1649
|
+
At as MaterialInput,
|
1650
|
+
Be as Modal,
|
1651
|
+
Ot as Notice,
|
1652
|
+
Je as Search,
|
1653
|
+
Xe as Space,
|
1654
|
+
Ft as Table,
|
1655
|
+
Ze as Tooltip
|
1656
|
+
};
|