@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.31

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 (205) hide show
  1. package/package.json +13 -1
  2. package/src/accordion/accordion.css +11 -11
  3. package/src/action-bar/action-bar.css +47 -44
  4. package/src/action-bar/action-bar.tokens.json +1 -0
  5. package/src/action-sheet/action-sheet.css +39 -39
  6. package/src/alert/alert.css +97 -97
  7. package/src/alert/alert.tokens.json +6 -1
  8. package/src/app-shell/app-shell.css +456 -329
  9. package/src/app-shell/app-shell.tokens.json +6 -3
  10. package/src/aspect-ratio/aspect-ratio.css +9 -9
  11. package/src/attachment/attachment.css +118 -114
  12. package/src/avatar/avatar.css +96 -66
  13. package/src/avatar/avatar.tokens.json +7 -0
  14. package/src/avatar-group/avatar-group.css +22 -23
  15. package/src/badge/badge.css +54 -46
  16. package/src/badge/badge.tokens.json +5 -0
  17. package/src/breadcrumb/breadcrumb.css +52 -52
  18. package/src/button/button.css +137 -89
  19. package/src/button/button.tokens.json +5 -0
  20. package/src/button-group/button-group.css +80 -79
  21. package/src/button-group/button-group.tokens.json +1 -0
  22. package/src/calendar/calendar.css +139 -109
  23. package/src/calendar/calendar.tokens.json +5 -1
  24. package/src/card/card.css +70 -67
  25. package/src/card/card.tokens.json +1 -0
  26. package/src/carousel/carousel.css +158 -169
  27. package/src/cascader/cascader.css +161 -159
  28. package/src/cascader/cascader.tokens.json +2 -0
  29. package/src/chart/chart.css +288 -267
  30. package/src/chart/chart.tokens.json +4 -0
  31. package/src/checkbox/checkbox.css +143 -148
  32. package/src/checkbox-group/checkbox-group.css +7 -7
  33. package/src/code-block/code-block.css +85 -89
  34. package/src/collapsible/collapsible.css +81 -80
  35. package/src/collapsible/collapsible.tokens.json +1 -0
  36. package/src/color-picker/color-picker.css +106 -114
  37. package/src/column-manager/column-manager.css +111 -119
  38. package/src/combobox/combobox.css +206 -132
  39. package/src/combobox/combobox.tokens.json +4 -0
  40. package/src/command-palette/command-palette.css +155 -102
  41. package/src/command-palette/command-palette.tokens.json +2 -0
  42. package/src/container/container.css +27 -27
  43. package/src/context-menu/context-menu.css +9 -9
  44. package/src/currency-field/currency-field.css +119 -119
  45. package/src/currency-field/currency-field.tokens.json +1 -0
  46. package/src/dashboard-grid/dashboard-grid.css +204 -115
  47. package/src/data-grid/data-grid.css +598 -496
  48. package/src/data-grid/data-grid.tokens.json +5 -1
  49. package/src/data-list/data-list.css +82 -71
  50. package/src/data-list/data-list.tokens.json +2 -1
  51. package/src/date-field/date-field.css +62 -57
  52. package/src/date-field/date-field.tokens.json +1 -0
  53. package/src/date-picker/date-picker.css +117 -58
  54. package/src/date-picker/date-picker.tokens.json +5 -0
  55. package/src/date-range-picker/date-range-picker.css +157 -127
  56. package/src/date-range-picker/date-range-picker.tokens.json +4 -0
  57. package/src/datetime-field/datetime-field.css +90 -90
  58. package/src/datetime-field/datetime-field.tokens.json +1 -0
  59. package/src/datetime-picker/datetime-picker.css +123 -70
  60. package/src/datetime-picker/datetime-picker.tokens.json +4 -1
  61. package/src/datetime-range-picker/datetime-range-picker.css +191 -163
  62. package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
  63. package/src/description-list/description-list.css +105 -75
  64. package/src/description-list/description-list.tokens.json +1 -0
  65. package/src/detail-panel/detail-panel.css +86 -71
  66. package/src/detail-panel/detail-panel.tokens.json +2 -0
  67. package/src/dialog/dialog.css +435 -199
  68. package/src/dialog/dialog.tokens.json +9 -0
  69. package/src/divider/divider.css +20 -20
  70. package/src/drawer/drawer.css +598 -237
  71. package/src/drawer/drawer.tokens.json +14 -0
  72. package/src/entity-picker/entity-picker.css +326 -272
  73. package/src/entity-picker/entity-picker.tokens.json +4 -0
  74. package/src/event-calendar/event-calendar.css +357 -399
  75. package/src/field/field.css +106 -93
  76. package/src/field/field.tokens.json +2 -0
  77. package/src/field-group/field-group.css +43 -33
  78. package/src/field-group/field-group.tokens.json +3 -0
  79. package/src/filter-bar/filter-bar.css +200 -216
  80. package/src/form/form.css +100 -26
  81. package/src/form/form.tokens.json +6 -1
  82. package/src/fullscreen/fullscreen.css +26 -27
  83. package/src/grid/grid.css +29 -29
  84. package/src/highlight/highlight.css +11 -11
  85. package/src/hover-card/hover-card.css +9 -9
  86. package/src/icon/icon.css +67 -20
  87. package/src/icon/icon.tokens.json +1 -0
  88. package/src/image/image.css +42 -42
  89. package/src/import-export-center/import-export-center.css +147 -168
  90. package/src/import-export-center/import-export-center.tokens.json +1 -0
  91. package/src/inline/inline.css +28 -28
  92. package/src/inline-message/inline-message.css +162 -86
  93. package/src/inline-message/inline-message.tokens.json +4 -0
  94. package/src/kbd/kbd.css +62 -50
  95. package/src/kbd/kbd.tokens.json +3 -0
  96. package/src/link/link.css +54 -33
  97. package/src/link/link.tokens.json +4 -0
  98. package/src/list/list.css +23 -23
  99. package/src/list-item/list-item.css +89 -75
  100. package/src/list-item/list-item.tokens.json +7 -0
  101. package/src/listbox/listbox.css +71 -70
  102. package/src/listbox/listbox.tokens.json +0 -1
  103. package/src/loading-overlay/loading-overlay.css +86 -103
  104. package/src/markdown/markdown.css +20 -20
  105. package/src/media-viewer/media-viewer.css +790 -0
  106. package/src/media-viewer/media-viewer.tokens.json +53 -0
  107. package/src/menu/menu.css +166 -83
  108. package/src/menu/menu.tokens.json +3 -1
  109. package/src/menubar/menubar.css +16 -16
  110. package/src/message/message.css +1253 -1246
  111. package/src/message/message.tokens.json +5 -0
  112. package/src/message-scroller/message-scroller.css +323 -320
  113. package/src/multi-select/multi-select.css +233 -174
  114. package/src/multi-select/multi-select.tokens.json +3 -0
  115. package/src/navigation-menu/navigation-menu.css +170 -191
  116. package/src/navigation-menu/navigation-menu.tokens.json +1 -0
  117. package/src/notification-center/notification-center.css +155 -163
  118. package/src/notification-center/notification-center.tokens.json +4 -0
  119. package/src/number-field/number-field.css +93 -93
  120. package/src/number-field/number-field.tokens.json +1 -0
  121. package/src/otp-input/otp-input.css +74 -64
  122. package/src/otp-input/otp-input.tokens.json +1 -0
  123. package/src/page/page.css +41 -27
  124. package/src/page/page.tokens.json +1 -0
  125. package/src/page-header/page-header.css +342 -287
  126. package/src/page-header/page-header.tokens.json +6 -1
  127. package/src/pagination/pagination.css +75 -79
  128. package/src/popover/popover.css +85 -65
  129. package/src/popover/popover.tokens.json +2 -0
  130. package/src/progress-indicator/progress-indicator.css +192 -136
  131. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  132. package/src/prompt-composer/prompt-composer.css +260 -113
  133. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  134. package/src/prose/prose.css +77 -82
  135. package/src/radio-group/radio-group.css +107 -112
  136. package/src/rating/rating.css +146 -142
  137. package/src/rating/rating.tokens.json +1 -0
  138. package/src/result-state/result-state.css +95 -102
  139. package/src/result-state/result-state.tokens.json +1 -0
  140. package/src/runtime-properties.mjs +19 -6
  141. package/src/saved-views/saved-views.css +43 -49
  142. package/src/scroll-area/scroll-area.css +50 -37
  143. package/src/section/section.css +179 -44
  144. package/src/section/section.tokens.json +9 -3
  145. package/src/segmented-control/segmented-control.css +210 -133
  146. package/src/segmented-control/segmented-control.tokens.json +7 -11
  147. package/src/select/select.css +213 -149
  148. package/src/select/select.tokens.json +4 -0
  149. package/src/side-navigation/side-navigation.css +201 -198
  150. package/src/side-navigation/side-navigation.tokens.json +1 -0
  151. package/src/skeleton/skeleton.css +57 -58
  152. package/src/slider/slider.css +101 -103
  153. package/src/sparkline/sparkline.css +75 -53
  154. package/src/sparkline/sparkline.tokens.json +2 -0
  155. package/src/spinner/spinner.css +83 -180
  156. package/src/spinner/spinner.tokens.json +0 -1
  157. package/src/split-button/split-button.css +34 -35
  158. package/src/split-button/split-button.tokens.json +1 -0
  159. package/src/splitter/splitter.css +47 -48
  160. package/src/stack/stack.css +25 -25
  161. package/src/stat-card/stat-card.css +415 -245
  162. package/src/stat-card/stat-card.tokens.json +8 -0
  163. package/src/status-indicator/status-indicator.css +124 -100
  164. package/src/status-indicator/status-indicator.tokens.json +0 -3
  165. package/src/stepper/stepper.css +78 -82
  166. package/src/switch/switch.css +100 -106
  167. package/src/table/table.css +270 -198
  168. package/src/table/table.tokens.json +2 -0
  169. package/src/table-of-contents/table-of-contents.css +60 -59
  170. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  171. package/src/tabs/tabs.css +327 -294
  172. package/src/tabs/tabs.tokens.json +7 -1
  173. package/src/tag/tag.css +109 -88
  174. package/src/tag/tag.tokens.json +10 -0
  175. package/src/tags-input/tags-input.css +152 -87
  176. package/src/tags-input/tags-input.tokens.json +7 -1
  177. package/src/text-field/text-field.css +146 -148
  178. package/src/text-field/text-field.tokens.json +1 -0
  179. package/src/textarea/textarea.css +38 -33
  180. package/src/textarea/textarea.tokens.json +1 -0
  181. package/src/time-field/time-field.css +82 -77
  182. package/src/time-field/time-field.tokens.json +1 -0
  183. package/src/time-picker/time-picker.css +116 -64
  184. package/src/time-picker/time-picker.tokens.json +4 -1
  185. package/src/time-range-picker/time-range-picker.css +168 -140
  186. package/src/time-range-picker/time-range-picker.tokens.json +4 -0
  187. package/src/timeline/timeline.css +280 -292
  188. package/src/timeline/timeline.tokens.json +5 -0
  189. package/src/toast/toast.css +139 -122
  190. package/src/toast/toast.tokens.json +7 -0
  191. package/src/toggle/toggle.css +34 -38
  192. package/src/toggle-group/toggle-group.css +73 -77
  193. package/src/toolbar/toolbar.css +33 -38
  194. package/src/tooltip/tooltip.css +65 -39
  195. package/src/tooltip/tooltip.tokens.json +1 -0
  196. package/src/top-navigation/top-navigation.css +252 -268
  197. package/src/tour/tour.css +68 -74
  198. package/src/tour/tour.tokens.json +1 -0
  199. package/src/transfer/transfer.css +164 -168
  200. package/src/tree/tree.css +113 -121
  201. package/src/typography/typography.css +42 -38
  202. package/src/typography/typography.tokens.json +1 -0
  203. package/src/upload/upload.css +256 -257
  204. package/src/visually-hidden/visually-hidden.css +1 -1
  205. package/src/wizard/wizard.css +187 -199
