@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.
Files changed (221) hide show
  1. package/package.json +21 -1
  2. package/src/accordion/accordion.css +31 -13
  3. package/src/accordion/accordion.tokens.json +2 -0
  4. package/src/action-bar/action-bar.css +47 -44
  5. package/src/action-bar/action-bar.tokens.json +1 -0
  6. package/src/action-sheet/action-sheet.css +39 -39
  7. package/src/alert/alert.css +97 -97
  8. package/src/alert/alert.tokens.json +6 -1
  9. package/src/app-shell/app-shell.css +472 -342
  10. package/src/app-shell/app-shell.tokens.json +6 -3
  11. package/src/aspect-ratio/aspect-ratio.css +24 -23
  12. package/src/attachment/attachment.css +118 -114
  13. package/src/avatar/avatar.css +97 -67
  14. package/src/avatar/avatar.tokens.json +8 -0
  15. package/src/avatar-group/avatar-group.css +22 -23
  16. package/src/badge/badge.css +58 -47
  17. package/src/badge/badge.tokens.json +6 -0
  18. package/src/breadcrumb/breadcrumb.css +52 -52
  19. package/src/button/button.css +408 -93
  20. package/src/button/button.tokens.json +13 -0
  21. package/src/button-group/button-group.css +80 -79
  22. package/src/button-group/button-group.tokens.json +1 -0
  23. package/src/calendar/calendar.css +594 -267
  24. package/src/calendar/calendar.tokens.json +35 -3
  25. package/src/card/card.css +133 -70
  26. package/src/card/card.tokens.json +1 -0
  27. package/src/carousel/carousel.css +158 -169
  28. package/src/cascader/cascader.css +174 -159
  29. package/src/cascader/cascader.tokens.json +2 -0
  30. package/src/chart/chart.css +300 -271
  31. package/src/chart/chart.tokens.json +5 -0
  32. package/src/checkbox/checkbox.css +190 -148
  33. package/src/checkbox/checkbox.tokens.json +4 -0
  34. package/src/checkbox-group/checkbox-group.css +7 -7
  35. package/src/clock/clock.css +246 -0
  36. package/src/clock/clock.tokens.json +44 -0
  37. package/src/code-block/code-block.css +85 -89
  38. package/src/collapsible/collapsible.css +273 -85
  39. package/src/collapsible/collapsible.tokens.json +6 -0
  40. package/src/color-picker/color-picker.css +106 -114
  41. package/src/column-manager/column-manager.css +111 -119
  42. package/src/combobox/combobox.css +219 -132
  43. package/src/combobox/combobox.tokens.json +4 -0
  44. package/src/command-palette/command-palette.css +214 -102
  45. package/src/command-palette/command-palette.tokens.json +4 -0
  46. package/src/container/container.css +27 -27
  47. package/src/context-menu/context-menu.css +9 -9
  48. package/src/currency-field/currency-field.css +119 -119
  49. package/src/currency-field/currency-field.tokens.json +1 -0
  50. package/src/dashboard-grid/dashboard-grid.css +231 -115
  51. package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
  52. package/src/data-grid/data-grid.css +637 -496
  53. package/src/data-grid/data-grid.tokens.json +5 -1
  54. package/src/data-list/data-list.css +93 -76
  55. package/src/data-list/data-list.tokens.json +2 -1
  56. package/src/date-field/date-field.css +62 -57
  57. package/src/date-field/date-field.tokens.json +1 -0
  58. package/src/date-picker/date-picker.css +31 -269
  59. package/src/date-picker/date-picker.tokens.json +1 -21
  60. package/src/date-range-picker/date-range-picker.css +72 -528
  61. package/src/date-range-picker/date-range-picker.tokens.json +1 -37
  62. package/src/datetime-field/datetime-field.css +90 -90
  63. package/src/datetime-field/datetime-field.tokens.json +1 -0
  64. package/src/datetime-picker/datetime-picker.css +49 -711
  65. package/src/datetime-picker/datetime-picker.tokens.json +1 -50
  66. package/src/datetime-range-picker/datetime-range-picker.css +60 -985
  67. package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
  68. package/src/description-list/description-list.css +120 -76
  69. package/src/description-list/description-list.tokens.json +1 -0
  70. package/src/detail-panel/detail-panel.css +86 -71
  71. package/src/detail-panel/detail-panel.tokens.json +2 -0
  72. package/src/dialog/dialog.css +462 -199
  73. package/src/dialog/dialog.tokens.json +10 -0
  74. package/src/divider/divider.css +20 -20
  75. package/src/drawer/drawer.css +736 -237
  76. package/src/drawer/drawer.tokens.json +15 -0
  77. package/src/entity-picker/entity-picker.css +402 -272
  78. package/src/entity-picker/entity-picker.tokens.json +6 -0
  79. package/src/event-calendar/event-calendar.css +357 -399
  80. package/src/field/field.css +106 -93
  81. package/src/field/field.tokens.json +2 -0
  82. package/src/field-group/field-group.css +58 -38
  83. package/src/field-group/field-group.tokens.json +3 -0
  84. package/src/filter-bar/filter-bar.css +224 -216
  85. package/src/floating-panel/floating-panel.css +147 -0
  86. package/src/floating-panel/floating-panel.tokens.json +32 -0
  87. package/src/form/form.css +103 -26
  88. package/src/form/form.tokens.json +6 -1
  89. package/src/fullscreen/fullscreen.css +26 -27
  90. package/src/grid/grid.css +32 -31
  91. package/src/highlight/highlight.css +11 -11
  92. package/src/hover-card/hover-card.css +9 -9
  93. package/src/icon/icon.css +67 -20
  94. package/src/icon/icon.tokens.json +1 -0
  95. package/src/image/image.css +42 -42
  96. package/src/import-export-center/import-export-center.css +147 -168
  97. package/src/import-export-center/import-export-center.tokens.json +1 -0
  98. package/src/inline/inline.css +29 -29
  99. package/src/inline-message/inline-message.css +162 -86
  100. package/src/inline-message/inline-message.tokens.json +5 -0
  101. package/src/kbd/kbd.css +63 -51
  102. package/src/kbd/kbd.tokens.json +4 -0
  103. package/src/link/link.css +54 -33
  104. package/src/link/link.tokens.json +4 -0
  105. package/src/list/list.css +55 -24
  106. package/src/list/list.tokens.json +2 -0
  107. package/src/list-item/list-item.css +195 -80
  108. package/src/list-item/list-item.tokens.json +10 -0
  109. package/src/listbox/listbox.css +121 -72
  110. package/src/listbox/listbox.tokens.json +6 -1
  111. package/src/loading-overlay/loading-overlay.css +86 -103
  112. package/src/markdown/markdown.css +20 -20
  113. package/src/media-viewer/media-viewer.css +790 -0
  114. package/src/media-viewer/media-viewer.tokens.json +53 -0
  115. package/src/menu/menu.css +166 -83
  116. package/src/menu/menu.tokens.json +3 -1
  117. package/src/menubar/menubar.css +16 -16
  118. package/src/message/message.css +1296 -1243
  119. package/src/message/message.tokens.json +14 -0
  120. package/src/message-scroller/message-scroller.css +323 -320
  121. package/src/meter/meter.css +136 -0
  122. package/src/meter/meter.tokens.json +23 -0
  123. package/src/multi-select/multi-select.css +246 -174
  124. package/src/multi-select/multi-select.tokens.json +3 -0
  125. package/src/navigation-menu/navigation-menu.css +170 -191
  126. package/src/navigation-menu/navigation-menu.tokens.json +1 -0
  127. package/src/notification-center/notification-center.css +155 -163
  128. package/src/notification-center/notification-center.tokens.json +4 -0
  129. package/src/number-field/number-field.css +93 -93
  130. package/src/number-field/number-field.tokens.json +1 -0
  131. package/src/otp-input/otp-input.css +74 -64
  132. package/src/otp-input/otp-input.tokens.json +1 -0
  133. package/src/page/page.css +109 -31
  134. package/src/page/page.tokens.json +8 -0
  135. package/src/page-header/page-header.css +342 -287
  136. package/src/page-header/page-header.tokens.json +6 -1
  137. package/src/pagination/pagination.css +75 -79
  138. package/src/picker-panel/picker-panel.css +1074 -0
  139. package/src/picker-panel/picker-panel.tokens.json +77 -0
  140. package/src/popover/popover.css +85 -65
  141. package/src/popover/popover.tokens.json +2 -0
  142. package/src/progress-indicator/progress-indicator.css +194 -137
  143. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  144. package/src/prompt-composer/prompt-composer.css +274 -116
  145. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  146. package/src/prose/prose.css +77 -82
  147. package/src/radio-group/radio-group.css +107 -112
  148. package/src/rating/rating.css +147 -143
  149. package/src/rating/rating.tokens.json +2 -0
  150. package/src/result-state/result-state.css +95 -102
  151. package/src/result-state/result-state.tokens.json +1 -0
  152. package/src/runtime-properties.mjs +44 -6
  153. package/src/saved-views/saved-views.css +43 -49
  154. package/src/scroll-area/scroll-area.css +50 -37
  155. package/src/section/section.css +311 -46
  156. package/src/section/section.tokens.json +13 -1
  157. package/src/segmented-control/segmented-control.css +221 -133
  158. package/src/segmented-control/segmented-control.tokens.json +7 -11
  159. package/src/select/select.css +226 -149
  160. package/src/select/select.tokens.json +4 -0
  161. package/src/side-navigation/side-navigation.css +204 -201
  162. package/src/side-navigation/side-navigation.tokens.json +2 -0
  163. package/src/skeleton/skeleton.css +76 -58
  164. package/src/slider/slider.css +108 -104
  165. package/src/slider/slider.tokens.json +1 -0
  166. package/src/sparkline/sparkline.css +75 -53
  167. package/src/sparkline/sparkline.tokens.json +2 -0
  168. package/src/spinner/spinner.css +83 -180
  169. package/src/spinner/spinner.tokens.json +0 -1
  170. package/src/split-button/split-button.css +34 -35
  171. package/src/split-button/split-button.tokens.json +1 -0
  172. package/src/splitter/splitter.css +47 -48
  173. package/src/stack/stack.css +26 -26
  174. package/src/stat-card/stat-card.css +420 -245
  175. package/src/stat-card/stat-card.tokens.json +8 -0
  176. package/src/status-indicator/status-indicator.css +126 -101
  177. package/src/status-indicator/status-indicator.tokens.json +0 -3
  178. package/src/stepper/stepper.css +78 -82
  179. package/src/switch/switch.css +143 -125
  180. package/src/switch/switch.tokens.json +4 -0
  181. package/src/table/table.css +653 -222
  182. package/src/table/table.tokens.json +10 -0
  183. package/src/table-of-contents/table-of-contents.css +60 -59
  184. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  185. package/src/tabs/tabs.css +327 -294
  186. package/src/tabs/tabs.tokens.json +7 -1
  187. package/src/tag/tag.css +113 -89
  188. package/src/tag/tag.tokens.json +11 -0
  189. package/src/tags-input/tags-input.css +152 -87
  190. package/src/tags-input/tags-input.tokens.json +7 -1
  191. package/src/text-field/text-field.css +146 -148
  192. package/src/text-field/text-field.tokens.json +1 -0
  193. package/src/textarea/textarea.css +38 -33
  194. package/src/textarea/textarea.tokens.json +1 -0
  195. package/src/time-field/time-field.css +82 -77
  196. package/src/time-field/time-field.tokens.json +1 -0
  197. package/src/time-picker/time-picker.css +30 -519
  198. package/src/time-picker/time-picker.tokens.json +1 -38
  199. package/src/time-range-picker/time-range-picker.css +53 -895
  200. package/src/time-range-picker/time-range-picker.tokens.json +1 -66
  201. package/src/timeline/timeline.css +280 -292
  202. package/src/timeline/timeline.tokens.json +5 -0
  203. package/src/toast/toast.css +139 -122
  204. package/src/toast/toast.tokens.json +7 -0
  205. package/src/toggle/toggle.css +34 -38
  206. package/src/toggle-group/toggle-group.css +73 -77
  207. package/src/toolbar/toolbar.css +49 -40
  208. package/src/toolbar/toolbar.tokens.json +2 -1
  209. package/src/tooltip/tooltip.css +95 -39
  210. package/src/tooltip/tooltip.tokens.json +1 -0
  211. package/src/top-navigation/top-navigation.css +253 -269
  212. package/src/top-navigation/top-navigation.tokens.json +1 -0
  213. package/src/tour/tour.css +68 -74
  214. package/src/tour/tour.tokens.json +1 -0
  215. package/src/transfer/transfer.css +164 -168
  216. package/src/tree/tree.css +118 -122
  217. package/src/typography/typography.css +67 -38
  218. package/src/typography/typography.tokens.json +2 -0
  219. package/src/upload/upload.css +256 -257
  220. package/src/visually-hidden/visually-hidden.css +1 -1
  221. package/src/wizard/wizard.css +187 -199
