@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40
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 +21 -1
- package/src/accordion/accordion.css +31 -13
- package/src/accordion/accordion.tokens.json +2 -0
- 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 +472 -342
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +24 -23
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +97 -67
- package/src/avatar/avatar.tokens.json +8 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +58 -47
- package/src/badge/badge.tokens.json +6 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +408 -93
- package/src/button/button.tokens.json +13 -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 +594 -267
- package/src/calendar/calendar.tokens.json +35 -3
- package/src/card/card.css +133 -70
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +174 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +300 -271
- package/src/chart/chart.tokens.json +5 -0
- package/src/checkbox/checkbox.css +190 -148
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +273 -85
- package/src/collapsible/collapsible.tokens.json +6 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +219 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +214 -102
- package/src/command-palette/command-palette.tokens.json +4 -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 +231 -115
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +637 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +93 -76
- 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 +31 -269
- package/src/date-picker/date-picker.tokens.json +1 -21
- package/src/date-range-picker/date-range-picker.css +72 -528
- package/src/date-range-picker/date-range-picker.tokens.json +1 -37
- 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 +49 -711
- package/src/datetime-picker/datetime-picker.tokens.json +1 -50
- package/src/datetime-range-picker/datetime-range-picker.css +60 -985
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
- package/src/description-list/description-list.css +120 -76
- 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 +462 -199
- package/src/dialog/dialog.tokens.json +10 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +736 -237
- package/src/drawer/drawer.tokens.json +15 -0
- package/src/entity-picker/entity-picker.css +402 -272
- package/src/entity-picker/entity-picker.tokens.json +6 -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 +58 -38
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +224 -216
- package/src/floating-panel/floating-panel.css +147 -0
- package/src/floating-panel/floating-panel.tokens.json +32 -0
- package/src/form/form.css +103 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +32 -31
- 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 +29 -29
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +5 -0
- package/src/kbd/kbd.css +63 -51
- package/src/kbd/kbd.tokens.json +4 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +55 -24
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +195 -80
- package/src/list-item/list-item.tokens.json +10 -0
- package/src/listbox/listbox.css +121 -72
- package/src/listbox/listbox.tokens.json +6 -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 +1296 -1243
- package/src/message/message.tokens.json +14 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +246 -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 +109 -31
- package/src/page/page.tokens.json +8 -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/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +194 -137
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +274 -116
- 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 +147 -143
- package/src/rating/rating.tokens.json +2 -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 +44 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +311 -46
- package/src/section/section.tokens.json +13 -1
- package/src/segmented-control/segmented-control.css +221 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +226 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +204 -201
- package/src/side-navigation/side-navigation.tokens.json +2 -0
- package/src/skeleton/skeleton.css +76 -58
- package/src/slider/slider.css +108 -104
- package/src/slider/slider.tokens.json +1 -0
- 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 +26 -26
- package/src/stat-card/stat-card.css +420 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +126 -101
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +143 -125
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +653 -222
- package/src/table/table.tokens.json +10 -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 +113 -89
- package/src/tag/tag.tokens.json +11 -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 +30 -519
- package/src/time-picker/time-picker.tokens.json +1 -38
- package/src/time-range-picker/time-range-picker.css +53 -895
- package/src/time-range-picker/time-range-picker.tokens.json +1 -66
- 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 +49 -40
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +95 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +253 -269
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- 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 +118 -122
- package/src/typography/typography.css +67 -38
- package/src/typography/typography.tokens.json +2 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
|
@@ -9,17 +9,11 @@
|
|
|
9
9
|
* │ │ └────────────┘ └────────────┘ └───────┘ └─────────┘ │ │
|
|
10
10
|
* │ └────────────────────────────────────────────────────────────────┘ │
|
|
11
11
|
* └─────────────────────────────────────────────────────────────────────┘
|
|
12
|
-
*
|
|
13
|
-
* │ ┌─ content ─ the surface ─────────────────────────────┐ │
|
|
14
|
-
* │ │ head: start – end · length · limit │ │
|
|
15
|
-
* │ │ presets │ calendar │ │
|
|
16
|
-
* │ │ footer │ │
|
|
17
|
-
* │ └─────────────────────────────────────────────────────┘ │
|
|
18
|
-
* └───────────────────────────────────────────────────────────┘
|
|
12
|
+
* the panel is `picker-panel`'s, and the months in it `calendar`'s
|
|
19
13
|
*
|
|
20
|
-
* The
|
|
21
|
-
*
|
|
22
|
-
*
|
|
14
|
+
* The families inside keep their own `data-ui`. Nothing here selects a segment
|
|
15
|
+
* or a day: this stylesheet owns the frame, the separator and the two buttons
|
|
16
|
+
* in it.
|
|
23
17
|
*
|
|
24
18
|
* **The frame speaks to the two fields through their tokens and never
|
|
25
19
|
* through their parts.** A `date-field` in `variant="plain"` still draws its
|
|
@@ -29,8 +23,10 @@
|
|
|
29
23
|
* by restating the custom property the field reads, so the frame is the one
|
|
30
24
|
* box a reader sees and the field's stylesheet is not reached into.
|
|
31
25
|
*/
|
|
32
|
-
[data-ui
|
|
26
|
+
[data-ui-date-range-picker][data-part-root] {
|
|
33
27
|
display: block;
|
|
28
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
29
|
+
flex-basis: content;
|
|
34
30
|
/* The anchor the positioner measures is the control, and a block root
|
|
35
31
|
lets the frame take the width the form gave it. */
|
|
36
32
|
inline-size: 100%;
|
|
@@ -43,7 +39,7 @@
|
|
|
43
39
|
* tokens for the ground, so a form holding a date and a range shows one
|
|
44
40
|
* frame twice rather than two frames.
|
|
45
41
|
*/
|
|
46
|
-
[data-ui
|
|
42
|
+
[data-ui-date-range-picker] [data-part-control] {
|
|
47
43
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
48
44
|
--_height: var(--slotted-control-height-md, 34px);
|
|
49
45
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -109,7 +105,7 @@
|
|
|
109
105
|
* an in-flow trigger was the first thing to be pushed, and the guaranteed
|
|
110
106
|
* way in was the first thing lost.
|
|
111
107
|
*/
|
|
112
|
-
[data-ui
|
|
108
|
+
[data-ui-date-range-picker] [data-part-control] {
|
|
113
109
|
--_action-inset: max(
|
|
114
110
|
0px,
|
|
115
111
|
calc(var(--_padding-inline) - (var(--_action-size) - var(--_icon-size)) / 2)
|
|
@@ -122,11 +118,11 @@
|
|
|
122
118
|
);
|
|
123
119
|
}
|
|
124
120
|
|
|
125
|
-
[data-ui
|
|
121
|
+
[data-ui-date-range-picker] [data-part-control]:has(> [data-part-clear]) {
|
|
126
122
|
--_actions: 2;
|
|
127
123
|
}
|
|
128
124
|
|
|
129
|
-
[data-ui
|
|
125
|
+
[data-ui-date-range-picker][data-part-root][data-size='sm'] [data-part-control] {
|
|
130
126
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
131
127
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
132
128
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 11px);
|
|
@@ -134,7 +130,7 @@
|
|
|
134
130
|
--_icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
135
131
|
}
|
|
136
132
|
|
|
137
|
-
[data-ui
|
|
133
|
+
[data-ui-date-range-picker][data-part-root][data-size='lg'] [data-part-control] {
|
|
138
134
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
139
135
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
140
136
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 15px);
|
|
@@ -147,7 +143,7 @@
|
|
|
147
143
|
* The three steps `text-field` set, through the field's own variant tokens,
|
|
148
144
|
* so a theme that retunes `subtle` for one date retunes it for two.
|
|
149
145
|
*/
|
|
150
|
-
[data-ui
|
|
146
|
+
[data-ui-date-range-picker][data-part-root][data-variant='subtle'] [data-part-control] {
|
|
151
147
|
background-color: var(
|
|
152
148
|
--slotted-date-range-picker-subtle-background,
|
|
153
149
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -158,7 +154,7 @@
|
|
|
158
154
|
);
|
|
159
155
|
}
|
|
160
156
|
|
|
161
|
-
[data-ui
|
|
157
|
+
[data-ui-date-range-picker][data-part-root][data-variant='plain'] [data-part-control] {
|
|
162
158
|
background-color: transparent;
|
|
163
159
|
border-color: transparent;
|
|
164
160
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -172,8 +168,8 @@
|
|
|
172
168
|
* field's border, inline padding, hover wash, invalid edge and focus ring
|
|
173
169
|
* are all zeroed here, and the frame answers each of them once for both.
|
|
174
170
|
*/
|
|
175
|
-
[data-ui
|
|
176
|
-
[data-ui
|
|
171
|
+
[data-ui-date-range-picker] [data-part-start],
|
|
172
|
+
[data-ui-date-range-picker] [data-part-end] {
|
|
177
173
|
--slotted-control-border-width: 0px;
|
|
178
174
|
--slotted-control-padding-inline-sm: 0px;
|
|
179
175
|
--slotted-control-padding-inline-md: 0px;
|
|
@@ -200,8 +196,8 @@
|
|
|
200
196
|
* the reader is in the control — the panel open, or focus inside the frame —
|
|
201
197
|
* because at rest there is no "next press" for it to name.
|
|
202
198
|
*/
|
|
203
|
-
[data-ui
|
|
204
|
-
[data-ui
|
|
199
|
+
[data-ui-date-range-picker] [data-part-start]::after,
|
|
200
|
+
[data-ui-date-range-picker] [data-part-end]::after {
|
|
205
201
|
background-color: var(
|
|
206
202
|
--slotted-date-range-picker-current-color,
|
|
207
203
|
var(--slotted-tone-accent-solid)
|
|
@@ -218,17 +214,17 @@
|
|
|
218
214
|
var(--slotted-control-transition-easing);
|
|
219
215
|
}
|
|
220
216
|
|
|
221
|
-
[data-ui
|
|
217
|
+
[data-ui-date-range-picker][data-part-root]:is(
|
|
222
218
|
[data-open],
|
|
223
|
-
:has([data-part
|
|
219
|
+
:has([data-part-control]:focus-within)
|
|
224
220
|
)
|
|
225
|
-
:is([data-part
|
|
221
|
+
:is([data-part-start], [data-part-end])[data-current]::after {
|
|
226
222
|
opacity: 1;
|
|
227
223
|
}
|
|
228
224
|
|
|
229
225
|
/* A dash between the two ends, in the adornment's ink: it annotates, and a
|
|
230
226
|
reader looking for either date should not have to step over it. */
|
|
231
|
-
[data-ui
|
|
227
|
+
[data-ui-date-range-picker] [data-part-separator] {
|
|
232
228
|
color: var(--slotted-date-range-picker-separator-color, var(--slotted-text-muted, GrayText));
|
|
233
229
|
flex: 0 0 auto;
|
|
234
230
|
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
@@ -241,8 +237,8 @@
|
|
|
241
237
|
* trigger is always drawn: ChromeOS turns `Alt`+`ArrowDown` into `PageDown`
|
|
242
238
|
* before the browser sees it, so the chord cannot be the only way in.
|
|
243
239
|
*/
|
|
244
|
-
[data-ui
|
|
245
|
-
[data-ui
|
|
240
|
+
[data-ui-date-range-picker] [data-part-clear],
|
|
241
|
+
[data-ui-date-range-picker] [data-part-trigger] {
|
|
246
242
|
--slotted-icon-size: var(--_icon-size);
|
|
247
243
|
|
|
248
244
|
align-items: center;
|
|
@@ -256,7 +252,7 @@
|
|
|
256
252
|
display: inline-flex;
|
|
257
253
|
flex: 0 0 auto;
|
|
258
254
|
inline-size: var(--_action-size);
|
|
259
|
-
/*
|
|
255
|
+
/* Centerd on the first line of the frame, whichever line the end is on. */
|
|
260
256
|
inset-block-start: calc((var(--_height) - var(--_border-width) * 2 - var(--_action-size)) / 2);
|
|
261
257
|
inset-inline-end: var(--_action-inset);
|
|
262
258
|
justify-content: center;
|
|
@@ -270,7 +266,7 @@
|
|
|
270
266
|
-webkit-tap-highlight-color: transparent;
|
|
271
267
|
}
|
|
272
268
|
|
|
273
|
-
[data-ui
|
|
269
|
+
[data-ui-date-range-picker] [data-part-clear] {
|
|
274
270
|
inset-inline-end: calc(
|
|
275
271
|
var(--_action-inset) + var(--_action-size) + var(--slotted-space-1, 0.125rem)
|
|
276
272
|
);
|
|
@@ -278,8 +274,8 @@
|
|
|
278
274
|
|
|
279
275
|
/* The hit area, recovered outside the paint, exactly as every other inner
|
|
280
276
|
control in the library recovers it. */
|
|
281
|
-
[data-ui
|
|
282
|
-
[data-ui
|
|
277
|
+
[data-ui-date-range-picker] [data-part-clear]::after,
|
|
278
|
+
[data-ui-date-range-picker] [data-part-trigger]::after {
|
|
283
279
|
content: '';
|
|
284
280
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
285
281
|
position: absolute;
|
|
@@ -290,16 +286,15 @@
|
|
|
290
286
|
the hit area above grows to 44 pixels around them. Side by side, neither
|
|
291
287
|
button reaches across the edge the two share. */
|
|
292
288
|
@media (pointer: coarse) {
|
|
293
|
-
[data-ui
|
|
289
|
+
[data-ui-date-range-picker] :is([data-part-clear], [data-part-trigger])::after {
|
|
294
290
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
295
291
|
}
|
|
296
292
|
|
|
297
|
-
[data-ui
|
|
298
|
-
[data-part='clear']:has(+ [data-part='trigger']:not([hidden]))::after {
|
|
293
|
+
[data-ui-date-range-picker] [data-part-clear]:has(+ [data-part-trigger]:not([hidden]))::after {
|
|
299
294
|
inset-inline-end: 0;
|
|
300
295
|
}
|
|
301
296
|
|
|
302
|
-
[data-ui
|
|
297
|
+
[data-ui-date-range-picker] [data-part-clear]:not([hidden]) + [data-part-trigger]::after {
|
|
303
298
|
inset-inline-start: 0;
|
|
304
299
|
}
|
|
305
300
|
}
|
|
@@ -309,16 +304,16 @@
|
|
|
309
304
|
chevron while the surface is open: what opens is a month, not a list, and
|
|
310
305
|
the trigger goes on saying what kind of value it holds. */
|
|
311
306
|
|
|
312
|
-
[data-ui
|
|
313
|
-
[data-ui
|
|
307
|
+
[data-ui-date-range-picker] [data-part-clear]:hover:not(:disabled):not([data-disabled]),
|
|
308
|
+
[data-ui-date-range-picker] [data-part-trigger]:hover:not(:disabled):not([data-disabled]) {
|
|
314
309
|
background-color: var(
|
|
315
310
|
--slotted-date-range-picker-action-hover-background,
|
|
316
311
|
var(--slotted-tone-secondary-subtle-hover)
|
|
317
312
|
);
|
|
318
313
|
}
|
|
319
314
|
|
|
320
|
-
[data-ui
|
|
321
|
-
[data-ui
|
|
315
|
+
[data-ui-date-range-picker] [data-part-clear]:active:not(:disabled):not([data-disabled]),
|
|
316
|
+
[data-ui-date-range-picker] [data-part-trigger]:active:not(:disabled):not([data-disabled]) {
|
|
322
317
|
background-color: var(
|
|
323
318
|
--slotted-date-range-picker-action-active-background,
|
|
324
319
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -327,14 +322,14 @@
|
|
|
327
322
|
|
|
328
323
|
/* Their own rings: tabbing from the last segment to a button has to move
|
|
329
324
|
something visible, and the frame's ring would sit still. */
|
|
330
|
-
[data-ui
|
|
331
|
-
[data-ui
|
|
325
|
+
[data-ui-date-range-picker] [data-part-clear]:focus-visible,
|
|
326
|
+
[data-ui-date-range-picker] [data-part-trigger]:focus-visible {
|
|
332
327
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
333
328
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
334
329
|
}
|
|
335
330
|
|
|
336
|
-
[data-ui
|
|
337
|
-
[data-ui
|
|
331
|
+
[data-ui-date-range-picker] [data-part-clear]:disabled,
|
|
332
|
+
[data-ui-date-range-picker] [data-part-trigger]:disabled {
|
|
338
333
|
color: var(--slotted-disabled-foreground);
|
|
339
334
|
cursor: not-allowed;
|
|
340
335
|
}
|
|
@@ -345,30 +340,30 @@
|
|
|
345
340
|
* one it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
346
341
|
*/
|
|
347
342
|
|
|
348
|
-
[data-ui
|
|
343
|
+
[data-ui-date-range-picker][data-part-root]:not([data-disabled]):not([data-readonly]):not(
|
|
349
344
|
[data-invalid]
|
|
350
345
|
)
|
|
351
|
-
[data-part
|
|
346
|
+
[data-part-control]:hover {
|
|
352
347
|
border-color: var(
|
|
353
348
|
--slotted-date-range-picker-hover-border-color,
|
|
354
349
|
var(--slotted-tone-accent-border)
|
|
355
350
|
);
|
|
356
351
|
}
|
|
357
352
|
|
|
358
|
-
[data-ui
|
|
353
|
+
[data-ui-date-range-picker][data-part-root][data-variant='subtle']:not([data-disabled]):not(
|
|
359
354
|
[data-readonly]
|
|
360
355
|
):not([data-invalid])
|
|
361
|
-
[data-part
|
|
356
|
+
[data-part-control]:hover {
|
|
362
357
|
background-color: var(
|
|
363
358
|
--slotted-date-range-picker-subtle-hover-background,
|
|
364
359
|
var(--slotted-tone-secondary-subtle-hover)
|
|
365
360
|
);
|
|
366
361
|
}
|
|
367
362
|
|
|
368
|
-
[data-ui
|
|
363
|
+
[data-ui-date-range-picker][data-part-root][data-variant='plain']:not([data-disabled]):not(
|
|
369
364
|
[data-readonly]
|
|
370
365
|
):not([data-invalid])
|
|
371
|
-
[data-part
|
|
366
|
+
[data-part-control]:hover {
|
|
372
367
|
background-color: var(
|
|
373
368
|
--slotted-date-range-picker-plain-hover-background,
|
|
374
369
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -386,9 +381,9 @@
|
|
|
386
381
|
* records: every part of a segmented field is a `div`, and a browser refuses
|
|
387
382
|
* `:focus-visible` on a `div` a pointer focused.
|
|
388
383
|
*/
|
|
389
|
-
[data-ui
|
|
390
|
-
[data-part
|
|
391
|
-
:has(> [data-part
|
|
384
|
+
[data-ui-date-range-picker]
|
|
385
|
+
[data-part-control]:focus-within:not(
|
|
386
|
+
:has(> [data-part-clear]:focus, > [data-part-trigger]:focus)
|
|
392
387
|
) {
|
|
393
388
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
394
389
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -403,9 +398,9 @@
|
|
|
403
398
|
* shadow that appears only under focus is a cell that changes size when it
|
|
404
399
|
* is used.
|
|
405
400
|
*/
|
|
406
|
-
[data-ui
|
|
407
|
-
[data-part
|
|
408
|
-
:has(> [data-part
|
|
401
|
+
[data-ui-date-range-picker][data-part-root][data-variant='plain']
|
|
402
|
+
[data-part-control]:focus-within:not(
|
|
403
|
+
:has(> [data-part-clear]:focus, > [data-part-trigger]:focus)
|
|
409
404
|
) {
|
|
410
405
|
box-shadow: none;
|
|
411
406
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
@@ -414,14 +409,14 @@
|
|
|
414
409
|
/* Invalid outranks hover and is written after it. The ring is retargeted
|
|
415
410
|
rather than repainted, so the frame's outline and the ring on the two
|
|
416
411
|
buttons all move at once. */
|
|
417
|
-
[data-ui
|
|
412
|
+
[data-ui-date-range-picker][data-part-root][data-invalid] {
|
|
418
413
|
--slotted-focus-ring-color: var(
|
|
419
414
|
--slotted-date-range-picker-invalid-focus-ring-color,
|
|
420
415
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
421
416
|
);
|
|
422
417
|
}
|
|
423
418
|
|
|
424
|
-
[data-ui
|
|
419
|
+
[data-ui-date-range-picker][data-part-root][data-invalid] [data-part-control] {
|
|
425
420
|
--_invalid-edge-width: var(
|
|
426
421
|
--slotted-date-range-picker-invalid-edge-width,
|
|
427
422
|
var(--slotted-control-invalid-edge-width, 1px)
|
|
@@ -437,7 +432,7 @@
|
|
|
437
432
|
var(--slotted-tone-danger-border)
|
|
438
433
|
);
|
|
439
434
|
/*
|
|
440
|
-
* Width as well as
|
|
435
|
+
* Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
|
|
441
436
|
* `high-contrast` the danger border is the resting edge's black. The line
|
|
442
437
|
* is a shadow inside the border, so neither box nor text moves, and it
|
|
443
438
|
* takes the resting lift's place.
|
|
@@ -445,9 +440,9 @@
|
|
|
445
440
|
box-shadow: var(--_invalid-edge);
|
|
446
441
|
}
|
|
447
442
|
|
|
448
|
-
[data-ui
|
|
449
|
-
[data-part
|
|
450
|
-
:has(> [data-part
|
|
443
|
+
[data-ui-date-range-picker][data-invalid]
|
|
444
|
+
[data-part-control]:focus-within:not(
|
|
445
|
+
:has(> [data-part-clear]:focus, > [data-part-trigger]:focus)
|
|
451
446
|
) {
|
|
452
447
|
box-shadow:
|
|
453
448
|
var(--_invalid-edge),
|
|
@@ -455,9 +450,9 @@
|
|
|
455
450
|
var(--slotted-focus-ring-color, Highlight);
|
|
456
451
|
}
|
|
457
452
|
|
|
458
|
-
[data-ui
|
|
459
|
-
[data-part
|
|
460
|
-
:has(> [data-part
|
|
453
|
+
[data-ui-date-range-picker][data-part-root][data-variant='plain'][data-invalid]
|
|
454
|
+
[data-part-control]:focus-within:not(
|
|
455
|
+
:has(> [data-part-clear]:focus, > [data-part-trigger]:focus)
|
|
461
456
|
) {
|
|
462
457
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
463
458
|
it; the edge reaches past the ring. */
|
|
@@ -469,28 +464,28 @@
|
|
|
469
464
|
}
|
|
470
465
|
|
|
471
466
|
/*
|
|
472
|
-
* Forced
|
|
467
|
+
* Forced colors remove every box shadow, and the edge with them. The
|
|
473
468
|
* width comes back as an outline inside the border, and a focused invalid
|
|
474
469
|
* control draws its ring double, which a valid ring is not.
|
|
475
470
|
*/
|
|
476
471
|
@media (forced-colors: active) {
|
|
477
|
-
[data-ui
|
|
472
|
+
[data-ui-date-range-picker][data-part-root][data-invalid] [data-part-control] {
|
|
478
473
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
479
474
|
outline-offset: calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)));
|
|
480
475
|
}
|
|
481
476
|
|
|
482
|
-
[data-ui
|
|
483
|
-
[data-part
|
|
484
|
-
:has(> [data-part
|
|
477
|
+
[data-ui-date-range-picker][data-invalid]
|
|
478
|
+
[data-part-control]:focus-within:not(
|
|
479
|
+
:has(> [data-part-clear]:focus, > [data-part-trigger]:focus)
|
|
485
480
|
) {
|
|
486
481
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
487
482
|
var(--slotted-focus-ring-color, Highlight);
|
|
488
483
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
489
484
|
}
|
|
490
485
|
|
|
491
|
-
[data-ui
|
|
492
|
-
[data-part
|
|
493
|
-
:has(> [data-part
|
|
486
|
+
[data-ui-date-range-picker][data-part-root][data-variant='plain'][data-invalid]
|
|
487
|
+
[data-part-control]:focus-within:not(
|
|
488
|
+
:has(> [data-part-clear]:focus, > [data-part-trigger]:focus)
|
|
494
489
|
) {
|
|
495
490
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
496
491
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -502,7 +497,7 @@
|
|
|
502
497
|
|
|
503
498
|
/* Read-only stays focusable, readable and copyable, and must not be
|
|
504
499
|
mistakable for disabled: the ground says "not yours to change". */
|
|
505
|
-
[data-ui
|
|
500
|
+
[data-ui-date-range-picker][data-part-root][data-readonly] [data-part-control] {
|
|
506
501
|
background-color: var(
|
|
507
502
|
--slotted-date-range-picker-readonly-background,
|
|
508
503
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -510,9 +505,9 @@
|
|
|
510
505
|
cursor: default;
|
|
511
506
|
}
|
|
512
507
|
|
|
513
|
-
/* Muted to the
|
|
508
|
+
/* Muted to the color the theme measures rather than faded by opacity: a
|
|
514
509
|
disabled form still has to say what it holds. */
|
|
515
|
-
[data-ui
|
|
510
|
+
[data-ui-date-range-picker][data-part-root][data-disabled] [data-part-control] {
|
|
516
511
|
background-color: var(
|
|
517
512
|
--slotted-date-range-picker-disabled-background,
|
|
518
513
|
var(--slotted-disabled-background)
|
|
@@ -526,458 +521,7 @@
|
|
|
526
521
|
cursor: not-allowed;
|
|
527
522
|
}
|
|
528
523
|
|
|
529
|
-
[data-ui
|
|
524
|
+
[data-ui-date-range-picker][data-part-root][data-disabled] [data-part-separator] {
|
|
530
525
|
color: var(--slotted-disabled-foreground);
|
|
531
526
|
}
|
|
532
|
-
|
|
533
|
-
/* ── The layer ────────────────────────────────────────────────────────
|
|
534
|
-
*
|
|
535
|
-
* What `packages/core/src/positioner` writes `position`, `left` and `top`
|
|
536
|
-
* onto. The painted surface is one element in, as every overlay is built.
|
|
537
|
-
*/
|
|
538
|
-
[data-ui='date-range-picker'][data-part='positioner'] {
|
|
539
|
-
/* Only the block inset: the positioner writes `left` and never `right`,
|
|
540
|
-
and `inset-inline-start` would resolve to `right` in a right-to-left
|
|
541
|
-
document and win over the measured value. */
|
|
542
|
-
position: absolute;
|
|
543
|
-
inset-block-start: 0;
|
|
544
|
-
|
|
545
|
-
box-sizing: border-box;
|
|
546
|
-
isolation: isolate;
|
|
547
|
-
/* The layer is only a frame around the surface; the surface takes the
|
|
548
|
-
pointer, and the frame must not swallow a press meant for the page. */
|
|
549
|
-
pointer-events: none;
|
|
550
|
-
z-index: calc(var(--slotted-z-index-popover, 1100) + var(--slotted-layer-depth, 0));
|
|
551
|
-
|
|
552
|
-
/* The layer arrives along the axis it opens on and never along the inline
|
|
553
|
-
one, which is the rule `select` records. */
|
|
554
|
-
--_enter-distance: var(--slotted-space-2, 0.25rem);
|
|
555
|
-
opacity: 0;
|
|
556
|
-
translate: 0 calc(-1 * var(--_enter-distance));
|
|
557
|
-
transition:
|
|
558
|
-
opacity var(--slotted-duration-short) var(--slotted-easing-exit),
|
|
559
|
-
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-side='top'] {
|
|
563
|
-
translate: 0 var(--_enter-distance);
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
/* A lateral side has no block direction to arrive from, so it only fades. */
|
|
567
|
-
[data-ui='date-range-picker'][data-part='positioner']:is(
|
|
568
|
-
[data-side='left'],
|
|
569
|
-
[data-side='right']
|
|
570
|
-
) {
|
|
571
|
-
translate: 0 0;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-open] {
|
|
575
|
-
opacity: 1;
|
|
576
|
-
translate: 0 0;
|
|
577
|
-
transition: none;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
/* The entrance is a keyframe animation and not a transition, for the reason
|
|
581
|
-
`select` records: a transition starts from the style the browser computed
|
|
582
|
-
last, and the positioner writes `data-side` in the same style update as
|
|
583
|
-
the family opens the layer. Only a layer the positioner placed arrives. */
|
|
584
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-open][data-positioned] {
|
|
585
|
-
animation: slotted-date-range-picker-enter-down var(--slotted-duration-medium)
|
|
586
|
-
var(--slotted-easing-enter);
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-open][data-positioned][data-side='top'] {
|
|
590
|
-
animation-name: slotted-date-range-picker-enter-up;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-open][data-positioned]:is(
|
|
594
|
-
[data-side='left'],
|
|
595
|
-
[data-side='right']
|
|
596
|
-
) {
|
|
597
|
-
animation-name: slotted-date-range-picker-fade;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
@keyframes slotted-date-range-picker-enter-down {
|
|
601
|
-
from {
|
|
602
|
-
opacity: 0;
|
|
603
|
-
translate: 0 calc(-1 * var(--_enter-distance));
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
@keyframes slotted-date-range-picker-enter-up {
|
|
608
|
-
from {
|
|
609
|
-
opacity: 0;
|
|
610
|
-
translate: 0 var(--_enter-distance);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
@keyframes slotted-date-range-picker-fade {
|
|
615
|
-
from {
|
|
616
|
-
opacity: 0;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
/* Stillness keeps the fade and drops the movement. */
|
|
621
|
-
@media (prefers-reduced-motion: reduce) {
|
|
622
|
-
[data-ui='date-range-picker'][data-part='positioner'],
|
|
623
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-side='top'],
|
|
624
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-side='left'],
|
|
625
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-side='right'] {
|
|
626
|
-
translate: 0 0;
|
|
627
|
-
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-open][data-positioned],
|
|
631
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-open][data-positioned][data-side='top'],
|
|
632
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-open][data-positioned][data-side='left'],
|
|
633
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-open][data-positioned][data-side='right'] {
|
|
634
|
-
animation-name: slotted-date-range-picker-fade;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
/* The anchor scrolled out of its own clipper. The calendar is still open and
|
|
639
|
-
still belongs to a control the reader can no longer see. */
|
|
640
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-detached] {
|
|
641
|
-
visibility: hidden;
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
/**
|
|
645
|
-
* The surface. It is sized by the calendar inside it rather than by the
|
|
646
|
-
* control it hangs from, and it is a grid of `auto` tracks for the reason
|
|
647
|
-
* `date-picker` records: a percentage flex basis against a shrink-wrapped
|
|
648
|
-
* container makes the surface wider than anything in it.
|
|
649
|
-
*/
|
|
650
|
-
[data-ui='date-range-picker'] [data-part='content'] {
|
|
651
|
-
background-color: var(
|
|
652
|
-
--slotted-date-range-picker-surface,
|
|
653
|
-
var(--slotted-surface-raised, Canvas)
|
|
654
|
-
);
|
|
655
|
-
border: var(--slotted-border-width-thin, 1px) solid
|
|
656
|
-
var(
|
|
657
|
-
--slotted-date-range-picker-content-border-color,
|
|
658
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
659
|
-
);
|
|
660
|
-
border-radius: var(--slotted-date-range-picker-content-radius, var(--slotted-radius-lg, 8px));
|
|
661
|
-
box-shadow: var(--slotted-date-range-picker-content-shadow, var(--slotted-shadow-md));
|
|
662
|
-
box-sizing: border-box;
|
|
663
|
-
color: var(--slotted-date-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
664
|
-
display: grid;
|
|
665
|
-
gap: var(--slotted-space-5, 0.75rem);
|
|
666
|
-
grid-template-areas: 'head' 'panels' 'footer';
|
|
667
|
-
/* `minmax(0, 1fr)` and not `auto`: an `auto` track takes the calendar's
|
|
668
|
-
own two-month width as its floor, and the cap below is then a cap on a
|
|
669
|
-
box the track has already overflowed. A zero floor lets the track be
|
|
670
|
-
the room there is, and the calendar's `max-inline-size: 100%` follows. */
|
|
671
|
-
grid-template-columns: minmax(0, 1fr);
|
|
672
|
-
/* Capped by the room the positioner measured, so two months that do not
|
|
673
|
-
fit beside each other wrap under one another — the calendar's own
|
|
674
|
-
container rule — instead of running past the edge of the screen. */
|
|
675
|
-
max-inline-size: var(--slotted-positioner-available-width, 100vw);
|
|
676
|
-
padding: var(--slotted-date-range-picker-content-padding, var(--slotted-space-5, 0.75rem));
|
|
677
|
-
/* The layer above gave up the pointer; the surface takes it back. */
|
|
678
|
-
pointer-events: auto;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* The shortcuts and the calendar, as a wrapping row. Where there is room
|
|
683
|
-
* the column of shortcuts stands beside the grid; where there is not, the
|
|
684
|
-
* grid drops under it and the column stretches into a list across the
|
|
685
|
-
* surface — no container query, because a surface sized by its contents
|
|
686
|
-
* has no width of its own to ask about, which is the rule `datetime-picker`
|
|
687
|
-
* records for its own two panels.
|
|
688
|
-
*/
|
|
689
|
-
[data-ui='date-range-picker'] [data-part='panels'] {
|
|
690
|
-
align-items: flex-start;
|
|
691
|
-
display: flex;
|
|
692
|
-
flex-wrap: wrap;
|
|
693
|
-
gap: var(--slotted-space-5, 0.75rem);
|
|
694
|
-
grid-area: panels;
|
|
695
|
-
min-inline-size: 0;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
[data-ui='date-range-picker'] [data-part='panels'] > [data-ui='calendar'] {
|
|
699
|
-
flex: 0 1 auto;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
/* ── The band ─────────────────────────────────────────────────────────
|
|
703
|
-
*
|
|
704
|
-
* What the reader has so far, and how long it is. The two ends are drawn
|
|
705
|
-
* as they stand, the one not yet chosen as its placeholder, and the length
|
|
706
|
-
* answers the question the reader is actually asking while the run is
|
|
707
|
-
* being drawn — the reason `docs/history/designs/2026-09-09-date-design.md`
|
|
708
|
-
* §12 records.
|
|
709
|
-
*
|
|
710
|
-
* It renders at the panel's width and contributes nothing to it, by the
|
|
711
|
-
* pair `datetime-picker` records: `inline-size: 0` takes the band out of the
|
|
712
|
-
* grid's measurement and `min-inline-size: 100%` puts it back at the track's
|
|
713
|
-
* own width, so the calendar decides how wide the panel is and the band
|
|
714
|
-
* wraps inside whatever it decides.
|
|
715
|
-
*/
|
|
716
|
-
[data-ui='date-range-picker'] [data-part='head'] {
|
|
717
|
-
box-sizing: border-box;
|
|
718
|
-
inline-size: 0;
|
|
719
|
-
min-inline-size: 100%;
|
|
720
|
-
|
|
721
|
-
align-items: baseline;
|
|
722
|
-
border-block-end: var(--slotted-border-width-thin, 1px) solid
|
|
723
|
-
var(
|
|
724
|
-
--slotted-date-range-picker-content-border-color,
|
|
725
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
726
|
-
);
|
|
727
|
-
column-gap: var(--slotted-space-2, 0.25rem);
|
|
728
|
-
display: flex;
|
|
729
|
-
flex-wrap: wrap;
|
|
730
|
-
grid-area: head;
|
|
731
|
-
/* Air under the words before the rule — the same step the footer keeps
|
|
732
|
-
between its rule and its buttons, so the two bands hold the surface
|
|
733
|
-
symmetrically. */
|
|
734
|
-
padding-block-end: var(--slotted-space-3, 0.375rem);
|
|
735
|
-
row-gap: var(--slotted-space-1, 0.125rem);
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
/* The two ends and the dash between them are one run, and the run does not
|
|
739
|
-
break inside itself: "12 Sep –" on one line and "16 Sep" on the next is a
|
|
740
|
-
range read twice. */
|
|
741
|
-
[data-ui='date-range-picker'] [data-part='head'] > [data-part='head-start'],
|
|
742
|
-
[data-ui='date-range-picker'] [data-part='head'] > [data-part='head-end'] {
|
|
743
|
-
color: var(--slotted-date-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
744
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
745
|
-
font-variant-numeric: tabular-nums;
|
|
746
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
747
|
-
/* A date in words is a mixed run — a month name beside numbers — so it is
|
|
748
|
-
laid out by its own content rather than by the paragraph. */
|
|
749
|
-
unicode-bidi: plaintext;
|
|
750
|
-
white-space: nowrap;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
/* The dash between the two ends is a text node the bindings write between
|
|
754
|
-
the two spans, and not a pseudo-element on either: each span lays its own
|
|
755
|
-
date out by that date's first strong character, and a pseudo-element on
|
|
756
|
-
one of them followed the date's direction rather than the band's. As a
|
|
757
|
-
flex item of its own the dash stands between the two ends in the band's
|
|
758
|
-
direction, which is the only direction it has. */
|
|
759
|
-
|
|
760
|
-
/* The end not yet written, drawn as its placeholder beside the one that is;
|
|
761
|
-
and the pending one, which is a proposal and reads as the band's own
|
|
762
|
-
proposal in the calendar does. */
|
|
763
|
-
[data-ui='date-range-picker']
|
|
764
|
-
[data-part='head']
|
|
765
|
-
:is([data-part='head-start'], [data-part='head-end'])[data-placeholder] {
|
|
766
|
-
color: var(--slotted-date-range-picker-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
767
|
-
font-weight: var(--slotted-font-weight-regular, 400);
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
[data-ui='date-range-picker']
|
|
771
|
-
[data-part='head']
|
|
772
|
-
:is([data-part='head-start'], [data-part='head-end'])[data-pending] {
|
|
773
|
-
color: var(--slotted-date-range-picker-pending-color, var(--slotted-tone-accent-text));
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* The length. It stands at the reading end of the band, in the accent's
|
|
778
|
-
* text tone, because it is the number the band exists to say; pending, it
|
|
779
|
-
* keeps the tone and drops a step of weight, the way the calendar's pending
|
|
780
|
-
* band keeps the tint and drops a step of share.
|
|
781
|
-
*/
|
|
782
|
-
[data-ui='date-range-picker'] [data-part='length'] {
|
|
783
|
-
color: var(--slotted-date-range-picker-length-color, var(--slotted-tone-accent-text));
|
|
784
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
785
|
-
font-variant-numeric: tabular-nums;
|
|
786
|
-
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
787
|
-
margin-inline-start: auto;
|
|
788
|
-
padding-inline-start: var(--slotted-space-4, 0.5rem);
|
|
789
|
-
/* "10 days" is a number and a word, and a right-to-left band would put
|
|
790
|
-
the word first; the run is laid out by its own first strong character. */
|
|
791
|
-
unicode-bidi: plaintext;
|
|
792
|
-
white-space: nowrap;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
[data-ui='date-range-picker'] [data-part='length'][data-pending] {
|
|
796
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
/* An empty length still holds its line, so the band does not grow a row
|
|
800
|
-
when the first end is chosen. */
|
|
801
|
-
[data-ui='date-range-picker'] [data-part='length']:empty::before {
|
|
802
|
-
content: '\200B';
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
/* The limit, on a row of its own under the ends: a rule the grid enforces
|
|
806
|
-
is a rule the band names. */
|
|
807
|
-
[data-ui='date-range-picker'] [data-part='limit'] {
|
|
808
|
-
color: var(--slotted-date-range-picker-limit-color, var(--slotted-text-muted, GrayText));
|
|
809
|
-
flex-basis: 100%;
|
|
810
|
-
font-size: var(--slotted-font-size-xs, 11px);
|
|
811
|
-
unicode-bidi: plaintext;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
/* ── The shortcuts ────────────────────────────────────────────────────
|
|
815
|
-
*
|
|
816
|
-
* This family ships no list of them: "last 7 days" is a business calendar,
|
|
817
|
-
* and a library that guessed at one would be guessing at a fiscal year. It
|
|
818
|
-
* ships the column they stand in and the button each one is.
|
|
819
|
-
*/
|
|
820
|
-
[data-ui='date-range-picker'] [data-part='presets'] {
|
|
821
|
-
align-items: stretch;
|
|
822
|
-
display: flex;
|
|
823
|
-
/* It grows: beside the grid it takes what the surface leaves, and alone
|
|
824
|
-
on a line — the grid having dropped under it — it becomes a list across
|
|
825
|
-
the surface rather than a column against one edge. No rule between the
|
|
826
|
-
two: a rule on the end edge is right beside the grid and wrong above
|
|
827
|
-
it, and the column cannot know which it is. */
|
|
828
|
-
flex: 1 0 auto;
|
|
829
|
-
flex-direction: column;
|
|
830
|
-
gap: var(--slotted-space-1, 0.125rem);
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* One shortcut. Quiet — no edge, the surface's ink — and reading from the
|
|
835
|
-
* start edge: stretched and centred, four labels form a ragged column with
|
|
836
|
-
* no left edge to run down. Selected, it takes the accent's subtle ground
|
|
837
|
-
* and text, which is the pair `calendar` gives a day inside the run.
|
|
838
|
-
*/
|
|
839
|
-
[data-ui='date-range-picker'] [data-part='preset'] {
|
|
840
|
-
appearance: none;
|
|
841
|
-
background-color: transparent;
|
|
842
|
-
border: 0;
|
|
843
|
-
border-radius: var(--slotted-date-range-picker-radius, var(--slotted-control-radius, 4px));
|
|
844
|
-
color: var(--slotted-date-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
845
|
-
cursor: pointer;
|
|
846
|
-
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
847
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
848
|
-
line-height: var(--slotted-line-height-sm, 1.4);
|
|
849
|
-
min-block-size: var(--slotted-target-min, 24px);
|
|
850
|
-
padding-block: var(--slotted-space-2, 0.25rem);
|
|
851
|
-
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
852
|
-
text-align: start;
|
|
853
|
-
touch-action: manipulation;
|
|
854
|
-
transition:
|
|
855
|
-
background-color var(--slotted-control-transition-duration)
|
|
856
|
-
var(--slotted-control-transition-easing),
|
|
857
|
-
color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
858
|
-
white-space: nowrap;
|
|
859
|
-
-webkit-tap-highlight-color: transparent;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
[data-ui='date-range-picker'] [data-part='preset']:hover:not(:disabled):not([data-selected]) {
|
|
863
|
-
background-color: var(
|
|
864
|
-
--slotted-date-range-picker-preset-hover-background,
|
|
865
|
-
var(--slotted-tone-secondary-subtle-hover)
|
|
866
|
-
);
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
[data-ui='date-range-picker'] [data-part='preset']:active:not(:disabled):not([data-selected]) {
|
|
870
|
-
background-color: var(
|
|
871
|
-
--slotted-date-range-picker-preset-active-background,
|
|
872
|
-
var(--slotted-tone-secondary-subtle-active)
|
|
873
|
-
);
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
[data-ui='date-range-picker'] [data-part='preset'][data-selected] {
|
|
877
|
-
background-color: var(
|
|
878
|
-
--slotted-date-range-picker-preset-selected-background,
|
|
879
|
-
var(--slotted-tone-accent-subtle-hover)
|
|
880
|
-
);
|
|
881
|
-
color: var(--slotted-date-range-picker-preset-selected-color, var(--slotted-tone-accent-text));
|
|
882
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
[data-ui='date-range-picker'] [data-part='preset']:focus-visible {
|
|
886
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
887
|
-
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
[data-ui='date-range-picker'] [data-part='preset']:disabled {
|
|
891
|
-
color: var(--slotted-disabled-foreground);
|
|
892
|
-
cursor: not-allowed;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
[data-ui='date-range-picker'] [data-part='footer'] {
|
|
896
|
-
box-sizing: border-box;
|
|
897
|
-
inline-size: 0;
|
|
898
|
-
min-inline-size: 100%;
|
|
899
|
-
|
|
900
|
-
align-items: center;
|
|
901
|
-
border-block-start: var(--slotted-border-width-thin, 1px) solid
|
|
902
|
-
var(
|
|
903
|
-
--slotted-date-range-picker-content-border-color,
|
|
904
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
905
|
-
);
|
|
906
|
-
display: flex;
|
|
907
|
-
gap: var(--slotted-space-2, 0.25rem);
|
|
908
|
-
grid-area: footer;
|
|
909
|
-
justify-content: flex-end;
|
|
910
|
-
padding-block-start: var(--slotted-space-4, 0.5rem);
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
/* ── Narrow, on a finger ──────────────────────────────────────────────
|
|
914
|
-
*
|
|
915
|
-
* §2.7 of `docs/component-features.md` asks for it by name: a popover on the
|
|
916
|
-
* desktop and a sheet in a narrow viewport. The DOM does not change, so the
|
|
917
|
-
* decision is testable without a device.
|
|
918
|
-
*/
|
|
919
|
-
@media (max-width: 480px) and (pointer: coarse) {
|
|
920
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-presentation='sheet'] {
|
|
921
|
-
/* A sheet is not placed against an anchor, it is placed against the
|
|
922
|
-
screen. */
|
|
923
|
-
inset: auto 0 0;
|
|
924
|
-
position: fixed;
|
|
925
|
-
translate: 0 var(--slotted-space-9, 2rem);
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-presentation='sheet'][data-open] {
|
|
929
|
-
translate: 0 0;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-presentation='sheet']
|
|
933
|
-
[data-part='content'] {
|
|
934
|
-
border-end-end-radius: 0;
|
|
935
|
-
border-end-start-radius: 0;
|
|
936
|
-
border-inline: 0;
|
|
937
|
-
border-block-end: 0;
|
|
938
|
-
inline-size: var(--slotted-date-range-picker-sheet-inline-size, 100%);
|
|
939
|
-
max-inline-size: none;
|
|
940
|
-
/* Two months wider than the screen would scroll sideways; the grid
|
|
941
|
-
inside answers its own width and drops to one column instead. */
|
|
942
|
-
justify-content: center;
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
[data-ui='date-range-picker'][data-part='positioner'][data-presentation='sheet']
|
|
946
|
-
[data-part='presets'] {
|
|
947
|
-
/* Beside the grid there is no room for a column of shortcuts, so they
|
|
948
|
-
become a row above it and keep their labels. */
|
|
949
|
-
flex-direction: row;
|
|
950
|
-
flex-wrap: wrap;
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
@media (forced-colors: active) {
|
|
955
|
-
/* A transparent border has no system colour to be remapped to, so the
|
|
956
|
-
`plain` frame would lose its only edge where an edge matters most. */
|
|
957
|
-
[data-ui='date-range-picker'][data-part='root'][data-variant='plain'] [data-part='control'] {
|
|
958
|
-
border-color: ButtonBorder;
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
/* The underline is painted with a background, and forced colours replace
|
|
962
|
-
a background that is not one of the system's own. */
|
|
963
|
-
[data-ui='date-range-picker'] [data-part='start']::after,
|
|
964
|
-
[data-ui='date-range-picker'] [data-part='end']::after {
|
|
965
|
-
forced-color-adjust: none;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
/* The underline keeps its ink as the text's own: a tone has nothing to
|
|
969
|
-
map to here, and `currentcolor` is whatever the system gave the frame. */
|
|
970
|
-
[data-ui='date-range-picker'] [data-part='start']::after,
|
|
971
|
-
[data-ui='date-range-picker'] [data-part='end']::after {
|
|
972
|
-
background-color: currentcolor;
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
/* A tinted ground has nothing to tint in a palette the system replaced;
|
|
976
|
-
the selected shortcut takes the pair the system keeps legible. */
|
|
977
|
-
[data-ui='date-range-picker'] [data-part='preset'][data-selected] {
|
|
978
|
-
background-color: Highlight;
|
|
979
|
-
color: HighlightText;
|
|
980
|
-
forced-color-adjust: none;
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
527
|
}
|