@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,349 +0,0 @@
1
- import { CheckCircle, GithubLogo, Palette, Warning, XCircle } from "@phosphor-icons/react";
2
- import { Badge } from "../Badge";
3
- import { Box } from "../Box";
4
- import { Button } from "../Button";
5
- import { Stack } from "../Stack";
6
- import { Text } from "../Text";
7
- import {
8
- githubChecks,
9
- githubComments,
10
- impactAreas,
11
- prIdPagePullRequest as pr,
12
- type GithubCheck,
13
- type GithubComment,
14
- } from "./PullRequestsPrototypes.id-data";
15
- import styles from "./DashboardLayoutPrototypes.module.scss";
16
-
17
- export function PullRequestIdPage() {
18
- return (
19
- <Stack gap="md">
20
- <PullRequestHeader />
21
- <PullRequestTabs />
22
- <Box className={styles.prIdGithubLayout}>
23
- <ConversationTimeline />
24
- <PullRequestSidebar />
25
- </Box>
26
- </Stack>
27
- );
28
- }
29
-
30
- function PullRequestHeader() {
31
- const delta = pr.coverageAfter - pr.coverageBefore;
32
-
33
- return (
34
- <Stack gap="sm" className={styles.prIdHeader}>
35
- <Stack direction="row" justify="between" align="start" gap="md" wrap>
36
- <Stack gap="xs" className={styles.minWidthZero}>
37
- <Stack direction="row" gap="sm" align="center" wrap>
38
- <Badge variant="error" size="sm" icon={<XCircle size={13} weight="fill" />}>
39
- Blocked
40
- </Badge>
41
- <Text size="xs" color="tertiary">
42
- #{pr.number} opened by {pr.author} · {pr.branch}
43
- </Text>
44
- </Stack>
45
- <Text as="h2" size="xl" weight="semibold">
46
- {pr.title}
47
- </Text>
48
- </Stack>
49
- <Stack direction="row" gap="sm" align="center" wrap>
50
- <Button variant="primary" size="sm">
51
- <Palette size={14} />
52
- Mark design reviewed
53
- </Button>
54
- <Button
55
- as="a"
56
- href="https://github.com/fragments-sdk/fragments/pull/248"
57
- target="_blank"
58
- rel="noopener noreferrer"
59
- variant="outlined"
60
- size="sm"
61
- >
62
- <GithubLogo size={14} weight="fill" />
63
- GitHub
64
- </Button>
65
- </Stack>
66
- </Stack>
67
- <Text size="sm" color="secondary">
68
- Marketing contract coverage {pr.coverageBefore}% {"->"} {pr.coverageAfter}% ({delta}{" "}
69
- points). The build is green, but Fragments is blocking merge until the design-system
70
- comments are resolved.
71
- </Text>
72
- </Stack>
73
- );
74
- }
75
-
76
- function PullRequestTabs() {
77
- return (
78
- <Box className={styles.prIdTabs} role="navigation" aria-label="Pull request views">
79
- {[
80
- ["Conversation", String(pr.comments)],
81
- ["Checks", String(githubChecks.length)],
82
- ["Files changed", "6"],
83
- ["Fragments", "11"],
84
- ].map(([label, count], index) => (
85
- <span key={label} data-active={index === 0}>
86
- {label} <strong>{count}</strong>
87
- </span>
88
- ))}
89
- </Box>
90
- );
91
- }
92
-
93
- function ConversationTimeline() {
94
- return (
95
- <Stack gap="md" className={styles.prIdTimeline}>
96
- <TimelineComment author={pr.author} meta="opened this pull request">
97
- <Stack gap="sm">
98
- <Text size="sm">
99
- Refreshes the public launch cards for the June campaign. The branch changes hero CTA
100
- behavior, form danger states, and campaign-card spacing.
101
- </Text>
102
- <Box className={styles.prIdPrBodyTable}>
103
- <SummaryRow label="Area" value="Marketing / public launch" />
104
- <SummaryRow label="Designer" value="Growth design" />
105
- <SummaryRow label="Fragments gate" value="Blocked by contract" />
106
- </Box>
107
- </Stack>
108
- </TimelineComment>
109
-
110
- <TimelineComment author="fragments[bot]" meta="commented with a governance report" avatar="F">
111
- <Stack gap="md">
112
- <Stack gap="xs">
113
- <Text size="sm" weight="semibold">
114
- Fragments UI Governance Report
115
- </Text>
116
- <Text size="sm" color="secondary">
117
- This PR introduces new design-system drift in a public marketing flow.
118
- </Text>
119
- </Stack>
120
- <Box className={styles.prIdReportTable}>
121
- {impactAreas.map((area) => (
122
- <Box key={area.area} className={styles.prIdReportRow}>
123
- <Text size="sm" weight="medium">
124
- {area.area}
125
- </Text>
126
- <Text size="xs" color="tertiary">
127
- {area.criticality}
128
- </Text>
129
- <Text size="xs" color="secondary" tabularNums>
130
- {area.coverage}
131
- </Text>
132
- <Badge variant={area.variant} size="sm">
133
- {area.findings}
134
- </Badge>
135
- </Box>
136
- ))}
137
- </Box>
138
- <Text size="sm" color="secondary">
139
- Merge is blocked because Marketing allows no new primitive bypasses on public launch
140
- pages.
141
- </Text>
142
- </Stack>
143
- </TimelineComment>
144
-
145
- {githubComments.map((comment) => (
146
- <ReviewThread key={comment.id} comment={comment} />
147
- ))}
148
-
149
- <TimelineComment author="Noah Lee" meta="from Growth design" avatar="N" tone="designer">
150
- <Text size="sm" color="secondary">
151
- I can approve the visual direction after the Button replacement and semantic danger token
152
- land. The spacing issue can be an exception if this rhythm is intentional for the
153
- campaign.
154
- </Text>
155
- </TimelineComment>
156
- </Stack>
157
- );
158
- }
159
-
160
- function TimelineComment({
161
- author,
162
- meta,
163
- avatar,
164
- tone,
165
- children,
166
- }: {
167
- author: string;
168
- meta: string;
169
- avatar?: string;
170
- tone?: "designer";
171
- children: React.ReactNode;
172
- }) {
173
- return (
174
- <Box className={styles.prIdTimelineItem}>
175
- <span className={styles.prIdAvatar} data-tone={tone} aria-hidden>
176
- {avatar ?? initials(author)}
177
- </span>
178
- <Box className={styles.prIdCommentBox}>
179
- <Box className={styles.prIdCommentChrome}>
180
- <Text size="sm" weight="semibold">
181
- {author}
182
- </Text>
183
- <Text size="xs" color="tertiary">
184
- {meta}
185
- </Text>
186
- </Box>
187
- <Box className={styles.prIdCommentBody}>{children}</Box>
188
- </Box>
189
- </Box>
190
- );
191
- }
192
-
193
- function ReviewThread({ comment }: { comment: GithubComment }) {
194
- return (
195
- <Box className={styles.prIdTimelineItem}>
196
- <span className={styles.prIdAvatar} aria-hidden>
197
- F
198
- </span>
199
- <Box className={styles.prIdReviewThread}>
200
- <Box className={styles.prIdFileHeader}>
201
- <Text size="xs" color="secondary" font="mono" truncate>
202
- {comment.file}:{comment.line}
203
- </Text>
204
- <Badge variant={comment.variant} size="sm">
205
- {comment.status}
206
- </Badge>
207
- </Box>
208
- <Box className={styles.prIdCommentBox}>
209
- <Box className={styles.prIdCommentChrome}>
210
- <Text size="sm" weight="semibold">
211
- {comment.author}
212
- </Text>
213
- <Text size="xs" color="tertiary">
214
- left a review comment
215
- </Text>
216
- </Box>
217
- <Stack gap="sm" className={styles.prIdCommentBody}>
218
- <Text size="sm" color="secondary">
219
- {comment.body}
220
- </Text>
221
- <Text size="xs" color="tertiary">
222
- Designer signal: {comment.designerSignal}
223
- </Text>
224
- <Stack direction="row" gap="sm" wrap>
225
- <Button variant="outlined" size="xs">
226
- Create fix
227
- </Button>
228
- <Button variant="ghost" size="xs">
229
- Mark intentional
230
- </Button>
231
- </Stack>
232
- </Stack>
233
- </Box>
234
- </Box>
235
- </Box>
236
- );
237
- }
238
-
239
- function PullRequestSidebar() {
240
- return (
241
- <aside className={styles.prIdSidebar} aria-label="Pull request metadata">
242
- <SidebarSection title="Reviewers">
243
- <SidebarRow label="Growth design" value="Review needed" variant="warning" />
244
- <SidebarRow label="Frontend platform" value="Blocked" variant="error" />
245
- </SidebarSection>
246
- <SidebarSection title="Checks">
247
- <Stack gap="xs">
248
- {githubChecks.map((check) => (
249
- <CheckSummary key={check.name} check={check} />
250
- ))}
251
- </Stack>
252
- </SidebarSection>
253
- <SidebarSection title="Fragments">
254
- <SidebarRow label="Coverage" value={`${pr.coverageAfter}%`} />
255
- <SidebarRow label="Coverage delta" value="-7 points" variant="error" />
256
- <SidebarRow label="Safe fixes" value={String(pr.safeFixes)} />
257
- </SidebarSection>
258
- <SidebarSection title="Impacted areas">
259
- <Stack gap="xs">
260
- {impactAreas.map((area) => (
261
- <SidebarRow
262
- key={area.area}
263
- label={area.area}
264
- value={area.review}
265
- variant={area.variant}
266
- />
267
- ))}
268
- </Stack>
269
- </SidebarSection>
270
- </aside>
271
- );
272
- }
273
-
274
- function SidebarSection({ title, children }: { title: string; children: React.ReactNode }) {
275
- return (
276
- <section className={styles.prIdSidebarSection}>
277
- <Text as="h3" size="xs" weight="semibold" color="secondary">
278
- {title}
279
- </Text>
280
- {children}
281
- </section>
282
- );
283
- }
284
-
285
- function SidebarRow({
286
- label,
287
- value,
288
- variant,
289
- }: {
290
- label: string;
291
- value: string;
292
- variant?: GithubCheck["variant"];
293
- }) {
294
- return (
295
- <Box className={styles.prIdSidebarRow} data-variant={variant}>
296
- <Text size="xs" color="tertiary">
297
- {label}
298
- </Text>
299
- <Text size="xs" color="secondary">
300
- {value}
301
- </Text>
302
- </Box>
303
- );
304
- }
305
-
306
- function CheckSummary({ check }: { check: GithubCheck }) {
307
- const Icon =
308
- check.state === "passed" ? CheckCircle : check.state === "failed" ? XCircle : Warning;
309
-
310
- return (
311
- <Box className={styles.prIdCheckSummary}>
312
- <span className={styles.prIdCheckIcon} data-state={check.state} aria-hidden>
313
- <Icon size={14} weight="fill" />
314
- </span>
315
- <Stack gap="none" className={styles.minWidthZero}>
316
- <Text size="xs" weight="medium" truncate>
317
- {check.name}
318
- </Text>
319
- <Text size="xs" color="tertiary" truncate>
320
- {check.summary}
321
- </Text>
322
- </Stack>
323
- </Box>
324
- );
325
- }
326
-
327
- function SummaryRow({ label, value }: { label: string; value: string }) {
328
- return (
329
- <Box className={styles.prIdSummaryRow}>
330
- <Text size="xs" color="tertiary">
331
- {label}
332
- </Text>
333
- <Text size="xs" color="secondary">
334
- {value}
335
- </Text>
336
- </Box>
337
- );
338
- }
339
-
340
- function initials(value: string) {
341
- return value
342
- .split(/[\s@/_-]+/)
343
- .filter(Boolean)
344
- .slice(0, 2)
345
- .map((part) => part[0])
346
- .join("")
347
- .toUpperCase()
348
- .slice(0, 2);
349
- }
@@ -1,81 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { PrototypeShell } from "./DashboardLayoutPrototypes.shared";
3
- import { PrototypeActions, PullRequestInbox } from "./PullRequestsPrototypes.content";
4
- import { PullRequestDecisionActions, PullRequestDetail } from "./PullRequestsPrototypes.detail";
5
- import { PullRequestIdPage } from "./PullRequestsPrototypes.id-page";
6
-
7
- const meta = {
8
- title: "Cloud/Prototypes/Pull Requests",
9
- parameters: {
10
- layout: "fullscreen",
11
- backgrounds: { default: "dark" },
12
- docs: {
13
- description: {
14
- component: "Cloud pull-request review prototypes for table-first topology governance.",
15
- },
16
- },
17
- },
18
- } satisfies Meta;
19
-
20
- export default meta;
21
-
22
- type Story = StoryObj<typeof meta>;
23
-
24
- export const Layout1TableInbox: Story = {
25
- name: "Layout 1 · Table inbox",
26
- render: () => (
27
- <PrototypeShell
28
- activeNav="Pull Requests"
29
- title="Pull Requests"
30
- description="Filter every open PR by area, gate state, comments, and drift before reviewing the details."
31
- actions={<PrototypeActions />}
32
- >
33
- <PullRequestInbox />
34
- </PrototypeShell>
35
- ),
36
- };
37
-
38
- export const Layout2RoomierTable: Story = {
39
- name: "Layout 2 · Roomier table",
40
- render: () => (
41
- <PrototypeShell
42
- activeNav="Pull Requests"
43
- eyebrow="Alternative"
44
- title="Pull Requests"
45
- description="A roomier review queue for teams that want the same filters with less table density."
46
- actions={<PrototypeActions />}
47
- >
48
- <PullRequestInbox density="regular" />
49
- </PrototypeShell>
50
- ),
51
- };
52
-
53
- export const Layout3PullRequestDetail: Story = {
54
- name: "Layout 3 · Pull request detail",
55
- render: () => (
56
- <PrototypeShell
57
- activeNav="Pull Requests"
58
- eyebrow="Pull request #248 · feat/launch-pages"
59
- title="Refresh marketing campaign cards"
60
- description="Review every Fragments finding, the merge gate, and design impact before you merge."
61
- actions={<PullRequestDecisionActions />}
62
- >
63
- <PullRequestDetail />
64
- </PrototypeShell>
65
- ),
66
- };
67
-
68
- export const Layout4PullRequestIdPage: Story = {
69
- name: "Layout 4 · Pull request id page",
70
- render: () => (
71
- <PrototypeShell
72
- activeNav="Pull Requests"
73
- eyebrow="PR #248"
74
- title="Pull Request"
75
- description="Review GitHub checks, Fragments comments, and design impact before the merge decision."
76
- actions={<PrototypeActions />}
77
- >
78
- <PullRequestIdPage />
79
- </PrototypeShell>
80
- ),
81
- };
@@ -1,147 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { CodeBlock } from '.';
3
-
4
- /**
5
- * Syntax-highlighted code display with copy, theming, diff view, line
6
- * numbers, and collapsible sections. The required `code` prop holds the
7
- * content; `language` and `theme` control highlighting.
8
- */
9
- const meta = {
10
- title: 'Display/CodeBlock',
11
- component: CodeBlock,
12
- tags: ['autodocs'],
13
- parameters: {
14
- docs: {
15
- description: {
16
- component: 'Syntax-highlighted code display with copy functionality.',
17
- },
18
- },
19
- },
20
- argTypes: {
21
- language: {
22
- control: 'select',
23
- options: [
24
- 'tsx',
25
- 'typescript',
26
- 'ts',
27
- 'javascript',
28
- 'js',
29
- 'jsx',
30
- 'bash',
31
- 'shell',
32
- 'css',
33
- 'scss',
34
- 'sass',
35
- 'json',
36
- 'html',
37
- 'xml',
38
- 'markdown',
39
- 'md',
40
- 'yaml',
41
- 'yml',
42
- 'python',
43
- 'py',
44
- 'ruby',
45
- 'go',
46
- 'rust',
47
- 'java',
48
- 'kotlin',
49
- 'swift',
50
- 'c',
51
- 'cpp',
52
- 'csharp',
53
- 'php',
54
- 'sql',
55
- 'graphql',
56
- 'diff',
57
- 'plaintext',
58
- 'text',
59
- ],
60
- description: 'Programming language for syntax highlighting',
61
- },
62
- theme: {
63
- control: 'select',
64
- options: [
65
- 'synthwave-84',
66
- 'github-dark',
67
- 'github-light',
68
- 'one-dark-pro',
69
- 'dracula',
70
- 'nord',
71
- 'monokai',
72
- 'vitesse-dark',
73
- 'vitesse-light',
74
- 'min-dark',
75
- 'min-light',
76
- ],
77
- description: 'Syntax highlighting theme',
78
- },
79
- copyPlacement: {
80
- control: 'select',
81
- options: ['auto', 'header', 'overlay'],
82
- description: 'Where to place the copy button',
83
- },
84
- showCopy: { control: 'boolean' },
85
- showLineNumbers: { control: 'boolean' },
86
- wordWrap: { control: 'boolean' },
87
- collapsible: { control: 'boolean' },
88
- defaultCollapsed: { control: 'boolean' },
89
- compact: { control: 'boolean' },
90
- persistentCopy: { control: 'boolean' },
91
- },
92
- args: {
93
- code: "import { Button } from '@usefragments/ui';\n\nfunction App() {\n return <Button>Click me</Button>;\n}",
94
- language: 'tsx',
95
- theme: 'one-dark-pro',
96
- },
97
- } satisfies Meta<typeof CodeBlock>;
98
-
99
- export default meta;
100
-
101
- type Story = StoryObj<typeof meta>;
102
-
103
- export const Default: Story = {};
104
-
105
- export const WithFilename: Story = {
106
- args: {
107
- filename: 'app.tsx',
108
- code: "import { Button, Card } from '@usefragments/ui';\n\nfunction App() {\n return <Button>Get Started</Button>;\n}",
109
- },
110
- };
111
-
112
- export const WithLineNumbers: Story = {
113
- args: {
114
- showLineNumbers: true,
115
- language: 'typescript',
116
- code: 'const greeting = "Hello";\nconst name = "World";\nconsole.log(`${greeting}, ${name}!`);',
117
- },
118
- };
119
-
120
- export const DiffView: Story = {
121
- args: {
122
- language: 'tsx',
123
- showLineNumbers: true,
124
- removedLines: [2],
125
- addedLines: [3],
126
- code: 'function Counter() {\n const inc = () => setCount(c => c + 1);\n const inc = useCallback(() => setCount(c => c + 1), []);\n return <button onClick={inc}>Count</button>;\n}',
127
- },
128
- };
129
-
130
- export const Bash: Story = {
131
- args: {
132
- language: 'bash',
133
- title: 'Installation',
134
- code: 'npm install @usefragments/ui',
135
- },
136
- };
137
-
138
- export const Collapsible: Story = {
139
- args: {
140
- language: 'tsx',
141
- showLineNumbers: true,
142
- collapsible: true,
143
- defaultCollapsed: true,
144
- collapsedLines: 4,
145
- code: 'export function UserProfile({ userId }: { userId: string }) {\n const [user, setUser] = useState(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(null);\n if (loading) return <div>Loading...</div>;\n if (error) return <div>Error</div>;\n return <h1>{user.name}</h1>;\n}',
146
- },
147
- };
@@ -1,94 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Collapsible } from '.';
3
-
4
- /**
5
- * Disclosure component that expands and collapses to show or hide content.
6
- * Compose Collapsible.Trigger and Collapsible.Content as children. Supports
7
- * controlled `open`, uncontrolled `defaultOpen`, and a disabled state.
8
- */
9
- const meta = {
10
- title: 'Layout/Collapsible',
11
- component: Collapsible,
12
- tags: ['autodocs'],
13
- parameters: {
14
- docs: {
15
- description: {
16
- component: 'Expands and collapses to show or hide content.',
17
- },
18
- },
19
- },
20
- argTypes: {
21
- defaultOpen: { control: 'boolean', description: 'Initial open state' },
22
- disabled: { control: 'boolean' },
23
- },
24
- args: {
25
- defaultOpen: false,
26
- disabled: false,
27
- children: (
28
- <>
29
- <Collapsible.Trigger>Click to expand</Collapsible.Trigger>
30
- <Collapsible.Content>
31
- <p>This content is hidden by default and revealed on click.</p>
32
- </Collapsible.Content>
33
- </>
34
- ),
35
- },
36
- } satisfies Meta<typeof Collapsible>;
37
-
38
- export default meta;
39
-
40
- type Story = StoryObj<typeof meta>;
41
-
42
- export const Default: Story = {
43
- render: (args) => (
44
- <Collapsible {...args}>
45
- <Collapsible.Trigger>Click to expand</Collapsible.Trigger>
46
- <Collapsible.Content>
47
- <p>This content is hidden by default and revealed on click.</p>
48
- </Collapsible.Content>
49
- </Collapsible>
50
- ),
51
- };
52
-
53
- export const DefaultOpen: Story = {
54
- args: { defaultOpen: true },
55
- render: (args) => (
56
- <Collapsible {...args}>
57
- <Collapsible.Trigger>Section Title</Collapsible.Trigger>
58
- <Collapsible.Content>
59
- <p>This content is visible by default. Click to collapse.</p>
60
- </Collapsible.Content>
61
- </Collapsible>
62
- ),
63
- };
64
-
65
- export const Disabled: Story = {
66
- args: { disabled: true },
67
- render: (args) => (
68
- <Collapsible {...args}>
69
- <Collapsible.Trigger>Cannot toggle (disabled)</Collapsible.Trigger>
70
- <Collapsible.Content>
71
- <p>This content cannot be shown because the collapsible is disabled.</p>
72
- </Collapsible.Content>
73
- </Collapsible>
74
- ),
75
- };
76
-
77
- export const MultipleSections: Story = {
78
- render: () => (
79
- <div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>
80
- <Collapsible defaultOpen>
81
- <Collapsible.Trigger>Getting Started</Collapsible.Trigger>
82
- <Collapsible.Content>
83
- <p>Introduction and setup instructions.</p>
84
- </Collapsible.Content>
85
- </Collapsible>
86
- <Collapsible>
87
- <Collapsible.Trigger>Advanced Usage</Collapsible.Trigger>
88
- <Collapsible.Content>
89
- <p>Advanced configuration options.</p>
90
- </Collapsible.Content>
91
- </Collapsible>
92
- </div>
93
- ),
94
- };