@reportportal/ui-kit 0.0.1-alpha.16 → 0.0.1-alpha.161
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/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-8e5ca8d7.js +183 -0
- package/dist/breadcrumbs.js +12 -0
- package/dist/bubblesLoader-f3ffa240.js +28 -0
- package/dist/bubblesLoader.js +1 -1
- package/dist/bulkPanel.js +92 -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 +1 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +5 -1
- package/dist/common/hooks/useSortable.d.ts +3 -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 +84 -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 +11 -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 +16 -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 +2 -1
- 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 +1 -0
- package/dist/components/dropdown/constants.d.ts +4 -0
- package/dist/components/dropdown/dropdown.d.ts +37 -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 +1 -0
- 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/filtersButton/filtersButton.d.ts +9 -0
- package/dist/components/filtersButton/index.d.ts +2 -0
- package/dist/components/icons/index.d.ts +64 -9
- package/dist/components/index.d.ts +27 -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/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 +3 -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/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 +18 -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 +39 -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 +12 -2
- package/dist/datePicker-60b22314.js +194 -0
- package/dist/datePicker.js +32 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-40fcc3ad.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/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 +87 -0
- package/dist/index-1a874a8b.js +110 -0
- package/dist/index.js +170 -241
- 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 +180 -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/selection-9124d029.js +38 -0
- package/dist/selection.js +10 -0
- package/dist/sidePanel.js +88 -0
- package/dist/sortable.js +213 -0
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +1 -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-0adbac16.js +1059 -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 -56
- package/dist/tree-c3dd3d45.js +6 -0
- package/dist/useOnClickOutside-8f7d68a1.js +25 -0
- package/dist/xls-995781cc.js +11 -0
- package/package.json +49 -16
- 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-bbfa828e.js +0 -213
- package/dist/fieldNumber-46fe79b9.js +0 -127
- package/dist/fieldText-d80b29ba.js +0 -102
- package/dist/fieldTextFlex-5bddf46a.js +0 -67
- package/dist/index-2a2d261a.js +0 -145
- package/dist/pagination-761d3427.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
|
@@ -0,0 +1,84 @@
|
|
|
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 type DropPosition = DropPositionValue | null;
|
|
17
|
+
export declare const DROP_DETECTION_MODE: {
|
|
18
|
+
readonly INDEX_BASED: "indexBased";
|
|
19
|
+
readonly HOVER: "hover";
|
|
20
|
+
};
|
|
21
|
+
export type DropDetectionMode = (typeof DROP_DETECTION_MODE)[keyof typeof DROP_DETECTION_MODE];
|
|
22
|
+
export interface UseSortableOptions {
|
|
23
|
+
id: string | number;
|
|
24
|
+
index: number;
|
|
25
|
+
type?: string;
|
|
26
|
+
isDisabled?: boolean;
|
|
27
|
+
isLast?: boolean;
|
|
28
|
+
onDrop?: (fromIndex: number, toIndex: number) => void;
|
|
29
|
+
hideDefaultPreview?: boolean;
|
|
30
|
+
dropDetectionMode?: DropDetectionMode;
|
|
31
|
+
}
|
|
32
|
+
export interface UseSortableReturn {
|
|
33
|
+
isDragging: boolean;
|
|
34
|
+
isOver: boolean;
|
|
35
|
+
draggedItemIndex: number | null;
|
|
36
|
+
dropPosition: DropPosition;
|
|
37
|
+
dragRef: ConnectDragSource;
|
|
38
|
+
dropRef: ConnectDropTarget;
|
|
39
|
+
previewRef: ConnectDragPreview;
|
|
40
|
+
}
|
|
41
|
+
export interface SortableItemRenderProps {
|
|
42
|
+
isDragging: boolean;
|
|
43
|
+
isOver: boolean;
|
|
44
|
+
dragRef: Ref<HTMLElement>;
|
|
45
|
+
}
|
|
46
|
+
export interface SortableItemProps {
|
|
47
|
+
id: string | number;
|
|
48
|
+
index: number;
|
|
49
|
+
type?: string;
|
|
50
|
+
isDisabled?: boolean;
|
|
51
|
+
isLast?: boolean;
|
|
52
|
+
className?: string;
|
|
53
|
+
draggingClassName?: string;
|
|
54
|
+
dropTargetClassName?: string;
|
|
55
|
+
onDrop?: (fromIndex: number, toIndex: number) => void;
|
|
56
|
+
hideDefaultPreview?: boolean;
|
|
57
|
+
dropDetectionMode?: DropDetectionMode;
|
|
58
|
+
children: ReactNode | ((props: SortableItemRenderProps) => ReactNode);
|
|
59
|
+
}
|
|
60
|
+
export interface SortableListProps<T extends {
|
|
61
|
+
id: string | number;
|
|
62
|
+
}> {
|
|
63
|
+
items: T[];
|
|
64
|
+
type?: string;
|
|
65
|
+
isDisabled?: boolean;
|
|
66
|
+
className?: string;
|
|
67
|
+
itemClassName?: string;
|
|
68
|
+
onReorder: (reorderedItems: T[]) => void;
|
|
69
|
+
renderItem: (item: T, index: number, dragRef: Ref<HTMLElement>, isDragging: boolean) => ReactNode;
|
|
70
|
+
keyExtractor?: (item: T) => string | number;
|
|
71
|
+
}
|
|
72
|
+
export interface DragLayerProps {
|
|
73
|
+
type: string;
|
|
74
|
+
renderPreview: (item: DragItem) => ReactNode;
|
|
75
|
+
className?: string;
|
|
76
|
+
previewClassName?: string;
|
|
77
|
+
portalTarget?: Element | null;
|
|
78
|
+
}
|
|
79
|
+
export interface DragLayerCollectedProps {
|
|
80
|
+
item: DragItem | null;
|
|
81
|
+
itemType: string | symbol | null;
|
|
82
|
+
clientOffset: XYCoord | null;
|
|
83
|
+
isDragging: boolean;
|
|
84
|
+
}
|
|
@@ -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,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';
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { SelectedItems } from './selectedItems';
|
|
17
|
+
export { MultipleAutocomplete } from './multipleAutocomplete';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { ControllerStateAndHelpers } from 'downshift';
|
|
3
|
+
import { default as FieldText } from '../../fieldText';
|
|
4
|
+
import { AutocompleteMenu } from '../common/autocompleteMenu';
|
|
5
|
+
import { DownshiftStore, MultipleDownshiftProps } from './multipleDownshift';
|
|
6
|
+
import { GetItemPropsT } from '../types';
|
|
7
|
+
|
|
8
|
+
export interface MultipleAutocompleteProps<T> {
|
|
9
|
+
options: T[];
|
|
10
|
+
loading: boolean;
|
|
11
|
+
onStateChange: MultipleDownshiftProps<T>['onStateChange'];
|
|
12
|
+
value: T[];
|
|
13
|
+
placeholder: string;
|
|
14
|
+
error: string | boolean;
|
|
15
|
+
touched: boolean;
|
|
16
|
+
creatable: boolean;
|
|
17
|
+
editable: boolean;
|
|
18
|
+
renderOption?: (value: T, index: number, isNew: boolean, getItemProps: GetItemPropsT<T>) => ReactNode;
|
|
19
|
+
onChange: (selectedItems: T | T[] | null, downshift: ControllerStateAndHelpers<T> | null) => void;
|
|
20
|
+
onFocus: () => void;
|
|
21
|
+
onBlur: () => void;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
mobileDisabled: boolean;
|
|
24
|
+
inputProps: ComponentProps<typeof FieldText>;
|
|
25
|
+
parseValueToString: (value: T | null) => string;
|
|
26
|
+
minLength?: number | null;
|
|
27
|
+
maxLength?: number | null;
|
|
28
|
+
async?: boolean;
|
|
29
|
+
customClass: string;
|
|
30
|
+
createWithoutConfirmation: boolean;
|
|
31
|
+
getItemValidationErrorType?: (item: T) => string;
|
|
32
|
+
clearItemsError: () => void;
|
|
33
|
+
isDropdownMode?: boolean;
|
|
34
|
+
getAdditionalCreationCondition: (value: string) => boolean;
|
|
35
|
+
highlightUnStoredItem: boolean;
|
|
36
|
+
parseInputValueFn: ((value: string) => T[]) | null;
|
|
37
|
+
handleUnStoredItemCb: ((newSelectedItems: DownshiftStore<T>, prevSelectedItems: DownshiftStore<T>) => void) | null;
|
|
38
|
+
dataAutomationId?: string;
|
|
39
|
+
existingItemsMap: Record<string | number, boolean>;
|
|
40
|
+
optionVariant: ComponentProps<typeof AutocompleteMenu>['optionVariant'];
|
|
41
|
+
customizeNewSelectedValue: (value: T) => T;
|
|
42
|
+
renderCustomSelectedItem?: (item: T) => ReactNode;
|
|
43
|
+
getUniqKey?: (item: T) => string;
|
|
44
|
+
customEmptyListMessage?: string;
|
|
45
|
+
customNoMatchesMessage?: string;
|
|
46
|
+
useFixedPositioning?: boolean;
|
|
47
|
+
newItemButtonText?: string;
|
|
48
|
+
menuClassName?: string;
|
|
49
|
+
selectedItemSingleLine?: boolean;
|
|
50
|
+
selectedItemClassName?: string;
|
|
51
|
+
selectedItemTextClassName?: string;
|
|
52
|
+
}
|
|
53
|
+
export declare const MultipleAutocomplete: <T>(componentsProps: MultipleAutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ControllerStateAndHelpers, DownshiftProps } from 'downshift';
|
|
2
|
+
|
|
3
|
+
export type DownshiftStore<T> = {
|
|
4
|
+
[key: string]: boolean;
|
|
5
|
+
} | T[];
|
|
6
|
+
export interface MultipleDownshiftProps<T> extends Partial<DownshiftProps<T>> {
|
|
7
|
+
options: T[];
|
|
8
|
+
selectedItems: T[];
|
|
9
|
+
handleUnStoredItemCb: ((newSelectedItems: DownshiftStore<T>, prevSelectedItems: DownshiftStore<T>) => void) | null;
|
|
10
|
+
existingItemsMap: {
|
|
11
|
+
[key: string]: boolean;
|
|
12
|
+
};
|
|
13
|
+
customizeNewSelectedValue: (value: T) => T;
|
|
14
|
+
getOptionUniqKey?: (option: T) => keyof T;
|
|
15
|
+
getOptionUniqKeyValue?: (option: T) => string;
|
|
16
|
+
onChange: (selectedItems: T | T[] | null, downshift: ControllerStateAndHelpers<T> | null) => void;
|
|
17
|
+
}
|
|
18
|
+
export type GetStateAndHelpersT<T> = ControllerStateAndHelpers<T> & {
|
|
19
|
+
removeItem: (removedItem: T, downshift: ControllerStateAndHelpers<T> | null) => void;
|
|
20
|
+
editItem: (oldItem: T, newValue: string) => void;
|
|
21
|
+
handleChange: MultipleDownshiftProps<T>['onChange'];
|
|
22
|
+
getOptionUniqKeyValue?: (option: T) => string;
|
|
23
|
+
storedItemsMap: MultipleDownshiftProps<T>['existingItemsMap'];
|
|
24
|
+
};
|
|
25
|
+
export declare const MultipleDownshift: <T>({ options, onChange, selectedItems, handleUnStoredItemCb, existingItemsMap, children, customizeNewSelectedValue, getOptionUniqKey, getOptionUniqKeyValue, ...props }: MultipleDownshiftProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SelectedItems } from './selectedItems';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type VariantType = 'light' | 'dark';
|
|
4
|
+
interface SelectedItemProps<T> {
|
|
5
|
+
item: T;
|
|
6
|
+
onRemoveItem: (item: T) => void;
|
|
7
|
+
parseValueToString?: (value: T) => string;
|
|
8
|
+
editItem: (oldItem: T, newValue: string) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
mobileDisabled?: boolean;
|
|
11
|
+
error?: string | boolean;
|
|
12
|
+
editable?: boolean;
|
|
13
|
+
getAdditionalCreationCondition?: (value: string) => boolean;
|
|
14
|
+
storedOption?: boolean;
|
|
15
|
+
highlightUnStoredItem?: boolean;
|
|
16
|
+
variant?: VariantType;
|
|
17
|
+
getItemName?: (item: T) => string;
|
|
18
|
+
changeItemHandler?: (item: T, value: string) => T;
|
|
19
|
+
singleLine?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
textClassName?: string;
|
|
22
|
+
}
|
|
23
|
+
type SelectedItemsProps<T> = Omit<SelectedItemProps<T>, 'item' | 'editItem'> & {
|
|
24
|
+
items?: T[];
|
|
25
|
+
onRemoveItem?: (item: T) => void;
|
|
26
|
+
parseValueToString: (value: T | null) => string;
|
|
27
|
+
editItem: (oldItem: T, newValue: string) => void;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
mobileDisabled?: boolean;
|
|
30
|
+
storedItemsMap?: Record<string, boolean>;
|
|
31
|
+
highlightUnStoredItem?: boolean;
|
|
32
|
+
editable?: boolean;
|
|
33
|
+
variant?: VariantType;
|
|
34
|
+
getItemValidationErrorType?: ((item: T) => string) | null;
|
|
35
|
+
renderCustomSelectedItem?: (item: T) => ReactNode;
|
|
36
|
+
selectedItemSingleLine?: boolean;
|
|
37
|
+
selectedItemClassName?: string;
|
|
38
|
+
selectedItemTextClassName?: string;
|
|
39
|
+
};
|
|
40
|
+
export declare const SelectedItems: <T>({ items, parseValueToString, getItemValidationErrorType, storedItemsMap, highlightUnStoredItem, renderCustomSelectedItem, selectedItemSingleLine, selectedItemClassName, selectedItemTextClassName, ...props }: SelectedItemsProps<T>) => (string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined)[];
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SingleAutocomplete } from './singleAutocomplete';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ComponentProps, FocusEvent, ReactNode, Ref } from 'react';
|
|
2
|
+
import { default as Downshift, DownshiftState, StateChangeOptions } from 'downshift';
|
|
3
|
+
import { default as FieldText } from '../../fieldText';
|
|
4
|
+
import { AutocompleteMenu } from '../common/autocompleteMenu';
|
|
5
|
+
import { GetItemPropsT } from '../types';
|
|
6
|
+
|
|
7
|
+
export interface SingleAutocompleteProps<T> {
|
|
8
|
+
options: T[];
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
onStateChange: ComponentProps<typeof Downshift<T>>['onStateChange'];
|
|
11
|
+
value: T | null;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
onChange: ComponentProps<typeof Downshift<T>>['onChange'];
|
|
14
|
+
onFocus: () => void;
|
|
15
|
+
onBlur: (e: FocusEvent<HTMLInputElement>) => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
inputProps?: ComponentProps<typeof FieldText>;
|
|
18
|
+
parseValueToString: (value: T | null) => string;
|
|
19
|
+
renderOption?: (value: T, index: number, isNew: boolean, getItemProps: GetItemPropsT<T>) => ReactNode;
|
|
20
|
+
minLength?: number;
|
|
21
|
+
maxLength?: number | null;
|
|
22
|
+
async?: boolean;
|
|
23
|
+
optionVariant?: ComponentProps<typeof AutocompleteMenu>['optionVariant'];
|
|
24
|
+
isRequired?: boolean;
|
|
25
|
+
error: string;
|
|
26
|
+
touched?: boolean;
|
|
27
|
+
setTouch?: (value: boolean) => void;
|
|
28
|
+
createWithoutConfirmation: boolean;
|
|
29
|
+
menuClassName?: string;
|
|
30
|
+
icon?: ReactNode;
|
|
31
|
+
isDropdownMode?: boolean;
|
|
32
|
+
skipOptionCreation?: boolean;
|
|
33
|
+
isOptionUnique?: (value: boolean | null) => void;
|
|
34
|
+
refFunction?: Ref<HTMLInputElement>;
|
|
35
|
+
stateReducer?: (state: DownshiftState<T>, changes: StateChangeOptions<T>) => Partial<StateChangeOptions<T>>;
|
|
36
|
+
useFixedPositioning: boolean;
|
|
37
|
+
getUniqKey?: (item: T) => string;
|
|
38
|
+
customEmptyListMessage?: string;
|
|
39
|
+
customNoMatchesMessage?: string;
|
|
40
|
+
newItemButtonText?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare const SingleAutocomplete: <T>(componentProps: SingleAutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GetItemPropsOptions } from 'downshift';
|
|
2
|
+
|
|
3
|
+
export type GetOptionUniqKeyT<T> = (value: T) => keyof T;
|
|
4
|
+
export interface AdditionalDownshiftFields {
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type OptionVariant = 'light' | 'dark' | string;
|
|
8
|
+
export type GetItemPropsT<T> = (args: GetItemPropsOptions<T> & AdditionalDownshiftFields) => GetItemPropsOptions<T> & AdditionalDownshiftFields;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GetOptionUniqKeyT } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const getUniqKey: <T>(option: T, getOptionUniqKey?: GetOptionUniqKeyT<T>) => string;
|
|
4
|
+
export declare const isEqual: <T>(option: T, item: T) => boolean;
|
|
5
|
+
export declare const compareOptionWithItem: <T>(option: T, item: T, getUniqKeyCb?: GetOptionUniqKeyT<T>) => boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BreadcrumbDescriptor } from '../types';
|
|
2
|
+
|
|
3
|
+
interface BreadcrumbProps {
|
|
4
|
+
descriptor: BreadcrumbDescriptor;
|
|
5
|
+
titleTailNumChars?: number;
|
|
6
|
+
isClickable?: boolean;
|
|
7
|
+
variant?: 'default' | 'dark';
|
|
8
|
+
}
|
|
9
|
+
export declare const Breadcrumb: React.FC<BreadcrumbProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Breadcrumb } from './breadcrumb';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LinkComponentType } from '../types';
|
|
3
|
+
|
|
4
|
+
export interface BreadcrumbsContextValue {
|
|
5
|
+
LinkComponent?: LinkComponentType;
|
|
6
|
+
}
|
|
7
|
+
export declare const BreadcrumbsContext: import('react').Context<BreadcrumbsContextValue | undefined>;
|
|
8
|
+
interface BreadcrumbsProviderProps {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
LinkComponent?: LinkComponentType;
|
|
11
|
+
}
|
|
12
|
+
export declare const BreadcrumbsProvider: ({ children, LinkComponent }: BreadcrumbsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BreadcrumbsProvider } from './breadcrumbsProvider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tree } from './tree';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BreadcrumbDescriptor {
|
|
4
|
+
title: string | ReactNode;
|
|
5
|
+
link?: object | string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface TreeDescriptor extends BreadcrumbDescriptor {
|
|
9
|
+
link: object | string;
|
|
10
|
+
children?: TreeDescriptor[];
|
|
11
|
+
}
|
|
12
|
+
export type LinkComponentType = React.ComponentType<{
|
|
13
|
+
to: object | string;
|
|
14
|
+
className?: string;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}>;
|
|
18
|
+
export interface BreadcrumbsProps {
|
|
19
|
+
descriptors: BreadcrumbDescriptor[];
|
|
20
|
+
LinkComponent?: LinkComponentType;
|
|
21
|
+
tree?: TreeDescriptor[];
|
|
22
|
+
dataAutomationId?: string;
|
|
23
|
+
isBackButton?: boolean;
|
|
24
|
+
}
|