@usefragments/ui 1.6.0 → 1.7.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 (457) hide show
  1. package/README.md +4 -4
  2. package/dist/assets/fragments-wordmark.cjs +2 -2
  3. package/dist/assets/fragments-wordmark.d.ts.map +1 -1
  4. package/dist/assets/fragments-wordmark.js +2 -2
  5. package/dist/assets/ui.css +4720 -4159
  6. package/dist/chart.cjs +24 -6
  7. package/dist/chart.js +24 -6
  8. package/dist/codeblock.cjs +55 -29
  9. package/dist/codeblock.js +55 -29
  10. package/dist/colorpicker.cjs +3 -1
  11. package/dist/colorpicker.js +3 -1
  12. package/dist/components/Accordion/Accordion.module.scss.cjs +8 -8
  13. package/dist/components/Accordion/Accordion.module.scss.js +8 -8
  14. package/dist/components/Alert/Alert.module.scss.cjs +15 -12
  15. package/dist/components/Alert/Alert.module.scss.js +15 -12
  16. package/dist/components/Alert/index.cjs +7 -1
  17. package/dist/components/Alert/index.d.ts +12 -6
  18. package/dist/components/Alert/index.d.ts.map +1 -1
  19. package/dist/components/Alert/index.js +7 -1
  20. package/dist/components/AppShell/AppShell.module.scss.cjs +14 -14
  21. package/dist/components/AppShell/AppShell.module.scss.js +14 -14
  22. package/dist/components/Avatar/Avatar.module.scss.cjs +14 -14
  23. package/dist/components/Avatar/Avatar.module.scss.js +14 -14
  24. package/dist/components/Badge/Badge.module.scss.cjs +19 -19
  25. package/dist/components/Badge/Badge.module.scss.js +19 -19
  26. package/dist/components/BentoGrid/BentoGrid.module.scss.cjs +14 -14
  27. package/dist/components/BentoGrid/BentoGrid.module.scss.js +14 -14
  28. package/dist/components/Box/Box.module.scss.cjs +152 -152
  29. package/dist/components/Box/Box.module.scss.js +152 -152
  30. package/dist/components/Box/index.cjs +64 -75
  31. package/dist/components/Box/index.d.ts +16 -16
  32. package/dist/components/Box/index.d.ts.map +1 -1
  33. package/dist/components/Box/index.js +64 -75
  34. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs +8 -8
  35. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.js +8 -8
  36. package/dist/components/Button/Button.module.scss.cjs +14 -14
  37. package/dist/components/Button/Button.module.scss.js +14 -14
  38. package/dist/components/Card/Card.module.scss.cjs +29 -17
  39. package/dist/components/Card/Card.module.scss.js +30 -18
  40. package/dist/components/Card/index.cjs +8 -0
  41. package/dist/components/Card/index.d.ts +12 -2
  42. package/dist/components/Card/index.d.ts.map +1 -1
  43. package/dist/components/Card/index.js +8 -0
  44. package/dist/components/Chart/Chart.module.scss.cjs +15 -15
  45. package/dist/components/Chart/Chart.module.scss.js +15 -15
  46. package/dist/components/Chart/index.d.ts.map +1 -1
  47. package/dist/components/Checkbox/Checkbox.module.scss.cjs +9 -9
  48. package/dist/components/Checkbox/Checkbox.module.scss.js +9 -9
  49. package/dist/components/Checkbox/index.cjs +2 -2
  50. package/dist/components/Checkbox/index.d.ts.map +1 -1
  51. package/dist/components/Checkbox/index.js +2 -2
  52. package/dist/components/Chip/Chip.module.scss.cjs +15 -15
  53. package/dist/components/Chip/Chip.module.scss.js +15 -15
  54. package/dist/components/Chip/index.cjs +2 -1
  55. package/dist/components/Chip/index.d.ts.map +1 -1
  56. package/dist/components/Chip/index.js +2 -1
  57. package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +26 -23
  58. package/dist/components/CodeBlock/CodeBlock.module.scss.js +26 -23
  59. package/dist/components/CodeBlock/css-variables-theme.cjs +98 -0
  60. package/dist/components/CodeBlock/css-variables-theme.d.ts +27 -0
  61. package/dist/components/CodeBlock/css-variables-theme.d.ts.map +1 -0
  62. package/dist/components/CodeBlock/css-variables-theme.js +98 -0
  63. package/dist/components/CodeBlock/index.d.ts +17 -3
  64. package/dist/components/CodeBlock/index.d.ts.map +1 -1
  65. package/dist/components/Collapsible/Collapsible.module.scss.cjs +9 -9
  66. package/dist/components/Collapsible/Collapsible.module.scss.js +9 -9
  67. package/dist/components/ColorPicker/ColorPicker.module.scss.cjs +14 -14
  68. package/dist/components/ColorPicker/ColorPicker.module.scss.js +14 -14
  69. package/dist/components/ColorPicker/index.d.ts.map +1 -1
  70. package/dist/components/Combobox/Combobox.module.scss.cjs +21 -21
  71. package/dist/components/Combobox/Combobox.module.scss.js +21 -21
  72. package/dist/components/Combobox/index.cjs +17 -1
  73. package/dist/components/Combobox/index.d.ts.map +1 -1
  74. package/dist/components/Combobox/index.js +17 -1
  75. package/dist/components/Command/Command.module.scss.cjs +11 -11
  76. package/dist/components/Command/Command.module.scss.js +11 -11
  77. package/dist/components/Command/index.cjs +26 -15
  78. package/dist/components/Command/index.d.ts +2 -2
  79. package/dist/components/Command/index.d.ts.map +1 -1
  80. package/dist/components/Command/index.js +26 -15
  81. package/dist/components/ConversationList/ConversationList.module.scss.cjs +10 -10
  82. package/dist/components/ConversationList/ConversationList.module.scss.js +10 -10
  83. package/dist/components/DataTable/DataTable.icons.cjs +6 -33
  84. package/dist/components/DataTable/DataTable.icons.d.ts.map +1 -1
  85. package/dist/components/DataTable/DataTable.icons.js +6 -33
  86. package/dist/components/DataTable/DataTable.module.scss.cjs +27 -27
  87. package/dist/components/DataTable/DataTable.module.scss.js +27 -27
  88. package/dist/components/DataTable/index.d.ts.map +1 -1
  89. package/dist/components/DatePicker/DatePicker.module.scss.cjs +33 -33
  90. package/dist/components/DatePicker/DatePicker.module.scss.js +33 -33
  91. package/dist/components/DatePicker/index.d.ts.map +1 -1
  92. package/dist/components/Dialog/Dialog.module.scss.cjs +14 -14
  93. package/dist/components/Dialog/Dialog.module.scss.js +14 -14
  94. package/dist/components/Dialog/index.cjs +11 -14
  95. package/dist/components/Dialog/index.d.ts +7 -7
  96. package/dist/components/Dialog/index.d.ts.map +1 -1
  97. package/dist/components/Dialog/index.js +11 -14
  98. package/dist/components/Drawer/Drawer.module.scss.cjs +29 -29
  99. package/dist/components/Drawer/Drawer.module.scss.js +29 -29
  100. package/dist/components/Editor/Editor.module.scss.cjs +17 -17
  101. package/dist/components/Editor/Editor.module.scss.js +17 -17
  102. package/dist/components/Editor/index.d.ts +10 -10
  103. package/dist/components/Editor/index.d.ts.map +1 -1
  104. package/dist/components/EmptyState/EmptyState.module.scss.cjs +11 -8
  105. package/dist/components/EmptyState/EmptyState.module.scss.js +11 -8
  106. package/dist/components/EmptyState/index.cjs +8 -6
  107. package/dist/components/EmptyState/index.d.ts +9 -4
  108. package/dist/components/EmptyState/index.d.ts.map +1 -1
  109. package/dist/components/EmptyState/index.js +8 -6
  110. package/dist/components/Field/Field.module.scss.cjs +5 -5
  111. package/dist/components/Field/Field.module.scss.js +5 -5
  112. package/dist/components/Field/index.cjs +9 -1
  113. package/dist/components/Field/index.d.ts.map +1 -1
  114. package/dist/components/Field/index.js +9 -1
  115. package/dist/components/Fieldset/Fieldset.module.scss.cjs +3 -3
  116. package/dist/components/Fieldset/Fieldset.module.scss.js +3 -3
  117. package/dist/components/Grid/index.cjs +1 -1
  118. package/dist/components/Grid/index.js +1 -1
  119. package/dist/components/Header/Header.module.scss.cjs +33 -33
  120. package/dist/components/Header/Header.module.scss.js +33 -33
  121. package/dist/components/Header/index.cjs +17 -38
  122. package/dist/components/Header/index.d.ts +15 -11
  123. package/dist/components/Header/index.d.ts.map +1 -1
  124. package/dist/components/Header/index.js +17 -38
  125. package/dist/components/Icon/Icon.module.scss.cjs +15 -15
  126. package/dist/components/Icon/Icon.module.scss.js +15 -15
  127. package/dist/components/IconButton/IconButton.module.scss.cjs +8 -8
  128. package/dist/components/IconButton/IconButton.module.scss.js +8 -8
  129. package/dist/components/IconButton/index.cjs +2 -1
  130. package/dist/components/IconButton/index.d.ts.map +1 -1
  131. package/dist/components/IconButton/index.js +2 -1
  132. package/dist/components/Image/Image.module.scss.cjs +27 -27
  133. package/dist/components/Image/Image.module.scss.js +27 -27
  134. package/dist/components/Input/Input.module.scss.cjs +17 -17
  135. package/dist/components/Input/Input.module.scss.js +17 -17
  136. package/dist/components/Link/Link.module.scss.cjs +14 -10
  137. package/dist/components/Link/Link.module.scss.js +14 -10
  138. package/dist/components/Link/index.d.ts +1 -1
  139. package/dist/components/Link/index.d.ts.map +1 -1
  140. package/dist/components/List/List.module.scss.cjs +19 -19
  141. package/dist/components/List/List.module.scss.js +19 -19
  142. package/dist/components/Listbox/Listbox.module.scss.cjs +8 -8
  143. package/dist/components/Listbox/Listbox.module.scss.js +8 -8
  144. package/dist/components/Loading/Loading.module.scss.cjs +34 -34
  145. package/dist/components/Loading/Loading.module.scss.js +34 -34
  146. package/dist/components/Loading/index.cjs +1 -1
  147. package/dist/components/Loading/index.js +1 -1
  148. package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
  149. package/dist/components/Markdown/Markdown.module.scss.js +1 -1
  150. package/dist/components/Markdown/index.d.ts +2 -2
  151. package/dist/components/Markdown/index.d.ts.map +1 -1
  152. package/dist/components/Menu/Menu.module.scss.cjs +14 -14
  153. package/dist/components/Menu/Menu.module.scss.js +14 -14
  154. package/dist/components/Message/Message.module.scss.cjs +18 -18
  155. package/dist/components/Message/Message.module.scss.js +18 -18
  156. package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +34 -31
  157. package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +34 -31
  158. package/dist/components/NavigationMenu/index.cjs +32 -15
  159. package/dist/components/NavigationMenu/index.d.ts +12 -6
  160. package/dist/components/NavigationMenu/index.d.ts.map +1 -1
  161. package/dist/components/NavigationMenu/index.js +32 -15
  162. package/dist/components/Pagination/Pagination.module.scss.cjs +10 -10
  163. package/dist/components/Pagination/Pagination.module.scss.js +10 -10
  164. package/dist/components/Popover/Popover.module.scss.cjs +10 -10
  165. package/dist/components/Popover/Popover.module.scss.js +10 -10
  166. package/dist/components/Progress/Progress.module.scss.cjs +25 -25
  167. package/dist/components/Progress/Progress.module.scss.js +25 -25
  168. package/dist/components/Prompt/Prompt.module.scss.cjs +28 -28
  169. package/dist/components/Prompt/Prompt.module.scss.js +28 -28
  170. package/dist/components/RadioGroup/RadioGroup.module.scss.cjs +15 -15
  171. package/dist/components/RadioGroup/RadioGroup.module.scss.js +15 -15
  172. package/dist/components/ScrollArea/ScrollArea.module.scss.cjs +5 -5
  173. package/dist/components/ScrollArea/ScrollArea.module.scss.js +5 -5
  174. package/dist/components/ScrollArea/index.d.ts +4 -4
  175. package/dist/components/ScrollArea/index.d.ts.map +1 -1
  176. package/dist/components/ScrollArea/scroll-state.d.ts +5 -5
  177. package/dist/components/Select/Select.module.scss.cjs +21 -21
  178. package/dist/components/Select/Select.module.scss.js +21 -21
  179. package/dist/components/Separator/Separator.module.scss.cjs +11 -11
  180. package/dist/components/Separator/Separator.module.scss.js +11 -11
  181. package/dist/components/Sidebar/Sidebar.module.scss.cjs +43 -43
  182. package/dist/components/Sidebar/Sidebar.module.scss.js +43 -43
  183. package/dist/components/Sidebar/index.cjs +12 -35
  184. package/dist/components/Sidebar/index.d.ts +19 -19
  185. package/dist/components/Sidebar/index.d.ts.map +1 -1
  186. package/dist/components/Sidebar/index.js +12 -35
  187. package/dist/components/Skeleton/Skeleton.module.scss.cjs +50 -46
  188. package/dist/components/Skeleton/Skeleton.module.scss.js +50 -46
  189. package/dist/components/Slider/Slider.module.scss.cjs +12 -12
  190. package/dist/components/Slider/Slider.module.scss.js +12 -12
  191. package/dist/components/Stack/Stack.module.scss.cjs +25 -25
  192. package/dist/components/Stack/Stack.module.scss.js +25 -25
  193. package/dist/components/Stack/index.cjs +1 -1
  194. package/dist/components/Stack/index.js +1 -1
  195. package/dist/components/Switch/Switch.module.scss.cjs +9 -9
  196. package/dist/components/Switch/Switch.module.scss.js +9 -9
  197. package/dist/components/Table/Table.module.scss.cjs +19 -19
  198. package/dist/components/Table/Table.module.scss.js +19 -19
  199. package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +15 -15
  200. package/dist/components/TableOfContents/TableOfContents.module.scss.js +15 -15
  201. package/dist/components/TableOfContents/index.cjs +13 -9
  202. package/dist/components/TableOfContents/index.d.ts +5 -3
  203. package/dist/components/TableOfContents/index.d.ts.map +1 -1
  204. package/dist/components/TableOfContents/index.js +13 -9
  205. package/dist/components/Tabs/Tabs.module.scss.cjs +12 -12
  206. package/dist/components/Tabs/Tabs.module.scss.js +12 -12
  207. package/dist/components/Tabs/index.cjs +26 -6
  208. package/dist/components/Tabs/index.d.ts.map +1 -1
  209. package/dist/components/Tabs/index.js +26 -6
  210. package/dist/components/Text/Text.module.scss.cjs +87 -75
  211. package/dist/components/Text/Text.module.scss.js +87 -75
  212. package/dist/components/Text/index.cjs +49 -41
  213. package/dist/components/Text/index.d.ts +12 -11
  214. package/dist/components/Text/index.d.ts.map +1 -1
  215. package/dist/components/Text/index.js +49 -41
  216. package/dist/components/Textarea/Textarea.module.scss.cjs +24 -24
  217. package/dist/components/Textarea/Textarea.module.scss.js +24 -24
  218. package/dist/components/Theme/index.cjs +2 -1
  219. package/dist/components/Theme/index.d.ts.map +1 -1
  220. package/dist/components/Theme/index.js +2 -1
  221. package/dist/components/ThemeToggle/ThemeToggle.module.scss.cjs +9 -6
  222. package/dist/components/ThemeToggle/ThemeToggle.module.scss.js +9 -6
  223. package/dist/components/ThemeToggle/index.cjs +31 -6
  224. package/dist/components/ThemeToggle/index.d.ts +7 -2
  225. package/dist/components/ThemeToggle/index.d.ts.map +1 -1
  226. package/dist/components/ThemeToggle/index.js +32 -7
  227. package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.cjs +13 -13
  228. package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.js +13 -13
  229. package/dist/components/Toast/Toast.module.scss.cjs +20 -20
  230. package/dist/components/Toast/Toast.module.scss.js +20 -20
  231. package/dist/components/ToggleGroup/ToggleGroup.module.scss.cjs +17 -17
  232. package/dist/components/ToggleGroup/ToggleGroup.module.scss.js +17 -17
  233. package/dist/components/Tooltip/Tooltip.module.scss.cjs +3 -3
  234. package/dist/components/Tooltip/Tooltip.module.scss.js +3 -3
  235. package/dist/components/Tooltip/index.cjs +24 -40
  236. package/dist/components/Tooltip/index.d.ts +4 -4
  237. package/dist/components/Tooltip/index.d.ts.map +1 -1
  238. package/dist/components/Tooltip/index.js +24 -40
  239. package/dist/components/VisuallyHidden/index.d.ts +2 -2
  240. package/dist/data-table.cjs +2 -1
  241. package/dist/data-table.js +2 -1
  242. package/dist/datepicker.cjs +3 -2
  243. package/dist/datepicker.js +3 -2
  244. package/dist/editor.cjs +68 -28
  245. package/dist/editor.js +68 -28
  246. package/dist/index.cjs +1 -1
  247. package/dist/index.d.ts +1 -1
  248. package/dist/index.d.ts.map +1 -1
  249. package/dist/index.js +2 -2
  250. package/dist/markdown.cjs +21 -29
  251. package/dist/markdown.js +21 -29
  252. package/dist/measurements/generated.cjs +9 -1
  253. package/dist/measurements/generated.d.ts +7 -0
  254. package/dist/measurements/generated.d.ts.map +1 -1
  255. package/dist/measurements/generated.js +9 -1
  256. package/dist/utils/a11y.cjs +5 -2
  257. package/dist/utils/a11y.d.ts +5 -5
  258. package/dist/utils/a11y.d.ts.map +1 -1
  259. package/dist/utils/a11y.js +5 -2
  260. package/dist/utils/canonical-stamp.cjs +2 -8
  261. package/dist/utils/canonical-stamp.d.ts.map +1 -1
  262. package/dist/utils/canonical-stamp.js +1 -7
  263. package/dist/utils/css-warning.cjs +1 -1
  264. package/dist/utils/css-warning.js +1 -1
  265. package/dist/utils/env.cjs +17 -0
  266. package/dist/utils/env.d.ts +3 -0
  267. package/dist/utils/env.d.ts.map +1 -0
  268. package/dist/utils/env.js +17 -0
  269. package/dist/utils/keyboard-shortcuts.cjs +3 -10
  270. package/dist/utils/keyboard-shortcuts.d.ts +4 -4
  271. package/dist/utils/keyboard-shortcuts.d.ts.map +1 -1
  272. package/dist/utils/keyboard-shortcuts.js +3 -10
  273. package/dist/utils/seed-derivation.cjs +10 -6
  274. package/dist/utils/seed-derivation.d.ts.map +1 -1
  275. package/dist/utils/seed-derivation.js +10 -6
  276. package/fragments.json +1 -1
  277. package/package.json +6 -4
  278. package/src/assets/fragments-logo.tsx +2 -2
  279. package/src/assets/fragments-wordmark.tsx +4 -2
  280. package/src/components/Accordion/Accordion.contract.json +24 -48
  281. package/src/components/Alert/Alert.contract.json +37 -53
  282. package/src/components/Alert/Alert.module.scss +24 -0
  283. package/src/components/Alert/index.tsx +55 -29
  284. package/src/components/AppShell/AppShell.contract.json +34 -51
  285. package/src/components/AppShell/AppShell.module.scss +53 -40
  286. package/src/components/Avatar/Avatar.contract.json +31 -48
  287. package/src/components/Avatar/Avatar.module.scss +4 -1
  288. package/src/components/Badge/Badge.contract.json +37 -42
  289. package/src/components/Badge/Badge.module.scss +9 -2
  290. package/src/components/BentoGrid/BentoGrid.contract.json +21 -45
  291. package/src/components/Box/Box.contract.json +40 -148
  292. package/src/components/Box/index.tsx +92 -99
  293. package/src/components/Breadcrumbs/Breadcrumbs.contract.json +21 -34
  294. package/src/components/Breadcrumbs/Breadcrumbs.module.scss +12 -7
  295. package/src/components/Button/Button.module.scss +8 -7
  296. package/src/components/ButtonGroup/ButtonGroup.contract.json +32 -47
  297. package/src/components/Card/Card.module.scss +82 -1
  298. package/src/components/Card/index.tsx +21 -2
  299. package/src/components/Chart/Chart.contract.json +21 -29
  300. package/src/components/Chart/index.tsx +36 -6
  301. package/src/components/Checkbox/Checkbox.contract.json +24 -24
  302. package/src/components/Checkbox/Checkbox.module.scss +32 -23
  303. package/src/components/Checkbox/index.tsx +4 -2
  304. package/src/components/Chip/Chip.contract.json +33 -40
  305. package/src/components/Chip/Chip.module.scss +2 -2
  306. package/src/components/Chip/index.tsx +2 -1
  307. package/src/components/CodeBlock/CodeBlock.contract.json +46 -76
  308. package/src/components/CodeBlock/CodeBlock.module.scss +40 -15
  309. package/src/components/CodeBlock/css-variables-theme.ts +102 -0
  310. package/src/components/CodeBlock/index.tsx +91 -35
  311. package/src/components/Collapsible/Collapsible.contract.json +21 -36
  312. package/src/components/ColorPicker/ColorPicker.contract.json +29 -48
  313. package/src/components/ColorPicker/ColorPicker.module.scss +15 -12
  314. package/src/components/ColorPicker/index.tsx +5 -1
  315. package/src/components/Combobox/Combobox.contract.json +36 -37
  316. package/src/components/Combobox/Combobox.module.scss +1 -1
  317. package/src/components/Combobox/index.tsx +31 -5
  318. package/src/components/Command/Command.contract.json +21 -43
  319. package/src/components/Command/index.tsx +58 -47
  320. package/src/components/ConversationList/ConversationList.contract.json +27 -32
  321. package/src/components/DataTable/DataTable.icons.tsx +4 -21
  322. package/src/components/DataTable/DataTable.module.scss +12 -8
  323. package/src/components/DataTable/index.tsx +8 -7
  324. package/src/components/DatePicker/DatePicker.contract.json +27 -28
  325. package/src/components/DatePicker/DatePicker.module.scss +12 -5
  326. package/src/components/DatePicker/index.tsx +5 -2
  327. package/src/components/Dialog/Dialog.module.scss +3 -3
  328. package/src/components/Dialog/index.tsx +47 -37
  329. package/src/components/Drawer/Drawer.contract.json +22 -36
  330. package/src/components/Editor/Editor.contract.json +31 -48
  331. package/src/components/Editor/Editor.module.scss +36 -14
  332. package/src/components/Editor/index.tsx +240 -179
  333. package/src/components/EmptyState/EmptyState.contract.json +31 -43
  334. package/src/components/EmptyState/EmptyState.module.scss +8 -0
  335. package/src/components/EmptyState/index.tsx +48 -23
  336. package/src/components/Field/Field.contract.json +28 -46
  337. package/src/components/Field/index.tsx +5 -1
  338. package/src/components/Fieldset/Fieldset.contract.json +21 -38
  339. package/src/components/Fieldset/Fieldset.module.scss +10 -3
  340. package/src/components/Form/Form.contract.json +20 -20
  341. package/src/components/Grid/Grid.contract.json +28 -64
  342. package/src/components/Grid/index.tsx +10 -10
  343. package/src/components/Header/Header.contract.json +31 -67
  344. package/src/components/Header/Header.module.scss +36 -21
  345. package/src/components/Header/index.tsx +134 -122
  346. package/src/components/Icon/Icon.contract.json +22 -62
  347. package/src/components/IconButton/IconButton.contract.json +34 -18
  348. package/src/components/IconButton/IconButton.module.scss +6 -7
  349. package/src/components/IconButton/index.tsx +2 -1
  350. package/src/components/Image/Image.contract.json +23 -56
  351. package/src/components/Input/Input.contract.json +26 -32
  352. package/src/components/Input/Input.module.scss +3 -2
  353. package/src/components/Link/Link.contract.json +32 -52
  354. package/src/components/Link/Link.module.scss +23 -6
  355. package/src/components/Link/index.tsx +1 -1
  356. package/src/components/List/List.contract.json +23 -52
  357. package/src/components/List/List.module.scss +1 -1
  358. package/src/components/Listbox/Listbox.contract.json +21 -37
  359. package/src/components/Loading/Loading.contract.json +37 -61
  360. package/src/components/Loading/Loading.module.scss +10 -7
  361. package/src/components/Loading/index.tsx +2 -2
  362. package/src/components/Main/Main.contract.json +17 -9
  363. package/src/components/Markdown/Markdown.contract.json +22 -43
  364. package/src/components/Markdown/Markdown.module.scss +43 -5
  365. package/src/components/Markdown/index.tsx +48 -49
  366. package/src/components/Menu/Menu.contract.json +25 -41
  367. package/src/components/Menu/Menu.module.scss +23 -8
  368. package/src/components/Message/Message.contract.json +29 -52
  369. package/src/components/Message/Message.module.scss +12 -5
  370. package/src/components/NavigationMenu/NavigationMenu.contract.json +36 -45
  371. package/src/components/NavigationMenu/NavigationMenu.module.scss +64 -19
  372. package/src/components/NavigationMenu/index.tsx +105 -81
  373. package/src/components/Pagination/Pagination.contract.json +22 -40
  374. package/src/components/Pagination/Pagination.module.scss +2 -2
  375. package/src/components/Popover/Popover.contract.json +24 -46
  376. package/src/components/Popover/Popover.module.scss +6 -5
  377. package/src/components/Progress/Progress.contract.json +32 -28
  378. package/src/components/Progress/Progress.module.scss +3 -2
  379. package/src/components/Prompt/Prompt.contract.json +31 -47
  380. package/src/components/Prompt/Prompt.module.scss +13 -5
  381. package/src/components/RadioGroup/RadioGroup.contract.json +23 -24
  382. package/src/components/RadioGroup/RadioGroup.module.scss +13 -14
  383. package/src/components/ScrollArea/ScrollArea.contract.json +18 -19
  384. package/src/components/ScrollArea/ScrollArea.module.scss +15 -15
  385. package/src/components/ScrollArea/index.tsx +16 -16
  386. package/src/components/ScrollArea/scroll-state.ts +24 -24
  387. package/src/components/Select/Select.module.scss +2 -2
  388. package/src/components/Separator/Separator.contract.json +24 -48
  389. package/src/components/Sidebar/Sidebar.contract.json +35 -67
  390. package/src/components/Sidebar/Sidebar.module.scss +22 -13
  391. package/src/components/Sidebar/index.tsx +164 -164
  392. package/src/components/Skeleton/Skeleton.contract.json +28 -54
  393. package/src/components/Skeleton/Skeleton.module.scss +27 -10
  394. package/src/components/Slider/Slider.contract.json +27 -39
  395. package/src/components/Slider/Slider.module.scss +3 -3
  396. package/src/components/Stack/Stack.contract.json +29 -56
  397. package/src/components/Stack/Stack.module.scss +13 -12
  398. package/src/components/Stack/index.tsx +3 -3
  399. package/src/components/Switch/Switch.contract.json +33 -46
  400. package/src/components/Switch/Switch.module.scss +64 -26
  401. package/src/components/Table/Table.contract.json +28 -46
  402. package/src/components/Table/Table.module.scss +15 -3
  403. package/src/components/TableOfContents/TableOfContents.contract.json +34 -21
  404. package/src/components/TableOfContents/TableOfContents.module.scss +15 -5
  405. package/src/components/TableOfContents/index.tsx +26 -9
  406. package/src/components/Tabs/Tabs.contract.json +24 -45
  407. package/src/components/Tabs/Tabs.module.scss +1 -1
  408. package/src/components/Tabs/index.tsx +15 -3
  409. package/src/components/Text/Text.contract.json +30 -72
  410. package/src/components/Text/Text.module.scss +21 -4
  411. package/src/components/Text/index.tsx +113 -75
  412. package/src/components/Textarea/Textarea.contract.json +25 -43
  413. package/src/components/Textarea/Textarea.module.scss +2 -4
  414. package/src/components/Theme/Theme.contract.json +32 -51
  415. package/src/components/Theme/index.tsx +2 -1
  416. package/src/components/ThemeToggle/ThemeToggle.module.scss +23 -7
  417. package/src/components/ThemeToggle/index.tsx +43 -7
  418. package/src/components/ThinkingIndicator/ThinkingIndicator.contract.json +23 -40
  419. package/src/components/Toast/Toast.contract.json +30 -40
  420. package/src/components/Toast/Toast.module.scss +1 -1
  421. package/src/components/ToggleGroup/ToggleGroup.contract.json +29 -30
  422. package/src/components/ToggleGroup/ToggleGroup.module.scss +38 -5
  423. package/src/components/Tooltip/Tooltip.contract.json +31 -52
  424. package/src/components/Tooltip/index.tsx +19 -24
  425. package/src/components/VisuallyHidden/VisuallyHidden.contract.json +22 -44
  426. package/src/components/VisuallyHidden/index.tsx +5 -5
  427. package/src/index.ts +2 -2
  428. package/src/measurements/generated.ts +9 -2
  429. package/src/measurements/measurements.json +7 -0
  430. package/src/recipes/_boolean-range.scss +3 -11
  431. package/src/recipes/_field.scss +5 -1
  432. package/src/recipes/_layout.scss +14 -7
  433. package/src/recipes/_popup.scss +12 -2
  434. package/src/recipes/_prose.scss +13 -5
  435. package/src/recipes/_table-chrome.scss +16 -2
  436. package/src/scss.d.ts +1 -1
  437. package/src/styles/globals.scss +20 -19
  438. package/src/tokens/_computed.scss +5 -16
  439. package/src/tokens/_derive.scss +112 -210
  440. package/src/tokens/_measurements.catalog.generated.css +6 -1
  441. package/src/tokens/_measurements.generated.scss +14 -1
  442. package/src/tokens/_mixins.scss +7 -8
  443. package/src/tokens/_palettes.scss +39 -167
  444. package/src/tokens/_seeds.scss +20 -20
  445. package/src/tokens/_variables.scss +183 -38
  446. package/src/utils/a11y.tsx +69 -69
  447. package/src/utils/aria.ts +3 -3
  448. package/src/utils/canonical-stamp.ts +2 -12
  449. package/src/utils/css-warning.ts +7 -7
  450. package/src/utils/env.ts +25 -0
  451. package/src/utils/keyboard-shortcuts.ts +131 -126
  452. package/src/utils/seed-derivation.ts +10 -6
  453. package/src/components/Button/Button.contract.json +0 -218
  454. package/src/components/Card/Card.contract.json +0 -175
  455. package/src/components/DataTable/DataTable.contract.json +0 -302
  456. package/src/components/Dialog/Dialog.contract.json +0 -159
  457. package/src/components/Select/Select.contract.json +0 -259
