xtreme-ui 0.0.12 → 0.0.14

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.es.js DELETED
@@ -1,1042 +0,0 @@
1
- import ar, { forwardRef as U, useRef as Ar, useMemo as Wr } from "react";
2
- const he = typeof window < "u", Y = he ? window : void 0, Te = (r, n) => he ? getComputedStyle((n == null ? void 0 : n.current) || document.documentElement).getPropertyValue(r) : "", aa = (r, n) => parseInt(Te(r, n).replace(/px/g, "")), ia = (r, n) => {
3
- const i = parseInt(Te(r, n).replace(/vh/g, ""));
4
- return [((Y == null ? void 0 : Y.innerHeight) ?? 0) * i / 100, i];
5
- }, oa = (r, n) => {
6
- const i = parseInt(Te(r, n).replace(/vw/g, ""));
7
- return [((Y == null ? void 0 : Y.innerWidth) ?? 0) * i / 100, i];
8
- }, sa = (r, n, i) => he ? ((i == null ? void 0 : i.current) || document.documentElement).style.setProperty(r, n) : "", ca = (r) => new Promise((n) => {
9
- let i = document.querySelector(r);
10
- if (i)
11
- return n(i);
12
- const o = new MutationObserver(() => {
13
- i = document.querySelector(r), i && (n(i), o.disconnect());
14
- });
15
- o.observe(document.body, { childList: !0, subtree: !0 });
16
- }), la = (r, n) => {
17
- var i;
18
- (i = n == null ? void 0 : n.forEach) == null || i.call(n, (o) => {
19
- let c;
20
- new MutationObserver((_) => {
21
- var l;
22
- document.querySelector(o) && (c = document.querySelector(o)), (l = _ == null ? void 0 : _.forEach) == null || l.call(_, (m) => {
23
- m.type === "childList" && (Array.from(m.addedNodes).indexOf(c) > -1 && r(c, "added", m), Array.from(m.removedNodes).indexOf(c) > -1 && r(c, "removed", m));
24
- });
25
- }).observe(document.body, { childList: !0, subtree: !0 });
26
- });
27
- }, qr = (r) => (n) => {
28
- r.forEach((i) => {
29
- typeof i == "function" ? i(n) : i != null && (i.current = n);
30
- });
31
- }, zr = (r) => isNaN(r) || r < 0 || r > 1114111 || Math.floor(r) !== r ? "" : String.fromCodePoint(r), Mr = (r) => zr(parseInt(`0x${r}`, 16));
32
- var ie = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
33
- function Vr(r) {
34
- return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
35
- }
36
- var ye = { exports: {} }, K = {};
37
- /**
38
- * @license React
39
- * react-jsx-runtime.production.min.js
40
- *
41
- * Copyright (c) Facebook, Inc. and its affiliates.
42
- *
43
- * This source code is licensed under the MIT license found in the
44
- * LICENSE file in the root directory of this source tree.
45
- */
46
- var Ge;
47
- function Yr() {
48
- if (Ge)
49
- return K;
50
- Ge = 1;
51
- var r = ar, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, c = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
52
- function _(d, l, m) {
53
- var y, b = {}, x = null, w = null;
54
- m !== void 0 && (x = "" + m), l.key !== void 0 && (x = "" + l.key), l.ref !== void 0 && (w = l.ref);
55
- for (y in l)
56
- o.call(l, y) && !g.hasOwnProperty(y) && (b[y] = l[y]);
57
- if (d && d.defaultProps)
58
- for (y in l = d.defaultProps, l)
59
- b[y] === void 0 && (b[y] = l[y]);
60
- return { $$typeof: n, type: d, key: x, ref: w, props: b, _owner: c.current };
61
- }
62
- return K.Fragment = i, K.jsx = _, K.jsxs = _, K;
63
- }
64
- var Z = {};
65
- /**
66
- * @license React
67
- * react-jsx-runtime.development.js
68
- *
69
- * Copyright (c) Facebook, Inc. and its affiliates.
70
- *
71
- * This source code is licensed under the MIT license found in the
72
- * LICENSE file in the root directory of this source tree.
73
- */
74
- var Je;
75
- function Ur() {
76
- return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
77
- var r = ar, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), d = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), W = Symbol.iterator, q = "@@iterator";
78
- function z(e) {
79
- if (e === null || typeof e != "object")
80
- return null;
81
- var t = W && e[W] || e[q];
82
- return typeof t == "function" ? t : null;
83
- }
84
- var j = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
85
- function T(e) {
86
- {
87
- for (var t = arguments.length, a = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
88
- a[s - 1] = arguments[s];
89
- oe("error", e, a);
90
- }
91
- }
92
- function oe(e, t, a) {
93
- {
94
- var s = j.ReactDebugCurrentFrame, p = s.getStackAddendum();
95
- p !== "" && (t += "%s", a = a.concat([p]));
96
- var v = a.map(function(f) {
97
- return String(f);
98
- });
99
- v.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, v);
100
- }
101
- }
102
- var se = !1, G = !1, S = !1, P = !1, F = !1, J;
103
- J = Symbol.for("react.module.reference");
104
- function fr(e) {
105
- return !!(typeof e == "string" || typeof e == "function" || e === o || e === g || F || e === c || e === m || e === y || P || e === w || se || G || S || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === b || e.$$typeof === _ || e.$$typeof === d || e.$$typeof === l || // This needs to include all possible module reference object
106
- // types supported by any Flight configuration anywhere since
107
- // we don't know which Flight build this will end up being used
108
- // with.
109
- e.$$typeof === J || e.getModuleId !== void 0));
110
- }
111
- function dr(e, t, a) {
112
- var s = e.displayName;
113
- if (s)
114
- return s;
115
- var p = t.displayName || t.name || "";
116
- return p !== "" ? a + "(" + p + ")" : a;
117
- }
118
- function Ee(e) {
119
- return e.displayName || "Context";
120
- }
121
- function N(e) {
122
- if (e == null)
123
- return null;
124
- if (typeof e.tag == "number" && T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
125
- return e.displayName || e.name || null;
126
- if (typeof e == "string")
127
- return e;
128
- switch (e) {
129
- case o:
130
- return "Fragment";
131
- case i:
132
- return "Portal";
133
- case g:
134
- return "Profiler";
135
- case c:
136
- return "StrictMode";
137
- case m:
138
- return "Suspense";
139
- case y:
140
- return "SuspenseList";
141
- }
142
- if (typeof e == "object")
143
- switch (e.$$typeof) {
144
- case d:
145
- var t = e;
146
- return Ee(t) + ".Consumer";
147
- case _:
148
- var a = e;
149
- return Ee(a._context) + ".Provider";
150
- case l:
151
- return dr(e, e.render, "ForwardRef");
152
- case b:
153
- var s = e.displayName || null;
154
- return s !== null ? s : N(e.type) || "Memo";
155
- case x: {
156
- var p = e, v = p._payload, f = p._init;
157
- try {
158
- return N(f(v));
159
- } catch {
160
- return null;
161
- }
162
- }
163
- }
164
- return null;
165
- }
166
- var L = Object.assign, X = 0, xe, je, Oe, we, Ce, Pe, ke;
167
- function Ne() {
168
- }
169
- Ne.__reactDisabledLog = !0;
170
- function pr() {
171
- {
172
- if (X === 0) {
173
- xe = console.log, je = console.info, Oe = console.warn, we = console.error, Ce = console.group, Pe = console.groupCollapsed, ke = console.groupEnd;
174
- var e = {
175
- configurable: !0,
176
- enumerable: !0,
177
- value: Ne,
178
- writable: !0
179
- };
180
- Object.defineProperties(console, {
181
- info: e,
182
- log: e,
183
- warn: e,
184
- error: e,
185
- group: e,
186
- groupCollapsed: e,
187
- groupEnd: e
188
- });
189
- }
190
- X++;
191
- }
192
- }
193
- function _r() {
194
- {
195
- if (X--, X === 0) {
196
- var e = {
197
- configurable: !0,
198
- enumerable: !0,
199
- writable: !0
200
- };
201
- Object.defineProperties(console, {
202
- log: L({}, e, {
203
- value: xe
204
- }),
205
- info: L({}, e, {
206
- value: je
207
- }),
208
- warn: L({}, e, {
209
- value: Oe
210
- }),
211
- error: L({}, e, {
212
- value: we
213
- }),
214
- group: L({}, e, {
215
- value: Ce
216
- }),
217
- groupCollapsed: L({}, e, {
218
- value: Pe
219
- }),
220
- groupEnd: L({}, e, {
221
- value: ke
222
- })
223
- });
224
- }
225
- X < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
226
- }
227
- }
228
- var ce = j.ReactCurrentDispatcher, le;
229
- function ee(e, t, a) {
230
- {
231
- if (le === void 0)
232
- try {
233
- throw Error();
234
- } catch (p) {
235
- var s = p.stack.trim().match(/\n( *(at )?)/);
236
- le = s && s[1] || "";
237
- }
238
- return `
239
- ` + le + e;
240
- }
241
- }
242
- var ue = !1, re;
243
- {
244
- var vr = typeof WeakMap == "function" ? WeakMap : Map;
245
- re = new vr();
246
- }
247
- function $e(e, t) {
248
- if (!e || ue)
249
- return "";
250
- {
251
- var a = re.get(e);
252
- if (a !== void 0)
253
- return a;
254
- }
255
- var s;
256
- ue = !0;
257
- var p = Error.prepareStackTrace;
258
- Error.prepareStackTrace = void 0;
259
- var v;
260
- v = ce.current, ce.current = null, pr();
261
- try {
262
- if (t) {
263
- var f = function() {
264
- throw Error();
265
- };
266
- if (Object.defineProperty(f.prototype, "props", {
267
- set: function() {
268
- throw Error();
269
- }
270
- }), typeof Reflect == "object" && Reflect.construct) {
271
- try {
272
- Reflect.construct(f, []);
273
- } catch ($) {
274
- s = $;
275
- }
276
- Reflect.construct(e, [], f);
277
- } else {
278
- try {
279
- f.call();
280
- } catch ($) {
281
- s = $;
282
- }
283
- e.call(f.prototype);
284
- }
285
- } else {
286
- try {
287
- throw Error();
288
- } catch ($) {
289
- s = $;
290
- }
291
- e();
292
- }
293
- } catch ($) {
294
- if ($ && s && typeof $.stack == "string") {
295
- for (var u = $.stack.split(`
296
- `), O = s.stack.split(`
297
- `), R = u.length - 1, E = O.length - 1; R >= 1 && E >= 0 && u[R] !== O[E]; )
298
- E--;
299
- for (; R >= 1 && E >= 0; R--, E--)
300
- if (u[R] !== O[E]) {
301
- if (R !== 1 || E !== 1)
302
- do
303
- if (R--, E--, E < 0 || u[R] !== O[E]) {
304
- var C = `
305
- ` + u[R].replace(" at new ", " at ");
306
- return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, C), C;
307
- }
308
- while (R >= 1 && E >= 0);
309
- break;
310
- }
311
- }
312
- } finally {
313
- ue = !1, ce.current = v, _r(), Error.prepareStackTrace = p;
314
- }
315
- var V = e ? e.displayName || e.name : "", Be = V ? ee(V) : "";
316
- return typeof e == "function" && re.set(e, Be), Be;
317
- }
318
- function gr(e, t, a) {
319
- return $e(e, !1);
320
- }
321
- function mr(e) {
322
- var t = e.prototype;
323
- return !!(t && t.isReactComponent);
324
- }
325
- function te(e, t, a) {
326
- if (e == null)
327
- return "";
328
- if (typeof e == "function")
329
- return $e(e, mr(e));
330
- if (typeof e == "string")
331
- return ee(e);
332
- switch (e) {
333
- case m:
334
- return ee("Suspense");
335
- case y:
336
- return ee("SuspenseList");
337
- }
338
- if (typeof e == "object")
339
- switch (e.$$typeof) {
340
- case l:
341
- return gr(e.render);
342
- case b:
343
- return te(e.type, t, a);
344
- case x: {
345
- var s = e, p = s._payload, v = s._init;
346
- try {
347
- return te(v(p), t, a);
348
- } catch {
349
- }
350
- }
351
- }
352
- return "";
353
- }
354
- var ne = Object.prototype.hasOwnProperty, De = {}, Ie = j.ReactDebugCurrentFrame;
355
- function ae(e) {
356
- if (e) {
357
- var t = e._owner, a = te(e.type, e._source, t ? t.type : null);
358
- Ie.setExtraStackFrame(a);
359
- } else
360
- Ie.setExtraStackFrame(null);
361
- }
362
- function yr(e, t, a, s, p) {
363
- {
364
- var v = Function.call.bind(ne);
365
- for (var f in e)
366
- if (v(e, f)) {
367
- var u = void 0;
368
- try {
369
- if (typeof e[f] != "function") {
370
- var O = Error((s || "React class") + ": " + a + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
371
- throw O.name = "Invariant Violation", O;
372
- }
373
- u = e[f](t, f, s, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
374
- } catch (R) {
375
- u = R;
376
- }
377
- u && !(u instanceof Error) && (ae(p), T("%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).", s || "React class", a, f, typeof u), ae(null)), u instanceof Error && !(u.message in De) && (De[u.message] = !0, ae(p), T("Failed %s type: %s", a, u.message), ae(null));
378
- }
379
- }
380
- }
381
- var br = Array.isArray;
382
- function fe(e) {
383
- return br(e);
384
- }
385
- function hr(e) {
386
- {
387
- var t = typeof Symbol == "function" && Symbol.toStringTag, a = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
388
- return a;
389
- }
390
- }
391
- function Tr(e) {
392
- try {
393
- return Fe(e), !1;
394
- } catch {
395
- return !0;
396
- }
397
- }
398
- function Fe(e) {
399
- return "" + e;
400
- }
401
- function Le(e) {
402
- if (Tr(e))
403
- return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", hr(e)), Fe(e);
404
- }
405
- var H = j.ReactCurrentOwner, Sr = {
406
- key: !0,
407
- ref: !0,
408
- __self: !0,
409
- __source: !0
410
- }, Ae, We, de;
411
- de = {};
412
- function Rr(e) {
413
- if (ne.call(e, "ref")) {
414
- var t = Object.getOwnPropertyDescriptor(e, "ref").get;
415
- if (t && t.isReactWarning)
416
- return !1;
417
- }
418
- return e.ref !== void 0;
419
- }
420
- function Er(e) {
421
- if (ne.call(e, "key")) {
422
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
423
- if (t && t.isReactWarning)
424
- return !1;
425
- }
426
- return e.key !== void 0;
427
- }
428
- function xr(e, t) {
429
- if (typeof e.ref == "string" && H.current && t && H.current.stateNode !== t) {
430
- var a = N(H.current.type);
431
- de[a] || (T('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', N(H.current.type), e.ref), de[a] = !0);
432
- }
433
- }
434
- function jr(e, t) {
435
- {
436
- var a = function() {
437
- Ae || (Ae = !0, T("%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));
438
- };
439
- a.isReactWarning = !0, Object.defineProperty(e, "key", {
440
- get: a,
441
- configurable: !0
442
- });
443
- }
444
- }
445
- function Or(e, t) {
446
- {
447
- var a = function() {
448
- We || (We = !0, T("%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)", t));
449
- };
450
- a.isReactWarning = !0, Object.defineProperty(e, "ref", {
451
- get: a,
452
- configurable: !0
453
- });
454
- }
455
- }
456
- var wr = function(e, t, a, s, p, v, f) {
457
- var u = {
458
- // This tag allows us to uniquely identify this as a React Element
459
- $$typeof: n,
460
- // Built-in properties that belong on the element
461
- type: e,
462
- key: t,
463
- ref: a,
464
- props: f,
465
- // Record the component responsible for creating this element.
466
- _owner: v
467
- };
468
- return u._store = {}, Object.defineProperty(u._store, "validated", {
469
- configurable: !1,
470
- enumerable: !1,
471
- writable: !0,
472
- value: !1
473
- }), Object.defineProperty(u, "_self", {
474
- configurable: !1,
475
- enumerable: !1,
476
- writable: !1,
477
- value: s
478
- }), Object.defineProperty(u, "_source", {
479
- configurable: !1,
480
- enumerable: !1,
481
- writable: !1,
482
- value: p
483
- }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
484
- };
485
- function Cr(e, t, a, s, p) {
486
- {
487
- var v, f = {}, u = null, O = null;
488
- a !== void 0 && (Le(a), u = "" + a), Er(t) && (Le(t.key), u = "" + t.key), Rr(t) && (O = t.ref, xr(t, p));
489
- for (v in t)
490
- ne.call(t, v) && !Sr.hasOwnProperty(v) && (f[v] = t[v]);
491
- if (e && e.defaultProps) {
492
- var R = e.defaultProps;
493
- for (v in R)
494
- f[v] === void 0 && (f[v] = R[v]);
495
- }
496
- if (u || O) {
497
- var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
498
- u && jr(f, E), O && Or(f, E);
499
- }
500
- return wr(e, u, O, p, s, H.current, f);
501
- }
502
- }
503
- var pe = j.ReactCurrentOwner, qe = j.ReactDebugCurrentFrame;
504
- function M(e) {
505
- if (e) {
506
- var t = e._owner, a = te(e.type, e._source, t ? t.type : null);
507
- qe.setExtraStackFrame(a);
508
- } else
509
- qe.setExtraStackFrame(null);
510
- }
511
- var _e;
512
- _e = !1;
513
- function ve(e) {
514
- return typeof e == "object" && e !== null && e.$$typeof === n;
515
- }
516
- function ze() {
517
- {
518
- if (pe.current) {
519
- var e = N(pe.current.type);
520
- if (e)
521
- return `
522
-
523
- Check the render method of \`` + e + "`.";
524
- }
525
- return "";
526
- }
527
- }
528
- function Pr(e) {
529
- {
530
- if (e !== void 0) {
531
- var t = e.fileName.replace(/^.*[\\\/]/, ""), a = e.lineNumber;
532
- return `
533
-
534
- Check your code at ` + t + ":" + a + ".";
535
- }
536
- return "";
537
- }
538
- }
539
- var Me = {};
540
- function kr(e) {
541
- {
542
- var t = ze();
543
- if (!t) {
544
- var a = typeof e == "string" ? e : e.displayName || e.name;
545
- a && (t = `
546
-
547
- Check the top-level render call using <` + a + ">.");
548
- }
549
- return t;
550
- }
551
- }
552
- function Ve(e, t) {
553
- {
554
- if (!e._store || e._store.validated || e.key != null)
555
- return;
556
- e._store.validated = !0;
557
- var a = kr(t);
558
- if (Me[a])
559
- return;
560
- Me[a] = !0;
561
- var s = "";
562
- e && e._owner && e._owner !== pe.current && (s = " It was passed a child from " + N(e._owner.type) + "."), M(e), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, s), M(null);
563
- }
564
- }
565
- function Ye(e, t) {
566
- {
567
- if (typeof e != "object")
568
- return;
569
- if (fe(e))
570
- for (var a = 0; a < e.length; a++) {
571
- var s = e[a];
572
- ve(s) && Ve(s, t);
573
- }
574
- else if (ve(e))
575
- e._store && (e._store.validated = !0);
576
- else if (e) {
577
- var p = z(e);
578
- if (typeof p == "function" && p !== e.entries)
579
- for (var v = p.call(e), f; !(f = v.next()).done; )
580
- ve(f.value) && Ve(f.value, t);
581
- }
582
- }
583
- }
584
- function Nr(e) {
585
- {
586
- var t = e.type;
587
- if (t == null || typeof t == "string")
588
- return;
589
- var a;
590
- if (typeof t == "function")
591
- a = t.propTypes;
592
- else if (typeof t == "object" && (t.$$typeof === l || // Note: Memo only checks outer props here.
593
- // Inner props are checked in the reconciler.
594
- t.$$typeof === b))
595
- a = t.propTypes;
596
- else
597
- return;
598
- if (a) {
599
- var s = N(t);
600
- yr(a, e.props, "prop", s, e);
601
- } else if (t.PropTypes !== void 0 && !_e) {
602
- _e = !0;
603
- var p = N(t);
604
- T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
605
- }
606
- typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
607
- }
608
- }
609
- function $r(e) {
610
- {
611
- for (var t = Object.keys(e.props), a = 0; a < t.length; a++) {
612
- var s = t[a];
613
- if (s !== "children" && s !== "key") {
614
- M(e), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), M(null);
615
- break;
616
- }
617
- }
618
- e.ref !== null && (M(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
619
- }
620
- }
621
- function Ue(e, t, a, s, p, v) {
622
- {
623
- var f = fr(e);
624
- if (!f) {
625
- var u = "";
626
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
627
- var O = Pr(p);
628
- O ? u += O : u += ze();
629
- var R;
630
- e === null ? R = "null" : fe(e) ? R = "array" : e !== void 0 && e.$$typeof === n ? (R = "<" + (N(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, u);
631
- }
632
- var E = Cr(e, t, a, p, v);
633
- if (E == null)
634
- return E;
635
- if (f) {
636
- var C = t.children;
637
- if (C !== void 0)
638
- if (s)
639
- if (fe(C)) {
640
- for (var V = 0; V < C.length; V++)
641
- Ye(C[V], e);
642
- Object.freeze && Object.freeze(C);
643
- } else
644
- T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
645
- else
646
- Ye(C, e);
647
- }
648
- return e === o ? $r(E) : Nr(E), E;
649
- }
650
- }
651
- function Dr(e, t, a) {
652
- return Ue(e, t, a, !0);
653
- }
654
- function Ir(e, t, a) {
655
- return Ue(e, t, a, !1);
656
- }
657
- var Fr = Ir, Lr = Dr;
658
- Z.Fragment = o, Z.jsx = Fr, Z.jsxs = Lr;
659
- }()), Z;
660
- }
661
- process.env.NODE_ENV === "production" ? ye.exports = Yr() : ye.exports = Ur();
662
- var h = ye.exports;
663
- function ir(r) {
664
- var n, i, o = "";
665
- if (typeof r == "string" || typeof r == "number")
666
- o += r;
667
- else if (typeof r == "object")
668
- if (Array.isArray(r))
669
- for (n = 0; n < r.length; n++)
670
- r[n] && (i = ir(r[n])) && (o && (o += " "), o += i);
671
- else
672
- for (n in r)
673
- r[n] && (o && (o += " "), o += n);
674
- return o;
675
- }
676
- function B() {
677
- for (var r, n, i = 0, o = ""; i < arguments.length; )
678
- (r = arguments[i++]) && (n = ir(r)) && (o && (o += " "), o += n);
679
- return o;
680
- }
681
- function Br(r) {
682
- var n = typeof r;
683
- return r != null && (n == "object" || n == "function");
684
- }
685
- var Se = Br, Gr = typeof ie == "object" && ie && ie.Object === Object && ie, Jr = Gr, Xr = Jr, Hr = typeof self == "object" && self && self.Object === Object && self, Kr = Xr || Hr || Function("return this")(), or = Kr, Zr = or, Qr = function() {
686
- return Zr.Date.now();
687
- }, et = Qr, rt = /\s/;
688
- function tt(r) {
689
- for (var n = r.length; n-- && rt.test(r.charAt(n)); )
690
- ;
691
- return n;
692
- }
693
- var nt = tt, at = nt, it = /^\s+/;
694
- function ot(r) {
695
- return r && r.slice(0, at(r) + 1).replace(it, "");
696
- }
697
- var st = ot, ct = or, lt = ct.Symbol, sr = lt, Xe = sr, cr = Object.prototype, ut = cr.hasOwnProperty, ft = cr.toString, Q = Xe ? Xe.toStringTag : void 0;
698
- function dt(r) {
699
- var n = ut.call(r, Q), i = r[Q];
700
- try {
701
- r[Q] = void 0;
702
- var o = !0;
703
- } catch {
704
- }
705
- var c = ft.call(r);
706
- return o && (n ? r[Q] = i : delete r[Q]), c;
707
- }
708
- var pt = dt, _t = Object.prototype, vt = _t.toString;
709
- function gt(r) {
710
- return vt.call(r);
711
- }
712
- var mt = gt, He = sr, yt = pt, bt = mt, ht = "[object Null]", Tt = "[object Undefined]", Ke = He ? He.toStringTag : void 0;
713
- function St(r) {
714
- return r == null ? r === void 0 ? Tt : ht : Ke && Ke in Object(r) ? yt(r) : bt(r);
715
- }
716
- var Rt = St;
717
- function Et(r) {
718
- return r != null && typeof r == "object";
719
- }
720
- var xt = Et, jt = Rt, Ot = xt, wt = "[object Symbol]";
721
- function Ct(r) {
722
- return typeof r == "symbol" || Ot(r) && jt(r) == wt;
723
- }
724
- var Pt = Ct, kt = st, Ze = Se, Nt = Pt, Qe = 0 / 0, $t = /^[-+]0x[0-9a-f]+$/i, Dt = /^0b[01]+$/i, It = /^0o[0-7]+$/i, Ft = parseInt;
725
- function Lt(r) {
726
- if (typeof r == "number")
727
- return r;
728
- if (Nt(r))
729
- return Qe;
730
- if (Ze(r)) {
731
- var n = typeof r.valueOf == "function" ? r.valueOf() : r;
732
- r = Ze(n) ? n + "" : n;
733
- }
734
- if (typeof r != "string")
735
- return r === 0 ? r : +r;
736
- r = kt(r);
737
- var i = Dt.test(r);
738
- return i || It.test(r) ? Ft(r.slice(2), i ? 2 : 8) : $t.test(r) ? Qe : +r;
739
- }
740
- var At = Lt, Wt = Se, ge = et, er = At, qt = "Expected a function", zt = Math.max, Mt = Math.min;
741
- function Vt(r, n, i) {
742
- var o, c, g, _, d, l, m = 0, y = !1, b = !1, x = !0;
743
- if (typeof r != "function")
744
- throw new TypeError(qt);
745
- n = er(n) || 0, Wt(i) && (y = !!i.leading, b = "maxWait" in i, g = b ? zt(er(i.maxWait) || 0, n) : g, x = "trailing" in i ? !!i.trailing : x);
746
- function w(S) {
747
- var P = o, F = c;
748
- return o = c = void 0, m = S, _ = r.apply(F, P), _;
749
- }
750
- function W(S) {
751
- return m = S, d = setTimeout(j, n), y ? w(S) : _;
752
- }
753
- function q(S) {
754
- var P = S - l, F = S - m, J = n - P;
755
- return b ? Mt(J, g - F) : J;
756
- }
757
- function z(S) {
758
- var P = S - l, F = S - m;
759
- return l === void 0 || P >= n || P < 0 || b && F >= g;
760
- }
761
- function j() {
762
- var S = ge();
763
- if (z(S))
764
- return T(S);
765
- d = setTimeout(j, q(S));
766
- }
767
- function T(S) {
768
- return d = void 0, x && o ? w(S) : (o = c = void 0, _);
769
- }
770
- function oe() {
771
- d !== void 0 && clearTimeout(d), m = 0, o = l = c = d = void 0;
772
- }
773
- function se() {
774
- return d === void 0 ? _ : T(ge());
775
- }
776
- function G() {
777
- var S = ge(), P = z(S);
778
- if (o = arguments, c = this, l = S, P) {
779
- if (d === void 0)
780
- return W(l);
781
- if (b)
782
- return clearTimeout(d), d = setTimeout(j, n), w(l);
783
- }
784
- return d === void 0 && (d = setTimeout(j, n)), _;
785
- }
786
- return G.cancel = oe, G.flush = se, G;
787
- }
788
- var Yt = Vt, Ut = Yt, Bt = Se, Gt = "Expected a function";
789
- function Jt(r, n, i) {
790
- var o = !0, c = !0;
791
- if (typeof r != "function")
792
- throw new TypeError(Gt);
793
- return Bt(i) && (o = "leading" in i ? !!i.leading : o, c = "trailing" in i ? !!i.trailing : c), Ut(r, n, {
794
- leading: o,
795
- maxWait: n,
796
- trailing: c
797
- });
798
- }
799
- var Xt = Jt;
800
- const Ht = /* @__PURE__ */ Vr(Xt), Kt = "_icon_awnbf_2", Zt = "_thin_awnbf_25", Qt = "_light_awnbf_29", en = "_regular_awnbf_33", rn = "_solid_awnbf_37", tn = "_duotone_awnbf_41", nn = "_sharpSolid_awnbf_52", an = "_sharpRegular_awnbf_56", on = "_sharpLight_awnbf_60", sn = "_brand_awnbf_64", rr = {
801
- icon: Kt,
802
- thin: Zt,
803
- light: Qt,
804
- regular: en,
805
- solid: rn,
806
- duotone: tn,
807
- sharpSolid: nn,
808
- sharpRegular: an,
809
- sharpLight: on,
810
- brand: sn
811
- };
812
- var lr = /* @__PURE__ */ ((r) => (r[r.mini = 12] = "mini", r[r.default = 18] = "default", r[r.large = 24] = "large", r))(lr || {});
813
- const Re = U((r, n) => {
814
- const { className: i, code: o, type: c = "light", size: g } = r, _ = g ? `${typeof g == "number" ? g : lr[g]}px` : void 0, d = B(
815
- rr.icon,
816
- c && rr[c],
817
- i
818
- );
819
- return /* @__PURE__ */ h.jsx("span", { className: d, ref: n, style: { "--iconSize": _ }, "data-content": Mr(o) });
820
- });
821
- Re.displayName = "Icon";
822
- const cn = "_progressBar_luf46_1", ln = "_progress_luf46_1", un = "_intermediate_luf46_31", fn = "_barberPole_luf46_1", me = {
823
- progressBar: cn,
824
- progress: ln,
825
- intermediate: un,
826
- barberPole: fn
827
- }, ur = U((r, n) => {
828
- const { className: i, progress: o = 100, intermediate: c = !1 } = r, g = c ? 150 : Math.min(Math.max(o, 0), 100), _ = B(
829
- me.progressBar,
830
- c && me.intermediate,
831
- i
832
- );
833
- return /* @__PURE__ */ h.jsx("div", { className: _, ref: n, children: /* @__PURE__ */ h.jsx("span", { className: me.progress, style: { width: `${g}%` } }) });
834
- });
835
- ur.displayName = "ProgressBar";
836
- const dn = "_button_6uqr8_1", pn = "_label_6uqr8_17", _n = "_icon_6uqr8_23", vn = "_underline_6uqr8_26", gn = "_primaryType_6uqr8_49", mn = "_primaryDangerType_6uqr8_49", yn = "_secondaryType_6uqr8_54", bn = "_secondaryDangerType_6uqr8_54", hn = "_linkType_6uqr8_59", Tn = "_linkDangerType_6uqr8_59", Sn = "_miniSize_6uqr8_88", Rn = "_iconOnly_6uqr8_99", En = "_defaultSize_6uqr8_106", xn = "_largeSize_6uqr8_124", jn = "_clicked_6uqr8_157", On = "_ripple_6uqr8_1", wn = "_loading_6uqr8_166", Cn = "_barberPole_6uqr8_1", Pn = "_spin_6uqr8_1", k = {
837
- button: dn,
838
- label: pn,
839
- icon: _n,
840
- underline: vn,
841
- primaryType: gn,
842
- primaryDangerType: mn,
843
- secondaryType: yn,
844
- secondaryDangerType: bn,
845
- linkType: hn,
846
- linkDangerType: Tn,
847
- miniSize: Sn,
848
- iconOnly: Rn,
849
- defaultSize: En,
850
- largeSize: xn,
851
- clicked: jn,
852
- ripple: On,
853
- loading: wn,
854
- barberPole: Cn,
855
- spin: Pn
856
- };
857
- var be = /* @__PURE__ */ ((r) => (r.primary = "primary", r.primaryDanger = "primaryDanger", r.secondary = "secondary", r.secondaryDanger = "secondaryDanger", r.link = "link", r.linkDanger = "linkDanger", r))(be || {});
858
- const tr = 100;
859
- let nr;
860
- const kn = U((r, n) => {
861
- const {
862
- className: i,
863
- label: o,
864
- type: c = "primary",
865
- size: g = "default",
866
- disabled: _ = !1,
867
- loading: d = !1,
868
- icon: l,
869
- iconType: m,
870
- iconPosition: y = "left",
871
- onClick: b
872
- } = r, x = Ar(null), w = Ht(() => {
873
- var j;
874
- clearTimeout(nr), (j = x.current) == null || j.classList.add(k.clicked), nr = window.setTimeout(() => {
875
- var T;
876
- (T = x.current) == null || T.classList.remove(k.clicked);
877
- }, 600 + tr);
878
- }, tr), W = (j) => {
879
- b == null || b(j), c.includes(be.link) || w();
880
- }, q = () => l ? /* @__PURE__ */ h.jsx(Re, { className: k.icon, code: l, type: m, size: g }) : null, z = B(
881
- k.button,
882
- k[`${c}Type`],
883
- k[`${g}Size`],
884
- !o && k.iconOnly,
885
- d && k.loading,
886
- i
887
- );
888
- return !o && !l ? null : /* @__PURE__ */ h.jsxs("button", { className: z, ref: qr([x, n]), onClick: W, disabled: _, children: [
889
- c.includes(be.link) && /* @__PURE__ */ h.jsx(ur, { className: k.underline, intermediate: d }),
890
- y === "left" && /* @__PURE__ */ h.jsx(q, {}),
891
- o && /* @__PURE__ */ h.jsx("span", { className: k.label, children: o }),
892
- y === "right" && /* @__PURE__ */ h.jsx(q, {})
893
- ] });
894
- });
895
- kn.displayName = "Button";
896
- const Nn = "_textfield_7y99a_1", $n = "_icon_7y99a_27", Dn = "_input_7y99a_36", In = "_placeholder_7y99a_49", Fn = "_withIcon_7y99a_73", Ln = "_textarea_7y99a_83", An = "_hasValue_7y99a_92", D = {
897
- textfield: Nn,
898
- icon: $n,
899
- input: Dn,
900
- placeholder: In,
901
- withIcon: Fn,
902
- textarea: Ln,
903
- hasValue: An
904
- }, Wn = U((r, n) => {
905
- const {
906
- className: i,
907
- type: o = "text",
908
- textarea: c,
909
- placeholder: g,
910
- autoComplete: _ = "off",
911
- autoFocus: d,
912
- icon: l,
913
- iconType: m = "regular",
914
- value: y,
915
- onChange: b
916
- } = r, x = Wr(() => {
917
- if (c === !0)
918
- return null;
919
- if (l)
920
- return l;
921
- if (o === "number")
922
- return "23";
923
- if (o === "search")
924
- return "f002";
925
- if (o === "password")
926
- return "f30d";
927
- }, [c, l, o]), w = B(
928
- D.textfield,
929
- x && D.withIcon,
930
- c && D.textarea,
931
- y && D.hasValue,
932
- i
933
- );
934
- return /* @__PURE__ */ h.jsxs("div", { className: w, ref: n, children: [
935
- !!x && !c && /* @__PURE__ */ h.jsx(Re, { className: D.icon, code: x, type: m }),
936
- c ? /* @__PURE__ */ h.jsx(
937
- "textarea",
938
- {
939
- className: D.input,
940
- autoFocus: d,
941
- autoComplete: _,
942
- value: y,
943
- onChange: b
944
- }
945
- ) : /* @__PURE__ */ h.jsx(
946
- "input",
947
- {
948
- className: D.input,
949
- type: o,
950
- autoFocus: d,
951
- autoComplete: _,
952
- value: y,
953
- onChange: b
954
- }
955
- ),
956
- /* @__PURE__ */ h.jsx("span", { className: D.placeholder, children: g })
957
- ] });
958
- });
959
- Wn.displayName = "Textfield";
960
- const qn = "_sider_9guyz_1", zn = "_leftSiderContainer_9guyz_13", Mn = "_rightSiderContainer_9guyz_20", Vn = "_content_9guyz_27", Yn = "_miniLeftSider_9guyz_37", Un = "_miniRightSider_9guyz_44", Bn = "_leftOpen_9guyz_51", Gn = "_rightOpen_9guyz_57", I = {
961
- sider: qn,
962
- leftSiderContainer: zn,
963
- rightSiderContainer: Mn,
964
- content: Vn,
965
- miniLeftSider: Yn,
966
- miniRightSider: Un,
967
- leftOpen: Bn,
968
- rightOpen: Gn
969
- }, Jn = U((r, n) => {
970
- const {
971
- className: i,
972
- children: o,
973
- leftSider: c,
974
- showMiniLeftSider: g = !0,
975
- rightSider: _,
976
- showMiniRightSider: d = !1,
977
- open: l = "closed"
978
- // setOpen,
979
- } = r, m = B(
980
- I.sider,
981
- l === "left" && I.leftOpen,
982
- g && I.miniLeftSider,
983
- l === "right" && I.rightOpen,
984
- d && I.miniRightSider,
985
- i
986
- );
987
- return /* @__PURE__ */ h.jsxs("section", { className: m, ref: n, role: "sider", children: [
988
- /* @__PURE__ */ h.jsx("div", { className: I.leftSiderContainer, children: c }),
989
- /* @__PURE__ */ h.jsx("div", { className: I.rightSiderContainer, children: _ }),
990
- /* @__PURE__ */ h.jsx("div", { className: I.content, children: o })
991
- ] });
992
- });
993
- Jn.displayName = "Sider";
994
- const Xn = "_navigation_zrgjp_1", Hn = "_brand_zrgjp_9", Kn = "_routeList_zrgjp_18", Zn = "_route_zrgjp_18", Qn = "_icon_zrgjp_59", ea = "_label_zrgjp_65", ra = "_active_zrgjp_77", A = {
995
- navigation: Xn,
996
- brand: Hn,
997
- routeList: Kn,
998
- route: Zn,
999
- icon: Qn,
1000
- label: ea,
1001
- active: ra
1002
- }, ta = U((r, n) => {
1003
- const { className: i, Routes: o } = r, c = B(
1004
- A.navigation,
1005
- i
1006
- );
1007
- return /* @__PURE__ */ h.jsxs("section", { className: c, ref: n, role: "navigation", children: [
1008
- /* @__PURE__ */ h.jsx("div", { className: A.brand, children: "🎲 XtremeUI" }),
1009
- /* @__PURE__ */ h.jsx("div", { className: A.routeList, children: !!o && /* @__PURE__ */ h.jsx(
1010
- o,
1011
- {
1012
- className: A.route,
1013
- activeClassName: A.active,
1014
- iconClassName: A.icon,
1015
- labelClassName: A.label
1016
- }
1017
- ) })
1018
- ] });
1019
- });
1020
- ta.displayName = "Navigation";
1021
- export {
1022
- kn as Button,
1023
- be as EButtonTypes,
1024
- lr as EIconSize,
1025
- Re as Icon,
1026
- ta as Navigation,
1027
- ur as ProgressBar,
1028
- Jn as Sider,
1029
- Wn as Textfield,
1030
- Y as dom,
1031
- la as elementObserver,
1032
- Te as getCssProperty,
1033
- aa as getCssPropertyPx,
1034
- ia as getCssPropertyVh,
1035
- oa as getCssPropertyVw,
1036
- he as isClient,
1037
- qr as mergeRefs,
1038
- zr as safeStringFromCodePoint,
1039
- sa as setCssProperty,
1040
- Mr as unicodeToString,
1041
- ca as waitForElement
1042
- };