@slotted/styles 0.1.0-beta.2 → 0.1.0-beta.21
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 +45 -42
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +68 -67
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +452 -314
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +71 -41
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +45 -37
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +149 -68
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +79 -74
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +133 -103
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +154 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +258 -248
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +119 -124
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +81 -85
- package/src/collapsible/collapsible.css +72 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +157 -124
- package/src/combobox/combobox.tokens.json +2 -0
- package/src/command-palette/command-palette.css +103 -90
- package/src/command-palette/command-palette.tokens.json +1 -0
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +212 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +184 -114
- package/src/data-grid/data-grid.css +535 -470
- package/src/data-grid/data-grid.tokens.json +4 -0
- package/src/data-list/data-list.css +81 -70
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +57 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +75 -57
- package/src/date-picker/date-picker.tokens.json +1 -0
- package/src/date-range-picker/date-range-picker.css +116 -118
- package/src/datetime-field/datetime-field.css +80 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +63 -63
- package/src/datetime-range-picker/datetime-range-picker.css +151 -156
- package/src/description-list/description-list.css +80 -65
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +376 -153
- package/src/dialog/dialog.tokens.json +6 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +513 -217
- package/src/drawer/drawer.tokens.json +6 -0
- package/src/entity-picker/entity-picker.css +273 -256
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- package/src/event-calendar/event-calendar.css +343 -385
- package/src/field/field.css +74 -78
- package/src/field-group/field-group.css +22 -25
- package/src/filter-bar/filter-bar.css +193 -209
- package/src/form/form.css +34 -24
- package/src/form/form.tokens.json +1 -0
- package/src/fullscreen/fullscreen.css +24 -25
- package/src/grid/grid.css +28 -28
- package/src/highlight/highlight.css +6 -6
- package/src/hover-card/hover-card.css +6 -6
- package/src/icon/icon.css +62 -15
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +39 -39
- package/src/import-export-center/import-export-center.css +135 -156
- package/src/inline/inline.css +27 -27
- package/src/inline-message/inline-message.css +153 -77
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +48 -36
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +36 -15
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +44 -17
- package/src/list/list.tokens.json +4 -0
- package/src/list-item/list-item.css +80 -66
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +56 -59
- package/src/loading-overlay/loading-overlay.css +75 -92
- package/src/markdown/markdown.css +17 -17
- package/src/menu/menu.css +117 -74
- package/src/menu/menu.tokens.json +1 -0
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +192 -202
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +177 -160
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +140 -148
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +83 -83
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +67 -57
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +39 -23
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +339 -284
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +73 -61
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +169 -113
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +251 -104
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +136 -132
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +74 -77
- package/src/runtime-properties.mjs +2 -0
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +39 -32
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +254 -97
- package/src/segmented-control/segmented-control.tokens.json +15 -11
- package/src/select/select.css +153 -132
- package/src/select/select.tokens.json +2 -0
- package/src/side-navigation/side-navigation.css +179 -182
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +62 -40
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +30 -31
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +380 -241
- package/src/stat-card/stat-card.tokens.json +5 -0
- package/src/status-indicator/status-indicator.css +107 -82
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +340 -175
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +57 -56
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +322 -289
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +91 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +147 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +134 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +33 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +74 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +58 -58
- package/src/time-range-picker/time-range-picker.css +128 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +115 -98
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +62 -25
- package/src/toggle/toggle.tokens.json +8 -0
- package/src/toggle-group/toggle-group.css +106 -60
- package/src/toggle-group/toggle-group.tokens.json +10 -0
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +59 -38
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +40 -36
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* order is the browser's locale rather than the application's. The value
|
|
19
19
|
* reaches a form through a hidden input carrying `YYYY-MM-DDTHH:mm:ss`.
|
|
20
20
|
*/
|
|
21
|
-
[data-ui
|
|
21
|
+
[data-ui-datetime-field][data-part-root] {
|
|
22
22
|
/**
|
|
23
23
|
* Type, height, inline padding, gap and glyph size come from the control
|
|
24
24
|
* scales — the only ones the theme restates per density — so a datetime in
|
|
@@ -67,6 +67,8 @@
|
|
|
67
67
|
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
68
68
|
font-size: var(--_font-size);
|
|
69
69
|
gap: var(--_gap);
|
|
70
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
71
|
+
flex-basis: content;
|
|
70
72
|
inline-size: 100%;
|
|
71
73
|
min-block-size: var(--_height);
|
|
72
74
|
min-inline-size: 0;
|
|
@@ -89,7 +91,7 @@
|
|
|
89
91
|
* begin from it — the arithmetic `text-field` records, holding at every step
|
|
90
92
|
* and every density.
|
|
91
93
|
*/
|
|
92
|
-
[data-ui
|
|
94
|
+
[data-ui-datetime-field][data-part-root]:has(> [data-part-clear]:last-child) {
|
|
93
95
|
padding-inline-end: max(
|
|
94
96
|
0px,
|
|
95
97
|
calc(var(--_padding-inline) - (var(--_action-size) - var(--_icon-size)) / 2)
|
|
@@ -111,7 +113,7 @@
|
|
|
111
113
|
* the focus. Each half stays one flex item, so the value never breaks
|
|
112
114
|
* inside a date or inside a time.
|
|
113
115
|
*/
|
|
114
|
-
[data-ui
|
|
116
|
+
[data-ui-datetime-field] [data-part-segments] {
|
|
115
117
|
align-items: center;
|
|
116
118
|
column-gap: var(--_half-gap);
|
|
117
119
|
/* It says what it is before it is pressed. A datetime is typed, so the
|
|
@@ -137,7 +139,7 @@
|
|
|
137
139
|
* a field that had done nothing but inherit. The isolation keeps the decision
|
|
138
140
|
* inside the half, so the frame around it still reads with the document.
|
|
139
141
|
*/
|
|
140
|
-
[data-ui
|
|
142
|
+
[data-ui-datetime-field] [data-part-half] {
|
|
141
143
|
align-items: center;
|
|
142
144
|
direction: ltr;
|
|
143
145
|
display: flex;
|
|
@@ -158,7 +160,7 @@
|
|
|
158
160
|
* the document — which is the reason every other family in this library
|
|
159
161
|
* reaches for it too.
|
|
160
162
|
*/
|
|
161
|
-
[data-ui
|
|
163
|
+
[data-ui-datetime-field] [data-part-segments]:dir(rtl) {
|
|
162
164
|
justify-content: flex-end;
|
|
163
165
|
}
|
|
164
166
|
|
|
@@ -169,7 +171,7 @@
|
|
|
169
171
|
* single digit becomes two: `1ch` is the advance of a digit in a tabular
|
|
170
172
|
* face, and `--_digits` is how many the field can hold.
|
|
171
173
|
*/
|
|
172
|
-
[data-ui
|
|
174
|
+
[data-ui-datetime-field] [data-part-segment] {
|
|
173
175
|
--_digits: 2;
|
|
174
176
|
|
|
175
177
|
background-color: transparent;
|
|
@@ -206,7 +208,7 @@
|
|
|
206
208
|
|
|
207
209
|
/* The one field with four digits rather than two. Stated here rather than in
|
|
208
210
|
the markup, so a year is the same width in both bindings and the harness. */
|
|
209
|
-
[data-ui
|
|
211
|
+
[data-ui-datetime-field] [data-part-segment][data-field='year'] {
|
|
210
212
|
--_digits: 4;
|
|
211
213
|
}
|
|
212
214
|
|
|
@@ -217,7 +219,7 @@
|
|
|
217
219
|
* first of those, and a floor clips none of them. The digit face is dropped
|
|
218
220
|
* here for the same reason: tabular figures inside a word letter-space it.
|
|
219
221
|
*/
|
|
220
|
-
[data-ui
|
|
222
|
+
[data-ui-datetime-field] [data-part-segment][data-field='dayPeriod'] {
|
|
221
223
|
font-variant-numeric: normal;
|
|
222
224
|
min-inline-size: var(--slotted-datetime-field-period-min-inline-size, 2ch);
|
|
223
225
|
/* An abbreviation, in whatever case the locale itself writes it. */
|
|
@@ -231,7 +233,7 @@
|
|
|
231
233
|
* rather than in English — and a value being typed has to keep saying what
|
|
232
234
|
* is missing.
|
|
233
235
|
*/
|
|
234
|
-
[data-ui
|
|
236
|
+
[data-ui-datetime-field] [data-part-segment][data-placeholder] {
|
|
235
237
|
color: var(--slotted-datetime-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
236
238
|
}
|
|
237
239
|
|
|
@@ -240,7 +242,7 @@
|
|
|
240
242
|
* name already carries the whole value in words, so a screen reader reading
|
|
241
243
|
* "slash" between two numbers would be reading punctuation aloud.
|
|
242
244
|
*/
|
|
243
|
-
[data-ui
|
|
245
|
+
[data-ui-datetime-field] [data-part-literal] {
|
|
244
246
|
color: var(--slotted-datetime-field-literal-color, var(--slotted-text-muted, GrayText));
|
|
245
247
|
flex: 0 0 auto;
|
|
246
248
|
/* Its own bidi run: a colon between two numbers takes the paragraph's
|
|
@@ -258,7 +260,7 @@
|
|
|
258
260
|
* whitespace is not drawn at all, and the row's column gap separates the
|
|
259
261
|
* halves instead.
|
|
260
262
|
*/
|
|
261
|
-
[data-ui
|
|
263
|
+
[data-ui-datetime-field] [data-part-literal][data-boundary] {
|
|
262
264
|
margin-inline-end: 0;
|
|
263
265
|
}
|
|
264
266
|
|
|
@@ -273,7 +275,7 @@
|
|
|
273
275
|
* It is a real `input`, so a mobile keyboard opens and the platform supplies
|
|
274
276
|
* every text-editing key the reader already knows.
|
|
275
277
|
*/
|
|
276
|
-
[data-ui
|
|
278
|
+
[data-ui-datetime-field] [data-part-duration] {
|
|
277
279
|
appearance: none;
|
|
278
280
|
background-color: transparent;
|
|
279
281
|
border: 0;
|
|
@@ -297,11 +299,11 @@
|
|
|
297
299
|
|
|
298
300
|
/* Left-to-right content in a right-to-left field still sits at the reading
|
|
299
301
|
edge, which is the treatment every form gives a phone number or an IBAN. */
|
|
300
|
-
[data-ui
|
|
302
|
+
[data-ui-datetime-field] [data-part-duration]:dir(rtl) {
|
|
301
303
|
text-align: right;
|
|
302
304
|
}
|
|
303
305
|
|
|
304
|
-
[data-ui
|
|
306
|
+
[data-ui-datetime-field] [data-part-duration]::placeholder {
|
|
305
307
|
color: var(--slotted-datetime-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
306
308
|
}
|
|
307
309
|
|
|
@@ -313,7 +315,7 @@
|
|
|
313
315
|
* library already has for "and then"; it is direction-sensitive, so it turns
|
|
314
316
|
* with the document rather than pointing out of it.
|
|
315
317
|
*/
|
|
316
|
-
[data-ui
|
|
318
|
+
[data-ui-datetime-field] [data-part-preview] {
|
|
317
319
|
/**
|
|
318
320
|
* One line box, not a flex row. The chevron sits *in* the line rather than
|
|
319
321
|
* beside it, which is the only way it can be aligned to the text at all —
|
|
@@ -351,7 +353,7 @@
|
|
|
351
353
|
* marked `directional`: it points along the reading direction, so the `icon`
|
|
352
354
|
* family turns it in a right-to-left context.
|
|
353
355
|
*/
|
|
354
|
-
[data-ui
|
|
356
|
+
[data-ui-datetime-field] [data-part-preview] > [data-ui-icon] {
|
|
355
357
|
--slotted-icon-size: var(--_mark);
|
|
356
358
|
|
|
357
359
|
/**
|
|
@@ -377,7 +379,7 @@
|
|
|
377
379
|
* preview whenever it differs from today — and this rule only lifts the date
|
|
378
380
|
* out of the surrounding time so the eye lands on the part that moved.
|
|
379
381
|
*/
|
|
380
|
-
[data-ui
|
|
382
|
+
[data-ui-datetime-field] [data-part-preview][data-rolls-day] > [data-part-preview-date] {
|
|
381
383
|
color: var(--slotted-datetime-field-preview-day-color, var(--slotted-tone-accent-text));
|
|
382
384
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
383
385
|
}
|
|
@@ -388,7 +390,7 @@
|
|
|
388
390
|
* border is the accent the preview is written in, so the two marks are one
|
|
389
391
|
* statement rather than two.
|
|
390
392
|
*/
|
|
391
|
-
[data-ui
|
|
393
|
+
[data-ui-datetime-field][data-part-root][data-relative] {
|
|
392
394
|
border-color: var(
|
|
393
395
|
--slotted-datetime-field-relative-border-color,
|
|
394
396
|
var(--slotted-tone-accent-border)
|
|
@@ -401,7 +403,7 @@
|
|
|
401
403
|
* holding an `md` control is a field and a control disagreeing about one row.
|
|
402
404
|
*/
|
|
403
405
|
|
|
404
|
-
[data-ui
|
|
406
|
+
[data-ui-datetime-field][data-part-root][data-size='sm'] {
|
|
405
407
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
406
408
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
407
409
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -409,7 +411,7 @@
|
|
|
409
411
|
--_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-sm, 14px));
|
|
410
412
|
}
|
|
411
413
|
|
|
412
|
-
[data-ui
|
|
414
|
+
[data-ui-datetime-field][data-part-root][data-size='md'] {
|
|
413
415
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
414
416
|
--_height: var(--slotted-control-height-md, 34px);
|
|
415
417
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -417,7 +419,7 @@
|
|
|
417
419
|
--_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-md, 16px));
|
|
418
420
|
}
|
|
419
421
|
|
|
420
|
-
[data-ui
|
|
422
|
+
[data-ui-datetime-field][data-part-root][data-size='lg'] {
|
|
421
423
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
422
424
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
423
425
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -431,7 +433,7 @@
|
|
|
431
433
|
* shows one frame twice rather than two frames.
|
|
432
434
|
*/
|
|
433
435
|
|
|
434
|
-
[data-ui
|
|
436
|
+
[data-ui-datetime-field][data-part-root][data-variant='subtle'] {
|
|
435
437
|
background-color: var(
|
|
436
438
|
--slotted-datetime-field-subtle-background,
|
|
437
439
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -442,7 +444,7 @@
|
|
|
442
444
|
);
|
|
443
445
|
}
|
|
444
446
|
|
|
445
|
-
[data-ui
|
|
447
|
+
[data-ui-datetime-field][data-part-root][data-variant='plain'] {
|
|
446
448
|
background-color: transparent;
|
|
447
449
|
border-color: transparent;
|
|
448
450
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -455,8 +457,8 @@
|
|
|
455
457
|
* the value: an adornment annotates, and a reader looking for the datetime
|
|
456
458
|
* should not have to step over it.
|
|
457
459
|
*/
|
|
458
|
-
[data-ui
|
|
459
|
-
[data-ui
|
|
460
|
+
[data-ui-datetime-field] > [data-part-start],
|
|
461
|
+
[data-ui-datetime-field] > [data-part-end] {
|
|
460
462
|
--slotted-icon-size: var(--_icon-size);
|
|
461
463
|
|
|
462
464
|
align-items: center;
|
|
@@ -468,8 +470,8 @@
|
|
|
468
470
|
unicode-bidi: plaintext;
|
|
469
471
|
}
|
|
470
472
|
|
|
471
|
-
[data-ui
|
|
472
|
-
[data-ui
|
|
473
|
+
[data-ui-datetime-field] > [data-part-start] > svg,
|
|
474
|
+
[data-ui-datetime-field] > [data-part-end] > svg {
|
|
473
475
|
block-size: var(--_icon-size);
|
|
474
476
|
inline-size: var(--_icon-size);
|
|
475
477
|
}
|
|
@@ -481,7 +483,7 @@
|
|
|
481
483
|
* page. It empties both halves: half a value is not a value this family
|
|
482
484
|
* holds.
|
|
483
485
|
*/
|
|
484
|
-
[data-ui
|
|
486
|
+
[data-ui-datetime-field] > [data-part-clear] {
|
|
485
487
|
align-items: center;
|
|
486
488
|
appearance: none;
|
|
487
489
|
background-color: transparent;
|
|
@@ -511,7 +513,7 @@
|
|
|
511
513
|
* larger one alone, which is the correction `docs/token-foundation.md`
|
|
512
514
|
* leaves to the family rather than to the theme.
|
|
513
515
|
*/
|
|
514
|
-
[data-ui
|
|
516
|
+
[data-ui-datetime-field] > [data-part-clear]::after {
|
|
515
517
|
content: '';
|
|
516
518
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
517
519
|
position: absolute;
|
|
@@ -522,28 +524,28 @@
|
|
|
522
524
|
the hit area above grows to 44 pixels around them. After an end
|
|
523
525
|
adornment — a picker's trigger — it does not reach back across it. */
|
|
524
526
|
@media (pointer: coarse) {
|
|
525
|
-
[data-ui
|
|
527
|
+
[data-ui-datetime-field] > [data-part-clear]::after {
|
|
526
528
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
527
529
|
}
|
|
528
530
|
|
|
529
|
-
[data-ui
|
|
531
|
+
[data-ui-datetime-field] > [data-part-end] + [data-part-clear]::after {
|
|
530
532
|
inset-inline-start: 0;
|
|
531
533
|
}
|
|
532
534
|
}
|
|
533
535
|
|
|
534
536
|
/* The cross is drawn at the control's own icon step. */
|
|
535
|
-
[data-ui
|
|
537
|
+
[data-ui-datetime-field] > [data-part-clear] {
|
|
536
538
|
--slotted-icon-size: var(--_icon-size);
|
|
537
539
|
}
|
|
538
540
|
|
|
539
|
-
[data-ui
|
|
541
|
+
[data-ui-datetime-field] > [data-part-clear]:hover:not(:disabled):not([data-disabled]) {
|
|
540
542
|
background-color: var(
|
|
541
543
|
--slotted-datetime-field-action-hover-background,
|
|
542
544
|
var(--slotted-tone-secondary-subtle-hover)
|
|
543
545
|
);
|
|
544
546
|
}
|
|
545
547
|
|
|
546
|
-
[data-ui
|
|
548
|
+
[data-ui-datetime-field] > [data-part-clear]:active:not(:disabled):not([data-disabled]) {
|
|
547
549
|
background-color: var(
|
|
548
550
|
--slotted-datetime-field-action-active-background,
|
|
549
551
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -556,7 +558,7 @@
|
|
|
556
558
|
* and a ring around the whole frame would sit still while focus moved inside
|
|
557
559
|
* it.
|
|
558
560
|
*/
|
|
559
|
-
[data-ui
|
|
561
|
+
[data-ui-datetime-field] > [data-part-clear]:focus-visible {
|
|
560
562
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
561
563
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
562
564
|
}
|
|
@@ -567,7 +569,7 @@
|
|
|
567
569
|
* one it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
568
570
|
*/
|
|
569
571
|
|
|
570
|
-
[data-ui
|
|
572
|
+
[data-ui-datetime-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
571
573
|
[data-invalid]
|
|
572
574
|
):not([data-incomplete]) {
|
|
573
575
|
border-color: var(
|
|
@@ -576,16 +578,16 @@
|
|
|
576
578
|
);
|
|
577
579
|
}
|
|
578
580
|
|
|
579
|
-
[data-ui
|
|
580
|
-
[data-
|
|
581
|
-
):not([data-
|
|
581
|
+
[data-ui-datetime-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
582
|
+
[data-readonly]
|
|
583
|
+
):not([data-invalid]) {
|
|
582
584
|
background-color: var(
|
|
583
585
|
--slotted-datetime-field-subtle-hover-background,
|
|
584
586
|
var(--slotted-tone-secondary-subtle-hover)
|
|
585
587
|
);
|
|
586
588
|
}
|
|
587
589
|
|
|
588
|
-
[data-ui
|
|
590
|
+
[data-ui-datetime-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
589
591
|
[data-readonly]
|
|
590
592
|
):not([data-invalid]) {
|
|
591
593
|
background-color: var(
|
|
@@ -624,7 +626,7 @@
|
|
|
624
626
|
* reminder — louder at rest than `invalid` is, for a state that is weaker
|
|
625
627
|
* than it.
|
|
626
628
|
*/
|
|
627
|
-
[data-ui
|
|
629
|
+
[data-ui-datetime-field][data-part-root][data-incomplete]:not([data-disabled]):not(
|
|
628
630
|
[data-readonly]
|
|
629
631
|
):not([data-invalid]):not(:focus-within) {
|
|
630
632
|
border-color: var(
|
|
@@ -649,12 +651,12 @@
|
|
|
649
651
|
* had before the press. The expression is an `input` and takes the frame's
|
|
650
652
|
* ring the same way from the other side.
|
|
651
653
|
*/
|
|
652
|
-
[data-ui
|
|
653
|
-
[data-ui
|
|
654
|
+
[data-ui-datetime-field][data-part-root]:has([data-part-segment]:focus),
|
|
655
|
+
[data-ui-datetime-field][data-part-root]:has([data-part-duration]:focus) {
|
|
654
656
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
655
657
|
var(--slotted-focus-ring-color, Highlight);
|
|
656
658
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
657
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
659
|
+
outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
|
|
658
660
|
}
|
|
659
661
|
|
|
660
662
|
/**
|
|
@@ -664,17 +666,13 @@
|
|
|
664
666
|
* shadow that appears only under focus is a cell that changes size when it
|
|
665
667
|
* is used.
|
|
666
668
|
*/
|
|
667
|
-
[data-ui
|
|
668
|
-
|
|
669
|
-
),
|
|
670
|
-
[data-ui='datetime-field'][data-part='root'][data-variant='plain']:has(
|
|
671
|
-
[data-part='duration']:focus
|
|
672
|
-
) {
|
|
669
|
+
[data-ui-datetime-field][data-part-root][data-variant='plain']:has([data-part-segment]:focus),
|
|
670
|
+
[data-ui-datetime-field][data-part-root][data-variant='plain']:has([data-part-duration]:focus) {
|
|
673
671
|
box-shadow: none;
|
|
674
672
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
675
673
|
}
|
|
676
674
|
|
|
677
|
-
[data-ui
|
|
675
|
+
[data-ui-datetime-field] [data-part-segment]:focus {
|
|
678
676
|
background-color: var(
|
|
679
677
|
--slotted-datetime-field-segment-focus-background,
|
|
680
678
|
var(--slotted-tone-accent-solid)
|
|
@@ -691,7 +689,7 @@
|
|
|
691
689
|
* The ring is retargeted rather than repainted, so the frame's outline, the
|
|
692
690
|
* shadow under it and the ring on the clear button all move at once.
|
|
693
691
|
*/
|
|
694
|
-
[data-ui
|
|
692
|
+
[data-ui-datetime-field][data-part-root][data-invalid] {
|
|
695
693
|
--slotted-focus-ring-color: var(
|
|
696
694
|
--slotted-datetime-field-invalid-focus-ring-color,
|
|
697
695
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -719,19 +717,19 @@
|
|
|
719
717
|
box-shadow: var(--_invalid-edge);
|
|
720
718
|
}
|
|
721
719
|
|
|
722
|
-
[data-ui
|
|
723
|
-
[data-ui
|
|
720
|
+
[data-ui-datetime-field][data-part-root][data-invalid]:has([data-part-segment]:focus),
|
|
721
|
+
[data-ui-datetime-field][data-part-root][data-invalid]:has([data-part-duration]:focus) {
|
|
724
722
|
box-shadow:
|
|
725
723
|
var(--_invalid-edge),
|
|
726
724
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
727
725
|
var(--slotted-focus-ring-color, Highlight);
|
|
728
726
|
}
|
|
729
727
|
|
|
730
|
-
[data-ui
|
|
731
|
-
[data-part
|
|
728
|
+
[data-ui-datetime-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
729
|
+
[data-part-segment]:focus
|
|
732
730
|
),
|
|
733
|
-
[data-ui
|
|
734
|
-
[data-part
|
|
731
|
+
[data-ui-datetime-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
732
|
+
[data-part-duration]:focus
|
|
735
733
|
) {
|
|
736
734
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
737
735
|
it; the edge reaches past the ring. */
|
|
@@ -749,25 +747,28 @@
|
|
|
749
747
|
* control draws its ring double, which a valid ring is not.
|
|
750
748
|
*/
|
|
751
749
|
@media (forced-colors: active) {
|
|
752
|
-
[data-ui
|
|
750
|
+
[data-ui-datetime-field][data-part-root][data-invalid] {
|
|
753
751
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
754
752
|
outline-offset: calc(
|
|
755
753
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
756
754
|
);
|
|
757
755
|
}
|
|
758
756
|
|
|
759
|
-
[data-ui
|
|
760
|
-
[data-ui
|
|
757
|
+
[data-ui-datetime-field][data-part-root][data-invalid]:has([data-part-segment]:focus),
|
|
758
|
+
[data-ui-datetime-field][data-part-root][data-invalid]:has([data-part-duration]:focus) {
|
|
761
759
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
762
760
|
var(--slotted-focus-ring-color, Highlight);
|
|
763
|
-
outline-offset: var(
|
|
761
|
+
outline-offset: var(
|
|
762
|
+
--slotted-control-focus-ring-offset,
|
|
763
|
+
var(--slotted-focus-ring-offset, 2px)
|
|
764
|
+
);
|
|
764
765
|
}
|
|
765
766
|
|
|
766
|
-
[data-ui
|
|
767
|
-
[data-part
|
|
767
|
+
[data-ui-datetime-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
768
|
+
[data-part-segment]:focus
|
|
768
769
|
),
|
|
769
|
-
[data-ui
|
|
770
|
-
[data-part
|
|
770
|
+
[data-ui-datetime-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
771
|
+
[data-part-duration]:focus
|
|
771
772
|
) {
|
|
772
773
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
773
774
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -782,13 +783,13 @@
|
|
|
782
783
|
* mistakable for disabled: the value is still real and still submitted. The
|
|
783
784
|
* ground says "not yours to change" and the ink says nothing at all.
|
|
784
785
|
*/
|
|
785
|
-
[data-ui
|
|
786
|
-
[data-ui
|
|
787
|
-
[data-ui
|
|
786
|
+
[data-ui-datetime-field][data-part-root][data-readonly],
|
|
787
|
+
[data-ui-datetime-field][data-part-root][data-readonly] [data-part-segments],
|
|
788
|
+
[data-ui-datetime-field][data-part-root][data-readonly] [data-part-segment] {
|
|
788
789
|
cursor: default;
|
|
789
790
|
}
|
|
790
791
|
|
|
791
|
-
[data-ui
|
|
792
|
+
[data-ui-datetime-field][data-part-root][data-readonly] {
|
|
792
793
|
background-color: var(
|
|
793
794
|
--slotted-datetime-field-readonly-background,
|
|
794
795
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -800,7 +801,7 @@
|
|
|
800
801
|
* datetime nobody can read is a field nobody can check, and a disabled form
|
|
801
802
|
* still has to say what it holds.
|
|
802
803
|
*/
|
|
803
|
-
[data-ui
|
|
804
|
+
[data-ui-datetime-field][data-part-root][data-disabled] {
|
|
804
805
|
background-color: var(
|
|
805
806
|
--slotted-datetime-field-disabled-background,
|
|
806
807
|
var(--slotted-disabled-background)
|
|
@@ -815,23 +816,22 @@
|
|
|
815
816
|
cursor: not-allowed;
|
|
816
817
|
}
|
|
817
818
|
|
|
818
|
-
[data-ui
|
|
819
|
-
[data-ui
|
|
819
|
+
[data-ui-datetime-field][data-part-root][data-disabled] [data-part-segments],
|
|
820
|
+
[data-ui-datetime-field][data-part-root][data-disabled] [data-part-segment] {
|
|
820
821
|
cursor: not-allowed;
|
|
821
822
|
}
|
|
822
823
|
|
|
823
|
-
[data-ui
|
|
824
|
-
[data-ui
|
|
825
|
-
[data-ui
|
|
826
|
-
[data-ui
|
|
827
|
-
[data-part='segment'][data-placeholder] {
|
|
824
|
+
[data-ui-datetime-field][data-part-root][data-disabled] > [data-part-start],
|
|
825
|
+
[data-ui-datetime-field][data-part-root][data-disabled] > [data-part-end],
|
|
826
|
+
[data-ui-datetime-field][data-part-root][data-disabled] [data-part-literal],
|
|
827
|
+
[data-ui-datetime-field][data-part-root][data-disabled] [data-part-segment][data-placeholder] {
|
|
828
828
|
color: var(--slotted-disabled-foreground);
|
|
829
829
|
}
|
|
830
830
|
|
|
831
831
|
@media (forced-colors: active) {
|
|
832
832
|
/* A transparent border has no system colour to be remapped to, so the
|
|
833
833
|
`plain` control would lose its only edge where an edge matters most. */
|
|
834
|
-
[data-ui
|
|
834
|
+
[data-ui-datetime-field][data-part-root][data-variant='plain'] {
|
|
835
835
|
border-color: ButtonBorder;
|
|
836
836
|
}
|
|
837
837
|
|
|
@@ -839,7 +839,7 @@
|
|
|
839
839
|
modes that are told apart by tone need a second signal. The expression
|
|
840
840
|
borrows the highlight; the incomplete frame borrows the thicker border
|
|
841
841
|
the system reserves for something asking to be finished. */
|
|
842
|
-
[data-ui
|
|
842
|
+
[data-ui-datetime-field][data-part-root][data-relative] {
|
|
843
843
|
border-color: Highlight;
|
|
844
844
|
}
|
|
845
845
|
|