@epam/ai-dial-ui-kit 0.3.0-rc.8 → 0.3.0

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 (72) hide show
  1. package/dist/dial-ui-kit.cjs.js +2 -1
  2. package/dist/dial-ui-kit.es.js +5796 -2050
  3. package/dist/index.css +2 -2
  4. package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +41 -0
  5. package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +13 -0
  6. package/dist/src/components/Breadcrumb/constants.d.ts +9 -0
  7. package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +23 -0
  8. package/dist/src/components/ButtonDropdown/constants.d.ts +2 -0
  9. package/dist/src/components/Checkbox/Checkbox.d.ts +3 -1
  10. package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +2 -2
  11. package/dist/src/components/ConfirmationPopup/constants.d.ts +1 -0
  12. package/dist/src/components/DraggableItem/DraggableItem.d.ts +31 -0
  13. package/dist/src/components/DraggableItem/constants.d.ts +3 -0
  14. package/dist/src/components/Dropdown/Dropdown.d.ts +8 -0
  15. package/dist/src/components/Dropdown/constants.d.ts +1 -1
  16. package/dist/src/components/EllipsisTooltip/EllipsisTooltip.d.ts +31 -0
  17. package/dist/src/components/EllipsisTooltip/constants.d.ts +1 -0
  18. package/dist/src/components/Field/Field.d.ts +4 -2
  19. package/dist/src/components/FileIcon/FileIcon.d.ts +31 -0
  20. package/dist/src/components/FileIcon/constants.d.ts +9 -0
  21. package/dist/src/components/FileManagerNavigationPanel/FileManagerNavigationPanel.d.ts +58 -0
  22. package/dist/src/components/FileManagerNavigationPanel/constants.d.ts +3 -0
  23. package/dist/src/components/FileName/FileName.d.ts +20 -0
  24. package/dist/src/components/FolderName/FolderName.d.ts +21 -0
  25. package/dist/src/components/FoldersTree/FoldersTree.d.ts +92 -0
  26. package/dist/src/components/FoldersTree/constants.d.ts +5 -0
  27. package/dist/src/components/FormItem/FormItem.d.ts +64 -0
  28. package/dist/src/components/FormItem/constants.d.ts +3 -0
  29. package/dist/src/components/FormPopup/FormPopup.d.ts +44 -0
  30. package/dist/src/components/FormPopup/constants.d.ts +3 -0
  31. package/dist/src/components/Grid/Grid.d.ts +90 -0
  32. package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +3 -0
  33. package/dist/src/components/Grid/constants.d.ts +26 -0
  34. package/dist/src/components/Grid/hooks/use-grid-selection.d.ts +12 -0
  35. package/dist/src/components/Icon/Icon.d.ts +1 -0
  36. package/dist/src/components/Input/Input.d.ts +18 -24
  37. package/dist/src/components/InputField/InputField.d.ts +23 -47
  38. package/dist/src/components/JsonEditor/JsonEditor.d.ts +2 -2
  39. package/dist/src/components/LoadFileArea/EmptyFileArea.d.ts +52 -0
  40. package/dist/src/components/LoadFileArea/FilledInput.d.ts +30 -0
  41. package/dist/src/components/LoadFileArea/LoadFileArea.d.ts +46 -0
  42. package/dist/src/components/LoadFileArea/LoadFileAreaField.d.ts +51 -0
  43. package/dist/src/components/PasswordInput/PasswordInputField.d.ts +1 -1
  44. package/dist/src/components/RadioGroup/RadioGroup.d.ts +19 -4
  45. package/dist/src/components/RemoveButton/RemoveButton.d.ts +24 -0
  46. package/dist/src/components/Select/MultiSelectTags.d.ts +8 -0
  47. package/dist/src/components/Select/Select.d.ts +61 -0
  48. package/dist/src/components/Select/constants.d.ts +8 -0
  49. package/dist/src/components/SelectField/SelectField.d.ts +35 -0
  50. package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +25 -0
  51. package/dist/src/components/Tab/Tab.d.ts +35 -0
  52. package/dist/src/components/Tabs/Tabs.d.ts +46 -0
  53. package/dist/src/components/Tabs/constants.d.ts +1 -0
  54. package/dist/src/components/Tag/Tag.d.ts +4 -1
  55. package/dist/src/components/TextAreaField/TextAreaField.d.ts +4 -2
  56. package/dist/src/components/Textarea/Textarea.d.ts +4 -0
  57. package/dist/src/components/Tooltip/TooltipContext.d.ts +4 -4
  58. package/dist/src/constants/storybook/form-item.d.ts +3 -0
  59. package/dist/src/constants/storybook/input.d.ts +5 -0
  60. package/dist/src/hooks/use-is-tablet-screen.d.ts +15 -0
  61. package/dist/src/index.d.ts +28 -0
  62. package/dist/src/models/base-entity.d.ts +4 -0
  63. package/dist/src/models/breadcrumb.d.ts +9 -0
  64. package/dist/src/models/field-control-props.d.ts +34 -2
  65. package/dist/src/models/file.d.ts +35 -0
  66. package/dist/src/models/select.d.ts +7 -0
  67. package/dist/src/models/tab.d.ts +5 -0
  68. package/dist/src/types/form-item.d.ts +33 -0
  69. package/dist/src/types/tab.d.ts +4 -0
  70. package/dist/src/utils/merge-classes.d.ts +3 -0
  71. package/dist/src/utils/mobile.d.ts +14 -0
  72. package/package.json +14 -10
