@arkyn/components 1.3.64 → 1.3.66
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/bundle.js +157 -157
- package/dist/bundle.umd.cjs +6 -6
- package/dist/components/Input/CurrencyInput/index.js +1 -1
- package/dist/services/normalizeValue.js +3 -3
- package/package.json +1 -1
- package/src/components/Input/CurrencyInput/index.tsx +1 -1
- package/src/services/normalizeValue.ts +3 -3
package/dist/bundle.js
CHANGED
|
@@ -19,11 +19,11 @@ function cn() {
|
|
|
19
19
|
if (xt) return Be;
|
|
20
20
|
xt = 1;
|
|
21
21
|
var e = p, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), o = 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 f(c, d,
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
for (
|
|
26
|
-
if (c && c.defaultProps) for (
|
|
22
|
+
function f(c, d, m) {
|
|
23
|
+
var h, b = {}, a = null, v = null;
|
|
24
|
+
m !== void 0 && (a = "" + m), d.key !== void 0 && (a = "" + d.key), d.ref !== void 0 && (v = d.ref);
|
|
25
|
+
for (h in d) o.call(d, h) && !l.hasOwnProperty(h) && (b[h] = d[h]);
|
|
26
|
+
if (c && c.defaultProps) for (h in d = c.defaultProps, d) b[h] === void 0 && (b[h] = d[h]);
|
|
27
27
|
return { $$typeof: n, type: c, key: a, ref: v, props: b, _owner: i.current };
|
|
28
28
|
}
|
|
29
29
|
return Be.Fragment = r, Be.jsx = f, Be.jsxs = f, Be;
|
|
@@ -41,7 +41,7 @@ var Ae = {};
|
|
|
41
41
|
var wt;
|
|
42
42
|
function un() {
|
|
43
43
|
return wt || (wt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
44
|
-
var e = p, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"),
|
|
44
|
+
var e = p, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), a = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), j = Symbol.iterator, x = "@@iterator";
|
|
45
45
|
function C(t) {
|
|
46
46
|
if (t === null || typeof t != "object")
|
|
47
47
|
return null;
|
|
@@ -69,7 +69,7 @@ function un() {
|
|
|
69
69
|
var z = !1, P = !1, V = !1, M = !1, J = !1, U;
|
|
70
70
|
U = Symbol.for("react.module.reference");
|
|
71
71
|
function H(t) {
|
|
72
|
-
return !!(typeof t == "string" || typeof t == "function" || t === o || t === l || J || t === i || t ===
|
|
72
|
+
return !!(typeof t == "string" || typeof t == "function" || t === o || t === l || J || t === i || t === m || t === h || M || t === v || z || P || V || typeof t == "object" && t !== null && (t.$$typeof === a || t.$$typeof === b || t.$$typeof === f || t.$$typeof === c || t.$$typeof === d || // 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.
|
|
@@ -101,9 +101,9 @@ function un() {
|
|
|
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 t == "object")
|
|
@@ -193,7 +193,7 @@ function un() {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
var B = y.ReactCurrentDispatcher, be;
|
|
196
|
-
function
|
|
196
|
+
function he(t, u, g) {
|
|
197
197
|
{
|
|
198
198
|
if (be === void 0)
|
|
199
199
|
try {
|
|
@@ -279,7 +279,7 @@ function un() {
|
|
|
279
279
|
} finally {
|
|
280
280
|
G = !1, B.current = Y, re(), Error.prepareStackTrace = F;
|
|
281
281
|
}
|
|
282
|
-
var Ie = t ? t.displayName || t.name : "", Ee = Ie ?
|
|
282
|
+
var Ie = t ? t.displayName || t.name : "", Ee = Ie ? he(Ie) : "";
|
|
283
283
|
return typeof t == "function" && ae.set(t, Ee), Ee;
|
|
284
284
|
}
|
|
285
285
|
function Qe(t, u, g) {
|
|
@@ -295,12 +295,12 @@ function un() {
|
|
|
295
295
|
if (typeof t == "function")
|
|
296
296
|
return $e(t, Ve(t));
|
|
297
297
|
if (typeof t == "string")
|
|
298
|
-
return
|
|
298
|
+
return he(t);
|
|
299
299
|
switch (t) {
|
|
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 t == "object")
|
|
306
306
|
switch (t.$$typeof) {
|
|
@@ -318,7 +318,7 @@ function un() {
|
|
|
318
318
|
}
|
|
319
319
|
return "";
|
|
320
320
|
}
|
|
321
|
-
var
|
|
321
|
+
var me = Object.prototype.hasOwnProperty, Ye = {}, Ue = y.ReactDebugCurrentFrame;
|
|
322
322
|
function se(t) {
|
|
323
323
|
if (t) {
|
|
324
324
|
var u = t._owner, g = je(t.type, t._source, u ? u.type : null);
|
|
@@ -328,7 +328,7 @@ function un() {
|
|
|
328
328
|
}
|
|
329
329
|
function ke(t, u, g, k, F) {
|
|
330
330
|
{
|
|
331
|
-
var Y = Function.call.bind(
|
|
331
|
+
var Y = Function.call.bind(me);
|
|
332
332
|
for (var I in t)
|
|
333
333
|
if (Y(t, I)) {
|
|
334
334
|
var T = void 0;
|
|
@@ -377,7 +377,7 @@ function un() {
|
|
|
377
377
|
}, ye, De, Me;
|
|
378
378
|
Me = {};
|
|
379
379
|
function Ke(t) {
|
|
380
|
-
if (
|
|
380
|
+
if (me.call(t, "ref")) {
|
|
381
381
|
var u = Object.getOwnPropertyDescriptor(t, "ref").get;
|
|
382
382
|
if (u && u.isReactWarning)
|
|
383
383
|
return !1;
|
|
@@ -385,7 +385,7 @@ function un() {
|
|
|
385
385
|
return t.ref !== void 0;
|
|
386
386
|
}
|
|
387
387
|
function Xe(t) {
|
|
388
|
-
if (
|
|
388
|
+
if (me.call(t, "key")) {
|
|
389
389
|
var u = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
390
390
|
if (u && u.isReactWarning)
|
|
391
391
|
return !1;
|
|
@@ -454,7 +454,7 @@ function un() {
|
|
|
454
454
|
var Y, I = {}, T = null, ie = null;
|
|
455
455
|
g !== void 0 && (Te(g), T = "" + g), Xe(u) && (Te(u.key), T = "" + u.key), Ke(u) && (ie = u.ref, nt(u, F));
|
|
456
456
|
for (Y in u)
|
|
457
|
-
|
|
457
|
+
me.call(u, Y) && !He.hasOwnProperty(Y) && (I[Y] = u[Y]);
|
|
458
458
|
if (t && t.defaultProps) {
|
|
459
459
|
var Z = t.defaultProps;
|
|
460
460
|
for (Y in Z)
|
|
@@ -503,7 +503,7 @@ Check your code at ` + u + ":" + g + ".";
|
|
|
503
503
|
return "";
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
var
|
|
506
|
+
var ht = {};
|
|
507
507
|
function At(t) {
|
|
508
508
|
{
|
|
509
509
|
var u = Je();
|
|
@@ -516,15 +516,15 @@ Check the top-level render call using <` + g + ">.");
|
|
|
516
516
|
return u;
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function mt(t, u) {
|
|
520
520
|
{
|
|
521
521
|
if (!t._store || t._store.validated || t.key != null)
|
|
522
522
|
return;
|
|
523
523
|
t._store.validated = !0;
|
|
524
524
|
var g = At(u);
|
|
525
|
-
if (
|
|
525
|
+
if (ht[g])
|
|
526
526
|
return;
|
|
527
|
-
|
|
527
|
+
ht[g] = !0;
|
|
528
528
|
var k = "";
|
|
529
529
|
t && t._owner && t._owner !== A.current && (k = " It was passed a child from " + _(t._owner.type) + "."), oe(t), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, k), oe(null);
|
|
530
530
|
}
|
|
@@ -536,7 +536,7 @@ Check the top-level render call using <` + g + ">.");
|
|
|
536
536
|
if (ze(t))
|
|
537
537
|
for (var g = 0; g < t.length; g++) {
|
|
538
538
|
var k = t[g];
|
|
539
|
-
Ne(k) &&
|
|
539
|
+
Ne(k) && mt(k, u);
|
|
540
540
|
}
|
|
541
541
|
else if (Ne(t))
|
|
542
542
|
t._store && (t._store.validated = !0);
|
|
@@ -544,7 +544,7 @@ Check the top-level render call using <` + g + ">.");
|
|
|
544
544
|
var F = C(t);
|
|
545
545
|
if (typeof F == "function" && F !== t.entries)
|
|
546
546
|
for (var Y = F.call(t), I; !(I = Y.next()).done; )
|
|
547
|
-
Ne(I.value) &&
|
|
547
|
+
Ne(I.value) && mt(I.value, u);
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
}
|
|
@@ -613,7 +613,7 @@ Check the top-level render call using <` + g + ">.");
|
|
|
613
613
|
else
|
|
614
614
|
pt(ge, t);
|
|
615
615
|
}
|
|
616
|
-
if (
|
|
616
|
+
if (me.call(u, "key")) {
|
|
617
617
|
var Ee = _(t), ue = Object.keys(u).filter(function(Jt) {
|
|
618
618
|
return Jt !== "key";
|
|
619
619
|
}), at = ue.length > 0 ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
@@ -654,7 +654,7 @@ function dn(e, n, r) {
|
|
|
654
654
|
function fn(e, n) {
|
|
655
655
|
return e <= 1 ? [] : Pt(e - 1 - n, e - 1);
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function hn(e, n, r) {
|
|
658
658
|
if (!e) return /* @__PURE__ */ s.jsx(s.Fragment, {});
|
|
659
659
|
if (typeof e == "string") return /* @__PURE__ */ s.jsx("p", { className: r, children: e });
|
|
660
660
|
const o = e;
|
|
@@ -670,11 +670,11 @@ function or(e) {
|
|
|
670
670
|
className: f = "",
|
|
671
671
|
children: c,
|
|
672
672
|
...d
|
|
673
|
-
} = e,
|
|
673
|
+
} = e, h = { md: 12, lg: 14 }[o], b = `arkyn_badge ${n} ${r} ${o} ${f}`;
|
|
674
674
|
return /* @__PURE__ */ s.jsxs("div", { className: b.trim(), ...d, children: [
|
|
675
|
-
Ze(
|
|
675
|
+
Ze(h, i),
|
|
676
676
|
c,
|
|
677
|
-
Ze(
|
|
677
|
+
Ze(h, i)
|
|
678
678
|
] });
|
|
679
679
|
}
|
|
680
680
|
function ir(e) {
|
|
@@ -708,14 +708,14 @@ function fr(e) {
|
|
|
708
708
|
/* @__PURE__ */ s.jsx("tr", { children: /* @__PURE__ */ s.jsx("th", { colSpan: 100, children: /* @__PURE__ */ s.jsx("div", { className: "arkyn_table_footer-content", children: r }) }) })
|
|
709
709
|
] });
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function hr(e) {
|
|
712
712
|
const { className: n, children: r, ...o } = e, i = `arkyn_table_header ${n}`;
|
|
713
713
|
return /* @__PURE__ */ s.jsxs("thead", { className: i.trim(), ...o, children: [
|
|
714
714
|
/* @__PURE__ */ s.jsx("tr", { children: r }),
|
|
715
715
|
/* @__PURE__ */ s.jsx("tr", { className: "spacing-row" })
|
|
716
716
|
] });
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function mr(e) {
|
|
719
719
|
const {
|
|
720
720
|
isLoading: n = !1,
|
|
721
721
|
scheme: r = "primary",
|
|
@@ -725,10 +725,10 @@ function hr(e) {
|
|
|
725
725
|
leftIcon: f,
|
|
726
726
|
rightIcon: c,
|
|
727
727
|
disabled: d,
|
|
728
|
-
className:
|
|
729
|
-
children:
|
|
728
|
+
className: m = "",
|
|
729
|
+
children: h,
|
|
730
730
|
...b
|
|
731
|
-
} = e, v = { xs: 12, sm: 16, md: 20, lg: 24 }[l], j = `arkyn_button loading_text_${!!i} ${o} ${r} ${l} loading_${n} ${
|
|
731
|
+
} = e, v = { xs: 12, sm: 16, md: 20, lg: 24 }[l], j = `arkyn_button loading_text_${!!i} ${o} ${r} ${l} loading_${n} ${m}`;
|
|
732
732
|
return /* @__PURE__ */ s.jsxs("button", { className: j, disabled: d || n, ...b, children: [
|
|
733
733
|
/* @__PURE__ */ s.jsxs("div", { className: "arkyn_button-spinner", children: [
|
|
734
734
|
/* @__PURE__ */ s.jsx(Re, { size: v, strokeWidth: 2.5 }),
|
|
@@ -736,16 +736,16 @@ function hr(e) {
|
|
|
736
736
|
] }),
|
|
737
737
|
/* @__PURE__ */ s.jsxs("div", { className: "arkyn_button-content", children: [
|
|
738
738
|
Ze(v, f),
|
|
739
|
-
|
|
739
|
+
h,
|
|
740
740
|
Ze(v, c)
|
|
741
741
|
] })
|
|
742
742
|
] });
|
|
743
743
|
}
|
|
744
744
|
const Tt = Oe({});
|
|
745
745
|
function pr(e) {
|
|
746
|
-
var
|
|
747
|
-
const n = St(), { children: r, className: o, ...i } = e, l = _e(null), f = ((
|
|
748
|
-
return /* @__PURE__ */ s.jsx(Tt.Provider, { value: { error: c, id: d, inputRef: l }, children: /* @__PURE__ */ s.jsx("section", { className:
|
|
746
|
+
var h, b;
|
|
747
|
+
const n = St(), { children: r, className: o, ...i } = e, l = _e(null), f = ((h = l.current) == null ? void 0 : h.name) || "", c = ((b = n == null ? void 0 : n.fieldErrors) == null ? void 0 : b[f]) || null, d = qt(), m = `arkyn_form_controller ${o}`;
|
|
748
|
+
return /* @__PURE__ */ s.jsx(Tt.Provider, { value: { error: c, id: d, inputRef: l }, children: /* @__PURE__ */ s.jsx("section", { className: m.trim(), ...i, children: r }) });
|
|
749
749
|
}
|
|
750
750
|
function xe() {
|
|
751
751
|
return Se(Tt);
|
|
@@ -760,8 +760,8 @@ function gr(e) {
|
|
|
760
760
|
checked: f = null,
|
|
761
761
|
onCheck: c,
|
|
762
762
|
value: d,
|
|
763
|
-
...
|
|
764
|
-
} = e, { id:
|
|
763
|
+
...m
|
|
764
|
+
} = e, { id: h, inputRef: b, error: a } = xe(), v = i || !!a, [j, x] = de(l || !1), C = typeof f == "boolean" ? f : j, y = `arkyn_checkbox ${o} ${v ? "error" : ""} ${C ? "checked" : ""} ${r}`;
|
|
765
765
|
function w() {
|
|
766
766
|
const D = j;
|
|
767
767
|
x(!D), c && c(D ? "" : d || "checked");
|
|
@@ -770,10 +770,10 @@ function gr(e) {
|
|
|
770
770
|
"button",
|
|
771
771
|
{
|
|
772
772
|
type: "button",
|
|
773
|
-
id:
|
|
773
|
+
id: h,
|
|
774
774
|
className: y,
|
|
775
775
|
onClick: w,
|
|
776
|
-
...
|
|
776
|
+
...m,
|
|
777
777
|
children: [
|
|
778
778
|
/* @__PURE__ */ s.jsx(
|
|
779
779
|
"input",
|
|
@@ -811,16 +811,16 @@ function yr(e) {
|
|
|
811
811
|
disabled: f,
|
|
812
812
|
className: c = "",
|
|
813
813
|
...d
|
|
814
|
-
} = e,
|
|
814
|
+
} = e, m = { xs: 12, sm: 16, md: 20, lg: 24 }, h = `arkyn_icon_button ${o} ${r} ${i} loading_${n} ${c}`;
|
|
815
815
|
return /* @__PURE__ */ s.jsxs(
|
|
816
816
|
"button",
|
|
817
817
|
{
|
|
818
818
|
disabled: f || n,
|
|
819
|
-
className:
|
|
819
|
+
className: h.trim(),
|
|
820
820
|
...d,
|
|
821
821
|
children: [
|
|
822
|
-
/* @__PURE__ */ s.jsx("div", { className: "arkyn_icon_button-spinner", children: /* @__PURE__ */ s.jsx(Re, { size:
|
|
823
|
-
/* @__PURE__ */ s.jsx("div", { className: "arkyn_icon_button-content", children: /* @__PURE__ */ s.jsx(l, { size:
|
|
822
|
+
/* @__PURE__ */ s.jsx("div", { className: "arkyn_icon_button-spinner", children: /* @__PURE__ */ s.jsx(Re, { size: m[i], strokeWidth: 2.5 }) }),
|
|
823
|
+
/* @__PURE__ */ s.jsx("div", { className: "arkyn_icon_button-content", children: /* @__PURE__ */ s.jsx(l, { size: m[i], strokeWidth: 2.5 }) })
|
|
824
824
|
]
|
|
825
825
|
}
|
|
826
826
|
);
|
|
@@ -847,7 +847,7 @@ const dt = {
|
|
|
847
847
|
CPF: "999.999.999-999",
|
|
848
848
|
CNPJ: "99.999.999/9999-99"
|
|
849
849
|
}, zt = ut(dt.CNPJ).length;
|
|
850
|
-
function
|
|
850
|
+
function mn(e, n) {
|
|
851
851
|
const {
|
|
852
852
|
isLoading: r,
|
|
853
853
|
isError: o,
|
|
@@ -856,8 +856,8 @@ function hn(e, n) {
|
|
|
856
856
|
variant: f = "solid",
|
|
857
857
|
prefix: c,
|
|
858
858
|
sufix: d,
|
|
859
|
-
leftIcon:
|
|
860
|
-
rightIcon:
|
|
859
|
+
leftIcon: m,
|
|
860
|
+
rightIcon: h,
|
|
861
861
|
disabled: b,
|
|
862
862
|
defaultValue: a,
|
|
863
863
|
readOnly: v,
|
|
@@ -874,14 +874,14 @@ function hn(e, n) {
|
|
|
874
874
|
if (!(L.length > zt))
|
|
875
875
|
return L = It(L, dt[X]), L;
|
|
876
876
|
}
|
|
877
|
-
const P =
|
|
877
|
+
const P = h ? "right" : "left", O = `arkyn_input ${c ? "hasPrefix" : ""} ${d ? "hasSufix" : ""} ${f} ${i} ${b || v || r ? "opacity" : ""} ${o ? "errored" : ""} ${n ? "focused" : ""} ${l}`, _ = { md: 20, lg: 20 }[i];
|
|
878
878
|
return {
|
|
879
879
|
isLoading: r,
|
|
880
880
|
className: O,
|
|
881
881
|
prefix: Ce(c, _, "prefix"),
|
|
882
882
|
sufix: Ce(d, _, "sufix"),
|
|
883
|
-
LeftIcon:
|
|
884
|
-
RightIcon:
|
|
883
|
+
LeftIcon: m,
|
|
884
|
+
RightIcon: h,
|
|
885
885
|
defaultValue: z(a || ""),
|
|
886
886
|
disabled: b,
|
|
887
887
|
readOnly: v,
|
|
@@ -898,8 +898,8 @@ function hn(e, n) {
|
|
|
898
898
|
}
|
|
899
899
|
function pn(e) {
|
|
900
900
|
const [n, r] = de(!1), o = _e(null), { inputRef: i, id: l, error: f } = xe(), c = i || o, d = e.isError || !!f, {
|
|
901
|
-
disabled:
|
|
902
|
-
title:
|
|
901
|
+
disabled: m,
|
|
902
|
+
title: h,
|
|
903
903
|
style: b,
|
|
904
904
|
className: a,
|
|
905
905
|
prefix: v,
|
|
@@ -917,9 +917,9 @@ function pn(e) {
|
|
|
917
917
|
value: U,
|
|
918
918
|
defaultValue: H,
|
|
919
919
|
...O
|
|
920
|
-
} =
|
|
920
|
+
} = mn({ ...e, id: l, isError: d }, n), [Q, _] = de(H), K = w && !y, L = V && !y, X = C === "left" && y, ee = C === "right" && y;
|
|
921
921
|
function R() {
|
|
922
|
-
|
|
922
|
+
m || !(c != null && c.current) || (r(!0), c.current.focus());
|
|
923
923
|
}
|
|
924
924
|
function te(E) {
|
|
925
925
|
let $ = ut(E.target.value);
|
|
@@ -935,7 +935,7 @@ function pn(e) {
|
|
|
935
935
|
return /* @__PURE__ */ s.jsxs(
|
|
936
936
|
"section",
|
|
937
937
|
{
|
|
938
|
-
title:
|
|
938
|
+
title: h,
|
|
939
939
|
style: b,
|
|
940
940
|
onClick: R,
|
|
941
941
|
className: a,
|
|
@@ -946,7 +946,7 @@ function pn(e) {
|
|
|
946
946
|
/* @__PURE__ */ s.jsx(
|
|
947
947
|
"input",
|
|
948
948
|
{
|
|
949
|
-
disabled:
|
|
949
|
+
disabled: m || y,
|
|
950
950
|
readOnly: D,
|
|
951
951
|
ref: c,
|
|
952
952
|
value: U || Q,
|
|
@@ -970,8 +970,8 @@ const gn = 3, vn = (e = "pt-BR", n, r = "BRL", o = !0) => new Intl.NumberFormat(
|
|
|
970
970
|
minimumFractionDigits: 2,
|
|
971
971
|
maximumFractionDigits: 2
|
|
972
972
|
}).format(n).slice(o ? gn : 0), qe = 2, kt = (e) => typeof e == "number" ? e : Number(e.toString().replace(/[^0-9-]/g, "")), lt = (e) => {
|
|
973
|
-
let n = e;
|
|
974
|
-
return typeof e == "string" ? (n = kt(e), n % 1 !== 0 && (n = n.toFixed(qe))) : n = Number.isInteger(e) ? Number(e) * 10 ** qe : e.toFixed(qe), kt(n) / 10 ** qe;
|
|
973
|
+
let n = e || 0;
|
|
974
|
+
return typeof e == "string" ? (n = kt(e), n % 1 !== 0 && (n = n == null ? void 0 : n.toFixed(qe))) : n = Number.isInteger(e) ? Number(e) * 10 ** qe : e == null ? void 0 : e.toFixed(qe), kt(n) / 10 ** qe;
|
|
975
975
|
}, Nt = (e, n, r) => {
|
|
976
976
|
if (!n) return [0, ""];
|
|
977
977
|
const o = lt(n), i = vn(e, o, r);
|
|
@@ -986,8 +986,8 @@ function bn(e, n) {
|
|
|
986
986
|
variant: f = "solid",
|
|
987
987
|
prefix: c,
|
|
988
988
|
sufix: d,
|
|
989
|
-
leftIcon:
|
|
990
|
-
rightIcon:
|
|
989
|
+
leftIcon: m,
|
|
990
|
+
rightIcon: h,
|
|
991
991
|
disabled: b,
|
|
992
992
|
readOnly: a,
|
|
993
993
|
onFocus: v,
|
|
@@ -999,14 +999,14 @@ function bn(e, n) {
|
|
|
999
999
|
locale: w = "pt-BR",
|
|
1000
1000
|
currency: D = "BRL",
|
|
1001
1001
|
...z
|
|
1002
|
-
} = e, P =
|
|
1002
|
+
} = e, P = h ? "right" : "left", O = `arkyn_input ${c ? "hasPrefix" : ""} ${d ? "hasSufix" : ""} ${f} ${i} ${b || a || r ? "opacity" : ""} ${o ? "errored" : ""} ${n ? "focused" : ""} ${l}`, _ = { md: 20, lg: 20 }[i];
|
|
1003
1003
|
return {
|
|
1004
1004
|
isLoading: r,
|
|
1005
1005
|
className: O,
|
|
1006
1006
|
prefix: Ce(c, _, "prefix"),
|
|
1007
1007
|
sufix: Ce(d, _, "sufix"),
|
|
1008
|
-
LeftIcon:
|
|
1009
|
-
RightIcon:
|
|
1008
|
+
LeftIcon: m,
|
|
1009
|
+
RightIcon: h,
|
|
1010
1010
|
disabled: b,
|
|
1011
1011
|
locale: w,
|
|
1012
1012
|
currency: D,
|
|
@@ -1024,7 +1024,7 @@ function bn(e, n) {
|
|
|
1024
1024
|
};
|
|
1025
1025
|
}
|
|
1026
1026
|
function yn(e) {
|
|
1027
|
-
const [n, r] = de(!1), [o, i] = de(""), l = _e(null), { inputRef: f, id: c, error: d } = xe(),
|
|
1027
|
+
const [n, r] = de(!1), [o, i] = de("0"), l = _e(null), { inputRef: f, id: c, error: d } = xe(), m = f || l, h = e.isError || !!d, {
|
|
1028
1028
|
disabled: b,
|
|
1029
1029
|
title: a,
|
|
1030
1030
|
style: v,
|
|
@@ -1049,9 +1049,9 @@ function yn(e) {
|
|
|
1049
1049
|
name: X,
|
|
1050
1050
|
defaultValue: ee,
|
|
1051
1051
|
...R
|
|
1052
|
-
} = bn({ ...e, id: c, isError:
|
|
1052
|
+
} = bn({ ...e, id: c, isError: h }, n), te = z && !D, le = J && !D, S = w === "left" && D, E = w === "right" && D;
|
|
1053
1053
|
function $() {
|
|
1054
|
-
b || !(
|
|
1054
|
+
b || !(m != null && m.current) || (r(!0), m.current.focus());
|
|
1055
1055
|
}
|
|
1056
1056
|
function q(G) {
|
|
1057
1057
|
r(!0), V && V(G);
|
|
@@ -1070,7 +1070,7 @@ function yn(e) {
|
|
|
1070
1070
|
G.preventDefault();
|
|
1071
1071
|
const [ae, we] = B(G.target.value);
|
|
1072
1072
|
Q(G, String(ae), String(we));
|
|
1073
|
-
},
|
|
1073
|
+
}, he = (G) => _ && _(G, G.key, G.key);
|
|
1074
1074
|
return st(() => {
|
|
1075
1075
|
const G = H || ee || void 0, [, ae] = Nt(L, G, K);
|
|
1076
1076
|
i(ae);
|
|
@@ -1092,10 +1092,10 @@ function yn(e) {
|
|
|
1092
1092
|
onChange: be,
|
|
1093
1093
|
onBlur: re,
|
|
1094
1094
|
onFocus: q,
|
|
1095
|
-
onKeyUp:
|
|
1095
|
+
onKeyUp: he,
|
|
1096
1096
|
disabled: b || D,
|
|
1097
1097
|
readOnly: P,
|
|
1098
|
-
ref:
|
|
1098
|
+
ref: m,
|
|
1099
1099
|
...R
|
|
1100
1100
|
}
|
|
1101
1101
|
),
|
|
@@ -1116,8 +1116,8 @@ function xn(e, n) {
|
|
|
1116
1116
|
variant: f = "solid",
|
|
1117
1117
|
prefix: c,
|
|
1118
1118
|
sufix: d,
|
|
1119
|
-
leftIcon:
|
|
1120
|
-
rightIcon:
|
|
1119
|
+
leftIcon: m,
|
|
1120
|
+
rightIcon: h,
|
|
1121
1121
|
disabled: b,
|
|
1122
1122
|
readOnly: a,
|
|
1123
1123
|
onFocus: v,
|
|
@@ -1128,14 +1128,14 @@ function xn(e, n) {
|
|
|
1128
1128
|
showMask: w = !1,
|
|
1129
1129
|
type: D,
|
|
1130
1130
|
...z
|
|
1131
|
-
} = e, P =
|
|
1131
|
+
} = e, P = h ? "right" : "left", O = `arkyn_input ${c ? "hasPrefix" : ""} ${d ? "hasSufix" : ""} ${f} ${i} ${b || a || r ? "opacity" : ""} ${o ? "errored" : ""} ${n ? "focused" : ""} ${l}`, _ = { md: 20, lg: 20 }[i];
|
|
1132
1132
|
return {
|
|
1133
1133
|
isLoading: r,
|
|
1134
1134
|
className: O,
|
|
1135
1135
|
prefix: Ce(c, _, "prefix"),
|
|
1136
1136
|
sufix: Ce(d, _, "sufix"),
|
|
1137
|
-
LeftIcon:
|
|
1138
|
-
RightIcon:
|
|
1137
|
+
LeftIcon: m,
|
|
1138
|
+
RightIcon: h,
|
|
1139
1139
|
disabled: b,
|
|
1140
1140
|
readOnly: a,
|
|
1141
1141
|
onFocus: v,
|
|
@@ -1153,8 +1153,8 @@ function xn(e, n) {
|
|
|
1153
1153
|
const wn = Gt((e, n) => /* @__PURE__ */ s.jsx("input", { ref: n, ...e }));
|
|
1154
1154
|
function kn(e) {
|
|
1155
1155
|
const [n, r] = de(!1), o = _e(null), { inputRef: i, id: l, error: f } = xe(), c = i || o, d = e.isError || !!f, {
|
|
1156
|
-
disabled:
|
|
1157
|
-
title:
|
|
1156
|
+
disabled: m,
|
|
1157
|
+
title: h,
|
|
1158
1158
|
style: b,
|
|
1159
1159
|
className: a,
|
|
1160
1160
|
prefix: v,
|
|
@@ -1171,7 +1171,7 @@ function kn(e) {
|
|
|
1171
1171
|
...J
|
|
1172
1172
|
} = xn({ ...e, id: l, isError: d }, n), U = w && !y, H = V && !y, O = C === "left" && y, Q = C === "right" && y;
|
|
1173
1173
|
function _() {
|
|
1174
|
-
|
|
1174
|
+
m || !(c != null && c.current) || (r(!0), c.current.focus());
|
|
1175
1175
|
}
|
|
1176
1176
|
function K(X) {
|
|
1177
1177
|
r(!0), z && z(X);
|
|
@@ -1182,7 +1182,7 @@ function kn(e) {
|
|
|
1182
1182
|
return /* @__PURE__ */ s.jsxs(
|
|
1183
1183
|
"section",
|
|
1184
1184
|
{
|
|
1185
|
-
title:
|
|
1185
|
+
title: h,
|
|
1186
1186
|
style: b,
|
|
1187
1187
|
onClick: _,
|
|
1188
1188
|
className: a,
|
|
@@ -1216,8 +1216,8 @@ function Nn(e, n) {
|
|
|
1216
1216
|
variant: f = "solid",
|
|
1217
1217
|
prefix: c,
|
|
1218
1218
|
sufix: d,
|
|
1219
|
-
leftIcon:
|
|
1220
|
-
rightIcon:
|
|
1219
|
+
leftIcon: m,
|
|
1220
|
+
rightIcon: h,
|
|
1221
1221
|
disabled: b,
|
|
1222
1222
|
readOnly: a,
|
|
1223
1223
|
onFocus: v,
|
|
@@ -1226,14 +1226,14 @@ function Nn(e, n) {
|
|
|
1226
1226
|
style: C,
|
|
1227
1227
|
onChange: y,
|
|
1228
1228
|
...w
|
|
1229
|
-
} = e, D =
|
|
1229
|
+
} = e, D = h ? "right" : "left", U = `arkyn_input ${c ? "hasPrefix" : ""} ${d ? "hasSufix" : ""} ${f} ${i} ${b || a || r ? "opacity" : ""} ${o ? "errored" : ""} ${n ? "focused" : ""} ${l}`, O = { md: 20, lg: 20 }[i];
|
|
1230
1230
|
return {
|
|
1231
1231
|
isLoading: r,
|
|
1232
1232
|
className: U,
|
|
1233
1233
|
prefix: Ce(c, O, "prefix"),
|
|
1234
1234
|
sufix: Ce(d, O, "sufix"),
|
|
1235
|
-
LeftIcon:
|
|
1236
|
-
RightIcon:
|
|
1235
|
+
LeftIcon: m,
|
|
1236
|
+
RightIcon: h,
|
|
1237
1237
|
disabled: b,
|
|
1238
1238
|
readOnly: a,
|
|
1239
1239
|
onFocus: v,
|
|
@@ -1249,8 +1249,8 @@ function Nn(e, n) {
|
|
|
1249
1249
|
}
|
|
1250
1250
|
function Cn(e) {
|
|
1251
1251
|
const [n, r] = de(!1), o = _e(null), { inputRef: i, id: l, error: f } = xe(), c = i || o, d = e.isError || !!f, {
|
|
1252
|
-
disabled:
|
|
1253
|
-
title:
|
|
1252
|
+
disabled: m,
|
|
1253
|
+
title: h,
|
|
1254
1254
|
style: b,
|
|
1255
1255
|
className: a,
|
|
1256
1256
|
prefix: v,
|
|
@@ -1268,7 +1268,7 @@ function Cn(e) {
|
|
|
1268
1268
|
...U
|
|
1269
1269
|
} = Nn({ ...e, id: l, isError: d }, n), H = w && !y, O = V && !y, Q = C === "left" && y, _ = C === "right" && y;
|
|
1270
1270
|
function K() {
|
|
1271
|
-
|
|
1271
|
+
m || !(c != null && c.current) || (r(!0), c.current.focus());
|
|
1272
1272
|
}
|
|
1273
1273
|
function L(ee) {
|
|
1274
1274
|
r(!0), z && z(ee);
|
|
@@ -1288,7 +1288,7 @@ function Cn(e) {
|
|
|
1288
1288
|
) : /* @__PURE__ */ s.jsxs(
|
|
1289
1289
|
"section",
|
|
1290
1290
|
{
|
|
1291
|
-
title:
|
|
1291
|
+
title: h,
|
|
1292
1292
|
style: b,
|
|
1293
1293
|
onClick: K,
|
|
1294
1294
|
className: a,
|
|
@@ -1299,7 +1299,7 @@ function Cn(e) {
|
|
|
1299
1299
|
/* @__PURE__ */ s.jsx(
|
|
1300
1300
|
"input",
|
|
1301
1301
|
{
|
|
1302
|
-
disabled:
|
|
1302
|
+
disabled: m || y,
|
|
1303
1303
|
readOnly: D,
|
|
1304
1304
|
ref: c,
|
|
1305
1305
|
onFocus: L,
|
|
@@ -1327,22 +1327,22 @@ function _n(e, n) {
|
|
|
1327
1327
|
variant: f = "solid",
|
|
1328
1328
|
prefix: c,
|
|
1329
1329
|
leftIcon: d,
|
|
1330
|
-
disabled:
|
|
1331
|
-
readOnly:
|
|
1330
|
+
disabled: m,
|
|
1331
|
+
readOnly: h,
|
|
1332
1332
|
onFocus: b,
|
|
1333
1333
|
onBlur: a,
|
|
1334
1334
|
title: v,
|
|
1335
1335
|
style: j,
|
|
1336
1336
|
closeOnSelect: x = !0,
|
|
1337
1337
|
...C
|
|
1338
|
-
} = e, P = `arkyn_select ${c ? "hasPrefix" : ""} ${f} ${i} ${
|
|
1338
|
+
} = e, P = `arkyn_select ${c ? "hasPrefix" : ""} ${f} ${i} ${m || h || r ? "opacity" : ""} ${o ? "errored" : ""} ${n ? "focused" : ""} ${l}`, M = { md: 20, lg: 20 }[i];
|
|
1339
1339
|
return {
|
|
1340
1340
|
isLoading: r,
|
|
1341
1341
|
className: P,
|
|
1342
|
-
prefix:
|
|
1342
|
+
prefix: hn(c, M, "prefix"),
|
|
1343
1343
|
LeftIcon: d,
|
|
1344
|
-
disabled:
|
|
1345
|
-
readOnly:
|
|
1344
|
+
disabled: m,
|
|
1345
|
+
readOnly: h,
|
|
1346
1346
|
onFocus: b,
|
|
1347
1347
|
onBlur: a,
|
|
1348
1348
|
title: v,
|
|
@@ -1356,8 +1356,8 @@ function _n(e, n) {
|
|
|
1356
1356
|
function wr(e) {
|
|
1357
1357
|
var $;
|
|
1358
1358
|
const [n, r] = de(!1), { inputRef: o, id: i, error: l } = xe(), f = _e(null), c = o || f, d = e.isError || !!l, {
|
|
1359
|
-
disabled:
|
|
1360
|
-
title:
|
|
1359
|
+
disabled: m,
|
|
1360
|
+
title: h,
|
|
1361
1361
|
style: b,
|
|
1362
1362
|
className: a,
|
|
1363
1363
|
prefix: v,
|
|
@@ -1379,7 +1379,7 @@ function wr(e) {
|
|
|
1379
1379
|
..._
|
|
1380
1380
|
} = _n({ ...e, id: i, isError: d }, n), [K, L] = de(w);
|
|
1381
1381
|
function X() {
|
|
1382
|
-
|
|
1382
|
+
m || !(c != null && c.current) || (r(!0), c.current.focus());
|
|
1383
1383
|
}
|
|
1384
1384
|
function ee(q) {
|
|
1385
1385
|
n || (r(!0), z && z(q));
|
|
@@ -1401,7 +1401,7 @@ function wr(e) {
|
|
|
1401
1401
|
/* @__PURE__ */ s.jsxs(
|
|
1402
1402
|
"section",
|
|
1403
1403
|
{
|
|
1404
|
-
title:
|
|
1404
|
+
title: h,
|
|
1405
1405
|
style: b,
|
|
1406
1406
|
onClick: X,
|
|
1407
1407
|
className: `${a} placeholder_dark_${E()}`,
|
|
@@ -1411,7 +1411,7 @@ function wr(e) {
|
|
|
1411
1411
|
/* @__PURE__ */ s.jsx(
|
|
1412
1412
|
"input",
|
|
1413
1413
|
{
|
|
1414
|
-
disabled:
|
|
1414
|
+
disabled: m || x,
|
|
1415
1415
|
readOnly: !0,
|
|
1416
1416
|
placeholder: S || J,
|
|
1417
1417
|
onFocus: ee,
|
|
@@ -1476,8 +1476,8 @@ function kr(e) {
|
|
|
1476
1476
|
onFocus: f,
|
|
1477
1477
|
onBlur: c,
|
|
1478
1478
|
title: d,
|
|
1479
|
-
style:
|
|
1480
|
-
...
|
|
1479
|
+
style: m,
|
|
1480
|
+
...h
|
|
1481
1481
|
} = e, [b, a] = de(!1), { inputRef: v, id: j, error: x } = xe(), C = _e(null), y = v || C, D = e.isError || !!x ? "errored" : "", V = `arkyn_textarea ${n} ${r} ${i || l ? "opacity" : ""} ${D} ${b ? "focused" : ""} ${o}`;
|
|
1482
1482
|
function M() {
|
|
1483
1483
|
i || !(y != null && y.current) || (a(!0), y.current.focus());
|
|
@@ -1492,7 +1492,7 @@ function kr(e) {
|
|
|
1492
1492
|
"section",
|
|
1493
1493
|
{
|
|
1494
1494
|
title: d,
|
|
1495
|
-
style:
|
|
1495
|
+
style: m,
|
|
1496
1496
|
onClick: M,
|
|
1497
1497
|
className: V,
|
|
1498
1498
|
children: /* @__PURE__ */ s.jsx(
|
|
@@ -1504,7 +1504,7 @@ function kr(e) {
|
|
|
1504
1504
|
ref: y,
|
|
1505
1505
|
onFocus: J,
|
|
1506
1506
|
onBlur: U,
|
|
1507
|
-
...
|
|
1507
|
+
...h
|
|
1508
1508
|
}
|
|
1509
1509
|
)
|
|
1510
1510
|
}
|
|
@@ -1553,21 +1553,21 @@ function _r(e) {
|
|
|
1553
1553
|
pageKey: i = "page",
|
|
1554
1554
|
siblingsCount: l = 2,
|
|
1555
1555
|
...f
|
|
1556
|
-
} = e, c = sn(), { getParam: d, getScopedSearch:
|
|
1556
|
+
} = e, c = sn(), { getParam: d, getScopedSearch: m } = jn(n), h = Number(d(i)) || 1, b = Number(d(o)) || 20, a = Math.ceil(r / b), v = fn(h, l), j = dn(h, l, a);
|
|
1557
1557
|
function x(C) {
|
|
1558
|
-
c(
|
|
1558
|
+
c(m({ page: C }));
|
|
1559
1559
|
}
|
|
1560
1560
|
return /* @__PURE__ */ s.jsxs("div", { className: "arkyn_pagination", ...f, children: [
|
|
1561
1561
|
/* @__PURE__ */ s.jsx(
|
|
1562
1562
|
"button",
|
|
1563
1563
|
{
|
|
1564
1564
|
className: "arkyn_pagination-icon_button",
|
|
1565
|
-
disabled:
|
|
1566
|
-
onClick: () => x(
|
|
1565
|
+
disabled: h <= 1,
|
|
1566
|
+
onClick: () => x(h - 1),
|
|
1567
1567
|
children: /* @__PURE__ */ s.jsx(en, {})
|
|
1568
1568
|
}
|
|
1569
1569
|
),
|
|
1570
|
-
|
|
1570
|
+
h > 1 + l && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1571
1571
|
/* @__PURE__ */ s.jsx(
|
|
1572
1572
|
"button",
|
|
1573
1573
|
{
|
|
@@ -1576,7 +1576,7 @@ function _r(e) {
|
|
|
1576
1576
|
children: "1"
|
|
1577
1577
|
}
|
|
1578
1578
|
),
|
|
1579
|
-
|
|
1579
|
+
h > 2 + l && /* @__PURE__ */ s.jsx("button", { disabled: !0, className: "arkyn_pagination-spread", children: /* @__PURE__ */ s.jsx(bt, {}) })
|
|
1580
1580
|
] }),
|
|
1581
1581
|
v.map((C, y) => /* @__PURE__ */ s.jsx(
|
|
1582
1582
|
"button",
|
|
@@ -1587,7 +1587,7 @@ function _r(e) {
|
|
|
1587
1587
|
},
|
|
1588
1588
|
y
|
|
1589
1589
|
)),
|
|
1590
|
-
/* @__PURE__ */ s.jsx("button", { className: "arkyn_pagination-current", disabled: !0, children:
|
|
1590
|
+
/* @__PURE__ */ s.jsx("button", { className: "arkyn_pagination-current", disabled: !0, children: h }),
|
|
1591
1591
|
j.map((C, y) => /* @__PURE__ */ s.jsx(
|
|
1592
1592
|
"button",
|
|
1593
1593
|
{
|
|
@@ -1597,8 +1597,8 @@ function _r(e) {
|
|
|
1597
1597
|
},
|
|
1598
1598
|
y
|
|
1599
1599
|
)),
|
|
1600
|
-
|
|
1601
|
-
|
|
1600
|
+
h + l < a && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1601
|
+
h + 1 + l < a && /* @__PURE__ */ s.jsx("button", { disabled: !0, className: "arkyn_pagination-spread", children: /* @__PURE__ */ s.jsx(bt, {}) }),
|
|
1602
1602
|
/* @__PURE__ */ s.jsx(
|
|
1603
1603
|
"button",
|
|
1604
1604
|
{
|
|
@@ -1612,8 +1612,8 @@ function _r(e) {
|
|
|
1612
1612
|
"button",
|
|
1613
1613
|
{
|
|
1614
1614
|
className: "arkyn_pagination-icon_button",
|
|
1615
|
-
disabled:
|
|
1616
|
-
onClick: () => x(
|
|
1615
|
+
disabled: h >= a,
|
|
1616
|
+
onClick: () => x(h + 1),
|
|
1617
1617
|
children: /* @__PURE__ */ s.jsx(ot, {})
|
|
1618
1618
|
}
|
|
1619
1619
|
)
|
|
@@ -1634,7 +1634,7 @@ function Er(e) {
|
|
|
1634
1634
|
width: "0px",
|
|
1635
1635
|
left: "0px",
|
|
1636
1636
|
transition: "none"
|
|
1637
|
-
}),
|
|
1637
|
+
}), m = (b, a) => {
|
|
1638
1638
|
const v = b.getBoundingClientRect(), j = l.current.getBoundingClientRect();
|
|
1639
1639
|
d({
|
|
1640
1640
|
transition: a ? void 0 : "none",
|
|
@@ -1646,17 +1646,17 @@ function Er(e) {
|
|
|
1646
1646
|
const b = l.current;
|
|
1647
1647
|
if (!b) return;
|
|
1648
1648
|
let a = null;
|
|
1649
|
-
a = b.querySelector("button.active"), a &&
|
|
1649
|
+
a = b.querySelector("button.active"), a && m(a);
|
|
1650
1650
|
}, []);
|
|
1651
|
-
const
|
|
1651
|
+
const h = (b) => {
|
|
1652
1652
|
const a = b.target, v = l.current;
|
|
1653
|
-
a && v && v.contains(a) && (v.querySelectorAll("button").forEach((x) => x.classList.remove("active")), a.classList.add("active"),
|
|
1653
|
+
a && v && v.contains(a) && (v.querySelectorAll("button").forEach((x) => x.classList.remove("active")), a.classList.add("active"), m(a, !0), r && r(a.value));
|
|
1654
1654
|
};
|
|
1655
1655
|
return /* @__PURE__ */ s.jsxs(
|
|
1656
1656
|
"nav",
|
|
1657
1657
|
{
|
|
1658
1658
|
ref: l,
|
|
1659
|
-
onClick:
|
|
1659
|
+
onClick: h,
|
|
1660
1660
|
className: f.trim(),
|
|
1661
1661
|
...i,
|
|
1662
1662
|
children: [
|
|
@@ -1675,8 +1675,8 @@ function Sr(e) {
|
|
|
1675
1675
|
children: i,
|
|
1676
1676
|
className: l,
|
|
1677
1677
|
...f
|
|
1678
|
-
} = e, c = o === "left" ? "-100%" : "100%",
|
|
1679
|
-
return /* @__PURE__ */ s.jsx(Ft.Provider, { value: { makeInvisible: r }, children: /* @__PURE__ */ s.jsx($t, { children: n && /* @__PURE__ */ s.jsxs("aside", { className:
|
|
1678
|
+
} = e, c = o === "left" ? "-100%" : "100%", m = `arkyn_drawer_container ${o} ${n ? "visible" : ""} ${l}`;
|
|
1679
|
+
return /* @__PURE__ */ s.jsx(Ft.Provider, { value: { makeInvisible: r }, children: /* @__PURE__ */ s.jsx($t, { children: n && /* @__PURE__ */ s.jsxs("aside", { className: m.trim(), ...f, children: [
|
|
1680
1680
|
/* @__PURE__ */ s.jsx(
|
|
1681
1681
|
We.div,
|
|
1682
1682
|
{
|
|
@@ -1887,7 +1887,7 @@ function Fr(e) {
|
|
|
1887
1887
|
openDrawer: i,
|
|
1888
1888
|
closeDrawer: l
|
|
1889
1889
|
} = n, f = o(e), c = r(e);
|
|
1890
|
-
return { drawerIsOpen: f, drawerData: c, openDrawer: (
|
|
1890
|
+
return { drawerIsOpen: f, drawerData: c, openDrawer: (h) => i(e, h), closeDrawer: () => l(e) };
|
|
1891
1891
|
} else
|
|
1892
1892
|
return n;
|
|
1893
1893
|
}
|
|
@@ -1902,25 +1902,25 @@ function Dr(e) {
|
|
|
1902
1902
|
openModal: i,
|
|
1903
1903
|
closeModal: l
|
|
1904
1904
|
} = n, f = o(e), c = r(e);
|
|
1905
|
-
return { modalIsOpen: f, modalData: c, openModal: (
|
|
1905
|
+
return { modalIsOpen: f, modalData: c, openModal: (h) => i(e, h), closeModal: () => l(e) };
|
|
1906
1906
|
} else
|
|
1907
1907
|
return n;
|
|
1908
1908
|
}
|
|
1909
1909
|
function Mr(e) {
|
|
1910
1910
|
const { children: n = !1 } = e, [r, o] = de([]);
|
|
1911
1911
|
function i(d) {
|
|
1912
|
-
return !!r.some((
|
|
1912
|
+
return !!r.some((m) => m.key === d);
|
|
1913
1913
|
}
|
|
1914
1914
|
function l(d) {
|
|
1915
|
-
var
|
|
1916
|
-
return (
|
|
1915
|
+
var m;
|
|
1916
|
+
return (m = r.find((h) => h.key === d)) == null ? void 0 : m.data;
|
|
1917
1917
|
}
|
|
1918
|
-
function f(d,
|
|
1919
|
-
const
|
|
1920
|
-
o(
|
|
1918
|
+
function f(d, m) {
|
|
1919
|
+
const h = i(d);
|
|
1920
|
+
o(h ? (b) => [...b.filter((v) => v.key !== d), { key: d, data: m }] : [...r, { key: d, data: m }]);
|
|
1921
1921
|
}
|
|
1922
1922
|
function c(d) {
|
|
1923
|
-
o(r.filter((
|
|
1923
|
+
o(r.filter((m) => m.key !== d));
|
|
1924
1924
|
}
|
|
1925
1925
|
return /* @__PURE__ */ s.jsx(
|
|
1926
1926
|
Lt.Provider,
|
|
@@ -1933,18 +1933,18 @@ function Mr(e) {
|
|
|
1933
1933
|
function Lr(e) {
|
|
1934
1934
|
const { children: n = !1 } = e, [r, o] = de([]);
|
|
1935
1935
|
function i(d) {
|
|
1936
|
-
return !!r.some((
|
|
1936
|
+
return !!r.some((m) => m.key === d);
|
|
1937
1937
|
}
|
|
1938
1938
|
function l(d) {
|
|
1939
|
-
var
|
|
1940
|
-
return (
|
|
1939
|
+
var m;
|
|
1940
|
+
return (m = r.find((h) => h.key === d)) == null ? void 0 : m.data;
|
|
1941
1941
|
}
|
|
1942
|
-
function f(d,
|
|
1943
|
-
const
|
|
1944
|
-
o(
|
|
1942
|
+
function f(d, m) {
|
|
1943
|
+
const h = i(d);
|
|
1944
|
+
o(h ? (b) => [...b.filter((v) => v.key !== d), { key: d, data: m }] : [...r, { key: d, data: m }]);
|
|
1945
1945
|
}
|
|
1946
1946
|
function c(d) {
|
|
1947
|
-
o(r.filter((
|
|
1947
|
+
o(r.filter((m) => m.key !== d));
|
|
1948
1948
|
}
|
|
1949
1949
|
return /* @__PURE__ */ s.jsx(
|
|
1950
1950
|
ft.Provider,
|
|
@@ -2039,8 +2039,8 @@ function Gn(...e) {
|
|
|
2039
2039
|
return e.filter(Boolean).join(" ");
|
|
2040
2040
|
}
|
|
2041
2041
|
var Zn = (e) => {
|
|
2042
|
-
var n, r, o, i, l, f, c, d,
|
|
2043
|
-
let { invert: b, toast: a, unstyled: v, interacting: j, setHeights: x, visibleToasts: C, heights: y, index: w, toasts: D, expanded: z, removeToast: P, defaultRichColors: V, closeButton: M, style: J, cancelButtonStyle: U, actionButtonStyle: H, className: O = "", descriptionClassName: Q = "", duration: _, position: K, gap: L, loadingIcon: X, expandByDefault: ee, classNames: R, icons: te, closeButtonAriaLabel: le = "Close toast", pauseWhenPageIsHidden: S, cn: E } = e, [$, q] = p.useState(!1), [re, B] = p.useState(!1), [be,
|
|
2042
|
+
var n, r, o, i, l, f, c, d, m, h;
|
|
2043
|
+
let { invert: b, toast: a, unstyled: v, interacting: j, setHeights: x, visibleToasts: C, heights: y, index: w, toasts: D, expanded: z, removeToast: P, defaultRichColors: V, closeButton: M, style: J, cancelButtonStyle: U, actionButtonStyle: H, className: O = "", descriptionClassName: Q = "", duration: _, position: K, gap: L, loadingIcon: X, expandByDefault: ee, classNames: R, icons: te, closeButtonAriaLabel: le = "Close toast", pauseWhenPageIsHidden: S, cn: E } = e, [$, q] = p.useState(!1), [re, B] = p.useState(!1), [be, he] = p.useState(!1), [G, ae] = p.useState(!1), [we, $e] = p.useState(0), [Qe, Ve] = p.useState(0), je = p.useRef(null), me = p.useRef(null), Ye = w === 0, Ue = w + 1 <= C, se = a.type, ke = a.dismissible !== !1, et = a.className || "", ze = a.descriptionClassName || "", Pe = p.useMemo(() => y.findIndex((N) => N.toastId === a.id) || 0, [y, a.id]), tt = p.useMemo(() => {
|
|
2044
2044
|
var N;
|
|
2045
2045
|
return (N = a.closeButton) != null ? N : M;
|
|
2046
2046
|
}, [a.closeButton, M]), Fe = p.useMemo(() => a.duration || _ || Hn, [a.duration, _]), Te = p.useRef(0), pe = p.useRef(0), He = p.useRef(0), ye = p.useRef(null), [De, Me] = K.split("-"), Ke = p.useMemo(() => y.reduce((N, A, W) => W >= Pe ? N : N + A.height, 0), [y, Pe]), Xe = Fn(), nt = a.invert || b, Le = se === "loading";
|
|
@@ -2048,7 +2048,7 @@ var Zn = (e) => {
|
|
|
2048
2048
|
q(!0);
|
|
2049
2049
|
}, []), p.useLayoutEffect(() => {
|
|
2050
2050
|
if (!$) return;
|
|
2051
|
-
let N =
|
|
2051
|
+
let N = me.current, A = N.style.height;
|
|
2052
2052
|
N.style.height = "auto";
|
|
2053
2053
|
let W = N.getBoundingClientRect().height;
|
|
2054
2054
|
N.style.height = A, Ve(W), x((oe) => oe.find((ce) => ce.toastId === a.id) ? oe.map((ce) => ce.toastId === a.id ? { ...ce, height: W } : ce) : [{ toastId: a.id, height: W, position: a.position }, ...oe]);
|
|
@@ -2072,7 +2072,7 @@ var Zn = (e) => {
|
|
|
2072
2072
|
(W = a.onAutoClose) == null || W.call(a, a), ve();
|
|
2073
2073
|
}, A)), () => clearTimeout(N);
|
|
2074
2074
|
}, [z, j, ee, a, Fe, ve, a.promise, se, S, Xe]), p.useEffect(() => {
|
|
2075
|
-
let N =
|
|
2075
|
+
let N = me.current;
|
|
2076
2076
|
if (N) {
|
|
2077
2077
|
let A = N.getBoundingClientRect().height;
|
|
2078
2078
|
return Ve(A), x((W) => [{ toastId: a.id, height: A, position: a.position }, ...W]), () => x((W) => W.filter((oe) => oe.toastId !== a.id));
|
|
@@ -2083,23 +2083,23 @@ var Zn = (e) => {
|
|
|
2083
2083
|
function rt() {
|
|
2084
2084
|
return te != null && te.loading ? p.createElement("div", { className: "sonner-loader", "data-visible": se === "loading" }, te.loading) : X ? p.createElement("div", { className: "sonner-loader", "data-visible": se === "loading" }, X) : p.createElement(Pn, { visible: se === "loading" });
|
|
2085
2085
|
}
|
|
2086
|
-
return p.createElement("li", { "aria-live": a.important ? "assertive" : "polite", "aria-atomic": "true", role: "status", tabIndex: 0, ref:
|
|
2087
|
-
Le || !ke || (je.current = /* @__PURE__ */ new Date(), $e(pe.current), N.target.setPointerCapture(N.pointerId), N.target.tagName !== "BUTTON" && (
|
|
2086
|
+
return p.createElement("li", { "aria-live": a.important ? "assertive" : "polite", "aria-atomic": "true", role: "status", tabIndex: 0, ref: me, className: E(O, et, R == null ? void 0 : R.toast, (n = a == null ? void 0 : a.classNames) == null ? void 0 : n.toast, R == null ? void 0 : R.default, R == null ? void 0 : R[se], (r = a == null ? void 0 : a.classNames) == null ? void 0 : r[se]), "data-sonner-toast": "", "data-rich-colors": (o = a.richColors) != null ? o : V, "data-styled": !(a.jsx || a.unstyled || v), "data-mounted": $, "data-promise": !!a.promise, "data-removed": re, "data-visible": Ue, "data-y-position": De, "data-x-position": Me, "data-index": w, "data-front": Ye, "data-swiping": be, "data-dismissible": ke, "data-type": se, "data-invert": nt, "data-swipe-out": G, "data-expanded": !!(z || ee && $), style: { "--index": w, "--toasts-before": w, "--z-index": D.length - w, "--offset": `${re ? we : pe.current}px`, "--initial-height": ee ? "auto" : `${Qe}px`, ...J, ...a.style }, onPointerDown: (N) => {
|
|
2087
|
+
Le || !ke || (je.current = /* @__PURE__ */ new Date(), $e(pe.current), N.target.setPointerCapture(N.pointerId), N.target.tagName !== "BUTTON" && (he(!0), ye.current = { x: N.clientX, y: N.clientY }));
|
|
2088
2088
|
}, onPointerUp: () => {
|
|
2089
2089
|
var N, A, W, oe;
|
|
2090
2090
|
if (G || !ke) return;
|
|
2091
2091
|
ye.current = null;
|
|
2092
|
-
let ce = Number(((N =
|
|
2092
|
+
let ce = Number(((N = me.current) == null ? void 0 : N.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0), Ne = (/* @__PURE__ */ new Date()).getTime() - ((A = je.current) == null ? void 0 : A.getTime()), Je = Math.abs(ce) / Ne;
|
|
2093
2093
|
if (Math.abs(ce) >= Jn || Je > 0.11) {
|
|
2094
2094
|
$e(pe.current), (W = a.onDismiss) == null || W.call(a, a), ve(), ae(!0);
|
|
2095
2095
|
return;
|
|
2096
2096
|
}
|
|
2097
|
-
(oe =
|
|
2097
|
+
(oe = me.current) == null || oe.style.setProperty("--swipe-amount", "0px"), he(!1);
|
|
2098
2098
|
}, onPointerMove: (N) => {
|
|
2099
2099
|
var A;
|
|
2100
2100
|
if (!ye.current || !ke) return;
|
|
2101
2101
|
let W = N.clientY - ye.current.y, oe = N.clientX - ye.current.x, ce = (De === "top" ? Math.min : Math.max)(0, W), Ne = N.pointerType === "touch" ? 10 : 2;
|
|
2102
|
-
Math.abs(ce) > Ne ? (A =
|
|
2102
|
+
Math.abs(ce) > Ne ? (A = me.current) == null || A.style.setProperty("--swipe-amount", `${W}px`) : Math.abs(oe) > Ne && (ye.current = null);
|
|
2103
2103
|
} }, tt && !a.jsx ? p.createElement("button", { "aria-label": le, "data-disabled": Le, "data-close-button": !0, onClick: Le || !ke ? () => {
|
|
2104
2104
|
} : () => {
|
|
2105
2105
|
var N;
|
|
@@ -2107,10 +2107,10 @@ var Zn = (e) => {
|
|
|
2107
2107
|
}, className: E(R == null ? void 0 : R.closeButton, (i = a == null ? void 0 : a.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, a.jsx || p.isValidElement(a.title) ? a.jsx || a.title : p.createElement(p.Fragment, null, se || a.icon || a.promise ? p.createElement("div", { "data-icon": "", className: E(R == null ? void 0 : R.icon, (l = a == null ? void 0 : a.classNames) == null ? void 0 : l.icon) }, a.promise || a.type === "loading" && !a.icon ? a.icon || rt() : null, a.type !== "loading" ? a.icon || (te == null ? void 0 : te[se]) || Rn(se) : null) : null, p.createElement("div", { "data-content": "", className: E(R == null ? void 0 : R.content, (f = a == null ? void 0 : a.classNames) == null ? void 0 : f.content) }, p.createElement("div", { "data-title": "", className: E(R == null ? void 0 : R.title, (c = a == null ? void 0 : a.classNames) == null ? void 0 : c.title) }, a.title), a.description ? p.createElement("div", { "data-description": "", className: E(Q, ze, R == null ? void 0 : R.description, (d = a == null ? void 0 : a.classNames) == null ? void 0 : d.description) }, a.description) : null), p.isValidElement(a.cancel) ? a.cancel : a.cancel && Ge(a.cancel) ? p.createElement("button", { "data-button": !0, "data-cancel": !0, style: a.cancelButtonStyle || U, onClick: (N) => {
|
|
2108
2108
|
var A, W;
|
|
2109
2109
|
Ge(a.cancel) && ke && ((W = (A = a.cancel).onClick) == null || W.call(A, N), ve());
|
|
2110
|
-
}, className: E(R == null ? void 0 : R.cancelButton, (
|
|
2110
|
+
}, className: E(R == null ? void 0 : R.cancelButton, (m = a == null ? void 0 : a.classNames) == null ? void 0 : m.cancelButton) }, a.cancel.label) : null, p.isValidElement(a.action) ? a.action : a.action && Ge(a.action) ? p.createElement("button", { "data-button": !0, "data-action": !0, style: a.actionButtonStyle || H, onClick: (N) => {
|
|
2111
2111
|
var A, W;
|
|
2112
2112
|
Ge(a.action) && (N.defaultPrevented || ((W = (A = a.action).onClick) == null || W.call(A, N), ve()));
|
|
2113
|
-
}, className: E(R == null ? void 0 : R.actionButton, (
|
|
2113
|
+
}, className: E(R == null ? void 0 : R.actionButton, (h = a == null ? void 0 : a.classNames) == null ? void 0 : h.actionButton) }, a.action.label) : null));
|
|
2114
2114
|
};
|
|
2115
2115
|
function _t() {
|
|
2116
2116
|
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
@@ -2118,7 +2118,7 @@ function _t() {
|
|
|
2118
2118
|
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
2119
2119
|
}
|
|
2120
2120
|
var Qn = (e) => {
|
|
2121
|
-
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: i, closeButton: l, className: f, offset: c, theme: d = "light", richColors:
|
|
2121
|
+
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: i, closeButton: l, className: f, offset: c, theme: d = "light", richColors: m, duration: h, style: b, visibleToasts: a = Yn, toastOptions: v, dir: j = _t(), gap: x = Xn, loadingIcon: C, icons: y, containerAriaLabel: w = "Notifications", pauseWhenPageIsHidden: D, cn: z = Gn } = e, [P, V] = p.useState([]), M = p.useMemo(() => Array.from(new Set([r].concat(P.filter((S) => S.position).map((S) => S.position)))), [P, r]), [J, U] = p.useState([]), [H, O] = p.useState(!1), [Q, _] = p.useState(!1), [K, L] = p.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), X = p.useRef(null), ee = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), R = p.useRef(null), te = p.useRef(!1), le = p.useCallback((S) => {
|
|
2122
2122
|
var E;
|
|
2123
2123
|
(E = P.find(($) => $.id === S.id)) != null && E.delete || fe.dismiss(S.id), V(($) => $.filter(({ id: q }) => q !== S.id));
|
|
2124
2124
|
}, [P]);
|
|
@@ -2167,8 +2167,8 @@ var Qn = (e) => {
|
|
|
2167
2167
|
}, onPointerDown: (B) => {
|
|
2168
2168
|
B.target instanceof HTMLElement && B.target.dataset.dismissible === "false" || _(!0);
|
|
2169
2169
|
}, onPointerUp: () => _(!1) }, P.filter((B) => !B.position && E === 0 || B.position === S).map((B, be) => {
|
|
2170
|
-
var
|
|
2171
|
-
return p.createElement(Zn, { key: B.id, icons: y, index: be, toast: B, defaultRichColors:
|
|
2170
|
+
var he, G;
|
|
2171
|
+
return p.createElement(Zn, { key: B.id, icons: y, index: be, toast: B, defaultRichColors: m, duration: (he = v == null ? void 0 : v.duration) != null ? he : h, className: v == null ? void 0 : v.className, descriptionClassName: v == null ? void 0 : v.descriptionClassName, invert: n, visibleToasts: a, closeButton: (G = v == null ? void 0 : v.closeButton) != null ? G : l, interacting: Q, position: S, style: v == null ? void 0 : v.style, unstyled: v == null ? void 0 : v.unstyled, classNames: v == null ? void 0 : v.classNames, cancelButtonStyle: v == null ? void 0 : v.cancelButtonStyle, actionButtonStyle: v == null ? void 0 : v.actionButtonStyle, removeToast: le, toasts: P.filter((ae) => ae.position == B.position), heights: J.filter((ae) => ae.position == B.position), setHeights: U, expandByDefault: i, gap: x, loadingIcon: C, expanded: H, pauseWhenPageIsHidden: D, cn: z });
|
|
2172
2172
|
}));
|
|
2173
2173
|
})) : null;
|
|
2174
2174
|
};
|
|
@@ -2185,7 +2185,7 @@ export {
|
|
|
2185
2185
|
or as Badge,
|
|
2186
2186
|
Nr as BreadcrumbContainer,
|
|
2187
2187
|
Cr as BreadcrumbLink,
|
|
2188
|
-
|
|
2188
|
+
mr as Button,
|
|
2189
2189
|
gr as Checkbox,
|
|
2190
2190
|
ir as Divider,
|
|
2191
2191
|
Sr as DrawerContainer,
|
|
@@ -2210,7 +2210,7 @@ export {
|
|
|
2210
2210
|
ur as TableCaption,
|
|
2211
2211
|
dr as TableContainer,
|
|
2212
2212
|
fr as TableFooter,
|
|
2213
|
-
|
|
2213
|
+
hr as TableHeader,
|
|
2214
2214
|
kr as Textarea,
|
|
2215
2215
|
En as Toast,
|
|
2216
2216
|
Br as ToastProvider,
|