@slotted/styles 0.1.0-beta.8 → 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 +300 -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 +143 -162
- 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
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* mirrors its state onto the frame rather than styling through, so a control
|
|
17
17
|
* used outside a field looks the same as one inside it.
|
|
18
18
|
*/
|
|
19
|
-
[data-ui
|
|
19
|
+
[data-ui-number-field][data-part-root] {
|
|
20
20
|
/**
|
|
21
21
|
* Type, height, inline padding, gap and glyph size all come from the
|
|
22
22
|
* control scales — the only ones the theme restates per density — so an
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
* moves under the reader's eye, and no other family has a stronger claim on
|
|
128
128
|
* the setting.
|
|
129
129
|
*/
|
|
130
|
-
[data-ui
|
|
130
|
+
[data-ui-number-field] > [data-part-input] {
|
|
131
131
|
background-color: transparent;
|
|
132
132
|
/* The frame's border box, not its content box: on a coarse pointer the frame
|
|
133
133
|
is the touch target's height and the control it holds is too. Stretched
|
|
@@ -176,11 +176,11 @@
|
|
|
176
176
|
* "the document's start edge, whatever the run inside is doing", so the
|
|
177
177
|
* alignment is named once, under a guard that is itself the direction.
|
|
178
178
|
*/
|
|
179
|
-
[data-ui
|
|
179
|
+
[data-ui-number-field]:dir(rtl) > [data-part-input] {
|
|
180
180
|
text-align: right;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
[data-ui
|
|
183
|
+
[data-ui-number-field] > [data-part-input]::placeholder {
|
|
184
184
|
color: var(--slotted-number-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
185
185
|
text-overflow: ellipsis;
|
|
186
186
|
}
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
* control beside it. One library, one scale.
|
|
192
192
|
*/
|
|
193
193
|
|
|
194
|
-
[data-ui
|
|
194
|
+
[data-ui-number-field][data-part-root][data-size='sm'] {
|
|
195
195
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
196
196
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
197
197
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
--_inner-size: var(--slotted-control-inner-size-sm, 22px);
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
[data-ui
|
|
203
|
+
[data-ui-number-field][data-part-root][data-size='md'] {
|
|
204
204
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
205
205
|
--_height: var(--slotted-control-height-md, 34px);
|
|
206
206
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
[data-ui
|
|
212
|
+
[data-ui-number-field][data-part-root][data-size='lg'] {
|
|
213
213
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
214
214
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
215
215
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
* which is what a dense table needs.
|
|
226
226
|
*/
|
|
227
227
|
|
|
228
|
-
[data-ui
|
|
228
|
+
[data-ui-number-field][data-part-root][data-variant='subtle'] {
|
|
229
229
|
background-color: var(
|
|
230
230
|
--slotted-number-field-subtle-background,
|
|
231
231
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
/* No edge, no lift, no ground and no corner of its own: the cell it sits in
|
|
240
240
|
is the box, the row is the ground, a cell has no corner, and the resting
|
|
241
241
|
shadow would draw the cell where there is none. */
|
|
242
|
-
[data-ui
|
|
242
|
+
[data-ui-number-field][data-part-root][data-variant='plain'] {
|
|
243
243
|
background-color: transparent;
|
|
244
244
|
border-color: transparent;
|
|
245
245
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
* its only edge exactly where an edge matters most.
|
|
253
253
|
*/
|
|
254
254
|
@media (forced-colors: active) {
|
|
255
|
-
[data-ui
|
|
255
|
+
[data-ui-number-field][data-part-root][data-variant='plain'] {
|
|
256
256
|
border-color: ButtonBorder;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
@@ -263,8 +263,8 @@
|
|
|
263
263
|
* inside the value — a currency, a percent sign, a unit — is `format`'s job
|
|
264
264
|
* and arrives through `Intl` as part of the string the control holds.
|
|
265
265
|
*/
|
|
266
|
-
[data-ui
|
|
267
|
-
[data-ui
|
|
266
|
+
[data-ui-number-field] > [data-part-start],
|
|
267
|
+
[data-ui-number-field] > [data-part-end] {
|
|
268
268
|
align-items: center;
|
|
269
269
|
color: var(--slotted-number-field-adornment-color, var(--slotted-text-muted, GrayText));
|
|
270
270
|
display: inline-flex;
|
|
@@ -282,8 +282,8 @@
|
|
|
282
282
|
--slotted-icon-size: var(--_icon-size);
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
[data-ui
|
|
286
|
-
[data-ui
|
|
285
|
+
[data-ui-number-field] > [data-part-start] > svg,
|
|
286
|
+
[data-ui-number-field] > [data-part-end] > svg {
|
|
287
287
|
block-size: var(--_icon-size);
|
|
288
288
|
inline-size: var(--_icon-size);
|
|
289
289
|
}
|
|
@@ -294,8 +294,8 @@
|
|
|
294
294
|
* advance width. An adornment that draws no glyph takes the margin the glyph
|
|
295
295
|
* box already has, on both sides — the measurement `text-field` derived.
|
|
296
296
|
*/
|
|
297
|
-
[data-ui
|
|
298
|
-
[data-ui
|
|
297
|
+
[data-ui-number-field] > [data-part-start]:not(:has(svg, img, [data-ui-icon])),
|
|
298
|
+
[data-ui-number-field] > [data-part-end]:not(:has(svg, img, [data-ui-icon])) {
|
|
299
299
|
padding-inline: calc(var(--_icon-size) / 8);
|
|
300
300
|
}
|
|
301
301
|
|
|
@@ -308,12 +308,11 @@
|
|
|
308
308
|
* mark is not a button, it has no ground to change, and the cursor alone
|
|
309
309
|
* said nothing a reader would look at.
|
|
310
310
|
*/
|
|
311
|
-
[data-ui
|
|
312
|
-
> :is([data-part='start'], [data-part='end']):has(> [data-part='scrub']) {
|
|
311
|
+
[data-ui-number-field] > :is([data-part-start], [data-part-end]):has(> [data-part-scrub]) {
|
|
313
312
|
align-self: stretch;
|
|
314
313
|
}
|
|
315
314
|
|
|
316
|
-
[data-ui
|
|
315
|
+
[data-ui-number-field] [data-part-scrub] {
|
|
317
316
|
align-items: center;
|
|
318
317
|
align-self: stretch;
|
|
319
318
|
cursor: ew-resize;
|
|
@@ -330,12 +329,12 @@
|
|
|
330
329
|
-webkit-user-select: none;
|
|
331
330
|
}
|
|
332
331
|
|
|
333
|
-
[data-ui
|
|
334
|
-
[data-part
|
|
332
|
+
[data-ui-number-field]:not([data-disabled]):not([data-readonly])
|
|
333
|
+
[data-part-scrub]:is(:hover, [data-scrubbing]) {
|
|
335
334
|
color: var(--slotted-number-field-scrub-active-color, var(--slotted-text, CanvasText));
|
|
336
335
|
}
|
|
337
336
|
|
|
338
|
-
[data-ui
|
|
337
|
+
[data-ui-number-field]:is([data-disabled], [data-readonly]) [data-part-scrub] {
|
|
339
338
|
cursor: default;
|
|
340
339
|
touch-action: auto;
|
|
341
340
|
}
|
|
@@ -347,9 +346,9 @@
|
|
|
347
346
|
* screen-reader cursor still reaches them. Their glyphs are the `Glyph`
|
|
348
347
|
* element the binding renders: a character is never an icon.
|
|
349
348
|
*/
|
|
350
|
-
[data-ui
|
|
351
|
-
[data-ui
|
|
352
|
-
[data-ui
|
|
349
|
+
[data-ui-number-field] > [data-part-stepper] > button,
|
|
350
|
+
[data-ui-number-field] > [data-part-decrement],
|
|
351
|
+
[data-ui-number-field] > [data-part-increment] {
|
|
353
352
|
align-items: center;
|
|
354
353
|
appearance: none;
|
|
355
354
|
background-color: transparent;
|
|
@@ -373,8 +372,8 @@
|
|
|
373
372
|
|
|
374
373
|
/* The `icon` box inside each button is drawn at the control's own icon
|
|
375
374
|
step rather than at the icon family's default. */
|
|
376
|
-
[data-ui
|
|
377
|
-
[data-ui
|
|
375
|
+
[data-ui-number-field] [data-part-decrement],
|
|
376
|
+
[data-ui-number-field] [data-part-increment] {
|
|
378
377
|
--slotted-icon-size: var(--_icon-size);
|
|
379
378
|
}
|
|
380
379
|
|
|
@@ -389,7 +388,7 @@
|
|
|
389
388
|
* would have to be mirrored in a right-to-left document; less and more do not
|
|
390
389
|
* change with the reading direction.
|
|
391
390
|
*/
|
|
392
|
-
[data-ui
|
|
391
|
+
[data-ui-number-field][data-stepper='stacked'] [data-part-increment] > [data-ui-icon] {
|
|
393
392
|
rotate: 0.5turn;
|
|
394
393
|
}
|
|
395
394
|
|
|
@@ -403,11 +402,11 @@
|
|
|
403
402
|
* halves are one surface. The paint gives the inset back to the pointer:
|
|
404
403
|
* each half's hit area reaches the frame below.
|
|
405
404
|
*/
|
|
406
|
-
[data-ui
|
|
405
|
+
[data-ui-number-field][data-part-root][data-stepper='stacked'] {
|
|
407
406
|
padding-inline-end: 0;
|
|
408
407
|
}
|
|
409
408
|
|
|
410
|
-
[data-ui
|
|
409
|
+
[data-ui-number-field] > [data-part-stepper] {
|
|
411
410
|
align-self: stretch;
|
|
412
411
|
box-sizing: content-box;
|
|
413
412
|
display: flex;
|
|
@@ -418,26 +417,26 @@
|
|
|
418
417
|
padding-inline-end: var(--_column-inset);
|
|
419
418
|
}
|
|
420
419
|
|
|
421
|
-
[data-ui
|
|
420
|
+
[data-ui-number-field] > [data-part-stepper] > button {
|
|
422
421
|
/* Two halves of the column, whatever the frame's height turns out to be. */
|
|
423
422
|
block-size: 50%;
|
|
424
423
|
border-radius: var(--_column-radius);
|
|
425
424
|
inline-size: 100%;
|
|
426
425
|
}
|
|
427
426
|
|
|
428
|
-
[data-ui
|
|
429
|
-
> [data-part
|
|
430
|
-
> :is([data-part
|
|
427
|
+
[data-ui-number-field]
|
|
428
|
+
> [data-part-stepper]
|
|
429
|
+
> :is([data-part-increment], [data-part-decrement])::after {
|
|
431
430
|
content: '';
|
|
432
431
|
inset-inline: 0 calc(var(--_column-inset) * -1);
|
|
433
432
|
position: absolute;
|
|
434
433
|
}
|
|
435
434
|
|
|
436
|
-
[data-ui
|
|
435
|
+
[data-ui-number-field] > [data-part-stepper] > [data-part-increment]::after {
|
|
437
436
|
inset-block: calc(var(--_column-inset) * -1) 0;
|
|
438
437
|
}
|
|
439
438
|
|
|
440
|
-
[data-ui
|
|
439
|
+
[data-ui-number-field] > [data-part-stepper] > [data-part-decrement]::after {
|
|
441
440
|
inset-block: 0 calc(var(--_column-inset) * -1);
|
|
442
441
|
}
|
|
443
442
|
|
|
@@ -456,7 +455,7 @@
|
|
|
456
455
|
* percentage falls back to the `<svg>`'s own square, and two of them plus the
|
|
457
456
|
* divider stood a pixel taller than the value and grew the frame.
|
|
458
457
|
*/
|
|
459
|
-
[data-ui
|
|
458
|
+
[data-ui-number-field] > [data-part-stepper] > button > [data-ui-icon] {
|
|
460
459
|
block-size: min(var(--_icon-size), 100%);
|
|
461
460
|
contain: size;
|
|
462
461
|
}
|
|
@@ -469,28 +468,28 @@
|
|
|
469
468
|
* the two buttons, which is where a quantity belongs. No rule divides a
|
|
470
469
|
* button from the value: the ground it paints is its edge.
|
|
471
470
|
*/
|
|
472
|
-
[data-ui
|
|
471
|
+
[data-ui-number-field][data-part-root][data-stepper='split'] {
|
|
473
472
|
gap: 0;
|
|
474
473
|
padding-inline: var(--_inset);
|
|
475
474
|
}
|
|
476
475
|
|
|
477
|
-
[data-ui
|
|
478
|
-
[data-ui
|
|
476
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-decrement],
|
|
477
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-increment] {
|
|
479
478
|
block-size: var(--_action-size);
|
|
480
479
|
border-radius: var(--_action-radius);
|
|
481
480
|
inline-size: var(--_action-size);
|
|
482
481
|
}
|
|
483
482
|
|
|
484
|
-
[data-ui
|
|
483
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-input] {
|
|
485
484
|
padding-inline: var(--_gap);
|
|
486
485
|
text-align: center;
|
|
487
486
|
}
|
|
488
487
|
|
|
489
|
-
[data-ui
|
|
488
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-start] {
|
|
490
489
|
padding-inline-start: var(--_gap);
|
|
491
490
|
}
|
|
492
491
|
|
|
493
|
-
[data-ui
|
|
492
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-end] {
|
|
494
493
|
padding-inline-end: var(--_gap);
|
|
495
494
|
}
|
|
496
495
|
|
|
@@ -506,8 +505,8 @@
|
|
|
506
505
|
* small target. That shortfall is the arrangement's own, and `split` is the
|
|
507
506
|
* answer to it.
|
|
508
507
|
*/
|
|
509
|
-
[data-ui
|
|
510
|
-
[data-ui
|
|
508
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-decrement]::after,
|
|
509
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-increment]::after {
|
|
511
510
|
content: '';
|
|
512
511
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
513
512
|
position: absolute;
|
|
@@ -525,14 +524,14 @@
|
|
|
525
524
|
* inline axis, over the value's edge and past the frame's.
|
|
526
525
|
*/
|
|
527
526
|
@media (pointer: coarse) {
|
|
528
|
-
[data-ui
|
|
529
|
-
> :is([data-part
|
|
527
|
+
[data-ui-number-field][data-stepper='split']
|
|
528
|
+
> :is([data-part-decrement], [data-part-increment])::after {
|
|
530
529
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
531
530
|
}
|
|
532
531
|
|
|
533
|
-
[data-ui
|
|
534
|
-
> [data-part
|
|
535
|
-
> :is([data-part
|
|
532
|
+
[data-ui-number-field]
|
|
533
|
+
> [data-part-stepper]
|
|
534
|
+
> :is([data-part-increment], [data-part-decrement])::after {
|
|
536
535
|
inset-inline: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
537
536
|
}
|
|
538
537
|
}
|
|
@@ -543,16 +542,16 @@
|
|
|
543
542
|
* ones it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
544
543
|
*/
|
|
545
544
|
|
|
546
|
-
[data-ui
|
|
547
|
-
[data-ui
|
|
545
|
+
[data-ui-number-field] [data-part-decrement]:hover:not(:disabled),
|
|
546
|
+
[data-ui-number-field] [data-part-increment]:hover:not(:disabled) {
|
|
548
547
|
background-color: var(
|
|
549
548
|
--slotted-number-field-stepper-hover-background,
|
|
550
549
|
var(--slotted-tone-secondary-subtle-hover)
|
|
551
550
|
);
|
|
552
551
|
}
|
|
553
552
|
|
|
554
|
-
[data-ui
|
|
555
|
-
[data-ui
|
|
553
|
+
[data-ui-number-field] [data-part-decrement]:active:not(:disabled),
|
|
554
|
+
[data-ui-number-field] [data-part-increment]:active:not(:disabled) {
|
|
556
555
|
background-color: var(
|
|
557
556
|
--slotted-number-field-stepper-active-background,
|
|
558
557
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -566,8 +565,8 @@
|
|
|
566
565
|
* drawing them, because a number field without its stepper is a different
|
|
567
566
|
* component and a disabled form still has to say what it holds.
|
|
568
567
|
*/
|
|
569
|
-
[data-ui
|
|
570
|
-
[data-ui
|
|
568
|
+
[data-ui-number-field] [data-part-decrement]:disabled,
|
|
569
|
+
[data-ui-number-field] [data-part-increment]:disabled {
|
|
571
570
|
/**
|
|
572
571
|
* The ground as well as the ink. The disabled foreground and the resting
|
|
573
572
|
* stepper colour are two steps of one neutral and differ by about a shade,
|
|
@@ -589,21 +588,21 @@
|
|
|
589
588
|
* path on touch and a screen-reader cursor activating one directly. It sits
|
|
590
589
|
* inside the frame's own edge, so the ring never doubles the border.
|
|
591
590
|
*/
|
|
592
|
-
[data-ui
|
|
593
|
-
[data-ui
|
|
591
|
+
[data-ui-number-field] [data-part-decrement]:focus-visible,
|
|
592
|
+
[data-ui-number-field] [data-part-increment]:focus-visible {
|
|
594
593
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
595
594
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
596
595
|
}
|
|
597
596
|
|
|
598
597
|
/* ── Frame states ─────────────────────────────────────────────────────── */
|
|
599
598
|
|
|
600
|
-
[data-ui
|
|
599
|
+
[data-ui-number-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
601
600
|
[data-invalid]
|
|
602
601
|
) {
|
|
603
602
|
border-color: var(--slotted-number-field-hover-border-color, var(--slotted-tone-accent-border));
|
|
604
603
|
}
|
|
605
604
|
|
|
606
|
-
[data-ui
|
|
605
|
+
[data-ui-number-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
607
606
|
[data-readonly]
|
|
608
607
|
):not([data-invalid]) {
|
|
609
608
|
background-color: var(
|
|
@@ -612,7 +611,7 @@
|
|
|
612
611
|
);
|
|
613
612
|
}
|
|
614
613
|
|
|
615
|
-
[data-ui
|
|
614
|
+
[data-ui-number-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
616
615
|
[data-readonly]
|
|
617
616
|
):not([data-invalid]) {
|
|
618
617
|
background-color: var(
|
|
@@ -628,7 +627,7 @@
|
|
|
628
627
|
* matches `:focus-visible` on a text input for a pointer press as well as for
|
|
629
628
|
* a Tab, which is right for a control whose caret is the thing that moved.
|
|
630
629
|
*/
|
|
631
|
-
[data-ui
|
|
630
|
+
[data-ui-number-field][data-part-root]:has(> [data-part-input]:focus-visible) {
|
|
632
631
|
/* The resting shadow, recoloured: the lift under the control and the ring
|
|
633
632
|
around it are one colour, and the state decides which colour that is. */
|
|
634
633
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
@@ -644,8 +643,8 @@
|
|
|
644
643
|
* shadow that appears only under focus is a cell that changes size when it
|
|
645
644
|
* is used.
|
|
646
645
|
*/
|
|
647
|
-
[data-ui
|
|
648
|
-
> [data-part
|
|
646
|
+
[data-ui-number-field][data-part-root][data-variant='plain']:has(
|
|
647
|
+
> [data-part-input]:focus-visible
|
|
649
648
|
) {
|
|
650
649
|
box-shadow: none;
|
|
651
650
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
@@ -658,7 +657,7 @@
|
|
|
658
657
|
* colour on the element moves the outline, the shadow and both steppers'
|
|
659
658
|
* rings at once.
|
|
660
659
|
*/
|
|
661
|
-
[data-ui
|
|
660
|
+
[data-ui-number-field][data-part-root][data-invalid] {
|
|
662
661
|
--slotted-focus-ring-color: var(
|
|
663
662
|
--slotted-number-field-invalid-focus-ring-color,
|
|
664
663
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -686,17 +685,15 @@
|
|
|
686
685
|
box-shadow: var(--_invalid-edge);
|
|
687
686
|
}
|
|
688
687
|
|
|
689
|
-
[data-ui
|
|
690
|
-
> [data-part='input']:focus-visible
|
|
691
|
-
) {
|
|
688
|
+
[data-ui-number-field][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
692
689
|
box-shadow:
|
|
693
690
|
var(--_invalid-edge),
|
|
694
691
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
695
692
|
var(--slotted-focus-ring-color, Highlight);
|
|
696
693
|
}
|
|
697
694
|
|
|
698
|
-
[data-ui
|
|
699
|
-
> [data-part
|
|
695
|
+
[data-ui-number-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
696
|
+
> [data-part-input]:focus-visible
|
|
700
697
|
) {
|
|
701
698
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
702
699
|
it; the edge reaches past the ring. */
|
|
@@ -714,23 +711,21 @@
|
|
|
714
711
|
* control draws its ring double, which a valid ring is not.
|
|
715
712
|
*/
|
|
716
713
|
@media (forced-colors: active) {
|
|
717
|
-
[data-ui
|
|
714
|
+
[data-ui-number-field][data-part-root][data-invalid] {
|
|
718
715
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
719
716
|
outline-offset: calc(
|
|
720
717
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
721
718
|
);
|
|
722
719
|
}
|
|
723
720
|
|
|
724
|
-
[data-ui
|
|
725
|
-
> [data-part='input']:focus-visible
|
|
726
|
-
) {
|
|
721
|
+
[data-ui-number-field][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
727
722
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
728
723
|
var(--slotted-focus-ring-color, Highlight);
|
|
729
724
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
730
725
|
}
|
|
731
726
|
|
|
732
|
-
[data-ui
|
|
733
|
-
> [data-part
|
|
727
|
+
[data-ui-number-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
728
|
+
> [data-part-input]:focus-visible
|
|
734
729
|
) {
|
|
735
730
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
736
731
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -745,7 +740,7 @@
|
|
|
745
740
|
* mistakable for disabled: the value is still real and still submitted. The
|
|
746
741
|
* ground says "not yours to change" and the ink says nothing at all.
|
|
747
742
|
*/
|
|
748
|
-
[data-ui
|
|
743
|
+
[data-ui-number-field][data-part-root][data-readonly] {
|
|
749
744
|
background-color: var(
|
|
750
745
|
--slotted-number-field-readonly-background,
|
|
751
746
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -773,8 +768,8 @@
|
|
|
773
768
|
* disabled `fieldset` disables every control inside it, and the control has
|
|
774
769
|
* no way to know.
|
|
775
770
|
*/
|
|
776
|
-
[data-ui
|
|
777
|
-
[data-ui
|
|
771
|
+
[data-ui-number-field][data-part-root][data-disabled],
|
|
772
|
+
[data-ui-number-field][data-part-root]:has(> [data-part-input]:disabled) {
|
|
778
773
|
background-color: var(
|
|
779
774
|
--slotted-number-field-disabled-background,
|
|
780
775
|
var(--slotted-disabled-background)
|
|
@@ -790,8 +785,8 @@
|
|
|
790
785
|
* Muted to the colour the theme measures rather than faded by opacity: a
|
|
791
786
|
* value nobody can read is a field nobody can check.
|
|
792
787
|
*/
|
|
793
|
-
[data-ui
|
|
794
|
-
[data-ui
|
|
788
|
+
[data-ui-number-field][data-part-root][data-disabled] > [data-part-start],
|
|
789
|
+
[data-ui-number-field][data-part-root][data-disabled] > [data-part-end] {
|
|
795
790
|
color: var(--slotted-disabled-foreground);
|
|
796
791
|
}
|
|
797
792
|
}
|