@epam/ai-dial-ui-kit 0.11.0-dev.8 → 0.11.1

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 (40) hide show
  1. package/dist/CHANGELOG.md +62 -0
  2. package/dist/{JsonEditor-O9rhy9nC.cjs → JsonEditor-DXjZmR_y.cjs} +1 -1
  3. package/dist/{JsonEditor-wn-pI9Zq.js → JsonEditor-DmQjahdQ.js} +1 -1
  4. package/dist/{MarkdownEditor-CTu9xh7q.js → MarkdownEditor-BRvU8Bbp.js} +1 -1
  5. package/dist/{MarkdownEditor-BKIxg06_.cjs → MarkdownEditor-CN5ZmbT1.cjs} +1 -1
  6. package/dist/components-manifest.json +176 -52
  7. package/dist/dial-ui-kit.cjs.js +1 -1
  8. package/dist/dial-ui-kit.es.js +47 -47
  9. package/dist/index-C2evxw2N.cjs +71 -0
  10. package/dist/{index-B3R7eB3W.js → index-DpHRAg-m.js} +10372 -10004
  11. package/dist/index.css +2 -2
  12. package/dist/mcp-server.cjs +115 -0
  13. package/dist/migration-guides/0.11.0/dropdown-menu-prop-flatten.md +78 -0
  14. package/dist/migration-guides/README.md +21 -0
  15. package/dist/migration-guides/_template.md +54 -0
  16. package/dist/src/components/Breadcrumb/constants.d.ts +3 -3
  17. package/dist/src/components/ConfirmationPopup/constants.d.ts +1 -1
  18. package/dist/src/components/Dropdown/Dropdown.d.ts +6 -9
  19. package/dist/src/components/DropdownIcon/DropdownIcon.d.ts +4 -5
  20. package/dist/src/components/FileManager/FileManager.d.ts +4 -0
  21. package/dist/src/components/FileManager/FileManagerContext.d.ts +3 -0
  22. package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +5 -0
  23. package/dist/src/components/FileManager/utils.d.ts +1 -0
  24. package/dist/src/components/Input/Button/InputButton.d.ts +1 -0
  25. package/dist/src/components/LoadFileArea/FilledDropZone.d.ts +14 -0
  26. package/dist/src/components/Notification/Notification.d.ts +6 -4
  27. package/dist/src/components/Notification/constants.d.ts +1 -1
  28. package/dist/src/components/Pagination/utils.d.ts +5 -1
  29. package/dist/src/components/Search/Search.d.ts +2 -0
  30. package/dist/src/components/Search/constants.d.ts +8 -16
  31. package/dist/src/components/Skeleton/Skeleton.d.ts +4 -0
  32. package/dist/src/components/Slider/Slider.d.ts +53 -0
  33. package/dist/src/components/Tag/Tag.d.ts +17 -27
  34. package/dist/src/hooks/use-editable-item.d.ts +4 -0
  35. package/dist/src/index.d.ts +2 -1
  36. package/dist/src/types/size.d.ts +2 -1
  37. package/package.json +17 -15
  38. package/dist/index-B2c6-Mza.cjs +0 -71
  39. package/dist/src/components/Tag/constants.d.ts +0 -3
  40. package/dist/src/types/tag.d.ts +0 -3
@@ -11,6 +11,7 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
11
11
  moveLabel?: string;
12
12
  addFolderLabel?: string;
13
13
  showHiddenFileSwitcher?: boolean;
14
+ showCreateFolderButton?: boolean;
14
15
  hiddenFilesSwitcherLabel?: string;
15
16
  mode?: 'copy' | 'move';
16
17
  header?: ReactNode;
@@ -19,6 +20,7 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
19
20
  collapsedFileTree?: boolean;
20
21
  alertProps?: DialNotificationProps;
21
22
  onFolderPopupPathChange?: (newPath?: string) => void;
23
+ processDestinationFolderPath?: (path: string) => string;
22
24
  }
23
25
  /**
24
26
  * DestinationFolderPopup
@@ -59,5 +61,8 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
59
61
  * @param [sourceFolder] - The source folder path for move operations
60
62
  * @param [disabledPathTooltip="Unavailable for the original path. Please select another folder"] - Tooltip text when destination is disabled
61
63
  * @param [collapsedFileTree=false] - Whether the file tree should be initially collapsed
64
+ * @param [processDestinationFolderPath] - Optional function to process the destination folder path before setting it
65
+ *
66
+ * @returns A React component for the destination folder selection popup
62
67
  */
63
68
  export declare const DialDestinationFolderPopup: FC<DestinationFolderPopupProps>;
