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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/README.md +56 -2
  2. package/dist/CHANGELOG.md +86 -0
  3. package/dist/DateCellRenderer-BdUMSg-E.cjs +1 -0
  4. package/dist/{DateCellRenderer-4iMidqal.cjs → DateCellRenderer-CZNa4jVJ.cjs} +30 -30
  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 +2 -2
  13. package/dist/components/Dropdown/DropdownSubMenuItem.js +1 -1
  14. package/dist/components/Dropdown/constants.js +7 -7
  15. package/dist/components/DropdownIcon/DropdownIcon.js +4 -4
  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 +86 -72
  22. package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +214 -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 +27 -18
  34. package/dist/components/New/Calendar/Calendar.js +6 -6
  35. package/dist/components/New/Calendar/constants.js +5 -5
  36. package/dist/components/New/CaptionText/CaptionText.js +3 -3
  37. package/dist/components/New/CardShell/CardShell.js +2 -2
  38. package/dist/components/New/Checkbox/Checkbox.js +2 -2
  39. package/dist/components/New/Checkbox/CheckboxBox.js +2 -2
  40. package/dist/components/New/CloseButton/CloseButton.js +1 -1
  41. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +2 -2
  42. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +21 -25
  43. package/dist/components/New/ConfirmationPopup/constants.js +8 -11
  44. package/dist/components/New/Dropdown/Dropdown.js +99 -98
  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 +2 -2
  48. package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
  49. package/dist/components/New/FileDropzone/FileDropzone.js +2 -2
  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 +1 -1
  59. package/dist/components/New/Grid/constants.js +14 -5
  60. package/dist/components/New/Highlight/Highlight.js +2 -2
  61. package/dist/components/New/IconButton/IconButton.js +30 -28
  62. package/dist/components/New/InfoButton/InfoButton.js +2 -2
  63. package/dist/components/New/InlineSelect/InlineSelect.js +75 -59
  64. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +70 -66
  65. package/dist/components/New/InteractiveTooltip/constants.js +2 -2
  66. package/dist/components/New/Label/Label.js +2 -2
  67. package/dist/components/New/MarkdownEditor/MarkdownEditor.js +29 -27
  68. package/dist/components/New/MenuItem/MenuItem.js +2 -2
  69. package/dist/components/New/MenuItem/constants.js +1 -1
  70. package/dist/components/New/NoDataContent/NoDataContent.js +2 -2
  71. package/dist/components/New/Notification/Notification.js +37 -35
  72. package/dist/components/New/NumberInput/NumberInput.js +2 -2
  73. package/dist/components/New/PasswordInput/PasswordInput.js +2 -2
  74. package/dist/components/New/Popup/Popup.js +59 -57
  75. package/dist/components/New/Popup/constants.js +3 -3
  76. package/dist/components/New/Radio/Radio.js +2 -2
  77. package/dist/components/New/RadioGroup/RadioGroup.js +2 -2
  78. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +2 -2
  79. package/dist/components/New/ResizableContainer/ResizableContainer.js +2 -2
  80. package/dist/components/New/SchemaRenderer/SchemaRenderer.js +164 -0
  81. package/dist/components/New/SchemaRenderer/components/SchemaAnyOfEditor.js +65 -0
  82. package/dist/components/New/SchemaRenderer/components/SchemaArrayEditor.js +109 -0
  83. package/dist/components/New/SchemaRenderer/components/SchemaField.js +83 -0
  84. package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +72 -0
  85. package/dist/components/New/SchemaRenderer/components/SchemaJsonEditor.js +41 -0
  86. package/dist/components/New/SchemaRenderer/components/SchemaKeyValueEditor.js +250 -0
  87. package/dist/components/New/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
  88. package/dist/components/New/SchemaRenderer/components/SchemaOneOfEditor.js +163 -0
  89. package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +150 -0
  90. package/dist/components/New/SchemaRenderer/components/SchemaSection.js +135 -0
  91. package/dist/components/New/SchemaRenderer/context.js +17 -0
  92. package/dist/components/New/Search/Search.js +2 -2
  93. package/dist/components/New/SegmentedControl/SegmentedControl.js +4 -4
  94. package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
  95. package/dist/components/New/Select/MultiSelectTags.js +18 -15
  96. package/dist/components/New/Select/Select.js +184 -173
  97. package/dist/components/New/Select/constants.js +23 -20
  98. package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
  99. package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
  100. package/dist/components/New/Slider/Slider.js +184 -91
  101. package/dist/components/New/Slider/utils.js +20 -0
  102. package/dist/components/New/Switch/Switch.js +2 -2
  103. package/dist/components/New/Tabs/Tabs.js +124 -66
  104. package/dist/components/New/Tag/Tag.js +2 -2
  105. package/dist/components/New/TagInput/TagInput.js +5 -3
  106. package/dist/components/New/Textarea/Textarea.js +21 -20
  107. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +2 -2
  108. package/dist/components/New/Tooltip/TooltipContent.js +2 -2
  109. package/dist/components/New/Tooltip/constants.js +1 -1
  110. package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
  111. package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
  112. package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
  113. package/dist/components/New/TransferQueue/constants.js +24 -0
  114. package/dist/components/New/constants/overlay.js +17 -9
  115. package/dist/components/Popup/constants.js +8 -8
  116. package/dist/components/ProgressBar/ProgressBar.js +6 -6
  117. package/dist/components/SchemaRenderer/SchemaRenderer.js +16 -15
  118. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
  119. package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +2 -2
  120. package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +1 -1
  121. package/dist/components/SchemaRenderer/components/SchemaField.js +23 -23
  122. package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +19 -19
  123. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
  124. package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +1 -1
  125. package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +13 -13
  126. package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +5 -5
  127. package/dist/components/Skeleton/Skeleton.js +2 -2
  128. package/dist/components/Spinner/Spinner.js +2 -2
  129. package/dist/components/Tooltip/TooltipContent.js +11 -11
  130. package/dist/components-manifest.json +1873 -78
  131. package/dist/constants/public-class-names.js +69 -3
  132. package/dist/constants/schema-renderer.js +33 -0
  133. package/dist/dial-ui-kit.cjs +2 -2
  134. package/dist/dial-ui-kit.js +358 -310
  135. package/dist/editors.cjs +1 -1
  136. package/dist/file-manager.cjs +1 -1
  137. package/dist/grid.cjs +1 -1
  138. package/dist/index.css +2 -2
  139. package/dist/lazy-_W6FYhKg.cjs +1 -0
  140. package/dist/merge-classes-BEJXjzkx.cjs +1 -0
  141. package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
  142. package/dist/migration-guides/0.15.0/slider-redesign.md +110 -0
  143. package/dist/migration-guides/README.md +2 -0
  144. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
  145. package/dist/src/components/FileManager/FileManager.d.ts +2 -0
  146. package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
  147. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
  148. package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +2 -0
  149. package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +2 -0
  150. package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
  151. package/dist/src/components/New/AutocompleteTagInput/AutocompleteTagInput.d.ts +108 -0
  152. package/dist/src/components/New/AutocompleteTagInput/utils.d.ts +17 -0
  153. package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +1 -0
  154. package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
  155. package/dist/src/components/New/Badge/Badge.d.ts +47 -0
  156. package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
  157. package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
  158. package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
  159. package/dist/src/components/New/Button/Button.d.ts +4 -1
  160. package/dist/src/components/New/Button/ButtonWrappers.d.ts +21 -0
  161. package/dist/src/components/New/Button/utils.d.ts +15 -0
  162. package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
  163. package/dist/src/components/New/Calendar/constants.d.ts +1 -1
  164. package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -1
  165. package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
  166. package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
  167. package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +85 -0
  168. package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
  169. package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
  170. package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
  171. package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
  172. package/dist/src/components/New/FileName/FileName.d.ts +79 -0
  173. package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
  174. package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
  175. package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
  176. package/dist/src/components/New/Grid/constants.d.ts +6 -4
  177. package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
  178. package/dist/src/components/New/InteractiveTooltip/InteractiveTooltip.d.ts +13 -2
  179. package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
  180. package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +3 -0
  181. package/dist/src/components/New/Notification/Notification.d.ts +18 -0
  182. package/dist/src/components/New/Popup/Popup.d.ts +8 -1
  183. package/dist/src/components/New/Popup/constants.d.ts +1 -1
  184. package/dist/src/components/New/SchemaRenderer/SchemaRenderer.d.ts +38 -0
  185. package/dist/src/components/New/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +37 -0
  186. package/dist/src/components/New/SchemaRenderer/components/SchemaArrayEditor.d.ts +35 -0
  187. package/dist/src/components/New/SchemaRenderer/components/SchemaField.d.ts +33 -0
  188. package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +30 -0
  189. package/dist/src/components/New/SchemaRenderer/components/SchemaJsonEditor.d.ts +29 -0
  190. package/dist/src/components/New/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +37 -0
  191. package/dist/src/components/New/SchemaRenderer/components/SchemaObjectEditor.d.ts +32 -0
  192. package/dist/src/components/New/SchemaRenderer/components/SchemaOneOfEditor.d.ts +39 -0
  193. package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +38 -0
  194. package/dist/src/components/New/SchemaRenderer/components/SchemaSection.d.ts +39 -0
  195. package/dist/src/components/New/SchemaRenderer/context.d.ts +8 -0
  196. package/dist/src/components/New/SchemaRenderer/types.d.ts +76 -0
  197. package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
  198. package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
  199. package/dist/src/components/New/Select/Select.d.ts +9 -0
  200. package/dist/src/components/New/Select/constants.d.ts +3 -2
  201. package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
  202. package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +100 -0
  203. package/dist/src/components/New/Slider/Slider.d.ts +29 -1
  204. package/dist/src/components/New/Slider/utils.d.ts +14 -0
  205. package/dist/src/components/New/Slider/utils.spec.d.ts +1 -0
  206. package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
  207. package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
  208. package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
  209. package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
  210. package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
  211. package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
  212. package/dist/src/components/New/constants/overlay.d.ts +13 -0
  213. package/dist/src/components/Popup/constants.d.ts +1 -1
  214. package/dist/src/components/SchemaRenderer/types.d.ts +5 -82
  215. package/dist/src/components/SchemaRenderer/utils.d.ts +1 -13
  216. package/dist/src/constants/public-class-names.d.ts +69 -3
  217. package/dist/src/constants/schema-renderer.d.ts +2 -0
  218. package/dist/src/index.d.ts +39 -3
  219. package/dist/src/models/json-schema.d.ts +71 -0
  220. package/dist/src/types/accordion.d.ts +7 -0
  221. package/dist/src/types/avatar.d.ts +7 -0
  222. package/dist/src/types/badge.d.ts +16 -0
  223. package/dist/src/types/breadcrumbs.d.ts +9 -0
  224. package/dist/src/types/button.d.ts +1 -0
  225. package/dist/src/types/entity-type.d.ts +9 -0
  226. package/dist/src/types/json-schema.d.ts +22 -0
  227. package/dist/src/types/tooltip.d.ts +4 -0
  228. package/dist/src/types/transfer-queue.d.ts +10 -0
  229. package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
  230. package/dist/src/utils/avatar.d.ts +12 -0
  231. package/dist/src/utils/json-schema.d.ts +23 -0
  232. package/dist/src/utils/sub-menu-floating.d.ts +7 -4
  233. package/dist/types/accordion.js +4 -0
  234. package/dist/types/avatar.js +4 -0
  235. package/dist/types/badge.js +5 -0
  236. package/dist/types/breadcrumbs.js +4 -0
  237. package/dist/types/button.js +3 -3
  238. package/dist/types/entity-type.js +4 -0
  239. package/dist/types/json-schema.js +7 -0
  240. package/dist/types/tooltip.js +3 -2
  241. package/dist/types/transfer-queue.js +4 -0
  242. package/dist/use-file-manager-tabs-Bzzwwcgk.cjs +3 -0
  243. package/dist/utils/avatar.js +22 -0
  244. package/dist/{components/SchemaRenderer/utils.js → utils/json-schema.js} +122 -95
  245. package/dist/utils/merge-classes.js +12 -5
  246. package/dist/utils/sub-menu-floating.js +99 -54
  247. package/package.json +4 -9
  248. package/dist/DateCellRenderer-CTTAnQjB.cjs +0 -1
  249. package/dist/IconButton-DWqoaBWf.cjs +0 -1
  250. package/dist/JsonEditor-D2jSlRFi.cjs +0 -1
  251. package/dist/MarkdownEditor-BzEbdj7R.cjs +0 -1
  252. package/dist/MarkdownEditorContainer-BvwJjkiZ.cjs +0 -1
  253. package/dist/components/SchemaRenderer/types.js +0 -27
  254. package/dist/editor-_174x-qy.cjs +0 -1
  255. package/dist/lazy-DM-7dL0Y.cjs +0 -1
  256. package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
  257. package/dist/use-file-manager-tabs-DKmWaOlC.cjs +0 -3
