@reportportal/ui-kit 0.0.1-alpha.13 → 0.0.1-alpha.130
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/README.md +28 -2
- package/dist/attachedFile.js +9 -0
- package/dist/autocompletes.js +728 -0
- package/dist/baseIconButton-251479f7.js +25 -0
- package/dist/baseIconButton.js +1 -1
- package/dist/breadcrumbs-8e5ca8d7.js +183 -0
- package/dist/breadcrumbs.js +12 -0
- package/dist/bubblesLoader-f3ffa240.js +28 -0
- package/dist/bubblesLoader.js +1 -1
- package/dist/button-97d9e587.js +66 -0
- package/dist/button.js +1 -1
- package/dist/calendarArrow-44c7e60e.js +5 -0
- package/dist/checkbox-ed6cc375.js +73 -0
- package/dist/checkbox.js +1 -1
- package/dist/chevronDownDropdown-66f5b1af.js +7 -0
- package/dist/clear-53660571.js +5 -0
- package/dist/close-4d480ef7.js +5 -0
- package/dist/common/constants/floatingUi.d.ts +8 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +5 -1
- package/dist/common/types.d.ts +4 -0
- package/dist/common/utils/floatingUi.d.ts +3 -0
- package/dist/common/utils/getFileExtension.d.ts +1 -0
- package/dist/common/utils/index.d.ts +3 -0
- package/dist/common/utils/isString.d.ts +1 -0
- package/dist/components/attachedFile/attachedFile.d.ts +14 -0
- package/dist/components/attachedFile/index.d.ts +2 -0
- package/dist/components/autocompletes/common/autocompleteMenu/autocompleteMenu.d.ts +10 -0
- package/dist/components/autocompletes/common/autocompleteMenu/index.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOption/autocompleteOption.d.ts +13 -0
- package/dist/components/autocompletes/common/autocompleteOption/index.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOptions.d.ts +19 -0
- package/dist/components/autocompletes/common/autocompletePrompt/autocompletePrompt.d.ts +7 -0
- package/dist/components/autocompletes/common/autocompletePrompt/index.d.ts +1 -0
- package/dist/components/autocompletes/common/index.d.ts +19 -0
- package/dist/components/autocompletes/constants.d.ts +2 -0
- package/dist/components/autocompletes/index.d.ts +3 -0
- package/dist/components/autocompletes/multipleAutocomplete/index.d.ts +17 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleAutocomplete.d.ts +49 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleDownshift.d.ts +25 -0
- package/dist/components/autocompletes/multipleAutocomplete/selectedItems/index.d.ts +1 -0
- package/dist/components/autocompletes/multipleAutocomplete/selectedItems/selectedItems.d.ts +35 -0
- package/dist/components/autocompletes/singleAutocomplete/index.d.ts +1 -0
- package/dist/components/autocompletes/singleAutocomplete/singleAutocomplete.d.ts +42 -0
- package/dist/components/autocompletes/types.d.ts +8 -0
- package/dist/components/autocompletes/utils.d.ts +5 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +1 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +10 -0
- package/dist/components/breadcrumbs/breadcrumb/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/breadcrumbsProvider.d.ts +13 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/hooks.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/index.d.ts +1 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/hiddenBreadcrumbs.d.ts +6 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/index.d.ts +5 -0
- package/dist/components/breadcrumbs/tree/index.d.ts +1 -0
- package/dist/components/breadcrumbs/tree/tree.d.ts +7 -0
- package/dist/components/breadcrumbs/types.d.ts +24 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +2 -0
- package/dist/components/bubblesLoader/index.d.ts +1 -0
- package/dist/components/button/button.d.ts +5 -4
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -1
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/datePicker/datePicker.d.ts +25 -0
- package/dist/components/datePicker/header/datePickerHeader.d.ts +16 -0
- package/dist/components/datePicker/header/index.d.ts +4 -0
- package/dist/components/datePicker/index.d.ts +5 -0
- package/dist/components/datePicker/utils.d.ts +4 -0
- package/dist/components/dropdown/constants.d.ts +3 -0
- package/dist/components/dropdown/dropdown.d.ts +36 -4
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
- package/dist/components/dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/types.d.ts +11 -0
- package/dist/components/dropdown/utils.d.ts +6 -2
- package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
- package/dist/components/fieldLabel/index.d.ts +1 -0
- package/dist/components/fieldNumber/constants.d.ts +1 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +3 -3
- package/dist/components/fieldNumber/index.d.ts +1 -0
- package/dist/components/fieldText/fieldText.d.ts +12 -4
- package/dist/components/fieldText/index.d.ts +1 -0
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +5 -2
- package/dist/components/fieldTextFlex/index.d.ts +1 -0
- package/dist/components/fileDropArea/attachedFilesList/attachedFilesList.d.ts +21 -0
- package/dist/components/fileDropArea/attachedFilesList/index.d.ts +5 -0
- package/dist/components/fileDropArea/browseButton/browseButton.d.ts +9 -0
- package/dist/components/fileDropArea/browseButton/index.d.ts +4 -0
- package/dist/components/fileDropArea/constants.d.ts +2 -0
- package/dist/components/fileDropArea/dropZone/dropZone.d.ts +10 -0
- package/dist/components/fileDropArea/dropZone/index.d.ts +4 -0
- package/dist/components/fileDropArea/errorMessage/errorMessage.d.ts +5 -0
- package/dist/components/fileDropArea/errorMessage/index.d.ts +4 -0
- package/dist/components/fileDropArea/fileDropArea.d.ts +19 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/fileDropAreaProvider.d.ts +17 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/index.d.ts +1 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/useFileDropAreaContext.d.ts +3 -0
- package/dist/components/fileDropArea/hooks/index.d.ts +1 -0
- package/dist/components/fileDropArea/hooks/useFileDropArea.d.ts +13 -0
- package/dist/components/fileDropArea/hooks/useFileProcessing.d.ts +13 -0
- package/dist/components/fileDropArea/hooks/useOverlayDropArea.d.ts +22 -0
- package/dist/components/fileDropArea/index.d.ts +6 -0
- package/dist/components/fileDropArea/types.d.ts +58 -0
- package/dist/components/fileDropArea/utils/getValidationErrorMessage.d.ts +3 -0
- package/dist/components/fileDropArea/utils/index.d.ts +2 -0
- package/dist/components/fileDropArea/utils/validateFile.d.ts +3 -0
- package/dist/components/filtersButton/filtersButton.d.ts +9 -0
- package/dist/components/filtersButton/index.d.ts +2 -0
- package/dist/components/icons/index.d.ts +63 -7
- package/dist/components/index.d.ts +22 -9
- package/dist/components/maxValueDisplay/index.d.ts +4 -0
- package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +8 -0
- package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
- package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/modal.d.ts +7 -3
- package/dist/components/modal/modalContent/modalContent.d.ts +2 -0
- package/dist/components/modal/modalFooter/modalFooter.d.ts +3 -1
- package/dist/components/modal/modalHeader/modalHeader.d.ts +2 -1
- package/dist/components/modal/types.d.ts +6 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +1 -0
- package/dist/components/pagination/pagination.d.ts +1 -0
- package/dist/components/popover/index.d.ts +4 -1
- package/dist/components/popover/popover.d.ts +3 -2
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/radio.d.ts +1 -0
- package/dist/components/radio/radioGroup.d.ts +1 -0
- package/dist/components/selection/index.d.ts +5 -0
- package/dist/components/selection/selection.d.ts +12 -0
- package/dist/components/selection/types.d.ts +1 -0
- package/dist/components/sidePanel/index.d.ts +2 -0
- package/dist/components/sidePanel/sidePanel.d.ts +17 -0
- package/dist/components/spinLoader/index.d.ts +4 -0
- package/dist/components/spinLoader/spinLoader.d.ts +8 -0
- package/dist/components/systemAlert/index.d.ts +1 -0
- package/dist/components/systemAlert/systemAlert.d.ts +4 -0
- package/dist/components/systemAlert/types.d.ts +22 -0
- package/dist/components/systemMessage/index.d.ts +1 -0
- package/dist/components/systemMessage/systemMessage.d.ts +1 -0
- package/dist/components/table/constants.d.ts +5 -0
- package/dist/components/table/hooks/index.d.ts +4 -0
- package/dist/components/table/hooks/useColumnWidths.d.ts +8 -0
- package/dist/components/table/hooks/useTableColumns.d.ts +13 -0
- package/dist/components/table/hooks/useTableExpansion.d.ts +15 -0
- package/dist/components/table/hooks/useTableHover.d.ts +10 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/table.d.ts +1 -0
- package/dist/components/table/types.d.ts +25 -9
- package/dist/components/table/utils.d.ts +10 -1
- package/dist/components/themeProvider/index.d.ts +1 -0
- package/dist/components/themeProvider/themeProvider.d.ts +1 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/toggle.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +12 -2
- package/dist/datePicker-5b3b45b6.js +194 -0
- package/dist/datePicker.js +31 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-360803d5.js +550 -0
- package/dist/dropdown.js +12 -3
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-d1b5a7a1.js +140 -0
- package/dist/fieldNumber.js +5 -2
- package/dist/fieldText-1749da7a.js +167 -0
- package/dist/fieldText.js +7 -2
- package/dist/fieldTextFlex-2f51c173.js +80 -0
- package/dist/fieldTextFlex.js +3 -1
- package/dist/fileDropArea.js +325 -0
- package/dist/filterOutline-819b4b0d.js +6 -0
- package/dist/filtersButton.js +25 -0
- package/dist/floatingUi-41f8c7b5.js +29 -0
- package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
- package/dist/icons.js +85 -0
- package/dist/index-1a874a8b.js +110 -0
- package/dist/index.js +149 -50
- package/dist/isEmpty-ccacb5ff.js +38 -0
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -0
- package/dist/minus-2857540f.js +5 -0
- package/dist/modal.js +188 -14
- package/dist/openEye-950159cb.js +6 -0
- package/dist/pagination-a3dee614.js +347 -0
- package/dist/pagination.js +12 -5
- package/dist/plus-199fb2a8.js +5 -0
- package/dist/popover.js +58 -73
- package/dist/prevPage-87faf576.js +6 -0
- package/dist/radio-62546efa.js +76 -0
- package/dist/radio.js +1 -1
- package/dist/selection-9124d029.js +38 -0
- package/dist/selection.js +10 -0
- package/dist/sidePanel.js +88 -0
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +1 -1
- package/dist/success-8fd8bd2c.js +7 -0
- package/dist/systemAlert.js +69 -0
- package/dist/systemMessage-924fdaa6.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/table-8e223d5d.js +485 -0
- package/dist/table.js +3 -3
- package/dist/toggle-304107fa.js +59 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +89 -56
- package/dist/tree-c3dd3d45.js +6 -0
- package/dist/xls-995781cc.js +11 -0
- package/package.json +47 -16
- package/dist/baseIconButton-7bc53dec.js +0 -25
- package/dist/bubblesLoader-a7e709d4.js +0 -17
- package/dist/button-7fb84fde.js +0 -62
- package/dist/checkbox-6777be17.js +0 -73
- package/dist/dropdown-e07f2a71.js +0 -212
- package/dist/fieldNumber-46fe79b9.js +0 -127
- package/dist/fieldText-d80b29ba.js +0 -102
- package/dist/fieldTextFlex-5bddf46a.js +0 -67
- package/dist/index-bb9b62ef.js +0 -131
- package/dist/pagination-5449cd03.js +0 -346
- package/dist/radio-fd49a09c.js +0 -76
- package/dist/systemMessage-1ced6079.js +0 -30
- package/dist/table-83e050dc.js +0 -147
- package/dist/toggle-707ecb74.js +0 -67
- package/dist/useOnClickOutside-c332f7d3.js +0 -16
|
@@ -0,0 +1,728 @@
|
|
|
1
|
+
import { jsx as s, jsxs as A, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { useState as de, useCallback as Y, forwardRef as De, useRef as Fe, useEffect as Me } from "react";
|
|
3
|
+
import { c as L } from "./bind-06a7ff84.js";
|
|
4
|
+
import { Scrollbars as qe } from "rc-scrollbars";
|
|
5
|
+
import { B as Ae } from "./bubblesLoader-f3ffa240.js";
|
|
6
|
+
import { B as Re } from "./button-97d9e587.js";
|
|
7
|
+
import { S as $e } from "./plus-199fb2a8.js";
|
|
8
|
+
import { i as ue } from "./isEmpty-ccacb5ff.js";
|
|
9
|
+
import T from "downshift";
|
|
10
|
+
import { useFloating as ve, autoUpdate as we } from "@floating-ui/react";
|
|
11
|
+
import { F as Ce } from "./fieldText-1749da7a.js";
|
|
12
|
+
import { S as ge } from "./dropdown-0260bb66.js";
|
|
13
|
+
import { S as Pe } from "./close-4d480ef7.js";
|
|
14
|
+
import { S as je } from "./clear-53660571.js";
|
|
15
|
+
import "./openEye-950159cb.js";
|
|
16
|
+
import "./baseIconButton-251479f7.js";
|
|
17
|
+
import "./spinLoader-c4a53718.js";
|
|
18
|
+
import "./maxValueDisplay-9be01a75.js";
|
|
19
|
+
import "./fieldLabel.js";
|
|
20
|
+
const Oe = "_disabled_18ek6_43", He = "_input_18ek6_97", Le = {
|
|
21
|
+
"selected-item": "_selected-item_18ek6_16",
|
|
22
|
+
"validation-error": "_validation-error_18ek6_35",
|
|
23
|
+
"highlight-un-stored-item": "_highlight-un-stored-item_18ek6_40",
|
|
24
|
+
disabled: Oe,
|
|
25
|
+
"mobile-disabled": "_mobile-disabled_18ek6_48",
|
|
26
|
+
"cross-icon": "_cross-icon_18ek6_54",
|
|
27
|
+
input: He
|
|
28
|
+
}, ae = L.bind(Le), We = ({
|
|
29
|
+
item: o,
|
|
30
|
+
onRemoveItem: e,
|
|
31
|
+
disabled: i = !1,
|
|
32
|
+
mobileDisabled: r = !1,
|
|
33
|
+
parseValueToString: n,
|
|
34
|
+
error: d = !1,
|
|
35
|
+
editItem: h,
|
|
36
|
+
editable: u = !1,
|
|
37
|
+
getAdditionalCreationCondition: y = () => !0,
|
|
38
|
+
storedOption: x = !0,
|
|
39
|
+
highlightUnStoredItem: v = !1,
|
|
40
|
+
variant: E = "light",
|
|
41
|
+
getItemName: N
|
|
42
|
+
}) => {
|
|
43
|
+
const [f, S] = de(!1), [I, p] = de(""), w = () => {
|
|
44
|
+
!i && u && !x && (p((N == null ? void 0 : N(o)) || (n == null ? void 0 : n(o)) || ""), S(!0));
|
|
45
|
+
}, M = (t) => {
|
|
46
|
+
p(t.target.value);
|
|
47
|
+
}, R = (t) => {
|
|
48
|
+
const a = y(I);
|
|
49
|
+
t.key === "Enter" && a && (h(o, I), S(!1), p(""));
|
|
50
|
+
}, c = () => {
|
|
51
|
+
S(!1), p("");
|
|
52
|
+
}, l = (t) => {
|
|
53
|
+
t.stopPropagation(), e(o);
|
|
54
|
+
};
|
|
55
|
+
return f ? /* @__PURE__ */ s(
|
|
56
|
+
"input",
|
|
57
|
+
{
|
|
58
|
+
autoFocus: !0,
|
|
59
|
+
value: I,
|
|
60
|
+
onChange: M,
|
|
61
|
+
onKeyDown: R,
|
|
62
|
+
onBlur: c,
|
|
63
|
+
className: ae("input")
|
|
64
|
+
}
|
|
65
|
+
) : /* @__PURE__ */ A(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: ae("selected-item", E, {
|
|
69
|
+
[`validation-${d}`]: d,
|
|
70
|
+
disabled: i,
|
|
71
|
+
"mobile-disabled": r,
|
|
72
|
+
"highlight-un-stored-item": v && !x
|
|
73
|
+
}),
|
|
74
|
+
onClick: w,
|
|
75
|
+
children: [
|
|
76
|
+
n == null ? void 0 : n(o),
|
|
77
|
+
!i && /* @__PURE__ */ s(
|
|
78
|
+
"button",
|
|
79
|
+
{
|
|
80
|
+
type: "button",
|
|
81
|
+
className: ae("cross-icon", {
|
|
82
|
+
[`validation-${d}`]: d,
|
|
83
|
+
"mobile-disabled": r,
|
|
84
|
+
disabled: i
|
|
85
|
+
}),
|
|
86
|
+
onClick: l,
|
|
87
|
+
children: /* @__PURE__ */ s(Pe, {})
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}, ze = ({
|
|
94
|
+
items: o = [],
|
|
95
|
+
parseValueToString: e,
|
|
96
|
+
getItemValidationErrorType: i,
|
|
97
|
+
storedItemsMap: r = {},
|
|
98
|
+
highlightUnStoredItem: n = !1,
|
|
99
|
+
renderCustomSelectedItem: d,
|
|
100
|
+
...h
|
|
101
|
+
}) => o.map((u) => d ? d(u) : /* @__PURE__ */ s(
|
|
102
|
+
We,
|
|
103
|
+
{
|
|
104
|
+
parseValueToString: e,
|
|
105
|
+
error: (i == null ? void 0 : i(u)) || "",
|
|
106
|
+
item: u,
|
|
107
|
+
storedOption: !!r[e(u)],
|
|
108
|
+
highlightUnStoredItem: n,
|
|
109
|
+
...h
|
|
110
|
+
},
|
|
111
|
+
e == null ? void 0 : e(u)
|
|
112
|
+
)), Ke = "_prompt_1xfmd_16", Ye = {
|
|
113
|
+
prompt: Ke
|
|
114
|
+
}, Xe = L.bind(Ye), Ge = ({ children: o = null }) => /* @__PURE__ */ s("div", { className: Xe("prompt"), children: o }), Je = "_item_1qhaq_16", Qe = "_divider_1qhaq_24", Ze = "_active_1qhaq_48", Te = "_value_1qhaq_60", Ue = "_tag_1qhaq_78", Ve = "_disabled_1qhaq_89", et = {
|
|
115
|
+
item: Je,
|
|
116
|
+
divider: Qe,
|
|
117
|
+
"new-item": "_new-item_1qhaq_31",
|
|
118
|
+
active: Ze,
|
|
119
|
+
value: Te,
|
|
120
|
+
"key-variant": "_key-variant_1qhaq_75",
|
|
121
|
+
tag: Ue,
|
|
122
|
+
"button-active": "_button-active_1qhaq_89",
|
|
123
|
+
disabled: Ve,
|
|
124
|
+
"value-variant": "_value-variant_1qhaq_109"
|
|
125
|
+
}, X = L.bind(et), pe = ({
|
|
126
|
+
isActive: o = !1,
|
|
127
|
+
isSelected: e = !1,
|
|
128
|
+
isNew: i = !1,
|
|
129
|
+
children: r = null,
|
|
130
|
+
disabled: n = !1,
|
|
131
|
+
optionVariant: d = "",
|
|
132
|
+
newItemButtonText: h = "",
|
|
133
|
+
...u
|
|
134
|
+
}) => {
|
|
135
|
+
const y = () => h || (d === "key-variant" ? "New key" : "New value");
|
|
136
|
+
return i ? /* @__PURE__ */ A(V, { children: [
|
|
137
|
+
/* @__PURE__ */ s("div", { className: X("divider") }),
|
|
138
|
+
/* @__PURE__ */ A(
|
|
139
|
+
"li",
|
|
140
|
+
{
|
|
141
|
+
className: X("new-item", d, {
|
|
142
|
+
active: o,
|
|
143
|
+
selected: e,
|
|
144
|
+
disabled: n
|
|
145
|
+
}),
|
|
146
|
+
...u,
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ s("span", { className: X("value"), children: r }),
|
|
149
|
+
/* @__PURE__ */ s(
|
|
150
|
+
Re,
|
|
151
|
+
{
|
|
152
|
+
...!n && u,
|
|
153
|
+
className: X({ "button-active": o }),
|
|
154
|
+
icon: /* @__PURE__ */ s($e, {}),
|
|
155
|
+
variant: "text",
|
|
156
|
+
children: y()
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
] }) : /* @__PURE__ */ s(
|
|
163
|
+
"li",
|
|
164
|
+
{
|
|
165
|
+
className: X("item", d, {
|
|
166
|
+
active: o,
|
|
167
|
+
selected: e,
|
|
168
|
+
disabled: n
|
|
169
|
+
}),
|
|
170
|
+
...n ? {} : u,
|
|
171
|
+
children: /* @__PURE__ */ s("span", { className: X("label", "tag"), children: r })
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}, tt = "_container_igshu_16", ot = {
|
|
175
|
+
container: tt
|
|
176
|
+
}, ie = L.bind(ot), nt = (o) => {
|
|
177
|
+
const {
|
|
178
|
+
options: e,
|
|
179
|
+
async: i,
|
|
180
|
+
inputValue: r,
|
|
181
|
+
loading: n,
|
|
182
|
+
createWithoutConfirmation: d,
|
|
183
|
+
customEmptyListMessage: h,
|
|
184
|
+
customNoMatchesMessage: u,
|
|
185
|
+
optionVariant: y,
|
|
186
|
+
newItemButtonText: x,
|
|
187
|
+
renderOption: v,
|
|
188
|
+
getUniqKey: E,
|
|
189
|
+
getItemProps: N,
|
|
190
|
+
parseValueToString: f
|
|
191
|
+
} = o, S = Y(() => (e || []).filter((t) => f(t).toUpperCase().indexOf((r.toUpperCase() || "").trim()) > -1), [r, e, f]), I = Y(
|
|
192
|
+
(t, a, b = !1) => v ? v(t, a, b, N) : /* @__PURE__ */ s(
|
|
193
|
+
pe,
|
|
194
|
+
{
|
|
195
|
+
optionVariant: y,
|
|
196
|
+
...N({ item: t, index: a }),
|
|
197
|
+
isNew: b,
|
|
198
|
+
newItemButtonText: x,
|
|
199
|
+
children: f(t)
|
|
200
|
+
},
|
|
201
|
+
(E == null ? void 0 : E(t)) || f(t)
|
|
202
|
+
),
|
|
203
|
+
[N, E, x, y, f, v]
|
|
204
|
+
), p = Y(
|
|
205
|
+
(t) => t.length ? t.map((a, b) => I(a, b)) : "",
|
|
206
|
+
[I]
|
|
207
|
+
), w = Y(
|
|
208
|
+
(t) => {
|
|
209
|
+
const a = t.length;
|
|
210
|
+
return /* @__PURE__ */ s("div", { className: ie({ container: !a }), children: /* @__PURE__ */ s(
|
|
211
|
+
pe,
|
|
212
|
+
{
|
|
213
|
+
optionVariant: y,
|
|
214
|
+
isNew: !0,
|
|
215
|
+
...N({ item: r, index: a }),
|
|
216
|
+
children: f(r)
|
|
217
|
+
},
|
|
218
|
+
f(r)
|
|
219
|
+
) });
|
|
220
|
+
},
|
|
221
|
+
[N, r, y, f]
|
|
222
|
+
), M = Y(
|
|
223
|
+
(t) => n ? /* @__PURE__ */ A(V, { children: [
|
|
224
|
+
/* @__PURE__ */ s(Ge, { children: /* @__PURE__ */ s(Ae, {}) }),
|
|
225
|
+
!d && w(t)
|
|
226
|
+
] }) : "",
|
|
227
|
+
[d, n, w]
|
|
228
|
+
), R = Y(() => {
|
|
229
|
+
const t = (e == null ? void 0 : e.length) === 0 ? h || "No available options" : u || "No matches found";
|
|
230
|
+
return /* @__PURE__ */ s("div", { className: ie("empty-list-message"), children: t });
|
|
231
|
+
}, [h, u, e == null ? void 0 : e.length]), c = i ? e : S(), l = M(e);
|
|
232
|
+
return l || /* @__PURE__ */ A("div", { className: ie({ container: e.length }), children: [
|
|
233
|
+
/* @__PURE__ */ s(qe, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: ue(c) ? R() : p(c) }),
|
|
234
|
+
!d && w(c)
|
|
235
|
+
] });
|
|
236
|
+
}, st = "_menu_f64z5_16", rt = "_opened_f64z5_34", ct = "_dark_f64z5_37", lt = {
|
|
237
|
+
menu: st,
|
|
238
|
+
opened: rt,
|
|
239
|
+
dark: ct
|
|
240
|
+
}, at = L.bind(lt), it = (o, e) => !o || o <= e.trim().length, ye = De(
|
|
241
|
+
({
|
|
242
|
+
isOpen: o = !1,
|
|
243
|
+
style: e = {},
|
|
244
|
+
minLength: i = 1,
|
|
245
|
+
isDropdownMode: r,
|
|
246
|
+
inputValue: n = "",
|
|
247
|
+
className: d = "",
|
|
248
|
+
...h
|
|
249
|
+
}, u) => /* @__PURE__ */ s(
|
|
250
|
+
"ul",
|
|
251
|
+
{
|
|
252
|
+
ref: u,
|
|
253
|
+
className: at(
|
|
254
|
+
"menu",
|
|
255
|
+
{ opened: o && (r || it(i, n)) },
|
|
256
|
+
d
|
|
257
|
+
),
|
|
258
|
+
style: e,
|
|
259
|
+
children: /* @__PURE__ */ s(nt, { inputValue: n, ...h })
|
|
260
|
+
}
|
|
261
|
+
)
|
|
262
|
+
), he = (o, e) => typeof o == "string" ? o : e ? String(o[e(o)]) : "", U = (o, e) => {
|
|
263
|
+
var r;
|
|
264
|
+
return o === e ? !0 : !!(o && e && typeof o == "object" && typeof e == "object" && Object.keys(o).length === Object.keys(e).length && ((r = Object.entries(o)) != null && r.every(([n, d]) => U(d, e[n]))));
|
|
265
|
+
}, dt = (o, e, i) => typeof o == "string" ? o === e : i ? (() => {
|
|
266
|
+
const r = i(o);
|
|
267
|
+
return o[r] === e[r];
|
|
268
|
+
})() : !1, ut = ({
|
|
269
|
+
options: o = [],
|
|
270
|
+
onChange: e,
|
|
271
|
+
selectedItems: i = [],
|
|
272
|
+
handleUnStoredItemCb: r = null,
|
|
273
|
+
existingItemsMap: n = {},
|
|
274
|
+
children: d,
|
|
275
|
+
customizeNewSelectedValue: h = (v) => v,
|
|
276
|
+
getOptionUniqKey: u,
|
|
277
|
+
getOptionUniqKeyValue: y,
|
|
278
|
+
...x
|
|
279
|
+
}) => {
|
|
280
|
+
const [v, E] = de(n), N = (c, l) => {
|
|
281
|
+
const t = {
|
|
282
|
+
...v
|
|
283
|
+
};
|
|
284
|
+
c.forEach((a) => {
|
|
285
|
+
if (o.find((b) => dt(b, a, u))) {
|
|
286
|
+
const b = he(a, u);
|
|
287
|
+
t[b] = !0;
|
|
288
|
+
}
|
|
289
|
+
}), E(t), l(t);
|
|
290
|
+
}, f = (c, l) => {
|
|
291
|
+
const t = he(c, u);
|
|
292
|
+
if (t in v) {
|
|
293
|
+
const a = { ...v };
|
|
294
|
+
delete a[t], E(a), l(a);
|
|
295
|
+
} else
|
|
296
|
+
l(v);
|
|
297
|
+
}, S = (c, l) => {
|
|
298
|
+
const t = h(c), a = Array.isArray(t) ? t : [t], W = [...i.filter((C) => a.indexOf(C) < 0), ...a];
|
|
299
|
+
e == null || e(W, l), N(a, (C) => r == null ? void 0 : r(W, C));
|
|
300
|
+
}, I = (c, l) => {
|
|
301
|
+
const t = i.indexOf(c), a = [...i];
|
|
302
|
+
a.splice(t, 1, l), e == null || e(a, null);
|
|
303
|
+
}, p = (c, l) => {
|
|
304
|
+
const t = i.filter((b) => !U(b, c));
|
|
305
|
+
e == null || e(t, l), f(c, (b) => r == null ? void 0 : r(t, b));
|
|
306
|
+
}, w = (c, l) => {
|
|
307
|
+
c && S(c, l);
|
|
308
|
+
}, M = (c) => ({
|
|
309
|
+
removeItem: p,
|
|
310
|
+
editItem: I,
|
|
311
|
+
handleChange: e,
|
|
312
|
+
getOptionUniqKeyValue: y,
|
|
313
|
+
storedItemsMap: v,
|
|
314
|
+
...c
|
|
315
|
+
});
|
|
316
|
+
return /* @__PURE__ */ s(
|
|
317
|
+
T,
|
|
318
|
+
{
|
|
319
|
+
...x,
|
|
320
|
+
stateReducer: (c, l) => {
|
|
321
|
+
switch (l.type) {
|
|
322
|
+
case T.stateChangeTypes.keyDownEnter:
|
|
323
|
+
case T.stateChangeTypes.clickItem:
|
|
324
|
+
return {
|
|
325
|
+
...l,
|
|
326
|
+
highlightedIndex: c.highlightedIndex,
|
|
327
|
+
inputValue: ""
|
|
328
|
+
};
|
|
329
|
+
default:
|
|
330
|
+
return l;
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
onChange: w,
|
|
334
|
+
selectedItem: null,
|
|
335
|
+
children: (c) => d == null ? void 0 : d(M(c))
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
}, Ne = "Enter", mt = "Tab", ft = "_autocomplete_w0t1o_16", _t = "_disabled_w0t1o_32", pt = "_error_w0t1o_35", ht = "_touched_w0t1o_35", bt = "_input_w0t1o_74", vt = {
|
|
339
|
+
autocomplete: ft,
|
|
340
|
+
"autocomplete-wrapper": "_autocomplete-wrapper_w0t1o_28",
|
|
341
|
+
disabled: _t,
|
|
342
|
+
error: pt,
|
|
343
|
+
touched: ht,
|
|
344
|
+
"clear-icon": "_clear-icon_w0t1o_46",
|
|
345
|
+
"clear-icon--disabled": "_clear-icon--disabled_w0t1o_56",
|
|
346
|
+
"autocomplete-input": "_autocomplete-input_w0t1o_60",
|
|
347
|
+
"mobile-disabled": "_mobile-disabled_w0t1o_69",
|
|
348
|
+
input: bt,
|
|
349
|
+
"type-number": "_type-number_w0t1o_98",
|
|
350
|
+
"error-text": "_error-text_w0t1o_109",
|
|
351
|
+
"dropdown-button": "_dropdown-button_w0t1o_118",
|
|
352
|
+
"icon-reversed": "_icon-reversed_w0t1o_126"
|
|
353
|
+
}, H = L.bind(vt), Lt = (o) => {
|
|
354
|
+
const {
|
|
355
|
+
options: e = [],
|
|
356
|
+
loading: i = !1,
|
|
357
|
+
onStateChange: r = () => {
|
|
358
|
+
},
|
|
359
|
+
value: n = [],
|
|
360
|
+
placeholder: d = "",
|
|
361
|
+
error: h = "",
|
|
362
|
+
touched: u = !1,
|
|
363
|
+
creatable: y = !1,
|
|
364
|
+
editable: x = !1,
|
|
365
|
+
onChange: v = () => {
|
|
366
|
+
},
|
|
367
|
+
onFocus: E = () => {
|
|
368
|
+
},
|
|
369
|
+
onBlur: N = () => {
|
|
370
|
+
},
|
|
371
|
+
disabled: f = !1,
|
|
372
|
+
isDropdownMode: S = !1,
|
|
373
|
+
mobileDisabled: I = !1,
|
|
374
|
+
inputProps: p = {},
|
|
375
|
+
parseValueToString: w = (_) => _ == null ? "" : String(_),
|
|
376
|
+
maxLength: M = null,
|
|
377
|
+
async: R = !1,
|
|
378
|
+
customClass: c = "",
|
|
379
|
+
createWithoutConfirmation: l = !1,
|
|
380
|
+
getItemValidationErrorType: t = null,
|
|
381
|
+
clearItemsError: a = () => {
|
|
382
|
+
},
|
|
383
|
+
getAdditionalCreationCondition: b = () => !0,
|
|
384
|
+
highlightUnStoredItem: W = !1,
|
|
385
|
+
parseInputValueFn: G = null,
|
|
386
|
+
handleUnStoredItemCb: C = null,
|
|
387
|
+
dataAutomationId: ee = "",
|
|
388
|
+
existingItemsMap: Q = {},
|
|
389
|
+
customizeNewSelectedValue: te = (_) => _,
|
|
390
|
+
renderCustomSelectedItem: oe,
|
|
391
|
+
useFixedPositioning: ne,
|
|
392
|
+
newItemButtonText: D = "",
|
|
393
|
+
...P
|
|
394
|
+
} = o, { refs: j, floatingStyles: O } = ve({
|
|
395
|
+
placement: "bottom-start",
|
|
396
|
+
strategy: ne ? "fixed" : "absolute",
|
|
397
|
+
whileElementsMounted: we
|
|
398
|
+
}), z = n.length === 0 && !f ? d : "", B = Fe(null);
|
|
399
|
+
Me(() => {
|
|
400
|
+
a();
|
|
401
|
+
}, [a, n]);
|
|
402
|
+
const J = (_, m) => {
|
|
403
|
+
v(_, m);
|
|
404
|
+
}, se = (_, m, k) => ({ item: g, index: $, ...q }) => _({
|
|
405
|
+
item: g,
|
|
406
|
+
index: $,
|
|
407
|
+
isSelected: k.some((le) => U(le, g)),
|
|
408
|
+
...q,
|
|
409
|
+
isActive: m === $
|
|
410
|
+
}), re = ({
|
|
411
|
+
event: _,
|
|
412
|
+
removeItem: m,
|
|
413
|
+
inputValue: k
|
|
414
|
+
}) => {
|
|
415
|
+
_.key === "Backspace" && !k && n.length && m(n[n.length - 1], null);
|
|
416
|
+
}, K = ({
|
|
417
|
+
inputValue: _,
|
|
418
|
+
selectItem: m,
|
|
419
|
+
clearSelection: k
|
|
420
|
+
}) => {
|
|
421
|
+
if (G) {
|
|
422
|
+
const g = G(_);
|
|
423
|
+
(g.length ? g : [_]).forEach((q) => m(q)), k();
|
|
424
|
+
} else
|
|
425
|
+
m(_), k();
|
|
426
|
+
}, Z = (_) => (m) => {
|
|
427
|
+
_(m, null), B.current && B.current.focus();
|
|
428
|
+
}, ce = e.filter((_) => n.every((m) => !U(m, _)));
|
|
429
|
+
return /* @__PURE__ */ s(
|
|
430
|
+
ut,
|
|
431
|
+
{
|
|
432
|
+
onChange: J,
|
|
433
|
+
itemToString: w,
|
|
434
|
+
selectedItems: n,
|
|
435
|
+
onStateChange: r,
|
|
436
|
+
options: e,
|
|
437
|
+
existingItemsMap: Q,
|
|
438
|
+
handleUnStoredItemCb: C,
|
|
439
|
+
customizeNewSelectedValue: te,
|
|
440
|
+
children: ({
|
|
441
|
+
getInputProps: _,
|
|
442
|
+
getItemProps: m,
|
|
443
|
+
isOpen: k,
|
|
444
|
+
inputValue: g = "",
|
|
445
|
+
highlightedIndex: $,
|
|
446
|
+
removeItem: q,
|
|
447
|
+
editItem: le,
|
|
448
|
+
openMenu: ke,
|
|
449
|
+
selectItem: me,
|
|
450
|
+
clearSelection: fe,
|
|
451
|
+
toggleMenu: xe,
|
|
452
|
+
storedItemsMap: Ie,
|
|
453
|
+
getRootProps: Ee
|
|
454
|
+
}) => {
|
|
455
|
+
const _e = Ee(void 0, { suppressRefError: !0 }), Se = {
|
|
456
|
+
..._e,
|
|
457
|
+
ref: (F) => (j.setReference(F), _e.ref(F))
|
|
458
|
+
}, Be = g ?? "";
|
|
459
|
+
return /* @__PURE__ */ A("div", { ...Se, className: H("autocomplete-wrapper"), children: [
|
|
460
|
+
/* @__PURE__ */ A(V, { children: [
|
|
461
|
+
/* @__PURE__ */ A(
|
|
462
|
+
"div",
|
|
463
|
+
{
|
|
464
|
+
className: H("autocomplete", c, {
|
|
465
|
+
"mobile-disabled": I,
|
|
466
|
+
error: h,
|
|
467
|
+
touched: u,
|
|
468
|
+
disabled: f
|
|
469
|
+
}),
|
|
470
|
+
children: [
|
|
471
|
+
/* @__PURE__ */ A(
|
|
472
|
+
"div",
|
|
473
|
+
{
|
|
474
|
+
className: H("autocomplete-input", {
|
|
475
|
+
"mobile-disabled": I
|
|
476
|
+
}),
|
|
477
|
+
children: [
|
|
478
|
+
/* @__PURE__ */ s(
|
|
479
|
+
ze,
|
|
480
|
+
{
|
|
481
|
+
items: n,
|
|
482
|
+
onRemoveItem: Z(q),
|
|
483
|
+
disabled: f,
|
|
484
|
+
mobileDisabled: I,
|
|
485
|
+
parseValueToString: w,
|
|
486
|
+
getItemValidationErrorType: t,
|
|
487
|
+
renderCustomSelectedItem: oe,
|
|
488
|
+
editItem: le,
|
|
489
|
+
editable: x,
|
|
490
|
+
getAdditionalCreationCondition: b,
|
|
491
|
+
storedItemsMap: Ie,
|
|
492
|
+
highlightUnStoredItem: W
|
|
493
|
+
}
|
|
494
|
+
),
|
|
495
|
+
/* @__PURE__ */ s(
|
|
496
|
+
"input",
|
|
497
|
+
{
|
|
498
|
+
..._({
|
|
499
|
+
ref: B,
|
|
500
|
+
placeholder: z,
|
|
501
|
+
maxLength: M,
|
|
502
|
+
onFocus: () => {
|
|
503
|
+
S && ke(), E();
|
|
504
|
+
},
|
|
505
|
+
onKeyDown: (F) => {
|
|
506
|
+
F.key === Ne && g && y && b(g) && K({
|
|
507
|
+
inputValue: g,
|
|
508
|
+
selectItem: me,
|
|
509
|
+
clearSelection: fe
|
|
510
|
+
}), re({ event: F, removeItem: q, inputValue: g });
|
|
511
|
+
},
|
|
512
|
+
onBlur: () => {
|
|
513
|
+
N(), g && y && b(g) && K({
|
|
514
|
+
inputValue: g,
|
|
515
|
+
selectItem: me,
|
|
516
|
+
clearSelection: fe
|
|
517
|
+
});
|
|
518
|
+
},
|
|
519
|
+
disabled: f,
|
|
520
|
+
...p
|
|
521
|
+
}),
|
|
522
|
+
className: H("input", { disabled: f }),
|
|
523
|
+
"data-automation-id": ee
|
|
524
|
+
}
|
|
525
|
+
)
|
|
526
|
+
]
|
|
527
|
+
}
|
|
528
|
+
),
|
|
529
|
+
(p == null ? void 0 : p.clearable) && !ue(n) && /* @__PURE__ */ s(
|
|
530
|
+
"button",
|
|
531
|
+
{
|
|
532
|
+
type: "button",
|
|
533
|
+
className: H("clear-icon", { "clear-icon--disabled": f }),
|
|
534
|
+
onClick: () => {
|
|
535
|
+
var F;
|
|
536
|
+
return !f && ((F = p == null ? void 0 : p.onClear) == null ? void 0 : F.call(p));
|
|
537
|
+
},
|
|
538
|
+
onMouseDown: (F) => F.preventDefault(),
|
|
539
|
+
children: /* @__PURE__ */ s(je, {})
|
|
540
|
+
}
|
|
541
|
+
),
|
|
542
|
+
S && /* @__PURE__ */ s(
|
|
543
|
+
"button",
|
|
544
|
+
{
|
|
545
|
+
type: "button",
|
|
546
|
+
className: H("dropdown-button", { "icon-reversed": k }),
|
|
547
|
+
onClick: () => xe(),
|
|
548
|
+
"aria-label": "Toggle dropdown",
|
|
549
|
+
"aria-expanded": k,
|
|
550
|
+
children: /* @__PURE__ */ s(ge, {})
|
|
551
|
+
}
|
|
552
|
+
)
|
|
553
|
+
]
|
|
554
|
+
}
|
|
555
|
+
),
|
|
556
|
+
h && u && /* @__PURE__ */ s("span", { className: H("error-text"), children: h })
|
|
557
|
+
] }),
|
|
558
|
+
/* @__PURE__ */ s(
|
|
559
|
+
ye,
|
|
560
|
+
{
|
|
561
|
+
isOpen: k,
|
|
562
|
+
loading: i,
|
|
563
|
+
async: R,
|
|
564
|
+
ref: j.setFloating,
|
|
565
|
+
newItemButtonText: D,
|
|
566
|
+
isDropdownMode: S,
|
|
567
|
+
style: O,
|
|
568
|
+
inputValue: Be.trim(),
|
|
569
|
+
getItemProps: se(m, $, n),
|
|
570
|
+
parseValueToString: w,
|
|
571
|
+
createWithoutConfirmation: l,
|
|
572
|
+
options: ce,
|
|
573
|
+
...P
|
|
574
|
+
}
|
|
575
|
+
)
|
|
576
|
+
] });
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
);
|
|
580
|
+
}, wt = {
|
|
581
|
+
"input-wrapper": "_input-wrapper_d9vma_1",
|
|
582
|
+
"dropdown-button": "_dropdown-button_d9vma_6",
|
|
583
|
+
"icon-reversed": "_icon-reversed_d9vma_14"
|
|
584
|
+
}, be = L.bind(wt), gt = 0, Wt = (o) => {
|
|
585
|
+
const {
|
|
586
|
+
options: e = [],
|
|
587
|
+
value: i,
|
|
588
|
+
placeholder: r = "",
|
|
589
|
+
onChange: n = () => {
|
|
590
|
+
},
|
|
591
|
+
onFocus: d = () => {
|
|
592
|
+
},
|
|
593
|
+
onBlur: h = () => {
|
|
594
|
+
},
|
|
595
|
+
disabled: u = !1,
|
|
596
|
+
inputProps: y = {},
|
|
597
|
+
parseValueToString: x = (D) => D === null ? "" : String(D),
|
|
598
|
+
minLength: v = 1,
|
|
599
|
+
skipOptionCreation: E = !1,
|
|
600
|
+
maxLength: N = null,
|
|
601
|
+
optionVariant: f = "",
|
|
602
|
+
isRequired: S = !1,
|
|
603
|
+
error: I = "",
|
|
604
|
+
touched: p = !1,
|
|
605
|
+
setTouch: w = () => {
|
|
606
|
+
},
|
|
607
|
+
createWithoutConfirmation: M = !1,
|
|
608
|
+
menuClassName: R = "",
|
|
609
|
+
icon: c,
|
|
610
|
+
isDropdownMode: l = !1,
|
|
611
|
+
isOptionUnique: t,
|
|
612
|
+
refFunction: a,
|
|
613
|
+
stateReducer: b,
|
|
614
|
+
onStateChange: W,
|
|
615
|
+
useFixedPositioning: G,
|
|
616
|
+
newItemButtonText: C = "",
|
|
617
|
+
...ee
|
|
618
|
+
} = o, { refs: Q, floatingStyles: te } = ve({
|
|
619
|
+
placement: "bottom-start",
|
|
620
|
+
strategy: G ? "fixed" : "absolute",
|
|
621
|
+
whileElementsMounted: we
|
|
622
|
+
}), oe = (D, P, j) => ({ item: O, index: z, ...B }) => D({
|
|
623
|
+
item: O,
|
|
624
|
+
index: z,
|
|
625
|
+
isSelected: j !== null && j === O,
|
|
626
|
+
...B,
|
|
627
|
+
isActive: P === z
|
|
628
|
+
}), ne = (D, P) => {
|
|
629
|
+
D.key === mt && (D.preventDefault(), P(e.length));
|
|
630
|
+
};
|
|
631
|
+
return /* @__PURE__ */ s(
|
|
632
|
+
T,
|
|
633
|
+
{
|
|
634
|
+
onChange: n,
|
|
635
|
+
itemToString: x,
|
|
636
|
+
selectedItem: i,
|
|
637
|
+
onStateChange: W,
|
|
638
|
+
defaultHighlightedIndex: gt,
|
|
639
|
+
stateReducer: b,
|
|
640
|
+
children: ({
|
|
641
|
+
getInputProps: D,
|
|
642
|
+
getItemProps: P,
|
|
643
|
+
setHighlightedIndex: j,
|
|
644
|
+
toggleMenu: O,
|
|
645
|
+
openMenu: z,
|
|
646
|
+
isOpen: B,
|
|
647
|
+
inputValue: J,
|
|
648
|
+
highlightedIndex: se,
|
|
649
|
+
getRootProps: re,
|
|
650
|
+
selectItem: K
|
|
651
|
+
}) => {
|
|
652
|
+
const Z = re(void 0, { suppressRefError: !0 }), ce = {
|
|
653
|
+
...Z,
|
|
654
|
+
ref: (m) => (Q.setReference(m), Z.ref(m))
|
|
655
|
+
}, _ = J ?? "";
|
|
656
|
+
return /* @__PURE__ */ s(V, { children: /* @__PURE__ */ A("div", { className: be("input-wrapper"), ...ce, children: [
|
|
657
|
+
/* @__PURE__ */ s(
|
|
658
|
+
Ce,
|
|
659
|
+
{
|
|
660
|
+
...D({
|
|
661
|
+
placeholder: u ? "" : r,
|
|
662
|
+
maxLength: N || void 0,
|
|
663
|
+
onFocus: () => {
|
|
664
|
+
l && !B && (z(), w == null || w(!0)), d();
|
|
665
|
+
},
|
|
666
|
+
refFunction: a,
|
|
667
|
+
onKeyDown: (m) => {
|
|
668
|
+
m.key === Ne && m.preventDefault(), J && B && ne(m, j);
|
|
669
|
+
},
|
|
670
|
+
onBlur: (m) => {
|
|
671
|
+
const k = _.trim(), g = !ue(k), $ = g ? e.find((q) => x(q) === k) : void 0;
|
|
672
|
+
K($ || (!E && M && g ? k : null)), h(m), t == null || t(
|
|
673
|
+
g ? !e.some((q) => x(q) === k) : null
|
|
674
|
+
), l && B && O(), w == null || w(!0);
|
|
675
|
+
},
|
|
676
|
+
disabled: u,
|
|
677
|
+
defaultWidth: !1,
|
|
678
|
+
isRequired: S,
|
|
679
|
+
touched: p,
|
|
680
|
+
error: I,
|
|
681
|
+
...y,
|
|
682
|
+
endIcon: l && !c ? /* @__PURE__ */ s(
|
|
683
|
+
"button",
|
|
684
|
+
{
|
|
685
|
+
type: "button",
|
|
686
|
+
className: be("dropdown-button", { "icon-reversed": B }),
|
|
687
|
+
onClick: () => O(),
|
|
688
|
+
"aria-label": "Toggle dropdown",
|
|
689
|
+
"aria-expanded": B,
|
|
690
|
+
children: /* @__PURE__ */ s(ge, {})
|
|
691
|
+
}
|
|
692
|
+
) : c,
|
|
693
|
+
minLength: l ? 0 : v
|
|
694
|
+
})
|
|
695
|
+
}
|
|
696
|
+
),
|
|
697
|
+
/* @__PURE__ */ s(
|
|
698
|
+
ye,
|
|
699
|
+
{
|
|
700
|
+
isOpen: B,
|
|
701
|
+
isDropdownMode: l,
|
|
702
|
+
style: te,
|
|
703
|
+
ref: Q.setFloating,
|
|
704
|
+
minLength: v,
|
|
705
|
+
inputValue: (J || "").trim(),
|
|
706
|
+
getItemProps: oe(P, se, i),
|
|
707
|
+
parseValueToString: x,
|
|
708
|
+
optionVariant: f,
|
|
709
|
+
createWithoutConfirmation: M,
|
|
710
|
+
className: R,
|
|
711
|
+
options: e,
|
|
712
|
+
newItemButtonText: C,
|
|
713
|
+
...ee
|
|
714
|
+
}
|
|
715
|
+
)
|
|
716
|
+
] }) });
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
);
|
|
720
|
+
};
|
|
721
|
+
export {
|
|
722
|
+
ye as AutocompleteMenu,
|
|
723
|
+
pe as AutocompleteOption,
|
|
724
|
+
nt as AutocompleteOptions,
|
|
725
|
+
Ge as AutocompletePrompt,
|
|
726
|
+
Lt as MultipleAutocomplete,
|
|
727
|
+
Wt as SingleAutocomplete
|
|
728
|
+
};
|