@slashsuite/ui-react 0.12.1 → 0.13.1

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 (385) hide show
  1. package/MIGRATING.md +386 -8
  2. package/README.md +89 -44
  3. package/agent-docs/components/app-shell.md +9 -6
  4. package/agent-docs/components/article-layout.md +140 -0
  5. package/agent-docs/components/audio.md +42 -0
  6. package/agent-docs/components/badge.md +2 -1
  7. package/agent-docs/components/body-text.md +26 -15
  8. package/agent-docs/components/bottom-sheet.md +27 -17
  9. package/agent-docs/components/breadcrumbs.md +10 -6
  10. package/agent-docs/components/button.md +2 -2
  11. package/agent-docs/components/call-to-action.md +59 -0
  12. package/agent-docs/components/callout.md +4 -3
  13. package/agent-docs/components/card-grid.md +15 -7
  14. package/agent-docs/components/card.md +33 -18
  15. package/agent-docs/components/cart-button.md +63 -0
  16. package/agent-docs/components/chat-composer.md +4 -3
  17. package/agent-docs/components/checkbox.md +11 -5
  18. package/agent-docs/components/cluster.md +10 -8
  19. package/agent-docs/components/code-example.md +2 -2
  20. package/agent-docs/components/code.md +7 -5
  21. package/agent-docs/components/colour-scheme-toggle.md +12 -6
  22. package/agent-docs/components/colour-swatch.md +41 -0
  23. package/agent-docs/components/combobox.md +88 -0
  24. package/agent-docs/components/confirm-dialog.md +98 -0
  25. package/agent-docs/components/container.md +2 -1
  26. package/agent-docs/components/copy-button.md +7 -5
  27. package/agent-docs/components/copy-line.md +6 -5
  28. package/agent-docs/components/date-field.md +14 -11
  29. package/agent-docs/components/date-range-picker.md +16 -9
  30. package/agent-docs/components/date-time-field.md +73 -0
  31. package/agent-docs/components/dialog.md +22 -68
  32. package/agent-docs/components/disclosure.md +4 -0
  33. package/agent-docs/components/docs-layout.md +10 -6
  34. package/agent-docs/components/drawer.md +13 -4
  35. package/agent-docs/components/embed-frame.md +48 -0
  36. package/agent-docs/components/empty-state.md +4 -1
  37. package/agent-docs/components/field-dialog.md +6 -5
  38. package/agent-docs/components/field.md +10 -7
  39. package/agent-docs/components/fieldset.md +4 -4
  40. package/agent-docs/components/flow-diagram.md +87 -0
  41. package/agent-docs/components/form-layout.md +4 -1
  42. package/agent-docs/components/form-row.md +7 -7
  43. package/agent-docs/components/full-bleed-layout.md +0 -2
  44. package/agent-docs/components/headings.md +13 -7
  45. package/agent-docs/components/hero.md +11 -2
  46. package/agent-docs/components/icon-button.md +1 -3
  47. package/agent-docs/components/icon.md +6 -13
  48. package/agent-docs/components/image.md +24 -14
  49. package/agent-docs/components/input.md +8 -7
  50. package/agent-docs/components/key-value-list.md +4 -1
  51. package/agent-docs/components/lightbox.md +1 -1
  52. package/agent-docs/components/list-layout.md +5 -7
  53. package/agent-docs/components/list-row.md +37 -34
  54. package/agent-docs/components/loading.md +2 -2
  55. package/agent-docs/components/markdown.md +13 -13
  56. package/agent-docs/components/media-tile.md +8 -4
  57. package/agent-docs/components/menu.md +19 -12
  58. package/agent-docs/components/meta-list.md +2 -2
  59. package/agent-docs/components/morph.md +11 -5
  60. package/agent-docs/components/navigation-progress.md +2 -2
  61. package/agent-docs/components/number-field.md +75 -0
  62. package/agent-docs/components/outline-region.md +19 -8
  63. package/agent-docs/components/page-fade.md +2 -1
  64. package/agent-docs/components/pill.md +7 -6
  65. package/agent-docs/components/popover.md +63 -0
  66. package/agent-docs/components/price.md +49 -0
  67. package/agent-docs/components/product-tile.md +78 -0
  68. package/agent-docs/components/promo-banner.md +46 -0
  69. package/agent-docs/components/prose-layout.md +1 -1
  70. package/agent-docs/components/radio-group.md +9 -6
  71. package/agent-docs/components/scroll-strip.md +3 -3
  72. package/agent-docs/components/segmented-control.md +4 -2
  73. package/agent-docs/components/select.md +8 -3
  74. package/agent-docs/components/show.md +2 -2
  75. package/agent-docs/components/side-column.md +13 -9
  76. package/agent-docs/components/sidebar-layout.md +1 -1
  77. package/agent-docs/components/site-footer.md +4 -4
  78. package/agent-docs/components/site-search.md +21 -9
  79. package/agent-docs/components/slider.md +59 -0
  80. package/agent-docs/components/sortable-list.md +15 -10
  81. package/agent-docs/components/stack.md +3 -3
  82. package/agent-docs/components/stacked-bar.md +7 -4
  83. package/agent-docs/components/state-machine.md +95 -0
  84. package/agent-docs/components/status-pages.md +13 -6
  85. package/agent-docs/components/stepper.md +54 -0
  86. package/agent-docs/components/switch.md +4 -4
  87. package/agent-docs/components/table-of-contents.md +78 -0
  88. package/agent-docs/components/table.md +35 -24
  89. package/agent-docs/components/tabs.md +24 -26
  90. package/agent-docs/components/text-link.md +12 -7
  91. package/agent-docs/components/textarea.md +4 -2
  92. package/agent-docs/components/toast.md +19 -14
  93. package/agent-docs/components/video.md +7 -2
  94. package/agent-docs/llms.txt +22 -3
  95. package/dist/AppShell.d.ts +25 -9
  96. package/dist/AppShell.js +67 -33
  97. package/dist/AppShellMenu.d.ts +31 -18
  98. package/dist/AppShellMenu.js +72 -45
  99. package/dist/ArticleLayout.d.ts +36 -0
  100. package/dist/ArticleLayout.js +27 -0
  101. package/dist/Audio.d.ts +16 -0
  102. package/dist/Audio.js +11 -0
  103. package/dist/Badge.d.ts +2 -1
  104. package/dist/Badge.js +3 -2
  105. package/dist/BottomSheet.d.ts +17 -6
  106. package/dist/BottomSheet.js +62 -11
  107. package/dist/Breadcrumbs.d.ts +8 -6
  108. package/dist/Breadcrumbs.js +17 -7
  109. package/dist/Button.d.ts +4 -2
  110. package/dist/Button.js +9 -87
  111. package/dist/CallToAction.d.ts +25 -0
  112. package/dist/CallToAction.js +17 -0
  113. package/dist/Callout.d.ts +2 -2
  114. package/dist/Callout.js +2 -2
  115. package/dist/Card.d.ts +88 -31
  116. package/dist/Card.js +55 -92
  117. package/dist/CardBody.d.ts +2 -0
  118. package/dist/CardBody.js +33 -3
  119. package/dist/CardGrid.d.ts +32 -4
  120. package/dist/CardGrid.js +42 -8
  121. package/dist/CardParts.d.ts +7 -1
  122. package/dist/CardParts.js +7 -2
  123. package/dist/CartButton.d.ts +33 -0
  124. package/dist/CartButton.js +18 -0
  125. package/dist/ChatComposer.d.ts +10 -4
  126. package/dist/ChatComposer.js +35 -13
  127. package/dist/Checkbox.d.ts +21 -3
  128. package/dist/Checkbox.js +66 -20
  129. package/dist/Chevron.js +1 -1
  130. package/dist/Cluster.d.ts +28 -15
  131. package/dist/Cluster.js +21 -4
  132. package/dist/Code.d.ts +15 -3
  133. package/dist/Code.js +23 -3
  134. package/dist/CodeBlock.d.ts +4 -4
  135. package/dist/CodeBlock.js +2 -2
  136. package/dist/CodeBody.d.ts +1 -1
  137. package/dist/CodeBody.js +4 -10
  138. package/dist/CodeExample.d.ts +1 -1
  139. package/dist/CodeExample.js +3 -2
  140. package/dist/ColourSchemeToggle.d.ts +21 -5
  141. package/dist/ColourSchemeToggle.js +15 -9
  142. package/dist/ColourSwatch.d.ts +15 -0
  143. package/dist/ColourSwatch.js +14 -0
  144. package/dist/Combobox.d.ts +42 -0
  145. package/dist/Combobox.js +43 -0
  146. package/dist/ConfirmDialog.d.ts +40 -0
  147. package/dist/ConfirmDialog.js +36 -0
  148. package/dist/Container.d.ts +3 -3
  149. package/dist/Container.js +1 -1
  150. package/dist/CopyButton.d.ts +8 -2
  151. package/dist/CopyButton.js +38 -28
  152. package/dist/CopyLine.d.ts +4 -2
  153. package/dist/CopyLine.js +4 -4
  154. package/dist/DateCalendar.d.ts +2 -0
  155. package/dist/DateCalendar.js +11 -9
  156. package/dist/DateField.d.ts +52 -21
  157. package/dist/DateField.js +73 -37
  158. package/dist/DateFieldCalendar.d.ts +12 -8
  159. package/dist/DateFieldCalendar.js +37 -18
  160. package/dist/DateRangePicker.d.ts +23 -3
  161. package/dist/DateRangePicker.js +10 -8
  162. package/dist/DateTimeField.d.ts +31 -0
  163. package/dist/DateTimeField.js +19 -0
  164. package/dist/Dialog.d.ts +42 -6
  165. package/dist/Dialog.js +50 -12
  166. package/dist/Disclosure.js +9 -1
  167. package/dist/DocsLayout.d.ts +13 -5
  168. package/dist/DocsLayout.js +11 -9
  169. package/dist/Drawer.d.ts +22 -7
  170. package/dist/Drawer.js +89 -8
  171. package/dist/EmbedFrame.d.ts +36 -0
  172. package/dist/EmbedFrame.js +18 -0
  173. package/dist/Field.d.ts +41 -4
  174. package/dist/Field.js +61 -25
  175. package/dist/FieldDialog.d.ts +8 -3
  176. package/dist/FieldDialog.js +19 -9
  177. package/dist/Fieldset.d.ts +3 -3
  178. package/dist/Fieldset.js +7 -9
  179. package/dist/FileDrop.js +2 -1
  180. package/dist/FlowDiagram.d.ts +92 -0
  181. package/dist/FlowDiagram.js +100 -0
  182. package/dist/FormRow.d.ts +6 -4
  183. package/dist/FormRow.js +11 -9
  184. package/dist/Hero.d.ts +30 -7
  185. package/dist/Hero.js +23 -9
  186. package/dist/Icon.d.ts +1 -1
  187. package/dist/Icon.js +1 -1
  188. package/dist/IconButton.js +1 -1
  189. package/dist/Image.d.ts +33 -9
  190. package/dist/Image.js +61 -16
  191. package/dist/Input.d.ts +1 -1
  192. package/dist/Input.js +4 -4
  193. package/dist/InputShell.d.ts +7 -0
  194. package/dist/InputShell.js +18 -3
  195. package/dist/KeyValueList.d.ts +2 -2
  196. package/dist/Lightbox.js +5 -3
  197. package/dist/ListRow.d.ts +4 -5
  198. package/dist/ListRow.js +36 -26
  199. package/dist/Mark.d.ts +10 -0
  200. package/dist/Mark.js +9 -0
  201. package/dist/Markdown.d.ts +18 -4
  202. package/dist/Markdown.js +176 -37
  203. package/dist/MediaTile.d.ts +9 -3
  204. package/dist/MediaTile.js +8 -4
  205. package/dist/Menu.d.ts +19 -8
  206. package/dist/Menu.js +13 -11
  207. package/dist/MetaList.d.ts +4 -3
  208. package/dist/MetaList.js +12 -4
  209. package/dist/Morph.d.ts +15 -1
  210. package/dist/Morph.js +70 -22
  211. package/dist/NavigationProgress.d.ts +2 -2
  212. package/dist/NavigationProgress.js +7 -5
  213. package/dist/NumberField.d.ts +66 -0
  214. package/dist/NumberField.js +68 -0
  215. package/dist/OutlineRegion.d.ts +41 -10
  216. package/dist/OutlineRegion.js +31 -6
  217. package/dist/PageFade.d.ts +9 -5
  218. package/dist/PageFade.js +39 -8
  219. package/dist/PageLayouts.d.ts +15 -5
  220. package/dist/PageLayouts.js +3 -3
  221. package/dist/Pill.d.ts +9 -4
  222. package/dist/Pill.js +15 -6
  223. package/dist/Popover.d.ts +31 -0
  224. package/dist/Popover.js +43 -0
  225. package/dist/Price.d.ts +21 -0
  226. package/dist/Price.js +34 -0
  227. package/dist/ProductTile.d.ts +36 -0
  228. package/dist/ProductTile.js +31 -0
  229. package/dist/ProgressBar.js +4 -2
  230. package/dist/PromoBanner.d.ts +25 -0
  231. package/dist/PromoBanner.js +16 -0
  232. package/dist/RadioGroup.d.ts +18 -8
  233. package/dist/RadioGroup.js +42 -18
  234. package/dist/ScrollStrip.d.ts +1 -1
  235. package/dist/ScrollStrip.js +1 -1
  236. package/dist/SearchInput.d.ts +17 -2
  237. package/dist/SearchInput.js +72 -13
  238. package/dist/SegmentedField.d.ts +15 -0
  239. package/dist/SegmentedField.js +15 -0
  240. package/dist/Select.js +5 -4
  241. package/dist/Show.d.ts +1 -1
  242. package/dist/Show.js +1 -1
  243. package/dist/SideColumn.d.ts +42 -15
  244. package/dist/SideColumn.js +45 -19
  245. package/dist/SiteFooter.d.ts +3 -3
  246. package/dist/SiteFooter.js +4 -3
  247. package/dist/SiteSearch.d.ts +57 -27
  248. package/dist/SiteSearch.js +13 -93
  249. package/dist/Slider.d.ts +27 -0
  250. package/dist/Slider.js +58 -0
  251. package/dist/SortableList.d.ts +19 -35
  252. package/dist/SortableList.js +36 -88
  253. package/dist/Stack.d.ts +4 -4
  254. package/dist/StackedBar.d.ts +13 -4
  255. package/dist/StackedBar.js +12 -7
  256. package/dist/StateMachine.d.ts +65 -0
  257. package/dist/StateMachine.js +116 -0
  258. package/dist/StatusPages.d.ts +28 -10
  259. package/dist/StatusPages.js +10 -10
  260. package/dist/Stepper.d.ts +21 -0
  261. package/dist/Stepper.js +33 -0
  262. package/dist/Steps.js +4 -3
  263. package/dist/Switch.d.ts +3 -3
  264. package/dist/Switch.js +18 -14
  265. package/dist/Table.d.ts +32 -9
  266. package/dist/Table.js +50 -20
  267. package/dist/TableCells.d.ts +24 -21
  268. package/dist/TableCells.js +68 -27
  269. package/dist/TableEditCell.d.ts +1 -1
  270. package/dist/TableOfContents.d.ts +34 -0
  271. package/dist/TableOfContents.js +23 -0
  272. package/dist/Tabs.d.ts +31 -16
  273. package/dist/Tabs.js +97 -22
  274. package/dist/TextLink.d.ts +18 -5
  275. package/dist/TextLink.js +19 -6
  276. package/dist/Textarea.d.ts +12 -1
  277. package/dist/Textarea.js +15 -2
  278. package/dist/ToastRegion.d.ts +17 -9
  279. package/dist/ToastRegion.js +70 -13
  280. package/dist/Tooltip.d.ts +10 -2
  281. package/dist/Tooltip.js +32 -11
  282. package/dist/Video.d.ts +19 -4
  283. package/dist/Video.js +15 -5
  284. package/dist/cardContext.d.ts +7 -0
  285. package/dist/cardContext.js +14 -0
  286. package/dist/cardControl.d.ts +15 -0
  287. package/dist/cardControl.js +32 -0
  288. package/dist/cardForm.d.ts +39 -0
  289. package/dist/cardForm.js +81 -0
  290. package/dist/cardWait.js +2 -1
  291. package/dist/colourScheme.d.ts +12 -2
  292. package/dist/colourScheme.js +32 -6
  293. package/dist/control.d.ts +30 -8
  294. package/dist/control.js +74 -7
  295. package/dist/copyScript.d.ts +7 -8
  296. package/dist/copyScript.js +8 -9
  297. package/dist/core/button.d.ts +33 -0
  298. package/dist/core/button.js +89 -0
  299. package/dist/core/control.d.ts +15 -0
  300. package/dist/core/control.js +14 -0
  301. package/dist/core/fixtures/button.d.ts +26 -0
  302. package/dist/core/fixtures/button.js +52 -0
  303. package/dist/core/fixtures/types.d.ts +13 -0
  304. package/dist/core/fixtures/types.js +10 -0
  305. package/dist/core/focus.d.ts +7 -0
  306. package/dist/core/focus.js +7 -0
  307. package/dist/core/index.d.ts +12 -0
  308. package/dist/core/index.js +12 -0
  309. package/dist/core/parity.d.ts +22 -0
  310. package/dist/core/parity.js +53 -0
  311. package/dist/core/themeNative.d.ts +62 -0
  312. package/dist/core/themeNative.js +290 -0
  313. package/dist/cx.d.ts +17 -5
  314. package/dist/cx.js +18 -5
  315. package/dist/dateLocale.d.ts +17 -0
  316. package/dist/dateLocale.js +30 -0
  317. package/dist/density.d.ts +17 -3
  318. package/dist/density.js +30 -19
  319. package/dist/emptySlot.d.ts +1 -0
  320. package/dist/fieldAnnounce.d.ts +11 -0
  321. package/dist/fieldAnnounce.js +36 -0
  322. package/dist/fieldControl.d.ts +7 -2
  323. package/dist/fieldControl.js +6 -2
  324. package/dist/fieldWait.d.ts +3 -3
  325. package/dist/fieldWait.js +3 -4
  326. package/dist/flowLayout.d.ts +68 -0
  327. package/dist/flowLayout.js +105 -0
  328. package/dist/focus.d.ts +2 -0
  329. package/dist/focus.js +9 -0
  330. package/dist/fromXState.d.ts +73 -0
  331. package/dist/fromXState.js +110 -0
  332. package/dist/icons.d.ts +1 -1
  333. package/dist/icons.js +15 -0
  334. package/dist/index.d.ts +37 -11
  335. package/dist/index.js +24 -2
  336. package/dist/isoDate.d.ts +8 -1
  337. package/dist/isoDate.js +20 -1
  338. package/dist/labelWords.d.ts +16 -7
  339. package/dist/labelWords.js +14 -12
  340. package/dist/listRowProps.d.ts +17 -15
  341. package/dist/modal.d.ts +5 -0
  342. package/dist/modal.js +21 -1
  343. package/dist/navFold.js +6 -3
  344. package/dist/optionCard.d.ts +18 -0
  345. package/dist/optionCard.js +16 -0
  346. package/dist/scrollBody.d.ts +16 -0
  347. package/dist/scrollBody.js +15 -0
  348. package/dist/scrollEdges.d.ts +7 -0
  349. package/dist/scrollEdges.js +39 -5
  350. package/dist/scrollStop.d.ts +6 -2
  351. package/dist/scrollStop.js +24 -8
  352. package/dist/shownDate.d.ts +28 -10
  353. package/dist/shownDate.js +41 -22
  354. package/dist/siteSearchBody.d.ts +34 -0
  355. package/dist/siteSearchBody.js +117 -0
  356. package/dist/size.d.ts +7 -1
  357. package/dist/sortableDrop.d.ts +44 -0
  358. package/dist/sortableDrop.js +78 -0
  359. package/dist/sortableSlide.d.ts +9 -0
  360. package/dist/sortableSlide.js +70 -0
  361. package/dist/sortableTitle.d.ts +10 -0
  362. package/dist/sortableTitle.js +48 -0
  363. package/dist/stateMachineDots.d.ts +77 -0
  364. package/dist/stateMachineDots.js +188 -0
  365. package/dist/stickyColumn.d.ts +2 -2
  366. package/dist/stickyColumn.js +2 -2
  367. package/dist/switcher.d.ts +10 -5
  368. package/dist/switcher.js +7 -5
  369. package/dist/tableColumns.d.ts +17 -0
  370. package/dist/tableColumns.js +30 -2
  371. package/dist/tableEmpty.js +5 -5
  372. package/dist/tableRow.d.ts +26 -2
  373. package/dist/tableRow.js +23 -1
  374. package/dist/tableSort.d.ts +10 -5
  375. package/dist/tableSort.js +15 -4
  376. package/dist/target.d.ts +12 -0
  377. package/dist/target.js +12 -0
  378. package/dist/textBox.js +1 -1
  379. package/dist/truncated.d.ts +31 -0
  380. package/dist/truncated.js +51 -0
  381. package/dist/typography.d.ts +19 -11
  382. package/dist/typography.js +11 -13
  383. package/dist/useFlowLayout.d.ts +38 -0
  384. package/dist/useFlowLayout.js +122 -0
  385. package/package.json +5 -3
