@epam/ai-dial-ui-kit 0.6.0-rc.6 → 0.6.0-rc.60

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.
Files changed (43) hide show
  1. package/README.md +5 -13
  2. package/dist/dial-ui-kit.cjs.js +28 -28
  3. package/dist/dial-ui-kit.es.js +9440 -9127
  4. package/dist/index.css +2 -2
  5. package/dist/src/components/AutocompleteInput/AutocompleteInput.d.ts +3 -4
  6. package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +2 -3
  7. package/dist/src/components/Button/Button.d.ts +6 -2
  8. package/dist/src/components/Button/ButtonWrappers.d.ts +71 -0
  9. package/dist/src/components/Button/constants.d.ts +1 -1
  10. package/dist/src/components/Button/utils.d.ts +2 -0
  11. package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +3 -4
  12. package/dist/src/components/ConfirmationPopup/constants.d.ts +9 -3
  13. package/dist/src/components/FileManager/FileManager.d.ts +20 -3
  14. package/dist/src/components/FileManager/FileManagerContext.d.ts +10 -3
  15. package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +4 -0
  16. package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.d.ts +2 -0
  17. package/dist/src/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.d.ts +2 -0
  18. package/dist/src/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.d.ts +2 -0
  19. package/dist/src/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.d.ts +4 -2
  20. package/dist/src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.d.ts +2 -0
  21. package/dist/src/components/FileManager/constants.d.ts +1 -1
  22. package/dist/src/components/FileManager/hooks/use-bulk-actions.d.ts +3 -1
  23. package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +2 -1
  24. package/dist/src/components/FileManager/hooks/use-grid-actions-column.d.ts +3 -2
  25. package/dist/src/components/FileName/FileName.d.ts +2 -0
  26. package/dist/src/components/FolderName/FolderName.d.ts +3 -1
  27. package/dist/src/components/Grid/constants.d.ts +2 -0
  28. package/dist/src/components/InputPopup/InputPopup.d.ts +1 -1
  29. package/dist/src/components/LabelledText/LabelledText.d.ts +2 -0
  30. package/dist/src/components/Popup/Popup.d.ts +3 -1
  31. package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +1 -1
  32. package/dist/src/components/RemoveButton/RemoveButton.d.ts +2 -2
  33. package/dist/src/components/Select/Select.d.ts +10 -0
  34. package/dist/src/components/Select/constants.d.ts +1 -1
  35. package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +5 -3
  36. package/dist/src/components/Tabs/Tabs.d.ts +4 -0
  37. package/dist/src/hooks/use-screen-type.d.ts +2 -1
  38. package/dist/src/index.d.ts +2 -1
  39. package/dist/src/types/button.d.ts +14 -2
  40. package/dist/src/utils/__tests__/path.spec.d.ts +1 -0
  41. package/dist/src/utils/path.d.ts +10 -0
  42. package/package.json +1 -1
  43. /package/dist/src/utils/{merge-classes.spec.d.ts → __tests__/merge-classes.spec.d.ts} +0 -0
@@ -14,6 +14,7 @@ export interface FileUploadValidationMessages {
14
14
  validationError?: string;
15
15
  }
