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

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 (66) hide show
  1. package/docs/calendar.json +19 -1
  2. package/docs/calendar.md +3 -1
  3. package/docs/dashboard-grid.json +26 -4
  4. package/docs/dashboard-grid.md +5 -2
  5. package/docs/drawer.json +13 -4
  6. package/docs/drawer.md +5 -4
  7. package/docs/link.json +16 -0
  8. package/docs/link.md +3 -1
  9. package/docs/list-item.json +10 -2
  10. package/docs/list-item.md +16 -13
  11. package/docs/markdown.json +7 -0
  12. package/docs/markdown.md +1 -0
  13. package/docs/message-scroller.json +1 -1
  14. package/docs/prompt-composer.json +9 -2
  15. package/docs/prompt-composer.md +3 -1
  16. package/fesm2022/slotted-angular-attachment.mjs +2 -2
  17. package/fesm2022/slotted-angular-attachment.mjs.map +1 -1
  18. package/fesm2022/slotted-angular-calendar.mjs +32 -11
  19. package/fesm2022/slotted-angular-calendar.mjs.map +1 -1
  20. package/fesm2022/slotted-angular-chart.mjs +2 -2
  21. package/fesm2022/slotted-angular-chart.mjs.map +1 -1
  22. package/fesm2022/slotted-angular-dashboard-grid.mjs +124 -22
  23. package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
  24. package/fesm2022/slotted-angular-date-picker.mjs +1 -1
  25. package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
  26. package/fesm2022/slotted-angular-date-range-picker.mjs +1 -1
  27. package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
  28. package/fesm2022/slotted-angular-datetime-picker.mjs +1 -1
  29. package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
  30. package/fesm2022/slotted-angular-datetime-range-picker.mjs +1 -1
  31. package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
  32. package/fesm2022/slotted-angular-dialog.mjs +4 -4
  33. package/fesm2022/slotted-angular-dialog.mjs.map +1 -1
  34. package/fesm2022/slotted-angular-drawer.mjs +17 -3
  35. package/fesm2022/slotted-angular-drawer.mjs.map +1 -1
  36. package/fesm2022/slotted-angular-link.mjs +10 -3
  37. package/fesm2022/slotted-angular-link.mjs.map +1 -1
  38. package/fesm2022/slotted-angular-list-item.mjs +44 -7
  39. package/fesm2022/slotted-angular-list-item.mjs.map +1 -1
  40. package/fesm2022/slotted-angular-markdown.mjs +28 -14
  41. package/fesm2022/slotted-angular-markdown.mjs.map +1 -1
  42. package/fesm2022/slotted-angular-message.mjs +4 -4
  43. package/fesm2022/slotted-angular-message.mjs.map +1 -1
  44. package/fesm2022/slotted-angular-prompt-composer.mjs +77 -4
  45. package/fesm2022/slotted-angular-prompt-composer.mjs.map +1 -1
  46. package/fesm2022/slotted-angular-section.mjs +2 -2
  47. package/fesm2022/slotted-angular-section.mjs.map +1 -1
  48. package/fesm2022/slotted-angular-stat-card.mjs +2 -2
  49. package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
  50. package/fesm2022/slotted-angular-table.mjs +2 -2
  51. package/fesm2022/slotted-angular-table.mjs.map +1 -1
  52. package/package.json +3 -3
  53. package/types/slotted-angular-calendar.d.ts +15 -2
  54. package/types/slotted-angular-calendar.d.ts.map +1 -1
  55. package/types/slotted-angular-dashboard-grid.d.ts +42 -6
  56. package/types/slotted-angular-dashboard-grid.d.ts.map +1 -1
  57. package/types/slotted-angular-drawer.d.ts +6 -1
  58. package/types/slotted-angular-drawer.d.ts.map +1 -1
  59. package/types/slotted-angular-link.d.ts +8 -2
  60. package/types/slotted-angular-link.d.ts.map +1 -1
  61. package/types/slotted-angular-list-item.d.ts +4 -0
  62. package/types/slotted-angular-list-item.d.ts.map +1 -1
  63. package/types/slotted-angular-markdown.d.ts +6 -1
  64. package/types/slotted-angular-markdown.d.ts.map +1 -1
  65. package/types/slotted-angular-prompt-composer.d.ts +24 -1
  66. package/types/slotted-angular-prompt-composer.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,
@@ -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",
@@ -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 many rows as its content measures, within minRows and maxRows, and moves the widgets below; the stored rows, which a resize sets, stay the minimum"
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",
@@ -72,7 +72,8 @@ Excerpt — not a complete module
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 |
@@ -81,6 +82,7 @@ Excerpt — not a complete module
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 many rows as its content measures, within minRows and maxRows, and moves the widgets below; the stored rows, which a resize sets, stay the minimum |
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,6 +99,7 @@ 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 |
@@ -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
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
 
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
 
