@slotted/styles 0.0.0-stage → 0.1.0-beta.0

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 (254) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +10 -2
  3. package/package.json +276 -3
  4. package/src/accordion/accordion.css +96 -0
  5. package/src/accordion/accordion.tokens.json +14 -0
  6. package/src/action-bar/action-bar.css +455 -0
  7. package/src/action-bar/action-bar.tokens.json +50 -0
  8. package/src/action-sheet/action-sheet.css +462 -0
  9. package/src/action-sheet/action-sheet.tokens.json +59 -0
  10. package/src/alert/alert.css +764 -0
  11. package/src/alert/alert.tokens.json +77 -0
  12. package/src/app-shell/app-shell.css +1899 -0
  13. package/src/app-shell/app-shell.tokens.json +88 -0
  14. package/src/aspect-ratio/aspect-ratio.css +131 -0
  15. package/src/aspect-ratio/aspect-ratio.tokens.json +1 -0
  16. package/src/attachment/attachment.css +906 -0
  17. package/src/attachment/attachment.tokens.json +85 -0
  18. package/src/avatar/avatar.css +598 -0
  19. package/src/avatar/avatar.tokens.json +64 -0
  20. package/src/avatar-group/avatar-group.css +268 -0
  21. package/src/avatar-group/avatar-group.tokens.json +16 -0
  22. package/src/badge/badge.css +462 -0
  23. package/src/badge/badge.tokens.json +58 -0
  24. package/src/breadcrumb/breadcrumb.css +441 -0
  25. package/src/breadcrumb/breadcrumb.tokens.json +50 -0
  26. package/src/button/button.css +754 -0
  27. package/src/button/button.tokens.json +72 -0
  28. package/src/button-group/button-group.css +455 -0
  29. package/src/button-group/button-group.tokens.json +11 -0
  30. package/src/calendar/calendar.css +846 -0
  31. package/src/calendar/calendar.tokens.json +67 -0
  32. package/src/card/card.css +602 -0
  33. package/src/card/card.tokens.json +68 -0
  34. package/src/carousel/carousel.css +860 -0
  35. package/src/carousel/carousel.tokens.json +62 -0
  36. package/src/cascader/cascader.css +1320 -0
  37. package/src/cascader/cascader.tokens.json +103 -0
  38. package/src/chart/chart.css +1473 -0
  39. package/src/chart/chart.tokens.json +107 -0
  40. package/src/checkbox/checkbox.css +1011 -0
  41. package/src/checkbox/checkbox.tokens.json +102 -0
  42. package/src/checkbox-group/checkbox-group.css +70 -0
  43. package/src/checkbox-group/checkbox-group.tokens.json +6 -0
  44. package/src/code-block/code-block.css +555 -0
  45. package/src/code-block/code-block.tokens.json +69 -0
  46. package/src/collapsible/collapsible.css +546 -0
  47. package/src/collapsible/collapsible.tokens.json +55 -0
  48. package/src/color-picker/color-picker.css +607 -0
  49. package/src/color-picker/color-picker.tokens.json +58 -0
  50. package/src/column-manager/column-manager.css +452 -0
  51. package/src/column-manager/column-manager.tokens.json +43 -0
  52. package/src/combobox/combobox.css +1048 -0
  53. package/src/combobox/combobox.tokens.json +112 -0
  54. package/src/command-palette/command-palette.css +1000 -0
  55. package/src/command-palette/command-palette.tokens.json +75 -0
  56. package/src/container/container.css +198 -0
  57. package/src/container/container.tokens.json +18 -0
  58. package/src/context-menu/context-menu.css +104 -0
  59. package/src/context-menu/context-menu.tokens.json +11 -0
  60. package/src/currency-field/currency-field.css +787 -0
  61. package/src/currency-field/currency-field.tokens.json +80 -0
  62. package/src/dashboard-grid/dashboard-grid.css +748 -0
  63. package/src/dashboard-grid/dashboard-grid.tokens.json +67 -0
  64. package/src/data-grid/data-grid.css +2484 -0
  65. package/src/data-grid/data-grid.tokens.json +100 -0
  66. package/src/data-list/data-list.css +455 -0
  67. package/src/data-list/data-list.tokens.json +35 -0
  68. package/src/date-field/date-field.css +560 -0
  69. package/src/date-field/date-field.tokens.json +80 -0
  70. package/src/date-picker/date-picker.css +420 -0
  71. package/src/date-picker/date-picker.tokens.json +49 -0
  72. package/src/date-range-picker/date-range-picker.css +983 -0
  73. package/src/date-range-picker/date-range-picker.tokens.json +109 -0
  74. package/src/datetime-field/datetime-field.css +850 -0
  75. package/src/datetime-field/datetime-field.tokens.json +91 -0
  76. package/src/datetime-picker/datetime-picker.css +843 -0
  77. package/src/datetime-picker/datetime-picker.tokens.json +78 -0
  78. package/src/datetime-range-picker/datetime-range-picker.css +1375 -0
  79. package/src/datetime-range-picker/datetime-range-picker.tokens.json +135 -0
  80. package/src/description-list/description-list.css +675 -0
  81. package/src/description-list/description-list.tokens.json +66 -0
  82. package/src/detail-panel/detail-panel.css +329 -0
  83. package/src/detail-panel/detail-panel.tokens.json +33 -0
  84. package/src/dialog/dialog.css +968 -0
  85. package/src/dialog/dialog.tokens.json +66 -0
  86. package/src/divider/divider.css +131 -0
  87. package/src/divider/divider.tokens.json +18 -0
  88. package/src/drawer/drawer.css +1303 -0
  89. package/src/drawer/drawer.tokens.json +75 -0
  90. package/src/entity-picker/entity-picker.css +1367 -0
  91. package/src/entity-picker/entity-picker.tokens.json +118 -0
  92. package/src/event-calendar/event-calendar.css +2148 -0
  93. package/src/event-calendar/event-calendar.tokens.json +87 -0
  94. package/src/field/field.css +707 -0
  95. package/src/field/field.tokens.json +58 -0
  96. package/src/field-group/field-group.css +226 -0
  97. package/src/field-group/field-group.tokens.json +33 -0
  98. package/src/filter-bar/filter-bar.css +1306 -0
  99. package/src/filter-bar/filter-bar.tokens.json +78 -0
  100. package/src/form/form.css +218 -0
  101. package/src/form/form.tokens.json +32 -0
  102. package/src/fullscreen/fullscreen.css +376 -0
  103. package/src/fullscreen/fullscreen.tokens.json +50 -0
  104. package/src/grid/grid.css +173 -0
  105. package/src/grid/grid.tokens.json +20 -0
  106. package/src/highlight/highlight.css +135 -0
  107. package/src/highlight/highlight.tokens.json +16 -0
  108. package/src/hover-card/hover-card.css +93 -0
  109. package/src/hover-card/hover-card.tokens.json +17 -0
  110. package/src/icon/icon.css +136 -0
  111. package/src/icon/icon.tokens.json +14 -0
  112. package/src/image/image.css +449 -0
  113. package/src/image/image.tokens.json +27 -0
  114. package/src/import-export-center/import-export-center.css +1175 -0
  115. package/src/import-export-center/import-export-center.tokens.json +84 -0
  116. package/src/inline/inline.css +149 -0
  117. package/src/inline/inline.tokens.json +14 -0
  118. package/src/inline-message/inline-message.css +396 -0
  119. package/src/inline-message/inline-message.tokens.json +19 -0
  120. package/src/kbd/kbd.css +490 -0
  121. package/src/kbd/kbd.tokens.json +40 -0
  122. package/src/link/link.css +237 -0
  123. package/src/link/link.tokens.json +25 -0
  124. package/src/list/list.css +240 -0
  125. package/src/list/list.tokens.json +42 -0
  126. package/src/list-item/list-item.css +937 -0
  127. package/src/list-item/list-item.tokens.json +114 -0
  128. package/src/listbox/listbox.css +674 -0
  129. package/src/listbox/listbox.tokens.json +72 -0
  130. package/src/loading-overlay/loading-overlay.css +730 -0
  131. package/src/loading-overlay/loading-overlay.tokens.json +48 -0
  132. package/src/markdown/markdown.css +168 -0
  133. package/src/markdown/markdown.tokens.json +18 -0
  134. package/src/menu/menu.css +817 -0
  135. package/src/menu/menu.tokens.json +78 -0
  136. package/src/menubar/menubar.css +170 -0
  137. package/src/menubar/menubar.tokens.json +32 -0
  138. package/src/message/message.css +1453 -0
  139. package/src/message/message.tokens.json +85 -0
  140. package/src/message-scroller/message-scroller.css +371 -0
  141. package/src/message-scroller/message-scroller.tokens.json +47 -0
  142. package/src/multi-select/multi-select.css +1427 -0
  143. package/src/multi-select/multi-select.tokens.json +114 -0
  144. package/src/navigation-menu/navigation-menu.css +1029 -0
  145. package/src/navigation-menu/navigation-menu.tokens.json +70 -0
  146. package/src/notification-center/notification-center.css +856 -0
  147. package/src/notification-center/notification-center.tokens.json +84 -0
  148. package/src/number-field/number-field.css +794 -0
  149. package/src/number-field/number-field.tokens.json +80 -0
  150. package/src/otp-input/otp-input.css +525 -0
  151. package/src/otp-input/otp-input.tokens.json +69 -0
  152. package/src/page/page.css +179 -0
  153. package/src/page/page.tokens.json +20 -0
  154. package/src/page-header/page-header.css +1181 -0
  155. package/src/page-header/page-header.tokens.json +71 -0
  156. package/src/pagination/pagination.css +500 -0
  157. package/src/pagination/pagination.tokens.json +56 -0
  158. package/src/popover/popover.css +526 -0
  159. package/src/popover/popover.tokens.json +60 -0
  160. package/src/progress-indicator/progress-indicator.css +1584 -0
  161. package/src/progress-indicator/progress-indicator.tokens.json +50 -0
  162. package/src/prompt-composer/prompt-composer.css +680 -0
  163. package/src/prompt-composer/prompt-composer.tokens.json +99 -0
  164. package/src/prose/prose.css +733 -0
  165. package/src/prose/prose.tokens.json +79 -0
  166. package/src/radio-group/radio-group.css +778 -0
  167. package/src/radio-group/radio-group.tokens.json +103 -0
  168. package/src/rating/rating.css +1071 -0
  169. package/src/rating/rating.tokens.json +88 -0
  170. package/src/result-state/result-state.css +980 -0
  171. package/src/result-state/result-state.tokens.json +63 -0
  172. package/src/runtime-properties.mjs +321 -0
  173. package/src/saved-views/saved-views.css +394 -0
  174. package/src/saved-views/saved-views.tokens.json +41 -0
  175. package/src/scroll-area/scroll-area.css +481 -0
  176. package/src/scroll-area/scroll-area.tokens.json +15 -0
  177. package/src/section/section.css +177 -0
  178. package/src/section/section.tokens.json +39 -0
  179. package/src/segmented-control/segmented-control.css +564 -0
  180. package/src/segmented-control/segmented-control.tokens.json +67 -0
  181. package/src/select/select.css +1593 -0
  182. package/src/select/select.tokens.json +110 -0
  183. package/src/side-navigation/side-navigation.css +1096 -0
  184. package/src/side-navigation/side-navigation.tokens.json +87 -0
  185. package/src/skeleton/skeleton.css +431 -0
  186. package/src/skeleton/skeleton.tokens.json +29 -0
  187. package/src/slider/slider.css +792 -0
  188. package/src/slider/slider.tokens.json +75 -0
  189. package/src/sparkline/sparkline.css +282 -0
  190. package/src/sparkline/sparkline.tokens.json +45 -0
  191. package/src/spinner/spinner.css +224 -0
  192. package/src/spinner/spinner.tokens.json +8 -0
  193. package/src/split-button/split-button.css +253 -0
  194. package/src/split-button/split-button.tokens.json +12 -0
  195. package/src/splitter/splitter.css +336 -0
  196. package/src/splitter/splitter.tokens.json +24 -0
  197. package/src/stack/stack.css +128 -0
  198. package/src/stack/stack.tokens.json +14 -0
  199. package/src/stat-card/stat-card.css +641 -0
  200. package/src/stat-card/stat-card.tokens.json +95 -0
  201. package/src/status-indicator/status-indicator.css +481 -0
  202. package/src/status-indicator/status-indicator.tokens.json +38 -0
  203. package/src/stepper/stepper.css +629 -0
  204. package/src/stepper/stepper.tokens.json +72 -0
  205. package/src/switch/switch.css +703 -0
  206. package/src/switch/switch.tokens.json +75 -0
  207. package/src/table/table.css +1482 -0
  208. package/src/table/table.tokens.json +69 -0
  209. package/src/table-of-contents/table-of-contents.css +533 -0
  210. package/src/table-of-contents/table-of-contents.tokens.json +53 -0
  211. package/src/tabs/tabs.css +998 -0
  212. package/src/tabs/tabs.tokens.json +82 -0
  213. package/src/tag/tag.css +768 -0
  214. package/src/tag/tag.tokens.json +85 -0
  215. package/src/tags-input/tags-input.css +757 -0
  216. package/src/tags-input/tags-input.tokens.json +84 -0
  217. package/src/text-field/text-field.css +900 -0
  218. package/src/text-field/text-field.tokens.json +87 -0
  219. package/src/textarea/textarea.css +365 -0
  220. package/src/textarea/textarea.tokens.json +59 -0
  221. package/src/time-field/time-field.css +719 -0
  222. package/src/time-field/time-field.tokens.json +86 -0
  223. package/src/time-picker/time-picker.css +665 -0
  224. package/src/time-picker/time-picker.tokens.json +66 -0
  225. package/src/time-range-picker/time-range-picker.css +1287 -0
  226. package/src/time-range-picker/time-range-picker.tokens.json +134 -0
  227. package/src/timeline/timeline.css +1596 -0
  228. package/src/timeline/timeline.tokens.json +96 -0
  229. package/src/toast/toast.css +943 -0
  230. package/src/toast/toast.tokens.json +90 -0
  231. package/src/toggle/toggle.css +290 -0
  232. package/src/toggle/toggle.tokens.json +54 -0
  233. package/src/toggle-group/toggle-group.css +463 -0
  234. package/src/toggle-group/toggle-group.tokens.json +54 -0
  235. package/src/toolbar/toolbar.css +434 -0
  236. package/src/toolbar/toolbar.tokens.json +49 -0
  237. package/src/tooltip/tooltip.css +368 -0
  238. package/src/tooltip/tooltip.tokens.json +39 -0
  239. package/src/top-navigation/top-navigation.css +1287 -0
  240. package/src/top-navigation/top-navigation.tokens.json +91 -0
  241. package/src/tour/tour.css +680 -0
  242. package/src/tour/tour.tokens.json +67 -0
  243. package/src/transfer/transfer.css +571 -0
  244. package/src/transfer/transfer.tokens.json +49 -0
  245. package/src/tree/tree.css +1000 -0
  246. package/src/tree/tree.tokens.json +80 -0
  247. package/src/typography/typography.css +211 -0
  248. package/src/typography/typography.tokens.json +31 -0
  249. package/src/upload/upload.css +1706 -0
  250. package/src/upload/upload.tokens.json +123 -0
  251. package/src/visually-hidden/visually-hidden.css +52 -0
  252. package/src/visually-hidden/visually-hidden.tokens.json +1 -0
  253. package/src/wizard/wizard.css +740 -0
  254. package/src/wizard/wizard.tokens.json +63 -0
