@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
package/dist/fieldWait.js CHANGED
@@ -1,13 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cx } from "./cx.js";
3
- import { useDensity } from "./density.js";
3
+ import { controlHeight } from "./control.js";
4
+ import { useResponsiveDensity } from "./density.js";
4
5
  import { Bone, BusyLabel, busy, passthroughOf, useLoading } from "./skeleton.js";
5
6
  /* The bones of a form part waiting for its value: the label is drawn, the control is a bone. */
6
- /** A text control's height by `size`: its padding, line height and border, as `controlClass` draws it. */
7
- const CONTROL_HEIGHT = { sm: "h-6.5", md: "h-9.5", lg: "h-11.5" };
8
7
  /** A bone the height of a text control at `size`, else the density around it (a `sm` table or card). */
9
8
  export function ControlBone({ size }) {
10
- return _jsx(Bone, { shape: cx("block w-full rounded-lg", CONTROL_HEIGHT[useDensity(size)]) });
9
+ return _jsx(Bone, { shape: cx("block w-full rounded-lg", controlHeight(useResponsiveDensity(size))) });
11
10
  }
12
11
  /**
13
12
  * A choice (a checkbox, a switch, a radio) waiting for its value: the mark a bone of its shape, the
@@ -0,0 +1,68 @@
1
+ /** A point in the diagram's own space, in CSS pixels from its top left corner. */
2
+ export type FlowPoint = {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ /** Where a node or a group sits, its top left corner and its size, in CSS pixels. */
7
+ export type FlowBox = {
8
+ x: number;
9
+ y: number;
10
+ width: number;
11
+ height: number;
12
+ };
13
+ /**
14
+ * A node as laid out: its `id` and its box. A group's box (`group`) is the frame round its nodes.
15
+ */
16
+ export type FlowNodeBox = FlowBox & {
17
+ id: string;
18
+ };
19
+ /**
20
+ * An arrow as laid out: the `from` and `to` ids, its place in `edges` (`index`), the points dagre
21
+ * routed it through, the SVG path drawn through them (it ends on the target's edge, at the
22
+ * arrowhead's tip) and its label's centre when it has one.
23
+ */
24
+ export type FlowEdgePath = {
25
+ from: string;
26
+ to: string;
27
+ index: number;
28
+ points: readonly FlowPoint[];
29
+ path: string;
30
+ labelAt: FlowPoint | null;
31
+ };
32
+ /**
33
+ * The whole diagram as laid out, in one coordinate space: `width` and `height`, a box per node and
34
+ * per group, and a path per arrow. `FlowDiagram` hands it to `overlay`.
35
+ */
36
+ export type FlowLayout = {
37
+ width: number;
38
+ height: number;
39
+ nodes: readonly FlowNodeBox[];
40
+ groups: readonly (FlowBox & {
41
+ name: string;
42
+ })[];
43
+ edges: readonly FlowEdgePath[];
44
+ };
45
+ /** What the layout needs from a node: its id, its size and the group it sits in. */
46
+ export type LayoutNode = {
47
+ id: string;
48
+ width: number;
49
+ height: number;
50
+ group?: string | undefined;
51
+ };
52
+ /** What the layout needs from an arrow: its ends, and its label's size when it has one. */
53
+ export type LayoutEdge = {
54
+ from: string;
55
+ to: string;
56
+ label?: {
57
+ width: number;
58
+ height: number;
59
+ } | undefined;
60
+ };
61
+ /** `down` reads from the top, `right` from the start edge. */
62
+ export type FlowDirection = "down" | "right";
63
+ /**
64
+ * Lays the nodes and arrows out with dagre. An arrow whose end is not a node is left out, so a
65
+ * typo draws no stray box. Pure: the same input gives the same layout.
66
+ */
67
+ export declare function layoutFlow(nodes: readonly LayoutNode[], edges: readonly LayoutEdge[], direction: FlowDirection): FlowLayout;
68
+ export declare function stepPath(points: readonly FlowPoint[], direction: FlowDirection, lane?: number): string;
@@ -0,0 +1,105 @@
1
+ /**
2
+ * The layout behind `FlowDiagram`: dagre places the boxes and routes the arrows, then this file
3
+ * turns its output into what the component draws. Internal: only the geometry types are exported
4
+ * from the package, for `FlowDiagram`'s `overlay`.
5
+ */
6
+ import { Graph, layout } from "@dagrejs/dagre";
7
+ /** Space round the drawing, between boxes in a rank, and between ranks. */
8
+ const MARGIN = 16;
9
+ const NODE_GAP = 32;
10
+ const RANK_GAP = 48;
11
+ const EDGE_GAP = 16;
12
+ /** A group's dagre id, kept apart from every node id. */
13
+ const groupKey = (name) => `\u0000group:${name}`;
14
+ const round = (n) => Math.round(n * 10) / 10;
15
+ /**
16
+ * Lays the nodes and arrows out with dagre. An arrow whose end is not a node is left out, so a
17
+ * typo draws no stray box. Pure: the same input gives the same layout.
18
+ */
19
+ export function layoutFlow(nodes, edges, direction) {
20
+ const groups = [...new Set(nodes.flatMap((n) => (n.group ? [n.group] : [])))];
21
+ const g = new Graph({
22
+ multigraph: true,
23
+ compound: groups.length > 0,
24
+ });
25
+ g.setGraph({
26
+ rankdir: direction === "right" ? "LR" : "TB",
27
+ nodesep: NODE_GAP,
28
+ ranksep: RANK_GAP,
29
+ edgesep: EDGE_GAP,
30
+ marginx: MARGIN,
31
+ marginy: MARGIN,
32
+ });
33
+ g.setDefaultEdgeLabel(() => ({}));
34
+ for (const name of groups)
35
+ g.setNode(groupKey(name), {});
36
+ const ids = new Set();
37
+ for (const n of nodes) {
38
+ ids.add(n.id);
39
+ g.setNode(n.id, { width: n.width, height: n.height });
40
+ if (n.group)
41
+ g.setParent(n.id, groupKey(n.group));
42
+ }
43
+ const kept = edges.flatMap((e, index) => ids.has(e.from) && ids.has(e.to) ? [{ e, index }] : []);
44
+ for (const { e, index } of kept) {
45
+ g.setEdge(e.from, e.to, e.label ? { width: e.label.width, height: e.label.height, labelpos: "c" } : {}, String(index));
46
+ }
47
+ layout(g);
48
+ const box = (key) => {
49
+ const { x = 0, y = 0, width = 0, height = 0 } = g.node(key);
50
+ return {
51
+ x: round(x - width / 2),
52
+ y: round(y - height / 2),
53
+ width: round(width),
54
+ height: round(height),
55
+ };
56
+ };
57
+ const graph = g.graph();
58
+ return {
59
+ width: Math.ceil(graph.width ?? 0),
60
+ height: Math.ceil(graph.height ?? 0),
61
+ nodes: [...ids].map((id) => ({ id, ...box(id) })),
62
+ groups: groups.map((name) => ({ name, ...box(groupKey(name)) })),
63
+ edges: kept.map(({ e, index }) => {
64
+ const routed = g.edge(e.from, e.to, String(index));
65
+ const points = (routed.points ?? []).map((p) => ({ x: round(p.x), y: round(p.y) }));
66
+ return {
67
+ from: e.from,
68
+ to: e.to,
69
+ index,
70
+ points,
71
+ path: stepPath(points, direction, LANES[index % LANES.length]),
72
+ labelAt: e.label && routed.x !== undefined && routed.y !== undefined
73
+ ? { x: round(routed.x), y: round(routed.y) }
74
+ : null,
75
+ };
76
+ }),
77
+ };
78
+ }
79
+ /**
80
+ * A square path through dagre's route points: each step leaves along the rank `direction`, turns
81
+ * once at `lane` of the way across (0.5 is halfway), and arrives along it again, so every arrow is
82
+ * made of straight runs at right angles and ends exactly on the last point, where its arrowhead
83
+ * sits. Arrows between the same two ranks take different lanes, so their cross runs do not overlap.
84
+ */
85
+ /** Where each arrow turns between two ranks, by its index: spread so parallel runs stay apart. */
86
+ const LANES = [0.5, 0.3, 0.7, 0.4, 0.6];
87
+ export function stepPath(points, direction, lane = 0.5) {
88
+ const [first, ...rest] = points;
89
+ if (!first)
90
+ return "";
91
+ let d = `M${first.x},${first.y}`;
92
+ let from = first;
93
+ for (const to of rest) {
94
+ if (direction === "right") {
95
+ const mid = round(from.x + (to.x - from.x) * lane);
96
+ d += `H${mid}V${to.y}H${to.x}`;
97
+ }
98
+ else {
99
+ const mid = round(from.y + (to.y - from.y) * lane);
100
+ d += `V${mid}H${to.x}V${to.y}`;
101
+ }
102
+ from = to;
103
+ }
104
+ return d;
105
+ }
@@ -0,0 +1,2 @@
1
+ export declare const focusRing = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-violet-600";
2
+ export declare const insetFocusRing = "focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-violet-600";
package/dist/focus.js ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The keyboard focus ring every interactive control shares, and the same ring drawn inside the
3
+ * control, for one that fills a box which clips anything outside it (a table's sortable title, a
4
+ * scroller). `focusRing` with `-outline-offset-2` added would not do, since `outline-offset-2` comes
5
+ * later in the CSS and wins. Both are core's, so the native controls draw the same ring.
6
+ */
7
+ import { FOCUS_RING, FOCUS_RING_INSET } from "./core/index.js";
8
+ export const focusRing = FOCUS_RING;
9
+ export const insetFocusRing = FOCUS_RING_INSET;
@@ -0,0 +1,73 @@
1
+ import type { StateMachineDefinition, StateMachineState } from "./StateMachine.js";
2
+ /** One transition: a target, or `{ target, meta }`, or a list of them (the first that passes its guard). */
3
+ export type XStateTransitionConfig = string | undefined | {
4
+ target?: string | readonly (string | undefined)[] | undefined;
5
+ meta?: Record<string, unknown> | undefined;
6
+ };
7
+ type XStateTransitions = XStateTransitionConfig | readonly XStateTransitionConfig[];
8
+ /** One `invoke`: where it goes when the invoked actor is done, and when it fails. */
9
+ export type XStateInvokeConfig = {
10
+ onDone?: XStateTransitions;
11
+ onError?: XStateTransitions;
12
+ };
13
+ /**
14
+ * The part of an xstate v5 state node `fromXState` reads: its `id`, `type` and `meta`, and the
15
+ * ways it moves on (`on`, `always`, `after`, and each `invoke`'s `onDone` and `onError`). Typed by
16
+ * shape, so the package does not depend on xstate.
17
+ */
18
+ export type XStateNodeConfig = {
19
+ id?: string | undefined;
20
+ type?: string | undefined;
21
+ meta?: Record<string, unknown> | undefined;
22
+ on?: Record<string, XStateTransitions> | undefined;
23
+ always?: XStateTransitions;
24
+ after?: Record<string, XStateTransitions> | undefined;
25
+ invoke?: XStateInvokeConfig | readonly XStateInvokeConfig[] | undefined;
26
+ /** Its child states: only their `id`s are read, so a target `#id` lands on this state. */
27
+ states?: Record<string, XStateNodeConfig> | undefined;
28
+ };
29
+ /** Where a machine starts: a state's key, or `{ target }`. */
30
+ export type XStateInitial = string | {
31
+ target: string;
32
+ } | undefined;
33
+ /** A machine's config, or what `setup(…).createMachine(config)` returns (it keeps it as `config`). */
34
+ export type XStateMachineLike = {
35
+ id?: string | undefined;
36
+ initial?: XStateInitial;
37
+ states?: Record<string, XStateNodeConfig> | undefined;
38
+ } | {
39
+ config: {
40
+ id?: string | undefined;
41
+ initial?: XStateInitial;
42
+ states?: Record<string, XStateNodeConfig> | undefined;
43
+ };
44
+ };
45
+ /** What `fromXState` makes of one state node before `state` adjusts it. */
46
+ export type XStateStateInput = {
47
+ id: string;
48
+ /** The node's own config: its `type`, `meta` and `on`. */
49
+ node: XStateNodeConfig;
50
+ /** The state as read by the default rules. */
51
+ state: StateMachineState;
52
+ };
53
+ /**
54
+ * Turns an xstate v5 machine (the machine, or its config) into a `StateMachine` definition: one
55
+ * state per top-level state node, one transition per target in each node's `on`.
56
+ *
57
+ * - A state's `label` is its `meta.label`, else its key; its `owner` is `meta.owner`; its `kind`
58
+ * is `meta.kind` when that is one of the five, else `terminal` for a `type: "final"` node,
59
+ * `initial` for the machine's `initial`, and `normal` for the rest.
60
+ * - Each `on` event, `always`, each `after` delay and each `invoke`'s `onDone` and `onError` is a
61
+ * transition. Its `event` is its `meta.label`, else the event's name (`always`, `after 500`,
62
+ * `done`, `error`). A transition with no target
63
+ * (it stays where it is), one that stays inside its own state, or one whose target is not a
64
+ * top-level state is left out.
65
+ * - `state` adjusts each state, for a machine whose meta says it another way: return the state to
66
+ * draw, given its key, its config and the state the rules above made of it.
67
+ *
68
+ * Only the top level is read: a nested state is drawn as its parent.
69
+ */
70
+ export declare function fromXState(machine: XStateMachineLike, options?: {
71
+ state?: ((input: XStateStateInput) => StateMachineState) | undefined;
72
+ }): StateMachineDefinition;
73
+ export {};
@@ -0,0 +1,110 @@
1
+ const text = (value) => typeof value === "string" && value !== "" ? value : undefined;
2
+ const KINDS = ["initial", "normal", "human", "terminal", "failed"];
3
+ const isKind = (value) => KINDS.some((kind) => kind === value);
4
+ const listOf = (value) => {
5
+ if (value === undefined)
6
+ return [];
7
+ return isList(value) ? value : [value];
8
+ };
9
+ function isList(value) {
10
+ return Array.isArray(value);
11
+ }
12
+ /** Every way a node moves on, each with the event name it is drawn with. */
13
+ function movesOf(node) {
14
+ const after = Object.entries(node.after ?? {}).map(([ms, t]) => [`after ${ms}`, t]);
15
+ const invoked = listOf(node.invoke).flatMap((i) => [
16
+ ["done", i.onDone],
17
+ ["error", i.onError],
18
+ ]);
19
+ return [...Object.entries(node.on ?? {}), ["always", node.always], ...after, ...invoked];
20
+ }
21
+ /** A node's kind: its `meta.kind`, else what its `type` and the machine's `initial` say. */
22
+ function kindOf(id, node, initial) {
23
+ const meta = node.meta?.["kind"];
24
+ if (isKind(meta))
25
+ return meta;
26
+ if (node.type === "final")
27
+ return "terminal";
28
+ const start = typeof initial === "object" ? initial.target : initial;
29
+ return id === start ? "initial" : "normal";
30
+ }
31
+ /**
32
+ * The top-level state a target names: `#machine.review`, `review.waiting` and `#rev` (the `id` of
33
+ * `review` or of a state inside it) are all `review`, and `.waiting` (a child of the state it
34
+ * leaves) is that state. Only the machine's top level is drawn, so a nested target lands on its
35
+ * parent.
36
+ */
37
+ function targetState(target, from, ids) {
38
+ if (target.startsWith("."))
39
+ return from;
40
+ if (!target.startsWith("#"))
41
+ return target.split(".")[0] ?? target;
42
+ const [id = "", next] = target.slice(1).split(".");
43
+ if (id === ids.machine)
44
+ return next ?? "";
45
+ return ids.nodes.get(id) ?? id;
46
+ }
47
+ /** Each node `id` in `node` and below it, mapped to `top`, the top-level state it is in. */
48
+ function nodeIds(top, node, into) {
49
+ if (node.id !== undefined)
50
+ into.set(node.id, top);
51
+ for (const child of Object.values(node.states ?? {}))
52
+ nodeIds(top, child, into);
53
+ }
54
+ function targets(config) {
55
+ if (config === undefined)
56
+ return { to: [], meta: undefined };
57
+ if (typeof config === "string")
58
+ return { to: [config], meta: undefined };
59
+ const target = config.target ?? [];
60
+ const to = typeof target === "string" ? [target] : target.filter((t) => t !== undefined);
61
+ return { to, meta: config.meta };
62
+ }
63
+ /**
64
+ * Turns an xstate v5 machine (the machine, or its config) into a `StateMachine` definition: one
65
+ * state per top-level state node, one transition per target in each node's `on`.
66
+ *
67
+ * - A state's `label` is its `meta.label`, else its key; its `owner` is `meta.owner`; its `kind`
68
+ * is `meta.kind` when that is one of the five, else `terminal` for a `type: "final"` node,
69
+ * `initial` for the machine's `initial`, and `normal` for the rest.
70
+ * - Each `on` event, `always`, each `after` delay and each `invoke`'s `onDone` and `onError` is a
71
+ * transition. Its `event` is its `meta.label`, else the event's name (`always`, `after 500`,
72
+ * `done`, `error`). A transition with no target
73
+ * (it stays where it is), one that stays inside its own state, or one whose target is not a
74
+ * top-level state is left out.
75
+ * - `state` adjusts each state, for a machine whose meta says it another way: return the state to
76
+ * draw, given its key, its config and the state the rules above made of it.
77
+ *
78
+ * Only the top level is read: a nested state is drawn as its parent.
79
+ */
80
+ export function fromXState(machine, options = {}) {
81
+ const config = "config" in machine ? machine.config : machine;
82
+ const nodes = Object.entries(config.states ?? {});
83
+ const keys = new Set(nodes.map(([id]) => id));
84
+ const found = new Map();
85
+ for (const [id, node] of nodes)
86
+ nodeIds(id, node, found);
87
+ // xstate names a machine with no `id` "(machine)".
88
+ const ids = { machine: config.id ?? "(machine)", nodes: found };
89
+ const states = nodes.map(([id, node]) => {
90
+ const meta = node.meta ?? {};
91
+ const kind = kindOf(id, node, config.initial);
92
+ const owner = text(meta["owner"]);
93
+ const state = {
94
+ id,
95
+ label: text(meta["label"]) ?? id,
96
+ kind,
97
+ ...(owner === undefined ? {} : { owner }),
98
+ };
99
+ return options.state ? options.state({ id, node, state }) : state;
100
+ });
101
+ const transitions = nodes.flatMap(([from, node]) => movesOf(node).flatMap(([event, on]) => listOf(on).flatMap((one) => {
102
+ const { to, meta } = targets(one);
103
+ const name = text(meta?.["label"]) ?? event;
104
+ return to
105
+ .map((t) => targetState(t, from, ids))
106
+ .filter((t) => t !== from && keys.has(t))
107
+ .map((t) => ({ from, to: t, event: name }));
108
+ })));
109
+ return { states, transitions };
110
+ }
package/dist/icons.d.ts CHANGED
@@ -6,7 +6,7 @@ import type { ReactElement } from "react";
6
6
  * icon's own shapes carry no `fill`, `stroke` or `stroke-width` (`Icon.test.tsx` holds them to
7
7
  * that). A name is the idea or action the icon stands for, not a product.