@@ -120,6 +120,13 @@
120
120
  "appliesTo": "[slMarkdown]",
121
121
  "description": "The document in mdast; never HTML"
122
122
  },
123
+ {
124
+ "name": "source",
125
+ "type": "string",
126
+ "defaultValue": "—",
127
+ "appliesTo": "[slMarkdown]",
128
+ "description": "The document as CommonMark text, read by parseMarkdown in place of tree: the syntax of the types in allow is read and any other stays text. Paragraphs, ATX headings, fenced code, quotes, rules, nested lists, code spans, strong, emphasis, links, escapes and hard breaks; tables, images and HTML need an adapter"
129
+ },
123
130
  {
124
131
  "name": "size",
125
132
  "type": "'md' | 'lg' | 'xl'",
package/docs/markdown.md CHANGED
@@ -45,6 +45,7 @@ Excerpt — not a complete module
45
45
  | Name | Type | Default | Applies to | Description |
46
46
  | --- | --- | --- | --- | --- |
47
47
  | `tree` | `MarkdownNode \| null` | — | [slMarkdown] | The document in mdast; never HTML |
48
+ | `source` | `string` | — | [slMarkdown] | The document as CommonMark text, read by parseMarkdown in place of tree: the syntax of the types in allow is read and any other stays text. Paragraphs, ATX headings, fenced code, quotes, rules, nested lists, code spans, strong, emphasis, links, escapes and hard breaks; tables, images and HTML need an adapter |
48
49
  | `size` | `'md' \| 'lg' \| 'xl'` | lg | [slMarkdown] | The region’s type step, from prose |
49
50
  | `flow` | `'tight' \| 'normal' \| 'loose'` | normal | [slMarkdown] | The space between blocks, from prose |
50
51
  | `status` | `'ready' \| 'error'` | ready | [slMarkdown] | error replaces the document with the error part |
@@ -68,7 +68,7 @@
68
68
  "part": "root",
69
69
  "element": "div",
70
70
  "required": true,
71
- "purpose": "The frame. Fills a bounded parent; the engine writes data-scrollable, data-following and data-pending on it while the reader scrolls."
71
+ "purpose": "The frame. Fills a bounded parent; the engine writes data-scrollable, data-following and data-pending on it while the reader scrolls. data-pending hides the content until the opening position is applied, and content that holds no item is never pending."
72
72
  },