@@ -54,4 +54,5 @@ export declare const splitPathAndName: (fullPath: string) => {
54
54
  };
55
55
  export declare const isFileSelectable: (file: Pick<DialFile, "contentLength" | "contentType" | "name">, allowedFileTypes?: DialFileAcceptType[], maxSelectableFileSize?: number) => boolean;
56
56
  export declare const getRowTooltip: (file: FileManagerGridRow, allowedFileTypes?: DialFileAcceptType[], maxSelectableFileSize?: number, unsupportedFileTypeTooltip?: string, fileTooLargeTooltip?: string) => string | undefined;
57
+ export declare const getFolderNestingDepth: (folderPath: string) => number;
57
58
  export declare const getNextFolderName: (existingFolders: DialFile[]) => string;
@@ -5,6 +5,7 @@ export interface DialInputButtonProps {
5
5
  disabled?: boolean;
6
6
  onClick?: () => void;
7
7
  size?: ElementSize;
8
+ className?: string;
8
9
  }
9
10
  /**
10
11
  * An Input button component with a customizable icon and accessible label.
@@ -0,0 +1,14 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface FilledDropZoneProps {
3
+ children: ReactNode;
4
+ existingFiles: File[];
5
+ onDrop: (files: File[]) => void;
6
+ getIsFileFormatError?: (fileItems: File[] | DataTransferItem[]) => boolean;
7
+ getIsFileSizeError?: (fileItems: File[] | DataTransferItem[]) => boolean;
8
+ maxFilesCount?: number;
9
+ fileFormatError?: string;
10
+ fileSizeError?: string;
11
+ fileCountError?: string;
12
+ }
13
+ export declare const FilledDropZone: FC<FilledDropZoneProps>;
14
+ export {};
@@ -7,6 +7,7 @@ export interface DialNotificationProps extends Omit<HTMLAttributes<HTMLDivElemen
7
7
  closable?: boolean;
8
8
  iconSize?: number;
9
9
  iconStroke?: number;
10
+ textClassName?: string;
10
11
  onClose?: (e: MouseEvent<HTMLButtonElement>) => void;
11
12
  }
12
13
  /**
@@ -18,25 +19,25 @@ export interface DialNotificationProps extends Omit<HTMLAttributes<HTMLDivElemen
18
19
  *
19
20
  * @example
20
21
  * ```tsx
21
- * <DialAlert
22
+ * <DialNotification
22
23
  * variant={NotificationVariant.Info}
23
24
  * message="This is an info alert."
24
25
  * />
25
26
  *
26
- * <DialAlert
27
+ * <DialNotification
27
28
  * variant={NotificationVariant.Success}
28
29
  * title="Saved"
29
30
  * message="Changes saved successfully."
30
31
  * />
31
32
  *
32
- * <DialAlert
33
+ * <DialNotification
33
34
  * variant={NotificationVariant.Error}
34
35
  * closable
35
36
  * message="Something went wrong."
36
37
  * onClose={(e) => console.log('closed', e)}
37
38
  * />
38
39
  *
39
- * <DialAlert
40
+ * <DialNotification
40
41
  * variant={NotificationVariant.Loading}
41
42
  * title="Processing"
42
43
  * message="Please wait..."
@@ -47,6 +48,7 @@ export interface DialNotificationProps extends Omit<HTMLAttributes<HTMLDivElemen
47
48
  * @param [title] - Optional heading displayed above the message in semibold
48
49
  * @param message - Message text to display inside the alert
49
50
  * @param [className] - Additional CSS classes applied to the alert container
51
+ * @param [textClassName] - Additional CSS classes applied to the message text
50
52
  * @param [closable=false] - Whether the alert has a close button
51
53
  * @param [iconSize=24] - Size of the icon displayed in the alert
52
54
  * @param [iconStroke=2] - Stroke width of the icon displayed in the alert
@@ -5,4 +5,4 @@ export declare const variantIcons: (props: {
5
5
  stroke: number;
6
6
  }) => Record<NotificationVariant, ReactNode>;
7
7
  export declare const notificationVariantClassNameMap: Record<NotificationVariant, string>;
8
- export declare const alertBaseClassName = "items-center justify-between gap-3 p-3 border border-solid dial-small-text-150 rounded shadow flex";
8
+ export declare const alertBaseClassName = "items-center justify-between relative gap-3 p-3 border border-solid dial-small-text-150 rounded shadow flex";
@@ -1,5 +1,9 @@
1
1
  export declare const MANY_PAGES_THRESHOLD = 7;
2
2
  export declare const ADJACENT_WINDOW = 2;
3
3
  export declare const getPageRange: (totalPages: number) => number[];
4
- export type PageDisplayType = 'active' | 'adjacent' | 'far';
4
+ export declare enum PageDisplayType {
5
+ Active = "active",
6
+ Adjacent = "adjacent",
7
+ Far = "far"
8
+ }
5
9
  export declare const getPageDisplayType: (p: number, currentPage: number, totalPages: number) => PageDisplayType;
@@ -2,6 +2,7 @@ import { FC } from 'react';
2
2
  import { ElementSize } from '../../types/size';
3
3
  import { DialInputProps } from '../Input/Input';
4
4
  export interface DialSearchProps extends Omit<DialInputProps, 'type' | 'size' | 'inputButtonProps' | 'labelProps' | 'iconBefore' | 'iconAfter' | 'prefix' | 'postfix' | 'onChange'> {
5
+ withoutBorder?: boolean;
5
6
  size?: ElementSize;
6
7
  onChange?: (value: string) => void;
7
8
  }
@@ -28,5 +29,6 @@ export interface DialSearchProps extends Omit<DialInputProps, 'type' | 'size' |
28
29
  * (like `iconBefore`, `iconAfter`, and `inputButtonProps` which are managed internally). The `size`
29
30
  * prop allows you to choose between predefined size configurations that adjust the input's appearance
30
31
  * @param [size=ElementSize.Standard] - The size of the search input. Uses the {@link ElementSize} enum.
32
+ * @param [withoutBorder] - If true, the search input will be rendered without a border.
31
33
  */
