@slashsuite/ui-react 0.12.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +1 -0
- package/dist/Button.js +4 -3
- 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 +113 -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/cx.d.ts +22 -3
- package/dist/cx.js +22 -3
- package/dist/dateLocale.d.ts +17 -0
- package/dist/dateLocale.js +30 -0
- package/dist/density.d.ts +15 -1
- package/dist/density.js +27 -8
- 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/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 +45 -0
- package/dist/stateMachineDots.js +162 -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 +27 -0
- package/dist/useFlowLayout.js +119 -0
- package/package.json +3 -2
|
@@ -24,6 +24,7 @@ import { StackedBar } from "@slashsuite/ui-react";
|
|
|
24
24
|
- `items` are `{ label, value, tone }` in the order to draw; `tone` is `muted`, `positive`, `warn`, `danger`, `info`, `neutral` (a grey apart from `muted`) or `accent`, and you map your own roles onto them. Five distinguishable parts are `warn`, `info`, `danger`, `neutral` and `muted`.
|
|
25
25
|
- Categories with no meaning (shops by kind, spend by group) take the categorical scale, `cat1` to `cat8`, from `cat1` upwards in order; good and bad take the meaning tones; never both in one chart. Each theme publishes the same eight as `--hc-cat-1` to `--hc-cat-8`, so a map pin can match its `Legend`.
|
|
26
26
|
- Set `legend` so every colour is named in words under the bar, with its value.
|
|
27
|
+
- The part that matters least (not measured, not counted) is `quiet`: no fill, so the bar's track shows through and the part reads as the bar's empty end. Put it last. It is under the contrast a chart mark needs, so a bar with a `quiet` part always draws its `Legend`, where the value is named.
|
|
27
28
|
- `Legend` alone is the key for colours drawn elsewhere, such as a `TableRow` `stripe`. An item with `swatch: "dashed"` is a dashed ring with no fill, the key for an outline drawn over the chart.
|
|
28
29
|
- `size` is `sm`, `md` (default) or `lg`. A part with no value is zero wide.
|
|
29
30
|
- Two parties are a `SplitBar`; progress toward a total is a `ProgressBar`.
|
|
@@ -68,7 +69,7 @@ A bar of any number of parts, each sized by its share of the sum, in the order g
|
|
|
68
69
|
- id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
|
|
69
70
|
- items: readonly StackedSegment[] (required). The parts in order, each a `label`, a `value` (its share is the value over the sum) and a `tone`.
|
|
70
71
|
- label: string (required). What the bar shows, for a screen reader, which hears it before every part's name and percent.
|
|
71
|
-
- legend: boolean (default false). Draw the key under the bar. Defaults to false.
|
|
72
|
+
- legend: boolean (default false). Draw the key under the bar. Defaults to false; a bar with a `quiet` part always draws it.
|
|
72
73
|
- loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
|
|
73
74
|
Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
|
|
74
75
|
- loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
|
|
@@ -83,6 +84,8 @@ Left out, the part takes the nearest loading layout's or part's; `false` opts it
|
|
|
83
84
|
- loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
|
|
84
85
|
|
|
85
86
|
### Types
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
87
|
+
- CategoryTone: `"cat1" | "cat2" | "cat3" | "cat4" | "cat5" | "cat6" | "cat7" | "cat8"`. The categorical scale: eight colours that say only "this category", never good or bad.
|
|
88
|
+
- LegendItem: `{ label: string; tone: SegmentTone; swatch?: "solid" | "dashed"; detail?: string | number }`. One entry of a `Legend`: the `label` the colour stands for, its swatch, and an optional `detail` (a count, a share) after it.
|
|
89
|
+
- SegmentTone: `VizTone | "quiet"`. The colour of a `StackedBar` part or a `Legend` swatch: a `VizTone`, or `quiet`, the remainder that matters least (not measured, not counted). A quiet part has no fill, so the bar's track shows through and the part reads as the empty end of the bar, quieter than `neutral` in every theme; put it last, where the bar ends. It sits under the 3:1 a chart mark needs, so its value is always named in words: a bar with a quiet part draws its `Legend`, and the key's quiet swatch is the track colour with an edge.
|
|
90
|
+
- StackedSegment: `{ label: string; value: number; tone: SegmentTone }`. One part of a `StackedBar`: its `label`, its `value` (its share is `value` over the sum) and its colour.
|
|
91
|
+
- VizTone: `TextTone | CategoryTone`. The colour of a `StackedBar` segment, a `Legend` swatch or a `TrendChart` series: the `TextTone` names, painted as a fill, or a category colour, `cat1` to `cat8`. On a chart `neutral` is a grey of its own that sits apart from `muted` (for "unmeasured" next to "same"), and `accent` is the theme's accent, apart from `info`. Categories with no meaning take `cat1` upwards in order; good and bad take the meaning tones; one chart never mixes the two.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
## StateMachine
|
|
2
|
+
|
|
3
|
+
Group: Data
|
|
4
|
+
|
|
5
|
+
When to use: The states a thing goes through and the events that move it, with where each thing is now: tickets in a workflow, orders in fulfilment, jobs in a queue.
|
|
6
|
+
|
|
7
|
+
### The one right way
|
|
8
|
+
One state waits on a person, and only it is `human`: it stands out, and its tag says so.
|
|
9
|
+
```tsx
|
|
10
|
+
import { StateMachine } from "@slashsuite/ui-react";
|
|
11
|
+
|
|
12
|
+
<StateMachine
|
|
13
|
+
label="Article flow"
|
|
14
|
+
states={[
|
|
15
|
+
{ id: "draft", label: "Draft", kind: "initial", owner: "writer" },
|
|
16
|
+
{ id: "review", label: "In review", kind: "human", owner: "editor" },
|
|
17
|
+
{ id: "published", label: "Published", kind: "terminal" },
|
|
18
|
+
]}
|
|
19
|
+
transitions={[
|
|
20
|
+
{ from: "draft", to: "review", event: "submit" },
|
|
21
|
+
{ from: "review", to: "draft", event: "send back" },
|
|
22
|
+
{ from: "review", to: "published", event: "approve" },
|
|
23
|
+
]}
|
|
24
|
+
items={[{ id: "A-12", label: "Spring launch post", state: "review" }]}
|
|
25
|
+
/>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Do
|
|
29
|
+
- Give it `states` (`{ id, label, kind, owner }`), `transitions` (`{ from, to, event }`) and `items` (`{ id, label, state, href }`), plain data with no layout: it is drawn like a `FlowDiagram`.
|
|
30
|
+
- `kind` says what a state is: `human` for a state waiting on a person (the warn tone), `failed` for an error (danger), `terminal` for done (muted), `initial` for the start. Each is also a tag in words. Leave the rest `normal`.
|
|
31
|
+
- `owner` is the role or lane that acts in a state, a tag on its box.
|
|
32
|
+
- An item's `id` is its short ref, shown by its dot; its `label` is the full name, its tooltip and what a screen reader says. Give `href` and the dot is a link.
|
|
33
|
+
- Change an item's `state` and its dot runs along the arrow to its new box; there is nothing to call.
|
|
34
|
+
- `active` rings the one state that is current, for a machine with one thing in it.
|
|
35
|
+
- Made with xstate? `fromXState(machine)` gives `states` and `transitions`; its `state` option maps your own `meta` onto `kind` and `owner`.
|
|
36
|
+
|
|
37
|
+
### Don't
|
|
38
|
+
- Do not leave an item out because its state is unknown: it goes in the "Not in any state" box, where someone sees it.
|
|
39
|
+
- Do not mark every state `human` or `failed`: the one that needs a person no longer stands out.
|
|
40
|
+
|
|
41
|
+
Every state marked `human`: nothing stands out, and the tags say nothing.
|
|
42
|
+
```tsx
|
|
43
|
+
import { StateMachine } from "@slashsuite/ui-react";
|
|
44
|
+
|
|
45
|
+
<StateMachine
|
|
46
|
+
label="Article flow"
|
|
47
|
+
states={[
|
|
48
|
+
{ id: "draft", label: "Draft", kind: "human", owner: "writer" },
|
|
49
|
+
{ id: "review", label: "In review", kind: "human", owner: "editor" },
|
|
50
|
+
{ id: "published", label: "Published", kind: "human" },
|
|
51
|
+
]}
|
|
52
|
+
transitions={[
|
|
53
|
+
{ from: "draft", to: "review", event: "submit" },
|
|
54
|
+
{ from: "review", to: "draft", event: "send back" },
|
|
55
|
+
{ from: "review", to: "published", event: "approve" },
|
|
56
|
+
]}
|
|
57
|
+
items={[{ id: "A-12", label: "Spring launch post", state: "review" }]}
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Accessibility
|
|
62
|
+
- The drawing is an image named by `label`, with the count of states and transitions; the box round it is a group named by `label`, and takes the keyboard focus so a machine that scrolls can be scrolled with the arrow keys.
|
|
63
|
+
- Each dot is named by its item's label and its state (`Fix the login, in Review`), and takes the focus; one with `href` is a link. A box with more than nine shows a `+N` button that shows the rest.
|
|
64
|
+
- A visually hidden list after it carries every state, its tags and the transitions out of it, as `FlowDiagram`'s does.
|
|
65
|
+
- With reduced motion a dot moves to its new state at once, with no run.
|
|
66
|
+
|
|
67
|
+
### Props
|
|
68
|
+
### StateMachine
|
|
69
|
+
A state machine, drawn, with the things moving through it: each state a box, each transition an arrow named by its event, laid out like a `FlowDiagram`. A state's `kind` sets its look and a tag that says it: `human` takes the warn tone, `failed` the danger tone, `terminal` is muted, and `initial` is tagged start. Its `owner` is a tag beside it. Each of the `items` is a coloured dot with its short `id`, in the box of its `state`, which counts them; a box shows up to nine and a `+N` for the rest. The dot's name and tooltip is its full `label`, and with an `href` it is a link. An item whose state is not in the machine goes in a box of its own, "Not in any state", so nothing is dropped. When an item's state changes, its dot runs along the arrow between the two (straight across when there is none); with reduced motion it moves at once. `active` rings the one state that is current. `fromXState` makes `states` and `transitions` from an xstate machine.
|
|
70
|
+
- active: string. The `id` of the one state to ring as current.
|
|
71
|
+
- id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
|
|
72
|
+
- items: readonly StateMachineItem[] (default []). The things in the machine, each in the state its `state` names.
|
|
73
|
+
- label: string (required). What the machine is: its accessible name.
|
|
74
|
+
- loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
|
|
75
|
+
Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
|
|
76
|
+
- loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
|
|
77
|
+
- states: readonly StateMachineState[] (required). The states, each with a unique `id`.
|
|
78
|
+
- transitions: readonly StateMachineTransition[] (required). The moves between them. One whose `from` or `to` is not a state is not drawn.
|
|
79
|
+
|
|
80
|
+
### Types
|
|
81
|
+
- StateMachineDefinition: `{ states: readonly StateMachineState[]; transitions: readonly StateMachineTransition[] }`. The machine: its states and the transitions between them. `fromXState` makes one from an xstate machine.
|
|
82
|
+
- StateMachineState: `{ id: string; label: string; kind?: StateMachineKind; owner?: string }`. One state: its `id` (what a transition's `from` and `to` and an item's `state` name), its `label`, its `kind`, and the role that `owner`s it.
|
|
83
|
+
- StateMachineKind: `"initial" | "normal" | "human" | "terminal" | "failed"`. What a state is: `initial` (where things start), `normal`, `human` (waiting on a person), `terminal` (done, nothing leaves it) or `failed` (stopped on an error).
|
|
84
|
+
- StateMachineTransition: `{ from: string; to: string; event?: string }`. One move between states, with the `event` that makes it, shown on the arrow.
|
|
85
|
+
- StateMachineItem: `{ id: string; label: string; state: string; href?: string }`. A thing in the machine: its short `id` (a ref, shown by its dot), its full `label` (the dot's name and tooltip), the `state` it is in, and an optional `href` its dot links to.
|
|
86
|
+
- XStateMachineLike: `{ id?: string | undefined; initial?: string | { target: string; } | undefined; states?: Record<string, XStateNodeConfig> | undefined; } | { config: { id?: string | undefined; initial?: string | { target: string; } | undefined; states?: Record<string, XStateNodeConfig> | undefined; }; }`. A machine's config, or what `setup(…).createMachine(config)` returns (it keeps it as `config`).
|
|
87
|
+
- XStateNodeConfig: `{ id?: string; type?: string; meta?: Record<string, unknown>; on?: Record<string, XStateTransitionConfig | readonly XStateTransitionConfig[]>; always?: XStateTransitionConfig | readonly XStateTransitionConfig[]; after?: Record<string, XStateTransitionConfig | readonly XStateTransitionConfig[]>; invoke?: { onDone?: XStateTransitionConfig | readonly XStateTransitionConfig[]; onError?: XStateTransitionConfig | readonly XStateTransitionConfig[] } | readonly { onDone?: XStateTransitionConfig | readonly XStateTransitionConfig[]; onError?: XStateTransitionConfig | readonly XStateTransitionConfig[] }[]; states?: Record<string, XStateNodeConfig> }`. The part of an xstate v5 state node `fromXState` reads: its `id`, `type` and `meta`, and the ways it moves on (`on`, `always`, `after`, and each `invoke`'s `onDone` and `onError`). Typed by shape, so the package does not depend on xstate.
|
|
88
|
+
- XStateTransitionConfig: `string | { target?: string | readonly (string | undefined)[] | undefined; meta?: Record<string, unknown> | undefined; } | undefined`. One transition: a target, or `{ target, meta }`, or a list of them (the first that passes its guard).
|
|
89
|
+
- XStateStateInput: `{ id: string; node: XStateNodeConfig; state: StateMachineState }`. What `fromXState` makes of one state node before `state` adjusts it.
|
|
90
|
+
|
|
91
|
+
### Functions
|
|
92
|
+
- fromXState: `fromXState(machine: XStateMachineLike, options?: { state?: ((input: XStateStateInput) => StateMachineState) | undefined; }): StateMachineDefinition`. Turns an xstate v5 machine, or its config, into `states` and `transitions`: one state per top-level state node, one transition per target in its `on`. The package does not depend on xstate.
|
|
93
|
+
```tsx
|
|
94
|
+
<StateMachine label="Orders" {...fromXState(orderMachine)} items={orders} />
|
|
95
|
+
```
|
|
@@ -23,7 +23,7 @@ import { NotFound } from "@slashsuite/ui-react";
|
|
|
23
23
|
- Every page but `Maintenance` links "Back to home", to `LinkProvider`'s `home` (`/` by default). `Maintenance` has none: home is the site that is down.
|
|
24
24
|
- Say where home is once, on the provider (`<LinkProvider home="/app">`).
|
|
25
25
|
- `onRetry` adds a "Try again" button on `ErrorPage` and `Offline`; `actions` replaces it with the buttons that fit, and the home link turns outline beside them.
|
|
26
|
-
-
|
|
26
|
+
- Another button goes in `actions`: it comes first, and "Back to home" stays beside it. `homeLabel` (default "Back to home"), `retryLabel` (default "Try again") and `ErrorPage`'s `detailLabel` (default "Error") only reword the built-in ones, for an app in another language.
|
|
27
27
|
- A part of a page that failed to load is not an `ErrorPage`: it is a `Callout tone="danger"` with a title and a retry `Button` in its `actions`, and the rest of the page stays.
|
|
28
28
|
- Render one as the content of an `AppShell`, or on its own in a `Container`.
|
|
29
29
|
|
|
@@ -63,8 +63,9 @@ import { ErrorPage } from "@slashsuite/ui-react";
|
|
|
63
63
|
### NotFound
|
|
64
64
|
404: the page is not there. `numeral` draws a large "404" above the title, for a site whose 404 is a designed page; the digits are fixed. Off, the page is the title and copy alone.
|
|
65
65
|
- actions: ReactNode. The page's own buttons, before "Back to home", which turns outline beside them. This is the one
|
|
66
|
-
way to a button
|
|
66
|
+
way to add a button; `homeLabel` and `retryLabel` only reword the built-in ones.
|
|
67
67
|
- children: ReactNode. Replaces the default body copy.
|
|
68
|
+
- homeLabel: string (default Back to home). The button to the `LinkProvider`'s `home`, for an app in another language.
|
|
68
69
|
- id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
|
|
69
70
|
- numeral: boolean (default false). Draws a large "404" above the title. Off by default. The digits are fixed: there is no text prop.
|
|
70
71
|
- title: ReactNode. Replaces the default heading.
|
|
@@ -72,34 +73,40 @@ way to a button worded differently; there is no label prop.
|
|
|
72
73
|
### Forbidden
|
|
73
74
|
403: signed in, or not, but not allowed here. The page for a route that exists and the reader may not see; a route that is not there is a `NotFound`.
|
|
74
75
|
- actions: ReactNode. The page's own buttons, before "Back to home", which turns outline beside them. This is the one
|
|
75
|
-
way to a button
|
|
76
|
+
way to add a button; `homeLabel` and `retryLabel` only reword the built-in ones.
|
|
76
77
|
- children: ReactNode. Replaces the default body copy.
|
|
78
|
+
- homeLabel: string (default Back to home). The button to the `LinkProvider`'s `home`, for an app in another language.
|
|
77
79
|
- id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
|
|
78
80
|
- title: ReactNode. Replaces the default heading.
|
|
79
81
|
|
|
80
82
|
### ErrorPage
|
|
81
83
|
500 or any failure. `detail` is the error text, shown in a `CodeBlock` under the copy; pass it only where a reader may see it (a request id, a message), never a stack trace. `onRetry` adds a "Try again" button, unless `actions` replaces it.
|
|
82
84
|
- actions: ReactNode. The page's own buttons, before "Back to home", which turns outline beside them. This is the one
|
|
83
|
-
way to a button
|
|
85
|
+
way to add a button; `homeLabel` and `retryLabel` only reword the built-in ones.
|
|
84
86
|
- children: ReactNode. Replaces the default body copy.
|
|
85
87
|
- detail: string. The error text, in a `CodeBlock` under the copy: a request id or a message a reader may see, never a stack trace.
|
|
88
|
+
- detailLabel: string (default Error). The name of the `detail` block, for an app in another language.
|
|
89
|
+
- homeLabel: string (default Back to home). The button to the `LinkProvider`'s `home`, for an app in another language.
|
|
86
90
|
- id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
|
|
87
91
|
- onRetry: () => void. Adds a "Try again" button that calls it, unless `actions` replaces the button.
|
|
92
|
+
- retryLabel: string (default Try again). The button `onRetry` adds, for an app in another language.
|
|
88
93
|
- title: ReactNode. Replaces the default heading.
|
|
89
94
|
|
|
90
95
|
### Offline
|
|
91
96
|
The device has no connection. `onRetry` adds a "Try again" button, unless `actions` replaces it.
|
|
92
97
|
- actions: ReactNode. The page's own buttons, before "Back to home", which turns outline beside them. This is the one
|
|
93
|
-
way to a button
|
|
98
|
+
way to add a button; `homeLabel` and `retryLabel` only reword the built-in ones.
|
|
94
99
|
- children: ReactNode. Replaces the default body copy.
|
|
100
|
+
- homeLabel: string (default Back to home). The button to the `LinkProvider`'s `home`, for an app in another language.
|
|
95
101
|
- id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
|
|
96
102
|
- onRetry: () => void. Adds a "Try again" button that calls it, unless `actions` replaces the button.
|
|
103
|
+
- retryLabel: string (default Try again). The button `onRetry` adds, for an app in another language.
|
|
97
104
|
- title: ReactNode. Replaces the default heading.
|
|
98
105
|
|
|
99
106
|
### Maintenance
|
|
100
107
|
The site is down on purpose and will be back: the page for planned downtime, such as an upgrade. A failure is an `ErrorPage`, and no connection is `Offline`. It has no "Back to home": home is the site that is down.
|
|
101
108
|
- actions: ReactNode. The page's own buttons, before "Back to home", which turns outline beside them. This is the one
|
|
102
|
-
way to a button
|
|
109
|
+
way to add a button; `homeLabel` and `retryLabel` only reword the built-in ones.
|
|
103
110
|
- children: ReactNode. Replaces the default body copy.
|
|
104
111
|
- id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
|
|
105
112
|
- title: ReactNode. Replaces the default heading.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
## Stepper
|
|
2
|
+
|
|
3
|
+
Group: Navigation
|
|
4
|
+
|
|
5
|
+
When to use: A flow of a few steps taken in order, such as checkout or setting up an account, where the reader should see what is done and what is left.
|
|
6
|
+
|
|
7
|
+
### The one right way
|
|
8
|
+
A few short step names, the current one given: the reader sees what is done and what is left.
|
|
9
|
+
```tsx
|
|
10
|
+
import { Stepper } from "@slashsuite/ui-react";
|
|
11
|
+
|
|
12
|
+
<Stepper
|
|
13
|
+
label="Checkout progress"
|
|
14
|
+
steps={["Cart", "Shipping", "Payment", "Review"]}
|
|
15
|
+
current={2}
|
|
16
|
+
/>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Do
|
|
20
|
+
- Give every step's name in order, one or two words each, and `current`, the step in progress, from 1. Past the last step, every step is done.
|
|
21
|
+
- `label` names the list ("Checkout progress"), and `doneLabel` is the word a screen reader hears after a done step, for an app in another language.
|
|
22
|
+
- It shows progress and does not navigate: the flow's own buttons move between steps.
|
|
23
|
+
- Put it above the step's form, once per page.
|
|
24
|
+
|
|
25
|
+
### Don't
|
|
26
|
+
Sentences for step names crowd the row and hide where the reader is.
|
|
27
|
+
```tsx
|
|
28
|
+
import { Stepper } from "@slashsuite/ui-react";
|
|
29
|
+
|
|
30
|
+
<Stepper
|
|
31
|
+
label="Checkout progress"
|
|
32
|
+
steps={[
|
|
33
|
+
"Check the items in your cart",
|
|
34
|
+
"Tell us where to send it",
|
|
35
|
+
"Pay with a card or a transfer",
|
|
36
|
+
"Read it all back once more",
|
|
37
|
+
]}
|
|
38
|
+
current={2}
|
|
39
|
+
/>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Accessibility
|
|
43
|
+
- An ordered list named by `label`; the current step has `aria-current="step"`.
|
|
44
|
+
- A done step says so in words after its name ("Cart (done)"), not only with its tick; the numbers, the tick and the lines between steps are `aria-hidden`.
|
|
45
|
+
- The current step is told apart by more than colour: its marker is outlined and its name is medium weight.
|
|
46
|
+
|
|
47
|
+
### Props
|
|
48
|
+
### Stepper
|
|
49
|
+
Where the reader is in a fixed run of steps (checkout, a setup flow): each step done, current or still to come. An ordered list named by `label`, across from `sm` and down on a phone. `current` is the step in progress, from 1; past the last step every step is done. It shows progress and does not navigate: the flow's own buttons move between steps.
|
|
50
|
+
- current: number (required). The step in progress, from 1. Past the last step, every step is done.
|
|
51
|
+
- doneLabel: string (default done). What a screen reader hears after a done step's name, for an app in another language.
|
|
52
|
+
- id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
|
|
53
|
+
- label: string (required). The list's accessible name: "Checkout progress".
|
|
54
|
+
- steps: readonly string[] (required). The steps' names, in order: "Cart", "Shipping", "Payment", "Review". Short, one or two words.
|
|
@@ -20,7 +20,7 @@ function Example() {
|
|
|
20
20
|
- Control it: you own `checked`, and `onChange` gets the next value. There is no uncontrolled mode.
|
|
21
21
|
- Give a `Switch` a `label`; the whole label is the click target. In a table cell leave the `label` out, use `size="sm"` and name it with `aria-label`: one of the two is required.
|
|
22
22
|
- Keep `checked` as it was while the change saves and pass `busy`: a click or a key does nothing, and it keeps its colour and its focus. Flip `checked` when the save lands.
|
|
23
|
-
- A `hint` is a muted line under the label for a setting that needs a sentence, and an `error`
|
|
23
|
+
- A `hint` is a muted line under the label for a setting that needs a sentence, and an `error` goes under it in red; the switch sits on the label's first line.
|
|
24
24
|
- `size` is `sm`, `md` (default) or `lg`, the same scale as a `Checkbox`.
|
|
25
25
|
- Say why it cannot flip with `disabledReason`.
|
|
26
26
|
- A value sent with a form, ticked and then submitted, is a `Checkbox`. One of several is a `RadioGroup`, a `Select` or a `SegmentedControl`.
|
|
@@ -56,12 +56,12 @@ import { Switch } from "@slashsuite/ui-react";
|
|
|
56
56
|
- A bare switch has no name of its own: `aria-label` is required.
|
|
57
57
|
- `busy` sets `aria-busy` and `aria-disabled` and keeps focus on the switch; `disabled` is the native one and takes it out of the tab order.
|
|
58
58
|
- `disabledReason` sets `aria-disabled` and keeps the switch in the tab order; a click, Space and Enter do nothing, and the reason shows as a tooltip on hover, keyboard focus and a tap, read out as its description (the native `title` without CSS anchor positioning).
|
|
59
|
-
- A `hint`
|
|
59
|
+
- A `hint` and an `error` are the switch's `aria-describedby`, added to any you pass; an `error` is announced politely, not as an alert, and marks the switch `aria-invalid`.
|
|
60
60
|
- The thumb's slide stops under `prefers-reduced-motion`. The focus ring comes from the component.
|
|
61
61
|
|
|
62
62
|
### Props
|
|
63
63
|
### Switch
|
|
64
|
-
An on/off switch for a setting that takes effect at once, usually by saving it to a server: a native `<button role="switch" aria-checked>`. The caller owns `checked` and flips it in `onChange`, or gives `defaultChecked` and the switch keeps its own state. A value sent with a form is a `Checkbox`, not a Switch. Give it a `label` (the whole label is the click target), or in a table cell leave the label out and name it with `aria-label`. `hint` is a muted line under the label; `error`
|
|
64
|
+
An on/off switch for a setting that takes effect at once, usually by saving it to a server: a native `<button role="switch" aria-checked>`. The caller owns `checked` and flips it in `onChange`, or gives `defaultChecked` and the switch keeps its own state. A value sent with a form is a `Checkbox`, not a Switch. Give it a `label` (the whole label is the click target), or in a table cell leave the label out and name it with `aria-label`. `hint` is a muted line under the label; `error` adds a red line under it, with an alert icon, and makes the switch `aria-invalid` and red-edged. The note is the switch's `aria-describedby`. `size` is `sm`, `md` (the default) or `lg`. `busy` is for the save in flight: clicks and keys do nothing, and the switch keeps its colour and its focus. `disabledReason` blocks it, focusable, with the reason as its tooltip. `disabled` is the native one, washed out. While `loading` the label is drawn and the track is a bone of its size.
|
|
65
65
|
- busy: boolean. The change is being saved: `aria-busy`, and a click or a key does nothing. It keeps its colour
|
|
66
66
|
and its focus, which a native `disabled` would lose when the save starts.
|
|
67
67
|
- checked: boolean. Whether it is on, when the caller owns it (with `onChange`).
|
|
@@ -69,7 +69,7 @@ and its focus, which a native `disabled` would lose when the save starts.
|
|
|
69
69
|
- disabledReason: string. Why the switch cannot be flipped: it washes out and is blocked (`aria-disabled`; a click,
|
|
70
70
|
Enter and Space do nothing) while it keeps its focus, and the reason is its tooltip on hover,
|
|
71
71
|
keyboard focus and a tap, read out as its description.
|
|
72
|
-
- error: ReactNode.
|
|
72
|
+
- error: ReactNode. A red line under the hint, with an alert icon, announced politely; makes the switch `aria-invalid`.
|
|
73
73
|
- hint: ReactNode. A muted line under the label that says more. It is the switch's `aria-describedby`.
|
|
74
74
|
- label: NonNullable<ReactNode>. The text beside the switch; the whole label is a click target.
|
|
75
75
|
- loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
## TableOfContents
|
|
2
|
+
|
|
3
|
+
Group: Navigation
|
|
4
|
+
|
|
5
|
+
When to use: A long page of several sections, such as a guide or a reference, where a reader jumps to a section or checks where they are.
|
|
6
|
+
|
|
7
|
+
### Use instead
|
|
8
|
+
- Breadcrumbs (breadcrumbs.md): The reader needs the way back up to a parent page.
|
|
9
|
+
|
|
10
|
+
### The one right way
|
|
11
|
+
The app tracks the section being read and passes it as `current`, so the reader sees where they are.
|
|
12
|
+
```tsx
|
|
13
|
+
import { TableOfContents } from "@slashsuite/ui-react";
|
|
14
|
+
|
|
15
|
+
<TableOfContents
|
|
16
|
+
items={[
|
|
17
|
+
{ id: "install", label: "Install", level: 2 },
|
|
18
|
+
{ id: "with-bun", label: "With Bun", level: 3 },
|
|
19
|
+
{ id: "with-npm", label: "With npm", level: 3 },
|
|
20
|
+
{ id: "usage", label: "Usage", level: 2 },
|
|
21
|
+
{ id: "themes", label: "Themes", level: 2 },
|
|
22
|
+
]}
|
|
23
|
+
current="with-bun"
|
|
24
|
+
/>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Do
|
|
28
|
+
- Give `items` the page's `h2`s and `h3`s in order, each `{ id, label, level }`: `id` is the heading's anchor and `label` its words. A level 3 entry is indented under the entry before it.
|
|
29
|
+
- `current` is the id of the section being read. The app tracks it, from the scroll position or the URL hash, and its link is marked in the accent; the rest are small and quiet.
|
|
30
|
+
- `label` is the words over the list and the name of its landmark, "On this page" by default; set it for an app in another language.
|
|
31
|
+
- Put it in a sticky `SideColumn` aside beside the page. `DocsLayout` draws its own, so a docs page passes its headings to the layout instead.
|
|
32
|
+
|
|
33
|
+
### Don't
|
|
34
|
+
- Never list links to other pages in it: those are `Tabs` of links or a `SidebarLayout` rail.
|
|
35
|
+
|
|
36
|
+
With no `current` every entry looks the same, and a reader halfway down a long page cannot tell where they are.
|
|
37
|
+
```tsx
|
|
38
|
+
import { TableOfContents } from "@slashsuite/ui-react";
|
|
39
|
+
|
|
40
|
+
<TableOfContents
|
|
41
|
+
items={[
|
|
42
|
+
{ id: "install", label: "Install", level: 2 },
|
|
43
|
+
{ id: "with-bun", label: "With Bun", level: 3 },
|
|
44
|
+
{ id: "with-npm", label: "With npm", level: 3 },
|
|
45
|
+
{ id: "usage", label: "Usage", level: 2 },
|
|
46
|
+
{ id: "themes", label: "Themes", level: 2 },
|
|
47
|
+
]}
|
|
48
|
+
/>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
A label that is not the heading's words sends the reader to a section they do not recognise when they land.
|
|
52
|
+
```tsx
|
|
53
|
+
import { TableOfContents } from "@slashsuite/ui-react";
|
|
54
|
+
|
|
55
|
+
<TableOfContents
|
|
56
|
+
items={[
|
|
57
|
+
{ id: "install", label: "How to get the package into your project", level: 2 },
|
|
58
|
+
{ id: "usage", label: "Some notes on using it", level: 2 },
|
|
59
|
+
{ id: "themes", label: "Colours", level: 2 },
|
|
60
|
+
]}
|
|
61
|
+
current="usage"
|
|
62
|
+
/>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Accessibility
|
|
66
|
+
- A `<nav>` named by `label`, around a list of links to `#id`. The current one has `aria-current="location"`.
|
|
67
|
+
- The current link is told apart by more than colour: it is medium weight.
|
|
68
|
+
|
|
69
|
+
### Props
|
|
70
|
+
### TableOfContents
|
|
71
|
+
The headings of a long page, as links to their anchors: "On this page". `items` are the page's `h2`s and `h3`s in order, each `{ id, label, level }`; a level 3 entry is indented under the one before it. `current` is the id of the section being read, which the app tracks (from the scroll position or the URL hash): its link is marked in the accent and has `aria-current="location"`. The rest are small and quiet. `label` names the list and the `<nav>` landmark. It sets no width or position: put it in a `SideColumn`'s aside, sticky, beside the page. `DocsLayout` draws its own.
|
|
72
|
+
- current: string. The id of the section being read; its link is marked as the current one.
|
|
73
|
+
- id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
|
|
74
|
+
- items: TableOfContentsItem[] (required). The page's headings in order: `{ id, label, level }`, `level` 2 or 3.
|
|
75
|
+
- label: string (default On this page). The words over the list, and the name of the `<nav>` landmark.
|
|
76
|
+
|
|
77
|
+
### Types
|
|
78
|
+
- TableOfContentsItem: `{ id: string; label: string; level: 2 | 3 }`. One entry of a `TableOfContents`: the heading's `id` (its anchor), its words, and its level.
|
|
@@ -43,15 +43,17 @@ import {
|
|
|
43
43
|
|
|
44
44
|
### Do
|
|
45
45
|
- Compose a `Table` from `TableHead`, `TableBody` and, for totals, `TableFoot`. A `TableHead` holds one `TableRow` of `TableHeaderCell`s; give the `Table` a `label` that names it.
|
|
46
|
-
- A column of amounts says so once, with `numeric` on its `TableHeaderCell`: the title and every cell under it are end aligned and the figures line up. A code or a type is `mono`.
|
|
47
|
-
- A cell's `tone` is `neutral` (the default), `strong` for the name of the row, `muted` for the secondary column, or a Callout tone for an amount that carries a meaning; pair the tone with a sign or a word. `secondary` is a muted second line under a cell.
|
|
46
|
+
- A column of amounts says so once, with `numeric` on its `TableHeaderCell`: the title and every cell under it are end aligned and the figures line up. A code or a type is `mono`. A cell's `tone` is `neutral` (the default), `strong` for the name of the row, `muted` for the secondary column, or a Callout tone for an amount that carries a meaning; pair the tone with a sign or a word. `secondary` is a muted second line under a cell.
|
|
48
47
|
- The total of the whole table is a `TableFoot` row. A subtotal among the body's rows is a `TableRow` with `emphasis`, the same look; a bold subtotal is not a `tone`. Neither row takes a `tone`.
|
|
49
48
|
- Mark a row's status with `tone` (a stripe and a soft fill, or `muted` to fade the row) or with `stripe` (the stripe alone, in the `muted`, `info`, `positive`, `warn` or `danger` tone, which keeps the row's hover). Give one of them, never both, and name the status in a cell as well (a `Pill`), or draw a `Legend` for the colours.
|
|
50
49
|
- A table with no rows takes `TableBody empty={<EmptyState title="No quotes yet." />}`: one muted line in a cell that spans every column the head declares, with the head still drawn. Write `TableHead` and its cells inline, so the table can count them.
|
|
51
|
-
- Group rows with a `TableGroupRow`: it spans every column the head declares, and `trailing` is a count or a subtotal at the far end. A full-width note or panel is a `TableCell span="full"`; `align="center"` centres it. `indent` (1 to 3) sets a start-aligned cell in, for the lines under a parent row.
|
|
52
|
-
-
|
|
50
|
+
- Group rows with a `TableGroupRow`: it spans every column the head declares, and `trailing` is a count or a subtotal at the far end. A full-width note or panel is a `TableCell span="full"`; `align="center"` centres it. `indent` (1 to 3) sets a start-aligned cell in, for the lines under a parent row. A column with nothing to say in its head (its actions) takes a `TableHeaderCell` with `label="Actions"`. Inside a `Card` a table is plain: no card of its own, only the row dividers.
|
|
51
|
+
- The cell that names its row (the customer, the build) is a `TableHeaderCell` in the body row: a row header, drawn as a strong cell. Prose wraps; everything else stays on one line: a link, a code, a figure and a date never break, and a long table scrolls sideways instead of squeezing them.
|
|
52
|
+
- A table read on a phone row by row, with few columns, takes `narrow="stack"`: on a screen narrower than `sm` (a phone) each row is a card, the first column its title and every other cell a line with its column's title. A table compared down its columns keeps the default, `narrow="scroll"`.
|
|
53
53
|
|
|
54
54
|
### Don't
|
|
55
|
+
- Do not wrap a `Table` in your own scrolling box: a table that fits lets its head stick under the page's header, and one that does not scrolls in its own card.
|
|
56
|
+
|
|
55
57
|
Amounts in plain start-aligned cells do not line up, so the eye cannot compare them.
|
|
56
58
|
```tsx
|
|
57
59
|
import {
|
|
@@ -246,28 +248,36 @@ import {
|
|
|
246
248
|
|
|
247
249
|
### Accessibility
|
|
248
250
|
- A Table renders a native `<table>`; its `label` is the accessible name, a visually hidden caption.
|
|
249
|
-
- A `TableHeaderCell` is a `<th scope="col">`; a `TableGroupRow` is a `<th scope="rowgroup">`.
|
|
251
|
+
- A `TableHeaderCell` in the head is a `<th scope="col">`, and in a body row a `<th scope="row">`; a `TableGroupRow` is a `<th scope="rowgroup">`.
|
|
250
252
|
- A `TableHeaderCell` `label` is hidden text inside the header cell, so an actions column still has a name for a screen reader.
|
|
251
253
|
- Colour alone never carries a row's or a cell's status; name it in text.
|
|
252
|
-
- A `
|
|
254
|
+
- A `lines={1}` cell that is cut shows its full text in a tooltip on hover, a tap and keyboard focus (a plain cut cell becomes a tab stop for it). The tooltip is hidden from assistive tech, which reads the whole text from the cell already.
|
|
253
255
|
- A stretched `TextLink` is a real link and the only tab stop in its row; the row's whole area is its click target.
|
|
254
256
|
- A `TableEditCell` or `InlineEdit` is a native `<button>` named by its value and its `label`. Opening moves the focus to the editor, a group named by `label`; Esc and `close` move it back to the value.
|
|
255
|
-
-
|
|
256
|
-
- A
|
|
257
|
+
- A table wider than its card scrolls sideways; when nothing in it can take focus, the card takes one tab stop, a group named by the table's `label`, so the keyboard can scroll it.
|
|
258
|
+
- A table that fits its card keeps its head on screen under the page's header as the page scrolls.
|
|
259
|
+
- With `narrow="stack"` the parts keep their table roles in the stacked look, and each cell's column title is drawn for the eye and hidden from assistive tech, which reads the head.
|
|
260
|
+
- A sorted column's header has `aria-sort` (`ascending` or `descending`); a sortable column it is not sorted by has none, and its title is a native button named by the title, at least 24px tall. A sort is announced in a status region (`Sorted by Total, ascending`); `sortedLabel` words it in another language.
|
|
257
261
|
- A `selected` row has `aria-current`, not `aria-selected`, which a plain table row does not support.
|
|
258
262
|
- A `TableExpandCell` is a native button named by its `label` and `count` ("Details, 3"), with `aria-expanded` and the `aria-controls` you give it.
|
|
259
263
|
|
|
260
264
|
### Props
|
|
261
265
|
### Table
|
|
262
|
-
A list of records in a rounded, bordered card
|
|
266
|
+
A list of records in a rounded, bordered card. Compose it from `TableHead`, `TableBody`, `TableFoot`, `TableRow`, `TableHeaderCell` and `TableCell`. `label` names the table for assistive tech and is not drawn. Inside a `Card` it is plain: no card of its own (border, fill and shadow), no tinted head strip and no row hover, only the row dividers. A column of figures says so once, with `numeric` on its `TableHeaderCell`: its cells then take end alignment and tabular figures. `size` is the row padding, and the buttons and pills in the rows follow it (`sm` by default); a field keeps its own `size`. Other props (`id`, `data-*`, `aria-*`) go on the `<table>`. While `loading`, a body with no rows draws five rows of bones, one per column, and an empty cell draws a bone; the table keeps its role and its name. A table that fits its box keeps its head row in view (under the `AppShell` header) while the page scrolls past its rows; one wider than its box scrolls sideways instead, and takes a tab stop when nothing in it can take focus. `narrow="stack"` draws each row as a card on a screen narrower than `sm` (a phone), the cells as lines labelled by their column's title. A click on a sortable title has the table say the new sort aloud, in `sortedLabel`'s words.
|
|
263
267
|
- label: string (required). Names the table for assistive tech; it is not drawn.
|
|
264
268
|
- loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
|
|
265
269
|
Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
|
|
266
270
|
- loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
|
|
271
|
+
- narrow: "scroll" | "stack" (default scroll). What the table does on a screen narrower than `sm` (a phone): `scroll` sideways, or `stack` each row into
|
|
272
|
+
a card, the first cell its title and every other cell a line labelled by its column's title.
|
|
273
|
+
Stack a table whose rows a person reads one at a time; keep `scroll` for one they compare
|
|
274
|
+
down a column.
|
|
267
275
|
- size: "sm" | "md" | "lg" (default sm). The row padding; the buttons and fields in the rows take the same size.
|
|
276
|
+
- sortedLabel: ((column: string, sort: "ascending" | "descending") => string) (default `Sorted by Name, ascending`). What a screen reader hears after a click on a sortable title, from the column's title and the
|
|
277
|
+
new direction.
|
|
268
278
|
|
|
269
279
|
### TableHead
|
|
270
|
-
The `<thead>`: small uppercase column titles, on a tinted strip unless the table is in a card. Holds one `TableRow` of `TableHeaderCell`s.
|
|
280
|
+
The `<thead>`: small uppercase column titles, on a tinted strip unless the table is in a card. Holds one `TableRow` of `TableHeaderCell`s. Unless the table is in a card, it stays in view under the `AppShell` header while the page scrolls past the rows, as long as the table fits its box.
|
|
271
281
|
|
|
272
282
|
### TableBody
|
|
273
283
|
The `<tbody>`: the rows, each with a line above it and, unless the table is in a card, a fill on hover. With no rows it draws `empty` (an `EmptyState`, one muted line here) in one cell that spans every column the head declares; the head stays drawn, so the reader sees what the table holds. In a loading `Table` a body with no rows draws five rows of bones instead, never `empty`.
|
|
@@ -286,11 +296,11 @@ A sign row or a subtotal needs no other part.
|
|
|
286
296
|
rows only.
|
|
287
297
|
|
|
288
298
|
As on a `ListRow`, it is not a multi-select, and a selected row takes no `tone`.
|
|
289
|
-
- stripe: "
|
|
290
|
-
- tone: "neutral" | "info" | "positive" | "warn" | "danger"
|
|
299
|
+
- stripe: "muted" | "info" | "positive" | "warn" | "danger" | "accent". A stripe on the leading edge in this tone, with no fill. Give only one of `tone`, `stripe` and `emphasis`.
|
|
300
|
+
- tone: "muted" | "neutral" | "info" | "positive" | "warn" | "danger". The row's status: a stripe on the leading edge plus the tone's soft fill, or `muted` to fade the row. Give only one of `tone`, `stripe` and `emphasis`.
|
|
291
301
|
|
|
292
302
|
### TableHeaderCell
|
|
293
|
-
A column title, `<th scope="col">`. `numeric` declares a column of figures, once: the title and every cell under it take end alignment and tabular figures. A column with nothing to show in its head (a row's actions) takes `label` instead of `children`: the name a screen reader hears ("Actions"), visually hidden so the head keeps its column. `sort` and `onSort` make the column sortable: the title becomes a button that asks for the next direction,
|
|
303
|
+
A header cell. In the `TableHead` it is a column title, `<th scope="col">`. `numeric` declares a column of figures, once: the title and every cell under it take end alignment and tabular figures. A column with nothing to show in its head (a row's actions) takes `label` instead of `children`: the name a screen reader hears ("Actions"), visually hidden so the head keeps its column. `sort` and `onSort` make the column sortable: the title becomes a button that fills the cell and asks for the next direction, the column says where it stands with `aria-sort`, and the table says the new sort aloud. The app sorts its rows; the table never does. In a body or foot row it is the row's header, `<th scope="row">`: the cell that names the row (a name, a date), drawn like a `strong` cell, so a screen reader reads it before each of the row's values.
|
|
294
304
|
- align: "center" | "end" | "start" (default numeric ? "end" : "start"). The title's horizontal alignment; `end` over a column of buttons, `center` over a centred column.
|
|
295
305
|
- label: string. The column's name for a screen reader, visually hidden, for a column with no visible title (a row's actions).
|
|
296
306
|
- numeric: boolean (default false). A column of figures: this title and the cells under it are end aligned, the cells in tabular figures.
|
|
@@ -302,10 +312,16 @@ With `onSort` the title becomes a button that asks for the next direction. The t
|
|
|
302
312
|
sorts, filters or pages.
|
|
303
313
|
|
|
304
314
|
### TableCell
|
|
305
|
-
A `<td>`. `tone` is the text weight and colour (see `CellTone`; in a `TableFoot` it defaults to `strong`); `numeric` sets end alignment and tabular figures (a cell under a `numeric` head cell is numeric already), `mono` a small mono face. `secondary` is a second, muted line under the content. One rule for wrapping: prose (a cell of plain text) wraps onto more lines (never narrower than `min-w-48`, so it scrolls the table before it becomes a sliver)
|
|
315
|
+
A `<td>`. `tone` is the text weight and colour (see `CellTone`; in a `TableFoot` it defaults to `strong`); `numeric` sets end alignment and tabular figures (a cell under a `numeric` head cell is numeric already), `mono` a small mono face. `secondary` is a second, muted line under the content. One rule for wrapping: prose (a cell of plain text) wraps onto more lines (never narrower than `min-w-48`, so it scrolls the table before it becomes a sliver); any other cell stays on one line at its content's width: one that holds a control or a link, and a `numeric` or `mono` cell (a figure, a code, a type). `lines={1}` caps a long value's width, cuts it with an ellipsis on one line and, while it is cut, shows the full text in a tooltip on hover, focus and a tap; the content is then plain text (strings and numbers), since that is what the tooltip shows. `colSpan` passes through: a cell that spans the row is a full-width panel (a note under a group), and `align="center"` centres it. A table with no rows takes `TableBody empty`, not a cell built by hand. `span="full"` spans every column the head declares, so a panel under a row needs no count. `indent` sets a start-aligned cell in by 1 to 3 levels, for a line under a parent row. While `loading` an empty cell draws one bone, the width of a short value.
|
|
306
316
|
- align: "center" | "end" | "start" (default end for a numeric cell, else start). The cell's horizontal alignment; `center` for a full-width note.
|
|
307
317
|
- colSpan: number. How many columns the cell spans; `span="full"` spans them all without a count.
|
|
308
318
|
- indent: 2 | 3 | 1. Sets the cell in by this many levels (1 to 3), for a line under a parent row. Start-aligned cells only.
|
|
319
|
+
- lines: 1. `1` caps the width and cuts a long value with an ellipsis on one line; while it is cut, the full
|
|
320
|
+
text shows in a tooltip on hover, keyboard focus and a tap. Plain text content only.
|
|
321
|
+
|
|
322
|
+
Without it, a prose cell wraps down to a floor so it never becomes a sliver, and any other cell
|
|
323
|
+
(a `Pill`, a `Switch`, a `Button`, a `TextLink`, a `numeric` or `mono` value) stays on one line
|
|
324
|
+
at its content's width.
|
|
309
325
|
- loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
|
|
310
326
|
Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
|
|
311
327
|
- loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
|
|
@@ -313,13 +329,7 @@ Left out, the part takes the nearest loading layout's or part's; `false` opts it
|
|
|
313
329
|
- numeric: boolean (default the column's, from a `numeric` head cell). A figure: end aligned, tabular figures, and the cell never wraps.
|
|
314
330
|
- secondary: ReactNode. A second, muted line under the content.
|
|
315
331
|
- span: "full". `full` spans every column the head declares: a panel under a row, an open row's detail.
|
|
316
|
-
- tone: "strong" | "neutral" | "info" | "positive" | "warn" | "danger"
|
|
317
|
-
- truncate: boolean (default false). Caps the width and cuts a long value with an ellipsis on one line, the full text in a `title`.
|
|
318
|
-
Plain text content only.
|
|
319
|
-
|
|
320
|
-
Without it, a prose cell wraps down to a floor so it never becomes a sliver, a cell that holds
|
|
321
|
-
a control or a link (a `Pill`, a `Switch`, a `Button`, a `TextLink`) takes its content's width,
|
|
322
|
-
and a `numeric` or `mono` cell never breaks.
|
|
332
|
+
- tone: "muted" | "strong" | "neutral" | "info" | "positive" | "warn" | "danger". The text weight and colour (see `CellTone`). In a `TableFoot` it defaults to `strong`.
|
|
323
333
|
|
|
324
334
|
### TableEditCell
|
|
325
335
|
A `TableCell` whose value opens an editor in place: a cell that holds one `InlineEdit` and nothing else. It shows `children` as a button with a dotted underline; a click, Enter or Space swaps it for `renderEditor(close)` and moves the focus into the editor. The editor calls `close` when it has saved, and Esc closes it: both put the focus back on the value. A press outside it or Tab out of it closes it too and leaves the focus where it went, so the editor saves its value on its own change or submit, never on a close. Put the control in the cell itself, not in a popover of its own, which counts as outside. Takes `TableCell`'s `align`, `tone`, `numeric`, `mono`, `indent`, `secondary` and `span`. For an edit trigger in a cell that holds other content too, put an `InlineEdit` in a `TableCell`.
|
|
@@ -341,7 +351,7 @@ close it without a save, so save on the control's own change or submit. The cont
|
|
|
341
351
|
cell, not in a popover of its own.
|
|
342
352
|
- secondary: ReactNode. A second, muted line under the content.
|
|
343
353
|
- span: "full". `full` spans every column the head declares: a panel under a row, an open row's detail.
|
|
344
|
-
- tone: "strong" | "neutral" | "info" | "positive" | "warn" | "danger"
|
|
354
|
+
- tone: "muted" | "strong" | "neutral" | "info" | "positive" | "warn" | "danger". The text weight and colour (see `CellTone`). In a `TableFoot` it defaults to `strong`.
|
|
345
355
|
|
|
346
356
|
### InlineEdit
|
|
347
357
|
A value that opens an editor in place, as a part inside a `TableCell` that holds more than the value (an edit trigger in a column cell with other content, say). It shows `children` as a button with a dotted underline; a click, Enter or Space swaps it for `renderEditor(close)` and moves the focus into the editor. The part keeps its own open state. The editor calls `close` when it has saved, and Esc closes it: both put the focus back on the value. A press outside it or Tab out of it closes it too and leaves the focus where it went, so the editor saves its value on its own change or submit, never on a close. Put the control in the part itself, not in a popover of its own, which counts as outside. It takes the alignment of the cell around it. It is a block that bleeds half a rem into the padding of the cell it sits in, so it belongs inside a `TableCell`; a cell that holds only the value is a `TableEditCell`. `data-*` and `aria-*` go on the button, and on the editor's group while open.
|
|
@@ -351,10 +361,10 @@ A value that opens an editor in place, as a part inside a `TableCell` that holds
|
|
|
351
361
|
- renderEditor: (close: () => void) => ReactNode (required). The control that edits the value, drawn while open. `close` shuts it and returns the focus to the value.
|
|
352
362
|
|
|
353
363
|
### TableGroupRow
|
|
354
|
-
A full-width group header in the body: a tinted row with a `label` that spans every column the head declares (or `colSpan` columns), and optional `trailing`
|
|
364
|
+
A full-width group header in the body: a tinted row with a `label` that spans every column the head declares (or `colSpan` columns), and optional `trailing` text at the far end: the group's count or subtotal, muted. The group's rows follow it. The row is a `<th>`, a heading for the group, so an action on the group goes in its rows or above the table, not here. For a panel of other content across the whole row, use a `TableCell span="full"` instead.
|
|
355
365
|
- colSpan: number (default every column the `TableHead` declares). How many columns the header spans.
|
|
356
366
|
- label: ReactNode (required). The group's name, at the start of the row.
|
|
357
|
-
- trailing: ReactNode.
|
|
367
|
+
- trailing: ReactNode. The group's count or subtotal, muted at the far end of the row.
|
|
358
368
|
|
|
359
369
|
### TableExpandCell
|
|
360
370
|
The cell that opens and closes the row it sits in: a small ghost button with a chevron that turns down when `expanded`, named by `label` (visually hidden) and, with a `count`, the count chip after it, so it reads "Details, 3". The app holds `expanded` and renders what opens under the row: a `TableRow` with one `TableCell span="full"`, or indented child rows. Give its column a head of `<TableHeaderCell label="Details" />`. `aria-controls` names what it opens; other props go on the `<td>`.
|
|
@@ -368,6 +378,7 @@ span="full"`, or indented child rows. Head the column `<TableHeaderCell label="D
|
|
|
368
378
|
- onClick: MouseEventHandler<HTMLButtonElement> (required). Opens or closes the row: the app flips `expanded`.
|
|
369
379
|
|
|
370
380
|
### Types
|
|
381
|
+
- CellAlign: `"end" | "start" | "center"`. Where a table cell's content sits across it: `start`, `center` or `end` (numbers).
|
|
371
382
|
- CellTone: `Tone | "muted" | "strong"`. The text of a cell: its weight and colour. `neutral` (the default), `strong` and `muted` are the plain ones; the rest are the shared tones, for an amount that carries a meaning (a gain, an overspend). Colour alone does not say it, so a signed figure or a word says it too.
|
|
372
383
|
- RowTone: `"neutral" | "info" | "positive" | "warn" | "danger" | "muted"`. The status of a row: the Callout's tones, plus `muted`. A toned row gets a stripe on its leading edge and the tone's soft fill; `muted` fades the row instead, for one that matters less. The stripe takes the tone's text colour, which every theme already remaps, so no new palette entry.
|
|
373
384
|
- TableSort: `"ascending" | "descending" | "none"`. Where a sortable column stands: ARIA's own words. `none` is a column the table is not sorted by.
|