@@ -0,0 +1,87 @@
1
+ [
2
+ "--slotted-border-subtle",
3
+ "--slotted-control-border-color",
4
+ "--slotted-control-border-width",
5
+ "--slotted-control-font-family",
6
+ "--slotted-control-font-size-lg",
7
+ "--slotted-control-font-size-md",
8
+ "--slotted-control-font-size-sm",
9
+ "--slotted-control-gap-lg",
10
+ "--slotted-control-gap-md",
11
+ "--slotted-control-gap-sm",
12
+ "--slotted-control-height-lg",
13
+ "--slotted-control-height-md",
14
+ "--slotted-control-height-sm",
15
+ "--slotted-control-icon-size-lg",
16
+ "--slotted-control-icon-size-md",
17
+ "--slotted-control-icon-size-sm",
18
+ "--slotted-control-inner-size-lg",
19
+ "--slotted-control-inner-size-md",
20
+ "--slotted-control-inner-size-sm",
21
+ "--slotted-control-invalid-edge-width",
22
+ "--slotted-control-padding-inline-lg",
23
+ "--slotted-control-padding-inline-md",
24
+ "--slotted-control-padding-inline-sm",
25
+ "--slotted-control-radius",
26
+ "--slotted-control-shadow",
27
+ "--slotted-control-shadow-focus-geometry",
28
+ "--slotted-control-surface",
29
+ "--slotted-control-transition-duration",
30
+ "--slotted-control-transition-easing",
31
+ "--slotted-disabled-background",
32
+ "--slotted-disabled-border",
33
+ "--slotted-disabled-foreground",
34
+ "--slotted-duration-short",
35
+ "--slotted-easing-enter",
36
+ "--slotted-easing-exit",
37
+ "--slotted-focus-ring-color",
38
+ "--slotted-focus-ring-color-invalid",
39
+ "--slotted-focus-ring-offset",
40
+ "--slotted-focus-ring-width",
41
+ "--slotted-font-family-mono",
42
+ "--slotted-font-weight-medium",
43
+ "--slotted-radius-none",
44
+ "--slotted-radius-xs",
45
+ "--slotted-space-2",
46
+ "--slotted-space-3",
47
+ "--slotted-surface-sunken",
48
+ "--slotted-target-comfortable",
49
+ "--slotted-target-min",
50
+ "--slotted-text",
51
+ "--slotted-text-field-action-active-background",
52
+ "--slotted-text-field-action-color",
53
+ "--slotted-text-field-action-hover-background",
54
+ "--slotted-text-field-action-label-color",
55
+ "--slotted-text-field-action-size",
56
+ "--slotted-text-field-adornment-color",
57
+ "--slotted-text-field-autofill-background",
58
+ "--slotted-text-field-background",
59
+ "--slotted-text-field-border-color",
60
+ "--slotted-text-field-caps-lock-color",
61
+ "--slotted-text-field-color",
62
+ "--slotted-text-field-copy-complete-color",
63
+ "--slotted-text-field-disabled-background",
64
+ "--slotted-text-field-disabled-border-color",
65
+ "--slotted-text-field-disabled-color",
66
+ "--slotted-text-field-hover-border-color",
67
+ "--slotted-text-field-icon-size-min",
68
+ "--slotted-text-field-invalid-border-color",
69
+ "--slotted-text-field-invalid-edge-width",
70
+ "--slotted-text-field-invalid-focus-ring-color",
71
+ "--slotted-text-field-placeholder-color",
72
+ "--slotted-text-field-plain-hover-background",
73
+ "--slotted-text-field-radius",
74
+ "--slotted-text-field-readonly-background",
75
+ "--slotted-text-field-shadow",
76
+ "--slotted-text-field-subtle-background",
77
+ "--slotted-text-field-subtle-border-color",
78
+ "--slotted-text-field-subtle-hover-background",
79
+ "--slotted-text-muted",
80
+ "--slotted-tone-accent-border",
81
+ "--slotted-tone-accent-surface",
82
+ "--slotted-tone-danger-border",
83
+ "--slotted-tone-secondary-subtle-active",
84
+ "--slotted-tone-secondary-subtle-hover",
85
+ "--slotted-tone-success-text",
86
+ "--slotted-tone-warning-text"
87
+ ]
@@ -0,0 +1,365 @@
1
+ @layer slotted.components {
2
+ /**
3
+ * ── The multi-line text control ────────────────────────────────────────
4
+ *
5
+ * The element itself, with no frame around it. `text-field` wraps its input
6
+ * because an adornment, a clear button and a reveal button have to sit
7
+ * inside one border and a void element can hold no child; nothing surveyed
8
+ * puts an adornment inside a textarea, and the corner is where the resize
9
+ * handle goes. The two families therefore have different anatomies on
10
+ * purpose rather than one anatomy for symmetry.
11
+ *
12
+ * Its rules reach the same foundation tokens `text-field`'s do rather than
13
+ * `text-field` itself, so a theme can move one without the other and neither
14
+ * stylesheet depends on the other's selectors.
15
+ */
16
+ [data-ui='textarea'][data-part='root'] {
17
+ /**
18
+ * Type, height, inline padding and glyph size come from the control
19
+ * scales, the only ones the theme restates per density.
20
+ *
21
+ * The block padding is derived rather than chosen: half of whatever is
22
+ * left when one line box is taken out of the control height. A textarea of
23
+ * one row is then exactly as tall as an input of the same step, at every
24
+ * density, and no second scale has to be invented for it.
25
+ */
26
+ --_font-size: var(--slotted-control-font-size-md, 13px);
27
+ --_height: var(--slotted-control-height-md, 34px);
28
+ --_padding-inline: var(--slotted-control-padding-inline-md, 13px);
29
+ --_padding-block: max(0px, calc((var(--_height) - 1lh) / 2));
30
+ /** The control height minus its content box: two paddings and two borders. */
31
+ --_frame: calc(var(--_padding-block) * 2 + var(--slotted-control-border-width, 1px) * 2);
32
+ /**
33
+ * The same frame for a box that scrolls, which is one padding shorter.
34
+ *
35
+ * A scroll container's bottom padding belongs to the *end* of its scroll
36
+ * range, not to the bottom of what is on screen: while the control is
37
+ * scrolled to the top, the clip edge is the padding box, so a ceiling that
38
+ * reserved both paddings left forty per cent of a fifth line showing under
39
+ * the border. Measured rather than reasoned: the first capture of this
40
+ * family at 240 pixels showed exactly that sliver.
41
+ */
42
+ --_scroll-frame: calc(var(--_padding-block) + var(--slotted-control-border-width, 1px) * 2);
43
+ --_rows: var(--slotted-textarea-rows, 3);
44
+ --_max-rows: var(--slotted-textarea-max-rows, 12);
45
+
46
+ background-color: var(--slotted-textarea-background, var(--slotted-control-surface, Field));
47
+ /**
48
+ * The control step of the border scale, not the strong one: a separator
49
+ * between two surfaces and the edge of a control hold the same 3:1 ratio
50
+ * and are not the same weight.
51
+ */
52
+ border: var(--slotted-control-border-width, 1px) solid
53
+ var(--slotted-textarea-border-color, var(--slotted-control-border-color, ButtonBorder));
54
+ border-radius: var(--slotted-textarea-radius, var(--slotted-control-radius, 4px));
55
+ /** The shadow every framed control carries, and the reason the border can soften. */
56
+ box-shadow: var(--slotted-textarea-shadow, var(--slotted-control-shadow, none));
57
+ box-sizing: border-box;
58
+ color: var(--slotted-textarea-color, var(--slotted-text, CanvasText));
59
+ display: block;
60
+ font-family: var(--slotted-control-font-family, system-ui, sans-serif);
61
+ font-size: var(--_font-size);
62
+ inline-size: 100%;
63
+ /**
64
+ * The text scale's leading rather than the control's `1`. A control's line
65
+ * height is for a box holding one line; this one holds paragraphs, and
66
+ * `1lh` is what every block measurement below is stated in.
67
+ */
68
+ line-height: var(--slotted-textarea-line-height, var(--slotted-line-height-md, 1.5));
69
+ min-inline-size: 0;
70
+ /**
71
+ * A pasted token with no break in it — a signed URL, a certificate, a
72
+ * container digest — otherwise runs past the control's edge and takes the
73
+ * horizontal scrollbar of the page with it. Nothing is removed: the whole
74
+ * string stays in the value and in the DOM.
75
+ */
76
+ overflow-wrap: anywhere;
77
+ padding-block: var(--_padding-block);
78
+ padding-inline: var(--_padding-inline);
79
+ resize: block;
80
+ transition:
81
+ background-color var(--slotted-control-transition-duration)
82
+ var(--slotted-control-transition-easing),
83
+ border-color var(--slotted-control-transition-duration)
84
+ var(--slotted-control-transition-easing),
85
+ box-shadow var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
86
+ }
87
+
88
+ [data-ui='textarea'][data-part='root']::placeholder {
89
+ color: var(--slotted-textarea-placeholder-color, var(--slotted-text-muted, GrayText));
90
+ }
91
+
92
+ /* ── Size ─────────────────────────────────────────────────────────────
93
+ *
94
+ * Three steps, matching the field the control sits in, and every block
95
+ * measurement follows because it is written in terms of the step's own
96
+ * height and its own line box.
97
+ */
98
+
99
+ [data-ui='textarea'][data-part='root'][data-size='sm'] {
100
+ --_font-size: var(--slotted-control-font-size-sm, 12px);
101
+ --_height: var(--slotted-control-height-sm, 30px);
102
+ --_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
103
+ }
104
+
105
+ [data-ui='textarea'][data-part='root'][data-size='md'] {
106
+ --_font-size: var(--slotted-control-font-size-md, 13px);
107
+ --_height: var(--slotted-control-height-md, 34px);
108
+ --_padding-inline: var(--slotted-control-padding-inline-md, 13px);
109
+ }
110
+
111
+ [data-ui='textarea'][data-part='root'][data-size='lg'] {
112
+ --_font-size: var(--slotted-control-font-size-lg, 14px);
113
+ --_height: var(--slotted-control-height-lg, 38px);
114
+ --_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
115
+ }
116
+
117
+ /* ── Variant ──────────────────────────────────────────────────────────
118
+ *
119
+ * The three `text-field` draws, for the same reasons and against the same
120
+ * tokens: a control that takes the ground it is placed on, one that sinks
121
+ * into the page, and one that shows nothing until it is used.
122
+ */
123
+
124
+ [data-ui='textarea'][data-part='root'][data-variant='subtle'] {
125
+ background-color: var(
126
+ --slotted-textarea-subtle-background,
127
+ var(--slotted-surface-sunken, Canvas)
128
+ );
129
+ border-color: var(
130
+ --slotted-textarea-subtle-border-color,
131
+ var(--slotted-border-subtle, ButtonBorder)
132
+ );
133
+ }
134
+
135
+ /* No edge, no lift, no ground and no corner of its own: the cell it sits in
136
+ is the box, the row is the ground, a cell has no corner, and the resting
137
+ shadow would draw the cell where there is none. */
138
+ [data-ui='textarea'][data-part='root'][data-variant='plain'] {
139
+ background-color: transparent;
140
+ border-color: transparent;
141
+ border-radius: var(--slotted-radius-none, 0px);
142
+ box-shadow: none;
143
+ }
144
+
145
+ /** A transparent border has no system colour to be remapped to. */
146
+ @media (forced-colors: active) {
147
+ [data-ui='textarea'][data-part='root'][data-variant='plain'] {
148
+ border-color: ButtonBorder;
149
+ }
150
+ }
151
+
152
+ [data-ui='textarea'][data-part='root'][data-mono] {
153
+ font-family: var(--slotted-font-family-mono, monospace);
154
+ font-variant-numeric: tabular-nums;
155
+ }
156
+
157
+ /* ── Resize ───────────────────────────────────────────────────────────
158
+ *
159
+ * `block` by default rather than the platform's `both`: a control wider than
160
+ * its field breaks the field's own grid, and a reader who widens one control
161
+ * in a form has broken the form's alignment rather than fixed anything.
162
+ * Horizontal resize is offered and is not the default.
163
+ */
164
+
165
+ [data-ui='textarea'][data-part='root'][data-resize='none'] {
166
+ resize: none;
167
+ }
168
+
169
+ [data-ui='textarea'][data-part='root'][data-resize='both'] {
170
+ resize: both;
171
+ }
172
+
173
+ /* ── Growing with the content ─────────────────────────────────────────
174
+ *
175
+ * `field-sizing: content` is the platform's answer, Baseline since June
176
+ * 2026: nothing is measured on the main thread, no line height is cached and
177
+ * no layout is read per keystroke, which is what Angular CDK's autosize and
178
+ * Mantine's both do.
179
+ *
180
+ * It shrinkwraps, so `rows` stops being the floor — the floor is restated
181
+ * above as a minimum block size, and the ceiling is stated here. Past the
182
+ * ceiling the control scrolls rather than pushing the page out from under
183
+ * the caret, which is the defect every auto-grow implementation ships first.
184
+ *
185
+ * The manual handle is withdrawn while this is on: a control that sizes
186
+ * itself and a handle that fixes its size disagree on the next keystroke.
187
+ *
188
+ * Where `field-sizing` is unsupported the control keeps the block size
189
+ * `rows` gives it — a smaller box, not a broken one.
190
+ */
191
+ [data-ui='textarea'][data-part='root'][data-auto-size] {
192
+ field-sizing: content;
193
+ max-block-size: calc(var(--_max-rows) * 1lh + var(--_scroll-frame));
194
+ /**
195
+ * The floor, and only here. While the control does not size itself the
196
+ * platform's own `rows` is the height, and a second source of truth beside
197
+ * it disagrees the moment the two are written differently — which is what
198
+ * the first capture of this family showed: three two-row controls drawn
199
+ * three rows tall, because the stylesheet's default outranked the
200
+ * attribute the page had written.
201
+ */
202
+ min-block-size: calc(var(--_rows) * 1lh + var(--_frame));
203
+ resize: none;
204
+ }
205
+
206
+ /* ── States ───────────────────────────────────────────────────────────
207
+ *
208
+ * The same order `text-field` writes, and the same guards: each weaker state
209
+ * held back for every stronger one it can meet.
210
+ */
211
+
212
+ [data-ui='textarea'][data-part='root']:hover:not([data-disabled]):not(:disabled):not(
213
+ [data-readonly]
214
+ ):not([data-invalid]) {
215
+ border-color: var(--slotted-textarea-hover-border-color, var(--slotted-tone-accent-border));
216
+ }
217
+
218
+ [data-ui='textarea'][data-part='root'][data-variant='subtle']:hover:not([data-disabled]):not(
219
+ :disabled
220
+ ):not([data-readonly]):not([data-invalid]) {
221
+ background-color: var(
222
+ --slotted-textarea-subtle-hover-background,
223
+ var(--slotted-tone-secondary-subtle-hover)
224
+ );
225
+ }
226
+
227
+ [data-ui='textarea'][data-part='root'][data-variant='plain']:hover:not([data-disabled]):not(
228
+ :disabled
229
+ ):not([data-readonly]):not([data-invalid]) {
230
+ background-color: var(
231
+ --slotted-textarea-plain-hover-background,
232
+ var(--slotted-tone-secondary-subtle-hover)
233
+ );
234
+ /* The accent edge the other variants take would draw the cell's outline. */
235
+ border-color: transparent;
236
+ }
237
+
238
+ [data-ui='textarea'][data-part='root']:focus-visible {
239
+ /** Foundation geometry, focus-ring ink: the lift and the ring are one colour. */
240
+ box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
241
+ var(--slotted-focus-ring-color, Highlight);
242
+ outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
243
+ outline-offset: var(--slotted-focus-ring-offset, 2px);
244
+ }
245
+
246
+ /**
247
+ * The ring of a control whose box is not its own is drawn inside that box,
248
+ * the way the inner controls draw theirs inside the frame: two pixels past
249
+ * the control is two pixels over the next row's rule. No lift either — a
250
+ * shadow that appears only under focus is a cell that changes size when it
251
+ * is used.
252
+ */
253
+ [data-ui='textarea'][data-part='root'][data-variant='plain']:focus-visible {
254
+ box-shadow: none;
255
+ outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
256
+ }
257
+
258
+ /**
259
+ * The ring is retargeted rather than repainted: every rule that draws focus
260
+ * reads `--slotted-focus-ring-color`, so pointing that one name at the
261
+ * invalid colour on the element moves the outline and the shadow together.
262
+ */
263
+ [data-ui='textarea'][data-part='root'][data-invalid] {
264
+ --slotted-focus-ring-color: var(
265
+ --slotted-textarea-invalid-focus-ring-color,
266
+ var(--slotted-focus-ring-color-invalid, Highlight)
267
+ );
268
+ --_invalid-edge-width: var(
269
+ --slotted-textarea-invalid-edge-width,
270
+ var(--slotted-control-invalid-edge-width, 1px)
271
+ );
272
+ --_invalid-edge-color: var(
273
+ --slotted-textarea-invalid-border-color,
274
+ var(--slotted-tone-danger-border)
275
+ );
276
+ --_invalid-edge: inset 0 0 0 var(--_invalid-edge-width) var(--_invalid-edge-color);
277
+
278
+ border-color: var(--slotted-textarea-invalid-border-color, var(--slotted-tone-danger-border));
279
+ /*
280
+ * Width as well as colour (WCAG 1.4.1), the edge `text-field` draws: in
281
+ * `high-contrast` the danger border is the resting edge's black. The line
282
+ * is a shadow inside the border, so neither box nor text moves, and it
283
+ * takes the resting lift's place.
284
+ */
285
+ box-shadow: var(--_invalid-edge);
286
+ }
287
+
288
+ [data-ui='textarea'][data-part='root'][data-invalid]:focus-visible {
289
+ box-shadow:
290
+ var(--_invalid-edge),
291
+ var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
292
+ var(--slotted-focus-ring-color, Highlight);
293
+ }
294
+
295
+ [data-ui='textarea'][data-part='root'][data-variant='plain'][data-invalid]:focus-visible {
296
+ /* The ring lies inside the box here, over the border and an edge as wide as
297
+ it; the edge reaches past the ring. */
298
+ box-shadow: inset 0 0 0
299
+ calc(
300
+ var(--slotted-focus-ring-offset, 2px) - var(--slotted-control-border-width, 1px) +
301
+ var(--_invalid-edge-width)
302
+ )
303
+ var(--_invalid-edge-color);
304
+ }
305
+
306
+ /*
307
+ * Forced colours remove every box shadow, and the edge with them. The
308
+ * width comes back as an outline inside the border, and a focused invalid
309
+ * control draws its ring double, which a valid ring is not.
310
+ */
311
+ @media (forced-colors: active) {
312
+ [data-ui='textarea'][data-part='root'][data-invalid] {
313
+ outline: var(--_invalid-edge-width) solid CanvasText;
314
+ outline-offset: calc(
315
+ -1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
316
+ );
317
+ }
318
+
319
+ [data-ui='textarea'][data-part='root'][data-invalid]:focus-visible {
320
+ outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
321
+ var(--slotted-focus-ring-color, Highlight);
322
+ outline-offset: var(--slotted-focus-ring-offset, 2px);
323
+ }
324
+
325
+ [data-ui='textarea'][data-part='root'][data-variant='plain'][data-invalid]:focus-visible {
326
+ outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
327
+ var(--slotted-focus-ring-color, Highlight);
328
+ outline-offset: calc(
329
+ -1 * (var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width))
330
+ );
331
+ }
332
+ }
333
+
334
+ /**
335
+ * Read-only stays focusable, selectable and legible. A long value a reader
336
+ * has to copy is the commonest thing a read-only textarea holds, so the ink
337
+ * does not change at all and only the ground says the value is not theirs.
338
+ */
339
+ [data-ui='textarea'][data-part='root'][data-readonly] {
340
+ background-color: var(
341
+ --slotted-textarea-readonly-background,
342
+ var(--slotted-tone-secondary-subtle-hover)
343
+ );
344
+ cursor: default;
345
+ }
346
+
347
+ /**
348
+ * `:disabled` beside `data-disabled`, because a disabled `fieldset` disables
349
+ * every control inside it and tells none of them.
350
+ */
351
+ [data-ui='textarea'][data-part='root'][data-disabled],
352
+ [data-ui='textarea'][data-part='root']:disabled {
353
+ background-color: var(
354
+ --slotted-textarea-disabled-background,
355
+ var(--slotted-disabled-background)
356
+ );
357
+ border-color: var(--slotted-textarea-disabled-border-color, var(--slotted-disabled-border));
358
+ /* Nothing a person cannot reach is lifted off the page. */
359
+ box-shadow: none;
360
+ color: var(--slotted-textarea-disabled-color, var(--slotted-disabled-foreground));
361
+ cursor: not-allowed;
362
+ /* A handle on a control nobody can type in is a handle that lies. */
363
+ resize: none;
364
+ }
365
+ }
@@ -0,0 +1,59 @@
1
+ [
2
+ "--slotted-border-subtle",
3
+ "--slotted-control-border-color",
4
+ "--slotted-control-border-width",
5
+ "--slotted-control-font-family",
6
+ "--slotted-control-font-size-lg",
7
+ "--slotted-control-font-size-md",
8
+ "--slotted-control-font-size-sm",
9
+ "--slotted-control-height-lg",
10
+ "--slotted-control-height-md",
11
+ "--slotted-control-height-sm",
12
+ "--slotted-control-invalid-edge-width",
13
+ "--slotted-control-padding-inline-lg",
14
+ "--slotted-control-padding-inline-md",
15
+ "--slotted-control-padding-inline-sm",
16
+ "--slotted-control-radius",
17
+ "--slotted-control-shadow",
18
+ "--slotted-control-shadow-focus-geometry",
19
+ "--slotted-control-surface",
20
+ "--slotted-control-transition-duration",
21
+ "--slotted-control-transition-easing",
22
+ "--slotted-disabled-background",
23
+ "--slotted-disabled-border",
24
+ "--slotted-disabled-foreground",
25
+ "--slotted-focus-ring-color",
26
+ "--slotted-focus-ring-color-invalid",
27
+ "--slotted-focus-ring-offset",
28
+ "--slotted-focus-ring-width",
29
+ "--slotted-font-family-mono",
30
+ "--slotted-line-height-md",
31
+ "--slotted-radius-none",
32
+ "--slotted-surface-sunken",
33
+ "--slotted-text",
34
+ "--slotted-text-muted",
35
+ "--slotted-textarea-background",
36
+ "--slotted-textarea-border-color",
37
+ "--slotted-textarea-color",
38
+ "--slotted-textarea-disabled-background",
39
+ "--slotted-textarea-disabled-border-color",
40
+ "--slotted-textarea-disabled-color",
41
+ "--slotted-textarea-hover-border-color",
42
+ "--slotted-textarea-invalid-border-color",
43
+ "--slotted-textarea-invalid-edge-width",
44
+ "--slotted-textarea-invalid-focus-ring-color",
45
+ "--slotted-textarea-line-height",
46
+ "--slotted-textarea-max-rows",
47
+ "--slotted-textarea-placeholder-color",
48
+ "--slotted-textarea-plain-hover-background",
49
+ "--slotted-textarea-radius",
50
+ "--slotted-textarea-readonly-background",
51
+ "--slotted-textarea-rows",
52
+ "--slotted-textarea-shadow",
53
+ "--slotted-textarea-subtle-background",
54
+ "--slotted-textarea-subtle-border-color",
55
+ "--slotted-textarea-subtle-hover-background",
56
+ "--slotted-tone-accent-border",
57
+ "--slotted-tone-danger-border",
58
+ "--slotted-tone-secondary-subtle-hover"
59
+ ]