@epam/ai-dial-ui-kit 0.15.0-dev.9 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -2
- package/dist/CHANGELOG.md +84 -0
- package/dist/DateCellRenderer-BdUMSg-E.cjs +1 -0
- package/dist/{DateCellRenderer-Bu40QyHE.cjs → DateCellRenderer-CZNa4jVJ.cjs} +30 -30
- package/dist/IconButton-DHOFapLo.cjs +1 -0
- package/dist/{JsonEditor-qv1Z0dLX.cjs → JsonEditor-Bxui5wJH.cjs} +1 -1
- package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-BKtFs714.cjs} +1 -1
- package/dist/MarkdownEditor-Bapd1ycU.cjs +1 -0
- package/dist/MarkdownEditorContainer-B5aHwoYF.cjs +1 -0
- package/dist/{Switch-CUKClcEz.cjs → Switch-DE6MrcqJ.cjs} +1 -1
- package/dist/components/Button/constants.js +9 -8
- package/dist/components/Dropdown/Dropdown.js +2 -2
- package/dist/components/Dropdown/DropdownSubMenuItem.js +1 -1
- package/dist/components/Dropdown/constants.js +7 -7
- package/dist/components/DropdownIcon/DropdownIcon.js +4 -4
- package/dist/components/FileManager/FileManager.js +373 -372
- package/dist/components/FileManager/FileManagerProvider.js +266 -264
- package/dist/components/FileManager/hooks/use-grid-context-menu.js +59 -59
- package/dist/components/MarkdownEditor/MarkdownEditor.js +23 -21
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +27 -25
- package/dist/components/New/Accordion/Accordion.js +86 -72
- package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +214 -0
- package/dist/components/New/AutocompleteTagInput/utils.js +11 -0
- package/dist/components/New/Avatar/Avatar.js +70 -0
- package/dist/components/New/Badge/Badge.js +45 -0
- package/dist/components/New/BottomSheet/BottomSheet.js +128 -0
- package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
- package/dist/components/New/Breadcrumbs/constants.js +41 -0
- package/dist/components/New/Button/Button.js +32 -32
- package/dist/components/New/Button/ButtonWrappers.js +103 -37
- package/dist/components/New/Button/constants.js +3 -0
- package/dist/components/New/Button/utils.js +18 -8
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +27 -18
- package/dist/components/New/Calendar/Calendar.js +6 -6
- package/dist/components/New/Calendar/constants.js +5 -5
- package/dist/components/New/CaptionText/CaptionText.js +3 -3
- package/dist/components/New/CardShell/CardShell.js +2 -2
- package/dist/components/New/Checkbox/Checkbox.js +2 -2
- package/dist/components/New/Checkbox/CheckboxBox.js +2 -2
- package/dist/components/New/CloseButton/CloseButton.js +1 -1
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +2 -2
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +21 -25
- package/dist/components/New/ConfirmationPopup/constants.js +8 -11
- package/dist/components/New/Dropdown/Dropdown.js +99 -98
- package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
- package/dist/components/New/Dropdown/constants.js +22 -17
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +2 -2
- package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
- package/dist/components/New/FileDropzone/FileDropzone.js +2 -2
- package/dist/components/New/FileIcon/FileIcon.js +55 -0
- package/dist/components/New/FileIcon/constants.js +134 -0
- package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
- package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
- package/dist/components/New/FileName/FileName.js +78 -0
- package/dist/components/New/FilterChips/FilterChips.js +2 -2
- package/dist/components/New/FolderName/FolderName.js +16 -0
- package/dist/components/New/FolderPath/FolderPath.js +1 -1
- package/dist/components/New/Grid/constants.js +14 -5
- package/dist/components/New/Highlight/Highlight.js +2 -2
- package/dist/components/New/IconButton/IconButton.js +30 -28
- package/dist/components/New/InfoButton/InfoButton.js +2 -2
- package/dist/components/New/InlineSelect/InlineSelect.js +75 -59
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +70 -66
- package/dist/components/New/InteractiveTooltip/constants.js +2 -2
- package/dist/components/New/Label/Label.js +2 -2
- package/dist/components/New/MarkdownEditor/MarkdownEditor.js +29 -27
- package/dist/components/New/MenuItem/MenuItem.js +2 -2
- package/dist/components/New/MenuItem/constants.js +1 -1
- package/dist/components/New/NoDataContent/NoDataContent.js +2 -2
- package/dist/components/New/Notification/Notification.js +37 -35
- package/dist/components/New/NumberInput/NumberInput.js +2 -2
- package/dist/components/New/PasswordInput/PasswordInput.js +2 -2
- package/dist/components/New/Popup/Popup.js +59 -57
- package/dist/components/New/Popup/constants.js +3 -3
- package/dist/components/New/Radio/Radio.js +2 -2
- package/dist/components/New/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +2 -2
- package/dist/components/New/ResizableContainer/ResizableContainer.js +2 -2
- package/dist/components/New/SchemaRenderer/SchemaRenderer.js +164 -0
- package/dist/components/New/SchemaRenderer/components/SchemaAnyOfEditor.js +65 -0
- package/dist/components/New/SchemaRenderer/components/SchemaArrayEditor.js +109 -0
- package/dist/components/New/SchemaRenderer/components/SchemaField.js +83 -0
- package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +72 -0
- package/dist/components/New/SchemaRenderer/components/SchemaJsonEditor.js +41 -0
- package/dist/components/New/SchemaRenderer/components/SchemaKeyValueEditor.js +250 -0
- package/dist/components/New/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
- package/dist/components/New/SchemaRenderer/components/SchemaOneOfEditor.js +163 -0
- package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +150 -0
- package/dist/components/New/SchemaRenderer/components/SchemaSection.js +135 -0
- package/dist/components/New/SchemaRenderer/context.js +17 -0
- package/dist/components/New/Search/Search.js +2 -2
- package/dist/components/New/SegmentedControl/SegmentedControl.js +4 -4
- package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
- package/dist/components/New/Select/MultiSelectTags.js +18 -15
- package/dist/components/New/Select/Select.js +184 -173
- package/dist/components/New/Select/constants.js +23 -20
- package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
- package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
- package/dist/components/New/Slider/Slider.js +184 -91
- package/dist/components/New/Slider/utils.js +20 -0
- package/dist/components/New/Switch/Switch.js +2 -2
- package/dist/components/New/Tabs/Tabs.js +124 -66
- package/dist/components/New/Tag/Tag.js +2 -2
- package/dist/components/New/TagInput/TagInput.js +5 -3
- package/dist/components/New/Textarea/Textarea.js +21 -20
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +2 -2
- package/dist/components/New/Tooltip/TooltipContent.js +2 -2
- package/dist/components/New/Tooltip/constants.js +1 -1
- package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
- package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
- package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
- package/dist/components/New/TransferQueue/constants.js +24 -0
- package/dist/components/New/constants/overlay.js +17 -9
- package/dist/components/Popup/constants.js +8 -8
- package/dist/components/ProgressBar/ProgressBar.js +6 -6
- package/dist/components/SchemaRenderer/SchemaRenderer.js +16 -15
- package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +2 -2
- package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +1 -1
- package/dist/components/SchemaRenderer/components/SchemaField.js +23 -23
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +19 -19
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +2 -2
- package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +1 -1
- package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +13 -13
- package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +5 -5
- package/dist/components/Skeleton/Skeleton.js +2 -2
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Tooltip/TooltipContent.js +11 -11
- package/dist/components-manifest.json +1826 -109
- package/dist/constants/public-class-names.js +64 -3
- package/dist/{components/SchemaRenderer/types.js → constants/schema-renderer.js} +2 -7
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +357 -311
- package/dist/editors.cjs +1 -1
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +2 -2
- package/dist/lazy-_W6FYhKg.cjs +1 -0
- package/dist/merge-classes-BEJXjzkx.cjs +1 -0
- package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
- package/dist/migration-guides/0.15.0/slider-redesign.md +110 -0
- package/dist/migration-guides/README.md +2 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
- package/dist/src/components/FileManager/FileManager.d.ts +2 -0
- package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
- package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +2 -0
- package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +2 -0
- package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
- package/dist/src/components/New/AutocompleteTagInput/AutocompleteTagInput.d.ts +108 -0
- package/dist/src/components/New/AutocompleteTagInput/utils.d.ts +17 -0
- package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
- package/dist/src/components/New/Badge/Badge.d.ts +47 -0
- package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
- package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
- package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
- package/dist/src/components/New/Button/Button.d.ts +4 -1
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +21 -0
- package/dist/src/components/New/Button/utils.d.ts +15 -0
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
- package/dist/src/components/New/Calendar/constants.d.ts +1 -1
- package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -1
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
- package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
- package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +85 -0
- package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
- package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
- package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
- package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
- package/dist/src/components/New/FileName/FileName.d.ts +79 -0
- package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
- package/dist/src/components/New/Grid/constants.d.ts +6 -4
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
- package/dist/src/components/New/InteractiveTooltip/InteractiveTooltip.d.ts +13 -2
- package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +3 -0
- package/dist/src/components/New/Notification/Notification.d.ts +18 -0
- package/dist/src/components/New/Popup/Popup.d.ts +8 -1
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/dist/src/components/New/SchemaRenderer/SchemaRenderer.d.ts +38 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +37 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaArrayEditor.d.ts +35 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaField.d.ts +33 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +30 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaJsonEditor.d.ts +29 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +37 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaObjectEditor.d.ts +32 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaOneOfEditor.d.ts +39 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +38 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaSection.d.ts +39 -0
- package/dist/src/components/New/SchemaRenderer/context.d.ts +8 -0
- package/dist/src/components/New/SchemaRenderer/types.d.ts +76 -0
- package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
- package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
- package/dist/src/components/New/Select/Select.d.ts +9 -0
- package/dist/src/components/New/Select/constants.d.ts +3 -2
- package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
- package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +100 -0
- package/dist/src/components/New/Slider/Slider.d.ts +29 -1
- package/dist/src/components/New/Slider/utils.d.ts +14 -0
- package/dist/src/components/New/Slider/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
- package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
- package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
- package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
- package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
- package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
- package/dist/src/components/New/constants/overlay.d.ts +13 -0
- package/dist/src/components/Popup/constants.d.ts +1 -1
- package/dist/src/components/SchemaRenderer/types.d.ts +5 -93
- package/dist/src/components/SchemaRenderer/utils.d.ts +1 -17
- package/dist/src/constants/public-class-names.d.ts +64 -3
- package/dist/src/constants/schema-renderer.d.ts +2 -0
- package/dist/src/index.d.ts +37 -3
- package/dist/src/models/json-schema.d.ts +71 -0
- package/dist/src/types/accordion.d.ts +7 -0
- package/dist/src/types/avatar.d.ts +7 -0
- package/dist/src/types/badge.d.ts +16 -0
- package/dist/src/types/breadcrumbs.d.ts +9 -0
- package/dist/src/types/button.d.ts +1 -0
- package/dist/src/types/entity-type.d.ts +9 -0
- package/dist/src/types/json-schema.d.ts +22 -0
- package/dist/src/types/tooltip.d.ts +4 -0
- package/dist/src/types/transfer-queue.d.ts +10 -0
- package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
- package/dist/src/utils/avatar.d.ts +12 -0
- package/dist/src/utils/json-schema.d.ts +23 -0
- package/dist/src/utils/sub-menu-floating.d.ts +7 -4
- package/dist/types/accordion.js +4 -0
- package/dist/types/avatar.js +4 -0
- package/dist/types/badge.js +5 -0
- package/dist/types/breadcrumbs.js +4 -0
- package/dist/types/button.js +3 -3
- package/dist/types/entity-type.js +4 -0
- package/dist/types/json-schema.js +7 -0
- package/dist/types/tooltip.js +3 -2
- package/dist/types/transfer-queue.js +4 -0
- package/dist/use-file-manager-tabs-Bzzwwcgk.cjs +3 -0
- package/dist/utils/avatar.js +22 -0
- package/dist/{components/SchemaRenderer/utils.js → utils/json-schema.js} +22 -20
- package/dist/utils/merge-classes.js +12 -5
- package/dist/utils/sub-menu-floating.js +99 -54
- package/package.json +4 -9
- package/dist/DateCellRenderer-C3e61i75.cjs +0 -1
- package/dist/IconButton-DWqoaBWf.cjs +0 -1
- package/dist/MarkdownEditor-jQ8nDJfx.cjs +0 -1
- package/dist/MarkdownEditorContainer-Bzcnoemw.cjs +0 -1
- package/dist/lazy-tfN4sKhq.cjs +0 -1
- package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
- package/dist/use-file-manager-tabs-9DWkp9IJ.cjs +0 -3
|
@@ -4,7 +4,7 @@ export declare const calendarModeDefaultPlaceholder: Record<CalendarMode, string
|
|
|
4
4
|
export declare const calendarFieldBaseClassName = "flex w-full items-center justify-between gap-2 rounded-xl border border-secondary bg-layer-raised px-4 py-3 dial-small-text text-primary outline-none transition-colors hover:border-accent-alpha focus-within:border-accent-focus";
|
|
5
5
|
export declare const calendarFieldDisabledClassName = "!cursor-not-allowed !border-transparent bg-layer-sunken text-control-disable-primary hover:!border-transparent";
|
|
6
6
|
export declare const calendarFieldInvalidClassName = "!border-error";
|
|
7
|
-
export declare const calendarPopoverClassName = "z-
|
|
7
|
+
export declare const calendarPopoverClassName = "z-floating flex w-[248px] flex-col gap-4 rounded-lg bg-layer-raised px-2 py-4 shadow-md";
|
|
8
8
|
export declare const calendarDayButtonBaseClassName = "flex size-10 items-center justify-center rounded-full dial-small-text text-primary hover:bg-control-accent-alpha-hover hover:text-primary focus:outline-none focus-visible:outline focus-visible:outline-focus";
|
|
9
9
|
export declare const calendarDaySelectedClassName = "bg-control-accent text-control-permanent";
|
|
10
10
|
export declare const calendarDayTodayClassName = "text-accent dial-small-semi-text";
|
|
@@ -6,7 +6,6 @@ export declare const loaderContainerClassName = "px-6 py-4 h-[120px]";
|
|
|
6
6
|
export declare const defaultCancelLabel = "Cancel";
|
|
7
7
|
export declare const defaultConfirmLabel = "Ok";
|
|
8
8
|
export declare const variantConfig: Record<ConfirmationPopupVariant, {
|
|
9
|
-
container?: string;
|
|
10
9
|
confirm: {
|
|
11
10
|
variant: ButtonVariant;
|
|
12
11
|
appearance: ButtonAppearance;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Placement } from '@floating-ui/react';
|
|
2
|
-
import { FC, MouseEvent, ReactNode, RefObject } from 'react';
|
|
2
|
+
import { CSSProperties, FC, MouseEvent, ReactNode, RefObject } from 'react';
|
|
3
3
|
import { DropdownTrigger } from '../../../types/dropdown';
|
|
4
4
|
import { DropdownItem } from '../../../models/dropdown';
|
|
5
5
|
export interface DropdownProps {
|
|
@@ -25,6 +25,13 @@ export interface DropdownProps {
|
|
|
25
25
|
overlayContentClassName?: string;
|
|
26
26
|
separatorClassName?: string;
|
|
27
27
|
listClassName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Inline style for the floating overlay. The overlay renders in a portal, so
|
|
30
|
+
* this is the only way to hand it CSS custom properties from a caller's own
|
|
31
|
+
* scope — e.g. theme variables that its rows and header read. Positioning
|
|
32
|
+
* stays the dropdown's own: `floatingStyles` is applied on top of it.
|
|
33
|
+
*/
|
|
34
|
+
listStyle?: CSSProperties;
|
|
28
35
|
outsidePressIgnoreRef?: RefObject<HTMLElement | null>;
|
|
29
36
|
outsideClosable?: boolean;
|
|
30
37
|
anchorToMouse?: boolean;
|
|
@@ -97,6 +104,7 @@ export interface DropdownProps {
|
|
|
97
104
|
* @param [overlayContentClassName] - Additional CSS classes applied to the overlay content
|
|
98
105
|
* @param [separatorClassName] - Additional CSS classes applied to the separators between items
|
|
99
106
|
* @param [listClassName] - Additional CSS classes applied to the floating overlay
|
|
107
|
+
* @param [listStyle] - Inline style applied to the floating overlay, under the dropdown's own positioning styles
|
|
100
108
|
* @param [outsidePressIgnoreRef] - Ref to an element that should not trigger outside press behavior
|
|
101
109
|
* @param [outsideClosable=true] - Whether clicks outside the overlay should close it
|
|
102
110
|
* @param [anchorToMouse=false] - Whether to anchor the dropdown to the mouse position
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare const dropdownBaseClassName: string;
|
|
2
2
|
export declare const dropdownListBaseClassName: string;
|
|
3
3
|
export declare const dropdownSubMenuClassName: string;
|
|
4
|
+
export declare const dropdownSubMenuListClassName: string;
|
|
5
|
+
/** The top-level item list: rows 2px apart, inset from the panel edge. */
|
|
6
|
+
export declare const dropdownItemListClassName: string;
|
|
4
7
|
/**
|
|
5
8
|
* The row's own styling lives in {@link MenuItem}, which renders every item of
|
|
6
9
|
* the menu. This alias is what a fully custom overlay row can lean on to match
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { EntityType } from '../../../types/entity-type';
|
|
3
|
+
/** Identity fields of the entity rendered by `EntityIdentity`. */
|
|
4
|
+
export interface EntityIdentityItem {
|
|
5
|
+
/** Entity category; picks the colour of the type label and the featured chip. */
|
|
6
|
+
type: EntityType;
|
|
7
|
+
/** Display name. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Version shown next to the name. */
|
|
10
|
+
version?: string;
|
|
11
|
+
/** Icon URL. The initials of `name` show while it is missing or fails to load. */
|
|
12
|
+
iconUrl?: string;
|
|
13
|
+
/** Whether the entity is marked as featured. */
|
|
14
|
+
isFeatured?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** User-visible strings of `EntityIdentity`. */
|
|
17
|
+
export interface EntityIdentityLabels {
|
|
18
|
+
/** Type label text, rendered uppercase. Defaults to the English name of `item.type`. */
|
|
19
|
+
type?: string;
|
|
20
|
+
/** Featured chip text. Defaults to `'Featured'`. */
|
|
21
|
+
featured?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Props for `EntityIdentity`. */
|
|
24
|
+
export interface EntityIdentityProps {
|
|
25
|
+
/** The entity to display. */
|
|
26
|
+
item: EntityIdentityItem;
|
|
27
|
+
/** User-visible strings; pass translated ones in a localised app. */
|
|
28
|
+
labels?: EntityIdentityLabels;
|
|
29
|
+
/** Whether to show `item.version` next to the name. */
|
|
30
|
+
showVersion?: boolean;
|
|
31
|
+
/** Whether to show the featured chip when `item.isFeatured` is true. */
|
|
32
|
+
hasFeaturedTag?: boolean;
|
|
33
|
+
/** Width and height of the icon in px. */
|
|
34
|
+
iconSize?: number;
|
|
35
|
+
/** Heading level of the name, 1–6. */
|
|
36
|
+
headingLevel?: number;
|
|
37
|
+
/** Search query; the matching part of the name is highlighted. */
|
|
38
|
+
query?: string;
|
|
39
|
+
/** Content pinned to the bottom of the text column, aligned with the bottom of the icon. */
|
|
40
|
+
footer?: ReactNode;
|
|
41
|
+
/** Badge rendered before the featured chip, in the top-end corner. */
|
|
42
|
+
statusBadge?: ReactNode;
|
|
43
|
+
/** Additional CSS classes for the root. */
|
|
44
|
+
className?: string;
|
|
45
|
+
/** Type-scale class for the name. Defaults to `'dial-h3-text'`. */
|
|
46
|
+
nameClassName?: string;
|
|
47
|
+
/** Type-scale class for the type label. Defaults to `'dial-caption-lead-semi-text'`. */
|
|
48
|
+
typeClassName?: string;
|
|
49
|
+
/** Type-scale class for the version. Defaults to `'dial-tiny-text'`. */
|
|
50
|
+
versionClassName?: string;
|
|
51
|
+
/** Additional CSS classes for the icon, e.g. to change its corner radius. */
|
|
52
|
+
iconClassName?: string;
|
|
53
|
+
/** Additional CSS classes for the featured chip. */
|
|
54
|
+
featuredChipClassName?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The identity block of a DIAL entity: its icon, a coloured type label, the
|
|
58
|
+
* name and the version, with an optional featured chip.
|
|
59
|
+
* aliases: EntityHeader|ModelHeader|AppIdentity
|
|
60
|
+
* Design system 2.0
|
|
61
|
+
*
|
|
62
|
+
* The type label is plain uppercase text coloured by `item.type`. The icon is
|
|
63
|
+
* a square `Avatar`, so a missing or broken image falls back to the initials of
|
|
64
|
+
* the name. The icon is decorative: the name next to it already names the
|
|
65
|
+
* entity.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* <EntityIdentity
|
|
70
|
+
* item={{ type: EntityType.Model, name: 'GPT-4o', version: '2024-11-20' }}
|
|
71
|
+
* labels={{ type: t('Model') }}
|
|
72
|
+
* />
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @param item - The entity to display
|
|
76
|
+
* @param [labels] - User-visible strings
|
|
77
|
+
* @param [showVersion=true] - Whether to show the version
|
|
78
|
+
* @param [hasFeaturedTag=true] - Whether to show the featured chip for a featured entity
|
|
79
|
+
* @param [iconSize=48] - Icon size in px
|
|
80
|
+
* @param [headingLevel=3] - Heading level of the name
|
|
81
|
+
* @param [query] - Search query highlighted in the name
|
|
82
|
+
* @param [footer] - Content pinned to the bottom of the text column
|
|
83
|
+
* @param [statusBadge] - Badge in the top-end corner
|
|
84
|
+
*/
|
|
85
|
+
export declare const EntityIdentity: FC<EntityIdentityProps>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { DialItemType } from '../../../types/item';
|
|
3
|
+
/** Props for `FileIcon`. */
|
|
4
|
+
export interface FileIconProps {
|
|
5
|
+
/** Whether the item is a file or a folder. */
|
|
6
|
+
type: DialItemType;
|
|
7
|
+
/** Item name; a file's extension is read from it unless `fileExtension` is set. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Extension to pick the glyph by, overriding the one in `name`. With or without a leading dot. */
|
|
10
|
+
fileExtension?: string;
|
|
11
|
+
/** Draws the shared badge in the bottom-left corner. */
|
|
12
|
+
shared?: boolean;
|
|
13
|
+
/** Replaces the glyph with a spinner. */
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
/** Glyph size in px. Defaults to `DIAL_ICON_SIZE.MD` (20). */
|
|
16
|
+
size?: number;
|
|
17
|
+
/** Additional CSS classes for the root element. */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Hides the icon from assistive technology when the row already names the item. */
|
|
20
|
+
decorative?: boolean;
|
|
21
|
+
/** Accessible name. Defaults to "PDF file", "File" or "Folder", with ", shared" appended when shared. */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** Accessible name of the spinner shown while `loading`. */
|
|
24
|
+
loadingLabel?: string;
|
|
25
|
+
/** Additional CSS classes for the shared badge. */
|
|
26
|
+
sharedIndicatorClassName?: string;
|
|
27
|
+
/** Tooltip shown over the shared badge. */
|
|
28
|
+
sharedIndicatorTooltip?: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The icon of a file or folder row in a file manager: a file-type glyph picked
|
|
32
|
+
* by extension, or a folder, with an optional shared badge and loading state.
|
|
33
|
+
* aliases: FileTypeIcon|EntityIcon
|
|
34
|
+
* Design system 2.0
|
|
35
|
+
*
|
|
36
|
+
* The root is a `role="img"` whose name says what the item is, and that it is
|
|
37
|
+
* shared — the badge itself is drawn inside the image, so its tooltip is a
|
|
38
|
+
* pointer-only hint and never the only place the state is conveyed. While
|
|
39
|
+
* `loading`, the root drops the role and holds a `Spinner`, which announces
|
|
40
|
+
* itself as a status. Pass `decorative` when the row already names the item.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* <FileIcon name="report.pdf" type={DialItemType.File} shared />
|
|
45
|
+
* <FileIcon name="Projects" type={DialItemType.Folder} loading />
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @param type - Whether the item is a file or a folder
|
|
49
|
+
* @param name - Item name; a file's extension is read from it
|
|
50
|
+
* @param [fileExtension] - Extension overriding the one in `name`
|
|
51
|
+
* @param [shared=false] - Draws the shared badge
|
|
52
|
+
* @param [loading=false] - Replaces the glyph with a spinner
|
|
53
|
+
* @param [size=DIAL_ICON_SIZE.MD] - Glyph size in px
|
|
54
|
+
* @param [className] - Additional CSS classes for the root element
|
|
55
|
+
* @param [decorative=false] - Hides the icon from assistive technology
|
|
56
|
+
* @param [label] - Accessible name, overriding the generated one
|
|
57
|
+
* @param [loadingLabel='Loading'] - Accessible name of the spinner
|
|
58
|
+
* @param [sharedIndicatorClassName] - Additional CSS classes for the shared badge
|
|
59
|
+
* @param [sharedIndicatorTooltip='Shared'] - Tooltip shown over the shared badge
|
|
60
|
+
*/
|
|
61
|
+
export declare const FileIcon: FC<FileIconProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** The kinds of file the 2.0 glyph distinguishes. */
|
|
2
|
+
export declare enum FileGlyphKind {
|
|
3
|
+
Images = "images",
|
|
4
|
+
Video = "video",
|
|
5
|
+
Audio = "audio",
|
|
6
|
+
Code = "code",
|
|
7
|
+
Text = "text",
|
|
8
|
+
Pdf = "pdf",
|
|
9
|
+
Spreadsheet = "spreadsheet",
|
|
10
|
+
Presentation = "presentation",
|
|
11
|
+
Archive = "archive",
|
|
12
|
+
Dial = "dial",
|
|
13
|
+
Other = "other"
|
|
14
|
+
}
|
|
15
|
+
/** The glyph kind for a lower-case extension; anything unknown is `Other`. */
|
|
16
|
+
export declare const getFileGlyphKind: (extension: string) => FileGlyphKind;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FileGlyphKind } from '../constants';
|
|
3
|
+
interface FileGlyphProps {
|
|
4
|
+
size: number;
|
|
5
|
+
kind: FileGlyphKind;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The 2.0 file glyph: a gradient sheet with the line work of its kind.
|
|
9
|
+
* Design system 2.0
|
|
10
|
+
*
|
|
11
|
+
* Inlined for the same reasons as `FolderGlyph`: a per-instance gradient `id`
|
|
12
|
+
* from `useId`, and theme tokens in place of fixed hex values.
|
|
13
|
+
*
|
|
14
|
+
* @param size - Width and height in px
|
|
15
|
+
* @param kind - Which art to draw
|
|
16
|
+
*/
|
|
17
|
+
export declare const FileGlyph: FC<FileGlyphProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface FolderGlyphProps {
|
|
3
|
+
size: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The 2.0 folder glyph: a blue back tab over a grey-to-blue gradient body.
|
|
7
|
+
* Design system 2.0
|
|
8
|
+
*
|
|
9
|
+
* Inlined rather than imported as an SVG asset for two reasons: the gradient
|
|
10
|
+
* `id` comes from `useId`, so a list of folders does not repeat one document-
|
|
11
|
+
* wide id (a hidden first copy would otherwise blank every other gradient);
|
|
12
|
+
* and the colours resolve from theme tokens instead of fixed hex values.
|
|
13
|
+
*
|
|
14
|
+
* @param size - Width and height in px
|
|
15
|
+
*/
|
|
16
|
+
export declare const FolderGlyph: FC<FolderGlyphProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { DialItemType } from '../../../types/item';
|
|
3
|
+
/** Props for `FileName`. */
|
|
4
|
+
export interface FileNameProps {
|
|
5
|
+
/** Full item name, with or without an extension. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Whether the item is a file or a folder. Defaults to a file. */
|
|
8
|
+
type?: DialItemType;
|
|
9
|
+
/** Extension to pick the icon by, overriding the one in `name`. */
|
|
10
|
+
fileExtension?: string;
|
|
11
|
+
/** Draws the shared badge on the icon. */
|
|
12
|
+
shared?: boolean;
|
|
13
|
+
/** Replaces the icon with a spinner, which announces itself as a status. */
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
/** Accessible name of the spinner shown while `loading`. */
|
|
16
|
+
loadingLabel?: string;
|
|
17
|
+
/** Icon size in px. Defaults to the `FileIcon` size (20). */
|
|
18
|
+
iconSize?: number;
|
|
19
|
+
/** Metadata under the name (size, date); switches the text to two lines. */
|
|
20
|
+
details?: ReactNode;
|
|
21
|
+
/** Mutes the name, marking it as containing invalid characters. */
|
|
22
|
+
isInvalidName?: boolean;
|
|
23
|
+
/** Additional CSS classes for the root element. */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Additional CSS classes for the name text. */
|
|
26
|
+
nameClassName?: string;
|
|
27
|
+
/** Additional CSS classes for the shared badge. */
|
|
28
|
+
sharedIndicatorClassName?: string;
|
|
29
|
+
/** Tooltip shown over the shared badge. */
|
|
30
|
+
sharedIndicatorTooltip?: ReactNode;
|
|
31
|
+
/** Screen-reader text announcing the shared state. */
|
|
32
|
+
sharedLabel?: string;
|
|
33
|
+
/** Suppresses the full-name tooltip even while the name is truncated. */
|
|
34
|
+
hideTooltip?: boolean;
|
|
35
|
+
/** Shown instead of the full name while it is truncated. */
|
|
36
|
+
tooltipContent?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A file or folder name with its type icon, truncated with a tooltip when it
|
|
40
|
+
* does not fit.
|
|
41
|
+
* aliases: FileDisplay|NameDisplay
|
|
42
|
+
* Design system 2.0
|
|
43
|
+
*
|
|
44
|
+
* The visible name already says what the item is, so the icon is decorative;
|
|
45
|
+
* the shared state, which only the badge shows, is announced by a
|
|
46
|
+
* visually-hidden `sharedLabel` after the name instead.
|
|
47
|
+
*
|
|
48
|
+
* While `loading` the icon is swapped for a `Spinner`, which is left in the
|
|
49
|
+
* accessibility tree so the busy state is announced.
|
|
50
|
+
*
|
|
51
|
+
* With `details` the text switches to two lines — the name, then the metadata.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <FileName name="Document.pdf" shared />
|
|
56
|
+
* <FileName
|
|
57
|
+
* name="Document.pdf"
|
|
58
|
+
* details={<span className="dial-tiny-text text-secondary">24 KB · Jul 20</span>}
|
|
59
|
+
* />
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @param name - Full item name, with or without an extension
|
|
63
|
+
* @param [type=DialItemType.File] - Whether the item is a file or a folder
|
|
64
|
+
* @param [fileExtension] - Extension overriding the one in `name`
|
|
65
|
+
* @param [shared=false] - Draws the shared badge on the icon
|
|
66
|
+
* @param [loading=false] - Replaces the icon with a spinner
|
|
67
|
+
* @param [loadingLabel='Loading'] - Accessible name of the spinner
|
|
68
|
+
* @param [iconSize] - Icon size in px
|
|
69
|
+
* @param [details] - Metadata under the name
|
|
70
|
+
* @param [isInvalidName=false] - Mutes the name, marking it as invalid
|
|
71
|
+
* @param [className] - Additional CSS classes for the root element
|
|
72
|
+
* @param [nameClassName] - Additional CSS classes for the name text
|
|
73
|
+
* @param [sharedIndicatorClassName] - Additional CSS classes for the shared badge
|
|
74
|
+
* @param [sharedIndicatorTooltip='Shared'] - Tooltip shown over the shared badge
|
|
75
|
+
* @param [sharedLabel='Shared'] - Screen-reader text announcing the shared state
|
|
76
|
+
* @param [hideTooltip=false] - Suppresses the full-name tooltip
|
|
77
|
+
* @param [tooltipContent] - Shown instead of the full name while truncated
|
|
78
|
+
*/
|
|
79
|
+
export declare const FileName: FC<FileNameProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FileNameProps } from '../FileName/FileName';
|
|
3
|
+
/** Props for `FolderName`. */
|
|
4
|
+
export type FolderNameProps = Omit<FileNameProps, 'type' | 'fileExtension'>;
|
|
5
|
+
/**
|
|
6
|
+
* A folder name with the folder icon, truncated with a tooltip when it does
|
|
7
|
+
* not fit.
|
|
8
|
+
* aliases: FolderDisplay|DirectoryName
|
|
9
|
+
* Design system 2.0
|
|
10
|
+
*
|
|
11
|
+
* A `FileName` fixed to `DialItemType.Folder`, so it shares every behaviour of
|
|
12
|
+
* it — decorative icon, visually-hidden shared label, `details` line and the
|
|
13
|
+
* `loading` spinner. Its root carries `dial-kit-folder-name` on top of
|
|
14
|
+
* `dial-kit-file-name`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <FolderName name="Organization" shared />
|
|
19
|
+
* <FolderName name="Uploads" loading />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param name - Folder name
|
|
23
|
+
* @param [shared=false] - Draws the shared badge on the icon
|
|
24
|
+
* @param [loading=false] - Replaces the icon with a spinner
|
|
25
|
+
* @param [loadingLabel='Loading'] - Accessible name of the spinner
|
|
26
|
+
* @param [iconSize] - Icon size in px
|
|
27
|
+
* @param [details] - Metadata under the name
|
|
28
|
+
* @param [isInvalidName=false] - Mutes the name, marking it as invalid
|
|
29
|
+
* @param [className] - Additional CSS classes for the root element
|
|
30
|
+
* @param [nameClassName] - Additional CSS classes for the name text
|
|
31
|
+
* @param [sharedIndicatorClassName] - Additional CSS classes for the shared badge
|
|
32
|
+
* @param [sharedIndicatorTooltip='Shared'] - Tooltip shown over the shared badge
|
|
33
|
+
* @param [sharedLabel='Shared'] - Screen-reader text announcing the shared state
|
|
34
|
+
* @param [hideTooltip=false] - Suppresses the full-name tooltip
|
|
35
|
+
* @param [tooltipContent] - Shown instead of the full name while truncated
|
|
36
|
+
*/
|
|
37
|
+
export declare const FolderName: FC<FolderNameProps>;
|
|
@@ -23,9 +23,8 @@ export declare const ROW_HEIGHT = 40;
|
|
|
23
23
|
* literal fallbacks the Tailwind config carries, so a consumer that defines no
|
|
24
24
|
* CSS variables still gets the intended palette.
|
|
25
25
|
*
|
|
26
|
-
* Hover
|
|
27
|
-
*
|
|
28
|
-
* dropdown and select rows use.
|
|
26
|
+
* Hover uses the subtle accent tint and selection the slightly stronger
|
|
27
|
+
* selected tint, as in the grid cell design.
|
|
29
28
|
*/
|
|
30
29
|
export declare const GRID_THEME_PARAMS: {
|
|
31
30
|
accentColor: string;
|
|
@@ -35,9 +34,11 @@ export declare const GRID_THEME_PARAMS: {
|
|
|
35
34
|
rowHoverColor: string;
|
|
36
35
|
borderColor: string;
|
|
37
36
|
rowBorder: string;
|
|
38
|
-
headerRowBorder:
|
|
37
|
+
headerRowBorder: boolean;
|
|
39
38
|
headerColumnBorder: string;
|
|
39
|
+
headerColumnBorderHeight: number;
|
|
40
40
|
chromeBackgroundColor: string;
|
|
41
|
+
headerBackgroundColor: string;
|
|
41
42
|
foregroundColor: string;
|
|
42
43
|
headerTextColor: string;
|
|
43
44
|
browserColorScheme: string;
|
|
@@ -47,6 +48,7 @@ export declare const GRID_THEME_PARAMS: {
|
|
|
47
48
|
fontFamily: string;
|
|
48
49
|
spacing: number;
|
|
49
50
|
borderRadius: number;
|
|
51
|
+
inputBorderRadius: number;
|
|
50
52
|
wrapperBorderRadius: number;
|
|
51
53
|
};
|
|
52
54
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Placement } from '@floating-ui/react';
|
|
2
|
-
import { ButtonHTMLAttributes, FC } from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, CSSProperties, FC } from 'react';
|
|
3
3
|
import { DropdownItem } from '../../../models/dropdown';
|
|
4
4
|
import { ElementSize } from '../../../types/size';
|
|
5
5
|
export interface InlineSelectTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -9,6 +9,8 @@ export interface InlineSelectTriggerProps extends ButtonHTMLAttributes<HTMLButto
|
|
|
9
9
|
size?: ElementSize;
|
|
10
10
|
/** Whether the inline select is open or not. */
|
|
11
11
|
isOpen?: boolean;
|
|
12
|
+
/** Additional CSS classes applied to the label, e.g. its type scale or colour. */
|
|
13
|
+
labelClassName?: string;
|
|
12
14
|
}
|
|
13
15
|
export declare const InlineSelectTrigger: FC<InlineSelectTriggerProps>;
|
|
14
16
|
export interface InlineSelectProps {
|
|
@@ -30,11 +32,24 @@ export interface InlineSelectProps {
|
|
|
30
32
|
matchReferenceWidth?: boolean;
|
|
31
33
|
/** Additional CSS classes applied to the dropdown overlay. */
|
|
32
34
|
listClassName?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Inline style for the dropdown overlay. The overlay renders in a portal, so
|
|
37
|
+
* this is how custom properties reach its rows.
|
|
38
|
+
*/
|
|
39
|
+
listStyle?: CSSProperties;
|
|
33
40
|
/**
|
|
34
41
|
* Accessible name for the trigger. Without it the control announces only its
|
|
35
42
|
* current value ("Option A"), never what is being selected.
|
|
36
43
|
*/
|
|
37
44
|
ariaLabel?: string;
|
|
45
|
+
/** Additional CSS classes applied to the trigger button, merged after its own. */
|
|
46
|
+
triggerClassName?: string;
|
|
47
|
+
/** Additional CSS classes applied to the trigger's label. */
|
|
48
|
+
triggerLabelClassName?: string;
|
|
49
|
+
/** Controlled open state of the dropdown. Pair it with `onOpenChange`. */
|
|
50
|
+
open?: boolean;
|
|
51
|
+
/** Fired when the dropdown opens or closes. Receives the new open state. */
|
|
52
|
+
onOpenChange?: (open: boolean) => void;
|
|
38
53
|
}
|
|
39
54
|
/**
|
|
40
55
|
* An inline select control combining `InlineSelectTrigger` with `Dropdown`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
import { TooltipPlacement } from '../../../types/tooltip';
|
|
2
|
+
import { InteractiveTooltipTrigger, TooltipPlacement } from '../../../types/tooltip';
|
|
3
3
|
export interface InteractiveTooltipProps {
|
|
4
4
|
/**
|
|
5
5
|
* The panel's content. Left fully open-ended — unlike a plain tooltip's
|
|
@@ -16,6 +16,12 @@ export interface InteractiveTooltipProps {
|
|
|
16
16
|
hideTooltip?: boolean;
|
|
17
17
|
/** Whether the panel starts open (uncontrolled only). */
|
|
18
18
|
initialOpen?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* What opens the panel: hover or keyboard focus (the default), or a click or
|
|
21
|
+
* tap on the trigger, which then stays open until a second click, a press
|
|
22
|
+
* outside or Escape.
|
|
23
|
+
*/
|
|
24
|
+
trigger?: InteractiveTooltipTrigger;
|
|
19
25
|
/** Controlled open state; disables the hover and focus triggers. */
|
|
20
26
|
open?: boolean;
|
|
21
27
|
/** Callback fired when the open state should change. */
|
|
@@ -41,7 +47,11 @@ export interface InteractiveTooltipProps {
|
|
|
41
47
|
*
|
|
42
48
|
* Renders nothing on a mobile screen, where there is no hover to reveal it —
|
|
43
49
|
* so, as with {@link Tooltip}, a control must never depend on this panel alone
|
|
44
|
-
* to be understood or operated.
|
|
50
|
+
* to be understood or operated. A trigger whose only job is to reveal the
|
|
51
|
+
* panel, such as an info chip, sets `trigger={InteractiveTooltipTrigger.Click}`
|
|
52
|
+
* instead: the panel then opens on click or tap, works on every screen size,
|
|
53
|
+
* and no longer reacts to hover or focus. Do not use it on a trigger that has
|
|
54
|
+
* an action of its own, since the same tap would run both.
|
|
45
55
|
*
|
|
46
56
|
* @example
|
|
47
57
|
* ```tsx
|
|
@@ -68,6 +78,7 @@ export interface InteractiveTooltipProps {
|
|
|
68
78
|
* @param [contentClassName] - Additional CSS classes for the panel
|
|
69
79
|
* @param [placement=TooltipPlacement.Right] - Side of the trigger the panel is placed on
|
|
70
80
|
* @param [initialOpen=false] - Whether the panel starts open (uncontrolled only)
|
|
81
|
+
* @param [trigger=InteractiveTooltipTrigger.Hover] - What opens the panel: hover or focus, or a click or tap that keeps it open until dismissed
|
|
71
82
|
* @param [open] - Controlled open state; disables the hover and focus triggers
|
|
72
83
|
* @param [onOpenChange] - Callback fired when the open state should change
|
|
73
84
|
*/
|
|
@@ -10,9 +10,10 @@ export declare const INTERACTIVE_TOOLTIP_GAP = 8;
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const INTERACTIVE_TOOLTIP_HOVER_OPEN_DELAY = 400;
|
|
12
12
|
/**
|
|
13
|
-
* The panel sits
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* The panel sits one step of the overlay ladder (`z-interactive-tooltip`, see
|
|
14
|
+
* `zIndex` in `tailwind.config.js`) above the surface it is anchored to — a
|
|
15
|
+
* dropdown or select overlay, both `z-floating` — since it can be opened from
|
|
16
|
+
* a row inside one of them.
|
|
16
17
|
*
|
|
17
18
|
* By style this is a neutral floating panel rather than the coloured
|
|
18
19
|
* `Notification` banner: it shares the raised-card shape a dropdown or the
|
|
@@ -23,4 +24,4 @@ export declare const INTERACTIVE_TOOLTIP_HOVER_OPEN_DELAY = 400;
|
|
|
23
24
|
* Padding and width are the panel's own, sized for a block of copy and
|
|
24
25
|
* controls rather than a menu row.
|
|
25
26
|
*/
|
|
26
|
-
export declare const interactiveTooltipClassName = "z-
|
|
27
|
+
export declare const interactiveTooltipClassName = "z-interactive-tooltip max-w-[320px] rounded-xl bg-layer-0 p-4 dial-small-text text-primary shadow-md";
|
|
@@ -14,6 +14,8 @@ export interface MarkdownEditorProps {
|
|
|
14
14
|
id?: string;
|
|
15
15
|
/** Accessible name for the underlying textarea. Use it only where no visible label exists to pair with `id`. */
|
|
16
16
|
ariaLabel?: string;
|
|
17
|
+
/** Whether to show the bottom drag bar that resizes the editor height. */
|
|
18
|
+
showDragbar?: boolean;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* The 2.0 Markdown editor: a formatting toolbar (bold/italic/strikethrough,
|
|
@@ -35,5 +37,6 @@ export interface MarkdownEditorProps {
|
|
|
35
37
|
* @param [defaultPreview='edit'] - Initial edit/live/preview mode
|
|
36
38
|
* @param [id] - `id` of the underlying textarea, for a visible `<label htmlFor>`
|
|
37
39
|
* @param [ariaLabel] - Accessible name for the underlying textarea
|
|
40
|
+
* @param [showDragbar=true] - Whether to show the bottom drag bar that resizes the editor height
|
|
38
41
|
*/
|
|
39
42
|
export declare const MarkdownEditor: FC<MarkdownEditorProps>;
|
|
@@ -5,6 +5,7 @@ export interface NotificationProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
5
5
|
type?: NotificationType;
|
|
6
6
|
title?: ReactNode;
|
|
7
7
|
message: ReactNode;
|
|
8
|
+
action?: ReactNode;
|
|
8
9
|
closable?: boolean;
|
|
9
10
|
iconSize?: number;
|
|
10
11
|
iconStroke?: number;
|
|
@@ -57,12 +58,29 @@ export interface NotificationProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
57
58
|
* title="Title"
|
|
58
59
|
* message="Description text example"
|
|
59
60
|
* />
|
|
61
|
+
*
|
|
62
|
+
* <Notification
|
|
63
|
+
* variant={NotificationVariant.Error}
|
|
64
|
+
* type={NotificationType.SectionMessage}
|
|
65
|
+
* title="Couldn't finish this response"
|
|
66
|
+
* message="Something went wrong. Try again in a moment."
|
|
67
|
+
* action={
|
|
68
|
+
* <Button
|
|
69
|
+
* variant={ButtonVariant.Neutral}
|
|
70
|
+
* appearance={ButtonAppearance.Outlined}
|
|
71
|
+
* size={ElementSize.Small}
|
|
72
|
+
* label="Try again"
|
|
73
|
+
* onClick={handleRetry}
|
|
74
|
+
* />
|
|
75
|
+
* }
|
|
76
|
+
* />
|
|
60
77
|
* ```
|
|
61
78
|
*
|
|
62
79
|
* @param [variant=NotificationVariant.Info] - Defines the visual style and icon of the alert
|
|
63
80
|
* @param [type=NotificationType.Toast] - Defines the type of notification, either a toast or a section message
|
|
64
81
|
* @param [title] - Optional heading displayed above the message in semibold
|
|
65
82
|
* @param message - Message text to display inside the alert
|
|
83
|
+
* @param [action] - Optional control (typically a small `Button`) rendered at the inline end, after the text and before the close button; the caller supplies its accessible name
|
|
66
84
|
* @param [className] - Additional CSS classes applied to the alert container
|
|
67
85
|
* @param [textClassName] - Additional CSS classes applied to the message text
|
|
68
86
|
* @param [closable=false] - Whether the alert has a close button
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, MouseEvent, ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, FC, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button/Button';
|
|
3
3
|
import { PopupSize } from '../../../types/popup';
|
|
4
4
|
export interface PopupProps {
|
|
@@ -8,6 +8,12 @@ export interface PopupProps {
|
|
|
8
8
|
portalId?: string;
|
|
9
9
|
className?: string;
|
|
10
10
|
overlayClassName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Inline styles applied to the overlay. Floating UI sets `position`, `inset`
|
|
13
|
+
* and `overflow: auto` inline, which no class can override; keys passed here
|
|
14
|
+
* are merged after them and win.
|
|
15
|
+
*/
|
|
16
|
+
overlayStyle?: CSSProperties;
|
|
11
17
|
titleClassName?: string;
|
|
12
18
|
headerClassName?: string;
|
|
13
19
|
/** Additional CSS classes applied to the scrollable body wrapper around `children`. */
|
|
@@ -87,6 +93,7 @@ export interface PopupProps {
|
|
|
87
93
|
* @param [portalId] - Optional portal container id
|
|
88
94
|
* @param [className] - Additional CSS classes applied to the popup container
|
|
89
95
|
* @param [overlayClassName] - Additional CSS classes applied to the overlay
|
|
96
|
+
* @param [overlayStyle] - Inline styles merged over Floating UI's own overlay styles (`position`, `inset`, `overflow: auto`)
|
|
90
97
|
* @param [titleClassName] - Additional CSS classes applied to the title element
|
|
91
98
|
* @param [headerClassName] - Additional CSS classes applied to the popup header container
|
|
92
99
|
* @param [bodyClassName] - Additional CSS classes applied to the scrollable body wrapper around `children`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PopupSize } from '../../../types/popup';
|
|
2
|
-
export declare const popupOverlayBaseClassName = "z-
|
|
2
|
+
export declare const popupOverlayBaseClassName = "z-popup 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
5
|
export declare const popupTitleClassName = "flex-1 min-w-0 mr-3 truncate dial-h1-text text-primary";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SchemaRendererProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a JSON Schema as a form, with collapsible sections, required-field
|
|
5
|
+
* validation and default values.
|
|
6
|
+
* aliases: SchemaRenderer|JsonSchemaForm|SchemaForm
|
|
7
|
+
* Design system 2.0
|
|
8
|
+
*
|
|
9
|
+
* Built only from 2.0 controls: `Input`, `NumberInput`, `PasswordInput`,
|
|
10
|
+
* `Select`, `Switch` and `RadioGroup`. A value the schema does not describe —
|
|
11
|
+
* a key absent from `properties`, or an object with no fixed properties — is
|
|
12
|
+
* edited as raw JSON in a monospace `Textarea`.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <SchemaRenderer
|
|
17
|
+
* schema={mySchema}
|
|
18
|
+
* onChange={(v) => console.log(v)}
|
|
19
|
+
* onDefaultValues={(defaults) => console.log(defaults)}
|
|
20
|
+
* />
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @param schema - The root JSON Schema to render
|
|
24
|
+
* @param [defaultValue] - Initial form value; if omitted, defaults are extracted from schema
|
|
25
|
+
* @param [texts] - Override any user-visible strings rendered by the component
|
|
26
|
+
* @param [className] - Additional CSS classes for the root container
|
|
27
|
+
* @param [readonly=false] - When true all inputs are disabled; sections remain collapsible
|
|
28
|
+
* @param [defaultExpanded=true] - Initial expanded state for all collapsible sections
|
|
29
|
+
* @param [inputClassName] - Additional classes for the container of every text, number and select field
|
|
30
|
+
* @param [variant=SchemaRendererVariant.Sections] - `Sections` wraps every top-level property in a collapsible card; `Flat` renders primitives as labelled fields; `FlatSections` puts every property under a plain heading
|
|
31
|
+
* @param [skipUntouched=false] - When true, required-field errors appear only after the user has interacted with a field
|
|
32
|
+
* @param [acceptableResourceTypes] - Live options for properties flagged with `dial:resource: true`, keyed by resource type
|
|
33
|
+
* @param [renderField] - Override the rendered control for any field by path; return `defaultElement` to fall back to built-in rendering
|
|
34
|
+
* @param [onChange] - Called with the full form value on every change
|
|
35
|
+
* @param [onPropertyChange] - Called with `(path, value)` for each individual top-level property change
|
|
36
|
+
* @param [onDefaultValues] - Called once on mount with the resolved default values
|
|
37
|
+
*/
|
|
38
|
+
export declare const SchemaRenderer: FC<SchemaRendererProps>;
|