@tristan2828/ui-foundation 4.136.1 → 4.137.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +7 -6
  2. package/bin/ui-foundation.mjs +1 -1
  3. package/conventions/agents/skills/new-entity/SKILL.md +5 -2
  4. package/conventions/agents/spec-tester.md +3 -3
  5. package/conventions/docs/add-an-entity.md +722 -714
  6. package/conventions/docs/cell-patterns.md +206 -378
  7. package/conventions/docs/column-options.md +6 -12
  8. package/conventions/docs/design-language.md +294 -516
  9. package/conventions/docs/entity-plan-template.md +9 -7
  10. package/conventions/docs/reminders.md +12 -17
  11. package/conventions/docs/timed-screens.md +17 -20
  12. package/dist/components/app/action-error.js +1 -1
  13. package/dist/components/app/action-hint.js +1 -1
  14. package/dist/components/app/app-shell-bottom-bar.js +4 -4
  15. package/dist/components/app/app-shell-nav.d.ts +1 -1
  16. package/dist/components/app/app-shell-nav.js +1 -1
  17. package/dist/components/app/app-shell.d.ts +1 -1
  18. package/dist/components/app/app-shell.js +9 -9
  19. package/dist/components/app/board.d.ts +13 -13
  20. package/dist/components/app/board.js +3 -3
  21. package/dist/components/app/choice-buttons.d.ts +1 -1
  22. package/dist/components/app/data-table-tools.d.ts +3 -3
  23. package/dist/components/app/data-table.d.ts +11 -13
  24. package/dist/components/app/data-table.js +5 -5
  25. package/dist/components/app/date-field.js +1 -1
  26. package/dist/components/app/delete-action.d.ts +1 -1
  27. package/dist/components/app/delete-action.js +4 -4
  28. package/dist/components/app/edit-caret.js +1 -1
  29. package/dist/components/app/edit-in-place-presets.d.ts +4 -4
  30. package/dist/components/app/edit-in-place-store.d.ts +3 -3
  31. package/dist/components/app/edit-in-place-store.js +7 -7
  32. package/dist/components/app/editable-list.js +2 -3
  33. package/dist/components/app/editable-value.d.ts +2 -2
  34. package/dist/components/app/editable-value.js +20 -20
  35. package/dist/components/app/entity-form.js +2 -2
  36. package/dist/components/app/entity-view-facts.d.ts +12 -12
  37. package/dist/components/app/entity-view-facts.js +1 -1
  38. package/dist/components/app/entity-view.d.ts +16 -16
  39. package/dist/components/app/entity-view.js +28 -33
  40. package/dist/components/app/equal-items.js +4 -4
  41. package/dist/components/app/fact-extras.js +5 -5
  42. package/dist/components/app/field-rows.js +5 -5
  43. package/dist/components/app/fill-in-queue.js +2 -3
  44. package/dist/components/app/filter-bar.d.ts +1 -1
  45. package/dist/components/app/filter-date.js +1 -1
  46. package/dist/components/app/filter-name.js +1 -1
  47. package/dist/components/app/form-dialog.js +2 -2
  48. package/dist/components/app/form-leave-guard.js +2 -2
  49. package/dist/components/app/form-section.js +1 -1
  50. package/dist/components/app/icon-action.d.ts +1 -1
  51. package/dist/components/app/icon-action.js +2 -2
  52. package/dist/components/app/image-field.js +0 -1
  53. package/dist/components/app/keep-pencil-room.js +1 -1
  54. package/dist/components/app/key-stats.d.ts +3 -3
  55. package/dist/components/app/line-chart.d.ts +1 -1
  56. package/dist/components/app/line-chart.js +4 -4
  57. package/dist/components/app/list-editor-rows.js +1 -1
  58. package/dist/components/app/list-editor.js +1 -1
  59. package/dist/components/app/list-header.d.ts +6 -6
  60. package/dist/components/app/list-header.js +8 -8
  61. package/dist/components/app/markdown.js +30 -37
  62. package/dist/components/app/milkdown-editor.js +37 -62
  63. package/dist/components/app/module-card.js +6 -7
  64. package/dist/components/app/month-calendar.d.ts +46 -0
  65. package/dist/components/app/month-calendar.js +160 -0
  66. package/dist/components/app/month-day-field.js +0 -1
  67. package/dist/components/app/multi-choice.d.ts +1 -1
  68. package/dist/components/app/multi-choice.js +3 -3
  69. package/dist/components/app/multi-line-chart.js +5 -5
  70. package/dist/components/app/multi-pick.js +9 -10
  71. package/dist/components/app/multi-reference.js +2 -2
  72. package/dist/components/app/notes-outline.js +0 -1
  73. package/dist/components/app/notify.js +2 -2
  74. package/dist/components/app/offline-notice.js +1 -1
  75. package/dist/components/app/option-icon.js +1 -1
  76. package/dist/components/app/option-select.d.ts +1 -1
  77. package/dist/components/app/overview-page.d.ts +2 -2
  78. package/dist/components/app/overview-page.js +1 -1
  79. package/dist/components/app/page-trail-context.js +1 -1
  80. package/dist/components/app/pill-filter.d.ts +2 -2
  81. package/dist/components/app/prose-look.js +1 -1
  82. package/dist/components/app/quick-add-input.js +1 -1
  83. package/dist/components/app/rating-input.js +1 -1
  84. package/dist/components/app/rating-score.js +1 -1
  85. package/dist/components/app/record-dialog.js +25 -40
  86. package/dist/components/app/recurrence-field.js +6 -6
  87. package/dist/components/app/reference-combobox.js +1 -2
  88. package/dist/components/app/rich-text-box-anchor.js +0 -1
  89. package/dist/components/app/rich-text-edges.js +2 -2
  90. package/dist/components/app/rich-text-editor.d.ts +2 -3
  91. package/dist/components/app/rich-text-editor.js +19 -32
  92. package/dist/components/app/rich-text-empty-paragraph.d.ts +6 -7
  93. package/dist/components/app/rich-text-empty-paragraph.js +6 -7
  94. package/dist/components/app/rich-text-floating-toolbar.js +0 -1
  95. package/dist/components/app/rich-text-formats.js +2 -2
  96. package/dist/components/app/rich-text-input-rules.js +1 -2
  97. package/dist/components/app/rich-text-keyboard-bar.js +6 -7
  98. package/dist/components/app/rich-text-node-views.js +1 -2
  99. package/dist/components/app/rich-text-shortcuts.js +8 -8
  100. package/dist/components/app/rich-text-slash-menu.js +4 -6
  101. package/dist/components/app/rich-text-slash.d.ts +2 -2
  102. package/dist/components/app/rich-text-slash.js +2 -2
  103. package/dist/components/app/rich-text-table-grips.d.ts +1 -1
  104. package/dist/components/app/rich-text-table-grips.js +1 -2
  105. package/dist/components/app/rich-text-tasks.d.ts +1 -1
  106. package/dist/components/app/rich-text-tasks.js +1 -1
  107. package/dist/components/app/rich-text-touch.js +1 -1
  108. package/dist/components/app/search-palette.js +1 -2
  109. package/dist/components/app/secondary-filters.js +2 -3
  110. package/dist/components/app/session-view.js +1 -1
  111. package/dist/components/app/stacked-area-chart.js +1 -1
  112. package/dist/components/app/step-track.d.ts +1 -1
  113. package/dist/components/app/step-track.js +3 -3
  114. package/dist/components/app/widget-card.js +26 -30
  115. package/dist/components/app/widget-layout-sheet.js +1 -1
  116. package/dist/components/ui/calendar.js +2 -2
  117. package/dist/components/ui/combobox.d.ts +1 -1
  118. package/dist/components/ui/combobox.js +2 -2
  119. package/dist/components/ui/field.d.ts +1 -1
  120. package/dist/components/ui/field.js +6 -6
  121. package/dist/components/ui/skeleton.js +1 -1
  122. package/dist/components/ui/sonner.js +1 -1
  123. package/dist/components/ui/tabs.js +1 -1
  124. package/dist/error-reporting/reporter.d.ts +1 -1
  125. package/dist/error-reporting/reporter.js +1 -1
  126. package/dist/hooks/table-url-changes.d.ts +2 -2
  127. package/dist/hooks/table-url-changes.js +5 -6
  128. package/dist/hooks/use-action.js +1 -1
  129. package/dist/hooks/use-record-update.js +1 -1
  130. package/dist/hooks/use-table-url-state.d.ts +1 -1
  131. package/dist/hooks/use-table-url-state.js +2 -2
  132. package/dist/index.d.ts +1 -0
  133. package/dist/index.js +3 -2
  134. package/dist/lib/audio-cues.js +2 -2
  135. package/dist/lib/connection.js +1 -1
  136. package/dist/lib/date-filter.js +1 -1
  137. package/dist/lib/entity-view-tab.js +1 -1
  138. package/dist/lib/field-rows.js +2 -2
  139. package/dist/lib/form-errors.d.ts +1 -1
  140. package/dist/lib/form-errors.js +1 -1
  141. package/dist/lib/keep-audio-alive.js +1 -1
  142. package/dist/lib/line-chart-layout.js +4 -4
  143. package/dist/lib/markdown-inline.js +0 -2
  144. package/dist/lib/markdown-merge.js +2 -2
  145. package/dist/lib/markdown-table-widths.js +1 -1
  146. package/dist/lib/markdown-table.js +1 -2
  147. package/dist/lib/markdown-toggle.js +1 -1
  148. package/dist/lib/page-leaving.js +1 -1
  149. package/dist/lib/recurrence-format.d.ts +2 -2
  150. package/dist/lib/recurrence-format.js +1 -1
  151. package/dist/lib/recurrence-phrase.d.ts +1 -1
  152. package/dist/lib/recurrence-phrase.js +2 -2
  153. package/dist/lib/recurrence.d.ts +1 -1
  154. package/dist/lib/recurrence.js +2 -2
  155. package/dist/lib/stale-chunk-reload.js +1 -1
  156. package/dist/lib/status-kinds.d.ts +1 -1
  157. package/dist/lib/status-kinds.js +2 -2
  158. package/dist/mocks/start-worker.js +2 -2
  159. package/dist/routes/login.js +1 -1
  160. package/dist/testing/index.d.ts +7 -4
  161. package/dist/testing/index.js +10 -13
  162. package/package.json +2 -2
  163. package/styles/index.css +4 -4
  164. package/styles/theme.css +14 -20
  165. package/vite/pwa.js +1 -1
@@ -3,46 +3,47 @@
3
3
  <!-- index: written by `npm run docs:index` in the package from the headings below; never edit it by hand -->
4
4
  ## Index
5
5
 
