@epam/ai-dial-ui-kit 0.15.0-dev.5 → 0.15.0-dev.50

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 (251) hide show
  1. package/README.md +194 -1
  2. package/dist/CHANGELOG.md +86 -0
  3. package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-CZNa4jVJ.cjs} +31 -31
  4. package/dist/DateCellRenderer-X6vXPDIG.cjs +1 -0
  5. package/dist/IconButton-DHOFapLo.cjs +1 -0
  6. package/dist/JsonEditor-Bxui5wJH.cjs +1 -0
  7. package/dist/{MarkdownEditor-C9-ZMRVi.cjs → MarkdownEditor-BKtFs714.cjs} +1 -1
  8. package/dist/MarkdownEditor-Bapd1ycU.cjs +1 -0
  9. package/dist/MarkdownEditorContainer-B5aHwoYF.cjs +1 -0
  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/MarkdownEditor/MarkdownEditor.js +23 -21
  20. package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +27 -27
  21. package/dist/components/New/Accordion/Accordion.js +87 -71
  22. package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +207 -0
  23. package/dist/components/New/AutocompleteTagInput/utils.js +11 -0
  24. package/dist/components/New/Avatar/Avatar.js +70 -0
  25. package/dist/components/New/Badge/Badge.js +45 -0
  26. package/dist/components/New/BottomSheet/BottomSheet.js +128 -0
  27. package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
  28. package/dist/components/New/Breadcrumbs/constants.js +41 -0
  29. package/dist/components/New/Button/Button.js +32 -32
  30. package/dist/components/New/Button/ButtonWrappers.js +103 -37
  31. package/dist/components/New/Button/constants.js +3 -0
  32. package/dist/components/New/Button/utils.js +18 -8
  33. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +26 -16
  34. package/dist/components/New/Calendar/Calendar.js +253 -222
  35. package/dist/components/New/Calendar/constants.js +5 -5
  36. package/dist/components/New/CaptionText/CaptionText.js +18 -15
  37. package/dist/components/New/CardShell/CardShell.js +5 -3
  38. package/dist/components/New/Checkbox/Checkbox.js +67 -56
  39. package/dist/components/New/Checkbox/CheckboxBox.js +5 -3
  40. package/dist/components/New/CloseButton/CloseButton.js +18 -16
  41. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
  42. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +38 -37
  43. package/dist/components/New/ConfirmationPopup/constants.js +8 -11
  44. package/dist/components/New/Dropdown/Dropdown.js +112 -105
  45. package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
  46. package/dist/components/New/Dropdown/constants.js +22 -17
  47. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +20 -18
  48. package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
  49. package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
  50. package/dist/components/New/FileIcon/FileIcon.js +55 -0
  51. package/dist/components/New/FileIcon/constants.js +134 -0
  52. package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
  53. package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
  54. package/dist/components/New/FileName/FileName.js +78 -0
  55. package/dist/components/New/FilterChips/FilterChips.js +43 -0
  56. package/dist/components/New/FilterChips/constants.js +5 -0
  57. package/dist/components/New/FolderName/FolderName.js +16 -0
  58. package/dist/components/New/FolderPath/FolderPath.js +29 -28
  59. package/dist/components/New/Highlight/Highlight.js +23 -30
  60. package/dist/components/New/IconButton/IconButton.js +30 -28
  61. package/dist/components/New/InfoButton/InfoButton.js +13 -11
  62. package/dist/components/New/InlineSelect/InlineSelect.js +74 -56
  63. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +41 -39
  64. package/dist/components/New/InteractiveTooltip/constants.js +2 -2
  65. package/dist/components/New/Label/Label.js +13 -8
  66. package/dist/components/New/MarkdownEditor/MarkdownEditor.js +29 -27
  67. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  68. package/dist/components/New/MenuItem/constants.js +9 -8
  69. package/dist/components/New/NoDataContent/NoDataContent.js +21 -19
  70. package/dist/components/New/Notification/Notification.js +33 -29
  71. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  72. package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
  73. package/dist/components/New/Popup/Popup.js +46 -44
  74. package/dist/components/New/Popup/constants.js +3 -3
  75. package/dist/components/New/Radio/Radio.js +75 -64
  76. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  77. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  78. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  79. package/dist/components/New/SchemaRenderer/SchemaRenderer.js +164 -0
  80. package/dist/components/New/SchemaRenderer/components/SchemaAnyOfEditor.js +65 -0
  81. package/dist/components/New/SchemaRenderer/components/SchemaArrayEditor.js +109 -0
  82. package/dist/components/New/SchemaRenderer/components/SchemaField.js +83 -0
  83. package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +72 -0
  84. package/dist/components/New/SchemaRenderer/components/SchemaJsonEditor.js +41 -0
  85. package/dist/components/New/SchemaRenderer/components/SchemaKeyValueEditor.js +250 -0
  86. package/dist/components/New/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
  87. package/dist/components/New/SchemaRenderer/components/SchemaOneOfEditor.js +163 -0
  88. package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +150 -0
  89. package/dist/components/New/SchemaRenderer/components/SchemaSection.js +135 -0
  90. package/dist/components/New/SchemaRenderer/context.js +17 -0
  91. package/dist/components/New/Search/Search.js +29 -27
  92. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  93. package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
  94. package/dist/components/New/Select/MultiSelectTags.js +18 -15
  95. package/dist/components/New/Select/Select.js +219 -197
  96. package/dist/components/New/Select/constants.js +23 -20
  97. package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
  98. package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
  99. package/dist/components/New/Slider/Slider.js +151 -90
  100. package/dist/components/New/Slider/utils.js +12 -0
  101. package/dist/components/New/Switch/Switch.js +69 -58
  102. package/dist/components/New/Tabs/Tabs.js +125 -61
  103. package/dist/components/New/Tag/Tag.js +42 -40
  104. package/dist/components/New/TagInput/TagInput.js +48 -44
  105. package/dist/components/New/Textarea/Textarea.js +21 -20
  106. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +26 -24
  107. package/dist/components/New/Tooltip/TooltipContent.js +11 -9
  108. package/dist/components/New/Tooltip/constants.js +1 -1
  109. package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
  110. package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
  111. package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
  112. package/dist/components/New/TransferQueue/constants.js +24 -0
  113. package/dist/components/New/constants/overlay.js +17 -9
  114. package/dist/components/Popup/constants.js +8 -8
  115. package/dist/components/ProgressBar/ProgressBar.js +45 -33
  116. package/dist/components/SchemaRenderer/SchemaRenderer.js +16 -15
  117. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
  118. package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +2 -2
  119. package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +1 -1
  120. package/dist/components/SchemaRenderer/components/SchemaField.js +23 -23
  121. package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +19 -19
  122. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
  123. package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +1 -1
  124. package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +13 -13
  125. package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +5 -5
  126. package/dist/components/Skeleton/Skeleton.js +25 -19
  127. package/dist/components/Spinner/Spinner.js +7 -5
  128. package/dist/components/Tooltip/TooltipContent.js +11 -11
  129. package/dist/components-manifest.json +1837 -84
  130. package/dist/constants/public-class-names.js +218 -0
  131. package/dist/constants/schema-renderer.js +33 -0
  132. package/dist/dial-ui-kit.cjs +2 -2
  133. package/dist/dial-ui-kit.js +356 -307
  134. package/dist/editors.cjs +1 -1
  135. package/dist/file-manager.cjs +1 -1
  136. package/dist/grid.cjs +1 -1
  137. package/dist/index.css +2 -2
  138. package/dist/lazy-_W6FYhKg.cjs +1 -0
  139. package/dist/merge-classes-BEJXjzkx.cjs +1 -0
  140. package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
  141. package/dist/migration-guides/0.15.0/slider-redesign.md +110 -0
  142. package/dist/migration-guides/README.md +2 -0
  143. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
  144. package/dist/src/components/FileManager/FileManager.d.ts +2 -0
  145. package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
  146. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
  147. package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +2 -0
  148. package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +2 -0
  149. package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
  150. package/dist/src/components/New/AutocompleteTagInput/AutocompleteTagInput.d.ts +97 -0
  151. package/dist/src/components/New/AutocompleteTagInput/utils.d.ts +17 -0
  152. package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +1 -0
  153. package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
  154. package/dist/src/components/New/Badge/Badge.d.ts +47 -0
  155. package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
  156. package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
  157. package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
  158. package/dist/src/components/New/Button/Button.d.ts +4 -1
  159. package/dist/src/components/New/Button/ButtonWrappers.d.ts +21 -0
  160. package/dist/src/components/New/Button/utils.d.ts +15 -0
  161. package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
  162. package/dist/src/components/New/Calendar/constants.d.ts +1 -1
  163. package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -1
  164. package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
  165. package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
  166. package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +85 -0
  167. package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
  168. package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
  169. package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
  170. package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
  171. package/dist/src/components/New/FileName/FileName.d.ts +79 -0
  172. package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
  173. package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
  174. package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
  175. package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
  176. package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
  177. package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +3 -0
  178. package/dist/src/components/New/Notification/Notification.d.ts +18 -0
  179. package/dist/src/components/New/Popup/constants.d.ts +1 -1
  180. package/dist/src/components/New/SchemaRenderer/SchemaRenderer.d.ts +38 -0
  181. package/dist/src/components/New/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +37 -0
  182. package/dist/src/components/New/SchemaRenderer/components/SchemaArrayEditor.d.ts +35 -0
  183. package/dist/src/components/New/SchemaRenderer/components/SchemaField.d.ts +33 -0
  184. package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +30 -0
  185. package/dist/src/components/New/SchemaRenderer/components/SchemaJsonEditor.d.ts +29 -0
  186. package/dist/src/components/New/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +37 -0
  187. package/dist/src/components/New/SchemaRenderer/components/SchemaObjectEditor.d.ts +32 -0
  188. package/dist/src/components/New/SchemaRenderer/components/SchemaOneOfEditor.d.ts +39 -0
  189. package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +38 -0
  190. package/dist/src/components/New/SchemaRenderer/components/SchemaSection.d.ts +39 -0
  191. package/dist/src/components/New/SchemaRenderer/context.d.ts +8 -0
  192. package/dist/src/components/New/SchemaRenderer/types.d.ts +76 -0
  193. package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
  194. package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
  195. package/dist/src/components/New/Select/Select.d.ts +9 -0
  196. package/dist/src/components/New/Select/constants.d.ts +3 -2
  197. package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
  198. package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +100 -0
  199. package/dist/src/components/New/Slider/Slider.d.ts +20 -1
  200. package/dist/src/components/New/Slider/utils.d.ts +6 -0
  201. package/dist/src/components/New/Slider/utils.spec.d.ts +1 -0
  202. package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
  203. package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
  204. package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
  205. package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
  206. package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
  207. package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
  208. package/dist/src/components/New/constants/overlay.d.ts +13 -0
  209. package/dist/src/components/Popup/constants.d.ts +1 -1
  210. package/dist/src/components/SchemaRenderer/types.d.ts +5 -82
  211. package/dist/src/components/SchemaRenderer/utils.d.ts +1 -13
  212. package/dist/src/constants/public-class-names.d.ts +209 -0
  213. package/dist/src/constants/schema-renderer.d.ts +2 -0
  214. package/dist/src/index.d.ts +39 -2
  215. package/dist/src/models/json-schema.d.ts +71 -0
  216. package/dist/src/types/accordion.d.ts +7 -0
  217. package/dist/src/types/avatar.d.ts +7 -0
  218. package/dist/src/types/badge.d.ts +16 -0
  219. package/dist/src/types/breadcrumbs.d.ts +9 -0
  220. package/dist/src/types/button.d.ts +1 -0
  221. package/dist/src/types/entity-type.d.ts +9 -0
  222. package/dist/src/types/json-schema.d.ts +22 -0
  223. package/dist/src/types/transfer-queue.d.ts +10 -0
  224. package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
  225. package/dist/src/utils/avatar.d.ts +12 -0
  226. package/dist/src/utils/json-schema.d.ts +23 -0
  227. package/dist/src/utils/sub-menu-floating.d.ts +7 -4
  228. package/dist/types/accordion.js +4 -0
  229. package/dist/types/avatar.js +4 -0
  230. package/dist/types/badge.js +5 -0
  231. package/dist/types/breadcrumbs.js +4 -0
  232. package/dist/types/button.js +3 -3
  233. package/dist/types/entity-type.js +4 -0
  234. package/dist/types/json-schema.js +7 -0
  235. package/dist/types/transfer-queue.js +4 -0
  236. package/dist/use-file-manager-tabs-Bzzwwcgk.cjs +3 -0
  237. package/dist/utils/avatar.js +22 -0
  238. package/dist/{components/SchemaRenderer/utils.js → utils/json-schema.js} +122 -95
  239. package/dist/utils/merge-classes.js +12 -5
  240. package/dist/utils/sub-menu-floating.js +99 -54
  241. package/package.json +4 -9
  242. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  243. package/dist/IconButton-DWqoaBWf.cjs +0 -1
  244. package/dist/JsonEditor-D2jSlRFi.cjs +0 -1
  245. package/dist/MarkdownEditor-BzEbdj7R.cjs +0 -1
  246. package/dist/MarkdownEditorContainer-BvwJjkiZ.cjs +0 -1
  247. package/dist/components/SchemaRenderer/types.js +0 -27
  248. package/dist/editor-_174x-qy.cjs +0 -1
  249. package/dist/lazy-DM-7dL0Y.cjs +0 -1
  250. package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
  251. package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