@@ -1,14 +1,9 @@
1
1
  {
2
2
  "$schema": "https://usefragments.com/schemas/contract.v1.json",
3
3
  "name": "Icon",
4
- "description": "Wrapper for icon components with consistent sizing and semantic colors. Provides standardized icon rendering across the design system.",
4
+ "description": "Sizes and colors any icon so it lines up with the text beside it.",
5
5
  "category": "display",
6
- "tags": [
7
- "icon",
8
- "visual",
9
- "symbol",
10
- "graphic"
11
- ],
6
+ "tags": ["icon", "visual", "symbol", "graphic"],
12
7
  "status": "stable",
13
8
  "sourcePath": "src/components/Icon/index.tsx",
14
9
  "exportName": "Icon",
@@ -37,27 +32,14 @@
37
32
  "description": "Icon size",
38
33
  "default": "md",
39
34
  "required": false,
40
- "values": [
41
- "xs",
42
- "sm",
43
- "md",
44
- "lg",
45
- "xl"
46
- ]
35
+ "values": ["xs", "sm", "md", "lg", "xl"]
47
36
  },
48
37
  "weight": {
49
38
  "type": "string",
50
39
  "description": "Optional icon style/weight hint (forwarded when supported by the icon component)",
51
40
  "default": "regular",
52
41
  "required": false,
53
- "values": [
54
- "thin",
55
- "light",
56
- "regular",
57
- "bold",
58
- "fill",
59
- "duotone"
60
- ]
42
+ "values": ["thin", "light", "regular", "bold", "fill", "duotone"]
61
43
  },
