@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
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* the reason is state and not paint: ToggleButton owns `pressed` with a
|
|
15
15
|
* complete controlled and uncontrolled model, so inside a group that owns
|
|
16
16
|
* the value there would be two owners of one fact. What it costs is written
|
|
17
|
-
* here: one selected
|
|
17
|
+
* here: one selected color instead of five tones. A consumer who wants the
|
|
18
18
|
* whole palette in a joined bar writes `button-group` around ToggleButtons.
|
|
19
19
|
*
|
|
20
|
-
* "On" is one
|
|
20
|
+
* "On" is one color across the system — the accent ground inside the accent
|
|
21
21
|
* edge, which is the pair `docs/token-foundation.md` names for the chosen
|
|
22
22
|
* row, card, option and toggle, and the same pair `button` paints a pressed
|
|
23
23
|
* ToggleButton with.
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
* `--slotted-control-height-*` tall to the pixel, and a bar beside a text
|
|
30
30
|
* field in a form lines up with it instead of standing two pixels prouder.
|
|
31
31
|
* The first pass framed the root as well, and the reviewer read the result
|
|
32
|
-
* correctly: a
|
|
32
|
+
* correctly: a colored border inside a grey one, and an edge that was one
|
|
33
33
|
* pixel in places and two in others.
|
|
34
34
|
*/
|
|
35
|
-
[data-ui
|
|
35
|
+
[data-ui-toggle-group][data-part-root] {
|
|
36
36
|
--_height: var(--slotted-control-height-md, 34px);
|
|
37
37
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
38
38
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
@@ -76,13 +76,13 @@
|
|
|
76
76
|
* from a permission filter renders one often, and an empty box still eats a
|
|
77
77
|
* gap in the row that holds it — `button-group` records the same defect.
|
|
78
78
|
*/
|
|
79
|
-
[data-ui
|
|
79
|
+
[data-ui-toggle-group][data-part-root]:empty {
|
|
80
80
|
display: none;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
84
84
|
|
|
85
|
-
[data-ui
|
|
85
|
+
[data-ui-toggle-group][data-part-root][data-size='sm'] {
|
|
86
86
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
87
87
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
88
88
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
--_gap: var(--slotted-control-gap-sm, 6px);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
[data-ui
|
|
93
|
+
[data-ui-toggle-group][data-part-root][data-size='lg'] {
|
|
94
94
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
95
95
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
96
96
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
|
|
101
101
|
/* ── Orientation ──────────────────────────────────────────────────────── */
|
|
102
102
|
|
|
103
|
-
[data-ui
|
|
103
|
+
[data-ui-toggle-group][data-part-root][data-orientation='vertical'] {
|
|
104
104
|
flex-direction: column;
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -111,24 +111,24 @@
|
|
|
111
111
|
* shrinks to its content, which is what a set of formatting toggles beside a
|
|
112
112
|
* paragraph needs and what every surveyed implementation defaults to.
|
|
113
113
|
*/
|
|
114
|
-
[data-ui
|
|
114
|
+
[data-ui-toggle-group][data-part-root][data-full-width] {
|
|
115
115
|
display: flex;
|
|
116
116
|
inline-size: 100%;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
[data-ui
|
|
119
|
+
[data-ui-toggle-group][data-part-root][data-full-width] [data-part-item] {
|
|
120
120
|
flex: 1 1 0;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
/* ── The item ─────────────────────────────────────────────────────────── */
|
|
124
124
|
|
|
125
|
-
[data-ui
|
|
125
|
+
[data-ui-toggle-group] [data-part-item] {
|
|
126
126
|
align-items: center;
|
|
127
127
|
appearance: none;
|
|
128
128
|
background: transparent;
|
|
129
129
|
block-size: var(--_height);
|
|
130
130
|
/**
|
|
131
|
-
* Always a border, and always the same width. A state changes its
|
|
131
|
+
* Always a border, and always the same width. A state changes its color
|
|
132
132
|
* and never its presence: a border that appears when an item is pressed
|
|
133
133
|
* moves every label in the bar by a pixel.
|
|
134
134
|
*/
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
position: relative;
|
|
161
161
|
/**
|
|
162
162
|
* Nothing here moves, and that is the right answer for this family: a
|
|
163
|
-
* toggle changes
|
|
163
|
+
* toggle changes color, and color is what the eye has to follow. The
|
|
164
164
|
* duration is the control step, so a theme retunes every control's
|
|
165
165
|
* interaction feedback once and reduced motion collapses it to a frame.
|
|
166
166
|
*/
|
|
@@ -174,13 +174,13 @@
|
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
176
|
* An item with no words is a square holding one mark, so its inline padding
|
|
177
|
-
* is whatever
|
|
177
|
+
* is whatever centers that mark rather than the padding a label needs.
|
|
178
178
|
*/
|
|
179
|
-
[data-ui
|
|
179
|
+
[data-ui-toggle-group] [data-part-item]:not(:has([data-part-label])) {
|
|
180
180
|
padding-inline: 0;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
[data-ui
|
|
183
|
+
[data-ui-toggle-group] [data-part-icon] {
|
|
184
184
|
block-size: var(--_icon-size);
|
|
185
185
|
display: inline-flex;
|
|
186
186
|
flex: none;
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
* and what an icon beside it is aligned against. The string stays whole in
|
|
194
194
|
* the DOM — the library's rule is that truncation never removes content.
|
|
195
195
|
*/
|
|
196
|
-
[data-ui
|
|
196
|
+
[data-ui-toggle-group] [data-part-label] {
|
|
197
197
|
overflow: hidden;
|
|
198
198
|
text-overflow: ellipsis;
|
|
199
199
|
white-space: nowrap;
|
|
@@ -201,12 +201,12 @@
|
|
|
201
201
|
|
|
202
202
|
/* ── The edge ─────────────────────────────────────────────────────────── */
|
|
203
203
|
|
|
204
|
-
[data-ui
|
|
204
|
+
[data-ui-toggle-group][data-part-root][data-variant='outline'] [data-part-item] {
|
|
205
205
|
border-color: var(--_border-color);
|
|
206
206
|
/* A framed item lifts off its ground at rest, as button's outline does. */
|
|
207
207
|
box-shadow: var(--slotted-toggle-group-shadow, var(--slotted-control-shadow, none));
|
|
208
208
|
}
|
|
209
|
-
[data-ui
|
|
209
|
+
[data-ui-toggle-group][data-part-root]:not([data-attached]) {
|
|
210
210
|
gap: var(--_separation);
|
|
211
211
|
}
|
|
212
212
|
|
|
@@ -231,54 +231,54 @@
|
|
|
231
231
|
* anything: an item that is on replaces the grey line in its column with its
|
|
232
232
|
* own, and the bar's outline stays one pixel everywhere.
|
|
233
233
|
*/
|
|
234
|
-
[data-ui
|
|
235
|
-
[data-part
|
|
236
|
-
+ [data-part
|
|
234
|
+
[data-ui-toggle-group][data-part-root][data-attached]:not([data-orientation='vertical'])
|
|
235
|
+
[data-part-item]
|
|
236
|
+
+ [data-part-item] {
|
|
237
237
|
margin-inline-start: var(--_overlap);
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
[data-ui
|
|
241
|
-
[data-part
|
|
242
|
-
+ [data-part
|
|
240
|
+
[data-ui-toggle-group][data-part-root][data-attached][data-orientation='vertical']
|
|
241
|
+
[data-part-item]
|
|
242
|
+
+ [data-part-item] {
|
|
243
243
|
margin-block-start: var(--_overlap);
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
[data-ui
|
|
247
|
-
[data-part
|
|
246
|
+
[data-ui-toggle-group][data-part-root][data-attached]:not([data-orientation='vertical'])
|
|
247
|
+
[data-part-item] {
|
|
248
248
|
border-end-start-radius: 0;
|
|
249
249
|
border-end-end-radius: 0;
|
|
250
250
|
border-start-start-radius: 0;
|
|
251
251
|
border-start-end-radius: 0;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
[data-ui
|
|
255
|
-
[data-part
|
|
254
|
+
[data-ui-toggle-group][data-part-root][data-attached]:not([data-orientation='vertical'])
|
|
255
|
+
[data-part-item]:first-child {
|
|
256
256
|
border-end-start-radius: var(--_radius);
|
|
257
257
|
border-start-start-radius: var(--_radius);
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
[data-ui
|
|
261
|
-
[data-part
|
|
260
|
+
[data-ui-toggle-group][data-part-root][data-attached]:not([data-orientation='vertical'])
|
|
261
|
+
[data-part-item]:last-child {
|
|
262
262
|
border-end-end-radius: var(--_radius);
|
|
263
263
|
border-start-end-radius: var(--_radius);
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
[data-ui
|
|
267
|
-
[data-part
|
|
266
|
+
[data-ui-toggle-group][data-part-root][data-attached][data-orientation='vertical']
|
|
267
|
+
[data-part-item] {
|
|
268
268
|
border-end-start-radius: 0;
|
|
269
269
|
border-end-end-radius: 0;
|
|
270
270
|
border-start-start-radius: 0;
|
|
271
271
|
border-start-end-radius: 0;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
[data-ui
|
|
275
|
-
[data-part
|
|
274
|
+
[data-ui-toggle-group][data-part-root][data-attached][data-orientation='vertical']
|
|
275
|
+
[data-part-item]:first-child {
|
|
276
276
|
border-start-end-radius: var(--_radius);
|
|
277
277
|
border-start-start-radius: var(--_radius);
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
[data-ui
|
|
281
|
-
[data-part
|
|
280
|
+
[data-ui-toggle-group][data-part-root][data-attached][data-orientation='vertical']
|
|
281
|
+
[data-part-item]:last-child {
|
|
282
282
|
border-end-end-radius: var(--_radius);
|
|
283
283
|
border-end-start-radius: var(--_radius);
|
|
284
284
|
}
|
|
@@ -290,29 +290,29 @@
|
|
|
290
290
|
* four edges, and the neighbour after it gives up the leading edge that would
|
|
291
291
|
* otherwise be painted over the accent one.
|
|
292
292
|
*/
|
|
293
|
-
[data-ui
|
|
293
|
+
[data-ui-toggle-group][data-part-root][data-variant='outline'][data-attached]:not(
|
|
294
294
|
[data-orientation='vertical']
|
|
295
295
|
)
|
|
296
|
-
[data-part
|
|
296
|
+
[data-part-item]:not(:last-child):not([data-pressed]) {
|
|
297
297
|
border-inline-end-color: transparent;
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
[data-ui
|
|
301
|
-
[data-part
|
|
300
|
+
[data-ui-toggle-group][data-part-root][data-variant='outline'][data-attached][data-orientation='vertical']
|
|
301
|
+
[data-part-item]:not(:last-child):not([data-pressed]) {
|
|
302
302
|
border-block-end-color: transparent;
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
[data-ui
|
|
305
|
+
[data-ui-toggle-group][data-part-root][data-variant='outline'][data-attached]:not(
|
|
306
306
|
[data-orientation='vertical']
|
|
307
307
|
)
|
|
308
|
-
[data-part
|
|
309
|
-
+ [data-part
|
|
308
|
+
[data-part-item][data-pressed]
|
|
309
|
+
+ [data-part-item] {
|
|
310
310
|
border-inline-start-color: transparent;
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
[data-ui
|
|
314
|
-
[data-part
|
|
315
|
-
+ [data-part
|
|
313
|
+
[data-ui-toggle-group][data-part-root][data-variant='outline'][data-attached][data-orientation='vertical']
|
|
314
|
+
[data-part-item][data-pressed]
|
|
315
|
+
+ [data-part-item] {
|
|
316
316
|
border-block-start-color: transparent;
|
|
317
317
|
}
|
|
318
318
|
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
* It sits above hover and below disabled, which is the order
|
|
328
328
|
* `STATE_PRECEDENCE` sets.
|
|
329
329
|
*/
|
|
330
|
-
[data-ui
|
|
330
|
+
[data-ui-toggle-group] [data-part-item][data-pressed]:not(:disabled):not([data-disabled]) {
|
|
331
331
|
background: var(
|
|
332
332
|
--slotted-toggle-group-pressed-background,
|
|
333
333
|
var(--slotted-tone-accent-subtle-active, Highlight)
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
);
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
[data-ui
|
|
345
|
+
[data-ui-toggle-group] [data-part-item][data-pressed] {
|
|
346
346
|
z-index: 1;
|
|
347
347
|
}
|
|
348
348
|
|
|
@@ -355,16 +355,16 @@
|
|
|
355
355
|
* that is on answers the pointer on the accent ground's own steps, so the
|
|
356
356
|
* two states share no surface in any of theirs.
|
|
357
357
|
*/
|
|
358
|
-
[data-ui
|
|
359
|
-
[data-part
|
|
358
|
+
[data-ui-toggle-group]
|
|
359
|
+
[data-part-item]:hover:not(:disabled):not([data-disabled]):not([data-pressed]) {
|
|
360
360
|
background: var(
|
|
361
361
|
--slotted-toggle-group-hover-background,
|
|
362
362
|
var(--slotted-tone-secondary-subtle-hover, ButtonFace)
|
|
363
363
|
);
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
[data-ui
|
|
367
|
-
[data-part
|
|
366
|
+
[data-ui-toggle-group]
|
|
367
|
+
[data-part-item]:active:not(:disabled):not([data-disabled]):not([data-pressed]) {
|
|
368
368
|
background: var(
|
|
369
369
|
--slotted-toggle-group-active-background,
|
|
370
370
|
var(--slotted-tone-secondary-subtle-active, ButtonFace)
|
|
@@ -375,16 +375,14 @@
|
|
|
375
375
|
transition-duration: var(--slotted-duration-instant);
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
[data-ui
|
|
379
|
-
[data-part='item'][data-pressed]:hover:not(:disabled):not([data-disabled]) {
|
|
378
|
+
[data-ui-toggle-group] [data-part-item][data-pressed]:hover:not(:disabled):not([data-disabled]) {
|
|
380
379
|
background: var(
|
|
381
380
|
--slotted-toggle-group-pressed-hover-background,
|
|
382
381
|
var(--slotted-tone-accent-subtle-hover, Highlight)
|
|
383
382
|
);
|
|
384
383
|
}
|
|
385
384
|
|
|
386
|
-
[data-ui
|
|
387
|
-
[data-part='item'][data-pressed]:active:not(:disabled):not([data-disabled]) {
|
|
385
|
+
[data-ui-toggle-group] [data-part-item][data-pressed]:active:not(:disabled):not([data-disabled]) {
|
|
388
386
|
background: var(
|
|
389
387
|
--slotted-toggle-group-pressed-background,
|
|
390
388
|
var(--slotted-tone-accent-subtle-active, Highlight)
|
|
@@ -401,21 +399,21 @@
|
|
|
401
399
|
* under its own label — which is the one state a chip has to say at a
|
|
402
400
|
* glance. Hover and press move the ground of a chip at rest only.
|
|
403
401
|
*/
|
|
404
|
-
[data-ui
|
|
402
|
+
[data-ui-toggle-group][data-part-root][data-variant='chips'] {
|
|
405
403
|
flex-wrap: wrap;
|
|
406
404
|
gap: var(--slotted-toggle-group-chips-gap, var(--slotted-space-3, 0.375rem));
|
|
407
405
|
}
|
|
408
406
|
|
|
409
|
-
[data-ui
|
|
407
|
+
[data-ui-toggle-group][data-part-root][data-variant='chips'] [data-part-item] {
|
|
410
408
|
border-color: var(--_border-color);
|
|
411
409
|
border-radius: var(--slotted-toggle-group-chips-radius, var(--slotted-radius-full, 9999px));
|
|
412
410
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
413
411
|
}
|
|
414
412
|
|
|
415
|
-
[data-ui
|
|
416
|
-
[data-part
|
|
417
|
-
[data-ui
|
|
418
|
-
[data-part
|
|
413
|
+
[data-ui-toggle-group][data-part-root][data-variant='chips']
|
|
414
|
+
[data-part-item][data-pressed]:not(:disabled):not([data-disabled]),
|
|
415
|
+
[data-ui-toggle-group][data-part-root][data-variant='chips']
|
|
416
|
+
[data-part-item][data-pressed]:active:not(:disabled):not([data-disabled]) {
|
|
419
417
|
background: var(
|
|
420
418
|
--slotted-toggle-group-chips-pressed-background,
|
|
421
419
|
var(--slotted-tone-neutral-solid, CanvasText)
|
|
@@ -430,15 +428,14 @@
|
|
|
430
428
|
);
|
|
431
429
|
}
|
|
432
430
|
|
|
433
|
-
[data-ui
|
|
434
|
-
[data-part
|
|
431
|
+
[data-ui-toggle-group][data-part-root][data-variant='chips']
|
|
432
|
+
[data-part-item][data-pressed]:hover:not(:disabled):not([data-disabled]) {
|
|
435
433
|
background: var(--slotted-tone-neutral-solid-hover, CanvasText);
|
|
436
434
|
border-color: var(--slotted-tone-neutral-solid-hover, CanvasText);
|
|
437
435
|
}
|
|
438
436
|
|
|
439
|
-
[data-ui
|
|
440
|
-
[data-ui
|
|
441
|
-
[data-part='item'][data-disabled] {
|
|
437
|
+
[data-ui-toggle-group][data-part-root][data-variant='chips'] [data-part-item]:disabled,
|
|
438
|
+
[data-ui-toggle-group][data-part-root][data-variant='chips'] [data-part-item][data-disabled] {
|
|
442
439
|
border-color: var(--slotted-disabled-border, GrayText);
|
|
443
440
|
}
|
|
444
441
|
|
|
@@ -449,7 +446,7 @@
|
|
|
449
446
|
* edge the way every other control in the library holds it. The focused item
|
|
450
447
|
* is raised above every other, including one that is on.
|
|
451
448
|
*/
|
|
452
|
-
[data-ui
|
|
449
|
+
[data-ui-toggle-group] [data-part-item]:focus-visible {
|
|
453
450
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
454
451
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
455
452
|
z-index: 2;
|
|
@@ -467,7 +464,7 @@
|
|
|
467
464
|
* gives. It then replaces that item's own border rather than standing beside
|
|
468
465
|
* it, and every seam in the bar stays one line wide.
|
|
469
466
|
*/
|
|
470
|
-
[data-ui
|
|
467
|
+
[data-ui-toggle-group][data-part-root][data-attached] [data-part-item]:focus-visible {
|
|
471
468
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
472
469
|
}
|
|
473
470
|
|
|
@@ -478,16 +475,15 @@
|
|
|
478
475
|
* out of action with a `fieldset` and its items then carry no attribute of
|
|
479
476
|
* their own.
|
|
480
477
|
*/
|
|
481
|
-
[data-ui
|
|
482
|
-
[data-ui
|
|
478
|
+
[data-ui-toggle-group] [data-part-item]:disabled,
|
|
479
|
+
[data-ui-toggle-group] [data-part-item][data-disabled] {
|
|
483
480
|
background: transparent;
|
|
484
481
|
color: var(--slotted-toggle-group-disabled-color, var(--slotted-disabled-foreground, GrayText));
|
|
485
482
|
cursor: default;
|
|
486
483
|
}
|
|
487
484
|
|
|
488
|
-
[data-ui
|
|
489
|
-
[data-ui
|
|
490
|
-
[data-part='item'][data-disabled] {
|
|
485
|
+
[data-ui-toggle-group][data-part-root][data-variant='outline'] [data-part-item]:disabled,
|
|
486
|
+
[data-ui-toggle-group][data-part-root][data-variant='outline'] [data-part-item][data-disabled] {
|
|
491
487
|
border-color: var(
|
|
492
488
|
--slotted-toggle-group-disabled-border-color,
|
|
493
489
|
var(--slotted-disabled-border, GrayText)
|
|
@@ -503,8 +499,8 @@
|
|
|
503
499
|
* a control they cannot change. In `high-contrast` the ground is the page's
|
|
504
500
|
* own white, and the edge is then the only thing carrying it.
|
|
505
501
|
*/
|
|
506
|
-
[data-ui
|
|
507
|
-
[data-ui
|
|
502
|
+
[data-ui-toggle-group] [data-part-item][data-pressed]:disabled,
|
|
503
|
+
[data-ui-toggle-group] [data-part-item][data-pressed][data-disabled] {
|
|
508
504
|
background: var(
|
|
509
505
|
--slotted-toggle-group-disabled-pressed-background,
|
|
510
506
|
var(--slotted-disabled-background, ButtonFace)
|
package/src/toolbar/toolbar.css
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* the arrows reach the buttons through it because the items are found by
|
|
15
15
|
* being focusable rather than by being children.
|
|
16
16
|
*/
|
|
17
|
-
[data-ui
|
|
17
|
+
[data-ui-toolbar] {
|
|
18
18
|
/**
|
|
19
19
|
* The bar's own rhythm, from the control scales, so the three densities
|
|
20
20
|
* move it without a rule of their own.
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
padding: var(--slotted-toolbar-inset, var(--_pad));
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
[data-ui
|
|
47
|
+
[data-ui-toolbar][data-size='sm'] {
|
|
48
48
|
--_gap: var(--slotted-control-gap-sm, 0.25rem);
|
|
49
49
|
--_inset: var(--slotted-space-1, 0.125rem);
|
|
50
50
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
--_inner-size: var(--slotted-control-inner-size-sm, 22px);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
[data-ui
|
|
57
|
+
[data-ui-toolbar][data-size='lg'] {
|
|
58
58
|
--_gap: var(--slotted-control-gap-lg, 0.5rem);
|
|
59
59
|
--_inset: var(--slotted-space-3, 0.375rem);
|
|
60
60
|
--_height: var(--slotted-control-height-lg, 40px);
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
* renders an empty container often, and an empty box still consumes the gap
|
|
71
71
|
* of the row that holds it.
|
|
72
72
|
*/
|
|
73
|
-
[data-ui
|
|
73
|
+
[data-ui-toolbar]:empty {
|
|
74
74
|
display: none;
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* A column stretches its controls, because a column of controls at their own
|
|
81
|
-
* natural widths is a ragged edge rather than a bar. A row
|
|
81
|
+
* natural widths is a ragged edge rather than a bar. A row centers them,
|
|
82
82
|
* because two controls of different heights in one line share a middle.
|
|
83
83
|
*/
|
|
84
|
-
[data-ui
|
|
84
|
+
[data-ui-toolbar][data-orientation='vertical'] {
|
|
85
85
|
align-items: stretch;
|
|
86
86
|
flex-direction: column;
|
|
87
87
|
inline-size: fit-content;
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
* above a table is already standing on a surface, and a second one there
|
|
95
95
|
* reads as a box nobody asked for.
|
|
96
96
|
*/
|
|
97
|
-
[data-ui
|
|
97
|
+
[data-ui-toolbar][data-variant='outline'] {
|
|
98
98
|
--_pad: max(
|
|
99
99
|
var(--_inset),
|
|
100
100
|
calc(var(--slotted-focus-ring-offset, 2px) + var(--slotted-focus-ring-width, 2px))
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
* design — its spacer exists so the first item "can wrap to the next line
|
|
122
122
|
* and get clipped".
|
|
123
123
|
*/
|
|
124
|
-
[data-ui
|
|
124
|
+
[data-ui-toolbar]:is([data-overflow='scroll'], [data-overflow='menu']) {
|
|
125
125
|
/**
|
|
126
126
|
* A scroll container clips at its padding edge whether or not a scrollbar
|
|
127
127
|
* is drawn, and a control's focus ring is drawn outward. The bar therefore
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
scrollbar-width: thin;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
[data-ui
|
|
142
|
+
[data-ui-toolbar]:is(
|
|
143
143
|
[data-overflow='scroll'],
|
|
144
144
|
[data-overflow='menu']
|
|
145
145
|
)[data-orientation='vertical'] {
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
* gets instead — and the collapse would then measure a control at a width it
|
|
156
156
|
* only has while it is being squeezed.
|
|
157
157
|
*/
|
|
158
|
-
[data-ui
|
|
158
|
+
[data-ui-toolbar]:is([data-overflow='scroll'], [data-overflow='menu']) > * {
|
|
159
159
|
flex: none;
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -171,13 +171,13 @@
|
|
|
171
171
|
* It paints nothing. Everything a reader sees inside it belongs to the
|
|
172
172
|
* control the consumer placed.
|
|
173
173
|
*/
|
|
174
|
-
[data-ui
|
|
174
|
+
[data-ui-toolbar] [data-part-item] {
|
|
175
175
|
align-items: center;
|
|
176
176
|
display: inline-flex;
|
|
177
177
|
min-inline-size: 0;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
[data-ui
|
|
180
|
+
[data-ui-toolbar][data-orientation='vertical'] [data-part-item] {
|
|
181
181
|
align-items: stretch;
|
|
182
182
|
flex-direction: column;
|
|
183
183
|
}
|
|
@@ -189,13 +189,8 @@
|
|
|
189
189
|
* without this rule every collapsed unit stayed on the bar and the collapse
|
|
190
190
|
* did nothing at all.
|
|
191
191
|
*/
|
|
192
|
-
[data-ui
|
|
193
|
-
:is(
|
|
194
|
-
[data-part='item'],
|
|
195
|
-
[data-part='group'],
|
|
196
|
-
[data-part='separator'],
|
|
197
|
-
[data-part='overflow']
|
|
198
|
-
)[hidden] {
|
|
192
|
+
[data-ui-toolbar]
|
|
193
|
+
:is([data-part-item], [data-part-group], [data-part-separator], [data-part-overflow])[hidden] {
|
|
199
194
|
display: none;
|
|
200
195
|
}
|
|
201
196
|
|
|
@@ -210,13 +205,13 @@
|
|
|
210
205
|
* `docs/token-foundation.md` — and the two quantities that exception needed
|
|
211
206
|
* here are what closed it: a type step of one and a half to stop three dots
|
|
212
207
|
* reading as specks, and a lift of half an x-height to get them off their own
|
|
213
|
-
* baseline and onto the middle of the control. A glyph is
|
|
208
|
+
* baseline and onto the middle of the control. A glyph is centerd in its box
|
|
214
209
|
* by construction and sized by the same scale as every other mark on the bar.
|
|
215
210
|
*
|
|
216
211
|
* Its accessible name carries the count, so what a reader hears is a number
|
|
217
212
|
* rather than three dots.
|
|
218
213
|
*/
|
|
219
|
-
[data-ui
|
|
214
|
+
[data-ui-toolbar] [data-part-overflow] {
|
|
220
215
|
--slotted-icon-size: var(--_icon-size);
|
|
221
216
|
|
|
222
217
|
align-items: center;
|
|
@@ -249,14 +244,14 @@
|
|
|
249
244
|
}
|
|
250
245
|
|
|
251
246
|
/* The ground moves under the pointer and nothing else does (R2). */
|
|
252
|
-
[data-ui
|
|
247
|
+
[data-ui-toolbar] [data-part-overflow]:not(:disabled):hover {
|
|
253
248
|
background-color: var(
|
|
254
249
|
--slotted-toolbar-overflow-hover-background,
|
|
255
250
|
var(--slotted-tone-secondary-subtle-hover)
|
|
256
251
|
);
|
|
257
252
|
}
|
|
258
253
|
|
|
259
|
-
[data-ui
|
|
254
|
+
[data-ui-toolbar] [data-part-overflow]:not(:disabled):active {
|
|
260
255
|
background-color: var(
|
|
261
256
|
--slotted-toolbar-overflow-active-background,
|
|
262
257
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -268,7 +263,7 @@
|
|
|
268
263
|
* reader who moved the pointer off the trigger loses every sign of which
|
|
269
264
|
* control the layer belongs to.
|
|
270
265
|
*/
|
|
271
|
-
[data-ui
|
|
266
|
+
[data-ui-toolbar] [data-part-overflow][data-open] {
|
|
272
267
|
background-color: var(
|
|
273
268
|
--slotted-toolbar-overflow-open-background,
|
|
274
269
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -286,13 +281,13 @@
|
|
|
286
281
|
it are, and square: one value for both axes, so a bar taller than the
|
|
287
282
|
comfortable target does not stand it on end. */
|
|
288
283
|
@media (pointer: coarse) {
|
|
289
|
-
[data-ui
|
|
284
|
+
[data-ui-toolbar] [data-part-overflow] {
|
|
290
285
|
min-block-size: max(var(--slotted-target-comfortable, 44px), var(--_height));
|
|
291
286
|
min-inline-size: max(var(--slotted-target-comfortable, 44px), var(--_height));
|
|
292
287
|
}
|
|
293
288
|
}
|
|
294
289
|
|
|
295
|
-
[data-ui
|
|
290
|
+
[data-ui-toolbar] [data-part-overflow]:disabled {
|
|
296
291
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
297
292
|
cursor: default;
|
|
298
293
|
}
|
|
@@ -302,7 +297,7 @@
|
|
|
302
297
|
* edge, and the trigger is the control closest to it, so an outward ring here
|
|
303
298
|
* is the one this family cannot afford.
|
|
304
299
|
*/
|
|
305
|
-
[data-ui
|
|
300
|
+
[data-ui-toolbar] [data-part-overflow]:focus-visible {
|
|
306
301
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
307
302
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
308
303
|
}
|
|
@@ -321,7 +316,7 @@
|
|
|
321
316
|
* puts the clusters of a loosely spaced bar closer together than the
|
|
322
317
|
* controls inside them.
|
|
323
318
|
*/
|
|
324
|
-
[data-ui
|
|
319
|
+
[data-ui-toolbar] [data-part-group] {
|
|
325
320
|
align-items: center;
|
|
326
321
|
display: flex;
|
|
327
322
|
flex-wrap: inherit;
|
|
@@ -329,25 +324,25 @@
|
|
|
329
324
|
min-inline-size: 0;
|
|
330
325
|
}
|
|
331
326
|
|
|
332
|
-
[data-ui
|
|
327
|
+
[data-ui-toolbar][data-orientation='vertical'] [data-part-group] {
|
|
333
328
|
align-items: stretch;
|
|
334
329
|
flex-direction: column;
|
|
335
330
|
}
|
|
336
331
|
|
|
337
|
-
[data-ui
|
|
332
|
+
[data-ui-toolbar] [data-part-group]:not(:first-child) {
|
|
338
333
|
margin-inline-start: calc(var(--_gap) / 2);
|
|
339
334
|
}
|
|
340
335
|
|
|
341
|
-
[data-ui
|
|
336
|
+
[data-ui-toolbar] [data-part-group]:not(:last-child) {
|
|
342
337
|
margin-inline-end: calc(var(--_gap) / 2);
|
|
343
338
|
}
|
|
344
339
|
|
|
345
|
-
[data-ui
|
|
340
|
+
[data-ui-toolbar][data-orientation='vertical'] [data-part-group]:not(:first-child) {
|
|
346
341
|
margin-block-start: calc(var(--_gap) / 2);
|
|
347
342
|
margin-inline-start: 0;
|
|
348
343
|
}
|
|
349
344
|
|
|
350
|
-
[data-ui
|
|
345
|
+
[data-ui-toolbar][data-orientation='vertical'] [data-part-group]:not(:last-child) {
|
|
351
346
|
margin-block-end: calc(var(--_gap) / 2);
|
|
352
347
|
margin-inline-end: 0;
|
|
353
348
|
}
|
|
@@ -365,7 +360,7 @@
|
|
|
365
360
|
* It is one border width. A thick rule in a bar of hairlines is not a
|
|
366
361
|
* stronger boundary, it is a slab.
|
|
367
362
|
*/
|
|
368
|
-
[data-ui
|
|
363
|
+
[data-ui-toolbar] [data-part-separator] {
|
|
369
364
|
align-self: stretch;
|
|
370
365
|
/**
|
|
371
366
|
* The control edge rather than the subtle rule `divider` reaches for: this
|
|
@@ -391,7 +386,7 @@
|
|
|
391
386
|
min-block-size: calc(var(--_height) - 2 * var(--_separator-inset));
|
|
392
387
|
}
|
|
393
388
|
|
|
394
|
-
[data-ui
|
|
389
|
+
[data-ui-toolbar][data-orientation='vertical'] [data-part-separator] {
|
|
395
390
|
block-size: var(--slotted-border-width-thin, 1px);
|
|
396
391
|
inline-size: auto;
|
|
397
392
|
margin-block: calc(var(--_gap) / 2);
|
|
@@ -400,12 +395,12 @@
|
|
|
400
395
|
}
|
|
401
396
|
|
|
402
397
|
/**
|
|
403
|
-
* Forced
|
|
398
|
+
* Forced colors flatten a background to `Canvas`, and a rule painted with
|
|
404
399
|
* one disappears with it. The separator is a background rather than a border,
|
|
405
400
|
* so keeping the paint is the only way the boundary is still there to read.
|
|
406
401
|
*/
|
|
407
402
|
@media (forced-colors: active) {
|
|
408
|
-
[data-ui
|
|
403
|
+
[data-ui-toolbar] [data-part-separator] {
|
|
409
404
|
background-color: CanvasText;
|
|
410
405
|
forced-color-adjust: none;
|
|
411
406
|
}
|
|
@@ -426,7 +421,7 @@
|
|
|
426
421
|
* afterwards, so a zero-width spacer moves what follows to the end of its own
|
|
427
422
|
* line and pushes nothing onto the next one.
|
|
428
423
|
*/
|
|
429
|
-
[data-ui
|
|
424
|
+
[data-ui-toolbar] [data-part-spacer] {
|
|
430
425
|
flex: 1 1 0;
|
|
431
426
|
min-block-size: 0;
|
|
432
427
|
min-inline-size: 0;
|