8
8
  */
9
- declare const NAMES: readonly ["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", "briefcase"];
9
+ declare const NAMES: readonly ["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", "play"];
10
10
  /** The names of the icon set: feature ideas, then UI glyphs, then the ideas the docs sections stand for. */
11
11
  export type IconName = (typeof NAMES)[number];
12
12
  /** The icon `name` as an `<svg>`: the set's one grid, stroke, caps and joins, drawn in `currentColor`. */
package/dist/icons.js CHANGED
@@ -25,7 +25,9 @@ const NAMES = [
25
25
  "settings",
26
26
  "bell",
27
27
  "check",
28
+ "alert",
28
29
  "plus",
30
+ "minus",
29
31
  "more",
30
32
  "grid",
31
33
  "window",
@@ -37,6 +39,9 @@ const NAMES = [
37
39
  "compass",
38
40
  "page",
39
41
  "briefcase",
42
+ "cart",
43
+ "pause",
44
+ "play",
40
45
  ];
41
46
  const GLYPHS = {
42
47
  /** Before and after, side by side: a minus on the left, a plus on the right. */
@@ -75,8 +80,12 @@ const GLYPHS = {
75
80
  bell: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M6 9.5a6 6 0 0 1 12 0c0 5 2 6.5 2 6.5H4s2-1.5 2-6.5Z" }), _jsx("path", { d: "M10 19.5a2.2 2.2 0 0 0 4 0" })] })),
76
81
  /** Done or selected: a single tick. */
77
82
  check: _jsx("path", { d: "m4.5 12.5 5 5L19.5 7" }),
83
+ /** Something is wrong: an exclamation mark in a ring. */
84
+ alert: (_jsxs(_Fragment, { children: [_jsx("circle", { cx: "12", cy: "12", r: "9" }), _jsx("path", { d: "M12 7.5v5.5M12 16.5v.01" })] })),
78
85
  /** Add or create: two strokes crossing, upright. */
79
86
  plus: _jsx("path", { d: "M12 5v14M5 12h14" }),
87
+ /** Less: one bar, the plus without its upright (a stepper's decrement). */
88
+ minus: _jsx("path", { d: "M5 12h14" }),
80
89
  /** More actions behind a menu: three dots in a row. */
81
90
  more: (_jsxs(_Fragment, { children: [_jsx("circle", { cx: "5.5", cy: "12", r: "1" }), _jsx("circle", { cx: "12", cy: "12", r: "1" }), _jsx("circle", { cx: "18.5", cy: "12", r: "1" })] })),
82
91
  /** Things laid out in a grid: four tiles. */
@@ -99,6 +108,12 @@ const GLYPHS = {
99
108
  page: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M7.5 3H14l5 5v10.5a2.5 2.5 0 0 1-2.5 2.5h-9A2.5 2.5 0 0 1 5 18.5v-13A2.5 2.5 0 0 1 7.5 3Z" }), _jsx("path", { d: "M14 3v3.5A1.5 1.5 0 0 0 15.5 8H19M9 13h6M9 16.5h6" })] })),
100
109
  /** Work for hire: a briefcase with its handle and clasp. */
101
110
  briefcase: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "3", y: "7.5", width: "18", height: "12", rx: "2.5" }), _jsx("path", { d: "M8.5 7.5V6a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v1.5M3 13h18M12 12v2.5" })] })),