@@ -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='toolbar'] {
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='toolbar'][data-size='sm'] {
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='toolbar'][data-size='lg'] {
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='toolbar']:empty {
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 centres them,
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='toolbar'][data-orientation='vertical'] {
84
+ [data-ui-toolbar][data-orientation='vertical'] {
85
85
  align-items: stretch;
86
86
  flex-direction: column;
87
87
  inline-size: fit-content;
@@ -94,16 +94,30 @@
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='toolbar'][data-variant='outline'] {
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))
101
101
  );
102
102
 
103
+ --_frame-edge: var(--slotted-toolbar-border-color, var(--slotted-border-subtle, ButtonBorder));
104
+
103
105
  background-color: var(--slotted-toolbar-background, var(--slotted-surface-raised));
104
- border: var(--slotted-border-width-thin, 1px) solid
105
- var(--slotted-toolbar-border-color, var(--slotted-border-subtle, ButtonBorder));
106
106
  border-radius: var(--slotted-radius-md, 6px);
107
+ box-shadow: var(--slotted-toolbar-shadow, none);
108
+ /* The containing block of the edge. */
109
+ position: relative;
110
+ }
111
+
112
+ /* The edge, drawn as a card's is (collapsible records why). */
113
+ [data-ui-toolbar][data-variant='outline']::before {
114
+ border: var(--slotted-border-width-thin, 1px) solid var(--_frame-edge);
115
+ border-radius: inherit;
116
+ content: '';
117
+ inset: 0;
118
+ pointer-events: none;
119
+ position: absolute;
120
+ z-index: 1;
107
121
  }