62
44
  "variant": {
63
45
  "type": "enum",
@@ -79,15 +61,7 @@
79
61
  "type": "enum",
80
62
  "description": "Deprecated alias for variant",
81
63
  "required": false,
82
- "values": [
83
- "primary",
84
- "secondary",
85
- "tertiary",
86
- "accent",
87
- "success",
88
- "warning",
89
- "error"
90
- ]
64
+ "values": ["primary", "secondary", "tertiary", "accent", "success", "warning", "error"]
91
65
  },
92
66
  "iconProps": {
93
67
  "type": "object",
@@ -97,55 +71,46 @@
97
71
  },
98
72
  "usage": {
99
73
  "when": [
100
- "Displaying UI icons alongside text or in buttons",
101
- "Indicating status or state visually",
102
- "Adding visual hierarchy to feature lists",
103
- "Decorating cards or stats with relevant symbols"
104
- ],
105
- "whenNot": [
106
- "Large decorative illustrations (use Image or custom SVG)",
107
- "Logo display (use dedicated Logo component)",
108
- "Complex graphics with multiple colors",
109
- "Animated icons (use custom implementation)"
74
+ "A symbol sits beside text, inside a button, or leads a list item",
75
+ "State needs a glanceable marker"
110
76
  ],
77
+ "whenNot": ["Artwork or illustration (use Image)", "Multi-color or animated graphics"],
111
78
  "guidelines": [
112
- "Use semantic color variants (success, error, warning) for status indication",
113
- "Pair icons with text labels for accessibility",
114
- "Match icon weight/style to surrounding text weight for visual consistency when supported by the icon package",
115
- "Use consistent sizes within the same context",
116
- "Use iconProps for package-specific icon options not exposed directly on the wrapper"
79
+ "Reserve success, warning, and error colors for real state",
80
+ "Hold one size per context",
81
+ "Match weight to the text weight beside it",
82
+ "iconProps reaches options the wrapper does not expose"
117
83
  ],
118
84
  "accessibility": [
119
- "Icons are decorative by default (aria-hidden)",
120
- "Always pair with visible or visually-hidden text for meaning",
121
- "Do not rely on color alone to convey information",
122
- "Consider using VisuallyHidden for icon-only buttons"
85
+ "Icons ship aria-hidden — they are decoration until you label them",
86
+ "An icon-only button needs VisuallyHidden text",
87
+ "Color alone never carries the message"
123
88
  ]
124
89
  },