32
34
  export declare const DialSearch: FC<DialSearchProps>;
@@ -1,16 +1,8 @@
1
- export declare const SIZE_CONFIG: {
2
- small: {
3
- className: string;
4
- wrapperClassName: string;
5
- containerClassName: string;
6
- iconSize: number;
7
- iconStroke: number;
8
- };
9
- standard: {
10
- className: string;
11
- wrapperClassName: string;
12
- containerClassName: string;
13
- iconSize: number;
14
- iconStroke: number;
15
- };
16
- };
1
+ import { ElementSize } from '../../types/size';
2
+ export declare const SIZE_CONFIG: Record<ElementSize, {
3
+ className: string;
4
+ wrapperClassName: string;
5
+ containerClassName: string;
6
+ iconSize: number;
7
+ iconStroke: number;
8
+ }>;
@@ -18,6 +18,8 @@ export interface DialSkeletonProps extends HTMLAttributes<HTMLDivElement> {
18
18
  variant?: DialSkeletonVariant;
19
19
  width?: string | number;
20
20
  height?: string | number;
21
+ overlay?: ReactNode;
22
+ color?: string;
21
23
  }
22
24
  /**
23
25
  * DialSkeleton
@@ -74,5 +76,7 @@ export interface DialSkeletonProps extends HTMLAttributes<HTMLDivElement> {
74
76
  * @param [width] - Width of the skeleton
75
77
  * @param [height] - Height of the skeleton
76
78
  * @param [className] - Additional CSS classes
79
+ * @param [overlay] - Content to overlay on top of the skeleton (e.g., a spinner)
80
+ * @param [color] - Custom background color for the skeleton elements (overrides the default token)
77
81
  */
78
82
  export declare const DialSkeleton: FC<DialSkeletonProps>;
@@ -0,0 +1,53 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ export interface DialSliderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
3
+ value: number;
4
+ min?: number;
5
+ max?: number;
6
+ step?: number;
7
+ disabled?: boolean;
8
+ /** 2-element or 3-element label tuple rendered below the track */
9
+ labels?: [string, string] | [string, string, string];
10
+ /** Custom formatter for the thumb value; defaults to fixed-decimal based on step */
11
+ formatValue?: (value: number) => string;
12
+ onChange?: (value: number) => void;
13
+ /** Additional classes for the track bar (default: `bg-layer-1`) */
14
+ trackClassName?: string;
15
+ /** Additional classes for the filled portion of the track (default: `bg-controls-accent-primary`) */
16
+ fillClassName?: string;
17
+ /** Additional classes for the thumb circle (default: `bg-layer-3 text-primary dial-small-text`) */
18
+ thumbClassName?: string;
19
+ /** Additional classes for the labels row (default: `text-secondary dial-tiny-text`) */
20
+ labelsClassName?: string;
21
+ }
22
+ /**
23
+ * A range slider with a custom thumb showing the current value and optional labels.
24
+ * aliases: RangeInput|TemperatureSlider
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <DialSlider
29
+ * value={0.5}
30
+ * min={0}
31
+ * max={1}
32
+ * step={0.1}
33
+ * labels={['Precise', 'Neutral', 'Creative']}
34
+ * aria-label="Temperature"
35
+ * onChange={(v) => console.log(v)}
36
+ * />
37
+ * ```
38
+ *
39
+ * @param value - Current slider value
40
+ * @param [min=0] - Minimum value
41
+ * @param [max=1] - Maximum value
42
+ * @param [step=0.1] - Step increment
43
+ * @param [disabled=false] - Disables interaction
44
+ * @param [labels] - 2 or 3 strings rendered below the track (start, [middle,] end)
45
+ * @param [formatValue] - Custom value formatter for the thumb display
46
+ * @param [onChange] - Callback fired with the new value on interaction
47
+ * @param [className] - Additional CSS classes for the outer container
48
+ * @param [trackClassName] - Additional CSS classes for the track bar
49
+ * @param [fillClassName] - Additional CSS classes for the fill portion of the track
50
+ * @param [thumbClassName] - Additional CSS classes for the thumb circle
51
+ * @param [labelsClassName] - Additional CSS classes for the labels row
52
+ */
53
+ export declare const DialSlider: FC<DialSliderProps>;
@@ -1,34 +1,24 @@
1
- import { TagVariant } from '../../types/tag';
2
1
  import { FC, MouseEvent, ReactNode } from 'react';
