@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40
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 +21 -1
- package/src/accordion/accordion.css +31 -13
- package/src/accordion/accordion.tokens.json +2 -0
- 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 +472 -342
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +24 -23
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +97 -67
- package/src/avatar/avatar.tokens.json +8 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +58 -47
- package/src/badge/badge.tokens.json +6 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +408 -93
- package/src/button/button.tokens.json +13 -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 +594 -267
- package/src/calendar/calendar.tokens.json +35 -3
- package/src/card/card.css +133 -70
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +174 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +300 -271
- package/src/chart/chart.tokens.json +5 -0
- package/src/checkbox/checkbox.css +190 -148
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +273 -85
- package/src/collapsible/collapsible.tokens.json +6 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +219 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +214 -102
- package/src/command-palette/command-palette.tokens.json +4 -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 +231 -115
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +637 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +93 -76
- 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 +31 -269
- package/src/date-picker/date-picker.tokens.json +1 -21
- package/src/date-range-picker/date-range-picker.css +72 -528
- package/src/date-range-picker/date-range-picker.tokens.json +1 -37
- 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 +49 -711
- package/src/datetime-picker/datetime-picker.tokens.json +1 -50
- package/src/datetime-range-picker/datetime-range-picker.css +60 -985
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
- package/src/description-list/description-list.css +120 -76
- 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 +462 -199
- package/src/dialog/dialog.tokens.json +10 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +736 -237
- package/src/drawer/drawer.tokens.json +15 -0
- package/src/entity-picker/entity-picker.css +402 -272
- package/src/entity-picker/entity-picker.tokens.json +6 -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 +58 -38
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +224 -216
- package/src/floating-panel/floating-panel.css +147 -0
- package/src/floating-panel/floating-panel.tokens.json +32 -0
- package/src/form/form.css +103 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +32 -31
- 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 +29 -29
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +5 -0
- package/src/kbd/kbd.css +63 -51
- package/src/kbd/kbd.tokens.json +4 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +55 -24
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +195 -80
- package/src/list-item/list-item.tokens.json +10 -0
- package/src/listbox/listbox.css +121 -72
- package/src/listbox/listbox.tokens.json +6 -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 +1296 -1243
- package/src/message/message.tokens.json +14 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +246 -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 +109 -31
- package/src/page/page.tokens.json +8 -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/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +194 -137
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +274 -116
- 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 +147 -143
- package/src/rating/rating.tokens.json +2 -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 +44 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +311 -46
- package/src/section/section.tokens.json +13 -1
- package/src/segmented-control/segmented-control.css +221 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +226 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +204 -201
- package/src/side-navigation/side-navigation.tokens.json +2 -0
- package/src/skeleton/skeleton.css +76 -58
- package/src/slider/slider.css +108 -104
- package/src/slider/slider.tokens.json +1 -0
- 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 +26 -26
- package/src/stat-card/stat-card.css +420 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +126 -101
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +143 -125
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +653 -222
- package/src/table/table.tokens.json +10 -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 +113 -89
- package/src/tag/tag.tokens.json +11 -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 +30 -519
- package/src/time-picker/time-picker.tokens.json +1 -38
- package/src/time-range-picker/time-range-picker.css +53 -895
- package/src/time-range-picker/time-range-picker.tokens.json +1 -66
- 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 +49 -40
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +95 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +253 -269
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- 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 +118 -122
- package/src/typography/typography.css +67 -38
- package/src/typography/typography.tokens.json +2 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* itself;
|
|
40
40
|
* - only focus is raised.
|
|
41
41
|
*/
|
|
42
|
-
[data-ui
|
|
42
|
+
[data-ui-split-button][data-part-root] {
|
|
43
43
|
--_radius: var(--slotted-split-button-radius, var(--slotted-control-radius, 4px));
|
|
44
44
|
--_overlap: calc(-1 * var(--slotted-control-border-width, 1px));
|
|
45
45
|
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
* label wrap inside its own control, which is `button`'s rule.
|
|
58
58
|
*/
|
|
59
59
|
min-inline-size: 0;
|
|
60
|
-
/* A control written inside a sentence sits on the text's
|
|
60
|
+
/* A control written inside a sentence sits on the text's center. */
|
|
61
61
|
vertical-align: middle;
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -68,19 +68,19 @@
|
|
|
68
68
|
* square from the control height and stays so, because a wide chevron is a
|
|
69
69
|
* second button nobody asked for.
|
|
70
70
|
*/
|
|
71
|
-
[data-ui
|
|
71
|
+
[data-ui-split-button][data-part-root][data-full-width] {
|
|
72
72
|
display: flex;
|
|
73
73
|
inline-size: 100%;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
[data-ui
|
|
76
|
+
[data-ui-split-button][data-part-root][data-full-width] > [data-part-primary] {
|
|
77
77
|
flex: 1 1 0;
|
|
78
78
|
min-inline-size: 0;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/* ── The shape ────────────────────────────────────────────────────────── */
|
|
82
82
|
|
|
83
|
-
[data-ui
|
|
83
|
+
[data-ui-split-button][data-part-root] > [data-part-primary] {
|
|
84
84
|
border-end-end-radius: 0;
|
|
85
85
|
border-end-start-radius: var(--_radius);
|
|
86
86
|
border-start-end-radius: 0;
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
min-inline-size: 0;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
[data-ui
|
|
93
|
+
[data-ui-split-button][data-part-root] > [data-part-menu-trigger] {
|
|
94
94
|
border-end-end-radius: var(--_radius);
|
|
95
95
|
border-end-start-radius: 0;
|
|
96
96
|
border-start-end-radius: var(--_radius);
|
|
@@ -113,19 +113,15 @@
|
|
|
113
113
|
* `button-group` records: the rule has to outrank every border rule `button`
|
|
114
114
|
* writes for the same control whatever order the two sheets load in.
|
|
115
115
|
*/
|
|
116
|
-
[data-ui
|
|
117
|
-
|
|
118
|
-
[data-ui
|
|
119
|
-
> [data-ui='button'][data-variant='outline'][data-disabled],
|
|
120
|
-
[data-ui='split-button'][data-part='root'] > [data-ui='button'][data-variant='outline']:disabled {
|
|
116
|
+
[data-ui-split-button][data-part-root] > [data-ui-button][data-variant='outline'][data-pressed],
|
|
117
|
+
[data-ui-split-button][data-part-root] > [data-ui-button][data-variant='outline'][data-disabled],
|
|
118
|
+
[data-ui-split-button][data-part-root] > [data-ui-button][data-variant='outline']:disabled {
|
|
121
119
|
border-color: var(--slotted-control-border-color, ButtonBorder);
|
|
122
120
|
}
|
|
123
121
|
|
|
124
|
-
[data-ui
|
|
125
|
-
|
|
126
|
-
[data-ui
|
|
127
|
-
> [data-ui='button'][data-variant='ghost'][data-disabled],
|
|
128
|
-
[data-ui='split-button'][data-part='root'] > [data-ui='button'][data-variant='ghost']:disabled {
|
|
122
|
+
[data-ui-split-button][data-part-root] > [data-ui-button][data-variant='ghost'][data-pressed],
|
|
123
|
+
[data-ui-split-button][data-part-root] > [data-ui-button][data-variant='ghost'][data-disabled],
|
|
124
|
+
[data-ui-split-button][data-part-root] > [data-ui-button][data-variant='ghost']:disabled {
|
|
129
125
|
border-color: transparent;
|
|
130
126
|
}
|
|
131
127
|
|
|
@@ -136,8 +132,7 @@
|
|
|
136
132
|
* narrowed, because a narrower border box would move its label by half a
|
|
137
133
|
* pixel — and the trigger's leading edge is the one seen.
|
|
138
134
|
*/
|
|
139
|
-
[data-ui
|
|
140
|
-
> [data-ui='button'][data-part='primary'][data-variant] {
|
|
135
|
+
[data-ui-split-button][data-part-root] > [data-ui-button][data-part-primary][data-variant] {
|
|
141
136
|
border-inline-end-color: transparent;
|
|
142
137
|
}
|
|
143
138
|
|
|
@@ -153,28 +148,32 @@
|
|
|
153
148
|
* one. It is painted on the trigger's leading edge, the one edge the rule
|
|
154
149
|
* above leaves in the column.
|
|
155
150
|
*/
|
|
156
|
-
[data-ui
|
|
151
|
+
[data-ui-split-button][data-part-root] > [data-tone='accent'] {
|
|
157
152
|
--_seam: var(--slotted-tone-accent-solid-active);
|
|
158
153
|
}
|
|
159
154
|
|
|
160
|
-
[data-ui
|
|
155
|
+
[data-ui-split-button][data-part-root] > [data-tone='secondary'] {
|
|
161
156
|
--_seam: var(--slotted-tone-secondary-solid-active);
|
|
162
157
|
}
|
|
163
158
|
|
|
164
|
-
[data-ui
|
|
159
|
+
[data-ui-split-button][data-part-root] > [data-tone='success'] {
|
|
165
160
|
--_seam: var(--slotted-tone-success-solid-active);
|
|
166
161
|
}
|
|
167
162
|
|
|
168
|
-
[data-ui
|
|
163
|
+
[data-ui-split-button][data-part-root] > [data-tone='info'] {
|
|
164
|
+
--_seam: var(--slotted-tone-info-solid-active);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
[data-ui-split-button][data-part-root] > [data-tone='warning'] {
|
|
169
168
|
--_seam: var(--slotted-tone-warning-solid-active);
|
|
170
169
|
}
|
|
171
170
|
|
|
172
|
-
[data-ui
|
|
171
|
+
[data-ui-split-button][data-part-root] > [data-tone='danger'] {
|
|
173
172
|
--_seam: var(--slotted-tone-danger-solid-active);
|
|
174
173
|
}
|
|
175
174
|
|
|
176
|
-
[data-ui
|
|
177
|
-
> [data-ui
|
|
175
|
+
[data-ui-split-button][data-part-root]
|
|
176
|
+
> [data-ui-button][data-variant='solid'][data-part-menu-trigger] {
|
|
178
177
|
border-inline-start-color: var(--_seam, ButtonBorder);
|
|
179
178
|
}
|
|
180
179
|
|
|
@@ -182,12 +181,12 @@
|
|
|
182
181
|
* A filled half that is unavailable has no darkest step to draw the seam
|
|
183
182
|
* in: `button` paints it the disabled ground inside the disabled border,
|
|
184
183
|
* and the seam takes that border so the bar reads as one unavailable
|
|
185
|
-
* control rather than as a grey one with a
|
|
184
|
+
* control rather than as a grey one with a colored line through it.
|
|
186
185
|
*/
|
|
187
|
-
[data-ui
|
|
188
|
-
> [data-ui
|
|
189
|
-
[data-ui
|
|
190
|
-
> [data-ui
|
|
186
|
+
[data-ui-split-button][data-part-root]
|
|
187
|
+
> [data-ui-button][data-variant='solid'][data-part-menu-trigger]:disabled,
|
|
188
|
+
[data-ui-split-button][data-part-root]
|
|
189
|
+
> [data-ui-button][data-variant='solid'][data-part-menu-trigger][data-disabled] {
|
|
191
190
|
border-inline-start-color: var(--slotted-disabled-border, ButtonBorder);
|
|
192
191
|
}
|
|
193
192
|
|
|
@@ -197,7 +196,7 @@
|
|
|
197
196
|
* follows it in the DOM. Hover and press repaint a fill and never an edge,
|
|
198
197
|
* so there is nothing to lift for them — `button-group`'s reading.
|
|
199
198
|
*/
|
|
200
|
-
[data-ui
|
|
199
|
+
[data-ui-split-button][data-part-root] > *:focus-visible {
|
|
201
200
|
z-index: 1;
|
|
202
201
|
}
|
|
203
202
|
|
|
@@ -208,7 +207,7 @@
|
|
|
208
207
|
* menu button keeps; not the ellipsis, which says "more" without saying
|
|
209
208
|
* what opens. It is the `chevron-down` Glyph element the binding renders in
|
|
210
209
|
* the icon part, stroked in the control's own ink, so it follows the label
|
|
211
|
-
* into hover, press, disabled, every tone's `on-solid` and forced
|
|
210
|
+
* into hover, press, disabled, every tone's `on-solid` and forced colors.
|
|
212
211
|
* `button` sizes it through the icon part; this stylesheet paints nothing.
|
|
213
212
|
*
|
|
214
213
|
* It does not turn while the menu is open. None of the six surveyed split
|
|
@@ -235,18 +234,18 @@
|
|
|
235
234
|
* send. `pointer-events: none` is also what takes hover away without a
|
|
236
235
|
* state the stylesheet would have to hold back.
|
|
237
236
|
*/
|
|
238
|
-
[data-ui
|
|
237
|
+
[data-ui-split-button][data-part-root][data-loading] > [data-part-menu-trigger] {
|
|
239
238
|
pointer-events: none;
|
|
240
239
|
}
|
|
241
240
|
|
|
242
241
|
/**
|
|
243
|
-
* Under forced
|
|
242
|
+
* Under forced colors the theme flattens every fill, so a half that is
|
|
244
243
|
* pressed has only its edge left to say so. `button` makes that edge
|
|
245
244
|
* `Highlight`; the frame rule above would have taken it away, and this
|
|
246
245
|
* puts it back — `button-group`'s rule for the same case.
|
|
247
246
|
*/
|
|
248
247
|
@media (forced-colors: active) {
|
|
249
|
-
[data-ui
|
|
248
|
+
[data-ui-split-button][data-part-root] > [data-ui-button][data-pressed] {
|
|
250
249
|
border-color: Highlight;
|
|
251
250
|
}
|
|
252
251
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"--slotted-split-button-radius",
|
|
7
7
|
"--slotted-tone-accent-solid-active",
|
|
8
8
|
"--slotted-tone-danger-solid-active",
|
|
9
|
+
"--slotted-tone-info-solid-active",
|
|
9
10
|
"--slotted-tone-secondary-solid-active",
|
|
10
11
|
"--slotted-tone-success-solid-active",
|
|
11
12
|
"--slotted-tone-warning-solid-active"
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
@layer slotted.components {
|
|
2
2
|
/**
|
|
3
3
|
* A bar between two regions the consumer owns, and nothing else. The family
|
|
4
|
-
* holds no panels
|
|
5
|
-
* section 1 — so this stylesheet paints one element and its two children and
|
|
4
|
+
* holds no panels, so this stylesheet paints one element and its two children and
|
|
6
5
|
* writes no layout at all. A separator that sized the boxes beside it would
|
|
7
6
|
* be deciding a layout it was only handed a position in.
|
|
8
7
|
*
|
|
@@ -15,10 +14,10 @@
|
|
|
15
14
|
*
|
|
16
15
|
* `touch-action: none` so a drag is not read as a scroll on the way past.
|
|
17
16
|
*/
|
|
18
|
-
[data-ui
|
|
17
|
+
[data-ui-splitter] {
|
|
19
18
|
/**
|
|
20
19
|
* The track is what the pointer sees and `--slotted-target-min` is what it
|
|
21
|
-
* gets: `::before` below is a transparent box
|
|
20
|
+
* gets: `::before` below is a transparent box centerd on the track, which
|
|
22
21
|
* is the construction `drawer`'s resizer already uses to hold the WCAG 2.2
|
|
23
22
|
* floor without widening the picture. One rem rather than the four pixels
|
|
24
23
|
* `drawer` uses, because this bar carries a grip and four pixels cannot.
|
|
@@ -65,7 +64,7 @@
|
|
|
65
64
|
--_dot: var(--slotted-space-2, 0.25rem);
|
|
66
65
|
|
|
67
66
|
/**
|
|
68
|
-
* Two steps, and the whole of the
|
|
67
|
+
* Two steps, and the whole of the color decision.
|
|
69
68
|
*
|
|
70
69
|
* `--_rest` is the **strong** border step and not the subtle one, which is
|
|
71
70
|
* a correction from the first capture: drawn in `--slotted-border-subtle`
|
|
@@ -74,11 +73,11 @@
|
|
|
74
73
|
* subtle step is for a rule inside one surface; this is the boundary
|
|
75
74
|
* between two, which is the step the foundation holds to 3:1.
|
|
76
75
|
*
|
|
77
|
-
* `--_active` is a step darker again. The
|
|
76
|
+
* `--_active` is a step darker again. The color is the smaller half of the
|
|
78
77
|
* feedback: the larger half is the lines running the whole track, which is
|
|
79
78
|
* what SAP changes and what a hand actually reads.
|
|
80
79
|
*
|
|
81
|
-
* The accent is deliberately absent from both. It is the one
|
|
80
|
+
* The accent is deliberately absent from both. It is the one color in the
|
|
82
81
|
* library that means "the keyboard is here", and the rule below spends it
|
|
83
82
|
* on `:focus-visible` alone. `drawer`'s resizer spends it on hover as well,
|
|
84
83
|
* which is the defect this family was built to correct; SAP is the only one
|
|
@@ -111,9 +110,9 @@
|
|
|
111
110
|
* `data-dragging` and rest as the same picture. Closing the gap hands those
|
|
112
111
|
* pixels to the lines, and the pair roughly doubles instead.
|
|
113
112
|
*/
|
|
114
|
-
[data-ui
|
|
115
|
-
[data-ui
|
|
116
|
-
[data-ui
|
|
113
|
+
[data-ui-splitter]:not([data-disabled]):hover,
|
|
114
|
+
[data-ui-splitter]:not([data-disabled]):focus-visible,
|
|
115
|
+
[data-ui-splitter][data-dragging] {
|
|
117
116
|
--_gap: var(--slotted-space-4, 0.5rem);
|
|
118
117
|
}
|
|
119
118
|
|
|
@@ -124,14 +123,14 @@
|
|
|
124
123
|
* other. A container that packs its children instead of stretching them
|
|
125
124
|
* would otherwise size the bar from its content.
|
|
126
125
|
*/
|
|
127
|
-
[data-ui
|
|
126
|
+
[data-ui-splitter][data-orientation='vertical'] {
|
|
128
127
|
flex-direction: column;
|
|
129
128
|
inline-size: var(--_track);
|
|
130
129
|
align-self: stretch;
|
|
131
130
|
cursor: col-resize;
|
|
132
131
|
}
|
|
133
132
|
|
|
134
|
-
[data-ui
|
|
133
|
+
[data-ui-splitter][data-orientation='horizontal'] {
|
|
135
134
|
flex-direction: row;
|
|
136
135
|
block-size: var(--_track);
|
|
137
136
|
justify-self: stretch;
|
|
@@ -139,21 +138,21 @@
|
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
/**
|
|
142
|
-
* The reach. Transparent,
|
|
141
|
+
* The reach. Transparent, centerd on the track, and the reason a sixteen-pixel
|
|
143
142
|
* picture is a twenty-four-pixel target.
|
|
144
143
|
*/
|
|
145
|
-
[data-ui
|
|
144
|
+
[data-ui-splitter]::before {
|
|
146
145
|
content: '';
|
|
147
146
|
position: absolute;
|
|
148
147
|
--_overhang: calc((var(--_reach) - var(--_track)) / -2);
|
|
149
148
|
}
|
|
150
149
|
|
|
151
|
-
[data-ui
|
|
150
|
+
[data-ui-splitter][data-orientation='vertical']::before {
|
|
152
151
|
inset-block: 0;
|
|
153
152
|
inset-inline: var(--_overhang);
|
|
154
153
|
}
|
|
155
154
|
|
|
156
|
-
[data-ui
|
|
155
|
+
[data-ui-splitter][data-orientation='horizontal']::before {
|
|
157
156
|
inset-inline: 0;
|
|
158
157
|
inset-block: var(--_overhang);
|
|
159
158
|
}
|
|
@@ -164,8 +163,8 @@
|
|
|
164
163
|
* Each fades to transparent *away* from the grip, so the pair reads as one
|
|
165
164
|
* mark with a middle rather than as two dashes. The gradient is the reason
|
|
166
165
|
* these are elements and not pseudo-elements: `packages/styles/src/fallbacks.test.mjs`
|
|
167
|
-
* forbids a system
|
|
168
|
-
*
|
|
166
|
+
* forbids a system color inside `::before` or `::after`, and the focus
|
|
167
|
+
* color's own last resort is `Highlight`.
|
|
169
168
|
*
|
|
170
169
|
* `flex-basis` carries both the resting length and the growth, because a
|
|
171
170
|
* grow factor does not animate and the extension *is* the feedback.
|
|
@@ -181,7 +180,7 @@
|
|
|
181
180
|
* A proportion leaves slack at every track length. That slack is what the
|
|
182
181
|
* hand claims.
|
|
183
182
|
*/
|
|
184
|
-
[data-ui
|
|
183
|
+
[data-ui-splitter] > [data-part-line] {
|
|
185
184
|
flex: 0 1 min(var(--_line-length), 20%);
|
|
186
185
|
min-block-size: 0;
|
|
187
186
|
min-inline-size: 0;
|
|
@@ -193,28 +192,28 @@
|
|
|
193
192
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
194
193
|
}
|
|
195
194
|
|
|
196
|
-
[data-ui
|
|
195
|
+
[data-ui-splitter][data-orientation='vertical'] > [data-part-line] {
|
|
197
196
|
inline-size: var(--_line);
|
|
198
197
|
}
|
|
199
198
|
|
|
200
|
-
[data-ui
|
|
199
|
+
[data-ui-splitter][data-orientation='horizontal'] > [data-part-line] {
|
|
201
200
|
block-size: var(--_line);
|
|
202
201
|
}
|
|
203
202
|
|
|
204
203
|
/* Solid at the grip, gone at the far end. Four rules, one per direction. */
|
|
205
|
-
[data-ui
|
|
204
|
+
[data-ui-splitter][data-orientation='vertical'] > [data-part-line]:first-child {
|
|
206
205
|
background: linear-gradient(to bottom, transparent, var(--_rest));
|
|
207
206
|
}
|
|
208
207
|
|
|
209
|
-
[data-ui
|
|
208
|
+
[data-ui-splitter][data-orientation='vertical'] > [data-part-line]:last-child {
|
|
210
209
|
background: linear-gradient(to top, transparent, var(--_rest));
|
|
211
210
|
}
|
|
212
211
|
|
|
213
|
-
[data-ui
|
|
212
|
+
[data-ui-splitter][data-orientation='horizontal'] > [data-part-line]:first-child {
|
|
214
213
|
background: linear-gradient(to right, transparent, var(--_rest));
|
|
215
214
|
}
|
|
216
215
|
|
|
217
|
-
[data-ui
|
|
216
|
+
[data-ui-splitter][data-orientation='horizontal'] > [data-part-line]:last-child {
|
|
218
217
|
background: linear-gradient(to left, transparent, var(--_rest));
|
|
219
218
|
}
|
|
220
219
|
|
|
@@ -227,9 +226,9 @@
|
|
|
227
226
|
* Hover is held back for `data-disabled`, which is the shared rule from
|
|
228
227
|
* `packages/styles/src/states.test.mjs`.
|
|
229
228
|
*/
|
|
230
|
-
[data-ui
|
|
231
|
-
[data-ui
|
|
232
|
-
[data-ui
|
|
229
|
+
[data-ui-splitter]:not([data-disabled]):hover > [data-part-line],
|
|
230
|
+
[data-ui-splitter]:not([data-disabled]):focus-visible > [data-part-line],
|
|
231
|
+
[data-ui-splitter][data-dragging] > [data-part-line] {
|
|
233
232
|
flex-basis: 100%;
|
|
234
233
|
background: var(--_active);
|
|
235
234
|
}
|
|
@@ -238,14 +237,14 @@
|
|
|
238
237
|
* The keyboard's own signal is the ring, and it is the only place the accent
|
|
239
238
|
* appears. The lines take the same step they take under the hand.
|
|
240
239
|
*
|
|
241
|
-
* They were drawn in the focus
|
|
240
|
+
* They were drawn in the focus color too, until the capture showed what that
|
|
242
241
|
* is: a two-pixel accent ring around a sixteen-pixel bar whose interior is
|
|
243
242
|
* also accent, which reads as a solid blue block rather than as a ring around
|
|
244
243
|
* a separator. The accent said the same thing twice in the same twelve
|
|
245
244
|
* pixels, and the second saying cost the first its shape.
|
|
246
245
|
*/
|
|
247
246
|
|
|
248
|
-
[data-ui
|
|
247
|
+
[data-ui-splitter]:focus-visible {
|
|
249
248
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
250
249
|
outline-offset: calc(-1 * var(--slotted-focus-ring-offset, 2px));
|
|
251
250
|
}
|
|
@@ -255,11 +254,11 @@
|
|
|
255
254
|
* and sized from the same step, so a density that retunes the space scale
|
|
256
255
|
* retunes the mark with it.
|
|
257
256
|
*
|
|
258
|
-
* `color` rather than a background
|
|
257
|
+
* `color` rather than a background color on each dot: the dots and the lines
|
|
259
258
|
* are one mark and have to move together, and `currentColor` is the one place
|
|
260
259
|
* that says so.
|
|
261
260
|
*/
|
|
262
|
-
[data-ui
|
|
261
|
+
[data-ui-splitter] > [data-part-grip] {
|
|
263
262
|
flex: none;
|
|
264
263
|
color: var(--_rest);
|
|
265
264
|
background-image: radial-gradient(circle at center, currentColor 40%, transparent 42%);
|
|
@@ -269,19 +268,19 @@
|
|
|
269
268
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
270
269
|
}
|
|
271
270
|
|
|
272
|
-
[data-ui
|
|
271
|
+
[data-ui-splitter][data-orientation='vertical'] > [data-part-grip] {
|
|
273
272
|
inline-size: calc(2 * var(--_dot));
|
|
274
273
|
block-size: calc(3 * var(--_dot));
|
|
275
274
|
}
|
|
276
275
|
|
|
277
|
-
[data-ui
|
|
276
|
+
[data-ui-splitter][data-orientation='horizontal'] > [data-part-grip] {
|
|
278
277
|
inline-size: calc(3 * var(--_dot));
|
|
279
278
|
block-size: calc(2 * var(--_dot));
|
|
280
279
|
}
|
|
281
280
|
|
|
282
|
-
[data-ui
|
|
283
|
-
[data-ui
|
|
284
|
-
[data-ui
|
|
281
|
+
[data-ui-splitter]:not([data-disabled]):hover > [data-part-grip],
|
|
282
|
+
[data-ui-splitter]:not([data-disabled]):focus-visible > [data-part-grip],
|
|
283
|
+
[data-ui-splitter][data-dragging] > [data-part-grip] {
|
|
285
284
|
color: var(--_active);
|
|
286
285
|
}
|
|
287
286
|
|
|
@@ -290,34 +289,34 @@
|
|
|
290
289
|
* separator can still read its value — so this changes the picture and the
|
|
291
290
|
* cursor and nothing about the focus.
|
|
292
291
|
*/
|
|
293
|
-
[data-ui
|
|
292
|
+
[data-ui-splitter][data-disabled] {
|
|
294
293
|
cursor: default;
|
|
295
294
|
--_rest: var(--slotted-splitter-disabled-line-color, var(--slotted-disabled-border, GrayText));
|
|
296
295
|
}
|
|
297
296
|
|
|
298
297
|
/**
|
|
299
|
-
* Forced
|
|
300
|
-
* flat system
|
|
298
|
+
* Forced colors. A gradient resolves to nothing there, so both lines take a
|
|
299
|
+
* flat system color and the growth is what is left of the feedback. The
|
|
301
300
|
* grip's gradient is replaced for the same reason.
|
|
302
301
|
*/
|
|
303
302
|
@media (forced-colors: active) {
|
|
304
|
-
[data-ui
|
|
303
|
+
[data-ui-splitter] > [data-part-line] {
|
|
305
304
|
background: ButtonBorder;
|
|
306
305
|
forced-color-adjust: none;
|
|
307
306
|
}
|
|
308
307
|
|
|
309
|
-
[data-ui
|
|
310
|
-
[data-ui
|
|
308
|
+
[data-ui-splitter]:not([data-disabled]):hover > [data-part-line],
|
|
309
|
+
[data-ui-splitter][data-dragging] > [data-part-line] {
|
|
311
310
|
background: ButtonText;
|
|
312
311
|
}
|
|
313
312
|
|
|
314
|
-
[data-ui
|
|
313
|
+
[data-ui-splitter] > [data-part-grip] {
|
|
315
314
|
background-image: none;
|
|
316
315
|
background-color: ButtonBorder;
|
|
317
316
|
}
|
|
318
317
|
|
|
319
|
-
[data-ui
|
|
320
|
-
[data-ui
|
|
318
|
+
[data-ui-splitter][data-disabled] > [data-part-line],
|
|
319
|
+
[data-ui-splitter][data-disabled] > [data-part-grip] {
|
|
321
320
|
background: GrayText;
|
|
322
321
|
}
|
|
323
322
|
}
|
|
@@ -328,8 +327,8 @@
|
|
|
328
327
|
* without travelling.
|
|
329
328
|
*/
|
|
330
329
|
@media (prefers-reduced-motion: reduce) {
|
|
331
|
-
[data-ui
|
|
332
|
-
[data-ui
|
|
330
|
+
[data-ui-splitter] > [data-part-line],
|
|
331
|
+
[data-ui-splitter] > [data-part-grip] {
|
|
333
332
|
transition-duration: var(--slotted-duration-instant);
|
|
334
333
|
}
|
|
335
334
|
}
|
package/src/stack/stack.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Stack arranges its children along the block axis and separates them by one
|
|
4
4
|
* step of the space scale. It paints nothing at all: a layout that carried a
|
|
5
|
-
*
|
|
5
|
+
* color would be a surface, and a surface is another family's decision.
|
|
6
6
|
*
|
|
7
7
|
* The separation travels through a private property because Grid needs the
|
|
8
8
|
* same value inside a track function, and the three layout families state the
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* base rule, so a nested layout can never inherit the separation of the one
|
|
11
11
|
* above it.
|
|
12
12
|
*/
|
|
13
|
-
[data-ui
|
|
13
|
+
[data-ui-stack] {
|
|
14
14
|
--_gap: var(--slotted-space-6, 1rem);
|
|
15
15
|
|
|
16
16
|
display: flex;
|
|
@@ -25,55 +25,55 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/* Separation is a step on the scale, never a length the consumer states. */
|
|
28
|
-
[data-ui
|
|
29
|
-
--_gap:
|
|
28
|
+
[data-ui-stack][data-gap='0'] {
|
|
29
|
+
--_gap: 0px;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
[data-ui
|
|
32
|
+
[data-ui-stack][data-gap='1'] {
|
|
33
33
|
--_gap: var(--slotted-space-1, 0.125rem);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
[data-ui
|
|
36
|
+
[data-ui-stack][data-gap='2'] {
|
|
37
37
|
--_gap: var(--slotted-space-2, 0.25rem);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
[data-ui
|
|
40
|
+
[data-ui-stack][data-gap='3'] {
|
|
41
41
|
--_gap: var(--slotted-space-3, 0.375rem);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
[data-ui
|
|
44
|
+
[data-ui-stack][data-gap='4'] {
|
|
45
45
|
--_gap: var(--slotted-space-4, 0.5rem);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
[data-ui
|
|
48
|
+
[data-ui-stack][data-gap='5'] {
|
|
49
49
|
--_gap: var(--slotted-space-5, 0.75rem);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
[data-ui
|
|
52
|
+
[data-ui-stack][data-gap='6'] {
|
|
53
53
|
--_gap: var(--slotted-space-6, 1rem);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
[data-ui
|
|
56
|
+
[data-ui-stack][data-gap='7'] {
|
|
57
57
|
--_gap: var(--slotted-space-7, 1.25rem);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
[data-ui
|
|
60
|
+
[data-ui-stack][data-gap='8'] {
|
|
61
61
|
--_gap: var(--slotted-space-8, 1.5rem);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
[data-ui
|
|
64
|
+
[data-ui-stack][data-gap='9'] {
|
|
65
65
|
--_gap: var(--slotted-space-9, 2rem);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
[data-ui
|
|
68
|
+
[data-ui-stack][data-gap='10'] {
|
|
69
69
|
--_gap: var(--slotted-space-10, 2.5rem);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
[data-ui
|
|
72
|
+
[data-ui-stack][data-gap='11'] {
|
|
73
73
|
--_gap: var(--slotted-space-11, 3rem);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
[data-ui
|
|
76
|
+
[data-ui-stack][data-gap='12'] {
|
|
77
77
|
--_gap: var(--slotted-space-12, 4rem);
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -82,19 +82,19 @@
|
|
|
82
82
|
* axis. The keywords are the logical ones, so a right-to-left document is the
|
|
83
83
|
* same component mirrored rather than a second stylesheet.
|
|
84
84
|
*/
|
|
85
|
-
[data-ui
|
|
85
|
+
[data-ui-stack][data-align='start'] {
|
|
86
86
|
align-items: start;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
[data-ui
|
|
89
|
+
[data-ui-stack][data-align='center'] {
|
|
90
90
|
align-items: center;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
[data-ui
|
|
93
|
+
[data-ui-stack][data-align='end'] {
|
|
94
94
|
align-items: end;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
[data-ui
|
|
97
|
+
[data-ui-stack][data-align='stretch'] {
|
|
98
98
|
align-items: stretch;
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -102,27 +102,27 @@
|
|
|
102
102
|
* `justify` positions children along the flow, which for a stack is the block
|
|
103
103
|
* axis. It moves nothing until the stack is given a block size to distribute.
|
|
104
104
|
*/
|
|
105
|
-
[data-ui
|
|
105
|
+
[data-ui-stack][data-justify='start'] {
|
|
106
106
|
justify-content: start;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
[data-ui
|
|
109
|
+
[data-ui-stack][data-justify='center'] {
|
|
110
110
|
justify-content: center;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
[data-ui
|
|
113
|
+
[data-ui-stack][data-justify='end'] {
|
|
114
114
|
justify-content: end;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
[data-ui
|
|
117
|
+
[data-ui-stack][data-justify='between'] {
|
|
118
118
|
justify-content: space-between;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
[data-ui
|
|
121
|
+
[data-ui-stack][data-justify='around'] {
|
|
122
122
|
justify-content: space-around;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
[data-ui
|
|
125
|
+
[data-ui-stack][data-justify='evenly'] {
|
|
126
126
|
justify-content: space-evenly;
|
|
127
127
|
}
|
|
128
128
|
}
|