@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
@@ -3,15 +3,27 @@
3
3
  "--slotted-border-width-thin",
4
4
  "--slotted-calendar-active-background",
5
5
  "--slotted-calendar-background",
6
+ "--slotted-calendar-cell-block-size",
6
7
  "--slotted-calendar-cell-size",
7
8
  "--slotted-calendar-color",
9
+ "--slotted-calendar-day-height",
10
+ "--slotted-calendar-day-mark-size",
8
11
  "--slotted-calendar-day-radius",
9
12
  "--slotted-calendar-disabled-color",
13
+ "--slotted-calendar-heading-rest-color",
10
14
  "--slotted-calendar-hover-background",
11
15
  "--slotted-calendar-in-range-color",
12
16
  "--slotted-calendar-invalid-edge-width",
13
17
  "--slotted-calendar-invalid-focus-ring-color",
18
+ "--slotted-calendar-line-color",
19
+ "--slotted-calendar-month-gap",
14
20
  "--slotted-calendar-outside-color",
21
+ "--slotted-calendar-over-background",
22
+ "--slotted-calendar-over-color",
23
+ "--slotted-calendar-over-selected-background",
24
+ "--slotted-calendar-over-selected-color",
25
+ "--slotted-calendar-period-background",
26
+ "--slotted-calendar-period-block-size",
15
27
  "--slotted-calendar-preview-background",
16
28
  "--slotted-calendar-preview-border-color",
17
29
  "--slotted-calendar-radius",
@@ -21,12 +33,14 @@
21
33
  "--slotted-calendar-range-hover-background",
22
34
  "--slotted-calendar-selected-background",
23
35
  "--slotted-calendar-selected-color",
36
+ "--slotted-calendar-today-background",
37
+ "--slotted-calendar-today-border-color",
24
38
  "--slotted-calendar-today-color",
25
39
  "--slotted-calendar-trigger-color",
26
40
  "--slotted-calendar-unavailable-color",
27
- "--slotted-calendar-week-number-border-color",
28
41
  "--slotted-calendar-week-number-color",
29
42
  "--slotted-calendar-weekday-color",
43
+ "--slotted-calendar-weekend-color",
30
44
  "--slotted-control-font-family",
31
45
  "--slotted-control-font-size-md",
32
46
  "--slotted-control-gap-md",
@@ -36,23 +50,35 @@
36
50
  "--slotted-control-radius",
37
51
  "--slotted-control-transition-duration",
38
52
  "--slotted-control-transition-easing",
53
+ "--slotted-data-1",
54
+ "--slotted-data-2",
55
+ "--slotted-data-3",
56
+ "--slotted-data-4",
57
+ "--slotted-data-5",
58
+ "--slotted-data-6",
59
+ "--slotted-data-7",
60
+ "--slotted-data-8",
39
61
  "--slotted-disabled-background",
40
62
  "--slotted-disabled-foreground",
41
63
  "--slotted-focus-ring-color",
42
64
  "--slotted-focus-ring-color-invalid",
43
65
  "--slotted-focus-ring-offset",
44
66
  "--slotted-focus-ring-width",
67
+ "--slotted-font-size-md",
45
68
  "--slotted-font-size-xs",
46
69
  "--slotted-font-weight-medium",
47
70
  "--slotted-font-weight-regular",
48
71
  "--slotted-font-weight-semibold",
49
72
  "--slotted-highlight-tint-opacity",
50
73
  "--slotted-radius-full",
51
- "--slotted-radius-sm",
74
+ "--slotted-radius-md",
52
75
  "--slotted-space-1",
53
76
  "--slotted-space-2",
77
+ "--slotted-space-3",
54
78
  "--slotted-space-4",
55
79
  "--slotted-space-6",
80
+ "--slotted-surface-sunken",
81
+ "--slotted-target-comfortable",
56
82
  "--slotted-target-min",
57
83
  "--slotted-text",
58
84
  "--slotted-text-muted",
@@ -62,6 +88,12 @@
62
88
  "--slotted-tone-accent-subtle-active",
63
89
  "--slotted-tone-accent-subtle-hover",
64
90
  "--slotted-tone-accent-text",
