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