@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,22 +1,23 @@
1
1
  @use "../../tokens/variables" as *;
2
2
  @use "../../tokens/mixins" as *;
3
+ @use "../../tokens/measurements.generated" as measurements;
3
4
  @use "../../recipes/feedback" as feedback;
4
5
 
5
6
  .container {
6
7
  position: fixed;
7
- z-index: var(--fui-feedback-toast-layer, 70);
8
+ z-index: var(--fui-overlay-layer-toast, #{$fui-overlay-layer-toast});
8
9
  display: flex;
9
10
  flex-direction: column;
10
- gap: var(--fui-feedback-stack-gap, var(--fui-raw-space-8, 8px));
11
+ gap: var(--fui-raw-space-8, #{measurements.raw-space(8)});
11
12
  inline-size: min(
12
- var(--fui-feedback-toast-max-inline, 400px),
13
+ var(--fui-overlay-popover-md, #{measurements.target-value("overlay", "popover-md")}),
13
14
  calc(
14
15
  100% - var(
15
16
  --fui-feedback-viewport-inset-left,
16
- max(var(--fui-raw-space-16, 16px), env(safe-area-inset-left))
17
+ max(var(--fui-raw-space-16, #{measurements.raw-space(16)}), env(safe-area-inset-left))
17
18
  ) - var(
18
19
  --fui-feedback-viewport-inset-right,
19
- max(var(--fui-raw-space-16, 16px), env(safe-area-inset-right))
20
+ max(var(--fui-raw-space-16, #{measurements.raw-space(16)}), env(safe-area-inset-right))
20
21
  )
21
22
  )
22
23
  );
@@ -53,10 +54,17 @@
53
54
 
54
55
  .toast {
55
56
  @include feedback.transient;
57
+ @include high-contrast-outline;
56
58
 
57
- background-color: var(--fui-bg-elevated, $fui-bg-elevated);
58
- border: var(--fui-stroke-hairline, 1px) solid var(--fui-border, $fui-border);
59
- border-radius: var(--fui-radius-lg, $fui-radius-lg);
59
+ --_toast-tint: var(--fui-bg-elevated, #{$fui-bg-elevated});
60
+ --_toast-line: var(--fui-border, #{$fui-border});
61
+ --_toast-ink: var(--fui-text-primary, #{$fui-text-primary});
62
+ --_toast-ink-soft: var(--fui-text-secondary, #{$fui-text-secondary});
63
+
64
+ background-color: var(--_toast-tint, var(--fui-bg-elevated, #{$fui-bg-elevated}));
65
+ border: var(--fui-stroke-hairline, #{$fui-stroke-hairline}) solid
66
+ var(--_toast-line, var(--fui-border, #{$fui-border}));
67
+ border-radius: var(--fui-radius-l1, $fui-radius-l1);
60
68
  box-shadow: var(--fui-shadow-md, $fui-shadow-md);
61
69
  animation: toastEnter var(--fui-transition-normal, $fui-transition-normal);
62
70
  }
@@ -77,64 +85,46 @@
77
85
  }
78
86
  }
79
87
 
80
- .default .icon {
81
- color: var(--fui-text-secondary, $fui-text-secondary);
82
- }
83
-
84
- .success {
85
- background: var(--fui-color-success-bg, $fui-color-success-bg);
86
- border-color: var(--fui-color-success-border, $fui-color-success-border);
87
-
88
- .title,
89
- .description,
90
- .icon {
91
- color: var(--fui-color-success-text, $fui-color-success-text);
92
- }
88
+ // Tones paint wash, hairline and ink from the shared status ramp; the
89
+ // description drops to the same ink so the toast reads as one tinted object.
90
+ @mixin _tone($tone, $bg, $text, $border) {
91
+ --_toast-tint: var(--fui-color-#{$tone}-bg, #{$bg});
92
+ --_toast-line: var(--fui-color-#{$tone}-border, #{$border});
93
+ --_toast-ink: var(--fui-color-#{$tone}-text, #{$text});
94
+ --_toast-ink-soft: var(--fui-color-#{$tone}-text, #{$text});
93
95
  }
94
96
 
95
- .error {
96
- background: var(--fui-color-danger-bg, $fui-color-danger-bg);
97
- border-color: var(--fui-color-danger-border, $fui-color-danger-border);
98
-
99
- .title,
100
- .description,
101
- .icon {
102
- color: var(--fui-color-danger-text, $fui-color-danger-text);
103
- }
97
+ .toneSuccess {
98
+ @include _tone(
99
+ "success",
100
+ $fui-color-success-bg,
101
+ $fui-color-success-text,
102
+ $fui-color-success-border
103
+ );
104
104
  }
105
105
 
106
- .warning {
107
- background: var(--fui-color-warning-bg, $fui-color-warning-bg);
108
- border-color: var(--fui-color-warning-border, $fui-color-warning-border);
109
-
110
- .title,
111
- .description,
112
- .icon {
113
- color: var(--fui-color-warning-text, $fui-color-warning-text);
114
- }
106
+ .toneDanger {
107
+ @include _tone("danger", $fui-color-danger-bg, $fui-color-danger-text, $fui-color-danger-border);
115
108
  }
116
109
 
117
- .info {
118
- background: var(--fui-color-info-bg, $fui-color-info-bg);
119
- border-color: var(--fui-color-info-border, $fui-color-info-border);
120
-
121
- .title,
122
- .description,
123
- .icon {
124
- color: var(--fui-color-info-text, $fui-color-info-text);
125
- }
110
+ .toneWarning {
111
+ @include _tone(
112
+ "warning",
113
+ $fui-color-warning-bg,
114
+ $fui-color-warning-text,
115
+ $fui-color-warning-border
116
+ );
126
117
  }
127
118
 
128
- .success .description,
129
- .error .description,
130
- .warning .description,
131
- .info .description {
132
- opacity: 0.8;
119
+ .toneInfo {
120
+ @include _tone("info", $fui-color-info-bg, $fui-color-info-text, $fui-color-info-border);
133
121
  }
134
122
 
135
123
  .icon {
136
124
  @include feedback.icon;
137
125
 
126
+ color: var(--_toast-ink-soft, var(--fui-text-secondary, #{$fui-text-secondary}));
127
+
138
128
  svg {
139
129
  inline-size: 100%;
140
130
  block-size: 100%;
@@ -142,81 +132,36 @@
142
132
  }
143
133
 
144
134
  .toast:has(.description) .icon {
145
- margin-block-start: var(--fui-stroke-hairline, 1px);
135
+ margin-block-start: var(--fui-stroke-hairline, #{$fui-stroke-hairline});
146
136
  }
147
137
 
148
138
  .content {
149
139
  display: grid;
150
140
  flex: 1;
151
- gap: var(--fui-feedback-text-gap, var(--fui-raw-space-4, 4px));
141
+ gap: var(--fui-feedback-text-gap, var(--fui-raw-space-4, #{measurements.raw-space(4)}));
152
142
  min-inline-size: 0;
153
143
  }
154
144
 
155
145
  .title {
156
146
  @include feedback.title;
157
147
 
158
- color: var(--fui-text-primary, $fui-text-primary);
148
+ color: var(--_toast-ink, var(--fui-text-primary, #{$fui-text-primary}));
159
149
  }
160
150
 
161
151
  .description {
162
152
  @include feedback.body;
163
153
 
164
- color: var(--fui-text-secondary, $fui-text-secondary);
165
- }
166
-
167
- .action {
168
- @include button-reset;
169
- @include feedback.compact-action;
170
-
171
- flex-shrink: 0;
172
- border-radius: var(--fui-radius-sm, $fui-radius-sm);
173
- color: var(--fui-color-accent, $fui-color-accent);
174
- cursor: pointer;
175
- transition: background-color var(--fui-transition-fast, $fui-transition-fast);
176
-
177
- &:hover {
178
- background-color: var(--fui-bg-hover, $fui-bg-hover);
179
- }
180
-
181
- &:focus-visible {
182
- @include focus-ring;
183
- }
154
+ color: var(--_toast-ink-soft, var(--fui-text-secondary, #{$fui-text-secondary}));
184
155
  }
185
156
 
157
+ // The action and close are kit buttons; only their placement lives here.
158
+ .action,
186
159
  .close {
187
- @include button-reset;
188
- @include feedback.close;
189
-
190
160
  flex-shrink: 0;
191
- border-radius: var(--fui-radius-sm, $fui-radius-sm);
192
- color: var(--fui-text-tertiary, $fui-text-tertiary);
193
- cursor: pointer;
194
- transition:
195
- background-color var(--fui-transition-fast, $fui-transition-fast),
196
- color var(--fui-transition-fast, $fui-transition-fast);
197
-
198
- svg {
199
- inline-size: var(--_fui-action-icon-size);
200
- block-size: var(--_fui-action-icon-size);
201
- }
202
-
203
- &:hover {
204
- background-color: var(--fui-bg-hover, $fui-bg-hover);
205
- color: var(--fui-text-secondary, $fui-text-secondary);
206
- }
207
-
208
- &:focus-visible {
209
- @include focus-ring;
210
- }
211
161
  }
212
162
 
213
163
  @media (prefers-reduced-motion: reduce) {
214
164
  .toast {
215
165
  animation: none;
216
166
  }
217
-
218
- .action,
219
- .close {
220
- transition: none;
221
- }
222
167
  }
@@ -1,13 +1,15 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
- import styles from './Toast.module.scss';
3
+ import * as React from "react";
4
+ import { Button } from "../Button";
5
+ import { IconButton } from "../IconButton";
6
+ import styles from "./Toast.module.scss";
5
7
 
6
8
  // ============================================
7
9
  // Types
8
10
  // ============================================
9
11
 
10
- export type ToastVariant = 'default' | 'success' | 'error' | 'warning' | 'info';
12
+ export type ToastTone = "neutral" | "success" | "danger" | "warning" | "info";
11
13
  export type ToastPosition =
12
14
  | 'top-left'
13
15
  | 'top-center'
@@ -20,7 +22,8 @@ export interface ToastData {
20
22
  id: string;
21
23
  title?: string;
22
24
  description?: string;
23
- variant?: ToastVariant;
25
+ /** Colour. `neutral` is the plain notification; the semantic tones paint the shared status ramp. */
26
+ tone?: ToastTone;
24
27
  duration?: number;
25
28
  action?: {
26
29
  label: string;
@@ -76,21 +79,22 @@ export function useToast() {
76
79
  return context.addToast(options);
77
80
  }, [context]);
78
81
 
79
- const makeVariantHelper = React.useCallback(
80
- (variant: ToastVariant) =>
81
- (titleOrOptions: string | Omit<ToastInput, 'variant'>, description?: string) => {
82
- if (typeof titleOrOptions === 'string') {
83
- return context.addToast({ title: titleOrOptions, description, variant });
82
+ const makeToneHelper = React.useCallback(
83
+ (tone: ToastTone) =>
84
+ (titleOrOptions: string | Omit<ToastInput, "tone">, description?: string) => {
85
+ if (typeof titleOrOptions === "string") {
86
+ return context.addToast({ title: titleOrOptions, description, tone });
84
87
  }
85
- return context.addToast({ ...titleOrOptions, variant });
88
+ return context.addToast({ ...titleOrOptions, tone });
86
89
  },
87
90
  [context]
88
91
  );
89
92
 
90
- const success = React.useMemo(() => makeVariantHelper('success'), [makeVariantHelper]);
91
- const error = React.useMemo(() => makeVariantHelper('error'), [makeVariantHelper]);
92
- const warning = React.useMemo(() => makeVariantHelper('warning'), [makeVariantHelper]);
93
- const info = React.useMemo(() => makeVariantHelper('info'), [makeVariantHelper]);
93
+ const success = React.useMemo(() => makeToneHelper("success"), [makeToneHelper]);
94
+ // Keeps its name; the field it sets is `tone: "danger"`.
95
+ const error = React.useMemo(() => makeToneHelper("danger"), [makeToneHelper]);
96
+ const warning = React.useMemo(() => makeToneHelper("warning"), [makeToneHelper]);
97
+ const info = React.useMemo(() => makeToneHelper("info"), [makeToneHelper]);
94
98
 
95
99
  return {
96
100
  toast,
@@ -155,14 +159,22 @@ function CloseIcon() {
155
159
  );
156
160
  }
157
161
 
158
- const variantIcons: Record<ToastVariant, React.ComponentType | null> = {
159
- default: null,
162
+ const toneIcons: Record<ToastTone, React.ComponentType | null> = {
163
+ neutral: null,
160
164
  success: SuccessIcon,
161
- error: ErrorIcon,
165
+ danger: ErrorIcon,
162
166
  warning: WarningIcon,
163
167
  info: InfoIcon,
164
168
  };
165
169
 
170
+ const TONE_CLASS: Record<ToastTone, string | undefined> = {
171
+ neutral: undefined,
172
+ success: styles.toneSuccess,
173
+ danger: styles.toneDanger,
174
+ warning: styles.toneWarning,
175
+ info: styles.toneInfo,
176
+ };
177
+
166
178
  // ============================================
167
179
  // Toast Component
168
180
  // ============================================
@@ -171,7 +183,7 @@ function ToastItem({
171
183
  id,
172
184
  title,
173
185
  description,
174
- variant = 'default',
186
+ tone = "neutral",
175
187
  action,
176
188
  onDismiss,
177
189
  onPause,
@@ -183,18 +195,14 @@ function ToastItem({
183
195
  onPause?: () => void;
184
196
  onResume?: () => void;
185
197
  }) {
186
- const Icon = variantIcons[variant];
198
+ const Icon = toneIcons[tone];
187
199
  const uniqueId = React.useId();
188
200
  const toastRef = React.useRef<HTMLDivElement>(null);
189
201
  const titleId = title ? `toast-title-${id || uniqueId}` : undefined;
190
202
  const descId = description ? `toast-desc-${id || uniqueId}` : undefined;
191
- const liveRole = variant === 'error' || variant === 'warning' ? 'alert' : 'status';
203
+ const liveRole = tone === "danger" || tone === "warning" ? "alert" : "status";
192
204
 
193
- const toastClasses = [
194
- styles.toast,
195
- styles[variant],
196
- className,
197
- ].filter(Boolean).join(' ');
205
+ const toastClasses = [styles.toast, TONE_CLASS[tone], className].filter(Boolean).join(" ");
198
206
 
199
207
  return (
200
208
  <div
@@ -232,23 +240,20 @@ function ToastItem({
232
240
  {description && <div id={descId} className={styles.description}>{description}</div>}
233
241
  </div>
234
242
  {action && (
235
- <button
236
- type="button"
237
- className={styles.action}
238
- onClick={action.onClick}
239
- >
243
+ <Button variant="link" size="sm" className={styles.action} onClick={action.onClick}>
240
244
  {action.label}
241
- </button>
245
+ </Button>
242
246
  )}
243
247
  {onDismiss && (
244
- <button
245
- type="button"
248
+ <IconButton
249
+ variant="ghost"
250
+ size="sm"
246
251
  className={styles.close}
247
252
  onClick={onDismiss}
248
253
  aria-label="Dismiss notification"
249
254
  >
250
255
  <CloseIcon />
251
- </button>
256
+ </IconButton>
252
257
  )}
253
258
  </div>
254
259
  );
@@ -13,9 +13,9 @@
13
13
  "onChange: function",
14
14
  "onValueChange: function",
15
15
  "children: node (required)",
16
- "variant: default|pills|outline|outlined (default: default)",
16
+ "variant: soft|ghost|outline (default: soft)",
17
17
  "size: sm|md|lg (default: md)",
18
- "gap: sm|none|xs (default: xs for pills; none otherwise)",
18
+ "gap: sm|none|xs (default: xs for ghost; none otherwise)",
19
19
  "selectionMode: single (default: single)"
20
20
  ],
21
21
  "props": {
@@ -46,10 +46,10 @@
46
46
  },
47
47
  "variant": {
48
48
  "type": "enum",
49
- "description": "Visual style",
50
- "default": "default",
49
+ "description": "Chrome: soft is the filled rail, ghost the open pill cluster, outline the connected bordered segments",
50
+ "default": "soft",
51
51
  "required": false,
52
- "values": ["default", "pills", "outline", "outlined"]
52
+ "values": ["soft", "ghost", "outline"]
53
53
  },
54
54
  "size": {
55
55
  "type": "enum",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "gap": {
62
62
  "type": "enum",
63
- "description": "Gap between items in the pills variant. Connected variants intentionally ignore gaps.",
63
+ "description": "Gap between items in the ghost variant. Connected variants intentionally ignore gaps.",
64
64
  "required": false,
65
65
  "values": ["sm", "none", "xs"]
66
66
  },
@@ -88,7 +88,7 @@
88
88
  "Two to five items",
89
89
  "Labels short enough to scan in one pass",
90
90
  "Icons work for well-known modes like grid and list",
91
- "default for an inset tonal rail, pills for an open filter cluster, outlined for connected segments",
91
+ "soft for an inset tonal rail, ghost for an open filter cluster, outline for connected segments",
92
92
  "Keep targets at least 24px on touch"
93
93
  ],
94
94
  "accessibility": [
@@ -105,14 +105,14 @@
105
105
  "code": "<ToggleGroup value={value} onChange={setValue}>\n <ToggleGroup.Item value=\"left\">Left</ToggleGroup.Item>\n <ToggleGroup.Item value=\"center\">Center</ToggleGroup.Item>\n <ToggleGroup.Item value=\"right\">Right</ToggleGroup.Item>\n</ToggleGroup>"
106
106
  },
107
107
  {
108
- "name": "Pills",
108
+ "name": "Ghost",
109
109
  "description": "Detached rounded buttons for open filter clusters.",
110
- "code": "<ToggleGroup value={value} onChange={setValue} variant=\"pills\">\n <ToggleGroup.Item value=\"all\">All</ToggleGroup.Item>\n <ToggleGroup.Item value=\"active\">Active</ToggleGroup.Item>\n <ToggleGroup.Item value=\"completed\">Completed</ToggleGroup.Item>\n</ToggleGroup>"
110
+ "code": "<ToggleGroup value={value} onChange={setValue} variant=\"ghost\">\n <ToggleGroup.Item value=\"all\">All</ToggleGroup.Item>\n <ToggleGroup.Item value=\"active\">Active</ToggleGroup.Item>\n <ToggleGroup.Item value=\"completed\">Completed</ToggleGroup.Item>\n</ToggleGroup>"
111
111
  },
112
112
  {
113
- "name": "Outlined",
113
+ "name": "Outline",
114
114
  "description": "Bordered segments sharing one continuous edge.",
115
- "code": "<ToggleGroup value={value} onChange={setValue} variant=\"outlined\">\n <ToggleGroup.Item value=\"day\">Day</ToggleGroup.Item>\n <ToggleGroup.Item value=\"week\">Week</ToggleGroup.Item>\n <ToggleGroup.Item value=\"month\">Month</ToggleGroup.Item>\n</ToggleGroup>"
115
+ "code": "<ToggleGroup value={value} onChange={setValue} variant=\"outline\">\n <ToggleGroup.Item value=\"day\">Day</ToggleGroup.Item>\n <ToggleGroup.Item value=\"week\">Week</ToggleGroup.Item>\n <ToggleGroup.Item value=\"month\">Month</ToggleGroup.Item>\n</ToggleGroup>"
116
116
  },
117
117
  {
118
118
  "name": "Uncontrolled",
@@ -158,9 +158,9 @@
158
158
  "defaultValue?: string - initial selected value (uncontrolled)",
159
159
  "onChange: (value: string) => void - change handler (or onValueChange)",
160
160
  "children: ToggleGroup.Item[] - toggle items",
161
- "variant: default|pills|outline|outlined - visual style (outlined aliases outline)",
161
+ "variant: soft|ghost|outline - chrome (soft rail, ghost cluster, outline segments)",
162
162
  "size: sm|md|lg - size variant",
163
- "gap: none|xs|sm - pills spacing (xs by default; connected variants remain gapless)",
163
+ "gap: none|xs|sm - ghost spacing (xs by default; connected variants remain gapless)",
164
164
  "selectionMode: single (default: single)"
165
165
  ],
166
166
  "a11yRules": ["A11Y_GROUP_ROLE", "A11Y_KEYBOARD_ACCESSIBLE"]
@@ -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/layout";
4
5
  @use "../../recipes/segmented";
5
6
 
@@ -49,8 +50,7 @@
49
50
  }
50
51
 
51
52
  &.disabled {
52
- opacity: 0.5;
53
- cursor: not-allowed;
53
+ @include disabled-state;
54
54
  }
55
55
  }
56
56
 
@@ -95,11 +95,11 @@
95
95
  }
96
96
 
97
97
  // ============================================
98
- // Default variant: inset tonal selection
98
+ // Soft variant: filled rail with an inset tonal selection
99
99
  // ============================================
100
100
 
101
- .default {
102
- gap: 0;
101
+ .soft {
102
+ gap: var(--fui-raw-space-0, #{measurements.raw-space(0)});
103
103
  padding: var(--fui-raw-space-2, 2px);
104
104
  background-color: var(--fui-form-group-bg, var(--fui-bg-secondary, #{$fui-bg-secondary}));
105
105
  border-radius: var(--fui-radius-lg, $fui-radius-lg);
@@ -108,12 +108,13 @@
108
108
 
109
109
  .item {
110
110
  min-block-size: calc(
111
- var(--_fui-segmented-track) - var(--fui-raw-space-2, 2px) - var(--fui-raw-space-2, 2px)
111
+ var(--_fui-segmented-track, #{segmented.track("md")}) - var(--fui-raw-space-2, 2px) -
112
+ var(--fui-raw-space-2, 2px)
112
113
  );
113
114
  background-color: transparent;
114
- // Connected segments: only outer corners are rounded. Per-item full radius
115
- // left a rail-colored notch between items that reads as a gap.
116
- border-radius: 0;
115
+ // Connected segments: only outer corners are rounded (the item base carries
116
+ // no radius). Per-item full radius left a rail-colored notch between items
117
+ // that reads as a gap.
117
118
 
118
119
  &:first-child {
119
120
  border-start-start-radius: var(--fui-radius-md, $fui-radius-md);
@@ -134,26 +135,16 @@
134
135
  }
135
136
 
136
137
  &.selected {
137
- background-color: var(
138
- --fui-toggle-group-selected-bg,
139
- var(
140
- --fui-control-selected-bg,
141
- color-mix(in srgb, var(--fui-text-primary, #{$fui-text-primary}) 9%, transparent)
142
- )
143
- );
144
- box-shadow:
145
- inset 0 0 0 var(--fui-stroke-hairline, 1px)
146
- var(--fui-toggle-group-selected-border, transparent),
147
- var(--fui-toggle-group-selected-shadow, none);
138
+ @include segmented-selection;
148
139
  }
149
140
  }
150
141
  }
151
142
 
152
143
  // ============================================
153
- // Pills variant: open cluster with soft selected pills
144
+ // Ghost variant: open cluster of pills, no rail
154
145
  // ============================================
155
146
 
156
- .pills {
147
+ .ghost {
157
148
  .item {
158
149
  background-color: transparent;
159
150
  border-radius: var(--fui-radius-full, $fui-radius-full);
@@ -164,17 +155,7 @@
164
155
  }
165
156
 
166
157
  &.selected {
167
- background-color: var(
168
- --fui-toggle-group-selected-bg,
169
- var(
170
- --fui-control-selected-bg,
171
- color-mix(in srgb, var(--fui-text-primary, #{$fui-text-primary}) 9%, transparent)
172
- )
173
- );
174
- box-shadow:
175
- inset 0 0 0 var(--fui-stroke-hairline, 1px)
176
- var(--fui-toggle-group-selected-border, transparent),
177
- var(--fui-toggle-group-selected-shadow, none);
158
+ @include segmented-selection;
178
159
  }
179
160
  }
180
161
  }
@@ -184,7 +165,7 @@
184
165
  // ============================================
185
166
 
186
167
  .outline {
187
- gap: 0;
168
+ gap: var(--fui-raw-space-0, #{measurements.raw-space(0)});
188
169
  background-color: transparent;
189
170
  border-radius: var(--fui-radius-lg, $fui-radius-lg);
190
171
  box-shadow: inset 0 0 0 var(--fui-stroke-hairline, 1px)
@@ -192,7 +173,6 @@
192
173
 
193
174
  .item {
194
175
  background-color: transparent;
195
- border-radius: 0;
196
176
 
197
177
  &:first-child {
198
178
  border-start-start-radius: var(--fui-radius-lg, $fui-radius-lg);
@@ -224,17 +204,7 @@
224
204
  }
225
205
 
226
206
  &.selected {
227
- background-color: var(
228
- --fui-toggle-group-selected-bg,
229
- var(
230
- --fui-control-selected-bg,
231
- color-mix(in srgb, var(--fui-text-primary, #{$fui-text-primary}) 9%, transparent)
232
- )
233
- );
234
- box-shadow:
235
- inset 0 0 0 var(--fui-stroke-hairline, 1px)
236
- var(--fui-toggle-group-selected-border, transparent),
237
- var(--fui-toggle-group-selected-shadow, none);
207
+ @include segmented-selection;
238
208
  }
239
209
  }
240
210
  }
@@ -23,15 +23,16 @@ export interface ToggleGroupProps extends Omit<React.HTMLAttributes<HTMLDivEleme
23
23
  onValueChange?: (value: string) => void;
24
24
  /** Toggle items */
25
25
  children: React.ReactNode;
26
- /** Visual variant.
27
- * @default "default"
26
+ /** Chrome. `soft` is the filled rail, `ghost` the open pill cluster,
27
+ * `outline` the connected bordered segments.
28
+ * @default "soft"
28
29
  * @see https://usefragments.com/components/togglegroup#variants */
29
- variant?: "default" | "pills" | "outline" | "outlined";
30
+ variant?: "soft" | "ghost" | "outline";
30
31
  /** Size.
31
32
  * @default "md" */
32
33
  size?: "sm" | "md" | "lg";
33
- /** Gap between items in the pills variant. Defaults to `xs` for pills and
34
- * is intentionally removed from connected variants. */
34
+ /** Gap between items in the ghost variant. Defaults to `xs` for ghost and
35
+ * is intentionally removed from the connected variants. */
35
36
  gap?: "none" | "xs" | "sm";
36
37
  /** Selection mode for this control. Currently only single-select is supported.
37
38
  * @default "single" */
@@ -57,7 +58,7 @@ export interface ToggleGroupItemProps extends Omit<
57
58
  interface ToggleGroupContextValue {
58
59
  value: string;
59
60
  onChange: (value: string) => void;
60
- variant: "default" | "pills" | "outline";
61
+ variant: "soft" | "ghost" | "outline";
61
62
  size: "sm" | "md" | "lg";
62
63
  hasFocusableSelection: boolean;
63
64
  firstEnabledValue: string | null;
@@ -83,7 +84,7 @@ function ToggleGroupRoot({
83
84
  onChange,
84
85
  onValueChange,
85
86
  children,
86
- variant = "default",
87
+ variant = "soft",
87
88
  size: sizeProp,
88
89
  gap,
89
90
  selectionMode = "single",
@@ -91,8 +92,7 @@ function ToggleGroupRoot({
91
92
  ...htmlProps
92
93
  }: ToggleGroupProps) {
93
94
  const size = useResolvedControlSize(sizeProp);
94
- const normalizedVariant = variant === "outlined" ? "outline" : variant;
95
- const resolvedGap = normalizedVariant === "pills" ? (gap ?? "xs") : "none";
95
+ const resolvedGap = variant === "ghost" ? (gap ?? "xs") : "none";
96
96
  const [internalValue, setInternalValue] = React.useState(defaultValue ?? "");
97
97
  const isControlled = value !== undefined;
98
98
  const currentValue = isControlled ? (value ?? "") : internalValue;
@@ -107,7 +107,7 @@ function ToggleGroupRoot({
107
107
  );
108
108
  const classes = [
109
109
  styles.group,
110
- styles[normalizedVariant],
110
+ styles[variant],
111
111
  styles[`size-${size}`],
112
112
  resolvedGap !== "none" && styles[`gap-${resolvedGap}`],
113
113
  className,
@@ -127,7 +127,7 @@ function ToggleGroupRoot({
127
127
  const contextValue: ToggleGroupContextValue = {
128
128
  value: currentValue,
129
129
  onChange: emitChange,
130
- variant: normalizedVariant,
130
+ variant,
131
131
  size,
132
132
  hasFocusableSelection,
133
133
  firstEnabledValue,