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

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 (199) 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 +96 -96
  7. package/src/alert/alert.tokens.json +5 -0
  8. package/src/app-shell/app-shell.css +455 -328
  9. package/src/app-shell/app-shell.tokens.json +5 -2
  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 +68 -65
  25. package/src/carousel/carousel.css +158 -169
  26. package/src/cascader/cascader.css +158 -157
  27. package/src/cascader/cascader.tokens.json +1 -0
  28. package/src/chart/chart.css +288 -267
  29. package/src/chart/chart.tokens.json +4 -0
  30. package/src/checkbox/checkbox.css +143 -148
  31. package/src/checkbox-group/checkbox-group.css +7 -7
  32. package/src/code-block/code-block.css +85 -89
  33. package/src/collapsible/collapsible.css +76 -80
  34. package/src/color-picker/color-picker.css +106 -114
  35. package/src/column-manager/column-manager.css +111 -119
  36. package/src/combobox/combobox.css +203 -130
  37. package/src/combobox/combobox.tokens.json +3 -0
  38. package/src/command-palette/command-palette.css +155 -102
  39. package/src/command-palette/command-palette.tokens.json +2 -0
  40. package/src/container/container.css +27 -27
  41. package/src/context-menu/context-menu.css +9 -9
  42. package/src/currency-field/currency-field.css +119 -119
  43. package/src/currency-field/currency-field.tokens.json +1 -0
  44. package/src/dashboard-grid/dashboard-grid.css +185 -115
  45. package/src/data-grid/data-grid.css +598 -496
  46. package/src/data-grid/data-grid.tokens.json +5 -1
  47. package/src/data-list/data-list.css +82 -71
  48. package/src/data-list/data-list.tokens.json +2 -1
  49. package/src/date-field/date-field.css +62 -57
  50. package/src/date-field/date-field.tokens.json +1 -0
  51. package/src/date-picker/date-picker.css +117 -58
  52. package/src/date-picker/date-picker.tokens.json +5 -0
  53. package/src/date-range-picker/date-range-picker.css +157 -127
  54. package/src/date-range-picker/date-range-picker.tokens.json +4 -0
  55. package/src/datetime-field/datetime-field.css +90 -90
  56. package/src/datetime-field/datetime-field.tokens.json +1 -0
  57. package/src/datetime-picker/datetime-picker.css +123 -70
  58. package/src/datetime-picker/datetime-picker.tokens.json +4 -1
  59. package/src/datetime-range-picker/datetime-range-picker.css +191 -163
  60. package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
  61. package/src/description-list/description-list.css +105 -75
  62. package/src/description-list/description-list.tokens.json +1 -0
  63. package/src/detail-panel/detail-panel.css +86 -71
  64. package/src/detail-panel/detail-panel.tokens.json +2 -0
  65. package/src/dialog/dialog.css +434 -198
  66. package/src/dialog/dialog.tokens.json +7 -0
  67. package/src/divider/divider.css +20 -20
  68. package/src/drawer/drawer.css +597 -236
  69. package/src/drawer/drawer.tokens.json +13 -0
  70. package/src/entity-picker/entity-picker.css +323 -270
  71. package/src/entity-picker/entity-picker.tokens.json +3 -0
  72. package/src/event-calendar/event-calendar.css +357 -399
  73. package/src/field/field.css +106 -93
  74. package/src/field/field.tokens.json +2 -0
  75. package/src/field-group/field-group.css +43 -33
  76. package/src/field-group/field-group.tokens.json +3 -0
  77. package/src/filter-bar/filter-bar.css +200 -216
  78. package/src/form/form.css +99 -25
  79. package/src/form/form.tokens.json +5 -0
  80. package/src/fullscreen/fullscreen.css +26 -27
  81. package/src/grid/grid.css +29 -29
  82. package/src/highlight/highlight.css +11 -11
  83. package/src/hover-card/hover-card.css +9 -9
  84. package/src/icon/icon.css +67 -20
  85. package/src/icon/icon.tokens.json +1 -0
  86. package/src/image/image.css +42 -42
  87. package/src/import-export-center/import-export-center.css +144 -165
  88. package/src/inline/inline.css +28 -28
  89. package/src/inline-message/inline-message.css +162 -86
  90. package/src/inline-message/inline-message.tokens.json +4 -0
  91. package/src/kbd/kbd.css +62 -50
  92. package/src/kbd/kbd.tokens.json +3 -0
  93. package/src/link/link.css +54 -33
  94. package/src/link/link.tokens.json +4 -0
  95. package/src/list/list.css +23 -23
  96. package/src/list-item/list-item.css +89 -75
  97. package/src/list-item/list-item.tokens.json +7 -0
  98. package/src/listbox/listbox.css +71 -70
  99. package/src/listbox/listbox.tokens.json +0 -1
  100. package/src/loading-overlay/loading-overlay.css +86 -103
  101. package/src/markdown/markdown.css +20 -20
  102. package/src/media-viewer/media-viewer.css +790 -0
  103. package/src/media-viewer/media-viewer.tokens.json +53 -0
  104. package/src/menu/menu.css +162 -82
  105. package/src/menu/menu.tokens.json +2 -1
  106. package/src/menubar/menubar.css +16 -16
  107. package/src/message/message.css +1250 -1253
  108. package/src/message/message.tokens.json +5 -0
  109. package/src/message-scroller/message-scroller.css +323 -320
  110. package/src/multi-select/multi-select.css +230 -172
  111. package/src/multi-select/multi-select.tokens.json +2 -0
  112. package/src/navigation-menu/navigation-menu.css +169 -190
  113. package/src/notification-center/notification-center.css +153 -161
  114. package/src/notification-center/notification-center.tokens.json +3 -0
  115. package/src/number-field/number-field.css +93 -93
  116. package/src/number-field/number-field.tokens.json +1 -0
  117. package/src/otp-input/otp-input.css +74 -64
  118. package/src/otp-input/otp-input.tokens.json +1 -0
  119. package/src/page/page.css +41 -27
  120. package/src/page/page.tokens.json +1 -0
  121. package/src/page-header/page-header.css +341 -286
  122. package/src/page-header/page-header.tokens.json +5 -0
  123. package/src/pagination/pagination.css +75 -79
  124. package/src/popover/popover.css +81 -64
  125. package/src/popover/popover.tokens.json +1 -0
  126. package/src/progress-indicator/progress-indicator.css +192 -136
  127. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  128. package/src/prompt-composer/prompt-composer.css +260 -113
  129. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  130. package/src/prose/prose.css +77 -82
  131. package/src/radio-group/radio-group.css +107 -112
  132. package/src/rating/rating.css +146 -142
  133. package/src/rating/rating.tokens.json +1 -0
  134. package/src/result-state/result-state.css +94 -101
  135. package/src/runtime-properties.mjs +19 -6
  136. package/src/saved-views/saved-views.css +43 -49
  137. package/src/scroll-area/scroll-area.css +44 -37
  138. package/src/section/section.css +178 -43
  139. package/src/section/section.tokens.json +8 -2
  140. package/src/segmented-control/segmented-control.css +210 -133
  141. package/src/segmented-control/segmented-control.tokens.json +7 -11
  142. package/src/select/select.css +210 -147
  143. package/src/select/select.tokens.json +3 -0
  144. package/src/side-navigation/side-navigation.css +193 -196
  145. package/src/side-navigation/side-navigation.tokens.json +1 -0
  146. package/src/skeleton/skeleton.css +57 -58
  147. package/src/slider/slider.css +101 -103
  148. package/src/sparkline/sparkline.css +75 -53
  149. package/src/sparkline/sparkline.tokens.json +2 -0
  150. package/src/spinner/spinner.css +83 -180
  151. package/src/spinner/spinner.tokens.json +0 -1
  152. package/src/split-button/split-button.css +34 -35
  153. package/src/split-button/split-button.tokens.json +1 -0
  154. package/src/splitter/splitter.css +47 -48
  155. package/src/stack/stack.css +25 -25
  156. package/src/stat-card/stat-card.css +415 -245
  157. package/src/stat-card/stat-card.tokens.json +8 -0
  158. package/src/status-indicator/status-indicator.css +124 -100
  159. package/src/status-indicator/status-indicator.tokens.json +0 -3
  160. package/src/stepper/stepper.css +78 -82
  161. package/src/switch/switch.css +100 -106
  162. package/src/table/table.css +270 -198
  163. package/src/table/table.tokens.json +2 -0
  164. package/src/table-of-contents/table-of-contents.css +60 -59
  165. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  166. package/src/tabs/tabs.css +327 -294
  167. package/src/tabs/tabs.tokens.json +7 -1
  168. package/src/tag/tag.css +109 -88
  169. package/src/tag/tag.tokens.json +10 -0
  170. package/src/tags-input/tags-input.css +152 -87
  171. package/src/tags-input/tags-input.tokens.json +7 -1
  172. package/src/text-field/text-field.css +146 -148
  173. package/src/text-field/text-field.tokens.json +1 -0
  174. package/src/textarea/textarea.css +38 -33
  175. package/src/textarea/textarea.tokens.json +1 -0
  176. package/src/time-field/time-field.css +82 -77
  177. package/src/time-field/time-field.tokens.json +1 -0
  178. package/src/time-picker/time-picker.css +116 -64
  179. package/src/time-picker/time-picker.tokens.json +4 -1
  180. package/src/time-range-picker/time-range-picker.css +168 -140
  181. package/src/time-range-picker/time-range-picker.tokens.json +4 -0
  182. package/src/timeline/timeline.css +280 -292
  183. package/src/timeline/timeline.tokens.json +5 -0
  184. package/src/toast/toast.css +138 -121
  185. package/src/toast/toast.tokens.json +6 -0
  186. package/src/toggle/toggle.css +34 -38
  187. package/src/toggle-group/toggle-group.css +73 -77
  188. package/src/toolbar/toolbar.css +33 -38
  189. package/src/tooltip/tooltip.css +65 -39
  190. package/src/tooltip/tooltip.tokens.json +1 -0
  191. package/src/top-navigation/top-navigation.css +252 -268
  192. package/src/tour/tour.css +64 -73
  193. package/src/transfer/transfer.css +164 -168
  194. package/src/tree/tree.css +113 -121
  195. package/src/typography/typography.css +42 -38
  196. package/src/typography/typography.tokens.json +1 -0
  197. package/src/upload/upload.css +256 -257
  198. package/src/visually-hidden/visually-hidden.css +1 -1
  199. 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",