125
90
  "examples": [
126
91
  {
127
92
  "name": "Default",
128
- "description": "Basic icon with default styling",
93
+ "description": "Inherits the size and color of its surroundings.",
129
94
  "code": "<Icon icon={Heart} />"
130
95
  },
131
96
  {
132
97
  "name": "Sizes",
133
- "description": "Available size options",
98
+ "description": "Steps tuned to the type scale, so icons never float off the baseline.",
134
99
  "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>"
135
100
  },
136
101
  {
137
102
  "name": "Semantic Colors",
138
- "description": "Status and semantic color variants",
103
+ "description": "Color states carry meaning — never use them for decoration.",
139
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>"
140
105
  },
141
106
  {
142
107
  "name": "Weights",
143
- "description": "Icon weight/style options",
108
+ "description": "Match the stroke to the text weight next to it.",
144
109
  "code": "<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>\n <Icon icon={Heart} weight=\"thin\" />\n <Icon icon={Heart} weight=\"light\" />\n <Icon icon={Heart} weight=\"regular\" />\n <Icon icon={Heart} weight=\"bold\" />\n <Icon icon={Heart} weight=\"fill\" />\n <Icon icon={Heart} weight=\"duotone\" />\n</div>"
145
110
  },
146
111
  {
147
112
  "name": "Advanced Icon Props",
148
- "description": "Forward extra icon-package-specific props through iconProps",
113
+ "description": "iconProps passes anything the underlying icon package supports.",
149
114
  "code": "<Icon icon={Heart} iconProps={{ mirrored: true }} />"
150
115
  }
151
116
  ],
