@slotted/styles 0.1.0-beta.1 → 0.1.0-beta.11
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 +35 -42
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +43 -35
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +356 -301
- 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 +93 -103
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +152 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +242 -239
- 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 +69 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +132 -107
- package/src/combobox/combobox.tokens.json +1 -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 +210 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +148 -116
- 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 +55 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +40 -42
- package/src/date-range-picker/date-range-picker.css +114 -118
- package/src/datetime-field/datetime-field.css +78 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +61 -63
- package/src/datetime-range-picker/datetime-range-picker.css +149 -156
- package/src/description-list/description-list.css +61 -64
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +372 -153
- package/src/dialog/dialog.tokens.json +6 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +205 -210
- package/src/drawer/drawer.tokens.json +1 -0
- package/src/entity-picker/entity-picker.css +238 -241
- package/src/entity-picker/entity-picker.tokens.json +1 -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 +19 -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 +52 -28
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +30 -26
- package/src/link/link.css +15 -15
- 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 +83 -63
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +182 -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 +152 -145
- 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 +84 -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 +323 -283
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +40 -49
- package/src/progress-indicator/progress-indicator.css +177 -120
- package/src/progress-indicator/progress-indicator.tokens.json +1 -1
- package/src/prompt-composer/prompt-composer.css +221 -102
- 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 +161 -41
- package/src/section/section.tokens.json +7 -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 +118 -117
- package/src/select/select.tokens.json +1 -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 +341 -224
- package/src/stat-card/stat-card.tokens.json +3 -0
- package/src/status-indicator/status-indicator.css +28 -28
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +310 -165
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +51 -54
- package/src/tabs/tabs.css +337 -302
- package/src/tabs/tabs.tokens.json +8 -5
- package/src/tag/tag.css +79 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +145 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +132 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +31 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +72 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +56 -58
- package/src/time-range-picker/time-range-picker.css +126 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +108 -90
- 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 +26 -26
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +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
|
@@ -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
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
* begin from it — the arithmetic `text-field` records, holding at every step
|
|
70
70
|
* and every density.
|
|
71
71
|
*/
|
|
72
|
-
[data-ui
|
|
72
|
+
[data-ui-date-field][data-part-root]:has(> [data-part-clear]:last-child) {
|
|
73
73
|
padding-inline-end: max(
|
|
74
74
|
0px,
|
|
75
75
|
calc(var(--_padding-inline) - (var(--_action-size) - var(--_icon-size)) / 2)
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
* and puts the date at the reading edge, so an empty field and a full one
|
|
82
82
|
* start in the same place.
|
|
83
83
|
*/
|
|
84
|
-
[data-ui
|
|
84
|
+
[data-ui-date-field] [data-part-segments] {
|
|
85
85
|
align-items: center;
|
|
86
86
|
/**
|
|
87
87
|
* It says what it is before it is pressed. A date is typed, so the pointer
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
* `9` and one showing `09` therefore occupy the same column, and the two
|
|
117
117
|
* separators never step sideways under the pointer.
|
|
118
118
|
*/
|
|
119
|
-
[data-ui
|
|
119
|
+
[data-ui-date-field] [data-part-segment] {
|
|
120
120
|
--_digits: 2;
|
|
121
121
|
|
|
122
122
|
background-color: transparent;
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
-webkit-tap-highlight-color: transparent;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
[data-ui
|
|
151
|
+
[data-ui-date-field] [data-part-segment][data-field='year'] {
|
|
152
152
|
--_digits: 4;
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
* reader's own words rather than in English — and a date being typed has to
|
|
159
159
|
* keep saying what is still missing.
|
|
160
160
|
*/
|
|
161
|
-
[data-ui
|
|
161
|
+
[data-ui-date-field] [data-part-segment][data-placeholder] {
|
|
162
162
|
color: var(--slotted-date-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
* name already carries the whole date in words, so a screen reader reading
|
|
168
168
|
* "slash" between two numbers would be reading punctuation aloud.
|
|
169
169
|
*/
|
|
170
|
-
[data-ui
|
|
170
|
+
[data-ui-date-field] [data-part-literal] {
|
|
171
171
|
color: var(--slotted-date-field-literal-color, var(--slotted-text-muted, GrayText));
|
|
172
172
|
flex: 0 0 auto;
|
|
173
173
|
/* Its own bidi run: a slash between two numbers takes the paragraph's
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
* holding an `md` control is a field and a control disagreeing about one row.
|
|
183
183
|
*/
|
|
184
184
|
|
|
185
|
-
[data-ui
|
|
185
|
+
[data-ui-date-field][data-part-root][data-size='sm'] {
|
|
186
186
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
187
187
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
188
188
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
--_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-sm, 14px));
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
[data-ui
|
|
193
|
+
[data-ui-date-field][data-part-root][data-size='md'] {
|
|
194
194
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
195
195
|
--_height: var(--slotted-control-height-md, 34px);
|
|
196
196
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
--_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-md, 16px));
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
[data-ui
|
|
201
|
+
[data-ui-date-field][data-part-root][data-size='lg'] {
|
|
202
202
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
203
203
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
204
204
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
* shows one frame twice rather than two frames.
|
|
213
213
|
*/
|
|
214
214
|
|
|
215
|
-
[data-ui
|
|
215
|
+
[data-ui-date-field][data-part-root][data-variant='subtle'] {
|
|
216
216
|
background-color: var(
|
|
217
217
|
--slotted-date-field-subtle-background,
|
|
218
218
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
[data-ui
|
|
226
|
+
[data-ui-date-field][data-part-root][data-variant='plain'] {
|
|
227
227
|
background-color: transparent;
|
|
228
228
|
border-color: transparent;
|
|
229
229
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -236,8 +236,8 @@
|
|
|
236
236
|
* the value: an adornment annotates, and a reader looking for the date
|
|
237
237
|
* should not have to step over it.
|
|
238
238
|
*/
|
|
239
|
-
[data-ui
|
|
240
|
-
[data-ui
|
|
239
|
+
[data-ui-date-field] > [data-part-start],
|
|
240
|
+
[data-ui-date-field] > [data-part-end] {
|
|
241
241
|
--slotted-icon-size: var(--_icon-size);
|
|
242
242
|
|
|
243
243
|
align-items: center;
|
|
@@ -249,8 +249,8 @@
|
|
|
249
249
|
unicode-bidi: plaintext;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
[data-ui
|
|
253
|
-
[data-ui
|
|
252
|
+
[data-ui-date-field] > [data-part-start] > svg,
|
|
253
|
+
[data-ui-date-field] > [data-part-end] > svg {
|
|
254
254
|
block-size: var(--_icon-size);
|
|
255
255
|
inline-size: var(--_icon-size);
|
|
256
256
|
}
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
* character, and held to the target minimum by the family rather than by the
|
|
262
262
|
* page.
|
|
263
263
|
*/
|
|
264
|
-
[data-ui
|
|
264
|
+
[data-ui-date-field] > [data-part-clear] {
|
|
265
265
|
align-items: center;
|
|
266
266
|
appearance: none;
|
|
267
267
|
background-color: transparent;
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
* larger one alone, which is the correction `docs/token-foundation.md`
|
|
292
292
|
* leaves to the family rather than to the theme.
|
|
293
293
|
*/
|
|
294
|
-
[data-ui
|
|
294
|
+
[data-ui-date-field] > [data-part-clear]::after {
|
|
295
295
|
content: '';
|
|
296
296
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
297
297
|
position: absolute;
|
|
@@ -302,28 +302,28 @@
|
|
|
302
302
|
the hit area above grows to 44 pixels around them. After an end
|
|
303
303
|
adornment — a picker's trigger — it does not reach back across it. */
|
|
304
304
|
@media (pointer: coarse) {
|
|
305
|
-
[data-ui
|
|
305
|
+
[data-ui-date-field] > [data-part-clear]::after {
|
|
306
306
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
[data-ui
|
|
309
|
+
[data-ui-date-field] > [data-part-end] + [data-part-clear]::after {
|
|
310
310
|
inset-inline-start: 0;
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
/* The cross is drawn at the control's own icon step. */
|
|
315
|
-
[data-ui
|
|
315
|
+
[data-ui-date-field] > [data-part-clear] {
|
|
316
316
|
--slotted-icon-size: var(--_icon-size);
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
[data-ui
|
|
319
|
+
[data-ui-date-field] > [data-part-clear]:hover:not(:disabled):not([data-disabled]) {
|
|
320
320
|
background-color: var(
|
|
321
321
|
--slotted-date-field-action-hover-background,
|
|
322
322
|
var(--slotted-tone-secondary-subtle-hover)
|
|
323
323
|
);
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
[data-ui
|
|
326
|
+
[data-ui-date-field] > [data-part-clear]:active:not(:disabled):not([data-disabled]) {
|
|
327
327
|
background-color: var(
|
|
328
328
|
--slotted-date-field-action-active-background,
|
|
329
329
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
* and a ring around the whole frame would sit still while focus moved inside
|
|
337
337
|
* it.
|
|
338
338
|
*/
|
|
339
|
-
[data-ui
|
|
339
|
+
[data-ui-date-field] > [data-part-clear]:focus-visible {
|
|
340
340
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
341
341
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
342
342
|
}
|
|
@@ -347,13 +347,13 @@
|
|
|
347
347
|
* one it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
348
348
|
*/
|
|
349
349
|
|
|
350
|
-
[data-ui
|
|
350
|
+
[data-ui-date-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
351
351
|
[data-invalid]
|
|
352
352
|
) {
|
|
353
353
|
border-color: var(--slotted-date-field-hover-border-color, var(--slotted-tone-accent-border));
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
[data-ui
|
|
356
|
+
[data-ui-date-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
357
357
|
[data-readonly]
|
|
358
358
|
):not([data-invalid]) {
|
|
359
359
|
background-color: var(
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
);
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
[data-ui
|
|
365
|
+
[data-ui-date-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
366
366
|
[data-readonly]
|
|
367
367
|
):not([data-invalid]) {
|
|
368
368
|
background-color: var(
|
|
@@ -393,11 +393,11 @@
|
|
|
393
393
|
* `:focus-visible`, a clicked field answered a keystroke and looked exactly
|
|
394
394
|
* as it had before the press.
|
|
395
395
|
*/
|
|
396
|
-
[data-ui
|
|
396
|
+
[data-ui-date-field][data-part-root]:has([data-part-segment]:focus) {
|
|
397
397
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
398
398
|
var(--slotted-focus-ring-color, Highlight);
|
|
399
399
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
400
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
400
|
+
outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
|
|
401
401
|
}
|
|
402
402
|
|
|
403
403
|
/**
|
|
@@ -407,12 +407,12 @@
|
|
|
407
407
|
* shadow that appears only under focus is a cell that changes size when it
|
|
408
408
|
* is used.
|
|
409
409
|
*/
|
|
410
|
-
[data-ui
|
|
410
|
+
[data-ui-date-field][data-part-root][data-variant='plain']:has([data-part-segment]:focus) {
|
|
411
411
|
box-shadow: none;
|
|
412
412
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
[data-ui
|
|
415
|
+
[data-ui-date-field] [data-part-segment]:focus {
|
|
416
416
|
background-color: var(
|
|
417
417
|
--slotted-date-field-segment-focus-background,
|
|
418
418
|
var(--slotted-tone-accent-solid)
|
|
@@ -428,7 +428,7 @@
|
|
|
428
428
|
* ring is retargeted rather than repainted, so the frame's outline, the
|
|
429
429
|
* shadow under it and the ring on the clear button all move at once.
|
|
430
430
|
*/
|
|
431
|
-
[data-ui
|
|
431
|
+
[data-ui-date-field][data-part-root][data-invalid] {
|
|
432
432
|
--slotted-focus-ring-color: var(
|
|
433
433
|
--slotted-date-field-invalid-focus-ring-color,
|
|
434
434
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -453,15 +453,15 @@
|
|
|
453
453
|
box-shadow: var(--_invalid-edge);
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
[data-ui
|
|
456
|
+
[data-ui-date-field][data-part-root][data-invalid]:has([data-part-segment]:focus) {
|
|
457
457
|
box-shadow:
|
|
458
458
|
var(--_invalid-edge),
|
|
459
459
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
460
460
|
var(--slotted-focus-ring-color, Highlight);
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
[data-ui
|
|
464
|
-
[data-part
|
|
463
|
+
[data-ui-date-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
464
|
+
[data-part-segment]:focus
|
|
465
465
|
) {
|
|
466
466
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
467
467
|
it; the edge reaches past the ring. */
|
|
@@ -479,21 +479,24 @@
|
|
|
479
479
|
* control draws its ring double, which a valid ring is not.
|
|
480
480
|
*/
|
|
481
481
|
@media (forced-colors: active) {
|
|
482
|
-
[data-ui
|
|
482
|
+
[data-ui-date-field][data-part-root][data-invalid] {
|
|
483
483
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
484
484
|
outline-offset: calc(
|
|
485
485
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
486
486
|
);
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
-
[data-ui
|
|
489
|
+
[data-ui-date-field][data-part-root][data-invalid]:has([data-part-segment]:focus) {
|
|
490
490
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
491
491
|
var(--slotted-focus-ring-color, Highlight);
|
|
492
|
-
outline-offset: var(
|
|
492
|
+
outline-offset: var(
|
|
493
|
+
--slotted-control-focus-ring-offset,
|
|
494
|
+
var(--slotted-focus-ring-offset, 2px)
|
|
495
|
+
);
|
|
493
496
|
}
|
|
494
497
|
|
|
495
|
-
[data-ui
|
|
496
|
-
[data-part
|
|
498
|
+
[data-ui-date-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
499
|
+
[data-part-segment]:focus
|
|
497
500
|
) {
|
|
498
501
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
499
502
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -508,13 +511,13 @@
|
|
|
508
511
|
* mistakable for disabled: the value is still real and still submitted. The
|
|
509
512
|
* ground says "not yours to change" and the ink says nothing at all.
|
|
510
513
|
*/
|
|
511
|
-
[data-ui
|
|
512
|
-
[data-ui
|
|
513
|
-
[data-ui
|
|
514
|
+
[data-ui-date-field][data-part-root][data-readonly],
|
|
515
|
+
[data-ui-date-field][data-part-root][data-readonly] [data-part-segments],
|
|
516
|
+
[data-ui-date-field][data-part-root][data-readonly] [data-part-segment] {
|
|
514
517
|
cursor: default;
|
|
515
518
|
}
|
|
516
519
|
|
|
517
|
-
[data-ui
|
|
520
|
+
[data-ui-date-field][data-part-root][data-readonly] {
|
|
518
521
|
background-color: var(
|
|
519
522
|
--slotted-date-field-readonly-background,
|
|
520
523
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -526,7 +529,7 @@
|
|
|
526
529
|
* date nobody can read is a field nobody can check, and a disabled form
|
|
527
530
|
* still has to say what it holds.
|
|
528
531
|
*/
|
|
529
|
-
[data-ui
|
|
532
|
+
[data-ui-date-field][data-part-root][data-disabled] {
|
|
530
533
|
background-color: var(
|
|
531
534
|
--slotted-date-field-disabled-background,
|
|
532
535
|
var(--slotted-disabled-background)
|
|
@@ -538,22 +541,22 @@
|
|
|
538
541
|
cursor: not-allowed;
|
|
539
542
|
}
|
|
540
543
|
|
|
541
|
-
[data-ui
|
|
542
|
-
[data-ui
|
|
544
|
+
[data-ui-date-field][data-part-root][data-disabled] [data-part-segments],
|
|
545
|
+
[data-ui-date-field][data-part-root][data-disabled] [data-part-segment] {
|
|
543
546
|
cursor: not-allowed;
|
|
544
547
|
}
|
|
545
548
|
|
|
546
|
-
[data-ui
|
|
547
|
-
[data-ui
|
|
548
|
-
[data-ui
|
|
549
|
-
[data-ui
|
|
549
|
+
[data-ui-date-field][data-part-root][data-disabled] > [data-part-start],
|
|
550
|
+
[data-ui-date-field][data-part-root][data-disabled] > [data-part-end],
|
|
551
|
+
[data-ui-date-field][data-part-root][data-disabled] [data-part-literal],
|
|
552
|
+
[data-ui-date-field][data-part-root][data-disabled] [data-part-segment][data-placeholder] {
|
|
550
553
|
color: var(--slotted-disabled-foreground);
|
|
551
554
|
}
|
|
552
555
|
|
|
553
556
|
@media (forced-colors: active) {
|
|
554
557
|
/* A transparent border has no system colour to be remapped to, so the
|
|
555
558
|
`plain` control would lose its only edge where an edge matters most. */
|
|
556
|
-
[data-ui
|
|
559
|
+
[data-ui-date-field][data-part-root][data-variant='plain'] {
|
|
557
560
|
border-color: ButtonBorder;
|
|
558
561
|
}
|
|
559
562
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* trigger, and the layer the calendar stands on. A family that reached into
|
|
20
20
|
* another family's parts would be a second place to fix one defect.
|
|
21
21
|
*/
|
|
22
|
-
[data-ui
|
|
22
|
+
[data-ui-date-picker][data-part-root] {
|
|
23
23
|
display: block;
|
|
24
24
|
/* The anchor the positioner measures is the control, and a block root
|
|
25
25
|
lets the frame take the width the form gave it. */
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
* would then have to reach into another family's parts to suppress the first
|
|
36
36
|
* — which is the rule the whole family is built to keep.
|
|
37
37
|
*/
|
|
38
|
-
[data-ui
|
|
38
|
+
[data-ui-date-picker] [data-part-control] {
|
|
39
39
|
--_icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
40
40
|
--_height: var(--slotted-control-height-md, 34px);
|
|
41
41
|
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
position: relative;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
[data-ui
|
|
49
|
+
[data-ui-date-picker][data-part-root][data-size='sm'] [data-part-control] {
|
|
50
50
|
--_icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
51
51
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
[data-ui
|
|
54
|
+
[data-ui-date-picker][data-part-root][data-size='lg'] [data-part-control] {
|
|
55
55
|
--_icon-size: var(--slotted-control-icon-size-lg, 18px);
|
|
56
56
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
57
57
|
}
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
* `Alt`+`ArrowDown` into `PageDown` before the browser sees it, so the chord
|
|
66
66
|
* cannot be the only way in.
|
|
67
67
|
*/
|
|
68
|
-
[data-ui
|
|
68
|
+
[data-ui-date-picker] [data-part-trigger] {
|
|
69
69
|
--slotted-icon-size: var(--_icon-size);
|
|
70
70
|
|
|
71
71
|
align-items: center;
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
|
|
111
111
|
/* The hit area, recovered outside the paint, exactly as every other inner
|
|
112
112
|
control in the library recovers it. */
|
|
113
|
-
[data-ui
|
|
113
|
+
[data-ui-date-picker] [data-part-trigger]::after {
|
|
114
114
|
content: '';
|
|
115
115
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
116
116
|
position: absolute;
|
|
@@ -121,13 +121,13 @@
|
|
|
121
121
|
the hit area above grows to 44 pixels around them. Before the field's
|
|
122
122
|
clear it does not reach across it. */
|
|
123
123
|
@media (pointer: coarse) {
|
|
124
|
-
[data-ui
|
|
124
|
+
[data-ui-date-picker] [data-part-trigger]::after {
|
|
125
125
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
[data-ui
|
|
129
|
-
[data-part
|
|
130
|
-
> [data-part
|
|
128
|
+
[data-ui-date-picker]
|
|
129
|
+
[data-part-end]:has(+ [data-part-clear]:not([hidden]))
|
|
130
|
+
> [data-part-trigger]::after {
|
|
131
131
|
inset-inline-end: 0;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -142,14 +142,14 @@
|
|
|
142
142
|
* that never changes.
|
|
143
143
|
*/
|
|
144
144
|
|
|
145
|
-
[data-ui
|
|
145
|
+
[data-ui-date-picker] [data-part-trigger]:hover:not(:disabled):not([data-disabled]) {
|
|
146
146
|
background-color: var(
|
|
147
147
|
--slotted-date-picker-trigger-hover-background,
|
|
148
148
|
var(--slotted-tone-secondary-subtle-hover)
|
|
149
149
|
);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
[data-ui
|
|
152
|
+
[data-ui-date-picker] [data-part-trigger]:active:not(:disabled):not([data-disabled]) {
|
|
153
153
|
background-color: var(
|
|
154
154
|
--slotted-date-picker-trigger-active-background,
|
|
155
155
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -158,19 +158,19 @@
|
|
|
158
158
|
|
|
159
159
|
/* Its own ring: tabbing from the last segment to the trigger has to move
|
|
160
160
|
something visible, and the frame's ring would sit still. */
|
|
161
|
-
[data-ui
|
|
161
|
+
[data-ui-date-picker] [data-part-trigger]:focus-visible {
|
|
162
162
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
163
163
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
[data-ui
|
|
166
|
+
[data-ui-date-picker][data-part-root][data-invalid] {
|
|
167
167
|
--slotted-focus-ring-color: var(
|
|
168
168
|
--slotted-date-picker-invalid-focus-ring-color,
|
|
169
169
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
170
170
|
);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
[data-ui
|
|
173
|
+
[data-ui-date-picker] [data-part-trigger]:disabled {
|
|
174
174
|
color: var(--slotted-disabled-foreground);
|
|
175
175
|
cursor: not-allowed;
|
|
176
176
|
}
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
* onto. The painted surface is one element in, as `tooltip`, `popover`,
|
|
182
182
|
* `menu` and `select` are all built.
|
|
183
183
|
*/
|
|
184
|
-
[data-ui
|
|
184
|
+
[data-ui-date-picker][data-part-positioner] {
|
|
185
185
|
/* Only the block inset: the positioner writes `left` and never `right`,
|
|
186
186
|
and `inset-inline-start` would resolve to `right` in a right-to-left
|
|
187
187
|
document and win over the measured value. */
|
|
@@ -207,16 +207,16 @@
|
|
|
207
207
|
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
[data-ui
|
|
210
|
+
[data-ui-date-picker][data-part-positioner][data-side='top'] {
|
|
211
211
|
translate: 0 var(--_enter-distance);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
/* A lateral side has no block direction to arrive from, so it only fades. */
|
|
215
|
-
[data-ui
|
|
215
|
+
[data-ui-date-picker][data-part-positioner]:is([data-side='left'], [data-side='right']) {
|
|
216
216
|
translate: 0 0;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
[data-ui
|
|
219
|
+
[data-ui-date-picker][data-part-positioner][data-open] {
|
|
220
220
|
opacity: 1;
|
|
221
221
|
translate: 0 0;
|
|
222
222
|
transition: none;
|
|
@@ -232,16 +232,16 @@
|
|
|
232
232
|
* markup — the harness, a docs snippet — is simply there, and is
|
|
233
233
|
* photographed where it stands.
|
|
234
234
|
*/
|
|
235
|
-
[data-ui
|
|
235
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned] {
|
|
236
236
|
animation: slotted-date-picker-enter-down var(--slotted-duration-medium)
|
|
237
237
|
var(--slotted-easing-enter);
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
[data-ui
|
|
240
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned][data-side='top'] {
|
|
241
241
|
animation-name: slotted-date-picker-enter-up;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
[data-ui
|
|
244
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned]:is(
|
|
245
245
|
[data-side='left'],
|
|
246
246
|
[data-side='right']
|
|
247
247
|
) {
|
|
@@ -270,25 +270,25 @@
|
|
|
270
270
|
|
|
271
271
|
/* Stillness keeps the fade and drops the movement. */
|
|
272
272
|
@media (prefers-reduced-motion: reduce) {
|
|
273
|
-
[data-ui
|
|
274
|
-
[data-ui
|
|
275
|
-
[data-ui
|
|
276
|
-
[data-ui
|
|
273
|
+
[data-ui-date-picker][data-part-positioner],
|
|
274
|
+
[data-ui-date-picker][data-part-positioner][data-side='top'],
|
|
275
|
+
[data-ui-date-picker][data-part-positioner][data-side='left'],
|
|
276
|
+
[data-ui-date-picker][data-part-positioner][data-side='right'] {
|
|
277
277
|
translate: 0 0;
|
|
278
278
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
[data-ui
|
|
282
|
-
[data-ui
|
|
283
|
-
[data-ui
|
|
284
|
-
[data-ui
|
|
281
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned],
|
|
282
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned][data-side='top'],
|
|
283
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned][data-side='left'],
|
|
284
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned][data-side='right'] {
|
|
285
285
|
animation-name: slotted-date-picker-fade;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
/* The anchor scrolled out of its own clipper. The calendar is still open and
|
|
290
290
|
still belongs to a control the reader can no longer see. */
|
|
291
|
-
[data-ui
|
|
291
|
+
[data-ui-date-picker][data-part-positioner][data-detached] {
|
|
292
292
|
visibility: hidden;
|
|
293
293
|
}
|
|
294
294
|
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
* wide as the form, and forcing one to the other would either crush the grid
|
|
299
299
|
* or stretch it.
|
|
300
300
|
*/
|
|
301
|
-
[data-ui
|
|
301
|
+
[data-ui-date-picker] [data-part-content] {
|
|
302
302
|
background-color: var(--slotted-date-picker-surface, var(--slotted-surface-raised, Canvas));
|
|
303
303
|
border: var(--slotted-border-width-thin, 1px) solid
|
|
304
304
|
var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
@@ -327,12 +327,12 @@
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
/* The shortcuts take a column of their own only when there are any. */
|
|
330
|
-
[data-ui
|
|
330
|
+
[data-ui-date-picker] [data-part-content]:has([data-part-presets]) {
|
|
331
331
|
grid-template-areas: 'presets calendar' 'footer footer';
|
|
332
332
|
grid-template-columns: auto auto;
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
[data-ui
|
|
335
|
+
[data-ui-date-picker] [data-part-content] > [data-ui-calendar] {
|
|
336
336
|
grid-area: calendar;
|
|
337
337
|
}
|
|
338
338
|
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
* days" is a business calendar and a library that guessed at one would be
|
|
342
342
|
* guessing at a fiscal year. What it ships is the column they stand in.
|
|
343
343
|
*/
|
|
344
|
-
[data-ui
|
|
344
|
+
[data-ui-date-picker] [data-part-presets] {
|
|
345
345
|
/* A list of shortcuts reads from the start edge. Stretched, each button
|
|
346
346
|
centred its own label and the four labels formed a ragged column with
|
|
347
347
|
no left edge to run down. */
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
padding-inline-end: var(--slotted-space-5, 0.75rem);
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
[data-ui
|
|
358
|
+
[data-ui-date-picker] [data-part-footer] {
|
|
359
359
|
align-items: center;
|
|
360
360
|
border-block-start: var(--slotted-border-width-thin, 1px) solid
|
|
361
361
|
var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
@@ -377,7 +377,7 @@
|
|
|
377
377
|
* ask, and the question really is how much screen there is.
|
|
378
378
|
*/
|
|
379
379
|
@media (max-width: 480px) and (pointer: coarse) {
|
|
380
|
-
[data-ui
|
|
380
|
+
[data-ui-date-picker][data-part-positioner][data-presentation='sheet'] {
|
|
381
381
|
/* The positioner's own measurement is overridden here on purpose: a
|
|
382
382
|
sheet is not placed against an anchor, it is placed against the
|
|
383
383
|
screen. */
|
|
@@ -388,12 +388,11 @@
|
|
|
388
388
|
translate: 0 var(--slotted-space-9, 2rem);
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
[data-ui
|
|
391
|
+
[data-ui-date-picker][data-part-positioner][data-presentation='sheet'][data-open] {
|
|
392
392
|
translate: 0 0;
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
-
[data-ui
|
|
396
|
-
[data-part='content'] {
|
|
395
|
+
[data-ui-date-picker][data-part-positioner][data-presentation='sheet'] [data-part-content] {
|
|
397
396
|
border-end-end-radius: 0;
|
|
398
397
|
border-end-start-radius: 0;
|
|
399
398
|
border-inline: 0;
|
|
@@ -404,8 +403,7 @@
|
|
|
404
403
|
justify-content: center;
|
|
405
404
|
}
|
|
406
405
|
|
|
407
|
-
[data-ui
|
|
408
|
-
[data-part='presets'] {
|
|
406
|
+
[data-ui-date-picker][data-part-positioner][data-presentation='sheet'] [data-part-presets] {
|
|
409
407
|
/* Beside the grid there is no room for a column of shortcuts, so they
|
|
410
408
|
become a row above it and keep their labels. */
|
|
411
409
|
border-inline-end: 0;
|