@epam/ai-dial-ui-kit 0.13.0-dev.52 → 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 +10 -0
- package/dist/{JsonEditor-Ce0Hs40A.js → JsonEditor-CV2FUqAs.js} +1 -1
- package/dist/{JsonEditor-DTtTF4El.cjs → JsonEditor-DPQ_6Rk7.cjs} +1 -1
- package/dist/{MarkdownEditor-C105uDu_.cjs → MarkdownEditor-BEjYBI-4.cjs} +1 -1
- package/dist/{MarkdownEditor-hOjcKVaa.cjs → MarkdownEditor-BpG28sAL.cjs} +1 -1
- package/dist/{MarkdownEditor-C14oRqaF.js → MarkdownEditor-CfnRGBST.js} +1 -1
- package/dist/{MarkdownEditor-Df72yDza.js → MarkdownEditor-DT_WX1cP.js} +1 -1
- package/dist/components-manifest.json +530 -110
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +98 -92
- package/dist/{index-C7_BAjRC.cjs → index-EGRzQwVW.cjs} +35 -35
- package/dist/{index-Cr2qLKjP.js → index-qU5tP4t0.js} +15484 -14880
- package/dist/index.css +6 -2
- package/dist/migration-guides/0.13.0/caption-semi-text-lead-rename.md +82 -0
- package/dist/migration-guides/0.13.0/typography-heading-scale-shift.md +93 -0
- package/dist/migration-guides/README.md +2 -0
- 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 +12 -1
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +11 -0
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +5 -4
- package/dist/src/components/New/Calendar/Calendar.d.ts +1 -0
- package/dist/src/components/New/Calendar/constants.d.ts +2 -2
- 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 +2 -1
- package/dist/src/components/New/Input/Button/constants.d.ts +1 -1
- package/dist/src/components/New/Input/Input.d.ts +9 -2
- 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/Popup/constants.d.ts +1 -1
- 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/Select/constants.d.ts +1 -1
- 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 +3 -2
- package/dist/src/components/New/constants/overlay.d.ts +1 -1
- 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
|
@@ -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
|
|
@@ -2,7 +2,7 @@ import { PopupSize } from '../../../types/popup';
|
|
|
2
2
|
export declare const popupOverlayBaseClassName = "z-[52] flex items-center justify-center bg-backdrop md:p-4 gap-5 p-6";
|
|
3
3
|
export declare const popupBaseClassName = "relative flex w-full max-h-full flex-col rounded-xl bg-layer-raised md:h-auto";
|
|
4
4
|
export declare const popupHeaderClassName = "flex flex-row items-center justify-between px-6 py-4";
|
|
5
|
-
export declare const popupTitleClassName = "flex-1 min-w-0 mr-3 truncate dial-
|
|
5
|
+
export declare const popupTitleClassName = "flex-1 min-w-0 mr-3 truncate dial-h1-text text-primary";
|
|
6
6
|
/**
|
|
7
7
|
* Max widths per size. Full width below the `md` breakpoint, where the popup
|
|
8
8
|
* fills the screen.
|
|
@@ -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`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const selectOverlayBaseClassName: string;
|
|
2
2
|
export declare const selectOptionBaseClassName: string;
|
|
3
|
-
export declare const selectOptionSelectedClassName = "bg-accent-
|
|
3
|
+
export declare const selectOptionSelectedClassName = "bg-control-accent-alpha-hover";
|
|
4
4
|
/**
|
|
5
5
|
* Holds the option list to the width of the field.
|
|
6
6
|
*
|
|
@@ -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 {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ElementSize } from '../../../types/size';
|
|
3
|
+
import { LabelProps } from '../Label/Label';
|
|
4
|
+
export interface TagInputProps {
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Controlled tag list. Pass it together with `onChange`. */
|
|
7
|
+
value?: string[];
|
|
8
|
+
/** Initial tag list when the component manages its own state. */
|
|
9
|
+
defaultValue?: string[];
|
|
10
|
+
size?: ElementSize;
|
|
11
|
+
labelProps?: LabelProps;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
caption?: string;
|
|
14
|
+
error?: string;
|
|
15
|
+
invalid?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
collapseTagOverflow?: boolean;
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
tagListLabel?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
fieldClassName?: string;
|
|
23
|
+
tagClassName?: string;
|
|
24
|
+
onChange?: (tags: string[]) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A tag input field: type a value and commit it with Enter or comma.
|
|
28
|
+
* aliases: MultiTag|TagField|ChipInput
|
|
29
|
+
* Design system 2.0
|
|
30
|
+
*
|
|
31
|
+
* The field is an {@link Input}, so it carries the 2.0 field styling, sizes,
|
|
32
|
+
* label, caption and error states, and the tags render as {@link Tag}s in its
|
|
33
|
+
* content slot. The field grows as tags wrap, unless `collapseTagOverflow` keeps
|
|
34
|
+
* them on one line behind a `+N` chip.
|
|
35
|
+
*
|
|
36
|
+
* Works controlled (`value` + `onChange`) or uncontrolled (`defaultValue`).
|
|
37
|
+
* Duplicate tags are ignored. Backspace on an empty input removes the last tag.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* const [tags, setTags] = useState<string[]>(['React']);
|
|
42
|
+
*
|
|
43
|
+
* <TagInput
|
|
44
|
+
* id="skills"
|
|
45
|
+
* labelProps={{ label: 'Skills' }}
|
|
46
|
+
* placeholder="Add a skill"
|
|
47
|
+
* caption="Press Enter or comma to add"
|
|
48
|
+
* value={tags}
|
|
49
|
+
* onChange={setTags}
|
|
50
|
+
* />
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @param [id] - The id of the text input, linked to the label.
|
|
54
|
+
* @param [value] - Controlled tag list.
|
|
55
|
+
* @param [defaultValue=[]] - Initial tag list when uncontrolled.
|
|
56
|
+
* @param [size=ElementSize.Standard] - Field height: standard is 40px, small is 24px.
|
|
57
|
+
* @param [labelProps] - Props of the {@link Label} rendered above the field.
|
|
58
|
+
* @param [placeholder] - Placeholder shown while there are no tags.
|
|
59
|
+
* @param [caption] - Helper text rendered below the field when there is no `error`.
|
|
60
|
+
* @param [error] - Error message rendered below the field (pass `invalid` too for error styling).
|
|
61
|
+
* @param [invalid=false] - Applies the field's error styling.
|
|
62
|
+
* @param [disabled=false] - Disables typing and tag removal.
|
|
63
|
+
* @param [readOnly=false] - Shows the tags without allowing new ones or removal.
|
|
64
|
+
* @param [collapseTagOverflow=false] - Keep the tags on one line, replacing the ones that do not fit with a `+N` chip.
|
|
65
|
+
* @param [ariaLabel] - Accessible name for the text input; use it when there is no visible label.
|
|
66
|
+
* @param [tagListLabel="Tags"] - Accessible name of the tag list.
|
|
67
|
+
* @param [className] - Additional CSS classes for the outer container.
|
|
68
|
+
* @param [fieldClassName] - Additional CSS classes for the field itself.
|
|
69
|
+
* @param [tagClassName] - Additional CSS classes applied to every tag.
|
|
70
|
+
* @param [onChange] - Called with the new list whenever a tag is added or removed.
|
|
71
|
+
*/
|
|
72
|
+
export declare const TagInput: FC<TagInputProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface VisibleTagCountInput {
|
|
2
|
+
/** Width the tags have to fit into, in px. */
|
|
3
|
+
availableWidth: number;
|
|
4
|
+
/** Rendered width of every tag, in render order. */
|
|
5
|
+
tagWidths: number[];
|
|
6
|
+
/** Rendered width of the `+N` chip shown when not every tag fits. */
|
|
7
|
+
overflowChipWidth: number;
|
|
8
|
+
/** Horizontal gap between two neighbouring tags. */
|
|
9
|
+
gap: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* How many tags of a collapsed row fit before the `+N` chip has to take over.
|
|
13
|
+
*
|
|
14
|
+
* Kept pure and separate from the component because jsdom performs no layout:
|
|
15
|
+
* the widths come from the DOM, but the arithmetic they feed is the part worth
|
|
16
|
+
* testing.
|
|
17
|
+
*
|
|
18
|
+
* A non-positive `availableWidth` means nothing has been laid out yet, so every
|
|
19
|
+
* tag is reported as visible and the caller is expected to skip the update.
|
|
20
|
+
*/
|
|
21
|
+
export declare const getVisibleTagCount: ({ availableWidth, tagWidths, overflowChipWidth, gap, }: VisibleTagCountInput) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DetailedHTMLProps, FC, TextareaHTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { LabelProps } from '../Label/Label';
|
|
3
3
|
export interface TextareaProps extends DetailedHTMLProps<Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>, HTMLTextAreaElement> {
|
|
4
|
-
labelProps?:
|
|
4
|
+
labelProps?: LabelProps;
|
|
5
5
|
invalid?: boolean;
|
|
6
6
|
containerClassName?: string;
|
|
7
7
|
resize?: boolean;
|
|
@@ -12,6 +12,7 @@ export interface TextareaProps extends DetailedHTMLProps<Omit<TextareaHTMLAttrib
|
|
|
12
12
|
/**
|
|
13
13
|
* A flexible textarea component with validation support and consistent styling
|
|
14
14
|
* aliases: MultilineInput|TextBox
|
|
15
|
+
* Design system 2.0
|
|
15
16
|
*
|
|
16
17
|
* @example
|
|
17
18
|
* ```tsx
|
|
@@ -18,7 +18,7 @@ export declare const overlaySubMenuClassName: string;
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const overlayItemClassName: string;
|
|
20
20
|
/** Tint marking the row that is currently selected. */
|
|
21
|
-
export declare const overlayItemSelectedClassName = "bg-accent-
|
|
21
|
+
export declare const overlayItemSelectedClassName = "bg-control-accent-alpha-hover";
|
|
22
22
|
export declare const overlayItemDisabledClassName = "opacity-75";
|
|
23
23
|
/** Distance between the trigger and its panel, and between nested panels. */
|
|
24
24
|
export declare const overlayGap = 4;
|
|
@@ -13,6 +13,7 @@ export interface DialNotificationProps extends Omit<HTMLAttributes<HTMLDivElemen
|
|
|
13
13
|
/**
|
|
14
14
|
* A contextual feedback component for displaying important messages.
|
|
15
15
|
* aliases: Notification|StatusBanner
|
|
16
|
+
* Design system 1.0
|
|
16
17
|
*
|
|
17
18
|
* Renders a colored container with an icon, message text, and an optional
|
|
18
19
|
* close button.
|
|
@@ -21,6 +21,7 @@ export interface DialPopupProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* An accessible modal dialog component using Floating UI.
|
|
23
23
|
* aliases: Modal|Dialog
|
|
24
|
+
* Design system 1.0
|
|
24
25
|
*
|
|
25
26
|
* Renders in a portal with a scrim overlay, focus management, header with a title,
|
|
26
27
|
* content area, optional footer and a close control.
|
|
@@ -18,6 +18,7 @@ export interface DialRadioButtonProps {
|
|
|
18
18
|
/**
|
|
19
19
|
* A stylized, accessible radio input with optional description.
|
|
20
20
|
* aliases: ChoiceOption|RadioInput
|
|
21
|
+
* Design system 1.0
|
|
21
22
|
*
|
|
22
23
|
* Renders a native `<input type="radio" />` paired with a label. When `checked`
|
|
23
24
|
* and `description` are provided, a supporting text block appears under the control.
|
|
@@ -24,6 +24,7 @@ export interface DialRadioGroupProps {
|
|
|
24
24
|
/**
|
|
25
25
|
* Groups multiple `DialRadio` options and renders custom content for the active option.
|
|
26
26
|
* aliases: SelectionGroup|OptionGroup
|
|
27
|
+
* Design system 1.0
|
|
27
28
|
*
|
|
28
29
|
* Uses `DialField` as the field label and a container with `role="radiogroup"`.
|
|
29
30
|
* Content provided in `radioButtons[].content` is shown under the currently active radio.
|
|
@@ -18,6 +18,7 @@ export interface RadioGroupPopupFieldProps extends Pick<DialLabelProps, 'label'
|
|
|
18
18
|
/**
|
|
19
19
|
* A composite field that opens a popup with a radio group selector.
|
|
20
20
|
* aliases: PopupRadio|ChoicePopup
|
|
21
|
+
* Design system 1.0
|
|
21
22
|
*
|
|
22
23
|
* Renders a labeled readout using `DialInputPopup`; when opened, a `DialPopup`
|
|
23
24
|
* displays a `DialRadioGroup` allowing the user to pick from a list of options.
|
|
@@ -6,6 +6,7 @@ export interface DialRemoveButtonProps extends Omit<DialButtonProps, 'iconBefore
|
|
|
6
6
|
/**
|
|
7
7
|
* A specialized button component for removal or delete actions.
|
|
8
8
|
* aliases: DeleteButton|TrashButton
|
|
9
|
+
* Design system 1.0
|
|
9
10
|
*
|
|
10
11
|
* Renders a `DialDangerButton` with a predefined trash icon (`IconTrashX`) as the leading icon.
|
|
11
12
|
* Additional props are passed directly to the underlying `DialDangerButton`.
|
|
@@ -6,6 +6,7 @@ export interface DialConditionalResizableContainerProps extends DialResizableCon
|
|
|
6
6
|
/**
|
|
7
7
|
* DialConditionalResizableContainer — A conditional wrapper around `DialResizableContainer`.
|
|
8
8
|
* aliases: OptionalResize|ConditionalPanel
|
|
9
|
+
* Design system 1.0
|
|
9
10
|
*
|
|
10
11
|
* This component renders its children inside a resizable container only when `enabled` is true.
|
|
11
12
|
* When `enabled` is false, children are rendered directly without any resizable behavior.
|
|
@@ -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).
|
|
@@ -24,6 +24,7 @@ export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
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.
|
|
@@ -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
|
|
@@ -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
|