@@ -174,16 +139,11 @@
174
139
  "variant: default|primary|secondary|tertiary|accent|success|warning|error - color",
175
140
  "iconProps: typed from the passed icon component - advanced icon-specific props"
176
141
  ],
177
- "a11yRules": [
178
- "A11Y_ICON_LABEL",
179
- "A11Y_COLOR_CONTRAST"
180
- ]
142
+ "a11yRules": ["A11Y_ICON_LABEL", "A11Y_COLOR_CONTRAST"]
181
143
  },
182
144
  "ai": {
183
145
  "compositionPattern": "compound",
184
- "subComponents": [
185
- "Root"
186
- ]
146
+ "subComponents": ["Root"]
187
147
  },
188
148
  "provenance": {
189
149
  "source": "migrated",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "https://usefragments.com/schemas/contract.v1.json",
3
3
  "name": "IconButton",
4
- "description": "Compact square button for icon-only actions in dense toolbars, top bars, and row controls.",
5
- "category": "forms",
4
+ "description": "Runs an action from an icon alone, for toolbars and table rows.",
5
+ "category": "actions",
6
6
  "tags": ["action", "button", "icon", "toolbar", "interactive"],
7
7
  "status": "stable",
8
8
  "sourcePath": "src/components/IconButton/index.tsx",
@@ -53,36 +53,52 @@
53
53
  },
