@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
package/src/field/field.css
CHANGED
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
* a field in a 240-pixel drawer has to stack while the same field in a page
|
|
20
20
|
* grid stays beside its control.
|
|
21
21
|
*/
|
|
22
|
-
[data-ui
|
|
22
|
+
[data-ui-field][data-part-root] {
|
|
23
23
|
/**
|
|
24
24
|
* Type, control height and glyph come from the control scales, the only
|
|
25
25
|
* ones the theme restates per density, so a field in a dense table shrinks
|
|
26
26
|
* whole rather than in parts. The control height is read for one reason:
|
|
27
|
-
* the side label is
|
|
27
|
+
* the side label is centerd on the control's first line, and that is the
|
|
28
28
|
* only distance in the family that depends on the control's own size.
|
|
29
29
|
*/
|
|
30
30
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/* Every child spans the field, and the two that do not say so below. */
|
|
82
|
-
[data-ui
|
|
82
|
+
[data-ui-field][data-part-root] > * {
|
|
83
83
|
grid-column: 1 / -1;
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -90,10 +90,25 @@
|
|
|
90
90
|
* rather than the control. Nothing here paints the control, sizes its type or
|
|
91
91
|
* touches its border: `text-field` owns all three.
|
|
92
92
|
*/
|
|
93
|
-
[data-ui
|
|
93
|
+
[data-ui-field] > [data-part-control] {
|
|
94
94
|
min-inline-size: 0;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
/**
|
|
98
|
+
* The width says what the field expects: the control stands no wider than
|
|
99
|
+
* the step, and still shrinks with a narrower field. The control is the
|
|
100
|
+
* child that is another family's root, or the part a consumer wrote.
|
|
101
|
+
*/
|
|
102
|
+
[data-ui-field][data-part-root][data-width='short']
|
|
103
|
+
> :is([data-part-control], [data-ui]:not([data-ui-inline-message])) {
|
|
104
|
+
max-inline-size: var(--slotted-field-width-short, 6rem);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[data-ui-field][data-part-root][data-width='medium']
|
|
108
|
+
> :is([data-part-control], [data-ui]:not([data-ui-inline-message])) {
|
|
109
|
+
max-inline-size: var(--slotted-field-width-medium, 15rem);
|
|
110
|
+
}
|
|
111
|
+
|
|
97
112
|
/* ── Size ─────────────────────────────────────────────────────────────
|
|
98
113
|
*
|
|
99
114
|
* Three steps, matching the control the field wraps. Fluent ships the same
|
|
@@ -101,7 +116,7 @@
|
|
|
101
116
|
* inside it, which makes a field with no control an unsized box.
|
|
102
117
|
*/
|
|
103
118
|
|
|
104
|
-
[data-ui
|
|
119
|
+
[data-ui-field][data-part-root][data-size='sm'] {
|
|
105
120
|
--_help-glyph: max(
|
|
106
121
|
var(--slotted-field-icon-size-min, 14px),
|
|
107
122
|
var(--slotted-control-icon-size-sm, 14px)
|
|
@@ -111,7 +126,7 @@
|
|
|
111
126
|
--_control-block-size: var(--slotted-control-height-sm, 30px);
|
|
112
127
|
}
|
|
113
128
|
|
|
114
|
-
[data-ui
|
|
129
|
+
[data-ui-field][data-part-root][data-size='md'] {
|
|
115
130
|
--_help-glyph: max(
|
|
116
131
|
var(--slotted-field-icon-size-min, 14px),
|
|
117
132
|
var(--slotted-control-icon-size-sm, 14px)
|
|
@@ -121,7 +136,7 @@
|
|
|
121
136
|
--_control-block-size: var(--slotted-control-height-md, 34px);
|
|
122
137
|
}
|
|
123
138
|
|
|
124
|
-
[data-ui
|
|
139
|
+
[data-ui-field][data-part-root][data-size='lg'] {
|
|
125
140
|
--_help-glyph: max(
|
|
126
141
|
var(--slotted-field-icon-size-min, 14px),
|
|
127
142
|
var(--slotted-control-icon-size-md, 16px)
|
|
@@ -142,8 +157,8 @@
|
|
|
142
157
|
* line height is for a box holding one line, and a label of twelve words
|
|
143
158
|
* beside a narrow control holds three.
|
|
144
159
|
*/
|
|
145
|
-
[data-ui
|
|
146
|
-
[data-ui
|
|
160
|
+
[data-ui-field] > [data-part-label],
|
|
161
|
+
[data-ui-field] > [data-part-header] > [data-part-label] {
|
|
147
162
|
color: var(--slotted-field-label-color, var(--slotted-text));
|
|
148
163
|
font-size: var(--_font-size);
|
|
149
164
|
font-weight: var(--slotted-field-label-font-weight, var(--slotted-font-weight-medium, 500));
|
|
@@ -163,8 +178,8 @@
|
|
|
163
178
|
* The first row is the label's, or the header's when the label has company.
|
|
164
179
|
* Either spans the field when the label sits above the control.
|
|
165
180
|
*/
|
|
166
|
-
[data-ui
|
|
167
|
-
[data-ui
|
|
181
|
+
[data-ui-field] > [data-part-label],
|
|
182
|
+
[data-ui-field] > [data-part-header] {
|
|
168
183
|
grid-column: 1 / -1;
|
|
169
184
|
grid-row: 1;
|
|
170
185
|
}
|
|
@@ -175,7 +190,7 @@
|
|
|
175
190
|
* label under it; a field without one would otherwise lose the counter's track
|
|
176
191
|
* from the label's width for a part that is not there.
|
|
177
192
|
*/
|
|
178
|
-
[data-ui
|
|
193
|
+
[data-ui-field][data-part-root]:has(> [data-part-counter]) > [data-part-label] {
|
|
179
194
|
grid-column: 1 / 3;
|
|
180
195
|
}
|
|
181
196
|
|
|
@@ -189,12 +204,14 @@
|
|
|
189
204
|
* a red asterisk is the convention every surveyed implementation follows, and
|
|
190
205
|
* the field deliberately does *not* repaint the label when it is invalid: a
|
|
191
206
|
* red marker on a red label is a marker nobody can see, and the error already
|
|
192
|
-
* says the same thing in words, in
|
|
207
|
+
* says the same thing in words, in color and in a glyph.
|
|
193
208
|
*/
|
|
194
|
-
[data-ui
|
|
195
|
-
[data-ui
|
|
209
|
+
[data-ui-field] > [data-part-label] > [data-part-mark],
|
|
210
|
+
[data-ui-field] > [data-part-header] > [data-part-label] > [data-part-mark] {
|
|
196
211
|
color: var(--slotted-field-mark-color, var(--slotted-tone-danger-text));
|
|
197
|
-
|
|
212
|
+
/* The distance is the space written before the mark, which the accessible
|
|
213
|
+
name needs as text; the token adds to it. */
|
|
214
|
+
margin-inline-start: var(--slotted-field-mark-gap, 0);
|
|
198
215
|
/* The label breaks anywhere; the necessity word never does. `(required)`
|
|
199
216
|
split across two lines as `(re` and `quired)` in the 240-pixel capture,
|
|
200
217
|
because a rule for one unbreakable German noun had reached the one part
|
|
@@ -217,13 +234,13 @@
|
|
|
217
234
|
* a qualifier rather than as two labels. `optional` writes the word only on
|
|
218
235
|
* the fields a reader may skip; `words` writes both.
|
|
219
236
|
*/
|
|
220
|
-
[data-ui
|
|
221
|
-
> [data-part
|
|
222
|
-
> [data-part
|
|
223
|
-
[data-ui
|
|
224
|
-
> [data-part
|
|
225
|
-
> [data-part
|
|
226
|
-
> [data-part
|
|
237
|
+
[data-ui-field]:is([data-necessity='optional'], [data-necessity='words'])
|
|
238
|
+
> [data-part-label]
|
|
239
|
+
> [data-part-mark],
|
|
240
|
+
[data-ui-field]:is([data-necessity='optional'], [data-necessity='words'])
|
|
241
|
+
> [data-part-header]
|
|
242
|
+
> [data-part-label]
|
|
243
|
+
> [data-part-mark] {
|
|
227
244
|
color: var(--slotted-field-mark-text-color, var(--slotted-text-muted));
|
|
228
245
|
font-size: var(--slotted-control-font-size-sm, 12px);
|
|
229
246
|
font-weight: var(--slotted-font-weight-regular, 400);
|
|
@@ -234,16 +251,16 @@
|
|
|
234
251
|
* The label row, when the label has company: the help behind an icon, an
|
|
235
252
|
* indicator such as `Beta`, an action such as `Forgot password?`, and the
|
|
236
253
|
* counter. ReUI writes the same row by hand in four of its examples — a
|
|
237
|
-
* `div` with `justify-between` around the label — and
|
|
254
|
+
* `div` with `justify-between` around the label — and centers every item in
|
|
238
255
|
* it; here the row is a part, and it aligns its items on the label's first
|
|
239
256
|
* baseline instead, so a 13-pixel label, a 12-pixel count and an emblem with
|
|
240
|
-
* a box of its own sit on one line of text rather than on one
|
|
257
|
+
* a box of its own sit on one line of text rather than on one center.
|
|
241
258
|
*
|
|
242
259
|
* The row takes the label's type, so `1lh`, `1cap` and `1ex` measured by
|
|
243
260
|
* anything inside it are the label's line. It wraps: in a narrow field the
|
|
244
261
|
* action and the counter move to a second line, still at its end.
|
|
245
262
|
*/
|
|
246
|
-
[data-ui
|
|
263
|
+
[data-ui-field] > [data-part-header] {
|
|
247
264
|
align-items: baseline;
|
|
248
265
|
column-gap: var(--slotted-field-header-gap, var(--slotted-space-3, 0.375rem));
|
|
249
266
|
display: flex;
|
|
@@ -253,7 +270,7 @@
|
|
|
253
270
|
min-inline-size: 0;
|
|
254
271
|
}
|
|
255
272
|
|
|
256
|
-
[data-ui
|
|
273
|
+
[data-ui-field] > [data-part-header] > [data-part-label] {
|
|
257
274
|
flex: 0 1 auto;
|
|
258
275
|
}
|
|
259
276
|
|
|
@@ -264,12 +281,12 @@
|
|
|
264
281
|
* distance a side label keeps from its control, so a link and a number do
|
|
265
282
|
* not read as one phrase.
|
|
266
283
|
*/
|
|
267
|
-
[data-ui
|
|
268
|
-
[data-ui
|
|
284
|
+
[data-ui-field] > [data-part-header] > [data-part-action],
|
|
285
|
+
[data-ui-field] > [data-part-header] > [data-part-counter] {
|
|
269
286
|
margin-inline-start: auto;
|
|
270
287
|
}
|
|
271
288
|
|
|
272
|
-
[data-ui
|
|
289
|
+
[data-ui-field] > [data-part-header] > [data-part-action] ~ [data-part-counter] {
|
|
273
290
|
margin-inline-start: var(--slotted-space-3, 0.375rem);
|
|
274
291
|
}
|
|
275
292
|
|
|
@@ -288,7 +305,7 @@
|
|
|
288
305
|
* label's type at its own height and gives the difference back in the block
|
|
289
306
|
* axis, so a field with a help icon is exactly as tall as one without. The
|
|
290
307
|
* line inside it is the label's own — `font: inherit` — and a `button`
|
|
291
|
-
*
|
|
308
|
+
* centers its content in the block axis, so the button's baseline stands
|
|
292
309
|
* where the label's does; a line as tall as the box put it 0.44 pixels lower
|
|
293
310
|
* at comfortable and 0.69 at dense, and the row grew by that much. Only
|
|
294
311
|
* the block axis gives it back: a negative inline margin would pull the box
|
|
@@ -299,14 +316,14 @@
|
|
|
299
316
|
*
|
|
300
317
|
* The glyph is placed on the label's text rather than on its line box: the
|
|
301
318
|
* button holds one line of the label's type, and the glyph sits on that
|
|
302
|
-
* line's baseline and
|
|
319
|
+
* line's baseline and centerd on the band between the middle of the
|
|
303
320
|
* capitals and the middle of the lowercase — `(1cap + 1ex) / 2` — the band
|
|
304
321
|
* `toast` settled on (`docs/build-briefing.md`, a mark beside a line of
|
|
305
322
|
* text). The first capture raised the glyph's bottom by the band less half
|
|
306
|
-
* the glyph, which put its
|
|
323
|
+
* the glyph, which put its center on the band's top: four pixels high, and a
|
|
307
324
|
* line box 3.3 pixels taller than the label's.
|
|
308
325
|
*/
|
|
309
|
-
[data-ui
|
|
326
|
+
[data-ui-field] > [data-part-header] > [data-part-help] {
|
|
310
327
|
/* Never shorter than the label's line: at dense the inside of a control is
|
|
311
328
|
16 pixels and the line 17.39, and a button shorter than its own line
|
|
312
329
|
overflows downward and pushes the row 0.69 pixels taller. */
|
|
@@ -345,16 +362,16 @@
|
|
|
345
362
|
var(--slotted-control-transition-easing);
|
|
346
363
|
}
|
|
347
364
|
|
|
348
|
-
/* The pointer target: a transparent square
|
|
365
|
+
/* The pointer target: a transparent square centerd on the box that reaches
|
|
349
366
|
the WCAG minimum wherever the box falls short of it — 22 pixels at
|
|
350
367
|
comfortable, 16 at dense. It takes no room, so the row keeps its height. */
|
|
351
|
-
[data-ui
|
|
368
|
+
[data-ui-field] > [data-part-header] > [data-part-help]::before {
|
|
352
369
|
content: '';
|
|
353
370
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
354
371
|
position: absolute;
|
|
355
372
|
}
|
|
356
373
|
|
|
357
|
-
[data-ui
|
|
374
|
+
[data-ui-field] > [data-part-header] > [data-part-help] > [data-ui-icon] {
|
|
358
375
|
vertical-align: calc(((1cap + 1ex) / 2 - var(--_help-glyph)) / 2);
|
|
359
376
|
}
|
|
360
377
|
|
|
@@ -363,22 +380,22 @@
|
|
|
363
380
|
* hover ground while its tooltip is showing, so the reader sees which icon
|
|
364
381
|
* the layer belongs to after the pointer has moved onto the layer.
|
|
365
382
|
*/
|
|
366
|
-
[data-ui
|
|
367
|
-
[data-ui
|
|
383
|
+
[data-ui-field] > [data-part-header] > [data-part-help]:enabled:hover,
|
|
384
|
+
[data-ui-field] > [data-part-header] > [data-part-help][data-open] {
|
|
368
385
|
background-color: var(
|
|
369
386
|
--slotted-field-help-surface-hover,
|
|
370
387
|
var(--slotted-tone-secondary-subtle-hover, ButtonFace)
|
|
371
388
|
);
|
|
372
389
|
}
|
|
373
390
|
|
|
374
|
-
[data-ui
|
|
391
|
+
[data-ui-field] > [data-part-header] > [data-part-help]:enabled:active {
|
|
375
392
|
background-color: var(
|
|
376
393
|
--slotted-field-help-surface-active,
|
|
377
394
|
var(--slotted-tone-secondary-subtle-active, ButtonFace)
|
|
378
395
|
);
|
|
379
396
|
}
|
|
380
397
|
|
|
381
|
-
[data-ui
|
|
398
|
+
[data-ui-field] > [data-part-header] > [data-part-help]:focus-visible {
|
|
382
399
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
383
400
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
384
401
|
}
|
|
@@ -391,11 +408,11 @@
|
|
|
391
408
|
* description rather than with its name. The badges are the badge family's;
|
|
392
409
|
* the field only spaces them.
|
|
393
410
|
*/
|
|
394
|
-
[data-ui
|
|
411
|
+
[data-ui-field] > [data-part-header] > [data-part-indicator] {
|
|
395
412
|
align-items: center;
|
|
396
413
|
/* A badge is a box, not a line of text. Set on the label's baseline, its
|
|
397
414
|
own inset stood it 1.77 pixels above the label's line and the row grew
|
|
398
|
-
by that much;
|
|
415
|
+
by that much; centerd on the line, an 18.8-pixel badge fits in the
|
|
399
416
|
18.85-pixel line and the row is the label's height with or without it. */
|
|
400
417
|
align-self: center;
|
|
401
418
|
column-gap: var(--slotted-space-2, 0.25rem);
|
|
@@ -408,7 +425,7 @@
|
|
|
408
425
|
* A link or a button at the end of the label row: `Forgot password?`,
|
|
409
426
|
* `Generate`, `Use the billing address`. It is a text control, so it speaks
|
|
410
427
|
* the vocabulary `link` settled for text that answers a pointer: accent ink
|
|
411
|
-
* at rest, a hover a third of the way to the body
|
|
428
|
+
* at rest, a hover a third of the way to the body color with the underline
|
|
412
429
|
* drawn, and a press two thirds of the way. ReUI paints the same action in
|
|
413
430
|
* muted ink, where it reads as inert text beside the counter, and answers
|
|
414
431
|
* press with a one-pixel shift of a line of 12-pixel type.
|
|
@@ -419,7 +436,7 @@
|
|
|
419
436
|
* from a padding and a line — the sum measured 23.98 — and a flex box's
|
|
420
437
|
* baseline is its words', so the row still aligns on it.
|
|
421
438
|
*/
|
|
422
|
-
[data-ui
|
|
439
|
+
[data-ui-field] > [data-part-header] > [data-part-action] {
|
|
423
440
|
--_rest: var(--slotted-field-action-color, var(--slotted-tone-accent-text, LinkText));
|
|
424
441
|
|
|
425
442
|
align-items: center;
|
|
@@ -453,9 +470,9 @@
|
|
|
453
470
|
unicode-bidi: plaintext;
|
|
454
471
|
}
|
|
455
472
|
|
|
456
|
-
[data-ui
|
|
457
|
-
> [data-part
|
|
458
|
-
> [data-part
|
|
473
|
+
[data-ui-field]
|
|
474
|
+
> [data-part-header]
|
|
475
|
+
> [data-part-action]:not(:disabled, [aria-disabled='true']):hover {
|
|
459
476
|
color: var(
|
|
460
477
|
--slotted-field-action-color-hover,
|
|
461
478
|
color-mix(in oklab, var(--_rest) 65%, var(--slotted-text, CanvasText))
|
|
@@ -463,9 +480,9 @@
|
|
|
463
480
|
text-decoration-color: currentColor;
|
|
464
481
|
}
|
|
465
482
|
|
|
466
|
-
[data-ui
|
|
467
|
-
> [data-part
|
|
468
|
-
> [data-part
|
|
483
|
+
[data-ui-field]
|
|
484
|
+
> [data-part-header]
|
|
485
|
+
> [data-part-action]:not(:disabled, [aria-disabled='true']):active {
|
|
469
486
|
color: var(
|
|
470
487
|
--slotted-field-action-color-active,
|
|
471
488
|
color-mix(in oklab, var(--_rest) 35%, var(--slotted-text, CanvasText))
|
|
@@ -473,31 +490,29 @@
|
|
|
473
490
|
text-decoration-color: currentColor;
|
|
474
491
|
}
|
|
475
492
|
|
|
476
|
-
[data-ui
|
|
493
|
+
[data-ui-field] > [data-part-header] > [data-part-action]:focus-visible {
|
|
477
494
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
478
495
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
479
496
|
text-decoration-color: currentColor;
|
|
480
497
|
}
|
|
481
498
|
|
|
482
|
-
[data-ui='
|
|
483
|
-
> [data-part='header']
|
|
484
|
-
> [data-part='action']:is(:disabled, [aria-disabled='true']) {
|
|
499
|
+
[data-ui-field] > [data-part-header] > [data-part-action]:is(:disabled, [aria-disabled='true']) {
|
|
485
500
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
486
501
|
cursor: not-allowed;
|
|
487
502
|
}
|
|
488
503
|
|
|
489
504
|
/**
|
|
490
505
|
* On a finger both controls of the row reach the comfortable target with a
|
|
491
|
-
* transparent halo
|
|
506
|
+
* transparent halo centerd on the box. The halo takes no room, so the row
|
|
492
507
|
* keeps its height and the ground and the ring stay the box a mouse sees.
|
|
493
508
|
*/
|
|
494
509
|
@media (pointer: coarse) {
|
|
495
|
-
[data-ui
|
|
510
|
+
[data-ui-field] > [data-part-header] > [data-part-action] {
|
|
496
511
|
position: relative;
|
|
497
512
|
}
|
|
498
513
|
|
|
499
|
-
[data-ui
|
|
500
|
-
[data-ui
|
|
514
|
+
[data-ui-field] > [data-part-header] > [data-part-help]::before,
|
|
515
|
+
[data-ui-field] > [data-part-header] > [data-part-action]::before {
|
|
501
516
|
content: '';
|
|
502
517
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
503
518
|
position: absolute;
|
|
@@ -514,8 +529,8 @@
|
|
|
514
529
|
* Tabular figures, because a counter that jitters as it counts is a counter
|
|
515
530
|
* the eye follows instead of the field.
|
|
516
531
|
*/
|
|
517
|
-
[data-ui
|
|
518
|
-
[data-ui
|
|
532
|
+
[data-ui-field] > [data-part-counter],
|
|
533
|
+
[data-ui-field] > [data-part-header] > [data-part-counter] {
|
|
519
534
|
color: var(--slotted-field-counter-color, var(--slotted-text-muted));
|
|
520
535
|
font-size: var(--slotted-control-font-size-sm, 12px);
|
|
521
536
|
font-variant-numeric: tabular-nums;
|
|
@@ -528,7 +543,7 @@
|
|
|
528
543
|
* The counter the family draws on a field with no header: the end of the
|
|
529
544
|
* label row, in the third track, apart from the label by the side gap.
|
|
530
545
|
*/
|
|
531
|
-
[data-ui
|
|
546
|
+
[data-ui-field] > [data-part-counter] {
|
|
532
547
|
align-self: end;
|
|
533
548
|
grid-column: 3;
|
|
534
549
|
grid-row: 1;
|
|
@@ -541,8 +556,8 @@
|
|
|
541
556
|
* its maximum while validation has not yet run, and a counter that only turned
|
|
542
557
|
* at submit would say nothing at the moment it is being read.
|
|
543
558
|
*/
|
|
544
|
-
[data-ui
|
|
545
|
-
[data-ui
|
|
559
|
+
[data-ui-field] > [data-part-counter][data-invalid],
|
|
560
|
+
[data-ui-field] > [data-part-header] > [data-part-counter][data-invalid] {
|
|
546
561
|
color: var(--slotted-field-counter-invalid-color, var(--slotted-tone-danger-text));
|
|
547
562
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
548
563
|
}
|
|
@@ -560,7 +575,7 @@
|
|
|
560
575
|
* form that renders its error unconditionally so nothing below it moves when
|
|
561
576
|
* the error arrives.
|
|
562
577
|
*/
|
|
563
|
-
[data-ui
|
|
578
|
+
[data-ui-field] > [data-ui-inline-message]:not([data-reserve]):has([data-part-text]:empty) {
|
|
564
579
|
display: none;
|
|
565
580
|
}
|
|
566
581
|
|
|
@@ -575,7 +590,7 @@
|
|
|
575
590
|
* own root rule, which has the same two attributes; equal specificity would
|
|
576
591
|
* leave the winner to stylesheet order.
|
|
577
592
|
*/
|
|
578
|
-
[data-ui
|
|
593
|
+
[data-ui-field][data-part-root] > [data-ui-inline-message] {
|
|
579
594
|
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
580
595
|
}
|
|
581
596
|
|
|
@@ -586,8 +601,8 @@
|
|
|
586
601
|
* size (`inline-message`, R5) and its own ink, and the weight is what makes
|
|
587
602
|
* the two read as two kinds of sentence rather than one.
|
|
588
603
|
*/
|
|
589
|
-
[data-ui
|
|
590
|
-
[data-ui
|
|
604
|
+
[data-ui-field][data-part-root] > [data-ui-inline-message][data-tone='danger'],
|
|
605
|
+
[data-ui-field][data-part-root] > [data-ui-inline-message][data-tone='success'] {
|
|
591
606
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
592
607
|
}
|
|
593
608
|
|
|
@@ -618,19 +633,19 @@
|
|
|
618
633
|
* and a label of three lines — or a header whose action wrapped under the
|
|
619
634
|
* label — stretched a one-line input beside it to 43 pixels.
|
|
620
635
|
*/
|
|
621
|
-
[data-ui
|
|
636
|
+
[data-ui-field][data-part-root][data-label-placement='side'] > * {
|
|
622
637
|
align-self: start;
|
|
623
638
|
grid-column: 2 / 3;
|
|
624
639
|
}
|
|
625
640
|
|
|
626
641
|
/**
|
|
627
|
-
*
|
|
642
|
+
* Centerd on the control's first line rather than on the control, so the
|
|
628
643
|
* label stays level with the text a reader is typing when the control is a
|
|
629
644
|
* textarea four lines tall. `max()` keeps a label taller than its control —
|
|
630
645
|
* three wrapped lines beside a 30-pixel input — from being pushed down.
|
|
631
646
|
*/
|
|
632
|
-
[data-ui
|
|
633
|
-
[data-ui
|
|
647
|
+
[data-ui-field][data-part-root][data-label-placement='side'] > [data-part-label],
|
|
648
|
+
[data-ui-field][data-part-root][data-label-placement='side'] > [data-part-header] {
|
|
634
649
|
grid-column: 1;
|
|
635
650
|
grid-row: 1;
|
|
636
651
|
padding-block-start: max(0px, calc((var(--_control-block-size) - 1lh) / 2));
|
|
@@ -644,7 +659,7 @@
|
|
|
644
659
|
* control, where it sat until the header existed, was a second place. Restated inside the query because `> *` above is one selector
|
|
645
660
|
* more specific than the counter's own rule.
|
|
646
661
|
*/
|
|
647
|
-
[data-ui
|
|
662
|
+
[data-ui-field][data-part-root][data-label-placement='side'] > [data-part-counter] {
|
|
648
663
|
grid-column: 1;
|
|
649
664
|
grid-row: 2;
|
|
650
665
|
justify-self: end;
|
|
@@ -657,9 +672,9 @@
|
|
|
657
672
|
* part of the name — `Assunto 12/60` — and it stood one line higher than
|
|
658
673
|
* the counter a field without a header draws.
|
|
659
674
|
*/
|
|
660
|
-
[data-ui
|
|
661
|
-
> [data-part
|
|
662
|
-
> [data-part
|
|
675
|
+
[data-ui-field][data-part-root][data-label-placement='side']
|
|
676
|
+
> [data-part-header]
|
|
677
|
+
> [data-part-counter] {
|
|
663
678
|
flex-basis: 100%;
|
|
664
679
|
margin-inline-start: 0;
|
|
665
680
|
text-align: end;
|
|
@@ -668,27 +683,25 @@
|
|
|
668
683
|
|
|
669
684
|
/* ── Disabled ─────────────────────────────────────────────────────────
|
|
670
685
|
*
|
|
671
|
-
* Muted to the
|
|
686
|
+
* Muted to the color the theme measures rather than faded by opacity: a
|
|
672
687
|
* label nobody can read is a field nobody can identify, and a form that
|
|
673
688
|
* disables a section still has to say what the section was for.
|
|
674
689
|
*
|
|
675
690
|
* The messages need no rule here. The field passes `disabled` to them, and
|
|
676
|
-
* `inline-message` mutes itself to the same
|
|
691
|
+
* `inline-message` mutes itself to the same color and stops its own ring.
|
|
677
692
|
*/
|
|
678
|
-
[data-ui
|
|
679
|
-
[data-ui
|
|
680
|
-
[data-ui
|
|
681
|
-
[data-ui
|
|
682
|
-
> [data-part='header']
|
|
683
|
-
> [data-part='counter'] {
|
|
693
|
+
[data-ui-field][data-part-root][data-disabled] > [data-part-label],
|
|
694
|
+
[data-ui-field][data-part-root][data-disabled] > [data-part-counter],
|
|
695
|
+
[data-ui-field][data-part-root][data-disabled] > [data-part-header] > [data-part-label],
|
|
696
|
+
[data-ui-field][data-part-root][data-disabled] > [data-part-header] > [data-part-counter] {
|
|
684
697
|
color: var(--slotted-disabled-foreground);
|
|
685
698
|
}
|
|
686
699
|
|
|
687
|
-
[data-ui
|
|
688
|
-
[data-ui
|
|
689
|
-
> [data-part
|
|
690
|
-
> [data-part
|
|
691
|
-
> [data-part
|
|
700
|
+
[data-ui-field][data-part-root][data-disabled] > [data-part-label] > [data-part-mark],
|
|
701
|
+
[data-ui-field][data-part-root][data-disabled]
|
|
702
|
+
> [data-part-header]
|
|
703
|
+
> [data-part-label]
|
|
704
|
+
> [data-part-mark] {
|
|
692
705
|
color: var(--slotted-disabled-foreground);
|
|
693
706
|
}
|
|
694
707
|
|
|
@@ -697,10 +710,10 @@
|
|
|
697
710
|
* whose counter is over its limit paints the counter muted rather than red.
|
|
698
711
|
* A control nobody can type in is not over a limit; it is off.
|
|
699
712
|
*/
|
|
700
|
-
[data-ui
|
|
701
|
-
[data-ui
|
|
702
|
-
> [data-part
|
|
703
|
-
> [data-part
|
|
713
|
+
[data-ui-field][data-part-root][data-disabled] > [data-part-counter][data-invalid],
|
|
714
|
+
[data-ui-field][data-part-root][data-disabled]
|
|
715
|
+
> [data-part-header]
|
|
716
|
+
> [data-part-counter][data-invalid] {
|
|
704
717
|
color: var(--slotted-disabled-foreground);
|
|
705
718
|
font-weight: var(--slotted-font-weight-regular, 400);
|
|
706
719
|
}
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
"--slotted-field-mark-gap",
|
|
37
37
|
"--slotted-field-mark-text-color",
|
|
38
38
|
"--slotted-field-row-gap",
|
|
39
|
+
"--slotted-field-width-medium",
|
|
40
|
+
"--slotted-field-width-short",
|
|
39
41
|
"--slotted-focus-ring-color",
|
|
40
42
|
"--slotted-focus-ring-offset",
|
|
41
43
|
"--slotted-focus-ring-width",
|