@lateralus-ai/shipping-ui 1.4.16 → 2.0.0-dev.10

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 (451) hide show
  1. package/README.md +70 -53
  2. package/dist/components/Checkbox.d.ts +9 -0
  3. package/dist/components/Chip.d.ts +15 -0
  4. package/dist/components/EmptyState.d.ts +10 -0
  5. package/dist/components/Entry.d.ts +33 -0
  6. package/dist/components/Header.d.ts +9 -0
  7. package/dist/components/Input.d.ts +11 -0
  8. package/dist/components/InputType.d.ts +10 -0
  9. package/dist/components/Modal.d.ts +36 -0
  10. package/dist/components/ModalPanel.d.ts +7 -7
  11. package/dist/components/PdfViewer/ImageViewer.d.ts +2 -2
  12. package/dist/components/PdfViewer/PdfViewer.d.ts +2 -2
  13. package/dist/components/ReportInput.d.ts +10 -0
  14. package/dist/components/Tab.d.ts +7 -0
  15. package/dist/components/Tabs.d.ts +26 -12
  16. package/dist/components/index.d.ts +12 -4
  17. package/dist/domain/Filters/FilterPill.d.ts +6 -0
  18. package/dist/domain/Filters/FilteredPill.d.ts +8 -0
  19. package/dist/domain/Filters/FiltersBar.d.ts +12 -0
  20. package/dist/domain/Filters/index.d.ts +3 -0
  21. package/dist/domain/Forms/FormCard.d.ts +12 -0
  22. package/dist/domain/Forms/FormHeader.d.ts +8 -0
  23. package/dist/domain/Forms/ListRow.d.ts +8 -0
  24. package/dist/domain/Forms/RiskMeter.d.ts +8 -0
  25. package/dist/domain/Forms/index.d.ts +4 -0
  26. package/dist/domain/Library/File.d.ts +8 -0
  27. package/dist/domain/Library/Folder.d.ts +8 -0
  28. package/dist/domain/Library/Folders.d.ts +11 -0
  29. package/dist/domain/Library/ListRow.d.ts +8 -0
  30. package/dist/domain/Library/Navigation.d.ts +7 -0
  31. package/dist/domain/Library/index.d.ts +5 -0
  32. package/dist/domain/Report/InfoHeading.d.ts +7 -0
  33. package/dist/domain/Report/InfoRow.d.ts +8 -0
  34. package/dist/domain/Report/Report.d.ts +7 -0
  35. package/dist/domain/Report/SectionHeader.d.ts +10 -0
  36. package/dist/domain/Report/TaskRow.d.ts +11 -0
  37. package/dist/domain/Report/index.d.ts +5 -0
  38. package/dist/domain/Settings/EquipmentRow.d.ts +8 -0
  39. package/dist/domain/Settings/MemberRow.d.ts +11 -0
  40. package/dist/domain/Settings/SettingRow.d.ts +10 -0
  41. package/dist/domain/Settings/index.d.ts +3 -0
  42. package/dist/domain/Ships/ShipRow.d.ts +10 -0
  43. package/dist/domain/Ships/index.d.ts +1 -0
  44. package/dist/domain/Workflows/GroupHeader.d.ts +8 -0
  45. package/dist/domain/Workflows/Importance.d.ts +8 -0
  46. package/dist/domain/Workflows/Progress.d.ts +7 -0
  47. package/dist/domain/Workflows/Question.d.ts +9 -0
  48. package/dist/domain/Workflows/StatusPopover.d.ts +7 -0
  49. package/dist/domain/Workflows/Task.d.ts +9 -0
  50. package/dist/domain/Workflows/TaskHeader.d.ts +9 -0
  51. package/dist/domain/Workflows/WorkflowFilters.d.ts +6 -0
  52. package/dist/domain/Workflows/WorkflowForm.d.ts +8 -0
  53. package/dist/domain/Workflows/WorkflowHeader.d.ts +11 -0
  54. package/dist/domain/Workflows/WorkflowListItem.d.ts +11 -0
  55. package/dist/domain/Workflows/WorkflowProgress.d.ts +6 -0
  56. package/dist/domain/Workflows/WorkflowRow.d.ts +10 -0
  57. package/dist/domain/Workflows/index.d.ts +13 -0
  58. package/dist/domain/index.d.ts +7 -0
  59. package/dist/icons/ArrowIcon.d.ts +8 -0
  60. package/dist/icons/ChevronIcon.d.ts +8 -0
  61. package/dist/icons/Icon.d.ts +96 -0
  62. package/dist/icons/arrow-paths.d.ts +12 -0
  63. package/dist/icons/chevron-paths.d.ts +27 -0
  64. package/dist/icons/createIcon.d.ts +34 -0
  65. package/dist/icons/generated.d.ts +68 -0
  66. package/dist/icons/icon-sizes.d.ts +5 -0
  67. package/dist/icons/icons-data.d.ts +1023 -0
  68. package/dist/icons/index.d.ts +13 -0
  69. package/dist/icons/types.d.ts +10 -0
  70. package/dist/illustrations/AuditPreparation.d.ts +4 -0
  71. package/dist/illustrations/CompletedTasks.d.ts +4 -0
  72. package/dist/illustrations/Creation.d.ts +4 -0
  73. package/dist/illustrations/InternalAudit.d.ts +4 -0
  74. package/dist/illustrations/Invite.d.ts +4 -0
  75. package/dist/illustrations/PortStateControl.d.ts +4 -0
  76. package/dist/illustrations/Processing.d.ts +4 -0
  77. package/dist/illustrations/QuestionsDone.d.ts +4 -0
  78. package/dist/illustrations/RightShipInspection.d.ts +4 -0
  79. package/dist/illustrations/Upload.d.ts +4 -0
  80. package/dist/illustrations/WorkflowCreated.d.ts +4 -0
  81. package/dist/illustrations/Workflows.d.ts +4 -0
  82. package/dist/illustrations/createIllustration.d.ts +11 -0
  83. package/dist/illustrations/index.d.ts +13 -0
  84. package/dist/index.cjs +64 -80
  85. package/dist/index.d.ts +9 -3
  86. package/dist/index.esm.js +11535 -36619
  87. package/dist/patterns/Chat/Attachment.d.ts +6 -0
  88. package/dist/patterns/Chat/ChatEntry.d.ts +10 -0
  89. package/dist/patterns/Chat/ChatHeader.d.ts +7 -0
  90. package/dist/patterns/Chat/ChatInput.d.ts +5 -0
  91. package/dist/patterns/Chat/ChatStatus.d.ts +6 -0
  92. package/dist/patterns/Chat/ChatTile.d.ts +9 -0
  93. package/dist/patterns/Chat/Copilot.d.ts +8 -0
  94. package/dist/patterns/Chat/Draft.d.ts +5 -0
  95. package/dist/patterns/Chat/Greeting.d.ts +7 -0
  96. package/dist/patterns/Chat/Reference.d.ts +6 -0
  97. package/dist/patterns/Chat/Source.d.ts +6 -0
  98. package/dist/patterns/Chat/Sources.d.ts +5 -0
  99. package/dist/patterns/Chat/Suggestion.d.ts +5 -0
  100. package/dist/patterns/Chat/Suggestions.d.ts +4 -0
  101. package/dist/patterns/Chat/index.d.ts +14 -0
  102. package/dist/patterns/Modal/Invitee.d.ts +8 -0
  103. package/dist/patterns/Modal/ModalFooter.d.ts +6 -0
  104. package/dist/patterns/Modal/ModalHeader.d.ts +10 -0
  105. package/dist/patterns/Modal/index.d.ts +3 -0
  106. package/dist/patterns/Search/Pill.d.ts +10 -0
  107. package/dist/patterns/Search/PillInfo.d.ts +8 -0
  108. package/dist/patterns/Search/ResultRow.d.ts +19 -0
  109. package/dist/patterns/Search/SearchModal.d.ts +88 -0
  110. package/dist/patterns/Search/SectionHeader.d.ts +5 -0
  111. package/dist/patterns/Search/index.d.ts +5 -0
  112. package/dist/patterns/Sidebar/Account.d.ts +22 -0
  113. package/dist/patterns/Sidebar/ActivityNavGroup.d.ts +17 -0
  114. package/dist/patterns/Sidebar/CollapsibleNavGroup.d.ts +24 -0
  115. package/dist/patterns/Sidebar/Indicator.d.ts +6 -0
  116. package/dist/patterns/Sidebar/NewChat.d.ts +10 -0
  117. package/dist/patterns/Sidebar/Sidebar.d.ts +13 -0
  118. package/dist/patterns/Sidebar/SidebarAction.d.ts +11 -0
  119. package/dist/patterns/Sidebar/SidebarEntry.d.ts +25 -0
  120. package/dist/patterns/Sidebar/SidebarHeading.d.ts +11 -0
  121. package/dist/patterns/Sidebar/SidebarLink.d.ts +22 -0
  122. package/dist/patterns/Sidebar/SidebarShell.d.ts +11 -0
  123. package/dist/patterns/Sidebar/Switcher.d.ts +8 -0
  124. package/dist/patterns/Sidebar/constants.d.ts +2 -0
  125. package/dist/patterns/Sidebar/figma-assets.d.ts +3 -0
  126. package/dist/patterns/Sidebar/figma-demo-content.d.ts +75 -0
  127. package/dist/patterns/Sidebar/figma-sidebar-nav.d.ts +12 -0
  128. package/dist/patterns/Sidebar/index.d.ts +13 -0
  129. package/dist/patterns/Sidebar/sidebar-styles.d.ts +45 -0
  130. package/dist/patterns/Skeleton/Skeleton.d.ts +6 -0
  131. package/dist/patterns/Skeleton/index.d.ts +1 -0
  132. package/dist/patterns/index.d.ts +5 -0
  133. package/dist/primitives/Avatar.d.ts +10 -0
  134. package/dist/primitives/Badge.d.ts +14 -0
  135. package/dist/primitives/Button.d.ts +22 -0
  136. package/dist/primitives/Callout.d.ts +7 -0
  137. package/dist/primitives/Count.d.ts +5 -0
  138. package/dist/primitives/DropdownMenu.d.ts +15 -0
  139. package/dist/primitives/GroupedAvatars.d.ts +7 -0
  140. package/dist/primitives/IconButton.d.ts +16 -0
  141. package/dist/primitives/Logo.d.ts +8 -0
  142. package/dist/primitives/MenuItem.d.ts +7 -0
  143. package/dist/primitives/Switch.d.ts +7 -0
  144. package/dist/primitives/ThinkingDot.d.ts +4 -0
  145. package/dist/primitives/Tooltip.d.ts +12 -0
  146. package/dist/primitives/button-styles.d.ts +4 -0
  147. package/dist/primitives/index.d.ts +15 -0
  148. package/dist/style.css +1 -1
  149. package/dist/tailwind-theme.d.ts +234 -198
  150. package/dist/theme-entry-BUK3MJUJ.mjs +261 -0
  151. package/dist/theme-entry-ygTpGaNC.js +1 -0
  152. package/dist/theme-entry.d.ts +2 -0
  153. package/dist/theme.cjs +1 -0
  154. package/dist/theme.d.ts +2 -0
  155. package/dist/theme.esm.js +5 -0
  156. package/dist/tokens/colors.d.ts +148 -0
  157. package/dist/tokens/elevation.d.ts +11 -0
  158. package/dist/tokens/index.d.ts +4 -0
  159. package/dist/tokens/semantic.d.ts +89 -0
  160. package/dist/tokens/typography.d.ts +85 -0
  161. package/package.json +36 -7
  162. package/src/components/Checkbox.tsx +77 -0
  163. package/src/components/Chip.tsx +69 -0
  164. package/src/components/EmptyState.tsx +44 -0
  165. package/src/components/Entry.tsx +138 -0
  166. package/src/components/Header.tsx +39 -0
  167. package/src/components/Input.tsx +69 -0
  168. package/src/components/InputType.tsx +76 -0
  169. package/src/components/Modal.tsx +141 -0
  170. package/src/components/ModalPanel.tsx +22 -37
  171. package/src/components/PdfViewer/ImageViewer.tsx +121 -182
  172. package/src/components/PdfViewer/PdfViewer.tsx +103 -155
  173. package/src/components/ReportInput.tsx +65 -0
  174. package/src/components/Tab.tsx +33 -0
  175. package/src/components/Tabs.tsx +146 -43
  176. package/src/components/index.ts +43 -6
  177. package/src/domain/Filters/FilterPill.tsx +25 -0
  178. package/src/domain/Filters/FilteredPill.tsx +39 -0
  179. package/src/domain/Filters/FiltersBar.tsx +76 -0
  180. package/src/domain/Filters/index.ts +3 -0
  181. package/src/domain/Forms/FormCard.tsx +61 -0
  182. package/src/domain/Forms/FormHeader.tsx +34 -0
  183. package/src/domain/Forms/ListRow.tsx +40 -0
  184. package/src/domain/Forms/RiskMeter.tsx +50 -0
  185. package/src/domain/Forms/index.ts +4 -0
  186. package/src/domain/Library/File.tsx +59 -0
  187. package/src/domain/Library/Folder.tsx +55 -0
  188. package/src/domain/Library/Folders.tsx +43 -0
  189. package/src/domain/Library/ListRow.tsx +40 -0
  190. package/src/domain/Library/Navigation.tsx +31 -0
  191. package/src/domain/Library/index.ts +5 -0
  192. package/src/domain/Report/InfoHeading.tsx +25 -0
  193. package/src/domain/Report/InfoRow.tsx +35 -0
  194. package/src/domain/Report/Report.tsx +53 -0
  195. package/src/domain/Report/SectionHeader.tsx +43 -0
  196. package/src/domain/Report/TaskRow.tsx +57 -0
  197. package/src/domain/Report/index.ts +5 -0
  198. package/src/domain/Settings/EquipmentRow.tsx +39 -0
  199. package/src/domain/Settings/MemberRow.tsx +53 -0
  200. package/src/domain/Settings/SettingRow.tsx +66 -0
  201. package/src/domain/Settings/index.ts +3 -0
  202. package/src/domain/Ships/ShipRow.tsx +49 -0
  203. package/src/domain/Ships/index.ts +1 -0
  204. package/src/domain/Workflows/GroupHeader.tsx +48 -0
  205. package/src/domain/Workflows/Importance.tsx +48 -0
  206. package/src/domain/Workflows/Progress.tsx +55 -0
  207. package/src/domain/Workflows/Question.tsx +42 -0
  208. package/src/domain/Workflows/StatusPopover.tsx +53 -0
  209. package/src/domain/Workflows/Task.tsx +46 -0
  210. package/src/domain/Workflows/TaskHeader.tsx +51 -0
  211. package/src/domain/Workflows/WorkflowFilters.tsx +40 -0
  212. package/src/domain/Workflows/WorkflowForm.tsx +40 -0
  213. package/src/domain/Workflows/WorkflowHeader.tsx +62 -0
  214. package/src/domain/Workflows/WorkflowListItem.tsx +45 -0
  215. package/src/domain/Workflows/WorkflowProgress.tsx +36 -0
  216. package/src/domain/Workflows/WorkflowRow.tsx +43 -0
  217. package/src/domain/Workflows/index.ts +13 -0
  218. package/src/domain/index.ts +37 -0
  219. package/src/icons/ArrowIcon.tsx +42 -0
  220. package/src/icons/ChevronIcon.tsx +42 -0
  221. package/src/icons/Icon.tsx +184 -0
  222. package/src/icons/arrow-paths.ts +8 -0
  223. package/src/icons/chevron-paths.ts +17 -0
  224. package/src/icons/createIcon.tsx +128 -0
  225. package/src/icons/generated.tsx +71 -0
  226. package/src/icons/icon-sizes.ts +20 -0
  227. package/src/icons/icons-data.ts +656 -0
  228. package/src/icons/index.ts +25 -0
  229. package/src/icons/types.ts +18 -0
  230. package/src/illustrations/AuditPreparation.tsx +15 -0
  231. package/src/illustrations/CompletedTasks.tsx +16 -0
  232. package/src/illustrations/Creation.tsx +13 -0
  233. package/src/illustrations/InternalAudit.tsx +13 -0
  234. package/src/illustrations/Invite.tsx +13 -0
  235. package/src/illustrations/PortStateControl.tsx +13 -0
  236. package/src/illustrations/Processing.tsx +17 -0
  237. package/src/illustrations/QuestionsDone.tsx +16 -0
  238. package/src/illustrations/RightShipInspection.tsx +18 -0
  239. package/src/illustrations/Upload.tsx +12 -0
  240. package/src/illustrations/WorkflowCreated.tsx +13 -0
  241. package/src/illustrations/Workflows.tsx +13 -0
  242. package/src/illustrations/createIllustration.tsx +30 -0
  243. package/src/illustrations/index.ts +14 -0
  244. package/src/index.ts +76 -4
  245. package/src/patterns/Chat/Attachment.tsx +27 -0
  246. package/src/patterns/Chat/ChatEntry.tsx +41 -0
  247. package/src/patterns/Chat/ChatHeader.tsx +39 -0
  248. package/src/patterns/Chat/ChatInput.tsx +35 -0
  249. package/src/patterns/Chat/ChatStatus.tsx +26 -0
  250. package/src/patterns/Chat/ChatTile.tsx +40 -0
  251. package/src/patterns/Chat/Copilot.tsx +50 -0
  252. package/src/patterns/Chat/Draft.tsx +23 -0
  253. package/src/patterns/Chat/Greeting.tsx +32 -0
  254. package/src/patterns/Chat/Reference.tsx +26 -0
  255. package/src/patterns/Chat/Source.tsx +27 -0
  256. package/src/patterns/Chat/Sources.tsx +23 -0
  257. package/src/patterns/Chat/Suggestion.tsx +23 -0
  258. package/src/patterns/Chat/Suggestions.tsx +21 -0
  259. package/src/patterns/Chat/index.ts +14 -0
  260. package/src/patterns/Modal/Invitee.tsx +44 -0
  261. package/src/patterns/Modal/ModalFooter.tsx +39 -0
  262. package/src/patterns/Modal/ModalHeader.tsx +77 -0
  263. package/src/patterns/Modal/index.ts +3 -0
  264. package/src/patterns/Search/Pill.tsx +44 -0
  265. package/src/patterns/Search/PillInfo.tsx +41 -0
  266. package/src/patterns/Search/ResultRow.tsx +44 -0
  267. package/src/patterns/Search/SearchModal.tsx +310 -0
  268. package/src/patterns/Search/SectionHeader.tsx +20 -0
  269. package/src/patterns/Search/index.ts +31 -0
  270. package/src/patterns/Sidebar/Account.tsx +193 -0
  271. package/src/patterns/Sidebar/ActivityNavGroup.tsx +71 -0
  272. package/src/patterns/Sidebar/CollapsibleNavGroup.tsx +106 -0
  273. package/src/patterns/Sidebar/Indicator.tsx +14 -0
  274. package/src/patterns/Sidebar/NewChat.tsx +71 -0
  275. package/src/patterns/Sidebar/Sidebar.tsx +363 -0
  276. package/src/patterns/Sidebar/SidebarAction.tsx +55 -0
  277. package/src/patterns/Sidebar/SidebarEntry.tsx +129 -0
  278. package/src/patterns/Sidebar/SidebarHeading.tsx +38 -0
  279. package/src/patterns/Sidebar/SidebarLink.tsx +125 -0
  280. package/src/patterns/Sidebar/SidebarShell.tsx +32 -0
  281. package/src/patterns/Sidebar/Switcher.tsx +116 -0
  282. package/src/patterns/Sidebar/assets/account-avatar-24.jpg +0 -0
  283. package/src/patterns/Sidebar/assets/account-avatar.jpg +0 -0
  284. package/src/patterns/Sidebar/assets/indicator-compliance.png +0 -0
  285. package/src/patterns/Sidebar/assets/indicator-technical.png +0 -0
  286. package/src/patterns/Sidebar/assets/logo-compliance-mark.png +5 -0
  287. package/src/patterns/Sidebar/assets/logo-compliance-mask.png +13 -0
  288. package/src/patterns/Sidebar/assets/logo-compliance.svg +17 -0
  289. package/src/patterns/Sidebar/assets/logo-technical-avatar.svg +17 -0
  290. package/src/patterns/Sidebar/assets/logo-technical-mark.png +5 -0
  291. package/src/patterns/Sidebar/assets/logo-technical.svg +16 -0
  292. package/src/patterns/Sidebar/constants.ts +2 -0
  293. package/src/patterns/Sidebar/figma-assets.ts +4 -0
  294. package/src/patterns/Sidebar/figma-demo-content.ts +30 -0
  295. package/src/patterns/Sidebar/figma-sidebar-nav.ts +79 -0
  296. package/src/patterns/Sidebar/index.ts +13 -0
  297. package/src/patterns/Sidebar/sidebar-styles.ts +101 -0
  298. package/src/patterns/Skeleton/Skeleton.tsx +56 -0
  299. package/src/patterns/Skeleton/index.ts +1 -0
  300. package/src/patterns/index.ts +5 -0
  301. package/src/primitives/Avatar.tsx +71 -0
  302. package/src/primitives/Badge.tsx +44 -0
  303. package/src/primitives/Button.tsx +231 -0
  304. package/src/primitives/Callout.tsx +21 -0
  305. package/src/primitives/Count.tsx +18 -0
  306. package/src/primitives/DropdownMenu.tsx +60 -0
  307. package/src/primitives/GroupedAvatars.tsx +36 -0
  308. package/src/primitives/IconButton.tsx +56 -0
  309. package/src/primitives/Logo.tsx +43 -0
  310. package/src/primitives/MenuItem.tsx +35 -0
  311. package/src/primitives/Switch.tsx +38 -0
  312. package/src/primitives/ThinkingDot.tsx +34 -0
  313. package/src/primitives/Tooltip.tsx +42 -0
  314. package/src/primitives/button-styles.ts +92 -0
  315. package/src/primitives/index.ts +18 -0
  316. package/src/stories/_layout/FigmaPage.tsx +94 -0
  317. package/src/stories/_layout/index.ts +8 -0
  318. package/src/stories/canvases/ButtonsCanvas.tsx +107 -0
  319. package/src/stories/canvases/ButtonsMatrixCanvas.tsx +65 -0
  320. package/src/stories/canvases/ChatCanvas.tsx +130 -0
  321. package/src/stories/canvases/ColorTokensCanvas.tsx +16 -0
  322. package/src/stories/canvases/ColorsCanvas.tsx +101 -0
  323. package/src/stories/canvases/ContentCanvas.tsx +157 -0
  324. package/src/stories/canvases/CoreCanvas.tsx +125 -0
  325. package/src/stories/canvases/DomainFormsCanvas.tsx +67 -0
  326. package/src/stories/canvases/FiltersCanvas.tsx +41 -0
  327. package/src/stories/canvases/FormsCanvas.tsx +71 -0
  328. package/src/stories/canvases/IconsCanvas.tsx +99 -0
  329. package/src/stories/canvases/IllustrationsCanvas.tsx +50 -0
  330. package/src/stories/canvases/LibraryCanvas.tsx +67 -0
  331. package/src/stories/canvases/ModalsCanvas.tsx +54 -0
  332. package/src/stories/canvases/RaiseLevelsCanvas.tsx +27 -0
  333. package/src/stories/canvases/ReportCanvas.tsx +33 -0
  334. package/src/stories/canvases/ReportLayoutCanvas.tsx +19 -0
  335. package/src/stories/canvases/SearchCanvas.tsx +150 -0
  336. package/src/stories/canvases/SettingsCanvas.tsx +41 -0
  337. package/src/stories/canvases/ShipsCanvas.tsx +38 -0
  338. package/src/stories/canvases/SidebarCanvas.tsx +147 -0
  339. package/src/stories/canvases/SidebarLayoutsCanvas.tsx +71 -0
  340. package/src/stories/canvases/SidebarPlayground.tsx +35 -0
  341. package/src/stories/canvases/SkeletonsCanvas.tsx +30 -0
  342. package/src/stories/canvases/TypographyCanvas.tsx +53 -0
  343. package/src/stories/canvases/WorkflowsCanvas.tsx +129 -0
  344. package/src/stories/canvases/figma-buttons-layout.ts +83 -0
  345. package/src/stories/canvases/figma-icons-layout.ts +318 -0
  346. package/src/stories/canvases/figma-sidebar-layout.ts +212 -0
  347. package/src/stories/canvases/figma-sidebar-layouts-layout.ts +84 -0
  348. package/src/stories/canvases/figma-widths.ts +28 -0
  349. package/src/stories/canvases/helpers.tsx +146 -0
  350. package/src/stories/components/Buttons.stories.tsx +12 -0
  351. package/src/stories/components/Chat.stories.tsx +12 -0
  352. package/src/stories/components/Content.stories.tsx +12 -0
  353. package/src/stories/components/Core.stories.tsx +12 -0
  354. package/src/stories/components/DomainForms.stories.tsx +12 -0
  355. package/src/stories/components/Filters.stories.tsx +12 -0
  356. package/src/stories/components/Forms.stories.tsx +12 -0
  357. package/src/stories/components/Icons.stories.tsx +12 -0
  358. package/src/stories/components/Illustrations.stories.tsx +12 -0
  359. package/src/stories/components/Library.stories.tsx +12 -0
  360. package/src/stories/components/Modals.stories.tsx +12 -0
  361. package/src/stories/components/Report.stories.tsx +12 -0
  362. package/src/stories/components/ReportLayout.stories.tsx +12 -0
  363. package/src/stories/components/Search.stories.tsx +12 -0
  364. package/src/stories/components/Settings.stories.tsx +12 -0
  365. package/src/stories/components/Ships.stories.tsx +12 -0
  366. package/src/stories/components/Sidebar.stories.tsx +37 -0
  367. package/src/stories/components/SidebarLayouts.stories.tsx +12 -0
  368. package/src/stories/components/Skeletons.stories.tsx +12 -0
  369. package/src/stories/components/Workflows.stories.tsx +12 -0
  370. package/src/stories/style-guide/Buttons.stories.tsx +12 -0
  371. package/src/stories/style-guide/ColorTokens.stories.tsx +12 -0
  372. package/src/stories/style-guide/Colors.stories.tsx +12 -0
  373. package/src/stories/style-guide/RaiseLevels.stories.tsx +12 -0
  374. package/src/stories/style-guide/Typography.stories.tsx +12 -0
  375. package/src/style.css +169 -2
  376. package/src/tailwind-theme.ts +164 -240
  377. package/src/theme-entry.ts +2 -0
  378. package/src/tokens/colors.ts +82 -0
  379. package/src/tokens/elevation.ts +12 -0
  380. package/src/tokens/index.ts +4 -0
  381. package/src/tokens/semantic.ts +89 -0
  382. package/src/tokens/typography.ts +21 -0
  383. package/tailwind.config.ts +12 -0
  384. package/dist/components/HelloWorld.d.ts +0 -1
  385. package/dist/components/InputPrompt.d.ts +0 -20
  386. package/dist/components/SearchModal.d.ts +0 -24
  387. package/dist/components/Sidebar/Button.d.ts +0 -7
  388. package/dist/components/Sidebar/Container.d.ts +0 -5
  389. package/dist/components/Sidebar/Item.d.ts +0 -9
  390. package/dist/components/Sidebar/Layout.d.ts +0 -10
  391. package/dist/components/Sidebar/Provider.d.ts +0 -14
  392. package/dist/components/Sidebar/SecondaryItem.d.ts +0 -9
  393. package/dist/components/Sidebar/SideContainer.d.ts +0 -5
  394. package/dist/components/Sidebar/ToggleCollapseButton.d.ts +0 -1
  395. package/dist/components/Sidebar/index.d.ts +0 -8
  396. package/dist/components/icons/CloseSidebarIcon.d.ts +0 -2
  397. package/dist/components/icons/CloseSidebarMidIcon.d.ts +0 -1
  398. package/dist/components/icons/ExpandIcon.d.ts +0 -3
  399. package/dist/components/icons/SendArrowIcon.d.ts +0 -4
  400. package/dist/components/icons/SendArrowIconGreen.d.ts +0 -4
  401. package/dist/components/icons/SettingsIcon.d.ts +0 -3
  402. package/dist/components/icons/XIcon.d.ts +0 -3
  403. package/dist/material-theme.d.ts +0 -442
  404. package/dist/stories/Buttons.d.ts +0 -1
  405. package/dist/stories/Checkbox.d.ts +0 -1
  406. package/dist/stories/ColorPalette.d.ts +0 -1
  407. package/dist/stories/Dropdowns.d.ts +0 -1
  408. package/dist/stories/InputPrompt.d.ts +0 -1
  409. package/dist/stories/SearchModal.d.ts +0 -1
  410. package/dist/stories/Sidebar.d.ts +0 -1
  411. package/dist/stories/Typography.d.ts +0 -1
  412. package/src/components/HelloWorld.tsx +0 -3
  413. package/src/components/InputPrompt.tsx +0 -96
  414. package/src/components/SearchModal.tsx +0 -320
  415. package/src/components/Sidebar/Button.tsx +0 -20
  416. package/src/components/Sidebar/Container.tsx +0 -31
  417. package/src/components/Sidebar/Item.tsx +0 -39
  418. package/src/components/Sidebar/Layout.tsx +0 -32
  419. package/src/components/Sidebar/Provider.tsx +0 -47
  420. package/src/components/Sidebar/SecondaryItem.tsx +0 -39
  421. package/src/components/Sidebar/SideContainer.tsx +0 -31
  422. package/src/components/Sidebar/ToggleCollapseButton.tsx +0 -24
  423. package/src/components/Sidebar/index.ts +0 -8
  424. package/src/components/icons/CloseSidebarIcon.tsx +0 -19
  425. package/src/components/icons/CloseSidebarMidIcon.tsx +0 -19
  426. package/src/components/icons/ExpandIcon.tsx +0 -21
  427. package/src/components/icons/SendArrowIcon.tsx +0 -23
  428. package/src/components/icons/SendArrowIconGreen.tsx +0 -17
  429. package/src/components/icons/SettingsIcon.tsx +0 -33
  430. package/src/components/icons/XIcon.tsx +0 -21
  431. package/src/material-theme.ts +0 -477
  432. package/src/stories/Buttons.stories.tsx +0 -15
  433. package/src/stories/Buttons.tsx +0 -52
  434. package/src/stories/Checkbox.stories.tsx +0 -15
  435. package/src/stories/Checkbox.tsx +0 -56
  436. package/src/stories/ColorPalette.stories.tsx +0 -15
  437. package/src/stories/ColorPalette.tsx +0 -85
  438. package/src/stories/DocumentEditor.stories.tsx +0 -287
  439. package/src/stories/Dropdowns.stories.tsx +0 -15
  440. package/src/stories/Dropdowns.tsx +0 -52
  441. package/src/stories/InputPrompt.stories.tsx +0 -15
  442. package/src/stories/InputPrompt.tsx +0 -63
  443. package/src/stories/ModalHeader.stories.tsx +0 -36
  444. package/src/stories/PDFViewer.stories.tsx +0 -39
  445. package/src/stories/SearchModal.stories.tsx +0 -132
  446. package/src/stories/SearchModal.tsx +0 -82
  447. package/src/stories/Sidebar.stories.tsx +0 -15
  448. package/src/stories/Sidebar.tsx +0 -108
  449. package/src/stories/Tabs.stories.tsx +0 -51
  450. package/src/stories/Typography.stories.tsx +0 -15
  451. package/src/stories/Typography.tsx +0 -110
