@vellira-ui/react 2.44.1 → 2.44.3
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/index.cjs +1 -1
- package/dist/index.js +609 -606
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -281,14 +281,14 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
|
|
|
281
281
|
"input:not([disabled])",
|
|
282
282
|
"select:not([disabled])",
|
|
283
283
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
284
|
-
].join(","), oe = (e) => Array.from(e.querySelectorAll(ae)).filter((e) => !e.hasAttribute("disabled")),
|
|
284
|
+
].join(","), oe = (e) => Array.from(e.querySelectorAll(ae)).filter((e) => !e.hasAttribute("disabled")), V = (e) => {
|
|
285
285
|
(oe(e)[0] ?? e).focus();
|
|
286
|
-
},
|
|
286
|
+
}, se = ({ active: e, contentRef: t, enabled: n, initialFocus: r, finalFocus: i, restoreFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s }) => {
|
|
287
287
|
f(() => {
|
|
288
288
|
if (!e) return;
|
|
289
289
|
let n = document.activeElement, c = i?.current, l = re();
|
|
290
290
|
return o?.(l), l.defaultPrevented || queueMicrotask(() => {
|
|
291
|
-
r?.current?.focus(), !r?.current && t.current &&
|
|
291
|
+
r?.current?.focus(), !r?.current && t.current && V(t.current);
|
|
292
292
|
}), () => {
|
|
293
293
|
let e = re();
|
|
294
294
|
s?.(e), !(e.defaultPrevented || !a) && queueMicrotask(() => {
|
|
@@ -331,7 +331,7 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
|
|
|
331
331
|
t,
|
|
332
332
|
n
|
|
333
333
|
]);
|
|
334
|
-
},
|
|
334
|
+
}, ce = ({ active: e, contentRef: t, ignoreRefs: n = [], closeOnEscape: r, closeOnOutsidePress: i, isTopOverlay: a, onEscapeKeyDown: o, onPointerDownOutside: s, onInteractOutside: c, requestClose: l }) => {
|
|
335
335
|
let u = g(n);
|
|
336
336
|
u.current = n, f(() => {
|
|
337
337
|
if (!e) return;
|
|
@@ -366,44 +366,44 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
|
|
|
366
366
|
s,
|
|
367
367
|
l
|
|
368
368
|
]);
|
|
369
|
-
},
|
|
369
|
+
}, le = [], H = {
|
|
370
370
|
add(e) {
|
|
371
|
-
|
|
371
|
+
le = le.filter((t) => t !== e), le.push(e);
|
|
372
372
|
},
|
|
373
373
|
remove(e) {
|
|
374
|
-
|
|
374
|
+
le = le.filter((t) => t !== e);
|
|
375
375
|
},
|
|
376
376
|
isTop(e) {
|
|
377
|
-
return
|
|
377
|
+
return le[le.length - 1] === e;
|
|
378
378
|
}
|
|
379
|
-
},
|
|
380
|
-
if (e) return
|
|
381
|
-
|
|
379
|
+
}, ue = ({ active: e, id: t }) => (f(() => {
|
|
380
|
+
if (e) return H.add(t), () => {
|
|
381
|
+
H.remove(t);
|
|
382
382
|
};
|
|
383
|
-
}, [e, t]), { isTopOverlay: u(() =>
|
|
383
|
+
}, [e, t]), { isTopOverlay: u(() => H.isTop(t), [t]) }), de = 0, fe = "", pe = {
|
|
384
384
|
lock() {
|
|
385
|
-
typeof document > "u" || (
|
|
385
|
+
typeof document > "u" || (de === 0 && (fe = document.body.style.overflow, document.body.style.overflow = "hidden"), de += 1);
|
|
386
386
|
},
|
|
387
387
|
unlock() {
|
|
388
|
-
typeof document > "u" || (
|
|
388
|
+
typeof document > "u" || (de = Math.max(0, de - 1), de === 0 && (document.body.style.overflow = fe));
|
|
389
389
|
}
|
|
390
|
-
},
|
|
390
|
+
}, me = ({ active: e, enabled: t = !0 }) => {
|
|
391
391
|
f(() => {
|
|
392
|
-
if (!(!e || !t)) return
|
|
393
|
-
|
|
392
|
+
if (!(!e || !t)) return pe.lock(), () => {
|
|
393
|
+
pe.unlock();
|
|
394
394
|
};
|
|
395
395
|
}, [e, t]);
|
|
396
|
-
},
|
|
396
|
+
}, he = () => typeof document > "u" ? null : document.body, ge = ({ container: e } = {}) => {
|
|
397
397
|
let [t, n] = _(!1);
|
|
398
398
|
return f(() => {
|
|
399
399
|
n(!0);
|
|
400
|
-
}, []), t ? e ?? document.getElementById("overlay-root") ??
|
|
401
|
-
},
|
|
400
|
+
}, []), t ? e ?? document.getElementById("overlay-root") ?? he() : null;
|
|
401
|
+
}, _e = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
402
402
|
let [r, i] = _(t), a = e !== void 0;
|
|
403
403
|
return [a ? e : r, u((e) => {
|
|
404
404
|
a || i(e), n?.(e);
|
|
405
405
|
}, [a, n])];
|
|
406
|
-
},
|
|
406
|
+
}, ve = ({ activeIndex: e, setActiveIndex: t, items: n, isOpen: r, onOpen: i, onSelect: a, onClose: o, getItemText: s, loop: c = !0 }) => {
|
|
407
407
|
let l = g({
|
|
408
408
|
value: "",
|
|
409
409
|
timeoutId: void 0
|
|
@@ -486,7 +486,7 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
|
|
|
486
486
|
m,
|
|
487
487
|
h
|
|
488
488
|
]) };
|
|
489
|
-
},
|
|
489
|
+
}, ye = ({ items: e, open: t, defaultOpen: n = !1, disabled: r = !1, onOpenChange: i, onSelect: a, getItemValue: o, getItemText: s, loop: c = !0 }) => {
|
|
490
490
|
let [l, d] = _(n), [p, m] = _(-1), h = t !== void 0, g = t ?? l, v = u(() => e.findIndex((e) => !e.disabled), [e]), y = u(() => {
|
|
491
491
|
for (let t = e.length - 1; t >= 0; t--) if (!e[t]?.disabled) return t;
|
|
492
492
|
return -1;
|
|
@@ -541,7 +541,7 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
|
|
|
541
541
|
p,
|
|
542
542
|
e,
|
|
543
543
|
T
|
|
544
|
-
]), { onKeyDown: D } =
|
|
544
|
+
]), { onKeyDown: D } = ve({
|
|
545
545
|
activeIndex: p,
|
|
546
546
|
setActiveIndex: m,
|
|
547
547
|
items: e,
|
|
@@ -570,8 +570,8 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
|
|
|
570
570
|
getFirstEnabledIndex: v,
|
|
571
571
|
getLastEnabledIndex: y
|
|
572
572
|
};
|
|
573
|
-
},
|
|
574
|
-
let a = p(), o = p(), s = p(), [c, l] =
|
|
573
|
+
}, be = ({ open: e, defaultOpen: t = !1, onOpenChange: n, closeOnEscape: r, closeOnOutsidePress: i }) => {
|
|
574
|
+
let a = p(), o = p(), s = p(), [c, l] = _e({
|
|
575
575
|
value: e,
|
|
576
576
|
defaultValue: t,
|
|
577
577
|
onChange: n
|
|
@@ -589,12 +589,12 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
|
|
|
589
589
|
titleId: o,
|
|
590
590
|
descriptionId: s
|
|
591
591
|
};
|
|
592
|
-
},
|
|
593
|
-
let [m, g] =
|
|
592
|
+
}, xe = ({ value: e, defaultValue: t, onValueChange: n, onChange: r, options: i, multiple: a = !1, maxSelected: o, closeOnSelect: s = !a, disabled: c = !1, open: l, defaultOpen: d = !1, onOpenChange: p }) => {
|
|
593
|
+
let [m, g] = _e({
|
|
594
594
|
value: e,
|
|
595
595
|
defaultValue: t ?? (a ? [] : ""),
|
|
596
596
|
onChange: n ?? r
|
|
597
|
-
}), [v, y] =
|
|
597
|
+
}), [v, y] = _e({
|
|
598
598
|
value: l,
|
|
599
599
|
defaultValue: d,
|
|
600
600
|
onChange: p
|
|
@@ -663,7 +663,7 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
|
|
|
663
663
|
b,
|
|
664
664
|
i,
|
|
665
665
|
k
|
|
666
|
-
]), { onKeyDown: j } =
|
|
666
|
+
]), { onKeyDown: j } = ve({
|
|
667
667
|
activeIndex: b,
|
|
668
668
|
setActiveIndex: x,
|
|
669
669
|
items: i,
|
|
@@ -693,8 +693,8 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
|
|
|
693
693
|
selectActiveOption: A,
|
|
694
694
|
onKeyDown: j
|
|
695
695
|
};
|
|
696
|
-
},
|
|
697
|
-
let [r, i] =
|
|
696
|
+
}, U = ({ value: e, defaultValue: t = "", onValueChange: n }) => {
|
|
697
|
+
let [r, i] = _e({
|
|
698
698
|
value: e,
|
|
699
699
|
defaultValue: t,
|
|
700
700
|
onChange: n
|
|
@@ -703,15 +703,15 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
|
|
|
703
703
|
value: r,
|
|
704
704
|
setValue: i
|
|
705
705
|
};
|
|
706
|
-
},
|
|
706
|
+
}, Se = s(null), Ce = ({ children: e, container: t = null }) => /* @__PURE__ */ n(Se.Provider, {
|
|
707
707
|
value: t,
|
|
708
708
|
children: e
|
|
709
|
-
}),
|
|
710
|
-
let n = d(
|
|
709
|
+
}), we = ({ children: e, container: t }) => {
|
|
710
|
+
let n = d(Se), r = ge({ container: t ?? n });
|
|
711
711
|
return r ? v(e, r) : null;
|
|
712
712
|
};
|
|
713
|
-
|
|
714
|
-
var
|
|
713
|
+
we.__velliraPortal = !0, we.displayName = "Portal", Ce.displayName = "PortalProvider";
|
|
714
|
+
var Te = {
|
|
715
715
|
dropdown: "_dropdown_m7rnq_1",
|
|
716
716
|
"dropdown-in": "_dropdown-in_m7rnq_1",
|
|
717
717
|
primary: "_primary_m7rnq_42",
|
|
@@ -725,7 +725,7 @@ var U = {
|
|
|
725
725
|
"dropdown-sheet-in": "_dropdown-sheet-in_m7rnq_1"
|
|
726
726
|
}, Ee = L("empty", "Dropdown.Empty"), De = ({ children: e }) => /* @__PURE__ */ n("li", {
|
|
727
727
|
role: "presentation",
|
|
728
|
-
className:
|
|
728
|
+
className: Te.empty,
|
|
729
729
|
children: e ?? "No actions available"
|
|
730
730
|
});
|
|
731
731
|
De.displayName = "DropdownEmptySurface";
|
|
@@ -737,17 +737,17 @@ ke.displayName = "DropdownGroupSurface";
|
|
|
737
737
|
//#region src/components/Dropdown/internal/DropdownContext.tsx
|
|
738
738
|
var Ae = s(null), je = s(null), Me = s(null), Ne = Ae.Provider, Pe = je.Provider;
|
|
739
739
|
Me.Provider;
|
|
740
|
-
function
|
|
740
|
+
function Fe() {
|
|
741
741
|
let e = d(Ae);
|
|
742
742
|
if (!e) throw Error("Dropdown compound components must be used inside Dropdown.");
|
|
743
743
|
return e;
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function Ie() {
|
|
746
746
|
let e = d(je);
|
|
747
747
|
if (!e) throw Error("Dropdown.Trigger must be used inside Dropdown.");
|
|
748
748
|
return e;
|
|
749
749
|
}
|
|
750
|
-
var
|
|
750
|
+
var W = {
|
|
751
751
|
item: "_item_xmygj_1",
|
|
752
752
|
disabled: "_disabled_xmygj_35",
|
|
753
753
|
active: "_active_xmygj_53",
|
|
@@ -772,8 +772,8 @@ var G = {
|
|
|
772
772
|
"dropdown-sub-in": "_dropdown-sub-in_xmygj_1",
|
|
773
773
|
subLabel: "_subLabel_xmygj_300",
|
|
774
774
|
subSeparator: "_subSeparator_xmygj_308"
|
|
775
|
-
},
|
|
776
|
-
let a =
|
|
775
|
+
}, Le = L("item", "Dropdown.Item"), Re = ({ item: e, itemIndex: i }) => {
|
|
776
|
+
let a = Fe(), o = g(void 0), [s, c] = _(e.type === "checkbox" ? e.props.defaultChecked ?? !1 : !1), l = a.activeIndex === i, u = a.openSubId === e.id, d = e.type === "checkbox", f = e.type === "radio", p = e.type === "subTrigger", m = d ? e.props.checked ?? s : f ? (e.groupProps?.value ?? a.radioValues[e.groupId]) === e.props.value : !1, h = a.loading || e.disabled, v = e.props, b = z(v.children), S = b.icon ?? v.icon, C = b.description ?? ("description" in v ? v.description : void 0), w = b.badge ?? ("badge" in v ? v.badge : void 0), T = b.shortcut ?? v.shortcut, E = b.content.length ? b.content : v.children, D = "color" in v ? v.color : void 0, O = e.type === "item" ? e.props.href : void 0, k = e.type === "item" ? e.props.target : void 0, A = e.type === "item" ? e.props.download : void 0, j = a.getItemId(i), M = d ? "menuitemcheckbox" : f ? "menuitemradio" : "menuitem", N = e.type === "item" && k === "_blank" && !e.props.rel ? "noreferrer noopener" : e.type === "item" ? e.props.rel : void 0, F = O ? "a" : "li", I = d || f, L = (t) => {
|
|
777
777
|
if (h) {
|
|
778
778
|
t.preventDefault();
|
|
779
779
|
return;
|
|
@@ -782,7 +782,7 @@ var G = {
|
|
|
782
782
|
let t = !m;
|
|
783
783
|
c(t), e.props.onCheckedChange?.(t);
|
|
784
784
|
}
|
|
785
|
-
a.selectItem(e,
|
|
785
|
+
a.selectItem(e, ze(t));
|
|
786
786
|
};
|
|
787
787
|
return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r(F, {
|
|
788
788
|
id: j,
|
|
@@ -798,11 +798,11 @@ var G = {
|
|
|
798
798
|
"aria-expanded": p ? u : void 0,
|
|
799
799
|
"data-active": l || void 0,
|
|
800
800
|
"data-state": u ? "open" : void 0,
|
|
801
|
-
className: P(
|
|
802
|
-
[
|
|
803
|
-
[
|
|
804
|
-
[
|
|
805
|
-
}, D && D !== "default" ?
|
|
801
|
+
className: P(W.item, W[a.size], {
|
|
802
|
+
[W.active]: l,
|
|
803
|
+
[W.disabled]: h,
|
|
804
|
+
[W.checked]: m
|
|
805
|
+
}, D && D !== "default" ? W[D] : void 0, v.className),
|
|
806
806
|
onClick: L,
|
|
807
807
|
onMouseEnter: () => {
|
|
808
808
|
h || (a.setActiveIndex(i), p ? (window.clearTimeout(o.current), o.current = window.setTimeout(() => a.setOpenSubId(e.id), 120)) : (window.clearTimeout(o.current), a.setOpenSubId(void 0)));
|
|
@@ -812,58 +812,58 @@ var G = {
|
|
|
812
812
|
},
|
|
813
813
|
children: [
|
|
814
814
|
S && /* @__PURE__ */ n("span", {
|
|
815
|
-
className:
|
|
815
|
+
className: W.itemIcon,
|
|
816
816
|
children: S
|
|
817
817
|
}),
|
|
818
818
|
/* @__PURE__ */ r("span", {
|
|
819
|
-
className:
|
|
819
|
+
className: W.itemText,
|
|
820
820
|
children: [/* @__PURE__ */ n("span", {
|
|
821
|
-
className:
|
|
821
|
+
className: W.itemLabel,
|
|
822
822
|
children: E
|
|
823
823
|
}), C && /* @__PURE__ */ n("span", {
|
|
824
|
-
className:
|
|
824
|
+
className: W.itemDescription,
|
|
825
825
|
children: C
|
|
826
826
|
})]
|
|
827
827
|
}),
|
|
828
828
|
w && /* @__PURE__ */ n("span", {
|
|
829
|
-
className:
|
|
829
|
+
className: W.itemBadge,
|
|
830
830
|
children: w
|
|
831
831
|
}),
|
|
832
832
|
T && /* @__PURE__ */ n("span", {
|
|
833
|
-
className:
|
|
833
|
+
className: W.itemShortcut,
|
|
834
834
|
children: T
|
|
835
835
|
}),
|
|
836
836
|
I && /* @__PURE__ */ n("span", {
|
|
837
|
-
className:
|
|
837
|
+
className: W.indicator,
|
|
838
838
|
"aria-hidden": "true",
|
|
839
839
|
children: m ? /* @__PURE__ */ n(y, {}) : null
|
|
840
840
|
}),
|
|
841
841
|
p && /* @__PURE__ */ n("span", {
|
|
842
|
-
className:
|
|
842
|
+
className: W.itemShortcut,
|
|
843
843
|
"aria-hidden": "true",
|
|
844
844
|
children: /* @__PURE__ */ n(x, {})
|
|
845
845
|
})
|
|
846
846
|
]
|
|
847
847
|
}), p && u && e.subEntries.length > 0 && /* @__PURE__ */ n("ul", {
|
|
848
848
|
role: "menu",
|
|
849
|
-
className:
|
|
849
|
+
className: W.subContent,
|
|
850
850
|
onMouseEnter: () => a.setOpenSubId(e.id),
|
|
851
851
|
children: e.subEntries.map((e) => e.type === "label" ? /* @__PURE__ */ n("li", {
|
|
852
852
|
role: "presentation",
|
|
853
|
-
className:
|
|
853
|
+
className: W.subLabel,
|
|
854
854
|
children: e.props.children
|
|
855
855
|
}, e.id) : e.type === "separator" ? /* @__PURE__ */ n("li", {
|
|
856
856
|
role: "separator",
|
|
857
|
-
className:
|
|
857
|
+
className: W.subSeparator,
|
|
858
858
|
"aria-hidden": "true"
|
|
859
|
-
}, e.id) : e.type === "item" ? /* @__PURE__ */ n(
|
|
859
|
+
}, e.id) : e.type === "item" ? /* @__PURE__ */ n(Be, {
|
|
860
860
|
item: e.item,
|
|
861
861
|
id: `${j}-${e.itemIndex}`
|
|
862
862
|
}, e.item.id) : null)
|
|
863
863
|
})] });
|
|
864
864
|
};
|
|
865
|
-
|
|
866
|
-
function
|
|
865
|
+
Re.displayName = "DropdownItemRow";
|
|
866
|
+
function ze(e) {
|
|
867
867
|
let t = !1;
|
|
868
868
|
return {
|
|
869
869
|
originalEvent: e,
|
|
@@ -875,8 +875,8 @@ function Re(e) {
|
|
|
875
875
|
}
|
|
876
876
|
};
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
let i =
|
|
878
|
+
function Be({ id: e, item: t }) {
|
|
879
|
+
let i = Fe(), [a, o] = _(t.type === "checkbox" ? t.props.defaultChecked ?? !1 : !1), s = t.type === "checkbox", c = t.type === "radio", l = s ? t.props.checked ?? a : c ? (t.groupProps?.value ?? i.radioValues[t.groupId]) === t.props.value : !1, u = t.props, d = z(u.children), f = d.icon ?? u.icon, p = d.description ?? ("description" in u ? u.description : void 0), m = d.badge ?? ("badge" in u ? u.badge : void 0), h = d.shortcut ?? u.shortcut, g = d.content.length ? d.content : u.children, v = "color" in u ? u.color : void 0, b = i.loading || t.disabled, x = t.type === "item" ? t.props.href : void 0, S = t.type === "item" ? t.props.target : void 0, C = t.type === "item" ? t.props.download : void 0, w = s ? "menuitemcheckbox" : c ? "menuitemradio" : "menuitem", T = t.type === "item" && S === "_blank" && !t.props.rel ? "noreferrer noopener" : t.type === "item" ? t.props.rel : void 0, E = x ? "a" : "li", D = s || c, O = (e) => {
|
|
880
880
|
if (b) {
|
|
881
881
|
e.preventDefault();
|
|
882
882
|
return;
|
|
@@ -885,7 +885,7 @@ function ze({ id: e, item: t }) {
|
|
|
885
885
|
let e = !l;
|
|
886
886
|
o(e), t.props.onCheckedChange?.(e);
|
|
887
887
|
}
|
|
888
|
-
i.selectItem(t,
|
|
888
|
+
i.selectItem(t, ze(e));
|
|
889
889
|
};
|
|
890
890
|
return /* @__PURE__ */ r(E, {
|
|
891
891
|
id: e,
|
|
@@ -897,74 +897,74 @@ function ze({ id: e, item: t }) {
|
|
|
897
897
|
tabIndex: b ? -1 : 0,
|
|
898
898
|
"aria-disabled": b || void 0,
|
|
899
899
|
"aria-checked": s || c ? l : void 0,
|
|
900
|
-
className: P(
|
|
901
|
-
[
|
|
902
|
-
[
|
|
903
|
-
}, v && v !== "default" ?
|
|
900
|
+
className: P(W.item, W[i.size], {
|
|
901
|
+
[W.disabled]: b,
|
|
902
|
+
[W.checked]: l
|
|
903
|
+
}, v && v !== "default" ? W[v] : void 0),
|
|
904
904
|
onClick: O,
|
|
905
905
|
children: [
|
|
906
906
|
D && /* @__PURE__ */ n("span", {
|
|
907
|
-
className:
|
|
907
|
+
className: W.indicator,
|
|
908
908
|
"aria-hidden": "true",
|
|
909
909
|
children: l ? /* @__PURE__ */ n(y, {}) : null
|
|
910
910
|
}),
|
|
911
911
|
f && /* @__PURE__ */ n("span", {
|
|
912
|
-
className:
|
|
912
|
+
className: W.itemIcon,
|
|
913
913
|
children: f
|
|
914
914
|
}),
|
|
915
915
|
/* @__PURE__ */ r("span", {
|
|
916
|
-
className:
|
|
916
|
+
className: W.itemText,
|
|
917
917
|
children: [/* @__PURE__ */ n("span", {
|
|
918
|
-
className:
|
|
918
|
+
className: W.itemLabel,
|
|
919
919
|
children: g
|
|
920
920
|
}), p && /* @__PURE__ */ n("span", {
|
|
921
|
-
className:
|
|
921
|
+
className: W.itemDescription,
|
|
922
922
|
children: p
|
|
923
923
|
})]
|
|
924
924
|
}),
|
|
925
925
|
m && /* @__PURE__ */ n("span", {
|
|
926
|
-
className:
|
|
926
|
+
className: W.itemBadge,
|
|
927
927
|
children: m
|
|
928
928
|
}),
|
|
929
929
|
h && /* @__PURE__ */ n("span", {
|
|
930
|
-
className:
|
|
930
|
+
className: W.itemShortcut,
|
|
931
931
|
children: h
|
|
932
932
|
})
|
|
933
933
|
]
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
|
-
var
|
|
936
|
+
var Ve = { group: "_group_aviwv_1" }, G = L("label", "Dropdown.Label"), K = ({ children: e, className: t }) => /* @__PURE__ */ n("li", {
|
|
937
937
|
role: "presentation",
|
|
938
|
-
className: P(
|
|
938
|
+
className: P(Ve.group, t),
|
|
939
939
|
children: e
|
|
940
940
|
});
|
|
941
941
|
K.displayName = "DropdownLabelSurface";
|
|
942
942
|
//#endregion
|
|
943
943
|
//#region src/components/Dropdown/Loading/DropdownLoading.tsx
|
|
944
|
-
var
|
|
944
|
+
var He = L("loading", "Dropdown.Loading"), Ue = ({ children: e }) => /* @__PURE__ */ n("li", {
|
|
945
945
|
role: "presentation",
|
|
946
946
|
"aria-live": "polite",
|
|
947
|
-
className:
|
|
947
|
+
className: Te.empty,
|
|
948
948
|
children: e ?? "Loading actions..."
|
|
949
949
|
});
|
|
950
|
-
|
|
951
|
-
var
|
|
950
|
+
Ue.displayName = "DropdownLoadingSurface";
|
|
951
|
+
var We = { separator: "_separator_1v11r_1" }, Ge = L("separator", "Dropdown.Separator"), Ke = ({ className: e }) => /* @__PURE__ */ n("li", {
|
|
952
952
|
role: "separator",
|
|
953
|
-
className: P(
|
|
953
|
+
className: P(We.separator, e),
|
|
954
954
|
"aria-hidden": "true"
|
|
955
955
|
});
|
|
956
|
-
|
|
956
|
+
Ke.displayName = "DropdownSeparatorSurface";
|
|
957
957
|
//#endregion
|
|
958
958
|
//#region src/components/Dropdown/Content/DropdownContent.tsx
|
|
959
|
-
var
|
|
960
|
-
let t =
|
|
959
|
+
var qe = ({ className: e }) => {
|
|
960
|
+
let t = Fe(), { contentReadyToFocus: i, isOpen: o, setContentRef: s } = t, c = g(null), l = u((e) => {
|
|
961
961
|
c.current = e, s(e);
|
|
962
962
|
}, [s]);
|
|
963
963
|
if (f(() => {
|
|
964
964
|
let e = c.current;
|
|
965
965
|
!o || !i || !e || e.contains(document.activeElement) || e.focus({ preventScroll: !0 });
|
|
966
966
|
}, [i, o]), !o) return null;
|
|
967
|
-
let d = P(
|
|
967
|
+
let d = P(Te.dropdown, Te[t.color], t.contentProps?.className, e), p = /* @__PURE__ */ r("ul", {
|
|
968
968
|
ref: l,
|
|
969
969
|
id: t.contentId,
|
|
970
970
|
role: "menu",
|
|
@@ -981,9 +981,9 @@ var Ke = ({ className: e }) => {
|
|
|
981
981
|
"data-color": t.color,
|
|
982
982
|
children: [t.searchable && /* @__PURE__ */ r("li", {
|
|
983
983
|
role: "presentation",
|
|
984
|
-
className: P(
|
|
984
|
+
className: P(Te.searchWrap, t.searchProps?.className),
|
|
985
985
|
children: [/* @__PURE__ */ n(C, { "aria-hidden": "true" }), /* @__PURE__ */ n("input", {
|
|
986
|
-
className:
|
|
986
|
+
className: Te.search,
|
|
987
987
|
value: t.searchValue,
|
|
988
988
|
placeholder: t.searchPlaceholder,
|
|
989
989
|
"aria-label": t.searchProps?.["aria-label"] ?? t.searchPlaceholder,
|
|
@@ -993,17 +993,17 @@ var Ke = ({ className: e }) => {
|
|
|
993
993
|
e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Enter" || e.key === "Escape" || e.stopPropagation();
|
|
994
994
|
}
|
|
995
995
|
})]
|
|
996
|
-
}), t.loading ? /* @__PURE__ */ n(
|
|
996
|
+
}), t.loading ? /* @__PURE__ */ n(Ue, { children: t.loadingText }) : t.searchable && t.items.length === 0 ? /* @__PURE__ */ n(De, { children: t.empty }) : t.entries.length ? t.entries.map((e) => e.type === "groupStart" ? /* @__PURE__ */ n(ke, {}, e.id) : e.type === "groupEnd" ? null : e.type === "label" ? /* @__PURE__ */ n(K, { ...e.props }, e.id) : e.type === "separator" ? /* @__PURE__ */ n(Ke, { ...e.props }, e.id) : e.type === "empty" ? /* @__PURE__ */ n(De, { children: e.props.children }, e.id) : e.type === "loading" ? /* @__PURE__ */ n(Ue, { children: e.props.children }, e.id) : e.type === "arrow" ? /* @__PURE__ */ n(I, { ...e.props }, e.id) : /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n(Re, {
|
|
997
997
|
item: e.item,
|
|
998
998
|
itemIndex: e.itemIndex
|
|
999
999
|
}) }, e.item.id)) : /* @__PURE__ */ n(De, {})]
|
|
1000
1000
|
});
|
|
1001
|
-
return t.portal ? /* @__PURE__ */ n(
|
|
1001
|
+
return t.portal ? /* @__PURE__ */ n(we, { children: p }) : p;
|
|
1002
1002
|
};
|
|
1003
|
-
|
|
1003
|
+
qe.__velliraDropdownPart = "content", qe.displayName = "Dropdown.Content";
|
|
1004
1004
|
//#endregion
|
|
1005
1005
|
//#region src/components/Dropdown/ItemBadge/DropdownItemBadge.tsx
|
|
1006
|
-
var
|
|
1006
|
+
var Je = L("itemBadge", "Dropdown.ItemBadge"), Ye = L("itemDescription", "Dropdown.ItemDescription"), Xe = L("itemIcon", "Dropdown.ItemIcon"), Ze = L("itemShortcut", "Dropdown.ItemShortcut"), Qe = L("radioGroup", "Dropdown.RadioGroup"), $e = L("radioItem", "Dropdown.RadioItem"), et = (e) => {
|
|
1007
1007
|
let [t, n] = _(() => typeof window > "u" || typeof window.matchMedia != "function" || !e ? !1 : window.matchMedia(`(max-width: ${e}px)`).matches);
|
|
1008
1008
|
return f(() => {
|
|
1009
1009
|
if (typeof window > "u" || typeof window.matchMedia != "function" || !e) return;
|
|
@@ -1012,8 +1012,8 @@ var qe = L("itemBadge", "Dropdown.ItemBadge"), Je = L("itemDescription", "Dropdo
|
|
|
1012
1012
|
t.removeEventListener("change", r);
|
|
1013
1013
|
};
|
|
1014
1014
|
}, [e]), t;
|
|
1015
|
-
},
|
|
1016
|
-
let u =
|
|
1015
|
+
}, tt = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r = "fixed", offset: i = 2, collisionPadding: a = 8, matchTriggerWidth: o = !1, avoidCollisions: s = !0, mobileSheetBreakpoint: c, middleware: l = [] } = {}) => {
|
|
1016
|
+
let u = et(c), { refs: d, floatingStyles: p, isPositioned: m, update: g, context: _, middlewareData: v, placement: y } = A({
|
|
1017
1017
|
open: e,
|
|
1018
1018
|
onOpenChange: t,
|
|
1019
1019
|
placement: n,
|
|
@@ -1056,12 +1056,12 @@ var qe = L("itemBadge", "Dropdown.ItemBadge"), Je = L("itemDescription", "Dropdo
|
|
|
1056
1056
|
};
|
|
1057
1057
|
//#endregion
|
|
1058
1058
|
//#region src/components/Dropdown/internal/composeEventHandlers.ts
|
|
1059
|
-
function
|
|
1059
|
+
function nt(e, t) {
|
|
1060
1060
|
return (n) => {
|
|
1061
1061
|
e?.(n), n.defaultPrevented || t(n);
|
|
1062
1062
|
};
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function rt(...e) {
|
|
1065
1065
|
return (t) => {
|
|
1066
1066
|
e.forEach((e) => {
|
|
1067
1067
|
if (e) {
|
|
@@ -1074,40 +1074,40 @@ function nt(...e) {
|
|
|
1074
1074
|
});
|
|
1075
1075
|
};
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1077
|
+
function it(e) {
|
|
1078
1078
|
return typeof e == "number" ? `${e}px` : e;
|
|
1079
1079
|
}
|
|
1080
|
-
var
|
|
1081
|
-
let z = p(), ee = `${z}-trigger`, B = `${z}-menu`, te = g(null), ne = g(null), [re, ie] = _(), [ae, oe] = _({}), [
|
|
1080
|
+
var at = { wrapper: "_wrapper_14ue8_1" }, ot = ({ children: e, open: t, defaultOpen: i = !1, onOpenChange: a, size: o = "md", color: s = "primary", placement: c = "bottom-start", strategy: l, offset: d = 2, collisionPadding: m = 8, matchTriggerWidth: v = !1, minWidth: y, maxWidth: b, portal: x = !0, avoidCollisions: S = !0, modal: C = !1, closeOnSelect: w = !0, loop: T = !0, disabled: E = !1, loading: D = !1, loadingText: O = "Loading actions...", searchable: k = !1, command: A = !1, searchValue: j, defaultSearchValue: M = "", searchPlaceholder: N, onSearch: F, empty: I, className: L }) => {
|
|
1081
|
+
let z = p(), ee = `${z}-trigger`, B = `${z}-menu`, te = g(null), ne = g(null), [re, ie] = _(), [ae, oe] = _({}), [V, se] = _(M), le = j ?? V, H = h(() => R(e), [e]), de = H.content?.props.command ?? !1, fe = k || A || de || !!H.search, pe = h(() => ct(H.items), [H.items]), he = h(() => H.items.map((e) => ({
|
|
1082
1082
|
disabled: e.disabled,
|
|
1083
1083
|
label: e.label
|
|
1084
|
-
})), [
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
]),
|
|
1084
|
+
})), [H.items]), ge = h(() => !fe || !le.trim() ? H : lt(H, le), [
|
|
1085
|
+
fe,
|
|
1086
|
+
H,
|
|
1087
|
+
le
|
|
1088
|
+
]), _e = h(() => ge.items.map((e) => ({
|
|
1089
1089
|
disabled: e.disabled,
|
|
1090
1090
|
label: e.label
|
|
1091
|
-
})), [
|
|
1091
|
+
})), [ge.items]);
|
|
1092
1092
|
f(() => {
|
|
1093
1093
|
oe((e) => {
|
|
1094
1094
|
let t = { ...e };
|
|
1095
|
-
return
|
|
1095
|
+
return pe.forEach((e) => {
|
|
1096
1096
|
e.type === "radio" && t[e.groupId] === void 0 && (t[e.groupId] = e.groupProps?.value ?? e.groupProps?.defaultValue);
|
|
1097
1097
|
}), t;
|
|
1098
1098
|
});
|
|
1099
|
-
}, [
|
|
1100
|
-
let { activeIndex:
|
|
1101
|
-
items:
|
|
1099
|
+
}, [pe]);
|
|
1100
|
+
let { activeIndex: ve, setActiveIndex: be, isOpen: xe, closeDropdown: U, toggleDropdown: Se, onKeyDown: Ce } = ye({
|
|
1101
|
+
items: fe ? _e : he,
|
|
1102
1102
|
open: t,
|
|
1103
1103
|
defaultOpen: i,
|
|
1104
1104
|
disabled: E,
|
|
1105
1105
|
onOpenChange: a,
|
|
1106
|
-
getItemValue: (e, t) => (
|
|
1106
|
+
getItemValue: (e, t) => (fe ? ge.items : H.items)[t]?.id ?? "",
|
|
1107
1107
|
getItemText: (e) => e.label,
|
|
1108
1108
|
loop: T
|
|
1109
|
-
}), { floatingStyles:
|
|
1110
|
-
open:
|
|
1109
|
+
}), { floatingStyles: we, isMobileSheet: Te, isPositioned: Ee, setRef: De, setFloatingRef: Oe } = tt({
|
|
1110
|
+
open: xe,
|
|
1111
1111
|
placement: c,
|
|
1112
1112
|
strategy: l ?? (x ? "fixed" : "absolute"),
|
|
1113
1113
|
matchTriggerWidth: v,
|
|
@@ -1116,22 +1116,22 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
|
|
|
1116
1116
|
collisionPadding: m,
|
|
1117
1117
|
mobileSheetBreakpoint: 640
|
|
1118
1118
|
}), ke = u((e) => {
|
|
1119
|
-
j === void 0 &&
|
|
1119
|
+
j === void 0 && se(e), F?.(e), be(0);
|
|
1120
1120
|
}, [
|
|
1121
1121
|
F,
|
|
1122
1122
|
j,
|
|
1123
|
-
|
|
1124
|
-
]), { isTopOverlay: Ae } =
|
|
1125
|
-
active:
|
|
1123
|
+
be
|
|
1124
|
+
]), { isTopOverlay: Ae } = ue({
|
|
1125
|
+
active: xe,
|
|
1126
1126
|
id: B
|
|
1127
1127
|
});
|
|
1128
|
-
|
|
1129
|
-
active:
|
|
1128
|
+
me({
|
|
1129
|
+
active: xe,
|
|
1130
1130
|
enabled: C
|
|
1131
1131
|
});
|
|
1132
1132
|
let je = u(() => {
|
|
1133
|
-
|
|
1134
|
-
}, [
|
|
1133
|
+
U(), te.current?.focus();
|
|
1134
|
+
}, [U]), Me = u((e, t) => {
|
|
1135
1135
|
if (e.disabled || D) return;
|
|
1136
1136
|
if (e.type === "subTrigger") {
|
|
1137
1137
|
ie(e.id);
|
|
@@ -1147,8 +1147,8 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
|
|
|
1147
1147
|
je,
|
|
1148
1148
|
w,
|
|
1149
1149
|
D
|
|
1150
|
-
]),
|
|
1151
|
-
let t =
|
|
1150
|
+
]), Fe = u((e) => {
|
|
1151
|
+
let t = ge.items[ve];
|
|
1152
1152
|
if (e.key === "ArrowRight" && t?.type === "subTrigger") {
|
|
1153
1153
|
e.preventDefault(), ie(t.id);
|
|
1154
1154
|
return;
|
|
@@ -1159,77 +1159,77 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
|
|
|
1159
1159
|
}
|
|
1160
1160
|
if ((e.key === "Enter" || e.key === " ") && t) {
|
|
1161
1161
|
e.preventDefault();
|
|
1162
|
-
let n =
|
|
1162
|
+
let n = st(e);
|
|
1163
1163
|
Me(t, n);
|
|
1164
1164
|
return;
|
|
1165
1165
|
}
|
|
1166
|
-
|
|
1166
|
+
Ce(e), e.key === "Escape" && te.current?.focus();
|
|
1167
1167
|
}, [
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1168
|
+
ve,
|
|
1169
|
+
ge.items,
|
|
1170
|
+
Ce,
|
|
1171
1171
|
re,
|
|
1172
1172
|
Me
|
|
1173
|
-
]),
|
|
1174
|
-
e.preventDefault(),
|
|
1175
|
-
}, [
|
|
1173
|
+
]), Ie = u((e) => {
|
|
1174
|
+
e.preventDefault(), Se();
|
|
1175
|
+
}, [Se]), W = u((e) => {
|
|
1176
1176
|
te.current = e, De(e);
|
|
1177
|
-
}, [De]),
|
|
1178
|
-
ne.current = e, Oe(e),
|
|
1179
|
-
}, [
|
|
1180
|
-
|
|
1181
|
-
active:
|
|
1177
|
+
}, [De]), Le = u((e) => {
|
|
1178
|
+
ne.current = e, Oe(e), Te && e?.focus({ preventScroll: !0 });
|
|
1179
|
+
}, [Te, Oe]);
|
|
1180
|
+
ce({
|
|
1181
|
+
active: xe,
|
|
1182
1182
|
closeOnEscape: !0,
|
|
1183
1183
|
closeOnOutsidePress: !0,
|
|
1184
1184
|
contentRef: ne,
|
|
1185
1185
|
ignoreRefs: [te],
|
|
1186
1186
|
isTopOverlay: Ae,
|
|
1187
|
-
requestClose:
|
|
1187
|
+
requestClose: U
|
|
1188
1188
|
});
|
|
1189
|
-
let
|
|
1190
|
-
...
|
|
1191
|
-
minWidth:
|
|
1192
|
-
maxWidth:
|
|
1189
|
+
let Re = {
|
|
1190
|
+
...we,
|
|
1191
|
+
minWidth: it(y),
|
|
1192
|
+
maxWidth: it(b)
|
|
1193
1193
|
};
|
|
1194
1194
|
return /* @__PURE__ */ n(Pe, {
|
|
1195
1195
|
value: {
|
|
1196
1196
|
disabled: E,
|
|
1197
|
-
isOpen:
|
|
1197
|
+
isOpen: xe,
|
|
1198
1198
|
contentId: B,
|
|
1199
1199
|
triggerId: ee,
|
|
1200
|
-
setTriggerRef:
|
|
1201
|
-
onClick:
|
|
1202
|
-
onKeyDown:
|
|
1200
|
+
setTriggerRef: W,
|
|
1201
|
+
onClick: Ie,
|
|
1202
|
+
onKeyDown: Fe
|
|
1203
1203
|
},
|
|
1204
1204
|
children: /* @__PURE__ */ n(Ne, {
|
|
1205
1205
|
value: {
|
|
1206
|
-
activeIndex:
|
|
1206
|
+
activeIndex: ve,
|
|
1207
1207
|
closeOnSelect: w,
|
|
1208
1208
|
color: s,
|
|
1209
|
-
contentReadyToFocus:
|
|
1209
|
+
contentReadyToFocus: Te || Ee,
|
|
1210
1210
|
contentId: B,
|
|
1211
|
-
contentProps:
|
|
1211
|
+
contentProps: H.content?.props,
|
|
1212
1212
|
disabled: E,
|
|
1213
|
-
entries:
|
|
1213
|
+
entries: ge.entries,
|
|
1214
1214
|
getItemId: (e) => `${B}-item-${e}`,
|
|
1215
|
-
isOpen:
|
|
1216
|
-
items:
|
|
1215
|
+
isOpen: xe,
|
|
1216
|
+
items: ge.items,
|
|
1217
1217
|
loading: D,
|
|
1218
1218
|
loadingText: O,
|
|
1219
1219
|
empty: I,
|
|
1220
1220
|
maxWidth: b,
|
|
1221
1221
|
minWidth: y,
|
|
1222
1222
|
openSubId: re,
|
|
1223
|
-
onKeyDown:
|
|
1224
|
-
portal: !
|
|
1223
|
+
onKeyDown: Fe,
|
|
1224
|
+
portal: !H.portal && x,
|
|
1225
1225
|
radioValues: ae,
|
|
1226
|
-
searchPlaceholder:
|
|
1227
|
-
searchProps:
|
|
1228
|
-
searchValue:
|
|
1229
|
-
searchable:
|
|
1226
|
+
searchPlaceholder: H.search?.props.placeholder ?? N ?? (A || de ? "Type a command..." : "Search actions..."),
|
|
1227
|
+
searchProps: H.search?.props,
|
|
1228
|
+
searchValue: le,
|
|
1229
|
+
searchable: fe,
|
|
1230
1230
|
selectItem: Me,
|
|
1231
|
-
setActiveIndex:
|
|
1232
|
-
setContentRef:
|
|
1231
|
+
setActiveIndex: be,
|
|
1232
|
+
setContentRef: Le,
|
|
1233
1233
|
setOpenSubId: ie,
|
|
1234
1234
|
setRadioValue: (e, t) => {
|
|
1235
1235
|
oe((n) => ({
|
|
@@ -1239,19 +1239,19 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
|
|
|
1239
1239
|
},
|
|
1240
1240
|
setSearchValue: ke,
|
|
1241
1241
|
size: o,
|
|
1242
|
-
surfaceStyle:
|
|
1242
|
+
surfaceStyle: Re,
|
|
1243
1243
|
triggerId: ee
|
|
1244
1244
|
},
|
|
1245
1245
|
children: /* @__PURE__ */ r("div", {
|
|
1246
|
-
className: P(
|
|
1246
|
+
className: P(at.wrapper, L),
|
|
1247
1247
|
"data-disabled": E || void 0,
|
|
1248
|
-
children: [
|
|
1248
|
+
children: [H.trigger ?? null, H.portal ?? H.content ?? /* @__PURE__ */ n(qe, {})]
|
|
1249
1249
|
})
|
|
1250
1250
|
})
|
|
1251
1251
|
});
|
|
1252
1252
|
};
|
|
1253
|
-
|
|
1254
|
-
function
|
|
1253
|
+
ot.displayName = "DropdownRoot";
|
|
1254
|
+
function st(e) {
|
|
1255
1255
|
let t = !1;
|
|
1256
1256
|
return {
|
|
1257
1257
|
originalEvent: e,
|
|
@@ -1263,13 +1263,13 @@ function ot(e) {
|
|
|
1263
1263
|
}
|
|
1264
1264
|
};
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function ct(e) {
|
|
1267
1267
|
let t = [];
|
|
1268
1268
|
return e.forEach((e) => {
|
|
1269
|
-
t.push(e), e.type === "subTrigger" && t.push(...
|
|
1269
|
+
t.push(e), e.type === "subTrigger" && t.push(...ct(e.subItems));
|
|
1270
1270
|
}), t;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function lt(e, t) {
|
|
1273
1273
|
let n = t.trim().toLocaleLowerCase(), r = new Set(e.items.filter((e) => e.label.toLocaleLowerCase().includes(n)).map((e) => e.id)), i = e.items.filter((e) => r.has(e.id));
|
|
1274
1274
|
return {
|
|
1275
1275
|
...e,
|
|
@@ -1279,7 +1279,7 @@ function ct(e, t) {
|
|
|
1279
1279
|
}
|
|
1280
1280
|
//#endregion
|
|
1281
1281
|
//#region src/components/Dropdown/Search/DropdownSearch.tsx
|
|
1282
|
-
var
|
|
1282
|
+
var ut = L("search", "Dropdown.Search"), dt = L("subContent", "Dropdown.SubContent"), ft = L("subTrigger", "Dropdown.SubTrigger"), pt = L("sub", "Dropdown.Sub"), mt = {
|
|
1283
1283
|
button: "_button_bb3ib_1",
|
|
1284
1284
|
disabled: "_disabled_bb3ib_63",
|
|
1285
1285
|
arrow: "_arrow_bb3ib_71",
|
|
@@ -1295,21 +1295,21 @@ var lt = L("search", "Dropdown.Search"), ut = L("subContent", "Dropdown.SubConte
|
|
|
1295
1295
|
lg: "_lg_bb3ib_350",
|
|
1296
1296
|
label: "_label_bb3ib_362",
|
|
1297
1297
|
open: "_open_bb3ib_390"
|
|
1298
|
-
},
|
|
1299
|
-
|
|
1300
|
-
var
|
|
1301
|
-
let s =
|
|
1298
|
+
}, ht = (e) => /* @__PURE__ */ n(gt, { ...e });
|
|
1299
|
+
ht.__velliraDropdownPart = "trigger", ht.displayName = "Dropdown.Trigger";
|
|
1300
|
+
var gt = ({ children: e, asChild: t = !1, disabled: i, className: a }) => {
|
|
1301
|
+
let s = Fe(), c = Ie(), u = t && l(e) ? e : void 0, d = s.disabled || i, f = {
|
|
1302
1302
|
id: c.triggerId,
|
|
1303
|
-
ref: u ?
|
|
1303
|
+
ref: u ? rt(u.props.ref, c.setTriggerRef) : c.setTriggerRef,
|
|
1304
1304
|
"aria-controls": c.isOpen ? c.contentId : void 0,
|
|
1305
1305
|
"aria-disabled": d || void 0,
|
|
1306
1306
|
"aria-expanded": c.isOpen,
|
|
1307
1307
|
"aria-haspopup": "menu",
|
|
1308
|
-
className: P(!u &&
|
|
1308
|
+
className: P(!u && mt.button, !u && mt[s.size], !u && mt[s.color], a),
|
|
1309
1309
|
"data-state": c.isOpen ? "open" : "closed",
|
|
1310
1310
|
disabled: d || void 0,
|
|
1311
|
-
onClick:
|
|
1312
|
-
onKeyDown:
|
|
1311
|
+
onClick: nt(u?.props.onClick, c.onClick),
|
|
1312
|
+
onKeyDown: nt(u?.props.onKeyDown, c.onKeyDown)
|
|
1313
1313
|
};
|
|
1314
1314
|
return u ? o(u, {
|
|
1315
1315
|
...f,
|
|
@@ -1318,68 +1318,68 @@ var ht = ({ children: e, asChild: t = !1, disabled: i, className: a }) => {
|
|
|
1318
1318
|
type: "button",
|
|
1319
1319
|
...f,
|
|
1320
1320
|
children: [/* @__PURE__ */ n("span", {
|
|
1321
|
-
className:
|
|
1321
|
+
className: mt.label,
|
|
1322
1322
|
children: e
|
|
1323
1323
|
}), /* @__PURE__ */ n("span", {
|
|
1324
|
-
className: P(
|
|
1324
|
+
className: P(mt.arrow, { [mt.open]: c.isOpen }),
|
|
1325
1325
|
"aria-hidden": "true",
|
|
1326
1326
|
children: /* @__PURE__ */ n(b, {})
|
|
1327
1327
|
})]
|
|
1328
1328
|
});
|
|
1329
1329
|
};
|
|
1330
|
-
|
|
1330
|
+
gt.displayName = "DropdownTriggerSurface";
|
|
1331
1331
|
//#endregion
|
|
1332
1332
|
//#region src/components/Dropdown/Dropdown.tsx
|
|
1333
|
-
var
|
|
1334
|
-
Trigger:
|
|
1335
|
-
Content:
|
|
1336
|
-
Search:
|
|
1337
|
-
Item:
|
|
1333
|
+
var _t = Object.assign(ot, {
|
|
1334
|
+
Trigger: ht,
|
|
1335
|
+
Content: qe,
|
|
1336
|
+
Search: ut,
|
|
1337
|
+
Item: Le,
|
|
1338
1338
|
CheckboxItem: te,
|
|
1339
|
-
RadioGroup:
|
|
1340
|
-
RadioItem:
|
|
1339
|
+
RadioGroup: Qe,
|
|
1340
|
+
RadioItem: $e,
|
|
1341
1341
|
Group: Oe,
|
|
1342
|
-
Label:
|
|
1343
|
-
Separator:
|
|
1344
|
-
Sub:
|
|
1345
|
-
SubTrigger:
|
|
1346
|
-
SubContent:
|
|
1347
|
-
ItemIcon:
|
|
1348
|
-
ItemDescription:
|
|
1349
|
-
ItemBadge:
|
|
1350
|
-
ItemShortcut:
|
|
1342
|
+
Label: G,
|
|
1343
|
+
Separator: Ge,
|
|
1344
|
+
Sub: pt,
|
|
1345
|
+
SubTrigger: ft,
|
|
1346
|
+
SubContent: dt,
|
|
1347
|
+
ItemIcon: Xe,
|
|
1348
|
+
ItemDescription: Ye,
|
|
1349
|
+
ItemBadge: Je,
|
|
1350
|
+
ItemShortcut: Ze,
|
|
1351
1351
|
Arrow: I,
|
|
1352
1352
|
Empty: Ee,
|
|
1353
|
-
Loading:
|
|
1353
|
+
Loading: He
|
|
1354
1354
|
});
|
|
1355
|
-
|
|
1355
|
+
_t.displayName = "Dropdown";
|
|
1356
1356
|
//#endregion
|
|
1357
1357
|
//#region src/components/Modal/internal/ModalContext.tsx
|
|
1358
|
-
var
|
|
1359
|
-
let e = d(
|
|
1358
|
+
var vt = s(void 0), yt = s(void 0), bt = () => {
|
|
1359
|
+
let e = d(vt);
|
|
1360
1360
|
if (e === void 0) throw Error("Modal compound components must be used inside Modal");
|
|
1361
1361
|
return e;
|
|
1362
|
-
},
|
|
1363
|
-
|
|
1364
|
-
var
|
|
1362
|
+
}, xt = () => d(yt), St = vt.Provider, Ct = yt.Provider;
|
|
1363
|
+
vt.displayName = "ModalContext", yt.displayName = "ModalContentContext";
|
|
1364
|
+
var wt = {
|
|
1365
1365
|
modalBody: "_modalBody_ou4ff_1",
|
|
1366
1366
|
inside: "_inside_ou4ff_6"
|
|
1367
|
-
},
|
|
1368
|
-
let r =
|
|
1367
|
+
}, Tt = ({ children: e, className: t }) => {
|
|
1368
|
+
let r = xt();
|
|
1369
1369
|
return /* @__PURE__ */ n("div", {
|
|
1370
|
-
className: P(
|
|
1370
|
+
className: P(wt.modalBody, r?.scrollBehavior === "inside" && wt.inside, t),
|
|
1371
1371
|
children: e
|
|
1372
1372
|
});
|
|
1373
1373
|
};
|
|
1374
|
-
|
|
1374
|
+
Tt.displayName = "ModalBody";
|
|
1375
1375
|
//#endregion
|
|
1376
1376
|
//#region src/components/Modal/internal/composeEventHandlers.ts
|
|
1377
|
-
function
|
|
1377
|
+
function Et(e, t) {
|
|
1378
1378
|
return (n) => {
|
|
1379
1379
|
e?.(n), n.defaultPrevented || t(n);
|
|
1380
1380
|
};
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1382
|
+
function Dt(...e) {
|
|
1383
1383
|
return (t) => {
|
|
1384
1384
|
e.forEach((e) => {
|
|
1385
1385
|
if (e) {
|
|
@@ -1392,17 +1392,17 @@ function Et(...e) {
|
|
|
1392
1392
|
});
|
|
1393
1393
|
};
|
|
1394
1394
|
}
|
|
1395
|
-
var
|
|
1395
|
+
var Ot = {
|
|
1396
1396
|
modalHeader: "_modalHeader_hw9hl_1",
|
|
1397
1397
|
modalHeaderText: "_modalHeaderText_hw9hl_8",
|
|
1398
1398
|
modalHeaderTitle: "_modalHeaderTitle_hw9hl_13",
|
|
1399
1399
|
modalHeaderDescription: "_modalHeaderDescription_hw9hl_20",
|
|
1400
1400
|
modalHeaderCloseButton: "_modalHeaderCloseButton_hw9hl_26"
|
|
1401
|
-
},
|
|
1402
|
-
let a =
|
|
1401
|
+
}, kt = ({ asChild: e = !1, children: t, className: r, "aria-label": i }) => {
|
|
1402
|
+
let a = bt(), s = e && l(t) ? t : void 0, c = {
|
|
1403
1403
|
"aria-label": s ? i : i ?? "Close dialog",
|
|
1404
|
-
className: P(!s &&
|
|
1405
|
-
onClick:
|
|
1404
|
+
className: P(!s && Ot.modalHeaderCloseButton, r),
|
|
1405
|
+
onClick: Et(s?.props.onClick, a.requestClose)
|
|
1406
1406
|
};
|
|
1407
1407
|
return s ? o(s, {
|
|
1408
1408
|
...c,
|
|
@@ -1414,11 +1414,11 @@ var Dt = {
|
|
|
1414
1414
|
children: /* @__PURE__ */ n(S, { size: 16 })
|
|
1415
1415
|
});
|
|
1416
1416
|
};
|
|
1417
|
-
|
|
1417
|
+
kt.displayName = "Modal.Close";
|
|
1418
1418
|
//#endregion
|
|
1419
1419
|
//#region src/components/Modal/internal/useModalDismiss.ts
|
|
1420
|
-
var
|
|
1421
|
-
|
|
1420
|
+
var At = ({ active: e, contentRef: t, closeOnEscape: n, closeOnOutsidePress: r, isTopModal: i, onEscapeKeyDown: a, onPointerDownOutside: o, onInteractOutside: s, requestClose: c }) => {
|
|
1421
|
+
ce({
|
|
1422
1422
|
active: e,
|
|
1423
1423
|
closeOnOutsidePress: r,
|
|
1424
1424
|
closeOnEscape: n,
|
|
@@ -1429,7 +1429,7 @@ var kt = ({ active: e, contentRef: t, closeOnEscape: n, closeOnOutsidePress: r,
|
|
|
1429
1429
|
onPointerDownOutside: o ? (e) => o(e) : void 0,
|
|
1430
1430
|
requestClose: c
|
|
1431
1431
|
});
|
|
1432
|
-
},
|
|
1432
|
+
}, jt = {
|
|
1433
1433
|
content: "_content_15uod_1",
|
|
1434
1434
|
animated: "_animated_15uod_23",
|
|
1435
1435
|
center: "_center_15uod_30",
|
|
@@ -1441,11 +1441,11 @@ var kt = ({ active: e, contentRef: t, closeOnEscape: n, closeOnOutsidePress: r,
|
|
|
1441
1441
|
full: "_full_15uod_64",
|
|
1442
1442
|
inside: "_inside_15uod_70",
|
|
1443
1443
|
outside: "_outside_15uod_74"
|
|
1444
|
-
},
|
|
1445
|
-
let p =
|
|
1444
|
+
}, Mt = ({ children: e, size: t = "md", placement: r = "center", scrollBehavior: i = "inside", animated: a = !0, forceMount: o = !1, ariaLabel: s, ariaLabelledBy: c, ariaDescribedBy: l, className: d, style: f }) => {
|
|
1445
|
+
let p = bt(), m = p.open, [h, g] = _(null), v = u((e) => {
|
|
1446
1446
|
p.setContentRef(e), g(e);
|
|
1447
1447
|
}, [p]);
|
|
1448
|
-
if (
|
|
1448
|
+
if (At({
|
|
1449
1449
|
active: m,
|
|
1450
1450
|
contentRef: p.contentRef,
|
|
1451
1451
|
closeOnEscape: p.closeOnEscape,
|
|
@@ -1455,7 +1455,7 @@ var kt = ({ active: e, contentRef: t, closeOnEscape: n, closeOnOutsidePress: r,
|
|
|
1455
1455
|
onInteractOutside: p.onInteractOutside,
|
|
1456
1456
|
onPointerDownOutside: p.onPointerDownOutside,
|
|
1457
1457
|
requestClose: p.requestClose
|
|
1458
|
-
}),
|
|
1458
|
+
}), se({
|
|
1459
1459
|
active: m,
|
|
1460
1460
|
contentRef: p.contentRef,
|
|
1461
1461
|
enabled: p.trapFocus,
|
|
@@ -1470,13 +1470,13 @@ var kt = ({ active: e, contentRef: t, closeOnEscape: n, closeOnOutsidePress: r,
|
|
|
1470
1470
|
enabled: p.modal
|
|
1471
1471
|
}), !m && !o) return null;
|
|
1472
1472
|
let y = c ?? (s ? void 0 : p.titleId), b = l ?? p.descriptionId;
|
|
1473
|
-
return /* @__PURE__ */ n(
|
|
1473
|
+
return /* @__PURE__ */ n(Ct, {
|
|
1474
1474
|
value: { scrollBehavior: i },
|
|
1475
1475
|
children: /* @__PURE__ */ n("div", {
|
|
1476
1476
|
id: p.contentId,
|
|
1477
|
-
ref:
|
|
1477
|
+
ref: Dt(v),
|
|
1478
1478
|
tabIndex: -1,
|
|
1479
|
-
className: P(
|
|
1479
|
+
className: P(jt.content, jt[t], jt[r], jt[i], a && jt.animated, d),
|
|
1480
1480
|
style: f,
|
|
1481
1481
|
role: p.role,
|
|
1482
1482
|
"aria-modal": p.modal ? "true" : void 0,
|
|
@@ -1488,64 +1488,64 @@ var kt = ({ active: e, contentRef: t, closeOnEscape: n, closeOnOutsidePress: r,
|
|
|
1488
1488
|
})
|
|
1489
1489
|
});
|
|
1490
1490
|
};
|
|
1491
|
-
|
|
1492
|
-
var
|
|
1493
|
-
className: P(
|
|
1491
|
+
Mt.displayName = "ModalContent";
|
|
1492
|
+
var Nt = { modalFooter: "_modalFooter_sb1pn_1" }, Pt = ({ children: e, className: t }) => /* @__PURE__ */ n("div", {
|
|
1493
|
+
className: P(Nt.modalFooter, t),
|
|
1494
1494
|
children: e
|
|
1495
1495
|
});
|
|
1496
|
-
|
|
1496
|
+
Pt.displayName = "ModalFooter";
|
|
1497
1497
|
//#endregion
|
|
1498
1498
|
//#region src/components/Modal/Header/ModalDescription.tsx
|
|
1499
|
-
var
|
|
1500
|
-
let { descriptionId: t, setDescriptionPresent: r } =
|
|
1499
|
+
var Ft = ({ children: e }) => {
|
|
1500
|
+
let { descriptionId: t, setDescriptionPresent: r } = bt();
|
|
1501
1501
|
return f(() => (r(!0), () => r(!1)), [r]), /* @__PURE__ */ n("p", {
|
|
1502
1502
|
id: t,
|
|
1503
|
-
className:
|
|
1503
|
+
className: Ot.modalHeaderDescription,
|
|
1504
1504
|
children: e
|
|
1505
1505
|
});
|
|
1506
1506
|
};
|
|
1507
|
-
|
|
1507
|
+
Ft.displayName = "Modal.Description";
|
|
1508
1508
|
//#endregion
|
|
1509
1509
|
//#region src/components/Modal/Header/ModalTitle.tsx
|
|
1510
|
-
var
|
|
1511
|
-
let { setTitlePresent: t, titleId: r } =
|
|
1510
|
+
var It = ({ children: e }) => {
|
|
1511
|
+
let { setTitlePresent: t, titleId: r } = bt();
|
|
1512
1512
|
return f(() => (t(!0), () => t(!1)), [t]), /* @__PURE__ */ n("h2", {
|
|
1513
1513
|
id: r,
|
|
1514
|
-
className:
|
|
1514
|
+
className: Ot.modalHeaderTitle,
|
|
1515
1515
|
children: e
|
|
1516
1516
|
});
|
|
1517
1517
|
};
|
|
1518
|
-
|
|
1518
|
+
It.displayName = "Modal.Title";
|
|
1519
1519
|
//#endregion
|
|
1520
1520
|
//#region src/components/Modal/Header/ModalHeader.tsx
|
|
1521
|
-
var
|
|
1521
|
+
var Lt = ({ children: e, title: t, description: i, showClose: a = !1, className: o }) => {
|
|
1522
1522
|
let s = t !== void 0 || i !== void 0;
|
|
1523
1523
|
return /* @__PURE__ */ r("div", {
|
|
1524
|
-
className: P(
|
|
1524
|
+
className: P(Ot.modalHeader, o),
|
|
1525
1525
|
children: [s ? /* @__PURE__ */ r("div", {
|
|
1526
|
-
className:
|
|
1527
|
-
children: [t !== void 0 && /* @__PURE__ */ n(
|
|
1528
|
-
}) : e, a && /* @__PURE__ */ n(
|
|
1526
|
+
className: Ot.modalHeaderText,
|
|
1527
|
+
children: [t !== void 0 && /* @__PURE__ */ n(It, { children: t }), i !== void 0 && /* @__PURE__ */ n(Ft, { children: i })]
|
|
1528
|
+
}) : e, a && /* @__PURE__ */ n(kt, {})]
|
|
1529
1529
|
});
|
|
1530
1530
|
};
|
|
1531
|
-
|
|
1532
|
-
var
|
|
1531
|
+
Lt.displayName = "ModalHeader";
|
|
1532
|
+
var Rt = {
|
|
1533
1533
|
overlay: "_overlay_57sfi_1",
|
|
1534
1534
|
"overlay--open": "_overlay--open_57sfi_11",
|
|
1535
1535
|
"overlay--animated": "_overlay--animated_57sfi_18"
|
|
1536
|
-
},
|
|
1537
|
-
let { open: i } =
|
|
1536
|
+
}, zt = ({ className: e, animated: t = !0, forceMount: r = !1 }) => {
|
|
1537
|
+
let { open: i } = bt();
|
|
1538
1538
|
return !i && !r ? null : /* @__PURE__ */ n("div", {
|
|
1539
|
-
className: P(
|
|
1539
|
+
className: P(Rt.overlay, i && Rt["overlay--open"], t && Rt["overlay--animated"], e),
|
|
1540
1540
|
"data-state": i ? "open" : "closed",
|
|
1541
1541
|
"aria-hidden": "true"
|
|
1542
1542
|
});
|
|
1543
1543
|
};
|
|
1544
|
-
|
|
1544
|
+
zt.displayName = "ModalOverlay";
|
|
1545
1545
|
//#endregion
|
|
1546
1546
|
//#region src/components/Modal/Root/ModalRoot.tsx
|
|
1547
|
-
var
|
|
1548
|
-
let T = g(null), { contentId: E, descriptionId: D, open: O, requestClose: k, setOpen: A, titleId: j } =
|
|
1547
|
+
var Bt = ({ children: e, open: t, defaultOpen: r = !1, onOpenChange: i, modal: a = !0, closeOnEscape: o = !0, closeOnOutsidePress: s = !0, preventScroll: c = !0, restoreFocus: l = !0, trapFocus: d = !0, initialFocus: p, finalFocus: m, onOpenAutoFocus: v, onCloseAutoFocus: y, onEscapeKeyDown: b, onPointerDownOutside: x, onInteractOutside: S, role: C = "dialog", className: w }) => {
|
|
1548
|
+
let T = g(null), { contentId: E, descriptionId: D, open: O, requestClose: k, setOpen: A, titleId: j } = be({
|
|
1549
1549
|
open: t,
|
|
1550
1550
|
defaultOpen: r,
|
|
1551
1551
|
onOpenChange: i,
|
|
@@ -1555,11 +1555,11 @@ var zt = ({ children: e, open: t, defaultOpen: r = !1, onOpenChange: i, modal: a
|
|
|
1555
1555
|
k();
|
|
1556
1556
|
}, [k]), z = u((e) => {
|
|
1557
1557
|
T.current = e;
|
|
1558
|
-
}, []), { isTopOverlay: ee } =
|
|
1558
|
+
}, []), { isTopOverlay: ee } = ue({
|
|
1559
1559
|
active: O,
|
|
1560
1560
|
id: E
|
|
1561
1561
|
});
|
|
1562
|
-
return
|
|
1562
|
+
return me({
|
|
1563
1563
|
active: O,
|
|
1564
1564
|
enabled: c
|
|
1565
1565
|
}), f(() => {
|
|
@@ -1570,7 +1570,7 @@ var zt = ({ children: e, open: t, defaultOpen: r = !1, onOpenChange: i, modal: a
|
|
|
1570
1570
|
F,
|
|
1571
1571
|
O,
|
|
1572
1572
|
C
|
|
1573
|
-
]), /* @__PURE__ */ n(
|
|
1573
|
+
]), /* @__PURE__ */ n(St, {
|
|
1574
1574
|
value: h(() => ({
|
|
1575
1575
|
closeOnEscape: o,
|
|
1576
1576
|
closeOnOutsidePress: s,
|
|
@@ -1630,11 +1630,11 @@ var zt = ({ children: e, open: t, defaultOpen: r = !1, onOpenChange: i, modal: a
|
|
|
1630
1630
|
})
|
|
1631
1631
|
});
|
|
1632
1632
|
};
|
|
1633
|
-
|
|
1633
|
+
Bt.displayName = "ModalRoot";
|
|
1634
1634
|
//#endregion
|
|
1635
1635
|
//#region src/components/Modal/Trigger/ModalTrigger.tsx
|
|
1636
|
-
var
|
|
1637
|
-
let a =
|
|
1636
|
+
var Vt = ({ children: e, asChild: t = !1, disabled: r = !1, className: i }) => {
|
|
1637
|
+
let a = bt(), s = t && l(e) ? e : void 0, c = r, u = {
|
|
1638
1638
|
"aria-controls": a.contentId,
|
|
1639
1639
|
"aria-disabled": c || void 0,
|
|
1640
1640
|
"aria-expanded": a.open,
|
|
@@ -1642,13 +1642,13 @@ var Bt = ({ children: e, asChild: t = !1, disabled: r = !1, className: i }) => {
|
|
|
1642
1642
|
className: P(i),
|
|
1643
1643
|
"data-state": a.open ? "open" : "closed",
|
|
1644
1644
|
disabled: c || void 0,
|
|
1645
|
-
onClick:
|
|
1645
|
+
onClick: Et(s?.props.onClick, () => {
|
|
1646
1646
|
c || a.setOpen(!0);
|
|
1647
1647
|
})
|
|
1648
1648
|
};
|
|
1649
1649
|
return s ? o(s, {
|
|
1650
1650
|
...u,
|
|
1651
|
-
ref:
|
|
1651
|
+
ref: Dt(s.props.ref),
|
|
1652
1652
|
className: P(s.props.className, i)
|
|
1653
1653
|
}) : /* @__PURE__ */ n("button", {
|
|
1654
1654
|
type: "button",
|
|
@@ -1656,28 +1656,28 @@ var Bt = ({ children: e, asChild: t = !1, disabled: r = !1, className: i }) => {
|
|
|
1656
1656
|
children: e
|
|
1657
1657
|
});
|
|
1658
1658
|
};
|
|
1659
|
-
|
|
1659
|
+
Vt.displayName = "Modal.Trigger";
|
|
1660
1660
|
//#endregion
|
|
1661
1661
|
//#region src/components/Modal/Modal.tsx
|
|
1662
|
-
var
|
|
1663
|
-
Trigger:
|
|
1664
|
-
Overlay:
|
|
1665
|
-
Content:
|
|
1666
|
-
Header:
|
|
1667
|
-
Title:
|
|
1668
|
-
Description:
|
|
1669
|
-
Body:
|
|
1670
|
-
Footer:
|
|
1671
|
-
Close:
|
|
1662
|
+
var Ht = Object.assign(Bt, {
|
|
1663
|
+
Trigger: Vt,
|
|
1664
|
+
Overlay: zt,
|
|
1665
|
+
Content: Mt,
|
|
1666
|
+
Header: Lt,
|
|
1667
|
+
Title: It,
|
|
1668
|
+
Description: Ft,
|
|
1669
|
+
Body: Tt,
|
|
1670
|
+
Footer: Pt,
|
|
1671
|
+
Close: kt
|
|
1672
1672
|
});
|
|
1673
|
-
|
|
1673
|
+
Ht.displayName = "Modal";
|
|
1674
1674
|
//#endregion
|
|
1675
1675
|
//#region src/components/RadioGroup/internal/RadioGroupContext.tsx
|
|
1676
|
-
var
|
|
1677
|
-
function
|
|
1678
|
-
return d(
|
|
1676
|
+
var Ut = s(null), Wt = Ut.Provider;
|
|
1677
|
+
function Gt() {
|
|
1678
|
+
return d(Ut);
|
|
1679
1679
|
}
|
|
1680
|
-
var
|
|
1680
|
+
var q = {
|
|
1681
1681
|
root: "_root_owqkg_1",
|
|
1682
1682
|
invalid: "_invalid_owqkg_34",
|
|
1683
1683
|
control: "_control_owqkg_34",
|
|
@@ -1700,19 +1700,19 @@ var J = {
|
|
|
1700
1700
|
"radio-indicator-in": "_radio-indicator-in_owqkg_1",
|
|
1701
1701
|
content: "_content_owqkg_346",
|
|
1702
1702
|
error: "_error_owqkg_363"
|
|
1703
|
-
},
|
|
1704
|
-
primary:
|
|
1705
|
-
neutral:
|
|
1706
|
-
success:
|
|
1707
|
-
warning:
|
|
1708
|
-
danger:
|
|
1709
|
-
},
|
|
1710
|
-
let S =
|
|
1703
|
+
}, Kt = {
|
|
1704
|
+
primary: q.colorPrimary,
|
|
1705
|
+
neutral: q.colorNeutral,
|
|
1706
|
+
success: q.colorSuccess,
|
|
1707
|
+
warning: q.colorWarning,
|
|
1708
|
+
danger: q.colorDanger
|
|
1709
|
+
}, qt = c(({ value: e, checked: t, defaultChecked: i = !1, disabled: a = !1, required: o = !1, size: s, color: c, error: l, onCheckedChange: u, label: d, description: f, icon: m, wrapperClassName: h, className: g, id: _, name: v, "aria-describedby": y, ...b }, x) => {
|
|
1710
|
+
let S = Gt(), C = p(), w = _ ?? C, T = f ? `${w}-description` : void 0, E = l ? `${w}-error` : void 0, D = [
|
|
1711
1711
|
T,
|
|
1712
1712
|
E,
|
|
1713
1713
|
S?.describedBy,
|
|
1714
1714
|
y
|
|
1715
|
-
].filter(Boolean).join(" ") || void 0, O = S !== null, [k, A] =
|
|
1715
|
+
].filter(Boolean).join(" ") || void 0, O = S !== null, [k, A] = _e({
|
|
1716
1716
|
value: t,
|
|
1717
1717
|
defaultValue: i,
|
|
1718
1718
|
onChange: u
|
|
@@ -1726,10 +1726,10 @@ var J = {
|
|
|
1726
1726
|
}
|
|
1727
1727
|
};
|
|
1728
1728
|
return /* @__PURE__ */ r("div", {
|
|
1729
|
-
className: P(
|
|
1729
|
+
className: P(q.root, q[L], I && q.invalid, M && q.disabled, Kt[R], g),
|
|
1730
1730
|
children: [/* @__PURE__ */ r("label", {
|
|
1731
1731
|
htmlFor: w,
|
|
1732
|
-
className: P(
|
|
1732
|
+
className: P(q.wrapper, h),
|
|
1733
1733
|
children: [
|
|
1734
1734
|
/* @__PURE__ */ n("input", {
|
|
1735
1735
|
...b,
|
|
@@ -1743,55 +1743,55 @@ var J = {
|
|
|
1743
1743
|
required: N,
|
|
1744
1744
|
"aria-invalid": I || void 0,
|
|
1745
1745
|
"aria-describedby": D,
|
|
1746
|
-
className:
|
|
1746
|
+
className: q.input,
|
|
1747
1747
|
onChange: z
|
|
1748
1748
|
}),
|
|
1749
1749
|
/* @__PURE__ */ n("span", {
|
|
1750
|
-
className:
|
|
1750
|
+
className: q.control,
|
|
1751
1751
|
"aria-hidden": "true",
|
|
1752
1752
|
children: /* @__PURE__ */ n("span", {
|
|
1753
|
-
className: P(
|
|
1753
|
+
className: P(q.indicator, m && q.customIcon),
|
|
1754
1754
|
children: m
|
|
1755
1755
|
})
|
|
1756
1756
|
}),
|
|
1757
1757
|
(d || f) && /* @__PURE__ */ r("span", {
|
|
1758
|
-
className:
|
|
1758
|
+
className: q.content,
|
|
1759
1759
|
children: [d && /* @__PURE__ */ n("span", {
|
|
1760
|
-
className:
|
|
1760
|
+
className: q.label,
|
|
1761
1761
|
children: d
|
|
1762
1762
|
}), f && /* @__PURE__ */ n("span", {
|
|
1763
1763
|
id: T,
|
|
1764
|
-
className:
|
|
1764
|
+
className: q.description,
|
|
1765
1765
|
children: f
|
|
1766
1766
|
})]
|
|
1767
1767
|
})
|
|
1768
1768
|
]
|
|
1769
1769
|
}), l && /* @__PURE__ */ n("div", {
|
|
1770
1770
|
id: E,
|
|
1771
|
-
className:
|
|
1771
|
+
className: q.error,
|
|
1772
1772
|
children: l
|
|
1773
1773
|
})]
|
|
1774
1774
|
});
|
|
1775
1775
|
});
|
|
1776
|
-
|
|
1776
|
+
qt.displayName = "Radio";
|
|
1777
1777
|
//#endregion
|
|
1778
1778
|
//#region src/components/RadioGroup/Item/RadioGroupItem.tsx
|
|
1779
|
-
var
|
|
1779
|
+
var Jt = c((e, t) => /* @__PURE__ */ n(qt, {
|
|
1780
1780
|
...e,
|
|
1781
1781
|
ref: t
|
|
1782
1782
|
}));
|
|
1783
|
-
|
|
1783
|
+
Jt.displayName = "RadioGroup.Item";
|
|
1784
1784
|
//#endregion
|
|
1785
1785
|
//#region src/components/RadioGroup/internal/useRadioGroupCollection.ts
|
|
1786
|
-
var
|
|
1786
|
+
var Yt = (e) => {
|
|
1787
1787
|
let t = e.current;
|
|
1788
1788
|
return t ? Array.from(t.querySelectorAll("input[type=\"radio\"]")) : [];
|
|
1789
|
-
},
|
|
1790
|
-
function
|
|
1789
|
+
}, Xt = (e) => Yt(e).filter((e) => !e.disabled), Zt = ["ArrowLeft", "ArrowRight"], Qt = ["ArrowUp", "ArrowDown"];
|
|
1790
|
+
function $t({ rootRef: e, orientation: t }) {
|
|
1791
1791
|
return u((n) => {
|
|
1792
|
-
let r =
|
|
1792
|
+
let r = Zt.includes(n.key), i = Qt.includes(n.key), a = n.key === "Home" || n.key === "End";
|
|
1793
1793
|
if (!r && !i && !a || t === "horizontal" && i || t === "vertical" && r) return;
|
|
1794
|
-
let o =
|
|
1794
|
+
let o = Xt(e);
|
|
1795
1795
|
if (o.length === 0) return;
|
|
1796
1796
|
n.preventDefault();
|
|
1797
1797
|
let s = document.activeElement, c = o.findIndex((e) => e === s), l = o.findIndex((e) => e.checked), u = c >= 0 ? c : Math.max(l, 0), d = u;
|
|
@@ -1800,7 +1800,7 @@ function Qt({ rootRef: e, orientation: t }) {
|
|
|
1800
1800
|
f?.focus(), f?.click();
|
|
1801
1801
|
}, [t, e]);
|
|
1802
1802
|
}
|
|
1803
|
-
var
|
|
1803
|
+
var en = {
|
|
1804
1804
|
root: "_root_1s3vp_1",
|
|
1805
1805
|
sm: "_sm_1s3vp_32",
|
|
1806
1806
|
md: "_md_1s3vp_58",
|
|
@@ -1814,12 +1814,12 @@ var $t = {
|
|
|
1814
1814
|
error: "_error_1s3vp_152",
|
|
1815
1815
|
disabled: "_disabled_1s3vp_160",
|
|
1816
1816
|
invalid: "_invalid_1s3vp_176"
|
|
1817
|
-
},
|
|
1818
|
-
let S = g(null), C = p(), w = v ?? C, T = u ? `${w}-label` : void 0, E = d ? `${w}-description` : void 0, D = f ? `${w}-error` : void 0, O = [E, D].filter(Boolean).join(" ") || void 0, k = l ?? `${w}-radio`, [A, j] =
|
|
1817
|
+
}, tn = c(({ value: e, defaultValue: t = "", onValueChange: i, disabled: a = !1, required: o = !1, size: s = "md", color: c = "primary", name: l, label: u, description: d, error: f, orientation: m = "vertical", children: h, className: _, id: v, onKeyDown: y, ...b }, x) => {
|
|
1818
|
+
let S = g(null), C = p(), w = v ?? C, T = u ? `${w}-label` : void 0, E = d ? `${w}-description` : void 0, D = f ? `${w}-error` : void 0, O = [E, D].filter(Boolean).join(" ") || void 0, k = l ?? `${w}-radio`, [A, j] = _e({
|
|
1819
1819
|
value: e,
|
|
1820
1820
|
defaultValue: t,
|
|
1821
1821
|
onChange: i
|
|
1822
|
-
}), M = !!f, N =
|
|
1822
|
+
}), M = !!f, N = $t({
|
|
1823
1823
|
rootRef: S,
|
|
1824
1824
|
orientation: m
|
|
1825
1825
|
}), F = (e) => {
|
|
@@ -1842,23 +1842,23 @@ var $t = {
|
|
|
1842
1842
|
onKeyDown: (e) => {
|
|
1843
1843
|
y?.(e), e.defaultPrevented || N(e);
|
|
1844
1844
|
},
|
|
1845
|
-
className: P(
|
|
1845
|
+
className: P(en.root, en[s], M && en.invalid, a && en.disabled, _),
|
|
1846
1846
|
children: [
|
|
1847
1847
|
u && /* @__PURE__ */ r("div", {
|
|
1848
1848
|
id: T,
|
|
1849
|
-
className:
|
|
1849
|
+
className: en.label,
|
|
1850
1850
|
children: [u, o && /* @__PURE__ */ n("span", {
|
|
1851
|
-
className:
|
|
1851
|
+
className: en.required,
|
|
1852
1852
|
"aria-hidden": "true",
|
|
1853
1853
|
children: "*"
|
|
1854
1854
|
})]
|
|
1855
1855
|
}),
|
|
1856
1856
|
d && /* @__PURE__ */ n("div", {
|
|
1857
1857
|
id: E,
|
|
1858
|
-
className:
|
|
1858
|
+
className: en.description,
|
|
1859
1859
|
children: d
|
|
1860
1860
|
}),
|
|
1861
|
-
/* @__PURE__ */ n(
|
|
1861
|
+
/* @__PURE__ */ n(Wt, {
|
|
1862
1862
|
value: {
|
|
1863
1863
|
name: k,
|
|
1864
1864
|
value: A,
|
|
@@ -1871,35 +1871,35 @@ var $t = {
|
|
|
1871
1871
|
onValueChange: j
|
|
1872
1872
|
},
|
|
1873
1873
|
children: /* @__PURE__ */ n("div", {
|
|
1874
|
-
className: P(
|
|
1874
|
+
className: P(en.items, en[m]),
|
|
1875
1875
|
children: h
|
|
1876
1876
|
})
|
|
1877
1877
|
}),
|
|
1878
1878
|
f && /* @__PURE__ */ n("div", {
|
|
1879
1879
|
id: D,
|
|
1880
|
-
className:
|
|
1880
|
+
className: en.error,
|
|
1881
1881
|
children: f
|
|
1882
1882
|
})
|
|
1883
1883
|
]
|
|
1884
1884
|
});
|
|
1885
1885
|
});
|
|
1886
|
-
|
|
1886
|
+
tn.displayName = "RadioGroup.Root";
|
|
1887
1887
|
//#endregion
|
|
1888
1888
|
//#region src/components/RadioGroup/RadioGroup.tsx
|
|
1889
|
-
var
|
|
1890
|
-
|
|
1889
|
+
var nn = Object.assign(tn, { Item: Jt });
|
|
1890
|
+
nn.displayName = "RadioGroup";
|
|
1891
1891
|
//#endregion
|
|
1892
1892
|
//#region src/components/Select/internal/SelectContext.tsx
|
|
1893
|
-
var
|
|
1894
|
-
function
|
|
1895
|
-
let e = d(
|
|
1893
|
+
var rn = s(null), an = rn.Provider;
|
|
1894
|
+
function on() {
|
|
1895
|
+
let e = d(rn);
|
|
1896
1896
|
if (!e) throw Error("Select compound components must be used inside <Select>");
|
|
1897
1897
|
return e;
|
|
1898
1898
|
}
|
|
1899
|
-
|
|
1899
|
+
rn.displayName = "SelectContext";
|
|
1900
1900
|
//#endregion
|
|
1901
1901
|
//#region src/components/Select/internal/useSelectVirtualization.ts
|
|
1902
|
-
function
|
|
1902
|
+
function sn({ loading: e, options: t, scrollTop: n, virtual: r }) {
|
|
1903
1903
|
return h(() => {
|
|
1904
1904
|
let i = typeof r == "object" ? r : r ? {} : void 0, a = i?.itemHeight ?? 40, o = !!(i && t.length > 0 && !e), s = o ? Math.max(0, Math.floor(n / a) - 2) : 0, c = o ? Math.ceil(300 / a) + 4 : t.length, l = o ? t.slice(s, s + c) : t, u = o ? s * a : 0;
|
|
1905
1905
|
return {
|
|
@@ -1918,24 +1918,24 @@ function on({ loading: e, options: t, scrollTop: n, virtual: r }) {
|
|
|
1918
1918
|
r
|
|
1919
1919
|
]);
|
|
1920
1920
|
}
|
|
1921
|
-
var
|
|
1922
|
-
option: "
|
|
1923
|
-
selected: "
|
|
1924
|
-
disabled: "
|
|
1925
|
-
optionPop: "
|
|
1926
|
-
description: "
|
|
1927
|
-
icon: "
|
|
1928
|
-
active: "
|
|
1929
|
-
label: "
|
|
1930
|
-
content: "
|
|
1931
|
-
custom: "
|
|
1932
|
-
badge: "
|
|
1933
|
-
shortcut: "
|
|
1934
|
-
success: "
|
|
1935
|
-
warning: "
|
|
1936
|
-
danger: "
|
|
1937
|
-
check: "
|
|
1938
|
-
checkPop: "
|
|
1921
|
+
var J = {
|
|
1922
|
+
option: "_option_7msws_1",
|
|
1923
|
+
selected: "_selected_7msws_38",
|
|
1924
|
+
disabled: "_disabled_7msws_38",
|
|
1925
|
+
optionPop: "_optionPop_7msws_1",
|
|
1926
|
+
description: "_description_7msws_63",
|
|
1927
|
+
icon: "_icon_7msws_67",
|
|
1928
|
+
active: "_active_7msws_71",
|
|
1929
|
+
label: "_label_7msws_120",
|
|
1930
|
+
content: "_content_7msws_129",
|
|
1931
|
+
custom: "_custom_7msws_130",
|
|
1932
|
+
badge: "_badge_7msws_164",
|
|
1933
|
+
shortcut: "_shortcut_7msws_165",
|
|
1934
|
+
success: "_success_7msws_185",
|
|
1935
|
+
warning: "_warning_7msws_249",
|
|
1936
|
+
danger: "_danger_7msws_313",
|
|
1937
|
+
check: "_check_7msws_377",
|
|
1938
|
+
checkPop: "_checkPop_7msws_1"
|
|
1939
1939
|
}, cn = () => null;
|
|
1940
1940
|
cn.__velliraSelectPart = "item", cn.displayName = "Select.Item";
|
|
1941
1941
|
var ln = ({ option: e, isSelected: i, isActive: a, optionId: o, renderOption: s, onSelect: c, onMouseEnter: l }) => {
|
|
@@ -1945,13 +1945,13 @@ var ln = ({ option: e, isSelected: i, isActive: a, optionId: o, renderOption: s,
|
|
|
1945
1945
|
role: "option",
|
|
1946
1946
|
"aria-selected": i,
|
|
1947
1947
|
"aria-disabled": u || void 0,
|
|
1948
|
-
className: P(
|
|
1949
|
-
[
|
|
1950
|
-
[
|
|
1951
|
-
[
|
|
1952
|
-
[
|
|
1953
|
-
[
|
|
1954
|
-
[
|
|
1948
|
+
className: P(J.option, {
|
|
1949
|
+
[J.selected]: i,
|
|
1950
|
+
[J.active]: a,
|
|
1951
|
+
[J.disabled]: u,
|
|
1952
|
+
[J.success]: e.color === "success",
|
|
1953
|
+
[J.warning]: e.color === "warning",
|
|
1954
|
+
[J.danger]: e.color === "danger"
|
|
1955
1955
|
}),
|
|
1956
1956
|
onClick: () => {
|
|
1957
1957
|
u || c(e.value);
|
|
@@ -1960,33 +1960,33 @@ var ln = ({ option: e, isSelected: i, isActive: a, optionId: o, renderOption: s,
|
|
|
1960
1960
|
u || l();
|
|
1961
1961
|
},
|
|
1962
1962
|
children: [s ? /* @__PURE__ */ n("span", {
|
|
1963
|
-
className:
|
|
1963
|
+
className: J.custom,
|
|
1964
1964
|
children: s(e)
|
|
1965
1965
|
}) : /* @__PURE__ */ r(t, { children: [
|
|
1966
1966
|
e.icon && /* @__PURE__ */ n("span", {
|
|
1967
|
-
className:
|
|
1967
|
+
className: J.icon,
|
|
1968
1968
|
children: e.icon
|
|
1969
1969
|
}),
|
|
1970
1970
|
/* @__PURE__ */ r("span", {
|
|
1971
|
-
className:
|
|
1971
|
+
className: J.content,
|
|
1972
1972
|
children: [/* @__PURE__ */ n("span", {
|
|
1973
|
-
className:
|
|
1973
|
+
className: J.label,
|
|
1974
1974
|
children: e.label
|
|
1975
1975
|
}), e.description && /* @__PURE__ */ n("span", {
|
|
1976
|
-
className:
|
|
1976
|
+
className: J.description,
|
|
1977
1977
|
children: e.description
|
|
1978
1978
|
})]
|
|
1979
1979
|
}),
|
|
1980
1980
|
e.badge && /* @__PURE__ */ n("span", {
|
|
1981
|
-
className:
|
|
1981
|
+
className: J.badge,
|
|
1982
1982
|
children: e.badge
|
|
1983
1983
|
}),
|
|
1984
1984
|
e.shortcut && /* @__PURE__ */ n("kbd", {
|
|
1985
|
-
className:
|
|
1985
|
+
className: J.shortcut,
|
|
1986
1986
|
children: e.shortcut
|
|
1987
1987
|
})
|
|
1988
1988
|
] }), /* @__PURE__ */ n("span", {
|
|
1989
|
-
className:
|
|
1989
|
+
className: J.check,
|
|
1990
1990
|
"aria-hidden": "true",
|
|
1991
1991
|
children: i && /* @__PURE__ */ n(y, {})
|
|
1992
1992
|
})]
|
|
@@ -1994,32 +1994,32 @@ var ln = ({ option: e, isSelected: i, isActive: a, optionId: o, renderOption: s,
|
|
|
1994
1994
|
};
|
|
1995
1995
|
ln.displayName = "SelectItemRow";
|
|
1996
1996
|
var Y = {
|
|
1997
|
-
dropdown: "
|
|
1998
|
-
dropdownIn: "
|
|
1999
|
-
primary: "
|
|
2000
|
-
outline: "
|
|
2001
|
-
filled: "
|
|
2002
|
-
soft: "
|
|
2003
|
-
neutral: "
|
|
2004
|
-
success: "
|
|
2005
|
-
warning: "
|
|
2006
|
-
danger: "
|
|
2007
|
-
listReveal: "
|
|
2008
|
-
groupAction: "
|
|
2009
|
-
groupActionText: "
|
|
2010
|
-
groupActionMeta: "
|
|
2011
|
-
command: "
|
|
2012
|
-
searchWrap: "
|
|
2013
|
-
searchReveal: "
|
|
2014
|
-
search: "
|
|
2015
|
-
searchClear: "
|
|
2016
|
-
empty: "
|
|
2017
|
-
groupLabel: "
|
|
2018
|
-
separator: "
|
|
2019
|
-
virtualSpacer: "
|
|
2020
|
-
mobileDropdownIn: "
|
|
1997
|
+
dropdown: "_dropdown_jkvqg_1",
|
|
1998
|
+
dropdownIn: "_dropdownIn_jkvqg_1",
|
|
1999
|
+
primary: "_primary_jkvqg_103",
|
|
2000
|
+
outline: "_outline_jkvqg_103",
|
|
2001
|
+
filled: "_filled_jkvqg_190",
|
|
2002
|
+
soft: "_soft_jkvqg_277",
|
|
2003
|
+
neutral: "_neutral_jkvqg_364",
|
|
2004
|
+
success: "_success_jkvqg_625",
|
|
2005
|
+
warning: "_warning_jkvqg_886",
|
|
2006
|
+
danger: "_danger_jkvqg_1147",
|
|
2007
|
+
listReveal: "_listReveal_jkvqg_1",
|
|
2008
|
+
groupAction: "_groupAction_jkvqg_1415",
|
|
2009
|
+
groupActionText: "_groupActionText_jkvqg_1471",
|
|
2010
|
+
groupActionMeta: "_groupActionMeta_jkvqg_1479",
|
|
2011
|
+
command: "_command_jkvqg_1485",
|
|
2012
|
+
searchWrap: "_searchWrap_jkvqg_1490",
|
|
2013
|
+
searchReveal: "_searchReveal_jkvqg_1",
|
|
2014
|
+
search: "_search_jkvqg_1490",
|
|
2015
|
+
searchClear: "_searchClear_jkvqg_1521",
|
|
2016
|
+
empty: "_empty_jkvqg_1557",
|
|
2017
|
+
groupLabel: "_groupLabel_jkvqg_1565",
|
|
2018
|
+
separator: "_separator_jkvqg_1575",
|
|
2019
|
+
virtualSpacer: "_virtualSpacer_jkvqg_1581",
|
|
2020
|
+
mobileDropdownIn: "_mobileDropdownIn_jkvqg_1"
|
|
2021
2021
|
}, un = ({ children: e, className: t }) => {
|
|
2022
|
-
let { contentProps: r } =
|
|
2022
|
+
let { contentProps: r } = on(), i = fn(e);
|
|
2023
2023
|
return /* @__PURE__ */ n(dn, {
|
|
2024
2024
|
...r,
|
|
2025
2025
|
...i,
|
|
@@ -2027,13 +2027,13 @@ var Y = {
|
|
|
2027
2027
|
});
|
|
2028
2028
|
};
|
|
2029
2029
|
un.__velliraSelectPart = "content", un.displayName = "Select.Content";
|
|
2030
|
-
var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style: s, options: c, entries: l, multiple: d, selectedValues: p, color: m = "primary", variant: h = "outline", searchable: v, command: y, virtual: b, portal: x = !0, searchValue: C = "", searchPlaceholder: w = "Search...", loading: T, loadingText: E = "Loading...",
|
|
2031
|
-
let B = g(null), te = g(!1), [ne, re] = _(null), [ie, ae] = _(0), { bottomSpacerHeight: oe, isVirtual:
|
|
2030
|
+
var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style: s, options: c, entries: l, multiple: d, selectedValues: p, color: m = "primary", variant: h = "outline", searchable: v, command: y, virtual: b, portal: x = !0, searchValue: C = "", searchPlaceholder: w = "Search...", loading: T, loadingText: E = "Loading...", emptyText: D, searchSlot: O, headerSlot: k, emptySlot: A, loadingSlot: j, renderOption: M, selectedValue: N, activeIndex: P, visualActiveIndex: F = P, className: I, onSelect: L, onSelectGroup: R, onMouseEnter: z, onSearchChange: ee }) => {
|
|
2031
|
+
let B = g(null), te = g(!1), [ne, re] = _(null), [ie, ae] = _(0), { bottomSpacerHeight: oe, isVirtual: V, itemHeight: se, startIndex: ce, topSpacerHeight: le, viewportHeight: H, visibleOptions: ue } = sn({
|
|
2032
2032
|
loading: T,
|
|
2033
2033
|
options: c,
|
|
2034
2034
|
scrollTop: ie,
|
|
2035
2035
|
virtual: b
|
|
2036
|
-
}),
|
|
2036
|
+
}), de = u((e) => {
|
|
2037
2037
|
re(e), o(e);
|
|
2038
2038
|
}, [o]);
|
|
2039
2039
|
if (f(() => {
|
|
@@ -2051,8 +2051,8 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
|
|
|
2051
2051
|
te.current = !0;
|
|
2052
2052
|
return;
|
|
2053
2053
|
}
|
|
2054
|
-
if (te.current = !0,
|
|
2055
|
-
let e = Math.max(0, n *
|
|
2054
|
+
if (te.current = !0, V) {
|
|
2055
|
+
let e = Math.max(0, n * se - (H - se) / 2);
|
|
2056
2056
|
ae(e), ne.scrollTop = e;
|
|
2057
2057
|
return;
|
|
2058
2058
|
}
|
|
@@ -2061,21 +2061,21 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
|
|
|
2061
2061
|
P,
|
|
2062
2062
|
ne,
|
|
2063
2063
|
e,
|
|
2064
|
+
V,
|
|
2064
2065
|
se,
|
|
2065
|
-
ce,
|
|
2066
2066
|
i,
|
|
2067
2067
|
T,
|
|
2068
2068
|
c,
|
|
2069
2069
|
N,
|
|
2070
2070
|
p,
|
|
2071
|
-
|
|
2071
|
+
H
|
|
2072
2072
|
]), !e) return null;
|
|
2073
|
-
let
|
|
2073
|
+
let fe = l && !V ? l : ue.map((e, t) => ({
|
|
2074
2074
|
type: "option",
|
|
2075
2075
|
option: e,
|
|
2076
|
-
optionIndex:
|
|
2077
|
-
})),
|
|
2078
|
-
ref:
|
|
2076
|
+
optionIndex: ce + t
|
|
2077
|
+
})), pe = /* @__PURE__ */ r("div", {
|
|
2078
|
+
ref: de,
|
|
2079
2079
|
tabIndex: 0,
|
|
2080
2080
|
className: [
|
|
2081
2081
|
Y.dropdown,
|
|
@@ -2086,7 +2086,7 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
|
|
|
2086
2086
|
].filter(Boolean).join(" "),
|
|
2087
2087
|
style: s,
|
|
2088
2088
|
onScroll: (e) => {
|
|
2089
|
-
|
|
2089
|
+
V && ae(e.currentTarget.scrollTop);
|
|
2090
2090
|
},
|
|
2091
2091
|
children: [
|
|
2092
2092
|
k,
|
|
@@ -2122,12 +2122,12 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
|
|
|
2122
2122
|
className: Y.empty,
|
|
2123
2123
|
children: j ?? E
|
|
2124
2124
|
}) : c.length ? /* @__PURE__ */ r(t, { children: [
|
|
2125
|
-
|
|
2125
|
+
V && /* @__PURE__ */ n("li", {
|
|
2126
2126
|
"aria-hidden": "true",
|
|
2127
2127
|
className: Y.virtualSpacer,
|
|
2128
|
-
style: { height:
|
|
2128
|
+
style: { height: le }
|
|
2129
2129
|
}),
|
|
2130
|
-
|
|
2130
|
+
fe.map((e) => {
|
|
2131
2131
|
if (e.type === "group") {
|
|
2132
2132
|
if (e.selectable && d) {
|
|
2133
2133
|
let t = e.itemValues.filter((e) => c.some((t) => t.value === e && !t.disabled)), i = p ? t.filter((e) => p.includes(e)).length : 0, a = t.length > 0 && i === t.length, o = i > 0 && i < t.length;
|
|
@@ -2177,7 +2177,7 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
|
|
|
2177
2177
|
onMouseEnter: () => z(a)
|
|
2178
2178
|
}, t.value);
|
|
2179
2179
|
}),
|
|
2180
|
-
|
|
2180
|
+
V && /* @__PURE__ */ n("li", {
|
|
2181
2181
|
"aria-hidden": "true",
|
|
2182
2182
|
className: Y.virtualSpacer,
|
|
2183
2183
|
style: { height: oe }
|
|
@@ -2192,7 +2192,7 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
|
|
|
2192
2192
|
})
|
|
2193
2193
|
]
|
|
2194
2194
|
});
|
|
2195
|
-
return x ? /* @__PURE__ */ n(
|
|
2195
|
+
return x ? /* @__PURE__ */ n(we, { children: pe }) : pe;
|
|
2196
2196
|
};
|
|
2197
2197
|
dn.displayName = "SelectContentSurface";
|
|
2198
2198
|
function fn(e) {
|
|
@@ -2222,7 +2222,7 @@ hn.__velliraSelectPart = "loading", hn.displayName = "Select.Loading";
|
|
|
2222
2222
|
//#endregion
|
|
2223
2223
|
//#region src/components/Select/Content/SelectSearch.tsx
|
|
2224
2224
|
var gn = ({ placeholder: e, className: t }) => {
|
|
2225
|
-
let { contentProps: i } =
|
|
2225
|
+
let { contentProps: i } = on(), a = g(null), o = i.searchValue ?? "";
|
|
2226
2226
|
return f(() => {
|
|
2227
2227
|
if (!i.isOpen) return;
|
|
2228
2228
|
let e = window.setTimeout(() => {
|
|
@@ -2496,7 +2496,7 @@ function Mn(e) {
|
|
|
2496
2496
|
//#endregion
|
|
2497
2497
|
//#region src/components/Select/internal/useSelectPosition.ts
|
|
2498
2498
|
function Nn({ avoidCollisions: e, isOpen: t, matchTriggerWidth: n, onOpenChange: r, placement: i }) {
|
|
2499
|
-
return
|
|
2499
|
+
return tt({
|
|
2500
2500
|
open: t,
|
|
2501
2501
|
onOpenChange: r,
|
|
2502
2502
|
placement: i === "bottom" || i === "top" ? `${i}-start` : i,
|
|
@@ -2522,33 +2522,33 @@ function Fn(e) {
|
|
|
2522
2522
|
return typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
2523
2523
|
}
|
|
2524
2524
|
var X = {
|
|
2525
|
-
control: "
|
|
2526
|
-
disabled: "
|
|
2527
|
-
arrow: "
|
|
2528
|
-
primary: "
|
|
2529
|
-
outline: "
|
|
2530
|
-
filled: "
|
|
2531
|
-
soft: "
|
|
2532
|
-
neutral: "
|
|
2533
|
-
success: "
|
|
2534
|
-
warning: "
|
|
2535
|
-
danger: "
|
|
2536
|
-
sm: "
|
|
2537
|
-
md: "
|
|
2538
|
-
lg: "
|
|
2539
|
-
valueWrap: "
|
|
2540
|
-
value: "
|
|
2541
|
-
adornment: "
|
|
2542
|
-
clear: "
|
|
2543
|
-
affix: "
|
|
2544
|
-
placeholder: "
|
|
2545
|
-
error: "
|
|
2546
|
-
spinner: "
|
|
2547
|
-
spin: "
|
|
2548
|
-
loading: "
|
|
2549
|
-
open: "
|
|
2525
|
+
control: "_control_ao6y1_1",
|
|
2526
|
+
disabled: "_disabled_ao6y1_43",
|
|
2527
|
+
arrow: "_arrow_ao6y1_49",
|
|
2528
|
+
primary: "_primary_ao6y1_64",
|
|
2529
|
+
outline: "_outline_ao6y1_64",
|
|
2530
|
+
filled: "_filled_ao6y1_105",
|
|
2531
|
+
soft: "_soft_ao6y1_146",
|
|
2532
|
+
neutral: "_neutral_ao6y1_187",
|
|
2533
|
+
success: "_success_ao6y1_310",
|
|
2534
|
+
warning: "_warning_ao6y1_433",
|
|
2535
|
+
danger: "_danger_ao6y1_556",
|
|
2536
|
+
sm: "_sm_ao6y1_679",
|
|
2537
|
+
md: "_md_ao6y1_686",
|
|
2538
|
+
lg: "_lg_ao6y1_693",
|
|
2539
|
+
valueWrap: "_valueWrap_ao6y1_700",
|
|
2540
|
+
value: "_value_ao6y1_700",
|
|
2541
|
+
adornment: "_adornment_ao6y1_714",
|
|
2542
|
+
clear: "_clear_ao6y1_715",
|
|
2543
|
+
affix: "_affix_ao6y1_716",
|
|
2544
|
+
placeholder: "_placeholder_ao6y1_755",
|
|
2545
|
+
error: "_error_ao6y1_759",
|
|
2546
|
+
spinner: "_spinner_ao6y1_795",
|
|
2547
|
+
spin: "_spin_ao6y1_795",
|
|
2548
|
+
loading: "_loading_ao6y1_804",
|
|
2549
|
+
open: "_open_ao6y1_823"
|
|
2550
2550
|
}, In = ({ children: e, className: t }) => {
|
|
2551
|
-
let { triggerProps: r } =
|
|
2551
|
+
let { triggerProps: r } = on();
|
|
2552
2552
|
return /* @__PURE__ */ n(Ln, {
|
|
2553
2553
|
...r,
|
|
2554
2554
|
className: [r.className, t].filter(Boolean).join(" "),
|
|
@@ -2621,17 +2621,17 @@ var Ln = ({ children: e, id: i, describedBy: a, labelledBy: o, isOpen: s, disabl
|
|
|
2621
2621
|
Ln.displayName = "SelectTriggerSurface";
|
|
2622
2622
|
//#endregion
|
|
2623
2623
|
//#region src/components/Select/Root/SelectRoot.tsx
|
|
2624
|
-
var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label": c, "aria-describedby": l, "aria-labelledby": d, value: m, defaultValue: v, onValueChange: y, multiple: b = !1, maxSelected: x, closeOnSelect: S, placeholder: C = "Select...", empty: w, loadingText: T = "Loading...",
|
|
2625
|
-
let
|
|
2624
|
+
var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label": c, "aria-describedby": l, "aria-labelledby": d, value: m, defaultValue: v, onValueChange: y, multiple: b = !1, maxSelected: x, closeOnSelect: S, placeholder: C = "Select...", empty: w, loadingText: T = "Loading...", size: E, color: D = "primary", variant: O = "outline", required: k = !1, disabled: A = !1, invalid: j = !1, loading: M = !1, clearable: N = !1, searchable: P = !1, virtual: F, modal: I = !1, command: L = !1, error: R, placement: z = "bottom", matchTriggerWidth: ee = !0, avoidCollisions: B = !0, portal: te = !0, open: ne, defaultOpen: re = !1, onOpenChange: ie, onSearch: ae, onClear: oe, startIcon: V, endIcon: se, prefix: le, suffix: H, renderValue: de, renderOption: fe, onBlur: pe, onFocus: he, className: ge, triggerClassName: _e, dropdownClassName: ve }) => {
|
|
2625
|
+
let ye = p(), be = wn(), U = !!(i || a || R), Se = o ?? (U ? void 0 : be?.controlId) ?? ye, Ce = `${Se}-listbox`, [we, Te] = _(""), Ee = !!R, De = Ee ? `${Se}-error` : void 0, Oe = a ? `${Se}-description` : void 0, ke = E ?? be?.size ?? "md", Ae = j || Ee || !U && !!be?.invalid, je = A || !U && !!be?.disabled, Me = k || !U && !!be?.required, Ne = [
|
|
2626
2626
|
l,
|
|
2627
|
-
!
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
].filter(Boolean).join(" "),
|
|
2627
|
+
!U && !l ? be?.ariaDescribedBy : void 0,
|
|
2628
|
+
Oe,
|
|
2629
|
+
De
|
|
2630
|
+
].filter(Boolean).join(" "), Pe = g(null), Fe = g(null), [Ie, W] = _(!1), Le = P || L, { entries: Re, options: ze } = Mn(e), Be = Pn({
|
|
2631
2631
|
options: ze,
|
|
2632
2632
|
searchable: Le,
|
|
2633
|
-
searchValue:
|
|
2634
|
-
}), { selectedValue: Ve, selectedValues:
|
|
2633
|
+
searchValue: we
|
|
2634
|
+
}), { selectedValue: Ve, selectedValues: G, isOpen: K, setIsOpen: He, setSelectedValue: Ue, activeIndex: We, setActiveIndex: Ge, closeDropdown: Ke, toggleDropdown: qe, selectValue: Je, onKeyDown: Ye } = xe({
|
|
2635
2635
|
value: m,
|
|
2636
2636
|
defaultValue: v,
|
|
2637
2637
|
onValueChange: y,
|
|
@@ -2639,148 +2639,148 @@ var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label":
|
|
|
2639
2639
|
multiple: b,
|
|
2640
2640
|
maxSelected: x,
|
|
2641
2641
|
closeOnSelect: S,
|
|
2642
|
-
disabled:
|
|
2643
|
-
open:
|
|
2644
|
-
defaultOpen:
|
|
2645
|
-
onOpenChange:
|
|
2646
|
-
}), Xe = h(() => ze.find((e) =>
|
|
2647
|
-
isOpen:
|
|
2642
|
+
disabled: je,
|
|
2643
|
+
open: ne,
|
|
2644
|
+
defaultOpen: re,
|
|
2645
|
+
onOpenChange: ie
|
|
2646
|
+
}), Xe = h(() => ze.find((e) => G.includes(e.value)), [ze, G]), Ze = h(() => ze.filter((e) => G.includes(e.value)), [ze, G]), Qe = !!Xe, $e = Array.isArray(Ve) ? Ve[0] ?? "" : Ve, { floatingStyles: et, setRef: tt, setFloatingRef: nt } = Nn({
|
|
2647
|
+
isOpen: K,
|
|
2648
2648
|
onOpenChange: He,
|
|
2649
|
-
placement:
|
|
2650
|
-
matchTriggerWidth:
|
|
2651
|
-
avoidCollisions:
|
|
2649
|
+
placement: z,
|
|
2650
|
+
matchTriggerWidth: ee,
|
|
2651
|
+
avoidCollisions: B
|
|
2652
2652
|
}), rt = u((e) => {
|
|
2653
|
-
Je(e),
|
|
2653
|
+
Je(e), Pe.current?.focus();
|
|
2654
2654
|
}, [Je]), it = u((e) => {
|
|
2655
2655
|
if (!b || e.length === 0) return;
|
|
2656
|
-
let t = e.filter((e) => ze.some((t) => t.value === e && !t.disabled)), n = t.filter((e) =>
|
|
2656
|
+
let t = e.filter((e) => ze.some((t) => t.value === e && !t.disabled)), n = t.filter((e) => G.includes(e)), r = G.filter((e) => !t.includes(e)).length, i = typeof x == "number" ? Math.max(0, Math.min(t.length, x - r)) : t.length;
|
|
2657
2657
|
if (n.length > 0 && n.length >= i) {
|
|
2658
|
-
Ue(
|
|
2658
|
+
Ue(G.filter((e) => !t.includes(e)));
|
|
2659
2659
|
return;
|
|
2660
2660
|
}
|
|
2661
|
-
let a = [...
|
|
2661
|
+
let a = [...G];
|
|
2662
2662
|
for (let e of t) if (!a.includes(e)) {
|
|
2663
2663
|
if (typeof x == "number" && a.length >= x) break;
|
|
2664
2664
|
a.push(e);
|
|
2665
2665
|
}
|
|
2666
|
-
Ue(a), S && (Ke(),
|
|
2666
|
+
Ue(a), S && (Ke(), Pe.current?.focus());
|
|
2667
2667
|
}, [
|
|
2668
2668
|
Ke,
|
|
2669
2669
|
S,
|
|
2670
2670
|
x,
|
|
2671
2671
|
b,
|
|
2672
2672
|
ze,
|
|
2673
|
-
|
|
2673
|
+
G,
|
|
2674
2674
|
Ue
|
|
2675
2675
|
]), at = u(() => {
|
|
2676
|
-
Je(""),
|
|
2677
|
-
}, [
|
|
2678
|
-
|
|
2679
|
-
}, [
|
|
2680
|
-
zn(e,
|
|
2681
|
-
}, [
|
|
2682
|
-
|
|
2676
|
+
Je(""), oe?.(), Pe.current?.focus();
|
|
2677
|
+
}, [oe, Je]), ot = u(() => {
|
|
2678
|
+
K || W(!1), qe();
|
|
2679
|
+
}, [K, qe]), st = u((e) => {
|
|
2680
|
+
zn(e, K) && W(!0), Ye(e);
|
|
2681
|
+
}, [K, Ye]), ct = u((e) => {
|
|
2682
|
+
W(!0), Ge(e);
|
|
2683
2683
|
}, [Ge]), lt = u((e) => {
|
|
2684
|
-
|
|
2685
|
-
}, [
|
|
2686
|
-
active:
|
|
2687
|
-
id:
|
|
2684
|
+
Te(e), ae?.(e);
|
|
2685
|
+
}, [ae]), { isTopOverlay: ut } = ue({
|
|
2686
|
+
active: K,
|
|
2687
|
+
id: Ce
|
|
2688
2688
|
});
|
|
2689
|
-
|
|
2690
|
-
active:
|
|
2689
|
+
ce({
|
|
2690
|
+
active: K,
|
|
2691
2691
|
closeOnEscape: !0,
|
|
2692
2692
|
closeOnOutsidePress: !0,
|
|
2693
2693
|
contentRef: Fe,
|
|
2694
|
-
ignoreRefs: [
|
|
2694
|
+
ignoreRefs: [Pe],
|
|
2695
2695
|
isTopOverlay: ut,
|
|
2696
2696
|
requestClose: Ke
|
|
2697
2697
|
}), f(() => {
|
|
2698
|
-
|
|
2699
|
-
}, [
|
|
2700
|
-
!
|
|
2701
|
-
}, [
|
|
2702
|
-
active:
|
|
2703
|
-
enabled:
|
|
2698
|
+
K || W(!1);
|
|
2699
|
+
}, [K]), f(() => {
|
|
2700
|
+
!K && we && Te("");
|
|
2701
|
+
}, [K, we]), me({
|
|
2702
|
+
active: K,
|
|
2703
|
+
enabled: I
|
|
2704
2704
|
});
|
|
2705
2705
|
let dt = u((e) => {
|
|
2706
|
-
|
|
2706
|
+
Pe.current = e, tt(e);
|
|
2707
2707
|
}, [tt]), ft = u((e) => {
|
|
2708
2708
|
Fe.current = e, nt(e);
|
|
2709
|
-
}, [nt]), pt =
|
|
2710
|
-
id:
|
|
2711
|
-
describedBy:
|
|
2709
|
+
}, [nt]), pt = de ? de(Xe) : b && Ze.length ? Ze.map((e) => e.label).join(", ") : Xe?.label ?? C, mt = w ?? "No options available", ht = N && G.length > 0 && !je && !M, gt = {
|
|
2710
|
+
id: Se,
|
|
2711
|
+
describedBy: Ne || void 0,
|
|
2712
2712
|
labelledBy: c ? void 0 : d,
|
|
2713
|
-
isOpen:
|
|
2714
|
-
disabled:
|
|
2715
|
-
required:
|
|
2716
|
-
listboxId:
|
|
2713
|
+
isOpen: K,
|
|
2714
|
+
disabled: je,
|
|
2715
|
+
required: Me,
|
|
2716
|
+
listboxId: Ce,
|
|
2717
2717
|
activeIndex: We,
|
|
2718
|
-
ariaLabel: c ?? (!i && !
|
|
2719
|
-
error:
|
|
2720
|
-
loading:
|
|
2718
|
+
ariaLabel: c ?? (!i && !be?.labelId ? Xe?.label || C : void 0),
|
|
2719
|
+
error: Ae,
|
|
2720
|
+
loading: M,
|
|
2721
2721
|
displayText: pt,
|
|
2722
2722
|
isPlaceholder: !Qe,
|
|
2723
|
-
size:
|
|
2724
|
-
color:
|
|
2725
|
-
variant:
|
|
2726
|
-
startIcon:
|
|
2727
|
-
endIcon:
|
|
2728
|
-
prefix:
|
|
2729
|
-
suffix:
|
|
2723
|
+
size: ke,
|
|
2724
|
+
color: D,
|
|
2725
|
+
variant: O,
|
|
2726
|
+
startIcon: V,
|
|
2727
|
+
endIcon: se,
|
|
2728
|
+
prefix: le,
|
|
2729
|
+
suffix: H,
|
|
2730
2730
|
clearable: ht,
|
|
2731
|
-
className:
|
|
2731
|
+
className: _e,
|
|
2732
2732
|
buttonRef: dt,
|
|
2733
2733
|
onClear: at,
|
|
2734
2734
|
onClick: ot,
|
|
2735
2735
|
onKeyDown: st,
|
|
2736
|
-
onBlur:
|
|
2737
|
-
onFocus:
|
|
2736
|
+
onBlur: pe,
|
|
2737
|
+
onFocus: he
|
|
2738
2738
|
}, _t = {
|
|
2739
|
-
isOpen:
|
|
2740
|
-
listboxId:
|
|
2741
|
-
labelledById:
|
|
2739
|
+
isOpen: K,
|
|
2740
|
+
listboxId: Ce,
|
|
2741
|
+
labelledById: Se,
|
|
2742
2742
|
style: et,
|
|
2743
2743
|
options: Be,
|
|
2744
|
-
entries: Le ||
|
|
2744
|
+
entries: Le || we ? void 0 : Re,
|
|
2745
2745
|
multiple: b,
|
|
2746
|
-
color:
|
|
2747
|
-
variant:
|
|
2746
|
+
color: D,
|
|
2747
|
+
variant: O,
|
|
2748
2748
|
searchable: Le,
|
|
2749
|
-
command:
|
|
2750
|
-
virtual:
|
|
2751
|
-
portal:
|
|
2752
|
-
searchValue:
|
|
2753
|
-
loading:
|
|
2749
|
+
command: L,
|
|
2750
|
+
virtual: F,
|
|
2751
|
+
portal: te,
|
|
2752
|
+
searchValue: we,
|
|
2753
|
+
loading: M,
|
|
2754
2754
|
loadingText: T,
|
|
2755
|
-
|
|
2756
|
-
renderOption:
|
|
2755
|
+
emptyText: mt,
|
|
2756
|
+
renderOption: fe,
|
|
2757
2757
|
selectedValue: $e,
|
|
2758
|
-
selectedValues:
|
|
2758
|
+
selectedValues: G,
|
|
2759
2759
|
activeIndex: We,
|
|
2760
|
-
visualActiveIndex:
|
|
2761
|
-
className:
|
|
2760
|
+
visualActiveIndex: Ie ? We : -1,
|
|
2761
|
+
className: ve,
|
|
2762
2762
|
setDropdownRef: ft,
|
|
2763
2763
|
onSelect: rt,
|
|
2764
2764
|
onSelectGroup: it,
|
|
2765
2765
|
onMouseEnter: ct,
|
|
2766
2766
|
onSearchChange: lt
|
|
2767
|
-
}, vt = /* @__PURE__ */ r(t, { children: [s && b &&
|
|
2767
|
+
}, vt = /* @__PURE__ */ r(t, { children: [s && b && G.length > 0 && /* @__PURE__ */ n(t, { children: G.map((e) => /* @__PURE__ */ n("input", {
|
|
2768
2768
|
type: "hidden",
|
|
2769
2769
|
name: s,
|
|
2770
2770
|
value: e,
|
|
2771
|
-
disabled:
|
|
2771
|
+
disabled: je
|
|
2772
2772
|
}, e)) }), s && !b && /* @__PURE__ */ n("input", {
|
|
2773
2773
|
type: "hidden",
|
|
2774
2774
|
name: s,
|
|
2775
2775
|
value: $e,
|
|
2776
|
-
disabled:
|
|
2777
|
-
})] }), yt = kn(e), bt = /* @__PURE__ */ r(
|
|
2776
|
+
disabled: je
|
|
2777
|
+
})] }), yt = kn(e), bt = /* @__PURE__ */ r(an, {
|
|
2778
2778
|
value: {
|
|
2779
2779
|
triggerProps: gt,
|
|
2780
2780
|
contentProps: _t
|
|
2781
2781
|
},
|
|
2782
2782
|
children: [vt, yt ? e : /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(In, {}), /* @__PURE__ */ n(un, { children: e })] })]
|
|
2783
|
-
}), xt = /* @__PURE__ */ r(
|
|
2783
|
+
}), xt = /* @__PURE__ */ r(an, {
|
|
2784
2784
|
value: {
|
|
2785
2785
|
triggerProps: gt,
|
|
2786
2786
|
contentProps: _t
|
|
@@ -2791,15 +2791,15 @@ var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label":
|
|
|
2791
2791
|
/* @__PURE__ */ n(dn, { ..._t })
|
|
2792
2792
|
]
|
|
2793
2793
|
});
|
|
2794
|
-
return !
|
|
2795
|
-
id:
|
|
2794
|
+
return !U && be ? e ? bt : xt : /* @__PURE__ */ n(Dn, {
|
|
2795
|
+
id: Se,
|
|
2796
2796
|
label: i,
|
|
2797
2797
|
description: a,
|
|
2798
|
-
error:
|
|
2799
|
-
required:
|
|
2800
|
-
disabled:
|
|
2798
|
+
error: R,
|
|
2799
|
+
required: Me,
|
|
2800
|
+
disabled: je,
|
|
2801
2801
|
bindControl: !1,
|
|
2802
|
-
className:
|
|
2802
|
+
className: ge,
|
|
2803
2803
|
children: e ? bt : xt
|
|
2804
2804
|
});
|
|
2805
2805
|
};
|
|
@@ -2810,7 +2810,7 @@ function zn(e, t) {
|
|
|
2810
2810
|
//#endregion
|
|
2811
2811
|
//#region src/components/Select/Trigger/SelectIcon.tsx
|
|
2812
2812
|
var Bn = ({ children: e, className: t }) => {
|
|
2813
|
-
let { triggerProps: r } =
|
|
2813
|
+
let { triggerProps: r } = on();
|
|
2814
2814
|
return /* @__PURE__ */ n("span", {
|
|
2815
2815
|
className: P(X.arrow, { [X.open]: r.isOpen }, t),
|
|
2816
2816
|
"aria-hidden": "true",
|
|
@@ -2821,7 +2821,7 @@ Bn.__velliraSelectPart = "icon", Bn.displayName = "Select.Icon";
|
|
|
2821
2821
|
//#endregion
|
|
2822
2822
|
//#region src/components/Select/Trigger/SelectValue.tsx
|
|
2823
2823
|
var Vn = ({ children: e, className: t }) => {
|
|
2824
|
-
let { triggerProps: r } =
|
|
2824
|
+
let { triggerProps: r } = on();
|
|
2825
2825
|
return /* @__PURE__ */ n("span", {
|
|
2826
2826
|
className: P(X.valueWrap, t),
|
|
2827
2827
|
children: /* @__PURE__ */ n("span", {
|
|
@@ -3010,13 +3010,13 @@ var qn = 8, Jn = 360, Yn = () => {
|
|
|
3010
3010
|
style: i
|
|
3011
3011
|
}), [i]);
|
|
3012
3012
|
}, Xn = {
|
|
3013
|
-
list: "
|
|
3014
|
-
vertical: "
|
|
3015
|
-
line: "
|
|
3016
|
-
pills: "
|
|
3017
|
-
segmented: "
|
|
3018
|
-
scrollable: "
|
|
3019
|
-
indicator: "
|
|
3013
|
+
list: "_list_j3cp3_1",
|
|
3014
|
+
vertical: "_vertical_j3cp3_10",
|
|
3015
|
+
line: "_line_j3cp3_17",
|
|
3016
|
+
pills: "_pills_j3cp3_25",
|
|
3017
|
+
segmented: "_segmented_j3cp3_29",
|
|
3018
|
+
scrollable: "_scrollable_j3cp3_37",
|
|
3019
|
+
indicator: "_indicator_j3cp3_46"
|
|
3020
3020
|
}, Zn = ({ className: e, style: t, ...r }) => {
|
|
3021
3021
|
let { ref: i, style: a } = Yn();
|
|
3022
3022
|
return /* @__PURE__ */ n("span", {
|
|
@@ -3124,7 +3124,7 @@ var $n = (e) => [...e].sort((e, t) => {
|
|
|
3124
3124
|
tabs: "_tabs_1hj56_1",
|
|
3125
3125
|
vertical: "_vertical_1hj56_30"
|
|
3126
3126
|
}, rr = ({ children: e, value: t, defaultValue: r, onValueChange: i, orientation: a = "horizontal", activationMode: o = "automatic", dir: s = "ltr", loop: c = !0, variant: l = "line", color: d = "primary", size: m = "md", keepMounted: h = !1, lazyMount: v = !1, disabled: y = !1, className: b, ...x }) => {
|
|
3127
|
-
let S = p(), C = t !== void 0, { value: w, setValue: T } =
|
|
3127
|
+
let S = p(), C = t !== void 0, { value: w, setValue: T } = U({
|
|
3128
3128
|
value: t,
|
|
3129
3129
|
defaultValue: r,
|
|
3130
3130
|
onValueChange: i
|
|
@@ -3222,20 +3222,20 @@ var $n = (e) => [...e].sort((e, t) => {
|
|
|
3222
3222
|
};
|
|
3223
3223
|
rr.displayName = "Tabs";
|
|
3224
3224
|
var ir = {
|
|
3225
|
-
trigger: "
|
|
3226
|
-
iconOnly: "
|
|
3227
|
-
icon: "
|
|
3228
|
-
body: "
|
|
3229
|
-
label: "
|
|
3230
|
-
description: "
|
|
3231
|
-
badge: "
|
|
3232
|
-
sm: "
|
|
3233
|
-
md: "
|
|
3234
|
-
lg: "
|
|
3235
|
-
segmented: "
|
|
3236
|
-
line: "
|
|
3237
|
-
pills: "
|
|
3238
|
-
vertical: "
|
|
3225
|
+
trigger: "_trigger_uc2y5_1",
|
|
3226
|
+
iconOnly: "_iconOnly_uc2y5_49",
|
|
3227
|
+
icon: "_icon_uc2y5_49",
|
|
3228
|
+
body: "_body_uc2y5_69",
|
|
3229
|
+
label: "_label_uc2y5_77",
|
|
3230
|
+
description: "_description_uc2y5_84",
|
|
3231
|
+
badge: "_badge_uc2y5_90",
|
|
3232
|
+
sm: "_sm_uc2y5_105",
|
|
3233
|
+
md: "_md_uc2y5_123",
|
|
3234
|
+
lg: "_lg_uc2y5_127",
|
|
3235
|
+
segmented: "_segmented_uc2y5_149",
|
|
3236
|
+
line: "_line_uc2y5_194",
|
|
3237
|
+
pills: "_pills_uc2y5_209",
|
|
3238
|
+
vertical: "_vertical_uc2y5_235"
|
|
3239
3239
|
}, ar = ({ children: e, className: t }) => /* @__PURE__ */ n("span", {
|
|
3240
3240
|
className: P(ir.badge, t),
|
|
3241
3241
|
children: e
|
|
@@ -3252,19 +3252,19 @@ or.displayName = "Tabs.Icon";
|
|
|
3252
3252
|
//#endregion
|
|
3253
3253
|
//#region src/components/Tabs/Trigger/TabsTrigger.tsx
|
|
3254
3254
|
var sr = c(({ value: e, children: t, className: a, disabled: o = !1, icon: s, badge: c, description: d, onClick: f, onKeyDown: p, ...m }, h) => {
|
|
3255
|
-
let { value: g, focusedValue: _, setValue: v, setFocusedValue: y, orientation: b, variant: x, size: S, disabled: C, registerTrigger: w, onTriggerKeyDown: T, getTriggerId: E, getContentId: D } = Wn(), O = C || o, k = g === e, A = _ === e || !_ && k, j = i.toArray(t).some((e) => l(e) && e.type.displayName === "Tabs.Icon"),
|
|
3256
|
-
process.env.NODE_ENV !== "production" &&
|
|
3257
|
-
let
|
|
3255
|
+
let { value: g, focusedValue: _, setValue: v, setFocusedValue: y, orientation: b, variant: x, size: S, disabled: C, registerTrigger: w, onTriggerKeyDown: T, getTriggerId: E, getContentId: D } = Wn(), O = C || o, k = g === e, A = _ === e || !_ && k, j = i.toArray(t), M = j.some((e) => l(e) && e.type.displayName === "Tabs.Icon"), N = !!s, F = (N || M) && t == null;
|
|
3256
|
+
process.env.NODE_ENV !== "production" && N && M && console.warn(`Tabs.Trigger value "${e}" received both icon and Tabs.Icon. Tabs.Icon takes precedence.`);
|
|
3257
|
+
let I = u((t) => {
|
|
3258
3258
|
w(e, t, O), typeof h == "function" ? h(t) : h && (h.current = t);
|
|
3259
3259
|
}, [
|
|
3260
3260
|
O,
|
|
3261
3261
|
h,
|
|
3262
3262
|
w,
|
|
3263
3263
|
e
|
|
3264
|
-
]),
|
|
3264
|
+
]), L = N && !M || c || d, R = j.every((e) => typeof e == "string" || typeof e == "number");
|
|
3265
3265
|
return /* @__PURE__ */ r("button", {
|
|
3266
3266
|
...m,
|
|
3267
|
-
ref:
|
|
3267
|
+
ref: I,
|
|
3268
3268
|
type: "button",
|
|
3269
3269
|
role: "tab",
|
|
3270
3270
|
id: E(e),
|
|
@@ -3275,7 +3275,7 @@ var sr = c(({ value: e, children: t, className: a, disabled: o = !1, icon: s, ba
|
|
|
3275
3275
|
"data-state": k ? "active" : "inactive",
|
|
3276
3276
|
"data-orientation": b,
|
|
3277
3277
|
"data-disabled": O ? "" : void 0,
|
|
3278
|
-
className: P(ir.trigger, ir[x], ir[S], b === "vertical" && ir.vertical,
|
|
3278
|
+
className: P(ir.trigger, ir[x], ir[S], b === "vertical" && ir.vertical, N && ir.withIcon, F && ir.iconOnly, a),
|
|
3279
3279
|
onClick: (t) => {
|
|
3280
3280
|
f?.(t), !(t.defaultPrevented || O) && (y(e), v(e));
|
|
3281
3281
|
},
|
|
@@ -3283,12 +3283,12 @@ var sr = c(({ value: e, children: t, className: a, disabled: o = !1, icon: s, ba
|
|
|
3283
3283
|
p?.(e), !e.defaultPrevented && T(e);
|
|
3284
3284
|
},
|
|
3285
3285
|
children: [
|
|
3286
|
-
|
|
3286
|
+
N && !M && /* @__PURE__ */ n("span", {
|
|
3287
3287
|
className: ir.icon,
|
|
3288
3288
|
"aria-hidden": "true",
|
|
3289
3289
|
children: s
|
|
3290
3290
|
}),
|
|
3291
|
-
t != null && (
|
|
3291
|
+
t != null && (L ? /* @__PURE__ */ r("span", {
|
|
3292
3292
|
className: ir.body,
|
|
3293
3293
|
children: [/* @__PURE__ */ n("span", {
|
|
3294
3294
|
className: ir.label,
|
|
@@ -3297,6 +3297,9 @@ var sr = c(({ value: e, children: t, className: a, disabled: o = !1, icon: s, ba
|
|
|
3297
3297
|
className: ir.description,
|
|
3298
3298
|
children: d
|
|
3299
3299
|
})]
|
|
3300
|
+
}) : R ? /* @__PURE__ */ n("span", {
|
|
3301
|
+
className: ir.label,
|
|
3302
|
+
children: t
|
|
3300
3303
|
}) : t),
|
|
3301
3304
|
c != null && /* @__PURE__ */ n("span", {
|
|
3302
3305
|
className: ir.badge,
|
|
@@ -3431,7 +3434,7 @@ function xr({ context: e, delay: t, disabled: n, interactive: r }) {
|
|
|
3431
3434
|
//#endregion
|
|
3432
3435
|
//#region src/components/Tooltip/internal/useTooltipPosition.ts
|
|
3433
3436
|
function Sr({ open: e, onOpenChange: t, placement: n, offset: r, avoidCollisions: i, matchTriggerWidth: a }) {
|
|
3434
|
-
let o = g(null), s =
|
|
3437
|
+
let o = g(null), s = tt({
|
|
3435
3438
|
open: e,
|
|
3436
3439
|
onOpenChange: t,
|
|
3437
3440
|
placement: n,
|
|
@@ -3450,7 +3453,7 @@ function Sr({ open: e, onOpenChange: t, placement: n, offset: r, avoidCollisions
|
|
|
3450
3453
|
//#endregion
|
|
3451
3454
|
//#region src/components/Tooltip/Root/TooltipRoot.tsx
|
|
3452
3455
|
var Cr = ({ children: e, open: t, defaultOpen: r = !1, onOpenChange: i, placement: a = "top", offset: o = 8, delay: s, skipDelay: c, disabled: l = !1, interactive: u = !1, avoidCollisions: d = !0, matchTriggerWidth: f = !1, modal: m = !1 }) => {
|
|
3453
|
-
let h = `${p()}-content`, _ = g(null), v = g(null), [y, b] =
|
|
3456
|
+
let h = `${p()}-content`, _ = g(null), v = g(null), [y, b] = _e({
|
|
3454
3457
|
value: t,
|
|
3455
3458
|
defaultValue: r,
|
|
3456
3459
|
onChange: i
|
|
@@ -3468,11 +3471,11 @@ var Cr = ({ children: e, open: t, defaultOpen: r = !1, onOpenChange: i, placemen
|
|
|
3468
3471
|
delay: C,
|
|
3469
3472
|
disabled: l,
|
|
3470
3473
|
interactive: u
|
|
3471
|
-
}), { isTopOverlay: T } =
|
|
3474
|
+
}), { isTopOverlay: T } = ue({
|
|
3472
3475
|
active: y,
|
|
3473
3476
|
id: h
|
|
3474
3477
|
});
|
|
3475
|
-
return
|
|
3478
|
+
return ce({
|
|
3476
3479
|
active: y,
|
|
3477
3480
|
contentRef: _,
|
|
3478
3481
|
ignoreRefs: [v],
|
|
@@ -3585,7 +3588,7 @@ var Er = (e, t) => {
|
|
|
3585
3588
|
return;
|
|
3586
3589
|
}
|
|
3587
3590
|
L?.props.onClick?.(e), e.defaultPrevented || w?.(e);
|
|
3588
|
-
},
|
|
3591
|
+
}, V = /* @__PURE__ */ r(t, { children: [
|
|
3589
3592
|
f && (g ? /* @__PURE__ */ n("span", {
|
|
3590
3593
|
className: Z.icon,
|
|
3591
3594
|
"aria-hidden": "true",
|
|
@@ -3631,7 +3634,7 @@ var Er = (e, t) => {
|
|
|
3631
3634
|
onClick: oe,
|
|
3632
3635
|
tabIndex: B ? -1 : L.props.tabIndex,
|
|
3633
3636
|
title: y || L.props.title,
|
|
3634
|
-
children:
|
|
3637
|
+
children: V
|
|
3635
3638
|
}) : D ? /* @__PURE__ */ n("a", {
|
|
3636
3639
|
ref: I,
|
|
3637
3640
|
href: B ? void 0 : D,
|
|
@@ -3648,7 +3651,7 @@ var Er = (e, t) => {
|
|
|
3648
3651
|
"aria-busy": f || void 0,
|
|
3649
3652
|
className: ie,
|
|
3650
3653
|
title: y,
|
|
3651
|
-
children:
|
|
3654
|
+
children: V
|
|
3652
3655
|
}) : /* @__PURE__ */ n("button", {
|
|
3653
3656
|
...F,
|
|
3654
3657
|
ref: I,
|
|
@@ -3663,7 +3666,7 @@ var Er = (e, t) => {
|
|
|
3663
3666
|
"aria-busy": f || void 0,
|
|
3664
3667
|
className: ie,
|
|
3665
3668
|
title: y,
|
|
3666
|
-
children:
|
|
3669
|
+
children: V
|
|
3667
3670
|
});
|
|
3668
3671
|
});
|
|
3669
3672
|
Dr.displayName = "Button";
|
|
@@ -3725,7 +3728,7 @@ var Q = {
|
|
|
3725
3728
|
E,
|
|
3726
3729
|
N,
|
|
3727
3730
|
F
|
|
3728
|
-
].filter(Boolean).join(" "), [L, R] =
|
|
3731
|
+
].filter(Boolean).join(" "), [L, R] = _e({
|
|
3729
3732
|
value: s,
|
|
3730
3733
|
defaultValue: m,
|
|
3731
3734
|
onChange: S
|
|
@@ -3871,39 +3874,39 @@ var $ = {
|
|
|
3871
3874
|
r < n.length && (i += e);
|
|
3872
3875
|
}
|
|
3873
3876
|
return i;
|
|
3874
|
-
}, Ir = (e, t) => t ? typeof t == "function" ? t(e) : Fr(e, t) : e, Lr = c(({ id: e, label: i, name: a, description: o, placeholder: s, value: c, defaultValue: l, type: d = "text", size: f, color: m = "primary", variant: h = "outline", error: v, invalid: y = !1, disabled: b = !1, required: x = !1, loading: S = !1, className: w, wrapperClassName: T, autoComplete: E, readOnly: D = !1, clearable: O = !1, onClear: k, onValueChange: A, revealPassword: j = !1, showCounter: M = !1, startIcon: N, endIcon: F, startAddon: I, endAddon: L, prefix: R, suffix: z, clearIcon: ee, mask: B, format: te, parse: ne, startIconTone: re = "default", endIconTone: ie = "default", clearIconTone: ae = "danger", autoFocus: oe, maxLength:
|
|
3875
|
-
let
|
|
3876
|
-
|
|
3877
|
-
!
|
|
3878
|
-
Re,
|
|
3877
|
+
}, Ir = (e, t) => t ? typeof t == "function" ? t(e) : Fr(e, t) : e, Lr = c(({ id: e, label: i, name: a, description: o, placeholder: s, value: c, defaultValue: l, type: d = "text", size: f, color: m = "primary", variant: h = "outline", error: v, invalid: y = !1, disabled: b = !1, required: x = !1, loading: S = !1, className: w, wrapperClassName: T, autoComplete: E, readOnly: D = !1, clearable: O = !1, onClear: k, onValueChange: A, revealPassword: j = !1, showCounter: M = !1, startIcon: N, endIcon: F, startAddon: I, endAddon: L, prefix: R, suffix: z, clearIcon: ee, mask: B, format: te, parse: ne, startIconTone: re = "default", endIconTone: ie = "default", clearIconTone: ae = "danger", autoFocus: oe, maxLength: V, onMouseEnter: se, onMouseLeave: ce, "aria-describedby": le, "aria-invalid": H, "aria-labelledby": ue, ...de }, fe) => {
|
|
3878
|
+
let pe = p(), me = wn(), he = !!(i || o || v), ge = e ?? (he ? void 0 : me?.controlId) ?? pe, _e = g(null), [ve, ye] = _(!1), [be, xe] = _(l ?? ""), U = c !== void 0, Se = String((U ? c : be) ?? ""), Ce = te ? te(Se) : Se, we = Se.length > 0, Te = f ?? me?.size ?? "md", Ee = y || !!v || !he && !!me?.invalid, De = b || !he && !!me?.disabled, Oe = x || !he && !!me?.required, ke = D || S, Ae = d === "password", je = Ae && j && ve ? "text" : d, Me = N ?? (d === "search" ? /* @__PURE__ */ n(C, {}) : null), Ne = F, Pe = Pr(d, E), Fe = S && !De, Ie = O && we && !De && !ke && !Fe, W = j && Ae && !De && !Fe && !Ie, Le = !Fe && !Ie && !W && !!Ne, Re = !!(M && V), ze = o ? `${ge}-description` : void 0, Be = v ? `${ge}-error` : void 0, Ve = Re ? `${ge}-counter` : void 0, G = [
|
|
3879
|
+
le,
|
|
3880
|
+
!he && !le ? me?.ariaDescribedBy : void 0,
|
|
3879
3881
|
ze,
|
|
3880
|
-
Be
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3882
|
+
Be,
|
|
3883
|
+
Ve
|
|
3884
|
+
].filter(Boolean).join(" "), K = ee ?? "×", He = !!(Me || R), Ue = !!(Ne || z || Ie || W || Fe), We = !!(Me && R), Ge = !!(Ne && z), Ke = !!(I || L), qe = u((e) => {
|
|
3885
|
+
if (_e.current = e, typeof fe == "function") {
|
|
3886
|
+
fe(e);
|
|
3884
3887
|
return;
|
|
3885
3888
|
}
|
|
3886
|
-
|
|
3887
|
-
}, [
|
|
3889
|
+
fe && (fe.current = e);
|
|
3890
|
+
}, [fe]), Je = u((e) => {
|
|
3888
3891
|
let t = Ir(ne ? ne(e.target.value) : e.target.value, B);
|
|
3889
|
-
|
|
3892
|
+
U || xe(t), A?.(t);
|
|
3890
3893
|
}, [
|
|
3891
|
-
|
|
3894
|
+
U,
|
|
3892
3895
|
B,
|
|
3893
3896
|
A,
|
|
3894
3897
|
ne
|
|
3895
|
-
]),
|
|
3896
|
-
|
|
3898
|
+
]), Ye = u(() => {
|
|
3899
|
+
U || xe(""), A?.(""), k?.(), _e.current?.focus();
|
|
3897
3900
|
}, [
|
|
3898
|
-
|
|
3901
|
+
U,
|
|
3899
3902
|
k,
|
|
3900
3903
|
A
|
|
3901
|
-
]),
|
|
3904
|
+
]), Xe = /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("div", {
|
|
3902
3905
|
className: P($.inputGroup, $[h], $[m], {
|
|
3903
|
-
[$.hasAddons]:
|
|
3906
|
+
[$.hasAddons]: Ke,
|
|
3904
3907
|
[$.isDisabled]: De,
|
|
3905
3908
|
[$.isInvalid]: Ee,
|
|
3906
|
-
[$.isLoading]:
|
|
3909
|
+
[$.isLoading]: Fe
|
|
3907
3910
|
}),
|
|
3908
3911
|
children: [
|
|
3909
3912
|
I && /* @__PURE__ */ n("span", {
|
|
@@ -3912,10 +3915,10 @@ var $ = {
|
|
|
3912
3915
|
}),
|
|
3913
3916
|
/* @__PURE__ */ r("div", {
|
|
3914
3917
|
className: P($.inputWrapper, {
|
|
3915
|
-
[$.hasLeftAdornment]:
|
|
3916
|
-
[$.hasRightAdornment]:
|
|
3917
|
-
[$.hasStartIconAndPrefix]:
|
|
3918
|
-
[$.hasEndIconAndSuffix]:
|
|
3918
|
+
[$.hasLeftAdornment]: He,
|
|
3919
|
+
[$.hasRightAdornment]: Ue,
|
|
3920
|
+
[$.hasStartIconAndPrefix]: We,
|
|
3921
|
+
[$.hasEndIconAndSuffix]: Ge
|
|
3919
3922
|
}),
|
|
3920
3923
|
children: [
|
|
3921
3924
|
Me && /* @__PURE__ */ n("span", {
|
|
@@ -3928,27 +3931,27 @@ var $ = {
|
|
|
3928
3931
|
children: R
|
|
3929
3932
|
}),
|
|
3930
3933
|
/* @__PURE__ */ n("input", {
|
|
3931
|
-
...
|
|
3932
|
-
ref:
|
|
3933
|
-
id:
|
|
3934
|
+
...de,
|
|
3935
|
+
ref: qe,
|
|
3936
|
+
id: ge,
|
|
3934
3937
|
name: a,
|
|
3935
3938
|
type: je,
|
|
3936
3939
|
autoComplete: Pe,
|
|
3937
|
-
className: P($.input, $[
|
|
3938
|
-
value:
|
|
3939
|
-
onChange:
|
|
3940
|
+
className: P($.input, $[Te], { [$.error]: Ee }, w),
|
|
3941
|
+
value: Ce,
|
|
3942
|
+
onChange: Je,
|
|
3940
3943
|
placeholder: s,
|
|
3941
3944
|
disabled: De,
|
|
3942
3945
|
readOnly: ke,
|
|
3943
3946
|
required: Oe,
|
|
3944
3947
|
autoFocus: oe,
|
|
3945
|
-
maxLength:
|
|
3946
|
-
"aria-invalid": Ee ? !0 :
|
|
3947
|
-
"aria-labelledby":
|
|
3948
|
-
"aria-describedby":
|
|
3948
|
+
maxLength: V,
|
|
3949
|
+
"aria-invalid": Ee ? !0 : H,
|
|
3950
|
+
"aria-labelledby": ue ?? (he ? void 0 : me?.ariaLabelledBy),
|
|
3951
|
+
"aria-describedby": G || void 0,
|
|
3949
3952
|
"aria-busy": S || void 0,
|
|
3950
|
-
onMouseEnter:
|
|
3951
|
-
onMouseLeave:
|
|
3953
|
+
onMouseEnter: se,
|
|
3954
|
+
onMouseLeave: ce
|
|
3952
3955
|
}),
|
|
3953
3956
|
z && /* @__PURE__ */ n("span", {
|
|
3954
3957
|
className: $.suffix,
|
|
@@ -3957,26 +3960,26 @@ var $ = {
|
|
|
3957
3960
|
/* @__PURE__ */ r("div", {
|
|
3958
3961
|
className: $.endSlot,
|
|
3959
3962
|
children: [
|
|
3960
|
-
|
|
3963
|
+
Fe && /* @__PURE__ */ n("span", {
|
|
3961
3964
|
className: $.spinner,
|
|
3962
3965
|
"aria-hidden": "true",
|
|
3963
3966
|
"data-testid": "input-spinner"
|
|
3964
3967
|
}),
|
|
3965
|
-
|
|
3968
|
+
W && /* @__PURE__ */ n("button", {
|
|
3966
3969
|
type: "button",
|
|
3967
3970
|
className: $.iconButton,
|
|
3968
|
-
onClick: () =>
|
|
3969
|
-
"aria-label":
|
|
3970
|
-
children:
|
|
3971
|
+
onClick: () => ye((e) => !e),
|
|
3972
|
+
"aria-label": ve ? "Hide password" : "Show password",
|
|
3973
|
+
children: ve ? "Hide" : "Show"
|
|
3971
3974
|
}),
|
|
3972
|
-
|
|
3975
|
+
Ie && /* @__PURE__ */ n("button", {
|
|
3973
3976
|
type: "button",
|
|
3974
3977
|
className: P($.clearButton, Nr[ae]),
|
|
3975
|
-
onClick:
|
|
3978
|
+
onClick: Ye,
|
|
3976
3979
|
"aria-label": "Clear input",
|
|
3977
3980
|
children: K
|
|
3978
3981
|
}),
|
|
3979
|
-
|
|
3982
|
+
Le && Ne && /* @__PURE__ */ n("span", {
|
|
3980
3983
|
"aria-hidden": "true",
|
|
3981
3984
|
className: P($.endAdornment, Nr[ie]),
|
|
3982
3985
|
children: Ne
|
|
@@ -3990,34 +3993,34 @@ var $ = {
|
|
|
3990
3993
|
children: L
|
|
3991
3994
|
})
|
|
3992
3995
|
]
|
|
3993
|
-
}),
|
|
3994
|
-
id:
|
|
3996
|
+
}), Re && /* @__PURE__ */ r("div", {
|
|
3997
|
+
id: Ve,
|
|
3995
3998
|
className: $.counter,
|
|
3996
3999
|
children: [
|
|
3997
|
-
|
|
4000
|
+
Se.length,
|
|
3998
4001
|
" / ",
|
|
3999
|
-
|
|
4002
|
+
V
|
|
4000
4003
|
]
|
|
4001
4004
|
})] });
|
|
4002
|
-
return !
|
|
4003
|
-
id:
|
|
4005
|
+
return !he && me ? Xe : /* @__PURE__ */ n(Dn, {
|
|
4006
|
+
id: ge,
|
|
4004
4007
|
label: i,
|
|
4005
4008
|
description: o,
|
|
4006
4009
|
error: v,
|
|
4007
4010
|
required: Oe,
|
|
4008
4011
|
disabled: De,
|
|
4009
4012
|
invalid: Ee,
|
|
4010
|
-
size:
|
|
4013
|
+
size: Te,
|
|
4011
4014
|
className: T,
|
|
4012
4015
|
bindControl: !1,
|
|
4013
|
-
children:
|
|
4016
|
+
children: Xe
|
|
4014
4017
|
});
|
|
4015
4018
|
});
|
|
4016
4019
|
Lr.displayName = "Input";
|
|
4017
4020
|
//#endregion
|
|
4018
4021
|
//#region src/theme/ThemeContext.ts
|
|
4019
4022
|
var Rr = s(null), zr = (e) => e === "highContrast" ? "high-contrast" : e, Br = ({ theme: e, defaultTheme: t = "light", onThemeChange: r, syncDocument: i = !0, children: a }) => {
|
|
4020
|
-
let [o, s] =
|
|
4023
|
+
let [o, s] = _e({
|
|
4021
4024
|
value: e,
|
|
4022
4025
|
defaultValue: t,
|
|
4023
4026
|
onChange: r
|
|
@@ -4054,4 +4057,4 @@ function Vr() {
|
|
|
4054
4057
|
return e;
|
|
4055
4058
|
}
|
|
4056
4059
|
//#endregion
|
|
4057
|
-
export { Dr as Button, Mr as Checkbox,
|
|
4060
|
+
export { Dr as Button, Mr as Checkbox, _t as Dropdown, Dn as FormField, Lr as Input, Ht as Modal, we as Portal, Ce as PortalProvider, qt as Radio, nn as RadioGroup, Hn as Select, cr as Tabs, Br as ThemeProvider, Tr as Tooltip, Vr as useTheme };
|