@epam/ai-dial-ui-kit 0.4.0-rc.36 → 0.4.0-rc.38
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/dist/dial-ui-kit.cjs.js +23 -23
- package/dist/dial-ui-kit.es.js +3647 -3602
- package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +2 -2
- package/dist/src/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/src/components/FileManager/FileManager.d.ts +5 -9
- package/dist/src/components/FileManager/hooks/use-file-clipboard.d.ts +6 -3
- package/dist/src/components/Select/MultiSelectTags.d.ts +2 -2
- package/dist/src/components/Tag/Tag.d.ts +2 -2
- package/dist/src/components/Tooltip/TooltipContent.d.ts +5 -2
- package/dist/src/components/Tooltip/TooltipTrigger.d.ts +6 -4
- package/dist/src/hooks/use-flexible-actions.d.ts +4 -4
- package/dist/src/index.d.ts +1 -1
- package/dist/src/models/dropdown.d.ts +2 -2
- package/dist/src/types/file-manager.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
1
|
+
import { FC, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
export interface DialBreadcrumbItemProps {
|
|
3
3
|
title: ReactNode;
|
|
4
4
|
href?: string;
|
|
5
|
-
onClick?:
|
|
5
|
+
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
iconBefore?: ReactNode;
|
|
8
8
|
cssClass?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { ColDef } from 'ag-grid-community';
|
|
3
3
|
import { DialFile } from '../../models/file';
|
|
4
4
|
import { DialFoldersTreeProps } from './components/FoldersTree/FoldersTree';
|
|
@@ -6,18 +6,14 @@ import { DialFileManagerNavigationPanelProps } from './components/FileManagerNav
|
|
|
6
6
|
import { DialGridProps } from '../Grid/Grid';
|
|
7
7
|
import { DialFileManagerToolbarProps } from './components/FileManagerToolbar/DialFileManagerToolbar';
|
|
8
8
|
import { DialFileManagerBulkActionsToolbarProps } from './components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar';
|
|
9
|
-
import { DialFileManagerActions } from '../../types/file-manager';
|
|
9
|
+
import { DialFileManagerActions, DialCopiedItem } from '../../types/file-manager';
|
|
10
10
|
import { FileManagerGridRow } from './FileManagerContext';
|
|
11
11
|
type GridRow = FileManagerGridRow;
|
|
12
|
-
interface CopiedItem {
|
|
13
|
-
from: string;
|
|
14
|
-
to: string;
|
|
15
|
-
}
|
|
16
12
|
export interface FileTreeOptions extends Omit<DialFoldersTreeProps, 'items' | 'selectedPath' | 'onItemClick'> {
|
|
17
13
|
width?: number;
|
|
18
14
|
title?: string;
|
|
19
15
|
containerCssClass?: string;
|
|
20
|
-
additionalButtons?:
|
|
16
|
+
additionalButtons?: ReactNode;
|
|
21
17
|
collapsed?: boolean;
|
|
22
18
|
actionLabels?: {
|
|
23
19
|
[DialFileManagerActions.Copy]?: string;
|
|
@@ -44,8 +40,8 @@ export interface DialFileManagerProps {
|
|
|
44
40
|
bulkActionsToolbarOptions?: BulkActionsToolbarOptions;
|
|
45
41
|
onPathChange?: (nextPath?: string) => void;
|
|
46
42
|
onTableFileClick?: (file: GridRow) => void;
|
|
47
|
-
onCopyFiles?: (items:
|
|
48
|
-
onMoveToFiles?: (items:
|
|
43
|
+
onCopyFiles?: (items: DialCopiedItem[]) => void;
|
|
44
|
+
onMoveToFiles?: (items: DialCopiedItem[]) => void;
|
|
49
45
|
}
|
|
50
46
|
/**
|
|
51
47
|
* File Manager layout with a collapsible folders tree, breadcrumb/search header, and a data grid.
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { DialFile } from '../../../index';
|
|
2
|
+
import { DialCopiedItem } from '../../../types/file-manager';
|
|
1
3
|
export interface UseFileClipboardOptions {
|
|
2
4
|
getDestination: () => string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
getDestinationFiles: () => DialFile[];
|
|
6
|
+
onCopyFiles?: (items: DialCopiedItem[]) => void;
|
|
7
|
+
onMoveToFiles?: (items: DialCopiedItem[]) => void;
|
|
5
8
|
}
|
|
6
|
-
export declare const useFileClipboard: ({ getDestination, onCopyFiles, onMoveToFiles, }: UseFileClipboardOptions) => {
|
|
9
|
+
export declare const useFileClipboard: ({ getDestination, getDestinationFiles, onCopyFiles, onMoveToFiles, }: UseFileClipboardOptions) => {
|
|
7
10
|
state: {
|
|
8
11
|
copied: Set<string>;
|
|
9
12
|
cut: Set<string>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SelectOption } from '../../models/select';
|
|
2
|
-
import { MouseEvent } from 'react';
|
|
2
|
+
import { FC, MouseEvent } from 'react';
|
|
3
3
|
export interface DialMultiSelectTagsProps {
|
|
4
4
|
options: SelectOption[];
|
|
5
5
|
selectedValues: string[];
|
|
6
6
|
handleRemoveTag?: (event: MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, val: string) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const DialMultiSelectTags:
|
|
8
|
+
export declare const DialMultiSelectTags: FC<DialMultiSelectTagsProps>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TagVariant } from '../../types/tag';
|
|
2
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { FC, MouseEvent, ReactNode } from 'react';
|
|
3
3
|
export interface DialTagProps {
|
|
4
4
|
tag: string;
|
|
5
5
|
cssClass?: string;
|
|
6
|
-
remove?: (event:
|
|
6
|
+
remove?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
7
7
|
variant?: TagVariant;
|
|
8
8
|
iconBefore?: ReactNode;
|
|
9
9
|
bordered?: boolean;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { HTMLProps } from 'react';
|
|
1
|
+
import { CSSProperties, FC, HTMLProps } from 'react';
|
|
2
|
+
export interface Props extends HTMLProps<HTMLDivElement> {
|
|
3
|
+
style?: CSSProperties;
|
|
4
|
+
}
|
|
2
5
|
/**
|
|
3
6
|
* The content area of a tooltip that displays the tooltip information
|
|
4
7
|
*
|
|
5
8
|
* @param children - The content to display inside the tooltip
|
|
6
9
|
* @param [style] - Additional inline styles for the tooltip content
|
|
7
10
|
*/
|
|
8
|
-
export declare const DialTooltipContent:
|
|
11
|
+
export declare const DialTooltipContent: FC<Props>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { HTMLProps } from 'react';
|
|
1
|
+
import { FC, HTMLProps } from 'react';
|
|
2
|
+
interface TooltipTriggerProps extends HTMLProps<HTMLElement> {
|
|
3
|
+
asChild?: boolean;
|
|
4
|
+
}
|
|
2
5
|
/**
|
|
3
6
|
* The trigger element for a tooltip that can be clicked or hovered
|
|
4
7
|
*
|
|
5
8
|
* @param children - The element that will trigger the tooltip
|
|
6
9
|
* @param [asChild=false] - Whether to render as a child element instead of wrapping in a span
|
|
7
10
|
*/
|
|
8
|
-
export declare const DialTooltipTrigger:
|
|
9
|
-
|
|
10
|
-
}, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
11
|
+
export declare const DialTooltipTrigger: FC<TooltipTriggerProps>;
|
|
12
|
+
export {};
|
|
@@ -39,10 +39,10 @@ interface UseFlexibleActionsOptions<T> {
|
|
|
39
39
|
* @property {T[]} hiddenActions - Actions that do not fit and should be rendered inside a dropdown.
|
|
40
40
|
*
|
|
41
41
|
* @property {Object} refs - A set of refs used for layout measurement.
|
|
42
|
-
* @property {
|
|
43
|
-
* @property {
|
|
44
|
-
* @property {
|
|
45
|
-
* @property {
|
|
42
|
+
* @property {RefObject<HTMLDivElement>} refs.containerRef - Ref for the outer container. Must wrap the entire toolbar area.
|
|
43
|
+
* @property {RefObject<HTMLDivElement>} refs.measureRef - Ref for a hidden measurement container (used to measure action widths).
|
|
44
|
+
* @property {RefObject<HTMLDivElement>} refs.leftSectionRef - Ref for the left fixed section (optional).
|
|
45
|
+
* @property {RefObject<HTMLDivElement>} refs.rightSectionRef - Ref for the right fixed section (optional).
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
48
48
|
* // Example usage inside a toolbar component:
|
package/dist/src/index.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export { TabOrientation } from './types/tab';
|
|
|
63
63
|
export type { DialBreadcrumbPathItem } from './models/breadcrumb';
|
|
64
64
|
export { FormItemOrientation } from './types/form-item';
|
|
65
65
|
export { SelectSize, SelectVariant } from './types/select';
|
|
66
|
-
export { DialFileManagerTabs, DialFileManagerActions, } from './types/file-manager';
|
|
66
|
+
export { DialFileManagerTabs, DialFileManagerActions, type DialCopiedItem, } from './types/file-manager';
|
|
67
67
|
export { FlexibleActionsDirection } from './types/flexible-actions';
|
|
68
68
|
export { useDialFileManagerTabs } from './components/FileManager/hooks/use-file-manager-tabs';
|
|
69
69
|
export { FileManagerProvider } from './components/FileManager/FileManagerProvider';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DropdownItemType } from '../types/dropdown';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, MouseEvent } from 'react';
|
|
3
3
|
export interface DropdownItem {
|
|
4
4
|
key: string;
|
|
5
5
|
label?: ReactNode;
|
|
@@ -9,6 +9,6 @@ export interface DropdownItem {
|
|
|
9
9
|
type?: DropdownItemType;
|
|
10
10
|
onClick?: (info: {
|
|
11
11
|
key: string;
|
|
12
|
-
domEvent:
|
|
12
|
+
domEvent: MouseEvent<Element, MouseEvent>;
|
|
13
13
|
}) => void;
|
|
14
14
|
}
|