@slotted/react 0.1.0-beta.16 → 0.1.0-beta.18

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 (83) hide show
  1. package/dist/{app-shell-CJwXBvE5.js → app-shell-CXlO6z0w.js} +90 -73
  2. package/dist/app-shell.js +1 -1
  3. package/dist/dashboard-grid-z3nKqvN8.js +1149 -0
  4. package/dist/dashboard-grid.js +1 -1
  5. package/dist/{description-list-KjUs1muC.js → description-list-BbWLehw0.js} +18 -16
  6. package/dist/description-list.js +1 -1
  7. package/dist/{detail-panel-BNfYQJfv.js → detail-panel-DYe_D46K.js} +2 -2
  8. package/dist/detail-panel.js +1 -1
  9. package/dist/docs/alert.json +1 -1
  10. package/dist/docs/alert.md +1 -1
  11. package/dist/docs/app-shell.json +19 -2
  12. package/dist/docs/app-shell.md +3 -1
  13. package/dist/docs/dashboard-grid.json +5 -5
  14. package/dist/docs/dashboard-grid.md +4 -4
  15. package/dist/docs/description-list.json +10 -2
  16. package/dist/docs/description-list.md +2 -1
  17. package/dist/docs/guidelines/composition.md +12 -0
  18. package/dist/docs/guidelines/errors-and-conflicts.md +7 -6
  19. package/dist/docs/guidelines/index.md +3 -0
  20. package/dist/docs/guidelines/layout-alignment.md +2 -2
  21. package/dist/docs/guidelines/overviews.md +21 -1
  22. package/dist/docs/guidelines/reading-permissions.md +2 -2
  23. package/dist/docs/guidelines/reports.md +1 -1
  24. package/dist/docs/index.md +2 -2
  25. package/dist/docs/inline-message.json +5 -4
  26. package/dist/docs/inline-message.md +6 -5
  27. package/dist/docs/page.json +2 -2
  28. package/dist/docs/page.md +1 -1
  29. package/dist/docs/skills/compose-screen/SKILL.md +10 -1
  30. package/dist/docs/skills/review-screen/SKILL.md +22 -20
  31. package/dist/docs/stat-card.json +7 -4
  32. package/dist/docs/stat-card.md +4 -4
  33. package/dist/index.js +63 -63
  34. package/dist/{page-CwYmBoZQ.js → page-CzqbnTnU.js} +56 -56
  35. package/dist/{page-header-BgYXPEbd.js → page-header-TejJ-BTC.js} +1 -1
  36. package/dist/page-header.js +1 -1
  37. package/dist/page.js +2 -2
  38. package/dist/{side-navigation-DRLWTlJ4.js → side-navigation-CvIGfGjZ.js} +1 -1
  39. package/dist/side-navigation.js +1 -1
  40. package/dist/stat-card-Dv9oJAbF.js +252 -0
  41. package/dist/stat-card.js +1 -1
  42. package/dist/styles/app-shell.css +1 -1
  43. package/dist/styles/dashboard-grid.css +1 -1
  44. package/dist/styles/description-list.css +1 -1
  45. package/dist/styles/index.css +4 -4
  46. package/dist/styles/side-navigation.css +1 -1
  47. package/dist/styles/stat-card.css +3 -1
  48. package/dist/styles/top-navigation.css +1 -1
  49. package/dist/styles.css +1 -1
  50. package/dist/{top-navigation-B_oQgy56.js → top-navigation-D_Jt0jNw.js} +1 -1
  51. package/dist/top-navigation.js +1 -1
  52. package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
  53. package/dist/types/chart/chart.d.ts +2 -2
  54. package/dist/types/chart/chart.d.ts.map +1 -1
  55. package/dist/types/chart/chart.types.d.ts +10 -6
  56. package/dist/types/chart/chart.types.d.ts.map +1 -1
  57. package/dist/types/dashboard-grid/dashboard-grid-context.d.ts +14 -1
  58. package/dist/types/dashboard-grid/dashboard-grid-context.d.ts.map +1 -1
  59. package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
  60. package/dist/types/dashboard-grid/dashboard-grid.types.d.ts +6 -2
  61. package/dist/types/dashboard-grid/dashboard-grid.types.d.ts.map +1 -1
  62. package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
  63. package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
  64. package/dist/types/dashboard-grid/use-persisted-dashboard-layout.d.ts +2 -1
  65. package/dist/types/dashboard-grid/use-persisted-dashboard-layout.d.ts.map +1 -1
  66. package/dist/types/description-list/description-list-defaults.d.ts.map +1 -1
  67. package/dist/types/description-list/description-list.d.ts +1 -1
  68. package/dist/types/description-list/description-list.d.ts.map +1 -1
  69. package/dist/types/description-list/description-list.types.d.ts +7 -0
  70. package/dist/types/description-list/description-list.types.d.ts.map +1 -1
  71. package/dist/types/description-list/index.d.ts +1 -1
  72. package/dist/types/description-list/index.d.ts.map +1 -1
  73. package/dist/types/inline-message/inline-message.d.ts +2 -2
  74. package/dist/types/inline-message/inline-message.types.d.ts +2 -2
  75. package/dist/types/page/index.d.ts +1 -1
  76. package/dist/types/page/index.d.ts.map +1 -1
  77. package/dist/types/page/page.d.ts +6 -0
  78. package/dist/types/page/page.d.ts.map +1 -1
  79. package/dist/types/stat-card/stat-card-parts.d.ts +7 -3
  80. package/dist/types/stat-card/stat-card-parts.d.ts.map +1 -1
  81. package/package.json +6 -6
  82. package/dist/dashboard-grid-ByThIV_n.js +0 -1066
  83. package/dist/stat-card-CUISfM36.js +0 -247
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./dashboard-grid-ByThIV_n.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./dashboard-grid-z3nKqvN8.js";
2
2
  export { t as DASHBOARD_GRID_FALLBACK, i as DashboardGrid, e as DashboardGridDefaultsProvider, n as DashboardWidget, r as useDashboardGridDefaults, a as usePersistedDashboardLayout };
