@slotted/angular 0.1.0-beta.34 → 0.1.0-beta.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/accordion.json +2 -0
- package/docs/accordion.md +1 -1
- package/docs/avatar.json +1 -0
- package/docs/avatar.md +1 -1
- package/docs/badge.json +1 -0
- package/docs/badge.md +1 -1
- package/docs/button.json +59 -2
- package/docs/button.md +8 -1
- package/docs/calendar.json +59 -0
- package/docs/calendar.md +8 -1
- package/docs/card.json +7 -0
- package/docs/card.md +1 -0
- package/docs/chart.json +32 -4
- package/docs/chart.md +9 -5
- package/docs/checkbox.json +8 -3
- package/docs/checkbox.md +3 -3
- package/docs/collapsible.json +33 -1
- package/docs/collapsible.md +5 -1
- package/docs/command-palette.json +3 -1
- package/docs/command-palette.md +1 -1
- package/docs/dashboard-grid.json +13 -4
- package/docs/dashboard-grid.md +3 -2
- package/docs/description-list.json +9 -1
- package/docs/description-list.md +2 -1
- package/docs/entity-picker.json +4 -2
- package/docs/entity-picker.md +2 -2
- package/docs/field-group.json +1 -1
- package/docs/field-group.md +1 -1
- package/docs/floating-panel.json +203 -0
- package/docs/floating-panel.md +97 -0
- package/docs/guidelines/index.md +2 -0
- package/docs/guidelines/own-elements.md +20 -0
- package/docs/index.md +3 -1
- package/docs/inline-message.json +1 -0
- package/docs/inline-message.md +1 -1
- package/docs/kbd.json +1 -0
- package/docs/kbd.md +1 -1
- package/docs/link.json +1 -1
- package/docs/link.md +1 -1
- package/docs/list-item.json +31 -8
- package/docs/list-item.md +19 -6
- package/docs/list.json +14 -0
- package/docs/list.md +3 -1
- package/docs/listbox.json +13 -0
- package/docs/listbox.md +2 -1
- package/docs/markdown.json +1 -1
- package/docs/markdown.md +1 -1
- package/docs/message.json +17 -2
- package/docs/message.md +4 -2
- package/docs/meter.json +248 -0
- package/docs/meter.md +121 -0
- package/docs/page.json +21 -0
- package/docs/page.md +3 -1
- package/docs/prompt-composer.json +1 -1
- package/docs/rating.json +1 -0
- package/docs/rating.md +1 -1
- package/docs/section.json +28 -3
- package/docs/section.md +6 -3
- package/docs/segmented-control.json +5 -4
- package/docs/segmented-control.md +3 -3
- package/docs/side-navigation.json +8 -0
- package/docs/side-navigation.md +2 -1
- package/docs/skills/build-own-element/SKILL.md +42 -2
- package/docs/slider.json +8 -0
- package/docs/slider.md +2 -1
- package/docs/sparkline.json +1 -1
- package/docs/sparkline.md +1 -1
- package/docs/stat-card.json +7 -0
- package/docs/stat-card.md +1 -0
- package/docs/switch.json +16 -0
- package/docs/switch.md +3 -1
- package/docs/table.json +39 -1
- package/docs/table.md +6 -1
- package/docs/tag.json +1 -0
- package/docs/tag.md +1 -1
- package/docs/tokens.md +13 -1
- package/docs/toolbar.json +2 -1
- package/docs/toolbar.md +1 -1
- package/docs/top-navigation.json +1 -0
- package/docs/top-navigation.md +1 -1
- package/docs/typography.json +15 -0
- package/docs/typography.md +3 -1
- package/fesm2022/slotted-angular-accordion.mjs +2 -2
- package/fesm2022/slotted-angular-accordion.mjs.map +1 -1
- package/fesm2022/slotted-angular-avatar.mjs +2 -2
- package/fesm2022/slotted-angular-avatar.mjs.map +1 -1
- package/fesm2022/slotted-angular-badge.mjs +2 -2
- package/fesm2022/slotted-angular-badge.mjs.map +1 -1
- package/fesm2022/slotted-angular-button.mjs +87 -23
- package/fesm2022/slotted-angular-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-calendar.mjs +114 -23
- package/fesm2022/slotted-angular-calendar.mjs.map +1 -1
- package/fesm2022/slotted-angular-card.mjs +15 -5
- package/fesm2022/slotted-angular-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-cascader.mjs +5 -5
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +47 -5
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-checkbox.mjs +2 -2
- package/fesm2022/slotted-angular-checkbox.mjs.map +1 -1
- package/fesm2022/slotted-angular-collapsible.mjs +69 -8
- package/fesm2022/slotted-angular-collapsible.mjs.map +1 -1
- package/fesm2022/slotted-angular-column-manager.mjs +1 -1
- package/fesm2022/slotted-angular-column-manager.mjs.map +1 -1
- package/fesm2022/slotted-angular-combobox.mjs +2 -2
- package/fesm2022/slotted-angular-combobox.mjs.map +1 -1
- package/fesm2022/slotted-angular-command-palette.mjs +11 -2
- package/fesm2022/slotted-angular-command-palette.mjs.map +1 -1
- package/fesm2022/slotted-angular-dashboard-grid.mjs +19 -5
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-grid.mjs +40 -15
- package/fesm2022/slotted-angular-data-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-list.mjs +2 -2
- package/fesm2022/slotted-angular-data-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-description-list.mjs +13 -6
- package/fesm2022/slotted-angular-description-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-detail-panel.mjs +1 -1
- package/fesm2022/slotted-angular-detail-panel.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +14 -2
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-field-group.mjs +2 -2
- package/fesm2022/slotted-angular-field-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-filter-bar.mjs +4 -4
- package/fesm2022/slotted-angular-filter-bar.mjs.map +1 -1
- package/fesm2022/slotted-angular-floating-panel.mjs +257 -0
- package/fesm2022/slotted-angular-floating-panel.mjs.map +1 -0
- package/fesm2022/slotted-angular-import-export-center.mjs +1 -1
- package/fesm2022/slotted-angular-import-export-center.mjs.map +1 -1
- package/fesm2022/slotted-angular-inline-message.mjs +2 -2
- package/fesm2022/slotted-angular-inline-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-kbd.mjs +4 -4
- package/fesm2022/slotted-angular-kbd.mjs.map +1 -1
- package/fesm2022/slotted-angular-list-item.mjs +41 -6
- package/fesm2022/slotted-angular-list-item.mjs.map +1 -1
- package/fesm2022/slotted-angular-list.mjs +20 -4
- package/fesm2022/slotted-angular-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-listbox.mjs +63 -6
- package/fesm2022/slotted-angular-listbox.mjs.map +1 -1
- package/fesm2022/slotted-angular-markdown.mjs +1 -1
- package/fesm2022/slotted-angular-markdown.mjs.map +1 -1
- package/fesm2022/slotted-angular-message.mjs +78 -36
- package/fesm2022/slotted-angular-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-meter.mjs +108 -0
- package/fesm2022/slotted-angular-meter.mjs.map +1 -0
- package/fesm2022/slotted-angular-multi-select.mjs +2 -2
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-notification-center.mjs +1 -1
- package/fesm2022/slotted-angular-notification-center.mjs.map +1 -1
- package/fesm2022/slotted-angular-page.mjs +53 -6
- package/fesm2022/slotted-angular-page.mjs.map +1 -1
- package/fesm2022/slotted-angular-prompt-composer.mjs +24 -6
- package/fesm2022/slotted-angular-prompt-composer.mjs.map +1 -1
- package/fesm2022/slotted-angular-rating.mjs +6 -6
- package/fesm2022/slotted-angular-rating.mjs.map +1 -1
- package/fesm2022/slotted-angular-saved-views.mjs +1 -1
- package/fesm2022/slotted-angular-saved-views.mjs.map +1 -1
- package/fesm2022/slotted-angular-section.mjs +23 -6
- package/fesm2022/slotted-angular-section.mjs.map +1 -1
- package/fesm2022/slotted-angular-segmented-control.mjs +29 -7
- package/fesm2022/slotted-angular-segmented-control.mjs.map +1 -1
- package/fesm2022/slotted-angular-select.mjs +42 -18
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-side-navigation.mjs +29 -7
- package/fesm2022/slotted-angular-side-navigation.mjs.map +1 -1
- package/fesm2022/slotted-angular-slider.mjs +26 -16
- package/fesm2022/slotted-angular-slider.mjs.map +1 -1
- package/fesm2022/slotted-angular-split-button.mjs +4 -4
- package/fesm2022/slotted-angular-split-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-stat-card.mjs +82 -28
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-status-indicator.mjs +2 -2
- package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-switch.mjs +14 -4
- package/fesm2022/slotted-angular-switch.mjs.map +1 -1
- package/fesm2022/slotted-angular-table.mjs +76 -15
- package/fesm2022/slotted-angular-table.mjs.map +1 -1
- package/fesm2022/slotted-angular-tag.mjs +2 -2
- package/fesm2022/slotted-angular-tag.mjs.map +1 -1
- package/fesm2022/slotted-angular-tags-input.mjs +2 -2
- package/fesm2022/slotted-angular-tags-input.mjs.map +1 -1
- package/fesm2022/slotted-angular-toolbar.mjs +2 -2
- package/fesm2022/slotted-angular-toolbar.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +2 -2
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/fesm2022/slotted-angular-top-navigation.mjs +2 -2
- package/fesm2022/slotted-angular-top-navigation.mjs.map +1 -1
- package/fesm2022/slotted-angular-tour.mjs +1 -1
- package/fesm2022/slotted-angular-tour.mjs.map +1 -1
- package/fesm2022/slotted-angular-transfer.mjs +1 -1
- package/fesm2022/slotted-angular-transfer.mjs.map +1 -1
- package/fesm2022/slotted-angular-typography.mjs +31 -6
- package/fesm2022/slotted-angular-typography.mjs.map +1 -1
- package/fesm2022/slotted-angular-wizard.mjs +1 -1
- package/fesm2022/slotted-angular-wizard.mjs.map +1 -1
- package/package.json +11 -3
- package/types/slotted-angular-button.d.ts +57 -5
- package/types/slotted-angular-button.d.ts.map +1 -1
- package/types/slotted-angular-calendar.d.ts +62 -5
- package/types/slotted-angular-calendar.d.ts.map +1 -1
- package/types/slotted-angular-card.d.ts +7 -1
- package/types/slotted-angular-card.d.ts.map +1 -1
- package/types/slotted-angular-chart.d.ts +10 -2
- package/types/slotted-angular-chart.d.ts.map +1 -1
- package/types/slotted-angular-checkbox.d.ts +3 -1
- package/types/slotted-angular-checkbox.d.ts.map +1 -1
- package/types/slotted-angular-collapsible.d.ts +29 -3
- package/types/slotted-angular-collapsible.d.ts.map +1 -1
- package/types/slotted-angular-command-palette.d.ts.map +1 -1
- package/types/slotted-angular-dashboard-grid.d.ts +9 -1
- package/types/slotted-angular-dashboard-grid.d.ts.map +1 -1
- package/types/slotted-angular-data-grid.d.ts +5 -1
- package/types/slotted-angular-data-grid.d.ts.map +1 -1
- package/types/slotted-angular-description-list.d.ts +11 -3
- package/types/slotted-angular-description-list.d.ts.map +1 -1
- package/types/slotted-angular-entity-picker.d.ts +1 -0
- package/types/slotted-angular-entity-picker.d.ts.map +1 -1
- package/types/slotted-angular-floating-panel.d.ts +82 -0
- package/types/slotted-angular-floating-panel.d.ts.map +1 -0
- package/types/slotted-angular-list-item.d.ts +33 -6
- package/types/slotted-angular-list-item.d.ts.map +1 -1
- package/types/slotted-angular-list.d.ts +45 -29
- package/types/slotted-angular-list.d.ts.map +1 -1
- package/types/slotted-angular-listbox.d.ts +7 -1
- package/types/slotted-angular-listbox.d.ts.map +1 -1
- package/types/slotted-angular-message.d.ts +17 -3
- package/types/slotted-angular-message.d.ts.map +1 -1
- package/types/slotted-angular-meter.d.ts +67 -0
- package/types/slotted-angular-meter.d.ts.map +1 -0
- package/types/slotted-angular-page.d.ts +33 -10
- package/types/slotted-angular-page.d.ts.map +1 -1
- package/types/slotted-angular-prompt-composer.d.ts +2 -0
- package/types/slotted-angular-prompt-composer.d.ts.map +1 -1
- package/types/slotted-angular-section.d.ts +18 -3
- package/types/slotted-angular-section.d.ts.map +1 -1
- package/types/slotted-angular-segmented-control.d.ts +8 -2
- package/types/slotted-angular-segmented-control.d.ts.map +1 -1
- package/types/slotted-angular-select.d.ts.map +1 -1
- package/types/slotted-angular-side-navigation.d.ts +14 -2
- package/types/slotted-angular-side-navigation.d.ts.map +1 -1
- package/types/slotted-angular-slider.d.ts +7 -1
- package/types/slotted-angular-slider.d.ts.map +1 -1
- package/types/slotted-angular-stat-card.d.ts +20 -2
- package/types/slotted-angular-stat-card.d.ts.map +1 -1
- package/types/slotted-angular-switch.d.ts +16 -2
- package/types/slotted-angular-switch.d.ts.map +1 -1
- package/types/slotted-angular-table.d.ts +32 -3
- package/types/slotted-angular-table.d.ts.map +1 -1
- package/types/slotted-angular-typography.d.ts +21 -2
- package/types/slotted-angular-typography.d.ts.map +1 -1
package/docs/page.json
CHANGED
|
@@ -144,6 +144,20 @@
|
|
|
144
144
|
"appliesTo": "slPage",
|
|
145
145
|
"description": "The body stops growing with its content and its child stretches to what is left, for a master–detail, a splitter or a canvas that scroll their own panes. The body’s principal scroller snaps the header’s area. From 600 pixels of the page’s width up; below it the page scrolls as without fill"
|
|
146
146
|
},
|
|
147
|
+
{
|
|
148
|
+
"name": "flow",
|
|
149
|
+
"type": "'blocks' | 'none'",
|
|
150
|
+
"defaultValue": "blocks",
|
|
151
|
+
"appliesTo": "slPageBody",
|
|
152
|
+
"description": "blocks stacks what is written in the body at --slotted-page-block-gap, and a section without a surface at --slotted-page-section-gap, both a step smaller below 600 pixels of the page’s width; none leaves a body that is not a list of blocks (a workspace, a split) to its own layout"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "injectPageSizeClass",
|
|
156
|
+
"type": "() => Signal<SizeClass>",
|
|
157
|
+
"defaultValue": "—",
|
|
158
|
+
"appliesTo": "inside a page",
|
|
159
|
+
"description": "The size class to compose by from the page’s own width: compact under 600 pixels, medium under 1024, expanded from there, the thresholds of the page’s container queries, so code that chooses what to render agrees with the stylesheet inside a split view. Outside a page, until the page reports a size and while that size is 0, it reads the viewport"
|
|
160
|
+
},
|
|
147
161
|
{
|
|
148
162
|
"name": "ground",
|
|
149
163
|
"type": "'sunken' | 'surface'",
|
|
@@ -237,12 +251,19 @@
|
|
|
237
251
|
"--slotted-font-family-sans",
|
|
238
252
|
"--slotted-page-background-sunken",
|
|
239
253
|
"--slotted-page-background-surface",
|
|
254
|
+
"--slotted-page-block-gap",
|
|
255
|
+
"--slotted-page-block-gap-compact",
|
|
240
256
|
"--slotted-page-footer-backdrop-filter",
|
|
241
257
|
"--slotted-page-footer-background",
|
|
242
258
|
"--slotted-page-footer-border",
|
|
243
259
|
"--slotted-page-footer-padding-block",
|
|
260
|
+
"--slotted-page-inset-compact",
|
|
244
261
|
"--slotted-page-padding-block",
|
|
262
|
+
"--slotted-page-section-gap",
|
|
263
|
+
"--slotted-page-section-gap-compact",
|
|
245
264
|
"--slotted-space-4",
|
|
265
|
+
"--slotted-space-5",
|
|
266
|
+
"--slotted-space-6",
|
|
246
267
|
"--slotted-space-8",
|
|
247
268
|
"--slotted-surface",
|
|
248
269
|
"--slotted-surface-sunken",
|
package/docs/page.md
CHANGED
|
@@ -41,6 +41,8 @@ Excerpt — not a complete module
|
|
|
41
41
|
| `inset` | `0 to 12` | 6 | slPage, providePageDefaults | The inset of the column from the edge of the page, as a step on the space scale — the slContainer’s own. Held at 4 below 600 pixels of the page’s width |
|
|
42
42
|
| `scroll` | `'ancestor' \| 'self'` | ancestor | slPage, providePageDefaults | Who scrolls. ancestor makes the page at least as tall as what scrolls it and sticks the footer to the root’s bottom; self makes the scroll part the scroller and puts the footer below it |
|
|
43
43
|
| `fill` | `boolean` | false | slPage | The body stops growing with its content and its child stretches to what is left, for a master–detail, a splitter or a canvas that scroll their own panes. The body’s principal scroller snaps the header’s area. From 600 pixels of the page’s width up; below it the page scrolls as without fill |
|
|
44
|
+
| `flow` | `'blocks' \| 'none'` | blocks | slPageBody | blocks stacks what is written in the body at --slotted-page-block-gap, and a section without a surface at --slotted-page-section-gap, both a step smaller below 600 pixels of the page’s width; none leaves a body that is not a list of blocks (a workspace, a split) to its own layout |
|
|
45
|
+
| `injectPageSizeClass` | `() => Signal<SizeClass>` | — | inside a page | The size class to compose by from the page’s own width: compact under 600 pixels, medium under 1024, expanded from there, the thresholds of the page’s container queries, so code that chooses what to render agrees with the stylesheet inside a split view. Outside a page, until the page reports a size and while that size is 0, it reads the viewport |
|
|
44
46
|
| `ground` | `'sunken' \| 'surface'` | sunken | slPage, providePageDefaults | The canvas of an application, or the plain surface of a document. Written as --slotted-page-ground for a sticky section header to paint |
|
|
45
47
|
| `landmark` | `'main' \| 'none'` | main | slPage, providePageDefaults | Whether the root is the document’s main. A main element is left alone; any other element gets role="main" unless this says none, for a page inside a drawer, a dialog or a detail pane |
|
|
46
48
|
| `loading` | `boolean` | false | slPage | The body carries aria-busy and the root data-loading. Each family inside draws its own placeholder |
|
|
@@ -74,7 +76,7 @@ Excerpt — not a complete module
|
|
|
74
76
|
|
|
75
77
|
## Tokens
|
|
76
78
|
|
|
77
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-gap-md`, `--slotted-duration-medium`, `--slotted-easing-standard`, `--slotted-font-family-sans`, `--slotted-page-background-sunken`, `--slotted-page-background-surface`, `--slotted-page-footer-backdrop-filter`, `--slotted-page-footer-background`, `--slotted-page-footer-border`, `--slotted-page-footer-padding-block`, `--slotted-page-padding-block`, `--slotted-space-4`, `--slotted-space-8`, `--slotted-surface`, `--slotted-surface-sunken`, `--slotted-text`, `--slotted-z-index-sticky`
|
|
79
|
+
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-gap-md`, `--slotted-duration-medium`, `--slotted-easing-standard`, `--slotted-font-family-sans`, `--slotted-page-background-sunken`, `--slotted-page-background-surface`, `--slotted-page-block-gap`, `--slotted-page-block-gap-compact`, `--slotted-page-footer-backdrop-filter`, `--slotted-page-footer-background`, `--slotted-page-footer-border`, `--slotted-page-footer-padding-block`, `--slotted-page-inset-compact`, `--slotted-page-padding-block`, `--slotted-page-section-gap`, `--slotted-page-section-gap-compact`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-8`, `--slotted-surface`, `--slotted-surface-sunken`, `--slotted-text`, `--slotted-z-index-sticky`
|
|
78
80
|
|
|
79
81
|
## Examples
|
|
80
82
|
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"part": "action",
|
|
119
119
|
"element": "button[slPromptComposerAction]",
|
|
120
120
|
"required": false,
|
|
121
|
-
"purpose": "A button of the consumer’s in a band: a model menu, a tool, Cancelar. Round when
|
|
121
|
+
"purpose": "A button of the consumer’s in a band: a model menu, a tool, Cancelar. Round when it holds no words (an icon alone), a pill when it holds words, whether or not an aria-label names it; aria-expanded=\"true\" keeps it pressed while its menu is open."
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
124
|
"part": "attach",
|
package/docs/rating.json
CHANGED
package/docs/rating.md
CHANGED
|
@@ -197,7 +197,7 @@ Excerpt — not a complete module
|
|
|
197
197
|
|
|
198
198
|
## Tokens
|
|
199
199
|
|
|
200
|
-
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-sm`, `--slotted-control-icon-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-foreground`, `--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-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-4xl`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-regular`, `--slotted-font-weight-semibold`, `--slotted-highlight-tint-opacity`, `--slotted-line-height-4xl`, `--slotted-line-height-md`, `--slotted-line-height-xs`, `--slotted-radius-full`, `--slotted-radius-sm`, `--slotted-radius-xs`, `--slotted-rating-active-background`, `--slotted-rating-bar-color`, `--slotted-rating-bar-size`, `--slotted-rating-edge`, `--slotted-rating-empty-color`, `--slotted-rating-gap`, `--slotted-rating-hover-background`, `--slotted-rating-invalid-color`, `--slotted-rating-invalid-edge-width`, `--slotted-rating-lit-color`, `--slotted-rating-symbol-size`, `--slotted-space-1`, `--slotted-space-10`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface-inverse`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-inverse`, `--slotted-text-muted`, `--slotted-tone-accent-solid`, `--slotted-tone-danger-border`, `--slotted-tone-danger-solid`, `--slotted-tone-danger-surface`, `--slotted-tone-danger-text`, `--slotted-tone-info-solid`, `--slotted-tone-secondary-border`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-secondary-surface`, `--slotted-tone-success-border`, `--slotted-tone-success-solid`, `--slotted-tone-success-surface`, `--slotted-tone-success-text`, `--slotted-tone-warning-border`, `--slotted-tone-warning-solid`, `--slotted-tone-warning-surface`, `--slotted-tone-warning-text`
|
|
200
|
+
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-sm`, `--slotted-control-icon-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-foreground`, `--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-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-4xl`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-regular`, `--slotted-font-weight-semibold`, `--slotted-highlight-tint-opacity`, `--slotted-line-height-4xl`, `--slotted-line-height-md`, `--slotted-line-height-xs`, `--slotted-radius-full`, `--slotted-radius-sm`, `--slotted-radius-xs`, `--slotted-rating-active-background`, `--slotted-rating-bar-color`, `--slotted-rating-bar-size`, `--slotted-rating-edge`, `--slotted-rating-empty-color`, `--slotted-rating-gap`, `--slotted-rating-hover-background`, `--slotted-rating-invalid-color`, `--slotted-rating-invalid-edge-width`, `--slotted-rating-lit-color`, `--slotted-rating-symbol-size`, `--slotted-space-1`, `--slotted-space-10`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface-inverse`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-box-edge`, `--slotted-text-inverse`, `--slotted-text-muted`, `--slotted-tone-accent-solid`, `--slotted-tone-danger-border`, `--slotted-tone-danger-solid`, `--slotted-tone-danger-surface`, `--slotted-tone-danger-text`, `--slotted-tone-info-solid`, `--slotted-tone-secondary-border`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-secondary-surface`, `--slotted-tone-success-border`, `--slotted-tone-success-solid`, `--slotted-tone-success-surface`, `--slotted-tone-success-text`, `--slotted-tone-warning-border`, `--slotted-tone-warning-solid`, `--slotted-tone-warning-surface`, `--slotted-tone-warning-text`
|
|
201
201
|
|
|
202
202
|
## Examples
|
|
203
203
|
|
package/docs/section.json
CHANGED
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"none",
|
|
30
30
|
"surface"
|
|
31
31
|
],
|
|
32
|
+
"heading": [
|
|
33
|
+
"label",
|
|
34
|
+
"title"
|
|
35
|
+
],
|
|
32
36
|
"sticky": [
|
|
33
37
|
false,
|
|
34
38
|
true
|
|
@@ -42,6 +46,7 @@
|
|
|
42
46
|
"level": "auto",
|
|
43
47
|
"divider": false,
|
|
44
48
|
"ground": "none",
|
|
49
|
+
"heading": "label",
|
|
45
50
|
"sticky": false
|
|
46
51
|
},
|
|
47
52
|
"capabilities": [
|
|
@@ -151,6 +156,13 @@
|
|
|
151
156
|
"appliesTo": "slSection",
|
|
152
157
|
"description": "The rank of the heading. auto takes the one typography’s outline gives: 2 directly in a page body, one deeper inside another section. A native heading element keeps its own tag; any other element gets aria-level from this"
|
|
153
158
|
},
|
|
159
|
+
{
|
|
160
|
+
"name": "bleed",
|
|
161
|
+
"type": "boolean",
|
|
162
|
+
"defaultValue": "false",
|
|
163
|
+
"appliesTo": "slSectionBody",
|
|
164
|
+
"description": "In a surface section, runs the body to the inline edges of the panel and to the block edge it touches, clipped to the corners of the panel. For a table or a grid with no frame of its own; without a surface it has no effect"
|
|
165
|
+
},
|
|
154
166
|
{
|
|
155
167
|
"name": "divider",
|
|
156
168
|
"type": "boolean",
|
|
@@ -165,6 +177,13 @@
|
|
|
165
177
|
"appliesTo": "slSection, provideSectionDefaults",
|
|
166
178
|
"description": "none is transparent; surface paints the raised surface with a subtle edge and the large radius — no shadow, no hover, no action, because a section is not a card"
|
|
167
179
|
},
|
|
180
|
+
{
|
|
181
|
+
"name": "heading",
|
|
182
|
+
"type": "'label' | 'title'",
|
|
183
|
+
"defaultValue": "label",
|
|
184
|
+
"appliesTo": "slSection, provideSectionDefaults",
|
|
185
|
+
"description": "label draws a top-level heading in small capitals; title draws it in mixed case at --slotted-section-title-size-{sm,md,lg}, for a section whose body opens with text heavier than a label. A nested section keeps the subsection form"
|
|
186
|
+
},
|
|
168
187
|
{
|
|
169
188
|
"name": "sticky",
|
|
170
189
|
"type": "boolean",
|
|
@@ -197,10 +216,10 @@
|
|
|
197
216
|
},
|
|
198
217
|
{
|
|
199
218
|
"name": "provideSectionDefaults()",
|
|
200
|
-
"type": "{ size, divider, ground, sticky }",
|
|
219
|
+
"type": "{ size, divider, ground, heading, sticky }",
|
|
201
220
|
"defaultValue": "—",
|
|
202
221
|
"appliesTo": "an injector",
|
|
203
|
-
"description": "The
|
|
222
|
+
"description": "The five decisions an application takes once. A section that states any of them itself still wins"
|
|
204
223
|
},
|
|
205
224
|
{
|
|
206
225
|
"name": "slHeadingLevel",
|
|
@@ -237,15 +256,18 @@
|
|
|
237
256
|
"--slotted-font-size-lg",
|
|
238
257
|
"--slotted-font-size-md",
|
|
239
258
|
"--slotted-font-size-sm",
|
|
259
|
+
"--slotted-font-size-xl",
|
|
240
260
|
"--slotted-font-size-xs",
|
|
241
261
|
"--slotted-font-weight-semibold",
|
|
242
262
|
"--slotted-line-height-lg",
|
|
243
263
|
"--slotted-line-height-md",
|
|
244
264
|
"--slotted-line-height-sm",
|
|
265
|
+
"--slotted-line-height-xl",
|
|
245
266
|
"--slotted-line-height-xs",
|
|
246
267
|
"--slotted-page-ground",
|
|
247
268
|
"--slotted-radius-lg",
|
|
248
269
|
"--slotted-section-border",
|
|
270
|
+
"--slotted-section-description-gap",
|
|
249
271
|
"--slotted-section-description-measure",
|
|
250
272
|
"--slotted-section-gap",
|
|
251
273
|
"--slotted-section-header-background",
|
|
@@ -260,6 +282,9 @@
|
|
|
260
282
|
"--slotted-section-subheading-size-sm",
|
|
261
283
|
"--slotted-section-subsection-spacing",
|
|
262
284
|
"--slotted-section-surface",
|
|
285
|
+
"--slotted-section-title-size-lg",
|
|
286
|
+
"--slotted-section-title-size-md",
|
|
287
|
+
"--slotted-section-title-size-sm",
|
|
263
288
|
"--slotted-space-1",
|
|
264
289
|
"--slotted-space-3",
|
|
265
290
|
"--slotted-space-4",
|
|
@@ -349,7 +374,7 @@
|
|
|
349
374
|
{
|
|
350
375
|
"id": "defaults",
|
|
351
376
|
"title": "Setting it once, and reaching past it",
|
|
352
|
-
"note": "provideSectionDefaults carries size, divider, ground and sticky for every section under it; the heading directive sits on the consumer’s own link while the family keeps the rank; a hash link reaches the root by its id.",
|
|
377
|
+
"note": "provideSectionDefaults carries size, divider, ground, heading and sticky for every section under it; the heading directive sits on the consumer’s own link while the family keeps the rank; a hash link reaches the root by its id.",
|
|
353
378
|
"language": "ts",
|
|
354
379
|
"source": "bootstrapApplication(App, {\n providers: [provideSectionDefaults({ divider: true, size: 'sm' })],\n});\n",
|
|
355
380
|
"verdict": "excerpt"
|
package/docs/section.md
CHANGED
|
@@ -44,13 +44,15 @@ Excerpt — not a complete module
|
|
|
44
44
|
| --- | --- | --- | --- | --- |
|
|
45
45
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | slSection, provideSectionDefaults | The step of the heading: the label’s, xs for sm and md and sm for lg; a nested section’s mixed-case heading, sm, md or lg. Independent of its rank |
|
|
46
46
|
| `level` | `'auto' \| '1' \| '2' \| '3' \| '4' \| '5' \| '6'` | auto | slSection | The rank of the heading. auto takes the one typography’s outline gives: 2 directly in a page body, one deeper inside another section. A native heading element keeps its own tag; any other element gets aria-level from this |
|
|
47
|
+
| `bleed` | `boolean` | false | slSectionBody | In a surface section, runs the body to the inline edges of the panel and to the block edge it touches, clipped to the corners of the panel. For a table or a grid with no frame of its own; without a surface it has no effect |
|
|
47
48
|
| `divider` | `boolean` | false | slSection, provideSectionDefaults | A rule under the header, for a page where space alone does not separate |
|
|
48
49
|
| `ground` | `'none' \| 'surface'` | none | slSection, provideSectionDefaults | none is transparent; surface paints the raised surface with a subtle edge and the large radius — no shadow, no hover, no action, because a section is not a card |
|
|
50
|
+
| `heading` | `'label' \| 'title'` | label | slSection, provideSectionDefaults | label draws a top-level heading in small capitals; title draws it in mixed case at --slotted-section-title-size-{sm,md,lg}, for a section whose body opens with text heavier than a label. A nested section keeps the subsection form |
|
|
49
51
|
| `sticky` | `boolean` | false | slSection, provideSectionDefaults | The header stays under the page chrome while the body scrolls, painted in the page’s ground. Without a page it sticks to the top of whatever scrolls. A region inside a page that paints a ground of its own declares --slotted-page-ground with that ground, so a sticky header under it matches the region. |
|
|
50
52
|
| `id` | `attribute` | generated | slSection | The identifier a hash link reaches, read with HostAttributeToken. The heading’s own id is derived from it |
|
|
51
53
|
| `slSectionHeading on any element` | `directive` | — | the consumer’s own element | A native heading gets nothing added; a div or a link gets role="heading" and aria-level, so a linked or editable title keeps its rank |
|
|
52
54
|
| `exportAs slSection` | `SlSection` | — | a template reference | The resolved rank, size, ground and the identifiers, as signals |
|
|
53
|
-
| `provideSectionDefaults()` | `{ size, divider, ground, sticky }` | — | an injector | The
|
|
55
|
+
| `provideSectionDefaults()` | `{ size, divider, ground, heading, sticky }` | — | an injector | The five decisions an application takes once. A section that states any of them itself still wins |
|
|
54
56
|
| `slHeadingLevel` | `from @slotted/angular/typography` | — | around a subtree | The outline context the section reads. The body already carries it as a host directive; put it on an element yourself to step the outline elsewhere |
|
|
55
57
|
| `native attributes` | `on every part` | — | every part | Every directive sits on the consumer’s own element, so id, class, routerLink and every listener stay where they were written |
|
|
56
58
|
|
|
@@ -62,6 +64,7 @@ Excerpt — not a complete module
|
|
|
62
64
|
| `level` | `auto`, `1`, `2`, `3`, `4`, `5`, `6` | `auto` |
|
|
63
65
|
| `divider` | `false`, `true` | `false` |
|
|
64
66
|
| `ground` | `none`, `surface` | `none` |
|
|
67
|
+
| `heading` | `label`, `title` | `label` |
|
|
65
68
|
| `sticky` | `false`, `true` | `false` |
|
|
66
69
|
|
|
67
70
|
## Rules
|
|
@@ -75,7 +78,7 @@ Excerpt — not a complete module
|
|
|
75
78
|
|
|
76
79
|
## Tokens
|
|
77
80
|
|
|
78
|
-
`--slotted-action-gap`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xs`, `--slotted-font-weight-semibold`, `--slotted-line-height-lg`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-line-height-xs`, `--slotted-page-ground`, `--slotted-radius-lg`, `--slotted-section-border`, `--slotted-section-description-measure`, `--slotted-section-gap`, `--slotted-section-header-background`, `--slotted-section-heading-size-lg`, `--slotted-section-heading-size-md`, `--slotted-section-heading-size-sm`, `--slotted-section-inset`, `--slotted-section-radius`, `--slotted-section-spacing`, `--slotted-section-subheading-size-lg`, `--slotted-section-subheading-size-md`, `--slotted-section-subheading-size-sm`, `--slotted-section-subsection-spacing`, `--slotted-section-surface`, `--slotted-space-1`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-9`, `--slotted-surface`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-muted`, `--slotted-z-index-sticky`
|
|
81
|
+
`--slotted-action-gap`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xl`, `--slotted-font-size-xs`, `--slotted-font-weight-semibold`, `--slotted-line-height-lg`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-line-height-xl`, `--slotted-line-height-xs`, `--slotted-page-ground`, `--slotted-radius-lg`, `--slotted-section-border`, `--slotted-section-description-gap`, `--slotted-section-description-measure`, `--slotted-section-gap`, `--slotted-section-header-background`, `--slotted-section-heading-size-lg`, `--slotted-section-heading-size-md`, `--slotted-section-heading-size-sm`, `--slotted-section-inset`, `--slotted-section-radius`, `--slotted-section-spacing`, `--slotted-section-subheading-size-lg`, `--slotted-section-subheading-size-md`, `--slotted-section-subheading-size-sm`, `--slotted-section-subsection-spacing`, `--slotted-section-surface`, `--slotted-section-title-size-lg`, `--slotted-section-title-size-md`, `--slotted-section-title-size-sm`, `--slotted-space-1`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-9`, `--slotted-surface`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-muted`, `--slotted-z-index-sticky`
|
|
79
82
|
|
|
80
83
|
## Examples
|
|
81
84
|
|
|
@@ -190,7 +193,7 @@ Excerpt — not a complete module
|
|
|
190
193
|
|
|
191
194
|
### Setting it once, and reaching past it
|
|
192
195
|
|
|
193
|
-
provideSectionDefaults carries size, divider, ground and sticky for every section under it; the heading directive sits on the consumer’s own link while the family keeps the rank; a hash link reaches the root by its id.
|
|
196
|
+
provideSectionDefaults carries size, divider, ground, heading and sticky for every section under it; the heading directive sits on the consumer’s own link while the family keeps the rank; a hash link reaches the root by its id.
|
|
194
197
|
|
|
195
198
|
Excerpt — not a complete module
|
|
196
199
|
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
],
|
|
19
19
|
"condense": [
|
|
20
20
|
"none",
|
|
21
|
-
"icons"
|
|
21
|
+
"icons",
|
|
22
|
+
"vertical"
|
|
22
23
|
],
|
|
23
24
|
"variant": [
|
|
24
25
|
"track",
|
|
@@ -159,10 +160,10 @@
|
|
|
159
160
|
},
|
|
160
161
|
{
|
|
161
162
|
"name": "condense",
|
|
162
|
-
"type": "'none' | 'icons'",
|
|
163
|
+
"type": "'none' | 'icons' | 'vertical'",
|
|
163
164
|
"defaultValue": "none",
|
|
164
165
|
"appliesTo": "slSegmentedControl",
|
|
165
|
-
"description": "What the control does when it is narrower than its labels need. icons keeps the marks and hides the words, and
|
|
166
|
+
"description": "What the control does when it is narrower than its labels need. icons keeps the marks and hides the words; vertical stands the segments in a column with their whole text, and returns to a row once the control is as wide as the labels need. Both make the control take its parent’s width so there is a width to ask a question about"
|
|
166
167
|
},
|
|
167
168
|
{
|
|
168
169
|
"name": "fullWidth",
|
|
@@ -396,7 +397,7 @@
|
|
|
396
397
|
{
|
|
397
398
|
"id": "condense",
|
|
398
399
|
"title": "Narrower than its words",
|
|
399
|
-
"note": "Below the width its labels need, a control told to condense keeps its marks and hides its words — hidden, never removed, so every segment is announced the same at every width.",
|
|
400
|
+
"note": "Below the width its labels need, a control told to condense keeps its marks and hides its words — hidden, never removed, so every segment is announced the same at every width. condense=\"vertical\" keeps the words instead and stands the segments in a column, which suits a set without icons; the width it needs is measured, so it follows the language of the labels.",
|
|
400
401
|
"language": "html",
|
|
401
402
|
"source": "<div slSegmentedControl aria-label=\"Report\" condense=\"icons\" defaultValue=\"table\">\n <label slSegment value=\"table\">\n <ng-icon slSegmentIcon name=\"lucideTable\" />\n Tabela\n </label>\n</div>\n",
|
|
402
403
|
"verdict": "excerpt"
|
|
@@ -49,7 +49,7 @@ Excerpt — not a complete module
|
|
|
49
49
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | slSegmentedControl | The control step. The track measures its segments back from it, so the whole control is exactly as tall as the field beside it |
|
|
50
50
|
| `orientation` | `'horizontal' \| 'vertical'` | horizontal | slSegmentedControl | How the segments flow and which way the thumb travels. A horizontal set writes aria-orientation, because radiogroup already implies vertical |
|
|
51
51
|
| `variant` | `'track' \| 'underline'` | track | slSegmentedControl | How the choice is drawn: a track with a thumb, or the words alone with the chosen one underlined |
|
|
52
|
-
| `condense` | `'none' \| 'icons'` | none | slSegmentedControl | What the control does when it is narrower than its labels need. icons keeps the marks and hides the words, and
|
|
52
|
+
| `condense` | `'none' \| 'icons' \| 'vertical'` | none | slSegmentedControl | What the control does when it is narrower than its labels need. icons keeps the marks and hides the words; vertical stands the segments in a column with their whole text, and returns to a row once the control is as wide as the labels need. Both make the control take its parent’s width so there is a width to ask a question about |
|
|
53
53
|
| `fullWidth` | `boolean` | false | slSegmentedControl | Whether the equal columns spread across the whole line. Left alone every column is the widest label’s |
|
|
54
54
|
| `disabled` | `boolean` | false | slSegmentedControl | Unstated rather than false, so the control defers to the field around it and to a form that disables it. Stated, it reaches every radio as the native attribute |
|
|
55
55
|
| `readOnly` | `boolean` | — | slSegmentedControl | Enforced by the family, because a radio ignores readonly: the change is refused on the click a pointer and Space share, and the control keeps its colors and its tab stops |
|
|
@@ -76,7 +76,7 @@ Excerpt — not a complete module
|
|
|
76
76
|
| --- | --- | --- |
|
|
77
77
|
| `size` | `sm`, `md`, `lg` | `md` |
|
|
78
78
|
| `orientation` | `horizontal`, `vertical` | `horizontal` |
|
|
79
|
-
| `condense` | `none`, `icons` | `none` |
|
|
79
|
+
| `condense` | `none`, `icons`, `vertical` | `none` |
|
|
80
80
|
| `variant` | `track`, `underline` | `track` |
|
|
81
81
|
|
|
82
82
|
## Rules
|
|
@@ -163,7 +163,7 @@ Excerpt — not a complete module
|
|
|
163
163
|
|
|
164
164
|
### Narrower than its words
|
|
165
165
|
|
|
166
|
-
Below the width its labels need, a control told to condense keeps its marks and hides its words — hidden, never removed, so every segment is announced the same at every width.
|
|
166
|
+
Below the width its labels need, a control told to condense keeps its marks and hides its words — hidden, never removed, so every segment is announced the same at every width. condense="vertical" keeps the words instead and stands the segments in a column, which suits a set without icons; the width it needs is measured, so it follows the language of the labels.
|
|
167
167
|
|
|
168
168
|
Excerpt — not a complete module
|
|
169
169
|
|
|
@@ -319,6 +319,13 @@
|
|
|
319
319
|
"appliesTo": "a[slSideNavigationLink]",
|
|
320
320
|
"description": "Stated on the row itself, it wins over the root’s value. Unstated, an aria-current the router wrote on the element (routerLinkActive with ariaCurrentWhenActive) is read instead"
|
|
321
321
|
},
|
|
322
|
+
{
|
|
323
|
+
"name": "current",
|
|
324
|
+
"type": "boolean",
|
|
325
|
+
"defaultValue": "—",
|
|
326
|
+
"appliesTo": "button[slSideNavigationTrigger]",
|
|
327
|
+
"description": "A trigger that is the whole row is a destination too: its item is current when the root’s value names it, and a stated current wins over the value. It writes aria-current=\"page\" on the trigger"
|
|
328
|
+
},
|
|
322
329
|
{
|
|
323
330
|
"name": "href",
|
|
324
331
|
"type": "string",
|
|
@@ -476,6 +483,7 @@
|
|
|
476
483
|
"--slotted-space-7",
|
|
477
484
|
"--slotted-surface-raised",
|
|
478
485
|
"--slotted-text",
|
|
486
|
+
"--slotted-text-box-edge",
|
|
479
487
|
"--slotted-text-muted",
|
|
480
488
|
"--slotted-tone-accent-solid",
|
|
481
489
|
"--slotted-tone-accent-surface",
|
package/docs/side-navigation.md
CHANGED
|
@@ -99,6 +99,7 @@ export class SideNavigationBasic {
|
|
|
99
99
|
| `value` | `string` | — | li[slSideNavigationItem] | The item’s identity: what value, expanded and flyout name it by. Reaches the DOM as data-value |
|
|
100
100
|
| `disabled` | `boolean` | false | li[slSideNavigationItem] | The row refuses the press and keeps its href, its name and its place in the tab order; the trigger takes the native attribute |
|
|
101
101
|
| `current` | `boolean` | — | a[slSideNavigationLink] | Stated on the row itself, it wins over the root’s value. Unstated, an aria-current the router wrote on the element (routerLinkActive with ariaCurrentWhenActive) is read instead |
|
|
102
|
+
| `current` | `boolean` | — | button[slSideNavigationTrigger] | A trigger that is the whole row is a destination too: its item is current when the root’s value names it, and a stated current wins over the value. It writes aria-current="page" on the trigger |
|
|
102
103
|
| `href` | `string` | — | a[slSideNavigationLink] | The destination, the element’s own; routerLink writes it. On button[slSideNavigationLink] the row is a command in the column, never current |
|
|
103
104
|
| `labelSize` | `number \| string` | 60% | li[slSideNavigationSkeleton] | How wide the label’s bar is drawn |
|
|
104
105
|
| `the element` | `nav, div, ul, li, a, button, span` | — | every part | Every directive goes on the consumer’s own element, so routerLink, routerLinkActive, native attributes and (click) live where they always do. A part with a template — link, trigger, skeleton — projects the consumer’s content |
|
|
@@ -139,7 +140,7 @@ export class SideNavigationBasic {
|
|
|
139
140
|
|
|
140
141
|
## Tokens
|
|
141
142
|
|
|
142
|
-
`--slotted-app-shell-row-font-size`, `--slotted-app-shell-row-gap`, `--slotted-app-shell-row-height`, `--slotted-app-shell-row-inset`, `--slotted-app-shell-row-line-height`, `--slotted-app-shell-row-mark`, `--slotted-app-shell-row-ring-inset`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-current-edge`, `--slotted-disabled-foreground`, `--slotted-duration-instant`, `--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-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-regular`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-line-height-xs`, `--slotted-radius-full`, `--slotted-radius-lg`, `--slotted-radius-md`, `--slotted-shadow-md`, `--slotted-side-navigation-active-background`, `--slotted-side-navigation-color`, `--slotted-side-navigation-current-background`, `--slotted-side-navigation-current-color`, `--slotted-side-navigation-current-description-color`, `--slotted-side-navigation-current-edge`, `--slotted-side-navigation-description-color`, `--slotted-side-navigation-description-gap`, `--slotted-side-navigation-dot-color`, `--slotted-side-navigation-dot-size`, `--slotted-side-navigation-flyout-border-color`, `--slotted-side-navigation-flyout-measure`, `--slotted-side-navigation-flyout-min-measure`, `--slotted-side-navigation-flyout-radius`, `--slotted-side-navigation-flyout-shadow`, `--slotted-side-navigation-flyout-surface`, `--slotted-side-navigation-guide-color`, `--slotted-side-navigation-hover-background`, `--slotted-side-navigation-hover-color`, `--slotted-side-navigation-indent`, `--slotted-side-navigation-indent-step`, `--slotted-side-navigation-radius`, `--slotted-side-navigation-row-gap`, `--slotted-side-navigation-section-color`, `--slotted-side-navigation-section-gap`, `--slotted-side-navigation-section-label-gap`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-7`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-popover`
|
|
143
|
+
`--slotted-app-shell-row-font-size`, `--slotted-app-shell-row-gap`, `--slotted-app-shell-row-height`, `--slotted-app-shell-row-inset`, `--slotted-app-shell-row-line-height`, `--slotted-app-shell-row-mark`, `--slotted-app-shell-row-ring-inset`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-current-edge`, `--slotted-disabled-foreground`, `--slotted-duration-instant`, `--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-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-regular`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-line-height-xs`, `--slotted-radius-full`, `--slotted-radius-lg`, `--slotted-radius-md`, `--slotted-shadow-md`, `--slotted-side-navigation-active-background`, `--slotted-side-navigation-color`, `--slotted-side-navigation-current-background`, `--slotted-side-navigation-current-color`, `--slotted-side-navigation-current-description-color`, `--slotted-side-navigation-current-edge`, `--slotted-side-navigation-description-color`, `--slotted-side-navigation-description-gap`, `--slotted-side-navigation-dot-color`, `--slotted-side-navigation-dot-size`, `--slotted-side-navigation-flyout-border-color`, `--slotted-side-navigation-flyout-measure`, `--slotted-side-navigation-flyout-min-measure`, `--slotted-side-navigation-flyout-radius`, `--slotted-side-navigation-flyout-shadow`, `--slotted-side-navigation-flyout-surface`, `--slotted-side-navigation-guide-color`, `--slotted-side-navigation-hover-background`, `--slotted-side-navigation-hover-color`, `--slotted-side-navigation-indent`, `--slotted-side-navigation-indent-step`, `--slotted-side-navigation-radius`, `--slotted-side-navigation-row-gap`, `--slotted-side-navigation-section-color`, `--slotted-side-navigation-section-gap`, `--slotted-side-navigation-section-label-gap`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-7`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-box-edge`, `--slotted-text-muted`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-popover`
|
|
143
144
|
|
|
144
145
|
## Examples
|
|
145
146
|
|
|
@@ -62,7 +62,47 @@ A new appearance is a new combination of tokens, never a new value.
|
|
|
62
62
|
A decision no group names is written as a literal beside a comment that says
|
|
63
63
|
why no token covers it (CP-05).
|
|
64
64
|
|
|
65
|
-
## 4.
|
|
65
|
+
## 4. A word-sized comparison
|
|
66
|
+
|
|
67
|
+
A comparison bar, a position strip and a split bar are elements of the
|
|
68
|
+
application's own: each depends on its screen — a scale shared with blocks
|
|
69
|
+
outside it, inks that carry meaning, labels placed on the mark. They start from
|
|
70
|
+
these primitives:
|
|
71
|
+
|
|
72
|
+
- `linearScale` from `@slotted/core/sparkline` takes a min, a max, the values
|
|
73
|
+
and whether zero stays inside the domain. Its at method returns a value's
|
|
74
|
+
share of the domain from 0 to 1; its zero is the share of zero, or null when
|
|
75
|
+
the domain does not cross it; its ticks method lists a tick at each multiple
|
|
76
|
+
of a step. Marks that state the same min and max draw the same axis.
|
|
77
|
+
- A share is written as a custom property of the mark and read as a
|
|
78
|
+
percentage of its track (`inset-inline-start: calc(var(--at) * 100%)`), so
|
|
79
|
+
the mark needs no measuring.
|
|
80
|
+
- A track takes `--slotted-mark-track-thickness` in
|
|
81
|
+
`--slotted-mark-track-color`. A dot takes `--slotted-mark-dot-size`, and the
|
|
82
|
+
current value's ring `--slotted-mark-ring-width` in
|
|
83
|
+
`--slotted-mark-ring-color`. A reference or zero line takes
|
|
84
|
+
`--slotted-border-strong`.
|
|
85
|
+
- The inks come from the `data` and `tone` groups; a neutral part takes
|
|
86
|
+
`--slotted-text-muted`. Under forced colors, a filled mark takes the
|
|
87
|
+
CanvasText system color and a dimmed one GrayText, with
|
|
88
|
+
`forced-color-adjust: none`.
|
|
89
|
+
- The mark is an image named by its numbers; a focusable part takes the focus
|
|
90
|
+
ring of section 6.
|
|
91
|
+
|
|
92
|
+
## 5. A gallery of illustrated choices
|
|
93
|
+
|
|
94
|
+
A choice told apart by pictures belongs to its screen's identity: its frame,
|
|
95
|
+
its chosen state and the motion of its illustration are the application's own.
|
|
96
|
+
`radio-group` draws a choice in words (CP-04). The gallery starts from:
|
|
97
|
+
|
|
98
|
+
- one native radio input per tile, visually hidden, all with one `name`, the
|
|
99
|
+
tile being its label. The platform gives one tab stop, the arrows across
|
|
100
|
+
every section that shares the name, and Enter that submits.
|
|
101
|
+
- `createRovingRadio` from `@slotted/core/focus` when the tile is a button that
|
|
102
|
+
carries the radio role, its `name` and its `value`: it gives the same
|
|
103
|
+
keyboard and reports each choice; the application writes the checked state.
|
|
104
|
+
|
|
105
|
+
## 6. Write it
|
|
66
106
|
|
|
67
107
|
1. Give each interactive part the native element that carries its role: a
|
|
68
108
|
button for an action, a link for a destination, an input for a value. Add
|
|
@@ -82,7 +122,7 @@ why no token covers it (CP-05).
|
|
|
82
122
|
step (OE-10).
|
|
83
123
|
6. Text that stands alone takes its size from the `typography` family (CP-02).
|
|
84
124
|
|
|
85
|
-
##
|
|
125
|
+
## 7. Done
|
|
86
126
|
|
|
87
127
|
1. Each `Check` of `../../guidelines/own-elements.md` passes.
|
|
88
128
|
2. The element's CSS holds no color or length literal without its comment.
|
package/docs/slider.json
CHANGED
|
@@ -203,6 +203,13 @@
|
|
|
203
203
|
"appliesTo": "slSlider",
|
|
204
204
|
"description": "The ticks beside the rail. A mark that carries a label reserves the room for it and becomes the thumb’s aria-valuetext at that value"
|
|
205
205
|
},
|
|
206
|
+
{
|
|
207
|
+
"name": "indicator",
|
|
208
|
+
"type": "boolean",
|
|
209
|
+
"defaultValue": "true",
|
|
210
|
+
"appliesTo": "slSlider",
|
|
211
|
+
"description": "Draws the filled span from the start to the thumb. false draws none, for a track whose ground is the information: a hue scale is --slotted-slider-track-background: linear-gradient(to right in hsl longer hue, red, red), which takes any background, and the thumb takes the current color through --slotted-slider-thumb-color"
|
|
212
|
+
},
|
|
206
213
|
{
|
|
207
214
|
"name": "format",
|
|
208
215
|
"type": "Intl.NumberFormatOptions",
|
|
@@ -403,6 +410,7 @@
|
|
|
403
410
|
"--slotted-slider-thumb-hover-background",
|
|
404
411
|
"--slotted-slider-thumb-shadow",
|
|
405
412
|
"--slotted-slider-thumb-size",
|
|
413
|
+
"--slotted-slider-track-background",
|
|
406
414
|
"--slotted-slider-track-border-color",
|
|
407
415
|
"--slotted-slider-track-color",
|
|
408
416
|
"--slotted-slider-track-size",
|
package/docs/slider.md
CHANGED
|
@@ -51,6 +51,7 @@ Excerpt — not a complete module
|
|
|
51
51
|
| `minStepsBetween` | `number` | 0 | slSlider | How many steps must stay between two neighbouring thumbs. It becomes each input’s own min and max, so the clamping is the platform’s and the announced range is right |
|
|
52
52
|
| `origin` | `'min' \| 'max' \| number` | min | slSlider | Where the filled portion starts. A point on the scale makes a balance control that fills outward from it |
|
|
53
53
|
| `marks` | `number[] \| { value, label? }[]` | — | slSlider | The ticks beside the rail. A mark that carries a label reserves the room for it and becomes the thumb’s aria-valuetext at that value |
|
|
54
|
+
| `indicator` | `boolean` | true | slSlider | Draws the filled span from the start to the thumb. false draws none, for a track whose ground is the information: a hue scale is --slotted-slider-track-background: linear-gradient(to right in hsl longer hue, red, red), which takes any background, and the thumb takes the current color through --slotted-slider-thumb-color |
|
|
54
55
|
| `format` | `Intl.NumberFormatOptions` | — | slSlider | How the value is written, in the read-out, in the bubble and in aria-valuetext. Currency and percent are formattings of one numeric type, not types of their own |
|
|
55
56
|
| `locale` | `string` | the language in force | slSlider | BCP 47. It decides the decimal separator, the grouping and the numbering system |
|
|
56
57
|
| `orientation` | `'horizontal' \| 'vertical'` | horizontal | slSlider, provideSliderDefaults | Which axis the scale runs along. A vertical scale puts its minimum at the bottom |
|
|
@@ -96,7 +97,7 @@ Excerpt — not a complete module
|
|
|
96
97
|
|
|
97
98
|
## Tokens
|
|
98
99
|
|
|
99
|
-
`--slotted-border-strong`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-shadow`, `--slotted-control-shadow-focus-geometry`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--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-line-height-sm`, `--slotted-line-height-xs`, `--slotted-radius-full`, `--slotted-radius-sm`, `--slotted-slider-bubble-background`, `--slotted-slider-bubble-color`, `--slotted-slider-color`, `--slotted-slider-disabled-border-color`, `--slotted-slider-disabled-indicator-color`, `--slotted-slider-disabled-thumb-color`, `--slotted-slider-disabled-track-color`, `--slotted-slider-indicator-color`, `--slotted-slider-invalid-edge-width`, `--slotted-slider-invalid-focus-ring-color`, `--slotted-slider-invalid-indicator-color`, `--slotted-slider-invalid-thumb-border-color`, `--slotted-slider-length`, `--slotted-slider-mark-color`, `--slotted-slider-mark-label-color`, `--slotted-slider-output-color`, `--slotted-slider-readonly-indicator-color`, `--slotted-slider-readonly-thumb-border-color`, `--slotted-slider-thumb-border-color`, `--slotted-slider-thumb-color`, `--slotted-slider-thumb-hover-background`, `--slotted-slider-thumb-shadow`, `--slotted-slider-thumb-size`, `--slotted-slider-track-border-color`, `--slotted-slider-track-color`, `--slotted-slider-track-size`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-surface`, `--slotted-surface-inverse`, `--slotted-surface-sunken`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-inverse`, `--slotted-text-muted`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-surface`, `--slotted-tone-danger-border`, `--slotted-tone-danger-solid`
|
|
100
|
+
`--slotted-border-strong`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-shadow`, `--slotted-control-shadow-focus-geometry`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--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-line-height-sm`, `--slotted-line-height-xs`, `--slotted-radius-full`, `--slotted-radius-sm`, `--slotted-slider-bubble-background`, `--slotted-slider-bubble-color`, `--slotted-slider-color`, `--slotted-slider-disabled-border-color`, `--slotted-slider-disabled-indicator-color`, `--slotted-slider-disabled-thumb-color`, `--slotted-slider-disabled-track-color`, `--slotted-slider-indicator-color`, `--slotted-slider-invalid-edge-width`, `--slotted-slider-invalid-focus-ring-color`, `--slotted-slider-invalid-indicator-color`, `--slotted-slider-invalid-thumb-border-color`, `--slotted-slider-length`, `--slotted-slider-mark-color`, `--slotted-slider-mark-label-color`, `--slotted-slider-output-color`, `--slotted-slider-readonly-indicator-color`, `--slotted-slider-readonly-thumb-border-color`, `--slotted-slider-thumb-border-color`, `--slotted-slider-thumb-color`, `--slotted-slider-thumb-hover-background`, `--slotted-slider-thumb-shadow`, `--slotted-slider-thumb-size`, `--slotted-slider-track-background`, `--slotted-slider-track-border-color`, `--slotted-slider-track-color`, `--slotted-slider-track-size`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-surface`, `--slotted-surface-inverse`, `--slotted-surface-sunken`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-inverse`, `--slotted-text-muted`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-surface`, `--slotted-tone-danger-border`, `--slotted-tone-danger-solid`
|
|
100
101
|
|
|
101
102
|
## Examples
|
|
102
103
|
|
package/docs/sparkline.json
CHANGED
package/docs/sparkline.md
CHANGED
package/docs/stat-card.json
CHANGED
|
@@ -276,6 +276,13 @@
|
|
|
276
276
|
"appliesTo": "slStatCardValue",
|
|
277
277
|
"description": "whole draws the symbol, the decimals and the suffix of a numeric value in the unit part, so the whole units carry the figure; the text is the formatter’s either way"
|
|
278
278
|
},
|
|
279
|
+
{
|
|
280
|
+
"name": "transition",
|
|
281
|
+
"type": "'none' | 'count'",
|
|
282
|
+
"defaultValue": "'none'",
|
|
283
|
+
"appliesTo": "slStatCardValue",
|
|
284
|
+
"description": "count moves a changed numeric value from the number it showed over --slotted-duration-long with the standard easing, each frame drawn by the formatter; the moving figure is hidden from assistive technology and the final one is said. The first render, a loading or empty card and a 1ms duration show the value as it is"
|
|
285
|
+
},
|
|
279
286
|
{
|
|
280
287
|
"name": "messages",
|
|
281
288
|
"type": "Partial<StatCardMessages>",
|
package/docs/stat-card.md
CHANGED
|
@@ -78,6 +78,7 @@ Excerpt — not a complete module
|
|
|
78
78
|
| `locale` | `string` | — | slStatCard | BCP 47, for every number the card formats; the language in force when absent |
|
|
79
79
|
| `formatOptions` | `Intl.NumberFormatOptions` | — | slStatCard, slStatCardValue, slStatCardDelta | How a number is written. On the root, the default for the value and the delta |
|
|
80
80
|
| `emphasis` | `'none' \| 'whole'` | 'none' | slStatCardValue | whole draws the symbol, the decimals and the suffix of a numeric value in the unit part, so the whole units carry the figure; the text is the formatter’s either way |
|
|
81
|
+
| `transition` | `'none' \| 'count'` | 'none' | slStatCardValue | count moves a changed numeric value from the number it showed over --slotted-duration-long with the standard easing, each frame drawn by the formatter; the moving figure is hidden from assistive technology and the final one is said. The first render, a loading or empty card and a 1ms duration show the value as it is |
|
|
81
82
|
| `messages` | `Partial<StatCardMessages>` | — | slStatCard | Words laid over the language in force, key by key: up, down and flat, heard before the delta; empty, shown in place of a missing value |
|
|
82
83
|
| `value` | `number \| string` | — | slStatCardValue, slStatCardDelta | A number the card formats, or text as written. On a delta, unset means the root’s delta |
|
|
83
84
|
| `format` | `'percent' \| 'decimal'` | percent | slStatCardDelta | percent reads the value as a fraction; decimal reads it as it is. The sign is shown except on nought |
|
package/docs/switch.json
CHANGED
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"labelPlacement": [
|
|
20
20
|
"end",
|
|
21
21
|
"start"
|
|
22
|
+
],
|
|
23
|
+
"variant": [
|
|
24
|
+
"plain",
|
|
25
|
+
"control"
|
|
22
26
|
]
|
|
23
27
|
},
|
|
24
28
|
"members": {
|
|
@@ -28,6 +32,7 @@
|
|
|
28
32
|
"size": "md",
|
|
29
33
|
"indicator": "mark",
|
|
30
34
|
"labelPlacement": "end",
|
|
35
|
+
"variant": "plain",
|
|
31
36
|
"loading": false
|
|
32
37
|
},
|
|
33
38
|
"capabilities": [
|
|
@@ -144,6 +149,13 @@
|
|
|
144
149
|
"appliesTo": "[slSwitch], provideSwitchDefaults",
|
|
145
150
|
"description": "Which side of the label the pill sits on. start is the settings row: the label takes the free width and the pill sits at the end of the row."
|
|
146
151
|
},
|
|
152
|
+
{
|
|
153
|
+
"name": "variant",
|
|
154
|
+
"type": "'plain' | 'control'",
|
|
155
|
+
"defaultValue": "plain",
|
|
156
|
+
"appliesTo": "[slSwitch], provideSwitchDefaults",
|
|
157
|
+
"description": "control stands the switch in a box one control tall, so in a row of fields aligned to their end the pill sits on the line of their controls. --slotted-switch-control-block-size names another step than the switch size"
|
|
158
|
+
},
|
|
147
159
|
{
|
|
148
160
|
"name": "loading",
|
|
149
161
|
"type": "boolean",
|
|
@@ -267,6 +279,9 @@
|
|
|
267
279
|
"--slotted-control-font-size-lg",
|
|
268
280
|
"--slotted-control-font-size-md",
|
|
269
281
|
"--slotted-control-font-size-sm",
|
|
282
|
+
"--slotted-control-height-lg",
|
|
283
|
+
"--slotted-control-height-md",
|
|
284
|
+
"--slotted-control-height-sm",
|
|
270
285
|
"--slotted-control-icon-size-lg",
|
|
271
286
|
"--slotted-control-icon-size-md",
|
|
272
287
|
"--slotted-control-icon-size-sm",
|
|
@@ -300,6 +315,7 @@
|
|
|
300
315
|
"--slotted-switch-checked-hover-background",
|
|
301
316
|
"--slotted-switch-checked-thumb-border-color",
|
|
302
317
|
"--slotted-switch-color",
|
|
318
|
+
"--slotted-switch-control-block-size",
|
|
303
319
|
"--slotted-switch-description-color",
|
|
304
320
|
"--slotted-switch-description-font-size",
|
|
305
321
|
"--slotted-switch-disabled-background",
|
package/docs/switch.md
CHANGED
|
@@ -56,6 +56,7 @@ export class SwitchBasic {}
|
|
|
56
56
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | [slSwitch], provideSwitchDefaults | The control step. A field around the switch decides it first, then provideSwitchDefaults. The pill, the thumb, the check and the label read the control scales, which the theme restates per density. |
|
|
57
57
|
| `indicator` | `'mark' \| 'none'` | mark | [slSwitch], provideSwitchDefaults | What the thumb carries. mark draws a check when the switch is on and nothing when it is off. none draws nothing, and is correct only where text beside the switch states the value. |
|
|
58
58
|
| `labelPlacement` | `'end' \| 'start'` | end | [slSwitch], provideSwitchDefaults | Which side of the label the pill sits on. start is the settings row: the label takes the free width and the pill sits at the end of the row. |
|
|
59
|
+
| `variant` | `'plain' \| 'control'` | plain | [slSwitch], provideSwitchDefaults | control stands the switch in a box one control tall, so in a row of fields aligned to their end the pill sits on the line of their controls. --slotted-switch-control-block-size names another step than the switch size |
|
|
59
60
|
| `loading` | `boolean` | false | [slSwitch] | The value is not settled yet. The switch refuses every press, keeps its size, sets aria-busy, and announces the pending label politely once the wait passes two seconds. |
|
|
60
61
|
| `messages` | `Partial<SwitchMessages>` | — | [slSwitch] | Words that replace the active language’s, key by key: loading is what a screen reader hears while the switch is pending. The words reach a live region, not the control’s name, so the name never changes with the state. |
|
|
61
62
|
| `disabled` | `boolean` | from the field, or false | [slSwitch] | Unset rather than false, so the switch follows the field around it. A stated value wins. It is the native attribute, as is a disabled form control, which takes the switch out of the tab order and out of form submission. |
|
|
@@ -84,6 +85,7 @@ export class SwitchBasic {}
|
|
|
84
85
|
| `size` | `sm`, `md`, `lg` | `md` |
|
|
85
86
|
| `indicator` | `mark`, `none` | `mark` |
|
|
86
87
|
| `labelPlacement` | `end`, `start` | `end` |
|
|
88
|
+
| `variant` | `plain`, `control` | `plain` |
|
|
87
89
|
|
|
88
90
|
## Rules
|
|
89
91
|
|
|
@@ -97,7 +99,7 @@ export class SwitchBasic {}
|
|
|
97
99
|
|
|
98
100
|
## Tokens
|
|
99
101
|
|
|
100
|
-
`--slotted-border-width-thin`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-label-gap-lg`, `--slotted-control-label-gap-md`, `--slotted-control-label-gap-sm`, `--slotted-control-shadow`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-loop`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-xs`, `--slotted-line-height-md`, `--slotted-line-height-xs`, `--slotted-radius-full`, `--slotted-space-1`, `--slotted-space-3`, `--slotted-surface`, `--slotted-switch-active-background`, `--slotted-switch-border-color`, `--slotted-switch-checked-active-background`, `--slotted-switch-checked-background`, `--slotted-switch-checked-border-color`, `--slotted-switch-checked-hover-background`, `--slotted-switch-checked-thumb-border-color`, `--slotted-switch-color`, `--slotted-switch-description-color`, `--slotted-switch-description-font-size`, `--slotted-switch-disabled-background`, `--slotted-switch-disabled-border-color`, `--slotted-switch-disabled-color`, `--slotted-switch-disabled-mark-color`, `--slotted-switch-disabled-thumb-background`, `--slotted-switch-hover-background`, `--slotted-switch-invalid-border-color`, `--slotted-switch-invalid-edge-width`, `--slotted-switch-invalid-focus-ring-color`, `--slotted-switch-line-height`, `--slotted-switch-mark-color`, `--slotted-switch-pending-color`, `--slotted-switch-radius`, `--slotted-switch-readonly-background`, `--slotted-switch-readonly-border-color`, `--slotted-switch-thumb-background`, `--slotted-switch-thumb-border-color`, `--slotted-switch-thumb-shadow`, `--slotted-switch-track-background`, `--slotted-switch-track-inline-size`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-on-solid`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-solid-active`, `--slotted-tone-accent-solid-hover`, `--slotted-tone-danger-border`, `--slotted-tone-secondary-solid`, `--slotted-tone-secondary-solid-active`, `--slotted-tone-secondary-solid-hover`
|
|
102
|
+
`--slotted-border-width-thin`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-label-gap-lg`, `--slotted-control-label-gap-md`, `--slotted-control-label-gap-sm`, `--slotted-control-shadow`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-loop`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-xs`, `--slotted-line-height-md`, `--slotted-line-height-xs`, `--slotted-radius-full`, `--slotted-space-1`, `--slotted-space-3`, `--slotted-surface`, `--slotted-switch-active-background`, `--slotted-switch-border-color`, `--slotted-switch-checked-active-background`, `--slotted-switch-checked-background`, `--slotted-switch-checked-border-color`, `--slotted-switch-checked-hover-background`, `--slotted-switch-checked-thumb-border-color`, `--slotted-switch-color`, `--slotted-switch-control-block-size`, `--slotted-switch-description-color`, `--slotted-switch-description-font-size`, `--slotted-switch-disabled-background`, `--slotted-switch-disabled-border-color`, `--slotted-switch-disabled-color`, `--slotted-switch-disabled-mark-color`, `--slotted-switch-disabled-thumb-background`, `--slotted-switch-hover-background`, `--slotted-switch-invalid-border-color`, `--slotted-switch-invalid-edge-width`, `--slotted-switch-invalid-focus-ring-color`, `--slotted-switch-line-height`, `--slotted-switch-mark-color`, `--slotted-switch-pending-color`, `--slotted-switch-radius`, `--slotted-switch-readonly-background`, `--slotted-switch-readonly-border-color`, `--slotted-switch-thumb-background`, `--slotted-switch-thumb-border-color`, `--slotted-switch-thumb-shadow`, `--slotted-switch-track-background`, `--slotted-switch-track-inline-size`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-on-solid`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-solid-active`, `--slotted-tone-accent-solid-hover`, `--slotted-tone-danger-border`, `--slotted-tone-secondary-solid`, `--slotted-tone-secondary-solid-active`, `--slotted-tone-secondary-solid-hover`
|
|
101
103
|
|
|
102
104
|
## Examples
|
|
103
105
|
|