2
+ /**
3
+ * Props for the `DialTag` component.
4
+ */
3
5
  export interface DialTagProps {
4
- tag: string;
6
+ /** Text content displayed inside the tag. */
7
+ label: string;
8
+ /** Additional CSS classes applied to the root container. */
5
9
  className?: string;
6
- remove?: (event: MouseEvent<HTMLButtonElement>) => void;
7
- variant?: TagVariant;
8
- iconBefore?: ReactNode;
9
- bordered?: boolean;
10
+ /** Applies selected visual styles when `true`. */
11
+ selected?: boolean;
12
+ /** Optional icon rendered before the label. */
13
+ icon?: ReactNode;
14
+ /** Enables rendering of the remove button. */
15
+ closable?: boolean;
16
+ /** Fired when the tag container is clicked. */
17
+ onClick?: (event: MouseEvent<HTMLDivElement>) => void;
18
+ /** Fired when the remove button is clicked. */
19
+ onRemove?: (event: MouseEvent<HTMLButtonElement>) => void;
10
20
  }
11
21
  /**
12
- * A small tag component used to display labeled items such as categories, filters, or selections.
13
- * aliases: Badge|Chip
14
- *
15
- * Optionally supports removal via a close button and multiple colors variants defined by {@link TagVariant}.
16
- *
17
- * @example
18
- * ```tsx
19
- * <DialTag
20
- * tag="React"
21
- * variant={TagVariant.Default}
22
- * remove={() => console.log('Tag removed')}
23
- * />
24
- * ```
25
- *
26
- * @param tag - The text label displayed inside the tag.
27
- * @param [className] - Optional additional CSS classes applied to the tag container.
28
- * @param [remove] - Optional callback invoked when the remove button is clicked.
29
- * If not provided, the remove button will not be rendered.
30
- * @param [variant=TagVariant.Default] - Visual style of the tag. Uses the {@link TagVariant} enum.
31
- * @param [iconBefore] - Optional icon or element to display before the tag text.
32
- * @param [bordered=true] - When true, adds a border to the tag for better visibility on light backgrounds.
22
+ * A compact label element used for selections, filters, or categories.
33
23
  */
34
24
  export declare const DialTag: FC<DialTagProps>;
@@ -1,4 +1,8 @@
1
1
  import { RefObject } from 'react';
