@slotted/angular 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.
- package/docs/alert.json +1 -1
- package/docs/alert.md +1 -1
- package/docs/app-shell.json +19 -2
- package/docs/app-shell.md +3 -1
- package/docs/dashboard-grid.json +6 -6
- package/docs/dashboard-grid.md +11 -5
- package/docs/description-list.json +9 -1
- package/docs/description-list.md +2 -1
- package/docs/guidelines/composition.md +12 -0
- package/docs/guidelines/errors-and-conflicts.md +7 -6
- package/docs/guidelines/index.md +3 -0
- package/docs/guidelines/layout-alignment.md +2 -2
- package/docs/guidelines/overviews.md +21 -1
- package/docs/guidelines/reading-permissions.md +2 -2
- package/docs/guidelines/reports.md +1 -1
- package/docs/index.md +2 -2
- package/docs/inline-message.json +5 -4
- package/docs/inline-message.md +6 -5
- package/docs/page.json +2 -2
- package/docs/page.md +1 -1
- package/docs/skills/compose-screen/SKILL.md +10 -1
- package/docs/skills/review-screen/SKILL.md +22 -20
- package/docs/stat-card.json +7 -4
- package/docs/stat-card.md +4 -4
- package/fesm2022/slotted-angular-app-shell.mjs +16 -5
- package/fesm2022/slotted-angular-app-shell.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +6 -0
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-currency-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-dashboard-grid.mjs +60 -18
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-description-list.mjs +15 -6
- package/fesm2022/slotted-angular-description-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-inline-message.mjs +2 -2
- package/fesm2022/slotted-angular-inline-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-menubar.mjs +2 -1
- package/fesm2022/slotted-angular-menubar.mjs.map +1 -1
- package/fesm2022/slotted-angular-page.mjs +26 -6
- package/fesm2022/slotted-angular-page.mjs.map +1 -1
- package/fesm2022/slotted-angular-stat-card.mjs +37 -6
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
- package/package.json +3 -3
- package/types/slotted-angular-app-shell.d.ts +1 -1
- package/types/slotted-angular-app-shell.d.ts.map +1 -1
- package/types/slotted-angular-chart.d.ts +9 -9
- package/types/slotted-angular-chart.d.ts.map +1 -1
- package/types/slotted-angular-currency-field.d.ts +8 -8
- package/types/slotted-angular-currency-field.d.ts.map +1 -1
- package/types/slotted-angular-dashboard-grid.d.ts +27 -7
- package/types/slotted-angular-dashboard-grid.d.ts.map +1 -1
- package/types/slotted-angular-description-list.d.ts +11 -3
- package/types/slotted-angular-description-list.d.ts.map +1 -1
- package/types/slotted-angular-inline-message.d.ts +2 -2
- package/types/slotted-angular-menubar.d.ts +5 -4
- package/types/slotted-angular-menubar.d.ts.map +1 -1
- package/types/slotted-angular-page.d.ts +7 -1
- package/types/slotted-angular-page.d.ts.map +1 -1
- package/types/slotted-angular-stat-card.d.ts +8 -3
- package/types/slotted-angular-stat-card.d.ts.map +1 -1
package/docs/alert.json
CHANGED
package/docs/alert.md
CHANGED
package/docs/app-shell.json
CHANGED
|
@@ -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",
|
|
@@ -252,6 +254,18 @@
|
|
|
252
254
|
"required": false,
|
|
253
255
|
"purpose": "The pane’s inner edge, from the WAI-ARIA Window Splitter pattern: focusable, role=\"separator\", aria-controls the pane, its three values the extent as whole percentages of the shell. Placed inside the aside; rendering it is the capability. Drawn on the column alone — under asideMode=\"overlay\" or a closed pane it is hidden, and a row under the content hides it."
|
|
254
256
|
},
|
|
257
|
+
{
|
|
258
|
+
"part": "line",
|
|
259
|
+
"element": "span inside the aside-resizer, aria-hidden",
|
|
260
|
+
"required": false,
|
|
261
|
+
"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."
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"part": "grip",
|
|
265
|
+
"element": "span inside the aside-resizer, aria-hidden",
|
|
266
|
+
"required": false,
|
|
267
|
+
"purpose": "The dot matrix between the two lines, two columns by three rows, in the line’s step."
|
|
268
|
+
},
|
|
255
269
|
{
|
|
256
270
|
"part": "aside-header",
|
|
257
271
|
"element": "div",
|
|
@@ -597,7 +611,6 @@
|
|
|
597
611
|
"--slotted-app-shell-nav-surface",
|
|
598
612
|
"--slotted-app-shell-radius",
|
|
599
613
|
"--slotted-app-shell-rail-size",
|
|
600
|
-
"--slotted-app-shell-resizer-color",
|
|
601
614
|
"--slotted-app-shell-row-inset-size",
|
|
602
615
|
"--slotted-app-shell-row-mark-size",
|
|
603
616
|
"--slotted-app-shell-row-text-line-height",
|
|
@@ -608,7 +621,6 @@
|
|
|
608
621
|
"--slotted-app-shell-tone-surface",
|
|
609
622
|
"--slotted-border-strong",
|
|
610
623
|
"--slotted-border-subtle",
|
|
611
|
-
"--slotted-border-width-thick",
|
|
612
624
|
"--slotted-border-width-thin",
|
|
613
625
|
"--slotted-control-font-size-md",
|
|
614
626
|
"--slotted-control-font-size-sm",
|
|
@@ -634,16 +646,21 @@
|
|
|
634
646
|
"--slotted-font-weight-semibold",
|
|
635
647
|
"--slotted-line-height-sm",
|
|
636
648
|
"--slotted-radius-lg",
|
|
649
|
+
"--slotted-radius-sm",
|
|
637
650
|
"--slotted-scrim",
|
|
638
651
|
"--slotted-shadow-lg",
|
|
639
652
|
"--slotted-shadow-md",
|
|
640
653
|
"--slotted-shadow-xs",
|
|
641
654
|
"--slotted-space-1",
|
|
655
|
+
"--slotted-space-12",
|
|
642
656
|
"--slotted-space-2",
|
|
643
657
|
"--slotted-space-3",
|
|
644
658
|
"--slotted-space-4",
|
|
645
659
|
"--slotted-space-5",
|
|
646
660
|
"--slotted-space-6",
|
|
661
|
+
"--slotted-space-9",
|
|
662
|
+
"--slotted-splitter-line-active-color",
|
|
663
|
+
"--slotted-splitter-line-color",
|
|
647
664
|
"--slotted-surface",
|
|
648
665
|
"--slotted-surface-sunken",
|
|
649
666
|
"--slotted-target-min",
|
package/docs/app-shell.md
CHANGED
|
@@ -120,6 +120,8 @@ export class AppShellBasic {}
|
|
|
120
120
|
| `progress` | the consumer’s element, holding one [slProgressBar] at placement="edge-start" | no |
|
|
121
121
|
| `aside` | aside | no |
|
|
122
122
|
| `aside-resizer` | any element carrying slAppShellAsideResizer | no |
|
|
123
|
+
| `line` | span inside the aside-resizer, aria-hidden | no |
|
|
124
|
+
| `grip` | span inside the aside-resizer, aria-hidden | no |
|
|
123
125
|
| `aside-header` | div | no |
|
|
124
126
|
| `aside-body` | div | no |
|
|
125
127
|
| `aside-footer` | div | no |
|
|
@@ -207,7 +209,7 @@ export class AppShellBasic {}
|
|
|
207
209
|
|
|
208
210
|
## Tokens
|
|
209
211
|
|
|
210
|
-
`--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-
|
|
212
|
+
`--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`
|
|
211
213
|
|
|
212
214
|
## Examples
|
|
213
215
|
|
package/docs/dashboard-grid.json
CHANGED
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"type": "DashboardLayout",
|
|
244
244
|
"defaultValue": "[]",
|
|
245
245
|
"appliesTo": "[slDashboardGrid]",
|
|
246
|
-
"description": "The uncontrolled start. A widget it does not name takes the first cell it fits, in the order of the children"
|
|
246
|
+
"description": "The uncontrolled start, and what Reset asks for, bound or not. A widget it does not name takes the first cell it fits, in the order of the children"
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
249
|
"name": "editing",
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
"type": "string",
|
|
314
314
|
"defaultValue": "—",
|
|
315
315
|
"appliesTo": "sl-dashboard-widget",
|
|
316
|
-
"description": "The widget’s key in the layout. Required"
|
|
316
|
+
"description": "The widget’s key in the layout. Required. The grid finds a widget in its own content, inside an ng-container, or inside a component of the application"
|
|
317
317
|
},
|
|
318
318
|
{
|
|
319
319
|
"name": "title",
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
"type": "'auto'",
|
|
349
349
|
"defaultValue": "—",
|
|
350
350
|
"appliesTo": "sl-dashboard-widget",
|
|
351
|
-
"description": "Draws the widget as
|
|
351
|
+
"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"
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
354
|
"name": "minColumns",
|
|
@@ -506,10 +506,10 @@
|
|
|
506
506
|
},
|
|
507
507
|
{
|
|
508
508
|
"name": "persistedDashboardLayout",
|
|
509
|
-
"type": "({ key, storage?, defaultLayout?, injector? }) => { layout, clear }",
|
|
509
|
+
"type": "({ key, storage?, defaultLayout?, injector? }) => { layout, defaultLayout, clear }",
|
|
510
510
|
"defaultValue": "localStorage",
|
|
511
511
|
"appliesTo": "an injection context",
|
|
512
|
-
"description": "A signal read once from the store and written after every change; bind it with [(layout)]"
|
|
512
|
+
"description": "A signal read once from the store and written after every change; bind it with [(layout)], and its defaultLayout to [defaultLayout], which Reset asks for"
|
|
513
513
|
}
|
|
514
514
|
],
|
|
515
515
|
"composition": [],
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
"title": "A layout kept across visits",
|
|
680
680
|
"note": "Carry or pull a widget and reload the page: the layout comes back from localStorage under the key trailhead-sales. Forget layout clears it. Text the store cannot read falls back to the default.",
|
|
681
681
|
"language": "ts",
|
|
682
|
-
"source": "@Component({\n template: `<div
|
|
682
|
+
"source": "@Component({\n template: `<div\n slDashboardGrid\n [(layout)]=\"persisted.layout\"\n [defaultLayout]=\"persisted.defaultLayout\"\n >\n …\n </div>`,\n})\nclass SalesPage {\n readonly persisted = persistedDashboardLayout({ key: 'trailhead-sales' });\n}\n",
|
|
683
683
|
"verdict": "excerpt"
|
|
684
684
|
},
|
|
685
685
|
{
|
package/docs/dashboard-grid.md
CHANGED
|
@@ -67,7 +67,7 @@ Excerpt — not a complete module
|
|
|
67
67
|
| Name | Type | Default | Applies to | Description |
|
|
68
68
|
| --- | --- | --- | --- | --- |
|
|
69
69
|
| `layout` | `DashboardLayout` | — | [slDashboardGrid] | Where each widget stands and how big it is: [{ key, x, y, w, h, hidden? }] in cells of the expanded class. Present means controlled |
|
|
70
|
-
| `defaultLayout` | `DashboardLayout` | [] | [slDashboardGrid] | The uncontrolled start. A widget it does not name takes the first cell it fits, in the order of the children |
|
|
70
|
+
| `defaultLayout` | `DashboardLayout` | [] | [slDashboardGrid] | The uncontrolled start, and what Reset asks for, bound or not. A widget it does not name takes the first cell it fits, in the order of the children |
|
|
71
71
|
| `editing` | `boolean` | false | [slDashboardGrid] | The edit mode. Present means controlled |
|
|
72
72
|
| `defaultEditing` | `boolean` | false | [slDashboardGrid] | The uncontrolled mode, read once |
|
|
73
73
|
| `columns` | `number \| { expanded, medium, compact }` | 12 | [slDashboardGrid], provideDashboardGridDefaults | 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 |
|
|
@@ -77,12 +77,12 @@ Excerpt — not a complete module
|
|
|
77
77
|
| `messages` | `Partial<DashboardGridMessages>` | — | [slDashboardGrid] | Words laid over the language in force, key by key: editBar, editStatus, add, reset, cancel, done, handle, detail, retry, emptyTitle, errorTitle, empty, emptyEditing, the eight menu items, hide, size, moved, movedInOrder, resized, hidden, shown, resetDone, cancelled |
|
|
78
78
|
| `exportAs slDashboardGrid` | `SlDashboardGrid` | — | [slDashboardGrid] | focusWidget(key), commitEditing(), cancelEditing(), currentLayout(), isEditing() |
|
|
79
79
|
| `host attributes` | `the element slDashboardGrid is on` | — | [slDashboardGrid] | id, class, style, data-* and events stay on the host; aria-label and aria-labelledby name the list |
|
|
80
|
-
| `value` | `string` | — | sl-dashboard-widget | The widget’s key in the layout. Required |
|
|
80
|
+
| `value` | `string` | — | sl-dashboard-widget | The widget’s key in the layout. Required. The grid finds a widget in its own content, inside an ng-container, or inside a component of the application |
|
|
81
81
|
| `title` | `string` | — | sl-dashboard-widget | The heading, the article’s name, the handle’s name and the entry in Add widget. Required |
|
|
82
82
|
| `description` | `string` | — | sl-dashboard-widget | The line under the title |
|
|
83
83
|
| `defaultColumns` | `number` | 4 | sl-dashboard-widget | Expanded columns of a widget the layout does not name |
|
|
84
84
|
| `defaultRows` | `number` | 2 | sl-dashboard-widget | Rows of a widget the layout does not name |
|
|
85
|
-
| `rows` | `'auto'` | — | sl-dashboard-widget | Draws the widget as
|
|
85
|
+
| `rows` | `'auto'` | — | sl-dashboard-widget | 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 |
|
|
86
86
|
| `minColumns` | `number` | 2 | sl-dashboard-widget | The fewest expanded columns a resize leaves |
|
|
87
87
|
| `maxColumns` | `number` | columns | sl-dashboard-widget | The most expanded columns a resize gives |
|
|
88
88
|
| `minRows` | `number` | 2 | sl-dashboard-widget | The fewest rows a resize leaves |
|
|
@@ -105,7 +105,7 @@ Excerpt — not a complete module
|
|
|
105
105
|
| `fill / size` | `CardFill / CardSize` | outline / md | sl-dashboard-widget | The card’s own axes |
|
|
106
106
|
| `content` | `projected content` | — | sl-dashboard-widget | The body; kept in a template and drawn by the grid inside its own li and card, in the layout’s order |
|
|
107
107
|
| `provideDashboardGridDefaults` | `{ columns, editBar, headingLevel }` | — | providers | The decisions an application takes once; an instance that states any of them wins. The words come from the language in force (provideSlotted) |
|
|
108
|
-
| `persistedDashboardLayout` | `({ key, storage?, defaultLayout?, injector? }) => { layout, clear }` | localStorage | an injection context | A signal read once from the store and written after every change; bind it with [(layout)] |
|
|
108
|
+
| `persistedDashboardLayout` | `({ key, storage?, defaultLayout?, injector? }) => { layout, defaultLayout, clear }` | localStorage | an injection context | A signal read once from the store and written after every change; bind it with [(layout)], and its defaultLayout to [defaultLayout], which Reset asks for |
|
|
109
109
|
|
|
110
110
|
## Events
|
|
111
111
|
|
|
@@ -234,7 +234,13 @@ Excerpt — not a complete module
|
|
|
234
234
|
|
|
235
235
|
```ts
|
|
236
236
|
@Component({
|
|
237
|
-
template: `<div
|
|
237
|
+
template: `<div
|
|
238
|
+
slDashboardGrid
|
|
239
|
+
[(layout)]="persisted.layout"
|
|
240
|
+
[defaultLayout]="persisted.defaultLayout"
|
|
241
|
+
>
|
|
242
|
+
…
|
|
243
|
+
</div>`,
|
|
238
244
|
})
|
|
239
245
|
class SalesPage {
|
|
240
246
|
readonly persisted = persistedDashboardLayout({ key: 'trailhead-sales' });
|
|
@@ -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,
|
|
@@ -163,6 +164,13 @@
|
|
|
163
164
|
"appliesTo": "slDescriptionList",
|
|
164
165
|
"description": "Nothing between pairs, a rule between them, or a framed table"
|
|
165
166
|
},
|
|
167
|
+
{
|
|
168
|
+
"name": "minColumnWidth",
|
|
169
|
+
"type": "'sm' | 'md'",
|
|
170
|
+
"defaultValue": "md",
|
|
171
|
+
"appliesTo": "slDescriptionList",
|
|
172
|
+
"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"
|
|
173
|
+
},
|
|
166
174
|
{
|
|
167
175
|
"name": "termWidth",
|
|
168
176
|
"type": "string",
|
|
@@ -254,7 +262,7 @@
|
|
|
254
262
|
"type": "DescriptionListDefaults",
|
|
255
263
|
"defaultValue": "—",
|
|
256
264
|
"appliesTo": "Application",
|
|
257
|
-
"description": "Sets layout, columns, variant and
|
|
265
|
+
"description": "Sets layout, columns, variant, termWidth and minColumnWidth once for everything below it; an input on the list still wins"
|
|
258
266
|
},
|
|
259
267
|
{
|
|
260
268
|
"name": "id / aria-describedby",
|
package/docs/description-list.md
CHANGED
|
@@ -55,6 +55,7 @@ Excerpt — not a complete module
|
|
|
55
55
|
| `layout` | `'row' \| 'stack'` | row | slDescriptionList | The term beside its value, or above it |
|
|
56
56
|
| `columns` | `1 \| 2 \| 3` | 1 | slDescriptionList | How many pairs stand side by side |
|
|
57
57
|
| `variant` | `'plain' \| 'ruled' \| 'framed'` | plain | slDescriptionList | Nothing between pairs, a rule between them, or a framed table |
|
|
58
|
+
| `minColumnWidth` | `'sm' \| 'md'` | md | slDescriptionList | 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 |
|
|
58
59
|
| `termWidth` | `string` | 14rem | slDescriptionList | The maximum width of the term column; the terms share one track sized to the widest of them, up to this |
|
|
59
60
|
| `messages` | `PartialMessages<DescriptionListMessages>` | — | slDescriptionList | Words laid over the language in force, key by key: copy, copied, copyBlocked, reveal, collapse, placeholder |
|
|
60
61
|
| `span` | `1 \| 2 \| 3` | 1 | slDescriptionListItem | How many columns the pair takes, clamped to the count the list has |
|
|
@@ -67,7 +68,7 @@ Excerpt — not a complete module
|
|
|
67
68
|
| `defaultRevealed` | `boolean` | false | slDescriptionListDescription | What an uncontrolled description starts from, read once |
|
|
68
69
|
| `ng-content` | `projection` | — | slDescriptionList, slDescriptionListDescription | Pairs are projected into the dl the component draws, and a value into the span that holds it |
|
|
69
70
|
| `exportAs` | `string` | — | every directive | Reaches the instance from the template: slDescriptionList, slDescriptionListItem, slDescriptionListTerm, slDescriptionListHint, slDescriptionListDescription, slDescriptionListAction |
|
|
70
|
-
| `provideDescriptionListDefaults()` | `DescriptionListDefaults` | — | Application | Sets layout, columns, variant and
|
|
71
|
+
| `provideDescriptionListDefaults()` | `DescriptionListDefaults` | — | Application | Sets layout, columns, variant, termWidth and minColumnWidth once for everything below it; an input on the list still wins |
|
|
71
72
|
| `id / aria-describedby` | `string` | — | slDescriptionListTerm, slDescriptionListAction | A static attribute you wrote survives the host binding: the term keeps your id, and the action composes your description with the term’s |
|
|
72
73
|
| `content` | `projection` | — | slDescriptionListDescription | A tag, a status indicator, a link or a skeleton — the value slot takes what the row needs |
|
|
73
74
|
|
|
@@ -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.
|
|
28
|
-
|
|
29
|
-
`
|
|
30
|
-
|
|
31
|
-
|
|
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
|
|
package/docs/guidelines/index.md
CHANGED
|
@@ -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) -
|
|
94
|
-
Don't: Measure the header in the screen's own code,
|
|
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,
|
|
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
|
|
package/docs/index.md
CHANGED
|
@@ -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:
|
|
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:
|
|
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.
|
package/docs/inline-message.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"binding": "angular",
|
|
5
5
|
"catalog": {
|
|
6
6
|
"group": "Feedback",
|
|
7
|
-
"summary": "
|
|
7
|
+
"summary": "The hint or error of one field; a region uses alert."
|
|
8
8
|
},
|
|
9
9
|
"axes": {
|
|
10
10
|
"tone": [
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"type": "'sm' | 'md'",
|
|
116
116
|
"defaultValue": "sm",
|
|
117
117
|
"appliesTo": "slInlineMessage",
|
|
118
|
-
"description": "The type step. sm
|
|
118
|
+
"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"
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
"name": "live",
|
|
@@ -206,6 +206,7 @@
|
|
|
206
206
|
],
|
|
207
207
|
"events": [],
|
|
208
208
|
"accessibility": [
|
|
209
|
+
"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.",
|
|
209
210
|
"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.",
|
|
210
211
|
"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 provideInlineMessageDefaults.",
|
|
211
212
|
"The live role goes on the host. slAlert 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.",
|
|
@@ -259,9 +260,9 @@
|
|
|
259
260
|
{
|
|
260
261
|
"id": "sizes",
|
|
261
262
|
"title": "The step the message sits at",
|
|
262
|
-
"note": "sm
|
|
263
|
+
"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.",
|
|
263
264
|
"language": "html",
|
|
264
|
-
"source": "<p slInlineMessage size=\"sm\" tone=\"danger\">A mensagem de um campo.</p>\n<p slInlineMessage size=\"md\" tone=\"danger\">A mensagem de
|
|
265
|
+
"source": "<p slInlineMessage size=\"sm\" tone=\"danger\">A mensagem de um campo compacto.</p>\n<p slInlineMessage size=\"md\" tone=\"danger\">A mensagem de um campo grande.</p>\n",
|
|
265
266
|
"verdict": "excerpt"
|
|
266
267
|
},
|
|
267
268
|
{
|
package/docs/inline-message.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- index: ./index.md -->
|
|
2
2
|
# inline-message
|
|
3
3
|
|
|
4
|
-
`data-ui="inline-message"` ·
|
|
4
|
+
`data-ui="inline-message"` · The hint or error of one field; a region uses alert.
|
|
5
5
|
|
|
6
6
|
## Import
|
|
7
7
|
|
|
@@ -38,7 +38,7 @@ Excerpt — not a complete module
|
|
|
38
38
|
| Name | Type | Default | Applies to | Description |
|
|
39
39
|
| --- | --- | --- | --- | --- |
|
|
40
40
|
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | slInlineMessage | 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 |
|
|
41
|
-
| `size` | `'sm' \| 'md'` | sm | slInlineMessage | The type step. sm
|
|
41
|
+
| `size` | `'sm' \| 'md'` | sm | slInlineMessage | The type step. sm beside a compact field, md beside a large field; both read the control scales, which the theme restates per density |
|
|
42
42
|
| `live` | `'off' \| 'polite' \| 'assertive'` | off | slInlineMessage | Whether the message announces itself. polite writes role="status" and assertive writes role="alert", both on the host — there are no controls inside it to keep out of the region. A role the template wrote is read first and kept |
|
|
43
43
|
| `mark` | `'glyph' \| 'dot' \| 'none'` | glyph | slInlineMessage | 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. slField and slFieldGroup ask for none, because a silhouette under every control of a form is texture rather than a warning |
|
|
44
44
|
| `prefix` | `string` | — | slInlineMessage | 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 |
|
|
@@ -63,6 +63,7 @@ Excerpt — not a complete module
|
|
|
63
63
|
|
|
64
64
|
## Rules
|
|
65
65
|
|
|
66
|
+
- 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.
|
|
66
67
|
- 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.
|
|
67
68
|
- 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 provideInlineMessageDefaults.
|
|
68
69
|
- The live role goes on the host. slAlert 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,13 +92,13 @@ Excerpt — not a complete module
|
|
|
91
92
|
|
|
92
93
|
### The step the message sits at
|
|
93
94
|
|
|
94
|
-
sm
|
|
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
|
```html
|
|
99
|
-
<p slInlineMessage size="sm" tone="danger">A mensagem de um campo.</p>
|
|
100
|
-
<p slInlineMessage size="md" tone="danger">A mensagem de
|
|
100
|
+
<p slInlineMessage size="sm" tone="danger">A mensagem de um campo compacto.</p>
|
|
101
|
+
<p slInlineMessage size="md" tone="danger">A mensagem de um campo grande.</p>
|
|
101
102
|
```
|
|
102
103
|
|
|
103
104
|
### A message that is still waiting
|
package/docs/page.json
CHANGED
|
@@ -203,11 +203,11 @@
|
|
|
203
203
|
"description": "The five decisions an application takes once. A page that states any of them itself still wins"
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
|
-
"name": "--slotted-page-sticky-top, --slotted-page-sticky-bottom",
|
|
206
|
+
"name": "--slotted-page-sticky-top, --slotted-page-sticky-bottom, --slotted-page-scrollport-block-size",
|
|
207
207
|
"type": "runtime properties on the scroller",
|
|
208
208
|
"defaultValue": "—",
|
|
209
209
|
"appliesTo": "every family under the page, and the consumer’s own sticky elements inside it",
|
|
210
|
-
"description": "The height of the chrome that stays at the top, written by the header, and of the
|
|
210
|
+
"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"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
"name": "native attributes",
|
package/docs/page.md
CHANGED
|
@@ -49,7 +49,7 @@ Excerpt — not a complete module
|
|
|
49
49
|
| `slPage on any element` | `directive` | — | the consumer’s own element | main keeps its native landmark; an article or a div gets role="main" unless landmark="none". The scroll part is the component’s, because it is the scroller |
|
|
50
50
|
| `exportAs slPage` | `SlPage` | — | a template reference | The resolved width, inset, scroll and ground as signals, which the header and the footer inject |
|
|
51
51
|
| `providePageDefaults()` | `{ width, inset, scroll, ground, landmark }` | — | an injector | The five decisions an application takes once. A page that states any of them itself still wins |
|
|
52
|
-
| `--slotted-page-sticky-top, --slotted-page-sticky-bottom` | `runtime properties on the scroller` | — | every family under the page, and the consumer’s own sticky elements inside it | The height of the chrome that stays at the top, written by the header, and of the
|
|
52
|
+
| `--slotted-page-sticky-top, --slotted-page-sticky-bottom, --slotted-page-scrollport-block-size` | `runtime properties on the scroller` | — | every family under the page, and the consumer’s own sticky elements inside it | 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 |
|
|
53
53
|
| `native attributes` | `on every part` | — | every part | Every directive sits on the consumer’s own element, so id, class, role and every listener stay where they were written; role and aria-label are read with HostAttributeToken before anything is written over them |
|
|
54
54
|
|
|
55
55
|
## Axes and defaults
|
|
@@ -41,7 +41,9 @@ topics.
|
|
|
41
41
|
1. `../../guidelines/index.md`.
|
|
42
42
|
2. `../../guidelines/composition.md`, always.
|
|
43
43
|
3. The topic of step 2. Add `layout-alignment.md` and `shell-composition.md`
|
|
44
|
-
when the screen places controls in a row
|
|
44
|
+
when the screen places controls in a row, makes an element of its own
|
|
45
|
+
`position: sticky` (a summary or a preview beside a form or a list), or
|
|
46
|
+
works in the application frame.
|
|
45
47
|
4. Add `errors-and-conflicts.md` and `reading-permissions.md` when the screen
|
|
46
48
|
writes data or reads under a role.
|
|
47
49
|
5. When the screen writes an element of its own, follow
|
|
@@ -74,6 +76,10 @@ element stands in that slot.
|
|
|
74
76
|
useDeferredValue or startTransition) (CP-09). A list longer than a hundred
|
|
75
77
|
rows is a `data-grid`, which windows its rows where it has a height of its
|
|
76
78
|
own and is served in pages below 600 pixels (LP-12, LP-14). Its columns, its disabled keys and a function row key are module constants or memoised: a new one on a render of the screen renders every mounted row again. Its renderers, its messages and its tree may be written inline.
|
|
79
|
+
- An element of the screen's own made `position: sticky` stops under the
|
|
80
|
+
page's chrome: its offset starts at `--slotted-page-sticky-top`, and its
|
|
81
|
+
height cap subtracts it (LA-06). An offset from the scroller's edge alone
|
|
82
|
+
sticks it behind the stuck header.
|
|
77
83
|
- Where no anatomy answers the problem, the screen writes an element of its
|
|
78
84
|
own instead of bending a family into a shape it does not have (CP-04). That
|
|
79
85
|
element is built with `../../skills/build-own-element/SKILL.md`.
|
|
@@ -101,3 +107,6 @@ Every region filled by a request and every control that starts one follow
|
|
|
101
107
|
against the task, and the reason is written beside it.
|
|
102
108
|
6. At 360 pixels with a coarse pointer, the header's actions and the footer's
|
|
103
109
|
actions each occupy one row (LA-03, LA-07).
|
|
110
|
+
7. Each element of the screen's own made sticky: scroll until the page header
|
|
111
|
+
sticks, at two positions; its top stands at or below the header's title
|
|
112
|
+
area (LA-06 Check).
|