@slotted/styles 0.1.0-beta.2 → 0.1.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/accordion/accordion.css +10 -10
- package/src/action-bar/action-bar.css +45 -42
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +68 -67
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +452 -314
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +71 -41
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +45 -37
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +149 -68
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +79 -74
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +133 -103
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +154 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +258 -248
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +119 -124
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +81 -85
- package/src/collapsible/collapsible.css +72 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +157 -124
- package/src/combobox/combobox.tokens.json +2 -0
- package/src/command-palette/command-palette.css +103 -90
- package/src/command-palette/command-palette.tokens.json +1 -0
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +212 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +184 -114
- package/src/data-grid/data-grid.css +535 -470
- package/src/data-grid/data-grid.tokens.json +4 -0
- package/src/data-list/data-list.css +81 -70
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +57 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +75 -57
- package/src/date-picker/date-picker.tokens.json +1 -0
- package/src/date-range-picker/date-range-picker.css +116 -118
- package/src/datetime-field/datetime-field.css +80 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +63 -63
- package/src/datetime-range-picker/datetime-range-picker.css +151 -156
- package/src/description-list/description-list.css +80 -65
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +376 -153
- package/src/dialog/dialog.tokens.json +6 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +513 -217
- package/src/drawer/drawer.tokens.json +6 -0
- package/src/entity-picker/entity-picker.css +273 -256
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- package/src/event-calendar/event-calendar.css +343 -385
- package/src/field/field.css +74 -78
- package/src/field-group/field-group.css +22 -25
- package/src/filter-bar/filter-bar.css +193 -209
- package/src/form/form.css +34 -24
- package/src/form/form.tokens.json +1 -0
- package/src/fullscreen/fullscreen.css +24 -25
- package/src/grid/grid.css +28 -28
- package/src/highlight/highlight.css +6 -6
- package/src/hover-card/hover-card.css +6 -6
- package/src/icon/icon.css +62 -15
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +39 -39
- package/src/import-export-center/import-export-center.css +135 -156
- package/src/inline/inline.css +27 -27
- package/src/inline-message/inline-message.css +153 -77
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +48 -36
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +36 -15
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +44 -17
- package/src/list/list.tokens.json +4 -0
- package/src/list-item/list-item.css +80 -66
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +56 -59
- package/src/loading-overlay/loading-overlay.css +75 -92
- package/src/markdown/markdown.css +17 -17
- package/src/menu/menu.css +117 -74
- package/src/menu/menu.tokens.json +1 -0
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +192 -202
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +177 -160
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +140 -148
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +83 -83
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +67 -57
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +39 -23
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +339 -284
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +73 -61
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +169 -113
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +251 -104
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +136 -132
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +74 -77
- package/src/runtime-properties.mjs +2 -0
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +39 -32
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +254 -97
- package/src/segmented-control/segmented-control.tokens.json +15 -11
- package/src/select/select.css +153 -132
- package/src/select/select.tokens.json +2 -0
- package/src/side-navigation/side-navigation.css +179 -182
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +62 -40
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +30 -31
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +380 -241
- package/src/stat-card/stat-card.tokens.json +5 -0
- package/src/status-indicator/status-indicator.css +107 -82
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +340 -175
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +57 -56
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +322 -289
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +91 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +147 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +134 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +33 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +74 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +58 -58
- package/src/time-range-picker/time-range-picker.css +128 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +115 -98
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +62 -25
- package/src/toggle/toggle.tokens.json +8 -0
- package/src/toggle-group/toggle-group.css +106 -60
- package/src/toggle-group/toggle-group.tokens.json +10 -0
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +59 -38
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +40 -36
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
* trigger, and the layer the calendar stands on. A family that reached into
|
|
20
20
|
* another family's parts would be a second place to fix one defect.
|
|
21
21
|
*/
|
|
22
|
-
[data-ui
|
|
22
|
+
[data-ui-date-picker][data-part-root] {
|
|
23
23
|
display: block;
|
|
24
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
25
|
+
flex-basis: content;
|
|
24
26
|
/* The anchor the positioner measures is the control, and a block root
|
|
25
27
|
lets the frame take the width the form gave it. */
|
|
26
28
|
inline-size: 100%;
|
|
@@ -35,7 +37,7 @@
|
|
|
35
37
|
* would then have to reach into another family's parts to suppress the first
|
|
36
38
|
* — which is the rule the whole family is built to keep.
|
|
37
39
|
*/
|
|
38
|
-
[data-ui
|
|
40
|
+
[data-ui-date-picker] [data-part-control] {
|
|
39
41
|
--_icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
40
42
|
--_height: var(--slotted-control-height-md, 34px);
|
|
41
43
|
|
|
@@ -46,12 +48,12 @@
|
|
|
46
48
|
position: relative;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
[data-ui
|
|
51
|
+
[data-ui-date-picker][data-part-root][data-size='sm'] [data-part-control] {
|
|
50
52
|
--_icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
51
53
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
[data-ui
|
|
56
|
+
[data-ui-date-picker][data-part-root][data-size='lg'] [data-part-control] {
|
|
55
57
|
--_icon-size: var(--slotted-control-icon-size-lg, 18px);
|
|
56
58
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
57
59
|
}
|
|
@@ -65,7 +67,7 @@
|
|
|
65
67
|
* `Alt`+`ArrowDown` into `PageDown` before the browser sees it, so the chord
|
|
66
68
|
* cannot be the only way in.
|
|
67
69
|
*/
|
|
68
|
-
[data-ui
|
|
70
|
+
[data-ui-date-picker] [data-part-trigger] {
|
|
69
71
|
--slotted-icon-size: var(--_icon-size);
|
|
70
72
|
|
|
71
73
|
align-items: center;
|
|
@@ -110,7 +112,7 @@
|
|
|
110
112
|
|
|
111
113
|
/* The hit area, recovered outside the paint, exactly as every other inner
|
|
112
114
|
control in the library recovers it. */
|
|
113
|
-
[data-ui
|
|
115
|
+
[data-ui-date-picker] [data-part-trigger]::after {
|
|
114
116
|
content: '';
|
|
115
117
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
116
118
|
position: absolute;
|
|
@@ -121,13 +123,13 @@
|
|
|
121
123
|
the hit area above grows to 44 pixels around them. Before the field's
|
|
122
124
|
clear it does not reach across it. */
|
|
123
125
|
@media (pointer: coarse) {
|
|
124
|
-
[data-ui
|
|
126
|
+
[data-ui-date-picker] [data-part-trigger]::after {
|
|
125
127
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
126
128
|
}
|
|
127
129
|
|
|
128
|
-
[data-ui
|
|
129
|
-
[data-part
|
|
130
|
-
> [data-part
|
|
130
|
+
[data-ui-date-picker]
|
|
131
|
+
[data-part-end]:has(+ [data-part-clear]:not([hidden]))
|
|
132
|
+
> [data-part-trigger]::after {
|
|
131
133
|
inset-inline-end: 0;
|
|
132
134
|
}
|
|
133
135
|
}
|
|
@@ -142,14 +144,14 @@
|
|
|
142
144
|
* that never changes.
|
|
143
145
|
*/
|
|
144
146
|
|
|
145
|
-
[data-ui
|
|
147
|
+
[data-ui-date-picker] [data-part-trigger]:hover:not(:disabled):not([data-disabled]) {
|
|
146
148
|
background-color: var(
|
|
147
149
|
--slotted-date-picker-trigger-hover-background,
|
|
148
150
|
var(--slotted-tone-secondary-subtle-hover)
|
|
149
151
|
);
|
|
150
152
|
}
|
|
151
153
|
|
|
152
|
-
[data-ui
|
|
154
|
+
[data-ui-date-picker] [data-part-trigger]:active:not(:disabled):not([data-disabled]) {
|
|
153
155
|
background-color: var(
|
|
154
156
|
--slotted-date-picker-trigger-active-background,
|
|
155
157
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -158,19 +160,19 @@
|
|
|
158
160
|
|
|
159
161
|
/* Its own ring: tabbing from the last segment to the trigger has to move
|
|
160
162
|
something visible, and the frame's ring would sit still. */
|
|
161
|
-
[data-ui
|
|
163
|
+
[data-ui-date-picker] [data-part-trigger]:focus-visible {
|
|
162
164
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
163
165
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
164
166
|
}
|
|
165
167
|
|
|
166
|
-
[data-ui
|
|
168
|
+
[data-ui-date-picker][data-part-root][data-invalid] {
|
|
167
169
|
--slotted-focus-ring-color: var(
|
|
168
170
|
--slotted-date-picker-invalid-focus-ring-color,
|
|
169
171
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
170
172
|
);
|
|
171
173
|
}
|
|
172
174
|
|
|
173
|
-
[data-ui
|
|
175
|
+
[data-ui-date-picker] [data-part-trigger]:disabled {
|
|
174
176
|
color: var(--slotted-disabled-foreground);
|
|
175
177
|
cursor: not-allowed;
|
|
176
178
|
}
|
|
@@ -181,7 +183,7 @@
|
|
|
181
183
|
* onto. The painted surface is one element in, as `tooltip`, `popover`,
|
|
182
184
|
* `menu` and `select` are all built.
|
|
183
185
|
*/
|
|
184
|
-
[data-ui
|
|
186
|
+
[data-ui-date-picker][data-part-positioner] {
|
|
185
187
|
/* Only the block inset: the positioner writes `left` and never `right`,
|
|
186
188
|
and `inset-inline-start` would resolve to `right` in a right-to-left
|
|
187
189
|
document and win over the measured value. */
|
|
@@ -200,24 +202,20 @@
|
|
|
200
202
|
positioner named as origin moved the far edge and read as an entrance
|
|
201
203
|
from the side. */
|
|
202
204
|
--_enter-distance: var(--slotted-space-2, 0.25rem);
|
|
203
|
-
opacity: 0;
|
|
204
205
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
205
|
-
transition:
|
|
206
|
-
opacity var(--slotted-duration-short) var(--slotted-easing-exit),
|
|
207
|
-
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
206
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
208
207
|
}
|
|
209
208
|
|
|
210
|
-
[data-ui
|
|
209
|
+
[data-ui-date-picker][data-part-positioner][data-side='top'] {
|
|
211
210
|
translate: 0 var(--_enter-distance);
|
|
212
211
|
}
|
|
213
212
|
|
|
214
213
|
/* A lateral side has no block direction to arrive from, so it only fades. */
|
|
215
|
-
[data-ui
|
|
214
|
+
[data-ui-date-picker][data-part-positioner]:is([data-side='left'], [data-side='right']) {
|
|
216
215
|
translate: 0 0;
|
|
217
216
|
}
|
|
218
217
|
|
|
219
|
-
[data-ui
|
|
220
|
-
opacity: 1;
|
|
218
|
+
[data-ui-date-picker][data-part-positioner][data-open] {
|
|
221
219
|
translate: 0 0;
|
|
222
220
|
transition: none;
|
|
223
221
|
}
|
|
@@ -232,32 +230,23 @@
|
|
|
232
230
|
* markup — the harness, a docs snippet — is simply there, and is
|
|
233
231
|
* photographed where it stands.
|
|
234
232
|
*/
|
|
235
|
-
[data-ui
|
|
233
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned] {
|
|
236
234
|
animation: slotted-date-picker-enter-down var(--slotted-duration-medium)
|
|
237
235
|
var(--slotted-easing-enter);
|
|
238
236
|
}
|
|
239
237
|
|
|
240
|
-
[data-ui
|
|
238
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned][data-side='top'] {
|
|
241
239
|
animation-name: slotted-date-picker-enter-up;
|
|
242
240
|
}
|
|
243
241
|
|
|
244
|
-
[data-ui='date-picker'][data-part='positioner'][data-open][data-positioned]:is(
|
|
245
|
-
[data-side='left'],
|
|
246
|
-
[data-side='right']
|
|
247
|
-
) {
|
|
248
|
-
animation-name: slotted-date-picker-fade;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
242
|
@keyframes slotted-date-picker-enter-down {
|
|
252
243
|
from {
|
|
253
|
-
opacity: 0;
|
|
254
244
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
255
245
|
}
|
|
256
246
|
}
|
|
257
247
|
|
|
258
248
|
@keyframes slotted-date-picker-enter-up {
|
|
259
249
|
from {
|
|
260
|
-
opacity: 0;
|
|
261
250
|
translate: 0 var(--_enter-distance);
|
|
262
251
|
}
|
|
263
252
|
}
|
|
@@ -268,27 +257,48 @@
|
|
|
268
257
|
}
|
|
269
258
|
}
|
|
270
259
|
|
|
260
|
+
/**
|
|
261
|
+
* The fade belongs to the part that paints the surface, and the layer only
|
|
262
|
+
* moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
|
|
263
|
+
* of what it holds, so a `backdrop-filter` on the content blurs nothing until
|
|
264
|
+
* the layer is opaque and then appears at once. The content's own opacity
|
|
265
|
+
* leaves its own filter drawn on every frame of the motion.
|
|
266
|
+
*/
|
|
267
|
+
[data-ui-date-picker][data-part-positioner] > [data-part-content] {
|
|
268
|
+
opacity: 0;
|
|
269
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
[data-ui-date-picker][data-part-positioner][data-open] > [data-part-content] {
|
|
273
|
+
opacity: 1;
|
|
274
|
+
transition: none;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned] > [data-part-content] {
|
|
278
|
+
animation: slotted-date-picker-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
279
|
+
}
|
|
280
|
+
|
|
271
281
|
/* Stillness keeps the fade and drops the movement. */
|
|
272
282
|
@media (prefers-reduced-motion: reduce) {
|
|
273
|
-
[data-ui
|
|
274
|
-
[data-ui
|
|
275
|
-
[data-ui
|
|
276
|
-
[data-ui
|
|
283
|
+
[data-ui-date-picker][data-part-positioner],
|
|
284
|
+
[data-ui-date-picker][data-part-positioner][data-side='top'],
|
|
285
|
+
[data-ui-date-picker][data-part-positioner][data-side='left'],
|
|
286
|
+
[data-ui-date-picker][data-part-positioner][data-side='right'] {
|
|
277
287
|
translate: 0 0;
|
|
278
|
-
transition:
|
|
288
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
279
289
|
}
|
|
280
290
|
|
|
281
|
-
[data-ui
|
|
282
|
-
[data-ui
|
|
283
|
-
[data-ui
|
|
284
|
-
[data-ui
|
|
285
|
-
animation-name:
|
|
291
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned],
|
|
292
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned][data-side='top'],
|
|
293
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned][data-side='left'],
|
|
294
|
+
[data-ui-date-picker][data-part-positioner][data-open][data-positioned][data-side='right'] {
|
|
295
|
+
animation-name: none;
|
|
286
296
|
}
|
|
287
297
|
}
|
|
288
298
|
|
|
289
299
|
/* The anchor scrolled out of its own clipper. The calendar is still open and
|
|
290
300
|
still belongs to a control the reader can no longer see. */
|
|
291
|
-
[data-ui
|
|
301
|
+
[data-ui-date-picker][data-part-positioner][data-detached] {
|
|
292
302
|
visibility: hidden;
|
|
293
303
|
}
|
|
294
304
|
|
|
@@ -298,7 +308,7 @@
|
|
|
298
308
|
* wide as the form, and forcing one to the other would either crush the grid
|
|
299
309
|
* or stretch it.
|
|
300
310
|
*/
|
|
301
|
-
[data-ui
|
|
311
|
+
[data-ui-date-picker] [data-part-content] {
|
|
302
312
|
background-color: var(--slotted-date-picker-surface, var(--slotted-surface-raised, Canvas));
|
|
303
313
|
border: var(--slotted-border-width-thin, 1px) solid
|
|
304
314
|
var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
@@ -324,15 +334,25 @@
|
|
|
324
334
|
padding: var(--slotted-date-picker-content-padding, var(--slotted-space-5, 0.75rem));
|
|
325
335
|
/* The layer above gave up the pointer; the surface takes it back. */
|
|
326
336
|
pointer-events: auto;
|
|
337
|
+
/* A theme that paints this surface as a translucent material blurs what moves behind it. */
|
|
338
|
+
-webkit-backdrop-filter: var(--slotted-date-picker-content-backdrop-filter, none);
|
|
339
|
+
backdrop-filter: var(--slotted-date-picker-content-backdrop-filter, none);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
343
|
+
[data-ui-date-picker] [data-part-content] {
|
|
344
|
+
-webkit-backdrop-filter: none;
|
|
345
|
+
backdrop-filter: none;
|
|
346
|
+
}
|
|
327
347
|
}
|
|
328
348
|
|
|
329
349
|
/* The shortcuts take a column of their own only when there are any. */
|
|
330
|
-
[data-ui
|
|
350
|
+
[data-ui-date-picker] [data-part-content]:has([data-part-presets]) {
|
|
331
351
|
grid-template-areas: 'presets calendar' 'footer footer';
|
|
332
352
|
grid-template-columns: auto auto;
|
|
333
353
|
}
|
|
334
354
|
|
|
335
|
-
[data-ui
|
|
355
|
+
[data-ui-date-picker] [data-part-content] > [data-ui-calendar] {
|
|
336
356
|
grid-area: calendar;
|
|
337
357
|
}
|
|
338
358
|
|
|
@@ -341,7 +361,7 @@
|
|
|
341
361
|
* days" is a business calendar and a library that guessed at one would be
|
|
342
362
|
* guessing at a fiscal year. What it ships is the column they stand in.
|
|
343
363
|
*/
|
|
344
|
-
[data-ui
|
|
364
|
+
[data-ui-date-picker] [data-part-presets] {
|
|
345
365
|
/* A list of shortcuts reads from the start edge. Stretched, each button
|
|
346
366
|
centred its own label and the four labels formed a ragged column with
|
|
347
367
|
no left edge to run down. */
|
|
@@ -355,7 +375,7 @@
|
|
|
355
375
|
padding-inline-end: var(--slotted-space-5, 0.75rem);
|
|
356
376
|
}
|
|
357
377
|
|
|
358
|
-
[data-ui
|
|
378
|
+
[data-ui-date-picker] [data-part-footer] {
|
|
359
379
|
align-items: center;
|
|
360
380
|
border-block-start: var(--slotted-border-width-thin, 1px) solid
|
|
361
381
|
var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
@@ -377,7 +397,7 @@
|
|
|
377
397
|
* ask, and the question really is how much screen there is.
|
|
378
398
|
*/
|
|
379
399
|
@media (max-width: 480px) and (pointer: coarse) {
|
|
380
|
-
[data-ui
|
|
400
|
+
[data-ui-date-picker][data-part-positioner][data-presentation='sheet'] {
|
|
381
401
|
/* The positioner's own measurement is overridden here on purpose: a
|
|
382
402
|
sheet is not placed against an anchor, it is placed against the
|
|
383
403
|
screen. */
|
|
@@ -388,12 +408,11 @@
|
|
|
388
408
|
translate: 0 var(--slotted-space-9, 2rem);
|
|
389
409
|
}
|
|
390
410
|
|
|
391
|
-
[data-ui
|
|
411
|
+
[data-ui-date-picker][data-part-positioner][data-presentation='sheet'][data-open] {
|
|
392
412
|
translate: 0 0;
|
|
393
413
|
}
|
|
394
414
|
|
|
395
|
-
[data-ui
|
|
396
|
-
[data-part='content'] {
|
|
415
|
+
[data-ui-date-picker][data-part-positioner][data-presentation='sheet'] [data-part-content] {
|
|
397
416
|
border-end-end-radius: 0;
|
|
398
417
|
border-end-start-radius: 0;
|
|
399
418
|
border-inline: 0;
|
|
@@ -404,8 +423,7 @@
|
|
|
404
423
|
justify-content: center;
|
|
405
424
|
}
|
|
406
425
|
|
|
407
|
-
[data-ui
|
|
408
|
-
[data-part='presets'] {
|
|
426
|
+
[data-ui-date-picker][data-part-positioner][data-presentation='sheet'] [data-part-presets] {
|
|
409
427
|
/* Beside the grid there is no room for a column of shortcuts, so they
|
|
410
428
|
become a row above it and keep their labels. */
|
|
411
429
|
border-inline-end: 0;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"--slotted-control-radius",
|
|
12
12
|
"--slotted-control-transition-duration",
|
|
13
13
|
"--slotted-control-transition-easing",
|
|
14
|
+
"--slotted-date-picker-content-backdrop-filter",
|
|
14
15
|
"--slotted-date-picker-content-border-color",
|
|
15
16
|
"--slotted-date-picker-content-color",
|
|
16
17
|
"--slotted-date-picker-content-padding",
|