@@ -0,0 +1,56 @@
1
+ import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from "react";
2
+ import { cn } from "../utils/cn";
3
+
4
+ type IconButtonHierarchy = "tertiary" | "quaternary";
5
+ type IconButtonSize = "large" | "small";
6
+
7
+ export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
8
+ hierarchy?: IconButtonHierarchy;
9
+ size?: IconButtonSize;
10
+ "aria-label": string;
11
+ children: ReactNode;
12
+ };
13
+
14
+ const hierarchyStyles: Record<IconButtonHierarchy, string> = {
15
+ tertiary:
16
+ "bg-action-tertiary-idle text-action-tertiary-on-idle hover:bg-action-tertiary-hover hover:text-action-tertiary-on-hover disabled:bg-action-tertiary-disabled disabled:text-action-tertiary-on-disabled",
17
+ quaternary:
18
+ "bg-action-quaternary-idle text-action-quaternary-on-idle hover:bg-action-quaternary-hover hover:text-action-quaternary-on-hover disabled:bg-action-quaternary-disabled disabled:text-action-quaternary-on-disabled",
19
+ };
20
+
21
+ const sizeStyles: Record<IconButtonSize, string> = {
22
+ large: "size-10 [&>svg]:size-6",
23
+ small: "size-8 [&>svg]:size-4",
24
+ };
25
+
26
+ export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
27
+ (
28
+ {
29
+ hierarchy = "tertiary",
30
+ size = "large",
31
+ disabled = false,
32
+ children,
33
+ className,
34
+ type = "button",
35
+ ...props
36
+ },
37
+ ref,
38
+ ) => (
39
+ <button
40
+ ref={ref}
41
+ type={type}
42
+ disabled={disabled}
43
+ className={cn(
44
+ "inline-flex shrink-0 items-center justify-center rounded-control transition-colors disabled:cursor-not-allowed",
45
+ hierarchyStyles[hierarchy],
46
+ sizeStyles[size],
47
+ className,
48
+ )}
49
+ {...props}
50
+ >
51
+ {children}
52
+ </button>
53
+ ),
54
+ );
55
+
56
+ IconButton.displayName = "IconButton";
@@ -0,0 +1,43 @@
1
+ import { cn } from "../utils/cn";
2
+
3
+ type ChiefType = "technical" | "compliance";
4
+
5
+ export type LogoProps = {
6
+ chief: ChiefType;
7
+ className?: string;
8
+ muted?: boolean;
9
+ };
10
+
11
+ const ASK_CHIEF_A =
12
+ "M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z";
13
+
14
+ const TechnicalGlyph = () => <path d={ASK_CHIEF_A} fill="currentColor" />;
15
+
16
+ const ComplianceGlyph = () => (
17
+ <>
18
+ <path d={ASK_CHIEF_A} fill="currentColor" />
19
+ <path
20
+ d="M6.2 5.2C7.4 4.1 10.6 4.1 11.8 5.2"
21
+ stroke="currentColor"
22
+ strokeWidth="0.9"
23
+ fill="none"
24
+ strokeLinecap="round"
25
+ />
26
+ </>
27
+ );
28
+
29
+ export const Logo = ({ chief, className, muted = false }: LogoProps) => (
30
+ <svg
31
+ viewBox="0 0 18 18"
32
+ fill="none"
33
+ xmlns="http://www.w3.org/2000/svg"
34
+ className={cn(
35
+ "shrink-0",
36
+ muted ? "text-display-on-light-quaternary" : "text-display-on-light-primary",
37
+ className,
38
+ )}
39
+ aria-hidden
40
+ >
41
+ {chief === "technical" ? <TechnicalGlyph /> : <ComplianceGlyph />}
42
+ </svg>
43
+ );
@@ -0,0 +1,35 @@
1
+ import { type ButtonHTMLAttributes, type ReactNode } from "react";
2
+ import { cn } from "../utils/cn";
3
+
4
+ export type MenuItemProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
5
+ header?: boolean;
6
+ destructive?: boolean;
7
+ children: ReactNode;
8
+ };
9
+
10
+ export const MenuItem = ({
11
+ header = false,
12
+ destructive = false,
13
+ children,
14
+ className,
15
+ type = "button",
16
+ ...props
17
+ }: MenuItemProps) => (
18
+ <button
19
+ type={type}
20
+ className={cn(
21
+ "flex w-full items-center gap-2 rounded-control px-2 py-1.5 text-left text-caption-1 transition-colors",
22
+ header
23
+ ? "cursor-default text-caption-1-em text-display-on-light-tertiary hover:bg-transparent"
24
+ : destructive
25
+ ? "text-red-500 hover:bg-red-50 hover:text-red-700 disabled:text-red-300"
26
+ : "text-display-on-light-primary hover:bg-grey-100 disabled:text-display-on-light-quaternary",
27
+ "disabled:cursor-not-allowed",
28
+ className,
29
+ )}
30
+ disabled={header || props.disabled}
31
+ {...props}
32
+ >
33
+ {children}
34
+ </button>
35
+ );
@@ -0,0 +1,38 @@
1
+ import { type ButtonHTMLAttributes } from "react";
2
+ import { cn } from "../utils/cn";
3
+
4
+ export type SwitchProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> & {
5
+ checked: boolean;
6
+ onChange: (checked: boolean) => void;
7
+ disabled?: boolean;
8
+ };
9
+
10
+ export const Switch = ({
11
+ checked,
12
+ onChange,
13
+ disabled = false,
14
+ className,
15
+ ...props
16
+ }: SwitchProps) => (
17
+ <button
18
+ type="button"
19
+ role="switch"
20
+ aria-checked={checked}
21
+ disabled={disabled}
22
+ onClick={() => onChange(!checked)}
23
+ className={cn(
24
+ "relative inline-flex h-6 w-10 shrink-0 items-center rounded-full transition-colors disabled:cursor-not-allowed",
25
+ checked ? "bg-blue-600" : "bg-grey-200",
26
+ disabled && "opacity-50",
27
+ className,
28
+ )}
29
+ {...props}
30
+ >
31
+ <span
32
+ className={cn(
33
+ "inline-block size-5 rounded-full bg-white shadow-raise1 transition-transform",
34
+ checked ? "translate-x-[18px]" : "translate-x-0.5",
35
+ )}
36
+ />
37
+ </button>
38
+ );
@@ -0,0 +1,34 @@
1
+ import { cn } from "../utils/cn";
2
+
3
+ export type ThinkingDotProps = {
4
+ className?: string;
5
+ };
6
+
7
+ const frames = [0, 1, 2];
8
+
9
+ export const ThinkingDot = ({ className }: ThinkingDotProps) => (
10
+ <span
11
+ className={cn("inline-flex items-center gap-1", className)}
12
+ role="status"
13
+ aria-label="Thinking"
14
+ >
15
+ {frames.map((frame) => (
16
+ <span
17
+ key={frame}
18
+ className="size-1.5 rounded-full bg-blue-600 motion-reduce:animate-none motion-reduce:opacity-60 animate-[thinking-dot_1.8s_ease-in-out_infinite]"
19
+ style={{ animationDelay: `${frame * 0.3}s` }}
20
+ />
21
+ ))}
22
+ <style>{`
23
+ @keyframes thinking-dot {
24
+ 0%, 16.67%, 100% { opacity: 0.3; transform: scale(1); }
25
+ 8.33% { opacity: 1; transform: scale(1.25); }
26
+ 33.33% { opacity: 0.3; transform: scale(1); }
27
+ 41.67% { opacity: 1; transform: scale(1.25); }
28
+ 58.33% { opacity: 0.3; transform: scale(1); }
29
+ 66.67% { opacity: 1; transform: scale(1.25); }
30
+ 83.33% { opacity: 0.3; transform: scale(1); }
31
+ }
32
+ `}</style>
33
+ </span>
34
+ );
@@ -0,0 +1,42 @@
1
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
2
+ import { type ReactNode } from "react";
3
+ import { cn } from "../utils/cn";
4
+
5
+ export type TooltipSide = "top" | "right" | "bottom" | "left";
6
+
7
+ export type TooltipProps = {
8
+ children: ReactNode;
9
+ content: ReactNode;
10
+ hint?: boolean;
11
+ side?: TooltipSide;
12
+ className?: string;
13
+ };
14
+
15
+ export const TooltipProvider = TooltipPrimitive.Provider;
16
+
17
+ export const Tooltip = ({
18
+ children,
19
+ content,
20
+ hint = false,
21
+ side = "top",
22
+ className,
23
+ }: TooltipProps) => (
24
+ <TooltipPrimitive.Root>
25
+ <TooltipPrimitive.Trigger asChild>
26
+ <span className={cn("inline-flex", className)}>{children}</span>
27
+ </TooltipPrimitive.Trigger>
28
+ <TooltipPrimitive.Portal>
29
+ <TooltipPrimitive.Content
30
+ side={side}
31
+ sideOffset={6}
32
+ collisionPadding={8}
33
+ className={cn(
34
+ "z-[300] max-w-xs rounded-control bg-grey-900 px-2 py-1 text-footnote text-white shadow-raise2",
35
+ hint ? "whitespace-normal text-center leading-snug" : "whitespace-nowrap",
36
+ )}
37
+ >
38
+ {content}
39
+ </TooltipPrimitive.Content>
40
+ </TooltipPrimitive.Portal>
41
+ </TooltipPrimitive.Root>
42
+ );
@@ -0,0 +1,92 @@
1
+ export type ButtonHierarchy =
2
+ | "primary"
3
+ | "secondary"
4
+ | "tertiary"
5
+ | "quaternary"
6
+ | "destructive";
7
+
8
+ export type ButtonAppearance = "idle" | "hover" | "disabled";
9
+
10
+ type HierarchyStyleMap = Record<ButtonAppearance, string>;
11
+
12
+ const primaryStyles: HierarchyStyleMap = {
13
+ idle: "bg-action-primary-idle text-action-primary-on-idle",
14
+ hover: "bg-action-primary-hover text-action-primary-on-hover",
15
+ disabled: "bg-action-primary-disabled text-action-primary-on-disabled",
16
+ };
17
+
18
+ const secondaryStyles: HierarchyStyleMap = {
19
+ idle:
20
+ "border border-divider-primary bg-action-secondary-idle text-action-secondary-on-idle",
21
+ hover:
22
+ "border border-divider-secondary bg-action-secondary-hover text-action-secondary-on-hover",
23
+ disabled:
24
+ "border border-divider-primary bg-action-secondary-disabled text-action-secondary-on-disabled",
25
+ };
26
+
27
+ const tertiaryStyles: HierarchyStyleMap = {
28
+ idle: "bg-action-tertiary-idle text-action-tertiary-on-idle",
29
+ hover: "bg-action-tertiary-hover text-action-tertiary-on-hover",
30
+ disabled: "bg-action-tertiary-disabled text-action-tertiary-on-disabled",
31
+ };
32
+
33
+ const quaternaryStyles: HierarchyStyleMap = {
34
+ idle: "bg-action-quaternary-idle text-action-quaternary-on-idle",
35
+ hover: "bg-action-quaternary-hover text-action-quaternary-on-hover",
36
+ disabled: "bg-action-quaternary-disabled text-action-quaternary-on-disabled",
37
+ };
38
+
39
+ const destructiveStyles: HierarchyStyleMap = {
40
+ idle: "bg-action-destructive-idle text-action-destructive-on-idle",
41
+ hover: "bg-action-destructive-hover text-action-destructive-on-hover",
42
+ disabled:
43
+ "bg-action-destructive-disabled text-action-destructive-on-disabled",
44
+ };
45
+
46
+ const hierarchyStyles: Record<ButtonHierarchy, HierarchyStyleMap> = {
47
+ primary: primaryStyles,
48
+ secondary: secondaryStyles,
49
+ tertiary: tertiaryStyles,
50
+ quaternary: quaternaryStyles,
51
+ destructive: destructiveStyles,
52
+ };
53
+
54
+ const interactiveHierarchyStyles: Record<ButtonHierarchy, string> = {
55
+ primary:
56
+ "bg-action-primary-idle text-action-primary-on-idle hover:bg-action-primary-hover hover:text-action-primary-on-hover",
57
+ secondary:
58
+ "border border-divider-primary bg-action-secondary-idle text-action-secondary-on-idle hover:border-divider-secondary hover:bg-action-secondary-hover hover:text-action-secondary-on-hover",
59
+ tertiary:
60
+ "bg-action-tertiary-idle text-action-tertiary-on-idle hover:bg-action-tertiary-hover hover:text-action-tertiary-on-hover",
61
+ quaternary:
62
+ "bg-action-quaternary-idle text-action-quaternary-on-idle hover:bg-action-quaternary-hover hover:text-action-quaternary-on-hover",
63
+ destructive:
64
+ "bg-action-destructive-idle text-action-destructive-on-idle hover:bg-action-destructive-hover hover:text-action-destructive-on-hover",
65
+ };
66
+
67
+ const disabledHierarchyStyles: Record<ButtonHierarchy, string> = {
68
+ primary: "bg-action-primary-disabled text-action-primary-on-disabled",
69
+ secondary:
70
+ "border border-divider-primary bg-action-secondary-disabled text-action-secondary-on-disabled",
71
+ tertiary: "bg-action-tertiary-disabled text-action-tertiary-on-disabled",
72
+ quaternary:
73
+ "bg-action-quaternary-disabled text-action-quaternary-on-disabled",
74
+ destructive:
75
+ "bg-action-destructive-disabled text-action-destructive-on-disabled",
76
+ };
77
+
78
+ export const getButtonAppearanceClasses = (
79
+ hierarchy: ButtonHierarchy,
80
+ appearance: ButtonAppearance,
81
+ ) => hierarchyStyles[hierarchy][appearance];
82
+
83
+ export const getButtonInteractiveClasses = (
84
+ hierarchy: ButtonHierarchy,
85
+ disabled: boolean,
86
+ ) => {
87
+ if (disabled) {
88
+ return disabledHierarchyStyles[hierarchy];
89
+ }
90
+
91
+ return interactiveHierarchyStyles[hierarchy];
92
+ };
@@ -0,0 +1,18 @@
1
+ export type {
2
+ ButtonAppearance,
3
+ ButtonHierarchy,
4
+ } from "./button-styles";
5
+ export type { ButtonProps, ButtonDropdownOption } from "./Button";
6
+ export { Button } from "./Button";
7
+ export { IconButton, type IconButtonProps } from "./IconButton";
8
+ export { Logo, type LogoProps } from "./Logo";
9
+ export { Avatar, type AvatarProps } from "./Avatar";
10
+ export { GroupedAvatars, type GroupedAvatarsProps } from "./GroupedAvatars";
11
+ export { DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, type DropdownMenuProps } from "./DropdownMenu";
12
+ export { MenuItem, type MenuItemProps } from "./MenuItem";
13
+ export { Tooltip, TooltipProvider, type TooltipProps, type TooltipSide } from "./Tooltip";
14
+ export { ThinkingDot, type ThinkingDotProps } from "./ThinkingDot";
15
+ export { Count, type CountProps } from "./Count";
16
+ export { Switch, type SwitchProps } from "./Switch";
17
+ export { Badge, type BadgeProps, type BadgeColor, type BadgeType } from "./Badge";
18
+ export { Callout, type CalloutProps } from "./Callout";
@@ -0,0 +1,94 @@
1
+ import type { ReactNode } from "react";
2
+ import { cn } from "../../utils/cn";
3
+
4
+ type FigmaPageProps = {
5
+ title: string;
6
+ width: number;
7
+ children: ReactNode;
8
+ className?: string;
9
+ };
10
+
11
+ export const FigmaPage = ({ title, width, children, className }: FigmaPageProps) => (
12
+ <div
13
+ className={cn("bg-white font-sans text-display-on-light-primary", className)}
14
+ style={{ width }}
15
+ data-figma-page={title}
16
+ >
17
+ <div className="px-8 pt-8 pb-4">
18
+ <h1 className="font-heading text-heading text-display-on-light-primary">{title}</h1>
19
+ <p className="mt-2 text-caption-2 text-display-on-light-tertiary">AskChief Design System</p>
20
+ </div>
21
+ {children}
22
+ </div>
23
+ );
24
+
25
+ type FigmaContentProps = {
26
+ children: ReactNode;
27
+ padding?: number;
28
+ className?: string;
29
+ };
30
+
31
+ export const FigmaContent = ({ children, padding = 24, className }: FigmaContentProps) => (
32
+ <div className={cn("px-8 pb-8", className)} style={{ paddingLeft: 32, paddingRight: 32 }}>
33
+ <div style={{ padding }}>{children}</div>
34
+ </div>
35
+ );
36
+
37
+ type FigmaSectionProps = {
38
+ label?: string;
39
+ children: ReactNode;
40
+ className?: string;
41
+ };
42
+
43
+ export const FigmaSection = ({ label, children, className }: FigmaSectionProps) => (
44
+ <div className={cn("mb-6", className)}>
45
+ {label && (
46
+ <p className="mb-3 text-caption-2-em text-display-on-light-tertiary">{label}</p>
47
+ )}
48
+ {children}
49
+ </div>
50
+ );
51
+
52
+ type FigmaGridProps = {
53
+ children: ReactNode;
54
+ gap?: number;
55
+ className?: string;
56
+ };
57
+
58
+ export const FigmaGrid = ({ children, gap = 16, className }: FigmaGridProps) => (
59
+ <div className={cn("flex flex-wrap items-center", className)} style={{ gap }}>
60
+ {children}
61
+ </div>
62
+ );
63
+
64
+ type FigmaRowProps = {
65
+ label?: string;
66
+ children: ReactNode;
67
+ gap?: number;
68
+ className?: string;
69
+ };
70
+
71
+ export const FigmaRow = ({ label, children, gap = 16, className }: FigmaRowProps) => (
72
+ <div className={cn("mb-4", className)}>
73
+ {label && (
74
+ <p className="mb-2 w-24 text-caption-2 text-display-on-light-quaternary">{label}</p>
75
+ )}
76
+ <FigmaGrid gap={gap}>{children}</FigmaGrid>
77
+ </div>
78
+ );
79
+
80
+ type FigmaVariantProps = {
81
+ label?: string;
82
+ children: ReactNode;
83
+ className?: string;
84
+ };
85
+
86
+ /** Wraps a single variant for static snapshot display */
87
+ export const FigmaVariant = ({ label, children, className }: FigmaVariantProps) => (
88
+ <div className={cn("flex flex-col items-center gap-1", className)}>
89
+ <div>{children}</div>
90
+ {label && (
91
+ <span className="text-footnote text-display-on-light-quaternary">{label}</span>
92
+ )}
93
+ </div>
94
+ );
@@ -0,0 +1,8 @@
1
+ export {
2
+ FigmaPage,
3
+ FigmaContent,
4
+ FigmaSection,
5
+ FigmaGrid,
6
+ FigmaRow,
7
+ FigmaVariant,
8
+ } from "./FigmaPage";
@@ -0,0 +1,107 @@
1
+ import { AttachmentIcon } from "../../icons";
2
+ import { Button } from "../../primitives";
3
+ import { FigmaContent, FigmaPage, FigmaSection } from "../_layout";
4
+ import { FIGMA_WIDTHS } from "./figma-widths";
5
+ import {
6
+ BUTTON_VARIANT_SLOTS,
7
+ FIGMA_BUTTON_SLOTS,
8
+ FIGMA_BUTTONS_CANVAS,
9
+ FIGMA_BUTTONS_GRID,
10
+ type ButtonVisualState,
11
+ } from "./figma-buttons-layout";
12
+ import { IconButtonSnapshot } from "./helpers";
13
+
14
+ const demoDropdownOptions = [
15
+ { label: "Option A", onSelect: () => undefined },
16
+ { label: "Option B", onSelect: () => undefined },
17
+ ];
18
+
19
+ const slotProps = (visualState: ButtonVisualState) => ({
20
+ forcedState: visualState === "idle" ? undefined : visualState,
21
+ disabled: visualState === "disabled",
22
+ });
23
+
24
+ export const ButtonsCanvas = () => (
25
+ <FigmaPage title="Buttons" width={FIGMA_WIDTHS.buttons}>
26
+ <FigmaContent padding={0}>
27
+ <div className="px-8 pb-8 pt-6">
28
+ <FigmaSection label="Button">
29
+ <div
30
+ className="relative"
31
+ style={{
32
+ width: FIGMA_BUTTONS_CANVAS.width,
33
+ height: FIGMA_BUTTONS_CANVAS.height,
34
+ }}
35
+ >
36
+ <div
37
+ data-figma-buttons-grid
38
+ className="absolute left-0 top-0"
39
+ style={{
40
+ width: FIGMA_BUTTONS_GRID.width,
41
+ height: FIGMA_BUTTONS_GRID.height,
42
+ }}
43
+ >
44
+ {FIGMA_BUTTON_SLOTS.map((slot) => (
45
+ <div
46
+ key={`${slot.hierarchy}-${slot.visualState}`}
47
+ className="absolute"
48
+ style={{ left: slot.x, top: slot.y }}
49
+ >
50
+ <Button
51
+ hierarchy={slot.hierarchy}
52
+ icon={AttachmentIcon}
53
+ dropdownOptions={demoDropdownOptions}
54
+ {...slotProps(slot.visualState)}
55
+ >
56
+ Button
57
+ </Button>
58
+ </div>
59
+ ))}
60
+ </div>
61
+
62
+ {BUTTON_VARIANT_SLOTS.map((slot) => (
63
+ <div
64
+ key={`${slot.hierarchy}-${slot.variant}`}
65
+ data-visual-test-only
66
+ className="absolute"
67
+ style={{ left: slot.x, top: slot.y }}
68
+ >
69
+ {slot.variant === "noIcon" ? (
70
+ <Button
71
+ hierarchy={slot.hierarchy}
72
+ dropdownOptions={demoDropdownOptions}
73
+ >
74
+ Button
75
+ </Button>
76
+ ) : (
77
+ <Button hierarchy={slot.hierarchy} icon={AttachmentIcon}>
78
+ Button
79
+ </Button>
80
+ )}
81
+ </div>
82
+ ))}
83
+ </div>
84
+ </FigmaSection>
85
+
86
+ <FigmaSection label="Icon Button" className="mt-8">
87
+ <div className="flex flex-wrap items-center gap-6">
88
+ <IconButtonSnapshot hierarchy="tertiary" visualState="idle" />
89
+ <IconButtonSnapshot hierarchy="tertiary" visualState="hover" />
90
+ <IconButtonSnapshot hierarchy="quaternary" visualState="idle" />
91
+ <IconButtonSnapshot hierarchy="quaternary" visualState="hover" />
92
+ <IconButtonSnapshot
93
+ hierarchy="quaternary"
94
+ visualState="idle"
95
+ size="small"
96
+ />
97
+ <IconButtonSnapshot
98
+ hierarchy="quaternary"
99
+ visualState="hover"
100
+ size="small"
101
+ />
102
+ </div>
103
+ </FigmaSection>
104
+ </div>
105
+ </FigmaContent>
106
+ </FigmaPage>
107
+ );
@@ -0,0 +1,65 @@
1
+ import { AddIcon } from "../../icons";
2
+ import { Button } from "../../primitives";
3
+ import {
4
+ FigmaContent,
5
+ FigmaPage,
6
+ FigmaRow,
7
+ FigmaSection,
8
+ } from "../_layout";
9
+ import { ButtonSnapshot } from "./helpers";
10
+ import { FIGMA_WIDTHS } from "./figma-widths";
11
+
12
+ const hierarchies = [
13
+ "primary",
14
+ "secondary",
15
+ "tertiary",
16
+ "quaternary",
17
+ "destructive",
18
+ ] as const;
19
+ const columnLabels = ["Primary", "Secondary", "Tertiary", "Quaternary", "Destructive"];
20
+ const rowLabels = ["Idle", "Hover", "Disabled"];
21
+
22
+ export const ButtonsMatrixCanvas = () => (
23
+ <FigmaPage title="Buttons" width={FIGMA_WIDTHS.buttonsMatrix}>
24
+ <FigmaContent>
25
+ <FigmaSection>
26
+ <div className="mb-4 grid grid-cols-[104px_repeat(5,1fr)] gap-4">
27
+ <div />
28
+ {columnLabels.map((label) => (
29
+ <p key={label} className="text-center text-caption-1 text-display-on-light-secondary">
30
+ {label}
31
+ </p>
32
+ ))}
33
+ </div>
34
+
35
+ {rowLabels.map((rowLabel) => (
36
+ <FigmaRow key={rowLabel} label={rowLabel} gap={24}>
37
+ <div className="w-24" />
38
+ {hierarchies.map((hierarchy) => (
39
+ <ButtonSnapshot
40
+ key={hierarchy}
41
+ hierarchy={hierarchy}
42
+ visualState={rowLabel.toLowerCase() as "idle" | "hover" | "disabled"}
43
+ />
44
+ ))}
45
+ </FigmaRow>
46
+ ))}
47
+
48
+ <FigmaRow label="Idle" gap={24}>
49
+ <div className="w-24" />
50
+ <Button icon={<AddIcon size="small" />} className="min-w-[304px]">
51
+ New chat
52
+ </Button>
53
+ </FigmaRow>
54
+
55
+ <FigmaRow label="Hover" gap={24}>
56
+ <div className="w-24" />
57
+ <span className="inline-flex min-h-10 min-w-[304px] items-center justify-center gap-2 rounded-control bg-action-primary-hover px-2 text-caption-1 text-action-primary-on-hover">
58
+ <AddIcon />
59
+ New chat
60
+ </span>
61
+ </FigmaRow>
62
+ </FigmaSection>
63
+ </FigmaContent>
64
+ </FigmaPage>
65
+ );