@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.30
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 +96 -96
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +455 -328
- package/src/app-shell/app-shell.tokens.json +5 -2
- 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 +68 -65
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +158 -157
- package/src/cascader/cascader.tokens.json +1 -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 +76 -80
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +203 -130
- package/src/combobox/combobox.tokens.json +3 -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 +185 -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 +434 -198
- package/src/dialog/dialog.tokens.json +7 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +597 -236
- package/src/drawer/drawer.tokens.json +13 -0
- package/src/entity-picker/entity-picker.css +323 -270
- package/src/entity-picker/entity-picker.tokens.json +3 -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 +99 -25
- package/src/form/form.tokens.json +5 -0
- 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 +144 -165
- 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 +162 -82
- package/src/menu/menu.tokens.json +2 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1250 -1253
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +230 -172
- package/src/multi-select/multi-select.tokens.json +2 -0
- package/src/navigation-menu/navigation-menu.css +169 -190
- package/src/notification-center/notification-center.css +153 -161
- package/src/notification-center/notification-center.tokens.json +3 -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 +341 -286
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +75 -79
- package/src/popover/popover.css +81 -64
- package/src/popover/popover.tokens.json +1 -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 +94 -101
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +44 -37
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +210 -147
- package/src/select/select.tokens.json +3 -0
- package/src/side-navigation/side-navigation.css +193 -196
- 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 +138 -121
- package/src/toast/toast.tokens.json +6 -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 +64 -73
- 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
|
@@ -28,8 +28,10 @@
|
|
|
28
28
|
* here restyles a segment or a day cell. This stylesheet owns the box the
|
|
29
29
|
* positioner measures, the trigger inside the field, the layer, and the list.
|
|
30
30
|
*/
|
|
31
|
-
[data-ui
|
|
31
|
+
[data-ui-datetime-picker][data-part-root] {
|
|
32
32
|
display: block;
|
|
33
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
34
|
+
flex-basis: content;
|
|
33
35
|
/* The anchor the positioner measures is the control, and a block root lets
|
|
34
36
|
the frame take the width the form gave it. */
|
|
35
37
|
inline-size: 100%;
|
|
@@ -41,7 +43,7 @@
|
|
|
41
43
|
* It draws no frame: the `datetime-field` inside it draws its own, and the
|
|
42
44
|
* trigger is handed to that field's `end` slot by the binding.
|
|
43
45
|
*/
|
|
44
|
-
[data-ui
|
|
46
|
+
[data-ui-datetime-picker] [data-part-control] {
|
|
45
47
|
--_icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
46
48
|
--_height: var(--slotted-control-height-md, 34px);
|
|
47
49
|
|
|
@@ -52,12 +54,21 @@
|
|
|
52
54
|
position: relative;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
/**
|
|
58
|
+
* The `datetime-field` is the control's flex item, and its own basis is its
|
|
59
|
+
* content. It grows to the control, so the frame takes the width the field
|
|
60
|
+
* gave the root: the whole field at `full`, the step at `short` and `medium`.
|
|
61
|
+
*/
|
|
62
|
+
[data-ui-datetime-picker] [data-part-control] > [data-ui-datetime-field] {
|
|
63
|
+
flex: 1 1 auto;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[data-ui-datetime-picker][data-part-root][data-size='sm'] [data-part-control] {
|
|
56
67
|
--_icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
57
68
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
58
69
|
}
|
|
59
70
|
|
|
60
|
-
[data-ui
|
|
71
|
+
[data-ui-datetime-picker][data-part-root][data-size='lg'] [data-part-control] {
|
|
61
72
|
--_icon-size: var(--slotted-control-icon-size-lg, 18px);
|
|
62
73
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
63
74
|
}
|
|
@@ -76,7 +87,7 @@
|
|
|
76
87
|
* `Alt`+`ArrowDown` into `PageDown` before the browser sees it, so the chord
|
|
77
88
|
* cannot be the only way in.
|
|
78
89
|
*/
|
|
79
|
-
[data-ui
|
|
90
|
+
[data-ui-datetime-picker] [data-part-trigger] {
|
|
80
91
|
--slotted-icon-size: var(--_icon-size);
|
|
81
92
|
|
|
82
93
|
align-items: center;
|
|
@@ -121,7 +132,7 @@
|
|
|
121
132
|
|
|
122
133
|
/* The hit area, recovered outside the paint, exactly as every other inner
|
|
123
134
|
control in the library recovers it. */
|
|
124
|
-
[data-ui
|
|
135
|
+
[data-ui-datetime-picker] [data-part-trigger]::after {
|
|
125
136
|
content: '';
|
|
126
137
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
127
138
|
position: absolute;
|
|
@@ -132,25 +143,25 @@
|
|
|
132
143
|
the hit area above grows to 44 pixels around them. Before the field's
|
|
133
144
|
clear it does not reach across it. */
|
|
134
145
|
@media (pointer: coarse) {
|
|
135
|
-
[data-ui
|
|
146
|
+
[data-ui-datetime-picker] [data-part-trigger]::after {
|
|
136
147
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
137
148
|
}
|
|
138
149
|
|
|
139
|
-
[data-ui
|
|
140
|
-
[data-part
|
|
141
|
-
> [data-part
|
|
150
|
+
[data-ui-datetime-picker]
|
|
151
|
+
[data-part-end]:has(+ [data-part-clear]:not([hidden]))
|
|
152
|
+
> [data-part-trigger]::after {
|
|
142
153
|
inset-inline-end: 0;
|
|
143
154
|
}
|
|
144
155
|
}
|
|
145
156
|
|
|
146
|
-
[data-ui
|
|
157
|
+
[data-ui-datetime-picker] [data-part-trigger]:hover:not(:disabled):not([data-disabled]) {
|
|
147
158
|
background-color: var(
|
|
148
159
|
--slotted-datetime-picker-trigger-hover-background,
|
|
149
160
|
var(--slotted-tone-secondary-subtle-hover)
|
|
150
161
|
);
|
|
151
162
|
}
|
|
152
163
|
|
|
153
|
-
[data-ui
|
|
164
|
+
[data-ui-datetime-picker] [data-part-trigger]:active:not(:disabled):not([data-disabled]) {
|
|
154
165
|
background-color: var(
|
|
155
166
|
--slotted-datetime-picker-trigger-active-background,
|
|
156
167
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -159,19 +170,19 @@
|
|
|
159
170
|
|
|
160
171
|
/* Its own ring: tabbing from the last segment to the trigger has to move
|
|
161
172
|
something visible, and the frame's ring would sit still. */
|
|
162
|
-
[data-ui
|
|
173
|
+
[data-ui-datetime-picker] [data-part-trigger]:focus-visible {
|
|
163
174
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
164
175
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
165
176
|
}
|
|
166
177
|
|
|
167
|
-
[data-ui
|
|
178
|
+
[data-ui-datetime-picker][data-part-root][data-invalid] {
|
|
168
179
|
--slotted-focus-ring-color: var(
|
|
169
180
|
--slotted-datetime-picker-invalid-focus-ring-color,
|
|
170
181
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
171
182
|
);
|
|
172
183
|
}
|
|
173
184
|
|
|
174
|
-
[data-ui
|
|
185
|
+
[data-ui-datetime-picker] [data-part-trigger]:disabled {
|
|
175
186
|
color: var(--slotted-disabled-foreground);
|
|
176
187
|
cursor: not-allowed;
|
|
177
188
|
}
|
|
@@ -182,7 +193,7 @@
|
|
|
182
193
|
* onto. The painted surface is one element in, as every anchored family in
|
|
183
194
|
* the library is built.
|
|
184
195
|
*/
|
|
185
|
-
[data-ui
|
|
196
|
+
[data-ui-datetime-picker][data-part-positioner] {
|
|
186
197
|
/* Only the block inset: the positioner writes `left` and never `right`,
|
|
187
198
|
and `inset-inline-start` would resolve to `right` in a right-to-left
|
|
188
199
|
document and win over the measured value. */
|
|
@@ -206,16 +217,16 @@
|
|
|
206
217
|
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
207
218
|
}
|
|
208
219
|
|
|
209
|
-
[data-ui
|
|
220
|
+
[data-ui-datetime-picker][data-part-positioner][data-side='top'] {
|
|
210
221
|
translate: 0 var(--_enter-distance);
|
|
211
222
|
}
|
|
212
223
|
|
|
213
224
|
/* A lateral side has no block direction to arrive from, so it only fades. */
|
|
214
|
-
[data-ui
|
|
225
|
+
[data-ui-datetime-picker][data-part-positioner]:is([data-side='left'], [data-side='right']) {
|
|
215
226
|
translate: 0 0;
|
|
216
227
|
}
|
|
217
228
|
|
|
218
|
-
[data-ui
|
|
229
|
+
[data-ui-datetime-picker][data-part-positioner][data-open] {
|
|
219
230
|
opacity: 1;
|
|
220
231
|
translate: 0 0;
|
|
221
232
|
transition: none;
|
|
@@ -229,16 +240,16 @@
|
|
|
229
240
|
* harness, a docs snippet — is simply there, and is photographed where it
|
|
230
241
|
* stands.
|
|
231
242
|
*/
|
|
232
|
-
[data-ui
|
|
243
|
+
[data-ui-datetime-picker][data-part-positioner][data-open][data-positioned] {
|
|
233
244
|
animation: slotted-datetime-picker-enter-down var(--slotted-duration-medium)
|
|
234
245
|
var(--slotted-easing-enter);
|
|
235
246
|
}
|
|
236
247
|
|
|
237
|
-
[data-ui
|
|
248
|
+
[data-ui-datetime-picker][data-part-positioner][data-open][data-positioned][data-side='top'] {
|
|
238
249
|
animation-name: slotted-datetime-picker-enter-up;
|
|
239
250
|
}
|
|
240
251
|
|
|
241
|
-
[data-ui
|
|
252
|
+
[data-ui-datetime-picker][data-part-positioner][data-open][data-positioned]:is(
|
|
242
253
|
[data-side='left'],
|
|
243
254
|
[data-side='right']
|
|
244
255
|
) {
|
|
@@ -267,25 +278,25 @@
|
|
|
267
278
|
|
|
268
279
|
/* Stillness keeps the fade and drops the movement. */
|
|
269
280
|
@media (prefers-reduced-motion: reduce) {
|
|
270
|
-
[data-ui
|
|
271
|
-
[data-ui
|
|
272
|
-
[data-ui
|
|
273
|
-
[data-ui
|
|
281
|
+
[data-ui-datetime-picker][data-part-positioner],
|
|
282
|
+
[data-ui-datetime-picker][data-part-positioner][data-side='top'],
|
|
283
|
+
[data-ui-datetime-picker][data-part-positioner][data-side='left'],
|
|
284
|
+
[data-ui-datetime-picker][data-part-positioner][data-side='right'] {
|
|
274
285
|
translate: 0 0;
|
|
275
286
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
276
287
|
}
|
|
277
288
|
|
|
278
|
-
[data-ui
|
|
279
|
-
[data-ui
|
|
280
|
-
[data-ui
|
|
281
|
-
[data-ui
|
|
289
|
+
[data-ui-datetime-picker][data-part-positioner][data-open][data-positioned],
|
|
290
|
+
[data-ui-datetime-picker][data-part-positioner][data-open][data-positioned][data-side='top'],
|
|
291
|
+
[data-ui-datetime-picker][data-part-positioner][data-open][data-positioned][data-side='left'],
|
|
292
|
+
[data-ui-datetime-picker][data-part-positioner][data-open][data-positioned][data-side='right'] {
|
|
282
293
|
animation-name: slotted-datetime-picker-fade;
|
|
283
294
|
}
|
|
284
295
|
}
|
|
285
296
|
|
|
286
297
|
/* The anchor scrolled out of its own clipper. The panel is still open and
|
|
287
298
|
still belongs to a control the reader can no longer see. */
|
|
288
|
-
[data-ui
|
|
299
|
+
[data-ui-datetime-picker][data-part-positioner][data-detached] {
|
|
289
300
|
visibility: hidden;
|
|
290
301
|
}
|
|
291
302
|
|
|
@@ -301,14 +312,25 @@
|
|
|
301
312
|
* a calendar needs; the two panels wrap instead, which needs no threshold to
|
|
302
313
|
* guess at and cannot be wrong at a width nobody tested.
|
|
303
314
|
*/
|
|
304
|
-
[data-ui
|
|
315
|
+
[data-ui-datetime-picker] [data-part-content] {
|
|
316
|
+
--_content-radius: var(--slotted-datetime-picker-content-radius, var(--slotted-radius-lg, 8px));
|
|
317
|
+
--_content-padding: var(
|
|
318
|
+
--slotted-datetime-picker-content-padding,
|
|
319
|
+
var(--slotted-space-3, 0.375rem)
|
|
320
|
+
);
|
|
321
|
+
/* Concentric with the panel: its radius less the inset, floored at 0. */
|
|
322
|
+
--_option-radius: var(
|
|
323
|
+
--slotted-datetime-picker-option-radius,
|
|
324
|
+
max(0px, calc(var(--_content-radius) - var(--_content-padding)))
|
|
325
|
+
);
|
|
326
|
+
|
|
305
327
|
background-color: var(--slotted-datetime-picker-surface, var(--slotted-surface-raised, Canvas));
|
|
306
328
|
border: var(--slotted-border-width-thin, 1px) solid
|
|
307
329
|
var(
|
|
308
330
|
--slotted-datetime-picker-content-border-color,
|
|
309
331
|
var(--slotted-border-subtle, ButtonBorder)
|
|
310
332
|
);
|
|
311
|
-
border-radius: var(--
|
|
333
|
+
border-radius: var(--_content-radius);
|
|
312
334
|
box-shadow: var(--slotted-datetime-picker-content-shadow, var(--slotted-shadow-md));
|
|
313
335
|
box-sizing: border-box;
|
|
314
336
|
color: var(--slotted-datetime-picker-content-color, var(--slotted-text, CanvasText));
|
|
@@ -330,7 +352,7 @@
|
|
|
330
352
|
grid-template-columns: minmax(0, 1fr);
|
|
331
353
|
inline-size: auto;
|
|
332
354
|
max-inline-size: min(34rem, var(--slotted-positioner-available-width, 34rem));
|
|
333
|
-
padding: var(--
|
|
355
|
+
padding: var(--_content-padding);
|
|
334
356
|
/* The layer above gave up the pointer; the surface takes it back. */
|
|
335
357
|
pointer-events: auto;
|
|
336
358
|
}
|
|
@@ -354,7 +376,7 @@
|
|
|
354
376
|
* The rule under it is what makes this a band rather than a line of text
|
|
355
377
|
* floating over two columns.
|
|
356
378
|
*/
|
|
357
|
-
[data-ui
|
|
379
|
+
[data-ui-datetime-picker] [data-part-head] {
|
|
358
380
|
/**
|
|
359
381
|
* The band renders at the panel's width and contributes nothing to it.
|
|
360
382
|
*
|
|
@@ -413,7 +435,7 @@
|
|
|
413
435
|
* surface's ink and a step of weight, and its digits line up with the list's
|
|
414
436
|
* below it.
|
|
415
437
|
*/
|
|
416
|
-
[data-ui
|
|
438
|
+
[data-ui-datetime-picker] [data-part-head-value] {
|
|
417
439
|
color: var(--slotted-datetime-picker-content-color, var(--slotted-text, CanvasText));
|
|
418
440
|
font-size: var(--slotted-font-size-sm, 13px);
|
|
419
441
|
font-variant-numeric: tabular-nums;
|
|
@@ -430,7 +452,7 @@
|
|
|
430
452
|
* the half they have. It is the family's own answer to a value that is not
|
|
431
453
|
* whole, said where the reader is looking rather than only in the field.
|
|
432
454
|
*/
|
|
433
|
-
[data-ui
|
|
455
|
+
[data-ui-datetime-picker] [data-part-head-value] [data-placeholder] {
|
|
434
456
|
color: var(--slotted-datetime-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
435
457
|
}
|
|
436
458
|
|
|
@@ -441,7 +463,7 @@
|
|
|
441
463
|
* It is drawn as a control and not as a link. `time-picker` writes its own
|
|
442
464
|
* `now` as accent text, and alone at the head of a single list that reads
|
|
443
465
|
* correctly; here it stands at the end of a band opposite a title, where bare
|
|
444
|
-
*
|
|
466
|
+
* colored text is a third register beside the panel's plain ink and its one
|
|
445
467
|
* solid accent block — it read as a stray link rather than as the shortcut it
|
|
446
468
|
* is. A quiet bordered control at the small step is the shape the library
|
|
447
469
|
* already gives an action of this weight, and the divergence from the sibling
|
|
@@ -452,7 +474,7 @@
|
|
|
452
474
|
* the mark names what it does, and at the control glyph size inside a control
|
|
453
475
|
* it is legible rather than a speck beside a word.
|
|
454
476
|
*/
|
|
455
|
-
[data-ui
|
|
477
|
+
[data-ui-datetime-picker] [data-part-now] {
|
|
456
478
|
align-items: center;
|
|
457
479
|
appearance: none;
|
|
458
480
|
background-color: var(--slotted-datetime-picker-now-background, transparent);
|
|
@@ -491,14 +513,14 @@
|
|
|
491
513
|
* `sm` icon step — takes the muted ink the label does not, so the pair reads
|
|
492
514
|
* as one control with a glyph rather than as two things of equal weight.
|
|
493
515
|
*/
|
|
494
|
-
[data-ui
|
|
495
|
-
/* No system
|
|
516
|
+
[data-ui-datetime-picker] [data-part-now] > [data-ui-icon] {
|
|
517
|
+
/* No system color: a theme that never loaded should let the mark take the
|
|
496
518
|
label's ink rather than the operating system's own grey, which is the
|
|
497
519
|
rule `fallbacks.test.mjs` holds. */
|
|
498
520
|
color: var(--slotted-datetime-picker-now-icon-color, var(--slotted-text-muted));
|
|
499
521
|
}
|
|
500
522
|
|
|
501
|
-
[data-ui
|
|
523
|
+
[data-ui-datetime-picker] [data-part-now]:hover:not(:disabled):not([data-disabled]) {
|
|
502
524
|
background-color: var(
|
|
503
525
|
--slotted-datetime-picker-now-hover-background,
|
|
504
526
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -509,14 +531,14 @@
|
|
|
509
531
|
);
|
|
510
532
|
}
|
|
511
533
|
|
|
512
|
-
[data-ui
|
|
534
|
+
[data-ui-datetime-picker] [data-part-now]:active:not(:disabled):not([data-disabled]) {
|
|
513
535
|
background-color: var(
|
|
514
536
|
--slotted-datetime-picker-now-active-background,
|
|
515
537
|
var(--slotted-tone-secondary-subtle-active)
|
|
516
538
|
);
|
|
517
539
|
}
|
|
518
540
|
|
|
519
|
-
[data-ui
|
|
541
|
+
[data-ui-datetime-picker] [data-part-now]:focus-visible {
|
|
520
542
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
521
543
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
522
544
|
}
|
|
@@ -527,7 +549,7 @@
|
|
|
527
549
|
* guessing at an industry. What it ships is the row they stand in, at the
|
|
528
550
|
* reading end of the head beside `now`.
|
|
529
551
|
*/
|
|
530
|
-
[data-ui
|
|
552
|
+
[data-ui-datetime-picker] [data-part-presets] {
|
|
531
553
|
align-items: center;
|
|
532
554
|
display: flex;
|
|
533
555
|
flex-wrap: wrap;
|
|
@@ -545,7 +567,7 @@
|
|
|
545
567
|
* setting look like a different component, and what answers the narrow case
|
|
546
568
|
* is `scrollIntoView` on the surface focus lands in.
|
|
547
569
|
*/
|
|
548
|
-
[data-ui
|
|
570
|
+
[data-ui-datetime-picker] [data-part-panels] {
|
|
549
571
|
/**
|
|
550
572
|
* The two columns are told apart by the air between them and by what they
|
|
551
573
|
* hold, not by a rule. A rule would have to be on one inline edge, and the
|
|
@@ -571,7 +593,7 @@
|
|
|
571
593
|
* is the time panel that wraps instead, which is the arrangement this family
|
|
572
594
|
* already draws.
|
|
573
595
|
*/
|
|
574
|
-
[data-ui
|
|
596
|
+
[data-ui-datetime-picker] [data-part-date-panel] {
|
|
575
597
|
flex: 0 0 auto;
|
|
576
598
|
}
|
|
577
599
|
|
|
@@ -587,7 +609,7 @@
|
|
|
587
609
|
* and the column takes it, so the times read as a section rather than as a
|
|
588
610
|
* narrow strip under a wide month.
|
|
589
611
|
*/
|
|
590
|
-
[data-ui
|
|
612
|
+
[data-ui-datetime-picker] [data-part-time-panel] {
|
|
591
613
|
display: flex;
|
|
592
614
|
flex: 1 1 var(--slotted-datetime-picker-time-panel-inline-size, 7rem);
|
|
593
615
|
flex-direction: column;
|
|
@@ -602,7 +624,7 @@
|
|
|
602
624
|
* than truncated: a day of quarter-hours is ninety-six rows and every one of
|
|
603
625
|
* them is choosable.
|
|
604
626
|
*/
|
|
605
|
-
[data-ui
|
|
627
|
+
[data-ui-datetime-picker] [data-part-list] {
|
|
606
628
|
display: flex;
|
|
607
629
|
flex: 1 1 auto;
|
|
608
630
|
flex-direction: column;
|
|
@@ -645,10 +667,10 @@
|
|
|
645
667
|
* say, and repeating it ninety-six times beside a month that already shows it
|
|
646
668
|
* would spend the whole column on one word.
|
|
647
669
|
*/
|
|
648
|
-
[data-ui
|
|
670
|
+
[data-ui-datetime-picker] [data-part-option] {
|
|
649
671
|
align-items: center;
|
|
650
672
|
background-color: transparent;
|
|
651
|
-
border-radius: var(--
|
|
673
|
+
border-radius: var(--_option-radius);
|
|
652
674
|
color: inherit;
|
|
653
675
|
cursor: pointer;
|
|
654
676
|
display: flex;
|
|
@@ -681,27 +703,27 @@
|
|
|
681
703
|
* down the file its own rule is written. Found by the reviewer at
|
|
682
704
|
* `time-picker`'s visual gate and inherited whole.
|
|
683
705
|
*/
|
|
684
|
-
[data-ui
|
|
685
|
-
[data-part
|
|
706
|
+
[data-ui-datetime-picker]
|
|
707
|
+
[data-part-option]:hover:not([data-disabled]):not([data-selected]):not([data-current]) {
|
|
686
708
|
background-color: var(
|
|
687
709
|
--slotted-datetime-picker-option-hover-background,
|
|
688
710
|
var(--slotted-tone-secondary-subtle-hover)
|
|
689
711
|
);
|
|
690
712
|
}
|
|
691
713
|
|
|
692
|
-
[data-ui
|
|
714
|
+
[data-ui-datetime-picker] [data-part-option][data-current]:not([data-selected]) {
|
|
693
715
|
background-color: var(
|
|
694
716
|
--slotted-datetime-picker-option-current-background,
|
|
695
717
|
var(--slotted-tone-secondary-subtle-active)
|
|
696
718
|
);
|
|
697
719
|
}
|
|
698
720
|
|
|
699
|
-
[data-ui
|
|
721
|
+
[data-ui-datetime-picker] [data-part-option]:focus-visible {
|
|
700
722
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
701
723
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
702
724
|
}
|
|
703
725
|
|
|
704
|
-
[data-ui
|
|
726
|
+
[data-ui-datetime-picker] [data-part-option][data-selected] {
|
|
705
727
|
background-color: var(
|
|
706
728
|
--slotted-datetime-picker-option-selected-background,
|
|
707
729
|
var(--slotted-tone-accent-solid)
|
|
@@ -713,9 +735,9 @@
|
|
|
713
735
|
}
|
|
714
736
|
|
|
715
737
|
/* The chosen row still answers the pointer — one step along its own tone,
|
|
716
|
-
rather than the grey every other row takes. A row that swapped
|
|
738
|
+
rather than the grey every other row takes. A row that swapped color
|
|
717
739
|
family under the pointer read as a different row. */
|
|
718
|
-
[data-ui
|
|
740
|
+
[data-ui-datetime-picker] [data-part-option][data-selected]:hover:not([data-disabled]) {
|
|
719
741
|
background-color: var(
|
|
720
742
|
--slotted-datetime-picker-option-selected-hover-background,
|
|
721
743
|
var(--slotted-tone-accent-solid-hover)
|
|
@@ -725,10 +747,10 @@
|
|
|
725
747
|
/**
|
|
726
748
|
* A time a bound or a predicate refuses. It stays in the list by default,
|
|
727
749
|
* because a list that silently drops rows is a list whose step the reader
|
|
728
|
-
* cannot infer — and it is muted to the
|
|
750
|
+
* cannot infer — and it is muted to the color the theme measures rather than
|
|
729
751
|
* faded by opacity, so it stays readable.
|
|
730
752
|
*/
|
|
731
|
-
[data-ui
|
|
753
|
+
[data-ui-datetime-picker] [data-part-option][data-disabled] {
|
|
732
754
|
background-color: transparent;
|
|
733
755
|
color: var(--slotted-disabled-foreground);
|
|
734
756
|
cursor: not-allowed;
|
|
@@ -740,7 +762,7 @@
|
|
|
740
762
|
* step. It is a sentence rather than an empty box, and it is the state that
|
|
741
763
|
* makes the list worth recomputing as the reader moves through the month.
|
|
742
764
|
*/
|
|
743
|
-
[data-ui
|
|
765
|
+
[data-ui-datetime-picker] [data-part-empty] {
|
|
744
766
|
align-items: center;
|
|
745
767
|
color: var(--slotted-datetime-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
746
768
|
display: flex;
|
|
@@ -752,7 +774,7 @@
|
|
|
752
774
|
text-wrap: balance;
|
|
753
775
|
}
|
|
754
776
|
|
|
755
|
-
[data-ui
|
|
777
|
+
[data-ui-datetime-picker] [data-part-footer] {
|
|
756
778
|
/* The band's rule, for the same reason: a consumer's two buttons are not
|
|
757
779
|
what decides how wide a month is drawn — and `border-box` with it, or the
|
|
758
780
|
padding pushes the last button past the panel's edge. */
|
|
@@ -783,7 +805,7 @@
|
|
|
783
805
|
* ask, and the question really is how much screen there is.
|
|
784
806
|
*/
|
|
785
807
|
@media (max-width: 480px) and (pointer: coarse) {
|
|
786
|
-
[data-ui
|
|
808
|
+
[data-ui-datetime-picker][data-part-positioner][data-presentation='sheet'] {
|
|
787
809
|
/* The positioner's own measurement is overridden here on purpose: a sheet
|
|
788
810
|
is not placed against an anchor, it is placed against the screen. */
|
|
789
811
|
inset: auto 0 0;
|
|
@@ -791,12 +813,11 @@
|
|
|
791
813
|
translate: 0 var(--slotted-space-9, 2rem);
|
|
792
814
|
}
|
|
793
815
|
|
|
794
|
-
[data-ui
|
|
816
|
+
[data-ui-datetime-picker][data-part-positioner][data-presentation='sheet'][data-open] {
|
|
795
817
|
translate: 0 0;
|
|
796
818
|
}
|
|
797
819
|
|
|
798
|
-
[data-ui
|
|
799
|
-
[data-part='content'] {
|
|
820
|
+
[data-ui-datetime-picker][data-part-positioner][data-presentation='sheet'] [data-part-content] {
|
|
800
821
|
border-end-end-radius: 0;
|
|
801
822
|
border-end-start-radius: 0;
|
|
802
823
|
border-inline: 0;
|
|
@@ -813,23 +834,55 @@
|
|
|
813
834
|
/* Stacked under a month, the list gets a shorter run: the reader scrolls
|
|
814
835
|
the sheet to reach it, and a full-height list would put the footer out of
|
|
815
836
|
reach behind ninety-six rows. */
|
|
816
|
-
[data-ui
|
|
817
|
-
[data-part='list'] {
|
|
837
|
+
[data-ui-datetime-picker][data-part-positioner][data-presentation='sheet'] [data-part-list] {
|
|
818
838
|
max-block-size: calc(var(--_row-pitch) * 5.5);
|
|
819
839
|
}
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* The grip every bottom sheet carries, in the drawer's geometry and line
|
|
843
|
+
* color: a pill three rem by a quarter, centerd in a row one target tall
|
|
844
|
+
* that the content keeps clear at its top. A pull down on it dismisses the
|
|
845
|
+
* sheet; Escape and the press outside stay the accessible ways out.
|
|
846
|
+
*/
|
|
847
|
+
[data-ui-datetime-picker][data-part-positioner][data-presentation='sheet']
|
|
848
|
+
> [data-part-content] {
|
|
849
|
+
padding-block-start: var(--slotted-target-min, 24px);
|
|
850
|
+
position: relative;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
[data-ui-datetime-picker][data-part-positioner][data-presentation='sheet']
|
|
854
|
+
> [data-part-content]
|
|
855
|
+
> [data-part-grip] {
|
|
856
|
+
background-clip: content-box;
|
|
857
|
+
background-color: var(
|
|
858
|
+
--slotted-drawer-resizer-line-color,
|
|
859
|
+
var(--slotted-border-strong, ButtonBorder)
|
|
860
|
+
);
|
|
861
|
+
block-size: var(--slotted-space-2, 0.25rem);
|
|
862
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
863
|
+
box-sizing: content-box;
|
|
864
|
+
cursor: grab;
|
|
865
|
+
inline-size: var(--slotted-space-11, 3rem);
|
|
866
|
+
inset-block-start: 0;
|
|
867
|
+
inset-inline: 0;
|
|
868
|
+
margin-inline: auto;
|
|
869
|
+
padding-block: calc((var(--slotted-target-min, 24px) - var(--slotted-space-2, 0.25rem)) / 2);
|
|
870
|
+
position: absolute;
|
|
871
|
+
touch-action: none;
|
|
872
|
+
}
|
|
820
873
|
}
|
|
821
874
|
|
|
822
875
|
@media (forced-colors: active) {
|
|
823
876
|
/* The chosen row and the highlighted row both lose their painted grounds,
|
|
824
877
|
so each says what it is with a system pair the operating system
|
|
825
878
|
guarantees legible together. */
|
|
826
|
-
[data-ui
|
|
879
|
+
[data-ui-datetime-picker] [data-part-option][data-selected] {
|
|
827
880
|
background-color: Highlight;
|
|
828
881
|
color: HighlightText;
|
|
829
882
|
forced-color-adjust: none;
|
|
830
883
|
}
|
|
831
884
|
|
|
832
|
-
[data-ui
|
|
885
|
+
[data-ui-datetime-picker] [data-part-option][data-current]:not([data-selected]) {
|
|
833
886
|
outline: var(--slotted-focus-ring-width, 2px) solid Highlight;
|
|
834
887
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
835
888
|
}
|
|
@@ -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-color",
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
"--slotted-datetime-picker-trigger-hover-background",
|
|
45
46
|
"--slotted-datetime-picker-trigger-size",
|
|
46
47
|
"--slotted-disabled-foreground",
|
|
48
|
+
"--slotted-drawer-resizer-line-color",
|
|
47
49
|
"--slotted-duration-medium",
|
|
48
50
|
"--slotted-duration-short",
|
|
49
51
|
"--slotted-easing-enter",
|
|
@@ -54,10 +56,11 @@
|
|
|
54
56
|
"--slotted-focus-ring-width",
|
|
55
57
|
"--slotted-font-size-sm",
|
|
56
58
|
"--slotted-font-weight-medium",
|
|
59
|
+
"--slotted-radius-full",
|
|
57
60
|
"--slotted-radius-lg",
|
|
58
|
-
"--slotted-radius-sm",
|
|
59
61
|
"--slotted-shadow-md",
|
|
60
62
|
"--slotted-space-1",
|
|
63
|
+
"--slotted-space-11",
|
|
61
64
|
"--slotted-space-2",
|
|
62
65
|
"--slotted-space-3",
|
|
63
66
|
"--slotted-space-4",
|