@@ -8,7 +8,6 @@ When to use: A viewer that needs the whole width, such as a snapshot, a canvas o
8
8
  A viewer that needs the whole width (a snapshot, a canvas, a player) fills it, with the facts in the `aside`.
9
9
  ```tsx
10
10
  import {
11
- Button,
12
11
  FullBleedLayout,
13
12
  KeyValue,
14
13
  KeyValueList,
@@ -36,7 +35,6 @@ A whole viewer page: the shell with `bleed`, then the layout with the viewer in
36
35
  ```tsx
37
36
  import {
38
37
  AppShell,
39
- Button,
40
38
  EmptyState,
41
39
  FullBleedLayout,
42
40
  KeyValue,
@@ -26,7 +26,7 @@ import {
26
26
  ### Do
27
27
  - A page has one title: `PageHeading` for an app page, `Display` for the headline of a public page. A `PageHeader` already draws the `PageHeading` and its `description`, so use it for the top of a page.
28
28
  - Name the parts of a page with `SectionHeading`; `rule` puts the hairline under it, with the space either side built in.
29
- - Name what is inside a part with `SubsectionHeading`: `size` `sm` is a form-group caption, `md` (default) a card title in a header bar, `lg` a drawer title. `truncate` cuts one that is too long for its column to a single line.
29
+ - Name what is inside a part with `SubsectionHeading`: `size` `sm` is a form-group caption, `md` (default) a card title in a header bar, `lg` a drawer title. `lines={1}` cuts one that is too long for its column to a single line.
30
30
  - Put a `Lead` under a `Display`, and a `Text` under any other heading. `Dialog` and `Drawer` draw their own title from their `title`.
31
31
  - Pick the heading for its place in the outline, never for its size. `Display` is not a big `SectionHeading`.
32
32
  - Each heading has its own fixed ink and takes no colour. A heading's meaning is carried by its words, not a colour.
@@ -66,36 +66,42 @@ import { Display, PageHeading, Stack, Text } from "@slashsuite/ui-react";
66
66
  ### Props
67
67
  ### Display
68
68
  Marketing-scale headline: the one line at the top of a public page. `h1`, text-4xl/tight semibold, primary text, growing to text-6xl on wider screens. `PageHeading` is the title of an ordinary page, a step below; a brochure hero needs a display scale, so it gets its own pinned role rather than callers overriding PageHeading's size.
69
- - as: ElementType. The element to render (each role has a semantic default); the other props follow it.
69
+ - as: ElementType. The element to render; each role has a semantic default.
70
+ - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
70
71
  - loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
71
72
  Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
72
73
  - loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
73
74
 
74
75
  ### PageHeading
75
76
  Page title. `h1`, text-3xl/9 bold (text-4xl/10 from `sm`), tight, primary text: well above the `Lead` under it and the body text after it, so the page's title reads first.
76
- - as: ElementType. The element to render (each role has a semantic default); the other props follow it.
77
+ - as: ElementType. The element to render; each role has a semantic default.
78
+ - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
77
79
  - loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
78
80
  Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
79
81
  - loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
80
82
 
81
83
  ### SectionHeading
82
84
  Top-level section header. `h2`, text-xl/7 semibold, primary text (text-base/6 under an `AppShell density="compact"`, text-2xl/8 semibold tight inside a `Prose`). `rule` sets a hairline under it (the `Divider` line colour) with the space either side of the line built in. `description` is a muted line under the heading, outside the `<h2>`, so the heading's name stays the title; the rule then sits under the description.
83
- - as: ElementType. The element to render (each role has a semantic default); the other props follow it.
85
+ - as: ElementType. The element to render; each role has a semantic default.
84
86
  - description: ReactNode. A muted line under the heading that says more. It is a paragraph beside the heading, not part of its name.
87
+ - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
85
88
  - loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
86
89
  Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
87
90
  - loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
88
91
  - rule: boolean. A hairline under the heading, with the space either side of it built in.
89
92
 
90
93
  ### SubsectionHeading
91
- Nested header. `h3`, text-lg/7 semibold, primary text. `size` steps it down to `sm` (text-base, body size set apart by its weight) for a form-group caption or a dense card, or up to `lg` (text-xl) for a drawer title; `md` is the default. Under an `AppShell density="compact"` each is one step down. Inside a `Prose` `md` is text-xl/7 (the h3 of a doc), `sm` text-base/7 (the h4: body size, set apart by its weight) and `lg` text-2xl/8, the size of a `SectionHeading` there. `truncate` keeps it on one line and cuts it with an ellipsis where its container ends, the full text as the `title`.
92
- - as: ElementType. The element to render (each role has a semantic default); the other props follow it.
94
+ Nested header. `h3`, text-lg/7 semibold, primary text. `size` steps it down to `sm` (text-base, body size set apart by its weight) for a form-group caption or a dense card, or up to `lg` (text-xl) for a drawer title; `md` is the default. Under an `AppShell density="compact"` each is one step down. Inside a `Prose` `md` is text-xl/7 (the h3 of a doc), `sm` text-base/7 (the h4: body size, set apart by its weight) and `lg` text-2xl/8, the size of a `SectionHeading` there. `lines={1}` keeps it on one line and cuts it with an ellipsis where its container ends, the full text as the `title`.
95
+ - as: ElementType. The element to render; each role has a semantic default.
96
+ - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
97
+ - lines: 2 | 3 | 4 | 1. Show at most this many lines (1 to 4) and end in an ellipsis, as on `Text`: `1` cuts the
98
+ heading where its container ends. With plain-text content the full text becomes the `title`.
93
99
  - loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
94
100
  Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
95
101
  - loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
96
102
  - size: "sm" | "md" | "lg" (default md). The heading's type size: `sm` is text-base/6, `md` text-lg/7 and `lg` text-xl/7 (one step down
97
103
  each under an `AppShell density="compact"`).
98
- - truncate: boolean. One line, cut with an ellipsis where the container ends; the full text becomes the `title`.
99
104
 
100
105
  ### Types
106
+ - HeadingLevel: `2 | 3 | 4 | 5 | 6`. A heading level below the page's own `h1`.
101
107
  - SubsectionHeadingSize: `"sm" | "md" | "lg"`. A SubsectionHeading's type size: `sm` a form-group caption, `md` a card title, `lg` a drawer title.
@@ -17,8 +17,10 @@ import { Hero, Lead } from "@slashsuite/ui-react";
17
17
  ### Do
18
18
  - One `Hero` per page, and only on the landing page: it is the page's top block. Inner pages use `PageHeader`.
19
19
  - Pass `title` and, if it has one, `overline`; put a `Lead` in `children`, then the page's first actions in a `Cluster` if there are any: a primary `Button` and an `outline` or `ghost` one in the default tone, or a `TextLink`. That is the text the theme's contrast check holds over the glow.
20
- - The glow is always on and takes no prop. Its colours and its strength are the theme's, so a paper theme keeps it faint.
20
+ - The glow is always on. Its colours and its strength are the theme's, so a paper theme keeps it faint.
21
21
  - It caps itself at a reading measure at the parent's start edge, and the glow is clipped to it, so a phone never scrolls sideways. Put it as the first child of the page's `Stack`.
22
+ - A product page passes its picture as `media`: an `Image` at `width="full"`, beside the words from `md` up and under them on a phone.
23
+ - A landing page with no picture and one or two actions may set `align="center"`, with its actions' `Cluster` at `justify="center"`.
22
24
 
23
25
  ### Don't
24
26
  - Never build the block from an `Overline`, a `Display` and a `Lead` by hand: the hand-built one has no glow and drifts from the one top block.
@@ -49,11 +51,18 @@ import { Hero, Lead } from "@slashsuite/ui-react";
49
51
  - The title is the page's `<h1>`, in a `<header>` with the overline.
50
52
  - The glow is `aria-hidden="true"` and takes no pointer; the text sits above it and holds AA contrast over it in every theme.
51
53
  - The glow drifts only under `prefers-reduced-motion: no-preference`; with reduced motion it stands still. It is plain markup and CSS, so it renders on the server and needs no script.
54
+ - The drift never ends on its own, so a checkbox in the hero's top corner, named by `pauseLabel` (Pause the background motion), holds it still. It is a native checkbox, reached by Tab and toggled by Space, and is not drawn under reduced motion.
52
55
 
53
56
  ### Props
54
57
  ### Hero
55
- A landing page's top block: an overline, the display title (the page's `h1`) and the lede under it, over a soft glow of three tilted ribbons that drift slowly behind the text. The glow is always there and its colours and strength are the theme's (the palette's `glow` role), so a paper theme keeps it faint. It is anchored to the text's own column (`max-w-3xl`, at the parent's start edge), never the viewport, and clipped to it, so nothing scrolls sideways on a phone. It is `aria-hidden`, and the text sits above it. Under `prefers-reduced-motion: reduce` it stands still. Pure markup and one inline stylesheet: it works rendered on the server with no script. One per page, on a landing page; every other page opens with a `PageHeader`.
58
+ A landing page's top block: an overline, the display title (the page's `h1`) and the lede under it, over a soft glow of three tilted ribbons that drift slowly behind the text. The glow is always there and its colours and strength are the theme's (the palette's `glow` role), so a paper theme keeps it faint. It is anchored to the text's own column (`max-w-3xl`, at the parent's start edge, or in its middle with `align="center"`), never the viewport, and clipped to it, so nothing scrolls sideways on a phone. It is `aria-hidden`, and the text sits above it. `media` puts a picture beside the words from `md` up. A small checkbox in the top corner holds the drift still, since it never ends on its own; under `prefers-reduced-motion: reduce` the glow stands still and the checkbox is not drawn. Pure markup and one inline stylesheet: it works rendered on the server with no script. One per page, on a landing page; every other page opens with a `PageHeader`.
59
+ - align: "center" | "start" (default start). `center` sets the words in the middle of the page, under a centred glow: a landing page
60
+ with no picture whose actions are one or two buttons. Pass the actions' `Cluster`
61
+ `justify="center"` too.
56
62
  - children: ReactNode. What follows the title: a `Lead`, and the page's first actions if it has any.
