xmirror-components 1.0.1 → 1.0.3

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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/build/LICENSE +21 -0
  3. package/build/dist/xmirror-components.css +1 -0
  4. package/build/dist/xmirror-components.js +784 -0
  5. package/build/dist/xmirror-components.umd.cjs +35 -0
  6. package/build/es/AntdApp/index.d.ts +12 -0
  7. package/build/es/AntdApp/index.js +14 -0
  8. package/build/es/Button/button.d.ts +6 -0
  9. package/build/es/Button/button.js +22 -0
  10. package/build/es/Button/index.d.ts +3 -0
  11. package/build/es/Button/index.js +7 -0
  12. package/build/es/CheckboxValue/index.d.ts +40 -0
  13. package/build/es/CheckboxValue/index.js +33 -0
  14. package/build/es/ChunkUploader/FileItem.d.ts +13 -0
  15. package/build/es/ChunkUploader/FileItem.js +472 -0
  16. package/build/es/ChunkUploader/UploaderContext.d.ts +8 -0
  17. package/build/es/ChunkUploader/UploaderContext.js +65 -0
  18. package/build/es/ChunkUploader/generateFileUniqueID.d.ts +2 -0
  19. package/build/es/ChunkUploader/generateFileUniqueID.js +140 -0
  20. package/build/es/ChunkUploader/index.d.ts +4 -0
  21. package/build/es/ChunkUploader/index.js +259 -0
  22. package/build/es/GlobalLoading/index.d.ts +11 -0
  23. package/build/es/GlobalLoading/index.js +32 -0
  24. package/build/es/IconButton/index.d.ts +42 -0
  25. package/build/es/IconButton/index.js +51 -0
  26. package/build/es/IconFont/index.d.ts +21 -0
  27. package/build/es/IconFont/index.js +32 -0
  28. package/build/es/LevelGroup/index.d.ts +10 -0
  29. package/build/es/LevelGroup/index.js +33 -0
  30. package/build/es/LevelTag/index.d.ts +21 -0
  31. package/build/es/LevelTag/index.js +84 -0
  32. package/build/es/SearchArea/Item/index.d.ts +13 -0
  33. package/build/es/SearchArea/Item/index.js +38 -0
  34. package/build/es/SearchArea/ToggleButton/index.d.ts +9 -0
  35. package/build/es/SearchArea/ToggleButton/index.js +24 -0
  36. package/build/es/SearchArea/index.d.ts +13 -0
  37. package/build/es/SearchArea/index.js +153 -0
  38. package/build/es/SwitchValue/index.d.ts +30 -0
  39. package/build/es/SwitchValue/index.js +36 -0
  40. package/build/es/Table/Footer/index.d.ts +3 -0
  41. package/build/es/Table/Footer/index.js +82 -0
  42. package/build/es/Table/PopoverSetColumns/index.d.ts +11 -0
  43. package/build/es/Table/PopoverSetColumns/index.js +164 -0
  44. package/build/es/Table/index.d.ts +4 -0
  45. package/build/es/Table/index.js +230 -0
  46. package/build/es/Uploader/index.d.ts +10 -0
  47. package/build/es/Uploader/index.js +175 -0
  48. package/build/es/index.d.ts +5 -0
  49. package/build/es/index.js +5 -0
  50. package/build/lib/AntdApp/index.js +19 -0
  51. package/build/lib/Button/button.js +22 -0
  52. package/build/lib/Button/index.js +7 -0
  53. package/build/lib/CheckboxValue/index.js +38 -0
  54. package/build/lib/IconButton/index.js +91 -0
  55. package/build/lib/IconFont/index.js +67 -0
  56. package/build/lib/SwitchValue/index.js +41 -0
  57. package/build/lib/index.d.ts +1 -0
  58. package/build/lib/index.js +19 -0
  59. package/build/package.json +64 -0
  60. package/package.json +47 -23
  61. package/dist/index.es.js +0 -470
  62. package/dist/index.umd.js +0 -31
  63. /package/{dist → build/dist}/vite.svg +0 -0