@@ -19,6 +19,7 @@ function y({ children: e, ...t }) {
19
19
  value: {
20
20
  columns: t.columns ?? n.columns,
21
21
  layout: t.layout ?? n.layout,
22
+ minColumnWidth: t.minColumnWidth ?? n.minColumnWidth,
22
23
  termWidth: t.termWidth ?? n.termWidth,
23
24
  variant: t.variant ?? n.variant
24
25
  },
@@ -37,32 +38,33 @@ function C() {
37
38
  return o(x);
38
39
  }
39
40
  var w = x.Provider;
40
- function T({ children: t, columns: n, layout: i, messages: a, render: o, style: s, termWidth: c, variant: l, ...u }) {
41
- let d = v(), p = e(m, a), h = {
42
- columns: n ?? d.columns ?? 1,
43
- layout: i ?? d.layout ?? "row",
44
- t: p,
45
- variant: l ?? d.variant ?? "plain"
46
- }, g = c ?? d.termWidth, _ = r({
47
- ...u,
41
+ function T({ children: t, columns: n, layout: i, messages: a, minColumnWidth: o, render: s, style: c, termWidth: l, variant: u, ...d }) {
42
+ let p = v(), h = e(m, a), g = {
43
+ columns: n ?? p.columns ?? 1,
44
+ layout: i ?? p.layout ?? "row",
45
+ t: h,
46
+ variant: u ?? p.variant ?? "plain"
47
+ }, _ = l ?? p.termWidth, y = r({
48
+ ...d,
48
49
  children: /* @__PURE__ */ f("dl", {
49
50
  "data-part": "list",
50
51
  "data-part-list": "",
51
52
  children: t
52
53
  }),
53
- "data-columns": String(h.columns),
54
- "data-layout": h.layout,
54
+ "data-columns": String(g.columns),
55
+ "data-layout": g.layout,
56
+ "data-min-column-width": o ?? p.minColumnWidth ?? "md",
55
57
  "data-part": "root",
56
58
  "data-ui": "description-list",
57
- "data-variant": h.variant,
58
- style: g === void 0 ? s : {
59
- ...s,
60
- "--slotted-description-list-term-width": g
59
+ "data-variant": g.variant,
60
+ style: _ === void 0 ? c : {
61
+ ...c,
62
+ "--slotted-description-list-term-width": _
61
63
  }
62
64
  });
63
65
  return /* @__PURE__ */ f(b.Provider, {
64
- value: h,
65
- children: o === void 0 ? /* @__PURE__ */ f("div", { ..._ }) : o(_)
66
+ value: g,
67
+ children: s === void 0 ? /* @__PURE__ */ f("div", { ...y }) : s(y)
66
68
  });
67
69
  }
68
70
  //#endregion
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./description-list-KjUs1muC.js";
1
+ import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./description-list-BbWLehw0.js";
2
2
  export { p as COPIED_FOR, n as DescriptionList, c as DescriptionListAction, s as DescriptionListDefaultsProvider, d as DescriptionListDescription, a as DescriptionListHint, e as DescriptionListItem, l as DescriptionListTerm, m as copyToClipboard, f as overflowsClamp, t as selectValue, o as spanWithin, r as useDescriptionList, i as useDescriptionListDefaults, u as useDescriptionListItem };
@@ -2,8 +2,8 @@ import { r as e } from "./i18n-D7xXDd8-.js";
2
2
  import { n as t } from "./badge-pgYVOnZO.js";
3
3
  import { t as n } from "./skeleton-DeEOmm1y.js";
4
4
  import { n as r } from "./container-WoYiHo50.js";
5
- import { a as i } from "./page-CwYmBoZQ.js";
6
- import { w as a } from "./page-header-BgYXPEbd.js";
5
+ import { o as i } from "./page-CzqbnTnU.js";
6
+ import { w as a } from "./page-header-TejJ-BTC.js";
7
7
  import { a as o, c as s, n as c, o as l, s as u, t as d, u as f } from "./section-CjlMOyZE.js";
8
8
  import { a as p, n as m, o as h, r as g, t as _ } from "./tabs-C-Bc7WmQ.js";
9
9
  import { keyedProps as v } from "@slotted/core/selector-key";
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./detail-panel-BNfYQJfv.js";
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./detail-panel-DYe_D46K.js";
2
2
  export { t as DetailPanel, o as DetailPanelBody, r as DetailPanelDefaultsProvider, n as DetailPanelSection, i as DetailPanelTabs, e as useDetailPanel, a as useDetailPanelDefaults };
@@ -4,7 +4,7 @@
4
4
  "binding": "react",
5
5
  "catalog": {
6
6
  "group": "Feedback",
7
- "summary": "Static message with a tone, icon and actions."
7
+ "summary": "Framed notice heading a section, a form or a page."
8
8
  },
9
9
  "axes": {
10
10
  "tone": [
@@ -1,7 +1,7 @@
1
1
  <!-- index: ./index.md -->
2
2
  # alert
3
3
 
4
- `data-ui="alert"` · Static message with a tone, icon and actions.
4
+ `data-ui="alert"` · Framed notice heading a section, a form or a page.
5
5
 
6
6
  ## Import
7
7
 
@@ -132,6 +132,8 @@
132
132
  "progress",
133
133
  "aside",
134
134
  "aside-resizer",
135
+ "line",
136
+ "grip",
135
137
  "aside-header",
136
138
  "aside-body",
137
139
  "aside-footer",
@@ -250,6 +252,18 @@
250
252
  "required": false,
251
253
  "purpose": "The pane’s inner edge, from the WAI-ARIA Window Splitter pattern: focusable, aria-controls the pane, its three values the extent as whole percentages of the shell. Placed inside AppShellAside; rendering it is the capability. Drawn on the column alone — under asideMode=\"overlay\" or a closed pane it renders nothing, and a row under the content hides it."
252
254
  },
255
+ {
256
+ "part": "line",
257
+ "element": "span inside the aside-resizer, aria-hidden",
258
+ "required": false,
259
+ "purpose": "One of the splitter family’s two hairlines on the pane’s edge, drawn from the splitter tokens: fading away from the grip at rest, running the strip under the hand, the drag and the keyboard."
260
+ },
261
+ {
262
+ "part": "grip",
263
+ "element": "span inside the aside-resizer, aria-hidden",
264
+ "required": false,
265
+ "purpose": "The dot matrix between the two lines, two columns by three rows, in the line’s step."
266
+ },
253
267
  {
254
268
  "part": "aside-header",
255
269
  "element": "div",
@@ -609,7 +623,6 @@
609
623
  "--slotted-app-shell-nav-surface",
610
624
  "--slotted-app-shell-radius",
611
625
  "--slotted-app-shell-rail-size",
612
- "--slotted-app-shell-resizer-color",
613
626
  "--slotted-app-shell-row-inset-size",
614
627
  "--slotted-app-shell-row-mark-size",
615
628
  "--slotted-app-shell-row-text-line-height",
@@ -620,7 +633,6 @@
620
633
  "--slotted-app-shell-tone-surface",
621
634
  "--slotted-border-strong",
622
635
  "--slotted-border-subtle",
623
- "--slotted-border-width-thick",
624
636
  "--slotted-border-width-thin",
625
637
  "--slotted-control-font-size-md",
626
638
  "--slotted-control-font-size-sm",
@@ -646,16 +658,21 @@
646
658
  "--slotted-font-weight-semibold",
647
659
  "--slotted-line-height-sm",
648
660
  "--slotted-radius-lg",
661
+ "--slotted-radius-sm",
649
662
  "--slotted-scrim",
650
663
  "--slotted-shadow-lg",
651
664
  "--slotted-shadow-md",
652
665
  "--slotted-shadow-xs",
653
666
  "--slotted-space-1",
667
+ "--slotted-space-12",
654
668
  "--slotted-space-2",
655
669
  "--slotted-space-3",
656
670
  "--slotted-space-4",
657
671
  "--slotted-space-5",
658
672
  "--slotted-space-6",
673
+ "--slotted-space-9",
674
+ "--slotted-splitter-line-active-color",
675
+ "--slotted-splitter-line-color",
659
676
  "--slotted-surface",
660
677
  "--slotted-surface-sunken",
661
678
  "--slotted-target-min",
@@ -104,6 +104,8 @@ export default function AppShellBasic() {
104
104
  | `progress` | div, holding one ProgressBar at placement="edge-start" | no |
105
105
  | `aside` | aside, or the element render returns | no |
106
106
  | `aside-resizer` | div with role="separator", or the element render returns | no |
107
+ | `line` | span inside the aside-resizer, aria-hidden | no |
108
+ | `grip` | span inside the aside-resizer, aria-hidden | no |
107
109
  | `aside-header` | div | no |
108
110
  | `aside-body` | div | no |
109
111
  | `aside-footer` | div | no |
@@ -193,7 +195,7 @@ export default function AppShellBasic() {
193
195
 
194
196
  ## Tokens
195
197
 
196
- `--slotted-app-shell-aside-color`, `--slotted-app-shell-aside-extent`, `--slotted-app-shell-aside-size-lg`, `--slotted-app-shell-aside-size-md`, `--slotted-app-shell-aside-size-sm`, `--slotted-app-shell-aside-surface`, `--slotted-app-shell-banner-block-size`, `--slotted-app-shell-banner-color`, `--slotted-app-shell-banner-surface`, `--slotted-app-shell-border-color`, `--slotted-app-shell-brand-overflow`, `--slotted-app-shell-brand-wrap`, `--slotted-app-shell-canvas`, `--slotted-app-shell-color`, `--slotted-app-shell-elevation`, `--slotted-app-shell-footer-color`, `--slotted-app-shell-footer-surface`, `--slotted-app-shell-frame`, `--slotted-app-shell-frame-image`, `--slotted-app-shell-gutter`, `--slotted-app-shell-main-color`, `--slotted-app-shell-main-surface`, `--slotted-app-shell-nav-color`, `--slotted-app-shell-nav-overlay-size`, `--slotted-app-shell-nav-size-lg`, `--slotted-app-shell-nav-size-md`, `--slotted-app-shell-nav-size-sm`, `--slotted-app-shell-nav-surface`, `--slotted-app-shell-radius`, `--slotted-app-shell-rail-size`, `--slotted-app-shell-resizer-color`, `--slotted-app-shell-row-inset-size`, `--slotted-app-shell-row-mark-size`, `--slotted-app-shell-row-text-line-height`, `--slotted-app-shell-row-text-size`, `--slotted-app-shell-scrim`, `--slotted-app-shell-scrollbar-thumb-color`, `--slotted-app-shell-scrollbar-track-color`, `--slotted-app-shell-tone-surface`, `--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-icon-size-md`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-duration-medium`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-sans`, `--slotted-font-size-sm`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-line-height-sm`, `--slotted-radius-lg`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-shadow-md`, `--slotted-shadow-xs`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-surface`, `--slotted-surface-sunken`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-overlay`, `--slotted-z-index-popover`
198
+ `--slotted-app-shell-aside-color`, `--slotted-app-shell-aside-extent`, `--slotted-app-shell-aside-size-lg`, `--slotted-app-shell-aside-size-md`, `--slotted-app-shell-aside-size-sm`, `--slotted-app-shell-aside-surface`, `--slotted-app-shell-banner-block-size`, `--slotted-app-shell-banner-color`, `--slotted-app-shell-banner-surface`, `--slotted-app-shell-border-color`, `--slotted-app-shell-brand-overflow`, `--slotted-app-shell-brand-wrap`, `--slotted-app-shell-canvas`, `--slotted-app-shell-color`, `--slotted-app-shell-elevation`, `--slotted-app-shell-footer-color`, `--slotted-app-shell-footer-surface`, `--slotted-app-shell-frame`, `--slotted-app-shell-frame-image`, `--slotted-app-shell-gutter`, `--slotted-app-shell-main-color`, `--slotted-app-shell-main-surface`, `--slotted-app-shell-nav-color`, `--slotted-app-shell-nav-overlay-size`, `--slotted-app-shell-nav-size-lg`, `--slotted-app-shell-nav-size-md`, `--slotted-app-shell-nav-size-sm`, `--slotted-app-shell-nav-surface`, `--slotted-app-shell-radius`, `--slotted-app-shell-rail-size`, `--slotted-app-shell-row-inset-size`, `--slotted-app-shell-row-mark-size`, `--slotted-app-shell-row-text-line-height`, `--slotted-app-shell-row-text-size`, `--slotted-app-shell-scrim`, `--slotted-app-shell-scrollbar-thumb-color`, `--slotted-app-shell-scrollbar-track-color`, `--slotted-app-shell-tone-surface`, `--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-icon-size-md`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-duration-medium`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-sans`, `--slotted-font-size-sm`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-line-height-sm`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-shadow-md`, `--slotted-shadow-xs`, `--slotted-space-1`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-9`, `--slotted-splitter-line-active-color`, `--slotted-splitter-line-color`, `--slotted-surface`, `--slotted-surface-sunken`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-overlay`, `--slotted-z-index-popover`
197
199
 
198
200
  ## Examples
199
201
 
@@ -241,7 +241,7 @@
241
241
  "type": "DashboardLayout",
242
242
  "defaultValue": "[]",
243
243
  "appliesTo": "DashboardGrid",
244
- "description": "The uncontrolled start, read once. A widget it does not name takes the first cell it fits, in the order of the children"
244
+ "description": "The uncontrolled start, read once, and what Reset asks for, controlled or not. A widget it does not name takes the first cell it fits, in the order of the children"
245
245
  },
246
246
  {
247
247
  "name": "editing",
@@ -318,7 +318,7 @@
318
318
  "type": "string",
319
319
  "defaultValue": "—",
320
320
  "appliesTo": "DashboardWidget",
321
- "description": "The widget’s key in the layout. Required"
321
+ "description": "The widget’s key in the layout. Required. Read from the grid’s child, inside a fragment too; a widget a component of the application renders declares it once mounted, so it is placed after the first paint"
322
322
  },
323
323
  {
324
324
  "name": "title",
@@ -353,7 +353,7 @@
353
353
  "type": "'auto'",
354
354
  "defaultValue": "—",
355
355
  "appliesTo": "DashboardWidget",
356
- "description": "Draws the widget as many rows as its content measures, within minRows and maxRows, and moves the widgets below; the stored rows, which a resize sets, stay the minimum"
356
+ "description": "Draws the widget as tall as its content, to a twelfth of a row’s step, and the widgets below rise or make room; at least one sub-row, or minRows when stated, at most maxRows. Moves and resizes read the content’s rows, rounded up"
357
357
  },
358
358
  {
359
359
  "name": "minColumns",
@@ -497,10 +497,10 @@
497
497
  },
498
498
  {
499
499
  "name": "usePersistedDashboardLayout",
500
- "type": "({ key, storage?, defaultLayout? }) => { layout, onLayoutChange, clear }",
500
+ "type": "({ key, storage?, defaultLayout? }) => { layout, defaultLayout, onLayoutChange, clear }",
501
501
  "defaultValue": "localStorage",
502
502
  "appliesTo": "a component",
503
- "description": "Reads the stored layout once and writes every change; a store that throws reads as empty"
503
+ "description": "Reads the stored layout once and writes every change; a store that throws reads as empty. Spread on the grid, its defaultLayout is what Reset asks for"
504
504
  }
505
505
  ],
506
506
  "composition": [],
@@ -70,7 +70,7 @@ const [editing, setEditing] = useState(false);
70
70
  | Name | Type | Default | Applies to | Description |
71
71
  | --- | --- | --- | --- | --- |
72
72
  | `layout` | `DashboardLayout` | — | DashboardGrid | Where each widget stands and how big it is: [{ key, x, y, w, h, hidden? }] in cells of the expanded class. Present means controlled |
73
- | `defaultLayout` | `DashboardLayout` | [] | DashboardGrid | The uncontrolled start, read once. A widget it does not name takes the first cell it fits, in the order of the children |
73
+ | `defaultLayout` | `DashboardLayout` | [] | DashboardGrid | The uncontrolled start, read once, and what Reset asks for, controlled or not. A widget it does not name takes the first cell it fits, in the order of the children |
74
74
  | `editing` | `boolean` | false | DashboardGrid | The edit mode. Present means controlled |
75
75
  | `defaultEditing` | `boolean` | false | DashboardGrid | The uncontrolled mode, read once |
76
76
  | `columns` | `number \| { expanded, medium, compact }` | 12 | DashboardGrid, DashboardGridDefaultsProvider | Columns from 1024 pixels of the grid’s width; below it the widgets flow in halves and wholes of half as many, and below 600 in one column |
@@ -81,12 +81,12 @@ const [editing, setEditing] = useState(false);
81
81
  | `ref` | `Ref<DashboardGridHandle>` | — | DashboardGrid | element, focusWidget(key), commitEditing(), cancelEditing() |
82
82
  | `render` | `(props: DashboardGridRootProps) => ReactElement` | a div | DashboardGrid | Substitutes the root element |
83
83
  | `native props` | `ComponentPropsWithRef<"div">` | — | DashboardGrid | id, className, style, data-* and handlers reach the root; aria-label and aria-labelledby name the list |
84
- | `value` | `string` | — | DashboardWidget | The widget’s key in the layout. Required |
84
+ | `value` | `string` | — | DashboardWidget | The widget’s key in the layout. Required. Read from the grid’s child, inside a fragment too; a widget a component of the application renders declares it once mounted, so it is placed after the first paint |
85
85
  | `title` | `string` | — | DashboardWidget | The heading, the article’s name, the handle’s name and the entry in Add widget. Required |
86
86
  | `description` | `ReactNode` | — | DashboardWidget | The line under the title |
87
87
  | `defaultColumns` | `number` | 4 | DashboardWidget | Expanded columns of a widget the layout does not name |
88
88
  | `defaultRows` | `number` | 2 | DashboardWidget | Rows of a widget the layout does not name |
89
- | `rows` | `'auto'` | — | DashboardWidget | Draws the widget as many rows as its content measures, within minRows and maxRows, and moves the widgets below; the stored rows, which a resize sets, stay the minimum |
89
+ | `rows` | `'auto'` | — | DashboardWidget | Draws the widget as tall as its content, to a twelfth of a row’s step, and the widgets below rise or make room; at least one sub-row, or minRows when stated, at most maxRows. Moves and resizes read the content’s rows, rounded up |
90
90
  | `minColumns` | `number` | 2 | DashboardWidget | The fewest expanded columns a resize leaves |
91
91
  | `maxColumns` | `number` | columns | DashboardWidget | The most expanded columns a resize gives |
92
92
  | `minRows` | `number` | 2 | DashboardWidget | The fewest rows a resize leaves |
@@ -107,7 +107,7 @@ const [editing, setEditing] = useState(false);
107
107
  | `fill / size` | `CardFill / CardSize` | outline / md | DashboardWidget | The card’s own axes |
108
108
  | `render` | `(props: DashboardWidgetRootProps) => ReactElement` | an li | DashboardWidget | Substitutes the li; keep props.ref, the grid measures against it |
109
109
  | `DashboardGridDefaultsProvider` | `{ columns, editBar, headingLevel }` | — | a subtree | The decisions an application takes once; an instance that states any of them wins. The words come from the language in force (SlottedProvider) |
110
- | `usePersistedDashboardLayout` | `({ key, storage?, defaultLayout? }) => { layout, onLayoutChange, clear }` | localStorage | a component | Reads the stored layout once and writes every change; a store that throws reads as empty |
110
+ | `usePersistedDashboardLayout` | `({ key, storage?, defaultLayout? }) => { layout, defaultLayout, onLayoutChange, clear }` | localStorage | a component | Reads the stored layout once and writes every change; a store that throws reads as empty. Spread on the grid, its defaultLayout is what Reset asks for |
111
111
 
112
112
  ## Events
113
113
 
@@ -30,6 +30,7 @@
30
30
  "columns": "1",
31
31
  "variant": "plain",
32
32
  "termWidth": "14rem",
33
+ "minColumnWidth": "md",
33
34
  "span": 1,
34
35
  "clamp": 0,
35
36
  "copy": false,
@@ -161,6 +162,13 @@
161
162
  "appliesTo": "DescriptionList",
162
163
  "description": "Nothing between pairs, a rule between them, or a framed table"
163
164
  },
165
+ {
166
+ "name": "minColumnWidth",
167
+ "type": "'sm' | 'md'",
168
+ "defaultValue": "md",
169
+ "appliesTo": "DescriptionList",
170
+ "description": "The narrowest column before the count folds: md holds two columns to 34rem of the list and three to 48rem; sm holds two to 25rem and three to 37.5rem"
171
+ },
164
172
  {
165
173
  "name": "termWidth",
166
174
  "type": "string",
@@ -256,10 +264,10 @@
256
264
  },
257
265
  {
258
266
  "name": "DescriptionListDefaultsProvider",
259
- "type": "layout | columns | variant | termWidth",
267
+ "type": "layout | columns | variant | termWidth | minColumnWidth",
260
268
  "defaultValue": "—",
261
269
  "appliesTo": "Application",
262
- "description": "Sets those four once for everything below it; a prop on the list still wins"
270
+ "description": "Sets those five once for everything below it; a prop on the list still wins"
263
271
  },
264
272
  {
265
273
  "name": "children",
@@ -53,6 +53,7 @@ Excerpt — not a complete module
53
53
  | `layout` | `'row' \| 'stack'` | row | DescriptionList | The term beside its value, or above it |
54
54
  | `columns` | `1 \| 2 \| 3` | 1 | DescriptionList | How many pairs stand side by side |
55
55
  | `variant` | `'plain' \| 'ruled' \| 'framed'` | plain | DescriptionList | Nothing between pairs, a rule between them, or a framed table |
56
+ | `minColumnWidth` | `'sm' \| 'md'` | md | DescriptionList | The narrowest column before the count folds: md holds two columns to 34rem of the list and three to 48rem; sm holds two to 25rem and three to 37.5rem |
56
57
  | `termWidth` | `string` | 14rem | DescriptionList | The maximum width of the term column; the terms share one track sized to the widest of them, up to this |
57
58
  | `messages` | `PartialMessages<DescriptionListMessages>` | — | DescriptionList | Words laid over the language in force, key by key: copy, copied, copyBlocked, reveal, collapse, placeholder |
58
59
  | `span` | `1 \| 2 \| 3` | 1 | DescriptionListItem | How many columns the pair takes, clamped to the count the list has |
@@ -66,7 +67,7 @@ Excerpt — not a complete module
66
67
  | `render` | `(props) => ReactNode` | — | every part but the list | Substitutes the rendered element. Every data attribute is handed to it, so another component keeps them. The dl is fixed: it has no option of its own, and substituting it would take away the element every semantic here rests on. |
67
68
  | `ref` | `Ref<HTMLElement>` | — | every part | Reaches the element, and focus() with it |
68
69
  | `useDescriptionList()` | `() => DescriptionListContextValue` | — | inside a DescriptionList | The arrangement and the translator t, for a part of your own |
69
- | `DescriptionListDefaultsProvider` | `layout \| columns \| variant \| termWidth` | — | Application | Sets those four once for everything below it; a prop on the list still wins |
70
+ | `DescriptionListDefaultsProvider` | `layout \| columns \| variant \| termWidth \| minColumnWidth` | — | Application | Sets those five once for everything below it; a prop on the list still wins |
70
71
  | `children` | `ReactNode` | — | DescriptionListDescription | A tag, a status indicator, a link or a skeleton — the value slot takes what the row needs |
71
72
 
72
73
  ## Events
@@ -25,6 +25,8 @@ triggers:
25
25
  ]
26
26
  families:
27
27
  [
28
+ alert,
29
+ inline-message,
28
30
  page-header,
29
31
  app-shell,
30
32
  top-navigation,
@@ -141,3 +143,13 @@ Why: A list at `bleed`, a record at `wide` and a form at `content` moved the col
141
143
  Do: Set `full` on every destination and `wide` on every form, on the page and nowhere else; a list keeps `fill` (LP-12); a form arranges its fields in a `grid` within that width.
142
144
  Don't: Give each page type a measure of its own, or cap a form's body with a width of the screen's own.
143
145
  Check: Move between two destinations of the navigation: the header's and the body's start and end edges stay on the same lines.
146
+
147
+ ### CP-11 · A message about a region is an alert
148
+
149
+ Level: SHOULD
150
+ Applies to: every message a screen shows that is not a `toast` — a notice, a warning, a refusal, a pending state, an absence explained
151
+ Rule: A message about one control or one value is an `inline-message` under or beside that control; a message about anything larger — a section, a form, a panel, a list, a record, the page — is an `alert` at the head of that region.
152
+ Why: `inline-message` is a line of muted text with no frame, sized to stay quieter than the control above it; standing alone at the head of a region it reads as a stray caption, and the region's notice loses the title, the frame and the actions that `alert` carries.
153
+ Do: Name the one control or value each `inline-message` is attached to; where there is none, use `alert` with the tone of the message, a title when the message has more than one sentence, and its actions part for what the reader does next. A control inside `field` takes the field's error and description parts, which render an `inline-message` already.
154
+ Don't: Put an `inline-message` at the top of a section, a card, a drawer, a dialog or a page; give it a larger size to make it read as a section notice; or stack several of them as a list of a region's problems.
155
+ Check: For each `inline-message` on the screen, point at the one control or value it describes, in the same row or the row above; a message with no such control, or one placed above a region's content, fails.
@@ -19,16 +19,17 @@ triggers:
19
19
  state,
20
20
  transition,
21
21
  ]
22
- families: [inline-message, toast, result-state, button, dialog]
22
+ families: [alert, inline-message, toast, result-state, button, dialog]
23
23
  ---
24
24
 
25
25
  # Errors and conflicts
26
26
 
27
- What a screen does with an answer that is not the one it asked for. The
28
- library gives `inline-message` six tones, `result-state` four statuses and
29
- `toast` a place for what is passing; it does not say which of them a refusal
30
- belongs in, or that two refusals a reader must answer differently should not
31
- look the same.
27
+ What a screen does with an answer that is not the one it asked for. A field's
28
+ refusal is an `inline-message` under the field; a command's refusal is an
29
+ `alert` at the head of the region the command acted on (CP-11); `result-state`
30
+ replaces a region that cannot be read, and `toast` holds what is passing. The
31
+ library does not say that two refusals a reader must answer differently should
32
+ not look the same.
32
33
 
33
34
  ### ER-01 · A refusal is classed before it is shown
34
35
 
@@ -31,6 +31,7 @@ Every active rule, one line each. Load this first; load a topic file when the ta
31
31
  | CP-08 | MUST | Switching the mode changes the words and the values in the region, never the size, the line count or the position of any box in it or around it; text whose length differs between modes stands on one line, cut with an ellipsis and read whole from its title. | `composition.md` |
32
32
  | CP-09 | MUST | The control's own state — the selected tab, the pressed segment — updates in the interaction's frame; the region renders from a deferred value (in React, useDeferredValue or startTransition) and states aria-busy while the shown value lags the selected one. | `composition.md` |
33
33
  | CP-10 | SHOULD | Every destination of the navigation — a list, a record, a dashboard, an overview — is `full`, so moving between destinations never moves the column's edges; a create or edit form is `wide` and lays its fields out in a grid of the form's own; a page of preferences read as prose is `measure`. | `composition.md` |
34
+ | CP-11 | SHOULD | A message about one control or one value is an `inline-message` under or beside that control; a message about anything larger — a section, a form, a panel, a list, a record, the page — is an `alert` at the head of that region. | `composition.md` |
34
35
  | CV-01 | MUST | From 600 pixels the conversation fills its region and scrolls on its own with the composer under it, and the record's context scrolls on its own beside it or behind a tab of the header; below 600 pixels the page scrolls, the composer is stuck to the bottom of the screen, and the record opens on its last message. | `conversations.md` |
35
36
  | CV-02 | SHOULD | A running clock says the business time left and the hour it falls due in the organization's zone, a passed one by how much and when it was due, a paused one that it is stopped and why; a queue's row says the span alone, and no clock is ever said in raw minutes. | `conversations.md` |
36
37
  | CV-03 | SHOULD | Each queue is a view of the list's `filter-bar`, a tree of the bar's own fields, labelled with the count of the rows it opens on; choosing it writes its pills, and editing a pill leaves a view the bar marks as changed. | `conversations.md` |
@@ -86,6 +87,8 @@ Every active rule, one line each. Load this first; load a topic file when the ta
86
87
  | OV-04 | SHOULD | The thresholds are stated once in words beside the figures, and a figure past one says so in its own comparison line, on the line the placeholder reserves. | `overviews.md` |
87
88
  | OV-05 | SHOULD | A chart takes the `card` `variant` when it is one of two or more peer tiles in one grid with no section heading of its own, and stays `plain` when it is the body of a titled section or the only content of a tab. | `overviews.md` |
88
89
  | OV-06 | SHOULD | The cards of one row carry a label of at most three words, the figure, and the same optional parts on every card — a comparison of one line on each, or on none. | `overviews.md` |
90
+ | OV-07 | SHOULD | The overview is one `dashboard-grid` whose blocks are each one of its widgets, and each headline figure is a widget of its own whose title is the figure's label. | `overviews.md` |
91
+ | OV-08 | SHOULD | A `stat-card` inside a framed region takes the `plain` `fill` and a `chart` takes the `plain` `variant`; a frame inside a frame is a finding. | `overviews.md` |
89
92
  | OE-01 | MUST | An element of the application's own reads only tokens of the groups `../tokens.md` lists for the application. | `own-elements.md` |
90
93
  | OE-02 | MUST | Where two states hold at once, the element paints the ground, the edge and the text colour of the stronger, in the order `disabled`, `loading`, `readonly`, `invalid`, `checked`, `selected`, `pressed`, `current`, `complete`, `active`, `hover`; the focus ring of OE-03 is drawn over every state. | `own-elements.md` |
91
94
  | OE-03 | MUST | In its `focus-visible` state the element draws an outline of `--slotted-focus-ring-width` in `--slotted-focus-ring-color`, offset by `--slotted-focus-ring-offset`. | `own-elements.md` |
@@ -90,8 +90,8 @@ Level: MUST
90
90
  Applies to: an element a screen makes `position: sticky` inside a page — a preview beside a form, a summary beside a list, a column's own header
91
91
  Rule: The element's offset starts at the page's published `--slotted-page-sticky-top`, the measured height of the chrome that stays (the stuck page-header's title area, a sticky section's header), and an element that may be taller than what stays visible caps its height by the same property and scrolls inside.
92
92
  Why: An offset from the scroller's edge alone — `inset-block-start: var(--slotted-space-4)` — sticks the element behind the stuck header, which is painted above it: its top is hidden for as long as it is stuck.
93
- Do: Write `inset-block-start: calc(var(--slotted-page-sticky-top, 0px) + <gap>)` and, when the element can outgrow the view, `max-block-size: calc(100dvh - var(--slotted-page-sticky-top, 0px) - <room for the app's own bars>)` with `overflow: auto`.
94
- Don't: Measure the header in the screen's own code, or hard-code its height: the header collapses, wraps and changes with the density, and the page already measures it.
93
+ Do: Write `inset-block-start: calc(var(--slotted-page-sticky-top, 0px) + <gap>)` and, when the element can outgrow the view, `max-block-size: calc(var(--slotted-page-scrollport-block-size, 100dvh) - var(--slotted-page-sticky-top, 0px) - var(--slotted-page-sticky-bottom, 0px) - 2 * <gap>)` with `overflow: auto`: the page publishes the scroller's own height, which an inset application frame makes shorter than the viewport.
94
+ Don't: Measure the header or the scroller in the screen's own code, hard-code the header's height, or cap the element by the viewport's height, which overshoots a scroller the application frame insets: the header collapses, wraps and changes with the density, and the page already measures both.
95
95
  Check: Scroll the page until the header sticks, at two scroll positions: the sticky element's top stands at or below the bottom of the stuck header's title area each time.
96
96
 
97
97
  ### LA-07 · A page footer's action-bar holds one row on a phone
@@ -3,7 +3,7 @@ topic: overviews
3
3
  prefix: OV
4
4
  triggers:
5
5
  [overview, dashboard, flagship, figure, stat card, exception, summary, chart, door, phone, narrow]
6
- families: [stat-card, chart, list, list-item, table, section, grid]
6
+ families: [stat-card, chart, list, list-item, table, section, grid, dashboard-grid, card]
7
7
  ---
8
8
 
9
9
  # Overviews
@@ -74,3 +74,23 @@ Why: One card with a long label and a wrapping comparison beside three cards wit
74
74
  Do: Give every card a short label, its figure and one comparison line; detail that only one card has goes into its comparison or a tooltip.
75
75
  Don't: Lengthen one card's label to carry its detail, or give one card of the row a part the others lack.
76
76
  Check: In every row of `stat-card`s, every label has three words or fewer, and either every card has a comparison or none does.
77
+
78
+ ### OV-07 · An arranged overview is a dashboard-grid
79
+
80
+ Level: SHOULD
81
+ Applies to: an overview whose blocks the reader moves, resizes or hides
82
+ Rule: The overview is one `dashboard-grid` whose blocks are each one of its widgets, and each headline figure is a widget of its own whose title is the figure's label.
83
+ Why: A grid of the application's own with its own menu for hiding blocks repeats the editing, the keyboard moves, the persistence and the Add widget menu the family already draws.
84
+ Do: Give each widget a `value` and a `title`, and let the `auto` `rows` size a figure's widget to its content; persist the layout with the family's own persistence.
85
+ Don't: Build a `grid` of sections with a menu of the application's own that hides or orders them, or put several figures inside one widget.
86
+ Check: Find every control of the overview that hides, moves or resizes a block: each is the `dashboard-grid`'s own.
87
+
88
+ ### OV-08 · Inside a frame, a figure is plain
89
+
90
+ Level: SHOULD
91
+ Applies to: `stat-card` and `chart` inside a framed region — a widget of the `dashboard-grid`, a `section` with the `surface` `ground`, a `card`
92
+ Rule: A `stat-card` inside a framed region takes the `plain` `fill` and a `chart` takes the `plain` `variant`; a frame inside a frame is a finding.
93
+ Why: The region's frame already separates the figure from its neighbours, and a second frame inside it draws a card within a card whose inner edge sits one inset from the outer.
94
+ Do: Let the region's title name the figure, as a widget's title does, and keep the figure's own header for a status or an action.
95
+ Don't: Leave a `stat-card` at its default `outline` fill, or a `chart` at the `card` `variant`, inside a widget, a surface section or a card.
96
+ Check: For each `stat-card` and `chart`, name the frame around it: inside a widget, a surface section or a card, its fill or variant is `plain`.
@@ -19,7 +19,7 @@ triggers:
19
19
  forbidden,
20
20
  scope,
21
21
  ]
22
- families: [data-grid, table, stat-card, inline-message, tabs, filter-bar]
22
+ families: [data-grid, table, stat-card, alert, tabs, filter-bar]
23
23
  ---
24
24
 
25
25
  # Reading under permissions
@@ -46,7 +46,7 @@ Level: SHOULD
46
46
  Applies to: a screen that left a value out under PM-01, where its absence changes what the remaining numbers mean
47
47
  Rule: One statement names the permission the value needs and the roles that hold it; two missing permissions are one statement, not two.
48
48
  Why: A figure row with a hole in it reads as a screen that failed rather than as a screen that was told not to say; and a reader who holds neither permission does not need to be told twice in two tones.
49
- Do: Put the statement where the absence changes the reading — under the figures on a record, above the rows on a list — and use the permission's own name, which is what a reader asks an administrator for.
49
+ Do: Put the statement in an `alert` where the absence changes the reading — under the figures on a record, above the rows on a list — and use the permission's own name, which is what a reader asks an administrator for.
50
50
  Don't: Repeat the statement per tab, per column or per card, or leave the absence unexplained where the rest of the numbers depend on it.
51
51
  Check: Sign in as a reader holding neither the price nor the cost permission: one sentence names both permissions and the roles that hold them.
52
52
 
@@ -19,7 +19,7 @@ triggers:
19
19
  history,
20
20
  ranking,
21
21
  ]
22
- families: [page-header, select, stat-card, chart, table, list, section, inline-message]
22
+ families: [page-header, select, stat-card, chart, table, list, section, alert]
23
23
  ---
24
24
 
25
25
  # Reports
@@ -85,9 +85,9 @@ Each family is documented in `./<family>.md`.
85
85
  - typography: Text and heading with type scale steps.
86
86
 
87
87
  ## Feedback
88
- - alert: Static message with a tone, icon and actions.
88
+ - alert: Framed notice heading a section, a form or a page.
89
89
  - import-export-center: Import and export jobs with progress.
90
- - inline-message: Short status message next to content.
90
+ - inline-message: The hint or error of one field; a region uses alert.
91
91
  - loading-overlay: Veil and indicator over a loading region.
92
92
  - notification-center: Read and unread notifications with actions.
93
93
  - progress-indicator: Progress bar or ring, known or indeterminate.
@@ -4,7 +4,7 @@
4
4
  "binding": "react",
5
5
  "catalog": {
6
6
  "group": "Feedback",
7
- "summary": "Short status message next to content."
7
+ "summary": "The hint or error of one field; a region uses alert."
8
8
  },
9
9
  "axes": {
10
10
  "tone": [
@@ -113,7 +113,7 @@
113
113
  "type": "'sm' | 'md'",
114
114
  "defaultValue": "sm",
115
115
  "appliesTo": "InlineMessage",
116
- "description": "The type step. sm is the message of a field, md the message of a section; both read the control scales, which the theme restates per density"
116
+ "description": "The type step. sm beside a compact field, md beside a large field; both read the control scales, which the theme restates per density"
117
117
  },
118
118
  {
119
119
  "name": "live",
@@ -211,6 +211,7 @@
211
211
  ],
212
212
  "events": [],
213
213
  "accessibility": [
214
+ "A message about a section, a page or a command’s outcome is an alert, at reach section or page. This family is the message of one field or one control, under or beside it.",
214
215
  "There is no WAI-ARIA APG pattern for a message attached to a field. Three documents cover it between them: the APG Alert Pattern (w3.org/WAI/ARIA/apg/patterns/alert/) for the announcing behaviour, MDN’s aria-errormessage reference for the wiring, and WCAG 2.2 Understanding 3.3.1 Error Identification for the requirement that the error be identified in text.",
215
216
  "The severity is a word, not only a colour and a mark. A reader who cannot see the message hears the sentence and nothing else, so the family writes “Error:”, “Warning:” or “Success:” in clipped text before it — GOV.UK’s Error message component publishes the idea for errors, and this generalises it to every severity and to a table an application replaces once through the provider.",
216
217
  "The live role goes on the message itself. Alert puts its role on an inner part because it has a dismiss button beside its text and MDN’s alert role reference restricts the role to text content; this family owns no controls, so the element that is the text is the element that announces. live defaults to off, because a message already present when the page finishes loading is announced by nothing whatever role it carries.",
@@ -264,9 +265,9 @@
264
265
  {
265
266
  "id": "sizes",
266
267
  "title": "The step the message sits at",
267
- "note": "sm is the message of a field and md the message of a section. Both read the control scales, so switching the toolbar to dense shrinks them with the rows around them.",
268
+ "note": "sm sits beside a compact field and md beside a large field. Both read the control scales, so switching the toolbar to dense shrinks them with the rows around them.",
268
269
  "language": "tsx",
269
- "source": "<InlineMessage size=\"sm\" tone=\"danger\">\n A mensagem de um campo.\n</InlineMessage>;\n<InlineMessage size=\"md\" tone=\"danger\">\n A mensagem de uma seção.\n</InlineMessage>;\n",
270
+ "source": "<InlineMessage size=\"sm\" tone=\"danger\">\n A mensagem de um campo compacto.\n</InlineMessage>;\n<InlineMessage size=\"md\" tone=\"danger\">\n A mensagem de um campo grande.\n</InlineMessage>;\n",
270
271
  "verdict": "excerpt"
271
272
  },
272
273
  {
@@ -1,7 +1,7 @@
1
1
  <!-- index: ./index.md -->
2
2
  # inline-message
3
3
 
4
- `data-ui="inline-message"` · Short status message next to content.
4
+ `data-ui="inline-message"` · The hint or error of one field; a region uses alert.
5
5
 
6
6
  ## Import
7
7
 
@@ -36,7 +36,7 @@ Excerpt — not a complete module
36
36
  | Name | Type | Default | Applies to | Description |
37
37
  | --- | --- | --- | --- | --- |
38
38
  | `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | InlineMessage | What the message is about, and therefore which mark it draws and which word a reader hears first. secondary is help: no mark, no word, and the neutral muted ink |
39
- | `size` | `'sm' \| 'md'` | sm | InlineMessage | The type step. sm is the message of a field, md the message of a section; both read the control scales, which the theme restates per density |
39
+ | `size` | `'sm' \| 'md'` | sm | InlineMessage | The type step. sm beside a compact field, md beside a large field; both read the control scales, which the theme restates per density |
40
40
  | `live` | `'off' \| 'polite' \| 'assertive'` | off | InlineMessage | Whether the message announces itself. polite writes role="status" and assertive writes role="alert", both on this element — there are no controls inside it to keep out of the region |
41
41
  | `mark` | `'glyph' \| 'dot' \| 'none'` | glyph | InlineMessage | Which mark is drawn. glyph is the tone’s own silhouette; dot is one neutral bullet in the tone’s ink, the same shape for every tone including help; none draws nothing, and the tone is said by the ink and the weight of the sentence. Field and FieldGroup ask for none, because a silhouette under every control of a form is texture rather than a warning |
42
42
  | `prefix` | `string` | — | InlineMessage | The word read before the message. Unstated is the tone’s own; the empty string removes it, for a sentence that already names the severity |
@@ -62,6 +62,7 @@ Excerpt — not a complete module
62
62
 
63
63
  ## Rules
64
64
 
65
+ - A message about a section, a page or a command’s outcome is an alert, at reach section or page. This family is the message of one field or one control, under or beside it.
65
66
  - There is no WAI-ARIA APG pattern for a message attached to a field. Three documents cover it between them: the APG Alert Pattern (w3.org/WAI/ARIA/apg/patterns/alert/) for the announcing behaviour, MDN’s aria-errormessage reference for the wiring, and WCAG 2.2 Understanding 3.3.1 Error Identification for the requirement that the error be identified in text.
66
67
  - The severity is a word, not only a colour and a mark. A reader who cannot see the message hears the sentence and nothing else, so the family writes “Error:”, “Warning:” or “Success:” in clipped text before it — GOV.UK’s Error message component publishes the idea for errors, and this generalises it to every severity and to a table an application replaces once through the provider.
67
68
  - The live role goes on the message itself. Alert puts its role on an inner part because it has a dismiss button beside its text and MDN’s alert role reference restricts the role to text content; this family owns no controls, so the element that is the text is the element that announces. live defaults to off, because a message already present when the page finishes loading is announced by nothing whatever role it carries.
@@ -91,16 +92,16 @@ Excerpt — not a complete module
91
92
 
92
93
  ### The step the message sits at
93
94
 
94
- sm is the message of a field and md the message of a section. Both read the control scales, so switching the toolbar to dense shrinks them with the rows around them.
95
+ sm sits beside a compact field and md beside a large field. Both read the control scales, so switching the toolbar to dense shrinks them with the rows around them.
95
96
 
96
97
  Excerpt — not a complete module
97
98
 
98
99
  ```tsx
99
100
  <InlineMessage size="sm" tone="danger">
100
- A mensagem de um campo.
101
+ A mensagem de um campo compacto.
101
102
  </InlineMessage>;
102
103
  <InlineMessage size="md" tone="danger">
103
- A mensagem de uma seção.
104
+ A mensagem de um campo grande.
104
105
  </InlineMessage>;
105
106
  ```
106
107
 
@@ -208,11 +208,11 @@
208
208
  "description": "The five decisions an application takes once. A page that states any of them itself still wins"
209
209
  },
210
210
  {
211
- "name": "--slotted-page-sticky-top, --slotted-page-sticky-bottom",
211
+ "name": "--slotted-page-sticky-top, --slotted-page-sticky-bottom, --slotted-page-scrollport-block-size",
212
212
  "type": "runtime properties on the scroller",
213
213
  "defaultValue": "—",
214
214
  "appliesTo": "every family under the page, and the consumer’s own sticky elements inside it",
215
- "description": "The height of the chrome that stays at the top, written by the header, and of the footer, written by the page. A section’s sticky header reads the first; a table with stickyTo=\"page\" reads both through the bridge the page writes on its root. A consumer’s own position: sticky element reads the first as well: inset-block-start: calc(var(--slotted-page-sticky-top, 0px) + gap) stops it under the chrome instead of behind the stuck header, and max-block-size: calc(100dvh - var(--slotted-page-sticky-top, 0px) - gap) bounds one that may be taller than the viewport"
215
+ "description": "The height of the chrome that stays at the top, written by the header, of the footer, and of the scroller itself, written by the page. A section’s sticky header reads the first; a table with stickyTo=\"page\" reads both through the bridge the page writes on its root. A consumer’s own position: sticky element reads the first as well: inset-block-start: calc(var(--slotted-page-sticky-top, 0px) + gap) stops it under the chrome instead of behind the stuck header, and max-block-size: calc(var(--slotted-page-scrollport-block-size, 100dvh) - var(--slotted-page-sticky-top, 0px) - var(--slotted-page-sticky-bottom, 0px) - 2 * gap) bounds one that may be taller than the scroller. The third is the scroller’s visible height, written by the page; under an inset canvas the scroller is shorter than the viewport"
216
216
  }
217
217
  ],
218
218
  "events": [],