@epam/ai-dial-ui-kit 0.5.0-rc.8 → 0.5.0-rc.80
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.
- package/README.md +3 -3
- package/dist/dial-ui-kit.cjs.js +29 -29
- package/dist/dial-ui-kit.es.js +18764 -16567
- package/dist/index.css +2 -2
- package/dist/src/components/Alert/Alert.d.ts +2 -2
- package/dist/src/components/Alert/constants.d.ts +2 -2
- package/dist/src/components/AutocompleteInput/AutocompleteInput.d.ts +10 -10
- package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +6 -6
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +8 -8
- package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +2 -2
- package/dist/src/components/Breadcrumb/constants.d.ts +10 -10
- package/dist/src/components/Button/Button.d.ts +10 -18
- package/dist/src/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/src/components/CloseButton/CloseButton.d.ts +5 -3
- package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +6 -6
- package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +3 -3
- package/dist/src/components/ConfirmationPopup/constants.d.ts +3 -3
- package/dist/src/components/DraggableItem/DraggableItem.d.ts +8 -8
- package/dist/src/components/DraggableItem/constants.d.ts +2 -2
- package/dist/src/components/Dropdown/Dropdown.d.ts +4 -2
- package/dist/src/components/Dropdown/constants.d.ts +7 -7
- package/dist/src/components/EllipsisTooltip/EllipsisTooltip.d.ts +4 -4
- package/dist/src/components/EllipsisTooltip/constants.d.ts +1 -1
- package/dist/src/components/Field/Field.d.ts +4 -6
- package/dist/src/components/FileIcon/FileIcon.d.ts +2 -2
- package/dist/src/components/FileManager/FileManager.d.ts +64 -10
- package/dist/src/components/FileManager/FileManagerContext.d.ts +42 -4
- package/dist/src/components/FileManager/FileManagerProvider.d.ts +1 -0
- package/dist/src/components/FileManager/components/ConflictResolutionPopup/ConflictResolutionPopup.d.ts +92 -0
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +4 -1
- package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.d.ts +55 -0
- package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.test.d.ts +1 -0
- package/dist/src/components/FileManager/components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar.d.ts +5 -3
- package/dist/src/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.d.ts +1 -1
- package/dist/src/components/FileManager/components/FileManagerItemName/FileManagerItemName.d.ts +2 -1
- package/dist/src/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.d.ts +4 -2
- package/dist/src/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.d.ts +13 -11
- package/dist/src/components/FileManager/components/FileManagerNavigationPanel/constants.d.ts +3 -3
- package/dist/src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.d.ts +13 -13
- package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +7 -1
- package/dist/src/components/FileManager/components/FoldersTree/hooks/use-expanded-paths.d.ts +13 -0
- package/dist/src/components/FileManager/constants.d.ts +14 -7
- package/dist/src/components/FileManager/hooks/__tests__/use-conflict-resolution.spec.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/__tests__/use-file-upload.spec.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/__tests__/use-trigger-view-rename.spec.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/use-bulk-actions.d.ts +22 -0
- package/dist/src/components/FileManager/hooks/use-conflict-resolution.d.ts +26 -0
- package/dist/src/components/FileManager/hooks/use-file-clipboard.d.ts +17 -3
- package/dist/src/components/FileManager/hooks/use-file-delete.d.ts +3 -2
- package/dist/src/components/FileManager/hooks/use-file-download.d.ts +2 -1
- package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +34 -0
- package/dist/src/components/FileManager/hooks/use-folder-creation.d.ts +21 -0
- package/dist/src/components/FileManager/hooks/use-grid-actions-column.d.ts +10 -0
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +20 -0
- package/dist/src/components/FileManager/hooks/use-item-renaming.d.ts +9 -5
- package/dist/src/components/FileManager/hooks/use-new-actions.d.ts +16 -0
- package/dist/src/components/FileManager/hooks/use-tree-additional-buttons.d.ts +22 -0
- package/dist/src/components/FileManager/hooks/use-trigger-view-rename.d.ts +20 -0
- package/dist/src/components/FileManager/utils.d.ts +1 -1
- package/dist/src/components/FileName/FileName.d.ts +17 -5
- package/dist/src/components/FolderName/FolderName.d.ts +2 -2
- package/dist/src/components/FormItem/FormItem.d.ts +9 -9
- package/dist/src/components/FormItem/constants.d.ts +1 -1
- package/dist/src/components/FormPopup/FormPopup.d.ts +1 -1
- package/dist/src/components/FormPopup/constants.d.ts +1 -1
- package/dist/src/components/Grid/Grid.d.ts +12 -3
- package/dist/src/components/Grid/constants.d.ts +1 -1
- package/dist/src/components/Grid/hooks/use-grid-selection.d.ts +7 -4
- package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +3 -3
- package/dist/src/components/Grid/renderers/constants.d.ts +1 -1
- package/dist/src/components/Icon/Icon.d.ts +0 -1
- package/dist/src/components/Input/Input.d.ts +4 -4
- package/dist/src/components/InputField/InputField.d.ts +3 -3
- package/dist/src/components/InputPopup/InputPopup.d.ts +6 -6
- package/dist/src/components/Loader/Loader.d.ts +5 -5
- package/dist/src/components/Loader/constants.d.ts +2 -2
- package/dist/src/components/NoDataContent/NoDataContent.d.ts +6 -3
- package/dist/src/components/PasswordInput/PasswordInputField.d.ts +1 -1
- package/dist/src/components/Popup/Popup.d.ts +6 -6
- package/dist/src/components/Popup/constants.d.ts +3 -3
- package/dist/src/components/RadioButton/RadioButton.d.ts +6 -6
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +20 -20
- package/dist/src/components/RadioGroup/constants.d.ts +3 -3
- package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +2 -2
- package/dist/src/components/RemoveButton/RemoveButton.d.ts +6 -8
- package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +33 -0
- package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +69 -0
- package/dist/src/components/ResizableContainer/components/ResizeHandle.d.ts +10 -0
- package/dist/src/components/ResizableContainer/components/ResizeIcon.d.ts +8 -0
- package/dist/src/components/Search/Search.d.ts +4 -4
- package/dist/src/components/Search/constants.d.ts +4 -4
- package/dist/src/components/Select/Select.d.ts +9 -3
- package/dist/src/components/Select/constants.d.ts +7 -6
- package/dist/src/components/SelectField/SelectField.d.ts +6 -6
- package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +2 -2
- package/dist/src/components/Tab/Tab.d.ts +4 -4
- package/dist/src/components/Tabs/Tabs.d.ts +9 -9
- package/dist/src/components/Tag/Tag.d.ts +2 -2
- package/dist/src/components/TextAreaField/TextAreaField.d.ts +3 -3
- package/dist/src/components/Textarea/Textarea.d.ts +4 -4
- package/dist/src/hooks/use-width-breakpoint.d.ts +23 -0
- package/dist/src/index.d.ts +6 -2
- package/dist/src/models/breadcrumb.d.ts +1 -1
- package/dist/src/models/dropdown.d.ts +1 -0
- package/dist/src/models/file-manager.d.ts +15 -0
- package/dist/src/models/file.d.ts +1 -1
- package/dist/src/models/tab.d.ts +2 -1
- package/dist/src/types/dropdown.d.ts +2 -1
- package/dist/src/types/file-manager.d.ts +23 -9
- package/dist/src/types/resizable-container.d.ts +4 -0
- package/dist/src/types/tab.d.ts +1 -1
- package/package.json +5 -4
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
export interface UseGridSelectionProps<T> {
|
|
1
|
+
export interface UseGridSelectionProps<T extends object> {
|
|
2
2
|
selectedRowIds?: Set<string>;
|
|
3
|
+
selectedRows?: Map<string, T>;
|
|
3
4
|
onSelectionChange?: (selectedRowIds: Set<string>, selectedRows: T[]) => void;
|
|
5
|
+
onSelectionChangeWithMap?: (selectedRows: Map<string, T>) => void;
|
|
4
6
|
rowData?: T[];
|
|
5
7
|
getRowId: (row: T) => string;
|
|
6
8
|
}
|
|
7
|
-
export declare const useGridSelection: <T extends object>({ selectedRowIds, onSelectionChange, rowData, getRowId, }: UseGridSelectionProps<T>) => {
|
|
9
|
+
export declare const useGridSelection: <T extends object>({ selectedRowIds, selectedRows, onSelectionChange, onSelectionChangeWithMap, rowData, getRowId, }: UseGridSelectionProps<T>) => {
|
|
8
10
|
currentSelectedIds: Set<string>;
|
|
9
|
-
|
|
11
|
+
currentSelectedRows: Map<string, T>;
|
|
12
|
+
handleSelectionToggle: (row: T, checked: boolean) => void;
|
|
10
13
|
headerCheckboxState: string;
|
|
11
|
-
handleHeaderCheckboxChange: () => void;
|
|
14
|
+
handleHeaderCheckboxChange: (checked?: boolean) => void;
|
|
12
15
|
};
|
|
@@ -6,7 +6,7 @@ export interface DialDateCellRendererProps extends Partial<ICellRendererParams<R
|
|
|
6
6
|
locale?: string;
|
|
7
7
|
options?: Intl.DateTimeFormatOptions;
|
|
8
8
|
emptyPlaceholder?: string;
|
|
9
|
-
|
|
9
|
+
className?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Minimal date cell renderer (ag-Grid compatible).
|
|
@@ -26,7 +26,7 @@ export interface DialDateCellRendererProps extends Partial<ICellRendererParams<R
|
|
|
26
26
|
*
|
|
27
27
|
* @param [locale='en-US'] - Locale fixed to U.S. English by default to enforce "Jul 20, 2025".
|
|
28
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
|
|
30
|
-
* @param [
|
|
29
|
+
* @param [emptyPlaceholder] - Placeholder when value is empty/invalid.
|
|
30
|
+
* @param [className] - Additional classes merged into the wrapper.
|
|
31
31
|
*/
|
|
32
32
|
export declare const DialDateCellRenderer: FC<DialDateCellRendererProps>;
|
|
@@ -2,8 +2,8 @@ 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;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
containerClassName?: string;
|
|
6
|
+
className?: string;
|
|
7
7
|
hideBorder?: boolean;
|
|
8
8
|
tooltipText?: string;
|
|
9
9
|
tooltipTriggerClassName?: string;
|
|
@@ -31,8 +31,8 @@ export interface DialInputProps extends InputBaseProps, Partial<NumberInputBaseP
|
|
|
31
31
|
* - {@link NumberInputBaseProps} - Number input properties (min, max) - partial
|
|
32
32
|
*
|
|
33
33
|
* @param type - The HTML input type (text, password, email, number, etc.)
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
34
|
+
* @param containerClassName - Additional CSS classes to apply to the container div
|
|
35
|
+
* @param className - Additional CSS classes to apply to the input element
|
|
36
36
|
* @param hideBorder - Whether to hide the input border styling
|
|
37
37
|
* @param tooltipText - The text to display inside the tooltip. If empty, the tooltip will display the value prop.
|
|
38
38
|
* @param tooltipTriggerClassName - Additional CSS classes to apply to the tooltip
|
|
@@ -5,9 +5,9 @@ export interface DialInputFieldBaseProps extends FieldControlProps, DialFormItem
|
|
|
5
5
|
value?: string | number;
|
|
6
6
|
defaultEmptyText?: string;
|
|
7
7
|
errorText?: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
elementClassName?: string;
|
|
9
|
+
elementContainerClassName?: string;
|
|
10
|
+
containerClassName?: string;
|
|
11
11
|
}
|
|
12
12
|
export interface DialInputFieldProps extends DialInputFieldBaseProps, Partial<NumberInputBaseProps> {
|
|
13
13
|
type: string;
|
|
@@ -5,8 +5,8 @@ export interface DialInputPopupProps {
|
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
onOpen: () => void;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
valueClassName?: string;
|
|
9
|
+
inputClassName?: string;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
elementId?: string;
|
|
12
12
|
errorText?: string;
|
|
@@ -26,8 +26,8 @@ export interface DialInputPopupProps {
|
|
|
26
26
|
* emptyValueText="No value selected"
|
|
27
27
|
* onOpen={() => setModalState(true)}
|
|
28
28
|
* disabled={false}
|
|
29
|
-
*
|
|
30
|
-
*
|
|
29
|
+
* valueClassName="custom-value-class"
|
|
30
|
+
* inputClassName="custom-input-class"
|
|
31
31
|
* elementId="input-modal"
|
|
32
32
|
* errorText="This field is required"
|
|
33
33
|
* >
|
|
@@ -41,8 +41,8 @@ export interface DialInputPopupProps {
|
|
|
41
41
|
* @param children - The content to render inside the modal when it is opened.
|
|
42
42
|
* @param onOpen - A callback function triggered when the modal open button is clicked.
|
|
43
43
|
* @param [disabled=false] - Whether the input is disabled, preventing user interaction.
|
|
44
|
-
* @param [
|
|
45
|
-
* @param [
|
|
44
|
+
* @param [valueClassName] - Additional CSS classes applied to the displayed value.
|
|
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
48
|
* @param [invalid] - Whether the input is in an invalid state, affecting styling. Applyed automatically if errorText is provided.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
export interface DialLoaderProps {
|
|
3
3
|
size?: number;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
className?: string;
|
|
5
|
+
iconClassName?: string;
|
|
6
6
|
fullWidth?: boolean;
|
|
7
7
|
ariaLabel?: string;
|
|
8
8
|
}
|
|
@@ -20,12 +20,12 @@ export interface DialLoaderProps {
|
|
|
20
20
|
* <DialLoader fullWidth={false} />
|
|
21
21
|
*
|
|
22
22
|
* // Custom size and classes
|
|
23
|
-
* <DialLoader size={24}
|
|
23
|
+
* <DialLoader size={24} iconClassName="text-accent-primary" />
|
|
24
24
|
* ```
|
|
25
25
|
*
|
|
26
26
|
* @param [size=18] - Icon size in px
|
|
27
|
-
* @param [
|
|
28
|
-
* @param [
|
|
27
|
+
* @param [className] - Additional classes for the container
|
|
28
|
+
* @param [iconClassName] - Additional classes for the SVG icon
|
|
29
29
|
* @param [fullWidth=true] - Stretch to full width/height of container
|
|
30
30
|
* @param [ariaLabel='Loading'] - Accessible label for screen readers
|
|
31
31
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const loaderBaseClassName = "flex items-center justify-center text-secondary";
|
|
2
|
+
export declare const loaderIconBaseClassName = "shrink-0 grow-0 basis-auto animate-spin-steps";
|
|
@@ -3,9 +3,9 @@ export interface DialNoDataContentProps {
|
|
|
3
3
|
icon?: ReactNode;
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
containerClassName?: string;
|
|
7
|
+
titleClassName?: string;
|
|
8
|
+
descriptionClassName?: string;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* A component for displaying a message and icon when there is no data to show.
|
|
@@ -21,5 +21,8 @@ export interface DialNoDataContentProps {
|
|
|
21
21
|
* @param [icon] - Custom icon to display (defaults to clipboard icon)
|
|
22
22
|
* @param title - The message to display when no data is present
|
|
23
23
|
* @param [description] - The description to display when no data is present
|
|
24
|
+
* @param [containerClassName] - Additional CSS classes for the container
|
|
25
|
+
* @param [titleClassName] - Additional CSS classes for the title text
|
|
26
|
+
* @param [descriptionClassName] - Additional CSS classes for the description text
|
|
24
27
|
*/
|
|
25
28
|
export declare const DialNoDataContent: FC<DialNoDataContentProps>;
|
|
@@ -24,6 +24,6 @@ export interface DialPasswordInputFieldProps extends DialInputFieldBaseProps {
|
|
|
24
24
|
* @param [onChange] - Callback function called when the input value changes
|
|
25
25
|
* @param [errorText] - Error message to display below the input
|
|
26
26
|
* @param [optional=false] - Whether the field is optional
|
|
27
|
-
* @param [
|
|
27
|
+
* @param [className] - Custom CSS class for the input element
|
|
28
28
|
*/
|
|
29
29
|
export declare const DialPasswordInputField: FC<DialPasswordInputFieldProps>;
|
|
@@ -4,9 +4,9 @@ export interface DialPopupProps {
|
|
|
4
4
|
open?: boolean;
|
|
5
5
|
title?: string | ReactNode;
|
|
6
6
|
portalId?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
className?: string;
|
|
8
|
+
overlayClassName?: string;
|
|
9
|
+
headingClassName?: string;
|
|
10
10
|
dividers?: boolean;
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
footer?: ReactNode;
|
|
@@ -40,9 +40,9 @@ export interface DialPopupProps {
|
|
|
40
40
|
* @param [open=false] - Controls visibility of the popup
|
|
41
41
|
* @param [title] - Optional title rendered in the header
|
|
42
42
|
* @param [portalId] - Optional portal container id
|
|
43
|
-
* @param [
|
|
44
|
-
* @param [
|
|
45
|
-
* @param [
|
|
43
|
+
* @param [className] - Additional CSS classes applied to the popup container
|
|
44
|
+
* @param [overlayClassName] - Additional CSS classes applied to the overlay
|
|
45
|
+
* @param [headingClassName] - Additional CSS classes applied to the title element
|
|
46
46
|
* @param [dividers=true] - Whether to render separators between sections
|
|
47
47
|
* @param [children] - Body content
|
|
48
48
|
* @param [footer] - Footer area for actions
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PopupSize } from '../../types/popup';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
2
|
+
export declare const overlayBaseClassName = "z-[52] flex items-center justify-center bg-blackout md:p-4";
|
|
3
|
+
export declare const popupDividerClassName = "divide-tertiary divide-y";
|
|
4
|
+
export declare const popupHeaderClassName = "flex flex-row justify-between py-4 px-6 items-center";
|
|
5
5
|
export declare const popupSizeClassMap: Record<PopupSize, string>;
|
|
@@ -6,11 +6,11 @@ export interface DialRadioButtonProps {
|
|
|
6
6
|
description?: ReactNode;
|
|
7
7
|
checked?: boolean;
|
|
8
8
|
inputId: string;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
className?: string;
|
|
10
|
+
labelClassName?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
onChange?: (value: string) => void;
|
|
13
|
-
|
|
13
|
+
descriptionClassName?: string;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* A stylized, accessible radio input with optional description.
|
|
@@ -37,10 +37,10 @@ export interface DialRadioButtonProps {
|
|
|
37
37
|
* @param [description] - Supporting text shown when checked
|
|
38
38
|
* @param [checked=false] - Controlled checked state
|
|
39
39
|
* @param inputId - ID associated with the label
|
|
40
|
-
* @param [
|
|
41
|
-
* @param [
|
|
40
|
+
* @param [className] - Additional classes applied to the input element
|
|
41
|
+
* @param [labelClassName] - Additional classes applied to the label element
|
|
42
42
|
* @param [disabled] - Disabled state of the control
|
|
43
43
|
* @param [onChange] - Callback fired with `value` when the radio is changed
|
|
44
|
-
* @param [
|
|
44
|
+
* @param [descriptionClassName] - Additional classes applied to the description block
|
|
45
45
|
*/
|
|
46
46
|
export declare const DialRadioButton: FC<DialRadioButtonProps>;
|
|
@@ -9,16 +9,16 @@ export interface DialRadioGroupProps {
|
|
|
9
9
|
activeRadioButton: string;
|
|
10
10
|
orientation: RadioGroupOrientation;
|
|
11
11
|
onChange: (radioId: string) => void;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
radioClassName?: string;
|
|
13
|
+
groupLabelClassName?: string;
|
|
14
|
+
labelClassName?: string;
|
|
15
|
+
containerClassName?: string;
|
|
16
|
+
formItemChildrenClassName?: string;
|
|
17
|
+
selectedItemClassName?: string;
|
|
18
|
+
selectedLabelClassName?: string;
|
|
19
|
+
radioGroupClassName?: string;
|
|
20
|
+
inputContainerClassName?: string;
|
|
21
|
+
selectedInputContainerClassName?: string;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Groups multiple `DialRadio` options and renders custom content for the active option.
|
|
@@ -43,16 +43,16 @@ export interface DialRadioGroupProps {
|
|
|
43
43
|
*
|
|
44
44
|
* @param [fieldTitle] - Optional label rendered by `DialField`
|
|
45
45
|
* @param elementId - Name for the underlying radio group; also used for input `name`
|
|
46
|
-
* @param [
|
|
47
|
-
* @param [
|
|
48
|
-
* @param [
|
|
49
|
-
* @param [
|
|
50
|
-
* @param [
|
|
51
|
-
* @param [
|
|
52
|
-
* @param [
|
|
53
|
-
* @param [
|
|
54
|
-
* @param [
|
|
55
|
-
* @param [
|
|
46
|
+
* @param [radioClassName] - Additional classes applied to each radio input
|
|
47
|
+
* @param [inputContainerClassName] - Additional classes applied to each radio input's container
|
|
48
|
+
* @param [selectedInputContainerClassName] - Additional classes applied to the selected radio input's container
|
|
49
|
+
* @param [groupLabelClassName] - Optional classes applied to the group label. If not provided, `labelClassName` will be used.
|
|
50
|
+
* @param [formItemChildrenClassName] - Additional classes applied to the DialFormItem's children container
|
|
51
|
+
* @param [labelClassName] - Additional classes applied to each radio label
|
|
52
|
+
* @param [containerClassName] - Additional classes applied to the outer container
|
|
53
|
+
* @param [selectedItemClassName] - Additional classes applied to the selected option's content container
|
|
54
|
+
* @param [selectedLabelClassName] - Additional classes applied to the selected option's label
|
|
55
|
+
* @param [radioGroupClassName] - Additional classes applied to the radio group container
|
|
56
56
|
* @param [disabled] - Disables all child radios when set
|
|
57
57
|
* @param radioButtons - Array of options with ids, labels, and optional content
|
|
58
58
|
* @param activeRadioButton - The id of the currently selected radio
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RadioGroupOrientation } from '../../types/radio-group';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
2
|
+
export declare const groupBaseClassName = "flex flex-col gap-2";
|
|
3
|
+
export declare const optionsWrapperBaseClassName = "flex";
|
|
4
|
+
export declare const selectedContentClassName = "pb-1 mt-2";
|
|
5
5
|
export declare const orientationClassMap: Record<RadioGroupOrientation, string>;
|
|
@@ -51,8 +51,8 @@ export interface RadioGroupPopupFieldProps extends Pick<DialFieldLabelProps, 'fi
|
|
|
51
51
|
* @param [selectedValue] - Current value id used to resolve the displayed option name
|
|
52
52
|
* @param radioButtons - Collection of radio options (id/name)
|
|
53
53
|
* @param [customInputValue] - Custom value text to display instead of a radio option name
|
|
54
|
-
* @param [
|
|
55
|
-
* @param [
|
|
54
|
+
* @param [valueClassName] - Extra classes applied to the value text in the collapsed field
|
|
55
|
+
* @param [inputClassName] - Extra classes applied to the collapsed input container
|
|
56
56
|
* @param emptyValueText - Placeholder text when no value is selected
|
|
57
57
|
* @param [onClose] - Callback fired when the popup closes
|
|
58
58
|
* @param title - Title text shown in the popup header
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
ariaLabel?: string;
|
|
6
|
-
onClick: (e: MouseEvent) => void;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DialButtonProps } from '../Button/Button';
|
|
3
|
+
export interface DialRemoveButtonProps extends Omit<DialButtonProps, 'iconBefore' | 'iconAfter'> {
|
|
4
|
+
iconClassName?: string;
|
|
7
5
|
}
|
|
8
6
|
/**
|
|
9
7
|
* A specialized button component for removal or delete actions.
|
|
@@ -14,11 +12,11 @@ export interface DialRemoveButtonProps {
|
|
|
14
12
|
* <DialRemoveButton
|
|
15
13
|
* label="Delete item"
|
|
16
14
|
* onClick={handleDelete}
|
|
17
|
-
*
|
|
15
|
+
* iconClassName="text-error"
|
|
18
16
|
* />
|
|
19
17
|
* @component
|
|
20
18
|
* @param {DialRemoveButtonProps} props - The properties for the remove button component.
|
|
21
|
-
* @param {string} [props.
|
|
19
|
+
* @param {string} [props.iconClassName] - Optional CSS class applied to the trash icon for styling or sizing.
|
|
22
20
|
* @returns {JSX.Element} The rendered remove button component.
|
|
23
21
|
*/
|
|
24
22
|
export declare const DialRemoveButton: FC<DialRemoveButtonProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DialResizableContainerProps } from './ResizableContainer';
|
|
3
|
+
export interface DialConditionalResizableContainerProps extends DialResizableContainerProps {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* DialConditionalResizableContainer — A conditional wrapper around `DialResizableContainer`.
|
|
8
|
+
*
|
|
9
|
+
* This component renders its children inside a resizable container only when `enabled` is true.
|
|
10
|
+
* When `enabled` is false, children are rendered directly without any resizable behavior.
|
|
11
|
+
*
|
|
12
|
+
* All other props are the same as `DialResizableContainer`. See the documentation for
|
|
13
|
+
* `DialResizableContainer` for full details on usage, controlled/uncontrolled modes, sides, and callbacks.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <DialConditionalResizableContainer
|
|
18
|
+
* enabled={!isCollapsed}
|
|
19
|
+
* defaultWidth={260}
|
|
20
|
+
* minWidth={180}
|
|
21
|
+
* maxWidth={520}
|
|
22
|
+
* onResize={(w) => console.log('Current width:', w)}
|
|
23
|
+
* onResizeStop={(w) => setSidebarWidth(w)}
|
|
24
|
+
* >
|
|
25
|
+
* <Sidebar />
|
|
26
|
+
* </DialConditionalResizableContainer>
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @param enabled - Whether resizing is enabled. When false, children are rendered directly.
|
|
30
|
+
* @param children - Content to render inside the container.
|
|
31
|
+
* @see DialResizableContainer
|
|
32
|
+
*/
|
|
33
|
+
export declare const DialConditionalResizableContainer: FC<DialConditionalResizableContainerProps>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ResizableContainerSide } from '../../types/resizable-container';
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
|
+
export interface DialResizableContainerProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
minWidth: number;
|
|
6
|
+
maxWidth: number;
|
|
7
|
+
width?: number;
|
|
8
|
+
defaultWidth: number;
|
|
9
|
+
onResizeStop?: (width: number) => void;
|
|
10
|
+
onResize?: (width: number) => void;
|
|
11
|
+
side?: ResizableContainerSide;
|
|
12
|
+
resizeHandlerClassName?: string;
|
|
13
|
+
resizeHandler?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* DialResizableContainer — A reusable resizable container
|
|
17
|
+
* supporting both **controlled** and **uncontrolled** width modes.
|
|
18
|
+
*
|
|
19
|
+
* Controlled Mode
|
|
20
|
+
*
|
|
21
|
+
* Provide `width` and optionally `onResizeStop`:
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <DialResizableContainer
|
|
24
|
+
* width={sidebarWidth}
|
|
25
|
+
* onResizeStop={(w) => setSidebarWidth(w)}
|
|
26
|
+
* minWidth={180}
|
|
27
|
+
* maxWidth={520}
|
|
28
|
+
* >
|
|
29
|
+
* <Sidebar />
|
|
30
|
+
* </DialResizableContainer>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* Uncontrolled Mode
|
|
34
|
+
*
|
|
35
|
+
* Omit `width` entirely — the component manages its own width:
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <DialResizableContainer
|
|
38
|
+
* defaultWidth={260}
|
|
39
|
+
* minWidth={180}
|
|
40
|
+
* maxWidth={520}
|
|
41
|
+
* >
|
|
42
|
+
* <Sidebar />
|
|
43
|
+
* </DialResizableContainer>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* Features:
|
|
47
|
+
* - Resize from left or right
|
|
48
|
+
* - Fully supports controlled & uncontrolled sizing
|
|
49
|
+
* - Custom resize handler (icon or any ReactNode)
|
|
50
|
+
* - Callback when resize stops (optional)
|
|
51
|
+
* - Smooth hover/drag visibility transitions
|
|
52
|
+
*
|
|
53
|
+
* @param [children] - Content placed inside the container.
|
|
54
|
+
* @param [minWidth] - Minimum allowed width (px).
|
|
55
|
+
* @param [maxWidth] - Maximum allowed width (px).
|
|
56
|
+
* @param [width] - Controlled width. If omitted → uncontrolled mode.
|
|
57
|
+
* @param [defaultWidth] - Initial width in uncontrolled mode.
|
|
58
|
+
* @param [onResizeStop] - Optional callback fired when resize ends.
|
|
59
|
+
* @param [onResize] - Optional callback fired continuously during resizing with current width.
|
|
60
|
+
* @param [side=ResizableContainerSide.Right] - Resize handle side.
|
|
61
|
+
* @param [resizeHandlerClassName] - Optional additional CSS classes.
|
|
62
|
+
* @param [resizeHandler] - Optional custom handler element.
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* - In uncontrolled mode, width is stored internally.
|
|
66
|
+
* - `onResizeStop` is optional in both modes.
|
|
67
|
+
* - Controlled mode always uses the value from `width`.
|
|
68
|
+
*/
|
|
69
|
+
export declare const DialResizableContainer: FC<DialResizableContainerProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ResizableContainerSide } from '../../../types/resizable-container';
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
|
+
interface ResizeHandleProps {
|
|
4
|
+
side: ResizableContainerSide;
|
|
5
|
+
isResizing: boolean;
|
|
6
|
+
customHandler?: ReactNode;
|
|
7
|
+
handlerClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ResizeHandle: FC<ResizeHandleProps>;
|
|
10
|
+
export {};
|
|
@@ -7,8 +7,8 @@ export interface DialSearchProps {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
readonly?: boolean;
|
|
9
9
|
invalid?: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
className?: string;
|
|
11
|
+
containerClassName?: string;
|
|
12
12
|
onChange?: (value: string) => void;
|
|
13
13
|
size?: SearchSize;
|
|
14
14
|
allowClear?: boolean;
|
|
@@ -35,8 +35,8 @@ export interface DialSearchProps {
|
|
|
35
35
|
* @param [disabled=false] - Whether the input is disabled
|
|
36
36
|
* @param [readonly=false] - Whether the input is read-only (non-editable)
|
|
37
37
|
* @param [invalid=false] - Whether the input should be styled as invalid
|
|
38
|
-
* @param [
|
|
39
|
-
* @param [
|
|
38
|
+
* @param [className] - Additional CSS classes applied to the input element
|
|
39
|
+
* @param [containerClassName] - Additional CSS classes applied to the container
|
|
40
40
|
* @param [onChange] - Callback fired when the input value changes
|
|
41
41
|
* @param [size=SearchSize.Base] - The size of the search input. Uses the {@link SearchSize} enum.
|
|
42
42
|
* @param [allowClear=true] - Whether to show a clear button when there is a value
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const SIZE_CONFIG: {
|
|
2
2
|
small: {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
textClassName: string;
|
|
4
|
+
containerClassName: string;
|
|
5
5
|
iconSize: number;
|
|
6
6
|
iconStroke: number;
|
|
7
7
|
};
|
|
8
8
|
base: {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
textClassName: string;
|
|
10
|
+
containerClassName: string;
|
|
11
11
|
iconSize: number;
|
|
12
12
|
iconStroke: number;
|
|
13
13
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { FC, ReactNode, MouseEvent } from 'react';
|
|
1
|
+
import { FC, ReactNode, MouseEvent, Ref } from 'react';
|
|
2
2
|
import { SelectOption } from '../../models/select';
|
|
3
3
|
import { SelectSize, SelectVariant } from '../../types/select';
|
|
4
4
|
export interface DialSelectProps {
|
|
5
5
|
options: SelectOption[];
|
|
6
6
|
multiple?: boolean;
|
|
7
|
+
elementId?: string;
|
|
7
8
|
size?: SelectSize;
|
|
8
9
|
variant?: SelectVariant;
|
|
9
10
|
value?: string | string[];
|
|
11
|
+
customSelectedValue?: string;
|
|
10
12
|
prefix?: string;
|
|
11
13
|
defaultValue?: string | string[];
|
|
12
14
|
placeholder?: string;
|
|
@@ -18,10 +20,11 @@ export interface DialSelectProps {
|
|
|
18
20
|
emptyStateDescription?: string;
|
|
19
21
|
emptyStateIcon?: ReactNode;
|
|
20
22
|
disabled?: boolean;
|
|
21
|
-
|
|
23
|
+
className?: string;
|
|
22
24
|
closable?: boolean;
|
|
23
25
|
header?: ReactNode | (() => ReactNode);
|
|
24
26
|
footer?: ReactNode | (() => ReactNode);
|
|
27
|
+
dismissRef?: Ref<unknown>;
|
|
25
28
|
onClose?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
26
29
|
onChange?: (next: string | string[]) => void;
|
|
27
30
|
inlineSearch?: boolean;
|
|
@@ -51,10 +54,12 @@ export interface DialSelectProps {
|
|
|
51
54
|
* ```
|
|
52
55
|
*
|
|
53
56
|
* @param options - Array of options to select from.
|
|
57
|
+
* @param [elementId] - The id attribute for the select element.
|
|
54
58
|
* @param [multiple] - Whether multiple selections are allowed.
|
|
55
59
|
* @param [size=SelectSize.Md] - Size of the control.
|
|
56
60
|
* @param [variant=SelectVariant.Primary] - Visual variant.
|
|
57
61
|
* @param [value] - Controlled selected value(s).
|
|
62
|
+
* @param [customSelectedValue] - Custom string to render as the selected value in single mode.
|
|
58
63
|
* @param [prefix] - Prefix for selected value(s).
|
|
59
64
|
* @param [defaultValue] - Uncontrolled initial selected value(s).
|
|
60
65
|
* @param [placeholder="Select..."] - Placeholder text when no selection is made.
|
|
@@ -66,7 +71,7 @@ export interface DialSelectProps {
|
|
|
66
71
|
* @param [emptyStateDescription] - Description text when there are no options.
|
|
67
72
|
* @param [emptyStateIcon] - Icon to display when there are no options.
|
|
68
73
|
* @param [disabled=false] - Disable the control.
|
|
69
|
-
* @param [
|
|
74
|
+
* @param [className] - Additional CSS classes for the trigger.
|
|
70
75
|
* @param [closable=false] - Show a close button in the dropdown header.
|
|
71
76
|
* @param [header] - Custom node/function rendered above the options.
|
|
72
77
|
* @param [footer] - Custom node/function rendered below the options.
|
|
@@ -74,5 +79,6 @@ export interface DialSelectProps {
|
|
|
74
79
|
* @param [onChange] - Called when the selection changes.
|
|
75
80
|
* @param [inlineSearch=false] - Render a plain input inside trigger (single mode only).
|
|
76
81
|
* @param [onFooterClick] - Called when the footer element is clicked. When provided, automatically closes the dropdown.
|
|
82
|
+
* @param [dismissRef] - Ref object to expose a `dismiss` method to programmatically close the select.
|
|
77
83
|
*/
|
|
78
84
|
export declare const DialSelect: FC<DialSelectProps>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
1
|
+
export declare const selectTriggerBaseClassName = "dial-input flex w-full items-center justify-between gap-2 dial-small";
|
|
2
|
+
export declare const selectOverlayBaseClassName = "w-full rounded flex flex-col";
|
|
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
|
+
export declare const selectOptionSelectedClassName = "bg-accent-primary-alpha";
|
|
5
|
+
export declare const selectOptionSingleSelectedClassName = "bg-accent-primary-alpha border-l border-accent-primary border-1";
|
|
6
|
+
export declare const selectOptionDisabledClassName = "opacity-75";
|
|
7
|
+
export declare const dropdownMenuMaxHeight = 352;
|
|
7
8
|
export declare const selectChevronIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,9 +2,9 @@ import { FC } from 'react';
|
|
|
2
2
|
import { DialFormItemProps } from '../FormItem/FormItem';
|
|
3
3
|
import { DialSelectProps } from '../Select/Select';
|
|
4
4
|
import { DialFieldLabelProps } from '../Field/Field';
|
|
5
|
-
export interface DialSelectFieldProps extends Omit<DialSelectProps, '
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export interface DialSelectFieldProps extends Omit<DialSelectProps, 'className' | 'elementId'>, Omit<DialFieldLabelProps, 'htmlFor'>, Omit<DialFormItemProps, 'label' | 'children' | 'value'> {
|
|
6
|
+
selectClassName?: string;
|
|
7
|
+
containerClassName?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* A Select field wrapper that composes `DialFormItem` and `DialSelect`.
|
|
@@ -26,12 +26,12 @@ export interface DialSelectFieldProps extends Omit<DialSelectProps, 'cssClass'>,
|
|
|
26
26
|
* />
|
|
27
27
|
*
|
|
28
28
|
* @params - Component properties extending:
|
|
29
|
-
* - {@link DialSelectProps} for select options and props, except for
|
|
29
|
+
* - {@link DialSelectProps} for select options and props, except for className
|
|
30
30
|
* - {@link DialFormItemProps} for form item props, except for htmlFor
|
|
31
31
|
* - {@link DialFieldLabelProps} for label props, except for label, children, value
|
|
32
32
|
*
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
33
|
+
* @param selectClassName CSS class for the select element
|
|
34
|
+
* @param containerClassName CSS class for the form item container
|
|
35
35
|
* @param emptyStateTitle Title to show when there are no options
|
|
36
36
|
* @param restSelectProps All other DialSelect props
|
|
37
37
|
* @param restFormItemProps All other DialFormItem props
|