@usefragments/ui 1.0.2 → 1.2.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 (326) hide show
  1. package/README.md +16 -16
  2. package/dist/assets/fragments-wordmark.cjs +30 -0
  3. package/dist/assets/fragments-wordmark.d.ts +13 -0
  4. package/dist/assets/fragments-wordmark.d.ts.map +1 -0
  5. package/dist/assets/fragments-wordmark.js +30 -0
  6. package/dist/assets/ui.css +3234 -3116
  7. package/dist/components/Accordion/Accordion.module.scss.cjs +8 -8
  8. package/dist/components/Accordion/Accordion.module.scss.js +8 -8
  9. package/dist/components/Accordion/index.cjs +22 -10
  10. package/dist/components/Accordion/index.d.ts.map +1 -1
  11. package/dist/components/Accordion/index.js +22 -10
  12. package/dist/components/Alert/Alert.module.scss.cjs +13 -13
  13. package/dist/components/Alert/Alert.module.scss.js +13 -13
  14. package/dist/components/AppShell/AppShell.module.scss.cjs +22 -10
  15. package/dist/components/AppShell/AppShell.module.scss.js +22 -10
  16. package/dist/components/AppShell/index.cjs +1 -1
  17. package/dist/components/AppShell/index.js +1 -1
  18. package/dist/components/Avatar/Avatar.module.scss.cjs +13 -13
  19. package/dist/components/Avatar/Avatar.module.scss.js +13 -13
  20. package/dist/components/Badge/Badge.module.scss.cjs +16 -16
  21. package/dist/components/Badge/Badge.module.scss.js +16 -16
  22. package/dist/components/BentoGrid/BentoGrid.module.scss.cjs +14 -14
  23. package/dist/components/BentoGrid/BentoGrid.module.scss.js +14 -14
  24. package/dist/components/Box/Box.module.scss.cjs +152 -152
  25. package/dist/components/Box/Box.module.scss.js +152 -152
  26. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs +8 -8
  27. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.js +8 -8
  28. package/dist/components/Button/Button.module.scss.cjs +13 -13
  29. package/dist/components/Button/Button.module.scss.js +13 -13
  30. package/dist/components/Card/Card.module.scss.cjs +17 -17
  31. package/dist/components/Card/Card.module.scss.js +17 -17
  32. package/dist/components/Card/index.d.ts +3 -3
  33. package/dist/components/Card/index.d.ts.map +1 -1
  34. package/dist/components/Chart/Chart.module.scss.cjs +15 -15
  35. package/dist/components/Chart/Chart.module.scss.js +15 -15
  36. package/dist/components/Checkbox/Checkbox.module.scss.cjs +11 -11
  37. package/dist/components/Checkbox/Checkbox.module.scss.js +11 -11
  38. package/dist/components/Chip/Chip.module.scss.cjs +15 -15
  39. package/dist/components/Chip/Chip.module.scss.js +15 -15
  40. package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +21 -21
  41. package/dist/components/CodeBlock/CodeBlock.module.scss.js +21 -21
  42. package/dist/components/Collapsible/Collapsible.module.scss.cjs +10 -10
  43. package/dist/components/Collapsible/Collapsible.module.scss.js +10 -10
  44. package/dist/components/ColorPicker/ColorPicker.module.scss.cjs +14 -14
  45. package/dist/components/ColorPicker/ColorPicker.module.scss.js +14 -14
  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 +106 -9
  49. package/dist/components/Combobox/index.d.ts.map +1 -1
  50. package/dist/components/Combobox/index.js +106 -9
  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 +37 -34
  56. package/dist/components/DataTable/DataTable.module.scss.js +37 -34
  57. package/dist/components/DataTable/index.d.ts +3 -1
  58. package/dist/components/DataTable/index.d.ts.map +1 -1
  59. package/dist/components/DatePicker/DatePicker.module.scss.cjs +33 -33
  60. package/dist/components/DatePicker/DatePicker.module.scss.js +33 -33
  61. package/dist/components/DatePicker/index.d.ts +1 -1
  62. package/dist/components/DatePicker/index.d.ts.map +1 -1
  63. package/dist/components/Dialog/Dialog.module.scss.cjs +14 -14
  64. package/dist/components/Dialog/Dialog.module.scss.js +14 -14
  65. package/dist/components/Drawer/Drawer.module.scss.cjs +28 -28
  66. package/dist/components/Drawer/Drawer.module.scss.js +28 -28
  67. package/dist/components/Drawer/index.cjs +20 -3
  68. package/dist/components/Drawer/index.d.ts.map +1 -1
  69. package/dist/components/Drawer/index.js +20 -3
  70. package/dist/components/Editor/Editor.module.scss.cjs +17 -17
  71. package/dist/components/Editor/Editor.module.scss.js +17 -17
  72. package/dist/components/EmptyState/EmptyState.module.scss.cjs +8 -8
  73. package/dist/components/EmptyState/EmptyState.module.scss.js +8 -8
  74. package/dist/components/Field/Field.module.scss.cjs +4 -4
  75. package/dist/components/Field/Field.module.scss.js +4 -4
  76. package/dist/components/Field/index.cjs +10 -9
  77. package/dist/components/Field/index.d.ts +7 -7
  78. package/dist/components/Field/index.d.ts.map +1 -1
  79. package/dist/components/Field/index.js +10 -9
  80. package/dist/components/Fieldset/Fieldset.module.scss.cjs +3 -3
  81. package/dist/components/Fieldset/Fieldset.module.scss.js +3 -3
  82. package/dist/components/Header/Header.module.scss.cjs +44 -29
  83. package/dist/components/Header/Header.module.scss.js +44 -29
  84. package/dist/components/Header/index.cjs +56 -3
  85. package/dist/components/Header/index.d.ts +25 -3
  86. package/dist/components/Header/index.d.ts.map +1 -1
  87. package/dist/components/Header/index.js +56 -3
  88. package/dist/components/Icon/Icon.module.scss.cjs +8 -8
  89. package/dist/components/Icon/Icon.module.scss.js +8 -8
  90. package/dist/components/IconButton/IconButton.module.scss.cjs +8 -8
  91. package/dist/components/IconButton/IconButton.module.scss.js +8 -8
  92. package/dist/components/Image/Image.module.scss.cjs +27 -27
  93. package/dist/components/Image/Image.module.scss.js +27 -27
  94. package/dist/components/Input/Input.module.scss.cjs +19 -19
  95. package/dist/components/Input/Input.module.scss.js +19 -19
  96. package/dist/components/Link/Link.module.scss.cjs +10 -10
  97. package/dist/components/Link/Link.module.scss.js +10 -10
  98. package/dist/components/List/List.module.scss.cjs +19 -19
  99. package/dist/components/List/List.module.scss.js +19 -19
  100. package/dist/components/Listbox/Listbox.module.scss.cjs +8 -8
  101. package/dist/components/Listbox/Listbox.module.scss.js +8 -8
  102. package/dist/components/Loading/Loading.module.scss.cjs +30 -30
  103. package/dist/components/Loading/Loading.module.scss.js +30 -30
  104. package/dist/components/Main/Main.module.scss.cjs +26 -0
  105. package/dist/components/Main/Main.module.scss.js +26 -0
  106. package/dist/components/Main/index.cjs +128 -0
  107. package/dist/components/Main/index.d.ts +22 -0
  108. package/dist/components/Main/index.d.ts.map +1 -0
  109. package/dist/components/Main/index.js +111 -0
  110. package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
  111. package/dist/components/Markdown/Markdown.module.scss.js +1 -1
  112. package/dist/components/Menu/Menu.module.scss.cjs +14 -14
  113. package/dist/components/Menu/Menu.module.scss.js +14 -14
  114. package/dist/components/Message/Message.module.scss.cjs +18 -18
  115. package/dist/components/Message/Message.module.scss.js +18 -18
  116. package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +28 -28
  117. package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +28 -28
  118. package/dist/components/Pagination/Pagination.module.scss.cjs +7 -7
  119. package/dist/components/Pagination/Pagination.module.scss.js +7 -7
  120. package/dist/components/Popover/Popover.module.scss.cjs +10 -10
  121. package/dist/components/Popover/Popover.module.scss.js +10 -10
  122. package/dist/components/Popover/index.cjs +27 -2
  123. package/dist/components/Popover/index.d.ts.map +1 -1
  124. package/dist/components/Popover/index.js +27 -2
  125. package/dist/components/Progress/Progress.module.scss.cjs +25 -25
  126. package/dist/components/Progress/Progress.module.scss.js +25 -25
  127. package/dist/components/Prompt/Prompt.module.scss.cjs +18 -18
  128. package/dist/components/Prompt/Prompt.module.scss.js +18 -18
  129. package/dist/components/RadioGroup/RadioGroup.module.scss.cjs +17 -17
  130. package/dist/components/RadioGroup/RadioGroup.module.scss.js +17 -17
  131. package/dist/components/RadioGroup/index.cjs +2 -0
  132. package/dist/components/RadioGroup/index.d.ts +2 -0
  133. package/dist/components/RadioGroup/index.d.ts.map +1 -1
  134. package/dist/components/RadioGroup/index.js +2 -0
  135. package/dist/components/ScrollArea/ScrollArea.module.scss.cjs +10 -10
  136. package/dist/components/ScrollArea/ScrollArea.module.scss.js +10 -10
  137. package/dist/components/Select/Select.module.scss.cjs +17 -17
  138. package/dist/components/Select/Select.module.scss.js +17 -17
  139. package/dist/components/Separator/Separator.module.scss.cjs +10 -10
  140. package/dist/components/Separator/Separator.module.scss.js +10 -10
  141. package/dist/components/Sidebar/Sidebar.module.scss.cjs +42 -42
  142. package/dist/components/Sidebar/Sidebar.module.scss.js +42 -42
  143. package/dist/components/Skeleton/Skeleton.module.scss.cjs +38 -38
  144. package/dist/components/Skeleton/Skeleton.module.scss.js +38 -38
  145. package/dist/components/Slider/Slider.module.scss.cjs +12 -12
  146. package/dist/components/Slider/Slider.module.scss.js +12 -12
  147. package/dist/components/Table/Table.module.scss.cjs +19 -19
  148. package/dist/components/Table/Table.module.scss.js +19 -19
  149. package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +15 -15
  150. package/dist/components/TableOfContents/TableOfContents.module.scss.js +15 -15
  151. package/dist/components/TableOfContents/index.cjs +22 -42
  152. package/dist/components/TableOfContents/index.d.ts +3 -3
  153. package/dist/components/TableOfContents/index.d.ts.map +1 -1
  154. package/dist/components/TableOfContents/index.js +22 -42
  155. package/dist/components/Tabs/Tabs.module.scss.cjs +12 -12
  156. package/dist/components/Tabs/Tabs.module.scss.js +12 -12
  157. package/dist/components/Text/Text.module.scss.cjs +51 -51
  158. package/dist/components/Text/Text.module.scss.js +51 -51
  159. package/dist/components/Textarea/Textarea.module.scss.cjs +23 -23
  160. package/dist/components/Textarea/Textarea.module.scss.js +23 -23
  161. package/dist/components/Theme/ThemeToggle.module.scss.cjs +6 -6
  162. package/dist/components/Theme/ThemeToggle.module.scss.js +6 -6
  163. package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.cjs +13 -13
  164. package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.js +13 -13
  165. package/dist/components/Toast/Toast.module.scss.cjs +21 -21
  166. package/dist/components/Toast/Toast.module.scss.js +21 -21
  167. package/dist/components/Toggle/Toggle.module.scss.cjs +13 -13
  168. package/dist/components/Toggle/Toggle.module.scss.js +13 -13
  169. package/dist/components/ToggleGroup/ToggleGroup.module.scss.cjs +17 -17
  170. package/dist/components/ToggleGroup/ToggleGroup.module.scss.js +17 -17
  171. package/dist/components/Tooltip/Tooltip.module.scss.cjs +3 -3
  172. package/dist/components/Tooltip/Tooltip.module.scss.js +3 -3
  173. package/dist/data-table.cjs +58 -41
  174. package/dist/data-table.js +59 -41
  175. package/dist/datepicker.cjs +32 -72
  176. package/dist/datepicker.js +32 -72
  177. package/dist/index.cjs +89 -85
  178. package/dist/index.d.ts +2 -0
  179. package/dist/index.d.ts.map +1 -1
  180. package/dist/index.js +4 -0
  181. package/fragments.json +1 -1
  182. package/package.json +9 -8
  183. package/src/assets/fragments-wordmark.tsx +47 -0
  184. package/src/components/Accordion/index.tsx +13 -3
  185. package/src/components/Alert/Alert.module.scss +15 -2
  186. package/src/components/AppShell/AppShell.module.scss +73 -15
  187. package/src/components/AppShell/index.tsx +1 -1
  188. package/src/components/Button/Button.module.scss +19 -20
  189. package/src/components/Card/Card.module.scss +3 -3
  190. package/src/components/Card/index.tsx +3 -3
  191. package/src/components/Checkbox/Checkbox.contract.json +5 -24
  192. package/src/components/Checkbox/Checkbox.module.scss +4 -2
  193. package/src/components/Chip/Chip.contract.json +11 -28
  194. package/src/components/Chip/Chip.module.scss +21 -45
  195. package/src/components/CodeBlock/CodeBlock.module.scss +2 -7
  196. package/src/components/Combobox/Combobox.contract.json +6 -24
  197. package/src/components/Combobox/Combobox.module.scss +3 -2
  198. package/src/components/Combobox/index.tsx +132 -6
  199. package/src/components/DataTable/DataTable.contract.json +16 -23
  200. package/src/components/DataTable/DataTable.module.scss +31 -8
  201. package/src/components/DataTable/index.tsx +25 -4
  202. package/src/components/DatePicker/index.tsx +32 -84
  203. package/src/components/Drawer/index.tsx +38 -12
  204. package/src/components/Field/index.tsx +35 -35
  205. package/src/components/Header/Header.contract.json +41 -1
  206. package/src/components/Header/Header.module.scss +40 -0
  207. package/src/components/Header/index.tsx +88 -2
  208. package/src/components/IconButton/IconButton.contract.json +120 -0
  209. package/src/components/Listbox/Listbox.module.scss +5 -4
  210. package/src/components/Main/Main.contract.json +79 -0
  211. package/src/components/Main/Main.module.scss +31 -0
  212. package/src/components/Main/index.tsx +124 -0
  213. package/src/components/Menu/Menu.module.scss +8 -10
  214. package/src/components/Popover/index.tsx +34 -2
  215. package/src/components/RadioGroup/RadioGroup.contract.json +13 -27
  216. package/src/components/RadioGroup/index.tsx +4 -0
  217. package/src/components/Select/Select.module.scss +13 -12
  218. package/src/components/Table/Table.module.scss +22 -5
  219. package/src/components/TableOfContents/TableOfContents.contract.json +6 -16
  220. package/src/components/TableOfContents/TableOfContents.module.scss +20 -14
  221. package/src/components/TableOfContents/index.tsx +27 -38
  222. package/src/components/Toast/Toast.module.scss +15 -2
  223. package/src/components/ToggleGroup/ToggleGroup.module.scss +4 -1
  224. package/src/index.ts +4 -0
  225. package/src/styles/globals.scss +13 -10
  226. package/src/tokens/_component-properties.scss +26 -0
  227. package/src/tokens/_computed.scss +22 -4
  228. package/src/tokens/_derive.scss +55 -6
  229. package/src/tokens/_palettes.scss +24 -0
  230. package/src/tokens/_seeds.scss +20 -12
  231. package/src/tokens/_variables.scss +110 -63
  232. package/dist/components/Cloud/DashboardLayoutPrototypes.shared.d.ts +0 -33
  233. package/dist/components/Cloud/DashboardLayoutPrototypes.shared.d.ts.map +0 -1
  234. package/dist/components/Cloud/DashboardLayoutPrototypes.shell.d.ts +0 -11
  235. package/dist/components/Cloud/DashboardLayoutPrototypes.shell.d.ts.map +0 -1
  236. package/dist/components/Cloud/PullRequestsPrototypes.content.d.ts +0 -5
  237. package/dist/components/Cloud/PullRequestsPrototypes.content.d.ts.map +0 -1
  238. package/dist/components/Cloud/PullRequestsPrototypes.detail-panels.d.ts +0 -4
  239. package/dist/components/Cloud/PullRequestsPrototypes.detail-panels.d.ts.map +0 -1
  240. package/dist/components/Cloud/PullRequestsPrototypes.detail.d.ts +0 -3
  241. package/dist/components/Cloud/PullRequestsPrototypes.detail.d.ts.map +0 -1
  242. package/dist/components/Cloud/PullRequestsPrototypes.id-data.d.ts +0 -86
  243. package/dist/components/Cloud/PullRequestsPrototypes.id-data.d.ts.map +0 -1
  244. package/dist/components/Cloud/PullRequestsPrototypes.id-page.d.ts +0 -2
  245. package/dist/components/Cloud/PullRequestsPrototypes.id-page.d.ts.map +0 -1
  246. package/src/components/Accordion/Accordion.stories.tsx +0 -106
  247. package/src/components/Alert/Alert.stories.tsx +0 -119
  248. package/src/components/AppShell/AppShell.stories.tsx +0 -156
  249. package/src/components/Avatar/Avatar.stories.tsx +0 -74
  250. package/src/components/Badge/Badge.stories.tsx +0 -92
  251. package/src/components/BentoGrid/BentoGrid.stories.tsx +0 -98
  252. package/src/components/Box/Box.stories.tsx +0 -150
  253. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -87
  254. package/src/components/Button/Button.stories.tsx +0 -103
  255. package/src/components/ButtonGroup/ButtonGroup.stories.tsx +0 -97
  256. package/src/components/Card/Card.stories.tsx +0 -144
  257. package/src/components/Chart/Chart.stories.tsx +0 -119
  258. package/src/components/Checkbox/Checkbox.stories.tsx +0 -68
  259. package/src/components/Chip/Chip.stories.tsx +0 -70
  260. package/src/components/Cloud/CloudGovernanceShell.module.scss +0 -88
  261. package/src/components/Cloud/CloudGovernanceShell.stories.tsx +0 -446
  262. package/src/components/Cloud/ControlSizing.module.scss +0 -49
  263. package/src/components/Cloud/ControlSizing.stories.tsx +0 -238
  264. package/src/components/Cloud/DashboardLayoutPrototypes.module.scss +0 -462
  265. package/src/components/Cloud/DashboardLayoutPrototypes.shared.tsx +0 -375
  266. package/src/components/Cloud/DashboardLayoutPrototypes.shell.tsx +0 -147
  267. package/src/components/Cloud/DashboardLayoutPrototypes.stories.tsx +0 -328
  268. package/src/components/Cloud/PullRequestsPrototypes.content.tsx +0 -283
  269. package/src/components/Cloud/PullRequestsPrototypes.detail-panels.tsx +0 -381
  270. package/src/components/Cloud/PullRequestsPrototypes.detail.tsx +0 -204
  271. package/src/components/Cloud/PullRequestsPrototypes.id-data.ts +0 -395
  272. package/src/components/Cloud/PullRequestsPrototypes.id-page.tsx +0 -349
  273. package/src/components/Cloud/PullRequestsPrototypes.stories.tsx +0 -81
  274. package/src/components/CodeBlock/CodeBlock.stories.tsx +0 -147
  275. package/src/components/Collapsible/Collapsible.stories.tsx +0 -94
  276. package/src/components/ColorPicker/ColorPicker.stories.tsx +0 -74
  277. package/src/components/Combobox/Combobox.stories.tsx +0 -133
  278. package/src/components/Command/Command.stories.tsx +0 -102
  279. package/src/components/ConversationList/ConversationList.stories.tsx +0 -93
  280. package/src/components/DataTable/DataTable.stories.tsx +0 -129
  281. package/src/components/DatePicker/DatePicker.stories.tsx +0 -129
  282. package/src/components/Dialog/Dialog.stories.tsx +0 -154
  283. package/src/components/Drawer/Drawer.stories.tsx +0 -144
  284. package/src/components/Editor/Editor.stories.tsx +0 -99
  285. package/src/components/EmptyState/EmptyState.stories.tsx +0 -97
  286. package/src/components/Field/Field.stories.tsx +0 -109
  287. package/src/components/Fieldset/Fieldset.stories.tsx +0 -116
  288. package/src/components/Form/Form.stories.tsx +0 -142
  289. package/src/components/Grid/Grid.stories.tsx +0 -125
  290. package/src/components/Header/Header.stories.tsx +0 -133
  291. package/src/components/Icon/Icon.stories.tsx +0 -80
  292. package/src/components/IconButton/IconButton.stories.tsx +0 -78
  293. package/src/components/Image/Image.stories.tsx +0 -109
  294. package/src/components/Input/Input.stories.tsx +0 -104
  295. package/src/components/Link/Link.stories.tsx +0 -67
  296. package/src/components/List/List.stories.tsx +0 -95
  297. package/src/components/Listbox/Listbox.stories.tsx +0 -81
  298. package/src/components/Loading/Loading.stories.tsx +0 -69
  299. package/src/components/Markdown/Markdown.stories.tsx +0 -75
  300. package/src/components/Menu/Menu.stories.tsx +0 -113
  301. package/src/components/Message/Message.stories.tsx +0 -85
  302. package/src/components/NavigationMenu/NavigationMenu.stories.tsx +0 -161
  303. package/src/components/Pagination/Pagination.stories.tsx +0 -81
  304. package/src/components/Popover/Popover.stories.tsx +0 -152
  305. package/src/components/Progress/Progress.stories.tsx +0 -64
  306. package/src/components/Prompt/Prompt.stories.tsx +0 -93
  307. package/src/components/RadioGroup/RadioGroup.stories.tsx +0 -107
  308. package/src/components/ScrollArea/ScrollArea.stories.tsx +0 -97
  309. package/src/components/Select/Select.stories.tsx +0 -127
  310. package/src/components/Separator/Separator.stories.tsx +0 -84
  311. package/src/components/Sidebar/Sidebar.stories.tsx +0 -122
  312. package/src/components/Skeleton/Skeleton.stories.tsx +0 -80
  313. package/src/components/Slider/Slider.stories.tsx +0 -73
  314. package/src/components/Stack/Stack.stories.tsx +0 -73
  315. package/src/components/Switch/Switch.stories.tsx +0 -59
  316. package/src/components/Table/Table.stories.tsx +0 -219
  317. package/src/components/TableOfContents/TableOfContents.stories.tsx +0 -120
  318. package/src/components/Tabs/Tabs.stories.tsx +0 -136
  319. package/src/components/Text/Text.stories.tsx +0 -133
  320. package/src/components/Textarea/Textarea.stories.tsx +0 -107
  321. package/src/components/Theme/Theme.stories.tsx +0 -95
  322. package/src/components/ThinkingIndicator/ThinkingIndicator.stories.tsx +0 -85
  323. package/src/components/Toast/Toast.stories.tsx +0 -91
  324. package/src/components/ToggleGroup/ToggleGroup.stories.tsx +0 -114
  325. package/src/components/Tooltip/Tooltip.stories.tsx +0 -95
  326. package/src/components/VisuallyHidden/VisuallyHidden.stories.tsx +0 -78