@@ -1,21 +1,53 @@
1
1
  import { ReactNode } from 'react';
2
+ /**
3
+ * Base properties for field controls providing label and optional status
4
+ *
5
+ * @param fieldTitle - The label text to display above the input field
6
+ * @param optional - Whether the field is optional (displays "(Optional)" indicator when true)
7
+ */
2
8
  export interface FieldControlProps {
3
9
  fieldTitle?: string;
4
10
  optional?: boolean;
5
11
  }
12
+ /**
13
+ * Base properties for input elements providing core input functionality
14
+ *
15
+ * @param elementId - Unique identifier for the input element
16
+ * @param value - The current value of the input (string, number, or null)
17
+ * @param defaultValue - The default value for the input
18
+ * @param placeholder - Placeholder text shown when input is empty
19
+ * @param disabled - Whether the input is disabled and cannot be interacted with
20
+ * @param readonly - Whether the input is read-only (displays value as text, no input element)
21
+ * @param invalid - Whether the input has validation errors (applies error styling)
22
+ * @param iconAfter - Icon or element to display after the input
23
+ * @param iconBefore - Icon or element to display before the input
24
+ * @param textBeforeInput - Text to display before the input
25
+ * @param textAfterInput - Text to display after the input
26
+ * @param prefix - Text to display inside the input on the left
27
+ * @param suffix - Text to display inside the input on the right
28
+ */
6
29
  export interface InputBaseProps {
7
30
  elementId: string;
8
31
  value?: string | number | null;
32
+ defaultValue?: string | number;
9
33
  placeholder?: string;
10
34
  disabled?: boolean;
11
35
  readonly?: boolean;
12
36
  invalid?: boolean;
13
37
  iconAfter?: ReactNode;
14
38
  iconBefore?: ReactNode;
15
- min?: number;
16
- max?: number;
17
39
  textBeforeInput?: string;
18
40
  textAfterInput?: string;
19
41
  prefix?: string;
20
42
  suffix?: string;
21
43
  }