57
63
  - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
64
+ - media: ReactNode. A picture beside the words from `md` up, and under them on a phone: an `Image` of the
65
+ product, at `width="full"`. The words keep the glow; the picture sits clear of it.
58
66
  - overline: ReactNode. The small label above the title, set in the monospace face.
67
+ - pauseLabel: string (default Pause the background motion). The name of the control that holds the glow still, for an app in another language.
59
68
  - title: ReactNode (required). The page's `h1`, at display size.
@@ -10,7 +10,6 @@ When to use: An action with a familiar icon and no room for a word: delete, sett
10
10
  import { IconButton } from "@slashsuite/ui-react";
11
11
 
12
12
  <IconButton label="Delete quote" tone="danger" variant="ghost" icon="close" />
13
-
14
13
  ```
15
14
 
16
15
  ### Do
@@ -58,7 +57,6 @@ A bare `disabled` drops it from the tab order and gives no reason.
58
57
  import { IconButton } from "@slashsuite/ui-react";
59
58
 
60
59
  <IconButton label="Delete quote" tone="danger" icon="close" disabled />
61
-
62
60
  ```
63
61
 
64
62
  ### Accessibility
@@ -77,7 +75,7 @@ Space do nothing) while it stays in the tab order, and the reason is its tooltip
77
75
  keyboard focus and a tap, read out as its description. The name stays `label`.
