@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.
- package/README.md +70 -53
- package/dist/components/Checkbox.d.ts +9 -0
- package/dist/components/Chip.d.ts +15 -0
- package/dist/components/EmptyState.d.ts +10 -0
- package/dist/components/Entry.d.ts +13 -0
- package/dist/components/Header.d.ts +9 -0
- package/dist/components/Input.d.ts +11 -0
- package/dist/components/InputType.d.ts +10 -0
- package/dist/components/ModalPanel.d.ts +7 -7
- package/dist/components/PdfViewer/ImageViewer.d.ts +2 -2
- package/dist/components/PdfViewer/PdfViewer.d.ts +2 -2
- package/dist/components/ReportInput.d.ts +10 -0
- package/dist/components/Tab.d.ts +7 -0
- package/dist/components/Tabs.d.ts +11 -12
- package/dist/components/index.d.ts +11 -4
- package/dist/domain/Filters/FilterPill.d.ts +6 -0
- package/dist/domain/Filters/FilteredPill.d.ts +8 -0
- package/dist/domain/Filters/FiltersBar.d.ts +12 -0
- package/dist/domain/Filters/index.d.ts +3 -0
- package/dist/domain/Forms/FormCard.d.ts +12 -0
- package/dist/domain/Forms/FormHeader.d.ts +8 -0
- package/dist/domain/Forms/ListRow.d.ts +8 -0
- package/dist/domain/Forms/RiskMeter.d.ts +8 -0
- package/dist/domain/Forms/index.d.ts +4 -0
- package/dist/domain/Library/File.d.ts +8 -0
- package/dist/domain/Library/Folder.d.ts +8 -0
- package/dist/domain/Library/Folders.d.ts +11 -0
- package/dist/domain/Library/ListRow.d.ts +8 -0
- package/dist/domain/Library/Navigation.d.ts +7 -0
- package/dist/domain/Library/index.d.ts +5 -0
- package/dist/domain/Report/InfoHeading.d.ts +7 -0
- package/dist/domain/Report/InfoRow.d.ts +8 -0
- package/dist/domain/Report/Report.d.ts +7 -0
- package/dist/domain/Report/SectionHeader.d.ts +10 -0
- package/dist/domain/Report/TaskRow.d.ts +11 -0
- package/dist/domain/Report/index.d.ts +5 -0
- package/dist/domain/Settings/EquipmentRow.d.ts +8 -0
- package/dist/domain/Settings/MemberRow.d.ts +11 -0
- package/dist/domain/Settings/SettingRow.d.ts +10 -0
- package/dist/domain/Settings/index.d.ts +3 -0
- package/dist/domain/Ships/ShipRow.d.ts +10 -0
- package/dist/domain/Ships/index.d.ts +1 -0
- package/dist/domain/Workflows/GroupHeader.d.ts +8 -0
- package/dist/domain/Workflows/Importance.d.ts +8 -0
- package/dist/domain/Workflows/Progress.d.ts +7 -0
- package/dist/domain/Workflows/Question.d.ts +9 -0
- package/dist/domain/Workflows/StatusPopover.d.ts +7 -0
- package/dist/domain/Workflows/Task.d.ts +9 -0
- package/dist/domain/Workflows/TaskHeader.d.ts +9 -0
- package/dist/domain/Workflows/WorkflowFilters.d.ts +6 -0
- package/dist/domain/Workflows/WorkflowForm.d.ts +8 -0
- package/dist/domain/Workflows/WorkflowHeader.d.ts +11 -0
- package/dist/domain/Workflows/WorkflowListItem.d.ts +11 -0
- package/dist/domain/Workflows/WorkflowProgress.d.ts +6 -0
- package/dist/domain/Workflows/WorkflowRow.d.ts +10 -0
- package/dist/domain/Workflows/index.d.ts +13 -0
- package/dist/domain/index.d.ts +7 -0
- package/dist/icons/ArrowIcon.d.ts +8 -0
- package/dist/icons/ChevronIcon.d.ts +8 -0
- package/dist/icons/Icon.d.ts +96 -0
- package/dist/icons/arrow-paths.d.ts +12 -0
- package/dist/icons/chevron-paths.d.ts +27 -0
- package/dist/icons/createIcon.d.ts +34 -0
- package/dist/icons/generated.d.ts +68 -0
- package/dist/icons/icon-sizes.d.ts +5 -0
- package/dist/icons/icons-data.d.ts +1023 -0
- package/dist/icons/index.d.ts +13 -0
- package/dist/icons/types.d.ts +10 -0
- package/dist/illustrations/AuditPreparation.d.ts +4 -0
- package/dist/illustrations/CompletedTasks.d.ts +4 -0
- package/dist/illustrations/Creation.d.ts +4 -0
- package/dist/illustrations/InternalAudit.d.ts +4 -0
- package/dist/illustrations/Invite.d.ts +4 -0
- package/dist/illustrations/PortStateControl.d.ts +4 -0
- package/dist/illustrations/Processing.d.ts +4 -0
- package/dist/illustrations/QuestionsDone.d.ts +4 -0
- package/dist/illustrations/RightShipInspection.d.ts +4 -0
- package/dist/illustrations/Upload.d.ts +4 -0
- package/dist/illustrations/WorkflowCreated.d.ts +4 -0
- package/dist/illustrations/Workflows.d.ts +4 -0
- package/dist/illustrations/createIllustration.d.ts +11 -0
- package/dist/illustrations/index.d.ts +13 -0
- package/dist/index.cjs +64 -80
- package/dist/index.d.ts +9 -3
- package/dist/index.esm.js +10964 -36537
- package/dist/patterns/Chat/Attachment.d.ts +6 -0
- package/dist/patterns/Chat/ChatEntry.d.ts +10 -0
- package/dist/patterns/Chat/ChatHeader.d.ts +7 -0
- package/dist/patterns/Chat/ChatInput.d.ts +5 -0
- package/dist/patterns/Chat/ChatStatus.d.ts +6 -0
- package/dist/patterns/Chat/ChatTile.d.ts +9 -0
- package/dist/patterns/Chat/Copilot.d.ts +8 -0
- package/dist/patterns/Chat/Draft.d.ts +5 -0
- package/dist/patterns/Chat/Greeting.d.ts +7 -0
- package/dist/patterns/Chat/Reference.d.ts +6 -0
- package/dist/patterns/Chat/Source.d.ts +6 -0
- package/dist/patterns/Chat/Sources.d.ts +5 -0
- package/dist/patterns/Chat/Suggestion.d.ts +5 -0
- package/dist/patterns/Chat/Suggestions.d.ts +4 -0
- package/dist/patterns/Chat/index.d.ts +14 -0
- package/dist/patterns/Modal/Invitee.d.ts +8 -0
- package/dist/patterns/Modal/ModalFooter.d.ts +6 -0
- package/dist/patterns/Modal/ModalHeader.d.ts +10 -0
- package/dist/patterns/Modal/index.d.ts +3 -0
- package/dist/patterns/Search/Pill.d.ts +10 -0
- package/dist/patterns/Search/PillInfo.d.ts +8 -0
- package/dist/patterns/Search/ResultRow.d.ts +10 -0
- package/dist/patterns/Search/SearchModal.d.ts +6 -0
- package/dist/patterns/Search/SectionHeader.d.ts +5 -0
- package/dist/patterns/Search/index.d.ts +5 -0
- package/dist/patterns/Sidebar/Account.d.ts +22 -0
- package/dist/patterns/Sidebar/ActivityNavGroup.d.ts +17 -0
- package/dist/patterns/Sidebar/CollapsibleNavGroup.d.ts +24 -0
- package/dist/patterns/Sidebar/Indicator.d.ts +6 -0
- package/dist/patterns/Sidebar/NewChat.d.ts +10 -0
- package/dist/patterns/Sidebar/Sidebar.d.ts +13 -0
- package/dist/patterns/Sidebar/SidebarAction.d.ts +11 -0
- package/dist/patterns/Sidebar/SidebarEntry.d.ts +25 -0
- package/dist/patterns/Sidebar/SidebarHeading.d.ts +11 -0
- package/dist/patterns/Sidebar/SidebarLink.d.ts +22 -0
- package/dist/patterns/Sidebar/SidebarShell.d.ts +11 -0
- package/dist/patterns/Sidebar/Switcher.d.ts +8 -0
- package/dist/patterns/Sidebar/constants.d.ts +2 -0
- package/dist/patterns/Sidebar/figma-assets.d.ts +3 -0
- package/dist/patterns/Sidebar/figma-demo-content.d.ts +75 -0
- package/dist/patterns/Sidebar/figma-sidebar-nav.d.ts +12 -0
- package/dist/patterns/Sidebar/index.d.ts +13 -0
- package/dist/patterns/Sidebar/sidebar-styles.d.ts +45 -0
- package/dist/patterns/Skeleton/Skeleton.d.ts +6 -0
- package/dist/patterns/Skeleton/index.d.ts +1 -0
- package/dist/patterns/index.d.ts +5 -0
- package/dist/primitives/Avatar.d.ts +10 -0
- package/dist/primitives/Badge.d.ts +11 -0
- package/dist/primitives/Button.d.ts +13 -0
- package/dist/primitives/Callout.d.ts +7 -0
- package/dist/primitives/Count.d.ts +5 -0
- package/dist/primitives/DropdownMenu.d.ts +15 -0
- package/dist/primitives/GroupedAvatars.d.ts +7 -0
- package/dist/primitives/IconButton.d.ts +16 -0
- package/dist/primitives/Logo.d.ts +8 -0
- package/dist/primitives/MenuItem.d.ts +7 -0
- package/dist/primitives/Switch.d.ts +7 -0
- package/dist/primitives/ThinkingDot.d.ts +4 -0
- package/dist/primitives/Tooltip.d.ts +12 -0
- package/dist/primitives/index.d.ts +13 -0
- package/dist/style.css +1 -1
- package/dist/tailwind-theme.d.ts +234 -198
- package/dist/tokens/colors.d.ts +148 -0
- package/dist/tokens/elevation.d.ts +11 -0
- package/dist/tokens/index.d.ts +4 -0
- package/dist/tokens/semantic.d.ts +89 -0
- package/dist/tokens/typography.d.ts +85 -0
- package/package.json +27 -5
- package/src/components/Checkbox.tsx +77 -0
- package/src/components/Chip.tsx +69 -0
- package/src/components/EmptyState.tsx +44 -0
- package/src/components/Entry.tsx +64 -0
- package/src/components/Header.tsx +39 -0
- package/src/components/Input.tsx +69 -0
- package/src/components/InputType.tsx +76 -0
- package/src/components/ModalPanel.tsx +22 -37
- package/src/components/PdfViewer/ImageViewer.tsx +121 -182
- package/src/components/PdfViewer/PdfViewer.tsx +103 -155
- package/src/components/ReportInput.tsx +65 -0
- package/src/components/Tab.tsx +33 -0
- package/src/components/Tabs.tsx +43 -38
- package/src/components/index.ts +11 -4
- package/src/domain/Filters/FilterPill.tsx +25 -0
- package/src/domain/Filters/FilteredPill.tsx +39 -0
- package/src/domain/Filters/FiltersBar.tsx +76 -0
- package/src/domain/Filters/index.ts +3 -0
- package/src/domain/Forms/FormCard.tsx +61 -0
- package/src/domain/Forms/FormHeader.tsx +34 -0
- package/src/domain/Forms/ListRow.tsx +40 -0
- package/src/domain/Forms/RiskMeter.tsx +50 -0
- package/src/domain/Forms/index.ts +4 -0
- package/src/domain/Library/File.tsx +59 -0
- package/src/domain/Library/Folder.tsx +55 -0
- package/src/domain/Library/Folders.tsx +43 -0
- package/src/domain/Library/ListRow.tsx +40 -0
- package/src/domain/Library/Navigation.tsx +31 -0
- package/src/domain/Library/index.ts +5 -0
- package/src/domain/Report/InfoHeading.tsx +25 -0
- package/src/domain/Report/InfoRow.tsx +35 -0
- package/src/domain/Report/Report.tsx +53 -0
- package/src/domain/Report/SectionHeader.tsx +43 -0
- package/src/domain/Report/TaskRow.tsx +57 -0
- package/src/domain/Report/index.ts +5 -0
- package/src/domain/Settings/EquipmentRow.tsx +39 -0
- package/src/domain/Settings/MemberRow.tsx +53 -0
- package/src/domain/Settings/SettingRow.tsx +66 -0
- package/src/domain/Settings/index.ts +3 -0
- package/src/domain/Ships/ShipRow.tsx +49 -0
- package/src/domain/Ships/index.ts +1 -0
- package/src/domain/Workflows/GroupHeader.tsx +48 -0
- package/src/domain/Workflows/Importance.tsx +48 -0
- package/src/domain/Workflows/Progress.tsx +55 -0
- package/src/domain/Workflows/Question.tsx +42 -0
- package/src/domain/Workflows/StatusPopover.tsx +53 -0
- package/src/domain/Workflows/Task.tsx +46 -0
- package/src/domain/Workflows/TaskHeader.tsx +51 -0
- package/src/domain/Workflows/WorkflowFilters.tsx +40 -0
- package/src/domain/Workflows/WorkflowForm.tsx +40 -0
- package/src/domain/Workflows/WorkflowHeader.tsx +62 -0
- package/src/domain/Workflows/WorkflowListItem.tsx +45 -0
- package/src/domain/Workflows/WorkflowProgress.tsx +36 -0
- package/src/domain/Workflows/WorkflowRow.tsx +43 -0
- package/src/domain/Workflows/index.ts +13 -0
- package/src/domain/index.ts +37 -0
- package/src/icons/ArrowIcon.tsx +42 -0
- package/src/icons/ChevronIcon.tsx +42 -0
- package/src/icons/Icon.tsx +184 -0
- package/src/icons/arrow-paths.ts +8 -0
- package/src/icons/chevron-paths.ts +17 -0
- package/src/icons/createIcon.tsx +128 -0
- package/src/icons/generated.tsx +71 -0
- package/src/icons/icon-sizes.ts +20 -0
- package/src/icons/icons-data.ts +656 -0
- package/src/icons/index.ts +25 -0
- package/src/icons/types.ts +18 -0
- package/src/illustrations/AuditPreparation.tsx +15 -0
- package/src/illustrations/CompletedTasks.tsx +16 -0
- package/src/illustrations/Creation.tsx +13 -0
- package/src/illustrations/InternalAudit.tsx +13 -0
- package/src/illustrations/Invite.tsx +13 -0
- package/src/illustrations/PortStateControl.tsx +13 -0
- package/src/illustrations/Processing.tsx +17 -0
- package/src/illustrations/QuestionsDone.tsx +16 -0
- package/src/illustrations/RightShipInspection.tsx +18 -0
- package/src/illustrations/Upload.tsx +12 -0
- package/src/illustrations/WorkflowCreated.tsx +13 -0
- package/src/illustrations/Workflows.tsx +13 -0
- package/src/illustrations/createIllustration.tsx +30 -0
- package/src/illustrations/index.ts +14 -0
- package/src/index.ts +49 -3
- package/src/patterns/Chat/Attachment.tsx +27 -0
- package/src/patterns/Chat/ChatEntry.tsx +41 -0
- package/src/patterns/Chat/ChatHeader.tsx +39 -0
- package/src/patterns/Chat/ChatInput.tsx +35 -0
- package/src/patterns/Chat/ChatStatus.tsx +26 -0
- package/src/patterns/Chat/ChatTile.tsx +40 -0
- package/src/patterns/Chat/Copilot.tsx +50 -0
- package/src/patterns/Chat/Draft.tsx +23 -0
- package/src/patterns/Chat/Greeting.tsx +32 -0
- package/src/patterns/Chat/Reference.tsx +26 -0
- package/src/patterns/Chat/Source.tsx +27 -0
- package/src/patterns/Chat/Sources.tsx +23 -0
- package/src/patterns/Chat/Suggestion.tsx +23 -0
- package/src/patterns/Chat/Suggestions.tsx +21 -0
- package/src/patterns/Chat/index.ts +14 -0
- package/src/patterns/Modal/Invitee.tsx +44 -0
- package/src/patterns/Modal/ModalFooter.tsx +39 -0
- package/src/patterns/Modal/ModalHeader.tsx +77 -0
- package/src/patterns/Modal/index.ts +3 -0
- package/src/patterns/Search/Pill.tsx +44 -0
- package/src/patterns/Search/PillInfo.tsx +41 -0
- package/src/patterns/Search/ResultRow.tsx +52 -0
- package/src/patterns/Search/SearchModal.tsx +88 -0
- package/src/patterns/Search/SectionHeader.tsx +20 -0
- package/src/patterns/Search/index.ts +5 -0
- package/src/patterns/Sidebar/Account.tsx +193 -0
- package/src/patterns/Sidebar/ActivityNavGroup.tsx +71 -0
- package/src/patterns/Sidebar/CollapsibleNavGroup.tsx +106 -0
- package/src/patterns/Sidebar/Indicator.tsx +14 -0
- package/src/patterns/Sidebar/NewChat.tsx +71 -0
- package/src/patterns/Sidebar/Sidebar.tsx +363 -0
- package/src/patterns/Sidebar/SidebarAction.tsx +55 -0
- package/src/patterns/Sidebar/SidebarEntry.tsx +129 -0
- package/src/patterns/Sidebar/SidebarHeading.tsx +38 -0
- package/src/patterns/Sidebar/SidebarLink.tsx +125 -0
- package/src/patterns/Sidebar/SidebarShell.tsx +32 -0
- package/src/patterns/Sidebar/Switcher.tsx +116 -0
- package/src/patterns/Sidebar/assets/account-avatar-24.jpg +0 -0
- package/src/patterns/Sidebar/assets/account-avatar.jpg +0 -0
- package/src/patterns/Sidebar/assets/indicator-compliance.png +0 -0
- package/src/patterns/Sidebar/assets/indicator-technical.png +0 -0
- package/src/patterns/Sidebar/assets/logo-compliance-mark.png +5 -0
- package/src/patterns/Sidebar/assets/logo-compliance-mask.png +13 -0
- package/src/patterns/Sidebar/assets/logo-compliance.svg +17 -0
- package/src/patterns/Sidebar/assets/logo-technical-avatar.svg +17 -0
- package/src/patterns/Sidebar/assets/logo-technical-mark.png +5 -0
- package/src/patterns/Sidebar/assets/logo-technical.svg +16 -0
- package/src/patterns/Sidebar/constants.ts +2 -0
- package/src/patterns/Sidebar/figma-assets.ts +4 -0
- package/src/patterns/Sidebar/figma-demo-content.ts +30 -0
- package/src/patterns/Sidebar/figma-sidebar-nav.ts +79 -0
- package/src/patterns/Sidebar/index.ts +13 -0
- package/src/patterns/Sidebar/sidebar-styles.ts +101 -0
- package/src/patterns/Skeleton/Skeleton.tsx +57 -0
- package/src/patterns/Skeleton/index.ts +1 -0
- package/src/patterns/index.ts +5 -0
- package/src/primitives/Avatar.tsx +71 -0
- package/src/primitives/Badge.tsx +34 -0
- package/src/primitives/Button.tsx +67 -0
- package/src/primitives/Callout.tsx +21 -0
- package/src/primitives/Count.tsx +18 -0
- package/src/primitives/DropdownMenu.tsx +60 -0
- package/src/primitives/GroupedAvatars.tsx +36 -0
- package/src/primitives/IconButton.tsx +56 -0
- package/src/primitives/Logo.tsx +43 -0
- package/src/primitives/MenuItem.tsx +35 -0
- package/src/primitives/Switch.tsx +38 -0
- package/src/primitives/ThinkingDot.tsx +34 -0
- package/src/primitives/Tooltip.tsx +42 -0
- package/src/primitives/index.ts +13 -0
- package/src/stories/_layout/FigmaPage.tsx +94 -0
- package/src/stories/_layout/index.ts +8 -0
- package/src/stories/canvases/ButtonsCanvas.tsx +57 -0
- package/src/stories/canvases/ButtonsMatrixCanvas.tsx +64 -0
- package/src/stories/canvases/ChatCanvas.tsx +130 -0
- package/src/stories/canvases/ColorTokensCanvas.tsx +16 -0
- package/src/stories/canvases/ColorsCanvas.tsx +101 -0
- package/src/stories/canvases/ContentCanvas.tsx +88 -0
- package/src/stories/canvases/CoreCanvas.tsx +125 -0
- package/src/stories/canvases/DomainFormsCanvas.tsx +67 -0
- package/src/stories/canvases/FiltersCanvas.tsx +41 -0
- package/src/stories/canvases/FormsCanvas.tsx +71 -0
- package/src/stories/canvases/IconsCanvas.tsx +99 -0
- package/src/stories/canvases/IllustrationsCanvas.tsx +50 -0
- package/src/stories/canvases/LibraryCanvas.tsx +67 -0
- package/src/stories/canvases/ModalsCanvas.tsx +54 -0
- package/src/stories/canvases/RaiseLevelsCanvas.tsx +27 -0
- package/src/stories/canvases/ReportCanvas.tsx +33 -0
- package/src/stories/canvases/ReportLayoutCanvas.tsx +19 -0
- package/src/stories/canvases/SearchCanvas.tsx +65 -0
- package/src/stories/canvases/SettingsCanvas.tsx +41 -0
- package/src/stories/canvases/ShipsCanvas.tsx +38 -0
- package/src/stories/canvases/SidebarCanvas.tsx +147 -0
- package/src/stories/canvases/SidebarLayoutsCanvas.tsx +71 -0
- package/src/stories/canvases/SidebarPlayground.tsx +35 -0
- package/src/stories/canvases/SkeletonsCanvas.tsx +30 -0
- package/src/stories/canvases/TypographyCanvas.tsx +53 -0
- package/src/stories/canvases/WorkflowsCanvas.tsx +129 -0
- package/src/stories/canvases/figma-icons-layout.ts +318 -0
- package/src/stories/canvases/figma-sidebar-layout.ts +212 -0
- package/src/stories/canvases/figma-sidebar-layouts-layout.ts +84 -0
- package/src/stories/canvases/figma-widths.ts +28 -0
- package/src/stories/canvases/helpers.tsx +163 -0
- package/src/stories/components/Buttons.stories.tsx +12 -0
- package/src/stories/components/Chat.stories.tsx +12 -0
- package/src/stories/components/Content.stories.tsx +12 -0
- package/src/stories/components/Core.stories.tsx +12 -0
- package/src/stories/components/DomainForms.stories.tsx +12 -0
- package/src/stories/components/Filters.stories.tsx +12 -0
- package/src/stories/components/Forms.stories.tsx +12 -0
- package/src/stories/components/Icons.stories.tsx +12 -0
- package/src/stories/components/Illustrations.stories.tsx +12 -0
- package/src/stories/components/Library.stories.tsx +12 -0
- package/src/stories/components/Modals.stories.tsx +12 -0
- package/src/stories/components/Report.stories.tsx +12 -0
- package/src/stories/components/ReportLayout.stories.tsx +12 -0
- package/src/stories/components/Search.stories.tsx +12 -0
- package/src/stories/components/Settings.stories.tsx +12 -0
- package/src/stories/components/Ships.stories.tsx +12 -0
- package/src/stories/components/Sidebar.stories.tsx +37 -0
- package/src/stories/components/SidebarLayouts.stories.tsx +12 -0
- package/src/stories/components/Skeletons.stories.tsx +12 -0
- package/src/stories/components/Workflows.stories.tsx +12 -0
- package/src/stories/style-guide/Buttons.stories.tsx +12 -0
- package/src/stories/style-guide/ColorTokens.stories.tsx +12 -0
- package/src/stories/style-guide/Colors.stories.tsx +12 -0
- package/src/stories/style-guide/RaiseLevels.stories.tsx +12 -0
- package/src/stories/style-guide/Typography.stories.tsx +12 -0
- package/src/style.css +169 -2
- package/src/tailwind-theme.ts +164 -240
- package/src/tokens/colors.ts +82 -0
- package/src/tokens/elevation.ts +12 -0
- package/src/tokens/index.ts +4 -0
- package/src/tokens/semantic.ts +89 -0
- package/src/tokens/typography.ts +21 -0
- package/dist/components/HelloWorld.d.ts +0 -1
- package/dist/components/InputPrompt.d.ts +0 -20
- package/dist/components/SearchModal.d.ts +0 -24
- package/dist/components/Sidebar/Button.d.ts +0 -7
- package/dist/components/Sidebar/Container.d.ts +0 -5
- package/dist/components/Sidebar/Item.d.ts +0 -9
- package/dist/components/Sidebar/Layout.d.ts +0 -10
- package/dist/components/Sidebar/Provider.d.ts +0 -14
- package/dist/components/Sidebar/SecondaryItem.d.ts +0 -9
- package/dist/components/Sidebar/SideContainer.d.ts +0 -5
- package/dist/components/Sidebar/ToggleCollapseButton.d.ts +0 -1
- package/dist/components/Sidebar/index.d.ts +0 -8
- package/dist/components/icons/CloseSidebarIcon.d.ts +0 -2
- package/dist/components/icons/CloseSidebarMidIcon.d.ts +0 -1
- package/dist/components/icons/ExpandIcon.d.ts +0 -3
- package/dist/components/icons/SendArrowIcon.d.ts +0 -4
- package/dist/components/icons/SendArrowIconGreen.d.ts +0 -4
- package/dist/components/icons/SettingsIcon.d.ts +0 -3
- package/dist/components/icons/XIcon.d.ts +0 -3
- package/dist/material-theme.d.ts +0 -442
- package/dist/stories/Buttons.d.ts +0 -1
- package/dist/stories/Checkbox.d.ts +0 -1
- package/dist/stories/ColorPalette.d.ts +0 -1
- package/dist/stories/Dropdowns.d.ts +0 -1
- package/dist/stories/InputPrompt.d.ts +0 -1
- package/dist/stories/SearchModal.d.ts +0 -1
- package/dist/stories/Sidebar.d.ts +0 -1
- package/dist/stories/Typography.d.ts +0 -1
- package/src/components/HelloWorld.tsx +0 -3
- package/src/components/InputPrompt.tsx +0 -96
- package/src/components/SearchModal.tsx +0 -320
- package/src/components/Sidebar/Button.tsx +0 -20
- package/src/components/Sidebar/Container.tsx +0 -31
- package/src/components/Sidebar/Item.tsx +0 -39
- package/src/components/Sidebar/Layout.tsx +0 -32
- package/src/components/Sidebar/Provider.tsx +0 -47
- package/src/components/Sidebar/SecondaryItem.tsx +0 -39
- package/src/components/Sidebar/SideContainer.tsx +0 -31
- package/src/components/Sidebar/ToggleCollapseButton.tsx +0 -24
- package/src/components/Sidebar/index.ts +0 -8
- package/src/components/icons/CloseSidebarIcon.tsx +0 -19
- package/src/components/icons/CloseSidebarMidIcon.tsx +0 -19
- package/src/components/icons/ExpandIcon.tsx +0 -21
- package/src/components/icons/SendArrowIcon.tsx +0 -23
- package/src/components/icons/SendArrowIconGreen.tsx +0 -17
- package/src/components/icons/SettingsIcon.tsx +0 -33
- package/src/components/icons/XIcon.tsx +0 -21
- package/src/material-theme.ts +0 -477
- package/src/stories/Buttons.stories.tsx +0 -15
- package/src/stories/Buttons.tsx +0 -52
- package/src/stories/Checkbox.stories.tsx +0 -15
- package/src/stories/Checkbox.tsx +0 -56
- package/src/stories/ColorPalette.stories.tsx +0 -15
- package/src/stories/ColorPalette.tsx +0 -85
- package/src/stories/DocumentEditor.stories.tsx +0 -287
- package/src/stories/Dropdowns.stories.tsx +0 -15
- package/src/stories/Dropdowns.tsx +0 -52
- package/src/stories/InputPrompt.stories.tsx +0 -15
- package/src/stories/InputPrompt.tsx +0 -63
- package/src/stories/ModalHeader.stories.tsx +0 -36
- package/src/stories/PDFViewer.stories.tsx +0 -39
- package/src/stories/SearchModal.stories.tsx +0 -132
- package/src/stories/SearchModal.tsx +0 -82
- package/src/stories/Sidebar.stories.tsx +0 -15
- package/src/stories/Sidebar.tsx +0 -108
- package/src/stories/Tabs.stories.tsx +0 -51
- package/src/stories/Typography.stories.tsx +0 -15
- package/src/stories/Typography.tsx +0 -110
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { FiltersIcon } from "../../icons/generated";
|
|
3
|
+
import { SearchIcon } from "../../icons/generated";
|
|
4
|
+
|
|
5
|
+
export type FiltersBarTabs = "on" | "off";
|
|
6
|
+
export type FiltersBarFilters = "on" | "off";
|
|
7
|
+
|
|
8
|
+
export type FiltersBarProps = {
|
|
9
|
+
tabs?: FiltersBarTabs;
|
|
10
|
+
filters?: FiltersBarFilters;
|
|
11
|
+
tabLabels?: string[];
|
|
12
|
+
activeTab?: string;
|
|
13
|
+
searchPlaceholder?: string;
|
|
14
|
+
filterChips?: string[];
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const defaultTabs = ["All", "Reports", "Chats", "Issues", "Forms", "Workflows"];
|
|
19
|
+
|
|
20
|
+
export const FiltersBar = ({
|
|
21
|
+
tabs = "on",
|
|
22
|
+
filters = "off",
|
|
23
|
+
tabLabels = defaultTabs,
|
|
24
|
+
activeTab = "All",
|
|
25
|
+
searchPlaceholder = "Search",
|
|
26
|
+
filterChips = ["Status", "Date", "Chief"],
|
|
27
|
+
className,
|
|
28
|
+
}: FiltersBarProps) => (
|
|
29
|
+
<div className={cn("flex w-full flex-col gap-3", className)}>
|
|
30
|
+
<div className="flex items-center justify-between gap-4">
|
|
31
|
+
{tabs === "on" && (
|
|
32
|
+
<div className="flex flex-wrap gap-2">
|
|
33
|
+
{tabLabels.map((tab) => (
|
|
34
|
+
<button
|
|
35
|
+
key={tab}
|
|
36
|
+
type="button"
|
|
37
|
+
className={cn(
|
|
38
|
+
"rounded-full px-3 py-1.5 text-caption-2-em transition-colors",
|
|
39
|
+
tab === activeTab
|
|
40
|
+
? "bg-background-selected text-display-on-dark-primary"
|
|
41
|
+
: "bg-background-secondary text-display-on-light-tertiary hover:text-display-on-light-primary",
|
|
42
|
+
)}
|
|
43
|
+
>
|
|
44
|
+
{tab}
|
|
45
|
+
</button>
|
|
46
|
+
))}
|
|
47
|
+
</div>
|
|
48
|
+
)}
|
|
49
|
+
<div className="flex shrink-0 items-center gap-4">
|
|
50
|
+
<button
|
|
51
|
+
type="button"
|
|
52
|
+
aria-label="Open filters"
|
|
53
|
+
className="flex size-9 items-center justify-center rounded-full bg-background-secondary text-display-on-light-secondary hover:text-display-on-light-primary"
|
|
54
|
+
>
|
|
55
|
+
<FiltersIcon size="small" />
|
|
56
|
+
</button>
|
|
57
|
+
<div className="flex w-[250px] items-center gap-2 rounded-md border border-divider-primary px-3 py-2">
|
|
58
|
+
<span className="flex-1 text-body text-display-on-light-secondary">{searchPlaceholder}</span>
|
|
59
|
+
<SearchIcon size="small" className="text-display-on-light-tertiary" />
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
{filters === "on" && (
|
|
64
|
+
<div className="flex flex-wrap gap-2">
|
|
65
|
+
{filterChips.map((chip) => (
|
|
66
|
+
<span
|
|
67
|
+
key={chip}
|
|
68
|
+
className="rounded-full bg-background-secondary px-3 py-1.5 text-caption-2-em text-display-on-light-tertiary"
|
|
69
|
+
>
|
|
70
|
+
{chip}
|
|
71
|
+
</span>
|
|
72
|
+
))}
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { FiltersBar, type FiltersBarFilters, type FiltersBarProps, type FiltersBarTabs } from "./FiltersBar";
|
|
2
|
+
export { FilteredPill, type FilteredPillProps, type FilteredPillState } from "./FilteredPill";
|
|
3
|
+
export { FilterPill, type FilterPillIndicator, type FilterPillProps } from "./FilterPill";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { cn } from "../../utils/cn";
|
|
3
|
+
import { Badge } from "../../primitives/Badge";
|
|
4
|
+
import { IconButton } from "../../primitives/IconButton";
|
|
5
|
+
import { FormsIcon } from "../../icons/generated";
|
|
6
|
+
import { PlusIcon } from "../../icons/generated";
|
|
7
|
+
|
|
8
|
+
export type FormCardState = "idle" | "hover";
|
|
9
|
+
|
|
10
|
+
export type FormCardProps = {
|
|
11
|
+
name?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
formCount?: number;
|
|
14
|
+
pendingCount?: number;
|
|
15
|
+
state?: FormCardState;
|
|
16
|
+
icon?: ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const stateStyles: Record<FormCardState, string> = {
|
|
21
|
+
idle: "bg-background-primary",
|
|
22
|
+
hover: "bg-background-secondary",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const FormCard = ({
|
|
26
|
+
name = "Name",
|
|
27
|
+
description = "Description",
|
|
28
|
+
formCount = 4,
|
|
29
|
+
pendingCount = 7,
|
|
30
|
+
state = "idle",
|
|
31
|
+
icon,
|
|
32
|
+
className,
|
|
33
|
+
}: FormCardProps) => (
|
|
34
|
+
<div
|
|
35
|
+
className={cn(
|
|
36
|
+
"flex w-full max-w-[560px] flex-col overflow-hidden rounded-2xl border border-divider-primary transition-colors",
|
|
37
|
+
stateStyles[state],
|
|
38
|
+
state === "idle" && "hover:bg-background-secondary",
|
|
39
|
+
className,
|
|
40
|
+
)}
|
|
41
|
+
>
|
|
42
|
+
<div className="flex items-center gap-4 p-4">
|
|
43
|
+
<span className="flex size-[46px] shrink-0 items-center justify-center rounded-control bg-background-secondary">
|
|
44
|
+
{icon ?? <FormsIcon size="large" />}
|
|
45
|
+
</span>
|
|
46
|
+
<div className="min-w-0 flex-1">
|
|
47
|
+
<p className="text-body-em text-display-on-light-primary">{name}</p>
|
|
48
|
+
<p className="text-caption-2 text-display-on-light-secondary">{description}</p>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div className="flex items-center justify-between border-t border-divider-primary px-4 py-4">
|
|
52
|
+
<div className="flex flex-wrap gap-2">
|
|
53
|
+
<Badge color="grey">{formCount} Forms</Badge>
|
|
54
|
+
{pendingCount > 0 && <Badge color="orange">{pendingCount} Pending</Badge>}
|
|
55
|
+
</div>
|
|
56
|
+
<IconButton hierarchy="tertiary" size="small" aria-label="Add form">
|
|
57
|
+
<PlusIcon size="small" />
|
|
58
|
+
</IconButton>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { Badge } from "../../primitives/Badge";
|
|
3
|
+
|
|
4
|
+
export type FormHeaderProps = {
|
|
5
|
+
title?: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
status?: string;
|
|
8
|
+
dueDate?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const FormHeader = ({
|
|
13
|
+
title = "Safety Management System Review",
|
|
14
|
+
subtitle = "MV Atlantic Star · Chief Technical",
|
|
15
|
+
status = "In progress",
|
|
16
|
+
dueDate = "Due 21 Jul 2026",
|
|
17
|
+
className,
|
|
18
|
+
}: FormHeaderProps) => (
|
|
19
|
+
<header
|
|
20
|
+
className={cn(
|
|
21
|
+
"w-full rounded-2xl border border-divider-primary bg-background-primary p-6",
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
24
|
+
>
|
|
25
|
+
<div className="flex flex-wrap items-start justify-between gap-4">
|
|
26
|
+
<div className="min-w-0 flex-1">
|
|
27
|
+
<h2 className="text-subheader-em text-display-on-light-primary">{title}</h2>
|
|
28
|
+
<p className="mt-1 text-caption-2 text-display-on-light-tertiary">{subtitle}</p>
|
|
29
|
+
</div>
|
|
30
|
+
<Badge color="blue">{status}</Badge>
|
|
31
|
+
</div>
|
|
32
|
+
<p className="mt-4 text-caption-2-em text-display-on-light-secondary">{dueDate}</p>
|
|
33
|
+
</header>
|
|
34
|
+
);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { FormIcon } from "../../icons/generated";
|
|
3
|
+
|
|
4
|
+
export type ListRowState = "idle" | "hover";
|
|
5
|
+
|
|
6
|
+
export type ListRowProps = {
|
|
7
|
+
name?: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
state?: ListRowState;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const stateStyles: Record<ListRowState, string> = {
|
|
14
|
+
idle: "bg-transparent",
|
|
15
|
+
hover: "bg-background-secondary",
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const ListRow = ({
|
|
19
|
+
name = "ISM Code checklist",
|
|
20
|
+
subtitle = "Last updated 3 days ago",
|
|
21
|
+
state = "idle",
|
|
22
|
+
className,
|
|
23
|
+
}: ListRowProps) => (
|
|
24
|
+
<div
|
|
25
|
+
className={cn(
|
|
26
|
+
"flex w-full items-center gap-3 rounded-control px-3 py-2 transition-colors",
|
|
27
|
+
stateStyles[state],
|
|
28
|
+
state === "idle" && "hover:bg-background-secondary",
|
|
29
|
+
className,
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
32
|
+
<span className="flex size-8 shrink-0 items-center justify-center rounded-control bg-background-secondary">
|
|
33
|
+
<FormIcon size="small" />
|
|
34
|
+
</span>
|
|
35
|
+
<div className="min-w-0 flex-1">
|
|
36
|
+
<p className="truncate text-caption-1-em text-display-on-light-primary">{name}</p>
|
|
37
|
+
<p className="truncate text-caption-2 text-display-on-light-tertiary">{subtitle}</p>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
|
|
3
|
+
export type RiskMeterLevel = "high" | "medium" | "low";
|
|
4
|
+
|
|
5
|
+
export type RiskMeterProps = {
|
|
6
|
+
level?: RiskMeterLevel;
|
|
7
|
+
label?: string;
|
|
8
|
+
score?: number;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const levelConfig: Record<
|
|
13
|
+
RiskMeterLevel,
|
|
14
|
+
{ label: string; score: number; bar: string; text: string }
|
|
15
|
+
> = {
|
|
16
|
+
high: { label: "High risk", score: 85, bar: "bg-red-500", text: "text-red-600" },
|
|
17
|
+
medium: { label: "Medium risk", score: 52, bar: "bg-orange-700", text: "text-orange-700" },
|
|
18
|
+
low: { label: "Low risk", score: 18, bar: "bg-meta-green", text: "text-green-700" },
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const RiskMeter = ({
|
|
22
|
+
level = "high",
|
|
23
|
+
label,
|
|
24
|
+
score,
|
|
25
|
+
className,
|
|
26
|
+
}: RiskMeterProps) => {
|
|
27
|
+
const config = levelConfig[level];
|
|
28
|
+
const displayLabel = label ?? config.label;
|
|
29
|
+
const displayScore = score ?? config.score;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
className={cn(
|
|
34
|
+
"w-full max-w-[480px] rounded-control border border-divider-primary bg-background-primary p-4",
|
|
35
|
+
className,
|
|
36
|
+
)}
|
|
37
|
+
>
|
|
38
|
+
<div className="flex items-center justify-between gap-4">
|
|
39
|
+
<span className={cn("text-body-em", config.text)}>{displayLabel}</span>
|
|
40
|
+
<span className="text-caption-1-em text-display-on-light-primary">{displayScore}%</span>
|
|
41
|
+
</div>
|
|
42
|
+
<div className="mt-3 h-2 overflow-hidden rounded-full bg-grey-200">
|
|
43
|
+
<div
|
|
44
|
+
className={cn("h-full rounded-full", config.bar)}
|
|
45
|
+
style={{ width: `${displayScore}%` }}
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { FormCard, type FormCardProps, type FormCardState } from "./FormCard";
|
|
2
|
+
export { ListRow, type ListRowProps, type ListRowState } from "./ListRow";
|
|
3
|
+
export { FormHeader, type FormHeaderProps } from "./FormHeader";
|
|
4
|
+
export { RiskMeter, type RiskMeterLevel, type RiskMeterProps } from "./RiskMeter";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { FileIcon } from "../../icons/generated";
|
|
3
|
+
import { SpinnerIcon } from "../../icons/generated";
|
|
4
|
+
|
|
5
|
+
export type FileState = "idle" | "uploaded" | "uploading" | "waiting" | "huge";
|
|
6
|
+
|
|
7
|
+
export type FileProps = {
|
|
8
|
+
name?: string;
|
|
9
|
+
meta?: string;
|
|
10
|
+
state?: FileState;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const stateMeta: Record<FileState, string> = {
|
|
15
|
+
idle: "PDF · 2.4 MB",
|
|
16
|
+
uploaded: "Uploaded just now",
|
|
17
|
+
uploading: "Uploading… 64%",
|
|
18
|
+
waiting: "Waiting for upload",
|
|
19
|
+
huge: "PDF · 18.6 MB",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const File = ({
|
|
23
|
+
name = "Safety certificate.pdf",
|
|
24
|
+
meta,
|
|
25
|
+
state = "idle",
|
|
26
|
+
className,
|
|
27
|
+
}: FileProps) => {
|
|
28
|
+
const displayMeta = meta ?? stateMeta[state];
|
|
29
|
+
const isHuge = state === "huge";
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
className={cn(
|
|
34
|
+
"flex w-full items-center gap-3 rounded-control px-3 transition-colors",
|
|
35
|
+
isHuge ? "py-3" : "py-2",
|
|
36
|
+
state === "uploading" && "bg-blue-50",
|
|
37
|
+
state === "waiting" && "bg-orange-50",
|
|
38
|
+
className,
|
|
39
|
+
)}
|
|
40
|
+
>
|
|
41
|
+
{state === "uploading" ? (
|
|
42
|
+
<SpinnerIcon size="small" className="text-blue-600" />
|
|
43
|
+
) : (
|
|
44
|
+
<FileIcon size={isHuge ? "large" : "small"} className="text-display-on-light-secondary" />
|
|
45
|
+
)}
|
|
46
|
+
<div className="min-w-0 flex-1">
|
|
47
|
+
<p
|
|
48
|
+
className={cn(
|
|
49
|
+
"truncate text-display-on-light-primary",
|
|
50
|
+
isHuge ? "text-body-em" : "text-caption-1",
|
|
51
|
+
)}
|
|
52
|
+
>
|
|
53
|
+
{name}
|
|
54
|
+
</p>
|
|
55
|
+
<p className="truncate text-caption-2 text-display-on-light-tertiary">{displayMeta}</p>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { ChevronIcon } from "../../icons/ChevronIcon";
|
|
3
|
+
import { FolderIcon } from "../../icons/generated";
|
|
4
|
+
|
|
5
|
+
export type FolderState = "idle" | "hover" | "selected";
|
|
6
|
+
|
|
7
|
+
export type FolderProps = {
|
|
8
|
+
name?: string;
|
|
9
|
+
fileCount?: number;
|
|
10
|
+
state?: FolderState;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const stateStyles: Record<FolderState, string> = {
|
|
15
|
+
idle: "bg-transparent text-display-on-light-primary",
|
|
16
|
+
hover: "bg-background-secondary text-display-on-light-primary",
|
|
17
|
+
selected: "bg-background-selected text-display-on-dark-primary",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const Folder = ({
|
|
21
|
+
name = "Certificates",
|
|
22
|
+
fileCount = 24,
|
|
23
|
+
state = "idle",
|
|
24
|
+
className,
|
|
25
|
+
}: FolderProps) => (
|
|
26
|
+
<div
|
|
27
|
+
className={cn(
|
|
28
|
+
"flex w-full items-center gap-3 rounded-control px-3 py-3 transition-colors",
|
|
29
|
+
stateStyles[state],
|
|
30
|
+
state === "idle" && "hover:bg-background-secondary",
|
|
31
|
+
className,
|
|
32
|
+
)}
|
|
33
|
+
>
|
|
34
|
+
<FolderIcon
|
|
35
|
+
size="small"
|
|
36
|
+
className={state === "selected" ? "text-white" : "text-display-on-light-secondary"}
|
|
37
|
+
/>
|
|
38
|
+
<div className="min-w-0 flex-1">
|
|
39
|
+
<p className="truncate text-caption-1-em">{name}</p>
|
|
40
|
+
<p
|
|
41
|
+
className={cn(
|
|
42
|
+
"text-caption-2",
|
|
43
|
+
state === "selected" ? "text-display-on-dark-secondary" : "text-display-on-light-tertiary",
|
|
44
|
+
)}
|
|
45
|
+
>
|
|
46
|
+
{fileCount} files
|
|
47
|
+
</p>
|
|
48
|
+
</div>
|
|
49
|
+
<ChevronIcon
|
|
50
|
+
size="small"
|
|
51
|
+
direction="right"
|
|
52
|
+
className={state === "selected" ? "text-display-on-dark-tertiary" : "text-display-on-light-quaternary"}
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { Folder } from "./Folder";
|
|
3
|
+
|
|
4
|
+
export type FoldersLayout = "collapsed" | "expanded";
|
|
5
|
+
|
|
6
|
+
export type FoldersProps = {
|
|
7
|
+
layout?: FoldersLayout;
|
|
8
|
+
folders?: { name: string; fileCount: number; selected?: boolean }[];
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const defaultFolders = [
|
|
13
|
+
{ name: "Certificates", fileCount: 24, selected: true },
|
|
14
|
+
{ name: "Crew documents", fileCount: 12 },
|
|
15
|
+
{ name: "Inspection reports", fileCount: 8 },
|
|
16
|
+
{ name: "Maintenance logs", fileCount: 31 },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
export const Folders = ({
|
|
20
|
+
layout = "expanded",
|
|
21
|
+
folders = defaultFolders,
|
|
22
|
+
className,
|
|
23
|
+
}: FoldersProps) => {
|
|
24
|
+
const visibleFolders = layout === "collapsed" ? folders.slice(0, 1) : folders;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div
|
|
28
|
+
className={cn(
|
|
29
|
+
"w-full rounded-2xl border border-divider-primary bg-background-primary p-2",
|
|
30
|
+
className,
|
|
31
|
+
)}
|
|
32
|
+
>
|
|
33
|
+
{visibleFolders.map((folder) => (
|
|
34
|
+
<Folder
|
|
35
|
+
key={folder.name}
|
|
36
|
+
name={folder.name}
|
|
37
|
+
fileCount={folder.fileCount}
|
|
38
|
+
state={folder.selected ? "selected" : "idle"}
|
|
39
|
+
/>
|
|
40
|
+
))}
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { DocumentIcon } from "../../icons/generated";
|
|
3
|
+
|
|
4
|
+
export type ListRowState = "idle" | "hover";
|
|
5
|
+
|
|
6
|
+
export type ListRowProps = {
|
|
7
|
+
name?: string;
|
|
8
|
+
updatedAt?: string;
|
|
9
|
+
state?: ListRowState;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const stateStyles: Record<ListRowState, string> = {
|
|
14
|
+
idle: "bg-transparent",
|
|
15
|
+
hover: "bg-background-secondary",
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const ListRow = ({
|
|
19
|
+
name = "ISM annual review.pdf",
|
|
20
|
+
updatedAt = "Updated yesterday",
|
|
21
|
+
state = "idle",
|
|
22
|
+
className,
|
|
23
|
+
}: ListRowProps) => (
|
|
24
|
+
<div
|
|
25
|
+
className={cn(
|
|
26
|
+
"flex w-full items-center gap-3 rounded-control px-3 py-2 transition-colors",
|
|
27
|
+
stateStyles[state],
|
|
28
|
+
state === "idle" && "hover:bg-background-secondary",
|
|
29
|
+
className,
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
32
|
+
<span className="flex size-8 shrink-0 items-center justify-center rounded-control bg-background-secondary">
|
|
33
|
+
<DocumentIcon size="small" />
|
|
34
|
+
</span>
|
|
35
|
+
<div className="min-w-0 flex-1">
|
|
36
|
+
<p className="truncate text-caption-1-em text-display-on-light-primary">{name}</p>
|
|
37
|
+
<p className="truncate text-caption-2 text-display-on-light-tertiary">{updatedAt}</p>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { ChevronIcon } from "../../icons/ChevronIcon";
|
|
3
|
+
|
|
4
|
+
export type NavigationNested = "on" | "off";
|
|
5
|
+
|
|
6
|
+
export type NavigationProps = {
|
|
7
|
+
label?: string;
|
|
8
|
+
nested?: NavigationNested;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const Navigation = ({
|
|
13
|
+
label = "Library",
|
|
14
|
+
nested = "off",
|
|
15
|
+
className,
|
|
16
|
+
}: NavigationProps) => (
|
|
17
|
+
<nav
|
|
18
|
+
className={cn(
|
|
19
|
+
"flex items-center gap-1 text-caption-2",
|
|
20
|
+
nested === "on" && "pl-4",
|
|
21
|
+
className,
|
|
22
|
+
)}
|
|
23
|
+
aria-label="Library navigation"
|
|
24
|
+
>
|
|
25
|
+
<button type="button" className="text-display-on-light-tertiary hover:text-display-on-light-primary">
|
|
26
|
+
Documents
|
|
27
|
+
</button>
|
|
28
|
+
<ChevronIcon size="small" direction="right" className="text-display-on-light-quaternary" />
|
|
29
|
+
<span className="text-caption-2-em text-display-on-light-primary">{label}</span>
|
|
30
|
+
</nav>
|
|
31
|
+
);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Folder, type FolderProps, type FolderState } from "./Folder";
|
|
2
|
+
export { File, type FileProps, type FileState } from "./File";
|
|
3
|
+
export { Navigation, type NavigationNested, type NavigationProps } from "./Navigation";
|
|
4
|
+
export { Folders, type FoldersLayout, type FoldersProps } from "./Folders";
|
|
5
|
+
export { ListRow, type ListRowProps, type ListRowState } from "./ListRow";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
|
|
3
|
+
export type InfoHeadingEmphasis = "on" | "off";
|
|
4
|
+
|
|
5
|
+
export type InfoHeadingProps = {
|
|
6
|
+
title?: string;
|
|
7
|
+
emphasis?: InfoHeadingEmphasis;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const InfoHeading = ({
|
|
12
|
+
title = "Inspection details",
|
|
13
|
+
emphasis = "on",
|
|
14
|
+
className,
|
|
15
|
+
}: InfoHeadingProps) => (
|
|
16
|
+
<p
|
|
17
|
+
className={cn(
|
|
18
|
+
"w-full text-display-on-light-primary",
|
|
19
|
+
emphasis === "on" ? "text-body-em" : "text-caption-1",
|
|
20
|
+
className,
|
|
21
|
+
)}
|
|
22
|
+
>
|
|
23
|
+
{title}
|
|
24
|
+
</p>
|
|
25
|
+
);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
|
|
3
|
+
export type InfoRowColumn = "on" | "off";
|
|
4
|
+
|
|
5
|
+
export type InfoRowProps = {
|
|
6
|
+
label?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
column?: InfoRowColumn;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const InfoRow = ({
|
|
13
|
+
label = "Vessel",
|
|
14
|
+
value = "MV Atlantic Star",
|
|
15
|
+
column = "off",
|
|
16
|
+
className,
|
|
17
|
+
}: InfoRowProps) => (
|
|
18
|
+
<div
|
|
19
|
+
className={cn(
|
|
20
|
+
"w-full rounded-control border border-divider-primary bg-background-primary p-4",
|
|
21
|
+
column === "on" ? "flex flex-col gap-1" : "flex items-start justify-between gap-6",
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
24
|
+
>
|
|
25
|
+
<span className="text-caption-2 text-display-on-light-tertiary">{label}</span>
|
|
26
|
+
<span
|
|
27
|
+
className={cn(
|
|
28
|
+
"text-body text-display-on-light-primary",
|
|
29
|
+
column === "off" && "text-right",
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
32
|
+
{value}
|
|
33
|
+
</span>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { cn } from "../../utils/cn";
|
|
3
|
+
import { InfoHeading } from "./InfoHeading";
|
|
4
|
+
import { InfoRow } from "./InfoRow";
|
|
5
|
+
import { SectionHeader } from "./SectionHeader";
|
|
6
|
+
import { TaskRow } from "./TaskRow";
|
|
7
|
+
|
|
8
|
+
export type ReportProps = {
|
|
9
|
+
title?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const Report = ({
|
|
15
|
+
title = "Port State Control Report",
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
}: ReportProps) => (
|
|
19
|
+
<article
|
|
20
|
+
className={cn(
|
|
21
|
+
"w-full rounded-lg border border-divider-primary bg-background-primary p-6",
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
24
|
+
>
|
|
25
|
+
<header className="border-b border-divider-primary pb-4">
|
|
26
|
+
<h2 className="font-heading text-heading text-display-on-light-primary">{title}</h2>
|
|
27
|
+
<p className="mt-1 text-caption-2 text-display-on-light-tertiary">
|
|
28
|
+
Generated on 7 Jul 2026 · Chief Technical
|
|
29
|
+
</p>
|
|
30
|
+
</header>
|
|
31
|
+
|
|
32
|
+
<div className="mt-6 space-y-6">
|
|
33
|
+
{children ?? (
|
|
34
|
+
<>
|
|
35
|
+
<InfoHeading title="Vessel information" />
|
|
36
|
+
<div className="space-y-3">
|
|
37
|
+
<InfoRow label="Vessel" value="MV Atlantic Star" />
|
|
38
|
+
<InfoRow label="IMO" value="9876543" column="on" />
|
|
39
|
+
<InfoRow label="Flag" value="Marshall Islands" />
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<SectionHeader title="Outstanding actions" subtitle="2 tasks remaining">
|
|
43
|
+
<div className="space-y-1">
|
|
44
|
+
<TaskRow label="Review fire safety documentation" />
|
|
45
|
+
<TaskRow label="Confirm crew certification records" strikethrough="on" />
|
|
46
|
+
<TaskRow variant="add-more" />
|
|
47
|
+
</div>
|
|
48
|
+
</SectionHeader>
|
|
49
|
+
</>
|
|
50
|
+
)}
|
|
51
|
+
</div>
|
|
52
|
+
</article>
|
|
53
|
+
);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { cn } from "../../utils/cn";
|
|
3
|
+
import { ChevronIcon } from "../../icons/ChevronIcon";
|
|
4
|
+
|
|
5
|
+
export type SectionHeaderCollapsed = "on" | "off";
|
|
6
|
+
|
|
7
|
+
export type SectionHeaderProps = {
|
|
8
|
+
title?: string;
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
collapsed?: SectionHeaderCollapsed;
|
|
11
|
+
className?: string;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const SectionHeader = ({
|
|
16
|
+
title = "Section title",
|
|
17
|
+
subtitle = "3 tasks remaining",
|
|
18
|
+
collapsed = "off",
|
|
19
|
+
className,
|
|
20
|
+
children,
|
|
21
|
+
}: SectionHeaderProps) => (
|
|
22
|
+
<div
|
|
23
|
+
className={cn(
|
|
24
|
+
"flex w-full items-start justify-between gap-4 rounded-control border border-divider-primary bg-background-primary p-4",
|
|
25
|
+
className,
|
|
26
|
+
)}
|
|
27
|
+
>
|
|
28
|
+
<div className="min-w-0 flex-1">
|
|
29
|
+
<div className="flex items-center gap-2">
|
|
30
|
+
<ChevronIcon
|
|
31
|
+
size="small"
|
|
32
|
+
direction={collapsed === "on" ? "right" : "down"}
|
|
33
|
+
className="text-display-on-light-tertiary"
|
|
34
|
+
/>
|
|
35
|
+
<p className="text-body-em text-display-on-light-primary">{title}</p>
|
|
36
|
+
</div>
|
|
37
|
+
{collapsed === "off" && (
|
|
38
|
+
<p className="mt-1 pl-6 text-caption-2 text-display-on-light-tertiary">{subtitle}</p>
|
|
39
|
+
)}
|
|
40
|
+
{collapsed === "off" && children && <div className="mt-3 pl-6">{children}</div>}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
);
|