@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,109 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Image } from '.';
3
-
4
- /**
5
- * Image is a responsive image component with aspect-ratio control, loading
6
- * states, and error fallbacks. The src and alt props are required; alt must
7
- * describe the image content for accessibility.
8
- */
9
- const SAMPLE_SRC =
10
- 'https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=400&h=300&fit=crop';
11
-
12
- const meta = {
13
- title: 'Display/Image',
14
- component: Image,
15
- tags: ['autodocs', 'canonical'],
16
- parameters: {
17
- docs: {
18
- description: {
19
- component:
20
- 'Responsive image with aspect-ratio control, loading states, and error fallbacks.',
21
- },
22
- },
23
- },
24
- argTypes: {
25
- aspectRatio: {
26
- control: 'select',
27
- options: ['1:1', '4:3', '16:9', '21:9', 'auto'],
28
- description: 'Aspect ratio of the image container',
29
- },
30
- objectFit: {
31
- control: 'select',
32
- options: ['cover', 'contain', 'fill', 'none'],
33
- description: 'How the image fits within its container',
34
- },
35
- rounded: {
36
- control: 'select',
37
- options: ['none', 'sm', 'md', 'lg', 'full'],
38
- description: 'Border radius',
39
- },
40
- },
41
- args: {
42
- src: SAMPLE_SRC,
43
- alt: 'Code on a screen',
44
- width: 300,
45
- },
46
- } satisfies Meta<typeof Image>;
47
-
48
- export default meta;
49
-
50
- type Story = StoryObj<typeof meta>;
51
-
52
- export const Default: Story = {
53
- args: { src: SAMPLE_SRC, alt: 'Code on a screen', width: 300 },
54
- };
55
-
56
- export const Square: Story = {
57
- args: {
58
- src: SAMPLE_SRC,
59
- alt: 'Square crop',
60
- aspectRatio: '1:1',
61
- width: 200,
62
- },
63
- };
64
-
65
- export const Widescreen: Story = {
66
- args: {
67
- src: SAMPLE_SRC,
68
- alt: 'Widescreen crop',
69
- aspectRatio: '16:9',
70
- width: 320,
71
- rounded: 'md',
72
- },
73
- };
74
-
75
- export const Rounded: Story = {
76
- args: {
77
- src: SAMPLE_SRC,
78
- alt: 'Rounded image',
79
- aspectRatio: '1:1',
80
- rounded: 'full',
81
- width: 120,
82
- height: 120,
83
- },
84
- };
85
-
86
- export const WithFallback: Story = {
87
- args: {
88
- src: 'https://invalid-url.example/image.jpg',
89
- alt: 'Image that will fail to load',
90
- width: 200,
91
- height: 150,
92
- rounded: 'md',
93
- fallback: (
94
- <div
95
- style={{
96
- display: 'flex',
97
- alignItems: 'center',
98
- justifyContent: 'center',
99
- height: '100%',
100
- background: 'var(--fui-color-surface-secondary, #f4f4f5)',
101
- }}
102
- >
103
- <span style={{ color: 'var(--fui-color-text-tertiary, #71717a)' }}>
104
- No image
105
- </span>
106
- </div>
107
- ),
108
- },
109
- };
@@ -1,104 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { MagnifyingGlass } from "@phosphor-icons/react";
3
- import { Input } from ".";
4
-
5
- /**
6
- * Single-line text input with built-in label, helper text, and validation states.
7
- * Supports controlled/uncontrolled values, adornments, and a keyboard shortcut hint.
8
- */
9
- const meta = {
10
- title: "Forms/Input",
11
- component: Input,
12
- tags: ["autodocs", "canonical"],
13
- parameters: {
14
- docs: {
15
- description: {
16
- component: "Text input field for single-line user data entry.",
17
- },
18
- },
19
- },
20
- argTypes: {
21
- type: {
22
- control: "select",
23
- options: ["number", "text", "email", "password", "tel", "url"],
24
- description: "HTML input type for validation and keyboard",
25
- },
26
- size: {
27
- control: "select",
28
- options: ["sm", "md", "lg"],
29
- description: "Size variant",
30
- },
31
- shortcutBehavior: {
32
- control: "select",
33
- options: ["display-only", "focus-input"],
34
- description: "Whether the shortcut hint is visual only or registers a hotkey",
35
- },
36
- disabled: { control: "boolean" },
37
- error: { control: "boolean" },
38
- success: { control: "boolean" },
39
- required: { control: "boolean" },
40
- withFieldWrapper: { control: "boolean" },
41
- },
42
- args: {
43
- label: "Name",
44
- placeholder: "Enter your name",
45
- type: "text",
46
- size: "md",
47
- },
48
- } satisfies Meta<typeof Input>;
49
-
50
- export default meta;
51
-
52
- type Story = StoryObj<typeof meta>;
53
-
54
- export const Default: Story = {
55
- args: { label: "Name", placeholder: "Enter your name" },
56
- };
57
-
58
- export const Email: Story = {
59
- args: { label: "Email", type: "email", placeholder: "user@example.com" },
60
- };
61
-
62
- export const WithHelper: Story = {
63
- args: {
64
- label: "Password",
65
- type: "password",
66
- placeholder: "Create a password",
67
- helperText: "Must be at least 8 characters",
68
- },
69
- };
70
-
71
- export const ErrorState: Story = {
72
- args: {
73
- label: "Email",
74
- type: "email",
75
- value: "invalid-email",
76
- error: true,
77
- helperText: "Please enter a valid email address",
78
- },
79
- };
80
-
81
- export const Disabled: Story = {
82
- args: { label: "Username", value: "readonly-user", disabled: true },
83
- };
84
-
85
- export const Required: Story = {
86
- args: {
87
- label: "Email",
88
- type: "email",
89
- placeholder: "user@example.com",
90
- required: true,
91
- },
92
- };
93
-
94
- export const SearchWithShortcut: Story = {
95
- args: {
96
- "aria-label": "Search findings",
97
- placeholder: "Search findings...",
98
- shortcut: "⌘K",
99
- shortcutBehavior: "focus-input",
100
- startAdornment: <MagnifyingGlass aria-hidden="true" />,
101
- withFieldWrapper: false,
102
- rootProps: { style: { maxWidth: 420 } },
103
- },
104
- };
@@ -1,67 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Link } from '.';
3
-
4
- /**
5
- * Styled anchor element for navigation. Supports internal and external links
6
- * with consistent visual treatment, variants, and underline behaviors.
7
- */
8
- const meta = {
9
- title: 'Navigation/Link',
10
- component: Link,
11
- tags: ['autodocs', 'canonical'],
12
- parameters: {
13
- docs: {
14
- description: {
15
- component: 'Styled anchor element for internal and external navigation.',
16
- },
17
- },
18
- },
19
- argTypes: {
20
- variant: {
21
- control: 'select',
22
- options: ['default', 'subtle', 'muted'],
23
- description: 'Visual style variant',
24
- },
25
- underline: {
26
- control: 'select',
27
- options: ['always', 'hover', 'none'],
28
- description: 'Underline behavior',
29
- },
30
- external: { control: 'boolean' },
31
- asChild: { control: 'boolean' },
32
- },
33
- args: {
34
- href: '#',
35
- variant: 'default',
36
- underline: 'hover',
37
- children: 'Learn more about our services',
38
- },
39
- } satisfies Meta<typeof Link>;
40
-
41
- export default meta;
42
-
43
- type Story = StoryObj<typeof meta>;
44
-
45
- export const Default: Story = {
46
- args: { href: '#', children: 'Learn more about our services' },
47
- };
48
-
49
- export const Subtle: Story = {
50
- args: { href: '#', variant: 'subtle', children: 'Secondary link' },
51
- };
52
-
53
- export const Muted: Story = {
54
- args: { href: '#', variant: 'muted', children: 'Muted link' },
55
- };
56
-
57
- export const AlwaysUnderlined: Story = {
58
- args: { href: '#', underline: 'always', children: 'Always underlined' },
59
- };
60
-
61
- export const External: Story = {
62
- args: {
63
- href: 'https://example.com',
64
- external: true,
65
- children: 'View documentation',
66
- },
67
- };
@@ -1,95 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { List } from '.';
3
-
4
- /**
5
- * Compound component for ordered or unordered lists with consistent styling.
6
- * Compose with `List.Item`. Supports bullet, numbered, icon, and unstyled variants.
7
- */
8
- const meta = {
9
- title: 'Display/List',
10
- component: List,
11
- tags: ['autodocs', 'canonical'],
12
- parameters: {
13
- docs: {
14
- description: {
15
- component: 'Renders ordered or unordered lists with consistent styling.',
16
- },
17
- },
18
- },
19
- argTypes: {
20
- as: {
21
- control: 'select',
22
- options: ['ul', 'ol'],
23
- description: 'Underlying list element',
24
- },
25
- variant: {
26
- control: 'select',
27
- options: ['none', 'disc', 'decimal', 'icon'],
28
- description: 'List style variant',
29
- },
30
- gap: {
31
- control: 'select',
32
- options: ['none', 'xs', 'sm', 'md', 'lg'],
33
- description: 'Spacing between items',
34
- },
35
- },
36
- args: {
37
- variant: 'disc',
38
- gap: 'sm',
39
- children: (
40
- <>
41
- <List.Item>First item</List.Item>
42
- <List.Item>Second item</List.Item>
43
- <List.Item>Third item</List.Item>
44
- </>
45
- ),
46
- },
47
- } satisfies Meta<typeof List>;
48
-
49
- export default meta;
50
-
51
- type Story = StoryObj<typeof meta>;
52
-
53
- export const Bullet: Story = {
54
- args: { variant: 'disc' },
55
- render: (args) => (
56
- <List {...args}>
57
- <List.Item>First item</List.Item>
58
- <List.Item>Second item</List.Item>
59
- <List.Item>Third item</List.Item>
60
- </List>
61
- ),
62
- };
63
-
64
- export const Numbered: Story = {
65
- args: { as: 'ol', variant: 'decimal' },
66
- render: (args) => (
67
- <List {...args}>
68
- <List.Item>Create your account</List.Item>
69
- <List.Item>Configure your settings</List.Item>
70
- <List.Item>Start building</List.Item>
71
- </List>
72
- ),
73
- };
74
-
75
- export const IconList: Story = {
76
- args: { variant: 'icon' },
77
- render: (args) => (
78
- <List {...args}>
79
- <List.Item icon={<span aria-hidden>✓</span>}>Unlimited projects</List.Item>
80
- <List.Item icon={<span aria-hidden>✓</span>}>Priority support</List.Item>
81
- <List.Item icon={<span aria-hidden>✓</span>}>Advanced analytics</List.Item>
82
- </List>
83
- ),
84
- };
85
-
86
- export const Unstyled: Story = {
87
- args: { variant: 'none', gap: 'md' },
88
- render: (args) => (
89
- <List {...args}>
90
- <List.Item>Dashboard</List.Item>
91
- <List.Item>Settings</List.Item>
92
- <List.Item>Profile</List.Item>
93
- </List>
94
- ),
95
- };
@@ -1,81 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Listbox } from '.';
3
-
4
- /**
5
- * Controlled listbox for search results, autocomplete dropdowns, and command menus.
6
- * Compose with `Listbox.Item`, `Listbox.Group`, and `Listbox.Empty`; provides
7
- * arrow/home/end keyboard navigation when focused.
8
- */
9
- const meta = {
10
- title: 'Forms/Listbox',
11
- component: Listbox,
12
- tags: ['autodocs'],
13
- parameters: {
14
- docs: {
15
- description: {
16
- component:
17
- 'Controlled option list for search results, autocomplete, and command menus.',
18
- },
19
- },
20
- },
21
- args: {
22
- 'aria-label': 'Options',
23
- children: (
24
- <>
25
- <Listbox.Item selected>First option</Listbox.Item>
26
- <Listbox.Item>Second option</Listbox.Item>
27
- <Listbox.Item>Third option</Listbox.Item>
28
- </>
29
- ),
30
- },
31
- } satisfies Meta<typeof Listbox>;
32
-
33
- export default meta;
34
-
35
- type Story = StoryObj<typeof meta>;
36
-
37
- export const Default: Story = {
38
- render: (args) => (
39
- <Listbox {...args}>
40
- <Listbox.Item selected>First option</Listbox.Item>
41
- <Listbox.Item>Second option</Listbox.Item>
42
- <Listbox.Item>Third option</Listbox.Item>
43
- </Listbox>
44
- ),
45
- };
46
-
47
- export const WithGroups: Story = {
48
- args: { 'aria-label': 'Commands' },
49
- render: (args) => (
50
- <Listbox {...args}>
51
- <Listbox.Group label="Recent">
52
- <Listbox.Item selected>Open file...</Listbox.Item>
53
- <Listbox.Item>Save as...</Listbox.Item>
54
- </Listbox.Group>
55
- <Listbox.Group label="Actions">
56
- <Listbox.Item>Copy</Listbox.Item>
57
- <Listbox.Item>Paste</Listbox.Item>
58
- <Listbox.Item disabled>Cut</Listbox.Item>
59
- </Listbox.Group>
60
- </Listbox>
61
- ),
62
- };
63
-
64
- export const WithDisabledItems: Story = {
65
- render: (args) => (
66
- <Listbox {...args}>
67
- <Listbox.Item>Available option</Listbox.Item>
68
- <Listbox.Item disabled>Disabled option</Listbox.Item>
69
- <Listbox.Item>Another option</Listbox.Item>
70
- </Listbox>
71
- ),
72
- };
73
-
74
- export const EmptyState: Story = {
75
- args: { 'aria-label': 'Search results' },
76
- render: (args) => (
77
- <Listbox {...args}>
78
- <Listbox.Empty>No results found</Listbox.Empty>
79
- </Listbox>
80
- ),
81
- };
@@ -1,69 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Loading } from '.';
3
-
4
- /**
5
- * Loading indicator for showing progress or waiting states. Offers spinner,
6
- * dots, and pulse variants plus `Loading.Inline` and `Loading.Screen` helpers.
7
- */
8
- const meta = {
9
- title: 'Feedback/Loading',
10
- component: Loading,
11
- tags: ['autodocs'],
12
- parameters: {
13
- docs: {
14
- description: {
15
- component: 'Versatile loading indicator with spinner, dots, and pulse variants.',
16
- },
17
- },
18
- },
19
- argTypes: {
20
- size: {
21
- control: 'select',
22
- options: ['sm', 'md', 'lg', 'xl'],
23
- description: 'Size of the loading indicator',
24
- },
25
- variant: {
26
- control: 'select',
27
- options: ['spinner', 'dots', 'pulse'],
28
- description: 'Visual style of the loading animation',
29
- },
30
- color: {
31
- control: 'select',
32
- options: ['accent', 'current', 'muted'],
33
- description: 'Color variant',
34
- },
35
- centered: { control: 'boolean' },
36
- fill: { control: 'boolean' },
37
- overlay: { control: 'boolean' },
38
- },
39
- args: {
40
- size: 'md',
41
- variant: 'spinner',
42
- color: 'accent',
43
- label: 'Loading...',
44
- },
45
- } satisfies Meta<typeof Loading>;
46
-
47
- export default meta;
48
-
49
- type Story = StoryObj<typeof meta>;
50
-
51
- export const Spinner: Story = {
52
- args: { variant: 'spinner' },
53
- };
54
-
55
- export const Dots: Story = {
56
- args: { variant: 'dots' },
57
- };
58
-
59
- export const Pulse: Story = {
60
- args: { variant: 'pulse' },
61
- };
62
-
63
- export const Large: Story = {
64
- args: { variant: 'spinner', size: 'xl' },
65
- };
66
-
67
- export const Muted: Story = {
68
- args: { variant: 'spinner', color: 'muted' },
69
- };
@@ -1,75 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Markdown } from '.';
3
-
4
- /**
5
- * Renders markdown strings as styled prose via react-markdown and remark-gfm.
6
- * Supports headings, lists, tables, code blocks, blockquotes, and task lists.
7
- */
8
- const meta = {
9
- title: 'Display/Markdown',
10
- component: Markdown,
11
- tags: ['autodocs'],
12
- parameters: {
13
- docs: {
14
- description: {
15
- component: 'Renders a markdown string as styled prose.',
16
- },
17
- },
18
- },
19
- args: {
20
- content: [
21
- '# Hello World',
22
- '',
23
- 'This is a paragraph with **bold text** and *italic text*.',
24
- '',
25
- 'Here is some `inline code` within a sentence.',
26
- '',
27
- '- First item',
28
- '- Second item',
29
- '- Third item',
30
- '',
31
- '> A blockquote for emphasis.',
32
- ].join('\n'),
33
- },
34
- } satisfies Meta<typeof Markdown>;
35
-
36
- export default meta;
37
-
38
- type Story = StoryObj<typeof meta>;
39
-
40
- export const Default: Story = {};
41
-
42
- export const Table: Story = {
43
- args: {
44
- content: [
45
- '## Data Overview',
46
- '',
47
- '| Feature | Status | Priority |',
48
- '|------------|-----------|----------|',
49
- '| Markdown | Done | High |',
50
- '| Tables | Done | Medium |',
51
- '| Task Lists | Planned | Low |',
52
- '',
53
- 'Notes:',
54
- '- [x] Support GFM tables',
55
- '- [x] Support task lists',
56
- '- [ ] Syntax highlighting',
57
- ].join('\n'),
58
- },
59
- };
60
-
61
- export const CodeBlock: Story = {
62
- args: {
63
- content: [
64
- '## Code Example',
65
- '',
66
- 'Here is a JavaScript function:',
67
- '',
68
- '```js',
69
- 'function greet(name) {',
70
- ' return `Hello, ${name}!`;',
71
- '}',
72
- '```',
73
- ].join('\n'),
74
- },
75
- };