@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
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
{
|
|
2
|
+
"family": "floating-panel",
|
|
3
|
+
"ui": "floating-panel",
|
|
4
|
+
"binding": "angular",
|
|
5
|
+
"catalog": {
|
|
6
|
+
"group": "Overlays",
|
|
7
|
+
"summary": "A non-modal tool panel the reader drags over the page."
|
|
8
|
+
},
|
|
9
|
+
"axes": {},
|
|
10
|
+
"members": {
|
|
11
|
+
"floatingPanel": {
|
|
12
|
+
"nativeElement": "section",
|
|
13
|
+
"defaults": {
|
|
14
|
+
"defaultPlace": "bottom-end"
|
|
15
|
+
},
|
|
16
|
+
"capabilities": [
|
|
17
|
+
"placement",
|
|
18
|
+
"wiring"
|
|
19
|
+
],
|
|
20
|
+
"states": [
|
|
21
|
+
"default",
|
|
22
|
+
"dragging"
|
|
23
|
+
],
|
|
24
|
+
"parts": [
|
|
25
|
+
"root",
|
|
26
|
+
"handle",
|
|
27
|
+
"grip",
|
|
28
|
+
"title",
|
|
29
|
+
"close",
|
|
30
|
+
"body"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"docs": {
|
|
35
|
+
"floatingPanel": {
|
|
36
|
+
"imports": {
|
|
37
|
+
"source": "import {\n SlFloatingPanel,\n SlFloatingPanelBody,\n SlFloatingPanelClose,\n SlFloatingPanelHandle,\n SlFloatingPanelTitle,\n} from '@slotted/angular/floating-panel';",
|
|
38
|
+
"selector": "[slFloatingPanel]",
|
|
39
|
+
"exportAs": "slFloatingPanel"
|
|
40
|
+
},
|
|
41
|
+
"anatomy": [
|
|
42
|
+
{
|
|
43
|
+
"part": "root",
|
|
44
|
+
"element": "section",
|
|
45
|
+
"required": true,
|
|
46
|
+
"purpose": "role=\"region\", named by the title or label: a tool over the page that holds nobody, with no scrim and nothing made inert. Its place is clamped by the viewport and its own size."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"part": "handle",
|
|
50
|
+
"element": "div",
|
|
51
|
+
"required": true,
|
|
52
|
+
"purpose": "The bar the panel is moved by: a press that moves drags it, with the pointer captured and no scroll of the page."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"part": "grip",
|
|
56
|
+
"element": "button",
|
|
57
|
+
"required": true,
|
|
58
|
+
"purpose": "The handle’s focusable start, named Move in the language in force: an arrow key moves the panel one step, a larger one with Shift."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"part": "title",
|
|
62
|
+
"element": "h2",
|
|
63
|
+
"required": false,
|
|
64
|
+
"purpose": "The panel’s name, one line, which names the region when no label does."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"part": "close",
|
|
68
|
+
"element": "button",
|
|
69
|
+
"required": false,
|
|
70
|
+
"purpose": "Closes the panel; focus returns to the element that held it before it opened."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"part": "body",
|
|
74
|
+
"element": "div",
|
|
75
|
+
"required": true,
|
|
76
|
+
"purpose": "What the tool holds. It scrolls when the panel is held shorter than it."
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"api": [
|
|
80
|
+
{
|
|
81
|
+
"name": "open",
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"defaultValue": "—",
|
|
84
|
+
"appliesTo": "slFloatingPanel",
|
|
85
|
+
"description": "Whether the panel is drawn"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "openChange",
|
|
89
|
+
"type": "output<boolean>",
|
|
90
|
+
"defaultValue": "—",
|
|
91
|
+
"appliesTo": "slFloatingPanel",
|
|
92
|
+
"description": "Asked with false on Escape inside the panel and on its close control"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "defaultPlace",
|
|
96
|
+
"type": "'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'",
|
|
97
|
+
"defaultValue": "bottom-end",
|
|
98
|
+
"appliesTo": "slFloatingPanel",
|
|
99
|
+
"description": "The corner the panel first opens in, in the reading direction"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "place",
|
|
103
|
+
"type": "{ x: number; y: number }",
|
|
104
|
+
"defaultValue": "—",
|
|
105
|
+
"appliesTo": "slFloatingPanel",
|
|
106
|
+
"description": "A controlled place, the top-left corner in viewport pixels, drawn inside the viewport"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "placeChange",
|
|
110
|
+
"type": "output<{ x: number; y: number }>",
|
|
111
|
+
"defaultValue": "—",
|
|
112
|
+
"appliesTo": "slFloatingPanel",
|
|
113
|
+
"description": "Fired at the end of a move, by pointer or by key, for the application to store"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "label",
|
|
117
|
+
"type": "string",
|
|
118
|
+
"defaultValue": "—",
|
|
119
|
+
"appliesTo": "slFloatingPanel",
|
|
120
|
+
"description": "The region’s name when no slFloatingPanelTitle names it"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "messages",
|
|
124
|
+
"type": "PartialMessages<FloatingPanelMessages>",
|
|
125
|
+
"defaultValue": "—",
|
|
126
|
+
"appliesTo": "slFloatingPanel",
|
|
127
|
+
"description": "Words laid over the catalog of the language in force: close, move"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "native props",
|
|
131
|
+
"type": "section, div, h2, button attributes",
|
|
132
|
+
"defaultValue": "—",
|
|
133
|
+
"appliesTo": "every part",
|
|
134
|
+
"description": "Reach the element each part renders"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"composition": [],
|
|
138
|
+
"events": [],
|
|
139
|
+
"accessibility": [
|
|
140
|
+
"The root is a region named by slFloatingPanelTitle or label, never a dialog: nothing on the page is inert, no scrim takes a press, and focus is not trapped, so the panel is a tool beside the work rather than a step of it.",
|
|
141
|
+
"The grip is a button named Move in the language in force; an arrow key moves the panel one step and Shift a larger one, so the panel can be put out of the way without a pointer.",
|
|
142
|
+
"Escape inside the panel and the close control ask openChange(false), and focus returns to the element that held it before the panel opened.",
|
|
143
|
+
"The place is clamped by the viewport and the panel’s own size in the stylesheet, so a narrowed window or a stored place never leaves part of the tool out of reach."
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"tokens": [
|
|
148
|
+
"--slotted-border-strong",
|
|
149
|
+
"--slotted-border-subtle",
|
|
150
|
+
"--slotted-border-width-thin",
|
|
151
|
+
"--slotted-control-inner-size-md",
|
|
152
|
+
"--slotted-floating-panel-backdrop-filter",
|
|
153
|
+
"--slotted-floating-panel-border-color",
|
|
154
|
+
"--slotted-floating-panel-radius",
|
|
155
|
+
"--slotted-floating-panel-rule-color",
|
|
156
|
+
"--slotted-floating-panel-shadow",
|
|
157
|
+
"--slotted-floating-panel-surface",
|
|
158
|
+
"--slotted-focus-ring-color",
|
|
159
|
+
"--slotted-focus-ring-offset",
|
|
160
|
+
"--slotted-focus-ring-width",
|
|
161
|
+
"--slotted-font-family-heading",
|
|
162
|
+
"--slotted-font-family-sans",
|
|
163
|
+
"--slotted-font-size-sm",
|
|
164
|
+
"--slotted-font-weight-semibold",
|
|
165
|
+
"--slotted-radius-lg",
|
|
166
|
+
"--slotted-radius-sm",
|
|
167
|
+
"--slotted-shadow-lg",
|
|
168
|
+
"--slotted-space-2",
|
|
169
|
+
"--slotted-space-3",
|
|
170
|
+
"--slotted-space-5",
|
|
171
|
+
"--slotted-surface-raised",
|
|
172
|
+
"--slotted-text",
|
|
173
|
+
"--slotted-text-muted",
|
|
174
|
+
"--slotted-tone-secondary-subtle-hover",
|
|
175
|
+
"--slotted-z-index-popover"
|
|
176
|
+
],
|
|
177
|
+
"examples": [
|
|
178
|
+
{
|
|
179
|
+
"id": "playground",
|
|
180
|
+
"title": "Playground",
|
|
181
|
+
"note": "A calculator left open over a page that stays usable: drag the handle, press a button of the page under it, and close the panel with Escape.",
|
|
182
|
+
"language": "html",
|
|
183
|
+
"source": "<section slFloatingPanel [open]=\"open()\" (openChange)=\"open.set($event)\">\n <div slFloatingPanelHandle>\n <h2 slFloatingPanelTitle>Calculator</h2>\n <button slFloatingPanelClose></button>\n </div>\n <div slFloatingPanelBody>…</div>\n</section>\n",
|
|
184
|
+
"verdict": "excerpt"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"id": "keyboard",
|
|
188
|
+
"title": "Moved by the keyboard, and stored where it was left",
|
|
189
|
+
"note": "The grip takes focus; an arrow key moves the panel eight pixels, thirty-two with Shift. placeChange reports the end of every move, so the application stores the place and hands it back as place.",
|
|
190
|
+
"language": "html",
|
|
191
|
+
"source": "<section\n slFloatingPanel\n [open]=\"open()\"\n [place]=\"place()\"\n (openChange)=\"open.set($event)\"\n (placeChange)=\"place.set($event)\"\n>\n …\n</section>\n",
|
|
192
|
+
"verdict": "excerpt"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"id": "accessibility",
|
|
196
|
+
"title": "What a reader meets",
|
|
197
|
+
"note": "A region named by its title, not a dialog: the shortcuts an application holds back while a dialog is open keep working, and focus is never trapped. Escape inside it closes it and returns focus to where it was.",
|
|
198
|
+
"language": "html",
|
|
199
|
+
"source": "<section slFloatingPanel label=\"Notes\" [open]=\"open()\" (openChange)=\"open.set($event)\">…</section>\n",
|
|
200
|
+
"verdict": "excerpt"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<!-- index: ./index.md -->
|
|
2
|
+
# floating-panel
|
|
3
|
+
|
|
4
|
+
`data-ui="floating-panel"` · A non-modal tool panel the reader drags over the page.
|
|
5
|
+
|
|
6
|
+
## Import
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import {
|
|
10
|
+
SlFloatingPanel,
|
|
11
|
+
SlFloatingPanelBody,
|
|
12
|
+
SlFloatingPanelClose,
|
|
13
|
+
SlFloatingPanelHandle,
|
|
14
|
+
SlFloatingPanelTitle,
|
|
15
|
+
} from '@slotted/angular/floating-panel';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Selector: `[slFloatingPanel]` · exportAs: `slFloatingPanel`
|
|
19
|
+
|
|
20
|
+
## Minimal example
|
|
21
|
+
|
|
22
|
+
Excerpt — not a complete module
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<section slFloatingPanel [open]="open()" (openChange)="open.set($event)">
|
|
26
|
+
<div slFloatingPanelHandle>
|
|
27
|
+
<h2 slFloatingPanelTitle>Calculator</h2>
|
|
28
|
+
<button slFloatingPanelClose></button>
|
|
29
|
+
</div>
|
|
30
|
+
<div slFloatingPanelBody>…</div>
|
|
31
|
+
</section>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Anatomy
|
|
35
|
+
|
|
36
|
+
| Part | Element | Required |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `root` | section | yes |
|
|
39
|
+
| `handle` | div | yes |
|
|
40
|
+
| `grip` | button | yes |
|
|
41
|
+
| `title` | h2 | no |
|
|
42
|
+
| `close` | button | no |
|
|
43
|
+
| `body` | div | yes |
|
|
44
|
+
|
|
45
|
+
## Props
|
|
46
|
+
|
|
47
|
+
| Name | Type | Default | Applies to | Description |
|
|
48
|
+
| --- | --- | --- | --- | --- |
|
|
49
|
+
| `open` | `boolean` | — | slFloatingPanel | Whether the panel is drawn |
|
|
50
|
+
| `openChange` | `output<boolean>` | — | slFloatingPanel | Asked with false on Escape inside the panel and on its close control |
|
|
51
|
+
| `defaultPlace` | `'top-start' \| 'top-end' \| 'bottom-start' \| 'bottom-end'` | bottom-end | slFloatingPanel | The corner the panel first opens in, in the reading direction |
|
|
52
|
+
| `place` | `{ x: number; y: number }` | — | slFloatingPanel | A controlled place, the top-left corner in viewport pixels, drawn inside the viewport |
|
|
53
|
+
| `placeChange` | `output<{ x: number; y: number }>` | — | slFloatingPanel | Fired at the end of a move, by pointer or by key, for the application to store |
|
|
54
|
+
| `label` | `string` | — | slFloatingPanel | The region’s name when no slFloatingPanelTitle names it |
|
|
55
|
+
| `messages` | `PartialMessages<FloatingPanelMessages>` | — | slFloatingPanel | Words laid over the catalog of the language in force: close, move |
|
|
56
|
+
| `native props` | `section, div, h2, button attributes` | — | every part | Reach the element each part renders |
|
|
57
|
+
|
|
58
|
+
## Rules
|
|
59
|
+
|
|
60
|
+
- The root is a region named by slFloatingPanelTitle or label, never a dialog: nothing on the page is inert, no scrim takes a press, and focus is not trapped, so the panel is a tool beside the work rather than a step of it.
|
|
61
|
+
- The grip is a button named Move in the language in force; an arrow key moves the panel one step and Shift a larger one, so the panel can be put out of the way without a pointer.
|
|
62
|
+
- Escape inside the panel and the close control ask openChange(false), and focus returns to the element that held it before the panel opened.
|
|
63
|
+
- The place is clamped by the viewport and the panel’s own size in the stylesheet, so a narrowed window or a stored place never leaves part of the tool out of reach.
|
|
64
|
+
|
|
65
|
+
## Tokens
|
|
66
|
+
|
|
67
|
+
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-inner-size-md`, `--slotted-floating-panel-backdrop-filter`, `--slotted-floating-panel-border-color`, `--slotted-floating-panel-radius`, `--slotted-floating-panel-rule-color`, `--slotted-floating-panel-shadow`, `--slotted-floating-panel-surface`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-sm`, `--slotted-font-weight-semibold`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-shadow-lg`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-5`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-popover`
|
|
68
|
+
|
|
69
|
+
## Examples
|
|
70
|
+
|
|
71
|
+
### Moved by the keyboard, and stored where it was left
|
|
72
|
+
|
|
73
|
+
The grip takes focus; an arrow key moves the panel eight pixels, thirty-two with Shift. placeChange reports the end of every move, so the application stores the place and hands it back as place.
|
|
74
|
+
|
|
75
|
+
Excerpt — not a complete module
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<section
|
|
79
|
+
slFloatingPanel
|
|
80
|
+
[open]="open()"
|
|
81
|
+
[place]="place()"
|
|
82
|
+
(openChange)="open.set($event)"
|
|
83
|
+
(placeChange)="place.set($event)"
|
|
84
|
+
>
|
|
85
|
+
…
|
|
86
|
+
</section>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### What a reader meets
|
|
90
|
+
|
|
91
|
+
A region named by its title, not a dialog: the shortcuts an application holds back while a dialog is open keep working, and focus is never trapped. Escape inside it closes it and returns focus to where it was.
|
|
92
|
+
|
|
93
|
+
Excerpt — not a complete module
|
|
94
|
+
|
|
95
|
+
```html
|
|
96
|
+
<section slFloatingPanel label="Notes" [open]="open()" (openChange)="open.set($event)">…</section>
|
|
97
|
+
```
|
package/docs/guidelines/index.md
CHANGED
|
@@ -107,6 +107,8 @@ Every active rule, one line each. Load this first; load a topic file when the ta
|
|
|
107
107
|
| OE-08 | SHOULD | The element's rules stand in a layer of the application ordered after the library's, and never select or set `data-ui` or `data-part`. | `own-elements.md` |
|
|
108
108
|
| OE-09 | SHOULD | The element reflows by a container query on a `container-name` of its own; a change that follows the page uses the size classes, at 600 and 1024 pixels. | `own-elements.md` |
|
|
109
109
|
| OE-10 | SHOULD | A surface above another takes `--slotted-surface-raised` with one step of the `shadow` group, and a layer that floats over the page takes its stacking order from the `z-index` group. | `own-elements.md` |
|
|
110
|
+
| OE-11 | SHOULD | The mark places every value, tick and zero line by one `linearScale` of `@slotted/core/sparkline`, and marks read against each other state the same min and max. | `own-elements.md` |
|
|
111
|
+
| OE-12 | MUST | The gallery is one tab stop that the arrows move through, across every section, and Enter submits: native radio inputs that share a name, or `createRovingRadio` of `@slotted/core/focus`. | `own-elements.md` |
|
|
110
112
|
| PM-01 | MUST | The column, the figure and the section that would carry the value are not built for that reader; nothing is drawn for the value, and nothing is hidden in a place the reader can bring back. | `reading-permissions.md` |
|
|
111
113
|
| PM-02 | SHOULD | One statement names the permission the value needs and the roles that hold it; two missing permissions are one statement, not two. | `reading-permissions.md` |
|
|
112
114
|
| RP-01 | SHOULD | The title row holds the record's visual, its name as the heading, its lifecycle state and its health as two `tag` marks at the small size, and one subheading line with the identifier, the owner and the place; the way back to the list is the header's `back` part. | `record-pages.md` |
|
|
@@ -113,3 +113,23 @@ Why: The theme pairs each elevation with a ground per scheme and drops shadows u
|
|
|
113
113
|
Do: A day's detail card floats with `--slotted-surface-raised`, `--slotted-shadow-md` and `--slotted-z-index-popover`.
|
|
114
114
|
Don't: A shadow written as a literal and a stacking order of 9999.
|
|
115
115
|
Check: Every shadow and every stacking order of the element's own CSS reads a token of these two groups.
|
|
116
|
+
|
|
117
|
+
### OE-11 · Comparison marks share a scale
|
|
118
|
+
|
|
119
|
+
Level: SHOULD
|
|
120
|
+
Applies to: a comparison bar, a position strip or a split bar of the application's own
|
|
121
|
+
Rule: The mark places every value, tick and zero line by one `linearScale` of `@slotted/core/sparkline`, and marks read against each other state the same min and max.
|
|
122
|
+
Why: A mark sized by its own data draws its own axis, and two marks with two axes cannot be compared.
|
|
123
|
+
Do: Two bars and the tick row under them take one scale, the track reads `--slotted-mark-track-thickness` and `--slotted-mark-track-color`, the dot reads `--slotted-mark-dot-size`, and the benchmark is drawn in `--slotted-text-muted`.
|
|
124
|
+
Don't: Each row computes its width from the largest value of that row, and the tick row under them computes another.
|
|
125
|
+
Check: Set one value to zero and one to an extreme of the domain: the first ends on the zero tick and the second on the last tick, to the pixel.
|
|
126
|
+
|
|
127
|
+
### OE-12 · A picture gallery is one radio group
|
|
128
|
+
|
|
129
|
+
Level: MUST
|
|
130
|
+
Applies to: a gallery of illustrated choices of the application's own, where one is chosen
|
|
131
|
+
Rule: The gallery is one tab stop that the arrows move through, across every section, and Enter submits: native radio inputs that share a name, or `createRovingRadio` of `@slotted/core/focus`.
|
|
132
|
+
Why: A tile that is a plain button puts every choice in the tab order and announces no set, so the reader cannot tell which is chosen or how many there are.
|
|
133
|
+
Do: Two sections of tiles share one name; the tile that is hovered or chosen moves its own illustration.
|
|
134
|
+
Don't: A grid of toggle buttons, each a tab stop, with the chosen one told by its border alone.
|
|
135
|
+
Check: Tab into the gallery and out of it in two presses; from the last tile of one section an arrow reaches the first tile of the next, and Enter submits the form.
|
package/docs/index.md
CHANGED
|
@@ -74,9 +74,10 @@ Each family is documented in `./<family>.md`.
|
|
|
74
74
|
- markdown: Renders Markdown with an element allowlist.
|
|
75
75
|
- message: Chat message with author, bubble and actions.
|
|
76
76
|
- message-scroller: Scrolling log of messages that follows new ones.
|
|
77
|
+
- meter: A static value within a known range, drawn as a length.
|
|
77
78
|
- prose: Styles long-form HTML text.
|
|
78
79
|
- saved-views: Named, saved sets of filters for a list.
|
|
79
|
-
- sparkline:
|
|
80
|
+
- sparkline: Word-sized graphics: a trend in a line or bars.
|
|
80
81
|
- stat-card: Key figure with label, change and trend.
|
|
81
82
|
- status-indicator: Colored mark and label for a status.
|
|
82
83
|
- table: Semantic table with sorting, filters and selection.
|
|
@@ -114,6 +115,7 @@ Each family is documented in `./<family>.md`.
|
|
|
114
115
|
- context-menu: Menu opened by right click on a target.
|
|
115
116
|
- dialog: Modal dialog and alert dialog.
|
|
116
117
|
- drawer: Panel that slides in from an edge.
|
|
118
|
+
- floating-panel: A non-modal tool panel the reader drags over the page.
|
|
117
119
|
- hover-card: Preview card that opens on hover or focus.
|
|
118
120
|
- media-viewer: Full-screen viewer of files: fitted, zoomed, stepped.
|
|
119
121
|
- menu: List of actions opened from a trigger.
|
package/docs/inline-message.json
CHANGED
package/docs/inline-message.md
CHANGED
|
@@ -74,7 +74,7 @@ Excerpt — not a complete module
|
|
|
74
74
|
|
|
75
75
|
## Tokens
|
|
76
76
|
|
|
77
|
-
`--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-disabled-foreground`, `--slotted-duration-loop-fast`, `--slotted-inline-message-actions-gap`, `--slotted-inline-message-actions-offset`, `--slotted-inline-message-column-gap`, `--slotted-inline-message-font-family`, `--slotted-inline-message-line-height`, `--slotted-line-height-md`, `--slotted-radius-full`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-info-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`
|
|
77
|
+
`--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-disabled-foreground`, `--slotted-duration-loop-fast`, `--slotted-inline-message-actions-gap`, `--slotted-inline-message-actions-offset`, `--slotted-inline-message-column-gap`, `--slotted-inline-message-font-family`, `--slotted-inline-message-line-height`, `--slotted-line-height-md`, `--slotted-radius-full`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-text-box-edge`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-info-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`
|
|
78
78
|
|
|
79
79
|
## Examples
|
|
80
80
|
|
package/docs/kbd.json
CHANGED
package/docs/kbd.md
CHANGED
|
@@ -73,7 +73,7 @@ Excerpt — not a complete module
|
|
|
73
73
|
|
|
74
74
|
## Tokens
|
|
75
75
|
|
|
76
|
-
`--slotted-border-strong`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-border-color`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-inner-size`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-font-family-sans`, `--slotted-font-weight-medium`, `--slotted-kbd-base-width`, `--slotted-kbd-border-color`, `--slotted-kbd-border-width`, `--slotted-kbd-color`, `--slotted-kbd-font-family`, `--slotted-kbd-font-weight`, `--slotted-kbd-radius`, `--slotted-kbd-surface`, `--slotted-kbd-symbol-font-family`, `--slotted-radius-lg`, `--slotted-radius-md`, `--slotted-radius-sm`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-border`, `--slotted-tone-secondary-surface`, `--slotted-tone-secondary-text`
|
|
76
|
+
`--slotted-border-strong`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-border-color`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-inner-size`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-font-family-sans`, `--slotted-font-weight-medium`, `--slotted-kbd-base-width`, `--slotted-kbd-border-color`, `--slotted-kbd-border-width`, `--slotted-kbd-color`, `--slotted-kbd-font-family`, `--slotted-kbd-font-weight`, `--slotted-kbd-radius`, `--slotted-kbd-surface`, `--slotted-kbd-symbol-font-family`, `--slotted-radius-lg`, `--slotted-radius-md`, `--slotted-radius-sm`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-box-edge`, `--slotted-text-muted`, `--slotted-tone-secondary-border`, `--slotted-tone-secondary-surface`, `--slotted-tone-secondary-text`
|
|
77
77
|
|
|
78
78
|
## Examples
|
|
79
79
|
|
package/docs/link.json
CHANGED
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
],
|
|
164
164
|
"events": [],
|
|
165
165
|
"accessibility": [
|
|
166
|
-
"The directive sits on the consumer’s own anchor, so the link role, Enter, the context menu and every modified click come from the platform — and routerLink composes on the same element. Space does not activate a link, and nothing here makes it.",
|
|
166
|
+
"The directive sits on the consumer’s own anchor, so the link role, Enter, the context menu and every modified click come from the platform — and routerLink composes on the same element. Space does not activate a link, and nothing here makes it. An action inside a line that runs a handler and goes nowhere is a button slButton with inline, not an anchor without an href.",
|
|
167
167
|
"underline=\"always\" is the default because color alone does not distinguish a link: the accent text color clears 4.5:1 against the surface and not 3:1 against the body text beside it.",
|
|
168
168
|
"variant=\"neutral\" takes the color of the text around it, so it belongs where nothing on the line could be mistaken for it — a cell, a title, a row — and never inside a sentence.",
|
|
169
169
|
"Whatever the underline axis says, the underline returns under forced-colors, where the palette flattens the color contrast a bare link relies on.",
|
package/docs/link.md
CHANGED
|
@@ -53,7 +53,7 @@ Excerpt — not a complete module
|
|
|
53
53
|
|
|
54
54
|
## Rules
|
|
55
55
|
|
|
56
|
-
- The directive sits on the consumer’s own anchor, so the link role, Enter, the context menu and every modified click come from the platform — and routerLink composes on the same element. Space does not activate a link, and nothing here makes it.
|
|
56
|
+
- The directive sits on the consumer’s own anchor, so the link role, Enter, the context menu and every modified click come from the platform — and routerLink composes on the same element. Space does not activate a link, and nothing here makes it. An action inside a line that runs a handler and goes nowhere is a button slButton with inline, not an anchor without an href.
|
|
57
57
|
- underline="always" is the default because color alone does not distinguish a link: the accent text color clears 4.5:1 against the surface and not 3:1 against the body text beside it.
|
|
58
58
|
- variant="neutral" takes the color of the text around it, so it belongs where nothing on the line could be mistaken for it — a cell, a title, a row — and never inside a sentence.
|
|
59
59
|
- Whatever the underline axis says, the underline returns under forced-colors, where the palette flattens the color contrast a bare link relies on.
|
package/docs/list-item.json
CHANGED
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
"align": [
|
|
24
24
|
"center",
|
|
25
25
|
"start"
|
|
26
|
+
],
|
|
27
|
+
"endPlacement": [
|
|
28
|
+
"auto",
|
|
29
|
+
"beside"
|
|
26
30
|
]
|
|
27
31
|
},
|
|
28
32
|
"members": {
|
|
@@ -32,6 +36,7 @@
|
|
|
32
36
|
"tone": "secondary",
|
|
33
37
|
"size": "md",
|
|
34
38
|
"align": "center",
|
|
39
|
+
"endPlacement": "auto",
|
|
35
40
|
"inset": false,
|
|
36
41
|
"truncate": false,
|
|
37
42
|
"selected": false,
|
|
@@ -59,6 +64,7 @@
|
|
|
59
64
|
"parts": [
|
|
60
65
|
"root",
|
|
61
66
|
"marker",
|
|
67
|
+
"select",
|
|
62
68
|
"content",
|
|
63
69
|
"start",
|
|
64
70
|
"body",
|
|
@@ -72,9 +78,9 @@
|
|
|
72
78
|
"docs": {
|
|
73
79
|
"listItem": {
|
|
74
80
|
"imports": {
|
|
75
|
-
"source": "import { SlListItem, SlListItemActions, SlListItemBody, SlListItemContent, SlListItemDescription, SlListItemEnd, SlListItemLabel, SlListItemStart } from '@slotted/angular/list-item';",
|
|
76
|
-
"selector": "li[slListItem], [slListItemContent], [slListItemStart], [slListItemBody], [slListItemLabel], [slListItemDescription], [slListItemEnd], [slListItemActions]",
|
|
77
|
-
"exportAs": "slListItem, slListItemContent, slListItemStart, slListItemBody, slListItemLabel, slListItemDescription, slListItemEnd, slListItemActions"
|
|
81
|
+
"source": "import { SlListItem, SlListItemActions, SlListItemBody, SlListItemContent, SlListItemDescription, SlListItemEnd, SlListItemLabel, SlListItemSelect, SlListItemStart } from '@slotted/angular/list-item';",
|
|
82
|
+
"selector": "li[slListItem], [slListItemContent], [slListItemStart], [slListItemBody], [slListItemLabel], [slListItemDescription], [slListItemEnd], [slListItemActions], [slListItemSelect]",
|
|
83
|
+
"exportAs": "slListItem, slListItemContent, slListItemStart, slListItemBody, slListItemLabel, slListItemDescription, slListItemEnd, slListItemActions, slListItemSelect"
|
|
78
84
|
},
|
|
79
85
|
"anatomy": [
|
|
80
86
|
{
|
|
@@ -90,6 +96,13 @@
|
|
|
90
96
|
"required": false,
|
|
91
97
|
"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."
|
|
92
98
|
},
|
|
99
|
+
{
|
|
100
|
+
"part": "select",
|
|
101
|
+
"parent": "root",
|
|
102
|
+
"element": "div",
|
|
103
|
+
"required": false,
|
|
104
|
+
"purpose": "A leading control, a sibling before the box: the checkbox of a row whose box is a link or a button, which may not hold interactive content. It takes the leading column's chooser square on the title's first line."
|
|
105
|
+
},
|
|
93
106
|
{
|
|
94
107
|
"part": "content",
|
|
95
108
|
"parent": "root",
|
|
@@ -162,6 +175,13 @@
|
|
|
162
175
|
"appliesTo": "slListItem",
|
|
163
176
|
"description": "Where the leading visual and the metadata sit against a row of more than one line"
|
|
164
177
|
},
|
|
178
|
+
{
|
|
179
|
+
"name": "endPlacement",
|
|
180
|
+
"type": "'auto' | 'beside'",
|
|
181
|
+
"defaultValue": "auto",
|
|
182
|
+
"appliesTo": "slListItem",
|
|
183
|
+
"description": "Where the end goes in a row narrower than 22rem: under the title, or on its line for a figure that belongs beside its name"
|
|
184
|
+
},
|
|
165
185
|
{
|
|
166
186
|
"name": "inset",
|
|
167
187
|
"type": "boolean",
|
|
@@ -174,7 +194,7 @@
|
|
|
174
194
|
"type": "boolean",
|
|
175
195
|
"defaultValue": "false",
|
|
176
196
|
"appliesTo": "slListItem",
|
|
177
|
-
"description": "Clips the title and the lines under it to one line each. The whole string stays in the document"
|
|
197
|
+
"description": "Clips the title and the lines under it to one line each, and keeps the body 10rem wide (--slotted-list-item-body-min-inline-size) before the end and the actions, so the row has one height per size. The whole string stays in the document"
|
|
178
198
|
},
|
|
179
199
|
{
|
|
180
200
|
"name": "selected",
|
|
@@ -241,10 +261,10 @@
|
|
|
241
261
|
},
|
|
242
262
|
{
|
|
243
263
|
"name": "provideListItemDefaults",
|
|
244
|
-
"type": "{ tone, size, align, inset, truncate }",
|
|
264
|
+
"type": "{ tone, size, align, endPlacement, inset, truncate }",
|
|
245
265
|
"defaultValue": "—",
|
|
246
266
|
"appliesTo": "an injector",
|
|
247
|
-
"description": "Sets the
|
|
267
|
+
"description": "Sets the six once for every row under it; an explicit input still wins"
|
|
248
268
|
}
|
|
249
269
|
],
|
|
250
270
|
"composition": [],
|
|
@@ -297,12 +317,14 @@
|
|
|
297
317
|
"--slotted-font-weight-regular",
|
|
298
318
|
"--slotted-line-height-md",
|
|
299
319
|
"--slotted-line-height-sm",
|
|
320
|
+
"--slotted-list-fill-inset",
|
|
300
321
|
"--slotted-list-item-background",
|
|
301
322
|
"--slotted-list-item-background-active",
|
|
302
323
|
"--slotted-list-item-background-current",
|
|
303
324
|
"--slotted-list-item-background-hover",
|
|
304
325
|
"--slotted-list-item-background-selected",
|
|
305
326
|
"--slotted-list-item-body-gap",
|
|
327
|
+
"--slotted-list-item-body-min-inline-size",
|
|
306
328
|
"--slotted-list-item-border-color",
|
|
307
329
|
"--slotted-list-item-border-width",
|
|
308
330
|
"--slotted-list-item-color",
|
|
@@ -340,6 +362,7 @@
|
|
|
340
362
|
"--slotted-selection-size-sm",
|
|
341
363
|
"--slotted-space-1",
|
|
342
364
|
"--slotted-space-2",
|
|
365
|
+
"--slotted-space-3",
|
|
343
366
|
"--slotted-surface-raised",
|
|
344
367
|
"--slotted-surface-sunken",
|
|
345
368
|
"--slotted-text",
|
|
@@ -462,9 +485,9 @@
|
|
|
462
485
|
{
|
|
463
486
|
"id": "composition",
|
|
464
487
|
"title": "The families beside it",
|
|
465
|
-
"note": "slCheckbox announces the selection the row paints, slBadge carries the count, slButton is the independent target. The row draws none of the three.",
|
|
488
|
+
"note": "slCheckbox announces the selection the row paints, slBadge carries the count, slButton is the independent target. The row draws none of the three. A row whose box is a link takes its checkbox in slListItemSelect, before the link, because an anchor may not hold a checkbox.",
|
|
466
489
|
"language": "html",
|
|
467
|
-
"source": "<li slListItem selected>\n <div slListItemContent>\n <span slListItemStart>\n <span slCheckbox [checked]=\"true\" aria-label=\"Select\"></span>\n </span>\n <span slListItemBody>\n <span slListItemLabel>Quarterly report</span>\n </span>\n <span slListItemEnd><span slBadge tone=\"accent\">3</span></span>\n </div>\n</li>\n",
|
|
490
|
+
"source": "<li slListItem selected>\n <div slListItemContent>\n <span slListItemStart>\n <span slCheckbox [checked]=\"true\" aria-label=\"Select\"></span>\n </span>\n <span slListItemBody>\n <span slListItemLabel>Quarterly report</span>\n </span>\n <span slListItemEnd><span slBadge tone=\"accent\">3</span></span>\n </div>\n</li>\n<li slListItem selected>\n <div slListItemSelect>\n <span slCheckbox [checked]=\"true\" aria-label=\"Select\"></span>\n </div>\n <a slListItemContent href=\"/reports/annual\">\n <span slListItemBody>\n <span slListItemLabel>Annual report</span>\n </span>\n </a>\n</li>\n",
|
|
468
491
|
"verdict": "excerpt"
|
|
469
492
|
},
|
|
470
493
|
{
|
package/docs/list-item.md
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
## Import
|
|
7
7
|
|
|
8
8
|
```ts
|
|
9
|
-
import { SlListItem, SlListItemActions, SlListItemBody, SlListItemContent, SlListItemDescription, SlListItemEnd, SlListItemLabel, SlListItemStart } from '@slotted/angular/list-item';
|
|
9
|
+
import { SlListItem, SlListItemActions, SlListItemBody, SlListItemContent, SlListItemDescription, SlListItemEnd, SlListItemLabel, SlListItemSelect, SlListItemStart } from '@slotted/angular/list-item';
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Selector: `li[slListItem], [slListItemContent], [slListItemStart], [slListItemBody], [slListItemLabel], [slListItemDescription], [slListItemEnd], [slListItemActions]` · exportAs: `slListItem, slListItemContent, slListItemStart, slListItemBody, slListItemLabel, slListItemDescription, slListItemEnd, slListItemActions`
|
|
12
|
+
Selector: `li[slListItem], [slListItemContent], [slListItemStart], [slListItemBody], [slListItemLabel], [slListItemDescription], [slListItemEnd], [slListItemActions], [slListItemSelect]` · exportAs: `slListItem, slListItemContent, slListItemStart, slListItemBody, slListItemLabel, slListItemDescription, slListItemEnd, slListItemActions, slListItemSelect`
|
|
13
13
|
|
|
14
14
|
## Minimal example
|
|
15
15
|
|
|
@@ -30,6 +30,7 @@ Excerpt — not a complete module
|
|
|
30
30
|
| --- | --- | --- | --- |
|
|
31
31
|
| `root` | — | li, or the element render returns | yes |
|
|
32
32
|
| `marker` | `root` | span | no |
|
|
33
|
+
| `select` | `root` | div | no |
|
|
33
34
|
| `content` | `root` | div, button or a | yes |
|
|
34
35
|
| `start` | `content` | div | no |
|
|
35
36
|
| `body` | `content` | div | no |
|
|
@@ -45,8 +46,9 @@ Excerpt — not a complete module
|
|
|
45
46
|
| `tone` | `'secondary' \| 'accent' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | slListItem | The row ink, the wash under the pointer and the ground of a selected row. It never fills a resting row |
|
|
46
47
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | slListItem | The room the row gets. Falls back to the list, then the injected default |
|
|
47
48
|
| `align` | `'center' \| 'start'` | center | slListItem | Where the leading visual and the metadata sit against a row of more than one line |
|
|
49
|
+
| `endPlacement` | `'auto' \| 'beside'` | auto | slListItem | Where the end goes in a row narrower than 22rem: under the title, or on its line for a figure that belongs beside its name |
|
|
48
50
|
| `inset` | `boolean` | false | slListItem | Takes the row inline padding away. Falls back to the list, then the injected default |
|
|
49
|
-
| `truncate` | `boolean` | false | slListItem | Clips the title and the lines under it to one line each. The whole string stays in the document |
|
|
51
|
+
| `truncate` | `boolean` | false | slListItem | Clips the title and the lines under it to one line each, and keeps the body 10rem wide (--slotted-list-item-body-min-inline-size) before the end and the actions, so the row has one height per size. The whole string stays in the document |
|
|
50
52
|
| `selected` | `boolean` | false | slListItem | Mirrors a selection the page owns. The slCheckbox in slListItemStart is what announces it |
|
|
51
53
|
| `current` | `boolean \| 'page' \| 'step' \| 'location' \| 'date' \| 'time'` | false | slListItem | The row the reader is on, written as aria-current — the one state of this shape a listitem may announce |
|
|
52
54
|
| `disabled` | `boolean` | false | slListItem | The row dims and refuses the activation. The attribute goes on the box, never on the li |
|
|
@@ -56,7 +58,7 @@ Excerpt — not a complete module
|
|
|
56
58
|
| `position / setSize` | `number` | — | slListItem | aria-posinset and aria-setsize, written only when the page knows them |
|
|
57
59
|
| `href / routerLink` | `string \| unknown[]` | — | the element | Not an input: slListItemContent goes on the anchor the page wrote, so the router link stays the page own |
|
|
58
60
|
| `exportAs` | `slListItem \| slListItemContent \| slListItemStart \| slListItemBody \| slListItemLabel \| slListItemDescription \| slListItemEnd \| slListItemActions` | — | every directive | Reaches the instance from a template |
|
|
59
|
-
| `provideListItemDefaults` | `{ tone, size, align, inset, truncate }` | — | an injector | Sets the
|
|
61
|
+
| `provideListItemDefaults` | `{ tone, size, align, endPlacement, inset, truncate }` | — | an injector | Sets the six once for every row under it; an explicit input still wins |
|
|
60
62
|
|
|
61
63
|
## Axes and defaults
|
|
62
64
|
|
|
@@ -65,6 +67,7 @@ Excerpt — not a complete module
|
|
|
65
67
|
| `tone` | `secondary`, `accent`, `info`, `success`, `warning`, `danger` | `secondary` |
|
|
66
68
|
| `size` | `sm`, `md`, `lg` | `md` |
|
|
67
69
|
| `align` | `center`, `start` | `center` |
|
|
70
|
+
| `endPlacement` | `auto`, `beside` | `auto` |
|
|
68
71
|
|
|
69
72
|
## Rules
|
|
70
73
|
|
|
@@ -83,7 +86,7 @@ Excerpt — not a complete module
|
|
|
83
86
|
|
|
84
87
|
## Tokens
|
|
85
88
|
|
|
86
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--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-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-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-regular`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-list-item-background`, `--slotted-list-item-background-active`, `--slotted-list-item-background-current`, `--slotted-list-item-background-hover`, `--slotted-list-item-background-selected`, `--slotted-list-item-body-gap`, `--slotted-list-item-border-color`, `--slotted-list-item-border-width`, `--slotted-list-item-color`, `--slotted-list-item-color-disabled`, `--slotted-list-item-color-muted`, `--slotted-list-item-control-size`, `--slotted-list-item-control-size-lg`, `--slotted-list-item-control-size-sm`, `--slotted-list-item-description-font-size`, `--slotted-list-item-font-size`, `--slotted-list-item-font-size-lg`, `--slotted-list-item-font-size-sm`, `--slotted-list-item-font-weight`, `--slotted-list-item-font-weight-current`, `--slotted-list-item-font-weight-selected`, `--slotted-list-item-gap`, `--slotted-list-item-gap-lg`, `--slotted-list-item-gap-sm`, `--slotted-list-item-icon-size`, `--slotted-list-item-icon-size-lg`, `--slotted-list-item-icon-size-sm`, `--slotted-list-item-min-block-size`, `--slotted-list-item-min-block-size-lg`, `--slotted-list-item-min-block-size-sm`, `--slotted-list-item-padding-block`, `--slotted-list-item-padding-block-lg`, `--slotted-list-item-padding-block-sm`, `--slotted-list-item-padding-inline`, `--slotted-list-item-padding-inline-lg`, `--slotted-list-item-padding-inline-sm`, `--slotted-list-item-radius`, `--slotted-radius-md`, `--slotted-selection-size-lg`, `--slotted-selection-size-md`, `--slotted-selection-size-sm`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-solid-active`, `--slotted-tone-accent-solid-hover`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-danger-solid-active`, `--slotted-tone-danger-solid-hover`, `--slotted-tone-danger-subtle-active`, `--slotted-tone-danger-subtle-hover`, `--slotted-tone-danger-surface`, `--slotted-tone-danger-text`, `--slotted-tone-info-border`, `--slotted-tone-info-solid-active`, `--slotted-tone-info-solid-hover`, `--slotted-tone-info-subtle-active`, `--slotted-tone-info-subtle-hover`, `--slotted-tone-info-surface`, `--slotted-tone-info-text`, `--slotted-tone-secondary-border`, `--slotted-tone-secondary-solid-active`, `--slotted-tone-secondary-solid-hover`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-secondary-surface`, `--slotted-tone-success-border`, `--slotted-tone-success-solid-active`, `--slotted-tone-success-solid-hover`, `--slotted-tone-success-subtle-active`, `--slotted-tone-success-subtle-hover`, `--slotted-tone-success-surface`, `--slotted-tone-success-text`, `--slotted-tone-warning-border`, `--slotted-tone-warning-solid-active`, `--slotted-tone-warning-solid-hover`, `--slotted-tone-warning-subtle-active`, `--slotted-tone-warning-subtle-hover`, `--slotted-tone-warning-surface`, `--slotted-tone-warning-text`
|
|
89
|
+
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--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-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-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-regular`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-list-fill-inset`, `--slotted-list-item-background`, `--slotted-list-item-background-active`, `--slotted-list-item-background-current`, `--slotted-list-item-background-hover`, `--slotted-list-item-background-selected`, `--slotted-list-item-body-gap`, `--slotted-list-item-body-min-inline-size`, `--slotted-list-item-border-color`, `--slotted-list-item-border-width`, `--slotted-list-item-color`, `--slotted-list-item-color-disabled`, `--slotted-list-item-color-muted`, `--slotted-list-item-control-size`, `--slotted-list-item-control-size-lg`, `--slotted-list-item-control-size-sm`, `--slotted-list-item-description-font-size`, `--slotted-list-item-font-size`, `--slotted-list-item-font-size-lg`, `--slotted-list-item-font-size-sm`, `--slotted-list-item-font-weight`, `--slotted-list-item-font-weight-current`, `--slotted-list-item-font-weight-selected`, `--slotted-list-item-gap`, `--slotted-list-item-gap-lg`, `--slotted-list-item-gap-sm`, `--slotted-list-item-icon-size`, `--slotted-list-item-icon-size-lg`, `--slotted-list-item-icon-size-sm`, `--slotted-list-item-min-block-size`, `--slotted-list-item-min-block-size-lg`, `--slotted-list-item-min-block-size-sm`, `--slotted-list-item-padding-block`, `--slotted-list-item-padding-block-lg`, `--slotted-list-item-padding-block-sm`, `--slotted-list-item-padding-inline`, `--slotted-list-item-padding-inline-lg`, `--slotted-list-item-padding-inline-sm`, `--slotted-list-item-radius`, `--slotted-radius-md`, `--slotted-selection-size-lg`, `--slotted-selection-size-md`, `--slotted-selection-size-sm`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-solid-active`, `--slotted-tone-accent-solid-hover`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-danger-solid-active`, `--slotted-tone-danger-solid-hover`, `--slotted-tone-danger-subtle-active`, `--slotted-tone-danger-subtle-hover`, `--slotted-tone-danger-surface`, `--slotted-tone-danger-text`, `--slotted-tone-info-border`, `--slotted-tone-info-solid-active`, `--slotted-tone-info-solid-hover`, `--slotted-tone-info-subtle-active`, `--slotted-tone-info-subtle-hover`, `--slotted-tone-info-surface`, `--slotted-tone-info-text`, `--slotted-tone-secondary-border`, `--slotted-tone-secondary-solid-active`, `--slotted-tone-secondary-solid-hover`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-secondary-surface`, `--slotted-tone-success-border`, `--slotted-tone-success-solid-active`, `--slotted-tone-success-solid-hover`, `--slotted-tone-success-subtle-active`, `--slotted-tone-success-subtle-hover`, `--slotted-tone-success-surface`, `--slotted-tone-success-text`, `--slotted-tone-warning-border`, `--slotted-tone-warning-solid-active`, `--slotted-tone-warning-solid-hover`, `--slotted-tone-warning-subtle-active`, `--slotted-tone-warning-subtle-hover`, `--slotted-tone-warning-surface`, `--slotted-tone-warning-text`
|
|
87
90
|
|
|
88
91
|
## Examples
|
|
89
92
|
|
|
@@ -203,7 +206,7 @@ Excerpt — not a complete module
|
|
|
203
206
|
|
|
204
207
|
### The families beside it
|
|
205
208
|
|
|
206
|
-
slCheckbox announces the selection the row paints, slBadge carries the count, slButton is the independent target. The row draws none of the three.
|
|
209
|
+
slCheckbox announces the selection the row paints, slBadge carries the count, slButton is the independent target. The row draws none of the three. A row whose box is a link takes its checkbox in slListItemSelect, before the link, because an anchor may not hold a checkbox.
|
|
207
210
|
|
|
208
211
|
Excerpt — not a complete module
|
|
209
212
|
|
|
@@ -219,6 +222,16 @@ Excerpt — not a complete module
|
|
|
219
222
|
<span slListItemEnd><span slBadge tone="accent">3</span></span>
|
|
220
223
|
</div>
|
|
221
224
|
</li>
|
|
225
|
+
<li slListItem selected>
|
|
226
|
+
<div slListItemSelect>
|
|
227
|
+
<span slCheckbox [checked]="true" aria-label="Select"></span>
|
|
228
|
+
</div>
|
|
229
|
+
<a slListItemContent href="/reports/annual">
|
|
230
|
+
<span slListItemBody>
|
|
231
|
+
<span slListItemLabel>Annual report</span>
|
|
232
|
+
</span>
|
|
233
|
+
</a>
|
|
234
|
+
</li>
|
|
222
235
|
```
|
|
223
236
|
|
|
224
237
|
### What the platform already does
|