@lateralus-ai/shipping-ui 1.4.16 → 2.0.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +33 -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/Modal.d.ts +36 -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 +26 -12
- package/dist/components/index.d.ts +12 -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 +11535 -36619
- 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 +19 -0
- package/dist/patterns/Search/SearchModal.d.ts +88 -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 +14 -0
- package/dist/primitives/Button.d.ts +22 -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/button-styles.d.ts +4 -0
- package/dist/primitives/index.d.ts +15 -0
- package/dist/style.css +1 -1
- package/dist/tailwind-theme.d.ts +234 -198
- package/dist/theme-entry-BUK3MJUJ.mjs +261 -0
- package/dist/theme-entry-ygTpGaNC.js +1 -0
- package/dist/theme-entry.d.ts +2 -0
- package/dist/theme.cjs +1 -0
- package/dist/theme.d.ts +2 -0
- package/dist/theme.esm.js +5 -0
- 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 +36 -7
- 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 +138 -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/Modal.tsx +141 -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 +146 -43
- package/src/components/index.ts +43 -6
- 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 +76 -4
- 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 +44 -0
- package/src/patterns/Search/SearchModal.tsx +310 -0
- package/src/patterns/Search/SectionHeader.tsx +20 -0
- package/src/patterns/Search/index.ts +31 -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 +56 -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 +44 -0
- package/src/primitives/Button.tsx +231 -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/button-styles.ts +92 -0
- package/src/primitives/index.ts +18 -0
- package/src/stories/_layout/FigmaPage.tsx +94 -0
- package/src/stories/_layout/index.ts +8 -0
- package/src/stories/canvases/ButtonsCanvas.tsx +107 -0
- package/src/stories/canvases/ButtonsMatrixCanvas.tsx +65 -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 +157 -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 +150 -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-buttons-layout.ts +83 -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 +146 -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/theme-entry.ts +2 -0
- 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/tailwind.config.ts +12 -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,32 @@
|
|
|
1
|
+
import { Avatar } from "../../primitives";
|
|
2
|
+
import { cn } from "../../utils/cn";
|
|
3
|
+
import type { Chief } from "../Sidebar/Switcher";
|
|
4
|
+
|
|
5
|
+
export type GreetingProps = {
|
|
6
|
+
chief?: Chief;
|
|
7
|
+
name?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const chiefGreetings: Record<Chief, string> = {
|
|
12
|
+
technical: "How can I help with technical matters?",
|
|
13
|
+
compliance: "How can I help with compliance today?",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Greeting = ({
|
|
17
|
+
chief = "technical",
|
|
18
|
+
name = "there",
|
|
19
|
+
className,
|
|
20
|
+
}: GreetingProps) => (
|
|
21
|
+
<div className={cn("flex flex-col items-center gap-4 text-center", className)}>
|
|
22
|
+
<Avatar chief={chief} size={32} />
|
|
23
|
+
<div>
|
|
24
|
+
<h1 className="font-heading text-heading text-display-on-light-primary">
|
|
25
|
+
Hello, {name}
|
|
26
|
+
</h1>
|
|
27
|
+
<p className="mt-2 text-body text-display-on-light-secondary">
|
|
28
|
+
{chiefGreetings[chief]}
|
|
29
|
+
</p>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BookIcon } from "../../icons";
|
|
2
|
+
import { cn } from "../../utils/cn";
|
|
3
|
+
|
|
4
|
+
export type ReferenceProps = {
|
|
5
|
+
title?: string;
|
|
6
|
+
page?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Reference = ({
|
|
11
|
+
title = "SOLAS Chapter II-1",
|
|
12
|
+
page = "p. 42",
|
|
13
|
+
className,
|
|
14
|
+
}: ReferenceProps) => (
|
|
15
|
+
<button
|
|
16
|
+
type="button"
|
|
17
|
+
className={cn(
|
|
18
|
+
"inline-flex items-center gap-1.5 rounded-control bg-accent-bg-lighter px-2 py-1 text-footnote text-accent-on-light transition-colors hover:bg-accent-bg-light",
|
|
19
|
+
className,
|
|
20
|
+
)}
|
|
21
|
+
>
|
|
22
|
+
<BookIcon className="size-3.5 shrink-0" />
|
|
23
|
+
<span className="truncate">{title}</span>
|
|
24
|
+
{page && <span className="text-display-on-light-quaternary">{page}</span>}
|
|
25
|
+
</button>
|
|
26
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DocumentIcon } from "../../icons";
|
|
2
|
+
import { cn } from "../../utils/cn";
|
|
3
|
+
|
|
4
|
+
export type SourceProps = {
|
|
5
|
+
title?: string;
|
|
6
|
+
excerpt?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Source = ({
|
|
11
|
+
title = "ISM Code Section 10",
|
|
12
|
+
excerpt = "The company should establish procedures to ensure that the ship is maintained in conformity with the provisions of the relevant rules and regulations...",
|
|
13
|
+
className,
|
|
14
|
+
}: SourceProps) => (
|
|
15
|
+
<div
|
|
16
|
+
className={cn(
|
|
17
|
+
"rounded-control border border-divider-primary bg-background-primary p-3",
|
|
18
|
+
className,
|
|
19
|
+
)}
|
|
20
|
+
>
|
|
21
|
+
<div className="mb-1 flex items-center gap-2">
|
|
22
|
+
<DocumentIcon className="size-4 shrink-0 text-display-on-light-tertiary" />
|
|
23
|
+
<span className="text-caption-2-em text-display-on-light-primary">{title}</span>
|
|
24
|
+
</div>
|
|
25
|
+
<p className="line-clamp-2 text-caption-2 text-display-on-light-secondary">{excerpt}</p>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { Source } from "./Source";
|
|
3
|
+
|
|
4
|
+
export type SourcesProps = {
|
|
5
|
+
count?: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const placeholderSources = [
|
|
10
|
+
{ title: "ISM Code Section 10", excerpt: "The company should establish procedures to ensure that the ship is maintained..." },
|
|
11
|
+
{ title: "Port State Control MOU", excerpt: "Inspections are carried out to verify compliance with international conventions..." },
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
export const Sources = ({ count = 2, className }: SourcesProps) => (
|
|
15
|
+
<div className={cn("flex flex-col gap-2", className)} role="region" aria-label="Sources">
|
|
16
|
+
<p className="text-footnote-em text-display-on-light-tertiary">
|
|
17
|
+
{count} source{count !== 1 ? "s" : ""}
|
|
18
|
+
</p>
|
|
19
|
+
{placeholderSources.slice(0, count).map((source) => (
|
|
20
|
+
<Source key={source.title} title={source.title} excerpt={source.excerpt} />
|
|
21
|
+
))}
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BulbIcon } from "../../icons";
|
|
2
|
+
import { cn } from "../../utils/cn";
|
|
3
|
+
|
|
4
|
+
export type SuggestionProps = {
|
|
5
|
+
label?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const Suggestion = ({
|
|
10
|
+
label = "Summarize the latest inspection findings",
|
|
11
|
+
className,
|
|
12
|
+
}: SuggestionProps) => (
|
|
13
|
+
<button
|
|
14
|
+
type="button"
|
|
15
|
+
className={cn(
|
|
16
|
+
"flex items-center gap-2 rounded-control border border-divider-primary bg-background-primary px-3 py-2 text-left text-caption-2 text-display-on-light-secondary transition-colors hover:border-divider-secondary hover:bg-background-hover hover:text-display-on-light-primary",
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
>
|
|
20
|
+
<BulbIcon className="size-4 shrink-0 text-display-on-light-tertiary" />
|
|
21
|
+
<span>{label}</span>
|
|
22
|
+
</button>
|
|
23
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
import { Suggestion } from "./Suggestion";
|
|
3
|
+
|
|
4
|
+
export type SuggestionsProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const placeholderSuggestions = [
|
|
9
|
+
"Summarize the latest inspection findings",
|
|
10
|
+
"What actions are required before next port call?",
|
|
11
|
+
"Compare with previous survey results",
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
export const Suggestions = ({ className }: SuggestionsProps) => (
|
|
15
|
+
<div className={cn("flex flex-col gap-2", className)} role="group" aria-label="Suggestions">
|
|
16
|
+
<p className="text-footnote-em text-display-on-light-tertiary">Suggested prompts</p>
|
|
17
|
+
{placeholderSuggestions.map((label) => (
|
|
18
|
+
<Suggestion key={label} label={label} />
|
|
19
|
+
))}
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { Attachment, type AttachmentProps } from "./Attachment";
|
|
2
|
+
export { ChatEntry, type ChatEntryProps, type ChatEntryRole } from "./ChatEntry";
|
|
3
|
+
export { ChatHeader, type ChatHeaderProps } from "./ChatHeader";
|
|
4
|
+
export { ChatInput, type ChatInputProps } from "./ChatInput";
|
|
5
|
+
export { ChatStatus, type ChatStatusProps } from "./ChatStatus";
|
|
6
|
+
export { ChatTile, type ChatTileProps } from "./ChatTile";
|
|
7
|
+
export { Copilot, type CopilotProps } from "./Copilot";
|
|
8
|
+
export { Draft, type DraftProps } from "./Draft";
|
|
9
|
+
export { Greeting, type GreetingProps } from "./Greeting";
|
|
10
|
+
export { Reference, type ReferenceProps } from "./Reference";
|
|
11
|
+
export { Source, type SourceProps } from "./Source";
|
|
12
|
+
export { Sources, type SourcesProps } from "./Sources";
|
|
13
|
+
export { Suggestion, type SuggestionProps } from "./Suggestion";
|
|
14
|
+
export { Suggestions, type SuggestionsProps } from "./Suggestions";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Avatar, GroupedAvatars } from "../../primitives";
|
|
2
|
+
import { InviteIcon } from "../../icons";
|
|
3
|
+
import { cn } from "../../utils/cn";
|
|
4
|
+
|
|
5
|
+
export type InviteeVariant = "single" | "multiple";
|
|
6
|
+
|
|
7
|
+
export type InviteeProps = {
|
|
8
|
+
variant?: InviteeVariant;
|
|
9
|
+
name?: string;
|
|
10
|
+
names?: string[];
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const Invitee = ({
|
|
15
|
+
variant = "single",
|
|
16
|
+
name = "Jordan Lee",
|
|
17
|
+
names = ["Jordan Lee", "Sam Patel", "Riley Chen"],
|
|
18
|
+
className,
|
|
19
|
+
}: InviteeProps) => (
|
|
20
|
+
<div
|
|
21
|
+
className={cn(
|
|
22
|
+
"flex items-center gap-3 rounded-control border border-divider-primary bg-background-primary px-3 py-2",
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
data-variant={variant}
|
|
26
|
+
>
|
|
27
|
+
{variant === "single" ? (
|
|
28
|
+
<Avatar chief="initials" size={32} initials={name} />
|
|
29
|
+
) : (
|
|
30
|
+
<GroupedAvatars count={3} />
|
|
31
|
+
)}
|
|
32
|
+
|
|
33
|
+
<div className="min-w-0 flex-1">
|
|
34
|
+
<p className="truncate text-caption-1-em text-display-on-light-primary">
|
|
35
|
+
{variant === "single" ? name : `${names.length} invitees`}
|
|
36
|
+
</p>
|
|
37
|
+
<p className="text-footnote text-display-on-light-tertiary">
|
|
38
|
+
{variant === "single" ? "Pending invitation" : names.join(", ")}
|
|
39
|
+
</p>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<InviteIcon className="size-4 shrink-0 text-display-on-light-quaternary" />
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Button } from "../../primitives";
|
|
2
|
+
import { Avatar } from "../../primitives";
|
|
3
|
+
import { cn } from "../../utils/cn";
|
|
4
|
+
import type { Chief } from "../Sidebar/Switcher";
|
|
5
|
+
|
|
6
|
+
export type ModalFooterProps = {
|
|
7
|
+
chief?: Chief;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const chiefLabels: Record<Chief, string> = {
|
|
12
|
+
technical: "Technical Chief",
|
|
13
|
+
compliance: "Compliance Chief",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const ModalFooter = ({
|
|
17
|
+
chief = "technical",
|
|
18
|
+
className,
|
|
19
|
+
}: ModalFooterProps) => (
|
|
20
|
+
<footer
|
|
21
|
+
className={cn(
|
|
22
|
+
"flex items-center justify-between gap-3 border-t border-divider-primary bg-background-secondary px-4 py-3",
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
data-chief={chief}
|
|
26
|
+
>
|
|
27
|
+
<div className="flex items-center gap-2">
|
|
28
|
+
<Avatar chief={chief} size={24} />
|
|
29
|
+
<span className="text-caption-2 text-display-on-light-secondary">
|
|
30
|
+
{chiefLabels[chief]}
|
|
31
|
+
</span>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div className="flex items-center gap-2">
|
|
35
|
+
<Button hierarchy="secondary">Cancel</Button>
|
|
36
|
+
<Button hierarchy="primary">Confirm</Button>
|
|
37
|
+
</div>
|
|
38
|
+
</footer>
|
|
39
|
+
);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { Avatar, IconButton, ThinkingDot } from "../../primitives";
|
|
3
|
+
import {
|
|
4
|
+
CriticalIcon,
|
|
5
|
+
FormsIcon,
|
|
6
|
+
InformationIcon,
|
|
7
|
+
IssuesIcon,
|
|
8
|
+
ReportIcon,
|
|
9
|
+
SettingsIcon,
|
|
10
|
+
} from "../../icons";
|
|
11
|
+
import { cn } from "../../utils/cn";
|
|
12
|
+
import type { Chief } from "../Sidebar/Switcher";
|
|
13
|
+
|
|
14
|
+
export type ModalHeaderVariant =
|
|
15
|
+
| "issue"
|
|
16
|
+
| "thinking"
|
|
17
|
+
| "generic"
|
|
18
|
+
| "settings"
|
|
19
|
+
| "audit"
|
|
20
|
+
| "forms";
|
|
21
|
+
|
|
22
|
+
export type ModalHeaderProps = {
|
|
23
|
+
variant?: ModalHeaderVariant;
|
|
24
|
+
title?: string;
|
|
25
|
+
chief?: Chief;
|
|
26
|
+
onClose?: () => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const variantConfig: Record<
|
|
31
|
+
ModalHeaderVariant,
|
|
32
|
+
{ icon: ReactNode; defaultTitle: string }
|
|
33
|
+
> = {
|
|
34
|
+
issue: { icon: <IssuesIcon className="size-5" />, defaultTitle: "Issue details" },
|
|
35
|
+
thinking: { icon: <ThinkingDot />, defaultTitle: "Chief is thinking" },
|
|
36
|
+
generic: { icon: <InformationIcon className="size-5" />, defaultTitle: "Information" },
|
|
37
|
+
settings: { icon: <SettingsIcon className="size-5" />, defaultTitle: "Settings" },
|
|
38
|
+
audit: { icon: <ReportIcon className="size-5" />, defaultTitle: "Audit trail" },
|
|
39
|
+
forms: { icon: <FormsIcon className="size-5" />, defaultTitle: "Forms" },
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const ModalHeader = ({
|
|
43
|
+
variant = "generic",
|
|
44
|
+
title,
|
|
45
|
+
chief,
|
|
46
|
+
onClose,
|
|
47
|
+
className,
|
|
48
|
+
}: ModalHeaderProps) => {
|
|
49
|
+
const config = variantConfig[variant];
|
|
50
|
+
const displayTitle = title ?? config.defaultTitle;
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<header
|
|
54
|
+
className={cn(
|
|
55
|
+
"flex items-center gap-3 border-b border-divider-primary bg-background-secondary px-4 py-3",
|
|
56
|
+
className,
|
|
57
|
+
)}
|
|
58
|
+
data-variant={variant}
|
|
59
|
+
>
|
|
60
|
+
<span className="shrink-0 text-display-on-light-tertiary">
|
|
61
|
+
{variant === "issue" ? <CriticalIcon className="size-5 text-meta-red" /> : config.icon}
|
|
62
|
+
</span>
|
|
63
|
+
|
|
64
|
+
{chief && <Avatar chief={chief} size={24} />}
|
|
65
|
+
|
|
66
|
+
<h2 className="min-w-0 flex-1 truncate text-subheader-em text-display-on-light-primary">
|
|
67
|
+
{displayTitle}
|
|
68
|
+
</h2>
|
|
69
|
+
|
|
70
|
+
{onClose && (
|
|
71
|
+
<IconButton hierarchy="quaternary" size="small" aria-label="Close" onClick={onClose}>
|
|
72
|
+
<span className="text-caption-1">✕</span>
|
|
73
|
+
</IconButton>
|
|
74
|
+
)}
|
|
75
|
+
</header>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { cn } from "../../utils/cn";
|
|
3
|
+
|
|
4
|
+
export type PillState = "idle" | "active";
|
|
5
|
+
export type PillSize = "large" | "small";
|
|
6
|
+
|
|
7
|
+
export type PillProps = {
|
|
8
|
+
state?: PillState;
|
|
9
|
+
size?: PillSize;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const stateStyles: Record<PillState, string> = {
|
|
15
|
+
idle: "border-divider-primary bg-background-primary text-display-on-light-secondary hover:bg-background-hover",
|
|
16
|
+
active: "border-blue-300 bg-blue-50 text-blue-700",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const sizeStyles: Record<PillSize, string> = {
|
|
20
|
+
large: "px-4 py-2 text-caption-1",
|
|
21
|
+
small: "px-3 py-1 text-caption-2",
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const Pill = ({
|
|
25
|
+
state = "idle",
|
|
26
|
+
size = "large",
|
|
27
|
+
children,
|
|
28
|
+
className,
|
|
29
|
+
}: PillProps) => (
|
|
30
|
+
<button
|
|
31
|
+
type="button"
|
|
32
|
+
className={cn(
|
|
33
|
+
"inline-flex items-center rounded-full border transition-colors",
|
|
34
|
+
stateStyles[state],
|
|
35
|
+
sizeStyles[size],
|
|
36
|
+
className,
|
|
37
|
+
)}
|
|
38
|
+
data-state={state}
|
|
39
|
+
data-size={size}
|
|
40
|
+
aria-pressed={state === "active"}
|
|
41
|
+
>
|
|
42
|
+
{children}
|
|
43
|
+
</button>
|
|
44
|
+
);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Count } from "../../primitives";
|
|
2
|
+
import { ChevronIcon, TickIcon } from "../../icons";
|
|
3
|
+
import { cn } from "../../utils/cn";
|
|
4
|
+
|
|
5
|
+
export type PillInfoType = "count" | "completed" | "dropdown";
|
|
6
|
+
|
|
7
|
+
export type PillInfoProps = {
|
|
8
|
+
type?: PillInfoType;
|
|
9
|
+
value?: number;
|
|
10
|
+
label?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const PillInfo = ({
|
|
15
|
+
type = "count",
|
|
16
|
+
value = 5,
|
|
17
|
+
label = "Filters",
|
|
18
|
+
className,
|
|
19
|
+
}: PillInfoProps) => (
|
|
20
|
+
<span
|
|
21
|
+
className={cn(
|
|
22
|
+
"inline-flex items-center gap-1.5 text-footnote text-display-on-light-tertiary",
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
data-type={type}
|
|
26
|
+
>
|
|
27
|
+
{type === "count" && <Count value={value} />}
|
|
28
|
+
{type === "completed" && (
|
|
29
|
+
<>
|
|
30
|
+
<TickIcon className="size-3.5 text-meta-green" />
|
|
31
|
+
<span>Completed</span>
|
|
32
|
+
</>
|
|
33
|
+
)}
|
|
34
|
+
{type === "dropdown" && (
|
|
35
|
+
<>
|
|
36
|
+
<span>{label}</span>
|
|
37
|
+
<ChevronIcon direction="down" className="size-3.5" />
|
|
38
|
+
</>
|
|
39
|
+
)}
|
|
40
|
+
</span>
|
|
41
|
+
);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Entry,
|
|
4
|
+
type EntryProps,
|
|
5
|
+
type EntryState,
|
|
6
|
+
type EntryVariant,
|
|
7
|
+
} from "../../components/Entry";
|
|
8
|
+
|
|
9
|
+
/** @deprecated Prefer `EntryVariant`. */
|
|
10
|
+
export type ResultRowVariant = EntryVariant;
|
|
11
|
+
/** @deprecated Prefer `EntryState`. */
|
|
12
|
+
export type ResultRowState = EntryState;
|
|
13
|
+
|
|
14
|
+
export type ResultRowProps = {
|
|
15
|
+
variant?: EntryVariant;
|
|
16
|
+
state?: EntryState;
|
|
17
|
+
title?: ReactNode;
|
|
18
|
+
subtitle?: ReactNode;
|
|
19
|
+
onClick?: () => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Prefer `Entry` — ResultRow is a thin alias for search lists.
|
|
25
|
+
*/
|
|
26
|
+
export const ResultRow = ({
|
|
27
|
+
variant = "report",
|
|
28
|
+
state = "idle",
|
|
29
|
+
title = "Search result",
|
|
30
|
+
subtitle,
|
|
31
|
+
onClick,
|
|
32
|
+
className,
|
|
33
|
+
}: ResultRowProps) => (
|
|
34
|
+
<Entry
|
|
35
|
+
variant={variant}
|
|
36
|
+
state={state}
|
|
37
|
+
title={title}
|
|
38
|
+
subtitle={subtitle}
|
|
39
|
+
onClick={onClick}
|
|
40
|
+
className={className}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
export type { EntryProps };
|