@kenlo/kdls-design-system 2.25.1 → 2.26.0
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/components/Toggle/Toggle.d.ts +2 -0
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +504 -504
- package/kdls-manifest.json +9 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -238,19 +238,19 @@ function l5() {
|
|
|
238
238
|
const r = new Array(arguments.length);
|
|
239
239
|
let i = "";
|
|
240
240
|
for (let k = 0; k < arguments.length; k++) {
|
|
241
|
-
const
|
|
242
|
-
if (typeof
|
|
243
|
-
const v =
|
|
241
|
+
const h = arguments[k];
|
|
242
|
+
if (typeof h == "string" && h !== "") {
|
|
243
|
+
const v = h.indexOf(_e);
|
|
244
244
|
if (v === -1)
|
|
245
|
-
process.env.NODE_ENV !== "production" &&
|
|
246
|
-
|
|
247
|
-
Source string: ${
|
|
248
|
-
}), n +=
|
|
245
|
+
process.env.NODE_ENV !== "production" && h.split(" ").forEach((C) => {
|
|
246
|
+
C.startsWith(U5) && et[C] && (i ? console.error(`mergeClasses(): a passed string contains multiple classes produced by makeResetStyles (${h} & ${n}, this will lead to non-deterministic behavior. Learn more:https://griffel.js.org/react/api/make-reset-styles#limitations
|
|
247
|
+
Source string: ${h}`) : i = C);
|
|
248
|
+
}), n += h + " ";
|
|
249
249
|
else {
|
|
250
|
-
const
|
|
251
|
-
v > 0 && (n +=
|
|
250
|
+
const C = h.substr(v, e5);
|
|
251
|
+
v > 0 && (n += h.slice(0, v)), l += C, r[k] = C;
|
|
252
252
|
}
|
|
253
|
-
process.env.NODE_ENV !== "production" &&
|
|
253
|
+
process.env.NODE_ENV !== "production" && h.indexOf(_e, v + 1) !== -1 && console.error(`mergeClasses(): a passed string contains multiple identifiers of atomic classes (classes that start with "${_e}"), it's possible that passed classes were concatenated in a wrong way. Source string: ${h}`);
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
if (l === "")
|
|
@@ -260,10 +260,10 @@ Source string: ${C}`) : i = h);
|
|
|
260
260
|
return n + s;
|
|
261
261
|
const o = [];
|
|
262
262
|
for (let k = 0; k < arguments.length; k++) {
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
const v = n2[
|
|
266
|
-
v ? (o.push(v[q5]), process.env.NODE_ENV !== "production" && t !== null && t !== v[mt] && console.error(`mergeClasses(): a passed string contains an identifier (${
|
|
263
|
+
const h = r[k];
|
|
264
|
+
if (h) {
|
|
265
|
+
const v = n2[h];
|
|
266
|
+
v ? (o.push(v[q5]), process.env.NODE_ENV !== "production" && t !== null && t !== v[mt] && console.error(`mergeClasses(): a passed string contains an identifier (${h}) that has different direction (dir="${v[1] ? "rtl" : "ltr"}") setting than other classes. This is not supported. Source string: ${arguments[k]}`), t = v[mt]) : process.env.NODE_ENV !== "production" && console.error(`mergeClasses(): a passed string contains an identifier (${h}) that does not match any entry in cache. Source string: ${arguments[k]}`);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
const a = Object.assign.apply(
|
|
@@ -307,8 +307,8 @@ function W5(t, n, l, r) {
|
|
|
307
307
|
!m && n[0][o] ? f = _t(n[0][o], n[1]) : m && n[0][o] ? f = (r ? r.filter(({
|
|
308
308
|
debugClassNames: k
|
|
309
309
|
}) => k.filter(({
|
|
310
|
-
className:
|
|
311
|
-
}) =>
|
|
310
|
+
className: h
|
|
311
|
+
}) => h === c).length > 0).length > 0 : !1) ? m.className : m.overriddenBy : (!m && !n[0][o] || m && !n[0][o]) && (f = void 0);
|
|
312
312
|
}
|
|
313
313
|
return {
|
|
314
314
|
className: c,
|
|
@@ -469,20 +469,20 @@ function l0(t, n, l) {
|
|
|
469
469
|
function r0(t, n, l, r, i = {}) {
|
|
470
470
|
var s, o;
|
|
471
471
|
const a = gt[l], c = (s = i.m) !== null && s !== void 0 ? s : "", f = (o = i.p) !== null && o !== void 0 ? o : 0;
|
|
472
|
-
let m = (
|
|
472
|
+
let m = (C) => a - gt[C.getAttribute(Qe)], d = t.head.querySelectorAll(`[${Qe}]`);
|
|
473
473
|
if (l === "m") {
|
|
474
|
-
const
|
|
475
|
-
|
|
474
|
+
const C = t.head.querySelectorAll(`[${Qe}="${l}"]`);
|
|
475
|
+
C.length && (d = C, m = (_) => r.compareMediaQueries(c, _.media));
|
|
476
476
|
}
|
|
477
|
-
const k = (
|
|
478
|
-
let v =
|
|
477
|
+
const k = (C) => l0(C, l, i) ? f - Number(C.getAttribute("data-priority")) : m(C), h = d.length;
|
|
478
|
+
let v = h - 1;
|
|
479
479
|
for (; v >= 0; ) {
|
|
480
|
-
const
|
|
481
|
-
if (k(
|
|
482
|
-
return
|
|
480
|
+
const C = d.item(v);
|
|
481
|
+
if (k(C) > 0)
|
|
482
|
+
return C.nextSibling;
|
|
483
483
|
v--;
|
|
484
484
|
}
|
|
485
|
-
return
|
|
485
|
+
return h > 0 ? d.item(0) : n ? n.nextSibling : null;
|
|
486
486
|
}
|
|
487
487
|
const s0 = /* @__PURE__ */ ["-moz-placeholder", "-moz-focus-inner", "-moz-focusring", "-ms-input-placeholder", "-moz-read-write", "-moz-read-only"].join("|"), i0 = /* @__PURE__ */ new RegExp(`:(${s0})`);
|
|
488
488
|
function bt(t, n) {
|
|
@@ -512,8 +512,8 @@ function c0(t = typeof document > "u" ? void 0 : document, n = {}) {
|
|
|
512
512
|
for (const f in c) {
|
|
513
513
|
const m = c[f];
|
|
514
514
|
for (let d = 0, k = m.length; d < k; d++) {
|
|
515
|
-
const [
|
|
516
|
-
a.insertionCache[
|
|
515
|
+
const [h, v] = J5(m[d]), C = n0(f, t, i || null, a, v);
|
|
516
|
+
a.insertionCache[h] || (a.insertionCache[h] = f, process.env.NODE_ENV !== "production" && p2 && Oe.addCSSRule(h), r ? r(h) && bt(C, h) : bt(C, h));
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
}
|
|
@@ -692,12 +692,12 @@ const S0 = () => {
|
|
|
692
692
|
fullscreen: i = !1,
|
|
693
693
|
className: s = ""
|
|
694
694
|
}) => {
|
|
695
|
-
const { px: o, r: a, sw: c, checkSw: f, checkLen: m } = pn[n], d = o / 2, k = +(2 * Math.PI * a).toFixed(2),
|
|
695
|
+
const { px: o, r: a, sw: c, checkSw: f, checkLen: m } = pn[n], d = o / 2, k = +(2 * Math.PI * a).toFixed(2), h = a1(null);
|
|
696
696
|
i1(() => {
|
|
697
|
-
const
|
|
698
|
-
if (!l || !
|
|
697
|
+
const C = h.current;
|
|
698
|
+
if (!l || !C || !r) return;
|
|
699
699
|
const _ = () => r();
|
|
700
|
-
return
|
|
700
|
+
return C.addEventListener("animationend", _), () => C.removeEventListener("animationend", _);
|
|
701
701
|
}, [l, r]);
|
|
702
702
|
const v = /* @__PURE__ */ u(
|
|
703
703
|
"div",
|
|
@@ -777,7 +777,7 @@ const S0 = () => {
|
|
|
777
777
|
/* @__PURE__ */ e(
|
|
778
778
|
"path",
|
|
779
779
|
{
|
|
780
|
-
ref:
|
|
780
|
+
ref: h,
|
|
781
781
|
className: "kdls-spinner__check",
|
|
782
782
|
d: vn[n],
|
|
783
783
|
strokeWidth: f,
|
|
@@ -847,13 +847,13 @@ function rt({
|
|
|
847
847
|
open: s,
|
|
848
848
|
observePanel: o = !1
|
|
849
849
|
}) {
|
|
850
|
-
const [a, c] = D({}), [f, m] = D(l), [d, k] = D(!1),
|
|
851
|
-
var
|
|
850
|
+
const [a, c] = D({}), [f, m] = D(l), [d, k] = D(!1), h = A1(() => {
|
|
851
|
+
var w, B;
|
|
852
852
|
if (!t.current) return;
|
|
853
|
-
const v = t.current.getBoundingClientRect(),
|
|
854
|
-
width: ((
|
|
853
|
+
const v = t.current.getBoundingClientRect(), C = {
|
|
854
|
+
width: ((w = n.current) == null ? void 0 : w.offsetWidth) ?? 0,
|
|
855
855
|
height: ((B = n.current) == null ? void 0 : B.offsetHeight) ?? 0
|
|
856
|
-
}, _ = f5(t.current, !0), L = p5(v,
|
|
856
|
+
}, _ = f5(t.current, !0), L = p5(v, C, l, r, i, _);
|
|
857
857
|
c(L.style), m(L.effectiveSide);
|
|
858
858
|
}, [t, n, l, r, i]);
|
|
859
859
|
return i1(() => {
|
|
@@ -862,32 +862,32 @@ function rt({
|
|
|
862
862
|
return;
|
|
863
863
|
}
|
|
864
864
|
const v = requestAnimationFrame(() => {
|
|
865
|
-
|
|
865
|
+
h(), k(!0);
|
|
866
866
|
});
|
|
867
|
-
let
|
|
868
|
-
return o && n.current && (
|
|
869
|
-
cancelAnimationFrame(v),
|
|
867
|
+
let C;
|
|
868
|
+
return o && n.current && (C = new ResizeObserver(() => h()), C.observe(n.current)), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), () => {
|
|
869
|
+
cancelAnimationFrame(v), C == null || C.disconnect(), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
|
|
870
870
|
};
|
|
871
|
-
}, [s, o,
|
|
871
|
+
}, [s, o, h, n]), { style: a, effectiveSide: f, positioned: d };
|
|
872
872
|
}
|
|
873
|
-
const yt = 8, _n = 100, gn = 100,
|
|
873
|
+
const yt = 8, _n = 100, gn = 100, oe = ({
|
|
874
874
|
content: t,
|
|
875
875
|
children: n,
|
|
876
876
|
placement: l = "top",
|
|
877
877
|
width: r = "hug",
|
|
878
878
|
className: i = ""
|
|
879
879
|
}) => {
|
|
880
|
-
const [s, o] = D(null), [a, c] = D(l), [f, m] = D(!1), d = a1(null), k = a1(null),
|
|
881
|
-
v.current && (clearTimeout(v.current), v.current = null), !(s ||
|
|
882
|
-
|
|
880
|
+
const [s, o] = D(null), [a, c] = D(l), [f, m] = D(!1), d = a1(null), k = a1(null), h = a1(null), v = a1(null), C = A1(() => {
|
|
881
|
+
v.current && (clearTimeout(v.current), v.current = null), !(s || h.current) && (h.current = setTimeout(() => {
|
|
882
|
+
h.current = null, d.current && (o(d.current.getBoundingClientRect()), c(l), m(!1));
|
|
883
883
|
}, _n));
|
|
884
884
|
}, [l, s]), _ = A1(() => {
|
|
885
|
-
|
|
885
|
+
h.current && (clearTimeout(h.current), h.current = null), v.current = setTimeout(() => {
|
|
886
886
|
o(null), m(!1);
|
|
887
887
|
}, gn);
|
|
888
888
|
}, []);
|
|
889
889
|
i1(() => () => {
|
|
890
|
-
|
|
890
|
+
h.current && clearTimeout(h.current), v.current && clearTimeout(v.current);
|
|
891
891
|
}, []), i1(() => {
|
|
892
892
|
if (!s || !k.current) return;
|
|
893
893
|
const E = f5(d.current, !0), W = { width: k.current.offsetWidth, height: k.current.offsetHeight }, { side: T, align: P } = v2(l), { effectiveSide: N } = p5(s, W, T, P, yt, E);
|
|
@@ -903,7 +903,7 @@ const yt = 8, _n = 100, gn = 100, he = ({
|
|
|
903
903
|
window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E);
|
|
904
904
|
};
|
|
905
905
|
}, [L]);
|
|
906
|
-
const { side:
|
|
906
|
+
const { side: w, align: B } = v2(a), H = n == null;
|
|
907
907
|
return /* @__PURE__ */ u(
|
|
908
908
|
"span",
|
|
909
909
|
{
|
|
@@ -916,12 +916,12 @@ const yt = 8, _n = 100, gn = 100, he = ({
|
|
|
916
916
|
role: H ? "img" : void 0,
|
|
917
917
|
"aria-label": H ? t : void 0,
|
|
918
918
|
tabIndex: H ? 0 : void 0,
|
|
919
|
-
onMouseEnter:
|
|
919
|
+
onMouseEnter: C,
|
|
920
920
|
onMouseLeave: _,
|
|
921
|
-
onFocus:
|
|
921
|
+
onFocus: C,
|
|
922
922
|
onBlur: _,
|
|
923
923
|
onKeyDown: H ? (E) => {
|
|
924
|
-
E.key !== "Escape" || v.current || !(s ||
|
|
924
|
+
E.key !== "Escape" || v.current || !(s || h.current) || (E.stopPropagation(), _());
|
|
925
925
|
} : void 0,
|
|
926
926
|
children: [
|
|
927
927
|
H ? /* @__PURE__ */ e(n1, { icon: /* @__PURE__ */ e(o5, {}), "aria-hidden": !0, className: "kdls-tooltip-wrapper__icon" }) : n,
|
|
@@ -932,7 +932,7 @@ const yt = 8, _n = 100, gn = 100, he = ({
|
|
|
932
932
|
ref: k,
|
|
933
933
|
className: ["kdls-tooltip", `kdls-tooltip--${h5(a)}`].join(" "),
|
|
934
934
|
role: "tooltip",
|
|
935
|
-
style: { ...m5(s,
|
|
935
|
+
style: { ...m5(s, w, B, yt), visibility: f ? "visible" : "hidden" },
|
|
936
936
|
children: t
|
|
937
937
|
}
|
|
938
938
|
),
|
|
@@ -955,7 +955,7 @@ const yt = 8, _n = 100, gn = 100, he = ({
|
|
|
955
955
|
disabledTooltipPosition: m = "top",
|
|
956
956
|
type: d = "button",
|
|
957
957
|
ariaLabel: k,
|
|
958
|
-
className:
|
|
958
|
+
className: h = ""
|
|
959
959
|
}) => {
|
|
960
960
|
const v = [
|
|
961
961
|
"kdls-button",
|
|
@@ -963,8 +963,8 @@ const yt = 8, _n = 100, gn = 100, he = ({
|
|
|
963
963
|
`kdls-button--${s}`,
|
|
964
964
|
o === "fill" ? "kdls-button--full" : "",
|
|
965
965
|
a && !c ? "kdls-button--loading" : "",
|
|
966
|
-
|
|
967
|
-
].filter(Boolean).join(" "),
|
|
966
|
+
h
|
|
967
|
+
].filter(Boolean).join(" "), C = /* @__PURE__ */ u(
|
|
968
968
|
"button",
|
|
969
969
|
{
|
|
970
970
|
className: v,
|
|
@@ -988,13 +988,13 @@ const yt = 8, _n = 100, gn = 100, he = ({
|
|
|
988
988
|
]
|
|
989
989
|
}
|
|
990
990
|
);
|
|
991
|
-
return !f || !c ?
|
|
992
|
-
|
|
991
|
+
return !f || !c ? C : /* @__PURE__ */ e(
|
|
992
|
+
oe,
|
|
993
993
|
{
|
|
994
994
|
content: f,
|
|
995
995
|
placement: m,
|
|
996
996
|
className: ["kdls-button__tooltip-wrapper", o === "fill" ? "kdls-button__tooltip-wrapper--full" : ""].filter(Boolean).join(" "),
|
|
997
|
-
children:
|
|
997
|
+
children: C
|
|
998
998
|
}
|
|
999
999
|
);
|
|
1000
1000
|
}, X = T1.forwardRef(function({ children: n, variant: l = "bodyMd", as: r, color: i = "default", htmlFor: s, id: o, className: a = "" }, c) {
|
|
@@ -1029,11 +1029,11 @@ const bn = ({
|
|
|
1029
1029
|
actionDisabledTooltipPosition: m = "top",
|
|
1030
1030
|
defaultOpen: d = !1,
|
|
1031
1031
|
open: k,
|
|
1032
|
-
onOpenChange:
|
|
1032
|
+
onOpenChange: h,
|
|
1033
1033
|
destroyOnClose: v = !1,
|
|
1034
|
-
className:
|
|
1034
|
+
className: C = ""
|
|
1035
1035
|
}) => {
|
|
1036
|
-
const [_, L] = D(d), [
|
|
1036
|
+
const [_, L] = D(d), [w, B] = D(!1), H = k !== void 0, E = H ? k : _, W = async () => {
|
|
1037
1037
|
const P = o == null ? void 0 : o();
|
|
1038
1038
|
if (P instanceof Promise) {
|
|
1039
1039
|
B(!0);
|
|
@@ -1044,12 +1044,12 @@ const bn = ({
|
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
}, T = () => {
|
|
1047
|
-
H ?
|
|
1047
|
+
H ? h == null || h(!E) : L((P) => !P);
|
|
1048
1048
|
};
|
|
1049
1049
|
return /* @__PURE__ */ u(
|
|
1050
1050
|
"div",
|
|
1051
1051
|
{
|
|
1052
|
-
className: ["kdls-accordion", E ? "kdls-accordion--open" : "", i ? "kdls-accordion--bordered" : "", r === "lg" ? "kdls-accordion--title-lg" : "",
|
|
1052
|
+
className: ["kdls-accordion", E ? "kdls-accordion--open" : "", i ? "kdls-accordion--bordered" : "", r === "lg" ? "kdls-accordion--title-lg" : "", C].filter(Boolean).join(" "),
|
|
1053
1053
|
children: [
|
|
1054
1054
|
/* @__PURE__ */ u(
|
|
1055
1055
|
"div",
|
|
@@ -1072,7 +1072,7 @@ const bn = ({
|
|
|
1072
1072
|
{
|
|
1073
1073
|
className: "kdls-accordion__action",
|
|
1074
1074
|
onClick: (P) => P.stopPropagation(),
|
|
1075
|
-
children: /* @__PURE__ */ e(y1, { variant: "link", label: s, onClick: W, isLoading:
|
|
1075
|
+
children: /* @__PURE__ */ e(y1, { variant: "link", label: s, onClick: W, isLoading: w || a, disabled: c, disabledTooltip: f, disabledTooltipPosition: m })
|
|
1076
1076
|
}
|
|
1077
1077
|
),
|
|
1078
1078
|
/* @__PURE__ */ e(
|
|
@@ -1220,7 +1220,7 @@ const w1 = ({
|
|
|
1220
1220
|
truncateName: m = !0,
|
|
1221
1221
|
className: d = ""
|
|
1222
1222
|
}) => {
|
|
1223
|
-
const k = !!(r || i || s || o),
|
|
1223
|
+
const k = !!(r || i || s || o), h = a1(null), [v, C] = D(!1), [_, L] = D(!1), [w, B] = D(!1), H = async () => {
|
|
1224
1224
|
const T = i == null ? void 0 : i();
|
|
1225
1225
|
if (T instanceof Promise) {
|
|
1226
1226
|
L(!0);
|
|
@@ -1243,9 +1243,9 @@ const w1 = ({
|
|
|
1243
1243
|
};
|
|
1244
1244
|
i1(() => {
|
|
1245
1245
|
if (!m) return;
|
|
1246
|
-
const T =
|
|
1246
|
+
const T = h.current;
|
|
1247
1247
|
if (!T) return;
|
|
1248
|
-
const P = () =>
|
|
1248
|
+
const P = () => C(T.scrollWidth > T.clientWidth);
|
|
1249
1249
|
P();
|
|
1250
1250
|
const N = new ResizeObserver(P);
|
|
1251
1251
|
return N.observe(T), () => N.disconnect();
|
|
@@ -1254,7 +1254,7 @@ const w1 = ({
|
|
|
1254
1254
|
X,
|
|
1255
1255
|
{
|
|
1256
1256
|
as: "span",
|
|
1257
|
-
ref:
|
|
1257
|
+
ref: h,
|
|
1258
1258
|
variant: "bodyMd",
|
|
1259
1259
|
className: ["kdls-attachment-row__name", m ? "kdls-attachment-row__name--truncate" : ""].filter(Boolean).join(" "),
|
|
1260
1260
|
children: t
|
|
@@ -1264,7 +1264,7 @@ const w1 = ({
|
|
|
1264
1264
|
n && /* @__PURE__ */ e("span", { className: "kdls-attachment-row__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(n1, { icon: n }) }),
|
|
1265
1265
|
/* @__PURE__ */ u("div", { className: "kdls-attachment-row__info", children: [
|
|
1266
1266
|
m ? /* @__PURE__ */ e(
|
|
1267
|
-
|
|
1267
|
+
oe,
|
|
1268
1268
|
{
|
|
1269
1269
|
content: t,
|
|
1270
1270
|
className: ["kdls-attachment-row__name-tooltip", v ? "" : "kdls-attachment-row__name-tooltip--inactive"].filter(Boolean).join(" "),
|
|
@@ -1276,7 +1276,7 @@ const w1 = ({
|
|
|
1276
1276
|
k && /* @__PURE__ */ u("div", { className: "kdls-attachment-row__actions", children: [
|
|
1277
1277
|
r,
|
|
1278
1278
|
i && /* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(u5, {}), "aria-label": "Excluir", onClick: H, isLoading: _, disabled: a }),
|
|
1279
|
-
s && /* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(a5, {}), "aria-label": "Baixar", onClick: E, isLoading:
|
|
1279
|
+
s && /* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(a5, {}), "aria-label": "Baixar", onClick: E, isLoading: w, disabled: c }),
|
|
1280
1280
|
o && /* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(lt, {}), variant: "neutral", "aria-label": "Ver detalhes", onClick: o, disabled: f })
|
|
1281
1281
|
] })
|
|
1282
1282
|
] });
|
|
@@ -1348,13 +1348,13 @@ const w1 = ({
|
|
|
1348
1348
|
width: f = "hug",
|
|
1349
1349
|
className: m = ""
|
|
1350
1350
|
}) => {
|
|
1351
|
-
const [d, k] = D(!1),
|
|
1352
|
-
if (a ||
|
|
1353
|
-
const
|
|
1354
|
-
if (
|
|
1351
|
+
const [d, k] = D(!1), h = (d || o) && !a, v = async () => {
|
|
1352
|
+
if (a || h) return;
|
|
1353
|
+
const C = s == null ? void 0 : s();
|
|
1354
|
+
if (C instanceof Promise) {
|
|
1355
1355
|
k(!0);
|
|
1356
1356
|
try {
|
|
1357
|
-
await
|
|
1357
|
+
await C;
|
|
1358
1358
|
} finally {
|
|
1359
1359
|
k(!1);
|
|
1360
1360
|
}
|
|
@@ -1385,20 +1385,20 @@ const w1 = ({
|
|
|
1385
1385
|
"kdls-badge__icon--right",
|
|
1386
1386
|
"kdls-badge__icon--right--clickable",
|
|
1387
1387
|
a ? "kdls-badge__icon--right--disabled" : "",
|
|
1388
|
-
|
|
1388
|
+
h ? "kdls-badge__icon--right--loading" : ""
|
|
1389
1389
|
].filter(Boolean).join(" "),
|
|
1390
1390
|
role: "button",
|
|
1391
1391
|
tabIndex: a ? -1 : 0,
|
|
1392
1392
|
"aria-label": "Remover",
|
|
1393
|
-
"aria-busy":
|
|
1393
|
+
"aria-busy": h || void 0,
|
|
1394
1394
|
"aria-disabled": a || void 0,
|
|
1395
|
-
onClick: (
|
|
1396
|
-
|
|
1395
|
+
onClick: (C) => {
|
|
1396
|
+
C.stopPropagation(), v();
|
|
1397
1397
|
},
|
|
1398
|
-
onKeyDown: (
|
|
1399
|
-
(
|
|
1398
|
+
onKeyDown: (C) => {
|
|
1399
|
+
(C.key === "Enter" || C.key === " ") && (C.preventDefault(), C.stopPropagation(), v());
|
|
1400
1400
|
},
|
|
1401
|
-
children:
|
|
1401
|
+
children: h ? /* @__PURE__ */ e(qe, { size: "sm" }) : /* @__PURE__ */ e(n1, { icon: i, size: "sm" })
|
|
1402
1402
|
}
|
|
1403
1403
|
) })
|
|
1404
1404
|
]
|
|
@@ -1649,23 +1649,23 @@ const a7 = ({
|
|
|
1649
1649
|
actionDisabledTooltip: m,
|
|
1650
1650
|
actionDisabledTooltipPosition: d = "top",
|
|
1651
1651
|
onDismiss: k,
|
|
1652
|
-
className:
|
|
1652
|
+
className: h = ""
|
|
1653
1653
|
}) => {
|
|
1654
|
-
const [v,
|
|
1654
|
+
const [v, C] = D(!1), _ = async () => {
|
|
1655
1655
|
const L = a == null ? void 0 : a();
|
|
1656
1656
|
if (L instanceof Promise) {
|
|
1657
|
-
|
|
1657
|
+
C(!0);
|
|
1658
1658
|
try {
|
|
1659
1659
|
await L;
|
|
1660
1660
|
} finally {
|
|
1661
|
-
|
|
1661
|
+
C(!1);
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
1664
1664
|
};
|
|
1665
1665
|
return /* @__PURE__ */ u(
|
|
1666
1666
|
"div",
|
|
1667
1667
|
{
|
|
1668
|
-
className: ["kdls-alert", `kdls-alert--${n}`, r !== "lg" ? `kdls-alert--${r}` : "", `kdls-alert--${i}`, s ? "kdls-alert--bordered" : "",
|
|
1668
|
+
className: ["kdls-alert", `kdls-alert--${n}`, r !== "lg" ? `kdls-alert--${r}` : "", `kdls-alert--${i}`, s ? "kdls-alert--bordered" : "", h].filter(Boolean).join(" "),
|
|
1669
1669
|
role: "alert",
|
|
1670
1670
|
children: [
|
|
1671
1671
|
/* @__PURE__ */ u("div", { className: "kdls-alert__content", children: [
|
|
@@ -1711,13 +1711,13 @@ const a7 = ({
|
|
|
1711
1711
|
hint: m,
|
|
1712
1712
|
name: d,
|
|
1713
1713
|
required: k = !1,
|
|
1714
|
-
"aria-label":
|
|
1714
|
+
"aria-label": h,
|
|
1715
1715
|
"aria-labelledby": v,
|
|
1716
|
-
className:
|
|
1716
|
+
className: C = ""
|
|
1717
1717
|
}) => {
|
|
1718
1718
|
const _ = c ? "none" : f, L = () => {
|
|
1719
1719
|
c || o == null || o(!i);
|
|
1720
|
-
},
|
|
1720
|
+
}, w = ["kdls-checkbox__label", k && !c ? "kdls-checkbox__label--required" : ""].filter(Boolean).join(" "), B = [
|
|
1721
1721
|
"kdls-checkbox__hint",
|
|
1722
1722
|
f !== "none" ? `kdls-checkbox__hint--${f}` : "",
|
|
1723
1723
|
c ? "kdls-checkbox__hint--disabled" : ""
|
|
@@ -1734,7 +1734,7 @@ const a7 = ({
|
|
|
1734
1734
|
_ !== "none" ? `kdls-checkbox--feedback-${_}` : ""
|
|
1735
1735
|
].filter(Boolean).join(" "),
|
|
1736
1736
|
role: "checkbox",
|
|
1737
|
-
"aria-label":
|
|
1737
|
+
"aria-label": h,
|
|
1738
1738
|
"aria-labelledby": v,
|
|
1739
1739
|
"aria-checked": s ? "mixed" : i,
|
|
1740
1740
|
"aria-disabled": c,
|
|
@@ -1746,16 +1746,16 @@ const a7 = ({
|
|
|
1746
1746
|
children: [
|
|
1747
1747
|
/* @__PURE__ */ e("span", { className: "kdls-checkbox__box", "aria-hidden": "true", children: /* @__PURE__ */ e("span", { className: "kdls-checkbox__icon", children: s ? /* @__PURE__ */ e("svg", { width: "8", height: "2", viewBox: "0 0 8 2", fill: "none", children: /* @__PURE__ */ e("path", { d: "M1 1H7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }) : /* @__PURE__ */ e("svg", { width: "10", height: "8", viewBox: "0 0 10 8", fill: "none", children: /* @__PURE__ */ e("path", { d: "M1 4L3.5 6.5L9 1", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) }) }) }),
|
|
1748
1748
|
!a && m ? /* @__PURE__ */ u("div", { className: "kdls-checkbox__content", children: [
|
|
1749
|
-
t && /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", className:
|
|
1749
|
+
t && /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", className: w, children: t }),
|
|
1750
1750
|
/* @__PURE__ */ e(X, { as: "span", variant: "labelRegular", className: B, children: m })
|
|
1751
|
-
] }) : t && /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", className:
|
|
1751
|
+
] }) : t && /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", className: w, children: t })
|
|
1752
1752
|
]
|
|
1753
1753
|
}
|
|
1754
1754
|
);
|
|
1755
1755
|
return /* @__PURE__ */ u(
|
|
1756
1756
|
"div",
|
|
1757
1757
|
{
|
|
1758
|
-
className: ["kdls-checkbox-wrapper", l !== "hug" ? `kdls-checkbox-wrapper--${l}` : "",
|
|
1758
|
+
className: ["kdls-checkbox-wrapper", l !== "hug" ? `kdls-checkbox-wrapper--${l}` : "", C].filter(Boolean).join(" "),
|
|
1759
1759
|
children: [
|
|
1760
1760
|
a ? /* @__PURE__ */ e("div", { className: `kdls-checkbox-container${c ? " kdls-checkbox-container--disabled" : ""}`, children: H }) : H,
|
|
1761
1761
|
d && /* @__PURE__ */ e("input", { type: "hidden", name: d, value: i ? "true" : "false", readOnly: !0 }),
|
|
@@ -1777,14 +1777,14 @@ const a7 = ({
|
|
|
1777
1777
|
destroyOnClose: m = !1,
|
|
1778
1778
|
getPopupContainer: d = () => document.body,
|
|
1779
1779
|
zIndex: k,
|
|
1780
|
-
baseZIndex:
|
|
1780
|
+
baseZIndex: h,
|
|
1781
1781
|
matchTriggerWidth: v = !1,
|
|
1782
|
-
className:
|
|
1782
|
+
className: C = "",
|
|
1783
1783
|
openClassName: _ = "",
|
|
1784
1784
|
triggerClassName: L = ""
|
|
1785
1785
|
}) => {
|
|
1786
1786
|
var F;
|
|
1787
|
-
const [
|
|
1787
|
+
const [w, B] = D(f), H = a !== void 0, E = H ? a : w, W = we(N2), T = k ?? (W ? yn : h), P = a1(null), N = a1(null), { side: V, align: O } = v2(l), { style: K, effectiveSide: S, positioned: U } = rt({
|
|
1788
1788
|
triggerRef: P,
|
|
1789
1789
|
panelRef: N,
|
|
1790
1790
|
side: V,
|
|
@@ -1792,7 +1792,7 @@ const a7 = ({
|
|
|
1792
1792
|
gap: r,
|
|
1793
1793
|
open: E,
|
|
1794
1794
|
observePanel: !0
|
|
1795
|
-
}), A = C5(S, O), u1 = { position: "fixed", ...K, ...v ? { minWidth: (F = P.current) == null ? void 0 : F.getBoundingClientRect().width } : {} }, p = a1(null),
|
|
1795
|
+
}), A = C5(S, O), u1 = { position: "fixed", ...K, ...v ? { minWidth: (F = P.current) == null ? void 0 : F.getBoundingClientRect().width } : {} }, p = a1(null), y = a1(null), R = Array.isArray(i) ? i : [i], J = A1((q) => {
|
|
1796
1796
|
H ? c == null || c(q) : B(q);
|
|
1797
1797
|
}, [H, c]), k1 = A1(() => J(!1), [J]);
|
|
1798
1798
|
i1(() => {
|
|
@@ -1804,22 +1804,22 @@ const a7 = ({
|
|
|
1804
1804
|
};
|
|
1805
1805
|
return document.addEventListener("mousedown", q), () => document.removeEventListener("mousedown", q);
|
|
1806
1806
|
}, [E, R, k1]), i1(() => () => {
|
|
1807
|
-
p.current && clearTimeout(p.current),
|
|
1807
|
+
p.current && clearTimeout(p.current), y.current && clearTimeout(y.current);
|
|
1808
1808
|
}, []);
|
|
1809
1809
|
const o1 = {};
|
|
1810
1810
|
R.includes("click") && (o1.onClick = () => J(!E), o1.onKeyDown = (q) => {
|
|
1811
1811
|
(q.key === "Enter" || q.key === " ") && (q.preventDefault(), J(!E)), q.key === "Escape" && (E && q.preventDefault(), k1());
|
|
1812
1812
|
}), R.includes("hover") && (o1.onMouseEnter = () => {
|
|
1813
|
-
|
|
1813
|
+
y.current && (clearTimeout(y.current), y.current = null), p.current = setTimeout(() => J(!0), s);
|
|
1814
1814
|
}, o1.onMouseLeave = () => {
|
|
1815
|
-
p.current && (clearTimeout(p.current), p.current = null),
|
|
1815
|
+
p.current && (clearTimeout(p.current), p.current = null), y.current = setTimeout(() => J(!1), o);
|
|
1816
1816
|
}), R.includes("focus") && (o1.onFocus = () => J(!0), o1.onBlur = (q) => {
|
|
1817
1817
|
var r1;
|
|
1818
1818
|
(r1 = N.current) != null && r1.contains(q.relatedTarget) || k1();
|
|
1819
1819
|
}), R.includes("contextMenu") && (o1.onContextMenu = (q) => {
|
|
1820
1820
|
q.preventDefault(), J(!0);
|
|
1821
1821
|
});
|
|
1822
|
-
const z = ["kdls-floating",
|
|
1822
|
+
const z = ["kdls-floating", C, E && _].filter(Boolean).join(" "), $ = typeof n == "function" ? n(A) : n;
|
|
1823
1823
|
return /* @__PURE__ */ u("div", { ref: P, className: z, children: [
|
|
1824
1824
|
/* @__PURE__ */ e(
|
|
1825
1825
|
"div",
|
|
@@ -1843,10 +1843,10 @@ const a7 = ({
|
|
|
1843
1843
|
...E ? { visibility: U ? "visible" : "hidden", pointerEvents: U ? void 0 : "none" } : { display: "none" }
|
|
1844
1844
|
},
|
|
1845
1845
|
onMouseEnter: R.includes("hover") ? () => {
|
|
1846
|
-
|
|
1846
|
+
y.current && (clearTimeout(y.current), y.current = null);
|
|
1847
1847
|
} : void 0,
|
|
1848
1848
|
onMouseLeave: R.includes("hover") ? () => {
|
|
1849
|
-
|
|
1849
|
+
y.current = setTimeout(() => J(!1), o);
|
|
1850
1850
|
} : void 0,
|
|
1851
1851
|
children: $
|
|
1852
1852
|
}
|
|
@@ -1928,15 +1928,15 @@ const xn = ({
|
|
|
1928
1928
|
showSelectAll: m = !1,
|
|
1929
1929
|
selectAllPlacement: d = "header",
|
|
1930
1930
|
value: k,
|
|
1931
|
-
defaultValue:
|
|
1931
|
+
defaultValue: h,
|
|
1932
1932
|
onChange: v,
|
|
1933
|
-
clearable:
|
|
1933
|
+
clearable: C = !1,
|
|
1934
1934
|
footer: _,
|
|
1935
1935
|
closeLabel: L = "Fechar",
|
|
1936
|
-
applyLabel:
|
|
1936
|
+
applyLabel: w = "Aplicar",
|
|
1937
1937
|
className: B = ""
|
|
1938
1938
|
}) => {
|
|
1939
|
-
const H = a1(null), E = k !== void 0, [W, T] = D(
|
|
1939
|
+
const H = a1(null), E = k !== void 0, [W, T] = D(h ?? (f ? [] : null)), P = E ? k : W, N = Array.isArray(P) ? P : [], [V, O] = D("");
|
|
1940
1940
|
i1(() => {
|
|
1941
1941
|
t || O("");
|
|
1942
1942
|
}, [t]);
|
|
@@ -1944,7 +1944,7 @@ const xn = ({
|
|
|
1944
1944
|
i1(() => {
|
|
1945
1945
|
t && f && A(N);
|
|
1946
1946
|
}, [t, f]);
|
|
1947
|
-
const u1 = f && S.length > 0 && S.every((j) => U.includes(j)), p = f && !u1 && S.some((j) => U.includes(j)),
|
|
1947
|
+
const u1 = f && S.length > 0 && S.every((j) => U.includes(j)), p = f && !u1 && S.some((j) => U.includes(j)), y = f && m && !!c, R = y && d === "footer" && _ === void 0, J = y && !R, k1 = (j) => {
|
|
1948
1948
|
A((b) => b.includes(j) ? b.filter((e1) => e1 !== j) : [...b, j]);
|
|
1949
1949
|
}, o1 = () => {
|
|
1950
1950
|
E || T(U), v == null || v(U), n();
|
|
@@ -2003,7 +2003,7 @@ const xn = ({
|
|
|
2003
2003
|
onChange: z
|
|
2004
2004
|
}
|
|
2005
2005
|
) })
|
|
2006
|
-
] }) : null, Q = _ ?? (
|
|
2006
|
+
] }) : null, Q = _ ?? (C || f ? /* @__PURE__ */ e("div", { className: "kdls-bottomsheet__footer-actions", children: R ? /* @__PURE__ */ u(N1, { children: [
|
|
2007
2007
|
/* @__PURE__ */ e(
|
|
2008
2008
|
y1,
|
|
2009
2009
|
{
|
|
@@ -2013,12 +2013,12 @@ const xn = ({
|
|
|
2013
2013
|
}
|
|
2014
2014
|
),
|
|
2015
2015
|
/* @__PURE__ */ u("div", { className: "kdls-bottomsheet__footer-end", children: [
|
|
2016
|
-
|
|
2017
|
-
/* @__PURE__ */ e(y1, { label:
|
|
2016
|
+
C && /* @__PURE__ */ e(y1, { variant: "link", label: "Limpar", onClick: $ }),
|
|
2017
|
+
/* @__PURE__ */ e(y1, { label: w, onClick: o1 })
|
|
2018
2018
|
] })
|
|
2019
2019
|
] }) : /* @__PURE__ */ u(N1, { children: [
|
|
2020
|
-
|
|
2021
|
-
f && /* @__PURE__ */ e(y1, { label:
|
|
2020
|
+
C && /* @__PURE__ */ e(y1, { variant: "link", label: "Limpar", onClick: $ }),
|
|
2021
|
+
f && /* @__PURE__ */ e(y1, { label: w, width: C ? "hug" : "fill", onClick: o1 })
|
|
2022
2022
|
] }) }) : void 0);
|
|
2023
2023
|
return i1(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
2024
2024
|
document.body.style.overflow = "";
|
|
@@ -2133,7 +2133,7 @@ const xn = ({
|
|
|
2133
2133
|
children: c
|
|
2134
2134
|
}
|
|
2135
2135
|
);
|
|
2136
|
-
},
|
|
2136
|
+
}, Ce = { code: "br", ddi: "+55", name: "Brasil" };
|
|
2137
2137
|
let C2 = null, Lt = null;
|
|
2138
2138
|
function Dn() {
|
|
2139
2139
|
return C2 ? Promise.resolve(C2) : (Lt ?? (Lt = import("libphonenumber-js").then((t) => (C2 = t, t))), Lt);
|
|
@@ -2153,14 +2153,14 @@ function Hn(t) {
|
|
|
2153
2153
|
}
|
|
2154
2154
|
let d2 = null;
|
|
2155
2155
|
function En(t) {
|
|
2156
|
-
if (!t) return [
|
|
2156
|
+
if (!t) return [Ce];
|
|
2157
2157
|
if (d2) return d2;
|
|
2158
2158
|
const n = typeof Intl < "u" && "DisplayNames" in Intl ? new Intl.DisplayNames(["pt-BR"], { type: "region" }) : null, l = t.getCountries().filter((r) => r !== "BR").map((r) => ({
|
|
2159
2159
|
code: r.toLowerCase(),
|
|
2160
2160
|
ddi: `+${t.getCountryCallingCode(r)}`,
|
|
2161
2161
|
name: (n == null ? void 0 : n.of(r)) ?? r
|
|
2162
2162
|
})).sort((r, i) => r.name.localeCompare(i.name, "pt-BR"));
|
|
2163
|
-
return d2 = [
|
|
2163
|
+
return d2 = [Ce, ...l], d2;
|
|
2164
2164
|
}
|
|
2165
2165
|
const Nt = (t) => t.normalize("NFD").replace(new RegExp("\\p{M}", "gu"), "").toLowerCase().trim();
|
|
2166
2166
|
function Sn(t, n) {
|
|
@@ -2178,7 +2178,7 @@ function Zn(t) {
|
|
|
2178
2178
|
}
|
|
2179
2179
|
function Rn(t, n, l) {
|
|
2180
2180
|
let r = t.replace(/\D/g, "");
|
|
2181
|
-
if (n.ddi ===
|
|
2181
|
+
if (n.ddi === Ce.ddi) return r.slice(0, 11);
|
|
2182
2182
|
if (!l) return r.slice(0, 15);
|
|
2183
2183
|
for (; r && l.validatePhoneNumberLength(r, M2(n)) === "TOO_LONG"; )
|
|
2184
2184
|
r = r.slice(0, -1);
|
|
@@ -2186,17 +2186,17 @@ function Rn(t, n, l) {
|
|
|
2186
2186
|
}
|
|
2187
2187
|
function Bn(t, n, l) {
|
|
2188
2188
|
const r = t.replace(/\D/g, "");
|
|
2189
|
-
return n.ddi ===
|
|
2189
|
+
return n.ddi === Ce.ddi ? Zn(r) : !l || !r ? r : new l.AsYouType(M2(n)).input(r);
|
|
2190
2190
|
}
|
|
2191
2191
|
const Tn = { tel: [10, 11], cel: [11] };
|
|
2192
2192
|
function O2(t, n, l, r) {
|
|
2193
2193
|
const i = t.replace(/\D/g, "");
|
|
2194
|
-
return n.ddi ===
|
|
2194
|
+
return n.ddi === Ce.ddi ? Tn[r].includes(i.length) : l ? l.isValidPhoneNumber(i, M2(n)) : i.length >= 7;
|
|
2195
2195
|
}
|
|
2196
2196
|
function Mt(t, n, l, r) {
|
|
2197
2197
|
const i = t.replace(/\D/g, ""), s = !!i && O2(i, n, l, r);
|
|
2198
2198
|
if (!s) return { country: n, national: i, e164: null, valid: s };
|
|
2199
|
-
if (n.ddi ===
|
|
2199
|
+
if (n.ddi === Ce.ddi || !l) return { country: n, national: i, e164: `${n.ddi}${i}`, valid: s };
|
|
2200
2200
|
const o = l.parsePhoneNumberFromString(i, M2(n));
|
|
2201
2201
|
return { country: n, national: i, e164: (o == null ? void 0 : o.number) ?? `${n.ddi}${i}`, valid: s };
|
|
2202
2202
|
}
|
|
@@ -2288,12 +2288,12 @@ const ke = T1.forwardRef(({
|
|
|
2288
2288
|
iconRight: m,
|
|
2289
2289
|
onClickIconRight: d,
|
|
2290
2290
|
iconRightLabel: k = "Limpar",
|
|
2291
|
-
notificationCount:
|
|
2291
|
+
notificationCount: h,
|
|
2292
2292
|
showIncrementer: v = !1,
|
|
2293
|
-
min:
|
|
2293
|
+
min: C,
|
|
2294
2294
|
max: _,
|
|
2295
2295
|
step: L = 1,
|
|
2296
|
-
maxLength:
|
|
2296
|
+
maxLength: w,
|
|
2297
2297
|
showCount: B = !1,
|
|
2298
2298
|
disabled: H = !1,
|
|
2299
2299
|
isLoading: E = !1,
|
|
@@ -2309,7 +2309,7 @@ const ke = T1.forwardRef(({
|
|
|
2309
2309
|
minLength: A,
|
|
2310
2310
|
onBlur: u1,
|
|
2311
2311
|
onFocus: p,
|
|
2312
|
-
rules:
|
|
2312
|
+
rules: y,
|
|
2313
2313
|
validateOn: R,
|
|
2314
2314
|
width: J = "fill",
|
|
2315
2315
|
className: k1 = "",
|
|
@@ -2322,17 +2322,17 @@ const ke = T1.forwardRef(({
|
|
|
2322
2322
|
validateDocument: Z = !0
|
|
2323
2323
|
}, Q) => {
|
|
2324
2324
|
var ct;
|
|
2325
|
-
const j = ie(), b = N ?? j, e1 = `${b}-hint`, I = (t == null ? void 0 : t.trim()) ?? (s === "email" ? "E-mail" : s === "password" ? "Senha" : s === "cpf" ? "CPF" : s === "cnpj" ? "CNPJ" : s === "cpf-cnpj" ? "CPF ou CNPJ" : s === "cep" ? "CEP" : s === "date" ? "Data" : s === "birthdate" ? "Data de nascimento" : s === "tel" ? "Telefone" : s === "cel" ? "Celular" : ""), c1 = T ?? (s === "date" || s === "birthdate" ? "dd/mm/aaaa" : void 0), [l1, _1] = D(l ?? ""), [G, F1] = D(!1), [S1, J1] = D(!1), [H1, E1] = D(""), [ee, L1] = D(null), [x1, j1] = D(() => (z ??
|
|
2325
|
+
const j = ie(), b = N ?? j, e1 = `${b}-hint`, I = (t == null ? void 0 : t.trim()) ?? (s === "email" ? "E-mail" : s === "password" ? "Senha" : s === "cpf" ? "CPF" : s === "cnpj" ? "CNPJ" : s === "cpf-cnpj" ? "CPF ou CNPJ" : s === "cep" ? "CEP" : s === "date" ? "Data" : s === "birthdate" ? "Data de nascimento" : s === "tel" ? "Telefone" : s === "cel" ? "Celular" : ""), c1 = T ?? (s === "date" || s === "birthdate" ? "dd/mm/aaaa" : void 0), [l1, _1] = D(l ?? ""), [G, F1] = D(!1), [S1, J1] = D(!1), [H1, E1] = D(""), [ee, L1] = D(null), [x1, j1] = D(() => (z ?? Ce.code).toLowerCase());
|
|
2326
2326
|
i1(() => {
|
|
2327
|
-
j1((z ??
|
|
2327
|
+
j1((z ?? Ce.code).toLowerCase());
|
|
2328
2328
|
}, [z]);
|
|
2329
|
-
const $1 = Hn(o1), P1 = Pe(() => En($1), [$1]), m1 = P1.find((M) => M.code === x1) ?? ($1 || x1 ===
|
|
2329
|
+
const $1 = Hn(o1), P1 = Pe(() => En($1), [$1]), m1 = P1.find((M) => M.code === x1) ?? ($1 || x1 === Ce.code ? Ce : { code: x1, ddi: "", name: x1.toUpperCase() }), [D1, g1] = D(null), { validateOn: G1, submitted: me } = O5(), X1 = R ?? G1, [pe, O1] = D(void 0), [C1, B1] = D(!1), K1 = a1(null), le = a1(null), Q1 = `${b}-countries`, I1 = a1(null), We = a1(null), Me = a1(null), ae = a1(null), [ce, te] = D(null), [xe, ye] = D(!1), de = o * T2 + An, De = (M) => Math.max(de, Math.round(M)), He = () => {
|
|
2330
2330
|
var M;
|
|
2331
|
-
return
|
|
2331
|
+
return ce ?? (((M = Me.current) == null ? void 0 : M.getBoundingClientRect().height) || de);
|
|
2332
2332
|
};
|
|
2333
2333
|
i1(() => () => {
|
|
2334
2334
|
var M;
|
|
2335
|
-
return (M =
|
|
2335
|
+
return (M = ae.current) == null ? void 0 : M.call(ae);
|
|
2336
2336
|
}, []);
|
|
2337
2337
|
const Ie = (M) => {
|
|
2338
2338
|
if (M.button !== 0) return;
|
|
@@ -2342,14 +2342,14 @@ const ke = T1.forwardRef(({
|
|
|
2342
2342
|
const Z1 = (z1) => {
|
|
2343
2343
|
te(De(v1 + z1.clientY - f1));
|
|
2344
2344
|
}, b1 = () => {
|
|
2345
|
-
|
|
2345
|
+
ae.current = null, ye(!1), document.removeEventListener("pointermove", Z1), document.removeEventListener("pointerup", b1), document.removeEventListener("pointercancel", b1);
|
|
2346
2346
|
};
|
|
2347
|
-
|
|
2347
|
+
ae.current = b1, document.addEventListener("pointermove", Z1), document.addEventListener("pointerup", b1), document.addEventListener("pointercancel", b1);
|
|
2348
2348
|
}, x = (M) => {
|
|
2349
2349
|
const v1 = {
|
|
2350
2350
|
ArrowDown: () => He() + T2,
|
|
2351
2351
|
ArrowUp: () => He() - T2,
|
|
2352
|
-
Home: () =>
|
|
2352
|
+
Home: () => de
|
|
2353
2353
|
}[M.key];
|
|
2354
2354
|
v1 && (M.preventDefault(), te(De(v1())));
|
|
2355
2355
|
}, t1 = A1((M) => {
|
|
@@ -2357,16 +2357,16 @@ const ke = T1.forwardRef(({
|
|
|
2357
2357
|
}, [Q]), Y = n !== void 0, d1 = Y ? n : l1, V1 = !!d1, re = A1((M) => {
|
|
2358
2358
|
var b1;
|
|
2359
2359
|
let v1 = parseFloat(d1 || "0") + M * L;
|
|
2360
|
-
|
|
2360
|
+
C !== void 0 && (v1 = Math.max(C, v1)), _ !== void 0 && (v1 = Math.min(_, v1));
|
|
2361
2361
|
const Z1 = String(v1);
|
|
2362
2362
|
if (Y || _1(Z1), r && I1.current) {
|
|
2363
2363
|
const z1 = (b1 = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")) == null ? void 0 : b1.set;
|
|
2364
2364
|
z1 == null || z1.call(I1.current, Z1), I1.current.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
2365
2365
|
}
|
|
2366
|
-
}, [d1, L,
|
|
2366
|
+
}, [d1, L, C, _, Y, r]), ne = s === "tel" || s === "cel", ue = s === "cel" ? "cel" : "tel", Ee = (() => {
|
|
2367
2367
|
const M = Y ? n ?? "" : l1;
|
|
2368
2368
|
return ne && ee !== null ? ee : ne ? Bn(M, m1, $1) : B2.includes(s) ? xt(M, s) : M;
|
|
2369
|
-
})(), Ae = $ != null && $.length ? P1.filter((M) => $.includes(M.code)) : F != null && F.length ? P1.filter((M) => !F.includes(M.code)) : P1, g = Sn(Ae, H1), s1 = !H1.trim() && ((ct = g[0]) == null ? void 0 : ct.code) ===
|
|
2369
|
+
})(), Ae = $ != null && $.length ? P1.filter((M) => $.includes(M.code)) : F != null && F.length ? P1.filter((M) => !F.includes(M.code)) : P1, g = Sn(Ae, H1), s1 = !H1.trim() && ((ct = g[0]) == null ? void 0 : ct.code) === Ce.code && g.length > 1, p1 = (M) => {
|
|
2370
2370
|
var Z1;
|
|
2371
2371
|
let f1 = M.target.value;
|
|
2372
2372
|
const v1 = (Z1 = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")) == null ? void 0 : Z1.set;
|
|
@@ -2377,12 +2377,12 @@ const ke = T1.forwardRef(({
|
|
|
2377
2377
|
!ve || !Le ? (L1($n(f1, $1)), f1 = "") : (L1(null), Le.code !== m1.code && (j1(Le.code), q == null || q(Le)), b1 = Le, f1 = ve.national);
|
|
2378
2378
|
} else ee !== null && L1(null);
|
|
2379
2379
|
const z1 = Rn(f1, b1, $1);
|
|
2380
|
-
v1 == null || v1.call(M.target, z1), f1 = z1, r1 == null || r1(Mt(z1, b1, $1,
|
|
2380
|
+
v1 == null || v1.call(M.target, z1), f1 = z1, r1 == null || r1(Mt(z1, b1, $1, ue));
|
|
2381
2381
|
} else if (B2.includes(s)) {
|
|
2382
2382
|
const b1 = xt(f1, s).replace(/\D/g, "");
|
|
2383
2383
|
v1 == null || v1.call(M.target, b1), f1 = b1;
|
|
2384
2384
|
}
|
|
2385
|
-
Y || _1(f1), D1 && g1(null), r == null || r(M),
|
|
2385
|
+
Y || _1(f1), D1 && g1(null), r == null || r(M), y != null && y.length && (X1 === "change" || C1) && R1(f1);
|
|
2386
2386
|
}, M1 = (M) => {
|
|
2387
2387
|
var Z1;
|
|
2388
2388
|
u1 == null || u1(M);
|
|
@@ -2391,7 +2391,7 @@ const ke = T1.forwardRef(({
|
|
|
2391
2391
|
const b1 = (Z1 = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")) == null ? void 0 : Z1.set;
|
|
2392
2392
|
b1 == null || b1.call(M.target, f1), M.target.dispatchEvent(new Event("input", { bubbles: !0 })), Y || _1(f1), r == null || r({ ...M, target: { ...M.target, value: f1 } });
|
|
2393
2393
|
}
|
|
2394
|
-
if (
|
|
2394
|
+
if (y != null && y.length && (B1(!0), X1 === "blur" && R1(d1)), ne && ee !== null && a === "none") {
|
|
2395
2395
|
g1(s === "cel" ? "Celular inválido" : "Telefone inválido");
|
|
2396
2396
|
return;
|
|
2397
2397
|
}
|
|
@@ -2456,30 +2456,30 @@ const ke = T1.forwardRef(({
|
|
|
2456
2456
|
g1(null);
|
|
2457
2457
|
}, [s]);
|
|
2458
2458
|
const R1 = A1((M) => {
|
|
2459
|
-
if (!(
|
|
2460
|
-
const f1 =
|
|
2459
|
+
if (!(y != null && y.length)) return;
|
|
2460
|
+
const f1 = y.find((v1) => !v1.valid(M));
|
|
2461
2461
|
O1((f1 == null ? void 0 : f1.message) ?? void 0);
|
|
2462
|
-
}, [
|
|
2462
|
+
}, [y]);
|
|
2463
2463
|
i1(() => {
|
|
2464
2464
|
O1(void 0), B1(!1);
|
|
2465
|
-
}, [s,
|
|
2466
|
-
if (!me || !(
|
|
2465
|
+
}, [s, y]), i1(() => {
|
|
2466
|
+
if (!me || !(y != null && y.length)) return;
|
|
2467
2467
|
B1(!0);
|
|
2468
|
-
const M = Y ? n ?? "" : l1, f1 =
|
|
2468
|
+
const M = Y ? n ?? "" : l1, f1 = y.find((v1) => !v1.valid(M));
|
|
2469
2469
|
O1((f1 == null ? void 0 : f1.message) ?? void 0);
|
|
2470
2470
|
}, [me]);
|
|
2471
|
-
const
|
|
2471
|
+
const fe = (M) => {
|
|
2472
2472
|
var f1;
|
|
2473
2473
|
J1(!1), E1(""), M && ((f1 = le.current) == null || f1.focus());
|
|
2474
2474
|
}, Se = (M) => {
|
|
2475
2475
|
var v1;
|
|
2476
2476
|
const f1 = M.code !== m1.code;
|
|
2477
|
-
if (j1(M.code), L1(null),
|
|
2477
|
+
if (j1(M.code), L1(null), fe(!1), f1) {
|
|
2478
2478
|
if (g1(null), O1(void 0), B1(!1), Y || _1(""), I1.current) {
|
|
2479
2479
|
const Z1 = (v1 = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")) == null ? void 0 : v1.set;
|
|
2480
2480
|
Z1 == null || Z1.call(I1.current, ""), r == null || r({ target: I1.current }), I1.current.focus();
|
|
2481
2481
|
}
|
|
2482
|
-
r1 == null || r1(Mt("", M, $1,
|
|
2482
|
+
r1 == null || r1(Mt("", M, $1, ue));
|
|
2483
2483
|
}
|
|
2484
2484
|
q == null || q(M);
|
|
2485
2485
|
}, Fe = (M) => {
|
|
@@ -2488,7 +2488,7 @@ const ke = T1.forwardRef(({
|
|
|
2488
2488
|
if (!f1) return;
|
|
2489
2489
|
const v1 = Array.from(f1.querySelectorAll('[role="option"]')), Z1 = f1.querySelector(".kdls-phone-dropdown__search-input"), b1 = v1.indexOf(document.activeElement);
|
|
2490
2490
|
if (M.key === "Escape") {
|
|
2491
|
-
M.preventDefault(),
|
|
2491
|
+
M.preventDefault(), fe(!0);
|
|
2492
2492
|
return;
|
|
2493
2493
|
}
|
|
2494
2494
|
if (M.key === "ArrowDown") {
|
|
@@ -2529,7 +2529,7 @@ const ke = T1.forwardRef(({
|
|
|
2529
2529
|
};
|
|
2530
2530
|
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
2531
2531
|
}, []);
|
|
2532
|
-
const je =
|
|
2532
|
+
const je = w !== void 0 && d1.length >= w, B5 = je ? `Limite de ${w} caracteres atingido` : void 0, o2 = H ? "none" : je || pe || D1 && a === "none" ? "error" : a, Ye = B5 ?? pe ?? c ?? D1 ?? void 0, T5 = [
|
|
2533
2533
|
"kdls-input",
|
|
2534
2534
|
`kdls-input--feedback-${o2}`,
|
|
2535
2535
|
V1 ? "kdls-input--filled" : "",
|
|
@@ -2547,8 +2547,8 @@ const ke = T1.forwardRef(({
|
|
|
2547
2547
|
className: T5,
|
|
2548
2548
|
"aria-busy": E || void 0,
|
|
2549
2549
|
style: s === "textbox" ? {
|
|
2550
|
-
"--kdls-textarea-min-height": `${
|
|
2551
|
-
...
|
|
2550
|
+
"--kdls-textarea-min-height": `${de}px`,
|
|
2551
|
+
...ce !== null ? { "--kdls-textarea-height": `${ce}px` } : {}
|
|
2552
2552
|
} : void 0,
|
|
2553
2553
|
children: [
|
|
2554
2554
|
o1 && /* @__PURE__ */ u(
|
|
@@ -2557,7 +2557,7 @@ const ke = T1.forwardRef(({
|
|
|
2557
2557
|
ref: le,
|
|
2558
2558
|
type: "button",
|
|
2559
2559
|
className: "kdls-input__country",
|
|
2560
|
-
onClick: () => S1 ?
|
|
2560
|
+
onClick: () => S1 ? fe(!1) : J1(!0),
|
|
2561
2561
|
disabled: H,
|
|
2562
2562
|
"aria-label": "Selecionar país",
|
|
2563
2563
|
"aria-haspopup": "listbox",
|
|
@@ -2603,7 +2603,7 @@ const ke = T1.forwardRef(({
|
|
|
2603
2603
|
readOnly: K,
|
|
2604
2604
|
tabIndex: S,
|
|
2605
2605
|
minLength: A,
|
|
2606
|
-
maxLength:
|
|
2606
|
+
maxLength: w,
|
|
2607
2607
|
value: Y ? n : l1,
|
|
2608
2608
|
onChange: (M) => {
|
|
2609
2609
|
Y || _1(M.target.value), r && r(M);
|
|
@@ -2631,7 +2631,7 @@ const ke = T1.forwardRef(({
|
|
|
2631
2631
|
tabIndex: S,
|
|
2632
2632
|
pattern: U,
|
|
2633
2633
|
minLength: A,
|
|
2634
|
-
maxLength:
|
|
2634
|
+
maxLength: w,
|
|
2635
2635
|
value: Ee,
|
|
2636
2636
|
onChange: p1,
|
|
2637
2637
|
onBlur: M1,
|
|
@@ -2639,7 +2639,7 @@ const ke = T1.forwardRef(({
|
|
|
2639
2639
|
onKeyDown: i,
|
|
2640
2640
|
disabled: H,
|
|
2641
2641
|
required: !H && W,
|
|
2642
|
-
min: s === "number" ?
|
|
2642
|
+
min: s === "number" ? C : void 0,
|
|
2643
2643
|
max: s === "number" ? _ : void 0,
|
|
2644
2644
|
step: s === "number" ? L : void 0,
|
|
2645
2645
|
"aria-required": !H && W ? !0 : void 0,
|
|
@@ -2681,8 +2681,8 @@ const ke = T1.forwardRef(({
|
|
|
2681
2681
|
role: "separator",
|
|
2682
2682
|
"aria-orientation": "horizontal",
|
|
2683
2683
|
"aria-label": "Redimensionar campo",
|
|
2684
|
-
"aria-valuemin":
|
|
2685
|
-
"aria-valuenow":
|
|
2684
|
+
"aria-valuemin": de,
|
|
2685
|
+
"aria-valuenow": ce ?? de,
|
|
2686
2686
|
tabIndex: 0,
|
|
2687
2687
|
onPointerDown: Ie,
|
|
2688
2688
|
onKeyDown: x,
|
|
@@ -2707,13 +2707,13 @@ const ke = T1.forwardRef(({
|
|
|
2707
2707
|
type: "button",
|
|
2708
2708
|
className: "kdls-input__spinner-btn",
|
|
2709
2709
|
onClick: () => re(-1),
|
|
2710
|
-
disabled: H ||
|
|
2710
|
+
disabled: H || C !== void 0 && parseFloat(d1 || "0") <= C,
|
|
2711
2711
|
tabIndex: -1,
|
|
2712
2712
|
children: /* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M2.5 4.5L6 8L9.5 4.5", stroke: "currentColor", strokeWidth: "1", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
2713
2713
|
}
|
|
2714
2714
|
)
|
|
2715
2715
|
] }),
|
|
2716
|
-
|
|
2716
|
+
h !== void 0 && h > 0 && /* @__PURE__ */ e(v5, { size: 24, variant: "primary", count: h, showPlus: !0 }),
|
|
2717
2717
|
E && !H ? /* @__PURE__ */ e("span", { className: "kdls-input__icon kdls-input__icon--right", "aria-hidden": "true", children: /* @__PURE__ */ e(qe, { size: "sm" }) }) : m ? /* @__PURE__ */ e(
|
|
2718
2718
|
"span",
|
|
2719
2719
|
{
|
|
@@ -2734,12 +2734,12 @@ const ke = T1.forwardRef(({
|
|
|
2734
2734
|
]
|
|
2735
2735
|
}
|
|
2736
2736
|
),
|
|
2737
|
-
(Ye || B &&
|
|
2737
|
+
(Ye || B && w !== void 0) && /* @__PURE__ */ u("div", { className: "kdls-input__hint-row", children: [
|
|
2738
2738
|
Ye && /* @__PURE__ */ e("span", { id: e1, className: ["kdls-input__hint", `kdls-input__hint--${o2}`, H ? "kdls-input__hint--disabled" : ""].filter(Boolean).join(" "), children: Ye }),
|
|
2739
|
-
B &&
|
|
2739
|
+
B && w !== void 0 && /* @__PURE__ */ u("span", { className: "kdls-input__count", children: [
|
|
2740
2740
|
d1.length,
|
|
2741
2741
|
" / ",
|
|
2742
|
-
|
|
2742
|
+
w
|
|
2743
2743
|
] })
|
|
2744
2744
|
] })
|
|
2745
2745
|
] }), V5 = S1 && /* @__PURE__ */ u("div", { className: "kdls-phone-dropdown", ref: K1, onKeyDown: Fe, children: [
|
|
@@ -2894,14 +2894,14 @@ const c7 = ({
|
|
|
2894
2894
|
disabled: o = !1,
|
|
2895
2895
|
className: a = ""
|
|
2896
2896
|
}) => {
|
|
2897
|
-
const [c, f] = D(!1), m = u2(l ?? "") ?? [41, 142, 230], d = Ze(...m), k = V2(l ?? "") ?? 100, [
|
|
2897
|
+
const [c, f] = D(!1), m = u2(l ?? "") ?? [41, 142, 230], d = Ze(...m), k = V2(l ?? "") ?? 100, [h, v] = D(d[0]), [C, _] = D(d[1]), [L, w] = D(d[2]), [B, H] = D(k), [E, W] = D(
|
|
2898
2898
|
(l ?? "").replace("#", "").slice(0, 6).toUpperCase() + (s ? "" : $2(k))
|
|
2899
|
-
), T = a1(null), P = a1(null), N = a1(null), [V, O, K] = jn(
|
|
2899
|
+
), T = a1(null), P = a1(null), N = a1(null), [V, O, K] = jn(h, C, L), S = Pn(V, O, K), U = a1(l);
|
|
2900
2900
|
i1(() => {
|
|
2901
2901
|
if (l === U.current) return;
|
|
2902
2902
|
U.current = l;
|
|
2903
2903
|
const z = u2(l ?? "") ?? [41, 142, 230], $ = Ze(...z);
|
|
2904
|
-
v($[0]), _($[1]),
|
|
2904
|
+
v($[0]), _($[1]), w($[2]);
|
|
2905
2905
|
const F = V2(l ?? "") ?? 100;
|
|
2906
2906
|
H(F);
|
|
2907
2907
|
}, [l]), i1(() => {
|
|
@@ -2912,7 +2912,7 @@ const c7 = ({
|
|
|
2912
2912
|
const $ = T.current;
|
|
2913
2913
|
if (!$) return;
|
|
2914
2914
|
const F = $.getBoundingClientRect(), q = Math.max(0, Math.min(1, (z.clientX - F.left) / F.width)), r1 = Math.max(0, Math.min(1, (z.clientY - F.top) / F.height));
|
|
2915
|
-
_(Math.round(q * 100)),
|
|
2915
|
+
_(Math.round(q * 100)), w(Math.round((1 - r1) * 100));
|
|
2916
2916
|
}, []), u1 = A1((z) => {
|
|
2917
2917
|
const $ = P.current;
|
|
2918
2918
|
if (!$) return;
|
|
@@ -2923,7 +2923,7 @@ const c7 = ({
|
|
|
2923
2923
|
if (!$) return;
|
|
2924
2924
|
const F = $.getBoundingClientRect(), q = Math.max(0, Math.min(1, (z.clientX - F.left) / F.width));
|
|
2925
2925
|
H(Math.round(q * 100));
|
|
2926
|
-
}, []),
|
|
2926
|
+
}, []), y = (z) => ($) => {
|
|
2927
2927
|
z($.nativeEvent);
|
|
2928
2928
|
const F = (r1) => z(r1), q = () => {
|
|
2929
2929
|
window.removeEventListener("mousemove", F), window.removeEventListener("mouseup", q);
|
|
@@ -2934,7 +2934,7 @@ const c7 = ({
|
|
|
2934
2934
|
const $ = u2(z);
|
|
2935
2935
|
if ($) {
|
|
2936
2936
|
const F = Ze(...$);
|
|
2937
|
-
v(F[0]), _(F[1]),
|
|
2937
|
+
v(F[0]), _(F[1]), w(F[2]);
|
|
2938
2938
|
}
|
|
2939
2939
|
if (!s) {
|
|
2940
2940
|
const F = V2(z);
|
|
@@ -2949,7 +2949,7 @@ const c7 = ({
|
|
|
2949
2949
|
const $ = await z.open(), F = u2($.sRGBHex);
|
|
2950
2950
|
if (F) {
|
|
2951
2951
|
const q = Ze(...F);
|
|
2952
|
-
v(q[0]), _(q[1]),
|
|
2952
|
+
v(q[0]), _(q[1]), w(q[2]);
|
|
2953
2953
|
}
|
|
2954
2954
|
} catch {
|
|
2955
2955
|
}
|
|
@@ -2988,13 +2988,13 @@ const c7 = ({
|
|
|
2988
2988
|
{
|
|
2989
2989
|
ref: T,
|
|
2990
2990
|
className: "kdls-colorpicker__canvas",
|
|
2991
|
-
style: { "--cp-hue":
|
|
2992
|
-
onMouseDown:
|
|
2991
|
+
style: { "--cp-hue": h },
|
|
2992
|
+
onMouseDown: y(A),
|
|
2993
2993
|
children: /* @__PURE__ */ e(
|
|
2994
2994
|
"div",
|
|
2995
2995
|
{
|
|
2996
2996
|
className: "kdls-colorpicker__handle",
|
|
2997
|
-
style: { left: `${
|
|
2997
|
+
style: { left: `${C}%`, top: `${100 - L}%` }
|
|
2998
2998
|
}
|
|
2999
2999
|
)
|
|
3000
3000
|
}
|
|
@@ -3015,8 +3015,8 @@ const c7 = ({
|
|
|
3015
3015
|
{
|
|
3016
3016
|
ref: P,
|
|
3017
3017
|
className: "kdls-colorpicker__slider kdls-colorpicker__slider--hue",
|
|
3018
|
-
onMouseDown:
|
|
3019
|
-
children: /* @__PURE__ */ e("div", { className: "kdls-colorpicker__slider-thumb", style: { left: `${
|
|
3018
|
+
onMouseDown: y(u1),
|
|
3019
|
+
children: /* @__PURE__ */ e("div", { className: "kdls-colorpicker__slider-thumb", style: { left: `${h / 360 * 100}%` } })
|
|
3020
3020
|
}
|
|
3021
3021
|
),
|
|
3022
3022
|
!s && /* @__PURE__ */ e(
|
|
@@ -3025,7 +3025,7 @@ const c7 = ({
|
|
|
3025
3025
|
ref: N,
|
|
3026
3026
|
className: "kdls-colorpicker__slider kdls-colorpicker__slider--opacity",
|
|
3027
3027
|
style: { "--cp-hex": S },
|
|
3028
|
-
onMouseDown:
|
|
3028
|
+
onMouseDown: y(p),
|
|
3029
3029
|
children: /* @__PURE__ */ e("div", { className: "kdls-colorpicker__slider-thumb", style: { left: `${B}%` } })
|
|
3030
3030
|
}
|
|
3031
3031
|
)
|
|
@@ -3034,15 +3034,15 @@ const c7 = ({
|
|
|
3034
3034
|
/* @__PURE__ */ u("div", { className: `kdls-colorpicker__input-group${s ? "" : " kdls-colorpicker__input-group--rgba"}`, children: [
|
|
3035
3035
|
/* @__PURE__ */ e(ke, { label: "R", value: String(V), onChange: (z) => {
|
|
3036
3036
|
const $ = Math.max(0, Math.min(255, Number(z.target.value) || 0)), F = Ze($, O, K);
|
|
3037
|
-
v(F[0]), _(F[1]),
|
|
3037
|
+
v(F[0]), _(F[1]), w(F[2]);
|
|
3038
3038
|
} }),
|
|
3039
3039
|
/* @__PURE__ */ e(ke, { label: "G", value: String(O), onChange: (z) => {
|
|
3040
3040
|
const $ = Math.max(0, Math.min(255, Number(z.target.value) || 0)), F = Ze(V, $, K);
|
|
3041
|
-
v(F[0]), _(F[1]),
|
|
3041
|
+
v(F[0]), _(F[1]), w(F[2]);
|
|
3042
3042
|
} }),
|
|
3043
3043
|
/* @__PURE__ */ e(ke, { label: "B", value: String(K), onChange: (z) => {
|
|
3044
3044
|
const $ = Math.max(0, Math.min(255, Number(z.target.value) || 0)), F = Ze(V, O, $);
|
|
3045
|
-
v(F[0]), _(F[1]),
|
|
3045
|
+
v(F[0]), _(F[1]), w(F[2]);
|
|
3046
3046
|
} }),
|
|
3047
3047
|
!s && /* @__PURE__ */ e(ke, { label: "A", value: String(Math.round(B / 100 * 255)), onChange: (z) => {
|
|
3048
3048
|
const $ = Math.max(0, Math.min(255, Number(z.target.value) || 0));
|
|
@@ -3086,7 +3086,7 @@ const c7 = ({
|
|
|
3086
3086
|
isLoading: m = !1,
|
|
3087
3087
|
disabled: d = !1,
|
|
3088
3088
|
"aria-label": k,
|
|
3089
|
-
className:
|
|
3089
|
+
className: h = "",
|
|
3090
3090
|
...v
|
|
3091
3091
|
}) => /* @__PURE__ */ u(
|
|
3092
3092
|
"button",
|
|
@@ -3104,7 +3104,7 @@ const c7 = ({
|
|
|
3104
3104
|
d ? "kdls-pill--disabled" : "",
|
|
3105
3105
|
m && !d ? "kdls-pill--loading" : "",
|
|
3106
3106
|
s !== "hug" ? `kdls-pill--${s}` : "",
|
|
3107
|
-
|
|
3107
|
+
h
|
|
3108
3108
|
].filter(Boolean).join(" "),
|
|
3109
3109
|
children: [
|
|
3110
3110
|
r && /* @__PURE__ */ e("span", { className: "kdls-pill__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(n1, { icon: r }) }),
|
|
@@ -3118,11 +3118,11 @@ const c7 = ({
|
|
|
3118
3118
|
role: o ? "button" : void 0,
|
|
3119
3119
|
tabIndex: o ? 0 : void 0,
|
|
3120
3120
|
"aria-label": o ? a : void 0,
|
|
3121
|
-
onClick: o ? (
|
|
3122
|
-
|
|
3121
|
+
onClick: o ? (C) => {
|
|
3122
|
+
C.stopPropagation(), o();
|
|
3123
3123
|
} : void 0,
|
|
3124
|
-
onKeyDown: o ? (
|
|
3125
|
-
(
|
|
3124
|
+
onKeyDown: o ? (C) => {
|
|
3125
|
+
(C.key === "Enter" || C.key === " ") && (C.preventDefault(), C.stopPropagation(), o());
|
|
3126
3126
|
} : void 0,
|
|
3127
3127
|
children: /* @__PURE__ */ e(n1, { icon: i })
|
|
3128
3128
|
}
|
|
@@ -3156,12 +3156,12 @@ const c7 = ({
|
|
|
3156
3156
|
timeIntervals: m,
|
|
3157
3157
|
filterTime: d,
|
|
3158
3158
|
excludeTimes: k,
|
|
3159
|
-
includeTimes:
|
|
3159
|
+
includeTimes: h,
|
|
3160
3160
|
defaultViewDate: v,
|
|
3161
|
-
zIndex:
|
|
3161
|
+
zIndex: C,
|
|
3162
3162
|
isRange: _ = !1,
|
|
3163
3163
|
hasTime: L = !1,
|
|
3164
|
-
onlyTime:
|
|
3164
|
+
onlyTime: w = !1,
|
|
3165
3165
|
disableToday: B = !1,
|
|
3166
3166
|
disablePast: H = !1,
|
|
3167
3167
|
disableFuture: E = !1,
|
|
@@ -3173,21 +3173,21 @@ const c7 = ({
|
|
|
3173
3173
|
required: O = !1,
|
|
3174
3174
|
className: K = ""
|
|
3175
3175
|
}, S) => {
|
|
3176
|
-
const U = _ ? !1 : L, A = _ ? !1 :
|
|
3176
|
+
const U = _ ? !1 : L, A = _ ? !1 : w, u1 = _ ? r : void 0, p = (u1 == null ? void 0 : u1.start) ?? null, y = (u1 == null ? void 0 : u1.end) ?? null, R = _ ? null : r ?? null, J = /* @__PURE__ */ new Date(), [k1, o1] = D(!1), z = a1(null);
|
|
3177
3177
|
$5(S, () => z.current);
|
|
3178
3178
|
const $ = (x) => String(x).padStart(2, "0"), F = (x) => `${$(x.getHours())}:${$(x.getMinutes())}`, q = (() => {
|
|
3179
3179
|
if (_) {
|
|
3180
3180
|
if (!p) return "";
|
|
3181
|
-
if (!
|
|
3182
|
-
const x = p.getFullYear() ===
|
|
3183
|
-
if (x && p.getMonth() ===
|
|
3181
|
+
if (!y) return `${Ge(p)} — ...`;
|
|
3182
|
+
const x = p.getFullYear() === y.getFullYear();
|
|
3183
|
+
if (x && p.getMonth() === y.getMonth()) {
|
|
3184
3184
|
const Y = new Date(p.getFullYear(), p.getMonth() + 1, 0).getDate();
|
|
3185
|
-
return p.getDate() === 1 &&
|
|
3185
|
+
return p.getDate() === 1 && y.getDate() === Y ? `${St[p.getMonth()]} ${p.getFullYear()}` : `${$(p.getDate())} — ${$(y.getDate())} ${h2[p.getMonth()]} ${p.getFullYear()}`;
|
|
3186
3186
|
}
|
|
3187
|
-
return x ? `${$(p.getDate())} ${h2[p.getMonth()]} — ${$(
|
|
3187
|
+
return x ? `${$(p.getDate())} ${h2[p.getMonth()]} — ${$(y.getDate())} ${h2[y.getMonth()]} ${y.getFullYear()}` : `${Ge(p)} — ${Ge(y)}`;
|
|
3188
3188
|
}
|
|
3189
3189
|
return R ? A ? F(R) : U ? `${Ge(R)} — ${F(R)}` : Ge(R) : "";
|
|
3190
|
-
})(), r1 = _ ? "Período" : "Data", Z = !!q, Q = A ? /* @__PURE__ */ e(U0, {}) : /* @__PURE__ */ e(V0, {}), j = _ ? p ?
|
|
3190
|
+
})(), r1 = _ ? "Período" : "Data", Z = !!q, Q = A ? /* @__PURE__ */ e(U0, {}) : /* @__PURE__ */ e(V0, {}), j = _ ? p ? y ? `${p.toISOString()}/${y.toISOString()}` : p.toISOString() : "" : R ? R.toISOString() : "", b = new Date(J.getFullYear(), J.getMonth(), J.getDate()), e1 = s && H ? s.getTime() > b.getTime() ? s : b : s ?? (H ? b : void 0), I = o && E ? o.getTime() < b.getTime() ? o : b : o ?? (E ? b : void 0), c1 = (x, t1) => x.getFullYear() === t1.getFullYear() && x.getMonth() === t1.getMonth() && x.getDate() === t1.getDate(), l1 = (x) => {
|
|
3191
3191
|
const t1 = new Date(x.getFullYear(), x.getMonth(), x.getDate()).getTime(), Y = e1 ? new Date(e1.getFullYear(), e1.getMonth(), e1.getDate()).getTime() : void 0, d1 = I ? new Date(I.getFullYear(), I.getMonth(), I.getDate()).getTime() : void 0;
|
|
3192
3192
|
return !!(Y !== void 0 && t1 < Y || d1 !== void 0 && t1 > d1 || a && !a(x) || B && c1(x, J) || c && c.some((V1) => c1(V1, x)) || f && f.length > 0 && !f.some((V1) => c1(V1, x)));
|
|
3193
3193
|
}, [_1, G] = D(null), F1 = !_1 && (U || A) && R ? R.getHours() : null, S1 = !_1 && (U || A) && R ? R.getMinutes() : null, J1 = [];
|
|
@@ -3217,7 +3217,7 @@ const c7 = ({
|
|
|
3217
3217
|
if (V1 && c1(V1, I) && t1 > Y) return !0;
|
|
3218
3218
|
}
|
|
3219
3219
|
}
|
|
3220
|
-
return !!(d && !d(x) ||
|
|
3220
|
+
return !!(d && !d(x) || h && h.length > 0 && !h.some((Y) => Y.getHours() === x.getHours() && Y.getMinutes() === x.getMinutes()) || k != null && k.some((Y) => Y.getHours() === x.getHours() && Y.getMinutes() === x.getMinutes()));
|
|
3221
3221
|
}, E1 = (x) => {
|
|
3222
3222
|
const t1 = _1 ?? R ?? J, Y = new Date(t1.getFullYear(), t1.getMonth(), t1.getDate(), x.getHours(), x.getMinutes());
|
|
3223
3223
|
G(null), i == null || i(Y), o1(!1);
|
|
@@ -3253,14 +3253,14 @@ const c7 = ({
|
|
|
3253
3253
|
L1(new Date(x, D1, 1)), j1("month-grid");
|
|
3254
3254
|
}, Me = (x) => {
|
|
3255
3255
|
L1(new Date(m1, x, 1)), j1("calendar");
|
|
3256
|
-
}, oe = () => {
|
|
3257
|
-
L1(J), j1("calendar");
|
|
3258
3256
|
}, ae = () => {
|
|
3257
|
+
L1(J), j1("calendar");
|
|
3258
|
+
}, ce = () => {
|
|
3259
3259
|
_ ? i == null || i({ start: null, end: null }) : i == null || i(null), G(null), P1("start"), o1(!1);
|
|
3260
3260
|
}, te = (x) => {
|
|
3261
3261
|
var t1, Y;
|
|
3262
3262
|
x.key === "Escape" && (x.preventDefault(), o1(!1), (Y = (t1 = z.current) == null ? void 0 : t1.querySelector('input:not([type="hidden"]), button')) == null || Y.focus());
|
|
3263
|
-
}, xe = x1 === "year" ? `${O1} – ${O1 + 15}` : x1 === "month-grid" ? `${m1}` : `${St[D1]} ${m1}`, ye = x1 === "year" ? "Anos anteriores" : x1 === "month-grid" ? "Ano anterior" : "Mês anterior",
|
|
3263
|
+
}, xe = x1 === "year" ? `${O1} – ${O1 + 15}` : x1 === "month-grid" ? `${m1}` : `${St[D1]} ${m1}`, ye = x1 === "year" ? "Anos anteriores" : x1 === "month-grid" ? "Ano anterior" : "Mês anterior", de = x1 === "year" ? "Próximos anos" : x1 === "month-grid" ? "Próximo ano" : "Próximo mês", De = () => /* @__PURE__ */ e("div", { className: "kdls-datepicker__time-list kdls-scroll kdls-scroll--thin", children: J1.map((x, t1) => {
|
|
3264
3264
|
const Y = F1 === x.getHours() && S1 === x.getMinutes(), d1 = H1(x);
|
|
3265
3265
|
return /* @__PURE__ */ u(
|
|
3266
3266
|
"button",
|
|
@@ -3284,7 +3284,7 @@ const c7 = ({
|
|
|
3284
3284
|
);
|
|
3285
3285
|
}) }), He = A ? /* @__PURE__ */ u("div", { className: ["kdls-datepicker kdls-datepicker--only-time", W && "kdls-datepicker--disabled"].filter(Boolean).join(" "), onKeyDown: te, children: [
|
|
3286
3286
|
/* @__PURE__ */ e("div", { className: "kdls-datepicker__time-panel", children: De() }),
|
|
3287
|
-
/* @__PURE__ */ e("div", { className: "kdls-datepicker__footer", children: /* @__PURE__ */ e(y1, { type: "button", variant: "link", label: "Limpar", onClick:
|
|
3287
|
+
/* @__PURE__ */ e("div", { className: "kdls-datepicker__footer", children: /* @__PURE__ */ e(y1, { type: "button", variant: "link", label: "Limpar", onClick: ce }) })
|
|
3288
3288
|
] }) : /* @__PURE__ */ u("div", { className: [
|
|
3289
3289
|
"kdls-datepicker",
|
|
3290
3290
|
W && "kdls-datepicker--disabled",
|
|
@@ -3308,16 +3308,16 @@ const c7 = ({
|
|
|
3308
3308
|
),
|
|
3309
3309
|
/* @__PURE__ */ u("div", { className: "kdls-datepicker__nav", children: [
|
|
3310
3310
|
/* @__PURE__ */ e(w1, { size: "md", icon: /* @__PURE__ */ e(c5, {}), variant: "neutral", "aria-label": ye, onClick: le }),
|
|
3311
|
-
/* @__PURE__ */ e(w1, { size: "md", icon: /* @__PURE__ */ e(lt, {}), variant: "neutral", "aria-label":
|
|
3311
|
+
/* @__PURE__ */ e(w1, { size: "md", icon: /* @__PURE__ */ e(lt, {}), variant: "neutral", "aria-label": de, onClick: Q1 })
|
|
3312
3312
|
] })
|
|
3313
3313
|
] }),
|
|
3314
3314
|
x1 === "calendar" ? /* @__PURE__ */ u(N1, { children: [
|
|
3315
3315
|
/* @__PURE__ */ e("div", { className: "kdls-datepicker__weekdays", children: Kn.map((x, t1) => /* @__PURE__ */ e("span", { children: x }, t1)) }),
|
|
3316
3316
|
/* @__PURE__ */ e("div", { className: "kdls-datepicker__grid", children: pe.map((x, t1) => /* @__PURE__ */ e("div", { className: "kdls-datepicker__week-row", children: x.map(({ date: Y, current: d1 }, V1) => {
|
|
3317
|
-
const re = _1 ?? R, ne = !_ && !!re && B1(Y, re),
|
|
3317
|
+
const re = _1 ?? R, ne = !_ && !!re && B1(Y, re), ue = _ && !!p && B1(Y, p), Ee = _ && !!y && B1(Y, y), Ae = _ && !!p && !!y && K1(Y, p, y), g = B1(Y, J), s1 = ne || ue || Ee, p1 = l1(Y);
|
|
3318
3318
|
return /* @__PURE__ */ e("div", { className: [
|
|
3319
3319
|
"kdls-datepicker__day-wrap",
|
|
3320
|
-
|
|
3320
|
+
ue && y ? "kdls-datepicker__day-wrap--range-start" : "",
|
|
3321
3321
|
Ee ? "kdls-datepicker__day-wrap--range-end" : "",
|
|
3322
3322
|
Ae ? "kdls-datepicker__day-wrap--in-range" : ""
|
|
3323
3323
|
].filter(Boolean).join(" "), children: /* @__PURE__ */ e(
|
|
@@ -3370,8 +3370,8 @@ const c7 = ({
|
|
|
3370
3370
|
);
|
|
3371
3371
|
}) }),
|
|
3372
3372
|
/* @__PURE__ */ u("div", { className: "kdls-datepicker__footer", children: [
|
|
3373
|
-
/* @__PURE__ */ e(y1, { type: "button", variant: "link", label: "Limpar", onClick:
|
|
3374
|
-
/* @__PURE__ */ e(y1, { type: "button", variant: "link", label: "Hoje", onClick:
|
|
3373
|
+
/* @__PURE__ */ e(y1, { type: "button", variant: "link", label: "Limpar", onClick: ce }),
|
|
3374
|
+
/* @__PURE__ */ e(y1, { type: "button", variant: "link", label: "Hoje", onClick: ae })
|
|
3375
3375
|
] })
|
|
3376
3376
|
] });
|
|
3377
3377
|
}
|
|
@@ -3395,7 +3395,7 @@ const c7 = ({
|
|
|
3395
3395
|
open: k1,
|
|
3396
3396
|
onOpenChange: W || T ? void 0 : o1,
|
|
3397
3397
|
placement: "bottomLeft",
|
|
3398
|
-
zIndex:
|
|
3398
|
+
zIndex: C,
|
|
3399
3399
|
baseZIndex: 200,
|
|
3400
3400
|
content: He,
|
|
3401
3401
|
children: n === "pill" ? /* @__PURE__ */ e(
|
|
@@ -3404,7 +3404,7 @@ const c7 = ({
|
|
|
3404
3404
|
label: q || (t ?? r1),
|
|
3405
3405
|
iconLeft: Q,
|
|
3406
3406
|
iconRight: Z ? /* @__PURE__ */ e(q1, {}) : /* @__PURE__ */ e(U1, {}),
|
|
3407
|
-
onClickIconRight: Z ?
|
|
3407
|
+
onClickIconRight: Z ? ce : void 0,
|
|
3408
3408
|
width: l,
|
|
3409
3409
|
disabled: W,
|
|
3410
3410
|
isLoading: T
|
|
@@ -3419,7 +3419,7 @@ const c7 = ({
|
|
|
3419
3419
|
readOnly: !0,
|
|
3420
3420
|
iconLeft: Q,
|
|
3421
3421
|
iconRight: Z ? /* @__PURE__ */ e(q1, {}) : /* @__PURE__ */ e(U1, {}),
|
|
3422
|
-
onClickIconRight: Z ?
|
|
3422
|
+
onClickIconRight: Z ? ce : void 0,
|
|
3423
3423
|
disabled: W,
|
|
3424
3424
|
isLoading: T,
|
|
3425
3425
|
width: l,
|
|
@@ -3478,12 +3478,12 @@ const k2 = T1.forwardRef(({
|
|
|
3478
3478
|
allSelectedLabel: m,
|
|
3479
3479
|
selectAllPlacement: d = "header",
|
|
3480
3480
|
filterOption: k = !0,
|
|
3481
|
-
onSearch:
|
|
3481
|
+
onSearch: h,
|
|
3482
3482
|
loading: v = !1,
|
|
3483
|
-
isLoading:
|
|
3483
|
+
isLoading: C = !1,
|
|
3484
3484
|
onMenuScroll: _,
|
|
3485
3485
|
showSelectAll: L = !1,
|
|
3486
|
-
disabled:
|
|
3486
|
+
disabled: w = !1,
|
|
3487
3487
|
open: B,
|
|
3488
3488
|
id: H,
|
|
3489
3489
|
iconLeft: E,
|
|
@@ -3499,13 +3499,13 @@ const k2 = T1.forwardRef(({
|
|
|
3499
3499
|
menuClassName: A = "",
|
|
3500
3500
|
className: u1 = "",
|
|
3501
3501
|
clearable: p = !0,
|
|
3502
|
-
menuMaxHeight:
|
|
3502
|
+
menuMaxHeight: y
|
|
3503
3503
|
}, R) => {
|
|
3504
3504
|
const J = ie(), k1 = H ?? J, o1 = st(), [z, $] = D(!1), [F, q] = D(""), [r1, Z] = D([]), Q = T === "input" && !o1, j = Q && c, b = a1(null), e1 = B !== void 0, I = e1 ? B : z, c1 = r !== void 0, [l1, _1] = D(i ?? (a ? [] : null)), G = c1 ? r : l1, F1 = (l == null ? void 0 : l.label) ?? "label", S1 = (l == null ? void 0 : l.value) ?? "value", J1 = (l == null ? void 0 : l.icon) ?? "icon", H1 = (g) => String(g[F1] ?? ""), E1 = (g) => String(g[S1] ?? ""), ee = (g) => Array.isArray(g.options), L1 = n.flatMap(
|
|
3505
3505
|
(g) => ee(g) ? g.options : [g]
|
|
3506
3506
|
), x1 = (g) => c && k && F ? g.filter((s1) => H1(s1).toLowerCase().includes(F.toLowerCase())) : g, j1 = x1(L1), $1 = j1.length, P1 = a ? null : o ? (G == null ? void 0 : G.value) ?? null : G ?? null, m1 = a ? o ? (G ?? []).map((g) => g.value) : G ?? [] : [], D1 = P1 ? L1.find((g) => E1(g) === P1) : void 0, g1 = a ? m1.length > 0 : !!P1, G1 = a && j1.length > 0 && j1.every((g) => r1.includes(E1(g))), me = a && !G1 && j1.some((g) => r1.includes(E1(g))), X1 = L && a && d === "header", pe = L && a && d === "footer", O1 = a && !!m && L1.length > 0 && L1.every((g) => m1.includes(E1(g))), C1 = a && m1.length > 1 && !O1 ? m1.length - 1 : void 0;
|
|
3507
3507
|
i1(() => {
|
|
3508
|
-
I && a && Z(m1), !I && F !== "" && (q(""),
|
|
3508
|
+
I && a && Z(m1), !I && F !== "" && (q(""), h == null || h(""));
|
|
3509
3509
|
}, [I]);
|
|
3510
3510
|
const B1 = a1(null), K1 = (g) => [...g.querySelectorAll('.kdls-select__option:not([aria-disabled="true"])')], le = a1(!1), Q1 = (g) => {
|
|
3511
3511
|
g.setAttribute("data-kdls-ring", ""), g.addEventListener("blur", () => g.removeAttribute("data-kdls-ring"), { once: !0 });
|
|
@@ -3523,9 +3523,9 @@ const k2 = T1.forwardRef(({
|
|
|
3523
3523
|
const je = b.current;
|
|
3524
3524
|
return je ? (document.activeElement !== je && je.focus({ preventScroll: !0 }), g = !0, !0) : !1;
|
|
3525
3525
|
}
|
|
3526
|
-
const
|
|
3527
|
-
if (!
|
|
3528
|
-
const Se =
|
|
3526
|
+
const fe = B1.current;
|
|
3527
|
+
if (!fe) return !1;
|
|
3528
|
+
const Se = fe.querySelector(".kdls-select__search-input"), Fe = Se ?? fe.querySelector(".kdls-select__option--selected") ?? K1(fe)[0];
|
|
3529
3529
|
return !Fe || (Fe.focus({ preventScroll: !0 }), document.activeElement !== Fe) ? !1 : (!Se && le.current && Q1(Fe), g = !0, !0);
|
|
3530
3530
|
};
|
|
3531
3531
|
if (s1()) return;
|
|
@@ -3537,12 +3537,12 @@ const k2 = T1.forwardRef(({
|
|
|
3537
3537
|
return M1.observe(p1, { attributes: !0, attributeFilter: ["style"] }), () => M1.disconnect();
|
|
3538
3538
|
}, [I]);
|
|
3539
3539
|
const We = (g) => {
|
|
3540
|
-
var
|
|
3540
|
+
var fe;
|
|
3541
3541
|
const s1 = B1.current;
|
|
3542
3542
|
if (!s1) return;
|
|
3543
3543
|
const p1 = K1(s1);
|
|
3544
3544
|
if (p1.length === 0 && g.key !== "Escape") return;
|
|
3545
|
-
const M1 = p1.indexOf(document.activeElement), R1 = (
|
|
3545
|
+
const M1 = p1.indexOf(document.activeElement), R1 = (fe = document.activeElement) == null ? void 0 : fe.classList.contains("kdls-select__search-input");
|
|
3546
3546
|
switch (g.key) {
|
|
3547
3547
|
case "ArrowDown":
|
|
3548
3548
|
g.preventDefault(), I1(R1 ? p1[0] : p1[M1 + 1] ?? p1[0]);
|
|
@@ -3580,13 +3580,13 @@ const k2 = T1.forwardRef(({
|
|
|
3580
3580
|
s == null || s(s1), c1 || _1(s1);
|
|
3581
3581
|
} else
|
|
3582
3582
|
s == null || s(g), c1 || _1([...g]);
|
|
3583
|
-
}, oe = (g) => {
|
|
3584
|
-
Z(g), Q && Me(g);
|
|
3585
3583
|
}, ae = (g) => {
|
|
3584
|
+
Z(g), Q && Me(g);
|
|
3585
|
+
}, ce = (g) => {
|
|
3586
3586
|
const s1 = E1(g), p1 = H1(g);
|
|
3587
3587
|
if (a) {
|
|
3588
3588
|
const M1 = r1.includes(s1);
|
|
3589
|
-
|
|
3589
|
+
ae(
|
|
3590
3590
|
M1 ? r1.filter((R1) => R1 !== s1) : [...r1, s1]
|
|
3591
3591
|
);
|
|
3592
3592
|
} else
|
|
@@ -3595,16 +3595,16 @@ const k2 = T1.forwardRef(({
|
|
|
3595
3595
|
a ? (Z([]), s == null || s([]), c1 || _1([])) : (s == null || s(null), c1 || _1(null)), e1 || $(!1);
|
|
3596
3596
|
}, xe = () => {
|
|
3597
3597
|
const g = j1.map((s1) => E1(s1));
|
|
3598
|
-
|
|
3598
|
+
ae(Array.from(/* @__PURE__ */ new Set([...r1, ...g])));
|
|
3599
3599
|
}, ye = () => {
|
|
3600
3600
|
const g = new Set(j1.map((s1) => E1(s1)));
|
|
3601
|
-
|
|
3602
|
-
},
|
|
3601
|
+
ae(r1.filter((s1) => !g.has(s1)));
|
|
3602
|
+
}, de = () => {
|
|
3603
3603
|
Me(r1), e1 || $(!1);
|
|
3604
3604
|
}, De = (g) => {
|
|
3605
|
-
q(g.target.value),
|
|
3605
|
+
q(g.target.value), h == null || h(g.target.value), !I && !e1 && $(!0);
|
|
3606
3606
|
}, He = (g) => {
|
|
3607
|
-
g.stopPropagation(), !(
|
|
3607
|
+
g.stopPropagation(), !(w || C) && !I && !e1 && $(!0);
|
|
3608
3608
|
}, Ie = (g) => {
|
|
3609
3609
|
if ((g.key === " " || g.key === "Enter") && g.stopPropagation(), g.key !== "ArrowDown" && g.key !== "Enter") return;
|
|
3610
3610
|
if (g.preventDefault(), !I) {
|
|
@@ -3618,7 +3618,7 @@ const k2 = T1.forwardRef(({
|
|
|
3618
3618
|
label: H1(g),
|
|
3619
3619
|
iconLeft: g[J1]
|
|
3620
3620
|
})), t1 = () => {
|
|
3621
|
-
|
|
3621
|
+
w || C || e1 || $(!I);
|
|
3622
3622
|
}, Y = (g) => {
|
|
3623
3623
|
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), t1());
|
|
3624
3624
|
}, d1 = () => {
|
|
@@ -3643,7 +3643,7 @@ const k2 = T1.forwardRef(({
|
|
|
3643
3643
|
s == null || s(M1), c1 || _1(M1);
|
|
3644
3644
|
} else
|
|
3645
3645
|
s == null || s(s1), c1 || _1(s1);
|
|
3646
|
-
}, re = a && m1.length > 0 ? L1.find((g) => E1(g) === m1[0]) : void 0, ne = O1 ? m : a ? m1.length === 0 ? t ?? "" : re ? H1(re) : t ?? "" : D1 ? H1(D1) : t ?? "",
|
|
3646
|
+
}, re = a && m1.length > 0 ? L1.find((g) => E1(g) === m1[0]) : void 0, ne = O1 ? m : a ? m1.length === 0 ? t ?? "" : re ? H1(re) : t ?? "" : D1 ? H1(D1) : t ?? "", ue = O1 ? m : a ? re ? H1(re) : "" : D1 ? H1(D1) : "", Ee = (g) => {
|
|
3647
3647
|
const s1 = E1(g), p1 = g[J1], M1 = a ? r1.includes(s1) : s1 === P1;
|
|
3648
3648
|
return /* @__PURE__ */ u(
|
|
3649
3649
|
"li",
|
|
@@ -3656,7 +3656,7 @@ const k2 = T1.forwardRef(({
|
|
|
3656
3656
|
].filter(Boolean).join(" "),
|
|
3657
3657
|
tabIndex: -1,
|
|
3658
3658
|
onMouseDown: (R1) => {
|
|
3659
|
-
R1.preventDefault(),
|
|
3659
|
+
R1.preventDefault(), ce(g);
|
|
3660
3660
|
},
|
|
3661
3661
|
children: [
|
|
3662
3662
|
a && /* @__PURE__ */ e(Re, { checked: M1, onChange: () => {
|
|
@@ -3673,7 +3673,7 @@ const k2 = T1.forwardRef(({
|
|
|
3673
3673
|
ref: B1,
|
|
3674
3674
|
onKeyDown: We,
|
|
3675
3675
|
className: ["kdls-select__menu", A].filter(Boolean).join(" "),
|
|
3676
|
-
style: { maxHeight:
|
|
3676
|
+
style: { maxHeight: y, ...N !== void 0 && W === "hug" ? { maxWidth: Math.max(200, N) } : {} },
|
|
3677
3677
|
children: [
|
|
3678
3678
|
(c && !j || X1) && /* @__PURE__ */ u("div", { className: "kdls-select__header", children: [
|
|
3679
3679
|
c && !j && /* @__PURE__ */ e("div", { className: "kdls-select__search", onClick: (g) => g.stopPropagation(), children: /* @__PURE__ */ u("div", { className: "kdls-select__search-field", children: [
|
|
@@ -3685,7 +3685,7 @@ const k2 = T1.forwardRef(({
|
|
|
3685
3685
|
placeholder: f,
|
|
3686
3686
|
value: F,
|
|
3687
3687
|
onChange: (g) => {
|
|
3688
|
-
q(g.target.value),
|
|
3688
|
+
q(g.target.value), h == null || h(g.target.value);
|
|
3689
3689
|
},
|
|
3690
3690
|
autoFocus: !0
|
|
3691
3691
|
}
|
|
@@ -3734,11 +3734,11 @@ const k2 = T1.forwardRef(({
|
|
|
3734
3734
|
),
|
|
3735
3735
|
/* @__PURE__ */ u("div", { className: "kdls-select__footer-end", children: [
|
|
3736
3736
|
p && /* @__PURE__ */ e(y1, { variant: "link", label: "Limpar", onClick: te }),
|
|
3737
|
-
/* @__PURE__ */ e(y1, { variant: "link", label: "Aplicar", onClick:
|
|
3737
|
+
/* @__PURE__ */ e(y1, { variant: "link", label: "Aplicar", onClick: de })
|
|
3738
3738
|
] })
|
|
3739
3739
|
] }) : /* @__PURE__ */ u(N1, { children: [
|
|
3740
3740
|
p && /* @__PURE__ */ e(y1, { variant: "link", label: "Limpar", onClick: te }),
|
|
3741
|
-
a && /* @__PURE__ */ e(y1, { variant: "link", label: "Aplicar", onClick:
|
|
3741
|
+
a && /* @__PURE__ */ e(y1, { variant: "link", label: "Aplicar", onClick: de })
|
|
3742
3742
|
] }) })
|
|
3743
3743
|
]
|
|
3744
3744
|
}
|
|
@@ -3749,8 +3749,8 @@ const k2 = T1.forwardRef(({
|
|
|
3749
3749
|
ref: R,
|
|
3750
3750
|
className: [
|
|
3751
3751
|
"kdls-select-wrapper",
|
|
3752
|
-
|
|
3753
|
-
|
|
3752
|
+
w ? "kdls-select-wrapper--disabled" : "",
|
|
3753
|
+
C && !w ? "kdls-select-wrapper--loading" : "",
|
|
3754
3754
|
I ? "kdls-select-wrapper--open" : "",
|
|
3755
3755
|
`kdls-select-wrapper--${W}`,
|
|
3756
3756
|
T === "input" ? "kdls-select-wrapper--trigger-input" : "",
|
|
@@ -3777,8 +3777,8 @@ const k2 = T1.forwardRef(({
|
|
|
3777
3777
|
showNotification: C1 !== void 0,
|
|
3778
3778
|
notificationCount: C1,
|
|
3779
3779
|
width: W,
|
|
3780
|
-
isLoading:
|
|
3781
|
-
disabled:
|
|
3780
|
+
isLoading: C,
|
|
3781
|
+
disabled: w,
|
|
3782
3782
|
className: U,
|
|
3783
3783
|
onClick: t1
|
|
3784
3784
|
}
|
|
@@ -3789,7 +3789,7 @@ const k2 = T1.forwardRef(({
|
|
|
3789
3789
|
type: "button",
|
|
3790
3790
|
"aria-haspopup": "listbox",
|
|
3791
3791
|
"aria-expanded": I,
|
|
3792
|
-
disabled:
|
|
3792
|
+
disabled: w,
|
|
3793
3793
|
style: P !== void 0 ? { maxWidth: P } : void 0,
|
|
3794
3794
|
className: [
|
|
3795
3795
|
"kdls-select__trigger--nav",
|
|
@@ -3812,16 +3812,16 @@ const k2 = T1.forwardRef(({
|
|
|
3812
3812
|
"aria-expanded": I,
|
|
3813
3813
|
"aria-haspopup": "listbox",
|
|
3814
3814
|
"aria-label": t,
|
|
3815
|
-
"aria-disabled":
|
|
3815
|
+
"aria-disabled": w,
|
|
3816
3816
|
"aria-required": K || void 0,
|
|
3817
|
-
"aria-busy":
|
|
3818
|
-
tabIndex:
|
|
3817
|
+
"aria-busy": C || void 0,
|
|
3818
|
+
tabIndex: w ? -1 : 0,
|
|
3819
3819
|
id: k1,
|
|
3820
3820
|
style: P !== void 0 ? { maxWidth: P } : void 0,
|
|
3821
3821
|
className: [
|
|
3822
3822
|
"kdls-select-input-wrap",
|
|
3823
3823
|
I ? "kdls-select-input-wrap--open" : "",
|
|
3824
|
-
|
|
3824
|
+
C && !w ? "kdls-select-input-wrap--loading" : "",
|
|
3825
3825
|
U
|
|
3826
3826
|
].filter(Boolean).join(" "),
|
|
3827
3827
|
onClick: t1,
|
|
@@ -3830,7 +3830,7 @@ const k2 = T1.forwardRef(({
|
|
|
3830
3830
|
ke,
|
|
3831
3831
|
{
|
|
3832
3832
|
label: t ?? "",
|
|
3833
|
-
value: I && !
|
|
3833
|
+
value: I && !ue ? " " : ue,
|
|
3834
3834
|
onChange: () => {
|
|
3835
3835
|
},
|
|
3836
3836
|
readOnly: !0,
|
|
@@ -3838,8 +3838,8 @@ const k2 = T1.forwardRef(({
|
|
|
3838
3838
|
iconLeft: E,
|
|
3839
3839
|
iconRight: g1 && p ? /* @__PURE__ */ e(q1, {}) : /* @__PURE__ */ e(U1, {}),
|
|
3840
3840
|
onClickIconRight: g1 && p ? te : void 0,
|
|
3841
|
-
isLoading:
|
|
3842
|
-
disabled:
|
|
3841
|
+
isLoading: C,
|
|
3842
|
+
disabled: w,
|
|
3843
3843
|
width: W === "fill" ? "fill" : "hug",
|
|
3844
3844
|
feedback: V,
|
|
3845
3845
|
hint: O,
|
|
@@ -3857,7 +3857,7 @@ const k2 = T1.forwardRef(({
|
|
|
3857
3857
|
title: t,
|
|
3858
3858
|
searchable: c,
|
|
3859
3859
|
searchPlaceholder: f,
|
|
3860
|
-
onSearch:
|
|
3860
|
+
onSearch: h,
|
|
3861
3861
|
options: x,
|
|
3862
3862
|
multiple: a,
|
|
3863
3863
|
showSelectAll: L,
|
|
@@ -3871,7 +3871,7 @@ const k2 = T1.forwardRef(({
|
|
|
3871
3871
|
r2,
|
|
3872
3872
|
{
|
|
3873
3873
|
open: I,
|
|
3874
|
-
onOpenChange:
|
|
3874
|
+
onOpenChange: w || C || e1 ? void 0 : $,
|
|
3875
3875
|
placement: "bottomLeft",
|
|
3876
3876
|
matchTriggerWidth: !0,
|
|
3877
3877
|
baseZIndex: 200,
|
|
@@ -3888,8 +3888,8 @@ const k2 = T1.forwardRef(({
|
|
|
3888
3888
|
showNotification: C1 !== void 0,
|
|
3889
3889
|
notificationCount: C1,
|
|
3890
3890
|
width: W,
|
|
3891
|
-
isLoading:
|
|
3892
|
-
disabled:
|
|
3891
|
+
isLoading: C,
|
|
3892
|
+
disabled: w,
|
|
3893
3893
|
className: U
|
|
3894
3894
|
}
|
|
3895
3895
|
) }),
|
|
@@ -3899,7 +3899,7 @@ const k2 = T1.forwardRef(({
|
|
|
3899
3899
|
type: "button",
|
|
3900
3900
|
"aria-haspopup": "listbox",
|
|
3901
3901
|
"aria-expanded": I,
|
|
3902
|
-
disabled:
|
|
3902
|
+
disabled: w,
|
|
3903
3903
|
style: P !== void 0 ? { maxWidth: P } : void 0,
|
|
3904
3904
|
className: [
|
|
3905
3905
|
"kdls-select__trigger--nav",
|
|
@@ -3921,16 +3921,16 @@ const k2 = T1.forwardRef(({
|
|
|
3921
3921
|
"aria-expanded": I,
|
|
3922
3922
|
"aria-haspopup": "listbox",
|
|
3923
3923
|
"aria-label": t,
|
|
3924
|
-
"aria-disabled":
|
|
3924
|
+
"aria-disabled": w,
|
|
3925
3925
|
"aria-required": K || void 0,
|
|
3926
|
-
"aria-busy":
|
|
3927
|
-
tabIndex:
|
|
3926
|
+
"aria-busy": C || void 0,
|
|
3927
|
+
tabIndex: w || j ? -1 : 0,
|
|
3928
3928
|
id: k1,
|
|
3929
3929
|
style: P !== void 0 ? { maxWidth: P } : void 0,
|
|
3930
3930
|
className: [
|
|
3931
3931
|
"kdls-select-input-wrap",
|
|
3932
3932
|
I ? "kdls-select-input-wrap--open" : "",
|
|
3933
|
-
|
|
3933
|
+
C && !w ? "kdls-select-input-wrap--loading" : "",
|
|
3934
3934
|
j ? "kdls-select-input-wrap--search" : "",
|
|
3935
3935
|
U
|
|
3936
3936
|
].filter(Boolean).join(" "),
|
|
@@ -3940,7 +3940,7 @@ const k2 = T1.forwardRef(({
|
|
|
3940
3940
|
{
|
|
3941
3941
|
ref: b,
|
|
3942
3942
|
label: t ?? "",
|
|
3943
|
-
value: I ? F :
|
|
3943
|
+
value: I ? F : ue,
|
|
3944
3944
|
placeholder: I ? f : void 0,
|
|
3945
3945
|
onChange: De,
|
|
3946
3946
|
onKeyDown: Ie,
|
|
@@ -3948,8 +3948,8 @@ const k2 = T1.forwardRef(({
|
|
|
3948
3948
|
iconLeft: E,
|
|
3949
3949
|
iconRight: g1 && p && !I ? /* @__PURE__ */ e(q1, {}) : /* @__PURE__ */ e(ze, {}),
|
|
3950
3950
|
onClickIconRight: g1 && p && !I ? te : void 0,
|
|
3951
|
-
isLoading:
|
|
3952
|
-
disabled:
|
|
3951
|
+
isLoading: C,
|
|
3952
|
+
disabled: w,
|
|
3953
3953
|
width: W === "fill" ? "fill" : "hug",
|
|
3954
3954
|
feedback: V,
|
|
3955
3955
|
hint: O,
|
|
@@ -3960,7 +3960,7 @@ const k2 = T1.forwardRef(({
|
|
|
3960
3960
|
ke,
|
|
3961
3961
|
{
|
|
3962
3962
|
label: t ?? "",
|
|
3963
|
-
value: I && !
|
|
3963
|
+
value: I && !ue ? " " : ue,
|
|
3964
3964
|
onChange: () => {
|
|
3965
3965
|
},
|
|
3966
3966
|
readOnly: !0,
|
|
@@ -3968,8 +3968,8 @@ const k2 = T1.forwardRef(({
|
|
|
3968
3968
|
iconLeft: E,
|
|
3969
3969
|
iconRight: g1 && p ? /* @__PURE__ */ e(q1, {}) : /* @__PURE__ */ e(U1, {}),
|
|
3970
3970
|
onClickIconRight: g1 && p ? te : void 0,
|
|
3971
|
-
isLoading:
|
|
3972
|
-
disabled:
|
|
3971
|
+
isLoading: C,
|
|
3972
|
+
disabled: w,
|
|
3973
3973
|
width: W === "fill" ? "fill" : "hug",
|
|
3974
3974
|
feedback: V,
|
|
3975
3975
|
hint: O,
|
|
@@ -4053,12 +4053,12 @@ const l2 = ({
|
|
|
4053
4053
|
tertiaryDisabled: m,
|
|
4054
4054
|
tertiaryDisabledTooltip: d,
|
|
4055
4055
|
tertiaryDisabledTooltipPosition: k = "top",
|
|
4056
|
-
secondaryLabel:
|
|
4056
|
+
secondaryLabel: h,
|
|
4057
4057
|
onSecondary: v,
|
|
4058
|
-
secondaryLoading:
|
|
4058
|
+
secondaryLoading: C = !1,
|
|
4059
4059
|
secondaryDisabled: _,
|
|
4060
4060
|
secondaryDisabledTooltip: L,
|
|
4061
|
-
secondaryDisabledTooltipPosition:
|
|
4061
|
+
secondaryDisabledTooltipPosition: w = "top",
|
|
4062
4062
|
primaryLabel: B,
|
|
4063
4063
|
onPrimary: H,
|
|
4064
4064
|
primaryLoading: E = !1,
|
|
@@ -4075,7 +4075,7 @@ const l2 = ({
|
|
|
4075
4075
|
confirmCancelLabel: u1 = "Cancelar",
|
|
4076
4076
|
closeLabel: p = "Fechar"
|
|
4077
4077
|
}) => {
|
|
4078
|
-
const
|
|
4078
|
+
const y = a1(null), R = a1(null), [J, k1] = D(!1), [o1, z] = D(!1), [$, F] = D(!1), [q, r1] = D(!1);
|
|
4079
4079
|
k5(t, R, ".kdls-modal__body");
|
|
4080
4080
|
const Z = () => {
|
|
4081
4081
|
K ? k1(!0) : n();
|
|
@@ -4088,8 +4088,8 @@ const l2 = ({
|
|
|
4088
4088
|
};
|
|
4089
4089
|
return document.addEventListener("keydown", l1), () => document.removeEventListener("keydown", l1);
|
|
4090
4090
|
}, [t, n, K]), !t) return null;
|
|
4091
|
-
const Q = o !== void 0 || a ||
|
|
4092
|
-
l1.target ===
|
|
4091
|
+
const Q = o !== void 0 || a || h || B, j = (l1) => {
|
|
4092
|
+
l1.target === y.current && !V && Z();
|
|
4093
4093
|
}, b = async () => {
|
|
4094
4094
|
const l1 = H == null ? void 0 : H();
|
|
4095
4095
|
if (l1 instanceof Promise) {
|
|
@@ -4123,7 +4123,7 @@ const l2 = ({
|
|
|
4123
4123
|
}, c1 = /* @__PURE__ */ e(
|
|
4124
4124
|
"div",
|
|
4125
4125
|
{
|
|
4126
|
-
ref:
|
|
4126
|
+
ref: y,
|
|
4127
4127
|
className: "kdls-modal-overlay",
|
|
4128
4128
|
onClick: j,
|
|
4129
4129
|
role: "dialog",
|
|
@@ -4141,7 +4141,7 @@ const l2 = ({
|
|
|
4141
4141
|
/* @__PURE__ */ u("div", { className: "kdls-modal__header", children: [
|
|
4142
4142
|
/* @__PURE__ */ u("div", { className: "kdls-modal__title-group", children: [
|
|
4143
4143
|
/* @__PURE__ */ e(X, { as: "span", variant: "titleMd", className: "kdls-modal__title", children: l }),
|
|
4144
|
-
r && /* @__PURE__ */ e(
|
|
4144
|
+
r && /* @__PURE__ */ e(oe, { content: r, placement: i })
|
|
4145
4145
|
] }),
|
|
4146
4146
|
/* @__PURE__ */ e("div", { className: "kdls-modal__header-actions", children: /* @__PURE__ */ e(
|
|
4147
4147
|
w1,
|
|
@@ -4156,7 +4156,7 @@ const l2 = ({
|
|
|
4156
4156
|
s && /* @__PURE__ */ e("div", { className: "kdls-modal__body kdls-scroll kdls-scroll--thin", children: s }),
|
|
4157
4157
|
Q && /* @__PURE__ */ e("div", { className: "kdls-modal__footer", children: o ?? /* @__PURE__ */ u(N1, { children: [
|
|
4158
4158
|
a && /* @__PURE__ */ e(y1, { variant: "link", size: "md", label: a, onClick: I, isLoading: q || f, disabled: m, disabledTooltip: d, disabledTooltipPosition: k }),
|
|
4159
|
-
|
|
4159
|
+
h && /* @__PURE__ */ e(y1, { variant: "ghost", size: "md", label: h, onClick: e1, isLoading: $ || C, disabled: _, disabledTooltip: L, disabledTooltipPosition: w }),
|
|
4160
4160
|
B && /* @__PURE__ */ e(y1, { variant: "primary", size: "md", label: B, onClick: b, isLoading: o1 || E, disabled: W, disabledTooltip: T, disabledTooltipPosition: P })
|
|
4161
4161
|
] }) }),
|
|
4162
4162
|
/* @__PURE__ */ e(
|
|
@@ -4240,12 +4240,12 @@ const Rt = 600, _2 = 400, Yn = 0.9, Bt = 16, z2 = () => Math.max(_2, Math.round(
|
|
|
4240
4240
|
headerActionLabel: m,
|
|
4241
4241
|
onHeaderAction: d,
|
|
4242
4242
|
headerActionLoading: k = !1,
|
|
4243
|
-
headerActionDisabled:
|
|
4243
|
+
headerActionDisabled: h,
|
|
4244
4244
|
headerActionDisabledTooltip: v,
|
|
4245
|
-
headerActionDisabledTooltipPosition:
|
|
4245
|
+
headerActionDisabledTooltipPosition: C = "top",
|
|
4246
4246
|
children: _,
|
|
4247
4247
|
footer: L,
|
|
4248
|
-
primaryLabel:
|
|
4248
|
+
primaryLabel: w,
|
|
4249
4249
|
onPrimary: B,
|
|
4250
4250
|
primaryLoading: H = !1,
|
|
4251
4251
|
primaryDisabled: E,
|
|
@@ -4261,7 +4261,7 @@ const Rt = 600, _2 = 400, Yn = 0.9, Bt = 16, z2 = () => Math.max(_2, Math.round(
|
|
|
4261
4261
|
onTertiary: A,
|
|
4262
4262
|
tertiaryLoading: u1 = !1,
|
|
4263
4263
|
tertiaryDisabled: p,
|
|
4264
|
-
tertiaryDisabledTooltip:
|
|
4264
|
+
tertiaryDisabledTooltip: y,
|
|
4265
4265
|
tertiaryDisabledTooltipPosition: R = "top",
|
|
4266
4266
|
closeLabel: J = "Fechar",
|
|
4267
4267
|
disableOverlayClose: k1 = !1,
|
|
@@ -4288,7 +4288,7 @@ const Rt = 600, _2 = 400, Yn = 0.9, Bt = 16, z2 = () => Math.max(_2, Math.round(
|
|
|
4288
4288
|
};
|
|
4289
4289
|
return document.addEventListener("keydown", C1), () => document.removeEventListener("keydown", C1);
|
|
4290
4290
|
}, [t, n, o1]), !t) return null;
|
|
4291
|
-
const j1 = L !== void 0 || U || P ||
|
|
4291
|
+
const j1 = L !== void 0 || U || P || w, $1 = (C1) => {
|
|
4292
4292
|
C1.target === Z.current && !k1 && x1();
|
|
4293
4293
|
}, P1 = async () => {
|
|
4294
4294
|
const C1 = B == null ? void 0 : B();
|
|
@@ -4379,10 +4379,10 @@ const Rt = 600, _2 = 400, Yn = 0.9, Bt = 16, z2 = () => Math.max(_2, Math.round(
|
|
|
4379
4379
|
o && /* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(c5, {}), variant: "neutral", onClick: o, "aria-label": "Voltar" }),
|
|
4380
4380
|
/* @__PURE__ */ u("div", { className: "kdls-drawer__title-group", children: [
|
|
4381
4381
|
/* @__PURE__ */ e("span", { className: "kdls-drawer__title", children: l }),
|
|
4382
|
-
r && /* @__PURE__ */ e(
|
|
4382
|
+
r && /* @__PURE__ */ e(oe, { content: r, placement: i })
|
|
4383
4383
|
] }),
|
|
4384
4384
|
/* @__PURE__ */ u("div", { className: "kdls-drawer__header-actions", children: [
|
|
4385
|
-
m && /* @__PURE__ */ e(y1, { variant: "link", size: "md", label: m, onClick: g1, isLoading: F1 || k, disabled:
|
|
4385
|
+
m && /* @__PURE__ */ e(y1, { variant: "link", size: "md", label: m, onClick: g1, isLoading: F1 || k, disabled: h, disabledTooltip: v, disabledTooltipPosition: C }),
|
|
4386
4386
|
a && /* @__PURE__ */ u("span", { className: "kdls-drawer__header-badge", children: [
|
|
4387
4387
|
/* @__PURE__ */ e("span", { "aria-hidden": f ? !0 : void 0, children: /* @__PURE__ */ e(L2, { label: a, variant: c, appearance: "tone-10", size: "sm" }) }),
|
|
4388
4388
|
f && /* @__PURE__ */ e("span", { className: "kdls-drawer__visually-hidden", children: f })
|
|
@@ -4400,9 +4400,9 @@ const Rt = 600, _2 = 400, Yn = 0.9, Bt = 16, z2 = () => Math.max(_2, Math.round(
|
|
|
4400
4400
|
] }),
|
|
4401
4401
|
/* @__PURE__ */ e("div", { className: "kdls-drawer__body kdls-scroll kdls-scroll--thin", children: _ }),
|
|
4402
4402
|
j1 && /* @__PURE__ */ e("div", { className: "kdls-drawer__footer", children: L ?? /* @__PURE__ */ u(N1, { children: [
|
|
4403
|
-
U && /* @__PURE__ */ e(y1, { variant: "link", size: "md", label: U, onClick: D1, isLoading: _1 || u1, disabled: p, disabledTooltip:
|
|
4403
|
+
U && /* @__PURE__ */ e(y1, { variant: "link", size: "md", label: U, onClick: D1, isLoading: _1 || u1, disabled: p, disabledTooltip: y, disabledTooltipPosition: R }),
|
|
4404
4404
|
P && /* @__PURE__ */ e(y1, { variant: "ghost", size: "md", label: P, onClick: m1, isLoading: c1 || V, disabled: O, disabledTooltip: K, disabledTooltipPosition: S }),
|
|
4405
|
-
|
|
4405
|
+
w && /* @__PURE__ */ e(y1, { variant: "primary", size: "md", label: w, onClick: P1, isLoading: e1 || H, disabled: E, disabledTooltip: W, disabledTooltipPosition: T })
|
|
4406
4406
|
] }) }),
|
|
4407
4407
|
/* @__PURE__ */ e(
|
|
4408
4408
|
l2,
|
|
@@ -4552,7 +4552,7 @@ const Rt = 600, _2 = 400, Yn = 0.9, Bt = 16, z2 = () => Math.max(_2, Math.round(
|
|
|
4552
4552
|
onClick: d,
|
|
4553
4553
|
className: k = ""
|
|
4554
4554
|
}) => {
|
|
4555
|
-
const
|
|
4555
|
+
const h = [
|
|
4556
4556
|
"kdls-nav__item",
|
|
4557
4557
|
n ? "kdls-nav__item--active" : "",
|
|
4558
4558
|
l ? "kdls-nav__item--disabled" : "",
|
|
@@ -4560,8 +4560,8 @@ const Rt = 600, _2 = 400, Yn = 0.9, Bt = 16, z2 = () => Math.max(_2, Math.round(
|
|
|
4560
4560
|
k
|
|
4561
4561
|
].filter(Boolean).join(" "), v = /* @__PURE__ */ u(N1, { children: [
|
|
4562
4562
|
o && /* @__PURE__ */ e("span", { className: "kdls-nav__item-icon", "aria-hidden": "true", children: o }),
|
|
4563
|
-
c && !f ? /* @__PURE__ */ e(
|
|
4564
|
-
c && f && /* @__PURE__ */ e("span", { className: "kdls-nav__item-tooltip-icon", children: /* @__PURE__ */ e(
|
|
4563
|
+
c && !f ? /* @__PURE__ */ e(oe, { content: c, placement: m, children: /* @__PURE__ */ e("span", { className: "kdls-nav__item-label", children: t }) }) : /* @__PURE__ */ e("span", { className: "kdls-nav__item-label", children: t }),
|
|
4564
|
+
c && f && /* @__PURE__ */ e("span", { className: "kdls-nav__item-tooltip-icon", children: /* @__PURE__ */ e(oe, { content: c, placement: m }) }),
|
|
4565
4565
|
a && /* @__PURE__ */ e(L2, { label: a, variant: "primary", appearance: "tone-50", size: "sm" })
|
|
4566
4566
|
] });
|
|
4567
4567
|
return i ? /* @__PURE__ */ e(
|
|
@@ -4570,12 +4570,12 @@ const Rt = 600, _2 = 400, Yn = 0.9, Bt = 16, z2 = () => Math.max(_2, Math.round(
|
|
|
4570
4570
|
href: l ? void 0 : i,
|
|
4571
4571
|
target: s ? "_blank" : void 0,
|
|
4572
4572
|
rel: s ? "noopener noreferrer" : void 0,
|
|
4573
|
-
className:
|
|
4573
|
+
className: h,
|
|
4574
4574
|
"aria-disabled": l || void 0,
|
|
4575
4575
|
"aria-current": n ? "page" : void 0,
|
|
4576
|
-
onClick: (
|
|
4576
|
+
onClick: (C) => {
|
|
4577
4577
|
if (l) {
|
|
4578
|
-
|
|
4578
|
+
C.preventDefault();
|
|
4579
4579
|
return;
|
|
4580
4580
|
}
|
|
4581
4581
|
d == null || d();
|
|
@@ -4586,7 +4586,7 @@ const Rt = 600, _2 = 400, Yn = 0.9, Bt = 16, z2 = () => Math.max(_2, Math.round(
|
|
|
4586
4586
|
"button",
|
|
4587
4587
|
{
|
|
4588
4588
|
type: "button",
|
|
4589
|
-
className:
|
|
4589
|
+
className: h,
|
|
4590
4590
|
disabled: l,
|
|
4591
4591
|
"aria-current": n ? "page" : void 0,
|
|
4592
4592
|
onClick: () => {
|
|
@@ -4638,7 +4638,7 @@ function Qn({
|
|
|
4638
4638
|
onClickIconRight: m,
|
|
4639
4639
|
iconRightLabel: d,
|
|
4640
4640
|
children: k,
|
|
4641
|
-
className:
|
|
4641
|
+
className: h
|
|
4642
4642
|
}) {
|
|
4643
4643
|
const v = [
|
|
4644
4644
|
"kdls-field",
|
|
@@ -4648,7 +4648,7 @@ function Qn({
|
|
|
4648
4648
|
s ? "kdls-field--disabled" : "",
|
|
4649
4649
|
o ? "kdls-field--loading" : "",
|
|
4650
4650
|
a !== "none" ? `kdls-field--feedback-${a}` : "",
|
|
4651
|
-
|
|
4651
|
+
h
|
|
4652
4652
|
].filter(Boolean).join(" ");
|
|
4653
4653
|
return /* @__PURE__ */ u("div", { className: v, children: [
|
|
4654
4654
|
c && /* @__PURE__ */ e("span", { className: "kdls-field__icon kdls-field__icon--left", "aria-hidden": "true", children: /* @__PURE__ */ e(n1, { icon: c }) }),
|
|
@@ -4663,7 +4663,7 @@ function Qn({
|
|
|
4663
4663
|
className: "kdls-field__icon kdls-field__icon--right kdls-field__icon--right--clickable",
|
|
4664
4664
|
onClick: m,
|
|
4665
4665
|
"aria-label": d,
|
|
4666
|
-
onMouseDown: (
|
|
4666
|
+
onMouseDown: (C) => C.preventDefault(),
|
|
4667
4667
|
children: /* @__PURE__ */ e(n1, { icon: f })
|
|
4668
4668
|
}
|
|
4669
4669
|
) : /* @__PURE__ */ e("span", { className: "kdls-field__icon kdls-field__icon--right", "aria-hidden": "true", children: /* @__PURE__ */ e(n1, { icon: f }) }) : null
|
|
@@ -4684,7 +4684,7 @@ function e3({
|
|
|
4684
4684
|
disabled: d = !1,
|
|
4685
4685
|
className: k
|
|
4686
4686
|
}) {
|
|
4687
|
-
const
|
|
4687
|
+
const h = ie(), v = `${h}-panel`, [C, _] = D(!1), L = s.length > 0 || o.length > 0, w = t.length > 0, B = C && L, H = () => {
|
|
4688
4688
|
L && !m && _(!0);
|
|
4689
4689
|
}, E = () => {
|
|
4690
4690
|
setTimeout(() => _(!1), 150);
|
|
@@ -4704,18 +4704,18 @@ function e3({
|
|
|
4704
4704
|
size: r,
|
|
4705
4705
|
label: l,
|
|
4706
4706
|
labelMode: r === "lg" ? "float" : "placeholder",
|
|
4707
|
-
htmlFor:
|
|
4708
|
-
filled:
|
|
4707
|
+
htmlFor: h,
|
|
4708
|
+
filled: w,
|
|
4709
4709
|
disabled: d,
|
|
4710
4710
|
isLoading: m,
|
|
4711
4711
|
iconLeft: /* @__PURE__ */ e(ze, {}),
|
|
4712
|
-
iconRight:
|
|
4712
|
+
iconRight: w ? /* @__PURE__ */ e(q1, {}) : void 0,
|
|
4713
4713
|
onClickIconRight: () => n(""),
|
|
4714
4714
|
iconRightLabel: "Limpar busca",
|
|
4715
4715
|
children: /* @__PURE__ */ e(
|
|
4716
4716
|
"input",
|
|
4717
4717
|
{
|
|
4718
|
-
id:
|
|
4718
|
+
id: h,
|
|
4719
4719
|
className: "kdls-field__input",
|
|
4720
4720
|
type: "text",
|
|
4721
4721
|
value: t,
|
|
@@ -4794,26 +4794,26 @@ const Ne = T1.createContext({
|
|
|
4794
4794
|
const { close: r, listboxId: i } = we(Ne), s = (o) => {
|
|
4795
4795
|
const a = Array.from(
|
|
4796
4796
|
o.currentTarget.querySelectorAll('[role="option"]:not([aria-disabled="true"])')
|
|
4797
|
-
), c = a.findIndex((
|
|
4798
|
-
if (!
|
|
4799
|
-
|
|
4800
|
-
const v =
|
|
4797
|
+
), c = a.findIndex((h) => h === document.activeElement), f = (h) => {
|
|
4798
|
+
if (!h) return;
|
|
4799
|
+
h.focus({ preventScroll: !0 });
|
|
4800
|
+
const v = h.closest(".kdls-menu__panel-body, .kdls-bottomsheet__list");
|
|
4801
4801
|
if (!v) return;
|
|
4802
|
-
const
|
|
4803
|
-
|
|
4804
|
-
}, m = ".kdls-menu__panel, .kdls-menu__panel-bare, .kdls-bottomsheet", d = (
|
|
4805
|
-
const v = o.currentTarget.closest(m),
|
|
4806
|
-
return
|
|
4802
|
+
const C = h.getBoundingClientRect(), _ = v.getBoundingClientRect();
|
|
4803
|
+
C.top < _.top ? v.scrollTop -= _.top - C.top : C.bottom > _.bottom && (v.scrollTop += C.bottom - _.bottom);
|
|
4804
|
+
}, m = ".kdls-menu__panel, .kdls-menu__panel-bare, .kdls-bottomsheet", d = (h) => {
|
|
4805
|
+
const v = o.currentTarget.closest(m), C = v == null ? void 0 : v.querySelector(".kdls-menu__panel-footer, .kdls-bottomsheet__footer");
|
|
4806
|
+
return C ? n3(C) : null;
|
|
4807
4807
|
}, k = () => {
|
|
4808
|
-
const
|
|
4809
|
-
return
|
|
4808
|
+
const h = o.currentTarget.closest(m);
|
|
4809
|
+
return h == null ? void 0 : h.querySelector(".kdls-menu__search input, .kdls-bottomsheet__search input");
|
|
4810
4810
|
};
|
|
4811
4811
|
switch (o.key) {
|
|
4812
4812
|
case "ArrowDown":
|
|
4813
4813
|
if (o.preventDefault(), c === a.length - 1) {
|
|
4814
|
-
const
|
|
4815
|
-
if (
|
|
4816
|
-
|
|
4814
|
+
const h = d();
|
|
4815
|
+
if (h) {
|
|
4816
|
+
h.focus({ preventScroll: !0 });
|
|
4817
4817
|
return;
|
|
4818
4818
|
}
|
|
4819
4819
|
}
|
|
@@ -4821,9 +4821,9 @@ const Ne = T1.createContext({
|
|
|
4821
4821
|
break;
|
|
4822
4822
|
case "ArrowUp":
|
|
4823
4823
|
if (o.preventDefault(), c === 0) {
|
|
4824
|
-
const
|
|
4825
|
-
if (
|
|
4826
|
-
|
|
4824
|
+
const h = k();
|
|
4825
|
+
if (h) {
|
|
4826
|
+
h.focus({ preventScroll: !0 });
|
|
4827
4827
|
return;
|
|
4828
4828
|
}
|
|
4829
4829
|
}
|
|
@@ -4840,15 +4840,15 @@ const Ne = T1.createContext({
|
|
|
4840
4840
|
break;
|
|
4841
4841
|
case "Tab":
|
|
4842
4842
|
if (o.shiftKey) {
|
|
4843
|
-
const
|
|
4844
|
-
if (
|
|
4845
|
-
o.preventDefault(),
|
|
4843
|
+
const h = k();
|
|
4844
|
+
if (h) {
|
|
4845
|
+
o.preventDefault(), h.focus({ preventScroll: !0 });
|
|
4846
4846
|
return;
|
|
4847
4847
|
}
|
|
4848
4848
|
} else {
|
|
4849
|
-
const
|
|
4850
|
-
if (
|
|
4851
|
-
o.preventDefault(),
|
|
4849
|
+
const h = d();
|
|
4850
|
+
if (h) {
|
|
4851
|
+
o.preventDefault(), h.focus({ preventScroll: !0 });
|
|
4852
4852
|
return;
|
|
4853
4853
|
}
|
|
4854
4854
|
}
|
|
@@ -4856,9 +4856,9 @@ const Ne = T1.createContext({
|
|
|
4856
4856
|
break;
|
|
4857
4857
|
default:
|
|
4858
4858
|
if (o.key.length === 1 && !o.ctrlKey && !o.metaKey && !o.altKey) {
|
|
4859
|
-
const
|
|
4860
|
-
var
|
|
4861
|
-
return (
|
|
4859
|
+
const h = o.key.toLowerCase(), v = c >= 0 ? c + 1 : 0, _ = [...a.slice(v), ...a.slice(0, v)].find((L) => {
|
|
4860
|
+
var w;
|
|
4861
|
+
return (w = L.textContent) == null ? void 0 : w.trim().toLowerCase().startsWith(h);
|
|
4862
4862
|
});
|
|
4863
4863
|
_ && f(_);
|
|
4864
4864
|
}
|
|
@@ -4894,7 +4894,7 @@ const Ne = T1.createContext({
|
|
|
4894
4894
|
disabled: d = !1,
|
|
4895
4895
|
className: k = ""
|
|
4896
4896
|
}) => {
|
|
4897
|
-
const { close:
|
|
4897
|
+
const { close: h } = we(Ne), v = m ?? !1, C = [
|
|
4898
4898
|
"kdls-menu__item",
|
|
4899
4899
|
v ? "kdls-menu__item--active" : "",
|
|
4900
4900
|
d ? "kdls-menu__item--disabled" : "",
|
|
@@ -4902,8 +4902,8 @@ const Ne = T1.createContext({
|
|
|
4902
4902
|
k
|
|
4903
4903
|
].filter(Boolean).join(" "), _ = /* @__PURE__ */ u(N1, { children: [
|
|
4904
4904
|
l && /* @__PURE__ */ e("span", { className: "kdls-menu__item-icon", "aria-hidden": "true", children: /* @__PURE__ */ e(n1, { icon: l }) }),
|
|
4905
|
-
o && !a ? /* @__PURE__ */ e(
|
|
4906
|
-
o && a && /* @__PURE__ */ e("span", { className: "kdls-menu__item-tooltip-icon", children: /* @__PURE__ */ e(
|
|
4905
|
+
o && !a ? /* @__PURE__ */ e(oe, { content: o, placement: c, children: /* @__PURE__ */ e("span", { className: "kdls-menu__item-label", children: t }) }) : /* @__PURE__ */ e("span", { className: "kdls-menu__item-label", children: t }),
|
|
4906
|
+
o && a && /* @__PURE__ */ e("span", { className: "kdls-menu__item-tooltip-icon", children: /* @__PURE__ */ e(oe, { content: o, placement: c }) }),
|
|
4907
4907
|
r && /* @__PURE__ */ e(L2, { label: r, variant: "primary", appearance: "tone-50", size: "sm" })
|
|
4908
4908
|
] });
|
|
4909
4909
|
return i ? /* @__PURE__ */ e("li", { role: "none", children: /* @__PURE__ */ e(
|
|
@@ -4912,7 +4912,7 @@ const Ne = T1.createContext({
|
|
|
4912
4912
|
href: d ? void 0 : i,
|
|
4913
4913
|
target: s ? "_blank" : void 0,
|
|
4914
4914
|
rel: s ? "noopener noreferrer" : void 0,
|
|
4915
|
-
className:
|
|
4915
|
+
className: C,
|
|
4916
4916
|
role: "option",
|
|
4917
4917
|
"aria-selected": v,
|
|
4918
4918
|
"aria-disabled": d || void 0,
|
|
@@ -4922,23 +4922,23 @@ const Ne = T1.createContext({
|
|
|
4922
4922
|
L.preventDefault();
|
|
4923
4923
|
return;
|
|
4924
4924
|
}
|
|
4925
|
-
f == null || f(),
|
|
4925
|
+
f == null || f(), h();
|
|
4926
4926
|
},
|
|
4927
4927
|
children: _
|
|
4928
4928
|
}
|
|
4929
4929
|
) }) : /* @__PURE__ */ e(
|
|
4930
4930
|
"li",
|
|
4931
4931
|
{
|
|
4932
|
-
className:
|
|
4932
|
+
className: C,
|
|
4933
4933
|
role: "option",
|
|
4934
4934
|
"aria-selected": v,
|
|
4935
4935
|
"aria-disabled": d || void 0,
|
|
4936
4936
|
tabIndex: -1,
|
|
4937
4937
|
onMouseDown: (L) => {
|
|
4938
|
-
L.preventDefault(), d || (f == null || f(),
|
|
4938
|
+
L.preventDefault(), d || (f == null || f(), h());
|
|
4939
4939
|
},
|
|
4940
4940
|
onKeyDown: (L) => {
|
|
4941
|
-
(L.key === "Enter" || L.key === " ") && !d && (L.preventDefault(), f == null || f(),
|
|
4941
|
+
(L.key === "Enter" || L.key === " ") && !d && (L.preventDefault(), f == null || f(), h());
|
|
4942
4942
|
},
|
|
4943
4943
|
children: _
|
|
4944
4944
|
}
|
|
@@ -4958,7 +4958,7 @@ const Ne = T1.createContext({
|
|
|
4958
4958
|
disabled: d = !1,
|
|
4959
4959
|
className: k = ""
|
|
4960
4960
|
}) => {
|
|
4961
|
-
const { close:
|
|
4961
|
+
const { close: h } = we(Ne), v = m ?? !1, C = [
|
|
4962
4962
|
"kdls-menu__item",
|
|
4963
4963
|
v ? "kdls-menu__item--active" : "",
|
|
4964
4964
|
d ? "kdls-menu__item--disabled" : "",
|
|
@@ -4966,8 +4966,8 @@ const Ne = T1.createContext({
|
|
|
4966
4966
|
k
|
|
4967
4967
|
].filter(Boolean).join(" "), _ = /* @__PURE__ */ u(N1, { children: [
|
|
4968
4968
|
l && /* @__PURE__ */ e("span", { className: "kdls-menu__item-icon", "aria-hidden": "true", children: /* @__PURE__ */ e(n1, { icon: l }) }),
|
|
4969
|
-
o && !a ? /* @__PURE__ */ e(
|
|
4970
|
-
o && a && /* @__PURE__ */ e("span", { className: "kdls-menu__item-tooltip-icon", children: /* @__PURE__ */ e(
|
|
4969
|
+
o && !a ? /* @__PURE__ */ e(oe, { content: o, placement: c, children: /* @__PURE__ */ e("span", { className: "kdls-menu__item-label", children: t }) }) : /* @__PURE__ */ e("span", { className: "kdls-menu__item-label", children: t }),
|
|
4970
|
+
o && a && /* @__PURE__ */ e("span", { className: "kdls-menu__item-tooltip-icon", children: /* @__PURE__ */ e(oe, { content: o, placement: c }) }),
|
|
4971
4971
|
r && /* @__PURE__ */ e(L2, { label: r, variant: "primary", appearance: "tone-50", size: "sm" })
|
|
4972
4972
|
] });
|
|
4973
4973
|
return i ? /* @__PURE__ */ e("li", { role: "none", children: /* @__PURE__ */ e(
|
|
@@ -4976,7 +4976,7 @@ const Ne = T1.createContext({
|
|
|
4976
4976
|
href: d ? void 0 : i,
|
|
4977
4977
|
target: s ? "_blank" : void 0,
|
|
4978
4978
|
rel: s ? "noopener noreferrer" : void 0,
|
|
4979
|
-
className:
|
|
4979
|
+
className: C,
|
|
4980
4980
|
role: "option",
|
|
4981
4981
|
"aria-selected": v,
|
|
4982
4982
|
"aria-disabled": d || void 0,
|
|
@@ -4986,23 +4986,23 @@ const Ne = T1.createContext({
|
|
|
4986
4986
|
L.preventDefault();
|
|
4987
4987
|
return;
|
|
4988
4988
|
}
|
|
4989
|
-
f == null || f(),
|
|
4989
|
+
f == null || f(), h();
|
|
4990
4990
|
},
|
|
4991
4991
|
children: _
|
|
4992
4992
|
}
|
|
4993
4993
|
) }) : /* @__PURE__ */ e(
|
|
4994
4994
|
"li",
|
|
4995
4995
|
{
|
|
4996
|
-
className:
|
|
4996
|
+
className: C,
|
|
4997
4997
|
role: "option",
|
|
4998
4998
|
"aria-selected": v,
|
|
4999
4999
|
"aria-disabled": d || void 0,
|
|
5000
5000
|
tabIndex: -1,
|
|
5001
5001
|
onMouseDown: (L) => {
|
|
5002
|
-
L.preventDefault(), d || (f == null || f(),
|
|
5002
|
+
L.preventDefault(), d || (f == null || f(), h());
|
|
5003
5003
|
},
|
|
5004
5004
|
onKeyDown: (L) => {
|
|
5005
|
-
(L.key === "Enter" || L.key === " ") && !d && (L.preventDefault(), f == null || f(),
|
|
5005
|
+
(L.key === "Enter" || L.key === " ") && !d && (L.preventDefault(), f == null || f(), h());
|
|
5006
5006
|
},
|
|
5007
5007
|
children: _
|
|
5008
5008
|
}
|
|
@@ -5017,7 +5017,7 @@ const Ne = T1.createContext({
|
|
|
5017
5017
|
}) => {
|
|
5018
5018
|
const o = we(Ne), a = we(it);
|
|
5019
5019
|
a == null || a.orientation;
|
|
5020
|
-
const c = (a == null ? void 0 : a.orientation) === "vertical" ? !0 : r, f = ie(), m = a1(null), d = a1(null), [k,
|
|
5020
|
+
const c = (a == null ? void 0 : a.orientation) === "vertical" ? !0 : r, f = ie(), m = a1(null), d = a1(null), [k, h] = D(!1), [v, C] = D(!1), [_, L] = D(null), w = st(), { style: B, positioned: H } = rt({
|
|
5021
5021
|
triggerRef: m,
|
|
5022
5022
|
panelRef: d,
|
|
5023
5023
|
side: "right",
|
|
@@ -5033,18 +5033,18 @@ const Ne = T1.createContext({
|
|
|
5033
5033
|
}, []);
|
|
5034
5034
|
const N = A1(() => {
|
|
5035
5035
|
i || (clearTimeout(W.current), E.current = setTimeout(() => {
|
|
5036
|
-
|
|
5036
|
+
C(!1), h(!0), o.notifyOpen(f);
|
|
5037
5037
|
}, 150));
|
|
5038
5038
|
}, [i, o.notifyOpen, f]), V = A1(() => {
|
|
5039
5039
|
clearTimeout(E.current), W.current = setTimeout(() => {
|
|
5040
5040
|
var u1, p;
|
|
5041
5041
|
const { x: S, y: U } = T.current, A = document.elementFromPoint(S, U);
|
|
5042
|
-
(u1 = m.current) != null && u1.contains(A) || (p = d.current) != null && p.contains(A) ||
|
|
5042
|
+
(u1 = m.current) != null && u1.contains(A) || (p = d.current) != null && p.contains(A) || h(!1);
|
|
5043
5043
|
}, 200);
|
|
5044
5044
|
}, []), O = A1((S = !1) => {
|
|
5045
|
-
i || (clearTimeout(W.current), clearTimeout(E.current),
|
|
5045
|
+
i || (clearTimeout(W.current), clearTimeout(E.current), C(S), h(!0), o.notifyOpen(f));
|
|
5046
5046
|
}, [i, o.notifyOpen, f]), K = A1(() => {
|
|
5047
|
-
clearTimeout(E.current), clearTimeout(W.current),
|
|
5047
|
+
clearTimeout(E.current), clearTimeout(W.current), h(!1);
|
|
5048
5048
|
}, []);
|
|
5049
5049
|
if (i1(() => () => {
|
|
5050
5050
|
clearTimeout(E.current), clearTimeout(W.current);
|
|
@@ -5055,11 +5055,11 @@ const Ne = T1.createContext({
|
|
|
5055
5055
|
S == null || S.focus({ preventScroll: !0 });
|
|
5056
5056
|
}, [k, v, H]), i1(() => {
|
|
5057
5057
|
k && o.openSubId !== null && o.openSubId !== f && K();
|
|
5058
|
-
}, [o.openSubId]), c ||
|
|
5058
|
+
}, [o.openSubId]), c || w) {
|
|
5059
5059
|
const S = () => {
|
|
5060
5060
|
if (!i) {
|
|
5061
5061
|
const A = !k;
|
|
5062
|
-
|
|
5062
|
+
h(A), A && o.notifyOpen(f);
|
|
5063
5063
|
}
|
|
5064
5064
|
}, U = [
|
|
5065
5065
|
"kdls-menu__item",
|
|
@@ -5080,7 +5080,7 @@ const Ne = T1.createContext({
|
|
|
5080
5080
|
tabIndex: -1,
|
|
5081
5081
|
onClick: S,
|
|
5082
5082
|
onKeyDown: (A) => {
|
|
5083
|
-
(A.key === "Enter" || A.key === " ") && (A.preventDefault(), S()), A.key === "Escape" && (
|
|
5083
|
+
(A.key === "Enter" || A.key === " ") && (A.preventDefault(), S()), A.key === "Escape" && (h(!1), o.close());
|
|
5084
5084
|
},
|
|
5085
5085
|
children: [
|
|
5086
5086
|
l && /* @__PURE__ */ e("span", { className: "kdls-menu__item-icon", "aria-hidden": "true", children: /* @__PURE__ */ e(n1, { icon: l }) }),
|
|
@@ -5240,17 +5240,17 @@ const N5 = (t) => {
|
|
|
5240
5240
|
name: m,
|
|
5241
5241
|
code: d,
|
|
5242
5242
|
agency: k,
|
|
5243
|
-
initials:
|
|
5243
|
+
initials: h,
|
|
5244
5244
|
src: v,
|
|
5245
|
-
avatarSize:
|
|
5245
|
+
avatarSize: C = "md",
|
|
5246
5246
|
buttonIcon: _,
|
|
5247
5247
|
iconVariant: L,
|
|
5248
|
-
iconSize:
|
|
5248
|
+
iconSize: w,
|
|
5249
5249
|
"aria-label": B,
|
|
5250
5250
|
zIndex: H,
|
|
5251
5251
|
triggerActive: E = !1,
|
|
5252
5252
|
className: W = ""
|
|
5253
|
-
} = t, T = we(it), P = T ? "navButton" : r ?? "navButton", N = (T == null ? void 0 : T.orientation) === "vertical", K = s ?? (P === "avatar" ? /* @__PURE__ */ e(P2, { initials:
|
|
5253
|
+
} = t, T = we(it), P = T ? "navButton" : r ?? "navButton", N = (T == null ? void 0 : T.orientation) === "vertical", K = s ?? (P === "avatar" ? /* @__PURE__ */ e(P2, { initials: h, src: v, size: C }) : null) ?? (P === "iconButton" && _ ? /* @__PURE__ */ e(w1, { icon: _, variant: L, size: w, "aria-label": B || "Menu" }) : null), [S, U] = D(!1), A = ie(), u1 = a1(null), p = a1(null), [y, R] = D(null), { side: J, align: k1 } = v2(i), { style: o1, positioned: z } = rt({
|
|
5254
5254
|
triggerRef: u1,
|
|
5255
5255
|
panelRef: p,
|
|
5256
5256
|
side: J,
|
|
@@ -5291,7 +5291,7 @@ const N5 = (t) => {
|
|
|
5291
5291
|
};
|
|
5292
5292
|
return document.addEventListener("click", I), () => document.removeEventListener("click", I);
|
|
5293
5293
|
}, [S]);
|
|
5294
|
-
const Z = { close: $, listboxId: A, openSubId:
|
|
5294
|
+
const Z = { close: $, listboxId: A, openSubId: y, notifyOpen: R }, Q = a !== void 0 ? L5(a) : l, j = () => {
|
|
5295
5295
|
q.current = !1, F();
|
|
5296
5296
|
}, b = (I) => {
|
|
5297
5297
|
(I.key === "Enter" || I.key === " ") && (I.preventDefault(), q.current = !0, F()), I.key === "Escape" && $(), I.key === "ArrowDown" && (I.preventDefault(), q.current = !0, S ? r1(!0) : F());
|
|
@@ -5428,17 +5428,17 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5428
5428
|
productSwitcher: m = !1,
|
|
5429
5429
|
user: d,
|
|
5430
5430
|
contextSelector: k,
|
|
5431
|
-
rightSlot:
|
|
5431
|
+
rightSlot: h,
|
|
5432
5432
|
profileMenuItems: v = [],
|
|
5433
|
-
onLogout:
|
|
5433
|
+
onLogout: C,
|
|
5434
5434
|
logoutLabel: _ = "Sair",
|
|
5435
5435
|
onFAQs: L,
|
|
5436
|
-
showFAQs:
|
|
5436
|
+
showFAQs: w = !0,
|
|
5437
5437
|
showNotifications: B = !0,
|
|
5438
5438
|
className: H = ""
|
|
5439
5439
|
}) => {
|
|
5440
5440
|
var Q, j;
|
|
5441
|
-
const E = st(), [W, T] = D(!1), [P, N] = D(!1), [V, O] = D(!1), [K, S] = D("none"), U = f.length > 1, A = m && !n && t !== "base" && U, u1 = U && !A, p = a1(null),
|
|
5441
|
+
const E = st(), [W, T] = D(!1), [P, N] = D(!1), [V, O] = D(!1), [K, S] = D("none"), U = f.length > 1, A = m && !n && t !== "base" && U, u1 = U && !A, p = a1(null), y = () => {
|
|
5442
5442
|
T(!1), N(!1), O(!1);
|
|
5443
5443
|
}, R = () => {
|
|
5444
5444
|
if (E) {
|
|
@@ -5461,7 +5461,7 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5461
5461
|
};
|
|
5462
5462
|
i1(() => {
|
|
5463
5463
|
const b = (e1) => {
|
|
5464
|
-
p.current && !p.current.contains(e1.target) &&
|
|
5464
|
+
p.current && !p.current.contains(e1.target) && y();
|
|
5465
5465
|
};
|
|
5466
5466
|
return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
5467
5467
|
}, []);
|
|
@@ -5502,11 +5502,11 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5502
5502
|
] })
|
|
5503
5503
|
] }), F = /* @__PURE__ */ u(N1, { children: [
|
|
5504
5504
|
$,
|
|
5505
|
-
(v.length > 0 ||
|
|
5505
|
+
(v.length > 0 || C) && /* @__PURE__ */ u("div", { className: "kdls-header__profile-menu", children: [
|
|
5506
5506
|
v.map((b) => /* @__PURE__ */ e("a", { href: b.href, onClick: b.onClick, className: "kdls-header__profile-item", children: b.label }, b.label)),
|
|
5507
|
-
|
|
5507
|
+
C && /* @__PURE__ */ u(N1, { children: [
|
|
5508
5508
|
v.length > 0 && /* @__PURE__ */ e("hr", { className: "kdls-header__profile-divider" }),
|
|
5509
|
-
/* @__PURE__ */ e("button", { type: "button", className: "kdls-header__profile-item kdls-header__profile-item--danger", onClick:
|
|
5509
|
+
/* @__PURE__ */ e("button", { type: "button", className: "kdls-header__profile-item kdls-header__profile-item--danger", onClick: C, children: _ })
|
|
5510
5510
|
] })
|
|
5511
5511
|
] })
|
|
5512
5512
|
] }), q = /* @__PURE__ */ u("div", { className: "kdls-header__mobile-menu", children: [
|
|
@@ -5519,13 +5519,13 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5519
5519
|
/* @__PURE__ */ e("hr", { className: "kdls-header__mobile-divider" }),
|
|
5520
5520
|
/* @__PURE__ */ e("div", { className: "kdls-header__mobile-menu-block", children: b.children ? /* @__PURE__ */ e(bn, { title: b.label, size: "md", className: "kdls-header__mobile-accordion", children: b.children.map((e1) => /* @__PURE__ */ e("a", { href: e1.href, onClick: e1.onClick, className: "kdls-header__mobile-row", children: /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", children: e1.label }) }, e1.label)) }) : /* @__PURE__ */ e("a", { href: b.href, onClick: b.onClick, className: "kdls-header__mobile-row", children: /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", children: b.label }) }) })
|
|
5521
5521
|
] }, b.label)),
|
|
5522
|
-
|
|
5522
|
+
w && /* @__PURE__ */ u(N1, { children: [
|
|
5523
5523
|
/* @__PURE__ */ e("hr", { className: "kdls-header__mobile-divider" }),
|
|
5524
5524
|
/* @__PURE__ */ e("div", { className: "kdls-header__mobile-menu-block", children: /* @__PURE__ */ e("button", { type: "button", className: "kdls-header__mobile-row", onClick: L, children: /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", children: "FAQs" }) }) })
|
|
5525
5525
|
] }),
|
|
5526
|
-
|
|
5526
|
+
C && /* @__PURE__ */ u(N1, { children: [
|
|
5527
5527
|
/* @__PURE__ */ e("hr", { className: "kdls-header__mobile-divider" }),
|
|
5528
|
-
/* @__PURE__ */ e("div", { className: "kdls-header__mobile-menu-block", children: /* @__PURE__ */ e("button", { type: "button", className: "kdls-header__mobile-row kdls-header__mobile-row--danger", onClick:
|
|
5528
|
+
/* @__PURE__ */ e("div", { className: "kdls-header__mobile-menu-block", children: /* @__PURE__ */ e("button", { type: "button", className: "kdls-header__mobile-row kdls-header__mobile-row--danger", onClick: C, children: /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", children: _ }) }) })
|
|
5529
5529
|
] })
|
|
5530
5530
|
] }), r1 = n ?? /* @__PURE__ */ e(At, { product: A ? "base" : t, variant: "primary", size: 24 }), Z = /* @__PURE__ */ u(
|
|
5531
5531
|
"button",
|
|
@@ -5578,7 +5578,7 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5578
5578
|
)
|
|
5579
5579
|
) }) }),
|
|
5580
5580
|
/* @__PURE__ */ u("div", { className: "kdls-header__actions", children: [
|
|
5581
|
-
!E &&
|
|
5581
|
+
!E && w && /* @__PURE__ */ e(
|
|
5582
5582
|
w1,
|
|
5583
5583
|
{
|
|
5584
5584
|
icon: /* @__PURE__ */ e(Cn, {}),
|
|
@@ -5611,7 +5611,7 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5611
5611
|
),
|
|
5612
5612
|
!E && V && /* @__PURE__ */ e("div", { className: "kdls-header__products-panel", children: z })
|
|
5613
5613
|
] }),
|
|
5614
|
-
|
|
5614
|
+
h,
|
|
5615
5615
|
/* @__PURE__ */ u("div", { className: "kdls-header__action-wrapper", children: [
|
|
5616
5616
|
/* @__PURE__ */ e(
|
|
5617
5617
|
"button",
|
|
@@ -5652,7 +5652,7 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5652
5652
|
crop: r,
|
|
5653
5653
|
className: i = ""
|
|
5654
5654
|
}) => {
|
|
5655
|
-
const s = a1(null), o = a1(null), [a, c] = D(!1), [f, m] = D(!1), [d, k] = D(1), [
|
|
5655
|
+
const s = a1(null), o = a1(null), [a, c] = D(!1), [f, m] = D(!1), [d, k] = D(1), [h, v] = D(0), [C, _] = D({ x: 10, y: 10, w: 80, h: 80 }), L = t === "image" ? ".jpg,.jpeg,.png,image/jpeg,image/png" : ".pdf,.docx,.doc,.jpeg,.jpg,.png", w = t === "image" ? "JPG, JPEG ou PNG" : "PDF, DOCX, JPEG ou PNG", B = t === "image" ? "Adicionar imagem" : "Adicionar arquivo";
|
|
5656
5656
|
i1(() => {
|
|
5657
5657
|
if (!f) return;
|
|
5658
5658
|
if (k(1), v(0), !r) {
|
|
@@ -5669,10 +5669,10 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5669
5669
|
if (K.length !== 2 || isNaN(K[0]) || isNaN(K[1])) return;
|
|
5670
5670
|
const [S, U] = K, A = S / U, u1 = O.width * 0.8, p = u1 / A;
|
|
5671
5671
|
if (p <= O.height * 0.8) {
|
|
5672
|
-
const
|
|
5673
|
-
_({ x: (100 -
|
|
5672
|
+
const y = u1 / O.width * 100, R = p / O.height * 100;
|
|
5673
|
+
_({ x: (100 - y) / 2, y: (100 - R) / 2, w: y, h: R });
|
|
5674
5674
|
} else {
|
|
5675
|
-
const
|
|
5675
|
+
const y = O.height * 0.8, J = y * A / O.width * 100, k1 = y / O.height * 100;
|
|
5676
5676
|
_({ x: (100 - J) / 2, y: (100 - k1) / 2, w: J, h: k1 });
|
|
5677
5677
|
}
|
|
5678
5678
|
} else {
|
|
@@ -5686,7 +5686,7 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5686
5686
|
V.stopPropagation(), V.preventDefault();
|
|
5687
5687
|
const O = o.current;
|
|
5688
5688
|
if (!O) return;
|
|
5689
|
-
const K = O.getBoundingClientRect(), S = V.clientX, U = V.clientY, A = { ...
|
|
5689
|
+
const K = O.getBoundingClientRect(), S = V.clientX, U = V.clientY, A = { ...C }, u1 = (() => {
|
|
5690
5690
|
if (typeof r == "string") {
|
|
5691
5691
|
const R = r.split(":").map(Number);
|
|
5692
5692
|
if (R.length === 2 && !isNaN(R[0]) && !isNaN(R[1]))
|
|
@@ -5717,10 +5717,10 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5717
5717
|
z < 0 && (F += z, z = 0), $ < 0 && (q += $, $ = 0), z + F > 100 && (F = 100 - z), $ + q > 100 && (q = 100 - $);
|
|
5718
5718
|
}
|
|
5719
5719
|
_({ x: z, y: $, w: F, h: q });
|
|
5720
|
-
},
|
|
5721
|
-
window.removeEventListener("mousemove", p), window.removeEventListener("mouseup",
|
|
5720
|
+
}, y = () => {
|
|
5721
|
+
window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", y);
|
|
5722
5722
|
};
|
|
5723
|
-
window.addEventListener("mousemove", p), window.addEventListener("mouseup",
|
|
5723
|
+
window.addEventListener("mousemove", p), window.addEventListener("mouseup", y);
|
|
5724
5724
|
}, E = (N) => {
|
|
5725
5725
|
if (!N) return;
|
|
5726
5726
|
const V = new FileReader();
|
|
@@ -5765,7 +5765,7 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5765
5765
|
src: n,
|
|
5766
5766
|
alt: "Editar",
|
|
5767
5767
|
className: "kdls-uploader__edit-img",
|
|
5768
|
-
style: { "--img-zoom": d, "--img-rotate": `${
|
|
5768
|
+
style: { "--img-zoom": d, "--img-rotate": `${h}deg` }
|
|
5769
5769
|
}
|
|
5770
5770
|
),
|
|
5771
5771
|
r && /* @__PURE__ */ u(
|
|
@@ -5773,10 +5773,10 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5773
5773
|
{
|
|
5774
5774
|
className: "kdls-uploader__crop-box",
|
|
5775
5775
|
style: {
|
|
5776
|
-
"--crop-x": `${
|
|
5777
|
-
"--crop-y": `${
|
|
5778
|
-
"--crop-w": `${
|
|
5779
|
-
"--crop-h": `${
|
|
5776
|
+
"--crop-x": `${C.x}%`,
|
|
5777
|
+
"--crop-y": `${C.y}%`,
|
|
5778
|
+
"--crop-w": `${C.w}%`,
|
|
5779
|
+
"--crop-h": `${C.h}%`
|
|
5780
5780
|
},
|
|
5781
5781
|
onMouseDown: H("center"),
|
|
5782
5782
|
children: [
|
|
@@ -5868,7 +5868,7 @@ const s3 = ({ item: t, active: n }) => {
|
|
|
5868
5868
|
/* @__PURE__ */ e(n1, { icon: /* @__PURE__ */ e(o5, {}) }),
|
|
5869
5869
|
/* @__PURE__ */ u(X, { as: "span", variant: "labelRegular", children: [
|
|
5870
5870
|
"Formatos suportados: ",
|
|
5871
|
-
|
|
5871
|
+
w
|
|
5872
5872
|
] })
|
|
5873
5873
|
] })
|
|
5874
5874
|
]
|
|
@@ -6091,7 +6091,7 @@ const c3 = "M3.2793 0C3.55534 0.000112402 3.7793 0.223927 3.7793 0.5V30.4688C3.7
|
|
|
6091
6091
|
onOpenChange: m,
|
|
6092
6092
|
zIndex: d,
|
|
6093
6093
|
panelClassName: k = "",
|
|
6094
|
-
titleClassName:
|
|
6094
|
+
titleClassName: h = "",
|
|
6095
6095
|
contentClassName: v = ""
|
|
6096
6096
|
}) => /* @__PURE__ */ e(
|
|
6097
6097
|
r2,
|
|
@@ -6108,9 +6108,9 @@ const c3 = "M3.2793 0C3.55534 0.000112402 3.7793 0.223927 3.7793 0.5V30.4688C3.7
|
|
|
6108
6108
|
className: "kdls-popover",
|
|
6109
6109
|
openClassName: "kdls-popover--open",
|
|
6110
6110
|
triggerClassName: "kdls-popover__trigger",
|
|
6111
|
-
content: (
|
|
6112
|
-
s && /* @__PURE__ */ e("div", { className: `kdls-popover__arrow kdls-popover__arrow--${h5(
|
|
6113
|
-
l && /* @__PURE__ */ e("div", { className: ["kdls-popover__title",
|
|
6111
|
+
content: (C) => /* @__PURE__ */ u("div", { className: ["kdls-popover__panel", o ? "kdls-popover__panel--fill-width" : "", k].filter(Boolean).join(" "), children: [
|
|
6112
|
+
s && /* @__PURE__ */ e("div", { className: `kdls-popover__arrow kdls-popover__arrow--${h5(C)}` }),
|
|
6113
|
+
l && /* @__PURE__ */ e("div", { className: ["kdls-popover__title", h].filter(Boolean).join(" "), children: l }),
|
|
6114
6114
|
/* @__PURE__ */ e("div", { className: ["kdls-popover__content", v].filter(Boolean).join(" "), children: n })
|
|
6115
6115
|
] }),
|
|
6116
6116
|
children: t
|
|
@@ -6165,17 +6165,17 @@ const c3 = "M3.2793 0C3.55534 0.000112402 3.7793 0.223927 3.7793 0.5V30.4688C3.7
|
|
|
6165
6165
|
required: m = !1,
|
|
6166
6166
|
className: d = ""
|
|
6167
6167
|
}, k) => {
|
|
6168
|
-
const
|
|
6168
|
+
const h = ie(), v = r !== void 0, [C, _] = D(i), L = v ? r : C, w = o ? "none" : a, B = (H) => {
|
|
6169
6169
|
v || _(H), s == null || s(H);
|
|
6170
6170
|
};
|
|
6171
6171
|
return /* @__PURE__ */ u("div", { ref: k, className: ["kdls-radio-group", d].filter(Boolean).join(" "), children: [
|
|
6172
|
-
n && /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", id:
|
|
6172
|
+
n && /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", id: h, className: ["kdls-radio-group__label", m && !o ? "kdls-radio-group__label--required" : "", o ? "kdls-radio-group__label--disabled" : ""].filter(Boolean).join(" "), children: n }),
|
|
6173
6173
|
/* @__PURE__ */ u(
|
|
6174
6174
|
"div",
|
|
6175
6175
|
{
|
|
6176
6176
|
className: "kdls-radio-group__options",
|
|
6177
6177
|
role: "radiogroup",
|
|
6178
|
-
"aria-labelledby": n ?
|
|
6178
|
+
"aria-labelledby": n ? h : void 0,
|
|
6179
6179
|
"aria-orientation": "vertical",
|
|
6180
6180
|
"aria-required": m || void 0,
|
|
6181
6181
|
"aria-invalid": a === "error" || void 0,
|
|
@@ -6187,7 +6187,7 @@ const c3 = "M3.2793 0C3.55534 0.000112402 3.7793 0.223927 3.7793 0.5V30.4688C3.7
|
|
|
6187
6187
|
label: H.label,
|
|
6188
6188
|
hint: H.hint,
|
|
6189
6189
|
size: l,
|
|
6190
|
-
feedback: H.disabled ? "none" :
|
|
6190
|
+
feedback: H.disabled ? "none" : w,
|
|
6191
6191
|
checked: H.value === L,
|
|
6192
6192
|
disabled: o || H.disabled,
|
|
6193
6193
|
onChange: () => B(H.value)
|
|
@@ -6217,21 +6217,21 @@ const v7 = {
|
|
|
6217
6217
|
disabled: c = !1,
|
|
6218
6218
|
className: f = ""
|
|
6219
6219
|
}) => {
|
|
6220
|
-
const m = ie(), d = ie(), k = i !== void 0, [
|
|
6220
|
+
const m = ie(), d = ie(), k = i !== void 0, [h, v] = D(s), C = k ? i : h, _ = () => {
|
|
6221
6221
|
if (c) return;
|
|
6222
|
-
const B = !
|
|
6222
|
+
const B = !C;
|
|
6223
6223
|
k || v(B), o == null || o(B);
|
|
6224
|
-
}, L = ["kdls-switch__hint", c ? "kdls-switch__hint--disabled" : ""].filter(Boolean).join(" "),
|
|
6224
|
+
}, L = ["kdls-switch__hint", c ? "kdls-switch__hint--disabled" : ""].filter(Boolean).join(" "), w = /* @__PURE__ */ u(
|
|
6225
6225
|
"div",
|
|
6226
6226
|
{
|
|
6227
6227
|
className: [
|
|
6228
6228
|
"kdls-switch",
|
|
6229
6229
|
`kdls-switch--${n}`,
|
|
6230
|
-
|
|
6230
|
+
C ? "kdls-switch--on" : "kdls-switch--off",
|
|
6231
6231
|
c ? "kdls-switch--disabled" : ""
|
|
6232
6232
|
].filter(Boolean).join(" "),
|
|
6233
6233
|
role: "switch",
|
|
6234
|
-
"aria-checked":
|
|
6234
|
+
"aria-checked": C,
|
|
6235
6235
|
"aria-disabled": c,
|
|
6236
6236
|
"aria-labelledby": t ? m : void 0,
|
|
6237
6237
|
"aria-describedby": r ? d : void 0,
|
|
@@ -6254,7 +6254,7 @@ const v7 = {
|
|
|
6254
6254
|
{
|
|
6255
6255
|
className: ["kdls-switch-wrapper", l !== "hug" ? `kdls-switch-wrapper--${l}` : "", f].filter(Boolean).join(" "),
|
|
6256
6256
|
children: [
|
|
6257
|
-
a ? /* @__PURE__ */ e("div", { className: `kdls-switch-container${c ? " kdls-switch-container--disabled" : ""}`, children:
|
|
6257
|
+
a ? /* @__PURE__ */ e("div", { className: `kdls-switch-container${c ? " kdls-switch-container--disabled" : ""}`, children: w }) : w,
|
|
6258
6258
|
a && r && /* @__PURE__ */ e(X, { as: "span", variant: "labelRegular", id: d, className: L, children: r })
|
|
6259
6259
|
]
|
|
6260
6260
|
}
|
|
@@ -6270,16 +6270,16 @@ const v7 = {
|
|
|
6270
6270
|
minHeight: r = 200,
|
|
6271
6271
|
className: i = ""
|
|
6272
6272
|
}) => {
|
|
6273
|
-
const s = a1(null), [o, a] = D("16"), [c, f] = D(0), m = A1((
|
|
6274
|
-
var
|
|
6275
|
-
(
|
|
6276
|
-
}, [l]), d = (
|
|
6273
|
+
const s = a1(null), [o, a] = D("16"), [c, f] = D(0), m = A1((h, v) => {
|
|
6274
|
+
var C, _;
|
|
6275
|
+
(C = s.current) == null || C.focus(), document.execCommand(h, !1, v), l == null || l(((_ = s.current) == null ? void 0 : _.innerHTML) ?? "");
|
|
6276
|
+
}, [l]), d = (h) => {
|
|
6277
6277
|
var v;
|
|
6278
|
-
a(
|
|
6279
|
-
_.removeAttribute("size"), _.style.fontSize = `${
|
|
6278
|
+
a(h), m("fontSize", "7"), s.current && s.current.querySelectorAll('font[size="7"]').forEach((_) => {
|
|
6279
|
+
_.removeAttribute("size"), _.style.fontSize = `${h}px`;
|
|
6280
6280
|
}), l == null || l(((v = s.current) == null ? void 0 : v.innerHTML) ?? "");
|
|
6281
|
-
}, k = (
|
|
6282
|
-
f(
|
|
6281
|
+
}, k = (h) => {
|
|
6282
|
+
f(h), m(A2[h].command);
|
|
6283
6283
|
};
|
|
6284
6284
|
return /* @__PURE__ */ u("div", { className: ["kdls-text-editor", i].filter(Boolean).join(" "), children: [
|
|
6285
6285
|
/* @__PURE__ */ u("div", { className: "kdls-text-editor__toolbar", role: "toolbar", "aria-label": "Formatação de texto", children: [
|
|
@@ -6290,10 +6290,10 @@ const v7 = {
|
|
|
6290
6290
|
icon: /* @__PURE__ */ e(on, {}),
|
|
6291
6291
|
label: String(o),
|
|
6292
6292
|
placement: "bottomLeft",
|
|
6293
|
-
children: v3.map((
|
|
6294
|
-
|
|
6293
|
+
children: v3.map((h) => /* @__PURE__ */ u(Y1.Item, { active: o === h, onClick: () => d(h), children: [
|
|
6294
|
+
h,
|
|
6295
6295
|
"px"
|
|
6296
|
-
] },
|
|
6296
|
+
] }, h))
|
|
6297
6297
|
}
|
|
6298
6298
|
),
|
|
6299
6299
|
/* @__PURE__ */ e("div", { className: "kdls-text-editor__divider" }),
|
|
@@ -6306,21 +6306,21 @@ const v7 = {
|
|
|
6306
6306
|
variant: "navButton",
|
|
6307
6307
|
icon: A2[c].icon,
|
|
6308
6308
|
placement: "bottomLeft",
|
|
6309
|
-
children: A2.map((
|
|
6309
|
+
children: A2.map((h, v) => /* @__PURE__ */ e(Y1.Item, { active: c === v, icon: h.icon, onClick: () => k(v), children: h.label }, h.command))
|
|
6310
6310
|
}
|
|
6311
6311
|
),
|
|
6312
6312
|
/* @__PURE__ */ e("div", { className: "kdls-text-editor__divider" }),
|
|
6313
6313
|
/* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(nt, {}), "aria-label": "Inserir imagem", onClick: () => {
|
|
6314
|
-
const
|
|
6315
|
-
|
|
6314
|
+
const h = prompt("URL da imagem:");
|
|
6315
|
+
h && m("insertHTML", `<img src="${h}" style="max-width:100%" />`);
|
|
6316
6316
|
} }),
|
|
6317
6317
|
/* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(P0, {}), "aria-label": "Inserir vídeo", onClick: () => {
|
|
6318
|
-
const
|
|
6319
|
-
|
|
6318
|
+
const h = prompt("URL do vídeo (YouTube embed):");
|
|
6319
|
+
h && m("insertHTML", `<iframe src="${h}" width="100%" height="315" frameborder="0" allowfullscreen style="display:block"></iframe>`);
|
|
6320
6320
|
} }),
|
|
6321
6321
|
/* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(O0, {}), "aria-label": "Inserir link", onClick: () => {
|
|
6322
|
-
const
|
|
6323
|
-
|
|
6322
|
+
const h = prompt("URL do link:");
|
|
6323
|
+
h && m("createLink", h);
|
|
6324
6324
|
} }),
|
|
6325
6325
|
/* @__PURE__ */ e("div", { className: "kdls-text-editor__divider" }),
|
|
6326
6326
|
/* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(sn, {}), "aria-label": "Lista", onClick: () => m("insertUnorderedList") }),
|
|
@@ -6334,8 +6334,8 @@ const v7 = {
|
|
|
6334
6334
|
contentEditable: !0,
|
|
6335
6335
|
suppressContentEditableWarning: !0,
|
|
6336
6336
|
onInput: () => {
|
|
6337
|
-
var
|
|
6338
|
-
return l == null ? void 0 : l(((
|
|
6337
|
+
var h;
|
|
6338
|
+
return l == null ? void 0 : l(((h = s.current) == null ? void 0 : h.innerHTML) ?? "");
|
|
6339
6339
|
},
|
|
6340
6340
|
style: { "--te-min-height": `${r}px` },
|
|
6341
6341
|
"data-placeholder": t,
|
|
@@ -6348,7 +6348,7 @@ let W1 = [];
|
|
|
6348
6348
|
const q2 = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map();
|
|
6349
6349
|
let Pt = 0, y3 = 0;
|
|
6350
6350
|
const W2 = /* @__PURE__ */ new Set();
|
|
6351
|
-
let Ve = !1, Y2 = 0, t2,
|
|
6351
|
+
let Ve = !1, Y2 = 0, t2, he;
|
|
6352
6352
|
function s2() {
|
|
6353
6353
|
const t = [...W1];
|
|
6354
6354
|
W2.forEach((n) => n(t));
|
|
@@ -6361,7 +6361,7 @@ function L3(t) {
|
|
|
6361
6361
|
const D5 = () => W1.filter((t) => !t.leaving);
|
|
6362
6362
|
function x2() {
|
|
6363
6363
|
const t = Date.now(), n = t - Y2;
|
|
6364
|
-
Y2 = t, !(Ve || n <= 0) && (Te.forEach((l, r) => Te.set(r, Math.max(0, l - n))),
|
|
6364
|
+
Y2 = t, !(Ve || n <= 0) && (Te.forEach((l, r) => Te.set(r, Math.max(0, l - n))), he !== void 0 && (he = Math.max(0, he - n)));
|
|
6365
6365
|
}
|
|
6366
6366
|
function H5(t = !1) {
|
|
6367
6367
|
let n = !1;
|
|
@@ -6369,11 +6369,11 @@ function H5(t = !1) {
|
|
|
6369
6369
|
r > 0 || (Te.delete(i), Pt += 1, W1 = W1.map((s) => s.id === i ? { ...s, joined: !0, joinOrder: Pt } : s), n = !0);
|
|
6370
6370
|
});
|
|
6371
6371
|
const l = D5();
|
|
6372
|
-
l.length > 0 && l.every((r) => r.joined) ? (
|
|
6372
|
+
l.length > 0 && l.every((r) => r.joined) ? (he === void 0 && (he = l.length === 1 && !t ? 0 : g3), he === 0 && (he = void 0, l.forEach((r) => ot(r.id)), n = !0)) : he = void 0, n && s2();
|
|
6373
6373
|
}
|
|
6374
6374
|
function i2() {
|
|
6375
6375
|
if (clearTimeout(t2), t2 = void 0, Ve) return;
|
|
6376
|
-
let t =
|
|
6376
|
+
let t = he ?? 1 / 0;
|
|
6377
6377
|
Te.forEach((n) => {
|
|
6378
6378
|
t = Math.min(t, n);
|
|
6379
6379
|
}), t !== 1 / 0 && (t2 = setTimeout(N3, t));
|
|
@@ -6408,13 +6408,13 @@ function Je(t, n = {}) {
|
|
|
6408
6408
|
}, o = W1.findIndex(
|
|
6409
6409
|
(a) => !a.leaving && !a.joined && r - (q2.get(a.id) ?? 0) <= b3 && jt[a.feedback] > jt[i]
|
|
6410
6410
|
);
|
|
6411
|
-
return W1 = o < 0 ? [...W1, s] : [...W1.slice(0, o), s, ...W1.slice(o)], q2.set(l, r), Te.set(l, i === "error" ? _3 : k3),
|
|
6411
|
+
return W1 = o < 0 ? [...W1, s] : [...W1.slice(0, o), s, ...W1.slice(o)], q2.set(l, r), Te.set(l, i === "error" ? _3 : k3), he = void 0, s2(), i2(), l;
|
|
6412
6412
|
}
|
|
6413
6413
|
function E5(t) {
|
|
6414
6414
|
M3(t);
|
|
6415
6415
|
}
|
|
6416
6416
|
function D3() {
|
|
6417
|
-
D5().forEach((t) => ot(t.id)),
|
|
6417
|
+
D5().forEach((t) => ot(t.id)), he = void 0, clearTimeout(t2), t2 = void 0, s2();
|
|
6418
6418
|
}
|
|
6419
6419
|
function H3() {
|
|
6420
6420
|
Ve || (x2(), Ve = !0, i2());
|
|
@@ -6498,7 +6498,7 @@ function B3(t) {
|
|
|
6498
6498
|
}
|
|
6499
6499
|
}
|
|
6500
6500
|
const b7 = () => {
|
|
6501
|
-
const [t, n] = D([]), [l, r] = D(!1), [i, s] = D(!1), [o, a] = D(!1), [c, f] = D({}), [m, d] = D(/* @__PURE__ */ new Set()), k = a1(null),
|
|
6501
|
+
const [t, n] = D([]), [l, r] = D(!1), [i, s] = D(!1), [o, a] = D(!1), [c, f] = D({}), [m, d] = D(/* @__PURE__ */ new Set()), k = a1(null), h = a1(null), v = a1(/* @__PURE__ */ new Map()), C = a1(/* @__PURE__ */ new Map());
|
|
6502
6502
|
i1(() => L3(n), []);
|
|
6503
6503
|
const _ = t.length > 1;
|
|
6504
6504
|
i1(() => {
|
|
@@ -6508,11 +6508,11 @@ const b7 = () => {
|
|
|
6508
6508
|
const p = (R) => {
|
|
6509
6509
|
var J;
|
|
6510
6510
|
(J = k.current) != null && J.contains(R.target) || r(!1);
|
|
6511
|
-
},
|
|
6511
|
+
}, y = (R) => {
|
|
6512
6512
|
R.key === "Escape" && (R.preventDefault(), r(!1));
|
|
6513
6513
|
};
|
|
6514
|
-
return document.addEventListener("mousedown", p), document.addEventListener("keydown",
|
|
6515
|
-
document.removeEventListener("mousedown", p), document.removeEventListener("keydown",
|
|
6514
|
+
return document.addEventListener("mousedown", p), document.addEventListener("keydown", y, !0), () => {
|
|
6515
|
+
document.removeEventListener("mousedown", p), document.removeEventListener("keydown", y, !0);
|
|
6516
6516
|
};
|
|
6517
6517
|
}, [l]), dt(() => {
|
|
6518
6518
|
const p = {};
|
|
@@ -6521,27 +6521,27 @@ const b7 = () => {
|
|
|
6521
6521
|
p[J] = k1 ? k1.scrollHeight : R.offsetHeight;
|
|
6522
6522
|
}), Object.keys(p).length === Object.keys(c).length && Object.entries(p).every(([R, J]) => c[Number(R)] === J) || f(p);
|
|
6523
6523
|
});
|
|
6524
|
-
const [L,
|
|
6524
|
+
const [L, w] = D(!1);
|
|
6525
6525
|
if (dt(() => {
|
|
6526
|
-
const p =
|
|
6527
|
-
if (!p || !
|
|
6528
|
-
const R =
|
|
6529
|
-
R !== L &&
|
|
6526
|
+
const p = h.current, y = p == null ? void 0 : p.firstElementChild;
|
|
6527
|
+
if (!p || !y) return;
|
|
6528
|
+
const R = y.offsetHeight > p.clientHeight + 1;
|
|
6529
|
+
R !== L && w(R), R && !i && (p.scrollTop = p.scrollHeight);
|
|
6530
6530
|
}), i1(() => {
|
|
6531
|
-
const p = t.filter((
|
|
6532
|
-
p.length === m.size && p.every((
|
|
6531
|
+
const p = t.filter((y) => c[y.id] !== void 0).map((y) => y.id);
|
|
6532
|
+
p.length === m.size && p.every((y) => m.has(y)) || d(new Set(p));
|
|
6533
6533
|
}, [t, c, m]), typeof document > "u") return null;
|
|
6534
|
-
const B = (p) => c[p.id] ?? 0, H = t.filter((p) => !p.leaving), E = H.filter((p) => l || !p.joined), W = H.filter((p) => !l && p.joined).sort((p,
|
|
6534
|
+
const B = (p) => c[p.id] ?? 0, H = t.filter((p) => !p.leaving), E = H.filter((p) => l || !p.joined), W = H.filter((p) => !l && p.joined).sort((p, y) => (y.joinOrder ?? 0) - (p.joinOrder ?? 0)), T = E[0] ?? W[0], P = E.length ? W : W.slice(1), N = E.slice(1), V = Math.min(P.length, 2), O = /* @__PURE__ */ new Map();
|
|
6535
6535
|
let K = T ? B(T) : 0;
|
|
6536
|
-
T && O.set(T.id, { below: 0, gaps: 0, edges: 0, depth: 0 }), P.forEach((p,
|
|
6537
|
-
O.set(p.id, { below: 0, gaps: 0, edges: 0, depth: Math.min(
|
|
6538
|
-
}), N.forEach((p,
|
|
6539
|
-
O.set(p.id, { below: K, gaps:
|
|
6536
|
+
T && O.set(T.id, { below: 0, gaps: 0, edges: 0, depth: 0 }), P.forEach((p, y) => {
|
|
6537
|
+
O.set(p.id, { below: 0, gaps: 0, edges: 0, depth: Math.min(y + 1, R3) });
|
|
6538
|
+
}), N.forEach((p, y) => {
|
|
6539
|
+
O.set(p.id, { below: K, gaps: y + 1, edges: V, depth: 0 }), K += B(p);
|
|
6540
6540
|
}), t.forEach((p) => {
|
|
6541
|
-
const
|
|
6542
|
-
|
|
6543
|
-
}),
|
|
6544
|
-
t.some((R) => R.id ===
|
|
6541
|
+
const y = O.get(p.id) ?? C.current.get(p.id);
|
|
6542
|
+
y && C.current.set(p.id, y);
|
|
6543
|
+
}), C.current.forEach((p, y) => {
|
|
6544
|
+
t.some((R) => R.id === y) || C.current.delete(y);
|
|
6545
6545
|
});
|
|
6546
6546
|
const S = P.length > 0, U = _ && (i || o || l), A = (p) => {
|
|
6547
6547
|
S && !p.target.closest("button") && r(!0);
|
|
@@ -6560,7 +6560,7 @@ const b7 = () => {
|
|
|
6560
6560
|
onMouseLeave: () => {
|
|
6561
6561
|
s(!1), E3();
|
|
6562
6562
|
},
|
|
6563
|
-
onFocus: (p) => a(p.target ===
|
|
6563
|
+
onFocus: (p) => a(p.target === h.current || B3(p.target)),
|
|
6564
6564
|
onBlur: (p) => {
|
|
6565
6565
|
p.currentTarget.contains(p.relatedTarget) || a(!1);
|
|
6566
6566
|
},
|
|
@@ -6569,7 +6569,7 @@ const b7 = () => {
|
|
|
6569
6569
|
/* @__PURE__ */ e(
|
|
6570
6570
|
"div",
|
|
6571
6571
|
{
|
|
6572
|
-
ref:
|
|
6572
|
+
ref: h,
|
|
6573
6573
|
className: [
|
|
6574
6574
|
"kdls-toaster__list",
|
|
6575
6575
|
L ? "kdls-toaster__list--scroll kdls-scroll kdls-scroll--thin" : "",
|
|
@@ -6588,7 +6588,7 @@ const b7 = () => {
|
|
|
6588
6588
|
onClick: A,
|
|
6589
6589
|
onKeyDown: u1,
|
|
6590
6590
|
children: /* @__PURE__ */ e("div", { className: "kdls-toaster__content", children: t.map((p) => {
|
|
6591
|
-
const
|
|
6591
|
+
const y = C.current.get(p.id) ?? { below: 0, gaps: 0, edges: 0, depth: 0 };
|
|
6592
6592
|
return /* @__PURE__ */ e(
|
|
6593
6593
|
"div",
|
|
6594
6594
|
{
|
|
@@ -6597,16 +6597,16 @@ const b7 = () => {
|
|
|
6597
6597
|
},
|
|
6598
6598
|
className: [
|
|
6599
6599
|
"kdls-toaster__item",
|
|
6600
|
-
|
|
6600
|
+
y.depth ? `kdls-toaster__item--depth-${y.depth}` : "",
|
|
6601
6601
|
c[p.id] === void 0 ? "kdls-toaster__item--unmeasured" : "",
|
|
6602
6602
|
m.has(p.id) ? "" : "kdls-toaster__item--new"
|
|
6603
6603
|
].filter(Boolean).join(" "),
|
|
6604
6604
|
style: {
|
|
6605
|
-
"--kdls-toaster-below": `${
|
|
6606
|
-
"--kdls-toaster-item-gaps":
|
|
6607
|
-
"--kdls-toaster-item-edges":
|
|
6605
|
+
"--kdls-toaster-below": `${y.below}px`,
|
|
6606
|
+
"--kdls-toaster-item-gaps": y.gaps,
|
|
6607
|
+
"--kdls-toaster-item-edges": y.edges
|
|
6608
6608
|
},
|
|
6609
|
-
onFocus:
|
|
6609
|
+
onFocus: y.depth ? () => r(!0) : void 0,
|
|
6610
6610
|
children: /* @__PURE__ */ e("div", { className: "kdls-toaster__slot", children: /* @__PURE__ */ e(
|
|
6611
6611
|
Z3,
|
|
6612
6612
|
{
|
|
@@ -6644,39 +6644,39 @@ const b7 = () => {
|
|
|
6644
6644
|
"aria-labelledby": a,
|
|
6645
6645
|
className: c = ""
|
|
6646
6646
|
}) => {
|
|
6647
|
-
const f = l !== void 0, [m, d] = D(r), k = f ? l : m,
|
|
6648
|
-
s ||
|
|
6647
|
+
const f = l !== void 0, [m, d] = D(r), k = f ? l : m, h = t.every((C) => (C.iconLeft || C.iconRight) && !C.label), v = (C) => {
|
|
6648
|
+
s || C.disabled || (f || d(C.value), i == null || i(C.value));
|
|
6649
6649
|
};
|
|
6650
6650
|
return /* @__PURE__ */ e(
|
|
6651
6651
|
"div",
|
|
6652
6652
|
{
|
|
6653
|
-
className: ["kdls-toggle", s ? "kdls-toggle--disabled" : "",
|
|
6653
|
+
className: ["kdls-toggle", s ? "kdls-toggle--disabled" : "", h ? "kdls-toggle--icon-only" : "", n !== "hug" ? `kdls-toggle--${n}` : "", c].filter(Boolean).join(" "),
|
|
6654
6654
|
role: "radiogroup",
|
|
6655
6655
|
"aria-label": o,
|
|
6656
6656
|
"aria-labelledby": a,
|
|
6657
|
-
children: t.map((
|
|
6658
|
-
const _ = s || !!
|
|
6659
|
-
return /* @__PURE__ */ u(
|
|
6657
|
+
children: t.map((C) => {
|
|
6658
|
+
const _ = s || !!C.disabled, L = C["aria-label"] ?? (C.label ? void 0 : C.tooltip), w = /* @__PURE__ */ u(
|
|
6660
6659
|
"button",
|
|
6661
6660
|
{
|
|
6662
6661
|
type: "button",
|
|
6663
6662
|
role: "radio",
|
|
6664
|
-
"aria-checked":
|
|
6665
|
-
"aria-label":
|
|
6663
|
+
"aria-checked": C.value === k,
|
|
6664
|
+
"aria-label": L,
|
|
6666
6665
|
disabled: _,
|
|
6667
|
-
onClick: () => v(
|
|
6666
|
+
onClick: () => v(C),
|
|
6668
6667
|
className: [
|
|
6669
6668
|
"kdls-toggle__item",
|
|
6670
|
-
|
|
6669
|
+
C.value === k ? "kdls-toggle__item--active" : ""
|
|
6671
6670
|
].filter(Boolean).join(" "),
|
|
6672
6671
|
children: [
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6672
|
+
C.iconLeft && /* @__PURE__ */ e("span", { className: "kdls-toggle__icon", children: /* @__PURE__ */ e(n1, { icon: C.iconLeft }) }),
|
|
6673
|
+
C.label && /* @__PURE__ */ e(X, { as: "span", variant: "bodyMd", color: "inherit", children: C.label }),
|
|
6674
|
+
C.iconRight && /* @__PURE__ */ e("span", { className: "kdls-toggle__icon", children: /* @__PURE__ */ e(n1, { icon: C.iconRight }) })
|
|
6676
6675
|
]
|
|
6677
6676
|
},
|
|
6678
|
-
|
|
6677
|
+
C.value
|
|
6679
6678
|
);
|
|
6679
|
+
return C.tooltip ? /* @__PURE__ */ e(oe, { content: C.tooltip, className: "kdls-toggle__tip", children: w }, C.value) : w;
|
|
6680
6680
|
})
|
|
6681
6681
|
}
|
|
6682
6682
|
);
|
|
@@ -6721,10 +6721,10 @@ const y7 = ({
|
|
|
6721
6721
|
secondaryDisabled: m = !1,
|
|
6722
6722
|
secondaryDisabledTooltip: d,
|
|
6723
6723
|
onClear: k,
|
|
6724
|
-
onDismiss:
|
|
6724
|
+
onDismiss: h,
|
|
6725
6725
|
className: v = ""
|
|
6726
6726
|
}) => {
|
|
6727
|
-
const [
|
|
6727
|
+
const [C, _] = D(!1), [L, w] = D(!1), B = async () => {
|
|
6728
6728
|
const T = r == null ? void 0 : r();
|
|
6729
6729
|
if (T instanceof Promise) {
|
|
6730
6730
|
_(!0);
|
|
@@ -6737,14 +6737,14 @@ const y7 = ({
|
|
|
6737
6737
|
}, H = async () => {
|
|
6738
6738
|
const T = c == null ? void 0 : c();
|
|
6739
6739
|
if (T instanceof Promise) {
|
|
6740
|
-
|
|
6740
|
+
w(!0);
|
|
6741
6741
|
try {
|
|
6742
6742
|
await T;
|
|
6743
6743
|
} finally {
|
|
6744
|
-
|
|
6744
|
+
w(!1);
|
|
6745
6745
|
}
|
|
6746
6746
|
}
|
|
6747
|
-
}, E = !!
|
|
6747
|
+
}, E = !!h, W = [
|
|
6748
6748
|
"kdls-bulk-action-bar",
|
|
6749
6749
|
E ? "kdls-bulk-action-bar--dismiss" : "",
|
|
6750
6750
|
v
|
|
@@ -6752,7 +6752,7 @@ const y7 = ({
|
|
|
6752
6752
|
return ge.createPortal(
|
|
6753
6753
|
/* @__PURE__ */ u("div", { className: W, children: [
|
|
6754
6754
|
/* @__PURE__ */ e("div", { className: "kdls-bulk-action-bar__identity", children: E ? /* @__PURE__ */ u(N1, { children: [
|
|
6755
|
-
/* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(q1, {}), variant: "neutral", onClick:
|
|
6755
|
+
/* @__PURE__ */ e(w1, { icon: /* @__PURE__ */ e(q1, {}), variant: "neutral", onClick: h, "aria-label": "Fechar" }),
|
|
6756
6756
|
/* @__PURE__ */ e(X, { as: "span", variant: "titleSm", className: "kdls-bulk-action-bar__label", children: t })
|
|
6757
6757
|
] }) : /* @__PURE__ */ u(N1, { children: [
|
|
6758
6758
|
/* @__PURE__ */ e(X, { as: "span", variant: "titleSm", className: "kdls-bulk-action-bar__label", children: t }),
|
|
@@ -6783,7 +6783,7 @@ const y7 = ({
|
|
|
6783
6783
|
variant: "primary",
|
|
6784
6784
|
label: l,
|
|
6785
6785
|
onClick: B,
|
|
6786
|
-
isLoading:
|
|
6786
|
+
isLoading: C || i,
|
|
6787
6787
|
disabled: s,
|
|
6788
6788
|
disabledTooltip: o,
|
|
6789
6789
|
disabledTooltipPosition: "top",
|
|
@@ -6831,7 +6831,7 @@ const y7 = ({
|
|
|
6831
6831
|
showIcon: a = !0,
|
|
6832
6832
|
className: c = ""
|
|
6833
6833
|
}) => {
|
|
6834
|
-
const [f, m] = D(i), d = s !== void 0, k = d ? s : f,
|
|
6834
|
+
const [f, m] = D(i), d = s !== void 0, k = d ? s : f, h = () => {
|
|
6835
6835
|
d ? o == null || o(!k) : m((v) => !v);
|
|
6836
6836
|
};
|
|
6837
6837
|
return /* @__PURE__ */ u("div", { className: ["kdls-card__collapsible", c].filter(Boolean).join(" "), children: [
|
|
@@ -6842,7 +6842,7 @@ const y7 = ({
|
|
|
6842
6842
|
variant: "link",
|
|
6843
6843
|
label: k ? l : n,
|
|
6844
6844
|
iconRight: a ? k ? /* @__PURE__ */ e(d5, {}) : /* @__PURE__ */ e(U1, {}) : void 0,
|
|
6845
|
-
onClick:
|
|
6845
|
+
onClick: h
|
|
6846
6846
|
}
|
|
6847
6847
|
) })
|
|
6848
6848
|
] });
|
|
@@ -6863,10 +6863,10 @@ const y7 = ({
|
|
|
6863
6863
|
loadingRows: m = 3,
|
|
6864
6864
|
loadingTitleRows: d = 2,
|
|
6865
6865
|
loading: k = !1,
|
|
6866
|
-
className:
|
|
6866
|
+
className: h = ""
|
|
6867
6867
|
}) => {
|
|
6868
|
-
const v = c && !!f,
|
|
6869
|
-
s && l && (
|
|
6868
|
+
const v = c && !!f, C = {};
|
|
6869
|
+
s && l && (C.width = l), !s && r && (C.height = r);
|
|
6870
6870
|
const _ = !s && !r;
|
|
6871
6871
|
return /* @__PURE__ */ u(
|
|
6872
6872
|
"div",
|
|
@@ -6877,7 +6877,7 @@ const y7 = ({
|
|
|
6877
6877
|
o === "sm" ? "kdls-card--sm" : "",
|
|
6878
6878
|
a ? "kdls-card--bordered" : "",
|
|
6879
6879
|
c ? "kdls-card--hoverable" : "",
|
|
6880
|
-
|
|
6880
|
+
h
|
|
6881
6881
|
].filter(Boolean).join(" "),
|
|
6882
6882
|
"aria-busy": k || void 0,
|
|
6883
6883
|
role: v ? "button" : void 0,
|
|
@@ -6894,7 +6894,7 @@ const y7 = ({
|
|
|
6894
6894
|
"kdls-card__cover",
|
|
6895
6895
|
_ ? "kdls-card__cover--16-9" : ""
|
|
6896
6896
|
].filter(Boolean).join(" "),
|
|
6897
|
-
style:
|
|
6897
|
+
style: C,
|
|
6898
6898
|
children: [
|
|
6899
6899
|
k ? /* @__PURE__ */ e(Be.Image, { fill: !0 }) : n,
|
|
6900
6900
|
!k && i && /* @__PURE__ */ e("div", { className: "kdls-card__cover-badges", children: i })
|
|
@@ -7022,53 +7022,53 @@ const O3 = ({
|
|
|
7022
7022
|
onReset: i,
|
|
7023
7023
|
className: s = ""
|
|
7024
7024
|
}) => {
|
|
7025
|
-
const [o, a] = D(!1), c = ie(), f = `${c}-trigger`, m = a1(null), d = n.flatMap((
|
|
7025
|
+
const [o, a] = D(!1), c = ie(), f = `${c}-trigger`, m = a1(null), d = n.flatMap((C) => C.columns.map((_) => _.key));
|
|
7026
7026
|
i1(() => {
|
|
7027
|
-
const
|
|
7028
|
-
if (!o || !
|
|
7027
|
+
const C = m.current;
|
|
7028
|
+
if (!o || !C) return;
|
|
7029
7029
|
const _ = () => {
|
|
7030
|
-
const B =
|
|
7030
|
+
const B = C.querySelector(K3);
|
|
7031
7031
|
return B == null || B.focus({ preventScroll: !0 }), !!B && document.activeElement === B;
|
|
7032
7032
|
};
|
|
7033
7033
|
if (_()) return;
|
|
7034
|
-
const L =
|
|
7034
|
+
const L = C.closest(".kdls-floating__portal");
|
|
7035
7035
|
if (!L) return;
|
|
7036
|
-
const
|
|
7037
|
-
_() &&
|
|
7036
|
+
const w = new MutationObserver(() => {
|
|
7037
|
+
_() && w.disconnect();
|
|
7038
7038
|
});
|
|
7039
|
-
return
|
|
7039
|
+
return w.observe(L, { attributes: !0, attributeFilter: ["style"] }), () => w.disconnect();
|
|
7040
7040
|
}, [o]);
|
|
7041
|
-
const k = (
|
|
7041
|
+
const k = (C, _) => {
|
|
7042
7042
|
const L = new Set(l);
|
|
7043
|
-
_ ? L.add(
|
|
7044
|
-
}, v = /* @__PURE__ */ u("div", { ref: m, className: "kdls-table__column-picker", onKeyDown: (
|
|
7043
|
+
_ ? L.add(C) : L.delete(C), r([...d.filter((w) => L.has(w)), ...l.filter((w) => !d.includes(w))]);
|
|
7044
|
+
}, v = /* @__PURE__ */ u("div", { ref: m, className: "kdls-table__column-picker", onKeyDown: (C) => {
|
|
7045
7045
|
var _;
|
|
7046
|
-
|
|
7046
|
+
C.key === "Escape" && (C.preventDefault(), a(!1), (_ = document.getElementById(f)) == null || _.focus());
|
|
7047
7047
|
}, children: [
|
|
7048
|
-
/* @__PURE__ */ e("div", { className: "kdls-table__column-picker-list kdls-scroll kdls-scroll--thin", children: n.map((
|
|
7048
|
+
/* @__PURE__ */ e("div", { className: "kdls-table__column-picker-list kdls-scroll kdls-scroll--thin", children: n.map((C, _) => {
|
|
7049
7049
|
const L = `${c}-group-${_}`;
|
|
7050
7050
|
return /* @__PURE__ */ u(
|
|
7051
7051
|
"fieldset",
|
|
7052
7052
|
{
|
|
7053
7053
|
className: "kdls-table__column-picker-group",
|
|
7054
|
-
"aria-labelledby":
|
|
7054
|
+
"aria-labelledby": C.title ? L : void 0,
|
|
7055
7055
|
children: [
|
|
7056
|
-
|
|
7057
|
-
|
|
7056
|
+
C.title && /* @__PURE__ */ e(X, { as: "span", id: L, variant: "labelSemiBold", children: C.title }),
|
|
7057
|
+
C.columns.map((w) => /* @__PURE__ */ e(
|
|
7058
7058
|
Re,
|
|
7059
7059
|
{
|
|
7060
|
-
label:
|
|
7060
|
+
label: w.label,
|
|
7061
7061
|
width: "fill",
|
|
7062
|
-
checked: l.includes(
|
|
7063
|
-
disabled:
|
|
7064
|
-
hint:
|
|
7065
|
-
onChange: (B) => k(
|
|
7062
|
+
checked: l.includes(w.key),
|
|
7063
|
+
disabled: w.disabled,
|
|
7064
|
+
hint: w.hint,
|
|
7065
|
+
onChange: (B) => k(w.key, B)
|
|
7066
7066
|
},
|
|
7067
|
-
|
|
7067
|
+
w.key
|
|
7068
7068
|
))
|
|
7069
7069
|
]
|
|
7070
7070
|
},
|
|
7071
|
-
|
|
7071
|
+
C.title ?? _
|
|
7072
7072
|
);
|
|
7073
7073
|
}) }),
|
|
7074
7074
|
i && /* @__PURE__ */ e(y1, { variant: "link", label: "Restaurar padrão", onClick: i })
|
|
@@ -7163,13 +7163,13 @@ function el({
|
|
|
7163
7163
|
sort: m,
|
|
7164
7164
|
defaultSort: d = null,
|
|
7165
7165
|
onSortChange: k,
|
|
7166
|
-
hoverable:
|
|
7166
|
+
hoverable: h = !1,
|
|
7167
7167
|
onRowClick: v,
|
|
7168
|
-
pagination:
|
|
7168
|
+
pagination: C,
|
|
7169
7169
|
loading: _ = !1,
|
|
7170
7170
|
className: L = ""
|
|
7171
7171
|
}) {
|
|
7172
|
-
const
|
|
7172
|
+
const w = a1(null), B = W3(w, q3), H = h && !!v, E = (Z, Q) => {
|
|
7173
7173
|
const j = Q.target.closest('button, a, input, select, textarea, [role="button"], [role="checkbox"]');
|
|
7174
7174
|
j && j !== Q.currentTarget || v(Z);
|
|
7175
7175
|
}, W = (Z, Q) => {
|
|
@@ -7182,7 +7182,7 @@ function el({
|
|
|
7182
7182
|
);
|
|
7183
7183
|
}, p = (Z) => {
|
|
7184
7184
|
T || N(Z), k == null || k(Z);
|
|
7185
|
-
},
|
|
7185
|
+
}, y = (Z) => {
|
|
7186
7186
|
if (!Z.sortable) return;
|
|
7187
7187
|
let Q;
|
|
7188
7188
|
(V == null ? void 0 : V.key) !== Z.key ? Q = { key: Z.key, direction: "asc" } : V.direction === "asc" ? Q = { key: Z.key, direction: "desc" } : Q = null, p(Q);
|
|
@@ -7210,7 +7210,7 @@ function el({
|
|
|
7210
7210
|
return /* @__PURE__ */ u(
|
|
7211
7211
|
"div",
|
|
7212
7212
|
{
|
|
7213
|
-
ref:
|
|
7213
|
+
ref: w,
|
|
7214
7214
|
className: ["kdls-table", l !== "default" ? `kdls-table--${l}` : "", r ? "kdls-table--bordered" : "", _ ? "kdls-table--loading" : "", L].filter(Boolean).join(" "),
|
|
7215
7215
|
"aria-busy": _ || void 0,
|
|
7216
7216
|
children: [
|
|
@@ -7271,7 +7271,7 @@ function el({
|
|
|
7271
7271
|
type: "button",
|
|
7272
7272
|
className: "kdls-table__sort-button",
|
|
7273
7273
|
"aria-label": Z.title ? void 0 : Z.key,
|
|
7274
|
-
onClick: () =>
|
|
7274
|
+
onClick: () => y(Z),
|
|
7275
7275
|
children: [
|
|
7276
7276
|
e1,
|
|
7277
7277
|
/* @__PURE__ */ e(G3, { direction: b, indicator: f })
|
|
@@ -7319,7 +7319,7 @@ function el({
|
|
|
7319
7319
|
G.ellipsis && "kdls-table__col--ellipsis"
|
|
7320
7320
|
].filter(Boolean).join(" "),
|
|
7321
7321
|
role: "cell",
|
|
7322
|
-
children: G.ellipsis ? /* @__PURE__ */ e(
|
|
7322
|
+
children: G.ellipsis ? /* @__PURE__ */ e(oe, { content: String(F1 ?? ""), children: /* @__PURE__ */ e("span", { className: "kdls-table__ellipsis", children: S1 }) }) : S1
|
|
7323
7323
|
},
|
|
7324
7324
|
G.key
|
|
7325
7325
|
);
|
|
@@ -7331,7 +7331,7 @@ function el({
|
|
|
7331
7331
|
);
|
|
7332
7332
|
})
|
|
7333
7333
|
] }),
|
|
7334
|
-
|
|
7334
|
+
C && /* @__PURE__ */ e(O3, { ...C })
|
|
7335
7335
|
]
|
|
7336
7336
|
}
|
|
7337
7337
|
);
|
|
@@ -7444,7 +7444,7 @@ export {
|
|
|
7444
7444
|
Z3 as Toast,
|
|
7445
7445
|
b7 as Toaster,
|
|
7446
7446
|
w7 as Toggle,
|
|
7447
|
-
|
|
7447
|
+
oe as Tooltip,
|
|
7448
7448
|
h7 as Uploader,
|
|
7449
7449
|
n7 as VideoHorizontalFilled,
|
|
7450
7450
|
l7 as VideoHorizontalRegular,
|