@@ -0,0 +1,784 @@
1
+ import Oe, { useRef as R, useEffect as Re, useState as qe, useMemo as Ae, forwardRef as Ve, Fragment as Be } from "react";
2
+ import { Checkbox as Ie, Button as ze, Tooltip as Ge, Switch as He, message as Je, notification as Xe, Modal as Ze, App as Qe } from "antd";
3
+ function Ke(r) {
4
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
5
+ }
6
+ var W = { exports: {} }, P = {};
7
+ /**
8
+ * @license React
9
+ * react-jsx-runtime.production.js
10
+ *
11
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+ var _e;
17
+ function De() {
18
+ if (_e) return P;
19
+ _e = 1;
20
+ var r = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
21
+ function t(c, u, n) {
22
+ var s = null;
23
+ if (n !== void 0 && (s = "" + n), u.key !== void 0 && (s = "" + u.key), "key" in u) {
24
+ n = {};
25
+ for (var f in u)
26
+ f !== "key" && (n[f] = u[f]);
27
+ } else n = u;
28
+ return u = n.ref, {
29
+ $$typeof: r,
30
+ type: c,
31
+ key: s,
32
+ ref: u !== void 0 ? u : null,
33
+ props: n
34
+ };
35
+ }
36
+ return P.Fragment = i, P.jsx = t, P.jsxs = t, P;
37
+ }
38
+ var $ = {};
39
+ /**
40
+ * @license React
41
+ * react-jsx-runtime.development.js
42
+ *
43
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE file in the root directory of this source tree.
47
+ */
48
+ var he;
49
+ function er() {
50
+ return he || (he = 1, process.env.NODE_ENV !== "production" && function() {
51
+ function r(e) {
52
+ if (e == null) return null;
53
+ if (typeof e == "function")
54
+ return e.$$typeof === Ue ? null : e.displayName || e.name || null;
55
+ if (typeof e == "string") return e;
56
+ switch (e) {
57
+ case V:
58
+ return "Fragment";
59
+ case Me:
60
+ return "Portal";
61
+ case ne:
62
+ return "Profiler";
63
+ case te:
64
+ return "StrictMode";
65
+ case I:
66
+ return "Suspense";
67
+ case z:
68
+ return "SuspenseList";
69
+ }
70
+ if (typeof e == "object")
71
+ switch (typeof e.tag == "number" && console.error(
72
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
73
+ ), e.$$typeof) {
74
+ case ae:
75
+ return (e.displayName || "Context") + ".Provider";
76
+ case oe:
77
+ return (e._context.displayName || "Context") + ".Consumer";
78
+ case B:
79
+ var o = e.render;
80
+ return e = e.displayName, e || (e = o.displayName || o.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
81
+ case G:
82
+ return o = e.displayName || null, o !== null ? o : r(e.type) || "Memo";
83
+ case H:
84
+ o = e._payload, e = e._init;
85
+ try {
86
+ return r(e(o));
87
+ } catch {
88
+ }
89
+ }
90
+ return null;
91
+ }
92
+ function i(e) {
93
+ return "" + e;
94
+ }
95
+ function t(e) {
96
+ try {
97
+ i(e);
98
+ var o = !1;
99
+ } catch {
100
+ o = !0;
101
+ }
102
+ if (o) {
103
+ o = console;
104
+ var a = o.error, v = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
105
+ return a.call(
106
+ o,
107
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
108
+ v
109
+ ), i(e);
110
+ }
111
+ }
112
+ function c() {
113
+ }
114
+ function u() {
115
+ if (N === 0) {
116
+ ie = console.log, ce = console.info, le = console.warn, fe = console.error, ve = console.group, de = console.groupCollapsed, be = console.groupEnd;
117
+ var e = {
118
+ configurable: !0,
119
+ enumerable: !0,
120
+ value: c,
121
+ writable: !0
122
+ };
123
+ Object.defineProperties(console, {
124
+ info: e,
125
+ log: e,
126
+ warn: e,
127
+ error: e,
128
+ group: e,
129
+ groupCollapsed: e,
130
+ groupEnd: e
131
+ });
132
+ }
133
+ N++;
134
+ }
135
+ function n() {
136
+ if (N--, N === 0) {
137
+ var e = { configurable: !0, enumerable: !0, writable: !0 };
138
+ Object.defineProperties(console, {
139
+ log: x({}, e, { value: ie }),
140
+ info: x({}, e, { value: ce }),
141
+ warn: x({}, e, { value: le }),
142
+ error: x({}, e, { value: fe }),
143
+ group: x({}, e, { value: ve }),
144
+ groupCollapsed: x({}, e, { value: de }),
145
+ groupEnd: x({}, e, { value: be })
146
+ });
147
+ }
148
+ 0 > N && console.error(
149
+ "disabledDepth fell below zero. This is a bug in React. Please file an issue."
150
+ );
151
+ }
152
+ function s(e) {
153
+ if (X === void 0)
154
+ try {
155
+ throw Error();
156
+ } catch (a) {
157
+ var o = a.stack.trim().match(/\n( *(at )?)/);
158
+ X = o && o[1] || "", ge = -1 < a.stack.indexOf(`
159
+ at`) ? " (<anonymous>)" : -1 < a.stack.indexOf("@") ? "@unknown:0:0" : "";
160
+ }
161
+ return `
162
+ ` + X + e + ge;
163
+ }
164
+ function f(e, o) {
165
+ if (!e || Z) return "";
166
+ var a = Q.get(e);
167
+ if (a !== void 0) return a;
168
+ Z = !0, a = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
169
+ var v = null;
170
+ v = w.H, w.H = null, u();
171
+ try {
172
+ var E = {
173
+ DetermineComponentFrameRoot: function() {
174
+ try {
175
+ if (o) {
176
+ var j = function() {
177
+ throw Error();
178
+ };
179
+ if (Object.defineProperty(j.prototype, "props", {
180
+ set: function() {
181
+ throw Error();
182
+ }
183
+ }), typeof Reflect == "object" && Reflect.construct) {
184
+ try {
185
+ Reflect.construct(j, []);
186
+ } catch (T) {
187
+ var M = T;
188
+ }
189
+ Reflect.construct(e, [], j);
190
+ } else {
191
+ try {
192
+ j.call();
193
+ } catch (T) {
194
+ M = T;
195
+ }
196
+ e.call(j.prototype);
197
+ }
198
+ } else {
199
+ try {
200
+ throw Error();
201
+ } catch (T) {
202
+ M = T;
203
+ }
204
+ (j = e()) && typeof j.catch == "function" && j.catch(function() {
205
+ });
206
+ }
207
+ } catch (T) {
208
+ if (T && M && typeof T.stack == "string")
209
+ return [T.stack, M.stack];
210
+ }
211
+ return [null, null];
212
+ }
213
+ };
214
+ E.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
215
+ var g = Object.getOwnPropertyDescriptor(
216
+ E.DetermineComponentFrameRoot,
217
+ "name"
218
+ );
219
+ g && g.configurable && Object.defineProperty(
220
+ E.DetermineComponentFrameRoot,
221
+ "name",
222
+ { value: "DetermineComponentFrameRoot" }
223
+ );
224
+ var l = E.DetermineComponentFrameRoot(), h = l[0], O = l[1];
225
+ if (h && O) {
226
+ var m = h.split(`
227
+ `), S = O.split(`
228
+ `);
229
+ for (l = g = 0; g < m.length && !m[g].includes(
230
+ "DetermineComponentFrameRoot"
231
+ ); )
232
+ g++;
233
+ for (; l < S.length && !S[l].includes(
234
+ "DetermineComponentFrameRoot"
235
+ ); )
236
+ l++;
237
+ if (g === m.length || l === S.length)
238
+ for (g = m.length - 1, l = S.length - 1; 1 <= g && 0 <= l && m[g] !== S[l]; )
239
+ l--;
240
+ for (; 1 <= g && 0 <= l; g--, l--)
241
+ if (m[g] !== S[l]) {
242
+ if (g !== 1 || l !== 1)
243
+ do
244
+ if (g--, l--, 0 > l || m[g] !== S[l]) {
245
+ var C = `
246
+ ` + m[g].replace(
247
+ " at new ",
248
+ " at "
249
+ );
250
+ return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, C), C;
251
+ }
252
+ while (1 <= g && 0 <= l);
253
+ break;
254
+ }
255
+ }
256
+ } finally {
257
+ Z = !1, w.H = v, n(), Error.prepareStackTrace = a;
258
+ }
259
+ return m = (m = e ? e.displayName || e.name : "") ? s(m) : "", typeof e == "function" && Q.set(e, m), m;
260
+ }
261
+ function d(e) {
262
+ if (e == null) return "";
263
+ if (typeof e == "function") {
264
+ var o = e.prototype;
265
+ return f(
266
+ e,
267
+ !(!o || !o.isReactComponent)
268
+ );
269
+ }
270
+ if (typeof e == "string") return s(e);
271
+ switch (e) {
272
+ case I:
273
+ return s("Suspense");
274
+ case z:
275
+ return s("SuspenseList");
276
+ }
277
+ if (typeof e == "object")
278
+ switch (e.$$typeof) {
279
+ case B:
280
+ return e = f(e.render, !1), e;
281
+ case G:
282
+ return d(e.type);
283
+ case H:
284
+ o = e._payload, e = e._init;
285
+ try {
286
+ return d(e(o));
287
+ } catch {
288
+ }
289
+ }
290
+ return "";
291
+ }
292
+ function b() {
293
+ var e = w.A;
294
+ return e === null ? null : e.getOwner();
295
+ }
296
+ function p(e) {
297
+ if (se.call(e, "key")) {
298
+ var o = Object.getOwnPropertyDescriptor(e, "key").get;
299
+ if (o && o.isReactWarning) return !1;
300
+ }
301
+ return e.key !== void 0;
302
+ }
303
+ function y(e, o) {
304
+ function a() {
305
+ Ee || (Ee = !0, console.error(
306
+ "%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)",
307
+ o
308
+ ));
309
+ }
310
+ a.isReactWarning = !0, Object.defineProperty(e, "key", {
311
+ get: a,
312
+ configurable: !0
313
+ });
314
+ }
315
+ function A() {
316
+ var e = r(this.type);
317
+ return me[e] || (me[e] = !0, console.error(
318
+ "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."
319
+ )), e = this.props.ref, e !== void 0 ? e : null;
320
+ }
321
+ function L(e, o, a, v, E, g) {
322
+ return a = g.ref, e = {
323
+ $$typeof: q,
324
+ type: e,
325
+ key: o,
326
+ props: g,
327
+ _owner: E
328
+ }, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
329
+ enumerable: !1,
330
+ get: A
331
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
332
+ configurable: !1,
333
+ enumerable: !1,
334
+ writable: !0,
335
+ value: 0
336
+ }), Object.defineProperty(e, "_debugInfo", {
337
+ configurable: !1,
338
+ enumerable: !1,
339
+ writable: !0,
340
+ value: null
341
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
342
+ }
343
+ function k(e, o, a, v, E, g) {
344
+ if (typeof e == "string" || typeof e == "function" || e === V || e === ne || e === te || e === I || e === z || e === We || typeof e == "object" && e !== null && (e.$$typeof === H || e.$$typeof === G || e.$$typeof === ae || e.$$typeof === oe || e.$$typeof === B || e.$$typeof === Le || e.getModuleId !== void 0)) {
345
+ var l = o.children;
346
+ if (l !== void 0)
347
+ if (v)
348
+ if (J(l)) {
349
+ for (v = 0; v < l.length; v++)
350
+ ee(l[v], e);
351
+ Object.freeze && Object.freeze(l);
352
+ } else
353
+ console.error(
354
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
355
+ );
356
+ else ee(l, e);
357
+ } else
358
+ l = "", (e === void 0 || typeof e == "object" && e !== null && 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."), e === null ? v = "null" : J(e) ? v = "array" : e !== void 0 && e.$$typeof === q ? (v = "<" + (r(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, console.error(
359
+ "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
360
+ v,
361
+ l
362
+ );
363
+ if (se.call(o, "key")) {
364
+ l = r(e);
365
+ var h = Object.keys(o).filter(function(m) {
366
+ return m !== "key";
367
+ });
368
+ v = 0 < h.length ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}", pe[l + v] || (h = 0 < h.length ? "{" + h.join(": ..., ") + ": ...}" : "{}", console.error(
369
+ `A props object containing a "key" prop is being spread into JSX:
370
+ let props = %s;
371
+ <%s {...props} />
372
+ React keys must be passed directly to JSX without using spread:
373
+ let props = %s;
374
+ <%s key={someKey} {...props} />`,
375
+ v,
376
+ l,
377
+ h,
378
+ l
379
+ ), pe[l + v] = !0);
380
+ }
381
+ if (l = null, a !== void 0 && (t(a), l = "" + a), p(o) && (t(o.key), l = "" + o.key), "key" in o) {
382
+ a = {};
383
+ for (var O in o)
384
+ O !== "key" && (a[O] = o[O]);
385
+ } else a = o;
386
+ return l && y(
387
+ a,
388
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
389
+ ), L(e, l, g, E, b(), a);
390
+ }
391
+ function ee(e, o) {
392
+ if (typeof e == "object" && e && e.$$typeof !== Fe) {
393
+ if (J(e))
394
+ for (var a = 0; a < e.length; a++) {
395
+ var v = e[a];
396
+ F(v) && re(v, o);
397
+ }
398
+ else if (F(e))
399
+ e._store && (e._store.validated = 1);
400
+ else if (e === null || typeof e != "object" ? a = null : (a = ue && e[ue] || e["@@iterator"], a = typeof a == "function" ? a : null), typeof a == "function" && a !== e.entries && (a = a.call(e), a !== e))
401
+ for (; !(e = a.next()).done; )
402
+ F(e.value) && re(e.value, o);
403
+ }
404
+ }
405
+ function F(e) {
406
+ return typeof e == "object" && e !== null && e.$$typeof === q;
407
+ }
408
+ function re(e, o) {
409
+ if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, o = $e(o), !ye[o])) {
410
+ ye[o] = !0;
411
+ var a = "";
412
+ e && e._owner != null && e._owner !== b() && (a = null, typeof e._owner.tag == "number" ? a = r(e._owner.type) : typeof e._owner.name == "string" && (a = e._owner.name), a = " It was passed a child from " + a + ".");
413
+ var v = w.getCurrentStack;
414
+ w.getCurrentStack = function() {
415
+ var E = d(e.type);
416
+ return v && (E += v() || ""), E;
417
+ }, console.error(
418
+ 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
419
+ o,
420
+ a
421
+ ), w.getCurrentStack = v;
422
+ }
423
+ }
424
+ function $e(e) {
425
+ var o = "", a = b();
426
+ return a && (a = r(a.type)) && (o = `
427
+
428
+ Check the render method of \`` + a + "`."), o || (e = r(e)) && (o = `
429
+
430
+ Check the top-level render call using <` + e + ">."), o;
431
+ }
432
+ var Ye = Oe, q = Symbol.for("react.transitional.element"), Me = Symbol.for("react.portal"), V = Symbol.for("react.fragment"), te = Symbol.for("react.strict_mode"), ne = Symbol.for("react.profiler"), oe = Symbol.for("react.consumer"), ae = Symbol.for("react.context"), B = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), z = Symbol.for("react.suspense_list"), G = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), We = Symbol.for("react.offscreen"), ue = Symbol.iterator, Ue = Symbol.for("react.client.reference"), w = Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, se = Object.prototype.hasOwnProperty, x = Object.assign, Le = Symbol.for("react.client.reference"), J = Array.isArray, N = 0, ie, ce, le, fe, ve, de, be;
433
+ c.__reactDisabledLog = !0;
434
+ var X, ge, Z = !1, Q = new (typeof WeakMap == "function" ? WeakMap : Map)(), Fe = Symbol.for("react.client.reference"), Ee, me = {}, pe = {}, ye = {};
435
+ $.Fragment = V, $.jsx = function(e, o, a, v, E) {
436
+ return k(e, o, a, !1, v, E);
437
+ }, $.jsxs = function(e, o, a, v, E) {
438
+ return k(e, o, a, !0, v, E);
439
+ };
440
+ }()), $;
441
+ }
442
+ var Te;
443
+ function rr() {
444
+ return Te || (Te = 1, process.env.NODE_ENV === "production" ? W.exports = De() : W.exports = er()), W.exports;
445
+ }
446
+ var _ = rr();
447
+ const Lr = ({
448
+ checked: r,
449
+ onChange: i,
450
+ trueValue: t = !0,
451
+ falseValue: c = !1,
452
+ trueLabel: u = "",
453
+ falseLabel: n = "",
454
+ children: s,
455
+ ...f
456
+ }) => {
457
+ const d = r === t, b = (p) => {
458
+ i == null || i(p.target.checked ? t : c, p);
459
+ };
460
+ return /* @__PURE__ */ _.jsx(
461
+ Ie,
462
+ {
463
+ checked: d,
464
+ onChange: b,
465
+ ...f,
466
+ children: s || (d ? u : n)
467
+ }
468
+ );
469
+ };
470
+ var tr = typeof global == "object" && global && global.Object === Object && global, nr = typeof self == "object" && self && self.Object === Object && self, or = tr || nr || Function("return this")(), U = or.Symbol, ke = Object.prototype, ar = ke.hasOwnProperty, ur = ke.toString, Y = U ? U.toStringTag : void 0;
471
+ function sr(r) {
472
+ var i = ar.call(r, Y), t = r[Y];
473
+ try {
474
+ r[Y] = void 0;
475
+ var c = !0;
476
+ } catch {
477
+ }
478
+ var u = ur.call(r);
479
+ return c && (i ? r[Y] = t : delete r[Y]), u;
480
+ }
481
+ var ir = Object.prototype, cr = ir.toString;
482
+ function lr(r) {
483
+ return cr.call(r);
484
+ }
485
+ var fr = "[object Null]", vr = "[object Undefined]", je = U ? U.toStringTag : void 0;
486
+ function dr(r) {
487
+ return r == null ? r === void 0 ? vr : fr : je && je in Object(r) ? sr(r) : lr(r);
488
+ }
489
+ function br(r) {
490
+ return r != null && typeof r == "object";
491
+ }
492
+ var gr = Array.isArray;
493
+ function Er() {
494
+ }
495
+ var mr = "[object String]";
496
+ function pr(r) {
497
+ return typeof r == "string" || !gr(r) && br(r) && dr(r) == mr;
498
+ }
499
+ var K = { exports: {} };
500
+ /*!
501
+ Copyright (c) 2018 Jed Watson.
502
+ Licensed under the MIT License (MIT), see
503
+ http://jedwatson.github.io/classnames
504
+ */
505
+ var we;
506
+ function yr() {
507
+ return we || (we = 1, function(r) {
508
+ (function() {
509
+ var i = {}.hasOwnProperty;
510
+ function t() {
511
+ for (var n = "", s = 0; s < arguments.length; s++) {
512
+ var f = arguments[s];
513
+ f && (n = u(n, c(f)));
514
+ }
515
+ return n;
516
+ }
517
+ function c(n) {
518
+ if (typeof n == "string" || typeof n == "number")
519
+ return n;
520
+ if (typeof n != "object")
521
+ return "";
522
+ if (Array.isArray(n))
523
+ return t.apply(null, n);
524
+ if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
525
+ return n.toString();
526
+ var s = "";
527
+ for (var f in n)
528
+ i.call(n, f) && n[f] && (s = u(s, f));
529
+ return s;
530
+ }
531
+ function u(n, s) {
532
+ return s ? n ? n + " " + s : n + s : n;
533
+ }
534
+ r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
535
+ })();
536
+ }(K)), K.exports;
537
+ }
538
+ var _r = yr();
539
+ const hr = /* @__PURE__ */ Ke(_r);
540
+ function D(r, i) {
541
+ var t = typeof Symbol == "function" && r[Symbol.iterator];
542
+ if (!t) return r;
543
+ var c = t.call(r), u, n = [], s;
544
+ try {
545
+ for (; (i === void 0 || i-- > 0) && !(u = c.next()).done; ) n.push(u.value);
546
+ } catch (f) {
547
+ s = { error: f };
548
+ } finally {
549
+ try {
550
+ u && !u.done && (t = c.return) && t.call(c);
551
+ } finally {
552
+ if (s) throw s.error;
553
+ }
554
+ }
555
+ return n;
556
+ }
557
+ var Ne = function(r) {
558
+ return typeof r == "function";
559
+ }, Tr = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
560
+ function xe(r, i) {
561
+ if (r === i) return !0;
562
+ for (var t = 0; t < r.length; t++)
563
+ if (!Object.is(r[t], i[t])) return !1;
564
+ return !0;
565
+ }
566
+ function Ce(r) {
567
+ var i = R(r);
568
+ return i.current = r, i;
569
+ }
570
+ var jr = function(r) {
571
+ Tr && (Ne(r) || console.error("useUnmount expected parameter is a function, got ".concat(typeof r)));
572
+ var i = Ce(r);
573
+ Re(function() {
574
+ return function() {
575
+ i.current();
576
+ };
577
+ }, []);
578
+ }, wr = !!(typeof window < "u" && window.document && window.document.createElement);
579
+ function xr(r, i) {
580
+ var t = D(qe(r), 2), c = t[0], u = t[1], n = Ae(function() {
581
+ var s = !0, f = function() {
582
+ return u(function(y) {
583
+ return y === r ? s : r;
584
+ });
585
+ }, d = function(y) {
586
+ return u(y);
587
+ }, b = function() {
588
+ return u(r);
589
+ }, p = function() {
590
+ return u(s);
591
+ };
592
+ return {
593
+ toggle: f,
594
+ set: d,
595
+ setLeft: b,
596
+ setRight: p
597
+ };
598
+ }, []);
599
+ return [c, n];
600
+ }
601
+ function Sr(r) {
602
+ var i = D(xr(!1), 2), t = i[0], c = i[1], u = c.toggle, n = c.set, s = Ae(function() {
603
+ var f = function() {
604
+ return n(!0);
605
+ }, d = function() {
606
+ return n(!1);
607
+ };
608
+ return {
609
+ toggle: u,
610
+ set: function(b) {
611
+ return n(!!b);
612
+ },
613
+ setTrue: f,
614
+ setFalse: d
615
+ };
616
+ }, []);
617
+ return [t, s];
618
+ }
619
+ function Pe(r, i) {
620
+ if (wr) {
621
+ if (!r)
622
+ return i;
623
+ var t;
624
+ return Ne(r) ? t = r() : "current" in r ? t = r.current : t = r, t;
625
+ }
626
+ }
627
+ var Or = function(r) {
628
+ var i = function(t, c, u) {
629
+ var n = R(!1), s = R([]), f = R([]), d = R();
630
+ r(function() {
631
+ var b, p = Array.isArray(u) ? u : [u], y = p.map(function(A) {
632
+ return Pe(A);
633
+ });
634
+ if (!n.current) {
635
+ n.current = !0, s.current = y, f.current = c, d.current = t();
636
+ return;
637
+ }
638
+ (y.length !== s.current.length || !xe(s.current, y) || !xe(f.current, c)) && ((b = d.current) === null || b === void 0 || b.call(d), s.current = y, f.current = c, d.current = t());
639
+ }), jr(function() {
640
+ var b;
641
+ (b = d.current) === null || b === void 0 || b.call(d), n.current = !1;
642
+ });
643
+ };
644
+ return i;
645
+ }, Rr = Or(Re);
646
+ function Se(r, i, t) {
647
+ t === void 0 && (t = {});
648
+ var c = t.enable, u = c === void 0 ? !0 : c, n = Ce(i);
649
+ Rr(function() {
650
+ if (u) {
651
+ var s = Pe(t.target, window);
652
+ if (s != null && s.addEventListener) {
653
+ var f = function(b) {
654
+ return n.current(b);
655
+ }, d = Array.isArray(r) ? r : [r];
656
+ return d.forEach(function(b) {
657
+ s.addEventListener(b, f, {
658
+ capture: t.capture,
659
+ once: t.once,
660
+ passive: t.passive
661
+ });
662
+ }), function() {
663
+ d.forEach(function(b) {
664
+ s.removeEventListener(b, f, {
665
+ capture: t.capture
666
+ });
667
+ });
668
+ };
669
+ }
670
+ }
671
+ }, [r, t.capture, t.once, t.passive, u], t.target);
672
+ }
673
+ const Ar = function(r, i) {
674
+ var t = {}, c = t.onEnter, u = t.onLeave, n = t.onChange, s = D(Sr(), 2), f = s[0], d = s[1], b = d.setTrue, p = d.setFalse;
675
+ return Se("mouseenter", function() {
676
+ c == null || c(), b(), n == null || n(!0);
677
+ }, {
678
+ target: r
679
+ }), Se("mouseleave", function() {
680
+ u == null || u(), p(), n == null || n(!1);
681
+ }, {
682
+ target: r
683
+ }), f;
684
+ }, kr = Ve(
685
+ ({ type: r = "", className: i = "", symbol: t = !1, ...c }, u) => t ? /* @__PURE__ */ _.jsx(
686
+ "svg",
687
+ {
688
+ className: `iconfont-symbol ${r} ${i}`,
689
+ "aria-hidden": "true",
690
+ ref: u,
691
+ ...c,
692
+ children: /* @__PURE__ */ _.jsx("use", { xlinkHref: `#${r}` })
693
+ }
694
+ ) : /* @__PURE__ */ _.jsx(
695
+ "i",
696
+ {
697
+ className: `iconfont ${r} ${i}`,
698
+ ref: u,
699
+ ...c
700
+ }
701
+ )
702
+ ), Nr = "_btn_icon__warp_ay6he_1", Cr = {
703
+ btn_icon__warp: Nr
704
+ }, Pr = (r, i) => {
705
+ const t = R(null), {
706
+ icon: c,
707
+ tooltipDisabled: u = !1,
708
+ onClick: n = Er,
709
+ disabled: s,
710
+ size: f = "middle",
711
+ style: d = {},
712
+ className: b,
713
+ loading: p = !1,
714
+ ...y
715
+ } = r, A = Ar(t), L = () => pr(c) && c.includes("icon-") ? /* @__PURE__ */ _.jsx(kr, { type: c }) : c, k = /* @__PURE__ */ _.jsx(
716
+ ze,
717
+ {
718
+ onClick: n,
719
+ size: f,
720
+ disabled: s,
721
+ style: d,
722
+ ref: i,
723
+ loading: p,
724
+ className: hr([b, Cr.btn_icon__warp]),
725
+ icon: L()
726
+ }
727
+ );
728
+ if (!c)
729
+ throw new Error("IconButton 组件必须传入 icon 属性");
730
+ return /* @__PURE__ */ _.jsxs(Be, { children: [
731
+ u && k,
732
+ !u && /* @__PURE__ */ _.jsx(
733
+ Ge,
734
+ {
735
+ open: A,
736
+ trigger: "contextMenu",
737
+ destroyTooltipOnHide: !0,
738
+ ...y,
739
+ children: /* @__PURE__ */ _.jsx(
740
+ "span",
741
+ {
742
+ ref: t,
743
+ style: { display: "inline-block" },
744
+ className: "icon-button-box",
745
+ children: k
746
+ }
747
+ )
748
+ }
749
+ )
750
+ ] });
751
+ }, Fr = Oe.forwardRef(Pr), qr = ({
752
+ checked: r,
753
+ onChange: i,
754
+ trueValue: t = !0,
755
+ falseValue: c = !1,
756
+ ...u
757
+ }) => {
758
+ const n = r === t, s = (f, d) => {
759
+ i == null || i(f ? t : c, d);
760
+ };
761
+ return /* @__PURE__ */ _.jsx(
762
+ He,
763
+ {
764
+ checked: n,
765
+ onChange: s,
766
+ ...u
767
+ }
768
+ );
769
+ };
770
+ let $r = Je, Yr = Xe, Mr = Ze;
771
+ function Vr({ children: r }) {
772
+ const i = Qe.useApp();
773
+ return $r = i.message, Mr = i.modal, Yr = i.notification, r;
774
+ }
775
+ export {
776
+ Vr as App,
777
+ Lr as CheckboxValue,
778
+ Fr as IconButton,
779
+ kr as IconFont,
780
+ qr as SwitchValue,
781
+ $r as message,
782
+ Mr as modal,
783
+ Yr as notification
784
+ };