@slotted/angular 0.1.0-beta.15 → 0.1.0-beta.17

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/docs/calendar.json +19 -1
  2. package/docs/calendar.md +3 -1
  3. package/docs/dashboard-grid.json +31 -9
  4. package/docs/dashboard-grid.md +15 -6
  5. package/docs/drawer.json +13 -4
  6. package/docs/drawer.md +5 -4
  7. package/docs/guidelines/index.md +2 -0
  8. package/docs/guidelines/layout-alignment.md +2 -2
  9. package/docs/guidelines/overviews.md +21 -1
  10. package/docs/link.json +16 -0
  11. package/docs/link.md +3 -1
  12. package/docs/list-item.json +10 -2
  13. package/docs/list-item.md +16 -13
  14. package/docs/markdown.json +7 -0
  15. package/docs/markdown.md +1 -0
  16. package/docs/message-scroller.json +1 -1
  17. package/docs/page.json +2 -2
  18. package/docs/page.md +1 -1
  19. package/docs/prompt-composer.json +9 -2
  20. package/docs/prompt-composer.md +3 -1
  21. package/docs/skills/compose-screen/SKILL.md +10 -1
  22. package/docs/skills/review-screen/SKILL.md +22 -20
  23. package/docs/stat-card.json +7 -4
  24. package/docs/stat-card.md +4 -4
  25. package/fesm2022/slotted-angular-attachment.mjs +2 -2
  26. package/fesm2022/slotted-angular-attachment.mjs.map +1 -1
  27. package/fesm2022/slotted-angular-calendar.mjs +32 -11
  28. package/fesm2022/slotted-angular-calendar.mjs.map +1 -1
  29. package/fesm2022/slotted-angular-chart.mjs +8 -2
  30. package/fesm2022/slotted-angular-chart.mjs.map +1 -1
  31. package/fesm2022/slotted-angular-dashboard-grid.mjs +171 -27
  32. package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
  33. package/fesm2022/slotted-angular-date-picker.mjs +1 -1
  34. package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
  35. package/fesm2022/slotted-angular-date-range-picker.mjs +1 -1
  36. package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
  37. package/fesm2022/slotted-angular-datetime-picker.mjs +1 -1
  38. package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
  39. package/fesm2022/slotted-angular-datetime-range-picker.mjs +1 -1
  40. package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
  41. package/fesm2022/slotted-angular-dialog.mjs +4 -4
  42. package/fesm2022/slotted-angular-dialog.mjs.map +1 -1
  43. package/fesm2022/slotted-angular-drawer.mjs +17 -3
  44. package/fesm2022/slotted-angular-drawer.mjs.map +1 -1
  45. package/fesm2022/slotted-angular-link.mjs +10 -3
  46. package/fesm2022/slotted-angular-link.mjs.map +1 -1
  47. package/fesm2022/slotted-angular-list-item.mjs +44 -7
  48. package/fesm2022/slotted-angular-list-item.mjs.map +1 -1
  49. package/fesm2022/slotted-angular-markdown.mjs +28 -14
  50. package/fesm2022/slotted-angular-markdown.mjs.map +1 -1
  51. package/fesm2022/slotted-angular-message.mjs +4 -4
  52. package/fesm2022/slotted-angular-message.mjs.map +1 -1
  53. package/fesm2022/slotted-angular-page.mjs +26 -6
  54. package/fesm2022/slotted-angular-page.mjs.map +1 -1
  55. package/fesm2022/slotted-angular-prompt-composer.mjs +77 -4
  56. package/fesm2022/slotted-angular-prompt-composer.mjs.map +1 -1
  57. package/fesm2022/slotted-angular-section.mjs +2 -2
  58. package/fesm2022/slotted-angular-section.mjs.map +1 -1
  59. package/fesm2022/slotted-angular-stat-card.mjs +37 -6
  60. package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
  61. package/fesm2022/slotted-angular-table.mjs +2 -2
  62. package/fesm2022/slotted-angular-table.mjs.map +1 -1
  63. package/package.json +3 -3
  64. package/types/slotted-angular-calendar.d.ts +15 -2
  65. package/types/slotted-angular-calendar.d.ts.map +1 -1
  66. package/types/slotted-angular-chart.d.ts +9 -9
  67. package/types/slotted-angular-chart.d.ts.map +1 -1
  68. package/types/slotted-angular-dashboard-grid.d.ts +63 -7
  69. package/types/slotted-angular-dashboard-grid.d.ts.map +1 -1
  70. package/types/slotted-angular-drawer.d.ts +6 -1
  71. package/types/slotted-angular-drawer.d.ts.map +1 -1
  72. package/types/slotted-angular-link.d.ts +8 -2
  73. package/types/slotted-angular-link.d.ts.map +1 -1
  74. package/types/slotted-angular-list-item.d.ts +4 -0
  75. package/types/slotted-angular-list-item.d.ts.map +1 -1
  76. package/types/slotted-angular-markdown.d.ts +6 -1
  77. package/types/slotted-angular-markdown.d.ts.map +1 -1
  78. package/types/slotted-angular-page.d.ts +7 -1
  79. package/types/slotted-angular-page.d.ts.map +1 -1
  80. package/types/slotted-angular-prompt-composer.d.ts +24 -1
  81. package/types/slotted-angular-prompt-composer.d.ts.map +1 -1
  82. package/types/slotted-angular-stat-card.d.ts +8 -3
  83. package/types/slotted-angular-stat-card.d.ts.map +1 -1
@@ -86,6 +86,7 @@
86
86
  "week-number",
87
87
  "cell",
88
88
  "day",
89
+ "mark",
89
90
  "months",
90
91
  "years",
91
92
  "period"
@@ -184,6 +185,12 @@
184
185
  "required": true,
