@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.
- package/MIGRATING.md +386 -8
- package/README.md +89 -44
- package/agent-docs/components/app-shell.md +9 -6
- package/agent-docs/components/article-layout.md +140 -0
- package/agent-docs/components/audio.md +42 -0
- package/agent-docs/components/badge.md +2 -1
- package/agent-docs/components/body-text.md +26 -15
- package/agent-docs/components/bottom-sheet.md +27 -17
- package/agent-docs/components/breadcrumbs.md +10 -6
- package/agent-docs/components/button.md +2 -2
- package/agent-docs/components/call-to-action.md +59 -0
- package/agent-docs/components/callout.md +4 -3
- package/agent-docs/components/card-grid.md +15 -7
- package/agent-docs/components/card.md +33 -18
- package/agent-docs/components/cart-button.md +63 -0
- package/agent-docs/components/chat-composer.md +4 -3
- package/agent-docs/components/checkbox.md +11 -5
- package/agent-docs/components/cluster.md +10 -8
- package/agent-docs/components/code-example.md +2 -2
- package/agent-docs/components/code.md +7 -5
- package/agent-docs/components/colour-scheme-toggle.md +12 -6
- package/agent-docs/components/colour-swatch.md +41 -0
- package/agent-docs/components/combobox.md +88 -0
- package/agent-docs/components/confirm-dialog.md +98 -0
- package/agent-docs/components/container.md +2 -1
- package/agent-docs/components/copy-button.md +7 -5
- package/agent-docs/components/copy-line.md +6 -5
- package/agent-docs/components/date-field.md +14 -11
- package/agent-docs/components/date-range-picker.md +16 -9
- package/agent-docs/components/date-time-field.md +73 -0
- package/agent-docs/components/dialog.md +22 -68
- package/agent-docs/components/disclosure.md +4 -0
- package/agent-docs/components/docs-layout.md +10 -6
- package/agent-docs/components/drawer.md +13 -4
- package/agent-docs/components/embed-frame.md +48 -0
- package/agent-docs/components/empty-state.md +4 -1
- package/agent-docs/components/field-dialog.md +6 -5
- package/agent-docs/components/field.md +10 -7
- package/agent-docs/components/fieldset.md +4 -4
- package/agent-docs/components/flow-diagram.md +87 -0
- package/agent-docs/components/form-layout.md +4 -1
- package/agent-docs/components/form-row.md +7 -7
- package/agent-docs/components/full-bleed-layout.md +0 -2
- package/agent-docs/components/headings.md +13 -7
- package/agent-docs/components/hero.md +11 -2
- package/agent-docs/components/icon-button.md +1 -3
- package/agent-docs/components/icon.md +6 -13
- package/agent-docs/components/image.md +24 -14
- package/agent-docs/components/input.md +8 -7
- package/agent-docs/components/key-value-list.md +4 -1
- package/agent-docs/components/lightbox.md +1 -1
- package/agent-docs/components/list-layout.md +5 -7
- package/agent-docs/components/list-row.md +37 -34
- package/agent-docs/components/loading.md +2 -2
- package/agent-docs/components/markdown.md +13 -13
- package/agent-docs/components/media-tile.md +8 -4
- package/agent-docs/components/menu.md +19 -12
- package/agent-docs/components/meta-list.md +2 -2
- package/agent-docs/components/morph.md +11 -5
- package/agent-docs/components/navigation-progress.md +2 -2
- package/agent-docs/components/number-field.md +75 -0
- package/agent-docs/components/outline-region.md +19 -8
- package/agent-docs/components/page-fade.md +2 -1
- package/agent-docs/components/pill.md +7 -6
- package/agent-docs/components/popover.md +63 -0
- package/agent-docs/components/price.md +49 -0
- package/agent-docs/components/product-tile.md +78 -0
- package/agent-docs/components/promo-banner.md +46 -0
- package/agent-docs/components/prose-layout.md +1 -1
- package/agent-docs/components/radio-group.md +9 -6
- package/agent-docs/components/scroll-strip.md +3 -3
- package/agent-docs/components/segmented-control.md +4 -2
- package/agent-docs/components/select.md +8 -3
- package/agent-docs/components/show.md +2 -2
- package/agent-docs/components/side-column.md +13 -9
- package/agent-docs/components/sidebar-layout.md +1 -1
- package/agent-docs/components/site-footer.md +4 -4
- package/agent-docs/components/site-search.md +21 -9
- package/agent-docs/components/slider.md +59 -0
- package/agent-docs/components/sortable-list.md +15 -10
- package/agent-docs/components/stack.md +3 -3
- package/agent-docs/components/stacked-bar.md +7 -4
- package/agent-docs/components/state-machine.md +95 -0
- package/agent-docs/components/status-pages.md +13 -6
- package/agent-docs/components/stepper.md +54 -0
- package/agent-docs/components/switch.md +4 -4
- package/agent-docs/components/table-of-contents.md +78 -0
- package/agent-docs/components/table.md +35 -24
- package/agent-docs/components/tabs.md +24 -26
- package/agent-docs/components/text-link.md +12 -7
- package/agent-docs/components/textarea.md +4 -2
- package/agent-docs/components/toast.md +19 -14
- package/agent-docs/components/video.md +7 -2
- package/agent-docs/llms.txt +22 -3
- package/dist/AppShell.d.ts +25 -9
- package/dist/AppShell.js +67 -33
- package/dist/AppShellMenu.d.ts +31 -18
- package/dist/AppShellMenu.js +72 -45
- package/dist/ArticleLayout.d.ts +36 -0
- package/dist/ArticleLayout.js +27 -0
- package/dist/Audio.d.ts +16 -0
- package/dist/Audio.js +11 -0
- package/dist/Badge.d.ts +2 -1
- package/dist/Badge.js +3 -2
- package/dist/BottomSheet.d.ts +17 -6
- package/dist/BottomSheet.js +62 -11
- package/dist/Breadcrumbs.d.ts +8 -6
- package/dist/Breadcrumbs.js +17 -7
- package/dist/Button.d.ts +4 -2
- package/dist/Button.js +9 -87
- package/dist/CallToAction.d.ts +25 -0
- package/dist/CallToAction.js +17 -0
- package/dist/Callout.d.ts +2 -2
- package/dist/Callout.js +2 -2
- package/dist/Card.d.ts +88 -31
- package/dist/Card.js +55 -92
- package/dist/CardBody.d.ts +2 -0
- package/dist/CardBody.js +33 -3
- package/dist/CardGrid.d.ts +32 -4
- package/dist/CardGrid.js +42 -8
- package/dist/CardParts.d.ts +7 -1
- package/dist/CardParts.js +7 -2
- package/dist/CartButton.d.ts +33 -0
- package/dist/CartButton.js +18 -0
- package/dist/ChatComposer.d.ts +10 -4
- package/dist/ChatComposer.js +35 -13
- package/dist/Checkbox.d.ts +21 -3
- package/dist/Checkbox.js +66 -20
- package/dist/Chevron.js +1 -1
- package/dist/Cluster.d.ts +28 -15
- package/dist/Cluster.js +21 -4
- package/dist/Code.d.ts +15 -3
- package/dist/Code.js +23 -3
- package/dist/CodeBlock.d.ts +4 -4
- package/dist/CodeBlock.js +2 -2
- package/dist/CodeBody.d.ts +1 -1
- package/dist/CodeBody.js +4 -10
- package/dist/CodeExample.d.ts +1 -1
- package/dist/CodeExample.js +3 -2
- package/dist/ColourSchemeToggle.d.ts +21 -5
- package/dist/ColourSchemeToggle.js +15 -9
- package/dist/ColourSwatch.d.ts +15 -0
- package/dist/ColourSwatch.js +14 -0
- package/dist/Combobox.d.ts +42 -0
- package/dist/Combobox.js +43 -0
- package/dist/ConfirmDialog.d.ts +40 -0
- package/dist/ConfirmDialog.js +36 -0
- package/dist/Container.d.ts +3 -3
- package/dist/Container.js +1 -1
- package/dist/CopyButton.d.ts +8 -2
- package/dist/CopyButton.js +38 -28
- package/dist/CopyLine.d.ts +4 -2
- package/dist/CopyLine.js +4 -4
- package/dist/DateCalendar.d.ts +2 -0
- package/dist/DateCalendar.js +11 -9
- package/dist/DateField.d.ts +52 -21
- package/dist/DateField.js +73 -37
- package/dist/DateFieldCalendar.d.ts +12 -8
- package/dist/DateFieldCalendar.js +37 -18
- package/dist/DateRangePicker.d.ts +23 -3
- package/dist/DateRangePicker.js +10 -8
- package/dist/DateTimeField.d.ts +31 -0
- package/dist/DateTimeField.js +19 -0
- package/dist/Dialog.d.ts +42 -6
- package/dist/Dialog.js +50 -12
- package/dist/Disclosure.js +9 -1
- package/dist/DocsLayout.d.ts +13 -5
- package/dist/DocsLayout.js +11 -9
- package/dist/Drawer.d.ts +22 -7
- package/dist/Drawer.js +89 -8
- package/dist/EmbedFrame.d.ts +36 -0
- package/dist/EmbedFrame.js +18 -0
- package/dist/Field.d.ts +41 -4
- package/dist/Field.js +61 -25
- package/dist/FieldDialog.d.ts +8 -3
- package/dist/FieldDialog.js +19 -9
- package/dist/Fieldset.d.ts +3 -3
- package/dist/Fieldset.js +7 -9
- package/dist/FileDrop.js +2 -1
- package/dist/FlowDiagram.d.ts +92 -0
- package/dist/FlowDiagram.js +100 -0
- package/dist/FormRow.d.ts +6 -4
- package/dist/FormRow.js +11 -9
- package/dist/Hero.d.ts +30 -7
- package/dist/Hero.js +23 -9
- package/dist/Icon.d.ts +1 -1
- package/dist/Icon.js +1 -1
- package/dist/IconButton.js +1 -1
- package/dist/Image.d.ts +33 -9
- package/dist/Image.js +61 -16
- package/dist/Input.d.ts +1 -1
- package/dist/Input.js +4 -4
- package/dist/InputShell.d.ts +7 -0
- package/dist/InputShell.js +18 -3
- package/dist/KeyValueList.d.ts +2 -2
- package/dist/Lightbox.js +5 -3
- package/dist/ListRow.d.ts +4 -5
- package/dist/ListRow.js +36 -26
- package/dist/Mark.d.ts +10 -0
- package/dist/Mark.js +9 -0
- package/dist/Markdown.d.ts +18 -4
- package/dist/Markdown.js +176 -37
- package/dist/MediaTile.d.ts +9 -3
- package/dist/MediaTile.js +8 -4
- package/dist/Menu.d.ts +19 -8
- package/dist/Menu.js +13 -11
- package/dist/MetaList.d.ts +4 -3
- package/dist/MetaList.js +12 -4
- package/dist/Morph.d.ts +15 -1
- package/dist/Morph.js +70 -22
- package/dist/NavigationProgress.d.ts +2 -2
- package/dist/NavigationProgress.js +7 -5
- package/dist/NumberField.d.ts +66 -0
- package/dist/NumberField.js +68 -0
- package/dist/OutlineRegion.d.ts +41 -10
- package/dist/OutlineRegion.js +31 -6
- package/dist/PageFade.d.ts +9 -5
- package/dist/PageFade.js +39 -8
- package/dist/PageLayouts.d.ts +15 -5
- package/dist/PageLayouts.js +3 -3
- package/dist/Pill.d.ts +9 -4
- package/dist/Pill.js +15 -6
- package/dist/Popover.d.ts +31 -0
- package/dist/Popover.js +43 -0
- package/dist/Price.d.ts +21 -0
- package/dist/Price.js +34 -0
- package/dist/ProductTile.d.ts +36 -0
- package/dist/ProductTile.js +31 -0
- package/dist/ProgressBar.js +4 -2
- package/dist/PromoBanner.d.ts +25 -0
- package/dist/PromoBanner.js +16 -0
- package/dist/RadioGroup.d.ts +18 -8
- package/dist/RadioGroup.js +42 -18
- package/dist/ScrollStrip.d.ts +1 -1
- package/dist/ScrollStrip.js +1 -1
- package/dist/SearchInput.d.ts +17 -2
- package/dist/SearchInput.js +72 -13
- package/dist/SegmentedField.d.ts +15 -0
- package/dist/SegmentedField.js +15 -0
- package/dist/Select.js +5 -4
- package/dist/Show.d.ts +1 -1
- package/dist/Show.js +1 -1
- package/dist/SideColumn.d.ts +42 -15
- package/dist/SideColumn.js +45 -19
- package/dist/SiteFooter.d.ts +3 -3
- package/dist/SiteFooter.js +4 -3
- package/dist/SiteSearch.d.ts +57 -27
- package/dist/SiteSearch.js +13 -93
- package/dist/Slider.d.ts +27 -0
- package/dist/Slider.js +58 -0
- package/dist/SortableList.d.ts +19 -35
- package/dist/SortableList.js +36 -88
- package/dist/Stack.d.ts +4 -4
- package/dist/StackedBar.d.ts +13 -4
- package/dist/StackedBar.js +12 -7
- package/dist/StateMachine.d.ts +65 -0
- package/dist/StateMachine.js +116 -0
- package/dist/StatusPages.d.ts +28 -10
- package/dist/StatusPages.js +10 -10
- package/dist/Stepper.d.ts +21 -0
- package/dist/Stepper.js +33 -0
- package/dist/Steps.js +4 -3
- package/dist/Switch.d.ts +3 -3
- package/dist/Switch.js +18 -14
- package/dist/Table.d.ts +32 -9
- package/dist/Table.js +50 -20
- package/dist/TableCells.d.ts +24 -21
- package/dist/TableCells.js +68 -27
- package/dist/TableEditCell.d.ts +1 -1
- package/dist/TableOfContents.d.ts +34 -0
- package/dist/TableOfContents.js +23 -0
- package/dist/Tabs.d.ts +31 -16
- package/dist/Tabs.js +97 -22
- package/dist/TextLink.d.ts +18 -5
- package/dist/TextLink.js +19 -6
- package/dist/Textarea.d.ts +12 -1
- package/dist/Textarea.js +15 -2
- package/dist/ToastRegion.d.ts +17 -9
- package/dist/ToastRegion.js +70 -13
- package/dist/Tooltip.d.ts +10 -2
- package/dist/Tooltip.js +32 -11
- package/dist/Video.d.ts +19 -4
- package/dist/Video.js +15 -5
- package/dist/cardContext.d.ts +7 -0
- package/dist/cardContext.js +14 -0
- package/dist/cardControl.d.ts +15 -0
- package/dist/cardControl.js +32 -0
- package/dist/cardForm.d.ts +39 -0
- package/dist/cardForm.js +81 -0
- package/dist/cardWait.js +2 -1
- package/dist/colourScheme.d.ts +12 -2
- package/dist/colourScheme.js +32 -6
- package/dist/control.d.ts +30 -8
- package/dist/control.js +74 -7
- package/dist/copyScript.d.ts +7 -8
- package/dist/copyScript.js +8 -9
- package/dist/core/button.d.ts +33 -0
- package/dist/core/button.js +89 -0
- package/dist/core/control.d.ts +15 -0
- package/dist/core/control.js +14 -0
- package/dist/core/fixtures/button.d.ts +26 -0
- package/dist/core/fixtures/button.js +52 -0
- package/dist/core/fixtures/types.d.ts +13 -0
- package/dist/core/fixtures/types.js +10 -0
- package/dist/core/focus.d.ts +7 -0
- package/dist/core/focus.js +7 -0
- package/dist/core/index.d.ts +12 -0
- package/dist/core/index.js +12 -0
- package/dist/core/parity.d.ts +22 -0
- package/dist/core/parity.js +53 -0
- package/dist/core/themeNative.d.ts +62 -0
- package/dist/core/themeNative.js +290 -0
- package/dist/cx.d.ts +17 -5
- package/dist/cx.js +18 -5
- package/dist/dateLocale.d.ts +17 -0
- package/dist/dateLocale.js +30 -0
- package/dist/density.d.ts +17 -3
- package/dist/density.js +30 -19
- package/dist/emptySlot.d.ts +1 -0
- package/dist/fieldAnnounce.d.ts +11 -0
- package/dist/fieldAnnounce.js +36 -0
- package/dist/fieldControl.d.ts +7 -2
- package/dist/fieldControl.js +6 -2
- package/dist/fieldWait.d.ts +3 -3
- package/dist/fieldWait.js +3 -4
- package/dist/flowLayout.d.ts +68 -0
- package/dist/flowLayout.js +105 -0
- package/dist/focus.d.ts +2 -0
- package/dist/focus.js +9 -0
- package/dist/fromXState.d.ts +73 -0
- package/dist/fromXState.js +110 -0
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +15 -0
- package/dist/index.d.ts +37 -11
- package/dist/index.js +24 -2
- package/dist/isoDate.d.ts +8 -1
- package/dist/isoDate.js +20 -1
- package/dist/labelWords.d.ts +16 -7
- package/dist/labelWords.js +14 -12
- package/dist/listRowProps.d.ts +17 -15
- package/dist/modal.d.ts +5 -0
- package/dist/modal.js +21 -1
- package/dist/navFold.js +6 -3
- package/dist/optionCard.d.ts +18 -0
- package/dist/optionCard.js +16 -0
- package/dist/scrollBody.d.ts +16 -0
- package/dist/scrollBody.js +15 -0
- package/dist/scrollEdges.d.ts +7 -0
- package/dist/scrollEdges.js +39 -5
- package/dist/scrollStop.d.ts +6 -2
- package/dist/scrollStop.js +24 -8
- package/dist/shownDate.d.ts +28 -10
- package/dist/shownDate.js +41 -22
- package/dist/siteSearchBody.d.ts +34 -0
- package/dist/siteSearchBody.js +117 -0
- package/dist/size.d.ts +7 -1
- package/dist/sortableDrop.d.ts +44 -0
- package/dist/sortableDrop.js +78 -0
- package/dist/sortableSlide.d.ts +9 -0
- package/dist/sortableSlide.js +70 -0
- package/dist/sortableTitle.d.ts +10 -0
- package/dist/sortableTitle.js +48 -0
- package/dist/stateMachineDots.d.ts +77 -0
- package/dist/stateMachineDots.js +188 -0
- package/dist/stickyColumn.d.ts +2 -2
- package/dist/stickyColumn.js +2 -2
- package/dist/switcher.d.ts +10 -5
- package/dist/switcher.js +7 -5
- package/dist/tableColumns.d.ts +17 -0
- package/dist/tableColumns.js +30 -2
- package/dist/tableEmpty.js +5 -5
- package/dist/tableRow.d.ts +26 -2
- package/dist/tableRow.js +23 -1
- package/dist/tableSort.d.ts +10 -5
- package/dist/tableSort.js +15 -4
- package/dist/target.d.ts +12 -0
- package/dist/target.js +12 -0
- package/dist/textBox.js +1 -1
- package/dist/truncated.d.ts +31 -0
- package/dist/truncated.js +51 -0
- package/dist/typography.d.ts +19 -11
- package/dist/typography.js +11 -13
- package/dist/useFlowLayout.d.ts +38 -0
- package/dist/useFlowLayout.js +122 -0
- package/package.json +5 -3
package/MIGRATING.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## @hackcove is now @slashsuite: the npm scope moves
|
|
4
4
|
|
|
5
|
-
If the app is still on 0.10, run the codemod (below, "Running the codemod") first:
|
|
5
|
+
If the app is still on 0.10, run the codemod (below, "Running the codemod") first: the 0.10 to 0.11
|
|
6
|
+
pass matches imports from `@hackcove/ui-react` only, so after the swap it finds nothing and says
|
|
7
|
+
nothing. The later steps, `--unpin` and `--to-0.13`, read either name.
|
|
6
8
|
|
|
7
9
|
Every Slash package moves from the `@hackcove` npm scope to `@slashsuite`, and keeps the part after the scope:
|
|
8
10
|
`@hackcove/ui-react` is `@slashsuite/ui-react`, `@hackcove/themes` is `@slashsuite/themes`. There is no alias
|
|
@@ -241,7 +243,7 @@ row, the size of the buttons in it. An explicit prop on the child always wins.
|
|
|
241
243
|
| Old | New | |
|
|
242
244
|
| --- | --- | --- |
|
|
243
245
|
| `Stack`, `Section` with no `gap` | the same at page level; inside a `Card`, `Dialog`, `Drawer`, `BottomSheet`, `Callout` or `ListRow` the gap is `xs` | codemod writes `gap="md"` where there is none, so nothing moves |
|
|
244
|
-
| `Cluster` with no `wrap` | now wraps: `wrap={false}` keeps one line | codemod writes `wrap={false}`;
|
|
246
|
+
| `Cluster` with no `wrap` | now wraps: `wrap={false}` keeps one line | codemod writes `wrap={false}`; keeps a bare `wrap`, which `--unpin` removes |
|
|
245
247
|
| `Cluster` with no `gap` | now `sm` (was `xs`) | codemod writes `gap="xs"` |
|
|
246
248
|
| `MetaList nowrap` | leave it out: an item never breaks inside itself | codemod drops it |
|
|
247
249
|
| `ListRow active` | `highlighted` | codemod |
|
|
@@ -281,7 +283,7 @@ A table is named by `label`, says a column of figures once in its head, and is p
|
|
|
281
283
|
| `Table variant="plain"` | leave it out: a table inside a `Card` is plain | codemod drops it |
|
|
282
284
|
| `TableHeaderCell srLabel` | `label` | codemod |
|
|
283
285
|
| `TableHeaderCell align="end"` over a column of `numeric` cells | `TableHeaderCell numeric`: the title and every cell under it are end aligned in tabular figures | codemod, where the first body row's cell in that column is `numeric` |
|
|
284
|
-
| `TableCell numeric align="end"` | `numeric` alone: it implies `end` | codemod
|
|
286
|
+
| `TableCell numeric align="end"` | `numeric` alone: it implies `end` | codemod keeps `align="end"`, which `--unpin` removes |
|
|
285
287
|
| `TableCell tone="default"` | leave it out: `neutral` is the default | codemod drops it |
|
|
286
288
|
| `TableCell tone="neutral"` (`text-slate-600`) | `neutral`, now `text-slate-700`, the one plain cell ink | nothing to change |
|
|
287
289
|
|
|
@@ -377,8 +379,11 @@ Each `file:line` it prints is a **by hand** row above, on a line of the rewritte
|
|
|
377
379
|
them, then typecheck: what TypeScript still flags sits on or next to a line the codemod printed. The
|
|
378
380
|
lists under "TypeScript does not flag these" are what is left to check by eye.
|
|
379
381
|
|
|
380
|
-
The pins it writes (`as="span"`, `gap="md"`, `wrap={false}`, `align="start"
|
|
381
|
-
|
|
382
|
+
The pins it writes or keeps (`as="span"`, `gap="md"`, `wrap={false}`, a bare `wrap`, `align="start"`,
|
|
383
|
+
`align="end"` on a `numeric` cell) keep the 0.10 look. Run it once: on its own output it changes
|
|
384
|
+
nothing and prints nothing new, except a bare `Text` it made from `as="p"`, which a second run reads
|
|
385
|
+
as 0.10 and pins `as="span"` again. Once the app is on 0.11, the second step takes the pins out:
|
|
386
|
+
see "0.11 to 0.12: drop the pins".
|
|
382
387
|
|
|
383
388
|
## 0.11 to 0.12: drop the pins
|
|
384
389
|
|
|
@@ -391,7 +396,7 @@ bun <checkout>/tools/codemod/src/run.ts src --unpin # a dry run
|
|
|
391
396
|
bun <checkout>/tools/codemod/src/run.ts src --unpin --write # rewrites the files
|
|
392
397
|
```
|
|
393
398
|
|
|
394
|
-
`--unpin` runs only these rules, never the 0.11 pass, which would write every pin back. It cannot
|
|
399
|
+
`--unpin` runs only these rules, never the 0.11 pass, which would write every pin back. It reads imports from `@hackcove/ui-react` and `@slashsuite/ui-react` alike. It cannot
|
|
395
400
|
tell a pin it wrote from one a person wrote, so it removes a pin only where the new default draws
|
|
396
401
|
the same thing, and prints a `file:line` for each one a person decides.
|
|
397
402
|
|
|
@@ -399,9 +404,382 @@ the same thing, and prints a `file:line` for each one a person decides.
|
|
|
399
404
|
| --- | --- | --- |
|
|
400
405
|
| `Text as="span"`, `Caption as="span"` | the text is a `<p>`, a block on its own line: the same in a column, but anything inline beside it moves to the next line, and a long `Text` alone in a plain block (a `Card`, a `Callout`, a `div`) now wraps at 72 characters, the measure for reading | codemod removes it when the element sits directly in a `Stack`, `Section` or `Field`, or is the one child of a `Card`, `Dialog`, `Drawer`, `BottomSheet`, `Callout`, `Fieldset`, `div`, `section`, `article`, `main`, `header`, `footer` or `li`; anywhere else (a row, a cell, a button, a sentence, a `map`, next to a sibling in a plain block) it stays and is reported |
|
|
401
406
|
| `Stack gap="md"`, `Section gap="md"` | nothing at page level, where `md` is the default; inside a `Card`, `Dialog`, `Drawer`, `BottomSheet`, `Callout`, `ListRow` or `CenteredLayout` (which draws a `Card`) the gap closes to `xs`, the new look | codemod removes it when no such container holds it in the same file; inside one it stays and is reported, and so does a `Section` with a `size` other than `md`, whose size sets its gap. A component rendered inside a `Card` from another file takes `xs` too: the codemod reads one file at a time |
|
|
402
|
-
| `Cluster wrap={false}` | the row wraps onto a second line when it runs out of room |
|
|
403
|
-
| `align="start"` on a `numeric` `TableCell` or `TableEditCell` | the figures line up at the end of the cell | codemod removes
|
|
407
|
+
| `Cluster wrap={false}`, `Cluster wrap` | the row wraps onto a second line when it runs out of room | codemod removes `wrap={false}`, a bare `wrap` and `wrap={true}`; `wrap` set to an expression stays and is reported |
|
|
408
|
+
| `align="start"` or `align="end"` on a `numeric` `TableCell` or `TableEditCell` | the figures line up at the end of the cell | codemod removes either when `numeric` is bare or `{true}`; `align="start"` with an expression for `numeric` stays and is reported |
|
|
404
409
|
| `Field htmlFor` with the control's matching `id` | nothing on screen: a `Field` makes its own id and gives it to the `Input`, `Select`, `Textarea` or `FileDrop` inside it, so the label still names the control. The control's DOM id becomes a generated one, so search the app for the old id (a stylesheet, a test selector, a link from another page) before you merge | codemod removes both when they name only each other in the file (no `aria-describedby`, `href="#…"`, `getElementById` or second use); `htmlFor={id}` with `id={id}` goes too when `id` is a `const id = useId()`, whose line is then reported as unused. An id from a prop or a `useId` that is not React's, a template string, a raw `<input>` or anything else stays and is reported. The 0.11 pass runs this rule as well, so an app still going 0.10 to 0.11 gets it in one run |
|
|
410
|
+
| `Callout tone="info"` | a callout with no `tone` is `neutral`, a grey note, not the blue one | by hand: every one is reported, since the new default never draws the same box; remove it unless the note must stay blue |
|
|
411
|
+
|
|
412
|
+
A `FormRowField`'s `htmlFor` stays: it is still required and goes straight onto the `<label>`, so
|
|
413
|
+
the codemod neither removes nor reports it.
|
|
414
|
+
|
|
415
|
+
## 0.12 to 0.13: one breaking pass
|
|
416
|
+
|
|
417
|
+
0.13 breaks in these areas, each in its own section below: dates, forms and fields, the AppShell
|
|
418
|
+
menu, the docs that left the site, the cards and layouts, the table and list drag, the navigation
|
|
419
|
+
and tabs, the overlays, menus and toasts, and the names in "One word for one job". The codemod
|
|
420
|
+
(`--to-0.13`, at the end of this section) makes most of the renames. Nothing else in 0.13 is
|
|
421
|
+
breaking, so an app that compiles against the 0.12 names and runs its tests after these edits is
|
|
422
|
+
ready.
|
|
423
|
+
|
|
424
|
+
### Date fields follow the locale
|
|
425
|
+
|
|
426
|
+
`DateField`, `DateRangePicker` and the calendar were always en-GB (DD/MM/YYYY, English month names).
|
|
427
|
+
They now follow the browser's locale: an en-US reader sees 11/29/2026, an en-ZA reader 2026/11/29.
|
|
428
|
+
What a form posts does not change: `name`, `startName` and `endName` still post `YYYY-MM-DD`, and the
|
|
429
|
+
values are still `CalendarDate`s. TypeScript flags nothing.
|
|
430
|
+
|
|
431
|
+
- To keep the old look everywhere, wrap the app in `I18nProvider locale="en-GB"` from
|
|
432
|
+
`react-aria-components`, or give one field `locale="en-GB"`.
|
|
433
|
+
- A `hint` that spells the order ("DD/MM/YYYY") is now wrong for some readers: drop it, or set
|
|
434
|
+
`locale` to the order it names.
|
|
435
|
+
- A test that types digits into a field types them in the order the browser's locale puts them.
|
|
436
|
+
jsdom and Playwright default to en-US; set the locale the test means.
|
|
437
|
+
- The out-of-range message now writes its bound in the field's own order ("The date must be on or
|
|
438
|
+
after 15/10/2026."), where it used the browser's.
|
|
439
|
+
|
|
440
|
+
New, nothing to change: `DateTimeField` (a `CalendarDateTime`, posted as `YYYY-MM-DDTHH:mm`),
|
|
441
|
+
`toISODateTime`, `fromISODateTime` and the `CalendarDateTime` type.
|
|
442
|
+
|
|
443
|
+
### Forms: errors keep the hint and are announced once
|
|
444
|
+
|
|
445
|
+
A field's error now draws under its hint, with an alert icon, where it used to replace the hint. The
|
|
446
|
+
error is announced through one `aria-live="polite"` region per page (or per open dialog), not a
|
|
447
|
+
`role="alert"` on each field. The control names its drawn error in `aria-describedby`. TypeScript
|
|
448
|
+
flags nothing. Check these in your app:
|
|
449
|
+
|
|
450
|
+
- A test that asks for the `alert` of a field finds nothing. Find the error by its text, or by the
|
|
451
|
+
control's `aria-describedby`.
|
|
452
|
+
- A field error is polite, so a screen reader waits for a pause. A message that must interrupt is a
|
|
453
|
+
`Callout tone="danger"`, which is still `role="alert"`.
|
|
454
|
+
- A test that expected the hint to disappear on error now sees both the hint and the error.
|
|
455
|
+
- `FormGrid` and `FormRow` stack by the width they have (a 36rem container query), so a grid in a
|
|
456
|
+
`Dialog` or a side column stacks.
|
|
457
|
+
- A small choice (`Checkbox`, `Radio`, a `Switch` `sm`) grows its hit area to 44px under a coarse
|
|
458
|
+
pointer (a finger). A test that clicks by pixel position on a desktop viewport is unaffected.
|
|
459
|
+
|
|
460
|
+
### Forms: submit, Escape and the search field
|
|
461
|
+
|
|
462
|
+
- `FieldDialog` and `ChatComposer` no longer disable submit on an empty field. An empty submit marks
|
|
463
|
+
the field invalid, shows `emptyReason` as its error (`ChatComposer` defaults to "Write a message
|
|
464
|
+
first.") and keeps focus there. A test that expected a disabled submit submits and reads the error.
|
|
465
|
+
- After a `Dialog` form's `onSubmit` settles (sync, resolved or rejected), focus moves to the first
|
|
466
|
+
field with `aria-invalid="true"`.
|
|
467
|
+
- In an `Input type="search"` with a value, Escape empties the field and fires `onChange`, and the
|
|
468
|
+
focus stays. The key does not bubble past the field, so a `Dialog` around it stays open. A caller's
|
|
469
|
+
`onKeyDown` that calls `preventDefault` stops the clear.
|
|
470
|
+
|
|
471
|
+
### AppShell's phone menu is a popover
|
|
472
|
+
|
|
473
|
+
The phone menu is the browser's popover (`popovertarget`), not a `<details>`. The nav and
|
|
474
|
+
`menuControls` render once, inside the panel, and fold into the menu together. From `md` the panel
|
|
475
|
+
draws no box and its parts sit in the header row. The subnav is its own row from `md` and never
|
|
476
|
+
folds; below `md` its phone copy is hidden, so there is one `nav` with that name at every width.
|
|
477
|
+
|
|
478
|
+
A test or stylesheet that targets the `<details>` menu, or that finds the nav twice (once in the
|
|
479
|
+
header, once in the menu), finds it once now.
|
|
480
|
+
|
|
481
|
+
### The docs left the site
|
|
482
|
+
|
|
483
|
+
The hack-cove.com site lives in its own repository. This repo keeps the docs tooling as
|
|
484
|
+
`@slashsuite/docs` (`tools/docs`), and the site's `apps/hack-cove-site` is gone. No package API
|
|
485
|
+
changes. Three things can reach an app:
|
|
486
|
+
|
|
487
|
+
- An app that imported `apps/hack-cove-site/src/content/ui.ts` imports `packages/ui-react/docs/ui.ts`.
|
|
488
|
+
Only that file's header comment changed.
|
|
489
|
+
- A caller of the `ui-review.yml` reusable workflow pinned to an older ref keeps the old site build.
|
|
490
|
+
Move the pin to a ref that has `tools/docs` to build `llms.txt` with `docs:llms`.
|
|
491
|
+
- `ui-review-self.yml` is removed. It reviewed the site as consumer code, and no consumer code is
|
|
492
|
+
left in this repo.
|
|
493
|
+
|
|
494
|
+
### Also visible in 0.13, not breaking
|
|
495
|
+
|
|
496
|
+
- The colour scheme follows the system live when nothing is stored. `ColourSchemeToggle`'s `onChange`
|
|
497
|
+
gets a second argument, `followsSystem`, and choosing the system's scheme forgets the stored choice.
|
|
498
|
+
Add `<meta name="color-scheme" content="light dark">` (the README's "Light and dark").
|
|
499
|
+
- `StackedBar` and its `Legend` swatch take a `quiet` tone that draws no fill, for the remainder
|
|
500
|
+
that matters least.
|
|
501
|
+
|
|
502
|
+
### A tab's `controls` is gone: give it its `panel`
|
|
503
|
+
|
|
504
|
+
A button tab took `controls`, the id of a `tabpanel` the caller drew and wired by hand. A tab now
|
|
505
|
+
takes its `panel`, and `Tabs` renders it: `role="tabpanel"`, labelled by the tab, its id in the
|
|
506
|
+
tab's `aria-controls`, hidden while another tab is current (find in page still reaches it and
|
|
507
|
+
switches to its tab). TypeScript flags every `controls`. Move the view into the tab's `panel` and
|
|
508
|
+
delete the hand-drawn `tabpanel`:
|
|
509
|
+
|
|
510
|
+
```tsx
|
|
511
|
+
// before
|
|
512
|
+
<Tabs items={[{ value: "a", label: "A", controls: "panel" }]} value={v} onChange={setV} label="Views" />
|
|
513
|
+
<div id="panel" role="tabpanel">{v === "a" && <ViewA />}</div>
|
|
514
|
+
|
|
515
|
+
// after
|
|
516
|
+
<Tabs items={[{ value: "a", label: "A", panel: <ViewA /> }]} value={v} onChange={setV} label="Views" />
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
Every tab's panel is now mounted, the hidden ones too, so find in page can reach them. A view that
|
|
520
|
+
fetches or subscribes as it mounts now does so on page load, for every tab. To mount only the
|
|
521
|
+
current view, give the others `null`: `panel: v === "a" ? <ViewA /> : null`. Its tab is still wired
|
|
522
|
+
to its panel, but find in page no longer reaches that view's text.
|
|
523
|
+
|
|
524
|
+
### ListRow's `revealOnHover` is gone
|
|
525
|
+
|
|
526
|
+
A static row's `actions` are always shown. An action that appears only on hover is one a touch or
|
|
527
|
+
keyboard user cannot find. TypeScript flags every `revealOnHover`: delete it. Where the row now
|
|
528
|
+
looks busy, keep one action in view and put the rest in a `Menu` in `actions`.
|
|
529
|
+
|
|
530
|
+
### CopyLine takes a required `label`
|
|
531
|
+
|
|
532
|
+
`CopyLine`'s button was named "Copy" on every line, so two lines on a page could not be told apart.
|
|
533
|
+
`label` says what the line is, and the button is named "Copy " and it; it still reads "Copy".
|
|
534
|
+
TypeScript flags every `CopyLine` without one: `<CopyLine text="bun add x" label="install command" />`.
|
|
535
|
+
A test that finds the button by the name "Copy" finds it by "Copy install command".
|
|
536
|
+
|
|
537
|
+
### Dialog has its own close button
|
|
538
|
+
|
|
539
|
+
Every `Dialog` now has a close button in its top corner, named "Close" (`closeLabel` renames it).
|
|
540
|
+
A footer whose only button was a Close or Done that just closes the dialog is now a second way out:
|
|
541
|
+
drop it. Keep a footer whose button does something (Save, Delete).
|
|
542
|
+
|
|
543
|
+
### CopyButton shows a failed copy
|
|
544
|
+
|
|
545
|
+
A refused or missing clipboard now shows "Failed" for two seconds and announces it, where it showed
|
|
546
|
+
nothing; `failedLabel` renames it. The button is at least 24px square, so a row of small text may
|
|
547
|
+
grow by a few pixels. It renders no `<style>` element any more, so it works under a strict CSP.
|
|
548
|
+
A test that finds the `data-copied` attribute finds the copied label's visibility instead.
|
|
549
|
+
|
|
550
|
+
### ToastRegion reads toasts as text, and waits for a modal
|
|
551
|
+
|
|
552
|
+
A toast that leaves on its own now stays eight seconds, not five. Its status reads the title and
|
|
553
|
+
body as one line of text, and a toast with `actions` adds "Actions available" (`actionsLabel`), so
|
|
554
|
+
the buttons are no longer inside the `role="status"`: a test that finds a toast's title or button
|
|
555
|
+
within the status finds it in the region instead. While a `Dialog`, `Drawer` or `Lightbox` is open,
|
|
556
|
+
new toasts wait and show once it closes. Dismissing a toast moves the focus to the next toast's
|
|
557
|
+
close button, or back to where it was.
|
|
558
|
+
|
|
559
|
+
### One word for one job
|
|
560
|
+
|
|
561
|
+
Several parts named the same job differently. Each now takes the word the rest of the library uses,
|
|
562
|
+
with no alias. TypeScript flags every old name, and `--to-0.13` (below) makes most swaps.
|
|
563
|
+
|
|
564
|
+
| Old | New |
|
|
565
|
+
| --- | --- |
|
|
566
|
+
| `ListRow divided` | gone: put the rows in a `Stack divided`, which draws the line between them |
|
|
567
|
+
| `SubsectionHeading truncate`, `TableCell truncate` | `lines={1}`, as on `Text` |
|
|
568
|
+
| a `Menu` item's `onSelect` | `onClick` |
|
|
569
|
+
| a `Menu` item's `disabled` | `disabledReason`: the words under the label that say why it cannot be chosen yet |
|
|
570
|
+
| `ToastRegion toasts` | `items` |
|
|
571
|
+
| a toast's `body` | `description` |
|
|
572
|
+
| `DocsLayout navLabel` | `asideLabel`, as on `SidebarLayout` |
|
|
573
|
+
|
|
574
|
+
`ListRow divided` drew the line from the row, so a row on its own or the last in a list could not
|
|
575
|
+
know whether to draw one. The `Stack` that holds the rows draws it:
|
|
576
|
+
|
|
577
|
+
```tsx
|
|
578
|
+
// before
|
|
579
|
+
<Card flush>
|
|
580
|
+
{rows.map((row) => <ListRow key={row.id} divided>{row.name}</ListRow>)}
|
|
581
|
+
</Card>
|
|
582
|
+
// after
|
|
583
|
+
<Card flush>
|
|
584
|
+
<Stack divided>
|
|
585
|
+
{rows.map((row) => <ListRow key={row.id}>{row.name}</ListRow>)}
|
|
586
|
+
</Stack>
|
|
587
|
+
</Card>
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
A dimmed `Menu` item says why: `disabledReason` is a muted line under its label and the item's
|
|
591
|
+
description for a screen reader. An item with no reason to give is left out of `items`.
|
|
592
|
+
|
|
593
|
+
### Cluster wraps its list items
|
|
594
|
+
|
|
595
|
+
`Cluster as="ul"` and `as="ol"` now put each child in its own `<li>`, as `CardGrid as="ul"` does.
|
|
596
|
+
TypeScript flags nothing. An app that wrote the `<li>`s gets an `<li>` in an `<li>`: drop its own.
|
|
597
|
+
The codemod unwraps the plain ones and reports the rest.
|
|
598
|
+
|
|
599
|
+
```tsx
|
|
600
|
+
// before
|
|
601
|
+
<Cluster as="ul" aria-label="Tags">
|
|
602
|
+
<li><Pill>Vintage</Pill></li>
|
|
603
|
+
</Cluster>
|
|
604
|
+
// after
|
|
605
|
+
<Cluster as="ul" aria-label="Tags">
|
|
606
|
+
<Pill>Vintage</Pill>
|
|
607
|
+
</Cluster>
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
### A danger toast interrupts
|
|
611
|
+
|
|
612
|
+
A `danger` toast is read through a `role="alert"`, so a screen reader reads it at once; the rest
|
|
613
|
+
stay polite. A test that finds a danger toast's words in the `status` finds them in the `alert`.
|
|
614
|
+
|
|
615
|
+
### SiteFooter links its brand to the app's home
|
|
616
|
+
|
|
617
|
+
`SiteFooter`'s brand links to the nearest `LinkProvider`'s `home` when `brandHref` is left out,
|
|
618
|
+
where it always linked to `/`. An app with no `home` set sees no change. `links` and `notes` take
|
|
619
|
+
readonly arrays.
|
|
620
|
+
|
|
621
|
+
### Text and the headings take no element props
|
|
622
|
+
|
|
623
|
+
`Text`, `Caption`, `Overline`, `Lead`, `Display`, `PageHeading`, `SectionHeading` and
|
|
624
|
+
`SubsectionHeading` took every attribute of the element `as` picked. They now take `id`, `data-*` and
|
|
625
|
+
`aria-*`, and `Text` and `Caption` also take `title` (the full text on hover of a run that `lines` cuts).
|
|
626
|
+
TypeScript flags every other prop: `role`, `htmlFor`, `onClick` and the rest. Put the element that
|
|
627
|
+
needs it around the text:
|
|
628
|
+
|
|
629
|
+
```tsx
|
|
630
|
+
// before
|
|
631
|
+
<Text id="panel" role="tabpanel">Shots for this build.</Text>
|
|
632
|
+
// after
|
|
633
|
+
<div id="panel" role="tabpanel">
|
|
634
|
+
<Text>Shots for this build.</Text>
|
|
635
|
+
</div>
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
An `Overline as="label" htmlFor` is a `Field`'s label: use the `Field`.
|
|
639
|
+
|
|
640
|
+
### Containers and rows take `id`, `data-*` and `aria-*`
|
|
641
|
+
|
|
642
|
+
These took every attribute of their element and now take `id`, `data-*` and `aria-*`, plus the few
|
|
643
|
+
props listed. TypeScript flags the rest; move a handler or attribute to an element you own around or
|
|
644
|
+
inside the part.
|
|
645
|
+
|
|
646
|
+
| Part | Still takes |
|
|
647
|
+
| --- | --- |
|
|
648
|
+
| `Container`, `CodeBlock`, `OutlineRegion` | nothing more |
|
|
649
|
+
| `Card` with `href` | `download`, `rel`, `onClick` (`external` is the one way to open a new tab, so `target` is gone) |
|
|
650
|
+
| `ListRow` with neither `href` nor `onClick` | `onPointerEnter`, `onPointerLeave`, `onFocus`, `onBlur`, which set `highlighted` |
|
|
651
|
+
| `Stack as="form"` | `onSubmit`, `action`, `method`, `noValidate`, `name`, `autoComplete` |
|
|
652
|
+
| `Stack as="ul"`, `Stack as="ol"` | `empty` |
|
|
653
|
+
|
|
654
|
+
### RegionFrame's `loading` is the skeleton's
|
|
655
|
+
|
|
656
|
+
`RegionFrame` took the `<img>`'s attributes, so `loading` was the browser's `"lazy"` or `"eager"`.
|
|
657
|
+
`loading` is now the skeleton's boolean, as on `Image`: with no `src` yet it draws a bone of its
|
|
658
|
+
shape. `src` may be `undefined`. Of the `<img>`'s own props it keeps `alt` and `onLoad`, plus `id`,
|
|
659
|
+
`data-*` and `aria-*`. TypeScript flags `loading="lazy"`: delete it. A screenshot in a frame is
|
|
660
|
+
drawn when it is shown, so it has nothing to defer. TypeScript also flags every other `<img>` prop,
|
|
661
|
+
such as `decoding`, `srcSet` and `title`: delete it.
|
|
662
|
+
|
|
663
|
+
### Markdown's headings follow the page outline
|
|
664
|
+
|
|
665
|
+
`Markdown` always drew `## ` as an `h2` and `### ` as an `h3`. `## ` is now one level below the
|
|
666
|
+
heading that holds the Markdown, and `### ` one below that, stopping at `h6`. On the page they are
|
|
667
|
+
still `h2` and `h3`. In a `Section` they are `h3` and `h4`, and in a titled `Card` in a `Section`
|
|
668
|
+
`h4` and `h5`. They look the same as before. TypeScript flags nothing. A test that finds such a
|
|
669
|
+
heading by `level` passes the new level.
|
|
670
|
+
|
|
671
|
+
### Every built-in word has a prop
|
|
672
|
+
|
|
673
|
+
The English words a part draws on its own now each have a `*Label` prop, for an app in another
|
|
674
|
+
language: `FieldDialog` `cancelLabel`; `DateField` (with `calendar`) `clearLabel`; `DateRangePicker`
|
|
675
|
+
`startLabel`, `endLabel`, `toLabel` and `clearLabel`; `ColourSchemeToggle` `darkLabel` and
|
|
676
|
+
`lightLabel`; `SiteSearch` `buttonLabel`, `placeholder`, `hintLabel`, `noResultsLabel` and
|
|
677
|
+
`countLabel` (a function of the count, for plurals, as `Pagination`'s `pageLabel`); `NotFound`,
|
|
678
|
+
`ErrorPage`, `Offline` and `Forbidden` `homeLabel`; `ErrorPage` and `Offline` `retryLabel`;
|
|
679
|
+
`ErrorPage` `detailLabel`; `SortableSection` `endLabel`; `SortableItem` `reorderLabel`. Each
|
|
680
|
+
defaults to the word it drew before, so nothing changes. `Pill`'s `removeLabel` is optional now: left
|
|
681
|
+
out, the remove button is named "Remove" and the pill's text.
|
|
682
|
+
|
|
683
|
+
New, nothing to change: `Menu` takes `open` and `onOpenChange` to hold the menu open from the app's
|
|
684
|
+
state, and `DocsLayout` takes `loading` and `loadingLabel`. `Drawer` takes `onSubmit` and `error` as `Dialog` does. `ProseLayout`'s
|
|
685
|
+
`width` is typed from `StackWidth` (`narrow`, `wide`, `full`, as before). These types are now
|
|
686
|
+
exported: `HeadingLevel`, `SelectItem`, `EmptySize`, `CellAlign` (a table cell's `align`),
|
|
687
|
+
`CategoryTone`, `KeyValueAlign`, `SwitchButton` and `SwitchLink`.
|
|
688
|
+
|
|
689
|
+
### SortableList drags by its handle
|
|
690
|
+
|
|
691
|
+
A pointer now drags a `SortableItem` by its grip handle only; a drag that starts anywhere else on
|
|
692
|
+
the row starts nothing, so text in a row can be selected and a scroll on a phone is not taken for a
|
|
693
|
+
drag. The keyboard is unchanged. TypeScript flags nothing. A test that drags a row by its body
|
|
694
|
+
drags it by the button named "Reorder " and its title. A moved row now slides to its new place,
|
|
695
|
+
and does not under `prefers-reduced-motion`.
|
|
696
|
+
|
|
697
|
+
### SideColumn folds only with `fold`
|
|
698
|
+
|
|
699
|
+
`SideColumn`'s `asideLabel` now only names the `<aside>` landmark. Folding the aside behind a
|
|
700
|
+
disclosure below `lg` is its own choice, `fold`, which needs `asideLabel` to name the disclosure.
|
|
701
|
+
TypeScript flags nothing: an aside that folded now shows below `lg`. Add `fold` to keep it folded.
|
|
702
|
+
|
|
703
|
+
```tsx
|
|
704
|
+
// before
|
|
705
|
+
<SideColumn aside={agent} asideLabel="Ask the reply agent">{thread}</SideColumn>
|
|
706
|
+
// after
|
|
707
|
+
<SideColumn aside={agent} asideLabel="Ask the reply agent" fold>{thread}</SideColumn>
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
### Steps md reads at the body size
|
|
711
|
+
|
|
712
|
+
`Steps size="md"` sets each step's title and detail at the body size (1rem on a 1.5rem line), as
|
|
713
|
+
running text is, in place of the small size. Nothing changes in the code; each step is taller, so
|
|
714
|
+
a page with a `Steps` moves down. `size="lg"` is unchanged.
|
|
715
|
+
|
|
716
|
+
### Image's `framed` is `mat="white"`
|
|
717
|
+
|
|
718
|
+
`Image` took `framed` for a white mat under a QR code. It now takes `mat`: `"white"` is that mat,
|
|
719
|
+
and the new `"page"` sets a screenshot on a mat in the page's own tone. TypeScript flags `framed`:
|
|
720
|
+
write `mat="white"` for `framed`, and delete `framed={false}`. An own theme that remaps the palette
|
|
721
|
+
adds the page mat, as `.your-scope .bg-zinc-50 { background-color: <your page tone>; }`.
|
|
722
|
+
|
|
723
|
+
Every `Image` now loads lazily, and every `Video` too where the browser supports it, so one far
|
|
724
|
+
down the page is fetched only when it comes near. Give the one picture at the top of the page
|
|
725
|
+
`priority`, so it loads first. `Video` now holds a fixed shape, 16:9 unless `aspect` says another,
|
|
726
|
+
and a clip of another shape is letterboxed in it.
|
|
727
|
+
`ImageAspect` has a new `16:10` and `ImageWidth` a new `xl` (448px): a `Record` keyed by either needs
|
|
728
|
+
the new key.
|
|
729
|
+
|
|
730
|
+
### Card's `as` is gone: a titled Card is an article
|
|
731
|
+
|
|
732
|
+
A panel Card (no `href` or `onPress`) with a `title` or an `aria-label` is now an `<article>`, in
|
|
733
|
+
place of a `<section>`, and any other Card a `<div>`. `as` is gone: TypeScript flags it. Delete `as="article"` from a titled Card.
|
|
734
|
+
An untitled Card that was an `article` gets a `title` (with `titleStyle="name"` for a thing with a
|
|
735
|
+
name) or an `aria-label`. A test that finds a Card by `getByRole("region")` finds it by
|
|
736
|
+
`getByRole("article")`.
|
|
737
|
+
|
|
738
|
+
### A link card is named by its title
|
|
739
|
+
|
|
740
|
+
A Card with `href` was one link named by all of its text: the title, the body and the `badge`. Its
|
|
741
|
+
link is now named by the title alone, and an untitled link card by the card's text. Nothing changes
|
|
742
|
+
in the code. A test that finds the link by its whole text, as `getByRole("link", { name: "Home Your
|
|
743
|
+
home page" })`, finds it by the title, `{ name: "Home" }`.
|
|
744
|
+
|
|
745
|
+
### Card takes `hue`, `dashed`, `onPress`, `more` and `width`
|
|
746
|
+
|
|
747
|
+
These are new; nothing breaks, but Card's props are now a union of a panel, a link card (`href`)
|
|
748
|
+
and a button card (`onPress`), so a value typed `ComponentProps<typeof Card>` that passes `href` and `onPress` together, or
|
|
749
|
+
`more` on a panel, is flagged. `dashed` was removed in 0.11 in favour of `EmptyState`, and comes back
|
|
750
|
+
with another meaning: a card for something not real yet, such as a plan beside a measured result. An
|
|
751
|
+
empty state is still an `EmptyState`. An own theme that remaps the palette adds the six peer hues
|
|
752
|
+
`hue` paints: `bg-orange-100`, `bg-violet-100`, `bg-sky-100`, `bg-emerald-100`, `bg-amber-100` and
|
|
753
|
+
`bg-blue-100`, with their `-300` borders.
|
|
754
|
+
|
|
755
|
+
### A cut one-line run shows its text in a tooltip
|
|
756
|
+
|
|
757
|
+
`Code lines={1}`, `TableCell lines={1}` and a cut `Breadcrumbs` parent showed their whole text in a
|
|
758
|
+
native `title`. Where the browser has anchor positioning they now show it in the library's tooltip,
|
|
759
|
+
on hover, keyboard focus and a tap, and a plain run is a focus stop while it is cut; elsewhere they
|
|
760
|
+
keep the `title`. Nothing changes in the code. A browser test that read the `title` of a cut run
|
|
761
|
+
hovers it and reads the tooltip.
|
|
762
|
+
|
|
763
|
+
### Running the codemod for 0.13
|
|
764
|
+
|
|
765
|
+
A third codemod step makes the renames 0.13 ships. It runs alone, on 0.12 code, never with
|
|
766
|
+
`--unpin`, and reads imports from `@hackcove/ui-react` and `@slashsuite/ui-react` alike:
|
|
767
|
+
|
|
768
|
+
```bash
|
|
769
|
+
bun <checkout>/tools/codemod/src/run.ts src --to-0.13 # a dry run
|
|
770
|
+
bun <checkout>/tools/codemod/src/run.ts src --to-0.13 --write # rewrites the files
|
|
771
|
+
```
|
|
772
|
+
|
|
773
|
+
| Old | New | |
|
|
774
|
+
| --- | --- | --- |
|
|
775
|
+
| `ListRow divided` | gone: put the rows in a `Stack divided` | codemod removes it and reports the row, so a person adds the `Stack` |
|
|
776
|
+
| `SubsectionHeading truncate`, `TableCell truncate` | `lines={1}` | codemod for a bare `truncate` or `{true}`, and removes `{false}`; one set to an expression is reported |
|
|
777
|
+
| `Menu items`: an action's `onSelect` | `onClick` | codemod in an inline array of object literals, and in a literal the same file types `MenuAction` (or an array of it) from the package; a `Menu` whose `items` the file does not write out in full is reported |
|
|
778
|
+
| `ToastRegion toasts` | `items` | codemod |
|
|
779
|
+
| a toast's `body` | `description` | codemod in an inline `items` array and in a literal the same file types `Toast` (or an array of it) from the package; a `ToastRegion` whose toasts the file does not write out in full is reported once |
|
|
780
|
+
| `DocsLayout navLabel` | `asideLabel` | codemod |
|
|
781
|
+
| a `Menu` item's `disabled` | `disabledReason` | by hand: every one is reported, since only a person can write the reason |
|
|
782
|
+
| `Cluster as="ul"` or `as="ol"` with an `<li>` round each child | the children alone: the Cluster wraps each one in an `<li>` | codemod unwraps an `<li>` with no attribute but `key` round one element, and moves its `key` onto that element; any other `<li>` (another attribute, the element has its own `key`, more than one child, one inside a `map`) is reported |
|
|
405
783
|
|
|
406
784
|
## 0.9 → 0.10: Avatar `2xl` is 64px, the old 96px is `3xl`
|
|
407
785
|
|