@crewlethq/ui 0.81.2 → 0.83.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 +89 -4
- package/dist/Accordion/index.js +3 -3
- package/dist/ActionCard/ActionCard.d.ts +49 -0
- package/dist/ActionCard/index.d.ts +4 -0
- package/dist/ActionCard/index.js +2 -0
- package/dist/ActionCard-47WSZ2O5.css +110 -0
- package/dist/ActivityLine/ActivityLine.d.ts +27 -0
- package/dist/ActivityLine/index.d.ts +4 -0
- package/dist/ActivityLine/index.js +4 -0
- package/dist/ActivityLine-AMSERTOB.css +74 -0
- package/dist/AgentHandoffPanel/index.js +15 -15
- package/dist/AppShell/AccountRow.d.ts +19 -1
- package/dist/AppShell/AppShell.d.ts +62 -4
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +12 -6
- package/dist/AppShell/railMotion.d.ts +60 -0
- package/dist/AppShell/railShape.d.ts +22 -0
- package/dist/{AppShell-2IBUS4TH.css → AppShell-U7D2MUUF.css} +291 -20
- package/dist/ArrangeFrame/index.js +2 -2
- package/dist/ArrangeGroup/index.js +2 -2
- package/dist/ArrangeList/index.js +8 -7
- package/dist/ArtifactBar/index.js +13 -11
- package/dist/ArtifactCard/index.js +13 -13
- package/dist/ArtifactCover/index.js +3 -3
- package/dist/ArtifactKindIllustration/index.js +1 -1
- package/dist/ArtifactKinds-3EH4KR3F.css +18 -0
- package/dist/ArtifactMakeRow/index.js +1 -1
- package/dist/ArtifactNameCell/index.js +1 -1
- package/dist/ArtifactPanel/index.js +5 -5
- package/dist/AttachmentChip/index.js +2 -2
- package/dist/AuthLayout/index.js +5 -4
- package/dist/Avatar/Avatar.d.ts +30 -28
- package/dist/Avatar/AvatarStack.d.ts +2 -2
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +2 -2
- package/dist/{Avatar-VJSJGFRG.css → Avatar-MNE3WBZO.css} +56 -54
- package/dist/AvatarPicker/index.js +13 -12
- package/dist/{AvatarStack-7I3P7LCK.css → AvatarStack-KEHD3GWY.css} +16 -4
- package/dist/BrandLockup/BrandLockup.d.ts +6 -0
- package/dist/BrandLockup/index.js +2 -1
- package/dist/BriefCard/BriefCard.d.ts +23 -1
- package/dist/BriefCard/index.d.ts +2 -2
- package/dist/BriefCard/index.js +7 -7
- package/dist/{BriefCard-VKTH3BSW.css → BriefCard-QCL7MVUV.css} +26 -0
- package/dist/Canvas/index.js +8 -6
- package/dist/CanvasBoard/index.js +11 -9
- package/dist/CanvasToolbar/index.js +10 -8
- package/dist/Card/index.js +2 -2
- package/dist/ChangeList/index.js +5 -5
- package/dist/ChangeMark/index.js +6 -4
- package/dist/CharacterPicker/index.js +2 -2
- package/dist/ChatDay/ChatDay.d.ts +53 -0
- package/dist/ChatDay/index.d.ts +5 -0
- package/dist/ChatDay/index.js +3 -0
- package/dist/ChatDay-E3FF5HWF.css +116 -0
- package/dist/ChatDivider/ChatDivider.d.ts +31 -0
- package/dist/ChatDivider/index.d.ts +4 -0
- package/dist/ChatDivider/index.js +2 -0
- package/dist/ChatDivider-7ZNDL2PZ.css +76 -0
- package/dist/ChatMessage/ChatMessage.d.ts +111 -0
- package/dist/ChatMessage/index.d.ts +4 -0
- package/dist/ChatMessage/index.js +5 -0
- package/dist/ChatMessage-FH7VRVCH.css +304 -0
- package/dist/ChatScale-L4SIHSKL.css +42 -0
- package/dist/ChatThread/ChatThread.d.ts +33 -4
- package/dist/ChatThread/index.d.ts +1 -1
- package/dist/ChatThread/index.js +2 -2
- package/dist/{ChatThread-2KO3FZKQ.css → ChatThread-HAECJMP6.css} +17 -0
- package/dist/CheckGrid/index.js +6 -6
- package/dist/Checkbox/index.js +5 -5
- package/dist/ChipField/ChipField.d.ts +82 -0
- package/dist/ChipField/index.d.ts +4 -0
- package/dist/ChipField/index.js +9 -0
- package/dist/ChipField-D4CW6XFA.css +108 -0
- package/dist/ColorField/index.js +5 -5
- package/dist/Combobox/index.js +7 -7
- package/dist/CommandPalette/index.js +12 -11
- package/dist/CommentThread/index.js +14 -14
- package/dist/CompactNav/CompactNav.d.ts +175 -0
- package/dist/CompactNav/index.d.ts +4 -0
- package/dist/CompactNav/index.js +9 -0
- package/dist/CompactNav-CU2AQXBC.css +322 -0
- package/dist/Composer/Composer.d.ts +26 -2
- package/dist/Composer/index.d.ts +2 -1
- package/dist/Composer/index.js +7 -7
- package/dist/{Composer-HQIMTMRC.css → Composer-ZEGHEAFE.css} +71 -0
- package/dist/ConfirmField/index.js +5 -5
- package/dist/ContrastBadge/index.js +2 -2
- package/dist/ContrastHelp/index.js +7 -6
- package/dist/Count/Count.d.ts +24 -6
- package/dist/Count/index.d.ts +1 -1
- package/dist/Count/index.js +1 -1
- package/dist/{Count-ZJ6ID4ZU.css → Count-2HXBBYPO.css} +19 -0
- package/dist/DataGrid/index.js +8 -8
- package/dist/DataTable/index.js +11 -10
- package/dist/DataView/index.js +18 -17
- package/dist/DatasetSource/index.js +3 -3
- package/dist/DateTimePicker/index.js +6 -5
- package/dist/DeepWorkCard/index.js +9 -9
- package/dist/Disclosure/index.js +3 -3
- package/dist/DocTabsEditor/index.js +11 -9
- package/dist/DockColumn/DockColumn.d.ts +68 -0
- package/dist/DockColumn/index.d.ts +3 -0
- package/dist/DockColumn/index.js +6 -0
- package/dist/DockColumn-SMJCXHS4.css +61 -0
- package/dist/Document/index.js +2 -2
- package/dist/EditingStatus/index.js +2 -2
- package/dist/{Editor-IMYESOW7.js → Editor-5D5Z3LBQ.js} +9 -8
- package/dist/EmojiPicker/EmojiPicker.d.ts +51 -0
- package/dist/EmojiPicker/emoji.d.ts +24 -0
- package/dist/EmojiPicker/index.d.ts +5 -0
- package/dist/EmojiPicker/index.js +15 -0
- package/dist/EmojiPicker-FMWYN2WX.css +63 -0
- package/dist/EntityChip/index.js +3 -3
- package/dist/EntityList/index.js +6 -6
- package/dist/FactList/index.js +6 -4
- package/dist/FolderTile/index.js +3 -3
- package/dist/FollowBanner/index.js +4 -4
- package/dist/HuePicker/index.js +9 -8
- package/dist/ImageUpload/ImageUpload.d.ts +6 -7
- package/dist/ImageUpload/index.js +3 -3
- package/dist/{ImageUpload-OWI7CCG7.css → ImageUpload-IFXZROFZ.css} +6 -37
- package/dist/InlineEditor/index.js +7 -7
- package/dist/Input/index.js +4 -4
- package/dist/Kbd/Kbd.d.ts +9 -0
- package/dist/Kbd/index.d.ts +1 -1
- package/dist/Kbd/index.js +1 -1
- package/dist/Layer/index.js +2 -2
- package/dist/LinkCard/LinkCard.d.ts +64 -0
- package/dist/LinkCard/index.d.ts +5 -0
- package/dist/LinkCard/index.js +5 -0
- package/dist/LinkCard-5I4MYU6I.css +155 -0
- package/dist/LinkInterstitial/index.js +7 -6
- package/dist/ListInput/index.js +10 -9
- package/dist/Listbox/index.js +3 -3
- package/dist/LogoSlot/index.js +3 -3
- package/dist/MarkdownEditor/format.d.ts +9 -1
- package/dist/MarkdownEditor/index.d.ts +2 -2
- package/dist/MarkdownEditor/index.js +10 -9
- package/dist/MediaMatch/index.d.ts +1 -1
- package/dist/MediaMatch/index.js +1 -1
- package/dist/MediaMatch/useMediaMatch.d.ts +14 -0
- package/dist/MentionChip/MentionChip.d.ts +25 -0
- package/dist/MentionChip/index.d.ts +3 -0
- package/dist/MentionChip/index.js +2 -0
- package/dist/MentionChip-W7MZZVRZ.css +42 -0
- package/dist/MentionMenu/MentionMenu.d.ts +82 -0
- package/dist/MentionMenu/index.d.ts +4 -0
- package/dist/MentionMenu/index.js +3 -0
- package/dist/MentionMenu-4NAQ45S4.css +65 -0
- package/dist/Menu/index.js +5 -4
- package/dist/MergeConflicts/index.js +9 -8
- package/dist/MessageActions/MessageActions.d.ts +58 -0
- package/dist/MessageActions/index.d.ts +4 -0
- package/dist/MessageActions/index.js +18 -0
- package/dist/MessageActions-Q4F5UH3S.css +73 -0
- package/dist/Modal/Modal.d.ts +12 -0
- package/dist/Modal/index.js +6 -5
- package/dist/{Modal-FYQYEI3N.css → Modal-GKUOO7PZ.css} +26 -1
- package/dist/OpenInAppCard/index.js +8 -8
- package/dist/OrgLabel/index.js +3 -3
- package/dist/OrgNode/index.js +4 -4
- package/dist/OrgTable/index.js +7 -7
- package/dist/Outline/index.js +2 -1
- package/dist/PeekRail/index.js +1 -1
- package/dist/PeopleRail/index.js +4 -4
- package/dist/PersonRow/PersonRow.d.ts +70 -0
- package/dist/PersonRow/index.d.ts +3 -0
- package/dist/PersonRow/index.js +2 -0
- package/dist/PersonRow-V5GTPNVP.css +161 -0
- package/dist/Popover/index.js +4 -3
- package/dist/Presence/index.d.ts +2 -0
- package/dist/Presence/index.js +4 -0
- package/dist/Presence/usePresence.d.ts +109 -0
- package/dist/PresenceStack/index.js +3 -3
- package/dist/{PresenceStack-ZV67BH4V.css → PresenceStack-2DTYRADY.css} +4 -6
- package/dist/PresenterView/index.js +5 -5
- package/dist/PricingCard/index.js +2 -2
- package/dist/Principal/index.js +3 -3
- package/dist/PrincipalPicker/index.js +11 -11
- package/dist/ProposalCard/index.js +15 -15
- package/dist/ReactionBar/ReactionBar.d.ts +84 -0
- package/dist/ReactionBar/index.d.ts +4 -0
- package/dist/ReactionBar/index.js +17 -0
- package/dist/ReactionBar-XXI4V7XG.css +93 -0
- package/dist/RecordChip/index.js +5 -4
- package/dist/RefusalCard/index.js +6 -6
- package/dist/RelatedRow/index.js +3 -3
- package/dist/Reorder/index.js +2 -1
- package/dist/ResultTableCard/index.js +7 -7
- package/dist/ReviewList/index.js +2 -2
- package/dist/RichEditor/index.js +2 -2
- package/dist/RunChip/index.js +5 -5
- package/dist/SandboxedFrame/index.js +2 -2
- package/dist/SectionFrame/index.js +2 -2
- package/dist/SegmentedControl/index.js +8 -7
- package/dist/Select/index.js +4 -4
- package/dist/SelectionBar/index.js +6 -6
- package/dist/SetupWizard/index.js +6 -6
- package/dist/ShareDialog/index.js +13 -12
- package/dist/SheetColumnEditor/index.js +17 -16
- package/dist/SheetGrid/index.js +14 -12
- package/dist/Shortcut/index.js +3 -3
- package/dist/SidePanel/SidePanel.d.ts +8 -1
- package/dist/SidePanel/SidePanelBase.d.ts +3 -1
- package/dist/SidePanel/index.js +5 -5
- package/dist/{SidePanel-VXKUKLOJ.css → SidePanel-BKWT6Q6Z.css} +36 -0
- package/dist/SidebarNav/SidebarNav.d.ts +52 -3
- package/dist/SidebarNav/index.js +1 -1
- package/dist/{SidebarNav-VTQ3G4AE.css → SidebarNav-E7PZGGA6.css} +132 -7
- package/dist/Skeleton/index.js +1 -1
- package/dist/{Skeleton-7ZA5ETJM.css → Skeleton-GIXV3KK5.css} +3 -1
- package/dist/SlideCompare/index.js +5 -5
- package/dist/SlideFilmstrip/index.js +11 -9
- package/dist/SlideGrid/index.js +4 -4
- package/dist/SlideStage/index.js +3 -3
- package/dist/SourceEditor/index.js +2 -2
- package/dist/StatusCard/index.js +5 -5
- package/dist/Switcher/index.js +13 -12
- package/dist/TableCells/index.js +5 -5
- package/dist/Tabs/index.js +7 -6
- package/dist/Tag/Tag.d.ts +9 -2
- package/dist/Tag/index.js +1 -1
- package/dist/{Tag-JTJVZM2D.css → Tag-WLDOROB5.css} +24 -0
- package/dist/TagsInput/index.js +6 -6
- package/dist/ThemeGallery/index.js +5 -5
- package/dist/ThemeSwitcher/index.js +9 -8
- package/dist/ThinkingIndicator/index.js +1 -1
- package/dist/{ThinkingIndicator-JMK2TNMZ.css → ThinkingIndicator-S7ZL2C77.css} +8 -0
- package/dist/ThreadSummary/ThreadSummary.d.ts +43 -0
- package/dist/ThreadSummary/index.d.ts +4 -0
- package/dist/ThreadSummary/index.js +6 -0
- package/dist/ThreadSummary-AGR4NDMD.css +90 -0
- package/dist/TimeRangePicker/index.js +13 -12
- package/dist/TimeWindowPicker/index.js +11 -10
- package/dist/Toaster/index.js +2 -2
- package/dist/Toolbar/index.js +3 -3
- package/dist/Tooltip/Tooltip.d.ts +30 -3
- package/dist/Tooltip/index.js +5 -3
- package/dist/TreeCanvas/index.js +10 -7
- package/dist/TreeGrid/index.js +3 -3
- package/dist/ValueField/index.js +9 -9
- package/dist/VersionCompare/index.js +10 -9
- package/dist/VersionTimeline/index.js +4 -4
- package/dist/WidgetFrame/index.js +2 -2
- package/dist/{chunk-LOWQK2PB.js → chunk-22CU7V4J.js} +4 -4
- package/dist/{chunk-WCDPFTJZ.js → chunk-25JQNHTC.js} +92 -28
- package/dist/{chunk-6LXS3X7A.js → chunk-2L4WHYMT.js} +1 -1
- package/dist/{chunk-6G6WHTC7.js → chunk-2O5CMV76.js} +1 -1
- package/dist/{chunk-FQI62PIZ.js → chunk-2SVQBQAD.js} +2 -2
- package/dist/{chunk-7PJFUQMY.js → chunk-2ZSCHQOA.js} +1 -1
- package/dist/chunk-3BRXEMYT.js +46 -0
- package/dist/{chunk-H22SR76M.js → chunk-3H6OZUZ3.js} +1 -1
- package/dist/{chunk-VK45YJLH.js → chunk-3IWZVEXA.js} +2 -2
- package/dist/{chunk-2STOSJT3.js → chunk-46FIBJCV.js} +7 -7
- package/dist/chunk-4DEKONVJ.js +87 -0
- package/dist/{chunk-NUZHC6MM.js → chunk-4ITETIGZ.js} +12 -1
- package/dist/{chunk-73GUXYYE.js → chunk-5AHNW5CP.js} +1 -1
- package/dist/{chunk-FFGEJUAP.js → chunk-5ILRWUE7.js} +2 -2
- package/dist/chunk-5JPOFAVN.js +58 -0
- package/dist/{chunk-S5QJZOPL.js → chunk-5K5SZGBI.js} +1 -1
- package/dist/{chunk-YB64PWIN.js → chunk-5V6GW6HK.js} +1 -1
- package/dist/{chunk-LM6VYJTV.js → chunk-5YXMKZUA.js} +1 -1
- package/dist/{chunk-5XBNJNSO.js → chunk-65RFU7LF.js} +1 -1
- package/dist/{chunk-7MGXHCVK.js → chunk-6M2N6ETA.js} +1 -1
- package/dist/{chunk-OWHETZIU.js → chunk-6SFDL4QH.js} +1 -1
- package/dist/{chunk-WK4FQPYW.js → chunk-77VOASOY.js} +5 -5
- package/dist/{chunk-UYF2B2TH.js → chunk-7ELFH3RJ.js} +1 -1
- package/dist/{chunk-HPI5J6AR.js → chunk-7K6LVM5I.js} +2 -2
- package/dist/{chunk-YQDRJZ5J.js → chunk-7M7WKYOV.js} +8 -8
- package/dist/{chunk-A5YKNRG6.js → chunk-7QCSISHM.js} +2 -1
- package/dist/{chunk-CYYBE2MM.js → chunk-7U6PK242.js} +1 -1
- package/dist/{chunk-I33UIUZD.js → chunk-7ZSEUO5Q.js} +51 -40
- package/dist/{chunk-LCZULGMB.js → chunk-ABRWL5FJ.js} +2 -2
- package/dist/{chunk-VG3SIJ3M.js → chunk-AFLS26AC.js} +2 -2
- package/dist/{chunk-4XF7ENQA.js → chunk-AOJ6ZA77.js} +2 -2
- package/dist/{chunk-Q2T4L6ML.js → chunk-AQNP3KQU.js} +5 -5
- package/dist/{chunk-6X5PGHEX.js → chunk-AUSFKGKL.js} +2 -2
- package/dist/{chunk-6R334YT3.js → chunk-AZYE7NR4.js} +2 -2
- package/dist/{chunk-WKKWF277.js → chunk-BN5FEJL5.js} +2 -2
- package/dist/{chunk-MPVMB2DV.js → chunk-BVML4UVB.js} +3 -2
- package/dist/{chunk-EAIOXW2W.js → chunk-BXGBGYKH.js} +8 -14
- package/dist/chunk-C4256UXE.js +21 -0
- package/dist/{chunk-2FMBZCFR.js → chunk-C42XW5YP.js} +1 -1
- package/dist/{chunk-4MRFLHJC.js → chunk-C46DDVTK.js} +1 -1
- package/dist/{chunk-5BOFC5OP.js → chunk-CF4M6N6A.js} +20 -4
- package/dist/{chunk-ANTAQAR4.js → chunk-CMAZZY2I.js} +7 -1
- package/dist/{chunk-3JXX5S3Z.js → chunk-CV2LU2T2.js} +2 -2
- package/dist/{chunk-MLDTLZAO.js → chunk-D2GT3CR4.js} +3 -3
- package/dist/{chunk-57AKYFML.js → chunk-DD7RBNT4.js} +3 -3
- package/dist/{chunk-KL6A7JGH.js → chunk-DRFOTWJE.js} +2 -2
- package/dist/{chunk-MUFBHVCT.js → chunk-DWQYV5AV.js} +2 -2
- package/dist/{chunk-CNEHFH2A.js → chunk-EAHEJNVJ.js} +1 -1
- package/dist/chunk-EALRMP7N.js +69 -0
- package/dist/{chunk-E35HYQMK.js → chunk-EBVZHVPD.js} +12 -5
- package/dist/{chunk-KHJIEPZV.js → chunk-EC6EUIAD.js} +9 -6
- package/dist/{chunk-XNNY27SC.js → chunk-ED4A6Q24.js} +1 -1
- package/dist/{chunk-6LN64KGG.js → chunk-F7HZYTZT.js} +6 -3
- package/dist/{chunk-RTMNULTL.js → chunk-FLW5U7YS.js} +2 -2
- package/dist/{chunk-JQEXAH7G.js → chunk-FPU7AA3X.js} +5 -16
- package/dist/{chunk-GHQG4VZA.js → chunk-G3CACE5L.js} +3 -3
- package/dist/{chunk-JMTBK55P.js → chunk-G4EHZHKM.js} +2 -2
- package/dist/{chunk-45M73G5A.js → chunk-GLKQHN7G.js} +5 -5
- package/dist/{chunk-N2BF272H.js → chunk-HF5L56YQ.js} +1 -1
- package/dist/chunk-HTBTAIH6.js +37 -0
- package/dist/chunk-HTS5RJ7S.js +6 -0
- package/dist/{chunk-BRLZXYPA.js → chunk-I4IUX3JF.js} +1 -1
- package/dist/{chunk-BXCL6P5Z.js → chunk-I4PBFJGX.js} +1 -1
- package/dist/{chunk-ADGNISEI.js → chunk-IAP7APOX.js} +5 -5
- package/dist/chunk-ICE3D63E.js +384 -0
- package/dist/{chunk-BT3GB7HC.js → chunk-IRONPJB4.js} +3 -3
- package/dist/chunk-IUBOLGHG.js +140 -0
- package/dist/chunk-JLOESTT2.js +10 -0
- package/dist/{chunk-5EFLA6BW.js → chunk-K6RWEQ6P.js} +2 -2
- package/dist/{chunk-ZQEJSEPS.js → chunk-K6Y6CDEZ.js} +2 -2
- package/dist/chunk-K774LUN3.js +20 -0
- package/dist/{chunk-7KBNFFM3.js → chunk-KXWJJWBD.js} +6 -3
- package/dist/{chunk-53J2YNQA.js → chunk-L5VU3LZT.js} +1 -1
- package/dist/chunk-L72URIHR.js +36 -0
- package/dist/{chunk-VERJCAJ4.js → chunk-LBGKLYBY.js} +1 -1
- package/dist/{chunk-PRN5IP2R.js → chunk-LMEMH6DO.js} +1 -1
- package/dist/{chunk-I22MUEG7.js → chunk-LNQSNXGJ.js} +1 -1
- package/dist/chunk-LT44RL62.js +50 -0
- package/dist/{chunk-222VILSP.js → chunk-LVJGN5II.js} +1 -1
- package/dist/{chunk-AYHIF6DH.js → chunk-LZNPL266.js} +1 -1
- package/dist/{chunk-R45VM5EX.js → chunk-MMV7NEAC.js} +1 -1
- package/dist/{chunk-2IIHMJMZ.js → chunk-MVKUE4FI.js} +2 -2
- package/dist/{chunk-37U3Z65B.js → chunk-MVMVMHYI.js} +1 -1
- package/dist/{chunk-JD7P2GJP.js → chunk-MYAARF4Z.js} +1 -1
- package/dist/{chunk-OBPINJNO.js → chunk-NCUSI4ZU.js} +3 -3
- package/dist/{chunk-NKBKQEKS.js → chunk-NFXCJGHG.js} +1 -1
- package/dist/{chunk-OZAZHM55.js → chunk-NKBKHOMU.js} +1 -1
- package/dist/{chunk-MGQKF7GK.js → chunk-NN475NAP.js} +1 -1
- package/dist/{chunk-6EWNMSS4.js → chunk-NNZRTR5M.js} +2 -2
- package/dist/{chunk-JT7WRPZ6.js → chunk-NTRKC2JV.js} +1 -1
- package/dist/{chunk-63GBSOLU.js → chunk-NXBCAXP5.js} +2 -2
- package/dist/{chunk-NR4CPM4T.js → chunk-NXFTCPF6.js} +1 -1
- package/dist/chunk-O3MYBNRO.js +80 -0
- package/dist/{chunk-RMEBFYL7.js → chunk-O6EV6GKI.js} +1 -1
- package/dist/{chunk-YL7AR6PR.js → chunk-O7KG4CXB.js} +3 -3
- package/dist/{chunk-FB3TCNQP.js → chunk-O7N6W52M.js} +3 -3
- package/dist/chunk-ONHYFU7D.js +25 -0
- package/dist/{chunk-T24HBEU6.js → chunk-OOOVL77Y.js} +1 -1
- package/dist/{chunk-BLGBD2D2.js → chunk-P7HMY3BQ.js} +4 -4
- package/dist/chunk-PCAT2EFB.js +104 -0
- package/dist/{chunk-TPIMOGOZ.js → chunk-PEBQMX5X.js} +1 -1
- package/dist/{chunk-UY3FWQWG.js → chunk-PGBKZSSQ.js} +201 -22
- package/dist/{chunk-4TMBAOXK.js → chunk-PW57R4BN.js} +1 -1
- package/dist/chunk-PX5BOALQ.js +13 -0
- package/dist/{chunk-CFTBESST.js → chunk-Q6TCUSQA.js} +2 -2
- package/dist/{chunk-ZWXHTXZO.js → chunk-QGEDXYLB.js} +2 -2
- package/dist/{chunk-ZKLEAK7M.js → chunk-QM3432PH.js} +7 -7
- package/dist/{chunk-WTXCK46H.js → chunk-R2QBQ6NO.js} +1 -1
- package/dist/{chunk-Z6JKZI4E.js → chunk-RBQRTGXX.js} +1 -1
- package/dist/{chunk-TJIBTHWJ.js → chunk-RDIQB5ZE.js} +3 -3
- package/dist/{chunk-TPCBPGSB.js → chunk-RO5JU6SN.js} +4 -4
- package/dist/{chunk-O222F2IX.js → chunk-SGMWLUYQ.js} +6 -6
- package/dist/{chunk-HEA6TERQ.js → chunk-SHH7UD5U.js} +1 -1
- package/dist/{chunk-CLJGFOTV.js → chunk-SKGOKLJD.js} +31 -18
- package/dist/{chunk-CSXJIIO4.js → chunk-SNQ7PH3D.js} +1 -1
- package/dist/chunk-SPNTUQBV.js +244 -0
- package/dist/{chunk-RIAPCEB5.js → chunk-T3S3D4FC.js} +5 -5
- package/dist/chunk-TDFLCUBE.js +6 -0
- package/dist/{chunk-OQG4P5KU.js → chunk-TGGYSQRD.js} +5 -6
- package/dist/{chunk-7FF6CZW5.js → chunk-TQKQRS2J.js} +36 -8
- package/dist/chunk-TRXTO3WC.js +114 -0
- package/dist/{chunk-H5XTJ7GJ.js → chunk-TUEM2XIW.js} +1 -1
- package/dist/{chunk-4AUTALJA.js → chunk-U2IQNDDR.js} +1 -1
- package/dist/{chunk-IVTQWOXV.js → chunk-ULYHDP7U.js} +1 -1
- package/dist/{chunk-DGSK4LLS.js → chunk-V6WDJUYK.js} +1 -1
- package/dist/{chunk-Z2MZTI3H.js → chunk-VB3FVKNI.js} +1 -1
- package/dist/{chunk-R5OATXWU.js → chunk-VONEKR3J.js} +38 -15
- package/dist/{chunk-CZQ7UITX.js → chunk-WANKINXG.js} +3 -3
- package/dist/{chunk-HQOEAUDJ.js → chunk-WMO722J2.js} +2 -2
- package/dist/{chunk-D7G2QGET.js → chunk-X3US25XJ.js} +1 -1
- package/dist/{chunk-GPFYITOF.js → chunk-X7VZQKIW.js} +1 -1
- package/dist/{chunk-L4HHWG4V.js → chunk-XA2QKGBJ.js} +3 -3
- package/dist/{chunk-DV5L2GRY.js → chunk-XJMES7AE.js} +1 -1
- package/dist/{chunk-5NJMSYDZ.js → chunk-XNC3M4IN.js} +1 -1
- package/dist/{chunk-B2YSFWUG.js → chunk-XRWHDW6F.js} +9 -9
- package/dist/{chunk-TKUAGWNR.js → chunk-XTJHMP3W.js} +2 -2
- package/dist/{chunk-KTIQSSME.js → chunk-XZY6S3UC.js} +6 -3
- package/dist/{chunk-7KHM2FZH.js → chunk-YGRTX67J.js} +1 -1
- package/dist/{chunk-RTPQDNW3.js → chunk-YJQXESOJ.js} +5 -1
- package/dist/chunk-YP2FS6SH.js +54 -0
- package/dist/{chunk-LMQG3VPG.js → chunk-YQ7Q52XU.js} +1 -1
- package/dist/{chunk-G4CGDUCP.js → chunk-YRNNUCQP.js} +1 -1
- package/dist/{chunk-5CEQ3HLH.js → chunk-YXKSUILG.js} +6 -6
- package/dist/{chunk-NHLNHH4J.js → chunk-ZB3E2Z4Y.js} +1 -1
- package/dist/{chunk-IL3XLDW7.js → chunk-ZDWAIVWL.js} +1 -1
- package/dist/{chunk-SNIPM6K7.js → chunk-ZJVLGYE3.js} +3 -3
- package/dist/{chunk-BFM5G2Z6.js → chunk-ZPTKAYJK.js} +1 -1
- package/dist/{chunk-2PIH6JHJ.js → chunk-ZXTDWTXS.js} +1 -1
- package/dist/{chunk-C667GCU7.js → chunk-ZXXZESCD.js} +9 -7
- package/dist/generated/index.d.ts +17 -0
- package/dist/generated/index.js +184 -163
- package/dist/index.js +184 -163
- package/dist/styles.css +2769 -156
- package/dist/utils/composedRef.d.ts +39 -0
- package/dist/utils/focusModality.d.ts +14 -0
- package/dist/utils/heldHint.d.ts +6 -0
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.js +4 -2
- package/dist/utils/tokenMs.d.ts +6 -0
- package/package.json +5 -5
- package/dist/ArtifactKinds-O3CALPVX.css +0 -16
- package/dist/{chunk-PLNJEDGI.js → chunk-I4IO56EY.js} +1 -1
- package/dist/{chunk-FEJANUZK.js → chunk-KBSD476L.js} +0 -0
- package/dist/{chunk-624X3RVA.js → chunk-O55JQ7BE.js} +1 -1
- /package/dist/{chunk-CDFQ7MQK.js → chunk-REEZQCML.js} +0 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { LockedLabel } from './chunk-TEV5REGB.js';
|
|
2
|
+
import { tokenMs } from './chunk-HTS5RJ7S.js';
|
|
3
|
+
import { LAYER_GAP, useLayerContainer, viewportBounds, anchorGone, LAYER_REPOSITION_EVENT } from './chunk-OMV5W53A.js';
|
|
4
|
+
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
5
|
+
import { usePopupLayer } from './chunk-TUEM2XIW.js';
|
|
6
|
+
import { returnFocus } from './chunk-4ITETIGZ.js';
|
|
7
|
+
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
8
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
9
|
+
import './HitArea-QUOS6ZDJ.css';
|
|
10
|
+
import './CompactNav-CU2AQXBC.css';
|
|
11
|
+
import { useState, useRef, useId, useCallback, useLayoutEffect, useEffect } from 'react';
|
|
12
|
+
import { createPortal } from 'react-dom';
|
|
13
|
+
import { motion } from '@crewlethq/tokens';
|
|
14
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
15
|
+
|
|
16
|
+
function CompactNav({ label, className, children }) {
|
|
17
|
+
return /* @__PURE__ */ jsx("nav", { className: cx("crewlet-compact-nav", className), "aria-label": label, children: /* @__PURE__ */ jsx("ul", { className: "crewlet-compact-nav__list", children }) });
|
|
18
|
+
}
|
|
19
|
+
function figureWords(figure) {
|
|
20
|
+
return `, ${String(figure.value)} ${figure.label}`;
|
|
21
|
+
}
|
|
22
|
+
function titleOf(place) {
|
|
23
|
+
const figure = place.badge ?? place.count;
|
|
24
|
+
const named = figure ? `${place.label}${figureWords(figure)}` : place.label;
|
|
25
|
+
return place.locked ? `${named}. ${place.locked}` : named;
|
|
26
|
+
}
|
|
27
|
+
function Tile({ icon, figure, attention }) {
|
|
28
|
+
return /* @__PURE__ */ jsxs("span", { className: "crewlet-compact-nav__tile", "aria-hidden": true, children: [
|
|
29
|
+
icon,
|
|
30
|
+
figure ? /* @__PURE__ */ jsx("span", { className: cx("crewlet-compact-nav__figure", attention && "crewlet-compact-nav__figure--badge"), children: figure.value }) : null
|
|
31
|
+
] });
|
|
32
|
+
}
|
|
33
|
+
function TileLabel({ label, figures, locked }) {
|
|
34
|
+
return /* @__PURE__ */ jsxs("span", { className: "crewlet-compact-nav__label", children: [
|
|
35
|
+
/* @__PURE__ */ jsx(LockedLabel, { reason: locked, children: label }),
|
|
36
|
+
figures ? /* @__PURE__ */ jsx(VisuallyHidden, { children: figures }) : null
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
function CompactNavItem({
|
|
40
|
+
label,
|
|
41
|
+
icon,
|
|
42
|
+
href,
|
|
43
|
+
current = false,
|
|
44
|
+
badge,
|
|
45
|
+
count,
|
|
46
|
+
locked,
|
|
47
|
+
onPrefetch,
|
|
48
|
+
title,
|
|
49
|
+
keyshortcuts,
|
|
50
|
+
onClick,
|
|
51
|
+
renderLink,
|
|
52
|
+
className
|
|
53
|
+
}) {
|
|
54
|
+
const figure = badge ?? count;
|
|
55
|
+
const inside = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Tile, { icon, figure, attention: badge !== void 0 }),
|
|
57
|
+
/* @__PURE__ */ jsx(TileLabel, { label, figures: [count, badge].filter((f) => f !== void 0).map(figureWords).join(""), locked })
|
|
58
|
+
] });
|
|
59
|
+
const shown = title ?? titleOf({ label, badge, count, locked });
|
|
60
|
+
const itemClass = cx("crewlet-compact-nav__item", HIT_AREA_CLASS, locked && "crewlet-compact-nav__item--locked");
|
|
61
|
+
let item;
|
|
62
|
+
if (renderLink) {
|
|
63
|
+
item = renderLink({
|
|
64
|
+
className: itemClass,
|
|
65
|
+
children: inside,
|
|
66
|
+
...href === void 0 ? {} : { href },
|
|
67
|
+
...current ? { "aria-current": "page" } : {},
|
|
68
|
+
...onClick === void 0 ? {} : { onClick },
|
|
69
|
+
title: shown,
|
|
70
|
+
...onPrefetch === void 0 ? {} : { onPointerEnter: onPrefetch, onFocus: onPrefetch }
|
|
71
|
+
});
|
|
72
|
+
} else if (href !== void 0) {
|
|
73
|
+
item = /* @__PURE__ */ jsx(
|
|
74
|
+
"a",
|
|
75
|
+
{
|
|
76
|
+
className: itemClass,
|
|
77
|
+
href,
|
|
78
|
+
"aria-current": current ? "page" : void 0,
|
|
79
|
+
"aria-keyshortcuts": keyshortcuts,
|
|
80
|
+
title: shown,
|
|
81
|
+
onClick,
|
|
82
|
+
onPointerEnter: onPrefetch,
|
|
83
|
+
onFocus: onPrefetch,
|
|
84
|
+
children: inside
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
} else {
|
|
88
|
+
item = /* @__PURE__ */ jsx(
|
|
89
|
+
"button",
|
|
90
|
+
{
|
|
91
|
+
type: "button",
|
|
92
|
+
className: itemClass,
|
|
93
|
+
"aria-current": current ? "page" : void 0,
|
|
94
|
+
"aria-keyshortcuts": keyshortcuts,
|
|
95
|
+
title: shown,
|
|
96
|
+
onClick,
|
|
97
|
+
onPointerEnter: onPrefetch,
|
|
98
|
+
onFocus: onPrefetch,
|
|
99
|
+
children: inside
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
return /* @__PURE__ */ jsx("li", { className: cx("crewlet-compact-nav__entry", className), children: item });
|
|
104
|
+
}
|
|
105
|
+
function CompactNavSeparator({ label }) {
|
|
106
|
+
return /* @__PURE__ */ jsx("li", { className: "crewlet-compact-nav__separator", children: /* @__PURE__ */ jsx("span", { className: "crewlet-compact-nav__rule", role: "separator", "aria-label": label }) });
|
|
107
|
+
}
|
|
108
|
+
function figureNumber(value) {
|
|
109
|
+
if (typeof value === "number") return Number.isFinite(value) ? { n: value, more: false } : null;
|
|
110
|
+
const match = /^(\d[\d,]*)(\+?)$/.exec(value.trim());
|
|
111
|
+
if (!match) return null;
|
|
112
|
+
return { n: Number(match[1].replaceAll(",", "")), more: match[2] === "+" };
|
|
113
|
+
}
|
|
114
|
+
function groupBadge(links) {
|
|
115
|
+
const badges = links.flatMap((link) => link.badge ? [link.badge] : []);
|
|
116
|
+
if (badges.length === 0) return void 0;
|
|
117
|
+
if (badges.length === 1) return badges[0].value;
|
|
118
|
+
const read = badges.map((badge) => figureNumber(badge.value));
|
|
119
|
+
if (read.some((figure) => figure === null)) return `${String(badges[0].value)}+`;
|
|
120
|
+
const total = read.reduce((sum, figure) => sum + figure.n, 0);
|
|
121
|
+
return read.some((figure) => figure.more) ? `${total}+` : total;
|
|
122
|
+
}
|
|
123
|
+
function placeFlyout(tile, railEnd, size, bounds, lift = 0) {
|
|
124
|
+
const maxTop = bounds.y + bounds.height - size.height;
|
|
125
|
+
const top = Math.max(bounds.y, Math.min(tile.y - lift, maxTop));
|
|
126
|
+
const maxLeft = bounds.x + bounds.width - size.width;
|
|
127
|
+
const left = Math.max(bounds.x, Math.min(railEnd + LAYER_GAP, maxLeft));
|
|
128
|
+
return { left, top };
|
|
129
|
+
}
|
|
130
|
+
var OPEN_DELAY = tokenMs(motion.duration.fast);
|
|
131
|
+
var CLOSE_DELAY = tokenMs(motion.duration.moderate);
|
|
132
|
+
function CompactNavGroup({ label, icon, links, renderLink, className }) {
|
|
133
|
+
const [open, setOpen] = useState(false);
|
|
134
|
+
const [place, setPlace] = useState(null);
|
|
135
|
+
const tile = useRef(null);
|
|
136
|
+
const panel = useRef(null);
|
|
137
|
+
const timer = useRef(void 0);
|
|
138
|
+
const opener = useRef("pointer");
|
|
139
|
+
const focusFirst = useRef(false);
|
|
140
|
+
const id = useId();
|
|
141
|
+
const container = useLayerContainer();
|
|
142
|
+
const current = links.some((link) => link.current);
|
|
143
|
+
const badge = groupBadge(links);
|
|
144
|
+
const spoken = links.filter((link) => link.badge).map((link) => `${link.label} ${String(link.badge.value)} ${link.badge.label}`).join(", ");
|
|
145
|
+
const clear = useCallback(() => {
|
|
146
|
+
if (timer.current !== void 0) clearTimeout(timer.current);
|
|
147
|
+
timer.current = void 0;
|
|
148
|
+
}, []);
|
|
149
|
+
const close = useCallback(
|
|
150
|
+
(refocus) => {
|
|
151
|
+
clear();
|
|
152
|
+
setOpen(false);
|
|
153
|
+
if (refocus) returnFocus(tile.current);
|
|
154
|
+
},
|
|
155
|
+
[clear]
|
|
156
|
+
);
|
|
157
|
+
const show = useCallback(
|
|
158
|
+
(by, first) => {
|
|
159
|
+
clear();
|
|
160
|
+
opener.current = by;
|
|
161
|
+
focusFirst.current = first;
|
|
162
|
+
setOpen(true);
|
|
163
|
+
},
|
|
164
|
+
[clear]
|
|
165
|
+
);
|
|
166
|
+
const popup = usePopupLayer({
|
|
167
|
+
open,
|
|
168
|
+
// Escape hands focus back to the tile; a press elsewhere leaves it where
|
|
169
|
+
// the reader put it.
|
|
170
|
+
onDismiss: (reason) => close(reason === "escape" && panel.current?.contains(document.activeElement) === true)
|
|
171
|
+
});
|
|
172
|
+
const position = useCallback(() => {
|
|
173
|
+
const at = tile.current;
|
|
174
|
+
const box = panel.current;
|
|
175
|
+
if (!at || !box || !container) return;
|
|
176
|
+
const inHost = container !== document.body;
|
|
177
|
+
const host = inHost ? container.getBoundingClientRect() : viewportBounds();
|
|
178
|
+
const rect = at.getBoundingClientRect();
|
|
179
|
+
if (anchorGone(rect, host, inHost)) {
|
|
180
|
+
close(false);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const rail = at.closest(".crewlet-compact-nav")?.getBoundingClientRect() ?? rect;
|
|
184
|
+
const own = box.getBoundingClientRect();
|
|
185
|
+
const head = box.querySelector(".crewlet-compact-nav__flyout-head");
|
|
186
|
+
const spot = placeFlyout(
|
|
187
|
+
{ x: rect.x - (inHost ? host.x : 0), y: rect.y - (inHost ? host.y : 0), width: rect.width, height: rect.height },
|
|
188
|
+
rail.right - (inHost ? host.x : 0),
|
|
189
|
+
{ width: own.width, height: own.height },
|
|
190
|
+
{ x: LAYER_GAP, y: LAYER_GAP, width: host.width - 2 * LAYER_GAP, height: host.height - 2 * LAYER_GAP },
|
|
191
|
+
// The flyout's HEAD stands level with the tile: the group's name beside
|
|
192
|
+
// the group's tile, and its places running down from there. The panel's
|
|
193
|
+
// own edge and inset go above the tile's top.
|
|
194
|
+
head ? head.offsetTop + box.clientTop : 0
|
|
195
|
+
);
|
|
196
|
+
setPlace((was) => was && was.left === spot.left && was.top === spot.top ? was : spot);
|
|
197
|
+
}, [close, container]);
|
|
198
|
+
useLayoutEffect(() => {
|
|
199
|
+
if (!open) return void 0;
|
|
200
|
+
position();
|
|
201
|
+
const onLayout = () => position();
|
|
202
|
+
container?.addEventListener(LAYER_REPOSITION_EVENT, onLayout);
|
|
203
|
+
window.addEventListener("resize", onLayout);
|
|
204
|
+
window.addEventListener("scroll", onLayout, true);
|
|
205
|
+
return () => {
|
|
206
|
+
container?.removeEventListener(LAYER_REPOSITION_EVENT, onLayout);
|
|
207
|
+
window.removeEventListener("resize", onLayout);
|
|
208
|
+
window.removeEventListener("scroll", onLayout, true);
|
|
209
|
+
};
|
|
210
|
+
}, [open, container, position]);
|
|
211
|
+
useLayoutEffect(() => {
|
|
212
|
+
if (!place || !focusFirst.current) return;
|
|
213
|
+
focusFirst.current = false;
|
|
214
|
+
panel.current?.querySelector('[role="menuitem"]')?.focus();
|
|
215
|
+
}, [place]);
|
|
216
|
+
useEffect(() => {
|
|
217
|
+
if (!open) setPlace(null);
|
|
218
|
+
}, [open]);
|
|
219
|
+
useEffect(() => clear, [clear]);
|
|
220
|
+
const items = () => [...panel.current?.querySelectorAll('[role="menuitem"]') ?? []];
|
|
221
|
+
const onTileKeyDown = (event) => {
|
|
222
|
+
if (event.key === "ArrowRight") {
|
|
223
|
+
event.preventDefault();
|
|
224
|
+
if (open) items()[0]?.focus();
|
|
225
|
+
else show("keys", true);
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
const onPanelKeyDown = (event) => {
|
|
229
|
+
const all = items();
|
|
230
|
+
const at = all.indexOf(document.activeElement);
|
|
231
|
+
switch (event.key) {
|
|
232
|
+
case "ArrowDown":
|
|
233
|
+
case "ArrowUp": {
|
|
234
|
+
event.preventDefault();
|
|
235
|
+
const step = event.key === "ArrowDown" ? 1 : -1;
|
|
236
|
+
all[(at + step + all.length) % all.length]?.focus();
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
case "Home":
|
|
240
|
+
case "End":
|
|
241
|
+
event.preventDefault();
|
|
242
|
+
(event.key === "Home" ? all[0] : all.at(-1))?.focus();
|
|
243
|
+
break;
|
|
244
|
+
case "ArrowLeft":
|
|
245
|
+
case "Escape":
|
|
246
|
+
event.preventDefault();
|
|
247
|
+
close(true);
|
|
248
|
+
break;
|
|
249
|
+
case "Tab":
|
|
250
|
+
close(true);
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
const onPointerEnter = (event) => {
|
|
255
|
+
if (event.pointerType !== "mouse") return;
|
|
256
|
+
clear();
|
|
257
|
+
if (!open) timer.current = setTimeout(() => show("pointer", false), OPEN_DELAY);
|
|
258
|
+
};
|
|
259
|
+
const onPointerLeave = (event) => {
|
|
260
|
+
if (event.pointerType !== "mouse") return;
|
|
261
|
+
clear();
|
|
262
|
+
if (opener.current === "pointer") timer.current = setTimeout(() => setOpen(false), CLOSE_DELAY);
|
|
263
|
+
};
|
|
264
|
+
const choose = (link) => (event) => {
|
|
265
|
+
link.onClick?.(event);
|
|
266
|
+
close(panel.current?.contains(document.activeElement) === true && event.detail === 0);
|
|
267
|
+
};
|
|
268
|
+
const flyout = open ? /* @__PURE__ */ jsxs(
|
|
269
|
+
"div",
|
|
270
|
+
{
|
|
271
|
+
ref: (el) => {
|
|
272
|
+
panel.current = el;
|
|
273
|
+
popup.panelRef(el);
|
|
274
|
+
},
|
|
275
|
+
id: `${id}-flyout`,
|
|
276
|
+
role: "menu",
|
|
277
|
+
"aria-label": label,
|
|
278
|
+
tabIndex: -1,
|
|
279
|
+
className: cx(
|
|
280
|
+
"crewlet-compact-nav__flyout",
|
|
281
|
+
container !== null && container !== document.body && "crewlet-compact-nav__flyout--in-host"
|
|
282
|
+
),
|
|
283
|
+
style: place ? { left: place.left, top: place.top, zIndex: popup.zIndex } : { visibility: "hidden" },
|
|
284
|
+
onKeyDown: onPanelKeyDown,
|
|
285
|
+
onPointerEnter: (event) => event.pointerType === "mouse" && clear(),
|
|
286
|
+
onPointerLeave,
|
|
287
|
+
children: [
|
|
288
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-compact-nav__flyout-head", "aria-hidden": true, children: label }),
|
|
289
|
+
links.map((link) => {
|
|
290
|
+
const figure = link.badge ?? link.count;
|
|
291
|
+
const inside = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
292
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-compact-nav__link-icon", "aria-hidden": true, children: link.icon }),
|
|
293
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-compact-nav__link-label", children: [
|
|
294
|
+
/* @__PURE__ */ jsx(LockedLabel, { reason: link.locked, children: link.label }),
|
|
295
|
+
figure ? /* @__PURE__ */ jsx(VisuallyHidden, { children: [link.count, link.badge].filter((f) => f !== void 0).map(figureWords).join("") }) : null
|
|
296
|
+
] }),
|
|
297
|
+
figure ? /* @__PURE__ */ jsx(
|
|
298
|
+
"span",
|
|
299
|
+
{
|
|
300
|
+
className: cx("crewlet-compact-nav__link-figure", link.badge && "crewlet-compact-nav__link-figure--badge"),
|
|
301
|
+
"aria-hidden": true,
|
|
302
|
+
children: figure.value
|
|
303
|
+
}
|
|
304
|
+
) : null
|
|
305
|
+
] });
|
|
306
|
+
const linkClass = cx("crewlet-compact-nav__link", link.locked && "crewlet-compact-nav__link--locked");
|
|
307
|
+
const onClick = choose(link);
|
|
308
|
+
if (renderLink) {
|
|
309
|
+
return /* @__PURE__ */ jsx(MenuLink, { children: renderLink({
|
|
310
|
+
className: linkClass,
|
|
311
|
+
children: inside,
|
|
312
|
+
...link.href === void 0 ? {} : { href: link.href },
|
|
313
|
+
...link.current ? { "aria-current": "page" } : {},
|
|
314
|
+
onClick,
|
|
315
|
+
...link.onPrefetch === void 0 ? {} : { onPointerEnter: link.onPrefetch, onFocus: link.onPrefetch }
|
|
316
|
+
}) }, link.key);
|
|
317
|
+
}
|
|
318
|
+
return /* @__PURE__ */ jsx(
|
|
319
|
+
"a",
|
|
320
|
+
{
|
|
321
|
+
className: linkClass,
|
|
322
|
+
href: link.href,
|
|
323
|
+
role: "menuitem",
|
|
324
|
+
tabIndex: -1,
|
|
325
|
+
"aria-current": link.current ? "page" : void 0,
|
|
326
|
+
onClick,
|
|
327
|
+
onPointerEnter: link.onPrefetch,
|
|
328
|
+
onFocus: link.onPrefetch,
|
|
329
|
+
children: inside
|
|
330
|
+
},
|
|
331
|
+
link.key
|
|
332
|
+
);
|
|
333
|
+
})
|
|
334
|
+
]
|
|
335
|
+
}
|
|
336
|
+
) : null;
|
|
337
|
+
return /* @__PURE__ */ jsxs("li", { className: cx("crewlet-compact-nav__entry", className), children: [
|
|
338
|
+
/* @__PURE__ */ jsxs(
|
|
339
|
+
"button",
|
|
340
|
+
{
|
|
341
|
+
ref: (el) => {
|
|
342
|
+
tile.current = el;
|
|
343
|
+
popup.insideRef(el);
|
|
344
|
+
},
|
|
345
|
+
type: "button",
|
|
346
|
+
className: cx("crewlet-compact-nav__item", HIT_AREA_CLASS),
|
|
347
|
+
"aria-haspopup": "menu",
|
|
348
|
+
"aria-expanded": open,
|
|
349
|
+
"aria-controls": open ? `${id}-flyout` : void 0,
|
|
350
|
+
"aria-current": current ? "true" : void 0,
|
|
351
|
+
title: spoken ? `${label}, ${spoken}` : label,
|
|
352
|
+
"data-open": open || void 0,
|
|
353
|
+
onClick: (event) => {
|
|
354
|
+
if (open && opener.current === "pointer" && event.detail !== 0) {
|
|
355
|
+
opener.current = "press";
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
if (open) close(false);
|
|
359
|
+
else show(event.detail === 0 ? "keys" : "press", event.detail === 0);
|
|
360
|
+
},
|
|
361
|
+
onKeyDown: onTileKeyDown,
|
|
362
|
+
onPointerEnter,
|
|
363
|
+
onPointerLeave,
|
|
364
|
+
children: [
|
|
365
|
+
/* @__PURE__ */ jsx(Tile, { icon, figure: badge === void 0 ? void 0 : { value: badge, label: "" }, attention: true }),
|
|
366
|
+
/* @__PURE__ */ jsx(TileLabel, { label, figures: spoken ? `, ${spoken}` : "", locked: void 0 })
|
|
367
|
+
]
|
|
368
|
+
}
|
|
369
|
+
),
|
|
370
|
+
flyout && container ? createPortal(flyout, container) : null
|
|
371
|
+
] });
|
|
372
|
+
}
|
|
373
|
+
function MenuLink({ children }) {
|
|
374
|
+
const ref = useRef(null);
|
|
375
|
+
useLayoutEffect(() => {
|
|
376
|
+
const element = ref.current?.firstElementChild;
|
|
377
|
+
if (!(element instanceof HTMLElement)) return;
|
|
378
|
+
element.setAttribute("role", "menuitem");
|
|
379
|
+
element.tabIndex = -1;
|
|
380
|
+
});
|
|
381
|
+
return /* @__PURE__ */ jsx("span", { ref, className: "crewlet-compact-nav__link-slot", children });
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export { CompactNav, CompactNavGroup, CompactNavItem, CompactNavSeparator, groupBadge, placeFlyout };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AVATAR_SIZES, Avatar } from './chunk-
|
|
1
|
+
import { AVATAR_SIZES, Avatar } from './chunk-XZY6S3UC.js';
|
|
2
2
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
-
import './Avatar-
|
|
4
|
-
import './AvatarStack-
|
|
3
|
+
import './Avatar-MNE3WBZO.css';
|
|
4
|
+
import './AvatarStack-KEHD3GWY.css';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
function counted(count, one, many) {
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { Button } from './chunk-DGXZ635L.js';
|
|
2
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
+
import './ChatScale-L4SIHSKL.css';
|
|
4
|
+
import './ChatMessage-FH7VRVCH.css';
|
|
5
|
+
import { forwardRef, useState, useCallback } from 'react';
|
|
6
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var CHAT_MESSAGE_CLASS = "crewlet-chat-message";
|
|
9
|
+
function scrollerOf(element) {
|
|
10
|
+
for (let node = element.parentElement; node; node = node.parentElement) {
|
|
11
|
+
const { overflowY } = getComputedStyle(node);
|
|
12
|
+
if (overflowY === "auto" || overflowY === "scroll") return node;
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
var ChatMessage = forwardRef(function ChatMessage2({
|
|
17
|
+
id,
|
|
18
|
+
label,
|
|
19
|
+
avatar,
|
|
20
|
+
author,
|
|
21
|
+
badges,
|
|
22
|
+
time,
|
|
23
|
+
timeTitle,
|
|
24
|
+
dateTime,
|
|
25
|
+
gutterTime,
|
|
26
|
+
continuation = false,
|
|
27
|
+
highlight = null,
|
|
28
|
+
pending,
|
|
29
|
+
active = false,
|
|
30
|
+
flash = false,
|
|
31
|
+
editing = false,
|
|
32
|
+
actions,
|
|
33
|
+
actionsPlacement = "auto",
|
|
34
|
+
footer,
|
|
35
|
+
children,
|
|
36
|
+
className,
|
|
37
|
+
onKeyDown,
|
|
38
|
+
onPointerEnter,
|
|
39
|
+
onFocus,
|
|
40
|
+
...rest
|
|
41
|
+
}, ref) {
|
|
42
|
+
const tray = editing ? null : actions;
|
|
43
|
+
const hasTray = tray !== null && tray !== void 0 && tray !== false;
|
|
44
|
+
const [inside, setInside] = useState(false);
|
|
45
|
+
const measure = useCallback(
|
|
46
|
+
(row) => {
|
|
47
|
+
if (actionsPlacement !== "auto") return;
|
|
48
|
+
const bar = row.querySelector(":scope > .crewlet-chat-message__actions");
|
|
49
|
+
if (!bar) return;
|
|
50
|
+
const edge = scrollerOf(row)?.getBoundingClientRect().top ?? 0;
|
|
51
|
+
const need = bar.offsetHeight - (Number.parseFloat(getComputedStyle(row).paddingTop) || 0);
|
|
52
|
+
const next = row.getBoundingClientRect().top - edge < need;
|
|
53
|
+
setInside((was) => was === next ? was : next);
|
|
54
|
+
},
|
|
55
|
+
[actionsPlacement]
|
|
56
|
+
);
|
|
57
|
+
function keys(event) {
|
|
58
|
+
onKeyDown?.(event);
|
|
59
|
+
if (event.defaultPrevented || event.target !== event.currentTarget) return;
|
|
60
|
+
if (event.key !== "ArrowUp" && event.key !== "ArrowDown") return;
|
|
61
|
+
const row = event.currentTarget;
|
|
62
|
+
const within = row.closest('[role="log"]') ?? row.parentElement;
|
|
63
|
+
if (!within) return;
|
|
64
|
+
const rows = [...within.querySelectorAll(`.${CHAT_MESSAGE_CLASS}`)];
|
|
65
|
+
const next = rows[rows.indexOf(row) + (event.key === "ArrowUp" ? -1 : 1)];
|
|
66
|
+
if (!next) return;
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
next.focus();
|
|
69
|
+
}
|
|
70
|
+
return (
|
|
71
|
+
// A row is an article a reader can land on (a tap, a jump, the arrows)
|
|
72
|
+
// and step from, as the items of a feed are: the keys it takes walk
|
|
73
|
+
// between rows, and the pointer only measures where its toolbar stands.
|
|
74
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- see above
|
|
75
|
+
/* @__PURE__ */ jsxs(
|
|
76
|
+
"article",
|
|
77
|
+
{
|
|
78
|
+
...rest,
|
|
79
|
+
ref,
|
|
80
|
+
className: cx(
|
|
81
|
+
CHAT_MESSAGE_CLASS,
|
|
82
|
+
continuation && "is-continuation",
|
|
83
|
+
highlight && `is-${highlight}`,
|
|
84
|
+
pending && `is-${pending}`,
|
|
85
|
+
active && "is-active",
|
|
86
|
+
flash && "is-flash",
|
|
87
|
+
editing && "is-editing",
|
|
88
|
+
hasTray && (actionsPlacement === "inside" || inside) && "has-actions-inside",
|
|
89
|
+
className
|
|
90
|
+
),
|
|
91
|
+
"aria-label": label,
|
|
92
|
+
"data-message-id": id,
|
|
93
|
+
tabIndex: -1,
|
|
94
|
+
onKeyDown: keys,
|
|
95
|
+
onPointerEnter: (event) => {
|
|
96
|
+
if (hasTray) measure(event.currentTarget);
|
|
97
|
+
onPointerEnter?.(event);
|
|
98
|
+
},
|
|
99
|
+
onFocus: (event) => {
|
|
100
|
+
if (hasTray) measure(event.currentTarget);
|
|
101
|
+
onFocus?.(event);
|
|
102
|
+
},
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__gutter", children: continuation ? /* @__PURE__ */ jsx("time", { className: "crewlet-chat-message__gutter-time", dateTime, title: timeTitle, children: gutterTime ?? time }) : avatar }),
|
|
105
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-chat-message__main", children: [
|
|
106
|
+
continuation ? null : /* @__PURE__ */ jsxs("div", { className: "crewlet-chat-message__head", children: [
|
|
107
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-chat-message__author", children: author }),
|
|
108
|
+
badges,
|
|
109
|
+
/* @__PURE__ */ jsx("time", { className: "crewlet-chat-message__time", dateTime, title: timeTitle, children: time })
|
|
110
|
+
] }),
|
|
111
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__body", children }),
|
|
112
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__footer", children: footer }) : null
|
|
113
|
+
] }),
|
|
114
|
+
hasTray ? /* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__actions", children: tray }) : null
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
);
|
|
119
|
+
});
|
|
120
|
+
var CHAT_MESSAGE_FAILURE_LABELS = {
|
|
121
|
+
notSent: "Not sent.",
|
|
122
|
+
retry: "Retry",
|
|
123
|
+
discard: "Discard"
|
|
124
|
+
};
|
|
125
|
+
function ChatMessageFailure({ reason, onRetry, onDiscard, labels: overrides, className, ...rest }) {
|
|
126
|
+
const labels = overrides ? { ...CHAT_MESSAGE_FAILURE_LABELS, ...overrides } : CHAT_MESSAGE_FAILURE_LABELS;
|
|
127
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: cx("crewlet-chat-message-failure", className), role: "status", children: [
|
|
128
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-chat-message-failure__words", children: [
|
|
129
|
+
labels.notSent,
|
|
130
|
+
reason ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
131
|
+
" ",
|
|
132
|
+
reason
|
|
133
|
+
] }) : null
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ jsx(Button, { size: "small", variant: "ghost", onClick: onRetry, children: labels.retry }),
|
|
136
|
+
/* @__PURE__ */ jsx(Button, { size: "small", variant: "ghost", onClick: onDiscard, children: labels.discard })
|
|
137
|
+
] });
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export { CHAT_MESSAGE_CLASS, CHAT_MESSAGE_FAILURE_LABELS, ChatMessage, ChatMessageFailure };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/AppShell/railShape.ts
|
|
4
|
+
var RailShapeContext = createContext("full");
|
|
5
|
+
function useRailShape() {
|
|
6
|
+
return useContext(RailShapeContext);
|
|
7
|
+
}
|
|
8
|
+
var RailLeavingContext = createContext(false);
|
|
9
|
+
|
|
10
|
+
export { RailLeavingContext, RailShapeContext, useRailShape };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Stepper } from './chunk-RJWO2PC5.js';
|
|
2
2
|
import { PageHeader } from './chunk-FPDIHEM4.js';
|
|
3
|
-
import {
|
|
3
|
+
import { useMediaMatch } from './chunk-YJQXESOJ.js';
|
|
4
|
+
import { Disclosure } from './chunk-LVJGN5II.js';
|
|
4
5
|
import { useHeadingLevel, nextHeadingLevel, headingTag, HeadingLevelProvider } from './chunk-PQADV6P6.js';
|
|
5
|
-
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
7
|
import './SetupWizard-Y2PFPBCZ.css';
|
|
8
8
|
import { useId, useRef, useState, useEffect, useCallback, createElement } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { avatarCorner, Avatar } from './chunk-
|
|
1
|
+
import { avatarCorner, Avatar } from './chunk-XZY6S3UC.js';
|
|
2
2
|
import { Spinner } from './chunk-XSPCITPN.js';
|
|
3
|
-
import './ImageUpload-
|
|
3
|
+
import './ImageUpload-IFXZROFZ.css';
|
|
4
4
|
import { useRef } from 'react';
|
|
5
5
|
import { CameraGlyph, XGlyph } from '@crewlethq/icons/glyphs';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
|
+
import './ChatScale-L4SIHSKL.css';
|
|
3
|
+
import './ChatDivider-7ZNDL2PZ.css';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function ChatDivider({ variant, label, className, ...rest }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
...rest,
|
|
11
|
+
role: "separator",
|
|
12
|
+
"aria-label": label,
|
|
13
|
+
"data-divider": variant,
|
|
14
|
+
className: cx("crewlet-chat-divider", `crewlet-chat-divider--${variant}`, className),
|
|
15
|
+
children: /* @__PURE__ */ jsx("span", { className: "crewlet-chat-divider__label", "aria-hidden": "true", children: label })
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { ChatDivider };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { useRailShape } from './chunk-JLOESTT2.js';
|
|
1
2
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
3
|
import './BrandLockup-JKGXFCZF.css';
|
|
3
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
6
|
function BrandLockup({ name, mark, context, href, renderLink, className }) {
|
|
7
|
+
const title = useRailShape() === "compact" ? name : void 0;
|
|
6
8
|
const inside = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7
9
|
mark ? /* @__PURE__ */ jsx("span", { className: "crewlet-brand__mark", "aria-hidden": true, children: mark }) : null,
|
|
8
10
|
/* @__PURE__ */ jsx("span", { className: "crewlet-brand__name", children: name })
|
|
@@ -11,15 +13,16 @@ function BrandLockup({ name, mark, context, href, renderLink, className }) {
|
|
|
11
13
|
className: "crewlet-brand__home",
|
|
12
14
|
children: inside,
|
|
13
15
|
"aria-label": name,
|
|
14
|
-
...href === void 0 ? {} : { href }
|
|
16
|
+
...href === void 0 ? {} : { href },
|
|
17
|
+
...title === void 0 ? {} : { title }
|
|
15
18
|
};
|
|
16
19
|
return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-brand", className), children: [
|
|
17
20
|
renderLink ? renderLink(linkProps) : href === void 0 ? (
|
|
18
21
|
// Not a link, because it goes nowhere. An anchor with no href is
|
|
19
22
|
// announced as text anyway, and one with href="#" navigates the page
|
|
20
23
|
// it is meant to be the way out of.
|
|
21
|
-
/* @__PURE__ */ jsx("span", { className: "crewlet-brand__home", children: inside })
|
|
22
|
-
) : /* @__PURE__ */ jsx("a", { className: "crewlet-brand__home", href, "aria-label": name, children: inside }),
|
|
24
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand__home", title, children: inside })
|
|
25
|
+
) : /* @__PURE__ */ jsx("a", { className: "crewlet-brand__home", href, "aria-label": name, title, children: inside }),
|
|
23
26
|
context ? /* @__PURE__ */ jsx("span", { className: "crewlet-brand__context", children: context }) : null
|
|
24
27
|
] });
|
|
25
28
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/utils/composedRef.ts
|
|
4
|
+
function attachRef(ref, element) {
|
|
5
|
+
if (typeof ref === "function") {
|
|
6
|
+
const release = ref(element);
|
|
7
|
+
return typeof release === "function" ? release : () => void ref(null);
|
|
8
|
+
}
|
|
9
|
+
if (!ref) return () => {
|
|
10
|
+
};
|
|
11
|
+
const box = ref;
|
|
12
|
+
box.current = element;
|
|
13
|
+
return () => {
|
|
14
|
+
box.current = null;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function composeRefs(...refs) {
|
|
18
|
+
return (element) => {
|
|
19
|
+
const releases = refs.map((ref) => attachRef(ref, element));
|
|
20
|
+
return () => {
|
|
21
|
+
for (const release of releases) release();
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function sameRefs(a, b) {
|
|
26
|
+
return a.length === b.length && a.every((ref, index) => ref === b[index]);
|
|
27
|
+
}
|
|
28
|
+
function useComposedRef(...refs) {
|
|
29
|
+
const joined = useRef(null);
|
|
30
|
+
if (!joined.current || !sameRefs(joined.current.refs, refs)) {
|
|
31
|
+
joined.current = { refs, callback: composeRefs(...refs) };
|
|
32
|
+
}
|
|
33
|
+
return joined.current.callback;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { attachRef, composeRefs, useComposedRef };
|