@lateralus-ai/shipping-ui 1.4.15 → 2.0.0-dev.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 (438) 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 +13 -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/ModalPanel.d.ts +7 -7
  10. package/dist/components/PdfViewer/ImageViewer.d.ts +2 -2
  11. package/dist/components/PdfViewer/PdfViewer.d.ts +2 -2
  12. package/dist/components/ReportInput.d.ts +10 -0
  13. package/dist/components/Tab.d.ts +7 -0
  14. package/dist/components/Tabs.d.ts +11 -12
  15. package/dist/components/index.d.ts +11 -4
  16. package/dist/domain/Filters/FilterPill.d.ts +6 -0
  17. package/dist/domain/Filters/FilteredPill.d.ts +8 -0
  18. package/dist/domain/Filters/FiltersBar.d.ts +12 -0
  19. package/dist/domain/Filters/index.d.ts +3 -0
  20. package/dist/domain/Forms/FormCard.d.ts +12 -0
  21. package/dist/domain/Forms/FormHeader.d.ts +8 -0
  22. package/dist/domain/Forms/ListRow.d.ts +8 -0
  23. package/dist/domain/Forms/RiskMeter.d.ts +8 -0
  24. package/dist/domain/Forms/index.d.ts +4 -0
  25. package/dist/domain/Library/File.d.ts +8 -0
  26. package/dist/domain/Library/Folder.d.ts +8 -0
  27. package/dist/domain/Library/Folders.d.ts +11 -0
  28. package/dist/domain/Library/ListRow.d.ts +8 -0
  29. package/dist/domain/Library/Navigation.d.ts +7 -0
  30. package/dist/domain/Library/index.d.ts +5 -0
  31. package/dist/domain/Report/InfoHeading.d.ts +7 -0
  32. package/dist/domain/Report/InfoRow.d.ts +8 -0
  33. package/dist/domain/Report/Report.d.ts +7 -0
  34. package/dist/domain/Report/SectionHeader.d.ts +10 -0
  35. package/dist/domain/Report/TaskRow.d.ts +11 -0
  36. package/dist/domain/Report/index.d.ts +5 -0
  37. package/dist/domain/Settings/EquipmentRow.d.ts +8 -0
  38. package/dist/domain/Settings/MemberRow.d.ts +11 -0
  39. package/dist/domain/Settings/SettingRow.d.ts +10 -0
  40. package/dist/domain/Settings/index.d.ts +3 -0
  41. package/dist/domain/Ships/ShipRow.d.ts +10 -0
  42. package/dist/domain/Ships/index.d.ts +1 -0
  43. package/dist/domain/Workflows/GroupHeader.d.ts +8 -0
  44. package/dist/domain/Workflows/Importance.d.ts +8 -0
  45. package/dist/domain/Workflows/Progress.d.ts +7 -0
  46. package/dist/domain/Workflows/Question.d.ts +9 -0
  47. package/dist/domain/Workflows/StatusPopover.d.ts +7 -0
  48. package/dist/domain/Workflows/Task.d.ts +9 -0
  49. package/dist/domain/Workflows/TaskHeader.d.ts +9 -0
  50. package/dist/domain/Workflows/WorkflowFilters.d.ts +6 -0
  51. package/dist/domain/Workflows/WorkflowForm.d.ts +8 -0
  52. package/dist/domain/Workflows/WorkflowHeader.d.ts +11 -0
  53. package/dist/domain/Workflows/WorkflowListItem.d.ts +11 -0
  54. package/dist/domain/Workflows/WorkflowProgress.d.ts +6 -0
  55. package/dist/domain/Workflows/WorkflowRow.d.ts +10 -0
  56. package/dist/domain/Workflows/index.d.ts +13 -0
  57. package/dist/domain/index.d.ts +7 -0
  58. package/dist/icons/ArrowIcon.d.ts +8 -0
  59. package/dist/icons/ChevronIcon.d.ts +8 -0
  60. package/dist/icons/Icon.d.ts +96 -0
  61. package/dist/icons/arrow-paths.d.ts +12 -0
  62. package/dist/icons/chevron-paths.d.ts +27 -0
  63. package/dist/icons/createIcon.d.ts +34 -0
  64. package/dist/icons/generated.d.ts +68 -0
  65. package/dist/icons/icon-sizes.d.ts +5 -0
  66. package/dist/icons/icons-data.d.ts +1023 -0
  67. package/dist/icons/index.d.ts +13 -0
  68. package/dist/icons/types.d.ts +10 -0
  69. package/dist/illustrations/AuditPreparation.d.ts +4 -0
  70. package/dist/illustrations/CompletedTasks.d.ts +4 -0
  71. package/dist/illustrations/Creation.d.ts +4 -0
  72. package/dist/illustrations/InternalAudit.d.ts +4 -0
  73. package/dist/illustrations/Invite.d.ts +4 -0
  74. package/dist/illustrations/PortStateControl.d.ts +4 -0
  75. package/dist/illustrations/Processing.d.ts +4 -0
  76. package/dist/illustrations/QuestionsDone.d.ts +4 -0
  77. package/dist/illustrations/RightShipInspection.d.ts +4 -0
  78. package/dist/illustrations/Upload.d.ts +4 -0
  79. package/dist/illustrations/WorkflowCreated.d.ts +4 -0
  80. package/dist/illustrations/Workflows.d.ts +4 -0
  81. package/dist/illustrations/createIllustration.d.ts +11 -0
  82. package/dist/illustrations/index.d.ts +13 -0
  83. package/dist/index.cjs +64 -80
  84. package/dist/index.d.ts +9 -3
  85. package/dist/index.esm.js +10964 -36537
  86. package/dist/patterns/Chat/Attachment.d.ts +6 -0
  87. package/dist/patterns/Chat/ChatEntry.d.ts +10 -0
  88. package/dist/patterns/Chat/ChatHeader.d.ts +7 -0
  89. package/dist/patterns/Chat/ChatInput.d.ts +5 -0
  90. package/dist/patterns/Chat/ChatStatus.d.ts +6 -0
  91. package/dist/patterns/Chat/ChatTile.d.ts +9 -0
  92. package/dist/patterns/Chat/Copilot.d.ts +8 -0
  93. package/dist/patterns/Chat/Draft.d.ts +5 -0
  94. package/dist/patterns/Chat/Greeting.d.ts +7 -0
  95. package/dist/patterns/Chat/Reference.d.ts +6 -0
  96. package/dist/patterns/Chat/Source.d.ts +6 -0
  97. package/dist/patterns/Chat/Sources.d.ts +5 -0
  98. package/dist/patterns/Chat/Suggestion.d.ts +5 -0
  99. package/dist/patterns/Chat/Suggestions.d.ts +4 -0
  100. package/dist/patterns/Chat/index.d.ts +14 -0
  101. package/dist/patterns/Modal/Invitee.d.ts +8 -0
  102. package/dist/patterns/Modal/ModalFooter.d.ts +6 -0
  103. package/dist/patterns/Modal/ModalHeader.d.ts +10 -0
  104. package/dist/patterns/Modal/index.d.ts +3 -0
  105. package/dist/patterns/Search/Pill.d.ts +10 -0
  106. package/dist/patterns/Search/PillInfo.d.ts +8 -0
  107. package/dist/patterns/Search/ResultRow.d.ts +10 -0
  108. package/dist/patterns/Search/SearchModal.d.ts +6 -0
  109. package/dist/patterns/Search/SectionHeader.d.ts +5 -0
  110. package/dist/patterns/Search/index.d.ts +5 -0
  111. package/dist/patterns/Sidebar/Account.d.ts +22 -0
  112. package/dist/patterns/Sidebar/ActivityNavGroup.d.ts +17 -0
  113. package/dist/patterns/Sidebar/CollapsibleNavGroup.d.ts +24 -0
  114. package/dist/patterns/Sidebar/Indicator.d.ts +6 -0
  115. package/dist/patterns/Sidebar/NewChat.d.ts +10 -0
  116. package/dist/patterns/Sidebar/Sidebar.d.ts +13 -0
  117. package/dist/patterns/Sidebar/SidebarAction.d.ts +11 -0
  118. package/dist/patterns/Sidebar/SidebarEntry.d.ts +25 -0
  119. package/dist/patterns/Sidebar/SidebarHeading.d.ts +11 -0
  120. package/dist/patterns/Sidebar/SidebarLink.d.ts +22 -0
  121. package/dist/patterns/Sidebar/SidebarShell.d.ts +11 -0
  122. package/dist/patterns/Sidebar/Switcher.d.ts +8 -0
  123. package/dist/patterns/Sidebar/constants.d.ts +2 -0
  124. package/dist/patterns/Sidebar/figma-assets.d.ts +3 -0
  125. package/dist/patterns/Sidebar/figma-demo-content.d.ts +75 -0
  126. package/dist/patterns/Sidebar/figma-sidebar-nav.d.ts +12 -0
  127. package/dist/patterns/Sidebar/index.d.ts +13 -0
  128. package/dist/patterns/Sidebar/sidebar-styles.d.ts +45 -0
  129. package/dist/patterns/Skeleton/Skeleton.d.ts +6 -0
  130. package/dist/patterns/Skeleton/index.d.ts +1 -0
  131. package/dist/patterns/index.d.ts +5 -0
  132. package/dist/primitives/Avatar.d.ts +10 -0
  133. package/dist/primitives/Badge.d.ts +11 -0
  134. package/dist/primitives/Button.d.ts +13 -0
  135. package/dist/primitives/Callout.d.ts +7 -0
  136. package/dist/primitives/Count.d.ts +5 -0
  137. package/dist/primitives/DropdownMenu.d.ts +15 -0
  138. package/dist/primitives/GroupedAvatars.d.ts +7 -0
  139. package/dist/primitives/IconButton.d.ts +16 -0
  140. package/dist/primitives/Logo.d.ts +8 -0
  141. package/dist/primitives/MenuItem.d.ts +7 -0
  142. package/dist/primitives/Switch.d.ts +7 -0
  143. package/dist/primitives/ThinkingDot.d.ts +4 -0
  144. package/dist/primitives/Tooltip.d.ts +12 -0
  145. package/dist/primitives/index.d.ts +13 -0
  146. package/dist/style.css +1 -1
  147. package/dist/tailwind-theme.d.ts +234 -198
  148. package/dist/tokens/colors.d.ts +148 -0
  149. package/dist/tokens/elevation.d.ts +11 -0
  150. package/dist/tokens/index.d.ts +4 -0
  151. package/dist/tokens/semantic.d.ts +89 -0
  152. package/dist/tokens/typography.d.ts +85 -0
  153. package/package.json +27 -5
  154. package/src/components/Checkbox.tsx +77 -0
  155. package/src/components/Chip.tsx +69 -0
  156. package/src/components/EmptyState.tsx +44 -0
  157. package/src/components/Entry.tsx +64 -0
  158. package/src/components/Header.tsx +39 -0
  159. package/src/components/Input.tsx +69 -0
  160. package/src/components/InputType.tsx +76 -0
  161. package/src/components/ModalPanel.tsx +22 -37
  162. package/src/components/PdfViewer/ImageViewer.tsx +121 -182
  163. package/src/components/PdfViewer/PdfViewer.tsx +103 -155
  164. package/src/components/ReportInput.tsx +65 -0
  165. package/src/components/Tab.tsx +33 -0
  166. package/src/components/Tabs.tsx +43 -38
  167. package/src/components/index.ts +11 -4
  168. package/src/domain/Filters/FilterPill.tsx +25 -0
  169. package/src/domain/Filters/FilteredPill.tsx +39 -0
  170. package/src/domain/Filters/FiltersBar.tsx +76 -0
  171. package/src/domain/Filters/index.ts +3 -0
  172. package/src/domain/Forms/FormCard.tsx +61 -0
  173. package/src/domain/Forms/FormHeader.tsx +34 -0
  174. package/src/domain/Forms/ListRow.tsx +40 -0
  175. package/src/domain/Forms/RiskMeter.tsx +50 -0
  176. package/src/domain/Forms/index.ts +4 -0
  177. package/src/domain/Library/File.tsx +59 -0
  178. package/src/domain/Library/Folder.tsx +55 -0
  179. package/src/domain/Library/Folders.tsx +43 -0
  180. package/src/domain/Library/ListRow.tsx +40 -0
  181. package/src/domain/Library/Navigation.tsx +31 -0
  182. package/src/domain/Library/index.ts +5 -0
  183. package/src/domain/Report/InfoHeading.tsx +25 -0
  184. package/src/domain/Report/InfoRow.tsx +35 -0
  185. package/src/domain/Report/Report.tsx +53 -0
  186. package/src/domain/Report/SectionHeader.tsx +43 -0
  187. package/src/domain/Report/TaskRow.tsx +57 -0
  188. package/src/domain/Report/index.ts +5 -0
  189. package/src/domain/Settings/EquipmentRow.tsx +39 -0
  190. package/src/domain/Settings/MemberRow.tsx +53 -0
  191. package/src/domain/Settings/SettingRow.tsx +66 -0
  192. package/src/domain/Settings/index.ts +3 -0
  193. package/src/domain/Ships/ShipRow.tsx +49 -0
  194. package/src/domain/Ships/index.ts +1 -0
  195. package/src/domain/Workflows/GroupHeader.tsx +48 -0
  196. package/src/domain/Workflows/Importance.tsx +48 -0
  197. package/src/domain/Workflows/Progress.tsx +55 -0
  198. package/src/domain/Workflows/Question.tsx +42 -0
  199. package/src/domain/Workflows/StatusPopover.tsx +53 -0
  200. package/src/domain/Workflows/Task.tsx +46 -0
  201. package/src/domain/Workflows/TaskHeader.tsx +51 -0
  202. package/src/domain/Workflows/WorkflowFilters.tsx +40 -0
  203. package/src/domain/Workflows/WorkflowForm.tsx +40 -0
  204. package/src/domain/Workflows/WorkflowHeader.tsx +62 -0
  205. package/src/domain/Workflows/WorkflowListItem.tsx +45 -0
  206. package/src/domain/Workflows/WorkflowProgress.tsx +36 -0
  207. package/src/domain/Workflows/WorkflowRow.tsx +43 -0
  208. package/src/domain/Workflows/index.ts +13 -0
  209. package/src/domain/index.ts +37 -0
  210. package/src/icons/ArrowIcon.tsx +42 -0
  211. package/src/icons/ChevronIcon.tsx +42 -0
  212. package/src/icons/Icon.tsx +184 -0
  213. package/src/icons/arrow-paths.ts +8 -0
  214. package/src/icons/chevron-paths.ts +17 -0
  215. package/src/icons/createIcon.tsx +128 -0
  216. package/src/icons/generated.tsx +71 -0
  217. package/src/icons/icon-sizes.ts +20 -0
  218. package/src/icons/icons-data.ts +656 -0
  219. package/src/icons/index.ts +25 -0
  220. package/src/icons/types.ts +18 -0
  221. package/src/illustrations/AuditPreparation.tsx +15 -0
  222. package/src/illustrations/CompletedTasks.tsx +16 -0
  223. package/src/illustrations/Creation.tsx +13 -0
  224. package/src/illustrations/InternalAudit.tsx +13 -0
  225. package/src/illustrations/Invite.tsx +13 -0
  226. package/src/illustrations/PortStateControl.tsx +13 -0
  227. package/src/illustrations/Processing.tsx +17 -0
  228. package/src/illustrations/QuestionsDone.tsx +16 -0
  229. package/src/illustrations/RightShipInspection.tsx +18 -0
  230. package/src/illustrations/Upload.tsx +12 -0
  231. package/src/illustrations/WorkflowCreated.tsx +13 -0
  232. package/src/illustrations/Workflows.tsx +13 -0
  233. package/src/illustrations/createIllustration.tsx +30 -0
  234. package/src/illustrations/index.ts +14 -0
  235. package/src/index.ts +49 -3
  236. package/src/patterns/Chat/Attachment.tsx +27 -0
  237. package/src/patterns/Chat/ChatEntry.tsx +41 -0
  238. package/src/patterns/Chat/ChatHeader.tsx +39 -0
  239. package/src/patterns/Chat/ChatInput.tsx +35 -0
  240. package/src/patterns/Chat/ChatStatus.tsx +26 -0
  241. package/src/patterns/Chat/ChatTile.tsx +40 -0
  242. package/src/patterns/Chat/Copilot.tsx +50 -0
  243. package/src/patterns/Chat/Draft.tsx +23 -0
  244. package/src/patterns/Chat/Greeting.tsx +32 -0
  245. package/src/patterns/Chat/Reference.tsx +26 -0
  246. package/src/patterns/Chat/Source.tsx +27 -0
  247. package/src/patterns/Chat/Sources.tsx +23 -0
  248. package/src/patterns/Chat/Suggestion.tsx +23 -0
  249. package/src/patterns/Chat/Suggestions.tsx +21 -0
  250. package/src/patterns/Chat/index.ts +14 -0
  251. package/src/patterns/Modal/Invitee.tsx +44 -0
  252. package/src/patterns/Modal/ModalFooter.tsx +39 -0
  253. package/src/patterns/Modal/ModalHeader.tsx +77 -0
  254. package/src/patterns/Modal/index.ts +3 -0
  255. package/src/patterns/Search/Pill.tsx +44 -0
  256. package/src/patterns/Search/PillInfo.tsx +41 -0
  257. package/src/patterns/Search/ResultRow.tsx +52 -0
  258. package/src/patterns/Search/SearchModal.tsx +88 -0
  259. package/src/patterns/Search/SectionHeader.tsx +20 -0
  260. package/src/patterns/Search/index.ts +5 -0
  261. package/src/patterns/Sidebar/Account.tsx +193 -0
  262. package/src/patterns/Sidebar/ActivityNavGroup.tsx +71 -0
  263. package/src/patterns/Sidebar/CollapsibleNavGroup.tsx +106 -0
  264. package/src/patterns/Sidebar/Indicator.tsx +14 -0
  265. package/src/patterns/Sidebar/NewChat.tsx +71 -0
  266. package/src/patterns/Sidebar/Sidebar.tsx +363 -0
  267. package/src/patterns/Sidebar/SidebarAction.tsx +55 -0
  268. package/src/patterns/Sidebar/SidebarEntry.tsx +129 -0
  269. package/src/patterns/Sidebar/SidebarHeading.tsx +38 -0
  270. package/src/patterns/Sidebar/SidebarLink.tsx +125 -0
  271. package/src/patterns/Sidebar/SidebarShell.tsx +32 -0
  272. package/src/patterns/Sidebar/Switcher.tsx +116 -0
  273. package/src/patterns/Sidebar/assets/account-avatar-24.jpg +0 -0
  274. package/src/patterns/Sidebar/assets/account-avatar.jpg +0 -0
  275. package/src/patterns/Sidebar/assets/indicator-compliance.png +0 -0
  276. package/src/patterns/Sidebar/assets/indicator-technical.png +0 -0
  277. package/src/patterns/Sidebar/assets/logo-compliance-mark.png +5 -0
  278. package/src/patterns/Sidebar/assets/logo-compliance-mask.png +13 -0
  279. package/src/patterns/Sidebar/assets/logo-compliance.svg +17 -0
  280. package/src/patterns/Sidebar/assets/logo-technical-avatar.svg +17 -0
  281. package/src/patterns/Sidebar/assets/logo-technical-mark.png +5 -0
  282. package/src/patterns/Sidebar/assets/logo-technical.svg +16 -0
  283. package/src/patterns/Sidebar/constants.ts +2 -0
  284. package/src/patterns/Sidebar/figma-assets.ts +4 -0
  285. package/src/patterns/Sidebar/figma-demo-content.ts +30 -0
  286. package/src/patterns/Sidebar/figma-sidebar-nav.ts +79 -0
  287. package/src/patterns/Sidebar/index.ts +13 -0
  288. package/src/patterns/Sidebar/sidebar-styles.ts +101 -0
  289. package/src/patterns/Skeleton/Skeleton.tsx +57 -0
  290. package/src/patterns/Skeleton/index.ts +1 -0
  291. package/src/patterns/index.ts +5 -0
  292. package/src/primitives/Avatar.tsx +71 -0
  293. package/src/primitives/Badge.tsx +34 -0
  294. package/src/primitives/Button.tsx +67 -0
  295. package/src/primitives/Callout.tsx +21 -0
  296. package/src/primitives/Count.tsx +18 -0
  297. package/src/primitives/DropdownMenu.tsx +60 -0
  298. package/src/primitives/GroupedAvatars.tsx +36 -0
  299. package/src/primitives/IconButton.tsx +56 -0
  300. package/src/primitives/Logo.tsx +43 -0
  301. package/src/primitives/MenuItem.tsx +35 -0
  302. package/src/primitives/Switch.tsx +38 -0
  303. package/src/primitives/ThinkingDot.tsx +34 -0
  304. package/src/primitives/Tooltip.tsx +42 -0
  305. package/src/primitives/index.ts +13 -0
  306. package/src/stories/_layout/FigmaPage.tsx +94 -0
  307. package/src/stories/_layout/index.ts +8 -0
  308. package/src/stories/canvases/ButtonsCanvas.tsx +57 -0
  309. package/src/stories/canvases/ButtonsMatrixCanvas.tsx +64 -0
  310. package/src/stories/canvases/ChatCanvas.tsx +130 -0
  311. package/src/stories/canvases/ColorTokensCanvas.tsx +16 -0
  312. package/src/stories/canvases/ColorsCanvas.tsx +101 -0
  313. package/src/stories/canvases/ContentCanvas.tsx +88 -0
  314. package/src/stories/canvases/CoreCanvas.tsx +125 -0
  315. package/src/stories/canvases/DomainFormsCanvas.tsx +67 -0
  316. package/src/stories/canvases/FiltersCanvas.tsx +41 -0
  317. package/src/stories/canvases/FormsCanvas.tsx +71 -0
  318. package/src/stories/canvases/IconsCanvas.tsx +99 -0
  319. package/src/stories/canvases/IllustrationsCanvas.tsx +50 -0
  320. package/src/stories/canvases/LibraryCanvas.tsx +67 -0
  321. package/src/stories/canvases/ModalsCanvas.tsx +54 -0
  322. package/src/stories/canvases/RaiseLevelsCanvas.tsx +27 -0
  323. package/src/stories/canvases/ReportCanvas.tsx +33 -0
  324. package/src/stories/canvases/ReportLayoutCanvas.tsx +19 -0
  325. package/src/stories/canvases/SearchCanvas.tsx +65 -0
  326. package/src/stories/canvases/SettingsCanvas.tsx +41 -0
  327. package/src/stories/canvases/ShipsCanvas.tsx +38 -0
  328. package/src/stories/canvases/SidebarCanvas.tsx +147 -0
  329. package/src/stories/canvases/SidebarLayoutsCanvas.tsx +71 -0
  330. package/src/stories/canvases/SidebarPlayground.tsx +35 -0
  331. package/src/stories/canvases/SkeletonsCanvas.tsx +30 -0
  332. package/src/stories/canvases/TypographyCanvas.tsx +53 -0
  333. package/src/stories/canvases/WorkflowsCanvas.tsx +129 -0
  334. package/src/stories/canvases/figma-icons-layout.ts +318 -0
  335. package/src/stories/canvases/figma-sidebar-layout.ts +212 -0
  336. package/src/stories/canvases/figma-sidebar-layouts-layout.ts +84 -0
  337. package/src/stories/canvases/figma-widths.ts +28 -0
  338. package/src/stories/canvases/helpers.tsx +163 -0
  339. package/src/stories/components/Buttons.stories.tsx +12 -0
  340. package/src/stories/components/Chat.stories.tsx +12 -0
  341. package/src/stories/components/Content.stories.tsx +12 -0
  342. package/src/stories/components/Core.stories.tsx +12 -0
  343. package/src/stories/components/DomainForms.stories.tsx +12 -0
  344. package/src/stories/components/Filters.stories.tsx +12 -0
  345. package/src/stories/components/Forms.stories.tsx +12 -0
  346. package/src/stories/components/Icons.stories.tsx +12 -0
  347. package/src/stories/components/Illustrations.stories.tsx +12 -0
  348. package/src/stories/components/Library.stories.tsx +12 -0
  349. package/src/stories/components/Modals.stories.tsx +12 -0
  350. package/src/stories/components/Report.stories.tsx +12 -0
  351. package/src/stories/components/ReportLayout.stories.tsx +12 -0
  352. package/src/stories/components/Search.stories.tsx +12 -0
  353. package/src/stories/components/Settings.stories.tsx +12 -0
  354. package/src/stories/components/Ships.stories.tsx +12 -0
  355. package/src/stories/components/Sidebar.stories.tsx +37 -0
  356. package/src/stories/components/SidebarLayouts.stories.tsx +12 -0
  357. package/src/stories/components/Skeletons.stories.tsx +12 -0
  358. package/src/stories/components/Workflows.stories.tsx +12 -0
  359. package/src/stories/style-guide/Buttons.stories.tsx +12 -0
  360. package/src/stories/style-guide/ColorTokens.stories.tsx +12 -0
  361. package/src/stories/style-guide/Colors.stories.tsx +12 -0
  362. package/src/stories/style-guide/RaiseLevels.stories.tsx +12 -0
  363. package/src/stories/style-guide/Typography.stories.tsx +12 -0
  364. package/src/style.css +169 -2
  365. package/src/tailwind-theme.ts +164 -240
  366. package/src/tokens/colors.ts +82 -0
  367. package/src/tokens/elevation.ts +12 -0
  368. package/src/tokens/index.ts +4 -0
  369. package/src/tokens/semantic.ts +89 -0
  370. package/src/tokens/typography.ts +21 -0
  371. package/dist/components/HelloWorld.d.ts +0 -1
  372. package/dist/components/InputPrompt.d.ts +0 -20
  373. package/dist/components/SearchModal.d.ts +0 -24
  374. package/dist/components/Sidebar/Button.d.ts +0 -7
  375. package/dist/components/Sidebar/Container.d.ts +0 -5
  376. package/dist/components/Sidebar/Item.d.ts +0 -9
  377. package/dist/components/Sidebar/Layout.d.ts +0 -10
  378. package/dist/components/Sidebar/Provider.d.ts +0 -14
  379. package/dist/components/Sidebar/SecondaryItem.d.ts +0 -9
  380. package/dist/components/Sidebar/SideContainer.d.ts +0 -5
  381. package/dist/components/Sidebar/ToggleCollapseButton.d.ts +0 -1
  382. package/dist/components/Sidebar/index.d.ts +0 -8
  383. package/dist/components/icons/CloseSidebarIcon.d.ts +0 -2
  384. package/dist/components/icons/CloseSidebarMidIcon.d.ts +0 -1
  385. package/dist/components/icons/ExpandIcon.d.ts +0 -3
  386. package/dist/components/icons/SendArrowIcon.d.ts +0 -4
  387. package/dist/components/icons/SendArrowIconGreen.d.ts +0 -4
  388. package/dist/components/icons/SettingsIcon.d.ts +0 -3
  389. package/dist/components/icons/XIcon.d.ts +0 -3
  390. package/dist/material-theme.d.ts +0 -442
  391. package/dist/stories/Buttons.d.ts +0 -1
  392. package/dist/stories/Checkbox.d.ts +0 -1
  393. package/dist/stories/ColorPalette.d.ts +0 -1
  394. package/dist/stories/Dropdowns.d.ts +0 -1
  395. package/dist/stories/InputPrompt.d.ts +0 -1
  396. package/dist/stories/SearchModal.d.ts +0 -1
  397. package/dist/stories/Sidebar.d.ts +0 -1
  398. package/dist/stories/Typography.d.ts +0 -1
  399. package/src/components/HelloWorld.tsx +0 -3
  400. package/src/components/InputPrompt.tsx +0 -96
  401. package/src/components/SearchModal.tsx +0 -320
  402. package/src/components/Sidebar/Button.tsx +0 -20
  403. package/src/components/Sidebar/Container.tsx +0 -31
  404. package/src/components/Sidebar/Item.tsx +0 -39
  405. package/src/components/Sidebar/Layout.tsx +0 -32
  406. package/src/components/Sidebar/Provider.tsx +0 -47
  407. package/src/components/Sidebar/SecondaryItem.tsx +0 -39
  408. package/src/components/Sidebar/SideContainer.tsx +0 -31
  409. package/src/components/Sidebar/ToggleCollapseButton.tsx +0 -24
  410. package/src/components/Sidebar/index.ts +0 -8
  411. package/src/components/icons/CloseSidebarIcon.tsx +0 -19
  412. package/src/components/icons/CloseSidebarMidIcon.tsx +0 -19
  413. package/src/components/icons/ExpandIcon.tsx +0 -21
  414. package/src/components/icons/SendArrowIcon.tsx +0 -23
  415. package/src/components/icons/SendArrowIconGreen.tsx +0 -17
  416. package/src/components/icons/SettingsIcon.tsx +0 -33
  417. package/src/components/icons/XIcon.tsx +0 -21
  418. package/src/material-theme.ts +0 -477
  419. package/src/stories/Buttons.stories.tsx +0 -15
  420. package/src/stories/Buttons.tsx +0 -52
  421. package/src/stories/Checkbox.stories.tsx +0 -15
  422. package/src/stories/Checkbox.tsx +0 -56
  423. package/src/stories/ColorPalette.stories.tsx +0 -15
  424. package/src/stories/ColorPalette.tsx +0 -85
  425. package/src/stories/DocumentEditor.stories.tsx +0 -287
  426. package/src/stories/Dropdowns.stories.tsx +0 -15
  427. package/src/stories/Dropdowns.tsx +0 -52
  428. package/src/stories/InputPrompt.stories.tsx +0 -15
  429. package/src/stories/InputPrompt.tsx +0 -63
  430. package/src/stories/ModalHeader.stories.tsx +0 -36
  431. package/src/stories/PDFViewer.stories.tsx +0 -39
  432. package/src/stories/SearchModal.stories.tsx +0 -132
  433. package/src/stories/SearchModal.tsx +0 -82
  434. package/src/stories/Sidebar.stories.tsx +0 -15
  435. package/src/stories/Sidebar.tsx +0 -108
  436. package/src/stories/Tabs.stories.tsx +0 -51
  437. package/src/stories/Typography.stories.tsx +0 -15
  438. package/src/stories/Typography.tsx +0 -110
