@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer slotted.components {
|
|
2
2
|
/**
|
|
3
|
-
* ── A one-line frame, and behind it
|
|
3
|
+
* ── A one-line frame, and the day behind it ────────────────────────────
|
|
4
4
|
*
|
|
5
5
|
* ┌─ root ──────────────────────────────────────────────────────────────┐
|
|
6
6
|
* │ ┌─ control ── the frame ─────────────────────────────────────────┐ │
|
|
@@ -9,38 +9,20 @@
|
|
|
9
9
|
* │ │ └───────────────────────────────────────────┴───────┴───────┘ │ │
|
|
10
10
|
* │ └────────────────────────────────────────────────────────────────┘ │
|
|
11
11
|
* └─────────────────────────────────────────────────────────────────────┘
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* │ │ head: tabs [ START · 14:00 ] [ END · — ] │ │
|
|
15
|
-
* │ │ field [time-field] now │ │
|
|
16
|
-
* │ │ hint Choose the end length · limit │ │
|
|
17
|
-
* │ │ presets: chip chip chip │ │
|
|
18
|
-
* │ │ panel (the current end): list │ │
|
|
19
|
-
* │ │ footer done │ │
|
|
20
|
-
* │ └─────────────────────────────────────────────────────┘ │
|
|
21
|
-
* └───────────────────────────────────────────────────────────┘
|
|
22
|
-
*
|
|
23
|
-
* The field inside keeps its own `data-ui`. Nothing here selects a
|
|
24
|
-
* segment: this stylesheet owns the frame, the layer, the band the field
|
|
25
|
-
* stands in, and the list.
|
|
12
|
+
* the panel is `picker-panel`'s, the hours in it `clock`'s and the
|
|
13
|
+
* ends typed in it `time-field`'s
|
|
26
14
|
*
|
|
27
15
|
* **The frame is one line at any width.** Two segmented fields stood in it
|
|
28
16
|
* first — the shape `date-range-picker` has — and were withdrawn at the
|
|
29
17
|
* visual gate: a segment cannot shrink, and two fields broke the frame into
|
|
30
18
|
* two lines in any form column narrower than they are, against the height
|
|
31
|
-
* every control shares. The frame keeps the value in words
|
|
32
|
-
*
|
|
33
|
-
* **The band speaks to the field through its tokens and never through its
|
|
34
|
-
* parts** — the rule `date-range-picker` records.
|
|
35
|
-
*
|
|
36
|
-
* **One end at a time.** Two lists side by side, under two fields, were
|
|
37
|
-
* refused at the release gate as too much interface at once for a lay
|
|
38
|
-
* reader and for a phone. The tab says which end, the panel shows only
|
|
39
|
-
* that end, and choosing one end moves to the other — the end list
|
|
40
|
-
* appears already striking what the chosen start refuses.
|
|
19
|
+
* every control shares. The frame keeps the value in words, and the fields
|
|
20
|
+
* live in the head of the panel.
|
|
41
21
|
*/
|
|
42
|
-
[data-ui
|
|
22
|
+
[data-ui-time-range-picker][data-part-root] {
|
|
43
23
|
display: block;
|
|
24
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
25
|
+
flex-basis: content;
|
|
44
26
|
/* The anchor the positioner measures is the control, and a block root
|
|
45
27
|
lets the frame take the width the form gave it. */
|
|
46
28
|
inline-size: 100%;
|
|
@@ -55,7 +37,7 @@
|
|
|
55
37
|
* and two of them broke the frame into two lines in any form column
|
|
56
38
|
* narrower than they are, against the height every control shares.
|
|
57
39
|
*/
|
|
58
|
-
[data-ui
|
|
40
|
+
[data-ui-time-range-picker] [data-part-control] {
|
|
59
41
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
60
42
|
--_height: var(--slotted-control-height-md, 34px);
|
|
61
43
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -105,7 +87,7 @@
|
|
|
105
87
|
box-shadow var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
106
88
|
}
|
|
107
89
|
|
|
108
|
-
[data-ui
|
|
90
|
+
[data-ui-time-range-picker][data-part-root][data-size='sm'] [data-part-control] {
|
|
109
91
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
110
92
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
111
93
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 11px);
|
|
@@ -113,7 +95,7 @@
|
|
|
113
95
|
--_icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
114
96
|
}
|
|
115
97
|
|
|
116
|
-
[data-ui
|
|
98
|
+
[data-ui-time-range-picker][data-part-root][data-size='lg'] [data-part-control] {
|
|
117
99
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
118
100
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
119
101
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 15px);
|
|
@@ -125,7 +107,7 @@
|
|
|
125
107
|
*
|
|
126
108
|
* The three steps `text-field` set, through the field's own variant tokens.
|
|
127
109
|
*/
|
|
128
|
-
[data-ui
|
|
110
|
+
[data-ui-time-range-picker][data-part-root][data-variant='subtle'] [data-part-control] {
|
|
129
111
|
background-color: var(
|
|
130
112
|
--slotted-time-range-picker-subtle-background,
|
|
131
113
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -136,7 +118,7 @@
|
|
|
136
118
|
);
|
|
137
119
|
}
|
|
138
120
|
|
|
139
|
-
[data-ui
|
|
121
|
+
[data-ui-time-range-picker][data-part-root][data-variant='plain'] [data-part-control] {
|
|
140
122
|
background-color: transparent;
|
|
141
123
|
border-color: transparent;
|
|
142
124
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -151,7 +133,7 @@
|
|
|
151
133
|
* into `PageDown` before the browser sees it, so a chord cannot be the only
|
|
152
134
|
* way in.
|
|
153
135
|
*/
|
|
154
|
-
[data-ui
|
|
136
|
+
[data-ui-time-range-picker] [data-part-trigger] {
|
|
155
137
|
align-items: center;
|
|
156
138
|
appearance: none;
|
|
157
139
|
background-color: transparent;
|
|
@@ -177,14 +159,14 @@
|
|
|
177
159
|
-webkit-tap-highlight-color: transparent;
|
|
178
160
|
}
|
|
179
161
|
|
|
180
|
-
[data-ui
|
|
162
|
+
[data-ui-time-range-picker] [data-part-control]:has(> [data-part-clear]) {
|
|
181
163
|
--_actions: 2;
|
|
182
164
|
}
|
|
183
165
|
|
|
184
166
|
/* The value in words, one line, cut where it does not fit: the trigger's
|
|
185
167
|
name carries it whole, so the ellipsis removes nothing a reader cannot
|
|
186
168
|
hear. Tabular figures, so two ranges in a form line up. */
|
|
187
|
-
[data-ui
|
|
169
|
+
[data-ui-time-range-picker] [data-part-summary] {
|
|
188
170
|
flex: 1 1 auto;
|
|
189
171
|
font-variant-numeric: tabular-nums;
|
|
190
172
|
min-inline-size: 0;
|
|
@@ -194,7 +176,7 @@
|
|
|
194
176
|
white-space: nowrap;
|
|
195
177
|
}
|
|
196
178
|
|
|
197
|
-
[data-ui
|
|
179
|
+
[data-ui-time-range-picker] [data-part-summary][data-placeholder] {
|
|
198
180
|
color: var(--slotted-time-range-picker-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
199
181
|
}
|
|
200
182
|
|
|
@@ -204,14 +186,14 @@
|
|
|
204
186
|
sits where `date-range-picker` sits its calendar. */
|
|
205
187
|
/* The frame draws the ring for the trigger; the browser's own ring on the
|
|
206
188
|
trigger would be a second one, inside the frame and over its edge. */
|
|
207
|
-
[data-ui
|
|
189
|
+
[data-ui-time-range-picker] [data-part-trigger]:focus-visible {
|
|
208
190
|
outline: none;
|
|
209
191
|
}
|
|
210
192
|
|
|
211
|
-
[data-ui
|
|
193
|
+
[data-ui-time-range-picker] [data-part-trigger] > [data-ui-icon] {
|
|
212
194
|
--slotted-icon-size: var(--_icon-size);
|
|
213
195
|
|
|
214
|
-
/* No system-
|
|
196
|
+
/* No system-color fallback on a decoration: unthemed, it takes the
|
|
215
197
|
trigger's ink rather than shouts. */
|
|
216
198
|
color: var(--slotted-time-range-picker-action-color, var(--slotted-text-muted));
|
|
217
199
|
inset-block-start: 50%;
|
|
@@ -220,7 +202,7 @@
|
|
|
220
202
|
translate: 0 -50%;
|
|
221
203
|
}
|
|
222
204
|
|
|
223
|
-
[data-ui
|
|
205
|
+
[data-ui-time-range-picker] [data-part-trigger]:disabled {
|
|
224
206
|
cursor: not-allowed;
|
|
225
207
|
}
|
|
226
208
|
|
|
@@ -230,7 +212,7 @@
|
|
|
230
212
|
* stands. Its own ring: tabbing from the trigger to it has to move
|
|
231
213
|
* something visible, and the frame's ring would sit still.
|
|
232
214
|
*/
|
|
233
|
-
[data-ui
|
|
215
|
+
[data-ui-time-range-picker] [data-part-clear] {
|
|
234
216
|
--slotted-icon-size: var(--_icon-size);
|
|
235
217
|
|
|
236
218
|
align-items: center;
|
|
@@ -260,7 +242,7 @@
|
|
|
260
242
|
}
|
|
261
243
|
|
|
262
244
|
/* The hit area, recovered outside the paint, as every inner control does. */
|
|
263
|
-
[data-ui
|
|
245
|
+
[data-ui-time-range-picker] [data-part-clear]::after {
|
|
264
246
|
content: '';
|
|
265
247
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
266
248
|
position: absolute;
|
|
@@ -271,32 +253,32 @@
|
|
|
271
253
|
the hit area above grows to 44 pixels around them. It does not reach into
|
|
272
254
|
the clock's lane after it, which is the trigger's to answer. */
|
|
273
255
|
@media (pointer: coarse) {
|
|
274
|
-
[data-ui
|
|
256
|
+
[data-ui-time-range-picker] [data-part-clear]::after {
|
|
275
257
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
276
258
|
inset-inline-end: 0;
|
|
277
259
|
}
|
|
278
260
|
}
|
|
279
261
|
|
|
280
|
-
[data-ui
|
|
262
|
+
[data-ui-time-range-picker] [data-part-clear]:hover:not(:disabled):not([data-disabled]) {
|
|
281
263
|
background-color: var(
|
|
282
264
|
--slotted-time-range-picker-action-hover-background,
|
|
283
265
|
var(--slotted-tone-secondary-subtle-hover)
|
|
284
266
|
);
|
|
285
267
|
}
|
|
286
268
|
|
|
287
|
-
[data-ui
|
|
269
|
+
[data-ui-time-range-picker] [data-part-clear]:active:not(:disabled):not([data-disabled]) {
|
|
288
270
|
background-color: var(
|
|
289
271
|
--slotted-time-range-picker-action-active-background,
|
|
290
272
|
var(--slotted-tone-secondary-subtle-active)
|
|
291
273
|
);
|
|
292
274
|
}
|
|
293
275
|
|
|
294
|
-
[data-ui
|
|
276
|
+
[data-ui-time-range-picker] [data-part-clear]:focus-visible {
|
|
295
277
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
296
278
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
297
279
|
}
|
|
298
280
|
|
|
299
|
-
[data-ui
|
|
281
|
+
[data-ui-time-range-picker] [data-part-clear]:disabled {
|
|
300
282
|
color: var(--slotted-disabled-foreground);
|
|
301
283
|
cursor: not-allowed;
|
|
302
284
|
}
|
|
@@ -307,30 +289,30 @@
|
|
|
307
289
|
* one it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
308
290
|
*/
|
|
309
291
|
|
|
310
|
-
[data-ui
|
|
292
|
+
[data-ui-time-range-picker][data-part-root]:not([data-disabled]):not([data-readonly]):not(
|
|
311
293
|
[data-invalid]
|
|
312
294
|
)
|
|
313
|
-
[data-part
|
|
295
|
+
[data-part-control]:hover {
|
|
314
296
|
border-color: var(
|
|
315
297
|
--slotted-time-range-picker-hover-border-color,
|
|
316
298
|
var(--slotted-tone-accent-border)
|
|
317
299
|
);
|
|
318
300
|
}
|
|
319
301
|
|
|
320
|
-
[data-ui
|
|
302
|
+
[data-ui-time-range-picker][data-part-root][data-variant='subtle']:not([data-disabled]):not(
|
|
321
303
|
[data-readonly]
|
|
322
304
|
):not([data-invalid])
|
|
323
|
-
[data-part
|
|
305
|
+
[data-part-control]:hover {
|
|
324
306
|
background-color: var(
|
|
325
307
|
--slotted-time-range-picker-subtle-hover-background,
|
|
326
308
|
var(--slotted-tone-secondary-subtle-hover)
|
|
327
309
|
);
|
|
328
310
|
}
|
|
329
311
|
|
|
330
|
-
[data-ui
|
|
312
|
+
[data-ui-time-range-picker][data-part-root][data-variant='plain']:not([data-disabled]):not(
|
|
331
313
|
[data-readonly]
|
|
332
314
|
):not([data-invalid])
|
|
333
|
-
[data-part
|
|
315
|
+
[data-part-control]:hover {
|
|
334
316
|
background-color: var(
|
|
335
317
|
--slotted-time-range-picker-plain-hover-background,
|
|
336
318
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -340,7 +322,7 @@
|
|
|
340
322
|
|
|
341
323
|
/* The trigger is the only thing in the frame that takes focus, apart from
|
|
342
324
|
the clear, which draws its own ring; the frame's ring is drawn for it. */
|
|
343
|
-
[data-ui
|
|
325
|
+
[data-ui-time-range-picker] [data-part-control]:has(> [data-part-trigger]:focus-visible) {
|
|
344
326
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
345
327
|
var(--slotted-focus-ring-color, Highlight);
|
|
346
328
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
@@ -349,15 +331,15 @@
|
|
|
349
331
|
|
|
350
332
|
/* The ring of a control whose box is not its own is drawn inside that box,
|
|
351
333
|
and there is no lift — the `plain` rule of `plain-variant.test.mjs`. */
|
|
352
|
-
[data-ui
|
|
353
|
-
[data-part
|
|
334
|
+
[data-ui-time-range-picker][data-part-root][data-variant='plain']
|
|
335
|
+
[data-part-control]:has(> [data-part-trigger]:focus-visible) {
|
|
354
336
|
box-shadow: none;
|
|
355
337
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
356
338
|
}
|
|
357
339
|
|
|
358
340
|
/* Invalid outranks hover and is written after it. The ring is retargeted
|
|
359
341
|
rather than repainted, so every ring in the frame moves at once. */
|
|
360
|
-
[data-ui
|
|
342
|
+
[data-ui-time-range-picker][data-part-root][data-invalid] [data-part-control] {
|
|
361
343
|
--slotted-focus-ring-color: var(
|
|
362
344
|
--slotted-time-range-picker-invalid-focus-ring-color,
|
|
363
345
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -377,7 +359,7 @@
|
|
|
377
359
|
var(--slotted-tone-danger-border)
|
|
378
360
|
);
|
|
379
361
|
/*
|
|
380
|
-
* Width as well as
|
|
362
|
+
* Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
|
|
381
363
|
* `high-contrast` the danger border is the resting edge's black. The line
|
|
382
364
|
* is a shadow inside the border, so neither box nor text moves, and it
|
|
383
365
|
* takes the resting lift's place.
|
|
@@ -385,16 +367,16 @@
|
|
|
385
367
|
box-shadow: var(--_invalid-edge);
|
|
386
368
|
}
|
|
387
369
|
|
|
388
|
-
[data-ui
|
|
389
|
-
[data-part
|
|
370
|
+
[data-ui-time-range-picker][data-invalid]
|
|
371
|
+
[data-part-control]:has(> [data-part-trigger]:focus-visible) {
|
|
390
372
|
box-shadow:
|
|
391
373
|
var(--_invalid-edge),
|
|
392
374
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
393
375
|
var(--slotted-focus-ring-color, Highlight);
|
|
394
376
|
}
|
|
395
377
|
|
|
396
|
-
[data-ui
|
|
397
|
-
[data-part
|
|
378
|
+
[data-ui-time-range-picker][data-part-root][data-variant='plain'][data-invalid]
|
|
379
|
+
[data-part-control]:has(> [data-part-trigger]:focus-visible) {
|
|
398
380
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
399
381
|
it; the edge reaches past the ring. */
|
|
400
382
|
box-shadow: inset 0 0 0
|
|
@@ -405,25 +387,25 @@
|
|
|
405
387
|
}
|
|
406
388
|
|
|
407
389
|
/*
|
|
408
|
-
* Forced
|
|
390
|
+
* Forced colors remove every box shadow, and the edge with them. The
|
|
409
391
|
* width comes back as an outline inside the border, and a focused invalid
|
|
410
392
|
* control draws its ring double, which a valid ring is not.
|
|
411
393
|
*/
|
|
412
394
|
@media (forced-colors: active) {
|
|
413
|
-
[data-ui
|
|
395
|
+
[data-ui-time-range-picker][data-part-root][data-invalid] [data-part-control] {
|
|
414
396
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
415
397
|
outline-offset: calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)));
|
|
416
398
|
}
|
|
417
399
|
|
|
418
|
-
[data-ui
|
|
419
|
-
[data-part
|
|
400
|
+
[data-ui-time-range-picker][data-invalid]
|
|
401
|
+
[data-part-control]:has(> [data-part-trigger]:focus-visible) {
|
|
420
402
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
421
403
|
var(--slotted-focus-ring-color, Highlight);
|
|
422
404
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
423
405
|
}
|
|
424
406
|
|
|
425
|
-
[data-ui
|
|
426
|
-
[data-part
|
|
407
|
+
[data-ui-time-range-picker][data-part-root][data-variant='plain'][data-invalid]
|
|
408
|
+
[data-part-control]:has(> [data-part-trigger]:focus-visible) {
|
|
427
409
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
428
410
|
var(--slotted-focus-ring-color, Highlight);
|
|
429
411
|
outline-offset: calc(
|
|
@@ -434,7 +416,7 @@
|
|
|
434
416
|
|
|
435
417
|
/* Read-only stays focusable, readable and copyable, and must not be
|
|
436
418
|
mistakable for disabled: the ground says "not yours to change". */
|
|
437
|
-
[data-ui
|
|
419
|
+
[data-ui-time-range-picker][data-part-root][data-readonly] [data-part-control] {
|
|
438
420
|
background-color: var(
|
|
439
421
|
--slotted-time-range-picker-readonly-background,
|
|
440
422
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -442,8 +424,8 @@
|
|
|
442
424
|
cursor: default;
|
|
443
425
|
}
|
|
444
426
|
|
|
445
|
-
/* Muted to the
|
|
446
|
-
[data-ui
|
|
427
|
+
/* Muted to the color the theme measures rather than faded by opacity. */
|
|
428
|
+
[data-ui-time-range-picker][data-part-root][data-disabled] [data-part-control] {
|
|
447
429
|
background-color: var(
|
|
448
430
|
--slotted-time-range-picker-disabled-background,
|
|
449
431
|
var(--slotted-disabled-background)
|
|
@@ -457,831 +439,7 @@
|
|
|
457
439
|
cursor: not-allowed;
|
|
458
440
|
}
|
|
459
441
|
|
|
460
|
-
[data-ui
|
|
461
|
-
[data-part='trigger']
|
|
462
|
-
> [data-ui='icon'] {
|
|
463
|
-
color: var(--slotted-disabled-foreground);
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/* ── The layer ────────────────────────────────────────────────────────
|
|
467
|
-
*
|
|
468
|
-
* What `packages/core/src/positioner` writes `position`, `left` and `top`
|
|
469
|
-
* onto. The painted surface is one element in, as every overlay is built.
|
|
470
|
-
*/
|
|
471
|
-
[data-ui='time-range-picker'][data-part='positioner'] {
|
|
472
|
-
/* Only the block inset: the positioner writes `left` and never `right`,
|
|
473
|
-
and `inset-inline-start` would resolve to `right` in a right-to-left
|
|
474
|
-
document and win over the measured value. */
|
|
475
|
-
position: absolute;
|
|
476
|
-
inset-block-start: 0;
|
|
477
|
-
|
|
478
|
-
box-sizing: border-box;
|
|
479
|
-
isolation: isolate;
|
|
480
|
-
pointer-events: none;
|
|
481
|
-
z-index: calc(var(--slotted-z-index-popover, 1100) + var(--slotted-layer-depth, 0));
|
|
482
|
-
|
|
483
|
-
/* The layer arrives along the axis it opens on and never along the inline
|
|
484
|
-
one, which is the rule `select` records. */
|
|
485
|
-
--_enter-distance: var(--slotted-space-2, 0.25rem);
|
|
486
|
-
opacity: 0;
|
|
487
|
-
translate: 0 calc(-1 * var(--_enter-distance));
|
|
488
|
-
transition:
|
|
489
|
-
opacity var(--slotted-duration-short) var(--slotted-easing-exit),
|
|
490
|
-
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-side='top'] {
|
|
494
|
-
translate: 0 var(--_enter-distance);
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
[data-ui='time-range-picker'][data-part='positioner']:is(
|
|
498
|
-
[data-side='left'],
|
|
499
|
-
[data-side='right']
|
|
500
|
-
) {
|
|
501
|
-
translate: 0 0;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-open] {
|
|
505
|
-
opacity: 1;
|
|
506
|
-
translate: 0 0;
|
|
507
|
-
transition: none;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
/* The entrance is a keyframe animation and not a transition, for the reason
|
|
511
|
-
`select` records: only a layer the positioner placed arrives. */
|
|
512
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-open][data-positioned] {
|
|
513
|
-
animation: slotted-time-range-picker-enter-down var(--slotted-duration-medium)
|
|
514
|
-
var(--slotted-easing-enter);
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-open][data-positioned][data-side='top'] {
|
|
518
|
-
animation-name: slotted-time-range-picker-enter-up;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-open][data-positioned]:is(
|
|
522
|
-
[data-side='left'],
|
|
523
|
-
[data-side='right']
|
|
524
|
-
) {
|
|
525
|
-
animation-name: slotted-time-range-picker-fade;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
@keyframes slotted-time-range-picker-enter-down {
|
|
529
|
-
from {
|
|
530
|
-
opacity: 0;
|
|
531
|
-
translate: 0 calc(-1 * var(--_enter-distance));
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
@keyframes slotted-time-range-picker-enter-up {
|
|
536
|
-
from {
|
|
537
|
-
opacity: 0;
|
|
538
|
-
translate: 0 var(--_enter-distance);
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
@keyframes slotted-time-range-picker-fade {
|
|
543
|
-
from {
|
|
544
|
-
opacity: 0;
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
/* Stillness keeps the fade and drops the movement. */
|
|
549
|
-
@media (prefers-reduced-motion: reduce) {
|
|
550
|
-
[data-ui='time-range-picker'][data-part='positioner'],
|
|
551
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-side='top'],
|
|
552
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-side='left'],
|
|
553
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-side='right'] {
|
|
554
|
-
translate: 0 0;
|
|
555
|
-
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-open][data-positioned],
|
|
559
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-open][data-positioned][data-side='top'],
|
|
560
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-open][data-positioned][data-side='left'],
|
|
561
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-open][data-positioned][data-side='right'] {
|
|
562
|
-
animation-name: slotted-time-range-picker-fade;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
/* The anchor scrolled out of its own clipper. */
|
|
567
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-detached] {
|
|
568
|
-
visibility: hidden;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* The surface. One list has no intrinsic width, so the surface takes the
|
|
573
|
-
* anchor's, floored so a column is never too tight to read a time and its
|
|
574
|
-
* duration in, and capped so a wide form does not stretch one column
|
|
575
|
-
* across a page — the rule `time-picker` states, with a wider floor for
|
|
576
|
-
* the duration beside each time.
|
|
577
|
-
*
|
|
578
|
-
* The fallback is the floor rather than `auto`: the anchor width is written
|
|
579
|
-
* by the positioner and absent wherever the surface is drawn without one,
|
|
580
|
-
* and `min(auto, …)` is not a value.
|
|
581
|
-
*/
|
|
582
|
-
[data-ui='time-range-picker'] [data-part='content'] {
|
|
583
|
-
background-color: var(
|
|
584
|
-
--slotted-time-range-picker-surface,
|
|
585
|
-
var(--slotted-surface-raised, Canvas)
|
|
586
|
-
);
|
|
587
|
-
border: var(--slotted-border-width-thin, 1px) solid
|
|
588
|
-
var(
|
|
589
|
-
--slotted-time-range-picker-content-border-color,
|
|
590
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
591
|
-
);
|
|
592
|
-
border-radius: var(--slotted-time-range-picker-content-radius, var(--slotted-radius-lg, 8px));
|
|
593
|
-
box-shadow: var(--slotted-time-range-picker-content-shadow, var(--slotted-shadow-md));
|
|
594
|
-
box-sizing: border-box;
|
|
595
|
-
color: var(--slotted-time-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
596
|
-
/* The type of the surface follows density with the control scale, as the
|
|
597
|
-
calendar's does: a list at the page's size beside a grid at the
|
|
598
|
-
control's read as two sizes in dense. */
|
|
599
|
-
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
600
|
-
font-size: var(--slotted-control-font-size-md, 13px);
|
|
601
|
-
/**
|
|
602
|
-
* One row's height, stated once, because the list's cap is counted in
|
|
603
|
-
* rows — eight and a half of them at every density, the arithmetic
|
|
604
|
-
* `time-picker` records. The pitch is the row plus the air under it.
|
|
605
|
-
*/
|
|
606
|
-
--_row: max(var(--slotted-target-min, 24px), var(--slotted-control-height-sm, 30px));
|
|
607
|
-
--_row-pitch: calc(var(--_row) + var(--slotted-space-1, 0.125rem));
|
|
608
|
-
|
|
609
|
-
display: grid;
|
|
610
|
-
/* The bands breathe by the step the dialogs of the date chain use: a
|
|
611
|
-
surface holding a field and a list is a dialog, not a menu. */
|
|
612
|
-
gap: var(--slotted-space-5, 0.75rem);
|
|
613
|
-
grid-template-areas: 'head' 'presets' 'panel' 'footer';
|
|
614
|
-
grid-template-columns: minmax(0, 1fr);
|
|
615
|
-
inline-size: max(
|
|
616
|
-
var(--slotted-time-range-picker-content-min-inline-size, 16rem),
|
|
617
|
-
min(var(--slotted-positioner-anchor-width, 16rem), 22rem)
|
|
618
|
-
);
|
|
619
|
-
max-inline-size: var(--slotted-positioner-available-width, 100vw);
|
|
620
|
-
padding: var(--slotted-time-range-picker-content-padding, var(--slotted-space-5, 0.75rem));
|
|
621
|
-
/* The layer above gave up the pointer; the surface takes it back. */
|
|
622
|
-
pointer-events: auto;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
/* ── The band ─────────────────────────────────────────────────────────
|
|
626
|
-
*
|
|
627
|
-
* Three rows: which end is being chosen, where the reader types it, and
|
|
628
|
-
* what to do next. It renders at the panel's width and contributes nothing
|
|
629
|
-
* to it, by the pair `datetime-picker` records.
|
|
630
|
-
*/
|
|
631
|
-
[data-ui='time-range-picker'] [data-part='head'] {
|
|
632
|
-
box-sizing: border-box;
|
|
633
|
-
inline-size: 0;
|
|
634
|
-
min-inline-size: 100%;
|
|
635
|
-
|
|
636
|
-
/* A grid, so the field and now, and the hint and the length, share a
|
|
637
|
-
row without a wrapper the anatomy would have to name. */
|
|
638
|
-
column-gap: var(--slotted-space-2, 0.25rem);
|
|
639
|
-
display: grid;
|
|
640
|
-
grid-area: head;
|
|
641
|
-
grid-template-areas: 'tabs tabs' 'field now' 'hint length' 'limit limit';
|
|
642
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
643
|
-
row-gap: var(--slotted-space-2, 0.25rem);
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
[data-ui='time-range-picker'] [data-part='tabs'] {
|
|
647
|
-
grid-area: tabs;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
[data-ui='time-range-picker'] [data-part='field'] {
|
|
651
|
-
grid-area: field;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
[data-ui='time-range-picker'] [data-part='head'] > [data-part='now'] {
|
|
655
|
-
align-self: center;
|
|
656
|
-
grid-area: now;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
[data-ui='time-range-picker'] [data-part='hint'] {
|
|
660
|
-
align-self: center;
|
|
661
|
-
grid-area: hint;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
[data-ui='time-range-picker'] [data-part='length'] {
|
|
665
|
-
align-self: center;
|
|
666
|
-
grid-area: length;
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
[data-ui='time-range-picker'] [data-part='limit'] {
|
|
670
|
-
grid-area: limit;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
/* ── The two ends, as tabs ────────────────────────────────────────────
|
|
674
|
-
*
|
|
675
|
-
* One end at a time. Two equal halves, the label over the value; the
|
|
676
|
-
* current one carries the underline `date-range-picker` draws under its
|
|
677
|
-
* current field, in the accent, and the other reads as the step to come.
|
|
678
|
-
* The row is the whole width so the two are the same size whatever their
|
|
679
|
-
* values, and a thumb finds them without aiming.
|
|
680
|
-
*/
|
|
681
|
-
[data-ui='time-range-picker'] [data-part='tabs'] {
|
|
682
|
-
border-block-end: var(--slotted-border-width-thin, 1px) solid
|
|
683
|
-
var(
|
|
684
|
-
--slotted-time-range-picker-content-border-color,
|
|
685
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
686
|
-
);
|
|
687
|
-
display: grid;
|
|
688
|
-
gap: var(--slotted-space-2, 0.25rem);
|
|
689
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
[data-ui='time-range-picker'] [data-part='tab'] {
|
|
693
|
-
appearance: none;
|
|
694
|
-
background-color: transparent;
|
|
695
|
-
border: 0;
|
|
696
|
-
border-start-end-radius: var(
|
|
697
|
-
--slotted-time-range-picker-option-radius,
|
|
698
|
-
var(--slotted-radius-sm, 4px)
|
|
699
|
-
);
|
|
700
|
-
border-start-start-radius: var(
|
|
701
|
-
--slotted-time-range-picker-option-radius,
|
|
702
|
-
var(--slotted-radius-sm, 4px)
|
|
703
|
-
);
|
|
704
|
-
color: var(--slotted-time-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
705
|
-
cursor: pointer;
|
|
706
|
-
display: flex;
|
|
707
|
-
flex-direction: column;
|
|
708
|
-
font: inherit;
|
|
709
|
-
gap: var(--slotted-space-1, 0.125rem);
|
|
710
|
-
min-block-size: var(--slotted-time-range-picker-tab-block-size, calc(var(--_row) * 1.5));
|
|
711
|
-
min-inline-size: 0;
|
|
712
|
-
padding-block: var(--slotted-space-2, 0.25rem) var(--slotted-space-3, 0.375rem);
|
|
713
|
-
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
714
|
-
position: relative;
|
|
715
|
-
text-align: start;
|
|
716
|
-
touch-action: manipulation;
|
|
717
|
-
transition: background-color var(--slotted-control-transition-duration)
|
|
718
|
-
var(--slotted-control-transition-easing);
|
|
719
|
-
-webkit-tap-highlight-color: transparent;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
[data-ui='time-range-picker'] [data-part='tab']::after {
|
|
723
|
-
background-color: var(
|
|
724
|
-
--slotted-time-range-picker-current-color,
|
|
725
|
-
var(--slotted-tone-accent-solid)
|
|
726
|
-
);
|
|
727
|
-
block-size: var(--slotted-time-range-picker-current-size, 2px);
|
|
728
|
-
border-start-end-radius: var(--slotted-radius-xs, 2px);
|
|
729
|
-
border-start-start-radius: var(--slotted-radius-xs, 2px);
|
|
730
|
-
content: '';
|
|
731
|
-
/* Over the row's own hairline, so the current tab's mark and the rule
|
|
732
|
-
are one line. */
|
|
733
|
-
inset-block-end: calc(-1 * var(--slotted-border-width-thin, 1px));
|
|
734
|
-
inset-inline: 0;
|
|
735
|
-
opacity: 0;
|
|
736
|
-
position: absolute;
|
|
737
|
-
transition: opacity var(--slotted-control-transition-duration)
|
|
738
|
-
var(--slotted-control-transition-easing);
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
[data-ui='time-range-picker'] [data-part='tab'][data-current]::after {
|
|
742
|
-
opacity: 1;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
[data-ui='time-range-picker'] [data-part='tab']:hover:not(:disabled):not([data-current]) {
|
|
746
|
-
background-color: var(
|
|
747
|
-
--slotted-time-range-picker-option-hover-background,
|
|
748
|
-
var(--slotted-tone-secondary-subtle-hover)
|
|
749
|
-
);
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
[data-ui='time-range-picker'] [data-part='tab']:focus-visible {
|
|
753
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
754
|
-
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
[data-ui='time-range-picker'] [data-part='tab']:disabled {
|
|
758
|
-
color: var(--slotted-disabled-foreground);
|
|
759
|
-
cursor: not-allowed;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
/* The label, in the muted ink for both ends alike: which end is current
|
|
763
|
-
is said once, by the underline. */
|
|
764
|
-
[data-ui='time-range-picker'] [data-part='tab-label'] {
|
|
765
|
-
color: var(--slotted-time-range-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
766
|
-
font-size: var(--slotted-font-size-xs, 11px);
|
|
767
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
768
|
-
letter-spacing: var(--slotted-letter-spacing-wide, 0.02em);
|
|
769
|
-
text-transform: uppercase;
|
|
770
|
-
white-space: nowrap;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
[data-ui='time-range-picker'] [data-part='tab-value'] {
|
|
774
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
775
|
-
font-variant-numeric: tabular-nums;
|
|
776
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
777
|
-
overflow: hidden;
|
|
778
|
-
text-overflow: ellipsis;
|
|
779
|
-
unicode-bidi: plaintext;
|
|
780
|
-
white-space: nowrap;
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
[data-ui='time-range-picker'] [data-part='tab'][data-placeholder] [data-part='tab-value'] {
|
|
784
|
-
color: var(--slotted-time-range-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
785
|
-
font-weight: var(--slotted-font-weight-regular, 400);
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
/* ── The field row ────────────────────────────────────────────────────
|
|
789
|
-
*
|
|
790
|
-
* The current end's field in `plain`, spoken to in the only language this
|
|
791
|
-
* stylesheet is allowed: the tokens the field reads. Its border, inline
|
|
792
|
-
* padding, hover wash, invalid edge and lift are zeroed; its own focus ring
|
|
793
|
-
* stays, because in the band the field is the control the reader is in.
|
|
794
|
-
* `now` sits at the reading end of the same row. On a coarse pointer the
|
|
795
|
-
* row is `now` alone: a segment is a spinbutton and raises no keyboard.
|
|
796
|
-
*/
|
|
797
|
-
[data-ui='time-range-picker'] [data-part='field'] {
|
|
798
|
-
--slotted-control-border-width: 0px;
|
|
799
|
-
--slotted-control-padding-inline-sm: var(--slotted-space-2, 0.25rem);
|
|
800
|
-
--slotted-control-padding-inline-md: var(--slotted-space-2, 0.25rem);
|
|
801
|
-
--slotted-control-padding-inline-lg: var(--slotted-space-2, 0.25rem);
|
|
802
|
-
--slotted-time-field-plain-hover-background: transparent;
|
|
803
|
-
--slotted-time-field-invalid-border-color: transparent;
|
|
804
|
-
--slotted-time-field-shadow: none;
|
|
805
|
-
--slotted-control-shadow-focus-geometry: 0 0 0 0;
|
|
806
|
-
|
|
807
|
-
display: flex;
|
|
808
|
-
flex: 0 1 auto;
|
|
809
|
-
min-inline-size: 0;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
/* ── What to do next ──────────────────────────────────────────────────
|
|
813
|
-
*
|
|
814
|
-
* The hint at the start, the duration at the reading end; the limit on a
|
|
815
|
-
* line of its own under them. The hint is the difference between a panel
|
|
816
|
-
* that refuses and a panel that explains.
|
|
817
|
-
*/
|
|
818
|
-
[data-ui='time-range-picker'] [data-part='hint'] {
|
|
819
|
-
color: var(--slotted-time-range-picker-hint-color, var(--slotted-text-muted, GrayText));
|
|
820
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
821
|
-
min-inline-size: 0;
|
|
822
|
-
padding-inline-start: var(--slotted-space-2, 0.25rem);
|
|
823
|
-
text-wrap: balance;
|
|
824
|
-
unicode-bidi: plaintext;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
[data-ui='time-range-picker'] [data-part='hint'][data-invalid] {
|
|
828
|
-
color: var(--slotted-time-range-picker-invalid-color, var(--slotted-tone-danger-text));
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
/* The duration, at the reading end, in the accent's text tone: it is the
|
|
832
|
-
number the band exists to say. Pending, it drops a step of weight. */
|
|
833
|
-
[data-ui='time-range-picker'] [data-part='length'] {
|
|
834
|
-
color: var(--slotted-time-range-picker-length-color, var(--slotted-tone-accent-text));
|
|
835
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
836
|
-
font-variant-numeric: tabular-nums;
|
|
837
|
-
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
838
|
-
padding-inline: var(--slotted-space-4, 0.5rem) var(--slotted-space-2, 0.25rem);
|
|
839
|
-
unicode-bidi: plaintext;
|
|
840
|
-
white-space: nowrap;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
[data-ui='time-range-picker'] [data-part='length'][data-pending] {
|
|
844
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
/* An empty length still holds its line, so the band does not grow a row
|
|
848
|
-
when the first end is chosen. */
|
|
849
|
-
[data-ui='time-range-picker'] [data-part='length']:empty::before {
|
|
850
|
-
content: '\200B';
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
[data-ui='time-range-picker'] [data-part='limit'] {
|
|
854
|
-
color: var(--slotted-time-range-picker-limit-color, var(--slotted-text-muted, GrayText));
|
|
855
|
-
font-size: var(--slotted-font-size-xs, 11px);
|
|
856
|
-
padding-inline-start: var(--slotted-space-2, 0.25rem);
|
|
857
|
-
unicode-bidi: plaintext;
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
/* ── The panel ────────────────────────────────────────────────────────
|
|
861
|
-
*
|
|
862
|
-
* The current end, one at a time: its list. `data-position` says which.
|
|
863
|
-
*/
|
|
864
|
-
[data-ui='time-range-picker'] [data-part='panel'] {
|
|
865
|
-
display: flex;
|
|
866
|
-
flex-direction: column;
|
|
867
|
-
gap: var(--slotted-space-2, 0.25rem);
|
|
868
|
-
grid-area: panel;
|
|
869
|
-
min-inline-size: 0;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
[data-ui='time-range-picker'] [data-part='now'] {
|
|
873
|
-
appearance: none;
|
|
874
|
-
background-color: transparent;
|
|
875
|
-
border: 0;
|
|
876
|
-
border-radius: var(--slotted-time-range-picker-option-radius, var(--slotted-radius-sm, 4px));
|
|
877
|
-
color: var(--slotted-time-range-picker-now-color, var(--slotted-tone-accent-text));
|
|
878
|
-
cursor: pointer;
|
|
879
|
-
flex: 0 0 auto;
|
|
880
|
-
font: inherit;
|
|
881
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
882
|
-
min-block-size: var(--_row);
|
|
883
|
-
padding-block: var(--slotted-space-1, 0.125rem);
|
|
884
|
-
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
885
|
-
touch-action: manipulation;
|
|
886
|
-
transition: background-color var(--slotted-control-transition-duration)
|
|
887
|
-
var(--slotted-control-transition-easing);
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
[data-ui='time-range-picker'] [data-part='now']:hover:not(:disabled):not([data-disabled]) {
|
|
891
|
-
background-color: var(
|
|
892
|
-
--slotted-time-range-picker-option-hover-background,
|
|
893
|
-
var(--slotted-tone-secondary-subtle-hover)
|
|
894
|
-
);
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
[data-ui='time-range-picker'] [data-part='now']:focus-visible {
|
|
898
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
899
|
-
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
[data-ui='time-range-picker'] [data-part='now']:disabled {
|
|
903
|
-
color: var(--slotted-disabled-foreground);
|
|
904
|
-
cursor: not-allowed;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
/* ── The shortcuts ────────────────────────────────────────────────────
|
|
908
|
-
*
|
|
909
|
-
* This family ships no list of them: "the morning shift" is a business
|
|
910
|
-
* clock. It ships the row they stand in and the chip each one is, between
|
|
911
|
-
* the band and the panel, wrapping when they do not fit.
|
|
912
|
-
*/
|
|
913
|
-
[data-ui='time-range-picker'] [data-part='presets'] {
|
|
914
|
-
display: flex;
|
|
915
|
-
flex-wrap: wrap;
|
|
916
|
-
gap: var(--slotted-space-2, 0.25rem);
|
|
917
|
-
grid-area: presets;
|
|
918
|
-
min-inline-size: 0;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
[data-ui='time-range-picker'] [data-part='preset'] {
|
|
922
|
-
appearance: none;
|
|
923
|
-
background-color: var(
|
|
924
|
-
--slotted-time-range-picker-preset-background,
|
|
925
|
-
var(--slotted-tone-secondary-subtle)
|
|
926
|
-
);
|
|
927
|
-
border: 0;
|
|
928
|
-
border-radius: var(
|
|
929
|
-
--slotted-time-range-picker-preset-radius,
|
|
930
|
-
var(--slotted-radius-pill, 999px)
|
|
931
|
-
);
|
|
932
|
-
color: var(--slotted-time-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
933
|
-
cursor: pointer;
|
|
934
|
-
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
935
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
936
|
-
line-height: var(--slotted-line-height-sm, 1.4);
|
|
937
|
-
min-block-size: var(--_row);
|
|
938
|
-
padding-block: var(--slotted-space-1, 0.125rem);
|
|
939
|
-
padding-inline: var(--slotted-space-4, 0.5rem);
|
|
940
|
-
text-align: start;
|
|
941
|
-
touch-action: manipulation;
|
|
942
|
-
transition:
|
|
943
|
-
background-color var(--slotted-control-transition-duration)
|
|
944
|
-
var(--slotted-control-transition-easing),
|
|
945
|
-
color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
946
|
-
white-space: nowrap;
|
|
947
|
-
-webkit-tap-highlight-color: transparent;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
[data-ui='time-range-picker'] [data-part='preset']:hover:not(:disabled):not([data-selected]) {
|
|
951
|
-
background-color: var(
|
|
952
|
-
--slotted-time-range-picker-preset-hover-background,
|
|
953
|
-
var(--slotted-tone-secondary-subtle-hover)
|
|
954
|
-
);
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
[data-ui='time-range-picker'] [data-part='preset']:active:not(:disabled):not([data-selected]) {
|
|
958
|
-
background-color: var(
|
|
959
|
-
--slotted-time-range-picker-preset-active-background,
|
|
960
|
-
var(--slotted-tone-secondary-subtle-active)
|
|
961
|
-
);
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
[data-ui='time-range-picker'] [data-part='preset'][data-selected] {
|
|
965
|
-
background-color: var(
|
|
966
|
-
--slotted-time-range-picker-preset-selected-background,
|
|
967
|
-
var(--slotted-tone-accent-subtle-hover)
|
|
968
|
-
);
|
|
969
|
-
color: var(--slotted-time-range-picker-preset-selected-color, var(--slotted-tone-accent-text));
|
|
970
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
[data-ui='time-range-picker'] [data-part='preset']:focus-visible {
|
|
974
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
975
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
[data-ui='time-range-picker'] [data-part='preset']:disabled {
|
|
979
|
-
color: var(--slotted-disabled-foreground);
|
|
980
|
-
cursor: not-allowed;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
/* ── The list ─────────────────────────────────────────────────────────
|
|
984
|
-
*
|
|
985
|
-
* One column of times, the current end's, capped in control heights so the
|
|
986
|
-
* cap holds at every density, and scrolled rather than truncated —
|
|
987
|
-
* `time-picker`'s list.
|
|
988
|
-
*/
|
|
989
|
-
[data-ui='time-range-picker'] [data-part='list'] {
|
|
990
|
-
display: flex;
|
|
991
|
-
flex-direction: column;
|
|
992
|
-
/* One step of air between rows, so the chosen row's painted ground and
|
|
993
|
-
the focused row's inset ring never share an edge. */
|
|
994
|
-
gap: var(--slotted-space-1, 0.125rem);
|
|
995
|
-
/* Eight rows and half of the ninth: a list cut on a row boundary looks
|
|
996
|
-
like the whole list. */
|
|
997
|
-
max-block-size: var(--slotted-time-range-picker-list-block-size, calc(var(--_row-pitch) * 8.5));
|
|
998
|
-
min-inline-size: 0;
|
|
999
|
-
overflow-y: auto;
|
|
1000
|
-
/* A highlight moved by a key lands whole rather than half under the edge. */
|
|
1001
|
-
scroll-padding-block: var(--slotted-space-2, 0.25rem);
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
[data-ui='time-range-picker'] [data-part='option'] {
|
|
1005
|
-
/* The time and its duration share a baseline, and the line box is the
|
|
1006
|
-
row: baseline alignment alone would seat both at the top of a row
|
|
1007
|
-
taller than one line, and a length line-height centres them in it. */
|
|
1008
|
-
align-items: baseline;
|
|
1009
|
-
background-color: transparent;
|
|
1010
|
-
border-radius: var(--slotted-time-range-picker-option-radius, var(--slotted-radius-sm, 4px));
|
|
1011
|
-
color: inherit;
|
|
1012
|
-
cursor: pointer;
|
|
1013
|
-
display: flex;
|
|
1014
|
-
flex: 0 0 auto;
|
|
1015
|
-
font-variant-numeric: tabular-nums;
|
|
1016
|
-
gap: var(--slotted-space-3, 0.375rem);
|
|
1017
|
-
justify-content: space-between;
|
|
1018
|
-
line-height: var(--_row);
|
|
1019
|
-
/* The row *is* `--_row`: no block padding on top of it, so eight rows are
|
|
1020
|
-
eight rows and the cap that counts them is arithmetic. */
|
|
1021
|
-
min-block-size: var(--_row);
|
|
1022
|
-
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
1023
|
-
transition:
|
|
1024
|
-
background-color var(--slotted-control-transition-duration)
|
|
1025
|
-
var(--slotted-control-transition-easing),
|
|
1026
|
-
color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
1027
|
-
user-select: none;
|
|
1028
|
-
-webkit-tap-highlight-color: transparent;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
/**
|
|
1032
|
-
* The duration this option would make, beside it: "15:00 · 1 hr", the way
|
|
1033
|
-
* a calendar application lists the end times of an event. It is the answer
|
|
1034
|
-
* to the question the reader is actually asking while choosing an end, read
|
|
1035
|
-
* row by row rather than one option at a time from the band. In the list of
|
|
1036
|
-
* the other end it is the duration to the end already chosen. Muted, so the
|
|
1037
|
-
* time stays what the row is; on the chosen row it takes the row's own ink.
|
|
1038
|
-
*/
|
|
1039
|
-
[data-ui='time-range-picker'] [data-part='option-duration'] {
|
|
1040
|
-
color: var(--slotted-time-range-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
1041
|
-
flex: 0 1 auto;
|
|
1042
|
-
font-size: var(--slotted-font-size-xs, 11px);
|
|
1043
|
-
min-inline-size: 0;
|
|
1044
|
-
overflow: hidden;
|
|
1045
|
-
text-overflow: ellipsis;
|
|
1046
|
-
unicode-bidi: plaintext;
|
|
1047
|
-
white-space: nowrap;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
[data-ui='time-range-picker'] [data-part='option'][data-selected] [data-part='option-duration'],
|
|
1051
|
-
[data-ui='time-range-picker'] [data-part='option'][data-disabled] [data-part='option-duration'] {
|
|
1052
|
-
color: inherit;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
/* ── Option states ────────────────────────────────────────────────────
|
|
1056
|
-
*
|
|
1057
|
-
* Written strongest last, and each weaker one guarded against every stronger
|
|
1058
|
-
* one it can meet: the chosen time outranks the highlight, and the highlight
|
|
1059
|
-
* outranks the pointer. Specificity is what makes this a rule rather than an
|
|
1060
|
-
* ordering — the defect `time-picker` records from its visual gate.
|
|
1061
|
-
*/
|
|
1062
|
-
[data-ui='time-range-picker']
|
|
1063
|
-
[data-part='option']:hover:not([data-disabled]):not([data-selected]):not([data-current]) {
|
|
1064
|
-
background-color: var(
|
|
1065
|
-
--slotted-time-range-picker-option-hover-background,
|
|
1066
|
-
var(--slotted-tone-secondary-subtle-hover)
|
|
1067
|
-
);
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
[data-ui='time-range-picker'] [data-part='option'][data-current]:not([data-selected]) {
|
|
1071
|
-
background-color: var(
|
|
1072
|
-
--slotted-time-range-picker-option-current-background,
|
|
1073
|
-
var(--slotted-tone-secondary-subtle-active)
|
|
1074
|
-
);
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
[data-ui='time-range-picker'] [data-part='option']:focus-visible {
|
|
1078
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
1079
|
-
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
[data-ui='time-range-picker'] [data-part='option'][data-selected] {
|
|
1083
|
-
background-color: var(
|
|
1084
|
-
--slotted-time-range-picker-option-selected-background,
|
|
1085
|
-
var(--slotted-tone-accent-solid)
|
|
1086
|
-
);
|
|
1087
|
-
color: var(
|
|
1088
|
-
--slotted-time-range-picker-option-selected-color,
|
|
1089
|
-
var(--slotted-tone-accent-on-solid)
|
|
1090
|
-
);
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
/* The chosen row still answers the pointer, one step along its own tone. */
|
|
1094
|
-
[data-ui='time-range-picker'] [data-part='option'][data-selected]:hover:not([data-disabled]) {
|
|
1095
|
-
background-color: var(
|
|
1096
|
-
--slotted-time-range-picker-option-selected-hover-background,
|
|
1097
|
-
var(--slotted-tone-accent-solid-hover)
|
|
1098
|
-
);
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
/**
|
|
1102
|
-
* A time a bound, the predicate or the other end refuses. It stays in the
|
|
1103
|
-
* list by default, because a list that silently drops rows is a list whose
|
|
1104
|
-
* step the reader cannot infer — and it is muted to the colour the theme
|
|
1105
|
-
* measures rather than faded by opacity, so it stays readable.
|
|
1106
|
-
*/
|
|
1107
|
-
[data-ui='time-range-picker'] [data-part='option'][data-disabled] {
|
|
1108
|
-
background-color: transparent;
|
|
442
|
+
[data-ui-time-range-picker][data-part-root][data-disabled] [data-part-trigger] > [data-ui-icon] {
|
|
1109
443
|
color: var(--slotted-disabled-foreground);
|
|
1110
|
-
cursor: not-allowed;
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
/* Nothing available for this end at all. A sentence rather than an empty
|
|
1114
|
-
box, the reason `time-picker` records. */
|
|
1115
|
-
[data-ui='time-range-picker'] [data-part='empty'] {
|
|
1116
|
-
align-items: center;
|
|
1117
|
-
color: var(--slotted-time-range-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
1118
|
-
display: flex;
|
|
1119
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
1120
|
-
justify-content: center;
|
|
1121
|
-
min-block-size: calc(var(--_row) * 2);
|
|
1122
|
-
padding: var(--slotted-space-4, 0.5rem);
|
|
1123
|
-
text-align: center;
|
|
1124
|
-
text-wrap: balance;
|
|
1125
|
-
/* A sentence laid out by its own first strong character, so a full stop
|
|
1126
|
-
does not lead it in a right-to-left document. */
|
|
1127
|
-
unicode-bidi: plaintext;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
/* The consumer's own actions and, at the reading end, `done`: the way out
|
|
1131
|
-
of a sheet that fills the screen and of an edit left half way. */
|
|
1132
|
-
[data-ui='time-range-picker'] [data-part='footer'] {
|
|
1133
|
-
box-sizing: border-box;
|
|
1134
|
-
inline-size: 0;
|
|
1135
|
-
min-inline-size: 100%;
|
|
1136
|
-
|
|
1137
|
-
align-items: center;
|
|
1138
|
-
border-block-start: var(--slotted-border-width-thin, 1px) solid
|
|
1139
|
-
var(
|
|
1140
|
-
--slotted-time-range-picker-content-border-color,
|
|
1141
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
1142
|
-
);
|
|
1143
|
-
display: flex;
|
|
1144
|
-
gap: var(--slotted-space-2, 0.25rem);
|
|
1145
|
-
grid-area: footer;
|
|
1146
|
-
justify-content: flex-end;
|
|
1147
|
-
padding-block-start: var(--slotted-space-3, 0.375rem);
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
[data-ui='time-range-picker'] [data-part='done'] {
|
|
1151
|
-
appearance: none;
|
|
1152
|
-
background-color: var(
|
|
1153
|
-
--slotted-time-range-picker-done-background,
|
|
1154
|
-
var(--slotted-tone-accent-solid)
|
|
1155
|
-
);
|
|
1156
|
-
border: 0;
|
|
1157
|
-
border-radius: var(--slotted-time-range-picker-radius, var(--slotted-control-radius, 4px));
|
|
1158
|
-
color: var(--slotted-time-range-picker-done-color, var(--slotted-tone-accent-on-solid, Canvas));
|
|
1159
|
-
cursor: pointer;
|
|
1160
|
-
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
1161
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
1162
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1163
|
-
line-height: var(--slotted-line-height-sm, 1.4);
|
|
1164
|
-
margin-inline-start: auto;
|
|
1165
|
-
min-block-size: var(--_row);
|
|
1166
|
-
padding-block: var(--slotted-space-1, 0.125rem);
|
|
1167
|
-
padding-inline: var(--slotted-space-5, 0.75rem);
|
|
1168
|
-
touch-action: manipulation;
|
|
1169
|
-
transition: background-color var(--slotted-control-transition-duration)
|
|
1170
|
-
var(--slotted-control-transition-easing);
|
|
1171
|
-
-webkit-tap-highlight-color: transparent;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
[data-ui='time-range-picker'] [data-part='done']:hover:not(:disabled) {
|
|
1175
|
-
background-color: var(
|
|
1176
|
-
--slotted-time-range-picker-done-hover-background,
|
|
1177
|
-
var(--slotted-tone-accent-solid-hover)
|
|
1178
|
-
);
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
[data-ui='time-range-picker'] [data-part='done']:active:not(:disabled) {
|
|
1182
|
-
background-color: var(
|
|
1183
|
-
--slotted-time-range-picker-done-active-background,
|
|
1184
|
-
var(--slotted-tone-accent-solid-active)
|
|
1185
|
-
);
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
[data-ui='time-range-picker'] [data-part='done']:focus-visible {
|
|
1189
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
1190
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
/* ── On a finger ──────────────────────────────────────────────────────
|
|
1194
|
-
*
|
|
1195
|
-
* The row is the touch target: the theme raises the control heights to
|
|
1196
|
-
* `--slotted-target-comfortable` under a coarse pointer, and the row is
|
|
1197
|
-
* counted in them. The field is not drawn — a segment is a spinbutton and
|
|
1198
|
-
* raises no keyboard — and the list is the way to a time.
|
|
1199
|
-
*/
|
|
1200
|
-
@media (pointer: coarse) {
|
|
1201
|
-
[data-ui='time-range-picker'] [data-part='field'] {
|
|
1202
|
-
display: none;
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
/* ── Narrow, on a finger ──────────────────────────────────────────────
|
|
1207
|
-
*
|
|
1208
|
-
* §2.7 of `docs/component-features.md` asks for it by name: a popover on the
|
|
1209
|
-
* desktop and a sheet in a narrow viewport. The DOM does not change.
|
|
1210
|
-
*/
|
|
1211
|
-
@media (max-width: 480px) and (pointer: coarse) {
|
|
1212
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-presentation='sheet'] {
|
|
1213
|
-
inset: auto 0 0;
|
|
1214
|
-
position: fixed;
|
|
1215
|
-
translate: 0 var(--slotted-space-9, 2rem);
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-presentation='sheet'][data-open] {
|
|
1219
|
-
translate: 0 0;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-presentation='sheet']
|
|
1223
|
-
[data-part='content'] {
|
|
1224
|
-
border-end-end-radius: 0;
|
|
1225
|
-
border-end-start-radius: 0;
|
|
1226
|
-
border-inline: 0;
|
|
1227
|
-
border-block-end: 0;
|
|
1228
|
-
inline-size: var(--slotted-time-range-picker-sheet-inline-size, 100%);
|
|
1229
|
-
max-inline-size: none;
|
|
1230
|
-
/* A sheet taller than the screen — a grid and a list on a short phone,
|
|
1231
|
-
a list on a phone held sideways — scrolls as one, so the tabs stay
|
|
1232
|
-
reachable rather than above the top edge. `dvh` follows the
|
|
1233
|
-
browser's own bars; `vh` is the fallback. */
|
|
1234
|
-
max-block-size: 100vh;
|
|
1235
|
-
max-block-size: 100dvh;
|
|
1236
|
-
overflow-y: auto;
|
|
1237
|
-
overscroll-behavior: contain;
|
|
1238
|
-
padding-block-end: max(
|
|
1239
|
-
var(--slotted-time-range-picker-content-padding, var(--slotted-space-5, 0.75rem)),
|
|
1240
|
-
env(safe-area-inset-bottom, 0px)
|
|
1241
|
-
);
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
/* Six rows and a half on a phone, at the touch height: the sheet stays
|
|
1245
|
-
under two thirds of the screen and done stays reachable. */
|
|
1246
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-presentation='sheet']
|
|
1247
|
-
[data-part='list'] {
|
|
1248
|
-
max-block-size: calc(var(--_row-pitch) * 6.5);
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
[data-ui='time-range-picker'][data-part='positioner'][data-presentation='sheet']
|
|
1252
|
-
[data-part='tab'] {
|
|
1253
|
-
min-block-size: var(
|
|
1254
|
-
--slotted-time-range-picker-tab-block-size,
|
|
1255
|
-
var(--slotted-target-comfortable, 44px)
|
|
1256
|
-
);
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
@media (forced-colors: active) {
|
|
1261
|
-
[data-ui='time-range-picker'][data-part='root'][data-variant='plain'] [data-part='control'] {
|
|
1262
|
-
border-color: ButtonBorder;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
/* The tab's underline is painted with a background, and forced colours
|
|
1266
|
-
replace a background that is not one of the system's own. */
|
|
1267
|
-
[data-ui='time-range-picker'] [data-part='tab']::after {
|
|
1268
|
-
forced-color-adjust: none;
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
[data-ui='time-range-picker'] [data-part='tab']::after {
|
|
1272
|
-
background-color: currentcolor;
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
[data-ui='time-range-picker'] [data-part='preset'][data-selected],
|
|
1276
|
-
[data-ui='time-range-picker'] [data-part='option'][data-selected] {
|
|
1277
|
-
background-color: Highlight;
|
|
1278
|
-
color: HighlightText;
|
|
1279
|
-
forced-color-adjust: none;
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
[data-ui='time-range-picker'] [data-part='option'][data-current]:not([data-selected]) {
|
|
1283
|
-
outline: var(--slotted-focus-ring-width, 2px) solid Highlight;
|
|
1284
|
-
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
1285
|
-
}
|
|
1286
444
|
}
|
|
1287
445
|
}
|