@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
@@ -1,13 +1,13 @@
1
1
  @layer slotted.components {
2
2
  /**
3
- * One unit of content inside a page: a header — eyebrow, heading,
3
+ * One unit of content inside a page: a header — eyebrow, heading, tags,
4
4
  * description, actions — and a body one outline step deeper.
5
5
  *
6
- * ┌──────────────────────────────────────┬──────────┐
7
- * │ header ▸ title ▸ eyebrow │ actions │
8
- * │ heading │ │
9
- * │ description │ │
10
- * ├──────────────────────────────────────┴──────────┤
6
+ * ┌─────────────────────────────────────────────────┐
7
+ * │ header ▸ title ▸ eyebrow │
8
+ * │ heading tags actions │ ← one baseline
9
+ * │ description │
10
+ * ├─────────────────────────────────────────────────┤
11
11
  * │ body │
12
12
  * └─────────────────────────────────────────────────┘
13
13
  *
@@ -15,13 +15,26 @@
15
15
  * sections, and the families inside it — a card, a description-list — have
16
16
  * a `header`, an `actions` and a `description` of their own.
17
17
  */
18
- [data-ui='section'] {
18
+ [data-ui-section] {
19
19
  --_gap: var(--slotted-section-gap, var(--slotted-space-5, 0.75rem));
20
20
  --_text: var(--slotted-text, CanvasText);
21
21
  --_muted: var(--slotted-text-muted, GrayText);
22
22
  --_rule: var(--slotted-section-border, var(--slotted-border-subtle, ButtonBorder));
23
- --_heading-size: var(--slotted-section-heading-size-md, var(--slotted-font-size-lg, 1rem));
24
- --_heading-line-height: var(--slotted-line-height-lg, 1.5);
23
+ /**
24
+ * A section's heading is a label in small capitals; a subsection's, mixed
25
+ * case one step larger. Each section reads the pair for its own size and
26
+ * uses the one its depth calls for.
27
+ */
28
+ --_heading-size: var(--slotted-section-heading-size-md, var(--slotted-font-size-xs, 0.75rem));
29
+ --_heading-line-height: var(--slotted-line-height-xs, 1.4);
30
+ --_subheading-size: var(
31
+ --slotted-section-subheading-size-md,
32
+ var(--slotted-font-size-md, 0.875rem)
33
+ );
34
+ --_subheading-line-height: var(--slotted-line-height-md, 1.5);
35
+ /* The heading as a title: mixed case, for a panel whose body outweighs a label. */
36
+ --_title-size: var(--slotted-section-title-size-md, var(--slotted-font-size-lg, 1rem));
37
+ --_title-line-height: var(--slotted-line-height-lg, 1.5);
25
38
  /**
26
39
  * The ground a sticky header paints, so the content passing under it is
27
40
  * covered rather than read through. The page states its own ground in
@@ -42,20 +55,53 @@
42
55
  scroll-margin-block-start: var(--slotted-page-sticky-top, 0px);
43
56
  }
44
57
 
45
- [data-ui='section'][data-size='sm'] {
46
- --_heading-size: var(--slotted-section-heading-size-sm, var(--slotted-font-size-md, 0.875rem));
47
- --_heading-line-height: var(--slotted-line-height-md, 1.5);
58
+ [data-ui-section][data-size='sm'] {
59
+ --_heading-size: var(--slotted-section-heading-size-sm, var(--slotted-font-size-xs, 0.75rem));
60
+ --_heading-line-height: var(--slotted-line-height-xs, 1.4);
61
+ --_subheading-size: var(
62
+ --slotted-section-subheading-size-sm,
63
+ var(--slotted-font-size-sm, 0.8125rem)
64
+ );
65
+ --_subheading-line-height: var(--slotted-line-height-sm, 1.45);
66
+ --_title-size: var(--slotted-section-title-size-sm, var(--slotted-font-size-md, 0.875rem));
67
+ --_title-line-height: var(--slotted-line-height-md, 1.5);
68
+ }
69
+ [data-ui-section][data-size='lg'] {
70
+ --_heading-size: var(--slotted-section-heading-size-lg, var(--slotted-font-size-sm, 0.8125rem));
71
+ --_heading-line-height: var(--slotted-line-height-sm, 1.45);
72
+ --_subheading-size: var(
73
+ --slotted-section-subheading-size-lg,
74
+ var(--slotted-font-size-lg, 1rem)
75
+ );
76
+ --_subheading-line-height: var(--slotted-line-height-lg, 1.5);
77
+ --_title-size: var(--slotted-section-title-size-lg, var(--slotted-font-size-xl, 1.125rem));
78
+ --_title-line-height: var(--slotted-line-height-xl, 1.5);
79
+ }
80
+
81
+ /**
82
+ * The distance between sections is the family's where sections follow one
83
+ * another in flow: in a page's container, in the body of a drawer, a dialog,
84
+ * a card or another section. There no consumer margin or gap is written
85
+ * between them. One token after a section, another before a subsection
86
+ * that follows content in a body.
87
+ *
88
+ * Elsewhere the parent's layout decides. A stack's gap or a dashboard
89
+ * grid's areas already space their children, and a margin on a grid item
90
+ * would push its cell off the row; a section wrapped in a component of its
91
+ * own has no section beside it to follow.
92
+ */
93
+ :is([data-ui-container], [data-part-body]) > [data-ui-section] + [data-ui-section] {
94
+ margin-block-start: var(--slotted-section-spacing, var(--slotted-space-9, 2rem));
48
95
  }
49
- [data-ui='section'][data-size='lg'] {
50
- --_heading-size: var(--slotted-section-heading-size-lg, var(--slotted-font-size-xl, 1.125rem));
51
- --_heading-line-height: var(--slotted-line-height-xl, 1.45);
96
+ [data-ui-section] > [data-part-body] > [data-ui-section]:not(:first-child) {
97
+ margin-block-start: var(--slotted-section-subsection-spacing, var(--slotted-space-7, 1.25rem));
52
98
  }
53
99
 
54
100
  /**
55
101
  * A surface and not a card: a raised ground, a subtle edge, the large
56
102
  * radius, one step of inset, and no shadow, no hover, no action.
57
103
  */
58
- [data-ui='section'][data-ground='surface'] {
104
+ [data-ui-section][data-ground='surface'] {
59
105
  --_ground: var(--slotted-section-surface, var(--slotted-surface-raised, Canvas));
60
106
  /* Published, as a card's is, for the families that state a ground inside it. */
61
107
  --slotted-ground: var(--_ground);
@@ -67,26 +113,53 @@
67
113
 
68
114
  /* ── The header ──────────────────────────────────────────────────────── */
69
115
 
70
- [data-ui='section'] > [data-part='header'] {
71
- align-items: flex-start;
72
- display: flex;
73
- flex-wrap: wrap;
74
- gap: var(--slotted-space-3, 0.375rem) var(--slotted-space-6, 1rem);
116
+ /**
117
+ * Three rows — eyebrow, heading, description — and the actions in a column
118
+ * of their own on the heading's row. The title is a subgrid of those rows,
119
+ * so the heading, its tags and the actions are items of one row and share
120
+ * the heading's first baseline, whatever stands above or below the heading.
121
+ * A row with nothing in it takes no space: the distances between rows are
122
+ * margins on the parts, not a gap an empty row would still open.
123
+ *
124
+ * The header is a size container so the actions can leave the heading's
125
+ * row when the header is too narrow to hold both; the tags never do.
126
+ */
127
+ [data-ui-section] > [data-part-header] {
128
+ align-items: baseline;
129
+ container-type: inline-size;
130
+ display: grid;
131
+ grid-template-columns: minmax(0, 1fr);
132
+ /* The title takes the three middle rows. The flexible rows above and
133
+ below it are empty, so actions taller than the title grow them and not
134
+ the distance from the heading to the description. */
135
+ grid-template-rows: 1fr auto auto auto 1fr;
75
136
  min-inline-size: 0;
76
137
  }
77
138
 
78
- [data-ui='section'][data-divider] > [data-part='header'] {
139
+ [data-ui-section][data-divider] > [data-part-header] {
79
140
  border-block-end: var(--slotted-border-width-thin, 1px) solid var(--_rule);
80
141
  padding-block-end: var(--slotted-space-4, 0.5rem);
81
142
  }
82
143
 
144
+ /**
145
+ * On a surface the rule runs from edge to edge of the surface, not of its
146
+ * padding: the header takes the inset back as margin and keeps it as
147
+ * padding, so its contents stay where they were.
148
+ */
149
+ [data-ui-section][data-ground='surface'][data-divider] > [data-part-header] {
150
+ margin-inline: calc(-1 * var(--slotted-section-inset, var(--slotted-space-6, 1rem)));
151
+ padding-inline: var(--slotted-section-inset, var(--slotted-space-6, 1rem));
152
+ }
153
+
83
154
  /**
84
155
  * Under the page chrome, and painted, so what scrolls under it is covered.
85
- * The inset a surface section gives its header is kept by sticking the
156
+ * The header writes `data-stuck` while content passes under it, so a theme
157
+ * whose page ground is translucent can fill it only then, through
158
+ * `--slotted-section-header-background`. The inset a surface section gives its header is kept by sticking the
86
159
  * header at the same distance the surface's padding put it at.
87
160
  */
88
- [data-ui='section'][data-sticky] > [data-part='header'] {
89
- background-color: var(--_ground);
161
+ [data-ui-section][data-sticky] > [data-part-header] {
162
+ background-color: var(--slotted-section-header-background, var(--_ground));
90
163
  inset-block-start: var(--slotted-page-sticky-top, 0px);
91
164
  /* Stuck, the header's text and buttons met the chrome's edge with no
92
165
  air. The padding gives it, and the negative margin takes the same
@@ -108,70 +181,262 @@
108
181
  * The alias on the root is what keeps the redefinition from referring to
109
182
  * itself.
110
183
  */
111
- [data-ui='section'][data-sticky] {
184
+ [data-ui-section][data-sticky] {
112
185
  --_above: var(--slotted-page-sticky-top, 0px);
113
186
  }
114
- [data-ui='section'][data-sticky] > [data-part='body'] {
187
+ [data-ui-section][data-sticky] > [data-part-body] {
115
188
  --slotted-page-sticky-top: calc(var(--_above) + var(--slotted-section-header-size, 0px));
116
189
  --slotted-table-sticky-offset: var(--slotted-page-sticky-top);
117
190
  }
118
191
 
119
- [data-ui='section'] > [data-part='header'] > [data-part='title'] {
120
- display: flex;
121
- flex: 1 1 16rem;
122
- flex-direction: column;
123
- gap: var(--slotted-space-1, 0.125rem);
192
+ /**
193
+ * The heading's column is as wide as its text and no wider, the tags' takes
194
+ * the rest, so a badge stands against the heading's last word. The tags'
195
+ * column is flexible, which is what keeps the eyebrow and the description,
196
+ * spanning both, from widening the heading's. When space runs out the
197
+ * heading wraps between words, never inside one, and the badges stack in
198
+ * their column; the tags never leave the heading's row.
199
+ */
200
+ [data-ui-section] > [data-part-header] > [data-part-title] {
201
+ /* The heading's text, which an inline icon button in the tags takes too. */
202
+ --_text-size: var(--_heading-size);
203
+ --_text-line-height: var(--_heading-line-height);
204
+ align-items: baseline;
205
+ display: grid;
206
+ grid-column: 1;
207
+ grid-row: 2 / span 3;
208
+ grid-template-columns: minmax(min-content, max-content) 1fr;
209
+ grid-template-rows: subgrid;
124
210
  min-inline-size: 0;
125
211
  }
126
212
 
127
- [data-ui='section'] > [data-part='header'] > [data-part='title'] > [data-part='eyebrow'] {
213
+ [data-ui-section] > [data-part-header] > [data-part-title] > [data-part-eyebrow] {
128
214
  color: var(--_muted);
129
215
  font-size: var(--slotted-font-size-xs, 0.75rem);
216
+ grid-column: 1 / -1;
217
+ grid-row: 1;
218
+ margin-block-end: var(--slotted-space-1, 0.125rem);
130
219
  font-weight: var(--slotted-font-weight-semibold, 600);
131
220
  letter-spacing: 0.06em;
132
221
  line-height: var(--slotted-line-height-xs, 1.4);
133
222
  text-transform: uppercase;
134
223
  }
135
224
 
136
- [data-ui='section'] > [data-part='header'] > [data-part='title'] > [data-part='heading'] {
225
+ [data-ui-section] > [data-part-header] > [data-part-title] > [data-part-heading] {
137
226
  color: var(--_text);
138
227
  font-family: var(
139
228
  --slotted-font-family-heading,
140
229
  var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
141
230
  );
142
- font-size: var(--_heading-size);
231
+ font-size: var(--_text-size);
143
232
  font-weight: var(--slotted-font-weight-semibold, 600);
144
- letter-spacing: -0.01em;
145
- line-height: var(--_heading-line-height);
233
+ letter-spacing: 0.08em;
234
+ line-height: var(--_text-line-height);
235
+ text-transform: uppercase;
236
+ grid-column: 1;
237
+ grid-row: 2;
146
238
  margin: 0;
147
239
  min-inline-size: 0;
148
- overflow-wrap: anywhere;
240
+ overflow-wrap: break-word;
149
241
  text-wrap: pretty;
150
242
  }
151
243
 
152
- [data-ui='section'] > [data-part='header'] > [data-part='title'] > [data-part='description'] {
244
+ /**
245
+ * `heading="title"`: the heading in mixed case at a larger step, for a
246
+ * section whose body opens with text heavier than a label. It stands above
247
+ * the subsection's rule, so a nested section keeps the subsection's form.
248
+ */
249
+ [data-ui-section][data-heading='title'] > [data-part-header] > [data-part-title] {
250
+ --_text-size: var(--_title-size);
251
+ --_text-line-height: var(--_title-line-height);
252
+ }
253
+
254
+ [data-ui-section][data-heading='title']
255
+ > [data-part-header]
256
+ > [data-part-title]
257
+ > [data-part-heading] {
258
+ letter-spacing: normal;
259
+ text-transform: none;
260
+ }
261
+
262
+ /**
263
+ * A subsection: the case, the size and the tone all change, so the level is
264
+ * read without the color. The text stays the muted token, which the theme
265
+ * holds above 4.5:1 on every ground a section stands on.
266
+ */
267
+ [data-ui-section] [data-ui-section] > [data-part-header] > [data-part-title] {
268
+ --_text-size: var(--_subheading-size);
269
+ --_text-line-height: var(--_subheading-line-height);
270
+ }
271
+
272
+ [data-ui-section]
273
+ [data-ui-section]
274
+ > [data-part-header]
275
+ > [data-part-title]
276
+ > [data-part-heading] {
277
+ color: var(--_muted);
278
+ letter-spacing: normal;
279
+ text-transform: none;
280
+ }
281
+
282
+ /**
283
+ * Beside the heading and outside it, so a badge is not read into the
284
+ * region's name. A badge is a box around a line of text, and its label's
285
+ * baseline is the one the row aligns.
286
+ */
287
+ [data-ui-section] > [data-part-header] > [data-part-title] > [data-part-tags] {
288
+ align-items: baseline;
289
+ display: flex;
290
+ flex-wrap: wrap;
291
+ gap: var(--slotted-space-3, 0.375rem);
292
+ grid-column: 2;
293
+ grid-row: 2;
294
+ justify-self: start;
295
+ margin-inline-start: var(--slotted-space-4, 0.5rem);
296
+ }
297
+ [data-ui-section] > [data-part-header] > [data-part-title] > [data-part-tags]:empty {
298
+ display: none;
299
+ }
300
+
301
+ /**
302
+ * An inline icon button is a mark on the text before it, so it takes the
303
+ * heading's text and keeps the distance it keeps after a word: its own
304
+ * margin, with neither the tags' margin nor their gap added to it.
305
+ */
306
+ [data-ui-section]
307
+ > [data-part-header]
308
+ > [data-part-title]
309
+ > [data-part-tags]
310
+ > [data-ui-button][data-shape][data-inline] {
311
+ font-family: var(
312
+ --slotted-font-family-heading,
313
+ var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
314
+ );
315
+ font-size: var(--_text-size);
316
+ line-height: var(--_text-line-height);
317
+ }
318
+
319
+ [data-ui-section]
320
+ > [data-part-header]
321
+ > [data-part-title]
322
+ > [data-part-tags]:has(> [data-ui-button][data-shape][data-inline]:first-child) {
323
+ margin-inline-start: 0;
324
+ }
325
+
326
+ [data-ui-section]
327
+ > [data-part-header]
328
+ > [data-part-title]
329
+ > [data-part-tags]
330
+ > [data-ui-button][data-shape][data-inline]:not(:first-child) {
331
+ margin-inline-start: calc(0.25em - var(--slotted-space-3, 0.375rem));
332
+ }
333
+
334
+ [data-ui-section] > [data-part-header] > [data-part-title] > [data-part-description] {
153
335
  color: var(--_muted);
154
336
  font-size: var(--slotted-font-size-sm, 0.8125rem);
337
+ grid-column: 1 / -1;
338
+ grid-row: 3;
155
339
  line-height: var(--slotted-line-height-sm, 1.45);
156
- margin: 0;
340
+ margin: var(--slotted-section-description-gap, var(--slotted-space-1, 0.125rem)) 0 0;
157
341
  max-inline-size: var(--slotted-section-description-measure, 70ch);
158
342
  text-wrap: pretty;
159
343
  }
160
344
 
161
- [data-ui='section'] > [data-part='header'] > [data-part='actions'] {
345
+ /* An implicit column: a header with no actions has one column and no gap. */
346
+ [data-ui-section] > [data-part-header] > [data-part-actions] {
347
+ /* An action slot states one size for the links it holds. */
348
+ --slotted-link-font-size: var(--slotted-font-size-sm, 0.8125rem);
349
+
162
350
  align-items: center;
351
+ align-self: center;
163
352
  display: flex;
164
- flex: none;
165
- gap: var(--slotted-control-gap-md, 8px);
166
- margin-inline-start: auto;
353
+ gap: var(--slotted-action-gap, 8px);
354
+ grid-column: 2;
355
+ grid-row: 1 / -1;
356
+ margin-inline-start: var(--slotted-space-6, 1rem);
167
357
  }
168
- [data-ui='section'] > [data-part='header'] > [data-part='actions']:empty {
358
+ [data-ui-section] > [data-part-header] > [data-part-actions]:empty {
169
359
  display: none;
170
360
  }
171
361
 
362
+ /**
363
+ * Too narrow for the heading, its tags and the actions on one row: the
364
+ * actions take a row of their own under the description, at the end. The
365
+ * tags stay beside the heading at every width.
366
+ */
367
+ @container (inline-size < 20rem) {
368
+ [data-ui-section] > [data-part-header] > [data-part-actions] {
369
+ grid-column: 1 / -1;
370
+ grid-row: 6;
371
+ justify-self: end;
372
+ margin: var(--slotted-space-3, 0.375rem) 0 0;
373
+ }
374
+ }
375
+
172
376
  /* ── The body ────────────────────────────────────────────────────────── */
173
377
 
174
- [data-ui='section'] > [data-part='body'] {
378
+ [data-ui-section] > [data-part-body] {
175
379
  min-inline-size: 0;
176
380
  }
381
+
382
+ /**
383
+ * A body that bleeds, in a surface section: a table or a grid with no frame
384
+ * of its own runs to the panel's inline edges, and to the block edge the
385
+ * body touches, where it is clipped to the panel's inner corners. The body
386
+ * takes back the inset the surface gave it; written by hand, the same
387
+ * margins left a grid one inset short of the panel's end edge. `clip` and
388
+ * not `hidden`, so a sticky header inside still sticks to the page.
389
+ */
390
+ [data-ui-section][data-ground='surface'] > [data-part-body][data-bleed] {
391
+ --_inner-radius: calc(
392
+ var(--slotted-section-radius, var(--slotted-radius-lg, 8px)) -
393
+ var(--slotted-border-width-thin, 1px)
394
+ );
395
+
396
+ margin-inline: calc(-1 * var(--slotted-section-inset, var(--slotted-space-6, 1rem)));
397
+ overflow: clip;
398
+ }
399
+
400
+ [data-ui-section][data-ground='surface'] > [data-part-body][data-bleed]:first-child {
401
+ border-start-end-radius: var(--_inner-radius);
402
+ border-start-start-radius: var(--_inner-radius);
403
+ margin-block-start: calc(-1 * var(--slotted-section-inset, var(--slotted-space-6, 1rem)));
404
+ }
405
+
406
+ [data-ui-section][data-ground='surface'] > [data-part-body][data-bleed]:last-child {
407
+ border-end-end-radius: var(--_inner-radius);
408
+ border-end-start-radius: var(--_inner-radius);
409
+ margin-block-end: calc(-1 * var(--slotted-section-inset, var(--slotted-space-6, 1rem)));
410
+ }
411
+
412
+ /**
413
+ * A child of the body that bleeds alone, for a body that holds more than its
414
+ * table: the same margins on the child, in the body or in the one stack the
415
+ * body holds, and the same corners when it is the last of the panel.
416
+ */
417
+ [data-ui-section][data-ground='surface'] > [data-part-body] > [data-part-bleed],
418
+ [data-ui-section][data-ground='surface'] > [data-part-body] > * > [data-part-bleed] {
419
+ --_inner-radius: calc(
420
+ var(--slotted-section-radius, var(--slotted-radius-lg, 8px)) -
421
+ var(--slotted-border-width-thin, 1px)
422
+ );
423
+
424
+ justify-self: stretch;
425
+ margin-inline: calc(-1 * var(--slotted-section-inset, var(--slotted-space-6, 1rem)));
426
+ max-inline-size: none;
427
+ min-inline-size: 0;
428
+ overflow: clip;
429
+ }
430
+
431
+ [data-ui-section][data-ground='surface']
432
+ > [data-part-body]:last-child
433
+ > [data-part-bleed]:last-child,
434
+ [data-ui-section][data-ground='surface']
435
+ > [data-part-body]:last-child
436
+ > :last-child
437
+ > [data-part-bleed]:last-child {
438
+ border-end-end-radius: var(--_inner-radius);
439
+ border-end-start-radius: var(--_inner-radius);
440
+ margin-block-end: calc(-1 * var(--slotted-section-inset, var(--slotted-space-6, 1rem)));
441
+ }
177
442
  }
@@ -1,7 +1,7 @@
1
1
  [
2
+ "--slotted-action-gap",
2
3
  "--slotted-border-subtle",
3
4
  "--slotted-border-width-thin",
4
- "--slotted-control-gap-md",
5
5
  "--slotted-font-family-heading",
6
6
  "--slotted-font-family-sans",
7
7
  "--slotted-font-size-lg",
@@ -18,19 +18,31 @@
18
18
  "--slotted-page-ground",
19
19
  "--slotted-radius-lg",
20
20
  "--slotted-section-border",
21
+ "--slotted-section-description-gap",
21
22
  "--slotted-section-description-measure",
22
23
  "--slotted-section-gap",
24
+ "--slotted-section-header-background",
23
25
  "--slotted-section-heading-size-lg",
24
26
  "--slotted-section-heading-size-md",
25
27
  "--slotted-section-heading-size-sm",
26
28
  "--slotted-section-inset",
27
29
  "--slotted-section-radius",
30
+ "--slotted-section-spacing",
31
+ "--slotted-section-subheading-size-lg",
32
+ "--slotted-section-subheading-size-md",
33
+ "--slotted-section-subheading-size-sm",
34
+ "--slotted-section-subsection-spacing",
28
35
  "--slotted-section-surface",
36
+ "--slotted-section-title-size-lg",
37
+ "--slotted-section-title-size-md",
38
+ "--slotted-section-title-size-sm",
29
39
  "--slotted-space-1",
30
40
  "--slotted-space-3",
31
41
  "--slotted-space-4",
32
42
  "--slotted-space-5",
33
43
  "--slotted-space-6",
44
+ "--slotted-space-7",
45
+ "--slotted-space-9",
34
46
  "--slotted-surface",
35
47
  "--slotted-surface-raised",
36
48
  "--slotted-text",