@reportportal/ui-kit 0.0.1-alpha.17 → 0.0.1-alpha.170
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -2
- package/dist/actionMenu-77a63b96.js +155 -0
- package/dist/actionMenu.js +30 -0
- package/dist/adaptiveTagList.js +189 -0
- package/dist/attachedFile.js +9 -0
- package/dist/autocompletes.js +780 -0
- package/dist/baseIconButton-251479f7.js +25 -0
- package/dist/baseIconButton.js +1 -1
- package/dist/breadcrumbs-9b38b89c.js +184 -0
- package/dist/breadcrumbs.js +13 -0
- package/dist/bubblesLoader-f3ffa240.js +28 -0
- package/dist/bubblesLoader.js +1 -1
- package/dist/bulkPanel.js +222 -0
- package/dist/button-97d9e587.js +66 -0
- package/dist/button.js +1 -1
- package/dist/calendarArrow-44c7e60e.js +5 -0
- package/dist/checkbox-493fdc63.js +73 -0
- package/dist/checkbox.js +1 -1
- package/dist/chevronDownDropdown-0260bb66.js +5 -0
- package/dist/chip.js +72 -0
- package/dist/clear-53660571.js +5 -0
- package/dist/close-4d480ef7.js +5 -0
- package/dist/common/constants/floatingUi.d.ts +8 -0
- package/dist/common/constants/sortable.d.ts +1 -0
- package/dist/common/hooks/index.d.ts +3 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +5 -1
- package/dist/common/hooks/useSortable.d.ts +3 -0
- package/dist/common/hooks/useTreeDropValidation.d.ts +5 -0
- package/dist/common/hooks/useTreeSortable.d.ts +3 -0
- package/dist/common/hooks.js +67 -0
- package/dist/common/types/commonTypes.d.ts +4 -0
- package/dist/common/types/index.d.ts +2 -0
- package/dist/common/types/sortableTypes.d.ts +168 -0
- package/dist/common/utils/floatingUi.d.ts +3 -0
- package/dist/common/utils/getFileExtension.d.ts +1 -0
- package/dist/common/utils/htmlAttributes.d.ts +20 -0
- package/dist/common/utils/index.d.ts +4 -0
- package/dist/common/utils/isString.d.ts +1 -0
- package/dist/common/utils/testUtils.d.ts +3 -0
- package/dist/common.js +21 -0
- package/dist/components/actionMenu/actionMenu.d.ts +33 -0
- package/dist/components/actionMenu/constants.d.ts +3 -0
- package/dist/components/actionMenu/index.d.ts +18 -0
- package/dist/components/adaptiveTagList/adaptiveTagList.d.ts +11 -0
- package/dist/components/adaptiveTagList/constants.d.ts +6 -0
- package/dist/components/adaptiveTagList/index.d.ts +2 -0
- package/dist/components/attachedFile/attachedFile.d.ts +14 -0
- package/dist/components/attachedFile/index.d.ts +2 -0
- package/dist/components/autocompletes/common/autocompleteMenu/autocompleteMenu.d.ts +10 -0
- package/dist/components/autocompletes/common/autocompleteMenu/index.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOption/autocompleteOption.d.ts +13 -0
- package/dist/components/autocompletes/common/autocompleteOption/index.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOptions.d.ts +19 -0
- package/dist/components/autocompletes/common/autocompletePrompt/autocompletePrompt.d.ts +7 -0
- package/dist/components/autocompletes/common/autocompletePrompt/index.d.ts +1 -0
- package/dist/components/autocompletes/common/index.d.ts +19 -0
- package/dist/components/autocompletes/constants.d.ts +2 -0
- package/dist/components/autocompletes/index.d.ts +3 -0
- package/dist/components/autocompletes/multipleAutocomplete/index.d.ts +17 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleAutocomplete.d.ts +53 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleDownshift.d.ts +25 -0
- package/dist/components/autocompletes/multipleAutocomplete/selectedItems/index.d.ts +1 -0
- package/dist/components/autocompletes/multipleAutocomplete/selectedItems/selectedItems.d.ts +41 -0
- package/dist/components/autocompletes/singleAutocomplete/index.d.ts +1 -0
- package/dist/components/autocompletes/singleAutocomplete/singleAutocomplete.d.ts +42 -0
- package/dist/components/autocompletes/types.d.ts +8 -0
- package/dist/components/autocompletes/utils.d.ts +5 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +1 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +10 -0
- package/dist/components/breadcrumbs/breadcrumb/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/breadcrumbsProvider.d.ts +13 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/hooks.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/index.d.ts +1 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/hiddenBreadcrumbs.d.ts +6 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/index.d.ts +5 -0
- package/dist/components/breadcrumbs/tree/index.d.ts +1 -0
- package/dist/components/breadcrumbs/tree/tree.d.ts +7 -0
- package/dist/components/breadcrumbs/types.d.ts +24 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +2 -0
- package/dist/components/bubblesLoader/index.d.ts +1 -0
- package/dist/components/bulkPanel/bulkPanel.d.ts +3 -0
- package/dist/components/bulkPanel/index.d.ts +2 -0
- package/dist/components/bulkPanel/types.d.ts +46 -0
- package/dist/components/button/button.d.ts +5 -4
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -1
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/chip/chip.d.ts +15 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/datePicker/datePicker.d.ts +17 -7
- package/dist/components/datePicker/header/datePickerHeader.d.ts +1 -0
- package/dist/components/datePicker/header/index.d.ts +1 -0
- package/dist/components/datePicker/index.d.ts +3 -1
- package/dist/components/datePicker/utils.d.ts +2 -1
- package/dist/components/dropdown/constants.d.ts +4 -0
- package/dist/components/dropdown/dropdown.d.ts +36 -5
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
- package/dist/components/dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/types.d.ts +11 -0
- package/dist/components/dropdown/utils.d.ts +6 -2
- package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
- package/dist/components/fieldLabel/index.d.ts +1 -0
- package/dist/components/fieldNumber/constants.d.ts +1 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +3 -3
- package/dist/components/fieldNumber/index.d.ts +1 -0
- package/dist/components/fieldText/fieldText.d.ts +12 -4
- package/dist/components/fieldText/index.d.ts +3 -1
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +5 -2
- package/dist/components/fieldTextFlex/index.d.ts +1 -0
- package/dist/components/fileDropArea/attachedFilesList/attachedFilesList.d.ts +21 -0
- package/dist/components/fileDropArea/attachedFilesList/index.d.ts +5 -0
- package/dist/components/fileDropArea/browseButton/browseButton.d.ts +9 -0
- package/dist/components/fileDropArea/browseButton/index.d.ts +4 -0
- package/dist/components/fileDropArea/constants.d.ts +2 -0
- package/dist/components/fileDropArea/dropZone/dropZone.d.ts +10 -0
- package/dist/components/fileDropArea/dropZone/index.d.ts +4 -0
- package/dist/components/fileDropArea/errorMessage/errorMessage.d.ts +5 -0
- package/dist/components/fileDropArea/errorMessage/index.d.ts +4 -0
- package/dist/components/fileDropArea/fileDropArea.d.ts +19 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/fileDropAreaProvider.d.ts +17 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/index.d.ts +1 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/useFileDropAreaContext.d.ts +3 -0
- package/dist/components/fileDropArea/hooks/index.d.ts +1 -0
- package/dist/components/fileDropArea/hooks/useFileDropArea.d.ts +13 -0
- package/dist/components/fileDropArea/hooks/useFileProcessing.d.ts +13 -0
- package/dist/components/fileDropArea/hooks/useOverlayDropArea.d.ts +22 -0
- package/dist/components/fileDropArea/index.d.ts +6 -0
- package/dist/components/fileDropArea/types.d.ts +58 -0
- package/dist/components/fileDropArea/utils/getValidationErrorMessage.d.ts +3 -0
- package/dist/components/fileDropArea/utils/index.d.ts +2 -0
- package/dist/components/fileDropArea/utils/validateFile.d.ts +3 -0
- package/dist/components/filterItem/filterItem.d.ts +18 -0
- package/dist/components/filterItem/index.d.ts +17 -0
- package/dist/components/filtersButton/filtersButton.d.ts +9 -0
- package/dist/components/filtersButton/index.d.ts +2 -0
- package/dist/components/icons/index.d.ts +63 -9
- package/dist/components/index.d.ts +32 -10
- package/dist/components/issueList/constants.d.ts +5 -0
- package/dist/components/issueList/index.d.ts +2 -0
- package/dist/components/issueList/issueList.d.ts +18 -0
- package/dist/components/maxValueDisplay/index.d.ts +4 -0
- package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +8 -0
- package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
- package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/modal.d.ts +4 -4
- package/dist/components/modal/modalContent/modalContent.d.ts +3 -2
- package/dist/components/modal/modalFooter/modalFooter.d.ts +3 -1
- package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -0
- package/dist/components/modal/types.d.ts +6 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +5 -2
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +1 -0
- package/dist/components/pagination/pagination.d.ts +6 -2
- package/dist/components/popover/index.d.ts +4 -1
- package/dist/components/popover/popover.d.ts +3 -2
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/radio.d.ts +1 -0
- package/dist/components/radio/radioGroup.d.ts +1 -0
- package/dist/components/segmentedControl/index.d.ts +17 -0
- package/dist/components/segmentedControl/segmentedControl.d.ts +4 -0
- package/dist/components/segmentedControl/types.d.ts +18 -0
- package/dist/components/selection/index.d.ts +5 -0
- package/dist/components/selection/selection.d.ts +12 -0
- package/dist/components/selection/types.d.ts +1 -0
- package/dist/components/sidePanel/index.d.ts +2 -0
- package/dist/components/sidePanel/sidePanel.d.ts +17 -0
- package/dist/components/sortable/dragLayer/dragLayer.d.ts +3 -0
- package/dist/components/sortable/dragLayer/index.d.ts +1 -0
- package/dist/components/sortable/helpers.d.ts +11 -0
- package/dist/components/sortable/index.d.ts +5 -0
- package/dist/components/sortable/sortableItem/index.d.ts +1 -0
- package/dist/components/sortable/sortableItem/sortableItem.d.ts +3 -0
- package/dist/components/sortable/sortableList/index.d.ts +1 -0
- package/dist/components/sortable/sortableList/sortableList.d.ts +5 -0
- package/dist/components/sortable/treeSortableContainer/TreeSortableContext.d.ts +11 -0
- package/dist/components/sortable/treeSortableContainer/index.d.ts +2 -0
- package/dist/components/sortable/treeSortableContainer/treeSortableContainer.d.ts +3 -0
- package/dist/components/sortable/treeSortableItem/index.d.ts +1 -0
- package/dist/components/sortable/treeSortableItem/treeSortableItem.d.ts +3 -0
- package/dist/components/spinLoader/index.d.ts +4 -0
- package/dist/components/spinLoader/spinLoader.d.ts +8 -0
- package/dist/components/systemAlert/index.d.ts +1 -0
- package/dist/components/systemAlert/systemAlert.d.ts +4 -0
- package/dist/components/systemAlert/types.d.ts +22 -0
- package/dist/components/systemMessage/index.d.ts +1 -0
- package/dist/components/systemMessage/systemMessage.d.ts +1 -0
- package/dist/components/table/constants.d.ts +6 -0
- package/dist/components/table/gradientOverlay/gradientOverlay.d.ts +19 -0
- package/dist/components/table/gradientOverlay/index.d.ts +2 -0
- package/dist/components/table/hooks/index.d.ts +8 -0
- package/dist/components/table/hooks/useCheckboxRowSync.d.ts +10 -0
- package/dist/components/table/hooks/useColumnResize.d.ts +21 -0
- package/dist/components/table/hooks/useColumnWidths.d.ts +8 -0
- package/dist/components/table/hooks/useGradientPosition.d.ts +24 -0
- package/dist/components/table/hooks/useTableColumns.d.ts +13 -0
- package/dist/components/table/hooks/useTableExpansion.d.ts +15 -0
- package/dist/components/table/hooks/useTableHover.d.ts +10 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/resizeHandle/index.d.ts +1 -0
- package/dist/components/table/resizeHandle/resizeHandle.d.ts +2 -0
- package/dist/components/table/table.d.ts +1 -0
- package/dist/components/table/types.d.ts +43 -9
- package/dist/components/table/utils.d.ts +10 -1
- package/dist/components/themeProvider/index.d.ts +1 -0
- package/dist/components/themeProvider/themeProvider.d.ts +1 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/toggle.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +10 -1
- package/dist/datePicker-412fb8e8.js +213 -0
- package/dist/datePicker.js +32 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-7d024c49.js +642 -0
- package/dist/dropdown.js +13 -3
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-d1b5a7a1.js +140 -0
- package/dist/fieldNumber.js +5 -2
- package/dist/fieldText-1749da7a.js +167 -0
- package/dist/fieldText.js +7 -2
- package/dist/fieldTextFlex-2f51c173.js +80 -0
- package/dist/fieldTextFlex.js +3 -1
- package/dist/fileDropArea.js +325 -0
- package/dist/filterItem.js +96 -0
- package/dist/filterOutline-819b4b0d.js +6 -0
- package/dist/filtersButton.js +25 -0
- package/dist/floatingUi-41f8c7b5.js +29 -0
- package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
- package/dist/icons.js +89 -0
- package/dist/index-1a874a8b.js +110 -0
- package/dist/index.js +188 -242
- package/dist/isEmpty-ccacb5ff.js +38 -0
- package/dist/issueList.js +125 -0
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -0
- package/dist/meatballMenu-535635a9.js +5 -0
- package/dist/minus-2857540f.js +5 -0
- package/dist/modal.js +170 -14
- package/dist/openEye-950159cb.js +6 -0
- package/dist/pagination-4ded0ec6.js +355 -0
- package/dist/pagination.js +12 -5
- package/dist/plus-199fb2a8.js +5 -0
- package/dist/popover.js +58 -73
- package/dist/prevPage-87faf576.js +6 -0
- package/dist/radio-62546efa.js +76 -0
- package/dist/radio.js +1 -1
- package/dist/resizeColumn-46b5b30f.js +7 -0
- package/dist/segmentedControl.js +62 -0
- package/dist/selection-9124d029.js +38 -0
- package/dist/selection.js +10 -0
- package/dist/sidePanel.js +88 -0
- package/dist/sortable.js +302 -0
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +15 -1
- package/dist/success-8fd8bd2c.js +7 -0
- package/dist/systemAlert.js +69 -0
- package/dist/systemMessage-924fdaa6.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/table-03bd209d.js +1099 -0
- package/dist/table.js +10 -3
- package/dist/toggle-304107fa.js +59 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +90 -57
- package/dist/tree-e7a0ef42.js +5 -0
- package/dist/useOnClickOutside-8f7d68a1.js +25 -0
- package/dist/useTreeSortable-70a9c8f5.js +179 -0
- package/dist/useWindowResize-a7e1ac92.js +16 -0
- package/dist/warning-537ead32.js +5 -0
- package/dist/xls-995781cc.js +11 -0
- package/package.json +51 -17
- package/dist/baseIconButton-7bc53dec.js +0 -25
- package/dist/bubblesLoader-a7e709d4.js +0 -17
- package/dist/button-bb309472.js +0 -62
- package/dist/checkbox-6777be17.js +0 -73
- package/dist/dropdown-50124296.js +0 -215
- package/dist/fieldNumber-46fe79b9.js +0 -127
- package/dist/fieldText-49fe2895.js +0 -102
- package/dist/fieldTextFlex-5bddf46a.js +0 -67
- package/dist/index-2a2d261a.js +0 -145
- package/dist/pagination-39b1fa15.js +0 -346
- package/dist/radio-fd49a09c.js +0 -76
- package/dist/systemMessage-1ced6079.js +0 -30
- package/dist/table-83e050dc.js +0 -147
- package/dist/toggle-9284387b.js +0 -67
- package/dist/useOnClickOutside-c332f7d3.js +0 -16
package/dist/chip.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs as k, Fragment as w, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as N } from "./bind-06a7ff84.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { S as x } from "./close-4d480ef7.js";
|
|
5
|
+
const D = "_chip_a59ru_16", j = "_clickable_a59ru_34", K = "_disabled_a59ru_40", S = "_label_a59ru_51", v = "_error_a59ru_82", E = "_warning_a59ru_87", F = "_link_a59ru_91", I = {
|
|
6
|
+
chip: D,
|
|
7
|
+
clickable: j,
|
|
8
|
+
disabled: K,
|
|
9
|
+
label: S,
|
|
10
|
+
"remove-button": "_remove-button_a59ru_57",
|
|
11
|
+
error: v,
|
|
12
|
+
warning: E,
|
|
13
|
+
link: F
|
|
14
|
+
}, c = N.bind(I), A = ({
|
|
15
|
+
children: u,
|
|
16
|
+
variant: b = "default",
|
|
17
|
+
link: s,
|
|
18
|
+
onClick: t,
|
|
19
|
+
onRemove: e,
|
|
20
|
+
className: p,
|
|
21
|
+
maxWidth: l,
|
|
22
|
+
title: f,
|
|
23
|
+
disabled: a = !1
|
|
24
|
+
}) => {
|
|
25
|
+
const o = !!t && !a, h = o ? "button" : void 0, m = o ? 0 : void 0, i = c("chip", b, p, {
|
|
26
|
+
disabled: a,
|
|
27
|
+
clickable: !!t || !!s,
|
|
28
|
+
removable: !!e
|
|
29
|
+
}), d = (r) => {
|
|
30
|
+
r.stopPropagation(), r.preventDefault(), e == null || e(r);
|
|
31
|
+
}, g = (r) => {
|
|
32
|
+
a || t == null || t(r);
|
|
33
|
+
}, y = (r) => {
|
|
34
|
+
a || (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.currentTarget.click());
|
|
35
|
+
}, _ = /* @__PURE__ */ k(w, { children: [
|
|
36
|
+
/* @__PURE__ */ n("span", { className: c("label"), style: l ? { maxWidth: l } : void 0, title: f, children: u }),
|
|
37
|
+
e && !a && /* @__PURE__ */ n(
|
|
38
|
+
"button",
|
|
39
|
+
{
|
|
40
|
+
type: "button",
|
|
41
|
+
className: c("remove-button"),
|
|
42
|
+
onClick: d,
|
|
43
|
+
"aria-label": "Remove",
|
|
44
|
+
children: /* @__PURE__ */ n(x, {})
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] });
|
|
48
|
+
return s && !a ? /* @__PURE__ */ n(
|
|
49
|
+
"a",
|
|
50
|
+
{
|
|
51
|
+
href: s,
|
|
52
|
+
className: i,
|
|
53
|
+
onClick: t,
|
|
54
|
+
target: "_blank",
|
|
55
|
+
rel: "noopener noreferrer",
|
|
56
|
+
children: _
|
|
57
|
+
}
|
|
58
|
+
) : /* @__PURE__ */ n(
|
|
59
|
+
"span",
|
|
60
|
+
{
|
|
61
|
+
className: i,
|
|
62
|
+
onClick: g,
|
|
63
|
+
onKeyDown: y,
|
|
64
|
+
role: h,
|
|
65
|
+
tabIndex: m,
|
|
66
|
+
children: _
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
A as Chip
|
|
72
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 8C1 4.14001 4.14001 1 8 1C11.86 1 15 4.14001 15 8C15 11.8595 11.86 15 8 15C4.14001 15 1 11.8595 1 8ZM5 5.54545L5.54545 5L8 7.45455L10.4545 5L11 5.54545L8.54545 8L11 10.4545L10.4545 11L8 8.54545L5.54545 11L5 10.4545L7.45455 8L5 5.54545Z", fill: "#A2AAB5" }));
|
|
3
|
+
export {
|
|
4
|
+
t as S
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.732184 15.2698C0.330645 14.8683 0.330646 14.2172 0.732185 13.8157L6.54859 7.99928L0.732185 2.18288C0.330646 1.78134 0.330645 1.13031 0.732184 0.728774C1.13372 0.327235 1.78475 0.327235 2.18629 0.728774L8.00269 6.54518L13.8191 0.728767C14.2206 0.327229 14.8717 0.327228 15.2732 0.728767C15.6747 1.13031 15.6747 1.78133 15.2732 2.18287L9.45679 7.99928L15.2732 13.8157C15.6747 14.2172 15.6747 14.8683 15.2732 15.2698C14.8717 15.6713 14.2206 15.6713 13.8191 15.2698L8.00269 9.45338L2.18629 15.2698C1.78475 15.6713 1.13372 15.6713 0.732184 15.2698Z", fill: "#A2AAB5" }));
|
|
3
|
+
export {
|
|
4
|
+
t as S
|
|
5
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Placement } from '@floating-ui/react';
|
|
2
|
+
|
|
3
|
+
export declare const TRIANGLE_WIDTH = 16;
|
|
4
|
+
export declare const TRIANGLE_HEIGHT = 8;
|
|
5
|
+
export declare const ARROW_OFFSET = 16;
|
|
6
|
+
export declare const middlePlacements: Placement[];
|
|
7
|
+
export declare const verticalPlacements: Placement[];
|
|
8
|
+
export declare const allPlacements: Placement[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_SORTABLE_TYPE = "SORTABLE_ITEM";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { useOnClickOutside } from './useOnClickOutside';
|
|
2
|
+
export { useSortable } from './useSortable';
|
|
3
|
+
export { useTreeSortable } from './useTreeSortable';
|
|
4
|
+
export { useTreeDropValidation } from './useTreeDropValidation';
|
|
2
5
|
export { useWindowResize } from './useWindowResize';
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
export interface UseOnClickOutsideOptions {
|
|
4
|
+
ignoreSelectors?: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare function useOnClickOutside<T extends HTMLElement = HTMLDivElement>(ref: RefObject<T>, handler?: (e?: MouseEvent) => void, options?: UseOnClickOutsideOptions): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TreeDragItem, TreeItem, UseTreeDropValidationOptions } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const useTreeDropValidation: <T extends TreeItem<T>>({ items, childrenKey, }: UseTreeDropValidationOptions<T>) => {
|
|
4
|
+
canDropOn: (draggedItem: TreeDragItem, targetId: string | number) => boolean;
|
|
5
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { u as w } from "../useOnClickOutside-8f7d68a1.js";
|
|
2
|
+
import { u as E, a as R } from "../useTreeSortable-70a9c8f5.js";
|
|
3
|
+
import { useCallback as x } from "react";
|
|
4
|
+
import { i as z } from "../isEmpty-ccacb5ff.js";
|
|
5
|
+
import { u as W } from "../useWindowResize-a7e1ac92.js";
|
|
6
|
+
import "react-dnd";
|
|
7
|
+
import "react-dnd-html5-backend";
|
|
8
|
+
import "../common.js";
|
|
9
|
+
/*!
|
|
10
|
+
* Copyright 2026 EPAM Systems
|
|
11
|
+
*
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
* See the License for the specific language governing permissions and
|
|
22
|
+
* limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
const o = (r) => String(r), I = (r, e, f, n = "children") => {
|
|
25
|
+
const s = o(r), u = o(e), i = (c, a) => {
|
|
26
|
+
for (const t of a) {
|
|
27
|
+
if (o(t.id) === c)
|
|
28
|
+
return t;
|
|
29
|
+
const m = t[n] || [];
|
|
30
|
+
if (!z(m)) {
|
|
31
|
+
const p = i(c, m);
|
|
32
|
+
if (p)
|
|
33
|
+
return p;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
}, d = i(s, f);
|
|
38
|
+
if (!d)
|
|
39
|
+
return !1;
|
|
40
|
+
const l = (c) => {
|
|
41
|
+
for (const a of c) {
|
|
42
|
+
if (o(a.id) === u)
|
|
43
|
+
return !0;
|
|
44
|
+
const t = a[n] || [];
|
|
45
|
+
if (!z(t) && l(t))
|
|
46
|
+
return !0;
|
|
47
|
+
}
|
|
48
|
+
return !1;
|
|
49
|
+
}, D = d[n] || [];
|
|
50
|
+
return l(D);
|
|
51
|
+
}, S = ({
|
|
52
|
+
items: r,
|
|
53
|
+
childrenKey: e = "children"
|
|
54
|
+
}) => ({ canDropOn: x(
|
|
55
|
+
(n, s) => {
|
|
56
|
+
const u = o(n.id), i = o(s);
|
|
57
|
+
return u === i ? !1 : !I(n.id, s, r, e);
|
|
58
|
+
},
|
|
59
|
+
[r, e]
|
|
60
|
+
) });
|
|
61
|
+
export {
|
|
62
|
+
w as useOnClickOutside,
|
|
63
|
+
E as useSortable,
|
|
64
|
+
S as useTreeDropValidation,
|
|
65
|
+
R as useTreeSortable,
|
|
66
|
+
W as useWindowResize
|
|
67
|
+
};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { ReactNode, Ref } from 'react';
|
|
2
|
+
import { XYCoord, ConnectDragSource, ConnectDropTarget, ConnectDragPreview } from 'react-dnd';
|
|
3
|
+
|
|
4
|
+
export interface SortableItemData {
|
|
5
|
+
id: string | number;
|
|
6
|
+
index: number;
|
|
7
|
+
}
|
|
8
|
+
export interface DragItem extends SortableItemData {
|
|
9
|
+
type: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const DROP_POSITIONS: {
|
|
12
|
+
readonly TOP: "top";
|
|
13
|
+
readonly BOTTOM: "bottom";
|
|
14
|
+
};
|
|
15
|
+
export type DropPositionValue = (typeof DROP_POSITIONS)[keyof typeof DROP_POSITIONS];
|
|
16
|
+
export declare const DROP_DETECTION_MODE: {
|
|
17
|
+
readonly INDEX_BASED: "indexBased";
|
|
18
|
+
readonly HOVER: "hover";
|
|
19
|
+
};
|
|
20
|
+
export type DropDetectionMode = (typeof DROP_DETECTION_MODE)[keyof typeof DROP_DETECTION_MODE];
|
|
21
|
+
export interface UseSortableOptions {
|
|
22
|
+
id: string | number;
|
|
23
|
+
index: number;
|
|
24
|
+
type?: string;
|
|
25
|
+
isDisabled?: boolean;
|
|
26
|
+
isLast?: boolean;
|
|
27
|
+
onDrop?: (fromIndex: number, toIndex: number) => void;
|
|
28
|
+
hideDefaultPreview?: boolean;
|
|
29
|
+
dropDetectionMode?: DropDetectionMode;
|
|
30
|
+
}
|
|
31
|
+
export interface UseSortableReturn {
|
|
32
|
+
isDragging: boolean;
|
|
33
|
+
isOver: boolean;
|
|
34
|
+
draggedItemIndex: number | null;
|
|
35
|
+
dropPosition: DropPosition;
|
|
36
|
+
dragRef: ConnectDragSource;
|
|
37
|
+
dropRef: ConnectDropTarget;
|
|
38
|
+
previewRef: ConnectDragPreview;
|
|
39
|
+
}
|
|
40
|
+
export interface SortableItemRenderProps {
|
|
41
|
+
isDragging: boolean;
|
|
42
|
+
isOver: boolean;
|
|
43
|
+
dragRef: Ref<HTMLElement>;
|
|
44
|
+
}
|
|
45
|
+
export interface SortableItemProps {
|
|
46
|
+
id: string | number;
|
|
47
|
+
index: number;
|
|
48
|
+
type?: string;
|
|
49
|
+
isDisabled?: boolean;
|
|
50
|
+
isLast?: boolean;
|
|
51
|
+
className?: string;
|
|
52
|
+
draggingClassName?: string;
|
|
53
|
+
dropTargetClassName?: string;
|
|
54
|
+
onDrop?: (fromIndex: number, toIndex: number) => void;
|
|
55
|
+
hideDefaultPreview?: boolean;
|
|
56
|
+
dropDetectionMode?: DropDetectionMode;
|
|
57
|
+
children: ReactNode | ((props: SortableItemRenderProps) => ReactNode);
|
|
58
|
+
}
|
|
59
|
+
export interface SortableListProps<T extends {
|
|
60
|
+
id: string | number;
|
|
61
|
+
}> {
|
|
62
|
+
items: T[];
|
|
63
|
+
type?: string;
|
|
64
|
+
isDisabled?: boolean;
|
|
65
|
+
className?: string;
|
|
66
|
+
itemClassName?: string;
|
|
67
|
+
onReorder: (reorderedItems: T[]) => void;
|
|
68
|
+
renderItem: (item: T, index: number, dragRef: Ref<HTMLElement>, isDragging: boolean) => ReactNode;
|
|
69
|
+
keyExtractor?: (item: T) => string | number;
|
|
70
|
+
}
|
|
71
|
+
export interface DragLayerProps {
|
|
72
|
+
type: string;
|
|
73
|
+
renderPreview: (item: DragItem) => ReactNode;
|
|
74
|
+
className?: string;
|
|
75
|
+
previewClassName?: string;
|
|
76
|
+
portalTarget?: Element | null;
|
|
77
|
+
}
|
|
78
|
+
export interface DragLayerCollectedProps {
|
|
79
|
+
item: DragItem | null;
|
|
80
|
+
itemType: string | symbol | null;
|
|
81
|
+
clientOffset: XYCoord | null;
|
|
82
|
+
isDragging: boolean;
|
|
83
|
+
}
|
|
84
|
+
export type DropPosition = 'top' | 'bottom' | null;
|
|
85
|
+
export declare const TREE_DROP_POSITIONS: {
|
|
86
|
+
readonly BEFORE: "before";
|
|
87
|
+
readonly INSIDE: "inside";
|
|
88
|
+
readonly AFTER: "after";
|
|
89
|
+
};
|
|
90
|
+
export type TreeDropPositionValue = (typeof TREE_DROP_POSITIONS)[keyof typeof TREE_DROP_POSITIONS];
|
|
91
|
+
export type TreeDropPosition = TreeDropPositionValue | null;
|
|
92
|
+
export interface TreeDragItem extends DragItem {
|
|
93
|
+
parentId?: string | number | null;
|
|
94
|
+
depth?: number;
|
|
95
|
+
}
|
|
96
|
+
export type TreeDropHandler = (draggedItem: TreeDragItem, targetId: string | number, position: TreeDropPosition) => void;
|
|
97
|
+
export interface UseTreeSortableOptions {
|
|
98
|
+
id: string | number;
|
|
99
|
+
index: number;
|
|
100
|
+
parentId?: string | number | null;
|
|
101
|
+
type?: string;
|
|
102
|
+
isDisabled?: boolean;
|
|
103
|
+
acceptDrop?: boolean;
|
|
104
|
+
canDropOn?: (draggedItem: TreeDragItem, targetId: string | number) => boolean;
|
|
105
|
+
onDrop?: TreeDropHandler;
|
|
106
|
+
hideDefaultPreview?: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface TreeSortableState {
|
|
109
|
+
isDragging: boolean;
|
|
110
|
+
isOver: boolean;
|
|
111
|
+
dropPosition: TreeDropPosition;
|
|
112
|
+
dragRef: ConnectDragSource;
|
|
113
|
+
}
|
|
114
|
+
export interface UseTreeSortableReturn extends TreeSortableState {
|
|
115
|
+
dropRef: (node: HTMLElement | null) => void;
|
|
116
|
+
previewRef: ConnectDragPreview;
|
|
117
|
+
elementRef: React.RefObject<HTMLElement | null>;
|
|
118
|
+
}
|
|
119
|
+
export type TreeSortableItemRenderProps = TreeSortableState;
|
|
120
|
+
export interface TreeSortableItemProps {
|
|
121
|
+
id: string | number;
|
|
122
|
+
index: number;
|
|
123
|
+
parentId?: string | number | null;
|
|
124
|
+
type?: string;
|
|
125
|
+
isDisabled?: boolean;
|
|
126
|
+
acceptDrop?: boolean;
|
|
127
|
+
isLast?: boolean;
|
|
128
|
+
canDropOn?: (draggedItem: TreeDragItem, targetId: string | number) => boolean;
|
|
129
|
+
depth?: number;
|
|
130
|
+
className?: string;
|
|
131
|
+
draggingClassName?: string;
|
|
132
|
+
dropBeforeClassName?: string;
|
|
133
|
+
dropInsideClassName?: string;
|
|
134
|
+
dropAfterClassName?: string;
|
|
135
|
+
onDrop?: TreeDropHandler;
|
|
136
|
+
hideDefaultPreview?: boolean;
|
|
137
|
+
children: ReactNode | ((props: TreeSortableItemRenderProps) => ReactNode);
|
|
138
|
+
}
|
|
139
|
+
export interface TreeItem<T = unknown> {
|
|
140
|
+
id: string | number;
|
|
141
|
+
children?: T[];
|
|
142
|
+
folders?: T[];
|
|
143
|
+
}
|
|
144
|
+
export interface UseTreeDropValidationOptions<T extends TreeItem<T>> {
|
|
145
|
+
items: T[];
|
|
146
|
+
childrenKey?: 'children' | 'folders';
|
|
147
|
+
}
|
|
148
|
+
export declare const DROP_ACTIONS: {
|
|
149
|
+
readonly MOVE: "move";
|
|
150
|
+
readonly DUPLICATE: "duplicate";
|
|
151
|
+
readonly CANCEL: "cancel";
|
|
152
|
+
};
|
|
153
|
+
export type DropAction = (typeof DROP_ACTIONS)[keyof typeof DROP_ACTIONS];
|
|
154
|
+
export interface PendingDropInfo {
|
|
155
|
+
draggedItem: TreeDragItem;
|
|
156
|
+
targetId: string | number;
|
|
157
|
+
position: TreeDropPosition;
|
|
158
|
+
}
|
|
159
|
+
export type DropConfirmationLabels = Partial<Record<DropAction, string>>;
|
|
160
|
+
export interface TreeSortableContainerProps {
|
|
161
|
+
children: ReactNode;
|
|
162
|
+
showDropConfirmation?: boolean;
|
|
163
|
+
confirmationLabels?: DropConfirmationLabels;
|
|
164
|
+
portalTarget?: Element | null;
|
|
165
|
+
onMove?: TreeDropHandler;
|
|
166
|
+
onDuplicate?: TreeDropHandler;
|
|
167
|
+
onCancel?: () => void;
|
|
168
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getFileExtension: (fileName: string) => string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Splits object properties into HTML attributes and remaining props.
|
|
3
|
+
* Transforms camelCase data-* and aria-* attributes to kebab-case format
|
|
4
|
+
* as required by HTML specification.
|
|
5
|
+
*
|
|
6
|
+
* @param attrs - Object containing properties to split
|
|
7
|
+
* @returns Object with two properties:
|
|
8
|
+
* - transformed: data-* and aria-* attributes converted to kebab-case
|
|
9
|
+
* - remaining: all other properties unchanged
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const props = { dataTestId: 'test', ariaLabel: 'Label', className: 'container' };
|
|
13
|
+
* const { transformed, remaining } = splitHtmlAttributes(props);
|
|
14
|
+
* // transformed: { 'data-test-id': 'test', 'aria-label': 'Label' }
|
|
15
|
+
* // remaining: { className: 'container' }
|
|
16
|
+
*/
|
|
17
|
+
export declare const splitHtmlAttributes: (attrs: Record<string, unknown>) => {
|
|
18
|
+
transformed: Record<string, unknown>;
|
|
19
|
+
remaining: Record<string, unknown>;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isString: (value: unknown) => value is string;
|
package/dist/common.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const O = {
|
|
2
|
+
TOP: "top",
|
|
3
|
+
BOTTOM: "bottom"
|
|
4
|
+
}, E = {
|
|
5
|
+
INDEX_BASED: "indexBased",
|
|
6
|
+
HOVER: "hover"
|
|
7
|
+
}, e = {
|
|
8
|
+
BEFORE: "before",
|
|
9
|
+
INSIDE: "inside",
|
|
10
|
+
AFTER: "after"
|
|
11
|
+
}, o = {
|
|
12
|
+
MOVE: "move",
|
|
13
|
+
DUPLICATE: "duplicate",
|
|
14
|
+
CANCEL: "cancel"
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
o as DROP_ACTIONS,
|
|
18
|
+
E as DROP_DETECTION_MODE,
|
|
19
|
+
O as DROP_POSITIONS,
|
|
20
|
+
e as TREE_DROP_POSITIONS
|
|
21
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactNode, MouseEvent, ReactElement } from 'react';
|
|
2
|
+
import { PopoverProps } from '../popover/popover';
|
|
3
|
+
|
|
4
|
+
export interface ActionItem {
|
|
5
|
+
id?: string;
|
|
6
|
+
label: string;
|
|
7
|
+
onClick?: (event?: MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
+
hasPermission?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DividerItem {
|
|
13
|
+
type: 'divider';
|
|
14
|
+
}
|
|
15
|
+
export type MenuItem = ActionItem | DividerItem | ReactNode;
|
|
16
|
+
export declare const ActionMenuItem: ({ className, children, ...props }: {
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
className?: string | undefined;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export interface ActionMenuProps extends Pick<PopoverProps, 'placement'> {
|
|
22
|
+
items?: MenuItem[];
|
|
23
|
+
cleanupDividers?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
contentClassName?: string;
|
|
26
|
+
buttonClassName?: string;
|
|
27
|
+
popoverClassName?: string;
|
|
28
|
+
menuClassName?: string;
|
|
29
|
+
ariaLabel?: string;
|
|
30
|
+
trigger?: ReactNode;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare const ActionMenu: ({ placement, items, cleanupDividers, className, contentClassName, buttonClassName, popoverClassName, menuClassName, ariaLabel, trigger, disabled, }: ActionMenuProps) => ReactElement | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export { ActionMenu, ActionMenuItem } from './actionMenu';
|
|
17
|
+
export { ACTION_MENU_DIVIDER } from './constants';
|
|
18
|
+
export type { ActionMenuProps, ActionItem, DividerItem, MenuItem } from './actionMenu';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface AdaptiveTagListProps {
|
|
2
|
+
tags: string[];
|
|
3
|
+
isShowAllView?: boolean;
|
|
4
|
+
defaultVisibleLines?: number;
|
|
5
|
+
onRemoveTag?: (tag: string) => void;
|
|
6
|
+
noTagsMessage?: string;
|
|
7
|
+
showAllText?: string;
|
|
8
|
+
hideAllText?: string;
|
|
9
|
+
showLessText?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const AdaptiveTagList: ({ tags, isShowAllView, defaultVisibleLines, onRemoveTag, noTagsMessage, showAllText, hideAllText, showLessText, }: AdaptiveTagListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const DEFAULT_VISIBLE_LINES = 3;
|
|
2
|
+
export declare const TAG_LINE_HEIGHT = 22;
|
|
3
|
+
export declare const TAG_GAP_HEIGHT = 8;
|
|
4
|
+
export declare const IMMEDIATE_DELAY = 0;
|
|
5
|
+
export declare const FONT_LOADING_DELAY = 100;
|
|
6
|
+
export declare const OFFSET_TOLERANCE = 20;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VoidFn } from '../../common/types';
|
|
2
|
+
|
|
3
|
+
export interface AttachedFileProps {
|
|
4
|
+
fileName: string;
|
|
5
|
+
size: number;
|
|
6
|
+
isFullWidth?: boolean;
|
|
7
|
+
uploadingProgress?: number;
|
|
8
|
+
isUploading?: boolean;
|
|
9
|
+
isUploadFailed?: boolean;
|
|
10
|
+
uploadFailedMessage?: string;
|
|
11
|
+
onRemove?: VoidFn;
|
|
12
|
+
onDownload?: VoidFn;
|
|
13
|
+
}
|
|
14
|
+
export declare const AttachedFile: ({ fileName, size, uploadingProgress, isUploadFailed, uploadFailedMessage, isUploading, isFullWidth, onDownload, onRemove, }: AttachedFileProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AutocompleteOptionsProps } from '../autocompleteOptions';
|
|
2
|
+
|
|
3
|
+
export declare const AutocompleteMenu: <T>(props: {
|
|
4
|
+
isOpen?: boolean | undefined;
|
|
5
|
+
style?: import('react').CSSProperties | undefined;
|
|
6
|
+
isDropdownMode?: boolean | undefined;
|
|
7
|
+
minLength?: number | null | undefined;
|
|
8
|
+
inputValue?: string | undefined;
|
|
9
|
+
className?: string | undefined;
|
|
10
|
+
} & AutocompleteOptionsProps<T> & import('react').RefAttributes<HTMLUListElement>) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AutocompleteMenu } from './autocompleteMenu';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type AutocompleteOptionProps = {
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
isSelected?: boolean;
|
|
6
|
+
isNew?: boolean;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
optionVariant?: 'key-variant' | 'value-variant' | '';
|
|
10
|
+
newItemButtonText?: string;
|
|
11
|
+
} & HTMLAttributes<HTMLLIElement | HTMLButtonElement>;
|
|
12
|
+
export declare const AutocompleteOption: ({ isActive, isSelected, isNew, children, disabled, optionVariant, newItemButtonText, ...props }: AutocompleteOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AutocompleteOption } from './autocompleteOption';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { GetItemPropsT } from '../types';
|
|
3
|
+
|
|
4
|
+
export interface AutocompleteOptionsProps<T> {
|
|
5
|
+
options: T[];
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
inputValue: string;
|
|
8
|
+
parseValueToString: (value: T | null) => string;
|
|
9
|
+
getItemProps: GetItemPropsT<T>;
|
|
10
|
+
renderOption?: (item: T, index: number, isNew: boolean, getItemProps: GetItemPropsT<T>) => ReactNode;
|
|
11
|
+
async?: boolean;
|
|
12
|
+
optionVariant: 'key-variant' | 'value-variant' | '';
|
|
13
|
+
createWithoutConfirmation: boolean;
|
|
14
|
+
customEmptyListMessage?: string;
|
|
15
|
+
customNoMatchesMessage?: string;
|
|
16
|
+
getUniqKey?: (item: T) => string;
|
|
17
|
+
newItemButtonText: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const AutocompleteOptions: <T>(props: AutocompleteOptionsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AutocompletePrompt } from './autocompletePrompt';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2025 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export { AutocompleteMenu } from './autocompleteMenu';
|
|
17
|
+
export { AutocompletePrompt } from './autocompletePrompt';
|
|
18
|
+
export { AutocompleteOption } from './autocompleteOption';
|
|
19
|
+
export { AutocompleteOptions } from './autocompleteOptions';
|