@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
|
@@ -27,8 +27,10 @@
|
|
|
27
27
|
* list, and the length of it is answered by where the panel opens, by
|
|
28
28
|
* type-ahead, and by PageUp and PageDown.
|
|
29
29
|
*/
|
|
30
|
-
[data-ui
|
|
30
|
+
[data-ui-time-picker][data-part-root] {
|
|
31
31
|
display: block;
|
|
32
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
33
|
+
flex-basis: content;
|
|
32
34
|
/* The anchor the positioner measures is the control, and a block root
|
|
33
35
|
lets the frame take the width the form gave it. */
|
|
34
36
|
inline-size: 100%;
|
|
@@ -40,7 +42,7 @@
|
|
|
40
42
|
* It draws no frame: the `time-field` inside it draws its own, and the
|
|
41
43
|
* trigger is handed to that field's `end` slot by the binding.
|
|
42
44
|
*/
|
|
43
|
-
[data-ui
|
|
45
|
+
[data-ui-time-picker] [data-part-control] {
|
|
44
46
|
--_icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
45
47
|
--_height: var(--slotted-control-height-md, 34px);
|
|
46
48
|
|
|
@@ -51,12 +53,21 @@
|
|
|
51
53
|
position: relative;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The `time-field` is the control's flex item, and its own basis is its
|
|
58
|
+
* content. It grows to the control, so the frame takes the width the field
|
|
59
|
+
* gave the root: the whole field at `full`, the step at `short` and `medium`.
|
|
60
|
+
*/
|
|
61
|
+
[data-ui-time-picker] [data-part-control] > [data-ui-time-field] {
|
|
62
|
+
flex: 1 1 auto;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[data-ui-time-picker][data-part-root][data-size='sm'] [data-part-control] {
|
|
55
66
|
--_icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
56
67
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
57
68
|
}
|
|
58
69
|
|
|
59
|
-
[data-ui
|
|
70
|
+
[data-ui-time-picker][data-part-root][data-size='lg'] [data-part-control] {
|
|
60
71
|
--_icon-size: var(--slotted-control-icon-size-lg, 18px);
|
|
61
72
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
62
73
|
}
|
|
@@ -77,7 +88,7 @@
|
|
|
77
88
|
* does not turn while the surface is open either. It is a `Glyph` the
|
|
78
89
|
* binding draws inside an `icon` box, at the field's icon step.
|
|
79
90
|
*/
|
|
80
|
-
[data-ui
|
|
91
|
+
[data-ui-time-picker] [data-part-trigger] {
|
|
81
92
|
--slotted-icon-size: var(--_icon-size);
|
|
82
93
|
|
|
83
94
|
align-items: center;
|
|
@@ -122,7 +133,7 @@
|
|
|
122
133
|
|
|
123
134
|
/* The hit area, recovered outside the paint, exactly as every other inner
|
|
124
135
|
control in the library recovers it. */
|
|
125
|
-
[data-ui
|
|
136
|
+
[data-ui-time-picker] [data-part-trigger]::after {
|
|
126
137
|
content: '';
|
|
127
138
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
128
139
|
position: absolute;
|
|
@@ -133,25 +144,25 @@
|
|
|
133
144
|
the hit area above grows to 44 pixels around them. Before the field's
|
|
134
145
|
clear it does not reach across it. */
|
|
135
146
|
@media (pointer: coarse) {
|
|
136
|
-
[data-ui
|
|
147
|
+
[data-ui-time-picker] [data-part-trigger]::after {
|
|
137
148
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
138
149
|
}
|
|
139
150
|
|
|
140
|
-
[data-ui
|
|
141
|
-
[data-part
|
|
142
|
-
> [data-part
|
|
151
|
+
[data-ui-time-picker]
|
|
152
|
+
[data-part-end]:has(+ [data-part-clear]:not([hidden]))
|
|
153
|
+
> [data-part-trigger]::after {
|
|
143
154
|
inset-inline-end: 0;
|
|
144
155
|
}
|
|
145
156
|
}
|
|
146
157
|
|
|
147
|
-
[data-ui
|
|
158
|
+
[data-ui-time-picker] [data-part-trigger]:hover:not(:disabled):not([data-disabled]) {
|
|
148
159
|
background-color: var(
|
|
149
160
|
--slotted-time-picker-trigger-hover-background,
|
|
150
161
|
var(--slotted-tone-secondary-subtle-hover)
|
|
151
162
|
);
|
|
152
163
|
}
|
|
153
164
|
|
|
154
|
-
[data-ui
|
|
165
|
+
[data-ui-time-picker] [data-part-trigger]:active:not(:disabled):not([data-disabled]) {
|
|
155
166
|
background-color: var(
|
|
156
167
|
--slotted-time-picker-trigger-active-background,
|
|
157
168
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -160,19 +171,19 @@
|
|
|
160
171
|
|
|
161
172
|
/* Its own ring: tabbing from the last segment to the trigger has to move
|
|
162
173
|
something visible, and the frame's ring would sit still. */
|
|
163
|
-
[data-ui
|
|
174
|
+
[data-ui-time-picker] [data-part-trigger]:focus-visible {
|
|
164
175
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
165
176
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
166
177
|
}
|
|
167
178
|
|
|
168
|
-
[data-ui
|
|
179
|
+
[data-ui-time-picker][data-part-root][data-invalid] {
|
|
169
180
|
--slotted-focus-ring-color: var(
|
|
170
181
|
--slotted-time-picker-invalid-focus-ring-color,
|
|
171
182
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
172
183
|
);
|
|
173
184
|
}
|
|
174
185
|
|
|
175
|
-
[data-ui
|
|
186
|
+
[data-ui-time-picker] [data-part-trigger]:disabled {
|
|
176
187
|
color: var(--slotted-disabled-foreground);
|
|
177
188
|
cursor: not-allowed;
|
|
178
189
|
}
|
|
@@ -183,7 +194,7 @@
|
|
|
183
194
|
* onto. The painted surface is one element in, as every anchored family in
|
|
184
195
|
* the library is built.
|
|
185
196
|
*/
|
|
186
|
-
[data-ui
|
|
197
|
+
[data-ui-time-picker][data-part-positioner] {
|
|
187
198
|
/* Only the block inset: the positioner writes `left` and never `right`,
|
|
188
199
|
and `inset-inline-start` would resolve to `right` in a right-to-left
|
|
189
200
|
document and win over the measured value. */
|
|
@@ -207,16 +218,16 @@
|
|
|
207
218
|
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
208
219
|
}
|
|
209
220
|
|
|
210
|
-
[data-ui
|
|
221
|
+
[data-ui-time-picker][data-part-positioner][data-side='top'] {
|
|
211
222
|
translate: 0 var(--_enter-distance);
|
|
212
223
|
}
|
|
213
224
|
|
|
214
225
|
/* A lateral side has no block direction to arrive from, so it only fades. */
|
|
215
|
-
[data-ui
|
|
226
|
+
[data-ui-time-picker][data-part-positioner]:is([data-side='left'], [data-side='right']) {
|
|
216
227
|
translate: 0 0;
|
|
217
228
|
}
|
|
218
229
|
|
|
219
|
-
[data-ui
|
|
230
|
+
[data-ui-time-picker][data-part-positioner][data-open] {
|
|
220
231
|
opacity: 1;
|
|
221
232
|
translate: 0 0;
|
|
222
233
|
transition: none;
|
|
@@ -230,16 +241,16 @@
|
|
|
230
241
|
* harness, a docs snippet — is simply there, and is photographed where it
|
|
231
242
|
* stands.
|
|
232
243
|
*/
|
|
233
|
-
[data-ui
|
|
244
|
+
[data-ui-time-picker][data-part-positioner][data-open][data-positioned] {
|
|
234
245
|
animation: slotted-time-picker-enter-down var(--slotted-duration-medium)
|
|
235
246
|
var(--slotted-easing-enter);
|
|
236
247
|
}
|
|
237
248
|
|
|
238
|
-
[data-ui
|
|
249
|
+
[data-ui-time-picker][data-part-positioner][data-open][data-positioned][data-side='top'] {
|
|
239
250
|
animation-name: slotted-time-picker-enter-up;
|
|
240
251
|
}
|
|
241
252
|
|
|
242
|
-
[data-ui
|
|
253
|
+
[data-ui-time-picker][data-part-positioner][data-open][data-positioned]:is(
|
|
243
254
|
[data-side='left'],
|
|
244
255
|
[data-side='right']
|
|
245
256
|
) {
|
|
@@ -268,25 +279,25 @@
|
|
|
268
279
|
|
|
269
280
|
/* Stillness keeps the fade and drops the movement. */
|
|
270
281
|
@media (prefers-reduced-motion: reduce) {
|
|
271
|
-
[data-ui
|
|
272
|
-
[data-ui
|
|
273
|
-
[data-ui
|
|
274
|
-
[data-ui
|
|
282
|
+
[data-ui-time-picker][data-part-positioner],
|
|
283
|
+
[data-ui-time-picker][data-part-positioner][data-side='top'],
|
|
284
|
+
[data-ui-time-picker][data-part-positioner][data-side='left'],
|
|
285
|
+
[data-ui-time-picker][data-part-positioner][data-side='right'] {
|
|
275
286
|
translate: 0 0;
|
|
276
287
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
277
288
|
}
|
|
278
289
|
|
|
279
|
-
[data-ui
|
|
280
|
-
[data-ui
|
|
281
|
-
[data-ui
|
|
282
|
-
[data-ui
|
|
290
|
+
[data-ui-time-picker][data-part-positioner][data-open][data-positioned],
|
|
291
|
+
[data-ui-time-picker][data-part-positioner][data-open][data-positioned][data-side='top'],
|
|
292
|
+
[data-ui-time-picker][data-part-positioner][data-open][data-positioned][data-side='left'],
|
|
293
|
+
[data-ui-time-picker][data-part-positioner][data-open][data-positioned][data-side='right'] {
|
|
283
294
|
animation-name: slotted-time-picker-fade;
|
|
284
295
|
}
|
|
285
296
|
}
|
|
286
297
|
|
|
287
298
|
/* The anchor scrolled out of its own clipper. The list is still open and
|
|
288
299
|
still belongs to a control the reader can no longer see. */
|
|
289
|
-
[data-ui
|
|
300
|
+
[data-ui-time-picker][data-part-positioner][data-detached] {
|
|
290
301
|
visibility: hidden;
|
|
291
302
|
}
|
|
292
303
|
|
|
@@ -303,11 +314,22 @@
|
|
|
303
314
|
* produce a column too tight to read a time in, and capped so a wide form
|
|
304
315
|
* does not stretch one column of times across a page.
|
|
305
316
|
*/
|
|
306
|
-
[data-ui
|
|
317
|
+
[data-ui-time-picker] [data-part-content] {
|
|
318
|
+
--_content-radius: var(--slotted-time-picker-content-radius, var(--slotted-radius-lg, 8px));
|
|
319
|
+
--_content-padding: var(
|
|
320
|
+
--slotted-time-picker-content-padding,
|
|
321
|
+
var(--slotted-space-3, 0.375rem)
|
|
322
|
+
);
|
|
323
|
+
/* Concentric with the panel: its radius less the inset, floored at 0. */
|
|
324
|
+
--_option-radius: var(
|
|
325
|
+
--slotted-time-picker-option-radius,
|
|
326
|
+
max(0px, calc(var(--_content-radius) - var(--_content-padding)))
|
|
327
|
+
);
|
|
328
|
+
|
|
307
329
|
background-color: var(--slotted-time-picker-surface, var(--slotted-surface-raised, Canvas));
|
|
308
330
|
border: var(--slotted-border-width-thin, 1px) solid
|
|
309
331
|
var(--slotted-time-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
310
|
-
border-radius: var(--
|
|
332
|
+
border-radius: var(--_content-radius);
|
|
311
333
|
box-shadow: var(--slotted-time-picker-content-shadow, var(--slotted-shadow-md));
|
|
312
334
|
box-sizing: border-box;
|
|
313
335
|
color: var(--slotted-time-picker-content-color, var(--slotted-text, CanvasText));
|
|
@@ -347,7 +369,7 @@
|
|
|
347
369
|
var(--slotted-time-picker-content-min-inline-size, 11rem),
|
|
348
370
|
min(var(--slotted-positioner-anchor-width, 11rem), 20rem)
|
|
349
371
|
);
|
|
350
|
-
padding: var(--
|
|
372
|
+
padding: var(--_content-padding);
|
|
351
373
|
/* The layer above gave up the pointer; the surface takes it back. */
|
|
352
374
|
pointer-events: auto;
|
|
353
375
|
}
|
|
@@ -360,7 +382,7 @@
|
|
|
360
382
|
* surface shrink-wraps its two columns instead, capped by the room the
|
|
361
383
|
* positioner measured.
|
|
362
384
|
*/
|
|
363
|
-
[data-ui
|
|
385
|
+
[data-ui-time-picker] [data-part-content]:has([data-part-presets]) {
|
|
364
386
|
grid-template-areas: 'presets head' 'presets list' 'footer footer';
|
|
365
387
|
grid-template-columns: auto minmax(9rem, 1fr);
|
|
366
388
|
inline-size: auto;
|
|
@@ -371,7 +393,7 @@
|
|
|
371
393
|
* The head: one press for the current time, which is what a reader who never
|
|
372
394
|
* discovers that `+` opens an expression still has.
|
|
373
395
|
*/
|
|
374
|
-
[data-ui
|
|
396
|
+
[data-ui-time-picker] [data-part-head] {
|
|
375
397
|
align-items: center;
|
|
376
398
|
display: flex;
|
|
377
399
|
gap: var(--slotted-space-2, 0.25rem);
|
|
@@ -380,11 +402,11 @@
|
|
|
380
402
|
padding-block-end: var(--slotted-space-2, 0.25rem);
|
|
381
403
|
}
|
|
382
404
|
|
|
383
|
-
[data-ui
|
|
405
|
+
[data-ui-time-picker] [data-part-now] {
|
|
384
406
|
appearance: none;
|
|
385
407
|
background-color: transparent;
|
|
386
408
|
border: 0;
|
|
387
|
-
border-radius: var(--
|
|
409
|
+
border-radius: var(--_option-radius);
|
|
388
410
|
color: var(--slotted-time-picker-now-color, var(--slotted-tone-accent-text));
|
|
389
411
|
cursor: pointer;
|
|
390
412
|
font: inherit;
|
|
@@ -398,14 +420,14 @@
|
|
|
398
420
|
var(--slotted-control-transition-easing);
|
|
399
421
|
}
|
|
400
422
|
|
|
401
|
-
[data-ui
|
|
423
|
+
[data-ui-time-picker] [data-part-now]:hover:not(:disabled):not([data-disabled]) {
|
|
402
424
|
background-color: var(
|
|
403
425
|
--slotted-time-picker-option-hover-background,
|
|
404
426
|
var(--slotted-tone-secondary-subtle-hover)
|
|
405
427
|
);
|
|
406
428
|
}
|
|
407
429
|
|
|
408
|
-
[data-ui
|
|
430
|
+
[data-ui-time-picker] [data-part-now]:focus-visible {
|
|
409
431
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
410
432
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
411
433
|
}
|
|
@@ -415,7 +437,7 @@
|
|
|
415
437
|
* the shift" is a business clock, and a library that guessed at one would be
|
|
416
438
|
* guessing at an industry. What it ships is the column they stand in.
|
|
417
439
|
*/
|
|
418
|
-
[data-ui
|
|
440
|
+
[data-ui-time-picker] [data-part-presets] {
|
|
419
441
|
align-items: flex-start;
|
|
420
442
|
border-inline-end: var(--slotted-border-width-thin, 1px) solid
|
|
421
443
|
var(--slotted-time-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
@@ -432,7 +454,7 @@
|
|
|
432
454
|
* density and every type step, and scrolled rather than truncated: a day of
|
|
433
455
|
* quarter-hours is ninety-six rows and every one of them is choosable.
|
|
434
456
|
*/
|
|
435
|
-
[data-ui
|
|
457
|
+
[data-ui-time-picker] [data-part-list] {
|
|
436
458
|
display: flex;
|
|
437
459
|
flex-direction: column;
|
|
438
460
|
/**
|
|
@@ -466,10 +488,10 @@
|
|
|
466
488
|
* to read: `09:15` says more at a glance than a `15` in a column of minutes,
|
|
467
489
|
* and the column shape exists for the steps where a flat list cannot.
|
|
468
490
|
*/
|
|
469
|
-
[data-ui
|
|
491
|
+
[data-ui-time-picker] [data-part-option] {
|
|
470
492
|
align-items: center;
|
|
471
493
|
background-color: transparent;
|
|
472
|
-
border-radius: var(--
|
|
494
|
+
border-radius: var(--_option-radius);
|
|
473
495
|
color: inherit;
|
|
474
496
|
cursor: pointer;
|
|
475
497
|
display: flex;
|
|
@@ -508,8 +530,8 @@
|
|
|
508
530
|
* `disabled` half of `STATE_PRECEDENCE` and nothing else, which is why this
|
|
509
531
|
* one was found by a reader rather than by a test.
|
|
510
532
|
*/
|
|
511
|
-
[data-ui
|
|
512
|
-
[data-part
|
|
533
|
+
[data-ui-time-picker]
|
|
534
|
+
[data-part-option]:hover:not([data-disabled]):not([data-selected]):not([data-current]) {
|
|
513
535
|
background-color: var(
|
|
514
536
|
--slotted-time-picker-option-hover-background,
|
|
515
537
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -522,19 +544,19 @@
|
|
|
522
544
|
* focusable row in the library draws, inset so it is not clipped by the
|
|
523
545
|
* scroller's own edge. It stands down for the chosen row, which outranks it.
|
|
524
546
|
*/
|
|
525
|
-
[data-ui
|
|
547
|
+
[data-ui-time-picker] [data-part-option][data-current]:not([data-selected]) {
|
|
526
548
|
background-color: var(
|
|
527
549
|
--slotted-time-picker-option-current-background,
|
|
528
550
|
var(--slotted-tone-secondary-subtle-active)
|
|
529
551
|
);
|
|
530
552
|
}
|
|
531
553
|
|
|
532
|
-
[data-ui
|
|
554
|
+
[data-ui-time-picker] [data-part-option]:focus-visible {
|
|
533
555
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
534
556
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
535
557
|
}
|
|
536
558
|
|
|
537
|
-
[data-ui
|
|
559
|
+
[data-ui-time-picker] [data-part-option][data-selected] {
|
|
538
560
|
background-color: var(
|
|
539
561
|
--slotted-time-picker-option-selected-background,
|
|
540
562
|
var(--slotted-tone-accent-solid)
|
|
@@ -546,10 +568,10 @@
|
|
|
546
568
|
* The chosen row still answers the pointer — one step along its own tone,
|
|
547
569
|
* rather than the grey every other row takes. Measured on the default theme:
|
|
548
570
|
* rgb(29 78 216) at rest and rgb(42 91 220) under the pointer, which is the
|
|
549
|
-
* same blue and a visible change. A row that swapped
|
|
571
|
+
* same blue and a visible change. A row that swapped color family under the
|
|
550
572
|
* pointer read as a different row, and that is the defect this pair replaces.
|
|
551
573
|
*/
|
|
552
|
-
[data-ui
|
|
574
|
+
[data-ui-time-picker] [data-part-option][data-selected]:hover:not([data-disabled]) {
|
|
553
575
|
background-color: var(
|
|
554
576
|
--slotted-time-picker-option-selected-hover-background,
|
|
555
577
|
var(--slotted-tone-accent-solid-hover)
|
|
@@ -559,10 +581,10 @@
|
|
|
559
581
|
/**
|
|
560
582
|
* A time a bound or the predicate refuses. It stays in the list by default,
|
|
561
583
|
* because a list that silently drops rows is a list whose step the reader
|
|
562
|
-
* cannot infer — and it is muted to the
|
|
584
|
+
* cannot infer — and it is muted to the color the theme measures rather
|
|
563
585
|
* than faded by opacity, so it stays readable.
|
|
564
586
|
*/
|
|
565
|
-
[data-ui
|
|
587
|
+
[data-ui-time-picker] [data-part-option][data-disabled] {
|
|
566
588
|
background-color: transparent;
|
|
567
589
|
color: var(--slotted-disabled-foreground);
|
|
568
590
|
cursor: not-allowed;
|
|
@@ -573,7 +595,7 @@
|
|
|
573
595
|
* every step. It is a sentence rather than an empty box: MUI draws nothing
|
|
574
596
|
* here and Ant draws an empty column, and both read as a broken component.
|
|
575
597
|
*/
|
|
576
|
-
[data-ui
|
|
598
|
+
[data-ui-time-picker] [data-part-empty] {
|
|
577
599
|
align-items: center;
|
|
578
600
|
color: var(--slotted-time-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
579
601
|
display: flex;
|
|
@@ -585,7 +607,7 @@
|
|
|
585
607
|
text-wrap: balance;
|
|
586
608
|
}
|
|
587
609
|
|
|
588
|
-
[data-ui
|
|
610
|
+
[data-ui-time-picker] [data-part-footer] {
|
|
589
611
|
align-items: center;
|
|
590
612
|
border-block-start: var(--slotted-border-width-thin, 1px) solid
|
|
591
613
|
var(--slotted-time-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
@@ -605,7 +627,7 @@
|
|
|
605
627
|
* ask, and the question really is how much screen there is.
|
|
606
628
|
*/
|
|
607
629
|
@media (max-width: 480px) and (pointer: coarse) {
|
|
608
|
-
[data-ui
|
|
630
|
+
[data-ui-time-picker][data-part-positioner][data-presentation='sheet'] {
|
|
609
631
|
/* The positioner's own measurement is overridden here on purpose: a
|
|
610
632
|
sheet is not placed against an anchor, it is placed against the
|
|
611
633
|
screen. */
|
|
@@ -614,12 +636,11 @@
|
|
|
614
636
|
translate: 0 var(--slotted-space-9, 2rem);
|
|
615
637
|
}
|
|
616
638
|
|
|
617
|
-
[data-ui
|
|
639
|
+
[data-ui-time-picker][data-part-positioner][data-presentation='sheet'][data-open] {
|
|
618
640
|
translate: 0 0;
|
|
619
641
|
}
|
|
620
642
|
|
|
621
|
-
[data-ui
|
|
622
|
-
[data-part='content'] {
|
|
643
|
+
[data-ui-time-picker][data-part-positioner][data-presentation='sheet'] [data-part-content] {
|
|
623
644
|
border-end-end-radius: 0;
|
|
624
645
|
border-end-start-radius: 0;
|
|
625
646
|
border-inline: 0;
|
|
@@ -629,12 +650,11 @@
|
|
|
629
650
|
|
|
630
651
|
/* A sheet has the screen's height to spend, so the list takes more of it
|
|
631
652
|
rather than staying at the popover's eight rows and a half. */
|
|
632
|
-
[data-ui
|
|
653
|
+
[data-ui-time-picker][data-part-positioner][data-presentation='sheet'] [data-part-list] {
|
|
633
654
|
max-block-size: 50vh;
|
|
634
655
|
}
|
|
635
656
|
|
|
636
|
-
[data-ui
|
|
637
|
-
[data-part='presets'] {
|
|
657
|
+
[data-ui-time-picker][data-part-positioner][data-presentation='sheet'] [data-part-presets] {
|
|
638
658
|
/* Beside the list there is no room for a column of shortcuts, so they
|
|
639
659
|
become a row above it and keep their labels. */
|
|
640
660
|
border-inline-end: 0;
|
|
@@ -645,19 +665,51 @@
|
|
|
645
665
|
padding-block-end: var(--slotted-space-3, 0.375rem);
|
|
646
666
|
padding-inline-end: 0;
|
|
647
667
|
}
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* The grip every bottom sheet carries, in the drawer's geometry and line
|
|
671
|
+
* color: a pill three rem by a quarter, centerd in a row one target tall
|
|
672
|
+
* that the content keeps clear at its top. A pull down on it dismisses the
|
|
673
|
+
* sheet; Escape and the press outside stay the accessible ways out.
|
|
674
|
+
*/
|
|
675
|
+
[data-ui-time-picker][data-part-positioner][data-presentation='sheet'] > [data-part-content] {
|
|
676
|
+
padding-block-start: var(--slotted-target-min, 24px);
|
|
677
|
+
position: relative;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
[data-ui-time-picker][data-part-positioner][data-presentation='sheet']
|
|
681
|
+
> [data-part-content]
|
|
682
|
+
> [data-part-grip] {
|
|
683
|
+
background-clip: content-box;
|
|
684
|
+
background-color: var(
|
|
685
|
+
--slotted-drawer-resizer-line-color,
|
|
686
|
+
var(--slotted-border-strong, ButtonBorder)
|
|
687
|
+
);
|
|
688
|
+
block-size: var(--slotted-space-2, 0.25rem);
|
|
689
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
690
|
+
box-sizing: content-box;
|
|
691
|
+
cursor: grab;
|
|
692
|
+
inline-size: var(--slotted-space-11, 3rem);
|
|
693
|
+
inset-block-start: 0;
|
|
694
|
+
inset-inline: 0;
|
|
695
|
+
margin-inline: auto;
|
|
696
|
+
padding-block: calc((var(--slotted-target-min, 24px) - var(--slotted-space-2, 0.25rem)) / 2);
|
|
697
|
+
position: absolute;
|
|
698
|
+
touch-action: none;
|
|
699
|
+
}
|
|
648
700
|
}
|
|
649
701
|
|
|
650
702
|
@media (forced-colors: active) {
|
|
651
703
|
/* The chosen row and the highlighted row both lose their painted grounds,
|
|
652
704
|
so each says what it is with a system pair the operating system
|
|
653
705
|
guarantees legible together. */
|
|
654
|
-
[data-ui
|
|
706
|
+
[data-ui-time-picker] [data-part-option][data-selected] {
|
|
655
707
|
background-color: Highlight;
|
|
656
708
|
color: HighlightText;
|
|
657
709
|
forced-color-adjust: none;
|
|
658
710
|
}
|
|
659
711
|
|
|
660
|
-
[data-ui
|
|
712
|
+
[data-ui-time-picker] [data-part-option][data-current]:not([data-selected]) {
|
|
661
713
|
outline: var(--slotted-focus-ring-width, 2px) solid Highlight;
|
|
662
714
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
663
715
|
}
|
|
@@ -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",
|
|
@@ -12,6 +13,7 @@
|
|
|
12
13
|
"--slotted-control-transition-duration",
|
|
13
14
|
"--slotted-control-transition-easing",
|
|
14
15
|
"--slotted-disabled-foreground",
|
|
16
|
+
"--slotted-drawer-resizer-line-color",
|
|
15
17
|
"--slotted-duration-medium",
|
|
16
18
|
"--slotted-duration-short",
|
|
17
19
|
"--slotted-easing-enter",
|
|
@@ -20,10 +22,11 @@
|
|
|
20
22
|
"--slotted-focus-ring-color-invalid",
|
|
21
23
|
"--slotted-focus-ring-offset",
|
|
22
24
|
"--slotted-focus-ring-width",
|
|
25
|
+
"--slotted-radius-full",
|
|
23
26
|
"--slotted-radius-lg",
|
|
24
|
-
"--slotted-radius-sm",
|
|
25
27
|
"--slotted-shadow-md",
|
|
26
28
|
"--slotted-space-1",
|
|
29
|
+
"--slotted-space-11",
|
|
27
30
|
"--slotted-space-2",
|
|
28
31
|
"--slotted-space-3",
|
|
29
32
|
"--slotted-space-4",
|