@arkyn/components 1.3.83 → 1.3.85
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +204 -198
- package/dist/bundle.umd.cjs +8 -8
- package/dist/components/Alert/AlertContainer/index.d.ts.map +1 -1
- package/dist/components/Alert/AlertContainer/index.js +26 -3
- package/dist/components/Input/CpfCpnjInput/getConfig.d.ts +2 -2
- package/dist/components/Input/CurrencyInput/getConfig.d.ts +2 -2
- package/dist/components/Input/MaskInput/getConfig.d.ts +2 -2
- package/dist/components/Input/SimpleInput/getConfig.d.ts +2 -2
- package/dist/components/Select/getConfig.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Alert/AlertContainer/index.tsx +30 -4
- package/src/components/Alert/AlertContainer/styles.css +4 -0
package/dist/bundle.js
CHANGED
@@ -20,11 +20,11 @@ function mn() {
|
|
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
22
|
function d(c, u, h) {
|
23
|
-
var m,
|
24
|
-
h !== void 0 && (o = "" + h), u.key !== void 0 && (o = "" + u.key), u.ref !== void 0 && (
|
25
|
-
for (m in u) s.call(u, m) && !l.hasOwnProperty(m) && (
|
26
|
-
if (c && c.defaultProps) for (m in u = c.defaultProps, u)
|
27
|
-
return { $$typeof: t, type: c, key: o, ref:
|
23
|
+
var m, v = {}, o = null, y = null;
|
24
|
+
h !== void 0 && (o = "" + h), u.key !== void 0 && (o = "" + u.key), u.ref !== void 0 && (y = u.ref);
|
25
|
+
for (m in u) s.call(u, m) && !l.hasOwnProperty(m) && (v[m] = u[m]);
|
26
|
+
if (c && c.defaultProps) for (m in u = c.defaultProps, u) v[m] === void 0 && (v[m] = u[m]);
|
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;
|
30
30
|
}
|
@@ -41,14 +41,14 @@ var Ae = {};
|
|
41
41
|
var Ct;
|
42
42
|
function hn() {
|
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"), h = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"),
|
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"), h = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), o = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), N = Symbol.iterator, w = "@@iterator";
|
45
45
|
function C(n) {
|
46
46
|
if (n === null || typeof n != "object")
|
47
47
|
return null;
|
48
48
|
var f = N && n[N] || n[w];
|
49
49
|
return typeof f == "function" ? f : null;
|
50
50
|
}
|
51
|
-
var
|
51
|
+
var b = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
52
52
|
function x(n) {
|
53
53
|
{
|
54
54
|
for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), k = 1; k < f; k++)
|
@@ -58,7 +58,7 @@ function hn() {
|
|
58
58
|
}
|
59
59
|
function O(n, f, g) {
|
60
60
|
{
|
61
|
-
var k =
|
61
|
+
var k = b.ReactDebugCurrentFrame, z = k.getStackAddendum();
|
62
62
|
z !== "" && (f += "%s", g = g.concat([z]));
|
63
63
|
var Y = g.map(function(F) {
|
64
64
|
return String(F);
|
@@ -69,7 +69,7 @@ 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 === h || n === m || D || n ===
|
72
|
+
return !!(typeof n == "string" || typeof n == "function" || n === s || n === l || H || n === i || n === h || n === m || 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.
|
@@ -116,7 +116,7 @@ function hn() {
|
|
116
116
|
return te(g._context) + ".Provider";
|
117
117
|
case u:
|
118
118
|
return B(n, n.render, "ForwardRef");
|
119
|
-
case
|
119
|
+
case v:
|
120
120
|
var k = n.displayName || null;
|
121
121
|
return k !== null ? k : E(n.type) || "Memo";
|
122
122
|
case o: {
|
@@ -192,7 +192,7 @@ function hn() {
|
|
192
192
|
M < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
193
193
|
}
|
194
194
|
}
|
195
|
-
var X =
|
195
|
+
var X = b.ReactCurrentDispatcher, xe;
|
196
196
|
function me(n, f, g) {
|
197
197
|
{
|
198
198
|
if (xe === void 0)
|
@@ -306,7 +306,7 @@ function hn() {
|
|
306
306
|
switch (n.$$typeof) {
|
307
307
|
case u:
|
308
308
|
return et(n.render);
|
309
|
-
case
|
309
|
+
case v:
|
310
310
|
return Te(n.type, f, g);
|
311
311
|
case o: {
|
312
312
|
var k = n, z = k._payload, Y = k._init;
|
@@ -318,7 +318,7 @@ function hn() {
|
|
318
318
|
}
|
319
319
|
return "";
|
320
320
|
}
|
321
|
-
var he = Object.prototype.hasOwnProperty, Ye = {}, He =
|
321
|
+
var he = Object.prototype.hasOwnProperty, Ye = {}, He = b.ReactDebugCurrentFrame;
|
322
322
|
function re(n) {
|
323
323
|
if (n) {
|
324
324
|
var f = n._owner, g = Te(n.type, n._source, f ? f.type : null);
|
@@ -369,7 +369,7 @@ function hn() {
|
|
369
369
|
if (nt(n))
|
370
370
|
return x("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
|
-
var pe =
|
372
|
+
var pe = b.ReactCurrentOwner, Ue = {
|
373
373
|
key: !0,
|
374
374
|
ref: !0,
|
375
375
|
__self: !0,
|
@@ -467,7 +467,7 @@ function hn() {
|
|
467
467
|
return rt(n, P, ce, z, k, pe.current, F);
|
468
468
|
}
|
469
469
|
}
|
470
|
-
var L =
|
470
|
+
var L = b.ReactCurrentOwner, A = b.ReactDebugCurrentFrame;
|
471
471
|
function se(n) {
|
472
472
|
if (n) {
|
473
473
|
var f = n._owner, g = Te(n.type, n._source, f ? f.type : null);
|
@@ -558,7 +558,7 @@ Check the top-level render call using <` + g + ">.");
|
|
558
558
|
g = f.propTypes;
|
559
559
|
else if (typeof f == "object" && (f.$$typeof === u || // Note: Memo only checks outer props here.
|
560
560
|
// Inner props are checked in the reconciler.
|
561
|
-
f.$$typeof ===
|
561
|
+
f.$$typeof === v))
|
562
562
|
g = f.propTypes;
|
563
563
|
else
|
564
564
|
return;
|
@@ -642,24 +642,34 @@ React keys must be passed directly to JSX without using spread:
|
|
642
642
|
}
|
643
643
|
process.env.NODE_ENV === "production" ? lt.exports = mn() : lt.exports = hn();
|
644
644
|
var r = lt.exports;
|
645
|
+
function pn(e) {
|
646
|
+
const { className: t, ...a } = e, s = `arkynAlertTitle ${t}`;
|
647
|
+
return /* @__PURE__ */ r.jsx("div", { className: s.trim(), ...a });
|
648
|
+
}
|
645
649
|
const Ft = Ce({});
|
646
|
-
function
|
650
|
+
function gn() {
|
647
651
|
return ye(Ft);
|
648
652
|
}
|
649
|
-
function ma(e) {
|
650
|
-
const { schema: t, className: a, ...s } = e, i = `arkynAlertContainer ${t} ${a}`;
|
651
|
-
return /* @__PURE__ */ r.jsx(Ft.Provider, { value: e, children: /* @__PURE__ */ r.jsx("div", { className: i.trim(), ...s }) });
|
652
|
-
}
|
653
653
|
function ha(e) {
|
654
|
+
const { schema: t, children: a, className: s, ...i } = e, c = !((h) => {
|
655
|
+
let m = !1;
|
656
|
+
const v = (o) => {
|
657
|
+
Array.isArray(o) ? o.forEach(v) : o && typeof o == "object" && "type" in o && (o.type === pn ? m = !0 : o.props && o.props.children && v(o.props.children));
|
658
|
+
};
|
659
|
+
return v(h), m;
|
660
|
+
})(a) ? "nonExistsAlertTitle" : "existsAlertTitle", u = `arkynAlertContainer ${t} ${c} ${s}`;
|
661
|
+
return /* @__PURE__ */ r.jsx(Ft.Provider, { value: e, children: /* @__PURE__ */ r.jsx("div", { className: u.trim(), ...i, children: a }) });
|
662
|
+
}
|
663
|
+
function pa(e) {
|
654
664
|
const { className: t, ...a } = e, s = `arkynAlertContent ${t}`;
|
655
665
|
return /* @__PURE__ */ r.jsx("div", { className: s.trim(), ...a });
|
656
666
|
}
|
657
|
-
function
|
667
|
+
function ga(e) {
|
658
668
|
const { className: t, ...a } = e, s = `arkynAlertDescription ${t}`;
|
659
669
|
return /* @__PURE__ */ r.jsx("div", { className: s.trim(), ...a });
|
660
670
|
}
|
661
|
-
function
|
662
|
-
const { className: t, ...a } = e, { schema: s } =
|
671
|
+
function va(e) {
|
672
|
+
const { className: t, ...a } = e, { schema: s } = gn(), i = `arkynAlertIcon ${s} ${t}`;
|
663
673
|
switch (s) {
|
664
674
|
case "success":
|
665
675
|
return /* @__PURE__ */ r.jsx(Tt, { className: i, ...a });
|
@@ -671,23 +681,19 @@ function ga(e) {
|
|
671
681
|
return /* @__PURE__ */ r.jsx(ot, { className: i, ...a });
|
672
682
|
}
|
673
683
|
}
|
674
|
-
function va(e) {
|
675
|
-
const { className: t, ...a } = e, s = `arkynAlertTitle ${t}`;
|
676
|
-
return /* @__PURE__ */ r.jsx("div", { className: s.trim(), ...a });
|
677
|
-
}
|
678
684
|
function Qe(e, t) {
|
679
685
|
return t ? /* @__PURE__ */ r.jsx(t, { size: e, strokeWidth: 2.5 }) : /* @__PURE__ */ r.jsx(r.Fragment, {});
|
680
686
|
}
|
681
687
|
function Ot(e, t) {
|
682
688
|
return [...new Array(t - e)].map((a, s) => e + s + 1).filter((a) => a > 0);
|
683
689
|
}
|
684
|
-
function
|
690
|
+
function vn(e, t, a) {
|
685
691
|
return e >= a ? [] : Ot(e, e + t);
|
686
692
|
}
|
687
|
-
function
|
693
|
+
function bn(e, t) {
|
688
694
|
return e <= 1 ? [] : Ot(e - 1 - t, e - 1);
|
689
695
|
}
|
690
|
-
function
|
696
|
+
function yn(e, t, a) {
|
691
697
|
if (!e) return /* @__PURE__ */ r.jsx(r.Fragment, {});
|
692
698
|
if (typeof e == "string") return /* @__PURE__ */ r.jsx("p", { className: a, children: e });
|
693
699
|
const s = e;
|
@@ -703,8 +709,8 @@ function ba(e) {
|
|
703
709
|
className: d = "",
|
704
710
|
children: c,
|
705
711
|
...u
|
706
|
-
} = e, m = { md: 12, lg: 14 }[s],
|
707
|
-
return /* @__PURE__ */ r.jsxs("div", { className:
|
712
|
+
} = e, m = { md: 12, lg: 14 }[s], v = `arkynBadge ${t} ${a} ${s} ${d}`;
|
713
|
+
return /* @__PURE__ */ r.jsxs("div", { className: v.trim(), ...u, children: [
|
708
714
|
Qe(m, i),
|
709
715
|
c,
|
710
716
|
Qe(m, i)
|
@@ -769,24 +775,24 @@ function Sa(e) {
|
|
769
775
|
disabled: u,
|
770
776
|
className: h = "",
|
771
777
|
children: m,
|
772
|
-
...
|
773
|
-
} = e,
|
774
|
-
return /* @__PURE__ */ r.jsxs("button", { className: C, disabled: u || t, ...
|
778
|
+
...v
|
779
|
+
} = e, y = { xs: 12, sm: 16, md: 20, lg: 24 }[l], C = `arkynButton ${t ? "loadingTrue" : "loadingFalse"} ${s} ${a} ${l} ${i ? "loadingTextTrue" : "loadingTextFalse"} ${h}`;
|
780
|
+
return /* @__PURE__ */ r.jsxs("button", { className: C, disabled: u || t, ...v, children: [
|
775
781
|
/* @__PURE__ */ r.jsxs("div", { className: "arkynButtonSpinner", children: [
|
776
|
-
/* @__PURE__ */ r.jsx($e, { size:
|
782
|
+
/* @__PURE__ */ r.jsx($e, { size: y, strokeWidth: 2.5 }),
|
777
783
|
i && i
|
778
784
|
] }),
|
779
785
|
/* @__PURE__ */ r.jsxs("div", { className: "arkynButtonContent", children: [
|
780
|
-
Qe(
|
786
|
+
Qe(y, d),
|
781
787
|
m,
|
782
|
-
Qe(
|
788
|
+
Qe(y, c)
|
783
789
|
] })
|
784
790
|
] });
|
785
791
|
}
|
786
792
|
const Bt = Ce({});
|
787
793
|
function Ta(e) {
|
788
|
-
var m,
|
789
|
-
const t = Pt(), { children: a, className: s, ...i } = e, l = Se(null), d = ((m = l.current) == null ? void 0 : m.name) || "", c = ((
|
794
|
+
var m, v;
|
795
|
+
const t = Pt(), { children: a, className: s, ...i } = e, l = Se(null), d = ((m = l.current) == null ? void 0 : m.name) || "", c = ((v = t == null ? void 0 : t.fieldErrors) == null ? void 0 : v[d]) || null, u = nn(), h = `arkynFormController ${s}`;
|
790
796
|
return /* @__PURE__ */ r.jsx(Bt.Provider, { value: { error: c, id: u, inputRef: l }, children: /* @__PURE__ */ r.jsx("section", { className: h.trim(), ...i, children: a }) });
|
791
797
|
}
|
792
798
|
function ve() {
|
@@ -803,7 +809,7 @@ function Ra(e) {
|
|
803
809
|
onCheck: c,
|
804
810
|
value: u,
|
805
811
|
...h
|
806
|
-
} = e, { id: m, inputRef:
|
812
|
+
} = e, { id: m, inputRef: v, error: o } = ve(), y = i || !!o, [N, w] = oe(l || !1), C = typeof d == "boolean" ? d : N, O = `arkynCheckbox ${s} ${y ? "errorTrue" : "errorFalse"} ${C ? "checkedTrue" : "checkedFalse"} ${a}`;
|
807
813
|
function _() {
|
808
814
|
const R = N;
|
809
815
|
w(!R), c && c(R ? "" : u || "checked");
|
@@ -822,7 +828,7 @@ function Ra(e) {
|
|
822
828
|
{
|
823
829
|
type: "hidden",
|
824
830
|
name: t,
|
825
|
-
ref:
|
831
|
+
ref: v,
|
826
832
|
value: C ? u || "checked" : ""
|
827
833
|
}
|
828
834
|
),
|
@@ -853,12 +859,12 @@ function Ia(e) {
|
|
853
859
|
disabled: d,
|
854
860
|
className: c = "",
|
855
861
|
...u
|
856
|
-
} = e, h = { xs: 12, sm: 16, md: 20, lg: 24 },
|
862
|
+
} = e, h = { xs: 12, sm: 16, md: 20, lg: 24 }, v = `arkynIconButton ${s} ${a} ${i} ${t ? "loadingTrue" : "loadingFalse"} ${c}`;
|
857
863
|
return /* @__PURE__ */ r.jsxs(
|
858
864
|
"button",
|
859
865
|
{
|
860
866
|
disabled: d || t,
|
861
|
-
className:
|
867
|
+
className: v.trim(),
|
862
868
|
...u,
|
863
869
|
children: [
|
864
870
|
/* @__PURE__ */ r.jsx("div", { className: "arkynIconButtonSpinner", children: /* @__PURE__ */ r.jsx($e, { size: h[i], strokeWidth: 2.5 }) }),
|
@@ -889,7 +895,7 @@ const mt = {
|
|
889
895
|
CPF: "999.999.999-999",
|
890
896
|
CNPJ: "99.999.999/9999-99"
|
891
897
|
}, Mt = ft(mt.CNPJ).length;
|
892
|
-
function
|
898
|
+
function xn(e, t) {
|
893
899
|
const {
|
894
900
|
isLoading: a,
|
895
901
|
isError: s,
|
@@ -900,13 +906,13 @@ function yn(e, t) {
|
|
900
906
|
sufix: u,
|
901
907
|
leftIcon: h,
|
902
908
|
rightIcon: m,
|
903
|
-
disabled:
|
909
|
+
disabled: v,
|
904
910
|
defaultValue: o,
|
905
|
-
readOnly:
|
911
|
+
readOnly: y,
|
906
912
|
onFocus: N,
|
907
913
|
onBlur: w,
|
908
914
|
title: C,
|
909
|
-
style:
|
915
|
+
style: b,
|
910
916
|
onChange: x,
|
911
917
|
...O
|
912
918
|
} = e;
|
@@ -916,7 +922,7 @@ function yn(e, t) {
|
|
916
922
|
if (!(M.length > Mt))
|
917
923
|
return M = zt(M, mt[K]), M;
|
918
924
|
}
|
919
|
-
const R = m ? "right" : "left", B = `arkyn_input ${c ? "hasPrefix" : ""} ${u ? "hasSufix" : ""} ${d} ${i} ${
|
925
|
+
const R = m ? "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];
|
920
926
|
return {
|
921
927
|
isLoading: a,
|
922
928
|
className: B,
|
@@ -925,12 +931,12 @@ function yn(e, t) {
|
|
925
931
|
LeftIcon: h,
|
926
932
|
RightIcon: m,
|
927
933
|
defaultValue: _(o || ""),
|
928
|
-
disabled:
|
929
|
-
readOnly:
|
934
|
+
disabled: v,
|
935
|
+
readOnly: y,
|
930
936
|
onFocus: N,
|
931
937
|
onBlur: w,
|
932
938
|
title: C,
|
933
|
-
style:
|
939
|
+
style: b,
|
934
940
|
onChange: x,
|
935
941
|
loadingPosition: R,
|
936
942
|
iconSize: E,
|
@@ -938,17 +944,17 @@ function yn(e, t) {
|
|
938
944
|
...O
|
939
945
|
};
|
940
946
|
}
|
941
|
-
function
|
947
|
+
function wn(e) {
|
942
948
|
const [t, a] = oe(!1), s = Se(null), { inputRef: i, id: l, error: d } = ve(), c = i || s, u = e.isError || !!d, {
|
943
949
|
disabled: h,
|
944
950
|
title: m,
|
945
|
-
style:
|
951
|
+
style: v,
|
946
952
|
className: o,
|
947
|
-
prefix:
|
953
|
+
prefix: y,
|
948
954
|
sufix: N,
|
949
955
|
iconSize: w,
|
950
956
|
loadingPosition: C,
|
951
|
-
isLoading:
|
957
|
+
isLoading: b,
|
952
958
|
LeftIcon: x,
|
953
959
|
readOnly: O,
|
954
960
|
onFocus: _,
|
@@ -959,7 +965,7 @@ function xn(e) {
|
|
959
965
|
value: W,
|
960
966
|
defaultValue: J,
|
961
967
|
...B
|
962
|
-
} =
|
968
|
+
} = xn({ ...e, id: l, isError: u }, t), [te, E] = oe(J), U = x && !b, M = V && !b, K = C === "left" && b, Q = C === "right" && b;
|
963
969
|
function $() {
|
964
970
|
h || !(c != null && c.current) || (a(!0), c.current.focus());
|
965
971
|
}
|
@@ -978,17 +984,17 @@ function xn(e) {
|
|
978
984
|
"section",
|
979
985
|
{
|
980
986
|
title: m,
|
981
|
-
style:
|
987
|
+
style: v,
|
982
988
|
onClick: $,
|
983
989
|
className: o,
|
984
990
|
children: [
|
985
|
-
|
991
|
+
y,
|
986
992
|
K && D,
|
987
993
|
U && /* @__PURE__ */ r.jsx(x, { size: w, strokeWidth: 2.5 }),
|
988
994
|
/* @__PURE__ */ r.jsx(
|
989
995
|
"input",
|
990
996
|
{
|
991
|
-
disabled: h ||
|
997
|
+
disabled: h || b,
|
992
998
|
readOnly: O,
|
993
999
|
ref: c,
|
994
1000
|
value: W || te,
|
@@ -1005,21 +1011,21 @@ function xn(e) {
|
|
1005
1011
|
}
|
1006
1012
|
);
|
1007
1013
|
}
|
1008
|
-
const
|
1014
|
+
const Cn = 3, kn = (e = "pt-BR", t, a = "BRL", s = !0) => new Intl.NumberFormat(e, {
|
1009
1015
|
style: "currency",
|
1010
1016
|
currency: a,
|
1011
1017
|
currencyDisplay: "symbol",
|
1012
1018
|
minimumFractionDigits: 2,
|
1013
1019
|
maximumFractionDigits: 2
|
1014
|
-
}).format(t).slice(s ?
|
1020
|
+
}).format(t).slice(s ? Cn : 0), Je = 2, kt = (e) => typeof e == "number" ? e : Number(e.toString().replace(/[^0-9-]/g, "")), ct = (e) => {
|
1015
1021
|
let t = e;
|
1016
1022
|
return typeof e == "string" ? (t = kt(e), t % 1 !== 0 && (t = t.toFixed(Je))) : t = Number.isInteger(e) ? Number(e) * 10 ** Je : e.toFixed(Je), kt(t) / 10 ** Je;
|
1017
1023
|
}, Nt = (e, t, a) => {
|
1018
1024
|
if (!t) return [0, ""];
|
1019
|
-
const s = ct(t), i =
|
1025
|
+
const s = ct(t), i = kn(e, s, a);
|
1020
1026
|
return [s, i];
|
1021
1027
|
};
|
1022
|
-
function
|
1028
|
+
function Nn(e, t) {
|
1023
1029
|
const {
|
1024
1030
|
isLoading: a,
|
1025
1031
|
isError: s,
|
@@ -1030,18 +1036,18 @@ function kn(e, t) {
|
|
1030
1036
|
sufix: u,
|
1031
1037
|
leftIcon: h,
|
1032
1038
|
rightIcon: m,
|
1033
|
-
disabled:
|
1039
|
+
disabled: v,
|
1034
1040
|
readOnly: o,
|
1035
|
-
onFocus:
|
1041
|
+
onFocus: y,
|
1036
1042
|
onBlur: N,
|
1037
1043
|
title: w,
|
1038
1044
|
style: C,
|
1039
1045
|
// showCents = false,
|
1040
|
-
max:
|
1046
|
+
max: b = 1e9,
|
1041
1047
|
locale: x = "pt-BR",
|
1042
1048
|
currency: O = "BRL",
|
1043
1049
|
..._
|
1044
|
-
} = e, R = m ? "right" : "left", B = `arkyn_input ${c ? "hasPrefix" : ""} ${u ? "hasSufix" : ""} ${d} ${i} ${
|
1050
|
+
} = e, R = m ? "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];
|
1045
1051
|
return {
|
1046
1052
|
isLoading: a,
|
1047
1053
|
className: B,
|
@@ -1049,15 +1055,15 @@ function kn(e, t) {
|
|
1049
1055
|
sufix: Ee(u, E, "sufix"),
|
1050
1056
|
LeftIcon: h,
|
1051
1057
|
RightIcon: m,
|
1052
|
-
disabled:
|
1058
|
+
disabled: v,
|
1053
1059
|
locale: x,
|
1054
1060
|
currency: O,
|
1055
1061
|
readOnly: o,
|
1056
|
-
onFocus:
|
1062
|
+
onFocus: y,
|
1057
1063
|
onBlur: N,
|
1058
1064
|
title: w,
|
1059
1065
|
style: C,
|
1060
|
-
max:
|
1066
|
+
max: b,
|
1061
1067
|
// showCents,
|
1062
1068
|
loadingPosition: R,
|
1063
1069
|
iconSize: E,
|
@@ -1065,15 +1071,15 @@ function kn(e, t) {
|
|
1065
1071
|
..._
|
1066
1072
|
};
|
1067
1073
|
}
|
1068
|
-
function
|
1074
|
+
function jn(e) {
|
1069
1075
|
const [t, a] = oe(!1), [s, i] = oe("0"), l = Se(null), { inputRef: d, id: c, error: u } = ve(), h = d || l, m = e.isError || !!u, {
|
1070
|
-
disabled:
|
1076
|
+
disabled: v,
|
1071
1077
|
title: o,
|
1072
|
-
style:
|
1078
|
+
style: y,
|
1073
1079
|
className: N,
|
1074
1080
|
prefix: w,
|
1075
1081
|
sufix: C,
|
1076
|
-
iconSize:
|
1082
|
+
iconSize: b,
|
1077
1083
|
loadingPosition: x,
|
1078
1084
|
isLoading: O,
|
1079
1085
|
LeftIcon: _,
|
@@ -1091,9 +1097,9 @@ function Nn(e) {
|
|
1091
1097
|
name: K,
|
1092
1098
|
defaultValue: Q,
|
1093
1099
|
...$
|
1094
|
-
} =
|
1100
|
+
} = Nn({ ...e, id: c, isError: m }, t), q = _ && !O, ie = H && !O, I = x === "left" && O, T = x === "right" && O;
|
1095
1101
|
function j() {
|
1096
|
-
|
1102
|
+
v || !(h != null && h.current) || (a(!0), h.current.focus());
|
1097
1103
|
}
|
1098
1104
|
function Z(G) {
|
1099
1105
|
a(!0), V && V(G);
|
@@ -1120,13 +1126,13 @@ function Nn(e) {
|
|
1120
1126
|
"section",
|
1121
1127
|
{
|
1122
1128
|
title: o,
|
1123
|
-
style:
|
1129
|
+
style: y,
|
1124
1130
|
onClick: j,
|
1125
1131
|
className: N,
|
1126
1132
|
children: [
|
1127
1133
|
w,
|
1128
1134
|
I && W,
|
1129
|
-
q && /* @__PURE__ */ r.jsx(_, { size:
|
1135
|
+
q && /* @__PURE__ */ r.jsx(_, { size: b, strokeWidth: 2.5 }),
|
1130
1136
|
/* @__PURE__ */ r.jsx(
|
1131
1137
|
"input",
|
1132
1138
|
{
|
@@ -1135,7 +1141,7 @@ function Nn(e) {
|
|
1135
1141
|
onBlur: le,
|
1136
1142
|
onFocus: Z,
|
1137
1143
|
onKeyUp: me,
|
1138
|
-
disabled:
|
1144
|
+
disabled: v || O,
|
1139
1145
|
readOnly: R,
|
1140
1146
|
...$
|
1141
1147
|
}
|
@@ -1150,13 +1156,13 @@ function Nn(e) {
|
|
1150
1156
|
}
|
1151
1157
|
),
|
1152
1158
|
T && W,
|
1153
|
-
ie && /* @__PURE__ */ r.jsx(H, { size:
|
1159
|
+
ie && /* @__PURE__ */ r.jsx(H, { size: b, strokeWidth: 2.5 }),
|
1154
1160
|
C
|
1155
1161
|
]
|
1156
1162
|
}
|
1157
1163
|
);
|
1158
1164
|
}
|
1159
|
-
function
|
1165
|
+
function En(e, t) {
|
1160
1166
|
const {
|
1161
1167
|
isLoading: a,
|
1162
1168
|
isError: s,
|
@@ -1167,17 +1173,17 @@ function jn(e, t) {
|
|
1167
1173
|
sufix: u,
|
1168
1174
|
leftIcon: h,
|
1169
1175
|
rightIcon: m,
|
1170
|
-
disabled:
|
1176
|
+
disabled: v,
|
1171
1177
|
readOnly: o,
|
1172
|
-
onFocus:
|
1178
|
+
onFocus: y,
|
1173
1179
|
onBlur: N,
|
1174
1180
|
title: w,
|
1175
1181
|
style: C,
|
1176
|
-
onChange:
|
1182
|
+
onChange: b,
|
1177
1183
|
showMask: x = !1,
|
1178
1184
|
type: O,
|
1179
1185
|
..._
|
1180
|
-
} = e, R = m ? "right" : "left", B = `arkyn_input ${c ? "hasPrefix" : ""} ${u ? "hasSufix" : ""} ${d} ${i} ${
|
1186
|
+
} = e, R = m ? "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];
|
1181
1187
|
return {
|
1182
1188
|
isLoading: a,
|
1183
1189
|
className: B,
|
@@ -1185,13 +1191,13 @@ function jn(e, t) {
|
|
1185
1191
|
sufix: Ee(u, E, "sufix"),
|
1186
1192
|
LeftIcon: h,
|
1187
1193
|
RightIcon: m,
|
1188
|
-
disabled:
|
1194
|
+
disabled: v,
|
1189
1195
|
readOnly: o,
|
1190
|
-
onFocus:
|
1196
|
+
onFocus: y,
|
1191
1197
|
onBlur: N,
|
1192
1198
|
title: w,
|
1193
1199
|
style: C,
|
1194
|
-
onChange:
|
1200
|
+
onChange: b,
|
1195
1201
|
loadingPosition: R,
|
1196
1202
|
iconSize: E,
|
1197
1203
|
showMask: x,
|
@@ -1199,18 +1205,18 @@ function jn(e, t) {
|
|
1199
1205
|
..._
|
1200
1206
|
};
|
1201
1207
|
}
|
1202
|
-
const
|
1203
|
-
function
|
1208
|
+
const Sn = an((e, t) => /* @__PURE__ */ r.jsx("input", { ref: t, ...e }));
|
1209
|
+
function Tn(e) {
|
1204
1210
|
const [t, a] = oe(!1), s = Se(null), { inputRef: i, id: l, error: d } = ve(), c = i || s, u = e.isError || !!d, {
|
1205
1211
|
disabled: h,
|
1206
1212
|
title: m,
|
1207
|
-
style:
|
1213
|
+
style: v,
|
1208
1214
|
className: o,
|
1209
|
-
prefix:
|
1215
|
+
prefix: y,
|
1210
1216
|
sufix: N,
|
1211
1217
|
iconSize: w,
|
1212
1218
|
loadingPosition: C,
|
1213
|
-
isLoading:
|
1219
|
+
isLoading: b,
|
1214
1220
|
LeftIcon: x,
|
1215
1221
|
readOnly: O,
|
1216
1222
|
onFocus: _,
|
@@ -1218,7 +1224,7 @@ function Sn(e) {
|
|
1218
1224
|
RightIcon: V,
|
1219
1225
|
Spinner: D,
|
1220
1226
|
...H
|
1221
|
-
} =
|
1227
|
+
} = En({ ...e, id: l, isError: u }, t), W = x && !b, J = V && !b, B = C === "left" && b, te = C === "right" && b;
|
1222
1228
|
function E() {
|
1223
1229
|
h || !(c != null && c.current) || (a(!0), c.current.focus());
|
1224
1230
|
}
|
@@ -1232,17 +1238,17 @@ function Sn(e) {
|
|
1232
1238
|
"section",
|
1233
1239
|
{
|
1234
1240
|
title: m,
|
1235
|
-
style:
|
1241
|
+
style: v,
|
1236
1242
|
onClick: E,
|
1237
1243
|
className: o,
|
1238
1244
|
children: [
|
1239
|
-
|
1245
|
+
y,
|
1240
1246
|
B && D,
|
1241
1247
|
W && /* @__PURE__ */ r.jsx(x, { size: w, strokeWidth: 2.5 }),
|
1242
1248
|
/* @__PURE__ */ r.jsx(
|
1243
1249
|
dn,
|
1244
1250
|
{
|
1245
|
-
component:
|
1251
|
+
component: Sn,
|
1246
1252
|
ref: c,
|
1247
1253
|
onFocus: U,
|
1248
1254
|
onBlur: M,
|
@@ -1257,7 +1263,7 @@ function Sn(e) {
|
|
1257
1263
|
}
|
1258
1264
|
);
|
1259
1265
|
}
|
1260
|
-
function
|
1266
|
+
function Rn(e, t) {
|
1261
1267
|
const {
|
1262
1268
|
isLoading: a,
|
1263
1269
|
isError: s,
|
@@ -1268,15 +1274,15 @@ function Tn(e, t) {
|
|
1268
1274
|
sufix: u,
|
1269
1275
|
leftIcon: h,
|
1270
1276
|
rightIcon: m,
|
1271
|
-
disabled:
|
1277
|
+
disabled: v,
|
1272
1278
|
readOnly: o,
|
1273
|
-
onFocus:
|
1279
|
+
onFocus: y,
|
1274
1280
|
onBlur: N,
|
1275
1281
|
title: w,
|
1276
1282
|
style: C,
|
1277
|
-
onChange:
|
1283
|
+
onChange: b,
|
1278
1284
|
...x
|
1279
|
-
} = e, O = m ? "right" : "left", W = `arkyn_input ${c ? "hasPrefix" : ""} ${u ? "hasSufix" : ""} ${d} ${i} ${
|
1285
|
+
} = e, O = m ? "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];
|
1280
1286
|
return {
|
1281
1287
|
isLoading: a,
|
1282
1288
|
className: W,
|
@@ -1284,30 +1290,30 @@ function Tn(e, t) {
|
|
1284
1290
|
sufix: Ee(u, B, "sufix"),
|
1285
1291
|
LeftIcon: h,
|
1286
1292
|
RightIcon: m,
|
1287
|
-
disabled:
|
1293
|
+
disabled: v,
|
1288
1294
|
readOnly: o,
|
1289
|
-
onFocus:
|
1295
|
+
onFocus: y,
|
1290
1296
|
onBlur: N,
|
1291
1297
|
title: w,
|
1292
1298
|
style: C,
|
1293
|
-
onChange:
|
1299
|
+
onChange: b,
|
1294
1300
|
loadingPosition: O,
|
1295
1301
|
iconSize: B,
|
1296
1302
|
Spinner: /* @__PURE__ */ r.jsx($e, { className: "spinner", size: B, strokeWidth: 2.5 }),
|
1297
1303
|
...x
|
1298
1304
|
};
|
1299
1305
|
}
|
1300
|
-
function
|
1306
|
+
function $n(e) {
|
1301
1307
|
const [t, a] = oe(!1), s = Se(null), { inputRef: i, id: l, error: d } = ve(), c = i || s, u = e.isError || !!d, {
|
1302
1308
|
disabled: h,
|
1303
1309
|
title: m,
|
1304
|
-
style:
|
1310
|
+
style: v,
|
1305
1311
|
className: o,
|
1306
|
-
prefix:
|
1312
|
+
prefix: y,
|
1307
1313
|
sufix: N,
|
1308
1314
|
iconSize: w,
|
1309
1315
|
loadingPosition: C,
|
1310
|
-
isLoading:
|
1316
|
+
isLoading: b,
|
1311
1317
|
LeftIcon: x,
|
1312
1318
|
readOnly: O,
|
1313
1319
|
onFocus: _,
|
@@ -1316,7 +1322,7 @@ function Rn(e) {
|
|
1316
1322
|
type: D,
|
1317
1323
|
Spinner: H,
|
1318
1324
|
...W
|
1319
|
-
} =
|
1325
|
+
} = Rn({ ...e, id: l, isError: u }, t), J = x && !b, B = V && !b, te = C === "left" && b, E = C === "right" && b;
|
1320
1326
|
function U() {
|
1321
1327
|
h || !(c != null && c.current) || (a(!0), c.current.focus());
|
1322
1328
|
}
|
@@ -1339,17 +1345,17 @@ function Rn(e) {
|
|
1339
1345
|
"section",
|
1340
1346
|
{
|
1341
1347
|
title: m,
|
1342
|
-
style:
|
1348
|
+
style: v,
|
1343
1349
|
onClick: U,
|
1344
1350
|
className: o,
|
1345
1351
|
children: [
|
1346
|
-
|
1352
|
+
y,
|
1347
1353
|
te && H,
|
1348
1354
|
J && /* @__PURE__ */ r.jsx(x, { size: w, strokeWidth: 2.5 }),
|
1349
1355
|
/* @__PURE__ */ r.jsx(
|
1350
1356
|
"input",
|
1351
1357
|
{
|
1352
|
-
disabled: h ||
|
1358
|
+
disabled: h || b,
|
1353
1359
|
readOnly: O,
|
1354
1360
|
ref: c,
|
1355
1361
|
onFocus: M,
|
@@ -1366,10 +1372,10 @@ function Rn(e) {
|
|
1366
1372
|
);
|
1367
1373
|
}
|
1368
1374
|
function _a(e) {
|
1369
|
-
return e.type === "currency" ? /* @__PURE__ */ r.jsx(
|
1375
|
+
return e.type === "currency" ? /* @__PURE__ */ r.jsx(jn, { ...e }) : e.type === "masked" ? /* @__PURE__ */ r.jsx(Tn, { ...e }) : e.type === "cpf-cnpj" ? /* @__PURE__ */ r.jsx(wn, { ...e }) : /* @__PURE__ */ r.jsx($n, { ...e });
|
1370
1376
|
}
|
1371
1377
|
const Lt = Ce({});
|
1372
|
-
function
|
1378
|
+
function Pn() {
|
1373
1379
|
return ye(Lt);
|
1374
1380
|
}
|
1375
1381
|
function Fa(e) {
|
@@ -1381,11 +1387,11 @@ function Fa(e) {
|
|
1381
1387
|
size: l = "md",
|
1382
1388
|
className: d = "",
|
1383
1389
|
...c
|
1384
|
-
} = e, [u, h] = oe(t || ""), { inputRef: m, id:
|
1390
|
+
} = e, [u, h] = oe(t || ""), { inputRef: m, id: v } = ve();
|
1385
1391
|
function o(N) {
|
1386
1392
|
h(N), i && i(N);
|
1387
1393
|
}
|
1388
|
-
const
|
1394
|
+
const y = `arkynRadioGroup ${l} ${d}`;
|
1389
1395
|
return /* @__PURE__ */ r.jsxs(
|
1390
1396
|
Lt.Provider,
|
1391
1397
|
{
|
@@ -1396,14 +1402,14 @@ function Fa(e) {
|
|
1396
1402
|
{
|
1397
1403
|
style: { display: "none" },
|
1398
1404
|
type: "text",
|
1399
|
-
id:
|
1405
|
+
id: v,
|
1400
1406
|
readOnly: !0,
|
1401
1407
|
name: a,
|
1402
1408
|
ref: m,
|
1403
1409
|
value: u
|
1404
1410
|
}
|
1405
1411
|
),
|
1406
|
-
/* @__PURE__ */ r.jsx("div", { className:
|
1412
|
+
/* @__PURE__ */ r.jsx("div", { className: y.trim(), ...c })
|
1407
1413
|
]
|
1408
1414
|
}
|
1409
1415
|
);
|
@@ -1416,7 +1422,7 @@ function Oa(e) {
|
|
1416
1422
|
children: i,
|
1417
1423
|
className: l = "",
|
1418
1424
|
...d
|
1419
|
-
} = e, { onChange: c, size: u, value: h } =
|
1425
|
+
} = e, { onChange: c, size: u, value: h } = Pn(), { error: m } = ve(), w = `arkynRadioBox ${a || u} ${h === t ? "checkedTrue" : "checkedFalse"} ${m ? "errorTrue" : "errorFalse"} ${s ? "disabledTrue" : "disabledFalse"} ${l}`;
|
1420
1426
|
return /* @__PURE__ */ r.jsxs("label", { className: w.trim(), children: [
|
1421
1427
|
/* @__PURE__ */ r.jsx(
|
1422
1428
|
"button",
|
@@ -1431,7 +1437,7 @@ function Oa(e) {
|
|
1431
1437
|
i
|
1432
1438
|
] });
|
1433
1439
|
}
|
1434
|
-
function
|
1440
|
+
function In(e, t) {
|
1435
1441
|
const {
|
1436
1442
|
isLoading: a,
|
1437
1443
|
isError: s,
|
@@ -1442,9 +1448,9 @@ function Pn(e, t) {
|
|
1442
1448
|
leftIcon: u,
|
1443
1449
|
disabled: h,
|
1444
1450
|
readOnly: m,
|
1445
|
-
onFocus:
|
1451
|
+
onFocus: v,
|
1446
1452
|
onBlur: o,
|
1447
|
-
title:
|
1453
|
+
title: y,
|
1448
1454
|
style: N,
|
1449
1455
|
closeOnSelect: w = !0,
|
1450
1456
|
...C
|
@@ -1452,12 +1458,12 @@ function Pn(e, t) {
|
|
1452
1458
|
return {
|
1453
1459
|
isLoading: a,
|
1454
1460
|
className: R,
|
1455
|
-
prefix:
|
1461
|
+
prefix: yn(c, D, "prefix"),
|
1456
1462
|
LeftIcon: u,
|
1457
1463
|
disabled: h || a || m,
|
1458
|
-
onFocus:
|
1464
|
+
onFocus: v,
|
1459
1465
|
onBlur: o,
|
1460
|
-
title:
|
1466
|
+
title: y,
|
1461
1467
|
closeOnSelect: w,
|
1462
1468
|
style: N,
|
1463
1469
|
iconSize: D,
|
@@ -1470,13 +1476,13 @@ function Ba(e) {
|
|
1470
1476
|
const [t, a] = oe(!1), { inputRef: s, id: i, error: l } = ve(), d = Se(null), c = s || d, u = e.isError || !!l, {
|
1471
1477
|
disabled: h,
|
1472
1478
|
title: m,
|
1473
|
-
style:
|
1479
|
+
style: v,
|
1474
1480
|
className: o,
|
1475
|
-
prefix:
|
1481
|
+
prefix: y,
|
1476
1482
|
iconSize: N,
|
1477
1483
|
isLoading: w,
|
1478
1484
|
LeftIcon: C,
|
1479
|
-
value:
|
1485
|
+
value: b = null,
|
1480
1486
|
defaultValue: x = "",
|
1481
1487
|
onFocus: O,
|
1482
1488
|
onBlur: _,
|
@@ -1488,7 +1494,7 @@ function Ba(e) {
|
|
1488
1494
|
optionMaxHeight: J,
|
1489
1495
|
closeOnSelect: B,
|
1490
1496
|
...te
|
1491
|
-
} =
|
1497
|
+
} = In({ ...e, id: i, isError: u }, t), [E, U] = oe(x);
|
1492
1498
|
function M() {
|
1493
1499
|
h || !(c != null && c.current) || t || (a(!0), c.current.focus());
|
1494
1500
|
}
|
@@ -1502,7 +1508,7 @@ function Ba(e) {
|
|
1502
1508
|
const { label: Z, value: le } = j;
|
1503
1509
|
U(E !== le ? le : ""), H && H({ label: Z, value: le }), B && Q();
|
1504
1510
|
}
|
1505
|
-
const q = typeof
|
1511
|
+
const q = typeof b == "string" ? b : E, ie = ((T = W.find((j) => j.value === q)) == null ? void 0 : T.label) || "", I = () => {
|
1506
1512
|
if (!t && ie) return !0;
|
1507
1513
|
if (!t && !ie) return !1;
|
1508
1514
|
if (t && ie) return !0;
|
@@ -1513,11 +1519,11 @@ function Ba(e) {
|
|
1513
1519
|
"section",
|
1514
1520
|
{
|
1515
1521
|
title: m,
|
1516
|
-
style:
|
1522
|
+
style: v,
|
1517
1523
|
onClick: M,
|
1518
1524
|
className: `${o} placeholder_dark_${I()}`,
|
1519
1525
|
children: [
|
1520
|
-
|
1526
|
+
y,
|
1521
1527
|
C && /* @__PURE__ */ r.jsx(C, { size: N, strokeWidth: 2.5 }),
|
1522
1528
|
/* @__PURE__ */ r.jsx(
|
1523
1529
|
"input",
|
@@ -1589,9 +1595,9 @@ function za(e) {
|
|
1589
1595
|
title: u,
|
1590
1596
|
style: h,
|
1591
1597
|
...m
|
1592
|
-
} = e, [
|
1598
|
+
} = e, [v, o] = oe(!1), { inputRef: y, id: N, error: w } = ve(), C = Se(null), b = y || C, O = e.isError || !!w ? "errorTrue" : "errorFalse", V = `arkynTextarea ${t} ${a} ${i || l ? "opacityTrue" : "opacityFalse"} ${O} ${v ? "focusedTrue" : "focusedFalse"} ${s}`;
|
1593
1599
|
function D() {
|
1594
|
-
i || !(
|
1600
|
+
i || !(b != null && b.current) || (o(!0), b.current.focus());
|
1595
1601
|
}
|
1596
1602
|
function H(J) {
|
1597
1603
|
o(!0), d && d(J);
|
@@ -1612,7 +1618,7 @@ function za(e) {
|
|
1612
1618
|
id: N,
|
1613
1619
|
disabled: i,
|
1614
1620
|
readOnly: l,
|
1615
|
-
ref:
|
1621
|
+
ref: b,
|
1616
1622
|
onFocus: H,
|
1617
1623
|
onBlur: W,
|
1618
1624
|
...m
|
@@ -1641,7 +1647,7 @@ function Ma(e) {
|
|
1641
1647
|
i
|
1642
1648
|
] });
|
1643
1649
|
}
|
1644
|
-
function
|
1650
|
+
function _n(e = "") {
|
1645
1651
|
const t = It(), a = new URLSearchParams(t.search), s = e ? `${e}:` : "", i = (l) => {
|
1646
1652
|
Object.entries(l).forEach(([d, c]) => {
|
1647
1653
|
c === void 0 ? a.delete(`${s}${d}`) : a.set(`${s}${d}`, String(c));
|
@@ -1664,7 +1670,7 @@ function La(e) {
|
|
1664
1670
|
pageKey: i = "page",
|
1665
1671
|
siblingsCount: l = 2,
|
1666
1672
|
...d
|
1667
|
-
} = e, c = un(), { getParam: u, getScopedSearch: h } =
|
1673
|
+
} = e, c = un(), { getParam: u, getScopedSearch: h } = _n(t), m = Number(u(i)) || 1, v = Number(u(s)) || 20, o = Math.ceil(a / v), y = bn(m, l), N = vn(m, l, o);
|
1668
1674
|
function w(C) {
|
1669
1675
|
c(h({ page: C }));
|
1670
1676
|
}
|
@@ -1689,24 +1695,24 @@ function La(e) {
|
|
1689
1695
|
),
|
1690
1696
|
m > 2 + l && /* @__PURE__ */ r.jsx("button", { disabled: !0, className: "arkynPaginationSpread", children: /* @__PURE__ */ r.jsx(xt, {}) })
|
1691
1697
|
] }),
|
1692
|
-
|
1698
|
+
y.map((C, b) => /* @__PURE__ */ r.jsx(
|
1693
1699
|
"button",
|
1694
1700
|
{
|
1695
1701
|
onClick: () => w(C),
|
1696
1702
|
className: "arkynPaginationPageButton",
|
1697
1703
|
children: C
|
1698
1704
|
},
|
1699
|
-
|
1705
|
+
b
|
1700
1706
|
)),
|
1701
1707
|
/* @__PURE__ */ r.jsx("button", { className: "arkynPaginationCurrent", disabled: !0, children: m }),
|
1702
|
-
N.map((C,
|
1708
|
+
N.map((C, b) => /* @__PURE__ */ r.jsx(
|
1703
1709
|
"button",
|
1704
1710
|
{
|
1705
1711
|
onClick: () => w(C),
|
1706
1712
|
className: "arkynPaginationPageButton",
|
1707
1713
|
children: C
|
1708
1714
|
},
|
1709
|
-
|
1715
|
+
b
|
1710
1716
|
)),
|
1711
1717
|
m + l < o && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
1712
1718
|
m + 1 + l < o && /* @__PURE__ */ r.jsx("button", { disabled: !0, className: "arkynPaginationSpread", children: /* @__PURE__ */ r.jsx(xt, {}) }),
|
@@ -1731,7 +1737,7 @@ function La(e) {
|
|
1731
1737
|
] });
|
1732
1738
|
}
|
1733
1739
|
const ut = Ce({});
|
1734
|
-
function
|
1740
|
+
function Fn() {
|
1735
1741
|
if (!ut)
|
1736
1742
|
throw new Error("useTabContext must be used within a TabProvider");
|
1737
1743
|
return ye(ut);
|
@@ -1743,13 +1749,13 @@ function Aa(e) {
|
|
1743
1749
|
defaultActive: s,
|
1744
1750
|
className: i,
|
1745
1751
|
...l
|
1746
|
-
} = e, [d, c] = oe(s || ""), [u, h] = oe(!0), m = Se(null),
|
1752
|
+
} = e, [d, c] = oe(s || ""), [u, h] = oe(!0), m = Se(null), v = `arkynTabContainer ${i || ""}`, [o, y] = oe({
|
1747
1753
|
width: "0px",
|
1748
1754
|
left: "0px",
|
1749
1755
|
transition: "none"
|
1750
|
-
}), N = (C,
|
1751
|
-
const x = C.getBoundingClientRect(), O = m.current.getBoundingClientRect(), _ =
|
1752
|
-
h(!1),
|
1756
|
+
}), N = (C, b) => {
|
1757
|
+
const x = C.getBoundingClientRect(), O = m.current.getBoundingClientRect(), _ = b ? void 0 : "none";
|
1758
|
+
h(!1), y({
|
1753
1759
|
transition: _,
|
1754
1760
|
width: `${x.width}px`,
|
1755
1761
|
left: `${x.left - O.left}px`
|
@@ -1758,24 +1764,24 @@ function Aa(e) {
|
|
1758
1764
|
Ze(() => {
|
1759
1765
|
const C = m.current;
|
1760
1766
|
if (!C) return;
|
1761
|
-
let
|
1762
|
-
|
1767
|
+
let b = null;
|
1768
|
+
b = C.querySelector("button.active"), b && N(b);
|
1763
1769
|
}, []);
|
1764
1770
|
const w = (C) => {
|
1765
|
-
const
|
1766
|
-
|
1771
|
+
const b = C.target;
|
1772
|
+
b && (c(b.value), b.classList.add("active"), N(b, !0), a && a(b.value));
|
1767
1773
|
};
|
1768
|
-
return /* @__PURE__ */ r.jsxs("nav", { ref: m, className:
|
1774
|
+
return /* @__PURE__ */ r.jsxs("nav", { ref: m, className: v.trim(), ...l, children: [
|
1769
1775
|
/* @__PURE__ */ r.jsx(ut.Provider, { value: { handleTabClick: w, showInitialTab: u, value: d }, children: t }),
|
1770
1776
|
/* @__PURE__ */ r.jsx("div", { className: "activeLine", style: o })
|
1771
1777
|
] });
|
1772
1778
|
}
|
1773
1779
|
function Va(e) {
|
1774
|
-
const { children: t, className: a = "", onClick: s, ...i } = e, { value: l, showInitialTab: d, handleTabClick: c } =
|
1775
|
-
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", m = `arkynTabButton ${l === i.value && d ? "showBorderBottom" : ""} ${u} ${a}`;
|
1781
|
+
function v(o) {
|
1776
1782
|
c(o), s && s(o);
|
1777
1783
|
}
|
1778
|
-
return /* @__PURE__ */ r.jsx("button", { onClick:
|
1784
|
+
return /* @__PURE__ */ r.jsx("button", { onClick: v, className: m.trim(), ...i, children: t });
|
1779
1785
|
}
|
1780
1786
|
const At = Ce({});
|
1781
1787
|
function Wa(e) {
|
@@ -1915,7 +1921,7 @@ function Xa(e) {
|
|
1915
1921
|
l && /* @__PURE__ */ r.jsx("div", { onClick: () => d(!1), className: "arkynPopoverOverlay" })
|
1916
1922
|
] });
|
1917
1923
|
}
|
1918
|
-
function
|
1924
|
+
function On(e) {
|
1919
1925
|
const { message: t, title: a, type: s, size: i = "lg" } = e, l = `arkynToast ${s} ${i}`;
|
1920
1926
|
function d() {
|
1921
1927
|
switch (s) {
|
@@ -1957,7 +1963,7 @@ function Ga(e) {
|
|
1957
1963
|
] });
|
1958
1964
|
}
|
1959
1965
|
const ht = Ce({}), Wt = Ce({});
|
1960
|
-
function
|
1966
|
+
function Bn() {
|
1961
1967
|
const e = ye(Wt);
|
1962
1968
|
if (Object.entries(e).length === 0)
|
1963
1969
|
throw new Error("useToast must be used within a Provider");
|
@@ -1967,7 +1973,7 @@ function jt(e) {
|
|
1967
1973
|
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");
|
1968
1974
|
}
|
1969
1975
|
function Ja() {
|
1970
|
-
const e = Pt(), { closeModal: t } = ye(ht), { showToast: a } =
|
1976
|
+
const e = Pt(), { closeModal: t } = ye(ht), { showToast: a } = Bn();
|
1971
1977
|
Ze(() => {
|
1972
1978
|
const s = e == null ? void 0 : e.closeModalKey;
|
1973
1979
|
s && t(s);
|
@@ -2022,7 +2028,7 @@ function Qa(e) {
|
|
2022
2028
|
}
|
2023
2029
|
function d(u, h) {
|
2024
2030
|
const m = i(u);
|
2025
|
-
s(m ? (
|
2031
|
+
s(m ? (v) => [...v.filter((y) => y.key !== u), { key: u, data: h }] : [...a, { key: u, data: h }]);
|
2026
2032
|
}
|
2027
2033
|
function c(u) {
|
2028
2034
|
s(a.filter((h) => h.key !== u));
|
@@ -2046,7 +2052,7 @@ function er(e) {
|
|
2046
2052
|
}
|
2047
2053
|
function d(u, h) {
|
2048
2054
|
const m = i(u);
|
2049
|
-
s(m ? (
|
2055
|
+
s(m ? (v) => [...v.filter((y) => y.key !== u), { key: u, data: h }] : [...a, { key: u, data: h }]);
|
2050
2056
|
}
|
2051
2057
|
function c(u) {
|
2052
2058
|
s(a.filter((h) => h.key !== u));
|
@@ -2059,20 +2065,20 @@ function er(e) {
|
|
2059
2065
|
}
|
2060
2066
|
);
|
2061
2067
|
}
|
2062
|
-
var
|
2068
|
+
var zn = (e) => {
|
2063
2069
|
switch (e) {
|
2064
2070
|
case "success":
|
2065
|
-
return
|
2071
|
+
return Ln;
|
2066
2072
|
case "info":
|
2067
|
-
return
|
2073
|
+
return Vn;
|
2068
2074
|
case "warning":
|
2069
|
-
return
|
2075
|
+
return An;
|
2070
2076
|
case "error":
|
2071
|
-
return
|
2077
|
+
return Wn;
|
2072
2078
|
default:
|
2073
2079
|
return null;
|
2074
2080
|
}
|
2075
|
-
},
|
2081
|
+
}, Dn = Array(12).fill(0), Mn = ({ visible: e }) => p.createElement("div", { className: "sonner-loading-wrapper", "data-visible": e }, p.createElement("div", { className: "sonner-spinner" }, Dn.map((t, a) => p.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${a}` })))), Ln = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), An = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), Vn = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), Wn = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), Yn = () => {
|
2076
2082
|
let [e, t] = p.useState(document.hidden);
|
2077
2083
|
return p.useEffect(() => {
|
2078
2084
|
let a = () => {
|
@@ -2080,7 +2086,7 @@ var Bn = (e) => {
|
|
2080
2086
|
};
|
2081
2087
|
return document.addEventListener("visibilitychange", a), () => window.removeEventListener("visibilitychange", a);
|
2082
2088
|
}, []), e;
|
2083
|
-
}, dt = 1,
|
2089
|
+
}, dt = 1, Hn = class {
|
2084
2090
|
constructor() {
|
2085
2091
|
this.subscribe = (e) => (this.subscribers.push(e), () => {
|
2086
2092
|
let t = this.subscribers.indexOf(e);
|
@@ -2101,7 +2107,7 @@ var Bn = (e) => {
|
|
2101
2107
|
t.loading !== void 0 && (a = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
|
2102
2108
|
let s = e instanceof Promise ? e : e(), i = a !== void 0;
|
2103
2109
|
return s.then(async (l) => {
|
2104
|
-
if (
|
2110
|
+
if (Kn(l) && !l.ok) {
|
2105
2111
|
i = !1;
|
2106
2112
|
let d = typeof t.error == "function" ? await t.error(`HTTP error! status: ${l.status}`) : t.error, c = typeof t.description == "function" ? await t.description(`HTTP error! status: ${l.status}`) : t.description;
|
2107
2113
|
this.create({ id: a, type: "error", message: d, description: c });
|
@@ -2125,30 +2131,30 @@ var Bn = (e) => {
|
|
2125
2131
|
return this.create({ jsx: e(a), id: a, ...t }), a;
|
2126
2132
|
}, this.subscribers = [], this.toasts = [];
|
2127
2133
|
}
|
2128
|
-
}, fe = new
|
2134
|
+
}, fe = new Hn(), Un = (e, t) => {
|
2129
2135
|
let a = (t == null ? void 0 : t.id) || dt++;
|
2130
2136
|
return fe.addToast({ title: e, ...t, id: a }), a;
|
2131
|
-
},
|
2132
|
-
function
|
2137
|
+
}, Kn = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", Xn = Un, Gn = () => fe.toasts, Jn = Object.assign(Xn, { success: fe.success, info: fe.info, warning: fe.warning, error: fe.error, custom: fe.custom, message: fe.message, promise: fe.promise, dismiss: fe.dismiss, loading: fe.loading }, { getHistory: Gn });
|
2138
|
+
function qn(e, { insertAt: t } = {}) {
|
2133
2139
|
if (!e || typeof document > "u") return;
|
2134
2140
|
let a = document.head || document.getElementsByTagName("head")[0], s = document.createElement("style");
|
2135
2141
|
s.type = "text/css", t === "top" && a.firstChild ? a.insertBefore(s, a.firstChild) : a.appendChild(s), s.styleSheet ? s.styleSheet.cssText = e : s.appendChild(document.createTextNode(e));
|
2136
2142
|
}
|
2137
|
-
Jn(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
2143
|
+
qn(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
2138
2144
|
`);
|
2139
2145
|
function qe(e) {
|
2140
2146
|
return e.label !== void 0;
|
2141
2147
|
}
|
2142
|
-
var
|
2143
|
-
function
|
2148
|
+
var Zn = 3, Qn = "32px", ea = 4e3, ta = 356, na = 14, aa = 20, ra = 200;
|
2149
|
+
function sa(...e) {
|
2144
2150
|
return e.filter(Boolean).join(" ");
|
2145
2151
|
}
|
2146
|
-
var
|
2152
|
+
var oa = (e) => {
|
2147
2153
|
var t, a, s, i, l, d, c, u, h, m;
|
2148
|
-
let { invert:
|
2154
|
+
let { invert: v, toast: o, unstyled: y, interacting: N, setHeights: w, visibleToasts: C, heights: b, index: x, 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, me] = p.useState(!1), [G, ae] = p.useState(!1), [ke, Pe] = p.useState(0), [et, We] = p.useState(0), Te = p.useRef(null), he = p.useRef(null), Ye = x === 0, He = x + 1 <= C, re = 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(() => {
|
2149
2155
|
var S;
|
2150
2156
|
return (S = o.closeButton) != null ? S : D;
|
2151
|
-
}, [o.closeButton, D]), Be = p.useMemo(() => o.duration || E ||
|
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 = re === "loading";
|
2152
2158
|
pe.current = p.useMemo(() => Ie * M + Ke, [Ie, Ke]), p.useEffect(() => {
|
2153
2159
|
Z(!0);
|
2154
2160
|
}, []), p.useLayoutEffect(() => {
|
@@ -2161,7 +2167,7 @@ var sa = (e) => {
|
|
2161
2167
|
let be = p.useCallback(() => {
|
2162
2168
|
X(!0), Pe(pe.current), w((S) => S.filter((L) => L.toastId !== o.id)), setTimeout(() => {
|
2163
2169
|
R(o);
|
2164
|
-
},
|
2170
|
+
}, ra);
|
2165
2171
|
}, [o, R, w, pe]);
|
2166
2172
|
p.useEffect(() => {
|
2167
2173
|
if (o.promise && re === "loading" || o.duration === 1 / 0 || o.type === "loading") return;
|
@@ -2186,16 +2192,16 @@ var sa = (e) => {
|
|
2186
2192
|
o.delete && be();
|
2187
2193
|
}, [be, o.delete]);
|
2188
2194
|
function rt() {
|
2189
|
-
return q != null && q.loading ? p.createElement("div", { className: "sonner-loader", "data-visible": re === "loading" }, q.loading) : K ? p.createElement("div", { className: "sonner-loader", "data-visible": re === "loading" }, K) : p.createElement(
|
2195
|
+
return q != null && q.loading ? p.createElement("div", { className: "sonner-loader", "data-visible": re === "loading" }, q.loading) : K ? p.createElement("div", { className: "sonner-loader", "data-visible": re === "loading" }, K) : p.createElement(Mn, { visible: re === "loading" });
|
2190
2196
|
}
|
2191
|
-
return p.createElement("li", { "aria-live": o.important ? "assertive" : "polite", "aria-atomic": "true", role: "status", tabIndex: 0, ref: he, 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 : $[re], (a = o == null ? void 0 : o.classNames) == null ? void 0 : a[re]), "data-sonner-toast": "", "data-rich-colors": (s = o.richColors) != null ? s : V, "data-styled": !(o.jsx || o.unstyled ||
|
2197
|
+
return p.createElement("li", { "aria-live": o.important ? "assertive" : "polite", "aria-atomic": "true", role: "status", tabIndex: 0, ref: he, 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 : $[re], (a = o == null ? void 0 : o.classNames) == null ? void 0 : a[re]), "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": x, "data-front": Ye, "data-swiping": xe, "data-dismissible": Ne, "data-type": re, "data-invert": at, "data-swipe-out": G, "data-expanded": !!(_ || Q && j), style: { "--index": x, "--toasts-before": x, "--z-index": O.length - x, "--offset": `${le ? ke : pe.current}px`, "--initial-height": Q ? "auto" : `${et}px`, ...H, ...o.style }, onPointerDown: (S) => {
|
2192
2198
|
Me || !Ne || (Te.current = /* @__PURE__ */ new Date(), Pe(pe.current), S.target.setPointerCapture(S.pointerId), S.target.tagName !== "BUTTON" && (me(!0), we.current = { x: S.clientX, y: S.clientY }));
|
2193
2199
|
}, onPointerUp: () => {
|
2194
2200
|
var S, L, A, se;
|
2195
2201
|
if (G || !Ne) return;
|
2196
2202
|
we.current = null;
|
2197
2203
|
let ue = Number(((S = he.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;
|
2198
|
-
if (Math.abs(ue) >=
|
2204
|
+
if (Math.abs(ue) >= aa || Ge > 0.11) {
|
2199
2205
|
Pe(pe.current), (A = o.onDismiss) == null || A.call(o, o), be(), ae(!0);
|
2200
2206
|
return;
|
2201
2207
|
}
|
@@ -2209,7 +2215,7 @@ var sa = (e) => {
|
|
2209
2215
|
} : () => {
|
2210
2216
|
var S;
|
2211
2217
|
be(), (S = o.onDismiss) == null || S.call(o, o);
|
2212
|
-
}, 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, re || 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[re]) ||
|
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, re || 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[re]) || zn(re) : 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) => {
|
2213
2219
|
var L, A;
|
2214
2220
|
qe(o.cancel) && Ne && ((A = (L = o.cancel).onClick) == null || A.call(L, S), be());
|
2215
2221
|
}, className: T($ == null ? void 0 : $.cancelButton, (h = o == null ? void 0 : o.classNames) == null ? void 0 : h.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,8 +2228,8 @@ function Et() {
|
|
2222
2228
|
let e = document.documentElement.getAttribute("dir");
|
2223
2229
|
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
2224
2230
|
}
|
2225
|
-
var
|
2226
|
-
let { invert: t, position: a = "bottom-right", hotkey: s = ["altKey", "KeyT"], expand: i, closeButton: l, className: d, offset: c, theme: u = "light", richColors: h, duration: m, style:
|
2231
|
+
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: h, duration: m, style: v, visibleToasts: o = Zn, toastOptions: y, dir: N = Et(), gap: w = na, loadingIcon: C, icons: b, containerAriaLabel: x = "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) => {
|
2227
2233
|
var T;
|
2228
2234
|
(T = R.find((j) => j.id === I.id)) != null && T.delete || fe.dismiss(I.id), V((j) => j.filter(({ id: Z }) => Z !== I.id));
|
2229
2235
|
}, [R]);
|
@@ -2263,7 +2269,7 @@ var oa = (e) => {
|
|
2263
2269
|
}, [K.current]), R.length ? p.createElement("section", { "aria-label": `${x} ${Q}`, tabIndex: -1 }, D.map((I, T) => {
|
2264
2270
|
var j;
|
2265
2271
|
let [Z, le] = I.split("-");
|
2266
|
-
return p.createElement("ol", { key: I, dir: N === "auto" ? Et() : N, 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 ||
|
2272
|
+
return p.createElement("ol", { key: I, dir: N === "auto" ? Et() : N, 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": `${w}px`, ...v }, onBlur: (X) => {
|
2267
2273
|
q.current && !X.currentTarget.contains(X.relatedTarget) && (q.current = !1, $.current && ($.current.focus({ preventScroll: !0 }), $.current = null));
|
2268
2274
|
}, onFocus: (X) => {
|
2269
2275
|
X.target instanceof HTMLElement && X.target.dataset.dismissible === "false" || q.current || (q.current = !0, $.current = X.relatedTarget);
|
@@ -2273,25 +2279,25 @@ var oa = (e) => {
|
|
2273
2279
|
X.target instanceof HTMLElement && X.target.dataset.dismissible === "false" || E(!0);
|
2274
2280
|
}, onPointerUp: () => E(!1) }, R.filter((X) => !X.position && T === 0 || X.position === I).map((X, xe) => {
|
2275
2281
|
var me, G;
|
2276
|
-
return p.createElement(
|
2282
|
+
return p.createElement(oa, { key: X.id, icons: b, index: xe, toast: X, defaultRichColors: h, duration: (me = y == null ? void 0 : y.duration) != null ? me : m, 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((ae) => ae.position == X.position), heights: H.filter((ae) => ae.position == X.position), setHeights: W, expandByDefault: i, gap: w, loadingIcon: C, expanded: J, pauseWhenPageIsHidden: O, cn: _ });
|
2277
2283
|
}));
|
2278
2284
|
})) : null;
|
2279
2285
|
};
|
2280
2286
|
function tr({ children: e }) {
|
2281
2287
|
function t(a) {
|
2282
|
-
|
2288
|
+
Jn.custom((s) => /* @__PURE__ */ r.jsx(On, { ...a }));
|
2283
2289
|
}
|
2284
2290
|
return /* @__PURE__ */ r.jsxs(Wt.Provider, { value: { showToast: t }, children: [
|
2285
|
-
/* @__PURE__ */ r.jsx(
|
2291
|
+
/* @__PURE__ */ r.jsx(ia, {}),
|
2286
2292
|
e
|
2287
2293
|
] });
|
2288
2294
|
}
|
2289
2295
|
export {
|
2290
|
-
|
2291
|
-
|
2292
|
-
|
2293
|
-
|
2294
|
-
|
2296
|
+
ha as AlertContainer,
|
2297
|
+
pa as AlertContent,
|
2298
|
+
ga as AlertDescription,
|
2299
|
+
va as AlertIcon,
|
2300
|
+
pn as AlertTitle,
|
2295
2301
|
ba as Badge,
|
2296
2302
|
Da as BreadcrumbContainer,
|
2297
2303
|
Ma as BreadcrumbLink,
|
@@ -2325,12 +2331,12 @@ export {
|
|
2325
2331
|
ja as TableFooter,
|
2326
2332
|
Ea as TableHeader,
|
2327
2333
|
za as Textarea,
|
2328
|
-
|
2334
|
+
On as Toast,
|
2329
2335
|
tr as ToastProvider,
|
2330
2336
|
Ga as Tooltip,
|
2331
2337
|
Ja as useAutomation,
|
2332
2338
|
qa as useDrawer,
|
2333
2339
|
Za as useModal,
|
2334
|
-
|
2335
|
-
|
2340
|
+
_n as useScopedParams,
|
2341
|
+
Bn as useToast
|
2336
2342
|
};
|