@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/menu/menu.css
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* menu holds more commands and is the same component; only the surface's own
|
|
54
54
|
* inset and radius come off the space and radius scales, as `popover`'s do.
|
|
55
55
|
*/
|
|
56
|
-
[data-ui
|
|
56
|
+
[data-ui-menu] {
|
|
57
57
|
--_gap: var(--slotted-menu-gap, var(--slotted-space-2, 0.25rem));
|
|
58
58
|
|
|
59
59
|
--_surface: var(--slotted-menu-surface, var(--slotted-surface-raised, #ffffff));
|
|
@@ -177,21 +177,21 @@
|
|
|
177
177
|
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
[data-ui
|
|
180
|
+
[data-ui-menu][data-side='top'] {
|
|
181
181
|
translate: 0 var(--_enter-distance);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
/* A submenu, or a menu placed beside its anchor, arrives along the inline
|
|
185
185
|
axis it opens on: from one step inside the parent's edge (M1). */
|
|
186
|
-
[data-ui
|
|
186
|
+
[data-ui-menu][data-side='right'] {
|
|
187
187
|
translate: calc(-1 * var(--_enter-distance)) 0;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
[data-ui
|
|
190
|
+
[data-ui-menu][data-side='left'] {
|
|
191
191
|
translate: var(--_enter-distance) 0;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
[data-ui
|
|
194
|
+
[data-ui-menu]:is([data-side='left'], [data-side='right']) {
|
|
195
195
|
padding-block: 0;
|
|
196
196
|
padding-inline: var(--_gap);
|
|
197
197
|
}
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
* A keyframe states where it starts. The exit stays a transition: it
|
|
206
206
|
* leaves from wherever the layer is, on the closed rule's durations.
|
|
207
207
|
*/
|
|
208
|
-
[data-ui
|
|
208
|
+
[data-ui-menu][data-open] {
|
|
209
209
|
opacity: 1;
|
|
210
210
|
translate: 0 0;
|
|
211
211
|
transition: none;
|
|
@@ -216,19 +216,19 @@
|
|
|
216
216
|
* with the side, and a layer written open in static markup — the harness,
|
|
217
217
|
* a docs snippet — is simply there, and is photographed where it stands.
|
|
218
218
|
*/
|
|
219
|
-
[data-ui
|
|
219
|
+
[data-ui-menu][data-open][data-positioned] {
|
|
220
220
|
animation: slotted-menu-enter-down var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
[data-ui
|
|
223
|
+
[data-ui-menu][data-open][data-positioned][data-side='top'] {
|
|
224
224
|
animation-name: slotted-menu-enter-up;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
[data-ui
|
|
227
|
+
[data-ui-menu][data-open][data-positioned][data-side='right'] {
|
|
228
228
|
animation-name: slotted-menu-enter-from-start;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
[data-ui
|
|
231
|
+
[data-ui-menu][data-open][data-positioned][data-side='left'] {
|
|
232
232
|
animation-name: slotted-menu-enter-from-end;
|
|
233
233
|
}
|
|
234
234
|
|
|
@@ -268,25 +268,25 @@
|
|
|
268
268
|
|
|
269
269
|
/* Stillness keeps the fade and drops the movement (R7). */
|
|
270
270
|
@media (prefers-reduced-motion: reduce) {
|
|
271
|
-
[data-ui
|
|
272
|
-
[data-ui
|
|
273
|
-
[data-ui
|
|
274
|
-
[data-ui
|
|
271
|
+
[data-ui-menu],
|
|
272
|
+
[data-ui-menu][data-side='top'],
|
|
273
|
+
[data-ui-menu][data-side='left'],
|
|
274
|
+
[data-ui-menu][data-side='right'] {
|
|
275
275
|
translate: 0 0;
|
|
276
276
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
[data-ui
|
|
280
|
-
[data-ui
|
|
281
|
-
[data-ui
|
|
282
|
-
[data-ui
|
|
279
|
+
[data-ui-menu][data-open][data-positioned],
|
|
280
|
+
[data-ui-menu][data-open][data-positioned][data-side='top'],
|
|
281
|
+
[data-ui-menu][data-open][data-positioned][data-side='left'],
|
|
282
|
+
[data-ui-menu][data-open][data-positioned][data-side='right'] {
|
|
283
283
|
animation-name: slotted-menu-fade;
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
/* The anchor scrolled out of its own clipper. The menu is still open and its
|
|
288
288
|
commands still belong to a control the reader can no longer see. */
|
|
289
|
-
[data-ui
|
|
289
|
+
[data-ui-menu][data-detached] {
|
|
290
290
|
visibility: hidden;
|
|
291
291
|
}
|
|
292
292
|
|
|
@@ -299,11 +299,11 @@
|
|
|
299
299
|
* row. Opened above or below, the layer has no inline padding, so the
|
|
300
300
|
* content and the trigger share both edges.
|
|
301
301
|
*/
|
|
302
|
-
[data-ui
|
|
302
|
+
[data-ui-menu][data-width='anchor'] {
|
|
303
303
|
max-inline-size: var(--slotted-positioner-available-width, 100vw);
|
|
304
304
|
min-inline-size: 0;
|
|
305
305
|
}
|
|
306
|
-
[data-ui
|
|
306
|
+
[data-ui-menu][data-width='anchor'] > [data-part-content] {
|
|
307
307
|
inline-size: var(--slotted-positioner-anchor-width, auto);
|
|
308
308
|
max-inline-size: var(--slotted-positioner-available-width, 100vw);
|
|
309
309
|
min-inline-size: min(
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
[data-ui
|
|
315
|
+
[data-ui-menu][data-size='sm'] {
|
|
316
316
|
--_item-padding: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
317
317
|
--_item-height: var(--slotted-control-height-sm, 30px);
|
|
318
318
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -322,7 +322,7 @@
|
|
|
322
322
|
--_measure: var(--slotted-menu-measure-sm, 14rem);
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
[data-ui
|
|
325
|
+
[data-ui-menu][data-size='lg'] {
|
|
326
326
|
--_item-padding: var(--slotted-control-padding-inline-lg, 1rem);
|
|
327
327
|
--_item-height: var(--slotted-control-height-lg, 38px);
|
|
328
328
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
* off the bottom of the screen. `overscroll-behavior` keeps the page still
|
|
342
342
|
* once the surface has scrolled to its end.
|
|
343
343
|
*/
|
|
344
|
-
[data-ui
|
|
344
|
+
[data-ui-menu] > [data-part-content] {
|
|
345
345
|
background: var(--_surface);
|
|
346
346
|
border: var(--_border-width) solid var(--_border-color);
|
|
347
347
|
border-radius: var(--_radius);
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
* the moment the menu opens, and a ring around the whole surface would say
|
|
367
367
|
* the surface is the thing being operated.
|
|
368
368
|
*/
|
|
369
|
-
[data-ui
|
|
369
|
+
[data-ui-menu] > [data-part-content]:focus-visible {
|
|
370
370
|
outline: none;
|
|
371
371
|
}
|
|
372
372
|
|
|
@@ -378,13 +378,13 @@
|
|
|
378
378
|
* second set. Without the subgrid a group would align its own labels and
|
|
379
379
|
* disagree with the items outside it.
|
|
380
380
|
*/
|
|
381
|
-
[data-ui
|
|
381
|
+
[data-ui-menu] [data-part-group] {
|
|
382
382
|
display: grid;
|
|
383
383
|
grid-column: 1 / -1;
|
|
384
384
|
grid-template-columns: subgrid;
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
-
[data-ui
|
|
387
|
+
[data-ui-menu] [data-part-group-label] {
|
|
388
388
|
color: var(--_muted);
|
|
389
389
|
font-size: var(--_secondary-font-size);
|
|
390
390
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
@@ -404,7 +404,7 @@
|
|
|
404
404
|
* lines; the name and its line reuse `label` and `description`. It starts
|
|
405
405
|
* at the item inset, so the avatar's edge is the icons' edge.
|
|
406
406
|
*/
|
|
407
|
-
[data-ui
|
|
407
|
+
[data-ui-menu] [data-part-header] {
|
|
408
408
|
align-items: center;
|
|
409
409
|
column-gap: var(--slotted-space-5, 0.75rem);
|
|
410
410
|
display: grid;
|
|
@@ -415,12 +415,12 @@
|
|
|
415
415
|
padding-inline: var(--_item-inset);
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
[data-ui
|
|
418
|
+
[data-ui-menu] [data-part-header] > :not([data-part-label], [data-part-description]) {
|
|
419
419
|
grid-column: 1;
|
|
420
420
|
grid-row: 1 / span 2;
|
|
421
421
|
}
|
|
422
422
|
|
|
423
|
-
[data-ui
|
|
423
|
+
[data-ui-menu] [data-part-header] > [data-part-label] {
|
|
424
424
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
425
425
|
}
|
|
426
426
|
|
|
@@ -442,7 +442,7 @@
|
|
|
442
442
|
* `select` used to take the hand for its options holds here unchanged. An
|
|
443
443
|
* unavailable item keeps the hand and refuses the press, as `button` does.
|
|
444
444
|
*/
|
|
445
|
-
[data-ui
|
|
445
|
+
[data-ui-menu] [data-part-item] {
|
|
446
446
|
appearance: none;
|
|
447
447
|
background: transparent;
|
|
448
448
|
border: 0;
|
|
@@ -488,7 +488,7 @@
|
|
|
488
488
|
* `data-highlighted` exists to prevent in Radix and Ark; here the platform
|
|
489
489
|
* prevents it, because there is only ever one focused element.
|
|
490
490
|
*/
|
|
491
|
-
[data-ui
|
|
491
|
+
[data-ui-menu] [data-part-item]:focus {
|
|
492
492
|
background-color: var(--_highlight);
|
|
493
493
|
color: var(--_accent);
|
|
494
494
|
}
|
|
@@ -499,13 +499,13 @@
|
|
|
499
499
|
* reader did not ask for. Inset, so it never overflows the surface's own
|
|
500
500
|
* rounded edge.
|
|
501
501
|
*/
|
|
502
|
-
[data-ui
|
|
502
|
+
[data-ui-menu] [data-part-item]:focus-visible {
|
|
503
503
|
outline: var(--slotted-focus-ring-width, 2px) solid
|
|
504
504
|
var(--slotted-focus-ring-color, currentColor);
|
|
505
505
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
-
[data-ui
|
|
508
|
+
[data-ui-menu] [data-part-item]:not([data-disabled]):active {
|
|
509
509
|
background-color: var(--_highlight-active);
|
|
510
510
|
}
|
|
511
511
|
|
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
* A parent item stays highlighted while its submenu is open, so the path from
|
|
514
514
|
* the bar to the surface under the pointer reads as one line.
|
|
515
515
|
*/
|
|
516
|
-
[data-ui
|
|
516
|
+
[data-ui-menu] [data-part-item][data-open] {
|
|
517
517
|
background-color: var(--_highlight);
|
|
518
518
|
}
|
|
519
519
|
|
|
@@ -527,12 +527,12 @@
|
|
|
527
527
|
* against the dark surface and 0 against the high-contrast one: the pointer
|
|
528
528
|
* landed on an item and nothing answered.
|
|
529
529
|
*/
|
|
530
|
-
[data-ui
|
|
530
|
+
[data-ui-menu] [data-part-item][data-disabled] {
|
|
531
531
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
532
532
|
cursor: not-allowed;
|
|
533
533
|
}
|
|
534
534
|
|
|
535
|
-
[data-ui
|
|
535
|
+
[data-ui-menu] [data-part-item][data-disabled]:focus {
|
|
536
536
|
background-color: var(--_highlight);
|
|
537
537
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
538
538
|
}
|
|
@@ -544,8 +544,8 @@
|
|
|
544
544
|
* labels up: the mark's box exists whether or not the mark is drawn, so a
|
|
545
545
|
* menu of options does not shift by sixteen pixels as one is checked.
|
|
546
546
|
*/
|
|
547
|
-
[data-ui
|
|
548
|
-
[data-ui
|
|
547
|
+
[data-ui-menu] :is([data-part-indicator], [data-part-icon]),
|
|
548
|
+
[data-ui-menu] [data-part-item][aria-haspopup='menu'] > [data-ui-icon] {
|
|
549
549
|
/**
|
|
550
550
|
* One line box tall, so a mark beside a label that wrapped onto three
|
|
551
551
|
* lines sits on the first of them rather than in the middle of the item —
|
|
@@ -562,7 +562,7 @@
|
|
|
562
562
|
* a checkbox item, `dot` for a radio item — and it is shown while the item
|
|
563
563
|
* is checked.
|
|
564
564
|
*/
|
|
565
|
-
[data-ui
|
|
565
|
+
[data-ui-menu] [data-part-indicator] {
|
|
566
566
|
--slotted-icon-size: var(--_icon-size);
|
|
567
567
|
|
|
568
568
|
align-items: center;
|
|
@@ -586,7 +586,7 @@
|
|
|
586
586
|
scale var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
587
587
|
}
|
|
588
588
|
|
|
589
|
-
[data-ui
|
|
589
|
+
[data-ui-menu] [data-part-item][data-checked] > [data-part-indicator] {
|
|
590
590
|
opacity: 1;
|
|
591
591
|
scale: 1;
|
|
592
592
|
transition:
|
|
@@ -595,7 +595,7 @@
|
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
/* The dot is drawn smaller than the check, at seven tenths of the column's glyph. */
|
|
598
|
-
[data-ui
|
|
598
|
+
[data-ui-menu] [data-part-item][role='menuitemradio'] > [data-part-indicator] {
|
|
599
599
|
--slotted-icon-size: calc(var(--_icon-size) * 0.7);
|
|
600
600
|
}
|
|
601
601
|
|
|
@@ -622,7 +622,7 @@
|
|
|
622
622
|
* the child and not on the box, because the box's `1lh` reads the item's
|
|
623
623
|
* line box.
|
|
624
624
|
*/
|
|
625
|
-
[data-ui
|
|
625
|
+
[data-ui-menu] [data-part-icon] {
|
|
626
626
|
--slotted-icon-size: var(--_icon-size);
|
|
627
627
|
|
|
628
628
|
align-items: center;
|
|
@@ -635,19 +635,19 @@
|
|
|
635
635
|
margin-inline-end: var(--_column-gap);
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
[data-ui
|
|
638
|
+
[data-ui-menu] [data-part-icon] > * {
|
|
639
639
|
font-size: var(--_icon-size);
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
/* Column two, and the only column that gives way. */
|
|
643
|
-
[data-ui
|
|
643
|
+
[data-ui-menu] [data-part-label] {
|
|
644
644
|
grid-column: 2;
|
|
645
645
|
grid-row: 1;
|
|
646
646
|
min-inline-size: 0;
|
|
647
647
|
overflow-wrap: anywhere;
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
-
[data-ui
|
|
650
|
+
[data-ui-menu] [data-part-description] {
|
|
651
651
|
color: var(--_muted);
|
|
652
652
|
font-size: var(--_secondary-font-size);
|
|
653
653
|
grid-column: 2;
|
|
@@ -657,7 +657,7 @@
|
|
|
657
657
|
overflow-wrap: anywhere;
|
|
658
658
|
}
|
|
659
659
|
|
|
660
|
-
[data-ui
|
|
660
|
+
[data-ui-menu] [data-part-item][data-disabled] > [data-part-description] {
|
|
661
661
|
color: inherit;
|
|
662
662
|
}
|
|
663
663
|
|
|
@@ -669,7 +669,7 @@
|
|
|
669
669
|
* column, so counts stack on their last digit and a word ends where the
|
|
670
670
|
* numbers end; tabular figures, muted like the shortcut, never wrapped.
|
|
671
671
|
*/
|
|
672
|
-
[data-ui
|
|
672
|
+
[data-ui-menu] [data-part-meta] {
|
|
673
673
|
align-items: center;
|
|
674
674
|
color: var(--_muted);
|
|
675
675
|
column-gap: var(--slotted-space-2, 0.25rem);
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
* alone. Never narrower than its own content: a long label wraps in column
|
|
690
690
|
* two rather than pushing the binding off the surface.
|
|
691
691
|
*/
|
|
692
|
-
[data-ui
|
|
692
|
+
[data-ui-menu] [data-part-shortcut] {
|
|
693
693
|
color: var(--_muted);
|
|
694
694
|
grid-column: 4;
|
|
695
695
|
grid-row: 1;
|
|
@@ -698,10 +698,8 @@
|
|
|
698
698
|
white-space: nowrap;
|
|
699
699
|
}
|
|
700
700
|
|
|
701
|
-
[data-ui
|
|
702
|
-
|
|
703
|
-
> :is([data-part='shortcut'], [data-part='meta']),
|
|
704
|
-
[data-ui='menu'] [data-part='item'][data-disabled][aria-haspopup='menu'] > [data-ui='icon'] {
|
|
701
|
+
[data-ui-menu] [data-part-item][data-disabled] > :is([data-part-shortcut], [data-part-meta]),
|
|
702
|
+
[data-ui-menu] [data-part-item][data-disabled][aria-haspopup='menu'] > [data-ui-icon] {
|
|
705
703
|
color: inherit;
|
|
706
704
|
}
|
|
707
705
|
|
|
@@ -712,7 +710,7 @@
|
|
|
712
710
|
* takes the shortcut's column, because an item that opens a submenu runs no
|
|
713
711
|
* command and so carries no binding.
|
|
714
712
|
*/
|
|
715
|
-
[data-ui
|
|
713
|
+
[data-ui-menu] [data-part-item][aria-haspopup='menu'] > [data-ui-icon] {
|
|
716
714
|
--slotted-icon-size: var(--_icon-size);
|
|
717
715
|
|
|
718
716
|
grid-column: 4;
|
|
@@ -729,7 +727,7 @@
|
|
|
729
727
|
|
|
730
728
|
/* ── Separator, empty, loading ────────────────────────────────────────── */
|
|
731
729
|
|
|
732
|
-
[data-ui
|
|
730
|
+
[data-ui-menu] [data-part-separator] {
|
|
733
731
|
background-color: var(--slotted-menu-separator-color, var(--_border-color));
|
|
734
732
|
block-size: var(--_border-width);
|
|
735
733
|
border: 0;
|
|
@@ -748,7 +746,7 @@
|
|
|
748
746
|
* stated here: a row that was wider than the menu around it made the menu
|
|
749
747
|
* grow when its list emptied (M3).
|
|
750
748
|
*/
|
|
751
|
-
[data-ui
|
|
749
|
+
[data-ui-menu] [data-part-empty] {
|
|
752
750
|
color: var(--_muted);
|
|
753
751
|
grid-column: 1 / -1;
|
|
754
752
|
padding-block: var(--slotted-space-5, 0.75rem);
|
|
@@ -756,7 +754,7 @@
|
|
|
756
754
|
text-align: center;
|
|
757
755
|
}
|
|
758
756
|
|
|
759
|
-
[data-ui
|
|
757
|
+
[data-ui-menu] > [data-part-content][data-loading] {
|
|
760
758
|
cursor: progress;
|
|
761
759
|
}
|
|
762
760
|
|
|
@@ -768,7 +766,7 @@
|
|
|
768
766
|
* the theme already carries at the contrast every scheme needs; `danger` is
|
|
769
767
|
* the one a product reaches for, and the other four cost one line each.
|
|
770
768
|
*/
|
|
771
|
-
[data-ui
|
|
769
|
+
[data-ui-menu] [data-part-item][data-tone='accent'] {
|
|
772
770
|
--_accent: var(--slotted-tone-accent-text);
|
|
773
771
|
--_highlight: var(--slotted-tone-accent-surface);
|
|
774
772
|
--_highlight-active: var(--slotted-tone-accent-subtle-active);
|
|
@@ -776,7 +774,7 @@
|
|
|
776
774
|
color: var(--slotted-tone-accent-text);
|
|
777
775
|
}
|
|
778
776
|
|
|
779
|
-
[data-ui
|
|
777
|
+
[data-ui-menu] [data-part-item][data-tone='secondary'] {
|
|
780
778
|
--_accent: var(--slotted-tone-secondary-text);
|
|
781
779
|
--_highlight: var(--slotted-tone-secondary-surface);
|
|
782
780
|
--_highlight-active: var(--slotted-tone-secondary-subtle-active);
|
|
@@ -784,7 +782,7 @@
|
|
|
784
782
|
color: var(--slotted-tone-secondary-text);
|
|
785
783
|
}
|
|
786
784
|
|
|
787
|
-
[data-ui
|
|
785
|
+
[data-ui-menu] [data-part-item][data-tone='success'] {
|
|
788
786
|
--_accent: var(--slotted-tone-success-text);
|
|
789
787
|
--_highlight: var(--slotted-tone-success-surface);
|
|
790
788
|
--_highlight-active: var(--slotted-tone-success-subtle-active);
|
|
@@ -792,7 +790,7 @@
|
|
|
792
790
|
color: var(--slotted-tone-success-text);
|
|
793
791
|
}
|
|
794
792
|
|
|
795
|
-
[data-ui
|
|
793
|
+
[data-ui-menu] [data-part-item][data-tone='warning'] {
|
|
796
794
|
--_accent: var(--slotted-tone-warning-text);
|
|
797
795
|
--_highlight: var(--slotted-tone-warning-surface);
|
|
798
796
|
--_highlight-active: var(--slotted-tone-warning-subtle-active);
|
|
@@ -800,7 +798,7 @@
|
|
|
800
798
|
color: var(--slotted-tone-warning-text);
|
|
801
799
|
}
|
|
802
800
|
|
|
803
|
-
[data-ui
|
|
801
|
+
[data-ui-menu] [data-part-item][data-tone='danger'] {
|
|
804
802
|
--_accent: var(--slotted-tone-danger-text);
|
|
805
803
|
--_highlight: var(--slotted-tone-danger-surface);
|
|
806
804
|
--_highlight-active: var(--slotted-tone-danger-subtle-active);
|
|
@@ -809,7 +807,7 @@
|
|
|
809
807
|
}
|
|
810
808
|
|
|
811
809
|
/* An unavailable item keeps no tone: its highlight is the neutral one. */
|
|
812
|
-
[data-ui
|
|
810
|
+
[data-ui-menu] [data-part-item][data-tone][data-disabled] {
|
|
813
811
|
--_accent: var(--slotted-disabled-foreground, #64748b);
|
|
814
812
|
--_highlight: var(--slotted-menu-highlight, var(--slotted-tone-secondary-subtle-hover));
|
|
815
813
|
|
|
@@ -825,13 +823,13 @@
|
|
|
825
823
|
* to tell which command they are on.
|
|
826
824
|
*/
|
|
827
825
|
@media (forced-colors: active) {
|
|
828
|
-
[data-ui
|
|
826
|
+
[data-ui-menu] [data-part-item]:focus {
|
|
829
827
|
background-color: Highlight;
|
|
830
828
|
color: HighlightText;
|
|
831
829
|
forced-color-adjust: none;
|
|
832
830
|
}
|
|
833
831
|
|
|
834
|
-
[data-ui
|
|
832
|
+
[data-ui-menu] [data-part-item][data-disabled]:focus {
|
|
835
833
|
background-color: Highlight;
|
|
836
834
|
color: GrayText;
|
|
837
835
|
}
|
package/src/menubar/menubar.css
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* force the header to match it. The weight is carried by the triggers, which
|
|
20
20
|
* is where a reader's pointer goes.
|
|
21
21
|
*/
|
|
22
|
-
[data-ui
|
|
22
|
+
[data-ui-menubar] {
|
|
23
23
|
--_gap: var(--slotted-menubar-gap, var(--slotted-space-1, 0.125rem));
|
|
24
24
|
|
|
25
25
|
--_text: var(--slotted-menubar-text, var(--slotted-text, #0f172a));
|
|
@@ -58,18 +58,18 @@
|
|
|
58
58
|
* key swap for it. The triggers stretch rather than centring, because a
|
|
59
59
|
* column of labels reads from one edge.
|
|
60
60
|
*/
|
|
61
|
-
[data-ui
|
|
61
|
+
[data-ui-menubar][data-orientation='vertical'] {
|
|
62
62
|
align-items: stretch;
|
|
63
63
|
flex-direction: column;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
[data-ui
|
|
66
|
+
[data-ui-menubar][data-size='sm'] {
|
|
67
67
|
--_trigger-height: var(--slotted-control-height-sm, 30px);
|
|
68
68
|
--_trigger-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
69
69
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
[data-ui
|
|
72
|
+
[data-ui-menubar][data-size='lg'] {
|
|
73
73
|
--_trigger-height: var(--slotted-control-height-lg, 38px);
|
|
74
74
|
--_trigger-inset: var(--slotted-control-padding-inline-lg, 1rem);
|
|
75
75
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
* The trigger holds the consumer's own text and nothing the family imposes —
|
|
86
86
|
* no icon slot, no chevron, no shortcut. A menubar trigger is a word.
|
|
87
87
|
*/
|
|
88
|
-
[data-ui
|
|
88
|
+
[data-ui-menubar] > [data-part-trigger] {
|
|
89
89
|
appearance: none;
|
|
90
90
|
background: transparent;
|
|
91
91
|
border: 0;
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
white-space: nowrap;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
[data-ui
|
|
114
|
+
[data-ui-menubar][data-orientation='vertical'] > [data-part-trigger] {
|
|
115
115
|
text-align: start;
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -122,19 +122,19 @@
|
|
|
122
122
|
* highlight follows the pointer; once a menu is open, entering another
|
|
123
123
|
* trigger opens it and focus moves, so hover and focus agree again.
|
|
124
124
|
*/
|
|
125
|
-
[data-ui
|
|
125
|
+
[data-ui-menubar] > [data-part-trigger]:not([data-disabled]):hover {
|
|
126
126
|
background-color: var(--_highlight);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
[data-ui
|
|
129
|
+
[data-ui-menubar] > [data-part-trigger]:not([data-disabled]):active {
|
|
130
130
|
background-color: var(--_highlight-active);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
[data-ui
|
|
133
|
+
[data-ui-menubar] > [data-part-trigger][data-open] {
|
|
134
134
|
background-color: var(--_highlight-active);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
[data-ui
|
|
137
|
+
[data-ui-menubar] > [data-part-trigger]:focus-visible {
|
|
138
138
|
outline: var(--slotted-focus-ring-width, 2px) solid
|
|
139
139
|
var(--slotted-focus-ring-color, currentColor);
|
|
140
140
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
@@ -145,11 +145,11 @@
|
|
|
145
145
|
* pattern asks of every item in a menubar. It answers focus quietly, as a
|
|
146
146
|
* disabled menu item does.
|
|
147
147
|
*/
|
|
148
|
-
[data-ui
|
|
148
|
+
[data-ui-menubar] > [data-part-trigger][data-disabled] {
|
|
149
149
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
[data-ui
|
|
152
|
+
[data-ui-menubar] > [data-part-trigger][data-disabled]:focus {
|
|
153
153
|
background-color: var(--slotted-disabled-background, #e2e8f0);
|
|
154
154
|
}
|
|
155
155
|
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
* bar that has to stay distinguishable from the other three.
|
|
162
162
|
*/
|
|
163
163
|
@media (forced-colors: active) {
|
|
164
|
-
[data-ui
|
|
164
|
+
[data-ui-menubar] > [data-part-trigger][data-open] {
|
|
165
165
|
background-color: Highlight;
|
|
166
166
|
color: HighlightText;
|
|
167
167
|
forced-color-adjust: none;
|