@epam/ai-dial-ui-kit 0.15.0-dev.3 → 0.15.0-dev.31

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.
Files changed (168) hide show
  1. package/README.md +185 -0
  2. package/dist/CHANGELOG.md +48 -0
  3. package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-BFEh4rXZ.cjs} +26 -26
  4. package/dist/DateCellRenderer-J1V3xwF7.cjs +1 -0
  5. package/dist/IconButton-DHOFapLo.cjs +1 -0
  6. package/dist/{JsonEditor-qv1Z0dLX.cjs → JsonEditor-BDe6elKO.cjs} +1 -1
  7. package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-C7BONfsl.cjs} +1 -1
  8. package/dist/{MarkdownEditor-jQ8nDJfx.cjs → MarkdownEditor-FVzYMdkC.cjs} +1 -1
  9. package/dist/{MarkdownEditorContainer-Bzcnoemw.cjs → MarkdownEditorContainer-GvlxX6kx.cjs} +1 -1
  10. package/dist/{Switch-CUKClcEz.cjs → Switch-DE6MrcqJ.cjs} +1 -1
  11. package/dist/components/Button/constants.js +9 -8
  12. package/dist/components/Dropdown/Dropdown.js +70 -65
  13. package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
  14. package/dist/components/Dropdown/constants.js +16 -14
  15. package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
  16. package/dist/components/FileManager/FileManager.js +373 -372
  17. package/dist/components/FileManager/FileManagerProvider.js +266 -264
  18. package/dist/components/FileManager/hooks/use-grid-context-menu.js +59 -59
  19. package/dist/components/New/Accordion/Accordion.js +87 -71
  20. package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
  21. package/dist/components/New/Breadcrumbs/constants.js +41 -0
  22. package/dist/components/New/Button/Button.js +32 -32
  23. package/dist/components/New/Button/ButtonWrappers.js +93 -37
  24. package/dist/components/New/Button/constants.js +3 -0
  25. package/dist/components/New/Button/utils.js +18 -8
  26. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +26 -16
  27. package/dist/components/New/Calendar/Calendar.js +337 -289
  28. package/dist/components/New/Calendar/constants.js +5 -5
  29. package/dist/components/New/CaptionText/CaptionText.js +18 -15
  30. package/dist/components/New/CardShell/CardShell.js +5 -3
  31. package/dist/components/New/Checkbox/Checkbox.js +67 -56
  32. package/dist/components/New/Checkbox/CheckboxBox.js +5 -3
  33. package/dist/components/New/CloseButton/CloseButton.js +18 -16
  34. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
  35. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +44 -39
  36. package/dist/components/New/Dropdown/Dropdown.js +112 -105
  37. package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
  38. package/dist/components/New/Dropdown/constants.js +22 -17
  39. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +20 -18
  40. package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
  41. package/dist/components/New/FileIcon/FileIcon.js +55 -0
  42. package/dist/components/New/FileIcon/constants.js +134 -0
  43. package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
  44. package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
  45. package/dist/components/New/FileName/FileName.js +78 -0
  46. package/dist/components/New/FilterChips/FilterChips.js +43 -0
  47. package/dist/components/New/FilterChips/constants.js +5 -0
  48. package/dist/components/New/FolderName/FolderName.js +16 -0
  49. package/dist/components/New/FolderPath/FolderPath.js +29 -28
  50. package/dist/components/New/Highlight/Highlight.js +23 -30
  51. package/dist/components/New/IconButton/IconButton.js +30 -28
  52. package/dist/components/New/InfoButton/InfoButton.js +13 -11
  53. package/dist/components/New/InlineSelect/InlineSelect.js +74 -56
  54. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +41 -39
  55. package/dist/components/New/InteractiveTooltip/constants.js +2 -2
  56. package/dist/components/New/Label/Label.js +13 -8
  57. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  58. package/dist/components/New/MenuItem/constants.js +9 -8
  59. package/dist/components/New/NoDataContent/NoDataContent.js +21 -19
  60. package/dist/components/New/Notification/Notification.js +33 -29
  61. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  62. package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
  63. package/dist/components/New/Popup/Popup.js +46 -44
  64. package/dist/components/New/Popup/constants.js +3 -3
  65. package/dist/components/New/Radio/Radio.js +75 -64
  66. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  67. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  68. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  69. package/dist/components/New/Search/Search.js +29 -27
  70. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  71. package/dist/components/New/Select/Select.js +120 -109
  72. package/dist/components/New/Select/constants.js +23 -20
  73. package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
  74. package/dist/components/New/Switch/Switch.js +69 -58
  75. package/dist/components/New/Tabs/Tabs.js +125 -61
  76. package/dist/components/New/Tag/Tag.js +42 -40
  77. package/dist/components/New/TagInput/TagInput.js +48 -44
  78. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +26 -24
  79. package/dist/components/New/Tooltip/TooltipContent.js +11 -9
  80. package/dist/components/New/Tooltip/constants.js +1 -1
  81. package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
  82. package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
  83. package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
  84. package/dist/components/New/TransferQueue/constants.js +24 -0
  85. package/dist/components/New/constants/overlay.js +15 -9
  86. package/dist/components/Popup/constants.js +8 -8
  87. package/dist/components/ProgressBar/ProgressBar.js +45 -33
  88. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
  89. package/dist/components/SchemaRenderer/components/SchemaField.js +19 -19
  90. package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +18 -18
  91. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
  92. package/dist/components/SchemaRenderer/types.js +19 -8
  93. package/dist/components/SchemaRenderer/utils.js +122 -95
  94. package/dist/components/Skeleton/Skeleton.js +25 -19
  95. package/dist/components/Spinner/Spinner.js +7 -5
  96. package/dist/components/Tooltip/TooltipContent.js +11 -11
  97. package/dist/components-manifest.json +830 -31
  98. package/dist/constants/public-class-names.js +198 -0
  99. package/dist/dial-ui-kit.cjs +2 -2
  100. package/dist/dial-ui-kit.js +330 -302
  101. package/dist/editors.cjs +1 -1
  102. package/dist/file-manager.cjs +1 -1
  103. package/dist/grid.cjs +1 -1
  104. package/dist/index.css +2 -2
  105. package/dist/lazy-BEsZqouS.cjs +1 -0
  106. package/dist/merge-classes-BEJXjzkx.cjs +1 -0
  107. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
  108. package/dist/src/components/FileManager/FileManager.d.ts +2 -0
  109. package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
  110. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
  111. package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
  112. package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
  113. package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
  114. package/dist/src/components/New/Button/Button.d.ts +4 -1
  115. package/dist/src/components/New/Button/ButtonWrappers.d.ts +20 -0
  116. package/dist/src/components/New/Button/utils.d.ts +15 -0
  117. package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
  118. package/dist/src/components/New/Calendar/Calendar.d.ts +14 -1
  119. package/dist/src/components/New/Calendar/constants.d.ts +1 -1
  120. package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
  121. package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
  122. package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
  123. package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
  124. package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
  125. package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
  126. package/dist/src/components/New/FileName/FileName.d.ts +79 -0
  127. package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
  128. package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
  129. package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
  130. package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
  131. package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
  132. package/dist/src/components/New/Notification/Notification.d.ts +18 -0
  133. package/dist/src/components/New/Popup/constants.d.ts +1 -1
  134. package/dist/src/components/New/Select/constants.d.ts +3 -2
  135. package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
  136. package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
  137. package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
  138. package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
  139. package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
  140. package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
  141. package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
  142. package/dist/src/components/New/constants/overlay.d.ts +13 -0
  143. package/dist/src/components/Popup/constants.d.ts +1 -1
  144. package/dist/src/components/SchemaRenderer/types.d.ts +11 -0
  145. package/dist/src/components/SchemaRenderer/utils.d.ts +10 -1
  146. package/dist/src/constants/public-class-names.d.ts +189 -0
  147. package/dist/src/index.d.ts +22 -1
  148. package/dist/src/types/accordion.d.ts +7 -0
  149. package/dist/src/types/breadcrumbs.d.ts +9 -0
  150. package/dist/src/types/button.d.ts +1 -0
  151. package/dist/src/types/transfer-queue.d.ts +10 -0
  152. package/dist/src/utils/__tests__/timezone.spec.d.ts +1 -0
  153. package/dist/src/utils/sub-menu-floating.d.ts +7 -4
  154. package/dist/src/utils/timezone.d.ts +24 -0
  155. package/dist/types/accordion.js +4 -0
  156. package/dist/types/breadcrumbs.js +4 -0
  157. package/dist/types/button.js +3 -3
  158. package/dist/types/transfer-queue.js +4 -0
  159. package/dist/use-file-manager-tabs-C0h1Sq5T.cjs +3 -0
  160. package/dist/utils/merge-classes.js +12 -5
  161. package/dist/utils/sub-menu-floating.js +98 -54
  162. package/dist/utils/timezone.js +19 -0
  163. package/package.json +3 -3
  164. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  165. package/dist/IconButton-DWqoaBWf.cjs +0 -1
  166. package/dist/lazy-tfN4sKhq.cjs +0 -1
  167. package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
  168. package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
