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