@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,57 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { CheckboxIcon } from "../../icons/generated";
|
|
3
|
+
import { PlusIcon } from "../../icons/generated";
|
|
4
|
+
|
|
5
|
+
export type TaskRowVariant = "task" | "add-more";
|
|
6
|
+
export type TaskRowHover = "on" | "off";
|
|
7
|
+
export type TaskRowStrikethrough = "on" | "off";
|
|
8
|
+
|
|
9
|
+
export type TaskRowProps = {
|
|
10
|
+
label?: string;
|
|
11
|
+
variant?: TaskRowVariant;
|
|
12
|
+
hover?: TaskRowHover;
|
|
13
|
+
strikethrough?: TaskRowStrikethrough;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const hoverStyles: Record<TaskRowHover, string> = {
|
|
18
|
+
off: "bg-transparent",
|
|
19
|
+
on: "bg-background-secondary",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const TaskRow = ({
|
|
23
|
+
label = "Complete safety inspection checklist",
|
|
24
|
+
variant = "task",
|
|
25
|
+
hover = "off",
|
|
26
|
+
strikethrough = "off",
|
|
27
|
+
className,
|
|
28
|
+
}: TaskRowProps) => {
|
|
29
|
+
const isAddMore = variant === "add-more";
|
|
30
|
+
const displayLabel = isAddMore ? "Add more" : label;
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
className={cn(
|
|
35
|
+
"flex w-full items-center gap-2 rounded-control px-2 py-1 transition-colors",
|
|
36
|
+
hoverStyles[hover],
|
|
37
|
+
hover === "off" && "hover:bg-background-secondary",
|
|
38
|
+
className,
|
|
39
|
+
)}
|
|
40
|
+
>
|
|
41
|
+
{isAddMore ? (
|
|
42
|
+
<PlusIcon size="small" className="text-display-on-light-tertiary" />
|
|
43
|
+
) : (
|
|
44
|
+
<CheckboxIcon size="small" className="text-display-on-light-tertiary" />
|
|
45
|
+
)}
|
|
46
|
+
<span
|
|
47
|
+
className={cn(
|
|
48
|
+
"text-caption-1 text-display-on-light-primary",
|
|
49
|
+
strikethrough === "on" && "text-display-on-light-quaternary line-through",
|
|
50
|
+
isAddMore && hover === "on" && "text-action-tertiary-on-idle",
|
|
51
|
+
)}
|
|
52
|
+
>
|
|
53
|
+
{displayLabel}
|
|
54
|
+
</span>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { SectionHeader, type SectionHeaderCollapsed, type SectionHeaderProps } from "./SectionHeader";
|
|
2
|
+
export { TaskRow, type TaskRowHover, type TaskRowProps, type TaskRowStrikethrough, type TaskRowVariant } from "./TaskRow";
|
|
3
|
+
export { InfoRow, type InfoRowColumn, type InfoRowProps } from "./InfoRow";
|
|
4
|
+
export { InfoHeading, type InfoHeadingEmphasis, type InfoHeadingProps } from "./InfoHeading";
|
|
5
|
+
export { Report, type ReportProps } from "./Report";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { PenIcon } from "../../icons/generated";
|
|
3
|
+
|
|
4
|
+
export type EquipmentRowEditable = "on" | "off";
|
|
5
|
+
|
|
6
|
+
export type EquipmentRowProps = {
|
|
7
|
+
name?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
editable?: EquipmentRowEditable;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const EquipmentRow = ({
|
|
14
|
+
name = "Main engine",
|
|
15
|
+
type = "MAN B&W 6S50ME-C",
|
|
16
|
+
editable = "on",
|
|
17
|
+
className,
|
|
18
|
+
}: EquipmentRowProps) => (
|
|
19
|
+
<div
|
|
20
|
+
className={cn(
|
|
21
|
+
"flex w-full items-center justify-between gap-4 rounded-control border border-divider-primary bg-background-primary px-4 py-3",
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
24
|
+
>
|
|
25
|
+
<div className="min-w-0">
|
|
26
|
+
<p className="text-body-em text-display-on-light-primary">{name}</p>
|
|
27
|
+
<p className="text-caption-2 text-display-on-light-tertiary">{type}</p>
|
|
28
|
+
</div>
|
|
29
|
+
{editable === "on" && (
|
|
30
|
+
<button
|
|
31
|
+
type="button"
|
|
32
|
+
aria-label="Edit equipment"
|
|
33
|
+
className="shrink-0 rounded-control p-1 text-display-on-light-tertiary hover:bg-background-secondary hover:text-display-on-light-primary"
|
|
34
|
+
>
|
|
35
|
+
<PenIcon size="small" />
|
|
36
|
+
</button>
|
|
37
|
+
)}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { Avatar } from "../../primitives/Avatar";
|
|
3
|
+
import { Button } from "../../primitives/Button";
|
|
4
|
+
|
|
5
|
+
export type MemberRowState = "idle" | "hover";
|
|
6
|
+
export type MemberRowAction = "label" | "button";
|
|
7
|
+
|
|
8
|
+
export type MemberRowProps = {
|
|
9
|
+
name?: string;
|
|
10
|
+
role?: string;
|
|
11
|
+
state?: MemberRowState;
|
|
12
|
+
action?: MemberRowAction;
|
|
13
|
+
actionLabel?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const stateStyles: Record<MemberRowState, string> = {
|
|
18
|
+
idle: "bg-transparent",
|
|
19
|
+
hover: "bg-background-secondary",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const MemberRow = ({
|
|
23
|
+
name = "Jane Doe",
|
|
24
|
+
role = "Chief Engineer",
|
|
25
|
+
state = "idle",
|
|
26
|
+
action = "label",
|
|
27
|
+
actionLabel = "Admin",
|
|
28
|
+
className,
|
|
29
|
+
}: MemberRowProps) => (
|
|
30
|
+
<div
|
|
31
|
+
className={cn(
|
|
32
|
+
"flex w-full items-center justify-between gap-4 rounded-control px-3 py-3 transition-colors",
|
|
33
|
+
stateStyles[state],
|
|
34
|
+
state === "idle" && "hover:bg-background-secondary",
|
|
35
|
+
className,
|
|
36
|
+
)}
|
|
37
|
+
>
|
|
38
|
+
<div className="flex min-w-0 items-center gap-3">
|
|
39
|
+
<Avatar chief="initials" size={32} initials={name} />
|
|
40
|
+
<div className="min-w-0">
|
|
41
|
+
<p className="truncate text-body-em text-display-on-light-primary">{name}</p>
|
|
42
|
+
<p className="truncate text-caption-2 text-display-on-light-tertiary">{role}</p>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
{action === "label" ? (
|
|
46
|
+
<span className="shrink-0 text-caption-2-em text-display-on-light-tertiary">{actionLabel}</span>
|
|
47
|
+
) : (
|
|
48
|
+
<Button hierarchy="tertiary" className="min-h-8 shrink-0 px-3 py-1 text-caption-2">
|
|
49
|
+
Remove
|
|
50
|
+
</Button>
|
|
51
|
+
)}
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { Avatar } from "../../primitives/Avatar";
|
|
3
|
+
import { ShipIcon } from "../../icons/generated";
|
|
4
|
+
|
|
5
|
+
export type SettingRowState = "idle" | "hover" | "selected";
|
|
6
|
+
export type SettingRowVariant = "ship" | "user";
|
|
7
|
+
|
|
8
|
+
export type SettingRowProps = {
|
|
9
|
+
label?: string;
|
|
10
|
+
subtitle?: string;
|
|
11
|
+
state?: SettingRowState;
|
|
12
|
+
variant?: SettingRowVariant;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const stateStyles: Record<SettingRowState, string> = {
|
|
17
|
+
idle: "bg-transparent text-display-on-light-primary",
|
|
18
|
+
hover: "bg-background-secondary text-display-on-light-primary",
|
|
19
|
+
selected: "bg-background-selected text-display-on-dark-primary",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const SettingRow = ({
|
|
23
|
+
label = "MV Atlantic Star",
|
|
24
|
+
subtitle = "Active vessel",
|
|
25
|
+
state = "idle",
|
|
26
|
+
variant = "ship",
|
|
27
|
+
className,
|
|
28
|
+
}: SettingRowProps) => (
|
|
29
|
+
<div
|
|
30
|
+
className={cn(
|
|
31
|
+
"flex w-full items-center gap-3 rounded-control px-3 py-2 transition-colors",
|
|
32
|
+
stateStyles[state],
|
|
33
|
+
state === "idle" && "hover:bg-background-secondary",
|
|
34
|
+
className,
|
|
35
|
+
)}
|
|
36
|
+
>
|
|
37
|
+
{variant === "ship" ? (
|
|
38
|
+
<span
|
|
39
|
+
className={cn(
|
|
40
|
+
"flex size-6 shrink-0 items-center justify-center rounded-full",
|
|
41
|
+
state === "selected" ? "bg-white/20 text-white" : "bg-grey-100 text-display-on-light-secondary",
|
|
42
|
+
)}
|
|
43
|
+
>
|
|
44
|
+
<ShipIcon size="small" />
|
|
45
|
+
</span>
|
|
46
|
+
) : (
|
|
47
|
+
<Avatar
|
|
48
|
+
chief="initials"
|
|
49
|
+
size={24}
|
|
50
|
+
initials="JD"
|
|
51
|
+
className={state === "selected" ? "bg-white/20 text-white" : undefined}
|
|
52
|
+
/>
|
|
53
|
+
)}
|
|
54
|
+
<div className="min-w-0 flex-1">
|
|
55
|
+
<p className="truncate text-caption-1-em">{label}</p>
|
|
56
|
+
<p
|
|
57
|
+
className={cn(
|
|
58
|
+
"truncate text-caption-2",
|
|
59
|
+
state === "selected" ? "text-display-on-dark-secondary" : "text-display-on-light-tertiary",
|
|
60
|
+
)}
|
|
61
|
+
>
|
|
62
|
+
{subtitle}
|
|
63
|
+
</p>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { EquipmentRow, type EquipmentRowEditable, type EquipmentRowProps } from "./EquipmentRow";
|
|
2
|
+
export { SettingRow, type SettingRowProps, type SettingRowState, type SettingRowVariant } from "./SettingRow";
|
|
3
|
+
export { MemberRow, type MemberRowAction, type MemberRowProps, type MemberRowState } from "./MemberRow";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { Count } from "../../primitives/Count";
|
|
3
|
+
|
|
4
|
+
export type ShipRowState = "idle" | "hover";
|
|
5
|
+
|
|
6
|
+
export type ShipRowProps = {
|
|
7
|
+
name?: string;
|
|
8
|
+
chatCount?: number;
|
|
9
|
+
issueCount?: number;
|
|
10
|
+
unreadCount?: number;
|
|
11
|
+
state?: ShipRowState;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const stateStyles: Record<ShipRowState, string> = {
|
|
16
|
+
idle: "bg-transparent",
|
|
17
|
+
hover: "bg-background-secondary",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const ShipRow = ({
|
|
21
|
+
name = "Ship name",
|
|
22
|
+
chatCount = 17,
|
|
23
|
+
issueCount = 12,
|
|
24
|
+
unreadCount = 8,
|
|
25
|
+
state = "idle",
|
|
26
|
+
className,
|
|
27
|
+
}: ShipRowProps) => (
|
|
28
|
+
<div
|
|
29
|
+
className={cn(
|
|
30
|
+
"flex w-full flex-col rounded-control p-2 transition-colors",
|
|
31
|
+
stateStyles[state],
|
|
32
|
+
state === "idle" && "hover:bg-background-secondary",
|
|
33
|
+
className,
|
|
34
|
+
)}
|
|
35
|
+
>
|
|
36
|
+
<div className="flex items-center justify-between gap-2">
|
|
37
|
+
<p className="min-w-0 flex-1 truncate text-body-em text-display-on-light-primary">{name}</p>
|
|
38
|
+
{unreadCount > 0 && <Count value={unreadCount} className="bg-red-600" />}
|
|
39
|
+
</div>
|
|
40
|
+
<div className="mt-1 flex gap-4 text-caption-2 text-display-on-light-secondary">
|
|
41
|
+
<span>
|
|
42
|
+
<span className="text-caption-2-em">{chatCount}</span> Chats
|
|
43
|
+
</span>
|
|
44
|
+
<span>
|
|
45
|
+
<span className="text-caption-2-em">{issueCount}</span> Issues
|
|
46
|
+
</span>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ShipRow, type ShipRowProps, type ShipRowState } from "./ShipRow";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { BulbIcon } from "../../icons/generated";
|
|
3
|
+
import { QualityIcon } from "../../icons/generated";
|
|
4
|
+
import { TickIcon } from "../../icons/generated";
|
|
5
|
+
|
|
6
|
+
export type GroupHeaderGroup = "validation-checks" | "quality-flags" | "ai-insights";
|
|
7
|
+
|
|
8
|
+
export type GroupHeaderProps = {
|
|
9
|
+
group?: GroupHeaderGroup;
|
|
10
|
+
title?: string;
|
|
11
|
+
count?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const groupConfig: Record<
|
|
16
|
+
GroupHeaderGroup,
|
|
17
|
+
{ title: string; icon: typeof TickIcon }
|
|
18
|
+
> = {
|
|
19
|
+
"validation-checks": { title: "Validation Checks", icon: TickIcon },
|
|
20
|
+
"quality-flags": { title: "Quality Flags", icon: QualityIcon },
|
|
21
|
+
"ai-insights": { title: "AI Insights", icon: BulbIcon },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const GroupHeader = ({
|
|
25
|
+
group = "validation-checks",
|
|
26
|
+
title,
|
|
27
|
+
count = 4,
|
|
28
|
+
className,
|
|
29
|
+
}: GroupHeaderProps) => {
|
|
30
|
+
const config = groupConfig[group];
|
|
31
|
+
const Icon = config.icon;
|
|
32
|
+
const displayTitle = title ?? config.title;
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div
|
|
36
|
+
className={cn(
|
|
37
|
+
"flex w-full items-center justify-between gap-4 rounded-control bg-background-secondary px-4 py-3",
|
|
38
|
+
className,
|
|
39
|
+
)}
|
|
40
|
+
>
|
|
41
|
+
<div className="flex items-center gap-2">
|
|
42
|
+
<Icon size="small" className="text-display-on-light-secondary" />
|
|
43
|
+
<span className="text-caption-1-em text-display-on-light-primary">{displayTitle}</span>
|
|
44
|
+
</div>
|
|
45
|
+
<span className="text-caption-2 text-display-on-light-tertiary">{count} items</span>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { CriticalIcon } from "../../icons/generated";
|
|
3
|
+
import { DoneIcon } from "../../icons/generated";
|
|
4
|
+
import { StatusIcon } from "../../icons/generated";
|
|
5
|
+
|
|
6
|
+
export type ImportanceLevel = "critical" | "normal" | "low" | "pending";
|
|
7
|
+
export type ImportanceStatus = "uncompleted" | "approved" | "reviewed";
|
|
8
|
+
|
|
9
|
+
export type ImportanceProps = {
|
|
10
|
+
importance?: ImportanceLevel;
|
|
11
|
+
status?: ImportanceStatus;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const levelStyles: Record<ImportanceLevel, string> = {
|
|
16
|
+
critical: "bg-red-100 text-red-600",
|
|
17
|
+
normal: "bg-blue-100 text-blue-700",
|
|
18
|
+
low: "bg-grey-100 text-display-on-light-secondary",
|
|
19
|
+
pending: "bg-orange-50 text-orange-700",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const Importance = ({
|
|
23
|
+
importance = "critical",
|
|
24
|
+
status = "uncompleted",
|
|
25
|
+
className,
|
|
26
|
+
}: ImportanceProps) => {
|
|
27
|
+
const isApproved = status === "approved";
|
|
28
|
+
const isReviewed = status === "reviewed";
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<span
|
|
32
|
+
className={cn(
|
|
33
|
+
"inline-flex size-6 shrink-0 items-center justify-center rounded-full",
|
|
34
|
+
isApproved || isReviewed ? "bg-meta-green text-meta-on-green" : levelStyles[importance],
|
|
35
|
+
className,
|
|
36
|
+
)}
|
|
37
|
+
aria-label={`${importance} importance, ${status}`}
|
|
38
|
+
>
|
|
39
|
+
{isApproved || isReviewed ? (
|
|
40
|
+
<DoneIcon size="small" />
|
|
41
|
+
) : importance === "critical" ? (
|
|
42
|
+
<CriticalIcon size="small" />
|
|
43
|
+
) : (
|
|
44
|
+
<StatusIcon size="small" />
|
|
45
|
+
)}
|
|
46
|
+
</span>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
|
|
3
|
+
export type ProgressState = "0%" | "40%" | "54%" | "89%" | "all-done";
|
|
4
|
+
|
|
5
|
+
export type ProgressProps = {
|
|
6
|
+
state?: ProgressState;
|
|
7
|
+
label?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const progressValues: Record<ProgressState, number> = {
|
|
12
|
+
"0%": 0,
|
|
13
|
+
"40%": 40,
|
|
14
|
+
"54%": 54,
|
|
15
|
+
"89%": 89,
|
|
16
|
+
"all-done": 100,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const defaultLabels: Record<ProgressState, string> = {
|
|
20
|
+
"0%": "0% complete",
|
|
21
|
+
"40%": "40% complete",
|
|
22
|
+
"54%": "54% complete",
|
|
23
|
+
"89%": "89% complete",
|
|
24
|
+
"all-done": "All done!",
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Progress = ({
|
|
28
|
+
state = "0%",
|
|
29
|
+
label,
|
|
30
|
+
className,
|
|
31
|
+
}: ProgressProps) => {
|
|
32
|
+
const value = progressValues[state];
|
|
33
|
+
const displayLabel = label ?? defaultLabels[state];
|
|
34
|
+
const isComplete = state === "all-done";
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<div className={cn("flex min-w-[212px] flex-col gap-2", className)}>
|
|
38
|
+
<div className="flex items-center justify-between gap-2">
|
|
39
|
+
<span className="text-caption-2-em text-display-on-light-primary">{displayLabel}</span>
|
|
40
|
+
{!isComplete && (
|
|
41
|
+
<span className="text-caption-2 text-display-on-light-tertiary">{value}%</span>
|
|
42
|
+
)}
|
|
43
|
+
</div>
|
|
44
|
+
<div className="h-2 overflow-hidden rounded-full bg-grey-200">
|
|
45
|
+
<div
|
|
46
|
+
className={cn(
|
|
47
|
+
"h-full rounded-full transition-all",
|
|
48
|
+
isComplete ? "bg-meta-green" : "bg-blue-600",
|
|
49
|
+
)}
|
|
50
|
+
style={{ width: `${value}%` }}
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { ChevronIcon } from "../../icons/ChevronIcon";
|
|
3
|
+
import { Importance } from "./Importance";
|
|
4
|
+
|
|
5
|
+
export type QuestionState = "idle" | "hover";
|
|
6
|
+
export type QuestionExpanded = "on" | "off";
|
|
7
|
+
|
|
8
|
+
export type QuestionProps = {
|
|
9
|
+
label?: string;
|
|
10
|
+
state?: QuestionState;
|
|
11
|
+
expanded?: QuestionExpanded;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const stateStyles: Record<QuestionState, string> = {
|
|
16
|
+
idle: "bg-transparent",
|
|
17
|
+
hover: "bg-background-secondary",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const Question = ({
|
|
21
|
+
label = "Are all fire dampers operational and tested within the last 12 months?",
|
|
22
|
+
state = "idle",
|
|
23
|
+
expanded = "on",
|
|
24
|
+
className,
|
|
25
|
+
}: QuestionProps) => (
|
|
26
|
+
<div
|
|
27
|
+
className={cn(
|
|
28
|
+
"flex w-full items-center gap-3 rounded-control px-3 py-2 transition-colors",
|
|
29
|
+
stateStyles[state],
|
|
30
|
+
state === "idle" && "hover:bg-background-secondary",
|
|
31
|
+
className,
|
|
32
|
+
)}
|
|
33
|
+
>
|
|
34
|
+
<Importance importance="normal" status="uncompleted" />
|
|
35
|
+
<p className="min-w-0 flex-1 text-caption-1 text-display-on-light-primary">{label}</p>
|
|
36
|
+
<ChevronIcon
|
|
37
|
+
size="small"
|
|
38
|
+
direction={expanded === "on" ? "down" : "right"}
|
|
39
|
+
className="shrink-0 text-display-on-light-tertiary"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { CriticalIcon } from "../../icons/generated";
|
|
3
|
+
import { DoneIcon } from "../../icons/generated";
|
|
4
|
+
import { MenuItem } from "../../primitives/MenuItem";
|
|
5
|
+
|
|
6
|
+
export type StatusPopoverState = "critical-done" | "critical-pending";
|
|
7
|
+
|
|
8
|
+
export type StatusPopoverProps = {
|
|
9
|
+
state?: StatusPopoverState;
|
|
10
|
+
title?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const StatusPopover = ({
|
|
15
|
+
state = "critical-pending",
|
|
16
|
+
title = "Critical items",
|
|
17
|
+
className,
|
|
18
|
+
}: StatusPopoverProps) => {
|
|
19
|
+
const isDone = state === "critical-done";
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div
|
|
23
|
+
className={cn(
|
|
24
|
+
"w-full max-w-[268px] overflow-hidden rounded-control border border-divider-primary bg-background-primary shadow-raise2",
|
|
25
|
+
className,
|
|
26
|
+
)}
|
|
27
|
+
>
|
|
28
|
+
<div className="flex items-center gap-2 border-b border-divider-primary px-3 py-2">
|
|
29
|
+
<CriticalIcon size="small" className="text-red-500" />
|
|
30
|
+
<span className="text-caption-1-em text-display-on-light-primary">{title}</span>
|
|
31
|
+
</div>
|
|
32
|
+
<div className="p-1">
|
|
33
|
+
<MenuItem>
|
|
34
|
+
<DoneIcon size="small" className={isDone ? "text-meta-green" : "text-display-on-light-quaternary"} />
|
|
35
|
+
Fire pump inspection
|
|
36
|
+
</MenuItem>
|
|
37
|
+
<MenuItem>
|
|
38
|
+
<DoneIcon size="small" className={isDone ? "text-meta-green" : "text-display-on-light-quaternary"} />
|
|
39
|
+
Emergency generator test
|
|
40
|
+
</MenuItem>
|
|
41
|
+
<MenuItem>
|
|
42
|
+
<DoneIcon size="small" className="text-display-on-light-quaternary" />
|
|
43
|
+
Liferaft servicing
|
|
44
|
+
</MenuItem>
|
|
45
|
+
</div>
|
|
46
|
+
{isDone && (
|
|
47
|
+
<p className="border-t border-divider-primary px-3 py-2 text-caption-2 text-meta-green">
|
|
48
|
+
Critical done!
|
|
49
|
+
</p>
|
|
50
|
+
)}
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { Importance } from "./Importance";
|
|
3
|
+
|
|
4
|
+
export type TaskState = "idle" | "hover";
|
|
5
|
+
export type TaskStatus = "uncompleted" | "completed";
|
|
6
|
+
|
|
7
|
+
export type TaskProps = {
|
|
8
|
+
label?: string;
|
|
9
|
+
state?: TaskState;
|
|
10
|
+
status?: TaskStatus;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const stateStyles: Record<TaskState, string> = {
|
|
15
|
+
idle: "bg-transparent",
|
|
16
|
+
hover: "bg-background-secondary",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const Task = ({
|
|
20
|
+
label = "Verify fire pump maintenance records",
|
|
21
|
+
state = "idle",
|
|
22
|
+
status = "uncompleted",
|
|
23
|
+
className,
|
|
24
|
+
}: TaskProps) => (
|
|
25
|
+
<div
|
|
26
|
+
className={cn(
|
|
27
|
+
"flex w-full items-center gap-3 rounded-control px-3 py-2 transition-colors",
|
|
28
|
+
stateStyles[state],
|
|
29
|
+
state === "idle" && "hover:bg-background-secondary",
|
|
30
|
+
className,
|
|
31
|
+
)}
|
|
32
|
+
>
|
|
33
|
+
<Importance
|
|
34
|
+
importance={status === "completed" ? "normal" : "critical"}
|
|
35
|
+
status={status === "completed" ? "approved" : "uncompleted"}
|
|
36
|
+
/>
|
|
37
|
+
<span
|
|
38
|
+
className={cn(
|
|
39
|
+
"text-caption-1 text-display-on-light-primary",
|
|
40
|
+
status === "completed" && "text-display-on-light-quaternary line-through",
|
|
41
|
+
)}
|
|
42
|
+
>
|
|
43
|
+
{label}
|
|
44
|
+
</span>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { Badge } from "../../primitives/Badge";
|
|
3
|
+
import { Button } from "../../primitives/Button";
|
|
4
|
+
import { Progress } from "./Progress";
|
|
5
|
+
|
|
6
|
+
export type TaskHeaderProperty = "pending" | "in-review";
|
|
7
|
+
|
|
8
|
+
export type TaskHeaderProps = {
|
|
9
|
+
property?: TaskHeaderProperty;
|
|
10
|
+
title?: string;
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
progressState?: "40%" | "54%" | "89%";
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const TaskHeader = ({
|
|
17
|
+
property = "pending",
|
|
18
|
+
title = "Fire safety inspection",
|
|
19
|
+
subtitle = "Assigned to Chief Technical · 3 forms remaining",
|
|
20
|
+
progressState = "54%",
|
|
21
|
+
className,
|
|
22
|
+
}: TaskHeaderProps) => {
|
|
23
|
+
const isInReview = property === "in-review";
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div
|
|
27
|
+
className={cn(
|
|
28
|
+
"w-full rounded-2xl border border-divider-primary bg-background-primary p-4",
|
|
29
|
+
className,
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
32
|
+
<div className="flex flex-wrap items-start justify-between gap-4">
|
|
33
|
+
<div className="min-w-0 flex-1">
|
|
34
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
35
|
+
<h3 className="text-subheader-em text-display-on-light-primary">{title}</h3>
|
|
36
|
+
<Badge color={isInReview ? "blue" : "orange"}>
|
|
37
|
+
{isInReview ? "In review" : "Pending"}
|
|
38
|
+
</Badge>
|
|
39
|
+
</div>
|
|
40
|
+
<p className="mt-1 text-caption-2 text-display-on-light-tertiary">{subtitle}</p>
|
|
41
|
+
</div>
|
|
42
|
+
<Button hierarchy="secondary" className="shrink-0">
|
|
43
|
+
View details
|
|
44
|
+
</Button>
|
|
45
|
+
</div>
|
|
46
|
+
<div className="mt-4">
|
|
47
|
+
<Progress state={progressState} />
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { FiltersIcon } from "../../icons/generated";
|
|
3
|
+
|
|
4
|
+
export type WorkflowFiltersProps = {
|
|
5
|
+
filters?: string[];
|
|
6
|
+
activeFilter?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const defaultFilters = ["All", "Pending", "In review", "Completed"];
|
|
11
|
+
|
|
12
|
+
export const WorkflowFilters = ({
|
|
13
|
+
filters = defaultFilters,
|
|
14
|
+
activeFilter = "All",
|
|
15
|
+
className,
|
|
16
|
+
}: WorkflowFiltersProps) => (
|
|
17
|
+
<div className={cn("flex flex-wrap items-center gap-2", className)}>
|
|
18
|
+
<span className="mr-1 flex size-9 items-center justify-center rounded-full bg-background-secondary text-display-on-light-secondary">
|
|
19
|
+
<FiltersIcon size="small" />
|
|
20
|
+
</span>
|
|
21
|
+
{filters.map((filter) => {
|
|
22
|
+
const isActive = filter === activeFilter;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<button
|
|
26
|
+
key={filter}
|
|
27
|
+
type="button"
|
|
28
|
+
className={cn(
|
|
29
|
+
"rounded-full px-3 py-1.5 text-caption-2-em transition-colors",
|
|
30
|
+
isActive
|
|
31
|
+
? "bg-background-selected text-display-on-dark-primary"
|
|
32
|
+
: "bg-background-secondary text-display-on-light-tertiary hover:text-display-on-light-primary",
|
|
33
|
+
)}
|
|
34
|
+
>
|
|
35
|
+
{filter}
|
|
36
|
+
</button>
|
|
37
|
+
);
|
|
38
|
+
})}
|
|
39
|
+
</div>
|
|
40
|
+
);
|