@usefragments/ui 1.7.0 → 2.0.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 (551) hide show
  1. package/README.md +54 -66
  2. package/dist/assets/nav-glyph.cjs +139 -0
  3. package/dist/assets/nav-glyph.d.ts +28 -0
  4. package/dist/assets/nav-glyph.d.ts.map +1 -0
  5. package/dist/assets/nav-glyph.js +139 -0
  6. package/dist/assets/nav-glyph.module.scss.cjs +71 -0
  7. package/dist/assets/nav-glyph.module.scss.js +71 -0
  8. package/dist/assets/ui.css +4975 -4959
  9. package/dist/blocks/components/StatsCard.d.ts +1 -1
  10. package/dist/blocks/components/StatsCard.d.ts.map +1 -1
  11. package/dist/codeblock.cjs +23 -16
  12. package/dist/codeblock.js +16 -9
  13. package/dist/colorpicker.cjs +1 -0
  14. package/dist/colorpicker.js +1 -0
  15. package/dist/components/Accordion/Accordion.module.scss.cjs +8 -8
  16. package/dist/components/Accordion/Accordion.module.scss.js +8 -8
  17. package/dist/components/Alert/Alert.module.scss.cjs +21 -21
  18. package/dist/components/Alert/Alert.module.scss.js +21 -21
  19. package/dist/components/Alert/index.cjs +14 -8
  20. package/dist/components/Alert/index.d.ts +9 -9
  21. package/dist/components/Alert/index.d.ts.map +1 -1
  22. package/dist/components/Alert/index.js +14 -8
  23. package/dist/components/AppShell/AppShell.module.scss.cjs +14 -14
  24. package/dist/components/AppShell/AppShell.module.scss.js +14 -14
  25. package/dist/components/AppShell/index.cjs +2 -2
  26. package/dist/components/AppShell/index.js +2 -2
  27. package/dist/components/Avatar/Avatar.module.scss.cjs +14 -14
  28. package/dist/components/Avatar/Avatar.module.scss.js +14 -14
  29. package/dist/components/Badge/Badge.module.scss.cjs +33 -31
  30. package/dist/components/Badge/Badge.module.scss.js +33 -31
  31. package/dist/components/Badge/index.cjs +13 -3
  32. package/dist/components/Badge/index.d.ts +18 -13
  33. package/dist/components/Badge/index.d.ts.map +1 -1
  34. package/dist/components/Badge/index.js +13 -3
  35. package/dist/components/BentoGrid/BentoGrid.module.scss.cjs +14 -14
  36. package/dist/components/BentoGrid/BentoGrid.module.scss.js +14 -14
  37. package/dist/components/Box/Box.module.scss.cjs +152 -152
  38. package/dist/components/Box/Box.module.scss.js +152 -152
  39. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs +11 -8
  40. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.js +11 -8
  41. package/dist/components/Breadcrumbs/index.cjs +1 -1
  42. package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
  43. package/dist/components/Breadcrumbs/index.js +1 -1
  44. package/dist/components/Button/Button.module.scss.cjs +36 -27
  45. package/dist/components/Button/Button.module.scss.js +36 -27
  46. package/dist/components/Button/index.cjs +20 -4
  47. package/dist/components/Button/index.d.ts +18 -10
  48. package/dist/components/Button/index.d.ts.map +1 -1
  49. package/dist/components/Button/index.js +20 -4
  50. package/dist/components/ButtonGroup/ButtonGroup.module.scss.cjs +15 -15
  51. package/dist/components/ButtonGroup/ButtonGroup.module.scss.js +15 -15
  52. package/dist/components/Card/Card.module.scss.cjs +27 -34
  53. package/dist/components/Card/Card.module.scss.js +27 -34
  54. package/dist/components/Card/index.cjs +13 -8
  55. package/dist/components/Card/index.d.ts +23 -25
  56. package/dist/components/Card/index.d.ts.map +1 -1
  57. package/dist/components/Card/index.js +13 -8
  58. package/dist/components/Chart/Chart.module.scss.cjs +15 -15
  59. package/dist/components/Chart/Chart.module.scss.js +15 -15
  60. package/dist/components/Checkbox/Checkbox.module.scss.cjs +11 -11
  61. package/dist/components/Checkbox/Checkbox.module.scss.js +11 -11
  62. package/dist/components/Checkbox/index.cjs +2 -2
  63. package/dist/components/Checkbox/index.d.ts +4 -6
  64. package/dist/components/Checkbox/index.d.ts.map +1 -1
  65. package/dist/components/Checkbox/index.js +2 -2
  66. package/dist/components/Chip/Chip.module.scss.cjs +19 -19
  67. package/dist/components/Chip/Chip.module.scss.js +19 -19
  68. package/dist/components/Chip/index.cjs +1 -2
  69. package/dist/components/Chip/index.d.ts +8 -3
  70. package/dist/components/Chip/index.d.ts.map +1 -1
  71. package/dist/components/Chip/index.js +1 -2
  72. package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +22 -22
  73. package/dist/components/CodeBlock/CodeBlock.module.scss.js +22 -22
  74. package/dist/components/CodeBlock/index.d.ts +3 -2
  75. package/dist/components/CodeBlock/index.d.ts.map +1 -1
  76. package/dist/components/Collapsible/Collapsible.module.scss.cjs +9 -9
  77. package/dist/components/Collapsible/Collapsible.module.scss.js +9 -9
  78. package/dist/components/ColorPicker/ColorPicker.module.scss.cjs +14 -14
  79. package/dist/components/ColorPicker/ColorPicker.module.scss.js +14 -14
  80. package/dist/components/ColorPicker/index.d.ts.map +1 -1
  81. package/dist/components/Combobox/Combobox.module.scss.cjs +21 -21
  82. package/dist/components/Combobox/Combobox.module.scss.js +21 -21
  83. package/dist/components/Combobox/index.cjs +9 -5
  84. package/dist/components/Combobox/index.d.ts.map +1 -1
  85. package/dist/components/Combobox/index.js +9 -5
  86. package/dist/components/Command/Command.module.scss.cjs +14 -11
  87. package/dist/components/Command/Command.module.scss.js +14 -11
  88. package/dist/components/Command/index.cjs +2 -1
  89. package/dist/components/Command/index.d.ts +6 -1
  90. package/dist/components/Command/index.d.ts.map +1 -1
  91. package/dist/components/Command/index.js +2 -1
  92. package/dist/components/ConversationList/ConversationList.module.scss.cjs +10 -10
  93. package/dist/components/ConversationList/ConversationList.module.scss.js +10 -10
  94. package/dist/components/ConversationList/index.cjs +2 -2
  95. package/dist/components/ConversationList/index.js +2 -2
  96. package/dist/components/DataTable/DataTable.module.scss.cjs +31 -28
  97. package/dist/components/DataTable/DataTable.module.scss.js +31 -28
  98. package/dist/components/DataTable/DataTable.virtual.d.ts.map +1 -1
  99. package/dist/components/DatePicker/DatePicker.module.scss.cjs +33 -33
  100. package/dist/components/DatePicker/DatePicker.module.scss.js +33 -33
  101. package/dist/components/DatePicker/index.d.ts.map +1 -1
  102. package/dist/components/Dialog/Dialog.module.scss.cjs +14 -14
  103. package/dist/components/Dialog/Dialog.module.scss.js +14 -14
  104. package/dist/components/Dialog/index.cjs +2 -2
  105. package/dist/components/Dialog/index.d.ts +5 -4
  106. package/dist/components/Dialog/index.d.ts.map +1 -1
  107. package/dist/components/Dialog/index.js +2 -2
  108. package/dist/components/Drawer/Drawer.module.scss.cjs +39 -39
  109. package/dist/components/Drawer/Drawer.module.scss.js +40 -40
  110. package/dist/components/Drawer/index.cjs +2 -2
  111. package/dist/components/Drawer/index.d.ts +5 -4
  112. package/dist/components/Drawer/index.d.ts.map +1 -1
  113. package/dist/components/Drawer/index.js +2 -2
  114. package/dist/components/Editor/Editor.module.scss.cjs +17 -17
  115. package/dist/components/Editor/Editor.module.scss.js +17 -17
  116. package/dist/components/EmptyState/EmptyState.module.scss.cjs +11 -11
  117. package/dist/components/EmptyState/EmptyState.module.scss.js +11 -11
  118. package/dist/components/EmptyState/index.cjs +9 -4
  119. package/dist/components/EmptyState/index.d.ts +8 -5
  120. package/dist/components/EmptyState/index.d.ts.map +1 -1
  121. package/dist/components/EmptyState/index.js +9 -4
  122. package/dist/components/Field/Field.module.scss.cjs +5 -5
  123. package/dist/components/Field/Field.module.scss.js +5 -5
  124. package/dist/components/Fieldset/Fieldset.module.scss.cjs +3 -3
  125. package/dist/components/Fieldset/Fieldset.module.scss.js +3 -3
  126. package/dist/components/Grid/Grid.module.scss.cjs +54 -54
  127. package/dist/components/Grid/Grid.module.scss.js +54 -54
  128. package/dist/components/Header/Header.module.scss.cjs +33 -33
  129. package/dist/components/Header/Header.module.scss.js +33 -33
  130. package/dist/components/Icon/Icon.module.scss.cjs +30 -33
  131. package/dist/components/Icon/Icon.module.scss.js +30 -33
  132. package/dist/components/Icon/index.cjs +15 -14
  133. package/dist/components/Icon/index.d.ts +23 -12
  134. package/dist/components/Icon/index.d.ts.map +1 -1
  135. package/dist/components/Icon/index.js +15 -14
  136. package/dist/components/IconButton/IconButton.module.scss.cjs +12 -12
  137. package/dist/components/IconButton/IconButton.module.scss.js +12 -12
  138. package/dist/components/IconButton/index.d.ts +4 -4
  139. package/dist/components/IconButton/index.d.ts.map +1 -1
  140. package/dist/components/Input/Input.module.scss.cjs +15 -21
  141. package/dist/components/Input/Input.module.scss.js +15 -21
  142. package/dist/components/Input/index.cjs +2 -14
  143. package/dist/components/Input/index.d.ts +0 -2
  144. package/dist/components/Input/index.d.ts.map +1 -1
  145. package/dist/components/Input/index.js +2 -14
  146. package/dist/components/Link/Link.module.scss.cjs +24 -16
  147. package/dist/components/Link/Link.module.scss.js +24 -16
  148. package/dist/components/Link/index.cjs +13 -2
  149. package/dist/components/Link/index.d.ts +10 -3
  150. package/dist/components/Link/index.d.ts.map +1 -1
  151. package/dist/components/Link/index.js +13 -2
  152. package/dist/components/List/List.module.scss.cjs +23 -19
  153. package/dist/components/List/List.module.scss.js +23 -19
  154. package/dist/components/List/index.cjs +7 -7
  155. package/dist/components/List/index.d.ts +10 -7
  156. package/dist/components/List/index.d.ts.map +1 -1
  157. package/dist/components/List/index.js +7 -7
  158. package/dist/components/Listbox/Listbox.module.scss.cjs +8 -8
  159. package/dist/components/Listbox/Listbox.module.scss.js +8 -8
  160. package/dist/components/Loading/Loading.module.scss.cjs +30 -30
  161. package/dist/components/Loading/Loading.module.scss.js +30 -30
  162. package/dist/components/Loading/index.cjs +5 -5
  163. package/dist/components/Loading/index.d.ts +8 -7
  164. package/dist/components/Loading/index.d.ts.map +1 -1
  165. package/dist/components/Loading/index.js +5 -5
  166. package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
  167. package/dist/components/Markdown/Markdown.module.scss.js +1 -1
  168. package/dist/components/Menu/Menu.module.scss.cjs +14 -14
  169. package/dist/components/Menu/Menu.module.scss.js +14 -14
  170. package/dist/components/Message/Message.module.scss.cjs +20 -20
  171. package/dist/components/Message/Message.module.scss.js +20 -20
  172. package/dist/components/Message/index.cjs +1 -1
  173. package/dist/components/Message/index.d.ts +1 -1
  174. package/dist/components/Message/index.js +1 -1
  175. package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +29 -29
  176. package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +29 -29
  177. package/dist/components/Pagination/Pagination.module.scss.cjs +10 -10
  178. package/dist/components/Pagination/Pagination.module.scss.js +10 -10
  179. package/dist/components/Popover/Popover.module.scss.cjs +10 -10
  180. package/dist/components/Popover/Popover.module.scss.js +10 -10
  181. package/dist/components/Progress/Progress.module.scss.cjs +28 -25
  182. package/dist/components/Progress/Progress.module.scss.js +28 -25
  183. package/dist/components/Progress/index.cjs +21 -12
  184. package/dist/components/Progress/index.d.ts +10 -6
  185. package/dist/components/Progress/index.d.ts.map +1 -1
  186. package/dist/components/Progress/index.js +21 -12
  187. package/dist/components/Prompt/Prompt.module.scss.cjs +30 -30
  188. package/dist/components/Prompt/Prompt.module.scss.js +30 -30
  189. package/dist/components/Prompt/index.cjs +7 -7
  190. package/dist/components/Prompt/index.d.ts +11 -9
  191. package/dist/components/Prompt/index.d.ts.map +1 -1
  192. package/dist/components/Prompt/index.js +7 -7
  193. package/dist/components/RadioGroup/RadioGroup.module.scss.cjs +20 -17
  194. package/dist/components/RadioGroup/RadioGroup.module.scss.js +20 -17
  195. package/dist/components/RadioGroup/index.cjs +10 -5
  196. package/dist/components/RadioGroup/index.d.ts +11 -7
  197. package/dist/components/RadioGroup/index.d.ts.map +1 -1
  198. package/dist/components/RadioGroup/index.js +10 -5
  199. package/dist/components/ScrollArea/ScrollArea.module.scss.cjs +5 -5
  200. package/dist/components/ScrollArea/ScrollArea.module.scss.js +5 -5
  201. package/dist/components/Select/Select.module.scss.cjs +21 -21
  202. package/dist/components/Select/Select.module.scss.js +21 -21
  203. package/dist/components/Select/index.cjs +26 -20
  204. package/dist/components/Select/index.d.ts +5 -5
  205. package/dist/components/Select/index.d.ts.map +1 -1
  206. package/dist/components/Select/index.js +26 -20
  207. package/dist/components/Separator/Separator.module.scss.cjs +25 -19
  208. package/dist/components/Separator/Separator.module.scss.js +25 -19
  209. package/dist/components/Separator/index.cjs +10 -8
  210. package/dist/components/Separator/index.d.ts +4 -2
  211. package/dist/components/Separator/index.d.ts.map +1 -1
  212. package/dist/components/Separator/index.js +10 -8
  213. package/dist/components/Sidebar/Sidebar.module.scss.cjs +43 -43
  214. package/dist/components/Sidebar/Sidebar.module.scss.js +43 -43
  215. package/dist/components/Sidebar/index.cjs +3 -3
  216. package/dist/components/Sidebar/index.js +3 -3
  217. package/dist/components/Skeleton/Skeleton.module.scss.cjs +46 -46
  218. package/dist/components/Skeleton/Skeleton.module.scss.js +46 -46
  219. package/dist/components/Skeleton/index.cjs +7 -7
  220. package/dist/components/Skeleton/index.d.ts +8 -7
  221. package/dist/components/Skeleton/index.d.ts.map +1 -1
  222. package/dist/components/Skeleton/index.js +7 -7
  223. package/dist/components/Slider/Slider.module.scss.cjs +12 -12
  224. package/dist/components/Slider/Slider.module.scss.js +12 -12
  225. package/dist/components/Switch/Switch.module.scss.cjs +9 -9
  226. package/dist/components/Switch/Switch.module.scss.js +9 -9
  227. package/dist/components/Table/Table.module.scss.cjs +15 -15
  228. package/dist/components/Table/Table.module.scss.js +15 -15
  229. package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +15 -15
  230. package/dist/components/TableOfContents/TableOfContents.module.scss.js +15 -15
  231. package/dist/components/TableOfContents/index.cjs +1 -1
  232. package/dist/components/TableOfContents/index.js +1 -1
  233. package/dist/components/Tabs/Tabs.module.scss.cjs +18 -18
  234. package/dist/components/Tabs/Tabs.module.scss.js +18 -18
  235. package/dist/components/Tabs/index.cjs +5 -6
  236. package/dist/components/Tabs/index.d.ts +8 -6
  237. package/dist/components/Tabs/index.d.ts.map +1 -1
  238. package/dist/components/Tabs/index.js +5 -6
  239. package/dist/components/Text/Text.module.scss.cjs +105 -105
  240. package/dist/components/Text/Text.module.scss.js +105 -105
  241. package/dist/components/Text/index.cjs +5 -9
  242. package/dist/components/Text/index.d.ts +15 -11
  243. package/dist/components/Text/index.d.ts.map +1 -1
  244. package/dist/components/Text/index.js +5 -9
  245. package/dist/components/Textarea/Textarea.module.scss.cjs +22 -28
  246. package/dist/components/Textarea/Textarea.module.scss.js +22 -28
  247. package/dist/components/Textarea/index.cjs +3 -10
  248. package/dist/components/Textarea/index.d.ts +0 -2
  249. package/dist/components/Textarea/index.d.ts.map +1 -1
  250. package/dist/components/Textarea/index.js +3 -10
  251. package/dist/components/Theme/index.cjs +20 -4
  252. package/dist/components/Theme/index.d.ts +6 -12
  253. package/dist/components/Theme/index.d.ts.map +1 -1
  254. package/dist/components/Theme/index.js +20 -4
  255. package/dist/components/ThemeToggle/ThemeButton.cjs +51 -0
  256. package/dist/components/ThemeToggle/ThemeButton.d.ts +16 -0
  257. package/dist/components/ThemeToggle/ThemeButton.d.ts.map +1 -0
  258. package/dist/components/ThemeToggle/ThemeButton.js +34 -0
  259. package/dist/components/ThemeToggle/ThemeToggle.module.scss.cjs +6 -9
  260. package/dist/components/ThemeToggle/ThemeToggle.module.scss.js +6 -9
  261. package/dist/components/ThemeToggle/icons.cjs +48 -0
  262. package/dist/components/ThemeToggle/icons.d.ts +10 -0
  263. package/dist/components/ThemeToggle/icons.d.ts.map +1 -0
  264. package/dist/components/ThemeToggle/icons.js +48 -0
  265. package/dist/components/ThemeToggle/index.cjs +5 -74
  266. package/dist/components/ThemeToggle/index.d.ts +5 -8
  267. package/dist/components/ThemeToggle/index.d.ts.map +1 -1
  268. package/dist/components/ThemeToggle/index.js +3 -72
  269. package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.cjs +18 -15
  270. package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.js +18 -15
  271. package/dist/components/ThinkingIndicator/index.cjs +7 -8
  272. package/dist/components/ThinkingIndicator/index.d.ts +6 -5
  273. package/dist/components/ThinkingIndicator/index.d.ts.map +1 -1
  274. package/dist/components/ThinkingIndicator/index.js +7 -8
  275. package/dist/components/Toast/Toast.module.scss.cjs +28 -29
  276. package/dist/components/Toast/Toast.module.scss.js +29 -30
  277. package/dist/components/Toast/index.cjs +28 -30
  278. package/dist/components/Toast/index.d.ts +9 -8
  279. package/dist/components/Toast/index.d.ts.map +1 -1
  280. package/dist/components/Toast/index.js +28 -30
  281. package/dist/components/ToggleGroup/ToggleGroup.module.scss.cjs +21 -19
  282. package/dist/components/ToggleGroup/ToggleGroup.module.scss.js +22 -20
  283. package/dist/components/ToggleGroup/index.cjs +4 -5
  284. package/dist/components/ToggleGroup/index.d.ts +7 -6
  285. package/dist/components/ToggleGroup/index.d.ts.map +1 -1
  286. package/dist/components/ToggleGroup/index.js +4 -5
  287. package/dist/components/Tooltip/Tooltip.module.scss.cjs +3 -3
  288. package/dist/components/Tooltip/Tooltip.module.scss.js +3 -3
  289. package/dist/components/VisuallyHidden/VisuallyHidden.module.scss.cjs +1 -1
  290. package/dist/components/VisuallyHidden/VisuallyHidden.module.scss.js +1 -1
  291. package/dist/data-table-virtual.cjs +3 -2
  292. package/dist/data-table-virtual.js +3 -2
  293. package/dist/data-table.cjs +1 -1
  294. package/dist/data-table.js +1 -1
  295. package/dist/datepicker.cjs +23 -11
  296. package/dist/datepicker.js +23 -11
  297. package/dist/index.cjs +5 -1
  298. package/dist/index.d.ts +8 -8
  299. package/dist/index.d.ts.map +1 -1
  300. package/dist/index.js +6 -2
  301. package/dist/measurements/generated.cjs +37 -93
  302. package/dist/measurements/generated.d.ts +37 -92
  303. package/dist/measurements/generated.d.ts.map +1 -1
  304. package/dist/measurements/generated.js +37 -93
  305. package/dist/measurements/index.d.ts +1 -1
  306. package/dist/measurements/index.d.ts.map +1 -1
  307. package/dist/utils/seed-derivation.cjs +0 -1
  308. package/dist/utils/seed-derivation.d.ts +1 -3
  309. package/dist/utils/seed-derivation.d.ts.map +1 -1
  310. package/dist/utils/seed-derivation.js +0 -1
  311. package/dist/utils/theme-presets.cjs +5 -10
  312. package/dist/utils/theme-presets.d.ts +1 -2
  313. package/dist/utils/theme-presets.d.ts.map +1 -1
  314. package/dist/utils/theme-presets.js +5 -10
  315. package/fragments.json +1 -1
  316. package/package.json +5 -8
  317. package/src/assets/nav-glyph.module.scss +166 -0
  318. package/src/assets/nav-glyph.tsx +188 -0
  319. package/src/components/Accordion/Accordion.module.scss +5 -3
  320. package/src/components/Alert/Alert.contract.json +18 -18
  321. package/src/components/Alert/Alert.module.scss +50 -64
  322. package/src/components/Alert/index.tsx +24 -17
  323. package/src/components/AppShell/AppShell.contract.json +7 -7
  324. package/src/components/AppShell/AppShell.module.scss +49 -17
  325. package/src/components/AppShell/index.tsx +2 -2
  326. package/src/components/Avatar/Avatar.module.scss +0 -1
  327. package/src/components/Badge/Badge.contract.json +58 -22
  328. package/src/components/Badge/Badge.module.scss +72 -47
  329. package/src/components/Badge/index.tsx +34 -17
  330. package/src/components/BentoGrid/BentoGrid.module.scss +4 -8
  331. package/src/components/Box/Box.module.scss +7 -6
  332. package/src/components/Breadcrumbs/Breadcrumbs.module.scss +15 -5
  333. package/src/components/Breadcrumbs/index.tsx +5 -1
  334. package/src/components/Button/Button.module.scss +261 -186
  335. package/src/components/Button/index.tsx +41 -28
  336. package/src/components/ButtonGroup/ButtonGroup.contract.json +5 -5
  337. package/src/components/ButtonGroup/ButtonGroup.module.scss +8 -6
  338. package/src/components/Card/Card.consumer-fixture.module.scss +5 -2
  339. package/src/components/Card/Card.module.scss +73 -133
  340. package/src/components/Card/index.tsx +41 -36
  341. package/src/components/Chart/Chart.module.scss +6 -5
  342. package/src/components/Checkbox/Checkbox.contract.json +4 -3
  343. package/src/components/Checkbox/Checkbox.module.scss +16 -32
  344. package/src/components/Checkbox/index.tsx +6 -8
  345. package/src/components/Chip/Chip.contract.json +10 -10
  346. package/src/components/Chip/Chip.module.scss +23 -22
  347. package/src/components/Chip/index.tsx +10 -6
  348. package/src/components/CodeBlock/CodeBlock.module.scss +47 -70
  349. package/src/components/CodeBlock/index.tsx +23 -16
  350. package/src/components/Collapsible/Collapsible.module.scss +1 -7
  351. package/src/components/ColorPicker/ColorPicker.module.scss +20 -13
  352. package/src/components/ColorPicker/index.tsx +1 -0
  353. package/src/components/Combobox/Combobox.module.scss +16 -19
  354. package/src/components/Combobox/index.tsx +10 -1
  355. package/src/components/Command/Command.contract.json +7 -1
  356. package/src/components/Command/Command.module.scss +19 -21
  357. package/src/components/Command/index.tsx +7 -1
  358. package/src/components/ComponentDefaults/ComponentDefaults.contract.json +91 -0
  359. package/src/components/ConversationList/ConversationList.module.scss +2 -3
  360. package/src/components/ConversationList/index.tsx +2 -2
  361. package/src/components/DataTable/DataTable.module.scss +12 -9
  362. package/src/components/DataTable/DataTable.virtual.tsx +3 -2
  363. package/src/components/DataTable/index.tsx +1 -1
  364. package/src/components/DatePicker/DatePicker.module.scss +32 -42
  365. package/src/components/DatePicker/index.tsx +18 -7
  366. package/src/components/Dialog/Dialog.module.scss +23 -29
  367. package/src/components/Dialog/index.tsx +7 -5
  368. package/src/components/Drawer/Drawer.contract.json +6 -6
  369. package/src/components/Drawer/Drawer.module.scss +123 -64
  370. package/src/components/Drawer/index.tsx +7 -5
  371. package/src/components/Editor/Editor.contract.json +1 -1
  372. package/src/components/Editor/Editor.module.scss +26 -13
  373. package/src/components/EmptyState/EmptyState.contract.json +6 -6
  374. package/src/components/EmptyState/EmptyState.module.scss +31 -23
  375. package/src/components/EmptyState/index.tsx +17 -9
  376. package/src/components/Field/Field.module.scss +2 -1
  377. package/src/components/Fieldset/Fieldset.module.scss +5 -4
  378. package/src/components/Form/Form.contract.json +4 -4
  379. package/src/components/Grid/Grid.module.scss +2 -2
  380. package/src/components/Header/Header.contract.json +2 -2
  381. package/src/components/Header/Header.module.scss +24 -36
  382. package/src/components/Icon/Icon.contract.json +19 -23
  383. package/src/components/Icon/Icon.module.scss +13 -12
  384. package/src/components/Icon/index.tsx +31 -31
  385. package/src/components/IconButton/IconButton.contract.json +8 -8
  386. package/src/components/IconButton/IconButton.module.scss +13 -4
  387. package/src/components/IconButton/index.tsx +4 -4
  388. package/src/components/Input/Input.contract.json +0 -13
  389. package/src/components/Input/Input.module.scss +4 -54
  390. package/src/components/Input/index.tsx +2 -18
  391. package/src/components/Link/Link.contract.json +19 -11
  392. package/src/components/Link/Link.module.scss +24 -10
  393. package/src/components/Link/index.tsx +26 -5
  394. package/src/components/List/List.contract.json +11 -11
  395. package/src/components/List/List.module.scss +10 -5
  396. package/src/components/List/index.tsx +17 -13
  397. package/src/components/Listbox/Listbox.module.scss +14 -20
  398. package/src/components/Loading/Loading.contract.json +6 -6
  399. package/src/components/Loading/Loading.module.scss +29 -26
  400. package/src/components/Loading/index.tsx +13 -12
  401. package/src/components/Markdown/Markdown.module.scss +2 -1
  402. package/src/components/Menu/Menu.contract.json +5 -5
  403. package/src/components/Menu/Menu.module.scss +11 -10
  404. package/src/components/Message/Message.contract.json +5 -5
  405. package/src/components/Message/Message.module.scss +8 -6
  406. package/src/components/Message/index.tsx +2 -2
  407. package/src/components/NavigationMenu/NavigationMenu.module.scss +22 -67
  408. package/src/components/Pagination/Pagination.module.scss +7 -14
  409. package/src/components/Popover/Popover.contract.json +4 -4
  410. package/src/components/Popover/Popover.module.scss +24 -23
  411. package/src/components/Progress/Progress.contract.json +11 -11
  412. package/src/components/Progress/Progress.module.scss +13 -8
  413. package/src/components/Progress/index.tsx +34 -16
  414. package/src/components/Prompt/Prompt.contract.json +12 -12
  415. package/src/components/Prompt/Prompt.module.scss +40 -47
  416. package/src/components/Prompt/index.tsx +17 -15
  417. package/src/components/RadioGroup/RadioGroup.contract.json +6 -4
  418. package/src/components/RadioGroup/RadioGroup.module.scss +38 -32
  419. package/src/components/RadioGroup/index.tsx +23 -10
  420. package/src/components/ScrollArea/ScrollArea.module.scss +30 -33
  421. package/src/components/Select/Select.module.scss +19 -18
  422. package/src/components/Select/index.tsx +26 -24
  423. package/src/components/Separator/Separator.contract.json +10 -10
  424. package/src/components/Separator/Separator.module.scss +24 -40
  425. package/src/components/Separator/index.tsx +16 -11
  426. package/src/components/Sidebar/Sidebar.contract.json +1 -1
  427. package/src/components/Sidebar/Sidebar.module.scss +92 -95
  428. package/src/components/Sidebar/index.tsx +3 -3
  429. package/src/components/Skeleton/Skeleton.contract.json +9 -9
  430. package/src/components/Skeleton/Skeleton.module.scss +23 -16
  431. package/src/components/Skeleton/index.tsx +16 -15
  432. package/src/components/Slider/Slider.module.scss +6 -19
  433. package/src/components/Stack/Stack.contract.json +1 -1
  434. package/src/components/Stack/Stack.module.scss +13 -12
  435. package/src/components/Switch/Switch.module.scss +44 -35
  436. package/src/components/Table/Table.module.scss +9 -13
  437. package/src/components/TableOfContents/TableOfContents.module.scss +12 -18
  438. package/src/components/TableOfContents/index.tsx +1 -1
  439. package/src/components/Tabs/Tabs.contract.json +14 -14
  440. package/src/components/Tabs/Tabs.module.scss +27 -31
  441. package/src/components/Tabs/index.tsx +15 -12
  442. package/src/components/Text/Text.contract.json +36 -14
  443. package/src/components/Text/Text.module.scss +19 -20
  444. package/src/components/Text/index.tsx +23 -21
  445. package/src/components/Textarea/Textarea.contract.json +0 -13
  446. package/src/components/Textarea/Textarea.module.scss +24 -52
  447. package/src/components/Textarea/index.tsx +3 -14
  448. package/src/components/Theme/Theme.contract.json +9 -8
  449. package/src/components/Theme/index.tsx +39 -12
  450. package/src/components/ThemeToggle/ThemeButton.tsx +49 -0
  451. package/src/components/ThemeToggle/ThemeToggle.module.scss +21 -44
  452. package/src/components/ThemeToggle/icons.tsx +46 -0
  453. package/src/components/ThemeToggle/index.tsx +8 -90
  454. package/src/components/ThinkingIndicator/ThinkingIndicator.contract.json +11 -10
  455. package/src/components/ThinkingIndicator/ThinkingIndicator.module.scss +9 -7
  456. package/src/components/ThinkingIndicator/index.tsx +12 -14
  457. package/src/components/Toast/Toast.contract.json +29 -13
  458. package/src/components/Toast/Toast.module.scss +49 -104
  459. package/src/components/Toast/index.tsx +39 -34
  460. package/src/components/ToggleGroup/ToggleGroup.contract.json +13 -13
  461. package/src/components/ToggleGroup/ToggleGroup.module.scss +16 -46
  462. package/src/components/ToggleGroup/index.tsx +11 -11
  463. package/src/components/Tooltip/Tooltip.contract.json +3 -3
  464. package/src/components/Tooltip/Tooltip.module.scss +16 -10
  465. package/src/components/VisuallyHidden/VisuallyHidden.module.scss +4 -14
  466. package/src/index.ts +14 -10
  467. package/src/measurements/MeasurementTargets.module.scss +6 -7
  468. package/src/measurements/generated.ts +38 -96
  469. package/src/measurements/index.ts +0 -1
  470. package/src/measurements/measurements.json +37 -116
  471. package/src/recipes/_action.scss +4 -4
  472. package/src/recipes/_boolean-range.scss +9 -5
  473. package/src/recipes/_feedback.scss +17 -16
  474. package/src/recipes/_field.scss +28 -20
  475. package/src/recipes/_navigation.scss +84 -29
  476. package/src/recipes/_overlay.scss +143 -43
  477. package/src/recipes/_popup.scss +46 -36
  478. package/src/recipes/_prose.scss +35 -23
  479. package/src/recipes/_representation.scss +10 -9
  480. package/src/recipes/_segmented.scss +1 -1
  481. package/src/recipes/_table-chrome.scss +27 -16
  482. package/src/recipes/_target.scss +2 -4
  483. package/src/recipes/_typography.scss +10 -0
  484. package/src/styles/globals.scss +14 -9
  485. package/src/tokens/_component-properties.scss +19 -1
  486. package/src/tokens/_computed.scss +27 -33
  487. package/src/tokens/_measurements.catalog.generated.css +58 -45
  488. package/src/tokens/_measurements.generated.scss +107 -250
  489. package/src/tokens/_mixins.scss +42 -40
  490. package/src/tokens/_palettes.scss +1 -1
  491. package/src/tokens/_property-registrations.scss +9 -0
  492. package/src/tokens/_seeds.scss +1 -12
  493. package/src/tokens/_variables.scss +71 -59
  494. package/src/utils/seed-derivation.ts +1 -8
  495. package/src/utils/theme-presets.ts +5 -12
  496. package/dist/blocks/AccountSettings.block.d.ts +0 -3
  497. package/dist/blocks/AccountSettings.block.d.ts.map +0 -1
  498. package/dist/blocks/ActivityFeedSkeleton.block.d.ts +0 -3
  499. package/dist/blocks/ActivityFeedSkeleton.block.d.ts.map +0 -1
  500. package/dist/blocks/BlogEditor.block.d.ts +0 -3
  501. package/dist/blocks/BlogEditor.block.d.ts.map +0 -1
  502. package/dist/blocks/ChatInterface.block.d.ts +0 -3
  503. package/dist/blocks/ChatInterface.block.d.ts.map +0 -1
  504. package/dist/blocks/ChatMessages.block.d.ts +0 -3
  505. package/dist/blocks/ChatMessages.block.d.ts.map +0 -1
  506. package/dist/blocks/CheckoutForm.block.d.ts +0 -3
  507. package/dist/blocks/CheckoutForm.block.d.ts.map +0 -1
  508. package/dist/blocks/CommandPalette.block.d.ts +0 -3
  509. package/dist/blocks/CommandPalette.block.d.ts.map +0 -1
  510. package/dist/blocks/ContactForm.block.d.ts +0 -3
  511. package/dist/blocks/ContactForm.block.d.ts.map +0 -1
  512. package/dist/blocks/DashboardPage.block.d.ts +0 -3
  513. package/dist/blocks/DashboardPage.block.d.ts.map +0 -1
  514. package/dist/blocks/DashboardSkeleton.block.d.ts +0 -3
  515. package/dist/blocks/DashboardSkeleton.block.d.ts.map +0 -1
  516. package/dist/blocks/DataTable.block.d.ts +0 -3
  517. package/dist/blocks/DataTable.block.d.ts.map +0 -1
  518. package/dist/blocks/EmptyState.block.d.ts +0 -3
  519. package/dist/blocks/EmptyState.block.d.ts.map +0 -1
  520. package/dist/blocks/FAQSection.block.d.ts +0 -3
  521. package/dist/blocks/FAQSection.block.d.ts.map +0 -1
  522. package/dist/blocks/FeatureGrid.block.d.ts +0 -3
  523. package/dist/blocks/FeatureGrid.block.d.ts.map +0 -1
  524. package/dist/blocks/HeroSection.block.d.ts +0 -3
  525. package/dist/blocks/HeroSection.block.d.ts.map +0 -1
  526. package/dist/blocks/NavigationHeader.block.d.ts +0 -3
  527. package/dist/blocks/NavigationHeader.block.d.ts.map +0 -1
  528. package/dist/blocks/PaginatedTable.block.d.ts +0 -3
  529. package/dist/blocks/PaginatedTable.block.d.ts.map +0 -1
  530. package/dist/blocks/PricingComparison.block.d.ts +0 -3
  531. package/dist/blocks/PricingComparison.block.d.ts.map +0 -1
  532. package/dist/blocks/ProductCard.block.d.ts +0 -3
  533. package/dist/blocks/ProductCard.block.d.ts.map +0 -1
  534. package/dist/blocks/RegistrationForm.block.d.ts +0 -3
  535. package/dist/blocks/RegistrationForm.block.d.ts.map +0 -1
  536. package/dist/blocks/SettingsDrawer.block.d.ts +0 -3
  537. package/dist/blocks/SettingsDrawer.block.d.ts.map +0 -1
  538. package/dist/blocks/SettingsPanel.block.d.ts +0 -3
  539. package/dist/blocks/SettingsPanel.block.d.ts.map +0 -1
  540. package/dist/blocks/ShoppingCart.block.d.ts +0 -3
  541. package/dist/blocks/ShoppingCart.block.d.ts.map +0 -1
  542. package/dist/blocks/StatsCardSkeleton.block.d.ts +0 -3
  543. package/dist/blocks/StatsCardSkeleton.block.d.ts.map +0 -1
  544. package/dist/blocks/TableSkeleton.block.d.ts +0 -3
  545. package/dist/blocks/TableSkeleton.block.d.ts.map +0 -1
  546. package/dist/blocks/ThinkingStates.block.d.ts +0 -3
  547. package/dist/blocks/ThinkingStates.block.d.ts.map +0 -1
  548. package/dist/components/Toggle/index.d.ts +0 -3
  549. package/dist/components/Toggle/index.d.ts.map +0 -1
  550. package/src/components/Toggle/index.ts +0 -7
  551. package/src/tokens/_density.scss +0 -85
