@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/button/button.css
CHANGED
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
*
|
|
14
14
|
* The tone roles travel through private properties because three variants
|
|
15
15
|
* paint the same roles differently; naming them once per tone is what keeps
|
|
16
|
-
* the variant rules from repeating five
|
|
16
|
+
* the variant rules from repeating five color maps each.
|
|
17
17
|
*
|
|
18
18
|
* Nothing in this sheet changes a size when a state changes. Every state is
|
|
19
|
-
* a
|
|
19
|
+
* a color; the only one drawn outside the border box is focus, which is an
|
|
20
20
|
* outline. The rebuild that preceded this one thickened the border on a
|
|
21
21
|
* pressed toggle, which moved every control beside it by two pixels.
|
|
22
22
|
*/
|
|
23
|
-
[data-ui
|
|
23
|
+
[data-ui-button] {
|
|
24
24
|
--_solid: var(--slotted-tone-accent-solid);
|
|
25
25
|
--_solid-hover: var(--slotted-tone-accent-solid-hover);
|
|
26
26
|
--_solid-active: var(--slotted-tone-accent-solid-active);
|
|
@@ -128,14 +128,14 @@
|
|
|
128
128
|
/* The press below moves the control, and the release eases it back. */ transform
|
|
129
129
|
var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
130
130
|
user-select: none;
|
|
131
|
-
/* A control written inside a sentence sits on the text's
|
|
131
|
+
/* A control written inside a sentence sits on the text's center, not on its baseline. */
|
|
132
132
|
vertical-align: middle;
|
|
133
133
|
-webkit-tap-highlight-color: transparent;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
/* ── Tone: which of the five semantic
|
|
136
|
+
/* ── Tone: which of the five semantic colors the control speaks in ───── */
|
|
137
137
|
|
|
138
|
-
[data-ui
|
|
138
|
+
[data-ui-button][data-tone='secondary'] {
|
|
139
139
|
--_solid: var(--slotted-tone-secondary-solid);
|
|
140
140
|
--_solid-hover: var(--slotted-tone-secondary-solid-hover);
|
|
141
141
|
--_solid-active: var(--slotted-tone-secondary-solid-active);
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
* with the inverse text. A product that keeps the accent for data draws its
|
|
164
164
|
* primary action in it.
|
|
165
165
|
*/
|
|
166
|
-
[data-ui
|
|
166
|
+
[data-ui-button][data-tone='neutral'] {
|
|
167
167
|
--_solid: var(--slotted-tone-neutral-solid);
|
|
168
168
|
--_solid-hover: var(--slotted-tone-neutral-solid-hover);
|
|
169
169
|
--_solid-active: var(--slotted-tone-neutral-solid-active);
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
--_text: var(--slotted-tone-neutral-text);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
[data-ui
|
|
174
|
+
[data-ui-button][data-tone='success'] {
|
|
175
175
|
--_solid: var(--slotted-tone-success-solid);
|
|
176
176
|
--_solid-hover: var(--slotted-tone-success-solid-hover);
|
|
177
177
|
--_solid-active: var(--slotted-tone-success-solid-active);
|
|
@@ -179,7 +179,15 @@
|
|
|
179
179
|
--_text: var(--slotted-tone-success-text);
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
[data-ui
|
|
182
|
+
[data-ui-button][data-tone='info'] {
|
|
183
|
+
--_solid: var(--slotted-tone-info-solid);
|
|
184
|
+
--_solid-hover: var(--slotted-tone-info-solid-hover);
|
|
185
|
+
--_solid-active: var(--slotted-tone-info-solid-active);
|
|
186
|
+
--_on-solid: var(--slotted-tone-info-on-solid);
|
|
187
|
+
--_text: var(--slotted-tone-info-text);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
[data-ui-button][data-tone='warning'] {
|
|
183
191
|
--_solid: var(--slotted-tone-warning-solid);
|
|
184
192
|
--_solid-hover: var(--slotted-tone-warning-solid-hover);
|
|
185
193
|
--_solid-active: var(--slotted-tone-warning-solid-active);
|
|
@@ -187,7 +195,7 @@
|
|
|
187
195
|
--_text: var(--slotted-tone-warning-text);
|
|
188
196
|
}
|
|
189
197
|
|
|
190
|
-
[data-ui
|
|
198
|
+
[data-ui-button][data-tone='danger'] {
|
|
191
199
|
--_solid: var(--slotted-tone-danger-solid);
|
|
192
200
|
--_solid-hover: var(--slotted-tone-danger-solid-hover);
|
|
193
201
|
--_solid-active: var(--slotted-tone-danger-solid-active);
|
|
@@ -197,7 +205,7 @@
|
|
|
197
205
|
|
|
198
206
|
/* ── Size: the control scale, one step of it per member instance ──────── */
|
|
199
207
|
|
|
200
|
-
[data-ui
|
|
208
|
+
[data-ui-button][data-size='sm'] {
|
|
201
209
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
202
210
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
203
211
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -205,7 +213,7 @@
|
|
|
205
213
|
--_gap: var(--slotted-control-gap-sm, 6px);
|
|
206
214
|
}
|
|
207
215
|
|
|
208
|
-
[data-ui
|
|
216
|
+
[data-ui-button][data-size='lg'] {
|
|
209
217
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
210
218
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
211
219
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -247,7 +255,7 @@
|
|
|
247
255
|
* sheet carried the shadow on the base rule for one release and every
|
|
248
256
|
* member inherited it, which is the defect this split exists to close.
|
|
249
257
|
*/
|
|
250
|
-
[data-ui
|
|
258
|
+
[data-ui-button][data-variant='solid'] {
|
|
251
259
|
background: var(--_solid, ButtonFace);
|
|
252
260
|
border-color: var(--_edge, ButtonBorder);
|
|
253
261
|
box-shadow: var(--slotted-control-shadow, none);
|
|
@@ -257,20 +265,20 @@
|
|
|
257
265
|
/**
|
|
258
266
|
* The edge of an outline button is neutral and its label carries the tone.
|
|
259
267
|
* A saturated border on all five tones turned a row of actions into a row
|
|
260
|
-
* of status chips: the eye read five different
|
|
268
|
+
* of status chips: the eye read five different colors of rectangle before
|
|
261
269
|
* it read a single word. The edge is the control step, the one a field
|
|
262
270
|
* carries at rest: reading `--slotted-border-strong` here made the outline
|
|
263
271
|
* button the darkest line on the form, and the foundation now keeps that
|
|
264
272
|
* step for the line between two surfaces.
|
|
265
273
|
*/
|
|
266
|
-
[data-ui
|
|
274
|
+
[data-ui-button][data-variant='outline'] {
|
|
267
275
|
background: transparent;
|
|
268
276
|
border-color: var(--slotted-control-border-color, ButtonBorder);
|
|
269
277
|
box-shadow: var(--slotted-control-shadow, none);
|
|
270
278
|
color: var(--_text, ButtonText);
|
|
271
279
|
}
|
|
272
280
|
|
|
273
|
-
[data-ui
|
|
281
|
+
[data-ui-button][data-variant='ghost'] {
|
|
274
282
|
background: transparent;
|
|
275
283
|
border-color: transparent;
|
|
276
284
|
color: var(--_text, ButtonText);
|
|
@@ -279,12 +287,12 @@
|
|
|
279
287
|
/**
|
|
280
288
|
* The half of the pair for a variant with no fill of its own. `secondary` is
|
|
281
289
|
* the third case for the same reason it is the exception to every other fill
|
|
282
|
-
* rule: its solid step is the page's own
|
|
290
|
+
* rule: its solid step is the page's own color, so it takes the band the way
|
|
283
291
|
* a bare control does.
|
|
284
292
|
*/
|
|
285
|
-
[data-ui
|
|
286
|
-
[data-ui
|
|
287
|
-
[data-ui
|
|
293
|
+
[data-ui-button][data-variant='outline'],
|
|
294
|
+
[data-ui-button][data-variant='ghost'],
|
|
295
|
+
[data-ui-button][data-variant='solid'][data-tone='secondary'] {
|
|
288
296
|
--_sweep-strength: 0.18;
|
|
289
297
|
}
|
|
290
298
|
|
|
@@ -294,7 +302,7 @@
|
|
|
294
302
|
* A toggle that is on is a selected thing, and it is painted the way every
|
|
295
303
|
* selected thing in the foundation is (R1): the accent selection ground
|
|
296
304
|
* under the accent text, inside the accent edge — whatever tone and variant
|
|
297
|
-
* the toggle was written as, because "on" is one
|
|
305
|
+
* the toggle was written as, because "on" is one color across the system
|
|
298
306
|
* and not a shade of each control's own. It took the tone's solid fill
|
|
299
307
|
* before this, which made a neutral toggle that was on the same rectangle
|
|
300
308
|
* as one being pressed (`#e2e8f0` for both in `light`) and made a toggle
|
|
@@ -306,7 +314,7 @@
|
|
|
306
314
|
* It sits above hover and below loading and disabled, which is the order
|
|
307
315
|
* `STATE_PRECEDENCE` sets.
|
|
308
316
|
*/
|
|
309
|
-
[data-ui
|
|
317
|
+
[data-ui-button][data-pressed]:not(:disabled):not([data-disabled]) {
|
|
310
318
|
background: var(--slotted-tone-accent-subtle-active, Highlight);
|
|
311
319
|
border-color: var(--slotted-tone-accent-border, Highlight);
|
|
312
320
|
/* A ghost toggle that is on has taken a fill and an edge, so it is a framed
|
|
@@ -340,13 +348,13 @@
|
|
|
340
348
|
* and nothing moves.
|
|
341
349
|
*/
|
|
342
350
|
|
|
343
|
-
[data-ui
|
|
351
|
+
[data-ui-button][data-variant='solid']:hover:not(:disabled):not([data-disabled]):not(
|
|
344
352
|
[data-loading]
|
|
345
353
|
):not([data-pressed]) {
|
|
346
354
|
background: var(--_solid-hover, Highlight);
|
|
347
355
|
}
|
|
348
356
|
|
|
349
|
-
[data-ui
|
|
357
|
+
[data-ui-button][data-variant='solid']:active:not(:disabled):not([data-disabled]):not(
|
|
350
358
|
[data-loading]
|
|
351
359
|
):not([data-pressed]) {
|
|
352
360
|
background: var(--_solid-active, Highlight);
|
|
@@ -355,19 +363,19 @@
|
|
|
355
363
|
transition-duration: var(--slotted-duration-instant);
|
|
356
364
|
}
|
|
357
365
|
|
|
358
|
-
[data-ui
|
|
366
|
+
[data-ui-button][data-variant='outline']:hover:not(:disabled):not([data-disabled]):not(
|
|
359
367
|
[data-loading]
|
|
360
368
|
):not([data-pressed]),
|
|
361
|
-
[data-ui
|
|
369
|
+
[data-ui-button][data-variant='ghost']:hover:not(:disabled):not([data-disabled]):not(
|
|
362
370
|
[data-loading]
|
|
363
371
|
):not([data-pressed]) {
|
|
364
372
|
background: var(--slotted-tone-secondary-subtle-hover, ButtonFace);
|
|
365
373
|
}
|
|
366
374
|
|
|
367
|
-
[data-ui
|
|
375
|
+
[data-ui-button][data-variant='outline']:active:not(:disabled):not([data-disabled]):not(
|
|
368
376
|
[data-loading]
|
|
369
377
|
):not([data-pressed]),
|
|
370
|
-
[data-ui
|
|
378
|
+
[data-ui-button][data-variant='ghost']:active:not(:disabled):not([data-disabled]):not(
|
|
371
379
|
[data-loading]
|
|
372
380
|
):not([data-pressed]) {
|
|
373
381
|
background: var(--slotted-tone-secondary-subtle-active, ButtonFace);
|
|
@@ -379,18 +387,18 @@
|
|
|
379
387
|
* ground's own hover step and never on the neutral one a toggle that is off
|
|
380
388
|
* hovers with — the two states share no surface in any of theirs.
|
|
381
389
|
*/
|
|
382
|
-
[data-ui
|
|
390
|
+
[data-ui-button][data-pressed]:hover:not(:disabled):not([data-disabled]):not([data-loading]) {
|
|
383
391
|
background: var(--slotted-tone-accent-subtle-hover, Highlight);
|
|
384
392
|
}
|
|
385
393
|
|
|
386
|
-
[data-ui
|
|
394
|
+
[data-ui-button][data-pressed]:active:not(:disabled):not([data-disabled]):not([data-loading]) {
|
|
387
395
|
background: var(--slotted-tone-accent-subtle-active, Highlight);
|
|
388
396
|
transition-duration: var(--slotted-duration-instant);
|
|
389
397
|
}
|
|
390
398
|
|
|
391
399
|
/* ── Focus ────────────────────────────────────────────────────────────── */
|
|
392
400
|
|
|
393
|
-
[data-ui
|
|
401
|
+
[data-ui-button]:focus-visible {
|
|
394
402
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
395
403
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
396
404
|
}
|
|
@@ -400,7 +408,7 @@
|
|
|
400
408
|
*
|
|
401
409
|
* Per variant, because a flat control that fills with grey on the way to
|
|
402
410
|
* being unavailable reads as a different control rather than as the same
|
|
403
|
-
* one unavailable. A ghost button stays flat and loses only its
|
|
411
|
+
* one unavailable. A ghost button stays flat and loses only its color.
|
|
404
412
|
*
|
|
405
413
|
* `[data-disabled]` rather than `:disabled` alone, because a control that
|
|
406
414
|
* keeps its place in the tab sequence carries `aria-disabled` and no
|
|
@@ -408,8 +416,8 @@
|
|
|
408
416
|
* is always there.
|
|
409
417
|
*/
|
|
410
418
|
|
|
411
|
-
[data-ui
|
|
412
|
-
[data-ui
|
|
419
|
+
[data-ui-button]:disabled,
|
|
420
|
+
[data-ui-button][data-disabled] {
|
|
413
421
|
/* Nothing a person cannot reach is lifted off the page — the rule
|
|
414
422
|
`text-field` states for the same shadow. */
|
|
415
423
|
box-shadow: none;
|
|
@@ -417,8 +425,8 @@
|
|
|
417
425
|
cursor: not-allowed;
|
|
418
426
|
}
|
|
419
427
|
|
|
420
|
-
[data-ui
|
|
421
|
-
[data-ui
|
|
428
|
+
[data-ui-button][data-variant='solid']:disabled,
|
|
429
|
+
[data-ui-button][data-variant='solid'][data-disabled] {
|
|
422
430
|
background: var(--slotted-disabled-background, ButtonFace);
|
|
423
431
|
/**
|
|
424
432
|
* The disabled border rather than the disabled surface, because in the
|
|
@@ -428,8 +436,8 @@
|
|
|
428
436
|
border-color: var(--slotted-disabled-border, ButtonBorder);
|
|
429
437
|
}
|
|
430
438
|
|
|
431
|
-
[data-ui
|
|
432
|
-
[data-ui
|
|
439
|
+
[data-ui-button][data-variant='outline']:disabled,
|
|
440
|
+
[data-ui-button][data-variant='outline'][data-disabled] {
|
|
433
441
|
background: transparent;
|
|
434
442
|
border-color: var(--slotted-disabled-border, GrayText);
|
|
435
443
|
}
|
|
@@ -440,8 +448,8 @@
|
|
|
440
448
|
* is `aria-pressed`, which the platform announces whether or not the control
|
|
441
449
|
* can be operated.
|
|
442
450
|
*/
|
|
443
|
-
[data-ui
|
|
444
|
-
[data-ui
|
|
451
|
+
[data-ui-button][data-pressed]:disabled,
|
|
452
|
+
[data-ui-button][data-pressed][data-disabled] {
|
|
445
453
|
background: var(--slotted-disabled-background, ButtonFace);
|
|
446
454
|
border-color: var(--slotted-disabled-border, GrayText);
|
|
447
455
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
@@ -469,18 +477,18 @@
|
|
|
469
477
|
* a natively disabled control keeps the disabled tokens above, and a ghost
|
|
470
478
|
* stays flat and takes only the text.
|
|
471
479
|
*/
|
|
472
|
-
[data-ui
|
|
480
|
+
[data-ui-button][data-disabled]:not(:disabled) {
|
|
473
481
|
color: var(--slotted-text-muted, GrayText);
|
|
474
482
|
}
|
|
475
483
|
|
|
476
|
-
[data-ui
|
|
477
|
-
[data-ui
|
|
484
|
+
[data-ui-button][data-variant='solid'][data-disabled]:not(:disabled),
|
|
485
|
+
[data-ui-button][data-pressed][data-disabled]:not(:disabled) {
|
|
478
486
|
background: var(--slotted-tone-secondary-subtle-hover, ButtonFace);
|
|
479
487
|
border-color: var(--slotted-border-subtle, GrayText);
|
|
480
488
|
color: var(--slotted-text-muted, GrayText);
|
|
481
489
|
}
|
|
482
490
|
|
|
483
|
-
[data-ui
|
|
491
|
+
[data-ui-button][data-variant='outline'][data-disabled]:not(:disabled) {
|
|
484
492
|
border-color: var(--slotted-border-subtle, GrayText);
|
|
485
493
|
}
|
|
486
494
|
|
|
@@ -496,7 +504,7 @@
|
|
|
496
504
|
* A control with a start or end visual keeps its label and gives the ring
|
|
497
505
|
* that one box: the wait is legible, the action stays readable, and the box
|
|
498
506
|
* was already the size of the ring. Primer takes the same decision, and it
|
|
499
|
-
* is the one that stops a loading button from being a
|
|
507
|
+
* is the one that stops a loading button from being a colored rectangle
|
|
500
508
|
* with nothing in it.
|
|
501
509
|
*
|
|
502
510
|
* A control with no visual has nowhere to put the ring but over its own
|
|
@@ -505,11 +513,11 @@
|
|
|
505
513
|
* supplies survives the wait and combines with the indicator's own.
|
|
506
514
|
*/
|
|
507
515
|
|
|
508
|
-
[data-ui
|
|
516
|
+
[data-ui-button][data-loading] {
|
|
509
517
|
cursor: progress;
|
|
510
518
|
}
|
|
511
519
|
|
|
512
|
-
[data-ui
|
|
520
|
+
[data-ui-button][data-loading]:has(> [data-part-indicator]) > :not([data-part-indicator]) {
|
|
513
521
|
opacity: 0;
|
|
514
522
|
}
|
|
515
523
|
|
|
@@ -518,16 +526,37 @@
|
|
|
518
526
|
* that waits. This family only says how big it is — the glyph box of its
|
|
519
527
|
* own step — and where it sits.
|
|
520
528
|
*/
|
|
521
|
-
[data-ui
|
|
529
|
+
[data-ui-button] [data-part-indicator] {
|
|
522
530
|
--slotted-spinner-size: var(--_icon-size);
|
|
523
531
|
|
|
524
532
|
flex: none;
|
|
525
533
|
}
|
|
526
534
|
|
|
535
|
+
/**
|
|
536
|
+
* The ring that stands in for a glyph takes the glyph's box. The glyph stays
|
|
537
|
+
* in the DOM, so the slot keeps its width, and is not drawn: the slot hides
|
|
538
|
+
* what it holds and the ring alone shows again. `IconButton` drew both side
|
|
539
|
+
* by side in a square of one glyph.
|
|
540
|
+
*/
|
|
541
|
+
[data-ui-button] [data-part-start]:has(> [data-part-indicator]),
|
|
542
|
+
[data-ui-button] [data-part-end]:has(> [data-part-indicator]),
|
|
543
|
+
[data-ui-button] [data-part-icon]:has(> [data-part-indicator]) {
|
|
544
|
+
visibility: hidden;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
[data-ui-button] [data-part-start] > [data-part-indicator],
|
|
548
|
+
[data-ui-button] [data-part-end] > [data-part-indicator],
|
|
549
|
+
[data-ui-button] [data-part-icon] > [data-part-indicator] {
|
|
550
|
+
inset: 0;
|
|
551
|
+
margin: auto;
|
|
552
|
+
position: absolute;
|
|
553
|
+
visibility: visible;
|
|
554
|
+
}
|
|
555
|
+
|
|
527
556
|
/* Only the ring that has no visual slot to sit in is placed against the box. */
|
|
528
|
-
[data-ui
|
|
557
|
+
[data-ui-button] > [data-part-indicator] {
|
|
529
558
|
inset: 0;
|
|
530
|
-
/* `inset: 0` with a definite size and automatic margins
|
|
559
|
+
/* `inset: 0` with a definite size and automatic margins centers on both
|
|
531
560
|
axes without naming a physical side. */
|
|
532
561
|
margin: auto;
|
|
533
562
|
position: absolute;
|
|
@@ -559,12 +588,12 @@
|
|
|
559
588
|
* `currentColor` is what makes the band answer every tone and every variant
|
|
560
589
|
* without a token of its own: it is the ink the control is already painting
|
|
561
590
|
* its own label with, so it contrasts with that control's ground by
|
|
562
|
-
* construction — the on-tone
|
|
591
|
+
* construction — the on-tone color over a filled one, the tone itself over
|
|
563
592
|
* a bare one, and whatever the scheme remapped either to.
|
|
564
593
|
*/
|
|
565
594
|
@media (prefers-reduced-motion: no-preference) {
|
|
566
595
|
@media not (forced-colors: active) {
|
|
567
|
-
[data-ui
|
|
596
|
+
[data-ui-button]:not([data-shape])[data-loading]:has([data-part-indicator])::after {
|
|
568
597
|
/**
|
|
569
598
|
* The tile is crossed once per cycle, so the pair sets the speed the
|
|
570
599
|
* band travels rather than the time it takes: two heights per loop
|
|
@@ -588,19 +617,17 @@
|
|
|
588
617
|
* A band that travels against the reading direction reads as undoing
|
|
589
618
|
* rather than as progressing, so it is mirrored rather than reused.
|
|
590
619
|
*/
|
|
591
|
-
[data-ui
|
|
592
|
-
rtl
|
|
593
|
-
)::after {
|
|
620
|
+
[data-ui-button]:not([data-shape])[data-loading]:has([data-part-indicator]):dir(rtl)::after {
|
|
594
621
|
animation-direction: reverse;
|
|
595
622
|
background-image: linear-gradient(to left, transparent, currentColor 40%, transparent 80%);
|
|
596
623
|
}
|
|
597
624
|
|
|
598
|
-
[data-ui
|
|
599
|
-
> :not([data-part
|
|
625
|
+
[data-ui-button]:not([data-shape])[data-loading]:has(> [data-part-indicator])
|
|
626
|
+
> :not([data-part-indicator]) {
|
|
600
627
|
opacity: 1;
|
|
601
628
|
}
|
|
602
629
|
|
|
603
|
-
[data-ui
|
|
630
|
+
[data-ui-button]:not([data-shape])[data-loading] [data-part-indicator] {
|
|
604
631
|
opacity: 0;
|
|
605
632
|
position: absolute;
|
|
606
633
|
}
|
|
@@ -609,9 +636,9 @@
|
|
|
609
636
|
|
|
610
637
|
/* ── Parts ────────────────────────────────────────────────────────────── */
|
|
611
638
|
|
|
612
|
-
[data-ui
|
|
613
|
-
[data-ui
|
|
614
|
-
[data-ui
|
|
639
|
+
[data-ui-button] [data-part-start],
|
|
640
|
+
[data-ui-button] [data-part-end],
|
|
641
|
+
[data-ui-button] [data-part-icon] {
|
|
615
642
|
align-items: center;
|
|
616
643
|
block-size: var(--_icon-size);
|
|
617
644
|
box-sizing: border-box;
|
|
@@ -625,40 +652,61 @@
|
|
|
625
652
|
position: relative;
|
|
626
653
|
}
|
|
627
654
|
|
|
628
|
-
[data-ui
|
|
629
|
-
[data-ui
|
|
630
|
-
[data-ui
|
|
655
|
+
[data-ui-button] [data-part-start] > *:not([data-part-indicator], [data-ui-kbd]),
|
|
656
|
+
[data-ui-button] [data-part-end] > *:not([data-part-indicator], [data-ui-kbd]),
|
|
657
|
+
[data-ui-button] [data-part-icon] > *:not([data-part-indicator]) {
|
|
631
658
|
block-size: 100%;
|
|
632
659
|
display: block;
|
|
633
660
|
inline-size: 100%;
|
|
634
661
|
}
|
|
635
662
|
|
|
636
663
|
/**
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
*
|
|
664
|
+
* A key in a slot is sized by its own family. The slot above is a glyph's
|
|
665
|
+
* box: it stated `display: block` on the key, which put the legend on a line
|
|
666
|
+
* box's baseline instead of the key's center, sixteen pixels square, and the
|
|
667
|
+
* icon's font size, which `size="inherit"` read as the text's. Measured, a
|
|
668
|
+
* `Kbd` legend stood 1.5px above the label's center and a `Shortcut` 1.5px
|
|
669
|
+
* below it. Here the slot takes the key's measure and the label's type, and
|
|
670
|
+
* the flex container centers the key on the label.
|
|
671
|
+
*/
|
|
672
|
+
[data-ui-button] :is([data-part-start], [data-part-end]):has(> [data-ui-kbd]) {
|
|
673
|
+
block-size: auto;
|
|
674
|
+
font-size: inherit;
|
|
675
|
+
inline-size: auto;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* The label is one line at its own width. It broke anywhere once, which made
|
|
680
|
+
* a button in a row as narrow as one letter: squeezed, "Corrigir" became
|
|
681
|
+
* three lines and broke inside the word. A row of buttons now overflows, or
|
|
682
|
+
* a toolbar folds what does not fit; a control held narrower than its label
|
|
683
|
+
* by its container — `max-inline-size: 100%` — cuts the label with an
|
|
684
|
+
* ellipsis rather than spilling it past the border. The line height is the
|
|
685
|
+
* text step's, which the trim below reads.
|
|
640
686
|
*/
|
|
641
|
-
[data-ui
|
|
687
|
+
[data-ui-button] [data-part-label] {
|
|
642
688
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
643
689
|
min-inline-size: 0;
|
|
644
|
-
overflow
|
|
690
|
+
overflow: hidden;
|
|
691
|
+
text-overflow: ellipsis;
|
|
692
|
+
white-space: nowrap;
|
|
645
693
|
}
|
|
646
694
|
|
|
647
695
|
/**
|
|
648
|
-
* A flex container
|
|
696
|
+
* A flex container centers the line box, and a line box is not symmetric
|
|
649
697
|
* around the letters inside it. Measured on this family, the word sat 1.2
|
|
650
|
-
* pixels above the
|
|
698
|
+
* pixels above the center of the glyph beside it at every step of every
|
|
651
699
|
* density except the two where the rounding of the font size made it 0.92
|
|
652
|
-
* and 0.16 — the label and the icon were
|
|
700
|
+
* and 0.16 — the label and the icon were centerd against different things.
|
|
653
701
|
* `text-box` trims the line to the cap and the baseline, so what the flex
|
|
654
|
-
* container
|
|
702
|
+
* container centers is the ink, and the offset is 0 everywhere.
|
|
655
703
|
*
|
|
656
704
|
* The trim is paid for rather than taken. Trimming a label that wraps also
|
|
657
705
|
* takes the half-leading off the top and bottom of the whole block, which is
|
|
658
706
|
* the only thing keeping a wrapped word off the border — measured, a
|
|
659
707
|
* two-line control lost 8.39 pixels of height and its descenders fell two
|
|
660
708
|
* pixels below the edge. The padding gives that leading back symmetrically,
|
|
661
|
-
* so the ink stays
|
|
709
|
+
* so the ink stays centerd and the control is the height it was: 36.77
|
|
662
710
|
* pixels against 36.78 for the same two lines.
|
|
663
711
|
*
|
|
664
712
|
* Both terms are proportions of the type rather than steps of a scale.
|
|
@@ -669,7 +717,7 @@
|
|
|
669
717
|
* of a pixel, which is the only thing the term governs.
|
|
670
718
|
*/
|
|
671
719
|
@supports (text-box: trim-both cap alphabetic) {
|
|
672
|
-
[data-ui
|
|
720
|
+
[data-ui-button] [data-part-label] {
|
|
673
721
|
padding-block: calc((var(--slotted-line-height-sm, 1.45) * 1em - 0.75em) / 2);
|
|
674
722
|
text-box: trim-both cap alphabetic;
|
|
675
723
|
}
|
|
@@ -680,17 +728,17 @@
|
|
|
680
728
|
* letter. An icon-only control is exempt, because both of its sides hold
|
|
681
729
|
* the same glyph and its inset is zero.
|
|
682
730
|
*/
|
|
683
|
-
[data-ui
|
|
731
|
+
[data-ui-button]:not([data-shape]):has(> [data-part-start]) {
|
|
684
732
|
padding-inline-start: var(--_padding-inline-visual);
|
|
685
733
|
}
|
|
686
734
|
|
|
687
|
-
[data-ui
|
|
735
|
+
[data-ui-button]:not([data-shape]):has(> [data-part-end]) {
|
|
688
736
|
padding-inline-end: var(--_padding-inline-visual);
|
|
689
737
|
}
|
|
690
738
|
|
|
691
739
|
/* ── Inline size ──────────────────────────────────────────────────────── */
|
|
692
740
|
|
|
693
|
-
[data-ui
|
|
741
|
+
[data-ui-button][data-full-width] {
|
|
694
742
|
inline-size: 100%;
|
|
695
743
|
}
|
|
696
744
|
|
|
@@ -699,17 +747,17 @@
|
|
|
699
747
|
* label takes the free space, so `start` stays beside it and the end slot is
|
|
700
748
|
* pushed to the edge; flex follows the writing direction, so it mirrors.
|
|
701
749
|
*/
|
|
702
|
-
[data-ui
|
|
750
|
+
[data-ui-button][data-justify='between'] {
|
|
703
751
|
justify-content: space-between;
|
|
704
752
|
}
|
|
705
753
|
|
|
706
|
-
[data-ui
|
|
754
|
+
[data-ui-button][data-justify='between'] > [data-part-label] {
|
|
707
755
|
flex: 1 1 auto;
|
|
708
756
|
text-align: start;
|
|
709
757
|
}
|
|
710
758
|
|
|
711
759
|
/* What a trigger holds at its end — a shortcut, a count — is as wide as it is. */
|
|
712
|
-
[data-ui
|
|
760
|
+
[data-ui-button][data-justify='between'] > [data-part-end] {
|
|
713
761
|
inline-size: auto;
|
|
714
762
|
min-inline-size: var(--_icon-size);
|
|
715
763
|
}
|
|
@@ -721,7 +769,7 @@
|
|
|
721
769
|
* small in one axis is the family's to correct, and theme validation only
|
|
722
770
|
* guarantees the block axis.
|
|
723
771
|
*/
|
|
724
|
-
[data-ui
|
|
772
|
+
[data-ui-button][data-shape] {
|
|
725
773
|
aspect-ratio: 1;
|
|
726
774
|
inline-size: var(--_height);
|
|
727
775
|
min-block-size: max(var(--_height), var(--slotted-target-min, 24px));
|
|
@@ -730,12 +778,12 @@
|
|
|
730
778
|
padding-inline: 0;
|
|
731
779
|
}
|
|
732
780
|
|
|
733
|
-
[data-ui
|
|
781
|
+
[data-ui-button][data-shape='circle'] {
|
|
734
782
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
735
783
|
}
|
|
736
784
|
|
|
737
785
|
/**
|
|
738
|
-
* ── Forced
|
|
786
|
+
* ── Forced colors ────────────────────────────────────────────────────
|
|
739
787
|
*
|
|
740
788
|
* The theme remaps every token it owns, so this block exists only for what
|
|
741
789
|
* the family paints itself: the transparent border of `ghost` and of a
|
|
@@ -744,16 +792,16 @@
|
|
|
744
792
|
* for a fill the system has flattened.
|
|
745
793
|
*/
|
|
746
794
|
@media (forced-colors: active) {
|
|
747
|
-
[data-ui
|
|
795
|
+
[data-ui-button] {
|
|
748
796
|
border-color: ButtonBorder;
|
|
749
797
|
}
|
|
750
798
|
|
|
751
|
-
[data-ui
|
|
799
|
+
[data-ui-button][data-pressed] {
|
|
752
800
|
border-color: Highlight;
|
|
753
801
|
}
|
|
754
802
|
|
|
755
|
-
[data-ui
|
|
756
|
-
[data-ui
|
|
803
|
+
[data-ui-button]:disabled,
|
|
804
|
+
[data-ui-button][data-disabled] {
|
|
757
805
|
border-color: GrayText;
|
|
758
806
|
color: GrayText;
|
|
759
807
|
}
|
|
@@ -764,7 +812,7 @@
|
|
|
764
812
|
* shows the wait, and the sweep above is the loop this sheet owns.
|
|
765
813
|
*/
|
|
766
814
|
@media (prefers-reduced-motion: reduce) {
|
|
767
|
-
[data-ui
|
|
815
|
+
[data-ui-button] [data-part-indicator] {
|
|
768
816
|
animation: none;
|
|
769
817
|
}
|
|
770
818
|
}
|
|
@@ -52,6 +52,11 @@
|
|
|
52
52
|
"--slotted-tone-danger-solid-active",
|
|
53
53
|
"--slotted-tone-danger-solid-hover",
|
|
54
54
|
"--slotted-tone-danger-text",
|
|
55
|
+
"--slotted-tone-info-on-solid",
|
|
56
|
+
"--slotted-tone-info-solid",
|
|
57
|
+
"--slotted-tone-info-solid-active",
|
|
58
|
+
"--slotted-tone-info-solid-hover",
|
|
59
|
+
"--slotted-tone-info-text",
|
|
55
60
|
"--slotted-tone-neutral-on-solid",
|
|
56
61
|
"--slotted-tone-neutral-solid",
|
|
57
62
|
"--slotted-tone-neutral-solid-active",
|