73
73
  {
74
74
  "part": "viewport",
@@ -75,6 +75,7 @@
75
75
  "footer",
76
76
  "action",
77
77
  "attach",
78
+ "dictate",
78
79
  "submit",
79
80
  "ring",
80
81
  "glow"
@@ -84,7 +85,7 @@
84
85
  "docs": {
85
86
  "promptComposer": {
86
87
  "imports": {
87
- "source": "import {\n providePromptComposerDefaults,\n SlPromptComposer,\n SlPromptComposerAction,\n SlPromptComposerAttach,\n SlPromptComposerFooter,\n SlPromptComposerHeader,\n SlPromptComposerInput,\n SlPromptComposerSubmit,\n} from '@slotted/angular/prompt-composer';",
88
+ "source": "import {\n providePromptComposerDefaults,\n SlPromptComposer,\n SlPromptComposerAction,\n SlPromptComposerAttach,\n SlPromptComposerDictate,\n SlPromptComposerFooter,\n SlPromptComposerHeader,\n SlPromptComposerInput,\n SlPromptComposerSubmit,\n} from '@slotted/angular/prompt-composer';",
88
89
  "selector": "form[slPromptComposer]",
89
90
  "exportAs": "slPromptComposer"
90
91
  },
@@ -125,6 +126,12 @@
125
126
  "required": false,
126
127
  "purpose": "Opens the file chooser with the composer’s accept and multiple, and hands the choice to (attach) with reason \"pointer\"."
127
128
  },
129
+ {
130
+ "part": "dictate",
131
+ "element": "button[slPromptComposerDictate]",
132
+ "required": false,
133
+ "purpose": "The microphone: dictation through the platform’s SpeechRecognition, in the lang input or the nearest lang attribute. Each final phrase is written at the end of the value through (valueChange) with reason \"dictation\"; the button is aria-pressed while the engine listens, a second press stops it, and “Listening” is announced as it starts. Without a recognition engine the button is hidden."
134
+ },
128
135
  {
129
136
  "part": "submit",
130
137
  "element": "button[slPromptComposerSubmit]",
@@ -306,7 +313,7 @@
306
313
  {
307
314
  "name": "(valueChange)",
308
315
  "payload": "ChangeRequest<string>",
309
- "when": "On slPromptComposerInput, before the value moves: reason \"keyboard\" for an edit, \"submit\" for the clearing after an accepted send. cancel() refuses the move."
316
+ "when": "On slPromptComposerInput, before the value moves: reason \"keyboard\" for an edit, \"dictation\" for a phrase slPromptComposerDictate wrote, \"submit\" for the clearing after an accepted send. cancel() refuses the move."
310
317
  },
311
318
  {
312
319
  "name": "(valueSubmit)",
@@ -11,6 +11,7 @@ import {
11
11
  SlPromptComposer,
12
12
  SlPromptComposerAction,
13
13
  SlPromptComposerAttach,
14
+ SlPromptComposerDictate,
14
15
  SlPromptComposerFooter,
15
16
  SlPromptComposerHeader,
16
17
  SlPromptComposerInput,
@@ -48,6 +49,7 @@ Excerpt — not a complete module
48
49
  | `footer` | any element carrying slPromptComposerFooter | no |
49
50
  | `action` | button[slPromptComposerAction] | no |
50
51
  | `attach` | button[slPromptComposerAttach] | no |
52
+ | `dictate` | button[slPromptComposerDictate] | no |
51
53
  | `submit` | button[slPromptComposerSubmit] | no |
52
54
  | `ring` | span, aria-hidden | no |
53
55
  | `glow` | span, aria-hidden | no |
@@ -83,7 +85,7 @@ Excerpt — not a complete module
83
85
 
84
86
  | Name | Payload | When |
85
87
  | --- | --- | --- |
86
- | `(valueChange)` | `ChangeRequest<string>` | On slPromptComposerInput, before the value moves: reason "keyboard" for an edit, "submit" for the clearing after an accepted send. cancel() refuses the move. |
88
+ | `(valueChange)` | `ChangeRequest<string>` | On slPromptComposerInput, before the value moves: reason "keyboard" for an edit, "dictation" for a phrase slPromptComposerDictate wrote, "submit" for the clearing after an accepted send. cancel() refuses the move. |
87
89
  | `(valueSubmit)` | `ChangeRequest<string>` | On slPromptComposer, before the message is sent from Enter, Mod+Enter or the send — reason "keyboard" or "pointer". cancel() keeps the value; otherwise it is cleared. |
88
90
  | `(stop)` | `PromptComposerStopEvent — { reason, source }` | The stop button, while status is "streaming". “Stopped” is announced. |
89
91
  | `(attach)` | `PromptComposerAttachEvent — { files, reason, rejected, source }` | Files from the paperclip ("pointer"), a paste ("paste") or a drop ("drop"), after accept, maxSize, maxFiles and multiple. |
@@ -290,7 +290,7 @@ class SlAttachmentPreview {
290
290
  ...(ngDevMode ? [{ debugName: "extension" }] : /* istanbul ignore next */ []));
291
291
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlAttachmentPreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
292
292
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlAttachmentPreview, isStandalone: true, selector: "[slAttachmentPreview]", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true", "data-part": "preview", "data-part-preview": "" }, properties: { "attr.data-kind": "owner.kind()", "attr.data-extension": "extension()" } }, exportAs: ["slAttachmentPreview"], ngImport: i0, template: `@if (picture()) {
293
- <img alt="" [src]="src()" (error)="failed.set(src())" />
293
+ <img alt="" decoding="async" loading="lazy" [src]="src()" (error)="failed.set(src())" />
294
294
  } @else {
295
295
  <span slIcon><svg slGlyph [name]="glyph()"></svg></span>
296
296
  }`, isInline: true, dependencies: [{ kind: "component", type: SlGlyph, selector: "svg[slGlyph]", inputs: ["name", "solid"] }, { kind: "component", type: SlIcon, selector: "[slIcon]", inputs: ["directional", "label", "size", "tone"], exportAs: ["slIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
@@ -303,7 +303,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
303
303
  exportAs: 'slAttachmentPreview',
304
304
  imports: [SlGlyph, SlIcon],
305
305
  template: `@if (picture()) {
306
- <img alt="" [src]="src()" (error)="failed.set(src())" />
306
+ <img alt="" decoding="async" loading="lazy" [src]="src()" (error)="failed.set(src())" />
307
307
  } @else {
308
308
  <span slIcon><svg slGlyph [name]="glyph()"></svg></span>
309
309
  }`,