16
16
  export interface UseFileUploadOptions {
17
+ uploadEnabled?: boolean;
17
18
  onUploadFiles?: (files: DialUploadFileItem[], destinationFolder: string) => void;
18
19
  onValidateUpload?: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => FileUploadValidationResult | Promise<FileUploadValidationResult>;
19
20
  maxFileSize?: number;
@@ -21,7 +22,7 @@ export interface UseFileUploadOptions {
21
22
  validationMessages?: FileUploadValidationMessages;
22
23
  onUploadArchive?: (file: File, name: string, destinationFolder: string) => void;
23
24
  }
24
- export declare const useFileUpload: ({ onUploadFiles, onValidateUpload, maxFileSize, allowedFileTypes, validationMessages, onUploadArchive, }?: UseFileUploadOptions) => {
25
+ export declare const useFileUpload: ({ onUploadFiles, onValidateUpload, maxFileSize, allowedFileTypes, validationMessages, onUploadArchive, uploadEnabled, }?: UseFileUploadOptions) => {
25
26
  isDragging: boolean;
26
27
  isDraggingOverWindow: boolean;
27
28
  uploadError: string | undefined;
@@ -4,10 +4,11 @@ import { DropdownItem } from '../../../models/dropdown';
4
4
  import { DialFileAcceptType } from '../../../models/file-manager';
5
5
  interface UseGridActionsColumnProps {
6
6
  getContextMenuItems: (row: FileManagerGridRow) => DropdownItem[];
7
- isRowDisabled: (row: FileManagerGridRow, allowedFileTypes?: DialFileAcceptType[]) => boolean;
7
+ isRowDisabled: (row: FileManagerGridRow, allowedFileTypes?: DialFileAcceptType[], maxSelectableFileSize?: number) => boolean;
8
8
  allowedFileTypes?: DialFileAcceptType[];
9
+ maxSelectableFileSize?: number;
9
10
  }
10
- export declare const useGridActionsColumn: ({ getContextMenuItems, isRowDisabled, allowedFileTypes, }: UseGridActionsColumnProps) => {
11
+ export declare const useGridActionsColumn: ({ getContextMenuItems, isRowDisabled, allowedFileTypes, maxSelectableFileSize, }: UseGridActionsColumnProps) => {
11
12
  actionsColumnDef: ColDef<FileManagerGridRow, any>;
12
13
  };
13
14
  export {};
@@ -5,6 +5,7 @@ export interface DialFileNameProps {
5
5
  shared?: boolean;
6
6
  iconSize?: number;
7
7
  details?: ReactNode;
8
+ sharedIndicatorClassName?: string;
8
9
  }
9
10
  /**
10
11
  * Component to display a file name with a file icon and shared indicator.
@@ -30,5 +31,6 @@ export interface DialFileNameProps {
30
31
  * @param shared - Whether the file is shared.
31
32
  * @param iconSize - Icon size in px. Default: BASE_ICON_SIZE.
32
33
  * @param details - Optional metadata block displayed under the file name (e.g., size, modified date).
34
+ * @param sharedIndicatorClassName - Additional CSS classes for the shared indicator.
33
35
  */
34
36
  export declare const DialFileName: FC<DialFileNameProps>;
@@ -1,10 +1,11 @@
1
1
  import { FC } from 'react';
2
2
  export interface DialFolderNameProps {
3
3
  name: string;
4
- className?: string;
5
4
  shared?: boolean;
6
5
  loading?: boolean;
7
6
  iconSize?: number;
7
+ className?: string;
8
+ sharedIndicatorClassName?: string;
8
9
  }
9
10
  /**
10
11
  * Component to display a folder name with a folder icon and shared indicator.
@@ -20,5 +21,6 @@ export interface DialFolderNameProps {
20
21
  * @param shared - If true, shows shared indicator. Default: false.
21
22
  * @param loading - If true, shows loading state. Default: false.
22
23
  * @param iconSize - Icon size in px. Default: BASE_ICON_SIZE.
24
+ * @param sharedIndicatorClassName - Additional CSS classes for the shared indicator
23
25
  */
24
26
  export declare const DialFolderName: FC<DialFolderNameProps>;
@@ -3,8 +3,10 @@ export declare const GRID_THEME_COLORS: {
3
3
  accentColor: string;
4
4
  backgroundColor: string;
5
5
  oddRowBackgroundColor: string;
6
+ selectedRowBackgroundColor: string;
6
7
  borderColor: string;
7
8
  rowBorder: string;
9
+ rowHoverColor: string;
8
10
  borderRadius: number;
9
11
  browserColorScheme: string;
10
12
  chromeBackgroundColor: string;
@@ -45,7 +45,7 @@ export interface DialInputPopupProps {
45
45
  * @param [inputClassName] - Additional CSS classes applied to the input container.
46
46
  * @param [elementId] - A unique identifier for the input element, useful for accessibility and testing.
47
47
  * @param [errorText] - An optional error message displayed below the input when an error state is present.
48
- * @param [invalid] - Whether the input is in an invalid state, affecting styling. Applyed automatically if errorText is provided.
48
+ * @param [invalid] - Whether the input is in an invalid state, affecting styling. Applied automatically if errorText is provided.
49
49
  * @param [emptyValueText] - The text displayed when no value is selected and placeholder is not provided.
50
50
  */
51
51
  export declare const DialInputPopup: FC<DialInputPopupProps>;
@@ -5,6 +5,7 @@ export interface DialLabelledTextProps {
5
5
  tooltip?: string;
6
6
  children?: ReactNode;
7
7
  postfix?: ReactNode;
8
+ className?: string;
8
9
  }
9
10
  /**
10
11
  * A label component for form fields with optional tooltip, content, and custom elements.
@@ -23,5 +24,6 @@ export interface DialLabelledTextProps {
23
24
  * @param [tooltip] - Optional tooltip different from main text
24
25
  * @param [children] - Custom content to render instead of the default text/tooltip
25
26
  * @param [postfix] - Element to display after the text (e.g., an asterisk)
27
+ * @param [className] - Additional CSS classes for the container element.
26
28
  */
27
29
  export declare const DialLabelledText: FC<DialLabelledTextProps>;
@@ -13,6 +13,7 @@ export interface DialPopupProps {
13
13
  footer?: ReactNode;
14
14
  onClose?: (e?: MouseEvent<HTMLButtonElement> | null) => void;
15
15
  size?: PopupSize;
16
+ hideClose?: boolean;
16
17
  closeOnOutsideClick?: boolean;
17
18
  }
18
19
  /**
@@ -51,6 +52,7 @@ export interface DialPopupProps {
51
52
  * @param [footer] - Footer area for actions
52
53
  * @param [onClose] - Callback fired when the popup requests to close
53
54
  * @param [size=PopupSize.Md] - Sets the max-width of the popup
54
- * @param [closeOnOutsideClick=true] - Whether the popup closes when clicking outside
55
+ * @param [hideClose=false] Whether the close button is hidden in the header (default: false)
56
+ * @param [closeOnOutsideClick=true] - Whether the popup closes when clicking outside (default: true)
55
57
  */
56
58
  export declare const DialPopup: FC<DialPopupProps>;
@@ -1,8 +1,8 @@
1
1
  import { FC } from 'react';
2
2
  import { DialFieldLabelProps } from '../Field/Field';
3
3
  import { DialInputPopupProps } from '../InputPopup/InputPopup';
4
- import { DialRadioGroupProps } from '../RadioGroup/RadioGroup';
5
4
  import { DialPopupProps } from '../Popup/Popup';
5
+ import { DialRadioGroupProps } from '../RadioGroup/RadioGroup';
6
6
  export interface RadioGroupPopupFieldProps extends Pick<DialFieldLabelProps, 'fieldTitle' | 'htmlFor'>, Omit<DialInputPopupProps, 'onOpen' | 'children'>, Pick<DialRadioGroupProps, 'radioButtons'>, Pick<DialPopupProps, 'onClose' | 'portalId' | 'size'> {
7
7
  customInputValue?: string;
8
8
  header: string;
@@ -6,8 +6,8 @@ export interface DialRemoveButtonProps extends Omit<DialButtonProps, 'iconBefore
6
6
  /**
7
7
  * A specialized button component for removal or delete actions.
8
8
  *
9
- * Renders a `DialButton` with a predefined trash icon (`IconTrashX`) as the leading icon.
10
- * Additional props are passed directly to the underlying `DialButton`.
9
+ * Renders a `DialErrorButton` with a predefined trash icon (`IconTrashX`) as the leading icon.
10
+ * Additional props are passed directly to the underlying `DialErrorButton`.
11
11
  * @example
12
12
  * <DialRemoveButton
13
13
  * label="Delete item"
@@ -21,9 +21,14 @@ export interface DialSelectProps {
21
21
  emptyStateIcon?: ReactNode;
22
22
  disabled?: boolean;
23
23
  className?: string;
24
+ listClassName?: string;
24
25
  closable?: boolean;
26
+ invalid?: boolean;
25
27
  header?: ReactNode | (() => ReactNode);
26
28
  footer?: ReactNode | (() => ReactNode);
29
+ open?: boolean;
30
+ onOpenChange?: (open: boolean) => void;
31
+ onInlineQueryChange?: (query: string) => void;
27
32
  dismissRef?: Ref<unknown>;
28
33
  onClose?: (e: MouseEvent<HTMLButtonElement>) => void;
29
34
  onChange?: (next: string | string[]) => void;
@@ -70,14 +75,19 @@ export interface DialSelectProps {
70
75
  * @param [emptyStateTitle="No options available"] - Title text when there are no options.
71
76
  * @param [emptyStateDescription] - Description text when there are no options.
72
77
  * @param [emptyStateIcon] - Icon to display when there are no options.
78
+ * @param [invalid] - Whether the select is in an invalid state, affecting styling.
73
79
  * @param [disabled=false] - Disable the control.
74
80
  * @param [className] - Additional CSS classes for the trigger.
81
+ * @param [listClassName] - Additional CSS classes for the list dropdown.
75
82
  * @param [closable=false] - Show a close button in the dropdown header.
76
83
  * @param [header] - Custom node/function rendered above the options.
77
84
  * @param [footer] - Custom node/function rendered below the options.
85
+ * @param [open] - Controlled open state of the dropdown. When provided, makes the dropdown controlled.
86
+ * @param [onOpenChange] - Called when the dropdown open state changes.
78
87
  * @param [onClose] - Called when the dropdown close button is clicked.
79
88
  * @param [onChange] - Called when the selection changes.
80
89
  * @param [inlineSearch=false] - Render a plain input inside trigger (single mode only).
90
+ * @param [onInlineQueryChange] - Called when the inline search query changes
81
91
  * @param [onFooterClick] - Called when the footer element is clicked. When provided, automatically closes the dropdown.
82
92
  * @param [dismissRef] - Ref object to expose a `dismiss` method to programmatically close the select.
83
93
  */
@@ -1,4 +1,4 @@
1
- export declare const selectTriggerBaseClassName = "dial-input flex w-full items-center justify-between gap-2 dial-small";
1
+ export declare const selectTriggerBaseClassName = "dial-input flex w-full items-center justify-between gap-2 dial-small cursor-pointer";
2
2
  export declare const selectOverlayBaseClassName = "w-full rounded flex flex-col";
3
3
  export declare const selectOptionBaseClassName = "flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none";
4
4
  export declare const selectOptionSelectedClassName = "bg-accent-primary-alpha";
@@ -2,8 +2,9 @@ import { FC, ReactNode } from 'react';
2
2
  export interface DialSharedEntityIndicatorProps {
3
3
  label?: ReactNode;
4
4
  size?: number;
5
- className?: string;
6
5
  stroke?: number;
6
+ className?: string;
7
+ containerClassName?: string;
7
8
  }
8
9
  /**
9
10
  * A compact icon-only indicator to denote a "shared" entity.
@@ -18,8 +19,9 @@ export interface DialSharedEntityIndicatorProps {
18
19
  *
19
20
  * @param [label="Shared entity"] - Accessible label for assistive tech
20
21
  * @param [size=10] - Pixel size for the icon
21
- * @param [className] - Additional Tailwind classes appended to the container
22
- * @param [stroke=2] - Stroke width for the icon
22
+ * @param [className] - Additional Tailwind classes applied to the icon
23
+ * @param [containerClassName] - Additional Tailwind classes appended to the container
24
+ * @param [stroke=1.5] - Stroke width for the icon
23
25
  *
24
26
  */
25
27
  export declare const DialSharedEntityIndicator: FC<DialSharedEntityIndicatorProps>;
@@ -9,6 +9,8 @@ export interface DialTabsProps {
9
9
  screenThreshold?: ScreenResolution;
10
10
  smallScreenContainerClassName?: string;
11
11
  smallScreenDropdownItemClassName?: string;
12
+ desktopDropdownClassName?: string;
13
+ desktopTabClassName?: string;
12
14
  }
13
15
  /**
14
16
  * A responsive and overflow-aware tabs component that automatically adapts its layout
@@ -50,6 +52,8 @@ export interface DialTabsProps {
50
52
  * in small-screen (collapsed) mode.
51
53
  * @param [smallScreenDropdownItemClassName] - Optional CSS class applied to individual dropdown
52
54
  * items in small-screen mode.
55
+ * @param [desktopDropdownClassName] - Optional CSS class applied to dropdown button in non small-screen mode.
56
+ * @param [desktopTabClassName] - Optional CSS class applied to tab in non small-screed mode.
53
57
  *
54
58
  * @remarks
55
59
  * - Automatically detects horizontal overflow via `ResizeObserver` and shows a dropdown when needed.
@@ -1,3 +1,4 @@
1
+ import { ScreenType } from '../types/screen';
1
2
  /**
2
3
  * A React hook that determines the current screen type based on the viewport width.
3
4
  *
@@ -16,4 +17,4 @@
16
17
  * console.log('Desktop layout active');
17
18
  * }
18
19
  */
19
- export declare const useScreenType: () => import('../types/screen').ScreenType;
20
+ export declare const useScreenType: () => ScreenType;
@@ -26,6 +26,7 @@ export { DialTabs } from './components/Tabs/Tabs';
26
26
  export { DialBreadcrumb } from './components/Breadcrumb/Breadcrumb';
27
27
  export { DialBreadcrumbItem } from './components/Breadcrumb/BreadcrumbItem';
28
28
  export { DialButton } from './components/Button/Button';
29
+ export { DialErrorButton, DialNeutralButton, DialPrimaryButton, DialGhostButton, DialLinkButton, } from './components/Button/ButtonWrappers';
29
30
  export { DialCloseButton } from './components/CloseButton/CloseButton';
30
31
  export { DialRemoveButton } from './components/RemoveButton/RemoveButton';
31
32
  export { DialTextarea } from './components/Textarea/Textarea';
@@ -54,7 +55,7 @@ export { DialDropdown } from './components/Dropdown/Dropdown';
54
55
  export { DialButtonDropdown } from './components/ButtonDropdown/ButtonDropdown';
55
56
  export { DialFileManager } from './components/FileManager/FileManager';
56
57
  export { AlertVariant } from './types/alert';
57
- export { ButtonVariant } from './types/button';
58
+ export { ButtonVariant, ButtonAppearance, ButtonSize } from './types/button';
58
59
  export { RadioGroupOrientation } from './types/radio-group';
59
60
  export { PopupSize } from './types/popup';
60
61
  export { ConfirmationPopupVariant } from './types/confirmation-popup';
@@ -1,6 +1,18 @@
1
1
  export declare enum ButtonVariant {
2
2
  Primary = "primary",
3
+ Neutral = "neutral",
4
+ Error = "error",
5
+ Success = "Success",
3
6
  Secondary = "secondary",
4
- Tertiary = "tertiary",
5
- Danger = "danger"
7
+ Tertiary = "tertiary"
8
+ }
9
+ export declare enum ButtonAppearance {
10
+ Solid = "solid",
11
+ Outlined = "outlined",
12
+ Ghost = "ghost",
13
+ Link = "link"
14
+ }
15
+ export declare enum ButtonSize {
16
+ Standard = "standard",
17
+ Small = "small"
6
18
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Splits a path string into normalized, non-empty segments.
3
+ *
4
+ * Trims whitespace from each segment and removes empty values
5
+ * caused by leading, trailing, or repeated slashes.
6
+ *
7
+ * @param path - A path string (e.g. "Org / Design / Assets/")
8
+ * @returns An array of path segments
9
+ */
10
+ export declare const getSegments: (path: string) => string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.6.0-rc.6",
3
+ "version": "0.6.0-rc.60",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",