@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.30
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 +13 -1
- package/src/accordion/accordion.css +11 -11
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +96 -96
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +455 -328
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +96 -66
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +54 -46
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +137 -89
- package/src/button/button.tokens.json +5 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +139 -109
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +68 -65
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +158 -157
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +288 -267
- package/src/chart/chart.tokens.json +4 -0
- package/src/checkbox/checkbox.css +143 -148
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +76 -80
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +203 -130
- package/src/combobox/combobox.tokens.json +3 -0
- package/src/command-palette/command-palette.css +155 -102
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +185 -115
- package/src/data-grid/data-grid.css +598 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +82 -71
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +117 -58
- package/src/date-picker/date-picker.tokens.json +5 -0
- package/src/date-range-picker/date-range-picker.css +157 -127
- package/src/date-range-picker/date-range-picker.tokens.json +4 -0
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +123 -70
- package/src/datetime-picker/datetime-picker.tokens.json +4 -1
- package/src/datetime-range-picker/datetime-range-picker.css +191 -163
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
- package/src/description-list/description-list.css +105 -75
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +434 -198
- package/src/dialog/dialog.tokens.json +7 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +597 -236
- package/src/drawer/drawer.tokens.json +13 -0
- package/src/entity-picker/entity-picker.css +323 -270
- package/src/entity-picker/entity-picker.tokens.json +3 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +43 -33
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +200 -216
- package/src/form/form.css +99 -25
- package/src/form/form.tokens.json +5 -0
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +29 -29
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +144 -165
- package/src/inline/inline.css +28 -28
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +62 -50
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +23 -23
- package/src/list-item/list-item.css +89 -75
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +71 -70
- package/src/listbox/listbox.tokens.json +0 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +162 -82
- package/src/menu/menu.tokens.json +2 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1250 -1253
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +230 -172
- package/src/multi-select/multi-select.tokens.json +2 -0
- package/src/navigation-menu/navigation-menu.css +169 -190
- package/src/notification-center/notification-center.css +153 -161
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +41 -27
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +341 -286
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +75 -79
- package/src/popover/popover.css +81 -64
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +192 -136
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +260 -113
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +146 -142
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +94 -101
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +44 -37
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +210 -147
- package/src/select/select.tokens.json +3 -0
- package/src/side-navigation/side-navigation.css +193 -196
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +57 -58
- package/src/slider/slider.css +101 -103
- package/src/sparkline/sparkline.css +75 -53
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +25 -25
- package/src/stat-card/stat-card.css +415 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +124 -100
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +100 -106
- package/src/table/table.css +270 -198
- package/src/table/table.tokens.json +2 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +109 -88
- package/src/tag/tag.tokens.json +10 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +116 -64
- package/src/time-picker/time-picker.tokens.json +4 -1
- package/src/time-range-picker/time-range-picker.css +168 -140
- package/src/time-range-picker/time-range-picker.tokens.json +4 -0
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +138 -121
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +33 -38
- package/src/tooltip/tooltip.css +65 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +252 -268
- package/src/tour/tour.css +64 -73
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +113 -121
- package/src/typography/typography.css +42 -38
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
|
@@ -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
|
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
53
53
|
font-size: var(--_font-size);
|
|
54
54
|
gap: var(--_gap);
|
|
55
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
56
|
+
flex-basis: content;
|
|
55
57
|
inline-size: 100%;
|
|
56
58
|
min-block-size: var(--_height);
|
|
57
59
|
min-inline-size: 0;
|
|
@@ -70,7 +72,7 @@
|
|
|
70
72
|
* begin from it — the arithmetic `text-field` records, holding at every step
|
|
71
73
|
* and every density.
|
|
72
74
|
*/
|
|
73
|
-
[data-ui
|
|
75
|
+
[data-ui-time-field][data-part-root]:has(> [data-part-clear]:last-child) {
|
|
74
76
|
padding-inline-end: max(
|
|
75
77
|
0px,
|
|
76
78
|
calc(var(--_padding-inline) - (var(--_action-size) - var(--_icon-size)) / 2)
|
|
@@ -82,7 +84,7 @@
|
|
|
82
84
|
* and puts the time at the reading edge, so an empty field and a full one
|
|
83
85
|
* start in the same place.
|
|
84
86
|
*/
|
|
85
|
-
[data-ui
|
|
87
|
+
[data-ui-time-field] [data-part-segments] {
|
|
86
88
|
align-items: center;
|
|
87
89
|
/* It says what it is before it is pressed. A time is typed, so the pointer
|
|
88
90
|
over it is a caret — and the row rather than only the segments, because
|
|
@@ -124,7 +126,7 @@
|
|
|
124
126
|
* the document — which is the reason every other family in this library
|
|
125
127
|
* reaches for it too.
|
|
126
128
|
*/
|
|
127
|
-
[data-ui
|
|
129
|
+
[data-ui-time-field] [data-part-segments]:dir(rtl) {
|
|
128
130
|
justify-content: flex-end;
|
|
129
131
|
}
|
|
130
132
|
|
|
@@ -135,7 +137,7 @@
|
|
|
135
137
|
* single digit becomes two: `1ch` is the advance of a digit in a tabular
|
|
136
138
|
* face, and `--_digits` is how many the field can hold.
|
|
137
139
|
*/
|
|
138
|
-
[data-ui
|
|
140
|
+
[data-ui-time-field] [data-part-segment] {
|
|
139
141
|
--_digits: 2;
|
|
140
142
|
|
|
141
143
|
background-color: transparent;
|
|
@@ -175,7 +177,7 @@
|
|
|
175
177
|
* digit face is dropped here for the same reason: tabular figures inside a
|
|
176
178
|
* word letter-space it.
|
|
177
179
|
*/
|
|
178
|
-
[data-ui
|
|
180
|
+
[data-ui-time-field] [data-part-segment][data-field='dayPeriod'] {
|
|
179
181
|
font-variant-numeric: normal;
|
|
180
182
|
min-inline-size: var(--slotted-time-field-period-min-inline-size, 2ch);
|
|
181
183
|
/* An abbreviation, in whatever case the locale itself writes it. */
|
|
@@ -188,7 +190,7 @@
|
|
|
188
190
|
* placeholder is the format — `hh:mm` in the reader's own words rather than
|
|
189
191
|
* in English — and a time being typed has to keep saying what is missing.
|
|
190
192
|
*/
|
|
191
|
-
[data-ui
|
|
193
|
+
[data-ui-time-field] [data-part-segment][data-placeholder] {
|
|
192
194
|
color: var(--slotted-time-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
193
195
|
}
|
|
194
196
|
|
|
@@ -197,7 +199,7 @@
|
|
|
197
199
|
* name already carries the whole time in words, so a screen reader reading
|
|
198
200
|
* "colon" between two numbers would be reading punctuation aloud.
|
|
199
201
|
*/
|
|
200
|
-
[data-ui
|
|
202
|
+
[data-ui-time-field] [data-part-literal] {
|
|
201
203
|
color: var(--slotted-time-field-literal-color, var(--slotted-text-muted, GrayText));
|
|
202
204
|
flex: 0 0 auto;
|
|
203
205
|
/* Its own bidi run: a colon between two numbers takes the paragraph's
|
|
@@ -216,7 +218,7 @@
|
|
|
216
218
|
* It is a real `input`, so a mobile keyboard opens and the platform supplies
|
|
217
219
|
* every text-editing key the reader already knows.
|
|
218
220
|
*/
|
|
219
|
-
[data-ui
|
|
221
|
+
[data-ui-time-field] [data-part-duration] {
|
|
220
222
|
appearance: none;
|
|
221
223
|
background-color: transparent;
|
|
222
224
|
border: 0;
|
|
@@ -240,11 +242,11 @@
|
|
|
240
242
|
|
|
241
243
|
/* Left-to-right content in a right-to-left field still sits at the reading
|
|
242
244
|
edge, which is the treatment every form gives a phone number or an IBAN. */
|
|
243
|
-
[data-ui
|
|
245
|
+
[data-ui-time-field] [data-part-duration]:dir(rtl) {
|
|
244
246
|
text-align: right;
|
|
245
247
|
}
|
|
246
248
|
|
|
247
|
-
[data-ui
|
|
249
|
+
[data-ui-time-field] [data-part-duration]::placeholder {
|
|
248
250
|
color: var(--slotted-time-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
249
251
|
}
|
|
250
252
|
|
|
@@ -256,11 +258,11 @@
|
|
|
256
258
|
* library already has for "and then"; it is direction-sensitive, so it turns
|
|
257
259
|
* with the document rather than pointing out of it.
|
|
258
260
|
*/
|
|
259
|
-
[data-ui
|
|
261
|
+
[data-ui-time-field] [data-part-preview] {
|
|
260
262
|
/**
|
|
261
263
|
* One line box, not a flex row. The chevron sits *in* the line rather than
|
|
262
264
|
* beside it, which is the only way it can be aligned to the text at all —
|
|
263
|
-
* a flex box
|
|
265
|
+
* a flex box centers its children on the whole line box, and the letters
|
|
264
266
|
* do not live in the middle of that.
|
|
265
267
|
*/
|
|
266
268
|
--_mark: 1cap;
|
|
@@ -277,12 +279,12 @@
|
|
|
277
279
|
*
|
|
278
280
|
* Two things were wrong and only together: it was drawn at the control glyph
|
|
279
281
|
* size — sixteen pixels of chevron beside a nine-pixel capital, which is a
|
|
280
|
-
* control's mark standing in a sentence — and it was
|
|
282
|
+
* control's mark standing in a sentence — and it was centerd on the line box
|
|
281
283
|
* rather than on the band the letters occupy, so it read high. `1cap` is the
|
|
282
284
|
* size `status-indicator` already uses for a mark inside a line of text, and
|
|
283
285
|
* the `vertical-align` is the formula `docs/build-briefing.md` records under
|
|
284
286
|
* _Decisions already taken_: half the difference between the band and the
|
|
285
|
-
* mark, which lands the mark's
|
|
287
|
+
* mark, which lands the mark's center on the middle of the band.
|
|
286
288
|
*
|
|
287
289
|
* The band is the midpoint of cap and x-height, which is the one `toast`
|
|
288
290
|
* chose after reading all three at four times the type size: `1cap` alone
|
|
@@ -293,7 +295,7 @@
|
|
|
293
295
|
* marked `directional`: it points along the reading direction, so the `icon`
|
|
294
296
|
* family turns it in a right-to-left context.
|
|
295
297
|
*/
|
|
296
|
-
[data-ui
|
|
298
|
+
[data-ui-time-field] [data-part-preview] > [data-ui-icon] {
|
|
297
299
|
--slotted-icon-size: var(--_mark);
|
|
298
300
|
|
|
299
301
|
margin-inline-end: var(--slotted-space-1, 0.125rem);
|
|
@@ -303,11 +305,11 @@
|
|
|
303
305
|
/**
|
|
304
306
|
* A duration that ran past midnight. It resolves into a different day, and
|
|
305
307
|
* this library holds no day beside a time — so the preview changes tone and
|
|
306
|
-
* the family writes the day beside the time.
|
|
308
|
+
* the family writes the day beside the time. Color alone never says it:
|
|
307
309
|
* `docs/component-features.md` §2.5 refuses that, and a reader on a screen
|
|
308
310
|
* reader hears the same words the sighted reader sees.
|
|
309
311
|
*/
|
|
310
|
-
[data-ui
|
|
312
|
+
[data-ui-time-field] [data-part-preview][data-crosses-midnight] {
|
|
311
313
|
color: var(--slotted-time-field-preview-next-color, var(--slotted-tone-warning-text));
|
|
312
314
|
}
|
|
313
315
|
|
|
@@ -317,7 +319,7 @@
|
|
|
317
319
|
* border is the accent the preview is written in, so the two marks are one
|
|
318
320
|
* statement rather than two.
|
|
319
321
|
*/
|
|
320
|
-
[data-ui
|
|
322
|
+
[data-ui-time-field][data-part-root][data-relative] {
|
|
321
323
|
border-color: var(
|
|
322
324
|
--slotted-time-field-relative-border-color,
|
|
323
325
|
var(--slotted-tone-accent-border)
|
|
@@ -330,7 +332,7 @@
|
|
|
330
332
|
* holding an `md` control is a field and a control disagreeing about one row.
|
|
331
333
|
*/
|
|
332
334
|
|
|
333
|
-
[data-ui
|
|
335
|
+
[data-ui-time-field][data-part-root][data-size='sm'] {
|
|
334
336
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
335
337
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
336
338
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -338,7 +340,7 @@
|
|
|
338
340
|
--_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-sm, 14px));
|
|
339
341
|
}
|
|
340
342
|
|
|
341
|
-
[data-ui
|
|
343
|
+
[data-ui-time-field][data-part-root][data-size='md'] {
|
|
342
344
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
343
345
|
--_height: var(--slotted-control-height-md, 34px);
|
|
344
346
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -346,7 +348,7 @@
|
|
|
346
348
|
--_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-md, 16px));
|
|
347
349
|
}
|
|
348
350
|
|
|
349
|
-
[data-ui
|
|
351
|
+
[data-ui-time-field][data-part-root][data-size='lg'] {
|
|
350
352
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
351
353
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
352
354
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -360,7 +362,7 @@
|
|
|
360
362
|
* shows one frame twice rather than two frames.
|
|
361
363
|
*/
|
|
362
364
|
|
|
363
|
-
[data-ui
|
|
365
|
+
[data-ui-time-field][data-part-root][data-variant='subtle'] {
|
|
364
366
|
background-color: var(
|
|
365
367
|
--slotted-time-field-subtle-background,
|
|
366
368
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -371,7 +373,7 @@
|
|
|
371
373
|
);
|
|
372
374
|
}
|
|
373
375
|
|
|
374
|
-
[data-ui
|
|
376
|
+
[data-ui-time-field][data-part-root][data-variant='plain'] {
|
|
375
377
|
background-color: transparent;
|
|
376
378
|
border-color: transparent;
|
|
377
379
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -384,8 +386,8 @@
|
|
|
384
386
|
* the value: an adornment annotates, and a reader looking for the time
|
|
385
387
|
* should not have to step over it.
|
|
386
388
|
*/
|
|
387
|
-
[data-ui
|
|
388
|
-
[data-ui
|
|
389
|
+
[data-ui-time-field] > [data-part-start],
|
|
390
|
+
[data-ui-time-field] > [data-part-end] {
|
|
389
391
|
--slotted-icon-size: var(--_icon-size);
|
|
390
392
|
|
|
391
393
|
align-items: center;
|
|
@@ -397,8 +399,8 @@
|
|
|
397
399
|
unicode-bidi: plaintext;
|
|
398
400
|
}
|
|
399
401
|
|
|
400
|
-
[data-ui
|
|
401
|
-
[data-ui
|
|
402
|
+
[data-ui-time-field] > [data-part-start] > svg,
|
|
403
|
+
[data-ui-time-field] > [data-part-end] > svg {
|
|
402
404
|
block-size: var(--_icon-size);
|
|
403
405
|
inline-size: var(--_icon-size);
|
|
404
406
|
}
|
|
@@ -409,7 +411,7 @@
|
|
|
409
411
|
* character, and held to the target minimum by the family rather than by the
|
|
410
412
|
* page.
|
|
411
413
|
*/
|
|
412
|
-
[data-ui
|
|
414
|
+
[data-ui-time-field] > [data-part-clear] {
|
|
413
415
|
align-items: center;
|
|
414
416
|
appearance: none;
|
|
415
417
|
background-color: transparent;
|
|
@@ -439,7 +441,7 @@
|
|
|
439
441
|
* larger one alone, which is the correction `docs/token-foundation.md`
|
|
440
442
|
* leaves to the family rather than to the theme.
|
|
441
443
|
*/
|
|
442
|
-
[data-ui
|
|
444
|
+
[data-ui-time-field] > [data-part-clear]::after {
|
|
443
445
|
content: '';
|
|
444
446
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
445
447
|
position: absolute;
|
|
@@ -450,28 +452,28 @@
|
|
|
450
452
|
the hit area above grows to 44 pixels around them. After an end
|
|
451
453
|
adornment — a picker's trigger — it does not reach back across it. */
|
|
452
454
|
@media (pointer: coarse) {
|
|
453
|
-
[data-ui
|
|
455
|
+
[data-ui-time-field] > [data-part-clear]::after {
|
|
454
456
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
455
457
|
}
|
|
456
458
|
|
|
457
|
-
[data-ui
|
|
459
|
+
[data-ui-time-field] > [data-part-end] + [data-part-clear]::after {
|
|
458
460
|
inset-inline-start: 0;
|
|
459
461
|
}
|
|
460
462
|
}
|
|
461
463
|
|
|
462
464
|
/* The cross is drawn at the control's own icon step. */
|
|
463
|
-
[data-ui
|
|
465
|
+
[data-ui-time-field] > [data-part-clear] {
|
|
464
466
|
--slotted-icon-size: var(--_icon-size);
|
|
465
467
|
}
|
|
466
468
|
|
|
467
|
-
[data-ui
|
|
469
|
+
[data-ui-time-field] > [data-part-clear]:hover:not(:disabled):not([data-disabled]) {
|
|
468
470
|
background-color: var(
|
|
469
471
|
--slotted-time-field-action-hover-background,
|
|
470
472
|
var(--slotted-tone-secondary-subtle-hover)
|
|
471
473
|
);
|
|
472
474
|
}
|
|
473
475
|
|
|
474
|
-
[data-ui
|
|
476
|
+
[data-ui-time-field] > [data-part-clear]:active:not(:disabled):not([data-disabled]) {
|
|
475
477
|
background-color: var(
|
|
476
478
|
--slotted-time-field-action-active-background,
|
|
477
479
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -484,7 +486,7 @@
|
|
|
484
486
|
* and a ring around the whole frame would sit still while focus moved inside
|
|
485
487
|
* it.
|
|
486
488
|
*/
|
|
487
|
-
[data-ui
|
|
489
|
+
[data-ui-time-field] > [data-part-clear]:focus-visible {
|
|
488
490
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
489
491
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
490
492
|
}
|
|
@@ -495,13 +497,13 @@
|
|
|
495
497
|
* one it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
496
498
|
*/
|
|
497
499
|
|
|
498
|
-
[data-ui
|
|
500
|
+
[data-ui-time-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
499
501
|
[data-invalid]
|
|
500
502
|
) {
|
|
501
503
|
border-color: var(--slotted-time-field-hover-border-color, var(--slotted-tone-accent-border));
|
|
502
504
|
}
|
|
503
505
|
|
|
504
|
-
[data-ui
|
|
506
|
+
[data-ui-time-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
505
507
|
[data-readonly]
|
|
506
508
|
):not([data-invalid]) {
|
|
507
509
|
background-color: var(
|
|
@@ -510,7 +512,7 @@
|
|
|
510
512
|
);
|
|
511
513
|
}
|
|
512
514
|
|
|
513
|
-
[data-ui
|
|
515
|
+
[data-ui-time-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
514
516
|
[data-readonly]
|
|
515
517
|
):not([data-invalid]) {
|
|
516
518
|
background-color: var(
|
|
@@ -536,12 +538,12 @@
|
|
|
536
538
|
* had before the press. The expression is an `input` and takes the frame's
|
|
537
539
|
* ring on `:focus-within` for the same reason from the other side.
|
|
538
540
|
*/
|
|
539
|
-
[data-ui
|
|
540
|
-
[data-ui
|
|
541
|
+
[data-ui-time-field][data-part-root]:has([data-part-segment]:focus),
|
|
542
|
+
[data-ui-time-field][data-part-root]:has([data-part-duration]:focus) {
|
|
541
543
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
542
544
|
var(--slotted-focus-ring-color, Highlight);
|
|
543
545
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
544
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
546
|
+
outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
|
|
545
547
|
}
|
|
546
548
|
|
|
547
549
|
/**
|
|
@@ -551,13 +553,13 @@
|
|
|
551
553
|
* shadow that appears only under focus is a cell that changes size when it
|
|
552
554
|
* is used.
|
|
553
555
|
*/
|
|
554
|
-
[data-ui
|
|
555
|
-
[data-ui
|
|
556
|
+
[data-ui-time-field][data-part-root][data-variant='plain']:has([data-part-segment]:focus),
|
|
557
|
+
[data-ui-time-field][data-part-root][data-variant='plain']:has([data-part-duration]:focus) {
|
|
556
558
|
box-shadow: none;
|
|
557
559
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
558
560
|
}
|
|
559
561
|
|
|
560
|
-
[data-ui
|
|
562
|
+
[data-ui-time-field] [data-part-segment]:focus {
|
|
561
563
|
background-color: var(
|
|
562
564
|
--slotted-time-field-segment-focus-background,
|
|
563
565
|
var(--slotted-tone-accent-solid)
|
|
@@ -573,7 +575,7 @@
|
|
|
573
575
|
* ring is retargeted rather than repainted, so the frame's outline, the
|
|
574
576
|
* shadow under it and the ring on the clear button all move at once.
|
|
575
577
|
*/
|
|
576
|
-
[data-ui
|
|
578
|
+
[data-ui-time-field][data-part-root][data-invalid] {
|
|
577
579
|
--slotted-focus-ring-color: var(
|
|
578
580
|
--slotted-time-field-invalid-focus-ring-color,
|
|
579
581
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -590,7 +592,7 @@
|
|
|
590
592
|
|
|
591
593
|
border-color: var(--slotted-time-field-invalid-border-color, var(--slotted-tone-danger-border));
|
|
592
594
|
/*
|
|
593
|
-
* Width as well as
|
|
595
|
+
* Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
|
|
594
596
|
* `high-contrast` the danger border is the resting edge's black. The line
|
|
595
597
|
* is a shadow inside the border, so neither box nor text moves, and it
|
|
596
598
|
* takes the resting lift's place.
|
|
@@ -598,19 +600,19 @@
|
|
|
598
600
|
box-shadow: var(--_invalid-edge);
|
|
599
601
|
}
|
|
600
602
|
|
|
601
|
-
[data-ui
|
|
602
|
-
[data-ui
|
|
603
|
+
[data-ui-time-field][data-part-root][data-invalid]:has([data-part-segment]:focus),
|
|
604
|
+
[data-ui-time-field][data-part-root][data-invalid]:has([data-part-duration]:focus) {
|
|
603
605
|
box-shadow:
|
|
604
606
|
var(--_invalid-edge),
|
|
605
607
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
606
608
|
var(--slotted-focus-ring-color, Highlight);
|
|
607
609
|
}
|
|
608
610
|
|
|
609
|
-
[data-ui
|
|
610
|
-
[data-part
|
|
611
|
+
[data-ui-time-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
612
|
+
[data-part-segment]:focus
|
|
611
613
|
),
|
|
612
|
-
[data-ui
|
|
613
|
-
[data-part
|
|
614
|
+
[data-ui-time-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
615
|
+
[data-part-duration]:focus
|
|
614
616
|
) {
|
|
615
617
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
616
618
|
it; the edge reaches past the ring. */
|
|
@@ -623,30 +625,33 @@
|
|
|
623
625
|
}
|
|
624
626
|
|
|
625
627
|
/*
|
|
626
|
-
* Forced
|
|
628
|
+
* Forced colors remove every box shadow, and the edge with them. The
|
|
627
629
|
* width comes back as an outline inside the border, and a focused invalid
|
|
628
630
|
* control draws its ring double, which a valid ring is not.
|
|
629
631
|
*/
|
|
630
632
|
@media (forced-colors: active) {
|
|
631
|
-
[data-ui
|
|
633
|
+
[data-ui-time-field][data-part-root][data-invalid] {
|
|
632
634
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
633
635
|
outline-offset: calc(
|
|
634
636
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
635
637
|
);
|
|
636
638
|
}
|
|
637
639
|
|
|
638
|
-
[data-ui
|
|
639
|
-
[data-ui
|
|
640
|
+
[data-ui-time-field][data-part-root][data-invalid]:has([data-part-segment]:focus),
|
|
641
|
+
[data-ui-time-field][data-part-root][data-invalid]:has([data-part-duration]:focus) {
|
|
640
642
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
641
643
|
var(--slotted-focus-ring-color, Highlight);
|
|
642
|
-
outline-offset: var(
|
|
644
|
+
outline-offset: var(
|
|
645
|
+
--slotted-control-focus-ring-offset,
|
|
646
|
+
var(--slotted-focus-ring-offset, 2px)
|
|
647
|
+
);
|
|
643
648
|
}
|
|
644
649
|
|
|
645
|
-
[data-ui
|
|
646
|
-
[data-part
|
|
650
|
+
[data-ui-time-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
651
|
+
[data-part-segment]:focus
|
|
647
652
|
),
|
|
648
|
-
[data-ui
|
|
649
|
-
[data-part
|
|
653
|
+
[data-ui-time-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
654
|
+
[data-part-duration]:focus
|
|
650
655
|
) {
|
|
651
656
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
652
657
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -661,13 +666,13 @@
|
|
|
661
666
|
* mistakable for disabled: the value is still real and still submitted. The
|
|
662
667
|
* ground says "not yours to change" and the ink says nothing at all.
|
|
663
668
|
*/
|
|
664
|
-
[data-ui
|
|
665
|
-
[data-ui
|
|
666
|
-
[data-ui
|
|
669
|
+
[data-ui-time-field][data-part-root][data-readonly],
|
|
670
|
+
[data-ui-time-field][data-part-root][data-readonly] [data-part-segments],
|
|
671
|
+
[data-ui-time-field][data-part-root][data-readonly] [data-part-segment] {
|
|
667
672
|
cursor: default;
|
|
668
673
|
}
|
|
669
674
|
|
|
670
|
-
[data-ui
|
|
675
|
+
[data-ui-time-field][data-part-root][data-readonly] {
|
|
671
676
|
background-color: var(
|
|
672
677
|
--slotted-time-field-readonly-background,
|
|
673
678
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -675,11 +680,11 @@
|
|
|
675
680
|
}
|
|
676
681
|
|
|
677
682
|
/**
|
|
678
|
-
* Muted to the
|
|
683
|
+
* Muted to the color the theme measures rather than faded by opacity: a
|
|
679
684
|
* time nobody can read is a field nobody can check, and a disabled form
|
|
680
685
|
* still has to say what it holds.
|
|
681
686
|
*/
|
|
682
|
-
[data-ui
|
|
687
|
+
[data-ui-time-field][data-part-root][data-disabled] {
|
|
683
688
|
background-color: var(
|
|
684
689
|
--slotted-time-field-disabled-background,
|
|
685
690
|
var(--slotted-disabled-background)
|
|
@@ -691,28 +696,28 @@
|
|
|
691
696
|
cursor: not-allowed;
|
|
692
697
|
}
|
|
693
698
|
|
|
694
|
-
[data-ui
|
|
695
|
-
[data-ui
|
|
699
|
+
[data-ui-time-field][data-part-root][data-disabled] [data-part-segments],
|
|
700
|
+
[data-ui-time-field][data-part-root][data-disabled] [data-part-segment] {
|
|
696
701
|
cursor: not-allowed;
|
|
697
702
|
}
|
|
698
703
|
|
|
699
|
-
[data-ui
|
|
700
|
-
[data-ui
|
|
701
|
-
[data-ui
|
|
702
|
-
[data-ui
|
|
704
|
+
[data-ui-time-field][data-part-root][data-disabled] > [data-part-start],
|
|
705
|
+
[data-ui-time-field][data-part-root][data-disabled] > [data-part-end],
|
|
706
|
+
[data-ui-time-field][data-part-root][data-disabled] [data-part-literal],
|
|
707
|
+
[data-ui-time-field][data-part-root][data-disabled] [data-part-segment][data-placeholder] {
|
|
703
708
|
color: var(--slotted-disabled-foreground);
|
|
704
709
|
}
|
|
705
710
|
|
|
706
711
|
@media (forced-colors: active) {
|
|
707
|
-
/* A transparent border has no system
|
|
712
|
+
/* A transparent border has no system color to be remapped to, so the
|
|
708
713
|
`plain` control would lose its only edge where an edge matters most. */
|
|
709
|
-
[data-ui
|
|
714
|
+
[data-ui-time-field][data-part-root][data-variant='plain'] {
|
|
710
715
|
border-color: ButtonBorder;
|
|
711
716
|
}
|
|
712
717
|
|
|
713
718
|
/* The preview's two tones both map to the same system ink, so the border
|
|
714
719
|
is what is left to say the control is in a different mode. */
|
|
715
|
-
[data-ui
|
|
720
|
+
[data-ui-time-field][data-part-root][data-relative] {
|
|
716
721
|
border-color: Highlight;
|
|
717
722
|
}
|
|
718
723
|
}
|