@reportportal/ui-kit 0.0.1-alpha.24 → 0.0.1-alpha.240
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-f8a2f5bb.js +157 -0
- package/dist/actionMenu.js +30 -0
- package/dist/adaptiveTagList.js +189 -0
- package/dist/attachedFile.js +9 -0
- package/dist/autocompletes.js +894 -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 +13 -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 +22 -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 +3 -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 +56 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleDownshift.d.ts +26 -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 +56 -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 +19 -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 +41 -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 +12 -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 +3 -1
- 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 +79 -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 +6 -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 +7 -2
- package/dist/components/popover/index.d.ts +4 -1
- package/dist/components/popover/popover.d.ts +12 -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 +47 -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 +11 -1
- package/dist/constants-85822a6b.js +6 -0
- package/dist/datePicker-09dd025d.js +229 -0
- package/dist/datePicker.js +38 -0
- package/dist/details-dbb1530b.js +5 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-d2a05471.js +647 -0
- package/dist/dropdown.js +19 -3
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-b4aa4d7e.js +141 -0
- package/dist/fieldNumber.js +5 -2
- package/dist/fieldText-4a8e5496.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 +105 -0
- package/dist/index-d6e02727.js +129 -0
- package/dist/index.js +208 -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 +187 -14
- package/dist/openedEye-8fa4c67d.js +6 -0
- package/dist/pagination-535d600a.js +370 -0
- package/dist/pagination.js +14 -7
- package/dist/plus-199fb2a8.js +5 -0
- package/dist/popover.js +73 -73
- 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 +136 -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-e0fd9727.js +1157 -0
- package/dist/table.js +13 -3
- package/dist/toggle-304107fa.js +59 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +96 -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-087f2ed4.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-9b29cdb7.js +0 -147
- package/dist/pagination-e30cfd70.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,38 @@
|
|
|
1
|
+
import { D as t } from "./datePicker-09dd025d.js";
|
|
2
|
+
import { r as H } from "./datePicker-09dd025d.js";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import "react-datepicker/dist/es/index.js";
|
|
6
|
+
import "./bind-06a7ff84.js";
|
|
7
|
+
import "./fieldText-4a8e5496.js";
|
|
8
|
+
import "./clear-53660571.js";
|
|
9
|
+
import "./openedEye-8fa4c67d.js";
|
|
10
|
+
import "./baseIconButton-251479f7.js";
|
|
11
|
+
import "./spinLoader-c4a53718.js";
|
|
12
|
+
import "./maxValueDisplay-9be01a75.js";
|
|
13
|
+
import "./fieldLabel.js";
|
|
14
|
+
import "./dropdown-d2a05471.js";
|
|
15
|
+
import "react-dom";
|
|
16
|
+
import "@floating-ui/react-dom";
|
|
17
|
+
import "downshift";
|
|
18
|
+
import "rc-scrollbars";
|
|
19
|
+
import "./keyCodes-f63c0e11.js";
|
|
20
|
+
import "./dropdown-0260bb66.js";
|
|
21
|
+
import "./adaptiveTagList.js";
|
|
22
|
+
import "./button-7ab874f3.js";
|
|
23
|
+
import "./close-4d480ef7.js";
|
|
24
|
+
import "./isEmpty-ccacb5ff.js";
|
|
25
|
+
import "react-dnd";
|
|
26
|
+
import "react-dnd-html5-backend";
|
|
27
|
+
import "./useEllipsisTitle-462fa254.js";
|
|
28
|
+
import "./checkbox-76aa8f97.js";
|
|
29
|
+
import "./tooltip.js";
|
|
30
|
+
import "@floating-ui/react";
|
|
31
|
+
import "./floatingUi-46f5b896.js";
|
|
32
|
+
import "./calendarArrow-44c7e60e.js";
|
|
33
|
+
import "react-datepicker";
|
|
34
|
+
export {
|
|
35
|
+
t as DatePicker,
|
|
36
|
+
t as default,
|
|
37
|
+
H as registerDatePickerLocale
|
|
38
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as C from "react";
|
|
2
|
+
const t = (e) => /* @__PURE__ */ C.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ C.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.30811 9.47705C2.72868 9.47705 3.05339 9.36108 3.28223 9.12915C3.51107 8.89722 3.62549 8.60498 3.62549 8.25244C3.62549 7.89372 3.51107 7.5953 3.28223 7.35718C3.05339 7.11906 2.72868 7 2.30811 7C1.89372 7 1.5721 7.11906 1.34326 7.35718C1.11442 7.5953 1 7.89372 1 8.25244C1 8.61117 1.11751 8.90495 1.35254 9.13379C1.58757 9.36263 1.90609 9.47705 2.30811 9.47705ZM7.61475 9.47705C8.03532 9.47705 8.36003 9.36108 8.58887 9.12915C8.81771 8.89722 8.93213 8.60498 8.93213 8.25244C8.93213 7.89372 8.81771 7.5953 8.58887 7.35718C8.36003 7.11906 8.03532 7 7.61475 7C7.20036 7 6.87874 7.11906 6.6499 7.35718C6.42106 7.5953 6.30664 7.89372 6.30664 8.25244C6.30664 8.61117 6.42415 8.90495 6.65918 9.13379C6.89421 9.36263 7.21273 9.47705 7.61475 9.47705ZM13.8955 9.12915C13.6667 9.36108 13.342 9.47705 12.9214 9.47705C12.5194 9.47705 12.2008 9.36263 11.9658 9.13379C11.7308 8.90495 11.6133 8.61117 11.6133 8.25244C11.6133 7.89372 11.7277 7.5953 11.9565 7.35718C12.1854 7.11906 12.507 7 12.9214 7C13.342 7 13.6667 7.11906 13.8955 7.35718C14.1243 7.5953 14.2388 7.89372 14.2388 8.25244C14.2388 8.60498 14.1243 8.89722 13.8955 9.12915Z", fill: "#A2AAB5" }));
|
|
3
|
+
export {
|
|
4
|
+
t as S
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const o = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M14.2174 5.82426C14.3736 5.66805 14.3736 5.41479 14.2174 5.25858L14.0759 5.11716C13.9197 4.96095 13.6665 4.96095 13.5103 5.11716L8.16726 10.4602L2.82426 5.11716C2.66805 4.96095 2.41479 4.96095 2.25858 5.11716L2.11716 5.25858C1.96095 5.41479 1.96095 5.66805 2.11716 5.82426L7.89176 11.5989C8.04797 11.7551 8.30124 11.7551 8.45745 11.5989L8.88171 11.1746L8.87436 11.1673L14.2174 5.82426Z", fill: "#A2AAB5" }));
|
|
3
|
+
export {
|
|
4
|
+
o as S
|
|
5
|
+
};
|
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
import { jsxs as R, jsx as u, Fragment as He } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as yr, useState as we, useRef as x, useMemo as w, useCallback as k, useLayoutEffect as $e, useEffect as F } from "react";
|
|
3
|
+
import { createPortal as Cr } from "react-dom";
|
|
4
|
+
import { c as ze } from "./bind-06a7ff84.js";
|
|
5
|
+
import { useFloating as Ar, offset as br, flip as Or, size as Dr, autoUpdate as Nr } from "@floating-ui/react-dom";
|
|
6
|
+
import { useSelect as Ee } from "downshift";
|
|
7
|
+
import { Scrollbars as kr } from "rc-scrollbars";
|
|
8
|
+
import { K as p } from "./keyCodes-f63c0e11.js";
|
|
9
|
+
import { B as vr } from "./baseIconButton-251479f7.js";
|
|
10
|
+
import { S as Ir } from "./clear-53660571.js";
|
|
11
|
+
import { S as Kr } from "./dropdown-0260bb66.js";
|
|
12
|
+
import { FieldLabel as Lr } from "./fieldLabel.js";
|
|
13
|
+
import { AdaptiveTagList as Tr } from "./adaptiveTagList.js";
|
|
14
|
+
import "react-dnd";
|
|
15
|
+
import "react-dnd-html5-backend";
|
|
16
|
+
import { u as xr } from "./useEllipsisTitle-462fa254.js";
|
|
17
|
+
import { C as Rr } from "./checkbox-76aa8f97.js";
|
|
18
|
+
import { Tooltip as Pr } from "./tooltip.js";
|
|
19
|
+
import { i as ne } from "./isEmpty-ccacb5ff.js";
|
|
20
|
+
const Yr = (t) => {
|
|
21
|
+
const r = {}, c = {};
|
|
22
|
+
return Object.entries(t).forEach(([o, f]) => {
|
|
23
|
+
if (/^data[A-Z]/.test(o) || /^aria[A-Z]/.test(o)) {
|
|
24
|
+
const m = o.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
25
|
+
r[m] = f;
|
|
26
|
+
} else
|
|
27
|
+
c[o] = f;
|
|
28
|
+
}), { transformed: r, remaining: c };
|
|
29
|
+
}, Vr = "_disabled_1hbkk_12", Sr = "_hidden_1hbkk_17", Hr = "_hover_1hbkk_26", $r = "_selected_1hbkk_42", Mr = {
|
|
30
|
+
"dropdown-option": "_dropdown-option_1hbkk_1",
|
|
31
|
+
disabled: Vr,
|
|
32
|
+
hidden: Sr,
|
|
33
|
+
"multi-select": "_multi-select_1hbkk_20",
|
|
34
|
+
hover: Hr,
|
|
35
|
+
"depth-1": "_depth-1_1hbkk_36",
|
|
36
|
+
selected: $r,
|
|
37
|
+
"single-option": "_single-option_1hbkk_50",
|
|
38
|
+
"sub-option": "_sub-option_1hbkk_57"
|
|
39
|
+
}, Me = ze.bind(Mr), We = yr(
|
|
40
|
+
(t, r) => {
|
|
41
|
+
const {
|
|
42
|
+
option: { value: c, disabled: o, hidden: f, label: m, title: E, groupRef: A },
|
|
43
|
+
selected: B,
|
|
44
|
+
onChange: S,
|
|
45
|
+
render: U,
|
|
46
|
+
highlightHovered: j,
|
|
47
|
+
onMouseEnter: se,
|
|
48
|
+
multiSelect: b,
|
|
49
|
+
isPartiallyChecked: q = !1,
|
|
50
|
+
depth: Z = 0,
|
|
51
|
+
hasChildren: oe = !1
|
|
52
|
+
} = t, ae = (ie) => {
|
|
53
|
+
const H = ie.target;
|
|
54
|
+
o || H.closest("label") && !(H instanceof HTMLInputElement || H instanceof HTMLDivElement) || S == null || S(c);
|
|
55
|
+
}, G = /* @__PURE__ */ R(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: Me("dropdown-option", {
|
|
59
|
+
selected: B,
|
|
60
|
+
disabled: o,
|
|
61
|
+
hidden: f,
|
|
62
|
+
hover: j,
|
|
63
|
+
"multi-select": b,
|
|
64
|
+
"has-children": oe,
|
|
65
|
+
[`depth-${Z}`]: Z > 0
|
|
66
|
+
}),
|
|
67
|
+
title: o ? void 0 : E,
|
|
68
|
+
onClick: ae,
|
|
69
|
+
ref: r,
|
|
70
|
+
onMouseEnter: se,
|
|
71
|
+
children: [
|
|
72
|
+
b && /* @__PURE__ */ u(Rr, { value: !!B, partiallyChecked: q }),
|
|
73
|
+
/* @__PURE__ */ u(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
className: Me("single-option", {
|
|
77
|
+
"sub-option": !!A
|
|
78
|
+
}),
|
|
79
|
+
children: U ? U(t) : m
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
return o && E ? /* @__PURE__ */ u(
|
|
86
|
+
Pr,
|
|
87
|
+
{
|
|
88
|
+
content: E,
|
|
89
|
+
placement: "top",
|
|
90
|
+
wrapperTabIndex: -1,
|
|
91
|
+
isFloating: !1,
|
|
92
|
+
portalRoot: t.disabledOptionTooltipPortalRoot ?? (typeof document < "u" ? document.body : void 0),
|
|
93
|
+
children: G
|
|
94
|
+
}
|
|
95
|
+
) : G;
|
|
96
|
+
}
|
|
97
|
+
), Wr = [
|
|
98
|
+
p.ENTER_KEY_CODE,
|
|
99
|
+
p.SPACE_KEY_CODE,
|
|
100
|
+
p.ARROW_DOWN_KEY_CODE
|
|
101
|
+
], zr = [p.ESCAPE_KEY_CODE, p.TAB_KEY_CODE];
|
|
102
|
+
var V = /* @__PURE__ */ ((t) => (t.ON_KEY_DOWN = "onKeyDown", t.ON_CLICK = "onClick", t))(V || {});
|
|
103
|
+
const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
|
|
104
|
+
const c = Array.isArray(r) ? r : [r];
|
|
105
|
+
return t.findIndex(({ value: o }) => c.includes(o));
|
|
106
|
+
}, qr = (t, r) => (t % r + r) % r, ye = (t, r = 0, c = 1) => {
|
|
107
|
+
var f;
|
|
108
|
+
if (t.length === 0)
|
|
109
|
+
return 0;
|
|
110
|
+
if (!((f = t[r]) != null && f.disabled))
|
|
111
|
+
return r;
|
|
112
|
+
const o = t.length;
|
|
113
|
+
return ye(
|
|
114
|
+
t,
|
|
115
|
+
qr(r + c, o),
|
|
116
|
+
c
|
|
117
|
+
);
|
|
118
|
+
}, Zr = (t, r) => ye(t, r), Gr = (t, r) => ye(t, r, -1), Fe = (t, r = 0, c) => !t || t.length === 0 ? [] : t.reduce((o, f) => {
|
|
119
|
+
var m;
|
|
120
|
+
return f && (o.push({ option: f, depth: r, parent: c }), (m = f.children) != null && m.length && o.push(...Fe(f.children, r + 1, f))), o;
|
|
121
|
+
}, []), Be = (t) => !t || t.length === 0 ? [] : t.reduce((r, c) => {
|
|
122
|
+
var o;
|
|
123
|
+
return c && ((o = c.children) != null && o.length ? r.push(...Be(c.children)) : r.push(c)), r;
|
|
124
|
+
}, []), Ue = (t) => {
|
|
125
|
+
var r;
|
|
126
|
+
return t ? (r = t.children) != null && r.length ? t.children.reduce((c, o) => (o && c.push(...Ue(o)), c), []) : [t.value] : [];
|
|
127
|
+
}, Xr = "_container_sth8o_1", Jr = "_icon_sth8o_7", Qr = "_arrow_sth8o_15", et = "_dropdown_sth8o_33", rt = "_disabled_sth8o_53", tt = "_value_sth8o_60", nt = "_error_sth8o_63", st = "_touched_sth8o_63", ot = "_opened_sth8o_67", at = "_placeholder_sth8o_101", it = "_ghost_sth8o_184", lt = "_divider_sth8o_202", ct = {
|
|
128
|
+
container: Xr,
|
|
129
|
+
icon: Jr,
|
|
130
|
+
arrow: Qr,
|
|
131
|
+
"clear-button": "_clear-button_sth8o_23",
|
|
132
|
+
dropdown: et,
|
|
133
|
+
"multi-select-with-tags": "_multi-select-with-tags_sth8o_47",
|
|
134
|
+
"transparent-background": "_transparent-background_sth8o_50",
|
|
135
|
+
disabled: rt,
|
|
136
|
+
value: tt,
|
|
137
|
+
error: nt,
|
|
138
|
+
touched: st,
|
|
139
|
+
opened: ot,
|
|
140
|
+
placeholder: at,
|
|
141
|
+
"mobile-disabled": "_mobile-disabled_sth8o_105",
|
|
142
|
+
"value-wrapper": "_value-wrapper_sth8o_110",
|
|
143
|
+
"tags-wrapper": "_tags-wrapper_sth8o_116",
|
|
144
|
+
"with-search": "_with-search_sth8o_121",
|
|
145
|
+
"search-input": "_search-input_sth8o_128",
|
|
146
|
+
"select-list": "_select-list_sth8o_146",
|
|
147
|
+
"limited-width": "_limited-width_sth8o_163",
|
|
148
|
+
"options-container": "_options-container_sth8o_167",
|
|
149
|
+
"empty-list-message": "_empty-list-message_sth8o_172",
|
|
150
|
+
ghost: it,
|
|
151
|
+
divider: lt
|
|
152
|
+
}, _ = ze.bind(ct), Kt = ({
|
|
153
|
+
multiSelect: t = !1,
|
|
154
|
+
value: r = t ? [] : "",
|
|
155
|
+
options: c = [],
|
|
156
|
+
disabled: o = !1,
|
|
157
|
+
error: f,
|
|
158
|
+
onChange: m,
|
|
159
|
+
onFocus: E,
|
|
160
|
+
onBlur: A,
|
|
161
|
+
mobileDisabled: B,
|
|
162
|
+
title: S,
|
|
163
|
+
touched: U = !1,
|
|
164
|
+
icon: j,
|
|
165
|
+
variant: se,
|
|
166
|
+
placeholder: b = "",
|
|
167
|
+
label: q = "",
|
|
168
|
+
renderOption: Z,
|
|
169
|
+
transparentBackground: oe = !1,
|
|
170
|
+
className: ae,
|
|
171
|
+
toggleButtonClassName: G,
|
|
172
|
+
selectListClassName: ie,
|
|
173
|
+
isListWidthLimited: H = !1,
|
|
174
|
+
optionAll: le = { value: "all", label: "All" },
|
|
175
|
+
isOptionAllVisible: Ce = !1,
|
|
176
|
+
onSelectAll: je = () => {
|
|
177
|
+
},
|
|
178
|
+
formatDisplayedValue: ce,
|
|
179
|
+
notScrollable: $ = !1,
|
|
180
|
+
footer: X,
|
|
181
|
+
includeGroupValue: Ae = !1,
|
|
182
|
+
clearable: qe = !1,
|
|
183
|
+
onClear: be = () => {
|
|
184
|
+
},
|
|
185
|
+
clearButtonAriaLabel: Ze = "Clear selection",
|
|
186
|
+
menuPortalRoot: y,
|
|
187
|
+
disabledOptionTooltipPortalRoot: Oe,
|
|
188
|
+
isMultiSelectWithTags: O = !1,
|
|
189
|
+
noMatchesMessage: Ge = "No matches found",
|
|
190
|
+
...Xe
|
|
191
|
+
}) => {
|
|
192
|
+
const { transformed: Je, remaining: Qe } = Yr(Xe), [l, J] = we(!1), [v, De] = we(""), Ne = x(null), ke = x(null), M = x(null), de = x(0), ue = x(null), he = x(""), [er, Q] = we(null), I = x(null), W = w(() => Fe(c), [c]), K = w(() => {
|
|
193
|
+
if (!O || !v.trim())
|
|
194
|
+
return W;
|
|
195
|
+
const e = v.toLowerCase();
|
|
196
|
+
return W.filter(
|
|
197
|
+
({ option: n }) => n.label.toLowerCase().includes(e)
|
|
198
|
+
);
|
|
199
|
+
}, [W, v, O]), g = w(
|
|
200
|
+
() => K.map(({ option: e }) => e),
|
|
201
|
+
[K]
|
|
202
|
+
), ve = w(
|
|
203
|
+
() => W.map(({ option: e }) => e),
|
|
204
|
+
[W]
|
|
205
|
+
), ee = w(() => K.filter(({ option: e }) => {
|
|
206
|
+
var n;
|
|
207
|
+
return (n = e.children) == null ? void 0 : n.length;
|
|
208
|
+
}).map(({ option: e }) => e), [K]), Ie = w(() => Be(c), [c]), D = w(
|
|
209
|
+
() => Ie.map(({ value: e }) => e),
|
|
210
|
+
[Ie]
|
|
211
|
+
), re = w(() => {
|
|
212
|
+
const e = /* @__PURE__ */ new Map();
|
|
213
|
+
return ee.forEach((n) => {
|
|
214
|
+
e.set(n.value, Ue(n));
|
|
215
|
+
}), e;
|
|
216
|
+
}, [ee]), z = k(
|
|
217
|
+
(e) => (ee.forEach((n) => {
|
|
218
|
+
const s = re.get(n.value) ?? [], i = s.length > 0 && s.every((d) => e.has(d));
|
|
219
|
+
Ae && i ? e.add(n.value) : e.delete(n.value);
|
|
220
|
+
}), e),
|
|
221
|
+
[ee, Ae, re]
|
|
222
|
+
), L = w(() => !t || !Array.isArray(r) ? /* @__PURE__ */ new Set() : z(new Set(r)), [t, r, z]), fe = w(() => t ? Array.isArray(r) && r.length > 0 : g.some((e) => e.value === r) || r === !1 || r === 0 || !!r, [t, r, g]), rr = qe && fe && !o, tr = k((e) => {
|
|
223
|
+
de.current = e.scrollTop;
|
|
224
|
+
}, []);
|
|
225
|
+
$e(() => {
|
|
226
|
+
l && !$ && M.current && !(t && I.current !== null) && M.current.scrollTop(de.current);
|
|
227
|
+
}, [l, $, r, t]);
|
|
228
|
+
const { refs: P, floatingStyles: Ke } = Ar({
|
|
229
|
+
placement: "bottom-start",
|
|
230
|
+
middleware: [
|
|
231
|
+
br(5),
|
|
232
|
+
Or({
|
|
233
|
+
fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"],
|
|
234
|
+
...y && {
|
|
235
|
+
boundary: document.documentElement,
|
|
236
|
+
rootBoundary: "viewport"
|
|
237
|
+
}
|
|
238
|
+
}),
|
|
239
|
+
y ? Dr({
|
|
240
|
+
apply({ rects: e, elements: n }) {
|
|
241
|
+
const s = e.reference.width;
|
|
242
|
+
Object.assign(n.floating.style, {
|
|
243
|
+
width: `${s}px`,
|
|
244
|
+
minWidth: `${s}px`,
|
|
245
|
+
maxWidth: `${s}px`
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}) : null
|
|
249
|
+
].filter(Boolean),
|
|
250
|
+
whileElementsMounted: l ? (e, n, s) => Nr(e, n, s, {
|
|
251
|
+
animationFrame: !0
|
|
252
|
+
}) : void 0
|
|
253
|
+
}), nr = () => {
|
|
254
|
+
if (!Ce)
|
|
255
|
+
return;
|
|
256
|
+
const e = Array.isArray(r) ? r : [], n = new Set(e), s = D.some((d) => !n.has(d));
|
|
257
|
+
D.forEach((d) => {
|
|
258
|
+
s ? n.add(d) : n.delete(d);
|
|
259
|
+
});
|
|
260
|
+
const i = z(n);
|
|
261
|
+
m(Array.from(i)), je();
|
|
262
|
+
}, te = k(() => {
|
|
263
|
+
l || (J(!0), E == null || E());
|
|
264
|
+
}, [l, E]), C = k(() => {
|
|
265
|
+
J(!1), De(""), he.current = "", A == null || A();
|
|
266
|
+
}, [A]), _e = k(() => {
|
|
267
|
+
if (o)
|
|
268
|
+
return;
|
|
269
|
+
m(t ? [] : ""), be(), C(), requestAnimationFrame(() => {
|
|
270
|
+
const n = P.reference.current;
|
|
271
|
+
n && n instanceof HTMLElement && n.focus();
|
|
272
|
+
});
|
|
273
|
+
}, [o, t, m, be, C, P]), sr = k(
|
|
274
|
+
(e) => {
|
|
275
|
+
e.preventDefault(), e.stopPropagation(), _e();
|
|
276
|
+
},
|
|
277
|
+
[_e]
|
|
278
|
+
), Le = k(
|
|
279
|
+
(e) => {
|
|
280
|
+
var d, a;
|
|
281
|
+
if (!l)
|
|
282
|
+
return;
|
|
283
|
+
const n = e == null ? void 0 : e.target;
|
|
284
|
+
if (!n)
|
|
285
|
+
return;
|
|
286
|
+
const s = (d = Ne.current) == null ? void 0 : d.contains(n), i = (a = ke.current) == null ? void 0 : a.contains(n);
|
|
287
|
+
!s && !i && C();
|
|
288
|
+
},
|
|
289
|
+
[l, C]
|
|
290
|
+
);
|
|
291
|
+
F(() => {
|
|
292
|
+
if (!l)
|
|
293
|
+
return;
|
|
294
|
+
const e = (n) => {
|
|
295
|
+
Le(n);
|
|
296
|
+
};
|
|
297
|
+
return document.addEventListener("pointerdown", e), () => {
|
|
298
|
+
document.removeEventListener("pointerdown", e);
|
|
299
|
+
};
|
|
300
|
+
}, [l, Le]);
|
|
301
|
+
const Te = (e) => {
|
|
302
|
+
var n;
|
|
303
|
+
if (!e.disabled) {
|
|
304
|
+
if (t) {
|
|
305
|
+
const s = Array.isArray(r) ? r : [], i = new Set(s);
|
|
306
|
+
if ((n = e.children) != null && n.length) {
|
|
307
|
+
const a = re.get(e.value) ?? [], h = a.some((N) => !i.has(N));
|
|
308
|
+
a.forEach((N) => {
|
|
309
|
+
h ? i.add(N) : i.delete(N);
|
|
310
|
+
});
|
|
311
|
+
} else
|
|
312
|
+
i.has(e.value) ? i.delete(e.value) : i.add(e.value);
|
|
313
|
+
const d = z(i);
|
|
314
|
+
m(Array.from(d));
|
|
315
|
+
} else
|
|
316
|
+
m(e.value);
|
|
317
|
+
J((s) => t || !s);
|
|
318
|
+
}
|
|
319
|
+
}, or = () => g.find(({ value: e }) => e === r), xe = jr(g, r), {
|
|
320
|
+
getToggleButtonProps: ar,
|
|
321
|
+
getLabelProps: ir,
|
|
322
|
+
getMenuProps: Re,
|
|
323
|
+
getItemProps: lr,
|
|
324
|
+
setHighlightedIndex: T,
|
|
325
|
+
highlightedIndex: pe
|
|
326
|
+
} = Ee({
|
|
327
|
+
items: g,
|
|
328
|
+
itemToString: (e) => (e != null && e.label ? String(e.label) : b) || "",
|
|
329
|
+
selectedItem: or(),
|
|
330
|
+
isOpen: l,
|
|
331
|
+
circularNavigation: !0,
|
|
332
|
+
defaultHighlightedIndex: xe,
|
|
333
|
+
onHighlightedIndexChange: (e) => {
|
|
334
|
+
switch (e.type) {
|
|
335
|
+
case Ee.stateChangeTypes.MenuKeyDownArrowUp:
|
|
336
|
+
return Q(V.ON_KEY_DOWN), T(Gr(g, e.highlightedIndex)), e;
|
|
337
|
+
case Ee.stateChangeTypes.MenuKeyDownArrowDown:
|
|
338
|
+
return Q(V.ON_KEY_DOWN), T(Zr(g, e.highlightedIndex)), e;
|
|
339
|
+
default:
|
|
340
|
+
return e;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}), Pe = k(
|
|
344
|
+
(e) => {
|
|
345
|
+
ke.current = e, P.setFloating(e);
|
|
346
|
+
},
|
|
347
|
+
[P]
|
|
348
|
+
), cr = k(
|
|
349
|
+
(e = {}) => {
|
|
350
|
+
const n = Re(e), s = n.ref;
|
|
351
|
+
return {
|
|
352
|
+
...n,
|
|
353
|
+
ref: (i) => {
|
|
354
|
+
Pe(i), typeof s == "function" ? s(i) : s && (s.current = i);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
},
|
|
358
|
+
[Re, Pe]
|
|
359
|
+
);
|
|
360
|
+
F(() => {
|
|
361
|
+
t && l && I.current !== null && I.current >= 0 && I.current < g.length && (T(I.current), I.current = null, requestAnimationFrame(() => {
|
|
362
|
+
M.current && !$ && M.current.scrollTop(de.current);
|
|
363
|
+
}));
|
|
364
|
+
}, [t, l, r, g.length, T, $]), F(() => {
|
|
365
|
+
l && O && requestAnimationFrame(() => {
|
|
366
|
+
var e;
|
|
367
|
+
(e = ue.current) == null || e.focus();
|
|
368
|
+
});
|
|
369
|
+
}, [l, O]), F(() => {
|
|
370
|
+
O && l && v !== he.current && (he.current = v, v && T(0));
|
|
371
|
+
}, [v, O, l]), $e(() => {
|
|
372
|
+
if (!l || !y)
|
|
373
|
+
return;
|
|
374
|
+
let e = window.scrollY, n = !0;
|
|
375
|
+
const s = 300, i = () => {
|
|
376
|
+
if (!n)
|
|
377
|
+
return;
|
|
378
|
+
window.scrollY !== e && window.scrollTo(0, e);
|
|
379
|
+
}, d = (h) => {
|
|
380
|
+
n && (h.preventDefault(), h.stopImmediatePropagation(), i());
|
|
381
|
+
};
|
|
382
|
+
e = window.scrollY, window.addEventListener("scroll", d, { passive: !1, capture: !0 }), requestAnimationFrame(() => {
|
|
383
|
+
e = window.scrollY, i();
|
|
384
|
+
});
|
|
385
|
+
const a = setTimeout(() => {
|
|
386
|
+
n = !1;
|
|
387
|
+
}, s);
|
|
388
|
+
return () => {
|
|
389
|
+
clearTimeout(a), window.removeEventListener("scroll", d, { capture: !0 });
|
|
390
|
+
};
|
|
391
|
+
}, [l, y]), F(() => {
|
|
392
|
+
if (!l || !y)
|
|
393
|
+
return;
|
|
394
|
+
const e = () => {
|
|
395
|
+
C();
|
|
396
|
+
};
|
|
397
|
+
return window.addEventListener("resize", e), () => {
|
|
398
|
+
window.removeEventListener("resize", e);
|
|
399
|
+
};
|
|
400
|
+
}, [l, y, C]);
|
|
401
|
+
const Ye = () => {
|
|
402
|
+
o || (J((e) => !e), l ? A == null || A() : E == null || E(), Q(V.ON_CLICK));
|
|
403
|
+
}, me = w(() => {
|
|
404
|
+
if (t && Array.isArray(r) && D.length > 0 && D.every((n) => L.has(n)))
|
|
405
|
+
return le.label;
|
|
406
|
+
const e = g.reduce((n, s) => ((Array.isArray(r) && r.includes(s.value) || s.value === r) && n.push(s.label), n), []);
|
|
407
|
+
return e.length > 0 ? e.join(", ") : !r && r !== !1 && r !== 0 || Array.isArray(r) && !r.length ? b : typeof r == "string" && r.length > 0 && !b ? r : b || void 0;
|
|
408
|
+
}, [
|
|
409
|
+
t,
|
|
410
|
+
r,
|
|
411
|
+
D,
|
|
412
|
+
L,
|
|
413
|
+
le.label,
|
|
414
|
+
g,
|
|
415
|
+
b
|
|
416
|
+
]), ge = w(() => ce ? ce(me) : me, [ce, me]), dr = fe && ge ? ge : void 0, { ref: ur, title: hr } = xr(dr), fr = (e) => {
|
|
417
|
+
const { keyCode: n } = e;
|
|
418
|
+
Wr.includes(n) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !l && (T(xe), te(), Q(V.ON_KEY_DOWN)));
|
|
419
|
+
}, _r = (e) => {
|
|
420
|
+
const { keyCode: n } = e;
|
|
421
|
+
if (n === p.ENTER_KEY_CODE || n === p.SPACE_KEY_CODE) {
|
|
422
|
+
const s = g[pe];
|
|
423
|
+
if (!s || s.disabled)
|
|
424
|
+
return;
|
|
425
|
+
t && (I.current = pe), Te(s), t || C();
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
zr.includes(n) && (e.stopPropagation(), C());
|
|
429
|
+
}, Ve = () => /* @__PURE__ */ R("div", { className: _("options-container"), children: [
|
|
430
|
+
t && Ce && !ne(K) && /* @__PURE__ */ R(He, { children: [
|
|
431
|
+
/* @__PURE__ */ u(
|
|
432
|
+
We,
|
|
433
|
+
{
|
|
434
|
+
option: le,
|
|
435
|
+
selected: Array.isArray(r) && D.length > 0 && D.every((e) => L.has(e)),
|
|
436
|
+
onChange: nr,
|
|
437
|
+
multiSelect: t,
|
|
438
|
+
isPartiallyChecked: D.some((e) => L.has(e)) && !D.every((e) => L.has(e)),
|
|
439
|
+
disabledOptionTooltipPortalRoot: Oe
|
|
440
|
+
}
|
|
441
|
+
),
|
|
442
|
+
/* @__PURE__ */ u("div", { className: _("divider") }),
|
|
443
|
+
" "
|
|
444
|
+
] }),
|
|
445
|
+
ne(K) ? /* @__PURE__ */ u("div", { className: _("empty-list-message"), children: Ge }) : K.map(({ option: e, depth: n }, s) => {
|
|
446
|
+
var h, N;
|
|
447
|
+
const i = re.get(e.value) ?? [e.value], d = t && i.every((Y) => L.has(Y)), a = t && ((h = e.children) == null ? void 0 : h.length) && i.some((Y) => L.has(Y)) && !d;
|
|
448
|
+
return /* @__PURE__ */ u(
|
|
449
|
+
We,
|
|
450
|
+
{
|
|
451
|
+
...lr({
|
|
452
|
+
item: e,
|
|
453
|
+
index: s
|
|
454
|
+
}),
|
|
455
|
+
multiSelect: t,
|
|
456
|
+
selected: t ? d : e.value === r,
|
|
457
|
+
option: e,
|
|
458
|
+
highlightHovered: pe === s && er !== V.ON_CLICK,
|
|
459
|
+
render: Z,
|
|
460
|
+
onChange: e.disabled ? null : () => Te(e),
|
|
461
|
+
onMouseEnter: () => T(s),
|
|
462
|
+
depth: n,
|
|
463
|
+
hasChildren: !!((N = e.children) != null && N.length),
|
|
464
|
+
isPartiallyChecked: a,
|
|
465
|
+
disabledOptionTooltipPortalRoot: Oe
|
|
466
|
+
},
|
|
467
|
+
e.value
|
|
468
|
+
);
|
|
469
|
+
}),
|
|
470
|
+
X && /* @__PURE__ */ R(He, { children: [
|
|
471
|
+
/* @__PURE__ */ u("div", { className: _("divider") }),
|
|
472
|
+
typeof X == "function" ? X(C) : X
|
|
473
|
+
] })
|
|
474
|
+
] }), pr = () => {
|
|
475
|
+
const e = ve.reduce((a, h) => (Array.isArray(r) && r.includes(h.value) && a.push(h.label), a), []), n = (a) => {
|
|
476
|
+
const h = ve.find(
|
|
477
|
+
({ label: Er }) => Er === a
|
|
478
|
+
);
|
|
479
|
+
if (!h)
|
|
480
|
+
return;
|
|
481
|
+
const N = Array.isArray(r) ? r : [], Y = new Set(N);
|
|
482
|
+
Y.delete(h.value);
|
|
483
|
+
const wr = z(Y);
|
|
484
|
+
m(Array.from(wr));
|
|
485
|
+
}, s = (a) => {
|
|
486
|
+
const h = a.target;
|
|
487
|
+
De(h.value), l || (te(), requestAnimationFrame(() => {
|
|
488
|
+
h.focus();
|
|
489
|
+
}));
|
|
490
|
+
}, i = (a) => {
|
|
491
|
+
if (a.keyCode === p.ESCAPE_KEY_CODE) {
|
|
492
|
+
a.stopPropagation(), C();
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
a.keyCode === p.ENTER_KEY_CODE || a.keyCode === p.SPACE_KEY_CODE || (a.keyCode === p.ARROW_DOWN_KEY_CODE || a.keyCode === p.ARROW_UP_KEY_CODE) && (a.preventDefault(), te());
|
|
496
|
+
}, d = /* @__PURE__ */ u(
|
|
497
|
+
"input",
|
|
498
|
+
{
|
|
499
|
+
ref: ue,
|
|
500
|
+
type: "text",
|
|
501
|
+
className: _("search-input"),
|
|
502
|
+
value: v,
|
|
503
|
+
onChange: s,
|
|
504
|
+
onKeyDown: i,
|
|
505
|
+
onClick: (a) => {
|
|
506
|
+
a.stopPropagation(), te();
|
|
507
|
+
},
|
|
508
|
+
placeholder: ne(e) ? b : "",
|
|
509
|
+
autoComplete: "off"
|
|
510
|
+
}
|
|
511
|
+
);
|
|
512
|
+
return ne(e) ? /* @__PURE__ */ u("div", { className: _("tags-wrapper", "with-search"), children: d }) : /* @__PURE__ */ R("div", { className: _("tags-wrapper", "with-search"), children: [
|
|
513
|
+
/* @__PURE__ */ u(
|
|
514
|
+
Tr,
|
|
515
|
+
{
|
|
516
|
+
tags: e,
|
|
517
|
+
onRemoveTag: n,
|
|
518
|
+
isShowAllView: !0,
|
|
519
|
+
defaultVisibleLines: Ur
|
|
520
|
+
}
|
|
521
|
+
),
|
|
522
|
+
d
|
|
523
|
+
] });
|
|
524
|
+
}, mr = () => O && t && Array.isArray(r) ? pr() : /* @__PURE__ */ u(
|
|
525
|
+
"span",
|
|
526
|
+
{
|
|
527
|
+
ref: ur,
|
|
528
|
+
className: _("value", {
|
|
529
|
+
placeholder: !fe
|
|
530
|
+
}),
|
|
531
|
+
title: hr,
|
|
532
|
+
children: ge
|
|
533
|
+
}
|
|
534
|
+
), gr = ar({
|
|
535
|
+
className: _("dropdown", se, G, {
|
|
536
|
+
"transparent-background": oe,
|
|
537
|
+
opened: l,
|
|
538
|
+
disabled: o,
|
|
539
|
+
error: f,
|
|
540
|
+
touched: U,
|
|
541
|
+
"mobile-disabled": B,
|
|
542
|
+
"multi-select-with-tags": O
|
|
543
|
+
}),
|
|
544
|
+
onClick: Ye,
|
|
545
|
+
onKeyDown: fr,
|
|
546
|
+
ref: P.setReference
|
|
547
|
+
}), { type: dt, ...Se } = gr;
|
|
548
|
+
return /* @__PURE__ */ R(
|
|
549
|
+
"div",
|
|
550
|
+
{
|
|
551
|
+
ref: Ne,
|
|
552
|
+
className: _("container", ae),
|
|
553
|
+
title: S,
|
|
554
|
+
...Qe,
|
|
555
|
+
...Je,
|
|
556
|
+
children: [
|
|
557
|
+
q && /* @__PURE__ */ u(
|
|
558
|
+
Lr,
|
|
559
|
+
{
|
|
560
|
+
...ir(),
|
|
561
|
+
onClick: () => !o && Ye(),
|
|
562
|
+
style: { cursor: o ? "default" : "pointer" },
|
|
563
|
+
children: q
|
|
564
|
+
}
|
|
565
|
+
),
|
|
566
|
+
/* @__PURE__ */ R(
|
|
567
|
+
"div",
|
|
568
|
+
{
|
|
569
|
+
...Se,
|
|
570
|
+
role: "button",
|
|
571
|
+
"aria-disabled": o,
|
|
572
|
+
tabIndex: o ? -1 : Se.tabIndex ?? 0,
|
|
573
|
+
children: [
|
|
574
|
+
j && /* @__PURE__ */ u("span", { className: _("icon"), children: j }),
|
|
575
|
+
/* @__PURE__ */ u("div", { className: _("value-wrapper"), children: mr() }),
|
|
576
|
+
rr && /* @__PURE__ */ u(
|
|
577
|
+
vr,
|
|
578
|
+
{
|
|
579
|
+
className: _("clear-button"),
|
|
580
|
+
onClick: sr,
|
|
581
|
+
onKeyDown: (e) => {
|
|
582
|
+
const { keyCode: n } = e;
|
|
583
|
+
(n === p.ENTER_KEY_CODE || n === p.SPACE_KEY_CODE) && (e.preventDefault(), e.stopPropagation(), _e());
|
|
584
|
+
},
|
|
585
|
+
"aria-label": Ze,
|
|
586
|
+
children: /* @__PURE__ */ u(Ir, {})
|
|
587
|
+
}
|
|
588
|
+
),
|
|
589
|
+
/* @__PURE__ */ u("span", { className: _("arrow"), "aria-hidden": "true", children: /* @__PURE__ */ u(Kr, {}) })
|
|
590
|
+
]
|
|
591
|
+
}
|
|
592
|
+
),
|
|
593
|
+
l && (() => {
|
|
594
|
+
var i;
|
|
595
|
+
const e = (i = P.reference.current) == null ? void 0 : i.getBoundingClientRect().width, n = y && e ? {
|
|
596
|
+
...Ke,
|
|
597
|
+
width: `${e}px`,
|
|
598
|
+
minWidth: `${e}px`,
|
|
599
|
+
maxWidth: `${e}px`
|
|
600
|
+
} : Ke, s = /* @__PURE__ */ u(
|
|
601
|
+
"div",
|
|
602
|
+
{
|
|
603
|
+
style: n,
|
|
604
|
+
className: _(
|
|
605
|
+
"select-list",
|
|
606
|
+
{
|
|
607
|
+
opened: l,
|
|
608
|
+
"limited-width": H
|
|
609
|
+
},
|
|
610
|
+
ie
|
|
611
|
+
),
|
|
612
|
+
...y && { [Br]: "" },
|
|
613
|
+
...cr({
|
|
614
|
+
onKeyDown: _r,
|
|
615
|
+
...O && {
|
|
616
|
+
tabIndex: -1,
|
|
617
|
+
onFocus: (d) => {
|
|
618
|
+
var a;
|
|
619
|
+
d.preventDefault(), (a = ue.current) == null || a.focus();
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}),
|
|
623
|
+
children: $ ? Ve() : /* @__PURE__ */ u(
|
|
624
|
+
kr,
|
|
625
|
+
{
|
|
626
|
+
autoHeight: !0,
|
|
627
|
+
autoHeightMax: Fr,
|
|
628
|
+
hideTracksWhenNotNeeded: !0,
|
|
629
|
+
ref: (d) => {
|
|
630
|
+
M.current = d;
|
|
631
|
+
},
|
|
632
|
+
onScrollFrame: tr,
|
|
633
|
+
children: Ve()
|
|
634
|
+
}
|
|
635
|
+
)
|
|
636
|
+
}
|
|
637
|
+
);
|
|
638
|
+
return y ? Cr(s, y) : s;
|
|
639
|
+
})()
|
|
640
|
+
]
|
|
641
|
+
}
|
|
642
|
+
);
|
|
643
|
+
};
|
|
644
|
+
export {
|
|
645
|
+
Kt as D,
|
|
646
|
+
Br as a
|
|
647
|
+
};
|