@epam/ai-dial-ui-kit 0.13.0-dev.9 → 0.14.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/dist/CHANGELOG.md +48 -1
- package/dist/{JsonEditor-CRSkEnWP.cjs → JsonEditor-pyqbLZZf.cjs} +1 -1
- package/dist/{JsonEditor-Djt1V27V.js → JsonEditor-v9m_npfK.js} +1 -1
- package/dist/MarkdownEditor-5UpxUtXf.js +75 -0
- package/dist/{MarkdownEditor-BbGX2uA9.cjs → MarkdownEditor-9aPIyyuu.cjs} +1 -1
- package/dist/MarkdownEditor-BjqdSHPU.cjs +1 -0
- package/dist/{MarkdownEditor-DtKScLM2.js → MarkdownEditor-CWZVSR--.js} +1 -1
- package/dist/components-manifest.json +3420 -391
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +201 -148
- package/dist/{index-JVDPW40K.js → index-DKDaSZqV.js} +24490 -21241
- package/dist/index-xlqMH2Q1.cjs +71 -0
- package/dist/index.css +6 -2
- package/dist/mcp-server.cjs +29 -9
- package/dist/migration-guides/0.13.0/caption-semi-text-lead-rename.md +82 -0
- package/dist/migration-guides/0.13.0/field-label-props-unification.md +94 -0
- package/dist/migration-guides/0.13.0/focus-border-token-rename.md +106 -0
- package/dist/migration-guides/0.13.0/progress-bar-2-0-rewrite.md +103 -0
- package/dist/migration-guides/0.13.0/spinner-dial-prefix-removal.md +69 -0
- package/dist/migration-guides/0.13.0/typography-heading-scale-shift.md +93 -0
- package/dist/migration-guides/README.md +6 -0
- package/dist/src/components/Accordion/Accordion.d.ts +1 -0
- package/dist/src/components/Analytics/Bar/Bar.d.ts +12 -7
- package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +23 -16
- package/dist/src/components/Analytics/Card/Card.d.ts +14 -3
- package/dist/src/components/Analytics/ErrorTag/ErrorTag.d.ts +1 -0
- package/dist/src/components/Analytics/Histogram/Histogram.d.ts +9 -6
- package/dist/src/components/Analytics/Histogram/utils.d.ts +10 -0
- package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +1 -0
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +3 -0
- package/dist/src/components/Button/Button.d.ts +1 -0
- package/dist/src/components/Button/ButtonWrappers.d.ts +1 -15
- package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +1 -0
- package/dist/src/components/CaptionText/CaptionText.d.ts +1 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/src/components/CloseButton/CloseButton.d.ts +1 -0
- package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +1 -0
- package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +1 -0
- package/dist/src/components/DraggableItem/DraggableItem.d.ts +1 -0
- package/dist/src/components/DropdownIcon/DropdownIcon.d.ts +1 -0
- package/dist/src/components/EllipsisTooltip/EllipsisTooltip.d.ts +1 -0
- package/dist/src/components/FabButton/FabButton.d.ts +8 -3
- package/dist/src/components/FileIcon/FileIcon.d.ts +1 -0
- package/dist/src/components/FileManager/FileManager.d.ts +3 -0
- package/dist/src/components/FileManager/FileManagerProvider.d.ts +1 -0
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +3 -0
- package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +3 -0
- package/dist/src/components/FileManager/hooks/use-file-manager-context.d.ts +2 -0
- package/dist/src/components/FileManager/hooks/use-file-manager-tabs.d.ts +3 -0
- package/dist/src/components/FileName/FileName.d.ts +1 -0
- package/dist/src/components/FolderName/FolderName.d.ts +1 -0
- package/dist/src/components/FormItem/FormItem.d.ts +1 -0
- package/dist/src/components/FormPopup/FormPopup.d.ts +1 -0
- package/dist/src/components/Grid/Grid.d.ts +1 -0
- package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +1 -0
- package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +1 -0
- package/dist/src/components/Icon/Icon.d.ts +1 -0
- package/dist/src/components/IconButton/IconButton.d.ts +5 -0
- package/dist/src/components/IconButton/IconButtonWrappers.d.ts +1 -0
- package/dist/src/components/Input/Input.d.ts +1 -0
- package/dist/src/components/InputPopup/InputPopup.d.ts +1 -0
- package/dist/src/components/JsonEditor/JsonEditor.d.ts +1 -0
- package/dist/src/components/Label/Label.d.ts +1 -0
- package/dist/src/components/LabelledText/LabelledText.d.ts +1 -0
- package/dist/src/components/LoadFileArea/LoadFileArea.d.ts +1 -0
- package/dist/src/components/LoadFileArea/LoadFileAreaField.d.ts +1 -0
- package/dist/src/components/Loader/Loader.d.ts +1 -0
- package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +1 -0
- package/dist/src/components/New/Accordion/Accordion.d.ts +71 -0
- package/dist/src/components/New/Button/Button.d.ts +66 -0
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +94 -0
- package/dist/src/components/New/Button/__tests__/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Button/constants.d.ts +2 -0
- package/dist/src/components/New/Button/utils.d.ts +2 -0
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +24 -0
- package/dist/src/components/New/ButtonDropdown/constants.d.ts +1 -0
- package/dist/src/components/New/Calendar/Calendar.d.ts +55 -0
- package/dist/src/components/New/Calendar/constants.d.ts +17 -0
- package/dist/src/components/New/Calendar/utils.d.ts +25 -0
- package/dist/src/components/New/Calendar/utils.spec.d.ts +1 -0
- package/dist/src/components/New/CaptionText/CaptionText.d.ts +21 -0
- package/dist/src/components/New/CardShell/CardShell.d.ts +14 -0
- package/dist/src/components/New/CloseButton/CloseButton.d.ts +33 -0
- package/dist/src/components/New/ConfirmationPopup/ConfirmationPopup.d.ts +55 -0
- package/dist/src/components/New/ConfirmationPopup/constants.d.ts +14 -0
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +87 -0
- package/dist/src/components/New/Dropdown/DropdownSubMenuItem.d.ts +8 -0
- package/dist/src/components/New/Dropdown/constants.d.ts +9 -0
- package/dist/src/components/New/FileDropzone/FileDropzone.d.ts +81 -0
- package/dist/src/components/New/FolderPath/FolderPath.d.ts +32 -0
- package/dist/src/components/New/Highlight/Highlight.d.ts +19 -0
- package/dist/src/components/New/IconButton/IconButton.d.ts +48 -0
- package/dist/src/components/New/IconButton/IconButtonWrappers.d.ts +71 -0
- package/dist/src/components/New/InfoButton/InfoButton.d.ts +26 -0
- package/dist/src/components/New/InfoButton/InfoButton.stories.d.ts +6 -0
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +51 -0
- package/dist/src/components/New/Input/Button/InputButton.d.ts +25 -0
- package/dist/src/components/New/Input/Button/constants.d.ts +1 -0
- package/dist/src/components/New/Input/Input.d.ts +67 -0
- package/dist/src/components/New/Input/utils.d.ts +2 -0
- package/dist/src/components/New/Label/Label.d.ts +33 -0
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +33 -0
- package/dist/src/components/New/MarkdownEditor/constants.d.ts +20 -0
- package/dist/src/components/New/Notification/Notification.d.ts +7 -0
- package/dist/src/components/New/Notification/constants.d.ts +12 -1
- package/dist/src/components/New/NumberInput/NumberInput.d.ts +36 -0
- package/dist/src/components/New/PasswordInput/PasswordInput.d.ts +33 -0
- package/dist/src/components/New/Popup/Popup.d.ts +72 -0
- package/dist/src/components/New/Popup/constants.d.ts +10 -0
- package/dist/src/components/New/Search/Search.d.ts +42 -0
- package/dist/src/components/New/Select/MultiSelectTags.d.ts +17 -0
- package/dist/src/components/New/Select/Select.d.ts +110 -0
- package/dist/src/components/New/Select/SelectSubMenuItem.d.ts +8 -0
- package/dist/src/components/New/Select/constants.d.ts +32 -0
- package/dist/src/components/New/Switch/Switch.d.ts +38 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +63 -0
- package/dist/src/components/New/Tag/Tag.d.ts +45 -0
- package/dist/src/components/New/TagInput/TagInput.d.ts +72 -0
- package/dist/src/components/New/TagInput/utils.d.ts +21 -0
- package/dist/src/components/New/TagInput/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Textarea/Textarea.d.ts +39 -0
- package/dist/src/components/New/constants/overlay.d.ts +24 -0
- package/dist/src/components/NoDataContent/NoDataContent.d.ts +1 -0
- package/dist/src/components/Notification/Notification.d.ts +1 -0
- package/dist/src/components/NumberInput/NumberInput.d.ts +1 -0
- package/dist/src/components/Pagination/Pagination.d.ts +3 -0
- package/dist/src/components/PasswordInput/PasswordInput.d.ts +1 -0
- package/dist/src/components/Popup/Popup.d.ts +2 -1
- package/dist/src/components/ProgressBar/ProgressBar.d.ts +51 -10
- package/dist/src/components/RadioButton/RadioButton.d.ts +1 -0
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +1 -0
- package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +1 -0
- package/dist/src/components/RemoveButton/RemoveButton.d.ts +1 -0
- package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +1 -0
- package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +1 -0
- package/dist/src/components/SchemaRenderer/SchemaRenderer.d.ts +1 -0
- package/dist/src/components/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +9 -1
- package/dist/src/components/SchemaRenderer/types.d.ts +6 -1
- package/dist/src/components/SchemaRenderer/utils.d.ts +1 -0
- package/dist/src/components/Search/Search.d.ts +1 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +1 -0
- package/dist/src/components/Select/Select.d.ts +1 -0
- package/dist/src/components/SelectField/SelectField.d.ts +1 -0
- package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +1 -0
- package/dist/src/components/Skeleton/Skeleton.d.ts +19 -18
- package/dist/src/components/Skeleton/utils.d.ts +2 -2
- package/dist/src/components/Slider/Slider.d.ts +1 -0
- package/dist/src/components/Spinner/Spinner.d.ts +5 -2
- package/dist/src/components/Steps/Steps.d.ts +1 -0
- package/dist/src/components/Switch/Switch.d.ts +1 -0
- package/dist/src/components/Tabs/Tabs.d.ts +1 -0
- package/dist/src/components/Tag/Tag.d.ts +1 -0
- package/dist/src/components/TagInput/TagInput.d.ts +1 -0
- package/dist/src/components/Textarea/Textarea.d.ts +1 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/src/components/Tooltip/TooltipContainer.d.ts +1 -0
- package/dist/src/components/Tooltip/TooltipContent.d.ts +1 -0
- package/dist/src/components/Tooltip/TooltipTrigger.d.ts +1 -0
- package/dist/src/index.d.ts +89 -13
- package/dist/src/mcp/types.d.ts +12 -0
- package/dist/src/models/dropdown.d.ts +27 -0
- package/dist/src/types/button.d.ts +1 -0
- package/dist/src/types/calendar.d.ts +6 -0
- package/dist/src/types/skeleton.d.ts +3 -3
- package/dist/src/utils/__tests__/accessible-name.spec.d.ts +1 -0
- package/dist/src/utils/__tests__/file-accept.spec.d.ts +1 -0
- package/dist/src/utils/accessible-name.d.ts +19 -0
- package/dist/src/utils/file-accept.d.ts +16 -0
- package/dist/src/utils/sub-menu-floating.d.ts +15 -2
- package/package.json +4 -2
- package/dist/index-CmA_N28F.cjs +0 -71
|
@@ -4,9 +4,13 @@ export interface SchemaKeyValueEditorProps {
|
|
|
4
4
|
schema: JsonSchemaDef;
|
|
5
5
|
value: unknown;
|
|
6
6
|
onChange: (value: unknown) => void;
|
|
7
|
+
path: string[];
|
|
8
|
+
level: number;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
|
-
* Renders an `additionalProperties` object schema as an editable key-value list.
|
|
11
|
+
* Renders an `additionalProperties` object schema as an editable key-value list. Primitive
|
|
12
|
+
* values render inline; object/`oneOf`/array values render as a collapsible section recursing
|
|
13
|
+
* back into `SchemaFieldContent`.
|
|
10
14
|
* aliases: KeyValueSchemaEditor|AdditionalPropertiesEditor
|
|
11
15
|
*
|
|
12
16
|
* @example
|
|
@@ -15,11 +19,15 @@ export interface SchemaKeyValueEditorProps {
|
|
|
15
19
|
* schema={{ type: 'object', additionalProperties: { type: 'string' } }}
|
|
16
20
|
* value={{ foo: 'bar' }}
|
|
17
21
|
* onChange={(v) => console.log(v)}
|
|
22
|
+
* path={['metadata']}
|
|
23
|
+
* level={1}
|
|
18
24
|
* />
|
|
19
25
|
* ```
|
|
20
26
|
*
|
|
21
27
|
* @param schema - The JSON Schema object definition with `additionalProperties`
|
|
22
28
|
* @param value - Current object value (treated as a key-value map)
|
|
23
29
|
* @param onChange - Called with the updated object when pairs are added, removed, or changed
|
|
30
|
+
* @param path - Field path segments used for validation error tracking
|
|
31
|
+
* @param level - Nesting depth passed to child section components
|
|
24
32
|
*/
|
|
25
33
|
export declare const SchemaKeyValueEditor: FC<SchemaKeyValueEditorProps>;
|
|
@@ -22,6 +22,10 @@ export declare enum JsonSchemaType {
|
|
|
22
22
|
Array = "array",
|
|
23
23
|
Null = "null"
|
|
24
24
|
}
|
|
25
|
+
export interface DialMeta {
|
|
26
|
+
'dial:propertyOrder'?: number;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}
|
|
25
29
|
export interface JsonSchemaDef {
|
|
26
30
|
$ref?: string;
|
|
27
31
|
type?: string | string[];
|
|
@@ -41,11 +45,12 @@ export interface JsonSchemaDef {
|
|
|
41
45
|
items?: JsonSchemaDef;
|
|
42
46
|
oneOf?: JsonSchemaDef[];
|
|
43
47
|
anyOf?: JsonSchemaDef[];
|
|
48
|
+
allOf?: JsonSchemaDef[];
|
|
44
49
|
discriminator?: {
|
|
45
50
|
propertyName: string;
|
|
46
51
|
mapping: Record<string, string>;
|
|
47
52
|
};
|
|
48
|
-
'dial:meta'?:
|
|
53
|
+
'dial:meta'?: DialMeta;
|
|
49
54
|
'dial:resource'?: boolean;
|
|
50
55
|
acceptableResourceTypes?: string[];
|
|
51
56
|
[key: string]: unknown;
|
|
@@ -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 sortByPropertyOrder(entries: [string, JsonSchemaDef][]): [string, JsonSchemaDef][];
|
|
3
4
|
export declare function isMissingRequiredValue(value: unknown): boolean;
|
|
4
5
|
export declare function isObjectType(schema: JsonSchemaDef): boolean;
|
|
5
6
|
export declare function toFieldLabel(key: string): string;
|
|
@@ -9,6 +9,7 @@ export interface DialSearchProps extends Omit<DialInputProps, 'type' | 'size' |
|
|
|
9
9
|
/**
|
|
10
10
|
* A search input component with a customizable placeholder, icons, flexible props, and the ability
|
|
11
11
|
* aliases: SearchField|QueryInput
|
|
12
|
+
* Design system 1.0
|
|
12
13
|
*
|
|
13
14
|
* to clear the input value via a clear button. Supports multiple sizes for flexible layouts.
|
|
14
15
|
*
|
|
@@ -11,6 +11,7 @@ export interface DialSegmentedControlProps<T extends string> {
|
|
|
11
11
|
* A single-select control for switching between a small set of mutually exclusive,
|
|
12
12
|
* equally-sized options (e.g. view switchers).
|
|
13
13
|
* aliases: SegmentedButton|ViewSwitcher
|
|
14
|
+
* Design system 1.0
|
|
14
15
|
*
|
|
15
16
|
* Renders a horizontal group of segments where every option is always visible and
|
|
16
17
|
* equally sized. Supports 2 or more segments, optional per-option icons, and
|
|
@@ -41,6 +41,7 @@ export interface DialSelectProps {
|
|
|
41
41
|
/**
|
|
42
42
|
* A versatile select supporting single and multiple selections.
|
|
43
43
|
* aliases: OptionPicker|ChoiceSelector
|
|
44
|
+
* Design system 1.0
|
|
44
45
|
*
|
|
45
46
|
* Single mode mirrors the legacy visual:
|
|
46
47
|
* - Trigger shows the selected option's leading icon + label.
|
|
@@ -9,6 +9,7 @@ export interface DialSelectFieldProps extends Omit<DialSelectProps, 'className'
|
|
|
9
9
|
/**
|
|
10
10
|
* A Select field wrapper that composes `DialFormItem` and `DialSelect`.
|
|
11
11
|
* aliases: SelectInput|ComboField
|
|
12
|
+
* Design system 1.0
|
|
12
13
|
*
|
|
13
14
|
* Provides unified label, description, error rendering and a readonly view that shows
|
|
14
15
|
* the selected option labels (comma-separated in single mode, list in multiple).
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { SkeletonVariant, SkeletonAvatarSize, SkeletonAvatarShape } from '../../types/skeleton';
|
|
3
|
+
export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
active?: boolean;
|
|
5
5
|
paragraph?: boolean | {
|
|
6
6
|
rows?: number;
|
|
7
7
|
width?: string | string[];
|
|
8
8
|
};
|
|
9
9
|
avatar?: boolean | {
|
|
10
|
-
size?: number |
|
|
11
|
-
shape?:
|
|
10
|
+
size?: number | SkeletonAvatarSize;
|
|
11
|
+
shape?: SkeletonAvatarShape;
|
|
12
12
|
};
|
|
13
13
|
showTitle?: boolean | {
|
|
14
14
|
width?: string;
|
|
15
15
|
};
|
|
16
16
|
loading?: boolean;
|
|
17
17
|
children?: ReactNode;
|
|
18
|
-
variant?:
|
|
18
|
+
variant?: SkeletonVariant;
|
|
19
19
|
width?: string | number;
|
|
20
20
|
height?: string | number;
|
|
21
21
|
overlay?: ReactNode;
|
|
22
22
|
color?: string;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Skeleton
|
|
26
26
|
* aliases: PlaceholderUI|ShimmerLoader
|
|
27
|
+
* Design system 2.0
|
|
27
28
|
*
|
|
28
29
|
* A placeholder component to show while content is loading.
|
|
29
30
|
* Provides various skeleton shapes and configurations.
|
|
@@ -31,16 +32,16 @@ export interface DialSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
31
32
|
* @example
|
|
32
33
|
* ```tsx
|
|
33
34
|
* // Simple skeleton
|
|
34
|
-
* <
|
|
35
|
+
* <Skeleton />
|
|
35
36
|
*
|
|
36
37
|
* // Text skeleton with custom size
|
|
37
|
-
* <
|
|
38
|
+
* <Skeleton variant={SkeletonVariant.Text} width="200px" height="20px" />
|
|
38
39
|
*
|
|
39
40
|
* // Circular avatar skeleton
|
|
40
|
-
* <
|
|
41
|
+
* <Skeleton variant={SkeletonVariant.Circular} width={40} height={40} />
|
|
41
42
|
*
|
|
42
43
|
* // Complex skeleton with avatar, showTitle and paragraph
|
|
43
|
-
* <
|
|
44
|
+
* <Skeleton
|
|
44
45
|
* avatar
|
|
45
46
|
* showTitle
|
|
46
47
|
* paragraph={{ rows: 3 }}
|
|
@@ -48,20 +49,20 @@ export interface DialSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
48
49
|
* />
|
|
49
50
|
*
|
|
50
51
|
* // Conditional loading
|
|
51
|
-
* <
|
|
52
|
+
* <Skeleton loading={isLoading}>
|
|
52
53
|
* <div>Your content here</div>
|
|
53
|
-
* </
|
|
54
|
+
* </Skeleton>
|
|
54
55
|
*
|
|
55
56
|
* // Custom paragraph widths
|
|
56
|
-
* <
|
|
57
|
+
* <Skeleton
|
|
57
58
|
* paragraph={{ rows: 3, width: ['100%', '80%', '60%'] }}
|
|
58
59
|
* />
|
|
59
60
|
*
|
|
60
61
|
* // Avatar with size and shape
|
|
61
|
-
* <
|
|
62
|
+
* <Skeleton
|
|
62
63
|
* avatar={{
|
|
63
|
-
* size:
|
|
64
|
-
* shape:
|
|
64
|
+
* size: SkeletonAvatarSize.Large,
|
|
65
|
+
* shape: SkeletonAvatarShape.Square
|
|
65
66
|
* }}
|
|
66
67
|
* />
|
|
67
68
|
* ```
|
|
@@ -72,11 +73,11 @@ export interface DialSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
72
73
|
* @param [showTitle=true] - Show title placeholder or configure its appearance
|
|
73
74
|
* @param [loading=true] - Display the skeleton when true
|
|
74
75
|
* @param [children] - Content to be displayed when loading is false
|
|
75
|
-
* @param [variant=
|
|
76
|
+
* @param [variant=SkeletonVariant.Default] - Skeleton variant
|
|
76
77
|
* @param [width] - Width of the skeleton
|
|
77
78
|
* @param [height] - Height of the skeleton
|
|
78
79
|
* @param [className] - Additional CSS classes
|
|
79
80
|
* @param [overlay] - Content to overlay on top of the skeleton (e.g., a spinner)
|
|
80
81
|
* @param [color] - Custom background color for the skeleton elements (overrides the default token)
|
|
81
82
|
*/
|
|
82
|
-
export declare const
|
|
83
|
+
export declare const Skeleton: FC<SkeletonProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getAvatarSize: (size?: number |
|
|
1
|
+
import { SkeletonAvatarSize } from '../../types/skeleton';
|
|
2
|
+
export declare const getAvatarSize: (size?: number | SkeletonAvatarSize) => number;
|
|
@@ -24,6 +24,7 @@ export interface DialSliderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'o
|
|
|
24
24
|
/**
|
|
25
25
|
* A range slider with a custom thumb showing the current value and optional labels.
|
|
26
26
|
* aliases: RangeInput|TemperatureSlider
|
|
27
|
+
* Design system 1.0
|
|
27
28
|
*
|
|
28
29
|
* @example
|
|
29
30
|
* ```tsx
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface SpinnerProps {
|
|
3
3
|
size?: number;
|
|
4
4
|
className?: string;
|
|
5
5
|
fullWidth?: boolean;
|
|
6
6
|
ariaLabel?: string;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Design system 2.0
|
|
10
|
+
*/
|
|
11
|
+
export declare const Spinner: FC<SpinnerProps>;
|
|
@@ -19,6 +19,7 @@ export interface DialTabsProps {
|
|
|
19
19
|
/**
|
|
20
20
|
* A responsive and overflow-aware tabs component that automatically adapts its layout
|
|
21
21
|
* aliases: TabNavigation|TabBar
|
|
22
|
+
* Design system 1.0
|
|
22
23
|
*
|
|
23
24
|
* between a scrollable tab bar and a dropdown menu on smaller screens.
|
|
24
25
|
*
|
|
@@ -17,6 +17,7 @@ export interface DialTagInputProps extends DialLabelProps {
|
|
|
17
17
|
/**
|
|
18
18
|
* A tag input field that allows users to add multiple tags using the Enter or comma key.
|
|
19
19
|
* aliases: MultiTag|TagField
|
|
20
|
+
* Design system 1.0
|
|
20
21
|
*
|
|
21
22
|
* Supports removing tags, displaying field labels, optional indicators, validation states,
|
|
22
23
|
* and dynamic layout adjustment when tags wrap to multiple lines.
|
|
@@ -4,6 +4,7 @@ export interface Props extends HTMLProps<HTMLDivElement> {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* The content area of a tooltip that displays the tooltip information
|
|
7
|
+
* Design system 1.0
|
|
7
8
|
*
|
|
8
9
|
* @param children - The content to display inside the tooltip
|
|
9
10
|
* @param [style] - Additional inline styles for the tooltip content
|
|
@@ -4,6 +4,7 @@ interface TooltipTriggerProps extends HTMLProps<HTMLElement> {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* The trigger element for a tooltip that can be clicked or hovered
|
|
7
|
+
* Design system 1.0
|
|
7
8
|
*
|
|
8
9
|
* @param children - The element that will trigger the tooltip
|
|
9
10
|
* @param [asChild=false] - Whether to render as a child element instead of wrapping in a span
|
package/dist/src/index.d.ts
CHANGED
|
@@ -17,11 +17,12 @@ export { DialAccordion } from './components/Accordion/Accordion';
|
|
|
17
17
|
export type { DialAccordionProps } from './components/Accordion/Accordion';
|
|
18
18
|
export { DialIcon } from './components/Icon/Icon';
|
|
19
19
|
export { DialNotification } from './components/Notification/Notification.tsx';
|
|
20
|
+
export type { DialNotificationProps } from './components/Notification/Notification.tsx';
|
|
20
21
|
export { DialLoader } from './components/Loader/Loader';
|
|
21
|
-
export {
|
|
22
|
-
export type {
|
|
23
|
-
export {
|
|
24
|
-
export type {
|
|
22
|
+
export { Spinner } from './components/Spinner/Spinner';
|
|
23
|
+
export type { SpinnerProps } from './components/Spinner/Spinner';
|
|
24
|
+
export { ProgressBar } from './components/ProgressBar/ProgressBar';
|
|
25
|
+
export type { ProgressBarProps } from './components/ProgressBar/ProgressBar';
|
|
25
26
|
export { DialPagination } from './components/Pagination/Pagination';
|
|
26
27
|
export type { DialPaginationProps } from './components/Pagination/Pagination';
|
|
27
28
|
export { DialCheckbox } from './components/Checkbox/Checkbox';
|
|
@@ -38,29 +39,38 @@ export { DialTag } from './components/Tag/Tag';
|
|
|
38
39
|
export { DialEllipsisTooltip } from './components/EllipsisTooltip/EllipsisTooltip';
|
|
39
40
|
export { DialDraggableItem } from './components/DraggableItem/DraggableItem';
|
|
40
41
|
export { DialFileIcon } from './components/FileIcon/FileIcon';
|
|
42
|
+
export type { DialFileIconProps } from './components/FileIcon/FileIcon';
|
|
41
43
|
export { DialFormItem } from './components/FormItem/FormItem';
|
|
42
44
|
export { DialSharedEntityIndicator } from './components/SharedEntityIndicator/SharedEntityIndicator';
|
|
43
45
|
export { DialFileName } from './components/FileName/FileName';
|
|
44
46
|
export { DialFolderName } from './components/FolderName/FolderName';
|
|
45
47
|
export { DialResizableContainer } from './components/ResizableContainer/ResizableContainer';
|
|
46
48
|
export { DialConditionalResizableContainer } from './components/ResizableContainer/ConditionalResizableContainer';
|
|
47
|
-
export {
|
|
49
|
+
export { Skeleton } from './components/Skeleton/Skeleton';
|
|
48
50
|
export { DialGrid } from './components/Grid/Grid';
|
|
51
|
+
export type { DialGridProps } from './components/Grid/Grid';
|
|
52
|
+
export { DialDateCellRenderer } from './components/Grid/renderers/DateCellRenderer';
|
|
53
|
+
export type { DateValue as DialGridDateValue, DialDateCellRendererProps, } from './components/Grid/renderers/DateCellRenderer';
|
|
54
|
+
export { DEFAULT_DATE_FORMAT_OPTIONS as DEFAULT_GRID_DATE_FORMAT_OPTIONS, DEFAULT_LOCALE as DEFAULT_GRID_DATE_LOCALE, } from './components/Grid/renderers/constants';
|
|
55
|
+
export { convertToDate as convertGridDateToDate } from './components/Grid/renderers/utils';
|
|
49
56
|
export { DialTabs } from './components/Tabs/Tabs';
|
|
50
57
|
export { DialBreadcrumb } from './components/Breadcrumb/Breadcrumb';
|
|
58
|
+
export type { DialBreadcrumbProps } from './components/Breadcrumb/Breadcrumb';
|
|
51
59
|
export { DialBreadcrumbItem } from './components/Breadcrumb/BreadcrumbItem';
|
|
52
60
|
export { DialButton } from './components/Button/Button';
|
|
53
61
|
export { DialIconButton } from './components/IconButton/IconButton';
|
|
54
62
|
export type { DialIconButtonProps } from './components/IconButton/IconButton';
|
|
55
|
-
export { DialDangerButton, DialNeutralButton, DialPrimaryButton, DialGhostButton, DialLinkButton,
|
|
56
|
-
export type { DialRoundedButtonProps } from './components/Button/ButtonWrappers';
|
|
63
|
+
export { DialDangerButton, DialNeutralButton, DialPrimaryButton, DialGhostButton, DialLinkButton, } from './components/Button/ButtonWrappers';
|
|
57
64
|
export { DialDangerIconButton, DialGhostIconButton, DialNeutralIconButton, DialPrimaryIconButton, DialSecondaryIconButton, DialSuccessIconButton, DialTertiaryIconButton, } from './components/IconButton/IconButtonWrappers';
|
|
58
65
|
export { DialCloseButton } from './components/CloseButton/CloseButton';
|
|
59
66
|
export { DialRemoveButton } from './components/RemoveButton/RemoveButton';
|
|
60
|
-
export { DialFabButton } from './components/FabButton/FabButton';
|
|
61
|
-
export type { DialFabButtonProps } from './components/FabButton/FabButton';
|
|
62
67
|
export { DialTextarea } from './components/Textarea/Textarea';
|
|
63
68
|
export { DialTooltip } from './components/Tooltip/Tooltip';
|
|
69
|
+
export type { DialTooltipProps } from './components/Tooltip/Tooltip';
|
|
70
|
+
export { DialTooltipContainer } from './components/Tooltip/TooltipContainer';
|
|
71
|
+
export { DialTooltipContent } from './components/Tooltip/TooltipContent';
|
|
72
|
+
export { DialTooltipTrigger } from './components/Tooltip/TooltipTrigger';
|
|
73
|
+
export type { DialTooltipContainerOptions } from './components/Tooltip/TooltipContext';
|
|
64
74
|
export { DialSwitch } from './components/Switch/Switch';
|
|
65
75
|
export { DialSegmentedControl } from './components/SegmentedControl/SegmentedControl';
|
|
66
76
|
export type { DialSegmentedControlProps } from './components/SegmentedControl/SegmentedControl';
|
|
@@ -74,6 +84,7 @@ export type { DialInputProps } from './components/Input/Input';
|
|
|
74
84
|
export { DialNumberInput } from './components/NumberInput/NumberInput';
|
|
75
85
|
export { DialPasswordInput } from './components/PasswordInput/PasswordInput';
|
|
76
86
|
export { DialSearch } from './components/Search/Search';
|
|
87
|
+
export type { DialSearchProps } from './components/Search/Search';
|
|
77
88
|
export { DialInputPopup } from './components/InputPopup/InputPopup';
|
|
78
89
|
export { DialAutocompleteInputValue } from './components/AutocompleteInput/AutocompleteInputValue';
|
|
79
90
|
export { DialTagInput } from './components/TagInput/TagInput';
|
|
@@ -89,14 +100,15 @@ export { DialFileManager } from './components/FileManager/FileManager';
|
|
|
89
100
|
export type { FileManagerGridRow } from './components/FileManager/FileManagerContext';
|
|
90
101
|
export type { GridOptions, ToolbarOptions, BulkActionsToolbarOptions, } from './components/FileManager/FileManager';
|
|
91
102
|
export { DialDestinationFolderPopup } from './components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup';
|
|
92
|
-
export { DialFoldersTree } from './components/FileManager/components/FoldersTree/FoldersTree
|
|
103
|
+
export { DialFoldersTree } from './components/FileManager/components/FoldersTree/FoldersTree';
|
|
104
|
+
export { EditorThemes } from './types/editor';
|
|
93
105
|
export { ButtonVariant, ButtonAppearance } from './types/button';
|
|
94
106
|
export { RadioGroupOrientation } from './types/radio-group';
|
|
95
107
|
export { PopupSize } from './types/popup';
|
|
96
108
|
export { ConfirmationPopupVariant } from './types/confirmation-popup';
|
|
97
109
|
export { DropdownType, DropdownTrigger, DropdownItemType, } from './types/dropdown';
|
|
98
110
|
export { ElementSize } from './types/size';
|
|
99
|
-
export { TabOrientation, TabView } from './types/tab';
|
|
111
|
+
export { ScreenResolution, TabOrientation, TabView } from './types/tab';
|
|
100
112
|
export type { DialBreadcrumbPathItem } from './models/breadcrumb';
|
|
101
113
|
export { FormItemOrientation } from './types/form-item';
|
|
102
114
|
export { SelectSize, SelectVariant } from './types/select';
|
|
@@ -104,9 +116,10 @@ export { DialFileManagerTabs, DialFileManagerActions, FileManagerColumnKey, } fr
|
|
|
104
116
|
export { FlexibleActionsDirection } from './types/flexible-actions';
|
|
105
117
|
export { DialItemType } from './types/item';
|
|
106
118
|
export { ResizableContainerSide } from './types/resizable-container';
|
|
107
|
-
export {
|
|
119
|
+
export { SkeletonVariant, SkeletonAvatarSize, SkeletonAvatarShape, } from './types/skeleton';
|
|
108
120
|
export { useDialFileManagerTabs } from './components/FileManager/hooks/use-file-manager-tabs';
|
|
109
|
-
export { useEditableItem } from './hooks/use-editable-item';
|
|
121
|
+
export { EDITABLE_CONTAINER_ATTRIBUTE, editableContainerProps, useEditableItem, } from './hooks/use-editable-item';
|
|
122
|
+
export type { UseEditableItemOptions } from './hooks/use-editable-item';
|
|
110
123
|
export { FileManagerProvider } from './components/FileManager/FileManagerProvider';
|
|
111
124
|
export { useFileManagerContext } from './components/FileManager/hooks/use-file-manager-context';
|
|
112
125
|
export { StepStatus } from './models/step';
|
|
@@ -134,4 +147,67 @@ export declare const LazyDialJsonEditor: () => Promise<typeof import("./componen
|
|
|
134
147
|
export declare const LazyDialMarkdownEditor: () => Promise<typeof import("./components/MarkdownEditor/MarkdownEditor")>;
|
|
135
148
|
export { NotificationVariant, NotificationType } from './types/notification.ts';
|
|
136
149
|
export { Notification } from './components/New/Notification/Notification';
|
|
150
|
+
export { Highlight } from './components/New/Highlight/Highlight';
|
|
151
|
+
export { CardShell } from './components/New/CardShell/CardShell';
|
|
152
|
+
export type { CardShellProps } from './components/New/CardShell/CardShell';
|
|
137
153
|
export { ErrorMessageNotification, ErrorToastNotification, InfoMessageNotification, InfoToastNotification, LoadingMessageNotification, LoadingToastNotification, SuccessMessageNotification, SuccessToastNotification, WarningMessageNotification, WarningToastNotification, } from './components/New/Notification/NotificationWrapper';
|
|
154
|
+
export { CalendarMode } from './types/calendar.ts';
|
|
155
|
+
export { Calendar } from './components/New/Calendar/Calendar';
|
|
156
|
+
export type { CalendarProps, CalendarValue, } from './components/New/Calendar/Calendar';
|
|
157
|
+
export { FolderPath } from './components/New/FolderPath/FolderPath';
|
|
158
|
+
export type { FolderPathProps } from './components/New/FolderPath/FolderPath';
|
|
159
|
+
export { DangerButton, GhostButton, LinkButton, NeutralButton, OutlinedButton, PrimaryButton, } from './components/New/Button/ButtonWrappers';
|
|
160
|
+
export { DangerIconButton, GhostIconButton, NeutralIconButton, PrimaryIconButton, StaticIconButton, } from './components/New/IconButton/IconButtonWrappers';
|
|
161
|
+
export { Button } from './components/New/Button/Button';
|
|
162
|
+
export { IconButton } from './components/New/IconButton/IconButton';
|
|
163
|
+
export type { ButtonProps } from './components/New/Button/Button';
|
|
164
|
+
export type { IconButtonProps } from './components/New/IconButton/IconButton';
|
|
165
|
+
export { FabButton } from './components/FabButton/FabButton';
|
|
166
|
+
export type { FabButtonProps } from './components/FabButton/FabButton';
|
|
167
|
+
export { ButtonDropdown } from './components/New/ButtonDropdown/ButtonDropdown';
|
|
168
|
+
export type { ButtonDropdownProps } from './components/New/ButtonDropdown/ButtonDropdown';
|
|
169
|
+
export type { MarkdownEditorProps } from './components/New/MarkdownEditor/MarkdownEditor';
|
|
170
|
+
export declare const LazyMarkdownEditor: () => Promise<typeof import("./components/New/MarkdownEditor/MarkdownEditor")>;
|
|
171
|
+
export { InlineSelect, InlineSelectTrigger, } from './components/New/InlineSelect/InlineSelect';
|
|
172
|
+
export type { InlineSelectProps, InlineSelectTriggerProps, } from './components/New/InlineSelect/InlineSelect';
|
|
173
|
+
export { Select } from './components/New/Select/Select';
|
|
174
|
+
export type { SelectProps } from './components/New/Select/Select';
|
|
175
|
+
export { MultiSelectTags } from './components/New/Select/MultiSelectTags';
|
|
176
|
+
export type { MultiSelectTagsProps } from './components/New/Select/MultiSelectTags';
|
|
177
|
+
export { InfoButton } from './components/New/InfoButton/InfoButton';
|
|
178
|
+
export type { InfoButtonProps } from './components/New/InfoButton/InfoButton';
|
|
179
|
+
export type { LabelProps } from './components/New/Label/Label';
|
|
180
|
+
export { Label } from './components/New/Label/Label';
|
|
181
|
+
export { Textarea } from './components/New/Textarea/Textarea';
|
|
182
|
+
export { Input } from './components/New/Input/Input';
|
|
183
|
+
export type { InputProps } from './components/New/Input/Input';
|
|
184
|
+
export { PasswordInput } from './components/New/PasswordInput/PasswordInput';
|
|
185
|
+
export type { PasswordInputProps } from './components/New/PasswordInput/PasswordInput';
|
|
186
|
+
export { NumberInput } from './components/New/NumberInput/NumberInput';
|
|
187
|
+
export type { NumberInputProps } from './components/New/NumberInput/NumberInput';
|
|
188
|
+
export { Popup } from './components/New/Popup/Popup';
|
|
189
|
+
export type { PopupProps } from './components/New/Popup/Popup';
|
|
190
|
+
export { CloseButton } from './components/New/CloseButton/CloseButton';
|
|
191
|
+
export type { CloseButtonProps } from './components/New/CloseButton/CloseButton';
|
|
192
|
+
export { ConfirmationPopup } from './components/New/ConfirmationPopup/ConfirmationPopup';
|
|
193
|
+
export type { ConfirmationPopupProps } from './components/New/ConfirmationPopup/ConfirmationPopup';
|
|
194
|
+
export { Dropdown } from './components/New/Dropdown/Dropdown';
|
|
195
|
+
export type { DropdownProps } from './components/New/Dropdown/Dropdown';
|
|
196
|
+
export type { TextareaProps } from './components/New/Textarea/Textarea';
|
|
197
|
+
export type { CaptionTextProps } from './components/New/CaptionText/CaptionText';
|
|
198
|
+
export { CaptionText, ErrorText, } from './components/New/CaptionText/CaptionText';
|
|
199
|
+
export { Accordion } from './components/New/Accordion/Accordion';
|
|
200
|
+
export type { AccordionProps } from './components/New/Accordion/Accordion';
|
|
201
|
+
export { Switch } from './components/New/Switch/Switch';
|
|
202
|
+
export type { SwitchProps } from './components/New/Switch/Switch';
|
|
203
|
+
export { Tabs } from './components/New/Tabs/Tabs';
|
|
204
|
+
export type { TabsProps, TabItem } from './components/New/Tabs/Tabs';
|
|
205
|
+
export { FileDropzone } from './components/New/FileDropzone/FileDropzone';
|
|
206
|
+
export type { FileDropzoneProps } from './components/New/FileDropzone/FileDropzone';
|
|
207
|
+
export { Tag } from './components/New/Tag/Tag';
|
|
208
|
+
export type { TagProps } from './components/New/Tag/Tag';
|
|
209
|
+
export { TagInput } from './components/New/TagInput/TagInput';
|
|
210
|
+
export type { TagInputProps } from './components/New/TagInput/TagInput';
|
|
211
|
+
export { Search } from './components/New/Search/Search';
|
|
212
|
+
export type { SearchProps } from './components/New/Search/Search';
|
|
213
|
+
export { matchesAccept } from './utils/file-accept';
|
package/dist/src/mcp/types.d.ts
CHANGED
|
@@ -11,9 +11,21 @@ export interface LazyComponentEntry {
|
|
|
11
11
|
ssr: false;
|
|
12
12
|
nextDynamicExample: string;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Component generation. `2.0` components live under `src/components/New/` and
|
|
16
|
+
* are exported without the `Dial` prefix; everything else is `1.0`.
|
|
17
|
+
*/
|
|
18
|
+
export type ComponentGeneration = '1.0' | '2.0';
|
|
14
19
|
export interface ComponentEntry {
|
|
15
20
|
name: string;
|
|
16
21
|
category: string;
|
|
22
|
+
/** `2.0` components are the current design system and should be preferred. */
|
|
23
|
+
generation: ComponentGeneration;
|
|
24
|
+
/**
|
|
25
|
+
* Present on `1.0` components that have a `2.0` replacement — the name of
|
|
26
|
+
* that replacement (e.g. `DialButton` → `Button`).
|
|
27
|
+
*/
|
|
28
|
+
supersededBy?: string;
|
|
17
29
|
description: string;
|
|
18
30
|
props: PropEntry[];
|
|
19
31
|
examples: string[];
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { DropdownItemType } from '../types/dropdown';
|
|
2
2
|
import { ReactNode, MouseEvent } from 'react';
|
|
3
|
+
export interface DropdownSubMenuHoverOptions {
|
|
4
|
+
/** Delay (ms) before the submenu opens/closes on hover. Defaults to `{ open: 80, close: 80 }`. */
|
|
5
|
+
delay?: number | {
|
|
6
|
+
open?: number;
|
|
7
|
+
close?: number;
|
|
8
|
+
};
|
|
9
|
+
/** Whether pointer movement (not just rest) can trigger the hover open. Defaults to `false`. */
|
|
10
|
+
move?: boolean;
|
|
11
|
+
}
|
|
3
12
|
export interface DropdownItem {
|
|
4
13
|
key: string;
|
|
5
14
|
label?: ReactNode;
|
|
@@ -13,4 +22,22 @@ export interface DropdownItem {
|
|
|
13
22
|
domEvent: MouseEvent;
|
|
14
23
|
}) => void;
|
|
15
24
|
children?: DropdownItem[];
|
|
25
|
+
/** Content rendered above the children list in this item's submenu panel. */
|
|
26
|
+
menuHeader?: ReactNode | (() => ReactNode);
|
|
27
|
+
/** Content rendered below the children list in this item's submenu panel. */
|
|
28
|
+
menuFooter?: ReactNode | (() => ReactNode);
|
|
29
|
+
/**
|
|
30
|
+
* Fully replaces the submenu panel content (children/menuHeader/menuFooter are ignored).
|
|
31
|
+
* Use this to show a custom popup — e.g. a preview or a picker — instead of a plain item list.
|
|
32
|
+
*/
|
|
33
|
+
renderSubMenu?: () => ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Replaces this item's icon + label content while keeping its button element, click
|
|
36
|
+
* handling, and (for a submenu trigger) the caret intact. Use this for lighter-weight
|
|
37
|
+
* customization — e.g. a badge or avatar next to the label — without giving up the
|
|
38
|
+
* default row/list wiring the way `renderSubMenu` does.
|
|
39
|
+
*/
|
|
40
|
+
renderItem?: (item: DropdownItem) => ReactNode;
|
|
41
|
+
/** Overrides the default hover-open behavior of this item's submenu. */
|
|
42
|
+
subMenuHoverOptions?: DropdownSubMenuHoverOptions;
|
|
16
43
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum SkeletonVariant {
|
|
2
2
|
Default = "default",
|
|
3
3
|
Text = "text",
|
|
4
4
|
Circular = "circular",
|
|
5
5
|
Rectangular = "rectangular"
|
|
6
6
|
}
|
|
7
|
-
export declare enum
|
|
7
|
+
export declare enum SkeletonAvatarSize {
|
|
8
8
|
Small = "small",
|
|
9
9
|
Default = "default",
|
|
10
10
|
Large = "large"
|
|
11
11
|
}
|
|
12
|
-
export declare enum
|
|
12
|
+
export declare enum SkeletonAvatarShape {
|
|
13
13
|
Circle = "circle",
|
|
14
14
|
Square = "square"
|
|
15
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Picks the first usable accessible name from an ordered list of candidates.
|
|
4
|
+
*
|
|
5
|
+
* Only non-empty strings can serve as an `aria-label`, so any candidate that is
|
|
6
|
+
* a different kind of `ReactNode` (an element, `undefined`, a number) is
|
|
7
|
+
* skipped. Callers pass candidates in priority order, which lets each component
|
|
8
|
+
* declare its own naming precedence.
|
|
9
|
+
*
|
|
10
|
+
* A tooltip is a common last resort: a control whose only label is a tooltip
|
|
11
|
+
* would otherwise be unnamed, because `DialTooltip` puts its `aria-describedby`
|
|
12
|
+
* on a wrapper element rather than on the control itself, and is suppressed on
|
|
13
|
+
* mobile. Pass the tooltip only when nothing else names the control — as an
|
|
14
|
+
* `aria-label` it overrides the element's own content.
|
|
15
|
+
*
|
|
16
|
+
* @param candidates - Naming candidates, highest priority first
|
|
17
|
+
* @returns The first non-empty string candidate, or `undefined` if there is none
|
|
18
|
+
*/
|
|
19
|
+
export declare const resolveAccessibleName: (...candidates: ReactNode[]) => string | undefined;
|