@fragments-sdk/ui 0.17.1 → 0.19.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 (286) hide show
  1. package/dist/assets/ui.css +2700 -3256
  2. package/dist/chart.cjs +0 -1
  3. package/dist/chart.js +0 -1
  4. package/dist/codeblock.cjs +0 -1
  5. package/dist/codeblock.js +0 -1
  6. package/dist/colorpicker.cjs +0 -1
  7. package/dist/colorpicker.js +0 -1
  8. package/dist/components/Accordion/Accordion.module.scss.cjs +8 -8
  9. package/dist/components/Accordion/Accordion.module.scss.js +8 -8
  10. package/dist/components/Alert/Alert.module.scss.cjs +12 -12
  11. package/dist/components/Alert/Alert.module.scss.js +12 -12
  12. package/dist/components/AppShell/AppShell.module.scss.cjs +12 -12
  13. package/dist/components/AppShell/AppShell.module.scss.js +12 -12
  14. package/dist/components/Avatar/Avatar.module.scss.cjs +13 -13
  15. package/dist/components/Avatar/Avatar.module.scss.js +13 -13
  16. package/dist/components/Badge/Badge.module.scss.cjs +13 -13
  17. package/dist/components/Badge/Badge.module.scss.js +13 -13
  18. package/dist/components/BentoGrid/BentoGrid.module.scss.cjs +14 -14
  19. package/dist/components/BentoGrid/BentoGrid.module.scss.js +14 -14
  20. package/dist/components/Box/Box.module.scss.cjs +152 -152
  21. package/dist/components/Box/Box.module.scss.js +152 -152
  22. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs +8 -8
  23. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.js +8 -8
  24. package/dist/components/Button/Button.module.scss.cjs +12 -12
  25. package/dist/components/Button/Button.module.scss.js +12 -12
  26. package/dist/components/Card/Card.module.scss.cjs +14 -14
  27. package/dist/components/Card/Card.module.scss.js +14 -14
  28. package/dist/components/Chart/Chart.module.scss.cjs +15 -15
  29. package/dist/components/Chart/Chart.module.scss.js +15 -15
  30. package/dist/components/Chart/index.d.ts +0 -1
  31. package/dist/components/Chart/index.d.ts.map +1 -1
  32. package/dist/components/Checkbox/Checkbox.module.scss.cjs +10 -10
  33. package/dist/components/Checkbox/Checkbox.module.scss.js +10 -10
  34. package/dist/components/Chip/Chip.module.scss.cjs +15 -15
  35. package/dist/components/Chip/Chip.module.scss.js +15 -15
  36. package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +21 -21
  37. package/dist/components/CodeBlock/CodeBlock.module.scss.js +21 -21
  38. package/dist/components/CodeBlock/index.d.ts +0 -1
  39. package/dist/components/CodeBlock/index.d.ts.map +1 -1
  40. package/dist/components/Collapsible/Collapsible.module.scss.cjs +10 -10
  41. package/dist/components/Collapsible/Collapsible.module.scss.js +10 -10
  42. package/dist/components/ColorPicker/ColorPicker.module.scss.cjs +14 -14
  43. package/dist/components/ColorPicker/ColorPicker.module.scss.js +14 -14
  44. package/dist/components/ColorPicker/index.d.ts +0 -1
  45. package/dist/components/ColorPicker/index.d.ts.map +1 -1
  46. package/dist/components/Combobox/Combobox.module.scss.cjs +23 -23
  47. package/dist/components/Combobox/Combobox.module.scss.js +23 -23
  48. package/dist/components/Combobox/index.cjs +13 -10
  49. package/dist/components/Combobox/index.d.ts.map +1 -1
  50. package/dist/components/Combobox/index.js +13 -10
  51. package/dist/components/Command/Command.module.scss.cjs +11 -11
  52. package/dist/components/Command/Command.module.scss.js +11 -11
  53. package/dist/components/ConversationList/ConversationList.module.scss.cjs +10 -10
  54. package/dist/components/ConversationList/ConversationList.module.scss.js +10 -10
  55. package/dist/components/DataTable/DataTable.module.scss.cjs +26 -26
  56. package/dist/components/DataTable/DataTable.module.scss.js +26 -26
  57. package/dist/components/DataTable/index.cjs +0 -1
  58. package/dist/components/DataTable/index.d.ts +0 -1
  59. package/dist/components/DataTable/index.d.ts.map +1 -1
  60. package/dist/components/DataTable/index.js +0 -1
  61. package/dist/components/DatePicker/DatePicker.module.scss.cjs +31 -31
  62. package/dist/components/DatePicker/DatePicker.module.scss.js +31 -31
  63. package/dist/components/DatePicker/index.d.ts +0 -1
  64. package/dist/components/DatePicker/index.d.ts.map +1 -1
  65. package/dist/components/Dialog/Dialog.module.scss.cjs +14 -14
  66. package/dist/components/Dialog/Dialog.module.scss.js +14 -14
  67. package/dist/components/Drawer/Drawer.module.scss.cjs +33 -27
  68. package/dist/components/Drawer/Drawer.module.scss.js +34 -28
  69. package/dist/components/Drawer/index.cjs +36 -14
  70. package/dist/components/Drawer/index.d.ts +21 -3
  71. package/dist/components/Drawer/index.d.ts.map +1 -1
  72. package/dist/components/Drawer/index.js +36 -14
  73. package/dist/components/Editor/Editor.module.scss.cjs +17 -17
  74. package/dist/components/Editor/Editor.module.scss.js +17 -17
  75. package/dist/components/EmptyState/EmptyState.module.scss.cjs +8 -8
  76. package/dist/components/EmptyState/EmptyState.module.scss.js +8 -8
  77. package/dist/components/Field/Field.module.scss.cjs +4 -4
  78. package/dist/components/Field/Field.module.scss.js +4 -4
  79. package/dist/components/Fieldset/Fieldset.module.scss.cjs +3 -3
  80. package/dist/components/Fieldset/Fieldset.module.scss.js +3 -3
  81. package/dist/components/Header/Header.module.scss.cjs +28 -28
  82. package/dist/components/Header/Header.module.scss.js +28 -28
  83. package/dist/components/Icon/Icon.module.scss.cjs +8 -8
  84. package/dist/components/Icon/Icon.module.scss.js +8 -8
  85. package/dist/components/Image/Image.module.scss.cjs +27 -27
  86. package/dist/components/Image/Image.module.scss.js +27 -27
  87. package/dist/components/Input/Input.module.scss.cjs +19 -19
  88. package/dist/components/Input/Input.module.scss.js +19 -19
  89. package/dist/components/Link/Link.module.scss.cjs +10 -10
  90. package/dist/components/Link/Link.module.scss.js +10 -10
  91. package/dist/components/Listbox/Listbox.module.scss.cjs +8 -8
  92. package/dist/components/Listbox/Listbox.module.scss.js +8 -8
  93. package/dist/components/Loading/Loading.module.scss.cjs +30 -30
  94. package/dist/components/Loading/Loading.module.scss.js +30 -30
  95. package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
  96. package/dist/components/Markdown/Markdown.module.scss.js +1 -1
  97. package/dist/components/Markdown/index.d.ts +0 -1
  98. package/dist/components/Markdown/index.d.ts.map +1 -1
  99. package/dist/components/Menu/Menu.module.scss.cjs +16 -13
  100. package/dist/components/Menu/Menu.module.scss.js +17 -14
  101. package/dist/components/Menu/index.cjs +1 -1
  102. package/dist/components/Menu/index.d.ts.map +1 -1
  103. package/dist/components/Menu/index.js +1 -1
  104. package/dist/components/Message/Message.module.scss.cjs +18 -18
  105. package/dist/components/Message/Message.module.scss.js +18 -18
  106. package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +28 -28
  107. package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +28 -28
  108. package/dist/components/Pagination/Pagination.module.scss.cjs +7 -7
  109. package/dist/components/Pagination/Pagination.module.scss.js +7 -7
  110. package/dist/components/Popover/Popover.module.scss.cjs +10 -10
  111. package/dist/components/Popover/Popover.module.scss.js +10 -10
  112. package/dist/components/Progress/Progress.module.scss.cjs +25 -25
  113. package/dist/components/Progress/Progress.module.scss.js +25 -25
  114. package/dist/components/Prompt/Prompt.module.scss.cjs +26 -14
  115. package/dist/components/Prompt/Prompt.module.scss.js +26 -14
  116. package/dist/components/Prompt/index.cjs +16 -0
  117. package/dist/components/Prompt/index.d.ts +17 -1
  118. package/dist/components/Prompt/index.d.ts.map +1 -1
  119. package/dist/components/Prompt/index.js +16 -0
  120. package/dist/components/RadioGroup/RadioGroup.module.scss.cjs +16 -16
  121. package/dist/components/RadioGroup/RadioGroup.module.scss.js +16 -16
  122. package/dist/components/ScrollArea/ScrollArea.module.scss.cjs +10 -10
  123. package/dist/components/ScrollArea/ScrollArea.module.scss.js +10 -10
  124. package/dist/components/Select/Select.module.scss.cjs +17 -17
  125. package/dist/components/Select/Select.module.scss.js +17 -17
  126. package/dist/components/Select/index.cjs +20 -20
  127. package/dist/components/Select/index.d.ts.map +1 -1
  128. package/dist/components/Select/index.js +20 -20
  129. package/dist/components/Separator/Separator.module.scss.cjs +10 -10
  130. package/dist/components/Separator/Separator.module.scss.js +10 -10
  131. package/dist/components/Sidebar/Sidebar.module.scss.cjs +42 -42
  132. package/dist/components/Sidebar/Sidebar.module.scss.js +42 -42
  133. package/dist/components/Slider/Slider.module.scss.cjs +12 -12
  134. package/dist/components/Slider/Slider.module.scss.js +12 -12
  135. package/dist/components/Slider/index.cjs +23 -21
  136. package/dist/components/Slider/index.js +23 -21
  137. package/dist/components/Stack/Stack.module.scss.cjs +35 -35
  138. package/dist/components/Stack/Stack.module.scss.js +35 -35
  139. package/dist/components/Table/Table.module.scss.cjs +16 -16
  140. package/dist/components/Table/Table.module.scss.js +16 -16
  141. package/dist/components/Table/index.d.ts +0 -1
  142. package/dist/components/Table/index.d.ts.map +1 -1
  143. package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +7 -7
  144. package/dist/components/TableOfContents/TableOfContents.module.scss.js +7 -7
  145. package/dist/components/Tabs/Tabs.module.scss.cjs +9 -9
  146. package/dist/components/Tabs/Tabs.module.scss.js +9 -9
  147. package/dist/components/Text/Text.module.scss.cjs +38 -38
  148. package/dist/components/Text/Text.module.scss.js +38 -38
  149. package/dist/components/Textarea/Textarea.module.scss.cjs +23 -23
  150. package/dist/components/Textarea/Textarea.module.scss.js +23 -23
  151. package/dist/components/Theme/ThemeToggle.module.scss.cjs +6 -6
  152. package/dist/components/Theme/ThemeToggle.module.scss.js +6 -6
  153. package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.cjs +22 -22
  154. package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.js +22 -22
  155. package/dist/components/Toast/Toast.module.scss.cjs +20 -20
  156. package/dist/components/Toast/Toast.module.scss.js +20 -20
  157. package/dist/components/Toggle/Toggle.module.scss.cjs +13 -13
  158. package/dist/components/Toggle/Toggle.module.scss.js +13 -13
  159. package/dist/components/ToggleGroup/ToggleGroup.module.scss.cjs +17 -17
  160. package/dist/components/ToggleGroup/ToggleGroup.module.scss.js +17 -17
  161. package/dist/components/Tooltip/Tooltip.module.scss.cjs +3 -3
  162. package/dist/components/Tooltip/Tooltip.module.scss.js +3 -3
  163. package/dist/components/Tooltip/index.cjs +4 -3
  164. package/dist/components/Tooltip/index.d.ts +4 -1
  165. package/dist/components/Tooltip/index.d.ts.map +1 -1
  166. package/dist/components/Tooltip/index.js +4 -3
  167. package/dist/datepicker.cjs +0 -1
  168. package/dist/datepicker.js +0 -1
  169. package/dist/index.cjs +0 -1
  170. package/dist/index.d.ts +2 -3
  171. package/dist/index.d.ts.map +1 -1
  172. package/dist/index.js +0 -1
  173. package/dist/markdown.cjs +0 -1
  174. package/dist/markdown.js +0 -1
  175. package/dist/table.cjs +0 -1
  176. package/dist/table.js +0 -1
  177. package/dist/utils/seed-derivation.cjs +29 -0
  178. package/dist/utils/seed-derivation.d.ts +1 -1
  179. package/dist/utils/seed-derivation.d.ts.map +1 -1
  180. package/dist/utils/seed-derivation.js +29 -0
  181. package/fragments.json +1 -1
  182. package/package.json +18 -14
  183. package/src/components/Accordion/Accordion.contract.json +169 -0
  184. package/src/components/Alert/Alert.contract.json +157 -0
  185. package/src/components/AppShell/AppShell.contract.json +155 -0
  186. package/src/components/Avatar/Avatar.contract.json +189 -0
  187. package/src/components/Badge/Badge.contract.json +187 -0
  188. package/src/components/BentoGrid/BentoGrid.contract.json +135 -0
  189. package/src/components/Box/Box.contract.json +423 -0
  190. package/src/components/Breadcrumbs/Breadcrumbs.contract.json +143 -0
  191. package/src/components/Button/Button.contract.json +205 -0
  192. package/src/components/Button/Button.module.scss +24 -1
  193. package/src/components/ButtonGroup/ButtonGroup.contract.json +140 -0
  194. package/src/components/Card/Card.contract.json +185 -0
  195. package/src/components/Card/Card.module.scss +5 -1
  196. package/src/components/Chart/Chart.contract.json +129 -0
  197. package/src/components/Chart/index.tsx +0 -1
  198. package/src/components/Checkbox/Checkbox.contract.json +246 -0
  199. package/src/components/Chip/Chip.contract.json +212 -0
  200. package/src/components/Chip/Chip.module.scss +4 -4
  201. package/src/components/CodeBlock/CodeBlock.contract.json +388 -0
  202. package/src/components/CodeBlock/index.tsx +0 -1
  203. package/src/components/Collapsible/Collapsible.contract.json +154 -0
  204. package/src/components/ColorPicker/ColorPicker.contract.json +212 -0
  205. package/src/components/ColorPicker/index.tsx +0 -1
  206. package/src/components/Combobox/Combobox.contract.json +297 -0
  207. package/src/components/Combobox/index.tsx +7 -8
  208. package/src/components/Command/Command.contract.json +165 -0
  209. package/src/components/Command/Command.module.scss +22 -9
  210. package/src/components/ConversationList/ConversationList.contract.json +151 -0
  211. package/src/components/DataTable/DataTable.contract.json +302 -0
  212. package/src/components/DataTable/index.tsx +0 -2
  213. package/src/components/DatePicker/DatePicker.contract.json +288 -0
  214. package/src/components/DatePicker/index.tsx +0 -2
  215. package/src/components/Dialog/Dialog.contract.json +159 -0
  216. package/src/components/Drawer/Drawer.contract.json +161 -0
  217. package/src/components/Drawer/Drawer.module.scss +45 -5
  218. package/src/components/Drawer/index.tsx +66 -23
  219. package/src/components/Editor/Editor.contract.json +263 -0
  220. package/src/components/EmptyState/EmptyState.contract.json +133 -0
  221. package/src/components/Field/Field.contract.json +157 -0
  222. package/src/components/Fieldset/Fieldset.contract.json +117 -0
  223. package/src/components/Form/Form.contract.json +145 -0
  224. package/src/components/Grid/Grid.contract.json +195 -0
  225. package/src/components/Header/Header.contract.json +196 -0
  226. package/src/components/Icon/Icon.contract.json +194 -0
  227. package/src/components/Image/Image.contract.json +209 -0
  228. package/src/components/Input/Input.contract.json +344 -0
  229. package/src/components/Input/Input.module.scss +16 -6
  230. package/src/components/Link/Link.contract.json +180 -0
  231. package/src/components/List/List.contract.json +154 -0
  232. package/src/components/Listbox/Listbox.contract.json +158 -0
  233. package/src/components/Loading/Loading.contract.json +167 -0
  234. package/src/components/Markdown/Markdown.contract.json +127 -0
  235. package/src/components/Markdown/Markdown.module.scss +0 -3
  236. package/src/components/Markdown/index.tsx +0 -1
  237. package/src/components/Menu/Menu.contract.json +177 -0
  238. package/src/components/Menu/Menu.module.scss +6 -0
  239. package/src/components/Menu/index.tsx +3 -1
  240. package/src/components/Message/Message.contract.json +183 -0
  241. package/src/components/Message/Message.module.scss +2 -2
  242. package/src/components/NavigationMenu/NavigationMenu.contract.json +203 -0
  243. package/src/components/NavigationMenu/NavigationMenu.module.scss +18 -23
  244. package/src/components/Pagination/Pagination.contract.json +163 -0
  245. package/src/components/Pagination/Pagination.module.scss +1 -1
  246. package/src/components/Popover/Popover.contract.json +163 -0
  247. package/src/components/Progress/Progress.contract.json +176 -0
  248. package/src/components/Prompt/Prompt.contract.json +211 -0
  249. package/src/components/Prompt/Prompt.module.scss +117 -3
  250. package/src/components/Prompt/index.tsx +40 -0
  251. package/src/components/RadioGroup/RadioGroup.contract.json +226 -0
  252. package/src/components/ScrollArea/ScrollArea.contract.json +131 -0
  253. package/src/components/Select/Select.contract.json +269 -0
  254. package/src/components/Select/index.tsx +20 -25
  255. package/src/components/Separator/Separator.contract.json +143 -0
  256. package/src/components/Sidebar/Sidebar.contract.json +258 -0
  257. package/src/components/Sidebar/Sidebar.module.scss +1 -1
  258. package/src/components/Skeleton/Skeleton.contract.json +166 -0
  259. package/src/components/Slider/Slider.contract.json +248 -0
  260. package/src/components/Slider/index.tsx +10 -10
  261. package/src/components/Stack/Stack.contract.json +220 -0
  262. package/src/components/Table/Table.contract.json +171 -0
  263. package/src/components/Table/index.tsx +0 -2
  264. package/src/components/TableOfContents/TableOfContents.contract.json +145 -0
  265. package/src/components/TableOfContents/TableOfContents.module.scss +19 -15
  266. package/src/components/Tabs/Tabs.contract.json +159 -0
  267. package/src/components/Text/Text.contract.json +239 -0
  268. package/src/components/Textarea/Textarea.contract.json +308 -0
  269. package/src/components/Theme/Theme.contract.json +152 -0
  270. package/src/components/ThinkingIndicator/ThinkingIndicator.contract.json +165 -0
  271. package/src/components/Toast/Toast.contract.json +181 -0
  272. package/src/components/Toggle/Toggle.contract.json +231 -0
  273. package/src/components/Toggle/Toggle.module.scss +3 -3
  274. package/src/components/ToggleGroup/ToggleGroup.contract.json +206 -0
  275. package/src/components/Tooltip/Tooltip.contract.json +214 -0
  276. package/src/components/Tooltip/index.tsx +7 -3
  277. package/src/components/VisuallyHidden/VisuallyHidden.contract.json +116 -0
  278. package/src/index.ts +8 -3
  279. package/src/styles/globals.scss +6 -1
  280. package/src/tokens/_computed.scss +3 -1
  281. package/src/tokens/_density.scss +4 -4
  282. package/src/tokens/_derive.scss +52 -56
  283. package/src/tokens/_palettes.scss +20 -1
  284. package/src/tokens/_seeds.scss +2 -2
  285. package/src/tokens/_variables.scss +45 -29
  286. package/src/utils/seed-derivation.ts +23 -1