@@ -157,6 +157,7 @@ export interface DialFileManagerProps {
157
157
  renameValidationMessages?: RenameValidationMessages;
158
158
  forbiddenSymbolsRegExp?: RegExp;
159
159
  forbiddenSymbolsTooltip?: ReactNode;
160
+ skipForbiddenSymbolsCheckForActions?: boolean;
160
161
  onCreateFolder?: (file: DialUploadFileItem, folderPath: string, fileId: string) => void | Promise<void>;
161
162
  onCreateFolderValidate?: (name: string, parentFolder: DialFile) => string | null;
162
163
  folderCreationValidationMessages?: CreateFolderValidationMessages;
@@ -286,6 +287,7 @@ export interface DialFileManagerProps {
286
287
  * @param [renameValidationMessages] - Optional custom validation messages for renaming files and folders. Note that you need to add `${NotificationVariant.Warning}__` prefix to the `hiddenItemWarning` message to display it as a warning with the warning icon.
287
288
  * @param [forbiddenSymbolsRegExp] - Optional RegExp will be used in the validation for the files and folders names. The "g" and "y" flags are not allowed in this RegExp and will be ignored.
288
289
  * @param [forbiddenSymbolsTooltip] - Optional tooltip displayed when a file or folder name contains forbidden characters
290
+ * @param [skipForbiddenSymbolsCheckForActions] - When provided, skips the forbidden-symbols check when building row action menus, so all actions are shown even for items whose names contain forbidden characters.
289
291
  *
290
292
  * @param [onDownloadFiles] - Callback fired when files are downloaded
291
293
  *
@@ -85,6 +85,7 @@ export interface FileManagerContextValue {
85
85
  getDisplayName: (item: DialFile) => string;
86
86
  forbiddenSymbolsRegExp?: RegExp;
87
87
  forbiddenSymbolsTooltip?: ReactNode;
88
+ skipForbiddenSymbolsCheckForActions?: boolean;
88
89
  openDeleteConfirmation: (items: DialFile[], parentFolderPath: string) => void;
89
90
  closeDeleteConfirmation: () => void;
90
91
  confirmDelete: () => void;
@@ -37,7 +37,8 @@ export interface UseGridContextMenuProps {
37
37
  isRenameFileAvailable?: boolean;
38
38
  isDuplicateFolderAvailable?: boolean;
39
39
  forbiddenSymbolsRegExp?: RegExp;
40
+ skipForbiddenSymbolsCheckForActions?: boolean;
40
41
  onGridCreateSiblingFolder: (files: DialFile[]) => void;
41
42
  onGridCreateChildFolder: (files: DialFile[]) => void;
42
43
  }
43
- export declare const useGridContextMenu: ({ actionLabels, onDuplicate, onCopy, onMove, onDownload, onRename, onDelete, onInfo, onUnshare, onRemoveAccess, sharedWithMeIds, sharedByMePaths, onManagePermissions, onPreview, onOpenInNewTab, previewExtensions, isRenameFileAvailable, isDuplicateFolderAvailable, forbiddenSymbolsRegExp, onGridCreateSiblingFolder, onGridCreateChildFolder, }: UseGridContextMenuProps) => (file: DialFile) => DropdownItem[];
44
+ export declare const useGridContextMenu: ({ actionLabels, onDuplicate, onCopy, onMove, onDownload, onRename, onDelete, onInfo, onUnshare, onRemoveAccess, sharedWithMeIds, sharedByMePaths, onManagePermissions, onPreview, onOpenInNewTab, previewExtensions, isRenameFileAvailable, isDuplicateFolderAvailable, forbiddenSymbolsRegExp, skipForbiddenSymbolsCheckForActions, onGridCreateSiblingFolder, onGridCreateChildFolder, }: UseGridContextMenuProps) => (file: DialFile) => DropdownItem[];
@@ -9,6 +9,7 @@ export interface DialMarkdownEditorProps {
9
9
  theme?: EditorThemes;
10
10
  className?: string;
11
11
  placeholder?: ReactNode;
12
+ showDragbar?: boolean;
12
13
  }
13
14
  /**
14
15
  * A Markdown editor component built on top of @uiw/react-md-editor.
@@ -32,5 +33,6 @@ export interface DialMarkdownEditorProps {
32
33
  * @param [placeholder] - Content to display when the editor is empty
33
34
  * @param [theme='dark'] - Theme for the editor ('light' or 'dark')
34
35
  * @param [className] - Additional CSS classes for the container
36
+ * @param [showDragbar=true] - Whether to show the bottom drag bar that resizes the editor height
35
37
  */
36
38
  export declare const DialMarkdownEditor: FC<DialMarkdownEditorProps>;
@@ -12,6 +12,7 @@ export interface DialMarkdownEditorContainerProps {
12
12
  theme?: EditorThemes;
13
13
  onValidateJSON?: OnValidate;
14
14
  preview?: PreviewType;
15
+ showDragbar?: boolean;
15
16
  }
16
17
  /**
17
18
  * A container component that combines Markdown and JSON editing capabilities
@@ -45,5 +46,6 @@ export interface DialMarkdownEditorContainerProps {
45
46
  * @param [theme='dark'] - Theme for the editor (EditorThemes.dark or EditorThemes.light)
46
47
  * @param [onValidateJSON] - Callback fired when JSON validation occurs
47
48
  * @param [preview='edit'] - Preview mode for Markdown editor
49
+ * @param [showDragbar=true] - Whether to show the Markdown editor's bottom drag bar that resizes its height
48
50
  */
49
51
  export declare const DialMarkdownEditorContainer: FC<DialMarkdownEditorContainerProps>;
@@ -1,4 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
+ import { AccordionCaretPosition } from '../../../types/accordion';
2
3
  export interface AccordionProps {
3
4
  /** Title rendered in the header. */
4
5
  title: ReactNode;
@@ -24,6 +25,8 @@ export interface AccordionProps {
24
25
  ariaLabel?: string;
25
26
  /** Fired when the header is clicked. Receives the next expanded state. */
26
27
  onToggle?: (expanded: boolean) => void;
28
+ /** Where the header draws its caret. Defaults to `AccordionCaretPosition.End`. */
29
+ caretPosition?: AccordionCaretPosition;
27
30
  /** Additional CSS classes for the outer container. */
28
31
  className?: string;
29
32
  /** Additional CSS classes for the header. */
@@ -41,7 +44,8 @@ export interface AccordionProps {
41
44
  * expanded, a title, and an optional description stacked beneath it.
42
45
  *
43
46
  * The revealed content is a labelled `region`, so assistive tech announces it by the
44
- * header it belongs to. `nonCollapsible` renders the header as static text instead of
47
+ * header it belongs to. It stays mounted while collapsed so it can slide open and shut,
48
+ * and is `inert` then, out of both the tab order and the accessibility tree. `nonCollapsible` renders the header as static text instead of
45
49
  * a permanently disabled button, which keeps a decorative panel out of the tab order.
46
50
  *
47
51
  * @example
@@ -64,6 +68,7 @@ export interface AccordionProps {
64
68
  * @param [nonCollapsible] - Renders the panel permanently expanded, with a static header.
65
69
  * @param [ariaLabel] - Accessible name for the header; needed when `title` carries no text.
66
70
  * @param [onToggle] - Fired when the header is clicked. Receives the next expanded state.
71
+ * @param [caretPosition=AccordionCaretPosition.End] - Where the header draws its caret: before or after the title.
67
72
  * @param [className] - Additional CSS classes for the outer container.
68
73
  * @param [headerClassName] - Additional CSS classes for the header.
69
74
  * @param [contentClassName] - Additional CSS classes for the content region.
@@ -0,0 +1,97 @@
1
+ import { FC } from 'react';
2
+ import { LabelProps } from '../Label/Label';
3
+ import { ElementSize } from '../../../types/size';
4
+ import { AutocompleteTagInputSuggestion } from './utils';
5
+ export type { AutocompleteTagInputSuggestion } from './utils';
6
+ export interface AutocompleteTagInputProps {
7
+ id?: string;
8
+ /** Controlled tag list. */
9
+ value?: string[];
10
+ /** Initial tag list when uncontrolled. */
11
+ defaultValue?: string[];
12
+ /** Values offered while typing; a picked suggestion adds its `value` as a tag. */
13
+ suggestions: AutocompleteTagInputSuggestion[];
14
+ /** How many matching suggestions the list shows at most. */
15
+ maxSuggestions?: number;
16
+ size?: ElementSize;
17
+ labelProps?: LabelProps;
18
+ placeholder?: string;
19
+ caption?: string;
20
+ error?: string;
21
+ invalid?: boolean;
22
+ disabled?: boolean;
23
+ readOnly?: boolean;
24
+ ariaLabel?: string;
25
+ tagListLabel?: string;
26
+ /** Accessible name of a tag's remove button; defaults to `Remove <tag>`. */
27
+ getRemoveTagLabel?: (tag: string) => string;
28
+ className?: string;
29
+ fieldClassName?: string;
30
+ tagClassName?: string;
31
+ listClassName?: string;
32
+ onChange?: (tags: string[]) => void;
33
+ }
34
+ /**
35
+ * A tag input that suggests values while typing and also accepts its own.
36
+ * aliases: Autocomplete|Combobox|TagAutocomplete|ChipAutocomplete|MultiValueAutocomplete
37
+ * Design system 2.0
38
+ *
39
+ * Typing opens a list of the `suggestions` that match the text (by label, value
40
+ * or description) and are not already tags, capped at `maxSuggestions`, with the
41
+ * first one highlighted. Enter or comma adds the highlighted suggestion, or the
42
+ * typed text when nothing matches; clicking a suggestion adds it too. The arrow
43
+ * keys move the highlight and wrap at the ends; Escape and leaving the field
44
+ * close the list without adding what was typed. Backspace on an empty input
45
+ * removes the last tag, and duplicate tags are ignored. Entered text is not
46
+ * validated — say what format is expected through `caption`.
47
+ *
48
+ * Reach for {@link TagInput} when there is nothing to suggest, and for a
49
+ * multiple `Select` when only listed values are allowed.
50
+ *
51
+ * The input follows the ARIA combobox pattern: it keeps focus while the list is
52
+ * open, and the highlighted suggestion is announced through
53
+ * `aria-activedescendant`. The tags are a list named by `tagListLabel`, and each
54
+ * remove button is named after its tag.
55
+ *
56
+ * Works controlled (`value` + `onChange`) or uncontrolled (`defaultValue`).
57
+ *
58
+ * @example
59
+ * ```tsx
60
+ * const [types, setTypes] = useState<string[]>([]);
61
+ *
62
+ * <AutocompleteTagInput
63
+ * id="attachment-types"
64
+ * labelProps={{ label: 'Attachment types', required: true }}
65
+ * caption="Choose a suggested MIME type or add one as <type>/<subtype>"
66
+ * suggestions={[
67
+ * { value: 'image/png', label: 'PNG', description: 'image/png' },
68
+ * { value: 'application/pdf', label: 'PDF', description: 'application/pdf' },
69
+ * ]}
70
+ * value={types}
71
+ * onChange={setTypes}
72
+ * />
73
+ * ```
74
+ *
75
+ * @param [id] - The id of the text input, linked to the label.
76
+ * @param [value] - Controlled tag list.
77
+ * @param [defaultValue=[]] - Initial tag list when uncontrolled.
78
+ * @param suggestions - Values offered while typing.
79
+ * @param [maxSuggestions=5] - How many matching suggestions the list shows at most.
80
+ * @param [size=ElementSize.Standard] - Field height: standard is 40px, small is 24px.
81
+ * @param [labelProps] - Props of the {@link Label} rendered above the field.
82
+ * @param [placeholder] - Placeholder shown while there are no tags.
83
+ * @param [caption] - Helper text rendered below the field when there is no `error`.
84
+ * @param [error] - Error message rendered below the field (pass `invalid` too for error styling).
85
+ * @param [invalid=false] - Applies the field's error styling and marks the input `aria-invalid`.
86
+ * @param [disabled=false] - Disables typing and tag removal.
87
+ * @param [readOnly=false] - Shows the tags without allowing new ones or removal.
88
+ * @param [ariaLabel] - Accessible name for the input; use it when there is no visible label.
89
+ * @param [tagListLabel="Tags"] - Accessible name of the tag list.
90
+ * @param [getRemoveTagLabel] - Accessible name of a tag's remove button, given the tag; pass a translated one, as the default is the English `Remove <tag>`.
91
+ * @param [className] - Additional CSS classes for the outer container.
92
+ * @param [fieldClassName] - Additional CSS classes for the field itself.
93
+ * @param [tagClassName] - Additional CSS classes applied to every tag.
94
+ * @param [listClassName] - Additional CSS classes for the floating suggestion list.
95
+ * @param [onChange] - Called with the new list whenever a tag is added or removed.
96
+ */
97
+ export declare const AutocompleteTagInput: FC<AutocompleteTagInputProps>;
@@ -0,0 +1,17 @@
1
+ export interface AutocompleteTagInputSuggestion {
2
+ /** The tag added when the suggestion is picked. */
3
+ value: string;
4
+ /** The suggestion's name, shown at the leading edge of its row. */
5
+ label: string;
6
+ /** Secondary text shown at the trailing edge of the row, e.g. the value itself. */
7
+ description?: string;
8
+ }
9
+ /**
10
+ * The suggestions to show for the typed text: not already a tag, and with the
11
+ * query in their label, value or description (case-insensitive), in the order
12
+ * given, capped at `limit`.
13
+ *
14
+ * Kept pure and separate from the component so the filtering can be tested
15
+ * without driving the input.
16
+ */
17
+ export declare const filterAutocompleteSuggestions: (suggestions: AutocompleteTagInputSuggestion[], query: string, tags: string[], limit: number) => AutocompleteTagInputSuggestion[];
@@ -0,0 +1,55 @@
1
+ import { FC, SyntheticEvent } from 'react';
2
+ import { AvatarShape } from '../../../types/avatar';
3
+ /** Props for `Avatar`. */
4
+ export interface AvatarProps {
5
+ /** Display name the initials and the colour are derived from. */
6
+ name: string;
7
+ /** Initials to show instead of the ones derived from `name`. */
8
+ initials?: string;
9
+ /** Image URL. The initials show instead while it is missing or fails to load. */
10
+ src?: string;
11
+ /** Accessible name. Leave it empty when a visible label beside the avatar already names it. */
12
+ alt?: string;
13
+ /** Width and height in px. */
14
+ size?: number;
15
+ /** Outline of the avatar. */
16
+ shape?: AvatarShape;
17
+ /** Additional CSS classes for the avatar. */
18
+ className?: string;
19
+ /** Type-scale class for the initials. When set, it replaces the font size derived from `size`. */
20
+ textClassName?: string;
21
+ /** Called when the image fails to load, after the avatar has switched to initials. */
22
+ onImageError?: (event: SyntheticEvent<HTMLImageElement>) => void;
23
+ }
24
+ /**
25
+ * A person's or an entity's picture, or its initials on a colour picked from
26
+ * its name.
27
+ * aliases: UserAvatar|InitialsAvatar|ProfilePicture
28
+ * Design system 2.0
29
+ *
30
+ * The same name always gets the same colour, drawn from the theme's visual
31
+ * tokens, so a list of avatars stays stable between renders and sessions. An
32
+ * image that is missing or fails to load falls back to the initials; a new
33
+ * `src` tries the image again.
34
+ *
35
+ * An avatar with an `alt` is a `role="img"` named by it, whether it shows the
36
+ * image or the initials. Without one it is decorative and hidden from
37
+ * assistive technology, which is right when a visible name sits beside it.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * <Avatar name="Ada Lovelace" src={photoUrl} alt="Ada Lovelace" />
42
+ * <Avatar name="Summarizer" shape={AvatarShape.Square} size={36} />
43
+ * ```
44
+ *
45
+ * @param name - Display name the initials and the colour are derived from
46
+ * @param [initials] - Initials to show instead of the ones derived from `name`
47
+ * @param [src] - Image URL; the initials show while it is missing or broken
48
+ * @param [alt=''] - Accessible name; empty makes the avatar decorative
49
+ * @param [size=32] - Width and height in px
50
+ * @param [shape=AvatarShape.Circle] - Outline of the avatar
51
+ * @param [className] - Additional CSS classes for the avatar
52
+ * @param [textClassName] - Type-scale class for the initials, replacing the size-derived font size
53
+ * @param [onImageError] - Called when the image fails to load
54
+ */
55
+ export declare const Avatar: FC<AvatarProps>;
@@ -0,0 +1,47 @@
1
+ import { FC, HTMLAttributes, ReactNode } from 'react';
2
+ import { BadgeColor, BadgeVariant } from '../../../types/badge';
3
+ /** Props for `Badge`. */
4
+ export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'color'> {
5
+ /** Text of the badge. */
6
+ label: string;
7
+ /** How the badge is drawn. */
8
+ variant?: BadgeVariant;
9
+ /** Visual colour of a filled badge. Ignored by the outlined variant. */
10
+ color?: BadgeColor;
11
+ /** Decorative icon before the label. */
12
+ icon?: ReactNode;
13
+ /** Type-scale class for the label, replacing the variant's own. */
14
+ textClassName?: string;
15
+ }
16
+ /**
17
+ * A short, static label: a topic, a category, or a status that is not a
18
+ * control.
19
+ * aliases: Label|StatusLabel|Pill|Chip
20
+ * Design system 2.0
21
+ *
22
+ * Unlike `Tag`, a badge never responds to the pointer and never removes
23
+ * itself — reach for `Tag` when the label is something to select, filter by or
24
+ * dismiss. The badge is 24px tall and does not wrap; a long label keeps its
25
+ * width, so give the badge a `max-w-*` and a truncating `textClassName` where
26
+ * that matters.
27
+ *
28
+ * `BadgeVariant.Outlined` is the neutral label, bordered on the sunken layer.
29
+ * `BadgeVariant.Filled` is a pill in one of the theme's visual colours, for
30
+ * labels that are told apart by colour — so pair the colour with text that
31
+ * says the same thing, since colour alone does not reach every reader. The
32
+ * filled variant's type scale is a lead style, which uppercases itself: pass
33
+ * the label in sentence case.
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * <Badge label="Translation" />
38
+ * <Badge label="Featured" variant={BadgeVariant.Filled} color={BadgeColor.Green} />
39
+ * ```
40
+ *
41
+ * @param label - Text of the badge
42
+ * @param [variant=BadgeVariant.Outlined] - How the badge is drawn
43
+ * @param [color=BadgeColor.Blue] - Visual colour of a filled badge
44
+ * @param [icon] - Decorative icon before the label
45
+ * @param [textClassName] - Type-scale class for the label, replacing the variant's own
46
+ */
47
+ export declare const Badge: FC<BadgeProps>;
@@ -0,0 +1,84 @@
1
+ import { CSSProperties, FC, ReactNode } from 'react';
2
+ /** Props for `BottomSheet`. */
3
+ export interface BottomSheetProps {
4
+ /** Whether the sheet is shown. */
5
+ open: boolean;
6
+ /** Called when the sheet asks to close: the close button, Escape, or a press on the backdrop. */
7
+ onClose: () => void;
8
+ /** Title of the header. A sheet without one has no header and needs `ariaLabel`. */
9
+ title?: string;
10
+ /** Accessible name of the sheet when it has no `title`. */
11
+ ariaLabel?: string;
12
+ /** Shows a back button at the start of the header when set. */
13
+ onBack?: () => void;
14
+ /** Accessible name of the back button. */
15
+ backAriaLabel?: string;
16
+ /** Accessible name of the close button. */
17
+ closeAriaLabel?: string;
18
+ /** Whether a press on the backdrop closes the sheet. */
19
+ closeOnOutsideClick?: boolean;
20
+ /** Content of the sheet, scrolled when it is taller than the sheet allows. */
21
+ children?: ReactNode;
22
+ /** Additional CSS classes for the sheet panel, e.g. a different maximum height. */
23
+ className?: string;
24
+ /** Additional CSS classes for the backdrop. */
25
+ overlayClassName?: string;
26
+ /** Additional CSS classes for the header row. */
27
+ headerClassName?: string;
28
+ /**
29
+ * Inline style for the panel. It renders in a portal, so this is how custom
30
+ * properties reach the panel and its content.
31
+ */
32
+ style?: CSSProperties;
33
+ /** Inline style for the backdrop, merged after its own positioning. */
34
+ overlayStyle?: CSSProperties;
35
+ /** Additional CSS classes for the scrolling body. */
36
+ bodyClassName?: string;
37
+ /** Type-scale class for the title, replacing its own. */
38
+ titleClassName?: string;
39
+ /** Id of the element to portal into, instead of the end of `<body>`. */
40
+ portalId?: string;
41
+ }
42
+ /**
43
+ * A panel that slides up from the bottom edge over a dimmed page — the mobile
44
+ * counterpart of `Popup`.
45
+ * aliases: ActionSheet|Drawer|MobileSheet|BottomDrawer
46
+ * Design system 2.0
47
+ *
48
+ * It is a modal dialog: focus moves into it on open and stays there, returns
49
+ * to where it came from on close, and the page behind it does not scroll.
50
+ * Escape, the close button and a press on the backdrop all call `onClose`;
51
+ * the sheet itself stays controlled by `open`.
52
+ *
53
+ * With a `title` the header shows it centred, a close button at the end and,
54
+ * when `onBack` is set, a back button at the start for a sheet that drills
55
+ * into pages of its own; the title also names the dialog. Without one there is
56
+ * no header, and `ariaLabel` names the sheet instead. The body scrolls once
57
+ * the content is taller than 85% of the viewport.
58
+ *
59
+ * @example
60
+ * ```tsx
61
+ * <BottomSheet open={isOpen} title="Select model" onClose={() => setIsOpen(false)}>
62
+ * <ModelList />
63
+ * </BottomSheet>
64
+ * ```
65
+ *
66
+ * @param open - Whether the sheet is shown
67
+ * @param onClose - Called when the sheet asks to close
68
+ * @param [title] - Title of the header; without it the sheet has no header
69
+ * @param [ariaLabel] - Accessible name when there is no `title`
70
+ * @param [onBack] - Shows a back button at the start of the header
71
+ * @param [backAriaLabel='Back'] - Accessible name of the back button
72
+ * @param [closeAriaLabel='Close'] - Accessible name of the close button
73
+ * @param [closeOnOutsideClick=true] - Whether a press on the backdrop closes the sheet
74
+ * @param [children] - Content of the sheet
75
+ * @param [className] - Additional CSS classes for the sheet panel
76
+ * @param [overlayClassName] - Additional CSS classes for the backdrop
77
+ * @param [headerClassName] - Additional CSS classes for the header row
78
+ * @param [style] - Inline style for the panel, e.g. custom properties
79
+ * @param [overlayStyle] - Inline style for the backdrop
80
+ * @param [bodyClassName] - Additional CSS classes for the scrolling body
81
+ * @param [titleClassName] - Type-scale class for the title
82
+ * @param [portalId] - Id of the element to portal into
83
+ */
84
+ export declare const BottomSheet: FC<BottomSheetProps>;
@@ -0,0 +1,94 @@
1
+ import { FC, MouseEvent, ReactNode } from 'react';
2
+ import { BreadcrumbsSize } from '../../../types/breadcrumbs';
3
+ /** One step of the trail rendered by {@link Breadcrumbs}. */
4
+ export interface BreadcrumbsItem {
5
+ /**
6
+ * The segment's text. A plain string rather than a node, because it is both
7
+ * what is drawn and what the tooltip shows once the trail truncates it.
8
+ */
9
+ label: string;
10
+ /** Where the segment navigates. Renders the segment as a link. */
11
+ href?: string;
12
+ /**
13
+ * Fired when the segment is activated. Renders the segment as a button when
14
+ * there is no `href`, and runs before the browser follows one when there is —
15
+ * call `preventDefault()` on the event to keep the user where they are.
16
+ */
17
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
18
+ /** Leading icon, e.g. a folder glyph on the root. Decorative: pass `aria-hidden`. */
19
+ icon?: ReactNode;
20
+ }
21
+ export interface BreadcrumbsProps {
22
+ /** The trail, outermost first. The last entry is the current page. */
23
+ items: BreadcrumbsItem[];
24
+ /**
25
+ * How many segments are drawn before the middle collapses behind an
26
+ * ellipsis menu. Clamped to a floor of three — the root, the ellipsis and
27
+ * the current page.
28
+ */
29
+ maxVisibleItems?: number;
30
+ /**
31
+ * The trail's type scale: `dial-small-text` by default, or `dial-h2-text`
32
+ * for a trail that doubles as the page heading.
33
+ */
34
+ size?: BreadcrumbsSize;
35
+ /** Node drawn between two segments. Defaults to a right chevron, mirrored in RTL. */
36
+ separator?: ReactNode;
37
+ /** Accessible name for the `<nav>`. */
38
+ ariaLabel?: string;
39
+ /** Accessible name for the ellipsis button that reveals the collapsed segments. */
40
+ overflowAriaLabel?: string;
41
+ /** Additional CSS classes for the `<nav>`. Must not shrink it to its content. */
42
+ className?: string;
43
+ /** Additional CSS classes applied to every segment. */
44
+ itemClassName?: string;
45
+ }
46
+ /**
47
+ * A navigation trail: where the user is, and every level they can step back to.
48
+ * aliases: Breadcrumb|NavigationPath|BreadcrumbTrail
49
+ * Design system 2.0
50
+ *
51
+ * The last item is the current page — drawn semibold and primary, and never a
52
+ * control, since a link to the page you are already on does nothing. Every
53
+ * earlier item with an `href` or an `onClick` is a link; one with neither is
54
+ * drawn as plain text, which is how a read-only location path is built.
55
+ *
56
+ * The trail never wraps. Segments truncate instead, each revealing its full
57
+ * label in a tooltip only once it is actually clipped, and a trail longer than
58
+ * `maxVisibleItems` collapses its middle behind an ellipsis menu — the root and
59
+ * the current page, the two segments that carry the most meaning, always stay
60
+ * on screen.
61
+ *
62
+ * a11y: an `<ol>` inside a named `<nav>`, with `aria-current="page"` on the last
63
+ * segment. Separators are decorative and hidden from assistive tech, so the
64
+ * trail is announced as a list of links rather than a string of chevrons.
65
+ *
66
+ * The trail is drawn at `dial-small-text` by default; `size` switches it to
67
+ * `dial-h2-text` for a trail that doubles as the page heading, where the
68
+ * token's own semibold weight applies to every segment.
69
+ *
70
+ * Labels are the caller's to translate; the two accessible names default to
71
+ * English and take an override.
72
+ *
73
+ * @example
74
+ * ```tsx
75
+ * <Breadcrumbs
76
+ * ariaLabel={t('File path')}
77
+ * items={[
78
+ * { label: t('My files'), onClick: () => open('/') },
79
+ * { label: 'DK Test', onClick: () => open('/DK Test') },
80
+ * { label: 'DK Test with nested' },
81
+ * ]}
82
+ * />
83
+ * ```
84
+ *
85
+ * @param items - The trail, outermost first; the last entry is the current page
86
+ * @param [maxVisibleItems=4] - Segments drawn before the middle collapses behind an ellipsis menu
87
+ * @param [size=BreadcrumbsSize.Small] - The trail's type scale: `dial-small-text` or `dial-h2-text`
88
+ * @param [separator] - Node drawn between two segments; defaults to a right chevron
89
+ * @param [ariaLabel='Breadcrumb'] - Accessible name for the `<nav>`
90
+ * @param [overflowAriaLabel='Show hidden path segments'] - Accessible name for the ellipsis button
91
+ * @param [className] - Additional CSS classes for the `<nav>`
92
+ * @param [itemClassName] - Additional CSS classes applied to every segment
93
+ */
94
+ export declare const Breadcrumbs: FC<BreadcrumbsProps>;
@@ -0,0 +1,60 @@
1
+ import { ReactNode } from 'react';
2
+ import { BreadcrumbsSize } from '../../../types/breadcrumbs';
3
+ /**
4
+ * The `<nav>`. It clips rather than wraps: a breadcrumb that reflows onto a
5
+ * second line moves the content below it, so the trail truncates its segments
6
+ * instead (see `segmentWidthClassName`).
7
+ */
8
+ export declare const navClassName = "w-full overflow-hidden";
9
+ /** The `<ol>` holding the segments and their separators. */
10
+ export declare const listClassName = "flex min-w-0 flex-nowrap items-center gap-2 whitespace-nowrap";
11
+ /** One `<li>`: the segment and the separator that follows it. */
12
+ export declare const itemClassName = "flex min-w-0 items-center gap-2";
13
+ /**
14
+ * The trail's type scale. It sits on the `<li>`, so the segment, the
15
+ * separator and the tooltip trigger inside it all read from one declaration.
16
+ */
17
+ export declare const sizeClassName: Record<BreadcrumbsSize, string>;
18
+ /**
19
+ * The current page is always semibold. `dial-h2-text` already is, so the
20
+ * heading trail repeats its own token rather than reaching for a semibold
21
+ * variant that does not exist.
22
+ */
23
+ export declare const currentSizeClassName: Record<BreadcrumbsSize, string>;
24
+ /**
25
+ * How each segment gives up width when the trail does not fit. The root keeps
26
+ * its full label — it is the anchor the user navigates back to — the middle
27
+ * segments truncate first, and the current page keeps the largest share of
28
+ * what is left, since it names where the user actually is.
29
+ */
30
+ export declare const segmentWidthClassName: Record<'first' | 'middle' | 'last', string>;
31
+ /** The box that draws a segment, around its icon and its label. */
32
+ export declare const segmentClassName = "flex min-w-0 flex-1 items-center gap-1 rounded-sm transition-colors";
33
+ /**
34
+ * A segment the user can follow. Secondary until hovered, then accent — the
35
+ * same pairing the kit's other inline links use.
36
+ */
37
+ export declare const linkSegmentClassName = "text-secondary hover:text-accent focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus";
38
+ /**
39
+ * The last segment: where the user is. Semibold and primary, and never a
40
+ * link — a control that navigates to the page it is on has nothing to do.
41
+ */
42
+ export declare const currentSegmentClassName = "cursor-default text-primary";
43
+ /** A segment with nowhere to go: rendered, but not a control. */
44
+ export declare const staticSegmentClassName = "cursor-default text-secondary";
45
+ /** The chevron between two segments. */
46
+ export declare const separatorClassName = "inline-flex flex-none items-center leading-none text-secondary";
47
+ /**
48
+ * The collapsed-middle trigger. `dial-kit-minimum-target` lifts the 16px
49
+ * glyph to the 24×24 of WCAG 2.5.8; the enhanced 44×44 target would overhang
50
+ * the segments on either side of it (see the README exception table).
51
+ */
52
+ export declare const overflowButtonClassName = "dial-kit-minimum-target flex shrink-0 items-center rounded-sm text-secondary transition-colors hover:text-accent focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus";
53
+ /**
54
+ * Smallest trail the collapse can produce: the root, the ellipsis and the
55
+ * current page. Below that there is nothing left to hide behind the ellipsis.
56
+ */
57
+ export declare const MIN_VISIBLE_ITEMS = 3;
58
+ /** Segments shown before the trail collapses. */
59
+ export declare const DEFAULT_MAX_VISIBLE_ITEMS = 4;
60
+ export declare const defaultSeparator: ReactNode;
@@ -58,7 +58,10 @@ export interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTML
58
58
  * `<button>`, so the control keeps the link role, middle-click, and
59
59
  * "open in new tab". Pair it with `ButtonAppearance.Link` (or `LinkButton`)
60
60
  * unless a button-shaped link is intended.
61
- * @param [tooltipProps] - Props of the 2.0 {@link Tooltip} wrapping the button
61
+ * @param [tooltipProps] - Props of the 2.0 {@link Tooltip} wrapping the button.
62
+ * A disabled button with a visible tooltip is marked `aria-disabled` rather
63
+ * than natively `disabled`, so it stays focusable and hoverable and the
64
+ * tooltip can still explain why it is unavailable; its click does nothing.
62
65
  * @param [target] - Anchor target, only meaningful alongside `href`
63
66
  * @param [rel] - Anchor `rel`. Defaults to `noopener noreferrer` when
64
67
  * `target="_blank"`.
@@ -43,6 +43,27 @@ export declare const NeutralButton: FC<ButtonVariantProps>;
43
43
  * Inherits all properties from the `ButtonProps`
44
44
  */
45
45
  export declare const DangerButton: FC<ButtonVariantProps>;
46
+ /** A Starter Button component — a conversation starter: an outlined neutral
47
+ * pill whose icons are stroked with the accent gradient
48
+ * Design system 2.0
49
+ *
50
+ * `iconBefore` defaults to a sparkles icon; pass `null` for a label-only pill.
51
+ *
52
+ * An SVG stroke cannot take a CSS gradient, so the button renders its own
53
+ * `linearGradient` with a per-instance id and hands it to its icons through
54
+ * the `--dial-kit-starter-icon-stroke` custom property. Any icon that strokes
55
+ * with `currentColor`, as Tabler icons do, picks it up.
56
+ * @example
57
+ * ```tsx
58
+ * <StarterButton
59
+ * label="Summarize this document"
60
+ * onClick={handleClick}
61
+ * />
62
+ * ```
63
+ *
64
+ * Inherits all properties from the `ButtonProps`
65
+ */
66
+ export declare const StarterButton: FC<ButtonVariantProps>;
46
67
  /** A Link Button component with predefined link appearance
47
68
  * @example
48
69
  * ```tsx
@@ -1,2 +1,17 @@
1
+ import { ButtonHTMLAttributes, MouseEventHandler, ReactNode } from 'react';
1
2
  import { ButtonAppearance, ButtonVariant } from '../../../types/button';
3
+ /** The tooltip fields that decide whether a disabled button must stay reachable. */
4
+ interface DisabledTooltipFields {
5
+ tooltip?: ReactNode;
6
+ hideTooltip?: boolean;
7
+ }
8
+ /** The props a button element takes for its disabled state and its click. */
9
+ type DisabledButtonProps = Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'disabled' | 'aria-disabled' | 'onClick'>;
10
+ /**
11
+ * Returns the disabled-state props for a button element: native `disabled`,
12
+ * or — for a disabled button that shows a tooltip — `aria-disabled` with the
13
+ * click swallowed, so the button stays hoverable and focusable.
14
+ */
15
+ export declare const getDisabledButtonProps: (disabled: boolean | undefined, tooltipProps: DisabledTooltipFields | undefined, onClick: MouseEventHandler<HTMLButtonElement> | undefined) => DisabledButtonProps;
2
16
  export declare const getButtonClassNames: (variant?: ButtonVariant, appearance?: ButtonAppearance) => string;
17
+ export {};
@@ -1,8 +1,11 @@
1
1
  import { FC } from 'react';
2
2
  import { DropdownItem } from '../../../models/dropdown';
3
3
  import { ButtonProps } from '../Button/Button';
4
+ import { DropdownProps } from '../Dropdown/Dropdown';
4
5
  export interface ButtonDropdownProps extends Omit<ButtonProps, 'iconAfter'> {
5
6
  items: DropdownItem[];
7
+ /** Menu options forwarded to the underlying `Dropdown`: the panel class and whether the panel matches the button's width. */
8
+ dropdownProps?: Pick<DropdownProps, 'listClassName' | 'matchReferenceWidth'>;
6
9
  }
7
10
  /**
8
11
  * A Button dropdown component based on the Dropdown component
@@ -20,5 +23,6 @@ export interface ButtonDropdownProps extends Omit<ButtonProps, 'iconAfter'> {
20
23
  *
21
24
  * Inherits all props from Button.
22
25
  * @param [items] - DropdownItems with actions
26
+ * @param [dropdownProps] - `listClassName` and `matchReferenceWidth` forwarded to the menu `Dropdown`
23
27
  */
24
28
  export declare const ButtonDropdown: FC<ButtonDropdownProps>;