@midas-ds/components 1.0.2 → 1.0.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/Button-B4vMZbC6.js +182 -0
- package/CHANGELOG.md +10 -0
- package/Checkbox-DnKWanep.js +402 -0
- package/{Collection-B3xUVWPF.js → Collection-COLWgm24.js} +179 -152
- package/Dialog-Cb6toyXO.js +1951 -0
- package/DragAndDrop-B0T3WgjL.js +40 -0
- package/FocusScope-C8i7CH6y.js +513 -0
- package/Form-BQQs3jUk.js +238 -0
- package/Group-CdwXhx8Q.js +42 -0
- package/{Hidden-BQWDvze4.js → Hidden-DngIphiL.js} +1 -1
- package/Link-iAZLB3RI.js +75 -0
- package/ListBox-BKWkIIm6.js +474 -0
- package/ListKeyboardDelegate-BH-K5hyq.js +172 -0
- package/{PressResponder-DP8ZDNGy.js → PressResponder-Cz-TRBHO.js} +10 -10
- package/README.md +21 -3
- package/SelectionManager-8o40f7mx.js +1047 -0
- package/Separator-BlvmQjwz.js +49 -0
- package/Tag--W5TgxmK.js +728 -0
- package/Text-CQPW6xs7.js +15 -0
- package/TextField-DeK_yiK-.js +225 -0
- package/TextField.module-0-u4LVPp.js +143 -0
- package/{VisuallyHidden-B_XzVvlX.js → VisuallyHidden-CFx06Bae.js} +1 -1
- package/{context-ScOIq_Gu.js → context-Bnqknrce.js} +1 -1
- package/index-B-jHjTDC.js +120 -0
- package/{index-CorR1LBD.js → index-BPdc9gJ8.js} +3 -3
- package/index-DK9ZACEc.js +642 -0
- package/{index-Dl1Q-tbj.js → index-KSgQWWiy.js} +5315 -5315
- package/index.js +45 -47
- package/index15.js +1 -1
- package/index16.js +1 -1
- package/index25.js +1 -1
- package/index26.js +1 -1
- package/index3.js +2 -4
- package/index31.js +3 -3
- package/index32.js +2 -2
- package/index33.js +2 -2
- package/index34.js +1 -1
- package/index35.js +1 -1
- package/index36.js +1 -1
- package/index37.js +1 -1
- package/index38.js +1 -1
- package/index39.js +1 -1
- package/index40.js +1 -1
- package/index41.js +1 -1
- package/index42.js +1 -1
- package/index43.js +1 -1
- package/index45.js +3 -3
- package/index5.js +1 -1
- package/index50.js +1 -1
- package/index52.js +3 -3
- package/index53.js +3 -3
- package/index54.js +1 -1
- package/index55.js +4 -4
- package/index56.js +1 -1
- package/index57.js +1 -1
- package/index58.js +1 -1
- package/index59.js +3 -3
- package/index60.js +1 -1
- package/index61.js +1 -1
- package/index62.js +1 -1
- package/index63.js +4 -4
- package/index64.js +3 -3
- package/index65.js +3 -3
- package/index66.js +1 -1
- package/index67.js +3 -3
- package/index68.js +2 -2
- package/index69.js +1 -1
- package/index71.js +1 -1
- package/index76.js +5 -5
- package/index77.js +2 -2
- package/index78.js +2 -2
- package/index79.js +1 -1
- package/index80.js +226 -227
- package/index81.js +197 -199
- package/index82.js +192 -195
- package/index83.js +181 -183
- package/index84.js +52 -54
- package/index85.js +261 -262
- package/index86.js +262 -262
- package/index87.js +209 -211
- package/index88.js +436 -440
- package/index89.js +962 -964
- package/index90.js +2401 -2399
- package/index92.js +5 -5
- package/index93.js +1 -1
- package/index94.js +1 -1
- package/link/Link.d.ts +2 -2
- package/link-button/LinkButton.d.ts +1 -1
- package/package.json +7 -1
- package/{react.esm-D8HpDGKP.js → react.esm-sMU8Z7rL.js} +1872 -1872
- package/textfield/index.d.ts +0 -2
- package/{useControlledState-S_TYcV_c.js → useControlledState-DrAoodI6.js} +1 -1
- package/{useDescription-D4_zk_sA.js → useDescription-BPs7eRff.js} +1 -1
- package/useField-Dz62UHCP.js +67 -0
- package/{useFilter-BnJDBCkt.js → useFilter-ViwzkzZe.js} +1 -1
- package/useFocusRing-BKGhL91C.js +1297 -0
- package/{useFocusable-C-N9wcwm.js → useFocusable-CRSmYEQc.js} +11 -8
- package/{useGridSelectionCheckbox-i1rsjlC-.js → useGridSelectionCheckbox-CVEvUCJL.js} +3 -3
- package/useHasTabbableChild-C8y4fwiY.js +34 -0
- package/{useHighlightSelectionDescription-JVx2MW_e.js → useHighlightSelectionDescription-CD74uzLh.js} +19 -19
- package/useListState-DKnP5TB5.js +119 -0
- package/{useLocalizedStringFormatter-DVCAZqcL.js → useLocalizedStringFormatter-DsZ-ZWSk.js} +29 -29
- package/{useSingleSelectListState-CmX9_L5H.js → useSingleSelectListState-BHTLh8Ob.js} +5 -5
- package/Button-CCevm2s3.js +0 -183
- package/Checkbox-CllWDBxF.js +0 -405
- package/Dialog-CLTyYwkS.js +0 -1889
- package/DragAndDrop-OTN7La7U.js +0 -42
- package/FocusScope-BR0SJ-cZ.js +0 -512
- package/Form-DXLoQL91.js +0 -240
- package/Group-DPMuN3h8.js +0 -44
- package/Label-C18A_4Z5.js +0 -69
- package/Link-BU1h3K2a.js +0 -77
- package/ListBox-D21tdwTs.js +0 -463
- package/ListKeyboardDelegate-DxMjfMsI.js +0 -172
- package/SelectionManager-D4WtKtey.js +0 -988
- package/Separator-DLUHK9vv.js +0 -48
- package/Tag-CEd6WWSc.js +0 -725
- package/Text-DGLaY3HR.js +0 -17
- package/TextField-C_hq9WeT.js +0 -226
- package/TextField.module-Cwq1FAm7.js +0 -141
- package/index-CEg5vZQH.js +0 -132
- package/index-CgfokhRq.js +0 -674
- package/useFocusRing-D97-G3fT.js +0 -1324
- package/useHasTabbableChild-DeuCnGGv.js +0 -34
- package/useListState-DSOTbsL3.js +0 -119
package/index85.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsxs as be, jsx as j } from "react/jsx-runtime";
|
|
2
|
-
import W, { useRef as
|
|
3
|
-
import { b as $e, a as tu, $ as lu } from "./Button-
|
|
4
|
-
import { o as iu,
|
|
5
|
-
import { f as Cu,
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { d as Du, e as Tu, a as
|
|
10
|
-
import { e as Su, j as ku, f as Lu, g as Iu, h as Pu, i as Ku, a as Ou } from "./Dialog-
|
|
11
|
-
import { $ as Ru } from "./Text-
|
|
12
|
-
import {
|
|
13
|
-
import { $ as Vu } from "./useFilter-
|
|
14
|
-
import {
|
|
15
|
-
import { $ as Mu } from "./useSingleSelectListState-
|
|
16
|
-
import { a as ju } from "./useListState-
|
|
17
|
-
import { a as Ce, $ as zu } from "./useControlledState-
|
|
18
|
-
import { a as Nu } from "./Separator-
|
|
19
|
-
import { a as Uu } from "./ListKeyboardDelegate-
|
|
20
|
-
import { $ as _u } from "./useLocalizedStringFormatter-
|
|
21
|
-
import { I as qu } from "./TextField-
|
|
2
|
+
import W, { useRef as m, useMemo as ee, useEffect as pe, useState as Q, useCallback as se, forwardRef as ou, createContext as xe } from "react";
|
|
3
|
+
import { b as $e, a as tu, $ as lu } from "./Button-B4vMZbC6.js";
|
|
4
|
+
import { o as iu, G as cu, M as re, e as ae, a as pu, x as du, y as su, z as $u, d as ru, n as bu, A as au } from "./useFocusRing-BKGhL91C.js";
|
|
5
|
+
import { f as Cu, c as xu, $ as fu, a as hu } from "./Form-BQQs3jUk.js";
|
|
6
|
+
import { a as mu } from "./Group-CdwXhx8Q.js";
|
|
7
|
+
import { a as vu, $ as Au, b as Bu } from "./TextField.module-0-u4LVPp.js";
|
|
8
|
+
import { $ as Eu } from "./useField-Dz62UHCP.js";
|
|
9
|
+
import { d as Du, e as Tu, a as fe, $ as yu, b as Fu, c as gu } from "./ListBox-BKWkIIm6.js";
|
|
10
|
+
import { e as Su, j as ku, f as Lu, g as Iu, h as Pu, i as Ku, a as Ou } from "./Dialog-Cb6toyXO.js";
|
|
11
|
+
import { $ as Ru } from "./Text-CQPW6xs7.js";
|
|
12
|
+
import { $ as Gu } from "./Collection-COLWgm24.js";
|
|
13
|
+
import { $ as Vu } from "./useFilter-ViwzkzZe.js";
|
|
14
|
+
import { e as wu, f as he } from "./SelectionManager-8o40f7mx.js";
|
|
15
|
+
import { $ as Mu } from "./useSingleSelectListState-BHTLh8Ob.js";
|
|
16
|
+
import { a as ju } from "./useListState-DKnP5TB5.js";
|
|
17
|
+
import { a as Ce, $ as zu } from "./useControlledState-DrAoodI6.js";
|
|
18
|
+
import { a as Nu } from "./Separator-BlvmQjwz.js";
|
|
19
|
+
import { a as Uu } from "./ListKeyboardDelegate-BH-K5hyq.js";
|
|
20
|
+
import { $ as _u } from "./useLocalizedStringFormatter-DsZ-ZWSk.js";
|
|
21
|
+
import { I as qu } from "./TextField-DeK_yiK-.js";
|
|
22
22
|
import { C as Wu } from "./chevron-down-Cd1bkzXT.js";
|
|
23
|
-
import './ComboBox.css';var
|
|
24
|
-
|
|
23
|
+
import './ComboBox.css';var me = {};
|
|
24
|
+
me = {
|
|
25
25
|
buttonLabel: "عرض المقترحات",
|
|
26
26
|
countAnnouncement: (e, u) => `${u.plural(e.optionCount, {
|
|
27
27
|
one: () => `${u.number(e.optionCount)} خيار`,
|
|
@@ -640,8 +640,8 @@ He = {
|
|
|
640
640
|
listboxLabel: "Öneriler",
|
|
641
641
|
selectedAnnouncement: (e) => `${e.optionText}, seçildi`
|
|
642
642
|
};
|
|
643
|
-
var
|
|
644
|
-
|
|
643
|
+
var Xe = {};
|
|
644
|
+
Xe = {
|
|
645
645
|
buttonLabel: "Показати пропозиції",
|
|
646
646
|
countAnnouncement: (e, u) => `${u.plural(e.optionCount, {
|
|
647
647
|
one: () => `${u.number(e.optionCount)} параметр`,
|
|
@@ -660,8 +660,8 @@ Je = {
|
|
|
660
660
|
listboxLabel: "Пропозиції",
|
|
661
661
|
selectedAnnouncement: (e) => `${e.optionText}, вибрано`
|
|
662
662
|
};
|
|
663
|
-
var
|
|
664
|
-
|
|
663
|
+
var Je = {};
|
|
664
|
+
Je = {
|
|
665
665
|
buttonLabel: "显示建议",
|
|
666
666
|
countAnnouncement: (e, u) => `有 ${u.plural(e.optionCount, {
|
|
667
667
|
one: () => `${u.number(e.optionCount)} 个选项`,
|
|
@@ -702,7 +702,7 @@ Ye = {
|
|
|
702
702
|
};
|
|
703
703
|
var Qe = {};
|
|
704
704
|
Qe = {
|
|
705
|
-
"ar-AE":
|
|
705
|
+
"ar-AE": me,
|
|
706
706
|
"bg-BG": ve,
|
|
707
707
|
"cs-CZ": Ae,
|
|
708
708
|
"da-DK": Be,
|
|
@@ -733,41 +733,41 @@ Qe = {
|
|
|
733
733
|
"sr-SP": We,
|
|
734
734
|
"sv-SE": Ze,
|
|
735
735
|
"tr-TR": He,
|
|
736
|
-
"uk-UA":
|
|
737
|
-
"zh-CN":
|
|
736
|
+
"uk-UA": Xe,
|
|
737
|
+
"zh-CN": Je,
|
|
738
738
|
"zh-TW": Ye
|
|
739
739
|
};
|
|
740
740
|
function Zu(e) {
|
|
741
741
|
return e && e.__esModule ? e.default : e;
|
|
742
742
|
}
|
|
743
743
|
function Hu(e, u) {
|
|
744
|
-
let { buttonRef:
|
|
745
|
-
|
|
746
|
-
let
|
|
744
|
+
let { buttonRef: c, popoverRef: b, inputRef: l, listBoxRef: d, keyboardDelegate: f, layoutDelegate: C, shouldFocusWrap: h, isReadOnly: g, isDisabled: z } = e, v = m(null);
|
|
745
|
+
c = c ?? v;
|
|
746
|
+
let A = _u(Zu(Qe), "@react-aria/combobox"), { menuTriggerProps: B, menuProps: T } = Su({
|
|
747
747
|
type: "listbox",
|
|
748
|
-
isDisabled: z ||
|
|
749
|
-
}, u,
|
|
748
|
+
isDisabled: z || g
|
|
749
|
+
}, u, c);
|
|
750
750
|
Du.set(u, {
|
|
751
|
-
id:
|
|
751
|
+
id: T.id
|
|
752
752
|
});
|
|
753
|
-
let { collection: x } = u, { disabledKeys:
|
|
753
|
+
let { collection: x } = u, { disabledKeys: y } = u.selectionManager, t = ee(() => f || new Uu({
|
|
754
754
|
collection: x,
|
|
755
|
-
disabledKeys:
|
|
755
|
+
disabledKeys: y,
|
|
756
756
|
ref: d,
|
|
757
|
-
layoutDelegate:
|
|
757
|
+
layoutDelegate: C
|
|
758
758
|
}), [
|
|
759
|
-
|
|
760
|
-
|
|
759
|
+
f,
|
|
760
|
+
C,
|
|
761
761
|
x,
|
|
762
|
-
|
|
762
|
+
y,
|
|
763
763
|
d
|
|
764
764
|
]), { collectionProps: R } = wu({
|
|
765
765
|
selectionManager: u.selectionManager,
|
|
766
766
|
keyboardDelegate: t,
|
|
767
767
|
disallowTypeAhead: !0,
|
|
768
768
|
disallowEmptySelection: !0,
|
|
769
|
-
shouldFocusWrap:
|
|
770
|
-
ref:
|
|
769
|
+
shouldFocusWrap: h,
|
|
770
|
+
ref: l,
|
|
771
771
|
// Prevent item scroll behavior from being applied here, should be handled in the user's Popover + ListBox component
|
|
772
772
|
isVirtualized: !0
|
|
773
773
|
}), ue = iu(), ne = (n) => {
|
|
@@ -776,10 +776,10 @@ function Hu(e, u) {
|
|
|
776
776
|
case "Enter":
|
|
777
777
|
case "Tab":
|
|
778
778
|
if (u.isOpen && n.key === "Enter" && n.preventDefault(), u.isOpen && d.current && u.selectionManager.focusedKey != null && u.selectionManager.isLink(u.selectionManager.focusedKey)) {
|
|
779
|
-
let
|
|
780
|
-
if (n.key === "Enter" &&
|
|
779
|
+
let i = d.current.querySelector(`[data-key="${CSS.escape(u.selectionManager.focusedKey.toString())}"]`);
|
|
780
|
+
if (n.key === "Enter" && i instanceof HTMLAnchorElement) {
|
|
781
781
|
let p = u.collection.getItem(u.selectionManager.focusedKey);
|
|
782
|
-
p && ue.open(
|
|
782
|
+
p && ue.open(i, n, p.props.href, p.props.routerOptions);
|
|
783
783
|
}
|
|
784
784
|
u.close();
|
|
785
785
|
} else u.commit();
|
|
@@ -799,127 +799,127 @@ function Hu(e, u) {
|
|
|
799
799
|
break;
|
|
800
800
|
}
|
|
801
801
|
}, G = (n) => {
|
|
802
|
-
var
|
|
803
|
-
let p = (
|
|
804
|
-
p ||
|
|
802
|
+
var i;
|
|
803
|
+
let p = (c == null ? void 0 : c.current) && c.current === n.relatedTarget, I = (i = b.current) === null || i === void 0 ? void 0 : i.contains(n.relatedTarget);
|
|
804
|
+
p || I || (e.onBlur && e.onBlur(n), u.setFocused(!1));
|
|
805
805
|
}, N = (n) => {
|
|
806
806
|
u.isFocused || (e.onFocus && e.onFocus(n), u.setFocused(!0));
|
|
807
|
-
}, { isInvalid: U, validationErrors: s, validationDetails: _ } = u.displayValidation, { labelProps:
|
|
807
|
+
}, { isInvalid: U, validationErrors: s, validationDetails: _ } = u.displayValidation, { labelProps: E, inputProps: D, descriptionProps: Z, errorMessageProps: oe } = vu({
|
|
808
808
|
...e,
|
|
809
809
|
onChange: u.setInputValue,
|
|
810
|
-
onKeyDown:
|
|
810
|
+
onKeyDown: g ? e.onKeyDown : cu(u.isOpen && R.onKeyDown, ne, e.onKeyDown),
|
|
811
811
|
onBlur: G,
|
|
812
812
|
value: u.inputValue,
|
|
813
813
|
onFocus: N,
|
|
814
814
|
autoComplete: "off",
|
|
815
815
|
validate: void 0,
|
|
816
816
|
[Cu]: u
|
|
817
|
-
},
|
|
817
|
+
}, l), V = (n) => {
|
|
818
818
|
if (n.pointerType === "touch") {
|
|
819
|
-
var
|
|
820
|
-
(
|
|
819
|
+
var i;
|
|
820
|
+
(i = l.current) === null || i === void 0 || i.focus(), u.toggle(null, "manual");
|
|
821
821
|
}
|
|
822
822
|
}, H = (n) => {
|
|
823
823
|
if (n.pointerType !== "touch") {
|
|
824
|
-
var
|
|
825
|
-
(
|
|
824
|
+
var i;
|
|
825
|
+
(i = l.current) === null || i === void 0 || i.focus(), u.toggle(n.pointerType === "keyboard" || n.pointerType === "virtual" ? "first" : null, "manual");
|
|
826
826
|
}
|
|
827
827
|
}, $ = Ce({
|
|
828
|
-
id:
|
|
829
|
-
"aria-label":
|
|
830
|
-
"aria-labelledby": e["aria-labelledby"] ||
|
|
831
|
-
}),
|
|
832
|
-
id:
|
|
833
|
-
"aria-label":
|
|
834
|
-
"aria-labelledby": e["aria-labelledby"] ||
|
|
835
|
-
}), P =
|
|
836
|
-
if (z ||
|
|
828
|
+
id: B.id,
|
|
829
|
+
"aria-label": A.format("buttonLabel"),
|
|
830
|
+
"aria-labelledby": e["aria-labelledby"] || E.id
|
|
831
|
+
}), S = Ce({
|
|
832
|
+
id: T.id,
|
|
833
|
+
"aria-label": A.format("listboxLabel"),
|
|
834
|
+
"aria-labelledby": e["aria-labelledby"] || E.id
|
|
835
|
+
}), P = m(0), w = (n) => {
|
|
836
|
+
if (z || g) return;
|
|
837
837
|
if (n.timeStamp - P.current < 500) {
|
|
838
|
-
var
|
|
839
|
-
n.preventDefault(), (
|
|
838
|
+
var i;
|
|
839
|
+
n.preventDefault(), (i = l.current) === null || i === void 0 || i.focus();
|
|
840
840
|
return;
|
|
841
841
|
}
|
|
842
|
-
let p = n.target.getBoundingClientRect(),
|
|
843
|
-
if (
|
|
842
|
+
let p = n.target.getBoundingClientRect(), I = n.changedTouches[0], ie = Math.ceil(p.left + 0.5 * p.width), de = Math.ceil(p.top + 0.5 * p.height);
|
|
843
|
+
if (I.clientX === ie && I.clientY === de) {
|
|
844
844
|
var ce;
|
|
845
|
-
n.preventDefault(), (ce =
|
|
845
|
+
n.preventDefault(), (ce = l.current) === null || ce === void 0 || ce.focus(), u.toggle(null, "manual"), P.current = n.timeStamp;
|
|
846
846
|
}
|
|
847
|
-
},
|
|
848
|
-
var
|
|
849
|
-
let K = (
|
|
847
|
+
}, F = u.selectionManager.focusedKey != null && u.isOpen ? u.collection.getItem(u.selectionManager.focusedKey) : void 0;
|
|
848
|
+
var k;
|
|
849
|
+
let K = (k = F == null ? void 0 : F.parentKey) !== null && k !== void 0 ? k : null;
|
|
850
850
|
var M;
|
|
851
|
-
let O = (M = u.selectionManager.focusedKey) !== null && M !== void 0 ? M : null,
|
|
851
|
+
let O = (M = u.selectionManager.focusedKey) !== null && M !== void 0 ? M : null, X = m(K), J = m(O);
|
|
852
852
|
pe(() => {
|
|
853
|
-
if (re() &&
|
|
854
|
-
let
|
|
853
|
+
if (re() && F != null && O != null && O !== J.current) {
|
|
854
|
+
let i = u.selectionManager.isSelected(O), p = K != null ? u.collection.getItem(K) : null, I = (p == null ? void 0 : p["aria-label"]) || (typeof (p == null ? void 0 : p.rendered) == "string" ? p.rendered : "") || "";
|
|
855
855
|
var n;
|
|
856
|
-
let ie =
|
|
857
|
-
isGroupChange: (n = p && K !==
|
|
858
|
-
groupTitle:
|
|
856
|
+
let ie = A.format("focusAnnouncement", {
|
|
857
|
+
isGroupChange: (n = p && K !== X.current) !== null && n !== void 0 ? n : !1,
|
|
858
|
+
groupTitle: I,
|
|
859
859
|
groupCount: p ? [
|
|
860
|
-
...
|
|
860
|
+
...he(p, u.collection)
|
|
861
861
|
].length : 0,
|
|
862
|
-
optionText:
|
|
863
|
-
isSelected:
|
|
862
|
+
optionText: F["aria-label"] || F.textValue || "",
|
|
863
|
+
isSelected: i
|
|
864
864
|
});
|
|
865
865
|
$e(ie);
|
|
866
866
|
}
|
|
867
|
-
|
|
867
|
+
X.current = K, J.current = O;
|
|
868
868
|
});
|
|
869
|
-
let
|
|
869
|
+
let L = Nu(u.collection), Y = m(L), te = m(u.isOpen);
|
|
870
870
|
pe(() => {
|
|
871
871
|
let n = u.isOpen !== te.current && (u.selectionManager.focusedKey == null || re());
|
|
872
|
-
if (u.isOpen && (n ||
|
|
873
|
-
let
|
|
874
|
-
optionCount:
|
|
872
|
+
if (u.isOpen && (n || L !== Y.current)) {
|
|
873
|
+
let i = A.format("countAnnouncement", {
|
|
874
|
+
optionCount: L
|
|
875
875
|
});
|
|
876
|
-
$e(
|
|
876
|
+
$e(i);
|
|
877
877
|
}
|
|
878
|
-
Y.current =
|
|
878
|
+
Y.current = L, te.current = u.isOpen;
|
|
879
879
|
});
|
|
880
|
-
let le =
|
|
880
|
+
let le = m(u.selectedKey);
|
|
881
881
|
return pe(() => {
|
|
882
882
|
if (re() && u.isFocused && u.selectedItem && u.selectedKey !== le.current) {
|
|
883
|
-
let n = u.selectedItem["aria-label"] || u.selectedItem.textValue || "",
|
|
883
|
+
let n = u.selectedItem["aria-label"] || u.selectedItem.textValue || "", i = A.format("selectedAnnouncement", {
|
|
884
884
|
optionText: n
|
|
885
885
|
});
|
|
886
|
-
$e(
|
|
886
|
+
$e(i);
|
|
887
887
|
}
|
|
888
888
|
le.current = u.selectedKey;
|
|
889
889
|
}), pe(() => {
|
|
890
890
|
if (u.isOpen) return ku([
|
|
891
|
-
|
|
891
|
+
l.current,
|
|
892
892
|
b.current
|
|
893
893
|
].filter((n) => n != null));
|
|
894
894
|
}, [
|
|
895
895
|
u.isOpen,
|
|
896
|
-
|
|
896
|
+
l,
|
|
897
897
|
b
|
|
898
898
|
]), {
|
|
899
|
-
labelProps:
|
|
899
|
+
labelProps: E,
|
|
900
900
|
buttonProps: {
|
|
901
|
-
...
|
|
901
|
+
...B,
|
|
902
902
|
...$,
|
|
903
903
|
excludeFromTabOrder: !0,
|
|
904
904
|
preventFocusOnPress: !0,
|
|
905
905
|
onPress: V,
|
|
906
906
|
onPressStart: H,
|
|
907
|
-
isDisabled: z ||
|
|
907
|
+
isDisabled: z || g
|
|
908
908
|
},
|
|
909
|
-
inputProps: ae(
|
|
909
|
+
inputProps: ae(D, {
|
|
910
910
|
role: "combobox",
|
|
911
|
-
"aria-expanded":
|
|
912
|
-
"aria-controls": u.isOpen ?
|
|
911
|
+
"aria-expanded": B["aria-expanded"],
|
|
912
|
+
"aria-controls": u.isOpen ? T.id : void 0,
|
|
913
913
|
// TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
|
|
914
914
|
"aria-autocomplete": "list",
|
|
915
|
-
"aria-activedescendant":
|
|
915
|
+
"aria-activedescendant": F ? Tu(u, F.key) : void 0,
|
|
916
916
|
onTouchEnd: w,
|
|
917
917
|
// This disable's iOS's autocorrect suggestions, since the combo box provides its own suggestions.
|
|
918
918
|
autoCorrect: "off",
|
|
919
919
|
// This disable's the macOS Safari spell check auto corrections.
|
|
920
920
|
spellCheck: "false"
|
|
921
921
|
}),
|
|
922
|
-
listBoxProps: ae(
|
|
922
|
+
listBoxProps: ae(T, S, {
|
|
923
923
|
autoFocus: u.focusStrategy,
|
|
924
924
|
shouldUseVirtualFocus: !0,
|
|
925
925
|
shouldSelectOnPressUp: !0,
|
|
@@ -933,73 +933,73 @@ function Hu(e, u) {
|
|
|
933
933
|
validationDetails: _
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function Xu(e) {
|
|
937
937
|
var u;
|
|
938
|
-
let { defaultFilter:
|
|
939
|
-
e.onSelectionChange && e.onSelectionChange(o), o === t && (O(),
|
|
938
|
+
let { defaultFilter: c, menuTrigger: b = "input", allowsEmptyCollection: l = !1, allowsCustomValue: d, shouldCloseOnBlur: f = !0 } = e, [C, h] = Q(!1), [g, z] = Q(!1), [v, A] = Q(null), B = (o) => {
|
|
939
|
+
e.onSelectionChange && e.onSelectionChange(o), o === t && (O(), k());
|
|
940
940
|
};
|
|
941
|
-
var
|
|
942
|
-
let { collection: x, selectionManager:
|
|
941
|
+
var T;
|
|
942
|
+
let { collection: x, selectionManager: y, selectedKey: t, setSelectedKey: R, selectedItem: ue, disabledKeys: ne } = Mu({
|
|
943
943
|
...e,
|
|
944
|
-
onSelectionChange:
|
|
945
|
-
items: (
|
|
944
|
+
onSelectionChange: B,
|
|
945
|
+
items: (T = e.items) !== null && T !== void 0 ? T : e.defaultItems
|
|
946
946
|
}), G = e.defaultInputValue;
|
|
947
947
|
if (G == null) {
|
|
948
948
|
var N, U;
|
|
949
949
|
t == null ? G = "" : G = (U = (N = x.getItem(t)) === null || N === void 0 ? void 0 : N.textValue) !== null && U !== void 0 ? U : "";
|
|
950
950
|
}
|
|
951
|
-
let [s, _] = zu(e.inputValue, G, e.onInputChange),
|
|
951
|
+
let [s, _] = zu(e.inputValue, G, e.onInputChange), E = x, D = ee(() => (
|
|
952
952
|
// No default filter if items are controlled.
|
|
953
|
-
e.items != null || !
|
|
953
|
+
e.items != null || !c ? x : Ju(x, s, c)
|
|
954
954
|
), [
|
|
955
955
|
x,
|
|
956
956
|
s,
|
|
957
|
-
|
|
957
|
+
c,
|
|
958
958
|
e.items
|
|
959
|
-
]), [Z, oe] = Q(
|
|
959
|
+
]), [Z, oe] = Q(D), V = m("focus"), $ = Lu({
|
|
960
960
|
...e,
|
|
961
961
|
onOpenChange: (o) => {
|
|
962
|
-
e.onOpenChange && e.onOpenChange(o, o ? V.current : void 0),
|
|
962
|
+
e.onOpenChange && e.onOpenChange(o, o ? V.current : void 0), y.setFocused(o), o || y.setFocusedKey(null);
|
|
963
963
|
},
|
|
964
964
|
isOpen: void 0,
|
|
965
965
|
defaultOpen: void 0
|
|
966
|
-
}),
|
|
967
|
-
let
|
|
968
|
-
(
|
|
966
|
+
}), S = (o = null, r) => {
|
|
967
|
+
let a = r === "manual" || r === "focus" && b === "focus";
|
|
968
|
+
(l || D.size > 0 || a && E.size > 0 || e.items) && (a && !$.isOpen && e.items === void 0 && h(!0), V.current = r, A(o), $.open());
|
|
969
969
|
}, P = (o = null, r) => {
|
|
970
|
-
let
|
|
971
|
-
!(
|
|
970
|
+
let a = r === "manual" || r === "focus" && b === "focus";
|
|
971
|
+
!(l || D.size > 0 || a && E.size > 0 || e.items) && !$.isOpen || (a && !$.isOpen && e.items === void 0 && h(!0), $.isOpen || (V.current = r), F(o));
|
|
972
972
|
}, w = se(() => {
|
|
973
|
-
oe(
|
|
973
|
+
oe(C ? E : D);
|
|
974
974
|
}, [
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
]),
|
|
979
|
-
$.isOpen && w(),
|
|
975
|
+
C,
|
|
976
|
+
E,
|
|
977
|
+
D
|
|
978
|
+
]), F = se((o = null) => {
|
|
979
|
+
$.isOpen && w(), A(o), $.toggle();
|
|
980
980
|
}, [
|
|
981
981
|
$,
|
|
982
982
|
w
|
|
983
|
-
]),
|
|
983
|
+
]), k = se(() => {
|
|
984
984
|
$.isOpen && (w(), $.close());
|
|
985
985
|
}, [
|
|
986
986
|
$,
|
|
987
987
|
w
|
|
988
988
|
]), [K, M] = Q(s), O = () => {
|
|
989
989
|
var o, r;
|
|
990
|
-
let
|
|
991
|
-
M(
|
|
990
|
+
let a = t != null && (r = (o = x.getItem(t)) === null || o === void 0 ? void 0 : o.textValue) !== null && r !== void 0 ? r : "";
|
|
991
|
+
M(a), _(a);
|
|
992
992
|
};
|
|
993
|
-
var
|
|
994
|
-
let
|
|
993
|
+
var X, J;
|
|
994
|
+
let L = m((J = (X = e.selectedKey) !== null && X !== void 0 ? X : e.defaultSelectedKey) !== null && J !== void 0 ? J : null);
|
|
995
995
|
var Y;
|
|
996
|
-
let te =
|
|
996
|
+
let te = m(t != null && (Y = (u = x.getItem(t)) === null || u === void 0 ? void 0 : u.textValue) !== null && Y !== void 0 ? Y : "");
|
|
997
997
|
pe(() => {
|
|
998
998
|
var o;
|
|
999
|
-
|
|
999
|
+
g && (D.size > 0 || l) && !$.isOpen && s !== K && b !== "manual" && S(null, "input"), !C && !l && $.isOpen && D.size === 0 && k(), t != null && t !== L.current && k(), s !== K && (y.setFocusedKey(null), h(!1), s === "" && (e.inputValue === void 0 || e.selectedKey === void 0) && R(null)), t !== L.current && (e.inputValue === void 0 || e.selectedKey === void 0) ? O() : K !== s && M(s);
|
|
1000
1000
|
var r;
|
|
1001
|
-
let
|
|
1002
|
-
!
|
|
1001
|
+
let a = t != null && (r = (o = x.getItem(t)) === null || o === void 0 ? void 0 : o.textValue) !== null && r !== void 0 ? r : "";
|
|
1002
|
+
!g && t != null && e.inputValue === void 0 && t === L.current && te.current !== a && (M(a), _(a)), L.current = t, te.current = a;
|
|
1003
1003
|
});
|
|
1004
1004
|
let le = xu({
|
|
1005
1005
|
...e,
|
|
@@ -1011,50 +1011,50 @@ function Ju(e) {
|
|
|
1011
1011
|
t
|
|
1012
1012
|
])
|
|
1013
1013
|
}), n = () => {
|
|
1014
|
-
d && t == null ?
|
|
1015
|
-
},
|
|
1016
|
-
|
|
1014
|
+
d && t == null ? i() : p();
|
|
1015
|
+
}, i = () => {
|
|
1016
|
+
L.current = null, R(null), k();
|
|
1017
1017
|
}, p = () => {
|
|
1018
1018
|
if (e.selectedKey !== void 0 && e.inputValue !== void 0) {
|
|
1019
1019
|
var o, r;
|
|
1020
1020
|
(o = e.onSelectionChange) === null || o === void 0 || o.call(e, t);
|
|
1021
|
-
var
|
|
1022
|
-
let nu = t != null && (
|
|
1023
|
-
M(nu),
|
|
1021
|
+
var a;
|
|
1022
|
+
let nu = t != null && (a = (r = x.getItem(t)) === null || r === void 0 ? void 0 : r.textValue) !== null && a !== void 0 ? a : "";
|
|
1023
|
+
M(nu), k();
|
|
1024
1024
|
} else
|
|
1025
|
-
O(),
|
|
1025
|
+
O(), k();
|
|
1026
1026
|
};
|
|
1027
|
-
const
|
|
1027
|
+
const I = () => {
|
|
1028
1028
|
if (d) {
|
|
1029
1029
|
var o, r;
|
|
1030
|
-
const
|
|
1031
|
-
s ===
|
|
1030
|
+
const a = t != null && (r = (o = x.getItem(t)) === null || o === void 0 ? void 0 : o.textValue) !== null && r !== void 0 ? r : "";
|
|
1031
|
+
s === a ? p() : i();
|
|
1032
1032
|
} else
|
|
1033
1033
|
p();
|
|
1034
1034
|
};
|
|
1035
1035
|
let ie = () => {
|
|
1036
|
-
$.isOpen &&
|
|
1037
|
-
}, de =
|
|
1038
|
-
o ? (de.current = s, b === "focus" && !e.isReadOnly &&
|
|
1039
|
-
}, uu = ee(() => $.isOpen ?
|
|
1036
|
+
$.isOpen && y.focusedKey != null ? t === y.focusedKey ? p() : R(y.focusedKey) : I();
|
|
1037
|
+
}, de = m(s), ce = (o) => {
|
|
1038
|
+
o ? (de.current = s, b === "focus" && !e.isReadOnly && S(null, "focus")) : (f && I(), s !== de.current && le.commitValidation()), z(o);
|
|
1039
|
+
}, uu = ee(() => $.isOpen ? C ? E : D : Z, [
|
|
1040
1040
|
$.isOpen,
|
|
1041
|
-
B,
|
|
1042
1041
|
E,
|
|
1043
|
-
|
|
1042
|
+
D,
|
|
1043
|
+
C,
|
|
1044
1044
|
Z
|
|
1045
1045
|
]);
|
|
1046
1046
|
return {
|
|
1047
1047
|
...le,
|
|
1048
1048
|
...$,
|
|
1049
|
-
focusStrategy:
|
|
1049
|
+
focusStrategy: v,
|
|
1050
1050
|
toggle: P,
|
|
1051
|
-
open:
|
|
1052
|
-
close:
|
|
1053
|
-
selectionManager:
|
|
1051
|
+
open: S,
|
|
1052
|
+
close: I,
|
|
1053
|
+
selectionManager: y,
|
|
1054
1054
|
selectedKey: t,
|
|
1055
1055
|
setSelectedKey: R,
|
|
1056
1056
|
disabledKeys: ne,
|
|
1057
|
-
isFocused:
|
|
1057
|
+
isFocused: g,
|
|
1058
1058
|
setFocused: ce,
|
|
1059
1059
|
selectedItem: ue,
|
|
1060
1060
|
collection: uu,
|
|
@@ -1064,105 +1064,104 @@ function Ju(e) {
|
|
|
1064
1064
|
revert: n
|
|
1065
1065
|
};
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1068
|
-
return new ju(eu(e, e, u,
|
|
1067
|
+
function Ju(e, u, c) {
|
|
1068
|
+
return new ju(eu(e, e, u, c));
|
|
1069
1069
|
}
|
|
1070
|
-
function eu(e, u,
|
|
1071
|
-
let
|
|
1070
|
+
function eu(e, u, c, b) {
|
|
1071
|
+
let l = [];
|
|
1072
1072
|
for (let d of u)
|
|
1073
1073
|
if (d.type === "section" && d.hasChildNodes) {
|
|
1074
|
-
let
|
|
1074
|
+
let f = eu(e, he(d, e), c, b);
|
|
1075
1075
|
[
|
|
1076
|
-
...
|
|
1077
|
-
].some((
|
|
1076
|
+
...f
|
|
1077
|
+
].some((C) => C.type === "item") && l.push({
|
|
1078
1078
|
...d,
|
|
1079
|
-
childNodes:
|
|
1079
|
+
childNodes: f
|
|
1080
1080
|
});
|
|
1081
|
-
} else d.type === "item" && b(d.textValue,
|
|
1081
|
+
} else d.type === "item" && b(d.textValue, c) ? l.push({
|
|
1082
1082
|
...d
|
|
1083
|
-
}) : d.type !== "item" &&
|
|
1083
|
+
}) : d.type !== "item" && l.push({
|
|
1084
1084
|
...d
|
|
1085
1085
|
});
|
|
1086
|
-
return
|
|
1086
|
+
return l;
|
|
1087
1087
|
}
|
|
1088
|
-
const Yu = /* @__PURE__ */ xe(null), Qu = /* @__PURE__ */ xe(null)
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
return /* @__PURE__ */ W.createElement(he.Provider, {
|
|
1088
|
+
const Yu = /* @__PURE__ */ xe(null), Qu = /* @__PURE__ */ xe(null), en = /* @__PURE__ */ ou(function(u, c) {
|
|
1089
|
+
[u, c] = pu(u, c, Yu);
|
|
1090
|
+
let { children: b, isDisabled: l = !1, isInvalid: d = !1, isRequired: f = !1 } = u, C = ee(() => {
|
|
1091
|
+
var h;
|
|
1092
|
+
return /* @__PURE__ */ W.createElement(fe.Provider, {
|
|
1094
1093
|
value: {
|
|
1095
|
-
items: (
|
|
1094
|
+
items: (h = u.items) !== null && h !== void 0 ? h : u.defaultItems
|
|
1096
1095
|
}
|
|
1097
|
-
}, typeof
|
|
1096
|
+
}, typeof b == "function" ? b({
|
|
1098
1097
|
isOpen: !1,
|
|
1099
|
-
isDisabled:
|
|
1100
|
-
isInvalid:
|
|
1101
|
-
isRequired:
|
|
1098
|
+
isDisabled: l,
|
|
1099
|
+
isInvalid: d,
|
|
1100
|
+
isRequired: f,
|
|
1102
1101
|
defaultChildren: null
|
|
1103
|
-
}) :
|
|
1102
|
+
}) : b);
|
|
1104
1103
|
}, [
|
|
1105
|
-
l,
|
|
1106
1104
|
b,
|
|
1107
|
-
|
|
1105
|
+
l,
|
|
1108
1106
|
d,
|
|
1109
|
-
|
|
1110
|
-
|
|
1107
|
+
f,
|
|
1108
|
+
u.items,
|
|
1109
|
+
u.defaultItems
|
|
1111
1110
|
]);
|
|
1112
1111
|
return /* @__PURE__ */ W.createElement(Gu, {
|
|
1113
|
-
content:
|
|
1114
|
-
}, (
|
|
1115
|
-
props:
|
|
1116
|
-
collection:
|
|
1117
|
-
comboBoxRef:
|
|
1112
|
+
content: C
|
|
1113
|
+
}, (h) => /* @__PURE__ */ W.createElement(un, {
|
|
1114
|
+
props: u,
|
|
1115
|
+
collection: h,
|
|
1116
|
+
comboBoxRef: c
|
|
1118
1117
|
}));
|
|
1119
|
-
}
|
|
1120
|
-
function un({ props: e, collection: u, comboBoxRef:
|
|
1121
|
-
let { name: b, formValue:
|
|
1122
|
-
d && (
|
|
1123
|
-
let { validationBehavior:
|
|
1124
|
-
var
|
|
1125
|
-
let
|
|
1118
|
+
});
|
|
1119
|
+
function un({ props: e, collection: u, comboBoxRef: c }) {
|
|
1120
|
+
let { name: b, formValue: l = "key", allowsCustomValue: d } = e;
|
|
1121
|
+
d && (l = "text");
|
|
1122
|
+
let { validationBehavior: f } = du(fu) || {};
|
|
1123
|
+
var C, h;
|
|
1124
|
+
let g = (h = (C = e.validationBehavior) !== null && C !== void 0 ? C : f) !== null && h !== void 0 ? h : "native", { contains: z } = Vu({
|
|
1126
1125
|
sensitivity: "base"
|
|
1127
|
-
}),
|
|
1126
|
+
}), v = Xu({
|
|
1128
1127
|
defaultFilter: e.defaultFilter || z,
|
|
1129
1128
|
...e,
|
|
1130
1129
|
// If props.items isn't provided, rely on collection filtering (aka listbox.items is provided or defaultItems provided to Combobox)
|
|
1131
1130
|
items: e.items,
|
|
1132
1131
|
children: void 0,
|
|
1133
1132
|
collection: u,
|
|
1134
|
-
validationBehavior:
|
|
1135
|
-
}),
|
|
1133
|
+
validationBehavior: g
|
|
1134
|
+
}), A = m(null), B = m(null), T = m(null), x = m(null), [y, t] = su(), { buttonProps: R, inputProps: ue, listBoxProps: ne, labelProps: G, descriptionProps: N, errorMessageProps: U, ...s } = Hu({
|
|
1136
1135
|
...$u(e),
|
|
1137
1136
|
label: t,
|
|
1138
|
-
inputRef:
|
|
1139
|
-
buttonRef:
|
|
1140
|
-
listBoxRef:
|
|
1137
|
+
inputRef: B,
|
|
1138
|
+
buttonRef: A,
|
|
1139
|
+
listBoxRef: T,
|
|
1141
1140
|
popoverRef: x,
|
|
1142
|
-
name:
|
|
1143
|
-
validationBehavior:
|
|
1144
|
-
},
|
|
1145
|
-
if (
|
|
1141
|
+
name: l === "text" ? b : void 0,
|
|
1142
|
+
validationBehavior: g
|
|
1143
|
+
}, v), [_, E] = Q(null), D = se(() => {
|
|
1144
|
+
if (B.current) {
|
|
1146
1145
|
var $;
|
|
1147
|
-
let
|
|
1148
|
-
|
|
1146
|
+
let S = ($ = A.current) === null || $ === void 0 ? void 0 : $.getBoundingClientRect(), P = B.current.getBoundingClientRect(), w = S ? Math.min(S.left, P.left) : P.left, F = S ? Math.max(S.right, P.right) : P.right;
|
|
1147
|
+
E(F - w + "px");
|
|
1149
1148
|
}
|
|
1150
1149
|
}, [
|
|
1151
|
-
v,
|
|
1152
1150
|
A,
|
|
1153
|
-
B
|
|
1151
|
+
B,
|
|
1152
|
+
E
|
|
1154
1153
|
]);
|
|
1155
1154
|
Iu({
|
|
1156
|
-
ref:
|
|
1157
|
-
onResize:
|
|
1155
|
+
ref: B,
|
|
1156
|
+
onResize: D
|
|
1158
1157
|
});
|
|
1159
1158
|
let Z = ee(() => ({
|
|
1160
|
-
isOpen:
|
|
1159
|
+
isOpen: v.isOpen,
|
|
1161
1160
|
isDisabled: e.isDisabled || !1,
|
|
1162
1161
|
isInvalid: s.isInvalid || !1,
|
|
1163
1162
|
isRequired: e.isRequired || !1
|
|
1164
1163
|
}), [
|
|
1165
|
-
|
|
1164
|
+
v.isOpen,
|
|
1166
1165
|
e.isDisabled,
|
|
1167
1166
|
s.isInvalid,
|
|
1168
1167
|
e.isRequired
|
|
@@ -1177,40 +1176,40 @@ function un({ props: e, collection: u, comboBoxRef: l }) {
|
|
|
1177
1176
|
values: [
|
|
1178
1177
|
[
|
|
1179
1178
|
Qu,
|
|
1180
|
-
|
|
1179
|
+
v
|
|
1181
1180
|
],
|
|
1182
1181
|
[
|
|
1183
1182
|
Eu,
|
|
1184
1183
|
{
|
|
1185
1184
|
...G,
|
|
1186
|
-
ref:
|
|
1185
|
+
ref: y
|
|
1187
1186
|
}
|
|
1188
1187
|
],
|
|
1189
1188
|
[
|
|
1190
1189
|
tu,
|
|
1191
1190
|
{
|
|
1192
1191
|
...R,
|
|
1193
|
-
ref:
|
|
1194
|
-
isPressed:
|
|
1192
|
+
ref: A,
|
|
1193
|
+
isPressed: v.isOpen
|
|
1195
1194
|
}
|
|
1196
1195
|
],
|
|
1197
1196
|
[
|
|
1198
1197
|
Au,
|
|
1199
1198
|
{
|
|
1200
1199
|
...ue,
|
|
1201
|
-
ref:
|
|
1200
|
+
ref: B
|
|
1202
1201
|
}
|
|
1203
1202
|
],
|
|
1204
1203
|
[
|
|
1205
1204
|
Pu,
|
|
1206
|
-
|
|
1205
|
+
v
|
|
1207
1206
|
],
|
|
1208
1207
|
[
|
|
1209
1208
|
Ku,
|
|
1210
1209
|
{
|
|
1211
1210
|
ref: x,
|
|
1212
|
-
triggerRef:
|
|
1213
|
-
scrollRef:
|
|
1211
|
+
triggerRef: B,
|
|
1212
|
+
scrollRef: T,
|
|
1214
1213
|
placement: "bottom start",
|
|
1215
1214
|
isNonModal: !0,
|
|
1216
1215
|
trigger: "ComboBox",
|
|
@@ -1220,15 +1219,15 @@ function un({ props: e, collection: u, comboBoxRef: l }) {
|
|
|
1220
1219
|
}
|
|
1221
1220
|
],
|
|
1222
1221
|
[
|
|
1223
|
-
|
|
1222
|
+
fe,
|
|
1224
1223
|
{
|
|
1225
1224
|
...ne,
|
|
1226
|
-
ref:
|
|
1225
|
+
ref: T
|
|
1227
1226
|
}
|
|
1228
1227
|
],
|
|
1229
1228
|
[
|
|
1230
1229
|
yu,
|
|
1231
|
-
|
|
1230
|
+
v
|
|
1232
1231
|
],
|
|
1233
1232
|
[
|
|
1234
1233
|
Ru,
|
|
@@ -1240,68 +1239,68 @@ function un({ props: e, collection: u, comboBoxRef: l }) {
|
|
|
1240
1239
|
}
|
|
1241
1240
|
],
|
|
1242
1241
|
[
|
|
1243
|
-
|
|
1242
|
+
mu,
|
|
1244
1243
|
{
|
|
1245
1244
|
isInvalid: s.isInvalid,
|
|
1246
1245
|
isDisabled: e.isDisabled || !1
|
|
1247
1246
|
}
|
|
1248
1247
|
],
|
|
1249
1248
|
[
|
|
1250
|
-
|
|
1249
|
+
hu,
|
|
1251
1250
|
s
|
|
1252
1251
|
]
|
|
1253
1252
|
]
|
|
1254
1253
|
}, /* @__PURE__ */ W.createElement("div", {
|
|
1255
1254
|
...V,
|
|
1256
1255
|
...oe,
|
|
1257
|
-
ref:
|
|
1256
|
+
ref: c,
|
|
1258
1257
|
slot: e.slot || void 0,
|
|
1259
|
-
"data-focused":
|
|
1260
|
-
"data-open":
|
|
1258
|
+
"data-focused": v.isFocused || void 0,
|
|
1259
|
+
"data-open": v.isOpen || void 0,
|
|
1261
1260
|
"data-disabled": e.isDisabled || void 0,
|
|
1262
1261
|
"data-invalid": s.isInvalid || void 0,
|
|
1263
1262
|
"data-required": e.isRequired || void 0
|
|
1264
|
-
}), b &&
|
|
1263
|
+
}), b && l === "key" && /* @__PURE__ */ W.createElement("input", {
|
|
1265
1264
|
type: "hidden",
|
|
1266
1265
|
name: b,
|
|
1267
|
-
value: (H =
|
|
1266
|
+
value: (H = v.selectedKey) !== null && H !== void 0 ? H : ""
|
|
1268
1267
|
}));
|
|
1269
1268
|
}
|
|
1270
|
-
const nn =
|
|
1271
|
-
tokens:
|
|
1272
|
-
display:
|
|
1273
|
-
black:
|
|
1274
|
-
signalRed130:
|
|
1275
|
-
smBreakpoint:
|
|
1276
|
-
gray50:
|
|
1277
|
-
gray20:
|
|
1278
|
-
gray10:
|
|
1279
|
-
focus:
|
|
1280
|
-
backgroundSecondary:
|
|
1281
|
-
input:
|
|
1282
|
-
combobox:
|
|
1283
|
-
text:
|
|
1284
|
-
wrap:
|
|
1285
|
-
button:
|
|
1286
|
-
icon:
|
|
1287
|
-
popover:
|
|
1288
|
-
fieldError:
|
|
1289
|
-
listBoxItem:
|
|
1269
|
+
const nn = '"../theme/tokens.css"', on = '"Inter", sans-serif', tn = "#000000", ln = "#b31b1b", cn = "(max-width: 767px)", pn = "#bfbfbf", dn = "#e6e6e6", sn = "#f2f2f2", $n = "0 0 0 2px #ffffff, 0 0 0 4px #000000", rn = "#f2f2f2", bn = "_input_1ek0k_4", an = "_combobox_1ek0k_33", Cn = "_text_1ek0k_49", xn = "_wrap_1ek0k_54", fn = "_button_1ek0k_59", hn = "_icon_1ek0k_77", mn = "_popover_1ek0k_83", vn = "_fieldError_1ek0k_91", An = "_listBoxItem_1ek0k_102", q = {
|
|
1270
|
+
tokens: nn,
|
|
1271
|
+
display: on,
|
|
1272
|
+
black: tn,
|
|
1273
|
+
signalRed130: ln,
|
|
1274
|
+
smBreakpoint: cn,
|
|
1275
|
+
gray50: pn,
|
|
1276
|
+
gray20: dn,
|
|
1277
|
+
gray10: sn,
|
|
1278
|
+
focus: $n,
|
|
1279
|
+
backgroundSecondary: rn,
|
|
1280
|
+
input: bn,
|
|
1281
|
+
combobox: an,
|
|
1282
|
+
text: Cn,
|
|
1283
|
+
wrap: xn,
|
|
1284
|
+
button: fn,
|
|
1285
|
+
icon: hn,
|
|
1286
|
+
popover: mn,
|
|
1287
|
+
fieldError: vn,
|
|
1288
|
+
listBoxItem: An
|
|
1290
1289
|
};
|
|
1291
|
-
function
|
|
1290
|
+
function Un({
|
|
1292
1291
|
label: e,
|
|
1293
1292
|
description: u,
|
|
1294
|
-
errorMessage:
|
|
1293
|
+
errorMessage: c,
|
|
1295
1294
|
children: b,
|
|
1296
|
-
items:
|
|
1295
|
+
items: l,
|
|
1297
1296
|
...d
|
|
1298
1297
|
}) {
|
|
1299
|
-
const
|
|
1298
|
+
const f = W.useRef(null);
|
|
1300
1299
|
return /* @__PURE__ */ be(
|
|
1301
|
-
|
|
1300
|
+
en,
|
|
1302
1301
|
{
|
|
1303
1302
|
className: q.combobox,
|
|
1304
|
-
ref:
|
|
1303
|
+
ref: f,
|
|
1305
1304
|
...d,
|
|
1306
1305
|
children: [
|
|
1307
1306
|
/* @__PURE__ */ j(
|
|
@@ -1309,7 +1308,7 @@ function _n({
|
|
|
1309
1308
|
{
|
|
1310
1309
|
label: e,
|
|
1311
1310
|
description: u,
|
|
1312
|
-
errorMessage:
|
|
1311
|
+
errorMessage: c,
|
|
1313
1312
|
children: /* @__PURE__ */ be("div", { className: q.wrap, children: [
|
|
1314
1313
|
/* @__PURE__ */ j(Bu, { className: q.input }),
|
|
1315
1314
|
/* @__PURE__ */ j(
|
|
@@ -1341,15 +1340,15 @@ function _n({
|
|
|
1341
1340
|
{
|
|
1342
1341
|
className: q.popover,
|
|
1343
1342
|
offset: 0,
|
|
1344
|
-
UNSTABLE_portalContainer:
|
|
1345
|
-
children: /* @__PURE__ */ j(Fu, { items:
|
|
1343
|
+
UNSTABLE_portalContainer: f.current || void 0,
|
|
1344
|
+
children: /* @__PURE__ */ j(Fu, { items: l, children: b })
|
|
1346
1345
|
}
|
|
1347
1346
|
)
|
|
1348
1347
|
]
|
|
1349
1348
|
}
|
|
1350
1349
|
);
|
|
1351
1350
|
}
|
|
1352
|
-
function
|
|
1351
|
+
function _n(e) {
|
|
1353
1352
|
return /* @__PURE__ */ j(
|
|
1354
1353
|
gu,
|
|
1355
1354
|
{
|
|
@@ -1359,6 +1358,6 @@ function qn(e) {
|
|
|
1359
1358
|
);
|
|
1360
1359
|
}
|
|
1361
1360
|
export {
|
|
1362
|
-
|
|
1363
|
-
|
|
1361
|
+
Un as ComboBox,
|
|
1362
|
+
_n as ComboBoxItem
|
|
1364
1363
|
};
|