@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
|
* `text-field` itself, so a theme can move one without the other and neither
|
|
14
14
|
* stylesheet depends on the other's selectors.
|
|
15
15
|
*/
|
|
16
|
-
[data-ui
|
|
16
|
+
[data-ui-textarea][data-part-root] {
|
|
17
17
|
/**
|
|
18
18
|
* Type, height, inline padding and glyph size come from the control
|
|
19
19
|
* scales, the only ones the theme restates per density.
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
box-shadow var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
[data-ui
|
|
88
|
+
[data-ui-textarea][data-part-root]::placeholder {
|
|
89
89
|
color: var(--slotted-textarea-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -96,19 +96,19 @@
|
|
|
96
96
|
* height and its own line box.
|
|
97
97
|
*/
|
|
98
98
|
|
|
99
|
-
[data-ui
|
|
99
|
+
[data-ui-textarea][data-part-root][data-size='sm'] {
|
|
100
100
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
101
101
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
102
102
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
[data-ui
|
|
105
|
+
[data-ui-textarea][data-part-root][data-size='md'] {
|
|
106
106
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
107
107
|
--_height: var(--slotted-control-height-md, 34px);
|
|
108
108
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
[data-ui
|
|
111
|
+
[data-ui-textarea][data-part-root][data-size='lg'] {
|
|
112
112
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
113
113
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
114
114
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
* into the page, and one that shows nothing until it is used.
|
|
122
122
|
*/
|
|
123
123
|
|
|
124
|
-
[data-ui
|
|
124
|
+
[data-ui-textarea][data-part-root][data-variant='subtle'] {
|
|
125
125
|
background-color: var(
|
|
126
126
|
--slotted-textarea-subtle-background,
|
|
127
127
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
/* No edge, no lift, no ground and no corner of its own: the cell it sits in
|
|
136
136
|
is the box, the row is the ground, a cell has no corner, and the resting
|
|
137
137
|
shadow would draw the cell where there is none. */
|
|
138
|
-
[data-ui
|
|
138
|
+
[data-ui-textarea][data-part-root][data-variant='plain'] {
|
|
139
139
|
background-color: transparent;
|
|
140
140
|
border-color: transparent;
|
|
141
141
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -144,12 +144,12 @@
|
|
|
144
144
|
|
|
145
145
|
/** A transparent border has no system colour to be remapped to. */
|
|
146
146
|
@media (forced-colors: active) {
|
|
147
|
-
[data-ui
|
|
147
|
+
[data-ui-textarea][data-part-root][data-variant='plain'] {
|
|
148
148
|
border-color: ButtonBorder;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
[data-ui
|
|
152
|
+
[data-ui-textarea][data-part-root][data-mono] {
|
|
153
153
|
font-family: var(--slotted-font-family-mono, monospace);
|
|
154
154
|
font-variant-numeric: tabular-nums;
|
|
155
155
|
}
|
|
@@ -162,11 +162,11 @@
|
|
|
162
162
|
* Horizontal resize is offered and is not the default.
|
|
163
163
|
*/
|
|
164
164
|
|
|
165
|
-
[data-ui
|
|
165
|
+
[data-ui-textarea][data-part-root][data-resize='none'] {
|
|
166
166
|
resize: none;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
[data-ui
|
|
169
|
+
[data-ui-textarea][data-part-root][data-resize='both'] {
|
|
170
170
|
resize: both;
|
|
171
171
|
}
|
|
172
172
|
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
* Where `field-sizing` is unsupported the control keeps the block size
|
|
189
189
|
* `rows` gives it — a smaller box, not a broken one.
|
|
190
190
|
*/
|
|
191
|
-
[data-ui
|
|
191
|
+
[data-ui-textarea][data-part-root][data-auto-size] {
|
|
192
192
|
field-sizing: content;
|
|
193
193
|
max-block-size: calc(var(--_max-rows) * 1lh + var(--_scroll-frame));
|
|
194
194
|
/**
|
|
@@ -209,13 +209,13 @@
|
|
|
209
209
|
* held back for every stronger one it can meet.
|
|
210
210
|
*/
|
|
211
211
|
|
|
212
|
-
[data-ui
|
|
212
|
+
[data-ui-textarea][data-part-root]:hover:not([data-disabled]):not(:disabled):not(
|
|
213
213
|
[data-readonly]
|
|
214
214
|
):not([data-invalid]) {
|
|
215
215
|
border-color: var(--slotted-textarea-hover-border-color, var(--slotted-tone-accent-border));
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
[data-ui
|
|
218
|
+
[data-ui-textarea][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
219
219
|
:disabled
|
|
220
220
|
):not([data-readonly]):not([data-invalid]) {
|
|
221
221
|
background-color: var(
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
[data-ui
|
|
227
|
+
[data-ui-textarea][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
228
228
|
:disabled
|
|
229
229
|
):not([data-readonly]):not([data-invalid]) {
|
|
230
230
|
background-color: var(
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
border-color: transparent;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
[data-ui
|
|
238
|
+
[data-ui-textarea][data-part-root]:focus-visible {
|
|
239
239
|
/** Foundation geometry, focus-ring ink: the lift and the ring are one colour. */
|
|
240
240
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
241
241
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
* shadow that appears only under focus is a cell that changes size when it
|
|
251
251
|
* is used.
|
|
252
252
|
*/
|
|
253
|
-
[data-ui
|
|
253
|
+
[data-ui-textarea][data-part-root][data-variant='plain']:focus-visible {
|
|
254
254
|
box-shadow: none;
|
|
255
255
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
256
256
|
}
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
* reads `--slotted-focus-ring-color`, so pointing that one name at the
|
|
261
261
|
* invalid colour on the element moves the outline and the shadow together.
|
|
262
262
|
*/
|
|
263
|
-
[data-ui
|
|
263
|
+
[data-ui-textarea][data-part-root][data-invalid] {
|
|
264
264
|
--slotted-focus-ring-color: var(
|
|
265
265
|
--slotted-textarea-invalid-focus-ring-color,
|
|
266
266
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -285,14 +285,14 @@
|
|
|
285
285
|
box-shadow: var(--_invalid-edge);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
[data-ui
|
|
288
|
+
[data-ui-textarea][data-part-root][data-invalid]:focus-visible {
|
|
289
289
|
box-shadow:
|
|
290
290
|
var(--_invalid-edge),
|
|
291
291
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
292
292
|
var(--slotted-focus-ring-color, Highlight);
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
[data-ui
|
|
295
|
+
[data-ui-textarea][data-part-root][data-variant='plain'][data-invalid]:focus-visible {
|
|
296
296
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
297
297
|
it; the edge reaches past the ring. */
|
|
298
298
|
box-shadow: inset 0 0 0
|
|
@@ -309,20 +309,20 @@
|
|
|
309
309
|
* control draws its ring double, which a valid ring is not.
|
|
310
310
|
*/
|
|
311
311
|
@media (forced-colors: active) {
|
|
312
|
-
[data-ui
|
|
312
|
+
[data-ui-textarea][data-part-root][data-invalid] {
|
|
313
313
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
314
314
|
outline-offset: calc(
|
|
315
315
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
316
316
|
);
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
[data-ui
|
|
319
|
+
[data-ui-textarea][data-part-root][data-invalid]:focus-visible {
|
|
320
320
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
321
321
|
var(--slotted-focus-ring-color, Highlight);
|
|
322
322
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
[data-ui
|
|
325
|
+
[data-ui-textarea][data-part-root][data-variant='plain'][data-invalid]:focus-visible {
|
|
326
326
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
327
327
|
var(--slotted-focus-ring-color, Highlight);
|
|
328
328
|
outline-offset: calc(
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
* has to copy is the commonest thing a read-only textarea holds, so the ink
|
|
337
337
|
* does not change at all and only the ground says the value is not theirs.
|
|
338
338
|
*/
|
|
339
|
-
[data-ui
|
|
339
|
+
[data-ui-textarea][data-part-root][data-readonly] {
|
|
340
340
|
background-color: var(
|
|
341
341
|
--slotted-textarea-readonly-background,
|
|
342
342
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -348,8 +348,8 @@
|
|
|
348
348
|
* `:disabled` beside `data-disabled`, because a disabled `fieldset` disables
|
|
349
349
|
* every control inside it and tells none of them.
|
|
350
350
|
*/
|
|
351
|
-
[data-ui
|
|
352
|
-
[data-ui
|
|
351
|
+
[data-ui-textarea][data-part-root][data-disabled],
|
|
352
|
+
[data-ui-textarea][data-part-root]:disabled {
|
|
353
353
|
background-color: var(
|
|
354
354
|
--slotted-textarea-disabled-background,
|
|
355
355
|
var(--slotted-disabled-background)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* order is the browser's locale rather than the application's. The value
|
|
15
15
|
* reaches a form through a hidden input carrying `HH:mm:ss`.
|
|
16
16
|
*/
|
|
17
|
-
[data-ui
|
|
17
|
+
[data-ui-time-field][data-part-root] {
|
|
18
18
|
/**
|
|
19
19
|
* Type, height, inline padding, gap and glyph size come from the control
|
|
20
20
|
* scales — the only ones the theme restates per density — so a time in a
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
* begin from it — the arithmetic `text-field` records, holding at every step
|
|
71
71
|
* and every density.
|
|
72
72
|
*/
|
|
73
|
-
[data-ui
|
|
73
|
+
[data-ui-time-field][data-part-root]:has(> [data-part-clear]:last-child) {
|
|
74
74
|
padding-inline-end: max(
|
|
75
75
|
0px,
|
|
76
76
|
calc(var(--_padding-inline) - (var(--_action-size) - var(--_icon-size)) / 2)
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
* and puts the time at the reading edge, so an empty field and a full one
|
|
83
83
|
* start in the same place.
|
|
84
84
|
*/
|
|
85
|
-
[data-ui
|
|
85
|
+
[data-ui-time-field] [data-part-segments] {
|
|
86
86
|
align-items: center;
|
|
87
87
|
/* It says what it is before it is pressed. A time is typed, so the pointer
|
|
88
88
|
over it is a caret — and the row rather than only the segments, because
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
* the document — which is the reason every other family in this library
|
|
125
125
|
* reaches for it too.
|
|
126
126
|
*/
|
|
127
|
-
[data-ui
|
|
127
|
+
[data-ui-time-field] [data-part-segments]:dir(rtl) {
|
|
128
128
|
justify-content: flex-end;
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
* single digit becomes two: `1ch` is the advance of a digit in a tabular
|
|
136
136
|
* face, and `--_digits` is how many the field can hold.
|
|
137
137
|
*/
|
|
138
|
-
[data-ui
|
|
138
|
+
[data-ui-time-field] [data-part-segment] {
|
|
139
139
|
--_digits: 2;
|
|
140
140
|
|
|
141
141
|
background-color: transparent;
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
* digit face is dropped here for the same reason: tabular figures inside a
|
|
176
176
|
* word letter-space it.
|
|
177
177
|
*/
|
|
178
|
-
[data-ui
|
|
178
|
+
[data-ui-time-field] [data-part-segment][data-field='dayPeriod'] {
|
|
179
179
|
font-variant-numeric: normal;
|
|
180
180
|
min-inline-size: var(--slotted-time-field-period-min-inline-size, 2ch);
|
|
181
181
|
/* An abbreviation, in whatever case the locale itself writes it. */
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
* placeholder is the format — `hh:mm` in the reader's own words rather than
|
|
189
189
|
* in English — and a time being typed has to keep saying what is missing.
|
|
190
190
|
*/
|
|
191
|
-
[data-ui
|
|
191
|
+
[data-ui-time-field] [data-part-segment][data-placeholder] {
|
|
192
192
|
color: var(--slotted-time-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
* name already carries the whole time in words, so a screen reader reading
|
|
198
198
|
* "colon" between two numbers would be reading punctuation aloud.
|
|
199
199
|
*/
|
|
200
|
-
[data-ui
|
|
200
|
+
[data-ui-time-field] [data-part-literal] {
|
|
201
201
|
color: var(--slotted-time-field-literal-color, var(--slotted-text-muted, GrayText));
|
|
202
202
|
flex: 0 0 auto;
|
|
203
203
|
/* Its own bidi run: a colon between two numbers takes the paragraph's
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
* It is a real `input`, so a mobile keyboard opens and the platform supplies
|
|
217
217
|
* every text-editing key the reader already knows.
|
|
218
218
|
*/
|
|
219
|
-
[data-ui
|
|
219
|
+
[data-ui-time-field] [data-part-duration] {
|
|
220
220
|
appearance: none;
|
|
221
221
|
background-color: transparent;
|
|
222
222
|
border: 0;
|
|
@@ -240,11 +240,11 @@
|
|
|
240
240
|
|
|
241
241
|
/* Left-to-right content in a right-to-left field still sits at the reading
|
|
242
242
|
edge, which is the treatment every form gives a phone number or an IBAN. */
|
|
243
|
-
[data-ui
|
|
243
|
+
[data-ui-time-field] [data-part-duration]:dir(rtl) {
|
|
244
244
|
text-align: right;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
[data-ui
|
|
247
|
+
[data-ui-time-field] [data-part-duration]::placeholder {
|
|
248
248
|
color: var(--slotted-time-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
249
249
|
}
|
|
250
250
|
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
* library already has for "and then"; it is direction-sensitive, so it turns
|
|
257
257
|
* with the document rather than pointing out of it.
|
|
258
258
|
*/
|
|
259
|
-
[data-ui
|
|
259
|
+
[data-ui-time-field] [data-part-preview] {
|
|
260
260
|
/**
|
|
261
261
|
* One line box, not a flex row. The chevron sits *in* the line rather than
|
|
262
262
|
* beside it, which is the only way it can be aligned to the text at all —
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
* marked `directional`: it points along the reading direction, so the `icon`
|
|
294
294
|
* family turns it in a right-to-left context.
|
|
295
295
|
*/
|
|
296
|
-
[data-ui
|
|
296
|
+
[data-ui-time-field] [data-part-preview] > [data-ui-icon] {
|
|
297
297
|
--slotted-icon-size: var(--_mark);
|
|
298
298
|
|
|
299
299
|
margin-inline-end: var(--slotted-space-1, 0.125rem);
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
* `docs/component-features.md` §2.5 refuses that, and a reader on a screen
|
|
308
308
|
* reader hears the same words the sighted reader sees.
|
|
309
309
|
*/
|
|
310
|
-
[data-ui
|
|
310
|
+
[data-ui-time-field] [data-part-preview][data-crosses-midnight] {
|
|
311
311
|
color: var(--slotted-time-field-preview-next-color, var(--slotted-tone-warning-text));
|
|
312
312
|
}
|
|
313
313
|
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
* border is the accent the preview is written in, so the two marks are one
|
|
318
318
|
* statement rather than two.
|
|
319
319
|
*/
|
|
320
|
-
[data-ui
|
|
320
|
+
[data-ui-time-field][data-part-root][data-relative] {
|
|
321
321
|
border-color: var(
|
|
322
322
|
--slotted-time-field-relative-border-color,
|
|
323
323
|
var(--slotted-tone-accent-border)
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
* holding an `md` control is a field and a control disagreeing about one row.
|
|
331
331
|
*/
|
|
332
332
|
|
|
333
|
-
[data-ui
|
|
333
|
+
[data-ui-time-field][data-part-root][data-size='sm'] {
|
|
334
334
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
335
335
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
336
336
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
--_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-sm, 14px));
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
[data-ui
|
|
341
|
+
[data-ui-time-field][data-part-root][data-size='md'] {
|
|
342
342
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
343
343
|
--_height: var(--slotted-control-height-md, 34px);
|
|
344
344
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
--_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-md, 16px));
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
[data-ui
|
|
349
|
+
[data-ui-time-field][data-part-root][data-size='lg'] {
|
|
350
350
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
351
351
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
352
352
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
* shows one frame twice rather than two frames.
|
|
361
361
|
*/
|
|
362
362
|
|
|
363
|
-
[data-ui
|
|
363
|
+
[data-ui-time-field][data-part-root][data-variant='subtle'] {
|
|
364
364
|
background-color: var(
|
|
365
365
|
--slotted-time-field-subtle-background,
|
|
366
366
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
);
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
-
[data-ui
|
|
374
|
+
[data-ui-time-field][data-part-root][data-variant='plain'] {
|
|
375
375
|
background-color: transparent;
|
|
376
376
|
border-color: transparent;
|
|
377
377
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -384,8 +384,8 @@
|
|
|
384
384
|
* the value: an adornment annotates, and a reader looking for the time
|
|
385
385
|
* should not have to step over it.
|
|
386
386
|
*/
|
|
387
|
-
[data-ui
|
|
388
|
-
[data-ui
|
|
387
|
+
[data-ui-time-field] > [data-part-start],
|
|
388
|
+
[data-ui-time-field] > [data-part-end] {
|
|
389
389
|
--slotted-icon-size: var(--_icon-size);
|
|
390
390
|
|
|
391
391
|
align-items: center;
|
|
@@ -397,8 +397,8 @@
|
|
|
397
397
|
unicode-bidi: plaintext;
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
[data-ui
|
|
401
|
-
[data-ui
|
|
400
|
+
[data-ui-time-field] > [data-part-start] > svg,
|
|
401
|
+
[data-ui-time-field] > [data-part-end] > svg {
|
|
402
402
|
block-size: var(--_icon-size);
|
|
403
403
|
inline-size: var(--_icon-size);
|
|
404
404
|
}
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
* character, and held to the target minimum by the family rather than by the
|
|
410
410
|
* page.
|
|
411
411
|
*/
|
|
412
|
-
[data-ui
|
|
412
|
+
[data-ui-time-field] > [data-part-clear] {
|
|
413
413
|
align-items: center;
|
|
414
414
|
appearance: none;
|
|
415
415
|
background-color: transparent;
|
|
@@ -439,7 +439,7 @@
|
|
|
439
439
|
* larger one alone, which is the correction `docs/token-foundation.md`
|
|
440
440
|
* leaves to the family rather than to the theme.
|
|
441
441
|
*/
|
|
442
|
-
[data-ui
|
|
442
|
+
[data-ui-time-field] > [data-part-clear]::after {
|
|
443
443
|
content: '';
|
|
444
444
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
445
445
|
position: absolute;
|
|
@@ -450,28 +450,28 @@
|
|
|
450
450
|
the hit area above grows to 44 pixels around them. After an end
|
|
451
451
|
adornment — a picker's trigger — it does not reach back across it. */
|
|
452
452
|
@media (pointer: coarse) {
|
|
453
|
-
[data-ui
|
|
453
|
+
[data-ui-time-field] > [data-part-clear]::after {
|
|
454
454
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
455
455
|
}
|
|
456
456
|
|
|
457
|
-
[data-ui
|
|
457
|
+
[data-ui-time-field] > [data-part-end] + [data-part-clear]::after {
|
|
458
458
|
inset-inline-start: 0;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
/* The cross is drawn at the control's own icon step. */
|
|
463
|
-
[data-ui
|
|
463
|
+
[data-ui-time-field] > [data-part-clear] {
|
|
464
464
|
--slotted-icon-size: var(--_icon-size);
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
[data-ui
|
|
467
|
+
[data-ui-time-field] > [data-part-clear]:hover:not(:disabled):not([data-disabled]) {
|
|
468
468
|
background-color: var(
|
|
469
469
|
--slotted-time-field-action-hover-background,
|
|
470
470
|
var(--slotted-tone-secondary-subtle-hover)
|
|
471
471
|
);
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
-
[data-ui
|
|
474
|
+
[data-ui-time-field] > [data-part-clear]:active:not(:disabled):not([data-disabled]) {
|
|
475
475
|
background-color: var(
|
|
476
476
|
--slotted-time-field-action-active-background,
|
|
477
477
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
* and a ring around the whole frame would sit still while focus moved inside
|
|
485
485
|
* it.
|
|
486
486
|
*/
|
|
487
|
-
[data-ui
|
|
487
|
+
[data-ui-time-field] > [data-part-clear]:focus-visible {
|
|
488
488
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
489
489
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
490
490
|
}
|
|
@@ -495,13 +495,13 @@
|
|
|
495
495
|
* one it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
496
496
|
*/
|
|
497
497
|
|
|
498
|
-
[data-ui
|
|
498
|
+
[data-ui-time-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
499
499
|
[data-invalid]
|
|
500
500
|
) {
|
|
501
501
|
border-color: var(--slotted-time-field-hover-border-color, var(--slotted-tone-accent-border));
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
-
[data-ui
|
|
504
|
+
[data-ui-time-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
505
505
|
[data-readonly]
|
|
506
506
|
):not([data-invalid]) {
|
|
507
507
|
background-color: var(
|
|
@@ -510,7 +510,7 @@
|
|
|
510
510
|
);
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
-
[data-ui
|
|
513
|
+
[data-ui-time-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
514
514
|
[data-readonly]
|
|
515
515
|
):not([data-invalid]) {
|
|
516
516
|
background-color: var(
|
|
@@ -536,8 +536,8 @@
|
|
|
536
536
|
* had before the press. The expression is an `input` and takes the frame's
|
|
537
537
|
* ring on `:focus-within` for the same reason from the other side.
|
|
538
538
|
*/
|
|
539
|
-
[data-ui
|
|
540
|
-
[data-ui
|
|
539
|
+
[data-ui-time-field][data-part-root]:has([data-part-segment]:focus),
|
|
540
|
+
[data-ui-time-field][data-part-root]:has([data-part-duration]:focus) {
|
|
541
541
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
542
542
|
var(--slotted-focus-ring-color, Highlight);
|
|
543
543
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
@@ -551,13 +551,13 @@
|
|
|
551
551
|
* shadow that appears only under focus is a cell that changes size when it
|
|
552
552
|
* is used.
|
|
553
553
|
*/
|
|
554
|
-
[data-ui
|
|
555
|
-
[data-ui
|
|
554
|
+
[data-ui-time-field][data-part-root][data-variant='plain']:has([data-part-segment]:focus),
|
|
555
|
+
[data-ui-time-field][data-part-root][data-variant='plain']:has([data-part-duration]:focus) {
|
|
556
556
|
box-shadow: none;
|
|
557
557
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
-
[data-ui
|
|
560
|
+
[data-ui-time-field] [data-part-segment]:focus {
|
|
561
561
|
background-color: var(
|
|
562
562
|
--slotted-time-field-segment-focus-background,
|
|
563
563
|
var(--slotted-tone-accent-solid)
|
|
@@ -573,7 +573,7 @@
|
|
|
573
573
|
* ring is retargeted rather than repainted, so the frame's outline, the
|
|
574
574
|
* shadow under it and the ring on the clear button all move at once.
|
|
575
575
|
*/
|
|
576
|
-
[data-ui
|
|
576
|
+
[data-ui-time-field][data-part-root][data-invalid] {
|
|
577
577
|
--slotted-focus-ring-color: var(
|
|
578
578
|
--slotted-time-field-invalid-focus-ring-color,
|
|
579
579
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -598,19 +598,19 @@
|
|
|
598
598
|
box-shadow: var(--_invalid-edge);
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
-
[data-ui
|
|
602
|
-
[data-ui
|
|
601
|
+
[data-ui-time-field][data-part-root][data-invalid]:has([data-part-segment]:focus),
|
|
602
|
+
[data-ui-time-field][data-part-root][data-invalid]:has([data-part-duration]:focus) {
|
|
603
603
|
box-shadow:
|
|
604
604
|
var(--_invalid-edge),
|
|
605
605
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
606
606
|
var(--slotted-focus-ring-color, Highlight);
|
|
607
607
|
}
|
|
608
608
|
|
|
609
|
-
[data-ui
|
|
610
|
-
[data-part
|
|
609
|
+
[data-ui-time-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
610
|
+
[data-part-segment]:focus
|
|
611
611
|
),
|
|
612
|
-
[data-ui
|
|
613
|
-
[data-part
|
|
612
|
+
[data-ui-time-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
613
|
+
[data-part-duration]:focus
|
|
614
614
|
) {
|
|
615
615
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
616
616
|
it; the edge reaches past the ring. */
|
|
@@ -628,25 +628,25 @@
|
|
|
628
628
|
* control draws its ring double, which a valid ring is not.
|
|
629
629
|
*/
|
|
630
630
|
@media (forced-colors: active) {
|
|
631
|
-
[data-ui
|
|
631
|
+
[data-ui-time-field][data-part-root][data-invalid] {
|
|
632
632
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
633
633
|
outline-offset: calc(
|
|
634
634
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
635
635
|
);
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
[data-ui
|
|
639
|
-
[data-ui
|
|
638
|
+
[data-ui-time-field][data-part-root][data-invalid]:has([data-part-segment]:focus),
|
|
639
|
+
[data-ui-time-field][data-part-root][data-invalid]:has([data-part-duration]:focus) {
|
|
640
640
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
641
641
|
var(--slotted-focus-ring-color, Highlight);
|
|
642
642
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
643
643
|
}
|
|
644
644
|
|
|
645
|
-
[data-ui
|
|
646
|
-
[data-part
|
|
645
|
+
[data-ui-time-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
646
|
+
[data-part-segment]:focus
|
|
647
647
|
),
|
|
648
|
-
[data-ui
|
|
649
|
-
[data-part
|
|
648
|
+
[data-ui-time-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
649
|
+
[data-part-duration]:focus
|
|
650
650
|
) {
|
|
651
651
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
652
652
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -661,13 +661,13 @@
|
|
|
661
661
|
* mistakable for disabled: the value is still real and still submitted. The
|
|
662
662
|
* ground says "not yours to change" and the ink says nothing at all.
|
|
663
663
|
*/
|
|
664
|
-
[data-ui
|
|
665
|
-
[data-ui
|
|
666
|
-
[data-ui
|
|
664
|
+
[data-ui-time-field][data-part-root][data-readonly],
|
|
665
|
+
[data-ui-time-field][data-part-root][data-readonly] [data-part-segments],
|
|
666
|
+
[data-ui-time-field][data-part-root][data-readonly] [data-part-segment] {
|
|
667
667
|
cursor: default;
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
-
[data-ui
|
|
670
|
+
[data-ui-time-field][data-part-root][data-readonly] {
|
|
671
671
|
background-color: var(
|
|
672
672
|
--slotted-time-field-readonly-background,
|
|
673
673
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
* time nobody can read is a field nobody can check, and a disabled form
|
|
680
680
|
* still has to say what it holds.
|
|
681
681
|
*/
|
|
682
|
-
[data-ui
|
|
682
|
+
[data-ui-time-field][data-part-root][data-disabled] {
|
|
683
683
|
background-color: var(
|
|
684
684
|
--slotted-time-field-disabled-background,
|
|
685
685
|
var(--slotted-disabled-background)
|
|
@@ -691,28 +691,28 @@
|
|
|
691
691
|
cursor: not-allowed;
|
|
692
692
|
}
|
|
693
693
|
|
|
694
|
-
[data-ui
|
|
695
|
-
[data-ui
|
|
694
|
+
[data-ui-time-field][data-part-root][data-disabled] [data-part-segments],
|
|
695
|
+
[data-ui-time-field][data-part-root][data-disabled] [data-part-segment] {
|
|
696
696
|
cursor: not-allowed;
|
|
697
697
|
}
|
|
698
698
|
|
|
699
|
-
[data-ui
|
|
700
|
-
[data-ui
|
|
701
|
-
[data-ui
|
|
702
|
-
[data-ui
|
|
699
|
+
[data-ui-time-field][data-part-root][data-disabled] > [data-part-start],
|
|
700
|
+
[data-ui-time-field][data-part-root][data-disabled] > [data-part-end],
|
|
701
|
+
[data-ui-time-field][data-part-root][data-disabled] [data-part-literal],
|
|
702
|
+
[data-ui-time-field][data-part-root][data-disabled] [data-part-segment][data-placeholder] {
|
|
703
703
|
color: var(--slotted-disabled-foreground);
|
|
704
704
|
}
|
|
705
705
|
|
|
706
706
|
@media (forced-colors: active) {
|
|
707
707
|
/* A transparent border has no system colour to be remapped to, so the
|
|
708
708
|
`plain` control would lose its only edge where an edge matters most. */
|
|
709
|
-
[data-ui
|
|
709
|
+
[data-ui-time-field][data-part-root][data-variant='plain'] {
|
|
710
710
|
border-color: ButtonBorder;
|
|
711
711
|
}
|
|
712
712
|
|
|
713
713
|
/* The preview's two tones both map to the same system ink, so the border
|
|
714
714
|
is what is left to say the control is in a different mode. */
|
|
715
|
-
[data-ui
|
|
715
|
+
[data-ui-time-field][data-part-root][data-relative] {
|
|
716
716
|
border-color: Highlight;
|
|
717
717
|
}
|
|
718
718
|
}
|