@epam/ai-dial-ui-kit 0.4.0-rc.8 → 0.4.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 (75) hide show
  1. package/dist/dial-ui-kit.cjs.js +2 -62
  2. package/dist/dial-ui-kit.es.js +4253 -42725
  3. package/dist/index.css +1 -1
  4. package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +2 -0
  5. package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +2 -2
  6. package/dist/src/components/Breadcrumb/constants.d.ts +4 -1
  7. package/dist/src/components/Checkbox/Checkbox.d.ts +2 -2
  8. package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +2 -2
  9. package/dist/src/components/FileManager/FileManager.d.ts +62 -14
  10. package/dist/src/components/FileManager/FileManagerContext.d.ts +64 -0
  11. package/dist/src/components/FileManager/FileManagerProvider.d.ts +18 -0
  12. package/dist/src/components/FileManager/components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar.d.ts +53 -0
  13. package/dist/src/components/FileManager/components/FileManagerBulkActionsToolbar/constants.d.ts +3 -0
  14. package/dist/src/components/FileManager/components/FileManagerDeleteConfirmationPopup/FileManagerDeleteConfirmationPopup.d.ts +26 -0
  15. package/dist/src/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.d.ts +46 -0
  16. package/dist/src/components/FileManager/components/FileManagerItemName/FileManagerItemName.d.ts +48 -0
  17. package/dist/src/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.d.ts +65 -0
  18. package/dist/src/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.d.ts +2 -0
  19. package/dist/src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.d.ts +27 -24
  20. package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +23 -3
  21. package/dist/src/components/FileManager/constants.d.ts +1 -1
  22. package/dist/src/components/FileManager/hooks/__tests__/use-current-path.spec.d.ts +1 -0
  23. package/dist/src/components/FileManager/hooks/__tests__/use-file-clipboard.spec.d.ts +1 -0
  24. package/dist/src/components/FileManager/hooks/__tests__/use-file-delete.spec.d.ts +1 -0
  25. package/dist/src/components/FileManager/hooks/__tests__/use-file-download.spec.d.ts +1 -0
  26. package/dist/src/components/FileManager/hooks/__tests__/use-show-hidden-files.spec.d.ts +1 -0
  27. package/dist/src/components/FileManager/hooks/use-collapse-tree.d.ts +9 -0
  28. package/dist/src/components/FileManager/hooks/use-current-path.d.ts +10 -0
  29. package/dist/src/components/FileManager/hooks/use-file-clipboard.d.ts +20 -0
  30. package/dist/src/components/FileManager/hooks/use-file-delete.d.ts +12 -0
  31. package/dist/src/components/FileManager/hooks/use-file-download.d.ts +7 -0
  32. package/dist/src/components/FileManager/hooks/use-file-manager-context.d.ts +5 -0
  33. package/dist/src/components/FileManager/hooks/use-item-renaming.d.ts +13 -0
  34. package/dist/src/components/FileManager/hooks/use-show-hidden-files.d.ts +5 -0
  35. package/dist/src/components/FileManager/utils.d.ts +1 -0
  36. package/dist/src/components/Grid/Grid.d.ts +9 -1
  37. package/dist/src/components/Grid/comparators/base-column-comparator.spec.d.ts +1 -0
  38. package/dist/src/components/Grid/constants.d.ts +0 -1
  39. package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +32 -0
  40. package/dist/src/components/Grid/renderers/constants.d.ts +3 -0
  41. package/dist/src/components/Grid/renderers/utils.d.ts +2 -0
  42. package/dist/src/components/Grid/renderers/utils.spec.d.ts +1 -0
  43. package/dist/src/components/Input/Input.d.ts +4 -1
  44. package/dist/src/components/InputPopup/InputPopup.d.ts +6 -2
  45. package/dist/src/components/NoDataContent/NoDataContent.d.ts +3 -0
  46. package/dist/src/components/Search/Search.d.ts +2 -0
  47. package/dist/src/components/Select/MultiSelectTags.d.ts +2 -2
  48. package/dist/src/components/Select/Select.d.ts +39 -22
  49. package/dist/src/components/Select/constants.d.ts +1 -2
  50. package/dist/src/components/SelectField/SelectField.d.ts +5 -0
  51. package/dist/src/components/Steps/tests/utils.spec.d.ts +1 -0
  52. package/dist/src/components/Tab/Tab.d.ts +1 -4
  53. package/dist/src/components/Tabs/Tabs.d.ts +27 -14
  54. package/dist/src/components/Tag/Tag.d.ts +2 -2
  55. package/dist/src/components/Tooltip/Tooltip.d.ts +2 -2
  56. package/dist/src/components/Tooltip/TooltipContent.d.ts +5 -2
  57. package/dist/src/components/Tooltip/TooltipTrigger.d.ts +6 -4
  58. package/dist/src/hooks/use-editable-item.d.ts +64 -0
  59. package/dist/src/hooks/use-flexible-actions.d.ts +86 -0
  60. package/dist/src/hooks/use-is-mobile-screen.d.ts +15 -0
  61. package/dist/src/hooks/use-screen-type.d.ts +19 -0
  62. package/dist/src/index.d.ts +10 -6
  63. package/dist/src/models/dropdown.d.ts +2 -2
  64. package/dist/src/models/file.d.ts +3 -0
  65. package/dist/src/models/select.d.ts +1 -0
  66. package/dist/src/models/tab.d.ts +1 -0
  67. package/dist/src/types/file-manager.d.ts +19 -0
  68. package/dist/src/types/flexible-actions.d.ts +4 -0
  69. package/dist/src/types/item.d.ts +4 -0
  70. package/dist/src/types/screen.d.ts +6 -0
  71. package/dist/src/types/select.d.ts +8 -0
  72. package/dist/src/types/tab.d.ts +4 -0
  73. package/dist/src/utils/merge-classes.spec.d.ts +1 -0
  74. package/dist/src/utils/mobile.d.ts +35 -0
  75. package/package.json +8 -8