78
76
  - external: boolean. Opens in a new tab: adds `target="_blank"` and `rel="noreferrer"`.
79
77
  - href: string. Makes the button a link to this URL; an in-app path goes through the app's `LinkProvider`.
80
- - icon: "page" | "grid" | "search" | "table" | "type" | "diff" | "baseline" | "review" | "ci" | "self-host" | "privacy" | "capture" | "branch" | "theme" | "speed" | "chevron-right" | "chevron-down" | "close" | "external-link" | "settings" | "bell" | "check" | "plus" | "more" | "window" | "card" | "pointer" | "field" | "compass" | "briefcase" (required). The one icon it holds, from the `Icon` set, at the button's size.
78
+ - icon: "page" | "grid" | "search" | "alert" | "table" | "type" | "diff" | "baseline" | "review" | "ci" | "self-host" | "privacy" | "capture" | "branch" | "theme" | "speed" | "chevron-right" | "chevron-down" | "close" | "external-link" | "settings" | "bell" | "check" | "plus" | "minus" | "more" | "window" | "card" | "pointer" | "field" | "compass" | "briefcase" | "cart" | "pause" | "play" (required). The one icon it holds, from the `Icon` set, at the button's size.
81
79
  - label: string (required). The button's accessible name and its tooltip, shown on hover and on keyboard focus.
82
80
  - size: Size | ResponsiveSize (default md). The button's height, matching a `Button` or `Input` of the same size. Left out, it takes the
83
81
  size of the `Card`, `ListRow` or `Table` it sits in, else `md`. `{ base: "md", md: "lg" }`
@@ -21,7 +21,7 @@ import { Button, Icon } from "@slashsuite/ui-react";
21
21
  ```
22
22
 
23
23
  ### Do
24
- - `name` picks one of the library's icons, all on one grid and one stroke: `diff`, `baseline`, `review`, `ci`, `self-host`, `privacy`, `capture`, `branch`, `theme`, `speed`, `search`, `chevron-right`, `chevron-down`, `close`, `external-link`, `settings`, `bell`, `check`, `plus`, `more`, `grid`, `window`, `type`, `card`, `pointer`, `field`, `table`, `compass`, `page` and `briefcase`. Each is named for its idea or action, not a product. Prefer one to drawing your own.
24
+ - `name` picks one of the library's icons, all on one grid and one stroke: `diff`, `baseline`, `review`, `ci`, `self-host`, `privacy`, `capture`, `branch`, `theme`, `speed`, `search`, `chevron-right`, `chevron-down`, `close`, `external-link`, `settings`, `bell`, `check`, `alert`, `plus`, `minus`, `more`, `grid`, `window`, `type`, `card`, `pointer`, `field`, `table`, `compass`, `page`, `briefcase`, `cart`, `pause` and `play`. Each is named for its idea or action, not a product. Prefer one to drawing your own.
25
25
  - For a glyph the set lacks, put a bare `<svg>` (with a `viewBox`, no size or colour classes) in an `Icon`; it fills the box.
26
26
  - `size` is `sm` (14px), `md` (16px, the default), `lg` (20px) or `feature` (32px), for an icon that stands for an idea on its own. A feature card takes its icon through `Card`'s `icon`.
27
27
  - `tone` is a text tone: `neutral`, `muted`, `accent`, `info`, `positive`, `warn` or `danger`. Left out, the icon takes the colour of the text around it, so draw the glyph with `currentColor`.
@@ -33,14 +33,7 @@ A bare `<svg>` with its own size and colour is a one-off: each one picks its own
33
33
  import { Button } from "@slashsuite/ui-react";
34
34
 
35
35
  <Button variant="outline">
36
- <svg
37
- viewBox="0 0 20 20"
38
- fill="none"
39
- stroke="#5ec8ff"
40
- strokeWidth="1.6"
41
- width="18"
42
- height="18"
43
- >
36
+ <svg viewBox="0 0 20 20" fill="none" stroke="#5ec8ff" strokeWidth="1.6" width="18" height="18">
44
37
  <path d="M3 6.5h3l1.5-2h5L14 6.5h3v9H3Z" strokeLinejoin="round" />
45
38
  <circle cx="10" cy="11" r="2.75" />
46
39
  </svg>
@@ -54,13 +47,13 @@ import { Button } from "@slashsuite/ui-react";
54
47
 
55
48
  ### Props
56
49
  ### Icon
57
- One inline icon, sized to a fixed box (sm 14px, md 16px, lg 20px, `feature` 32px) and drawn in `currentColor`, so it takes the text colour around it unless a `tone` says otherwise. `name` picks one of the library's own icons, all drawn on one grid with one stroke: feature ideas (`diff`, `baseline`, `review`, `ci`, `self-host`, `privacy`, `capture`, `branch`, `theme`, `speed`, `search`) and UI glyphs (`chevron-right`, `chevron-down`, `close`, `external-link`, `settings`, `bell`, `check`, `plus`, `more`) and the ideas the docs sections stand for (`grid`, `window`, `type`, `card`, `pointer`, `field`, `table`, `compass`, `page`, `briefcase`); without a name, a bare `<svg>` child fills the box. It is decorative (`aria-hidden`) by default; a `label` makes it an image with that name, for an icon that carries meaning no text beside it says.
50
+ One inline icon, sized to a fixed box (sm 14px, md 16px, lg 20px, `feature` 32px) and drawn in `currentColor`, so it takes the text colour around it unless a `tone` says otherwise. `name` picks one of the library's own icons, all drawn on one grid with one stroke: feature ideas (`diff`, `baseline`, `review`, `ci`, `self-host`, `privacy`, `capture`, `branch`, `theme`, `speed`, `search`) and UI glyphs (`chevron-right`, `chevron-down`, `close`, `external-link`, `settings`, `bell`, `check`, `alert`, `plus`, `more`) and the ideas the docs sections stand for (`grid`, `window`, `type`, `card`, `pointer`, `field`, `table`, `compass`, `page`, `briefcase`); without a name, a bare `<svg>` child fills the box. It is decorative (`aria-hidden`) by default; a `label` makes it an image with that name, for an icon that carries meaning no text beside it says.
58
51
  - children: ReactNode. The `<svg>`, drawn in `currentColor`; it fills the box.
59
52
  - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
60
53
  - label: string. Names the icon (`role="img"`). Without one the icon is hidden from assistive tech.
61
- - name: "page" | "grid" | "search" | "table" | "type" | "diff" | "baseline" | "review" | "ci" | "self-host" | "privacy" | "capture" | "branch" | "theme" | "speed" | "chevron-right" | "chevron-down" | "close" | "external-link" | "settings" | "bell" | "check" | "plus" | "more" | "window" | "card" | "pointer" | "field" | "compass" | "briefcase". One of the library's icons, named for the idea it stands for.
54
+ - name: "page" | "grid" | "search" | "alert" | "table" | "type" | "diff" | "baseline" | "review" | "ci" | "self-host" | "privacy" | "capture" | "branch" | "theme" | "speed" | "chevron-right" | "chevron-down" | "close" | "external-link" | "settings" | "bell" | "check" | "plus" | "minus" | "more" | "window" | "card" | "pointer" | "field" | "compass" | "briefcase" | "cart" | "pause" | "play". One of the library's icons, named for the idea it stands for.
62
55
  - size: Size | ResponsiveSize | "feature" (default md). The box: sm 14px, md 16px (the default), lg 20px, `feature` 32px for an icon that stands for an idea on its own (a feature card). `{ base, md }` (sm, md, lg) changes at the `md` breakpoint (48rem), as the icon in a Button of that size does.
63
- - tone: "neutral" | "info" | "positive" | "warn" | "danger" | "muted" | "accent". A text tone. Left out, the icon takes the colour of the text around it.
56
+ - tone: "muted" | "neutral" | "info" | "positive" | "warn" | "danger" | "accent". A text tone. Left out, the icon takes the colour of the text around it.
64
57
 
65
58
  ### Types
66
- - IconName: `"baseline" | "diff" | "review" | "ci" | "self-host" | "privacy" | "capture" | "branch" | "theme" | "speed" | "search" | "chevron-right" | "chevron-down" | "close" | "external-link" | "settings" | "bell" | "check" | "plus" | "more" | "grid" | "window" | "type" | "card" | "pointer" | "field" | "table" | "compass" | "page" | "briefcase"`. The names of the icon set: feature ideas, then UI glyphs, then the ideas the docs sections stand for.
59
+ - IconName: `"baseline" | "diff" | "review" | "ci" | "self-host" | "privacy" | "capture" | "branch" | "theme" | "speed" | "search" | "chevron-right" | "chevron-down" | "close" | "external-link" | "settings" | "bell" | "check" | "alert" | "plus" | "minus" | "more" | "grid" | "window" | "type" | "card" | "pointer" | "field" | "table" | "compass" | "page" | "briefcase" | "cart" | "pause" | "play"`. The names of the icon set: feature ideas, then UI glyphs, then the ideas the docs sections stand for.
@@ -8,6 +8,7 @@ When to use: Showing a picture that your app serves: a screenshot, a QR code, a
8
8
  - MediaTile (media-tile.md): The picture is a thing: it has a label, opens, or can be removed.
9
9
  - Avatar (avatar.md): The picture is a person.
10
10
  - OutlineRegion (outline-region.md): Areas of the picture are marked: a `RegionFrame`.
11
+ - ColourSwatch (colour-swatch.md): What is shown is one colour, with its hex value.
11
12
 
12
13
  ### The one right way
13
14
  A picture that must be seen whole, such as a QR code or a logo, is `fit="contain"`.
@@ -15,15 +16,15 @@ A picture that must be seen whole, such as a QR code or a logo, is `fit="contain
15
16
  import { Image } from "@slashsuite/ui-react";