@@ -0,0 +1,69 @@
1
+ import { ReactNode } from 'react';
2
+ export interface FilterChipItem<T extends string = string> {
3
+ value: T;
4
+ label: string;
5
+ icon?: ReactNode;
6
+ }
7
+ export interface FilterChipsProps<T extends string = string> {
8
+ items: FilterChipItem<T>[];
9
+ value: T;
10
+ onChange: (value: T) => void;
11
+ stretch?: boolean;
12
+ className?: string;
13
+ chipClassName?: string;
14
+ 'aria-label'?: string;
15
+ 'aria-labelledby'?: string;
16
+ }
17
+ /**
18
+ * A row of filter chips that picks one value out of a few.
19
+ * aliases: FilterChipRow|ChipTabs|TagTabs|FilterTabs
20
+ * Design system 2.0
21
+ *
22
+ * The chip-shaped sibling of the kit's other single-select rows, and the one to
23
+ * reach for when the options label a *subset of a list* — "All", "Shared",
24
+ * "Mine" above a history panel. `Tabs` underlines the active option and reads
25
+ * as navigation between panels; `SegmentedControl` sinks equal segments into a
26
+ * track and reads as a view switch. This one draws `TagAppearance.Selectable`
27
+ * chips: no fill until selected, and a semibold label once it is. Selecting a
28
+ * chip therefore widens it by the difference between the regular and semibold
29
+ * label — give the row `stretch`, or the chips a width, if that shift matters.
30
+ *
31
+ * Each chip is a toggle button carrying its state on `aria-pressed`, wrapped in
32
+ * a named `role="group"` — the pattern `Tag` is built for. That makes every
33
+ * chip its own tab stop, which is what a filter row wants: unlike a
34
+ * `radiogroup`, arrowing onto a chip never changes the filter by accident.
35
+ * Name the group through `aria-label` or `aria-labelledby`, or the chips are
36
+ * announced as a handful of unrelated toggles.
37
+ *
38
+ * There is no disabled chip. An option the user must not pick is left out of
39
+ * `items` — a chip that renders but cannot be activated is a label and nothing
40
+ * else, and `Tag` drops its button role when disabled, so it would not even
41
+ * announce as unavailable.
42
+ *
43
+ * Labels are the caller's to translate — the component ships no English
44
+ * defaults.
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * <FilterChips
49
+ * aria-label={t('Filter chats')}
50
+ * value={tab}
51
+ * onChange={setTab}
52
+ * items={[
53
+ * { value: 'all', label: t('All') },
54
+ * { value: 'mine', label: t('My chats') },
55
+ * { value: 'shared', label: t('Shared') },
56
+ * ]}
57
+ * />
58
+ * ```
59
+ *
60
+ * @param items - Chips to render, in order; each needs a unique `value` and a `label`
61
+ * @param value - The `value` of the selected chip
62
+ * @param onChange - Called with the `value` of the chip the user picked. A click on the already-selected chip fires it again, so a row that clears back to a default handles that itself
63
+ * @param [stretch=false] - Grows the chips to share the row width equally instead of hugging their labels
64
+ * @param [className] - Additional classes for the row, e.g. its padding or `flex-wrap`
65
+ * @param [chipClassName] - Additional classes for every chip. A panel too narrow for the chips' default padding can tighten it here
66
+ * @param [aria-label] - Names the row as a whole
67
+ * @param [aria-labelledby] - Names the row from an existing element, e.g. a visible heading
68
+ */
69
+ export declare const FilterChips: <T extends string = string>({ items, value, onChange, stretch, className, chipClassName, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: FilterChipsProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The chip row itself. It does not wrap by default: a filter row is usually one
3
+ * line of a narrow panel, and a caller that wants it to wrap passes
4
+ * `flex-wrap` through `className`.
5
+ */
6
+ export declare const containerClassName = "flex flex-nowrap items-center gap-1";
7
+ /**
8
+ * `stretch` layout: the chips share the row width equally but never shrink
9
+ * below their label, so a row too narrow for all of them overflows rather than
10
+ * truncating every chip. `Tag` is already `rounded-full` and `inline-flex`, so
11
+ * only the growth and the centring are added here.
12
+ */
13
+ export declare const chipStretchClassName = "min-w-max flex-1 justify-center";
@@ -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>;
@@ -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`.
@@ -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 above the surface it is anchored to — a dropdown or select
14
- * overlay, both `z-[53]` — since it can be opened from a row inside one of
15
- * them.
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-[54] max-w-[320px] rounded-xl bg-layer-0 p-4 dial-small-text text-primary shadow-md";
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";
@@ -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,5 +1,5 @@
1
1
  import { PopupSize } from '../../../types/popup';
2
- export declare const popupOverlayBaseClassName = "z-[52] flex items-center justify-center bg-backdrop md:p-4 gap-5 p-6";
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";
@@ -20,9 +20,10 @@ export declare const selectListWidthClassName = "!max-w-[var(--reference-width)]
20
20
  * 344px — not the panel around them, so the search row and Select All stay
21
21
  * put while the list moves under them. The panel keeps its own cap on the
22
22
  * available viewport height, which takes over on a screen too short for this
23
- * one.
23
+ * one. `py-1` matches the Dropdown menu's list inset, so the first and last
24
+ * rows (and their focus ring) do not sit flush against the panel edge.
24
25
  */
25
- export declare const selectOptionsScrollClassName = "max-h-[344px] overflow-y-auto";
26
+ export declare const selectOptionsScrollClassName: string;
26
27
  export declare const selectSubMenuGap = 4;
27
28
  export declare const selectSubMenuClassName: string;
28
29
  /** Marks an option that opens a nested list. Matches the dropdown's caret. */
@@ -0,0 +1,35 @@
1
+ import { FC, ReactNode } from 'react';
2
+ /** Props for `SharedEntityIndicator`. */
3
+ export interface SharedEntityIndicatorProps {
4
+ /** Accessible name of the badge. */
5
+ label?: string;
6
+ /** Tooltip shown while the badge is hovered. */
7
+ tooltip?: ReactNode;
8
+ /** Arrow size in px. */
9
+ size?: number;
10
+ /** Additional CSS classes for the badge, e.g. to position it over an icon. */
11
+ className?: string;
12
+ }
13
+ /**
14
+ * A small arrow badge marking an entity as shared.
15
+ * aliases: SharedIcon|AccessIndicator
16
+ * Design system 2.0
17
+ *
18
+ * A `role="img"` named by `label`, so it can stand on its own. Placed inside a
19
+ * larger `role="img"` — as `FileIcon` does — its name is folded into the
20
+ * parent's, which is why `FileIcon` names the shared state itself. The tooltip
21
+ * is a pointer-only hint: the badge is not focusable, and the tooltip never
22
+ * reaches assistive technology, so `label` is what carries the meaning.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * <SharedEntityIndicator />
27
+ * <SharedEntityIndicator tooltip="Shared with 3 people" className="absolute -bottom-0.5 -left-0.5" />
28
+ * ```
29
+ *
30
+ * @param [label='Shared'] - Accessible name of the badge
31
+ * @param [tooltip='Shared'] - Tooltip shown while the badge is hovered
32
+ * @param [size=12] - Arrow size in px
33
+ * @param [className] - Additional CSS classes for the badge
34
+ */
35
+ export declare const SharedEntityIndicator: FC<SharedEntityIndicatorProps>;
@@ -1,4 +1,5 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
+ import { TabOrientation } from '../../../types/tab';
2
3
  /** A single tab entry rendered by {@link Tabs}. */
3
4
  export interface TabItem {
4
5
  /** Unique identifier used to match against `activeTabId`. */
@@ -7,6 +8,8 @@ export interface TabItem {
7
8
  label: string;
8
9
  /** Optional numeric badge rendered after the label. */
9
10
  count?: number;
11
+ /** Decorative icon rendered before the label. The label names the tab, so the icon is hidden from assistive tech. */
12
+ icon?: ReactNode;
10
13
  /** Renders the tab greyed out and unselectable, and skips it during keyboard navigation. */
11
14
  disabled?: boolean;
12
15
  }
@@ -17,19 +20,35 @@ export interface TabsProps {
17
20
  activeTabId: string;
18
21
  /** Fired with the tab's `id` when the user selects a tab. */
19
22
  onTabChange: (tabId: string) => void;
23
+ /** Layout direction of the tab list. Uses the {@link TabOrientation} enum. Defaults to `TabOrientation.Horizontal`. */
24
+ orientation?: TabOrientation;
25
+ /**
26
+ * Already-translated heading rendered above the tabs, which also names the
27
+ * tab list. Omit to render no heading.
28
+ */
29
+ sectionLabel?: string;
20
30
  /**
21
31
  * Accessible name for the tab list. A row of tabs carries no name of its own,
22
- * so screen readers announce it as an unlabelled list without this.
32
+ * so screen readers announce it as an unlabelled list without this — unless
33
+ * `sectionLabel` is naming it already.
23
34
  */
24
35
  ariaLabel?: string;
25
- /** Additional CSS classes for the tab list container. */
36
+ /** Additional CSS classes for the root element. */
26
37
  className?: string;
38
+ /**
39
+ * Additional CSS classes for the `role="tablist"`. `className` reaches it
40
+ * only when there is no `sectionLabel`, since the heading wrapper is then
41
+ * the root; this prop reaches it in either case.
42
+ */
43
+ tabListClassName?: string;
27
44
  /** Additional CSS classes applied to every tab. */
28
45
  tabClassName?: string;
46
+ /** Additional CSS classes for the `sectionLabel` heading. */
47
+ sectionLabelClassName?: string;
29
48
  }
30
49
  /**
31
- * A horizontal row of tabs, underlining the active one and showing optional count badges.
32
- * aliases: TabRow|TabNavigation|TabBar
50
+ * A row or rail of tabs, marking the active one and showing optional icons and count badges.
51
+ * aliases: TabRow|TabNavigation|TabBar|VerticalTabs|SettingsNav|SideNav
33
52
  * Design system 2.0
34
53
  *
35
54
  * Follows the ARIA tabs pattern with automatic activation: only the active tab is
@@ -38,6 +57,16 @@ export interface TabsProps {
38
57
  * Tabs marked `disabled` are greyed out, cannot be clicked, and are skipped by
39
58
  * keyboard navigation.
40
59
  *
60
+ * `TabOrientation.Horizontal` draws the default row: the active tab takes a
61
+ * gradient underline, and `ArrowLeft` / `ArrowRight` move along it.
62
+ * `TabOrientation.Vertical` draws the settings-page rail instead — full-width
63
+ * rows with the active one on a tinted pill rather than an underline, driven by
64
+ * `ArrowUp` / `ArrowDown`. The rail is the shape to reach for when the tabs
65
+ * label whole pages of a settings surface; the row, when they filter one.
66
+ *
67
+ * `className` lands on whichever element is outermost: the heading wrapper when
68
+ * `sectionLabel` is set, the `role="tablist"` itself when it is not.
69
+ *
41
70
  * The component renders the tabs only; the panels stay with the consumer.
42
71
  *
43
72
  * @example
@@ -53,11 +82,30 @@ export interface TabsProps {
53
82
  * />
54
83
  * ```
55
84
  *
85
+ * @example A settings rail, named by its own heading.
86
+ * ```tsx
87
+ * <Tabs
88
+ * orientation={TabOrientation.Vertical}
89
+ * sectionLabel={t('Settings')}
90
+ * className="w-[240px] shrink-0 border-e border-e-tertiary"
91
+ * tabs={[
92
+ * { id: 'preferences', label: t('Preferences'), icon: <IconSettings size={18} /> },
93
+ * { id: 'usage', label: t('Usage'), icon: <IconChartBar size={18} /> },
94
+ * ]}
95
+ * activeTabId={activeTabId}
96
+ * onTabChange={setActiveTabId}
97
+ * />
98
+ * ```
99
+ *
56
100
  * @param tabs - Ordered list of tabs to render.
57
101
  * @param activeTabId - ID of the currently selected tab.
58
102
  * @param onTabChange - Fired with the tab's `id` when the user selects a tab.
103
+ * @param [orientation=TabOrientation.Horizontal] - Layout direction of the tab list.
104
+ * @param [sectionLabel] - Heading rendered above the tabs, which also names the tab list.
59
105
  * @param [ariaLabel] - Accessible name for the tab list.
60
- * @param [className] - Additional CSS classes for the tab list container.
106
+ * @param [className] - Additional CSS classes for the root element.
107
+ * @param [tabListClassName] - Additional CSS classes for the `role="tablist"`.
61
108
  * @param [tabClassName] - Additional CSS classes applied to every tab.
109
+ * @param [sectionLabelClassName] - Additional CSS classes for the `sectionLabel` heading.
62
110
  */
63
111
  export declare const Tabs: FC<TabsProps>;
@@ -19,8 +19,10 @@ export declare const HOVER_OPEN_DELAY = 500;
19
19
  */
20
20
  export declare const arrowClassName = "fill-control-inverted";
21
21
  /**
22
- * Tooltips sit above popups, dropdowns and the calendar (all `z-[53]`), since
23
- * they can be triggered by a control inside one of them.
22
+ * Tooltips sit at the top of the overlay ladder (`z-tooltip`, see `zIndex` in
23
+ * `tailwind.config.js`) — above popups (`z-popup`), dropdowns and the calendar
24
+ * (`z-floating`) and interactive tooltips — since they can be triggered by a
25
+ * control inside any of them.
24
26
  *
25
27
  * `max-w-[376px]` is the cap the design puts on a tooltip: at `dial-small-text`
26
28
  * that is around 60 characters a line, past which a line stops being
@@ -36,4 +38,4 @@ export declare const arrowClassName = "fill-control-inverted";
36
38
  * nothing to see around a 7px triangle that the box's own shadow does not
37
39
  * already carry.
38
40
  */
39
- export declare const tooltipClassName = "z-[55] max-w-[376px] whitespace-pre-wrap break-words rounded-lg bg-control-inverted px-3 py-2 dial-small-text text-control-inverted shadow-xs";
41
+ export declare const tooltipClassName = "z-tooltip max-w-[376px] whitespace-pre-wrap break-words rounded-lg bg-control-inverted px-3 py-2 dial-small-text text-control-inverted shadow-xs";
@@ -0,0 +1,139 @@
1
+ import { FC } from 'react';
2
+ import { TransferQueueItemStatus } from '../../../types/transfer-queue';
3
+ /** One file (or other named unit of work) tracked by a `TransferQueue`. */
4
+ export interface TransferQueueItem {
5
+ /** Stable identifier, passed back to `onCancelItem`. */
6
+ id: string;
7
+ /** Name shown on the row; a file's extension also picks its `FileIcon` glyph. */
8
+ name: string;
9
+ /** Current lifecycle status. */
10
+ status: TransferQueueItemStatus;
11
+ /**
12
+ * Completion as 0–100. Feeds only the aggregate bar shown while the queue
13
+ * is collapsed; a settled item without one counts as 100, a running one as 0.
14
+ */
15
+ percent?: number;
16
+ /**
17
+ * Why a `Failed` or `Warning` item ended as it did. Shown as the status
18
+ * icon's tooltip and used as its accessible name; falls back to
19
+ * `labels.failedMessage` / `labels.warningMessage`.
20
+ */
21
+ message?: string;
22
+ }
23
+ /** Every user-visible string of `TransferQueue`. */
24
+ export interface TransferQueueLabels {
25
+ /** Accessible name of an in-progress row's cancel control. */
26
+ cancelItemAriaLabel: (name: string) => string;
27
+ /** Accessible name of an in-progress row's spinner. */
28
+ itemProgressAriaLabel: (name: string) => string;
29
+ /** Accessible name of a succeeded row's check icon. */
30
+ successLabel: string;
31
+ /** Trailing text on a canceled row. */
32
+ canceledLabel: string;
33
+ /** Fallback reason for a failed item without its own `message`. */
34
+ failedMessage: string;
35
+ /** Fallback reason for a warned item without its own `message`. */
36
+ warningMessage: string;
37
+ /** Accessible name of the collapsed queue's aggregate progress bar. */
38
+ queueProgressAriaLabel: string;
39
+ /**
40
+ * The aggregate bar's `aria-valuetext`. Given settled and total counts
41
+ * rather than a percentage, because "3 of 10 files" reads better than "36%"
42
+ * when the work is a list of files.
43
+ */
44
+ queueProgressValueText: (completed: number, total: number) => string;
45
+ /** Accessible name of the collapse toggle while expanded. */
46
+ collapseAriaLabel: string;
47
+ /** Accessible name of the expand toggle while collapsed. */
48
+ expandAriaLabel: string;
49
+ /** Accessible name of the close control. */
50
+ closeAriaLabel: string;
51
+ /** Heading of the close-confirmation dialog. */
52
+ closeConfirmHeader: string;
53
+ /** Confirmation description when an item is in progress and none failed. */
54
+ closeConfirmDescriptionInProgress: string;
55
+ /** Confirmation description when an item failed and none is in progress. */
56
+ closeConfirmDescriptionFailed: string;
57
+ /** Confirmation description when items are both in progress and failed. */
58
+ closeConfirmDescriptionMixed: string;
59
+ /** Confirm button of the close-confirmation dialog. */
60
+ closeConfirmLabel: string;
61
+ /** Cancel button of the close-confirmation dialog. */
62
+ closeCancelLabel: string;
63
+ }
64
+ /** Props for `TransferQueue`. */
65
+ export interface TransferQueueProps {
66
+ /**
67
+ * Heading, rendered verbatim. The host composes any count into it
68
+ * (e.g. "Importing 5 files"); the component never pluralizes.
69
+ */
70
+ title: string;
71
+ /** Items to show, in display order. The queue renders nothing when empty. */
72
+ items: TransferQueueItem[];
73
+ /**
74
+ * Called when the queue should close — from the close control (after a
75
+ * confirmation while work is in progress or a failure is unread), or by
76
+ * itself once every item has succeeded.
77
+ */
78
+ onClose: () => void;
79
+ /**
80
+ * Called with an item's id when the user cancels it. The host aborts the
81
+ * work and keeps the item in `items` with status `Canceled`. Without it,
82
+ * in-progress rows show a spinner only.
83
+ */
84
+ onCancelItem?: (id: string) => void;
85
+ /** Overrides for the English default strings. */
86
+ labels?: Partial<TransferQueueLabels>;
87
+ /**
88
+ * Milliseconds after every item succeeded before `onClose` is called by
89
+ * itself. Defaults to 8000; `0` or less disables it.
90
+ */
91
+ autoCloseDelay?: number;
92
+ /** Additional CSS classes for the root panel. */
93
+ className?: string;
94
+ /** Additional CSS classes for the scrollable list of rows. */
95
+ bodyClassName?: string;
96
+ }
97
+ /**
98
+ * A floating panel listing the files of an upload, download, import or export
99
+ * with a live status per row.
100
+ * aliases: UploadQueue|ImportQueue|ExportQueue|UploadProgress|ProgressToast
101
+ * Design system 2.0
102
+ *
103
+ * Each row shows the file's `FileIcon` and name, and a trailing status: a
104
+ * spinner (with a cancel control on hover or focus) while in progress, a check
105
+ * on success, a warning or error icon whose reason is both its tooltip and its
106
+ * accessible name, or "Canceled". The header carries the host's title, a count
107
+ * of failed items, and collapse and close controls. Collapsed while work runs,
108
+ * the rows are replaced by one aggregate `ProgressBar`.
109
+ *
110
+ * Closing while an item is in progress or has failed asks for confirmation
111
+ * first. Once every item has succeeded the queue closes itself after
112
+ * `autoCloseDelay`; a warned or canceled row keeps it open so it can be read.
113
+ *
114
+ * The root is a polite `role="status"` live region. Positioning is left to
115
+ * the host — wrap it in a fixed container at the screen corner.
116
+ *
117
+ * @example
118
+ * ```tsx
119
+ * <TransferQueue
120
+ * title="Importing 2 files"
121
+ * items={[
122
+ * { id: '1', name: 'report.pdf', status: TransferQueueItemStatus.Success },
123
+ * { id: '2', name: 'data.csv', status: TransferQueueItemStatus.InProgress, percent: 40 },
124
+ * ]}
125
+ * onClose={handleClose}
126
+ * onCancelItem={handleCancel}
127
+ * />
128
+ * ```
129
+ *
130
+ * @param title - Heading, rendered verbatim
131
+ * @param items - Items to show, in display order
132
+ * @param onClose - Called when the queue should close
133
+ * @param [onCancelItem] - Called with an item's id when the user cancels it
134
+ * @param [labels] - Overrides for the English default strings
135
+ * @param [autoCloseDelay=8000] - Delay before an all-succeeded queue closes itself; `0` disables
136
+ * @param [className] - Additional CSS classes for the root panel
137
+ * @param [bodyClassName] - Additional CSS classes for the list of rows
138
+ */
139
+ export declare const TransferQueue: FC<TransferQueueProps>;
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { TransferQueueLabels } from './TransferQueue';
3
+ interface TransferQueueHeaderProps {
4
+ title: string;
5
+ /** The badge renders only when this is positive. */
6
+ failedCount: number;
7
+ isCollapsed: boolean;
8
+ /** Id of the rows container the collapse toggle controls. */
9
+ itemsId: string;
10
+ labels: TransferQueueLabels;
11
+ onToggleCollapse: () => void;
12
+ onClose: () => void;
13
+ }
14
+ /** Queue heading with its failed-item badge and the collapse and close controls. */
15
+ export declare const TransferQueueHeader: FC<TransferQueueHeaderProps>;
16
+ export {};
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { TransferQueueItem, TransferQueueLabels } from './TransferQueue';
3
+ interface TransferQueueRowProps {
4
+ item: TransferQueueItem;
5
+ labels: TransferQueueLabels;
6
+ onCancel?: (id: string) => void;
7
+ }
8
+ /** One queue row: the file's icon and name, plus a trailing status slot. */
9
+ export declare const TransferQueueRow: FC<TransferQueueRowProps>;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import { TransferQueueLabels } from './TransferQueue';
2
+ /** Delay before a queue whose items have all succeeded closes itself. */
3
+ export declare const TRANSFER_QUEUE_AUTO_CLOSE_DELAY_MS = 8000;
4
+ export declare const STATUS_SLOT_CLASS = "flex size-7 shrink-0 items-center justify-center";
5
+ /** English defaults for every `TransferQueue` string; a host passes translations through `labels`. */
6
+ export declare const DEFAULT_TRANSFER_QUEUE_LABELS: TransferQueueLabels;
@@ -5,6 +5,11 @@
5
5
  */
6
6
  /** The floating panel itself: rounded raised card with a one-unit inset. */
7
7
  export declare const overlaySurfaceClassName = "rounded-xl bg-layer-raised p-1 shadow-md";
8
+ /**
9
+ * Stacks the rows of a menu or option list with a 2px gap, so the tints of
10
+ * adjacent selected and hovered rows read as separate rows instead of one block.
11
+ */
12
+ export declare const overlayListClassName = "flex flex-col gap-0.5";
8
13
  /**
9
14
  * A nested panel opened from a row of the surface above it. It is the same
10
15
  * object as its parent panel, so it reads from `overlaySurfaceClassName` too —
@@ -12,6 +17,14 @@ export declare const overlaySurfaceClassName = "rounded-xl bg-layer-raised p-1 s
12
17
  * rather than by the trigger further up.
13
18
  */
14
19
  export declare const overlaySubMenuClassName: string;
20
+ /**
21
+ * A submenu panel that lists kit-rendered rows. The top-level menu and option
22
+ * list wrap their rows in `py-1` inside the panel's `p-1`; a submenu renders
23
+ * its rows straight into the panel, so it takes the same total vertical inset
24
+ * here. A caller-rendered submenu body keeps the plain panel, as a
25
+ * `renderOverlay` body does at the top level.
26
+ */
27
+ export declare const overlaySubMenuListClassName: string;
15
28
  /**
16
29
  * A selectable row inside the panel. Keeps a visible focus ring: these rows are
17
30
  * reached by keyboard, and the 1.0 versions suppressed the ring outright.
@@ -1,5 +1,5 @@
1
1
  import { PopupSize } from '../../types/popup';
2
- export declare const overlayBaseClassName = "z-[52] flex items-center justify-center bg-blackout md:p-4";
2
+ export declare const overlayBaseClassName = "z-popup flex items-center justify-center bg-blackout md:p-4";
3
3
  export declare const popupDividerClassName = "divide-tertiary divide-y";
4
4
  export declare const popupHeaderClassName = "flex flex-row justify-between py-4 px-6 items-center";
5
5
  export declare const popupSizeClassMap: Record<PopupSize, string>;
@@ -80,6 +80,17 @@ export interface SchemaRendererTexts {
80
80
  selectTypePlaceholder: string;
81
81
  removeItemAriaLabel: string;
82
82
  removeFieldAriaLabel: string;
83
+ typeColumnHeader: string;
84
+ entryTypeString: string;
85
+ entryTypeNumber: string;
86
+ entryTypeBoolean: string;
87
+ entryTypeNull: string;
88
+ entryTypeObject: string;
89
+ entryTypeArray: string;
90
+ entryTypeChangeWarning: string;
91
+ booleanTrueOption: string;
92
+ booleanFalseOption: string;
93
+ invalidJsonError: string;
83
94
  }
84
95
  export declare const DEFAULT_SCHEMA_TEXTS: SchemaRendererTexts;
85
96
  export interface DialSchemaRendererProps {