@@ -0,0 +1,65 @@
1
+ import { FC, ReactNode, Ref } from 'react';
2
+ import { DialItemType } from '../../../../types/item';
3
+ export interface DialFileManagerItemNameInputProps {
4
+ type: DialItemType;
5
+ name: string;
6
+ shared?: boolean;
7
+ loading?: boolean;
8
+ elementId: string;
9
+ iconSize?: number;
10
+ iconStroke?: number;
11
+ iconCssClass?: string;
12
+ iconLabel?: string;
13
+ iconIndicator?: ReactNode;
14
+ inputInvalid?: boolean;
15
+ inputInvalidMessage?: string;
16
+ inputIconAfter?: ReactNode;
17
+ inputRef?: Ref<HTMLInputElement>;
18
+ onChange?: (value?: string) => void;
19
+ }
20
+ /**
21
+ * Combines a file/folder icon with an editable text input.
22
+ *
23
+ * Used for renaming or labeling file/folder entities within the File Manager.
24
+ * Displays:
25
+ * - The item icon (with optional loading/shared state)
26
+ * - An inline text input
27
+ * - A validation tooltip when `inputInvalid` is `true`
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * <DialFileManagerItemNameInput
32
+ * type={DialItemType.File}
33
+ * name="report.pdf"
34
+ * elementId="file-input-1"
35
+ * shared
36
+ * onChange={(value) => console.log('New name:', value)}
37
+ * />
38
+ *
39
+ * <DialFileManagerItemNameInput
40
+ * type={DialItemType.Folder}
41
+ * name="Project A"
42
+ * elementId="folder-input-2"
43
+ * inputInvalid
44
+ * inputInvalidMessage="Invalid name"
45
+ * />
46
+ * ```
47
+ *
48
+ * @param {Object} props
49
+ * @param {DialItemType} props.type - The type of item (file or folder).
50
+ * @param {string} props.name - Current name of the entity.
51
+ * @param {string} props.elementId - Unique ID for the input element.
52
+ * @param {boolean} [props.shared=false] - Whether the entity is shared.
53
+ * @param {boolean} [props.loading=false] - Whether the icon is loading.
54
+ * @param {number} [props.iconSize] - Optional size override for the icon.
55
+ * @param {number} [props.iconStroke] - Optional stroke width override for the icon.
56
+ * @param {string} [props.iconCssClass] - Optional CSS class for the icon.
57
+ * @param {string} [props.iconLabel] - Optional accessible label for the icon.
58
+ * @param {ReactNode} [props.iconIndicator] - Optional indicator to render over the icon.
59
+ * @param {boolean} [props.inputInvalid=false] - Marks the input as invalid.
60
+ * @param {string} [props.inputInvalidMessage] - Tooltip message shown when invalid.
61
+ * @param {ReactNode} [props.inputIconAfter] - Optional icon shown after the input (defaults to an error icon).
62
+ * @param {Ref<HTMLInputElement>} [props.inputRef] - Ref to access the underlying input element.
63
+ * @param {(value: string) => void} [props.onChange] - Callback fired when input value changes.
64
+ */
65
+ export declare const DialFileManagerItemNameInput: FC<DialFileManagerItemNameInputProps>;
@@ -7,6 +7,8 @@ export interface DialFileManagerNavigationPanelProps extends Omit<DialBreadcrumb
7
7
  cssClass?: string;
