@epam/ai-dial-ui-kit 0.10.0-dev.5 → 0.10.0-dev.51

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 (54) hide show
  1. package/dist/JsonEditor-YH9ZPKw-.cjs +1 -0
  2. package/dist/JsonEditor-v2s0mWhr.js +111 -0
  3. package/dist/MarkdownEditor-BFHNvv8r.cjs +1 -0
  4. package/dist/MarkdownEditor-DKoiHXsk.js +22 -0
  5. package/dist/components-manifest.json +272 -60
  6. package/dist/dial-ui-kit.cjs.js +1 -71
  7. package/dist/dial-ui-kit.es.js +124 -60530
  8. package/dist/editor-Ba3vCFHk.cjs +1 -0
  9. package/dist/editor-Cu1dRT39.js +4 -0
  10. package/dist/index-BvcK6KjC.js +61261 -0
  11. package/dist/index-CB7yYrTR.cjs +71 -0
  12. package/dist/index.css +2 -2
  13. package/dist/mcp-server.cjs +9 -0
  14. package/dist/src/components/Alert/Alert.d.ts +8 -6
  15. package/dist/src/components/Alert/constants.d.ts +1 -1
  16. package/dist/src/components/Button/ButtonWrappers.d.ts +15 -0
  17. package/dist/src/components/Dropdown/Dropdown.d.ts +0 -47
  18. package/dist/src/components/Dropdown/DropdownSubMenuItem.d.ts +8 -0
  19. package/dist/src/components/FileManager/FileManager.d.ts +0 -4
  20. package/dist/src/components/FileManager/FileManagerContext.d.ts +6 -2
  21. package/dist/src/components/FileManager/FileManagerTooltip.d.ts +3 -2
  22. package/dist/src/components/FileManager/components/FileManagerItemName/FileManagerItemName.d.ts +3 -0
  23. package/dist/src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.d.ts +2 -2
  24. package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +8 -0
  25. package/dist/src/components/FileManager/components/FoldersTree/constants.d.ts +1 -0
  26. package/dist/src/components/FileManager/constants.d.ts +1 -0
  27. package/dist/src/components/FileManager/hooks/use-file-manager-columns.d.ts +1 -0
  28. package/dist/src/components/FileManager/hooks/use-folder-creation.d.ts +8 -1
  29. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +3 -3
  30. package/dist/src/components/FileManager/hooks/use-trigger-view-create-folder.d.ts +26 -0
  31. package/dist/src/components/FileManager/utils.d.ts +7 -1
  32. package/dist/src/components/FormItem/constants.d.ts +1 -1
  33. package/dist/src/components/Pagination/Pagination.d.ts +8 -0
  34. package/dist/src/components/Pagination/utils.d.ts +5 -0
  35. package/dist/src/components/ProgressBar/ProgressBar.d.ts +13 -0
  36. package/dist/src/components/SchemaRenderer/components/SchemaField.d.ts +1 -0
  37. package/dist/src/components/SchemaRenderer/components/SchemaObjectEditor.d.ts +1 -1
  38. package/dist/src/components/SchemaRenderer/context.d.ts +1 -0
  39. package/dist/src/components/SchemaRenderer/types.d.ts +9 -1
  40. package/dist/src/components/SchemaRenderer/utils.d.ts +1 -0
  41. package/dist/src/components/Select/SelectSubMenuItem.d.ts +8 -0
  42. package/dist/src/components/Select/constants.d.ts +1 -0
  43. package/dist/src/components/Spinner/Spinner.d.ts +8 -0
  44. package/dist/src/hooks/use-editable-item.d.ts +5 -1
  45. package/dist/src/index.d.ts +10 -1
  46. package/dist/src/mcp/types.d.ts +7 -0
  47. package/dist/src/models/dropdown.d.ts +1 -0
  48. package/dist/src/models/select.d.ts +1 -0
  49. package/dist/src/types/alert.d.ts +2 -1
  50. package/dist/src/types/file-manager.d.ts +9 -0
  51. package/dist/src/utils/mobile.d.ts +2 -2
  52. package/dist/src/utils/sub-menu-floating.d.ts +51 -0
  53. package/package.json +5 -5
  54. /package/dist/{.cursor/hooks/post-write-verify.d.ts → src/components/Pagination/tests/utils.spec.d.ts} +0 -0
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ export declare enum DialProgressBarSize {
3
+ Small = "sm",
4
+ Medium = "md"
5
+ }
6
+ export interface DialProgressBarProps {
7
+ value: number;
8
+ max?: number;
9
+ size?: DialProgressBarSize;
10
+ className?: string;
11
+ ariaLabel?: string;
12
+ }
13
+ export declare const DialProgressBar: FC<DialProgressBarProps>;
@@ -24,5 +24,6 @@ import { SchemaFieldProps } from '../types';
24
24
  * @param [level=0] - Nesting depth; object/array fields render as collapsible sections
