@slotted/styles 0.1.0-beta.7 → 0.1.0-beta.9
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 +35 -35
- package/src/app-shell/app-shell.css +280 -299
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +41 -41
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +37 -37
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +88 -69
- package/src/button-group/button-group.css +69 -73
- 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 +147 -151
- package/src/chart/chart.css +225 -240
- 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 +99 -101
- 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 +99 -104
- package/src/dashboard-grid/dashboard-grid.css +104 -107
- package/src/data-grid/data-grid.css +458 -456
- package/src/data-grid/data-grid.tokens.json +2 -0
- package/src/data-list/data-list.css +67 -69
- package/src/date-field/date-field.css +50 -50
- 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 +73 -78
- 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 +312 -148
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +186 -209
- package/src/entity-picker/entity-picker.css +220 -239
- 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 +21 -24
- 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 +15 -15
- 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 +28 -28
- package/src/kbd/kbd.css +26 -26
- package/src/link/link.css +15 -15
- package/src/list/list.css +20 -20
- package/src/list-item/list-item.css +66 -66
- 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 +63 -65
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +174 -202
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +131 -137
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +134 -148
- package/src/number-field/number-field.css +76 -81
- package/src/otp-input/otp-input.css +48 -48
- package/src/page/page.css +23 -23
- package/src/page-header/page-header.css +219 -280
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +40 -49
- package/src/progress-indicator/progress-indicator.css +85 -90
- package/src/prompt-composer/prompt-composer.css +94 -99
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +132 -132
- package/src/result-state/result-state.css +74 -77
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +32 -35
- package/src/section/section.css +16 -16
- package/src/segmented-control/segmented-control.css +77 -79
- package/src/select/select.css +113 -115
- package/src/side-navigation/side-navigation.css +170 -180
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +32 -32
- package/src/spinner/spinner.css +4 -4
- package/src/split-button/split-button.css +26 -31
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +102 -103
- 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 +189 -198
- package/src/table-of-contents/table-of-contents.css +51 -54
- package/src/tabs/tabs.css +157 -172
- package/src/tag/tag.css +67 -71
- package/src/tags-input/tags-input.css +124 -74
- package/src/tags-input/tags-input.tokens.json +6 -1
- package/src/text-field/text-field.css +108 -126
- package/src/textarea/textarea.css +26 -26
- package/src/time-field/time-field.css +67 -67
- 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 +244 -266
- package/src/toast/toast.css +81 -90
- package/src/toggle/toggle.css +29 -33
- package/src/toggle-group/toggle-group.css +67 -71
- 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 +36 -36
- 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,7 @@
|
|
|
207
207
|
--_text: var(--slotted-tone-success-text);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
[data-ui
|
|
210
|
+
[data-ui-avatar][data-part-root][data-tone='warning'] {
|
|
211
211
|
--_solid: var(--slotted-tone-warning-solid);
|
|
212
212
|
--_solid-edge: var(--slotted-tone-warning-solid);
|
|
213
213
|
--_on-solid: var(--slotted-tone-warning-on-solid);
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
--_text: var(--slotted-tone-warning-text);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
[data-ui
|
|
219
|
+
[data-ui-avatar][data-part-root][data-tone='danger'] {
|
|
220
220
|
--_solid: var(--slotted-tone-danger-solid);
|
|
221
221
|
--_solid-edge: var(--slotted-tone-danger-solid);
|
|
222
222
|
--_on-solid: var(--slotted-tone-danger-on-solid);
|
|
@@ -236,14 +236,14 @@
|
|
|
236
236
|
* There is no `outline`: an avatar drawn as a ring around nothing is not an
|
|
237
237
|
* avatar, and every one of the fourteen surveyed implementations fills.
|
|
238
238
|
*/
|
|
239
|
-
[data-ui
|
|
239
|
+
[data-ui-avatar][data-part-root][data-variant='soft'] {
|
|
240
240
|
--_ground: var(--_surface, ButtonFace);
|
|
241
241
|
|
|
242
242
|
background-color: var(--_ground);
|
|
243
243
|
color: var(--_text, ButtonText);
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
[data-ui
|
|
246
|
+
[data-ui-avatar][data-part-root][data-variant='solid'] {
|
|
247
247
|
--_edge: var(--_solid-edge);
|
|
248
248
|
--_ground: var(--_solid, ButtonFace);
|
|
249
249
|
|
|
@@ -265,29 +265,29 @@
|
|
|
265
265
|
* Rounded to the pixel: a sixth of 64 is 10.67 and of 28 is 4.67, and a
|
|
266
266
|
* fractional radius spreads the curve over partial pixels at every corner.
|
|
267
267
|
*/
|
|
268
|
-
[data-ui
|
|
268
|
+
[data-ui-avatar][data-part-root][data-shape='square'] {
|
|
269
269
|
--_radius: var(--slotted-avatar-radius, round(nearest, calc(var(--_size) / 6), 1px));
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
273
273
|
|
|
274
|
-
[data-ui
|
|
274
|
+
[data-ui-avatar][data-part-root][data-size='xs'] {
|
|
275
275
|
--slotted-avatar-size: var(--slotted-avatar-size-xs, 24px);
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
[data-ui
|
|
278
|
+
[data-ui-avatar][data-part-root][data-size='sm'] {
|
|
279
279
|
--slotted-avatar-size: var(--slotted-avatar-size-sm, 28px);
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
[data-ui
|
|
282
|
+
[data-ui-avatar][data-part-root][data-size='md'] {
|
|
283
283
|
--slotted-avatar-size: var(--slotted-avatar-size-md, 36px);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
[data-ui
|
|
286
|
+
[data-ui-avatar][data-part-root][data-size='lg'] {
|
|
287
287
|
--slotted-avatar-size: var(--slotted-avatar-size-lg, 48px);
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
[data-ui
|
|
290
|
+
[data-ui-avatar][data-part-root][data-size='xl'] {
|
|
291
291
|
--slotted-avatar-size: var(--slotted-avatar-size-xl, 64px);
|
|
292
292
|
}
|
|
293
293
|
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
* `prefers-reduced-motion` collapses the duration in the theme, and nothing
|
|
305
305
|
* here loops.
|
|
306
306
|
*/
|
|
307
|
-
[data-ui
|
|
307
|
+
[data-ui-avatar] [data-part-image] {
|
|
308
308
|
block-size: 100%;
|
|
309
309
|
border-radius: inherit;
|
|
310
310
|
inline-size: 100%;
|
|
@@ -320,14 +320,14 @@
|
|
|
320
320
|
* enters on the entering curve and, when a later request fails, leaves on the
|
|
321
321
|
* exiting one. The fallback below is the mirror of it.
|
|
322
322
|
*/
|
|
323
|
-
[data-ui
|
|
323
|
+
[data-ui-avatar][data-status='loaded'] [data-part-image] {
|
|
324
324
|
opacity: 1;
|
|
325
325
|
transition-timing-function: var(--slotted-easing-enter);
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
/* ── What stands in for it ────────────────────────────────────────────── */
|
|
329
329
|
|
|
330
|
-
[data-ui
|
|
330
|
+
[data-ui-avatar] [data-part-fallback] {
|
|
331
331
|
/**
|
|
332
332
|
* The last step of the fallback order, and the only artwork this family
|
|
333
333
|
* owns. It is reached when there is no picture and no name to take
|
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-enter);
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
-
[data-ui
|
|
360
|
+
[data-ui-avatar][data-status='loaded'] [data-part-fallback] {
|
|
361
361
|
/**
|
|
362
362
|
* It leaves as the picture arrives rather than the instant the load
|
|
363
363
|
* reports, so the two cross rather than flicker. It is still painted
|
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
* family's own glyph as well, which is an icon and needs no line at all.
|
|
395
395
|
*/
|
|
396
396
|
@supports (text-box: trim-both cap alphabetic) {
|
|
397
|
-
[data-ui
|
|
397
|
+
[data-ui-avatar] [data-part-fallback]:not(:has(> *)) {
|
|
398
398
|
align-content: center;
|
|
399
399
|
display: block;
|
|
400
400
|
text-align: center;
|
|
@@ -413,7 +413,7 @@
|
|
|
413
413
|
* resolve in the order `STATE_PRECEDENCE` declares with no selector weight
|
|
414
414
|
* standing in for the order.
|
|
415
415
|
*/
|
|
416
|
-
[data-ui
|
|
416
|
+
[data-ui-avatar][data-part-root][data-status='loaded'] {
|
|
417
417
|
--_edge: var(--slotted-border-subtle, ButtonBorder);
|
|
418
418
|
}
|
|
419
419
|
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
* disabled foreground, which the theme holds against the disabled ground, and
|
|
426
426
|
* the photograph loses its colour rather than its contrast.
|
|
427
427
|
*/
|
|
428
|
-
[data-ui
|
|
428
|
+
[data-ui-avatar][data-part-root][data-disabled] {
|
|
429
429
|
--_solid: var(--slotted-disabled-background, Canvas);
|
|
430
430
|
--_on-solid: var(--slotted-disabled-foreground, GrayText);
|
|
431
431
|
--_surface: var(--slotted-disabled-background, Canvas);
|
|
@@ -440,7 +440,7 @@
|
|
|
440
440
|
* has no photograph at all. Grey alone kept every luminance, which made a
|
|
441
441
|
* deactivated portrait the strongest thing in a row of disabled avatars.
|
|
442
442
|
*/
|
|
443
|
-
[data-ui
|
|
443
|
+
[data-ui-avatar][data-part-root][data-disabled] [data-part-image] {
|
|
444
444
|
filter: var(--slotted-avatar-disabled-image-filter, grayscale(1) opacity(0.5));
|
|
445
445
|
}
|
|
446
446
|
|
|
@@ -456,9 +456,9 @@
|
|
|
456
456
|
* A weak state held back for the stronger one: a disabled avatar answers no
|
|
457
457
|
* hover, which is the rule that test exists to keep.
|
|
458
458
|
*/
|
|
459
|
-
[data-ui
|
|
460
|
-
button[data-ui
|
|
461
|
-
[data-ui
|
|
459
|
+
[data-ui-avatar][data-part-root]:any-link,
|
|
460
|
+
button[data-ui-avatar][data-part-root],
|
|
461
|
+
[data-ui-avatar][data-part-root][tabindex] {
|
|
462
462
|
cursor: pointer;
|
|
463
463
|
/**
|
|
464
464
|
* The target below hangs outside the box on purpose. A box whose content
|
|
@@ -492,9 +492,9 @@
|
|
|
492
492
|
* Press exists because `render` makes the root a link or a button, and a
|
|
493
493
|
* command that does not answer the press reads as one that did not register.
|
|
494
494
|
*/
|
|
495
|
-
[data-ui
|
|
496
|
-
button[data-ui
|
|
497
|
-
[data-ui
|
|
495
|
+
[data-ui-avatar][data-part-root]:any-link:not([data-disabled]):hover,
|
|
496
|
+
button[data-ui-avatar][data-part-root]:not([data-disabled]):hover,
|
|
497
|
+
[data-ui-avatar][data-part-root][tabindex]:not([data-disabled]):hover {
|
|
498
498
|
background-color: color-mix(
|
|
499
499
|
in oklab,
|
|
500
500
|
var(--_ground),
|
|
@@ -502,9 +502,9 @@
|
|
|
502
502
|
);
|
|
503
503
|
}
|
|
504
504
|
|
|
505
|
-
[data-ui
|
|
506
|
-
button[data-ui
|
|
507
|
-
[data-ui
|
|
505
|
+
[data-ui-avatar][data-part-root]:any-link:not([data-disabled]):active,
|
|
506
|
+
button[data-ui-avatar][data-part-root]:not([data-disabled]):active,
|
|
507
|
+
[data-ui-avatar][data-part-root][tabindex]:not([data-disabled]):active {
|
|
508
508
|
background-color: color-mix(
|
|
509
509
|
in oklab,
|
|
510
510
|
var(--_ground),
|
|
@@ -525,17 +525,17 @@
|
|
|
525
525
|
* declaration of the same token win without either file knowing the order
|
|
526
526
|
* the other is loaded in.
|
|
527
527
|
*/
|
|
528
|
-
[data-ui
|
|
529
|
-
button[data-ui
|
|
530
|
-
[data-ui
|
|
528
|
+
[data-ui-avatar][data-status='loaded']:any-link:not([data-disabled]):hover,
|
|
529
|
+
button[data-ui-avatar][data-status='loaded']:not([data-disabled]):hover,
|
|
530
|
+
[data-ui-avatar][data-status='loaded'][tabindex]:not([data-disabled]):hover {
|
|
531
531
|
--_edge: var(--slotted-border-strong, CanvasText);
|
|
532
532
|
--slotted-avatar-ring-width: var(--slotted-border-width-thin, 1px);
|
|
533
533
|
--slotted-avatar-ring-color: var(--slotted-border-strong, CanvasText);
|
|
534
534
|
}
|
|
535
535
|
|
|
536
|
-
[data-ui
|
|
537
|
-
button[data-ui
|
|
538
|
-
[data-ui
|
|
536
|
+
[data-ui-avatar][data-status='loaded']:any-link:not([data-disabled]):active,
|
|
537
|
+
button[data-ui-avatar][data-status='loaded']:not([data-disabled]):active,
|
|
538
|
+
[data-ui-avatar][data-status='loaded'][tabindex]:not([data-disabled]):active {
|
|
539
539
|
--slotted-avatar-ring-width: var(--slotted-border-width-thick, 2px);
|
|
540
540
|
}
|
|
541
541
|
|
|
@@ -544,7 +544,7 @@
|
|
|
544
544
|
* on its own, and a ring that appears only where a family expects focus is a
|
|
545
545
|
* ring that goes missing the first time a consumer makes one a link.
|
|
546
546
|
*/
|
|
547
|
-
[data-ui
|
|
547
|
+
[data-ui-avatar][data-part-root]:focus-visible {
|
|
548
548
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
549
549
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
550
550
|
}
|
|
@@ -570,9 +570,9 @@
|
|
|
570
570
|
* Fluent ships a 16-pixel avatar and Atlassian a 16- and a 20-pixel one, and
|
|
571
571
|
* both accept a click on it as it stands.
|
|
572
572
|
*/
|
|
573
|
-
[data-ui
|
|
574
|
-
button[data-ui
|
|
575
|
-
[data-ui
|
|
573
|
+
[data-ui-avatar][data-part-root]:any-link::after,
|
|
574
|
+
button[data-ui-avatar][data-part-root]::after,
|
|
575
|
+
[data-ui-avatar][data-part-root][tabindex]::after {
|
|
576
576
|
content: '';
|
|
577
577
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
578
578
|
position: absolute;
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
* photograph.
|
|
592
592
|
*/
|
|
593
593
|
@media (forced-colors: active) {
|
|
594
|
-
[data-ui
|
|
594
|
+
[data-ui-avatar][data-part-root] {
|
|
595
595
|
--_edge: currentColor;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
@@ -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;
|
package/src/badge/badge.css
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* that keeps an icon-only badge the same height as a text one, and the
|
|
17
17
|
* minimum inline size that makes a one-figure pill a circle.
|
|
18
18
|
*/
|
|
19
|
-
[data-ui
|
|
19
|
+
[data-ui-badge][data-part-root] {
|
|
20
20
|
/**
|
|
21
21
|
* Tone. The default is the one a badge carrying a value should speak in: a
|
|
22
22
|
* badge with no tone stated is holding a number, not an opinion.
|
|
@@ -123,11 +123,11 @@
|
|
|
123
123
|
|
|
124
124
|
/* ── Tone: which of the five semantic colours the badge speaks in ─────── */
|
|
125
125
|
|
|
126
|
-
[data-ui
|
|
126
|
+
[data-ui-badge][data-part-root][data-tone='secondary'] {
|
|
127
127
|
--_edge: var(--_border);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
[data-ui
|
|
130
|
+
[data-ui-badge][data-part-root][data-tone='accent'] {
|
|
131
131
|
--_solid: var(--slotted-tone-accent-solid);
|
|
132
132
|
--_on-solid: var(--slotted-tone-accent-on-solid);
|
|
133
133
|
--_surface: var(--slotted-tone-accent-surface);
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
--_text: var(--slotted-tone-accent-text);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
[data-ui
|
|
138
|
+
[data-ui-badge][data-part-root][data-tone='success'] {
|
|
139
139
|
--_solid: var(--slotted-tone-success-solid);
|
|
140
140
|
--_on-solid: var(--slotted-tone-success-on-solid);
|
|
141
141
|
--_surface: var(--slotted-tone-success-surface);
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
--_text: var(--slotted-tone-success-text);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
[data-ui
|
|
146
|
+
[data-ui-badge][data-part-root][data-tone='warning'] {
|
|
147
147
|
--_solid: var(--slotted-tone-warning-solid);
|
|
148
148
|
--_on-solid: var(--slotted-tone-warning-on-solid);
|
|
149
149
|
--_surface: var(--slotted-tone-warning-surface);
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
--_text: var(--slotted-tone-warning-text);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
[data-ui
|
|
154
|
+
[data-ui-badge][data-part-root][data-tone='danger'] {
|
|
155
155
|
--_solid: var(--slotted-tone-danger-solid);
|
|
156
156
|
--_on-solid: var(--slotted-tone-danger-on-solid);
|
|
157
157
|
--_surface: var(--slotted-tone-danger-surface);
|
|
@@ -180,19 +180,19 @@
|
|
|
180
180
|
* border looks like and disagree about which of them should wear it.
|
|
181
181
|
*/
|
|
182
182
|
|
|
183
|
-
[data-ui
|
|
183
|
+
[data-ui-badge][data-part-root][data-variant='solid'] {
|
|
184
184
|
background-color: var(--_solid, ButtonFace);
|
|
185
185
|
border-color: var(--_edge, ButtonFace);
|
|
186
186
|
color: var(--_on-solid, ButtonText);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
[data-ui
|
|
189
|
+
[data-ui-badge][data-part-root][data-variant='soft'] {
|
|
190
190
|
background-color: var(--_surface, ButtonFace);
|
|
191
191
|
border-color: var(--_border, ButtonBorder);
|
|
192
192
|
color: var(--_text, ButtonText);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
[data-ui
|
|
195
|
+
[data-ui-badge][data-part-root][data-variant='outline'] {
|
|
196
196
|
background-color: transparent;
|
|
197
197
|
border-color: var(--_border, ButtonBorder);
|
|
198
198
|
color: var(--_text, ButtonText);
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
|
|
201
201
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
202
202
|
|
|
203
|
-
[data-ui
|
|
203
|
+
[data-ui-badge][data-part-root][data-size='sm'] {
|
|
204
204
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
205
205
|
/* `0px` rather than `0`: a unitless zero inside the `--_block-size` sum
|
|
206
206
|
makes the whole calculation invalid, and `min-block-size` silently fell
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
* a rounding error: a 12px badge and a 13px badge should not carry visibly
|
|
217
217
|
* different glyphs.
|
|
218
218
|
*/
|
|
219
|
-
[data-ui
|
|
219
|
+
[data-ui-badge][data-part-root][data-size='lg'] {
|
|
220
220
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
221
221
|
--_icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
222
222
|
--_inset-block: var(--slotted-space-2, 0.25rem);
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
|
|
227
227
|
/* ── Shape ────────────────────────────────────────────────────────────── */
|
|
228
228
|
|
|
229
|
-
[data-ui
|
|
229
|
+
[data-ui-badge][data-part-root][data-shape='square'] {
|
|
230
230
|
border-radius: var(--slotted-badge-radius, var(--slotted-radius-sm, 4px));
|
|
231
231
|
}
|
|
232
232
|
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
* A dot renders no value, so nothing is clipped. Text a consumer forces into
|
|
245
245
|
* one overflows rather than disappearing.
|
|
246
246
|
*/
|
|
247
|
-
[data-ui
|
|
247
|
+
[data-ui-badge][data-part-root][data-shape='dot'] {
|
|
248
248
|
block-size: var(--_dot-size);
|
|
249
249
|
border-color: var(--slotted-badge-dot-border-color, var(--slotted-border-strong, CanvasText));
|
|
250
250
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
* can make the root an `<a>` and a ring that appears only where a family
|
|
263
263
|
* expects focus is a ring that goes missing.
|
|
264
264
|
*/
|
|
265
|
-
[data-ui
|
|
265
|
+
[data-ui-badge][data-part-root]:focus-visible {
|
|
266
266
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
267
267
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
268
268
|
}
|
|
@@ -293,14 +293,14 @@
|
|
|
293
293
|
* below its content inside the flex root, which is the condition
|
|
294
294
|
* `text-overflow` needs to have anything to do.
|
|
295
295
|
*/
|
|
296
|
-
[data-ui
|
|
296
|
+
[data-ui-badge] [data-part-label] {
|
|
297
297
|
min-inline-size: 0;
|
|
298
298
|
overflow: hidden;
|
|
299
299
|
text-overflow: ellipsis;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
@supports (text-box: trim-both cap alphabetic) {
|
|
303
|
-
[data-ui
|
|
303
|
+
[data-ui-badge] [data-part-label] {
|
|
304
304
|
/**
|
|
305
305
|
* A descender and a tall diacritic both live outside a box trimmed to the
|
|
306
306
|
* cap and the baseline, and `overflow: hidden` cut them off — visible in
|
|
@@ -323,8 +323,8 @@
|
|
|
323
323
|
* from its container, and a bare glyph host such as `ng-icon` reads the
|
|
324
324
|
* slot's font-size, so both are the glyph scale.
|
|
325
325
|
*/
|
|
326
|
-
[data-ui
|
|
327
|
-
[data-ui
|
|
326
|
+
[data-ui-badge] [data-part-start],
|
|
327
|
+
[data-ui-badge] [data-part-end] {
|
|
328
328
|
--slotted-icon-size: var(--_icon-size);
|
|
329
329
|
|
|
330
330
|
align-items: center;
|
|
@@ -338,8 +338,8 @@
|
|
|
338
338
|
line-height: 1;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
[data-ui
|
|
342
|
-
[data-ui
|
|
341
|
+
[data-ui-badge] [data-part-start] > *,
|
|
342
|
+
[data-ui-badge] [data-part-end] > * {
|
|
343
343
|
block-size: 100%;
|
|
344
344
|
display: block;
|
|
345
345
|
inline-size: 100%;
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
* frame is read in. Everything else — which corner, how far in from it — is
|
|
359
359
|
* written in logical insets and mirrors on its own.
|
|
360
360
|
*/
|
|
361
|
-
[data-ui
|
|
361
|
+
[data-ui-badge][data-part-anchor] {
|
|
362
362
|
--_dir: 1;
|
|
363
363
|
/* Half the badge's own size. A proportion of the box rather than a step of
|
|
364
364
|
any scale, which is why it is geometry here and not a token. */
|
|
@@ -389,25 +389,25 @@
|
|
|
389
389
|
vertical-align: middle;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
[data-ui
|
|
392
|
+
[data-ui-badge][data-part-anchor]:dir(rtl) {
|
|
393
393
|
--_dir: -1;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
[data-ui
|
|
396
|
+
[data-ui-badge][data-part-anchor][data-overlap='circle'] {
|
|
397
397
|
--_anchor-inset: 14%;
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
[data-ui
|
|
401
|
-
[data-ui
|
|
400
|
+
[data-ui-badge][data-part-anchor][data-placement='top-start'],
|
|
401
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-start'] {
|
|
402
402
|
--_overhang-inline: -50%;
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
[data-ui
|
|
406
|
-
[data-ui
|
|
405
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-start'],
|
|
406
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-end'] {
|
|
407
407
|
--_overhang-block: 50%;
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
-
[data-ui
|
|
410
|
+
[data-ui-badge][data-part-anchor] > [data-ui-badge][data-part-root] {
|
|
411
411
|
/**
|
|
412
412
|
* The ring is what separates the badge from whatever it is sitting on.
|
|
413
413
|
* It is a token rather than a boolean, because a badge inside a card, a
|
|
@@ -424,23 +424,23 @@
|
|
|
424
424
|
z-index: 1;
|
|
425
425
|
}
|
|
426
426
|
|
|
427
|
-
[data-ui
|
|
428
|
-
[data-ui
|
|
427
|
+
[data-ui-badge][data-part-anchor][data-placement='top-end'] > [data-part-root],
|
|
428
|
+
[data-ui-badge][data-part-anchor][data-placement='top-start'] > [data-part-root] {
|
|
429
429
|
inset-block-start: var(--_anchor-inset);
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
-
[data-ui
|
|
433
|
-
[data-ui
|
|
432
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-end'] > [data-part-root],
|
|
433
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-start'] > [data-part-root] {
|
|
434
434
|
inset-block-end: var(--_anchor-inset);
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
[data-ui
|
|
438
|
-
[data-ui
|
|
437
|
+
[data-ui-badge][data-part-anchor][data-placement='top-end'] > [data-part-root],
|
|
438
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-end'] > [data-part-root] {
|
|
439
439
|
inset-inline-end: var(--_anchor-inset);
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
-
[data-ui
|
|
443
|
-
[data-ui
|
|
442
|
+
[data-ui-badge][data-part-anchor][data-placement='top-start'] > [data-part-root],
|
|
443
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-start'] > [data-part-root] {
|
|
444
444
|
inset-inline-start: var(--_anchor-inset);
|
|
445
445
|
}
|
|
446
446
|
|
|
@@ -455,7 +455,7 @@
|
|
|
455
455
|
* from the page.
|
|
456
456
|
*/
|
|
457
457
|
@media (forced-colors: active) {
|
|
458
|
-
[data-ui
|
|
458
|
+
[data-ui-badge][data-part-root] {
|
|
459
459
|
border-color: currentColor;
|
|
460
460
|
}
|
|
461
461
|
}
|