91
+ "--slotted-tone-danger-on-solid",
92
+ "--slotted-tone-danger-solid",
93
+ "--slotted-tone-danger-text",
94
+ "--slotted-tone-info-solid",
65
95
  "--slotted-tone-secondary-subtle-active",
66
- "--slotted-tone-secondary-subtle-hover"
96
+ "--slotted-tone-secondary-subtle-hover",
97
+ "--slotted-tone-success-solid",
98
+ "--slotted-tone-warning-solid"
67
99
  ]
package/src/card/card.css CHANGED
@@ -13,7 +13,7 @@
13
13
  * The root does not clip. Media rounds the corners it touches and clips
14
14
  * itself, so an overlay opened inside a card is not cut off by the card.
15
15
  */
16
- [data-ui='card'] {
16
+ [data-ui-card] {
17
17
  --_card-edge-width: var(--slotted-card-border-width, var(--slotted-border-width-thin, 1px));
18
18
  --_card-radius: var(--slotted-card-radius, var(--slotted-radius-lg, 8px));
19
19
  --_card-inset-block: var(--slotted-card-padding-block, var(--slotted-space-6, 1rem));
@@ -99,7 +99,7 @@
99
99
  * it survives `forced-colors`, where a shadow is removed outright, and it
100
100
  * changes width without moving a pixel of content because it is out of flow.
101
101
  */
102
- [data-ui='card']::before {
102
+ [data-ui-card]::before {
103
103
  border: var(--_card-edge-width) solid var(--_card-edge);
104
104
  border-radius: inherit;
105
105
  content: '';
@@ -112,13 +112,13 @@
112
112
  /* Density is the application's choice and governs control geometry; `size`
113
113
  is this card's own inset, so a summary card and a card in a dense list can
114
114
  stand on the same page. */
115
- [data-ui='card'][data-size='sm'] {
115
+ [data-ui-card][data-size='sm'] {
116
116
  --_card-inset-block: var(--slotted-card-padding-block-sm, var(--slotted-space-5, 0.75rem));
117
117
  --_card-inset-inline: var(--slotted-card-padding-inline-sm, var(--slotted-space-5, 0.75rem));
118
118
  --_card-region-gap: var(--slotted-card-region-gap-sm, var(--slotted-space-2, 0.25rem));
119
119
  }
120
120
 
121
- [data-ui='card'][data-size='lg'] {
121
+ [data-ui-card][data-size='lg'] {
122
122
  --_card-inset-block: var(--slotted-card-padding-block-lg, var(--slotted-space-8, 1.5rem));
123
123
  --_card-inset-inline: var(--slotted-card-padding-inline-lg, var(--slotted-space-8, 1.5rem));
124
124
  --_card-region-gap: var(--slotted-card-region-gap-lg, var(--slotted-space-4, 0.5rem));
@@ -133,9 +133,9 @@
133
133
  * not separate on a white page, and `0 1px 3px rgb(0 0 0 / 0.5)` on a
134
134
  * near-black one is invisible, so `elevated` and `outline` were one picture
135
135
  * in both schemes. It keeps its hairline, because a shadow is removed under
136
- * forced colours and an edge is not.
136
+ * forced colors and an edge is not.
137
137
  */
138
- [data-ui='card'][data-fill='elevated'] {
138
+ [data-ui-card][data-fill='elevated'] {
139
139
  --_card-shadow-rest: var(--slotted-card-shadow, var(--slotted-shadow-md));
140
140
  /* The shadow moves and the edge holds still: elevation is what this fill
141
141
  is made of. */
@@ -158,7 +158,7 @@
158
158
  * being a card at all. A hairline that reads as slightly redundant in two
159
159
  * schemes fails more loudly than a card that disappears in the third.
160
160
  */
161
- [data-ui='card'][data-fill='subtle'] {
161
+ [data-ui-card][data-fill='subtle'] {
162
162
  --_card-surface-rest: var(
163
163
  --slotted-card-background-subtle,
164
164
  var(--slotted-surface-sunken, Canvas)
@@ -182,15 +182,15 @@
182
182
 
183
183
  /**
184
184
  * A card is interactive when it holds a destination or a choice. Every state
185
- * below was previously gated on `[data-part='link']` alone, so the chooser —
185
+ * below was previously gated on `[data-part-link]` alone, so the chooser —
186
186
  * a `<label>` around a native input, which is the whole-card selection this
187
187
  * family documents — answered no hover, no press and no ring.
188
188
  *
189
189
  * The two guards are the state precedence: a disabled card does not answer
190
190
  * the pointer, and neither does a card whose only control is disabled.
191
191
  */
192
- [data-ui='card']:not([data-disabled]):has(
193
- :is([data-part='link'], [data-part='selection'] :is(input, button)):not(:disabled)
192
+ [data-ui-card]:not([data-disabled]):has(
193
+ :is([data-part-link], [data-part-selection] :is(input, button)):not(:disabled)
194
194
  ):hover {
195
195
  --_card-surface: var(--_card-surface-hover);
196
196
  --_card-edge: var(--_card-edge-hover);
@@ -208,21 +208,19 @@
208
208
  * not make. Anything a consumer raises above the hit area — `actions`, the
209
209
  * `footer` — sets its own cursor, because it is its own target.
210
210
  */
211
- [data-ui='card']:not([data-disabled]):has(
212
- :is([data-part='link'], [data-part='selection'] :is(input, button)):not(:disabled)
211
+ [data-ui-card]:not([data-disabled]):has(
212
+ :is([data-part-link], [data-part-selection] :is(input, button)):not(:disabled)
213
213
  ) {
214
214
  cursor: pointer;
215
215
  }
216
216
 
217
- [data-ui='card']:not([data-disabled]):has(
218
- [data-part='selection'] :is(input, button):not(:disabled)
219
- )
217
+ [data-ui-card]:not([data-disabled]):has([data-part-selection] :is(input, button):not(:disabled))
220
218
  :where(*) {
221
219
  cursor: inherit;
222
220
  }
223
221
 
224
- [data-ui='card']:not([data-disabled]):has(
225
- :is([data-part='link'], [data-part='selection'] :is(input, button)):not(:disabled)
222
+ [data-ui-card]:not([data-disabled]):has(
223
+ :is([data-part-link], [data-part-selection] :is(input, button)):not(:disabled)
226
224
  ):active {
227
225
  --_card-surface: var(--_card-surface-active);
228
226
  --_card-edge: var(--_card-edge-active);
@@ -235,7 +233,7 @@
235
233
  * nothing instead of leaving its gap behind — the case a three-region layout
236
234
  * usually gets wrong.
237
235
  */
238
- [data-ui='card'] > :is([data-part='header'], [data-part='body'], [data-part='footer']) {
236
+ [data-ui-card] > :is([data-part-header], [data-part-body], [data-part-footer]) {
239
237
  min-inline-size: 0;
240
238
  padding-block: var(--_card-region-gap);
241
239
  padding-inline: var(--_card-inset-inline);
@@ -244,29 +242,48 @@
244
242
  /* A region at either end absorbs the padding its missing neighbour would
245
243
  have carried, so a card of only a body is not visibly tighter than a full
246
244
  one. Media bleeds, so the region next to it counts as an end. */
247
- [data-ui='card']
248
- > :is([data-part='header'], [data-part='body'], [data-part='footer']):first-child,
249
- [data-ui='card']
250
- > [data-part='media']
251
- + :is([data-part='header'], [data-part='body'], [data-part='footer']) {
245
+ [data-ui-card] > :is([data-part-header], [data-part-body], [data-part-footer]):first-child,
246
+ [data-ui-card]
247
+ > [data-part-media]
248
+ + :is([data-part-header], [data-part-body], [data-part-footer]) {
252
249
  padding-block-start: var(--_card-inset-block);
253
250
  }
254
251
 
255
- [data-ui='card'] > :is([data-part='header'], [data-part='body'], [data-part='footer']):last-child,
256
- [data-ui='card']
257
- > :is([data-part='header'], [data-part='body'], [data-part='footer']):has(
258
- + [data-part='media']
259
- ) {
252
+ [data-ui-card] > :is([data-part-header], [data-part-body], [data-part-footer]):last-child,
253
+ [data-ui-card]
254
+ > :is([data-part-header], [data-part-body], [data-part-footer]):has(+ [data-part-media]) {
260
255
  padding-block-end: var(--_card-inset-block);
261
256
  }
262
257
 
258
+ /**
259
+ * A body that bleeds: its children run from one edge of the card to the
260
+ * other, for a list whose rules reach the edge and whose rows take the full
261
+ * width for their ground. The body gives up its padding, as the media does,
262
+ * and is clipped to the corners of the card it touches. The edge is drawn
263
+ * over the box, so a row's ground passes under it.
264
+ */
265
+ [data-ui-card] > [data-part-body][data-bleed] {
266
+ overflow: clip;
267
+ padding: 0;
268
+ }
269
+
270
+ [data-ui-card]:not([data-orientation='horizontal']) > [data-part-body][data-bleed]:first-child {
271
+ border-start-end-radius: var(--_card-radius);
272
+ border-start-start-radius: var(--_card-radius);
273
+ }
274
+
275
+ [data-ui-card]:not([data-orientation='horizontal']) > [data-part-body][data-bleed]:last-child {
276
+ border-end-end-radius: var(--_card-radius);
277
+ border-end-start-radius: var(--_card-radius);
278
+ }
279
+
263
280
  /**
264
281
  * The header stacks a title and the line that supports it in the first
265
282
  * column, and keeps a second column for whatever belongs in the corner: a
266
283
  * badge, a status, a menu button. Both are Typography and both are the
267
284
  * consumer's, so the header decides only the two distances and the corner.
268
285
  */
269
- [data-ui='card'] > [data-part='header'] {
286
+ [data-ui-card] > [data-part-header] {
270
287
  align-items: start;
271
288
  column-gap: var(--slotted-card-header-column-gap, var(--slotted-space-5, 0.75rem));
272
289
  display: grid;
@@ -274,22 +291,27 @@
274
291
  row-gap: var(--slotted-card-header-gap, var(--slotted-space-2, 0.25rem));
275
292
  }
276
293
 
277
- [data-ui='card'] > [data-part='header'] > * {
294
+ /* A column gap is drawn beside an empty track too, so a header with no corner
295
+ keeps no corner column. */
296
+ [data-ui-card] > [data-part-header]:not(:has(> [data-part-actions])) {
297
+ grid-template-columns: minmax(0, 1fr);
298
+ }
299
+
300
+ [data-ui-card] > [data-part-header] > * {
278
301
  grid-column: 1;
279
302
  min-inline-size: 0;
280
303
  }
281
304
 
282
- /* The corner. It stays on the first row, so a title that wraps to two lines
283
- does not drag the badge down with it, and it takes the last column whether
284
- the header has two or three. */
285
- [data-ui='card'] > [data-part='header'] > [data-part='actions'] {
305
+ /* The corner. Beside a title alone it stays on the first row, and it takes
306
+ the last column whether the header has two or three. */
307
+ [data-ui-card] > [data-part-header] > [data-part-actions] {
286
308
  align-items: center;
287
309
  display: flex;
288
310
  flex-wrap: wrap;
289
- /* Centred on the title's own row rather than on the row's start edge: a
311
+ /* Centerd on the title's own row rather than on the row's start edge: a
290
312
  badge aligned to the line box sits optically high against cap height. */
291
313
  align-self: center;
292
- gap: var(--slotted-card-actions-gap, var(--slotted-space-3, 0.375rem));
314
+ gap: var(--slotted-card-actions-gap, var(--slotted-action-gap, 8px));
293
315
  grid-column: -2 / -1;
294
316
  grid-row: 1;
295
317
  /* Above the stretched hit area, like the footer: a control in the corner
@@ -297,6 +319,45 @@
297
319
  position: relative;
298
320
  }
299
321
 
322
+ /* Beside a title and its description, the corner spans both rows, and the
323
+ last row is flexible: a corner taller than the text grows that row, not
324
+ the distance from the title to the description. */
325
+ [data-ui-card]
326
+ > [data-part-header]:has(
327
+ > :not([data-part-actions], [data-part-selection])
328
+ ~ :not([data-part-actions], [data-part-selection])
329
+ ) {
330
+ grid-template-rows: auto 1fr;
331
+ }
332
+
333
+ [data-ui-card]
334
+ > [data-part-header]:has(
335
+ > :not([data-part-actions], [data-part-selection])
336
+ ~ :not([data-part-actions], [data-part-selection])
337
+ )
338
+ > [data-part-actions] {
339
+ grid-row: 1 / span 2;
340
+ }
341
+
342
+ [data-ui-card]
343
+ > [data-part-header]:has(
344
+ > :not([data-part-actions], [data-part-selection])
345
+ ~ :not([data-part-actions], [data-part-selection])
346
+ ~ :not([data-part-actions], [data-part-selection])
347
+ ) {
348
+ grid-template-rows: auto auto 1fr;
349
+ }
350
+
351
+ [data-ui-card]
352
+ > [data-part-header]:has(
353
+ > :not([data-part-actions], [data-part-selection])
354
+ ~ :not([data-part-actions], [data-part-selection])
355
+ ~ :not([data-part-actions], [data-part-selection])
356
+ )
357
+ > [data-part-actions] {
358
+ grid-row: 1 / span 3;
359
+ }
360
+
300
361
  /**
301
362
  * The place a choice card keeps for its control. It is the slot and not the
302
363
  * glyph: `checkbox radio-group` owns where a check and a dot are drawn, and a
@@ -307,19 +368,23 @@
307
368
  * Carbon, Fluent and Cloudscape trail only because none of them keeps a
308
369
  * corner in the header.
309
370
  */
310
- [data-ui='card'] > [data-part='header']:has([data-part='selection']) {
371
+ [data-ui-card] > [data-part-header]:has([data-part-selection]) {
311
372
  grid-template-columns: auto minmax(0, 1fr) auto;
312
373
  }
313
374
 
314
- [data-ui='card'] > [data-part='header']:has([data-part='selection']) > * {
375
+ [data-ui-card] > [data-part-header]:has([data-part-selection]):not(:has(> [data-part-actions])) {
376
+ grid-template-columns: auto minmax(0, 1fr);
377
+ }
378
+
379
+ [data-ui-card] > [data-part-header]:has([data-part-selection]) > * {
315
380
  grid-column: 2;
316
381
  }
317
382
 
318
- [data-ui='card'] > [data-part='header'] > [data-part='selection'] {
383
+ [data-ui-card] > [data-part-header] > [data-part-selection] {
319
384
  /**
320
385
  * On the title's first line, not in the middle of its block (C1, the rule
321
386
  * R5 gives every mark beside a title): the slot is one line of the title's
322
- * step tall and centres the control inside it, so a title that wraps to
387
+ * step tall and centers the control inside it, so a title that wraps to
323
388
  * two lines keeps its control beside the first. The step is the large one,
324
389
  * which is the title a card header holds; a header set at another step
325
390
  * retunes the line with the family token.
@@ -359,7 +424,7 @@
359
424
  * is the card: the surface is the `<label>`, so the hit area is the whole
360
425
  * card, which is the correction the token foundation asks a family to make.
361
426
  */
362
- [data-ui='card'] > [data-part='header'] > [data-part='selection'] > :is(input, button) {
427
+ [data-ui-card] > [data-part-header] > [data-part-selection] > :is(input, button) {
363
428
  block-size: var(--slotted-card-selection-size, var(--slotted-selection-size-md, 16px));
364
429
  inline-size: var(--slotted-card-selection-size, var(--slotted-selection-size-md, 16px));
365
430
  margin: 0;
@@ -367,16 +432,16 @@
367
432
 
368
433
  /* Cards stretched to a common height in a grid keep their footers on one
369
434
  line, because the body takes the leftover. */
370
- [data-ui='card'] > [data-part='body'] {
435
+ [data-ui-card] > [data-part-body] {
371
436
  flex: 1 1 auto;
372
437
  min-block-size: 0;
373
438
  }
374
439
 
375
- [data-ui='card'] > [data-part='footer'] {
440
+ [data-ui-card] > [data-part-footer] {
376
441
  align-items: center;
377
442
  display: flex;
378
443
  flex-wrap: wrap;
379
- gap: var(--slotted-card-footer-gap, var(--slotted-space-4, 0.5rem));
444
+ gap: var(--slotted-card-footer-gap, var(--slotted-action-gap, 8px));
380
445
  /* Above the stretched hit area: a secondary action belongs in the footer
381
446
  and has to stay operable while the card resolves to somewhere else. */
382
447
  position: relative;
@@ -388,21 +453,21 @@
388
453
  * region's own, and `inset` on the rule lines it up with the text instead.
389
454
  * The regions on either side keep the distance they already had.
390
455
  */
391
- [data-ui='card'] > [data-ui='divider'] {
456
+ [data-ui-card] > [data-ui-divider] {
392
457
  flex-shrink: 0;
393
458
  }
394
459
 
395
- [data-ui='card'][data-orientation='horizontal'] > [data-ui='divider'] {
460
+ [data-ui-card][data-orientation='horizontal'] > [data-ui-divider] {
396
461
  grid-column: 2;
397
462
  }
398
463
 
399
- [data-ui='card'] > [data-part='media'] {
464
+ [data-ui-card] > [data-part-media] {
400
465
  display: block;
401
466
  min-inline-size: 0;
402
467
  overflow: hidden;
403
468
  }
404
469
 
405
- [data-ui='card'] > [data-part='media'] > :is(img, video, canvas, picture, svg) {
470
+ [data-ui-card] > [data-part-media] > :is(img, video, canvas, picture, svg) {
406
471
  block-size: 100%;
407
472
  display: block;
408
473
  inline-size: 100%;
@@ -411,12 +476,12 @@
411
476
 
412
477
  /* The media rounds the corners it touches and no others. The radius is the
413
478
  card's own, less the edge it sits inside. */
414
- [data-ui='card'] > [data-part='media']:first-child {
479
+ [data-ui-card] > [data-part-media]:first-child {
415
480
  border-start-end-radius: var(--_card-radius);
416
481
  border-start-start-radius: var(--_card-radius);
417
482
  }
418
483
 
419
- [data-ui='card'] > [data-part='media']:last-child {
484
+ [data-ui-card] > [data-part-media]:last-child {
420
485
  border-end-end-radius: var(--_card-radius);
421
486
  border-end-start-radius: var(--_card-radius);
422
487
  }
@@ -427,7 +492,7 @@
427
492
  * three of the second. The fourth row is empty until the card reflows, and
428
493
  * an empty row costs nothing because the rhythm is padding, not a gap.
429
494
  */
430
- [data-ui='card'][data-orientation='horizontal'] {
495
+ [data-ui-card][data-orientation='horizontal'] {
431
496
  container-name: slotted-card;
432
497
  container-type: inline-size;
433
498
  display: grid;
@@ -443,7 +508,7 @@
443
508
  grid-template-rows: repeat(4, auto);
444
509
  }
445
510
 
446
- [data-ui='card'][data-orientation='horizontal'] > [data-part='media'] {
511
+ [data-ui-card][data-orientation='horizontal'] > [data-part-media] {
447
512
  border-end-end-radius: 0;
448
513
  border-end-start-radius: var(--_card-radius);
449
514
  border-start-end-radius: 0;
@@ -451,15 +516,15 @@
451
516
  grid-area: 1 / 1 / -1 / 2;
452
517
  }
453
518
 
454
- [data-ui='card'][data-orientation='horizontal'] > [data-part='header'] {
519
+ [data-ui-card][data-orientation='horizontal'] > [data-part-header] {
455
520
  grid-area: 1 / 2;
456
521
  }
457
522
 
458
- [data-ui='card'][data-orientation='horizontal'] > [data-part='body'] {
523
+ [data-ui-card][data-orientation='horizontal'] > [data-part-body] {
459
524
  grid-area: 2 / 2;
460
525
  }
461
526
 
462
- [data-ui='card'][data-orientation='horizontal'] > [data-part='footer'] {
527
+ [data-ui-card][data-orientation='horizontal'] > [data-part-footer] {
463
528
  grid-area: 3 / 2;
464
529
  }
465
530
 
@@ -470,21 +535,21 @@
470
535
  * a literal because CSS forbids a custom property in a container condition.
471
536
  */
472
537
  @container slotted-card (max-inline-size: 24rem) {
473
- [data-ui='card'][data-orientation='horizontal'] > [data-part='media'] {
538
+ [data-ui-card][data-orientation='horizontal'] > [data-part-media] {
474
539
  border-end-start-radius: 0;
475
540
  border-start-end-radius: var(--_card-radius);
476
541
  grid-area: 1 / 1 / 2 / -1;
477
542
  }
478
543
 
479
- [data-ui='card'][data-orientation='horizontal'] > [data-part='header'] {
544
+ [data-ui-card][data-orientation='horizontal'] > [data-part-header] {
480
545
  grid-area: 2 / 1 / 3 / -1;
481
546
  }
482
547
 
483
- [data-ui='card'][data-orientation='horizontal'] > [data-part='body'] {
548
+ [data-ui-card][data-orientation='horizontal'] > [data-part-body] {
484
549
  grid-area: 3 / 1 / 4 / -1;
485
550
  }
486
551
 
487
- [data-ui='card'][data-orientation='horizontal'] > [data-part='footer'] {
552
+ [data-ui-card][data-orientation='horizontal'] > [data-part-footer] {
488
553
  grid-area: 4 / 1 / 5 / -1;
489
554
  }
490
555
  }
@@ -495,7 +560,7 @@
495
560
  * Enter, the context menu and middle-click are the platform's, and the name
496
561
  * is the title rather than every string in the card.
497
562
  */
498
- [data-ui='card'] [data-part='link']::after {
563
+ [data-ui-card] [data-part-link]::after {
499
564
  content: '';
500
565
  inset: 0;
501
566
  position: absolute;
@@ -506,10 +571,10 @@
506
571
  * inverse surface and sits on the edge. In this theme
507
572
  * `--slotted-focus-ring-color` and `--slotted-tone-accent-border` resolve to
508
573
  * the same hex, so a selected card and a focused card were the same image.
509
- * They now differ in colour, in width and in position.
574
+ * They now differ in color, in width and in position.
510
575
  */
511
- [data-ui='card']:has(
512
- :is([data-part='link'], [data-part='selection'] :is(input, button)):focus-visible
576
+ [data-ui-card]:has(
577
+ :is([data-part-link], [data-part-selection] :is(input, button)):focus-visible
513
578
  ) {
514
579
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
515
580
  outline-offset: var(--slotted-focus-ring-offset, 2px);
@@ -525,10 +590,8 @@
525
590
  * surface. Carbon and Fluent avoid the pair by hiding the control outright,
526
591
  * which is not open here — the control is meant to be seen.
527
592
  */
528
- [data-ui='card']:has([data-part='link']) [data-part='link']:focus-visible,
529
- [data-ui='card']:has([data-part='selection'])
530
- [data-part='selection']
531
- :is(input, button):focus-visible {
593
+ [data-ui-card]:has([data-part-link]) [data-part-link]:focus-visible,
594
+ [data-ui-card]:has([data-part-selection]) [data-part-selection] :is(input, button):focus-visible {
532
595
  outline: none;
533
596
  }
534
597
 
@@ -550,7 +613,7 @@
550
613
  * accent's hover and active tints, as a selected row's does, and the edge
551
614
  * holds, because it is already saying the stronger thing.
552
615
  */
553
- [data-ui='card'][data-selected] {
616
+ [data-ui-card][data-selected] {
554
617
  --_card-surface-rest: var(
555
618
  --slotted-card-background-selected,
556
619
  var(--slotted-tone-accent-surface, Canvas)
@@ -583,7 +646,7 @@
583
646
  * mute in every case, and the elevation drops to nothing — a card that cannot
584
647
  * be used does not float above the page.
585
648
  */
586
- [data-ui='card'][data-disabled] {
649
+ [data-ui-card][data-disabled] {
587
650
  --_card-surface: var(--_card-surface-disabled);
588
651
  --_card-edge: var(
589
652
  --slotted-card-border-color-disabled,
@@ -596,7 +659,7 @@
596
659
 
597
660
  /* The card withdraws the hit area it added. Disabling the control itself is
598
661
  the consumer's, because only the control can refuse an interaction. */
599
- [data-ui='card'][data-disabled] [data-part='link']::after {
662
+ [data-ui-card][data-disabled] [data-part-link]::after {
600
663
  display: none;
601
664
  }
602
665
  }
@@ -1,4 +1,5 @@
1
1
  [
2
+ "--slotted-action-gap",
2
3
  "--slotted-border-strong",
3
4
  "--slotted-border-subtle",
4
5
  "--slotted-border-width-thin",