44
+ /**
45
+ * Properties specific to numeric input controls for validation and formatting
46
+ *
47
+ * @param min - Minimum allowed value for the number input
48
+ * @param max - Maximum allowed value for the number input
49
+ */
50
+ export interface NumberInputBaseProps {
51
+ min?: number;
52
+ max?: number;
53
+ }
@@ -0,0 +1,35 @@
1
+ import { DialModifiedEntity } from './base-entity';
2
+ export interface DialFile extends DialModifiedEntity {
3
+ bucket?: string;
4
+ contentLength?: number;
5
+ contentType?: string;
6
+ nodeType: DialFileNodeType;
7
+ parentPath?: string | null;
8
+ resourceType?: DialFileResourceType;
9
+ url?: string;
10
+ items?: DialFile[];
11
+ path: string;
12
+ name: string;
13
+ folderId: string;
14
+ author?: string;
15
+ nextToken?: string;
16
+ extension?: string;
17
+ id?: string;
18
+ permissions?: DialFilePermission[];
19
+ }
20
+ export declare enum DialFileNodeType {
21
+ ITEM = "item",
22
+ FOLDER = "folder"
23
+ }
24
+ export declare enum DialFileResourceType {
25
+ FILE = "FILE",
26
+ PROMPT = "PROMPT",
27
+ CONVERSATION = "CONVERSATION",
28
+ APPLICATION = "APPLICATION",
29
+ TOOLSET = "TOOL_SET"
30
+ }
31
+ export declare enum DialFilePermission {
32
+ READ = "READ",
33
+ WRITE = "WRITE",
34
+ SHARE = "SHARE"
35
+ }
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SelectOption {
3
+ value: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ icon?: ReactNode;
7
+ }
@@ -0,0 +1,5 @@
1
+ export interface TabModel {
2
+ id: string;
3
+ name: string;
4
+ invalid?: boolean;
5
+ }
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Orientation options for form item layout
4
+ *
5
+ * @param Vertical - Vertical layout with label above the input
6
+ * @param Horizontal - Horizontal layout with label beside the input
7
+ */
8
+ export declare enum FormItemOrientation {
9
+ Vertical = "vertical",
10
+ Horizontal = "horizontal"
11
+ }
12
+ /**
13
+ * Base properties for form item components providing layout, labeling, and validation display
14
+ *
15
+ * @param label - The label text or element to display for the form item
16
+ * @param optional - Whether the field is optional (displays optional indicator)
17
+ * @param optionalText - Custom text to display for optional fields (default: "(Optional)")
18
+ * @param description - Description text to display below the label
19
+ * @param error - Error message, element, or boolean indicating validation state
20
+ * @param captionDescription - Additional caption or description text
21
+ * @param readonly - Whether the form item is in read-only mode
22
+ * @param orientation - Layout orientation for the form item
23
+ */
24
+ export interface DialFormItemBaseProps {
25
+ label?: string | ReactNode;
26
+ optional?: boolean;
27
+ optionalText?: string;
28
+ description?: string;
29
+ error?: string | ReactNode | boolean;
30
+ captionDescription?: string;
31
+ readonly?: boolean;
32
+ orientation?: FormItemOrientation;
33
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum TabOrientation {
2
+ Horizontal = "horizontal",
3
+ Vertical = "vertical"
4
+ }
@@ -0,0 +1,3 @@
1
+ import { default as classNames } from 'classnames';
2
+ /** Merge class names (classnames → tailwind-merge). */
3
+ export declare function mergeClasses(...inputs: Parameters<typeof classNames>): string;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Checks if the current viewport width is within the "medium" (tablet) screen range.
3
+ *
4
+ * Specifically, it returns `true` if the window width is less than 1024 pixels.
5
+ * Safely handles server-side rendering by verifying that `window` is defined.
6
+ *
7
+ * @returns {boolean} `true` if the viewport width is less than 1024px, otherwise `false`.
8
+ *
9
+ * @example
10
+ * if (isMediumScreen()) {
11
+ * console.log('Tablet or smaller screen detected');
12
+ * }
13
+ */
14
+ export declare const isMediumScreen: () => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.3.0-rc.8",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",
@@ -37,9 +37,9 @@
37
37
  "format": "prettier --check .",
38
38
  "format-fix": "prettier --write .",
39
39
  "preview": "vite preview",
40
- "storybook": "concurrently 'npm run storybook:css' 'storybook dev -p 6006'",
40
+ "storybook": "concurrently \"npm run storybook:css\" \"storybook dev -p 6006\"",
41
41
  "storybook:css": "tailwindcss -w -i ./src/styles/tailwind-entry.scss -o ./src/index.css",
42
- "build-storybook": "concurrently 'npm run build-storybook:css' 'storybook build'",
42
+ "build-storybook": "concurrently \"npm run build-storybook:css\" \"storybook build\"",
43
43
  "build-storybook:css": "tailwindcss -m -i ./src/styles/tailwind-entry.scss -o ./src/index.css",
44
44
  "prepare": "husky",
45
45
  "publish": "node tools/publish-lib.mjs",
@@ -57,6 +57,10 @@
57
57
  "esbuild": "0.25.9"
58
58
  },
59
59
  "dependencies": {
60
+ "ag-grid-community": "^34.3.0",
61
+ "ag-grid-react": "^34.3.0",
62
+ "react-dnd": "^16.0.1",
63
+ "react-dnd-html5-backend": "^16.0.1",
60
64
  "tailwind-merge": "^3.3.1"
61
65
  },
62
66
  "peerDependencies": {
@@ -73,10 +77,10 @@
73
77
  "@eslint/compat": "^1.3.1",
74
78
  "@eslint/eslintrc": "^3.3.1",
75
79
  "@eslint/js": "^9.31.0",
76
- "@storybook/addon-a11y": "^9.1.10",
77
- "@storybook/addon-docs": "^9.1.10",
78
- "@storybook/addon-vitest": "^9.1.10",
79
- "@storybook/react-vite": "^9.1.10",
80
+ "@storybook/addon-a11y": "^9.1.13",
81
+ "@storybook/addon-docs": "^9.1.13",
82
+ "@storybook/addon-vitest": "^9.1.13",
83
+ "@storybook/react-vite": "^9.1.13",
80
84
  "@testing-library/dom": "^10.4.0",
81
85
  "@testing-library/react": "^16.3.0",
82
86
  "@types/jsdom": "^21.1.7",
@@ -95,7 +99,7 @@
95
99
  "eslint-plugin-react": "7.37.5",
96
100
  "eslint-plugin-react-hooks": "^5.2.0",
97
101
  "eslint-plugin-react-refresh": "^0.4.20",
98
- "eslint-plugin-storybook": "^9.1.10",
102
+ "eslint-plugin-storybook": "^9.1.13",
99
103
  "eslint-plugin-tailwindcss": "^3.18.2",
100
104
  "globals": "^16.3.0",
101
105
  "husky": "^9.1.7",
@@ -106,8 +110,8 @@
106
110
  "prettier": "3.6.2",
107
111
  "sass": "^1.89.2",
108
112
  "sass-embedded": "^1.89.2",
109
- "storybook": "^9.1.10",
110
- "storybook-addon-pseudo-states": "^9.1.10",
113
+ "storybook": "^9.1.13",
114
+ "storybook-addon-pseudo-states": "^9.1.13",
111
115
  "tailwindcss": "^3.4.17",
112
116
  "typescript": "~5.8.3",
113
117
  "typescript-eslint": "^8.35.1",