185
186
  "purpose": "The number the reader presses. It holds the roving tabindex, data-today, aria-selected and aria-disabled. It is the cell’s child rather than the cell itself because the range band runs edge to edge while the day stays a rounded box inside it."
186
187
  },
188
+ {
189
+ "part": "mark",
190
+ "element": "span",
191
+ "required": false,
192
+ "purpose": "What falls on the day, drawn from marks: a dot in the row today’s dot reserves, in the mark’s tone, holding the visually hidden count that the day’s accessible name ends with."
193
+ },
187
194
  {
188
195
  "part": "months",
189
196
  "element": "div",
@@ -309,6 +316,13 @@
309
316
  "appliesTo": "SlCalendar",
310
317
  "description": "What a day of the month either side does: drawn and not pressable, drawn and pressable, or not drawn."
311
318
  },
319
+ {
320
+ "name": "marks",
321
+ "type": "ReadonlyMap<string, CalendarMark>",
322
+ "defaultValue": "—",
323
+ "appliesTo": "SlCalendar",
324
+ "description": "What falls on each day, keyed by its ISO date: a dot under the number in the mark’s tone, and its count in the day’s accessible name (“12, 2 items”). Composes with every selection mode, min, max and outsideDays."
325
+ },
312
326
  {
313
327
  "name": "locale",
314
328
  "type": "string",
@@ -487,8 +501,12 @@
487
501
  "--slotted-tone-accent-subtle-active",
488
502
  "--slotted-tone-accent-subtle-hover",
489
503
  "--slotted-tone-accent-text",
504
+ "--slotted-tone-danger-solid",
505
+ "--slotted-tone-info-solid",
490
506
  "--slotted-tone-secondary-subtle-active",
491
- "--slotted-tone-secondary-subtle-hover"
507
+ "--slotted-tone-secondary-subtle-hover",
508
+ "--slotted-tone-success-solid",
509
+ "--slotted-tone-warning-solid"
492
510
  ],
