@crewlethq/ui 0.31.1 → 0.33.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 +151 -5
- package/dist/AccessDeniedCard/AccessDeniedCard.d.ts +5 -0
- package/dist/AccessDeniedCard/index.js +1 -5
- package/dist/AccessDeniedCard-QVNDMT46.css +8 -0
- package/dist/AppShell/index.js +4 -4
- package/dist/{AppShell-GCM4TDVY.css → AppShell-JTSEOA57.css} +3 -1
- package/dist/ArrangeGroup/ArrangeGroup.d.ts +16 -1
- package/dist/ArrangeGroup/index.d.ts +1 -1
- package/dist/ArrangeGroup/index.js +1 -1
- package/dist/{ArrangeGroup-GY5YMP6E.css → ArrangeGroup-KRWWOJKR.css} +43 -0
- package/dist/ArrangeList/index.js +2 -2
- package/dist/ArtifactBar/index.js +12 -12
- package/dist/{ArtifactBar-MLMJHWY6.css → ArtifactBar-C462VD4C.css} +8 -3
- package/dist/ArtifactCard/ArtifactCard.d.ts +19 -1
- package/dist/ArtifactCard/index.d.ts +1 -1
- package/dist/ArtifactCard/index.js +4 -4
- package/dist/{ArtifactCard-EXVAEBV6.css → ArtifactCard-AS5Z4CVI.css} +17 -2
- package/dist/ArtifactCover/index.js +6 -6
- package/dist/ArtifactIcon/index.js +5 -5
- package/dist/ArtifactPanel/ArtifactPanel.d.ts +6 -2
- package/dist/ArtifactPanel/index.js +1 -1
- package/dist/{ArtifactPanel-YFXT5O77.css → ArtifactPanel-HW3SU7CP.css} +25 -7
- package/dist/Avatar/Avatar.d.ts +6 -4
- package/dist/Avatar/index.js +2 -2
- package/dist/AvatarPicker/index.js +8 -8
- package/dist/Callout/index.js +1 -1
- package/dist/{Callout-SXXK4B5R.css → Callout-ZAVG3P66.css} +46 -6
- package/dist/Canvas/Canvas.d.ts +81 -4
- package/dist/Canvas/ShortcutTip.d.ts +22 -0
- package/dist/Canvas/geometry.d.ts +13 -3
- package/dist/Canvas/index.d.ts +4 -2
- package/dist/Canvas/index.js +5 -3
- package/dist/{Canvas-YVXHMWLN.css → Canvas-VUG2HLZK.css} +62 -3
- package/dist/CanvasBoard/CanvasBoard.d.ts +110 -12
- package/dist/CanvasBoard/budget.d.ts +9 -3
- package/dist/CanvasBoard/index.d.ts +2 -2
- package/dist/CanvasBoard/index.js +9 -5
- package/dist/CanvasBoard-5NNSKY6A.css +462 -0
- package/dist/CanvasToolbar/CanvasToolbar.d.ts +48 -0
- package/dist/CanvasToolbar/index.d.ts +3 -0
- package/dist/CanvasToolbar/index.js +12 -0
- package/dist/CanvasToolbar-EM5EVZED.css +34 -0
- package/dist/ChangeMark/index.js +4 -4
- package/dist/CharacterPicker/index.js +2 -2
- package/dist/Charts/ActivityStrip.d.ts +16 -1
- package/dist/Charts/BarList.d.ts +6 -0
- package/dist/Charts/ChartEmpty.d.ts +33 -0
- package/dist/Charts/Legend.d.ts +6 -0
- package/dist/Charts/StackedBar.d.ts +4 -1
- package/dist/Charts/StackedColumns.d.ts +14 -3
- package/dist/Charts/TimeSeries.d.ts +11 -1
- package/dist/Charts/index.d.ts +2 -0
- package/dist/Charts/index.js +1 -1
- package/dist/{Charts-RY4JN5FC.css → Charts-MBJG72BS.css} +140 -16
- package/dist/Checkbox/index.js +1 -1
- package/dist/{Checkbox-5UORUG3F.css → Checkbox-ALWG3WV2.css} +11 -0
- package/dist/CommandPalette/index.js +3 -3
- package/dist/{CommandPalette-HBTNKHZQ.css → CommandPalette-7CFGVBND.css} +4 -0
- package/dist/CommentThread/index.js +5 -5
- package/dist/Container/index.js +1 -1
- package/dist/{Container-3TSKMGNI.css → Container-34BAKG7B.css} +3 -1
- package/dist/{DashboardCover-RMINBODB.css → DashboardCover-KYGYMRKW.css} +42 -9
- package/dist/DataTable/index.js +5 -5
- package/dist/{DataTable-WZK3V62B.css → DataTable-NL2YWAIA.css} +4 -1
- package/dist/DataView/index.js +9 -9
- package/dist/DateTimePicker/index.js +3 -3
- package/dist/DocTabsEditor/DocTabsEditor.d.ts +34 -21
- package/dist/DocTabsEditor/index.js +4 -1
- package/dist/DocTabsEditor-4M452LNS.css +189 -0
- package/dist/Document/Document.d.ts +18 -1
- package/dist/Document/index.d.ts +2 -2
- package/dist/Document/index.js +1 -1
- package/dist/{Document-G3YTZIUL.css → Document-JUGCSQ4L.css} +78 -5
- package/dist/EditingStatus/index.js +1 -1
- package/dist/{EditingStatus-L6THUAN7.css → EditingStatus-NNA2CKIL.css} +17 -4
- package/dist/{Editor-YZ7KG2RD.js → Editor-UUZ7XKCU.js} +5 -5
- package/dist/EntityChip/index.js +3 -3
- package/dist/FactList/index.js +3 -3
- package/dist/FollowBanner/index.js +3 -3
- package/dist/Fullscreen/index.d.ts +1 -0
- package/dist/Fullscreen/index.js +1 -1
- package/dist/Fullscreen/useIdle.d.ts +16 -0
- package/dist/HuePicker/index.js +3 -3
- package/dist/ImageUpload/index.js +3 -3
- package/dist/Layer/index.d.ts +1 -1
- package/dist/Layer/index.js +1 -1
- package/dist/Layer/place.d.ts +18 -0
- package/dist/LayersList/LayersList.d.ts +57 -0
- package/dist/LayersList/index.d.ts +3 -0
- package/dist/LayersList/index.js +3 -0
- package/dist/LayersList-NQZEIPZB.css +82 -0
- package/dist/LinkInterstitial/index.js +4 -4
- package/dist/ListInput/index.js +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/MarkdownEditor/index.js +5 -5
- package/dist/MediaMatch/index.d.ts +1 -0
- package/dist/MediaMatch/index.js +1 -0
- package/dist/MediaMatch/useMediaMatch.d.ts +19 -0
- package/dist/Menu/index.js +2 -2
- package/dist/MergeConflicts/index.js +4 -4
- package/dist/Modal/index.js +2 -2
- package/dist/{Modal-XOSV6FAH.css → Modal-7MWRCWAI.css} +30 -0
- package/dist/Note/index.js +1 -1
- package/dist/{Note-ONSKKTOA.css → Note-WI5MLZOO.css} +13 -0
- package/dist/OrgLabel/index.js +3 -3
- package/dist/OrgNode/index.js +4 -4
- package/dist/OrgTable/index.js +7 -7
- package/dist/PeopleRail/index.js +3 -3
- package/dist/Popover/index.js +2 -2
- package/dist/PresenceStack/index.js +3 -3
- package/dist/{PresenceStack-QSXQJND5.css → PresenceStack-FJJQVH74.css} +11 -3
- package/dist/PresenterView/PresenterView.d.ts +3 -0
- package/dist/PresenterView/index.js +5 -3
- package/dist/PresenterView-T3EXIQ5S.css +147 -0
- package/dist/Principal/index.js +3 -3
- package/dist/PrincipalPicker/index.js +4 -4
- package/dist/RichEditor/index.js +5 -5
- package/dist/RichEditor/schema.d.ts +1 -1
- package/dist/RichEditorMarkdown/index.js +3 -3
- package/dist/SandboxedFrame/SandboxedFrame.d.ts +44 -2
- package/dist/SandboxedFrame/index.d.ts +2 -2
- package/dist/SandboxedFrame/index.js +3 -3
- package/dist/SandboxedFrame-P5NASXB7.css +72 -0
- package/dist/Section/index.js +1 -1
- package/dist/{Section-QR3ILQVK.css → Section-O5AHGSOG.css} +28 -5
- package/dist/SegmentedControl/index.js +3 -3
- package/dist/Select/index.js +2 -2
- package/dist/ShareDialog/ShareDialog.d.ts +10 -0
- package/dist/ShareDialog/index.js +9 -9
- package/dist/{ShareDialog-YZ4F37MW.css → ShareDialog-4QDCBWMH.css} +12 -0
- package/dist/SheetGrid/SheetGrid.d.ts +3 -1
- package/dist/SheetGrid/index.js +10 -10
- package/dist/{SheetGrid-J3TKKXZL.css → SheetGrid-AKPUCK67.css} +106 -7
- package/dist/SheetModel/fit.d.ts +34 -0
- package/dist/SheetModel/index.d.ts +1 -0
- package/dist/SheetModel/index.js +1 -1
- package/dist/Shortcut/index.js +1 -1
- package/dist/Skeleton/Skeleton.d.ts +2 -1
- package/dist/Skeleton/index.js +1 -1
- package/dist/SlideCompare/SlideCompare.d.ts +6 -1
- package/dist/SlideCompare/index.js +3 -3
- package/dist/{SlideCompare-MGM3U2ME.css → SlideCompare-HTCMPQFY.css} +36 -3
- package/dist/SlideFilmstrip/SlideFilmstrip.d.ts +14 -3
- package/dist/SlideFilmstrip/index.js +3 -3
- package/dist/{SlideFilmstrip-BCLNAHFX.css → SlideFilmstrip-5U6Z55GS.css} +63 -2
- package/dist/SlideGrid/index.js +3 -3
- package/dist/{SlideGrid-RT6QEQEE.css → SlideGrid-S4LTJ4UU.css} +9 -5
- package/dist/SlideNav/SlideNav.d.ts +49 -0
- package/dist/SlideNav/index.d.ts +3 -0
- package/dist/SlideNav/index.js +4 -0
- package/dist/SlideNav-BLFJF6AH.css +53 -0
- package/dist/SlideStage/SlideStage.d.ts +14 -1
- package/dist/SlideStage/index.js +2 -2
- package/dist/{SlideStage-KGRRALXR.css → SlideStage-S2FISF4C.css} +23 -0
- package/dist/StatCard/StatCard.d.ts +16 -1
- package/dist/StatCard/index.js +1 -1
- package/dist/{StatCard-KPAFD4E2.css → StatCard-4T7TMWMN.css} +40 -13
- package/dist/Switcher/index.js +6 -6
- package/dist/TableCells/index.js +3 -3
- package/dist/Tabs/Tabs.d.ts +21 -4
- package/dist/Tabs/index.js +1 -1
- package/dist/{Tabs-CJGO35BH.css → Tabs-MMZXV5EF.css} +9 -8
- package/dist/TagsInput/index.js +1 -1
- package/dist/ThemeSwitcher/index.js +4 -4
- package/dist/TimeWindowPicker/index.js +4 -4
- package/dist/Toaster/index.js +2 -2
- package/dist/{Toaster-EOOOTSJT.css → Toaster-C6BQ7L6I.css} +10 -1
- package/dist/Toolbar/index.js +1 -1
- package/dist/Tooltip/index.js +2 -2
- package/dist/TreeCanvas/index.js +6 -4
- package/dist/TreeGrid/index.js +3 -3
- package/dist/VersionCompare/index.js +4 -4
- package/dist/VersionTimeline/index.js +4 -4
- package/dist/WidgetFrame/WidgetFrame.d.ts +8 -1
- package/dist/WidgetFrame/index.js +2 -2
- package/dist/{WidgetFrame-LRZIL62O.css → WidgetFrame-BTFW3CRK.css} +49 -5
- package/dist/{chunk-OJ45PPCV.js → chunk-22UEIXZE.js} +127 -32
- package/dist/{chunk-UZ6MA2V6.js → chunk-2DHMVB5J.js} +2 -2
- package/dist/{chunk-WJDQ7XQA.js → chunk-2QEDJSJC.js} +1 -1
- package/dist/{chunk-2HIOJ4YZ.js → chunk-3EB2AV3H.js} +2 -3
- package/dist/{chunk-ODT5H4MN.js → chunk-3LYWD3BO.js} +2 -2
- package/dist/{chunk-FAQGGX2Z.js → chunk-3TFDQLW3.js} +1 -1
- package/dist/{chunk-VYDFB6PJ.js → chunk-3U7S6ZUN.js} +50 -17
- package/dist/{chunk-A4E5YLXO.js → chunk-4B6LSFDS.js} +1 -1
- package/dist/{chunk-S6VG5ZFZ.js → chunk-4IJS5CPF.js} +1 -1
- package/dist/{chunk-UAN5NE7M.js → chunk-5AQBPHZD.js} +1 -1
- package/dist/{chunk-QWOPX2MN.js → chunk-5FYPE5GL.js} +2 -3
- package/dist/{chunk-CJKMURZO.js → chunk-5SZGKSGL.js} +1 -1
- package/dist/chunk-6VOS2GMB.js +54 -0
- package/dist/{chunk-RODMM35O.js → chunk-7Q7WDXHG.js} +5 -5
- package/dist/{chunk-JI5AVQLA.js → chunk-7WHDPLVJ.js} +1 -1
- package/dist/{chunk-QH3AKP2N.js → chunk-AC22RZKC.js} +2 -2
- package/dist/{chunk-ZITJKF6Z.js → chunk-AYB6AYNH.js} +1 -1
- package/dist/{chunk-Y5NQ2LMS.js → chunk-BY4N65PM.js} +1 -1
- package/dist/{chunk-YFW4MTK4.js → chunk-C7DKX453.js} +1 -1
- package/dist/{chunk-RCQXUT5K.js → chunk-CCAXYHQS.js} +1 -1
- package/dist/{chunk-4KP4RC3O.js → chunk-CI3VPIJN.js} +1 -1
- package/dist/{chunk-7T42VQQT.js → chunk-CPEPST4S.js} +1 -1
- package/dist/{chunk-AAOH2P6Y.js → chunk-DFK5EQTU.js} +5 -3
- package/dist/{chunk-GOSQXEZU.js → chunk-DFZMYB5X.js} +16 -10
- package/dist/{chunk-TGYDROIB.js → chunk-EBCHVFCS.js} +4 -4
- package/dist/{chunk-YDBC4DNW.js → chunk-FWYHRU7M.js} +1 -1
- package/dist/{chunk-CT4EZF62.js → chunk-G4ZW7A2W.js} +125 -33
- package/dist/chunk-GLSOD5Z4.js +33 -0
- package/dist/{chunk-LIXSV5YI.js → chunk-GPHWCK7M.js} +1 -1
- package/dist/{chunk-UQHKFF2N.js → chunk-GPWJCP3U.js} +1 -1
- package/dist/{chunk-77DRMDXR.js → chunk-HG5VF3TZ.js} +192 -67
- package/dist/{chunk-4JUKWWUD.js → chunk-HH2GKAAE.js} +1 -1
- package/dist/{chunk-QVE4GJAT.js → chunk-HJO4WCH6.js} +1 -1
- package/dist/{chunk-I3BSQUKN.js → chunk-HUVG2FFT.js} +1 -1
- package/dist/{chunk-3C3BRIMY.js → chunk-ILAEBSLJ.js} +3 -3
- package/dist/{chunk-GR55WT4R.js → chunk-IYO2N5ZH.js} +2 -2
- package/dist/{chunk-RWA4H2TV.js → chunk-J6ON5SYE.js} +1 -1
- package/dist/{chunk-NHBP2XS5.js → chunk-J6ZSH3F5.js} +49 -1
- package/dist/{chunk-AMNN4WDX.js → chunk-JBUMD6DS.js} +2 -2
- package/dist/{chunk-BWRGFKJP.js → chunk-K3IJQNB7.js} +2 -3
- package/dist/{chunk-LFNUH4GY.js → chunk-K4VP6ZKE.js} +1 -1
- package/dist/{chunk-ZR5VN5IV.js → chunk-KD2IRYCT.js} +2 -2
- package/dist/{chunk-SKOYC2CF.js → chunk-KK5OYNAF.js} +2 -1
- package/dist/{chunk-UB7TJEKZ.js → chunk-KV3ODJXH.js} +6 -7
- package/dist/chunk-LL5AFXU7.js +96 -0
- package/dist/{chunk-VYOKRN2I.js → chunk-LM3ISVJA.js} +1 -1
- package/dist/{chunk-O63MWA4G.js → chunk-LV4APO72.js} +10 -3
- package/dist/{chunk-B4EBHPK3.js → chunk-M5KZX5JE.js} +9 -2
- package/dist/{chunk-JODJS7MR.js → chunk-MDNVHIB2.js} +276 -47
- package/dist/{chunk-VOX3YRFO.js → chunk-MTMKIUWF.js} +4 -4
- package/dist/{chunk-HVNTQ36V.js → chunk-O37AQNLK.js} +4 -4
- package/dist/{chunk-HMPFGIWM.js → chunk-OMV5W53A.js} +10 -1
- package/dist/chunk-ONL54WMH.js +55 -0
- package/dist/{chunk-AKEZ3G5V.js → chunk-ONQKKHON.js} +1 -1
- package/dist/{chunk-LZHLSQYK.js → chunk-OOWPSBIS.js} +2 -2
- package/dist/{chunk-JQLTG4KH.js → chunk-ORT5IKHP.js} +62 -51
- package/dist/{chunk-4KWOKX2B.js → chunk-OSKJZNBT.js} +1 -1
- package/dist/{chunk-EHQTPVV4.js → chunk-PLTCDSTU.js} +1 -1
- package/dist/{chunk-5OM447RW.js → chunk-PZKHBB7D.js} +1 -1
- package/dist/{chunk-VEB5ERRE.js → chunk-QWNVSR6G.js} +2 -2
- package/dist/{chunk-IG75YMUN.js → chunk-RTPQDNW3.js} +1 -1
- package/dist/{chunk-SVSCLHHI.js → chunk-SZZRIHGT.js} +1 -1
- package/dist/{chunk-EBNI36UQ.js → chunk-T46NR3WP.js} +3 -3
- package/dist/{chunk-FPS3JIPQ.js → chunk-TC7DJTXI.js} +1 -1
- package/dist/{chunk-W5J7R5EB.js → chunk-TEUQWOWZ.js} +1 -1
- package/dist/chunk-THROPJZC.js +115 -0
- package/dist/{chunk-IDBHX5SR.js → chunk-TRQCHF2F.js} +1 -1
- package/dist/{chunk-M3LUNN7F.js → chunk-TYKQ33CL.js} +13 -2
- package/dist/{chunk-VVRL27HM.js → chunk-ULPL26BU.js} +2 -2
- package/dist/{chunk-6AH2XJ3Q.js → chunk-UNXLTJU7.js} +3 -3
- package/dist/{chunk-FC4YTTFJ.js → chunk-UQGFHNDI.js} +2 -3
- package/dist/{chunk-EBJREOKS.js → chunk-UXXJDIYE.js} +4 -4
- package/dist/{chunk-5LUI3WQP.js → chunk-V43UVX4H.js} +1 -1
- package/dist/{chunk-W4XYY73O.js → chunk-VHZ3AXJD.js} +1 -1
- package/dist/{chunk-HJEVSQN6.js → chunk-VL6CUNSX.js} +11 -5
- package/dist/{chunk-XDTYBF2F.js → chunk-W5XCNEZC.js} +39 -1
- package/dist/{chunk-LDJ3J4TQ.js → chunk-WGD2HX2A.js} +1 -1
- package/dist/{chunk-FQCLKD7U.js → chunk-WKEPORNM.js} +1 -1
- package/dist/{chunk-I3KKZ2O3.js → chunk-XEGZHHRH.js} +45 -36
- package/dist/{chunk-IKB6HFGK.js → chunk-XO7PUL4F.js} +6 -4
- package/dist/chunk-XV32RKQZ.js +142 -0
- package/dist/{chunk-TBMDMXEX.js → chunk-YA3AWELW.js} +1 -1
- package/dist/{chunk-HVIX5ECM.js → chunk-YEVG2X5R.js} +1 -1
- package/dist/chunk-YZFLH463.js +215 -0
- package/dist/{chunk-P4BOXB6E.js → chunk-Z6GFMI2Z.js} +6 -7
- package/dist/{chunk-YEKYVJQR.js → chunk-ZNBLFCQS.js} +2 -2
- package/dist/generated/index.d.ts +4 -0
- package/dist/generated/index.js +107 -104
- package/dist/index.js +107 -104
- package/dist/styles.css +1648 -235
- package/package.json +3 -3
- package/dist/AccessDeniedCard-WXM5DBDZ.css +0 -8
- package/dist/CanvasBoard-ZLPDINSM.css +0 -236
- package/dist/DocTabsEditor-RCOWHX5J.css +0 -78
- package/dist/PresenterView-T2C6ZZ3N.css +0 -103
- package/dist/SandboxedFrame-L6HBQZCD.css +0 -50
- package/dist/chunk-ALMSY7RL.js +0 -74
- package/dist/chunk-LR5QTFOE.js +0 -105
- package/dist/chunk-OGAAHVF6.js +0 -107
- package/dist/chunk-UZ7ZUSLH.js +0 -179
- package/dist/utils/useMediaMatch.d.ts +0 -12
- /package/dist/{chunk-OC46246T.js → chunk-2JJIN6JN.js} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Select } from './chunk-
|
|
1
|
+
import { Select } from './chunk-UQGFHNDI.js';
|
|
2
2
|
import { CopyButton } from './chunk-W46LPU4R.js';
|
|
3
|
-
import { Modal } from './chunk-
|
|
4
|
-
import { Callout } from './chunk-
|
|
5
|
-
import { PrincipalAvatar } from './chunk-
|
|
3
|
+
import { Modal } from './chunk-XEGZHHRH.js';
|
|
4
|
+
import { Callout } from './chunk-SZZRIHGT.js';
|
|
5
|
+
import { PrincipalAvatar } from './chunk-CI3VPIJN.js';
|
|
6
6
|
import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
|
|
7
|
-
import { useMediaMatch } from './chunk-
|
|
7
|
+
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
8
8
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
9
9
|
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
10
10
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
11
|
-
import './ShareDialog-
|
|
11
|
+
import './ShareDialog-4QDCBWMH.css';
|
|
12
12
|
import { useState, useId } from 'react';
|
|
13
13
|
import { breakpoint } from '@crewlethq/tokens';
|
|
14
14
|
import { XGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -43,6 +43,7 @@ var LABELS = {
|
|
|
43
43
|
},
|
|
44
44
|
roleFor: (name) => `Role for ${name}`,
|
|
45
45
|
remove: (name) => `Remove ${name}`,
|
|
46
|
+
noAccess: "No access",
|
|
46
47
|
saving: "Saving",
|
|
47
48
|
busy: "Wait for the change to finish.",
|
|
48
49
|
agentNote: (name, role) => `${name} can ${AGENT_CAN[role]}.`,
|
|
@@ -143,52 +144,62 @@ function ShareDialog({
|
|
|
143
144
|
/* @__PURE__ */ jsx(Heading, { id: audienceId, className: "crewlet-share-dialog__heading", children: text.audience }),
|
|
144
145
|
/* @__PURE__ */ jsx("ul", { className: "crewlet-share-dialog__audience", children: audience.map((row) => {
|
|
145
146
|
const direct = row.via === void 0 && row.role !== "owner";
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
const
|
|
147
|
+
const invalid = row.invalid !== void 0 && row.invalid !== "";
|
|
148
|
+
const editable = !invalid && !readOnly && onRoleChange !== void 0 && (row.editable ?? direct);
|
|
149
|
+
const removable = !readOnly && onRemove !== void 0 && (invalid ? row.removable ?? true : row.removable ?? (row.editable ?? direct));
|
|
150
|
+
const rowNote = invalid ? void 0 : row.note ?? (row.principal.kind === "agent" ? text.agentNote(row.principal.name, row.role) : void 0);
|
|
149
151
|
const detail = row.via ?? row.principal.detail;
|
|
150
|
-
return /* @__PURE__ */ jsxs(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
152
|
+
return /* @__PURE__ */ jsxs(
|
|
153
|
+
"li",
|
|
154
|
+
{
|
|
155
|
+
className: cx("crewlet-share-dialog__row", row.pending && "is-pending", invalid && "is-invalid"),
|
|
156
|
+
"aria-busy": row.pending || void 0,
|
|
157
|
+
children: [
|
|
158
|
+
/* @__PURE__ */ jsx(PrincipalAvatar, { principal: row.principal, size: "md" }),
|
|
159
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-share-dialog__who", children: [
|
|
160
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-share-dialog__name", children: [
|
|
161
|
+
row.principal.name,
|
|
162
|
+
row.self ? /* @__PURE__ */ jsxs("span", { className: "crewlet-share-dialog__you", children: [
|
|
163
|
+
" ",
|
|
164
|
+
text.you
|
|
165
|
+
] }) : null
|
|
166
|
+
] }),
|
|
167
|
+
detail ? /* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__detail", children: detail }) : null
|
|
168
|
+
] }),
|
|
169
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-share-dialog__controls", children: [
|
|
170
|
+
row.pending ? /* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__saving", children: text.saving }) : null,
|
|
171
|
+
editable && row.role !== "owner" ? /* @__PURE__ */ jsx(
|
|
172
|
+
Select,
|
|
173
|
+
{
|
|
174
|
+
value: row.role,
|
|
175
|
+
options: roleOptions,
|
|
176
|
+
onChange: (value) => onRoleChange(row, value),
|
|
177
|
+
ariaLabel: text.roleFor(row.principal.name),
|
|
178
|
+
disabled: row.pending ?? false,
|
|
179
|
+
size: "sm",
|
|
180
|
+
width: "auto",
|
|
181
|
+
align: "right"
|
|
182
|
+
}
|
|
183
|
+
) : /* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__role", children: invalid ? text.noAccess : text.roles[row.role] }),
|
|
184
|
+
removable ? /* @__PURE__ */ jsx(
|
|
185
|
+
IconButton,
|
|
186
|
+
{
|
|
187
|
+
label: text.remove(row.principal.name),
|
|
188
|
+
icon: /* @__PURE__ */ jsx(XGlyph, {}),
|
|
189
|
+
size: "sm",
|
|
190
|
+
variant: "ghost",
|
|
191
|
+
disabledReason: row.pending ? text.busy : void 0,
|
|
192
|
+
onClick: () => onRemove(row)
|
|
193
|
+
}
|
|
194
|
+
) : null
|
|
195
|
+
] }),
|
|
196
|
+
rowNote ? /* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__note", children: rowNote }) : null,
|
|
197
|
+
invalid ? /* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__invalid", children: row.invalid }) : null,
|
|
198
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__refusal", "aria-live": "polite", children: row.refusal ?? "" })
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
row.id
|
|
202
|
+
);
|
|
192
203
|
}) })
|
|
193
204
|
] }),
|
|
194
205
|
/* @__PURE__ */ jsxs("section", { className: "crewlet-share-dialog__section", "aria-labelledby": companyId, "aria-busy": companyPending || void 0, children: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { diffLines, diffStat, collapseDiff, DiffSummary, DiffView } from './chunk-BVWSLXTY.js';
|
|
2
|
-
import { SegmentedControl } from './chunk-
|
|
2
|
+
import { SegmentedControl } from './chunk-CCAXYHQS.js';
|
|
3
3
|
import { EmptyState } from './chunk-RA2ULG6H.js';
|
|
4
4
|
import { useHeadingLevel, headingTag, nextHeadingLevel, HeadingLevelProvider } from './chunk-PQADV6P6.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -20,7 +20,7 @@ function avatarInitialsName(name, kind) {
|
|
|
20
20
|
var AVATAR_CHARACTER_FULL_DETAIL = 56;
|
|
21
21
|
var getInitials = (name) => {
|
|
22
22
|
if (!name) return "?";
|
|
23
|
-
const words = name.trim().split(/[\s\-_
|
|
23
|
+
const words = name.trim().split(/[\s\-_.:]+/).map((word2) => word2.replace(/^\p{P}+|\p{P}+$/gu, "")).filter(Boolean);
|
|
24
24
|
if (words.length === 0) return "?";
|
|
25
25
|
const first = (word2) => (Array.from(word2)[0] ?? "").toUpperCase();
|
|
26
26
|
if (words.length >= 2) return words.slice(0, 2).map(first).join("") || "?";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useTreeState, treeExpandable, treeLevel, treePosInSet, treeSetSize, treeItemAction, treePrevious, treeNext, treeStep } from './chunk-MY374UUD.js';
|
|
2
|
-
import { LayerNodeBridge } from './chunk-
|
|
3
|
-
import { LayerHost, LAYER_REPOSITION_EVENT } from './chunk-
|
|
2
|
+
import { LayerNodeBridge } from './chunk-LM3ISVJA.js';
|
|
3
|
+
import { LayerHost, LAYER_REPOSITION_EVENT } from './chunk-OMV5W53A.js';
|
|
4
4
|
import { focusables } from './chunk-R25RGPUB.js';
|
|
5
5
|
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
6
6
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
|
-
import './Callout-
|
|
2
|
+
import './Callout-ZAVG3P66.css';
|
|
3
3
|
import { CircleAlertGlyph, TriangleAlertGlyph, CircleCheckGlyph, InfoGlyph } from '@crewlethq/icons/glyphs';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useMediaMatch } from './chunk-
|
|
2
|
-
import { Menu } from './chunk-
|
|
1
|
+
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
2
|
+
import { Menu } from './chunk-3EB2AV3H.js';
|
|
3
3
|
import { useModalLayer, focusables } from './chunk-R25RGPUB.js';
|
|
4
4
|
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
|
-
import './AppShell-
|
|
7
|
+
import './AppShell-JTSEOA57.css';
|
|
8
8
|
import { createContext, forwardRef, useContext, useId, useState, useRef, useCallback, useEffect, useLayoutEffect } from 'react';
|
|
9
9
|
import { breakpoint } from '@crewlethq/tokens';
|
|
10
10
|
import { ChevronUpGlyph, ChevronsUpDownGlyph, ChevronRightGlyph, MenuGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -30,7 +30,7 @@ var Placeholder = ({
|
|
|
30
30
|
style: {
|
|
31
31
|
height: typeof height === "number" ? `${height}px` : height,
|
|
32
32
|
width: typeof width === "number" ? `${width}px` : width,
|
|
33
|
-
borderRadius: `${borderRadius}px`
|
|
33
|
+
borderRadius: typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius
|
|
34
34
|
},
|
|
35
35
|
children: /* @__PURE__ */ jsx("div", { className: "crewlet-skeleton__glow-wave" })
|
|
36
36
|
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { SlideNav } from './chunk-6VOS2GMB.js';
|
|
2
|
+
import { SlideStage, SLIDE_WIDTH, SLIDE_HEIGHT } from './chunk-LV4APO72.js';
|
|
3
|
+
import { Eyebrow } from './chunk-RK4XPHVG.js';
|
|
4
|
+
import { Button } from './chunk-OG6CL3EB.js';
|
|
5
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
|
+
import './PresenterView-T3EXIQ5S.css';
|
|
7
|
+
import { useRef, useState, useEffect } from 'react';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var LABELS = {
|
|
11
|
+
current: (position, total, title) => `Slide ${position} of ${total}, ${title}`,
|
|
12
|
+
next: (title) => `Next, ${title}`,
|
|
13
|
+
onScreen: "Current",
|
|
14
|
+
upNext: "Next",
|
|
15
|
+
end: "End of the deck",
|
|
16
|
+
notes: "Speaker notes",
|
|
17
|
+
noNotes: "No notes for this slide.",
|
|
18
|
+
timer: "Time presenting",
|
|
19
|
+
pause: "Pause",
|
|
20
|
+
resume: "Resume",
|
|
21
|
+
reset: "Reset",
|
|
22
|
+
previous: "Previous slide",
|
|
23
|
+
forward: "Next slide",
|
|
24
|
+
position: (position, total) => `${position} of ${total}`
|
|
25
|
+
};
|
|
26
|
+
function formatStopwatch(ms) {
|
|
27
|
+
const total = Math.max(0, Math.floor(ms / 1e3));
|
|
28
|
+
const h = Math.floor(total / 3600);
|
|
29
|
+
const m = Math.floor(total % 3600 / 60);
|
|
30
|
+
const s = total % 60;
|
|
31
|
+
const ss = String(s).padStart(2, "0");
|
|
32
|
+
return h > 0 ? `${h}:${String(m).padStart(2, "0")}:${ss}` : `${m}:${ss}`;
|
|
33
|
+
}
|
|
34
|
+
function PresenterView({
|
|
35
|
+
current,
|
|
36
|
+
currentTitle,
|
|
37
|
+
next,
|
|
38
|
+
nextTitle = "",
|
|
39
|
+
notes,
|
|
40
|
+
position,
|
|
41
|
+
total,
|
|
42
|
+
onNext,
|
|
43
|
+
onPrevious,
|
|
44
|
+
now = Date.now,
|
|
45
|
+
className,
|
|
46
|
+
labels
|
|
47
|
+
}) {
|
|
48
|
+
const text = { ...LABELS, ...labels };
|
|
49
|
+
const clock = useRef(now);
|
|
50
|
+
clock.current = now;
|
|
51
|
+
const [banked, setBanked] = useState(0);
|
|
52
|
+
const [runningSince, setRunningSince] = useState(() => now());
|
|
53
|
+
const [tick, setTick] = useState(0);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (runningSince === null) return void 0;
|
|
56
|
+
const id = setInterval(() => setTick((t) => t + 1), 1e3);
|
|
57
|
+
return () => clearInterval(id);
|
|
58
|
+
}, [runningSince]);
|
|
59
|
+
const elapsed = banked + (runningSince === null ? 0 : clock.current() - runningSince);
|
|
60
|
+
const pause = () => {
|
|
61
|
+
if (runningSince === null) {
|
|
62
|
+
setRunningSince(clock.current());
|
|
63
|
+
} else {
|
|
64
|
+
setBanked(elapsed);
|
|
65
|
+
setRunningSince(null);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const reset = () => {
|
|
69
|
+
setBanked(0);
|
|
70
|
+
setRunningSince(runningSince === null ? null : clock.current());
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ jsxs(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: cx("crewlet-presenter", className),
|
|
76
|
+
style: { "--crewlet-presenter-ratio": SLIDE_WIDTH / SLIDE_HEIGHT },
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ jsxs("section", { className: "crewlet-presenter__main", "aria-label": text.onScreen, children: [
|
|
79
|
+
/* @__PURE__ */ jsx(Eyebrow, { as: "p", className: "crewlet-presenter__caption", children: text.onScreen }),
|
|
80
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-presenter__screen", children: [
|
|
81
|
+
/* @__PURE__ */ jsx(SlideStage, { label: text.current(position, total, currentTitle), framed: true, children: current }),
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
SlideNav,
|
|
84
|
+
{
|
|
85
|
+
className: "crewlet-presenter__controls",
|
|
86
|
+
position,
|
|
87
|
+
total,
|
|
88
|
+
onPrevious,
|
|
89
|
+
onNext,
|
|
90
|
+
labels: { previous: text.previous, next: text.forward, end: text.end, position: text.position }
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
] })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ jsxs("aside", { className: "crewlet-presenter__side", children: [
|
|
96
|
+
/* @__PURE__ */ jsxs("section", { className: "crewlet-presenter__next", "aria-label": text.upNext, children: [
|
|
97
|
+
/* @__PURE__ */ jsx(Eyebrow, { as: "p", className: "crewlet-presenter__caption", children: text.upNext }),
|
|
98
|
+
next ? /* @__PURE__ */ jsx(SlideStage, { label: text.next(nextTitle), framed: true, children: next }) : /* @__PURE__ */ jsx("p", { className: "crewlet-presenter__end", children: text.end })
|
|
99
|
+
] }),
|
|
100
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-presenter__timer", children: [
|
|
101
|
+
/* @__PURE__ */ jsx("span", { role: "timer", "aria-label": text.timer, className: "crewlet-presenter__elapsed", children: formatStopwatch(elapsed) }),
|
|
102
|
+
/* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", onClick: pause, children: runningSince === null ? text.resume : text.pause }),
|
|
103
|
+
/* @__PURE__ */ jsx(Button, { size: "small", variant: "ghost", onClick: reset, children: text.reset })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ jsxs("section", { className: "crewlet-presenter__notes", "aria-label": text.notes, children: [
|
|
106
|
+
/* @__PURE__ */ jsx(Eyebrow, { as: "p", className: "crewlet-presenter__caption", children: text.notes }),
|
|
107
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-presenter__notes-body", children: notes ? /* @__PURE__ */ jsx("p", { children: notes }) : /* @__PURE__ */ jsx("p", { className: "crewlet-presenter__empty", children: text.noNotes }) })
|
|
108
|
+
] })
|
|
109
|
+
] })
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { PresenterView, formatStopwatch };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
|
-
import './Document-
|
|
2
|
+
import './Document-JUGCSQ4L.css';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
function Document({ as: Tag = "div", size = "md", measure = "normal", className, children, ...rest }) {
|
|
@@ -20,5 +20,16 @@ function Document({ as: Tag = "div", size = "md", measure = "normal", className,
|
|
|
20
20
|
function DocumentTitle({ as: Tag = "h1", className, children, ...rest }) {
|
|
21
21
|
return /* @__PURE__ */ jsx(Tag, { ...rest, className: cx("crewlet-document-title", className), children });
|
|
22
22
|
}
|
|
23
|
+
function DocumentTitleField({ error = false, className, ...rest }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
"input",
|
|
26
|
+
{
|
|
27
|
+
...rest,
|
|
28
|
+
type: "text",
|
|
29
|
+
"aria-invalid": error || void 0,
|
|
30
|
+
className: cx("crewlet-document-title", "crewlet-document-title-field", className)
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
23
34
|
|
|
24
|
-
export { Document, DocumentTitle };
|
|
35
|
+
export { Document, DocumentTitle, DocumentTitleField };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modal } from './chunk-
|
|
1
|
+
import { Modal } from './chunk-XEGZHHRH.js';
|
|
2
2
|
import { useListbox, useHighlightRest } from './chunk-F73MC7EZ.js';
|
|
3
3
|
import { Input } from './chunk-6QFAK2WV.js';
|
|
4
4
|
import { Kbd } from './chunk-SMBKXWML.js';
|
|
@@ -6,7 +6,7 @@ import { Count } from './chunk-BHHIIK3M.js';
|
|
|
6
6
|
import { isComposing } from './chunk-R25RGPUB.js';
|
|
7
7
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
8
8
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
9
|
-
import './CommandPalette-
|
|
9
|
+
import './CommandPalette-7CFGVBND.css';
|
|
10
10
|
import { useId, useMemo, useRef, useEffect, useState } from 'react';
|
|
11
11
|
import { ChevronLeftGlyph, SearchGlyph } from '@crewlethq/icons/glyphs';
|
|
12
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Document } from './chunk-
|
|
2
|
-
import { ArtifactKindGlyph } from './chunk-
|
|
1
|
+
import { Document } from './chunk-TYKQ33CL.js';
|
|
2
|
+
import { ArtifactKindGlyph } from './chunk-DFZMYB5X.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './ArtifactCover-D4MBEJ5H.css';
|
|
5
|
-
import './DashboardCover-
|
|
5
|
+
import './DashboardCover-KYGYMRKW.css';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
function DocCover({ children, className }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useListbox, useOptionKeys, useHighlightRest } from './chunk-F73MC7EZ.js';
|
|
2
|
-
import { useLayerContainer, viewportBounds,
|
|
2
|
+
import { useLayerContainer, viewportBounds, anchorGone, placePopup, LAYER_GAP, LAYER_REPOSITION_EVENT } from './chunk-OMV5W53A.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './Select-2P7AWUE4.css';
|
|
5
5
|
import { forwardRef, useId, useMemo, useState, useRef, useCallback, useEffect, useLayoutEffect } from 'react';
|
|
@@ -310,8 +310,7 @@ var ListboxSelect = forwardRef(function ListboxSelect2({
|
|
|
310
310
|
width: rect.width,
|
|
311
311
|
height: rect.height
|
|
312
312
|
};
|
|
313
|
-
|
|
314
|
-
if (outsideBounds(local, whole)) {
|
|
313
|
+
if (anchorGone(rect, host, inHost)) {
|
|
315
314
|
close(panel.current?.contains(document.activeElement) ?? false);
|
|
316
315
|
return;
|
|
317
316
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useClipboard } from './chunk-STJ7QBC3.js';
|
|
2
|
-
import { Modal } from './chunk-
|
|
3
|
-
import { Checkbox } from './chunk-
|
|
2
|
+
import { Modal } from './chunk-XEGZHHRH.js';
|
|
3
|
+
import { Checkbox } from './chunk-CPEPST4S.js';
|
|
4
4
|
import { EmptyValue } from './chunk-EUCC37WY.js';
|
|
5
5
|
import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
|
|
6
|
-
import { Menu } from './chunk-
|
|
6
|
+
import { Menu } from './chunk-3EB2AV3H.js';
|
|
7
7
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
8
8
|
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
9
9
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
10
10
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
11
|
-
import './DataTable-
|
|
11
|
+
import './DataTable-NL2YWAIA.css';
|
|
12
12
|
import React, { useState, useCallback, useMemo, useRef, useLayoutEffect, useEffect, useId } from 'react';
|
|
13
13
|
import { createPortal } from 'react-dom';
|
|
14
14
|
import { CheckGlyph, CircleAlertGlyph, CopyGlyph, ChevronsLeftGlyph, ChevronLeftGlyph, ChevronRightGlyph, ChevronsRightGlyph, SettingsGlyph, GripVerticalGlyph, ChevronUpGlyph, ChevronDownGlyph, TrashGlyph, ArrowUpGlyph, ArrowDownGlyph, ChevronsUpDownGlyph, RotateCcwGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Switch } from './chunk-A722MUNR.js';
|
|
2
2
|
import { useReorder } from './chunk-XJ2QEBMM.js';
|
|
3
|
-
import { Checkbox } from './chunk-
|
|
3
|
+
import { Checkbox } from './chunk-CPEPST4S.js';
|
|
4
4
|
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Timeline } from './chunk-AUQPBL4O.js';
|
|
2
|
-
import { PrincipalAvatar } from './chunk-
|
|
2
|
+
import { PrincipalAvatar } from './chunk-CI3VPIJN.js';
|
|
3
3
|
import { RelativeTime } from './chunk-3CZ7XAVY.js';
|
|
4
4
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -2,8 +2,8 @@ import { useRoving, tabStop } from './chunk-RKKO7QHH.js';
|
|
|
2
2
|
import { Count } from './chunk-BHHIIK3M.js';
|
|
3
3
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
-
import './Tabs-
|
|
6
|
-
import React, { useRef, useLayoutEffect } from 'react';
|
|
5
|
+
import './Tabs-MMZXV5EF.css';
|
|
6
|
+
import React, { useRef, useImperativeHandle, useLayoutEffect } from 'react';
|
|
7
7
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
function tabId(panelId, value) {
|
|
@@ -26,9 +26,12 @@ function Tabs({
|
|
|
26
26
|
value,
|
|
27
27
|
onValueChange,
|
|
28
28
|
panelId,
|
|
29
|
-
renderItem
|
|
29
|
+
renderItem,
|
|
30
|
+
trailing,
|
|
31
|
+
ref
|
|
30
32
|
}) {
|
|
31
33
|
const navRef = useRef(null);
|
|
34
|
+
useImperativeHandle(ref, () => navRef.current, []);
|
|
32
35
|
const { buttons, onKeyDown } = useRoving(items.length, null);
|
|
33
36
|
useLayoutEffect(() => {
|
|
34
37
|
if (variant !== "underline") return;
|
|
@@ -81,7 +84,7 @@ function Tabs({
|
|
|
81
84
|
item.marker ? item.marker.tone === "danger" ? /* @__PURE__ */ jsxs("span", { className: "crewlet-tabs__marker crewlet-tabs__marker--danger", children: [
|
|
82
85
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: item.marker.count }),
|
|
83
86
|
/* @__PURE__ */ jsx(VisuallyHidden, { children: item.marker.label })
|
|
84
|
-
] }) : /* @__PURE__ */ jsx("span", { className: `crewlet-tabs__marker crewlet-tabs__marker--${item.marker.tone}`, children: /* @__PURE__ */ jsx(VisuallyHidden, { children: item.marker.label }) }) : item.count != null ? /* @__PURE__ */ jsx(Count, { value: item.count }) : null
|
|
87
|
+
] }) : /* @__PURE__ */ jsx("span", { className: `crewlet-tabs__marker crewlet-tabs__marker--${item.marker.tone}`, children: /* @__PURE__ */ jsx(VisuallyHidden, { children: item.marker.label }) }) : item.count != null && item.count !== "" ? /* @__PURE__ */ jsx(Count, { value: item.count }) : null
|
|
85
88
|
] });
|
|
86
89
|
const onSelect = () => {
|
|
87
90
|
if (item.disabled) return;
|
|
@@ -112,7 +115,10 @@ function Tabs({
|
|
|
112
115
|
);
|
|
113
116
|
});
|
|
114
117
|
if (renderItem) {
|
|
115
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ jsxs("nav", { ref: navRef, className: rootClass, "aria-label": ariaLabel, children: [
|
|
119
|
+
rows,
|
|
120
|
+
trailing
|
|
121
|
+
] });
|
|
116
122
|
}
|
|
117
123
|
return /* @__PURE__ */ jsx("div", { ref: navRef, className: rootClass, "aria-label": ariaLabel, role: "tablist", children: rows });
|
|
118
124
|
}
|
|
@@ -32,5 +32,43 @@ function useFullscreen(ref) {
|
|
|
32
32
|
}, [enter, exit, ref]);
|
|
33
33
|
return { supported, active, enter, exit, toggle };
|
|
34
34
|
}
|
|
35
|
+
var IDLE_AFTER_MS = 2500;
|
|
36
|
+
function useIdle(ref, enabled, timeout = IDLE_AFTER_MS) {
|
|
37
|
+
const [idle, setIdle] = useState(false);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const el = ref.current;
|
|
40
|
+
if (!el || !enabled) {
|
|
41
|
+
setIdle(false);
|
|
42
|
+
return void 0;
|
|
43
|
+
}
|
|
44
|
+
let timer;
|
|
45
|
+
const rest = () => {
|
|
46
|
+
clearTimeout(timer);
|
|
47
|
+
timer = setTimeout(() => {
|
|
48
|
+
const focused = document.activeElement;
|
|
49
|
+
if (focused instanceof HTMLElement && focused !== el && el.contains(focused) && focused.matches(":focus-visible")) {
|
|
50
|
+
rest();
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
setIdle(true);
|
|
54
|
+
}, timeout);
|
|
55
|
+
};
|
|
56
|
+
const wake = () => {
|
|
57
|
+
setIdle(false);
|
|
58
|
+
rest();
|
|
59
|
+
};
|
|
60
|
+
rest();
|
|
61
|
+
el.addEventListener("pointermove", wake);
|
|
62
|
+
el.addEventListener("pointerdown", wake);
|
|
63
|
+
el.addEventListener("focusin", wake);
|
|
64
|
+
return () => {
|
|
65
|
+
clearTimeout(timer);
|
|
66
|
+
el.removeEventListener("pointermove", wake);
|
|
67
|
+
el.removeEventListener("pointerdown", wake);
|
|
68
|
+
el.removeEventListener("focusin", wake);
|
|
69
|
+
};
|
|
70
|
+
}, [ref, enabled, timeout]);
|
|
71
|
+
return enabled && idle;
|
|
72
|
+
}
|
|
35
73
|
|
|
36
|
-
export { useFullscreen };
|
|
74
|
+
export { IDLE_AFTER_MS, useFullscreen, useIdle };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './Tabs-
|
|
1
|
+
import './Tabs-MMZXV5EF.css';
|
|
2
2
|
import './SegmentedControl-FLI45IOW.css';
|