@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
|
@@ -70,6 +70,9 @@
|
|
|
70
70
|
"--slotted-tone-danger-solid",
|
|
71
71
|
"--slotted-tone-danger-surface",
|
|
72
72
|
"--slotted-tone-danger-text",
|
|
73
|
+
"--slotted-tone-info-solid",
|
|
74
|
+
"--slotted-tone-info-surface",
|
|
75
|
+
"--slotted-tone-info-text",
|
|
73
76
|
"--slotted-tone-secondary-solid",
|
|
74
77
|
"--slotted-tone-secondary-subtle-active",
|
|
75
78
|
"--slotted-tone-secondary-subtle-hover",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* mirrors its state onto the frame rather than styling through, so a control
|
|
17
17
|
* used outside a field looks the same as one inside it.
|
|
18
18
|
*/
|
|
19
|
-
[data-ui
|
|
19
|
+
[data-ui-number-field][data-part-root] {
|
|
20
20
|
/**
|
|
21
21
|
* Type, height, inline padding, gap and glyph size all come from the
|
|
22
22
|
* control scales — the only ones the theme restates per density — so an
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
* The split buttons are the inner controls `text-field` draws: the glyph
|
|
55
55
|
* plus a step of air, capped at the inner size, inset concentrically — the
|
|
56
56
|
* air beside a button equals the air above and below it, and its corner is
|
|
57
|
-
* the frame's less that air
|
|
57
|
+
* the frame's less that air.
|
|
58
58
|
*/
|
|
59
59
|
--_action-size: var(
|
|
60
60
|
--slotted-number-field-action-size,
|
|
@@ -102,6 +102,8 @@
|
|
|
102
102
|
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
103
103
|
font-size: var(--_font-size);
|
|
104
104
|
gap: var(--_gap);
|
|
105
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
106
|
+
flex-basis: content;
|
|
105
107
|
inline-size: 100%;
|
|
106
108
|
/* A control in a grid track narrower than its intrinsic width has to shrink. */
|
|
107
109
|
min-inline-size: 0;
|
|
@@ -127,7 +129,7 @@
|
|
|
127
129
|
* moves under the reader's eye, and no other family has a stronger claim on
|
|
128
130
|
* the setting.
|
|
129
131
|
*/
|
|
130
|
-
[data-ui
|
|
132
|
+
[data-ui-number-field] > [data-part-input] {
|
|
131
133
|
background-color: transparent;
|
|
132
134
|
/* The frame's border box, not its content box: on a coarse pointer the frame
|
|
133
135
|
is the touch target's height and the control it holds is too. Stretched
|
|
@@ -176,11 +178,11 @@
|
|
|
176
178
|
* "the document's start edge, whatever the run inside is doing", so the
|
|
177
179
|
* alignment is named once, under a guard that is itself the direction.
|
|
178
180
|
*/
|
|
179
|
-
[data-ui
|
|
181
|
+
[data-ui-number-field]:dir(rtl) > [data-part-input] {
|
|
180
182
|
text-align: right;
|
|
181
183
|
}
|
|
182
184
|
|
|
183
|
-
[data-ui
|
|
185
|
+
[data-ui-number-field] > [data-part-input]::placeholder {
|
|
184
186
|
color: var(--slotted-number-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
185
187
|
text-overflow: ellipsis;
|
|
186
188
|
}
|
|
@@ -191,7 +193,7 @@
|
|
|
191
193
|
* control beside it. One library, one scale.
|
|
192
194
|
*/
|
|
193
195
|
|
|
194
|
-
[data-ui
|
|
196
|
+
[data-ui-number-field][data-part-root][data-size='sm'] {
|
|
195
197
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
196
198
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
197
199
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -200,7 +202,7 @@
|
|
|
200
202
|
--_inner-size: var(--slotted-control-inner-size-sm, 22px);
|
|
201
203
|
}
|
|
202
204
|
|
|
203
|
-
[data-ui
|
|
205
|
+
[data-ui-number-field][data-part-root][data-size='md'] {
|
|
204
206
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
205
207
|
--_height: var(--slotted-control-height-md, 34px);
|
|
206
208
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -209,7 +211,7 @@
|
|
|
209
211
|
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
210
212
|
}
|
|
211
213
|
|
|
212
|
-
[data-ui
|
|
214
|
+
[data-ui-number-field][data-part-root][data-size='lg'] {
|
|
213
215
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
214
216
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
215
217
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -225,7 +227,7 @@
|
|
|
225
227
|
* which is what a dense table needs.
|
|
226
228
|
*/
|
|
227
229
|
|
|
228
|
-
[data-ui
|
|
230
|
+
[data-ui-number-field][data-part-root][data-variant='subtle'] {
|
|
229
231
|
background-color: var(
|
|
230
232
|
--slotted-number-field-subtle-background,
|
|
231
233
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -239,7 +241,7 @@
|
|
|
239
241
|
/* No edge, no lift, no ground and no corner of its own: the cell it sits in
|
|
240
242
|
is the box, the row is the ground, a cell has no corner, and the resting
|
|
241
243
|
shadow would draw the cell where there is none. */
|
|
242
|
-
[data-ui
|
|
244
|
+
[data-ui-number-field][data-part-root][data-variant='plain'] {
|
|
243
245
|
background-color: transparent;
|
|
244
246
|
border-color: transparent;
|
|
245
247
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -248,11 +250,11 @@
|
|
|
248
250
|
|
|
249
251
|
/**
|
|
250
252
|
* The one rule the theme cannot write for the family. A transparent border
|
|
251
|
-
* has no system
|
|
253
|
+
* has no system color to be remapped to, so the `plain` control would lose
|
|
252
254
|
* its only edge exactly where an edge matters most.
|
|
253
255
|
*/
|
|
254
256
|
@media (forced-colors: active) {
|
|
255
|
-
[data-ui
|
|
257
|
+
[data-ui-number-field][data-part-root][data-variant='plain'] {
|
|
256
258
|
border-color: ButtonBorder;
|
|
257
259
|
}
|
|
258
260
|
}
|
|
@@ -263,8 +265,8 @@
|
|
|
263
265
|
* inside the value — a currency, a percent sign, a unit — is `format`'s job
|
|
264
266
|
* and arrives through `Intl` as part of the string the control holds.
|
|
265
267
|
*/
|
|
266
|
-
[data-ui
|
|
267
|
-
[data-ui
|
|
268
|
+
[data-ui-number-field] > [data-part-start],
|
|
269
|
+
[data-ui-number-field] > [data-part-end] {
|
|
268
270
|
align-items: center;
|
|
269
271
|
color: var(--slotted-number-field-adornment-color, var(--slotted-text-muted, GrayText));
|
|
270
272
|
display: inline-flex;
|
|
@@ -282,8 +284,8 @@
|
|
|
282
284
|
--slotted-icon-size: var(--_icon-size);
|
|
283
285
|
}
|
|
284
286
|
|
|
285
|
-
[data-ui
|
|
286
|
-
[data-ui
|
|
287
|
+
[data-ui-number-field] > [data-part-start] > svg,
|
|
288
|
+
[data-ui-number-field] > [data-part-end] > svg {
|
|
287
289
|
block-size: var(--_icon-size);
|
|
288
290
|
inline-size: var(--_icon-size);
|
|
289
291
|
}
|
|
@@ -294,8 +296,8 @@
|
|
|
294
296
|
* advance width. An adornment that draws no glyph takes the margin the glyph
|
|
295
297
|
* box already has, on both sides — the measurement `text-field` derived.
|
|
296
298
|
*/
|
|
297
|
-
[data-ui
|
|
298
|
-
[data-ui
|
|
299
|
+
[data-ui-number-field] > [data-part-start]:not(:has(svg, img, [data-ui-icon])),
|
|
300
|
+
[data-ui-number-field] > [data-part-end]:not(:has(svg, img, [data-ui-icon])) {
|
|
299
301
|
padding-inline: calc(var(--_icon-size) / 8);
|
|
300
302
|
}
|
|
301
303
|
|
|
@@ -308,12 +310,11 @@
|
|
|
308
310
|
* mark is not a button, it has no ground to change, and the cursor alone
|
|
309
311
|
* said nothing a reader would look at.
|
|
310
312
|
*/
|
|
311
|
-
[data-ui
|
|
312
|
-
> :is([data-part='start'], [data-part='end']):has(> [data-part='scrub']) {
|
|
313
|
+
[data-ui-number-field] > :is([data-part-start], [data-part-end]):has(> [data-part-scrub]) {
|
|
313
314
|
align-self: stretch;
|
|
314
315
|
}
|
|
315
316
|
|
|
316
|
-
[data-ui
|
|
317
|
+
[data-ui-number-field] [data-part-scrub] {
|
|
317
318
|
align-items: center;
|
|
318
319
|
align-self: stretch;
|
|
319
320
|
cursor: ew-resize;
|
|
@@ -330,12 +331,12 @@
|
|
|
330
331
|
-webkit-user-select: none;
|
|
331
332
|
}
|
|
332
333
|
|
|
333
|
-
[data-ui
|
|
334
|
-
[data-part
|
|
334
|
+
[data-ui-number-field]:not([data-disabled]):not([data-readonly])
|
|
335
|
+
[data-part-scrub]:is(:hover, [data-scrubbing]) {
|
|
335
336
|
color: var(--slotted-number-field-scrub-active-color, var(--slotted-text, CanvasText));
|
|
336
337
|
}
|
|
337
338
|
|
|
338
|
-
[data-ui
|
|
339
|
+
[data-ui-number-field]:is([data-disabled], [data-readonly]) [data-part-scrub] {
|
|
339
340
|
cursor: default;
|
|
340
341
|
touch-action: auto;
|
|
341
342
|
}
|
|
@@ -347,9 +348,9 @@
|
|
|
347
348
|
* screen-reader cursor still reaches them. Their glyphs are the `Glyph`
|
|
348
349
|
* element the binding renders: a character is never an icon.
|
|
349
350
|
*/
|
|
350
|
-
[data-ui
|
|
351
|
-
[data-ui
|
|
352
|
-
[data-ui
|
|
351
|
+
[data-ui-number-field] > [data-part-stepper] > button,
|
|
352
|
+
[data-ui-number-field] > [data-part-decrement],
|
|
353
|
+
[data-ui-number-field] > [data-part-increment] {
|
|
353
354
|
align-items: center;
|
|
354
355
|
appearance: none;
|
|
355
356
|
background-color: transparent;
|
|
@@ -373,8 +374,8 @@
|
|
|
373
374
|
|
|
374
375
|
/* The `icon` box inside each button is drawn at the control's own icon
|
|
375
376
|
step rather than at the icon family's default. */
|
|
376
|
-
[data-ui
|
|
377
|
-
[data-ui
|
|
377
|
+
[data-ui-number-field] [data-part-decrement],
|
|
378
|
+
[data-ui-number-field] [data-part-increment] {
|
|
378
379
|
--slotted-icon-size: var(--_icon-size);
|
|
379
380
|
}
|
|
380
381
|
|
|
@@ -389,7 +390,7 @@
|
|
|
389
390
|
* would have to be mirrored in a right-to-left document; less and more do not
|
|
390
391
|
* change with the reading direction.
|
|
391
392
|
*/
|
|
392
|
-
[data-ui
|
|
393
|
+
[data-ui-number-field][data-stepper='stacked'] [data-part-increment] > [data-ui-icon] {
|
|
393
394
|
rotate: 0.5turn;
|
|
394
395
|
}
|
|
395
396
|
|
|
@@ -403,11 +404,11 @@
|
|
|
403
404
|
* halves are one surface. The paint gives the inset back to the pointer:
|
|
404
405
|
* each half's hit area reaches the frame below.
|
|
405
406
|
*/
|
|
406
|
-
[data-ui
|
|
407
|
+
[data-ui-number-field][data-part-root][data-stepper='stacked'] {
|
|
407
408
|
padding-inline-end: 0;
|
|
408
409
|
}
|
|
409
410
|
|
|
410
|
-
[data-ui
|
|
411
|
+
[data-ui-number-field] > [data-part-stepper] {
|
|
411
412
|
align-self: stretch;
|
|
412
413
|
box-sizing: content-box;
|
|
413
414
|
display: flex;
|
|
@@ -418,26 +419,26 @@
|
|
|
418
419
|
padding-inline-end: var(--_column-inset);
|
|
419
420
|
}
|
|
420
421
|
|
|
421
|
-
[data-ui
|
|
422
|
+
[data-ui-number-field] > [data-part-stepper] > button {
|
|
422
423
|
/* Two halves of the column, whatever the frame's height turns out to be. */
|
|
423
424
|
block-size: 50%;
|
|
424
425
|
border-radius: var(--_column-radius);
|
|
425
426
|
inline-size: 100%;
|
|
426
427
|
}
|
|
427
428
|
|
|
428
|
-
[data-ui
|
|
429
|
-
> [data-part
|
|
430
|
-
> :is([data-part
|
|
429
|
+
[data-ui-number-field]
|
|
430
|
+
> [data-part-stepper]
|
|
431
|
+
> :is([data-part-increment], [data-part-decrement])::after {
|
|
431
432
|
content: '';
|
|
432
433
|
inset-inline: 0 calc(var(--_column-inset) * -1);
|
|
433
434
|
position: absolute;
|
|
434
435
|
}
|
|
435
436
|
|
|
436
|
-
[data-ui
|
|
437
|
+
[data-ui-number-field] > [data-part-stepper] > [data-part-increment]::after {
|
|
437
438
|
inset-block: calc(var(--_column-inset) * -1) 0;
|
|
438
439
|
}
|
|
439
440
|
|
|
440
|
-
[data-ui
|
|
441
|
+
[data-ui-number-field] > [data-part-stepper] > [data-part-decrement]::after {
|
|
441
442
|
inset-block: 0 calc(var(--_column-inset) * -1);
|
|
442
443
|
}
|
|
443
444
|
|
|
@@ -456,7 +457,7 @@
|
|
|
456
457
|
* percentage falls back to the `<svg>`'s own square, and two of them plus the
|
|
457
458
|
* divider stood a pixel taller than the value and grew the frame.
|
|
458
459
|
*/
|
|
459
|
-
[data-ui
|
|
460
|
+
[data-ui-number-field] > [data-part-stepper] > button > [data-ui-icon] {
|
|
460
461
|
block-size: min(var(--_icon-size), 100%);
|
|
461
462
|
contain: size;
|
|
462
463
|
}
|
|
@@ -465,32 +466,32 @@
|
|
|
465
466
|
*
|
|
466
467
|
* The quantity picker's arrangement. Each button is a square inner control
|
|
467
468
|
* inset concentrically, and the frame's padding is that inset on both
|
|
468
|
-
* sides; the value takes the gap as its own inset and sits
|
|
469
|
+
* sides; the value takes the gap as its own inset and sits centerd between
|
|
469
470
|
* the two buttons, which is where a quantity belongs. No rule divides a
|
|
470
471
|
* button from the value: the ground it paints is its edge.
|
|
471
472
|
*/
|
|
472
|
-
[data-ui
|
|
473
|
+
[data-ui-number-field][data-part-root][data-stepper='split'] {
|
|
473
474
|
gap: 0;
|
|
474
475
|
padding-inline: var(--_inset);
|
|
475
476
|
}
|
|
476
477
|
|
|
477
|
-
[data-ui
|
|
478
|
-
[data-ui
|
|
478
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-decrement],
|
|
479
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-increment] {
|
|
479
480
|
block-size: var(--_action-size);
|
|
480
481
|
border-radius: var(--_action-radius);
|
|
481
482
|
inline-size: var(--_action-size);
|
|
482
483
|
}
|
|
483
484
|
|
|
484
|
-
[data-ui
|
|
485
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-input] {
|
|
485
486
|
padding-inline: var(--_gap);
|
|
486
487
|
text-align: center;
|
|
487
488
|
}
|
|
488
489
|
|
|
489
|
-
[data-ui
|
|
490
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-start] {
|
|
490
491
|
padding-inline-start: var(--_gap);
|
|
491
492
|
}
|
|
492
493
|
|
|
493
|
-
[data-ui
|
|
494
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-end] {
|
|
494
495
|
padding-inline-end: var(--_gap);
|
|
495
496
|
}
|
|
496
497
|
|
|
@@ -506,8 +507,8 @@
|
|
|
506
507
|
* small target. That shortfall is the arrangement's own, and `split` is the
|
|
507
508
|
* answer to it.
|
|
508
509
|
*/
|
|
509
|
-
[data-ui
|
|
510
|
-
[data-ui
|
|
510
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-decrement]::after,
|
|
511
|
+
[data-ui-number-field][data-stepper='split'] > [data-part-increment]::after {
|
|
511
512
|
content: '';
|
|
512
513
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
513
514
|
position: absolute;
|
|
@@ -525,14 +526,14 @@
|
|
|
525
526
|
* inline axis, over the value's edge and past the frame's.
|
|
526
527
|
*/
|
|
527
528
|
@media (pointer: coarse) {
|
|
528
|
-
[data-ui
|
|
529
|
-
> :is([data-part
|
|
529
|
+
[data-ui-number-field][data-stepper='split']
|
|
530
|
+
> :is([data-part-decrement], [data-part-increment])::after {
|
|
530
531
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
531
532
|
}
|
|
532
533
|
|
|
533
|
-
[data-ui
|
|
534
|
-
> [data-part
|
|
535
|
-
> :is([data-part
|
|
534
|
+
[data-ui-number-field]
|
|
535
|
+
> [data-part-stepper]
|
|
536
|
+
> :is([data-part-increment], [data-part-decrement])::after {
|
|
536
537
|
inset-inline: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
537
538
|
}
|
|
538
539
|
}
|
|
@@ -543,16 +544,16 @@
|
|
|
543
544
|
* ones it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
544
545
|
*/
|
|
545
546
|
|
|
546
|
-
[data-ui
|
|
547
|
-
[data-ui
|
|
547
|
+
[data-ui-number-field] [data-part-decrement]:hover:not(:disabled),
|
|
548
|
+
[data-ui-number-field] [data-part-increment]:hover:not(:disabled) {
|
|
548
549
|
background-color: var(
|
|
549
550
|
--slotted-number-field-stepper-hover-background,
|
|
550
551
|
var(--slotted-tone-secondary-subtle-hover)
|
|
551
552
|
);
|
|
552
553
|
}
|
|
553
554
|
|
|
554
|
-
[data-ui
|
|
555
|
-
[data-ui
|
|
555
|
+
[data-ui-number-field] [data-part-decrement]:active:not(:disabled),
|
|
556
|
+
[data-ui-number-field] [data-part-increment]:active:not(:disabled) {
|
|
556
557
|
background-color: var(
|
|
557
558
|
--slotted-number-field-stepper-active-background,
|
|
558
559
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -566,11 +567,11 @@
|
|
|
566
567
|
* drawing them, because a number field without its stepper is a different
|
|
567
568
|
* component and a disabled form still has to say what it holds.
|
|
568
569
|
*/
|
|
569
|
-
[data-ui
|
|
570
|
-
[data-ui
|
|
570
|
+
[data-ui-number-field] [data-part-decrement]:disabled,
|
|
571
|
+
[data-ui-number-field] [data-part-increment]:disabled {
|
|
571
572
|
/**
|
|
572
573
|
* The ground as well as the ink. The disabled foreground and the resting
|
|
573
|
-
* stepper
|
|
574
|
+
* stepper color are two steps of one neutral and differ by about a shade,
|
|
574
575
|
* so a stepper at its bound painted only in ink read as available — the
|
|
575
576
|
* capture of the `stepper` scene showed a decrement at nought that nothing
|
|
576
577
|
* distinguished from the one above it. The switched-off segment says it in
|
|
@@ -589,21 +590,21 @@
|
|
|
589
590
|
* path on touch and a screen-reader cursor activating one directly. It sits
|
|
590
591
|
* inside the frame's own edge, so the ring never doubles the border.
|
|
591
592
|
*/
|
|
592
|
-
[data-ui
|
|
593
|
-
[data-ui
|
|
593
|
+
[data-ui-number-field] [data-part-decrement]:focus-visible,
|
|
594
|
+
[data-ui-number-field] [data-part-increment]:focus-visible {
|
|
594
595
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
595
596
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
596
597
|
}
|
|
597
598
|
|
|
598
599
|
/* ── Frame states ─────────────────────────────────────────────────────── */
|
|
599
600
|
|
|
600
|
-
[data-ui
|
|
601
|
+
[data-ui-number-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
601
602
|
[data-invalid]
|
|
602
603
|
) {
|
|
603
604
|
border-color: var(--slotted-number-field-hover-border-color, var(--slotted-tone-accent-border));
|
|
604
605
|
}
|
|
605
606
|
|
|
606
|
-
[data-ui
|
|
607
|
+
[data-ui-number-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
607
608
|
[data-readonly]
|
|
608
609
|
):not([data-invalid]) {
|
|
609
610
|
background-color: var(
|
|
@@ -612,7 +613,7 @@
|
|
|
612
613
|
);
|
|
613
614
|
}
|
|
614
615
|
|
|
615
|
-
[data-ui
|
|
616
|
+
[data-ui-number-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
616
617
|
[data-readonly]
|
|
617
618
|
):not([data-invalid]) {
|
|
618
619
|
background-color: var(
|
|
@@ -628,13 +629,13 @@
|
|
|
628
629
|
* matches `:focus-visible` on a text input for a pointer press as well as for
|
|
629
630
|
* a Tab, which is right for a control whose caret is the thing that moved.
|
|
630
631
|
*/
|
|
631
|
-
[data-ui
|
|
632
|
-
/* The resting shadow,
|
|
633
|
-
around it are one
|
|
632
|
+
[data-ui-number-field][data-part-root]:has(> [data-part-input]:focus-visible) {
|
|
633
|
+
/* The resting shadow, recolored: the lift under the control and the ring
|
|
634
|
+
around it are one color, and the state decides which color that is. */
|
|
634
635
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
635
636
|
var(--slotted-focus-ring-color, Highlight);
|
|
636
637
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
637
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
638
|
+
outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
|
|
638
639
|
}
|
|
639
640
|
|
|
640
641
|
/**
|
|
@@ -644,8 +645,8 @@
|
|
|
644
645
|
* shadow that appears only under focus is a cell that changes size when it
|
|
645
646
|
* is used.
|
|
646
647
|
*/
|
|
647
|
-
[data-ui
|
|
648
|
-
> [data-part
|
|
648
|
+
[data-ui-number-field][data-part-root][data-variant='plain']:has(
|
|
649
|
+
> [data-part-input]:focus-visible
|
|
649
650
|
) {
|
|
650
651
|
box-shadow: none;
|
|
651
652
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
@@ -655,10 +656,10 @@
|
|
|
655
656
|
* Invalid outranks hover and is written after it for that reason. The ring is
|
|
656
657
|
* retargeted rather than repainted: every rule that draws focus reads
|
|
657
658
|
* `--slotted-focus-ring-color`, so pointing that one name at the invalid
|
|
658
|
-
*
|
|
659
|
+
* color on the element moves the outline, the shadow and both steppers'
|
|
659
660
|
* rings at once.
|
|
660
661
|
*/
|
|
661
|
-
[data-ui
|
|
662
|
+
[data-ui-number-field][data-part-root][data-invalid] {
|
|
662
663
|
--slotted-focus-ring-color: var(
|
|
663
664
|
--slotted-number-field-invalid-focus-ring-color,
|
|
664
665
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -678,7 +679,7 @@
|
|
|
678
679
|
var(--slotted-tone-danger-border)
|
|
679
680
|
);
|
|
680
681
|
/*
|
|
681
|
-
* Width as well as
|
|
682
|
+
* Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
|
|
682
683
|
* `high-contrast` the danger border is the resting edge's black. The line
|
|
683
684
|
* is a shadow inside the border, so neither box nor text moves, and it
|
|
684
685
|
* takes the resting lift's place.
|
|
@@ -686,17 +687,15 @@
|
|
|
686
687
|
box-shadow: var(--_invalid-edge);
|
|
687
688
|
}
|
|
688
689
|
|
|
689
|
-
[data-ui
|
|
690
|
-
> [data-part='input']:focus-visible
|
|
691
|
-
) {
|
|
690
|
+
[data-ui-number-field][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
692
691
|
box-shadow:
|
|
693
692
|
var(--_invalid-edge),
|
|
694
693
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
695
694
|
var(--slotted-focus-ring-color, Highlight);
|
|
696
695
|
}
|
|
697
696
|
|
|
698
|
-
[data-ui
|
|
699
|
-
> [data-part
|
|
697
|
+
[data-ui-number-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
698
|
+
> [data-part-input]:focus-visible
|
|
700
699
|
) {
|
|
701
700
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
702
701
|
it; the edge reaches past the ring. */
|
|
@@ -709,28 +708,29 @@
|
|
|
709
708
|
}
|
|
710
709
|
|
|
711
710
|
/*
|
|
712
|
-
* Forced
|
|
711
|
+
* Forced colors remove every box shadow, and the edge with them. The
|
|
713
712
|
* width comes back as an outline inside the border, and a focused invalid
|
|
714
713
|
* control draws its ring double, which a valid ring is not.
|
|
715
714
|
*/
|
|
716
715
|
@media (forced-colors: active) {
|
|
717
|
-
[data-ui
|
|
716
|
+
[data-ui-number-field][data-part-root][data-invalid] {
|
|
718
717
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
719
718
|
outline-offset: calc(
|
|
720
719
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
721
720
|
);
|
|
722
721
|
}
|
|
723
722
|
|
|
724
|
-
[data-ui
|
|
725
|
-
> [data-part='input']:focus-visible
|
|
726
|
-
) {
|
|
723
|
+
[data-ui-number-field][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
727
724
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
728
725
|
var(--slotted-focus-ring-color, Highlight);
|
|
729
|
-
outline-offset: var(
|
|
726
|
+
outline-offset: var(
|
|
727
|
+
--slotted-control-focus-ring-offset,
|
|
728
|
+
var(--slotted-focus-ring-offset, 2px)
|
|
729
|
+
);
|
|
730
730
|
}
|
|
731
731
|
|
|
732
|
-
[data-ui
|
|
733
|
-
> [data-part
|
|
732
|
+
[data-ui-number-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
733
|
+
> [data-part-input]:focus-visible
|
|
734
734
|
) {
|
|
735
735
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
736
736
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -745,7 +745,7 @@
|
|
|
745
745
|
* mistakable for disabled: the value is still real and still submitted. The
|
|
746
746
|
* ground says "not yours to change" and the ink says nothing at all.
|
|
747
747
|
*/
|
|
748
|
-
[data-ui
|
|
748
|
+
[data-ui-number-field][data-part-root][data-readonly] {
|
|
749
749
|
background-color: var(
|
|
750
750
|
--slotted-number-field-readonly-background,
|
|
751
751
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -773,8 +773,8 @@
|
|
|
773
773
|
* disabled `fieldset` disables every control inside it, and the control has
|
|
774
774
|
* no way to know.
|
|
775
775
|
*/
|
|
776
|
-
[data-ui
|
|
777
|
-
[data-ui
|
|
776
|
+
[data-ui-number-field][data-part-root][data-disabled],
|
|
777
|
+
[data-ui-number-field][data-part-root]:has(> [data-part-input]:disabled) {
|
|
778
778
|
background-color: var(
|
|
779
779
|
--slotted-number-field-disabled-background,
|
|
780
780
|
var(--slotted-disabled-background)
|
|
@@ -787,11 +787,11 @@
|
|
|
787
787
|
}
|
|
788
788
|
|
|
789
789
|
/**
|
|
790
|
-
* Muted to the
|
|
790
|
+
* Muted to the color the theme measures rather than faded by opacity: a
|
|
791
791
|
* value nobody can read is a field nobody can check.
|
|
792
792
|
*/
|
|
793
|
-
[data-ui
|
|
794
|
-
[data-ui
|
|
793
|
+
[data-ui-number-field][data-part-root][data-disabled] > [data-part-start],
|
|
794
|
+
[data-ui-number-field][data-part-root][data-disabled] > [data-part-end] {
|
|
795
795
|
color: var(--slotted-disabled-foreground);
|
|
796
796
|
}
|
|
797
797
|
}
|