2
+ export declare const EDITABLE_CONTAINER_ATTRIBUTE = "data-editable-container";
3
+ export declare const editableContainerProps: {
4
+ readonly "data-editable-container": "";
5
+ };
2
6
  export interface UseEditableItemOptions {
3
7
  value: string;
4
8
  isEditing: boolean;
@@ -13,6 +13,8 @@ export { DialCheckbox } from './components/Checkbox/Checkbox';
13
13
  export { DialSteps } from './components/Steps/Steps';
14
14
  export { DialRadioButton } from './components/RadioButton/RadioButton';
15
15
  export { DialRadioGroup } from './components/RadioGroup/RadioGroup';
16
+ export { DialSlider } from './components/Slider/Slider';
17
+ export type { DialSliderProps } from './components/Slider/Slider';
16
18
  export { DialNoDataContent } from './components/NoDataContent/NoDataContent';
17
19
  export type { DialNoDataContentProps } from './components/NoDataContent/NoDataContent';
18
20
  export { DialCollapsibleSidebar } from './components/CollapsibleSidebar/CollapsibleSidebar';
@@ -77,7 +79,6 @@ export { PopupSize } from './types/popup';
77
79
  export { ConfirmationPopupVariant } from './types/confirmation-popup';
78
80
  export { DropdownType, DropdownTrigger, DropdownItemType, } from './types/dropdown';
79
81
  export { ElementSize } from './types/size';
80
- export { TagVariant } from './types/tag';
81
82
  export { TabOrientation } from './types/tab';
82
83
  export type { DialBreadcrumbPathItem } from './models/breadcrumb';
83
84
  export { FormItemOrientation } from './types/form-item';
@@ -1,4 +1,5 @@
1
1
  export declare enum ElementSize {
2
2
  Small = "small",
3
- Standard = "standard"
3
+ Standard = "standard",
4
+ Large = "large"
4
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.11.0-dev.8",
3
+ "version": "0.11.1",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",
@@ -69,7 +69,9 @@
69
69
  },
70
70
  "overrides": {
71
71
  "lodash": "4.18.1",
72
- "dompurify": "3.4.1"
72
+ "dompurify": "3.4.10",
73
+ "shell-quote": "1.8.4",
74
+ "esbuild": "0.28.1"
73
75
  },
74
76
  "dependencies": {
75
77
  "ag-grid-community": "^35.2.1",
@@ -98,13 +100,13 @@
98
100
  }
99
101
  },
100
102
  "devDependencies": {
101
- "@chromatic-com/storybook": "^5.1.2",
103
+ "@chromatic-com/storybook": "^5.2.1",
102
104
  "@eslint/js": "^9.39.2",
103
105
  "@modelcontextprotocol/sdk": "^1.29.0",
104
- "@storybook/addon-a11y": "^10.3.6",
105
- "@storybook/addon-docs": "^10.3.6",
106
- "@storybook/addon-vitest": "^10.3.6",
107
- "@storybook/react-vite": "^10.3.6",
106
+ "@storybook/addon-a11y": "^10.4.4",
107
+ "@storybook/addon-docs": "^10.4.4",
108
+ "@storybook/addon-vitest": "^10.4.4",
109
+ "@storybook/react-vite": "^10.4.4",
108
110
  "@testing-library/dom": "^10.4.1",
109
111
  "@testing-library/react": "^16.3.0",
110
112
  "@types/jsdom": "^28.0.1",
@@ -113,11 +115,11 @@
113
115
  "@types/react": "^19.2.14",
114
116
  "@types/react-dom": "^19.2.3",
115
117
  "@vitejs/plugin-react": "^4.6.0",
116
- "@vitest/browser": "^3.2.4",
117
- "@vitest/coverage-v8": "^3.2.4",
118
+ "@vitest/browser": "^4.1.8",
119
+ "@vitest/coverage-v8": "^4.1.8",
118
120
  "autoprefixer": "^10.5.0",
119
- "concurrently": "^9.2.1",
120
- "esbuild": "^0.25.9",
121
+ "concurrently": "^10.0.3",
122
+ "esbuild": "0.28.1",
121
123
  "eslint": "^9.39.2",
122
124
  "eslint-config-prettier": "^10.1.8",
123
125
  "eslint-plugin-import": "^2.32.0",
@@ -125,7 +127,7 @@
125
127
  "eslint-plugin-prettier": "^5.5.5",
126
128
  "eslint-plugin-react": "^7.37.5",
127
129
  "eslint-plugin-react-hooks": "^7.1.1",
128
- "eslint-plugin-storybook": "^10.2.17",
130
+ "eslint-plugin-storybook": "^10.4.4",
129
131
  "eslint-plugin-tailwindcss": "^3.18.3",
130
132
  "globals": "^16.3.0",
131
133
  "husky": "^9.1.7",
@@ -136,8 +138,8 @@
136
138
  "prettier": "^3.8.3",
137
139
  "sass": "^1.99.0",
138
140
  "sass-embedded": "^1.99.0",
139
- "storybook": "^10.3.6",
140
- "storybook-addon-pseudo-states": "^10.3.6",
141
+ "storybook": "^10.4.4",
142
+ "storybook-addon-pseudo-states": "^10.4.4",
141
143
  "tailwindcss": "^3.4.19",
142
144
  "tsx": "^4.20.5",
143
145
  "typescript": "~5.9.3",
@@ -145,6 +147,6 @@
145
147
  "vite": "^7.1.5",
146
148
  "vite-plugin-dts": "^4.5.4",
147
149
  "vite-plugin-svgr": "^4.5.0",
148
- "vitest": "^3.2.4"
150
+ "vitest": "^4.1.8"
149
151
  }
150
152
  }