@slotted/styles 0.1.0-beta.1 → 0.1.0-beta.10
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/package.json +1 -1
- package/src/accordion/accordion.css +10 -10
- package/src/action-bar/action-bar.css +31 -32
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +43 -35
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +356 -301
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +71 -41
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +45 -37
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +139 -64
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +76 -72
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +93 -103
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +152 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +242 -239
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +119 -124
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +81 -85
- package/src/collapsible/collapsible.css +69 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +132 -107
- package/src/combobox/combobox.tokens.json +1 -0
- package/src/command-palette/command-palette.css +84 -90
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +210 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +148 -116
- package/src/data-grid/data-grid.css +504 -469
- package/src/data-grid/data-grid.tokens.json +2 -0
- package/src/data-list/data-list.css +81 -70
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +55 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +40 -42
- package/src/date-range-picker/date-range-picker.css +114 -118
- package/src/datetime-field/datetime-field.css +78 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +61 -63
- package/src/datetime-range-picker/datetime-range-picker.css +149 -156
- package/src/description-list/description-list.css +61 -64
- package/src/detail-panel/detail-panel.css +70 -70
- package/src/dialog/dialog.css +334 -153
- package/src/dialog/dialog.tokens.json +5 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +186 -209
- package/src/entity-picker/entity-picker.css +238 -241
- package/src/entity-picker/entity-picker.tokens.json +1 -0
- package/src/event-calendar/event-calendar.css +343 -385
- package/src/field/field.css +74 -78
- package/src/field-group/field-group.css +22 -25
- package/src/filter-bar/filter-bar.css +193 -209
- package/src/form/form.css +34 -24
- package/src/form/form.tokens.json +1 -0
- package/src/fullscreen/fullscreen.css +24 -25
- package/src/grid/grid.css +28 -28
- package/src/highlight/highlight.css +6 -6
- package/src/hover-card/hover-card.css +6 -6
- package/src/icon/icon.css +19 -15
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +39 -39
- package/src/import-export-center/import-export-center.css +135 -156
- package/src/inline/inline.css +27 -27
- package/src/inline-message/inline-message.css +52 -28
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +30 -26
- package/src/link/link.css +15 -15
- package/src/list/list.css +44 -17
- package/src/list/list.tokens.json +4 -0
- package/src/list-item/list-item.css +80 -66
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +56 -59
- package/src/loading-overlay/loading-overlay.css +75 -92
- package/src/markdown/markdown.css +17 -17
- package/src/menu/menu.css +83 -63
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +182 -202
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +152 -145
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +140 -148
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +84 -83
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +67 -57
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +23 -23
- package/src/page-header/page-header.css +268 -281
- package/src/page-header/page-header.tokens.json +1 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +40 -49
- package/src/progress-indicator/progress-indicator.css +177 -120
- package/src/progress-indicator/progress-indicator.tokens.json +1 -1
- package/src/prompt-composer/prompt-composer.css +221 -102
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +136 -132
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +74 -77
- package/src/runtime-properties.mjs +2 -0
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +39 -32
- package/src/section/section.css +161 -41
- package/src/section/section.tokens.json +7 -2
- package/src/segmented-control/segmented-control.css +254 -97
- package/src/segmented-control/segmented-control.tokens.json +15 -11
- package/src/select/select.css +118 -117
- package/src/select/select.tokens.json +1 -0
- package/src/side-navigation/side-navigation.css +179 -182
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +62 -40
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +39 -182
- package/src/spinner/spinner.tokens.json +0 -2
- package/src/split-button/split-button.css +30 -31
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +341 -224
- package/src/stat-card/stat-card.tokens.json +3 -0
- package/src/status-indicator/status-indicator.css +28 -28
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +310 -165
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +51 -54
- package/src/tabs/tabs.css +330 -302
- package/src/tabs/tabs.tokens.json +8 -5
- package/src/tag/tag.css +79 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +145 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +132 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +31 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +72 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +56 -58
- package/src/time-range-picker/time-range-picker.css +126 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +89 -90
- package/src/toast/toast.tokens.json +5 -0
- package/src/toggle/toggle.css +62 -25
- package/src/toggle/toggle.tokens.json +8 -0
- package/src/toggle-group/toggle-group.css +106 -60
- package/src/toggle-group/toggle-group.tokens.json +10 -0
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +26 -26
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +40 -36
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
package/src/avatar/avatar.css
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* proportion of that length rather than a scale of its own, which is the
|
|
18
18
|
* reasoning `badge` used for the overhang of an anchored count.
|
|
19
19
|
*/
|
|
20
|
-
[data-ui
|
|
20
|
+
[data-ui-avatar][data-part-root] {
|
|
21
21
|
/**
|
|
22
22
|
* Tone. `secondary` reads the `solid-hover` step rather than `solid` for
|
|
23
23
|
* the reason `badge` records: `secondary.solid` is the surface colour in
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
|
|
190
190
|
/* ── Tone: which of the five semantic colours the name resolves to ─────── */
|
|
191
191
|
|
|
192
|
-
[data-ui
|
|
192
|
+
[data-ui-avatar][data-part-root][data-tone='accent'] {
|
|
193
193
|
--_solid: var(--slotted-tone-accent-solid);
|
|
194
194
|
--_solid-edge: var(--slotted-tone-accent-solid);
|
|
195
195
|
--_on-solid: var(--slotted-tone-accent-on-solid);
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
--_text: var(--slotted-tone-accent-text);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
[data-ui
|
|
201
|
+
[data-ui-avatar][data-part-root][data-tone='success'] {
|
|
202
202
|
--_solid: var(--slotted-tone-success-solid);
|
|
203
203
|
--_solid-edge: var(--slotted-tone-success-solid);
|
|
204
204
|
--_on-solid: var(--slotted-tone-success-on-solid);
|
|
@@ -207,7 +207,16 @@
|
|
|
207
207
|
--_text: var(--slotted-tone-success-text);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
[data-ui
|
|
210
|
+
[data-ui-avatar][data-part-root][data-tone='info'] {
|
|
211
|
+
--_solid: var(--slotted-tone-info-solid);
|
|
212
|
+
--_solid-edge: var(--slotted-tone-info-solid);
|
|
213
|
+
--_on-solid: var(--slotted-tone-info-on-solid);
|
|
214
|
+
--_surface: var(--slotted-tone-info-surface);
|
|
215
|
+
--_border: var(--slotted-tone-info-border);
|
|
216
|
+
--_text: var(--slotted-tone-info-text);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
[data-ui-avatar][data-part-root][data-tone='warning'] {
|
|
211
220
|
--_solid: var(--slotted-tone-warning-solid);
|
|
212
221
|
--_solid-edge: var(--slotted-tone-warning-solid);
|
|
213
222
|
--_on-solid: var(--slotted-tone-warning-on-solid);
|
|
@@ -216,7 +225,7 @@
|
|
|
216
225
|
--_text: var(--slotted-tone-warning-text);
|
|
217
226
|
}
|
|
218
227
|
|
|
219
|
-
[data-ui
|
|
228
|
+
[data-ui-avatar][data-part-root][data-tone='danger'] {
|
|
220
229
|
--_solid: var(--slotted-tone-danger-solid);
|
|
221
230
|
--_solid-edge: var(--slotted-tone-danger-solid);
|
|
222
231
|
--_on-solid: var(--slotted-tone-danger-on-solid);
|
|
@@ -236,14 +245,14 @@
|
|
|
236
245
|
* There is no `outline`: an avatar drawn as a ring around nothing is not an
|
|
237
246
|
* avatar, and every one of the fourteen surveyed implementations fills.
|
|
238
247
|
*/
|
|
239
|
-
[data-ui
|
|
248
|
+
[data-ui-avatar][data-part-root][data-variant='soft'] {
|
|
240
249
|
--_ground: var(--_surface, ButtonFace);
|
|
241
250
|
|
|
242
251
|
background-color: var(--_ground);
|
|
243
252
|
color: var(--_text, ButtonText);
|
|
244
253
|
}
|
|
245
254
|
|
|
246
|
-
[data-ui
|
|
255
|
+
[data-ui-avatar][data-part-root][data-variant='solid'] {
|
|
247
256
|
--_edge: var(--_solid-edge);
|
|
248
257
|
--_ground: var(--_solid, ButtonFace);
|
|
249
258
|
|
|
@@ -265,29 +274,29 @@
|
|
|
265
274
|
* Rounded to the pixel: a sixth of 64 is 10.67 and of 28 is 4.67, and a
|
|
266
275
|
* fractional radius spreads the curve over partial pixels at every corner.
|
|
267
276
|
*/
|
|
268
|
-
[data-ui
|
|
277
|
+
[data-ui-avatar][data-part-root][data-shape='square'] {
|
|
269
278
|
--_radius: var(--slotted-avatar-radius, round(nearest, calc(var(--_size) / 6), 1px));
|
|
270
279
|
}
|
|
271
280
|
|
|
272
281
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
273
282
|
|
|
274
|
-
[data-ui
|
|
283
|
+
[data-ui-avatar][data-part-root][data-size='xs'] {
|
|
275
284
|
--slotted-avatar-size: var(--slotted-avatar-size-xs, 24px);
|
|
276
285
|
}
|
|
277
286
|
|
|
278
|
-
[data-ui
|
|
287
|
+
[data-ui-avatar][data-part-root][data-size='sm'] {
|
|
279
288
|
--slotted-avatar-size: var(--slotted-avatar-size-sm, 28px);
|
|
280
289
|
}
|
|
281
290
|
|
|
282
|
-
[data-ui
|
|
291
|
+
[data-ui-avatar][data-part-root][data-size='md'] {
|
|
283
292
|
--slotted-avatar-size: var(--slotted-avatar-size-md, 36px);
|
|
284
293
|
}
|
|
285
294
|
|
|
286
|
-
[data-ui
|
|
295
|
+
[data-ui-avatar][data-part-root][data-size='lg'] {
|
|
287
296
|
--slotted-avatar-size: var(--slotted-avatar-size-lg, 48px);
|
|
288
297
|
}
|
|
289
298
|
|
|
290
|
-
[data-ui
|
|
299
|
+
[data-ui-avatar][data-part-root][data-size='xl'] {
|
|
291
300
|
--slotted-avatar-size: var(--slotted-avatar-size-xl, 64px);
|
|
292
301
|
}
|
|
293
302
|
|
|
@@ -304,7 +313,7 @@
|
|
|
304
313
|
* `prefers-reduced-motion` collapses the duration in the theme, and nothing
|
|
305
314
|
* here loops.
|
|
306
315
|
*/
|
|
307
|
-
[data-ui
|
|
316
|
+
[data-ui-avatar] [data-part-image] {
|
|
308
317
|
block-size: 100%;
|
|
309
318
|
border-radius: inherit;
|
|
310
319
|
inline-size: 100%;
|
|
@@ -320,14 +329,14 @@
|
|
|
320
329
|
* enters on the entering curve and, when a later request fails, leaves on the
|
|
321
330
|
* exiting one. The fallback below is the mirror of it.
|
|
322
331
|
*/
|
|
323
|
-
[data-ui
|
|
332
|
+
[data-ui-avatar][data-status='loaded'] [data-part-image] {
|
|
324
333
|
opacity: 1;
|
|
325
334
|
transition-timing-function: var(--slotted-easing-enter);
|
|
326
335
|
}
|
|
327
336
|
|
|
328
337
|
/* ── What stands in for it ────────────────────────────────────────────── */
|
|
329
338
|
|
|
330
|
-
[data-ui
|
|
339
|
+
[data-ui-avatar] [data-part-fallback] {
|
|
331
340
|
/**
|
|
332
341
|
* The last step of the fallback order, and the only artwork this family
|
|
333
342
|
* owns. It is reached when there is no picture and no name to take
|
|
@@ -357,7 +366,7 @@
|
|
|
357
366
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-enter);
|
|
358
367
|
}
|
|
359
368
|
|
|
360
|
-
[data-ui
|
|
369
|
+
[data-ui-avatar][data-status='loaded'] [data-part-fallback] {
|
|
361
370
|
/**
|
|
362
371
|
* It leaves as the picture arrives rather than the instant the load
|
|
363
372
|
* reports, so the two cross rather than flicker. It is still painted
|
|
@@ -394,7 +403,7 @@
|
|
|
394
403
|
* family's own glyph as well, which is an icon and needs no line at all.
|
|
395
404
|
*/
|
|
396
405
|
@supports (text-box: trim-both cap alphabetic) {
|
|
397
|
-
[data-ui
|
|
406
|
+
[data-ui-avatar] [data-part-fallback]:not(:has(> *)) {
|
|
398
407
|
align-content: center;
|
|
399
408
|
display: block;
|
|
400
409
|
text-align: center;
|
|
@@ -413,8 +422,29 @@
|
|
|
413
422
|
* resolve in the order `STATE_PRECEDENCE` declares with no selector weight
|
|
414
423
|
* standing in for the order.
|
|
415
424
|
*/
|
|
416
|
-
[data-ui
|
|
425
|
+
[data-ui-avatar][data-part-root][data-status='loaded'] {
|
|
426
|
+
/* The picture is the avatar once it has loaded: the tone's ground stood
|
|
427
|
+
behind it, and a logo with transparency designed for a white ground
|
|
428
|
+
vanished on the dark tint. */
|
|
429
|
+
--_ground: transparent;
|
|
430
|
+
--_edge: var(--slotted-border-subtle, ButtonBorder);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The ground, when the consumer chooses it. `none` paints none, the fallback
|
|
435
|
+
* included: initials standing on the page. `plate` paints a light plate in
|
|
436
|
+
* every scheme, for a logo designed for a white ground; the hairline keeps
|
|
437
|
+
* it apart from a light page, and the fallback's ink is dark on it.
|
|
438
|
+
*/
|
|
439
|
+
[data-ui-avatar][data-part-root][data-surface='none'] {
|
|
440
|
+
--_ground: transparent;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
[data-ui-avatar][data-part-root][data-surface='plate'] {
|
|
417
444
|
--_edge: var(--slotted-border-subtle, ButtonBorder);
|
|
445
|
+
--_ground: var(--slotted-avatar-plate-surface, #ffffff);
|
|
446
|
+
|
|
447
|
+
color: var(--slotted-avatar-plate-color, #1f2937);
|
|
418
448
|
}
|
|
419
449
|
|
|
420
450
|
/* ── Disabled ─────────────────────────────────────────────────────────── */
|
|
@@ -425,7 +455,7 @@
|
|
|
425
455
|
* disabled foreground, which the theme holds against the disabled ground, and
|
|
426
456
|
* the photograph loses its colour rather than its contrast.
|
|
427
457
|
*/
|
|
428
|
-
[data-ui
|
|
458
|
+
[data-ui-avatar][data-part-root][data-disabled] {
|
|
429
459
|
--_solid: var(--slotted-disabled-background, Canvas);
|
|
430
460
|
--_on-solid: var(--slotted-disabled-foreground, GrayText);
|
|
431
461
|
--_surface: var(--slotted-disabled-background, Canvas);
|
|
@@ -440,7 +470,7 @@
|
|
|
440
470
|
* has no photograph at all. Grey alone kept every luminance, which made a
|
|
441
471
|
* deactivated portrait the strongest thing in a row of disabled avatars.
|
|
442
472
|
*/
|
|
443
|
-
[data-ui
|
|
473
|
+
[data-ui-avatar][data-part-root][data-disabled] [data-part-image] {
|
|
444
474
|
filter: var(--slotted-avatar-disabled-image-filter, grayscale(1) opacity(0.5));
|
|
445
475
|
}
|
|
446
476
|
|
|
@@ -456,9 +486,9 @@
|
|
|
456
486
|
* A weak state held back for the stronger one: a disabled avatar answers no
|
|
457
487
|
* hover, which is the rule that test exists to keep.
|
|
458
488
|
*/
|
|
459
|
-
[data-ui
|
|
460
|
-
button[data-ui
|
|
461
|
-
[data-ui
|
|
489
|
+
[data-ui-avatar][data-part-root]:any-link,
|
|
490
|
+
button[data-ui-avatar][data-part-root],
|
|
491
|
+
[data-ui-avatar][data-part-root][tabindex] {
|
|
462
492
|
cursor: pointer;
|
|
463
493
|
/**
|
|
464
494
|
* The target below hangs outside the box on purpose. A box whose content
|
|
@@ -492,9 +522,9 @@
|
|
|
492
522
|
* Press exists because `render` makes the root a link or a button, and a
|
|
493
523
|
* command that does not answer the press reads as one that did not register.
|
|
494
524
|
*/
|
|
495
|
-
[data-ui
|
|
496
|
-
button[data-ui
|
|
497
|
-
[data-ui
|
|
525
|
+
[data-ui-avatar][data-part-root]:any-link:not([data-disabled]):hover,
|
|
526
|
+
button[data-ui-avatar][data-part-root]:not([data-disabled]):hover,
|
|
527
|
+
[data-ui-avatar][data-part-root][tabindex]:not([data-disabled]):hover {
|
|
498
528
|
background-color: color-mix(
|
|
499
529
|
in oklab,
|
|
500
530
|
var(--_ground),
|
|
@@ -502,9 +532,9 @@
|
|
|
502
532
|
);
|
|
503
533
|
}
|
|
504
534
|
|
|
505
|
-
[data-ui
|
|
506
|
-
button[data-ui
|
|
507
|
-
[data-ui
|
|
535
|
+
[data-ui-avatar][data-part-root]:any-link:not([data-disabled]):active,
|
|
536
|
+
button[data-ui-avatar][data-part-root]:not([data-disabled]):active,
|
|
537
|
+
[data-ui-avatar][data-part-root][tabindex]:not([data-disabled]):active {
|
|
508
538
|
background-color: color-mix(
|
|
509
539
|
in oklab,
|
|
510
540
|
var(--_ground),
|
|
@@ -525,17 +555,17 @@
|
|
|
525
555
|
* declaration of the same token win without either file knowing the order
|
|
526
556
|
* the other is loaded in.
|
|
527
557
|
*/
|
|
528
|
-
[data-ui
|
|
529
|
-
button[data-ui
|
|
530
|
-
[data-ui
|
|
558
|
+
[data-ui-avatar][data-status='loaded']:any-link:not([data-disabled]):hover,
|
|
559
|
+
button[data-ui-avatar][data-status='loaded']:not([data-disabled]):hover,
|
|
560
|
+
[data-ui-avatar][data-status='loaded'][tabindex]:not([data-disabled]):hover {
|
|
531
561
|
--_edge: var(--slotted-border-strong, CanvasText);
|
|
532
562
|
--slotted-avatar-ring-width: var(--slotted-border-width-thin, 1px);
|
|
533
563
|
--slotted-avatar-ring-color: var(--slotted-border-strong, CanvasText);
|
|
534
564
|
}
|
|
535
565
|
|
|
536
|
-
[data-ui
|
|
537
|
-
button[data-ui
|
|
538
|
-
[data-ui
|
|
566
|
+
[data-ui-avatar][data-status='loaded']:any-link:not([data-disabled]):active,
|
|
567
|
+
button[data-ui-avatar][data-status='loaded']:not([data-disabled]):active,
|
|
568
|
+
[data-ui-avatar][data-status='loaded'][tabindex]:not([data-disabled]):active {
|
|
539
569
|
--slotted-avatar-ring-width: var(--slotted-border-width-thick, 2px);
|
|
540
570
|
}
|
|
541
571
|
|
|
@@ -544,7 +574,7 @@
|
|
|
544
574
|
* on its own, and a ring that appears only where a family expects focus is a
|
|
545
575
|
* ring that goes missing the first time a consumer makes one a link.
|
|
546
576
|
*/
|
|
547
|
-
[data-ui
|
|
577
|
+
[data-ui-avatar][data-part-root]:focus-visible {
|
|
548
578
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
549
579
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
550
580
|
}
|
|
@@ -570,9 +600,9 @@
|
|
|
570
600
|
* Fluent ships a 16-pixel avatar and Atlassian a 16- and a 20-pixel one, and
|
|
571
601
|
* both accept a click on it as it stands.
|
|
572
602
|
*/
|
|
573
|
-
[data-ui
|
|
574
|
-
button[data-ui
|
|
575
|
-
[data-ui
|
|
603
|
+
[data-ui-avatar][data-part-root]:any-link::after,
|
|
604
|
+
button[data-ui-avatar][data-part-root]::after,
|
|
605
|
+
[data-ui-avatar][data-part-root][tabindex]::after {
|
|
576
606
|
content: '';
|
|
577
607
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
578
608
|
position: absolute;
|
|
@@ -591,7 +621,7 @@
|
|
|
591
621
|
* photograph.
|
|
592
622
|
*/
|
|
593
623
|
@media (forced-colors: active) {
|
|
594
|
-
[data-ui
|
|
624
|
+
[data-ui-avatar][data-part-root] {
|
|
595
625
|
--_edge: currentColor;
|
|
596
626
|
}
|
|
597
627
|
}
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
"--slotted-avatar-font-weight",
|
|
7
7
|
"--slotted-avatar-glyph-size",
|
|
8
8
|
"--slotted-avatar-initials-size",
|
|
9
|
+
"--slotted-avatar-plate-color",
|
|
10
|
+
"--slotted-avatar-plate-surface",
|
|
9
11
|
"--slotted-avatar-radius",
|
|
10
12
|
"--slotted-avatar-ring-color",
|
|
11
13
|
"--slotted-avatar-ring-width",
|
|
@@ -46,6 +48,11 @@
|
|
|
46
48
|
"--slotted-tone-danger-solid",
|
|
47
49
|
"--slotted-tone-danger-surface",
|
|
48
50
|
"--slotted-tone-danger-text",
|
|
51
|
+
"--slotted-tone-info-border",
|
|
52
|
+
"--slotted-tone-info-on-solid",
|
|
53
|
+
"--slotted-tone-info-solid",
|
|
54
|
+
"--slotted-tone-info-surface",
|
|
55
|
+
"--slotted-tone-info-text",
|
|
49
56
|
"--slotted-tone-secondary-border",
|
|
50
57
|
"--slotted-tone-secondary-on-solid",
|
|
51
58
|
"--slotted-tone-secondary-solid-hover",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* the decision `button-group` already took for the same question: a second
|
|
13
13
|
* way to name one thing is a second thing to get wrong.
|
|
14
14
|
*/
|
|
15
|
-
[data-ui
|
|
15
|
+
[data-ui-avatar-group][data-part-root] {
|
|
16
16
|
/**
|
|
17
17
|
* How much of a member the next one covers, as a fraction of its own box.
|
|
18
18
|
* A proportion rather than a step of the space scale, because what has to
|
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
* beside it drifts for a reason nobody can see in the markup. The same
|
|
77
77
|
* decision `button-group` took.
|
|
78
78
|
*/
|
|
79
|
-
[data-ui
|
|
79
|
+
[data-ui-avatar-group][data-part-root]:empty {
|
|
80
80
|
display: none;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
[data-ui
|
|
84
|
-
[data-ui
|
|
83
|
+
[data-ui-avatar-group] [data-part-item],
|
|
84
|
+
[data-ui-avatar-group] [data-part-overflow] {
|
|
85
85
|
display: flex;
|
|
86
86
|
/* Not a stacking context: `z-index` stays `auto` so a member raised on
|
|
87
87
|
hover rises above its neighbours rather than only inside its own item. */
|
|
@@ -95,30 +95,29 @@
|
|
|
95
95
|
* curve of the state it arrives at, which is why the rest rule carries the
|
|
96
96
|
* exit.
|
|
97
97
|
*/
|
|
98
|
-
[data-ui
|
|
99
|
-
[data-ui='avatar'][data-part='root'] {
|
|
98
|
+
[data-ui-avatar-group][data-part-root][data-layout='stack'] [data-ui-avatar][data-part-root] {
|
|
100
99
|
transition-timing-function: var(--slotted-easing-exit);
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
104
103
|
|
|
105
|
-
[data-ui
|
|
104
|
+
[data-ui-avatar-group][data-part-root][data-size='xs'] {
|
|
106
105
|
--slotted-avatar-size: var(--slotted-avatar-size-xs, 24px);
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
[data-ui
|
|
108
|
+
[data-ui-avatar-group][data-part-root][data-size='sm'] {
|
|
110
109
|
--slotted-avatar-size: var(--slotted-avatar-size-sm, 28px);
|
|
111
110
|
}
|
|
112
111
|
|
|
113
|
-
[data-ui
|
|
112
|
+
[data-ui-avatar-group][data-part-root][data-size='md'] {
|
|
114
113
|
--slotted-avatar-size: var(--slotted-avatar-size-md, 36px);
|
|
115
114
|
}
|
|
116
115
|
|
|
117
|
-
[data-ui
|
|
116
|
+
[data-ui-avatar-group][data-part-root][data-size='lg'] {
|
|
118
117
|
--slotted-avatar-size: var(--slotted-avatar-size-lg, 48px);
|
|
119
118
|
}
|
|
120
119
|
|
|
121
|
-
[data-ui
|
|
120
|
+
[data-ui-avatar-group][data-part-root][data-size='xl'] {
|
|
122
121
|
--slotted-avatar-size: var(--slotted-avatar-size-xl, 64px);
|
|
123
122
|
}
|
|
124
123
|
|
|
@@ -132,7 +131,7 @@
|
|
|
132
131
|
* Members are not wrapped: a stack that broke across two lines would leave
|
|
133
132
|
* the last face of the first line overlapping nothing.
|
|
134
133
|
*/
|
|
135
|
-
[data-ui
|
|
134
|
+
[data-ui-avatar-group][data-part-root][data-layout='stack'] {
|
|
136
135
|
flex-wrap: nowrap;
|
|
137
136
|
}
|
|
138
137
|
|
|
@@ -141,7 +140,7 @@
|
|
|
141
140
|
* so the stack has one curve per face instead of a second thick ring layered
|
|
142
141
|
* over every member.
|
|
143
142
|
*/
|
|
144
|
-
[data-ui
|
|
143
|
+
[data-ui-avatar-group][data-part-root][data-layout='stack'] > * + * {
|
|
145
144
|
/* Whole pixels: 0.28 of 36 is 10.08, which left every member after the
|
|
146
145
|
first on a fractional x (50.92, 76.84, 102.77) and softened its edge. */
|
|
147
146
|
margin-inline-start: calc(round(nearest, calc(var(--_size) * var(--_overlap)), 1px) * -1);
|
|
@@ -152,7 +151,7 @@
|
|
|
152
151
|
* to go somewhere, and a group laid out apart has no stacking order to lose
|
|
153
152
|
* by breaking.
|
|
154
153
|
*/
|
|
155
|
-
[data-ui
|
|
154
|
+
[data-ui-avatar-group][data-part-root][data-layout='spread'] {
|
|
156
155
|
flex-wrap: wrap;
|
|
157
156
|
/**
|
|
158
157
|
* A step of the space scale rather than a proportion of the avatar, because
|
|
@@ -206,8 +205,8 @@
|
|
|
206
205
|
* neighbours keep the box they had at rest, in three schemes and three
|
|
207
206
|
* densities.
|
|
208
207
|
*/
|
|
209
|
-
[data-ui
|
|
210
|
-
[data-ui
|
|
208
|
+
[data-ui-avatar-group][data-layout='stack']
|
|
209
|
+
[data-ui-avatar][data-part-root]:not([data-disabled]):hover {
|
|
211
210
|
--slotted-avatar-ring-width: var(--_raise-ring);
|
|
212
211
|
--slotted-avatar-elevation: var(--_raise-shadow);
|
|
213
212
|
|
|
@@ -216,7 +215,7 @@
|
|
|
216
215
|
transition-timing-function: var(--slotted-easing-enter);
|
|
217
216
|
}
|
|
218
217
|
|
|
219
|
-
[data-ui
|
|
218
|
+
[data-ui-avatar-group][data-layout='stack'] [data-ui-avatar][data-part-root]:focus-visible {
|
|
220
219
|
z-index: 1;
|
|
221
220
|
transform: translateY(var(--_raise-lift));
|
|
222
221
|
transition-timing-function: var(--slotted-easing-enter);
|
|
@@ -227,8 +226,8 @@
|
|
|
227
226
|
* translate and not a scale for the reason the lift is (R7), and it is a
|
|
228
227
|
* different answer from the hover, which is the whole point of a press.
|
|
229
228
|
*/
|
|
230
|
-
[data-ui
|
|
231
|
-
[data-ui
|
|
229
|
+
[data-ui-avatar-group][data-layout='stack']
|
|
230
|
+
[data-ui-avatar][data-part-root]:not([data-disabled]):active {
|
|
232
231
|
transform: translateY(calc(var(--_raise-lift) / 2));
|
|
233
232
|
}
|
|
234
233
|
|
|
@@ -240,12 +239,12 @@
|
|
|
240
239
|
* not move is a light source switching on.
|
|
241
240
|
*/
|
|
242
241
|
@media (prefers-reduced-motion: reduce) {
|
|
243
|
-
[data-ui
|
|
242
|
+
[data-ui-avatar-group][data-part-root][data-layout='stack'] {
|
|
244
243
|
--_raise-lift: 0px;
|
|
245
244
|
--_raise-shadow: 0 0 transparent;
|
|
246
245
|
}
|
|
247
246
|
|
|
248
|
-
[data-ui
|
|
247
|
+
[data-ui-avatar-group][data-layout='stack'] [data-ui-avatar][data-part-root] {
|
|
249
248
|
transition: none;
|
|
250
249
|
}
|
|
251
250
|
}
|
|
@@ -260,7 +259,7 @@
|
|
|
260
259
|
* from jittering as the count crosses a power of ten, which is the same rule
|
|
261
260
|
* `badge` applies to its own count.
|
|
262
261
|
*/
|
|
263
|
-
[data-ui
|
|
262
|
+
[data-ui-avatar-group] [data-part-overflow] [data-ui-avatar][data-part-root] {
|
|
264
263
|
--slotted-avatar-initials-size: round(nearest, calc(var(--_size) * 0.36), 1px);
|
|
265
264
|
|
|
266
265
|
font-variant-numeric: tabular-nums;
|