@epam/ai-dial-ui-kit 0.13.0-dev.57 → 0.13.0-dev.59
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 +5 -0
- package/dist/CHANGELOG.md +4 -0
- package/dist/{JsonEditor-BCvdqbcv.js → JsonEditor-CV2FUqAs.js} +1 -1
- package/dist/{JsonEditor-Yy3JFyR4.cjs → JsonEditor-DPQ_6Rk7.cjs} +1 -1
- package/dist/{MarkdownEditor-BUC6u9en.cjs → MarkdownEditor-BEjYBI-4.cjs} +1 -1
- package/dist/{MarkdownEditor-DdvzJy9k.cjs → MarkdownEditor-BpG28sAL.cjs} +1 -1
- package/dist/{MarkdownEditor-L5wQ88mr.js → MarkdownEditor-CfnRGBST.js} +1 -1
- package/dist/{MarkdownEditor-_RQIObYV.js → MarkdownEditor-DT_WX1cP.js} +1 -1
- package/dist/components-manifest.json +507 -106
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +98 -92
- package/dist/{index-ARMvZo4h.cjs → index-EGRzQwVW.cjs} +35 -35
- package/dist/{index-DcwG5QhT.js → index-qU5tP4t0.js} +15362 -14776
- package/dist/index.css +2 -2
- package/dist/src/components/Accordion/Accordion.d.ts +1 -0
- package/dist/src/components/Analytics/Bar/Bar.d.ts +1 -0
- package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +1 -0
- package/dist/src/components/Analytics/Card/Card.d.ts +1 -0
- package/dist/src/components/Analytics/ErrorTag/ErrorTag.d.ts +1 -0
- package/dist/src/components/Analytics/Histogram/Histogram.d.ts +1 -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 -0
- 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 +1 -0
- package/dist/src/components/FileIcon/FileIcon.d.ts +1 -0
- package/dist/src/components/FileManager/FileManager.d.ts +1 -0
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +1 -0
- package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +1 -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/renderers/DateCellRenderer.d.ts +1 -0
- package/dist/src/components/Icon/Icon.d.ts +1 -0
- package/dist/src/components/IconButton/IconButton.d.ts +1 -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 +1 -0
- package/dist/src/components/New/Button/Button.d.ts +1 -0
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +1 -0
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +1 -0
- package/dist/src/components/New/Calendar/Calendar.d.ts +1 -0
- package/dist/src/components/New/CaptionText/CaptionText.d.ts +1 -0
- package/dist/src/components/New/CardShell/CardShell.d.ts +1 -0
- package/dist/src/components/New/CloseButton/CloseButton.d.ts +1 -0
- package/dist/src/components/New/ConfirmationPopup/ConfirmationPopup.d.ts +1 -0
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +1 -0
- package/dist/src/components/New/FileDropzone/FileDropzone.d.ts +72 -0
- package/dist/src/components/New/FolderPath/FolderPath.d.ts +1 -0
- package/dist/src/components/New/Highlight/Highlight.d.ts +4 -1
- package/dist/src/components/New/IconButton/IconButton.d.ts +1 -0
- package/dist/src/components/New/IconButton/IconButtonWrappers.d.ts +1 -0
- package/dist/src/components/New/InfoButton/InfoButton.d.ts +1 -0
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +1 -0
- package/dist/src/components/New/Input/Input.d.ts +7 -0
- package/dist/src/components/New/Label/Label.d.ts +1 -0
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +1 -0
- package/dist/src/components/New/Notification/Notification.d.ts +1 -0
- package/dist/src/components/New/NumberInput/NumberInput.d.ts +1 -0
- package/dist/src/components/New/PasswordInput/PasswordInput.d.ts +1 -0
- package/dist/src/components/New/Popup/Popup.d.ts +1 -0
- package/dist/src/components/New/Select/MultiSelectTags.d.ts +1 -0
- package/dist/src/components/New/Select/Select.d.ts +1 -0
- package/dist/src/components/New/Switch/Switch.d.ts +32 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +59 -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 +1 -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 +1 -0
- package/dist/src/components/ProgressBar/ProgressBar.d.ts +3 -0
- 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/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 +1 -0
- package/dist/src/components/Slider/Slider.d.ts +1 -0
- package/dist/src/components/Spinner/Spinner.d.ts +3 -0
- 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 +11 -0
- package/dist/src/utils/__tests__/file-accept.spec.d.ts +1 -0
- package/dist/src/utils/file-accept.d.ts +16 -0
- package/package.json +1 -1
|
@@ -29,6 +29,7 @@ export interface DialGridProps<T extends object = Record<string, unknown>> {
|
|
|
29
29
|
/**
|
|
30
30
|
* DialGrid — A feature-rich data grid wrapper built on ag-Grid with dark theme support.
|
|
31
31
|
* aliases: DataTable|TableGrid
|
|
32
|
+
* Design system 1.0
|
|
32
33
|
*
|
|
33
34
|
* Provides a pre-configured grid with:
|
|
34
35
|
* - Dark theme styling with CSS variable integration
|
|
@@ -11,6 +11,7 @@ export interface DialDateCellRendererProps extends Partial<ICellRendererParams<R
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Minimal date cell renderer (ag-Grid compatible).
|
|
14
|
+
* Design system 1.0
|
|
14
15
|
*
|
|
15
16
|
* Renders the value in the **"MMM dd, yyyy"** format (e.g., "Jul 20, 2025"),
|
|
16
17
|
* wrapped in `DialEllipsisTooltip` (tooltip only appears if truncated).
|
|
@@ -4,6 +4,7 @@ type ButtonVariantProps = Omit<DialIconButtonProps, 'variant'>;
|
|
|
4
4
|
type ButtonAppearanceProps = Omit<DialIconButtonProps, 'appearance'>;
|
|
5
5
|
/**
|
|
6
6
|
* A Primary Icon Button component with predefined primary variant
|
|
7
|
+
* Design system 1.0
|
|
7
8
|
* @example
|
|
8
9
|
* ```tsx
|
|
9
10
|
* <DialPrimaryIconButton
|
|
@@ -20,6 +20,7 @@ export interface DialInputPopupProps {
|
|
|
20
20
|
/**
|
|
21
21
|
* An input field that opens a popup when clicked, displaying a selected value or a list of values.
|
|
22
22
|
* aliases: PopupInput|ReadonlyInput
|
|
23
|
+
* Design system 1.0
|
|
23
24
|
*
|
|
24
25
|
* It supports read-only mode, error states, and disabled state, with customizable styling.
|
|
25
26
|
* The modal content is rendered using a portal for seamless integration.
|
|
@@ -12,6 +12,7 @@ export interface DialJsonEditorProps {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* A JSON editor component built on top of Monaco Editor.
|
|
15
|
+
* Design system 1.0
|
|
15
16
|
* Provides syntax highlighting, validation, and theme support for JSON editing.
|
|
16
17
|
*
|
|
17
18
|
* @param currentTheme - The theme to apply to the editor
|
|
@@ -11,6 +11,7 @@ export interface DialLoadFileAreaProps extends DialEmptyFileAreaProps {
|
|
|
11
11
|
/**
|
|
12
12
|
* A drag-and-drop file upload area component that allows users to upload files
|
|
13
13
|
* aliases: FileDropZone|DragDropUpload
|
|
14
|
+
* Design system 1.0
|
|
14
15
|
*
|
|
15
16
|
* either by dragging them into the area or by selecting them through the file picker.
|
|
16
17
|
* Displays helpful text, button prompts, and validation errors for file format or count limits.
|
|
@@ -10,6 +10,7 @@ export interface DialLoadFileAreaFieldProps extends DialLoadFileAreaProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* A composite file upload field that combines a label, file list management,
|
|
12
12
|
* aliases: UploadField|FileListField
|
|
13
|
+
* Design system 1.0
|
|
13
14
|
*
|
|
14
15
|
* and a drag-and-drop upload area. Allows users to add, remove, and validate files
|
|
15
16
|
* with customizable restrictions on file types and count.
|
|
@@ -34,6 +34,7 @@ export interface AccordionProps {
|
|
|
34
34
|
/**
|
|
35
35
|
* A collapsible panel that toggles its content when the header is clicked.
|
|
36
36
|
* aliases: Collapse|Disclosure|ExpandablePanel
|
|
37
|
+
* Design system 2.0
|
|
37
38
|
*
|
|
38
39
|
* Works as a controlled component when `expanded` is provided, otherwise it manages
|
|
39
40
|
* its own state from `defaultExpanded`. The header shows a caret that rotates when
|
|
@@ -20,6 +20,7 @@ export interface CalendarProps {
|
|
|
20
20
|
/**
|
|
21
21
|
* A date/time picker supporting four selection modes.
|
|
22
22
|
* aliases: DatePicker|DateTimePicker
|
|
23
|
+
* Design system 2.0
|
|
23
24
|
*
|
|
24
25
|
* Renders a text-field trigger that opens a rounded month-grid popover for
|
|
25
26
|
* the `date`/`datetime` modes, a masked `"HH:mm"` text field for `time`, and
|
|
@@ -2,6 +2,7 @@ import { FC, HTMLAttributes } from 'react';
|
|
|
2
2
|
export type CardShellProps = HTMLAttributes<HTMLElement>;
|
|
3
3
|
/**
|
|
4
4
|
* A shared elevated card shell used as the base wrapper for browse-grid cards.
|
|
5
|
+
* Design system 2.0
|
|
5
6
|
*
|
|
6
7
|
* Renders an `<article>` with rounded corners, padding, a resting shadow, and
|
|
7
8
|
* a hover lift with a stronger shadow. Respects `prefers-reduced-motion` by
|
|
@@ -10,6 +10,7 @@ export interface CloseButtonProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* A close button: a ghost {@link IconButton} carrying an X icon.
|
|
12
12
|
* aliases: DismissButton|ExitButton
|
|
13
|
+
* Design system 2.0
|
|
13
14
|
*
|
|
14
15
|
* Sized through {@link ElementSize} like every other 2.0 control. It defaults to
|
|
15
16
|
* the small 24px box that headers and toasts want; pass `ElementSize.Standard`
|
|
@@ -17,6 +17,7 @@ export interface ConfirmationPopupProps extends PopupProps {
|
|
|
17
17
|
/**
|
|
18
18
|
* A confirmation dialog built from {@link Popup} and the 2.0 {@link Button}.
|
|
19
19
|
* aliases: ConfirmDialog|WarningDialog
|
|
20
|
+
* Design system 2.0
|
|
20
21
|
*
|
|
21
22
|
* Provides an accessible modal with a title, optional description or custom content,
|
|
22
23
|
* and a footer with Cancel / Confirm actions.
|
|
@@ -35,6 +35,7 @@ export interface DropdownProps {
|
|
|
35
35
|
*
|
|
36
36
|
* Renders the given trigger (`children`) and a floating contextual menu overlay.
|
|
37
37
|
* aliases: ContextMenu|PopupMenu
|
|
38
|
+
* Design system 2.0
|
|
38
39
|
*
|
|
39
40
|
* Supports click/hover/contextMenu triggers, controlled/uncontrolled open, and an optional
|
|
40
41
|
* close button inside the overlay. Placement is taken directly from Floating UI; when
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface FileDropzoneProps {
|
|
3
|
+
/** Primary line of copy, e.g. `'Drag and drop it or click here to upload'`. */
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** Secondary line of copy, e.g. `'File formats .md, .zip and .skill'`. */
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
/** Fired with the accepted files when files are picked or dropped. */
|
|
8
|
+
onChange: (files: File[]) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Fired with files that a drop offered but `accept` excluded. The file picker
|
|
11
|
+
* filters by `accept` itself, so this only ever comes from a drop.
|
|
12
|
+
*/
|
|
13
|
+
onReject?: (files: File[]) => void;
|
|
14
|
+
/** Comma-separated `accept` tokens, e.g. `'.md,.zip,.skill'` or `'image/*'`. */
|
|
15
|
+
accept?: string;
|
|
16
|
+
/** Whether more than one file can be selected at a time. */
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
/** Disables picking and dropping. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Error message rendered below the area, which also turns its border red. */
|
|
21
|
+
errorText?: string;
|
|
22
|
+
/** Icon rendered above the copy. Defaults to an upload arrow. */
|
|
23
|
+
icon?: ReactNode;
|
|
24
|
+
/** `id` of the underlying file input. Generated when omitted. */
|
|
25
|
+
id?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Accessible name for the control. Only needed when `label` is a node that
|
|
28
|
+
* carries no text of its own — a string label already names the input.
|
|
29
|
+
*/
|
|
30
|
+
ariaLabel?: string;
|
|
31
|
+
/** Additional CSS classes for the drop area. */
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A dashed drop area that takes files by drag-and-drop or through the file picker.
|
|
36
|
+
* aliases: LoadFileArea|FileUpload|DragDropUpload|UploadArea
|
|
37
|
+
* Design system 2.0
|
|
38
|
+
*
|
|
39
|
+
* The area is a label over a visually hidden file input, so the picker opens on
|
|
40
|
+
* click and the control stays operable by keyboard and announced as a file input
|
|
41
|
+
* without any extra wiring. The border highlights while a drag hovers it.
|
|
42
|
+
*
|
|
43
|
+
* `accept` is enforced on drops as well as in the picker — the browser only
|
|
44
|
+
* filters the latter — so `onChange` never receives a file the caller excluded.
|
|
45
|
+
* Rejected files go to `onReject`; all copy stays with the caller, which keeps
|
|
46
|
+
* validation messages in the consumer's own wording and language.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <FileDropzone
|
|
51
|
+
* label="Drag and drop it or click here to upload"
|
|
52
|
+
* description="File formats .md, .zip and .skill"
|
|
53
|
+
* accept=".md,.zip,.skill"
|
|
54
|
+
* onChange={(files) => upload(files)}
|
|
55
|
+
* onReject={() => setError('Unsupported file format')}
|
|
56
|
+
* />
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @param label - Primary line of copy.
|
|
60
|
+
* @param [description] - Secondary line of copy.
|
|
61
|
+
* @param onChange - Fired with the accepted files.
|
|
62
|
+
* @param [onReject] - Fired with dropped files that `accept` excluded.
|
|
63
|
+
* @param [accept] - Comma-separated `accept` tokens.
|
|
64
|
+
* @param [multiple=false] - Whether more than one file can be selected.
|
|
65
|
+
* @param [disabled=false] - Disables picking and dropping.
|
|
66
|
+
* @param [errorText] - Error message rendered below the area.
|
|
67
|
+
* @param [icon] - Icon rendered above the copy.
|
|
68
|
+
* @param [id] - `id` of the underlying file input.
|
|
69
|
+
* @param [ariaLabel] - Accessible name; needed when `label` carries no text.
|
|
70
|
+
* @param [className] - Additional CSS classes for the drop area.
|
|
71
|
+
*/
|
|
72
|
+
export declare const FileDropzone: FC<FileDropzoneProps>;
|
|
@@ -9,6 +9,7 @@ export interface FolderPathProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* A read-only, non-clickable folder/location path built on top of `DialBreadcrumb`.
|
|
11
11
|
* aliases: FolderBreadcrumb|LocationPath
|
|
12
|
+
* Design system 2.0
|
|
12
13
|
*
|
|
13
14
|
* Every segment is disabled (no navigation); the first segment gets a leading
|
|
14
15
|
* folder icon and the last segment is styled as the current/leaf item.
|
|
@@ -12,5 +12,8 @@ export interface HighlightProps {
|
|
|
12
12
|
/** Maximum number of lines to display before truncating. Use `1` for single-line ellipsis truncation (e.g. list rows). Defaults to `2`. */
|
|
13
13
|
maxLines?: number;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Renders text with the first occurrence of `query` wrapped in a highlight mark, with ellipsis truncation and a tooltip when overflowing.
|
|
17
|
+
* Design system 2.0
|
|
18
|
+
*/
|
|
16
19
|
export declare const Highlight: FC<HighlightProps>;
|
|
@@ -4,6 +4,7 @@ type ButtonVariantProps = Omit<IconButtonProps, 'variant'>;
|
|
|
4
4
|
type ButtonAppearanceProps = Omit<IconButtonProps, 'appearance'>;
|
|
5
5
|
/**
|
|
6
6
|
* A Primary Icon Button component with predefined primary variant
|
|
7
|
+
* Design system 2.0
|
|
7
8
|
* @example
|
|
8
9
|
* ```tsx
|
|
9
10
|
* <PrimaryIconButton
|
|
@@ -23,6 +23,12 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
23
23
|
prefix?: string;
|
|
24
24
|
postfix?: string;
|
|
25
25
|
inputRef?: Ref<HTMLInputElement>;
|
|
26
|
+
/**
|
|
27
|
+
* Ref to the field wrapper — the bordered box holding the icons, the content
|
|
28
|
+
* slot and the input. Use it to measure the space `children` has to fit into;
|
|
29
|
+
* the input itself only ever reports its own share of the row.
|
|
30
|
+
*/
|
|
31
|
+
wrapperRef?: Ref<HTMLDivElement>;
|
|
26
32
|
onChange?: (value?: string) => void;
|
|
27
33
|
containerClassName?: string;
|
|
28
34
|
wrapperClassName?: string;
|
|
@@ -30,6 +36,7 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
30
36
|
/**
|
|
31
37
|
* A flexible input component with icon support and various styling options
|
|
32
38
|
* aliases: TextField|FormInput
|
|
39
|
+
* Design system 2.0
|
|
33
40
|
*
|
|
34
41
|
* @example
|
|
35
42
|
* ```tsx
|
|
@@ -13,6 +13,7 @@ export interface MarkdownEditorProps {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* The 2.0 Markdown editor: a formatting toolbar (bold/italic/strikethrough,
|
|
16
|
+
* Design system 2.0
|
|
16
17
|
* text style, lists, quote/link/code, table) plus an edit/live/preview mode
|
|
17
18
|
* switcher and fullscreen, built on top of `@uiw/react-md-editor`.
|
|
18
19
|
*
|
|
@@ -14,6 +14,7 @@ export interface NotificationProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
14
14
|
/**
|
|
15
15
|
* A contextual feedback component for displaying important messages.
|
|
16
16
|
* aliases: Notification
|
|
17
|
+
* Design system 2.0
|
|
17
18
|
*
|
|
18
19
|
* Renders a colored container with an icon, message text, and an optional
|
|
19
20
|
* close button.
|
|
@@ -8,6 +8,7 @@ export interface NumberInputProps extends Omit<InputProps, 'onChange' | 'type'>
|
|
|
8
8
|
/**
|
|
9
9
|
* A number field, built on {@link Input}.
|
|
10
10
|
* aliases: NumericField|NumberField
|
|
11
|
+
* Design system 2.0
|
|
11
12
|
*
|
|
12
13
|
* `type` is owned by this component; every other {@link Input} prop is passed
|
|
13
14
|
* through, so it shares the 2.0 field styling, sizes, label, caption and error
|
|
@@ -9,6 +9,7 @@ export interface PasswordInputProps extends Omit<InputProps, 'type' | 'iconAfter
|
|
|
9
9
|
/**
|
|
10
10
|
* A password field with a reveal toggle, built on {@link Input}.
|
|
11
11
|
* aliases: SecureInput|ToggleablePassword
|
|
12
|
+
* Design system 2.0
|
|
12
13
|
*
|
|
13
14
|
* The toggle is a real `<button>`, so it is reachable by keyboard and announces
|
|
14
15
|
* both its purpose and its state. `type` and `iconAfter` are owned by this
|
|
@@ -23,6 +23,7 @@ export interface PopupProps {
|
|
|
23
23
|
/**
|
|
24
24
|
* An accessible modal dialog using Floating UI.
|
|
25
25
|
* aliases: Modal|Dialog
|
|
26
|
+
* Design system 2.0
|
|
26
27
|
*
|
|
27
28
|
* Renders in a portal with a scrim overlay, focus management, a header with the
|
|
28
29
|
* title and close control, a scrollable body and an optional footer. Sections
|
|
@@ -44,6 +44,7 @@ export interface SelectProps {
|
|
|
44
44
|
/**
|
|
45
45
|
* A versatile select supporting single and multiple selections.
|
|
46
46
|
* aliases: OptionPicker|ChoiceSelector
|
|
47
|
+
* Design system 2.0
|
|
47
48
|
*
|
|
48
49
|
* The field is an {@link Input}, so it carries the 2.0 field styling, sizes,
|
|
49
50
|
* label, caption and error states, and it exposes the control as a `combobox`
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FC, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type NativeInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange' | 'size'>;
|
|
3
|
+
export interface SwitchProps extends NativeInputProps {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
isOn?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onChange?: (value: boolean) => void;
|
|
8
|
+
caption?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A switch (toggle) control from the 2.0 design system.
|
|
12
|
+
* aliases: ToggleSwitch|BinaryToggle|Switcher
|
|
13
|
+
* Design system 2.0
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Switch
|
|
18
|
+
* id="notifications"
|
|
19
|
+
* label="Active"
|
|
20
|
+
* isOn={isActive}
|
|
21
|
+
* onChange={setIsActive}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param [label] - Visible label rendered next to the control
|
|
26
|
+
* @param [isOn=false] - The current value of the switch
|
|
27
|
+
* @param [disabled=false] - Whether the switch is disabled
|
|
28
|
+
* @param [onChange] - Callback fired with the new value when toggled
|
|
29
|
+
* @param [caption] - Caption text rendered below the label
|
|
30
|
+
*/
|
|
31
|
+
export declare const Switch: FC<SwitchProps>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** A single tab entry rendered by {@link Tabs}. */
|
|
3
|
+
export interface TabItem {
|
|
4
|
+
/** Unique identifier used to match against `activeTabId`. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Visible label text for the tab. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Optional numeric badge rendered after the label. */
|
|
9
|
+
count?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface TabsProps {
|
|
12
|
+
/** Ordered list of tabs to render. */
|
|
13
|
+
tabs: TabItem[];
|
|
14
|
+
/** ID of the currently selected tab. */
|
|
15
|
+
activeTabId: string;
|
|
16
|
+
/** Fired with the tab's `id` when the user selects a tab. */
|
|
17
|
+
onTabChange: (tabId: string) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Accessible name for the tab list. A row of tabs carries no name of its own,
|
|
20
|
+
* so screen readers announce it as an unlabelled list without this.
|
|
21
|
+
*/
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
/** Additional CSS classes for the tab list container. */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Additional CSS classes applied to every tab. */
|
|
26
|
+
tabClassName?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A horizontal row of tabs, underlining the active one and showing optional count badges.
|
|
30
|
+
* aliases: TabRow|TabNavigation|TabBar
|
|
31
|
+
* Design system 2.0
|
|
32
|
+
*
|
|
33
|
+
* Follows the ARIA tabs pattern with automatic activation: only the active tab is
|
|
34
|
+
* in the tab order, and the arrow keys move both focus and selection. `Home` and
|
|
35
|
+
* `End` jump to the first and last tab, and the arrows wrap around the ends.
|
|
36
|
+
*
|
|
37
|
+
* The component renders the tabs only; the panels stay with the consumer.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <Tabs
|
|
42
|
+
* ariaLabel="Conversation views"
|
|
43
|
+
* tabs={[
|
|
44
|
+
* { id: 'all', label: 'All', count: 12 },
|
|
45
|
+
* { id: 'shared', label: 'Shared with me' },
|
|
46
|
+
* ]}
|
|
47
|
+
* activeTabId={activeTabId}
|
|
48
|
+
* onTabChange={setActiveTabId}
|
|
49
|
+
* />
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @param tabs - Ordered list of tabs to render.
|
|
53
|
+
* @param activeTabId - ID of the currently selected tab.
|
|
54
|
+
* @param onTabChange - Fired with the tab's `id` when the user selects a tab.
|
|
55
|
+
* @param [ariaLabel] - Accessible name for the tab list.
|
|
56
|
+
* @param [className] - Additional CSS classes for the tab list container.
|
|
57
|
+
* @param [tabClassName] - Additional CSS classes applied to every tab.
|
|
58
|
+
*/
|
|
59
|
+
export declare const Tabs: FC<TabsProps>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FC, HTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { ElementSize } from '../../../types/size';
|
|
3
|
+
type NativeTagProps = Omit<HTMLAttributes<HTMLSpanElement>, 'children'>;
|
|
4
|
+
export interface TagProps extends NativeTagProps {
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
size?: ElementSize;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
closable?: boolean;
|
|
11
|
+
removeLabel?: string;
|
|
12
|
+
onRemove?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A compact label element used for selections, filters, or categories.
|
|
16
|
+
* aliases: Chip|Pill
|
|
17
|
+
* Design system 2.0
|
|
18
|
+
*
|
|
19
|
+
* The label truncates rather than wrapping, and carries a native `title` so the
|
|
20
|
+
* full text stays reachable when it does.
|
|
21
|
+
*
|
|
22
|
+
* A tag with `onClick` becomes a `role="button"` operable with Enter and Space.
|
|
23
|
+
* Its remove control is a real nested `<button>`, so keep the two roles apart in
|
|
24
|
+
* the caller: a clickable tag that is also closable gives a screen reader two
|
|
25
|
+
* actions with no way to tell which one it landed on.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <Tag label="TypeScript" />
|
|
30
|
+
* <Tag label="TypeScript" closable onRemove={() => remove('TypeScript')} />
|
|
31
|
+
* <Tag label="Drafts" selected onClick={() => toggle('Drafts')} />
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @param label - Text content displayed inside the tag.
|
|
35
|
+
* @param [icon] - Icon rendered before the label.
|
|
36
|
+
* @param [size=ElementSize.Standard] - Tag height: standard is 24px, small is 20px.
|
|
37
|
+
* @param [selected=false] - Applies the accent-tinted selected styling.
|
|
38
|
+
* @param [disabled=false] - Dims the tag and suppresses the remove control and click handling.
|
|
39
|
+
* @param [closable=false] - Renders the remove button. Needs `onRemove` to appear.
|
|
40
|
+
* @param [removeLabel] - Accessible name of the remove button; defaults to `Remove <label>`.
|
|
41
|
+
* @param [onRemove] - Called when the remove button is clicked. The click does not bubble to `onClick`.
|
|
42
|
+
* @param [onClick] - Called when the tag itself is activated. Makes the tag a button.
|
|
43
|
+
*/
|
|
44
|
+
export declare const Tag: FC<TagProps>;
|
|
45
|
+
export {};
|