@@ -0,0 +1,133 @@
1
+ {
2
+ "$schema": "https://usefragments.com/schemas/contract.v1.json",
3
+ "name": "EmptyState",
4
+ "description": "Placeholder for empty content areas. Provides context, guidance, and actions when no data is available.",
5
+ "category": "feedback",
6
+ "tags": [
7
+ "empty",
8
+ "placeholder",
9
+ "no-data",
10
+ "zero-state",
11
+ "blank-slate"
12
+ ],
13
+ "status": "stable",
14
+ "sourcePath": "src/components/EmptyState/index.tsx",
15
+ "exportName": "EmptyState",
16
+ "propsSummary": [
17
+ "children: node (required)",
18
+ "size: sm|md|lg (default: md)"
19
+ ],
20
+ "props": {
21
+ "children": {
22
+ "type": "node",
23
+ "description": "EmptyState content - use EmptyState.Icon, EmptyState.Title, EmptyState.Description, EmptyState.Actions sub-components",
24
+ "required": true
25
+ },
26
+ "size": {
27
+ "type": "enum",
28
+ "description": "Size variant",
29
+ "default": "md",
30
+ "required": false,
31
+ "values": [
32
+ "sm",
33
+ "md",
34
+ "lg"
35
+ ]
36
+ }
37
+ },
38
+ "usage": {
39
+ "when": [
40
+ "Empty lists, tables, or search results",
41
+ "New user onboarding (no content yet)",
42
+ "Filtered views with no matches",
43
+ "Error states where content failed to load"
44
+ ],
45
+ "whenNot": [
46
+ "Loading states (use skeleton or spinner)",
47
+ "Error messages with retry (use Alert)",
48
+ "Temporary messages (use Toast)"
49
+ ],
50
+ "guidelines": [
51
+ "Always explain why the area is empty",
52
+ "Provide a clear action to resolve the empty state",
53
+ "Use appropriate icons to reinforce the message",
54
+ "Keep messaging positive and actionable",
55
+ "EmptyState compound sub-components forward DOM props for ids, aria attributes, and handlers"
56
+ ],
57
+ "accessibility": [
58
+ "Empty state content is accessible to screen readers",
59
+ "Action buttons follow button accessibility guidelines"
60
+ ]
61
+ },
62
+ "examples": [
63
+ {
64
+ "name": "Default",
65
+ "description": "Basic empty state with action",
66
+ "code": "<EmptyState>\n <EmptyState.Icon><FolderIcon /></EmptyState.Icon>\n <EmptyState.Title>No projects yet</EmptyState.Title>\n <EmptyState.Description>Get started by creating your first project.</EmptyState.Description>\n <EmptyState.Actions>\n <Button>Create Project</Button>\n </EmptyState.Actions>\n</EmptyState>"
67
+ },
68
+ {
69
+ "name": "No Results",
70
+ "description": "Empty search results",
71
+ "code": "<EmptyState>\n <EmptyState.Icon><SearchIcon /></EmptyState.Icon>\n <EmptyState.Title>No results found</EmptyState.Title>\n <EmptyState.Description>Try adjusting your search terms or filters.</EmptyState.Description>\n <EmptyState.Actions>\n <Button variant=\"secondary\">Clear Filters</Button>\n </EmptyState.Actions>\n</EmptyState>"
72
+ },
73
+ {
74
+ "name": "With Secondary Action",
75
+ "description": "Empty state with two actions",
76
+ "code": "<EmptyState>\n <EmptyState.Icon><InboxIcon /></EmptyState.Icon>\n <EmptyState.Title>Inbox is empty</EmptyState.Title>\n <EmptyState.Description>You have no new messages.</EmptyState.Description>\n <EmptyState.Actions>\n <Button>Compose Message</Button>\n <Button variant=\"secondary\">View Archive</Button>\n </EmptyState.Actions>\n</EmptyState>"
77
+ },
78
+ {
79
+ "name": "Small",
80
+ "description": "Compact empty state for inline use",
81
+ "code": "<EmptyState size=\"sm\">\n <EmptyState.Title>No items</EmptyState.Title>\n <EmptyState.Description>Add items to see them here.</EmptyState.Description>\n</EmptyState>"
82
+ },
83
+ {
84
+ "name": "Large",
85
+ "description": "Prominent empty state for full-page use",
86
+ "code": "<EmptyState size=\"lg\">\n <EmptyState.Icon><FolderIcon /></EmptyState.Icon>\n <EmptyState.Title>Welcome to your workspace</EmptyState.Title>\n <EmptyState.Description>\n This is where your projects will appear. Create your first project to get started.\n </EmptyState.Description>\n <EmptyState.Actions>\n <Button>Create Your First Project</Button>\n </EmptyState.Actions>\n</EmptyState>"
87
+ }
88
+ ],
89
+ "relations": [
90
+ {
91
+ "component": "Alert",
92
+ "relationship": "alternative",
93
+ "note": "Use Alert for error states with retry"
94
+ },
95
+ {
96
+ "component": "Progress",
97
+ "relationship": "alternative",
98
+ "note": "Use Progress/Spinner for loading states"
99
+ }
100
+ ],
101
+ "contract": {
102
+ "propsSummary": [
103
+ "size: sm|md|lg (default: md)",
104
+ "Sub-components: EmptyState.Icon, EmptyState.Title, EmptyState.Description, EmptyState.Actions",
105
+ "Compound sub-components forward DOM props to their rendered elements"
106
+ ],
107
+ "a11yRules": [
108
+ "A11Y_EMPTY_STATE_CONTENT"
109
+ ]
110
+ },
111
+ "ai": {
112
+ "compositionPattern": "compound",
113
+ "subComponents": [
114
+ "Icon",
115
+ "Title",
116
+ "Description",
117
+ "Actions"
118
+ ],
119
+ "requiredChildren": [
120
+ "Title"
121
+ ],
122
+ "commonPatterns": [
123
+ "<EmptyState><EmptyState.Title>{title}</EmptyState.Title><EmptyState.Description>{description}</EmptyState.Description></EmptyState>",
124
+ "<EmptyState><EmptyState.Icon>{icon}</EmptyState.Icon><EmptyState.Title>{title}</EmptyState.Title><EmptyState.Description>{description}</EmptyState.Description><EmptyState.Actions><Button>{action}</Button></EmptyState.Actions></EmptyState>"
125
+ ]
126
+ },
127
+ "provenance": {
128
+ "source": "migrated",
129
+ "verified": false,
130
+ "frameworkSupport": "native",
131
+ "extractedAt": "2026-03-13T23:18:56.922Z"
132
+ }
133
+ }
@@ -0,0 +1,157 @@
1
+ {
2
+ "$schema": "https://usefragments.com/schemas/contract.v1.json",
3
+ "name": "Field",
4
+ "description": "Compositional form field wrapper providing validation, labels, descriptions, and error messages. Use for advanced form needs beyond baked-in Input/Textarea props.",
5
+ "category": "forms",
6
+ "tags": [
7
+ "form",
8
+ "field",
9
+ "validation",
10
+ "label",
11
+ "error",
12
+ "input",
13
+ "accessible"
14
+ ],
15
+ "status": "stable",
16
+ "sourcePath": "src/components/Field/index.tsx",
17
+ "exportName": "Field",
18
+ "propsSummary": [
19
+ "children: node (required)",
20
+ "name: string",
21
+ "disabled: boolean",
22
+ "invalid: boolean",
23
+ "validate: function",
24
+ "validationMode: onSubmit|onBlur|onChange",
25
+ "validationDebounceTime: number"
26
+ ],
27
+ "props": {
28
+ "children": {
29
+ "type": "node",
30
+ "description": "Field content (Label, Control, Description, Error)",
31
+ "required": true
32
+ },
33
+ "name": {
34
+ "type": "string",
35
+ "description": "Field name, used for error distribution from Form",
36
+ "required": false
37
+ },
38
+ "disabled": {
39
+ "type": "boolean",
40
+ "description": "Disables the field and its control",
41
+ "required": false
42
+ },
43
+ "invalid": {
44
+ "type": "boolean",
45
+ "description": "Marks the field as invalid",
46
+ "required": false
47
+ },
48
+ "validate": {
49
+ "type": "function",
50
+ "description": "Custom validation function returning error string(s) or null",
51
+ "required": false
52
+ },
53
+ "validationMode": {
54
+ "type": "enum",
55
+ "description": "When to trigger validation",
56
+ "required": false,
57
+ "values": [
58
+ "onSubmit",
59
+ "onBlur",
60
+ "onChange"
61
+ ]
62
+ },
63
+ "validationDebounceTime": {
64
+ "type": "number",
65
+ "description": "Debounce time in ms for onChange validation",
66
+ "required": false
67
+ }
68
+ },
69
+ "usage": {
70
+ "when": [
71
+ "You need granular validation with match-based error messages",
72
+ "Custom form controls need accessible labels and descriptions",
73
+ "Server-side errors need to be distributed to specific fields",
74
+ "You need dirty/touched tracking or custom validation logic"
75
+ ],
76
+ "whenNot": [
77
+ "Simple inputs with basic label and helper text (use Input with label prop)",
78
+ "Standalone selects or textareas with built-in error display"
79
+ ],
80
+ "guidelines": [
81
+ "Always provide a Field.Label for accessibility",
82
+ "Wrap any form control in Field.Control to connect it to the field context",
83
+ "Use match prop on Field.Error for granular native validation messages",
84
+ "Wrap in Form to enable server-side error distribution by field name"
85
+ ],
86
+ "accessibility": [
87
+ "Label automatically linked to control via aria-labelledby",
88
+ "Description linked via aria-describedby",
89
+ "Error messages announced to screen readers",
90
+ "Supports data-disabled and data-invalid attributes for styling"
91
+ ]
92
+ },
93
+ "examples": [
94
+ {
95
+ "name": "Single field",
96
+ "description": "A single field with label, control, and description",
97
+ "code": "<Field name=\"email\">\n <Field.Label>Email address</Field.Label>\n <Field.Control>\n <Input type=\"email\" placeholder=\"jane@example.com\" />\n </Field.Control>\n <Field.Description>We will never share your email.</Field.Description>\n</Field>"
98
+ },
99
+ {
100
+ "name": "Two-column layout",
101
+ "description": "Fields arranged in a two-column grid",
102
+ "code": "<Grid columns={2} gap=\"md\">\n <Field name=\"firstName\">\n <Field.Label>First Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Jane\" />\n </Field.Control>\n </Field>\n <Field name=\"lastName\">\n <Field.Label>Last Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Doe\" />\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" placeholder=\"jane@example.com\" />\n </Field.Control>\n <Field.Error match=\"typeMismatch\">Enter a valid email address</Field.Error>\n </Field>\n </Grid.Item>\n</Grid>"
103
+ },
104
+ {
105
+ "name": "Custom validation",
106
+ "description": "Field with custom validate function",
107
+ "code": "<Field\n name=\"age\"\n validate={(value) => {\n const num = Number(value);\n if (isNaN(num) || num < 18) return 'Must be 18 or older';\n return null;\n }}\n validationMode=\"onChange\"\n validationDebounceTime={500}\n>\n <Field.Label>Age</Field.Label>\n <Field.Control>\n <Input type=\"number\" placeholder=\"18\" />\n </Field.Control>\n <Field.Description>You must be at least 18 years old.</Field.Description>\n <Field.Error match=\"customError\" />\n</Field>"
108
+ }
109
+ ],
110
+ "relations": [
111
+ {
112
+ "component": "Input",
113
+ "relationship": "alternative",
114
+ "note": "Use Input for simple fields with built-in label/error"
115
+ },
116
+ {
117
+ "component": "Form",
118
+ "relationship": "parent",
119
+ "note": "Wrap in Form for server-side error distribution"
120
+ },
121
+ {
122
+ "component": "Fieldset",
123
+ "relationship": "sibling",
124
+ "note": "Use Fieldset to group related fields"
125
+ }
126
+ ],
127
+ "contract": {
128
+ "propsSummary": [
129
+ "name: string - field name for error distribution",
130
+ "validate: (value) => string | null - custom validation",
131
+ "validationMode: onSubmit|onBlur|onChange - validation trigger",
132
+ "Field.Control: wraps any form component (Input, Textarea, etc.)",
133
+ "Field.Error match: valueMissing|typeMismatch|customError|... - granular errors"
134
+ ],
135
+ "a11yRules": [
136
+ "A11Y_FIELD_LABEL",
137
+ "A11Y_FIELD_ERROR",
138
+ "A11Y_FIELD_DESCRIPTION"
139
+ ]
140
+ },
141
+ "ai": {
142
+ "compositionPattern": "compound",
143
+ "subComponents": [
144
+ "Label",
145
+ "Control",
146
+ "Description",
147
+ "Error",
148
+ "Validity"
149
+ ]
150
+ },
151
+ "provenance": {
152
+ "source": "migrated",
153
+ "verified": false,
154
+ "frameworkSupport": "native",
155
+ "extractedAt": "2026-03-13T23:18:59.733Z"
156
+ }
157
+ }
@@ -0,0 +1,117 @@
1
+ {
2
+ "$schema": "https://usefragments.com/schemas/contract.v1.json",
3
+ "name": "Fieldset",
4
+ "description": "Groups related form fields with an accessible legend. Use to organize forms into logical sections.",
5
+ "category": "forms",
6
+ "tags": [
7
+ "form",
8
+ "fieldset",
9
+ "group",
10
+ "legend",
11
+ "accessible"
12
+ ],
13
+ "status": "stable",
14
+ "sourcePath": "src/components/Fieldset/index.tsx",
15
+ "exportName": "Fieldset",
16
+ "propsSummary": [
17
+ "children: node (required)",
18
+ "disabled: boolean"
19
+ ],
20
+ "props": {
21
+ "children": {
22
+ "type": "node",
23
+ "description": "Fieldset content including Fieldset.Legend and form fields",
24
+ "required": true
25
+ },
26
+ "disabled": {
27
+ "type": "boolean",
28
+ "description": "Disables all fields within the fieldset",
29
+ "required": false
30
+ }
31
+ },
32
+ "usage": {
33
+ "when": [
34
+ "Grouping related fields in a form (e.g., address, personal info)",
35
+ "Disabling a group of fields together",
36
+ "Providing an accessible group label for screen readers"
37
+ ],
38
+ "whenNot": [
39
+ "Generic visual grouping (use Card)",
40
+ "Single field wrapping (use Field)"
41
+ ],
42
+ "guidelines": [
43
+ "Always include a Fieldset.Legend for accessibility",
44
+ "Use disabled prop to disable all fields within the group",
45
+ "Use Grid inside Fieldset for multi-column layouts",
46
+ "Fieldset.Legend forwards DOM props for ids, aria attributes, and custom data hooks"
47
+ ],
48
+ "accessibility": [
49
+ "Renders semantic fieldset element",
50
+ "Legend provides accessible group label",
51
+ "Disabled state propagates to all child fields"
52
+ ]
53
+ },
54
+ "examples": [
55
+ {
56
+ "name": "Two-column layout",
57
+ "description": "Fieldset with Grid for side-by-side fields",
58
+ "code": "<Fieldset>\n <Fieldset.Legend>Personal Information</Fieldset.Legend>\n <Grid columns={2} gap=\"md\">\n <Field name=\"firstName\">\n <Field.Label>First Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Jane\" />\n </Field.Control>\n </Field>\n <Field name=\"lastName\">\n <Field.Label>Last Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Doe\" />\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" placeholder=\"jane@example.com\" />\n </Field.Control>\n </Field>\n </Grid.Item>\n </Grid>\n</Fieldset>"
59
+ },
60
+ {
61
+ "name": "Mixed controls",
62
+ "description": "Fieldset with textarea, select, and checkbox",
63
+ "code": "<Fieldset>\n <Fieldset.Legend>Preferences</Fieldset.Legend>\n <Field name=\"bio\">\n <Field.Label>Bio</Field.Label>\n <Field.Control>\n <Textarea placeholder=\"Tell us about yourself\" rows={3} />\n </Field.Control>\n <Field.Description>Brief description for your profile.</Field.Description>\n </Field>\n <Field name=\"role\">\n <Field.Label>Role</Field.Label>\n <Field.Control>\n <Select placeholder=\"Select a role\">\n <Select.Trigger />\n <Select.Content>\n <Select.Item value=\"admin\">Admin</Select.Item>\n <Select.Item value=\"editor\">Editor</Select.Item>\n <Select.Item value=\"viewer\">Viewer</Select.Item>\n </Select.Content>\n </Select>\n </Field.Control>\n </Field>\n <Field name=\"newsletter\">\n <Field.Control>\n <Checkbox label=\"Subscribe to newsletter\" />\n </Field.Control>\n </Field>\n</Fieldset>"
64
+ },
65
+ {
66
+ "name": "With Description",
67
+ "description": "Fieldset with descriptive helper text below the legend",
68
+ "code": "<Fieldset>\n <Fieldset.Legend>Notification Settings</Fieldset.Legend>\n <Fieldset.Description>Choose how you want to be notified about updates.</Fieldset.Description>\n <Field name=\"emailNotif\">\n <Field.Control>\n <Checkbox label=\"Email notifications\" />\n </Field.Control>\n </Field>\n <Field name=\"smsNotif\">\n <Field.Control>\n <Checkbox label=\"SMS notifications\" />\n </Field.Control>\n </Field>\n</Fieldset>"
69
+ },
70
+ {
71
+ "name": "Disabled",
72
+ "description": "Disabled fieldset prevents interaction with all children",
73
+ "code": "<Fieldset disabled>\n <Fieldset.Legend>Locked Section</Fieldset.Legend>\n <Grid columns={2} gap=\"md\">\n <Field name=\"lockedFirst\">\n <Field.Label>First Name</Field.Label>\n <Field.Control>\n <Input defaultValue=\"Jane\" />\n </Field.Control>\n </Field>\n <Field name=\"lockedLast\">\n <Field.Label>Last Name</Field.Label>\n <Field.Control>\n <Input defaultValue=\"Doe\" />\n </Field.Control>\n </Field>\n </Grid>\n <Field name=\"lockedCheck\">\n <Field.Control>\n <Checkbox label=\"Cannot toggle\" defaultChecked />\n </Field.Control>\n </Field>\n</Fieldset>"
74
+ }
75
+ ],
76
+ "relations": [
77
+ {
78
+ "component": "Field",
79
+ "relationship": "sibling",
80
+ "note": "Contains Field components"
81
+ },
82
+ {
83
+ "component": "Form",
84
+ "relationship": "parent",
85
+ "note": "Used within a Form"
86
+ },
87
+ {
88
+ "component": "Card",
89
+ "relationship": "alternative",
90
+ "note": "Use Card for non-form visual grouping"
91
+ }
92
+ ],
93
+ "contract": {
94
+ "propsSummary": [
95
+ "disabled: boolean - disables all child fields",
96
+ "Fieldset.Legend: accessible group label",
97
+ "Fieldset.Legend forwards DOM props",
98
+ "Fieldset.Description: helper text below the legend"
99
+ ],
100
+ "a11yRules": [
101
+ "A11Y_FIELDSET_LEGEND"
102
+ ]
103
+ },
104
+ "ai": {
105
+ "compositionPattern": "compound",
106
+ "subComponents": [
107
+ "Legend",
108
+ "Description"
109
+ ]
110
+ },
111
+ "provenance": {
112
+ "source": "migrated",
113
+ "verified": false,
114
+ "frameworkSupport": "native",
115
+ "extractedAt": "2026-03-13T23:18:57.275Z"
116
+ }
117
+ }
@@ -0,0 +1,145 @@
1
+ {
2
+ "$schema": "https://usefragments.com/schemas/contract.v1.json",
3
+ "name": "Form",
4
+ "description": "Form wrapper that handles server-side error distribution to Field components. Pairs with Field for complete form validation.",
5
+ "category": "forms",
6
+ "tags": [
7
+ "form",
8
+ "validation",
9
+ "errors",
10
+ "submit",
11
+ "server"
12
+ ],
13
+ "status": "stable",
14
+ "sourcePath": "src/components/Form/index.tsx",
15
+ "exportName": "Form",
16
+ "propsSummary": [
17
+ "children: node (required)",
18
+ "errors: object",
19
+ "onSubmit: function",
20
+ "onFormSubmit: function",
21
+ "onClearErrors: function",
22
+ "validationMode: onSubmit|onBlur|onChange"
23
+ ],
24
+ "props": {
25
+ "children": {
26
+ "type": "node",
27
+ "description": "Form content",
28
+ "required": true
29
+ },
30
+ "errors": {
31
+ "type": "object",
32
+ "description": "Server-side errors keyed by field name",
33
+ "required": false
34
+ },
35
+ "onSubmit": {
36
+ "type": "function",
37
+ "description": "Form submission handler (preferred)",
38
+ "required": false
39
+ },
40
+ "onFormSubmit": {
41
+ "type": "function",
42
+ "description": "Deprecated alias for onSubmit",
43
+ "required": false
44
+ },
45
+ "onClearErrors": {
46
+ "type": "function",
47
+ "description": "Called with field name when errors should be cleared",
48
+ "required": false
49
+ },
50
+ "validationMode": {
51
+ "type": "enum",
52
+ "description": "When field validation should run",
53
+ "required": false,
54
+ "values": [
55
+ "onSubmit",
56
+ "onBlur",
57
+ "onChange"
58
+ ]
59
+ }
60
+ },
61
+ "usage": {
62
+ "when": [
63
+ "Building forms that need server-side error handling",
64
+ "Distributing validation errors to specific fields by name",
65
+ "Combining client and server validation in one form"
66
+ ],
67
+ "whenNot": [
68
+ "Simple forms with only client-side validation (use native form or Field alone)",
69
+ "Non-form layouts (use Grid or Card)"
70
+ ],
71
+ "guidelines": [
72
+ "Pass errors as Record<string, string | string[]> keyed by field name",
73
+ "Use onClearErrors to clear errors when fields are modified",
74
+ "Use onSubmit for form submission handling (onFormSubmit is deprecated alias)",
75
+ "Field components with matching name prop display errors automatically",
76
+ "Use Grid inside Form or Fieldset for multi-column layouts"
77
+ ],
78
+ "accessibility": [
79
+ "Renders semantic form element",
80
+ "Error messages linked to fields via aria-describedby"
81
+ ]
82
+ },
83
+ "examples": [
84
+ {
85
+ "name": "Sign up",
86
+ "description": "Registration form with two-column name fields",
87
+ "code": "<Form onSubmit={(e) => { e.preventDefault(); }}>\n <Grid columns={2} gap=\"md\">\n <Field name=\"firstName\">\n <Field.Label>First Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Jane\" />\n </Field.Control>\n </Field>\n <Field name=\"lastName\">\n <Field.Label>Last Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Doe\" />\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" placeholder=\"jane@example.com\" />\n </Field.Control>\n <Field.Error match=\"typeMismatch\">Enter a valid email address</Field.Error>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"password\">\n <Field.Label>Password</Field.Label>\n <Field.Control>\n <Input type=\"password\" placeholder=\"At least 8 characters\" />\n </Field.Control>\n <Field.Description>Must be at least 8 characters</Field.Description>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"terms\">\n <Field.Control>\n <Checkbox label=\"I agree to the terms and conditions\" />\n </Field.Control>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Button type=\"submit\" variant=\"primary\">Create Account</Button>\n </Grid.Item>\n </Grid>\n</Form>"
88
+ },
89
+ {
90
+ "name": "Profile settings",
91
+ "description": "Multi-section form with Fieldsets, switches, and radio group",
92
+ "code": "<Form onSubmit={(e) => { e.preventDefault(); }}>\n <Fieldset>\n <Fieldset.Legend>Profile</Fieldset.Legend>\n <Grid columns={2} gap=\"md\">\n <Field name=\"displayName\">\n <Field.Label>Display Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"How others see you\" />\n </Field.Control>\n </Field>\n <Field name=\"timezone\">\n <Field.Label>Timezone</Field.Label>\n <Field.Control>\n <Select placeholder=\"Select timezone\">\n <Select.Trigger />\n <Select.Content>\n <Select.Item value=\"utc\">UTC</Select.Item>\n <Select.Item value=\"est\">Eastern (EST)</Select.Item>\n <Select.Item value=\"pst\">Pacific (PST)</Select.Item>\n <Select.Item value=\"gmt\">GMT</Select.Item>\n </Select.Content>\n </Select>\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"bio\">\n <Field.Label>Bio</Field.Label>\n <Field.Control>\n <Textarea placeholder=\"Tell us about yourself\" rows={3} maxLength={280} />\n </Field.Control>\n <Field.Description>Max 280 characters</Field.Description>\n </Field>\n </Grid.Item>\n </Grid>\n </Fieldset>\n <Fieldset>\n <Fieldset.Legend>Notifications</Fieldset.Legend>\n <Field name=\"emailNotifs\">\n <Field.Control>\n <Switch label=\"Email notifications\" />\n </Field.Control>\n </Field>\n <Field name=\"marketingEmails\">\n <Field.Control>\n <Switch label=\"Marketing emails\" />\n </Field.Control>\n </Field>\n <Field name=\"frequency\">\n <Field.Label>Digest frequency</Field.Label>\n <Field.Control>\n <RadioGroup name=\"frequency\" orientation=\"vertical\">\n <RadioGroup.Item value=\"daily\" label=\"Daily\" />\n <RadioGroup.Item value=\"weekly\" label=\"Weekly\" />\n <RadioGroup.Item value=\"monthly\" label=\"Monthly\" />\n </RadioGroup>\n </Field.Control>\n </Field>\n </Fieldset>\n <Button type=\"submit\" variant=\"primary\">Save Changes</Button>\n</Form>"
93
+ },
94
+ {
95
+ "name": "Contact form",
96
+ "description": "Contact form with select, textarea, and checkbox",
97
+ "code": "<Form onSubmit={(e) => { e.preventDefault(); }}>\n <Grid columns={2} gap=\"md\">\n <Field name=\"name\">\n <Field.Label>Name</Field.Label>\n <Field.Control>\n <Input placeholder=\"Your name\" />\n </Field.Control>\n </Field>\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" placeholder=\"you@example.com\" />\n </Field.Control>\n </Field>\n <Grid.Item colSpan=\"full\">\n <Field name=\"subject\">\n <Field.Label>Subject</Field.Label>\n <Field.Control>\n <Select placeholder=\"What is this about?\">\n <Select.Trigger />\n <Select.Content>\n <Select.Item value=\"general\">General Inquiry</Select.Item>\n <Select.Item value=\"support\">Technical Support</Select.Item>\n <Select.Item value=\"billing\">Billing</Select.Item>\n <Select.Item value=\"feedback\">Feedback</Select.Item>\n </Select.Content>\n </Select>\n </Field.Control>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"message\">\n <Field.Label>Message</Field.Label>\n <Field.Control>\n <Textarea placeholder=\"How can we help?\" rows={5} />\n </Field.Control>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Field name=\"copy\">\n <Field.Control>\n <Checkbox label=\"Send me a copy\" />\n </Field.Control>\n </Field>\n </Grid.Item>\n <Grid.Item colSpan=\"full\">\n <Button type=\"submit\" variant=\"primary\">Send Message</Button>\n </Grid.Item>\n </Grid>\n</Form>"
98
+ },
99
+ {
100
+ "name": "With server errors",
101
+ "description": "Form displaying server-side validation errors",
102
+ "code": "<Form errors={{ username: 'Username is already taken', email: 'Email is already registered' }}>\n <Grid columns={2} gap=\"md\">\n <Field name=\"username\">\n <Field.Label>Username</Field.Label>\n <Field.Control>\n <Input defaultValue=\"janedoe\" />\n </Field.Control>\n <Field.Error match=\"customError\" />\n </Field>\n <Field name=\"email\">\n <Field.Label>Email</Field.Label>\n <Field.Control>\n <Input type=\"email\" defaultValue=\"jane@example.com\" />\n </Field.Control>\n <Field.Error match=\"customError\" />\n </Field>\n <Grid.Item colSpan=\"full\">\n <Button type=\"submit\" variant=\"primary\">Submit</Button>\n </Grid.Item>\n </Grid>\n</Form>"
103
+ }
104
+ ],
105
+ "relations": [
106
+ {
107
+ "component": "Field",
108
+ "relationship": "sibling",
109
+ "note": "Contains Field components for error distribution"
110
+ },
111
+ {
112
+ "component": "Fieldset",
113
+ "relationship": "sibling",
114
+ "note": "Use Fieldset to group fields within a Form"
115
+ },
116
+ {
117
+ "component": "Button",
118
+ "relationship": "sibling",
119
+ "note": "Use Button type=\"submit\" for form submission"
120
+ }
121
+ ],
122
+ "contract": {
123
+ "propsSummary": [
124
+ "errors: Record<string, string | string[]> - server errors by field name",
125
+ "onSubmit: (event) => void - submission handler (preferred)",
126
+ "onFormSubmit: (event) => void - deprecated alias for onSubmit",
127
+ "onClearErrors: (name) => void - clear errors callback"
128
+ ],
129
+ "a11yRules": [
130
+ "A11Y_FORM_LABEL"
131
+ ]
132
+ },
133
+ "ai": {
134
+ "compositionPattern": "compound",
135
+ "subComponents": [
136
+ "Root"
137
+ ]
138
+ },
139
+ "provenance": {
140
+ "source": "migrated",
141
+ "verified": false,
142
+ "frameworkSupport": "native",
143
+ "extractedAt": "2026-03-13T23:18:57.100Z"
144
+ }
145
+ }