16
17
 
17
18
  <Image src={sampleCode} alt="Pairing code" aspect="3:4" width="md" fit="contain" />
18
-
19
19
  ```
20
20
 
21
21
  ### Do
22
- - `src` is your own picture, a local path or a data URL, and `alt` says what it shows. The corners are rounded and a hairline frames it on the inset surface.
23
- - `aspect` is the shape it is cropped to: `square`, `4:3` (the default), `3:2`, `16:9`, the portrait `3:4` and `9:16`, or `natural`. The shape is reserved before the picture loads, so the page does not jump. `natural` is the exception: the picture keeps its own proportions, with nothing cropped, and the space is not reserved until it loads.
24
- - `fit="cover"` (the default) fills the shape and crops what overflows. `fit="contain"` shows the whole picture, for a QR code or a logo that must not lose its edges.
25
- - `framed` sets the picture on a white mat with padding and shows all of it. The mat is white in every theme, dark ones included, so a QR code scans off a dark page. Use it for a code, not for a photo.
26
- - `width` is `sm` (96px), `md` (160px) or `lg` (256px), each a cap that a narrower parent still wins over, or `full` (the default) for the parent's width.
22
+ - `src` is your own picture, a local path or a data URL, and `alt` says what it shows. The corners are rounded and a hairline frames it on the inset surface. It loads lazily; give `priority` to the one picture at the top of the page, so it loads first.
23
+ - `aspect` is the shape it is cropped to: `square`, `4:3` (the default), `3:2`, `16:10`, `16:9`, the portrait `3:4` and `9:16`, or `natural`. The shape is reserved before the picture loads, so the page does not jump. `natural` is the exception: the picture keeps its own proportions, with nothing cropped, and the space is not reserved until it loads.
24
+ - `fit="cover"` (the default) fills the shape and crops what overflows, from the centre, or from the top with `crop="top"` for a page screenshot. `fit="contain"` shows the whole picture, for a QR code or a logo that must not lose its edges.
25
+ - `mat` is `white` or `page`, with padding, and shows all of the picture. A QR code, a barcode or a logo takes `mat="white"`: it is white in every theme, dark ones included, so a code scans off a dark page. A screenshot on a page takes `mat="page"`, the page's own tone. Leave it out for a photo, not a mat.
26
+ - `width` is `sm` (96px), `md` (160px), `lg` (256px) or `xl` (448px), each a cap that a narrower parent still wins over, or `full` (the default) for the parent's width.
27
+ - `href` makes the picture a link that opens the full file in a new tab, named by `alt`: a screenshot a reader wants to see at full size.
27
28
  - With no `src`, or one that fails to load, a placeholder of the same size with a picture mark takes its place. A new `src` tries again.
28
29
  - A person's photo is an `Avatar`; a clickable thumbnail with a label is a `MediaTile`; a video is a `Video`.
29
30
 
@@ -33,32 +34,41 @@ import { Image } from "@slashsuite/ui-react";
33
34
  import { Image } from "@slashsuite/ui-react";
34
35
 
35
36
  <Image src={sampleCode} alt="Pairing code" aspect="16:9" width="md" fit="cover" />
36
-
37
37
  ```
38
38
 
39
39
  ### Accessibility
40
40
  - An `<img>` named by `alt`. The placeholder is a `role="img"` with the same `alt`, so a missing picture is still announced.
41
+ - With `href` it is a link named by `alt` that opens in a new tab, with the focus ring from the component.
41
42
  - An empty `alt` marks the picture as decoration: it is hidden from a screen reader, placeholder included. Do that only when the text beside it says the same thing.
42
43
 
43
44
  ### Props
44
45
  ### Image
45
- A picture in a fixed shape: `aspect` reserves the space before it loads, so the page does not jump, and `fit` crops it to the shape or shows all of it. The corners are rounded and the frame has a hairline. If the picture is missing or fails to load, a same-sized placeholder with a picture mark stands in, still named by `alt`. `framed` mats a code or a logo in white. A user's photo is an `Avatar`; a clickable thumbnail with a label is a `MediaTile`. While `loading` with no `src` yet it is a bone of the same shape, not the placeholder, which means there is no picture.
46
+ A picture in a fixed shape: `aspect` reserves the space before it loads, so the page does not jump, and `fit` crops it to the shape or shows all of it. The corners are rounded and the frame has a hairline. If the picture is missing or fails to load, a same-sized placeholder with a picture mark stands in, still named by `alt`. `mat` sets it on a padded mat: `white` for a code or a logo, `page` for a screenshot. `href` links it to its full size in a new tab. It loads lazily unless it is the `priority` picture. A user's photo is an `Avatar`; a clickable thumbnail with a label is a `MediaTile`. While `loading` with no `src` yet it is a bone of the same shape, not the placeholder, which means there is no picture.
46
47
  - alt: string (required). What the picture shows. An empty string marks it as decoration, hidden from a screen reader.
47
- - aspect: "square" | "4:3" | "3:2" | "16:9" | "3:4" | "9:16" | "natural" (default 4:3). The shape it is cropped to: `square`, `4:3`, `3:2`, `16:9`, or the portrait `3:4` and `9:16`.
48
+ - aspect: "square" | "4:3" | "3:2" | "16:10" | "16:9" | "3:4" | "9:16" | "natural" (default 4:3). The shape it is cropped to: `square`, `4:3`, `3:2`, `16:9`, or the portrait `3:4` and `9:16`.
48
49
  `natural` keeps the picture's own proportions instead, so nothing is cropped or letterboxed;
49
50
  the space is not reserved before it loads.
51
+ - crop: "center" | "top" (default center). Where `fit="cover"` crops from: `center` keeps the middle of the picture, `top` keeps its top
52
+ edge, for a screenshot whose header is the part to see.
50
53
  - fit: "cover" | "contain" (default cover). `cover` fills the shape and crops what overflows; `contain` shows the whole picture, with the
51
54
  rest of the shape left empty (a QR code, a logo).
52
- - framed: boolean (default false). Sets the picture on a white mat with padding, always white, in every theme: a QR code is
53
- scanned off a dark page. It shows the whole picture, as `fit="contain"`, whatever `fit` says.
55
+ - href: string. Makes the picture a link to its full size, opened in a new tab (`target="_blank"`,
56
+ `rel="noreferrer"`), named by `alt`.
54
57
  - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
55
58
  - loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
56
59
  Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
57
60
  - loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
61
+ - mat: "page" | "white". Sets the picture on a padded mat and shows the whole of it, as `fit="contain"`, whatever `fit`
62
+ says. `white` is white in every theme, dark ones included, so a QR code, a barcode or a logo
63
+ reads off a dark page. `page` is a ground a step below the page in each theme, for a
64
+ screenshot. Left out, there is no mat.
65
+ - priority: boolean (default false). Marks the picture that is the page's largest one in the first view (its LCP): it loads at once
66
+ with a high fetch priority. Every other picture loads lazily, when it nears the viewport.
58
67
  - src: string. The picture, a local path or a data URL. It is never loaded for you: this is the app's own
59
68
  image. Left out, or if it fails to load, the picture is replaced by a placeholder.
60
- - width: "sm" | "md" | "lg" | "full" (default full). `sm` 96px, `md` 160px and `lg` 256px set the width, capped at the parent's; `full` fills the parent.
69
+ - width: "sm" | "md" | "lg" | "xl" | "full" (default full). `sm` 96px, `md` 160px, `lg` 256px and `xl` 448px set the width, capped at the parent's; `full`
70
+ fills the parent.
61
71
 
62
72
  ### Types
63
- - ImageAspect: `"square" | "4:3" | "3:2" | "16:9" | "3:4" | "9:16" | "natural"`. The shapes an image is cropped or letterboxed to, or `natural`: no shape of its own, so the picture keeps its own proportions.
64
- - ImageWidth: `Size | "full"`. How wide an image is: `full` fills its parent; the others are 96, 160 or 256px, capped at the parent's width.
73
+ - ImageAspect: `"square" | "4:3" | "3:2" | "16:10" | "16:9" | "3:4" | "9:16" | "natural"`. The shapes an image is cropped or letterboxed to, or `natural`: no shape of its own, so the picture keeps its own proportions.
74
+ - ImageWidth: `Size | "xl" | "full"`. How wide an image is: `full` fills its parent; the others are 96, 160, 256 or 448px, capped at the parent's width.
@@ -10,7 +10,6 @@ An amount is a `prefix` for the currency and `numeric`, which lines the digits u
10
10
  import { Input } from "@slashsuite/ui-react";
11
11
 
12
12
  <Input prefix="R" numeric width="md" aria-label="Amount" defaultValue="49.90" />
13
-
14
13
  ```
15
14
 
16
15
  ### Do
@@ -19,6 +18,7 @@ import { Input } from "@slashsuite/ui-react";
19
18
  - `prefix` is short text inside the border before the value, such as a currency symbol. It is for a plain field, not one with an `icon` or `type="search"`.
20
19
  - A figure is `numeric`: an amount is `<Input prefix="R" numeric />` in a `Field`, and a count or a whole number is `<Input numeric inputMode="numeric" />`. It right-aligns the digits in tabular figures and brings up the number keypad. A unit other than a currency goes in the `label` ("UIF rate (%)").
21
20
  - `size="sm"` is for a dense form or a table row, `size="lg"` for a sign-in or search form that stands alone; `md` is the default.
21
+ - A field beside a `Button` that changes size with the screen takes the same responsive size, `size={{ base: "lg", md: "md" }}`, so the two stay one height at both widths.
22
22
  - `width` is `full` by default; `xs`, `sm`, `md` and `lg` are fixed widths for a short value; `fill` grows to the room beside other items in a row; `auto` is as wide as the browser makes it.
23
23
  - A paragraph is a `Textarea`; a choice from a list is a `Select`; a date is a `DateField`.
24
24
 
@@ -47,12 +47,11 @@ A plain text input used for search has no icon and no way to clear it.
47
47
  import { Input } from "@slashsuite/ui-react";
48
48
 
49
49
  <Input aria-label="Search shops" placeholder="Search by name or suburb…" />
50
-
51
50
  ```
