@15gifts/back-office-kit 0.0.0-stage → 0.1.0-alpha.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 (437) hide show
  1. package/LICENSE +39 -0
  2. package/README.md +46 -2
  3. package/bin/back-office-kit.js +35 -0
  4. package/dist/browser/back-office-kit.js +21469 -0
  5. package/dist/components/Alert/Alert.css.d.ts +32 -0
  6. package/dist/components/Alert/Alert.d.ts +14 -0
  7. package/dist/components/Alert/Alert.js +59 -0
  8. package/dist/components/Alert/Alert.js.map +1 -0
  9. package/dist/components/Alert/Alert.styles.js +17 -0
  10. package/dist/components/Alert/Alert.styles.js.map +1 -0
  11. package/dist/components/Alert/index.d.ts +2 -0
  12. package/dist/components/AppShell/AppShell.css.d.ts +7 -0
  13. package/dist/components/AppShell/AppShell.d.ts +20 -0
  14. package/dist/components/AppShell/AppShell.js +32 -0
  15. package/dist/components/AppShell/AppShell.js.map +1 -0
  16. package/dist/components/AppShell/AppShell.styles.js +6 -0
  17. package/dist/components/AppShell/AppShell.styles.js.map +1 -0
  18. package/dist/components/AppShell/index.d.ts +2 -0
  19. package/dist/components/Avatar/Avatar.css.d.ts +22 -0
  20. package/dist/components/Avatar/Avatar.d.ts +13 -0
  21. package/dist/components/Avatar/Avatar.js +30 -0
  22. package/dist/components/Avatar/Avatar.js.map +1 -0
  23. package/dist/components/Avatar/Avatar.styles.js +16 -0
  24. package/dist/components/Avatar/Avatar.styles.js.map +1 -0
  25. package/dist/components/Avatar/index.d.ts +2 -0
  26. package/dist/components/Badge/Badge.css.d.ts +11 -0
  27. package/dist/components/Badge/Badge.d.ts +11 -0
  28. package/dist/components/Badge/Badge.js +17 -0
  29. package/dist/components/Badge/Badge.js.map +1 -0
  30. package/dist/components/Badge/Badge.styles.js +86 -0
  31. package/dist/components/Badge/Badge.styles.js.map +1 -0
  32. package/dist/components/Badge/index.d.ts +2 -0
  33. package/dist/components/Breadcrumbs/Breadcrumbs.css.d.ts +5 -0
  34. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +22 -0
  35. package/dist/components/Breadcrumbs/Breadcrumbs.js +51 -0
  36. package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -0
  37. package/dist/components/Breadcrumbs/Breadcrumbs.styles.js +7 -0
  38. package/dist/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -0
  39. package/dist/components/Breadcrumbs/index.d.ts +2 -0
  40. package/dist/components/Button/Button.css.d.ts +74 -0
  41. package/dist/components/Button/Button.d.ts +29 -0
  42. package/dist/components/Button/Button.js +54 -0
  43. package/dist/components/Button/Button.js.map +1 -0
  44. package/dist/components/Button/Button.styles.js +29 -0
  45. package/dist/components/Button/Button.styles.js.map +1 -0
  46. package/dist/components/Button/index.d.ts +2 -0
  47. package/dist/components/Card/Card.css.d.ts +35 -0
  48. package/dist/components/Card/Card.d.ts +12 -0
  49. package/dist/components/Card/Card.js +27 -0
  50. package/dist/components/Card/Card.js.map +1 -0
  51. package/dist/components/Card/Card.styles.js +18 -0
  52. package/dist/components/Card/Card.styles.js.map +1 -0
  53. package/dist/components/Card/index.d.ts +2 -0
  54. package/dist/components/ChatTranscript/ChatTranscript.css.d.ts +15 -0
  55. package/dist/components/ChatTranscript/ChatTranscript.d.ts +94 -0
  56. package/dist/components/ChatTranscript/ChatTranscript.js +159 -0
  57. package/dist/components/ChatTranscript/ChatTranscript.js.map +1 -0
  58. package/dist/components/ChatTranscript/ChatTranscript.styles.js +6 -0
  59. package/dist/components/ChatTranscript/ChatTranscript.styles.js.map +1 -0
  60. package/dist/components/ChatTranscript/index.d.ts +2 -0
  61. package/dist/components/Checkbox/Checkbox.css.d.ts +3 -0
  62. package/dist/components/Checkbox/Checkbox.d.ts +10 -0
  63. package/dist/components/Checkbox/Checkbox.js +50 -0
  64. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  65. package/dist/components/Checkbox/Checkbox.styles.js +8 -0
  66. package/dist/components/Checkbox/Checkbox.styles.js.map +1 -0
  67. package/dist/components/Checkbox/index.d.ts +2 -0
  68. package/dist/components/Chip/Chip.css.d.ts +2 -0
  69. package/dist/components/Chip/Chip.d.ts +6 -0
  70. package/dist/components/Chip/Chip.js +21 -0
  71. package/dist/components/Chip/Chip.js.map +1 -0
  72. package/dist/components/Chip/Chip.styles.js +7 -0
  73. package/dist/components/Chip/Chip.styles.js.map +1 -0
  74. package/dist/components/Chip/index.d.ts +2 -0
  75. package/dist/components/ColorPicker/ColorPicker.css.d.ts +5 -0
  76. package/dist/components/ColorPicker/ColorPicker.d.ts +17 -0
  77. package/dist/components/ColorPicker/ColorPicker.js +80 -0
  78. package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
  79. package/dist/components/ColorPicker/ColorPicker.styles.js +6 -0
  80. package/dist/components/ColorPicker/ColorPicker.styles.js.map +1 -0
  81. package/dist/components/ColorPicker/color.d.ts +14 -0
  82. package/dist/components/ColorPicker/color.js +39 -0
  83. package/dist/components/ColorPicker/color.js.map +1 -0
  84. package/dist/components/ColorPicker/index.d.ts +2 -0
  85. package/dist/components/Combobox/Combobox.d.ts +58 -0
  86. package/dist/components/Combobox/Combobox.js +156 -0
  87. package/dist/components/Combobox/Combobox.js.map +1 -0
  88. package/dist/components/Combobox/index.d.ts +2 -0
  89. package/dist/components/DateRangePicker/DateRangePicker.css.d.ts +31 -0
  90. package/dist/components/DateRangePicker/DateRangePicker.d.ts +51 -0
  91. package/dist/components/DateRangePicker/DateRangePicker.js +261 -0
  92. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -0
  93. package/dist/components/DateRangePicker/DateRangePicker.styles.js +8 -0
  94. package/dist/components/DateRangePicker/DateRangePicker.styles.js.map +1 -0
  95. package/dist/components/DateRangePicker/index.d.ts +4 -0
  96. package/dist/components/DateRangePicker/presets.d.ts +27 -0
  97. package/dist/components/DateRangePicker/presets.js +62 -0
  98. package/dist/components/DateRangePicker/presets.js.map +1 -0
  99. package/dist/components/DateTimeInput/DateTimeInput.css.d.ts +1 -0
  100. package/dist/components/DateTimeInput/DateTimeInput.d.ts +9 -0
  101. package/dist/components/DateTimeInput/DateTimeInput.js +37 -0
  102. package/dist/components/DateTimeInput/DateTimeInput.js.map +1 -0
  103. package/dist/components/DateTimeInput/DateTimeInput.styles.js +7 -0
  104. package/dist/components/DateTimeInput/DateTimeInput.styles.js.map +1 -0
  105. package/dist/components/DateTimeInput/index.d.ts +2 -0
  106. package/dist/components/DescriptionList/DescriptionList.css.d.ts +62 -0
  107. package/dist/components/DescriptionList/DescriptionList.d.ts +15 -0
  108. package/dist/components/DescriptionList/DescriptionList.js +26 -0
  109. package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
  110. package/dist/components/DescriptionList/DescriptionList.styles.js +42 -0
  111. package/dist/components/DescriptionList/DescriptionList.styles.js.map +1 -0
  112. package/dist/components/DescriptionList/index.d.ts +2 -0
  113. package/dist/components/DetailsSummary/DetailsSummary.css.d.ts +4 -0
  114. package/dist/components/DetailsSummary/DetailsSummary.d.ts +7 -0
  115. package/dist/components/DetailsSummary/DetailsSummary.js +26 -0
  116. package/dist/components/DetailsSummary/DetailsSummary.js.map +1 -0
  117. package/dist/components/DetailsSummary/DetailsSummary.styles.js +7 -0
  118. package/dist/components/DetailsSummary/DetailsSummary.styles.js.map +1 -0
  119. package/dist/components/DetailsSummary/index.d.ts +2 -0
  120. package/dist/components/Drawer/Drawer.css.d.ts +11 -0
  121. package/dist/components/Drawer/Drawer.d.ts +21 -0
  122. package/dist/components/Drawer/Drawer.js +66 -0
  123. package/dist/components/Drawer/Drawer.js.map +1 -0
  124. package/dist/components/Drawer/Drawer.styles.js +12 -0
  125. package/dist/components/Drawer/Drawer.styles.js.map +1 -0
  126. package/dist/components/Drawer/index.d.ts +2 -0
  127. package/dist/components/EmptyLine/EmptyLine.css.d.ts +11 -0
  128. package/dist/components/EmptyLine/EmptyLine.d.ts +7 -0
  129. package/dist/components/EmptyLine/EmptyLine.js +19 -0
  130. package/dist/components/EmptyLine/EmptyLine.js.map +1 -0
  131. package/dist/components/EmptyLine/EmptyLine.styles.js +12 -0
  132. package/dist/components/EmptyLine/EmptyLine.styles.js.map +1 -0
  133. package/dist/components/EmptyLine/index.d.ts +2 -0
  134. package/dist/components/EnvironmentChip/EnvironmentChip.css.d.ts +19 -0
  135. package/dist/components/EnvironmentChip/EnvironmentChip.d.ts +9 -0
  136. package/dist/components/EnvironmentChip/EnvironmentChip.js +21 -0
  137. package/dist/components/EnvironmentChip/EnvironmentChip.js.map +1 -0
  138. package/dist/components/EnvironmentChip/EnvironmentChip.styles.js +16 -0
  139. package/dist/components/EnvironmentChip/EnvironmentChip.styles.js.map +1 -0
  140. package/dist/components/EnvironmentChip/index.d.ts +2 -0
  141. package/dist/components/Field/Field.css.d.ts +14 -0
  142. package/dist/components/Field/Field.d.ts +74 -0
  143. package/dist/components/Field/Field.js +69 -0
  144. package/dist/components/Field/Field.js.map +1 -0
  145. package/dist/components/Field/Field.styles.js +6 -0
  146. package/dist/components/Field/Field.styles.js.map +1 -0
  147. package/dist/components/Field/index.d.ts +2 -0
  148. package/dist/components/Fieldset/Fieldset.css.d.ts +6 -0
  149. package/dist/components/Fieldset/Fieldset.d.ts +10 -0
  150. package/dist/components/Fieldset/Fieldset.js +32 -0
  151. package/dist/components/Fieldset/Fieldset.js.map +1 -0
  152. package/dist/components/Fieldset/Fieldset.styles.js +6 -0
  153. package/dist/components/Fieldset/Fieldset.styles.js.map +1 -0
  154. package/dist/components/Fieldset/index.d.ts +2 -0
  155. package/dist/components/Heading/Heading.css.d.ts +21 -0
  156. package/dist/components/Heading/Heading.d.ts +11 -0
  157. package/dist/components/Heading/Heading.js +22 -0
  158. package/dist/components/Heading/Heading.js.map +1 -0
  159. package/dist/components/Heading/Heading.styles.js +18 -0
  160. package/dist/components/Heading/Heading.styles.js.map +1 -0
  161. package/dist/components/Heading/index.d.ts +2 -0
  162. package/dist/components/Icon/Icon.css.d.ts +1 -0
  163. package/dist/components/Icon/Icon.d.ts +24 -0
  164. package/dist/components/Icon/Icon.js +24 -0
  165. package/dist/components/Icon/Icon.js.map +1 -0
  166. package/dist/components/Icon/Icon.styles.js +6 -0
  167. package/dist/components/Icon/Icon.styles.js.map +1 -0
  168. package/dist/components/Icon/index.d.ts +2 -0
  169. package/dist/components/List/List.css.d.ts +4 -0
  170. package/dist/components/List/List.d.ts +12 -0
  171. package/dist/components/List/List.js +28 -0
  172. package/dist/components/List/List.js.map +1 -0
  173. package/dist/components/List/List.styles.js +6 -0
  174. package/dist/components/List/List.styles.js.map +1 -0
  175. package/dist/components/List/index.d.ts +2 -0
  176. package/dist/components/Loader/Loader.css.d.ts +1 -0
  177. package/dist/components/Loader/Loader.d.ts +12 -0
  178. package/dist/components/Loader/Loader.js +23 -0
  179. package/dist/components/Loader/Loader.js.map +1 -0
  180. package/dist/components/Loader/Loader.styles.js +7 -0
  181. package/dist/components/Loader/Loader.styles.js.map +1 -0
  182. package/dist/components/Loader/index.d.ts +2 -0
  183. package/dist/components/Menu/Menu.css.d.ts +9 -0
  184. package/dist/components/Menu/Menu.d.ts +90 -0
  185. package/dist/components/Menu/Menu.js +140 -0
  186. package/dist/components/Menu/Menu.js.map +1 -0
  187. package/dist/components/Menu/Menu.styles.js +6 -0
  188. package/dist/components/Menu/Menu.styles.js.map +1 -0
  189. package/dist/components/Menu/index.d.ts +2 -0
  190. package/dist/components/MetricBar/MetricBar.css.d.ts +5 -0
  191. package/dist/components/MetricBar/MetricBar.d.ts +20 -0
  192. package/dist/components/MetricBar/MetricBar.js +35 -0
  193. package/dist/components/MetricBar/MetricBar.js.map +1 -0
  194. package/dist/components/MetricBar/MetricBar.styles.js +15 -0
  195. package/dist/components/MetricBar/MetricBar.styles.js.map +1 -0
  196. package/dist/components/MetricBar/index.d.ts +2 -0
  197. package/dist/components/Modal/Modal.css.d.ts +24 -0
  198. package/dist/components/Modal/Modal.d.ts +16 -0
  199. package/dist/components/Modal/Modal.js +67 -0
  200. package/dist/components/Modal/Modal.js.map +1 -0
  201. package/dist/components/Modal/Modal.styles.js +16 -0
  202. package/dist/components/Modal/Modal.styles.js.map +1 -0
  203. package/dist/components/Modal/index.d.ts +2 -0
  204. package/dist/components/NavRail/HumaraLogo.d.ts +5 -0
  205. package/dist/components/NavRail/HumaraLogo.js +33 -0
  206. package/dist/components/NavRail/HumaraLogo.js.map +1 -0
  207. package/dist/components/NavRail/NavRail.css.d.ts +9 -0
  208. package/dist/components/NavRail/NavRail.d.ts +53 -0
  209. package/dist/components/NavRail/NavRail.js +108 -0
  210. package/dist/components/NavRail/NavRail.js.map +1 -0
  211. package/dist/components/NavRail/NavRail.styles.js +7 -0
  212. package/dist/components/NavRail/NavRail.styles.js.map +1 -0
  213. package/dist/components/NavRail/index.d.ts +2 -0
  214. package/dist/components/NumberInput/NumberInput.d.ts +13 -0
  215. package/dist/components/NumberInput/NumberInput.js +53 -0
  216. package/dist/components/NumberInput/NumberInput.js.map +1 -0
  217. package/dist/components/NumberInput/index.d.ts +2 -0
  218. package/dist/components/PageHeader/PageHeader.css.d.ts +8 -0
  219. package/dist/components/PageHeader/PageHeader.d.ts +13 -0
  220. package/dist/components/PageHeader/PageHeader.js +42 -0
  221. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  222. package/dist/components/PageHeader/PageHeader.styles.js +6 -0
  223. package/dist/components/PageHeader/PageHeader.styles.js.map +1 -0
  224. package/dist/components/PageHeader/index.d.ts +2 -0
  225. package/dist/components/Pagination/Pagination.css.d.ts +3 -0
  226. package/dist/components/Pagination/Pagination.d.ts +14 -0
  227. package/dist/components/Pagination/Pagination.js +61 -0
  228. package/dist/components/Pagination/Pagination.js.map +1 -0
  229. package/dist/components/Pagination/Pagination.styles.js +6 -0
  230. package/dist/components/Pagination/Pagination.styles.js.map +1 -0
  231. package/dist/components/Pagination/index.d.ts +2 -0
  232. package/dist/components/Popover/Popover.css.d.ts +4 -0
  233. package/dist/components/Popover/Popover.d.ts +18 -0
  234. package/dist/components/Popover/Popover.js +43 -0
  235. package/dist/components/Popover/Popover.js.map +1 -0
  236. package/dist/components/Popover/Popover.styles.js +7 -0
  237. package/dist/components/Popover/Popover.styles.js.map +1 -0
  238. package/dist/components/Popover/index.d.ts +2 -0
  239. package/dist/components/PortalContainer/PortalContainer.d.ts +17 -0
  240. package/dist/components/PortalContainer/PortalContainer.js +17 -0
  241. package/dist/components/PortalContainer/PortalContainer.js.map +1 -0
  242. package/dist/components/PortalContainer/index.d.ts +2 -0
  243. package/dist/components/ProgressBar/ProgressBar.css.d.ts +5 -0
  244. package/dist/components/ProgressBar/ProgressBar.d.ts +18 -0
  245. package/dist/components/ProgressBar/ProgressBar.js +50 -0
  246. package/dist/components/ProgressBar/ProgressBar.js.map +1 -0
  247. package/dist/components/ProgressBar/ProgressBar.styles.js +11 -0
  248. package/dist/components/ProgressBar/ProgressBar.styles.js.map +1 -0
  249. package/dist/components/ProgressBar/index.d.ts +2 -0
  250. package/dist/components/RadioCards/RadioCards.css.d.ts +6 -0
  251. package/dist/components/RadioCards/RadioCards.d.ts +20 -0
  252. package/dist/components/RadioCards/RadioCards.js +69 -0
  253. package/dist/components/RadioCards/RadioCards.js.map +1 -0
  254. package/dist/components/RadioCards/RadioCards.styles.js +6 -0
  255. package/dist/components/RadioCards/RadioCards.styles.js.map +1 -0
  256. package/dist/components/RadioCards/index.d.ts +2 -0
  257. package/dist/components/SaveBar/SaveBar.css.d.ts +5 -0
  258. package/dist/components/SaveBar/SaveBar.d.ts +14 -0
  259. package/dist/components/SaveBar/SaveBar.js +45 -0
  260. package/dist/components/SaveBar/SaveBar.js.map +1 -0
  261. package/dist/components/SaveBar/SaveBar.styles.js +6 -0
  262. package/dist/components/SaveBar/SaveBar.styles.js.map +1 -0
  263. package/dist/components/SaveBar/index.d.ts +2 -0
  264. package/dist/components/Select/Select.css.d.ts +3 -0
  265. package/dist/components/Select/Select.d.ts +29 -0
  266. package/dist/components/Select/Select.js +89 -0
  267. package/dist/components/Select/Select.js.map +1 -0
  268. package/dist/components/Select/Select.styles.js +7 -0
  269. package/dist/components/Select/Select.styles.js.map +1 -0
  270. package/dist/components/Select/index.d.ts +2 -0
  271. package/dist/components/Skeleton/Skeleton.css.d.ts +16 -0
  272. package/dist/components/Skeleton/Skeleton.d.ts +14 -0
  273. package/dist/components/Skeleton/Skeleton.js +37 -0
  274. package/dist/components/Skeleton/Skeleton.js.map +1 -0
  275. package/dist/components/Skeleton/Skeleton.styles.js +17 -0
  276. package/dist/components/Skeleton/Skeleton.styles.js.map +1 -0
  277. package/dist/components/Skeleton/index.d.ts +2 -0
  278. package/dist/components/Stack/Stack.css.d.ts +51 -0
  279. package/dist/components/Stack/Stack.d.ts +12 -0
  280. package/dist/components/Stack/Stack.js +21 -0
  281. package/dist/components/Stack/Stack.js.map +1 -0
  282. package/dist/components/Stack/Stack.styles.js +46 -0
  283. package/dist/components/Stack/Stack.styles.js.map +1 -0
  284. package/dist/components/Stack/index.d.ts +2 -0
  285. package/dist/components/StatCard/StatCard.css.d.ts +4 -0
  286. package/dist/components/StatCard/StatCard.d.ts +8 -0
  287. package/dist/components/StatCard/StatCard.js +27 -0
  288. package/dist/components/StatCard/StatCard.js.map +1 -0
  289. package/dist/components/StatCard/StatCard.styles.js +6 -0
  290. package/dist/components/StatCard/StatCard.styles.js.map +1 -0
  291. package/dist/components/StatCard/index.d.ts +2 -0
  292. package/dist/components/StatsGrid/StatsGrid.css.d.ts +1 -0
  293. package/dist/components/StatsGrid/StatsGrid.d.ts +7 -0
  294. package/dist/components/StatsGrid/StatsGrid.js +17 -0
  295. package/dist/components/StatsGrid/StatsGrid.js.map +1 -0
  296. package/dist/components/StatsGrid/StatsGrid.styles.js +6 -0
  297. package/dist/components/StatsGrid/StatsGrid.styles.js.map +1 -0
  298. package/dist/components/StatsGrid/index.d.ts +2 -0
  299. package/dist/components/StatusBadge/StatusBadge.css.d.ts +53 -0
  300. package/dist/components/StatusBadge/StatusBadge.d.ts +9 -0
  301. package/dist/components/StatusBadge/StatusBadge.js +17 -0
  302. package/dist/components/StatusBadge/StatusBadge.js.map +1 -0
  303. package/dist/components/StatusBadge/StatusBadge.styles.js +19 -0
  304. package/dist/components/StatusBadge/StatusBadge.styles.js.map +1 -0
  305. package/dist/components/StatusBadge/index.d.ts +2 -0
  306. package/dist/components/Switch/Switch.css.d.ts +3 -0
  307. package/dist/components/Switch/Switch.d.ts +10 -0
  308. package/dist/components/Switch/Switch.js +41 -0
  309. package/dist/components/Switch/Switch.js.map +1 -0
  310. package/dist/components/Switch/Switch.styles.js +8 -0
  311. package/dist/components/Switch/Switch.styles.js.map +1 -0
  312. package/dist/components/Switch/index.d.ts +2 -0
  313. package/dist/components/Switcher/Switcher.css.d.ts +33 -0
  314. package/dist/components/Switcher/Switcher.d.ts +68 -0
  315. package/dist/components/Switcher/Switcher.js +158 -0
  316. package/dist/components/Switcher/Switcher.js.map +1 -0
  317. package/dist/components/Switcher/Switcher.styles.js +16 -0
  318. package/dist/components/Switcher/Switcher.styles.js.map +1 -0
  319. package/dist/components/Switcher/index.d.ts +2 -0
  320. package/dist/components/Table/Table.css.d.ts +16 -0
  321. package/dist/components/Table/Table.d.ts +66 -0
  322. package/dist/components/Table/Table.js +136 -0
  323. package/dist/components/Table/Table.js.map +1 -0
  324. package/dist/components/Table/Table.styles.js +11 -0
  325. package/dist/components/Table/Table.styles.js.map +1 -0
  326. package/dist/components/Table/index.d.ts +2 -0
  327. package/dist/components/TableAction/TableAction.d.ts +10 -0
  328. package/dist/components/TableAction/TableAction.js +19 -0
  329. package/dist/components/TableAction/TableAction.js.map +1 -0
  330. package/dist/components/TableAction/index.d.ts +2 -0
  331. package/dist/components/Tabs/Tabs.css.d.ts +6 -0
  332. package/dist/components/Tabs/Tabs.d.ts +54 -0
  333. package/dist/components/Tabs/Tabs.js +67 -0
  334. package/dist/components/Tabs/Tabs.js.map +1 -0
  335. package/dist/components/Tabs/Tabs.styles.js +7 -0
  336. package/dist/components/Tabs/Tabs.styles.js.map +1 -0
  337. package/dist/components/Tabs/index.d.ts +2 -0
  338. package/dist/components/Tag/Tag.css.d.ts +9 -0
  339. package/dist/components/Tag/Tag.d.ts +7 -0
  340. package/dist/components/Tag/Tag.js +13 -0
  341. package/dist/components/Tag/Tag.js.map +1 -0
  342. package/dist/components/Tag/Tag.styles.js +12 -0
  343. package/dist/components/Tag/Tag.styles.js.map +1 -0
  344. package/dist/components/Tag/index.d.ts +2 -0
  345. package/dist/components/TextInput/TextInput.css.d.ts +1 -0
  346. package/dist/components/TextInput/TextInput.d.ts +16 -0
  347. package/dist/components/TextInput/TextInput.js +62 -0
  348. package/dist/components/TextInput/TextInput.js.map +1 -0
  349. package/dist/components/TextInput/TextInput.styles.js +6 -0
  350. package/dist/components/TextInput/TextInput.styles.js.map +1 -0
  351. package/dist/components/TextInput/index.d.ts +2 -0
  352. package/dist/components/TextInput/useCharCount.d.ts +15 -0
  353. package/dist/components/TextInput/useCharCount.js +14 -0
  354. package/dist/components/TextInput/useCharCount.js.map +1 -0
  355. package/dist/components/Textarea/Textarea.css.d.ts +2 -0
  356. package/dist/components/Textarea/Textarea.d.ts +16 -0
  357. package/dist/components/Textarea/Textarea.js +59 -0
  358. package/dist/components/Textarea/Textarea.js.map +1 -0
  359. package/dist/components/Textarea/Textarea.styles.js +7 -0
  360. package/dist/components/Textarea/Textarea.styles.js.map +1 -0
  361. package/dist/components/Textarea/index.d.ts +2 -0
  362. package/dist/components/ThemePicker/ThemePicker.css.d.ts +10 -0
  363. package/dist/components/ThemePicker/ThemePicker.d.ts +18 -0
  364. package/dist/components/ThemePicker/ThemePicker.js +74 -0
  365. package/dist/components/ThemePicker/ThemePicker.js.map +1 -0
  366. package/dist/components/ThemePicker/ThemePicker.styles.js +7 -0
  367. package/dist/components/ThemePicker/ThemePicker.styles.js.map +1 -0
  368. package/dist/components/ThemePicker/index.d.ts +2 -0
  369. package/dist/components/ToggleGroup/ToggleGroup.css.d.ts +4 -0
  370. package/dist/components/ToggleGroup/ToggleGroup.d.ts +23 -0
  371. package/dist/components/ToggleGroup/ToggleGroup.js +68 -0
  372. package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -0
  373. package/dist/components/ToggleGroup/ToggleGroup.styles.js +13 -0
  374. package/dist/components/ToggleGroup/ToggleGroup.styles.js.map +1 -0
  375. package/dist/components/ToggleGroup/index.d.ts +2 -0
  376. package/dist/components/Tooltip/Tooltip.css.d.ts +2 -0
  377. package/dist/components/Tooltip/Tooltip.d.ts +18 -0
  378. package/dist/components/Tooltip/Tooltip.js +33 -0
  379. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  380. package/dist/components/Tooltip/Tooltip.styles.js +6 -0
  381. package/dist/components/Tooltip/Tooltip.styles.js.map +1 -0
  382. package/dist/components/Tooltip/index.d.ts +2 -0
  383. package/dist/components/TopBar/TopBar.css.d.ts +3 -0
  384. package/dist/components/TopBar/TopBar.d.ts +9 -0
  385. package/dist/components/TopBar/TopBar.js +20 -0
  386. package/dist/components/TopBar/TopBar.js.map +1 -0
  387. package/dist/components/TopBar/TopBar.styles.js +6 -0
  388. package/dist/components/TopBar/TopBar.styles.js.map +1 -0
  389. package/dist/components/TopBar/index.d.ts +2 -0
  390. package/dist/components/UserMenu/UserMenu.css.d.ts +5 -0
  391. package/dist/components/UserMenu/UserMenu.d.ts +26 -0
  392. package/dist/components/UserMenu/UserMenu.js +55 -0
  393. package/dist/components/UserMenu/UserMenu.js.map +1 -0
  394. package/dist/components/UserMenu/UserMenu.styles.js +7 -0
  395. package/dist/components/UserMenu/UserMenu.styles.js.map +1 -0
  396. package/dist/components/UserMenu/index.d.ts +2 -0
  397. package/dist/foundations/Foundations.css.d.ts +12 -0
  398. package/dist/index.d.ts +60 -0
  399. package/dist/index.js +61 -0
  400. package/dist/styles/input.css.d.ts +18 -0
  401. package/dist/styles/input.styles.js +6 -0
  402. package/dist/styles/input.styles.js.map +1 -0
  403. package/dist/styles/shared.css.d.ts +8 -0
  404. package/dist/styles/shared.styles.js +6 -0
  405. package/dist/styles/shared.styles.js.map +1 -0
  406. package/dist/styles.css +4 -0
  407. package/dist/theme/fontSize.d.ts +15 -0
  408. package/dist/theme/fontSize.js +31 -0
  409. package/dist/theme/fontSize.js.map +1 -0
  410. package/dist/theme/theme.d.ts +29 -0
  411. package/dist/theme/theme.js +52 -0
  412. package/dist/theme/theme.js.map +1 -0
  413. package/dist/tokens/contract.css.d.ts +120 -0
  414. package/dist/tokens/contract.styles.js +68 -0
  415. package/dist/tokens/contract.styles.js.map +1 -0
  416. package/dist/tokens/global.css.d.ts +0 -0
  417. package/dist/tokens/global.styles.js +2 -0
  418. package/dist/tokens/index.d.ts +9 -0
  419. package/dist/tokens/palette.d.ts +16 -0
  420. package/dist/tokens/palette.js +18 -0
  421. package/dist/tokens/palette.js.map +1 -0
  422. package/dist/tokens/scale.d.ts +51 -0
  423. package/dist/tokens/scale.js +47 -0
  424. package/dist/tokens/scale.js.map +1 -0
  425. package/dist/tokens/sprinkles.css.d.ts +38 -0
  426. package/dist/tokens/sprinkles.styles.js +349 -0
  427. package/dist/tokens/sprinkles.styles.js.map +1 -0
  428. package/dist/tokens/themes.css.d.ts +387 -0
  429. package/dist/tokens.js +5 -0
  430. package/package.json +107 -4
  431. package/skills/back-office-kit/SKILL.md +36 -0
  432. package/skills/back-office-kit/references/artifact-template.html +102 -0
  433. package/skills/back-office-kit/references/components.md +1239 -0
  434. package/skills/back-office-kit/references/install.md +187 -0
  435. package/skills/back-office-kit/references/migrate.md +86 -0
  436. package/skills/back-office-kit/references/patterns.md +198 -0
  437. package/skills/back-office-kit/references/testing.md +158 -0
