@reportportal/ui-kit 0.0.1-alpha.26 → 0.0.1-alpha.261
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-faf12efe.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 +899 -0
- package/dist/baseIconButton-f1c96f52.js +25 -0
- package/dist/baseIconButton.js +1 -1
- package/dist/breadcrumbs-0a228139.js +206 -0
- package/dist/breadcrumbs.js +14 -0
- package/dist/bubblesLoader-f3ffa240.js +28 -0
- package/dist/bubblesLoader.js +1 -1
- package/dist/bulkPanel.js +226 -0
- package/dist/button-7ab874f3.js +66 -0
- package/dist/button.js +1 -1
- package/dist/calendarArrow-44c7e60e.js +5 -0
- package/dist/capslockIcon-b9dcdce5.js +7 -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 +87 -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 +5 -0
- package/dist/common/hooks/useCapsLock.d.ts +20 -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 +71 -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 +16 -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 +13 -4
- package/dist/components/fieldText/index.d.ts +3 -1
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +6 -3
- 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 +80 -9
- package/dist/components/index.d.ts +33 -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/constants.d.ts +2 -0
- package/dist/components/modal/index.d.ts +2 -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 +3 -4
- 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 +52 -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-49d50d11.js +11 -0
- package/dist/constants-85822a6b.js +6 -0
- package/dist/datePicker-c746f34c.js +229 -0
- package/dist/datePicker.js +39 -0
- package/dist/details-dbb1530b.js +5 -0
- package/dist/download-77ff4638.js +12 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-2b7f4f78.js +647 -0
- package/dist/dropdown.js +19 -3
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-b7e64bbb.js +141 -0
- package/dist/fieldNumber.js +5 -2
- package/dist/fieldText-b9b0ea9f.js +191 -0
- package/dist/fieldText.js +14 -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 +106 -0
- package/dist/index-612cf951.js +139 -0
- package/dist/index.js +212 -242
- package/dist/isEmpty-ccacb5ff.js +38 -0
- package/dist/issueList.js +128 -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 +185 -14
- package/dist/pagination-f2f004f2.js +373 -0
- package/dist/pagination.js +17 -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-2d63aca5.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 +138 -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-c2bfbcc5.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-1b58a6d0.js +1183 -0
- package/dist/table.js +13 -3
- package/dist/toggle-751ee174.js +59 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +96 -57
- package/dist/tree-c3dd3d45.js +6 -0
- package/dist/useCapsLock-428c77b6.js +24 -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/package.json +54 -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-700bc62a.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
package/dist/table.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import { T as r } from "./table-
|
|
1
|
+
import { T as r } from "./table-1b58a6d0.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
|
+
import "react-resizable";
|
|
4
5
|
import "./bind-06a7ff84.js";
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
6
|
+
import "./resizeColumn-46b5b30f.js";
|
|
7
|
+
import "./chevronDownDropdown-0260bb66.js";
|
|
8
|
+
import "./checkbox-76aa8f97.js";
|
|
7
9
|
import "./keyCodes-f63c0e11.js";
|
|
10
|
+
import "./tooltip.js";
|
|
11
|
+
import "react-dom";
|
|
12
|
+
import "@floating-ui/react";
|
|
13
|
+
import "./floatingUi-46f5b896.js";
|
|
14
|
+
import "react-dnd";
|
|
15
|
+
import "react-dnd-html5-backend";
|
|
16
|
+
import "./useEllipsisTitle-462fa254.js";
|
|
17
|
+
import "./isEmpty-ccacb5ff.js";
|
|
8
18
|
export {
|
|
9
19
|
r as Table,
|
|
10
20
|
r as default
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as b } from "./bind-06a7ff84.js";
|
|
3
|
+
import { useRef as h, useId as k } from "react";
|
|
4
|
+
import { K as _ } from "./keyCodes-f63c0e11.js";
|
|
5
|
+
const y = "_toggle_1x421_1", E = "_slider_1x421_27", D = "_round_1x421_47", K = "_input_1x421_51", N = "_disabled_1x421_92", C = {
|
|
6
|
+
toggle: y,
|
|
7
|
+
"children-container": "_children-container_1x421_14",
|
|
8
|
+
slider: E,
|
|
9
|
+
round: D,
|
|
10
|
+
input: K,
|
|
11
|
+
disabled: N
|
|
12
|
+
}, e = b.bind(C), w = ({
|
|
13
|
+
children: c,
|
|
14
|
+
value: r,
|
|
15
|
+
onChange: u,
|
|
16
|
+
className: p,
|
|
17
|
+
disabled: n = !1,
|
|
18
|
+
title: m,
|
|
19
|
+
...x
|
|
20
|
+
}) => {
|
|
21
|
+
const o = h(null), l = k(), f = (s) => {
|
|
22
|
+
var a, d;
|
|
23
|
+
const { keyCode: i } = s;
|
|
24
|
+
if (i === _.SPACE_KEY_CODE) {
|
|
25
|
+
s.preventDefault(), (a = o.current) == null || a.click();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
i === _.ENTER_KEY_CODE && (s.preventDefault(), (d = o.current) == null || d.click());
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ g("label", { id: l, title: m, className: e("toggle", p, { disabled: n }), children: [
|
|
31
|
+
/* @__PURE__ */ t(
|
|
32
|
+
"input",
|
|
33
|
+
{
|
|
34
|
+
ref: o,
|
|
35
|
+
tabIndex: n ? -1 : 0,
|
|
36
|
+
onChange: u,
|
|
37
|
+
checked: r,
|
|
38
|
+
disabled: n,
|
|
39
|
+
onKeyDown: f,
|
|
40
|
+
className: e("input"),
|
|
41
|
+
type: "checkbox",
|
|
42
|
+
...x
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ t(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
"aria-labelledby": l,
|
|
49
|
+
role: "checkbox",
|
|
50
|
+
"aria-checked": r,
|
|
51
|
+
className: e("slider", "round")
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
c && /* @__PURE__ */ t("span", { className: e("children-container"), children: c })
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
w as T
|
|
59
|
+
};
|
package/dist/toggle.js
CHANGED
package/dist/tooltip.js
CHANGED
|
@@ -1,71 +1,110 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"tooltip-
|
|
9
|
-
"tooltip-
|
|
10
|
-
}, i =
|
|
11
|
-
content:
|
|
12
|
-
wrapperClassName:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { jsxs as u, Fragment as R, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as G, useRef as f } from "react";
|
|
3
|
+
import { createPortal as j } from "react-dom";
|
|
4
|
+
import { c as k } from "./bind-06a7ff84.js";
|
|
5
|
+
import { useFloating as $, offset as B, flip as C, arrow as U, autoUpdate as Y, FloatingArrow as Z } from "@floating-ui/react";
|
|
6
|
+
import { T as h, g as q, a as z, b as J } from "./floatingUi-46f5b896.js";
|
|
7
|
+
const K = {
|
|
8
|
+
"tooltip-wrapper": "_tooltip-wrapper_1n6ya_16",
|
|
9
|
+
"tooltip-content": "_tooltip-content_1n6ya_26"
|
|
10
|
+
}, i = k.bind(K), Q = 300, V = 100, it = ({
|
|
11
|
+
content: g,
|
|
12
|
+
wrapperClassName: x,
|
|
13
|
+
wrapperTabIndex: T = 0,
|
|
14
|
+
tooltipClassName: w,
|
|
15
|
+
contentClassName: _,
|
|
16
|
+
dynamicWidth: A,
|
|
17
|
+
width: E,
|
|
18
|
+
minWidth: b = 120,
|
|
19
|
+
safeZone: y = 4,
|
|
20
|
+
zIndex: I = 9,
|
|
21
|
+
placement: N = "bottom",
|
|
22
|
+
arrowColor: F = "rgba(34, 34, 34, 0.91)",
|
|
23
|
+
dataAutomationId: O,
|
|
24
|
+
mainAxis: S = !0,
|
|
25
|
+
children: W,
|
|
26
|
+
portalRoot: r,
|
|
27
|
+
isFloating: v = !0
|
|
19
28
|
}) => {
|
|
20
|
-
const [
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
const [a, l] = G(!1), c = f(null), e = f(), { refs: m, floatingStyles: L, context: M } = $({
|
|
30
|
+
open: a,
|
|
31
|
+
placement: N,
|
|
23
32
|
middleware: [
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
B(({ rects: t, placement: P }) => ({
|
|
34
|
+
mainAxis: y + h,
|
|
35
|
+
alignmentAxis: q(t, P)
|
|
36
|
+
})),
|
|
37
|
+
v && C({
|
|
38
|
+
mainAxis: S,
|
|
39
|
+
fallbackAxisSideDirection: "start",
|
|
40
|
+
fallbackPlacements: z
|
|
41
|
+
}),
|
|
42
|
+
U({
|
|
43
|
+
element: c
|
|
26
44
|
})
|
|
27
|
-
]
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
],
|
|
46
|
+
whileElementsMounted: Y
|
|
47
|
+
}), o = A ? null : { width: `${E}px` }, D = document.documentElement.clientWidth, H = o || D - V, n = () => {
|
|
48
|
+
e.current && clearTimeout(e.current), l(!1);
|
|
49
|
+
}, d = () => {
|
|
50
|
+
e.current = setTimeout(() => l(!0), Q);
|
|
51
|
+
}, p = () => /* @__PURE__ */ u(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref: m.setFloating,
|
|
55
|
+
style: {
|
|
56
|
+
...L,
|
|
57
|
+
...o,
|
|
58
|
+
minWidth: b,
|
|
59
|
+
zIndex: I,
|
|
60
|
+
pointerEvents: "none"
|
|
61
|
+
},
|
|
62
|
+
"data-automation-id": O,
|
|
63
|
+
className: i(w),
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ s(
|
|
66
|
+
Z,
|
|
67
|
+
{
|
|
68
|
+
ref: c,
|
|
69
|
+
context: M,
|
|
70
|
+
width: J,
|
|
71
|
+
height: h,
|
|
72
|
+
fill: F
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ s(
|
|
56
76
|
"div",
|
|
57
77
|
{
|
|
58
|
-
className: i("tooltip-content",
|
|
78
|
+
className: i("tooltip-content", _),
|
|
59
79
|
style: {
|
|
60
|
-
maxWidth: `${
|
|
80
|
+
maxWidth: `${H}px`
|
|
61
81
|
},
|
|
62
|
-
children:
|
|
82
|
+
children: g
|
|
63
83
|
}
|
|
64
84
|
)
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
return /* @__PURE__ */ u(R, { children: [
|
|
89
|
+
/* @__PURE__ */ s(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
ref: m.setReference,
|
|
93
|
+
className: i("tooltip-wrapper", x),
|
|
94
|
+
onMouseDown: n,
|
|
95
|
+
onMouseEnter: d,
|
|
96
|
+
onMouseLeave: n,
|
|
97
|
+
onFocus: (t) => {
|
|
98
|
+
t.target === t.currentTarget && d();
|
|
99
|
+
},
|
|
100
|
+
onBlur: n,
|
|
101
|
+
tabIndex: T,
|
|
102
|
+
children: W
|
|
65
103
|
}
|
|
66
|
-
)
|
|
104
|
+
),
|
|
105
|
+
a && (r ? j(p(), r) : p())
|
|
67
106
|
] });
|
|
68
107
|
};
|
|
69
108
|
export {
|
|
70
|
-
|
|
109
|
+
it as Tooltip
|
|
71
110
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as C from "react";
|
|
2
|
+
const l = (e) => /* @__PURE__ */ C.createElement("svg", { width: 14, height: 3, viewBox: "0 0 14 3", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ C.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.30811 2.47803C1.72868 2.47803 2.05339 2.36206 2.28223 2.13013C2.51107 1.89819 2.62549 1.60596 2.62549 1.25342C2.62549 0.894694 2.51107 0.596273 2.28223 0.358154C2.05339 0.120036 1.72868 0.000976562 1.30811 0.000976562C0.893717 0.000976562 0.572103 0.120036 0.343262 0.358154C0.114421 0.596273 0 0.894694 0 1.25342C0 1.61214 0.117513 1.90592 0.352539 2.13477C0.587565 2.36361 0.906087 2.47803 1.30811 2.47803ZM6.61475 2.47803C7.03532 2.47803 7.36003 2.36206 7.58887 2.13013C7.81771 1.89819 7.93213 1.60596 7.93213 1.25342C7.93213 0.894694 7.81771 0.596273 7.58887 0.358154C7.36003 0.120036 7.03532 0.000976562 6.61475 0.000976562C6.20036 0.000976562 5.87874 0.120036 5.6499 0.358154C5.42106 0.596273 5.30664 0.894694 5.30664 1.25342C5.30664 1.61214 5.42415 1.90592 5.65918 2.13477C5.89421 2.36361 6.21273 2.47803 6.61475 2.47803ZM12.8955 2.13013C12.6667 2.36206 12.342 2.47803 11.9214 2.47803C11.5194 2.47803 11.2008 2.36361 10.9658 2.13477C10.7308 1.90592 10.6133 1.61214 10.6133 1.25342C10.6133 0.894694 10.7277 0.596273 10.9565 0.358154C11.1854 0.120036 11.507 0.000976562 11.9214 0.000976562C12.342 0.000976562 12.6667 0.120036 12.8955 0.358154C13.1243 0.596273 13.2388 0.894694 13.2388 1.25342C13.2388 1.60596 13.1243 1.89819 12.8955 2.13013Z", fill: "#A2AAB5" })), 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", { d: "M2 10C2 10.764 2.24187 11.5133 2.69535 12.0801C3.15115 12.6499 3.79637 13 4.5 13H5.9C5.86913 12.8384 5.85293 12.6712 5.85293 12.5C5.85293 12.3288 5.86913 12.1616 5.89999 12H4.5C4.14277 12 3.77057 11.8234 3.47622 11.4554C3.17956 11.0846 3 10.5621 3 10V5.40311C3.41945 5.77926 3.94131 6 4.5 6H5.89996C5.8691 5.83844 5.85289 5.67122 5.85289 5.49998C5.85289 5.32876 5.86909 5.16155 5.89996 5L4.5 5C4.14277 5 3.77057 4.82335 3.47622 4.45542C3.17956 4.08459 3 3.56203 3 2.99994L3 1.5C3 1.22386 2.77614 1 2.5 1C2.22386 1 2 1.22386 2 1.5L2 10Z", fill: "#A2AAB5" }), /* @__PURE__ */ C.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.20583 3.99998H11.5C12.1909 3.99998 12.8529 4.61358 12.8529 5.49998C12.8529 6.38639 12.1909 6.99998 11.5 6.99998H8.20583C7.51487 6.99998 6.85289 6.38639 6.85289 5.49998C6.85289 4.61358 7.51487 3.99998 8.20583 3.99998ZM8.20587 11H11.5C12.1909 11 12.8529 11.6136 12.8529 12.5C12.8529 13.3864 12.1909 14 11.5 14H8.20587C7.51491 14 6.85293 13.3864 6.85293 12.5C6.85293 11.6136 7.51491 11 8.20587 11ZM5.89996 5C6.11796 3.85887 7.06749 2.99998 8.20583 2.99998H11.5C12.7994 2.99998 13.8529 4.11927 13.8529 5.49998C13.8529 6.8807 12.7994 7.99998 11.5 7.99998H8.20583C7.0675 7.99998 6.11798 7.14111 5.89996 6C5.8691 5.83844 5.85289 5.67122 5.85289 5.49998C5.85289 5.32876 5.86909 5.16155 5.89996 5ZM5.89999 12C6.118 10.8589 7.06753 9.99998 8.20587 9.99998H11.5C12.7995 9.99998 13.8529 11.1193 13.8529 12.5C13.8529 13.8807 12.7995 15 11.5 15H8.20587C7.06754 15 6.11801 14.1411 5.9 13H6C6.27614 13 6.5 12.7761 6.5 12.5C6.5 12.2239 6.27614 12 6 12H5.89999Z", fill: "#A2AAB5" }), /* @__PURE__ */ C.createElement("path", { d: "M6.5 12.5C6.5 12.2239 6.27614 12 6 12H5.89999C5.86913 12.1616 5.85293 12.3288 5.85293 12.5C5.85293 12.6712 5.86913 12.8384 5.9 13H6C6.27614 13 6.5 12.7761 6.5 12.5Z", fill: "#A2AAB5" }));
|
|
3
|
+
export {
|
|
4
|
+
l as S,
|
|
5
|
+
t as a
|
|
6
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useState as d, useCallback as r, useEffect as k } from "react";
|
|
2
|
+
const n = (e) => {
|
|
3
|
+
var i, o, s;
|
|
4
|
+
return ((i = e == null ? void 0 : e.getModifierState) == null ? void 0 : i.call(e, "CapsLock")) ?? ((s = (o = e == null ? void 0 : e.nativeEvent) == null ? void 0 : o.getModifierState) == null ? void 0 : s.call(o, "CapsLock")) ?? !1;
|
|
5
|
+
}, u = () => {
|
|
6
|
+
const [e, i] = d(!1), o = r((s) => {
|
|
7
|
+
i(n(s));
|
|
8
|
+
}, []);
|
|
9
|
+
return k(() => {
|
|
10
|
+
const s = (t) => {
|
|
11
|
+
i(n(t));
|
|
12
|
+
}, a = (t) => {
|
|
13
|
+
t.key === "CapsLock" && i(n(t));
|
|
14
|
+
}, c = () => {
|
|
15
|
+
document.visibilityState === "visible" && i(!1);
|
|
16
|
+
};
|
|
17
|
+
return window.addEventListener("keydown", s), window.addEventListener("keyup", a), document.addEventListener("visibilitychange", c), () => {
|
|
18
|
+
window.removeEventListener("keydown", s), window.removeEventListener("keyup", a), document.removeEventListener("visibilitychange", c);
|
|
19
|
+
};
|
|
20
|
+
}, []), { capsLockOn: e, syncFromMouseEvent: o };
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
u
|
|
24
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useRef as u, useState as c, useEffect as f } from "react";
|
|
2
|
+
function d(r) {
|
|
3
|
+
const t = u(null), [o, s] = c();
|
|
4
|
+
return f(() => {
|
|
5
|
+
const e = t.current;
|
|
6
|
+
if (!e || r == null) {
|
|
7
|
+
s(void 0);
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const i = () => {
|
|
11
|
+
const l = e.scrollWidth > e.clientWidth;
|
|
12
|
+
s(l ? String(r) : void 0);
|
|
13
|
+
};
|
|
14
|
+
if (i(), typeof ResizeObserver > "u")
|
|
15
|
+
return;
|
|
16
|
+
const n = new ResizeObserver(i);
|
|
17
|
+
return n.observe(e), () => n.disconnect();
|
|
18
|
+
}, [r]), { ref: t, title: o };
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
d as u
|
|
22
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useRef as m, useEffect as d } from "react";
|
|
2
|
+
function p(e, t, n) {
|
|
3
|
+
const s = m(n);
|
|
4
|
+
d(() => {
|
|
5
|
+
s.current = n;
|
|
6
|
+
}, [n]), d(() => {
|
|
7
|
+
if (!t)
|
|
8
|
+
return;
|
|
9
|
+
const c = (o) => {
|
|
10
|
+
var u, i;
|
|
11
|
+
if (e && e.current && !e.current.contains(o.target)) {
|
|
12
|
+
const r = o.target;
|
|
13
|
+
((i = (u = s.current) == null ? void 0 : u.ignoreSelectors) == null ? void 0 : i.some(
|
|
14
|
+
(f) => r == null ? void 0 : r.closest(f)
|
|
15
|
+
)) || t(o);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return document.addEventListener("pointerdown", c), () => {
|
|
19
|
+
document.removeEventListener("pointerdown", c);
|
|
20
|
+
};
|
|
21
|
+
}, [e, t]);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
p as u
|
|
25
|
+
};
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { useRef as Z, useState as X, useEffect as V, useCallback as W } from "react";
|
|
2
|
+
import { useDrag as M, useDrop as k } from "react-dnd";
|
|
3
|
+
import { getEmptyImage as G } from "react-dnd-html5-backend";
|
|
4
|
+
import { DROP_POSITIONS as R, DROP_DETECTION_MODE as Y, SORTABLE_ORIENTATION as d, TREE_DROP_POSITIONS as L } from "./common.js";
|
|
5
|
+
const b = "SORTABLE_ITEM", $ = "EXTERNAL_TREE_DROP", nn = (n) => {
|
|
6
|
+
if (!n)
|
|
7
|
+
return {
|
|
8
|
+
display: "none"
|
|
9
|
+
};
|
|
10
|
+
const { x: t, y: o } = n, i = `translate(${t}px, ${o}px)`;
|
|
11
|
+
return {
|
|
12
|
+
transform: i,
|
|
13
|
+
WebkitTransform: i
|
|
14
|
+
};
|
|
15
|
+
}, U = ({
|
|
16
|
+
fromIndex: n,
|
|
17
|
+
targetIndex: t,
|
|
18
|
+
isTopZone: o
|
|
19
|
+
}) => o ? n < t ? t - 1 : t : n > t ? t + 1 : t, q = (n, t) => n / t < 0.5 ? R.TOP : R.BOTTOM, J = (n, t) => n / t < 0.5 ? R.LEFT : R.RIGHT, tn = ({
|
|
20
|
+
id: n,
|
|
21
|
+
index: t,
|
|
22
|
+
type: o = b,
|
|
23
|
+
isDisabled: i = !1,
|
|
24
|
+
isLast: B = !1,
|
|
25
|
+
onDrop: u,
|
|
26
|
+
hideDefaultPreview: m = !1,
|
|
27
|
+
dropDetectionMode: l = Y.INDEX_BASED,
|
|
28
|
+
orientation: O = d.VERTICAL
|
|
29
|
+
}) => {
|
|
30
|
+
const I = l === Y.HOVER, a = O === d.HORIZONTAL, D = Z(null), P = Z(null), [S, f] = X(null), [{ isDragging: A }, w, C] = M(
|
|
31
|
+
() => ({
|
|
32
|
+
type: o,
|
|
33
|
+
item: { id: n, index: t, type: o },
|
|
34
|
+
collect: (r) => ({
|
|
35
|
+
isDragging: r.isDragging()
|
|
36
|
+
}),
|
|
37
|
+
canDrag: () => !i
|
|
38
|
+
}),
|
|
39
|
+
[n, t, o, i]
|
|
40
|
+
);
|
|
41
|
+
V(() => {
|
|
42
|
+
m && C(G(), { captureDraggingState: !0 });
|
|
43
|
+
}, [m, C]);
|
|
44
|
+
const [{ isOver: N, draggedItemIndex: v }, p] = k(
|
|
45
|
+
() => ({
|
|
46
|
+
accept: o,
|
|
47
|
+
collect: (r) => {
|
|
48
|
+
const e = r.getItem(), c = (e == null ? void 0 : e.id) !== n ? r.isOver() : !1;
|
|
49
|
+
return {
|
|
50
|
+
isOver: c,
|
|
51
|
+
draggedItemIndex: c ? (e == null ? void 0 : e.index) ?? null : null
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
hover: (r, e) => {
|
|
55
|
+
if (!I)
|
|
56
|
+
return;
|
|
57
|
+
if (r.id === n) {
|
|
58
|
+
f(null);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const E = D.current;
|
|
62
|
+
if (!E) {
|
|
63
|
+
f(null);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const c = E.getBoundingClientRect(), T = e.getClientOffset();
|
|
67
|
+
if (!T) {
|
|
68
|
+
f(null);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
let g;
|
|
72
|
+
if (a) {
|
|
73
|
+
const h = c.right - c.left, _ = T.x - c.left;
|
|
74
|
+
g = J(_, h);
|
|
75
|
+
} else {
|
|
76
|
+
const h = c.bottom - c.top, _ = T.y - c.top;
|
|
77
|
+
g = q(_, h);
|
|
78
|
+
}
|
|
79
|
+
g === null ? (f(null), P.current = null) : (f(g), P.current = g);
|
|
80
|
+
},
|
|
81
|
+
drop: (r) => {
|
|
82
|
+
if (!(r.id === n || !u))
|
|
83
|
+
if (I) {
|
|
84
|
+
const e = P.current;
|
|
85
|
+
if (!e)
|
|
86
|
+
return;
|
|
87
|
+
const E = a ? e === R.LEFT : e === R.TOP, c = U({
|
|
88
|
+
fromIndex: r.index,
|
|
89
|
+
targetIndex: t,
|
|
90
|
+
isTopZone: E
|
|
91
|
+
});
|
|
92
|
+
u(r.index, c);
|
|
93
|
+
} else
|
|
94
|
+
u(r.index, t);
|
|
95
|
+
}
|
|
96
|
+
}),
|
|
97
|
+
[n, t, o, u, B, I, a]
|
|
98
|
+
), F = W(
|
|
99
|
+
(r) => (D.current = r, p(r)),
|
|
100
|
+
[p]
|
|
101
|
+
);
|
|
102
|
+
V(() => {
|
|
103
|
+
N || f(null);
|
|
104
|
+
}, [N]);
|
|
105
|
+
const s = I ? S : (() => v === null ? null : a ? v > t ? R.LEFT : R.RIGHT : v > t ? R.TOP : R.BOTTOM)();
|
|
106
|
+
return {
|
|
107
|
+
isDragging: A,
|
|
108
|
+
isOver: N,
|
|
109
|
+
draggedItemIndex: v,
|
|
110
|
+
dropPosition: s,
|
|
111
|
+
dragRef: w,
|
|
112
|
+
dropRef: F,
|
|
113
|
+
previewRef: C
|
|
114
|
+
};
|
|
115
|
+
}, K = (n, t, o = !1, i = !1) => {
|
|
116
|
+
if (!n || !t)
|
|
117
|
+
return null;
|
|
118
|
+
if (i)
|
|
119
|
+
return L.INSIDE;
|
|
120
|
+
const { top: B, height: u } = t, l = n.y - B, O = 6;
|
|
121
|
+
return l >= 0 && l < O ? L.BEFORE : o && l >= u - O && l <= u ? L.AFTER : L.INSIDE;
|
|
122
|
+
}, H = (n, t) => !!(n && (n.isExternal || n.type === t)), rn = ({
|
|
123
|
+
id: n,
|
|
124
|
+
index: t,
|
|
125
|
+
parentId: o = null,
|
|
126
|
+
type: i = b,
|
|
127
|
+
isDisabled: B = !1,
|
|
128
|
+
acceptDrop: u = !0,
|
|
129
|
+
isLast: m = !1,
|
|
130
|
+
canDropOn: l,
|
|
131
|
+
onDrop: O,
|
|
132
|
+
hideDefaultPreview: I = !1,
|
|
133
|
+
acceptExternalDrop: a = !1,
|
|
134
|
+
externalDropType: D = $
|
|
135
|
+
}) => {
|
|
136
|
+
const P = Z(null), S = Z(null), [f, A] = X(null), w = a ? [i, D] : i, [{ isDragging: C }, N, v] = M(
|
|
137
|
+
() => ({
|
|
138
|
+
type: i,
|
|
139
|
+
item: { id: n, index: t, type: i, parentId: o },
|
|
140
|
+
collect: (s) => ({
|
|
141
|
+
isDragging: s.isDragging()
|
|
142
|
+
}),
|
|
143
|
+
canDrag: () => !B
|
|
144
|
+
}),
|
|
145
|
+
[n, t, i, o, B]
|
|
146
|
+
);
|
|
147
|
+
V(() => {
|
|
148
|
+
I && v(G(), { captureDraggingState: !0 });
|
|
149
|
+
}, [I, v]);
|
|
150
|
+
const [{ isOver: p }, F] = k(
|
|
151
|
+
() => ({
|
|
152
|
+
accept: w,
|
|
153
|
+
hover: (s, r) => {
|
|
154
|
+
const e = H(s, D), E = u || a && e;
|
|
155
|
+
if (!P.current || s.id === n || !E)
|
|
156
|
+
return;
|
|
157
|
+
if (!l || l(s, n)) {
|
|
158
|
+
const T = r.getClientOffset(), g = P.current.getBoundingClientRect();
|
|
159
|
+
if (T && g) {
|
|
160
|
+
const _ = K(T, g, m, e && a);
|
|
161
|
+
_ !== f && (A(_), S.current = _);
|
|
162
|
+
}
|
|
163
|
+
} else
|
|
164
|
+
f !== null && (A(null), S.current = null);
|
|
165
|
+
},
|
|
166
|
+
collect: (s) => {
|
|
167
|
+
const r = s.getItem(), e = H(r, D), E = (r == null ? void 0 : r.id) !== n && (u || a && e), c = !l || !r || l(r, n), T = s.isOver({ shallow: !0 }), g = E && c;
|
|
168
|
+
return !T && f !== null && (A(null), S.current = null), {
|
|
169
|
+
isOver: T && g
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
drop: (s, r) => {
|
|
173
|
+
if (r.didDrop())
|
|
174
|
+
return;
|
|
175
|
+
const e = !l || l(s, n);
|
|
176
|
+
s.id !== n && (u || a && H(s, D)) && e && O && S.current && O(s, n, S.current);
|
|
177
|
+
}
|
|
178
|
+
}),
|
|
179
|
+
[
|
|
180
|
+
n,
|
|
181
|
+
i,
|
|
182
|
+
u,
|
|
183
|
+
a,
|
|
184
|
+
D,
|
|
185
|
+
m,
|
|
186
|
+
l,
|
|
187
|
+
O,
|
|
188
|
+
f
|
|
189
|
+
]
|
|
190
|
+
);
|
|
191
|
+
return {
|
|
192
|
+
isDragging: C,
|
|
193
|
+
isOver: p,
|
|
194
|
+
dropPosition: f,
|
|
195
|
+
dragRef: N,
|
|
196
|
+
dropRef: (s) => {
|
|
197
|
+
P.current = s, F(s);
|
|
198
|
+
},
|
|
199
|
+
previewRef: v,
|
|
200
|
+
elementRef: P
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
export {
|
|
204
|
+
b as D,
|
|
205
|
+
rn as a,
|
|
206
|
+
nn as g,
|
|
207
|
+
tn as u
|
|
208
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useState as t, useEffect as o } from "react";
|
|
2
|
+
const s = () => {
|
|
3
|
+
const [i, n] = t({ width: 0, height: 0 });
|
|
4
|
+
return o(() => {
|
|
5
|
+
const e = () => {
|
|
6
|
+
n({
|
|
7
|
+
width: window.innerWidth,
|
|
8
|
+
height: window.innerHeight
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
return window.addEventListener("resize", e), e(), () => window.removeEventListener("resize", e);
|
|
12
|
+
}, []), i;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
s as u
|
|
16
|
+
};
|
|
@@ -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: "M7.81842 2.10045C7.85598 2.0362 7.9176 2 8 2C8.0824 2 8.14402 2.0362 8.18158 2.10045L14.9733 13.7175C15.0369 13.8263 14.9702 14 14.7917 14H1.20832C1.02983 14 0.963108 13.8263 1.02673 13.7175L7.81842 2.10045ZM6.95513 1.59574L0.163443 13.2128C-0.300946 14.0071 0.279539 15 1.20832 15H14.7917C15.7205 15 16.3009 14.0071 15.8366 13.2128L9.04487 1.59575C8.58049 0.801419 7.41952 0.801418 6.95513 1.59574ZM8.73501 5.41171C8.74161 5.18631 8.56068 5 8.33518 5H7.6603C7.43466 5 7.25368 5.18653 7.26049 5.41207L7.40235 10.1121C7.40888 10.3282 7.58596 10.5 7.80217 10.5H8.19748C8.41384 10.5 8.59098 10.328 8.59731 10.1117L8.73501 5.41171ZM7.42383 11.7598C7.2806 11.8965 7.20898 12.069 7.20898 12.2773C7.20898 12.4792 7.2806 12.6501 7.42383 12.79C7.57031 12.93 7.76237 13 8 13C8.24089 13 8.43294 12.93 8.57617 12.79C8.7194 12.6501 8.79102 12.4792 8.79102 12.2773C8.79102 12.069 8.7194 11.8965 8.57617 11.7598C8.43294 11.6198 8.24089 11.5498 8 11.5498C7.76237 11.5498 7.57031 11.6198 7.42383 11.7598Z", fill: "#FFC208" }));
|
|
3
|
+
export {
|
|
4
|
+
t as S
|
|
5
|
+
};
|