@arkyn/components 1.3.85 → 1.3.86
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +433 -397
- package/dist/bundle.umd.cjs +11 -11
- package/dist/components/Radio/RadioGroup/index.js +1 -1
- package/dist/components/Switch/index.d.ts +5 -0
- package/dist/components/Switch/index.d.ts.map +1 -0
- package/dist/components/Switch/index.js +18 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Radio/RadioGroup/index.tsx +1 -1
- package/src/components/Switch/index.tsx +51 -0
- package/src/components/Switch/styles.css +90 -0
- package/src/index.ts +1 -0
package/dist/bundle.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import p, { createContext as Ce, useContext as ye, Children as tn, useRef as Se, useId as nn, useState as
|
1
|
+
import p, { createContext as Ce, useContext as ye, Children as tn, useRef as Se, useId as nn, useState as ae, useEffect as Ze, forwardRef as an } from "react";
|
2
2
|
import { Info as ot, AlertTriangle as rn, XCircle as St, CheckCircle2 as Tt, Loader2 as $e, Check as Rt, ChevronDown as sn, ChevronRight as it, ChevronLeft as on, Ellipsis as xt, X as $t, AlertCircle as ln } from "lucide-react";
|
3
3
|
import { useActionData as Pt, useLocation as It, Link as cn, useNavigate as un } from "@remix-run/react";
|
4
4
|
import { InputMask as dn } from "@react-input/mask";
|
@@ -15,15 +15,15 @@ var lt = { exports: {} }, Le = {};
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
16
16
|
*/
|
17
17
|
var wt;
|
18
|
-
function
|
18
|
+
function hn() {
|
19
19
|
if (wt) return Le;
|
20
20
|
wt = 1;
|
21
21
|
var e = p, t = Symbol.for("react.element"), a = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
22
|
-
function d(c, u,
|
23
|
-
var
|
24
|
-
|
25
|
-
for (
|
26
|
-
if (c && c.defaultProps) for (
|
22
|
+
function d(c, u, m) {
|
23
|
+
var h, v = {}, o = null, y = null;
|
24
|
+
m !== void 0 && (o = "" + m), u.key !== void 0 && (o = "" + u.key), u.ref !== void 0 && (y = u.ref);
|
25
|
+
for (h in u) s.call(u, h) && !l.hasOwnProperty(h) && (v[h] = u[h]);
|
26
|
+
if (c && c.defaultProps) for (h in u = c.defaultProps, u) v[h] === void 0 && (v[h] = u[h]);
|
27
27
|
return { $$typeof: t, type: c, key: o, ref: y, props: v, _owner: i.current };
|
28
28
|
}
|
29
29
|
return Le.Fragment = a, Le.jsx = d, Le.jsxs = d, Le;
|
@@ -39,26 +39,26 @@ var Ae = {};
|
|
39
39
|
* LICENSE file in the root directory of this source tree.
|
40
40
|
*/
|
41
41
|
var Ct;
|
42
|
-
function
|
42
|
+
function mn() {
|
43
43
|
return Ct || (Ct = 1, process.env.NODE_ENV !== "production" && function() {
|
44
|
-
var e = p, t = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"),
|
45
|
-
function
|
44
|
+
var e = p, t = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), o = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), k = Symbol.iterator, x = "@@iterator";
|
45
|
+
function w(n) {
|
46
46
|
if (n === null || typeof n != "object")
|
47
47
|
return null;
|
48
|
-
var f =
|
48
|
+
var f = k && n[k] || n[x];
|
49
49
|
return typeof f == "function" ? f : null;
|
50
50
|
}
|
51
51
|
var b = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
52
|
-
function
|
52
|
+
function C(n) {
|
53
53
|
{
|
54
|
-
for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0),
|
55
|
-
g[
|
54
|
+
for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), N = 1; N < f; N++)
|
55
|
+
g[N - 1] = arguments[N];
|
56
56
|
O("error", n, g);
|
57
57
|
}
|
58
58
|
}
|
59
59
|
function O(n, f, g) {
|
60
60
|
{
|
61
|
-
var
|
61
|
+
var N = b.ReactDebugCurrentFrame, z = N.getStackAddendum();
|
62
62
|
z !== "" && (f += "%s", g = g.concat([z]));
|
63
63
|
var Y = g.map(function(F) {
|
64
64
|
return String(F);
|
@@ -69,16 +69,16 @@ function hn() {
|
|
69
69
|
var _ = !1, R = !1, V = !1, D = !1, H = !1, W;
|
70
70
|
W = Symbol.for("react.module.reference");
|
71
71
|
function J(n) {
|
72
|
-
return !!(typeof n == "string" || typeof n == "function" || n === s || n === l || H || n === i || n ===
|
72
|
+
return !!(typeof n == "string" || typeof n == "function" || n === s || n === l || H || n === i || n === m || n === h || D || n === y || _ || R || V || typeof n == "object" && n !== null && (n.$$typeof === o || n.$$typeof === v || n.$$typeof === d || n.$$typeof === c || n.$$typeof === u || // This needs to include all possible module reference object
|
73
73
|
// types supported by any Flight configuration anywhere since
|
74
74
|
// we don't know which Flight build this will end up being used
|
75
75
|
// with.
|
76
76
|
n.$$typeof === W || n.getModuleId !== void 0));
|
77
77
|
}
|
78
78
|
function B(n, f, g) {
|
79
|
-
var
|
80
|
-
if (
|
81
|
-
return
|
79
|
+
var N = n.displayName;
|
80
|
+
if (N)
|
81
|
+
return N;
|
82
82
|
var z = f.displayName || f.name || "";
|
83
83
|
return z !== "" ? g + "(" + z + ")" : g;
|
84
84
|
}
|
@@ -88,7 +88,7 @@ function hn() {
|
|
88
88
|
function E(n) {
|
89
89
|
if (n == null)
|
90
90
|
return null;
|
91
|
-
if (typeof n.tag == "number" &&
|
91
|
+
if (typeof n.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
92
92
|
return n.displayName || n.name || null;
|
93
93
|
if (typeof n == "string")
|
94
94
|
return n;
|
@@ -101,9 +101,9 @@ function hn() {
|
|
101
101
|
return "Profiler";
|
102
102
|
case i:
|
103
103
|
return "StrictMode";
|
104
|
-
case h:
|
105
|
-
return "Suspense";
|
106
104
|
case m:
|
105
|
+
return "Suspense";
|
106
|
+
case h:
|
107
107
|
return "SuspenseList";
|
108
108
|
}
|
109
109
|
if (typeof n == "object")
|
@@ -117,8 +117,8 @@ function hn() {
|
|
117
117
|
case u:
|
118
118
|
return B(n, n.render, "ForwardRef");
|
119
119
|
case v:
|
120
|
-
var
|
121
|
-
return
|
120
|
+
var N = n.displayName || null;
|
121
|
+
return N !== null ? N : E(n.type) || "Memo";
|
122
122
|
case o: {
|
123
123
|
var z = n, Y = z._payload, F = z._init;
|
124
124
|
try {
|
@@ -189,37 +189,37 @@ function hn() {
|
|
189
189
|
})
|
190
190
|
});
|
191
191
|
}
|
192
|
-
M < 0 &&
|
192
|
+
M < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
193
193
|
}
|
194
194
|
}
|
195
195
|
var X = b.ReactCurrentDispatcher, xe;
|
196
|
-
function
|
196
|
+
function he(n, f, g) {
|
197
197
|
{
|
198
198
|
if (xe === void 0)
|
199
199
|
try {
|
200
200
|
throw Error();
|
201
201
|
} catch (z) {
|
202
|
-
var
|
203
|
-
xe =
|
202
|
+
var N = z.stack.trim().match(/\n( *(at )?)/);
|
203
|
+
xe = N && N[1] || "";
|
204
204
|
}
|
205
205
|
return `
|
206
206
|
` + xe + n;
|
207
207
|
}
|
208
208
|
}
|
209
|
-
var G = !1,
|
209
|
+
var G = !1, re;
|
210
210
|
{
|
211
211
|
var ke = typeof WeakMap == "function" ? WeakMap : Map;
|
212
|
-
|
212
|
+
re = new ke();
|
213
213
|
}
|
214
214
|
function Pe(n, f) {
|
215
215
|
if (!n || G)
|
216
216
|
return "";
|
217
217
|
{
|
218
|
-
var g =
|
218
|
+
var g = re.get(n);
|
219
219
|
if (g !== void 0)
|
220
220
|
return g;
|
221
221
|
}
|
222
|
-
var
|
222
|
+
var N;
|
223
223
|
G = !0;
|
224
224
|
var z = Error.prepareStackTrace;
|
225
225
|
Error.prepareStackTrace = void 0;
|
@@ -238,14 +238,14 @@ function hn() {
|
|
238
238
|
try {
|
239
239
|
Reflect.construct(F, []);
|
240
240
|
} catch (de) {
|
241
|
-
|
241
|
+
N = de;
|
242
242
|
}
|
243
243
|
Reflect.construct(n, [], F);
|
244
244
|
} else {
|
245
245
|
try {
|
246
246
|
F.call();
|
247
247
|
} catch (de) {
|
248
|
-
|
248
|
+
N = de;
|
249
249
|
}
|
250
250
|
n.call(F.prototype);
|
251
251
|
}
|
@@ -253,14 +253,14 @@ function hn() {
|
|
253
253
|
try {
|
254
254
|
throw Error();
|
255
255
|
} catch (de) {
|
256
|
-
|
256
|
+
N = de;
|
257
257
|
}
|
258
258
|
n();
|
259
259
|
}
|
260
260
|
} catch (de) {
|
261
|
-
if (de &&
|
261
|
+
if (de && N && typeof de.stack == "string") {
|
262
262
|
for (var P = de.stack.split(`
|
263
|
-
`), ce =
|
263
|
+
`), ce = N.stack.split(`
|
264
264
|
`), ee = P.length - 1, ne = ce.length - 1; ee >= 1 && ne >= 0 && P[ee] !== ce[ne]; )
|
265
265
|
ne--;
|
266
266
|
for (; ee >= 1 && ne >= 0; ee--, ne--)
|
@@ -270,7 +270,7 @@ function hn() {
|
|
270
270
|
if (ee--, ne--, ne < 0 || P[ee] !== ce[ne]) {
|
271
271
|
var ge = `
|
272
272
|
` + P[ee].replace(" at new ", " at ");
|
273
|
-
return n.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", n.displayName)), typeof n == "function" &&
|
273
|
+
return n.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", n.displayName)), typeof n == "function" && re.set(n, ge), ge;
|
274
274
|
}
|
275
275
|
while (ee >= 1 && ne >= 0);
|
276
276
|
break;
|
@@ -279,8 +279,8 @@ function hn() {
|
|
279
279
|
} finally {
|
280
280
|
G = !1, X.current = Y, le(), Error.prepareStackTrace = z;
|
281
281
|
}
|
282
|
-
var Fe = n ? n.displayName || n.name : "", Re = Fe ?
|
283
|
-
return typeof n == "function" &&
|
282
|
+
var Fe = n ? n.displayName || n.name : "", Re = Fe ? he(Fe) : "";
|
283
|
+
return typeof n == "function" && re.set(n, Re), Re;
|
284
284
|
}
|
285
285
|
function et(n, f, g) {
|
286
286
|
return Pe(n, !1);
|
@@ -295,12 +295,12 @@ function hn() {
|
|
295
295
|
if (typeof n == "function")
|
296
296
|
return Pe(n, We(n));
|
297
297
|
if (typeof n == "string")
|
298
|
-
return
|
298
|
+
return he(n);
|
299
299
|
switch (n) {
|
300
|
-
case h:
|
301
|
-
return me("Suspense");
|
302
300
|
case m:
|
303
|
-
return
|
301
|
+
return he("Suspense");
|
302
|
+
case h:
|
303
|
+
return he("SuspenseList");
|
304
304
|
}
|
305
305
|
if (typeof n == "object")
|
306
306
|
switch (n.$$typeof) {
|
@@ -309,7 +309,7 @@ function hn() {
|
|
309
309
|
case v:
|
310
310
|
return Te(n.type, f, g);
|
311
311
|
case o: {
|
312
|
-
var
|
312
|
+
var N = n, z = N._payload, Y = N._init;
|
313
313
|
try {
|
314
314
|
return Te(Y(z), f, g);
|
315
315
|
} catch {
|
@@ -318,30 +318,30 @@ function hn() {
|
|
318
318
|
}
|
319
319
|
return "";
|
320
320
|
}
|
321
|
-
var
|
322
|
-
function
|
321
|
+
var me = Object.prototype.hasOwnProperty, Ye = {}, He = b.ReactDebugCurrentFrame;
|
322
|
+
function se(n) {
|
323
323
|
if (n) {
|
324
324
|
var f = n._owner, g = Te(n.type, n._source, f ? f.type : null);
|
325
325
|
He.setExtraStackFrame(g);
|
326
326
|
} else
|
327
327
|
He.setExtraStackFrame(null);
|
328
328
|
}
|
329
|
-
function Ne(n, f, g,
|
329
|
+
function Ne(n, f, g, N, z) {
|
330
330
|
{
|
331
|
-
var Y = Function.call.bind(
|
331
|
+
var Y = Function.call.bind(me);
|
332
332
|
for (var F in n)
|
333
333
|
if (Y(n, F)) {
|
334
334
|
var P = void 0;
|
335
335
|
try {
|
336
336
|
if (typeof n[F] != "function") {
|
337
|
-
var ce = Error((
|
337
|
+
var ce = Error((N || "React class") + ": " + g + " type `" + F + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[F] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
338
338
|
throw ce.name = "Invariant Violation", ce;
|
339
339
|
}
|
340
|
-
P = n[F](f, F,
|
340
|
+
P = n[F](f, F, N, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
341
341
|
} catch (ee) {
|
342
342
|
P = ee;
|
343
343
|
}
|
344
|
-
P && !(P instanceof Error) && (
|
344
|
+
P && !(P instanceof Error) && (se(z), C("%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).", N || "React class", g, F, typeof P), se(null)), P instanceof Error && !(P.message in Ye) && (Ye[P.message] = !0, se(z), C("Failed %s type: %s", g, P.message), se(null));
|
345
345
|
}
|
346
346
|
}
|
347
347
|
}
|
@@ -367,7 +367,7 @@ function hn() {
|
|
367
367
|
}
|
368
368
|
function _e(n) {
|
369
369
|
if (nt(n))
|
370
|
-
return
|
370
|
+
return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ie(n)), Be(n);
|
371
371
|
}
|
372
372
|
var pe = b.ReactCurrentOwner, Ue = {
|
373
373
|
key: !0,
|
@@ -377,7 +377,7 @@ function hn() {
|
|
377
377
|
}, we, ze, De;
|
378
378
|
De = {};
|
379
379
|
function Ke(n) {
|
380
|
-
if (
|
380
|
+
if (me.call(n, "ref")) {
|
381
381
|
var f = Object.getOwnPropertyDescriptor(n, "ref").get;
|
382
382
|
if (f && f.isReactWarning)
|
383
383
|
return !1;
|
@@ -385,7 +385,7 @@ function hn() {
|
|
385
385
|
return n.ref !== void 0;
|
386
386
|
}
|
387
387
|
function Xe(n) {
|
388
|
-
if (
|
388
|
+
if (me.call(n, "key")) {
|
389
389
|
var f = Object.getOwnPropertyDescriptor(n, "key").get;
|
390
390
|
if (f && f.isReactWarning)
|
391
391
|
return !1;
|
@@ -395,13 +395,13 @@ function hn() {
|
|
395
395
|
function at(n, f) {
|
396
396
|
if (typeof n.ref == "string" && pe.current && f && pe.current.stateNode !== f) {
|
397
397
|
var g = E(pe.current.type);
|
398
|
-
De[g] || (
|
398
|
+
De[g] || (C('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', E(pe.current.type), n.ref), De[g] = !0);
|
399
399
|
}
|
400
400
|
}
|
401
401
|
function Me(n, f) {
|
402
402
|
{
|
403
403
|
var g = function() {
|
404
|
-
we || (we = !0,
|
404
|
+
we || (we = !0, C("%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)", f));
|
405
405
|
};
|
406
406
|
g.isReactWarning = !0, Object.defineProperty(n, "key", {
|
407
407
|
get: g,
|
@@ -412,7 +412,7 @@ function hn() {
|
|
412
412
|
function be(n, f) {
|
413
413
|
{
|
414
414
|
var g = function() {
|
415
|
-
ze || (ze = !0,
|
415
|
+
ze || (ze = !0, C("%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)", f));
|
416
416
|
};
|
417
417
|
g.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
418
418
|
get: g,
|
@@ -420,7 +420,7 @@ function hn() {
|
|
420
420
|
});
|
421
421
|
}
|
422
422
|
}
|
423
|
-
var rt = function(n, f, g,
|
423
|
+
var rt = function(n, f, g, N, z, Y, F) {
|
424
424
|
var P = {
|
425
425
|
// This tag allows us to uniquely identify this as a React Element
|
426
426
|
$$typeof: t,
|
@@ -441,7 +441,7 @@ function hn() {
|
|
441
441
|
configurable: !1,
|
442
442
|
enumerable: !1,
|
443
443
|
writable: !1,
|
444
|
-
value:
|
444
|
+
value: N
|
445
445
|
}), Object.defineProperty(P, "_source", {
|
446
446
|
configurable: !1,
|
447
447
|
enumerable: !1,
|
@@ -449,12 +449,12 @@ function hn() {
|
|
449
449
|
value: z
|
450
450
|
}), Object.freeze && (Object.freeze(P.props), Object.freeze(P)), P;
|
451
451
|
};
|
452
|
-
function S(n, f, g,
|
452
|
+
function S(n, f, g, N, z) {
|
453
453
|
{
|
454
454
|
var Y, F = {}, P = null, ce = null;
|
455
455
|
g !== void 0 && (_e(g), P = "" + g), Xe(f) && (_e(f.key), P = "" + f.key), Ke(f) && (ce = f.ref, at(f, z));
|
456
456
|
for (Y in f)
|
457
|
-
|
457
|
+
me.call(f, Y) && !Ue.hasOwnProperty(Y) && (F[Y] = f[Y]);
|
458
458
|
if (n && n.defaultProps) {
|
459
459
|
var ee = n.defaultProps;
|
460
460
|
for (Y in ee)
|
@@ -464,11 +464,11 @@ function hn() {
|
|
464
464
|
var ne = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
465
465
|
P && Me(F, ne), ce && be(F, ne);
|
466
466
|
}
|
467
|
-
return rt(n, P, ce, z,
|
467
|
+
return rt(n, P, ce, z, N, pe.current, F);
|
468
468
|
}
|
469
469
|
}
|
470
470
|
var L = b.ReactCurrentOwner, A = b.ReactDebugCurrentFrame;
|
471
|
-
function
|
471
|
+
function oe(n) {
|
472
472
|
if (n) {
|
473
473
|
var f = n._owner, g = Te(n.type, n._source, f ? f.type : null);
|
474
474
|
A.setExtraStackFrame(g);
|
@@ -525,8 +525,8 @@ Check the top-level render call using <` + g + ">.");
|
|
525
525
|
if (pt[g])
|
526
526
|
return;
|
527
527
|
pt[g] = !0;
|
528
|
-
var
|
529
|
-
n && n._owner && n._owner !== L.current && (
|
528
|
+
var N = "";
|
529
|
+
n && n._owner && n._owner !== L.current && (N = " It was passed a child from " + E(n._owner.type) + "."), oe(n), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, N), oe(null);
|
530
530
|
}
|
531
531
|
}
|
532
532
|
function vt(n, f) {
|
@@ -535,13 +535,13 @@ Check the top-level render call using <` + g + ">.");
|
|
535
535
|
return;
|
536
536
|
if (Oe(n))
|
537
537
|
for (var g = 0; g < n.length; g++) {
|
538
|
-
var
|
539
|
-
je(
|
538
|
+
var N = n[g];
|
539
|
+
je(N) && gt(N, f);
|
540
540
|
}
|
541
541
|
else if (je(n))
|
542
542
|
n._store && (n._store.validated = !0);
|
543
543
|
else if (n) {
|
544
|
-
var z =
|
544
|
+
var z = w(n);
|
545
545
|
if (typeof z == "function" && z !== n.entries)
|
546
546
|
for (var Y = z.call(n), F; !(F = Y.next()).done; )
|
547
547
|
je(F.value) && gt(F.value, f);
|
@@ -563,30 +563,30 @@ Check the top-level render call using <` + g + ">.");
|
|
563
563
|
else
|
564
564
|
return;
|
565
565
|
if (g) {
|
566
|
-
var
|
567
|
-
Ne(g, n.props, "prop",
|
566
|
+
var N = E(f);
|
567
|
+
Ne(g, n.props, "prop", N, n);
|
568
568
|
} else if (f.PropTypes !== void 0 && !ue) {
|
569
569
|
ue = !0;
|
570
570
|
var z = E(f);
|
571
|
-
|
571
|
+
C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", z || "Unknown");
|
572
572
|
}
|
573
|
-
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved &&
|
573
|
+
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
574
574
|
}
|
575
575
|
}
|
576
576
|
function Xt(n) {
|
577
577
|
{
|
578
578
|
for (var f = Object.keys(n.props), g = 0; g < f.length; g++) {
|
579
|
-
var
|
580
|
-
if (
|
581
|
-
|
579
|
+
var N = f[g];
|
580
|
+
if (N !== "children" && N !== "key") {
|
581
|
+
oe(n), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), oe(null);
|
582
582
|
break;
|
583
583
|
}
|
584
584
|
}
|
585
|
-
n.ref !== null && (
|
585
|
+
n.ref !== null && (oe(n), C("Invalid attribute `ref` supplied to `React.Fragment`."), oe(null));
|
586
586
|
}
|
587
587
|
}
|
588
588
|
var bt = {};
|
589
|
-
function yt(n, f, g,
|
589
|
+
function yt(n, f, g, N, z, Y) {
|
590
590
|
{
|
591
591
|
var F = J(n);
|
592
592
|
if (!F) {
|
@@ -595,7 +595,7 @@ Check the top-level render call using <` + g + ">.");
|
|
595
595
|
var ce = Ht(z);
|
596
596
|
ce ? P += ce : P += Ge();
|
597
597
|
var ee;
|
598
|
-
n === null ? ee = "null" : Oe(n) ? ee = "array" : n !== void 0 && n.$$typeof === t ? (ee = "<" + (E(n.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : ee = typeof n,
|
598
|
+
n === null ? ee = "null" : Oe(n) ? ee = "array" : n !== void 0 && n.$$typeof === t ? (ee = "<" + (E(n.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : ee = typeof n, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ee, P);
|
599
599
|
}
|
600
600
|
var ne = S(n, f, g, z, Y);
|
601
601
|
if (ne == null)
|
@@ -603,23 +603,23 @@ Check the top-level render call using <` + g + ">.");
|
|
603
603
|
if (F) {
|
604
604
|
var ge = f.children;
|
605
605
|
if (ge !== void 0)
|
606
|
-
if (
|
606
|
+
if (N)
|
607
607
|
if (Oe(ge)) {
|
608
608
|
for (var Fe = 0; Fe < ge.length; Fe++)
|
609
609
|
vt(ge[Fe], n);
|
610
610
|
Object.freeze && Object.freeze(ge);
|
611
611
|
} else
|
612
|
-
|
612
|
+
C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
613
613
|
else
|
614
614
|
vt(ge, n);
|
615
615
|
}
|
616
|
-
if (
|
616
|
+
if (me.call(f, "key")) {
|
617
617
|
var Re = E(n), de = Object.keys(f).filter(function(en) {
|
618
618
|
return en !== "key";
|
619
619
|
}), st = de.length > 0 ? "{key: someKey, " + de.join(": ..., ") + ": ...}" : "{key: someKey}";
|
620
620
|
if (!bt[Re + st]) {
|
621
621
|
var Qt = de.length > 0 ? "{" + de.join(": ..., ") + ": ...}" : "{}";
|
622
|
-
|
622
|
+
C(`A props object containing a "key" prop is being spread into JSX:
|
623
623
|
let props = %s;
|
624
624
|
<%s {...props} />
|
625
625
|
React keys must be passed directly to JSX without using spread:
|
@@ -640,7 +640,7 @@ React keys must be passed directly to JSX without using spread:
|
|
640
640
|
Ae.Fragment = s, Ae.jsx = qt, Ae.jsxs = Zt;
|
641
641
|
}()), Ae;
|
642
642
|
}
|
643
|
-
process.env.NODE_ENV === "production" ? lt.exports =
|
643
|
+
process.env.NODE_ENV === "production" ? lt.exports = hn() : lt.exports = mn();
|
644
644
|
var r = lt.exports;
|
645
645
|
function pn(e) {
|
646
646
|
const { className: t, ...a } = e, s = `arkynAlertTitle ${t}`;
|
@@ -650,13 +650,13 @@ const Ft = Ce({});
|
|
650
650
|
function gn() {
|
651
651
|
return ye(Ft);
|
652
652
|
}
|
653
|
-
function
|
654
|
-
const { schema: t, children: a, className: s, ...i } = e, c = !((
|
655
|
-
let
|
653
|
+
function ma(e) {
|
654
|
+
const { schema: t, children: a, className: s, ...i } = e, c = !((m) => {
|
655
|
+
let h = !1;
|
656
656
|
const v = (o) => {
|
657
|
-
Array.isArray(o) ? o.forEach(v) : o && typeof o == "object" && "type" in o && (o.type === pn ?
|
657
|
+
Array.isArray(o) ? o.forEach(v) : o && typeof o == "object" && "type" in o && (o.type === pn ? h = !0 : o.props && o.props.children && v(o.props.children));
|
658
658
|
};
|
659
|
-
return v(
|
659
|
+
return v(m), h;
|
660
660
|
})(a) ? "nonExistsAlertTitle" : "existsAlertTitle", u = `arkynAlertContainer ${t} ${c} ${s}`;
|
661
661
|
return /* @__PURE__ */ r.jsx(Ft.Provider, { value: e, children: /* @__PURE__ */ r.jsx("div", { className: u.trim(), ...i, children: a }) });
|
662
662
|
}
|
@@ -709,11 +709,11 @@ function ba(e) {
|
|
709
709
|
className: d = "",
|
710
710
|
children: c,
|
711
711
|
...u
|
712
|
-
} = e,
|
712
|
+
} = e, h = { md: 12, lg: 14 }[s], v = `arkynBadge ${t} ${a} ${s} ${d}`;
|
713
713
|
return /* @__PURE__ */ r.jsxs("div", { className: v.trim(), ...u, children: [
|
714
|
-
Qe(
|
714
|
+
Qe(h, i),
|
715
715
|
c,
|
716
|
-
Qe(
|
716
|
+
Qe(h, i)
|
717
717
|
] });
|
718
718
|
}
|
719
719
|
function ya(e) {
|
@@ -773,27 +773,27 @@ function Sa(e) {
|
|
773
773
|
leftIcon: d,
|
774
774
|
rightIcon: c,
|
775
775
|
disabled: u,
|
776
|
-
className:
|
777
|
-
children:
|
776
|
+
className: m = "",
|
777
|
+
children: h,
|
778
778
|
...v
|
779
|
-
} = e, y = { xs: 12, sm: 16, md: 20, lg: 24 }[l],
|
780
|
-
return /* @__PURE__ */ r.jsxs("button", { className:
|
779
|
+
} = e, y = { xs: 12, sm: 16, md: 20, lg: 24 }[l], w = `arkynButton ${t ? "loadingTrue" : "loadingFalse"} ${s} ${a} ${l} ${i ? "loadingTextTrue" : "loadingTextFalse"} ${m}`;
|
780
|
+
return /* @__PURE__ */ r.jsxs("button", { className: w, disabled: u || t, ...v, children: [
|
781
781
|
/* @__PURE__ */ r.jsxs("div", { className: "arkynButtonSpinner", children: [
|
782
782
|
/* @__PURE__ */ r.jsx($e, { size: y, strokeWidth: 2.5 }),
|
783
783
|
i && i
|
784
784
|
] }),
|
785
785
|
/* @__PURE__ */ r.jsxs("div", { className: "arkynButtonContent", children: [
|
786
786
|
Qe(y, d),
|
787
|
-
|
787
|
+
h,
|
788
788
|
Qe(y, c)
|
789
789
|
] })
|
790
790
|
] });
|
791
791
|
}
|
792
792
|
const Bt = Ce({});
|
793
793
|
function Ta(e) {
|
794
|
-
var
|
795
|
-
const t = Pt(), { children: a, className: s, ...i } = e, l = Se(null), d = ((
|
796
|
-
return /* @__PURE__ */ r.jsx(Bt.Provider, { value: { error: c, id: u, inputRef: l }, children: /* @__PURE__ */ r.jsx("section", { className:
|
794
|
+
var h, v;
|
795
|
+
const t = Pt(), { children: a, className: s, ...i } = e, l = Se(null), d = ((h = l.current) == null ? void 0 : h.name) || "", c = ((v = t == null ? void 0 : t.fieldErrors) == null ? void 0 : v[d]) || null, u = nn(), m = `arkynFormController ${s}`;
|
796
|
+
return /* @__PURE__ */ r.jsx(Bt.Provider, { value: { error: c, id: u, inputRef: l }, children: /* @__PURE__ */ r.jsx("section", { className: m.trim(), ...i, children: a }) });
|
797
797
|
}
|
798
798
|
function ve() {
|
799
799
|
return ye(Bt);
|
@@ -808,20 +808,20 @@ function Ra(e) {
|
|
808
808
|
checked: d = null,
|
809
809
|
onCheck: c,
|
810
810
|
value: u,
|
811
|
-
...
|
812
|
-
} = e, { id:
|
811
|
+
...m
|
812
|
+
} = e, { id: h, inputRef: v, error: o } = ve(), y = i || !!o, [k, x] = ae(l || !1), w = typeof d == "boolean" ? d : k, O = `arkynCheckbox ${s} ${y ? "errorTrue" : "errorFalse"} ${w ? "checkedTrue" : "checkedFalse"} ${a}`;
|
813
813
|
function _() {
|
814
|
-
const R =
|
815
|
-
|
814
|
+
const R = k;
|
815
|
+
x(!R), c && c(R ? "" : u || "checked");
|
816
816
|
}
|
817
817
|
return /* @__PURE__ */ r.jsxs(
|
818
818
|
"button",
|
819
819
|
{
|
820
|
-
id:
|
820
|
+
id: h,
|
821
821
|
type: "button",
|
822
822
|
className: O,
|
823
823
|
onClick: _,
|
824
|
-
...
|
824
|
+
...m,
|
825
825
|
children: [
|
826
826
|
/* @__PURE__ */ r.jsx(
|
827
827
|
"input",
|
@@ -829,7 +829,7 @@ function Ra(e) {
|
|
829
829
|
type: "hidden",
|
830
830
|
name: t,
|
831
831
|
ref: v,
|
832
|
-
value:
|
832
|
+
value: w ? u || "checked" : ""
|
833
833
|
}
|
834
834
|
),
|
835
835
|
/* @__PURE__ */ r.jsx(Rt, {})
|
@@ -859,7 +859,7 @@ function Ia(e) {
|
|
859
859
|
disabled: d,
|
860
860
|
className: c = "",
|
861
861
|
...u
|
862
|
-
} = e,
|
862
|
+
} = e, m = { xs: 12, sm: 16, md: 20, lg: 24 }, v = `arkynIconButton ${s} ${a} ${i} ${t ? "loadingTrue" : "loadingFalse"} ${c}`;
|
863
863
|
return /* @__PURE__ */ r.jsxs(
|
864
864
|
"button",
|
865
865
|
{
|
@@ -867,8 +867,8 @@ function Ia(e) {
|
|
867
867
|
className: v.trim(),
|
868
868
|
...u,
|
869
869
|
children: [
|
870
|
-
/* @__PURE__ */ r.jsx("div", { className: "arkynIconButtonSpinner", children: /* @__PURE__ */ r.jsx($e, { size:
|
871
|
-
/* @__PURE__ */ r.jsx("div", { className: "arkynIconButtonContent", children: /* @__PURE__ */ r.jsx(l, { size:
|
870
|
+
/* @__PURE__ */ r.jsx("div", { className: "arkynIconButtonSpinner", children: /* @__PURE__ */ r.jsx($e, { size: m[i], strokeWidth: 2.5 }) }),
|
871
|
+
/* @__PURE__ */ r.jsx("div", { className: "arkynIconButtonContent", children: /* @__PURE__ */ r.jsx(l, { size: m[i], strokeWidth: 2.5 }) })
|
872
872
|
]
|
873
873
|
}
|
874
874
|
);
|
@@ -891,10 +891,10 @@ function zt(e, t) {
|
|
891
891
|
function Dt(e) {
|
892
892
|
return e.length > 11 ? "CNPJ" : "CPF";
|
893
893
|
}
|
894
|
-
const
|
894
|
+
const ht = {
|
895
895
|
CPF: "999.999.999-999",
|
896
896
|
CNPJ: "99.999.999/9999-99"
|
897
|
-
}, Mt = ft(
|
897
|
+
}, Mt = ft(ht.CNPJ).length;
|
898
898
|
function xn(e, t) {
|
899
899
|
const {
|
900
900
|
isLoading: a,
|
@@ -904,40 +904,40 @@ function xn(e, t) {
|
|
904
904
|
variant: d = "solid",
|
905
905
|
prefix: c,
|
906
906
|
sufix: u,
|
907
|
-
leftIcon:
|
908
|
-
rightIcon:
|
907
|
+
leftIcon: m,
|
908
|
+
rightIcon: h,
|
909
909
|
disabled: v,
|
910
910
|
defaultValue: o,
|
911
911
|
readOnly: y,
|
912
|
-
onFocus:
|
913
|
-
onBlur:
|
914
|
-
title:
|
912
|
+
onFocus: k,
|
913
|
+
onBlur: x,
|
914
|
+
title: w,
|
915
915
|
style: b,
|
916
|
-
onChange:
|
916
|
+
onChange: C,
|
917
917
|
...O
|
918
918
|
} = e;
|
919
919
|
function _(U) {
|
920
920
|
let M = ft(U);
|
921
921
|
const K = Dt(M);
|
922
922
|
if (!(M.length > Mt))
|
923
|
-
return M = zt(M,
|
923
|
+
return M = zt(M, ht[K]), M;
|
924
924
|
}
|
925
|
-
const R =
|
925
|
+
const R = h ? "right" : "left", B = `arkyn_input ${c ? "hasPrefix" : ""} ${u ? "hasSufix" : ""} ${d} ${i} ${v || y || a ? "opacity" : ""} ${s ? "errored" : ""} ${t ? "focused" : ""} ${l}`, E = { md: 20, lg: 20 }[i];
|
926
926
|
return {
|
927
927
|
isLoading: a,
|
928
928
|
className: B,
|
929
929
|
prefix: Ee(c, E, "prefix"),
|
930
930
|
sufix: Ee(u, E, "sufix"),
|
931
|
-
LeftIcon:
|
932
|
-
RightIcon:
|
931
|
+
LeftIcon: m,
|
932
|
+
RightIcon: h,
|
933
933
|
defaultValue: _(o || ""),
|
934
934
|
disabled: v,
|
935
935
|
readOnly: y,
|
936
|
-
onFocus:
|
937
|
-
onBlur:
|
938
|
-
title:
|
936
|
+
onFocus: k,
|
937
|
+
onBlur: x,
|
938
|
+
title: w,
|
939
939
|
style: b,
|
940
|
-
onChange:
|
940
|
+
onChange: C,
|
941
941
|
loadingPosition: R,
|
942
942
|
iconSize: E,
|
943
943
|
Spinner: /* @__PURE__ */ r.jsx($e, { className: "spinner", size: E, strokeWidth: 2.5 }),
|
@@ -945,17 +945,17 @@ function xn(e, t) {
|
|
945
945
|
};
|
946
946
|
}
|
947
947
|
function wn(e) {
|
948
|
-
const [t, a] =
|
949
|
-
disabled:
|
950
|
-
title:
|
948
|
+
const [t, a] = ae(!1), s = Se(null), { inputRef: i, id: l, error: d } = ve(), c = i || s, u = e.isError || !!d, {
|
949
|
+
disabled: m,
|
950
|
+
title: h,
|
951
951
|
style: v,
|
952
952
|
className: o,
|
953
953
|
prefix: y,
|
954
|
-
sufix:
|
955
|
-
iconSize:
|
956
|
-
loadingPosition:
|
954
|
+
sufix: k,
|
955
|
+
iconSize: x,
|
956
|
+
loadingPosition: w,
|
957
957
|
isLoading: b,
|
958
|
-
LeftIcon:
|
958
|
+
LeftIcon: C,
|
959
959
|
readOnly: O,
|
960
960
|
onFocus: _,
|
961
961
|
onBlur: R,
|
@@ -965,14 +965,14 @@ function wn(e) {
|
|
965
965
|
value: W,
|
966
966
|
defaultValue: J,
|
967
967
|
...B
|
968
|
-
} = xn({ ...e, id: l, isError: u }, t), [te, E] =
|
968
|
+
} = xn({ ...e, id: l, isError: u }, t), [te, E] = ae(J), U = C && !b, M = V && !b, K = w === "left" && b, Q = w === "right" && b;
|
969
969
|
function $() {
|
970
|
-
|
970
|
+
m || !(c != null && c.current) || (a(!0), c.current.focus());
|
971
971
|
}
|
972
972
|
function q(T) {
|
973
973
|
let j = ft(T.target.value);
|
974
974
|
const Z = Dt(j);
|
975
|
-
j.length > Mt || (j = zt(j,
|
975
|
+
j.length > Mt || (j = zt(j, ht[Z]), T.target.value = j, E(j), H && H(T));
|
976
976
|
}
|
977
977
|
function ie(T) {
|
978
978
|
a(!0), _ && _(T);
|
@@ -983,18 +983,18 @@ function wn(e) {
|
|
983
983
|
return /* @__PURE__ */ r.jsxs(
|
984
984
|
"section",
|
985
985
|
{
|
986
|
-
title:
|
986
|
+
title: h,
|
987
987
|
style: v,
|
988
988
|
onClick: $,
|
989
989
|
className: o,
|
990
990
|
children: [
|
991
991
|
y,
|
992
992
|
K && D,
|
993
|
-
U && /* @__PURE__ */ r.jsx(
|
993
|
+
U && /* @__PURE__ */ r.jsx(C, { size: x, strokeWidth: 2.5 }),
|
994
994
|
/* @__PURE__ */ r.jsx(
|
995
995
|
"input",
|
996
996
|
{
|
997
|
-
disabled:
|
997
|
+
disabled: m || b,
|
998
998
|
readOnly: O,
|
999
999
|
ref: c,
|
1000
1000
|
value: W || te,
|
@@ -1004,9 +1004,9 @@ function wn(e) {
|
|
1004
1004
|
...B
|
1005
1005
|
}
|
1006
1006
|
),
|
1007
|
-
M && /* @__PURE__ */ r.jsx(V, { size:
|
1007
|
+
M && /* @__PURE__ */ r.jsx(V, { size: x, strokeWidth: 2.5 }),
|
1008
1008
|
Q && D,
|
1009
|
-
|
1009
|
+
k
|
1010
1010
|
]
|
1011
1011
|
}
|
1012
1012
|
);
|
@@ -1034,35 +1034,35 @@ function Nn(e, t) {
|
|
1034
1034
|
variant: d = "solid",
|
1035
1035
|
prefix: c,
|
1036
1036
|
sufix: u,
|
1037
|
-
leftIcon:
|
1038
|
-
rightIcon:
|
1037
|
+
leftIcon: m,
|
1038
|
+
rightIcon: h,
|
1039
1039
|
disabled: v,
|
1040
1040
|
readOnly: o,
|
1041
1041
|
onFocus: y,
|
1042
|
-
onBlur:
|
1043
|
-
title:
|
1044
|
-
style:
|
1042
|
+
onBlur: k,
|
1043
|
+
title: x,
|
1044
|
+
style: w,
|
1045
1045
|
// showCents = false,
|
1046
1046
|
max: b = 1e9,
|
1047
|
-
locale:
|
1047
|
+
locale: C = "pt-BR",
|
1048
1048
|
currency: O = "BRL",
|
1049
1049
|
..._
|
1050
|
-
} = e, R =
|
1050
|
+
} = e, R = h ? "right" : "left", B = `arkyn_input ${c ? "hasPrefix" : ""} ${u ? "hasSufix" : ""} ${d} ${i} ${v || o || a ? "opacity" : ""} ${s ? "errored" : ""} ${t ? "focused" : ""} ${l}`, E = { md: 20, lg: 20 }[i];
|
1051
1051
|
return {
|
1052
1052
|
isLoading: a,
|
1053
1053
|
className: B,
|
1054
1054
|
prefix: Ee(c, E, "prefix"),
|
1055
1055
|
sufix: Ee(u, E, "sufix"),
|
1056
|
-
LeftIcon:
|
1057
|
-
RightIcon:
|
1056
|
+
LeftIcon: m,
|
1057
|
+
RightIcon: h,
|
1058
1058
|
disabled: v,
|
1059
|
-
locale:
|
1059
|
+
locale: C,
|
1060
1060
|
currency: O,
|
1061
1061
|
readOnly: o,
|
1062
1062
|
onFocus: y,
|
1063
|
-
onBlur:
|
1064
|
-
title:
|
1065
|
-
style:
|
1063
|
+
onBlur: k,
|
1064
|
+
title: x,
|
1065
|
+
style: w,
|
1066
1066
|
max: b,
|
1067
1067
|
// showCents,
|
1068
1068
|
loadingPosition: R,
|
@@ -1072,15 +1072,15 @@ function Nn(e, t) {
|
|
1072
1072
|
};
|
1073
1073
|
}
|
1074
1074
|
function jn(e) {
|
1075
|
-
const [t, a] =
|
1075
|
+
const [t, a] = ae(!1), [s, i] = ae("0"), l = Se(null), { inputRef: d, id: c, error: u } = ve(), m = d || l, h = e.isError || !!u, {
|
1076
1076
|
disabled: v,
|
1077
1077
|
title: o,
|
1078
1078
|
style: y,
|
1079
|
-
className:
|
1080
|
-
prefix:
|
1081
|
-
sufix:
|
1079
|
+
className: k,
|
1080
|
+
prefix: x,
|
1081
|
+
sufix: w,
|
1082
1082
|
iconSize: b,
|
1083
|
-
loadingPosition:
|
1083
|
+
loadingPosition: C,
|
1084
1084
|
isLoading: O,
|
1085
1085
|
LeftIcon: _,
|
1086
1086
|
readOnly: R,
|
@@ -1097,9 +1097,9 @@ function jn(e) {
|
|
1097
1097
|
name: K,
|
1098
1098
|
defaultValue: Q,
|
1099
1099
|
...$
|
1100
|
-
} = Nn({ ...e, id: c, isError:
|
1100
|
+
} = Nn({ ...e, id: c, isError: h }, t), q = _ && !O, ie = H && !O, I = C === "left" && O, T = C === "right" && O;
|
1101
1101
|
function j() {
|
1102
|
-
v || !(
|
1102
|
+
v || !(m != null && m.current) || (a(!0), m.current.focus());
|
1103
1103
|
}
|
1104
1104
|
function Z(G) {
|
1105
1105
|
a(!0), V && V(G);
|
@@ -1108,29 +1108,29 @@ function jn(e) {
|
|
1108
1108
|
a(!1), D && D(G);
|
1109
1109
|
}
|
1110
1110
|
const X = (G) => {
|
1111
|
-
const [
|
1111
|
+
const [re, ke] = Nt(
|
1112
1112
|
M,
|
1113
1113
|
G,
|
1114
1114
|
U
|
1115
1115
|
);
|
1116
|
-
return !B ||
|
1116
|
+
return !B || re <= B ? (i(ke), [re, ke]) : [ct(s), s];
|
1117
1117
|
}, xe = (G) => {
|
1118
1118
|
G.preventDefault();
|
1119
|
-
const [
|
1120
|
-
te(G, String(
|
1121
|
-
},
|
1119
|
+
const [re, ke] = X(G.target.value);
|
1120
|
+
te(G, String(re), String(ke));
|
1121
|
+
}, he = (G) => E && E(G, G.key, G.key);
|
1122
1122
|
return Ze(() => {
|
1123
|
-
const G = J || Q || void 0, [,
|
1124
|
-
i(
|
1123
|
+
const G = J || Q || void 0, [, re] = Nt(M, G, U);
|
1124
|
+
i(re);
|
1125
1125
|
}, [U, Q, J]), /* @__PURE__ */ r.jsxs(
|
1126
1126
|
"section",
|
1127
1127
|
{
|
1128
1128
|
title: o,
|
1129
1129
|
style: y,
|
1130
1130
|
onClick: j,
|
1131
|
-
className:
|
1131
|
+
className: k,
|
1132
1132
|
children: [
|
1133
|
-
|
1133
|
+
x,
|
1134
1134
|
I && W,
|
1135
1135
|
q && /* @__PURE__ */ r.jsx(_, { size: b, strokeWidth: 2.5 }),
|
1136
1136
|
/* @__PURE__ */ r.jsx(
|
@@ -1140,7 +1140,7 @@ function jn(e) {
|
|
1140
1140
|
onChange: xe,
|
1141
1141
|
onBlur: le,
|
1142
1142
|
onFocus: Z,
|
1143
|
-
onKeyUp:
|
1143
|
+
onKeyUp: he,
|
1144
1144
|
disabled: v || O,
|
1145
1145
|
readOnly: R,
|
1146
1146
|
...$
|
@@ -1150,14 +1150,14 @@ function jn(e) {
|
|
1150
1150
|
"input",
|
1151
1151
|
{
|
1152
1152
|
type: "hidden",
|
1153
|
-
ref:
|
1153
|
+
ref: m,
|
1154
1154
|
name: K,
|
1155
1155
|
value: ct(s)
|
1156
1156
|
}
|
1157
1157
|
),
|
1158
1158
|
T && W,
|
1159
1159
|
ie && /* @__PURE__ */ r.jsx(H, { size: b, strokeWidth: 2.5 }),
|
1160
|
-
|
1160
|
+
w
|
1161
1161
|
]
|
1162
1162
|
}
|
1163
1163
|
);
|
@@ -1171,62 +1171,62 @@ function En(e, t) {
|
|
1171
1171
|
variant: d = "solid",
|
1172
1172
|
prefix: c,
|
1173
1173
|
sufix: u,
|
1174
|
-
leftIcon:
|
1175
|
-
rightIcon:
|
1174
|
+
leftIcon: m,
|
1175
|
+
rightIcon: h,
|
1176
1176
|
disabled: v,
|
1177
1177
|
readOnly: o,
|
1178
1178
|
onFocus: y,
|
1179
|
-
onBlur:
|
1180
|
-
title:
|
1181
|
-
style:
|
1179
|
+
onBlur: k,
|
1180
|
+
title: x,
|
1181
|
+
style: w,
|
1182
1182
|
onChange: b,
|
1183
|
-
showMask:
|
1183
|
+
showMask: C = !1,
|
1184
1184
|
type: O,
|
1185
1185
|
..._
|
1186
|
-
} = e, R =
|
1186
|
+
} = e, R = h ? "right" : "left", B = `arkyn_input ${c ? "hasPrefix" : ""} ${u ? "hasSufix" : ""} ${d} ${i} ${v || o || a ? "opacity" : ""} ${s ? "errored" : ""} ${t ? "focused" : ""} ${l}`, E = { md: 20, lg: 20 }[i];
|
1187
1187
|
return {
|
1188
1188
|
isLoading: a,
|
1189
1189
|
className: B,
|
1190
1190
|
prefix: Ee(c, E, "prefix"),
|
1191
1191
|
sufix: Ee(u, E, "sufix"),
|
1192
|
-
LeftIcon:
|
1193
|
-
RightIcon:
|
1192
|
+
LeftIcon: m,
|
1193
|
+
RightIcon: h,
|
1194
1194
|
disabled: v,
|
1195
1195
|
readOnly: o,
|
1196
1196
|
onFocus: y,
|
1197
|
-
onBlur:
|
1198
|
-
title:
|
1199
|
-
style:
|
1197
|
+
onBlur: k,
|
1198
|
+
title: x,
|
1199
|
+
style: w,
|
1200
1200
|
onChange: b,
|
1201
1201
|
loadingPosition: R,
|
1202
1202
|
iconSize: E,
|
1203
|
-
showMask:
|
1203
|
+
showMask: C,
|
1204
1204
|
Spinner: /* @__PURE__ */ r.jsx($e, { className: "spinner", size: E, strokeWidth: 2.5 }),
|
1205
1205
|
..._
|
1206
1206
|
};
|
1207
1207
|
}
|
1208
1208
|
const Sn = an((e, t) => /* @__PURE__ */ r.jsx("input", { ref: t, ...e }));
|
1209
1209
|
function Tn(e) {
|
1210
|
-
const [t, a] =
|
1211
|
-
disabled:
|
1212
|
-
title:
|
1210
|
+
const [t, a] = ae(!1), s = Se(null), { inputRef: i, id: l, error: d } = ve(), c = i || s, u = e.isError || !!d, {
|
1211
|
+
disabled: m,
|
1212
|
+
title: h,
|
1213
1213
|
style: v,
|
1214
1214
|
className: o,
|
1215
1215
|
prefix: y,
|
1216
|
-
sufix:
|
1217
|
-
iconSize:
|
1218
|
-
loadingPosition:
|
1216
|
+
sufix: k,
|
1217
|
+
iconSize: x,
|
1218
|
+
loadingPosition: w,
|
1219
1219
|
isLoading: b,
|
1220
|
-
LeftIcon:
|
1220
|
+
LeftIcon: C,
|
1221
1221
|
readOnly: O,
|
1222
1222
|
onFocus: _,
|
1223
1223
|
onBlur: R,
|
1224
1224
|
RightIcon: V,
|
1225
1225
|
Spinner: D,
|
1226
1226
|
...H
|
1227
|
-
} = En({ ...e, id: l, isError: u }, t), W =
|
1227
|
+
} = En({ ...e, id: l, isError: u }, t), W = C && !b, J = V && !b, B = w === "left" && b, te = w === "right" && b;
|
1228
1228
|
function E() {
|
1229
|
-
|
1229
|
+
m || !(c != null && c.current) || (a(!0), c.current.focus());
|
1230
1230
|
}
|
1231
1231
|
function U(K) {
|
1232
1232
|
a(!0), _ && _(K);
|
@@ -1237,14 +1237,14 @@ function Tn(e) {
|
|
1237
1237
|
return /* @__PURE__ */ r.jsxs(
|
1238
1238
|
"section",
|
1239
1239
|
{
|
1240
|
-
title:
|
1240
|
+
title: h,
|
1241
1241
|
style: v,
|
1242
1242
|
onClick: E,
|
1243
1243
|
className: o,
|
1244
1244
|
children: [
|
1245
1245
|
y,
|
1246
1246
|
B && D,
|
1247
|
-
W && /* @__PURE__ */ r.jsx(
|
1247
|
+
W && /* @__PURE__ */ r.jsx(C, { size: x, strokeWidth: 2.5 }),
|
1248
1248
|
/* @__PURE__ */ r.jsx(
|
1249
1249
|
dn,
|
1250
1250
|
{
|
@@ -1252,13 +1252,13 @@ function Tn(e) {
|
|
1252
1252
|
ref: c,
|
1253
1253
|
onFocus: U,
|
1254
1254
|
onBlur: M,
|
1255
|
-
disabled:
|
1255
|
+
disabled: m,
|
1256
1256
|
...H
|
1257
1257
|
}
|
1258
1258
|
),
|
1259
|
-
J && /* @__PURE__ */ r.jsx(V, { size:
|
1259
|
+
J && /* @__PURE__ */ r.jsx(V, { size: x, strokeWidth: 2.5 }),
|
1260
1260
|
te && D,
|
1261
|
-
|
1261
|
+
k
|
1262
1262
|
]
|
1263
1263
|
}
|
1264
1264
|
);
|
@@ -1272,49 +1272,49 @@ function Rn(e, t) {
|
|
1272
1272
|
variant: d = "solid",
|
1273
1273
|
prefix: c,
|
1274
1274
|
sufix: u,
|
1275
|
-
leftIcon:
|
1276
|
-
rightIcon:
|
1275
|
+
leftIcon: m,
|
1276
|
+
rightIcon: h,
|
1277
1277
|
disabled: v,
|
1278
1278
|
readOnly: o,
|
1279
1279
|
onFocus: y,
|
1280
|
-
onBlur:
|
1281
|
-
title:
|
1282
|
-
style:
|
1280
|
+
onBlur: k,
|
1281
|
+
title: x,
|
1282
|
+
style: w,
|
1283
1283
|
onChange: b,
|
1284
|
-
...
|
1285
|
-
} = e, O =
|
1284
|
+
...C
|
1285
|
+
} = e, O = h ? "right" : "left", W = `arkyn_input ${c ? "hasPrefix" : ""} ${u ? "hasSufix" : ""} ${d} ${i} ${v || o || a ? "opacity" : ""} ${s ? "errored" : ""} ${t ? "focused" : ""} ${l}`, B = { md: 20, lg: 20 }[i];
|
1286
1286
|
return {
|
1287
1287
|
isLoading: a,
|
1288
1288
|
className: W,
|
1289
1289
|
prefix: Ee(c, B, "prefix"),
|
1290
1290
|
sufix: Ee(u, B, "sufix"),
|
1291
|
-
LeftIcon:
|
1292
|
-
RightIcon:
|
1291
|
+
LeftIcon: m,
|
1292
|
+
RightIcon: h,
|
1293
1293
|
disabled: v,
|
1294
1294
|
readOnly: o,
|
1295
1295
|
onFocus: y,
|
1296
|
-
onBlur:
|
1297
|
-
title:
|
1298
|
-
style:
|
1296
|
+
onBlur: k,
|
1297
|
+
title: x,
|
1298
|
+
style: w,
|
1299
1299
|
onChange: b,
|
1300
1300
|
loadingPosition: O,
|
1301
1301
|
iconSize: B,
|
1302
1302
|
Spinner: /* @__PURE__ */ r.jsx($e, { className: "spinner", size: B, strokeWidth: 2.5 }),
|
1303
|
-
...
|
1303
|
+
...C
|
1304
1304
|
};
|
1305
1305
|
}
|
1306
1306
|
function $n(e) {
|
1307
|
-
const [t, a] =
|
1308
|
-
disabled:
|
1309
|
-
title:
|
1307
|
+
const [t, a] = ae(!1), s = Se(null), { inputRef: i, id: l, error: d } = ve(), c = i || s, u = e.isError || !!d, {
|
1308
|
+
disabled: m,
|
1309
|
+
title: h,
|
1310
1310
|
style: v,
|
1311
1311
|
className: o,
|
1312
1312
|
prefix: y,
|
1313
|
-
sufix:
|
1314
|
-
iconSize:
|
1315
|
-
loadingPosition:
|
1313
|
+
sufix: k,
|
1314
|
+
iconSize: x,
|
1315
|
+
loadingPosition: w,
|
1316
1316
|
isLoading: b,
|
1317
|
-
LeftIcon:
|
1317
|
+
LeftIcon: C,
|
1318
1318
|
readOnly: O,
|
1319
1319
|
onFocus: _,
|
1320
1320
|
onBlur: R,
|
@@ -1322,9 +1322,9 @@ function $n(e) {
|
|
1322
1322
|
type: D,
|
1323
1323
|
Spinner: H,
|
1324
1324
|
...W
|
1325
|
-
} = Rn({ ...e, id: l, isError: u }, t), J =
|
1325
|
+
} = Rn({ ...e, id: l, isError: u }, t), J = C && !b, B = V && !b, te = w === "left" && b, E = w === "right" && b;
|
1326
1326
|
function U() {
|
1327
|
-
|
1327
|
+
m || !(c != null && c.current) || (a(!0), c.current.focus());
|
1328
1328
|
}
|
1329
1329
|
function M(Q) {
|
1330
1330
|
a(!0), _ && _(Q);
|
@@ -1344,18 +1344,18 @@ function $n(e) {
|
|
1344
1344
|
) : /* @__PURE__ */ r.jsxs(
|
1345
1345
|
"section",
|
1346
1346
|
{
|
1347
|
-
title:
|
1347
|
+
title: h,
|
1348
1348
|
style: v,
|
1349
1349
|
onClick: U,
|
1350
1350
|
className: o,
|
1351
1351
|
children: [
|
1352
1352
|
y,
|
1353
1353
|
te && H,
|
1354
|
-
J && /* @__PURE__ */ r.jsx(
|
1354
|
+
J && /* @__PURE__ */ r.jsx(C, { size: x, strokeWidth: 2.5 }),
|
1355
1355
|
/* @__PURE__ */ r.jsx(
|
1356
1356
|
"input",
|
1357
1357
|
{
|
1358
|
-
disabled:
|
1358
|
+
disabled: m || b,
|
1359
1359
|
readOnly: O,
|
1360
1360
|
ref: c,
|
1361
1361
|
onFocus: M,
|
@@ -1364,9 +1364,9 @@ function $n(e) {
|
|
1364
1364
|
...W
|
1365
1365
|
}
|
1366
1366
|
),
|
1367
|
-
B && /* @__PURE__ */ r.jsx(V, { size:
|
1367
|
+
B && /* @__PURE__ */ r.jsx(V, { size: x, strokeWidth: 2.5 }),
|
1368
1368
|
E && H,
|
1369
|
-
|
1369
|
+
k
|
1370
1370
|
]
|
1371
1371
|
}
|
1372
1372
|
);
|
@@ -1387,9 +1387,9 @@ function Fa(e) {
|
|
1387
1387
|
size: l = "md",
|
1388
1388
|
className: d = "",
|
1389
1389
|
...c
|
1390
|
-
} = e, [u,
|
1391
|
-
function o(
|
1392
|
-
|
1390
|
+
} = e, [u, m] = ae(t || ""), { inputRef: h, id: v } = ve();
|
1391
|
+
function o(k) {
|
1392
|
+
m(k), i && i(k);
|
1393
1393
|
}
|
1394
1394
|
const y = `arkynRadioGroup ${l} ${d}`;
|
1395
1395
|
return /* @__PURE__ */ r.jsxs(
|
@@ -1405,8 +1405,8 @@ function Fa(e) {
|
|
1405
1405
|
id: v,
|
1406
1406
|
readOnly: !0,
|
1407
1407
|
name: a,
|
1408
|
-
ref:
|
1409
|
-
value: u
|
1408
|
+
ref: h,
|
1409
|
+
value: s || u
|
1410
1410
|
}
|
1411
1411
|
),
|
1412
1412
|
/* @__PURE__ */ r.jsx("div", { className: y.trim(), ...c })
|
@@ -1422,8 +1422,8 @@ function Oa(e) {
|
|
1422
1422
|
children: i,
|
1423
1423
|
className: l = "",
|
1424
1424
|
...d
|
1425
|
-
} = e, { onChange: c, size: u, value:
|
1426
|
-
return /* @__PURE__ */ r.jsxs("label", { className:
|
1425
|
+
} = e, { onChange: c, size: u, value: m } = Pn(), { error: h } = ve(), x = `arkynRadioBox ${a || u} ${m === t ? "checkedTrue" : "checkedFalse"} ${h ? "errorTrue" : "errorFalse"} ${s ? "disabledTrue" : "disabledFalse"} ${l}`;
|
1426
|
+
return /* @__PURE__ */ r.jsxs("label", { className: x.trim(), children: [
|
1427
1427
|
/* @__PURE__ */ r.jsx(
|
1428
1428
|
"button",
|
1429
1429
|
{
|
@@ -1446,44 +1446,44 @@ function In(e, t) {
|
|
1446
1446
|
variant: d = "solid",
|
1447
1447
|
prefix: c,
|
1448
1448
|
leftIcon: u,
|
1449
|
-
disabled:
|
1450
|
-
readOnly:
|
1449
|
+
disabled: m,
|
1450
|
+
readOnly: h,
|
1451
1451
|
onFocus: v,
|
1452
1452
|
onBlur: o,
|
1453
1453
|
title: y,
|
1454
|
-
style:
|
1455
|
-
closeOnSelect:
|
1456
|
-
...
|
1457
|
-
} = e, R = `arkyn_select ${c ? "hasPrefix" : ""} ${d} ${i} ${
|
1454
|
+
style: k,
|
1455
|
+
closeOnSelect: x = !0,
|
1456
|
+
...w
|
1457
|
+
} = e, R = `arkyn_select ${c ? "hasPrefix" : ""} ${d} ${i} ${m || h || a ? "opacity" : ""} ${s ? "errored" : ""} ${t ? "focused" : ""} ${l}`, D = { md: 20, lg: 20 }[i];
|
1458
1458
|
return {
|
1459
1459
|
isLoading: a,
|
1460
1460
|
className: R,
|
1461
1461
|
prefix: yn(c, D, "prefix"),
|
1462
1462
|
LeftIcon: u,
|
1463
|
-
disabled:
|
1463
|
+
disabled: m || a || h,
|
1464
1464
|
onFocus: v,
|
1465
1465
|
onBlur: o,
|
1466
1466
|
title: y,
|
1467
|
-
closeOnSelect:
|
1468
|
-
style:
|
1467
|
+
closeOnSelect: x,
|
1468
|
+
style: k,
|
1469
1469
|
iconSize: D,
|
1470
1470
|
Spinner: /* @__PURE__ */ r.jsx($e, { className: "spinner", size: D, strokeWidth: 2.5 }),
|
1471
|
-
...
|
1471
|
+
...w
|
1472
1472
|
};
|
1473
1473
|
}
|
1474
1474
|
function Ba(e) {
|
1475
1475
|
var T;
|
1476
|
-
const [t, a] =
|
1477
|
-
disabled:
|
1478
|
-
title:
|
1476
|
+
const [t, a] = ae(!1), { inputRef: s, id: i, error: l } = ve(), d = Se(null), c = s || d, u = e.isError || !!l, {
|
1477
|
+
disabled: m,
|
1478
|
+
title: h,
|
1479
1479
|
style: v,
|
1480
1480
|
className: o,
|
1481
1481
|
prefix: y,
|
1482
|
-
iconSize:
|
1483
|
-
isLoading:
|
1484
|
-
LeftIcon:
|
1482
|
+
iconSize: k,
|
1483
|
+
isLoading: x,
|
1484
|
+
LeftIcon: w,
|
1485
1485
|
value: b = null,
|
1486
|
-
defaultValue:
|
1486
|
+
defaultValue: C = "",
|
1487
1487
|
onFocus: O,
|
1488
1488
|
onBlur: _,
|
1489
1489
|
Spinner: R,
|
@@ -1494,9 +1494,9 @@ function Ba(e) {
|
|
1494
1494
|
optionMaxHeight: J,
|
1495
1495
|
closeOnSelect: B,
|
1496
1496
|
...te
|
1497
|
-
} = In({ ...e, id: i, isError: u }, t), [E, U] =
|
1497
|
+
} = In({ ...e, id: i, isError: u }, t), [E, U] = ae(C);
|
1498
1498
|
function M() {
|
1499
|
-
|
1499
|
+
m || !(c != null && c.current) || t || (a(!0), c.current.focus());
|
1500
1500
|
}
|
1501
1501
|
function K(j) {
|
1502
1502
|
t || (a(!0), O && O(j));
|
@@ -1518,17 +1518,17 @@ function Ba(e) {
|
|
1518
1518
|
/* @__PURE__ */ r.jsxs(
|
1519
1519
|
"section",
|
1520
1520
|
{
|
1521
|
-
title:
|
1521
|
+
title: h,
|
1522
1522
|
style: v,
|
1523
1523
|
onClick: M,
|
1524
1524
|
className: `${o} placeholder_dark_${I()}`,
|
1525
1525
|
children: [
|
1526
1526
|
y,
|
1527
|
-
|
1527
|
+
w && /* @__PURE__ */ r.jsx(w, { size: k, strokeWidth: 2.5 }),
|
1528
1528
|
/* @__PURE__ */ r.jsx(
|
1529
1529
|
"input",
|
1530
1530
|
{
|
1531
|
-
disabled:
|
1531
|
+
disabled: m,
|
1532
1532
|
readOnly: !0,
|
1533
1533
|
placeholder: ie || D,
|
1534
1534
|
onFocus: K,
|
@@ -1568,15 +1568,15 @@ function Ba(e) {
|
|
1568
1568
|
]
|
1569
1569
|
}
|
1570
1570
|
),
|
1571
|
-
!
|
1571
|
+
!x && /* @__PURE__ */ r.jsx(
|
1572
1572
|
sn,
|
1573
1573
|
{
|
1574
1574
|
className: "arkyn_select_arrow",
|
1575
|
-
size:
|
1575
|
+
size: k,
|
1576
1576
|
strokeWidth: 2.5
|
1577
1577
|
}
|
1578
1578
|
),
|
1579
|
-
|
1579
|
+
x && R
|
1580
1580
|
]
|
1581
1581
|
}
|
1582
1582
|
),
|
@@ -1584,6 +1584,41 @@ function Ba(e) {
|
|
1584
1584
|
] });
|
1585
1585
|
}
|
1586
1586
|
function za(e) {
|
1587
|
+
const {
|
1588
|
+
size: t = "lg",
|
1589
|
+
defaultChecked: a = !1,
|
1590
|
+
checked: s = null,
|
1591
|
+
value: i,
|
1592
|
+
name: l,
|
1593
|
+
className: d = "",
|
1594
|
+
onCheck: c,
|
1595
|
+
...u
|
1596
|
+
} = e, [m, h] = ae(a), { id: v, inputRef: o } = ve();
|
1597
|
+
function y() {
|
1598
|
+
h(!m), c && c(a ? "" : i || "checked");
|
1599
|
+
}
|
1600
|
+
const k = typeof s == "boolean" ? s : m, w = `arkynSwitch ${k ? "checkedTrue" : "checkedFalse"} ${t} ${d}`;
|
1601
|
+
return /* @__PURE__ */ r.jsx(
|
1602
|
+
"button",
|
1603
|
+
{
|
1604
|
+
id: v,
|
1605
|
+
type: "button",
|
1606
|
+
onClick: y,
|
1607
|
+
className: w,
|
1608
|
+
...u,
|
1609
|
+
children: /* @__PURE__ */ r.jsx(
|
1610
|
+
"input",
|
1611
|
+
{
|
1612
|
+
type: "hidden",
|
1613
|
+
name: l,
|
1614
|
+
ref: o,
|
1615
|
+
value: k ? i || "checked" : ""
|
1616
|
+
}
|
1617
|
+
)
|
1618
|
+
}
|
1619
|
+
);
|
1620
|
+
}
|
1621
|
+
function Da(e) {
|
1587
1622
|
const {
|
1588
1623
|
variant: t = "solid",
|
1589
1624
|
size: a = "md",
|
@@ -1593,9 +1628,9 @@ function za(e) {
|
|
1593
1628
|
onFocus: d,
|
1594
1629
|
onBlur: c,
|
1595
1630
|
title: u,
|
1596
|
-
style:
|
1597
|
-
...
|
1598
|
-
} = e, [v, o] =
|
1631
|
+
style: m,
|
1632
|
+
...h
|
1633
|
+
} = e, [v, o] = ae(!1), { inputRef: y, id: k, error: x } = ve(), w = Se(null), b = y || w, O = e.isError || !!x ? "errorTrue" : "errorFalse", V = `arkynTextarea ${t} ${a} ${i || l ? "opacityTrue" : "opacityFalse"} ${O} ${v ? "focusedTrue" : "focusedFalse"} ${s}`;
|
1599
1634
|
function D() {
|
1600
1635
|
i || !(b != null && b.current) || (o(!0), b.current.focus());
|
1601
1636
|
}
|
@@ -1609,29 +1644,29 @@ function za(e) {
|
|
1609
1644
|
"section",
|
1610
1645
|
{
|
1611
1646
|
title: u,
|
1612
|
-
style:
|
1647
|
+
style: m,
|
1613
1648
|
onClick: D,
|
1614
1649
|
className: V,
|
1615
1650
|
children: /* @__PURE__ */ r.jsx(
|
1616
1651
|
"textarea",
|
1617
1652
|
{
|
1618
|
-
id:
|
1653
|
+
id: k,
|
1619
1654
|
disabled: i,
|
1620
1655
|
readOnly: l,
|
1621
1656
|
ref: b,
|
1622
1657
|
onFocus: H,
|
1623
1658
|
onBlur: W,
|
1624
|
-
...
|
1659
|
+
...h
|
1625
1660
|
}
|
1626
1661
|
)
|
1627
1662
|
}
|
1628
1663
|
);
|
1629
1664
|
}
|
1630
|
-
function
|
1665
|
+
function Ma(e) {
|
1631
1666
|
const { className: t = "", ...a } = e, s = `arkynBreadcrumbContainer ${t}`;
|
1632
1667
|
return /* @__PURE__ */ r.jsx("nav", { className: s, ...a });
|
1633
1668
|
}
|
1634
|
-
function
|
1669
|
+
function La(e) {
|
1635
1670
|
const { pathname: t } = It(), {
|
1636
1671
|
className: a = "",
|
1637
1672
|
disabled: s = !1,
|
@@ -1662,7 +1697,7 @@ function _n(e = "") {
|
|
1662
1697
|
}
|
1663
1698
|
};
|
1664
1699
|
}
|
1665
|
-
function
|
1700
|
+
function Aa(e) {
|
1666
1701
|
const {
|
1667
1702
|
scope: t,
|
1668
1703
|
totalCountRegisters: a,
|
@@ -1670,57 +1705,57 @@ function La(e) {
|
|
1670
1705
|
pageKey: i = "page",
|
1671
1706
|
siblingsCount: l = 2,
|
1672
1707
|
...d
|
1673
|
-
} = e, c = un(), { getParam: u, getScopedSearch:
|
1674
|
-
function w
|
1675
|
-
c(
|
1708
|
+
} = e, c = un(), { getParam: u, getScopedSearch: m } = _n(t), h = Number(u(i)) || 1, v = Number(u(s)) || 20, o = Math.ceil(a / v), y = bn(h, l), k = vn(h, l, o);
|
1709
|
+
function x(w) {
|
1710
|
+
c(m({ page: w }));
|
1676
1711
|
}
|
1677
1712
|
return /* @__PURE__ */ r.jsxs("div", { className: "arkynPagination", ...d, children: [
|
1678
1713
|
/* @__PURE__ */ r.jsx(
|
1679
1714
|
"button",
|
1680
1715
|
{
|
1681
1716
|
className: "arkynPaginationIconButton",
|
1682
|
-
disabled:
|
1683
|
-
onClick: () =>
|
1717
|
+
disabled: h <= 1,
|
1718
|
+
onClick: () => x(h - 1),
|
1684
1719
|
children: /* @__PURE__ */ r.jsx(on, {})
|
1685
1720
|
}
|
1686
1721
|
),
|
1687
|
-
|
1722
|
+
h > 1 + l && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
1688
1723
|
/* @__PURE__ */ r.jsx(
|
1689
1724
|
"button",
|
1690
1725
|
{
|
1691
1726
|
className: "arkynPaginationPageButton",
|
1692
|
-
onClick: () =>
|
1727
|
+
onClick: () => x(1),
|
1693
1728
|
children: "1"
|
1694
1729
|
}
|
1695
1730
|
),
|
1696
|
-
|
1731
|
+
h > 2 + l && /* @__PURE__ */ r.jsx("button", { disabled: !0, className: "arkynPaginationSpread", children: /* @__PURE__ */ r.jsx(xt, {}) })
|
1697
1732
|
] }),
|
1698
|
-
y.map((
|
1733
|
+
y.map((w, b) => /* @__PURE__ */ r.jsx(
|
1699
1734
|
"button",
|
1700
1735
|
{
|
1701
|
-
onClick: () => w
|
1736
|
+
onClick: () => x(w),
|
1702
1737
|
className: "arkynPaginationPageButton",
|
1703
|
-
children:
|
1738
|
+
children: w
|
1704
1739
|
},
|
1705
1740
|
b
|
1706
1741
|
)),
|
1707
|
-
/* @__PURE__ */ r.jsx("button", { className: "arkynPaginationCurrent", disabled: !0, children:
|
1708
|
-
|
1742
|
+
/* @__PURE__ */ r.jsx("button", { className: "arkynPaginationCurrent", disabled: !0, children: h }),
|
1743
|
+
k.map((w, b) => /* @__PURE__ */ r.jsx(
|
1709
1744
|
"button",
|
1710
1745
|
{
|
1711
|
-
onClick: () => w
|
1746
|
+
onClick: () => x(w),
|
1712
1747
|
className: "arkynPaginationPageButton",
|
1713
|
-
children:
|
1748
|
+
children: w
|
1714
1749
|
},
|
1715
1750
|
b
|
1716
1751
|
)),
|
1717
|
-
|
1718
|
-
|
1752
|
+
h + l < o && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
1753
|
+
h + 1 + l < o && /* @__PURE__ */ r.jsx("button", { disabled: !0, className: "arkynPaginationSpread", children: /* @__PURE__ */ r.jsx(xt, {}) }),
|
1719
1754
|
/* @__PURE__ */ r.jsx(
|
1720
1755
|
"button",
|
1721
1756
|
{
|
1722
1757
|
className: "arkynPaginationPageButton",
|
1723
|
-
onClick: () =>
|
1758
|
+
onClick: () => x(o),
|
1724
1759
|
children: o
|
1725
1760
|
}
|
1726
1761
|
)
|
@@ -1729,8 +1764,8 @@ function La(e) {
|
|
1729
1764
|
"button",
|
1730
1765
|
{
|
1731
1766
|
className: "arkynPaginationIconButton",
|
1732
|
-
disabled:
|
1733
|
-
onClick: () =>
|
1767
|
+
disabled: h >= o,
|
1768
|
+
onClick: () => x(h + 1),
|
1734
1769
|
children: /* @__PURE__ */ r.jsx(it, {})
|
1735
1770
|
}
|
1736
1771
|
)
|
@@ -1742,49 +1777,49 @@ function Fn() {
|
|
1742
1777
|
throw new Error("useTabContext must be used within a TabProvider");
|
1743
1778
|
return ye(ut);
|
1744
1779
|
}
|
1745
|
-
function
|
1780
|
+
function Va(e) {
|
1746
1781
|
const {
|
1747
1782
|
children: t,
|
1748
1783
|
onClick: a,
|
1749
1784
|
defaultActive: s,
|
1750
1785
|
className: i,
|
1751
1786
|
...l
|
1752
|
-
} = e, [d, c] =
|
1787
|
+
} = e, [d, c] = ae(s || ""), [u, m] = ae(!0), h = Se(null), v = `arkynTabContainer ${i || ""}`, [o, y] = ae({
|
1753
1788
|
width: "0px",
|
1754
1789
|
left: "0px",
|
1755
1790
|
transition: "none"
|
1756
|
-
}),
|
1757
|
-
const
|
1758
|
-
|
1791
|
+
}), k = (w, b) => {
|
1792
|
+
const C = w.getBoundingClientRect(), O = h.current.getBoundingClientRect(), _ = b ? void 0 : "none";
|
1793
|
+
m(!1), y({
|
1759
1794
|
transition: _,
|
1760
|
-
width: `${
|
1761
|
-
left: `${
|
1795
|
+
width: `${C.width}px`,
|
1796
|
+
left: `${C.left - O.left}px`
|
1762
1797
|
});
|
1763
1798
|
};
|
1764
1799
|
Ze(() => {
|
1765
|
-
const
|
1766
|
-
if (!
|
1800
|
+
const w = h.current;
|
1801
|
+
if (!w) return;
|
1767
1802
|
let b = null;
|
1768
|
-
b =
|
1803
|
+
b = w.querySelector("button.active"), b && k(b);
|
1769
1804
|
}, []);
|
1770
|
-
const
|
1771
|
-
const b =
|
1772
|
-
b && (c(b.value), b.classList.add("active"),
|
1805
|
+
const x = (w) => {
|
1806
|
+
const b = w.target;
|
1807
|
+
b && (c(b.value), b.classList.add("active"), k(b, !0), a && a(b.value));
|
1773
1808
|
};
|
1774
|
-
return /* @__PURE__ */ r.jsxs("nav", { ref:
|
1775
|
-
/* @__PURE__ */ r.jsx(ut.Provider, { value: { handleTabClick:
|
1809
|
+
return /* @__PURE__ */ r.jsxs("nav", { ref: h, className: v.trim(), ...l, children: [
|
1810
|
+
/* @__PURE__ */ r.jsx(ut.Provider, { value: { handleTabClick: x, showInitialTab: u, value: d }, children: t }),
|
1776
1811
|
/* @__PURE__ */ r.jsx("div", { className: "activeLine", style: o })
|
1777
1812
|
] });
|
1778
1813
|
}
|
1779
|
-
function
|
1780
|
-
const { children: t, className: a = "", onClick: s, ...i } = e, { value: l, showInitialTab: d, handleTabClick: c } = Fn(), u = l === i.value && l ? "activeTrue" : "activeFalse",
|
1814
|
+
function Wa(e) {
|
1815
|
+
const { children: t, className: a = "", onClick: s, ...i } = e, { value: l, showInitialTab: d, handleTabClick: c } = Fn(), u = l === i.value && l ? "activeTrue" : "activeFalse", h = `arkynTabButton ${l === i.value && d ? "showBorderBottom" : ""} ${u} ${a}`;
|
1781
1816
|
function v(o) {
|
1782
1817
|
c(o), s && s(o);
|
1783
1818
|
}
|
1784
|
-
return /* @__PURE__ */ r.jsx("button", { onClick: v, className:
|
1819
|
+
return /* @__PURE__ */ r.jsx("button", { onClick: v, className: h.trim(), ...i, children: t });
|
1785
1820
|
}
|
1786
1821
|
const At = Ce({});
|
1787
|
-
function
|
1822
|
+
function Ya(e) {
|
1788
1823
|
const {
|
1789
1824
|
isVisibled: t,
|
1790
1825
|
makeInvisible: a,
|
@@ -1792,8 +1827,8 @@ function Wa(e) {
|
|
1792
1827
|
children: i,
|
1793
1828
|
className: l,
|
1794
1829
|
...d
|
1795
|
-
} = e, c = s === "left" ? "-100%" : "100%",
|
1796
|
-
return /* @__PURE__ */ r.jsx(At.Provider, { value: { makeInvisible: a }, children: /* @__PURE__ */ r.jsx(_t, { children: t && /* @__PURE__ */ r.jsxs("aside", { className:
|
1830
|
+
} = e, c = s === "left" ? "-100%" : "100%", m = `arkynDrawerContainer ${s} ${t ? "visibleTrue" : "visibleFalse"} ${l}`;
|
1831
|
+
return /* @__PURE__ */ r.jsx(At.Provider, { value: { makeInvisible: a }, children: /* @__PURE__ */ r.jsx(_t, { children: t && /* @__PURE__ */ r.jsxs("aside", { className: m.trim(), ...d, children: [
|
1797
1832
|
/* @__PURE__ */ r.jsx(
|
1798
1833
|
Ve.div,
|
1799
1834
|
{
|
@@ -1818,7 +1853,7 @@ function Wa(e) {
|
|
1818
1853
|
)
|
1819
1854
|
] }) }) });
|
1820
1855
|
}
|
1821
|
-
function
|
1856
|
+
function Ha(e) {
|
1822
1857
|
const {
|
1823
1858
|
showCloseButton: t = !0,
|
1824
1859
|
className: a,
|
@@ -1840,7 +1875,7 @@ function Ya(e) {
|
|
1840
1875
|
] });
|
1841
1876
|
}
|
1842
1877
|
const Vt = Ce({});
|
1843
|
-
function
|
1878
|
+
function Ua(e) {
|
1844
1879
|
const {
|
1845
1880
|
isVisibled: t,
|
1846
1881
|
makeInvisible: a,
|
@@ -1873,11 +1908,11 @@ function Ha(e) {
|
|
1873
1908
|
)
|
1874
1909
|
] }) }) });
|
1875
1910
|
}
|
1876
|
-
function
|
1911
|
+
function Ka(e) {
|
1877
1912
|
const { alignment: t = "right", className: a, ...s } = e, i = `arkynModalFooter ${t} ${a}`;
|
1878
1913
|
return /* @__PURE__ */ r.jsx("footer", { className: i.trim(), ...s });
|
1879
1914
|
}
|
1880
|
-
function
|
1915
|
+
function Xa(e) {
|
1881
1916
|
const {
|
1882
1917
|
showCloseButton: t = !0,
|
1883
1918
|
className: a,
|
@@ -1898,12 +1933,12 @@ function Ka(e) {
|
|
1898
1933
|
)
|
1899
1934
|
] });
|
1900
1935
|
}
|
1901
|
-
function
|
1902
|
-
const { children: t, button: a, closeOnClick: s, orientation: i = "bottomLeft" } = e, [l, d] =
|
1903
|
-
function
|
1936
|
+
function Ga(e) {
|
1937
|
+
const { children: t, button: a, closeOnClick: s, orientation: i = "bottomLeft" } = e, [l, d] = ae(!1), u = `arkynPopover ${i} ${l ? "visibleTrue" : "visibleFalse"}`;
|
1938
|
+
function m() {
|
1904
1939
|
l || d(!0);
|
1905
1940
|
}
|
1906
|
-
return /* @__PURE__ */ r.jsxs("div", { className: u, onClick:
|
1941
|
+
return /* @__PURE__ */ r.jsxs("div", { className: u, onClick: m, children: [
|
1907
1942
|
a,
|
1908
1943
|
/* @__PURE__ */ r.jsx(
|
1909
1944
|
Ve.div,
|
@@ -1948,7 +1983,7 @@ function On(e) {
|
|
1948
1983
|
] })
|
1949
1984
|
] });
|
1950
1985
|
}
|
1951
|
-
function
|
1986
|
+
function Ja(e) {
|
1952
1987
|
const {
|
1953
1988
|
text: t,
|
1954
1989
|
size: a = "lg",
|
@@ -1962,7 +1997,7 @@ function Ga(e) {
|
|
1962
1997
|
/* @__PURE__ */ r.jsx("div", { className: "arkynTooltipText", children: t })
|
1963
1998
|
] });
|
1964
1999
|
}
|
1965
|
-
const
|
2000
|
+
const mt = Ce({}), Wt = Ce({});
|
1966
2001
|
function Bn() {
|
1967
2002
|
const e = ye(Wt);
|
1968
2003
|
if (Object.entries(e).length === 0)
|
@@ -1972,8 +2007,8 @@ function Bn() {
|
|
1972
2007
|
function jt(e) {
|
1973
2008
|
return e && typeof e.title == "string" && typeof e.message == "string" && (e.size === void 0 || e.size === "md" || e.size === "lg") && (e.type === "info" || e.type === "success" || e.type === "danger" || e.type === "warning");
|
1974
2009
|
}
|
1975
|
-
function
|
1976
|
-
const e = Pt(), { closeModal: t } = ye(
|
2010
|
+
function qa() {
|
2011
|
+
const e = Pt(), { closeModal: t } = ye(mt), { showToast: a } = Bn();
|
1977
2012
|
Ze(() => {
|
1978
2013
|
const s = e == null ? void 0 : e.closeModalKey;
|
1979
2014
|
s && t(s);
|
@@ -1987,7 +2022,7 @@ function Ja() {
|
|
1987
2022
|
}, [e]);
|
1988
2023
|
}
|
1989
2024
|
const Yt = Ce({});
|
1990
|
-
function
|
2025
|
+
function Za(e) {
|
1991
2026
|
const t = ye(Yt);
|
1992
2027
|
if (Object.entries(t).length === 0)
|
1993
2028
|
throw new Error("useDrawer must be used within a Provider");
|
@@ -1998,12 +2033,12 @@ function qa(e) {
|
|
1998
2033
|
openDrawer: i,
|
1999
2034
|
closeDrawer: l
|
2000
2035
|
} = t, d = s(e), c = a(e);
|
2001
|
-
return { drawerIsOpen: d, drawerData: c, openDrawer: (
|
2036
|
+
return { drawerIsOpen: d, drawerData: c, openDrawer: (h) => i(e, h), closeDrawer: () => l(e) };
|
2002
2037
|
} else
|
2003
2038
|
return t;
|
2004
2039
|
}
|
2005
|
-
function
|
2006
|
-
const t = ye(
|
2040
|
+
function Qa(e) {
|
2041
|
+
const t = ye(mt);
|
2007
2042
|
if (Object.entries(t).length === 0)
|
2008
2043
|
throw new Error("useModal must be used within a Provider");
|
2009
2044
|
if (e) {
|
@@ -2013,25 +2048,25 @@ function Za(e) {
|
|
2013
2048
|
openModal: i,
|
2014
2049
|
closeModal: l
|
2015
2050
|
} = t, d = s(e), c = a(e);
|
2016
|
-
return { modalIsOpen: d, modalData: c, openModal: (
|
2051
|
+
return { modalIsOpen: d, modalData: c, openModal: (h) => i(e, h), closeModal: () => l(e) };
|
2017
2052
|
} else
|
2018
2053
|
return t;
|
2019
2054
|
}
|
2020
|
-
function
|
2021
|
-
const { children: t = !1 } = e, [a, s] =
|
2055
|
+
function er(e) {
|
2056
|
+
const { children: t = !1 } = e, [a, s] = ae([]);
|
2022
2057
|
function i(u) {
|
2023
|
-
return !!a.some((
|
2058
|
+
return !!a.some((m) => m.key === u);
|
2024
2059
|
}
|
2025
2060
|
function l(u) {
|
2026
|
-
var
|
2027
|
-
return (
|
2061
|
+
var m;
|
2062
|
+
return (m = a.find((h) => h.key === u)) == null ? void 0 : m.data;
|
2028
2063
|
}
|
2029
|
-
function d(u,
|
2030
|
-
const
|
2031
|
-
s(
|
2064
|
+
function d(u, m) {
|
2065
|
+
const h = i(u);
|
2066
|
+
s(h ? (v) => [...v.filter((y) => y.key !== u), { key: u, data: m }] : [...a, { key: u, data: m }]);
|
2032
2067
|
}
|
2033
2068
|
function c(u) {
|
2034
|
-
s(a.filter((
|
2069
|
+
s(a.filter((m) => m.key !== u));
|
2035
2070
|
}
|
2036
2071
|
return /* @__PURE__ */ r.jsx(
|
2037
2072
|
Yt.Provider,
|
@@ -2041,24 +2076,24 @@ function Qa(e) {
|
|
2041
2076
|
}
|
2042
2077
|
);
|
2043
2078
|
}
|
2044
|
-
function
|
2045
|
-
const { children: t = !1 } = e, [a, s] =
|
2079
|
+
function tr(e) {
|
2080
|
+
const { children: t = !1 } = e, [a, s] = ae([]);
|
2046
2081
|
function i(u) {
|
2047
|
-
return !!a.some((
|
2082
|
+
return !!a.some((m) => m.key === u);
|
2048
2083
|
}
|
2049
2084
|
function l(u) {
|
2050
|
-
var
|
2051
|
-
return (
|
2085
|
+
var m;
|
2086
|
+
return (m = a.find((h) => h.key === u)) == null ? void 0 : m.data;
|
2052
2087
|
}
|
2053
|
-
function d(u,
|
2054
|
-
const
|
2055
|
-
s(
|
2088
|
+
function d(u, m) {
|
2089
|
+
const h = i(u);
|
2090
|
+
s(h ? (v) => [...v.filter((y) => y.key !== u), { key: u, data: m }] : [...a, { key: u, data: m }]);
|
2056
2091
|
}
|
2057
2092
|
function c(u) {
|
2058
|
-
s(a.filter((
|
2093
|
+
s(a.filter((m) => m.key !== u));
|
2059
2094
|
}
|
2060
2095
|
return /* @__PURE__ */ r.jsx(
|
2061
|
-
|
2096
|
+
mt.Provider,
|
2062
2097
|
{
|
2063
2098
|
value: { modalIsOpen: i, modalData: l, openModal: d, closeModal: c },
|
2064
2099
|
children: t
|
@@ -2150,29 +2185,29 @@ function sa(...e) {
|
|
2150
2185
|
return e.filter(Boolean).join(" ");
|
2151
2186
|
}
|
2152
2187
|
var oa = (e) => {
|
2153
|
-
var t, a, s, i, l, d, c, u,
|
2154
|
-
let { invert: v, toast: o, unstyled: y, interacting:
|
2188
|
+
var t, a, s, i, l, d, c, u, m, h;
|
2189
|
+
let { invert: v, toast: o, unstyled: y, interacting: k, setHeights: x, visibleToasts: w, heights: b, index: C, toasts: O, expanded: _, removeToast: R, defaultRichColors: V, closeButton: D, style: H, cancelButtonStyle: W, actionButtonStyle: J, className: B = "", descriptionClassName: te = "", duration: E, position: U, gap: M, loadingIcon: K, expandByDefault: Q, classNames: $, icons: q, closeButtonAriaLabel: ie = "Close toast", pauseWhenPageIsHidden: I, cn: T } = e, [j, Z] = p.useState(!1), [le, X] = p.useState(!1), [xe, he] = p.useState(!1), [G, re] = p.useState(!1), [ke, Pe] = p.useState(0), [et, We] = p.useState(0), Te = p.useRef(null), me = p.useRef(null), Ye = C === 0, He = C + 1 <= w, se = o.type, Ne = o.dismissible !== !1, tt = o.className || "", Oe = o.descriptionClassName || "", Ie = p.useMemo(() => b.findIndex((S) => S.toastId === o.id) || 0, [b, o.id]), nt = p.useMemo(() => {
|
2155
2190
|
var S;
|
2156
2191
|
return (S = o.closeButton) != null ? S : D;
|
2157
|
-
}, [o.closeButton, D]), Be = p.useMemo(() => o.duration || E || ea, [o.duration, E]), _e = p.useRef(0), pe = p.useRef(0), Ue = p.useRef(0), we = p.useRef(null), [ze, De] = U.split("-"), Ke = p.useMemo(() => b.reduce((S, L, A) => A >= Ie ? S : S + L.height, 0), [b, Ie]), Xe = Yn(), at = o.invert || v, Me =
|
2192
|
+
}, [o.closeButton, D]), Be = p.useMemo(() => o.duration || E || ea, [o.duration, E]), _e = p.useRef(0), pe = p.useRef(0), Ue = p.useRef(0), we = p.useRef(null), [ze, De] = U.split("-"), Ke = p.useMemo(() => b.reduce((S, L, A) => A >= Ie ? S : S + L.height, 0), [b, Ie]), Xe = Yn(), at = o.invert || v, Me = se === "loading";
|
2158
2193
|
pe.current = p.useMemo(() => Ie * M + Ke, [Ie, Ke]), p.useEffect(() => {
|
2159
2194
|
Z(!0);
|
2160
2195
|
}, []), p.useLayoutEffect(() => {
|
2161
2196
|
if (!j) return;
|
2162
|
-
let S =
|
2197
|
+
let S = me.current, L = S.style.height;
|
2163
2198
|
S.style.height = "auto";
|
2164
2199
|
let A = S.getBoundingClientRect().height;
|
2165
|
-
S.style.height = L, We(A),
|
2166
|
-
}, [j, o.title, o.description,
|
2200
|
+
S.style.height = L, We(A), x((oe) => oe.find((ue) => ue.toastId === o.id) ? oe.map((ue) => ue.toastId === o.id ? { ...ue, height: A } : ue) : [{ toastId: o.id, height: A, position: o.position }, ...oe]);
|
2201
|
+
}, [j, o.title, o.description, x, o.id]);
|
2167
2202
|
let be = p.useCallback(() => {
|
2168
|
-
X(!0), Pe(pe.current),
|
2203
|
+
X(!0), Pe(pe.current), x((S) => S.filter((L) => L.toastId !== o.id)), setTimeout(() => {
|
2169
2204
|
R(o);
|
2170
2205
|
}, ra);
|
2171
|
-
}, [o, R,
|
2206
|
+
}, [o, R, x, pe]);
|
2172
2207
|
p.useEffect(() => {
|
2173
|
-
if (o.promise &&
|
2208
|
+
if (o.promise && se === "loading" || o.duration === 1 / 0 || o.type === "loading") return;
|
2174
2209
|
let S, L = Be;
|
2175
|
-
return _ ||
|
2210
|
+
return _ || k || I && Xe ? (() => {
|
2176
2211
|
if (Ue.current < _e.current) {
|
2177
2212
|
let A = (/* @__PURE__ */ new Date()).getTime() - _e.current;
|
2178
2213
|
L = L - A;
|
@@ -2182,46 +2217,46 @@ var oa = (e) => {
|
|
2182
2217
|
var A;
|
2183
2218
|
(A = o.onAutoClose) == null || A.call(o, o), be();
|
2184
2219
|
}, L)), () => clearTimeout(S);
|
2185
|
-
}, [_,
|
2186
|
-
let S =
|
2220
|
+
}, [_, k, Q, o, Be, be, o.promise, se, I, Xe]), p.useEffect(() => {
|
2221
|
+
let S = me.current;
|
2187
2222
|
if (S) {
|
2188
2223
|
let L = S.getBoundingClientRect().height;
|
2189
|
-
return We(L),
|
2224
|
+
return We(L), x((A) => [{ toastId: o.id, height: L, position: o.position }, ...A]), () => x((A) => A.filter((oe) => oe.toastId !== o.id));
|
2190
2225
|
}
|
2191
|
-
}, [
|
2226
|
+
}, [x, o.id]), p.useEffect(() => {
|
2192
2227
|
o.delete && be();
|
2193
2228
|
}, [be, o.delete]);
|
2194
2229
|
function rt() {
|
2195
|
-
return q != null && q.loading ? p.createElement("div", { className: "sonner-loader", "data-visible":
|
2230
|
+
return q != null && q.loading ? p.createElement("div", { className: "sonner-loader", "data-visible": se === "loading" }, q.loading) : K ? p.createElement("div", { className: "sonner-loader", "data-visible": se === "loading" }, K) : p.createElement(Mn, { visible: se === "loading" });
|
2196
2231
|
}
|
2197
|
-
return p.createElement("li", { "aria-live": o.important ? "assertive" : "polite", "aria-atomic": "true", role: "status", tabIndex: 0, ref:
|
2198
|
-
Me || !Ne || (Te.current = /* @__PURE__ */ new Date(), Pe(pe.current), S.target.setPointerCapture(S.pointerId), S.target.tagName !== "BUTTON" && (
|
2232
|
+
return p.createElement("li", { "aria-live": o.important ? "assertive" : "polite", "aria-atomic": "true", role: "status", tabIndex: 0, ref: me, className: T(B, tt, $ == null ? void 0 : $.toast, (t = o == null ? void 0 : o.classNames) == null ? void 0 : t.toast, $ == null ? void 0 : $.default, $ == null ? void 0 : $[se], (a = o == null ? void 0 : o.classNames) == null ? void 0 : a[se]), "data-sonner-toast": "", "data-rich-colors": (s = o.richColors) != null ? s : V, "data-styled": !(o.jsx || o.unstyled || y), "data-mounted": j, "data-promise": !!o.promise, "data-removed": le, "data-visible": He, "data-y-position": ze, "data-x-position": De, "data-index": C, "data-front": Ye, "data-swiping": xe, "data-dismissible": Ne, "data-type": se, "data-invert": at, "data-swipe-out": G, "data-expanded": !!(_ || Q && j), style: { "--index": C, "--toasts-before": C, "--z-index": O.length - C, "--offset": `${le ? ke : pe.current}px`, "--initial-height": Q ? "auto" : `${et}px`, ...H, ...o.style }, onPointerDown: (S) => {
|
2233
|
+
Me || !Ne || (Te.current = /* @__PURE__ */ new Date(), Pe(pe.current), S.target.setPointerCapture(S.pointerId), S.target.tagName !== "BUTTON" && (he(!0), we.current = { x: S.clientX, y: S.clientY }));
|
2199
2234
|
}, onPointerUp: () => {
|
2200
|
-
var S, L, A,
|
2235
|
+
var S, L, A, oe;
|
2201
2236
|
if (G || !Ne) return;
|
2202
2237
|
we.current = null;
|
2203
|
-
let ue = Number(((S =
|
2238
|
+
let ue = Number(((S = me.current) == null ? void 0 : S.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0), je = (/* @__PURE__ */ new Date()).getTime() - ((L = Te.current) == null ? void 0 : L.getTime()), Ge = Math.abs(ue) / je;
|
2204
2239
|
if (Math.abs(ue) >= aa || Ge > 0.11) {
|
2205
|
-
Pe(pe.current), (A = o.onDismiss) == null || A.call(o, o), be(),
|
2240
|
+
Pe(pe.current), (A = o.onDismiss) == null || A.call(o, o), be(), re(!0);
|
2206
2241
|
return;
|
2207
2242
|
}
|
2208
|
-
(
|
2243
|
+
(oe = me.current) == null || oe.style.setProperty("--swipe-amount", "0px"), he(!1);
|
2209
2244
|
}, onPointerMove: (S) => {
|
2210
2245
|
var L;
|
2211
2246
|
if (!we.current || !Ne) return;
|
2212
|
-
let A = S.clientY - we.current.y,
|
2213
|
-
Math.abs(ue) > je ? (L =
|
2247
|
+
let A = S.clientY - we.current.y, oe = S.clientX - we.current.x, ue = (ze === "top" ? Math.min : Math.max)(0, A), je = S.pointerType === "touch" ? 10 : 2;
|
2248
|
+
Math.abs(ue) > je ? (L = me.current) == null || L.style.setProperty("--swipe-amount", `${A}px`) : Math.abs(oe) > je && (we.current = null);
|
2214
2249
|
} }, nt && !o.jsx ? p.createElement("button", { "aria-label": ie, "data-disabled": Me, "data-close-button": !0, onClick: Me || !Ne ? () => {
|
2215
2250
|
} : () => {
|
2216
2251
|
var S;
|
2217
2252
|
be(), (S = o.onDismiss) == null || S.call(o, o);
|
2218
|
-
}, className: T($ == null ? void 0 : $.closeButton, (i = o == null ? void 0 : o.classNames) == null ? void 0 : i.closeButton) }, p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, p.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), p.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))) : null, o.jsx || p.isValidElement(o.title) ? o.jsx || o.title : p.createElement(p.Fragment, null,
|
2253
|
+
}, className: T($ == null ? void 0 : $.closeButton, (i = o == null ? void 0 : o.classNames) == null ? void 0 : i.closeButton) }, p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, p.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), p.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))) : null, o.jsx || p.isValidElement(o.title) ? o.jsx || o.title : p.createElement(p.Fragment, null, se || o.icon || o.promise ? p.createElement("div", { "data-icon": "", className: T($ == null ? void 0 : $.icon, (l = o == null ? void 0 : o.classNames) == null ? void 0 : l.icon) }, o.promise || o.type === "loading" && !o.icon ? o.icon || rt() : null, o.type !== "loading" ? o.icon || (q == null ? void 0 : q[se]) || zn(se) : null) : null, p.createElement("div", { "data-content": "", className: T($ == null ? void 0 : $.content, (d = o == null ? void 0 : o.classNames) == null ? void 0 : d.content) }, p.createElement("div", { "data-title": "", className: T($ == null ? void 0 : $.title, (c = o == null ? void 0 : o.classNames) == null ? void 0 : c.title) }, o.title), o.description ? p.createElement("div", { "data-description": "", className: T(te, Oe, $ == null ? void 0 : $.description, (u = o == null ? void 0 : o.classNames) == null ? void 0 : u.description) }, o.description) : null), p.isValidElement(o.cancel) ? o.cancel : o.cancel && qe(o.cancel) ? p.createElement("button", { "data-button": !0, "data-cancel": !0, style: o.cancelButtonStyle || W, onClick: (S) => {
|
2219
2254
|
var L, A;
|
2220
2255
|
qe(o.cancel) && Ne && ((A = (L = o.cancel).onClick) == null || A.call(L, S), be());
|
2221
|
-
}, className: T($ == null ? void 0 : $.cancelButton, (
|
2256
|
+
}, className: T($ == null ? void 0 : $.cancelButton, (m = o == null ? void 0 : o.classNames) == null ? void 0 : m.cancelButton) }, o.cancel.label) : null, p.isValidElement(o.action) ? o.action : o.action && qe(o.action) ? p.createElement("button", { "data-button": !0, "data-action": !0, style: o.actionButtonStyle || J, onClick: (S) => {
|
2222
2257
|
var L, A;
|
2223
2258
|
qe(o.action) && (S.defaultPrevented || ((A = (L = o.action).onClick) == null || A.call(L, S), be()));
|
2224
|
-
}, className: T($ == null ? void 0 : $.actionButton, (
|
2259
|
+
}, className: T($ == null ? void 0 : $.actionButton, (h = o == null ? void 0 : o.classNames) == null ? void 0 : h.actionButton) }, o.action.label) : null));
|
2225
2260
|
};
|
2226
2261
|
function Et() {
|
2227
2262
|
if (typeof window > "u" || typeof document > "u") return "ltr";
|
@@ -2229,7 +2264,7 @@ function Et() {
|
|
2229
2264
|
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
2230
2265
|
}
|
2231
2266
|
var ia = (e) => {
|
2232
|
-
let { invert: t, position: a = "bottom-right", hotkey: s = ["altKey", "KeyT"], expand: i, closeButton: l, className: d, offset: c, theme: u = "light", richColors:
|
2267
|
+
let { invert: t, position: a = "bottom-right", hotkey: s = ["altKey", "KeyT"], expand: i, closeButton: l, className: d, offset: c, theme: u = "light", richColors: m, duration: h, style: v, visibleToasts: o = Zn, toastOptions: y, dir: k = Et(), gap: x = na, loadingIcon: w, icons: b, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: O, cn: _ = sa } = e, [R, V] = p.useState([]), D = p.useMemo(() => Array.from(new Set([a].concat(R.filter((I) => I.position).map((I) => I.position)))), [R, a]), [H, W] = p.useState([]), [J, B] = p.useState(!1), [te, E] = p.useState(!1), [U, M] = p.useState(u !== "system" ? u : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), K = p.useRef(null), Q = s.join("+").replace(/Key/g, "").replace(/Digit/g, ""), $ = p.useRef(null), q = p.useRef(!1), ie = p.useCallback((I) => {
|
2233
2268
|
var T;
|
2234
2269
|
(T = R.find((j) => j.id === I.id)) != null && T.delete || fe.dismiss(I.id), V((j) => j.filter(({ id: Z }) => Z !== I.id));
|
2235
2270
|
}, [R]);
|
@@ -2266,10 +2301,10 @@ var ia = (e) => {
|
|
2266
2301
|
if (K.current) return () => {
|
2267
2302
|
$.current && ($.current.focus({ preventScroll: !0 }), $.current = null, q.current = !1);
|
2268
2303
|
};
|
2269
|
-
}, [K.current]), R.length ? p.createElement("section", { "aria-label": `${
|
2304
|
+
}, [K.current]), R.length ? p.createElement("section", { "aria-label": `${C} ${Q}`, tabIndex: -1 }, D.map((I, T) => {
|
2270
2305
|
var j;
|
2271
2306
|
let [Z, le] = I.split("-");
|
2272
|
-
return p.createElement("ol", { key: I, dir:
|
2307
|
+
return p.createElement("ol", { key: I, dir: k === "auto" ? Et() : k, tabIndex: -1, ref: K, className: d, "data-sonner-toaster": !0, "data-theme": U, "data-y-position": Z, "data-x-position": le, style: { "--front-toast-height": `${((j = H[0]) == null ? void 0 : j.height) || 0}px`, "--offset": typeof c == "number" ? `${c}px` : c || Qn, "--width": `${ta}px`, "--gap": `${x}px`, ...v }, onBlur: (X) => {
|
2273
2308
|
q.current && !X.currentTarget.contains(X.relatedTarget) && (q.current = !1, $.current && ($.current.focus({ preventScroll: !0 }), $.current = null));
|
2274
2309
|
}, onFocus: (X) => {
|
2275
2310
|
X.target instanceof HTMLElement && X.target.dataset.dismissible === "false" || q.current || (q.current = !0, $.current = X.relatedTarget);
|
@@ -2278,12 +2313,12 @@ var ia = (e) => {
|
|
2278
2313
|
}, onPointerDown: (X) => {
|
2279
2314
|
X.target instanceof HTMLElement && X.target.dataset.dismissible === "false" || E(!0);
|
2280
2315
|
}, onPointerUp: () => E(!1) }, R.filter((X) => !X.position && T === 0 || X.position === I).map((X, xe) => {
|
2281
|
-
var
|
2282
|
-
return p.createElement(oa, { key: X.id, icons: b, index: xe, toast: X, defaultRichColors:
|
2316
|
+
var he, G;
|
2317
|
+
return p.createElement(oa, { key: X.id, icons: b, index: xe, toast: X, defaultRichColors: m, duration: (he = y == null ? void 0 : y.duration) != null ? he : h, className: y == null ? void 0 : y.className, descriptionClassName: y == null ? void 0 : y.descriptionClassName, invert: t, visibleToasts: o, closeButton: (G = y == null ? void 0 : y.closeButton) != null ? G : l, interacting: te, position: I, style: y == null ? void 0 : y.style, unstyled: y == null ? void 0 : y.unstyled, classNames: y == null ? void 0 : y.classNames, cancelButtonStyle: y == null ? void 0 : y.cancelButtonStyle, actionButtonStyle: y == null ? void 0 : y.actionButtonStyle, removeToast: ie, toasts: R.filter((re) => re.position == X.position), heights: H.filter((re) => re.position == X.position), setHeights: W, expandByDefault: i, gap: x, loadingIcon: w, expanded: J, pauseWhenPageIsHidden: O, cn: _ });
|
2283
2318
|
}));
|
2284
2319
|
})) : null;
|
2285
2320
|
};
|
2286
|
-
function
|
2321
|
+
function nr({ children: e }) {
|
2287
2322
|
function t(a) {
|
2288
2323
|
Jn.custom((s) => /* @__PURE__ */ r.jsx(On, { ...a }));
|
2289
2324
|
}
|
@@ -2293,50 +2328,51 @@ function tr({ children: e }) {
|
|
2293
2328
|
] });
|
2294
2329
|
}
|
2295
2330
|
export {
|
2296
|
-
|
2331
|
+
ma as AlertContainer,
|
2297
2332
|
pa as AlertContent,
|
2298
2333
|
ga as AlertDescription,
|
2299
2334
|
va as AlertIcon,
|
2300
2335
|
pn as AlertTitle,
|
2301
2336
|
ba as Badge,
|
2302
|
-
|
2303
|
-
|
2337
|
+
Ma as BreadcrumbContainer,
|
2338
|
+
La as BreadcrumbLink,
|
2304
2339
|
Sa as Button,
|
2305
2340
|
ya as Card,
|
2306
2341
|
Ra as Checkbox,
|
2307
2342
|
xa as Divider,
|
2308
|
-
|
2309
|
-
|
2310
|
-
|
2343
|
+
Ya as DrawerContainer,
|
2344
|
+
Ha as DrawerHeader,
|
2345
|
+
er as DrawerProvider,
|
2311
2346
|
Ta as FormController,
|
2312
2347
|
$a as FormError,
|
2313
2348
|
Pa as FormLabel,
|
2314
2349
|
Ia as IconButton,
|
2315
2350
|
_a as Input,
|
2316
|
-
|
2317
|
-
|
2318
|
-
|
2319
|
-
|
2320
|
-
|
2321
|
-
|
2351
|
+
Ua as ModalContainer,
|
2352
|
+
Ka as ModalFooter,
|
2353
|
+
Xa as ModalHeader,
|
2354
|
+
tr as ModalProvider,
|
2355
|
+
Aa as Pagination,
|
2356
|
+
Ga as Popover,
|
2322
2357
|
Oa as RadioBox,
|
2323
2358
|
Fa as RadioGroup,
|
2324
2359
|
Ba as Select,
|
2325
2360
|
wa as Skeleton,
|
2326
|
-
|
2327
|
-
|
2361
|
+
za as Switch,
|
2362
|
+
Wa as TabButton,
|
2363
|
+
Va as TabContainer,
|
2328
2364
|
Ca as TableBody,
|
2329
2365
|
ka as TableCaption,
|
2330
2366
|
Na as TableContainer,
|
2331
2367
|
ja as TableFooter,
|
2332
2368
|
Ea as TableHeader,
|
2333
|
-
|
2369
|
+
Da as Textarea,
|
2334
2370
|
On as Toast,
|
2335
|
-
|
2336
|
-
|
2337
|
-
|
2338
|
-
|
2339
|
-
|
2371
|
+
nr as ToastProvider,
|
2372
|
+
Ja as Tooltip,
|
2373
|
+
qa as useAutomation,
|
2374
|
+
Za as useDrawer,
|
2375
|
+
Qa as useModal,
|
2340
2376
|
_n as useScopedParams,
|
2341
2377
|
Bn as useToast
|
2342
2378
|
};
|