108
122
 
109
123
  /* ── Overflow ─────────────────────────────────────────────────────────── */
@@ -121,7 +135,7 @@
121
135
  * design — its spacer exists so the first item "can wrap to the next line
122
136
  * and get clipped".
123
137
  */
124
- [data-ui='toolbar']:is([data-overflow='scroll'], [data-overflow='menu']) {
138
+ [data-ui-toolbar]:is([data-overflow='scroll'], [data-overflow='menu']) {
125
139
  /**
126
140
  * A scroll container clips at its padding edge whether or not a scrollbar
127
141
  * is drawn, and a control's focus ring is drawn outward. The bar therefore
@@ -139,7 +153,7 @@
139
153
  scrollbar-width: thin;
140
154
  }
141
155
 
142
- [data-ui='toolbar']:is(
156
+ [data-ui-toolbar]:is(
143
157
  [data-overflow='scroll'],
144
158
  [data-overflow='menu']
145
159
  )[data-orientation='vertical'] {
@@ -155,7 +169,7 @@
155
169
  * gets instead — and the collapse would then measure a control at a width it
156
170
  * only has while it is being squeezed.
157
171
  */
158
- [data-ui='toolbar']:is([data-overflow='scroll'], [data-overflow='menu']) > * {
172
+ [data-ui-toolbar]:is([data-overflow='scroll'], [data-overflow='menu']) > * {
159
173
  flex: none;
160
174
  }
161
175
 
@@ -171,13 +185,13 @@
171
185
  * It paints nothing. Everything a reader sees inside it belongs to the
172
186
  * control the consumer placed.
173
187
  */
174
- [data-ui='toolbar'] [data-part='item'] {
188
+ [data-ui-toolbar] [data-part-item] {
175
189
  align-items: center;
176
190
  display: inline-flex;
177
191
  min-inline-size: 0;
178
192
  }
179
193
 
180
- [data-ui='toolbar'][data-orientation='vertical'] [data-part='item'] {
194
+ [data-ui-toolbar][data-orientation='vertical'] [data-part-item] {
181
195
  align-items: stretch;
182
196
  flex-direction: column;
183
197
  }
@@ -189,13 +203,8 @@
189
203
  * without this rule every collapsed unit stayed on the bar and the collapse
190
204
  * did nothing at all.
191
205
  */
192
- [data-ui='toolbar']
193
- :is(
194
- [data-part='item'],
195
- [data-part='group'],
196
- [data-part='separator'],
197
- [data-part='overflow']
198
- )[hidden] {
206
+ [data-ui-toolbar]
207
+ :is([data-part-item], [data-part-group], [data-part-separator], [data-part-overflow])[hidden] {
199
208
  display: none;
200
209
  }
201
210
 
@@ -210,13 +219,13 @@
210
219
  * `docs/token-foundation.md` — and the two quantities that exception needed
211
220
  * here are what closed it: a type step of one and a half to stop three dots
212
221
  * 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 centred in its box
222
+ * baseline and onto the middle of the control. A glyph is centerd in its box
214
223
  * by construction and sized by the same scale as every other mark on the bar.
215
224
  *
216
225
  * Its accessible name carries the count, so what a reader hears is a number
217
226
  * rather than three dots.
218
227
  */
219
- [data-ui='toolbar'] [data-part='overflow'] {
228
+ [data-ui-toolbar] [data-part-overflow] {
220
229
  --slotted-icon-size: var(--_icon-size);
221
230
 
222
231
  align-items: center;
@@ -249,14 +258,14 @@
249
258
  }
250
259
 
251
260
  /* The ground moves under the pointer and nothing else does (R2). */
252
- [data-ui='toolbar'] [data-part='overflow']:not(:disabled):hover {
261
+ [data-ui-toolbar] [data-part-overflow]:not(:disabled):hover {
253
262
  background-color: var(
254
263
  --slotted-toolbar-overflow-hover-background,
255
264
  var(--slotted-tone-secondary-subtle-hover)
256
265
  );
257
266
  }
258
267
 
259
- [data-ui='toolbar'] [data-part='overflow']:not(:disabled):active {
268
+ [data-ui-toolbar] [data-part-overflow]:not(:disabled):active {
260
269
  background-color: var(
261
270
  --slotted-toolbar-overflow-active-background,
262
271
  var(--slotted-tone-secondary-subtle-active)
@@ -268,7 +277,7 @@
268
277
  * reader who moved the pointer off the trigger loses every sign of which
269
278
  * control the layer belongs to.
270
279
  */
271
- [data-ui='toolbar'] [data-part='overflow'][data-open] {
280
+ [data-ui-toolbar] [data-part-overflow][data-open] {
272
281
  background-color: var(
273
282
  --slotted-toolbar-overflow-open-background,
274
283
  var(--slotted-tone-secondary-subtle-active)
@@ -286,13 +295,13 @@
286
295
  it are, and square: one value for both axes, so a bar taller than the
287
296
  comfortable target does not stand it on end. */
288
297
  @media (pointer: coarse) {
289
- [data-ui='toolbar'] [data-part='overflow'] {
298
+ [data-ui-toolbar] [data-part-overflow] {
290
299
  min-block-size: max(var(--slotted-target-comfortable, 44px), var(--_height));
291
300
  min-inline-size: max(var(--slotted-target-comfortable, 44px), var(--_height));
292
301
  }
293
302
  }
294
303
 
295
- [data-ui='toolbar'] [data-part='overflow']:disabled {
304
+ [data-ui-toolbar] [data-part-overflow]:disabled {
296
305
  color: var(--slotted-disabled-foreground, GrayText);
297
306
  cursor: default;
298
307
  }
@@ -302,7 +311,7 @@
302
311
  * edge, and the trigger is the control closest to it, so an outward ring here
303
312
  * is the one this family cannot afford.
304
313
  */
305
- [data-ui='toolbar'] [data-part='overflow']:focus-visible {
314
+ [data-ui-toolbar] [data-part-overflow]:focus-visible {
306
315
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
307
316
  outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
308
317
  }
@@ -321,7 +330,7 @@
321
330
  * puts the clusters of a loosely spaced bar closer together than the
322
331
  * controls inside them.
323
332
  */
324
- [data-ui='toolbar'] [data-part='group'] {
333
+ [data-ui-toolbar] [data-part-group] {
325
334
  align-items: center;
326
335
  display: flex;
327
336
  flex-wrap: inherit;
@@ -329,25 +338,25 @@
329
338
  min-inline-size: 0;
330
339
  }
331
340
 
332
- [data-ui='toolbar'][data-orientation='vertical'] [data-part='group'] {
341
+ [data-ui-toolbar][data-orientation='vertical'] [data-part-group] {
333
342
  align-items: stretch;
334
343
  flex-direction: column;
335
344
  }
336
345
 
337
- [data-ui='toolbar'] [data-part='group']:not(:first-child) {
346
+ [data-ui-toolbar] [data-part-group]:not(:first-child) {
338
347
  margin-inline-start: calc(var(--_gap) / 2);
339
348
  }
340
349
 
341
- [data-ui='toolbar'] [data-part='group']:not(:last-child) {
350
+ [data-ui-toolbar] [data-part-group]:not(:last-child) {
342
351
  margin-inline-end: calc(var(--_gap) / 2);
343
352
  }
344
353
 
345
- [data-ui='toolbar'][data-orientation='vertical'] [data-part='group']:not(:first-child) {
354
+ [data-ui-toolbar][data-orientation='vertical'] [data-part-group]:not(:first-child) {
346
355
  margin-block-start: calc(var(--_gap) / 2);
347
356
  margin-inline-start: 0;
348
357
  }
349
358
 
350
- [data-ui='toolbar'][data-orientation='vertical'] [data-part='group']:not(:last-child) {
359
+ [data-ui-toolbar][data-orientation='vertical'] [data-part-group]:not(:last-child) {
351
360
  margin-block-end: calc(var(--_gap) / 2);
352
361
  margin-inline-end: 0;
353
362
  }
@@ -365,7 +374,7 @@
365
374
  * It is one border width. A thick rule in a bar of hairlines is not a
366
375
  * stronger boundary, it is a slab.
367
376
  */
368
- [data-ui='toolbar'] [data-part='separator'] {
377
+ [data-ui-toolbar] [data-part-separator] {
369
378
  align-self: stretch;
370
379
  /**
371
380
  * The control edge rather than the subtle rule `divider` reaches for: this
@@ -391,7 +400,7 @@
391
400
  min-block-size: calc(var(--_height) - 2 * var(--_separator-inset));
392
401
  }
393
402
 
394
- [data-ui='toolbar'][data-orientation='vertical'] [data-part='separator'] {
403
+ [data-ui-toolbar][data-orientation='vertical'] [data-part-separator] {
395
404
  block-size: var(--slotted-border-width-thin, 1px);
396
405
  inline-size: auto;
397
406
  margin-block: calc(var(--_gap) / 2);
@@ -400,12 +409,12 @@
400
409
  }
401
410
 
402
411
  /**
403
- * Forced colours flatten a background to `Canvas`, and a rule painted with
412
+ * Forced colors flatten a background to `Canvas`, and a rule painted with
404
413
  * one disappears with it. The separator is a background rather than a border,
405
414
  * so keeping the paint is the only way the boundary is still there to read.
406
415
  */
407
416
  @media (forced-colors: active) {
408
- [data-ui='toolbar'] [data-part='separator'] {
417
+ [data-ui-toolbar] [data-part-separator] {
409
418
  background-color: CanvasText;
410
419
  forced-color-adjust: none;
411
420
  }
@@ -426,7 +435,7 @@
426
435
  * afterwards, so a zero-width spacer moves what follows to the end of its own
427
436
  * line and pushes nothing onto the next one.
428
437
  */
429
- [data-ui='toolbar'] [data-part='spacer'] {
438
+ [data-ui-toolbar] [data-part-spacer] {
430
439
  flex: 1 1 0;
431
440
  min-block-size: 0;
432
441
  min-inline-size: 0;
@@ -45,5 +45,6 @@
45
45
  "--slotted-toolbar-overflow-hover-background",
46
46
  "--slotted-toolbar-overflow-hover-color",
47
47
  "--slotted-toolbar-overflow-open-background",
48
- "--slotted-toolbar-separator-color"
48
+ "--slotted-toolbar-separator-color",
49
+ "--slotted-toolbar-shadow"
49
50
  ]
@@ -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='tooltip'] {
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
@@ -58,6 +58,8 @@
58
58
  */
59
59
  --_shadow: var(--slotted-tooltip-shadow, var(--slotted-shadow-xs));
60
60
  --_arrow-size: var(--slotted-tooltip-arrow-size, 0.5rem);
61
+ /* How far the clipped arrow reaches over the content along each of its edges. */
62
+ --_arrow-overlap: 0.5px;
61
63
  /* The point, softened to the same degree the surface's own corners are.
62
64
  A 90-degree tip beside a rounded panel reads as a different object. */
63
65
  --_arrow-tip-radius: var(--slotted-tooltip-arrow-tip-radius, var(--slotted-radius-xs, 2px));
@@ -124,7 +126,6 @@
124
126
  */
125
127
  pointer-events: none;
126
128
 
127
- opacity: 0;
128
129
  /**
129
130
  * R7: the layer arrives along the axis it opens on — from one space step
130
131
  * above its place when it opens downward, from one step below when it
@@ -134,17 +135,15 @@
134
135
  */
135
136
  --_enter-distance: var(--slotted-space-2, 0.25rem);
136
137
  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);
138
+ transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
140
139
  }
141
140
 
142
- [data-ui='tooltip'][data-side='top'] {
141
+ [data-ui-tooltip][data-side='top'] {
143
142
  translate: 0 var(--_enter-distance);
144
143
  }
145
144
 
146
145
  /* A lateral side has no block direction to arrive from, so it only fades. */
147
- [data-ui='tooltip']:is([data-side='left'], [data-side='right']) {
146
+ [data-ui-tooltip]:is([data-side='left'], [data-side='right']) {
148
147
  translate: 0 0;
149
148
  }
150
149
 
@@ -162,8 +161,7 @@
162
161
  * A keyframe states where it starts. The exit stays a transition: it
163
162
  * leaves from wherever the layer is, on the closed rule's durations.
164
163
  */
165
- [data-ui='tooltip'][data-open] {
166
- opacity: 1;
164
+ [data-ui-tooltip][data-open] {
167
165
  translate: 0 0;
168
166
  transition: none;
169
167
  }
@@ -173,28 +171,22 @@
173
171
  * with the side, and a layer written open in static markup — the harness,
174
172
  * a docs snippet — is simply there, and is photographed where it stands.
175
173
  */
176
- [data-ui='tooltip'][data-open][data-positioned] {
174
+ [data-ui-tooltip][data-open][data-positioned] {
177
175
  animation: slotted-tooltip-enter-down var(--slotted-duration-medium) var(--slotted-easing-enter);
178
176
  }
179
177
 
180
- [data-ui='tooltip'][data-open][data-positioned][data-side='top'] {
178
+ [data-ui-tooltip][data-open][data-positioned][data-side='top'] {
181
179
  animation-name: slotted-tooltip-enter-up;
182
180
  }
183
181
 
184
- [data-ui='tooltip'][data-open][data-positioned]:is([data-side='left'], [data-side='right']) {
185
- animation-name: slotted-tooltip-fade;
186
- }
187
-
188
182
  @keyframes slotted-tooltip-enter-down {
189
183
  from {
190
- opacity: 0;
191
184
  translate: 0 calc(-1 * var(--_enter-distance));
192
185
  }
193
186
  }
194
187
 
195
188
  @keyframes slotted-tooltip-enter-up {
196
189
  from {
197
- opacity: 0;
198
190
  translate: 0 var(--_enter-distance);
199
191
  }
200
192
  }
@@ -205,25 +197,51 @@
205
197
  }
206
198
  }
207
199
 
200
+ /**
201
+ * The fade belongs to the part that paints the surface, and the layer only
202
+ * moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
203
+ * of what it holds, so a `backdrop-filter` on the content blurs nothing until
204
+ * the layer is opaque and then appears at once. The content's own opacity
205
+ * leaves its own filter drawn on every frame of the motion. The arrow is
206
+ * the other part that paints, and it fades on the same rules, so the two
207
+ * read as one surface.
208
+ */
209
+ [data-ui-tooltip] > [data-part-content],
210
+ [data-ui-tooltip] > [data-part-arrow] {
211
+ opacity: 0;
212
+ transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
213
+ }
214
+
215
+ [data-ui-tooltip][data-open] > [data-part-content],
216
+ [data-ui-tooltip][data-open] > [data-part-arrow] {
217
+ opacity: 1;
218
+ transition: none;
219
+ }
220
+
221
+ [data-ui-tooltip][data-open][data-positioned] > [data-part-content],
222
+ [data-ui-tooltip][data-open][data-positioned] > [data-part-arrow] {
223
+ animation: slotted-tooltip-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
224
+ }
225
+
208
226
  /* Stillness keeps the fade and drops the movement (R7). */
209
227
  @media (prefers-reduced-motion: reduce) {
210
- [data-ui='tooltip'],
211
- [data-ui='tooltip'][data-side='top'],
212
- [data-ui='tooltip'][data-side='left'],
213
- [data-ui='tooltip'][data-side='right'] {
228
+ [data-ui-tooltip],
229
+ [data-ui-tooltip][data-side='top'],
230
+ [data-ui-tooltip][data-side='left'],
231
+ [data-ui-tooltip][data-side='right'] {
214
232
  translate: 0 0;
215
- transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
233
+ transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
216
234
  }
217
235
 
218
- [data-ui='tooltip'][data-open][data-positioned],
219
- [data-ui='tooltip'][data-open][data-positioned][data-side='top'],
220
- [data-ui='tooltip'][data-open][data-positioned][data-side='left'],
221
- [data-ui='tooltip'][data-open][data-positioned][data-side='right'] {
222
- animation-name: slotted-tooltip-fade;
236
+ [data-ui-tooltip][data-open][data-positioned],
237
+ [data-ui-tooltip][data-open][data-positioned][data-side='top'],
238
+ [data-ui-tooltip][data-open][data-positioned][data-side='left'],
239
+ [data-ui-tooltip][data-open][data-positioned][data-side='right'] {
240
+ animation-name: none;
223
241
  }
224
242
  }
225
243
 
226
- [data-ui='tooltip'][data-open][data-hoverable] {
244
+ [data-ui-tooltip][data-open][data-hoverable] {
227
245
  pointer-events: auto;
228
246
  }
229
247
 
@@ -232,11 +250,11 @@
232
250
  * `hideWhenDetached`: the layer comes back when the anchor does, and nothing
233
251
  * has moved the consumer's own `open` because a rectangle changed size.
234
252
  */
235
- [data-ui='tooltip'][data-detached] {
253
+ [data-ui-tooltip][data-detached] {
236
254
  visibility: hidden;
237
255
  }
238
256
 
239
- [data-ui='tooltip'][data-size='sm'] {
257
+ [data-ui-tooltip][data-size='sm'] {
240
258
  --_padding-inline: var(--slotted-control-padding-inline-sm, 0.625rem);
241
259
  --_padding-block: var(--slotted-control-gap-sm, 0.375rem);
242
260
  --_font-size: var(--slotted-control-font-size-sm, 0.75rem);
@@ -248,14 +266,16 @@
248
266
  * want to read as a small panel rather than as a label. It takes the raised
249
267
  * surface and the edge that surface needs to separate from the page.
250
268
  */
251
- [data-ui='tooltip'][data-variant='surface'] {
269
+ [data-ui-tooltip][data-variant='surface'] {
252
270
  --_surface: var(--slotted-tooltip-surface-raised, var(--slotted-surface-raised, #ffffff));
253
271
  --_text: var(--slotted-tooltip-text-raised, var(--slotted-text, #0f172a));
254
272
  --_border-color: var(--slotted-tooltip-border-color, var(--slotted-border-subtle, #e2e8f0));
255
273
  --_border-width: var(--slotted-border-width-thin, 1px);
274
+ /* Along a rotated edge, 1.5 border widths reach one border width deep. */
275
+ --_arrow-overlap: calc(var(--_border-width) * 1.5);
256
276
  }
257
277
 
258
- [data-ui='tooltip'] > [data-part='content'] {
278
+ [data-ui-tooltip] > [data-part-content] {
259
279
  box-sizing: border-box;
260
280
  display: block;
261
281
  max-inline-size: 100%;
@@ -291,6 +311,16 @@
291
311
  */
292
312
  overflow-wrap: anywhere;
293
313
  unicode-bidi: plaintext;
314
+ /* A theme that paints this surface as a translucent material blurs what moves behind it. */
315
+ -webkit-backdrop-filter: var(--slotted-tooltip-backdrop-filter, none);
316
+ backdrop-filter: var(--slotted-tooltip-backdrop-filter, none);
317
+ }
318
+
319
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
320
+ [data-ui-tooltip] > [data-part-content] {
321
+ -webkit-backdrop-filter: none;
322
+ backdrop-filter: none;
323
+ }
294
324
  }
295
325
 
296
326
  /**
@@ -304,11 +334,11 @@
304
334
  * the reader's writing direction. Mirroring either would move an already
305
335
  * correct arrow to the wrong edge in a right-to-left document, so
306
336
  * `packages/styles/src/logical.test.mjs` exempts exactly the rules that
307
- * select `[data-part='arrow']`, and nothing else.
337
+ * select `[data-part-arrow]`, and nothing else.
308
338
  *
309
339
  * ── Why it is painted over the surface and not behind it ─────────────
310
340
  *
311
- * The square is rotated about its own centre, and the centre sits on the
341
+ * The square is rotated about its own center, and the center sits on the
312
342
  * content's edge. Painted behind, its inner half disappears and the content's
313
343
  * own border still runs straight across the base — a bordered tooltip then
314
344
  * reads as a box with a separate triangle hanging off it, which is what the
@@ -319,8 +349,14 @@
319
349
  *
320
350
  * `arrowPadding` keeps it clear of the corners, where the content's radius
321
351
  * would leave the base uncovered.
352
+ *
353
+ * ── Why only its outer half is drawn ─────────────────────────────────
354
+ *
355
+ * While both parts fade, the half that lies over the content composites
356
+ * twice and the whole diamond shows through it. The square is clipped to its
357
+ * outer half, with the overlap that covers the content's edge under the base.
322
358
  */
323
- [data-ui='tooltip'] > [data-part='arrow'] {
359
+ [data-ui-tooltip] > [data-part-arrow] {
324
360
  position: absolute;
325
361
  z-index: 1;
326
362
  inline-size: var(--_arrow-size);
@@ -330,39 +366,59 @@
330
366
  border: 0 solid var(--_border-color);
331
367
  }
332
368
 
333
- [data-ui='tooltip'][data-side='top'] > [data-part='arrow'] {
369
+ [data-ui-tooltip][data-side='top'] > [data-part-arrow] {
334
370
  left: var(--slotted-positioner-arrow-x, 0);
335
371
  top: auto;
336
372
  bottom: calc(var(--_gap) - var(--_arrow-size) / 2);
337
373
  border-right-width: var(--_border-width);
338
374
  border-bottom-width: var(--_border-width);
339
375
  border-bottom-right-radius: var(--_arrow-tip-radius);
376
+ clip-path: polygon(
377
+ 100% 100%,
378
+ 100% calc(-1 * var(--_arrow-overlap)),
379
+ calc(-1 * var(--_arrow-overlap)) 100%
380
+ );
340
381
  }
341
382
 
342
- [data-ui='tooltip'][data-side='bottom'] > [data-part='arrow'] {
383
+ [data-ui-tooltip][data-side='bottom'] > [data-part-arrow] {
343
384
  left: var(--slotted-positioner-arrow-x, 0);
344
385
  top: calc(var(--_gap) - var(--_arrow-size) / 2);
345
386
  bottom: auto;
346
387
  border-top-width: var(--_border-width);
347
388
  border-left-width: var(--_border-width);
348
389
  border-top-left-radius: var(--_arrow-tip-radius);
390
+ clip-path: polygon(
391
+ 0 0,
392
+ calc(100% + var(--_arrow-overlap)) 0,
393
+ 0 calc(100% + var(--_arrow-overlap))
394
+ );
349
395
  }
350
396
 
351
- [data-ui='tooltip'][data-side='left'] > [data-part='arrow'] {
397
+ [data-ui-tooltip][data-side='left'] > [data-part-arrow] {
352
398
  top: var(--slotted-positioner-arrow-y, 0);
353
399
  left: auto;
354
400
  right: calc(var(--_gap) - var(--_arrow-size) / 2);
355
401
  border-top-width: var(--_border-width);
356
402
  border-right-width: var(--_border-width);
357
403
  border-top-right-radius: var(--_arrow-tip-radius);
404
+ clip-path: polygon(
405
+ 100% 0,
406
+ 100% calc(100% + var(--_arrow-overlap)),
407
+ calc(-1 * var(--_arrow-overlap)) 0
408
+ );
358
409
  }
359
410
 
360
- [data-ui='tooltip'][data-side='right'] > [data-part='arrow'] {
411
+ [data-ui-tooltip][data-side='right'] > [data-part-arrow] {
361
412
  top: var(--slotted-positioner-arrow-y, 0);
362
413
  left: calc(var(--_gap) - var(--_arrow-size) / 2);
363
414
  right: auto;
364
415
  border-bottom-width: var(--_border-width);
365
416
  border-left-width: var(--_border-width);
366
417
  border-bottom-left-radius: var(--_arrow-tip-radius);
418
+ clip-path: polygon(
419
+ 0 100%,
420
+ 0 calc(-1 * var(--_arrow-overlap)),
421
+ calc(100% + var(--_arrow-overlap)) 100%
422
+ );
367
423
  }
368
424
  }
@@ -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",