@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
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* used outside a field looks the same as one inside it and the field's DOM
|
|
14
14
|
* never becomes part of this stylesheet's contract.
|
|
15
15
|
*/
|
|
16
|
-
[data-ui
|
|
16
|
+
[data-ui-text-field][data-part-root] {
|
|
17
17
|
/**
|
|
18
18
|
* Type, height, inline padding, gap and glyph size all come from the
|
|
19
19
|
* control scales — the only ones the theme restates per density — so a
|
|
@@ -130,15 +130,15 @@
|
|
|
130
130
|
* The cost is written down: at `md` the glyph now ends four pixels nearer
|
|
131
131
|
* the border than the text begins from it.
|
|
132
132
|
*/
|
|
133
|
-
[data-ui
|
|
134
|
-
> :is([data-part
|
|
135
|
-
> [data-part
|
|
133
|
+
[data-ui-text-field][data-part-root]:has(
|
|
134
|
+
> :is([data-part-clear], [data-part-copy], [data-part-reveal]):not([hidden]):last-child,
|
|
135
|
+
> [data-part-end]:last-child > [data-part-action]:last-child
|
|
136
136
|
) {
|
|
137
137
|
padding-inline-end: var(--_inset);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
[data-ui
|
|
141
|
-
> [data-part
|
|
140
|
+
[data-ui-text-field][data-part-root]:has(
|
|
141
|
+
> [data-part-start]:first-child > [data-part-action]:first-child
|
|
142
142
|
) {
|
|
143
143
|
padding-inline-start: var(--_inset);
|
|
144
144
|
}
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
* it a text control: the value, the caret, the selection and every native
|
|
150
150
|
* attribute a consumer wrote.
|
|
151
151
|
*/
|
|
152
|
-
[data-ui
|
|
152
|
+
[data-ui-text-field] > [data-part-input] {
|
|
153
153
|
background-color: transparent;
|
|
154
154
|
/* The frame's border box, not its content box: on a coarse pointer the frame
|
|
155
155
|
is the touch target's height and the control it holds is too. Stretched
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
text-overflow: ellipsis;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
[data-ui
|
|
178
|
+
[data-ui-text-field] > [data-part-input]::placeholder {
|
|
179
179
|
color: var(--slotted-text-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
180
180
|
/* A placeholder longer than the control is clipped at a word rather than
|
|
181
181
|
mid-glyph, which is the difference between a hint and a smear. */
|
|
@@ -187,8 +187,8 @@
|
|
|
187
187
|
* `type="search"` control would be the second. The native decorations are
|
|
188
188
|
* withdrawn rather than left to overlap.
|
|
189
189
|
*/
|
|
190
|
-
[data-ui
|
|
191
|
-
[data-ui
|
|
190
|
+
[data-ui-text-field] > [data-part-input]::-webkit-search-cancel-button,
|
|
191
|
+
[data-ui-text-field] > [data-part-input]::-webkit-search-decoration {
|
|
192
192
|
appearance: none;
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
* seeing, so it is repainted in the accent surface the theme owns instead of
|
|
200
200
|
* in the browser's yellow.
|
|
201
201
|
*/
|
|
202
|
-
[data-ui
|
|
202
|
+
[data-ui-text-field] > [data-part-input]:autofill {
|
|
203
203
|
box-shadow: inset 0 0 0 100px
|
|
204
204
|
var(--slotted-text-field-autofill-background, var(--slotted-tone-accent-surface));
|
|
205
205
|
-webkit-text-fill-color: var(--slotted-text-field-color, var(--slotted-text, CanvasText));
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
* disagreeing about one row.
|
|
214
214
|
*/
|
|
215
215
|
|
|
216
|
-
[data-ui
|
|
216
|
+
[data-ui-text-field][data-part-root][data-size='sm'] {
|
|
217
217
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
218
218
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
219
219
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
--_inner-size: var(--slotted-control-inner-size-sm, 22px);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
[data-ui
|
|
225
|
+
[data-ui-text-field][data-part-root][data-size='md'] {
|
|
226
226
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
227
227
|
--_height: var(--slotted-control-height-md, 34px);
|
|
228
228
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
[data-ui
|
|
234
|
+
[data-ui-text-field][data-part-root][data-size='lg'] {
|
|
235
235
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
236
236
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
237
237
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
* it takes the width the buttons leave rather than the whole row, so the
|
|
247
247
|
* button's label never wraps to make room for it.
|
|
248
248
|
*/
|
|
249
|
-
[data-ui
|
|
249
|
+
[data-ui-button-group] > [data-ui-text-field][data-part-root] {
|
|
250
250
|
flex: 1 1 0;
|
|
251
251
|
inline-size: auto;
|
|
252
252
|
}
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
* pointer crosses it.
|
|
266
266
|
*/
|
|
267
267
|
|
|
268
|
-
[data-ui
|
|
268
|
+
[data-ui-text-field][data-part-root][data-variant='subtle'] {
|
|
269
269
|
background-color: var(
|
|
270
270
|
--slotted-text-field-subtle-background,
|
|
271
271
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
/* No edge, no lift, no ground and no corner of its own: the cell it sits in
|
|
280
280
|
is the box, the row is the ground, a cell has no corner, and the resting
|
|
281
281
|
shadow would draw the cell where there is none. */
|
|
282
|
-
[data-ui
|
|
282
|
+
[data-ui-text-field][data-part-root][data-variant='plain'] {
|
|
283
283
|
background-color: transparent;
|
|
284
284
|
border-color: transparent;
|
|
285
285
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
* its only edge exactly where an edge matters most.
|
|
293
293
|
*/
|
|
294
294
|
@media (forced-colors: active) {
|
|
295
|
-
[data-ui
|
|
295
|
+
[data-ui-text-field][data-part-root][data-variant='plain'] {
|
|
296
296
|
border-color: ButtonBorder;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
@@ -302,7 +302,7 @@
|
|
|
302
302
|
* A back-office form full of identifiers, hashes and keys, which is the
|
|
303
303
|
* audience `docs/product/prd.md` names first. Primer and Polaris both ship it.
|
|
304
304
|
*/
|
|
305
|
-
[data-ui
|
|
305
|
+
[data-ui-text-field][data-part-root][data-mono] {
|
|
306
306
|
font-family: var(--slotted-font-family-mono, monospace);
|
|
307
307
|
/* Digits that do not shift as a value is typed over. */
|
|
308
308
|
font-variant-numeric: tabular-nums;
|
|
@@ -315,8 +315,8 @@
|
|
|
315
315
|
* than the value: an adornment annotates, and a reader looking for what they
|
|
316
316
|
* typed should not have to step over it.
|
|
317
317
|
*/
|
|
318
|
-
[data-ui
|
|
319
|
-
[data-ui
|
|
318
|
+
[data-ui-text-field] > [data-part-start],
|
|
319
|
+
[data-ui-text-field] > [data-part-end] {
|
|
320
320
|
align-items: center;
|
|
321
321
|
color: var(--slotted-text-field-adornment-color, var(--slotted-text-muted, GrayText));
|
|
322
322
|
display: inline-flex;
|
|
@@ -345,16 +345,16 @@
|
|
|
345
345
|
* table draws a 12-pixel glyph and nothing has to be written per instance.
|
|
346
346
|
* A bare `svg` a consumer passed instead is held to the same box.
|
|
347
347
|
*/
|
|
348
|
-
[data-ui
|
|
349
|
-
[data-ui
|
|
348
|
+
[data-ui-text-field] > [data-part-start],
|
|
349
|
+
[data-ui-text-field] > [data-part-end] {
|
|
350
350
|
--slotted-icon-size: var(--_icon-size);
|
|
351
351
|
/* And a key or a chip placed there is the height the inside of this
|
|
352
352
|
control has, from the foundation's scale for it. */
|
|
353
353
|
--slotted-control-inner-size: var(--_inner-size);
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
[data-ui
|
|
357
|
-
[data-ui
|
|
356
|
+
[data-ui-text-field] > [data-part-start] > svg,
|
|
357
|
+
[data-ui-text-field] > [data-part-end] > svg {
|
|
358
358
|
block-size: var(--_icon-size);
|
|
359
359
|
inline-size: var(--_icon-size);
|
|
360
360
|
}
|
|
@@ -373,10 +373,8 @@
|
|
|
373
373
|
* keeps the gap to the value equal as well, and because a symmetric padding
|
|
374
374
|
* cannot disagree with `unicode-bidi: plaintext` about which side is which.
|
|
375
375
|
*/
|
|
376
|
-
[data-ui
|
|
377
|
-
|
|
378
|
-
[data-ui='text-field']
|
|
379
|
-
> [data-part='end']:not(:has(svg, img, [data-ui='icon'], [data-part='action'])) {
|
|
376
|
+
[data-ui-text-field] > [data-part-start]:not(:has(svg, img, [data-ui-icon], [data-part-action])),
|
|
377
|
+
[data-ui-text-field] > [data-part-end]:not(:has(svg, img, [data-ui-icon], [data-part-action])) {
|
|
380
378
|
padding-inline: calc(var(--_icon-size) / 8);
|
|
381
379
|
}
|
|
382
380
|
|
|
@@ -390,8 +388,8 @@
|
|
|
390
388
|
* Their glyphs are the `Glyph` element the binding renders: a character is
|
|
391
389
|
* never an icon.
|
|
392
390
|
*/
|
|
393
|
-
[data-ui
|
|
394
|
-
[data-ui
|
|
391
|
+
[data-ui-text-field] > :is([data-part-clear], [data-part-copy], [data-part-reveal]),
|
|
392
|
+
[data-ui-text-field] > :is([data-part-start], [data-part-end]) > [data-part-action] {
|
|
395
393
|
--slotted-icon-size: var(--_icon-size);
|
|
396
394
|
|
|
397
395
|
align-items: center;
|
|
@@ -434,9 +432,9 @@
|
|
|
434
432
|
* the two, so the attribute that makes it accessible is the one that shapes
|
|
435
433
|
* it.
|
|
436
434
|
*/
|
|
437
|
-
[data-ui
|
|
438
|
-
> :is([data-part
|
|
439
|
-
> [data-part
|
|
435
|
+
[data-ui-text-field]
|
|
436
|
+
> :is([data-part-start], [data-part-end])
|
|
437
|
+
> [data-part-action]:not([aria-label], [aria-labelledby]) {
|
|
440
438
|
/* Words in the frame's quiet ink read as a suffix, not as something to
|
|
441
439
|
press: "Search" beside the value looked like a unit. A named command
|
|
442
440
|
or a chosen country code carries the value's ink; a lone mark stays
|
|
@@ -458,9 +456,9 @@
|
|
|
458
456
|
* translate puts its centre at `(1cap + 1ex) / 4` above the baseline — the
|
|
459
457
|
* midpoint of the capitals' and the lowercase letters' own centres.
|
|
460
458
|
*/
|
|
461
|
-
[data-ui
|
|
462
|
-
> :is([data-part
|
|
463
|
-
> [data-part
|
|
459
|
+
[data-ui-text-field]
|
|
460
|
+
> :is([data-part-start], [data-part-end])
|
|
461
|
+
> [data-part-action]:not([aria-label], [aria-labelledby]) {
|
|
464
462
|
align-content: center;
|
|
465
463
|
align-items: baseline;
|
|
466
464
|
display: inline-grid;
|
|
@@ -468,10 +466,10 @@
|
|
|
468
466
|
justify-content: center;
|
|
469
467
|
}
|
|
470
468
|
|
|
471
|
-
[data-ui
|
|
472
|
-
> :is([data-part
|
|
473
|
-
> [data-part
|
|
474
|
-
> [data-ui
|
|
469
|
+
[data-ui-text-field]
|
|
470
|
+
> :is([data-part-start], [data-part-end])
|
|
471
|
+
> [data-part-action]:not([aria-label], [aria-labelledby])
|
|
472
|
+
> [data-ui-icon] {
|
|
475
473
|
margin-block-start: calc((1cap + 1ex) / 4 - var(--_icon-size) / 2);
|
|
476
474
|
translate: 0 calc(var(--_icon-size) / 2 - (1cap + 1ex) / 4);
|
|
477
475
|
}
|
|
@@ -480,7 +478,7 @@
|
|
|
480
478
|
* An adornment holding a button is not quiet text any more: its gap is the
|
|
481
479
|
* one between two buttons, and it does not pad a glyph that is not there.
|
|
482
480
|
*/
|
|
483
|
-
[data-ui
|
|
481
|
+
[data-ui-text-field] > :is([data-part-start], [data-part-end]):has(> [data-part-action]) {
|
|
484
482
|
gap: 0;
|
|
485
483
|
}
|
|
486
484
|
|
|
@@ -493,11 +491,8 @@
|
|
|
493
491
|
* correction `docs/token-foundation.md` leaves to the family rather than to
|
|
494
492
|
* the theme.
|
|
495
493
|
*/
|
|
496
|
-
[data-ui
|
|
497
|
-
|
|
498
|
-
[data-ui='text-field']
|
|
499
|
-
> :is([data-part='start'], [data-part='end'])
|
|
500
|
-
> [data-part='action']::after {
|
|
494
|
+
[data-ui-text-field] > :is([data-part-clear], [data-part-copy], [data-part-reveal])::after,
|
|
495
|
+
[data-ui-text-field] > :is([data-part-start], [data-part-end]) > [data-part-action]::after {
|
|
501
496
|
content: '';
|
|
502
497
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
503
498
|
position: absolute;
|
|
@@ -508,45 +503,42 @@
|
|
|
508
503
|
the hit area grows to 44 pixels around them. Side by side, no button
|
|
509
504
|
reaches across the edge it shares with the next. */
|
|
510
505
|
@media (pointer: coarse) {
|
|
511
|
-
[data-ui
|
|
512
|
-
|
|
513
|
-
> [data-part='action']::after,
|
|
514
|
-
[data-ui='text-field']
|
|
515
|
-
> :is([data-part='clear'], [data-part='copy'], [data-part='reveal'])::after {
|
|
506
|
+
[data-ui-text-field] > :is([data-part-start], [data-part-end]) > [data-part-action]::after,
|
|
507
|
+
[data-ui-text-field] > :is([data-part-clear], [data-part-copy], [data-part-reveal])::after {
|
|
516
508
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
517
509
|
}
|
|
518
510
|
|
|
519
|
-
[data-ui
|
|
520
|
-
> :is([data-part
|
|
521
|
-
~ :is([data-part
|
|
511
|
+
[data-ui-text-field]
|
|
512
|
+
> :is([data-part-clear], [data-part-copy]):has(
|
|
513
|
+
~ :is([data-part-copy], [data-part-reveal]):not([hidden])
|
|
522
514
|
)::after,
|
|
523
|
-
[data-ui
|
|
524
|
-
> :is([data-part
|
|
525
|
-
> [data-part
|
|
515
|
+
[data-ui-text-field]
|
|
516
|
+
> :is([data-part-start], [data-part-end])
|
|
517
|
+
> [data-part-action]:has(+ [data-part-action])::after {
|
|
526
518
|
inset-inline-end: 0;
|
|
527
519
|
}
|
|
528
520
|
|
|
529
|
-
[data-ui
|
|
530
|
-
> :is([data-part
|
|
531
|
-
~ :is([data-part
|
|
532
|
-
[data-ui
|
|
533
|
-
> :is([data-part
|
|
534
|
-
> [data-part
|
|
535
|
-
+ [data-part
|
|
521
|
+
[data-ui-text-field]
|
|
522
|
+
> :is([data-part-clear], [data-part-copy]):not([hidden])
|
|
523
|
+
~ :is([data-part-copy], [data-part-reveal])::after,
|
|
524
|
+
[data-ui-text-field]
|
|
525
|
+
> :is([data-part-start], [data-part-end])
|
|
526
|
+
> [data-part-action]
|
|
527
|
+
+ [data-part-action]::after {
|
|
536
528
|
inset-inline-start: 0;
|
|
537
529
|
}
|
|
538
530
|
}
|
|
539
531
|
|
|
540
532
|
/* An open menu keeps its button pressed under the pointer as well, and a
|
|
541
533
|
finished copy keeps its success ink until the check goes. */
|
|
542
|
-
[data-ui
|
|
543
|
-
> :is([data-part
|
|
534
|
+
[data-ui-text-field]
|
|
535
|
+
> :is([data-part-clear], [data-part-copy], [data-part-reveal]):hover:not(
|
|
544
536
|
:disabled,
|
|
545
537
|
[data-complete]
|
|
546
538
|
),
|
|
547
|
-
[data-ui
|
|
548
|
-
> :is([data-part
|
|
549
|
-
> [data-part
|
|
539
|
+
[data-ui-text-field]
|
|
540
|
+
> :is([data-part-start], [data-part-end])
|
|
541
|
+
> [data-part-action]:hover:not(:disabled, [aria-expanded='true']) {
|
|
550
542
|
background-color: var(
|
|
551
543
|
--slotted-text-field-action-hover-background,
|
|
552
544
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -559,11 +551,11 @@
|
|
|
559
551
|
* settles a pixel, and inside a 24-pixel box beside the value that reads as
|
|
560
552
|
* the value moving (dossier § 4, `recusar`).
|
|
561
553
|
*/
|
|
562
|
-
[data-ui
|
|
563
|
-
> :is([data-part
|
|
564
|
-
[data-ui
|
|
565
|
-
> :is([data-part
|
|
566
|
-
> [data-part
|
|
554
|
+
[data-ui-text-field]
|
|
555
|
+
> :is([data-part-clear], [data-part-copy], [data-part-reveal]):active:not(:disabled),
|
|
556
|
+
[data-ui-text-field]
|
|
557
|
+
> :is([data-part-start], [data-part-end])
|
|
558
|
+
> [data-part-action]:active:not(:disabled) {
|
|
567
559
|
background-color: var(
|
|
568
560
|
--slotted-text-field-action-active-background,
|
|
569
561
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -571,21 +563,19 @@
|
|
|
571
563
|
}
|
|
572
564
|
|
|
573
565
|
/* A menu or a popover the button opened keeps it pressed while it is open. */
|
|
574
|
-
[data-ui
|
|
575
|
-
> :is([data-part
|
|
576
|
-
> [data-part
|
|
566
|
+
[data-ui-text-field]
|
|
567
|
+
> :is([data-part-start], [data-part-end])
|
|
568
|
+
> [data-part-action][aria-expanded='true'] {
|
|
577
569
|
background-color: var(
|
|
578
570
|
--slotted-text-field-action-active-background,
|
|
579
571
|
var(--slotted-tone-secondary-subtle-active)
|
|
580
572
|
);
|
|
581
573
|
}
|
|
582
574
|
|
|
583
|
-
[data-ui
|
|
584
|
-
|
|
585
|
-
> [data-part
|
|
586
|
-
|
|
587
|
-
> :is([data-part='start'], [data-part='end'])
|
|
588
|
-
> [data-part='action'] {
|
|
575
|
+
[data-ui-text-field] > :is([data-part-start], [data-part-end]) > [data-part-action]:disabled,
|
|
576
|
+
[data-ui-text-field][data-part-root][data-disabled]
|
|
577
|
+
> :is([data-part-start], [data-part-end])
|
|
578
|
+
> [data-part-action] {
|
|
589
579
|
color: var(--slotted-disabled-foreground);
|
|
590
580
|
cursor: not-allowed;
|
|
591
581
|
}
|
|
@@ -595,17 +585,16 @@
|
|
|
595
585
|
* from the value to a button has to move something visible, and a ring
|
|
596
586
|
* around the whole frame would sit still while focus moved inside it.
|
|
597
587
|
*/
|
|
598
|
-
[data-ui
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
>
|
|
602
|
-
> [data-part='action']:focus-visible {
|
|
588
|
+
[data-ui-text-field] > :is([data-part-clear], [data-part-copy], [data-part-reveal]):focus-visible,
|
|
589
|
+
[data-ui-text-field]
|
|
590
|
+
> :is([data-part-start], [data-part-end])
|
|
591
|
+
> [data-part-action]:focus-visible {
|
|
603
592
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
604
593
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
605
594
|
}
|
|
606
595
|
|
|
607
596
|
/** A copy that finished: the mark changes as well as the ink, and returns on its own. */
|
|
608
|
-
[data-ui
|
|
597
|
+
[data-ui-text-field] > [data-part-copy][data-complete] {
|
|
609
598
|
color: var(
|
|
610
599
|
--slotted-text-field-copy-complete-color,
|
|
611
600
|
var(--slotted-tone-success-text, CanvasText)
|
|
@@ -618,14 +607,14 @@
|
|
|
618
607
|
* fifths of its size and transparent, on the entering curve. Nothing leaves:
|
|
619
608
|
* the old mark is gone in the same frame, so there is no exit to time.
|
|
620
609
|
*/
|
|
621
|
-
[data-ui
|
|
610
|
+
[data-ui-text-field] > :is([data-part-copy], [data-part-reveal]) > [data-ui-icon] {
|
|
622
611
|
transition:
|
|
623
612
|
opacity var(--slotted-duration-short) var(--slotted-easing-enter),
|
|
624
613
|
scale var(--slotted-duration-short) var(--slotted-easing-enter);
|
|
625
614
|
}
|
|
626
615
|
|
|
627
616
|
@starting-style {
|
|
628
|
-
[data-ui
|
|
617
|
+
[data-ui-text-field] > :is([data-part-copy], [data-part-reveal]) > [data-ui-icon] {
|
|
629
618
|
opacity: 0;
|
|
630
619
|
scale: 0.8;
|
|
631
620
|
}
|
|
@@ -641,8 +630,8 @@
|
|
|
641
630
|
* out on the leaving one, in the same short step, and `display` is held
|
|
642
631
|
* until it has gone.
|
|
643
632
|
*/
|
|
644
|
-
[data-ui
|
|
645
|
-
> :is([data-part
|
|
633
|
+
[data-ui-text-field]
|
|
634
|
+
> :is([data-part-busy], [data-part-caps-lock], [data-part-clear], [data-part-copy]) {
|
|
646
635
|
transition:
|
|
647
636
|
var(--_action-transition),
|
|
648
637
|
opacity var(--slotted-duration-short) var(--slotted-easing-enter),
|
|
@@ -650,13 +639,8 @@
|
|
|
650
639
|
display var(--slotted-duration-short) allow-discrete;
|
|
651
640
|
}
|
|
652
641
|
|
|
653
|
-
[data-ui
|
|
654
|
-
> :is(
|
|
655
|
-
[data-part='busy'],
|
|
656
|
-
[data-part='caps-lock'],
|
|
657
|
-
[data-part='clear'],
|
|
658
|
-
[data-part='copy']
|
|
659
|
-
)[hidden] {
|
|
642
|
+
[data-ui-text-field]
|
|
643
|
+
> :is([data-part-busy], [data-part-caps-lock], [data-part-clear], [data-part-copy])[hidden] {
|
|
660
644
|
display: none;
|
|
661
645
|
opacity: 0;
|
|
662
646
|
scale: 0.8;
|
|
@@ -667,8 +651,8 @@
|
|
|
667
651
|
}
|
|
668
652
|
|
|
669
653
|
@starting-style {
|
|
670
|
-
[data-ui
|
|
671
|
-
> :is([data-part
|
|
654
|
+
[data-ui-text-field]
|
|
655
|
+
> :is([data-part-busy], [data-part-caps-lock], [data-part-clear], [data-part-copy]) {
|
|
672
656
|
opacity: 0;
|
|
673
657
|
scale: 0.8;
|
|
674
658
|
}
|
|
@@ -678,7 +662,7 @@
|
|
|
678
662
|
* The ring is the one `spinner` draws for every family, at this control's
|
|
679
663
|
* glyph size, so it occupies the box a mark beside it would.
|
|
680
664
|
*/
|
|
681
|
-
[data-ui
|
|
665
|
+
[data-ui-text-field] > [data-part-busy] {
|
|
682
666
|
--slotted-spinner-size: var(--_icon-size);
|
|
683
667
|
|
|
684
668
|
color: var(--slotted-text-field-adornment-color, var(--slotted-text-muted, GrayText));
|
|
@@ -690,7 +674,7 @@
|
|
|
690
674
|
* the value, so it is the warning ink on the glyph alone and never the
|
|
691
675
|
* frame's edge — the frame's one alarming state is `invalid`.
|
|
692
676
|
*/
|
|
693
|
-
[data-ui
|
|
677
|
+
[data-ui-text-field] > [data-part-caps-lock] {
|
|
694
678
|
--slotted-icon-size: var(--_icon-size);
|
|
695
679
|
|
|
696
680
|
align-items: center;
|
|
@@ -705,13 +689,13 @@
|
|
|
705
689
|
* one it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
706
690
|
*/
|
|
707
691
|
|
|
708
|
-
[data-ui
|
|
692
|
+
[data-ui-text-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
709
693
|
[data-invalid]
|
|
710
694
|
) {
|
|
711
695
|
border-color: var(--slotted-text-field-hover-border-color, var(--slotted-tone-accent-border));
|
|
712
696
|
}
|
|
713
697
|
|
|
714
|
-
[data-ui
|
|
698
|
+
[data-ui-text-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
715
699
|
[data-readonly]
|
|
716
700
|
):not([data-invalid]) {
|
|
717
701
|
background-color: var(
|
|
@@ -720,7 +704,7 @@
|
|
|
720
704
|
);
|
|
721
705
|
}
|
|
722
706
|
|
|
723
|
-
[data-ui
|
|
707
|
+
[data-ui-text-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
724
708
|
[data-readonly]
|
|
725
709
|
):not([data-invalid]) {
|
|
726
710
|
background-color: var(
|
|
@@ -737,7 +721,7 @@
|
|
|
737
721
|
* pointer press as well as for a Tab, which is exactly right for a control
|
|
738
722
|
* whose caret is the thing that moved.
|
|
739
723
|
*/
|
|
740
|
-
[data-ui
|
|
724
|
+
[data-ui-text-field][data-part-root]:has(> [data-part-input]:focus-visible) {
|
|
741
725
|
/**
|
|
742
726
|
* The resting shadow, recoloured. The geometry is the foundation's and the
|
|
743
727
|
* ink is the focus ring's, so the lift under the control and the ring
|
|
@@ -756,8 +740,8 @@
|
|
|
756
740
|
* shadow that appears only under focus is a cell that changes size when it
|
|
757
741
|
* is used.
|
|
758
742
|
*/
|
|
759
|
-
[data-ui
|
|
760
|
-
> [data-part
|
|
743
|
+
[data-ui-text-field][data-part-root][data-variant='plain']:has(
|
|
744
|
+
> [data-part-input]:focus-visible
|
|
761
745
|
) {
|
|
762
746
|
box-shadow: none;
|
|
763
747
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
@@ -775,7 +759,7 @@
|
|
|
775
759
|
* rule for a family, and it is the rule `checkbox`, `radio-group` and
|
|
776
760
|
* `switch` inherit rather than restate when they arrive.
|
|
777
761
|
*/
|
|
778
|
-
[data-ui
|
|
762
|
+
[data-ui-text-field][data-part-root][data-invalid] {
|
|
779
763
|
--slotted-focus-ring-color: var(
|
|
780
764
|
--slotted-text-field-invalid-focus-ring-color,
|
|
781
765
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -802,15 +786,15 @@
|
|
|
802
786
|
box-shadow: var(--_invalid-edge);
|
|
803
787
|
}
|
|
804
788
|
|
|
805
|
-
[data-ui
|
|
789
|
+
[data-ui-text-field][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
806
790
|
box-shadow:
|
|
807
791
|
var(--_invalid-edge),
|
|
808
792
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
809
793
|
var(--slotted-focus-ring-color, Highlight);
|
|
810
794
|
}
|
|
811
795
|
|
|
812
|
-
[data-ui
|
|
813
|
-
> [data-part
|
|
796
|
+
[data-ui-text-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
797
|
+
> [data-part-input]:focus-visible
|
|
814
798
|
) {
|
|
815
799
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
816
800
|
it; the edge reaches past the ring. */
|
|
@@ -828,23 +812,21 @@
|
|
|
828
812
|
* control draws its ring double, which a valid ring is not.
|
|
829
813
|
*/
|
|
830
814
|
@media (forced-colors: active) {
|
|
831
|
-
[data-ui
|
|
815
|
+
[data-ui-text-field][data-part-root][data-invalid] {
|
|
832
816
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
833
817
|
outline-offset: calc(
|
|
834
818
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
835
819
|
);
|
|
836
820
|
}
|
|
837
821
|
|
|
838
|
-
[data-ui
|
|
839
|
-
> [data-part='input']:focus-visible
|
|
840
|
-
) {
|
|
822
|
+
[data-ui-text-field][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
841
823
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
842
824
|
var(--slotted-focus-ring-color, Highlight);
|
|
843
825
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
844
826
|
}
|
|
845
827
|
|
|
846
|
-
[data-ui
|
|
847
|
-
> [data-part
|
|
828
|
+
[data-ui-text-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
829
|
+
> [data-part-input]:focus-visible
|
|
848
830
|
) {
|
|
849
831
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
850
832
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -859,7 +841,7 @@
|
|
|
859
841
|
* mistakable for disabled: the value is still real and still submitted. The
|
|
860
842
|
* ground says "not yours to change" and the ink says nothing at all.
|
|
861
843
|
*/
|
|
862
|
-
[data-ui
|
|
844
|
+
[data-ui-text-field][data-part-root][data-readonly] {
|
|
863
845
|
background-color: var(
|
|
864
846
|
--slotted-text-field-readonly-background,
|
|
865
847
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -875,8 +857,8 @@
|
|
|
875
857
|
* operable and answering nothing — a defect the deleted `input` family
|
|
876
858
|
* recorded and fixed, and one no rebuild is allowed to reintroduce.
|
|
877
859
|
*/
|
|
878
|
-
[data-ui
|
|
879
|
-
[data-ui
|
|
860
|
+
[data-ui-text-field][data-part-root][data-disabled],
|
|
861
|
+
[data-ui-text-field][data-part-root]:has(> [data-part-input]:disabled) {
|
|
880
862
|
background-color: var(
|
|
881
863
|
--slotted-text-field-disabled-background,
|
|
882
864
|
var(--slotted-disabled-background)
|
|
@@ -893,8 +875,8 @@
|
|
|
893
875
|
* value nobody can read is a field nobody can check, and a disabled form
|
|
894
876
|
* still has to say what it holds.
|
|
895
877
|
*/
|
|
896
|
-
[data-ui
|
|
897
|
-
[data-ui
|
|
878
|
+
[data-ui-text-field][data-part-root][data-disabled] > [data-part-start],
|
|
879
|
+
[data-ui-text-field][data-part-root][data-disabled] > [data-part-end] {
|
|
898
880
|
color: var(--slotted-disabled-foreground);
|
|
899
881
|
}
|
|
900
882
|
}
|