54
54
  "usage": {
55
55
  "when": [
56
- "Compact icon-only actions in toolbars or top bars",
57
- "Row actions where a text button would be too wide",
58
- "Toggle-style icon actions with a visible pressed state"
56
+ "Toolbars and top bars where text buttons crowd",
57
+ "Row actions too narrow for a label",
58
+ "Toggle actions that show a pressed state"
59
59
  ],
60
60
  "whenNot": [
61
- "The action needs a visible text label (use Button)",
62
- "The control changes a persistent boolean setting (use Switch)",
63
- "The icon is decorative and not interactive (use Icon)"
61
+ "The action needs a visible label use Button",
62
+ "It flips a persistent setting use Switch",
63
+ "The icon is decorative use Icon"
64
64
  ],
65
65
  "guidelines": [
66
- "Always provide aria-label or aria-labelledby",
67
- "Use ghost for ordinary toolbar actions and outlined when more separation is needed",
68
- "Use pressed only when the button represents a persistent toggle state"
66
+ "aria-label or aria-labelledby is required, every time",
67
+ "ghost for ordinary toolbar actions; outlined when it needs separation",
68
+ "pressed only for real toggle state, not selection",
69
+ "Keep icon meaning obvious, or pair it with a Tooltip"
69
70
  ],
70
71
  "accessibility": [
71
- "Every icon-only button must have an accessible name",
72
- "The accessible name should describe the action, not the icon",
73
- "Pressed state must be exposed with aria-pressed"
72
+ "Name the action, not the icon: \"Delete row\", not \"Trash\"",
73
+ "Pressed state is exposed via aria-pressed",
74
+ "Hit target stays at least 24px even at size=\"sm\""
74
75
  ]
75
76
  },
76
77
  "examples": [
77
78
  {
78
79
  "name": "Toolbar action",
79
- "description": "A named icon-only toolbar action",
80
- "code": "<IconButton aria-label=\"Add item\">\n <PlusIcon aria-hidden />\n</IconButton>"
80
+ "description": "Icon carries the action; the label lives in aria-label.",
81
+ "code": "import { Plus as PlusIcon } from '@phosphor-icons/react';\n\n<IconButton aria-label=\"Add item\">\n <PlusIcon aria-hidden />\n</IconButton>"
82
+ },
83
+ {
84
+ "name": "Variants",
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>"
87
+ },
88
+ {
89
+ "name": "Sizes",
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>"
81
92
  },
82
93
  {
83
94
  "name": "Pressed state",
84
- "description": "A toggle-style action with its state exposed",
85
- "code": "import { PushPin as PinIcon } from '@phosphor-icons/react';\n\n<IconButton aria-label=\"Pin item\" pressed>\n <PinIcon aria-hidden />\n</IconButton>"
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>"
97
+ },
98
+ {
99
+ "name": "Disabled",
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>"
86
102
  }
87
103
  ],
88
104
  "relations": [
@@ -1,7 +1,7 @@
1
- @use '../../tokens/variables' as *;
2
- @use '../../tokens/mixins' as *;
3
- @use '../../recipes/action';
4
- @use '../../recipes/target';
1
+ @use "../../tokens/variables" as *;
2
+ @use "../../tokens/mixins" as *;
3
+ @use "../../recipes/action";
4
+ @use "../../recipes/target";
5
5
 
6
6
  .iconButton {
7
7
  @include button-reset;
@@ -84,9 +84,8 @@
84
84
  }
85
85
  }
86
86
 
87
- // Pressed (for toggle-style affordances) sits on the active surface even
88
- // while idle so the "on" state reads clearly.
87
+ // Pressed is a persistent toggle selection, not the pointer-down state.
89
88
  .pressed {
90
- background-color: var(--fui-bg-active, $fui-bg-active);
89
+ background-color: var(--fui-control-selected-bg, $fui-bg-active);
91
90
  color: var(--fui-text-primary, $fui-text-primary);
92
91
  }
@@ -4,6 +4,7 @@ import * as React from "react";
4
4
  import { Button as BaseButton } from "@base-ui/react/button";
5
5
  import { useResolvedControlSize } from "../ComponentDefaults";
6
6
  import styles from "./IconButton.module.scss";
7
+ import { isProductionBuild } from "../../utils/env";
7
8
 
