@slotted/angular 0.1.0-beta.12 → 0.1.0-beta.13
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/action-bar.json +1 -0
- package/docs/action-bar.md +1 -1
- package/docs/action-sheet.json +391 -64
- package/docs/action-sheet.md +259 -0
- package/docs/alert.json +1 -1
- package/docs/alert.md +1 -1
- package/docs/combobox.json +1 -0
- package/docs/combobox.md +1 -1
- package/docs/data-grid.json +1 -1
- package/docs/date-picker.json +1 -0
- package/docs/date-picker.md +1 -1
- package/docs/drawer.json +1 -0
- package/docs/drawer.md +1 -1
- package/docs/entity-picker.json +1 -0
- package/docs/entity-picker.md +1 -1
- package/docs/inline-message.json +1 -1
- package/docs/inline-message.md +1 -1
- package/docs/kbd.json +3 -0
- package/docs/kbd.md +1 -1
- package/docs/menu.json +1 -0
- package/docs/menu.md +1 -1
- package/docs/popover.json +1 -0
- package/docs/popover.md +1 -1
- package/docs/scroll-area.json +266 -64
- package/docs/scroll-area.md +188 -0
- package/docs/section.json +11 -1
- package/docs/section.md +13 -12
- package/docs/select.json +1 -0
- package/docs/select.md +1 -1
- package/docs/skills/theme-app/SKILL.md +18 -4
- package/docs/splitter.json +279 -64
- package/docs/splitter.md +215 -0
- package/docs/status-indicator.json +16 -5
- package/docs/status-indicator.md +3 -1
- package/docs/table-of-contents.json +2 -1
- package/docs/table-of-contents.md +2 -2
- package/docs/tooltip.json +1 -0
- package/docs/tooltip.md +1 -1
- package/fesm2022/slotted-angular-action-bar.mjs +2 -2
- package/fesm2022/slotted-angular-action-bar.mjs.map +1 -1
- package/fesm2022/slotted-angular-alert.mjs +7 -7
- package/fesm2022/slotted-angular-alert.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +2 -2
- package/fesm2022/slotted-angular-chart.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-date-picker.mjs +2 -2
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-dialog.mjs +8 -8
- package/fesm2022/slotted-angular-dialog.mjs.map +1 -1
- package/fesm2022/slotted-angular-drawer.mjs +166 -50
- package/fesm2022/slotted-angular-drawer.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +2 -2
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-icon.mjs +185 -87
- package/fesm2022/slotted-angular-icon.mjs.map +1 -1
- package/fesm2022/slotted-angular-inline-message.mjs +7 -7
- 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-menu.mjs +2 -2
- package/fesm2022/slotted-angular-menu.mjs.map +1 -1
- package/fesm2022/slotted-angular-multi-select.mjs +2 -2
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-popover.mjs +2 -2
- package/fesm2022/slotted-angular-popover.mjs.map +1 -1
- package/fesm2022/slotted-angular-section.mjs +30 -3
- package/fesm2022/slotted-angular-section.mjs.map +1 -1
- package/fesm2022/slotted-angular-select.mjs +2 -2
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-status-indicator.mjs +30 -13
- package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-table-of-contents.mjs +2 -2
- package/fesm2022/slotted-angular-table-of-contents.mjs.map +1 -1
- package/fesm2022/slotted-angular-theme.mjs +6 -3
- package/fesm2022/slotted-angular-theme.mjs.map +1 -1
- package/fesm2022/slotted-angular-toast.mjs +8 -8
- package/fesm2022/slotted-angular-toast.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +2 -2
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/package.json +3 -3
- package/types/slotted-angular-alert.d.ts +2 -1
- package/types/slotted-angular-alert.d.ts.map +1 -1
- package/types/slotted-angular-attachment.d.ts +2 -1
- package/types/slotted-angular-attachment.d.ts.map +1 -1
- package/types/slotted-angular-code-block.d.ts +2 -1
- package/types/slotted-angular-code-block.d.ts.map +1 -1
- package/types/slotted-angular-collapsible.d.ts +2 -1
- package/types/slotted-angular-collapsible.d.ts.map +1 -1
- package/types/slotted-angular-combobox.d.ts +2 -1
- package/types/slotted-angular-combobox.d.ts.map +1 -1
- package/types/slotted-angular-dialog.d.ts +2 -1
- package/types/slotted-angular-dialog.d.ts.map +1 -1
- package/types/slotted-angular-drawer.d.ts +17 -0
- package/types/slotted-angular-drawer.d.ts.map +1 -1
- package/types/slotted-angular-icon.d.ts +12 -2
- package/types/slotted-angular-icon.d.ts.map +1 -1
- package/types/slotted-angular-inline-message.d.ts +3 -2
- package/types/slotted-angular-inline-message.d.ts.map +1 -1
- package/types/slotted-angular-multi-select.d.ts +2 -1
- package/types/slotted-angular-multi-select.d.ts.map +1 -1
- package/types/slotted-angular-section.d.ts +3 -1
- package/types/slotted-angular-section.d.ts.map +1 -1
- package/types/slotted-angular-select.d.ts +2 -1
- package/types/slotted-angular-select.d.ts.map +1 -1
- package/types/slotted-angular-status-indicator.d.ts +13 -3
- package/types/slotted-angular-status-indicator.d.ts.map +1 -1
- package/types/slotted-angular-stepper.d.ts +2 -1
- package/types/slotted-angular-stepper.d.ts.map +1 -1
- package/types/slotted-angular-theme.d.ts +6 -4
- package/types/slotted-angular-theme.d.ts.map +1 -1
- package/types/slotted-angular-toast.d.ts +4 -2
- package/types/slotted-angular-toast.d.ts.map +1 -1
- package/types/slotted-angular-upload.d.ts +4 -2
- package/types/slotted-angular-upload.d.ts.map +1 -1
package/docs/action-bar.json
CHANGED
package/docs/action-bar.md
CHANGED
|
@@ -84,7 +84,7 @@ Excerpt — not a complete module
|
|
|
84
84
|
|
|
85
85
|
## Tokens
|
|
86
86
|
|
|
87
|
-
`--slotted-action-bar-background`, `--slotted-action-bar-border-color`, `--slotted-action-bar-gap`, `--slotted-action-bar-inset-block`, `--slotted-action-bar-inset-inline`, `--slotted-action-bar-overflow-active-background`, `--slotted-action-bar-overflow-color`, `--slotted-action-bar-overflow-hover-background`, `--slotted-action-bar-overflow-hover-color`, `--slotted-action-bar-overflow-open-background`, `--slotted-action-bar-separator-color`, `--slotted-action-bar-status-color`, `--slotted-border-strong`, `--slotted-border-subtle`, `--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-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-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-foreground`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-surface`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-sticky`
|
|
87
|
+
`--slotted-action-bar-backdrop-filter`, `--slotted-action-bar-background`, `--slotted-action-bar-border-color`, `--slotted-action-bar-gap`, `--slotted-action-bar-inset-block`, `--slotted-action-bar-inset-inline`, `--slotted-action-bar-overflow-active-background`, `--slotted-action-bar-overflow-color`, `--slotted-action-bar-overflow-hover-background`, `--slotted-action-bar-overflow-hover-color`, `--slotted-action-bar-overflow-open-background`, `--slotted-action-bar-separator-color`, `--slotted-action-bar-status-color`, `--slotted-border-strong`, `--slotted-border-subtle`, `--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-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-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-foreground`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-surface`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-sticky`
|
|
88
88
|
|
|
89
89
|
## Examples
|
|
90
90
|
|
package/docs/action-sheet.json
CHANGED
|
@@ -82,69 +82,299 @@
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
"docs": {
|
|
85
|
-
"
|
|
86
|
-
"imports":
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
85
|
+
"action-sheet": {
|
|
86
|
+
"imports": {
|
|
87
|
+
"source": "import { SL_ACTION_SHEET, provideActionSheetDefaults } from '@slotted/angular/action-sheet';",
|
|
88
|
+
"selector": "<sl-action-sheet>, exportAs slActionSheet"
|
|
89
|
+
},
|
|
90
|
+
"anatomy": [
|
|
91
|
+
{
|
|
92
|
+
"part": "root",
|
|
93
|
+
"element": "div inside <sl-drawer>’s panel",
|
|
94
|
+
"required": true,
|
|
95
|
+
"purpose": "The family’s own box, data-ui=\"action-sheet\": a grid of header, list and footer that spans every row of drawer’s panel, so the list is the one row that scrolls when the sheet reaches its cap. The layer around it is <sl-drawer> with side=\"bottom\" and size=\"content\", which owns the portal, the scrim, the role=\"dialog\" panel, the slide, the drag and the width — here the family’s --slotted-action-sheet-inline-size, handed to the drawer’s sheet through its panel."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"part": "trigger",
|
|
99
|
+
"element": "the consumer’s own button with [slActionSheetTrigger]",
|
|
100
|
+
"required": false,
|
|
101
|
+
"purpose": "The control that opens the sheet, rendered where it is written. aria-haspopup=\"dialog\", aria-expanded and aria-controls. The sheet hands it to the drawer as the layer’s branch, so a press on it is not read as a press outside."
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"part": "header",
|
|
105
|
+
"element": "header[slActionSheetHeader]",
|
|
106
|
+
"required": false,
|
|
107
|
+
"purpose": "The title and the message, above a rule."
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"part": "title",
|
|
111
|
+
"element": "h2[slActionSheetTitle]",
|
|
112
|
+
"required": false,
|
|
113
|
+
"purpose": "The name of the dialog and of the list, set small: the title is the context and the actions are the content."
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"part": "message",
|
|
117
|
+
"element": "p[slActionSheetMessage]",
|
|
118
|
+
"required": false,
|
|
119
|
+
"purpose": "The dialog’s description, which aria-describedby points at when it is rendered."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"part": "list",
|
|
123
|
+
"element": "div[slActionSheetList], role=\"menu\"",
|
|
124
|
+
"required": true,
|
|
125
|
+
"purpose": "One tab stop for every action, by roving tabindex; the arrows, Home, End and typeahead move inside it. Named by the title. The one row of the panel that scrolls."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"part": "group",
|
|
129
|
+
"element": "div[slActionSheetGroup], role=\"group\"",
|
|
130
|
+
"required": false,
|
|
131
|
+
"purpose": "A run of related actions, named by its label."
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"part": "group-label",
|
|
135
|
+
"element": "div[slActionSheetGroupLabel]",
|
|
136
|
+
"required": false,
|
|
137
|
+
"purpose": "The group’s visible name, set muted and semibold above its actions; the group reads its id."
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"part": "item",
|
|
141
|
+
"element": "button[slActionSheetItem] or a[slActionSheetItem], role=\"menuitem\"",
|
|
142
|
+
"required": true,
|
|
143
|
+
"purpose": "One action, a control’s height tall — 44 pixels under a coarse pointer, where the theme raises it, and the density’s own height under a fine one. data-tone, data-disabled and data-loading; a disabled or loading item stays focusable and takes aria-disabled."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"part": "icon",
|
|
147
|
+
"element": "span[slActionSheetItemIcon], aria-hidden",
|
|
148
|
+
"required": false,
|
|
149
|
+
"purpose": "The item’s visual, or the spinner while it is loading. Its column exists only when some item of the list draws one, so labels line up either way."
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"part": "label",
|
|
153
|
+
"element": "span",
|
|
154
|
+
"required": true,
|
|
155
|
+
"purpose": "The item’s words. It wraps and never truncates."
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"part": "description",
|
|
159
|
+
"element": "span[slActionSheetItemDescription]",
|
|
160
|
+
"required": false,
|
|
161
|
+
"purpose": "The item’s second line, muted, which aria-describedby points at."
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"part": "separator",
|
|
165
|
+
"element": "hr[slActionSheetSeparator]",
|
|
166
|
+
"required": false,
|
|
167
|
+
"purpose": "A rule between runs of actions. Not focusable."
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"part": "footer",
|
|
171
|
+
"element": "div[slActionSheetFooter]",
|
|
172
|
+
"required": false,
|
|
173
|
+
"purpose": "The band that holds the cancel, on the sunken surface, carrying the bottom safe-area inset where a phone’s home indicator sits."
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"part": "cancel",
|
|
177
|
+
"element": "button[slActionSheetCancel]",
|
|
178
|
+
"required": false,
|
|
179
|
+
"purpose": "The explicit way out, asking to close with the reason dismiss. Never disabled. Its words default to the catalog’s cancel."
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"api": [
|
|
183
|
+
{
|
|
184
|
+
"name": "open",
|
|
185
|
+
"type": "model<boolean>",
|
|
186
|
+
"defaultValue": "false",
|
|
187
|
+
"appliesTo": "sl-action-sheet",
|
|
188
|
+
"description": "Whether the sheet is open. Two-way with [(open)]; the family asks through openChangeRequest before it moves"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "modal",
|
|
192
|
+
"type": "boolean",
|
|
193
|
+
"defaultValue": "true",
|
|
194
|
+
"appliesTo": "sl-action-sheet, provideActionSheetDefaults",
|
|
195
|
+
"description": "Whether the page is inert, the scroll locked, focus contained and the scrim painted. false keeps the page operable and paints no scrim"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "mount",
|
|
199
|
+
"type": "'active' | 'lazy' | 'eager'",
|
|
200
|
+
"defaultValue": "active",
|
|
201
|
+
"appliesTo": "sl-action-sheet, provideActionSheetDefaults",
|
|
202
|
+
"description": "When the layer exists. active drops it once the exit is over, lazy builds it on the first open and keeps it, eager builds it up front and makes it inert"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "escape",
|
|
206
|
+
"type": "'close' | 'none'",
|
|
207
|
+
"defaultValue": "close",
|
|
208
|
+
"appliesTo": "sl-action-sheet, provideActionSheetDefaults",
|
|
209
|
+
"description": "Whether Escape asks to close. It reaches the topmost layer only"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "outsidePress",
|
|
213
|
+
"type": "'close' | 'none'",
|
|
214
|
+
"defaultValue": "close",
|
|
215
|
+
"appliesTo": "sl-action-sheet, provideActionSheetDefaults",
|
|
216
|
+
"description": "Whether a press outside the panel asks to close"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "back",
|
|
220
|
+
"type": "'close' | 'none'",
|
|
221
|
+
"defaultValue": "close",
|
|
222
|
+
"appliesTo": "sl-action-sheet, provideActionSheetDefaults",
|
|
223
|
+
"description": "The platform’s way back closes the sheet instead of leaving the page, while it is modal"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "closeOnSelect",
|
|
227
|
+
"type": "boolean",
|
|
228
|
+
"defaultValue": "true",
|
|
229
|
+
"appliesTo": "sl-action-sheet, provideActionSheetDefaults",
|
|
230
|
+
"description": "Whether choosing an action closes the sheet with the reason select"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "messages",
|
|
234
|
+
"type": "Partial<ActionSheetMessages>",
|
|
235
|
+
"defaultValue": "—",
|
|
236
|
+
"appliesTo": "sl-action-sheet",
|
|
237
|
+
"description": "Words laid over the language in force, key by key: the cancel’s words when it is given no content (cancel)"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "initialFocus",
|
|
241
|
+
"type": "HTMLElement | false",
|
|
242
|
+
"defaultValue": "—",
|
|
243
|
+
"appliesTo": "sl-action-sheet",
|
|
244
|
+
"description": "Where focus goes on opening. Unstated, the first action that can run, or the least destructive one when that action is danger. false moves nothing"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "finalFocus",
|
|
248
|
+
"type": "HTMLElement | false",
|
|
249
|
+
"defaultValue": "—",
|
|
250
|
+
"appliesTo": "sl-action-sheet",
|
|
251
|
+
"description": "Where focus goes on closing. Unstated, the element that held it on opening"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "container",
|
|
255
|
+
"type": "Element | null",
|
|
256
|
+
"defaultValue": "—",
|
|
257
|
+
"appliesTo": "sl-action-sheet",
|
|
258
|
+
"description": "A parent for this layer alone instead of the shared portal root"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "value",
|
|
262
|
+
"type": "string",
|
|
263
|
+
"defaultValue": "—",
|
|
264
|
+
"appliesTo": "slActionSheetItem",
|
|
265
|
+
"description": "What the close request carries as result when this action is chosen"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "textValue",
|
|
269
|
+
"type": "string",
|
|
270
|
+
"defaultValue": "—",
|
|
271
|
+
"appliesTo": "slActionSheetItem",
|
|
272
|
+
"description": "What typeahead matches when the label is not plain text"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "tone",
|
|
276
|
+
"type": "'accent' | 'secondary' | 'success' | 'warning' | 'danger'",
|
|
277
|
+
"defaultValue": "—",
|
|
278
|
+
"appliesTo": "slActionSheetItem",
|
|
279
|
+
"description": "Paints the words, the mark and the highlight. danger is the destructive action"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "disabled",
|
|
283
|
+
"type": "boolean",
|
|
284
|
+
"defaultValue": "false",
|
|
285
|
+
"appliesTo": "slActionSheetItem",
|
|
286
|
+
"description": "The action cannot run. It stays focusable and takes aria-disabled; the native attribute is removed so the item stays in the ring"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "loading",
|
|
290
|
+
"type": "boolean",
|
|
291
|
+
"defaultValue": "false",
|
|
292
|
+
"appliesTo": "slActionSheetItem",
|
|
293
|
+
"description": "The action is running: the ring takes the mark’s box, aria-busy is written, a second press is refused and the sheet stays open"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "closeOnSelect",
|
|
297
|
+
"type": "boolean",
|
|
298
|
+
"defaultValue": "—",
|
|
299
|
+
"appliesTo": "slActionSheetItem",
|
|
300
|
+
"description": "Overrides the sheet’s closeOnSelect for this action"
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
"composition": [
|
|
304
|
+
{
|
|
305
|
+
"name": "slActionSheetTrigger",
|
|
306
|
+
"type": "SlActionSheet",
|
|
307
|
+
"defaultValue": "—",
|
|
308
|
+
"appliesTo": "the consumer’s button",
|
|
309
|
+
"description": "The wiring on the application’s own control: <button slButton [slActionSheetTrigger]=\"sheet\">. A handler of the consumer’s that calls preventDefault() refuses the open"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "exportAs",
|
|
313
|
+
"type": "slActionSheet",
|
|
314
|
+
"defaultValue": "—",
|
|
315
|
+
"appliesTo": "sl-action-sheet",
|
|
316
|
+
"description": "The instance, with show(), close() and focus() — the actions a template cannot express declaratively"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "a[slActionSheetItem]",
|
|
320
|
+
"type": "anchor",
|
|
321
|
+
"defaultValue": "—",
|
|
322
|
+
"appliesTo": "slActionSheetItem",
|
|
323
|
+
"description": "An action that navigates is an anchor and keeps its role and keyboard"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "SL_ACTION_SHEET",
|
|
327
|
+
"type": "readonly Type[]",
|
|
328
|
+
"defaultValue": "—",
|
|
329
|
+
"appliesTo": "a standalone component’s imports",
|
|
330
|
+
"description": "Every part at once"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "provideActionSheetDefaults()",
|
|
334
|
+
"type": "{ modal, mount, escape, outsidePress, back, closeOnSelect }",
|
|
335
|
+
"defaultValue": "—",
|
|
336
|
+
"appliesTo": "an injector",
|
|
337
|
+
"description": "The decisions an application takes once. A sheet that states any of them itself still wins"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"name": "aria-label",
|
|
341
|
+
"type": "string",
|
|
342
|
+
"defaultValue": "—",
|
|
343
|
+
"appliesTo": "sl-action-sheet",
|
|
344
|
+
"description": "Read from the host before the bindings are written and moved to the panel, which carries the role — for a sheet with no title"
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"events": [
|
|
348
|
+
{
|
|
349
|
+
"name": "openChangeRequest",
|
|
350
|
+
"payload": "ActionSheetChangeRequest",
|
|
351
|
+
"when": "Before the sheet moves, for every way it can: reason is pointer or keyboard from the trigger, pointer from a drag of the sheet that asks to close, select from an item, dismiss from the cancel, escape, outsidePress, back, or programmatic from show() and close(). result carries the chosen item’s value when the reason is select, and cancel() refuses the move."
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "openChange",
|
|
355
|
+
"payload": "boolean",
|
|
356
|
+
"when": "The model half of [(open)], once a request was not refused."
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "closed",
|
|
360
|
+
"payload": "string | undefined",
|
|
361
|
+
"when": "Once the sheet has closed, with the value of the item chosen, or undefined for any other reason. It is not emitted by a sheet destroyed while open."
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"name": "select",
|
|
365
|
+
"payload": "ActionSheetSelectEvent",
|
|
366
|
+
"when": "On slActionSheetItem, when an action that can run is activated, before the sheet asks to close. preventDefault() keeps the sheet open."
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"accessibility": [
|
|
370
|
+
"No WAI-ARIA APG pattern describes an action sheet, so the layer answers Dialog (Modal) — w3.org/WAI/ARIA/apg/patterns/dialog-modal/ — and the list answers Menu — w3.org/WAI/ARIA/apg/patterns/menubar/. The panel is role=\"dialog\", aria-modal while modal, named by the title and described by the message; the list is role=\"menu\", named by the same title, and every action is a native button with role=\"menuitem\".",
|
|
371
|
+
"The list is one tab stop. ArrowDown and ArrowUp move between actions and wrap, Home and End reach the ends, and a printable character moves to the next action whose label, or textValue, begins with it. Tab moves between the list and the cancel and does not close — the one departure from the menu pattern, because the menu is the content of a dialog and the dialog contains focus. A reader leaves with Escape or the cancel.",
|
|
372
|
+
"A screen reader hears the title twice on entry, once for the dialog and once for the menu. Without a name the menu would be anonymous to a reader moving by widget, and the repetition is the cheaper cost.",
|
|
373
|
+
"Focus enters on the first action that can run. When that action is destructive it enters on the cancel, which is the least destructive action the dialog pattern’s first note recommends; with no cancel, on the first action that is not danger. It returns to the element that held it on close, except after a press outside a non-modal sheet, where the reader was going somewhere else.",
|
|
374
|
+
"A disabled or loading action keeps its place in the ring and takes aria-disabled, as the menu pattern requires; a loading one also carries aria-busy. The cancel is never disabled, because a sheet that cannot be left is a trap. Every action is a control’s height tall, which the theme raises to the 44-pixel comfortable target under a coarse pointer; on a phone the label grows from 14 to 16 pixels with it.",
|
|
375
|
+
"The layer is <sl-drawer>, so the sheet answers everything a drawer from the bottom answers: a touch on its body drags it and a release toward the edge asks to close with the reason pointer, which cancel() refuses like any other close; with the virtual keyboard open the sheet lands above the keys. Nothing of that needs a key: Escape and the cancel are the keyboard’s way out.",
|
|
376
|
+
"A mouse or a pen moving over an action focuses it, so one row is lit whichever device drives; a finger does not, because focus moving under a touch that is about to scroll would light rows at random."
|
|
377
|
+
]
|
|
148
378
|
}
|
|
149
379
|
},
|
|
150
380
|
"tokens": [
|
|
@@ -206,5 +436,102 @@
|
|
|
206
436
|
"--slotted-tone-warning-surface",
|
|
207
437
|
"--slotted-tone-warning-text"
|
|
208
438
|
],
|
|
209
|
-
"examples": [
|
|
439
|
+
"examples": [
|
|
440
|
+
{
|
|
441
|
+
"id": "playground",
|
|
442
|
+
"title": "A trigger, the actions and the way out",
|
|
443
|
+
"note": "Press Partilhar: the sheet rises from the bottom edge over a scrim, focus lands on the first action, and choosing one closes it with the reason select and the action’s value.",
|
|
444
|
+
"language": "html",
|
|
445
|
+
"source": "<button slButton [slActionSheetTrigger]=\"sheet\">Partilhar</button>\n<sl-action-sheet #sheet=\"slActionSheet\" (openChangeRequest)=\"run($event.result)\">\n <header slActionSheetHeader>\n <h2 slActionSheetTitle>Partilhar relatório</h2>\n <p slActionSheetMessage>Quem recebe a ligação vê a versão de hoje.</p>\n </header>\n <div slActionSheetList>\n <button slActionSheetItem value=\"copy\">Copiar ligação</button>\n <button slActionSheetItem value=\"pdf\">Descarregar PDF</button>\n </div>\n <div slActionSheetFooter><button slActionSheetCancel>Cancelar</button></div>\n</sl-action-sheet>\n",
|
|
446
|
+
"verdict": "excerpt"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"id": "destructive",
|
|
450
|
+
"title": "The destructive choice, at the top",
|
|
451
|
+
"note": "tone=\"danger\" paints the words, the mark and the highlight red, and the destructive action goes first, where it is noticed. Opened, this sheet puts focus on Cancelar rather than on the danger.",
|
|
452
|
+
"language": "html",
|
|
453
|
+
"source": "<div slActionSheetList>\n <button slActionSheetItem value=\"delete\" tone=\"danger\">Eliminar rascunho</button>\n <button slActionSheetItem value=\"save\">Guardar rascunho</button>\n</div>\n",
|
|
454
|
+
"verdict": "excerpt"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"id": "groups",
|
|
458
|
+
"title": "Groups, a rule, a second line and an action that is not available",
|
|
459
|
+
"note": "A group is named by its label, a separator draws the rule between two runs, and a disabled action keeps its place and says in its second line why it cannot run — it stays in the arrow ring and refuses the press.",
|
|
460
|
+
"language": "html",
|
|
461
|
+
"source": "<div slActionSheetGroup>\n <div slActionSheetGroupLabel>Enviar</div>\n <button slActionSheetItem value=\"remind\">Lembrar o cliente</button>\n <button slActionSheetItem value=\"accounting\" disabled>\n Enviar para a contabilidade\n <span slActionSheetItemDescription>Disponível depois de aprovada</span>\n </button>\n</div>\n<hr slActionSheetSeparator />\n",
|
|
462
|
+
"verdict": "excerpt"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"id": "content",
|
|
466
|
+
"title": "Content the family did not choose",
|
|
467
|
+
"note": "A title of two lines, a long message, labels that wrap and a reference with no spaces: nothing truncates, the list is the one row that scrolls, and the title and the cancel stay on screen.",
|
|
468
|
+
"language": "html",
|
|
469
|
+
"source": "<button slActionSheetItem value=\"copy-ref\">\n Copiar ENC-2026-0000088213-ATLANTICA-PT-LISBOA-NORTE\n</button>\n",
|
|
470
|
+
"verdict": "excerpt"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"id": "loading",
|
|
474
|
+
"title": "An action that takes time",
|
|
475
|
+
"note": "Press Descarregar PDF: the ring takes the mark’s box and the label stays, so nothing moves; the item carries aria-busy, refuses a second press, and the sheet stays open until the consumer clears loading.",
|
|
476
|
+
"language": "html",
|
|
477
|
+
"source": "<button\n slActionSheetItem\n value=\"pdf\"\n [closeOnSelect]=\"false\"\n [loading]=\"exporting()\"\n (select)=\"exportPdf()\"\n>\n Descarregar PDF\n</button>\n",
|
|
478
|
+
"verdict": "excerpt"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"id": "modal",
|
|
482
|
+
"title": "Modal, or beside the page",
|
|
483
|
+
"note": "modal is the default: the page is inert, the scroll is locked and the scrim is painted. [modal]=\"false\" paints no scrim and leaves the page operable — the map behind stays live — while a press outside still closes the sheet.",
|
|
484
|
+
"language": "html",
|
|
485
|
+
"source": "<sl-action-sheet [modal]=\"false\">…</sl-action-sheet>\n",
|
|
486
|
+
"verdict": "excerpt"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"id": "policy",
|
|
490
|
+
"title": "What may close it",
|
|
491
|
+
"note": "escape, outsidePress and back each take close or none, and every close is a request the consumer can cancel. Here only Cancelar closes the sheet; the line under the trigger names each request that arrived.",
|
|
492
|
+
"language": "html",
|
|
493
|
+
"source": "<sl-action-sheet\n escape=\"none\"\n outsidePress=\"none\"\n back=\"none\"\n (openChangeRequest)=\"saving() && !$event.value && $event.cancel()\"\n>\n …\n</sl-action-sheet>\n",
|
|
494
|
+
"verdict": "excerpt"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"id": "focus",
|
|
498
|
+
"title": "Where focus enters, and where it goes back",
|
|
499
|
+
"note": "Focus enters on the first action that can run; when that action is destructive it enters on Cancelar, the least destructive one the dialog pattern asks for. On close it returns to the trigger; initialFocus and finalFocus name other elements.",
|
|
500
|
+
"language": "html",
|
|
501
|
+
"source": "<sl-action-sheet [finalFocus]=\"composer\">…</sl-action-sheet>\n",
|
|
502
|
+
"verdict": "excerpt"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"id": "result",
|
|
506
|
+
"title": "Which action was chosen, and why it closed",
|
|
507
|
+
"note": "The request carries reason and, when the reason is select, result — the value of the item chosen; (closed) repeats the result once the sheet has left. There is no service that returns a promise.",
|
|
508
|
+
"language": "html",
|
|
509
|
+
"source": "<sl-action-sheet\n [(open)]=\"open\"\n (openChangeRequest)=\"$event.reason === 'select' && archive($event.result)\"\n>\n …\n</sl-action-sheet>\n",
|
|
510
|
+
"verdict": "excerpt"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"id": "responsive",
|
|
514
|
+
"title": "One list of actions, a menu on a pointer and a sheet on a phone",
|
|
515
|
+
"note": "The item vocabulary is menu’s, word for word — value, tone, disabled, (select) and the description line — so one array renders as either family, and the breakpoint that picks between them is the application’s.",
|
|
516
|
+
"language": "html",
|
|
517
|
+
"source": "@if (coarse()) {\n <sl-action-sheet #sheet=\"slActionSheet\" aria-label=\"Ações\">\n <div slActionSheetList aria-label=\"Ações\">\n @for (action of actions; track action.value) {\n <button slActionSheetItem [value]=\"action.value\" [tone]=\"action.tone\">\n {{ action.label }}\n </button>\n }\n </div>\n </sl-action-sheet>\n} @else {\n <sl-menu #menu>\n @for (action of actions; track action.value) {\n <button slMenuItem [tone]=\"action.tone\">{{ action.label }}</button>\n }\n </sl-menu>\n}\n",
|
|
518
|
+
"verdict": "excerpt"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"id": "defaults",
|
|
522
|
+
"title": "Decided once for the application",
|
|
523
|
+
"note": "provideActionSheetDefaults() sets modal, mount, escape, outsidePress, back and closeOnSelect for every sheet it reaches, and a sheet that states a value itself still wins. The cancel’s words come from the language in force (provideSlotted).",
|
|
524
|
+
"language": "html",
|
|
525
|
+
"source": "<!-- bootstrapApplication(App, { providers: [provideActionSheetDefaults({ closeOnSelect: false })] }) -->\n<div slActionSheetFooter><button slActionSheetCancel></button></div>\n",
|
|
526
|
+
"verdict": "excerpt"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"id": "accessibility",
|
|
530
|
+
"title": "The keyboard",
|
|
531
|
+
"note": "Open it and use the keys: the arrows move between actions and wrap, Home and End reach the ends, a letter moves to the next action that starts with it, Tab moves between the list and Cancelar, and Escape closes and returns focus.",
|
|
532
|
+
"language": "html",
|
|
533
|
+
"source": "<button slActionSheetItem value=\"flag\" textValue=\"Sinalizar\">\n <span slActionSheetItemIcon><ng-icon name=\"lucideFlag\" /></span>\n Sinalizar\n</button>\n",
|
|
534
|
+
"verdict": "excerpt"
|
|
535
|
+
}
|
|
536
|
+
]
|
|
210
537
|
}
|