@@ -1,3 +1,4 @@
1
+ @use "../../tokens/variables" as *;
1
2
  @use "../../recipes/field";
2
3
 
3
4
  .root {
@@ -8,7 +9,7 @@
8
9
  @include field.label;
9
10
 
10
11
  &[data-disabled] {
11
- opacity: 0.5;
12
+ opacity: var(--fui-opacity-disabled, #{$fui-opacity-disabled});
12
13
  }
13
14
  }
14
15
 
@@ -1,5 +1,6 @@
1
1
  @use "../../tokens/variables" as *;
2
2
  @use "../../tokens/mixins" as *;
3
+ @use "../../tokens/measurements.generated" as measurements;
3
4
  @use "../../recipes/typography";
4
5
 
5
6
  .root {
@@ -7,12 +8,12 @@
7
8
 
8
9
  display: flex;
9
10
  flex-direction: column;
10
- gap: 0;
11
+ gap: var(--fui-raw-space-0, #{measurements.raw-space(0)});
11
12
  padding: var(--fui-surface-inset-default, 16px);
12
- margin: 0;
13
+ margin: var(--fui-raw-space-0, #{measurements.raw-space(0)});
13
14
 
14
15
  &[data-disabled] {
15
- opacity: 0.5;
16
+ opacity: var(--fui-opacity-disabled, #{$fui-opacity-disabled});
16
17
  }
17
18
 
18
19
  // Legend and description carry their own block margins, so spacing is added
@@ -27,7 +28,7 @@
27
28
  @include typography.role("ui-standard");
28
29
 
29
30
  color: var(--fui-text-secondary, $fui-text-secondary);
30
- padding: 0;
31
+ padding: var(--fui-raw-space-0, #{measurements.raw-space(0)});
31
32
  margin-block-end: var(--fui-raw-space-16, 16px);
32
33
 
33
34
  &:has(+ .description) {
@@ -75,22 +75,22 @@
75
75
  {
76
76
  "name": "Sign up",
77
77
  "description": "Paired name fields, then full-width rows and a right-aligned submit.",
78
- "code": "<Form onSubmit={(e) => { e.preventDefault(); }}>\n <Grid columns={2} gap=\"md\">\n <Field name=\"firstName\">\n <Field.Label>First Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Jane\" />\n </Field.Control>\n </Field>\n <Field name=\"lastName\">\n <Field.Label>Last Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Doe\" />\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" placeholder=\"jane@example.com\" />\n </Field.Control>\n <Field.Error match=\"typeMismatch\">Enter a valid email address</Field.Error>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"password\">\n <Field.Label>Password</Field.Label>\n <Field.Control>\n <Input type=\"password\" placeholder=\"At least 8 characters\" />\n </Field.Control>\n <Field.Description>Must be at least 8 characters</Field.Description>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"terms\">\n <Field.Control>\n <Checkbox label=\"I agree to the terms and conditions\" />\n </Field.Control>\n </Field>\n </Grid.Item>\n </Grid>\n <Form.Actions>\n <Button type=\"submit\" variant=\"primary\">Create Account</Button>\n </Form.Actions>\n</Form>"
78
+ "code": "<Form onSubmit={(e) => { e.preventDefault(); }}>\n <Grid columns={2} gap=\"md\">\n <Field name=\"firstName\">\n <Field.Label>First Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Jane\" />\n </Field.Control>\n </Field>\n <Field name=\"lastName\">\n <Field.Label>Last Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Doe\" />\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" placeholder=\"jane@example.com\" />\n </Field.Control>\n <Field.Error match=\"typeMismatch\">Enter a valid email address</Field.Error>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"password\">\n <Field.Label>Password</Field.Label>\n <Field.Control>\n <Input type=\"password\" placeholder=\"At least 8 characters\" />\n </Field.Control>\n <Field.Description>Must be at least 8 characters</Field.Description>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"terms\">\n <Field.Control>\n <Checkbox label=\"I agree to the terms and conditions\" />\n </Field.Control>\n </Field>\n </Grid.Item>\n </Grid>\n <Form.Actions>\n <Button type=\"submit\" variant=\"solid\">Create Account</Button>\n </Form.Actions>\n</Form>"
79
79
  },
80
80
  {
81
81
  "name": "Profile settings",
82
82
  "description": "Fieldsets split a long form into sections the user can scan.",
83
- "code": "<Form onSubmit={(e) => { e.preventDefault(); }}>\n <Fieldset>\n <Fieldset.Legend>Profile</Fieldset.Legend>\n <Grid columns={2} gap=\"md\">\n <Field name=\"displayName\">\n <Field.Label>Display Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"How others see you\" />\n </Field.Control>\n </Field>\n <Field name=\"timezone\">\n <Field.Label>Timezone</Field.Label>\n <Field.Control>\n <Select placeholder=\"Select timezone\">\n <Select.Trigger />\n <Select.Content>\n <Select.Item value=\"utc\">UTC</Select.Item>\n <Select.Item value=\"est\">Eastern (EST)</Select.Item>\n <Select.Item value=\"pst\">Pacific (PST)</Select.Item>\n <Select.Item value=\"gmt\">GMT</Select.Item>\n </Select.Content>\n </Select>\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"bio\">\n <Field.Label>Bio</Field.Label>\n <Field.Control>\n <Textarea placeholder=\"Tell us about yourself\" rows={3} maxLength={280} />\n </Field.Control>\n <Field.Description>Max 280 characters</Field.Description>\n </Field>\n </Grid.Item>\n </Grid>\n </Fieldset>\n <Fieldset>\n <Fieldset.Legend>Notifications</Fieldset.Legend>\n <Field name=\"emailNotifs\">\n <Field.Control>\n <Switch label=\"Email notifications\" />\n </Field.Control>\n </Field>\n <Field name=\"marketingEmails\">\n <Field.Control>\n <Switch label=\"Marketing emails\" />\n </Field.Control>\n </Field>\n <Field name=\"frequency\">\n <Field.Label>Digest frequency</Field.Label>\n <Field.Control>\n <RadioGroup name=\"frequency\" orientation=\"vertical\">\n <RadioGroup.Item value=\"daily\" label=\"Daily\" />\n <RadioGroup.Item value=\"weekly\" label=\"Weekly\" />\n <RadioGroup.Item value=\"monthly\" label=\"Monthly\" />\n </RadioGroup>\n </Field.Control>\n </Field>\n </Fieldset>\n <Form.Actions>\n <Button type=\"submit\" variant=\"primary\">Save Changes</Button>\n </Form.Actions>\n</Form>"
83
+ "code": "<Form onSubmit={(e) => { e.preventDefault(); }}>\n <Fieldset>\n <Fieldset.Legend>Profile</Fieldset.Legend>\n <Grid columns={2} gap=\"md\">\n <Field name=\"displayName\">\n <Field.Label>Display Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"How others see you\" />\n </Field.Control>\n </Field>\n <Field name=\"timezone\">\n <Field.Label>Timezone</Field.Label>\n <Field.Control>\n <Select placeholder=\"Select timezone\">\n <Select.Trigger />\n <Select.Content>\n <Select.Item value=\"utc\">UTC</Select.Item>\n <Select.Item value=\"est\">Eastern (EST)</Select.Item>\n <Select.Item value=\"pst\">Pacific (PST)</Select.Item>\n <Select.Item value=\"gmt\">GMT</Select.Item>\n </Select.Content>\n </Select>\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"bio\">\n <Field.Label>Bio</Field.Label>\n <Field.Control>\n <Textarea placeholder=\"Tell us about yourself\" rows={3} maxLength={280} />\n </Field.Control>\n <Field.Description>Max 280 characters</Field.Description>\n </Field>\n </Grid.Item>\n </Grid>\n </Fieldset>\n <Fieldset>\n <Fieldset.Legend>Notifications</Fieldset.Legend>\n <Field name=\"emailNotifs\">\n <Field.Control>\n <Switch label=\"Email notifications\" />\n </Field.Control>\n </Field>\n <Field name=\"marketingEmails\">\n <Field.Control>\n <Switch label=\"Marketing emails\" />\n </Field.Control>\n </Field>\n <Field name=\"frequency\">\n <Field.Label>Digest frequency</Field.Label>\n <Field.Control>\n <RadioGroup name=\"frequency\" orientation=\"vertical\">\n <RadioGroup.Item value=\"daily\" label=\"Daily\" />\n <RadioGroup.Item value=\"weekly\" label=\"Weekly\" />\n <RadioGroup.Item value=\"monthly\" label=\"Monthly\" />\n </RadioGroup>\n </Field.Control>\n </Field>\n </Fieldset>\n <Form.Actions>\n <Button type=\"submit\" variant=\"solid\">Save Changes</Button>\n </Form.Actions>\n</Form>"
84
84
  },
85
85
  {
86
86
  "name": "Contact form",
87
87
  "description": "Mixed control types in one submission flow.",
88
- "code": "<Form onSubmit={(e) => { e.preventDefault(); }}>\n <Grid columns={2} gap=\"md\">\n <Field name=\"name\">\n <Field.Label>Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Your name\" />\n </Field.Control>\n </Field>\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" placeholder=\"you@example.com\" />\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"subject\">\n <Field.Label>Subject</Field.Label>\n <Field.Control>\n <Select placeholder=\"What is this about?\">\n <Select.Trigger />\n <Select.Content>\n <Select.Item value=\"general\">General Inquiry</Select.Item>\n <Select.Item value=\"support\">Technical Support</Select.Item>\n <Select.Item value=\"billing\">Billing</Select.Item>\n <Select.Item value=\"feedback\">Feedback</Select.Item>\n </Select.Content>\n </Select>\n </Field.Control>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"message\">\n <Field.Label>Message</Field.Label>\n <Field.Control>\n <Textarea placeholder=\"How can we help?\" rows={5} />\n </Field.Control>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"copy\">\n <Field.Control>\n <Checkbox label=\"Send me a copy\" />\n </Field.Control>\n </Field>\n </Grid.Item>\n </Grid>\n <Form.Actions>\n <Button type=\"submit\" variant=\"primary\">Send Message</Button>\n </Form.Actions>\n</Form>"
88
+ "code": "<Form onSubmit={(e) => { e.preventDefault(); }}>\n <Grid columns={2} gap=\"md\">\n <Field name=\"name\">\n <Field.Label>Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Your name\" />\n </Field.Control>\n </Field>\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" placeholder=\"you@example.com\" />\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"subject\">\n <Field.Label>Subject</Field.Label>\n <Field.Control>\n <Select placeholder=\"What is this about?\">\n <Select.Trigger />\n <Select.Content>\n <Select.Item value=\"general\">General Inquiry</Select.Item>\n <Select.Item value=\"support\">Technical Support</Select.Item>\n <Select.Item value=\"billing\">Billing</Select.Item>\n <Select.Item value=\"feedback\">Feedback</Select.Item>\n </Select.Content>\n </Select>\n </Field.Control>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"message\">\n <Field.Label>Message</Field.Label>\n <Field.Control>\n <Textarea placeholder=\"How can we help?\" rows={5} />\n </Field.Control>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"copy\">\n <Field.Control>\n <Checkbox label=\"Send me a copy\" />\n </Field.Control>\n </Field>\n </Grid.Item>\n </Grid>\n <Form.Actions>\n <Button type=\"submit\" variant=\"solid\">Send Message</Button>\n </Form.Actions>\n</Form>"
89
89
  },
90
90
  {
91
91
  "name": "With server errors",
92
92
  "description": "Errors from the server land on the fields that caused them.",
93
- "code": "<Form errors={{ username: 'Username is already taken', email: 'Email is already registered' }}>\n <Grid columns={2} gap=\"md\">\n <Field name=\"username\">\n <Field.Label>Username</Field.Label>\n <Field.Control>\n <Input defaultValue=\"janedoe\" />\n </Field.Control>\n <Field.Error />\n </Field>\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" defaultValue=\"jane@example.com\" />\n </Field.Control>\n <Field.Error />\n </Field>\n </Grid>\n <Form.Actions>\n <Button type=\"submit\" variant=\"primary\">Submit</Button>\n </Form.Actions>\n</Form>"
93
+ "code": "<Form errors={{ username: 'Username is already taken', email: 'Email is already registered' }}>\n <Grid columns={2} gap=\"md\">\n <Field name=\"username\">\n <Field.Label>Username</Field.Label>\n <Field.Control>\n <Input defaultValue=\"janedoe\" />\n </Field.Control>\n <Field.Error />\n </Field>\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" defaultValue=\"jane@example.com\" />\n </Field.Control>\n <Field.Error />\n </Field>\n </Grid>\n <Form.Actions>\n <Button type=\"submit\" variant=\"solid\">Submit</Button>\n </Form.Actions>\n</Form>"
94
94
  }
95
95
  ],
96
96
  "relations": [
@@ -8,7 +8,7 @@
8
8
  .grid {
9
9
  display: grid;
10
10
  width: 100%;
11
- gap: var(--_fui-grid-gap, #{layout.gap("md")});
11
+ gap: layout.gap("md");
12
12
  }
13
13
 
14
14
  // ============================================
@@ -75,7 +75,7 @@
75
75
  .columnsResponsive {
76
76
  --_cols: var(--fui-grid-cols, 1);
77
77
 
78
- grid-template-columns: repeat(var(--_cols), 1fr);
78
+ grid-template-columns: repeat(var(--_cols, var(--fui-grid-cols, 1)), 1fr);
79
79
 
80
80
  @include breakpoint-sm {
81
81
  --_cols: var(--fui-grid-cols-sm, var(--fui-grid-cols, 1));
@@ -98,7 +98,7 @@
98
98
  {
99
99
  "name": "For Default Layout",
100
100
  "description": "Brand, nav, and actions for AppShell layout=\"default\".",
101
- "code": "import { Box } from '@/components/Box';\nimport { Button } from '@/components/Button';\nimport { Header } from '@/components/Header';\nimport { ThemeToggle } from '@/components/Theme';\n\n<Box width=\"100%\" border rounded=\"md\" overflow=\"hidden\">\n <Header>\n <Header.SkipLink />\n <Header.Trigger />\n <Header.Brand href=\"/\">MyApp</Header.Brand>\n <Header.Nav>\n <Header.NavItem href=\"/dashboard\" active>Dashboard</Header.NavItem>\n <Header.NavItem href=\"/projects\">Projects</Header.NavItem>\n <Header.NavItem href=\"/settings\">Settings</Header.NavItem>\n </Header.Nav>\n <Header.Spacer />\n <Header.Actions>\n <ThemeToggle size=\"md\" />\n <Button variant=\"secondary\" size=\"sm\">Sign In</Button>\n </Header.Actions>\n </Header>\n</Box>"
101
+ "code": "import { Box } from '@/components/Box';\nimport { Button } from '@/components/Button';\nimport { Header } from '@/components/Header';\nimport { ThemeToggle } from '@/components/Theme';\n\n<Box width=\"100%\" border rounded=\"md\" overflow=\"hidden\">\n <Header>\n <Header.SkipLink />\n <Header.Trigger />\n <Header.Brand href=\"/\">MyApp</Header.Brand>\n <Header.Nav>\n <Header.NavItem href=\"/dashboard\" active>Dashboard</Header.NavItem>\n <Header.NavItem href=\"/projects\">Projects</Header.NavItem>\n <Header.NavItem href=\"/settings\">Settings</Header.NavItem>\n </Header.Nav>\n <Header.Spacer />\n <Header.Actions>\n <ThemeToggle size=\"md\" />\n <Button variant=\"soft\" size=\"sm\">Sign In</Button>\n </Header.Actions>\n </Header>\n</Box>"
102
102
  },
103
103
  {
104
104
  "name": "Marketing Header",
@@ -128,7 +128,7 @@
128
128
  {
129
129
  "name": "With NavigationMenu",
130
130
  "description": "Rich dropdown panels with titles and descriptions.",
131
- "code": "import { Box } from '@/components/Box';\nimport { Button } from '@/components/Button';\nimport { Header } from '@/components/Header';\nimport { NavigationMenu } from '@/components/NavigationMenu';\nimport { Stack } from '@/components/Stack';\nimport { ThemeToggle } from '@/components/Theme';\n\n<Box width=\"100%\" border rounded=\"md\" overflow=\"hidden\">\n <Header>\n <Header.Brand href=\"/\">MyApp</Header.Brand>\n <Header.Nav>\n <NavigationMenu aria-label=\"Site navigation\">\n <NavigationMenu.List>\n <NavigationMenu.Item value=\"products\">\n <NavigationMenu.Trigger>Products</NavigationMenu.Trigger>\n <NavigationMenu.Content>\n <Box padding=\"xs\" style={{ minWidth: '200px' }}>\n <Stack gap=\"none\">\n <NavigationMenu.Link href=\"/analytics\" title=\"Analytics\" description=\"Track your metrics.\" />\n <NavigationMenu.Link href=\"/automation\" title=\"Automation\" description=\"Automate workflows.\" />\n </Stack>\n </Box>\n </NavigationMenu.Content>\n </NavigationMenu.Item>\n <NavigationMenu.Item>\n <NavigationMenu.Link href=\"/pricing\">Pricing</NavigationMenu.Link>\n </NavigationMenu.Item>\n </NavigationMenu.List>\n <NavigationMenu.Viewport />\n </NavigationMenu>\n </Header.Nav>\n <Header.Spacer />\n <Header.Actions>\n <ThemeToggle size=\"md\" />\n <Button variant=\"primary\" size=\"sm\">Sign Up</Button>\n </Header.Actions>\n </Header>\n</Box>"
131
+ "code": "import { Box } from '@/components/Box';\nimport { Button } from '@/components/Button';\nimport { Header } from '@/components/Header';\nimport { NavigationMenu } from '@/components/NavigationMenu';\nimport { Stack } from '@/components/Stack';\nimport { ThemeToggle } from '@/components/Theme';\n\n<Box width=\"100%\" border rounded=\"md\" overflow=\"hidden\">\n <Header>\n <Header.Brand href=\"/\">MyApp</Header.Brand>\n <Header.Nav>\n <NavigationMenu aria-label=\"Site navigation\">\n <NavigationMenu.List>\n <NavigationMenu.Item value=\"products\">\n <NavigationMenu.Trigger>Products</NavigationMenu.Trigger>\n <NavigationMenu.Content>\n <Box padding=\"xs\" style={{ minWidth: '200px' }}>\n <Stack gap=\"none\">\n <NavigationMenu.Link href=\"/analytics\" title=\"Analytics\" description=\"Track your metrics.\" />\n <NavigationMenu.Link href=\"/automation\" title=\"Automation\" description=\"Automate workflows.\" />\n </Stack>\n </Box>\n </NavigationMenu.Content>\n </NavigationMenu.Item>\n <NavigationMenu.Item>\n <NavigationMenu.Link href=\"/pricing\">Pricing</NavigationMenu.Link>\n </NavigationMenu.Item>\n </NavigationMenu.List>\n <NavigationMenu.Viewport />\n </NavigationMenu>\n </Header.Nav>\n <Header.Spacer />\n <Header.Actions>\n <ThemeToggle size=\"md\" />\n <Button variant=\"solid\" size=\"sm\">Sign Up</Button>\n </Header.Actions>\n </Header>\n</Box>"
132
132
  }
133
133
  ],
134
134
  "relations": [
@@ -1,8 +1,10 @@
1
1
  @use "../../tokens/variables" as *;
2
+ @use "../../tokens/measurements.generated" as measurements;
2
3
  @use "../../tokens/mixins" as *;
3
4
  @use "../../recipes/action" as action;
4
5
  @use "../../recipes/layout" as layout;
5
6
  @use "../../recipes/navigation" as navigation;
7
+ @use "../../recipes/overlay" as overlay;
6
8
  @use "../../recipes/popup" as popup;
7
9
 
8
10
  // ============================================
@@ -39,7 +41,7 @@
39
41
  }
40
42
 
41
43
  .elevatedOnScroll {
42
- border-bottom: var(--fui-stroke-hairline, 1px) solid transparent;
44
+ border-bottom: var(--fui-stroke-hairline, #{$fui-stroke-hairline}) solid transparent;
43
45
  transition: border-color var(--fui-transition-fast, $fui-transition-fast);
44
46
  }
45
47
 
@@ -127,8 +129,8 @@
127
129
  align-items: center;
128
130
  gap: var(--fui-space-1, $fui-space-1);
129
131
  list-style: none;
130
- margin: 0;
131
- padding: 0;
132
+ margin: var(--fui-raw-space-0, #{measurements.raw-space(0)});
133
+ padding: var(--fui-raw-space-0, #{measurements.raw-space(0)});
132
134
  }
133
135
 
134
136
  .navItem {
@@ -192,7 +194,7 @@
192
194
  // ============================================
193
195
 
194
196
  .navMenuPositioner {
195
- z-index: 52;
197
+ z-index: var(--fui-overlay-layer-anchored, #{$fui-overlay-layer-anchored});
196
198
  outline: none;
197
199
  }
198
200
 
@@ -200,7 +202,6 @@
200
202
  @include popup.container;
201
203
 
202
204
  min-width: layout.measure("field-minimum");
203
- box-shadow: var(--fui-shadow-md, $fui-shadow-md);
204
205
 
205
206
  opacity: 0;
206
207
  transform: scale(0.95);
@@ -338,24 +339,15 @@
338
339
  // ============================================
339
340
 
340
341
  .mobileNavBackdrop {
341
- position: fixed;
342
- inset: 0;
343
- z-index: 98;
344
- background: var(--fui-backdrop, $fui-backdrop);
342
+ @include overlay.backdrop;
343
+
345
344
  animation: mobileNavFadeIn var(--fui-transition-normal, $fui-transition-normal);
346
345
  }
347
346
 
347
+ // The mobile nav is the Drawer surface: same frame, width, layer and chrome.
348
348
  .mobileNavDrawer {
349
- position: fixed;
350
- top: 0;
351
- right: 0;
352
- bottom: 0;
353
- z-index: 99;
354
- width: min(320px, 85vw);
355
- background-color: var(--fui-bg-primary, $fui-bg-primary);
356
- border-left: var(--fui-stroke-hairline, 1px) solid var(--fui-border, $fui-border);
357
- display: flex;
358
- flex-direction: column;
349
+ @include overlay.side-panel("end");
350
+
359
351
  animation: mobileNavSlideIn var(--fui-transition-normal, $fui-transition-normal);
360
352
  }
361
353
 
@@ -364,7 +356,8 @@
364
356
  align-items: center;
365
357
  justify-content: flex-end;
366
358
  padding: var(--fui-space-3, $fui-space-3) var(--fui-space-4, $fui-space-4);
367
- border-bottom: var(--fui-stroke-hairline, 1px) solid var(--fui-border, $fui-border);
359
+ border-bottom: var(--fui-stroke-hairline, #{$fui-stroke-hairline}) solid
360
+ var(--fui-border, $fui-border);
368
361
  }
369
362
 
370
363
  .mobileNavClose {
@@ -388,30 +381,23 @@
388
381
  .mobileNavBody {
389
382
  flex: 1;
390
383
  overflow-y: auto;
391
- padding: var(--fui-space-3, $fui-space-3) var(--fui-space-4, $fui-space-4);
384
+ // Same gutter as NavigationMenu.drawerBody so both mobile navs inset their
385
+ // rows identically (UIR-D42).
386
+ padding: var(--fui-space-2, $fui-space-2) var(--fui-navigation-gutter, #{navigation.gutter()});
392
387
  }
393
388
 
394
389
  .mobileNavLink {
395
390
  @include button-reset;
396
391
  @include navigation.row;
392
+ @include navigation.link-states;
397
393
 
398
394
  display: flex;
399
395
  align-items: center;
400
396
  width: 100%;
401
- border-radius: var(--fui-radius-md, $fui-radius-md);
402
- color: var(--fui-text-secondary, $fui-text-secondary);
403
- text-decoration: none;
404
- font-weight: var(--fui-font-weight-medium, $fui-font-weight-medium);
405
-
406
- &:hover {
407
- background-color: var(--fui-bg-hover, $fui-bg-hover);
408
- color: var(--fui-text-primary, $fui-text-primary);
409
- }
410
397
  }
411
398
 
412
399
  .mobileNavLinkActive {
413
- color: var(--fui-text-primary, $fui-text-primary);
414
- background-color: var(--fui-control-selected-bg, var(--fui-bg-active, $fui-bg-active));
400
+ @include navigation.link-active;
415
401
  }
416
402
 
417
403
  .mobileNavActions {
@@ -432,7 +418,7 @@
432
418
 
433
419
  @keyframes mobileNavSlideIn {
434
420
  from {
435
- transform: translateX(100%);
421
+ transform: translateX(overlay.side-panel-offscreen("end"));
436
422
  }
437
423
  to {
438
424
  transform: translateX(0);
@@ -456,11 +442,13 @@
456
442
  position: absolute;
457
443
  top: var(--fui-space-2, $fui-space-2);
458
444
  left: var(--fui-space-2, $fui-space-2);
459
- z-index: 100;
445
+ // Top of the layer scale: a skip link must win over every overlay.
446
+ z-index: var(--fui-overlay-layer-tooltip, #{$fui-overlay-layer-tooltip});
460
447
  padding: var(--fui-space-2, $fui-space-2) var(--fui-space-4, $fui-space-4);
461
448
  background-color: var(--fui-bg-primary, $fui-bg-primary);
462
449
  color: var(--fui-text-primary, $fui-text-primary);
463
- border: var(--fui-stroke-default, 2px) solid var(--fui-color-accent, $fui-color-accent);
450
+ border: var(--fui-stroke-default, #{$fui-stroke-default}) solid
451
+ var(--fui-color-accent, $fui-color-accent);
464
452
  border-radius: var(--fui-radius-md, $fui-radius-md);
465
453
  text-decoration: none;
466
454
  font-weight: var(--fui-font-weight-medium, $fui-font-weight-medium);
@@ -471,7 +459,7 @@
471
459
  height: auto;
472
460
  clip: auto;
473
461
  white-space: normal;
474
- margin: 0;
462
+ margin: var(--fui-raw-space-0, #{measurements.raw-space(0)});
475
463
  padding: var(--fui-space-2, $fui-space-2) var(--fui-space-4, $fui-space-4);
476
464
  overflow: visible;
477
465
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://usefragments.com/schemas/contract.v1.json",
3
3
  "name": "Icon",
4
- "description": "Sizes and colors any icon so it lines up with the text beside it.",
4
+ "description": "Sizes and colours any icon so it lines up with the text beside it.",
5
5
  "category": "display",
6
6
  "tags": ["icon", "visual", "symbol", "graphic"],
7
7
  "status": "stable",
@@ -12,8 +12,8 @@
12
12
  "icon: union (required)",
13
13
  "size: xs|sm|md|lg|xl (default: md)",
14
14
  "weight: string (default: regular)",
15
- "variant: default|primary|secondary|tertiary|accent|success|warning|error",
16
- "color: primary|secondary|tertiary|accent|success|warning|error",
15
+ "tone: accent|info|success|warning|danger",
16
+ "color: primary|secondary|tertiary",
17
17
  "iconProps: object"
18
18
  ],
19
19
  "props": {
@@ -41,27 +41,17 @@
41
41
  "required": false,
42
42
  "values": ["thin", "light", "regular", "bold", "fill", "duotone"]
43
43
  },
44
- "variant": {
44
+ "tone": {
45
45
  "type": "enum",
46
- "description": "Semantic color variant",
47
- "default": "default",
46
+ "description": "Semantic colour. Reserve success, warning and danger for real state; omit to inherit currentColor",
48
47
  "required": false,
49
- "values": [
50
- "default",
51
- "primary",
52
- "secondary",
53
- "tertiary",
54
- "accent",
55
- "success",
56
- "warning",
57
- "error"
58
- ]
48
+ "values": ["accent", "info", "success", "warning", "danger"]
59
49
  },
60
50
  "color": {
61
51
  "type": "enum",
62
- "description": "Deprecated alias for variant",
52
+ "description": "Text-hierarchy colour, the same axis as Text color. tone wins when both are set",
63
53
  "required": false,
64
- "values": ["primary", "secondary", "tertiary", "accent", "success", "warning", "error"]
54
+ "values": ["primary", "secondary", "tertiary"]
65
55
  },
66
56
  "iconProps": {
67
57
  "type": "object",
@@ -76,7 +66,7 @@
76
66
  ],
77
67
  "whenNot": ["Artwork or illustration (use Image)", "Multi-color or animated graphics"],
78
68
  "guidelines": [
79
- "Reserve success, warning, and error colors for real state",
69
+ "Reserve the success, warning, and danger tones for real state",
80
70
  "Hold one size per context",
81
71
  "Match weight to the text weight beside it",
82
72
  "iconProps reaches options the wrapper does not expose"
@@ -99,9 +89,14 @@
99
89
  "code": "<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>\n <Icon icon={Star} size=\"xs\" />\n <Icon icon={Star} size=\"sm\" />\n <Icon icon={Star} size=\"md\" />\n <Icon icon={Star} size=\"lg\" />\n <Icon icon={Star} size=\"xl\" />\n</div>"
100
90
  },
101
91
  {
102
- "name": "Semantic Colors",
103
- "description": "Color states carry meaning — never use them for decoration.",
104
- "code": "<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>\n <Icon icon={Check} variant=\"success\" />\n <Icon icon={Warning} variant=\"warning\" />\n <Icon icon={Warning} variant=\"error\" />\n <Icon icon={Info} variant=\"accent\" />\n</div>"
92
+ "name": "Tones",
93
+ "description": "Tone states carry meaning — never use them for decoration.",
94
+ "code": "<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>\n <Icon icon={Check} tone=\"success\" />\n <Icon icon={Warning} tone=\"warning\" />\n <Icon icon={Warning} tone=\"danger\" />\n <Icon icon={Info} tone=\"accent\" />\n</div>"
95
+ },
96
+ {
97
+ "name": "Hierarchy",
98
+ "description": "The text colour ladder, for glyphs that sit beside secondary or tertiary copy.",
99
+ "code": "<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>\n <Icon icon={Heart} color=\"primary\" />\n <Icon icon={Heart} color=\"secondary\" />\n <Icon icon={Heart} color=\"tertiary\" />\n</div>"
105
100
  },
106
101
  {
107
102
  "name": "Weights",
@@ -136,7 +131,8 @@
136
131
  "icon: React component - icon component (required)",
137
132
  "size: xs|sm|md|lg|xl - icon size",
138
133
  "weight: string - optional style/weight hint for icons that support it",
139
- "variant: default|primary|secondary|tertiary|accent|success|warning|error - color",
134
+ "tone: accent|info|success|warning|danger - semantic colour",
135
+ "color: primary|secondary|tertiary - text-hierarchy colour",
140
136
  "iconProps: typed from the passed icon component - advanced icon-specific props"
141
137
  ],
142
138
  "a11yRules": ["A11Y_ICON_LABEL", "A11Y_COLOR_CONTRAST"]
@@ -20,35 +20,36 @@
20
20
  }
21
21
  }
22
22
 
23
- .size2xl {
24
- @include representation.glyph("2xl");
25
- }
26
-
27
- // Color variants (matching Badge/Alert pattern)
28
- .primary {
23
+ // Text-hierarchy colour (Text's `color` axis). Absence inherits currentColor.
24
+ .colorPrimary {
29
25
  color: var(--fui-text-primary, $fui-text-primary);
30
26
  }
31
27
 
32
- .secondary {
28
+ .colorSecondary {
33
29
  color: var(--fui-text-secondary, $fui-text-secondary);
34
30
  }
35
31
 
36
- .tertiary {
32
+ .colorTertiary {
37
33
  color: var(--fui-text-tertiary, $fui-text-tertiary);
38
34
  }
39
35
 
40
- .accent {
36
+ // Tone paints the shared status ramp (same `*-text` stops as Badge and Text).
37
+ .toneAccent {
41
38
  color: var(--fui-color-accent, $fui-color-accent);
42
39
  }
43
40
 
44
- .success {
41
+ .toneInfo {
42
+ color: var(--fui-color-info-text, $fui-color-info-text);
43
+ }
44
+
45
+ .toneSuccess {
45
46
  color: var(--fui-color-success-text, $fui-color-success-text);
46
47
  }
47
48
 
48
- .warning {
49
+ .toneWarning {
49
50
  color: var(--fui-color-warning-text, $fui-color-warning-text);
50
51
  }
51
52
 
52
- .error {
53
+ .toneDanger {
53
54
  color: var(--fui-color-danger-text, $fui-color-danger-text);
54
55
  }
@@ -7,56 +7,56 @@ import styles from "./Icon.module.scss";
7
7
  type AnyIconComponent = React.ComponentType<any>;
8
8
  type IconComponentProps<TIcon extends AnyIconComponent> = React.ComponentPropsWithoutRef<TIcon>;
9
9
 
10
+ export type IconSize = "xs" | "sm" | "md" | "lg" | "xl";
11
+ export type IconTone = "accent" | "info" | "success" | "warning" | "danger";
12
+ export type IconColor = "primary" | "secondary" | "tertiary";
13
+
10
14
  export type IconProps<TIcon extends AnyIconComponent = AnyIconComponent> = Omit<
11
15
  React.HTMLAttributes<HTMLSpanElement>,
12
16
  "color"
13
17
  > & {
14
18
  /** The icon component to render */
15
19
  icon: TIcon;
16
- /** Size of the icon */
17
- size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
20
+ /** Size of the icon. `xl` is the largest step (24px); the glyph inherits
21
+ * `currentColor` and the surrounding line height.
22
+ * @default "md" */
23
+ size?: IconSize;
18
24
  /** Optional style/weight hint forwarded when the icon component supports a `weight` prop */
19
25
  weight?: string;
20
- /** Semantic color variant */
21
- variant?:
22
- | "default"
23
- | "primary"
24
- | "secondary"
25
- | "tertiary"
26
- | "accent"
27
- | "success"
28
- | "warning"
29
- | "error";
30
- /** @deprecated Use variant instead */
31
- color?: "primary" | "secondary" | "tertiary" | "accent" | "success" | "warning" | "error";
26
+ /** Semantic colour. Reserve `success`, `warning` and `danger` for real
27
+ * state; `accent` is the brand spend. Omit to inherit `currentColor`. */
28
+ tone?: IconTone;
29
+ /** Text-hierarchy colour, the same axis as Text's `color`. `tone` wins when
30
+ * both are set. Omit to inherit `currentColor`. */
31
+ color?: IconColor;
32
32
  /** Additional props forwarded to the underlying icon component (typed from `icon`) */
33
33
  iconProps?: Partial<IconComponentProps<TIcon>>;
34
34
  };
35
35
 
36
36
  const iconTargets = MEASUREMENT_PROFILES.targets.icon;
37
- type IconSize = NonNullable<IconProps["size"]>;
37
+
38
+ const TONE_CLASS: Record<IconTone, string> = {
39
+ accent: styles.toneAccent,
40
+ info: styles.toneInfo,
41
+ success: styles.toneSuccess,
42
+ warning: styles.toneWarning,
43
+ danger: styles.toneDanger,
44
+ };
45
+
46
+ const COLOR_CLASS: Record<IconColor, string> = {
47
+ primary: styles.colorPrimary,
48
+ secondary: styles.colorSecondary,
49
+ tertiary: styles.colorTertiary,
50
+ };
38
51
 
39
52
  const IconRoot = React.forwardRef<HTMLSpanElement, IconProps>(function Icon(
40
- {
41
- icon: IconComponent,
42
- size = "md",
43
- weight = "regular",
44
- variant,
45
- color,
46
- iconProps,
47
- className,
48
- style,
49
- ...htmlProps
50
- },
53
+ { icon: IconComponent, size = "md", weight = "regular", tone, color, iconProps, className, style, ...htmlProps },
51
54
  ref
52
55
  ) {
53
- // Support deprecated color prop (variant takes precedence)
54
- const colorVariant = variant || color;
55
-
56
56
  const classes = [
57
57
  styles.icon,
58
- size === "2xl" ? styles.size2xl : styles[size as Exclude<IconSize, "2xl">],
59
- colorVariant && colorVariant !== "default" && styles[colorVariant],
58
+ styles[size],
59
+ tone ? TONE_CLASS[tone] : color ? COLOR_CLASS[color] : undefined,
60
60
  className,
61
61
  ]
62
62
  .filter(Boolean)
@@ -9,7 +9,7 @@
9
9
  "exportName": "IconButton",
10
10
  "propsSummary": [
11
11
  "children: node (required)",
12
- "variant: ghost|subtle|outlined (default: ghost)",
12
+ "variant: ghost|soft|outline (default: ghost)",
13
13
  "size: sm|md|lg (default: md)",
14
14
  "pressed: boolean",
15
15
  "aria-label: string",
@@ -26,7 +26,7 @@
26
26
  "description": "Visual treatment for the icon-only action",
27
27
  "default": "ghost",
28
28
  "required": false,
29
- "values": ["ghost", "subtle", "outlined"]
29
+ "values": ["ghost", "soft", "outline"]
30
30
  },
31
31
  "size": {
32
32
  "type": "enum",
@@ -64,7 +64,7 @@
64
64
  ],
65
65
  "guidelines": [
66
66
  "aria-label or aria-labelledby is required, every time",
67
- "ghost for ordinary toolbar actions; outlined when it needs separation",
67
+ "ghost for ordinary toolbar actions; outline when it needs separation",
68
68
  "pressed only for real toggle state, not selection",
69
69
  "Keep icon meaning obvious, or pair it with a Tooltip"
70
70
  ],
@@ -83,22 +83,22 @@
83
83
  {
84
84
  "name": "Variants",
85
85
  "description": "Rising chrome: transparent, tinted, then bordered.",
86
- "code": "import { Plus as PlusIcon } from '@phosphor-icons/react';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"sm\" align=\"center\">\n <IconButton aria-label=\"Add item\" variant=\"ghost\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"subtle\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"outlined\">\n <PlusIcon aria-hidden />\n </IconButton>\n</Stack>"
86
+ "code": "import { Plus as PlusIcon } from '@phosphor-icons/react';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"sm\" align=\"center\">\n <IconButton aria-label=\"Add item\" variant=\"ghost\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"soft\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"outline\">\n <PlusIcon aria-hidden />\n </IconButton>\n</Stack>"
87
87
  },
88
88
  {
89
89
  "name": "Sizes",
90
90
  "description": "sm for table rows, lg for primary chrome.",
91
- "code": "import { Plus as PlusIcon } from '@phosphor-icons/react';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"sm\" align=\"center\">\n <IconButton aria-label=\"Add item\" variant=\"outlined\" size=\"sm\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"outlined\" size=\"md\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"outlined\" size=\"lg\">\n <PlusIcon aria-hidden />\n </IconButton>\n</Stack>"
91
+ "code": "import { Plus as PlusIcon } from '@phosphor-icons/react';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"sm\" align=\"center\">\n <IconButton aria-label=\"Add item\" variant=\"outline\" size=\"sm\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"outline\" size=\"md\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"outline\" size=\"lg\">\n <PlusIcon aria-hidden />\n </IconButton>\n</Stack>"
92
92
  },
93
93
  {
94
94
  "name": "Pressed state",
95
95
  "description": "Toggle that stays on, reported through aria-pressed.",
96
- "code": "import { PushPin as PinIcon } from '@phosphor-icons/react';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"sm\" align=\"center\">\n <IconButton aria-label=\"Pin item\" variant=\"outlined\">\n <PinIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Unpin item\" variant=\"outlined\" pressed>\n <PinIcon aria-hidden />\n </IconButton>\n</Stack>"
96
+ "code": "import { PushPin as PinIcon } from '@phosphor-icons/react';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"sm\" align=\"center\">\n <IconButton aria-label=\"Pin item\" variant=\"outline\">\n <PinIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Unpin item\" variant=\"outline\" pressed>\n <PinIcon aria-hidden />\n </IconButton>\n</Stack>"
97
97
  },
98
98
  {
99
99
  "name": "Disabled",
100
100
  "description": "Unavailable action, out of the tab order.",
101
- "code": "import { Trash as TrashIcon } from '@phosphor-icons/react';\n\n<IconButton aria-label=\"Delete row\" variant=\"outlined\" disabled>\n <TrashIcon aria-hidden />\n</IconButton>"
101
+ "code": "import { Trash as TrashIcon } from '@phosphor-icons/react';\n\n<IconButton aria-label=\"Delete row\" variant=\"outline\" disabled>\n <TrashIcon aria-hidden />\n</IconButton>"
102
102
  }
103
103
  ],
104
104
  "relations": [
@@ -116,7 +116,7 @@
116
116
  "contract": {
117
117
  "propsSummary": [
118
118
  "children: ReactNode - icon element (required)",
119
- "variant: ghost|subtle|outlined - visual treatment",
119
+ "variant: ghost|soft|outline - visual treatment",
120
120
  "size: sm|md|lg - square control size",
121
121
  "pressed: boolean - toggle state exposed with aria-pressed",
122
122
  "aria-label or aria-labelledby - required accessible name"