8
8
  breadcrumbCssClass?: string;
9
9
  onItemClick?: (href?: string) => void;
10
+ rootItemPath?: string;
11
+ rootItemLabel?: string;
10
12
  searchable?: boolean;
11
13
  value?: string | number | null;
12
14
  elementId?: string;
@@ -8,6 +8,8 @@ export interface DialFileManagerToolbarProps {
8
8
  activeTab?: string;
9
9
  areHiddenFilesVisible: boolean;
10
10
  hiddenFilesSwitcherLabel?: string;
11
+ showHiddenFilesLabel?: string;
12
+ hideHiddenFilesLabel?: string;
11
13
  isCreateButtonVisible?: boolean;
12
14
  createButtonVariant?: ButtonVariant;
13
15
  createButtonDropdownItems?: DropdownItem[];
@@ -18,18 +20,16 @@ export interface DialFileManagerToolbarProps {
18
20
  onRefresh?: () => void;
19
21
  }
20
22
  /**
21
- * DialFileManagerToolbar — A configurable toolbar component for file manager views.
23
+ * DialFileManagerToolbar — A configurable, responsive toolbar component for file management views.
22
24
  *
23
- * Provides a clean and functional toolbar for file management pages with:
24
- * - Tab navigation for switching between different sections or views
25
- * - Hidden files toggle via `DialSwitch`
26
- * - Refresh button with icon
27
- * - Optional "Create" button or dropdown for file/folder creation
28
- * - Fully responsive horizontal layout
25
+ * Provides a flexible toolbar interface for file managers or similar UIs, supporting:
26
+ * - Tab navigation for switching between file sections or views
27
+ * - A toggle for showing or hiding hidden files
28
+ * - A refresh button for reloading content
29
+ * - An optional "Create" button or dropdown for creating new files or folders
29
30
  *
30
31
  * @example
31
32
  * ```tsx
32
- * // Basic usage
33
33
  * const tabs: TabModel[] = [
34
34
  * { id: 'all', name: 'All Files' },
35
35
  * { id: 'favorites', name: 'Favorites' },
@@ -40,8 +40,8 @@ export interface DialFileManagerToolbarProps {
40
40
  * activeTab="all"
41
41
  * areHiddenFilesVisible={false}
42
42
  * onTabChange={(id) => console.log('Switched to tab:', id)}
43
- * onToggleHiddenFiles={(visible) => console.log('Hidden files:', visible)}
44
- * onRefresh={() => console.log('Refreshing...')}
43
+ * onToggleHiddenFiles={(visible) => console.log('Hidden files visible:', visible)}
44
+ * onRefresh={() => console.log('Refreshed')}
45
45
  * isCreateButtonVisible
46
46
  * createButtonDropdownItems={[
47
47
  * { key: 'folder', label: 'New Folder' },
@@ -50,23 +50,26 @@ export interface DialFileManagerToolbarProps {
50
50
  * />
51
51
  * ```
52
52
  *
53
- * @param [tabs] - Array of tabs to display, each defined by a `TabModel` (id and label).
54
- * @param [activeTab] - ID of the currently active tab.
55
- * @param [onTabChange] - Callback fired when the user selects a different tab.
56
- * @param [areHiddenFilesVisible] - Indicates whether hidden files are currently visible.
57
- * @param [onToggleHiddenFiles] - Callback fired when the hidden files toggle is switched.
58
- * @param [hiddenFilesSwitcherLabel='Hidden files'] - Label text for the hidden files toggle switch.
53
+ * @param [tabs] - List of tab definitions to display, each represented by a `TabModel` containing `id` and `name`.
54
+ * @param [activeTab] - The ID of the currently active tab.
55
+ * @param areHiddenFilesVisible - Whether hidden files are currently visible.
56
+ * @param [hiddenFilesSwitcherLabel='Hidden files'] - Label for the hidden files toggle control.
57
+ * @param [showHiddenFilesLabel='Show hidden'] - Label shown when hidden files are not visible.
58
+ * @param [hideHiddenFilesLabel='Hide hidden'] - Label shown when hidden files are visible.
59
+ * @param [onTabChange] - Callback fired when the user switches between tabs. Receives the selected tab ID.
60
+ * @param [onToggleHiddenFiles] - Callback fired when the hidden files visibility is toggled. Receives the new visibility state.
59
61
  * @param [onRefresh] - Callback fired when the refresh button is clicked.
60
- * @param [refreshButtonLabel='Refresh'] - Label for the refresh button.
61
- * @param [isCreateButtonVisible] - Whether the create button or dropdown should be visible.
62
+ * @param [refreshButtonLabel='Refresh'] - Text label for the refresh button.
63
+ * @param [isCreateButtonVisible] - Whether the "Create" button or dropdown should be displayed.
62
64
  * @param [createButtonVariant=ButtonVariant.Secondary] - Visual style variant for the create button.
63
- * @param [createButtonDropdownItems=[]] - Dropdown menu items for the create button (used when multiple creation options are available).
64
- * @param [createButtonLabel='Create'] - Label for the create button.
65
+ * @param [createButtonDropdownItems=[]] - Dropdown items available under the create button. If empty, a single create button is shown instead.
66
+ * @param [createButtonLabel='Create'] - Label text for the create button.
65
67
  *
66
68
  * @remarks
67
- * - The component is layout-flexible and designed for use inside file or asset management toolbars.
68
- * - Tabs are rendered using `DialTabs`, and actions use `DialButton`, `DialSwitch`, and `DialButtonDropdown`.
69
- * - The refresh and create actions are aligned on the right for intuitive placement.
70
- * - When `createButtonDropdownItems` is empty, the create button behaves as a single-action button.
69
+ * - Tabs are rendered via `DialTabs`.
70
+ * - The hidden files toggle uses `DialSwitch`.
71
+ * - The refresh and create actions use `DialButton` or dropdown variants for consistency.
72
+ * - The toolbar automatically adapts its layout for different screen sizes.
73
+ * - When `createButtonDropdownItems` is provided, the create button becomes a dropdown menu.
71
74
  */
72
75
  export declare const DialFileManagerToolbar: FC<DialFileManagerToolbarProps>;
@@ -6,12 +6,17 @@ export interface DialFoldersTreeProps {
6
6
  expandedPaths?: Set<string>;
7
7
  loadingPaths?: Set<string>;
8
8
  selectedPath?: string;
9
+ renamedPath?: string;
9
10
  showFiles?: boolean;
10
11
  emptyStateTitle?: string;
11
12
  emptyStateDescription?: string;
12
13
  emptyStateIcon?: ReactNode;
13
14
  onItemClick?: (item: DialFile) => void;
15
+ onRenameSave?: (value: string) => void;
16
+ onRenameCancel?: () => void;
17
+ onRenameValidate?: (value: string, item: DialFile) => string | null;
14
18
  getContextMenuItems?: (item: DialFile) => DropdownItem[];
19
+ areHiddenFilesVisible?: boolean;
15
20
  }
16
21
  /**
17
22
  * DialFoldersTree — A hierarchical folder tree component with nested expand/collapse support, selection highlighting,
@@ -21,6 +26,7 @@ export interface DialFoldersTreeProps {
21
26
  * - Expandable and collapsible items
22
27
  * - Optional file visibility
23
28
  * - Loading state indicators for specific paths
29
+ * - Inline renaming support for folders or files
24
30
  * - Multi-item selection highlighting
25
31
  * - Context menu integration via `DialDropdown`
26
32
  * - Recursive rendering with indentation and icons
@@ -48,15 +54,23 @@ export interface DialFoldersTreeProps {
48
54
  *
49
55
  * // With expanded and selected items
50
56
  * const expandedPaths = new Set(['/documents']);
51
- * const selectedPaths = new Set(['/documents/file.txt']);
52
57
  *
53
58
  * <DialFoldersTree
54
59
  * items={items}
55
60
  * expandedPaths={expandedPaths}
56
- * selectedPaths={selectedPaths}
61
+ * selectedPath="/documents/file.txt"
57
62
  * onItemClick={(item) => console.log('Clicked:', item.path)}
58
63
  * />
59
64
  *
65
+ * // With inline renaming and validation
66
+ * <DialFoldersTree
67
+ * items={items}
68
+ * renamedPath="/documents"
69
+ * onRenameValidate={(value) => (value.trim() ? null : 'Name cannot be empty')}
70
+ * onRenameSave={(newValue) => console.log('Saved new name:', newValue)}
71
+ * onRenameCancel={() => console.log('Edit cancelled')}
72
+ * />
73
+ *
60
74
  * // With custom empty state and context menu
61
75
  * const getContextMenuItems = (item: DialFile): DropdownItem[] => [
62
76
  * { key: 'rename', label: 'Rename' },
@@ -76,16 +90,22 @@ export interface DialFoldersTreeProps {
76
90
  * @param [expandedPaths] - Set of folder paths that should be expanded.
77
91
  * @param [loadingPaths] - Set of folder paths currently loading (shows spinner or placeholder).
78
92
  * @param [selectedPath] - Path representing the currently selected folder or file.
93
+ * @param [renamedPath] - Path of the folder or file currently being edited.
79
94
  * @param [showFiles=false] - Whether to show files in addition to folders.
80
95
  * @param [emptyStateTitle='No Folders'] - Title text displayed when there are no items.
81
96
  * @param [emptyStateDescription] - Optional description text for the empty state.
82
97
  * @param [emptyStateIcon] - Optional icon to display in the empty state.
83
98
  * @param [onItemClick] - Callback fired when a folder or file is clicked (receives the corresponding `DialFile` node).
99
+ * @param [onRenameSave] - Callback fired when editing is confirmed with a valid name (receives the new name).
100
+ * @param [onRenameCancel] - Callback fired when editing is cancelled.
101
+ * @param [onRenameValidate] - Function to validate the new name during editing. Should return an error string or `null` if valid.
84
102
  * @param [getContextMenuItems] - Function returning context menu items for a given node.
103
+ * @param [areHiddenFilesVisible=false] - Whether hidden files (dotfiles) should be visible in the tree.
85
104
  *
86
105
  * @remarks
87
106
  * - Folder and file data must follow the `DialFile` model.
88
- * - The `expandedPaths`, `loadingPaths`, and `selectedPaths` props are externally controlled; the component itself does not manage them internally.
107
+ * - The `expandedPaths`, `loadingPaths`, `selectedPath`, and `renamedPath` props are externally controlled.
108
+ * - Inline renaming is fully customizable using `onRenameSave`, `onRenameCancel`, and `onRenameValidate`.
89
109
  * - Context menus can be attached to both folders and files using `getContextMenuItems`.
90
110
  * - Use `showFiles={false}` to render only folders for a simplified tree.
91
111
  */
@@ -5,5 +5,5 @@ export declare const contentGridClasses = "flex flex-col flex-1 min-h-0 min-w-0
5
5
  export declare const contentHeaderClasses = "items-center";
6
6
  export declare const treeBaseClasses = "w-full h-full rounded bg-layer-3 text-secondary overflow-auto min-w-0";
7
7
  export declare const gridBaseClasses = "flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0";
8
- export declare const sidebarWidth = 360;
8
+ export declare const sidebarWidth = 280;
9
9
  export declare const sidebarTitleDefault = "Files";
@@ -0,0 +1,9 @@
1
+ export interface UseCollapseTreeOptions {
2
+ collapsed?: boolean;
3
+ onCollapseChange?: (collapsed: boolean) => void;
4
+ }
5
+ export declare const useCollapseTree: (options?: UseCollapseTreeOptions) => {
6
+ isTreeCollapsed: boolean;
7
+ toggleTreeCollapse: () => void;
8
+ setIsTreeCollapsed: (value: boolean) => void;
9
+ };
@@ -0,0 +1,10 @@
1
+ export interface UseCurrentPathOptions {
2
+ path?: string;
3
+ onPathChange?: (nextPath?: string) => void;
4
+ onSelectionClear?: () => void;
5
+ }
6
+ export declare const useCurrentPath: ({ path, onPathChange, onSelectionClear, }: UseCurrentPathOptions) => {
7
+ currentPath: string | undefined;
8
+ setCurrentPath: import('react').Dispatch<import('react').SetStateAction<string | undefined>>;
9
+ handlePathChange: (nextPath?: string) => void;
10
+ };
@@ -0,0 +1,20 @@
1
+ import { DialFile } from '../../../models/file';
2
+ import { DialCopiedItem } from '../../../types/file-manager';
3
+ export interface UseFileClipboardOptions {
4
+ getDestination: () => string;
5
+ getDestinationFiles: () => DialFile[];
6
+ getSourceFiles: () => DialFile[];
7
+ onCopyFiles?: (items: DialCopiedItem[], destinationFolder: string) => void;
8
+ onMoveToFiles?: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
9
+ }
10
+ export declare const useFileClipboard: ({ getDestination, getDestinationFiles, getSourceFiles, onCopyFiles, onMoveToFiles, }: UseFileClipboardOptions) => {
11
+ state: {
12
+ copied: Set<string>;
13
+ cut: Set<string>;
14
+ hasItems: boolean;
15
+ };
16
+ copy: (files: string[]) => void;
17
+ cut: (files: string[]) => void;
18
+ paste: (overwrite?: boolean) => void;
19
+ clear: () => void;
20
+ };
@@ -0,0 +1,12 @@
1
+ import { DialFile } from '../../../models/file';
2
+ import { DialDeletedItem } from '../../../types/file-manager';
3
+ export interface UseFileDeleteOptions {
4
+ onDeleteFiles?: (items: DialDeletedItem[], sourceFolder: string) => void;
5
+ }
6
+ export declare const useFileDelete: ({ onDeleteFiles }: UseFileDeleteOptions) => {
7
+ deleteConfirmationOpen: boolean;
8
+ itemsToDelete: DialFile[];
9
+ openDeleteConfirmation: (items: DialFile[], parentFolderPath: string) => void;
10
+ closeDeleteConfirmation: () => void;
11
+ confirmDelete: () => void;
12
+ };
@@ -0,0 +1,7 @@
1
+ import { DialFile } from '../../../models/file';
2
+ export interface UseFileDownloadOptions {
3
+ onDownloadFiles?: (items: DialFile[]) => void;
4
+ }
5
+ export declare const useFileDownload: ({ onDownloadFiles, }: UseFileDownloadOptions) => {
6
+ downloadFiles: (items: DialFile[]) => void;
7
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Hook to read the File Manager context.
3
+ * Throws if used outside of the provider.
4
+ */
5
+ export declare const useFileManagerContext: () => import('../FileManagerContext').FileManagerContextValue;
@@ -0,0 +1,13 @@
1
+ import { DialFile } from '../../../models/file';
2
+ export declare const useItemRenaming: ({ onRename, onRenameSave, onRenameCancel, onRenameValidate, }: {
3
+ onRename?: (path: string) => void;
4
+ onRenameSave?: (value: string) => void;
5
+ onRenameCancel?: () => void;
6
+ onRenameValidate?: (value: string, item: DialFile) => string | null;
7
+ }) => {
8
+ renamedPath: string | undefined;
9
+ renameHandler: (path: string) => void;
10
+ renameSaveHandler: (value: string) => void;
11
+ renameCancelHandler: () => void;
12
+ renameValidateHandler: (value: string, item: DialFile) => string | null;
13
+ };
@@ -0,0 +1,5 @@
1
+ export declare const useShowHiddenFiles: (initialState?: boolean) => {
2
+ areHiddenFilesVisible: boolean;
3
+ toggleHiddenFilesVisibility: () => void;
4
+ setAreHiddenFilesVisible: import('react').Dispatch<import('react').SetStateAction<boolean>>;
5
+ };
@@ -3,3 +3,4 @@ export declare const findFolderForPath: (root: DialFile[] | undefined, path?: st
3
3
  export declare const normalizeToLowerCase: (input?: string) => string;
4
4
  export declare const normalizeExtensionWithoutDot: (input?: string) => string;
5
5
  export declare const collectAllDescendants: (folder?: DialFile) => DialFile[];
6
+ export declare const isHiddenDotFile: (node: DialFile) => boolean;
@@ -1,4 +1,5 @@
1
1
  import { ColDef, GridOptions } from 'ag-grid-community';
2
+ import { ReactNode } from 'react';
2
3
  import { DropdownItem } from '../../models/dropdown';
3
4
  export interface DialGridProps<T extends object = Record<string, unknown>> {
4
5
  columnDefs?: ColDef<T>[];
@@ -14,6 +15,9 @@ export interface DialGridProps<T extends object = Record<string, unknown>> {
14
15
  getRowId?: (row: T) => string;
15
16
  alternateOddRowColors?: boolean;
16
17
  filterPlaceholder?: string;
18
+ emptyStateIcon?: ReactNode;
19
+ emptyStateTitle?: string;
20
+ emptyStateDescription?: string;
17
21
  }
18
22
  /**
19
23
  * DialGrid — A feature-rich data grid wrapper built on ag-Grid with dark theme support.
@@ -86,5 +90,9 @@ export interface DialGridProps<T extends object = Record<string, unknown>> {
86
90
  * @param [getRowId] - Function to extract unique ID from a row object (defaults to 'id' field)
87
91
  * @param [alternateOddRowColors=false] - Whether to alternate background colors for odd/even rows
88
92
  * @param [filterPlaceholder='Enter value'] - Placeholder text for column filter inputs
93
+ * @param [emptyStateIcon] - Optional icon for empty state
94
+ * @param [emptyStateTitle] - Optional title text displayed when the grid has no rows to show.
95
+ * @param [emptyStateDescription] - Optional description text displayed below the empty state title,
96
+ * providing additional context or instructions (e.g., “No data found” or “Try adjusting your filters”).
89
97
  */
90
- export declare const DialGrid: <T extends object>({ columnDefs, rowData, additionalGridOptions, getContextMenuItems, cssClass, ariaLabel, withSelectionColumn, wrapCustomCellRenderers, selectedRowIds, onSelectionChange, getRowId, alternateOddRowColors, filterPlaceholder, }: DialGridProps<T>) => import("react/jsx-runtime").JSX.Element;
98
+ export declare const DialGrid: <T extends object>({ columnDefs, rowData, additionalGridOptions, getContextMenuItems, cssClass, ariaLabel, withSelectionColumn, wrapCustomCellRenderers, selectedRowIds, onSelectionChange, getRowId, alternateOddRowColors, filterPlaceholder, emptyStateIcon, emptyStateTitle, emptyStateDescription, }: DialGridProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -18,7 +18,6 @@ export declare const GRID_THEME_COLORS: {
18
18
  fontFamily: {
19
19
  googleFont: string;
20
20
  };
21
- headerColumnBorderHeight: string;
22
21
  cellStyle: {
23
22
  textAlign: string;
24
23
  };
@@ -0,0 +1,32 @@
1
+ import { FC } from 'react';
2
+ import { ICellRendererParams } from 'ag-grid-community';
3
+ export type DateValue = string | number | Date;
4
+ export interface DialDateCellRendererProps extends Partial<ICellRendererParams<Record<string, unknown>, DateValue>> {
5
+ value?: DateValue | null;
6
+ locale?: string;
7
+ options?: Intl.DateTimeFormatOptions;
8
+ emptyPlaceholder?: string;
9
+ cssClass?: string;
10
+ }
11
+ /**
12
+ * Minimal date cell renderer (ag-Grid compatible).
13
+ *
14
+ * Renders the value in the **"MMM dd, yyyy"** format (e.g., "Jul 20, 2025"),
15
+ * wrapped in `DialEllipsisTooltip` (tooltip only appears if truncated).
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * // ag-Grid colDef
20
+ * { field: 'createdAt', cellRenderer: DateCellRenderer, cellRendererParams: { options: { timeZone: 'UTC' } } }
21
+ *
22
+ * // Direct usage
23
+ * <DateCellRenderer value="2025-07-20T00:00:00Z" options={{ timeZone: 'UTC' }} />
24
+ * <DateCellRenderer value={1752969600000} options={{ timeZone: 'UTC' }} /> // milliseconds
25
+ * ```
26
+ *
27
+ * @param [locale='en-US'] - Locale fixed to U.S. English by default to enforce "Jul 20, 2025".
28
+ * @param [options={ year: 'numeric', month: 'numeric', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', timeZone: 'UTC' }] - Options for date formatting (e.g., timeZone).
29
+ * @param [emptyPlaceholder='—'] - Placeholder when value is empty/invalid.
30
+ * @param [cssClass] - Additional classes merged into the wrapper.
31
+ */
32
+ export declare const DialDateCellRenderer: FC<DialDateCellRendererProps>;
@@ -0,0 +1,3 @@
1
+ export declare const DEFAULT_LOCALE = "en-US";
2
+ export declare const DEFAULT_DATE_FORMAT_OPTIONS: Intl.DateTimeFormatOptions;
3
+ export declare const dateCellBaseClasses = "text-primary";
@@ -0,0 +1,2 @@
1
+ import { DateValue } from './DateCellRenderer';
2
+ export declare function convertToDate(input?: DateValue | null): Date | null;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { FC, FocusEvent } from 'react';
1
+ import { FC, FocusEvent, Ref } from 'react';
2
2
  import { InputBaseProps, NumberInputBaseProps } from '../../models/field-control-props';
3
3
  export interface DialInputProps extends InputBaseProps, Partial<NumberInputBaseProps> {
4
4
  type?: string;
@@ -7,6 +7,8 @@ export interface DialInputProps extends InputBaseProps, Partial<NumberInputBaseP
7
7
  hideBorder?: boolean;
8
8
  tooltipText?: string;
9
9
  tooltipTriggerClassName?: string;
10
+ hideTooltip?: boolean;
11
+ inputRef?: Ref<HTMLInputElement>;
10
12
  onChange?: (value?: string) => void;
11
13
  onBlur?: (event: FocusEvent<HTMLInputElement, Element>) => void;
12
14
  }
@@ -34,6 +36,7 @@ export interface DialInputProps extends InputBaseProps, Partial<NumberInputBaseP
34
36
  * @param hideBorder - Whether to hide the input border styling
35
37
  * @param tooltipText - The text to display inside the tooltip. If empty, the tooltip will display the value prop.
36
38
  * @param tooltipTriggerClassName - Additional CSS classes to apply to the tooltip
39
+ * @param hideTooltip - Whether to hide the tooltip
37
40
  * @param onChange - Callback function called when the input value changes
38
41
  * @param onBlur - Callback function called when the input blurs
39
42
  */
@@ -7,9 +7,11 @@ export interface DialInputPopupProps {
7
7
  disabled?: boolean;
8
8
  valueCssClasses?: string;
9
9
  inputCssClasses?: string;
10
+ placeholder?: string;
10
11
  elementId?: string;
11
12
  errorText?: string;
12
- emptyValueText: string;
13
+ invalid?: boolean;
14
+ emptyValueText?: string;
13
15
  }
14
16
  /**
15
17
  * An input field that opens a popup when clicked, displaying a selected value or a list of values.
@@ -35,6 +37,7 @@ export interface DialInputPopupProps {
35
37
  *
36
38
  * @param [open] - The current state of the modal, indicating whether it is opened or closed.
37
39
  * @param [selectedValue] - The currently selected value(s). Can be a string for a single value or an array of strings for multiple values.
40
+ * @param [placeholder] - Placeholder text displayed when no value is selected.
38
41
  * @param children - The content to render inside the modal when it is opened.
39
42
  * @param onOpen - A callback function triggered when the modal open button is clicked.
40
43
  * @param [disabled=false] - Whether the input is disabled, preventing user interaction.
@@ -42,6 +45,7 @@ export interface DialInputPopupProps {
42
45
  * @param [inputCssClasses] - Additional CSS classes applied to the input container.
43
46
  * @param [elementId] - A unique identifier for the input element, useful for accessibility and testing.
44
47
  * @param [errorText] - An optional error message displayed below the input when an error state is present.
45
- * @param emptyValueText - The text displayed when no value is selected.
48
+ * @param [invalid] - Whether the input is in an invalid state, affecting styling. Applyed automatically if errorText is provided.
49
+ * @param [emptyValueText] - The text displayed when no value is selected and placeholder is not provided.
46
50
  */
47
51
  export declare const DialInputPopup: FC<DialInputPopupProps>;
@@ -3,6 +3,9 @@ export interface DialNoDataContentProps {
3
3
  icon?: ReactNode;
4
4
  title: string;
5
5
  description?: string;
6
+ containerCssClass?: string;
7
+ titleCssClass?: string;
8
+ descriptionCssClass?: string;
6
9
  }
7
10
  /**
8
11
  * A component for displaying a message and icon when there is no data to show.
@@ -11,6 +11,7 @@ export interface DialSearchProps {
11
11
  containerCssClass?: string;
12
12
  onChange?: (value: string) => void;
13
13
  size?: SearchSize;
14
+ allowClear?: boolean;
14
15
  }
15
16
  /**
16
17
  * A search input component with a customizable placeholder, icons, flexible props, and the ability
@@ -38,5 +39,6 @@ export interface DialSearchProps {
38
39
  * @param [containerCssClass] - Additional CSS classes applied to the container
39
40
  * @param [onChange] - Callback fired when the input value changes
40
41
  * @param [size=SearchSize.Base] - The size of the search input. Uses the {@link SearchSize} enum.
42
+ * @param [allowClear=true] - Whether to show a clear button when there is a value
41
43
  */
42
44
  export declare const DialSearch: FC<DialSearchProps>;
@@ -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: React.FC<DialMultiSelectTagsProps>;
8
+ export declare const DialMultiSelectTags: FC<DialMultiSelectTagsProps>;