@slotted/angular 0.1.0-beta.27 → 0.1.0-beta.29
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/command-palette.json +1 -0
- package/docs/command-palette.md +1 -1
- package/docs/date-picker.json +11 -0
- package/docs/date-picker.md +2 -1
- package/docs/date-range-picker.json +11 -0
- package/docs/date-range-picker.md +2 -1
- package/docs/datetime-picker.json +11 -0
- package/docs/datetime-picker.md +2 -1
- package/docs/datetime-range-picker.json +11 -0
- package/docs/datetime-range-picker.md +2 -1
- package/docs/description-list.json +2 -1
- package/docs/description-list.md +2 -2
- package/docs/drawer.json +2 -0
- package/docs/drawer.md +1 -1
- package/docs/entity-picker.json +1 -0
- package/docs/entity-picker.md +1 -1
- package/docs/field-group.json +15 -0
- package/docs/field-group.md +3 -1
- package/docs/guidelines/forms.md +15 -3
- package/docs/guidelines/index.md +2 -1
- package/docs/guidelines/overviews.md +6 -6
- package/docs/index.md +1 -0
- package/docs/media-viewer.json +521 -0
- package/docs/media-viewer.md +188 -0
- package/docs/skills/theme-app/SKILL.md +8 -2
- package/docs/stat-card.json +16 -1
- package/docs/stat-card.md +3 -1
- package/docs/tag.json +1 -0
- package/docs/tag.md +1 -1
- package/docs/time-picker.json +11 -0
- package/docs/time-picker.md +2 -1
- package/docs/time-range-picker.json +11 -0
- package/docs/time-range-picker.md +2 -1
- package/fesm2022/slotted-angular-attachment.mjs +2 -2
- package/fesm2022/slotted-angular-attachment.mjs.map +1 -1
- package/fesm2022/slotted-angular-cascader.mjs +2 -2
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -1
- package/fesm2022/slotted-angular-command-palette.mjs +2 -2
- package/fesm2022/slotted-angular-command-palette.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +25 -2
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs +25 -2
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs +25 -2
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +25 -2
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-description-list.mjs +4 -4
- package/fesm2022/slotted-angular-description-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-dialog.mjs +4 -4
- package/fesm2022/slotted-angular-dialog.mjs.map +1 -1
- package/fesm2022/slotted-angular-drawer.mjs +2 -2
- 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-field-group.mjs +25 -11
- package/fesm2022/slotted-angular-field-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-field.mjs +16 -8
- package/fesm2022/slotted-angular-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-media-viewer.mjs +962 -0
- package/fesm2022/slotted-angular-media-viewer.mjs.map +1 -0
- package/fesm2022/slotted-angular-message-scroller.mjs +2 -2
- package/fesm2022/slotted-angular-message-scroller.mjs.map +1 -1
- package/fesm2022/slotted-angular-message.mjs +4 -4
- package/fesm2022/slotted-angular-message.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-select.mjs +2 -2
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-stat-card.mjs +13 -3
- package/fesm2022/slotted-angular-stat-card.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-time-picker.mjs +25 -2
- package/fesm2022/slotted-angular-time-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-range-picker.mjs +25 -2
- package/fesm2022/slotted-angular-time-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-wizard.mjs +2 -2
- package/fesm2022/slotted-angular-wizard.mjs.map +1 -1
- package/package.json +7 -3
- package/types/slotted-angular-date-picker.d.ts +1 -0
- package/types/slotted-angular-date-picker.d.ts.map +1 -1
- package/types/slotted-angular-date-range-picker.d.ts +1 -0
- package/types/slotted-angular-date-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-picker.d.ts +1 -0
- package/types/slotted-angular-datetime-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-range-picker.d.ts +1 -0
- package/types/slotted-angular-datetime-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-field-group.d.ts +10 -2
- package/types/slotted-angular-field-group.d.ts.map +1 -1
- package/types/slotted-angular-field.d.ts.map +1 -1
- package/types/slotted-angular-media-viewer.d.ts +140 -0
- package/types/slotted-angular-media-viewer.d.ts.map +1 -0
- package/types/slotted-angular-stat-card.d.ts +10 -2
- package/types/slotted-angular-stat-card.d.ts.map +1 -1
- package/types/slotted-angular-time-picker.d.ts +1 -0
- package/types/slotted-angular-time-picker.d.ts.map +1 -1
- package/types/slotted-angular-time-range-picker.d.ts +1 -0
- package/types/slotted-angular-time-range-picker.d.ts.map +1 -1
|
@@ -45,15 +45,15 @@ Do: Decide the chart from the scope the page already reads, and write the senten
|
|
|
45
45
|
Don't: Draw one group of bars, or leave an empty chart region for a reader scoped to one place.
|
|
46
46
|
Check: Sign in as a reader whose scope holds one category: the overview draws no comparison chart, and one sentence states that category's numbers.
|
|
47
47
|
|
|
48
|
-
### OV-04 · A threshold is said,
|
|
48
|
+
### OV-04 · A threshold is said, then painted
|
|
49
49
|
|
|
50
50
|
Level: SHOULD
|
|
51
51
|
Applies to: a figure of an overview whose reading changes at a share the product states — overdue receivables against all receivables
|
|
52
|
-
Rule: The thresholds are stated once in words beside the figures, and a figure past one says so in its own comparison line, on the line the placeholder reserves.
|
|
53
|
-
Why:
|
|
54
|
-
Do: Keep the shares in one place of the page's code and one sentence on screen ("a warning from 20 percent of receivables and a danger from 33"),
|
|
55
|
-
Don't: Set
|
|
56
|
-
Check: Bring a figure past each stated threshold: the threshold sentence stands beside the figures,
|
|
52
|
+
Rule: The thresholds are stated once in words beside the figures, and a figure past one says so in its own comparison line, on the line the placeholder reserves; the card takes `attention` at the threshold's level (`warning` or `danger`).
|
|
53
|
+
Why: Colour is a second channel: `attention` paints the value and the edge of the card, and a reader who does not see the colour reads the crossing in the comparison. The card's `tone` is the trend's and paints nothing on a card without one, and a mark added beside the label moves the card's header to a second line.
|
|
54
|
+
Do: Keep the shares in one place of the page's code and one sentence on screen ("a warning from 20 percent of receivables and a danger from 33"), end the crossed figure's comparison with the threshold it passed ("26% of receivables, above 20%"), and set `attention` to `warning` on that card.
|
|
55
|
+
Don't: Set `attention` on a card whose comparison does not name the threshold, set `tone` to flag a crossing, or add a badge to the card's header for the crossing.
|
|
56
|
+
Check: Bring a figure past each stated threshold: the threshold sentence stands beside the figures, the figure's own comparison line says it crossed, on the line its placeholder reserved, and the card carries `attention` at the threshold's level.
|
|
57
57
|
|
|
58
58
|
### OV-05 · A chart is framed only as a tile
|
|
59
59
|
|
package/docs/index.md
CHANGED
|
@@ -115,6 +115,7 @@ Each family is documented in `./<family>.md`.
|
|
|
115
115
|
- dialog: Modal dialog and alert dialog.
|
|
116
116
|
- drawer: Panel that slides in from an edge.
|
|
117
117
|
- hover-card: Preview card that opens on hover or focus.
|
|
118
|
+
- media-viewer: Full-screen viewer of files: fitted, zoomed, stepped.
|
|
118
119
|
- menu: List of actions opened from a trigger.
|
|
119
120
|
- popover: Floating panel anchored to a trigger.
|
|
120
121
|
- tooltip: Short label shown on hover or focus.
|
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
{
|
|
2
|
+
"family": "media-viewer",
|
|
3
|
+
"ui": "media-viewer",
|
|
4
|
+
"binding": "angular",
|
|
5
|
+
"catalog": {
|
|
6
|
+
"group": "Overlays",
|
|
7
|
+
"summary": "Full-screen viewer of files: fitted, zoomed, stepped."
|
|
8
|
+
},
|
|
9
|
+
"axes": {},
|
|
10
|
+
"members": {
|
|
11
|
+
"mediaViewer": {
|
|
12
|
+
"nativeElement": "div",
|
|
13
|
+
"defaults": {
|
|
14
|
+
"minZoom": 1,
|
|
15
|
+
"maxZoom": 4,
|
|
16
|
+
"zoomStep": 0.25,
|
|
17
|
+
"loop": false
|
|
18
|
+
},
|
|
19
|
+
"capabilities": [
|
|
20
|
+
"open",
|
|
21
|
+
"value",
|
|
22
|
+
"zoom",
|
|
23
|
+
"content",
|
|
24
|
+
"wiring"
|
|
25
|
+
],
|
|
26
|
+
"states": [
|
|
27
|
+
"default",
|
|
28
|
+
"hover",
|
|
29
|
+
"active",
|
|
30
|
+
"focus-visible",
|
|
31
|
+
"open",
|
|
32
|
+
"disabled",
|
|
33
|
+
"loading",
|
|
34
|
+
"current"
|
|
35
|
+
],
|
|
36
|
+
"parts": [
|
|
37
|
+
"root",
|
|
38
|
+
"bar",
|
|
39
|
+
"close",
|
|
40
|
+
"heading",
|
|
41
|
+
"title",
|
|
42
|
+
"position",
|
|
43
|
+
"actions",
|
|
44
|
+
"download",
|
|
45
|
+
"stage",
|
|
46
|
+
"frame",
|
|
47
|
+
"text",
|
|
48
|
+
"media",
|
|
49
|
+
"unsupported",
|
|
50
|
+
"tile",
|
|
51
|
+
"status",
|
|
52
|
+
"retry",
|
|
53
|
+
"previous",
|
|
54
|
+
"next",
|
|
55
|
+
"zoom",
|
|
56
|
+
"zoom-out",
|
|
57
|
+
"zoom-level",
|
|
58
|
+
"zoom-in",
|
|
59
|
+
"fit",
|
|
60
|
+
"rotate",
|
|
61
|
+
"caption",
|
|
62
|
+
"thumbnails",
|
|
63
|
+
"thumbnail"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"docs": {
|
|
68
|
+
"mediaViewer": {
|
|
69
|
+
"imports": {
|
|
70
|
+
"source": "import { provideMediaViewerDefaults, SlMediaViewer, SlMediaViewerAction } from '@slotted/angular/media-viewer';",
|
|
71
|
+
"selector": "sl-media-viewer, [slMediaViewerAction]",
|
|
72
|
+
"exportAs": "slMediaViewer"
|
|
73
|
+
},
|
|
74
|
+
"anatomy": [
|
|
75
|
+
{
|
|
76
|
+
"part": "root",
|
|
77
|
+
"element": "div",
|
|
78
|
+
"required": true,
|
|
79
|
+
"purpose": "The viewer inside the dialog’s full-screen content. Carries data-ui=\"media-viewer\", data-kind, data-zoomed, data-loading, and data-slotted-scheme=\"dark\" — or high-contrast when that is the page’s scheme."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"part": "bar",
|
|
83
|
+
"element": "div",
|
|
84
|
+
"required": true,
|
|
85
|
+
"purpose": "The row above the stage: close, the file’s name and position, the actions."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"part": "close",
|
|
89
|
+
"element": "button",
|
|
90
|
+
"required": true,
|
|
91
|
+
"purpose": "Closes the viewer."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"part": "heading",
|
|
95
|
+
"element": "div",
|
|
96
|
+
"required": true,
|
|
97
|
+
"purpose": "The column that holds the title and the position."
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"part": "title",
|
|
101
|
+
"element": "h2",
|
|
102
|
+
"required": true,
|
|
103
|
+
"purpose": "The file’s name, cut in the middle so the extension stays, and the dialog’s accessible name."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"part": "position",
|
|
107
|
+
"element": "p",
|
|
108
|
+
"required": false,
|
|
109
|
+
"purpose": "Which of how many, and the dialog’s description. Absent for a set of one."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"part": "actions",
|
|
113
|
+
"element": "div",
|
|
114
|
+
"required": true,
|
|
115
|
+
"purpose": "The consumer’s own controls, projected with slMediaViewerAction, and the download."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"part": "download",
|
|
119
|
+
"element": "a download",
|
|
120
|
+
"required": false,
|
|
121
|
+
"purpose": "The platform’s download of the item’s downloadHref."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"part": "stage",
|
|
125
|
+
"element": "div",
|
|
126
|
+
"required": true,
|
|
127
|
+
"purpose": "Where the file is drawn and the scrollport of a zoomed picture; focus lands here when the viewer opens."
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"part": "frame",
|
|
131
|
+
"element": "div",
|
|
132
|
+
"required": false,
|
|
133
|
+
"purpose": "The box a zoomed or turned picture takes, axes swapped at a quarter turn. At the fit it steps out of the layout."
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"part": "media",
|
|
137
|
+
"element": "img, iframe, video or audio",
|
|
138
|
+
"required": false,
|
|
139
|
+
"purpose": "The file itself, drawn by the platform: a picture, the browser’s PDF or text reader, a film or a sound with native controls."
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"part": "unsupported",
|
|
143
|
+
"element": "div",
|
|
144
|
+
"required": false,
|
|
145
|
+
"purpose": "For a kind the browser cannot draw: the tile, a heading, one sentence and the download."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"part": "tile",
|
|
149
|
+
"element": "span",
|
|
150
|
+
"required": false,
|
|
151
|
+
"purpose": "The mark of the file’s kind, with its extension across its foot."
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"part": "text",
|
|
155
|
+
"element": "div",
|
|
156
|
+
"required": false,
|
|
157
|
+
"purpose": "The page a text file is set on: JSON indented, the rest as written, cut at 1 MiB with a note."
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"part": "retry",
|
|
161
|
+
"element": "button",
|
|
162
|
+
"required": false,
|
|
163
|
+
"purpose": "Loads the file again after it did not load."
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"part": "status",
|
|
167
|
+
"element": "div role=\"status\"",
|
|
168
|
+
"required": false,
|
|
169
|
+
"purpose": "Announces a file that is loading; when it did not load, the tile, a heading, a sentence, retry and the download."
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"part": "previous",
|
|
173
|
+
"element": "button",
|
|
174
|
+
"required": false,
|
|
175
|
+
"purpose": "The previous file, over the stage’s start. Disabled at the first without loop; hidden below 600 pixels, where the swipe steps."
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"part": "next",
|
|
179
|
+
"element": "button",
|
|
180
|
+
"required": false,
|
|
181
|
+
"purpose": "The next file, over the stage’s end, under the same rules."
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"part": "zoom",
|
|
185
|
+
"element": "div role=\"group\"",
|
|
186
|
+
"required": false,
|
|
187
|
+
"purpose": "The floating pill under the stage. Present only for a picture that loaded."
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"part": "zoom-out",
|
|
191
|
+
"element": "button",
|
|
192
|
+
"required": false,
|
|
193
|
+
"purpose": "One zoomStep down."
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"part": "zoom-level",
|
|
197
|
+
"element": "output",
|
|
198
|
+
"required": false,
|
|
199
|
+
"purpose": "The level as a percentage of the fit, in tabular figures."
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"part": "zoom-in",
|
|
203
|
+
"element": "button",
|
|
204
|
+
"required": false,
|
|
205
|
+
"purpose": "One zoomStep up."
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"part": "fit",
|
|
209
|
+
"element": "button",
|
|
210
|
+
"required": false,
|
|
211
|
+
"purpose": "Back to the whole picture."
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"part": "rotate",
|
|
215
|
+
"element": "button",
|
|
216
|
+
"required": false,
|
|
217
|
+
"purpose": "A quarter turn clockwise."
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"part": "caption",
|
|
221
|
+
"element": "p",
|
|
222
|
+
"required": false,
|
|
223
|
+
"purpose": "The item’s caption under the stage, in its own direction."
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"part": "thumbnails",
|
|
227
|
+
"element": "div role=\"group\"",
|
|
228
|
+
"required": false,
|
|
229
|
+
"purpose": "A strip of the set, drawn with the thumbnails input."
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"part": "thumbnail",
|
|
233
|
+
"element": "button",
|
|
234
|
+
"required": false,
|
|
235
|
+
"purpose": "One file of the strip; the current one carries aria-current and a frame."
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"api": [
|
|
239
|
+
{
|
|
240
|
+
"name": "items",
|
|
241
|
+
"type": "MediaViewerItem[]",
|
|
242
|
+
"defaultValue": "[]",
|
|
243
|
+
"appliesTo": "sl-media-viewer",
|
|
244
|
+
"description": "{ id, src, name, type, caption?, downloadHref?, thumbnail?, width?, height? }; type is a MIME type"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "open",
|
|
248
|
+
"type": "model<boolean>",
|
|
249
|
+
"defaultValue": "false",
|
|
250
|
+
"appliesTo": "sl-media-viewer",
|
|
251
|
+
"description": "Whether the viewer is shown; [(open)] two-way"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "value",
|
|
255
|
+
"type": "model<string | undefined>",
|
|
256
|
+
"defaultValue": "the first item",
|
|
257
|
+
"appliesTo": "sl-media-viewer",
|
|
258
|
+
"description": "The id of the item shown; [(value)] two-way"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "zoom",
|
|
262
|
+
"type": "model<number>",
|
|
263
|
+
"defaultValue": "1",
|
|
264
|
+
"appliesTo": "sl-media-viewer",
|
|
265
|
+
"description": "The level, a multiple of the fit; [(zoom)] two-way"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "rotation",
|
|
269
|
+
"type": "model<0 | 90 | 180 | 270>",
|
|
270
|
+
"defaultValue": "0",
|
|
271
|
+
"appliesTo": "sl-media-viewer",
|
|
272
|
+
"description": "The turn; [(rotation)] two-way"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "minZoom",
|
|
276
|
+
"type": "number",
|
|
277
|
+
"defaultValue": "1",
|
|
278
|
+
"appliesTo": "sl-media-viewer",
|
|
279
|
+
"description": "The lowest level; 1 is the whole picture"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "maxZoom",
|
|
283
|
+
"type": "number",
|
|
284
|
+
"defaultValue": "4",
|
|
285
|
+
"appliesTo": "sl-media-viewer",
|
|
286
|
+
"description": "The highest level"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "zoomStep",
|
|
290
|
+
"type": "number",
|
|
291
|
+
"defaultValue": "0.25",
|
|
292
|
+
"appliesTo": "sl-media-viewer",
|
|
293
|
+
"description": "What a button, a key or 100 pixels of wheel add"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "loop",
|
|
297
|
+
"type": "boolean",
|
|
298
|
+
"defaultValue": "false",
|
|
299
|
+
"appliesTo": "sl-media-viewer",
|
|
300
|
+
"description": "Steps wrap at the ends instead of stopping"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "thumbnails",
|
|
304
|
+
"type": "boolean",
|
|
305
|
+
"defaultValue": "false",
|
|
306
|
+
"appliesTo": "sl-media-viewer",
|
|
307
|
+
"description": "Draws the strip of the set under the stage"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "thumbnailsLabel",
|
|
311
|
+
"type": "string",
|
|
312
|
+
"defaultValue": "—",
|
|
313
|
+
"appliesTo": "sl-media-viewer",
|
|
314
|
+
"description": "The strip’s accessible name"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "fullscreenToggle",
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"defaultValue": "false",
|
|
320
|
+
"appliesTo": "sl-media-viewer",
|
|
321
|
+
"description": "Passed to sl-dialog: asks the platform for the whole screen"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "container",
|
|
325
|
+
"type": "Element | null",
|
|
326
|
+
"defaultValue": "the dialog’s own",
|
|
327
|
+
"appliesTo": "sl-media-viewer",
|
|
328
|
+
"description": "Where the layer is written"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"name": "messages",
|
|
332
|
+
"type": "Partial<MediaViewerMessages>",
|
|
333
|
+
"defaultValue": "—",
|
|
334
|
+
"appliesTo": "sl-media-viewer",
|
|
335
|
+
"description": "Words laid over the language in force, key by key: close, previous, next, zoomIn, zoomOut, fit, rotate, download, position, zoomLevel, unsupportedTitle, unsupported, errorTitle, error, retry, truncated, loading, announce, label"
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
"composition": [
|
|
339
|
+
{
|
|
340
|
+
"name": "provideMediaViewerDefaults",
|
|
341
|
+
"type": "{ minZoom, maxZoom, zoomStep, loop, messages }",
|
|
342
|
+
"defaultValue": "—",
|
|
343
|
+
"appliesTo": "providers",
|
|
344
|
+
"description": "Sets them once for every viewer under the injector; an input still wins"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "slMediaViewerAction",
|
|
348
|
+
"type": "directive",
|
|
349
|
+
"defaultValue": "—",
|
|
350
|
+
"appliesTo": "a control of the consumer’s own",
|
|
351
|
+
"description": "Projected into the bar beside the download"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "exportAs",
|
|
355
|
+
"type": "slMediaViewer",
|
|
356
|
+
"defaultValue": "—",
|
|
357
|
+
"appliesTo": "sl-media-viewer",
|
|
358
|
+
"description": "The instance: requestStep, requestZoom, requestRotation, requestOpen"
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"events": [
|
|
362
|
+
{
|
|
363
|
+
"name": "openChangeRequest",
|
|
364
|
+
"payload": "ChangeRequest<boolean>: { value, previous, reason: 'pointer' | 'keyboard' | 'escape' | 'outsidePress' | 'back' | 'programmatic', cancel() }",
|
|
365
|
+
"when": "The close button, Escape, the platform’s back, a click on the ground beside the picture, a pull down on a finger, or a set that became empty. cancel() keeps the viewer open."
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"name": "valueChangeRequest",
|
|
369
|
+
"payload": "ChangeRequest<string>: { value, previous, reason: 'pointer' | 'keyboard' | 'remove' | 'programmatic', cancel() }",
|
|
370
|
+
"when": "A step by a button, a thumbnail, an arrow, Home, End or a swipe; remove when the shown item left the set and its neighbour takes its place."
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "zoomChangeRequest",
|
|
374
|
+
"payload": "ChangeRequest<number>: { value, previous, reason: 'pointer' | 'keyboard' | 'select' | 'programmatic', cancel() }",
|
|
375
|
+
"when": "The wheel, a pinch, a double-click, the pill or a key; select when a step puts the level back to the fit."
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "rotationChangeRequest",
|
|
379
|
+
"payload": "ChangeRequest<0 | 90 | 180 | 270>: { value, previous, reason: 'pointer' | 'keyboard' | 'select' | 'programmatic', cancel() }",
|
|
380
|
+
"when": "The rotate button or R; select when a step puts the turn back to 0."
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"accessibility": [
|
|
384
|
+
"The layer is dialog’s: focus enters it, Tab stays inside, Escape and the platform’s back close it, and focus returns to the opener.",
|
|
385
|
+
"The dialog is named by the file’s title and described by its position, so a reader hears “police-report.pdf, 3 of 5” when it opens; a step announces the new name and position politely.",
|
|
386
|
+
"Focus lands on the stage rather than on the close button, because the content is the picture; the stage is named by the file and takes the arrows, plus, minus, zero and R.",
|
|
387
|
+
"The family’s keys give way inside a video, an audio, a frame or a field, whose own keys win; Ctrl and Meta combinations stay the browser’s zoom. A text file keeps the arrows that scroll it.",
|
|
388
|
+
"A text file is fetched and set as text, never executed, so an HTML file shows its source; the stage holding it scrolls under a finger as a document does.",
|
|
389
|
+
"Every control is a real button with a name from the catalog, and the level is an output that is not live, so the zoom does not chatter at every wheel event.",
|
|
390
|
+
"The viewer draws the dark scheme on its dark ground in light and dark, and keeps the high-contrast scheme when the reader chose it."
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
"tokens": [
|
|
395
|
+
"--slotted-border-subtle",
|
|
396
|
+
"--slotted-border-width-thick",
|
|
397
|
+
"--slotted-border-width-thin",
|
|
398
|
+
"--slotted-control-height-lg",
|
|
399
|
+
"--slotted-control-height-md",
|
|
400
|
+
"--slotted-control-icon-size-lg",
|
|
401
|
+
"--slotted-control-icon-size-md",
|
|
402
|
+
"--slotted-control-radius",
|
|
403
|
+
"--slotted-control-transition-duration",
|
|
404
|
+
"--slotted-control-transition-easing",
|
|
405
|
+
"--slotted-duration-short",
|
|
406
|
+
"--slotted-easing-enter",
|
|
407
|
+
"--slotted-focus-ring-color",
|
|
408
|
+
"--slotted-focus-ring-offset",
|
|
409
|
+
"--slotted-focus-ring-width",
|
|
410
|
+
"--slotted-font-family-mono",
|
|
411
|
+
"--slotted-font-size-md",
|
|
412
|
+
"--slotted-font-size-sm",
|
|
413
|
+
"--slotted-font-size-xs",
|
|
414
|
+
"--slotted-font-weight-medium",
|
|
415
|
+
"--slotted-font-weight-semibold",
|
|
416
|
+
"--slotted-line-height-md",
|
|
417
|
+
"--slotted-line-height-sm",
|
|
418
|
+
"--slotted-media-viewer-control-radius",
|
|
419
|
+
"--slotted-media-viewer-ground",
|
|
420
|
+
"--slotted-media-viewer-step-surface",
|
|
421
|
+
"--slotted-media-viewer-text-measure",
|
|
422
|
+
"--slotted-media-viewer-text-surface",
|
|
423
|
+
"--slotted-media-viewer-thumbnail-size",
|
|
424
|
+
"--slotted-media-viewer-tile-glyph-size",
|
|
425
|
+
"--slotted-media-viewer-tile-size",
|
|
426
|
+
"--slotted-media-viewer-zoom-surface",
|
|
427
|
+
"--slotted-radius-full",
|
|
428
|
+
"--slotted-radius-lg",
|
|
429
|
+
"--slotted-radius-md",
|
|
430
|
+
"--slotted-radius-sm",
|
|
431
|
+
"--slotted-shadow-lg",
|
|
432
|
+
"--slotted-shadow-md",
|
|
433
|
+
"--slotted-space-1",
|
|
434
|
+
"--slotted-space-2",
|
|
435
|
+
"--slotted-space-3",
|
|
436
|
+
"--slotted-space-4",
|
|
437
|
+
"--slotted-space-5",
|
|
438
|
+
"--slotted-space-6",
|
|
439
|
+
"--slotted-space-7",
|
|
440
|
+
"--slotted-surface",
|
|
441
|
+
"--slotted-surface-raised",
|
|
442
|
+
"--slotted-text",
|
|
443
|
+
"--slotted-text-muted",
|
|
444
|
+
"--slotted-tone-secondary-subtle-active",
|
|
445
|
+
"--slotted-tone-secondary-subtle-hover"
|
|
446
|
+
],
|
|
447
|
+
"examples": [
|
|
448
|
+
{
|
|
449
|
+
"id": "images",
|
|
450
|
+
"title": "The photographs of a claim",
|
|
451
|
+
"note": "Open any photograph: it stands whole on the dark ground, never larger than its own pixels. Previous and next walk the set; the bar says which of how many.",
|
|
452
|
+
"language": "html",
|
|
453
|
+
"source": "<button slAttachmentTrigger (click)=\"value.set(file.id); open.set(true)\"></button>\n<sl-media-viewer [items]=\"files\" [(open)]=\"open\" [(value)]=\"value\" />\n",
|
|
454
|
+
"verdict": "excerpt"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"id": "zoom",
|
|
458
|
+
"title": "Zoom around a point",
|
|
459
|
+
"note": "The wheel zooms around the point under the pointer by distance, so a trackpad’s many small events do not jump to the maximum. Drag to pan; double-click returns to the fit.",
|
|
460
|
+
"language": "html",
|
|
461
|
+
"source": "<sl-media-viewer [items]=\"files\" [(open)]=\"open\" [maxZoom]=\"8\" [zoomStep]=\"0.5\" />\n",
|
|
462
|
+
"verdict": "excerpt"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"id": "kinds",
|
|
466
|
+
"title": "A photograph, a PDF, a JSON export and a spreadsheet",
|
|
467
|
+
"note": "The PDF opens in the browser’s own reader; the JSON export is read as text, indented and never executed, as a log, a CSV or source would be. A spreadsheet the browser cannot draw gets its tile, a sentence and the download.",
|
|
468
|
+
"language": "html",
|
|
469
|
+
"source": "<sl-media-viewer [items]=\"claimFiles\" [(open)]=\"open\" />\n",
|
|
470
|
+
"verdict": "excerpt"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"id": "states",
|
|
474
|
+
"title": "A picture that fails to load",
|
|
475
|
+
"note": "The photograph’s address no longer answers: the stage says what happened and offers to try again or to download, and the zoom pill leaves because there is nothing to zoom.",
|
|
476
|
+
"language": "html",
|
|
477
|
+
"source": "<sl-media-viewer [items]=\"[front, wheelArch, rear]\" [(open)]=\"open\" />\n",
|
|
478
|
+
"verdict": "excerpt"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"id": "content",
|
|
482
|
+
"title": "A long name and a set of one",
|
|
483
|
+
"note": "A scanner’s name is cut in the middle so the extension stays; the whole name is in the tooltip and the accessible name. A single file draws no steps and no position.",
|
|
484
|
+
"language": "html",
|
|
485
|
+
"source": "<sl-media-viewer [items]=\"[scan]\" [(open)]=\"open\" />\n",
|
|
486
|
+
"verdict": "excerpt"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"id": "thumbnails",
|
|
490
|
+
"title": "A strip of the set",
|
|
491
|
+
"note": "Composed under the stage: the current photograph is framed and the others dimmed until the pointer reaches them. A press steps straight to that file.",
|
|
492
|
+
"language": "html",
|
|
493
|
+
"source": "<sl-media-viewer [items]=\"files\" [(open)]=\"open\" thumbnails thumbnailsLabel=\"Claim photographs\" />\n",
|
|
494
|
+
"verdict": "excerpt"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"id": "composition",
|
|
498
|
+
"title": "Actions of the product, defaults of the application",
|
|
499
|
+
"note": "The bar takes the product’s own controls beside the download. A provider sets the limits, the loop and the words once for every viewer under it.",
|
|
500
|
+
"language": "html",
|
|
501
|
+
"source": "<sl-media-viewer [items]=\"files\" [(open)]=\"open\">\n <button slMediaViewerAction type=\"button\" (click)=\"share()\">Share with adjuster</button>\n</sl-media-viewer>\n",
|
|
502
|
+
"verdict": "excerpt"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"id": "controlled",
|
|
506
|
+
"title": "The application holds the file and the level",
|
|
507
|
+
"note": "Every move is a request with a reason: the step says pointer, keyboard or remove, the level says pointer, keyboard or select. The log below the openers shows each one.",
|
|
508
|
+
"language": "html",
|
|
509
|
+
"source": "<sl-media-viewer\n [items]=\"files\"\n [(open)]=\"open\"\n [(value)]=\"value\"\n [(zoom)]=\"zoom\"\n (zoomChangeRequest)=\"log('level by ' + $event.reason)\"\n/>\n",
|
|
510
|
+
"verdict": "excerpt"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"id": "keyboard",
|
|
514
|
+
"title": "Every key of the viewer",
|
|
515
|
+
"note": "Arrows step while the picture fits and pan once it is zoomed; plus, minus and zero zoom; R turns; Home and End reach the ends; Escape closes and focus returns to the opener.",
|
|
516
|
+
"language": "html",
|
|
517
|
+
"source": "<sl-media-viewer [items]=\"files\" [(open)]=\"open\" />\n",
|
|
518
|
+
"verdict": "excerpt"
|
|
519
|
+
}
|
|
520
|
+
]
|
|
521
|
+
}
|