@@ -1,116 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Fieldset } from '.';
3
- import { Field } from '../Field';
4
- import { Input } from '../Input';
5
- import { Grid } from '../Grid';
6
-
7
- /**
8
- * Fieldset groups related form fields with an accessible legend. It is a
9
- * compound component: compose Fieldset.Legend and Fieldset.Description inside
10
- * the root, alongside the grouped Field components.
11
- */
12
- const meta = {
13
- title: 'Forms/Fieldset',
14
- component: Fieldset,
15
- tags: ['autodocs'],
16
- parameters: {
17
- docs: {
18
- description: {
19
- component:
20
- 'Groups related form fields with an accessible legend.',
21
- },
22
- },
23
- },
24
- argTypes: {
25
- disabled: {
26
- control: 'boolean',
27
- description: 'Disables all fields within the fieldset',
28
- },
29
- },
30
- args: {
31
- children: (
32
- <>
33
- <Fieldset.Legend>Personal Information</Fieldset.Legend>
34
- <Field name="firstName">
35
- <Field.Label>First Name</Field.Label>
36
- <Field.Control>
37
- <Input placeholder="Jane" />
38
- </Field.Control>
39
- </Field>
40
- </>
41
- ),
42
- },
43
- } satisfies Meta<typeof Fieldset>;
44
-
45
- export default meta;
46
-
47
- type Story = StoryObj<typeof meta>;
48
-
49
- export const TwoColumnLayout: Story = {
50
- render: () => (
51
- <Fieldset>
52
- <Fieldset.Legend>Personal Information</Fieldset.Legend>
53
- <Grid columns={2} gap="md">
54
- <Field name="firstName">
55
- <Field.Label>First Name</Field.Label>
56
- <Field.Control>
57
- <Input placeholder="Jane" />
58
- </Field.Control>
59
- </Field>
60
- <Field name="lastName">
61
- <Field.Label>Last Name</Field.Label>
62
- <Field.Control>
63
- <Input placeholder="Doe" />
64
- </Field.Control>
65
- </Field>
66
- <Grid.Item colSpan="full">
67
- <Field name="email">
68
- <Field.Label>Email</Field.Label>
69
- <Field.Control>
70
- <Input type="email" placeholder="jane@example.com" />
71
- </Field.Control>
72
- </Field>
73
- </Grid.Item>
74
- </Grid>
75
- </Fieldset>
76
- ),
77
- };
78
-
79
- export const WithDescription: Story = {
80
- render: () => (
81
- <Fieldset>
82
- <Fieldset.Legend>Account Details</Fieldset.Legend>
83
- <Fieldset.Description>
84
- Choose how others will see you on the platform.
85
- </Fieldset.Description>
86
- <Field name="displayName">
87
- <Field.Label>Display Name</Field.Label>
88
- <Field.Control>
89
- <Input placeholder="How others see you" />
90
- </Field.Control>
91
- </Field>
92
- </Fieldset>
93
- ),
94
- };
95
-
96
- export const Disabled: Story = {
97
- render: () => (
98
- <Fieldset disabled>
99
- <Fieldset.Legend>Locked Section</Fieldset.Legend>
100
- <Grid columns={2} gap="md">
101
- <Field name="lockedFirst">
102
- <Field.Label>First Name</Field.Label>
103
- <Field.Control>
104
- <Input defaultValue="Jane" />
105
- </Field.Control>
106
- </Field>
107
- <Field name="lockedLast">
108
- <Field.Label>Last Name</Field.Label>
109
- <Field.Control>
110
- <Input defaultValue="Doe" />
111
- </Field.Control>
112
- </Field>
113
- </Grid>
114
- </Fieldset>
115
- ),
116
- };
@@ -1,142 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Form } from '.';
3
- import { Field } from '../Field';
4
- import { Input } from '../Input';
5
- import { Grid } from '../Grid';
6
- import { Button } from '../Button';
7
-
8
- /**
9
- * Form is a wrapper that handles server-side error distribution to Field
10
- * components by field name. It pairs with Field and Fieldset for complete form
11
- * validation, and renders a semantic form element.
12
- */
13
- const meta = {
14
- title: 'Forms/Form',
15
- component: Form,
16
- tags: ['autodocs'],
17
- parameters: {
18
- docs: {
19
- description: {
20
- component:
21
- 'Form wrapper that distributes server-side errors to Field components.',
22
- },
23
- },
24
- },
25
- argTypes: {
26
- validationMode: {
27
- control: 'select',
28
- options: ['onSubmit', 'onBlur', 'onChange'],
29
- description: 'When field validation should run',
30
- },
31
- },
32
- args: {
33
- children: (
34
- <Grid columns={1} gap="md">
35
- <Field name="email">
36
- <Field.Label>Email</Field.Label>
37
- <Field.Control>
38
- <Input type="email" placeholder="jane@example.com" />
39
- </Field.Control>
40
- </Field>
41
- <Button type="submit" variant="primary">
42
- Submit
43
- </Button>
44
- </Grid>
45
- ),
46
- },
47
- } satisfies Meta<typeof Form>;
48
-
49
- export default meta;
50
-
51
- type Story = StoryObj<typeof meta>;
52
-
53
- export const SignUp: Story = {
54
- render: () => (
55
- <Form onSubmit={(e) => e.preventDefault()}>
56
- <Grid columns={2} gap="md">
57
- <Field name="firstName">
58
- <Field.Label>First Name</Field.Label>
59
- <Field.Control>
60
- <Input placeholder="Jane" />
61
- </Field.Control>
62
- </Field>
63
- <Field name="lastName">
64
- <Field.Label>Last Name</Field.Label>
65
- <Field.Control>
66
- <Input placeholder="Doe" />
67
- </Field.Control>
68
- </Field>
69
- <Grid.Item colSpan="full">
70
- <Field name="email">
71
- <Field.Label>Email</Field.Label>
72
- <Field.Control>
73
- <Input type="email" placeholder="jane@example.com" />
74
- </Field.Control>
75
- <Field.Error match="typeMismatch">
76
- Enter a valid email address
77
- </Field.Error>
78
- </Field>
79
- </Grid.Item>
80
- <Grid.Item colSpan="full">
81
- <Button type="submit" variant="primary">
82
- Create Account
83
- </Button>
84
- </Grid.Item>
85
- </Grid>
86
- </Form>
87
- ),
88
- };
89
-
90
- export const WithServerErrors: Story = {
91
- render: () => (
92
- <Form
93
- errors={{
94
- username: 'Username is already taken',
95
- email: 'Email is already registered',
96
- }}
97
- >
98
- <Grid columns={2} gap="md">
99
- <Field name="username">
100
- <Field.Label>Username</Field.Label>
101
- <Field.Control>
102
- <Input defaultValue="janedoe" />
103
- </Field.Control>
104
- <Field.Error match="customError" />
105
- </Field>
106
- <Field name="email">
107
- <Field.Label>Email</Field.Label>
108
- <Field.Control>
109
- <Input type="email" defaultValue="jane@example.com" />
110
- </Field.Control>
111
- <Field.Error match="customError" />
112
- </Field>
113
- <Grid.Item colSpan="full">
114
- <Button type="submit" variant="primary">
115
- Submit
116
- </Button>
117
- </Grid.Item>
118
- </Grid>
119
- </Form>
120
- ),
121
- };
122
-
123
- export const ValidateOnBlur: Story = {
124
- render: () => (
125
- <Form validationMode="onBlur" onSubmit={(e) => e.preventDefault()}>
126
- <Grid columns={1} gap="md">
127
- <Field name="email">
128
- <Field.Label>Email</Field.Label>
129
- <Field.Control>
130
- <Input type="email" placeholder="you@example.com" />
131
- </Field.Control>
132
- <Field.Error match="typeMismatch">
133
- Enter a valid email address
134
- </Field.Error>
135
- </Field>
136
- <Button type="submit" variant="primary">
137
- Submit
138
- </Button>
139
- </Grid>
140
- </Form>
141
- ),
142
- };
@@ -1,125 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import type { CSSProperties } from 'react';
3
- import { Grid } from '.';
4
-
5
- /**
6
- * Grid is a responsive CSS Grid layout for arranging items in columns with
7
- * consistent spacing. Columns accept a fixed number (1-12), a responsive
8
- * object, or "auto" for auto-fill. Use Grid.Item with colSpan for asymmetric
9
- * layouts.
10
- */
11
- const cell: CSSProperties = {
12
- padding: 'var(--fui-space-2, 0.5rem)',
13
- background: 'var(--fui-bg-secondary, #f4f4f5)',
14
- borderRadius: 'var(--fui-radius-sm, 4px)',
15
- };
16
-
17
- const meta = {
18
- title: 'Layout/Grid',
19
- component: Grid,
20
- tags: ['autodocs', 'canonical'],
21
- parameters: {
22
- docs: {
23
- description: {
24
- component:
25
- 'Responsive grid layout for arranging items in columns with consistent spacing.',
26
- },
27
- },
28
- },
29
- argTypes: {
30
- gap: {
31
- control: 'select',
32
- options: ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
33
- description: 'Gap between grid items',
34
- },
35
- alignItems: {
36
- control: 'select',
37
- options: ['start', 'center', 'end', 'stretch'],
38
- description: 'Vertical alignment of items within their cells',
39
- },
40
- justifyItems: {
41
- control: 'select',
42
- options: ['start', 'center', 'end', 'stretch'],
43
- description: 'Horizontal alignment of items within their cells',
44
- },
45
- padding: {
46
- control: 'select',
47
- options: ['none', 'sm', 'md', 'lg'],
48
- description: 'Internal padding of the grid container',
49
- },
50
- },
51
- args: {
52
- columns: 3,
53
- gap: 'md',
54
- children: (
55
- <>
56
- <div style={cell}>Item 1</div>
57
- <div style={cell}>Item 2</div>
58
- <div style={cell}>Item 3</div>
59
- </>
60
- ),
61
- },
62
- } satisfies Meta<typeof Grid>;
63
-
64
- export default meta;
65
-
66
- type Story = StoryObj<typeof meta>;
67
-
68
- export const Default: Story = {
69
- args: {
70
- columns: 3,
71
- gap: 'md',
72
- children: (
73
- <>
74
- <div style={cell}>Item 1</div>
75
- <div style={cell}>Item 2</div>
76
- <div style={cell}>Item 3</div>
77
- </>
78
- ),
79
- },
80
- };
81
-
82
- export const Responsive: Story = {
83
- args: {
84
- columns: { base: 1, md: 2, lg: 3 },
85
- gap: 'md',
86
- children: (
87
- <>
88
- <div style={cell}>Card 1</div>
89
- <div style={cell}>Card 2</div>
90
- <div style={cell}>Card 3</div>
91
- </>
92
- ),
93
- },
94
- };
95
-
96
- export const AutoFill: Story = {
97
- args: {
98
- columns: 'auto',
99
- minChildWidth: '12rem',
100
- gap: 'md',
101
- children: (
102
- <>
103
- <div style={cell}>Card 1</div>
104
- <div style={cell}>Card 2</div>
105
- <div style={cell}>Card 3</div>
106
- <div style={cell}>Card 4</div>
107
- </>
108
- ),
109
- },
110
- };
111
-
112
- export const WithSpanning: Story = {
113
- render: () => (
114
- <Grid columns={4} gap="md">
115
- <Grid.Item colSpan={2}>
116
- <div style={cell}>Spans 2 cols</div>
117
- </Grid.Item>
118
- <div style={cell}>1 col</div>
119
- <div style={cell}>1 col</div>
120
- <Grid.Item colSpan="full">
121
- <div style={cell}>Full width</div>
122
- </Grid.Item>
123
- </Grid>
124
- ),
125
- };
@@ -1,133 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Header } from '.';
3
- import { Button } from '../Button';
4
-
5
- /**
6
- * Header is a composable header with slots for brand, navigation, search, and
7
- * actions. It is a compound component: compose Header.Brand, Header.Nav,
8
- * Header.NavItem, Header.Spacer, and Header.Actions inside the root. Designed
9
- * for use within AppShell with responsive mobile support.
10
- */
11
- const meta = {
12
- title: 'Navigation/Header',
13
- component: Header,
14
- tags: ['autodocs'],
15
- parameters: {
16
- docs: {
17
- description: {
18
- component:
19
- 'Composable header with slots for brand, navigation, search, and actions.',
20
- },
21
- },
22
- },
23
- argTypes: {
24
- position: {
25
- control: 'select',
26
- options: ['static', 'fixed', 'sticky'],
27
- description: 'Position behavior (usually controlled by AppShell)',
28
- },
29
- },
30
- args: {
31
- position: 'static',
32
- children: (
33
- <>
34
- <Header.Brand href="/">MyApp</Header.Brand>
35
- <Header.Nav>
36
- <Header.NavItem href="/dashboard" active>
37
- Dashboard
38
- </Header.NavItem>
39
- <Header.NavItem href="/projects">Projects</Header.NavItem>
40
- </Header.Nav>
41
- <Header.Spacer />
42
- <Header.Actions>
43
- <Button variant="secondary" size="sm">
44
- Sign In
45
- </Button>
46
- </Header.Actions>
47
- </>
48
- ),
49
- },
50
- } satisfies Meta<typeof Header>;
51
-
52
- export default meta;
53
-
54
- type Story = StoryObj<typeof meta>;
55
-
56
- export const Default: Story = {
57
- render: () => (
58
- <Header>
59
- <Header.SkipLink />
60
- <Header.Brand href="/">MyApp</Header.Brand>
61
- <Header.Nav>
62
- <Header.NavItem href="/dashboard" active>
63
- Dashboard
64
- </Header.NavItem>
65
- <Header.NavItem href="/projects">Projects</Header.NavItem>
66
- <Header.NavItem href="/settings">Settings</Header.NavItem>
67
- </Header.Nav>
68
- <Header.Spacer />
69
- <Header.Actions>
70
- <Button variant="secondary" size="sm">
71
- Sign In
72
- </Button>
73
- </Header.Actions>
74
- </Header>
75
- ),
76
- };
77
-
78
- export const WithDropdownNav: Story = {
79
- render: () => (
80
- <Header>
81
- <Header.Brand href="/">MyApp</Header.Brand>
82
- <Header.Nav>
83
- <Header.NavItem href="/components" active>
84
- Components
85
- </Header.NavItem>
86
- <Header.NavItem href="/blocks">Blocks</Header.NavItem>
87
- <Header.NavMenu label="Docs">
88
- <Header.NavMenuItem href="/getting-started">
89
- Getting Started
90
- </Header.NavMenuItem>
91
- <Header.NavMenuItem href="/cli">CLI Reference</Header.NavMenuItem>
92
- <Header.NavMenuItem href="/mcp">MCP Tools</Header.NavMenuItem>
93
- </Header.NavMenu>
94
- <Header.NavItem href="/blog">Blog</Header.NavItem>
95
- </Header.Nav>
96
- <Header.Spacer />
97
- <Header.Actions>
98
- <Button variant="primary" size="sm">
99
- Sign Up
100
- </Button>
101
- </Header.Actions>
102
- </Header>
103
- ),
104
- };
105
-
106
- export const Minimal: Story = {
107
- render: () => (
108
- <Header>
109
- <Header.Brand href="/">MyApp</Header.Brand>
110
- <Header.Spacer />
111
- <Header.Actions>
112
- <Button variant="secondary" size="sm">
113
- Account
114
- </Button>
115
- </Header.Actions>
116
- </Header>
117
- ),
118
- };
119
-
120
- export const Sticky: Story = {
121
- render: () => (
122
- <Header position="sticky">
123
- <Header.Brand href="/">MyApp</Header.Brand>
124
- <Header.Nav>
125
- <Header.NavItem href="/" active>
126
- Home
127
- </Header.NavItem>
128
- <Header.NavItem href="/about">About</Header.NavItem>
129
- </Header.Nav>
130
- <Header.Spacer />
131
- </Header>
132
- ),
133
- };
@@ -1,80 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Heart, Star, Check, Warning, Info } from '@phosphor-icons/react';
3
- import { Icon } from '.';
4
-
5
- /**
6
- * Icon is a wrapper for icon components with consistent sizing and semantic
7
- * colors. Pass any icon component (Phosphor, Lucide, etc.) via the required
8
- * `icon` prop. Icons are decorative by default and should be paired with text
9
- * for meaning.
10
- */
11
- const meta = {
12
- title: 'Display/Icon',
13
- component: Icon,
14
- tags: ['autodocs', 'canonical'],
15
- parameters: {
16
- docs: {
17
- description: {
18
- component:
19
- 'Wrapper for icon components with consistent sizing and semantic colors.',
20
- },
21
- },
22
- },
23
- argTypes: {
24
- size: {
25
- control: 'select',
26
- options: ['xs', 'sm', 'md', 'lg', 'xl'],
27
- description: 'Icon size',
28
- },
29
- weight: {
30
- control: 'select',
31
- options: ['thin', 'light', 'regular', 'bold', 'fill', 'duotone'],
32
- description: 'Optional icon style/weight hint',
33
- },
34
- variant: {
35
- control: 'select',
36
- options: [
37
- 'default',
38
- 'primary',
39
- 'secondary',
40
- 'tertiary',
41
- 'accent',
42
- 'success',
43
- 'warning',
44
- 'error',
45
- ],
46
- description: 'Semantic color variant',
47
- },
48
- },
49
- args: {
50
- icon: Heart,
51
- size: 'md',
52
- weight: 'regular',
53
- variant: 'default',
54
- },
55
- } satisfies Meta<typeof Icon>;
56
-
57
- export default meta;
58
-
59
- type Story = StoryObj<typeof meta>;
60
-
61
- export const Default: Story = {
62
- args: { icon: Heart },
63
- };
64
-
65
- export const Large: Story = {
66
- args: { icon: Star, size: 'xl' },
67
- };
68
-
69
- export const Success: Story = {
70
- args: { icon: Check, variant: 'success' },
71
- };
72
-
73
- export const Warning_: Story = {
74
- name: 'Warning',
75
- args: { icon: Warning, variant: 'warning' },
76
- };
77
-
78
- export const Accent: Story = {
79
- args: { icon: Info, variant: 'accent', weight: 'fill' },
80
- };
@@ -1,78 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Gear, Trash, Plus, DotsThree } from '@phosphor-icons/react';
3
- import { IconButton } from '.';
4
-
5
- /**
6
- * IconButton is a compact square button for icon-only affordances such as
7
- * topbar actions, row controls, and workspace rails. Icon-only buttons need an
8
- * accessible name, so always provide an aria-label describing the action.
9
- */
10
- const meta = {
11
- title: 'Components/IconButton',
12
- component: IconButton,
13
- tags: ['autodocs', 'canonical'],
14
- parameters: {
15
- docs: {
16
- description: {
17
- component:
18
- 'Compact square button for icon-only affordances in dense chrome.',
19
- },
20
- },
21
- },
22
- argTypes: {
23
- variant: {
24
- control: 'select',
25
- options: ['ghost', 'subtle', 'outlined'],
26
- description: 'Visual style variant',
27
- },
28
- size: {
29
- control: 'select',
30
- options: ['sm', 'md', 'lg'],
31
- description: 'Button size',
32
- },
33
- pressed: {
34
- control: 'boolean',
35
- description: 'Mark as pressed for toggle-style affordances',
36
- },
37
- },
38
- args: {
39
- variant: 'ghost',
40
- size: 'md',
41
- 'aria-label': 'Settings',
42
- children: <Gear />,
43
- },
44
- } satisfies Meta<typeof IconButton>;
45
-
46
- export default meta;
47
-
48
- type Story = StoryObj<typeof meta>;
49
-
50
- export const Ghost: Story = {
51
- args: { variant: 'ghost', 'aria-label': 'More options', children: <DotsThree /> },
52
- };
53
-
54
- export const Subtle: Story = {
55
- args: { variant: 'subtle', 'aria-label': 'Add item', children: <Plus /> },
56
- };
57
-
58
- export const Outlined: Story = {
59
- args: { variant: 'outlined', 'aria-label': 'Settings', children: <Gear /> },
60
- };
61
-
62
- export const Pressed: Story = {
63
- args: {
64
- variant: 'subtle',
65
- pressed: true,
66
- 'aria-label': 'Toggle setting',
67
- children: <Gear />,
68
- },
69
- };
70
-
71
- export const Destructive: Story = {
72
- args: {
73
- variant: 'outlined',
74
- size: 'lg',
75
- 'aria-label': 'Delete',
76
- children: <Trash />,
77
- },
78
- };