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