@@ -1,4 +1,4 @@
1
- import { FC, MouseEvent, ReactNode } from 'react';
1
+ import { CSSProperties, FC, MouseEvent, ReactNode } from 'react';
2
2
  import { ButtonProps } from '../Button/Button';
3
3
  import { PopupSize } from '../../../types/popup';
4
4
  export interface PopupProps {
@@ -8,6 +8,12 @@ export interface PopupProps {
8
8
  portalId?: string;
9
9
  className?: string;
10
10
  overlayClassName?: string;
11
+ /**
12
+ * Inline styles applied to the overlay. Floating UI sets `position`, `inset`
13
+ * and `overflow: auto` inline, which no class can override; keys passed here
14
+ * are merged after them and win.
15
+ */
16
+ overlayStyle?: CSSProperties;
11
17
  titleClassName?: string;
12
18
  headerClassName?: string;
13
19
  /** Additional CSS classes applied to the scrollable body wrapper around `children`. */
@@ -87,6 +93,7 @@ export interface PopupProps {
87
93
  * @param [portalId] - Optional portal container id
88
94
  * @param [className] - Additional CSS classes applied to the popup container
89
95
  * @param [overlayClassName] - Additional CSS classes applied to the overlay
96
+ * @param [overlayStyle] - Inline styles merged over Floating UI's own overlay styles (`position`, `inset`, `overflow: auto`)
90
97
  * @param [titleClassName] - Additional CSS classes applied to the title element
91
98
  * @param [headerClassName] - Additional CSS classes applied to the popup header container
92
99
  * @param [bodyClassName] - Additional CSS classes applied to the scrollable body wrapper around `children`
@@ -1,5 +1,5 @@
1
1
  import { PopupSize } from '../../../types/popup';
2
- export declare const popupOverlayBaseClassName = "z-[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";
@@ -0,0 +1,38 @@
1
+ import { FC } from 'react';
2
+ import { SchemaRendererProps } from './types';
3
+ /**
4
+ * Renders a JSON Schema as a form, with collapsible sections, required-field
5
+ * validation and default values.
6
+ * aliases: SchemaRenderer|JsonSchemaForm|SchemaForm
7
+ * Design system 2.0
8
+ *
9
+ * Built only from 2.0 controls: `Input`, `NumberInput`, `PasswordInput`,
10
+ * `Select`, `Switch` and `RadioGroup`. A value the schema does not describe —
11
+ * a key absent from `properties`, or an object with no fixed properties — is
12
+ * edited as raw JSON in a monospace `Textarea`.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <SchemaRenderer
17
+ * schema={mySchema}
18
+ * onChange={(v) => console.log(v)}
19
+ * onDefaultValues={(defaults) => console.log(defaults)}
20
+ * />
21
+ * ```
22
+ *
23
+ * @param schema - The root JSON Schema to render
24
+ * @param [defaultValue] - Initial form value; if omitted, defaults are extracted from schema
25
+ * @param [texts] - Override any user-visible strings rendered by the component
26
+ * @param [className] - Additional CSS classes for the root container
27
+ * @param [readonly=false] - When true all inputs are disabled; sections remain collapsible
28
+ * @param [defaultExpanded=true] - Initial expanded state for all collapsible sections
29
+ * @param [inputClassName] - Additional classes for the container of every text, number and select field
30
+ * @param [variant=SchemaRendererVariant.Sections] - `Sections` wraps every top-level property in a collapsible card; `Flat` renders primitives as labelled fields; `FlatSections` puts every property under a plain heading
31
+ * @param [skipUntouched=false] - When true, required-field errors appear only after the user has interacted with a field
32
+ * @param [acceptableResourceTypes] - Live options for properties flagged with `dial:resource: true`, keyed by resource type
33
+ * @param [renderField] - Override the rendered control for any field by path; return `defaultElement` to fall back to built-in rendering
34
+ * @param [onChange] - Called with the full form value on every change
35
+ * @param [onPropertyChange] - Called with `(path, value)` for each individual top-level property change
36
+ * @param [onDefaultValues] - Called once on mount with the resolved default values
37
+ */
38
+ export declare const SchemaRenderer: FC<SchemaRendererProps>;
@@ -0,0 +1,37 @@
1
+ import { FC } from 'react';
2
+ import { JsonSchemaDef } from '../../../../models/json-schema';
3
+ export interface SchemaAnyOfEditorProps {
4
+ schema: JsonSchemaDef;
5
+ value: unknown;
6
+ onChange: (value: unknown) => void;
7
+ path: string[];
8
+ level: number;
9
+ ariaLabel?: string;
10
+ }
11
+ /**
12
+ * Renders an `anyOf` schema field as a type select with the selected variant's editor.
13
+ * aliases: AnyOfSchemaEditor|SchemaUnionEditor
14
+ * Design system 2.0
15
+ *
16
+ * A `null` variant has no editor, so selecting it clears the value.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <SchemaAnyOfEditor
21
+ * schema={{ anyOf: [{ type: 'null' }, { type: 'string' }] }}
22
+ * value={null}
23
+ * onChange={(v) => console.log(v)}
24
+ * path={['field']}
25
+ * level={1}
26
+ * ariaLabel="Field"
27
+ * />
28
+ * ```
29
+ *
30
+ * @param schema - The JSON Schema definition containing an `anyOf` array
31
+ * @param value - Current field value
32
+ * @param onChange - Called with the new value when the type or sub-value changes
33
+ * @param path - Field path segments used for validation error tracking
34
+ * @param level - Nesting depth passed to child field components
35
+ * @param [ariaLabel] - Accessible name of the type select and the variant's control
36
+ */
37
+ export declare const SchemaAnyOfEditor: FC<SchemaAnyOfEditorProps>;
@@ -0,0 +1,35 @@
1
+ import { FC } from 'react';
2
+ import { JsonSchemaDef } from '../../../../models/json-schema';
3
+ export interface SchemaArrayEditorProps {
4
+ schema: JsonSchemaDef;
5
+ value: unknown;
6
+ onChange: (value: unknown) => void;
7
+ path: string[];
8
+ level: number;
9
+ }
10
+ /**
11
+ * Renders a JSON Schema array as a list of collapsible items with add and remove controls.
12
+ * aliases: ArraySchemaEditor|SchemaListEditor
13
+ * Design system 2.0
14
+ *
15
+ * An item schema with a `discriminator` adds a type select next to the add
16
+ * button; the new item gets that variant's defaults.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <SchemaArrayEditor
21
+ * schema={{ type: 'array', items: { type: 'string' } }}
22
+ * value={['foo', 'bar']}
23
+ * onChange={(v) => console.log(v)}
24
+ * path={['tags']}
25
+ * level={1}
26
+ * />
27
+ * ```
28
+ *
29
+ * @param schema - The JSON Schema array definition (must include an `items` sub-schema)
30
+ * @param value - Current array value
31
+ * @param onChange - Called with the updated array when items are added, removed, or changed
32
+ * @param path - Field path segments used for validation error tracking
33
+ * @param level - Nesting depth passed to child section components
34
+ */
35
+ export declare const SchemaArrayEditor: FC<SchemaArrayEditorProps>;
@@ -0,0 +1,33 @@
1
+ import { FC } from 'react';
2
+ import { SchemaFieldProps } from '../types';
3
+ /**
4
+ * Renders a single schema property: a labelled field for a primitive, or a
5
+ * collapsible section for an object or an array.
6
+ * aliases: SchemaPropertyField|SchemaFormField
7
+ * Design system 2.0
8
+ *
9
+ * The label and the required error sit outside {@link SchemaFieldContent}, so
10
+ * a `renderField` override replaces the control and keeps both.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <SchemaField
15
+ * schema={{ type: 'string' }}
16
+ * value="hello"
17
+ * onChange={(v) => console.log(v)}
18
+ * path={['name']}
19
+ * level={1}
20
+ * required
21
+ * label="Name"
22
+ * />
23
+ * ```
24
+ *
25
+ * @param schema - The JSON Schema definition for this field
26
+ * @param value - Current field value
27
+ * @param onChange - Called with the updated value when the field changes
28
+ * @param path - Field path segments used for validation error tracking
29
+ * @param [level=0] - Nesting depth; object/array fields render as collapsible sections
30
+ * @param [required] - Whether the field is required (shows error when empty)
31
+ * @param [label] - Display label; falls back to schema title or path segment
32
+ */
33
+ export declare const SchemaField: FC<SchemaFieldProps>;
@@ -0,0 +1,30 @@
1
+ import { FC } from 'react';
2
+ import { SchemaFieldContentProps } from '../types';
3
+ /**
4
+ * Routes a resolved schema to the editor that renders it.
5
+ * aliases: SchemaEditorRouter|SchemaContentDispatcher
6
+ * Design system 2.0
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <SchemaFieldContent
11
+ * schema={{ type: 'string' }}
12
+ * value="hello"
13
+ * onChange={(v) => console.log(v)}
14
+ * path={['name']}
15
+ * level={1}
16
+ * ariaLabel="Name"
17
+ * />
18
+ * ```
19
+ *
20
+ * @param schema - The JSON Schema definition to render
21
+ * @param value - Current field value
22
+ * @param onChange - Called with the updated value when the field changes
23
+ * @param path - Field path segments used for validation error tracking
24
+ * @param level - Nesting depth passed to child editor components
25
+ * @param [required] - Whether the field is required (passed to primitive fields for error styling)
26
+ * @param [suppressInlineError=false] - Leaves the required error to the caller, which renders it under its own label
27
+ * @param [fieldId] - Id given to a primitive control, for a visible label to point at
28
+ * @param [ariaLabel] - Accessible name of the control
29
+ */
30
+ export declare const SchemaFieldContent: FC<SchemaFieldContentProps>;
@@ -0,0 +1,29 @@
1
+ import { FC } from 'react';
2
+ export interface SchemaJsonEditorProps {
3
+ value: unknown;
4
+ onChange: (value: unknown) => void;
5
+ id?: string;
6
+ ariaLabel?: string;
7
+ }
8
+ /**
9
+ * Edits a value the schema does not describe as raw JSON text: a key absent
10
+ * from the schema's `properties`, an object with no fixed properties, or a
11
+ * key-value entry switched to the object or array type.
12
+ * aliases: SchemaRawJsonEditor|SchemaUnknownPropertyEditor
13
+ * Design system 2.0
14
+ *
15
+ * A plain monospace {@link Textarea} rather than a code editor, so the form
16
+ * pulls in no editor bundle. The draft text is kept locally and `onChange`
17
+ * fires only once it parses.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <SchemaJsonEditor value={{ retries: 3 }} onChange={setValue} />
22
+ * ```
23
+ *
24
+ * @param value - The current value (any JSON type)
25
+ * @param onChange - Called with the parsed value whenever the edited text is valid JSON
26
+ * @param [id] - Id of the textarea, for a visible label to point at
27
+ * @param [ariaLabel] - Accessible name of the textarea
28
+ */
29
+ export declare const SchemaJsonEditor: FC<SchemaJsonEditorProps>;
@@ -0,0 +1,37 @@
1
+ import { FC } from 'react';
2
+ import { JsonSchemaDef } from '../../../../models/json-schema';
3
+ export interface SchemaKeyValueEditorProps {
4
+ schema: JsonSchemaDef;
5
+ value: unknown;
6
+ onChange: (value: unknown) => void;
7
+ path: string[];
8
+ level: number;
9
+ }
10
+ /**
11
+ * Renders an `additionalProperties` object schema as an editable key-value list.
12
+ * aliases: KeyValueSchemaEditor|AdditionalPropertiesEditor
13
+ * Design system 2.0
14
+ *
15
+ * Primitive values render inline; object, `oneOf` and array values render as a
16
+ * collapsible section recursing back into `SchemaFieldContent`. With
17
+ * `additionalProperties: true` each entry also gets a type select, and an
18
+ * object or array entry is edited as raw JSON.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <SchemaKeyValueEditor
23
+ * schema={{ type: 'object', additionalProperties: { type: 'string' } }}
24
+ * value={{ foo: 'bar' }}
25
+ * onChange={(v) => console.log(v)}
26
+ * path={['metadata']}
27
+ * level={1}
28
+ * />
29
+ * ```
30
+ *
31
+ * @param schema - The JSON Schema object definition with `additionalProperties`
32
+ * @param value - Current object value (treated as a key-value map)
33
+ * @param onChange - Called with the updated object when pairs are added, removed, or changed
34
+ * @param path - Field path segments used for validation error tracking
35
+ * @param level - Nesting depth passed to child section components
36
+ */
37
+ export declare const SchemaKeyValueEditor: FC<SchemaKeyValueEditorProps>;
@@ -0,0 +1,32 @@
1
+ import { FC } from 'react';
2
+ import { JsonSchemaDef } from '../../../../models/json-schema';
3
+ export interface SchemaObjectEditorProps {
4
+ schema: JsonSchemaDef;
5
+ value: unknown;
6
+ onChange: (value: unknown) => void;
7
+ path: string[];
8
+ level: number;
9
+ }
10
+ /**
11
+ * Renders the properties of a JSON Schema object as labelled form fields.
12
+ * aliases: ObjectSchemaEditor|SchemaPropertiesEditor
13
+ * Design system 2.0
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <SchemaObjectEditor
18
+ * schema={{ type: 'object', properties: { name: { type: 'string' } } }}
19
+ * value={{ name: 'Alice' }}
20
+ * onChange={(v) => console.log(v)}
21
+ * path={['config']}
22
+ * level={1}
23
+ * />
24
+ * ```
25
+ *
26
+ * @param schema - The JSON Schema object definition
27
+ * @param value - Current object value
28
+ * @param onChange - Called with the updated object when any property changes
29
+ * @param path - Field path segments used for validation error tracking
30
+ * @param level - Nesting depth passed to child SchemaField instances
31
+ */
32
+ export declare const SchemaObjectEditor: FC<SchemaObjectEditorProps>;
@@ -0,0 +1,39 @@
1
+ import { FC } from 'react';
2
+ import { JsonSchemaDef } from '../../../../models/json-schema';
3
+ export interface SchemaOneOfEditorProps {
4
+ schema: JsonSchemaDef;
5
+ value: unknown;
6
+ onChange: (value: unknown) => void;
7
+ path: string[];
8
+ level: number;
9
+ ariaLabel?: string;
10
+ }
11
+ /**
12
+ * Renders a `oneOf` schema field as a type selector with the selected variant's editor.
13
+ * aliases: OneOfSchemaEditor|SchemaDiscriminatorEditor
14
+ * Design system 2.0
15
+ *
16
+ * The selector is a select by default, or a radio group with
17
+ * `discriminatorDisplay: 'radio'`. A column radio group reveals the variant's
18
+ * editor under its own option; a row one shows it below the whole row.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <SchemaOneOfEditor
23
+ * schema={{ oneOf: [...], discriminator: { propertyName: 'type', mapping: {...} } }}
24
+ * value={{ type: 'foo' }}
25
+ * onChange={(v) => console.log(v)}
26
+ * path={['config']}
27
+ * level={1}
28
+ * ariaLabel="Provider"
29
+ * />
30
+ * ```
31
+ *
32
+ * @param schema - The JSON Schema definition containing a `oneOf` array and optional `discriminator`
33
+ * @param value - Current field value
34
+ * @param onChange - Called with the new value when the selected type or sub-value changes
35
+ * @param path - Field path segments used for validation error tracking
36
+ * @param level - Nesting depth passed to child editor components
37
+ * @param [ariaLabel] - Accessible name of the type selector; defaults to the select-type placeholder
38
+ */
39
+ export declare const SchemaOneOfEditor: FC<SchemaOneOfEditorProps>;
@@ -0,0 +1,38 @@
1
+ import { FC } from 'react';
2
+ import { JsonSchemaDef } from '../../../../models/json-schema';
3
+ export interface SchemaPrimitiveFieldProps {
4
+ schema: JsonSchemaDef;
5
+ value: unknown;
6
+ onChange: (value: unknown) => void;
7
+ invalid?: boolean;
8
+ id?: string;
9
+ ariaLabel?: string;
10
+ }
11
+ /**
12
+ * Renders a single primitive schema field: string, integer, number, boolean, enum, or const.
13
+ * - `dial:resource` with `acceptableResourceTypes` → select over the live resource options
14
+ * - `isProtected: true` → masked password input
15
+ * - `enum` + `enumDisplay: 'radio'` → radio group (`enumOrientation: 'row'` lays it out horizontally)
16
+ * - `enum` without `enumDisplay` → select
17
+ * - `const` → disabled read-only input
18
+ * aliases: SchemaInputField|PrimitiveSchemaField
19
+ * Design system 2.0
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <SchemaPrimitiveField
24
+ * schema={{ type: 'string', enum: ['a', 'b'], enumDisplay: 'radio', enumOrientation: 'row' }}
25
+ * value="a"
26
+ * onChange={(v) => console.log(v)}
27
+ * ariaLabel="Mode"
28
+ * />
29
+ * ```
30
+ *
31
+ * @param schema - The resolved JSON Schema definition; supports `isProtected`, `enumDisplay`, `enumOrientation`
32
+ * @param value - Current field value
33
+ * @param onChange - Called with the new value when the field changes
34
+ * @param [invalid] - Whether the field has a validation error (applies error styling)
35
+ * @param [id] - Id of the control, for a visible label to point at
36
+ * @param [ariaLabel] - Accessible name of the control
37
+ */
38
+ export declare const SchemaPrimitiveField: FC<SchemaPrimitiveFieldProps>;
@@ -0,0 +1,39 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface SchemaSectionProps {
3
+ title: string;
4
+ description?: string;
5
+ summary?: string;
6
+ errorCount?: number;
7
+ level?: number;
8
+ children?: ReactNode;
9
+ onRemove?: () => void;
10
+ defaultExpanded?: boolean;
11
+ removeItemAriaLabel?: string;
12
+ }
13
+ /**
14
+ * A collapsible card wrapping a group of schema properties.
15
+ * aliases: CollapsibleSchemaSection|SchemaCard
16
+ * Design system 2.0
17
+ *
18
+ * Only the chevron and the title sit inside the toggle button. The info button
19
+ * and the remove button are its siblings, since a button nested in a button is
20
+ * invalid and its clicks would toggle the section too.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <SchemaSection title="Settings" level={0} summary="3/4 fields" errorCount={1}>
25
+ * <p>Content</p>
26
+ * </SchemaSection>
27
+ * ```
28
+ *
29
+ * @param title - Section header title
30
+ * @param [description] - Explanatory text, exposed through an info button in the header
31
+ * @param [summary] - Short summary text shown in the header (e.g. "3/4 fields", "2 items")
32
+ * @param [errorCount=0] - Number of validation errors; shows an error count when > 0
33
+ * @param [level=0] - Nesting depth; 0 is the top-level card, 1+ the nested one
34
+ * @param [children] - Section body, mounted only while expanded
35
+ * @param [onRemove] - If provided, shows a remove button in the header
36
+ * @param [defaultExpanded=true] - Whether the section starts expanded
37
+ * @param [removeItemAriaLabel='Remove item'] - Accessible name of the remove button
38
+ */
39
+ export declare const SchemaSection: FC<SchemaSectionProps>;
@@ -0,0 +1,8 @@
1
+ import { SchemaRendererContextValue } from './types';
2
+ export declare const SchemaRendererContext: import('react').Context<SchemaRendererContextValue | null>;
3
+ export declare const useSchemaContext: () => SchemaRendererContextValue;
4
+ /**
5
+ * Whether a path, or any path under it, has been touched. Every field counts as
6
+ * touched while `skipUntouched` is off, so errors show from the first render.
7
+ */
8
+ export declare const isPathTouched: (path: string, touchedPaths?: ReadonlySet<string>, skipUntouched?: boolean, includeDescendants?: boolean) => boolean;
@@ -0,0 +1,76 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { JsonSchema, JsonSchemaDef, SchemaRendererTexts } from '../../../models/json-schema';
3
+ import { SchemaRendererVariant } from '../../../types/json-schema';
4
+ export type SchemaRenderField = (path: string[], schema: JsonSchemaDef, defaultElement: ReactElement) => ReactNode;
5
+ export interface SchemaRendererProps {
6
+ schema: JsonSchema;
7
+ defaultValue?: Record<string, unknown>;
8
+ texts?: Partial<SchemaRendererTexts>;
9
+ className?: string;
10
+ readonly?: boolean;
11
+ defaultExpanded?: boolean;
12
+ /** Additional classes for the container of every text, number and select field. */
13
+ inputClassName?: string;
14
+ /**
15
+ * `Sections` (default) — every top-level property is a collapsible section card.
16
+ * `Flat` — primitive top-level properties render as labelled fields; object and
17
+ * array properties still use collapsible sections.
18
+ * `FlatSections` — every top-level property renders under a plain heading.
19
+ */
20
+ variant?: SchemaRendererVariant;
21
+ /**
22
+ * When `true`, required-field errors are only shown after the user has interacted
23
+ * with a field. When `false` (default), all unfilled required fields are highlighted immediately.
24
+ */
25
+ skipUntouched?: boolean;
26
+ /**
27
+ * Live resource options for schema properties flagged with `dial:resource: true`.
28
+ * Keyed by the resource type name referenced in a property's `acceptableResourceTypes`
29
+ * array; each value provides the selectable entries for that resource type (a string
30
+ * array for string-typed properties).
31
+ */
32
+ acceptableResourceTypes?: Record<string, unknown>;
33
+ onChange?: (value: Record<string, unknown>) => void;
34
+ onPropertyChange?: (path: string, value: unknown) => void;
35
+ onDefaultValues?: (value: Record<string, unknown>) => void;
36
+ /**
37
+ * Override the rendered element for any field by path. The field's label and
38
+ * error stay outside the element, so an override replaces the control only.
39
+ * Return `defaultElement` to fall back to the built-in renderer.
40
+ * @param path - Array of schema property keys leading to this field (e.g. ['connection', 'token'])
41
+ * @param schema - The resolved JSON Schema definition for this field
42
+ * @param defaultElement - The element that would be rendered without customization
43
+ */
44
+ renderField?: SchemaRenderField;
45
+ }
46
+ export interface SchemaFieldContentProps {
47
+ schema: JsonSchemaDef;
48
+ value: unknown;
49
+ onChange: (value: unknown) => void;
50
+ path: string[];
51
+ level: number;
52
+ required?: boolean;
53
+ suppressInlineError?: boolean;
54
+ /** The id given to a primitive control, so a visible label can point at it. */
55
+ fieldId?: string;
56
+ /**
57
+ * Accessible name for the control. Sections, array items and key-value rows
58
+ * have no visible label next to their control, so this is what names it.
59
+ */
60
+ ariaLabel?: string;
61
+ }
62
+ export interface SchemaFieldProps extends Omit<SchemaFieldContentProps, 'fieldId' | 'ariaLabel' | 'suppressInlineError'> {
63
+ label?: string;
64
+ }
65
+ export interface SchemaRendererContextValue {
66
+ rootSchema: JsonSchema;
67
+ texts: SchemaRendererTexts;
68
+ readonly?: boolean;
69
+ defaultExpanded?: boolean;
70
+ inputClassName?: string;
71
+ acceptableResourceTypes?: Record<string, unknown>;
72
+ renderField?: SchemaRenderField;
73
+ touchedPaths?: ReadonlySet<string>;
74
+ markTouched?: (path: string) => void;
75
+ skipUntouched?: boolean;
76
+ }
@@ -0,0 +1,22 @@
1
+ import { FC, MouseEvent } from 'react';
2
+ import { SelectOption } from '../../../models/select';
3
+ export interface CollapsedSelectTagsProps {
4
+ options: SelectOption[];
5
+ selectedValues: string[];
6
+ handleRemoveTag: (event: MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, val: string) => void;
7
+ }
8
+ /**
9
+ * The selected tags of a multi-select on a single row. The tags that do not fit
10
+ * the width of the field collapse into a `+N` counter whose hover panel lists
11
+ * them, each still removable.
12
+ * Design system 2.0
13
+ *
14
+ * The count follows the width the field has, not the number of tags: every tag
15
+ * is measured in a hidden copy of the row, so the tags that stay visible are
16
+ * the ones that fit beside the counter, and the count follows a resize.
17
+ *
18
+ * @param options - All available options, used to resolve labels and icons
19
+ * @param selectedValues - Values currently selected
20
+ * @param handleRemoveTag - Called with the value whose tag was removed
21
+ */
22
+ export declare const CollapsedSelectTags: FC<CollapsedSelectTagsProps>;
@@ -1,9 +1,13 @@
1
1
  import { FC, MouseEvent } from 'react';
2
2
  import { SelectOption } from '../../../models/select';
3
+ /** Geometry shared by every tag of a multi-select field, and its `+N` counter. */
4
+ export declare const selectTagClassName = "h-[24px] max-w-full rounded-md border border-secondary bg-layer-sunken px-2";
3
5
  export interface MultiSelectTagsProps {
4
6
  options: SelectOption[];
5
7
  selectedValues: string[];
6
8
  handleRemoveTag?: (event: MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, val: string) => void;
9
+ /** Additional classes for every tag. */
10
+ tagClassName?: string;
7
11
  }
8
12
  /**
9
13
  * The selected values of a multi-select, rendered as removable tags inside the
@@ -13,5 +17,6 @@ export interface MultiSelectTagsProps {
13
17
  * @param options - All available options, used to resolve labels and icons
14
18
  * @param selectedValues - Values currently selected
15
19
  * @param [handleRemoveTag] - Called with the value whose tag was removed; when omitted the tags are not removable
20
+ * @param [tagClassName] - Additional classes for every tag
16
21
  */
17
22
  export declare const MultiSelectTags: FC<MultiSelectTagsProps>;
@@ -22,6 +22,14 @@ export interface SelectProps {
22
22
  searchPlaceholder?: string;
23
23
  selectAll?: boolean;
24
24
  selectAllLabel?: string;
25
+ /**
26
+ * Keeps a multi-select's tags on one row, folding the ones that do not fit
27
+ * into a `+N` counter whose hover panel lists them (as `TagInput` does with
28
+ * the same prop). Without it the tags wrap and the field grows.
29
+ * Ignored with `customMultiSelectTagsRenderer`, and on a mobile screen, where
30
+ * the hover panel is unavailable and the tags wrap instead.
31
+ */
32
+ collapseTagOverflow?: boolean;
25
33
  /**
26
34
  * How the chosen option is marked in single mode. The design tints the row
27
35
  * (`Tint`, the default); `Check` puts a trailing check on it instead, the
@@ -98,6 +106,7 @@ export interface SelectProps {
98
106
  * @param [searchPlaceholder] - Placeholder for the overlay search input.
99
107
  * @param [selectAll=false] - Show a "Select All" checkbox in multiple mode.
100
108
  * @param [selectAllLabel="Select all"] - Label for the "Select All" checkbox.
109
+ * @param [collapseTagOverflow=false] - Keep a multi-select's tags on one row, folding those that do not fit into a `+N` counter by the width available; the hover panel lists them and removes them.
101
110
  * @param [selectedOptionMark=MenuItemMark.Tint] - How the chosen option is marked in single mode.
102
111
  * @param [emptyStateTitle="No options available"] - Title text when there are no options.
103
112
  * @param [emptyStateDescription] - Description text when there are no options.
@@ -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>;