8
9
  /**
9
10
  * Compact square button for icon-only affordances — topbar actions, row
@@ -56,7 +57,7 @@ const IconButtonRoot = React.forwardRef<HTMLButtonElement, IconButtonProps>(func
56
57
  },
57
58
  ref
58
59
  ) {
59
- if (process.env.NODE_ENV !== "production" && !ariaLabel && !ariaLabelledBy) {
60
+ if (!isProductionBuild() && !ariaLabel && !ariaLabelledBy) {
60
61
  console.warn(
61
62
  "[IconButton] Icon-only buttons need an accessible name. Provide `aria-label` or `aria-labelledby`."
62
63
  );
@@ -1,15 +1,9 @@
1
1
  {
2
2
  "$schema": "https://usefragments.com/schemas/contract.v1.json",
3
3
  "name": "Image",
4
- "description": "Responsive image component with aspect ratio control, loading states, and error fallbacks. Handles image display with consistent styling.",
4
+ "description": "Renders a picture at a fixed shape with a built-in fallback when loading fails.",
5
5
  "category": "display",
6
- "tags": [
7
- "image",
8
- "media",
9
- "photo",
10
- "picture",
11
- "visual"
12
- ],
6
+ "tags": ["image", "media", "photo", "picture", "visual"],
13
7
  "status": "stable",
14
8
  "sourcePath": "src/components/Image/index.tsx",
15
9
  "exportName": "Image",
@@ -44,25 +38,14 @@
44
38
  "description": "Aspect ratio of the image container",
45
39
  "default": "auto",
46
40
  "required": false,
47
- "values": [
48
- "1:1",
49
- "4:3",
50
- "16:9",
51
- "21:9",
52
- "auto"
53
- ]
41
+ "values": ["1:1", "4:3", "16:9", "21:9", "auto"]
54
42
  },
55
43
  "objectFit": {
56
44
  "type": "enum",
57
45
  "description": "How the image fits within its container",
58
46
  "default": "cover",
59
47
  "required": false,
60
- "values": [
61
- "cover",
62
- "contain",
63
- "fill",
64
- "none"
65
- ]
48
+ "values": ["cover", "contain", "fill", "none"]
66
49
  },
67
50
  "width": {
68
51
  "type": "union",
@@ -79,13 +62,7 @@
79
62
  "description": "Border radius",
80
63
  "default": "none",
81
64
  "required": false,
82
- "values": [
83
- "none",
84
- "sm",
85
- "md",
86
- "lg",
87
- "full"
88
- ]
65
+ "values": ["none", "sm", "md", "lg", "full"]
89
66
  },
90
67
  "fallback": {
91
68
  "type": "node",
@@ -120,50 +97,45 @@
120
97
  },
121
98
  "usage": {
122
99
  "when": [
123
- "Displaying product images in cards or grids",
124
- "Hero images with specific aspect ratios",
125
- "User-uploaded content that may fail to load",
126
- "Thumbnails in lists or galleries"
100
+ "Product shots, thumbnails, and hero art",
101
+ "Uploads you do not control and cannot trust to load"
127
102
  ],
128
103
  "whenNot": [
129
- "User avatars (use Avatar component)",
130
- "Icons or symbols (use Icon component)",
131
- "Background images (use CSS background-image)",
132
- "SVG illustrations (use inline SVG or Image component)"
104
+ "A person (use Avatar)",
105
+ "A symbol (use Icon)",
106
+ "Pure decoration behind content (use a CSS background)"
133
107
  ],
134
108
  "guidelines": [
135
- "Always provide meaningful alt text for accessibility",
136
- "Use appropriate aspect ratios for consistent layouts",
137
- "Provide fallback content for failed loads",
138
- "Use objectFit=\"contain\" for logos to preserve aspect ratio",
139
- "Use imgProps / onImageLoad / onImageError when you need lower-level img control"
109
+ "Set aspectRatio so a grid holds its shape before the file arrives",
110
+ "objectFit=\"contain\" for logos, \"cover\" for photography",
111
+ "Always give fallback something to say",
112
+ "imgProps, onImageLoad, and onImageError expose the raw img when you need it"
140
113
  ],
141
114
  "accessibility": [
142
- "Alt text is required and must describe the image content",
143
- "Decorative images should have empty alt=\"\"",
144
- "Avoid text in images; if necessary, describe the text in alt",
145
- "Ensure sufficient contrast between image and surrounding content"
115
+ "alt is required describe what the picture shows",
116
+ "Decoration takes alt=\"\"",
117
+ "Words baked into an image must be repeated in alt"
146
118
  ]
147
119
  },
148
120
  "examples": [
149
121
  {
150
122
  "name": "Default",
151
- "description": "Basic image display",
123
+ "description": "src plus alt — the shape follows the file.",
152
124
  "code": "<Image\n src=\"https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=400&h=300&fit=crop\"\n alt=\"Code on a screen\"\n width={300}\n/>"
153
125
  },
154
126
  {
155
127
  "name": "Aspect Ratios",
156
- "description": "Different aspect ratio options",
128
+ "description": "Lock the frame so a grid stays even whatever the file is.",
157
129
  "code": "<div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap' }}>\n <Image\n src=\"https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=200&h=200&fit=crop\"\n alt=\"Square image\"\n aspectRatio=\"1:1\"\n width={100}\n />\n <Image\n src=\"https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=200&h=150&fit=crop\"\n alt=\"4:3 image\"\n aspectRatio=\"4:3\"\n width={120}\n />\n <Image\n src=\"https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=320&h=180&fit=crop\"\n alt=\"16:9 image\"\n aspectRatio=\"16:9\"\n width={160}\n />\n</div>"
158
130
  },
159
131
  {
160
132
  "name": "Rounded Corners",
161
- "description": "Border radius options",
133
+ "description": "Rounding softens the frame; match it to the surface it sits on.",
162
134
  "code": "<div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>\n <Image\n src=\"https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=100&h=100&fit=crop\"\n alt=\"No rounding\"\n rounded=\"none\"\n width={80}\n height={80}\n />\n <Image\n src=\"https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=100&h=100&fit=crop\"\n alt=\"Medium rounding\"\n rounded=\"md\"\n width={80}\n height={80}\n />\n <Image\n src=\"https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=100&h=100&fit=crop\"\n alt=\"Full rounding\"\n rounded=\"full\"\n width={80}\n height={80}\n />\n</div>"
163
135
  },
164
136
  {
165
137
  "name": "With Fallback",
166
- "description": "Fallback content for loading/error states",
138
+ "description": "A dead URL shows this instead of a broken-image glyph.",
167
139
  "code": "<Image\n src=\"https://invalid-url.example/image.jpg\"\n alt=\"Image that will fail\"\n width={200}\n height={150}\n rounded=\"md\"\n fallback={\n <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%', background: 'var(--fui-color-surface-secondary)' }}>\n <span style={{ color: 'var(--fui-color-text-tertiary)' }}>No image</span>\n </div>\n }\n/>"
168
140
  }
169
141
  ],
@@ -189,16 +161,11 @@
189
161
  "fallback: ReactNode - loading/error content",
190
162
  "imgProps/onImageLoad/onImageError - low-level img customization and events"
191
163
  ],
192
- "a11yRules": [
193
- "A11Y_IMG_ALT",
194
- "A11Y_IMG_DECORATIVE"
195
- ]
164
+ "a11yRules": ["A11Y_IMG_ALT", "A11Y_IMG_DECORATIVE"]
196
165
  },
197
166
  "ai": {
198
167
  "compositionPattern": "compound",
199
- "subComponents": [
200
- "Root"
201
- ]
168
+ "subComponents": ["Root"]
202
169
  },
203
170
  "provenance": {
204
171
  "source": "migrated",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "https://usefragments.com/schemas/contract.v1.json",
3
3
  "name": "Input",
4
- "description": "Text input field for single-line user data entry",
5
- "category": "forms",
4
+ "description": "Collects a single line of user-entered text.",
5
+ "category": "inputs",
6
6
  "tags": ["form", "input", "text"],
7
7
  "status": "stable",
8
8
  "sourcePath": "src/components/Input/index.tsx",
@@ -181,10 +181,9 @@
181
181
  },
182
182
  "usage": {
183
183
  "when": [
184
- "Collecting single-line text data from users",
185
- "Email, password, phone number, or URL input",
184
+ "Single-line answers: name, email, password, phone, URL",
186
185
  "Search fields",
187
- "Short form fields (name, title, etc.)"
186
+ "Short free-form values a list cannot cover"
188
187
  ],
189
188
  "whenNot": [
190
189
  "Multi-line text (use Textarea)",
@@ -193,83 +192,78 @@
193
192
  "Date/time input (use DatePicker)"
194
193
  ],
195
194
  "guidelines": [
196
- "Always provide a label for accessibility",
197
- "Use appropriate input type for data validation",
198
- "Show validation errors with error prop and helperText",
199
- "Use placeholder for format hints, not labels",
200
- "Use the shortcut prop for embedded keyboard hints instead of custom kbd markup around inputs",
201
- "Shortcut hints are display-only by default; set shortcutBehavior=\"focus-input\" to opt into global hotkey focusing"
195
+ "Give every field a label",
196
+ "Match type to the data — it drives validation and mobile keyboards",
197
+ "Placeholder shows format; it never replaces the label",
198
+ "Pair error with helperText so the reason is announced",
199
+ "Use the shortcut prop for kbd hints instead of custom markup",
200
+ "shortcut is display-only; shortcutBehavior=\"focus-input\" adds the global hotkey"
202
201
  ],
203
202
  "accessibility": [
204
- "Labels must be associated with inputs",
205
- "Error messages should be announced to screen readers",
206
- "Required fields should be indicated"
203
+ "Label is programmatically tied to the input",
204
+ "Error text is announced to screen readers",
205
+ "Required fields are marked"
207
206
  ]
208
207
  },
209
208
  "examples": [
210
209
  {
211
210
  "name": "Default",
212
- "description": "Basic text input",
211
+ "description": "Label plus a placeholder that hints the format.",
213
212
  "code": "<Input label=\"Name\" placeholder=\"Enter your name\" />"
214
213
  },
215
214
  {
216
215
  "name": "With Value",
217
- "description": "Input with pre-filled value",
216
+ "description": "Starts with a value already in the field.",
218
217
  "code": "<Input label=\"Email\" type=\"email\" value=\"user@example.com\" />"
219
218
  },
220
219
  {
221
220
  "name": "With Helper",
222
- "description": "Input with helper text",
221
+ "description": "Supporting text sits under the field.",
223
222
  "code": "<Input\n label=\"Password\"\n type=\"password\"\n placeholder=\"Create a password\"\n helperText=\"Must be at least 8 characters\"\n/>"
224
223
  },
225
224
  {
226
225
  "name": "Error State",
227
- "description": "Input showing validation error",
226
+ "description": "Red border, and helperText becomes the reason.",
228
227
  "code": "<Input\n label=\"Email\"\n type=\"email\"\n value=\"invalid-email\"\n error\n helperText=\"Please enter a valid email address\"\n/>"
229
228
  },
230
229
  {
231
230
  "name": "Disabled",
232
- "description": "Non-interactive input",
233
- "code": "<Input label=\"Username\" value=\"readonly-user\" disabled />"
231
+ "description": "Dimmed, unfocusable, still shows its value.",
232
+ "code": "<Input label=\"Username\" value=\"ada.lovelace\" disabled />"
234
233
  },
235
234
  {
236
235
  "name": "Required",
237
- "description": "Required field with asterisk indicator",
236
+ "description": "Asterisk marks the field as mandatory.",
238
237
  "code": "<Input\n label=\"Email\"\n type=\"email\"\n placeholder=\"user@example.com\"\n required\n/>"
239
238
  },
240
239
  {
241
240
  "name": "Sizes",
242
- "description": "Available size variants",
241
+ "description": "Three heights: sm, md, lg.",
243
242
  "code": "<div style={{ display: 'flex', flexDirection: 'column', gap: '12px', maxWidth: '300px' }}>\n <Input label=\"Small\" size=\"sm\" placeholder=\"Small input\" />\n <Input label=\"Medium\" size=\"md\" placeholder=\"Medium input\" />\n <Input label=\"Large\" size=\"lg\" placeholder=\"Large input\" />\n</div>"
244
243
  },
245
244
  {
246
245
  "name": "Bare Input (Field Composition)",
247
- "description": "Disable the built-in wrapper for custom Field composition",
246
+ "description": "Drops the built-in label wrapper so Field owns the layout.",
248
247
  "code": "<Input\n withFieldWrapper={false}\n aria-label=\"Search\"\n placeholder=\"Search...\"\n rootProps={{ 'data-demo': 'bare-input-wrapper' }}\n/>"
249
248
  },
250
- {
251
- "name": "Shortcut Focus Hotkey",
252
- "description": "Display shortcut hint and opt into focus behavior",
253
- "code": "<Input\n label=\"Command Palette\"\n placeholder=\"Search commands\"\n shortcut=\"⌘K\"\n shortcutBehavior=\"focus-input\"\n/>"
254
- },
255
249
  {
256
250
  "name": "Search With Shortcut",
257
- "description": "Search input with a leading icon and embedded kbd hint",
251
+ "description": "Leading icon and a ⌘K hint that focuses the field.",
258
252
  "code": "<Input\n aria-label=\"Search findings\"\n placeholder=\"Search findings...\"\n shortcut=\"⌘K\"\n shortcutBehavior=\"focus-input\"\n startAdornment={<MagnifyingGlass aria-hidden=\"true\" />}\n withFieldWrapper={false}\n/>"
259
253
  },
260
254
  {
261
255
  "name": "Success State",
262
- "description": "Input showing validated/success styling",
256
+ "description": "Green border confirms the value passed validation.",
263
257
  "code": "<Input\n label=\"Email\"\n type=\"email\"\n value=\"user@example.com\"\n success\n helperText=\"Email verified\"\n/>"
264
258
  },
265
259
  {
266
260
  "name": "With Start Adornment",
267
- "description": "Input with icon or prefix before the text",
261
+ "description": "Prefix sits inside the field, before the text.",
268
262
  "code": "<Input\n label=\"Price\"\n placeholder=\"0.00\"\n startAdornment={<span>$</span>}\n/>"
269
263
  },
270
264
  {
271
265
  "name": "With End Adornment",
272
- "description": "Input with icon or suffix after the text",
266
+ "description": "Suffix sits inside the field, after the text.",
273
267
  "code": "<Input\n label=\"Weight\"\n placeholder=\"0\"\n endAdornment={<span>kg</span>}\n/>"
274
268
  }
275
269
  ],
@@ -200,7 +200,8 @@
200
200
  font-variant-numeric: tabular-nums;
201
201
  color: var(--fui-kbd-color, var(--fui-text-tertiary, #{$fui-text-tertiary}));
202
202
  background: var(--fui-kbd-bg, var(--fui-bg-elevated, #{$fui-bg-elevated}));
203
- border: var(--fui-stroke-hairline, 1px) solid var(--fui-kbd-border, var(--fui-border, #{$fui-border}));
203
+ border: var(--fui-stroke-hairline, 1px) solid
204
+ var(--fui-kbd-border, var(--fui-border, #{$fui-border}));
204
205
  border-radius: var(--fui-kbd-radius, var(--fui-radius-sm, #{$fui-radius-sm}));
205
206
  box-shadow: var(--fui-kbd-shadow, none);
206
207
  pointer-events: none;
@@ -214,7 +215,7 @@
214
215
 
215
216
  @media (prefers-contrast: more) {
216
217
  .input {
217
- border-width: 2px;
218
+ border-width: var(--fui-stroke-default, 2px);
218
219
  border-color: var(--fui-text-primary, $fui-text-primary);
219
220
 
220
221
  &:focus-visible {