52
51
 
53
52
  ### Accessibility
54
53
  - An `Input` is a native `<input>`: it takes `type`, `inputMode`, `autoComplete`, `required`, `disabled` and the `aria-*` and `data-*` props.
55
- - A `type="search"` field shows a clear button while it has a value, named "Clear search" or by `clearLabel`; it is hidden when the field is disabled or read-only.
54
+ - A `type="search"` field shows a clear button while it has a value, named "Clear search" or by `clearLabel`; it is hidden when the field is disabled or read-only. Escape clears it too, and in a `Dialog` only the second Escape, in the empty field, closes the dialog.
56
55
  - The `icon` is decorative and hidden from assistive tech.
57
56
  - A `numeric` field is a text field with a number keypad (`inputMode="decimal"` unless you pass your own), so it is read and kept exactly as typed.
58
57
  - In a `Field`, the `Field` around it gives it its label and its hint or error as `aria-describedby`, and an error marks it `aria-invalid` with a red edge.
@@ -60,10 +59,10 @@ import { Input } from "@slashsuite/ui-react";
60
59
 
61
60
  ### Props
62
61
  ### Input
63
- A text input. `icon` names a leading icon inside the field (`icon="search"`). `prefix` puts short text inside the border before the value, such as a currency symbol; it is for a plain field, not with an `icon` or `type="search"`. `numeric` is a field for a figure: an amount (`<Input prefix="R" numeric />`) or a count (`numeric inputMode="numeric"`). It right-aligns the value in tabular figures and brings up the phone's number keypad (`inputMode="decimal"` unless you pass your own), and stays a text field, so "1 250" is kept as typed; never use `type="number"` for a figure a person types. `type="search"` drops the browser's own search look and shows a clear button at the trailing edge while the field has a value, named by `clearLabel`. The `ref` reaches the `<input>`.
62
+ A text input. `icon` names a leading icon inside the field (`icon="search"`). `prefix` puts short text inside the border before the value, such as a currency symbol; it is for a plain field, not with an `icon` or `type="search"`. `numeric` is a field for a figure: an amount (`<Input prefix="R" numeric />`) or a count (`numeric inputMode="numeric"`). It right-aligns the value in tabular figures and brings up the phone's number keypad (`inputMode="decimal"` unless you pass your own), and stays a text field, so "1 250" is kept as typed; never use `type="number"` for a figure a person types. `type="search"` drops the browser's own search look and shows a clear button at the trailing edge while the field has a value, named by `clearLabel`, and Escape clears it. The `ref` reaches the `<input>`.
64
63
  - clearLabel: string (default Clear search). The name of a `type="search"` field's clear button, for an app in another language.
65
64
  - disabled: boolean (native). Disables the field; say why in its `Field` hint.
66
- - icon: "page" | "grid" | "search" | "table" | "type" | "diff" | "baseline" | "review" | "ci" | "self-host" | "privacy" | "capture" | "branch" | "theme" | "speed" | "chevron-right" | "chevron-down" | "close" | "external-link" | "settings" | "bell" | "check" | "plus" | "more" | "window" | "card" | "pointer" | "field" | "compass" | "briefcase". A leading icon inside the field, by name (`search`). Not with `prefix`.
65
+ - icon: "page" | "grid" | "search" | "alert" | "table" | "type" | "diff" | "baseline" | "review" | "ci" | "self-host" | "privacy" | "capture" | "branch" | "theme" | "speed" | "chevron-right" | "chevron-down" | "close" | "external-link" | "settings" | "bell" | "check" | "plus" | "minus" | "more" | "window" | "card" | "pointer" | "field" | "compass" | "briefcase" | "cart" | "pause" | "play". A leading icon inside the field, by name (`search`). Not with `prefix`.
67
66
  - name: string (native). The key the value posts under in a form.
68
67
  - numeric: boolean (default false). A field for a figure (an amount, a count): the value right-aligned in tabular figures, and
69
68
  `inputMode="decimal"` unless you pass your own (`numeric` for a whole number). It stays a
@@ -72,11 +71,13 @@ text field, so the value is kept as typed; parsing it is yours. Ignored on `type
72
71
  - prefix: string. Short text inside the border before the value (a currency symbol). For a plain field: not with `icon` or `type="search"`.
73
72
  - ref: Ref<HTMLInputElement>. The `<input>` itself, for focus control.
74
73
  - required: boolean (native). The form will not submit while the field is empty.
75
- - size: "sm" | "md" | "lg" (default md). `sm` is compact, `text-sm` with less padding, for dense forms and table rows; `md` is `text-base`;
74
+ - size: Size | ResponsiveSize (default md). `sm` is compact, `text-sm` with less padding, for dense forms and table rows; `md` is `text-base`;
76
75
  `lg` is `text-lg` with more padding, for a hero form. Under an `AppShell density="compact"` each
77
76
  is one type step down, and on a touch screen a field is never under 16px.
77
+ `{ base: "md", md: "lg" }` changes size at the `md` breakpoint (48rem), in CSS, as a `Button`'s
78
+ does: give the field and the buttons in its row the same value, so the row stays aligned.
78
79
  - type: string (native). The kind of value: `"text"`, `"email"`, `"search"`, `"password"` and the rest.
79
- - width: "sm" | "md" | "lg" | "xs" | "auto" | "fill" | "full" (default full). `full` (default) fills the parent; `fill` grows to fill the room left in a row beside other items (it can shrink to nothing, so buttons stay on the line); `xs`, `sm`, `md`, `lg` are fixed; `auto` adds no width class, so the control is as wide as the browser makes it.
80
+ - width: "sm" | "md" | "lg" | "auto" | "xs" | "fill" | "full" (default full). `full` (default) fills the parent; `fill` grows to fill the room left in a row beside other items (it can shrink to nothing, so buttons stay on the line); `xs`, `sm`, `md`, `lg` are fixed; `auto` adds no width class, so the control is as wide as the browser makes it.
80
81
 
81
82
  ### Types
82
83
  - ControlSize: `"sm" | "md" | "lg"`. A control's size: the library's one `Size` scale.
@@ -77,5 +77,8 @@ One row of a KeyValueList: a label on the left, a tabular value on the right (or
77
77
  - loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
78
78
  Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
79
79
  - loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
80
- - tone: "neutral" | "info" | "positive" | "warn" | "danger" | "muted" | "accent". The meaning of the value, in the colours of a `Table` cell's `tone` (`TextTone`; `neutral`, the default, is the list's ink); the label keeps its ink. Colour alone does not say it, so the value or the label says it too: a sign, a word.
80
+ - tone: "muted" | "neutral" | "info" | "positive" | "warn" | "danger" | "accent". The meaning of the value, in the colours of a `Table` cell's `tone` (`TextTone`; `neutral`, the default, is the list's ink); the label keeps its ink. Colour alone does not say it, so the value or the label says it too: a sign, a word.
81
81
  - total: boolean (default false). The sum the rows above add up to: a firm rule above it and the label and value in strong ink.
82
+
83
+ ### Types
84
+ - KeyValueAlign: `"end" | "start"`. Where a `KeyValueList`'s values sit: `end`, across from their labels, or `start`, under them.
@@ -44,7 +44,7 @@ function Example() {
44
44
  - Pass one `<img>` or `<video>` as its children, with no classes: the Lightbox scales it down to fit the screen and keeps its shape.
45
45
  - `label` names it for a screen reader. `title` and `meta` are lines above the media (who posted it, and when); `caption` is the text under it.
46
46
  - To step through a set, pass `onPrevious` and `onNext`: each shows its button and binds its arrow key. Leave `onPrevious` out on the first item and `onNext` on the last.
47
- - The scrim is near-black with light text in every theme, light themes included, so a photo reads as it would in any viewer.
47
+ - The scrim is near-black with light text in every theme, light themes included, so a photo reads as it would in any viewer. It takes the dark colour scheme too, so a video's own controls are dark on it.
48
48
  - It fades out on close while it is still in the DOM, so `onClose` is called once the fade has finished: put `setOpen(false)` there and nowhere else. Esc, the scrim and the close button close it that way already.
49
49
 
50
50
  ### Don't
@@ -34,10 +34,10 @@ import {
34
34
  </Fieldset>
35
35
  }
36
36
  >
37
- <Card as="article" title="Naledi Mokoena" status={<Pill tone="positive">Accepted</Pill>}>
37
+ <Card title="Naledi Mokoena" status={<Pill tone="positive">Accepted</Pill>}>
38
38
  <Text>Q-1042 · R 1 240 / mo</Text>
39
39
  </Card>
40
- <Card as="article" title="Pieter van Wyk" status={<Pill tone="neutral">Sent</Pill>}>
40
+ <Card title="Pieter van Wyk" status={<Pill tone="neutral">Sent</Pill>}>
41
41
  <Text>Q-1041 · R 860 / mo</Text>
42
42
  </Card>
43
43
  </ListLayout>
@@ -89,12 +89,10 @@ import {
89
89
  </Fieldset>
90
90
  }
91
91
  >
92
- <Card as="article">
93
- <Text strong>Naledi Mokoena</Text>
92
+ <Card title="Naledi Mokoena" titleStyle="name">
94
93
  <Text>Q-1042 · R 1 240 / mo</Text>
95
94
  </Card>
96
- <Card as="article">
97
- <Text strong>Pieter van Wyk</Text>
95
+ <Card title="Pieter van Wyk" titleStyle="name">
98
96
  <Text>Q-1041 · R 860 / mo</Text>
99
97
  </Card>
100
98
  </ListLayout>
@@ -116,7 +114,7 @@ import { Card, PageHeader, Stack, Text } from "@slashsuite/ui-react";
116
114
 
117
115
  <Stack>
118
116
  <PageHeader title="Quotes" description="Every quote you have sent." />
119
- <Card as="article" title="Naledi Mokoena">
117
+ <Card title="Naledi Mokoena">
120
118
  <Text>Q-1042 · R 1 240 / mo</Text>
121
119
  </Card>
122
120
  </Stack>
@@ -10,57 +10,60 @@ When to use: A short list where each row opens something, toggles a section or h
10
10
  - MetaList (meta-list.md): A few facts inline on one line, not rows to open.
11
11
 
12
12
  ### The one right way
13
- Rows sit in a `Card flush`, and `divided` draws the line between them on every row after the first.
13
+ Rows sit in a `Stack divided` in a `Card flush`: the Stack draws the line between them.
14
14
  ```tsx