@@ -0,0 +1,1239 @@
1
+ <!-- Generated by `npm run catalogue`. Do not edit by hand. -->
2
+ # Component catalogue
3
+
4
+ Every component is a named export of `@15gifts/back-office-kit`: `import { Button } from '@15gifts/back-office-kit'`.
5
+ Props marked * are required. All components also accept `className` and the native props of their root element.
6
+
7
+ Components: Alert, AppShell, Autocomplete, Avatar, Badge, Breadcrumbs, Button, Card, ChatTranscript, Checkbox, Chip, ColorPicker, Combobox, DateRangePicker, DateTimeInput, DescriptionList, DetailsSummary, Drawer, EmptyLine, EnvironmentChip, Field, Fieldset, Heading, Icon, List, Loader, Menu, MetricBar, Modal, NavRail, NumberInput, PageHeader, Pagination, Popover, PortalContainer, ProgressBar, RadioCards, SaveBar, Select, Skeleton, Stack, StatCard, StatsGrid, StatusBadge, Switch, Switcher, Table, TableAction, Tabs, Tag, Textarea, TextInput, ThemePicker, ToggleGroup, Tooltip, TopBar, usePortalContainer, UserMenu.
8
+
9
+ ### Alert
10
+
11
+ Page or section message. `info`/`success` are polite status updates; `warning`/`danger` are announced immediately. Not for field errors (use the input's `error`).
12
+
13
+ | Prop | Type | Default | Description |
14
+ | --- | --- | --- | --- |
15
+ | `action` | `ReactNode` | | Optional control under the body, e.g. a Button. |
16
+ | `dismissLabel` | `string` | `Dismiss` | |
17
+ | `onDismiss` | `(() => void)` | | Shows a dismiss button when set. |
18
+ | `title` * | `ReactNode` | | |
19
+ | `tone` | `AlertTone` | `info` | `warning` and `danger` interrupt screen readers (`role="alert"`); the others are polite (`role="status"`). |
20
+
21
+ ### AppShell
22
+
23
+ Page frame for internal apps: icon rail on the left, top bar, optional side panel, and the main content.
24
+
25
+ | Prop | Type | Default | Description |
26
+ | --- | --- | --- | --- |
27
+ | `bodyProps` | `(ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & DataAttributes)` | | Props for the row that holds the side panel and `<main>`, below the top bar. |
28
+ | `contained` | `boolean` | `true` | Constrain the content to a readable max width. |
29
+ | `mainProps` | `(ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & DataAttributes)` | | Props for the `<main>` element, e.g. a test ID or `style={{ position: 'relative' }}`. |
30
+ | `rail` | `ReactNode` | | Left navigation, usually a `NavRail`. |
31
+ | `sidePanel` | `ReactNode` | | Optional secondary panel between the rail and the content (e.g. section nav or filters). |
32
+ | `sidePanelLabel` | `string` | `Sidebar` | Accessible name for `sidePanel`. |
33
+ | `topBar` | `ReactNode` | | Sticky bar above the content, usually a `TopBar`. |
34
+
35
+ ### Autocomplete
36
+
37
+ Free-text input with suggestions. The value is whatever is typed or picked.
38
+
39
+ | Prop | Type | Default | Description |
40
+ | --- | --- | --- | --- |
41
+ | `className` | `string` | | |
42
+ | `clearable` | `boolean` | `false` | Shows a Clear button while there's text. |
43
+ | `clearLabel` | `string` | `Clear` | Accessible name of the Clear button. |
44
+ | `defaultOpen` | `boolean` | `false` | Whether the popup is initially open. To render a controlled popup, use the `open` prop instead. |
45
+ | `defaultValue` | `string` | | |
46
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
47
+ | `disabled` | `boolean` | | |
48
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
49
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
50
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
51
+ | `inputProps` | `PartProps<ComboboxInputProps>` | | Props for the text input (role `combobox`), e.g. `{ 'data-testid': 'branch-filter' }`. |
52
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
53
+ | `name` | `string` | | Identifies the field when a form is submitted. |
54
+ | `onClear` | `(() => void)` | | Called when the text is cleared with the Clear button, or Escape while the suggestions are closed. Not when it's deleted by typing. |
55
+ | `onItemSelect` | `((value: string) => void)` | | Called when a suggestion is picked by click or Enter (not while typing or arrowing through the list). `onValueChange` still fires for every change. |
56
+ | `onOpenChange` | `((open: boolean, eventDetails: AutocompleteRootOpenChangeEventDetails) => void)` | | Event handler called when the popup is opened or closed. |
57
+ | `onValueChange` | `((value: string, eventDetails: AutocompleteRootChangeEventDetails) => void)` | | Event handler called when the input value of the autocomplete changes. |
58
+ | `open` | `boolean` | | Whether the popup is currently open. Use when controlled. |
59
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
60
+ | `placeholder` | `string` | | |
61
+ | `popupProps` | `PartProps<ComboboxPopupProps>` | | Props for the suggestions popup. |
62
+ | `portalContainer` | `PortalContainerTarget` | | Where the suggestions render. Defaults to the nearest `PortalContainer`, else `document.body`. |
63
+ | `ref` | `Ref<HTMLInputElement>` | | |
64
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
65
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
66
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
67
+ | `suggestions` * | `string[]` | | Suggestions shown while typing. Any text is allowed. |
68
+ | `value` | `string` | | |
69
+
70
+ ### Avatar
71
+
72
+ Person's image with an initials fallback. Named from `name` for assistive tech.
73
+
74
+ | Prop | Type | Default | Description |
75
+ | --- | --- | --- | --- |
76
+ | `className` | `string` | | |
77
+ | `initials` | `string` | | Initials shown when there is no image. Derived from `name` when omitted. |
78
+ | `name` | `string` | | Person's name or email. Used as the accessible name and to derive initials. |
79
+ | `render` | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, AvatarRootState>` | | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
80
+ | `size` | `"sm" \| "md" \| "lg"` | `md` | |
81
+ | `src` | `string` | | Image URL. Falls back to initials while loading or if it fails. |
82
+ | `style` | `CSSProperties \| ((state: AvatarRootState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
83
+
84
+ ### Badge
85
+
86
+ A small pill label. Use `tone`, not `color`.
87
+
88
+ | Prop | Type | Default | Description |
89
+ | --- | --- | --- | --- |
90
+ | `icon` | `ReactNode` | | Decorative icon shown before the label (mark it `aria-hidden`). |
91
+ | `tone` | `BadgeTone` | `neutral` | |
92
+ | `variant` | `"subtle" \| "solid"` | `subtle` | `subtle` (default) is a tinted pill; `solid` is a filled pill for stronger emphasis. |
93
+
94
+ ### Breadcrumbs
95
+
96
+ Where the current page sits in the app.
97
+
98
+ | Prop | Type | Default | Description |
99
+ | --- | --- | --- | --- |
100
+ | `items` * | `BreadcrumbItem[]` | | Trail from root to the current page. The last item is the current page unless it sets `current: false`. |
101
+
102
+ ### Button
103
+
104
+ Action button. Use `primary` for the one main action per view, `secondary` for others, `ghost` in toolbars and tables, `danger` for destructive actions.
105
+
106
+ | Prop | Type | Default | Description |
107
+ | --- | --- | --- | --- |
108
+ | `fullWidth` | `boolean` | `false` | |
109
+ | `icon` | `ReactNode` | | Icon element (e.g. a lucide-react icon) shown before the label. |
110
+ | `iconOnly` | `boolean` | `false` | Square button showing only the icon. Requires `aria-label`. |
111
+ | `loading` | `boolean` | `false` | Shows a spinner and blocks clicks, keeping the button's width and focus. A loading button is `aria-disabled="true"` and `aria-busy="true"`, not native `disabled`, so it stays focusable (assert `aria-disabled` in tests, not `toBeDisabled()`). |
112
+ | `loadingLabel` | `string` | | Text announced to assistive tech while `loading`, e.g. "Saving". It becomes the button's accessible name and is read out through a polite live region, a visually hidden `role="status"` span rendered next to the button. |
113
+ | `render` | `RenderProp<Record<string, unknown>>` | | Render a different element, e.g. `render={<a href="/runs" />}` or a router `<Link to="/runs" />`. |
114
+ | `showLoadingLabel` | `boolean` | `false` | Shows `loadingLabel` next to the spinner instead of the content (the width may change). |
115
+ | `size` | `"sm" \| "md"` | `md` | |
116
+ | `variant` | `"danger" \| "primary" \| "secondary" \| "ghost"` | `primary` | |
117
+
118
+ ### Card
119
+
120
+ Surface that groups related content, with an optional heading and actions. Use `flush` for edge-to-edge content like tables.
121
+
122
+ | Prop | Type | Default | Description |
123
+ | --- | --- | --- | --- |
124
+ | `actions` | `ReactNode` | | Controls shown at the end of the header, e.g. buttons. |
125
+ | `flush` | `boolean` | `false` | Remove the padding, e.g. for a table that fills the card. |
126
+ | `heading` | `ReactNode` | | Header content. A string is rendered as an `h2`; pass your own element to pick the level. |
127
+ | `size` | `"sm" \| "md"` | `md` | |
128
+
129
+ ### ChatTranscript
130
+
131
+ A conversation between a shopper and the assistant. Pass `messages`, or compose
132
+ `ChatTranscript.Root`, `.Message`, `.Bubble`, `.Meta`, `.Divider` and `.Typing` for custom
133
+ layouts. Consecutive messages from the same speaker group together.
134
+
135
+ | Prop | Type | Default | Description |
136
+ | --- | --- | --- | --- |
137
+ | `assistantAvatar` | `ReactNode` | | Assistant avatar, e.g. `<Avatar size="sm" name="Humara" />`. |
138
+ | `assistantName` | `ReactNode` | | Visible assistant name, e.g. "Humara". |
139
+ | `empty` | `ReactNode` | | Shown when there are no messages. |
140
+ | `label` | `string` | | Accessible name of the log. |
141
+ | `labels` | `ChatTranscriptLabels` | | Speaker names for screen readers. Defaults: "You" and "Assistant". |
142
+ | `live` | `boolean` | | Announce new messages to screen readers (`aria-live="polite"`). Off by default. |
143
+ | `messages` * | `ChatMessage[]` | | |
144
+ | `typing` | `boolean` | | Show the assistant typing indicator at the end. |
145
+ | `typingLabel` | `string` | | Screen-reader text for the typing indicator. |
146
+
147
+ ### Checkbox
148
+
149
+ A checkbox with its label beside it.
150
+
151
+ | Prop | Type | Default | Description |
152
+ | --- | --- | --- | --- |
153
+ | `checked` | `boolean` | `undefined` | Whether the checkbox is currently ticked. To render an uncontrolled checkbox, use the `defaultChecked` prop instead. |
154
+ | `className` | `string` | | |
155
+ | `defaultChecked` | `boolean` | `false` | Whether the checkbox is initially ticked. To render a controlled checkbox, use the `checked` prop instead. |
156
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
157
+ | `disabled` | `boolean` | | |
158
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
159
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
160
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
161
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
162
+ | `name` | `string` | `undefined` | Identifies the field when a form is submitted. |
163
+ | `onCheckedChange` | `((checked: boolean, eventDetails: { reason: "none"; event: Event; cancel: () => void; allowPropagation: () => void; isCanceled: boolean; isPropagationAllowed: boolean; trigger: Element; }) => void)` | | Event handler called when the checkbox is ticked or unticked. |
164
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
165
+ | `ref` | `Ref<HTMLInputElement>` | | Forwarded to the hidden checkbox input (for form libraries). |
166
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
167
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
168
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
169
+ | `style` | `CSSProperties \| ((state: CheckboxRootState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
170
+ | `value` | `string` | | The checkbox's value. Identifies it within a [Checkbox Group](https://base-ui.com/react/components/checkbox-group), falling back to `name` when omitted. When submitting a form, a checked box submits `value`; with no `value`, it submits the native "on". |
171
+
172
+ ### Chip
173
+
174
+ A selectable pill built on Base UI Toggle. Selected chips show a leading check.
175
+
176
+ | Prop | Type | Default | Description |
177
+ | --- | --- | --- | --- |
178
+ | `className` | `string` | | |
179
+ | `defaultPressed` | `boolean` | `false` | Whether the toggle button is currently pressed. This is the uncontrolled counterpart of `pressed`. |
180
+ | `onPressedChange` | `((pressed: boolean, eventDetails: { reason: "none"; event: Event; cancel: () => void; allowPropagation: () => void; isCanceled: boolean; isPropagationAllowed: boolean; trigger: Element; }) => void)` | | Callback fired when the pressed state is changed. |
181
+ | `pressed` | `boolean` | | Whether the toggle button is currently pressed. This is the controlled counterpart of `defaultPressed`. |
182
+ | `render` | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, ToggleState>` | | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
183
+ | `style` | `CSSProperties \| ((state: ToggleState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
184
+ | `value` | `string` | | A unique string that identifies the toggle when used inside a toggle group. |
185
+
186
+ ### ColorPicker
187
+
188
+ A text input for any CSS colour (hex, rgb(), a name…) with a swatch that opens the browser's
189
+ colour picker. Values not written as hex show their hex alongside.
190
+
191
+ | Prop | Type | Default | Description |
192
+ | --- | --- | --- | --- |
193
+ | `defaultValue` | `string` | `` | |
194
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
195
+ | `disabled` | `boolean` | | |
196
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
197
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
198
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
199
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
200
+ | `name` | `string` | | |
201
+ | `onValueChange` | `((value: string) => void)` | | Called with the text as typed or picked, e.g. `#0B6B4F` or `rgb(0 0 0)`. |
202
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
203
+ | `pickerLabel` | `string` | `Choose colour` | Accessible name of the swatch that opens the browser's colour picker. |
204
+ | `placeholder` | `string` | | |
205
+ | `ref` | `Ref<HTMLInputElement>` | | Forwarded to the text input. |
206
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
207
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
208
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
209
+ | `value` | `string` | | |
210
+
211
+ ### Combobox
212
+
213
+ Filterable single-choice dropdown: type to narrow the options, then pick one.
214
+
215
+ | Prop | Type | Default | Description |
216
+ | --- | --- | --- | --- |
217
+ | `actionsRef` | `RefObject<Actions \| null>` | | A ref to imperative actions. - `unmount`: Ends the closing phase of the combobox after an externally controlled closing animation finishes. Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the combobox completes closing on its own. Whether it leaves the DOM is decided by `keepMounted` on the portal. - `close`: Closes the combobox imperatively when called. |
218
+ | `autoComplete` | `string` | | Provides a hint to the browser for autofill. @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete |
219
+ | `autoHighlight` | `boolean` | `false` | Whether the first matching item is highlighted automatically while filtering. |
220
+ | `className` | `string` | | |
221
+ | `defaultOpen` | `boolean` | `false` | Whether the popup is initially open. To render a controlled popup, use the `open` prop instead. |
222
+ | `defaultValue` | `string \| null` | | |
223
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
224
+ | `disabled` | `boolean` | | |
225
+ | `emptyMessage` | `ReactNode` | `No matches` | Shown when nothing matches the typed text. |
226
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
227
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
228
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
229
+ | `highlightItemOnHover` | `boolean` | `true` | Whether moving the pointer over items should highlight them. Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state. |
230
+ | `inputProps` | `PartProps<ComboboxInputProps>` | | Props for the text input (role `combobox`), e.g. `{ 'data-testid': 'retailer' }`. |
231
+ | `isItemEqualToValue` | `((itemValue: string, value: string) => boolean)` | | Custom comparison logic used to determine if a combobox item value matches the current selected value. Useful when item values are objects without matching referentially. With a `createItems()` collection, both arguments are derived values. Defaults to `Object.is` comparison. |
232
+ | `itemToStringLabel` | `((itemValue: string) => string)` | | When the item values are objects (`<Combobox.Item value={object}>`), this function converts the object value to a string representation for display in the input. If the shape of the object is `{ value, label }`, the label will be used automatically without needing to specify this prop. With a `createItems()` collection, this receives the derived value, and the collection's `getLabel` takes precedence for values it can resolve. |
233
+ | `itemToStringValue` | `((itemValue: string) => string)` | | When the item values are objects (`<Combobox.Item value={object}>`), this function converts the object value to a string representation for form submission. If the shape of the object is `{ value, label }`, the value will be used automatically without needing to specify this prop. With a `createItems()` collection, this receives the derived value. |
234
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
235
+ | `name` | `string` | | Identifies the field when a form is submitted. |
236
+ | `onInputValueChange` | `((inputValue: string, eventDetails: ChangeEventDetails) => void)` | | Event handler called when the input value changes. |
237
+ | `onItemHighlighted` | `((highlightedValue: string, eventDetails: HighlightEventDetails) => void)` | | Callback fired when an item is highlighted or unhighlighted. Receives the highlighted item value (or `undefined` if no item is highlighted) and event details with a `reason` property describing why the highlight changed. The `reason` can be: - `'keyboard'`: the highlight changed due to keyboard navigation. - `'pointer'`: the highlight changed due to pointer hovering. The event may be a `MouseEvent` rather than a `PointerEvent`. - `'none'`: the highlight changed for another reason, such as typing, `autoHighlight`, the item list changing, or the popup opening or closing. |
238
+ | `onOpenChange` | `((open: boolean, eventDetails: OpenChangeEventDetails) => void)` | | Event handler called when the popup is opened or closed. |
239
+ | `onValueChange` | `((value: string \| null) => void)` | | |
240
+ | `open` | `boolean` | | Whether the popup is currently open. Use when controlled. |
241
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
242
+ | `options` * | `ComboboxOption[]` | | |
243
+ | `placeholder` | `string` | | |
244
+ | `popupProps` | `PartProps<ComboboxPopupProps>` | | Props for the dropdown, e.g. `{ 'data-testid': 'retailer-options' }`. |
245
+ | `portalContainer` | `PortalContainerTarget` | | Where the dropdown renders. Defaults to the nearest `PortalContainer`, else `document.body`. |
246
+ | `ref` | `Ref<HTMLInputElement>` | | Forwarded to the visible text input. |
247
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
248
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
249
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
250
+ | `value` | `string \| null` | | |
251
+
252
+ ### DateRangePicker
253
+
254
+ From–to date range picker: a field-styled trigger opening a range calendar with quick ranges.
255
+ Clicking a quick range applies it straight away; calendar picks apply with the Apply button.
256
+ Escape or Cancel discards the draft.
257
+
258
+ | Prop | Type | Default | Description |
259
+ | --- | --- | --- | --- |
260
+ | `applyLabel` | `string` | `Apply` | |
261
+ | `cancelLabel` | `string` | `Cancel` | |
262
+ | `className` | `string` | | Goes on the field root. |
263
+ | `defaultValue` | `DateRange` | `{ start: null, end: null }` | |
264
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
265
+ | `disabled` | `boolean` | | |
266
+ | `endTimeLabel` | `string` | `End time` | |
267
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
268
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
269
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
270
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
271
+ | `locale` | `Partial<DayPickerLocale>` | | Calendar locale, e.g. `enGB` from `react-day-picker/locale`. Its `code` also formats the trigger. |
272
+ | `maxDate` | `Date` | | Latest selectable day. |
273
+ | `minDate` | `Date` | | Earliest selectable day. |
274
+ | `onValueChange` | `((range: DateRange, details: { preset?: DateRangePreset; }) => void)` | | Called with the new range on Apply or when a quick range is chosen. `details.preset` is the chosen quick range, so a preset can trigger extra behaviour (e.g. a live mode). |
275
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
276
+ | `placeholder` | `string` | `Select a date range` | Trigger text while no range is set. |
277
+ | `popupProps` | `PartProps<PopoverPopupProps>` | | Props for the popup (role `dialog`). |
278
+ | `portalContainer` | `PortalContainerTarget` | | Where the popup renders. Defaults to the nearest `PortalContainer`, else `document.body`. |
279
+ | `presets` | `DateRangePreset[]` | | Quick ranges beside the calendar. Replaces the defaults; `[]` hides the list. |
280
+ | `presetsLabel` | `string` | `Quick ranges` | |
281
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
282
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
283
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
284
+ | `startTimeLabel` | `string` | `Start time` | |
285
+ | `timeZone` | `string` | | IANA zone (e.g. `'UTC'`) that days and times are shown and picked in. Defaults to local time. |
286
+ | `triggerProps` | `PartProps<Props<unknown>>` | | Props for the trigger button, e.g. `{ 'data-testid': 'range' }`. |
287
+ | `value` | `DateRange` | | |
288
+ | `weekStartsOn` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6` | `1` | First day of the week (0 is Sunday). |
289
+ | `withTime` | `boolean` | `false` | Adds start and end time inputs. Without it, a range runs from the start of its first day to the end of its last. |
290
+
291
+ ### DateTimeInput
292
+
293
+ Date and time picker using the browser's native `datetime-local` input.
294
+
295
+ | Prop | Type | Default | Description |
296
+ | --- | --- | --- | --- |
297
+ | `defaultValue` | `string \| number \| readonly string[]` | | |
298
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
299
+ | `disabled` | `boolean` | | |
300
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
301
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
302
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
303
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
304
+ | `name` | `string` | | |
305
+ | `onValueChange` | `((value: string) => void)` | | Called with the local date-time string, e.g. `2026-11-10T09:21`, or `''` when cleared. |
306
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
307
+ | `placeholder` | `string` | | |
308
+ | `ref` | `Ref<HTMLInputElement>` | | |
309
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
310
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
311
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
312
+ | `value` | `string \| number \| readonly string[]` | | |
313
+
314
+ ### DescriptionList
315
+
316
+ Key/value facts as a semantic `<dl>`. Terms are muted, values use the main ink colour.
317
+
318
+ | Prop | Type | Default | Description |
319
+ | --- | --- | --- | --- |
320
+ | `items` * | `DescriptionListItem[]` | | |
321
+ | `layout` | `"grid" \| "inline" \| "stacked"` | `stacked` | `stacked`: term above value, one pair per row. `inline`: term and value side by side, terms aligned. `grid`: stacked pairs in responsive columns. |
322
+ | `size` | `"sm" \| "md"` | `md` | |
323
+
324
+ ### DetailsSummary
325
+
326
+ A styled native `<details>`/`<summary>` disclosure.
327
+
328
+ | Prop | Type | Default | Description |
329
+ | --- | --- | --- | --- |
330
+ | `heading` * | `ReactNode` | | Always-visible summary that toggles the content. |
331
+ | `open` | `boolean` | | |
332
+
333
+ ### Drawer
334
+
335
+ A modal side panel. Closes on Escape, the close button, an overlay click or a swipe.
336
+
337
+ | Prop | Type | Default | Description |
338
+ | --- | --- | --- | --- |
339
+ | `className` | `string` | | Goes on the popup (role `dialog`). |
340
+ | `closeLabel` | `string` | `Close` | Accessible label of the close button. |
341
+ | `defaultOpen` | `boolean` | `false` | Whether the drawer is initially open. To render a controlled drawer, use the `open` prop instead. |
342
+ | `description` | `ReactNode` | | |
343
+ | `footer` | `ReactNode` | | Actions pinned to the bottom, e.g. Cancel and Save buttons. |
344
+ | `onOpenChange` | `((open: boolean, eventDetails: DrawerRootChangeEventDetails) => void)` | | Event handler called when the drawer is opened or closed. |
345
+ | `open` | `boolean` | | Whether the drawer is currently open. |
346
+ | `popupProps` | `PartProps<DrawerPopupProps>` | | Props for the popup (role `dialog`), e.g. `{ 'data-testid': 'run-drawer' }`. |
347
+ | `side` | `"right" \| "left"` | `right` | |
348
+ | `title` * | `ReactNode` | | |
349
+ | `trigger` | `ReactElement<unknown, string \| JSXElementConstructor<any>>` | | The element that opens the drawer, e.g. `<Button>`. Omit when controlling `open` yourself. |
350
+
351
+ ### EmptyLine
352
+
353
+ A one-line empty state, e.g. "No prompt chips yet."
354
+
355
+ | Prop | Type | Default | Description |
356
+ | --- | --- | --- | --- |
357
+ | `bare` | `boolean` | `false` | Without its own border, for use inside something that already has one (e.g. a table cell). |
358
+
359
+ ### EnvironmentChip
360
+
361
+ Shows which environment the app is pointed at. Put it in the TopBar `end` slot.
362
+
363
+ | Prop | Type | Default | Description |
364
+ | --- | --- | --- | --- |
365
+ | `environment` * | `string` | | Environment name, e.g. "staging". |
366
+ | `tone` | `"danger" \| "neutral" \| "highlight"` | `highlight` | `danger` for production-like environments, so they stand out. |
367
+
368
+ ### Field
369
+
370
+ Wraps a form control with a label, description and error message. Base UI wires up the label,
371
+ `aria-describedby` and invalid state for any Base UI control (or `Field.Control`) inside it.
372
+
373
+ | Prop | Type | Default | Description |
374
+ | --- | --- | --- | --- |
375
+ | `className` | `string` | | |
376
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
377
+ | `disabled` | `boolean` | | |
378
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
379
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
380
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
381
+ | `name` | `string` | | Identifies the field when a form is submitted. Takes precedence over the `name` prop on the `<Field.Control>` component. |
382
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
383
+ | `render` | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, FieldRootState>` | | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
384
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
385
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
386
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
387
+ | `style` | `CSSProperties \| ((state: FieldRootState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
388
+
389
+ ### Fieldset
390
+
391
+ A titled card of related fields. Nested fieldsets render as an indented group instead of a card.
392
+
393
+ | Prop | Type | Default | Description |
394
+ | --- | --- | --- | --- |
395
+ | `className` | `string` | | |
396
+ | `description` | `ReactNode` | | |
397
+ | `legend` * | `ReactNode` | | The card's title. |
398
+ | `render` | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, FieldsetRootState>` | | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
399
+ | `style` | `CSSProperties \| ((state: FieldsetRootState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
400
+
401
+ ### Heading
402
+
403
+ Section heading. `level` sets the semantic h1–h6; `size` sets the look independently. Pages get their h1 from `PageHeader`.
404
+
405
+ | Prop | Type | Default | Description |
406
+ | --- | --- | --- | --- |
407
+ | `level` * | `HeadingLevel` | | Document outline level (`h1`–`h6`). |
408
+ | `size` | `HeadingSize` | | Visual size, independent of `level`. Defaults to the size for the level. |
409
+
410
+ ### Icon
411
+
412
+ Renders a lucide-react icon at a token size. Decorative unless `label` is given.
413
+
414
+ | Prop | Type | Default | Description |
415
+ | --- | --- | --- | --- |
416
+ | `icon` * | `LucideIcon` | | A lucide-react icon component, e.g. `Play`. |
417
+ | `label` | `string` | | Accessible name. Without it the icon is decorative and hidden from assistive tech. |
418
+ | `name` | `string` | | |
419
+ | `size` | `IconSize` | `md` | `xs` 0.75rem, `sm` 1rem, `md` 1.25rem (default), `lg` 1.5rem, an em/rem length, or px (deprecated). |
420
+
421
+ ### List
422
+
423
+ Simple list with a built-in empty state.
424
+
425
+ | Prop | Type | Default | Description |
426
+ | --- | --- | --- | --- |
427
+ | `emptyState` | `ReactNode` | `No items` | Shown when there are no items. |
428
+ | `getKey` | `((item: T, index: number) => Key)` | `(item: unknown): Key => (typeof item === 'string' ? item : JSON.stringify(item))` | Row key. Defaults to the item if it's a string, else its JSON. |
429
+ | `items` | `readonly T[] \| null` | | |
430
+ | `renderItem` | `((item: T, index: number) => ReactNode)` | `(item) => item as ReactNode` | Row content. Defaults to the item itself, so strings need no template. |
431
+
432
+ ### Loader
433
+
434
+ Indeterminate spinner. Inherits the current text colour.
435
+
436
+ | Prop | Type | Default | Description |
437
+ | --- | --- | --- | --- |
438
+ | `label` | `string \| null` | `Loading` | Accessible label. Pass `null` when a visible label sits next to it. |
439
+ | `size` | `string \| number` | `1rem` | Diameter as a CSS length, e.g. `'1em'` to match the surrounding text. Numbers are px at the 16px base, converted to rem so they scale with the text-size setting. |
440
+
441
+ ### Menu
442
+
443
+ A dropdown list of actions, links, settings and submenus.
444
+
445
+ | Prop | Type | Default | Description |
446
+ | --- | --- | --- | --- |
447
+ | `align` | `Align` | `start` | |
448
+ | `className` | `string` | | Goes on the popup (role `menu`). |
449
+ | `defaultOpen` | `boolean` | `false` | Whether the menu is initially open. To render a controlled menu, use the `open` prop instead. |
450
+ | `footer` | `ReactNode` | | Content below the items, e.g. a version number. |
451
+ | `header` | `ReactNode` | | Content above the items, e.g. the signed-in user's name. |
452
+ | `items` * | `MenuEntry[]` | | Menu items, with `'separator'` for a divider. |
453
+ | `onOpenChange` | `((open: boolean, eventDetails: MenuRootChangeEventDetails) => void)` | | Event handler called when the menu is opened or closed. |
454
+ | `open` | `boolean` | | Whether the menu is currently open. |
455
+ | `popupProps` | `PartProps<MenuPopupProps>` | | Props for the popup (role `menu`), e.g. `{ 'data-testid': 'account-menu' }`. |
456
+ | `portalContainer` | `PortalContainerTarget` | | Where the menu renders. Defaults to the nearest `PortalContainer`, else `document.body`. |
457
+ | `side` | `Side` | `bottom` | |
458
+ | `trigger` * | `ReactElement<unknown, string \| JSXElementConstructor<any>>` | | The element that opens the menu, e.g. `<Button>`. It must accept a ref and props. |
459
+
460
+ ### MetricBar
461
+
462
+ A labelled percentage with a stacked bar, e.g. "Achieved 83%".
463
+
464
+ | Prop | Type | Default | Description |
465
+ | --- | --- | --- | --- |
466
+ | `className` | `string` | | |
467
+ | `label` * | `ReactNode` | | |
468
+ | `render` | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MeterRootState>` | | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
469
+ | `segments` | `MetricBarSegment[]` | `[{ value, tone }]` | Stacked bar segments, left to right. Defaults to one segment of `value` in the label's tone. |
470
+ | `style` | `CSSProperties \| ((state: MeterRootState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
471
+ | `tone` | `"success" \| "danger" \| "neutral"` | `neutral` | Colour of the label. |
472
+ | `value` * | `number` | | The percentage shown next to the label (0 to 100). |
473
+
474
+ ### Modal
475
+
476
+ Controlled modal dialog. Closes on Escape, backdrop click and the close buttons via `onOpenChange(false)`.
477
+
478
+ | Prop | Type | Default | Description |
479
+ | --- | --- | --- | --- |
480
+ | `className` | `string` | | |
481
+ | `closeLabel` | `string` | `Close` | |
482
+ | `description` | `ReactNode` | | |
483
+ | `footer` | `ReactNode` | | Footer actions. Defaults to a single Close button; pass `null` for no footer. |
484
+ | `onOpenChange` * | `(open: boolean, eventDetails: DialogRootChangeEventDetails) => void` | | |
485
+ | `open` * | `boolean` | | |
486
+ | `render` | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, DialogPopupState>` | | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
487
+ | `size` | `"sm" \| "md" \| "lg"` | `md` | Max width: `sm` 37.5rem, `md` 47rem (default), `lg` 78rem. It's always capped to the viewport. |
488
+ | `style` | `CSSProperties \| ((state: DialogPopupState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
489
+ | `title` * | `ReactNode` | | |
490
+
491
+ ### NavRail
492
+
493
+ Primary app navigation: a slim icon rail that can expand to show labels. Collapsed by default;
494
+ uncontrolled rails remember the user's choice in localStorage.
495
+
496
+ | Prop | Type | Default | Description |
497
+ | --- | --- | --- | --- |
498
+ | `appName` | `string` | | The app's name, shown under the Humara wordmark when the rail is expanded, e.g. "Back Office". The logo itself is built in: the wordmark when expanded, the fan mark when collapsed. |
499
+ | `brandHref` | `string` | `/` | |
500
+ | `brandLabel` | `string` | `appName ? `${appName} home` : 'Home'` | Accessible name of the logo link. Defaults to "<appName> home", or "Home". |
501
+ | `brandRender` | `ReactElement<unknown, string \| JSXElementConstructor<any>>` | | Router link element for the logo, e.g. `<Link to="/" />`. |
502
+ | `collapsible` | `boolean` | `true` | Show the expand/collapse toggle. |
503
+ | `defaultExpanded` | `boolean` | `false` | Starting state when uncontrolled and nothing is stored. |
504
+ | `expanded` | `boolean` | | Shows labels next to icons. When collapsed, each item's label shows in a `Tooltip`. Pass it to control the rail yourself (nothing is stored); omit it and the rail manages its own state. A controlled rail without `onExpandedChange` hides the toggle. |
505
+ | `footer` | `ReactNode \| ((expanded: boolean) => ReactNode)` | | Pinned to the bottom, e.g. a `UserMenu`. Pass a function to vary it with `expanded`, e.g. `(expanded) => <UserMenu name={name} showName={expanded} />`. |
506
+ | `items` * | `NavRailItem[]` | | |
507
+ | `onExpandedChange` | `((expanded: boolean) => void)` | | |
508
+ | `persistKey` | `string \| null` | `bok-rail-expanded` | localStorage key that remembers the user's choice when uncontrolled. `null` disables it. Use different keys for rails in different apps on one origin. |
509
+
510
+ ### NumberInput
511
+
512
+ Numeric input with step buttons. Arrow keys step by `step`, Shift+Arrow by `largeStep`.
513
+
514
+ | Prop | Type | Default | Description |
515
+ | --- | --- | --- | --- |
516
+ | `className` | `string` | | |
517
+ | `defaultValue` | `number` | | The uncontrolled value of the field when it's initially rendered. To render a controlled number field, use the `value` prop instead. |
518
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
519
+ | `disabled` | `boolean` | | |
520
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
521
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
522
+ | `hideControls` | `boolean` | `false` | Hides the − and + buttons. |
523
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
524
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
525
+ | `max` | `number` | | The maximum value of the input element. |
526
+ | `min` | `number` | | The minimum value of the input element. |
527
+ | `name` | `string` | | Identifies the field when a form is submitted. |
528
+ | `onValueChange` | `((value: number \| null, eventDetails: NumberFieldRootChangeEventDetails) => void)` | | Callback fired when the number value changes. The `eventDetails.reason` indicates what triggered the change: - `'input-change'` for parseable typing or programmatic text updates - `'input-clear'` when the field becomes empty - `'input-blur'` when formatting (and clamping, if enabled) occurs on blur - `'input-paste'` for paste interactions - `'keyboard'` for arrow-key/Home/End stepping (typing digits uses `'input-change'`/`'input-clear'`) - `'increment-press'` / `'decrement-press'` for button presses on the increment and decrement controls - `'wheel'` for wheel-based scrubbing - `'scrub'` for scrub area drags |
529
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
530
+ | `placeholder` | `string` | | |
531
+ | `ref` | `Ref<HTMLInputElement>` | | Forwarded to the visible text input. |
532
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
533
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
534
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
535
+ | `step` | `number \| "any"` | `1` | Amount to increment and decrement with the buttons and arrow keys, or to scrub with pointer movement in the scrub area. To always enable step validation on form submission, specify the `min` prop explicitly in conjunction with this prop. Specify `step="any"` to always disable step validation; interactive stepping then uses a base amount of `1`, while the alt and shift keys still step by `smallStep` and `largeStep`. |
536
+ | `style` | `CSSProperties \| ((state: NumberFieldRootState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
537
+ | `value` | `number \| null` | | The raw numeric value of the field. |
538
+
539
+ ### PageHeader
540
+
541
+ The page's h1, with an optional facts line, description, and actions at the top right.
542
+
543
+ | Prop | Type | Default | Description |
544
+ | --- | --- | --- | --- |
545
+ | `actions` | `ReactNode` | | Controls at the top right, e.g. the page's primary Button. |
546
+ | `description` | `ReactNode` | | |
547
+ | `facts` | `ReactNode[]` | `[]` | Short facts on one line under the title, separated by dots. Empty ones are skipped. |
548
+ | `logo` | `ReactNode` | | Shown before the title, e.g. a logo or avatar. |
549
+ | `title` * | `ReactNode` | | |
550
+
551
+ ### Pagination
552
+
553
+ Page navigation for long tables and lists. Controlled via `page` and `onPageChange`.
554
+
555
+ | Prop | Type | Default | Description |
556
+ | --- | --- | --- | --- |
557
+ | `label` | `string` | `Pagination` | |
558
+ | `nextLabel` | `string` | `Next page` | |
559
+ | `onPageChange` * | `(page: number) => void` | | |
560
+ | `page` * | `number` | | Current page, 1-based. |
561
+ | `pageCount` * | `number` | | |
562
+ | `previousLabel` | `string` | `Previous page` | |
563
+ | `siblings` | `number` | `1` | Pages shown either side of the current one before collapsing into "…". |
564
+
565
+ ### Popover
566
+
567
+ Floating content anchored to a trigger. Closes on Escape and outside click.
568
+
569
+ | Prop | Type | Default | Description |
570
+ | --- | --- | --- | --- |
571
+ | `align` | `Align` | `start` | |
572
+ | `className` | `string` | | |
573
+ | `defaultOpen` | `boolean` | `false` | Whether the popover is initially open. To render a controlled popover, use the `open` prop instead. |
574
+ | `description` | `ReactNode` | | |
575
+ | `onOpenChange` | `((open: boolean, eventDetails: PopoverRootChangeEventDetails) => void)` | | Event handler called when the popover is opened or closed. |
576
+ | `open` | `boolean` | | Whether the popover is currently open. |
577
+ | `portalContainer` | `PortalContainerTarget` | | Where the popup renders. Defaults to the nearest `PortalContainer`, else `document.body`. |
578
+ | `side` | `Side` | `bottom` | |
579
+ | `title` | `ReactNode` | | Names the popover dialog. Recommended for accessibility. |
580
+ | `trigger` * | `ReactElement<unknown, string \| JSXElementConstructor<any>>` | | The element that toggles the popover, e.g. `<Button>`. It must accept a ref and props. |
581
+
582
+ ### PortalContainer
583
+
584
+ Makes library popups (Select, Combobox, Menu, Popover, Tooltip) inside it render into
585
+ `container` instead of `document.body`. Use it inside a native `<dialog>` opened with
586
+ `showModal()`, which sits in the top layer above anything portalled to the body.
587
+ Modal and Drawer already do this for their content.
588
+
589
+ | Prop | Type | Default | Description |
590
+ | --- | --- | --- | --- |
591
+ | `container` * | `PortalContainerTarget` | | The element popups render into, e.g. a native `<dialog>` opened with `showModal()`. |
592
+
593
+ ### ProgressBar
594
+
595
+ A segmented bar for a batch of runs: done, failed, running (pulsing) and waiting.
596
+ The count and `aria-valuenow` are the finished runs (done + failed).
597
+
598
+ | Prop | Type | Default | Description |
599
+ | --- | --- | --- | --- |
600
+ | `className` | `string` | | |
601
+ | `done` * | `number` | | |
602
+ | `failed` | `number` | `0` | |
603
+ | `hideCount` | `boolean` | `false` | Hides the "n/total" count. |
604
+ | `label` | `ReactNode` | | Shown above the bar. Without it, pass `aria-label`. |
605
+ | `render` | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, ProgressRootState>` | | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
606
+ | `running` | `number` | `0` | |
607
+ | `style` | `CSSProperties \| ((state: ProgressRootState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
608
+ | `total` * | `number` | | |
609
+
610
+ ### RadioCards
611
+
612
+ A radio group drawn as selectable cards, each with a title and optional description.
613
+
614
+ | Prop | Type | Default | Description |
615
+ | --- | --- | --- | --- |
616
+ | `className` | `string` | | |
617
+ | `defaultValue` | `string` | | The uncontrolled value of the radio button that should be initially selected. To render a controlled radio group, use the `value` prop instead. |
618
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
619
+ | `disabled` | `boolean` | | |
620
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
621
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
622
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
623
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
624
+ | `name` | `string` | | Identifies the field when a form is submitted. |
625
+ | `onValueChange` | `((value: string) => void)` | | |
626
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
627
+ | `options` * | `RadioCardOption[]` | | |
628
+ | `orientation` | `"horizontal" \| "vertical"` | `vertical` | Lay the cards out in a row (wrapping) instead of a column. |
629
+ | `ref` | `Ref<HTMLInputElement>` | | Forwarded to the group's hidden input (for form libraries). |
630
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
631
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
632
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
633
+ | `style` | `CSSProperties \| ((state: RadioGroupState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
634
+ | `value` | `string` | | The controlled value of the radio item that should be currently selected. To render an uncontrolled radio group, use the `defaultValue` prop instead. |
635
+
636
+ ### SaveBar
637
+
638
+ Sticky bar at the bottom of an editable page, shown while there are unsaved changes.
639
+
640
+ | Prop | Type | Default | Description |
641
+ | --- | --- | --- | --- |
642
+ | `changes` * | `number` | | Number of unsaved changes. The bar renders nothing when this is 0. |
643
+ | `context` | `ReactNode` | | Extra context, e.g. "on branch main". |
644
+ | `discardLabel` | `string` | `Discard` | |
645
+ | `onDiscard` | `(() => void)` | | |
646
+ | `onSave` * | `() => void` | | |
647
+ | `saveLabel` | `string` | `Save changes` | |
648
+ | `saving` | `boolean` | `false` | |
649
+
650
+ ### Select
651
+
652
+ Single-choice dropdown with a label.
653
+
654
+ | Prop | Type | Default | Description |
655
+ | --- | --- | --- | --- |
656
+ | `className` | `string` | | |
657
+ | `defaultOpen` | `boolean` | `false` | Whether the select popup is initially open. To render a controlled select popup, use the `open` prop instead. |
658
+ | `defaultValue` | `string \| null` | | |
659
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
660
+ | `disabled` | `boolean` | | |
661
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
662
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
663
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
664
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
665
+ | `name` | `string` | | Identifies the field when a form is submitted. |
666
+ | `onOpenChange` | `((open: boolean, eventDetails: SelectRootOpenChangeEventDetails) => void)` | | Event handler called when the select popup is opened or closed. |
667
+ | `onValueChange` | `((value: string \| null) => void)` | | Called when the value changes. Re-picking the current option doesn't call it. |
668
+ | `open` | `boolean` | | Whether the select popup is currently open. |
669
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
670
+ | `options` * | `SelectOption[]` | | |
671
+ | `placeholder` | `string` | `Select an option` | Shown while nothing is selected. |
672
+ | `popupProps` | `PartProps<SelectPopupProps>` | | Props for the dropdown (role `listbox`), e.g. `{ 'data-testid': 'plan-options' }`. |
673
+ | `portalContainer` | `PortalContainerTarget` | | Where the dropdown renders. Defaults to the nearest `PortalContainer`, else `document.body`. |
674
+ | `ref` | `Ref<HTMLInputElement>` | | Forwarded to the hidden input that holds the value (for form libraries). |
675
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
676
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
677
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
678
+ | `triggerProps` | `PartProps<SelectTriggerProps>` | | Props for the trigger button (role `combobox`), e.g. `{ 'data-testid': 'plan-select' }`. |
679
+ | `value` | `string \| null` | | |
680
+
681
+ ### Skeleton
682
+
683
+ A pulsing placeholder shaped like the content that's loading. Hidden from assistive tech;
684
+ mark the loading region with `aria-busy` instead.
685
+
686
+ | Prop | Type | Default | Description |
687
+ | --- | --- | --- | --- |
688
+ | `height` | `Height<string \| number>` | | |
689
+ | `lines` | `number` | `1` | For `text`, renders this many lines, the last one shorter. |
690
+ | `variant` | `"circle" \| "text" \| "block"` | `block` | `text` is a line of text, `circle` is an avatar (sized by `height`). |
691
+ | `width` | `Width<string \| number>` | | |
692
+
693
+ ### Stack
694
+
695
+ Flex layout that spaces its children. Renders nothing when it has no children.
696
+
697
+ | Prop | Type | Default | Description |
698
+ | --- | --- | --- | --- |
699
+ | `align` | `"center" \| "end" \| "baseline" \| "start" \| "stretch"` | | |
700
+ | `direction` | `"row" \| "column"` | `column` | |
701
+ | `gap` | `"0" \| "0.5" \| "1" \| "1.5" \| "2" \| "2.5" \| "3" \| "4" \| "5" \| "6" \| "8" \| "10" \| "12"` | `4` | Space between children, from the `space` scale (`'4'` is 16px). |
702
+ | `justify` | `"center" \| "end" \| "start" \| "between"` | | |
703
+ | `wrap` | `boolean` | `false` | |
704
+
705
+ ### StatCard
706
+
707
+ A headline number on a card, e.g. "Objective achieved 64%".
708
+
709
+ | Prop | Type | Default | Description |
710
+ | --- | --- | --- | --- |
711
+ | `caption` | `ReactNode` | | |
712
+ | `label` * | `ReactNode` | | |
713
+ | `value` * | `ReactNode` | | |
714
+
715
+ ### StatsGrid
716
+
717
+ Responsive grid for stat tiles. Columns fill the row and wrap below `minColumnWidth`.
718
+
719
+ | Prop | Type | Default | Description |
720
+ | --- | --- | --- | --- |
721
+ | `minColumnWidth` | `string` | | Narrowest a column may get before the grid wraps, as a CSS length. Default `14rem`. |
722
+
723
+ ### StatusBadge
724
+
725
+ A pill showing a run's status as a coloured dot and label.
726
+
727
+ | Prop | Type | Default | Description |
728
+ | --- | --- | --- | --- |
729
+ | `children` | `ReactNode` | | Overrides the default label (the capitalised status). |
730
+ | `status` * | `Status` | | |
731
+
732
+ ### Switch
733
+
734
+ On/off toggle with its label beside it. Toggle with Space or Enter.
735
+
736
+ | Prop | Type | Default | Description |
737
+ | --- | --- | --- | --- |
738
+ | `checked` | `boolean` | | Whether the switch is currently active. To render an uncontrolled switch, use the `defaultChecked` prop instead. |
739
+ | `className` | `string` | | |
740
+ | `defaultChecked` | `boolean` | `false` | Whether the switch is initially active. To render a controlled switch, use the `checked` prop instead. |
741
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
742
+ | `disabled` | `boolean` | | |
743
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
744
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
745
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
746
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
747
+ | `name` | `string` | | Identifies the field when a form is submitted. |
748
+ | `onCheckedChange` | `((checked: boolean, eventDetails: { reason: "none"; event: Event; cancel: () => void; allowPropagation: () => void; isCanceled: boolean; isPropagationAllowed: boolean; trigger: Element; }) => void)` | | Event handler called when the switch is activated or deactivated. |
749
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
750
+ | `ref` | `Ref<HTMLInputElement>` | | Forwarded to the hidden checkbox input (for form libraries). |
751
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
752
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
753
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
754
+ | `style` | `CSSProperties \| ((state: SwitchRootState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
755
+ | `value` | `string` | | The value submitted with the form when the switch is on. By default, switch submits the "on" value, matching native checkbox behavior. |
756
+
757
+ ### Switcher
758
+
759
+ Searchable switcher, e.g. "pick a customer or branch" in a breadcrumb or top bar. Typing filters, arrows move, Enter picks, Escape closes.
760
+
761
+ | Prop | Type | Default | Description |
762
+ | --- | --- | --- | --- |
763
+ | `className` | `string` | | Goes on the trigger. |
764
+ | `defaultOpen` | `boolean` | `false` | |
765
+ | `disabled` | `boolean` | | |
766
+ | `emptyMessage` | `ReactNode` | `No matches` | |
767
+ | `footer` | `SwitcherFooter` | | A link or action under the list, e.g. "View all customers". |
768
+ | `items` * | `SwitcherItem[]` | | |
769
+ | `label` * | `string` | | What is being switched, e.g. "Customer". Names the trigger ("Customer: O2") and the popup. |
770
+ | `loading` | `boolean` | `false` | |
771
+ | `loadingLabel` | `string` | `Loading…` | |
772
+ | `onOpenChange` | `((open: boolean) => void)` | | |
773
+ | `onSelect` | `((item: SwitcherItem) => void)` | | Called when a different item is picked (by click or Enter). Link items navigate as well. |
774
+ | `open` | `boolean` | | |
775
+ | `placeholder` | `string` | `Select…` | Trigger text when there is no current item. |
776
+ | `popupProps` | `PartProps<ComboboxPopupProps>` | | Props for the popup (role `dialog`, named by `label`). |
777
+ | `portalContainer` | `PortalContainerTarget` | | Where the popup renders. Defaults to the nearest `PortalContainer`, else `document.body`. |
778
+ | `resultsLabel` | `((count: number) => string)` | `(count: number) => `${count} ${count === 1 ? 'result' : 'results'}`` | Screen reader text for the number of rows shown. |
779
+ | `searchLabel` | `string` | `Search` | Accessible name and placeholder of the filter input. |
780
+ | `size` | `"sm" \| "md"` | `md` | `md` shows the current item's description in the trigger. |
781
+ | `triggerProps` | `PartProps<ComboboxTriggerProps>` | | Props for the trigger (role `combobox`, named "Customer: O2"), e.g. `{ 'data-testid': 'customer-switch' }`. |
782
+ | `value` | `string \| null` | | `value` of the current item, shown in the trigger and checked in the list. |
783
+
784
+ ### Table
785
+
786
+ A data table. Pass `columns` and `rows`, or compose `Table.Root`, `Table.Head`, `Table.Body`,
787
+ `Table.Row`, `Table.HeaderCell` and `Table.Cell` for custom layouts.
788
+
789
+ | Prop | Type | Default | Description |
790
+ | --- | --- | --- | --- |
791
+ | `columns` * | `TableColumn<Row>[]` | | |
792
+ | `density` | `"default" \| "compact"` | | |
793
+ | `empty` | `ReactNode` | | Shown when there are no rows. |
794
+ | `getRowKey` * | `(row: Row) => Key` | | |
795
+ | `getRowProps` | `((row: Row) => ClassAttributes<HTMLTableRowElement> & HTMLAttributes<HTMLTableRowElement> & DataAttributes)` | | Props for each row's `<tr>`, e.g. `(row) => ({ 'data-testid': `run-${row.id}` })`. |
796
+ | `loading` | `boolean` | | Shows skeleton rows while there are no rows yet. Existing rows stay during a refetch. |
797
+ | `onRowClick` | `((row: Row) => void)` | | Makes each row clickable. The primary column's cell becomes a button (so keyboard and screen reader users reach it with Tab and press Enter or Space), and a click anywhere else on the row clicks it too. Clicks on other buttons, links or inputs in the row are left alone. Don't put interactive content in the primary column. |
798
+ | `primaryColumn` | `string` | | `key` of the column that holds the row's button. Defaults to the first column. |
799
+ | `rows` * | `Row[]` | | |
800
+ | `scrollRef` | `Ref<HTMLDivElement>` | | Ref to the card-framed `<div>` that scrolls the table sideways, e.g. for scroll hints. |
801
+
802
+ ### TableAction
803
+
804
+ An icon-only ghost button for table rows, labelled by a tooltip.
805
+
806
+ | Prop | Type | Default | Description |
807
+ | --- | --- | --- | --- |
808
+ | `aria-label` * | `string` | | Names the button and is shown as its tooltip. |
809
+ | `fullWidth` | `boolean` | | |
810
+ | `icon` * | `ReactNode` | | A decorative icon, e.g. `<Pencil size="1.38em" aria-hidden />`. |
811
+ | `loading` | `boolean` | | Shows a spinner and blocks clicks, keeping the button's width and focus. A loading button is `aria-disabled="true"` and `aria-busy="true"`, not native `disabled`, so it stays focusable (assert `aria-disabled` in tests, not `toBeDisabled()`). |
812
+ | `loadingLabel` | `string` | | Text announced to assistive tech while `loading`, e.g. "Saving". It becomes the button's accessible name and is read out through a polite live region, a visually hidden `role="status"` span rendered next to the button. |
813
+ | `render` | `RenderProp<Record<string, unknown>>` | | Render a different element, e.g. `render={<a href="/runs" />}` or a router `<Link to="/runs" />`. |
814
+ | `showLoadingLabel` | `boolean` | | Shows `loadingLabel` next to the spinner instead of the content (the width may change). |
815
+ | `size` | `"sm" \| "md"` | `sm` | |
816
+
817
+ ### Tabs
818
+
819
+ Underline tabs with optional counts ("Conversation 13"). Pass `items`, or compose `Tabs.Root`, `Tabs.List`, `Tabs.Tab` and `Tabs.Panel`.
820
+
821
+ | Prop | Type | Default | Description |
822
+ | --- | --- | --- | --- |
823
+ | `className` | `string` | | |
824
+ | `defaultValue` | `any` | `0` | The default value. Use when the component is not controlled. When the value is `null`, no Tab will be active. |
825
+ | `items` * | `TabItem[]` | | |
826
+ | `keepMounted` | `boolean` | | Keeps hidden panels in the DOM, so form fields in other tabs stay registered and keep their state. Panels unmount while hidden by default. |
827
+ | `listProps` | `PartProps<TabsListProps>` | | Props for the tab row (role `tablist`). |
828
+ | `onValueChange` | `((value: any, eventDetails: TabsRootChangeEventDetails) => void)` | | Callback invoked when new value is being set. The event `reason` is `'none'` for user-initiated changes, such as a click or keyboard navigation; `'initial'` for the first automatic selection or fallback in uncontrolled roots when `defaultValue` is omitted or `undefined`, including when the implicit initial value is disabled or missing; `'disabled'` for automatic fallback when the selected tab becomes disabled in uncontrolled roots; or `'missing'` for automatic fallback when the selected tab is removed, or when an explicit `defaultValue` never matches a mounted tab in uncontrolled roots. For automatic changes, the selected value can be `null` when no enabled Tab is available as a fallback. Automatic changes cannot be canceled; calling `eventDetails.cancel()` for `'initial'`, `'disabled'`, or `'missing'` has no effect. |
829
+ | `render` | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, TabsRootState>` | | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
830
+ | `style` | `CSSProperties \| ((state: TabsRootState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
831
+ | `value` | `any` | | The value of the currently active `Tab`. Use when the component is controlled. When the value is `null`, no Tab will be active. |
832
+
833
+ ### Tag
834
+
835
+ A small rectangular mono label, e.g. an input method or event type.
836
+
837
+ | Prop | Type | Default | Description |
838
+ | --- | --- | --- | --- |
839
+ | `selected` | `boolean` | `false` | Accent-tinted, e.g. the active value in a group of tags. |
840
+
841
+ ### Textarea
842
+
843
+ Multi-line text input with a label.
844
+
845
+ | Prop | Type | Default | Description |
846
+ | --- | --- | --- | --- |
847
+ | `countLimit` | `number` | | Soft limit: shows "count/countLimit" without setting native `maxLength`, so people can type past it. Over the limit the count turns red and gets `data-over="true"`; show an `error` too. |
848
+ | `defaultValue` | `string \| number \| readonly string[]` | | |
849
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
850
+ | `disabled` | `boolean` | | |
851
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
852
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
853
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
854
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
855
+ | `name` | `string` | | |
856
+ | `onValueChange` | `((value: string) => void)` | | Called with the new string value on every change. |
857
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
858
+ | `placeholder` | `string` | | |
859
+ | `ref` | `Ref<HTMLTextAreaElement>` | | |
860
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
861
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
862
+ | `showCount` | `boolean` | `false` | Shows "count/maxLength" under the textarea. Needs `maxLength`, which stops typing at the limit. |
863
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
864
+ | `value` | `string \| number \| readonly string[]` | | |
865
+
866
+ ### TextInput
867
+
868
+ Single-line text input with a label. Spread `register('name')` from react-hook-form onto it.
869
+
870
+ | Prop | Type | Default | Description |
871
+ | --- | --- | --- | --- |
872
+ | `countLimit` | `number` | | Soft limit: shows "count/countLimit" without setting native `maxLength`, so people can type past it. Over the limit the count turns red and gets `data-over="true"`; show an `error` too. |
873
+ | `defaultValue` | `string \| number \| readonly string[]` | | |
874
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
875
+ | `disabled` | `boolean` | | |
876
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
877
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
878
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
879
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
880
+ | `name` | `string` | | |
881
+ | `onValueChange` | `((value: string) => void)` | | Called with the new string value on every change. |
882
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
883
+ | `placeholder` | `string` | | |
884
+ | `ref` | `Ref<HTMLInputElement>` | | |
885
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
886
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
887
+ | `showCount` | `boolean` | `false` | Shows "count/maxLength" inside the input. Needs `maxLength`, which stops typing at the limit. |
888
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
889
+ | `value` | `string \| number \| readonly string[]` | | |
890
+
891
+ ### ThemePicker
892
+
893
+ Lets the user pick a theme. Each option previews itself in its own colours.
894
+
895
+ | Prop | Type | Default | Description |
896
+ | --- | --- | --- | --- |
897
+ | `label` | `string` | `Theme` | |
898
+ | `onChange` | `((theme: "light" \| "dark" \| "sand" \| "system") => void)` | | |
899
+ | `options` | `ThemeOption[]` | `[ { value: 'light', label: 'Light', palettes: ['light'] }, { value: 'sand', label: 'Sand', palettes: ['sand'] }, { value: 'dark', label: 'Dark', palettes: ['dark'] }, { value: 'system', label: 'System', palettes: ['light', 'dark'] }, ]` | |
900
+ | `value` | `"light" \| "dark" \| "sand" \| "system"` | | Controlled value. Omit `value` and `onChange` to drive the app theme via `useTheme`. |
901
+
902
+ ### ToggleGroup
903
+
904
+ Segmented control: pick one of a few options. Arrow keys move between options.
905
+
906
+ | Prop | Type | Default | Description |
907
+ | --- | --- | --- | --- |
908
+ | `className` | `string` | | |
909
+ | `defaultValue` | `string \| null` | `null` | |
910
+ | `description` | `ReactNode` | | Help text under the input, linked with `aria-describedby`. |
911
+ | `disabled` | `boolean` | | |
912
+ | `error` | `ReactNode` | | Error message. When set, the input is marked invalid and the message is announced. |
913
+ | `fieldProps` | `FieldRootProps` | | Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. |
914
+ | `hideLabel` | `boolean` | | Hides the label visually. It still names the input for screen readers and tests. |
915
+ | `label` | `ReactNode` | | Visible label, also the input's accessible name. |
916
+ | `name` | `string` | | Submits the value with a form via a hidden input. |
917
+ | `onValueChange` | `((value: string) => void)` | | |
918
+ | `optionalText` | `ReactNode` | | Text for `requiredIndicator="optional-note"`. |
919
+ | `options` * | `ToggleGroupOption[]` | | |
920
+ | `ref` | `Ref<HTMLInputElement>` | | Forwarded to the hidden input. |
921
+ | `render` | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, ToggleGroupState>` | | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
922
+ | `required` | `boolean` | | Marks the label with an asterisk (the input gets native `required`). |
923
+ | `requiredIndicator` | `RequiredIndicator` | | `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText` to fields that aren't required. `none` shows neither. |
924
+ | `showRequired` | `boolean` | | Shows the field as required (marker and `aria-required`) without native `required`, e.g. when a form library validates instead of the browser. |
925
+ | `size` | `"sm" \| "md"` | `md` | `sm` is a compact control for use inside forms and toolbars. |
926
+ | `style` | `CSSProperties \| ((state: ToggleGroupState) => CSSProperties)` | | Style applied to the element, or a function that returns a style object based on the component's state. |
927
+ | `value` | `string \| null` | | |
928
+
929
+ ### Tooltip
930
+
931
+ A short inverted label shown on hover and keyboard focus.
932
+
933
+ | Prop | Type | Default | Description |
934
+ | --- | --- | --- | --- |
935
+ | `align` | `Align` | `center` | |
936
+ | `children` * | `ReactElement<unknown, string \| JSXElementConstructor<any>>` | | The trigger element. It must accept a ref and props, e.g. a `<button>` or our `Button`. |
937
+ | `className` | `string` | | |
938
+ | `defaultOpen` | `boolean` | `false` | Whether the tooltip is initially open. To render a controlled tooltip, use the `open` prop instead. |
939
+ | `delay` | `number` | `300` | Hover delay in ms. |
940
+ | `label` * | `ReactNode` | | |
941
+ | `onOpenChange` | `((open: boolean, eventDetails: TooltipRootChangeEventDetails) => void)` | | Event handler called when the tooltip is opened or closed. |
942
+ | `open` | `boolean` | | Whether the tooltip is currently open. |
943
+ | `portalContainer` | `PortalContainerTarget` | | Where the popup renders. Defaults to the nearest `PortalContainer`, else `document.body`. |
944
+ | `side` | `Side` | `top` | |
945
+ | `withArrow` | `boolean` | `true` | |
946
+
947
+ ### TopBar
948
+
949
+ Sticky bar at the top of the content area.
950
+
951
+ | Prop | Type | Default | Description |
952
+ | --- | --- | --- | --- |
953
+ | `end` | `ReactNode` | | Right side, e.g. `EnvironmentChip`, search or actions. |
954
+ | `start` | `ReactNode` | | Left side, usually `Breadcrumbs`. |
955
+
956
+ ### usePortalContainer
957
+
958
+ The nearest `PortalContainer`, unless `override` is given. `undefined` means `document.body`.
959
+
960
+ ### UserMenu
961
+
962
+ Account menu: avatar button that opens a menu of account actions. Fits the NavRail `footer` slot.
963
+
964
+ | Prop | Type | Default | Description |
965
+ | --- | --- | --- | --- |
966
+ | `align` | `Align` | `end` | |
967
+ | `avatarSrc` | `string` | | |
968
+ | `className` | `string` | | Goes on the popup (role `menu`). |
969
+ | `defaultOpen` | `boolean` | `false` | Whether the menu is initially open. To render a controlled menu, use the `open` prop instead. |
970
+ | `email` | `string` | | Shown under the name in the default header. |
971
+ | `footer` | `ReactNode` | | Content below the items, e.g. a version number. |
972
+ | `header` | `ReactNode` | | Content at the top of the menu. Defaults to the name and `email`; pass `null` for none. |
973
+ | `items` | `MenuEntry[]` | `[]` | Extra items above Sign out, e.g. Profile, Settings or a Theme submenu. |
974
+ | `name` * | `string` | | Signed-in user's name or email. |
975
+ | `onOpenChange` | `((open: boolean, eventDetails: MenuRootChangeEventDetails) => void)` | | Event handler called when the menu is opened or closed. |
976
+ | `onSignOut` | `(() => void)` | | Adds a Sign out item when given. |
977
+ | `open` | `boolean` | | Whether the menu is currently open. |
978
+ | `popupProps` | `PartProps<MenuPopupProps>` | | Props for the popup (role `menu`), e.g. `{ 'data-testid': 'account-menu' }`. |
979
+ | `portalContainer` | `PortalContainerTarget` | | Where the menu renders. Defaults to the nearest `PortalContainer`, else `document.body`. |
980
+ | `showName` | `boolean` | `false` | Show the name next to the avatar (e.g. in an expanded NavRail). |
981
+ | `side` | `Side` | `right` | |
982
+ | `signOutLabel` | `string` | `Sign out` | |
983
+ | `signOutProps` | `MenuItemElementProps` | | Props for the Sign out item, e.g. `{ 'data-testid': 'sign-out' }`. |
984
+ | `triggerProps` | `(ClassAttributes<HTMLButtonElement> & ButtonHTMLAttributes<HTMLButtonElement> & { [data: `data-${string}`]: string; })` | | Props for the trigger button, e.g. `aria-label` or `data-testid`. |
985
+
986
+ ## Theme and text size
987
+
988
+ Functions and hooks exported from `@15gifts/back-office-kit` (no provider needed).
989
+
990
+ - `FONT_SIZES`: Global text size. `md` (default) gives 14px body text, as in the original Back Office; `sm` and `lg` are about 6% smaller and larger. Everything in the library scales with it.
991
+ - `FONT_SIZE_STORAGE_KEY`: localStorage key used to remember the user's choice.
992
+ - `getFontSize(): FontSize`: The active size, read from `<html data-font-size>`. Defaults to `md`.
993
+ - `setFontSize(size: FontSize, { persist = true } = {})`: Sets `<html data-font-size>` and remembers the choice (unless `persist` is false).
994
+ - `applyStoredFontSize(fallback: FontSize = 'md')`: Applies the saved size. Call once before the first render, next to `applyStoredTheme`.
995
+ - `useFontSize(): readonly [FontSize, (next: FontSize) => void]`: React hook over `getFontSize`/`setFontSize`. No provider needed.
996
+ - `THEME_STORAGE_KEY`: localStorage key used to remember the user's choice.
997
+ - `getTheme(): Theme`: The active theme, read from `<html data-theme>`. Defaults to `system`.
998
+ - `getColorScheme(theme: Theme = getTheme()): ColorScheme`: Whether the page currently renders light or dark. Use it to drive libraries with their own dark mode.
999
+ - `setTheme(theme: Theme, { persist = true } = {})`: Sets `<html data-theme>` and remembers the choice (unless `persist` is false).
1000
+ - `applyStoredTheme(options: Theme | ApplyStoredThemeOptions = {})`: Applies the saved theme. Call once before the first render to avoid a flash of the wrong theme.
1001
+ - `useTheme(): readonly [Theme, (next: Theme) => void]`: React hook over `getTheme`/`setTheme`. No provider needed.
1002
+ - `useColorScheme(): ColorScheme`: The resolved `light`/`dark` scheme, updating on theme changes and OS changes.
1003
+
1004
+ ## Supporting types
1005
+
1006
+ Also exported from `@15gifts/back-office-kit`.
1007
+
1008
+ ```ts
1009
+ export type AlertTone = 'info' | 'success' | 'warning' | 'danger'
1010
+
1011
+ export type BadgeTone =
1012
+ 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info' | 'highlight'
1013
+
1014
+ export interface BreadcrumbItem {
1015
+ label: ReactNode
1016
+ href?: string
1017
+ /** Router link element, e.g. `<Link to="/customers" />`. */
1018
+ render?: ReactElement
1019
+ /**
1020
+ * Marks the item as the current page: a plain `<span aria-current="page">`, never a link.
1021
+ * Defaults to `true` for the last item. Set `false` to keep the last item interactive, e.g. a
1022
+ * link, or a switcher button passed as `label`.
1023
+ */
1024
+ current?: boolean
1025
+ /** Props for the crumb's link or text element, e.g. `{ 'data-testid': 'crumb-customer' }`. */
1026
+ itemProps?: HTMLAttributes<HTMLElement> & DataAttributes
1027
+ }
1028
+
1029
+ export type ChatRole = 'user' | 'assistant' | 'system'
1030
+
1031
+ export interface ChatTranscriptLabels {
1032
+ user?: string
1033
+ assistant?: string
1034
+ }
1035
+
1036
+ export interface ChatMessage {
1037
+ id: string
1038
+ role: ChatRole
1039
+ /** Text, markdown output, product cards, buttons… */
1040
+ content: ReactNode
1041
+ /** Shown in the muted line under the bubble (or inline for `system`). */
1042
+ timestamp?: ReactNode
1043
+ /** Extra muted details, e.g. a turn ID in `<code>`. */
1044
+ meta?: ReactNode
1045
+ /** Per-message controls, shown on hover or focus. Ignored for `system`. */
1046
+ actions?: ReactNode
1047
+ /** Props for the message element, e.g. `{ 'data-testid': 'turn-3' }`. */
1048
+ messageProps?: Omit<ComponentProps<'div'>, 'role'> & DataAttributes
1049
+ }
1050
+
1051
+ export interface ComboboxOption {
1052
+ value: string
1053
+ label: string
1054
+ disabled?: boolean
1055
+ }
1056
+
1057
+ export interface DescriptionListItem {
1058
+ term: ReactNode
1059
+ description: ReactNode
1060
+ /** Show the description in the mono font, e.g. for IDs and codes. */
1061
+ mono?: boolean
1062
+ }
1063
+
1064
+ export type RequiredIndicator = 'asterisk' | 'optional-note' | 'none'
1065
+
1066
+ export type DataAttributes = { [key: `data-${string}`]: string | number | boolean | undefined }
1067
+
1068
+ export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6
1069
+
1070
+ export type HeadingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
1071
+
1072
+ export type IconSize = keyof typeof sizes | `${number}${'em' | 'rem'}` | 12 | 14 | 16 | 20 | 24
1073
+
1074
+ export interface MenuItem {
1075
+ type?: 'item'
1076
+ label: ReactNode
1077
+ onClick?: () => void
1078
+ /** A decorative icon shown before the label. */
1079
+ icon?: ReactNode
1080
+ /** Styled in the danger colour, e.g. Delete. */
1081
+ destructive?: boolean
1082
+ disabled?: boolean
1083
+ /** Renders a link. */
1084
+ href?: string
1085
+ /** Renders a link through your router's link component. */
1086
+ render?: ReactElement
1087
+ /** Defaults to the item's index. */
1088
+ key?: string
1089
+ itemProps?: MenuItemElementProps
1090
+ }
1091
+
1092
+ export interface MenuSubmenu {
1093
+ type?: 'submenu'
1094
+ label: ReactNode
1095
+ icon?: ReactNode
1096
+ items: MenuEntry[]
1097
+ disabled?: boolean
1098
+ key?: string
1099
+ /** Props for the item that opens the submenu. */
1100
+ itemProps?: MenuItemElementProps
1101
+ /** Props for the submenu's popup (role `menu`). */
1102
+ popupProps?: PartProps<BaseMenu.Popup.Props>
1103
+ }
1104
+
1105
+ export interface MenuRadioGroup {
1106
+ type: 'radio'
1107
+ /** A visible label above the options. */
1108
+ label?: ReactNode
1109
+ value: string
1110
+ onValueChange: (value: string) => void
1111
+ options: Array<{
1112
+ value: string
1113
+ label: ReactNode
1114
+ disabled?: boolean
1115
+ itemProps?: MenuItemElementProps
1116
+ }>
1117
+ key?: string
1118
+ }
1119
+
1120
+ export interface MenuCheckboxItem {
1121
+ type: 'checkbox'
1122
+ label: ReactNode
1123
+ checked: boolean
1124
+ onCheckedChange: (checked: boolean) => void
1125
+ icon?: ReactNode
1126
+ disabled?: boolean
1127
+ key?: string
1128
+ itemProps?: MenuItemElementProps
1129
+ }
1130
+
1131
+ export interface MenuGroupLabel {
1132
+ type: 'label'
1133
+ label: ReactNode
1134
+ key?: string
1135
+ }
1136
+
1137
+ export type MenuEntry =
1138
+ MenuItem | MenuSubmenu | MenuRadioGroup | MenuCheckboxItem | MenuGroupLabel | 'separator'
1139
+
1140
+ export type MetricBarSegmentTone = 'success' | 'neutral' | 'danger' | 'highlight'
1141
+
1142
+ export interface MetricBarSegment {
1143
+ /** Percentage of the bar's width (0 to 100). */
1144
+ value: number
1145
+ tone: MetricBarSegmentTone
1146
+ }
1147
+
1148
+ export interface NavRailItem {
1149
+ label: string
1150
+ /** Icon element, e.g. `<Settings size="1.43em" aria-hidden />` (em keeps it scaling with text). */
1151
+ icon: ReactNode
1152
+ href?: string
1153
+ /** Router link element, e.g. `<Link to="/settings" />`. Takes precedence over `href`. */
1154
+ render?: ReactElement
1155
+ active?: boolean
1156
+ /** Props for the item's link, e.g. `{ 'data-testid': 'nav-settings' }`. */
1157
+ itemProps?: ComponentProps<'a'> & DataAttributes
1158
+ }
1159
+
1160
+ export type PortalContainerTarget =
1161
+ HTMLElement | ShadowRoot | RefObject<HTMLElement | ShadowRoot | null> | null
1162
+
1163
+ export interface RadioCardOption {
1164
+ value: string
1165
+ label: ReactNode
1166
+ description?: ReactNode
1167
+ disabled?: boolean
1168
+ }
1169
+
1170
+ export interface SelectOption {
1171
+ value: string
1172
+ label: string
1173
+ disabled?: boolean
1174
+ }
1175
+
1176
+ export type Status = 'queued' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled'
1177
+
1178
+ export interface SwitcherItem {
1179
+ /** Unique ID, e.g. a customer ID or branch name. Also matched by the filter. */
1180
+ value: string
1181
+ label: string
1182
+ /** Secondary text under the label, e.g. an ID. */
1183
+ description?: string
1184
+ /** Leading visual, e.g. an `<Avatar size="sm" />` or a logo. Hidden from assistive tech, as the label names the row. */
1185
+ visual?: ReactNode
1186
+ /** Trailing content, e.g. `<Badge>main</Badge>`. */
1187
+ badge?: ReactNode
1188
+ /** Extra words the filter matches. */
1189
+ keywords?: string[]
1190
+ disabled?: boolean
1191
+ /** Render the row as a link, e.g. `render={<a href="/customer/o2" />}` or a router `<Link />`. */
1192
+ render?: ReactElement
1193
+ /** Props for the row (role `option`), e.g. `{ 'data-testid': 'customer-o2' }`. */
1194
+ itemProps?: PartProps<BaseCombobox.Item.Props>
1195
+ }
1196
+
1197
+ export interface SwitcherFooter {
1198
+ label: ReactNode
1199
+ /** e.g. `<a href="/customers" />` or a router `<Link to="/customers" />`. */
1200
+ render?: ButtonProps['render']
1201
+ onClick?: () => void
1202
+ }
1203
+
1204
+ export interface TableColumn<Row> {
1205
+ key: string
1206
+ header: ReactNode
1207
+ align?: Align
1208
+ width?: CSSProperties['width']
1209
+ /** Defaults to `row[key]`. */
1210
+ render?: (row: Row) => ReactNode
1211
+ }
1212
+
1213
+ export interface TabItem {
1214
+ value: string
1215
+ label: ReactNode
1216
+ count?: ReactNode
1217
+ content: ReactNode
1218
+ disabled?: boolean
1219
+ /** Keeps this panel in the DOM (hidden) while another tab is active. Overrides the `Tabs` prop. */
1220
+ keepMounted?: boolean
1221
+ /** Props for the tab (role `tab`), e.g. `{ 'data-testid': 'tab-config' }`. */
1222
+ tabProps?: PartProps<BaseTabs.Tab.Props>
1223
+ /** Props for the panel (role `tabpanel`). */
1224
+ panelProps?: PartProps<BaseTabs.Panel.Props>
1225
+ }
1226
+
1227
+ export interface ThemeOption {
1228
+ value: Theme
1229
+ label: string
1230
+ /** Palettes drawn in the preview. Two are drawn side by side (e.g. system = light + dark). */
1231
+ palettes: ('light' | 'dark' | 'sand')[]
1232
+ }
1233
+
1234
+ export interface ToggleGroupOption {
1235
+ value: string
1236
+ label: string
1237
+ disabled?: boolean
1238
+ }
1239
+ ```