@@ -0,0 +1,32 @@
1
+ import { type ReactNode } from "react";
2
+ import { cn } from "../../utils/cn";
3
+
4
+ export type SidebarShellProps = {
5
+ sidebar: ReactNode;
6
+ children: ReactNode;
7
+ /** Pixels subtracted from viewport height (e.g. app banner). */
8
+ bannerOffset?: number;
9
+ className?: string;
10
+ mainClassName?: string;
11
+ };
12
+
13
+ /** Viewport-height app shell: sidebar stays put, main scrolls independently. */
14
+ export const SidebarShell = ({
15
+ sidebar,
16
+ children,
17
+ bannerOffset = 0,
18
+ className,
19
+ mainClassName,
20
+ }: SidebarShellProps) => (
21
+ <div
22
+ className={cn("flex overflow-hidden bg-background-primary", className)}
23
+ style={{
24
+ height: bannerOffset > 0 ? `calc(100dvh - ${bannerOffset}px)` : "100dvh",
25
+ }}
26
+ >
27
+ {sidebar}
28
+ <main className={cn("min-h-0 min-w-0 flex-1 overflow-auto", mainClassName)}>
29
+ {children}
30
+ </main>
31
+ </div>
32
+ );
@@ -0,0 +1,116 @@
1
+ import { Logo } from "../../primitives";
2
+ import { cn } from "../../utils/cn";
3
+
4
+ export type Chief = "technical" | "compliance";
5
+
6
+ export type SwitcherProps = {
7
+ chief: Chief;
8
+ expanded?: boolean;
9
+ onChiefChange?: (chief: Chief) => void;
10
+ className?: string;
11
+ };
12
+
13
+ const chiefLabels: Record<Chief, string> = {
14
+ technical: "Technical",
15
+ compliance: "Compliance",
16
+ };
17
+
18
+ const SwitcherTab = ({
19
+ tabChief,
20
+ active,
21
+ onSelect,
22
+ }: {
23
+ tabChief: Chief;
24
+ active: boolean;
25
+ onSelect?: (chief: Chief) => void;
26
+ }) => {
27
+ const tabClassName = cn(
28
+ "box-border flex h-[34px] flex-1 items-center gap-[2px] rounded-[4px] py-2 pl-[14px] pr-4",
29
+ active
30
+ ? "bg-background-primary text-display-on-light-primary shadow-[0_1px_1px_rgba(0,0,0,0.06)]"
31
+ : "text-display-on-light-quaternary",
32
+ onSelect && !active && "cursor-pointer hover:text-display-on-light-secondary",
33
+ );
34
+
35
+ const content = (
36
+ <>
37
+ <div
38
+ className={cn(
39
+ "flex size-[18px] shrink-0 items-center justify-center rounded-full",
40
+ active && "bg-background-primary",
41
+ )}
42
+ >
43
+ <Logo chief={tabChief} muted={!active} className="size-[18px]" />
44
+ </div>
45
+ <span
46
+ className={cn(
47
+ "truncate text-[11px] uppercase leading-4 tracking-normal",
48
+ active ? "text-display-on-light-primary" : "text-display-on-light-quaternary",
49
+ )}
50
+ >
51
+ {chiefLabels[tabChief]}
52
+ </span>
53
+ </>
54
+ );
55
+
56
+ if (!onSelect) {
57
+ return (
58
+ <div className={tabClassName} data-active={active}>
59
+ {content}
60
+ </div>
61
+ );
62
+ }
63
+
64
+ return (
65
+ <button
66
+ type="button"
67
+ className={tabClassName}
68
+ data-active={active}
69
+ aria-pressed={active}
70
+ aria-label={`Switch to ${chiefLabels[tabChief]}`}
71
+ disabled={active}
72
+ onClick={() => onSelect(tabChief)}
73
+ >
74
+ {content}
75
+ </button>
76
+ );
77
+ };
78
+
79
+ export const Switcher = ({
80
+ chief,
81
+ expanded = true,
82
+ onChiefChange,
83
+ className,
84
+ }: SwitcherProps) => {
85
+ if (!expanded) {
86
+ return (
87
+ <div
88
+ className={cn(
89
+ "flex h-8 w-10 shrink-0 items-center justify-center self-center rounded-control",
90
+ className,
91
+ )}
92
+ data-expanded={expanded}
93
+ data-chief={chief}
94
+ aria-label={`Switch chief: ${chiefLabels[chief]}`}
95
+ >
96
+ <Logo chief={chief} className="size-6 shrink-0" />
97
+ </div>
98
+ );
99
+ }
100
+
101
+ return (
102
+ <div
103
+ className={cn(
104
+ "box-border flex h-11 w-full gap-1 rounded-control bg-background-secondary p-[5px] shadow-[inset_0_0_0_1px_theme(colors.divider.primary)]",
105
+ className,
106
+ )}
107
+ data-expanded={expanded}
108
+ data-chief={chief}
109
+ role="group"
110
+ aria-label="Chief switcher"
111
+ >
112
+ <SwitcherTab tabChief="technical" active={chief === "technical"} onSelect={onChiefChange} />
113
+ <SwitcherTab tabChief="compliance" active={chief === "compliance"} onSelect={onChiefChange} />
114
+ </div>
115
+ );
116
+ };
@@ -0,0 +1,5 @@
1
+ <svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="Logo">
3
+ <path id="Glyph" d="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" fill="var(--fill-0, #262420)"/>
4
+ </g>
5
+ </svg>
@@ -0,0 +1,13 @@
1
+ <svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="Mask" clip-path="url(#clip0_0_4)">
3
+ <g id="icon-compliance.svg">
4
+ <path id="Vector" d="M8.30333 5.84667L5.18333 14.2917H6.33833V14.2883C6.34 14.2883 6.34167 14.29 6.34167 14.29L8.90667 11.7267H9.06667L11.6283 14.2917H12.8233L9.71667 5.84667H8.305H8.30333ZM9.215 10.4433H8.75667L7.15167 12.0483L8.89 7.25167H9.10167L10.825 12.055L9.21667 10.4433H9.215Z" fill="var(--fill-0, #232323)"/>
5
+ <path id="Vector_2" d="M8.98833 4.85833C9.87167 4.85833 10.6817 5.23 11.3117 5.84667H12.7967C11.925 4.54667 10.5433 3.70667 8.98833 3.70667C7.43333 3.70667 6.05167 4.54667 5.18 5.84667H6.665C7.29333 5.23 8.105 4.85833 8.98833 4.85833Z" fill="var(--fill-0, #232323)"/>
6
+ </g>
7
+ </g>
8
+ <defs>
9
+ <clipPath id="clip0_0_4">
10
+ <rect width="18" height="18" fill="white"/>
11
+ </clipPath>
12
+ </defs>
13
+ </svg>
@@ -0,0 +1,17 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="18" height="18" fill="#F5F5F5"/>
3
+ <g id="Core">
4
+ <path d="M-330 -683C-330 -694.046 -321.046 -703 -310 -703H382C393.046 -703 402 -694.046 402 -683V927C402 938.046 393.046 947 382 947H-310C-321.046 947 -330 938.046 -330 927V-683Z" fill="#FDFDFC"/>
5
+ <g id="Content">
6
+ <g id="Avatar">
7
+ <rect x="-273.5" y="-30.5" width="619" height="79" rx="4.5" stroke="#9747FF" stroke-dasharray="10 5"/>
8
+ <g id="Chief=Technical, Size=18">
9
+ <path d="M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z" fill="#FDFDFC"/>
10
+ <g id="Logo">
11
+ <path id="Glyph" d="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" fill="#262420"/>
12
+ </g>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </g>
17
+ </svg>
@@ -0,0 +1,17 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="18" height="18" fill="#F5F5F5"/>
3
+ <g id="Core">
4
+ <path d="M-330 -683C-330 -694.046 -321.046 -703 -310 -703H382C393.046 -703 402 -694.046 402 -683V927C402 938.046 393.046 947 382 947H-310C-321.046 947 -330 938.046 -330 927V-683Z" fill="#FDFDFC"/>
5
+ <g id="Content">
6
+ <g id="Avatar">
7
+ <rect x="-273.5" y="-30.5" width="619" height="79" rx="4.5" stroke="#9747FF" stroke-dasharray="10 5"/>
8
+ <g id="Chief=Technical, Size=18">
9
+ <path d="M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z" fill="#FDFDFC"/>
10
+ <g id="Logo">
11
+ <path id="Glyph" d="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" fill="#262420"/>
12
+ </g>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </g>
17
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="Logo">
3
+ <path id="Glyph" d="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" fill="var(--fill-0, #262420)"/>
4
+ </g>
5
+ </svg>
@@ -0,0 +1,16 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="18" height="18" fill="#F5F5F5"/>
3
+ <g id="Core">
4
+ <path d="M-330 -683C-330 -694.046 -321.046 -703 -310 -703H382C393.046 -703 402 -694.046 402 -683V927C402 938.046 393.046 947 382 947H-310C-321.046 947 -330 938.046 -330 927V-683Z" fill="white"/>
5
+ <g id="Content">
6
+ <g id="Avatar">
7
+ <rect x="-273.5" y="-30.5" width="619" height="79" rx="4.5" stroke="#9747FF" stroke-dasharray="10 5"/>
8
+ <g id="Chief=Technical, Size=18">
9
+ <g id="Logo">
10
+ <path id="Glyph" d="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" fill="#262420"/>
11
+ </g>
12
+ </g>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </svg>
@@ -0,0 +1,2 @@
1
+ export const SIDEBAR_EXPANDED_WIDTH = 280;
2
+ export const SIDEBAR_COLLAPSED_WIDTH = 56;
@@ -0,0 +1,4 @@
1
+ import accountAvatar from "./assets/account-avatar.jpg";
2
+ import accountAvatar24 from "./assets/account-avatar-24.jpg";
3
+
4
+ export { accountAvatar, accountAvatar24 };
@@ -0,0 +1,30 @@
1
+ export type FigmaActivityIcon = "status" | "statusClosed" | "chat" | "chatPro";
2
+
3
+ export const FIGMA_ACTIVITY_ENTRIES = [
4
+ { id: "1", label: "Winch Slipping Under Load", href: "#chat-1", count: 1, icon: "status" as const },
5
+ { id: "2", label: "Excessive Vibration Propeller Shaft", href: "#chat-2", icon: "chatPro" as const },
6
+ { id: "3", label: "Winch Slipping Under Load", href: "#chat-3", icon: "chat" as const },
7
+ { id: "4", label: "Freshwater Pressure Drop Causes", href: "#chat-4", icon: "chat" as const },
8
+ { id: "5", label: "Excessive Vibration Propeller Shaft", href: "#chat-5", icon: "status" as const },
9
+ { id: "6", label: "Freshwater Pressure Drop Causes", href: "#chat-6", icon: "statusClosed" as const },
10
+ { id: "7", label: "Rust Prevention On Deck Fittings", href: "#chat-7", icon: "chatPro" as const },
11
+ { id: "8", label: "Persistent Engine Room Oil Leak", href: "#chat-8", icon: "chat" as const },
12
+ ] as const;
13
+
14
+ export const FIGMA_SHIP_ENTRIES = [
15
+ { id: "1", name: "The Coral Explorer", href: "#ship-1", count: 3 },
16
+ { id: "2", name: "Silver Wave", href: "#ship-2", count: 1 },
17
+ { id: "3", name: "Ocean Voyager", href: "#ship-3" },
18
+ { id: "4", name: "Albatross Wind", href: "#ship-4" },
19
+ ] as const;
20
+
21
+ export const FIGMA_ACCOUNT_NAME = "Panos Tsamoudakis";
22
+
23
+ export const FIGMA_SECTION_LABEL = "Name";
24
+ export const FIGMA_HEADING_LABEL = "Label";
25
+ export const FIGMA_ENTRY_LABEL = "New chat";
26
+
27
+ export const DEMO_SIDEBAR_ENTRY_MENU_ITEMS = [
28
+ { id: "example-1", label: "Example one", onSelect: () => undefined },
29
+ { id: "example-2", label: "Example two", onSelect: () => undefined },
30
+ ] as const;
@@ -0,0 +1,79 @@
1
+ import type { Chief } from "./Switcher";
2
+
3
+ export type FigmaNavItemId =
4
+ | "search"
5
+ | "workflows"
6
+ | "analytics"
7
+ | "forms"
8
+ | "ships"
9
+ | "defectReports"
10
+ | "tasks"
11
+ | "knowledge"
12
+ | "activity";
13
+
14
+ export type FigmaCollapsedNavItem = {
15
+ id: FigmaNavItemId;
16
+ unread?: boolean;
17
+ };
18
+
19
+ export type FigmaSidebarNavConfig = {
20
+ expandedItems: FigmaNavItemId[];
21
+ collapsedItems: FigmaCollapsedNavItem[];
22
+ };
23
+
24
+ const technicalExpanded: FigmaNavItemId[] = [
25
+ "search",
26
+ "workflows",
27
+ "analytics",
28
+ "ships",
29
+ "defectReports",
30
+ "knowledge",
31
+ "activity",
32
+ ];
33
+
34
+ const complianceExpanded: FigmaNavItemId[] = [
35
+ "search",
36
+ "workflows",
37
+ "forms",
38
+ "ships",
39
+ "tasks",
40
+ "knowledge",
41
+ "analytics",
42
+ "activity",
43
+ ];
44
+
45
+ const technicalCollapsed: FigmaCollapsedNavItem[] = [
46
+ { id: "search" },
47
+ { id: "workflows" },
48
+ { id: "analytics" },
49
+ { id: "ships", unread: true },
50
+ { id: "defectReports" },
51
+ { id: "activity", unread: true },
52
+ ];
53
+
54
+ const complianceCollapsed: FigmaCollapsedNavItem[] = [
55
+ { id: "search" },
56
+ { id: "workflows", unread: true },
57
+ { id: "ships" },
58
+ { id: "tasks" },
59
+ { id: "knowledge" },
60
+ { id: "analytics" },
61
+ { id: "activity", unread: true },
62
+ ];
63
+
64
+ export const FIGMA_NAV_LABELS: Record<FigmaNavItemId, string> = {
65
+ search: "Search",
66
+ workflows: "Workflows",
67
+ analytics: "Analytics",
68
+ forms: "Forms",
69
+ ships: "Ships",
70
+ defectReports: "Defect Reports",
71
+ tasks: "Tasks",
72
+ knowledge: "Knowledge",
73
+ activity: "Activity",
74
+ };
75
+
76
+ export const getFigmaSidebarNav = (chief: Chief): FigmaSidebarNavConfig => ({
77
+ expandedItems: chief === "compliance" ? complianceExpanded : technicalExpanded,
78
+ collapsedItems: chief === "compliance" ? complianceCollapsed : technicalCollapsed,
79
+ });
@@ -0,0 +1,13 @@
1
+ export { Account, type AccountMenuItem, type AccountProps } from "./Account";
2
+ export { ActivityNavGroup, Activity, type ActivityNavGroupProps, type ActivityProps } from "./ActivityNavGroup";
3
+ export { CollapsibleNavGroup, Ships, type CollapsibleNavGroupProps, type Ship, type ShipsProps } from "./CollapsibleNavGroup";
4
+ export { SIDEBAR_COLLAPSED_WIDTH, SIDEBAR_EXPANDED_WIDTH } from "./constants";
5
+ export { Entry, SidebarEntry, type EntryProps, type EntryState, type SidebarEntryMenuItem, type SidebarEntryProps, type SidebarEntryState } from "./SidebarEntry";
6
+ export { Heading, SidebarHeading, type HeadingProps, type SidebarHeadingProps } from "./SidebarHeading";
7
+ export { Indicator, type IndicatorProps } from "./Indicator";
8
+ export { NewChat, type NewChatProps } from "./NewChat";
9
+ export { Section, SidebarLink, type SectionProps, type SectionState, type SidebarLinkProps, type SidebarLinkState } from "./SidebarLink";
10
+ export { SidebarAction, type SidebarActionProps } from "./SidebarAction";
11
+ export { Sidebar, type SidebarProps } from "./Sidebar";
12
+ export { SidebarShell, type SidebarShellProps } from "./SidebarShell";
13
+ export { Switcher, type Chief, type SwitcherProps } from "./Switcher";
@@ -0,0 +1,101 @@
1
+ import { cn } from "../../utils/cn";
2
+
3
+ /** Figma sidebar surfaces use translucent grey overlays, not solid background-hover tokens. */
4
+ export const sidebarSurfaceHover = "bg-[rgba(38,36,32,0.04)]";
5
+ export const sidebarSurfaceSelected = "bg-[rgba(38,36,32,0.08)]";
6
+
7
+ /** 8px between top-level sidebar blocks (Figma Top gap). */
8
+ export const sidebarBlockGap = "gap-2";
9
+
10
+ /** 4px between entries inside a group (Activity, Ships). */
11
+ export const sidebarGroupGap = "gap-1";
12
+
13
+ /** Section row shell — 36px total (Figma Section symbols). */
14
+ export const sidebarSectionShell =
15
+ "box-border flex h-9 w-full items-center rounded-control p-2";
16
+
17
+ /** Taller section row — 40px (New chat, Ships header). */
18
+ export const sidebarSectionShellTall =
19
+ "box-border flex h-10 w-full items-center rounded-control p-2";
20
+
21
+ /** Collapsed icon-only section — Figma Section/Collapsed On: w-full, p-2, 16px icon. */
22
+ export const sidebarSectionShellCollapsed =
23
+ "relative box-border flex w-full flex-col items-center justify-center rounded-control p-2";
24
+
25
+ /** Figma Indicator overlay — 24×24 anchored top-left of icon content. */
26
+ export const sidebarUnreadOverlay =
27
+ "pointer-events-none absolute left-0 top-0 size-6";
28
+
29
+ /** Figma unread dot — ~6px, top-right of the 24px indicator overlay. */
30
+ export const sidebarUnreadDot =
31
+ "absolute right-0 top-0 size-1.5 rounded-full bg-[#802c20]";
32
+
33
+ export const sidebarSectionContent = "flex w-full min-w-0 items-center gap-2 pl-1";
34
+
35
+ export const sidebarSectionIconClass = "shrink-0 [&>svg]:size-4";
36
+
37
+ export const sidebarSectionLabelClass =
38
+ "min-w-0 flex-1 truncate text-caption-2 tracking-[0.01em]";
39
+
40
+ /** Figma sidebar icon buttons — transparent idle, grey hover (no white fill). */
41
+ export const sidebarQuaternaryIconButton =
42
+ "bg-transparent text-action-quaternary-on-idle hover:bg-[rgba(38,36,32,0.04)] hover:text-action-quaternary-on-hover disabled:bg-transparent disabled:opacity-50";
43
+
44
+ /** Scrollable nav region — thin thumb flush to the right edge (matches shipping-ai). */
45
+ export const sidebarScrollRegion =
46
+ "sidebar-scroll flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto";
47
+
48
+ /** Nav row — grey hover surface (Section, Entry, collapsed + expanded). */
49
+ export const sidebarRowInteractiveHover =
50
+ "transition-colors hover:bg-[rgba(38,36,32,0.04)] hover:text-display-on-light-primary";
51
+
52
+ /** @deprecated Use sidebarRowInteractiveHover */
53
+ export const sidebarCollapsedRowHover = sidebarRowInteractiveHover;
54
+
55
+ /** New chat — primary blue hover (Figma New chat Hover variant). */
56
+ export const sidebarNewChatInteractiveHover =
57
+ "group/newchat transition-colors hover:bg-action-primary-hover hover:text-action-primary-on-hover";
58
+
59
+ export const sidebarNewChatIconHover =
60
+ "group-hover/newchat:text-action-primary-on-hover";
61
+
62
+ export const sidebarLinkIdle = "text-display-on-light-secondary";
63
+
64
+ export const sidebarLinkHover =
65
+ cn(sidebarSurfaceHover, "text-display-on-light-primary");
66
+
67
+ export const sidebarLinkActive =
68
+ cn(sidebarSurfaceSelected, "text-display-on-light-primary");
69
+
70
+ export const sidebarEntryIdle = "text-display-on-light-secondary";
71
+ export const sidebarEntryHover = cn(sidebarSurfaceHover, "text-display-on-light-primary");
72
+ export const sidebarEntrySelected = cn(sidebarSurfaceSelected, "text-display-on-light-primary");
73
+
74
+ /** Entry row — Figma min-h-[36px] px-[8px] py-[6px]. */
75
+ export const sidebarEntryShell =
76
+ "box-border flex h-9 w-full items-center gap-1 rounded-control px-2 py-1.5";
77
+
78
+ export const sidebarRowPadding = "px-2 py-1.5";
79
+ export const sidebarRowMinHeight = "min-h-9";
80
+ export const sidebarRowRadius = "rounded-control";
81
+
82
+ export const sidebarRowClass = (className?: string) =>
83
+ cn(
84
+ "group/row relative flex w-full items-center gap-1",
85
+ sidebarRowPadding,
86
+ sidebarRowMinHeight,
87
+ sidebarRowRadius,
88
+ className,
89
+ );
90
+
91
+ export const sidebarAnchorClass = (className?: string) =>
92
+ cn(
93
+ "flex min-w-0 flex-1 items-center gap-2 truncate text-left text-caption-2 transition-colors",
94
+ className,
95
+ );
96
+
97
+ export const sidebarSectionAnchorClass = (className?: string) =>
98
+ cn(
99
+ "flex min-w-0 flex-1 items-center gap-2 truncate text-left text-caption-2 transition-colors",
100
+ className,
101
+ );
@@ -0,0 +1,57 @@
1
+ import { cn } from "../../utils/cn";
2
+
3
+ export type SkeletonVariant = "content" | "search";
4
+
5
+ export type SkeletonProps = {
6
+ variant?: SkeletonVariant;
7
+ className?: string;
8
+ };
9
+
10
+ const ContentSkeleton = () => (
11
+ <div className="flex flex-col gap-4 p-4" aria-hidden>
12
+ <div className="flex items-center gap-3">
13
+ <div className="size-8 animate-pulse rounded-full bg-grey-200" />
14
+ <div className="flex flex-1 flex-col gap-2">
15
+ <div className="h-4 w-1/3 animate-pulse rounded bg-grey-200" />
16
+ <div className="h-3 w-1/4 animate-pulse rounded bg-grey-100" />
17
+ </div>
18
+ </div>
19
+ <div className="flex flex-col gap-2">
20
+ <div className="h-4 w-full animate-pulse rounded bg-grey-200" />
21
+ <div className="h-4 w-5/6 animate-pulse rounded bg-grey-200" />
22
+ <div className="h-4 w-2/3 animate-pulse rounded bg-grey-100" />
23
+ </div>
24
+ <div className="h-24 animate-pulse rounded-control bg-grey-100" />
25
+ </div>
26
+ );
27
+
28
+ const SearchSkeleton = () => (
29
+ <div className="flex flex-col gap-3 p-4" aria-hidden>
30
+ <div className="h-10 animate-pulse rounded-control bg-grey-200" />
31
+ <div className="flex gap-2">
32
+ <div className="h-7 w-16 animate-pulse rounded-full bg-grey-100" />
33
+ <div className="h-7 w-20 animate-pulse rounded-full bg-grey-100" />
34
+ <div className="h-7 w-14 animate-pulse rounded-full bg-grey-100" />
35
+ </div>
36
+ {Array.from({ length: 4 }).map((_, index) => (
37
+ <div key={index} className="flex items-center gap-3 py-1">
38
+ <div className="size-5 animate-pulse rounded bg-grey-200" />
39
+ <div className="flex flex-1 flex-col gap-1.5">
40
+ <div className="h-3.5 w-3/4 animate-pulse rounded bg-grey-200" />
41
+ <div className="h-3 w-1/2 animate-pulse rounded bg-grey-100" />
42
+ </div>
43
+ </div>
44
+ ))}
45
+ </div>
46
+ );
47
+
48
+ export const Skeleton = ({ variant = "content", className }: SkeletonProps) => (
49
+ <div
50
+ className={cn("rounded-control bg-background-primary", className)}
51
+ role="status"
52
+ aria-label="Loading"
53
+ data-variant={variant}
54
+ >
55
+ {variant === "content" ? <ContentSkeleton /> : <SearchSkeleton />}
56
+ </div>
57
+ );
@@ -0,0 +1 @@
1
+ export { Skeleton, type SkeletonProps, type SkeletonVariant } from "./Skeleton";
@@ -0,0 +1,5 @@
1
+ export * from "./Sidebar";
2
+ export * from "./Chat";
3
+ export * from "./Modal";
4
+ export * from "./Search";
5
+ export * from "./Skeleton";
@@ -0,0 +1,71 @@
1
+ import { cn } from "../utils/cn";
2
+
3
+ type ChiefType = "technical" | "compliance" | "initials";
4
+ type AvatarSize = 32 | 24 | 18 | 16;
5
+
6
+ export type AvatarProps = {
7
+ chief: ChiefType;
8
+ size?: AvatarSize;
9
+ initials?: string;
10
+ className?: string;
11
+ };
12
+
13
+ const sizeStyles: Record<AvatarSize, string> = {
14
+ 32: "size-8 text-caption-2-em",
15
+ 24: "size-6 text-footnote-em",
16
+ 18: "size-[18px] text-[10px] font-medium leading-none",
17
+ 16: "size-4 text-[9px] font-medium leading-none",
18
+ };
19
+
20
+ const chiefStyles: Record<ChiefType, string> = {
21
+ technical: "bg-blue-100 text-blue-700",
22
+ compliance: "bg-green-100 text-green-700",
23
+ initials: "bg-grey-200 text-display-on-light-secondary",
24
+ };
25
+
26
+ const TechnicalIcon = ({ size }: { size: AvatarSize }) => {
27
+ const iconSize = size >= 24 ? 12 : 8;
28
+
29
+ return (
30
+ <svg width={iconSize} height={iconSize} viewBox="0 0 12 12" fill="none" aria-hidden>
31
+ <path
32
+ d="M6 1.5v9M3.5 4h5M3.5 8h5"
33
+ stroke="currentColor"
34
+ strokeWidth="1.2"
35
+ strokeLinecap="round"
36
+ />
37
+ </svg>
38
+ );
39
+ };
40
+
41
+ const ComplianceIcon = ({ size }: { size: AvatarSize }) => {
42
+ const iconSize = size >= 24 ? 12 : 8;
43
+
44
+ return (
45
+ <svg width={iconSize} height={iconSize} viewBox="0 0 12 12" fill="none" aria-hidden>
46
+ <path
47
+ d="M3 6l2 2 4-4"
48
+ stroke="currentColor"
49
+ strokeWidth="1.2"
50
+ strokeLinecap="round"
51
+ strokeLinejoin="round"
52
+ />
53
+ </svg>
54
+ );
55
+ };
56
+
57
+ export const Avatar = ({ chief, size = 32, initials, className }: AvatarProps) => (
58
+ <span
59
+ className={cn(
60
+ "inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full",
61
+ sizeStyles[size],
62
+ chiefStyles[chief],
63
+ className,
64
+ )}
65
+ aria-hidden={chief !== "initials"}
66
+ >
67
+ {chief === "technical" && <TechnicalIcon size={size} />}
68
+ {chief === "compliance" && <ComplianceIcon size={size} />}
69
+ {chief === "initials" && (initials?.slice(0, 2).toUpperCase() ?? "AC")}
70
+ </span>
71
+ );
@@ -0,0 +1,34 @@
1
+ import { type ReactNode } from "react";
2
+ import { cn } from "../utils/cn";
3
+
4
+ type BadgeColor = "blue" | "green" | "red" | "orange" | "purple" | "grey";
5
+ type BadgeType = "label" | "icon";
6
+
7
+ export type BadgeProps = {
8
+ color: BadgeColor;
9
+ type?: BadgeType;
10
+ children: ReactNode;
11
+ className?: string;
12
+ };
13
+
14
+ const colorStyles: Record<BadgeColor, string> = {
15
+ blue: "bg-meta-blue text-meta-on-blue",
16
+ green: "bg-meta-green text-meta-on-green",
17
+ red: "bg-meta-red text-meta-on-red",
18
+ orange: "bg-meta-orange text-meta-on-orange",
19
+ purple: "bg-meta-purple text-meta-on-purple",
20
+ grey: "bg-grey-100 text-display-on-light-secondary",
21
+ };
22
+
23
+ export const Badge = ({ color, type = "label", children, className }: BadgeProps) => (
24
+ <span
25
+ className={cn(
26
+ "inline-flex shrink-0 items-center justify-center text-footnote-em",
27
+ type === "label" ? "rounded-control px-2 py-0.5" : "size-6 rounded-full",
28
+ colorStyles[color],
29
+ className,
30
+ )}
31
+ >
32
+ {children}
33
+ </span>
34
+ );