15
- import { Card, ListRow } from "@slashsuite/ui-react";
15
+ import { Card, ListRow, Stack } from "@slashsuite/ui-react";
16
16
 
17
17
  <Card flush>
18
- <ListRow trailing="R 9 500">Rent</ListRow>
19
- <ListRow divided trailing="R 1 850">
20
- Transport
21
- </ListRow>
22
- <ListRow divided href="#bills" trailing="3">
23
- Bills
24
- </ListRow>
18
+ <Stack divided>
19
+ <ListRow trailing="R 9 500">Rent</ListRow>
20
+ <ListRow trailing="R 1 850">Transport</ListRow>
21
+ <ListRow href="#bills" trailing="3">
22
+ Bills
23
+ </ListRow>
24
+ </Stack>
25
25
  </Card>
26
26
  ```
27
27
 
28
28
  ### Do
29
- - Put the rows in a `Card flush` and set `divided` on every row after the first. `trailing` is a value, a count or a `Pill`; `leading` is an `Avatar` or an icon.
29
+ - Put the rows in a `Stack divided` in a `Card flush`: the Stack draws the line between rows. `trailing` is a value, a count or a `Pill`; `leading` is an `Avatar` or an icon.
30
30
  - A row with `onClick` is a button; with `href` it is a link. `external` opens a link in a new tab.
31
31
  - `expanded` makes the row the header of a collapsible section: you own the state and the section, and pass `aria-controls` to name it.
32
32
  - `selected` marks the one row whose detail is open; set it on a single row of a list. `focused` marks the row the keyboard cursor is on in a list you move through yourself: an inset accent ring, apart from `selected`'s fill.
33
- - A button row (`onClick`) or a link row (`href`) can hold its own link or button in `trailing`: it sits above the row's button or link and takes its own click, with no class from you, so a row that selects can still carry a "View" link to its page. A row with no `href` and no `onClick` has no action of its own: its buttons go in `actions`, after `trailing`. `revealOnHover` shows them only on hover or focus, so a long list is not a wall of buttons.
33
+ - A button row (`onClick`) or a link row (`href`) can hold its own link or button in `trailing`: it sits above the row's button or link and takes its own click, with no class from you, so a row that selects can still carry a "View" link to its page. A row with no `href` and no `onClick` has no action of its own: its buttons go in `actions`, after `trailing`. They are always shown: an action that appears only on hover is one a touch or keyboard user cannot find. A long list keeps one action per row in view and the rest in a `Menu`.
34
34
  - A row's own link or button goes in `trailing`, never in the label. `size="sm"` is the dense padding for a list that must fit more rows, `size="lg"` the roomy one for a short list of big targets; `md` is the default.
35
- - A compact bordered list for read-only data, such as the lines of a split, is a `Card flush` around rows with no action at `size="sm"`, `divided` after the first, with the amount in `trailing`. There is no separate part: a row with no action has no hover fill and no click target.
36
- - Records with several columns to compare are a `Table`, not rows.
35
+ - A compact bordered list for read-only data, such as the lines of a split, is a `Card flush` around rows with no action at `size="sm"` in a `Stack divided`, with the amount in `trailing`. There is no separate part: a row with no action has no hover fill and no click target.
36
+ - `stripe` marks a row's status with a stripe on its leading edge, as a `Table` row's does; name the status in the row's words too. `leadingWidth="thumbnail"` gives a picture a fixed width, a step narrower on a phone (a screen narrower than `sm`), where `trailing` moves under the label so the label keeps its room.
37
37
 
38
38
  ### Don't
39
39
  - Do not add your own indent or a wrapper around the row.
40
+ - Do not lay out records with several columns to compare as rows: that is a `Table`.
40
41
 
41
42
  Rows in a Card that is not `flush` sit inside its padding, so the hover fill stops short of the edges and the lines do not run across.
42
43
  ```tsx
43
- import { Card, ListRow } from "@slashsuite/ui-react";
44
+ import { Card, ListRow, Stack } from "@slashsuite/ui-react";
44
45
 
45
46
  <Card>
46
- <ListRow trailing="R 9 500">Rent</ListRow>
47
- <ListRow divided trailing="R 1 850">
48
- Transport
49
- </ListRow>
47
+ <Stack divided>
48
+ <ListRow trailing="R 9 500">Rent</ListRow>
49
+ <ListRow trailing="R 1 850">Transport</ListRow>
50
+ </Stack>
50
51
  </Card>
51
52
  ```
52
53
 
53
54
  A row that silently ignores its click leaves the person tapping it again.
54
55
  ```tsx
55
- import { Card, ListRow } from "@slashsuite/ui-react";
56
+ import { Card, ListRow, Stack } from "@slashsuite/ui-react";
56
57
 
57
58
  <Card flush>
58
- <ListRow onClick={() => undefined} trailing="R 1 850">
59
- Rent
60
- </ListRow>
61
- <ListRow divided onClick={() => undefined} trailing="R 640">
62
- Water
63
- </ListRow>
59
+ <Stack divided>
60
+ <ListRow onClick={() => undefined} trailing="R 1 850">
61
+ Rent
62
+ </ListRow>
63
+ <ListRow onClick={() => undefined} trailing="R 640">
64
+ Water
65
+ </ListRow>
66
+ </Stack>
64
67
  </Card>
