@slotted/styles 0.1.0-beta.2 → 0.1.0-beta.21
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 +1 -1
- package/src/accordion/accordion.css +10 -10
- package/src/action-bar/action-bar.css +45 -42
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +68 -67
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +452 -314
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +71 -41
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +45 -37
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +149 -68
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +79 -74
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +133 -103
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +154 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +258 -248
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +119 -124
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +81 -85
- package/src/collapsible/collapsible.css +72 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +157 -124
- package/src/combobox/combobox.tokens.json +2 -0
- package/src/command-palette/command-palette.css +103 -90
- package/src/command-palette/command-palette.tokens.json +1 -0
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +212 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +184 -114
- package/src/data-grid/data-grid.css +535 -470
- package/src/data-grid/data-grid.tokens.json +4 -0
- package/src/data-list/data-list.css +81 -70
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +57 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +75 -57
- package/src/date-picker/date-picker.tokens.json +1 -0
- package/src/date-range-picker/date-range-picker.css +116 -118
- package/src/datetime-field/datetime-field.css +80 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +63 -63
- package/src/datetime-range-picker/datetime-range-picker.css +151 -156
- package/src/description-list/description-list.css +80 -65
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +376 -153
- package/src/dialog/dialog.tokens.json +6 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +513 -217
- package/src/drawer/drawer.tokens.json +6 -0
- package/src/entity-picker/entity-picker.css +273 -256
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- package/src/event-calendar/event-calendar.css +343 -385
- package/src/field/field.css +74 -78
- package/src/field-group/field-group.css +22 -25
- package/src/filter-bar/filter-bar.css +193 -209
- package/src/form/form.css +34 -24
- package/src/form/form.tokens.json +1 -0
- package/src/fullscreen/fullscreen.css +24 -25
- package/src/grid/grid.css +28 -28
- package/src/highlight/highlight.css +6 -6
- package/src/hover-card/hover-card.css +6 -6
- package/src/icon/icon.css +62 -15
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +39 -39
- package/src/import-export-center/import-export-center.css +135 -156
- package/src/inline/inline.css +27 -27
- package/src/inline-message/inline-message.css +153 -77
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +48 -36
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +36 -15
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +44 -17
- package/src/list/list.tokens.json +4 -0
- package/src/list-item/list-item.css +80 -66
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +56 -59
- package/src/loading-overlay/loading-overlay.css +75 -92
- package/src/markdown/markdown.css +17 -17
- package/src/menu/menu.css +117 -74
- package/src/menu/menu.tokens.json +1 -0
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +192 -202
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +177 -160
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +140 -148
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +83 -83
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +67 -57
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +39 -23
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +339 -284
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +73 -61
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +169 -113
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +251 -104
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +136 -132
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +74 -77
- package/src/runtime-properties.mjs +2 -0
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +39 -32
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +254 -97
- package/src/segmented-control/segmented-control.tokens.json +15 -11
- package/src/select/select.css +153 -132
- package/src/select/select.tokens.json +2 -0
- package/src/side-navigation/side-navigation.css +179 -182
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +62 -40
- 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 +30 -31
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +380 -241
- package/src/stat-card/stat-card.tokens.json +5 -0
- package/src/status-indicator/status-indicator.css +107 -82
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +340 -175
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +57 -56
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +322 -289
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +91 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +147 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +134 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +33 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +74 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +58 -58
- package/src/time-range-picker/time-range-picker.css +128 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +115 -98
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +62 -25
- package/src/toggle/toggle.tokens.json +8 -0
- package/src/toggle-group/toggle-group.css +106 -60
- package/src/toggle-group/toggle-group.tokens.json +10 -0
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +59 -38
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +40 -36
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
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
|
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
* natural widths is a ragged edge rather than a bar. A row centres 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
|
|
|
@@ -216,7 +211,7 @@
|
|
|
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);
|
|
@@ -405,7 +400,7 @@
|
|
|
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;
|
package/src/tooltip/tooltip.css
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* answered in logical properties without mirroring in the wrong direction.
|
|
33
33
|
* Symmetric padding answers every side at once.
|
|
34
34
|
*/
|
|
35
|
-
[data-ui
|
|
35
|
+
[data-ui-tooltip] {
|
|
36
36
|
/**
|
|
37
37
|
* The distance between the trigger and the painted surface, and the band
|
|
38
38
|
* the arrow stands in. A consumer who raises `sideOffset` past it leaves
|
|
@@ -124,7 +124,6 @@
|
|
|
124
124
|
*/
|
|
125
125
|
pointer-events: none;
|
|
126
126
|
|
|
127
|
-
opacity: 0;
|
|
128
127
|
/**
|
|
129
128
|
* R7: the layer arrives along the axis it opens on — from one space step
|
|
130
129
|
* above its place when it opens downward, from one step below when it
|
|
@@ -134,17 +133,15 @@
|
|
|
134
133
|
*/
|
|
135
134
|
--_enter-distance: var(--slotted-space-2, 0.25rem);
|
|
136
135
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
137
|
-
transition:
|
|
138
|
-
opacity var(--slotted-duration-short) var(--slotted-easing-exit),
|
|
139
|
-
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
136
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
140
137
|
}
|
|
141
138
|
|
|
142
|
-
[data-ui
|
|
139
|
+
[data-ui-tooltip][data-side='top'] {
|
|
143
140
|
translate: 0 var(--_enter-distance);
|
|
144
141
|
}
|
|
145
142
|
|
|
146
143
|
/* A lateral side has no block direction to arrive from, so it only fades. */
|
|
147
|
-
[data-ui
|
|
144
|
+
[data-ui-tooltip]:is([data-side='left'], [data-side='right']) {
|
|
148
145
|
translate: 0 0;
|
|
149
146
|
}
|
|
150
147
|
|
|
@@ -162,8 +159,7 @@
|
|
|
162
159
|
* A keyframe states where it starts. The exit stays a transition: it
|
|
163
160
|
* leaves from wherever the layer is, on the closed rule's durations.
|
|
164
161
|
*/
|
|
165
|
-
[data-ui
|
|
166
|
-
opacity: 1;
|
|
162
|
+
[data-ui-tooltip][data-open] {
|
|
167
163
|
translate: 0 0;
|
|
168
164
|
transition: none;
|
|
169
165
|
}
|
|
@@ -173,28 +169,22 @@
|
|
|
173
169
|
* with the side, and a layer written open in static markup — the harness,
|
|
174
170
|
* a docs snippet — is simply there, and is photographed where it stands.
|
|
175
171
|
*/
|
|
176
|
-
[data-ui
|
|
172
|
+
[data-ui-tooltip][data-open][data-positioned] {
|
|
177
173
|
animation: slotted-tooltip-enter-down var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
178
174
|
}
|
|
179
175
|
|
|
180
|
-
[data-ui
|
|
176
|
+
[data-ui-tooltip][data-open][data-positioned][data-side='top'] {
|
|
181
177
|
animation-name: slotted-tooltip-enter-up;
|
|
182
178
|
}
|
|
183
179
|
|
|
184
|
-
[data-ui='tooltip'][data-open][data-positioned]:is([data-side='left'], [data-side='right']) {
|
|
185
|
-
animation-name: slotted-tooltip-fade;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
180
|
@keyframes slotted-tooltip-enter-down {
|
|
189
181
|
from {
|
|
190
|
-
opacity: 0;
|
|
191
182
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
192
183
|
}
|
|
193
184
|
}
|
|
194
185
|
|
|
195
186
|
@keyframes slotted-tooltip-enter-up {
|
|
196
187
|
from {
|
|
197
|
-
opacity: 0;
|
|
198
188
|
translate: 0 var(--_enter-distance);
|
|
199
189
|
}
|
|
200
190
|
}
|
|
@@ -205,25 +195,46 @@
|
|
|
205
195
|
}
|
|
206
196
|
}
|
|
207
197
|
|
|
198
|
+
/**
|
|
199
|
+
* The fade belongs to the part that paints the surface, and the layer only
|
|
200
|
+
* moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
|
|
201
|
+
* of what it holds, so a `backdrop-filter` on the content blurs nothing until
|
|
202
|
+
* the layer is opaque and then appears at once. The content's own opacity
|
|
203
|
+
* leaves its own filter drawn on every frame of the motion.
|
|
204
|
+
*/
|
|
205
|
+
[data-ui-tooltip] > [data-part-content] {
|
|
206
|
+
opacity: 0;
|
|
207
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
[data-ui-tooltip][data-open] > [data-part-content] {
|
|
211
|
+
opacity: 1;
|
|
212
|
+
transition: none;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
[data-ui-tooltip][data-open][data-positioned] > [data-part-content] {
|
|
216
|
+
animation: slotted-tooltip-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
217
|
+
}
|
|
218
|
+
|
|
208
219
|
/* Stillness keeps the fade and drops the movement (R7). */
|
|
209
220
|
@media (prefers-reduced-motion: reduce) {
|
|
210
|
-
[data-ui
|
|
211
|
-
[data-ui
|
|
212
|
-
[data-ui
|
|
213
|
-
[data-ui
|
|
221
|
+
[data-ui-tooltip],
|
|
222
|
+
[data-ui-tooltip][data-side='top'],
|
|
223
|
+
[data-ui-tooltip][data-side='left'],
|
|
224
|
+
[data-ui-tooltip][data-side='right'] {
|
|
214
225
|
translate: 0 0;
|
|
215
|
-
transition:
|
|
226
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
216
227
|
}
|
|
217
228
|
|
|
218
|
-
[data-ui
|
|
219
|
-
[data-ui
|
|
220
|
-
[data-ui
|
|
221
|
-
[data-ui
|
|
222
|
-
animation-name:
|
|
229
|
+
[data-ui-tooltip][data-open][data-positioned],
|
|
230
|
+
[data-ui-tooltip][data-open][data-positioned][data-side='top'],
|
|
231
|
+
[data-ui-tooltip][data-open][data-positioned][data-side='left'],
|
|
232
|
+
[data-ui-tooltip][data-open][data-positioned][data-side='right'] {
|
|
233
|
+
animation-name: none;
|
|
223
234
|
}
|
|
224
235
|
}
|
|
225
236
|
|
|
226
|
-
[data-ui
|
|
237
|
+
[data-ui-tooltip][data-open][data-hoverable] {
|
|
227
238
|
pointer-events: auto;
|
|
228
239
|
}
|
|
229
240
|
|
|
@@ -232,11 +243,11 @@
|
|
|
232
243
|
* `hideWhenDetached`: the layer comes back when the anchor does, and nothing
|
|
233
244
|
* has moved the consumer's own `open` because a rectangle changed size.
|
|
234
245
|
*/
|
|
235
|
-
[data-ui
|
|
246
|
+
[data-ui-tooltip][data-detached] {
|
|
236
247
|
visibility: hidden;
|
|
237
248
|
}
|
|
238
249
|
|
|
239
|
-
[data-ui
|
|
250
|
+
[data-ui-tooltip][data-size='sm'] {
|
|
240
251
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
241
252
|
--_padding-block: var(--slotted-control-gap-sm, 0.375rem);
|
|
242
253
|
--_font-size: var(--slotted-control-font-size-sm, 0.75rem);
|
|
@@ -248,14 +259,14 @@
|
|
|
248
259
|
* want to read as a small panel rather than as a label. It takes the raised
|
|
249
260
|
* surface and the edge that surface needs to separate from the page.
|
|
250
261
|
*/
|
|
251
|
-
[data-ui
|
|
262
|
+
[data-ui-tooltip][data-variant='surface'] {
|
|
252
263
|
--_surface: var(--slotted-tooltip-surface-raised, var(--slotted-surface-raised, #ffffff));
|
|
253
264
|
--_text: var(--slotted-tooltip-text-raised, var(--slotted-text, #0f172a));
|
|
254
265
|
--_border-color: var(--slotted-tooltip-border-color, var(--slotted-border-subtle, #e2e8f0));
|
|
255
266
|
--_border-width: var(--slotted-border-width-thin, 1px);
|
|
256
267
|
}
|
|
257
268
|
|
|
258
|
-
[data-ui
|
|
269
|
+
[data-ui-tooltip] > [data-part-content] {
|
|
259
270
|
box-sizing: border-box;
|
|
260
271
|
display: block;
|
|
261
272
|
max-inline-size: 100%;
|
|
@@ -291,6 +302,16 @@
|
|
|
291
302
|
*/
|
|
292
303
|
overflow-wrap: anywhere;
|
|
293
304
|
unicode-bidi: plaintext;
|
|
305
|
+
/* A theme that paints this surface as a translucent material blurs what moves behind it. */
|
|
306
|
+
-webkit-backdrop-filter: var(--slotted-tooltip-backdrop-filter, none);
|
|
307
|
+
backdrop-filter: var(--slotted-tooltip-backdrop-filter, none);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
311
|
+
[data-ui-tooltip] > [data-part-content] {
|
|
312
|
+
-webkit-backdrop-filter: none;
|
|
313
|
+
backdrop-filter: none;
|
|
314
|
+
}
|
|
294
315
|
}
|
|
295
316
|
|
|
296
317
|
/**
|
|
@@ -304,7 +325,7 @@
|
|
|
304
325
|
* the reader's writing direction. Mirroring either would move an already
|
|
305
326
|
* correct arrow to the wrong edge in a right-to-left document, so
|
|
306
327
|
* `packages/styles/src/logical.test.mjs` exempts exactly the rules that
|
|
307
|
-
* select `[data-part
|
|
328
|
+
* select `[data-part-arrow]`, and nothing else.
|
|
308
329
|
*
|
|
309
330
|
* ── Why it is painted over the surface and not behind it ─────────────
|
|
310
331
|
*
|
|
@@ -320,7 +341,7 @@
|
|
|
320
341
|
* `arrowPadding` keeps it clear of the corners, where the content's radius
|
|
321
342
|
* would leave the base uncovered.
|
|
322
343
|
*/
|
|
323
|
-
[data-ui
|
|
344
|
+
[data-ui-tooltip] > [data-part-arrow] {
|
|
324
345
|
position: absolute;
|
|
325
346
|
z-index: 1;
|
|
326
347
|
inline-size: var(--_arrow-size);
|
|
@@ -330,7 +351,7 @@
|
|
|
330
351
|
border: 0 solid var(--_border-color);
|
|
331
352
|
}
|
|
332
353
|
|
|
333
|
-
[data-ui
|
|
354
|
+
[data-ui-tooltip][data-side='top'] > [data-part-arrow] {
|
|
334
355
|
left: var(--slotted-positioner-arrow-x, 0);
|
|
335
356
|
top: auto;
|
|
336
357
|
bottom: calc(var(--_gap) - var(--_arrow-size) / 2);
|
|
@@ -339,7 +360,7 @@
|
|
|
339
360
|
border-bottom-right-radius: var(--_arrow-tip-radius);
|
|
340
361
|
}
|
|
341
362
|
|
|
342
|
-
[data-ui
|
|
363
|
+
[data-ui-tooltip][data-side='bottom'] > [data-part-arrow] {
|
|
343
364
|
left: var(--slotted-positioner-arrow-x, 0);
|
|
344
365
|
top: calc(var(--_gap) - var(--_arrow-size) / 2);
|
|
345
366
|
bottom: auto;
|
|
@@ -348,7 +369,7 @@
|
|
|
348
369
|
border-top-left-radius: var(--_arrow-tip-radius);
|
|
349
370
|
}
|
|
350
371
|
|
|
351
|
-
[data-ui
|
|
372
|
+
[data-ui-tooltip][data-side='left'] > [data-part-arrow] {
|
|
352
373
|
top: var(--slotted-positioner-arrow-y, 0);
|
|
353
374
|
left: auto;
|
|
354
375
|
right: calc(var(--_gap) - var(--_arrow-size) / 2);
|
|
@@ -357,7 +378,7 @@
|
|
|
357
378
|
border-top-right-radius: var(--_arrow-tip-radius);
|
|
358
379
|
}
|
|
359
380
|
|
|
360
|
-
[data-ui
|
|
381
|
+
[data-ui-tooltip][data-side='right'] > [data-part-arrow] {
|
|
361
382
|
top: var(--slotted-positioner-arrow-y, 0);
|
|
362
383
|
left: calc(var(--_gap) - var(--_arrow-size) / 2);
|
|
363
384
|
right: auto;
|