@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.31
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 +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +456 -329
- package/src/app-shell/app-shell.tokens.json +6 -3
- 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 +70 -67
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +161 -159
- package/src/cascader/cascader.tokens.json +2 -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 +81 -80
- package/src/collapsible/collapsible.tokens.json +1 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +206 -132
- package/src/combobox/combobox.tokens.json +4 -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 +204 -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 +435 -199
- package/src/dialog/dialog.tokens.json +9 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +598 -237
- package/src/drawer/drawer.tokens.json +14 -0
- package/src/entity-picker/entity-picker.css +326 -272
- package/src/entity-picker/entity-picker.tokens.json +4 -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 +100 -26
- package/src/form/form.tokens.json +6 -1
- 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 +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- 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 +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1253 -1246
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +233 -174
- package/src/multi-select/multi-select.tokens.json +3 -0
- package/src/navigation-menu/navigation-menu.css +170 -191
- package/src/navigation-menu/navigation-menu.tokens.json +1 -0
- package/src/notification-center/notification-center.css +155 -163
- package/src/notification-center/notification-center.tokens.json +4 -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 +342 -287
- package/src/page-header/page-header.tokens.json +6 -1
- package/src/pagination/pagination.css +75 -79
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -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 +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +179 -44
- package/src/section/section.tokens.json +9 -3
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +213 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +201 -198
- 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 +139 -122
- package/src/toast/toast.tokens.json +7 -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 +68 -74
- package/src/tour/tour.tokens.json +1 -0
- 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/form/form.css
CHANGED
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* Both stand anywhere inside the form, and so do other families' parts of
|
|
15
15
|
* the same names — a `table`'s summary row, a `section`'s actions. The two
|
|
16
16
|
* carry the family's identifier, and every rule names them by it: a rule
|
|
17
|
-
* that reached `[data-part
|
|
17
|
+
* that reached `[data-part-summary]` as any descendant painted a table's
|
|
18
18
|
* totals as an error panel.
|
|
19
19
|
*/
|
|
20
|
-
[data-ui
|
|
20
|
+
[data-ui-form][data-part-root] {
|
|
21
21
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* with `aria-busy`, because the pointer is where a reader who just pressed
|
|
49
49
|
* the button already is.
|
|
50
50
|
*/
|
|
51
|
-
[data-ui
|
|
51
|
+
[data-ui-form][data-part-root][data-loading] {
|
|
52
52
|
cursor: progress;
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
* they read it. The tone tokens are the theme's, so the panel answers the
|
|
64
64
|
* scheme switch instead of being a red box that turns black.
|
|
65
65
|
*/
|
|
66
|
-
[data-ui
|
|
66
|
+
[data-ui-form][data-part-summary] {
|
|
67
67
|
background-color: var(--slotted-form-summary-background, var(--slotted-tone-danger-surface));
|
|
68
68
|
border: var(--slotted-control-border-width, 1px) solid
|
|
69
69
|
var(--slotted-form-summary-border-color, var(--slotted-tone-danger-border));
|
|
@@ -88,12 +88,12 @@
|
|
|
88
88
|
* announced, and the ring is the family's own: a `tabindex="-1"` target that
|
|
89
89
|
* showed nothing on focus would move a reader somewhere they cannot see.
|
|
90
90
|
*/
|
|
91
|
-
[data-ui
|
|
91
|
+
[data-ui-form][data-part-summary]:focus-visible {
|
|
92
92
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
93
93
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
[data-ui
|
|
96
|
+
[data-ui-form][data-part-summary] > [data-part-summary-title] {
|
|
97
97
|
font-family: var(
|
|
98
98
|
--slotted-font-family-heading,
|
|
99
99
|
var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
margin: 0;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
[data-ui
|
|
107
|
+
[data-ui-form][data-part-summary] > [data-part-summary-list] {
|
|
108
108
|
display: flex;
|
|
109
109
|
flex-direction: column;
|
|
110
110
|
gap: var(--slotted-space-2, 0.25rem);
|
|
@@ -130,31 +130,105 @@
|
|
|
130
130
|
padding-inline-start: 0;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
[data-ui
|
|
134
|
-
> [data-part='summary-list']
|
|
135
|
-
> li
|
|
136
|
-
> [data-part='summary-item'] {
|
|
133
|
+
[data-ui-form][data-part-summary] > [data-part-summary-list] > li > [data-part-summary-item] {
|
|
137
134
|
color: inherit;
|
|
138
135
|
text-decoration-line: underline;
|
|
139
136
|
text-underline-offset: var(--slotted-space-1, 0.125rem);
|
|
140
137
|
}
|
|
141
138
|
|
|
142
|
-
[data-ui
|
|
143
|
-
> [data-part
|
|
139
|
+
[data-ui-form][data-part-summary]
|
|
140
|
+
> [data-part-summary-list]
|
|
144
141
|
> li
|
|
145
|
-
> [data-part
|
|
142
|
+
> [data-part-summary-item]:hover:not(:disabled) {
|
|
146
143
|
text-decoration-thickness: var(--slotted-border-width-thick, 2px);
|
|
147
144
|
}
|
|
148
145
|
|
|
149
|
-
[data-ui
|
|
150
|
-
> [data-part
|
|
146
|
+
[data-ui-form][data-part-summary]
|
|
147
|
+
> [data-part-summary-list]
|
|
151
148
|
> li
|
|
152
|
-
> [data-part
|
|
149
|
+
> [data-part-summary-item]:focus-visible {
|
|
153
150
|
border-radius: var(--slotted-radius-xs, 2px);
|
|
154
151
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
155
152
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
156
153
|
}
|
|
157
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Two fields written one after the other directly inside the form stand
|
|
157
|
+
* apart by a step of the space scale. The root is a block and drew no
|
|
158
|
+
* distance at all, so a form written from the minimal example rendered its
|
|
159
|
+
* fields touching. A layout the page draws itself — a grid of two columns, a
|
|
160
|
+
* stack with its own gap — is not a field, and keeps its own spacing.
|
|
161
|
+
*/
|
|
162
|
+
[data-ui-form][data-part-root]
|
|
163
|
+
> :is([data-ui-field], [data-ui-field-group])
|
|
164
|
+
+ :is([data-ui-field], [data-ui-field-group]) {
|
|
165
|
+
margin-block-start: var(--slotted-form-field-gap, var(--slotted-space-6, 1rem));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Two sections stand apart by a step larger than the one between two fields
|
|
170
|
+
* of a section: at the same 1rem, a form split into topics showed none.
|
|
171
|
+
*/
|
|
172
|
+
[data-ui-form][data-part-root] > [data-ui-field-group] + [data-ui-field-group] {
|
|
173
|
+
margin-block-start: var(--slotted-form-section-gap, var(--slotted-space-9, 2rem));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* One column at a bounded measure: a field never spans a wide page, and the
|
|
178
|
+
* summary and the actions end where the fields end.
|
|
179
|
+
*/
|
|
180
|
+
[data-ui-form][data-part-root]
|
|
181
|
+
> :is(
|
|
182
|
+
[data-ui-field],
|
|
183
|
+
[data-ui-field-group],
|
|
184
|
+
[data-ui-form][data-part-summary],
|
|
185
|
+
[data-ui-form][data-part-actions]
|
|
186
|
+
) {
|
|
187
|
+
max-inline-size: var(--slotted-form-measure, 40rem);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* ── The aside ────────────────────────────────────────────────────────
|
|
191
|
+
*
|
|
192
|
+
* A form that holds one is a grid of one column at the measure. The aside's
|
|
193
|
+
* track is implicit: it exists only once the aside is placed in it, which
|
|
194
|
+
* happens from the form's own breakpoint, because the root cannot change its
|
|
195
|
+
* template under a query on itself. Below it the aside follows in source
|
|
196
|
+
* order, after the last field when it is written there.
|
|
197
|
+
*/
|
|
198
|
+
[data-ui-form][data-part-root]:has(> [data-ui-form][data-part-aside]) {
|
|
199
|
+
column-gap: var(--slotted-space-9, 2rem);
|
|
200
|
+
display: grid;
|
|
201
|
+
grid-auto-columns: minmax(0, var(--slotted-form-aside-size, 20rem));
|
|
202
|
+
grid-template-columns: minmax(0, var(--slotted-form-measure, 40rem));
|
|
203
|
+
justify-content: space-between;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
[data-ui-form][data-part-aside] {
|
|
207
|
+
margin-block-start: var(--slotted-form-section-gap, var(--slotted-space-9, 2rem));
|
|
208
|
+
min-inline-size: 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Beside the column, every child of the form keeps to the first track and
|
|
213
|
+
* the aside spans the rows they fill, so it stays in view under the page's
|
|
214
|
+
* chrome while the fields scroll. shortcut: the span covers 100 children of
|
|
215
|
+
* the form; past them the aside stops following.
|
|
216
|
+
*/
|
|
217
|
+
@container slotted-form (min-width: 75rem) {
|
|
218
|
+
[data-ui-form][data-part-root]:has(> [data-ui-form][data-part-aside]) > * {
|
|
219
|
+
grid-column: 1;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
[data-ui-form][data-part-root] > [data-ui-form][data-part-aside] {
|
|
223
|
+
align-self: start;
|
|
224
|
+
grid-column: 2;
|
|
225
|
+
grid-row: 1 / span 100;
|
|
226
|
+
inset-block-start: calc(var(--slotted-page-sticky-top, 0px) + var(--slotted-space-6, 1rem));
|
|
227
|
+
margin-block-start: 0;
|
|
228
|
+
position: sticky;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
158
232
|
/* ── The action row ───────────────────────────────────────────────────
|
|
159
233
|
*
|
|
160
234
|
* Its own container, because the question it answers is how much room the
|
|
@@ -162,23 +236,23 @@
|
|
|
162
236
|
* forbids a custom property in a container condition, which
|
|
163
237
|
* `docs/token-foundation.md` rule 4 records.
|
|
164
238
|
*/
|
|
165
|
-
[data-ui
|
|
239
|
+
[data-ui-form][data-part-actions] {
|
|
166
240
|
display: flex;
|
|
167
241
|
flex-wrap: wrap;
|
|
168
|
-
gap: var(--slotted-
|
|
242
|
+
gap: var(--slotted-action-gap, 8px);
|
|
169
243
|
justify-content: flex-end;
|
|
170
244
|
margin-block-start: var(--slotted-space-8, 1.5rem);
|
|
171
245
|
}
|
|
172
246
|
|
|
173
|
-
[data-ui
|
|
247
|
+
[data-ui-form][data-part-actions][data-align='start'] {
|
|
174
248
|
justify-content: flex-start;
|
|
175
249
|
}
|
|
176
250
|
|
|
177
|
-
[data-ui
|
|
251
|
+
[data-ui-form][data-part-actions][data-align='between'] {
|
|
178
252
|
justify-content: space-between;
|
|
179
253
|
}
|
|
180
254
|
|
|
181
|
-
[data-ui
|
|
255
|
+
[data-ui-form][data-part-actions][data-align='stretch'] > * {
|
|
182
256
|
flex: 1 1 0;
|
|
183
257
|
}
|
|
184
258
|
|
|
@@ -194,23 +268,23 @@
|
|
|
194
268
|
* action they came to take belongs first.
|
|
195
269
|
*/
|
|
196
270
|
@container slotted-form (max-width: 360px) {
|
|
197
|
-
[data-ui
|
|
271
|
+
[data-ui-form][data-part-actions] {
|
|
198
272
|
flex-direction: column-reverse;
|
|
199
273
|
}
|
|
200
274
|
|
|
201
|
-
[data-ui
|
|
275
|
+
[data-ui-form][data-part-actions] > * {
|
|
202
276
|
inline-size: 100%;
|
|
203
277
|
}
|
|
204
278
|
}
|
|
205
279
|
|
|
206
280
|
/**
|
|
207
281
|
* The one block the theme cannot write for the family. The summary's start
|
|
208
|
-
* edge is what tells a forced-
|
|
282
|
+
* edge is what tells a forced-colors reader that the panel is the errors
|
|
209
283
|
* and not a note, and a tone surface flattened to `Canvas` would leave the
|
|
210
284
|
* panel with nothing but its border.
|
|
211
285
|
*/
|
|
212
286
|
@media (forced-colors: active) {
|
|
213
|
-
[data-ui
|
|
287
|
+
[data-ui-form][data-part-summary] {
|
|
214
288
|
border-color: CanvasText;
|
|
215
289
|
border-inline-start-color: Highlight;
|
|
216
290
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
[
|
|
2
|
+
"--slotted-action-gap",
|
|
2
3
|
"--slotted-border-width-thick",
|
|
3
4
|
"--slotted-control-border-width",
|
|
4
5
|
"--slotted-control-font-family",
|
|
@@ -9,7 +10,11 @@
|
|
|
9
10
|
"--slotted-font-family-heading",
|
|
10
11
|
"--slotted-font-family-sans",
|
|
11
12
|
"--slotted-font-weight-semibold",
|
|
13
|
+
"--slotted-form-aside-size",
|
|
12
14
|
"--slotted-form-color",
|
|
15
|
+
"--slotted-form-field-gap",
|
|
16
|
+
"--slotted-form-measure",
|
|
17
|
+
"--slotted-form-section-gap",
|
|
13
18
|
"--slotted-form-summary-background",
|
|
14
19
|
"--slotted-form-summary-border-color",
|
|
15
20
|
"--slotted-form-summary-color",
|
|
@@ -21,10 +26,10 @@
|
|
|
21
26
|
"--slotted-space-1",
|
|
22
27
|
"--slotted-space-2",
|
|
23
28
|
"--slotted-space-3",
|
|
24
|
-
"--slotted-space-4",
|
|
25
29
|
"--slotted-space-5",
|
|
26
30
|
"--slotted-space-6",
|
|
27
31
|
"--slotted-space-8",
|
|
32
|
+
"--slotted-space-9",
|
|
28
33
|
"--slotted-text",
|
|
29
34
|
"--slotted-tone-danger-border",
|
|
30
35
|
"--slotted-tone-danger-surface",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* draws a black `::backdrop` behind it. What it does not draw is a ground:
|
|
14
14
|
* an element with none shows the black through it, so a region of text
|
|
15
15
|
* went full screen as text on black. The ground is the theme's page ground,
|
|
16
|
-
* and the backdrop takes the same
|
|
16
|
+
* and the backdrop takes the same color so the edge of the region never
|
|
17
17
|
* shows.
|
|
18
18
|
*
|
|
19
19
|
* `layout` is the same picture drawn by this sheet, fixed over the viewport
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* browser, an iframe without `allow="fullscreen"`, a refused request. The
|
|
22
22
|
* two ways are one component; only `data-mode` tells them apart.
|
|
23
23
|
*/
|
|
24
|
-
[data-ui
|
|
24
|
+
[data-ui-fullscreen][data-part-root][data-fullscreen] {
|
|
25
25
|
/* The region is the viewport in full screen, so the viewport is what the
|
|
26
26
|
inset answers: the page step on a desktop, down to the small step on a
|
|
27
27
|
phone, where twenty-four pixels a side is an eighth of the width. */
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
* (the automatic minimum of a flex item), so content taller than the screen
|
|
76
76
|
* still scrolls in the region.
|
|
77
77
|
*/
|
|
78
|
-
[data-ui
|
|
78
|
+
[data-ui-fullscreen][data-part-root][data-fullscreen] {
|
|
79
79
|
display: flex;
|
|
80
80
|
flex-direction: column;
|
|
81
81
|
}
|
|
@@ -95,8 +95,7 @@
|
|
|
95
95
|
* full screen; a descendant selector on the part alone turned an open list
|
|
96
96
|
* into a grid. A flex share only reaches a direct child in any case.
|
|
97
97
|
*/
|
|
98
|
-
[data-ui
|
|
99
|
-
> [data-ui='fullscreen'][data-part='content'] {
|
|
98
|
+
[data-ui-fullscreen][data-part-root][data-fullscreen] > [data-ui-fullscreen][data-part-content] {
|
|
100
99
|
display: grid;
|
|
101
100
|
flex: 1 0 auto;
|
|
102
101
|
grid-template-columns: minmax(0, 1fr);
|
|
@@ -115,9 +114,9 @@
|
|
|
115
114
|
* menu opened, and the panel would drop to its own height under it. The
|
|
116
115
|
* root is always appended last.
|
|
117
116
|
*/
|
|
118
|
-
[data-ui
|
|
117
|
+
[data-ui-fullscreen][data-part-root][data-fullscreen]
|
|
119
118
|
> :first-child:is(:last-child, :has(+ [data-slotted-portal]:last-child)):not(
|
|
120
|
-
[data-part
|
|
119
|
+
[data-part-trigger],
|
|
121
120
|
img,
|
|
122
121
|
video,
|
|
123
122
|
canvas
|
|
@@ -131,7 +130,7 @@
|
|
|
131
130
|
* gives a video in full screen. It may shrink below its natural height,
|
|
132
131
|
* which a photograph taller than the screen has to.
|
|
133
132
|
*/
|
|
134
|
-
[data-ui
|
|
133
|
+
[data-ui-fullscreen][data-part-root][data-fullscreen]
|
|
135
134
|
> :is(img, video, canvas):first-child:is(
|
|
136
135
|
:last-child,
|
|
137
136
|
:has(+ [data-slotted-portal]:last-child)
|
|
@@ -142,7 +141,7 @@
|
|
|
142
141
|
object-fit: contain;
|
|
143
142
|
}
|
|
144
143
|
|
|
145
|
-
[data-ui
|
|
144
|
+
[data-ui-fullscreen][data-part-root]::backdrop {
|
|
146
145
|
background-color: var(--slotted-fullscreen-surface, var(--slotted-surface, Canvas));
|
|
147
146
|
}
|
|
148
147
|
|
|
@@ -161,7 +160,7 @@
|
|
|
161
160
|
* page and never covered it. Nothing else here is `!important` — the ground,
|
|
162
161
|
* the edge and the inset stay the consumer's to change in full screen.
|
|
163
162
|
*/
|
|
164
|
-
[data-ui
|
|
163
|
+
[data-ui-fullscreen][data-part-root][data-mode='layout'] {
|
|
165
164
|
animation: slotted-fullscreen-enter var(--slotted-duration-short) var(--slotted-easing-enter);
|
|
166
165
|
block-size: auto !important;
|
|
167
166
|
inline-size: auto !important;
|
|
@@ -195,11 +194,11 @@
|
|
|
195
194
|
* screen" beside the four corners opening, "Exit full screen" beside the
|
|
196
195
|
* four corners closing. It is not a toggle: the Button pattern says a
|
|
197
196
|
* control whose label changes with its state is not announced as pressed,
|
|
198
|
-
* so it carries no `aria-pressed` and no "on"
|
|
197
|
+
* so it carries no `aria-pressed` and no "on" color. The geometry is the
|
|
199
198
|
* control scale's, the same box `toggle` and `button` stand in, so the
|
|
200
199
|
* control sits in a toolbar beside them without a pixel of difference.
|
|
201
200
|
*/
|
|
202
|
-
[data-ui
|
|
201
|
+
[data-ui-fullscreen][data-part-trigger] {
|
|
203
202
|
--_height: var(--slotted-control-height-md, 34px);
|
|
204
203
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
205
204
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
@@ -247,7 +246,7 @@
|
|
|
247
246
|
|
|
248
247
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
249
248
|
|
|
250
|
-
[data-ui
|
|
249
|
+
[data-ui-fullscreen][data-part-trigger][data-size='sm'] {
|
|
251
250
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
252
251
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
253
252
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -255,7 +254,7 @@
|
|
|
255
254
|
--_gap: var(--slotted-control-gap-sm, 6px);
|
|
256
255
|
}
|
|
257
256
|
|
|
258
|
-
[data-ui
|
|
257
|
+
[data-ui-fullscreen][data-part-trigger][data-size='lg'] {
|
|
259
258
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
260
259
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
261
260
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -271,7 +270,7 @@
|
|
|
271
270
|
* consumer's icon placed in its stead, each at the control's icon step and
|
|
272
271
|
* in the host's ink.
|
|
273
272
|
*/
|
|
274
|
-
[data-ui
|
|
273
|
+
[data-ui-fullscreen] [data-part-icon] {
|
|
275
274
|
--slotted-icon-size: var(--_icon-size);
|
|
276
275
|
|
|
277
276
|
block-size: var(--_icon-size);
|
|
@@ -281,7 +280,7 @@
|
|
|
281
280
|
inline-size: var(--_icon-size);
|
|
282
281
|
}
|
|
283
282
|
|
|
284
|
-
[data-ui
|
|
283
|
+
[data-ui-fullscreen] [data-part-icon] > * {
|
|
285
284
|
block-size: 100%;
|
|
286
285
|
display: block;
|
|
287
286
|
inline-size: 100%;
|
|
@@ -292,7 +291,7 @@
|
|
|
292
291
|
* container is shorter than a translated label; the string stays whole in
|
|
293
292
|
* the DOM and in the accessible name.
|
|
294
293
|
*/
|
|
295
|
-
[data-ui
|
|
294
|
+
[data-ui-fullscreen] [data-part-label] {
|
|
296
295
|
min-inline-size: 0;
|
|
297
296
|
overflow: hidden;
|
|
298
297
|
text-overflow: ellipsis;
|
|
@@ -304,12 +303,12 @@
|
|
|
304
303
|
* reader. The label is visually hidden rather than removed, which keeps
|
|
305
304
|
* the accessible name the label the state gives it.
|
|
306
305
|
*/
|
|
307
|
-
[data-ui
|
|
306
|
+
[data-ui-fullscreen][data-part-trigger][data-icon-only] {
|
|
308
307
|
inline-size: var(--_height);
|
|
309
308
|
padding-inline: 0;
|
|
310
309
|
}
|
|
311
310
|
|
|
312
|
-
[data-ui
|
|
311
|
+
[data-ui-fullscreen][data-part-trigger][data-icon-only] [data-part-label] {
|
|
313
312
|
block-size: 1px;
|
|
314
313
|
clip-path: inset(50%);
|
|
315
314
|
inline-size: 1px;
|
|
@@ -326,7 +325,7 @@
|
|
|
326
325
|
* screen needs its own ground, or the edge is all that separates the words
|
|
327
326
|
* from what is behind them.
|
|
328
327
|
*/
|
|
329
|
-
[data-ui
|
|
328
|
+
[data-ui-fullscreen][data-part-trigger][data-variant='outline'] {
|
|
330
329
|
background-color: var(--slotted-control-surface, ButtonFace);
|
|
331
330
|
border-color: var(
|
|
332
331
|
--slotted-fullscreen-trigger-border-color,
|
|
@@ -337,14 +336,14 @@
|
|
|
337
336
|
|
|
338
337
|
/* ── Hover and press, held back for disabled ─────────────────────────── */
|
|
339
338
|
|
|
340
|
-
[data-ui
|
|
339
|
+
[data-ui-fullscreen][data-part-trigger]:hover:not(:disabled):not([data-disabled]) {
|
|
341
340
|
background-color: var(
|
|
342
341
|
--slotted-fullscreen-trigger-hover-background,
|
|
343
342
|
var(--slotted-tone-secondary-subtle-hover, ButtonFace)
|
|
344
343
|
);
|
|
345
344
|
}
|
|
346
345
|
|
|
347
|
-
[data-ui
|
|
346
|
+
[data-ui-fullscreen][data-part-trigger]:active:not(:disabled):not([data-disabled]) {
|
|
348
347
|
background-color: var(
|
|
349
348
|
--slotted-fullscreen-trigger-active-background,
|
|
350
349
|
var(--slotted-tone-secondary-subtle-active, ButtonFace)
|
|
@@ -354,22 +353,22 @@
|
|
|
354
353
|
|
|
355
354
|
/* ── Focus ────────────────────────────────────────────────────────────── */
|
|
356
355
|
|
|
357
|
-
[data-ui
|
|
356
|
+
[data-ui-fullscreen][data-part-trigger]:focus-visible {
|
|
358
357
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
359
358
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
360
359
|
}
|
|
361
360
|
|
|
362
361
|
/* ── Disabled ─────────────────────────────────────────────────────────── */
|
|
363
362
|
|
|
364
|
-
[data-ui
|
|
365
|
-
[data-ui
|
|
363
|
+
[data-ui-fullscreen][data-part-trigger]:disabled,
|
|
364
|
+
[data-ui-fullscreen][data-part-trigger][data-disabled] {
|
|
366
365
|
background-color: transparent;
|
|
367
366
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
368
367
|
cursor: not-allowed;
|
|
369
368
|
}
|
|
370
369
|
|
|
371
|
-
[data-ui
|
|
372
|
-
[data-ui
|
|
370
|
+
[data-ui-fullscreen][data-part-trigger][data-variant='outline']:disabled,
|
|
371
|
+
[data-ui-fullscreen][data-part-trigger][data-variant='outline'][data-disabled] {
|
|
373
372
|
border-color: var(--slotted-disabled-border, GrayText);
|
|
374
373
|
box-shadow: none;
|
|
375
374
|
}
|
package/src/grid/grid.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer slotted.components {
|
|
2
2
|
/**
|
|
3
3
|
* Grid arranges its children across two axes and reflows by measuring itself,
|
|
4
|
-
* not the viewport. It paints nothing: a layout that carried a
|
|
4
|
+
* not the viewport. It paints nothing: a layout that carried a color would be
|
|
5
5
|
* a surface, and a surface is another family's decision.
|
|
6
6
|
*
|
|
7
7
|
* Without a stated column count the track list is as many equal tracks as fit
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* `auto-fit` is used here so a single child fills the row rather than sitting
|
|
13
13
|
* alone at its minimum.
|
|
14
14
|
*/
|
|
15
|
-
[data-ui
|
|
15
|
+
[data-ui-grid] {
|
|
16
16
|
--_gap: var(--slotted-space-6, 1rem);
|
|
17
17
|
--_min-item: var(--slotted-grid-min-item-width-md, 16rem);
|
|
18
18
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* `auto-fill` is used here so two children in a three-column grid occupy two
|
|
38
38
|
* thirds of it rather than stretching across the whole row.
|
|
39
39
|
*/
|
|
40
|
-
[data-ui
|
|
40
|
+
[data-ui-grid][data-columns] {
|
|
41
41
|
grid-template-columns: repeat(
|
|
42
42
|
auto-fill,
|
|
43
43
|
minmax(
|
|
@@ -55,55 +55,55 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/* Separation is a step on the scale, never a length the consumer states. */
|
|
58
|
-
[data-ui
|
|
58
|
+
[data-ui-grid][data-gap='0'] {
|
|
59
59
|
--_gap: 0;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
[data-ui
|
|
62
|
+
[data-ui-grid][data-gap='1'] {
|
|
63
63
|
--_gap: var(--slotted-space-1, 0.125rem);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
[data-ui
|
|
66
|
+
[data-ui-grid][data-gap='2'] {
|
|
67
67
|
--_gap: var(--slotted-space-2, 0.25rem);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
[data-ui
|
|
70
|
+
[data-ui-grid][data-gap='3'] {
|
|
71
71
|
--_gap: var(--slotted-space-3, 0.375rem);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
[data-ui
|
|
74
|
+
[data-ui-grid][data-gap='4'] {
|
|
75
75
|
--_gap: var(--slotted-space-4, 0.5rem);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
[data-ui
|
|
78
|
+
[data-ui-grid][data-gap='5'] {
|
|
79
79
|
--_gap: var(--slotted-space-5, 0.75rem);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
[data-ui
|
|
82
|
+
[data-ui-grid][data-gap='6'] {
|
|
83
83
|
--_gap: var(--slotted-space-6, 1rem);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
[data-ui
|
|
86
|
+
[data-ui-grid][data-gap='7'] {
|
|
87
87
|
--_gap: var(--slotted-space-7, 1.25rem);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
[data-ui
|
|
90
|
+
[data-ui-grid][data-gap='8'] {
|
|
91
91
|
--_gap: var(--slotted-space-8, 1.5rem);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
[data-ui
|
|
94
|
+
[data-ui-grid][data-gap='9'] {
|
|
95
95
|
--_gap: var(--slotted-space-9, 2rem);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
[data-ui
|
|
98
|
+
[data-ui-grid][data-gap='10'] {
|
|
99
99
|
--_gap: var(--slotted-space-10, 2.5rem);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
[data-ui
|
|
102
|
+
[data-ui-grid][data-gap='11'] {
|
|
103
103
|
--_gap: var(--slotted-space-11, 3rem);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
[data-ui
|
|
106
|
+
[data-ui-grid][data-gap='12'] {
|
|
107
107
|
--_gap: var(--slotted-space-12, 4rem);
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -113,23 +113,23 @@
|
|
|
113
113
|
* these are cell minima rather than reading measure, which `container` owns.
|
|
114
114
|
* A theme retunes any of them through its token.
|
|
115
115
|
*/
|
|
116
|
-
[data-ui
|
|
116
|
+
[data-ui-grid][data-min-item-width='xs'] {
|
|
117
117
|
--_min-item: var(--slotted-grid-min-item-width-xs, 8rem);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
[data-ui
|
|
120
|
+
[data-ui-grid][data-min-item-width='sm'] {
|
|
121
121
|
--_min-item: var(--slotted-grid-min-item-width-sm, 12rem);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
[data-ui
|
|
124
|
+
[data-ui-grid][data-min-item-width='md'] {
|
|
125
125
|
--_min-item: var(--slotted-grid-min-item-width-md, 16rem);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
[data-ui
|
|
128
|
+
[data-ui-grid][data-min-item-width='lg'] {
|
|
129
129
|
--_min-item: var(--slotted-grid-min-item-width-lg, 20rem);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
[data-ui
|
|
132
|
+
[data-ui-grid][data-min-item-width='xl'] {
|
|
133
133
|
--_min-item: var(--slotted-grid-min-item-width-xl, 24rem);
|
|
134
134
|
}
|
|
135
135
|
|
|
@@ -139,35 +139,35 @@
|
|
|
139
139
|
* distributes tracks: the tracks already fill the row, so there is nothing
|
|
140
140
|
* between them to distribute.
|
|
141
141
|
*/
|
|
142
|
-
[data-ui
|
|
142
|
+
[data-ui-grid][data-align='start'] {
|
|
143
143
|
align-items: start;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
[data-ui
|
|
146
|
+
[data-ui-grid][data-align='center'] {
|
|
147
147
|
align-items: center;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
[data-ui
|
|
150
|
+
[data-ui-grid][data-align='end'] {
|
|
151
151
|
align-items: end;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
[data-ui
|
|
154
|
+
[data-ui-grid][data-align='stretch'] {
|
|
155
155
|
align-items: stretch;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
[data-ui
|
|
158
|
+
[data-ui-grid][data-justify='start'] {
|
|
159
159
|
justify-items: start;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
[data-ui
|
|
162
|
+
[data-ui-grid][data-justify='center'] {
|
|
163
163
|
justify-items: center;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
[data-ui
|
|
166
|
+
[data-ui-grid][data-justify='end'] {
|
|
167
167
|
justify-items: end;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
[data-ui
|
|
170
|
+
[data-ui-grid][data-justify='stretch'] {
|
|
171
171
|
justify-items: stretch;
|
|
172
172
|
}
|
|
173
173
|
}
|