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