65
68
  ```
66
69
 
@@ -70,14 +73,15 @@ import { Card, ListRow } from "@slashsuite/ui-react";
70
73
  - `expanded` sets `aria-expanded` and draws a chevron, which is hidden from assistive tech.
71
74
  - A button or link row has a focus ring from the component; a button row's `disabled` fades the row and disables its button, so a tap on the row itself does nothing; a link or button in `trailing` still works.
72
75
  - A button row with `disabledReason` fades and its button is `aria-disabled`, still in the tab order; a click, Enter and Space do nothing, and the reason shows as a tooltip on hover, keyboard focus and a tap, read out as its description (the native `title` without CSS anchor positioning).
73
- - `revealOnHover` actions appear when the row is hovered or has focus inside it, so a keyboard user can reach them, and they are always shown on a touch screen.
76
+ - A static row's `actions` are always shown, never hidden until hover.
77
+ - A `stripe` is drawn only, hidden from assistive tech: the row's words say the status.
74
78
 
75
79
  ### Props
76
80
  ### ListRow
77
- A full-width row that runs `onClick` (or, with `href`, opens a link) with a hover fill, a left-aligned label and `trailing` content at the far end. The row is a `<div>` with its `<button>` or link stretched over it, so a tap anywhere on the row runs it; a `TextLink`, `Button` or `Checkbox` in the row (in `trailing`, say a "View" link on a row that selects) sits above it and is clickable on its own. A button row's button is named by the label alone. With `expanded` it is the header of a collapsible section: `aria-expanded` and a chevron. Rows sit in a `Card flush`; `divided` draws the line between them, on each row after the first. `secondary` is a second, muted line under the label. `leading` is content before the label (`leadingWidth="thumbnail"` gives it a fixed picture width), `selected` marks the row in view, `focused` the one the keyboard cursor is on and `highlighted` fills the row a list follows (`onPointerEnter`, `onPointerLeave` and `onFocus` reach every form; on a button or linked row the pointer handlers go on the row itself). The label is a `<div>`, so it can hold block content (a name over a path). A row with no `href` and no `onClick` is a plain `<div>` with no action of its own, for one that holds its own buttons: `actions` follow `trailing`, and `revealOnHover` shows them only on hover or focus. Such a row also takes a `panel`, content under the row that starts where the label does (a conversation that opens under its chat); `divided` draws the line above the whole row, panel included, so a list of them is `divided={index > 0}` on each. Inside a row a `Stack` is `xs` apart, and a `sm` row makes the buttons in it `sm`. While `loading` an empty label is a bone, and what the row holds waits with it.
78
- - actions: ReactNode. Buttons for this row, after `trailing`: `Button size="sm"`, `IconButton`.
81
+ A full-width row that runs `onClick` (or, with `href`, opens a link) with a hover fill, a left-aligned label and `trailing` content at the far end. The row is a `<div>` with its `<button>` or link stretched over it, so a tap anywhere on the row runs it; a `TextLink`, `Button` or `Checkbox` in the row (in `trailing`, say a "View" link on a row that selects) sits above it and is clickable on its own. A button row's button is named by the label alone. With `expanded` it is the header of a collapsible section: `aria-expanded` and a chevron. Rows sit in a `Card flush`, in a `Stack divided` that draws the line between them. `secondary` is a second, muted line under the label. `leading` is content before the label (`leadingWidth="thumbnail"` gives it a fixed picture width), `selected` marks the row in view, `focused` the one the keyboard cursor is on and `highlighted` fills the row a list follows (`onPointerEnter`, `onPointerLeave` and `onFocus` reach every form; on a button or linked row the pointer handlers go on the row itself). The label is a `<div>`, so it can hold block content (a name over a path). A row with no `href` and no `onClick` is a plain `<div>` with no action of its own, for one that holds its own buttons: `actions` follow `trailing`, always shown, so a touch, a keyboard and a pointer find them alike. Such a row also takes a `panel`, content under the row that starts where the label does (a conversation that opens under its chat); in a `Stack divided` the line sits above the whole row, panel included. Inside a row a `Stack` is `xs` apart, and a `sm` row makes the buttons in it `sm`. While `loading` an empty label is a bone, and what the row holds waits with it.
82
+ - actions: ReactNode. Buttons for this row, after `trailing`: `Button size="sm"`, `IconButton`, a `Menu`. Always
83
+ shown: an action that shows only on hover is one a touch or keyboard user cannot find.
79
84
  - disabledReason: string. Why the row cannot be pressed: it fades, `aria-disabled` and focusable, the reason its tooltip.
80
- - divided: boolean. A hairline above the row: set it on every row after the first.
81
85
  - expanded: boolean. Makes the row a collapsible header: sets `aria-expanded` and shows a chevron that turns down
82
86
  when open. The caller owns the state and the section; pass `aria-controls` to name it.
83
87
  - external: boolean. Opens in a new tab: adds `target="_blank"` and `rel="noreferrer"`.
@@ -86,8 +90,7 @@ focus stays on the list: the focus ring, drawn inside the row. It says nothing t
86
90
  reader (move real focus for that) and combines with `selected`.
87
91
  - highlighted: boolean. Marks the row a list follows with the pointer and the keyboard alike (set it from
88
92
  `onPointerEnter` and `onFocus`): a fill one step deeper than hover, so it shows on a white card
89
- and on a tinted panel alike. On a static row it shows the fill without `revealOnHover`, and
90
- shows `actions` that `revealOnHover` hides. `selected` wins.
93
+ and on a tinted panel alike. It is the only fill a static row takes. `selected` wins.
91
94
 
92
95
  Clear it from `onPointerLeave`.
93
96
  - href: string. Makes the row a link to this URL; an in-app path goes through the app's `LinkProvider`.
@@ -104,13 +107,13 @@ Left out, the part takes the nearest loading layout's or part's; `false` opts it
104
107
  - onPointerLeave: PointerEventHandler<HTMLDivElement>. On the row, not its link or button, so a link or button in the row does not count as leaving it.
105
108
  - panel: ReactNode. Content under the row, lined up with the label rather than the row's edge (past `leading`): the
106
109
  panel of a row that opens in place, such as a conversation under its chat. It sits inside the
107
- row, so `divided`, the fill and `revealOnHover` cover it too. Only a row that is neither a
110
+ row, so the fill and a `Stack divided` line cover it too. Only a row that is neither a
108
111
  button nor a link takes it.
109
- - revealOnHover: boolean. Hides `actions` until the row is hovered or something in it has focus, so a long list is not a
110
- wall of buttons. A touch screen has no hover, so they are always shown there.
111
112
  - secondary: ReactNode. A second, muted line under the label (a date, a note), like `TableCell`'s `secondary`.
112
113
  - selected: boolean. Marks the row in view, the one whose detail is open: an accent fill and `aria-current="true"`.
113
114
  Set it on one row of a list.
114
115
  - size: "sm" | "md" | "lg" (default md). `sm` is dense padding, `lg` one step roomier than `md`. A `Button`, `IconButton` or `Pill` in a
115
116
  `sm` row with no `size` of its own is `sm` too.
117
+ - stripe: "muted" | "info" | "positive" | "warn" | "danger" | "accent". The row's status, as a stripe on its leading edge in this tone, as a `Table` row's `stripe`. The
118
+ colour says it to the eye only, so the row's words say it too (a `Pill`, a status in `trailing`).
116
119
  - trailing: ReactNode. Content at the far end of the row: a value, a count, a Pill.
@@ -36,8 +36,8 @@ function Example() {
36
36
  - A part's own `loading` wins; left out, it takes the nearest loading layout's or part's, so one `loading` on a layout reaches everything inside. `loading={false}` opts a part out inside a loading page.
37
37
  - Loading beats empty: while `loading`, an empty slot is a bone, never the `empty` state.
38
38
  - Three words, three meanings: `loading` is data not here yet (a skeleton); `busy` is an action in flight on a control (`Button`, `Switch`, `ChatComposer`); `streaming` is content arriving piece by piece (`ChatMessage`). `NavigationProgress loading` is the bar for a page change, not a skeleton.
39
- - Take `loading`. Page layouts, each the owner of its page's wait, passing it to everything inside, the header too: `PageHeader`, `ListLayout`, `DetailLayout`, `FormLayout`, `ProseLayout`, `SidebarLayout` (its canvas; the rail is navigation), `FullBleedLayout`, `CenteredLayout` and `CardGrid`. Text: `Text`, `Lead`, `Caption`, `Overline`, `Display`, `PageHeading`, `SectionHeading`, `SubsectionHeading` and `Markdown`. Data and content: `StatTile`, `KeyValueList`, `KeyValue`, `Badge`, `Pill`, `MetaList`, `Card`, `Table` and `TableCell` (`TableHead`, `TableBody`, `TableRow`, `TableFoot`, `TableGroupRow` and `TableHeaderCell` wait with their table), `ListRow`, `Timeline`, `TimelineItem`, `Avatar`, `AvatarStack`, `Image`, `MediaTile`, `ProgressBar`, `SplitBar`, `StackedBar`, `Legend` and `TrendChart`. Forms: `Field` and `FormRowField` draw their label and a bone the height of their control (read from the density around them, so a `sm` card's is `sm`), and `Checkbox`, `Switch`, `RadioGroup` with `Radio`, and `DateField` draw their labels with the box, track, circles or field as bones.
40
- - Draw as themselves, by design. Actions and navigation are known before the data: `Button`, `ButtonGroup`, `IconButton`, `CopyButton`, `CopyLine`, `ColourSchemeToggle`, `Menu`, `Tabs`, `SegmentedControl`, `Breadcrumbs`, `Pagination`, `TextLink`, `SiteSearch` and `TableExpandCell`; an action that needs the data says why it waits with `disabledReason`. Bare controls hold the caller's own state, and a fetched value waits in its `Field` or `FormRowField`: `Input`, `Select`, `Textarea`, `FileDrop`, `DateRangePicker`, `Fieldset`, `InlineEdit` and `TableEditCell`. Frames and primitives have no data of their own, and what they hold draws its own bones: `AppShell`, `AppShellBrand`, `Container`, `Stack`, `Section`, `Cluster`, `ClusterGrow`, `SideColumn`, `StickyBar`, `Show`, `ScrollStrip`, `FormGrid`, `FormRow`, `Divider`, `Icon`, `Kbd`, `Code`, `Prose`, `BulletList`, `BulletItem`, `Steps`, `Step`, `Hero`, `SiteFooter`, `Callout`, `EmptyState`, `Disclosure` and `LinkProvider`. Overlays open on an action and their contents draw bones: `Dialog`, `Drawer`, `BottomSheet`, `Lightbox`, `FieldDialog` and `ToastRegion`. Static copy and authored code: `ErrorPage`, `NotFound`, `Forbidden`, `Offline`, `Maintenance`, `CodeBlock` and `CodeExample`. In flight on their own terms: `ChatThread`, `ChatMessage` (`streaming`), `ChatComposer` (`busy`), `NavigationProgress`, `PageFade`, `Morph` and `Video` (the browser's poster). `RegionFrame` and `OutlineRegion` pass `loading` to their `<img>` as the native attribute. `SortableList`, `SortableItem` and `SortableSection` need their items to reorder; `ListRow` bones stand in. `DocsLayout` has no loading page yet.
39
+ - Take `loading`. Page layouts, each the owner of its page's wait, passing it to everything inside, the header too: `PageHeader`, `ListLayout`, `DetailLayout`, `FormLayout`, `ProseLayout`, `ArticleLayout`, `SidebarLayout` (its canvas; the rail is navigation), `DocsLayout` (its article; the nav, contents and pager are navigation), `FullBleedLayout`, `CenteredLayout` and `CardGrid`. Text: `Text`, `Lead`, `Caption`, `Overline`, `Display`, `PageHeading`, `SectionHeading`, `SubsectionHeading` and `Markdown`. Data and content: `StatTile`, `KeyValueList`, `KeyValue`, `Badge`, `Pill`, `MetaList`, `Card`, `Table` and `TableCell` (`TableHead`, `TableBody`, `TableRow`, `TableFoot`, `TableGroupRow` and `TableHeaderCell` wait with their table), `ListRow`, `Timeline`, `TimelineItem`, `Avatar`, `AvatarStack`, `Image`, `RegionFrame`, `MediaTile`, `Price`, `ProductTile`, `ProgressBar`, `SplitBar`, `StackedBar`, `Legend`, `TrendChart`, `FlowDiagram` and `StateMachine`. Forms: `Field` and `FormRowField` draw their label and a bone the height of their control (read from the density around them, so a `sm` card's is `sm`), and `Checkbox`, `Switch`, `RadioGroup` with `Radio`, `DateField`, `DateTimeField`, `NumberField` and `Combobox` draw their labels with the box, track, circles or field as bones.
40
+ - Draw as themselves, by design. Actions and navigation are known before the data: `Button`, `ButtonGroup`, `IconButton`, `CopyButton`, `CopyLine`, `ColourSchemeToggle`, `Menu`, `Popover`, `Tabs`, `SegmentedControl`, `Breadcrumbs`, `Pagination`, `Stepper`, `TextLink`, `TableOfContents`, `SiteSearch`, `CartButton` and `TableExpandCell`; an action that needs the data says why it waits with `disabledReason`. Bare controls hold the caller's own state, and a fetched value waits in its `Field` or `FormRowField`: `Input`, `Select`, `Slider`, `Textarea`, `FileDrop`, `DateRangePicker`, `Fieldset`, `InlineEdit` and `TableEditCell`. Frames and primitives have no data of their own, and what they hold draws its own bones: `AppShell`, `AppShellBrand`, `Container`, `Stack`, `Section`, `CardGridRow`, `Cluster`, `ClusterGrow`, `SideColumn`, `StickyBar`, `Show`, `ScrollStrip`, `FormGrid`, `FormRow`, `Divider`, `Icon`, `Kbd`, `Code`, `Mark`, `Prose`, `BulletList`, `BulletItem`, `Steps`, `Step`, `Hero`, `PromoBanner`, `CallToAction`, `SiteFooter`, `Callout`, `EmptyState`, `Disclosure` and `LinkProvider`. Overlays open on an action and their contents draw bones: `Dialog`, `Drawer`, `BottomSheet`, `Lightbox`, `ConfirmDialog`, `FieldDialog` and `ToastRegion`. Static copy and authored code: `ErrorPage`, `NotFound`, `Forbidden`, `Offline`, `Maintenance`, `CodeBlock`, `CodeExample` and `ColourSwatch` (a value the page already has). In flight on their own terms: `ChatThread`, `ChatMessage` (`streaming`), `ChatComposer` (`busy`), `NavigationProgress`, `PageFade`, `Morph`, `Video` (the browser's poster), `Audio` (the browser's player) and `EmbedFrame` (`status`, since the embed loads on its own). `OutlineRegion` is drawn over its `RegionFrame` and waits with it. `SortableList`, `SortableItem` and `SortableSection` need their items to reorder; `ListRow` bones stand in.
41
41
 
42
42
  ### Don't
43
43
  - Do not build a grey box by hand or write a "Loading..." `Text`: it drops the captions the reader could already see, and the page jumps when the data lands.