@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.31
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 +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +456 -329
- package/src/app-shell/app-shell.tokens.json +6 -3
- 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 +70 -67
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +161 -159
- package/src/cascader/cascader.tokens.json +2 -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 +81 -80
- package/src/collapsible/collapsible.tokens.json +1 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +206 -132
- package/src/combobox/combobox.tokens.json +4 -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 +204 -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 +435 -199
- package/src/dialog/dialog.tokens.json +9 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +598 -237
- package/src/drawer/drawer.tokens.json +14 -0
- package/src/entity-picker/entity-picker.css +326 -272
- package/src/entity-picker/entity-picker.tokens.json +4 -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 +100 -26
- package/src/form/form.tokens.json +6 -1
- 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 +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- 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 +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1253 -1246
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +233 -174
- package/src/multi-select/multi-select.tokens.json +3 -0
- package/src/navigation-menu/navigation-menu.css +170 -191
- package/src/navigation-menu/navigation-menu.tokens.json +1 -0
- package/src/notification-center/notification-center.css +155 -163
- package/src/notification-center/notification-center.tokens.json +4 -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 +342 -287
- package/src/page-header/page-header.tokens.json +6 -1
- package/src/pagination/pagination.css +75 -79
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -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 +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +179 -44
- package/src/section/section.tokens.json +9 -3
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +213 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +201 -198
- 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 +139 -122
- package/src/toast/toast.tokens.json +7 -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 +68 -74
- package/src/tour/tour.tokens.json +1 -0
- 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
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* application's — so the value reaches a form through a hidden input, which
|
|
14
14
|
* is the decision `currency-field` already took for a number.
|
|
15
15
|
*/
|
|
16
|
-
[data-ui
|
|
16
|
+
[data-ui-date-field][data-part-root] {
|
|
17
17
|
/**
|
|
18
18
|
* Type, height, inline padding, gap and glyph size come from the control
|
|
19
19
|
* scales — the only ones the theme restates per density — so a date in a
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
52
52
|
font-size: var(--_font-size);
|
|
53
53
|
gap: var(--_gap);
|
|
54
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
55
|
+
flex-basis: content;
|
|
54
56
|
inline-size: 100%;
|
|
55
57
|
min-block-size: var(--_height);
|
|
56
58
|
min-inline-size: 0;
|
|
@@ -69,7 +71,7 @@
|
|
|
69
71
|
* begin from it — the arithmetic `text-field` records, holding at every step
|
|
70
72
|
* and every density.
|
|
71
73
|
*/
|
|
72
|
-
[data-ui
|
|
74
|
+
[data-ui-date-field][data-part-root]:has(> [data-part-clear]:last-child) {
|
|
73
75
|
padding-inline-end: max(
|
|
74
76
|
0px,
|
|
75
77
|
calc(var(--_padding-inline) - (var(--_action-size) - var(--_icon-size)) / 2)
|
|
@@ -81,7 +83,7 @@
|
|
|
81
83
|
* and puts the date at the reading edge, so an empty field and a full one
|
|
82
84
|
* start in the same place.
|
|
83
85
|
*/
|
|
84
|
-
[data-ui
|
|
86
|
+
[data-ui-date-field] [data-part-segments] {
|
|
85
87
|
align-items: center;
|
|
86
88
|
/**
|
|
87
89
|
* It says what it is before it is pressed. A date is typed, so the pointer
|
|
@@ -116,7 +118,7 @@
|
|
|
116
118
|
* `9` and one showing `09` therefore occupy the same column, and the two
|
|
117
119
|
* separators never step sideways under the pointer.
|
|
118
120
|
*/
|
|
119
|
-
[data-ui
|
|
121
|
+
[data-ui-date-field] [data-part-segment] {
|
|
120
122
|
--_digits: 2;
|
|
121
123
|
|
|
122
124
|
background-color: transparent;
|
|
@@ -148,7 +150,7 @@
|
|
|
148
150
|
-webkit-tap-highlight-color: transparent;
|
|
149
151
|
}
|
|
150
152
|
|
|
151
|
-
[data-ui
|
|
153
|
+
[data-ui-date-field] [data-part-segment][data-field='year'] {
|
|
152
154
|
--_digits: 4;
|
|
153
155
|
}
|
|
154
156
|
|
|
@@ -158,7 +160,7 @@
|
|
|
158
160
|
* reader's own words rather than in English — and a date being typed has to
|
|
159
161
|
* keep saying what is still missing.
|
|
160
162
|
*/
|
|
161
|
-
[data-ui
|
|
163
|
+
[data-ui-date-field] [data-part-segment][data-placeholder] {
|
|
162
164
|
color: var(--slotted-date-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
163
165
|
}
|
|
164
166
|
|
|
@@ -167,7 +169,7 @@
|
|
|
167
169
|
* name already carries the whole date in words, so a screen reader reading
|
|
168
170
|
* "slash" between two numbers would be reading punctuation aloud.
|
|
169
171
|
*/
|
|
170
|
-
[data-ui
|
|
172
|
+
[data-ui-date-field] [data-part-literal] {
|
|
171
173
|
color: var(--slotted-date-field-literal-color, var(--slotted-text-muted, GrayText));
|
|
172
174
|
flex: 0 0 auto;
|
|
173
175
|
/* Its own bidi run: a slash between two numbers takes the paragraph's
|
|
@@ -182,7 +184,7 @@
|
|
|
182
184
|
* holding an `md` control is a field and a control disagreeing about one row.
|
|
183
185
|
*/
|
|
184
186
|
|
|
185
|
-
[data-ui
|
|
187
|
+
[data-ui-date-field][data-part-root][data-size='sm'] {
|
|
186
188
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
187
189
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
188
190
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -190,7 +192,7 @@
|
|
|
190
192
|
--_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-sm, 14px));
|
|
191
193
|
}
|
|
192
194
|
|
|
193
|
-
[data-ui
|
|
195
|
+
[data-ui-date-field][data-part-root][data-size='md'] {
|
|
194
196
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
195
197
|
--_height: var(--slotted-control-height-md, 34px);
|
|
196
198
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -198,7 +200,7 @@
|
|
|
198
200
|
--_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-md, 16px));
|
|
199
201
|
}
|
|
200
202
|
|
|
201
|
-
[data-ui
|
|
203
|
+
[data-ui-date-field][data-part-root][data-size='lg'] {
|
|
202
204
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
203
205
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
204
206
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -212,7 +214,7 @@
|
|
|
212
214
|
* shows one frame twice rather than two frames.
|
|
213
215
|
*/
|
|
214
216
|
|
|
215
|
-
[data-ui
|
|
217
|
+
[data-ui-date-field][data-part-root][data-variant='subtle'] {
|
|
216
218
|
background-color: var(
|
|
217
219
|
--slotted-date-field-subtle-background,
|
|
218
220
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -223,7 +225,7 @@
|
|
|
223
225
|
);
|
|
224
226
|
}
|
|
225
227
|
|
|
226
|
-
[data-ui
|
|
228
|
+
[data-ui-date-field][data-part-root][data-variant='plain'] {
|
|
227
229
|
background-color: transparent;
|
|
228
230
|
border-color: transparent;
|
|
229
231
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -236,8 +238,8 @@
|
|
|
236
238
|
* the value: an adornment annotates, and a reader looking for the date
|
|
237
239
|
* should not have to step over it.
|
|
238
240
|
*/
|
|
239
|
-
[data-ui
|
|
240
|
-
[data-ui
|
|
241
|
+
[data-ui-date-field] > [data-part-start],
|
|
242
|
+
[data-ui-date-field] > [data-part-end] {
|
|
241
243
|
--slotted-icon-size: var(--_icon-size);
|
|
242
244
|
|
|
243
245
|
align-items: center;
|
|
@@ -249,8 +251,8 @@
|
|
|
249
251
|
unicode-bidi: plaintext;
|
|
250
252
|
}
|
|
251
253
|
|
|
252
|
-
[data-ui
|
|
253
|
-
[data-ui
|
|
254
|
+
[data-ui-date-field] > [data-part-start] > svg,
|
|
255
|
+
[data-ui-date-field] > [data-part-end] > svg {
|
|
254
256
|
block-size: var(--_icon-size);
|
|
255
257
|
inline-size: var(--_icon-size);
|
|
256
258
|
}
|
|
@@ -261,7 +263,7 @@
|
|
|
261
263
|
* character, and held to the target minimum by the family rather than by the
|
|
262
264
|
* page.
|
|
263
265
|
*/
|
|
264
|
-
[data-ui
|
|
266
|
+
[data-ui-date-field] > [data-part-clear] {
|
|
265
267
|
align-items: center;
|
|
266
268
|
appearance: none;
|
|
267
269
|
background-color: transparent;
|
|
@@ -291,7 +293,7 @@
|
|
|
291
293
|
* larger one alone, which is the correction `docs/token-foundation.md`
|
|
292
294
|
* leaves to the family rather than to the theme.
|
|
293
295
|
*/
|
|
294
|
-
[data-ui
|
|
296
|
+
[data-ui-date-field] > [data-part-clear]::after {
|
|
295
297
|
content: '';
|
|
296
298
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
297
299
|
position: absolute;
|
|
@@ -302,28 +304,28 @@
|
|
|
302
304
|
the hit area above grows to 44 pixels around them. After an end
|
|
303
305
|
adornment — a picker's trigger — it does not reach back across it. */
|
|
304
306
|
@media (pointer: coarse) {
|
|
305
|
-
[data-ui
|
|
307
|
+
[data-ui-date-field] > [data-part-clear]::after {
|
|
306
308
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
307
309
|
}
|
|
308
310
|
|
|
309
|
-
[data-ui
|
|
311
|
+
[data-ui-date-field] > [data-part-end] + [data-part-clear]::after {
|
|
310
312
|
inset-inline-start: 0;
|
|
311
313
|
}
|
|
312
314
|
}
|
|
313
315
|
|
|
314
316
|
/* The cross is drawn at the control's own icon step. */
|
|
315
|
-
[data-ui
|
|
317
|
+
[data-ui-date-field] > [data-part-clear] {
|
|
316
318
|
--slotted-icon-size: var(--_icon-size);
|
|
317
319
|
}
|
|
318
320
|
|
|
319
|
-
[data-ui
|
|
321
|
+
[data-ui-date-field] > [data-part-clear]:hover:not(:disabled):not([data-disabled]) {
|
|
320
322
|
background-color: var(
|
|
321
323
|
--slotted-date-field-action-hover-background,
|
|
322
324
|
var(--slotted-tone-secondary-subtle-hover)
|
|
323
325
|
);
|
|
324
326
|
}
|
|
325
327
|
|
|
326
|
-
[data-ui
|
|
328
|
+
[data-ui-date-field] > [data-part-clear]:active:not(:disabled):not([data-disabled]) {
|
|
327
329
|
background-color: var(
|
|
328
330
|
--slotted-date-field-action-active-background,
|
|
329
331
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -336,7 +338,7 @@
|
|
|
336
338
|
* and a ring around the whole frame would sit still while focus moved inside
|
|
337
339
|
* it.
|
|
338
340
|
*/
|
|
339
|
-
[data-ui
|
|
341
|
+
[data-ui-date-field] > [data-part-clear]:focus-visible {
|
|
340
342
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
341
343
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
342
344
|
}
|
|
@@ -347,13 +349,13 @@
|
|
|
347
349
|
* one it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
348
350
|
*/
|
|
349
351
|
|
|
350
|
-
[data-ui
|
|
352
|
+
[data-ui-date-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
351
353
|
[data-invalid]
|
|
352
354
|
) {
|
|
353
355
|
border-color: var(--slotted-date-field-hover-border-color, var(--slotted-tone-accent-border));
|
|
354
356
|
}
|
|
355
357
|
|
|
356
|
-
[data-ui
|
|
358
|
+
[data-ui-date-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
357
359
|
[data-readonly]
|
|
358
360
|
):not([data-invalid]) {
|
|
359
361
|
background-color: var(
|
|
@@ -362,7 +364,7 @@
|
|
|
362
364
|
);
|
|
363
365
|
}
|
|
364
366
|
|
|
365
|
-
[data-ui
|
|
367
|
+
[data-ui-date-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
366
368
|
[data-readonly]
|
|
367
369
|
):not([data-invalid]) {
|
|
368
370
|
background-color: var(
|
|
@@ -382,7 +384,7 @@
|
|
|
382
384
|
* at `dense` there is not room for two.
|
|
383
385
|
*
|
|
384
386
|
* So the segment takes the accent solid and its own ink. Under forced
|
|
385
|
-
*
|
|
387
|
+
* colors the accent tone maps to `Highlight` and `HighlightText`, which is
|
|
386
388
|
* the one pair the operating system guarantees legible together.
|
|
387
389
|
*
|
|
388
390
|
* Both are `:focus` and not `:focus-visible`, and that is the whole reason a
|
|
@@ -393,11 +395,11 @@
|
|
|
393
395
|
* `:focus-visible`, a clicked field answered a keystroke and looked exactly
|
|
394
396
|
* as it had before the press.
|
|
395
397
|
*/
|
|
396
|
-
[data-ui
|
|
398
|
+
[data-ui-date-field][data-part-root]:has([data-part-segment]:focus) {
|
|
397
399
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
398
400
|
var(--slotted-focus-ring-color, Highlight);
|
|
399
401
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
400
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
402
|
+
outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
|
|
401
403
|
}
|
|
402
404
|
|
|
403
405
|
/**
|
|
@@ -407,12 +409,12 @@
|
|
|
407
409
|
* shadow that appears only under focus is a cell that changes size when it
|
|
408
410
|
* is used.
|
|
409
411
|
*/
|
|
410
|
-
[data-ui
|
|
412
|
+
[data-ui-date-field][data-part-root][data-variant='plain']:has([data-part-segment]:focus) {
|
|
411
413
|
box-shadow: none;
|
|
412
414
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
413
415
|
}
|
|
414
416
|
|
|
415
|
-
[data-ui
|
|
417
|
+
[data-ui-date-field] [data-part-segment]:focus {
|
|
416
418
|
background-color: var(
|
|
417
419
|
--slotted-date-field-segment-focus-background,
|
|
418
420
|
var(--slotted-tone-accent-solid)
|
|
@@ -428,7 +430,7 @@
|
|
|
428
430
|
* ring is retargeted rather than repainted, so the frame's outline, the
|
|
429
431
|
* shadow under it and the ring on the clear button all move at once.
|
|
430
432
|
*/
|
|
431
|
-
[data-ui
|
|
433
|
+
[data-ui-date-field][data-part-root][data-invalid] {
|
|
432
434
|
--slotted-focus-ring-color: var(
|
|
433
435
|
--slotted-date-field-invalid-focus-ring-color,
|
|
434
436
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -445,7 +447,7 @@
|
|
|
445
447
|
|
|
446
448
|
border-color: var(--slotted-date-field-invalid-border-color, var(--slotted-tone-danger-border));
|
|
447
449
|
/*
|
|
448
|
-
* Width as well as
|
|
450
|
+
* Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
|
|
449
451
|
* `high-contrast` the danger border is the resting edge's black. The line
|
|
450
452
|
* is a shadow inside the border, so neither box nor text moves, and it
|
|
451
453
|
* takes the resting lift's place.
|
|
@@ -453,15 +455,15 @@
|
|
|
453
455
|
box-shadow: var(--_invalid-edge);
|
|
454
456
|
}
|
|
455
457
|
|
|
456
|
-
[data-ui
|
|
458
|
+
[data-ui-date-field][data-part-root][data-invalid]:has([data-part-segment]:focus) {
|
|
457
459
|
box-shadow:
|
|
458
460
|
var(--_invalid-edge),
|
|
459
461
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
460
462
|
var(--slotted-focus-ring-color, Highlight);
|
|
461
463
|
}
|
|
462
464
|
|
|
463
|
-
[data-ui
|
|
464
|
-
[data-part
|
|
465
|
+
[data-ui-date-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
466
|
+
[data-part-segment]:focus
|
|
465
467
|
) {
|
|
466
468
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
467
469
|
it; the edge reaches past the ring. */
|
|
@@ -474,26 +476,29 @@
|
|
|
474
476
|
}
|
|
475
477
|
|
|
476
478
|
/*
|
|
477
|
-
* Forced
|
|
479
|
+
* Forced colors remove every box shadow, and the edge with them. The
|
|
478
480
|
* width comes back as an outline inside the border, and a focused invalid
|
|
479
481
|
* control draws its ring double, which a valid ring is not.
|
|
480
482
|
*/
|
|
481
483
|
@media (forced-colors: active) {
|
|
482
|
-
[data-ui
|
|
484
|
+
[data-ui-date-field][data-part-root][data-invalid] {
|
|
483
485
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
484
486
|
outline-offset: calc(
|
|
485
487
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
486
488
|
);
|
|
487
489
|
}
|
|
488
490
|
|
|
489
|
-
[data-ui
|
|
491
|
+
[data-ui-date-field][data-part-root][data-invalid]:has([data-part-segment]:focus) {
|
|
490
492
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
491
493
|
var(--slotted-focus-ring-color, Highlight);
|
|
492
|
-
outline-offset: var(
|
|
494
|
+
outline-offset: var(
|
|
495
|
+
--slotted-control-focus-ring-offset,
|
|
496
|
+
var(--slotted-focus-ring-offset, 2px)
|
|
497
|
+
);
|
|
493
498
|
}
|
|
494
499
|
|
|
495
|
-
[data-ui
|
|
496
|
-
[data-part
|
|
500
|
+
[data-ui-date-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
501
|
+
[data-part-segment]:focus
|
|
497
502
|
) {
|
|
498
503
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
499
504
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -508,13 +513,13 @@
|
|
|
508
513
|
* mistakable for disabled: the value is still real and still submitted. The
|
|
509
514
|
* ground says "not yours to change" and the ink says nothing at all.
|
|
510
515
|
*/
|
|
511
|
-
[data-ui
|
|
512
|
-
[data-ui
|
|
513
|
-
[data-ui
|
|
516
|
+
[data-ui-date-field][data-part-root][data-readonly],
|
|
517
|
+
[data-ui-date-field][data-part-root][data-readonly] [data-part-segments],
|
|
518
|
+
[data-ui-date-field][data-part-root][data-readonly] [data-part-segment] {
|
|
514
519
|
cursor: default;
|
|
515
520
|
}
|
|
516
521
|
|
|
517
|
-
[data-ui
|
|
522
|
+
[data-ui-date-field][data-part-root][data-readonly] {
|
|
518
523
|
background-color: var(
|
|
519
524
|
--slotted-date-field-readonly-background,
|
|
520
525
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -522,11 +527,11 @@
|
|
|
522
527
|
}
|
|
523
528
|
|
|
524
529
|
/**
|
|
525
|
-
* Muted to the
|
|
530
|
+
* Muted to the color the theme measures rather than faded by opacity: a
|
|
526
531
|
* date nobody can read is a field nobody can check, and a disabled form
|
|
527
532
|
* still has to say what it holds.
|
|
528
533
|
*/
|
|
529
|
-
[data-ui
|
|
534
|
+
[data-ui-date-field][data-part-root][data-disabled] {
|
|
530
535
|
background-color: var(
|
|
531
536
|
--slotted-date-field-disabled-background,
|
|
532
537
|
var(--slotted-disabled-background)
|
|
@@ -538,22 +543,22 @@
|
|
|
538
543
|
cursor: not-allowed;
|
|
539
544
|
}
|
|
540
545
|
|
|
541
|
-
[data-ui
|
|
542
|
-
[data-ui
|
|
546
|
+
[data-ui-date-field][data-part-root][data-disabled] [data-part-segments],
|
|
547
|
+
[data-ui-date-field][data-part-root][data-disabled] [data-part-segment] {
|
|
543
548
|
cursor: not-allowed;
|
|
544
549
|
}
|
|
545
550
|
|
|
546
|
-
[data-ui
|
|
547
|
-
[data-ui
|
|
548
|
-
[data-ui
|
|
549
|
-
[data-ui
|
|
551
|
+
[data-ui-date-field][data-part-root][data-disabled] > [data-part-start],
|
|
552
|
+
[data-ui-date-field][data-part-root][data-disabled] > [data-part-end],
|
|
553
|
+
[data-ui-date-field][data-part-root][data-disabled] [data-part-literal],
|
|
554
|
+
[data-ui-date-field][data-part-root][data-disabled] [data-part-segment][data-placeholder] {
|
|
550
555
|
color: var(--slotted-disabled-foreground);
|
|
551
556
|
}
|
|
552
557
|
|
|
553
558
|
@media (forced-colors: active) {
|
|
554
|
-
/* A transparent border has no system
|
|
559
|
+
/* A transparent border has no system color to be remapped to, so the
|
|
555
560
|
`plain` control would lose its only edge where an edge matters most. */
|
|
556
|
-
[data-ui
|
|
561
|
+
[data-ui-date-field][data-part-root][data-variant='plain'] {
|
|
557
562
|
border-color: ButtonBorder;
|
|
558
563
|
}
|
|
559
564
|
}
|