25
25
  * @param [required] - Whether the field is required (shows error when empty)
26
26
  * @param [label] - Display label; falls back to schema title or path segment
27
+ * @param [skipUntouched] - When `true`, required-field errors are only shown after the user has interacted with a field.
27
28
  */
28
29
  export declare const SchemaField: FC<SchemaFieldProps>;
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
1
  import { JsonSchemaDef } from '../types';
2
+ import { FC } from 'react';
3
3
  export interface SchemaObjectEditorProps {
4
4
  schema: JsonSchemaDef;
5
5
  value: unknown;
@@ -9,6 +9,7 @@ interface SchemaRendererContextValue {
9
9
  renderField?: (path: string[], schema: JsonSchemaDef, defaultElement: React.ReactElement) => React.ReactNode;
10
10
  touchedPaths?: ReadonlySet<string>;
11
11
  markTouched?: (path: string) => void;
12
+ skipUntouched?: boolean;
12
13
  }
13
14
  export declare const SchemaRendererContext: React.Context<SchemaRendererContextValue | null>;
14
15
  export declare function useSchemaContext(): SchemaRendererContextValue;
@@ -1,7 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  export declare enum SchemaRendererVariant {
3
3
  Sections = "sections",
4
- Flat = "flat"
4
+ Flat = "flat",
5
+ FlatSections = "flat-sections"
5
6
  }
6
7
  export declare enum SchemaDisplayMode {
7
8
  Select = "select",
@@ -25,6 +26,7 @@ export interface JsonSchemaDef {
25
26
  type?: string | string[];
26
27
  title?: string;
27
28
  description?: string;
29
+ isHidden?: boolean;
28
30
  isProtected?: boolean;
29
31
  enumDisplay?: SchemaDisplayMode;
30
32
  enumOrientation?: SchemaOrientation;
@@ -87,6 +89,11 @@ export interface DialSchemaRendererProps {
87
89
  * properties still use collapsible sections.
88
90
  */
89
91
  variant?: SchemaRendererVariant;
92
+ /**
93
+ * When `true`, required-field errors are only shown after the user has interacted
94
+ * with a field. When `false` (default), all unfilled required fields are highlighted immediately.
95
+ */
96
+ skipUntouched?: boolean;
90
97
  onChange?: (value: Record<string, unknown>) => void;
91
98
  onPropertyChange?: (path: string, value: unknown) => void;
92
99
  onDefaultValues?: (value: Record<string, unknown>) => void;
@@ -106,6 +113,7 @@ export interface SchemaFieldContentProps {
106
113
  path: string[];
107
114
  level: number;
108
115
  required?: boolean;
116
+ suppressInlineError?: boolean;
109
117
  }
110
118
  export interface SchemaFieldProps extends SchemaFieldContentProps {
111
119
  label?: string;
@@ -1,5 +1,6 @@
1
1
  import { JsonSchema, JsonSchemaDef, ValidationError } from './types';
2
2
  export declare function resolveRef(schema: JsonSchemaDef, rootSchema: JsonSchema, depth?: number): JsonSchemaDef;
3
+ export declare function isMissingRequiredValue(value: unknown): boolean;
3
4
  export declare function isObjectType(schema: JsonSchemaDef): boolean;
4
5
  export declare function toFieldLabel(key: string): string;
5
6
  export declare function getOptionLabel(schema: JsonSchemaDef, rootSchema: JsonSchema): string;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { SelectOption } from '../../models/select';
3
+ export interface SelectSubMenuItemProps {
4
+ opt: SelectOption;
5
+ selectedValues: string[];
6
+ onSelect: (value: string) => void;
7
+ }
8
+ export declare const SelectSubMenuItem: FC<SelectSubMenuItemProps>;
@@ -5,4 +5,5 @@ export declare const selectOptionSelectedClassName = "bg-accent-primary-alpha";
5
5
  export declare const selectOptionSingleSelectedClassName = "bg-accent-primary-alpha border-l border-accent-primary border-1";
6
6
  export declare const selectOptionDisabledClassName = "opacity-75";
7
7
  export declare const dropdownMenuMaxHeight = 352;
8
+ export declare const selectSubMenuGap = 4;
8
9
  export declare const selectChevronIcon: import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ export interface DialSpinnerProps {
3
+ size?: number;
4
+ className?: string;
5
+ fullWidth?: boolean;
6
+ ariaLabel?: string;
7
+ }
8
+ export declare const DialSpinner: FC<DialSpinnerProps>;
@@ -2,10 +2,14 @@ import { RefObject } from 'react';
2
2
  export interface UseEditableItemOptions {
3
3
  value: string;
4
4
  isEditing: boolean;
5
+ isCreating?: boolean;
6
+ isLoading?: boolean;
5
7
  onValidate?: (value: string) => string | null;
6
8
  onSave?: (value: string) => void;
7
9
  onCancel?: () => void;
8
10
  restoreOnCancel?: boolean;
11
+ onCreateFolderSave?: (value: string) => void;
12
+ onCreateFolderCancel?: () => void;
9
13
  }
10
14
  interface UseEditableItemResult {
11
15
  inputRef: RefObject<HTMLInputElement | null>;
@@ -61,5 +65,5 @@ interface UseEditableItemResult {
61
65
  * );
62
66
  * ```
63
67
  */
64
- export declare function useEditableItem({ value: initialValue, isEditing, restoreOnCancel, onValidate, onSave, onCancel, }: UseEditableItemOptions): UseEditableItemResult;
68
+ export declare function useEditableItem({ value: initialValue, isEditing, isCreating, isLoading, restoreOnCancel, onValidate, onSave, onCancel, onCreateFolderSave, onCreateFolderCancel, }: UseEditableItemOptions): UseEditableItemResult;
65
69
  export {};
@@ -3,6 +3,12 @@ export { DialLabel } from './components/Label/Label';
3
3
  export { DialIcon } from './components/Icon/Icon';
4
4
  export { DialAlert } from './components/Alert/Alert';
5
5
  export { DialLoader } from './components/Loader/Loader';
6
+ export { DialSpinner } from './components/Spinner/Spinner';
7
+ export type { DialSpinnerProps } from './components/Spinner/Spinner';
8
+ export { DialProgressBar, DialProgressBarSize, } from './components/ProgressBar/ProgressBar';
9
+ export type { DialProgressBarProps } from './components/ProgressBar/ProgressBar';
10
+ export { DialPagination } from './components/Pagination/Pagination';
11
+ export type { DialPaginationProps } from './components/Pagination/Pagination';
6
12
  export { DialCheckbox } from './components/Checkbox/Checkbox';
7
13
  export { DialSteps } from './components/Steps/Steps';
8
14
  export { DialRadioButton } from './components/RadioButton/RadioButton';
@@ -29,7 +35,8 @@ export { DialBreadcrumbItem } from './components/Breadcrumb/BreadcrumbItem';
29
35
  export { DialButton } from './components/Button/Button';
30
36
  export { DialIconButton } from './components/IconButton/IconButton';
31
37
  export type { DialIconButtonProps } from './components/IconButton/IconButton';
32
- export { DialErrorButton, DialNeutralButton, DialPrimaryButton, DialGhostButton, DialLinkButton, } from './components/Button/ButtonWrappers';
38
+ export { DialErrorButton, DialNeutralButton, DialPrimaryButton, DialGhostButton, DialLinkButton, DialRoundedButton, } from './components/Button/ButtonWrappers';
39
+ export type { DialRoundedButtonProps } from './components/Button/ButtonWrappers';
33
40
  export { DialErrorIconButton, DialGhostIconButton, DialNeutralIconButton, DialPrimaryIconButton, DialSecondaryIconButton, DialSuccessIconButton, DialTertiaryIconButton, } from './components/IconButton/IconButtonWrappers';
34
41
  export { DialCloseButton } from './components/CloseButton/CloseButton';
35
42
  export { DialRemoveButton } from './components/RemoveButton/RemoveButton';
@@ -100,3 +107,5 @@ export { NOT_ALLOWED_SYMBOLS, NOT_ALLOWED_SPACES, NOT_ALLOWED_SYMBOLS_REGEXP, NO
100
107
  export { DialSchemaRenderer } from './components/SchemaRenderer/SchemaRenderer';
101
108
  export { SchemaRendererVariant, SchemaDisplayMode, SchemaOrientation, JsonSchemaType, } from './components/SchemaRenderer/types';
102
109
  export type { DialSchemaRendererProps, JsonSchema, JsonSchemaDef, ValidationError, } from './components/SchemaRenderer/types';
110
+ export declare const LazyDialJsonEditor: () => Promise<typeof import("./components/JsonEditor/JsonEditor")>;
111
+ export declare const LazyDialMarkdownEditor: () => Promise<typeof import("./components/MarkdownEditor/MarkdownEditor")>;
@@ -5,6 +5,12 @@ export interface PropEntry {
5
5
  defaultValue?: string;
6
6
  description?: string;
7
7
  }
8
+ export interface LazyComponentEntry {
9
+ loaderExportName: string;
10
+ packageImport: string;
11
+ ssr: false;
12
+ nextDynamicExample: string;
13
+ }
8
14
  export interface ComponentEntry {
9
15
  name: string;
10
16
  category: string;
@@ -12,6 +18,7 @@ export interface ComponentEntry {
12
18
  props: PropEntry[];
13
19
  examples: string[];
14
20
  sourceFile: string;
21
+ lazy?: LazyComponentEntry;
15
22
  }
16
23
  export interface TypeMember {
17
24
  name: string;
@@ -12,4 +12,5 @@ export interface DropdownItem {
12
12
  key: string;
13
13
  domEvent: MouseEvent;
14
14
  }) => void;
15
+ children?: DropdownItem[];
15
16
  }
@@ -5,4 +5,5 @@ export interface SelectOption {
5
5
  description?: string;
6
6
  disabled?: boolean;
7
7
  icon?: ReactNode;
8
+ children?: SelectOption[];
8
9
  }
@@ -2,5 +2,6 @@ export declare enum AlertVariant {
2
2
  Info = "info",
3
3
  Success = "success",
4
4
  Warning = "warning",
5
- Error = "error"
5
+ Error = "error",
6
+ Loading = "loading"
6
7
  }
@@ -38,6 +38,15 @@ export declare enum FileManagerRenameTriggerView {
38
38
  Tree = "tree",
39
39
  Grid = "grid"
40
40
  }
41
+ export declare enum FileManagerCreateFolderTriggerView {
42
+ Tree = "tree",
43
+ Grid = "grid"
44
+ }
45
+ export declare enum FileManagerCreateFolderType {
46
+ Folder = "folder",
47
+ Child = "child",
48
+ Sibling = "sibling"
49
+ }
41
50
  export declare enum FileManagerColumnKey {
42
51
  Name = "name",
43
52
  UpdatedAt = "updatedAt",
@@ -2,10 +2,10 @@ import { ScreenType } from '../types/screen';
2
2
  /**
3
3
  * Checks if the current viewport width is within the "medium" (tablet) screen range.
4
4
  *
5
- * Specifically, it returns `true` if the window width is less than 1024 pixels.
5
+ * Specifically, it returns `true` if the window width is less than 1280 pixels.
6
6
  * Safely handles server-side rendering by verifying that `window` is defined.
7
7
  *
8
- * @returns {boolean} `true` if the viewport width is less than 1024px, otherwise `false`.
8
+ * @returns {boolean} `true` if the viewport width is less than 1279px, otherwise `false`.
9
9
  *
10
10
  * @example
11
11
  * if (isMediumScreen()) {
@@ -0,0 +1,51 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Shared floating state for right-side submenus.
4
+ * Handles open state, Floating UI positioning and hover/dismiss/role interactions.
5
+ */
6
+ export declare function useSubMenuFloating(gap: number, ariaRole?: 'menu' | 'listbox', disabled?: boolean): {
7
+ isOpen: boolean;
8
+ refs: {
9
+ reference: import('react').MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
10
+ floating: React.MutableRefObject<HTMLElement | null>;
11
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
12
+ setFloating: (node: HTMLElement | null) => void;
13
+ } & import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
14
+ floatingStyles: import('react').CSSProperties;
15
+ context: {
16
+ placement: import('@floating-ui/utils').Placement;
17
+ strategy: import('@floating-ui/utils').Strategy;
18
+ x: number;
19
+ y: number;
20
+ middlewareData: import('@floating-ui/core').MiddlewareData;
21
+ isPositioned: boolean;
22
+ update: () => void;
23
+ floatingStyles: React.CSSProperties;
24
+ open: boolean;
25
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
26
+ events: import('@floating-ui/react').FloatingEvents;
27
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
28
+ nodeId: string | undefined;
29
+ floatingId: string | undefined;
30
+ refs: import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
31
+ elements: import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
32
+ };
33
+ getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
34
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
35
+ };
36
+ interface SubMenuPanelProps {
37
+ refs: ReturnType<typeof useSubMenuFloating>['refs'];
38
+ floatingStyles: ReturnType<typeof useSubMenuFloating>['floatingStyles'];
39
+ context: ReturnType<typeof useSubMenuFloating>['context'];
40
+ getFloatingProps: ReturnType<typeof useSubMenuFloating>['getFloatingProps'];
41
+ role: 'menu' | 'listbox';
42
+ /** Extra classes appended to the default floating container classes. */
43
+ className?: string;
44
+ children: ReactNode;
45
+ }
46
+ /**
47
+ * Shared floating panel wrapper (FloatingPortal → FloatingFocusManager → container div).
48
+ * Used by DropdownSubMenuItem and SelectSubMenuItem.
49
+ */
50
+ export declare const SubMenuPanel: ({ refs, floatingStyles, context, getFloatingProps, role, className, children, }: SubMenuPanelProps) => import("react/jsx-runtime").JSX.Element;
51
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.10.0-dev.5",
3
+ "version": "0.10.0-dev.51",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",
@@ -21,7 +21,7 @@
21
21
  }
22
22
  },
23
23
  "bin": {
24
- "ai-dial-ui-kit-mcp": "./dist/mcp-server.cjs"
24
+ "ai-dial-ui-kit-mcp": "dist/mcp-server.cjs"
25
25
  },
26
26
  "files": [
27
27
  "dist"
@@ -52,8 +52,8 @@
52
52
  "build-storybook": "concurrently \"npm run build-storybook:css\" \"storybook build\"",
53
53
  "build-storybook:css": "tailwindcss -m -i ./src/styles/tailwind-entry.scss -o ./src/index.css",
54
54
  "prepare": "husky",
55
- "publish": "node tools/publish-lib.mjs",
56
- "publish:dry": "node tools/publish-lib.mjs --output-style=static --dry",
55
+ "publish": "npm publish --access public",
56
+ "publish:dry": "npm publish --access public --dry-run",
57
57
  "test": "vitest --coverage",
58
58
  "storybook-docs": "storybook dev --docs",
59
59
  "build-storybook-docs": "storybook build --docs"
@@ -143,4 +143,4 @@
143
143
  "vite-plugin-svgr": "^4.5.0",
144
144
  "vitest": "^3.2.4"
145
145
  }
146
- }
146
+ }