@@ -19,17 +19,20 @@
19
19
  * fields is a `content` element the family draws, and the legend never
20
20
  * competes with it.
21
21
  */
22
- [data-ui='field-group'][data-part='root'] {
22
+ [data-ui-field-group][data-part-root] {
23
23
  --_font-size: var(--slotted-control-font-size-lg, 14px);
24
24
  /** Legend to its own description, and description to error. */
25
25
  --_message-gap: var(--slotted-field-group-message-gap, var(--slotted-space-2, 0.25rem));
26
26
  /**
27
- * The last thing said about the set, to the first field in it. One step
28
- * wider than the distance between two fields, which is the correction the
29
- * first capture asked for: held at the same value, the description read as
30
- * belonging to the field under it rather than to the set.
27
+ * The last thing said about a question, to its choices: the distance a
28
+ * field's label stands from its control, because a question and its
29
+ * choices are one answer, as a label and its control are. A section
30
+ * stands further from its first field, below.
31
31
  */
32
- --_content-gap: var(--slotted-field-group-content-gap, var(--slotted-space-7, 1.25rem));
32
+ --_content-gap: var(
33
+ --slotted-field-group-content-gap,
34
+ var(--slotted-field-row-gap, var(--slotted-space-3, 0.375rem))
35
+ );
33
36
  /** One field to the next. */
34
37
  --_field-gap: var(--slotted-field-group-field-gap, var(--slotted-space-6, 1rem));
35
38
 
@@ -45,21 +48,31 @@
45
48
  }
46
49
 
47
50
  /* Legend, then what is said about the set, then the set. */
48
- [data-ui='field-group'][data-part='root'] > * + * {
51
+ [data-ui-field-group][data-part-root] > * + * {
49
52
  margin-block-start: var(--_message-gap);
50
53
  }
51
54
 
52
55
  /* `inline-message` zeroes its root's margin at the weight of the rule above,
53
56
  so the order the two stylesheets load in decided the gap; a third
54
57
  attribute decides it here. */
55
- [data-ui='field-group'][data-part='root'] > * + [data-ui='inline-message'] {
58
+ [data-ui-field-group][data-part-root] > * + [data-ui-inline-message] {
56
59
  margin-block-start: var(--_message-gap);
57
60
  }
58
61
 
59
- [data-ui='field-group'][data-part='root'] > [data-part='content'] {
62
+ [data-ui-field-group][data-part-root] > [data-part-content] {
60
63
  margin-block-start: var(--_content-gap);
61
64
  }
62
65
 
66
+ /**
67
+ * The last thing said about a section, to the first field in it. One step
68
+ * wider than the distance between two fields, which is the correction the
69
+ * first capture asked for: held at the same value, the description read as
70
+ * belonging to the field under it rather than to the set.
71
+ */
72
+ [data-ui-field-group][data-part-root][data-kind='section'] {
73
+ --_content-gap: var(--slotted-field-group-section-content-gap, var(--slotted-space-7, 1.25rem));
74
+ }
75
+
63
76
  /* ── Size ─────────────────────────────────────────────────────────────
64
77
  *
65
78
  * The same three steps a field has, and for the same reason: a group in a
@@ -69,15 +82,15 @@
69
82
  * because a third type scale would be a fourth thing for a theme to retune.
70
83
  */
71
84
 
72
- [data-ui='field-group'][data-part='root'][data-size='sm'] {
85
+ [data-ui-field-group][data-part-root][data-size='sm'] {
73
86
  --_font-size: var(--slotted-control-font-size-md, 13px);
74
87
  }
75
88
 
76
- [data-ui='field-group'][data-part='root'][data-size='md'] {
89
+ [data-ui-field-group][data-part-root][data-size='md'] {
77
90
  --_font-size: var(--slotted-control-font-size-lg, 14px);
78
91
  }
79
92
 
80
- [data-ui='field-group'][data-part='root'][data-size='lg'] {
93
+ [data-ui-field-group][data-part-root][data-size='lg'] {
81
94
  --_font-size: var(--slotted-control-font-size-lg, 14px);
82
95
  }
83
96
 
@@ -90,7 +103,7 @@
90
103
  * recommendation work: on a page asking one question, the legend contains the
91
104
  * page's `h1`, so a reader hears the question once rather than twice.
92
105
  */
93
- [data-ui='field-group'] > [data-part='legend'] {
106
+ [data-ui-field-group] > [data-part-legend] {
94
107
  color: var(--slotted-field-group-legend-color, var(--slotted-text));
95
108
  display: block;
96
109
  font-size: var(--_font-size);
@@ -110,9 +123,10 @@
110
123
  * is. The glyph takes the danger ink and the words do not, which is the field
111
124
  * family's decision applied to the element one level up.
112
125
  */
113
- [data-ui='field-group'] > [data-part='legend'] > [data-part='mark'] {
126
+ [data-ui-field-group] > [data-part-legend] > [data-part-mark] {
114
127
  color: var(--slotted-field-group-mark-color, var(--slotted-tone-danger-text));
115
- margin-inline-start: var(--slotted-field-group-mark-gap, var(--slotted-space-2, 0.25rem));
128
+ /* The space written before the mark is the distance; the token adds to it. */
129
+ margin-inline-start: var(--slotted-field-group-mark-gap, 0);
116
130
  overflow-wrap: normal;
117
131
  /* Its own bidi run, for the reason the field's marker records: a Latin
118
132
  legend in a right-to-left document is one left-to-right run, and a marker
@@ -131,7 +145,7 @@
131
145
  * `font: inherit` here would shrink every question page's title to the size
132
146
  * of a form label.
133
147
  */
134
- [data-ui='field-group'] > [data-part='legend'] > :is(h1, h2, h3, h4, h5, h6) {
148
+ [data-ui-field-group] > [data-part-legend] > :is(h1, h2, h3, h4, h5, h6) {
135
149
  display: inline;
136
150
  font-family: var(
137
151
  --slotted-font-family-heading,
@@ -140,9 +154,9 @@
140
154
  margin: 0;
141
155
  }
142
156
 
143
- [data-ui='field-group']:is([data-necessity='optional'], [data-necessity='words'])
144
- > [data-part='legend']
145
- > [data-part='mark'] {
157
+ [data-ui-field-group]:is([data-necessity='optional'], [data-necessity='words'])
158
+ > [data-part-legend]
159
+ > [data-part-mark] {
146
160
  color: var(--slotted-field-group-mark-text-color, var(--slotted-text-muted));
147
161
  font-size: var(--slotted-control-font-size-sm, 12px);
148
162
  font-weight: var(--slotted-font-weight-regular, 400);
@@ -154,8 +168,7 @@
154
168
  * below from moving when the error arrives. The same two rules the field
155
169
  * writes, because the group holds the same two messages.
156
170
  */
157
- [data-ui='field-group']
158
- > [data-ui='inline-message']:not([data-reserve]):has([data-part='text']:empty) {
171
+ [data-ui-field-group] > [data-ui-inline-message]:not([data-reserve]):has([data-part-text]:empty) {
159
172
  display: none;
160
173
  }
161
174
 
@@ -167,12 +180,12 @@
167
180
  * selector carries the root's part so it outweighs the message family's own
168
181
  * root rule, which has the same two attributes.
169
182
  */
170
- [data-ui='field-group'][data-part='root'] > [data-ui='inline-message'] {
183
+ [data-ui-field-group][data-part-root] > [data-ui-inline-message] {
171
184
  font-size: var(--slotted-font-size-xs, 0.75rem);
172
185
  }
173
186
 
174
- [data-ui='field-group'][data-part='root'] > [data-ui='inline-message'][data-tone='danger'],
175
- [data-ui='field-group'][data-part='root'] > [data-ui='inline-message'][data-tone='success'] {
187
+ [data-ui-field-group][data-part-root] > [data-ui-inline-message][data-tone='danger'],
188
+ [data-ui-field-group][data-part-root] > [data-ui-inline-message][data-tone='success'] {
176
189
  font-weight: var(--slotted-font-weight-medium, 500);
177
190
  }
178
191
 
@@ -188,19 +201,19 @@
188
201
  * a scale: `14rem` holds a date, a document number or a short name at the `md`
189
202
  * step without the control clipping what is being typed into it.
190
203
  */
191
- [data-ui='field-group'] > [data-part='content'] {
204
+ [data-ui-field-group] > [data-part-content] {
192
205
  display: flex;
193
206
  flex-direction: column;
194
207
  gap: var(--_field-gap);
195
208
  min-inline-size: 0;
196
209
  }
197
210
 
198
- [data-ui='field-group'][data-orientation='horizontal'] > [data-part='content'] {
211
+ [data-ui-field-group][data-orientation='horizontal'] > [data-part-content] {
199
212
  flex-direction: row;
200
213
  flex-wrap: wrap;
201
214
  }
202
215
 
203
- [data-ui='field-group'][data-orientation='horizontal'] > [data-part='content'] > * {
216
+ [data-ui-field-group][data-orientation='horizontal'] > [data-part-content] > * {
204
217
  flex: 1 1 var(--slotted-field-group-track-min, 14rem);
205
218
  min-inline-size: 0;
206
219
  }
@@ -214,13 +227,10 @@
214
227
  *
215
228
  * The fields inside are muted by the group providing `disabled` to them, not
216
229
  * by a descendant selector: a field used outside a group would then have no
217
- * disabled appearance at all, which is the defect
218
- * `docs/history/designs/2026-08-31-field-aware-controls-design.md` records.
230
+ * disabled appearance at all.
219
231
  */
220
- [data-ui='field-group'][data-part='root'][data-disabled] > [data-part='legend'],
221
- [data-ui='field-group'][data-part='root'][data-disabled]
222
- > [data-part='legend']
223
- > [data-part='mark'] {
232
+ [data-ui-field-group][data-part-root][data-disabled] > [data-part-legend],
233
+ [data-ui-field-group][data-part-root][data-disabled] > [data-part-legend] > [data-part-mark] {
224
234
  color: var(--slotted-disabled-foreground);
225
235
  }
226
236
  }
@@ -16,7 +16,9 @@
16
16
  "--slotted-field-group-mark-gap",
17
17
  "--slotted-field-group-mark-text-color",
18
18
  "--slotted-field-group-message-gap",
19
+ "--slotted-field-group-section-content-gap",
19
20
  "--slotted-field-group-track-min",
21
+ "--slotted-field-row-gap",
20
22
  "--slotted-font-family-heading",
21
23
  "--slotted-font-family-sans",
22
24
  "--slotted-font-size-xs",
@@ -25,6 +27,7 @@
25
27
  "--slotted-font-weight-semibold",
26
28
  "--slotted-line-height-sm",
27
29
  "--slotted-space-2",
30
+ "--slotted-space-3",
28
31
  "--slotted-space-6",
29
32
  "--slotted-space-7",
30
33
  "--slotted-text",