@crewlethq/ui 0.110.0 → 0.112.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/dist/ActivityLine/index.js +1 -1
- package/dist/AgentHandoffPanel/index.js +9 -8
- package/dist/AppShell/index.js +5 -5
- package/dist/ArrangeFrame/index.js +3 -3
- package/dist/ArrangeList/index.js +6 -5
- package/dist/ArtifactBar/index.js +7 -7
- package/dist/ArtifactCard/index.js +8 -7
- package/dist/ArtifactPanel/index.js +4 -4
- package/dist/AttentionList/index.js +3 -3
- package/dist/Avatar/AvatarStack.d.ts +9 -3
- package/dist/Avatar/index.js +1 -1
- package/dist/AvatarPicker/index.js +9 -9
- package/dist/{AvatarStack-EQZZJZ3V.css → AvatarStack-GNEJHEU6.css} +20 -0
- package/dist/BriefCard/index.js +3 -3
- package/dist/Button/index.js +2 -2
- package/dist/Canvas/index.js +4 -4
- package/dist/CanvasBoard/index.js +6 -6
- package/dist/CanvasToolbar/index.js +5 -5
- package/dist/ChangeMark/index.js +2 -2
- package/dist/ChatDay/ChatDay.d.ts +3 -1
- package/dist/ChatDay/index.js +2 -2
- package/dist/ChatDivider/ChatDivider.d.ts +8 -1
- package/dist/ChatDivider/index.js +1 -1
- package/dist/{ChatDivider-7SPCQXUQ.css → ChatDivider-BRODST2E.css} +23 -0
- package/dist/ChatMessage/ChatMessage.d.ts +10 -3
- package/dist/ChatMessage/index.js +4 -4
- package/dist/{ChatMessage-OJO6ASZP.css → ChatMessage-SZGZT7O2.css} +35 -0
- package/dist/{ChatScale-ST24RFPO.css → ChatScale-6NM4TP7R.css} +6 -3
- package/dist/ChatThread/index.js +4 -4
- package/dist/CheckGrid/index.js +6 -5
- package/dist/Checkbox/index.js +5 -4
- package/dist/CodeBlock/CodeBlock.d.ts +14 -1
- package/dist/CodeBlock/index.d.ts +1 -1
- package/dist/CodeBlock/index.js +5 -5
- package/dist/{CodeBlock-T47UA5GM.css → CodeBlock-LS7H6KUQ.css} +45 -0
- package/dist/ColorField/index.js +5 -4
- package/dist/ColorSwatch/index.js +5 -5
- package/dist/Combobox/index.js +5 -4
- package/dist/CommandPalette/index.js +7 -6
- package/dist/CommentThread/index.js +8 -7
- package/dist/Composer/index.js +5 -4
- package/dist/ConfirmField/index.js +5 -4
- package/dist/ConflictNote/index.js +3 -3
- package/dist/ContrastHelp/index.js +4 -4
- package/dist/Copyable/index.js +4 -4
- package/dist/DataGrid/index.js +8 -7
- package/dist/DataTable/index.js +9 -8
- package/dist/DataView/index.js +13 -12
- package/dist/DateTimePicker/index.js +5 -5
- package/dist/DeepWorkCard/index.js +4 -4
- package/dist/DeliveryReceipt/index.js +1 -1
- package/dist/DocTabsEditor/index.js +7 -6
- package/dist/DownloadButton/index.js +3 -3
- package/dist/{Editor-GIEZ6PPP.js → Editor-YITN2DWX.js} +6 -5
- package/dist/EmojiPicker/EmojiPicker.d.ts +23 -5
- package/dist/EmojiPicker/index.d.ts +1 -1
- package/dist/EmojiPicker/index.js +7 -5
- package/dist/EmojiPicker-V6XM56GJ.css +180 -0
- package/dist/EntityChip/index.js +1 -1
- package/dist/ErrorBoundary/index.js +3 -3
- package/dist/FactList/index.js +2 -2
- package/dist/FileDrop/index.js +3 -3
- package/dist/FilterPill/index.js +3 -3
- package/dist/FollowBanner/index.js +3 -3
- package/dist/HuePicker/index.js +7 -7
- package/dist/IconButton/index.js +2 -2
- package/dist/ImageUpload/index.js +1 -1
- package/dist/InlineEditor/index.js +3 -3
- package/dist/Input/index.js +4 -3
- package/dist/KeyValueRows/index.js +6 -5
- package/dist/Layer/index.d.ts +1 -1
- package/dist/Layer/place.d.ts +6 -0
- package/dist/LinkCard/index.js +1 -1
- package/dist/LinkInterstitial/index.js +5 -5
- package/dist/ListInput/index.js +6 -5
- package/dist/LogoSlot/index.js +4 -4
- package/dist/MarkdownEditor/index.js +7 -7
- package/dist/MemberPicker/index.js +6 -5
- package/dist/MentionMenu/MentionMenu.d.ts +18 -2
- package/dist/MentionMenu/index.d.ts +4 -1
- package/dist/MentionMenu/index.js +2 -1
- package/dist/{MentionMenu-77P7C4F7.css → MentionMenu-AWZSOTNU.css} +45 -1
- package/dist/Menu/Menu.d.ts +13 -1
- package/dist/Menu/index.js +4 -4
- package/dist/{Menu-7AARCFX5.css → Menu-PXOAJ4DP.css} +48 -0
- package/dist/MergeConflicts/index.js +7 -7
- package/dist/MessageActions/MessageActions.d.ts +4 -4
- package/dist/MessageActions/index.js +7 -6
- package/dist/{MessageActions-UGMXBGKY.css → MessageActions-Y2IXY24H.css} +18 -5
- package/dist/Modal/index.js +4 -4
- package/dist/OpenInAppCard/index.js +4 -4
- package/dist/OrgLabel/index.js +1 -1
- package/dist/OrgNode/index.js +1 -1
- package/dist/OrgTable/index.js +11 -10
- package/dist/PeekRail/index.js +4 -4
- package/dist/PeopleRail/index.js +5 -5
- package/dist/PinTile/index.js +3 -3
- package/dist/Popover/Popover.d.ts +4 -2
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-QCINR7WG.css → Popover-EKG6OBZL.css} +5 -0
- package/dist/PresenceStack/index.js +1 -1
- package/dist/PresenterView/index.js +5 -5
- package/dist/Principal/index.js +1 -1
- package/dist/PrincipalPicker/index.js +7 -6
- package/dist/ProposalCard/index.js +8 -7
- package/dist/RailList/index.js +5 -4
- package/dist/ReactionBar/ReactionBar.d.ts +4 -2
- package/dist/ReactionBar/index.js +8 -6
- package/dist/ReceiptStrip/index.js +3 -3
- package/dist/RecordChip/index.js +2 -2
- package/dist/ResultTableCard/index.js +4 -4
- package/dist/RichEditor/index.js +4 -4
- package/dist/RoomRow/index.js +1 -1
- package/dist/SandboxedFrame/index.js +4 -4
- package/dist/SectionFrame/index.js +5 -4
- package/dist/SegmentedControl/index.js +6 -6
- package/dist/SelectionBar/index.js +3 -3
- package/dist/SendButton/index.js +3 -3
- package/dist/ShareDialog/index.js +7 -7
- package/dist/SheetColumnEditor/index.js +11 -10
- package/dist/SheetGrid/index.js +8 -8
- package/dist/SidePanel/SidePanel.d.ts +8 -3
- package/dist/SidePanel/SidePanelBase.d.ts +4 -1
- package/dist/SidePanel/index.d.ts +1 -1
- package/dist/SidePanel/index.js +4 -4
- package/dist/{SidePanel-FVZVNSHI.css → SidePanel-DZ4E5SNP.css} +26 -0
- package/dist/SidebarNav/SidebarNav.d.ts +6 -0
- package/dist/SidebarNav/index.d.ts +2 -2
- package/dist/SidebarNav/index.js +4 -3
- package/dist/{SidebarNav-3SU7UDXK.css → SidebarNav-JCHQXFIM.css} +41 -4
- package/dist/Skeleton/index.js +1 -1
- package/dist/SlideCompare/index.js +3 -3
- package/dist/SlideFilmstrip/index.js +5 -5
- package/dist/SlideNav/index.js +3 -3
- package/dist/StatusLine/index.js +2 -2
- package/dist/Switcher/index.js +9 -8
- package/dist/TableCells/index.js +1 -1
- package/dist/Tabs/index.js +5 -5
- package/dist/TagsInput/index.js +3 -3
- package/dist/ThemeSwitcher/index.js +7 -7
- package/dist/ThemeToggle/index.js +3 -3
- package/dist/ThreadSummary/ThreadSummary.d.ts +2 -0
- package/dist/ThreadSummary/index.d.ts +1 -1
- package/dist/ThreadSummary/index.js +2 -2
- package/dist/{ThreadSummary-CFAHYY57.css → ThreadSummary-2AFEU6NH.css} +2 -1
- package/dist/TimeRangePicker/index.js +10 -9
- package/dist/TimeWindowPicker/index.js +7 -6
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tooltip-PRPBX6OG.css +61 -0
- package/dist/TreeCanvas/index.js +5 -5
- package/dist/TreeGrid/index.js +9 -8
- package/dist/ValueField/index.js +6 -5
- package/dist/VersionCompare/index.js +7 -7
- package/dist/VersionTimeline/index.js +4 -4
- package/dist/WidgetFrame/index.js +2 -2
- package/dist/{chunk-6BVGVAKH.js → chunk-2D7IVGEV.js} +1 -1
- package/dist/{chunk-HY336MR6.js → chunk-2ILQUAB7.js} +1 -1
- package/dist/{chunk-PRZO2LAG.js → chunk-3AUFRPG3.js} +1 -1
- package/dist/{chunk-4ZZ7G3XC.js → chunk-3GF2PTYZ.js} +28 -5
- package/dist/{chunk-IIM6UAJJ.js → chunk-3SAJXMM6.js} +1 -1
- package/dist/{chunk-KRO66LZZ.js → chunk-3UFIYOVD.js} +1 -1
- package/dist/{chunk-K3IJWNHL.js → chunk-3W7NG6ST.js} +2 -2
- package/dist/{chunk-HWTTVN6T.js → chunk-435WY2WT.js} +1 -1
- package/dist/{chunk-G2B4Y67G.js → chunk-45VQPH27.js} +3 -3
- package/dist/chunk-47V3ASMW.js +74 -0
- package/dist/{chunk-NPMMCFKI.js → chunk-4KU5LLXU.js} +1 -1
- package/dist/{chunk-ZFFIUJ4C.js → chunk-4ONGTD7Y.js} +2 -2
- package/dist/{chunk-ET4RCHNJ.js → chunk-4VHRO7HZ.js} +67 -29
- package/dist/{chunk-46BY2WPZ.js → chunk-5CWB52JK.js} +1 -1
- package/dist/{chunk-O73RB4P7.js → chunk-5FOJLJYN.js} +2 -2
- package/dist/{chunk-IGFQ4LWZ.js → chunk-5G3KASPV.js} +3 -3
- package/dist/{chunk-TIOYPPIX.js → chunk-5SBMYPWG.js} +3 -3
- package/dist/{chunk-WUCRLA25.js → chunk-5SMYKL3D.js} +9 -3
- package/dist/{chunk-MNKXYGZ2.js → chunk-5SV47YN7.js} +2 -2
- package/dist/{chunk-EKC4MOGY.js → chunk-5YFQMMTJ.js} +1 -1
- package/dist/{chunk-F3E66TBM.js → chunk-6QLMET36.js} +1 -1
- package/dist/{chunk-OJ3BGBU5.js → chunk-76LJUPDA.js} +2 -2
- package/dist/{chunk-5LBIIEHJ.js → chunk-7GUZSA5U.js} +8 -3
- package/dist/{chunk-HVFN4DJT.js → chunk-7MB7RUZZ.js} +1 -1
- package/dist/{chunk-AXGSKD72.js → chunk-7TLM7E5N.js} +3 -3
- package/dist/{chunk-3R76X3MI.js → chunk-A2TYEOB4.js} +2 -2
- package/dist/{chunk-JNP5EMLV.js → chunk-ANIJQ25E.js} +2 -2
- package/dist/{chunk-4QI7VFLV.js → chunk-AQMB6ONN.js} +6 -6
- package/dist/{chunk-YX5KEKPL.js → chunk-AXMXXAGB.js} +1 -1
- package/dist/{chunk-WM55LPY7.js → chunk-BBE656JU.js} +2 -2
- package/dist/{chunk-WF4Q5LD6.js → chunk-BF2BXM6V.js} +1 -1
- package/dist/{chunk-TIAZSF7H.js → chunk-BGFWCOFR.js} +2 -2
- package/dist/{chunk-YWTZHIKA.js → chunk-BJEWRSV7.js} +1 -1
- package/dist/{chunk-OAP576OR.js → chunk-BLFHFMXQ.js} +1 -1
- package/dist/{chunk-DEIHV2H3.js → chunk-BMTNY3FK.js} +1 -1
- package/dist/{chunk-BUOBTY3X.js → chunk-CHB7T3PT.js} +5 -5
- package/dist/{chunk-WOD6L2DC.js → chunk-CJRWESDZ.js} +1 -1
- package/dist/{chunk-OPX4OGN3.js → chunk-CTIJTW4R.js} +2 -2
- package/dist/{chunk-EJEBRXOF.js → chunk-D7NXK77P.js} +5 -5
- package/dist/{chunk-ZAN7Q4WG.js → chunk-DF5B4QO5.js} +1 -1
- package/dist/{chunk-HUSMU5EL.js → chunk-DKDSBI75.js} +3 -3
- package/dist/{chunk-DEMG2UTW.js → chunk-DRI6OXWY.js} +1 -1
- package/dist/{chunk-PJMDXZHP.js → chunk-DTEDUAEW.js} +1 -1
- package/dist/{chunk-OSKXOCH3.js → chunk-DTZ72KVX.js} +3 -3
- package/dist/{chunk-V5ANQP4E.js → chunk-ECGYBWRI.js} +2 -2
- package/dist/{chunk-NQIWSKQX.js → chunk-ENYB3HIA.js} +3 -3
- package/dist/{chunk-3EXGTJQU.js → chunk-EYY2ZMSY.js} +1 -1
- package/dist/{chunk-K5L7FJTH.js → chunk-FC4T5ILA.js} +1 -1
- package/dist/{chunk-5QKNXTIC.js → chunk-FZY4TTR4.js} +1 -1
- package/dist/{chunk-OTZNIWZA.js → chunk-GBX5Y3P2.js} +1 -1
- package/dist/{chunk-N7CYJVV4.js → chunk-GFOPTRRY.js} +1 -1
- package/dist/{chunk-AWXCILIT.js → chunk-GG5CFBSE.js} +2 -2
- package/dist/{chunk-PH5APLMB.js → chunk-GMQ54OQF.js} +1 -1
- package/dist/{chunk-RBNYJP77.js → chunk-HHRYIXBM.js} +2 -2
- package/dist/{chunk-4SKN3BLH.js → chunk-HXVMXH6U.js} +5 -4
- package/dist/{chunk-LQZMCR2K.js → chunk-I6GVXOHK.js} +1 -1
- package/dist/{chunk-AV5NWTYU.js → chunk-IHJRLVU3.js} +1 -1
- package/dist/{chunk-JJLYGLH6.js → chunk-J4OL6KHY.js} +3 -3
- package/dist/{chunk-VYUEAMA4.js → chunk-KDRJZWE3.js} +3 -1
- package/dist/{chunk-RWUY53VW.js → chunk-KG3PHAUX.js} +3 -3
- package/dist/{chunk-XLJELX5W.js → chunk-KVNVLBCB.js} +2 -2
- package/dist/{chunk-ZQKLFN2J.js → chunk-KYWIUH5R.js} +8 -8
- package/dist/{chunk-T5G5DM3H.js → chunk-L4YD6SVT.js} +1 -1
- package/dist/{chunk-ALGG2HRE.js → chunk-LGJJIPYZ.js} +1 -1
- package/dist/{chunk-6D7GTMNO.js → chunk-LNE5AMFQ.js} +1 -1
- package/dist/{chunk-QAQKJ4PO.js → chunk-LNSAYEOA.js} +1 -1
- package/dist/{chunk-2QLZCD5Q.js → chunk-LSVX4DTF.js} +2 -2
- package/dist/{chunk-FANYWNER.js → chunk-M7EALYXZ.js} +1 -1
- package/dist/{chunk-GA7HSINF.js → chunk-NOP55WRY.js} +108 -45
- package/dist/{chunk-RTHWXAXT.js → chunk-NPPPQSRU.js} +1 -1
- package/dist/{chunk-IOLOWL33.js → chunk-O3DHDBTW.js} +1 -1
- package/dist/{chunk-CUE3WM7L.js → chunk-OKOHQ3E7.js} +1 -1
- package/dist/{chunk-I2FNTMX2.js → chunk-OKPGW76D.js} +1 -1
- package/dist/{chunk-3IYS6YNX.js → chunk-OYV7BFRC.js} +1 -1
- package/dist/{chunk-IVZLFSQS.js → chunk-P366K4RX.js} +5 -4
- package/dist/{chunk-I476JLNZ.js → chunk-P5AOTCGQ.js} +1 -1
- package/dist/{chunk-NIDLT7UM.js → chunk-PBDMJHXV.js} +1 -1
- package/dist/chunk-PJV5HVZY.js +67 -0
- package/dist/{chunk-ZBON36GU.js → chunk-PWB2LWBE.js} +3 -3
- package/dist/chunk-Q5LDZPFF.js +2 -0
- package/dist/{chunk-G32JHH7N.js → chunk-QCJ3UBCZ.js} +3 -3
- package/dist/{chunk-BRJ6LZM2.js → chunk-QFSPIYCM.js} +1 -1
- package/dist/{chunk-AZKGH2UI.js → chunk-QHUKJN33.js} +57 -15
- package/dist/{chunk-IIEDUSMU.js → chunk-QLGZBN6A.js} +6 -6
- package/dist/{chunk-OIF6UMPY.js → chunk-QMEKGAEA.js} +4 -4
- package/dist/{chunk-43UOZIYG.js → chunk-QVNEQSOL.js} +1 -1
- package/dist/{chunk-P3BEB4E6.js → chunk-RHD46WIZ.js} +2 -2
- package/dist/{chunk-TCAX77BH.js → chunk-RTDFRFTF.js} +9 -4
- package/dist/{chunk-HY2JXBPO.js → chunk-SDYLFZKZ.js} +4 -4
- package/dist/{chunk-LYHAR4DX.js → chunk-SJNJBXUA.js} +5 -5
- package/dist/{chunk-G6HS6QA4.js → chunk-SJV7VVSS.js} +3 -3
- package/dist/{chunk-OQO7NSHR.js → chunk-STJPIP3R.js} +1 -1
- package/dist/{chunk-QNSL4JCU.js → chunk-T2RRTICC.js} +4 -4
- package/dist/{chunk-L3G2YQE3.js → chunk-T63HK6T5.js} +1 -1
- package/dist/{chunk-MEAFEAFF.js → chunk-T75L3PFN.js} +1 -1
- package/dist/{chunk-FNKOULI4.js → chunk-TCNTMTPI.js} +2 -2
- package/dist/{chunk-FWDU7E34.js → chunk-TE3OMB3Z.js} +3 -29
- package/dist/{chunk-4JEHXJPO.js → chunk-TP7PRSGX.js} +2 -2
- package/dist/{chunk-5DYV5Q67.js → chunk-TYQJRTTK.js} +1 -1
- package/dist/{chunk-O4J3FUIX.js → chunk-UJ7SHDE7.js} +4 -4
- package/dist/{chunk-43YZWF2B.js → chunk-V6BEBGO3.js} +5 -5
- package/dist/{chunk-YRSNOCFL.js → chunk-VZ42TS3C.js} +3 -3
- package/dist/{chunk-THVGTKST.js → chunk-WEZU4DX2.js} +1 -1
- package/dist/{chunk-ZBV6BNG7.js → chunk-WN3YE3ND.js} +1 -1
- package/dist/{chunk-QHE4CNBM.js → chunk-WNVUN3LJ.js} +1 -1
- package/dist/{chunk-R5OUUSLB.js → chunk-Y36N7TB7.js} +2 -2
- package/dist/{chunk-W4YNOUHF.js → chunk-Y3FLNQEE.js} +4 -4
- package/dist/{chunk-4WOLHRHH.js → chunk-Y4L7WNWU.js} +1 -1
- package/dist/{chunk-RM4PUCDQ.js → chunk-YD5UCBFV.js} +1 -1
- package/dist/{chunk-NVQUEZU5.js → chunk-YE76GTQU.js} +4 -4
- package/dist/{chunk-QHXO5H2S.js → chunk-ZGJCVXFU.js} +3 -3
- package/dist/{chunk-LSOPZVR7.js → chunk-ZJVGVTC3.js} +20 -6
- package/dist/{chunk-YLOQNVR2.js → chunk-ZUFV7753.js} +6 -5
- package/dist/generated/index.js +123 -122
- package/dist/index.js +123 -122
- package/dist/styles.css +435 -70
- package/dist/utils/fieldMirror.d.ts +22 -0
- package/package.json +3 -3
- package/dist/EmojiPicker-W722WJ5M.css +0 -105
- package/dist/Tooltip-LKQF7CE4.css +0 -71
- package/dist/chunk-VZ7DNXCW.js +0 -58
- package/dist/chunk-XETR2N6C.js +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
2
|
-
import { IconButton } from './chunk-
|
|
3
|
-
import { Tooltip } from './chunk-
|
|
1
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
2
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
3
|
+
import { Tooltip } from './chunk-HXVMXH6U.js';
|
|
4
4
|
import { useComposedRef } from './chunk-L72URIHR.js';
|
|
5
5
|
import { useLayerContainer, viewportBounds, visibleBounds, LAYER_GAP, anchorGone, placePopup, LAYER_REPOSITION_EVENT } from './chunk-FIX72ZEC.js';
|
|
6
6
|
import { usePopupLayer } from './chunk-EDPMHSLZ.js';
|
|
7
7
|
import { returnFocus } from './chunk-4ITETIGZ.js';
|
|
8
8
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
9
|
-
import './Menu-
|
|
9
|
+
import './Menu-PXOAJ4DP.css';
|
|
10
10
|
import { useId, useState, useRef, useCallback, useLayoutEffect, useEffect } from 'react';
|
|
11
11
|
import { createPortal } from 'react-dom';
|
|
12
12
|
import { EllipsisVerticalGlyph, CheckGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -43,11 +43,15 @@ function Menu({
|
|
|
43
43
|
renderTrigger,
|
|
44
44
|
header,
|
|
45
45
|
tooltip,
|
|
46
|
+
entrance = "rise",
|
|
47
|
+
activeDescendant = false,
|
|
46
48
|
className
|
|
47
49
|
}) {
|
|
48
50
|
const id = useId();
|
|
49
51
|
const menuId = `${id}-menu`;
|
|
50
52
|
const headerId = `${id}-header`;
|
|
53
|
+
const itemId = (index) => `${id}-item-${index}`;
|
|
54
|
+
const [active, setActive] = useState(-1);
|
|
51
55
|
const [uncontrolled, setUncontrolled] = useState(false);
|
|
52
56
|
const open = controlled ?? uncontrolled;
|
|
53
57
|
const triggerRef = useRef(null);
|
|
@@ -58,8 +62,10 @@ function Menu({
|
|
|
58
62
|
const container = useLayerContainer();
|
|
59
63
|
const isControlled = useRef(controlled !== void 0);
|
|
60
64
|
const report = useRef(onOpenChange);
|
|
65
|
+
const descendant = useRef(activeDescendant);
|
|
61
66
|
isControlled.current = controlled !== void 0;
|
|
62
67
|
report.current = onOpenChange;
|
|
68
|
+
descendant.current = activeDescendant;
|
|
63
69
|
const setOpen = useCallback((next) => {
|
|
64
70
|
if (!isControlled.current) setUncontrolled(next);
|
|
65
71
|
report.current?.(next);
|
|
@@ -84,9 +90,9 @@ function Menu({
|
|
|
84
90
|
const entries = () => menu.current ? [...menu.current.querySelectorAll(ITEM_SELECTOR)] : [];
|
|
85
91
|
useLayoutEffect(() => {
|
|
86
92
|
if (!open) return;
|
|
87
|
-
const
|
|
88
|
-
if (!(
|
|
89
|
-
opener.current =
|
|
93
|
+
const active2 = document.activeElement;
|
|
94
|
+
if (!(active2 instanceof Node && menu.current?.contains(active2))) {
|
|
95
|
+
opener.current = active2 instanceof HTMLElement ? active2 : null;
|
|
90
96
|
}
|
|
91
97
|
}, [open]);
|
|
92
98
|
const position = useCallback(() => {
|
|
@@ -145,9 +151,21 @@ function Menu({
|
|
|
145
151
|
useLayoutEffect(() => {
|
|
146
152
|
if (!placed) return;
|
|
147
153
|
const all = entries();
|
|
148
|
-
(
|
|
154
|
+
if (descendant.current) {
|
|
155
|
+
menu.current?.focus();
|
|
156
|
+
setActive(startAt.current === "none" || all.length === 0 ? -1 : startAt.current === "last" ? all.length - 1 : 0);
|
|
157
|
+
} else {
|
|
158
|
+
(startAt.current === "last" ? all[all.length - 1] : all[0])?.focus();
|
|
159
|
+
}
|
|
149
160
|
startAt.current = "first";
|
|
150
161
|
}, [placed]);
|
|
162
|
+
useEffect(() => {
|
|
163
|
+
if (!open) setActive(-1);
|
|
164
|
+
}, [open]);
|
|
165
|
+
useEffect(() => {
|
|
166
|
+
if (!activeDescendant || active < 0) return;
|
|
167
|
+
entries()[active]?.scrollIntoView?.({ block: "nearest" });
|
|
168
|
+
}, [active, activeDescendant]);
|
|
151
169
|
function onTriggerKeyDown(event) {
|
|
152
170
|
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
153
171
|
event.preventDefault();
|
|
@@ -160,16 +178,26 @@ function Menu({
|
|
|
160
178
|
event.stopPropagation();
|
|
161
179
|
}
|
|
162
180
|
const all = entries();
|
|
163
|
-
const at = all.indexOf(document.activeElement);
|
|
164
|
-
const go = (index) =>
|
|
181
|
+
const at = activeDescendant ? active : all.indexOf(document.activeElement);
|
|
182
|
+
const go = (index) => {
|
|
183
|
+
const next = (index + all.length) % all.length;
|
|
184
|
+
if (activeDescendant) setActive(next);
|
|
185
|
+
else all[next]?.focus();
|
|
186
|
+
};
|
|
165
187
|
switch (event.key) {
|
|
166
188
|
case "ArrowDown":
|
|
167
189
|
event.preventDefault();
|
|
168
|
-
go(at + 1);
|
|
190
|
+
go(at < 0 ? 0 : at + 1);
|
|
169
191
|
return;
|
|
170
192
|
case "ArrowUp":
|
|
171
193
|
event.preventDefault();
|
|
172
|
-
go(at - 1);
|
|
194
|
+
go(at < 0 ? all.length - 1 : at - 1);
|
|
195
|
+
return;
|
|
196
|
+
case "Enter":
|
|
197
|
+
case " ":
|
|
198
|
+
if (!activeDescendant) return;
|
|
199
|
+
event.preventDefault();
|
|
200
|
+
if (at >= 0) all[at]?.click();
|
|
173
201
|
return;
|
|
174
202
|
case "Home":
|
|
175
203
|
event.preventDefault();
|
|
@@ -189,7 +217,7 @@ function Menu({
|
|
|
189
217
|
const candidate = all[(at + step) % all.length];
|
|
190
218
|
if ((candidate.textContent ?? "").trim().toLocaleLowerCase().startsWith(letter)) {
|
|
191
219
|
event.preventDefault();
|
|
192
|
-
|
|
220
|
+
go(all.indexOf(candidate));
|
|
193
221
|
return;
|
|
194
222
|
}
|
|
195
223
|
}
|
|
@@ -202,6 +230,9 @@ function Menu({
|
|
|
202
230
|
item2.onSelect();
|
|
203
231
|
}
|
|
204
232
|
const described = (entry) => entry.description !== void 0 && entry.description !== null && entry.description !== false && entry.description !== "";
|
|
233
|
+
const order = new Map(
|
|
234
|
+
items.filter((entry) => entry.kind !== "separator").map((entry, index) => [entry.key, index])
|
|
235
|
+
);
|
|
205
236
|
const item = (entry) => /* @__PURE__ */ jsxs(
|
|
206
237
|
"button",
|
|
207
238
|
{
|
|
@@ -209,7 +240,11 @@ function Menu({
|
|
|
209
240
|
role: entry.checked === void 0 ? "menuitem" : "menuitemradio",
|
|
210
241
|
"aria-checked": entry.checked,
|
|
211
242
|
tabIndex: -1,
|
|
243
|
+
id: activeDescendant ? itemId(order.get(entry.key)) : void 0,
|
|
244
|
+
onPointerMove: activeDescendant ? () => setActive(order.get(entry.key)) : void 0,
|
|
245
|
+
onMouseDown: activeDescendant ? (event) => event.preventDefault() : void 0,
|
|
212
246
|
className: cx(
|
|
247
|
+
activeDescendant && order.get(entry.key) === active && "is-active",
|
|
213
248
|
"crewlet-menu__item",
|
|
214
249
|
// A row with a second line is taller than a row of verbs, and says
|
|
215
250
|
// so: the row height alone would hold both lines in the space meant
|
|
@@ -236,11 +271,18 @@ function Menu({
|
|
|
236
271
|
const list = open ? /* @__PURE__ */ jsxs(
|
|
237
272
|
"div",
|
|
238
273
|
{
|
|
239
|
-
className: cx(
|
|
274
|
+
className: cx(
|
|
275
|
+
"crewlet-menu",
|
|
276
|
+
container !== null && container !== document.body ? "crewlet-menu--in-host" : null,
|
|
277
|
+
entrance === "instant" && "crewlet-menu--instant",
|
|
278
|
+
activeDescendant && "crewlet-menu--descendant",
|
|
279
|
+
className
|
|
280
|
+
),
|
|
240
281
|
id: menuId,
|
|
241
282
|
role: "menu",
|
|
242
283
|
"aria-label": label,
|
|
243
284
|
"aria-describedby": header ? headerId : void 0,
|
|
285
|
+
"aria-activedescendant": activeDescendant && active >= 0 ? itemId(active) : void 0,
|
|
244
286
|
tabIndex: -1,
|
|
245
287
|
ref: (el) => {
|
|
246
288
|
menu.current = el;
|
|
@@ -278,7 +320,7 @@ function Menu({
|
|
|
278
320
|
if (open) {
|
|
279
321
|
close(true);
|
|
280
322
|
} else {
|
|
281
|
-
startAt.current = "first";
|
|
323
|
+
startAt.current = activeDescendant ? "none" : "first";
|
|
282
324
|
setOpen(true);
|
|
283
325
|
}
|
|
284
326
|
},
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Select } from './chunk-JUZOMYOZ.js';
|
|
2
2
|
import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chunk-LFSIKGRQ.js';
|
|
3
|
-
import { HueSwatch } from './chunk-
|
|
3
|
+
import { HueSwatch } from './chunk-QVNEQSOL.js';
|
|
4
4
|
import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
|
|
5
|
-
import { Checkbox } from './chunk-
|
|
6
|
-
import { Menu } from './chunk-
|
|
7
|
-
import { FormField, Input } from './chunk-
|
|
5
|
+
import { Checkbox } from './chunk-DTEDUAEW.js';
|
|
6
|
+
import { Menu } from './chunk-QHUKJN33.js';
|
|
7
|
+
import { FormField, Input } from './chunk-TE3OMB3Z.js';
|
|
8
8
|
import { Kbd } from './chunk-VBBLHS2Y.js';
|
|
9
|
-
import { Button } from './chunk-
|
|
10
|
-
import { IconButton } from './chunk-
|
|
9
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
10
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
11
11
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
12
12
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
13
13
|
import './SheetColumnEditor-BO2HKFRB.css';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Modal } from './chunk-
|
|
1
|
+
import { Modal } from './chunk-A2TYEOB4.js';
|
|
2
2
|
import { useListbox, useOptionKeys } from './chunk-KW7T23RT.js';
|
|
3
3
|
import { KeyChip, highlightMatch } from './chunk-HBDA76EZ.js';
|
|
4
|
-
import { Popover } from './chunk-
|
|
5
|
-
import { Skeleton } from './chunk-
|
|
4
|
+
import { Popover } from './chunk-KDRJZWE3.js';
|
|
5
|
+
import { Skeleton } from './chunk-BMTNY3FK.js';
|
|
6
6
|
import { Text } from './chunk-XLMURU75.js';
|
|
7
7
|
import { useMediaMatch } from './chunk-COS6LJ4K.js';
|
|
8
|
-
import { Input } from './chunk-
|
|
8
|
+
import { Input } from './chunk-TE3OMB3Z.js';
|
|
9
9
|
import { focusables, isComposing } from './chunk-EDPMHSLZ.js';
|
|
10
10
|
import { returnFocus } from './chunk-4ITETIGZ.js';
|
|
11
11
|
import { announce } from './chunk-WGMKERCR.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TreeGrid } from './chunk-
|
|
1
|
+
import { TreeGrid } from './chunk-DTZ72KVX.js';
|
|
2
2
|
import { createTreeModel, treeParent } from './chunk-MY374UUD.js';
|
|
3
3
|
import { OrgLabel } from './chunk-DEVO45TG.js';
|
|
4
4
|
import { AddPill } from './chunk-5W3EYO5Q.js';
|
|
5
|
-
import { IconButton } from './chunk-
|
|
5
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
7
|
import './OrgTable-5NXRECVP.css';
|
|
8
8
|
import { useMemo, useRef, useImperativeHandle, useCallback } from 'react';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
|
-
import './ChatScale-
|
|
3
|
-
import './ChatDivider-
|
|
2
|
+
import './ChatScale-6NM4TP7R.css';
|
|
3
|
+
import './ChatDivider-BRODST2E.css';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
function ChatDivider({ variant, label, className, ...rest }) {
|
|
6
|
+
function ChatDivider({ variant, label, pulse = false, className, ...rest }) {
|
|
7
7
|
return /* @__PURE__ */ jsx(
|
|
8
8
|
"div",
|
|
9
9
|
{
|
|
@@ -11,7 +11,12 @@ function ChatDivider({ variant, label, className, ...rest }) {
|
|
|
11
11
|
role: "separator",
|
|
12
12
|
"aria-label": label,
|
|
13
13
|
"data-divider": variant,
|
|
14
|
-
className: cx(
|
|
14
|
+
className: cx(
|
|
15
|
+
"crewlet-chat-divider",
|
|
16
|
+
`crewlet-chat-divider--${variant}`,
|
|
17
|
+
pulse && variant === "unread" && "is-pulsing",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
15
20
|
children: /* @__PURE__ */ jsx("span", { className: "crewlet-chat-divider__label", "aria-hidden": "true", children: label })
|
|
16
21
|
}
|
|
17
22
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Modal } from './chunk-
|
|
1
|
+
import { Modal } from './chunk-A2TYEOB4.js';
|
|
2
2
|
import { Callout } from './chunk-BPCY7ZID.js';
|
|
3
|
-
import { SegmentedControl } from './chunk-
|
|
4
|
-
import { FormField, Input } from './chunk-
|
|
5
|
-
import { Button } from './chunk-
|
|
3
|
+
import { SegmentedControl } from './chunk-YD5UCBFV.js';
|
|
4
|
+
import { FormField, Input } from './chunk-TE3OMB3Z.js';
|
|
5
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import { ClockGlyph } from '@crewlethq/icons/glyphs';
|
|
8
8
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SegmentedControl } from './chunk-
|
|
1
|
+
import { SegmentedControl } from './chunk-YD5UCBFV.js';
|
|
2
2
|
import { ArtifactIcon } from './chunk-AVL52EME.js';
|
|
3
|
-
import { Menu } from './chunk-
|
|
3
|
+
import { Menu } from './chunk-QHUKJN33.js';
|
|
4
4
|
import { isApplePlatform, Kbd, ariaKeyshortcuts } from './chunk-VBBLHS2Y.js';
|
|
5
|
-
import { Button } from './chunk-
|
|
6
|
-
import { IconButton } from './chunk-
|
|
7
|
-
import { Tooltip } from './chunk-
|
|
5
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
6
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
7
|
+
import { Tooltip } from './chunk-HXVMXH6U.js';
|
|
8
8
|
import { returnFocus } from './chunk-4ITETIGZ.js';
|
|
9
9
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
10
10
|
import './ArtifactKinds-27TE3KJL.css';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Note } from './chunk-5SZGKSGL.js';
|
|
2
|
-
import { CanvasToolbar, toolForKey } from './chunk-
|
|
3
|
-
import { IDENTITY_VIEW, Canvas } from './chunk-
|
|
4
|
-
import { IconButton } from './chunk-
|
|
2
|
+
import { CanvasToolbar, toolForKey } from './chunk-5SV47YN7.js';
|
|
3
|
+
import { IDENTITY_VIEW, Canvas } from './chunk-DKDSBI75.js';
|
|
4
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './CanvasBoard-U6LR5F6H.css';
|
|
7
7
|
import { useState, useRef, useImperativeHandle, useCallback, useMemo, useEffect } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRoving, tabStop } from './chunk-EGMQURBR.js';
|
|
2
2
|
import { StatusDot } from './chunk-QRE6JCHS.js';
|
|
3
|
-
import { Menu } from './chunk-
|
|
3
|
+
import { Menu } from './chunk-QHUKJN33.js';
|
|
4
4
|
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
5
5
|
import { Count } from './chunk-Y5CMDLQM.js';
|
|
6
6
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useClipboard } from './chunk-STJ7QBC3.js';
|
|
2
|
-
import { Button } from './chunk-
|
|
3
|
-
import { IconButton } from './chunk-
|
|
2
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
3
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
4
4
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './Copyable-P5AMRHFX.css';
|
|
7
7
|
import { useCallback } from 'react';
|
|
8
8
|
import { CheckGlyph, CircleAlertGlyph, CopyGlyph } from '@crewlethq/icons/glyphs';
|
|
9
|
-
import {
|
|
9
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
function copyGlyph(state) {
|
|
12
12
|
if (state === "copied") return /* @__PURE__ */ jsx(CheckGlyph, { size: "sm" });
|
|
@@ -113,4 +113,4 @@ var Copyable = ({
|
|
|
113
113
|
);
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
export { CopyButton, Copyable };
|
|
116
|
+
export { CopyButton, CopyStatus, Copyable, copyGlyph };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FileDrop, FilePickButton } from './chunk-
|
|
1
|
+
import { FileDrop, FilePickButton } from './chunk-BLFHFMXQ.js';
|
|
2
2
|
import { contrastRatio } from './chunk-3YOLD7WG.js';
|
|
3
3
|
import { normalizeHex } from './chunk-7W3LYIOC.js';
|
|
4
|
-
import { Button } from './chunk-
|
|
4
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
7
|
import './LogoSlot-LRHO4R54.css';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SECRET_INPUT_PROPS } from './chunk-NICEDVZM.js';
|
|
2
2
|
import { useFieldError, FormFieldInvalidContext } from './chunk-JLKO7PSK.js';
|
|
3
|
+
import { copyTextStyles } from './chunk-PJV5HVZY.js';
|
|
3
4
|
import { characterCountState, CharacterCount } from './chunk-TEXK4RK6.js';
|
|
4
|
-
import { IconButton } from './chunk-
|
|
5
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
5
6
|
import { isComposing } from './chunk-EDPMHSLZ.js';
|
|
6
7
|
import { useFocusModality } from './chunk-4ITETIGZ.js';
|
|
7
8
|
import { useHeadingLevel, headingTag, HeadingLevelProvider, nextHeadingLevel } from './chunk-PQADV6P6.js';
|
|
@@ -95,33 +96,6 @@ var LINE_BREAKS = /[ \t]*(?:\r\n|[\r\n\v\f\u0085\u2028\u2029])+[ \t]*/g;
|
|
|
95
96
|
function foldLineBreaks(text) {
|
|
96
97
|
return text.replace(LINE_BREAKS, " ");
|
|
97
98
|
}
|
|
98
|
-
var MIRRORED = [
|
|
99
|
-
"boxSizing",
|
|
100
|
-
"width",
|
|
101
|
-
"paddingTop",
|
|
102
|
-
"paddingRight",
|
|
103
|
-
"paddingBottom",
|
|
104
|
-
"paddingLeft",
|
|
105
|
-
"borderTopWidth",
|
|
106
|
-
"borderRightWidth",
|
|
107
|
-
"borderBottomWidth",
|
|
108
|
-
"borderLeftWidth",
|
|
109
|
-
"borderStyle",
|
|
110
|
-
"fontFamily",
|
|
111
|
-
"fontSize",
|
|
112
|
-
"fontStyle",
|
|
113
|
-
"fontVariant",
|
|
114
|
-
"fontWeight",
|
|
115
|
-
"letterSpacing",
|
|
116
|
-
"lineHeight",
|
|
117
|
-
"tabSize",
|
|
118
|
-
"textIndent",
|
|
119
|
-
"textTransform",
|
|
120
|
-
"whiteSpace",
|
|
121
|
-
"wordBreak",
|
|
122
|
-
"wordSpacing",
|
|
123
|
-
"overflowWrap"
|
|
124
|
-
];
|
|
125
99
|
var mirrors = /* @__PURE__ */ new WeakMap();
|
|
126
100
|
function mirrorIn(doc) {
|
|
127
101
|
let mirror = mirrors.get(doc);
|
|
@@ -151,7 +125,7 @@ function contentHeight(el) {
|
|
|
151
125
|
const style = getComputedStyle(el);
|
|
152
126
|
if (!style.width.endsWith("px")) return null;
|
|
153
127
|
const mirror = mirrorIn(el.ownerDocument);
|
|
154
|
-
|
|
128
|
+
copyTextStyles(style, mirror);
|
|
155
129
|
mirror.rows = el.rows;
|
|
156
130
|
mirror.placeholder = el.placeholder;
|
|
157
131
|
mirror.value = el.value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContrastLevelTag } from './chunk-3YOLD7WG.js';
|
|
2
|
-
import { Popover } from './chunk-
|
|
3
|
-
import { IconButton } from './chunk-
|
|
2
|
+
import { Popover } from './chunk-KDRJZWE3.js';
|
|
3
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './ContrastHelp-MZCAW5WQ.css';
|
|
6
6
|
import { InfoGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { changeText, sheetLabels } from './chunk-LFSIKGRQ.js';
|
|
2
|
-
import { Tooltip } from './chunk-
|
|
2
|
+
import { Tooltip } from './chunk-HXVMXH6U.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './ChangeMark-KFDGBF6G.css';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Select } from './chunk-JUZOMYOZ.js';
|
|
2
|
-
import { Modal } from './chunk-
|
|
3
|
-
import { CopyButton } from './chunk-
|
|
2
|
+
import { Modal } from './chunk-A2TYEOB4.js';
|
|
3
|
+
import { CopyButton } from './chunk-T2RRTICC.js';
|
|
4
4
|
import { Callout } from './chunk-BPCY7ZID.js';
|
|
5
5
|
import { PrincipalAvatar } from './chunk-HF5L56YQ.js';
|
|
6
6
|
import { useMediaMatch } from './chunk-COS6LJ4K.js';
|
|
7
|
-
import { Button } from './chunk-
|
|
8
|
-
import { IconButton } from './chunk-
|
|
7
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
8
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
9
9
|
import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
|
|
10
10
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
11
11
|
import './ShareDialog-72VTMM4K.css';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Modal } from './chunk-
|
|
1
|
+
import { Modal } from './chunk-A2TYEOB4.js';
|
|
2
2
|
import { useClipboard } from './chunk-STJ7QBC3.js';
|
|
3
3
|
import { EmptyValue } from './chunk-WGLOH33S.js';
|
|
4
4
|
import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
|
|
5
|
-
import { Checkbox } from './chunk-
|
|
6
|
-
import { Menu } from './chunk-
|
|
7
|
-
import { Button } from './chunk-
|
|
8
|
-
import { IconButton } from './chunk-
|
|
5
|
+
import { Checkbox } from './chunk-DTEDUAEW.js';
|
|
6
|
+
import { Menu } from './chunk-QHUKJN33.js';
|
|
7
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
8
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
9
9
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
10
10
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
11
11
|
import './DataTable-GSLDFY5U.css';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { today, CalendarGrid, shiftMonth, compareDays } from './chunk-EE3DJMSQ.js';
|
|
2
|
-
import { Popover } from './chunk-
|
|
3
|
-
import { Button } from './chunk-
|
|
4
|
-
import { IconButton } from './chunk-
|
|
2
|
+
import { Popover } from './chunk-KDRJZWE3.js';
|
|
3
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
4
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
5
5
|
import { useFocusModality } from './chunk-4ITETIGZ.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
7
|
import './DateTimePicker-PM6TIRIX.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Callout } from './chunk-BPCY7ZID.js';
|
|
2
|
-
import { Button } from './chunk-
|
|
2
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
3
3
|
import { isComposing } from './chunk-EDPMHSLZ.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import { useEffect } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Modal } from './chunk-
|
|
1
|
+
import { Modal } from './chunk-A2TYEOB4.js';
|
|
2
2
|
import { useListbox, useHighlightRest } from './chunk-KW7T23RT.js';
|
|
3
|
-
import { Input } from './chunk-
|
|
3
|
+
import { Input } from './chunk-TE3OMB3Z.js';
|
|
4
4
|
import { Kbd } from './chunk-VBBLHS2Y.js';
|
|
5
5
|
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
6
6
|
import { isComposing } from './chunk-EDPMHSLZ.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Skeleton } from './chunk-
|
|
1
|
+
import { Skeleton } from './chunk-BMTNY3FK.js';
|
|
2
2
|
import { titleWhenCut, titleIfCut } from './chunk-WSIJDWUG.js';
|
|
3
3
|
import { useReorder } from './chunk-JMBPMSNI.js';
|
|
4
|
-
import { Checkbox } from './chunk-
|
|
4
|
+
import { Checkbox } from './chunk-DTEDUAEW.js';
|
|
5
5
|
import { useMediaMatch } from './chunk-COS6LJ4K.js';
|
|
6
6
|
import { EmptyState } from './chunk-PPUR46MK.js';
|
|
7
|
-
import { Button } from './chunk-
|
|
8
|
-
import { IconButton } from './chunk-
|
|
7
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
8
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
9
9
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
10
10
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
11
11
|
import './DataGrid-YNLCEH3E.css';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Select } from './chunk-JUZOMYOZ.js';
|
|
2
2
|
import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-EE3DJMSQ.js';
|
|
3
|
-
import { Popover } from './chunk-
|
|
4
|
-
import { Input } from './chunk-
|
|
5
|
-
import { Button } from './chunk-
|
|
6
|
-
import { IconButton } from './chunk-
|
|
3
|
+
import { Popover } from './chunk-KDRJZWE3.js';
|
|
4
|
+
import { Input } from './chunk-TE3OMB3Z.js';
|
|
5
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
6
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
7
7
|
import { isComposing } from './chunk-EDPMHSLZ.js';
|
|
8
8
|
import { useFocusModality } from './chunk-4ITETIGZ.js';
|
|
9
9
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PrincipalAvatar } from './chunk-HF5L56YQ.js';
|
|
2
2
|
import { toInstant, RelativeTime, formatExact, toISO } from './chunk-GBKBME7Q.js';
|
|
3
3
|
import { Document } from './chunk-I4PBFJGX.js';
|
|
4
|
-
import { Composer } from './chunk-
|
|
5
|
-
import { Button } from './chunk-
|
|
6
|
-
import { IconButton } from './chunk-
|
|
4
|
+
import { Composer } from './chunk-KVNVLBCB.js';
|
|
5
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
6
|
+
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
7
7
|
import { Count } from './chunk-Y5CMDLQM.js';
|
|
8
8
|
import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
|
|
9
9
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
1
|
+
import { Button } from './chunk-NPPPQSRU.js';
|
|
2
|
+
import { Tooltip } from './chunk-HXVMXH6U.js';
|
|
2
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
4
|
import { forwardRef, useState, useCallback } from 'react';
|
|
4
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
6
|
|
|
6
7
|
var CHAT_MESSAGE_CLASS = "crewlet-chat-message";
|
|
8
|
+
function landOn(row) {
|
|
9
|
+
row.scrollIntoView?.({ block: "nearest" });
|
|
10
|
+
row.focus({ preventScroll: true });
|
|
11
|
+
}
|
|
7
12
|
function scrollerOf(element) {
|
|
8
13
|
for (let node = element.parentElement; node; node = node.parentElement) {
|
|
9
14
|
const { overflowY } = getComputedStyle(node);
|
|
@@ -55,15 +60,21 @@ var ChatMessage = forwardRef(function ChatMessage2({
|
|
|
55
60
|
function keys(event) {
|
|
56
61
|
onKeyDown?.(event);
|
|
57
62
|
if (event.defaultPrevented || event.target !== event.currentTarget) return;
|
|
58
|
-
if (event.
|
|
63
|
+
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
|
|
59
64
|
const row = event.currentTarget;
|
|
60
65
|
const within = row.closest('[role="log"]') ?? row.parentElement;
|
|
61
66
|
if (!within) return;
|
|
62
67
|
const rows = [...within.querySelectorAll(`.${CHAT_MESSAGE_CLASS}`)];
|
|
63
|
-
const
|
|
68
|
+
const at = rows.indexOf(row);
|
|
69
|
+
let next;
|
|
70
|
+
if (event.key === "ArrowUp") next = rows[at - 1];
|
|
71
|
+
else if (event.key === "ArrowDown") next = rows[at + 1];
|
|
72
|
+
else if (event.key === "Home") next = rows[0];
|
|
73
|
+
else if (event.key === "End") next = rows.at(-1);
|
|
74
|
+
else return;
|
|
64
75
|
if (!next) return;
|
|
65
76
|
event.preventDefault();
|
|
66
|
-
next
|
|
77
|
+
landOn(next);
|
|
67
78
|
}
|
|
68
79
|
return (
|
|
69
80
|
// A row is an article a reader can land on (a tap, a jump, the arrows)
|
|
@@ -99,12 +110,12 @@ var ChatMessage = forwardRef(function ChatMessage2({
|
|
|
99
110
|
onFocus?.(event);
|
|
100
111
|
},
|
|
101
112
|
children: [
|
|
102
|
-
/* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__gutter", children: continuation ? /* @__PURE__ */ jsx(
|
|
113
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__gutter", children: continuation ? /* @__PURE__ */ jsx(MessageTime, { className: "crewlet-chat-message__gutter-time", dateTime, full: timeTitle, children: gutterTime ?? time }) : avatar }),
|
|
103
114
|
/* @__PURE__ */ jsxs("div", { className: "crewlet-chat-message__main", children: [
|
|
104
115
|
continuation ? null : /* @__PURE__ */ jsxs("div", { className: "crewlet-chat-message__head", children: [
|
|
105
116
|
/* @__PURE__ */ jsx("span", { className: "crewlet-chat-message__author", children: author }),
|
|
106
117
|
badges,
|
|
107
|
-
/* @__PURE__ */ jsx(
|
|
118
|
+
/* @__PURE__ */ jsx(MessageTime, { className: "crewlet-chat-message__time", dateTime, full: timeTitle, children: time })
|
|
108
119
|
] }),
|
|
109
120
|
/* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__body", children }),
|
|
110
121
|
footer ? /* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__footer", children: footer }) : null
|
|
@@ -115,6 +126,9 @@ var ChatMessage = forwardRef(function ChatMessage2({
|
|
|
115
126
|
)
|
|
116
127
|
);
|
|
117
128
|
});
|
|
129
|
+
function MessageTime({ className, dateTime, full, children }) {
|
|
130
|
+
return /* @__PURE__ */ jsx(Tooltip, { content: full, children: /* @__PURE__ */ jsx("time", { className, dateTime, tabIndex: 0, children }) });
|
|
131
|
+
}
|
|
118
132
|
var CHAT_MESSAGE_FAILURE_LABELS = {
|
|
119
133
|
notSent: "Not sent.",
|
|
120
134
|
retry: "Retry",
|