111
+ /** A shopping bag: what a visitor has picked to buy (the cart). */
112
+ cart: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M5.5 8h13l-1 11.5a1.5 1.5 0 0 1-1.5 1.5H8a1.5 1.5 0 0 1-1.5-1.5Z" }), _jsx("path", { d: "M9 10.5V7a3 3 0 0 1 6 0v3.5" })] })),
113
+ /** Stop a moving thing for now: two upright bars. */
114
+ pause: _jsx("path", { d: "M9 6v12M15 6v12" }),
115
+ /** Start a moving thing: a triangle pointing forward. */
116
+ play: _jsx("path", { d: "M8 5.5v13l10-6.5Z" }),
102
117
  };
103
118
  /** The icon `name` as an `<svg>`: the set's one grid, stroke, caps and joins, drawn in `currentColor`. */
104
119
  export function iconGlyph(name) {
package/dist/index.d.ts CHANGED
@@ -1,11 +1,16 @@
1
- export { Card } from "./Card.js";
1
+ export { Card, type CardHue } from "./Card.js";
2
+ export { CardGridRow } from "./CardGrid.js";
2
3
  export { Pill, type PillTone } from "./Pill.js";
3
4
  export { Badge } from "./Badge.js";
4
5
  export { StatTile, type StatTileTone } from "./StatTile.js";
5
6
  export { ProgressBar, type BarSize, type BarTone } from "./ProgressBar.js";
6
7
  export { SplitBar } from "./SplitBar.js";
7
- export { Legend, StackedBar, type LegendItem, type StackedSegment, type VizTone, } from "./StackedBar.js";
8
+ export { Legend, StackedBar, type LegendItem, type SegmentTone, type StackedSegment, type VizTone, type CategoryTone, } from "./StackedBar.js";
8
9
  export { TrendChart, type TrendSeries } from "./TrendChart.js";
10
+ export { FlowDiagram, type FlowEdge, type FlowNode } from "./FlowDiagram.js";
11
+ export type { FlowBox, FlowDirection, FlowEdgePath, FlowLayout, FlowNodeBox, FlowPoint, } from "./flowLayout.js";
12
+ export { StateMachine, type StateMachineDefinition, type StateMachineItem, type StateMachineKind, type StateMachineState, type StateMachineTransition, } from "./StateMachine.js";
13
+ export { fromXState, type XStateMachineLike, type XStateNodeConfig, type XStateStateInput, type XStateTransitionConfig, } from "./fromXState.js";
9
14
  export { Markdown } from "./Markdown.js";
10
15
  export { AppShell, AppShellBrand, type AppShellDensity, appShellRootClassFor } from "./AppShell.js";
11
16
  export { SiteFooter, type SiteFooterLink } from "./SiteFooter.js";
@@ -13,13 +18,15 @@ export { Container } from "./Container.js";
13
18
  export { PageHeader } from "./PageHeader.js";
14
19
  export { Hero } from "./Hero.js";
15
20
  export { CardGrid, CenteredLayout, DetailLayout, FormLayout, FullBleedLayout, ListLayout, ProseLayout, } from "./PageLayouts.js";
21
+ export { ArticleLayout } from "./ArticleLayout.js";
16
22
  export { SidebarLayout } from "./SidebarLayout.js";
17
23
  export { DocsLayout, type DocsHeading, type DocsNavGroup, type DocsNeighbour, } from "./DocsLayout.js";
18
- export { SideColumn, type SideColumnWidth } from "./SideColumn.js";
24
+ export { SideColumn, type SideColumnSide, type SideColumnWidth } from "./SideColumn.js";
19
25
  export { StickyBar } from "./StickyBar.js";
20
26
  export { ErrorPage, Forbidden, Maintenance, NotFound, Offline } from "./StatusPages.js";
21
27
  export { Cluster, ClusterGrow, type ClusterAlign, type ClusterGrowMinWidth, type ClusterGap, type ClusterJustify, } from "./Cluster.js";
22
28
  export { Section, type SectionSize } from "./Section.js";
29
+ export type { HeadingLevel } from "./headingLevel.js";
23
30
  export { Stack, type StackAlign, type StackGap, type StackRowFrom, type StackWidth, } from "./Stack.js";
24
31
  export { Show, type Breakpoint } from "./Show.js";
25
32
  export { Button, type ButtonSize, type ButtonTone, type ButtonVariant } from "./Button.js";
@@ -28,18 +35,20 @@ export { type LinkAdapter, type LinkAdapterProps, LinkProvider } from "./link.js
28
35
  export { Avatar, type AvatarShape, type AvatarSize } from "./Avatar.js";
29
36
  export { AvatarStack, type AvatarStackPerson } from "./AvatarStack.js";
30
37
  export { Breadcrumbs, type Crumb } from "./Breadcrumbs.js";
38
+ export { Stepper } from "./Stepper.js";
31
39
  export { Pagination } from "./Pagination.js";
32
40
  export { BulletItem, BulletList } from "./BulletList.js";
33
41
  export { Callout } from "./Callout.js";
34
42
  export { ToastRegion, type Toast } from "./ToastRegion.js";
35
43
  export { ListRow } from "./ListRow.js";
36
44
  export { SortableItem, SortableList, type SortableMove, SortableSection } from "./SortableList.js";
37
- export { OutlineRegion, RegionFrame, type RegionRect } from "./OutlineRegion.js";
45
+ export { OutlineRegion, type OutlineRegionTone, RegionFrame, type RegionRect, } from "./OutlineRegion.js";
38
46
  export { type CellTone, Table, TableBody, TableCell, TableFoot, TableGroupRow, TableHead, TableExpandCell, TableHeaderCell, TableRow, type TableSort, } from "./Table.js";
39
- export type { RowTone } from "./tableRow.js";
47
+ export type { CellAlign, RowTone } from "./tableRow.js";
40
48
  export { InlineEdit } from "./InlineEdit.js";
41
49
  export { TableEditCell } from "./TableEditCell.js";
42
50
  export { EmptyState } from "./EmptyState.js";
51
+ export type { EmptySize } from "./emptySlot.js";
43
52
  export { Step, Steps, type StepsSize } from "./Steps.js";
44
53
  export { Timeline, TimelineItem } from "./Timeline.js";
45
54
  export { ChatComposer } from "./ChatComposer.js";
@@ -63,10 +72,12 @@ export { Icon } from "./Icon.js";
63
72
  export type { IconName } from "./icons.js";
64
73
  export { IconButton, type IconButtonTone, type IconButtonVariant } from "./IconButton.js";
65
74
  export { Menu, type MenuAction } from "./Menu.js";
75
+ export { Popover } from "./Popover.js";
66
76
  export { ColourSchemeToggle } from "./ColourSchemeToggle.js";
67
77
  export { applyColourScheme, schemeClass, type ColourSchemeClasses, colourSchemeScript, readColourScheme, storeColourScheme, type ColourScheme, } from "./colourScheme.js";
68
- export { Tabs, type Tab } from "./Tabs.js";
78
+ export { Tabs, type Tab, type TabButton } from "./Tabs.js";
69
79
  export { SegmentedControl, type Segment } from "./SegmentedControl.js";
80
+ export type { SwitchButton, SwitchLink } from "./switcher.js";
70
81
  export { Fieldset } from "./Fieldset.js";
71
82
  export { Checkbox } from "./Checkbox.js";
72
83
  export { Switch } from "./Switch.js";
@@ -78,22 +89,37 @@ export { CopyLine } from "./CopyLine.js";
78
89
  export { Field } from "./Field.js";
79
90
  export { FormGrid, FormRow, FormRowField, type FormRowSpan } from "./FormRow.js";
80
91
  export { FieldDialog } from "./FieldDialog.js";
92
+ export { ConfirmDialog } from "./ConfirmDialog.js";
81
93
  export { Input } from "./Input.js";
82
94
  export type { ControlSize, ControlWidth } from "./control.js";
83
95
  export type { ResponsiveSize, Size } from "./size.js";
84
96
  export type { Tone } from "./tone.js";
85
97
  export { MetaList, type MetaListSeparator } from "./MetaList.js";
86
98
  export { Kbd } from "./Kbd.js";
87
- export { KeyValue, KeyValueList } from "./KeyValueList.js";
88
- export { Select } from "./Select.js";
99
+ export { KeyValue, KeyValueList, type KeyValueAlign } from "./KeyValueList.js";
100
+ export { Select, type SelectItem } from "./Select.js";
101
+ export { Combobox } from "./Combobox.js";
102
+ export { NumberField } from "./NumberField.js";
103
+ export { Slider } from "./Slider.js";
89
104
  export { Textarea } from "./Textarea.js";
90
105
  export { Video } from "./Video.js";
106
+ export { Audio } from "./Audio.js";
107
+ export { EmbedFrame } from "./EmbedFrame.js";
108
+ export { ColourSwatch } from "./ColourSwatch.js";
91
109
  export { Image, type ImageAspect, type ImageWidth } from "./Image.js";
92
110
  export { MediaTile } from "./MediaTile.js";
111
+ export { Price } from "./Price.js";
112
+ export { ProductTile, type ProductTileStatus } from "./ProductTile.js";
113
+ export { CartButton } from "./CartButton.js";
114
+ export { PromoBanner } from "./PromoBanner.js";
115
+ export { CallToAction } from "./CallToAction.js";
93
116
  export { ScrollStrip } from "./ScrollStrip.js";
94
- export { TextLink, type TextLinkSize } from "./TextLink.js";
117
+ export { TextLink, type TextLinkSize, type TextLinkTone } from "./TextLink.js";
118
+ export { TableOfContents, type TableOfContentsItem } from "./TableOfContents.js";
95
119
  export { Caption, Display, Lead, Overline, PageHeading, Prose, SectionHeading, SubsectionHeading, type SubsectionHeadingSize, Text, type TextAlign, type TextLines, type TextMinWidth, type TextTone, } from "./typography.js";
120
+ export { Mark } from "./Mark.js";
96
121
  export { DateField } from "./DateField.js";
97
122
  export { DateRangePicker, type DateRange, type DateRangePreset } from "./DateRangePicker.js";
98
- export { fromISODate, toISODate } from "./isoDate.js";
99
- export type { CalendarDate } from "@internationalized/date";
123
+ export { DateTimeField } from "./DateTimeField.js";
124
+ export { fromISODate, fromISODateTime, toISODate, toISODateTime } from "./isoDate.js";
125
+ export type { CalendarDate, CalendarDateTime } from "@internationalized/date";
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { Card } from "./Card.js";
2
+ export { CardGridRow } from "./CardGrid.js";
2
3
  export { Pill } from "./Pill.js";
3
4
  export { Badge } from "./Badge.js";
4
5
  export { StatTile } from "./StatTile.js";
@@ -6,6 +7,9 @@ export { ProgressBar } from "./ProgressBar.js";
6
7
  export { SplitBar } from "./SplitBar.js";
7
8
  export { Legend, StackedBar, } from "./StackedBar.js";
8
9
  export { TrendChart } from "./TrendChart.js";
10
+ export { FlowDiagram } from "./FlowDiagram.js";
11
+ export { StateMachine, } from "./StateMachine.js";
12
+ export { fromXState, } from "./fromXState.js";
9
13
  export { Markdown } from "./Markdown.js";
10
14
  export { AppShell, AppShellBrand, appShellRootClassFor } from "./AppShell.js";
11
15
  export { SiteFooter } from "./SiteFooter.js";
@@ -13,6 +17,7 @@ export { Container } from "./Container.js";
13
17
  export { PageHeader } from "./PageHeader.js";
14
18
  export { Hero } from "./Hero.js";
15
19
  export { CardGrid, CenteredLayout, DetailLayout, FormLayout, FullBleedLayout, ListLayout, ProseLayout, } from "./PageLayouts.js";
20
+ export { ArticleLayout } from "./ArticleLayout.js";
16
21
  export { SidebarLayout } from "./SidebarLayout.js";
17
22
  export { DocsLayout, } from "./DocsLayout.js";
18
23
  export { SideColumn } from "./SideColumn.js";
@@ -28,13 +33,14 @@ export { LinkProvider } from "./link.js";
28
33
  export { Avatar } from "./Avatar.js";
29
34
  export { AvatarStack } from "./AvatarStack.js";
30
35
  export { Breadcrumbs } from "./Breadcrumbs.js";
36
+ export { Stepper } from "./Stepper.js";
31
37
  export { Pagination } from "./Pagination.js";
32
38
  export { BulletItem, BulletList } from "./BulletList.js";
33
39
  export { Callout } from "./Callout.js";
34
40
  export { ToastRegion } from "./ToastRegion.js";
35
41
  export { ListRow } from "./ListRow.js";
36
42
  export { SortableItem, SortableList, SortableSection } from "./SortableList.js";
37
- export { OutlineRegion, RegionFrame } from "./OutlineRegion.js";
43
+ export { OutlineRegion, RegionFrame, } from "./OutlineRegion.js";
38
44
  export { Table, TableBody, TableCell, TableFoot, TableGroupRow, TableHead, TableExpandCell, TableHeaderCell, TableRow, } from "./Table.js";
39
45
  export { InlineEdit } from "./InlineEdit.js";
40
46
  export { TableEditCell } from "./TableEditCell.js";
@@ -60,6 +66,7 @@ export { Lightbox } from "./Lightbox.js";
60
66
  export { Icon } from "./Icon.js";
61
67
  export { IconButton } from "./IconButton.js";
62
68
  export { Menu } from "./Menu.js";
69
+ export { Popover } from "./Popover.js";
63
70
  export { ColourSchemeToggle } from "./ColourSchemeToggle.js";
64
71
  export { applyColourScheme, schemeClass, colourSchemeScript, readColourScheme, storeColourScheme, } from "./colourScheme.js";
65
72
  export { Tabs } from "./Tabs.js";
@@ -75,18 +82,33 @@ export { CopyLine } from "./CopyLine.js";
75
82
  export { Field } from "./Field.js";
76
83
  export { FormGrid, FormRow, FormRowField } from "./FormRow.js";
77
84
  export { FieldDialog } from "./FieldDialog.js";
85
+ export { ConfirmDialog } from "./ConfirmDialog.js";
78
86
  export { Input } from "./Input.js";
79
87
  export { MetaList } from "./MetaList.js";
80
88
  export { Kbd } from "./Kbd.js";
81
89
  export { KeyValue, KeyValueList } from "./KeyValueList.js";
82
90
  export { Select } from "./Select.js";
91
+ export { Combobox } from "./Combobox.js";
92
+ export { NumberField } from "./NumberField.js";
93
+ export { Slider } from "./Slider.js";
83
94
  export { Textarea } from "./Textarea.js";
84
95
  export { Video } from "./Video.js";
96
+ export { Audio } from "./Audio.js";
97
+ export { EmbedFrame } from "./EmbedFrame.js";
98
+ export { ColourSwatch } from "./ColourSwatch.js";
85
99
  export { Image } from "./Image.js";
86
100
  export { MediaTile } from "./MediaTile.js";
101
+ export { Price } from "./Price.js";
102
+ export { ProductTile } from "./ProductTile.js";
103
+ export { CartButton } from "./CartButton.js";
104
+ export { PromoBanner } from "./PromoBanner.js";
105
+ export { CallToAction } from "./CallToAction.js";
87
106
  export { ScrollStrip } from "./ScrollStrip.js";
88
107
  export { TextLink } from "./TextLink.js";
108
+ export { TableOfContents } from "./TableOfContents.js";
89
109
  export { Caption, Display, Lead, Overline, PageHeading, Prose, SectionHeading, SubsectionHeading, Text, } from "./typography.js";
110
+ export { Mark } from "./Mark.js";
90
111
  export { DateField } from "./DateField.js";
91
112
  export { DateRangePicker } from "./DateRangePicker.js";
92
- export { fromISODate, toISODate } from "./isoDate.js";
113
+ export { DateTimeField } from "./DateTimeField.js";
114
+ export { fromISODate, fromISODateTime, toISODate, toISODateTime } from "./isoDate.js";