@slotted/styles 0.1.0-beta.0 → 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/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,29 +268,51 @@
|
|
|
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
|
|
|
293
|
-
|
|
293
|
+
/**
|
|
294
|
+
* The surface as wide as its trigger: an account switcher at the foot of a
|
|
295
|
+
* sidebar, opened from a row the column's full width. The content takes the
|
|
296
|
+
* anchor's width as its size and its floor, as `popover`'s `width="anchor"`
|
|
297
|
+
* does, and the room the positioner reports caps both. The layer drops the
|
|
298
|
+
* family's floor and cap, which would hold it narrower or wider than the
|
|
299
|
+
* row. Opened above or below, the layer has no inline padding, so the
|
|
300
|
+
* content and the trigger share both edges.
|
|
301
|
+
*/
|
|
302
|
+
[data-ui-menu][data-width='anchor'] {
|
|
303
|
+
max-inline-size: var(--slotted-positioner-available-width, 100vw);
|
|
304
|
+
min-inline-size: 0;
|
|
305
|
+
}
|
|
306
|
+
[data-ui-menu][data-width='anchor'] > [data-part-content] {
|
|
307
|
+
inline-size: var(--slotted-positioner-anchor-width, auto);
|
|
308
|
+
max-inline-size: var(--slotted-positioner-available-width, 100vw);
|
|
309
|
+
min-inline-size: min(
|
|
310
|
+
var(--slotted-positioner-anchor-width, 0px),
|
|
311
|
+
var(--slotted-positioner-available-width, 100vw)
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
[data-ui-menu][data-size='sm'] {
|
|
294
316
|
--_item-padding: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
295
317
|
--_item-height: var(--slotted-control-height-sm, 30px);
|
|
296
318
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -300,7 +322,7 @@
|
|
|
300
322
|
--_measure: var(--slotted-menu-measure-sm, 14rem);
|
|
301
323
|
}
|
|
302
324
|
|
|
303
|
-
[data-ui
|
|
325
|
+
[data-ui-menu][data-size='lg'] {
|
|
304
326
|
--_item-padding: var(--slotted-control-padding-inline-lg, 1rem);
|
|
305
327
|
--_item-height: var(--slotted-control-height-lg, 38px);
|
|
306
328
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -319,7 +341,7 @@
|
|
|
319
341
|
* off the bottom of the screen. `overscroll-behavior` keeps the page still
|
|
320
342
|
* once the surface has scrolled to its end.
|
|
321
343
|
*/
|
|
322
|
-
[data-ui
|
|
344
|
+
[data-ui-menu] > [data-part-content] {
|
|
323
345
|
background: var(--_surface);
|
|
324
346
|
border: var(--_border-width) solid var(--_border-color);
|
|
325
347
|
border-radius: var(--_radius);
|
|
@@ -344,7 +366,7 @@
|
|
|
344
366
|
* the moment the menu opens, and a ring around the whole surface would say
|
|
345
367
|
* the surface is the thing being operated.
|
|
346
368
|
*/
|
|
347
|
-
[data-ui
|
|
369
|
+
[data-ui-menu] > [data-part-content]:focus-visible {
|
|
348
370
|
outline: none;
|
|
349
371
|
}
|
|
350
372
|
|
|
@@ -356,13 +378,13 @@
|
|
|
356
378
|
* second set. Without the subgrid a group would align its own labels and
|
|
357
379
|
* disagree with the items outside it.
|
|
358
380
|
*/
|
|
359
|
-
[data-ui
|
|
381
|
+
[data-ui-menu] [data-part-group] {
|
|
360
382
|
display: grid;
|
|
361
383
|
grid-column: 1 / -1;
|
|
362
384
|
grid-template-columns: subgrid;
|
|
363
385
|
}
|
|
364
386
|
|
|
365
|
-
[data-ui
|
|
387
|
+
[data-ui-menu] [data-part-group-label] {
|
|
366
388
|
color: var(--_muted);
|
|
367
389
|
font-size: var(--_secondary-font-size);
|
|
368
390
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
@@ -382,7 +404,7 @@
|
|
|
382
404
|
* lines; the name and its line reuse `label` and `description`. It starts
|
|
383
405
|
* at the item inset, so the avatar's edge is the icons' edge.
|
|
384
406
|
*/
|
|
385
|
-
[data-ui
|
|
407
|
+
[data-ui-menu] [data-part-header] {
|
|
386
408
|
align-items: center;
|
|
387
409
|
column-gap: var(--slotted-space-5, 0.75rem);
|
|
388
410
|
display: grid;
|
|
@@ -393,12 +415,12 @@
|
|
|
393
415
|
padding-inline: var(--_item-inset);
|
|
394
416
|
}
|
|
395
417
|
|
|
396
|
-
[data-ui
|
|
418
|
+
[data-ui-menu] [data-part-header] > :not([data-part-label], [data-part-description]) {
|
|
397
419
|
grid-column: 1;
|
|
398
420
|
grid-row: 1 / span 2;
|
|
399
421
|
}
|
|
400
422
|
|
|
401
|
-
[data-ui
|
|
423
|
+
[data-ui-menu] [data-part-header] > [data-part-label] {
|
|
402
424
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
403
425
|
}
|
|
404
426
|
|
|
@@ -420,7 +442,7 @@
|
|
|
420
442
|
* `select` used to take the hand for its options holds here unchanged. An
|
|
421
443
|
* unavailable item keeps the hand and refuses the press, as `button` does.
|
|
422
444
|
*/
|
|
423
|
-
[data-ui
|
|
445
|
+
[data-ui-menu] [data-part-item] {
|
|
424
446
|
appearance: none;
|
|
425
447
|
background: transparent;
|
|
426
448
|
border: 0;
|
|
@@ -466,7 +488,7 @@
|
|
|
466
488
|
* `data-highlighted` exists to prevent in Radix and Ark; here the platform
|
|
467
489
|
* prevents it, because there is only ever one focused element.
|
|
468
490
|
*/
|
|
469
|
-
[data-ui
|
|
491
|
+
[data-ui-menu] [data-part-item]:focus {
|
|
470
492
|
background-color: var(--_highlight);
|
|
471
493
|
color: var(--_accent);
|
|
472
494
|
}
|
|
@@ -477,13 +499,13 @@
|
|
|
477
499
|
* reader did not ask for. Inset, so it never overflows the surface's own
|
|
478
500
|
* rounded edge.
|
|
479
501
|
*/
|
|
480
|
-
[data-ui
|
|
502
|
+
[data-ui-menu] [data-part-item]:focus-visible {
|
|
481
503
|
outline: var(--slotted-focus-ring-width, 2px) solid
|
|
482
504
|
var(--slotted-focus-ring-color, currentColor);
|
|
483
505
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
484
506
|
}
|
|
485
507
|
|
|
486
|
-
[data-ui
|
|
508
|
+
[data-ui-menu] [data-part-item]:not([data-disabled]):active {
|
|
487
509
|
background-color: var(--_highlight-active);
|
|
488
510
|
}
|
|
489
511
|
|
|
@@ -491,7 +513,7 @@
|
|
|
491
513
|
* A parent item stays highlighted while its submenu is open, so the path from
|
|
492
514
|
* the bar to the surface under the pointer reads as one line.
|
|
493
515
|
*/
|
|
494
|
-
[data-ui
|
|
516
|
+
[data-ui-menu] [data-part-item][data-open] {
|
|
495
517
|
background-color: var(--_highlight);
|
|
496
518
|
}
|
|
497
519
|
|
|
@@ -505,12 +527,12 @@
|
|
|
505
527
|
* against the dark surface and 0 against the high-contrast one: the pointer
|
|
506
528
|
* landed on an item and nothing answered.
|
|
507
529
|
*/
|
|
508
|
-
[data-ui
|
|
530
|
+
[data-ui-menu] [data-part-item][data-disabled] {
|
|
509
531
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
510
532
|
cursor: not-allowed;
|
|
511
533
|
}
|
|
512
534
|
|
|
513
|
-
[data-ui
|
|
535
|
+
[data-ui-menu] [data-part-item][data-disabled]:focus {
|
|
514
536
|
background-color: var(--_highlight);
|
|
515
537
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
516
538
|
}
|
|
@@ -522,8 +544,8 @@
|
|
|
522
544
|
* labels up: the mark's box exists whether or not the mark is drawn, so a
|
|
523
545
|
* menu of options does not shift by sixteen pixels as one is checked.
|
|
524
546
|
*/
|
|
525
|
-
[data-ui
|
|
526
|
-
[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] {
|
|
527
549
|
/**
|
|
528
550
|
* One line box tall, so a mark beside a label that wrapped onto three
|
|
529
551
|
* lines sits on the first of them rather than in the middle of the item —
|
|
@@ -540,7 +562,7 @@
|
|
|
540
562
|
* a checkbox item, `dot` for a radio item — and it is shown while the item
|
|
541
563
|
* is checked.
|
|
542
564
|
*/
|
|
543
|
-
[data-ui
|
|
565
|
+
[data-ui-menu] [data-part-indicator] {
|
|
544
566
|
--slotted-icon-size: var(--_icon-size);
|
|
545
567
|
|
|
546
568
|
align-items: center;
|
|
@@ -564,7 +586,7 @@
|
|
|
564
586
|
scale var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
565
587
|
}
|
|
566
588
|
|
|
567
|
-
[data-ui
|
|
589
|
+
[data-ui-menu] [data-part-item][data-checked] > [data-part-indicator] {
|
|
568
590
|
opacity: 1;
|
|
569
591
|
scale: 1;
|
|
570
592
|
transition:
|
|
@@ -573,7 +595,7 @@
|
|
|
573
595
|
}
|
|
574
596
|
|
|
575
597
|
/* The dot is drawn smaller than the check, at seven tenths of the column's glyph. */
|
|
576
|
-
[data-ui
|
|
598
|
+
[data-ui-menu] [data-part-item][role='menuitemradio'] > [data-part-indicator] {
|
|
577
599
|
--slotted-icon-size: calc(var(--_icon-size) * 0.7);
|
|
578
600
|
}
|
|
579
601
|
|
|
@@ -600,7 +622,7 @@
|
|
|
600
622
|
* the child and not on the box, because the box's `1lh` reads the item's
|
|
601
623
|
* line box.
|
|
602
624
|
*/
|
|
603
|
-
[data-ui
|
|
625
|
+
[data-ui-menu] [data-part-icon] {
|
|
604
626
|
--slotted-icon-size: var(--_icon-size);
|
|
605
627
|
|
|
606
628
|
align-items: center;
|
|
@@ -613,19 +635,19 @@
|
|
|
613
635
|
margin-inline-end: var(--_column-gap);
|
|
614
636
|
}
|
|
615
637
|
|
|
616
|
-
[data-ui
|
|
638
|
+
[data-ui-menu] [data-part-icon] > * {
|
|
617
639
|
font-size: var(--_icon-size);
|
|
618
640
|
}
|
|
619
641
|
|
|
620
642
|
/* Column two, and the only column that gives way. */
|
|
621
|
-
[data-ui
|
|
643
|
+
[data-ui-menu] [data-part-label] {
|
|
622
644
|
grid-column: 2;
|
|
623
645
|
grid-row: 1;
|
|
624
646
|
min-inline-size: 0;
|
|
625
647
|
overflow-wrap: anywhere;
|
|
626
648
|
}
|
|
627
649
|
|
|
628
|
-
[data-ui
|
|
650
|
+
[data-ui-menu] [data-part-description] {
|
|
629
651
|
color: var(--_muted);
|
|
630
652
|
font-size: var(--_secondary-font-size);
|
|
631
653
|
grid-column: 2;
|
|
@@ -635,7 +657,7 @@
|
|
|
635
657
|
overflow-wrap: anywhere;
|
|
636
658
|
}
|
|
637
659
|
|
|
638
|
-
[data-ui
|
|
660
|
+
[data-ui-menu] [data-part-item][data-disabled] > [data-part-description] {
|
|
639
661
|
color: inherit;
|
|
640
662
|
}
|
|
641
663
|
|
|
@@ -647,7 +669,7 @@
|
|
|
647
669
|
* column, so counts stack on their last digit and a word ends where the
|
|
648
670
|
* numbers end; tabular figures, muted like the shortcut, never wrapped.
|
|
649
671
|
*/
|
|
650
|
-
[data-ui
|
|
672
|
+
[data-ui-menu] [data-part-meta] {
|
|
651
673
|
align-items: center;
|
|
652
674
|
color: var(--_muted);
|
|
653
675
|
column-gap: var(--slotted-space-2, 0.25rem);
|
|
@@ -667,7 +689,7 @@
|
|
|
667
689
|
* alone. Never narrower than its own content: a long label wraps in column
|
|
668
690
|
* two rather than pushing the binding off the surface.
|
|
669
691
|
*/
|
|
670
|
-
[data-ui
|
|
692
|
+
[data-ui-menu] [data-part-shortcut] {
|
|
671
693
|
color: var(--_muted);
|
|
672
694
|
grid-column: 4;
|
|
673
695
|
grid-row: 1;
|
|
@@ -676,10 +698,8 @@
|
|
|
676
698
|
white-space: nowrap;
|
|
677
699
|
}
|
|
678
700
|
|
|
679
|
-
[data-ui
|
|
680
|
-
|
|
681
|
-
> :is([data-part='shortcut'], [data-part='meta']),
|
|
682
|
-
[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] {
|
|
683
703
|
color: inherit;
|
|
684
704
|
}
|
|
685
705
|
|
|
@@ -690,7 +710,7 @@
|
|
|
690
710
|
* takes the shortcut's column, because an item that opens a submenu runs no
|
|
691
711
|
* command and so carries no binding.
|
|
692
712
|
*/
|
|
693
|
-
[data-ui
|
|
713
|
+
[data-ui-menu] [data-part-item][aria-haspopup='menu'] > [data-ui-icon] {
|
|
694
714
|
--slotted-icon-size: var(--_icon-size);
|
|
695
715
|
|
|
696
716
|
grid-column: 4;
|
|
@@ -707,7 +727,7 @@
|
|
|
707
727
|
|
|
708
728
|
/* ── Separator, empty, loading ────────────────────────────────────────── */
|
|
709
729
|
|
|
710
|
-
[data-ui
|
|
730
|
+
[data-ui-menu] [data-part-separator] {
|
|
711
731
|
background-color: var(--slotted-menu-separator-color, var(--_border-color));
|
|
712
732
|
block-size: var(--_border-width);
|
|
713
733
|
border: 0;
|
|
@@ -726,7 +746,7 @@
|
|
|
726
746
|
* stated here: a row that was wider than the menu around it made the menu
|
|
727
747
|
* grow when its list emptied (M3).
|
|
728
748
|
*/
|
|
729
|
-
[data-ui
|
|
749
|
+
[data-ui-menu] [data-part-empty] {
|
|
730
750
|
color: var(--_muted);
|
|
731
751
|
grid-column: 1 / -1;
|
|
732
752
|
padding-block: var(--slotted-space-5, 0.75rem);
|
|
@@ -734,7 +754,7 @@
|
|
|
734
754
|
text-align: center;
|
|
735
755
|
}
|
|
736
756
|
|
|
737
|
-
[data-ui
|
|
757
|
+
[data-ui-menu] > [data-part-content][data-loading] {
|
|
738
758
|
cursor: progress;
|
|
739
759
|
}
|
|
740
760
|
|
|
@@ -746,7 +766,7 @@
|
|
|
746
766
|
* the theme already carries at the contrast every scheme needs; `danger` is
|
|
747
767
|
* the one a product reaches for, and the other four cost one line each.
|
|
748
768
|
*/
|
|
749
|
-
[data-ui
|
|
769
|
+
[data-ui-menu] [data-part-item][data-tone='accent'] {
|
|
750
770
|
--_accent: var(--slotted-tone-accent-text);
|
|
751
771
|
--_highlight: var(--slotted-tone-accent-surface);
|
|
752
772
|
--_highlight-active: var(--slotted-tone-accent-subtle-active);
|
|
@@ -754,7 +774,7 @@
|
|
|
754
774
|
color: var(--slotted-tone-accent-text);
|
|
755
775
|
}
|
|
756
776
|
|
|
757
|
-
[data-ui
|
|
777
|
+
[data-ui-menu] [data-part-item][data-tone='secondary'] {
|
|
758
778
|
--_accent: var(--slotted-tone-secondary-text);
|
|
759
779
|
--_highlight: var(--slotted-tone-secondary-surface);
|
|
760
780
|
--_highlight-active: var(--slotted-tone-secondary-subtle-active);
|
|
@@ -762,7 +782,7 @@
|
|
|
762
782
|
color: var(--slotted-tone-secondary-text);
|
|
763
783
|
}
|
|
764
784
|
|
|
765
|
-
[data-ui
|
|
785
|
+
[data-ui-menu] [data-part-item][data-tone='success'] {
|
|
766
786
|
--_accent: var(--slotted-tone-success-text);
|
|
767
787
|
--_highlight: var(--slotted-tone-success-surface);
|
|
768
788
|
--_highlight-active: var(--slotted-tone-success-subtle-active);
|
|
@@ -770,7 +790,7 @@
|
|
|
770
790
|
color: var(--slotted-tone-success-text);
|
|
771
791
|
}
|
|
772
792
|
|
|
773
|
-
[data-ui
|
|
793
|
+
[data-ui-menu] [data-part-item][data-tone='warning'] {
|
|
774
794
|
--_accent: var(--slotted-tone-warning-text);
|
|
775
795
|
--_highlight: var(--slotted-tone-warning-surface);
|
|
776
796
|
--_highlight-active: var(--slotted-tone-warning-subtle-active);
|
|
@@ -778,7 +798,7 @@
|
|
|
778
798
|
color: var(--slotted-tone-warning-text);
|
|
779
799
|
}
|
|
780
800
|
|
|
781
|
-
[data-ui
|
|
801
|
+
[data-ui-menu] [data-part-item][data-tone='danger'] {
|
|
782
802
|
--_accent: var(--slotted-tone-danger-text);
|
|
783
803
|
--_highlight: var(--slotted-tone-danger-surface);
|
|
784
804
|
--_highlight-active: var(--slotted-tone-danger-subtle-active);
|
|
@@ -787,7 +807,7 @@
|
|
|
787
807
|
}
|
|
788
808
|
|
|
789
809
|
/* An unavailable item keeps no tone: its highlight is the neutral one. */
|
|
790
|
-
[data-ui
|
|
810
|
+
[data-ui-menu] [data-part-item][data-tone][data-disabled] {
|
|
791
811
|
--_accent: var(--slotted-disabled-foreground, #64748b);
|
|
792
812
|
--_highlight: var(--slotted-menu-highlight, var(--slotted-tone-secondary-subtle-hover));
|
|
793
813
|
|
|
@@ -803,13 +823,13 @@
|
|
|
803
823
|
* to tell which command they are on.
|
|
804
824
|
*/
|
|
805
825
|
@media (forced-colors: active) {
|
|
806
|
-
[data-ui
|
|
826
|
+
[data-ui-menu] [data-part-item]:focus {
|
|
807
827
|
background-color: Highlight;
|
|
808
828
|
color: HighlightText;
|
|
809
829
|
forced-color-adjust: none;
|
|
810
830
|
}
|
|
811
831
|
|
|
812
|
-
[data-ui
|
|
832
|
+
[data-ui-menu] [data-part-item][data-disabled]:focus {
|
|
813
833
|
background-color: Highlight;
|
|
814
834
|
color: GrayText;
|
|
815
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;
|