digital-rabbit-cl 3.3.4 → 3.3.5-rc.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.
|
@@ -19,12 +19,12 @@ const Gr = "Button-module__button___2ZuB7", Zr = "Button-module__sizeSmall___DRT
|
|
|
19
19
|
}) => {
|
|
20
20
|
var x;
|
|
21
21
|
const d = t || i.colors.primary, c = i.buttons.textColor, f = !s && !t ? ((x = i.buttons.primary) == null ? void 0 : x.textColor) ?? c : c;
|
|
22
|
-
let m,
|
|
23
|
-
a ? (m = "transparent",
|
|
22
|
+
let m, v, b;
|
|
23
|
+
a ? (m = "transparent", v = "transparent", b = d, e && (b = n || d)) : s ? (m = "transparent", v = d, b = d, e && (m = o || d, v = o || d, b = n || c)) : (m = d, v = d, b = f, e && (m = o || d, v = o || d, b = n || f));
|
|
24
24
|
let _ = 1;
|
|
25
25
|
return r ? _ = 0.3 : e && !o && (_ = 0.75), {
|
|
26
26
|
backgroundColor: m,
|
|
27
|
-
borderColor:
|
|
27
|
+
borderColor: v,
|
|
28
28
|
color: b,
|
|
29
29
|
opacity: _
|
|
30
30
|
};
|
|
@@ -241,7 +241,7 @@ const Oe = {
|
|
|
241
241
|
onClick: f,
|
|
242
242
|
children: m
|
|
243
243
|
}) => {
|
|
244
|
-
const
|
|
244
|
+
const v = D(), [b, _] = K(!1), z = {
|
|
245
245
|
...Xr({
|
|
246
246
|
isActive: b,
|
|
247
247
|
disabled: o,
|
|
@@ -250,13 +250,13 @@ const Oe = {
|
|
|
250
250
|
hoverTextColor: t,
|
|
251
251
|
outline: s,
|
|
252
252
|
ghost: a,
|
|
253
|
-
theme:
|
|
253
|
+
theme: v
|
|
254
254
|
}),
|
|
255
|
-
borderWidth:
|
|
256
|
-
borderRadius:
|
|
255
|
+
borderWidth: v.border.width,
|
|
256
|
+
borderRadius: v.border.radius,
|
|
257
257
|
...c
|
|
258
258
|
// Top-level style overrides
|
|
259
|
-
},
|
|
259
|
+
}, g = [
|
|
260
260
|
Ee.button,
|
|
261
261
|
n === "small" ? Ee.sizeSmall : Ee.sizeLarge,
|
|
262
262
|
a ? Ee.ghost : s ? Ee.outline : "",
|
|
@@ -266,13 +266,13 @@ const Oe = {
|
|
|
266
266
|
"button",
|
|
267
267
|
{
|
|
268
268
|
...u,
|
|
269
|
-
className:
|
|
269
|
+
className: g,
|
|
270
270
|
disabled: o,
|
|
271
271
|
onClick: f,
|
|
272
272
|
onMouseEnter: () => _(!0),
|
|
273
273
|
onMouseLeave: () => _(!1),
|
|
274
274
|
type: i,
|
|
275
|
-
style:
|
|
275
|
+
style: z,
|
|
276
276
|
children: m
|
|
277
277
|
}
|
|
278
278
|
);
|
|
@@ -353,8 +353,8 @@ const ro = "Checkbox-module__container___aV9qz", oo = "Checkbox-module__svg___kk
|
|
|
353
353
|
cursor: f.cursor,
|
|
354
354
|
...a
|
|
355
355
|
// Top level style prop overrides
|
|
356
|
-
},
|
|
357
|
-
return /* @__PURE__ */ p("label", { ...i, className:
|
|
356
|
+
}, v = [Dt.label, r ? Dt.disabled : "", s].filter(Boolean).join(" ");
|
|
357
|
+
return /* @__PURE__ */ p("label", { ...i, className: v, htmlFor: o, style: m, children: n });
|
|
358
358
|
}, dt = ({
|
|
359
359
|
// Color props
|
|
360
360
|
color: e,
|
|
@@ -374,40 +374,40 @@ const ro = "Checkbox-module__container___aV9qz", oo = "Checkbox-module__svg___kk
|
|
|
374
374
|
className: f,
|
|
375
375
|
style: m,
|
|
376
376
|
// Element-specific props
|
|
377
|
-
divProps:
|
|
377
|
+
divProps: v
|
|
378
378
|
}) => {
|
|
379
|
-
const b = D(), _ = i || cr(), x = b.colors.error,
|
|
380
|
-
color:
|
|
379
|
+
const b = D(), _ = i || cr(), x = b.colors.error, z = s ? x : e || b.colors.primary, g = so({
|
|
380
|
+
color: z,
|
|
381
381
|
checkmarkColor: r,
|
|
382
382
|
disabled: n,
|
|
383
383
|
inverted: o
|
|
384
|
-
}),
|
|
385
|
-
n || d(
|
|
384
|
+
}), C = ($) => {
|
|
385
|
+
n || d($);
|
|
386
386
|
}, V = {
|
|
387
|
-
cursor:
|
|
388
|
-
opacity:
|
|
387
|
+
cursor: g.cursor,
|
|
388
|
+
opacity: g.opacity,
|
|
389
389
|
...m
|
|
390
390
|
// Top-level style prop overrides
|
|
391
391
|
}, E = {
|
|
392
392
|
width: "var(--dr-checkbox-size)",
|
|
393
393
|
height: "var(--dr-checkbox-size)"
|
|
394
394
|
}, R = {
|
|
395
|
-
fill: o && t ?
|
|
395
|
+
fill: o && t ? g.checkboxColor : "transparent",
|
|
396
396
|
strokeWidth: "25",
|
|
397
|
-
stroke:
|
|
398
|
-
},
|
|
399
|
-
stroke:
|
|
397
|
+
stroke: g.checkboxColor
|
|
398
|
+
}, M = {
|
|
399
|
+
stroke: g.checkmarkColor,
|
|
400
400
|
strokeWidth: "15",
|
|
401
401
|
fill: "transparent"
|
|
402
|
-
},
|
|
403
|
-
return /* @__PURE__ */ P("div", { ...
|
|
402
|
+
}, O = [Ye.container, f].filter(Boolean).join(" ");
|
|
403
|
+
return /* @__PURE__ */ P("div", { ...v, className: O, style: V, children: [
|
|
404
404
|
/* @__PURE__ */ p(
|
|
405
405
|
"input",
|
|
406
406
|
{
|
|
407
407
|
id: _,
|
|
408
408
|
checked: t,
|
|
409
409
|
disabled: n,
|
|
410
|
-
onChange: (
|
|
410
|
+
onChange: ($) => C({ target: { checked: $.target.checked, name: a, type: "checkbox" } }),
|
|
411
411
|
name: a,
|
|
412
412
|
style: { display: "none" },
|
|
413
413
|
type: "checkbox"
|
|
@@ -418,12 +418,12 @@ const ro = "Checkbox-module__container___aV9qz", oo = "Checkbox-module__svg___kk
|
|
|
418
418
|
{
|
|
419
419
|
xmlns: "http://www.w3.org/2000/svg",
|
|
420
420
|
viewBox: "0 0 100 100",
|
|
421
|
-
onClick: () =>
|
|
421
|
+
onClick: () => C({ target: { checked: !t, name: a, type: "checkbox" } }),
|
|
422
422
|
style: E,
|
|
423
423
|
className: Ye.svg,
|
|
424
424
|
children: [
|
|
425
425
|
/* @__PURE__ */ p("rect", { x: "0", y: "0", height: "100", width: "100", style: R }),
|
|
426
|
-
t && /* @__PURE__ */ p("path", { d: "M 25 45 L 45 65 L 75 30", style:
|
|
426
|
+
t && /* @__PURE__ */ p("path", { d: "M 25 45 L 45 65 L 75 30", style: M })
|
|
427
427
|
]
|
|
428
428
|
}
|
|
429
429
|
),
|
|
@@ -433,7 +433,7 @@ const ro = "Checkbox-module__container___aV9qz", oo = "Checkbox-module__svg___kk
|
|
|
433
433
|
htmlFor: _,
|
|
434
434
|
className: Ye.label,
|
|
435
435
|
style: { paddingBottom: 0, ...u },
|
|
436
|
-
color:
|
|
436
|
+
color: g.checkboxColor,
|
|
437
437
|
disabled: n,
|
|
438
438
|
error: s,
|
|
439
439
|
children: c
|
|
@@ -452,16 +452,16 @@ const ro = "Checkbox-module__container___aV9qz", oo = "Checkbox-module__svg___kk
|
|
|
452
452
|
let t = document.getElementById(r);
|
|
453
453
|
t || (t = document.createElement("style"), t.id = r, document.head.appendChild(t));
|
|
454
454
|
const o = (f, m) => {
|
|
455
|
-
const
|
|
456
|
-
return m.fontSize &&
|
|
455
|
+
const v = [];
|
|
456
|
+
return m.fontSize && v.push(` --dr-${f}-font-size: ${m.fontSize};`), m.paddingVertical && v.push(` --dr-${f}-padding-v: ${m.paddingVertical};`), m.paddingHorizontal && v.push(` --dr-${f}-padding-h: ${m.paddingHorizontal};`), v;
|
|
457
457
|
}, n = (f) => {
|
|
458
|
-
var
|
|
458
|
+
var v, b, _, x;
|
|
459
459
|
const m = [];
|
|
460
|
-
return f.input && m.push(...o("input", f.input)), f.inputSmall && m.push(...o("input-small", f.inputSmall)), f.button && m.push(...o("button", f.button)), f.buttonSmall && m.push(...o("button-small", f.buttonSmall)), (
|
|
460
|
+
return f.input && m.push(...o("input", f.input)), f.inputSmall && m.push(...o("input-small", f.inputSmall)), f.button && m.push(...o("button", f.button)), f.buttonSmall && m.push(...o("button-small", f.buttonSmall)), (v = f.formLabel) != null && v.fontSize && m.push(` --dr-form-label-font-size: ${f.formLabel.fontSize};`), (b = f.formLabel) != null && b.paddingBottom && m.push(` --dr-form-label-padding-bottom: ${f.formLabel.paddingBottom};`), (_ = f.checkbox) != null && _.size && m.push(` --dr-checkbox-size: ${f.checkbox.size};`), (x = f.radio) != null && x.size && m.push(` --dr-radio-size: ${f.radio.size};`), m;
|
|
461
461
|
}, s = (f, m) => `@media (max-width: ${f}) {
|
|
462
462
|
:root {
|
|
463
463
|
${m.split(`
|
|
464
|
-
`).map((
|
|
464
|
+
`).map((v) => ` ${v}`).join(`
|
|
465
465
|
`)}
|
|
466
466
|
}
|
|
467
467
|
}`, { responsive: a, fonts: i, breakpoints: d } = e, c = [];
|
|
@@ -484,9 +484,9 @@ ${n(a.default).join(`
|
|
|
484
484
|
];
|
|
485
485
|
for (const [f, m] of u) {
|
|
486
486
|
if (!f) continue;
|
|
487
|
-
const
|
|
487
|
+
const v = n(f).join(`
|
|
488
488
|
`);
|
|
489
|
-
|
|
489
|
+
v && c.push(s(m, v));
|
|
490
490
|
}
|
|
491
491
|
return t.textContent = c.join(`
|
|
492
492
|
|
|
@@ -517,12 +517,12 @@ function X(e) {
|
|
|
517
517
|
return e;
|
|
518
518
|
return r;
|
|
519
519
|
}
|
|
520
|
-
var Ge = (e) => /^\w*$/.test(e),
|
|
520
|
+
var Ge = (e) => /^\w*$/.test(e), q = (e) => e === void 0, vt = (e) => Array.isArray(e) ? e.filter(Boolean) : [], bt = (e) => vt(e.replace(/["|']|\]/g, "").split(/\.|\[/)), k = (e, r, t) => {
|
|
521
521
|
if (!r || !Q(e))
|
|
522
522
|
return t;
|
|
523
523
|
const o = (Ge(r) ? [r] : bt(r)).reduce((n, s) => te(n) ? n : n[s], e);
|
|
524
|
-
return
|
|
525
|
-
}, re = (e) => typeof e == "boolean",
|
|
524
|
+
return q(o) || o === e ? q(e[r]) ? t : e[r] : o;
|
|
525
|
+
}, re = (e) => typeof e == "boolean", j = (e, r, t) => {
|
|
526
526
|
let o = -1;
|
|
527
527
|
const n = Ge(r) ? [r] : bt(r), s = n.length, a = s - 1;
|
|
528
528
|
for (; ++o < s; ) {
|
|
@@ -624,7 +624,7 @@ function le(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
|
624
624
|
function mo(e) {
|
|
625
625
|
const r = St(), { control: t = r.control, name: o, defaultValue: n, disabled: s, exact: a, compute: i } = e || {}, d = N.useRef(n), c = N.useRef(i), u = N.useRef(void 0), f = N.useRef(t), m = N.useRef(o);
|
|
626
626
|
c.current = i;
|
|
627
|
-
const [
|
|
627
|
+
const [v, b] = N.useState(() => {
|
|
628
628
|
const V = t._getWatch(o, d.current);
|
|
629
629
|
return c.current ? c.current(V) : V;
|
|
630
630
|
}), _ = N.useCallback((V) => {
|
|
@@ -650,13 +650,13 @@ function mo(e) {
|
|
|
650
650
|
x(V.values);
|
|
651
651
|
}
|
|
652
652
|
})), [t, a, o, x]), N.useEffect(() => t._removeUnmounted());
|
|
653
|
-
const
|
|
653
|
+
const z = f.current !== t, g = m.current, C = N.useMemo(() => {
|
|
654
654
|
if (s)
|
|
655
655
|
return null;
|
|
656
|
-
const V = !
|
|
657
|
-
return
|
|
658
|
-
}, [s,
|
|
659
|
-
return
|
|
656
|
+
const V = !z && !le(g, o);
|
|
657
|
+
return z || V ? _() : null;
|
|
658
|
+
}, [s, z, o, g, _]);
|
|
659
|
+
return C !== null ? C : v;
|
|
660
660
|
}
|
|
661
661
|
function ho(e) {
|
|
662
662
|
const r = St(), { name: t, disabled: o, control: n = r.control, shouldUnregister: s, defaultValue: a } = e, i = fr(n._names.array, t), d = N.useMemo(() => k(n._formValues, t, k(n._defaultValues, t, a)), [n, t, a]), c = mo({
|
|
@@ -668,7 +668,7 @@ function ho(e) {
|
|
|
668
668
|
control: n,
|
|
669
669
|
name: t,
|
|
670
670
|
exact: !0
|
|
671
|
-
}), f = N.useRef(e), m = N.useRef(void 0),
|
|
671
|
+
}), f = N.useRef(e), m = N.useRef(void 0), v = N.useRef(n.register(t, {
|
|
672
672
|
...e.rules,
|
|
673
673
|
value: c,
|
|
674
674
|
...re(e.disabled) ? { disabled: e.disabled } : {}
|
|
@@ -695,50 +695,50 @@ function ho(e) {
|
|
|
695
695
|
enumerable: !0,
|
|
696
696
|
get: () => k(u.errors, t)
|
|
697
697
|
}
|
|
698
|
-
}), [u, t]), _ = N.useCallback((
|
|
698
|
+
}), [u, t]), _ = N.useCallback((C) => v.current.onChange({
|
|
699
699
|
target: {
|
|
700
|
-
value: ur(
|
|
700
|
+
value: ur(C),
|
|
701
701
|
name: t
|
|
702
702
|
},
|
|
703
703
|
type: He.CHANGE
|
|
704
|
-
}), [t]), x = N.useCallback(() =>
|
|
704
|
+
}), [t]), x = N.useCallback(() => v.current.onBlur({
|
|
705
705
|
target: {
|
|
706
706
|
value: k(n._formValues, t),
|
|
707
707
|
name: t
|
|
708
708
|
},
|
|
709
709
|
type: He.BLUR
|
|
710
|
-
}), [t, n._formValues]),
|
|
710
|
+
}), [t, n._formValues]), z = N.useCallback((C) => {
|
|
711
711
|
const V = k(n._fields, t);
|
|
712
|
-
V &&
|
|
713
|
-
focus: () =>
|
|
714
|
-
select: () =>
|
|
715
|
-
setCustomValidity: (E) =>
|
|
716
|
-
reportValidity: () =>
|
|
712
|
+
V && C && (V._f.ref = {
|
|
713
|
+
focus: () => C.focus && C.focus(),
|
|
714
|
+
select: () => C.select && C.select(),
|
|
715
|
+
setCustomValidity: (E) => C.setCustomValidity(E),
|
|
716
|
+
reportValidity: () => C.reportValidity()
|
|
717
717
|
});
|
|
718
|
-
}, [n._fields, t]),
|
|
718
|
+
}, [n._fields, t]), g = N.useMemo(() => ({
|
|
719
719
|
name: t,
|
|
720
720
|
value: c,
|
|
721
721
|
...re(o) || u.disabled ? { disabled: u.disabled || o } : {},
|
|
722
722
|
onChange: _,
|
|
723
723
|
onBlur: x,
|
|
724
|
-
ref:
|
|
725
|
-
}), [t, o, u.disabled, _, x,
|
|
724
|
+
ref: z
|
|
725
|
+
}), [t, o, u.disabled, _, x, z, c]);
|
|
726
726
|
return N.useEffect(() => {
|
|
727
|
-
const
|
|
727
|
+
const C = n._options.shouldUnregister || s, V = m.current;
|
|
728
728
|
V && V !== t && !i && n.unregister(V), n.register(t, {
|
|
729
729
|
...f.current.rules,
|
|
730
730
|
...re(f.current.disabled) ? { disabled: f.current.disabled } : {}
|
|
731
731
|
});
|
|
732
|
-
const E = (R,
|
|
733
|
-
const
|
|
734
|
-
|
|
732
|
+
const E = (R, M) => {
|
|
733
|
+
const O = k(n._fields, R);
|
|
734
|
+
O && O._f && (O._f.mount = M);
|
|
735
735
|
};
|
|
736
|
-
if (E(t, !0),
|
|
736
|
+
if (E(t, !0), C) {
|
|
737
737
|
const R = X(k(n._options.defaultValues, t, f.current.defaultValue));
|
|
738
|
-
|
|
738
|
+
j(n._defaultValues, t, R), q(k(n._formValues, t)) && j(n._formValues, t, R);
|
|
739
739
|
}
|
|
740
740
|
return !i && n.register(t), m.current = t, () => {
|
|
741
|
-
(i ?
|
|
741
|
+
(i ? C && !n._state.action : C) ? n.unregister(t) : E(t, !1);
|
|
742
742
|
};
|
|
743
743
|
}, [t, n, i, s]), N.useEffect(() => {
|
|
744
744
|
n._setDisabledField({
|
|
@@ -746,10 +746,10 @@ function ho(e) {
|
|
|
746
746
|
name: t
|
|
747
747
|
});
|
|
748
748
|
}, [o, t, n]), N.useMemo(() => ({
|
|
749
|
-
field:
|
|
749
|
+
field: g,
|
|
750
750
|
formState: u,
|
|
751
751
|
fieldState: b
|
|
752
|
-
}), [
|
|
752
|
+
}), [g, u, b]);
|
|
753
753
|
}
|
|
754
754
|
var wt = (e, r, t, o, n) => r ? {
|
|
755
755
|
...t[e],
|
|
@@ -799,12 +799,12 @@ function po(e, r) {
|
|
|
799
799
|
const t = r.slice(0, -1).length;
|
|
800
800
|
let o = 0;
|
|
801
801
|
for (; o < t; )
|
|
802
|
-
e =
|
|
802
|
+
e = q(e) ? o++ : e[r[o++]];
|
|
803
803
|
return e;
|
|
804
804
|
}
|
|
805
805
|
function _o(e) {
|
|
806
806
|
for (const r in e)
|
|
807
|
-
if (e.hasOwnProperty(r) && !
|
|
807
|
+
if (e.hasOwnProperty(r) && !q(e[r]))
|
|
808
808
|
return !1;
|
|
809
809
|
return !0;
|
|
810
810
|
}
|
|
@@ -823,13 +823,13 @@ function _r(e) {
|
|
|
823
823
|
}
|
|
824
824
|
function mt(e, r = {}) {
|
|
825
825
|
for (const t in e)
|
|
826
|
-
_r(e[t]) ? (r[t] = Array.isArray(e[t]) ? [] : {}, mt(e[t], r[t])) :
|
|
826
|
+
_r(e[t]) ? (r[t] = Array.isArray(e[t]) ? [] : {}, mt(e[t], r[t])) : q(e[t]) || (r[t] = !0);
|
|
827
827
|
return r;
|
|
828
828
|
}
|
|
829
829
|
function ze(e, r, t) {
|
|
830
830
|
t || (t = mt(r));
|
|
831
831
|
for (const o in e)
|
|
832
|
-
_r(e[o]) ?
|
|
832
|
+
_r(e[o]) ? q(r) || ft(t[o]) ? t[o] = mt(e[o], Array.isArray(e[o]) ? [] : {}) : ze(e[o], te(r) ? {} : r[o], t[o]) : t[o] = !le(e[o], r[o]);
|
|
833
833
|
return t;
|
|
834
834
|
}
|
|
835
835
|
const It = {
|
|
@@ -844,11 +844,11 @@ var gr = (e) => {
|
|
|
844
844
|
}
|
|
845
845
|
return e[0].checked && !e[0].disabled ? (
|
|
846
846
|
// @ts-expect-error expected to work in the browser
|
|
847
|
-
e[0].attributes && !
|
|
847
|
+
e[0].attributes && !q(e[0].attributes.value) ? q(e[0].value) || e[0].value === "" ? Tt : { value: e[0].value, isValid: !0 } : Tt
|
|
848
848
|
) : It;
|
|
849
849
|
}
|
|
850
850
|
return It;
|
|
851
|
-
}, vr = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: o }) =>
|
|
851
|
+
}, vr = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: o }) => q(e) ? e : r ? e === "" ? NaN : e && +e : t && oe(e) ? new Date(e) : o ? o(e) : e;
|
|
852
852
|
const jt = {
|
|
853
853
|
isValid: !1,
|
|
854
854
|
value: null
|
|
@@ -859,13 +859,13 @@ var br = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disab
|
|
|
859
859
|
} : r, jt) : jt;
|
|
860
860
|
function Wt(e) {
|
|
861
861
|
const r = e.ref;
|
|
862
|
-
return kt(r) ? r.files : Ct(r) ? br(e.refs).value : pr(r) ? [...r.selectedOptions].map(({ value: t }) => t) : Re(r) ? gr(e.refs).value : vr(
|
|
862
|
+
return kt(r) ? r.files : Ct(r) ? br(e.refs).value : pr(r) ? [...r.selectedOptions].map(({ value: t }) => t) : Re(r) ? gr(e.refs).value : vr(q(r.value) ? e.ref.value : r.value, e);
|
|
863
863
|
}
|
|
864
864
|
var vo = (e, r, t, o) => {
|
|
865
865
|
const n = {};
|
|
866
866
|
for (const s of e) {
|
|
867
867
|
const a = k(r, s);
|
|
868
|
-
a &&
|
|
868
|
+
a && j(n, s, a._f);
|
|
869
869
|
}
|
|
870
870
|
return {
|
|
871
871
|
criteriaMode: t,
|
|
@@ -873,7 +873,7 @@ var vo = (e, r, t, o) => {
|
|
|
873
873
|
fields: n,
|
|
874
874
|
shouldUseNativeValidation: o
|
|
875
875
|
};
|
|
876
|
-
}, qe = (e) => e instanceof RegExp, Ne = (e) =>
|
|
876
|
+
}, qe = (e) => e instanceof RegExp, Ne = (e) => q(e) ? e : qe(e) ? e.source : Q(e) ? qe(e.value) ? e.value.source : e.value : e, Ht = (e) => ({
|
|
877
877
|
isOnSubmit: !e || e === ie.onSubmit,
|
|
878
878
|
isOnBlur: e === ie.onBlur,
|
|
879
879
|
isOnChange: e === ie.onChange,
|
|
@@ -933,7 +933,7 @@ var xo = (e, r, t, o) => {
|
|
|
933
933
|
return ee(s) || Object.keys(s).length >= Object.keys(r).length || Object.keys(s).find((a) => r[a] === (!o || ie.all));
|
|
934
934
|
}, wo = (e, r, t) => !e || !r || e === r || Be(e).some((o) => o && (t ? o === r : o.startsWith(r) || r.startsWith(o))), ko = (e, r, t, o, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(r || e) : (t ? o.isOnBlur : n.isOnBlur) ? !e : (t ? o.isOnChange : n.isOnChange) ? e : !0, Co = (e, r) => !vt(k(e, r)).length && Z(e, r), Fo = (e, r, t) => {
|
|
935
935
|
const o = Be(k(e, t));
|
|
936
|
-
return
|
|
936
|
+
return j(o, "root", r[t]), j(e, t, o), e;
|
|
937
937
|
};
|
|
938
938
|
function Zt(e, r, t = "validate") {
|
|
939
939
|
if (oe(e) || Array.isArray(e) && e.every(oe) || re(e) && !e)
|
|
@@ -947,79 +947,79 @@ var ke = (e) => Q(e) && !qe(e) ? e : {
|
|
|
947
947
|
value: e,
|
|
948
948
|
message: ""
|
|
949
949
|
}, Kt = async (e, r, t, o, n, s) => {
|
|
950
|
-
const { ref: a, refs: i, required: d, maxLength: c, minLength: u, min: f, max: m, pattern:
|
|
951
|
-
if (!
|
|
950
|
+
const { ref: a, refs: i, required: d, maxLength: c, minLength: u, min: f, max: m, pattern: v, validate: b, name: _, valueAsNumber: x, mount: z } = e._f, g = k(t, _);
|
|
951
|
+
if (!z || r.has(_))
|
|
952
952
|
return {};
|
|
953
|
-
const
|
|
954
|
-
n &&
|
|
955
|
-
}, E = {}, R = Ct(a),
|
|
956
|
-
const
|
|
953
|
+
const C = i ? i[0] : a, V = (B) => {
|
|
954
|
+
n && C.reportValidity && (C.setCustomValidity(re(B) ? "" : B || ""), C.reportValidity());
|
|
955
|
+
}, E = {}, R = Ct(a), M = Re(a), O = R || M, $ = (x || kt(a)) && q(a.value) && q(g) || Ue(a) && a.value === "" || g === "" || Array.isArray(g) && !g.length, H = wt.bind(null, _, o, E), G = (B, A, I, J = he.maxLength, Y = he.minLength) => {
|
|
956
|
+
const U = B ? A : I;
|
|
957
957
|
E[_] = {
|
|
958
958
|
type: B ? J : Y,
|
|
959
|
-
message:
|
|
959
|
+
message: U,
|
|
960
960
|
ref: a,
|
|
961
|
-
...
|
|
961
|
+
...H(B ? J : Y, U)
|
|
962
962
|
};
|
|
963
963
|
};
|
|
964
|
-
if (s ? !Array.isArray(
|
|
965
|
-
const { value: B, message:
|
|
964
|
+
if (s ? !Array.isArray(g) || !g.length : d && (!O && ($ || te(g)) || re(g) && !g || M && !gr(i).isValid || R && !br(i).isValid)) {
|
|
965
|
+
const { value: B, message: A } = oe(d) ? { value: !!d, message: d } : ke(d);
|
|
966
966
|
if (B && (E[_] = {
|
|
967
967
|
type: he.required,
|
|
968
|
-
message:
|
|
969
|
-
ref:
|
|
970
|
-
...
|
|
968
|
+
message: A,
|
|
969
|
+
ref: C,
|
|
970
|
+
...H(he.required, A)
|
|
971
971
|
}, !o))
|
|
972
|
-
return V(
|
|
972
|
+
return V(A), E;
|
|
973
973
|
}
|
|
974
|
-
if (
|
|
975
|
-
let B,
|
|
976
|
-
const
|
|
977
|
-
if (!te(
|
|
978
|
-
const Y = a.valueAsNumber ||
|
|
979
|
-
te(
|
|
974
|
+
if (!$ && (!te(f) || !te(m))) {
|
|
975
|
+
let B, A;
|
|
976
|
+
const I = ke(m), J = ke(f);
|
|
977
|
+
if (!te(g) && !isNaN(g)) {
|
|
978
|
+
const Y = a.valueAsNumber || g && +g;
|
|
979
|
+
te(I.value) || (B = Y > I.value), te(J.value) || (A = Y < J.value);
|
|
980
980
|
} else {
|
|
981
|
-
const Y = a.valueAsDate || new Date(
|
|
982
|
-
oe(
|
|
981
|
+
const Y = a.valueAsDate || new Date(g), U = (ve) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + ve), ue = a.type == "time", me = a.type == "week";
|
|
982
|
+
oe(I.value) && g && (B = ue ? U(g) > U(I.value) : me ? g > I.value : Y > new Date(I.value)), oe(J.value) && g && (A = ue ? U(g) < U(J.value) : me ? g < J.value : Y < new Date(J.value));
|
|
983
983
|
}
|
|
984
|
-
if ((B ||
|
|
984
|
+
if ((B || A) && (G(!!B, I.message, J.message, he.max, he.min), !o))
|
|
985
985
|
return V(E[_].message), E;
|
|
986
986
|
}
|
|
987
|
-
if ((c || u) &&
|
|
988
|
-
const B = ke(c),
|
|
989
|
-
if ((
|
|
987
|
+
if ((c || u) && !$ && (oe(g) || s && Array.isArray(g))) {
|
|
988
|
+
const B = ke(c), A = ke(u), I = !te(B.value) && g.length > +B.value, J = !te(A.value) && g.length < +A.value;
|
|
989
|
+
if ((I || J) && (G(I, B.message, A.message), !o))
|
|
990
990
|
return V(E[_].message), E;
|
|
991
991
|
}
|
|
992
|
-
if (
|
|
993
|
-
const { value: B, message:
|
|
994
|
-
if (qe(B) && !
|
|
992
|
+
if (v && !$ && oe(g)) {
|
|
993
|
+
const { value: B, message: A } = ke(v);
|
|
994
|
+
if (qe(B) && !g.match(B) && (E[_] = {
|
|
995
995
|
type: he.pattern,
|
|
996
|
-
message:
|
|
996
|
+
message: A,
|
|
997
997
|
ref: a,
|
|
998
|
-
...
|
|
998
|
+
...H(he.pattern, A)
|
|
999
999
|
}, !o))
|
|
1000
|
-
return V(
|
|
1000
|
+
return V(A), E;
|
|
1001
1001
|
}
|
|
1002
1002
|
if (b) {
|
|
1003
1003
|
if (ce(b)) {
|
|
1004
|
-
const B = await b(
|
|
1005
|
-
if (
|
|
1006
|
-
...
|
|
1007
|
-
...
|
|
1004
|
+
const B = await b(g, t), A = Zt(B, C);
|
|
1005
|
+
if (A && (E[_] = {
|
|
1006
|
+
...A,
|
|
1007
|
+
...H(he.validate, A.message)
|
|
1008
1008
|
}, !o))
|
|
1009
|
-
return V(
|
|
1009
|
+
return V(A.message), E;
|
|
1010
1010
|
} else if (Q(b)) {
|
|
1011
1011
|
let B = {};
|
|
1012
|
-
for (const
|
|
1012
|
+
for (const A in b) {
|
|
1013
1013
|
if (!ee(B) && !o)
|
|
1014
1014
|
break;
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1017
|
-
...
|
|
1018
|
-
...
|
|
1019
|
-
}, V(
|
|
1015
|
+
const I = Zt(await b[A](g, t), C, A);
|
|
1016
|
+
I && (B = {
|
|
1017
|
+
...I,
|
|
1018
|
+
...H(A, I.message)
|
|
1019
|
+
}, V(I.message), o && (E[_] = B));
|
|
1020
1020
|
}
|
|
1021
1021
|
if (!ee(B) && (E[_] = {
|
|
1022
|
-
ref:
|
|
1022
|
+
ref: C,
|
|
1023
1023
|
...B
|
|
1024
1024
|
}, !o))
|
|
1025
1025
|
return E;
|
|
@@ -1077,35 +1077,35 @@ function Vo(e = {}) {
|
|
|
1077
1077
|
const m = {
|
|
1078
1078
|
array: Ot(),
|
|
1079
1079
|
state: Ot()
|
|
1080
|
-
},
|
|
1080
|
+
}, v = r.criteriaMode === ie.all, b = (l) => (h) => {
|
|
1081
1081
|
clearTimeout(c), c = setTimeout(l, h);
|
|
1082
1082
|
}, _ = async (l) => {
|
|
1083
1083
|
if (!r.disabled && (u.isValid || f.isValid || l)) {
|
|
1084
|
-
const h = r.resolver ? ee((await
|
|
1084
|
+
const h = r.resolver ? ee((await M()).errors) : await $(o, !0);
|
|
1085
1085
|
h !== t.isValid && m.state.next({
|
|
1086
1086
|
isValid: h
|
|
1087
1087
|
});
|
|
1088
1088
|
}
|
|
1089
1089
|
}, x = (l, h) => {
|
|
1090
1090
|
!r.disabled && (u.isValidating || u.validatingFields || f.isValidating || f.validatingFields) && ((l || Array.from(i.mount)).forEach((y) => {
|
|
1091
|
-
y && (h ?
|
|
1091
|
+
y && (h ? j(t.validatingFields, y, h) : Z(t.validatingFields, y));
|
|
1092
1092
|
}), m.state.next({
|
|
1093
1093
|
validatingFields: t.validatingFields,
|
|
1094
1094
|
isValidating: !ee(t.validatingFields)
|
|
1095
1095
|
}));
|
|
1096
|
-
},
|
|
1097
|
-
if (
|
|
1096
|
+
}, z = (l, h = [], y, F, w = !0, S = !0) => {
|
|
1097
|
+
if (F && y && !r.disabled) {
|
|
1098
1098
|
if (a.action = !0, S && Array.isArray(k(o, l))) {
|
|
1099
|
-
const L = y(k(o, l),
|
|
1100
|
-
w &&
|
|
1099
|
+
const L = y(k(o, l), F.argA, F.argB);
|
|
1100
|
+
w && j(o, l, L);
|
|
1101
1101
|
}
|
|
1102
1102
|
if (S && Array.isArray(k(t.errors, l))) {
|
|
1103
|
-
const L = y(k(t.errors, l),
|
|
1104
|
-
w &&
|
|
1103
|
+
const L = y(k(t.errors, l), F.argA, F.argB);
|
|
1104
|
+
w && j(t.errors, l, L), Co(t.errors, l);
|
|
1105
1105
|
}
|
|
1106
1106
|
if ((u.touchedFields || f.touchedFields) && S && Array.isArray(k(t.touchedFields, l))) {
|
|
1107
|
-
const L = y(k(t.touchedFields, l),
|
|
1108
|
-
w &&
|
|
1107
|
+
const L = y(k(t.touchedFields, l), F.argA, F.argB);
|
|
1108
|
+
w && j(t.touchedFields, l, L);
|
|
1109
1109
|
}
|
|
1110
1110
|
(u.dirtyFields || f.dirtyFields) && (t.dirtyFields = ze(n, s)), m.state.next({
|
|
1111
1111
|
name: l,
|
|
@@ -1115,45 +1115,45 @@ function Vo(e = {}) {
|
|
|
1115
1115
|
isValid: t.isValid
|
|
1116
1116
|
});
|
|
1117
1117
|
} else
|
|
1118
|
-
|
|
1119
|
-
},
|
|
1120
|
-
|
|
1118
|
+
j(s, l, h);
|
|
1119
|
+
}, g = (l, h) => {
|
|
1120
|
+
j(t.errors, l, h), m.state.next({
|
|
1121
1121
|
errors: t.errors
|
|
1122
1122
|
});
|
|
1123
|
-
},
|
|
1123
|
+
}, C = (l) => {
|
|
1124
1124
|
t.errors = l, m.state.next({
|
|
1125
1125
|
errors: t.errors,
|
|
1126
1126
|
isValid: !1
|
|
1127
1127
|
});
|
|
1128
|
-
}, V = (l, h, y,
|
|
1128
|
+
}, V = (l, h, y, F) => {
|
|
1129
1129
|
const w = k(o, l);
|
|
1130
1130
|
if (w) {
|
|
1131
|
-
const S = k(s, l,
|
|
1132
|
-
|
|
1131
|
+
const S = k(s, l, q(y) ? k(n, l) : y);
|
|
1132
|
+
q(S) || F && F.defaultChecked || h ? j(s, l, h ? S : Wt(w._f)) : I(l, S), a.mount && _();
|
|
1133
1133
|
}
|
|
1134
|
-
}, E = (l, h, y,
|
|
1134
|
+
}, E = (l, h, y, F, w) => {
|
|
1135
1135
|
let S = !1, L = !1;
|
|
1136
|
-
const
|
|
1136
|
+
const T = {
|
|
1137
1137
|
name: l
|
|
1138
1138
|
};
|
|
1139
1139
|
if (!r.disabled) {
|
|
1140
|
-
if (!y ||
|
|
1141
|
-
(u.isDirty || f.isDirty) && (L = t.isDirty, t.isDirty =
|
|
1140
|
+
if (!y || F) {
|
|
1141
|
+
(u.isDirty || f.isDirty) && (L = t.isDirty, t.isDirty = T.isDirty = G(), S = L !== T.isDirty);
|
|
1142
1142
|
const W = le(k(n, l), h);
|
|
1143
|
-
L = !!k(t.dirtyFields, l), W ? Z(t.dirtyFields, l) :
|
|
1143
|
+
L = !!k(t.dirtyFields, l), W ? Z(t.dirtyFields, l) : j(t.dirtyFields, l, !0), T.dirtyFields = t.dirtyFields, S = S || (u.dirtyFields || f.dirtyFields) && L !== !W;
|
|
1144
1144
|
}
|
|
1145
1145
|
if (y) {
|
|
1146
1146
|
const W = k(t.touchedFields, l);
|
|
1147
|
-
W || (
|
|
1147
|
+
W || (j(t.touchedFields, l, y), T.touchedFields = t.touchedFields, S = S || (u.touchedFields || f.touchedFields) && W !== y);
|
|
1148
1148
|
}
|
|
1149
|
-
S && w && m.state.next(
|
|
1149
|
+
S && w && m.state.next(T);
|
|
1150
1150
|
}
|
|
1151
|
-
return S ?
|
|
1152
|
-
}, R = (l, h, y,
|
|
1151
|
+
return S ? T : {};
|
|
1152
|
+
}, R = (l, h, y, F) => {
|
|
1153
1153
|
const w = k(t.errors, l), S = (u.isValid || f.isValid) && re(h) && t.isValid !== h;
|
|
1154
|
-
if (r.delayError && y ? (d = b(() =>
|
|
1154
|
+
if (r.delayError && y ? (d = b(() => g(l, y)), d(r.delayError)) : (clearTimeout(c), d = null, y ? j(t.errors, l, y) : Z(t.errors, l)), (y ? !le(w, y) : w) || !ee(F) || S) {
|
|
1155
1155
|
const L = {
|
|
1156
|
-
...
|
|
1156
|
+
...F,
|
|
1157
1157
|
...S && re(h) ? { isValid: h } : {},
|
|
1158
1158
|
errors: t.errors,
|
|
1159
1159
|
name: l
|
|
@@ -1163,54 +1163,54 @@ function Vo(e = {}) {
|
|
|
1163
1163
|
...L
|
|
1164
1164
|
}, m.state.next(L);
|
|
1165
1165
|
}
|
|
1166
|
-
},
|
|
1166
|
+
}, M = async (l) => {
|
|
1167
1167
|
x(l, !0);
|
|
1168
1168
|
const h = await r.resolver(s, r.context, vo(l || i.mount, o, r.criteriaMode, r.shouldUseNativeValidation));
|
|
1169
1169
|
return x(l), h;
|
|
1170
|
-
},
|
|
1171
|
-
const { errors: h } = await
|
|
1170
|
+
}, O = async (l) => {
|
|
1171
|
+
const { errors: h } = await M(l);
|
|
1172
1172
|
if (l)
|
|
1173
1173
|
for (const y of l) {
|
|
1174
|
-
const
|
|
1175
|
-
|
|
1174
|
+
const F = k(h, y);
|
|
1175
|
+
F ? j(t.errors, y, F) : Z(t.errors, y);
|
|
1176
1176
|
}
|
|
1177
1177
|
else
|
|
1178
1178
|
t.errors = h;
|
|
1179
1179
|
return h;
|
|
1180
|
-
},
|
|
1180
|
+
}, $ = async (l, h, y = {
|
|
1181
1181
|
valid: !0
|
|
1182
1182
|
}) => {
|
|
1183
|
-
for (const
|
|
1184
|
-
const w = l[
|
|
1183
|
+
for (const F in l) {
|
|
1184
|
+
const w = l[F];
|
|
1185
1185
|
if (w) {
|
|
1186
1186
|
const { _f: S, ...L } = w;
|
|
1187
1187
|
if (S) {
|
|
1188
|
-
const
|
|
1188
|
+
const T = i.array.has(S.name), W = w._f && bo(w._f);
|
|
1189
1189
|
W && u.validatingFields && x([S.name], !0);
|
|
1190
|
-
const ne = await Kt(w, i.disabled, s,
|
|
1190
|
+
const ne = await Kt(w, i.disabled, s, v, r.shouldUseNativeValidation && !h, T);
|
|
1191
1191
|
if (W && u.validatingFields && x([S.name]), ne[S.name] && (y.valid = !1, h))
|
|
1192
1192
|
break;
|
|
1193
|
-
!h && (k(ne, S.name) ?
|
|
1193
|
+
!h && (k(ne, S.name) ? T ? Fo(t.errors, ne, S.name) : j(t.errors, S.name, ne[S.name]) : Z(t.errors, S.name));
|
|
1194
1194
|
}
|
|
1195
|
-
!ee(L) && await
|
|
1195
|
+
!ee(L) && await $(L, h, y);
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
1198
|
return y.valid;
|
|
1199
|
-
},
|
|
1199
|
+
}, H = () => {
|
|
1200
1200
|
for (const l of i.unMount) {
|
|
1201
1201
|
const h = k(o, l);
|
|
1202
1202
|
h && (h._f.refs ? h._f.refs.every((y) => !et(y)) : !et(h._f.ref)) && Ze(l);
|
|
1203
1203
|
}
|
|
1204
1204
|
i.unMount = /* @__PURE__ */ new Set();
|
|
1205
|
-
}, G = (l, h) => !r.disabled && (l && h &&
|
|
1206
|
-
...a.mount ? s :
|
|
1207
|
-
}, y, h),
|
|
1208
|
-
const
|
|
1205
|
+
}, G = (l, h) => !r.disabled && (l && h && j(s, l, h), !le(ve(), n)), B = (l, h, y) => ut(l, i, {
|
|
1206
|
+
...a.mount ? s : q(h) ? n : oe(l) ? { [l]: h } : h
|
|
1207
|
+
}, y, h), A = (l) => vt(k(a.mount ? s : n, l, r.shouldUnregister ? k(n, l, []) : [])), I = (l, h, y = {}) => {
|
|
1208
|
+
const F = k(o, l);
|
|
1209
1209
|
let w = h;
|
|
1210
|
-
if (
|
|
1211
|
-
const S =
|
|
1212
|
-
S && (!S.disabled &&
|
|
1213
|
-
(!L.defaultChecked || !L.disabled) && (Array.isArray(w) ? L.checked = !!w.find((
|
|
1210
|
+
if (F) {
|
|
1211
|
+
const S = F._f;
|
|
1212
|
+
S && (!S.disabled && j(s, l, vr(h, S)), w = Ue(S.ref) && te(h) ? "" : h, pr(S.ref) ? [...S.ref.options].forEach((L) => L.selected = w.includes(L.value)) : S.refs ? Re(S.ref) ? S.refs.forEach((L) => {
|
|
1213
|
+
(!L.defaultChecked || !L.disabled) && (Array.isArray(w) ? L.checked = !!w.find((T) => T === L.value) : L.checked = w === L.value || !!w);
|
|
1214
1214
|
}) : S.refs.forEach((L) => L.checked = L.value === w) : kt(S.ref) ? S.ref.value = "" : (S.ref.value = w, S.ref.type || m.state.next({
|
|
1215
1215
|
name: l,
|
|
1216
1216
|
values: X(s)
|
|
@@ -1218,36 +1218,36 @@ function Vo(e = {}) {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
(y.shouldDirty || y.shouldTouch) && E(l, w, y.shouldTouch, y.shouldDirty, !0), y.shouldValidate && me(l);
|
|
1220
1220
|
}, J = (l, h, y) => {
|
|
1221
|
-
for (const
|
|
1222
|
-
if (!h.hasOwnProperty(
|
|
1221
|
+
for (const F in h) {
|
|
1222
|
+
if (!h.hasOwnProperty(F))
|
|
1223
1223
|
return;
|
|
1224
|
-
const w = h[
|
|
1225
|
-
(i.array.has(l) || Q(w) || L && !L._f) && !Se(w) ? J(S, w, y) :
|
|
1224
|
+
const w = h[F], S = l + "." + F, L = k(o, S);
|
|
1225
|
+
(i.array.has(l) || Q(w) || L && !L._f) && !Se(w) ? J(S, w, y) : I(S, w, y);
|
|
1226
1226
|
}
|
|
1227
1227
|
}, Y = (l, h, y = {}) => {
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1228
|
+
const F = k(o, l), w = i.array.has(l), S = X(h);
|
|
1229
|
+
j(s, l, S), w ? (m.array.next({
|
|
1230
1230
|
name: l,
|
|
1231
1231
|
values: X(s)
|
|
1232
1232
|
}), (u.isDirty || u.dirtyFields || f.isDirty || f.dirtyFields) && y.shouldDirty && m.state.next({
|
|
1233
1233
|
name: l,
|
|
1234
1234
|
dirtyFields: ze(n, s),
|
|
1235
1235
|
isDirty: G(l, S)
|
|
1236
|
-
})) :
|
|
1236
|
+
})) : F && !F._f && !te(S) ? J(l, S, y) : I(l, S, y), qt(l, i) && m.state.next({ ...t, name: l }), m.state.next({
|
|
1237
1237
|
name: a.mount ? l : void 0,
|
|
1238
1238
|
values: X(s)
|
|
1239
1239
|
});
|
|
1240
|
-
},
|
|
1240
|
+
}, U = async (l) => {
|
|
1241
1241
|
a.mount = !0;
|
|
1242
1242
|
const h = l.target;
|
|
1243
|
-
let y = h.name,
|
|
1243
|
+
let y = h.name, F = !0;
|
|
1244
1244
|
const w = k(o, y), S = (W) => {
|
|
1245
|
-
|
|
1246
|
-
}, L = Ht(r.mode),
|
|
1245
|
+
F = Number.isNaN(W) || Se(W) && isNaN(W.getTime()) || le(W, k(s, y, W));
|
|
1246
|
+
}, L = Ht(r.mode), T = Ht(r.reValidateMode);
|
|
1247
1247
|
if (w) {
|
|
1248
1248
|
let W, ne;
|
|
1249
|
-
const Pe = h.type ? Wt(w._f) : ur(l), _e = l.type === He.BLUR || l.type === He.FOCUS_OUT, Wr = !So(w._f) && !r.resolver && !k(t.errors, y) && !w._f.deps || ko(_e, k(t.touchedFields, y), t.isSubmitted,
|
|
1250
|
-
|
|
1249
|
+
const Pe = h.type ? Wt(w._f) : ur(l), _e = l.type === He.BLUR || l.type === He.FOCUS_OUT, Wr = !So(w._f) && !r.resolver && !k(t.errors, y) && !w._f.deps || ko(_e, k(t.touchedFields, y), t.isSubmitted, T, L), Xe = qt(y, i, _e);
|
|
1250
|
+
j(s, y, Pe), _e ? (!h || !h.readOnly) && (w._f.onBlur && w._f.onBlur(l), d && d(0)) : w._f.onChange && w._f.onChange(l);
|
|
1251
1251
|
const Je = E(y, Pe, _e), Hr = !ee(Je) || Xe;
|
|
1252
1252
|
if (!_e && m.state.next({
|
|
1253
1253
|
name: y,
|
|
@@ -1256,38 +1256,38 @@ function Vo(e = {}) {
|
|
|
1256
1256
|
}), Wr)
|
|
1257
1257
|
return (u.isValid || f.isValid) && (r.mode === "onBlur" ? _e && _() : _e || _()), Hr && m.state.next({ name: y, ...Xe ? {} : Je });
|
|
1258
1258
|
if (!_e && Xe && m.state.next({ ...t }), r.resolver) {
|
|
1259
|
-
const { errors: At } = await
|
|
1260
|
-
if (S(Pe),
|
|
1259
|
+
const { errors: At } = await M([y]);
|
|
1260
|
+
if (S(Pe), F) {
|
|
1261
1261
|
const Ur = Gt(t.errors, o, y), Mt = Gt(At, o, Ur.name || y);
|
|
1262
1262
|
W = Mt.error, y = Mt.name, ne = ee(At);
|
|
1263
1263
|
}
|
|
1264
1264
|
} else
|
|
1265
|
-
x([y], !0), W = (await Kt(w, i.disabled, s,
|
|
1266
|
-
|
|
1265
|
+
x([y], !0), W = (await Kt(w, i.disabled, s, v, r.shouldUseNativeValidation))[y], x([y]), S(Pe), F && (W ? ne = !1 : (u.isValid || f.isValid) && (ne = await $(o, !0)));
|
|
1266
|
+
F && (w._f.deps && (!Array.isArray(w._f.deps) || w._f.deps.length > 0) && me(w._f.deps), R(y, ne, W, Je));
|
|
1267
1267
|
}
|
|
1268
1268
|
}, ue = (l, h) => {
|
|
1269
1269
|
if (k(t.errors, h) && l.focus)
|
|
1270
1270
|
return l.focus(), 1;
|
|
1271
1271
|
}, me = async (l, h = {}) => {
|
|
1272
|
-
let y,
|
|
1272
|
+
let y, F;
|
|
1273
1273
|
const w = Be(l);
|
|
1274
1274
|
if (r.resolver) {
|
|
1275
|
-
const S = await
|
|
1276
|
-
y = ee(S),
|
|
1277
|
-
} else l ? (
|
|
1275
|
+
const S = await O(q(l) ? l : w);
|
|
1276
|
+
y = ee(S), F = l ? !w.some((L) => k(S, L)) : y;
|
|
1277
|
+
} else l ? (F = (await Promise.all(w.map(async (S) => {
|
|
1278
1278
|
const L = k(o, S);
|
|
1279
|
-
return await
|
|
1280
|
-
}))).every(Boolean), !(!
|
|
1279
|
+
return await $(L && L._f ? { [S]: L } : L);
|
|
1280
|
+
}))).every(Boolean), !(!F && !t.isValid) && _()) : F = y = await $(o);
|
|
1281
1281
|
return m.state.next({
|
|
1282
1282
|
...!oe(l) || (u.isValid || f.isValid) && y !== t.isValid ? {} : { name: l },
|
|
1283
1283
|
...r.resolver || !l ? { isValid: y } : {},
|
|
1284
1284
|
errors: t.errors
|
|
1285
|
-
}), h.shouldFocus && !
|
|
1285
|
+
}), h.shouldFocus && !F && $e(o, ue, l ? w : i.mount), F;
|
|
1286
1286
|
}, ve = (l, h) => {
|
|
1287
1287
|
let y = {
|
|
1288
1288
|
...a.mount ? s : n
|
|
1289
1289
|
};
|
|
1290
|
-
return h && (y = yr(h.dirtyFields ? t.dirtyFields : t.touchedFields, y)),
|
|
1290
|
+
return h && (y = yr(h.dirtyFields ? t.dirtyFields : t.touchedFields, y)), q(l) ? y : oe(l) ? k(y, l) : l.map((F) => k(y, F));
|
|
1291
1291
|
}, Ft = (l, h) => ({
|
|
1292
1292
|
invalid: !!k((h || t).errors, l),
|
|
1293
1293
|
isDirty: !!k((h || t).dirtyFields, l),
|
|
@@ -1299,16 +1299,16 @@ function Vo(e = {}) {
|
|
|
1299
1299
|
errors: l ? t.errors : {}
|
|
1300
1300
|
});
|
|
1301
1301
|
}, zt = (l, h, y) => {
|
|
1302
|
-
const
|
|
1303
|
-
|
|
1302
|
+
const F = (k(o, l, { _f: {} })._f || {}).ref, w = k(t.errors, l) || {}, { ref: S, message: L, type: T, ...W } = w;
|
|
1303
|
+
j(t.errors, l, {
|
|
1304
1304
|
...W,
|
|
1305
1305
|
...h,
|
|
1306
|
-
ref:
|
|
1306
|
+
ref: F
|
|
1307
1307
|
}), m.state.next({
|
|
1308
1308
|
name: l,
|
|
1309
1309
|
errors: t.errors,
|
|
1310
1310
|
isValid: !1
|
|
1311
|
-
}), y && y.shouldFocus &&
|
|
1311
|
+
}), y && y.shouldFocus && F && F.focus && F.focus();
|
|
1312
1312
|
}, Pr = (l, h) => ce(l) ? m.state.subscribe({
|
|
1313
1313
|
next: (y) => "values" in y && l(B(void 0, h), y)
|
|
1314
1314
|
}) : B(l, h, !0), Vt = (l) => m.state.subscribe({
|
|
@@ -1339,8 +1339,8 @@ function Vo(e = {}) {
|
|
|
1339
1339
|
(re(l) && a.mount || l || i.disabled.has(h)) && (l ? i.disabled.add(h) : i.disabled.delete(h));
|
|
1340
1340
|
}, Ke = (l, h = {}) => {
|
|
1341
1341
|
let y = k(o, l);
|
|
1342
|
-
const
|
|
1343
|
-
return
|
|
1342
|
+
const F = re(h.disabled) || re(r.disabled);
|
|
1343
|
+
return j(o, l, {
|
|
1344
1344
|
...y || {},
|
|
1345
1345
|
_f: {
|
|
1346
1346
|
...y && y._f ? y._f : { ref: { name: l } },
|
|
@@ -1352,7 +1352,7 @@ function Vo(e = {}) {
|
|
|
1352
1352
|
disabled: re(h.disabled) ? h.disabled : r.disabled,
|
|
1353
1353
|
name: l
|
|
1354
1354
|
}) : V(l, !0, h.value), {
|
|
1355
|
-
...
|
|
1355
|
+
...F ? { disabled: h.disabled || r.disabled } : {},
|
|
1356
1356
|
...r.progressive ? {
|
|
1357
1357
|
required: !!h.required,
|
|
1358
1358
|
min: Ne(h.min),
|
|
@@ -1362,20 +1362,20 @@ function Vo(e = {}) {
|
|
|
1362
1362
|
pattern: Ne(h.pattern)
|
|
1363
1363
|
} : {},
|
|
1364
1364
|
name: l,
|
|
1365
|
-
onChange:
|
|
1366
|
-
onBlur:
|
|
1365
|
+
onChange: U,
|
|
1366
|
+
onBlur: U,
|
|
1367
1367
|
ref: (w) => {
|
|
1368
1368
|
if (w) {
|
|
1369
1369
|
Ke(l, h), y = k(o, l);
|
|
1370
|
-
const S =
|
|
1371
|
-
if (L ?
|
|
1370
|
+
const S = q(w.value) && w.querySelectorAll && w.querySelectorAll("input,select,textarea")[0] || w, L = yo(S), T = y._f.refs || [];
|
|
1371
|
+
if (L ? T.find((W) => W === S) : S === y._f.ref)
|
|
1372
1372
|
return;
|
|
1373
|
-
|
|
1373
|
+
j(o, l, {
|
|
1374
1374
|
_f: {
|
|
1375
1375
|
...y._f,
|
|
1376
1376
|
...L ? {
|
|
1377
1377
|
refs: [
|
|
1378
|
-
...
|
|
1378
|
+
...T.filter(et),
|
|
1379
1379
|
S,
|
|
1380
1380
|
...Array.isArray(k(n, l)) ? [{}] : []
|
|
1381
1381
|
],
|
|
@@ -1389,22 +1389,22 @@ function Vo(e = {}) {
|
|
|
1389
1389
|
};
|
|
1390
1390
|
}, Qe = () => r.shouldFocusError && $e(o, ue, i.mount), Or = (l) => {
|
|
1391
1391
|
re(l) && (m.state.next({ disabled: l }), $e(o, (h, y) => {
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1394
|
-
w.disabled =
|
|
1392
|
+
const F = k(o, y);
|
|
1393
|
+
F && (h.disabled = F._f.disabled || l, Array.isArray(F._f.refs) && F._f.refs.forEach((w) => {
|
|
1394
|
+
w.disabled = F._f.disabled || l;
|
|
1395
1395
|
}));
|
|
1396
1396
|
}, 0, !1));
|
|
1397
1397
|
}, Nt = (l, h) => async (y) => {
|
|
1398
|
-
let
|
|
1398
|
+
let F;
|
|
1399
1399
|
y && (y.preventDefault && y.preventDefault(), y.persist && y.persist());
|
|
1400
1400
|
let w = X(s);
|
|
1401
1401
|
if (m.state.next({
|
|
1402
1402
|
isSubmitting: !0
|
|
1403
1403
|
}), r.resolver) {
|
|
1404
|
-
const { errors: S, values: L } = await
|
|
1404
|
+
const { errors: S, values: L } = await M();
|
|
1405
1405
|
t.errors = S, w = X(L);
|
|
1406
1406
|
} else
|
|
1407
|
-
await
|
|
1407
|
+
await $(o);
|
|
1408
1408
|
if (i.disabled.size)
|
|
1409
1409
|
for (const S of i.disabled)
|
|
1410
1410
|
Z(w, S);
|
|
@@ -1415,36 +1415,36 @@ function Vo(e = {}) {
|
|
|
1415
1415
|
try {
|
|
1416
1416
|
await l(w, y);
|
|
1417
1417
|
} catch (S) {
|
|
1418
|
-
|
|
1418
|
+
F = S;
|
|
1419
1419
|
}
|
|
1420
1420
|
} else
|
|
1421
1421
|
h && await h({ ...t.errors }, y), Qe(), setTimeout(Qe);
|
|
1422
1422
|
if (m.state.next({
|
|
1423
1423
|
isSubmitted: !0,
|
|
1424
1424
|
isSubmitting: !1,
|
|
1425
|
-
isSubmitSuccessful: ee(t.errors) && !
|
|
1425
|
+
isSubmitSuccessful: ee(t.errors) && !F,
|
|
1426
1426
|
submitCount: t.submitCount + 1,
|
|
1427
1427
|
errors: t.errors
|
|
1428
|
-
}),
|
|
1429
|
-
throw
|
|
1428
|
+
}), F)
|
|
1429
|
+
throw F;
|
|
1430
1430
|
}, Ir = (l, h = {}) => {
|
|
1431
|
-
k(o, l) && (
|
|
1431
|
+
k(o, l) && (q(h.defaultValue) ? Y(l, X(k(n, l))) : (Y(l, h.defaultValue), j(n, l, X(h.defaultValue))), h.keepTouched || Z(t.touchedFields, l), h.keepDirty || (Z(t.dirtyFields, l), t.isDirty = h.defaultValue ? G(l, X(k(n, l))) : G()), h.keepError || (Z(t.errors, l), u.isValid && _()), m.state.next({ ...t }));
|
|
1432
1432
|
}, Lt = (l, h = {}) => {
|
|
1433
|
-
const y = l ? X(l) : n,
|
|
1433
|
+
const y = l ? X(l) : n, F = X(y), w = ee(l), S = w ? n : F;
|
|
1434
1434
|
if (h.keepDefaultValues || (n = y), !h.keepValues) {
|
|
1435
1435
|
if (h.keepDirtyValues) {
|
|
1436
1436
|
const L = /* @__PURE__ */ new Set([
|
|
1437
1437
|
...i.mount,
|
|
1438
1438
|
...Object.keys(ze(n, s))
|
|
1439
1439
|
]);
|
|
1440
|
-
for (const
|
|
1441
|
-
k(t.dirtyFields,
|
|
1440
|
+
for (const T of Array.from(L))
|
|
1441
|
+
k(t.dirtyFields, T) ? j(S, T, k(s, T)) : Y(T, k(S, T));
|
|
1442
1442
|
} else {
|
|
1443
|
-
if (gt &&
|
|
1443
|
+
if (gt && q(l))
|
|
1444
1444
|
for (const L of i.mount) {
|
|
1445
|
-
const
|
|
1446
|
-
if (
|
|
1447
|
-
const W = Array.isArray(
|
|
1445
|
+
const T = k(o, L);
|
|
1446
|
+
if (T && T._f) {
|
|
1447
|
+
const W = Array.isArray(T._f.refs) ? T._f.refs[0] : T._f.ref;
|
|
1448
1448
|
if (Ue(W)) {
|
|
1449
1449
|
const ne = W.closest("form");
|
|
1450
1450
|
if (ne) {
|
|
@@ -1486,9 +1486,9 @@ function Vo(e = {}) {
|
|
|
1486
1486
|
defaultValues: n
|
|
1487
1487
|
});
|
|
1488
1488
|
}, Bt = (l, h) => Lt(ce(l) ? l(s) : l, h), Tr = (l, h = {}) => {
|
|
1489
|
-
const y = k(o, l),
|
|
1490
|
-
if (
|
|
1491
|
-
const w =
|
|
1489
|
+
const y = k(o, l), F = y && y._f;
|
|
1490
|
+
if (F) {
|
|
1491
|
+
const w = F.refs ? F.refs[0] : F.ref;
|
|
1492
1492
|
w.focus && (w.focus(), h.shouldSelect && ce(w.select) && w.select());
|
|
1493
1493
|
}
|
|
1494
1494
|
}, jr = (l) => {
|
|
@@ -1504,22 +1504,22 @@ function Vo(e = {}) {
|
|
|
1504
1504
|
handleSubmit: Nt,
|
|
1505
1505
|
setError: zt,
|
|
1506
1506
|
_subscribe: Vt,
|
|
1507
|
-
_runSchema:
|
|
1507
|
+
_runSchema: M,
|
|
1508
1508
|
_focusError: Qe,
|
|
1509
1509
|
_getWatch: B,
|
|
1510
1510
|
_getDirty: G,
|
|
1511
1511
|
_setValid: _,
|
|
1512
|
-
_setFieldArray:
|
|
1512
|
+
_setFieldArray: z,
|
|
1513
1513
|
_setDisabledField: Et,
|
|
1514
|
-
_setErrors:
|
|
1515
|
-
_getFieldArray:
|
|
1514
|
+
_setErrors: C,
|
|
1515
|
+
_getFieldArray: A,
|
|
1516
1516
|
_reset: Lt,
|
|
1517
1517
|
_resetDefaultValues: () => ce(r.defaultValues) && r.defaultValues().then((l) => {
|
|
1518
1518
|
Bt(l, r.resetOptions), m.state.next({
|
|
1519
1519
|
isLoading: !1
|
|
1520
1520
|
});
|
|
1521
1521
|
}),
|
|
1522
|
-
_removeUnmounted:
|
|
1522
|
+
_removeUnmounted: H,
|
|
1523
1523
|
_disableForm: Or,
|
|
1524
1524
|
_subjects: m,
|
|
1525
1525
|
_proxyFormState: u,
|
|
@@ -1660,8 +1660,8 @@ const Qt = (e, r, t) => {
|
|
|
1660
1660
|
const n = k(r.fields, o), s = Object.assign(e[o] || {}, { ref: n && n.ref });
|
|
1661
1661
|
if (No(r.names || Object.keys(e), o)) {
|
|
1662
1662
|
const a = Object.assign({}, k(t, o));
|
|
1663
|
-
|
|
1664
|
-
} else
|
|
1663
|
+
j(a, "root", s), j(t, o, a);
|
|
1664
|
+
} else j(t, o, s);
|
|
1665
1665
|
}
|
|
1666
1666
|
return t;
|
|
1667
1667
|
}, No = (e, r) => {
|
|
@@ -1913,7 +1913,7 @@ const Sa = Wo, Ho = "FormError-module__formError___kaUBn", Uo = {
|
|
|
1913
1913
|
// Element-specific props
|
|
1914
1914
|
divProps: f
|
|
1915
1915
|
}) => {
|
|
1916
|
-
const m = D(),
|
|
1916
|
+
const m = D(), v = [
|
|
1917
1917
|
Ce.formGroup,
|
|
1918
1918
|
r ? Ce.error : "",
|
|
1919
1919
|
e ? Ce.disabled : "",
|
|
@@ -1923,13 +1923,13 @@ const Sa = Wo, Ho = "FormError-module__formError___kaUBn", Uo = {
|
|
|
1923
1923
|
...u
|
|
1924
1924
|
}, _ = N.Children.map(d, (x) => {
|
|
1925
1925
|
if (N.isValidElement(x)) {
|
|
1926
|
-
const
|
|
1927
|
-
if (e && x.props.disabled === void 0 && (
|
|
1928
|
-
return N.cloneElement(x,
|
|
1926
|
+
const z = {};
|
|
1927
|
+
if (e && x.props.disabled === void 0 && (z.disabled = !0), r && x.props.error === void 0 && (z.error = !0), n && x.props.id === void 0 && x.type !== N.Fragment && (z.id = n), Object.keys(z).length > 0)
|
|
1928
|
+
return N.cloneElement(x, z);
|
|
1929
1929
|
}
|
|
1930
1930
|
return x;
|
|
1931
1931
|
});
|
|
1932
|
-
return /* @__PURE__ */ P("div", { ...f, className:
|
|
1932
|
+
return /* @__PURE__ */ P("div", { ...f, className: v, style: b, children: [
|
|
1933
1933
|
s && /* @__PURE__ */ P(_t, { htmlFor: n, disabled: e, error: r, ...i, children: [
|
|
1934
1934
|
s,
|
|
1935
1935
|
t && /* @__PURE__ */ P("span", { className: Ce.required, "aria-label": "required", children: [
|
|
@@ -2020,22 +2020,22 @@ const Yo = "Input-module__input___WjT81", en = "Input-module__sizeSmall___NFvsi"
|
|
|
2020
2020
|
onBlur: f,
|
|
2021
2021
|
// Standard React props
|
|
2022
2022
|
className: m,
|
|
2023
|
-
style:
|
|
2023
|
+
style: v,
|
|
2024
2024
|
// Element-specific props
|
|
2025
2025
|
inputProps: b
|
|
2026
2026
|
}) => {
|
|
2027
|
-
const _ = D(), x = _.colors.error,
|
|
2028
|
-
color:
|
|
2027
|
+
const _ = D(), x = _.colors.error, z = r ? x : t || _.colors.primary, g = rn({
|
|
2028
|
+
color: z,
|
|
2029
2029
|
disabled: e,
|
|
2030
2030
|
placeholderOpacity: i
|
|
2031
|
-
}),
|
|
2032
|
-
"--placeholder-opacity":
|
|
2033
|
-
borderColor:
|
|
2031
|
+
}), C = {
|
|
2032
|
+
"--placeholder-opacity": g.placeholderOpacity,
|
|
2033
|
+
borderColor: g.borderColor,
|
|
2034
2034
|
borderWidth: _.border.width,
|
|
2035
2035
|
borderRadius: _.border.radius,
|
|
2036
|
-
color:
|
|
2037
|
-
opacity:
|
|
2038
|
-
...
|
|
2036
|
+
color: g.color,
|
|
2037
|
+
opacity: g.opacity,
|
|
2038
|
+
...v
|
|
2039
2039
|
// Top level style prop overrides
|
|
2040
2040
|
}, V = [
|
|
2041
2041
|
tt.input,
|
|
@@ -2055,7 +2055,7 @@ const Yo = "Input-module__input___WjT81", en = "Input-module__sizeSmall___NFvsi"
|
|
|
2055
2055
|
placeholder: a,
|
|
2056
2056
|
type: d,
|
|
2057
2057
|
value: c,
|
|
2058
|
-
style:
|
|
2058
|
+
style: C
|
|
2059
2059
|
}
|
|
2060
2060
|
);
|
|
2061
2061
|
};
|
|
@@ -2085,7 +2085,7 @@ function xa({
|
|
|
2085
2085
|
...i,
|
|
2086
2086
|
name: f,
|
|
2087
2087
|
value: d || "",
|
|
2088
|
-
onChange: (
|
|
2088
|
+
onChange: (v) => c(v.target.value),
|
|
2089
2089
|
onBlur: u,
|
|
2090
2090
|
error: m
|
|
2091
2091
|
}
|
|
@@ -2126,22 +2126,22 @@ const nn = "Textarea-module__textarea___Z-y6g", sn = "Textarea-module__sizeSmall
|
|
|
2126
2126
|
onBlur: f,
|
|
2127
2127
|
// Standard React props
|
|
2128
2128
|
className: m,
|
|
2129
|
-
style:
|
|
2129
|
+
style: v,
|
|
2130
2130
|
// Element-specific props
|
|
2131
2131
|
textareaProps: b
|
|
2132
2132
|
}) => {
|
|
2133
|
-
const _ = D(), x = _.colors.error,
|
|
2134
|
-
color:
|
|
2133
|
+
const _ = D(), x = _.colors.error, z = r ? x : t || _.colors.primary, g = ln({
|
|
2134
|
+
color: z,
|
|
2135
2135
|
disabled: e,
|
|
2136
2136
|
placeholderOpacity: i
|
|
2137
|
-
}),
|
|
2138
|
-
"--placeholder-opacity":
|
|
2139
|
-
borderColor:
|
|
2137
|
+
}), C = {
|
|
2138
|
+
"--placeholder-opacity": g.placeholderOpacity,
|
|
2139
|
+
borderColor: g.borderColor,
|
|
2140
2140
|
borderWidth: _.border.width,
|
|
2141
2141
|
borderRadius: _.border.radius,
|
|
2142
|
-
color:
|
|
2143
|
-
opacity:
|
|
2144
|
-
...
|
|
2142
|
+
color: g.color,
|
|
2143
|
+
opacity: g.opacity,
|
|
2144
|
+
...v
|
|
2145
2145
|
// Top level style overrides
|
|
2146
2146
|
}, V = [
|
|
2147
2147
|
rt.textarea,
|
|
@@ -2161,7 +2161,7 @@ const nn = "Textarea-module__textarea___Z-y6g", sn = "Textarea-module__sizeSmall
|
|
|
2161
2161
|
placeholder: a,
|
|
2162
2162
|
rows: d,
|
|
2163
2163
|
value: c,
|
|
2164
|
-
style:
|
|
2164
|
+
style: C
|
|
2165
2165
|
}
|
|
2166
2166
|
);
|
|
2167
2167
|
};
|
|
@@ -2191,7 +2191,7 @@ function wa({
|
|
|
2191
2191
|
...i,
|
|
2192
2192
|
name: f,
|
|
2193
2193
|
value: d || "",
|
|
2194
|
-
onChange: (
|
|
2194
|
+
onChange: (v) => c(v.target.value),
|
|
2195
2195
|
onBlur: u,
|
|
2196
2196
|
error: m
|
|
2197
2197
|
}
|
|
@@ -2251,26 +2251,26 @@ const dn = "Select-module__select___cjdcr", un = "Select-module__sizeSmall___i1q
|
|
|
2251
2251
|
className: f,
|
|
2252
2252
|
style: m,
|
|
2253
2253
|
// Element-specific props
|
|
2254
|
-
selectProps:
|
|
2254
|
+
selectProps: v
|
|
2255
2255
|
}) => {
|
|
2256
|
-
const b = D(), _ = b.colors.error, x = r ? _ : t || b.colors.primary,
|
|
2256
|
+
const b = D(), _ = b.colors.error, x = r ? _ : t || b.colors.primary, z = mn({
|
|
2257
2257
|
color: x,
|
|
2258
2258
|
disabled: e
|
|
2259
|
-
}),
|
|
2260
|
-
backgroundImage:
|
|
2259
|
+
}), g = {
|
|
2260
|
+
backgroundImage: z.backgroundImage,
|
|
2261
2261
|
backgroundPosition: "right center",
|
|
2262
2262
|
backgroundRepeat: "no-repeat",
|
|
2263
2263
|
backgroundSize: "auto 85%",
|
|
2264
2264
|
backgroundColor: "transparent",
|
|
2265
|
-
borderColor:
|
|
2265
|
+
borderColor: z.borderColor,
|
|
2266
2266
|
borderWidth: b.border.width,
|
|
2267
2267
|
borderRadius: b.border.radius,
|
|
2268
|
-
color:
|
|
2269
|
-
cursor:
|
|
2270
|
-
opacity:
|
|
2268
|
+
color: z.color,
|
|
2269
|
+
cursor: z.cursor,
|
|
2270
|
+
opacity: z.opacity,
|
|
2271
2271
|
...m
|
|
2272
2272
|
// Top level style overrides
|
|
2273
|
-
},
|
|
2273
|
+
}, C = [
|
|
2274
2274
|
ot.select,
|
|
2275
2275
|
o === "small" ? ot.sizeSmall : ot.sizeLarge,
|
|
2276
2276
|
f
|
|
@@ -2278,15 +2278,15 @@ const dn = "Select-module__select___cjdcr", un = "Select-module__sizeSmall___i1q
|
|
|
2278
2278
|
return /* @__PURE__ */ P(
|
|
2279
2279
|
"select",
|
|
2280
2280
|
{
|
|
2281
|
-
...
|
|
2282
|
-
className:
|
|
2281
|
+
...v,
|
|
2282
|
+
className: C,
|
|
2283
2283
|
disabled: e,
|
|
2284
2284
|
id: n,
|
|
2285
2285
|
name: s,
|
|
2286
2286
|
onChange: d,
|
|
2287
2287
|
onBlur: c,
|
|
2288
2288
|
value: i,
|
|
2289
|
-
style:
|
|
2289
|
+
style: g,
|
|
2290
2290
|
children: [
|
|
2291
2291
|
a !== "" && /* @__PURE__ */ p("option", { disabled: !0, value: "", children: a }),
|
|
2292
2292
|
u
|
|
@@ -2315,7 +2315,7 @@ function ka({
|
|
|
2315
2315
|
disabled: n,
|
|
2316
2316
|
className: s,
|
|
2317
2317
|
style: a,
|
|
2318
|
-
children: ({ value: c, onChange: u, onBlur: f, name: m, error:
|
|
2318
|
+
children: ({ value: c, onChange: u, onBlur: f, name: m, error: v }) => /* @__PURE__ */ p(
|
|
2319
2319
|
hn,
|
|
2320
2320
|
{
|
|
2321
2321
|
...d,
|
|
@@ -2323,7 +2323,7 @@ function ka({
|
|
|
2323
2323
|
value: c || "",
|
|
2324
2324
|
onChange: (b) => u(b.target.value),
|
|
2325
2325
|
onBlur: f,
|
|
2326
|
-
error:
|
|
2326
|
+
error: v,
|
|
2327
2327
|
children: i
|
|
2328
2328
|
}
|
|
2329
2329
|
)
|
|
@@ -2391,17 +2391,17 @@ const yn = "Radio-module__container___AQxhk", pn = "Radio-module__svg___zl5kF",
|
|
|
2391
2391
|
// Element-specific props
|
|
2392
2392
|
divProps: f
|
|
2393
2393
|
}) => {
|
|
2394
|
-
const m = D(),
|
|
2394
|
+
const m = D(), v = s || cr(), b = m.colors.error, _ = o ? b : e || m.colors.primary, x = gn({
|
|
2395
2395
|
color: _,
|
|
2396
2396
|
disabled: t
|
|
2397
|
-
}),
|
|
2398
|
-
t || a(
|
|
2399
|
-
},
|
|
2397
|
+
}), z = (M) => {
|
|
2398
|
+
t || a(M);
|
|
2399
|
+
}, g = {
|
|
2400
2400
|
cursor: x.cursor,
|
|
2401
2401
|
opacity: x.opacity,
|
|
2402
2402
|
...u
|
|
2403
2403
|
// Top level style overrides
|
|
2404
|
-
},
|
|
2404
|
+
}, C = {
|
|
2405
2405
|
width: "var(--dr-radio-size)",
|
|
2406
2406
|
height: "var(--dr-radio-size)"
|
|
2407
2407
|
}, V = {
|
|
@@ -2411,15 +2411,15 @@ const yn = "Radio-module__container___AQxhk", pn = "Radio-module__svg___zl5kF",
|
|
|
2411
2411
|
}, E = {
|
|
2412
2412
|
fill: x.radioColor
|
|
2413
2413
|
}, R = [nt.container, c].filter(Boolean).join(" ");
|
|
2414
|
-
return /* @__PURE__ */ P("div", { ...f, className: R, style:
|
|
2414
|
+
return /* @__PURE__ */ P("div", { ...f, className: R, style: g, children: [
|
|
2415
2415
|
/* @__PURE__ */ p(
|
|
2416
2416
|
"input",
|
|
2417
2417
|
{
|
|
2418
|
-
id:
|
|
2418
|
+
id: v,
|
|
2419
2419
|
checked: r,
|
|
2420
2420
|
disabled: t,
|
|
2421
2421
|
name: n,
|
|
2422
|
-
onChange: (
|
|
2422
|
+
onChange: (M) => z({ target: { checked: M.target.checked, name: n, type: "radio" } }),
|
|
2423
2423
|
style: { display: "none" },
|
|
2424
2424
|
type: "radio"
|
|
2425
2425
|
}
|
|
@@ -2429,9 +2429,9 @@ const yn = "Radio-module__container___AQxhk", pn = "Radio-module__svg___zl5kF",
|
|
|
2429
2429
|
{
|
|
2430
2430
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2431
2431
|
viewBox: "0 0 100 100",
|
|
2432
|
-
onClick: () =>
|
|
2432
|
+
onClick: () => z({ target: { checked: !r, name: n, type: "radio" } }),
|
|
2433
2433
|
className: nt.svg,
|
|
2434
|
-
style:
|
|
2434
|
+
style: C,
|
|
2435
2435
|
children: [
|
|
2436
2436
|
/* @__PURE__ */ p("circle", { cx: "50", cy: "50", r: "42.5", width: "100%", style: V }),
|
|
2437
2437
|
r && /* @__PURE__ */ p("circle", { cx: "50", cy: "50", r: "25", style: E })
|
|
@@ -2441,7 +2441,7 @@ const yn = "Radio-module__container___AQxhk", pn = "Radio-module__svg___zl5kF",
|
|
|
2441
2441
|
i && /* @__PURE__ */ p(
|
|
2442
2442
|
_t,
|
|
2443
2443
|
{
|
|
2444
|
-
htmlFor:
|
|
2444
|
+
htmlFor: v,
|
|
2445
2445
|
className: nt.label,
|
|
2446
2446
|
style: { paddingBottom: 0, ...d },
|
|
2447
2447
|
color: x.radioColor,
|
|
@@ -2553,14 +2553,14 @@ function Va({
|
|
|
2553
2553
|
}
|
|
2554
2554
|
},
|
|
2555
2555
|
children: ({ value: c, onChange: u, name: f, error: m }) => {
|
|
2556
|
-
const
|
|
2557
|
-
u(x ? [...
|
|
2556
|
+
const v = Array.isArray(c) ? c : [], b = (_, x) => {
|
|
2557
|
+
u(x ? [...v, _] : v.filter((z) => z !== _));
|
|
2558
2558
|
};
|
|
2559
2559
|
return /* @__PURE__ */ p(ge, { children: o ? o.map((_) => /* @__PURE__ */ p(
|
|
2560
2560
|
dt,
|
|
2561
2561
|
{
|
|
2562
2562
|
name: `${f}[]`,
|
|
2563
|
-
checked:
|
|
2563
|
+
checked: v.includes(_.value),
|
|
2564
2564
|
onChange: (x) => b(_.value, x.target.checked),
|
|
2565
2565
|
label: _.label,
|
|
2566
2566
|
disabled: s || _.disabled,
|
|
@@ -2572,8 +2572,8 @@ function Va({
|
|
|
2572
2572
|
const x = _.props.value || _.props.name;
|
|
2573
2573
|
return N.cloneElement(_, {
|
|
2574
2574
|
name: `${f}[]`,
|
|
2575
|
-
checked:
|
|
2576
|
-
onChange: (
|
|
2575
|
+
checked: v.includes(x),
|
|
2576
|
+
onChange: (z) => b(x, z.target.checked),
|
|
2577
2577
|
error: m || _.props.error,
|
|
2578
2578
|
disabled: s || _.props.disabled
|
|
2579
2579
|
});
|
|
@@ -2694,12 +2694,12 @@ const vn = "Hamburger-module__hamburger___Tf4-t", bn = "Hamburger-module__line__
|
|
|
2694
2694
|
// Content
|
|
2695
2695
|
children: m,
|
|
2696
2696
|
// Style overrides
|
|
2697
|
-
className:
|
|
2697
|
+
className: v,
|
|
2698
2698
|
style: b,
|
|
2699
2699
|
// Element-specific props
|
|
2700
2700
|
headerProps: _
|
|
2701
2701
|
}) => {
|
|
2702
|
-
const x = D(),
|
|
2702
|
+
const x = D(), z = u || x.breakpoints.sm, { maxWidth: g, unit: C } = Ae(z), V = de(`(max-width: ${g}${C})`), E = Fn({
|
|
2703
2703
|
isSmallScreen: V,
|
|
2704
2704
|
maxWidth: t,
|
|
2705
2705
|
minWidth: o,
|
|
@@ -2711,8 +2711,8 @@ const vn = "Hamburger-module__hamburger___Tf4-t", bn = "Hamburger-module__line__
|
|
|
2711
2711
|
gap: c,
|
|
2712
2712
|
backgroundColor: e,
|
|
2713
2713
|
color: r
|
|
2714
|
-
}), R = [er.container,
|
|
2715
|
-
return /* @__PURE__ */ p("header", { ..._, className: er.header, style:
|
|
2714
|
+
}), R = [er.container, v].filter(Boolean).join(" "), M = f ? { position: "fixed", top: 0, left: 0, right: 0, zIndex: 1e3 } : {};
|
|
2715
|
+
return /* @__PURE__ */ p("header", { ..._, className: er.header, style: M, children: /* @__PURE__ */ p(
|
|
2716
2716
|
"div",
|
|
2717
2717
|
{
|
|
2718
2718
|
className: R,
|
|
@@ -2771,13 +2771,13 @@ function qn(e, r, t, o) {
|
|
|
2771
2771
|
bottom: e.bottom + o,
|
|
2772
2772
|
left: e.left - o,
|
|
2773
2773
|
right: e.right + o
|
|
2774
|
-
}[r], a = r === "top" || r === "left" ? "-100%" : "0", i = n ? e.left : e.top, d = n ? e.width : e.height, c = i + d * Hn[t], u = Un[t], [f, m,
|
|
2774
|
+
}[r], a = r === "top" || r === "left" ? "-100%" : "0", i = n ? e.left : e.top, d = n ? e.width : e.height, c = i + d * Hn[t], u = Un[t], [f, m, v, b] = n ? [c, s, u, a] : [s, c, a, u];
|
|
2775
2775
|
return {
|
|
2776
2776
|
position: "fixed",
|
|
2777
2777
|
zIndex: 999,
|
|
2778
2778
|
left: f,
|
|
2779
2779
|
top: m,
|
|
2780
|
-
transform: `translate(${
|
|
2780
|
+
transform: `translate(${v}, ${b})`
|
|
2781
2781
|
};
|
|
2782
2782
|
}
|
|
2783
2783
|
function Nr({
|
|
@@ -2816,65 +2816,65 @@ const Lr = ({
|
|
|
2816
2816
|
closeOnBackdropClick: u = !0,
|
|
2817
2817
|
className: f,
|
|
2818
2818
|
style: m,
|
|
2819
|
-
popoverProps:
|
|
2819
|
+
popoverProps: v
|
|
2820
2820
|
}) => {
|
|
2821
|
-
const b = D(), _ = o !== void 0, [x,
|
|
2822
|
-
(
|
|
2823
|
-
_ ||
|
|
2821
|
+
const b = D(), _ = o !== void 0, [x, z] = K(!1), g = _ ? o : x, C = pe(null), V = pe(null), E = ye(
|
|
2822
|
+
(U) => {
|
|
2823
|
+
_ || z(U), n == null || n(U);
|
|
2824
2824
|
},
|
|
2825
2825
|
[_, n]
|
|
2826
|
-
), R = ye(() => E(!
|
|
2827
|
-
open:
|
|
2828
|
-
triggerRef:
|
|
2826
|
+
), R = ye(() => E(!g), [g, E]), M = ye(() => E(!1), [E]), { panelMounted: O, panelVisible: $, handleTransitionEnd: H } = Wn(g, t), { side: G, align: B } = Er(s), { positionStyle: A } = Nr({
|
|
2827
|
+
open: g,
|
|
2828
|
+
triggerRef: C,
|
|
2829
2829
|
side: G,
|
|
2830
2830
|
align: B,
|
|
2831
2831
|
offset: 4,
|
|
2832
2832
|
enabled: t === "popup"
|
|
2833
2833
|
});
|
|
2834
2834
|
se(() => {
|
|
2835
|
-
if (!
|
|
2836
|
-
const
|
|
2835
|
+
if (!g || t !== "popup") return;
|
|
2836
|
+
const U = (ue) => {
|
|
2837
2837
|
var me, ve;
|
|
2838
|
-
(me = V.current) != null && me.contains(ue.target) || (ve =
|
|
2838
|
+
(me = V.current) != null && me.contains(ue.target) || (ve = C.current) != null && ve.contains(ue.target) || M();
|
|
2839
2839
|
};
|
|
2840
|
-
return document.addEventListener("mousedown",
|
|
2841
|
-
}, [
|
|
2842
|
-
if (!
|
|
2843
|
-
const
|
|
2844
|
-
ue.key === "Escape" &&
|
|
2840
|
+
return document.addEventListener("mousedown", U), () => document.removeEventListener("mousedown", U);
|
|
2841
|
+
}, [g, t, M]), se(() => {
|
|
2842
|
+
if (!g) return;
|
|
2843
|
+
const U = (ue) => {
|
|
2844
|
+
ue.key === "Escape" && M();
|
|
2845
2845
|
};
|
|
2846
|
-
return document.addEventListener("keydown",
|
|
2847
|
-
}, [
|
|
2848
|
-
if (!
|
|
2849
|
-
const
|
|
2850
|
-
return document.body.style.position = "fixed", document.body.style.top = `-${
|
|
2851
|
-
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0,
|
|
2846
|
+
return document.addEventListener("keydown", U), () => document.removeEventListener("keydown", U);
|
|
2847
|
+
}, [g, M]), se(() => {
|
|
2848
|
+
if (!g || t !== "panel") return;
|
|
2849
|
+
const U = window.scrollY;
|
|
2850
|
+
return document.body.style.position = "fixed", document.body.style.top = `-${U}px`, document.body.style.width = "100%", () => {
|
|
2851
|
+
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, U);
|
|
2852
2852
|
};
|
|
2853
|
-
}, [
|
|
2854
|
-
const
|
|
2853
|
+
}, [g, t]);
|
|
2854
|
+
const I = e ? typeof e == "function" ? e({ onClick: R, isOpen: g }) : (
|
|
2855
2855
|
// Non-function trigger: wrap in a span that delegates clicks to the trigger element.
|
|
2856
2856
|
// The wrapped element (e.g. <button>) handles its own keyboard accessibility.
|
|
2857
2857
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
2858
2858
|
/* @__PURE__ */ p("span", { onClick: R, style: { cursor: "pointer", display: "contents" }, children: e })
|
|
2859
|
-
) : null, J = e ? /* @__PURE__ */ p("span", { ref:
|
|
2859
|
+
) : null, J = e ? /* @__PURE__ */ p("span", { ref: C, className: fe.triggerWrapper, children: I }) : null;
|
|
2860
2860
|
if (t === "popup") {
|
|
2861
|
-
const
|
|
2861
|
+
const U = {
|
|
2862
2862
|
backgroundColor: b.colors.secondaryBackground,
|
|
2863
2863
|
borderRadius: b.border.radius,
|
|
2864
2864
|
boxShadow: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06)",
|
|
2865
|
-
...
|
|
2865
|
+
...A,
|
|
2866
2866
|
...m
|
|
2867
2867
|
};
|
|
2868
2868
|
return /* @__PURE__ */ P(ge, { children: [
|
|
2869
2869
|
J,
|
|
2870
|
-
|
|
2870
|
+
g && We(
|
|
2871
2871
|
/* @__PURE__ */ p(
|
|
2872
2872
|
"div",
|
|
2873
2873
|
{
|
|
2874
2874
|
ref: V,
|
|
2875
2875
|
className: [fe.popup, f].filter(Boolean).join(" "),
|
|
2876
|
-
style:
|
|
2877
|
-
...
|
|
2876
|
+
style: U,
|
|
2877
|
+
...v,
|
|
2878
2878
|
children: r
|
|
2879
2879
|
}
|
|
2880
2880
|
),
|
|
@@ -2889,18 +2889,18 @@ const Lr = ({
|
|
|
2889
2889
|
};
|
|
2890
2890
|
return /* @__PURE__ */ P(ge, { children: [
|
|
2891
2891
|
J,
|
|
2892
|
-
|
|
2892
|
+
O && We(
|
|
2893
2893
|
/* @__PURE__ */ P(
|
|
2894
2894
|
"div",
|
|
2895
2895
|
{
|
|
2896
|
-
className: [fe.panelOverlay,
|
|
2896
|
+
className: [fe.panelOverlay, $ ? fe.panelOverlayVisible : ""].filter(Boolean).join(" "),
|
|
2897
2897
|
children: [
|
|
2898
2898
|
/* @__PURE__ */ p(
|
|
2899
2899
|
"div",
|
|
2900
2900
|
{
|
|
2901
2901
|
className: fe.backdrop,
|
|
2902
|
-
style: { backgroundColor:
|
|
2903
|
-
onClick: u ?
|
|
2902
|
+
style: { backgroundColor: $ ? d : "transparent" },
|
|
2903
|
+
onClick: u ? M : void 0,
|
|
2904
2904
|
role: "presentation"
|
|
2905
2905
|
}
|
|
2906
2906
|
),
|
|
@@ -2911,20 +2911,20 @@ const Lr = ({
|
|
|
2911
2911
|
className: [
|
|
2912
2912
|
fe.panel,
|
|
2913
2913
|
a === "right" ? fe.panelRight : fe.panelLeft,
|
|
2914
|
-
|
|
2914
|
+
$ ? fe.panelOpen : "",
|
|
2915
2915
|
f
|
|
2916
2916
|
].filter(Boolean).join(" "),
|
|
2917
2917
|
style: Y,
|
|
2918
2918
|
role: "dialog",
|
|
2919
2919
|
"aria-modal": "true",
|
|
2920
|
-
onTransitionEnd:
|
|
2921
|
-
...
|
|
2920
|
+
onTransitionEnd: H,
|
|
2921
|
+
...v,
|
|
2922
2922
|
children: [
|
|
2923
2923
|
!c && /* @__PURE__ */ p(
|
|
2924
2924
|
"button",
|
|
2925
2925
|
{
|
|
2926
2926
|
className: fe.panelCloseButton,
|
|
2927
|
-
onClick:
|
|
2927
|
+
onClick: M,
|
|
2928
2928
|
"aria-label": "Close panel",
|
|
2929
2929
|
type: "button",
|
|
2930
2930
|
children: /* @__PURE__ */ p(
|
|
@@ -2998,7 +2998,7 @@ const Lr = ({
|
|
|
2998
2998
|
content: u,
|
|
2999
2999
|
onNavClick: f
|
|
3000
3000
|
}) => {
|
|
3001
|
-
const { backgroundColor: m, ...
|
|
3001
|
+
const { backgroundColor: m, ...v } = d;
|
|
3002
3002
|
return /* @__PURE__ */ p(
|
|
3003
3003
|
Lr,
|
|
3004
3004
|
{
|
|
@@ -3019,7 +3019,7 @@ const Lr = ({
|
|
|
3019
3019
|
...n == null ? void 0 : n.hamburgerProps
|
|
3020
3020
|
}
|
|
3021
3021
|
),
|
|
3022
|
-
children: /* @__PURE__ */ P("nav", { ...c, className: i, style:
|
|
3022
|
+
children: /* @__PURE__ */ P("nav", { ...c, className: i, style: v, onClickCapture: f, children: [
|
|
3023
3023
|
/* @__PURE__ */ p("div", { className: Ve.navHeader }),
|
|
3024
3024
|
typeof u == "function" ? u({ setOpen: r }) : u
|
|
3025
3025
|
] })
|
|
@@ -3041,21 +3041,21 @@ const Lr = ({
|
|
|
3041
3041
|
navProps: a,
|
|
3042
3042
|
disableMobileTreatment: i = !1
|
|
3043
3043
|
}) => {
|
|
3044
|
-
const [d, c] = K(!1), u = pe(null), m = { ...D().breakpoints, ...t }, { maxWidth:
|
|
3045
|
-
isMobile:
|
|
3044
|
+
const [d, c] = K(!1), u = pe(null), m = { ...D().breakpoints, ...t }, { maxWidth: v, unit: b } = Ae(m.md), { maxWidth: _, unit: x } = Ae(m.sm), z = de(`(max-width: ${v}${b})`), g = de(`(max-width: ${_}${x})`), C = i ? !1 : z, V = i ? !1 : g, { navStyles: E } = Gn({
|
|
3045
|
+
isMobile: C,
|
|
3046
3046
|
isCompact: V,
|
|
3047
3047
|
mobile: e,
|
|
3048
3048
|
desktop: r
|
|
3049
|
-
}), R = { ...E, ...s },
|
|
3050
|
-
const G =
|
|
3049
|
+
}), R = { ...E, ...s }, M = (H) => {
|
|
3050
|
+
const G = H.target;
|
|
3051
3051
|
G.closest("[data-navdropdown-trigger]") || G.closest("a, button") && c(!1);
|
|
3052
|
-
},
|
|
3052
|
+
}, O = [
|
|
3053
3053
|
Ve.nav,
|
|
3054
3054
|
Ve.navMobile,
|
|
3055
3055
|
V || e != null && e.compact ? Ve.compact : "",
|
|
3056
3056
|
n
|
|
3057
|
-
].filter(Boolean).join(" "),
|
|
3058
|
-
return /* @__PURE__ */ p(Zn.Provider, { value: { isMobile:
|
|
3057
|
+
].filter(Boolean).join(" "), $ = [Ve.nav, Ve.navDesktop, n].filter(Boolean).join(" ");
|
|
3058
|
+
return /* @__PURE__ */ p(Zn.Provider, { value: { isMobile: C, setOpen: c }, children: C ? /* @__PURE__ */ p(
|
|
3059
3059
|
Kn,
|
|
3060
3060
|
{
|
|
3061
3061
|
open: d,
|
|
@@ -3065,17 +3065,17 @@ const Lr = ({
|
|
|
3065
3065
|
mobile: e,
|
|
3066
3066
|
panelWidth: e == null ? void 0 : e.panelWidth,
|
|
3067
3067
|
side: e == null ? void 0 : e.side,
|
|
3068
|
-
navClassName:
|
|
3068
|
+
navClassName: O,
|
|
3069
3069
|
cssProps: R,
|
|
3070
3070
|
navProps: a,
|
|
3071
3071
|
content: (e == null ? void 0 : e.content) || o,
|
|
3072
|
-
onNavClick:
|
|
3072
|
+
onNavClick: M
|
|
3073
3073
|
}
|
|
3074
3074
|
) : /* @__PURE__ */ p(
|
|
3075
3075
|
Qn,
|
|
3076
3076
|
{
|
|
3077
3077
|
setOpen: c,
|
|
3078
|
-
navClassName:
|
|
3078
|
+
navClassName: $,
|
|
3079
3079
|
cssProps: R,
|
|
3080
3080
|
navProps: a,
|
|
3081
3081
|
content: (r == null ? void 0 : r.content) || o
|
|
@@ -3117,7 +3117,7 @@ const Na = ({
|
|
|
3117
3117
|
}) => {
|
|
3118
3118
|
const [u, f] = K(!1), {
|
|
3119
3119
|
style: m,
|
|
3120
|
-
onMouseEnter:
|
|
3120
|
+
onMouseEnter: v,
|
|
3121
3121
|
onMouseLeave: b
|
|
3122
3122
|
} = Br({ isActive: u, color: s, hoverOpacity: a });
|
|
3123
3123
|
return /* @__PURE__ */ p(
|
|
@@ -3136,7 +3136,7 @@ const Na = ({
|
|
|
3136
3136
|
style: { ...m, ...d },
|
|
3137
3137
|
"data-navdropdown-trigger": !0,
|
|
3138
3138
|
onClick: _,
|
|
3139
|
-
onMouseEnter:
|
|
3139
|
+
onMouseEnter: v,
|
|
3140
3140
|
onMouseLeave: b,
|
|
3141
3141
|
...c,
|
|
3142
3142
|
children: [
|
|
@@ -3300,25 +3300,25 @@ const Na = ({
|
|
|
3300
3300
|
maxWidth: u = "90vw",
|
|
3301
3301
|
backgroundColor: f,
|
|
3302
3302
|
backdropColor: m = "rgba(0, 0, 0, 0.5)",
|
|
3303
|
-
className:
|
|
3303
|
+
className: v,
|
|
3304
3304
|
style: b,
|
|
3305
3305
|
divProps: _
|
|
3306
3306
|
}) => {
|
|
3307
|
-
const x = D(),
|
|
3307
|
+
const x = D(), z = pe(null), g = pe(null), { maxWidth: C } = Ae(x.breakpoints.md), V = de(`(max-width: ${C - 1}px)`);
|
|
3308
3308
|
se(() => {
|
|
3309
3309
|
if (e)
|
|
3310
|
-
return
|
|
3311
|
-
document.body.style.overflow = "",
|
|
3310
|
+
return g.current = document.activeElement, document.body.style.overflow = "hidden", z.current && z.current.focus(), () => {
|
|
3311
|
+
document.body.style.overflow = "", g.current && g.current.focus();
|
|
3312
3312
|
};
|
|
3313
3313
|
}, [e]), se(() => {
|
|
3314
3314
|
if (!e || !a) return;
|
|
3315
|
-
const
|
|
3316
|
-
|
|
3315
|
+
const $ = (H) => {
|
|
3316
|
+
H.key === "Escape" && r();
|
|
3317
3317
|
};
|
|
3318
|
-
return document.addEventListener("keydown",
|
|
3318
|
+
return document.addEventListener("keydown", $), () => document.removeEventListener("keydown", $);
|
|
3319
3319
|
}, [e, a, r]);
|
|
3320
|
-
const E = (
|
|
3321
|
-
|
|
3320
|
+
const E = ($) => {
|
|
3321
|
+
$.target === $.currentTarget && s && r();
|
|
3322
3322
|
};
|
|
3323
3323
|
if (!e) return null;
|
|
3324
3324
|
const R = {
|
|
@@ -3327,20 +3327,20 @@ const Na = ({
|
|
|
3327
3327
|
backgroundColor: f || x.colors.secondary,
|
|
3328
3328
|
borderRadius: x.border.radius,
|
|
3329
3329
|
...b
|
|
3330
|
-
},
|
|
3330
|
+
}, M = {
|
|
3331
3331
|
backgroundColor: m
|
|
3332
|
-
},
|
|
3332
|
+
}, O = /* @__PURE__ */ p(
|
|
3333
3333
|
"div",
|
|
3334
3334
|
{
|
|
3335
3335
|
className: be.backdrop,
|
|
3336
|
-
style:
|
|
3336
|
+
style: M,
|
|
3337
3337
|
onClick: E,
|
|
3338
3338
|
role: "presentation",
|
|
3339
3339
|
children: /* @__PURE__ */ P(
|
|
3340
3340
|
"div",
|
|
3341
3341
|
{
|
|
3342
|
-
ref:
|
|
3343
|
-
className: [be.modal,
|
|
3342
|
+
ref: z,
|
|
3343
|
+
className: [be.modal, v].filter(Boolean).join(" "),
|
|
3344
3344
|
style: R,
|
|
3345
3345
|
role: "dialog",
|
|
3346
3346
|
"aria-modal": "true",
|
|
@@ -3382,25 +3382,25 @@ const Na = ({
|
|
|
3382
3382
|
)
|
|
3383
3383
|
] }),
|
|
3384
3384
|
/* @__PURE__ */ p("div", { className: be.content, children: t }),
|
|
3385
|
-
i.length > 0 && /* @__PURE__ */ p(ds, { direction: V ? "column" : "row", className: be.actions, children: i.map((
|
|
3385
|
+
i.length > 0 && /* @__PURE__ */ p(ds, { direction: V ? "column" : "row", className: be.actions, children: i.map(($, H) => /* @__PURE__ */ p(
|
|
3386
3386
|
Jr,
|
|
3387
3387
|
{
|
|
3388
|
-
color:
|
|
3389
|
-
outline:
|
|
3390
|
-
disabled:
|
|
3388
|
+
color: $.color,
|
|
3389
|
+
outline: $.variant === "outline",
|
|
3390
|
+
disabled: $.disabled,
|
|
3391
3391
|
onClick: () => {
|
|
3392
|
-
|
|
3392
|
+
$.onClick ? $.onClick(d || r) : d ? d($.value) : r();
|
|
3393
3393
|
},
|
|
3394
|
-
children:
|
|
3394
|
+
children: $.label
|
|
3395
3395
|
},
|
|
3396
|
-
|
|
3396
|
+
H
|
|
3397
3397
|
)) })
|
|
3398
3398
|
]
|
|
3399
3399
|
}
|
|
3400
3400
|
)
|
|
3401
3401
|
}
|
|
3402
3402
|
);
|
|
3403
|
-
return We(
|
|
3403
|
+
return We(O, document.body);
|
|
3404
3404
|
}, Ar = yt(null), $a = ({ children: e }) => {
|
|
3405
3405
|
const [r, t] = K(null), o = N.useCallback((c) => new Promise((u, f) => {
|
|
3406
3406
|
const m = Math.random().toString(36).substr(2, 9);
|
|
@@ -3531,7 +3531,7 @@ const Na = ({
|
|
|
3531
3531
|
bodyPadding: "0 0.5em 1.25em 2.4em"
|
|
3532
3532
|
}
|
|
3533
3533
|
}, Ma = ({
|
|
3534
|
-
|
|
3534
|
+
headerContent: e,
|
|
3535
3535
|
children: r,
|
|
3536
3536
|
className: t,
|
|
3537
3537
|
style: o,
|
|
@@ -3541,24 +3541,25 @@ const Na = ({
|
|
|
3541
3541
|
border: i = !1,
|
|
3542
3542
|
hideChevron: d = !1,
|
|
3543
3543
|
headerPadding: c,
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3544
|
+
headerStyle: u,
|
|
3545
|
+
bodyPadding: f,
|
|
3546
|
+
size: m = "default",
|
|
3547
|
+
chevronStyle: v
|
|
3547
3548
|
}) => {
|
|
3548
|
-
const
|
|
3549
|
-
const
|
|
3550
|
-
|
|
3551
|
-
}, [
|
|
3549
|
+
const b = D(), _ = pt(), x = `collapsible-header-${_}`, z = `collapsible-body-${_}`, g = ms[m], C = c ?? g.headerPadding, V = f ?? g.bodyPadding, E = s !== void 0, [R, M] = K(n), O = E ? s : R, $ = ye(() => {
|
|
3550
|
+
const H = !O;
|
|
3551
|
+
E || M(H), a == null || a(H);
|
|
3552
|
+
}, [O, E, a]);
|
|
3552
3553
|
return /* @__PURE__ */ P(
|
|
3553
3554
|
"div",
|
|
3554
3555
|
{
|
|
3555
3556
|
className: t,
|
|
3556
3557
|
style: {
|
|
3557
|
-
borderRadius:
|
|
3558
|
+
borderRadius: b.border.radius,
|
|
3558
3559
|
...i && {
|
|
3559
|
-
borderWidth:
|
|
3560
|
+
borderWidth: b.border.width,
|
|
3560
3561
|
borderStyle: "solid",
|
|
3561
|
-
borderColor: `${
|
|
3562
|
+
borderColor: `${b.colors.primary}33`
|
|
3562
3563
|
},
|
|
3563
3564
|
...o
|
|
3564
3565
|
},
|
|
@@ -3566,52 +3567,53 @@ const Na = ({
|
|
|
3566
3567
|
/* @__PURE__ */ P(
|
|
3567
3568
|
"div",
|
|
3568
3569
|
{
|
|
3569
|
-
id:
|
|
3570
|
+
id: x,
|
|
3570
3571
|
style: {
|
|
3571
3572
|
display: "flex",
|
|
3572
3573
|
alignItems: "center",
|
|
3573
3574
|
gap: "0.15em",
|
|
3574
|
-
padding:
|
|
3575
|
-
userSelect: "none"
|
|
3575
|
+
padding: C,
|
|
3576
|
+
userSelect: "none",
|
|
3577
|
+
...u
|
|
3576
3578
|
},
|
|
3577
3579
|
children: [
|
|
3578
3580
|
!d && /* @__PURE__ */ p(
|
|
3579
3581
|
"button",
|
|
3580
3582
|
{
|
|
3581
3583
|
type: "button",
|
|
3582
|
-
onClick:
|
|
3583
|
-
"aria-expanded":
|
|
3584
|
-
"aria-controls":
|
|
3585
|
-
"aria-label":
|
|
3586
|
-
title:
|
|
3584
|
+
onClick: $,
|
|
3585
|
+
"aria-expanded": O,
|
|
3586
|
+
"aria-controls": z,
|
|
3587
|
+
"aria-label": O ? "Collapse" : "Expand",
|
|
3588
|
+
title: O ? "Collapse" : "Expand",
|
|
3587
3589
|
style: {
|
|
3588
3590
|
display: "inline-flex",
|
|
3589
3591
|
alignItems: "center",
|
|
3590
3592
|
justifyContent: "center",
|
|
3591
|
-
width:
|
|
3592
|
-
height:
|
|
3593
|
+
width: g.chevronButton,
|
|
3594
|
+
height: g.chevronButton,
|
|
3593
3595
|
background: "transparent",
|
|
3594
3596
|
border: "none",
|
|
3595
3597
|
padding: 0,
|
|
3596
3598
|
cursor: "pointer",
|
|
3597
3599
|
color: "inherit",
|
|
3598
3600
|
flexShrink: 0,
|
|
3599
|
-
...
|
|
3601
|
+
...v
|
|
3600
3602
|
},
|
|
3601
|
-
children: /* @__PURE__ */ p(hs, { open:
|
|
3603
|
+
children: /* @__PURE__ */ p(hs, { open: O })
|
|
3602
3604
|
}
|
|
3603
3605
|
),
|
|
3604
3606
|
/* @__PURE__ */ p("div", { style: { flex: 1, display: "flex", alignItems: "center", gap: "0.5em" }, children: e })
|
|
3605
3607
|
]
|
|
3606
3608
|
}
|
|
3607
3609
|
),
|
|
3608
|
-
|
|
3610
|
+
O && /* @__PURE__ */ p(
|
|
3609
3611
|
"div",
|
|
3610
3612
|
{
|
|
3611
|
-
id:
|
|
3613
|
+
id: z,
|
|
3612
3614
|
role: "region",
|
|
3613
|
-
"aria-labelledby":
|
|
3614
|
-
style: { padding:
|
|
3615
|
+
"aria-labelledby": x,
|
|
3616
|
+
style: { padding: V },
|
|
3615
3617
|
children: r
|
|
3616
3618
|
}
|
|
3617
3619
|
)
|
|
@@ -3659,25 +3661,25 @@ const Na = ({
|
|
|
3659
3661
|
children: f,
|
|
3660
3662
|
// Style overrides
|
|
3661
3663
|
className: m,
|
|
3662
|
-
style:
|
|
3664
|
+
style: v,
|
|
3663
3665
|
// Element-specific props
|
|
3664
3666
|
sectionProps: b
|
|
3665
3667
|
}) => {
|
|
3666
|
-
const _ = D(), x = de(`(min-width: ${_.breakpoints.sm})`),
|
|
3668
|
+
const _ = D(), x = de(`(min-width: ${_.breakpoints.sm})`), z = {
|
|
3667
3669
|
backgroundColor: e,
|
|
3668
3670
|
color: r || _.fonts.color,
|
|
3669
3671
|
margin: d,
|
|
3670
|
-
...
|
|
3672
|
+
...v
|
|
3671
3673
|
// Top level style prop overrides
|
|
3672
|
-
},
|
|
3674
|
+
}, g = `calc(${_.fonts.rhythm} * ${u})`, C = x ? a || _.layout.padding : i || _.layout.paddingSm, V = {
|
|
3673
3675
|
"--max-width": t || _.layout.maxWidth,
|
|
3674
3676
|
"--min-width": o,
|
|
3675
3677
|
"--width": n,
|
|
3676
3678
|
"--height": s,
|
|
3677
|
-
"--section-padding": `${
|
|
3679
|
+
"--section-padding": `${g} ${C}`,
|
|
3678
3680
|
"--gap": c
|
|
3679
3681
|
}, E = [tr.section, m].filter(Boolean).join(" ");
|
|
3680
|
-
return /* @__PURE__ */ p("section", { ...b, className: E, style:
|
|
3682
|
+
return /* @__PURE__ */ p("section", { ...b, className: E, style: z, children: /* @__PURE__ */ p("div", { className: tr.innerDiv, style: V, children: f }) });
|
|
3681
3683
|
}, gs = "Hero-module__hero___IB2tg", vs = "Hero-module__content___rkkfQ", rr = {
|
|
3682
3684
|
hero: gs,
|
|
3683
3685
|
content: vs
|
|
@@ -3763,12 +3765,12 @@ const Na = ({
|
|
|
3763
3765
|
children: f,
|
|
3764
3766
|
// Style overrides
|
|
3765
3767
|
className: m,
|
|
3766
|
-
style:
|
|
3768
|
+
style: v,
|
|
3767
3769
|
// Element-specific props
|
|
3768
3770
|
footerProps: b
|
|
3769
3771
|
}) => {
|
|
3770
|
-
const _ = D(), x = u || _.breakpoints.sm, { maxWidth:
|
|
3771
|
-
isSmallScreen:
|
|
3772
|
+
const _ = D(), x = u || _.breakpoints.sm, { maxWidth: z, unit: g } = Ae(x), C = de(`(max-width: ${z}${g})`), V = ws({
|
|
3773
|
+
isSmallScreen: C,
|
|
3772
3774
|
maxWidth: t,
|
|
3773
3775
|
minWidth: o,
|
|
3774
3776
|
width: n,
|
|
@@ -3780,7 +3782,7 @@ const Na = ({
|
|
|
3780
3782
|
backgroundColor: e,
|
|
3781
3783
|
color: r
|
|
3782
3784
|
}), E = [or.container, m].filter(Boolean).join(" ");
|
|
3783
|
-
return /* @__PURE__ */ p("footer", { ...b, className: or.footer, children: /* @__PURE__ */ p("div", { className: E, style: { ...V, ...
|
|
3785
|
+
return /* @__PURE__ */ p("footer", { ...b, className: or.footer, children: /* @__PURE__ */ p("div", { className: E, style: { ...V, ...v }, children: f }) });
|
|
3784
3786
|
}, Cs = "FeatureCard-module__card___XQt66", Fs = "FeatureCard-module__icon___dXJ92", zs = "FeatureCard-module__title___KxXyA", Vs = "FeatureCard-module__content___68xkw", je = {
|
|
3785
3787
|
card: Cs,
|
|
3786
3788
|
icon: Fs,
|
|
@@ -3882,7 +3884,7 @@ const Na = ({
|
|
|
3882
3884
|
e === "row" ? Fe.horizontal : Fe.vertical,
|
|
3883
3885
|
c ? Fe.clickable : void 0,
|
|
3884
3886
|
i
|
|
3885
|
-
].filter(Boolean).join(" "),
|
|
3887
|
+
].filter(Boolean).join(" "), v = (b) => {
|
|
3886
3888
|
c && (b.key === "Enter" || b.key === " ") && (b.preventDefault(), c());
|
|
3887
3889
|
};
|
|
3888
3890
|
return /* @__PURE__ */ P(
|
|
@@ -3899,7 +3901,7 @@ const Na = ({
|
|
|
3899
3901
|
divProps: {
|
|
3900
3902
|
...f,
|
|
3901
3903
|
onClick: c,
|
|
3902
|
-
onKeyDown: c ?
|
|
3904
|
+
onKeyDown: c ? v : void 0,
|
|
3903
3905
|
role: c ? "button" : void 0,
|
|
3904
3906
|
tabIndex: c ? 0 : void 0
|
|
3905
3907
|
},
|
|
@@ -3970,11 +3972,11 @@ const Na = ({
|
|
|
3970
3972
|
divProps: d,
|
|
3971
3973
|
inputProps: c
|
|
3972
3974
|
}) => {
|
|
3973
|
-
const u = D(), f = pe(null), [m,
|
|
3975
|
+
const u = D(), f = pe(null), [m, v] = K(!1), [b, _] = K(null), x = n || b, z = x ? u.colors.error : u.colors.primary, g = x ? u.colors.error : u.colors.primary, C = ye(
|
|
3974
3976
|
(B) => {
|
|
3975
3977
|
if (_(null), t && B.size > t) {
|
|
3976
|
-
const
|
|
3977
|
-
_(`File exceeds maximum size of ${
|
|
3978
|
+
const A = (t / 1048576).toFixed(1);
|
|
3979
|
+
_(`File exceeds maximum size of ${A} MB`);
|
|
3978
3980
|
return;
|
|
3979
3981
|
}
|
|
3980
3982
|
e(B);
|
|
@@ -3984,44 +3986,44 @@ const Na = ({
|
|
|
3984
3986
|
var B;
|
|
3985
3987
|
o || (B = f.current) == null || B.click();
|
|
3986
3988
|
}, E = (B) => {
|
|
3987
|
-
var
|
|
3988
|
-
(B.key === "Enter" || B.key === " ") && !o && (B.preventDefault(), (
|
|
3989
|
+
var A;
|
|
3990
|
+
(B.key === "Enter" || B.key === " ") && !o && (B.preventDefault(), (A = f.current) == null || A.click());
|
|
3989
3991
|
}, R = (B) => {
|
|
3990
|
-
var
|
|
3991
|
-
const
|
|
3992
|
-
|
|
3993
|
-
},
|
|
3994
|
-
B.preventDefault(), o ||
|
|
3995
|
-
},
|
|
3996
|
-
var
|
|
3997
|
-
if (B.preventDefault(),
|
|
3998
|
-
const
|
|
3999
|
-
|
|
4000
|
-
},
|
|
3992
|
+
var I;
|
|
3993
|
+
const A = (I = B.target.files) == null ? void 0 : I[0];
|
|
3994
|
+
A && C(A), B.target.value = "";
|
|
3995
|
+
}, M = (B) => {
|
|
3996
|
+
B.preventDefault(), o || v(!0);
|
|
3997
|
+
}, O = () => v(!1), $ = (B) => {
|
|
3998
|
+
var I;
|
|
3999
|
+
if (B.preventDefault(), v(!1), o) return;
|
|
4000
|
+
const A = (I = B.dataTransfer.files) == null ? void 0 : I[0];
|
|
4001
|
+
A && C(A);
|
|
4002
|
+
}, H = [
|
|
4001
4003
|
ae.dropzone,
|
|
4002
4004
|
m && ae.dragOver,
|
|
4003
4005
|
o && ae.loading,
|
|
4004
4006
|
a
|
|
4005
4007
|
].filter(Boolean).join(" "), G = {
|
|
4006
|
-
"--upload-color":
|
|
4007
|
-
borderColor:
|
|
4008
|
+
"--upload-color": z,
|
|
4009
|
+
borderColor: z,
|
|
4008
4010
|
borderWidth: u.border.width,
|
|
4009
4011
|
borderRadius: u.border.radius,
|
|
4010
4012
|
fontSize: "1em",
|
|
4011
|
-
color:
|
|
4013
|
+
color: g,
|
|
4012
4014
|
...i
|
|
4013
4015
|
};
|
|
4014
4016
|
return /* @__PURE__ */ P(
|
|
4015
4017
|
"div",
|
|
4016
4018
|
{
|
|
4017
4019
|
...d,
|
|
4018
|
-
className:
|
|
4020
|
+
className: H,
|
|
4019
4021
|
style: G,
|
|
4020
4022
|
onClick: V,
|
|
4021
4023
|
onKeyDown: E,
|
|
4022
|
-
onDragOver:
|
|
4023
|
-
onDragLeave:
|
|
4024
|
-
onDrop:
|
|
4024
|
+
onDragOver: M,
|
|
4025
|
+
onDragLeave: O,
|
|
4026
|
+
onDrop: $,
|
|
4025
4027
|
role: "button",
|
|
4026
4028
|
tabIndex: o ? -1 : 0,
|
|
4027
4029
|
"aria-disabled": o,
|
|
@@ -4055,7 +4057,7 @@ const Na = ({
|
|
|
4055
4057
|
className: [ae.content, o && ae.contentHidden].filter(Boolean).join(" "),
|
|
4056
4058
|
"aria-hidden": o || void 0,
|
|
4057
4059
|
children: [
|
|
4058
|
-
/* @__PURE__ */ p(Js, { color:
|
|
4060
|
+
/* @__PURE__ */ p(Js, { color: z }),
|
|
4059
4061
|
/* @__PURE__ */ p("span", { className: ae.label, children: s }),
|
|
4060
4062
|
r && /* @__PURE__ */ P("span", { className: ae.hint, children: [
|
|
4061
4063
|
"Accepted: ",
|
|
@@ -4102,13 +4104,13 @@ const Na = ({
|
|
|
4102
4104
|
style: i,
|
|
4103
4105
|
imgProps: d
|
|
4104
4106
|
}) => {
|
|
4105
|
-
const c = D(), [u, f] = K(null), [m,
|
|
4107
|
+
const c = D(), [u, f] = K(null), [m, v] = K(null), [b, _] = K(null), x = u === e, z = m === e, g = b === e;
|
|
4106
4108
|
se(() => {
|
|
4107
4109
|
if (!e) return;
|
|
4108
|
-
const
|
|
4109
|
-
return () => clearTimeout(
|
|
4110
|
+
const O = setTimeout(() => _(e), n);
|
|
4111
|
+
return () => clearTimeout(O);
|
|
4110
4112
|
}, [e, n]);
|
|
4111
|
-
const
|
|
4113
|
+
const C = o || !!e && !x && !z && g, V = !o && (!e || z), E = !o && !!e && !z, R = [lt.container, a].filter(Boolean).join(" "), M = {
|
|
4112
4114
|
aspectRatio: t,
|
|
4113
4115
|
borderRadius: c.border.radius,
|
|
4114
4116
|
...i
|
|
@@ -4117,11 +4119,11 @@ const Na = ({
|
|
|
4117
4119
|
"div",
|
|
4118
4120
|
{
|
|
4119
4121
|
className: R,
|
|
4120
|
-
style:
|
|
4122
|
+
style: M,
|
|
4121
4123
|
"aria-label": V ? r || "Image placeholder" : void 0,
|
|
4122
|
-
"aria-busy":
|
|
4124
|
+
"aria-busy": C || void 0,
|
|
4123
4125
|
children: [
|
|
4124
|
-
|
|
4126
|
+
C && /* @__PURE__ */ p(Mr, { style: { borderRadius: "inherit", position: "absolute", inset: 0 } }),
|
|
4125
4127
|
V && /* @__PURE__ */ p("div", { className: lt.fallback, children: s ?? null }),
|
|
4126
4128
|
E && /* @__PURE__ */ p(
|
|
4127
4129
|
"img",
|
|
@@ -4132,7 +4134,7 @@ const Na = ({
|
|
|
4132
4134
|
className: lt.img,
|
|
4133
4135
|
style: { opacity: x ? 1 : 0 },
|
|
4134
4136
|
onLoad: () => e && f(e),
|
|
4135
|
-
onError: () => e &&
|
|
4137
|
+
onError: () => e && v(e)
|
|
4136
4138
|
}
|
|
4137
4139
|
)
|
|
4138
4140
|
]
|
|
@@ -4181,16 +4183,16 @@ const Na = ({
|
|
|
4181
4183
|
style: c,
|
|
4182
4184
|
imgProps: u
|
|
4183
4185
|
}) => {
|
|
4184
|
-
const f = D(), [m,
|
|
4186
|
+
const f = D(), [m, v] = K(null), [b, _] = K(null), [x, z] = K(null), g = m === e, C = b === e, V = x === e;
|
|
4185
4187
|
se(() => {
|
|
4186
4188
|
if (!e) return;
|
|
4187
|
-
const G = setTimeout(() =>
|
|
4189
|
+
const G = setTimeout(() => z(e), n);
|
|
4188
4190
|
return () => clearTimeout(G);
|
|
4189
4191
|
}, [e, n]);
|
|
4190
|
-
const E = o || !!e && !
|
|
4192
|
+
const E = o || !!e && !g && !C && V, R = !o && (!e || C), M = !o && !!e && !C, O = [xe.thumbnail, ua[t], d].filter(Boolean).join(" "), $ = {
|
|
4191
4193
|
borderRadius: f.border.radius,
|
|
4192
4194
|
...c
|
|
4193
|
-
},
|
|
4195
|
+
}, H = {
|
|
4194
4196
|
background: f.colors.primary,
|
|
4195
4197
|
color: f.buttons.primary.textColor,
|
|
4196
4198
|
borderRadius: "50%"
|
|
@@ -4198,22 +4200,22 @@ const Na = ({
|
|
|
4198
4200
|
return /* @__PURE__ */ P(
|
|
4199
4201
|
"div",
|
|
4200
4202
|
{
|
|
4201
|
-
className:
|
|
4202
|
-
style:
|
|
4203
|
+
className: O,
|
|
4204
|
+
style: $,
|
|
4203
4205
|
"aria-label": R ? r || "Image placeholder" : void 0,
|
|
4204
4206
|
"aria-busy": E || void 0,
|
|
4205
4207
|
children: [
|
|
4206
4208
|
E && /* @__PURE__ */ p(Mr, { style: { borderRadius: "inherit", position: "absolute", inset: 0 } }),
|
|
4207
4209
|
R && (i ?? /* @__PURE__ */ p(fa, { color: f.colors.primary })),
|
|
4208
|
-
|
|
4210
|
+
M && /* @__PURE__ */ p(
|
|
4209
4211
|
"img",
|
|
4210
4212
|
{
|
|
4211
4213
|
...u,
|
|
4212
4214
|
src: e,
|
|
4213
4215
|
alt: r,
|
|
4214
4216
|
className: xe.img,
|
|
4215
|
-
style: { opacity:
|
|
4216
|
-
onLoad: () => e &&
|
|
4217
|
+
style: { opacity: g ? 1 : 0 },
|
|
4218
|
+
onLoad: () => e && v(e),
|
|
4217
4219
|
onError: () => e && _(e)
|
|
4218
4220
|
}
|
|
4219
4221
|
),
|
|
@@ -4222,7 +4224,7 @@ const Na = ({
|
|
|
4222
4224
|
{
|
|
4223
4225
|
type: "button",
|
|
4224
4226
|
className: xe.removeButton,
|
|
4225
|
-
style:
|
|
4227
|
+
style: H,
|
|
4226
4228
|
onClick: (G) => {
|
|
4227
4229
|
G.stopPropagation(), s();
|
|
4228
4230
|
},
|
|
@@ -4262,10 +4264,10 @@ const Na = ({
|
|
|
4262
4264
|
...i.lineHeight !== void 0 && { lineHeight: i.lineHeight },
|
|
4263
4265
|
...i.fontWeight !== void 0 && { fontWeight: i.fontWeight },
|
|
4264
4266
|
...o
|
|
4265
|
-
}, m = [c, t].filter(Boolean).join(" "),
|
|
4267
|
+
}, m = [c, t].filter(Boolean).join(" "), v = `h${e}`;
|
|
4266
4268
|
return /* @__PURE__ */ P(ge, { children: [
|
|
4267
4269
|
u && /* @__PURE__ */ p("style", { children: u }),
|
|
4268
|
-
N.createElement(
|
|
4270
|
+
N.createElement(v, { className: m, style: f }, n)
|
|
4269
4271
|
] });
|
|
4270
4272
|
}, Ua = ({ size: e = "default", as: r = "p", className: t, style: o, children: n }) => {
|
|
4271
4273
|
const a = D().typography.text[e], i = {
|
|
@@ -4313,19 +4315,19 @@ const Na = ({
|
|
|
4313
4315
|
style: u,
|
|
4314
4316
|
tooltipProps: f
|
|
4315
4317
|
}) => {
|
|
4316
|
-
const m = D(),
|
|
4317
|
-
open:
|
|
4318
|
-
triggerRef:
|
|
4318
|
+
const m = D(), v = pe(null), b = pe(null), _ = pe(null), [x, z] = K(!1), g = pt(), C = x && !a && !!r, { side: V, align: E } = Er(t), { positionStyle: R } = Nr({
|
|
4319
|
+
open: C,
|
|
4320
|
+
triggerRef: v,
|
|
4319
4321
|
side: V,
|
|
4320
4322
|
align: E,
|
|
4321
4323
|
offset: s
|
|
4322
|
-
}),
|
|
4324
|
+
}), M = () => {
|
|
4323
4325
|
b.current && clearTimeout(b.current), _.current && clearTimeout(_.current), b.current = null, _.current = null;
|
|
4324
|
-
},
|
|
4325
|
-
|
|
4326
|
-
}, [o]),
|
|
4327
|
-
|
|
4328
|
-
}, [n]),
|
|
4326
|
+
}, O = ye(() => {
|
|
4327
|
+
M(), b.current = setTimeout(() => z(!0), o);
|
|
4328
|
+
}, [o]), $ = ye(() => {
|
|
4329
|
+
M(), _.current = setTimeout(() => z(!1), n);
|
|
4330
|
+
}, [n]), H = {
|
|
4329
4331
|
backgroundColor: d || m.colors.secondaryBackground,
|
|
4330
4332
|
color: i,
|
|
4331
4333
|
borderRadius: m.border.radius,
|
|
@@ -4336,24 +4338,24 @@ const Na = ({
|
|
|
4336
4338
|
/* @__PURE__ */ p(
|
|
4337
4339
|
"span",
|
|
4338
4340
|
{
|
|
4339
|
-
ref:
|
|
4341
|
+
ref: v,
|
|
4340
4342
|
className: nr.triggerWrapper,
|
|
4341
|
-
onMouseEnter:
|
|
4342
|
-
onMouseLeave:
|
|
4343
|
-
onFocus:
|
|
4344
|
-
onBlur:
|
|
4345
|
-
"aria-describedby":
|
|
4343
|
+
onMouseEnter: O,
|
|
4344
|
+
onMouseLeave: $,
|
|
4345
|
+
onFocus: O,
|
|
4346
|
+
onBlur: $,
|
|
4347
|
+
"aria-describedby": C ? g : void 0,
|
|
4346
4348
|
children: e
|
|
4347
4349
|
}
|
|
4348
4350
|
),
|
|
4349
|
-
|
|
4351
|
+
C && We(
|
|
4350
4352
|
/* @__PURE__ */ p(
|
|
4351
4353
|
"div",
|
|
4352
4354
|
{
|
|
4353
|
-
id:
|
|
4355
|
+
id: g,
|
|
4354
4356
|
role: "tooltip",
|
|
4355
4357
|
className: [nr.tooltip, c].filter(Boolean).join(" "),
|
|
4356
|
-
style:
|
|
4358
|
+
style: H,
|
|
4357
4359
|
...f,
|
|
4358
4360
|
children: r
|
|
4359
4361
|
}
|