6
- - [Palettes](#palettes) · lines 55–164
7
- - [Glow](#glow) · lines 166–185
8
- - [Semantic tones](#semantic-tones) · lines 187–215
9
- - [The three badge styles](#the-three-badge-styles) · lines 217–234
10
- - [Status marks](#status-marks) · lines 236–281
11
- - [Mapping an enum to tones](#mapping-an-enum-to-tones) · lines 283–312
12
- - [Glyphs and icons: 3:1](#glyphs-and-icons-31) · lines 314–327
13
- - [Logos and brand marks](#logos-and-brand-marks) · lines 329–373
14
- - [Categorical colour](#categorical-colour) · lines 375–445
15
- - [Heat scale](#heat-scale) · lines 447–508
16
- - [Depth ramps](#depth-ramps) · lines 510–595
17
- - [A stored colour](#a-stored-colour) · lines 597–654
18
- - [Shapes and sizes](#shapes-and-sizes) · lines 656–677
19
- - [Typography](#typography) · lines 679–850
20
- - [Words on screen: Title Case and sentence case](#words-on-screen-title-case-and-sentence-case) · lines 713–746
21
- - [Written text (notes)](#written-text-notes) · lines 748–850
22
- - [Density](#density) · lines 852–972
23
- - [Rows on this device](#rows-on-this-device) · lines 918–945
24
- - [Page width (a record on a wide screen)](#page-width-a-record-on-a-wide-screen) · lines 947–972
25
- - [Widget cards (hub pages)](#widget-cards-hub-pages) · lines 974–1088
26
- - [Module cards (a hub's places)](#module-cards-a-hubs-places) · lines 1090–1167
27
- - [Notices](#notices) · lines 1169–1197
28
- - [A value over time](#a-value-over-time) · lines 1199–1329
29
- - [Several values over time](#several-values-over-time) · lines 1248–1286
30
- - [Parts of a whole over time](#parts-of-a-whole-over-time) · lines 1288–1329
31
- - [A list as a board](#a-list-as-a-board) · lines 1331–1447
32
- - [Order, groups and the header (4.131)](#order-groups-and-the-header-4131) · lines 1384–1447
33
- - [A list as cards](#a-list-as-cards) · lines 1449–1495
34
- - [Images full screen](#images-full-screen) · lines 1497–1543
35
- - [Key numbers on a record](#key-numbers-on-a-record) · lines 1545–1581
36
- - [Parts of the page standards](#parts-of-the-page-standards) · lines 1583–1653
37
- - [A few equal things](#a-few-equal-things) · lines 1655–1775
38
- - [An overview page](#an-overview-page) · lines 1777–1848
39
- - [A record's header and empty values](#a-records-header-and-empty-values) · lines 1849–1915
40
- - [A record's tabs, mark and facts](#a-records-tabs-mark-and-facts) · lines 1917–2054
41
- - [Picking at random](#picking-at-random) · lines 2056–2087
42
- - [Filling in what's missing](#filling-in-whats-missing) · lines 2089–2156
43
- - [Values edited in place: the presets' looks](#values-edited-in-place-the-presets-looks) · lines 2158–2183
44
- - [A quick add line](#a-quick-add-line) · lines 2185–2213
45
- - [The sidebar and the phone's bar](#the-sidebar-and-the-phones-bar) · lines 2215–2311
6
+ - [Palettes](#palettes) · lines 56–138
7
+ - [Glow](#glow) · lines 140–159
8
+ - [Semantic tones](#semantic-tones) · lines 161–189
9
+ - [The three badge styles](#the-three-badge-styles) · lines 191–208
10
+ - [Status marks](#status-marks) · lines 210–253
11
+ - [Mapping an enum to tones](#mapping-an-enum-to-tones) · lines 255–284
12
+ - [Glyphs and icons: 3:1](#glyphs-and-icons-31) · lines 286–297
13
+ - [Logos and brand marks](#logos-and-brand-marks) · lines 299–339
14
+ - [Categorical colour](#categorical-colour) · lines 341–406
15
+ - [Heat scale](#heat-scale) · lines 408–460
16
+ - [Depth ramps](#depth-ramps) · lines 462–529
17
+ - [A stored colour](#a-stored-colour) · lines 531–578
18
+ - [Shapes and sizes](#shapes-and-sizes) · lines 580–601
19
+ - [Typography](#typography) · lines 603–773
20
+ - [Words on screen: Title Case and sentence case](#words-on-screen-title-case-and-sentence-case) · lines 637–669
21
+ - [Written text (notes)](#written-text-notes) · lines 671–773
22
+ - [Density](#density) · lines 775–886
23
+ - [Rows on this device](#rows-on-this-device) · lines 833–860
24
+ - [Page width (a record on a wide screen)](#page-width-a-record-on-a-wide-screen) · lines 862–886
25
+ - [Widget cards (hub pages)](#widget-cards-hub-pages) · lines 888–998
26
+ - [Module cards (a hub's places)](#module-cards-a-hubs-places) · lines 1000–1072
27
+ - [Notices](#notices) · lines 1074–1101
28
+ - [A value over time](#a-value-over-time) · lines 1103–1233
29
+ - [Several values over time](#several-values-over-time) · lines 1152–1190
30
+ - [Parts of a whole over time](#parts-of-a-whole-over-time) · lines 1192–1233
31
+ - [A list as a board](#a-list-as-a-board) · lines 1235–1345
32
+ - [Order, groups and the header](#order-groups-and-the-header) · lines 1288–1345
33
+ - [A list as cards](#a-list-as-cards) · lines 1347–1394
34
+ - [Images full screen](#images-full-screen) · lines 1396–1442
35
+ - [Key numbers on a record](#key-numbers-on-a-record) · lines 1444–1480
36
+ - [Parts of the page standards](#parts-of-the-page-standards) · lines 1482–1518
37
+ - [A few equal things](#a-few-equal-things) · lines 1520–1635
38
+ - [An overview page](#an-overview-page) · lines 1637–1702
39
+ - [A record's header and empty values](#a-records-header-and-empty-values) · lines 1704–1767
40
+ - [A record's tabs, mark and facts](#a-records-tabs-mark-and-facts) · lines 1769–1856
41
+ - [Picking at random](#picking-at-random) · lines 1858–1889
42
+ - [Filling in what's missing](#filling-in-whats-missing) · lines 1891–1958
43
+ - [Values edited in place: the presets' looks](#values-edited-in-place-the-presets-looks) · lines 1960–1979
44
+ - [A quick add line](#a-quick-add-line) · lines 1981–2009
45
+ - [A month calendar](#a-month-calendar) · lines 2011–2035
46
+ - [The sidebar and the phone's bar](#the-sidebar-and-the-phones-bar) · lines 2037–2089
46
47
 
47
48
  <!-- /index -->
48
49
 
@@ -55,8 +56,7 @@ composites don't grow that way; they are built against a real app's screen.
55
56
  ## Palettes
56
57
 
57
58
  A palette is an app's own look: its surfaces, text, accent and a
58
- second colour. Four dark ones were chosen once for every app the
59
- foundation serves, in the order they were ranked:
59
+ second colour. Four dark ones serve every app:
60
60
 
61
61
  | Name | `palette` | Accent | Second colour |
62
62
  |---|---|---|---|
@@ -92,25 +92,21 @@ uses no raw colours:
92
92
 
93
93
  - **Surfaces.** `--background`, `--card` and `--popover` are the LCD green
94
94
  (`#c9d1b2`). `--muted`, `--secondary` and `--accent` are a step darker.
95
- - **Ink.** `--foreground` is the mockup's ink (`#1d2416`, 10.1:1).
95
+ - **Ink.** `--foreground` is the ink (`#1d2416`, 10.1:1).
96
96
  `--primary` and `--ring` are ink too, with the green on the primary fill,
97
97
  as a pressed button looks on the device.
98
- - **Dimmed text.** `--muted-foreground` is `#464e39`, 5.50:1. The mockup's
99
- `#5c6650` measured 3.82, under 4.5.
98
+ - **Dimmed text.** `--muted-foreground` is `#464e39`, 5.50:1.
100
99
  - **The dotted rules between rows.** The colour is a token: `--rule` and
101
100
  `--border` are the LCD's line colour (`#a3ad8f`). The style is the
102
101
  app's, a Tailwind border utility: `border-b border-dotted border-rule`.
103
102
  A table's own rows wear the colour, solid.
104
- - **Status text and links.** Status text is a quarter darker than the
105
- mockup's green, rust and blue, so it still reads on its own tinted wash
106
- (7.0:1 or more on the green). `--link` is the mockup's blue.
107
- - **Glyphs and fills.** The light theme's categorical slots, heat steps
108
- and depth steps were tuned for white, and measure 1.5 to 3 on the
109
- green. Palm LCD has its own set, each darker than about oklch 0.57, so
110
- it clears 3:1 on both greens. It keeps the light theme's floors for how
111
- far apart they must look. Each depth ramp holds its Palm LCD slot's
112
- hue and gets darker at every step, as in light ([Depth ramps](#depth-ramps)).
113
- Every heat and depth fill takes white text.
103
+ - **Status text and links.** Status text reads on its own tinted wash
104
+ (7.0:1 or more on the green). `--link` is a blue.
105
+ - **Glyphs and fills.** Palm LCD has its own categorical slots, heat
106
+ steps and depth steps, each clearing 3:1 on both greens. Each depth
107
+ ramp holds its Palm LCD slot's hue and gets darker at every step, as
108
+ in light ([Depth ramps](#depth-ramps)). Every heat and depth fill
109
+ takes white text.
114
110
 
115
111
  **Where it lives.** `styles/theme.css`: each palette's colours as
116
112
  primitives (`--palette-<name>-*`, ratios beside them), and one block per
@@ -120,39 +116,17 @@ on top of `:root`, for Palm LCD. `data-palette` goes on `<html>`, so popups
120
116
  portaled to `<body>` wear it too. An installed app's colours follow it with
121
117
  `pwa({ palette })`. For Palm LCD that is the ink and the green.
122
118
 
123
- **Why some tokens aren't the guide's colour as written.**
124
-
125
- - **The focus ring is the accent** (4.24 to 5.25:1 on the page), not the
126
- guide's accent deep, which measured 2.30 to 2.91, under the 3:1 a focus
127
- indicator needs.
128
- - **Links are accent light** (`--link`, 8.5:1 or more). The accent fails
129
- 4.5:1 as small text on Indigo and Rose and on Violet, and on every
130
- palette's cards but Indigo and Cyan, so it is never small text: it is
131
- the ring, the primary fill and the active item's tint. The `link`
132
- Button variant is `text-link` for the same reason, and the theme
133
- colour as text (`--primary-text`, 4.105: the open tab's name, a picked
134
- choice's word) is accent light too.
135
- - **The status colours are text shades.** The guide's success, warning
136
- and danger are `--success-text`, `--warning-text` and
137
- `--destructive-text` (soft badges, icons, coloured words). Solid fills
138
- keep the deeper shades with white text: white on the guide's success
139
- green measures 1.80. Info keeps its blue.
140
- - **Violet's text on its accent** is `#110823`, a shade darker than the
141
- guide's `#130925`, which measured 4.496:1 (under 4.5).
142
- - **Danger text** is `#df7a72`, a shade lighter than the guide's
143
- `#dc726a`, which measured 4.37 on Graphite's raised surface and 4.46 on
144
- an outline button's fill (an invalid image field's message).
145
- - **Field borders** (`--input`, the guide's strong border) measure 2.5 to
146
- 2.9 against the page, under 3:1. It is already the lightest grey each
147
- palette has, so it is kept as designed; axe doesn't check borders.
148
-
149
- The package's `e2e/fixtures-visual.spec.ts` runs every primitive,
150
- composite and tone story through axe in each palette (Palm LCD in light,
151
- the others in dark), and measures every glyph, categorical slot, heat
152
- step and depth step against each palette's page and card.
153
- `tests/category-slots.test.ts`, `heat-scale.test.ts` and
154
- `depth-ramps.test.ts` hold Palm LCD's own shades to the light theme's
155
- floors.
119
+ **The accent is never small text.** It fails 4.5:1 as small text on
120
+ Indigo and Rose and on Violet, and on every palette's cards but Indigo
121
+ and Cyan: it is the ring, the primary fill and the active item's tint.
122
+ Links are accent light (`--link`, 8.5:1 or more; the `link` Button
123
+ variant is `text-link`), and so is the theme colour as text
124
+ (`--primary-text`: the open tab's name, a picked choice's word). The
125
+ status colours as text are `--success-text`, `--warning-text` and
126
+ `--destructive-text` (soft badges, icons, coloured words); solid fills
127
+ keep the deeper shades with white text. Field borders (`--input`)
128
+ measure 2.5 to 2.9 against the page, under 3:1; axe doesn't check
129
+ borders.
156
130
 
157
131
  **An app's own axe specs** check its palettes instead of light and dark:
158
132
  `defineA11ySuite({ …, palettes: ['indigo-cyan'] })` (and
@@ -210,9 +184,9 @@ shade in both themes, because it always carries white text and the page
210
184
  behind it never enters the calculation.
211
185
 
212
186
  Measured ratios (WCAG 2.x, sRGB) are recorded next to each primitive in
213
- the package's `styles/theme.css`, and its `e2e/fixtures-visual.spec.ts` re-checks all
214
- twelve tone/style combinations with axe against the rendered DOM in both
215
- themes. **A new tone or style is not done until it appears in that story.**
187
+ the package's `styles/theme.css`, and the package re-checks all twelve
188
+ tone/style combinations with axe against the rendered DOM in both
189
+ themes. **A new tone or style is not done until it is in that check.**
216
190
 
217
191
  ## The three badge styles
218
192
 
@@ -235,7 +209,7 @@ columns makes the difference look meaningful when it isn't.
235
209
 
236
210
  ## Status marks
237
211
 
238
- A record's status (4.98, the record standard's 5B) is a `StatusMark`: an
212
+ A record's status is a `StatusMark`: an
239
213
  icon, a colour and the status's own word, the same in its cell, the
240
214
  record's header and the select's options. Every status sorts into one of
241
215
  six kinds; the kind decides the icon and the colour, so it reads by
@@ -265,18 +239,16 @@ export const STATUS_KIND: Record<WidgetStatus, StatusKind> = {
265
239
  `paused`, "Idea" and "Up next" `planned`, "Retired" `ended`.
266
240
  `attention` is for a state that wants a look now, often worked out
267
241
  rather than stored (a review date past due).
268
- - **The icons are one map** (`STATUS_KIND_ICONS`, `lib/status-kinds.ts`
269
- in the package): changing one there changes it in every app. A screen
270
- can pass `icon` for one place; don't.
271
- - **Done and ended have colours of their own** (4.110): a teal for
242
+ - **The icons are one map** (`STATUS_KIND_ICONS`): changing one there
243
+ changes it in every app. A screen can pass `icon` for one place; don't.
244
+ - **Done and ended have colours of their own**: a teal for
272
245
  finished, a hue away from `active`'s green, and a soft rose for no
273
246
  longer going, a hue away from `attention`'s red. Neither is grey, so a
274
247
  finished record never reads as a disabled one. They're text shades
275
248
  (`--status-done-text`, `--status-ended-text`, in every palette and both
276
249
  themes); nothing fills with them.
277
250
  - **Measured:** every kind's word clears 4.5:1 and its icon 3:1 on the
278
- page, a card and a table row, in both themes and every palette
279
- (`app-statusmark--all-kinds`).
251
+ page, a card and a table row, in both themes and every palette.
280
252
  - Badges stay for everything else status-like (a computed progress, a
281
253
  tag): the tone rules below.
282
254
 
@@ -315,10 +287,8 @@ Two rules that keep this honest:
315
287
 
316
288
  An icon that carries meaning on its own (a stage circle, a category's
317
289
  icon, a pressed flag) must clear WCAG's **3:1 non-text minimum** against
318
- the background behind it, in both themes. axe measures text only, so the
319
- package's fixtures have a glyph check of its own: every `<svg>` in its
320
- design-language stories, its ink (with any opacity modifier painted over
321
- its background) against what's behind it. Every `*-text` tone, every
290
+ the background behind it, in both themes. axe measures text only. Every
291
+ `*-text` tone, every
322
292
  category slot and `muted-foreground` clear it as they are. An opacity
323
293
  modifier is where it goes wrong: `text-muted-foreground/80` is the
324
294
  faintest step that still clears it in light mode (3.2:1), and `/70`
@@ -368,10 +338,6 @@ Colour them in one of two ways:
368
338
  where it vanishes in one, give it a `currentColor` outline or use the
369
339
  one-colour mark there.
370
340
 
371
- The package's own stories show the slots with made-up marks in
372
- `currentColor` (`app/AppShell` With logo, `app/WidgetCard` Brand mark,
373
- `app/EntityView` Notice and footer).
374
-
375
341
  ## Categorical colour
376
342
 
377
343
  Tones say good, bad or *notice this*. A value that is merely *different* from its
@@ -414,8 +380,7 @@ Five things about them:
414
380
  circle and vary lightness and chroma as well, so a light lime sits next
415
381
  to a deep navy rather than two mid-tone hues 25° apart. Every pair is at
416
382
  least 17.9 apart in CIEDE2000 ΔE (the perceived difference; 10 and up
417
- reads as a different colour), in both themes. A unit test holds every
418
- pair to 15.
383
+ reads as a different colour), in both themes.
419
384
  - **A category is not a tone.** Red, orange, brown and green are slots
420
385
  because a category is a tinted glyph beside its name, never a status
421
386
  badge, and doesn't read as good or bad there. Where it still could, keep
@@ -424,7 +389,7 @@ Five things about them:
424
389
  categories off slot 1, the one near info's blue.
425
390
  - **They are ordered for small sets.** An app using the first few gets the
426
391
  most separable few, for everyone: the first six also stay apart (ΔE 10
427
- or more, tested) for readers with deuteranopia or protanopia, the common
392
+ or more) for readers with deuteranopia or protanopia, the common
428
393
  red-green deficiencies. Past six, some pairs merge for those readers
429
394
  (gold and lime are nearly one colour), so the glyph and the name carry
430
395
  the meaning and the colour only reinforces it.
@@ -432,13 +397,9 @@ Five things about them:
432
397
  `text-foreground`, so readability never depends on the hue. A slot used
433
398
  as a background needs its own contrast check, which nothing here does
434
399
  for you.
435
- - **The glyph check re-measures them.** All twelve clear the 3:1
436
- non-text minimum in both themes, on the page and on a card (recorded in
437
- `theme.css`). axe checks text contrast, not icon contrast, so the
438
- package's fixtures glyph check draws an icon in each slot on both
439
- surfaces (`patterns/CategoricalColour`) and fails a change that takes
440
- one below 3:1. Its `SideBySide` story shows both themes at once, under
441
- normal vision and simulated deuteranopia and protanopia.
400
+ - **All twelve clear the 3:1 non-text minimum** in both themes, on the
401
+ page and on a card (recorded in `theme.css`). axe checks text
402
+ contrast, not icon contrast.
442
403
 
443
404
  If you find yourself wanting a thirteenth, that is a sign the column should
444
405
  be showing a shape or a label rather than more colours: there is no more
@@ -498,15 +459,6 @@ const HEAT = [
498
459
  - **Five steps, not more.** Past five, neighbours stop being readable as
499
460
  different. Bin the values rather than interpolating between steps.
500
461
 
501
- The package's fixtures render it (`patterns/HeatScale`). Its Default story
502
- runs through axe and the token check in light and dark, axe in every
503
- palette too, and a check that measures every step, as a fill and as a
504
- cell, against the page and a card in each. `tests/heat-scale.test.ts`
505
- holds the distance between neighbours, the order of lightness and every
506
- step against every palette's card and raised surface. `SideBySide` shows
507
- both themes at once, under normal vision and simulated deuteranopia and
508
- protanopia.
509
-
510
462
  ## Depth ramps
511
463
 
512
464
  For **depth within one category**: the levels of one kind of thing, where
@@ -537,13 +489,10 @@ and `text-category-N-depth-M-foreground` (text on that cell).
537
489
  - **Depth, not amount.** A ramp says "a level of this", never "more of
538
490
  this is worse". A count or a total over many categories is the heat
539
491
  scale; a status is a tone.
540
- - **Opaque, at full strength.** Each step clears 3:1 against the card and
541
- the page in light, dark and every palette (3.03:1 at the least, light
542
- on `--muted`), so a shape stands out with no outline. An opacity
543
- modifier (`bg-category-3-depth-2/50`) gives that up.
544
- - **Text on a fill takes its own foreground.** Which text colour is right
545
- depends on the step and the theme: pair the two as below. It measures
546
- 4.55:1 at the least.
492
+ - **Opaque, at full strength, and text on a fill takes its own
493
+ foreground**, as on the heat scale: each step clears 3:1 (3.03:1 at the
494
+ least, light on `--muted`) and its text 4.55:1 at the least, paired as
495
+ below. An opacity modifier (`bg-category-3-depth-2/50`) gives that up.
547
496
  - **Neighbours are closer than the heat scale's, so keep a boundary.**
548
497
  Neighbouring steps are at least ΔE 9.6 apart in light and 8.7 in dark,
549
498
  and 6.9 under simulated deuteranopia and protanopia. Five steps of one
@@ -579,21 +528,6 @@ const GREEN_DEPTH = [
579
528
  <td className={GREEN_DEPTH[level - 1].cell}>{name}</td>
580
529
  ```
581
530
 
582
- The package's fixtures render every ramp (`patterns/DepthRamps`). Its
583
- Default story runs through axe and the token check in light and dark, axe
584
- in every palette too, and a check that measures every step of every
585
- slot, as a fill and as a cell, against the page and a card in each.
586
- `tests/depth-ramps.test.ts` computes from the token values one hue per
587
- slot, the order of lightness, the distance between neighbours (ΔE 8, and
588
- 6 with deuteranopia and protanopia), the distance from the neutral greys
589
- (6), text on every fill and every step against every palette's card and
590
- raised surface, and fails if a change to `theme.css` breaks one. Palm LCD,
591
- the light palette, has its own ramps on the same rules (its slot's hue,
592
- darker at every step, ΔE 6 from its own greys).
593
- `SideBySide` shows both themes at once, each ramp beside its theme's
594
- muted greys, under normal vision and simulated deuteranopia and
595
- protanopia.
596
-
597
531
  ## A stored colour
598
532
 
599
533
  A colour the user stored as data (a paint's hex, a label's colour, a
@@ -631,27 +565,17 @@ import { ColorSwatch } from '@tristan2828/ui-foundation'
631
565
  name stays on one line, cut, its whole text in a tooltip.
632
566
  - **The fill is the one colour that isn't a token.** The swatch's
633
567
  `backgroundColor` is an inline style from the prop, which the ESLint
634
- token rule allows (it forbids hex *literals* in a `style`). The
635
- fixtures' token check exempts exactly that: a swatch's background while
636
- it equals its own `data-color`. Nothing else may paint a stored colour,
568
+ token rule allows (it forbids hex *literals* in a `style`). Nothing
569
+ else may paint a stored colour,
637
570
  and a stored colour never paints text, a surface or a border: a
638
571
  colour the user picked from a few is a categorical slot (above), not a
639
572
  hex.
640
573
 
641
- The package's fixtures render it (`app/ColorSwatch`: on each surface,
642
- invalid and missing, in a Badge, in a `DataTable`, a long name, every
643
- palette side by side), with axe, the token check and the ring's ratio
644
- measured in light, dark and every palette. Cell pattern 24 is it in a
645
- column.
646
-
647
- **Picking one on a form is `ColorField`** (4.124): the same swatches,
648
- each beside its name, as one radio group, and Custom for the browser's
649
- own picker. Its default twelve (`COLOR_CHOICES`) sit at a middle
650
- lightness, so each fill clears 3:1 against a card in light, dark and the
651
- dark palettes, and 2.3:1 on Palm LCD, whose mid-light panel no middle
652
- colour clears 3:1 on (the ring shows the edge there). The picked one is
653
- marked by its radio's dot and a primary border, never by its colour
654
- alone. Cell pattern 24 has its markup.
574
+ Cell pattern 24 is it in a column.
575
+
576
+ **Picking one on a form is `ColorField`**: the same swatches, each
577
+ beside its name, as one radio group, and Custom for the browser's own
578
+ picker. Cell pattern 24 has its markup and its rules.
655
579
 
656
580
  ## Shapes and sizes
657
581
 
@@ -712,8 +636,7 @@ height and weight together, from tokens in the package's `styles/theme.css`:
712
636
 
713
637
  ### Words on screen: Title Case and sentence case
714
638
 
715
- Two cases, chosen by what the words are (4.97; before it, everything was
716
- sentence case):
639
+ Two cases, chosen by what the words are:
717
640
 
718
641
  - **Title Case names a thing you can see or press:** page, dialog, sheet,
719
642
  form, card and section titles; buttons and links that act like
@@ -786,8 +709,8 @@ least), a column's menu has Narrower, Wider, Fit to content and Fit all
786
709
  columns, and a double-click on the edge fits it again. The width is kept
787
710
  in the Markdown as a comment after the table, naming its columns
788
711
  (`<!-- table widths: Item=140, Cost=72 -->`), which `<Markdown>` and the
789
- editor read and never show; nor do the backend's MCP read tools (4.94:
790
- `fetch`, `list`, `search`, and `update`'s answer), while `edit_text` and
712
+ editor read and never show; nor do the backend's MCP read tools (`fetch`,
713
+ `list`, `search`, and `update`'s answer), while `edit_text` and
791
714
  `update` keep it in what's stored. A column named nowhere fits its words. A
792
715
  phone ignores the widths and can't set them; on paper they scale to the
793
716
  page.
@@ -798,11 +721,11 @@ columns ("Item, Size, Colour, …"), so two such tables keep distinct
798
721
  names; the arrow keys scroll it (in the editor Home and End too), with
799
722
  the `ring` focus ring. A table that fits gets no tab stop and no region.
800
723
 
801
- **The theme colour as text** (4.105) is `--primary-text`
724
+ **The theme colour as text** is `--primary-text`
802
725
  (`text-primary-text`): what's picked or open, in the primary's own colour
803
726
  where that reads as small text. The open record tab's name, the open tab
804
727
  of any line tab list (`TabsList variant="line"`, a page's sub-navigation
805
- under a section heading, 4.110) and a picked `ChoiceButtons` option wear
728
+ under a section heading) and a picked `ChoiceButtons` option wear
806
729
  it (each tab with a 3px `bg-primary` line and a `bg-primary/12` tint, the choice with
807
730
  a `border-primary` and a `bg-primary/12` fill). The pill look
808
731
  (`TabsList`'s default) keeps its open tab in `--foreground` on the page
@@ -841,7 +764,7 @@ Highlighted words (`==words==` in the Markdown) have four colour tokens:
841
764
  `--highlight-green` and `--highlight-red` (`bg-highlight-amber`, …). Each
842
765
  is a wash behind words that keep `--foreground`, so the pair is the
843
766
  contrast that counts: light washes in the light theme and deep ones in the
844
- dark, each pair checked by axe in both (the Default story's four marks).
767
+ dark, each pair checked by axe in both.
845
768
  Use them as a background behind written text only, never as a tone: a
846
769
  status is `success`, `warning`, `destructive` or `info`.
847
770
 
@@ -870,7 +793,7 @@ set, not a `DataTable` prop:
870
793
 
871
794
  - `compact` and `comfortable` change padding only. Text keeps
872
795
  `type-body`, so compact never drops below a readable size.
873
- - **Forms are compact at every density but `large`** (4.85): inside a
796
+ - **Forms are compact at every density but `large`**: inside a
874
797
  `FieldGroup` (every `EntityForm`, `FormDialog` and `FormSection`) the
875
798
  inputs, selects, combobox boxes and default buttons are 32px, the
876
799
  compact table's row, with 14px between fields; under 48rem or on a
@@ -901,19 +824,11 @@ set, not a `DataTable` prop:
901
824
  - Under the hood, the table primitive's cells read `--table-cell-px`,
902
825
  `--table-cell-py` and `--table-head-height`. `large` also redefines
903
826
  Tailwind's own scale (`--spacing`, `--text-*`, `--radius`), the `--type-*`
904
- roles and `--control-text-sm` (the small Button and Toggle).
905
- `DataTable`'s totals row reads the body cells' tokens, so it is a row's
906
- height at every density. Each
907
- default is the value it always had, so a screen without `data-density`
908
- doesn't change. The selectors are in `styles/theme.css`. A composite
909
- reaches `compact` with the `density-compact:` variant (`styles/index.css`:
910
- any ancestor with `data-density="compact"`), the way `WidgetCard` and
911
- `ModuleCard` do; an app's own card can use it too. the package's
912
- fixtures page shows any fixture at a density, and `patterns/Density`
913
- shows the primitives, `DataTable`, the sidebar and the hub cards at
914
- each. Its checks
915
- measure that every step changes what it should, and that the default
916
- keeps today's sizes.
827
+ roles and `--control-text-sm` (the small Button and Toggle). The
828
+ selectors are in `styles/theme.css`. A composite reaches `compact` with
829
+ the `density-compact:` variant (`styles/index.css`: any ancestor with
830
+ `data-density="compact"`), the way `WidgetCard` and `ModuleCard` do; an
831
+ app's own card can use it too.
917
832
 
918
833
  ### Rows on this device
919
834
 
@@ -929,7 +844,7 @@ toggle in an app without a palette).
929
844
  | Rows | Table cell padding (vertical) | Header height |
930
845
  |---|---|---|
931
846
  | Compact *(the default)* | 4px | 32px |
932
- | Regular | 8px | 40px, the size before 4.63 |
847
+ | Regular | 8px | 40px |
933
848
 
934
849
  - The choice is kept in this device's `localStorage`
935
850
  (`ui-foundation:rows`), like the palette, so a phone and a laptop can
@@ -949,7 +864,7 @@ toggle in an app without a palette).
949
864
  A record page (`EntityView`) keeps a reading width: its column is at most
950
865
  `max-w-4xl`, and with a facts rail the page is that plus the 300px rail.
951
866
  On a TV the right of the page is then empty. `data-width="wide"` on
952
- `<html>` (4.133) lifts the cap: the column fills the page and the rail
867
+ `<html>` lifts the cap: the column fills the page and the rail
953
868
  stays 300px, moving right with it.
954
869
 
955
870
  ```ts
@@ -959,8 +874,7 @@ document.documentElement.dataset.width = wide ? 'wide' : ''
959
874
 
960
875
  - **The app owns the setting**, as it owns Text Size: a field on its
961
876
  settings page, kept in `localStorage`, set on `<html>` by a script in
962
- `index.html` so the first paint has it. Regular (no attribute) is the
963
- layout as it always was.
877
+ `index.html` so the first paint has it. Regular is no attribute.
964
878
  - **Only the record page widens.** A record in a dialog over its list
965
879
  keeps the dialog's size (the rule skips anything inside
966
880
  `role="dialog"`); a phone is unchanged, since the column already fills
@@ -985,7 +899,7 @@ const { data, isLoading, error, refetch } = useReadyTasksQuery() // one page of
985
899
 
986
900
  <div className="grid grid-cols-[repeat(auto-fill,minmax(min(100%,--spacing(72)),1fr))] gap-4">
987
901
  <WidgetCard
988
- title="Ready to start"
902
+ title="Ready to Start"
989
903
  icon={ListChecksIcon}
990
904
  link={{ to: '/tasks?status=ready', label: 'All' }}
991
905
  isLoading={isLoading}
@@ -1057,7 +971,7 @@ const { data, isLoading, error, refetch } = useReadyTasksQuery() // one page of
1057
971
  backend.
1058
972
 
1059
973
  ```tsx
1060
- const HUB_CARDS = { ready: 'Ready to start', waiting: 'Waiting on', links: 'Saved links' }
974
+ const HUB_CARDS = { ready: 'Ready to Start', waiting: 'Waiting On', links: 'Saved Links' }
1061
975
  const layout = useWidgetLayout('my-app:hub', Object.keys(HUB_CARDS))
1062
976
 
1063
977
  <div className="flex items-center justify-between gap-3">
@@ -1082,10 +996,6 @@ const layout = useWidgetLayout('my-app:hub', Object.keys(HUB_CARDS))
1082
996
  equal columns that wraps (the class above: one column on a phone, as
1083
997
  many 288px-or-wider columns as fit). Each card is as tall as its rows;
1084
998
  it doesn't stretch to its tallest neighbour.
1085
- - The fixtures' `app/WidgetCard` shows three widgets on a page and every
1086
- one in each state, a folded summary in each state and an accordion,
1087
- and `app/WidgetLayoutSheet` a hub with its Customize sheet; its checks run axe and the token and glyph checks in
1088
- both themes and at `large`.
1089
999
 
1090
1000
  ## Module cards (a hub's places)
1091
1001
 
@@ -1160,11 +1070,6 @@ const { data, isLoading, error, refetch } = useProjectsSummaryQuery()
1160
1070
  (the whole note is still read out), so every chip keeps its height and
1161
1071
  a long note can't take over the row. It stays while the number loads,
1162
1072
  so the chip doesn't change width, and goes on an error, as on the card.
1163
- - The fixtures' `app/ModuleCard` shows a hub with a strip and a widget,
1164
- every state, both at `compact`, and both again as a row of chips (Row,
1165
- Row states, Row notes); its checks run axe and the token and glyph checks in both
1166
- themes and at `large`, measure the strip at a desktop and a phone
1167
- width, and run axe on the chips at a phone's.
1168
1073
 
1169
1074
  ## Notices
1170
1075
 
@@ -1175,7 +1080,7 @@ badge and stays until the state changes, unlike a toast. `EntityView`'s
1175
1080
  under its own header.
1176
1081
 
1177
1082
  ```tsx
1178
- <Notice tone="warning" title="On hold" action={<Button size="sm" variant="outline">Release the hold</Button>}>
1083
+ <Notice tone="warning" title="On hold" action={<Button size="sm" variant="outline">Release the Hold</Button>}>
1179
1084
  Read “Hyperion” first: this one follows it.
1180
1085
  </Notice>
1181
1086
  ```
@@ -1186,8 +1091,7 @@ under its own header.
1186
1091
  swaps the tone's own icon for a better one (a lock for read-only).
1187
1092
  - **A wash, not a fill:** the tone at 10% (20% in dark) with `foreground`
1188
1093
  text and the tone's `*-text` icon. The message reads as body text, so
1189
- nothing inside it is muted. The fixtures' `app/Notice` measures every
1190
- tone with axe and the glyph check in both themes.
1094
+ nothing inside it is muted.
1191
1095
  - **One or two sentences and at most one action**: what the state means
1192
1096
  and what to do about it. More than that belongs in a section.
1193
1097
  - **Not an alert.** A notice there when the page opens is part of the
@@ -1198,7 +1102,7 @@ under its own header.
1198
1102
 
1199
1103
  ## A value over time
1200
1104
 
1201
- `LineChart` (4.34) is the one chart: a single series on a record's page
1105
+ `LineChart` is the chart for a single series on a record's page
1202
1106
  (a price checked daily, a weight, a balance), oldest first, with an
1203
1107
  optional dashed `target` and one point marked (`mark`: `'min'`, `'max'`
1204
1108
  or `'last'`) with its value.
@@ -1228,13 +1132,13 @@ or `'last'`) with its value.
1228
1132
  named by `label`, with a summary (first, last, lowest, highest, the
1229
1133
  target) and a table of every point. Give it the same `formatY` and
1230
1134
  `formatX` the page uses for those values elsewhere.
1231
- - **A projection** (4.51): `projection={{ label: 'Projected', points }}`
1135
+ - **A projection**: `projection={{ label: 'Projected', points }}`
1232
1136
  carries the line on past its last point, dashed in the same colour, for
1233
1137
  where a value may go (a balance at a rate of return), never for what was
1234
1138
  measured. Its points come after the last of `points`; the mark stays on
1235
1139
  `points`, and a screen reader gets the projection's end in the summary
1236
1140
  and its rows in the table, each named by `label`.
1237
- - **Levels** (4.64): for a value that is one of a few named steps and
1141
+ - **Levels**: for a value that is one of a few named steps and
1238
1142
  holds until it changes (a confidence, a severity, a stage), pass
1239
1143
  `levels`, lowest first, and give each point its step's index as y:
1240
1144
  `levels={['Very low', 'Low', 'Moderate', 'High']}`. The steps are named
@@ -1247,7 +1151,7 @@ or `'last'`) with its value.
1247
1151
 
1248
1152
  ### Several values over time
1249
1153
 
1250
- `MultiLineChart` (4.51) puts several series on one plot, sharing one x
1154
+ `MultiLineChart` puts several series on one plot, sharing one x
1251
1155
  and one y range: a net worth beside its assets and what's owed, or a
1252
1156
  balance's history beside low, middle and high projections.
1253
1157
 
@@ -1287,7 +1191,7 @@ balance's history beside low, middle and high projections.
1287
1191
 
1288
1192
  ### Parts of a whole over time
1289
1193
 
1290
- `StackedAreaChart` (4.132) shows several amounts that add up to a total,
1194
+ `StackedAreaChart` shows several amounts that add up to a total,
1291
1195
  each a category, over time: a portfolio by asset class, a budget by
1292
1196
  envelope. Each band is stacked on the one below, from zero, so the top
1293
1197
  edge is the total and both the growth and the mix show.
@@ -1330,7 +1234,7 @@ edge is the total and both the growth and the mix show.
1330
1234
 
1331
1235
  ## A list as a board
1332
1236
 
1333
- `Board` (4.36) shows a list as a column per value of one choice field (a
1237
+ `Board` shows a list as a column per value of one choice field (a
1334
1238
  status, a stage), a card per record, and moves a record by moving its
1335
1239
  card. It is a second view of a list, on its own page beside the
1336
1240
  `DataTable`, never a replacement: filters, sorting and saved views stay
@@ -1381,7 +1285,7 @@ the table's.
1381
1285
  snap points; a phone shows one column at a time, with the edge of the
1382
1286
  next one showing.
1383
1287
 
1384
- ### Order, groups and the header (4.131)
1288
+ ### Order, groups and the header
1385
1289
 
1386
1290
  ```tsx
1387
1291
  <Board<Job, Stage, Size>
@@ -1430,25 +1334,19 @@ the table's.
1430
1334
  end. A card whose group isn't one of the column's isn't on the board.
1431
1335
  The keyboard's way to change group is the app's own field in `menu`
1432
1336
  (Priority, Size): Board's menu has no group section.
1433
- - **Paging:** `pageSize` shows a column's (or each group's) first cards,
1434
- then "Show N More"; `pageKey` changing (the filters) folds them back.
1435
- - **The header's slots:** `description` is a caption under the name,
1436
- `note` short muted text, `action` a control at the end (a +; the other
1437
- columns keep the header's height), and `lead` outlines the column a
1438
- list starts in.
1439
- - **The phone's counts:** `phone="counts"` puts a row of buttons over the
1440
- columns below `lg`, each a column's count over its `shortName`, that
1441
- shows that one column (`aria-pressed`); from `lg` up, the columns as
1442
- usual.
1337
+ - **Paging, the header's slots and the phone's counts** are props, each
1338
+ in the example above: `pageSize` with `pageKey` (the filters, which
1339
+ fold the pages back); a column's `description`, `note`, `action` and
1340
+ `lead`; `phone="counts"`.
1443
1341
  - **The menu:** `menu(item)` appends the app's own items after a
1444
1342
  separator; the button is then ⋯, "Actions for <name>", holding Move To,
1445
- Order and the app's items. Without it, the Move button as before.
1343
+ Order and the app's items. Without it, the Move button.
1446
1344
  - **No grip:** a card that drags shows a grab hand over it, and is picked
1447
1345
  up whole, from its title link too.
1448
1346
 
1449
1347
  ## A list as cards
1450
1348
 
1451
- `DataTable`'s `layouts` (4.39) draw the same rows as cards beside the
1349
+ `DataTable`'s `layouts` draw the same rows as cards beside the
1452
1350
  table: a thumbnail grid for a feed, covers for a collection, a dense line
1453
1351
  each for clearing a backlog. They are layouts of one list, not other
1454
1352
  pages: the toolbar, filters, saved views, paging, `groupBy` headings
@@ -1477,8 +1375,9 @@ const { layout, setLayout } = useTableLayout({
1477
1375
  layout it is read in most: covers for something browsed by its art, the
1478
1376
  table for something compared by its columns.
1479
1377
  - **A grid's sizes** are the package's: `sm` for covers (three across on
1480
- a phone), `md` for thumbnails (two), `lg` for big ones (one). `list`
1481
- is one card per line in a bordered box, divided like rows.
1378
+ a phone), `md` for thumbnails (two), `lg` for big ones (one).
1379
+ `arrange: 'list'` is one card per line in a bordered box, divided like
1380
+ rows.
1482
1381
  - **The picture** is `Artwork`: a fixed shape (2:3 posters and books,
1483
1382
  1:1 square art, 16:9 video), the record's image or a neutral
1484
1383
  placeholder (the list's icon, and the title where most records have no
@@ -1496,7 +1395,7 @@ const { layout, setLayout } = useTableLayout({
1496
1395
 
1497
1396
  ## Images full screen
1498
1397
 
1499
- `ImageViewer` (4.129) shows one of an ordered list of images large, over
1398
+ `ImageViewer` shows one of an ordered list of images large, over
1500
1399
  the whole viewport: a cover clicked in a grid, a record's photos, the
1501
1400
  pages kept from a set. It's the package's modal dialog, so focus stays in
1502
1401
  it while it's open and goes back to the cover that opened it.
@@ -1544,7 +1443,7 @@ const [shown, setShown] = useState<number | null>(null)
1544
1443
 
1545
1444
  ## Key numbers on a record
1546
1445
 
1547
- `KeyStats` (4.46), in `EntityView`'s `strip`: the few figures a record's
1446
+ `KeyStats`, in `EntityView`'s `strip`: the few figures a record's
1548
1447
  page is read for first (done of total, time left, the next date), in a
1549
1448
  row under the header, across the page at every width.
1550
1449
 
@@ -1559,16 +1458,16 @@ row under the header, across the page at every width.
1559
1458
  value in the section title's size and tabular figures, a `hint`
1560
1459
  under it in caption type. One bordered card, the figures side by side,
1561
1460
  wrapping on a phone. A `<dl>`, so each label is read with its value.
1562
- - **An icon with the word** (`icon`, 4.81): the concept's icon at 13px
1461
+ - **An icon with the word** (`icon`): the concept's icon at 13px
1563
1462
  before the label, in the label's muted tone, one icon per meaning
1564
1463
  across the app (Lucide: a date `CalendarIcon`, next and review on
1565
1464
  `CalendarClockIcon`, when and length `ClockIcon`, a count `HashIcon`,
1566
1465
  status `CircleDotIcon`, price `DollarSignIcon`). The word stays; the
1567
1466
  icon is decorative. Never an icon alone in the strip.
1568
- - **An empty value reads as a dash** (`emptyLabel`, 4.81; "Not set"
1569
- before), in body type and muted, read by a screen reader as "Not set".
1467
+ - **An empty value reads as a dash** (`emptyLabel`), in body type and
1468
+ muted, read by a screen reader as "Not set".
1570
1469
  Never a blank.
1571
- - **A tip and an action on a value** (4.120), as a rail fact has:
1470
+ - **A tip and an action on a value**, as a rail fact has:
1572
1471
  `info` is a few words behind a small info button after the value (a
1573
1472
  tooltip on hover and keyboard focus, a caption line under the value on
1574
1473
  a touch screen, read with the value by a screen reader), and `action`
@@ -1582,79 +1481,45 @@ row under the header, across the page at every width.
1582
1481
 
1583
1482
  ## Parts of the page standards
1584
1483
 
1585
- Six small parts the list, record and overview standards share. Each is
1586
- generic and standalone: an app (or a later foundation release) wires it
1587
- into a table, a record or an overview.
1484
+ Small parts the list, record and overview standards share. Each is
1485
+ generic and standalone: an app wires it into a table, a record or an
1486
+ overview. Their props are in the type declarations.
1588
1487
 
1589
1488
  - **`ValueList`: several values in a cell.** `<ValueList items={[{ label }]} max={2} />`
1590
- shows two values on one line and the rest as `+N`, every folded value in
1591
- its tooltip (the `+N` is a button, so a keyboard and a tap reach it). A
1592
- value is a chip by default, or the app's own `node` (an icon, a
1593
- `ColorSwatch`) with its `label` as the plain text. An empty cell is a
1594
- muted dash that reads "None".
1489
+ shows two values on one line and the rest as `+N`. A value is a chip by
1490
+ default, or the app's own `node` (an icon, a `ColorSwatch`) with its
1491
+ `label` as the plain text.
1595
1492
  - **`ListHeader`: a list's header.** The title (the page's h1) with its
1596
- `count`, `newAction` alone beside it, and one ⋯ menu for the rest. One
1597
- related link in `links` stays a button; two or more fold into ⋯ with
1598
- `more` (the page's own actions). `deleted={{ shown, onShownChange }}` adds
1599
- "Show Deleted" as the menu's last item and, while it's on, an info
1600
- `Notice` with "Back to the List" in a `role="status"` region that is
1601
- always there. It holds no state: the app keeps `shown`. Passed as a
1602
- framed DataTable's `pageHeader` (4.106, C3) it's as wide as the
1603
- table, so ⋯ and New end on the card's right edge. The menu is as
1604
- wide as its longest item and never wraps one (4.105), as is a row's ⋯
1605
- menu. **One more button beside New** (`secondaryAction`, 4.117) for
1606
- the list's second most common action ("Refresh Now", "Add from
1607
- Catalog"): `{ label, icon?, onClick | to, disabled? }`, an outline
1608
- button just before New, which stays the one filled button. Only one:
1609
- anything else is in ⋯. On a phone it folds into ⋯ as the menu's first
1610
- item (⋯ shows there for it alone if nothing else is in the menu).
1611
- Its `hint` (4.120) is a short line under the button ("12 searches
1612
- left"), in caption type and the muted tone, describing the button to a
1613
- screen reader; the buttons stay level, the line hanging below. On a
1614
- phone it's under the words of ⋯'s first item. **A line of context**
1615
- (`description`, 4.120): one short muted sentence under the title, for a
1616
- list that needs it ("Each search runs against the catalog once a
1617
- day."). It wraps in the header's width and never widens a framed
1618
- table's shared width; on a phone it's under the title and its buttons.
1619
- A `more` item that can't be used now (4.123, `disabled: true`: an
1620
- import already running) stays in ⋯, greyed, never hidden.
1621
- - **A bar between the header and the list** (`DataTable pageBar`, 4.123):
1493
+ `count`, `newAction` alone beside it, and one ⋯ menu for the rest
1494
+ (`links`, `more`, and `deleted`'s "Show Deleted"). It holds no state:
1495
+ the app keeps `shown`. `secondaryAction` (the list's second most
1496
+ common action, one at most, with an optional `hint` line under it),
1497
+ `siblings` and passing it as a framed DataTable's `pageHeader` are in
1498
+ cell pattern 25. **A line of context** (`description`): one short
1499
+ muted sentence under the title, for a list that needs it ("Each search
1500
+ runs against the catalog once a day."). A `more` item that can't be
1501
+ used now (`disabled: true`: an import already running) stays in ⋯,
1502
+ greyed, never hidden.
1503
+ - **A bar between the header and the list** (`DataTable pageBar`):
1622
1504
  something about the whole page that belongs above its rows, such as a
1623
- deals bar, "Allow Reminders" or a budget's totals. It's drawn under
1624
- `pageHeader` and above the views, in the same box, so C3 holds: the
1625
- header, the bar and the card share the table's width, and the bar
1626
- wraps in it rather than widening it. Never a bar put between a
1627
- separate `ListHeader` and the table, which loses the shared width.
1628
- One sentence: anything longer belongs in a help page.
1629
- - **`Timeline`: a record's dated history.** `items` newest first
1630
- (`{ id, date, dateTime?, kind?, body, edit? }`): dates in a tabular
1631
- column on the left, a dot and a thin line, the entry on the right with
1632
- its `kind` as a muted line under it and `edit` (the entry's own
1633
- control) at its end. The first `initial` (5) show, then "Show All N";
1634
- under 24rem of its own width the date moves above its entry. Empty
1635
- reads `emptyText` ("Nothing yet").
1636
- - **`NeedsYou`: what waits on the user.** `items={[{ text, to, tone? }]}`:
1637
- one region at the top of an overview, a warning wash with the `*-text`
1638
- icon, each line a link; `tone: 'destructive'` for an overdue one.
1505
+ deals bar, "Allow Reminders" or a budget's totals. Never a bar put
1506
+ between a separate `ListHeader` and the table, which loses the shared
1507
+ width. One sentence: anything longer belongs in a help page.
1508
+ - **`Timeline`: a record's dated history**, its `items` newest first.
1509
+ - **`NeedsYou`: what waits on the user.** One region at the top of an
1510
+ overview, each line a link; `tone: 'destructive'` for an overdue one.
1639
1511
  Nothing renders for an empty list.
1640
1512
  - **`Freshness`: how old a number is.** `<Freshness label="Balances entered"
1641
1513
  at="2026-08-02" staleAfter="2026-11-02" />` reads "Balances entered Aug
1642
- 2" in caption type and the muted tone, and once `staleAfter` has passed
1643
- the warning tone with a warning icon and ", out of date" for a screen
1644
- reader. The app owns the rule (entered plus 90 days); this only compares.
1645
- A plain `'YYYY-MM-DD'` day is never shifted by the time zone.
1514
+ 2", in the warning tone once `staleAfter` has passed. The app owns the
1515
+ rule (entered plus 90 days); this only compares.
1646
1516
  - **`PartEmpty` and `WidgetCard`'s `empty`: a part with nothing yet.**
1647
1517
  `empty={{ text?, action }}` draws "Nothing here yet" and one outline
1648
- button (a link `to`, or `onClick`) in place of the card's plain
1649
- `emptyMessage` line, the foundation's `Empty` at card size.
1650
-
1651
- Every one is measured with axe and the glyph check in both themes
1652
- (fixtures `app/ValueList`, `ListHeader`, `Timeline`, `NeedsYou`,
1653
- `Freshness`, `PartEmpty`).
1518
+ button in place of the card's plain `emptyMessage` line.
1654
1519
 
1655
1520
  ## A few equal things
1656
1521
 
1657
- `EqualItems` (4.93, record standard R10): a small set of equal, related
1522
+ `EqualItems`: a small set of equal, related
1658
1523
  things inside a record (a plan's phases, the stores a price is compared
1659
1524
  at, a handful of options), one data shape in five looks. A record picks
1660
1525
  one look per set; a sixth is asked for first.
@@ -1679,19 +1544,19 @@ one look per set; a sixth is asked for first.
1679
1544
  | `table` | one compact row per item, the title as its row header, a column per field label (first-seen order), a dash where an item has none; scrolls sideways in its own box on a phone | things compared on the same values (a price at each store) |
1680
1545
  | `featured` | the item `featuredId` names in full, in a card with the accent border, then the rest as toggles that open in place | one is current or best (a program's phases) |
1681
1546
  | `panels` | a panel per item side by side, its title and state in a muted band, every detail labelled above its value; stacked on a phone | each has several details and must read as separate |
1682
- | `stepper` (4.127) | a row of numbered steps joined by a line, each done, current or upcoming, picking the one item whose panel shows under it; opens on the current step; the row scrolls sideways in its own box on a phone | a sequence with one running and the others looked at in turn (a program's phases), where `featured`'s toggles would stack every phase's long content |
1547
+ | `stepper` | a row of numbered steps joined by a line, each done, current or upcoming, picking the one item whose panel shows under it; opens on the current step; the row scrolls sideways in its own box on a phone | a sequence with one running and the others looked at in turn (a program's phases), where `featured`'s toggles would stack every phase's long content |
1683
1548
 
1684
1549
  - **A state is a badge**, the outline style in its tone (`state: 'Planned'`
1685
1550
  is the neutral one; `{ label, tone }` with `info`, `success`, `warning`
1686
1551
  or `destructive`). Most states stay neutral ("Mapping an enum to tones").
1687
1552
  - **A field is the record's row**: the label in label type and muted, the
1688
1553
  value in body type; an empty value is the record's dash, read as "Not
1689
- set". `featured` uses the rail's beside rows (field-rows.ts).
1554
+ set". `featured` uses the rail's beside rows.
1690
1555
  - **Featured's toggles** are buttons inside headings at the items' level:
1691
1556
  Enter or Space opens one, Tab moves to the next, several can be open,
1692
1557
  `aria-expanded` says which. Never a link; `defaultOpenIds` opens some at
1693
1558
  first.
1694
- - **The stepper** (4.127): each item's `step` is `done` (filled with
1559
+ - **The stepper**: each item's `step` is `done` (filled with
1695
1560
  the primary, a check), `current` (ringed, "Current" under its name, its
1696
1561
  panel's border the accent) or `upcoming` (outlined, the default); the
1697
1562
  line into a step is the primary up to the current one. It opens on
@@ -1709,7 +1574,7 @@ one look per set; a sixth is asked for first.
1709
1574
  in its own box (never the page) as the record's tab bar does, the
1710
1575
  shown step kept in view; it never folds into a select, which would
1711
1576
  hide the done and current marks the stepper is for.
1712
- - **The same steps, read only** (4.128): `StepTrack` draws the stepper's
1577
+ - **The same steps, read only**: `StepTrack` draws the stepper's
1713
1578
  row on its own, with no panels and nothing to pick, for a display of
1714
1579
  where a sequence is (a list card showing a program's phases). The
1715
1580
  marks, the line and the sizes are the stepper's own parts, so the two
@@ -1731,7 +1596,7 @@ one look per set; a sixth is asked for first.
1731
1596
  reader (the list's name, the table's caption); titles are `h3` under a
1732
1597
  section's `h2` (`headingLevel`).
1733
1598
 
1734
- **An item's own content and actions** (4.94). When an item holds more
1599
+ **An item's own content and actions.** When an item holds more
1735
1600
  than label/value rows (an editor of several fields, a note, a chart), it
1736
1601
  carries them itself, never as a field's value, where the label/value grid
1737
1602
  squeezes them into its narrow value column:
@@ -1769,14 +1634,9 @@ items={stores.map((store) => ({
1769
1634
  - **Editing one item swaps its fields for its editor** (the content), then
1770
1635
  back on Save or Cancel. The set's other items stay as they are.
1771
1636
 
1772
- Measured with axe, the token check and the glyph check in both themes and
1773
- every palette (fixtures `app/EqualItems`, "Content and actions" among
1774
- them, and "Stepper"), and from the keyboard and at a phone's width in
1775
- `e2e/equal-items.spec.ts`.
1776
-
1777
1637
  ## An overview page
1778
1638
 
1779
- The overview standard (4.89): a module's first page when it has three
1639
+ The overview standard: a module's first page when it has three
1780
1640
  or more lists, saying how things stand and what waits on the user, each
1781
1641
  part one click from its list. `OverviewPage` draws the whole page; the
1782
1642
  hub's `WidgetCard`s take the same card anatomy, so a hub and an overview
@@ -1802,7 +1662,7 @@ read alike.
1802
1662
  onRetry: refetch,
1803
1663
  },
1804
1664
  { id: 'budget', title: 'Budget', icon: WalletIcon, to: '/budget',
1805
- empty: { action: { label: 'Add the first line', to: '/budget/new' } } },
1665
+ empty: { action: { label: 'Add the First Line', to: '/budget/new' } } },
1806
1666
  ]}
1807
1667
  />
1808
1668
  ```
@@ -1827,7 +1687,7 @@ read alike.
1827
1687
  `ErrorState` in the card), and `empty` (a part with nothing yet: "Nothing
1828
1688
  yet" in the tile, `PartEmpty` and its one way to start in the card). An
1829
1689
  empty part stays on the page: hiding it makes the part forgotten.
1830
- - **Links out** (`links`, 4.120): a short list of pages outside the app
1690
+ - **Links out** (`links`): a short list of pages outside the app
1831
1691
  (`{ label, href, icon? }`), one section after the parts under a
1832
1692
  "Links" heading (`linksTitle`). Each link is its label, its icon
1833
1693
  before it if it has one, and the external-link mark, opening in a new
@@ -1839,24 +1699,19 @@ read alike.
1839
1699
  headline in the numeric type, `line` one muted line under it, and
1840
1700
  `freshness` the `Freshness` line at the body's end, after the
1841
1701
  children. A folded card shows `value` when it has no `summary`. All
1842
- optional: a card without them is drawn as before, and its folding on a
1843
- phone is unchanged.
1702
+ optional.
1844
1703
 
1845
- Measured with axe and the glyph check in both themes and every palette
1846
- (fixture `app/OverviewPage`); `e2e/overview-page.spec.ts` clicks the
1847
- tiles, Escape and the accordion, and `e2e/overview-links.spec.ts` checks
1848
- the links.
1849
1704
  ## A record's header and empty values
1850
1705
 
1851
- The record page standard (4.81): the same header on every record, the
1852
- data on each its own.
1706
+ The record page standard: the same header on every record, the data on
1707
+ each its own.
1853
1708
 
1854
1709
  ```tsx
1855
1710
  <EntityView
1856
1711
  title={name}
1857
1712
  badges={<><StatusSelect … /><Badge variant="outline">Wholesale</Badge></>}
1858
1713
  subtitle={summary}
1859
- actions={<><Button variant="outline"><PlusIcon />New order</Button><DeleteSupplier … /></>}
1714
+ actions={<><Button variant="outline"><PlusIcon />New Order</Button><DeleteSupplier … /></>}
1860
1715
  emptyFields="fold"
1861
1716
  … />
1862
1717
  // Delete: <DialogTrigger render={<IconAction icon={Trash2Icon} label="Delete" tone="destructive" />} />
@@ -1867,33 +1722,30 @@ data on each its own.
1867
1722
  too long for both pushes them to the next line, starting under it.
1868
1723
  `subtitle` is the line below, in muted body type.
1869
1724
  - **Badges edited in place** (an inline `EditableValue` around a
1870
- `Badge`) keep their pencil's room at rest (4.120), as the strip's values
1725
+ `Badge`) keep their pencil's room at rest, as the strip's values
1871
1726
  do, so hovering one moves nothing after it and never wraps the line.
1872
- - **A hint under a header button** (`ActionHint`, 4.120): `<ActionHint
1727
+ - **A hint under a header button** (`ActionHint`): `<ActionHint
1873
1728
  hint="12 searches left"><Button>Search</Button></ActionHint>` draws a
1874
1729
  short caption line under the button, describing it; the header's
1875
1730
  buttons line up by their tops, so it stays level with the rest.
1876
- - **Actions**: the record's own commands in words (New visit, Mark
1877
- done), then the universal ones as `IconAction`s: Print Notes
1731
+ - **Actions**: the record's own commands in words (New Visit, Mark
1732
+ Done), then the universal ones as `IconAction`s: Print Notes
1878
1733
  (`printer`, EntityView's own) and Delete (`trash-2`, the destructive
1879
1734
  tone). Each is a square outline button at the header's 36px with its
1880
1735
  words as both its tooltip and its accessible name. An `IconAction`
1881
1736
  that goes somewhere (Open Site, Print to a page) takes the link as
1882
- `render` (4.123, `render={<Link to="/print" />}` or `render={<a href=…
1737
+ `render` (`render={<Link to="/print" />}` or `render={<a href=…
1883
1738
  target="_blank" />}`) and is drawn as that link. `accessibleName` says
1884
1739
  more than the tooltip where several are on one page: `DeleteAction`'s
1885
- icon is named "Delete <name>" (4.123), its tooltip still "Delete". Icon alone is for
1886
- the universal actions only (Delete, Print Notes, Copy link, Pin, Open
1887
- site, Restore, Open Full Page, Close, More); everything else keeps its
1740
+ icon is named "Delete <name>", its tooltip still "Delete". Icon alone is for
1741
+ the universal actions only (Delete, Print Notes, Copy Link, Pin, Open
1742
+ Site, Restore, Open Full Page, Close, More); everything else keeps its
1888
1743
  word. `printLook="words"` keeps Print Notes as a button with its words.
1889
- Print Notes prints a hidden copy of the notes: a desktop browser takes it
1890
- away when its dialog closes, a phone's (print() returns at once) when the
1891
- person next touches the page (4.124.1).
1892
1744
  - **An empty value** reads as a dash (`emptyText`, default `'—'`), in the
1893
1745
  muted text tone, read by a screen reader as "Not set": the same on
1894
1746
  every field, the presets' included. A field's own `emptyLabel` still
1895
1747
  wins where words say more than a dash ("No budget yet").
1896
- - **The same dash off the record: `EmptyText`** (4.96). An app's own
1748
+ - **The same dash off the record: `EmptyText`.** An app's own
1897
1749
  strip, summary line or cell with nothing in it draws
1898
1750
  `isEmptyValue(value) ? <EmptyText /> : value`, never a dash and an
1899
1751
  `sr-only` of its own. `label` is what a screen reader says for the
@@ -1916,9 +1768,10 @@ data on each its own.
1916
1768
 
1917
1769
  ## A record's tabs, mark and facts
1918
1770
 
1919
- The record standard (4.98): no right rail. A record is one column, its
1920
- long content grouped under tabs where it has three or more groups, and
1921
- its short facts the last tab, Details. A mark goes left of the title.
1771
+ A record is one column, its long content grouped under tabs where it has
1772
+ three or more groups, and its short facts the last tab, Details (or,
1773
+ with `factsRail`, a column beside the record's body). A mark goes left
1774
+ of the title.
1922
1775
 
1923
1776
  ```tsx
1924
1777
  <EntityView
@@ -1935,105 +1788,57 @@ its short facts the last tab, Details. A mark goes left of the title.
1935
1788
 
1936
1789
  - **Tabs** (`tab` on a section): a line tab list under the strip and any
1937
1790
  sections with no tab, one tab per name in the order the sections first
1938
- give it. The look is the record standard's 3B (4.101): 44px tabs in
1939
- 16px semibold (14px under 48rem), the others muted. The selected one is
1940
- plainly marked (4.111): its name bold in the theme colour
1941
- (`--primary-text`, 4.105), a 3px primary line under it and a primary
1942
- tint behind it (`bg-primary/12`, as a picked choice); every tab is as
1943
- wide as its bold name, so choosing one moves none. A page's own line
1944
- tabs (`TabsList variant="line"`) are marked the same way, semibold
1945
- over medium. The list's own
1946
- bottom border runs the column's width. A tab's count (`tabCounts`, by
1947
- name: the records it holds) sits beside its name in a small muted
1948
- pill; a tab with none shows no count. A list wider than the column
1949
- scrolls sideways on its own, never the page.
1950
- - **The tab bar sticks** (4.101) to the top of whatever scrolls (the
1951
- page, or a record dialog's body) while the record scrolls under it,
1952
- and once stuck shows the record's name above the tabs, so you always
1953
- see which record and which other tabs there are. A page with a bar of
1954
- its own pinned to the top passes `tabsStickyTop` (any CSS length). Arrow keys move
1955
- between tabs and select (Home, End), and Tab goes on into the panel.
1956
- The address holds the selected tab (`?tab=used-in`,
1791
+ give it, the open one marked in `--primary-text` ("The theme colour as
1792
+ text" above), as a page's own line tabs (`TabsList variant="line"`)
1793
+ are. A tab's count is `tabCounts`. Short tab names, one or two words;
1794
+ no icons in them.
1795
+ - **The tab bar sticks** to the top of whatever scrolls; a page with a
1796
+ bar of its own pinned to the top passes `tabsStickyTop` (any CSS
1797
+ length). The address holds the selected tab (`?tab=used-in`,
1957
1798
  `entityViewTabSlug`), replaced rather than pushed, so Back leaves the
1958
1799
  record, not the tab. Every tab's sections stay mounted, so a value open
1959
- in place survives a switch. Short tab names, one or two words; no
1960
- counts or icons in them yet.
1800
+ in place survives a switch.
1961
1801
  - **The facts** (`placement: 'rail'` with no `tab`): the last tab,
1962
- Details (`detailsTab` names it otherwise), their cards no wider than
1963
- 42rem, labels beside values. A record with no other tab keeps them in
1964
- the column, in their place.
1802
+ Details (`detailsTab` names it otherwise). A record with no other tab
1803
+ keeps them in the column, in their place. With `factsRail`, sections of
1804
+ `facts` go in a column beside the record's body where the view has
1805
+ room, and leave Details.
1965
1806
  - **A box beside a tab** (`placement: 'rail'` with a `tab`): a few short
1966
1807
  facts that explain that tab's content (a dose beside the notes), in a
1967
1808
  18rem column beside its sections once the tab is 42rem wide, under
1968
1809
  them below that. Short facts only, never free text: run-on text in a
1969
1810
  narrow box is what the standard took away.
1970
- - **Several items in one fact** (4.111): linked records, a few tasks,
1971
- each item marked so a long title that wraps doesn't run into the next.
1972
- A `list` fact (`{ label: 'Related', kind: 'list', items: [{ name, to,
1973
- icon }] }`) draws them; an app's own box of several things uses the
1974
- same `FactList` and `FactListItem`. Each item leads with its kind's
1975
- icon (the record standard's 4I) when the app gives one, a neutral
1976
- bullet otherwise, in the muted colour; a wrapped line starts after the
1977
- mark (a hanging indent), and items have a little room between them.
1978
- Never a bare stack of links.
1979
- - **The record's status** (4.115): a record's status is the first fact at
1980
- the top of the right rail, edited in place there; a status that changes
1981
- only through an action stays read-only, with the action as a small
1982
- button under it and a tooltip saying why. Mark it `recordStatus: true`
1983
- and EntityView draws it first, whatever its place in `facts` and its
1984
- section's among the rail's, and first in Details where the rail folds.
1985
- One per record.
1986
- - **An action under a fact** (`action`, 4.115): a small outline button
1987
- (`xs`, 44px tall on a touch screen) under the value, its words a verb
1988
- ("Close…", an ellipsis when it opens a dialog), an icon before them if
1989
- the app's actions have one. For the status above, and for any read-only
1990
- fact that one action changes. Never several: more belong in the
1991
- header's actions.
1992
- - **Why a fact can't be edited here** (`hint`, 4.115): a few words, in a
1993
- tooltip on a small info button after the value, shown on hover and on
1994
- keyboard focus, and read with the button by a screen reader. A touch
1995
- screen has no hover, so there the words are a caption line under the
1996
- value instead. Nothing that only hover shows.
1997
- - **A rating** (`kind: 'rating'`, 4.117) is drawn as the list's cells
1998
- draw it: a score out of `max` (5) as stars (`RatingScore`, the
1999
- default) or hearts (`look: 'hearts'`), a quality level as the step bar
2000
- (`look: 'bar'`, `StepBar`, with its `word`). Never "4 of 5" as text:
2001
- that's what a screen reader hears, one image named in words. The
2002
- glyphs are a fixed size, so the value never moves on hover, and it's
2003
- drawn the same in Details on a phone. An empty one reads its
2004
- `emptyLabel` ("Not rated"), not a row of empty stars. A score the
2005
- person sets is edited with `inPlace.rating` (4.127): the stars become
2006
- `RatingInput`, set by a click where they're drawn (no select to open),
2007
- and an empty one is then five empty stars to click. "Saving…" and
2008
- "Saved" are an icon beside the stars, words for a screen reader, so the
2009
- row never grows. On a touch screen each star is a 44px target and the
2010
- row puts its label above them, which a narrow value column can't hold.
2011
- - **`RatingInput`** (4.127): RatingScore's glyphs and tokens as a radio
2012
- group named by the field's label, each star a radio ("2 of 5"). The
2013
- arrow keys move and set it, a click or Space sets the star it's on,
2014
- pressing the set star again clears it. A mouse's hover previews the
2015
- score in the same ink (the filled count is the preview; leaving puts it
2016
- back); a finger gets no preview. 24px targets on a laptop, 44px on a
2017
- touch screen, fixed-size either way. Disabled, it's the score at half
2018
- opacity and ignores the pointer.
2019
- - **A yes/no** (`kind: 'switch'`, 4.120) is a switch on the value's
2020
- line, never a two-choice select: `checked`, `onCheckedChange` (return
2021
- the save's promise and the switch shows the new state, busy, until it
2022
- lands, going back if it fails), and optional `on`/`off` words after it
2023
- ("With the team", "Only me"). Its accessible name is the fact's label;
2024
- a click, Space or Enter toggles it. Both words keep their room, so
2025
- toggling or hovering moves nothing, and it works the same in Details on
2026
- a phone. `disabled` with a `hint` for one that can't change here.
2027
- Printed, it's its word (or Yes/No).
2028
- - **Icons on badges** (4.115): a `badges` fact's items may each carry an
2029
- icon (a component or a node) before the label, at the badge's icon size
2030
- in the muted tone a list's item icons have; items without one stay
2031
- words alone. The label always stays.
1811
+ - **Several items in one fact**: linked records, a few tasks. A `list`
1812
+ fact (`{ label: 'Related', kind: 'list', items: [{ name, to, icon }] }`)
1813
+ draws them; an app's own box of several things uses the same
1814
+ `FactList` and `FactListItem`. Never a bare stack of links.
1815
+ - **The record's status** is the first fact (`recordStatus: true`, one
1816
+ per record: EntityView draws it first in the facts rail and in
1817
+ Details), edited in place there; a status that changes only through an
1818
+ action stays read-only, with the action as a small button under it and
1819
+ a tooltip saying why.
1820
+ - **An action under a fact** (`action`): a small outline button under
1821
+ the value, its words a verb ("Close…", an ellipsis when it opens a
1822
+ dialog). For the status above, and for any read-only fact that one
1823
+ action changes. Never several: more belong in the header's actions.
1824
+ - **Why a fact can't be edited here** (`hint`): a few words, in a tooltip
1825
+ on a small info button after the value, and a caption line under the
1826
+ value on a touch screen. Nothing that only hover shows.
1827
+ - **A rating** (`kind: 'rating'`) is drawn as the list's cells draw it
1828
+ (cell pattern 9): stars, hearts (`look: 'hearts'`) or the step bar
1829
+ (`look: 'bar'`, with its `word`). Never "4 of 5" as text. An empty one
1830
+ reads its `emptyLabel` ("Not rated"), not a row of empty stars. A score
1831
+ the person sets is edited with `inPlace.rating` (`RatingInput`, cell
1832
+ pattern 9).
1833
+ - **A yes/no** (`kind: 'switch'`) is a switch on the value's line, never
1834
+ a two-choice select; return the save's promise from `onCheckedChange`.
1835
+ `disabled` with a `hint` for one that can't change here.
1836
+ - **Icons on badges**: a `badges` fact's items may each carry an icon
1837
+ before the label. The label always stays.
2032
1838
  - **The strip** (`KeyStats`) is as wide as its numbers (`width="content"`,
2033
- the default since 4.98), not the page's width. **Nothing in it moves on
2034
- hover or focus** (4.115): a value edited in place inline keeps its
2035
- pencil's room at rest there, as in a table cell, so a click lands on the
2036
- value under the mouse, wrapped onto two lines on a phone too.
1839
+ the default), not the page's width. **Nothing in it moves on hover or
1840
+ focus**: a value edited in place inline keeps its pencil's room at rest
1841
+ there, as in a table cell.
2037
1842
  - **A mark or avatar** (`leading`): left of the title, top-aligned,
2038
1843
  with the title, subtitle and badges beside it at every width. 40 to
2039
1844
  64px (`size-10` to `size-16`): an avatar round (`rounded-full`), a
@@ -2041,21 +1846,18 @@ its short facts the last tab, Details. A mark goes left of the title.
2041
1846
  the title names the record (`alt=""`, `aria-hidden`); initials in
2042
1847
  foreground on `bg-muted`, an icon in muted foreground on the card
2043
1848
  with its border. "Logos and brand marks" above holds for a logo here.
2044
- - **Facts beside their labels** (`railFields`, `beside` by default since
2045
- 4.81; `stacked` puts each label above its value): the label in a 6 to
2046
- 7rem column left of its value, baseline-aligned, rows a little tighter
2047
- than stacked, stacked again where the list is under 18rem (a phone
2048
- narrower than ~350px).
1849
+ - **Facts beside their labels** (`railFields`, `beside` by default;
1850
+ `stacked` puts each label above its value).
2049
1851
  - **A tiny record** (a few fields, no notes): `RecordDialogRoute
2050
1852
  look="card"`, a 420px card dialog (a sheet on a phone) with its title,
2051
- Delete, Open full page and Close on one line and the facts as plain
1853
+ Delete, Open Full Page and Close on one line and the facts as plain
2052
1854
  rows, no cards.
2053
- - **The rail layout** (`layout="rail"`) is the shape before 4.98, kept
2054
- for apps not yet moved; a new record never uses it.
1855
+ - **The rail layout** (`layout="rail"`) is kept for apps not yet moved;
1856
+ a new record never uses it.
2055
1857
 
2056
1858
  ## Picking at random
2057
1859
 
2058
- `SpinWheel` (4.42) picks one of a few candidates by chance, for "what do
1860
+ `SpinWheel` picks one of a few candidates by chance, for "what do
2059
1861
  I do next?" when every one would do: a wheel of slices, a pointer at the
2060
1862
  top and a Spin button.
2061
1863
 
@@ -2088,7 +1890,7 @@ const [picked, setPicked] = useState<SpinWheelItem | null>(null)
2088
1890
 
2089
1891
  ## Filling in what's missing
2090
1892
 
2091
- `FillInQueue` (4.42) walks a list of records that are each missing a
1893
+ `FillInQueue` walks a list of records that are each missing a
2092
1894
  value, one record at a time: a size for every project without one, a
2093
1895
  category for each unsorted purchase. It is a screen of its own for
2094
1896
  clearing a backlog of blanks, linked from the list ("12 without a
@@ -2137,7 +1939,7 @@ size"); the list stays where a record is edited one field at a time.
2137
1939
  - A refused save keeps the record and says why under the buttons, not
2138
1940
  in a toast. It owns its states: skeletons, `ErrorState`, and the
2139
1941
  empty queue, which is the good news ("Every project has a size").
2140
- - **Other kinds of value** (4.53): `FillInInput` is the row for text,
1942
+ - **Other kinds of value**: `FillInInput` is the row for text,
2141
1943
  long text, a number, money (the currency's symbol before it) or a date
2142
1944
  (`DateField`), and `FillInSelect` for a list too long for buttons (a
2143
1945
  reference to another record). Each has the label above and a
@@ -2159,25 +1961,19 @@ size"); the list stays where a record is edited one field at a time.
2159
1961
 
2160
1962
  The `inPlace` presets (cell pattern 18, "Presets") draw a value the same
2161
1963
  way everywhere it's edited in place, so a record's view reads alike
2162
- across apps. Their fixture is `app/EditInPlacePresets`, axe-checked in
2163
- both themes and every palette.
2164
-
2165
- - **Money** reads as the currency formats it, `$1,234.56`, two decimals
2166
- always; its box has the symbol before it (an `InputGroup` addon in the
2167
- muted text tone), as `FillInInput`'s money does.
2168
- - **A number with a unit** reads `12 h`, the unit after a space; its box
2169
- has the unit after it, in the same addon tone.
1964
+ across apps. That pattern's table has how each reads at rest; beyond it:
1965
+
1966
+ - **Money**'s box has the symbol before it (an `InputGroup` addon in the
1967
+ muted text tone), as `FillInInput`'s money does; **a number with a
1968
+ unit** has the unit after it, in the same addon tone.
2170
1969
  - **A date** reads `Sep 2, 2026` (`dateStyle: 'medium'`), never shifted
2171
1970
  by the time zone.
2172
- - **A select** reads as its option's label, or as the app's `render`
2173
- (a badge in its tone), the same on the trigger and in the list.
2174
- - **A link** reads as its label, else the address's host, in `--link`,
2175
- underlined, with the external-link mark: `LinkOut`, LinkCell's look.
2176
- - **Several fields edited as one** read at rest as their values joined
2177
- by " · " (`Small · Low`). Open, each part has its label over it in
2178
- `type-caption text-muted-foreground`, and a part's refusal under it in
2179
- the destructive text tone, as a form field's; the pair's own refusal is
2180
- under them all.
1971
+ - **A link** reads in `--link`, underlined, with the external-link mark:
1972
+ `LinkOut`, LinkCell's look.
1973
+ - **Several fields edited as one**: open, each part has its label over
1974
+ it in `type-caption text-muted-foreground`, and a part's refusal under
1975
+ it in the destructive text tone, as a form field's; the pair's own
1976
+ refusal is under them all.
2181
1977
  - **A list in place under group headings** heads each group in
2182
1978
  `type-label text-muted-foreground` (an `<h3>` under the section's
2183
1979
  title), with `gap-4` between groups and the list's own `gap-2` inside.
@@ -2185,7 +1981,7 @@ both themes and every palette.
2185
1981
  ## A quick add line
2186
1982
 
2187
1983
  One line that becomes a record ("pay rent tomorrow at 3pm #home"): the
2188
- package's `QuickAddInput` over `parseQuickAdd` (4.136). Dates, times and
1984
+ package's `QuickAddInput` over `parseQuickAdd`. Dates, times and
2189
1985
  repeats are typed in words; the app's own choices (a list, a place) are a
2190
1986
  symbol and a few letters, or a chip pressed.
2191
1987
 
@@ -2212,13 +2008,37 @@ day and a repeat with no day come out, is in its source's header
2212
2008
  own day (`todayIn`). A repeat is a `Recurrence`, read by
2213
2009
  `parseRecurrencePhrase` (`every!` repeats from completion).
2214
2010
 
2011
+ ## A month calendar
2012
+
2013
+ A month of days holding the app's dated things (events, visits): the
2014
+ package's `MonthCalendar`. Not a date picker, which is
2015
+ `Calendar`; not the place for to-dos, which belong in a list by day.
2016
+
2017
+ - **On a laptop the days hold titles**: two to a day, by time, each
2018
+ after a dot in its tone, and the rest folded to "+N more". **On a phone
2019
+ they hold dots**, one per item in its tone, up to four.
2020
+ - **The picked day's list is under the month**, every item with its time
2021
+ ("All day" without one), its `detail` and a link (`to`). The app's own
2022
+ actions for that day sit beside its heading (`dayActions`, an Add
2023
+ button); what picking a day does beyond that is the app's (`onSelect`).
2024
+ - **Tones** are the semantic ones plus `neutral` (design-language
2025
+ "Semantic tones"): pick one per kind of thing (an event `info`, a visit
2026
+ `success`), not per item, and say in the list's `detail` what it is.
2027
+ - **Months, Today and the keys**: the arrows beside the month's name and
2028
+ Today; in the grid one tab stop, the arrows a day or a week, Home and End
2029
+ the week's ends, Page Up and Page Down a month, past the edge into the
2030
+ next. Weeks start on Monday, `weekStart="SU"` for Sunday.
2031
+ - **Four states**: `isLoading` draws the month's frame with placeholders,
2032
+ `error` puts ErrorState (with `onRetry`) where the days were, a month
2033
+ with nothing says so over the days (`emptyText`), and success.
2034
+ - `today` comes from the app's own day (`todayIn`); every day is a plain
2035
+ `'YYYY-MM-DD'`, so no zone moves one.
2036
+
2215
2037
  ## The sidebar and the phone's bar
2216
2038
 
2217
- `AppShell`'s navigation (4.80), all set in the app's `nav` and
2218
- `bottomBar`, and (4.87) the trail and search in the bar; an app that
2219
- sets none of it looks as it did, except the current entry's bar, the
2220
- phone's back arrow and the nav entry's name in the bar, which every app
2221
- gets.
2039
+ `AppShell`'s navigation, all set in the app's `nav` and `bottomBar`, and
2040
+ the trail and search in the bar. Their props are in the type
2041
+ declarations.
2222
2042
 
2223
2043
  ```tsx
2224
2044
  const nav: NavEntry[] = [
@@ -2240,72 +2060,30 @@ const bottomBar: BottomBarItem[] = [
2240
2060
  at its start, the same mark as a selected or hovered table row, in the
2241
2061
  sidebar and on the icon rail.
2242
2062
  - **Headings among a module's pages** (a group `{ label, items }` in an
2243
- entry's `children`): small caption headings in the sidebar's muted
2244
- text, each heading's pages a list named by it. Use them for a module
2245
- with more than about six pages, a few words each; the rail's tooltip
2246
- names the headings ("Finance: Money, Spending").
2063
+ entry's `children`): use them for a module with more than about six
2064
+ pages, a few words each.
2247
2065
  - **Counts** (`count`, `countLabel`): a plain number at the entry's end
2248
- in the muted text tone, never a coloured badge; on the icon rail a dot
2249
- in `--primary` on the icon. Only on entries that ask you to act
2250
- (unread, to fill in, new); 0 shows nothing, nor does a count still
2251
- loading, and past 99 it reads "99+". `countLabel` is what the number
2252
- counts, read after the entry's name ("News 24 unread"). On a phone
2253
- (4.113) the bottom bar has no room at an item's end, so its count is
2254
- a small `--primary` badge on the item's icon, ringed in the bar's
2255
- background: a page's own count, or a section's sum of its entries'
2256
- (with their `countLabel` when they share one). The sheet's tiles carry
2257
- theirs in the corner and its list links at their end, as the sidebar
2258
- does. Each is read after its name ("News, 7 new").
2259
- - **A section at the foot** (`placement: 'bottom'`): under every other
2260
- section and `sidebarExtra`, pushed to the sidebar's foot when there's
2261
- room; for tools rather than modules.
2066
+ in the muted text tone, never a coloured badge. Only on entries that
2067
+ ask you to act (unread, to fill in, new). `countLabel` is what the
2068
+ number counts, read after the entry's name ("News 24 unread").
2069
+ - **A section at the foot** (`placement: 'bottom'`): for tools rather
2070
+ than modules.
2262
2071
  - **A phone's back arrow:** below 48rem, a page below a nav entry (a
2263
- record under Accounts) shows "‹ Accounts" in `--link` at the header's
2264
- start, linking to the entry. With a `bottomBar` it takes the menu
2265
- button's place; without one the menu button stays beside it. An
2266
- entry's own page keeps the menu button.
2267
- - **An area's sheet as tiles** (`sheet: 'tiles'`): a three-column grid,
2268
- one tile per entry, the icon in `--link` over the label, bordered,
2269
- 44px tall at least; the tile holding the page has a `--primary`
2270
- border. The entries' own pages are left to the module.
2072
+ record under Accounts) shows "‹ Accounts" at the header's start,
2073
+ linking to the entry.
2074
+ - **An area's sheet as tiles** (`sheet: 'tiles'`): a grid of tiles, one
2075
+ per entry, in place of a list.
2271
2076
  - **The sidebar as icon tiles** (`navLook="tiles"` on `AppShell`, or a
2272
- section's own `look: 'tiles'`; 4.99): fewer words, more icons. Each
2273
- group is a three-column grid of tiles, the icon (20px) over a short
2274
- label in the caption size, on the sidebar's tint at half strength; no
2275
- visible headings (a section's label names its grid for screen
2276
- readers). The tile you're in, or the one holding the page, has the
2277
- full tint and a 1px `--primary` ring; a count sits in its top corner
2278
- in the sidebar's text tone. The pages of the entry you're in list
2279
- under its group's grid as the list look's, a hairline in place of
2280
- each heading (each run still a list named by it). A tiles section
2281
- doesn't fold. The icon rail is the rail's icons, as in the list look,
2282
- and the sidebar's phone sheet shows the tiles. A `bottomBar` item for
2283
- a tiles section with no `sheet` of its own opens its sheet as tiles,
2284
- with the current entry's pages under them as smaller tiles, four to a
2285
- row, 44px at least. Keep tile labels to a word or two; a section that
2286
- should stay a list (Tools at the foot) sets `look: 'list'`.
2077
+ section's own `look: 'tiles'`): fewer words, more icons. Keep tile
2078
+ labels to a word or two; a section that should stay a list (Tools at
2079
+ the foot) sets `look: 'list'`.
2287
2080
  - **The trail in the bar** (`usePageTrail`, `EntityView`'s
2288
- `back.trail`): between the menu button and the search box, from 48rem
2289
- up, `PageTrail` at 14px: every crumb but the last a
2290
- link in the muted text tone, the page itself in the foreground, a `›`
2291
- between them, the middle folded into "…" when it doesn't fit. A page
2292
- that names none shows its nav entry's ("Finance › Accounts" for one of
2293
- Finance's pages, "Home" on the hub). On a phone the trail is hidden and
2294
- the back arrow goes to its closest crumb above the page that links.
2295
- It replaces a page's own back link; the bar sits outside `<main>`, so
2296
- the page's links are still the only ones in it.
2081
+ `back.trail`): from 48rem up; a page that names none shows its nav
2082
+ entry's ("Finance › Accounts" for one of Finance's pages, "Home" on
2083
+ the hub). It replaces a page's own back link; the bar sits outside
2084
+ `<main>`, so the page's links are still the only ones in it.
2297
2085
  - **Search in the bar** (`search={{ placeholder, findRecords, recent }}`):
2298
- a box from 48rem up, 14rem wide (16rem from 64rem), bordered in
2299
- `--input` on the page's background, the placeholder in the muted
2300
- tone and the shortcut (Ctrl K, ⌘K on a Mac) in a `kbd` at its end; a
2301
- search button on a phone. Both, and the shortcut, open a palette: a
2302
- dialog 32rem wide at 12% from the top, the field over a list of
2303
- options under caption headings in the muted tone. Before typing:
2304
- Recent (the records opened lately on this device, `useRecentRecord`),
2305
- then the nav's first pages. Typing: Pages (a module's own named
2306
- "Finance · Accounts", the closest name first), then the app's records
2307
- under their `kind`, a `detail` in the caption size at the end. The
2308
- highlighted option has `bg-muted`, its detail in the foreground; a
2309
- spinner while records are found, "Couldn't search records" (the pages
2310
- still listed) when the search fails, "Nothing found for …" when
2311
- nothing matches.
2086
+ a box from 48rem up, a search button on a phone, and the shortcut
2087
+ (Ctrl K, ⌘K on a Mac) open a palette of the nav's pages, the records
2088
+ opened lately on this device (`useRecentRecord`) and the app's records
2089
+ under their `kind`.