493
511
  "examples": [
494
512
  {
package/docs/calendar.md CHANGED
@@ -37,6 +37,7 @@ Excerpt — not a complete module
37
37
  | `week-number` | th | no |
38
38
  | `cell` | td | yes |
39
39
  | `day` | span | yes |
40
+ | `mark` | span | no |
40
41
  | `months` | div | no |
41
42
  | `years` | div | no |
42
43
  | `period` | button | no |
@@ -60,6 +61,7 @@ Excerpt — not a complete module
60
61
  | `weekNumbers` | `boolean` | false | SlCalendar | Draws the ISO 8601 week number as a row header. |
61
62
  | `fixedWeeks` | `boolean` | false | SlCalendar | Always six rows, so paging does not change the surface’s height. Worth setting inside a popover. |
62
63
  | `outsideDays` | `'shown' \| 'selectable' \| 'hidden'` | shown | SlCalendar | What a day of the month either side does: drawn and not pressable, drawn and pressable, or not drawn. |
64
+ | `marks` | `ReadonlyMap<string, CalendarMark>` | — | SlCalendar | What falls on each day, keyed by its ISO date: a dot under the number in the mark’s tone, and its count in the day’s accessible name (“12, 2 items”). Composes with every selection mode, min, max and outsideDays. |
63
65
  | `locale` | `string` | the language in force | SlCalendar | BCP 47. Decides the month names, the weekday names and the day a week starts on. |
64
66
  | `timeZone` | `string` | the runtime’s | SlCalendar | Which zone answers "what is today". |
65
67
  | `firstDayOfWeek` | `number` | the locale’s | SlCalendar | 0 is Sunday. Overrides what the locale says, for a product that fixes one. |
@@ -104,7 +106,7 @@ Excerpt — not a complete module
104
106
 
105
107
  ## Tokens
106
108
 
107
- `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-calendar-active-background`, `--slotted-calendar-background`, `--slotted-calendar-cell-size`, `--slotted-calendar-color`, `--slotted-calendar-day-radius`, `--slotted-calendar-disabled-color`, `--slotted-calendar-hover-background`, `--slotted-calendar-in-range-color`, `--slotted-calendar-invalid-edge-width`, `--slotted-calendar-invalid-focus-ring-color`, `--slotted-calendar-outside-color`, `--slotted-calendar-preview-background`, `--slotted-calendar-preview-border-color`, `--slotted-calendar-radius`, `--slotted-calendar-range-active-background`, `--slotted-calendar-range-background`, `--slotted-calendar-range-border-color`, `--slotted-calendar-range-hover-background`, `--slotted-calendar-selected-background`, `--slotted-calendar-selected-color`, `--slotted-calendar-today-color`, `--slotted-calendar-trigger-color`, `--slotted-calendar-unavailable-color`, `--slotted-calendar-week-number-border-color`, `--slotted-calendar-week-number-color`, `--slotted-calendar-weekday-color`, `--slotted-control-font-family`, `--slotted-control-font-size-md`, `--slotted-control-gap-md`, `--slotted-control-height-md`, `--slotted-control-icon-size-md`, `--slotted-control-invalid-edge-width`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-foreground`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-regular`, `--slotted-font-weight-semibold`, `--slotted-highlight-tint-opacity`, `--slotted-radius-full`, `--slotted-radius-sm`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-6`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-on-solid`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`
109
+ `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-calendar-active-background`, `--slotted-calendar-background`, `--slotted-calendar-cell-size`, `--slotted-calendar-color`, `--slotted-calendar-day-radius`, `--slotted-calendar-disabled-color`, `--slotted-calendar-hover-background`, `--slotted-calendar-in-range-color`, `--slotted-calendar-invalid-edge-width`, `--slotted-calendar-invalid-focus-ring-color`, `--slotted-calendar-outside-color`, `--slotted-calendar-preview-background`, `--slotted-calendar-preview-border-color`, `--slotted-calendar-radius`, `--slotted-calendar-range-active-background`, `--slotted-calendar-range-background`, `--slotted-calendar-range-border-color`, `--slotted-calendar-range-hover-background`, `--slotted-calendar-selected-background`, `--slotted-calendar-selected-color`, `--slotted-calendar-today-color`, `--slotted-calendar-trigger-color`, `--slotted-calendar-unavailable-color`, `--slotted-calendar-week-number-border-color`, `--slotted-calendar-week-number-color`, `--slotted-calendar-weekday-color`, `--slotted-control-font-family`, `--slotted-control-font-size-md`, `--slotted-control-gap-md`, `--slotted-control-height-md`, `--slotted-control-icon-size-md`, `--slotted-control-invalid-edge-width`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-foreground`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-regular`, `--slotted-font-weight-semibold`, `--slotted-highlight-tint-opacity`, `--slotted-radius-full`, `--slotted-radius-sm`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-6`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-on-solid`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-text`, `--slotted-tone-danger-solid`, `--slotted-tone-info-solid`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-success-solid`, `--slotted-tone-warning-solid`
108
110
 
109
111
  ## Examples
110
112
 
@@ -12,6 +12,7 @@
12
12
  false
13
13
  ],
14
14
  "headingLevel": [
15
+ "auto",
15
16
  "2",
16
17
  "3",
17
18
  "4",
@@ -30,7 +31,7 @@
30
31
  "defaults": {
31
32
  "columns": 12,
32
33
  "editBar": true,
33
- "headingLevel": "3",
34
+ "headingLevel": "auto",
34
35
  "editing": false,
35
36
  "status": "ready",
36
37
  "loading": false,
@@ -242,7 +243,7 @@
242
243
  "type": "DashboardLayout",
243
244
  "defaultValue": "[]",
244
245
  "appliesTo": "[slDashboardGrid]",
245
- "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"
246
247
  },
247
248
  {
248
249
  "name": "editing",
@@ -274,10 +275,17 @@
274
275
  },
275
276
  {
276
277
  "name": "headingLevel",
277
- "type": "2 | 3 | 4 | 5 | 6",
278
- "defaultValue": "3",
278
+ "type": "'auto' | 2 | 3 | 4 | 5 | 6",
279
+ "defaultValue": "auto",
279
280
  "appliesTo": "[slDashboardGrid], sl-dashboard-widget, provideDashboardGridDefaults",
280
- "description": "The level of each widget’s title"
281
+ "description": "The level of each widget’s title; auto is one rank under the heading around the grid — h2 in a page body, one deeper inside a section — and never above h2"
282
+ },
283
+ {
284
+ "name": "expandedFrom",
285
+ "type": "number",
286
+ "defaultValue": "1024",
287
+ "appliesTo": "[slDashboardGrid]",
288
+ "description": "The grid’s own width, in pixels, from which the expanded class applies; a grid beside a navigation rail keeps its layout with a lower value"
281
289
  },
282
290
  {
283
291
  "name": "messages",
@@ -305,7 +313,7 @@
305
313
  "type": "string",
306
314
  "defaultValue": "—",
307
315
  "appliesTo": "sl-dashboard-widget",
308
- "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"
309
317
  },
310
318
  {
311
319
  "name": "title",
@@ -335,6 +343,13 @@
335
343
  "appliesTo": "sl-dashboard-widget",
336
344
  "description": "Rows of a widget the layout does not name"
337
345
  },
346
+ {
347
+ "name": "rows",
348
+ "type": "'auto'",
349
+ "defaultValue": "—",
350
+ "appliesTo": "sl-dashboard-widget",
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
+ },
338
353
  {
339
354
  "name": "minColumns",
340
355
  "type": "number",
@@ -447,6 +462,13 @@
447
462
  "appliesTo": "sl-dashboard-widget",
448
463
  "description": "The widget’s own page, as a link in the corner"
449
464
  },
465
+ {
466
+ "name": "a[slDashboardWidgetDetail]",
467
+ "type": "element",
468
+ "defaultValue": "—",
469
+ "appliesTo": "sl-dashboard-widget",
470
+ "description": "The application’s own detail link — routerLink on it — drawn in place of the family’s, with the family’s part, look, mark and name"
471
+ },
450
472
  {
451
473
  "name": "[slDashboardWidgetActions]",
452
474
  "type": "projected content",
@@ -484,10 +506,10 @@
484
506
  },
485
507
  {
486
508
  "name": "persistedDashboardLayout",
487
- "type": "({ key, storage?, defaultLayout?, injector? }) => { layout, clear }",
509
+ "type": "({ key, storage?, defaultLayout?, injector? }) => { layout, defaultLayout, clear }",
488
510
  "defaultValue": "localStorage",
489
511
  "appliesTo": "an injection context",
490
- "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"
491
513
  }
492
514
  ],
493
515
  "composition": [],
@@ -657,7 +679,7 @@
657
679
  "title": "A layout kept across visits",
658
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.",
659
681
  "language": "ts",
660
- "source": "@Component({\n template: `<div slDashboardGrid [(layout)]=\"persisted.layout\">…</div>`,\n})\nclass SalesPage {\n readonly persisted = persistedDashboardLayout({ key: 'trailhead-sales' });\n}\n",
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",
661
683
  "verdict": "excerpt"
662
684
  },
663
685
  {
@@ -67,20 +67,22 @@ 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 |
74
74
  | `editBar` | `boolean` | true | [slDashboardGrid], provideDashboardGridDefaults | Whether the family draws Add, Reset, Cancel and Done while editing |
75
- | `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6` | 3 | [slDashboardGrid], sl-dashboard-widget, provideDashboardGridDefaults | The level of each widget’s title |
75
+ | `headingLevel` | `'auto' \| 2 \| 3 \| 4 \| 5 \| 6` | auto | [slDashboardGrid], sl-dashboard-widget, provideDashboardGridDefaults | The level of each widget’s title; auto is one rank under the heading around the grid — h2 in a page body, one deeper inside a section — and never above h2 |
76
+ | `expandedFrom` | `number` | 1024 | [slDashboardGrid] | The grid’s own width, in pixels, from which the expanded class applies; a grid beside a navigation rail keeps its layout with a lower value |
76
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 |
77
78
  | `exportAs slDashboardGrid` | `SlDashboardGrid` | — | [slDashboardGrid] | focusWidget(key), commitEditing(), cancelEditing(), currentLayout(), isEditing() |
78
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 |
79
- | `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 |
80
81
  | `title` | `string` | — | sl-dashboard-widget | The heading, the article’s name, the handle’s name and the entry in Add widget. Required |
81
82
  | `description` | `string` | — | sl-dashboard-widget | The line under the title |
82
83
  | `defaultColumns` | `number` | 4 | sl-dashboard-widget | Expanded columns of a widget the layout does not name |
83
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 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 |
84
86
  | `minColumns` | `number` | 2 | sl-dashboard-widget | The fewest expanded columns a resize leaves |
85
87
  | `maxColumns` | `number` | columns | sl-dashboard-widget | The most expanded columns a resize gives |
86
88
  | `minRows` | `number` | 2 | sl-dashboard-widget | The fewest rows a resize leaves |
@@ -97,12 +99,13 @@ Excerpt — not a complete module
97
99
  | `retryable` | `boolean` | false | sl-dashboard-widget | Draws Try again, which emits retry |
98
100
  | `detailable` | `boolean` | false | sl-dashboard-widget | Draws the detail action as a button, which emits detail |
99
101
  | `detailHref` | `string` | — | sl-dashboard-widget | The widget’s own page, as a link in the corner |
102
+ | `a[slDashboardWidgetDetail]` | `element` | — | sl-dashboard-widget | The application’s own detail link — routerLink on it — drawn in place of the family’s, with the family’s part, look, mark and name |
100
103
  | `[slDashboardWidgetActions]` | `projected content` | — | sl-dashboard-widget | The consumer’s controls in the header’s corner |
101
104
  | `[slDashboardWidgetFooter]` | `projected content` | — | sl-dashboard-widget | Content under the body |
102
105
  | `fill / size` | `CardFill / CardSize` | outline / md | sl-dashboard-widget | The card’s own axes |
103
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 |
104
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) |
105
- | `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 |
106
109
 
107
110
  ## Events
108
111
 
@@ -119,7 +122,7 @@ Excerpt — not a complete module
119
122
  | Axis | Values | Default |
120
123
  | --- | --- | --- |
121
124
  | `editBar` | `true`, `false` | `true` |
122
- | `headingLevel` | `2`, `3`, `4`, `5`, `6` | `3` |
125
+ | `headingLevel` | `auto`, `2`, `3`, `4`, `5`, `6` | `auto` |
123
126
  | `status` | `ready`, `empty`, `error` | `ready` |
124
127
 
125
128
  ## Rules
@@ -231,7 +234,13 @@ Excerpt — not a complete module
231
234
 
232
235
  ```ts
233
236
  @Component({
234
- template: `<div slDashboardGrid [(layout)]="persisted.layout">…</div>`,
237
+ template: `<div
238
+ slDashboardGrid
239
+ [(layout)]="persisted.layout"
240
+ [defaultLayout]="persisted.defaultLayout"
241
+ >
242
+ …
243
+ </div>`,
235
244
  })
236
245
  class SalesPage {
237
246
  readonly persisted = persistedDashboardLayout({ key: 'trailhead-sales' });
package/docs/drawer.json CHANGED
@@ -102,6 +102,7 @@
102
102
  "grip",
103
103
  "header",
104
104
  "title",
105
+ "actions",
105
106
  "description",
106
107
  "body",
107
108
  "footer",
@@ -112,7 +113,7 @@
112
113
  "docs": {
113
114
  "drawer": {
114
115
  "imports": {
115
- "source": "import { SlDrawer, SlDrawerBody, SlDrawerClose, SlDrawerDescription, SlDrawerFooter, SlDrawerHeader, SlDrawerResizer, SlDrawerTitle, SlDrawerTrigger, provideDrawerDefaults } from '@slotted/angular/drawer';",
116
+ "source": "import { SlDrawer, SlDrawerActions, SlDrawerBody, SlDrawerClose, SlDrawerDescription, SlDrawerFooter, SlDrawerHeader, SlDrawerResizer, SlDrawerTitle, SlDrawerTrigger, provideDrawerDefaults } from '@slotted/angular/drawer';",
116
117
  "selector": "<sl-drawer>, exportAs slDrawer"
117
118
  },
118
119
  "anatomy": [
@@ -162,7 +163,13 @@
162
163
  "part": "header",
163
164
  "element": "your own element, with slDrawerHeader on it",
164
165
  "required": false,
165
- "purpose": "Lays out the title and the description in one column and the close button in another, so a title that wraps grows the row instead of moving the button."
166
+ "purpose": "Lays out the title and the description in one column, the actions in a second when they are rendered, and the close button in the last, so a title that wraps grows the row instead of moving the buttons."
167
+ },
168
+ {
169
+ "part": "actions",
170
+ "element": "your own element, with slDrawerActions on it",
171
+ "required": false,
172
+ "purpose": "One or two actions beside the title, such as icon buttons for history and a new conversation, on the title’s row between the title and the close button. The buttons keep the size you give them."
166
173
  },
167
174
  {
168
175
  "part": "title",
@@ -250,7 +257,7 @@
250
257
  "type": "'sm' | 'md' | 'lg' | 'xl' | 'full' | 'content'",
251
258
  "defaultValue": "content on top and bottom, md on start and end",
252
259
  "appliesTo": "<sl-drawer>, provideDrawerDefaults",
253
- "description": "The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen. A step wider than the screen is held to it."
260
+ "description": "The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen. A step wider than the screen is held to it. On a bottom sheet, full is the screen’s height and the footer rests at its bottom."
254
261
  },
255
262
  {
256
263
  "name": "mount",
@@ -432,7 +439,7 @@
432
439
  "Under mode=\"inline\" the panel has no role, because a navigation drawer is a navigation landmark and a filter panel is complementary; write the landmark yourself, such as <nav slDrawerBody>. The trigger has no aria-haspopup there, because an inline drawer is a disclosure, not a popup.",
433
440
  "aria-modal=\"true\" is written only while the drawer is modal, which is the only state in which the page behind is inert. modal is always false under mode=\"inline\". An aria-label written on <sl-drawer> is moved to the panel, which is the element the role is on.",
434
441
  "The separator follows the WAI-ARIA window splitter pattern. The arrow keys move it in the direction they point, Home and End go to the limits, and Enter collapses the panel to its minimum and then restores it. Enter never closes the drawer; Escape does. The values are percentages, and there is no aria-valuetext, so a screen reader announces 40 rather than 40 per cent.",
435
- "A bottom sheet moves under a touch on its body as well as on its separator, and every stop a finger reaches, the height of the content among them, is also reachable with the arrow keys on the separator. It is moved by the page’s own scroll, so a control whose touch-action takes vertical movement keeps its gesture, and a region inside data-drawer-drag=\"none\" keeps its scroll from passing on to the sheet.",
442
+ "A bottom sheet moves under a touch on its body as well as on its separator, and every stop a finger reaches, the height of the content among them, is also reachable with the arrow keys on the separator. It is moved by the page’s own scroll, so a control whose touch-action takes vertical movement keeps its gesture, and a scrolling region at its edge — a message list at its top — passes the pull on to the sheet, unless it sits inside data-drawer-drag=\"none\".",
436
443
  "A closed panel is inert in both modes, so its controls are in neither the tab order nor the accessibility tree.",
437
444
  "Focus moves into an overlay panel when it opens, to the first focusable element unless initialFocus names another, and returns on close to the element that had it before; if that element has left the document, focus goes to its nearest ancestor still in it. An inline drawer moves no focus when it opens, and on close restores focus only when focus is inside the panel or on the page body.",
438
445
  "The ✕ button and the separator are each at least --slotted-target-min across, so both meet the WCAG 2.2 minimum target size of 24 by 24 pixels."
@@ -473,6 +480,8 @@
473
480
  "--slotted-drawer-sheet-floor",
474
481
  "--slotted-drawer-sheet-height",
475
482
  "--slotted-drawer-sheet-inline-size",
483
+ "--slotted-drawer-slide-duration",
484
+ "--slotted-drawer-slide-exit-duration",
476
485
  "--slotted-drawer-surface",
477
486
  "--slotted-drawer-title-color",
478
487
  "--slotted-drawer-title-font-family",
package/docs/drawer.md CHANGED
@@ -6,7 +6,7 @@
6
6
  ## Import
7
7
 
8
8
  ```ts
9
- import { SlDrawer, SlDrawerBody, SlDrawerClose, SlDrawerDescription, SlDrawerFooter, SlDrawerHeader, SlDrawerResizer, SlDrawerTitle, SlDrawerTrigger, provideDrawerDefaults } from '@slotted/angular/drawer';
9
+ import { SlDrawer, SlDrawerActions, SlDrawerBody, SlDrawerClose, SlDrawerDescription, SlDrawerFooter, SlDrawerHeader, SlDrawerResizer, SlDrawerTitle, SlDrawerTrigger, provideDrawerDefaults } from '@slotted/angular/drawer';
10
10
  ```
11
11
 
12
12
  Selector: `<sl-drawer>, exportAs slDrawer`
@@ -116,6 +116,7 @@ export class DrawerBasic {
116
116
  | `line` | span | yes |
117
117
  | `grip` | span[aria-hidden] | yes |
118
118
  | `header` | your own element, with slDrawerHeader on it | no |
119
+ | `actions` | your own element, with slDrawerActions on it | no |
119
120
  | `title` | your own heading, with slDrawerTitle on it | no |
120
121
  | `description` | your own element, with slDrawerDescription on it | no |
121
122
  | `body` | your own element, with slDrawerBody on it | no |
@@ -133,7 +134,7 @@ export class DrawerBasic {
133
134
  | `snapPoints` | `readonly number[]` | — | <sl-drawer> | The stops the measure moves between, as fractions. With them an arrow key moves to the next stop, Home and End go to the first and the last, and a drag is released onto the nearest. |
134
135
  | `mode` | `'overlay' \| 'inline'` | overlay | <sl-drawer>, provideDrawerDefaults | overlay puts the drawer over the page, in a portal; inline puts it in your own layout. The value can change while the drawer is open, and the panel’s content and the state of its fields are kept across the change. |
135
136
  | `side` | `'start' \| 'end' \| 'top' \| 'bottom'` | end | <sl-drawer>, provideDrawerDefaults | The edge the panel comes from. start and end follow the writing direction, so the drawer changes sides in a right-to-left document. |
136
- | `size` | `'sm' \| 'md' \| 'lg' \| 'xl' \| 'full' \| 'content'` | content on top and bottom, md on start and end | <sl-drawer>, provideDrawerDefaults | The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen. A step wider than the screen is held to it. |
137
+ | `size` | `'sm' \| 'md' \| 'lg' \| 'xl' \| 'full' \| 'content'` | content on top and bottom, md on start and end | <sl-drawer>, provideDrawerDefaults | The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen. A step wider than the screen is held to it. On a bottom sheet, full is the screen’s height and the footer rests at its bottom. |
137
138
  | `mount` | `'active' \| 'lazy' \| 'eager'` | active | <sl-drawer>, provideDrawerDefaults | When an overlay layer is in the document: active only while it is open or closing, lazy from the first open on, and eager from the start, inert while closed. An inline drawer is always in the document. |
138
139
  | `modal` | `boolean` | true | <sl-drawer>, provideDrawerDefaults | Whether the page behind is inert, its scroll is locked and focus is contained in the panel, and whether the panel carries aria-modal. The scrim is painted either way. Always false under mode="inline". |
139
140
  | `escape` | `'close' \| 'none'` | close | <sl-drawer>, provideDrawerDefaults | Whether Escape asks to close the drawer. Escape reaches only the topmost layer, and a layer that refuses it does not pass it to the one below. |
@@ -186,14 +187,14 @@ export class DrawerBasic {
186
187
  - Under mode="inline" the panel has no role, because a navigation drawer is a navigation landmark and a filter panel is complementary; write the landmark yourself, such as <nav slDrawerBody>. The trigger has no aria-haspopup there, because an inline drawer is a disclosure, not a popup.
187
188
  - aria-modal="true" is written only while the drawer is modal, which is the only state in which the page behind is inert. modal is always false under mode="inline". An aria-label written on <sl-drawer> is moved to the panel, which is the element the role is on.
188
189
  - The separator follows the WAI-ARIA window splitter pattern. The arrow keys move it in the direction they point, Home and End go to the limits, and Enter collapses the panel to its minimum and then restores it. Enter never closes the drawer; Escape does. The values are percentages, and there is no aria-valuetext, so a screen reader announces 40 rather than 40 per cent.
189
- - A bottom sheet moves under a touch on its body as well as on its separator, and every stop a finger reaches, the height of the content among them, is also reachable with the arrow keys on the separator. It is moved by the page’s own scroll, so a control whose touch-action takes vertical movement keeps its gesture, and a region inside data-drawer-drag="none" keeps its scroll from passing on to the sheet.
190
+ - A bottom sheet moves under a touch on its body as well as on its separator, and every stop a finger reaches, the height of the content among them, is also reachable with the arrow keys on the separator. It is moved by the page’s own scroll, so a control whose touch-action takes vertical movement keeps its gesture, and a scrolling region at its edge — a message list at its top — passes the pull on to the sheet, unless it sits inside data-drawer-drag="none".
190
191
  - A closed panel is inert in both modes, so its controls are in neither the tab order nor the accessibility tree.
191
192
  - Focus moves into an overlay panel when it opens, to the first focusable element unless initialFocus names another, and returns on close to the element that had it before; if that element has left the document, focus goes to its nearest ancestor still in it. An inline drawer moves no focus when it opens, and on close restores focus only when focus is inside the panel or on the page body.
192
193
  - The ✕ button and the separator are each at least --slotted-target-min across, so both meet the WCAG 2.2 minimum target size of 24 by 24 pixels.
193
194
 
194
195
  ## Tokens
195
196
 
196
- `--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-icon-size-md`, `--slotted-control-inner-size-md`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-drawer-backdrop-filter`, `--slotted-drawer-body-color`, `--slotted-drawer-border-color`, `--slotted-drawer-close-active-background`, `--slotted-drawer-close-color`, `--slotted-drawer-close-hover-background`, `--slotted-drawer-color`, `--slotted-drawer-description-color`, `--slotted-drawer-extent`, `--slotted-drawer-extent-lg`, `--slotted-drawer-extent-md`, `--slotted-drawer-extent-sm`, `--slotted-drawer-extent-xl`, `--slotted-drawer-footer-surface`, `--slotted-drawer-radius`, `--slotted-drawer-radius-expanded`, `--slotted-drawer-resizer-line-active-color`, `--slotted-drawer-resizer-line-color`, `--slotted-drawer-rule-color`, `--slotted-drawer-scrim`, `--slotted-drawer-sheet-floor`, `--slotted-drawer-sheet-height`, `--slotted-drawer-sheet-inline-size`, `--slotted-drawer-surface`, `--slotted-drawer-title-color`, `--slotted-drawer-title-font-family`, `--slotted-duration-instant`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-xl`, `--slotted-font-weight-semibold`, `--slotted-line-height-lg`, `--slotted-line-height-md`, `--slotted-radius-full`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-space-11`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-overlay`
197
+ `--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-icon-size-md`, `--slotted-control-inner-size-md`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-drawer-backdrop-filter`, `--slotted-drawer-body-color`, `--slotted-drawer-border-color`, `--slotted-drawer-close-active-background`, `--slotted-drawer-close-color`, `--slotted-drawer-close-hover-background`, `--slotted-drawer-color`, `--slotted-drawer-description-color`, `--slotted-drawer-extent`, `--slotted-drawer-extent-lg`, `--slotted-drawer-extent-md`, `--slotted-drawer-extent-sm`, `--slotted-drawer-extent-xl`, `--slotted-drawer-footer-surface`, `--slotted-drawer-radius`, `--slotted-drawer-radius-expanded`, `--slotted-drawer-resizer-line-active-color`, `--slotted-drawer-resizer-line-color`, `--slotted-drawer-rule-color`, `--slotted-drawer-scrim`, `--slotted-drawer-sheet-floor`, `--slotted-drawer-sheet-height`, `--slotted-drawer-sheet-inline-size`, `--slotted-drawer-slide-duration`, `--slotted-drawer-slide-exit-duration`, `--slotted-drawer-surface`, `--slotted-drawer-title-color`, `--slotted-drawer-title-font-family`, `--slotted-duration-instant`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-xl`, `--slotted-font-weight-semibold`, `--slotted-line-height-lg`, `--slotted-line-height-md`, `--slotted-radius-full`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-space-11`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-overlay`
197
198
 
198
199
  ## Examples
199
200
 
@@ -86,6 +86,8 @@ Every active rule, one line each. Load this first; load a topic file when the ta
86
86
  | 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
87
  | 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
88
  | 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` |
89
+ | 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` |
90
+ | 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
91
  | 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
92
  | 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
93
  | 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`.
package/docs/link.json CHANGED
@@ -7,6 +7,11 @@
7
7
  "summary": "Text link to another page or resource."
8
8
  },
9
9
  "axes": {
10
+ "size": [
11
+ "xs",
12
+ "sm",
13
+ "md"
14
+ ],
10
15
  "underline": [
11
16
  "always",
12
17
  "hover",
@@ -90,6 +95,13 @@
90
95
  "appliesTo": "slLink",
91
96
  "description": "Accent, the colour of the surrounding text, or a solid surface"
92
97
  },
98
+ {
99
+ "name": "size",
100
+ "type": "'xs' | 'sm' | 'md'",
101
+ "defaultValue": "—",
102
+ "appliesTo": "slLink",
103
+ "description": "The text size: 12, 13 or 14 pixels on the type scale. Unset, the link takes the size its action slot states — a stat card’s action, a section’s or a chart’s actions state sm — or else its parent’s"
104
+ },
93
105
  {
94
106
  "name": "external",
95
107
  "type": "boolean",
@@ -169,6 +181,9 @@
169
181
  "--slotted-easing-standard",
170
182
  "--slotted-focus-ring-color",
171
183
  "--slotted-focus-ring-width",
184
+ "--slotted-font-size-md",
185
+ "--slotted-font-size-sm",
186
+ "--slotted-font-size-xs",
172
187
  "--slotted-link-color",
173
188
  "--slotted-link-color-active",
174
189
  "--slotted-link-color-current",
@@ -178,6 +193,7 @@
178
193
  "--slotted-link-external-icon-gap",
179
194
  "--slotted-link-external-icon-size",
180
195
  "--slotted-link-focus-ring-offset",
196
+ "--slotted-link-font-size",
181
197
  "--slotted-link-radius",
182
198
  "--slotted-link-underline-color",
183
199
  "--slotted-link-underline-offset",
package/docs/link.md CHANGED
@@ -33,6 +33,7 @@ Excerpt — not a complete module
33
33
  | --- | --- | --- | --- | --- |
34
34
  | `underline` | `'always' \| 'hover' \| 'none'` | always | slLink | When the underline is drawn |
35
35
  | `variant` | `'accent' \| 'neutral' \| 'inverse'` | accent | slLink | Accent, the colour of the surrounding text, or a solid surface |
36
+ | `size` | `'xs' \| 'sm' \| 'md'` | — | slLink | The text size: 12, 13 or 14 pixels on the type scale. Unset, the link takes the size its action slot states — a stat card’s action, a section’s or a chart’s actions state sm — or else its parent’s |
36
37
  | `external` | `boolean` | false | slLink | Opens a new tab and warns that it does |
37
38
  | `messages` | `Partial<LinkMessages>` | — | slLink | Words laid over the language in force: the wording of that warning (externalHint) |
38
39
  | `disabled` | `boolean` | false | slLink | Withholds the destination, keeps the role, the state and the tab stop |
@@ -46,6 +47,7 @@ Excerpt — not a complete module
46
47
 
47
48
  | Axis | Values | Default |
48
49
  | --- | --- | --- |
50
+ | `size` | `xs`, `sm`, `md` | — |
49
51
  | `underline` | `always`, `hover`, `none` | `always` |
50
52
  | `variant` | `accent`, `neutral`, `inverse` | `accent` |
51
53
 
@@ -62,7 +64,7 @@ Excerpt — not a complete module
62
64
 
63
65
  ## Tokens
64
66
 
65
- `--slotted-control-radius`, `--slotted-disabled-foreground`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-width`, `--slotted-link-color`, `--slotted-link-color-active`, `--slotted-link-color-current`, `--slotted-link-color-disabled`, `--slotted-link-color-hover`, `--slotted-link-color-visited`, `--slotted-link-external-icon-gap`, `--slotted-link-external-icon-size`, `--slotted-link-focus-ring-offset`, `--slotted-link-radius`, `--slotted-link-underline-color`, `--slotted-link-underline-offset`, `--slotted-link-underline-thickness`, `--slotted-text`, `--slotted-text-inverse`, `--slotted-text-muted`, `--slotted-tone-accent-text`
67
+ `--slotted-control-radius`, `--slotted-disabled-foreground`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-width`, `--slotted-font-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xs`, `--slotted-link-color`, `--slotted-link-color-active`, `--slotted-link-color-current`, `--slotted-link-color-disabled`, `--slotted-link-color-hover`, `--slotted-link-color-visited`, `--slotted-link-external-icon-gap`, `--slotted-link-external-icon-size`, `--slotted-link-focus-ring-offset`, `--slotted-link-font-size`, `--slotted-link-radius`, `--slotted-link-underline-color`, `--slotted-link-underline-offset`, `--slotted-link-underline-thickness`, `--slotted-text`, `--slotted-text-inverse`, `--slotted-text-muted`, `--slotted-tone-accent-text`
66
68
 
67
69
  ## Examples
68
70
 
@@ -85,48 +85,56 @@
85
85
  },
86
86
  {
87
87
  "part": "marker",
88
+ "parent": "root",
88
89
  "element": "span",
89
90
  "required": false,
90
91
  "purpose": "The bullet, rendered only when marker is bullet: the dot Glyph in the marker column, before content and hidden from assistive technology. A numbered marker is a counter the stylesheet writes, because it is text."
91
92
  },
92
93
  {
93
94
  "part": "content",
95
+ "parent": "root",
94
96
  "element": "div, button or a",
95
97
  "required": true,
96
98
  "purpose": "The box that is read, hovered, focused and — for two of the three — activated. Three elements rather than one as prop, because the three are three different accessibility trees."
97
99
  },
98
100
  {
99
101
  "part": "start",
102
+ "parent": "content",
100
103
  "element": "div",
101
104
  "required": false,
102
105
  "purpose": "The leading column: an icon, an avatar, a Checkbox. It is the slot and not the control, and the chooser here is also what announces a selection the row only paints."
103
106
  },
104
107
  {
105
108
  "part": "body",
109
+ "parent": "content",
106
110
  "element": "div",
107
111
  "required": false,
108
112
  "purpose": "The text column, and the one box in the row that may shrink — which is what lets an unbroken token break instead of pushing the metadata out of the row."
109
113
  },
110
114
  {
111
115
  "part": "label",
116
+ "parent": "body",
112
117
  "element": "div",
113
118
  "required": false,
114
119
  "purpose": "The title. It clips under truncate, isolates its own direction so another script does not reorder the row, and breaks a single unbroken token."
115
120
  },
116
121
  {
117
122
  "part": "description",
123
+ "parent": "body",
118
124
  "element": "div",
119
125
  "required": false,
120
126
  "purpose": "The lines under the title. They clip with it, never instead of it."
121
127
  },
122
128
  {
123
129
  "part": "end",
130
+ "parent": "content",
124
131
  "element": "div",
125
132
  "required": false,
126
133
  "purpose": "Trailing metadata that is part of what the row says — a timestamp, a count, a Badge. Below 22rem it leaves the inline axis and sits under the title."
127
134
  },
128
135
  {
129
136
  "part": "actions",
137
+ "parent": "root",
130
138
  "element": "div",
131
139
  "required": false,
132
140
  "purpose": "Independent targets, and a sibling of the box rather than its child: interactive content may not nest inside an a or a button."
@@ -398,9 +406,9 @@
398
406
  {
399
407
  "id": "anatomy",
400
408
  "title": "Every part, and a row with almost none",
401
- "note": "Every part but the box is optional, and an absent one leaves no column behind: each gap is a margin on the part rather than a track on the grid.",
409
+ "note": "Every part but the box is optional, and an absent one leaves no column behind: each gap is a margin on the part rather than a track on the grid. slListItemEnd takes metadata, inside the box; slListItemActions takes controls, beside it.",
402
410
  "language": "html",
403
- "source": "<li slListItem>\n <div slListItemContent>\n <span slListItemStart></span>\n <span slListItemBody>\n <span slListItemLabel>Photos</span>\n <span slListItemDescription>128 files</span>\n </span>\n <span slListItemEnd>Yesterday</span>\n </div>\n <span slListItemActions></span>\n</li>\n",
411
+ "source": "<li slListItem>\n <div slListItemContent>\n <span slListItemStart></span>\n <span slListItemBody>\n <span slListItemLabel>Photos</span>\n <span slListItemDescription>128 files</span>\n </span>\n <span slListItemEnd>Yesterday</span>\n </div>\n <span slListItemActions>\n <button slButton size=\"sm\" variant=\"ghost\" (click)=\"rename()\">Rename</button>\n <button slButton size=\"sm\" variant=\"ghost\" (click)=\"remove()\">Remove</button>\n </span>\n</li>\n",
404
412
  "verdict": "excerpt"
405
413
  },
406
414
  {
package/docs/list-item.md CHANGED
@@ -26,17 +26,17 @@ Excerpt — not a complete module
26
26
 
27
27
  ## Anatomy
28
28
 
29
- | Part | Element | Required |
30
- | --- | --- | --- |
31
- | `root` | li, or the element render returns | yes |
32
- | `marker` | span | no |
33
- | `content` | div, button or a | yes |
34
- | `start` | div | no |
35
- | `body` | div | no |
36
- | `label` | div | no |
37
- | `description` | div | no |
38
- | `end` | div | no |
39
- | `actions` | div | no |
29
+ | Part | Parent | Element | Required |
30
+ | --- | --- | --- | --- |
31
+ | `root` | — | li, or the element render returns | yes |
32
+ | `marker` | `root` | span | no |
33
+ | `content` | `root` | div, button or a | yes |
34
+ | `start` | `content` | div | no |
35
+ | `body` | `content` | div | no |
36
+ | `label` | `body` | div | no |
37
+ | `description` | `body` | div | no |
38
+ | `end` | `content` | div | no |
39
+ | `actions` | `root` | div | no |
40
40
 
41
41
  ## Props
42
42
 
@@ -101,7 +101,7 @@ Excerpt — not a complete module
101
101
 
102
102
  ### Every part, and a row with almost none
103
103
 
104
- Every part but the box is optional, and an absent one leaves no column behind: each gap is a margin on the part rather than a track on the grid.
104
+ Every part but the box is optional, and an absent one leaves no column behind: each gap is a margin on the part rather than a track on the grid. slListItemEnd takes metadata, inside the box; slListItemActions takes controls, beside it.
105
105
 
106
106
  Excerpt — not a complete module
107
107
 
@@ -115,7 +115,10 @@ Excerpt — not a complete module
115
115
  </span>
116
116
  <span slListItemEnd>Yesterday</span>
117
117
  </div>
118
- <span slListItemActions></span>
118
+ <span slListItemActions>
119
+ <button slButton size="sm" variant="ghost" (click)="rename()">Rename</button>
120
+ <button slButton size="sm" variant="ghost" (click)="remove()">Remove</button>
121
+ </span>
119
122
  </li>
120
123
  ```
121
124