@slotted/styles 0.1.0-beta.12 → 0.1.0-beta.13

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.
Files changed (33) hide show
  1. package/package.json +1 -1
  2. package/src/action-bar/action-bar.css +10 -0
  3. package/src/action-bar/action-bar.tokens.json +1 -0
  4. package/src/alert/alert.css +11 -13
  5. package/src/chart/chart.css +13 -9
  6. package/src/combobox/combobox.css +34 -16
  7. package/src/combobox/combobox.tokens.json +1 -0
  8. package/src/date-picker/date-picker.css +34 -16
  9. package/src/date-picker/date-picker.tokens.json +1 -0
  10. package/src/drawer/drawer.css +10 -0
  11. package/src/drawer/drawer.tokens.json +1 -0
  12. package/src/entity-picker/entity-picker.css +34 -16
  13. package/src/entity-picker/entity-picker.tokens.json +1 -0
  14. package/src/icon/icon.css +43 -0
  15. package/src/inline-message/inline-message.css +105 -53
  16. package/src/kbd/kbd.css +18 -10
  17. package/src/kbd/kbd.tokens.json +3 -0
  18. package/src/menu/menu.css +34 -11
  19. package/src/menu/menu.tokens.json +1 -0
  20. package/src/multi-select/multi-select.css +24 -16
  21. package/src/popover/popover.css +34 -13
  22. package/src/popover/popover.tokens.json +1 -0
  23. package/src/section/section.css +14 -2
  24. package/src/section/section.tokens.json +1 -0
  25. package/src/select/select.css +34 -16
  26. package/src/select/select.tokens.json +1 -0
  27. package/src/status-indicator/status-indicator.css +84 -59
  28. package/src/status-indicator/status-indicator.tokens.json +0 -3
  29. package/src/table-of-contents/table-of-contents.css +6 -2
  30. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  31. package/src/toast/toast.css +7 -8
  32. package/src/tooltip/tooltip.css +34 -13
  33. package/src/tooltip/tooltip.tokens.json +1 -0
@@ -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,9 +133,7 @@
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
139
  [data-ui-tooltip][data-side='top'] {
@@ -163,7 +160,6 @@
163
160
  * leaves from wherever the layer is, on the closed rule's durations.
164
161
  */
165
162
  [data-ui-tooltip][data-open] {
166
- opacity: 1;
167
163
  translate: 0 0;
168
164
  transition: none;
169
165
  }
@@ -181,20 +177,14 @@
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,6 +195,27 @@
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
221
  [data-ui-tooltip],
@@ -212,14 +223,14 @@
212
223
  [data-ui-tooltip][data-side='left'],
213
224
  [data-ui-tooltip][data-side='right'] {
214
225
  translate: 0 0;
215
- transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
226
+ transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
216
227
  }
217
228
 
218
229
  [data-ui-tooltip][data-open][data-positioned],
219
230
  [data-ui-tooltip][data-open][data-positioned][data-side='top'],
220
231
  [data-ui-tooltip][data-open][data-positioned][data-side='left'],
221
232
  [data-ui-tooltip][data-open][data-positioned][data-side='right'] {
222
- animation-name: slotted-tooltip-fade;
233
+ animation-name: none;
223
234
  }
224
235
  }
225
236
 
@@ -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
  /**
@@ -25,6 +25,7 @@
25
25
  "--slotted-text-inverse",
26
26
  "--slotted-tooltip-arrow-size",
27
27
  "--slotted-tooltip-arrow-tip-radius",
28
+ "--slotted-tooltip-backdrop-filter",
28
29
  "--slotted-tooltip-border-color",
29
30
  "--slotted-tooltip-gap",
30
31
  "--slotted-tooltip-measure",