@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
|
@@ -19,17 +19,20 @@
|
|
|
19
19
|
* fields is a `content` element the family draws, and the legend never
|
|
20
20
|
* competes with it.
|
|
21
21
|
*/
|
|
22
|
-
[data-ui
|
|
22
|
+
[data-ui-field-group][data-part-root] {
|
|
23
23
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
24
24
|
/** Legend to its own description, and description to error. */
|
|
25
25
|
--_message-gap: var(--slotted-field-group-message-gap, var(--slotted-space-2, 0.25rem));
|
|
26
26
|
/**
|
|
27
|
-
* The last thing said about
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
27
|
+
* The last thing said about a question, to its choices: the distance a
|
|
28
|
+
* field's label stands from its control, because a question and its
|
|
29
|
+
* choices are one answer, as a label and its control are. A section
|
|
30
|
+
* stands further from its first field, below.
|
|
31
31
|
*/
|
|
32
|
-
--_content-gap: var(
|
|
32
|
+
--_content-gap: var(
|
|
33
|
+
--slotted-field-group-content-gap,
|
|
34
|
+
var(--slotted-field-row-gap, var(--slotted-space-3, 0.375rem))
|
|
35
|
+
);
|
|
33
36
|
/** One field to the next. */
|
|
34
37
|
--_field-gap: var(--slotted-field-group-field-gap, var(--slotted-space-6, 1rem));
|
|
35
38
|
|
|
@@ -45,21 +48,31 @@
|
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
/* Legend, then what is said about the set, then the set. */
|
|
48
|
-
[data-ui
|
|
51
|
+
[data-ui-field-group][data-part-root] > * + * {
|
|
49
52
|
margin-block-start: var(--_message-gap);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
/* `inline-message` zeroes its root's margin at the weight of the rule above,
|
|
53
56
|
so the order the two stylesheets load in decided the gap; a third
|
|
54
57
|
attribute decides it here. */
|
|
55
|
-
[data-ui
|
|
58
|
+
[data-ui-field-group][data-part-root] > * + [data-ui-inline-message] {
|
|
56
59
|
margin-block-start: var(--_message-gap);
|
|
57
60
|
}
|
|
58
61
|
|
|
59
|
-
[data-ui
|
|
62
|
+
[data-ui-field-group][data-part-root] > [data-part-content] {
|
|
60
63
|
margin-block-start: var(--_content-gap);
|
|
61
64
|
}
|
|
62
65
|
|
|
66
|
+
/**
|
|
67
|
+
* The last thing said about a section, to the first field in it. One step
|
|
68
|
+
* wider than the distance between two fields, which is the correction the
|
|
69
|
+
* first capture asked for: held at the same value, the description read as
|
|
70
|
+
* belonging to the field under it rather than to the set.
|
|
71
|
+
*/
|
|
72
|
+
[data-ui-field-group][data-part-root][data-kind='section'] {
|
|
73
|
+
--_content-gap: var(--slotted-field-group-section-content-gap, var(--slotted-space-7, 1.25rem));
|
|
74
|
+
}
|
|
75
|
+
|
|
63
76
|
/* ── Size ─────────────────────────────────────────────────────────────
|
|
64
77
|
*
|
|
65
78
|
* The same three steps a field has, and for the same reason: a group in a
|
|
@@ -69,15 +82,15 @@
|
|
|
69
82
|
* because a third type scale would be a fourth thing for a theme to retune.
|
|
70
83
|
*/
|
|
71
84
|
|
|
72
|
-
[data-ui
|
|
85
|
+
[data-ui-field-group][data-part-root][data-size='sm'] {
|
|
73
86
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
74
87
|
}
|
|
75
88
|
|
|
76
|
-
[data-ui
|
|
89
|
+
[data-ui-field-group][data-part-root][data-size='md'] {
|
|
77
90
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
78
91
|
}
|
|
79
92
|
|
|
80
|
-
[data-ui
|
|
93
|
+
[data-ui-field-group][data-part-root][data-size='lg'] {
|
|
81
94
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
82
95
|
}
|
|
83
96
|
|
|
@@ -90,7 +103,7 @@
|
|
|
90
103
|
* recommendation work: on a page asking one question, the legend contains the
|
|
91
104
|
* page's `h1`, so a reader hears the question once rather than twice.
|
|
92
105
|
*/
|
|
93
|
-
[data-ui
|
|
106
|
+
[data-ui-field-group] > [data-part-legend] {
|
|
94
107
|
color: var(--slotted-field-group-legend-color, var(--slotted-text));
|
|
95
108
|
display: block;
|
|
96
109
|
font-size: var(--_font-size);
|
|
@@ -110,9 +123,10 @@
|
|
|
110
123
|
* is. The glyph takes the danger ink and the words do not, which is the field
|
|
111
124
|
* family's decision applied to the element one level up.
|
|
112
125
|
*/
|
|
113
|
-
[data-ui
|
|
126
|
+
[data-ui-field-group] > [data-part-legend] > [data-part-mark] {
|
|
114
127
|
color: var(--slotted-field-group-mark-color, var(--slotted-tone-danger-text));
|
|
115
|
-
|
|
128
|
+
/* The space written before the mark is the distance; the token adds to it. */
|
|
129
|
+
margin-inline-start: var(--slotted-field-group-mark-gap, 0);
|
|
116
130
|
overflow-wrap: normal;
|
|
117
131
|
/* Its own bidi run, for the reason the field's marker records: a Latin
|
|
118
132
|
legend in a right-to-left document is one left-to-right run, and a marker
|
|
@@ -131,7 +145,7 @@
|
|
|
131
145
|
* `font: inherit` here would shrink every question page's title to the size
|
|
132
146
|
* of a form label.
|
|
133
147
|
*/
|
|
134
|
-
[data-ui
|
|
148
|
+
[data-ui-field-group] > [data-part-legend] > :is(h1, h2, h3, h4, h5, h6) {
|
|
135
149
|
display: inline;
|
|
136
150
|
font-family: var(
|
|
137
151
|
--slotted-font-family-heading,
|
|
@@ -140,9 +154,9 @@
|
|
|
140
154
|
margin: 0;
|
|
141
155
|
}
|
|
142
156
|
|
|
143
|
-
[data-ui
|
|
144
|
-
> [data-part
|
|
145
|
-
> [data-part
|
|
157
|
+
[data-ui-field-group]:is([data-necessity='optional'], [data-necessity='words'])
|
|
158
|
+
> [data-part-legend]
|
|
159
|
+
> [data-part-mark] {
|
|
146
160
|
color: var(--slotted-field-group-mark-text-color, var(--slotted-text-muted));
|
|
147
161
|
font-size: var(--slotted-control-font-size-sm, 12px);
|
|
148
162
|
font-weight: var(--slotted-font-weight-regular, 400);
|
|
@@ -154,8 +168,7 @@
|
|
|
154
168
|
* below from moving when the error arrives. The same two rules the field
|
|
155
169
|
* writes, because the group holds the same two messages.
|
|
156
170
|
*/
|
|
157
|
-
[data-ui
|
|
158
|
-
> [data-ui='inline-message']:not([data-reserve]):has([data-part='text']:empty) {
|
|
171
|
+
[data-ui-field-group] > [data-ui-inline-message]:not([data-reserve]):has([data-part-text]:empty) {
|
|
159
172
|
display: none;
|
|
160
173
|
}
|
|
161
174
|
|
|
@@ -167,12 +180,12 @@
|
|
|
167
180
|
* selector carries the root's part so it outweighs the message family's own
|
|
168
181
|
* root rule, which has the same two attributes.
|
|
169
182
|
*/
|
|
170
|
-
[data-ui
|
|
183
|
+
[data-ui-field-group][data-part-root] > [data-ui-inline-message] {
|
|
171
184
|
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
172
185
|
}
|
|
173
186
|
|
|
174
|
-
[data-ui
|
|
175
|
-
[data-ui
|
|
187
|
+
[data-ui-field-group][data-part-root] > [data-ui-inline-message][data-tone='danger'],
|
|
188
|
+
[data-ui-field-group][data-part-root] > [data-ui-inline-message][data-tone='success'] {
|
|
176
189
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
177
190
|
}
|
|
178
191
|
|
|
@@ -188,19 +201,19 @@
|
|
|
188
201
|
* a scale: `14rem` holds a date, a document number or a short name at the `md`
|
|
189
202
|
* step without the control clipping what is being typed into it.
|
|
190
203
|
*/
|
|
191
|
-
[data-ui
|
|
204
|
+
[data-ui-field-group] > [data-part-content] {
|
|
192
205
|
display: flex;
|
|
193
206
|
flex-direction: column;
|
|
194
207
|
gap: var(--_field-gap);
|
|
195
208
|
min-inline-size: 0;
|
|
196
209
|
}
|
|
197
210
|
|
|
198
|
-
[data-ui
|
|
211
|
+
[data-ui-field-group][data-orientation='horizontal'] > [data-part-content] {
|
|
199
212
|
flex-direction: row;
|
|
200
213
|
flex-wrap: wrap;
|
|
201
214
|
}
|
|
202
215
|
|
|
203
|
-
[data-ui
|
|
216
|
+
[data-ui-field-group][data-orientation='horizontal'] > [data-part-content] > * {
|
|
204
217
|
flex: 1 1 var(--slotted-field-group-track-min, 14rem);
|
|
205
218
|
min-inline-size: 0;
|
|
206
219
|
}
|
|
@@ -214,13 +227,10 @@
|
|
|
214
227
|
*
|
|
215
228
|
* The fields inside are muted by the group providing `disabled` to them, not
|
|
216
229
|
* by a descendant selector: a field used outside a group would then have no
|
|
217
|
-
* disabled appearance at all
|
|
218
|
-
* `docs/history/designs/2026-08-31-field-aware-controls-design.md` records.
|
|
230
|
+
* disabled appearance at all.
|
|
219
231
|
*/
|
|
220
|
-
[data-ui
|
|
221
|
-
[data-ui
|
|
222
|
-
> [data-part='legend']
|
|
223
|
-
> [data-part='mark'] {
|
|
232
|
+
[data-ui-field-group][data-part-root][data-disabled] > [data-part-legend],
|
|
233
|
+
[data-ui-field-group][data-part-root][data-disabled] > [data-part-legend] > [data-part-mark] {
|
|
224
234
|
color: var(--slotted-disabled-foreground);
|
|
225
235
|
}
|
|
226
236
|
}
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
"--slotted-field-group-mark-gap",
|
|
17
17
|
"--slotted-field-group-mark-text-color",
|
|
18
18
|
"--slotted-field-group-message-gap",
|
|
19
|
+
"--slotted-field-group-section-content-gap",
|
|
19
20
|
"--slotted-field-group-track-min",
|
|
21
|
+
"--slotted-field-row-gap",
|
|
20
22
|
"--slotted-font-family-heading",
|
|
21
23
|
"--slotted-font-family-sans",
|
|
22
24
|
"--slotted-font-size-xs",
|
|
@@ -25,6 +27,7 @@
|
|
|
25
27
|
"--slotted-font-weight-semibold",
|
|
26
28
|
"--slotted-line-height-sm",
|
|
27
29
|
"--slotted-space-2",
|
|
30
|
+
"--slotted-space-3",
|
|
28
31
|
"--slotted-space-6",
|
|
29
32
|
"--slotted-space-7",
|
|
30
33
|
"--slotted-text",
|