@crewlethq/ui 0.111.0 → 0.113.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 +1 -1
- package/dist/ActivityLine/ActivityLine.d.ts +16 -22
- package/dist/ActivityLine/index.js +4 -2
- package/dist/ActivityLine-TIMSOQGU.css +32 -0
- package/dist/AgentHandoffPanel/index.js +4 -3
- package/dist/AppShell/index.js +2 -2
- package/dist/ArrangeList/index.js +4 -3
- package/dist/ArtifactBar/index.js +4 -4
- package/dist/ArtifactCard/index.js +6 -5
- package/dist/Avatar/AvatarStack.d.ts +9 -3
- package/dist/Avatar/index.js +1 -1
- package/dist/AvatarPicker/index.js +8 -8
- package/dist/{AvatarStack-EQZZJZ3V.css → AvatarStack-GNEJHEU6.css} +20 -0
- package/dist/CharacterPicker/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 +2 -2
- package/dist/{ChatMessage-5AMJCGZY.css → ChatMessage-SZGZT7O2.css} +15 -0
- package/dist/ChatThread/index.js +2 -2
- package/dist/CheckGrid/index.js +4 -3
- package/dist/Checkbox/index.js +3 -2
- package/dist/ColorField/index.js +3 -2
- package/dist/Combobox/index.js +3 -2
- package/dist/CommandPalette/index.js +3 -2
- package/dist/CommentThread/index.js +6 -5
- package/dist/Composer/index.js +3 -2
- package/dist/ConfirmField/index.js +3 -2
- package/dist/ContrastHelp/index.js +2 -2
- package/dist/DataGrid/index.js +4 -3
- package/dist/DataTable/index.js +5 -4
- package/dist/DataView/index.js +8 -7
- package/dist/DateTimePicker/index.js +2 -2
- package/dist/DocTabsEditor/index.js +4 -3
- package/dist/{Editor-VAEC6MIJ.js → Editor-XT73VTSJ.js} +3 -2
- package/dist/EmojiPicker/EmojiPicker.d.ts +23 -5
- package/dist/EmojiPicker/index.d.ts +1 -1
- package/dist/EmojiPicker/index.js +5 -3
- package/dist/EmojiPicker-V6XM56GJ.css +180 -0
- package/dist/EntityChip/index.js +1 -1
- package/dist/HuePicker/index.js +4 -4
- package/dist/ImageUpload/index.js +1 -1
- package/dist/Input/index.js +2 -1
- package/dist/KeyValueRows/index.js +3 -2
- package/dist/Layer/index.d.ts +1 -1
- package/dist/Layer/place.d.ts +6 -0
- package/dist/ListInput/index.js +3 -2
- package/dist/MarkdownEditor/index.js +4 -4
- package/dist/MemberPicker/index.js +4 -3
- 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 +4 -1
- package/dist/Menu/index.js +1 -1
- package/dist/{Menu-UY2O4OCZ.css → Menu-PXOAJ4DP.css} +5 -0
- package/dist/MergeConflicts/index.js +4 -4
- package/dist/MessageActions/index.js +5 -4
- package/dist/OrgLabel/index.js +1 -1
- package/dist/OrgNode/index.js +1 -1
- package/dist/OrgTable/index.js +8 -7
- package/dist/PeopleRail/index.js +1 -1
- 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/Principal/index.js +1 -1
- package/dist/PrincipalPicker/index.js +5 -4
- package/dist/ProposalCard/index.js +4 -3
- package/dist/ReactionBar/ReactionBar.d.ts +4 -2
- package/dist/ReactionBar/index.js +6 -4
- package/dist/RecordChip/index.js +2 -2
- package/dist/RichEditor/index.js +1 -1
- package/dist/SegmentedControl/index.js +3 -3
- package/dist/ShareDialog/index.js +2 -2
- package/dist/SheetColumnEditor/index.js +8 -7
- package/dist/SheetGrid/index.js +5 -5
- package/dist/SlideFilmstrip/index.js +2 -2
- package/dist/Switcher/index.js +4 -3
- package/dist/TableCells/index.js +2 -2
- package/dist/Tabs/index.js +2 -2
- package/dist/ThemeSwitcher/index.js +4 -4
- package/dist/ThreadSummary/ThreadSummary.d.ts +3 -1
- package/dist/ThreadSummary/index.d.ts +1 -1
- package/dist/ThreadSummary/index.js +3 -3
- package/dist/{ThreadSummary-CFAHYY57.css → ThreadSummary-2AFEU6NH.css} +2 -1
- package/dist/TimeRangePicker/index.js +6 -5
- package/dist/TimeWindowPicker/index.js +4 -3
- package/dist/TreeGrid/index.js +5 -4
- package/dist/ValueField/index.js +4 -3
- package/dist/VersionCompare/index.js +4 -4
- package/dist/VersionTimeline/index.js +1 -1
- package/dist/WorkingLine/BouncingDots.d.ts +8 -0
- package/dist/WorkingLine/WorkingLine.d.ts +97 -0
- package/dist/WorkingLine/index.d.ts +5 -0
- package/dist/WorkingLine/index.js +5 -0
- package/dist/WorkingLine-NUFSSAOL.css +332 -0
- package/dist/{chunk-S4AQ7HAA.js → chunk-2NUQBD3O.js} +3 -3
- package/dist/{chunk-GMBXRSC5.js → chunk-32QH3CAO.js} +3 -3
- package/dist/{chunk-QEGOVWYP.js → chunk-3UFIYOVD.js} +1 -1
- package/dist/chunk-47V3ASMW.js +74 -0
- package/dist/{chunk-ADIJ6TLF.js → chunk-5FOJLJYN.js} +1 -1
- package/dist/{chunk-A2BL2EF6.js → chunk-5G3KASPV.js} +1 -1
- package/dist/{chunk-FXRXV6QH.js → chunk-5SBMYPWG.js} +1 -1
- package/dist/{chunk-WUCRLA25.js → chunk-5SMYKL3D.js} +9 -3
- package/dist/{chunk-NQKHOLC7.js → chunk-6S2Q4DGN.js} +1 -1
- package/dist/{chunk-LTNWLZLG.js → chunk-76LJUPDA.js} +2 -2
- package/dist/{chunk-ECTHM76P.js → chunk-7TLM7E5N.js} +2 -2
- package/dist/{chunk-5272PYQD.js → chunk-BBE656JU.js} +1 -1
- package/dist/{chunk-BM76TWJ7.js → chunk-CHB7T3PT.js} +4 -4
- package/dist/{chunk-XKU733RV.js → chunk-CJRWESDZ.js} +1 -1
- package/dist/{chunk-WIMKLLMH.js → chunk-CTIJTW4R.js} +1 -1
- package/dist/{chunk-MV56SO2V.js → chunk-D7NXK77P.js} +1 -1
- package/dist/{chunk-XR6IZOLT.js → chunk-DRI6OXWY.js} +1 -1
- package/dist/{chunk-E7NTBXXE.js → chunk-DTEDUAEW.js} +1 -1
- package/dist/{chunk-RG6X2EQP.js → chunk-DTZ72KVX.js} +2 -2
- package/dist/{chunk-TWNOYES7.js → chunk-GFOPTRRY.js} +1 -1
- package/dist/{chunk-PH5APLMB.js → chunk-GMQ54OQF.js} +1 -1
- package/dist/{chunk-TZNNLLXI.js → chunk-HHRYIXBM.js} +1 -1
- package/dist/{chunk-ETFBEHMH.js → chunk-J4OL6KHY.js} +1 -1
- package/dist/{chunk-VYUEAMA4.js → chunk-KDRJZWE3.js} +3 -1
- package/dist/{chunk-IW7EEYBS.js → chunk-KG3PHAUX.js} +2 -2
- package/dist/{chunk-GYLXJ6VC.js → chunk-KVNVLBCB.js} +1 -1
- package/dist/{chunk-EBIYEUE3.js → chunk-KYWIUH5R.js} +5 -5
- package/dist/{chunk-TDE6MUAQ.js → chunk-LGJJIPYZ.js} +1 -1
- package/dist/{chunk-XL6DTL36.js → chunk-M7EALYXZ.js} +1 -1
- package/dist/{chunk-L544S4UU.js → chunk-NOP55WRY.js} +107 -44
- package/dist/{chunk-WMLXOW7D.js → chunk-P366K4RX.js} +3 -2
- package/dist/{chunk-3ZIGF6LK.js → chunk-PBDMJHXV.js} +1 -1
- package/dist/chunk-PJV5HVZY.js +67 -0
- package/dist/{chunk-57SISFHX.js → chunk-PWB2LWBE.js} +1 -1
- package/dist/chunk-Q5LDZPFF.js +2 -0
- package/dist/{chunk-JLL7KQV5.js → chunk-QCJ3UBCZ.js} +1 -1
- package/dist/{chunk-YBPBSLGY.js → chunk-QHUKJN33.js} +3 -1
- package/dist/{chunk-3DUNIA3E.js → chunk-QLGZBN6A.js} +4 -4
- package/dist/{chunk-7ZIKXGIJ.js → chunk-QMEKGAEA.js} +2 -2
- package/dist/{chunk-TTQOKYTO.js → chunk-QVNEQSOL.js} +1 -1
- package/dist/{chunk-OTGWNFBE.js → chunk-RHD46WIZ.js} +1 -1
- package/dist/chunk-RNIPNSCH.js +158 -0
- package/dist/{chunk-4A75O7NL.js → chunk-RTDFRFTF.js} +8 -3
- package/dist/{chunk-6ZC2LPCM.js → chunk-SDYLFZKZ.js} +2 -2
- package/dist/{chunk-OIFITGYL.js → chunk-SJNJBXUA.js} +2 -2
- package/dist/{chunk-CJNSPA5F.js → chunk-STJPIP3R.js} +1 -1
- package/dist/{chunk-HKCOGDXN.js → chunk-TE3OMB3Z.js} +2 -28
- package/dist/{chunk-2DXZ2ZJR.js → chunk-TEOJ7OKD.js} +2 -2
- package/dist/{chunk-2SHRZ42G.js → chunk-TP7PRSGX.js} +1 -1
- package/dist/{chunk-YECS3C4D.js → chunk-V6BEBGO3.js} +2 -2
- package/dist/{chunk-LKBJE5J7.js → chunk-VZ42TS3C.js} +1 -1
- package/dist/{chunk-PZ4RVNSC.js → chunk-WEZU4DX2.js} +1 -1
- package/dist/{chunk-HKJTZG75.js → chunk-Y36N7TB7.js} +1 -1
- package/dist/{chunk-SRID7K37.js → chunk-Y3FLNQEE.js} +1 -1
- package/dist/{chunk-BHR72Z7M.js → chunk-YD5UCBFV.js} +1 -1
- package/dist/{chunk-MWKJEZBY.js → chunk-YE76GTQU.js} +2 -2
- package/dist/{chunk-SQSFVBDF.js → chunk-ZGJCVXFU.js} +1 -1
- package/dist/{chunk-PGMKJ4OD.js → chunk-ZJVGVTC3.js} +19 -5
- package/dist/chunk-ZLCPU4HW.js +17 -0
- package/dist/{chunk-EXYO45GN.js → chunk-ZUFV7753.js} +5 -4
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +76 -74
- package/dist/index.js +76 -74
- package/dist/styles.css +552 -71
- package/dist/utils/fieldMirror.d.ts +22 -0
- package/package.json +3 -3
- package/dist/ActivityLine-AMSERTOB.css +0 -74
- package/dist/EmojiPicker-W722WJ5M.css +0 -105
- package/dist/chunk-3KLVK655.js +0 -2
- package/dist/chunk-5YFQMMTJ.js +0 -29
- package/dist/chunk-VZ7DNXCW.js +0 -58
- package/dist/{chunk-LNQSNXGJ.js → chunk-S4JRQJEP.js} +1 -1
- /package/dist/{chunk-2DYEPDT7.js → chunk-XDBCWSM5.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Switch } from './chunk-6YYRFGXO.js';
|
|
2
2
|
import { useReorder } from './chunk-JMBPMSNI.js';
|
|
3
|
-
import { Checkbox } from './chunk-
|
|
3
|
+
import { Checkbox } from './chunk-DTEDUAEW.js';
|
|
4
4
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SlideStage } from './chunk-7O53SWKI.js';
|
|
2
2
|
import { useReorder } from './chunk-JMBPMSNI.js';
|
|
3
|
-
import { Menu } from './chunk-
|
|
3
|
+
import { Menu } from './chunk-QHUKJN33.js';
|
|
4
4
|
import { Kbd, isApplePlatform } from './chunk-VBBLHS2Y.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTreeState, treeExpandable, treeLevel, treePosInSet, treeSetSize, treeItemAction, treePrevious, treeNext, treeStep } from './chunk-MY374UUD.js';
|
|
2
|
-
import { GRID_FOOT_LABELS, parseGridSort, overrunning, squeezedCells, fitGridColumns, tableTrack, GRID_ICON_TRACK, GridHeadCell, alignOf, rowLinkTitle, headerWord, GridFoot, droppedNames, nextGridSort, sortByValue } from './chunk-
|
|
2
|
+
import { GRID_FOOT_LABELS, parseGridSort, overrunning, squeezedCells, fitGridColumns, tableTrack, GRID_ICON_TRACK, GridHeadCell, alignOf, rowLinkTitle, headerWord, GridFoot, droppedNames, nextGridSort, sortByValue } from './chunk-Y3FLNQEE.js';
|
|
3
3
|
import { LayerNodeBridge } from './chunk-X4HBZSXA.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
7
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useThemePreference, useDensityPreference } from './chunk-Z24ZUSTX.js';
|
|
2
|
-
import { SegmentedControl } from './chunk-
|
|
2
|
+
import { SegmentedControl } from './chunk-YD5UCBFV.js';
|
|
3
3
|
import { SunGlyph, MonitorGlyph, MoonGlyph } from '@crewlethq/icons/glyphs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormField, Label, Input } from './chunk-
|
|
1
|
+
import { FormField, Label, Input } from './chunk-TE3OMB3Z.js';
|
|
2
2
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
3
3
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
4
4
|
import { announce } from './chunk-WGMKERCR.js';
|
|
@@ -3,7 +3,7 @@ import { useLayerContainer, viewportBounds, LAYER_GAP, anchorGone, placePopup, L
|
|
|
3
3
|
import { usePopupLayer, focusables } from './chunk-EDPMHSLZ.js';
|
|
4
4
|
import { returnFocus } from './chunk-4ITETIGZ.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
|
-
import './Popover-
|
|
6
|
+
import './Popover-EKG6OBZL.css';
|
|
7
7
|
import { useId, useState, useRef, useCallback, useLayoutEffect, useEffect, cloneElement } from 'react';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -19,6 +19,7 @@ function Popover({
|
|
|
19
19
|
initialFocus,
|
|
20
20
|
role = "dialog",
|
|
21
21
|
label,
|
|
22
|
+
entrance = "rise",
|
|
22
23
|
className,
|
|
23
24
|
open: controlled,
|
|
24
25
|
defaultOpen = false,
|
|
@@ -157,6 +158,7 @@ function Popover({
|
|
|
157
158
|
"crewlet-popover",
|
|
158
159
|
`crewlet-popover--${place?.side ?? (side === "top" ? "above" : "below")}`,
|
|
159
160
|
container !== null && container !== document.body ? "crewlet-popover--in-host" : "crewlet-popover--fixed",
|
|
161
|
+
entrance === "instant" && "crewlet-popover--instant",
|
|
160
162
|
className
|
|
161
163
|
),
|
|
162
164
|
style: { ...style, zIndex: layer.zIndex },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Toolbar } from './chunk-NPEI2QAN.js';
|
|
2
|
-
import { SegmentedControl } from './chunk-
|
|
3
|
-
import { tabId } from './chunk-
|
|
2
|
+
import { SegmentedControl } from './chunk-YD5UCBFV.js';
|
|
3
|
+
import { tabId } from './chunk-STJPIP3R.js';
|
|
4
4
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './MarkdownEditor-BLCJRGDC.css';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PageHeader } from './chunk-FPDIHEM4.js';
|
|
2
2
|
import { FilterPill } from './chunk-OKOHQ3E7.js';
|
|
3
|
-
import { DateTimePicker } from './chunk-
|
|
4
|
-
import { DataTable } from './chunk-
|
|
3
|
+
import { DateTimePicker } from './chunk-VZ42TS3C.js';
|
|
4
|
+
import { DataTable } from './chunk-V6BEBGO3.js';
|
|
5
5
|
import { useListbox, useOptionKeys } from './chunk-KW7T23RT.js';
|
|
6
6
|
import { Toolbar } from './chunk-NPEI2QAN.js';
|
|
7
|
-
import { Popover } from './chunk-
|
|
7
|
+
import { Popover } from './chunk-KDRJZWE3.js';
|
|
8
8
|
import { RelativeTime } from './chunk-GBKBME7Q.js';
|
|
9
|
-
import { Menu } from './chunk-
|
|
10
|
-
import { Input } from './chunk-
|
|
9
|
+
import { Menu } from './chunk-QHUKJN33.js';
|
|
10
|
+
import { Input } from './chunk-TE3OMB3Z.js';
|
|
11
11
|
import { Kbd } from './chunk-VBBLHS2Y.js';
|
|
12
12
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
13
13
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeHex, parseColourInput } from './chunk-7W3LYIOC.js';
|
|
2
|
-
import { FormField, Input, InputAffix } from './chunk-
|
|
2
|
+
import { FormField, Input, InputAffix } from './chunk-TE3OMB3Z.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './ColorField-2OIOWT3Z.css';
|
|
5
5
|
import { useId, useState } from 'react';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Toolbar } from './chunk-NPEI2QAN.js';
|
|
2
|
+
import { Popover } from './chunk-KDRJZWE3.js';
|
|
3
|
+
import { Input } from './chunk-TE3OMB3Z.js';
|
|
3
4
|
import { Tooltip } from './chunk-HXVMXH6U.js';
|
|
4
5
|
import { isComposing } from './chunk-EDPMHSLZ.js';
|
|
5
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
|
-
import './EmojiPicker-
|
|
7
|
-
import { useId, useState, useRef, useMemo } from 'react';
|
|
8
|
-
import { SearchGlyph } from '@crewlethq/icons/glyphs';
|
|
7
|
+
import './EmojiPicker-V6XM56GJ.css';
|
|
8
|
+
import { useId, useState, useRef, useMemo, useLayoutEffect } from 'react';
|
|
9
|
+
import { LaptopGlyph, FaceSlightlySmilingGlyph, ClockGlyph, HashGlyph, SearchGlyph } from '@crewlethq/icons/glyphs';
|
|
9
10
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
11
|
|
|
11
12
|
// src/EmojiPicker/emoji.ts
|
|
@@ -106,12 +107,18 @@ function searchEmoji(query, groups = EMOJI_GROUPS) {
|
|
|
106
107
|
}
|
|
107
108
|
return found;
|
|
108
109
|
}
|
|
109
|
-
var EMOJI_PICKER_COLUMNS =
|
|
110
|
+
var EMOJI_PICKER_COLUMNS = 9;
|
|
111
|
+
var EMOJI_GROUP_GLYPHS = {
|
|
112
|
+
"Frequently used": /* @__PURE__ */ jsx(ClockGlyph, { size: "lg" }),
|
|
113
|
+
Smileys: /* @__PURE__ */ jsx(FaceSlightlySmilingGlyph, { size: "lg" }),
|
|
114
|
+
Work: /* @__PURE__ */ jsx(LaptopGlyph, { size: "lg" })
|
|
115
|
+
};
|
|
110
116
|
var EMOJI_PICKER_LABELS = {
|
|
111
117
|
search: "Search emoji",
|
|
112
118
|
results: "Results",
|
|
113
119
|
none: (query) => `No emoji match \u201C${query}\u201D.`,
|
|
114
|
-
idle: "Pick an emoji"
|
|
120
|
+
idle: "Pick an emoji",
|
|
121
|
+
categories: "Emoji categories"
|
|
115
122
|
};
|
|
116
123
|
function layout(groups) {
|
|
117
124
|
let index = 0;
|
|
@@ -137,7 +144,9 @@ function EmojiPicker({
|
|
|
137
144
|
onOpenChange,
|
|
138
145
|
align = "end",
|
|
139
146
|
side = "bottom",
|
|
147
|
+
entrance,
|
|
140
148
|
groups = EMOJI_GROUPS,
|
|
149
|
+
groupGlyphs = EMOJI_GROUP_GLYPHS,
|
|
141
150
|
labels: overrides
|
|
142
151
|
}) {
|
|
143
152
|
const labels = overrides ? { ...EMOJI_PICKER_LABELS, ...overrides } : EMOJI_PICKER_LABELS;
|
|
@@ -147,6 +156,8 @@ function EmojiPicker({
|
|
|
147
156
|
const [pointed, setPointed] = useState(null);
|
|
148
157
|
const field = useRef(null);
|
|
149
158
|
const grid = useRef(null);
|
|
159
|
+
const [current, setCurrent] = useState(0);
|
|
160
|
+
const pending = useRef(null);
|
|
150
161
|
const found = useMemo(() => searchEmoji(query, groups), [query, groups]);
|
|
151
162
|
const { drawn, cells } = useMemo(
|
|
152
163
|
() => layout(found ? [{ label: labels.results, items: found }] : groups),
|
|
@@ -155,6 +166,37 @@ function EmojiPicker({
|
|
|
155
166
|
const stop = Math.min(at, Math.max(0, cells.length - 1));
|
|
156
167
|
const chosen = found && found.length > 0 ? cells[stop] : void 0;
|
|
157
168
|
const shown = pointed ?? chosen?.entry ?? null;
|
|
169
|
+
const showGroup = (index) => {
|
|
170
|
+
const scroller = grid.current;
|
|
171
|
+
const head = scroller?.querySelector(`[data-group-index="${index}"]`);
|
|
172
|
+
if (!scroller || !head) return;
|
|
173
|
+
scroller.scrollTop = head.offsetTop;
|
|
174
|
+
setCurrent(index);
|
|
175
|
+
};
|
|
176
|
+
const jumpTo = (index) => {
|
|
177
|
+
if (found) {
|
|
178
|
+
pending.current = index;
|
|
179
|
+
setQuery("");
|
|
180
|
+
setAt(0);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
showGroup(index);
|
|
184
|
+
};
|
|
185
|
+
useLayoutEffect(() => {
|
|
186
|
+
if (found || pending.current === null) return;
|
|
187
|
+
const index = pending.current;
|
|
188
|
+
pending.current = null;
|
|
189
|
+
showGroup(index);
|
|
190
|
+
});
|
|
191
|
+
const track = () => {
|
|
192
|
+
const scroller = grid.current;
|
|
193
|
+
if (!scroller || found) return;
|
|
194
|
+
const heads = [...scroller.querySelectorAll("[data-group-index]")];
|
|
195
|
+
const atEnd = scroller.scrollTop + scroller.clientHeight >= scroller.scrollHeight - 1;
|
|
196
|
+
let next = Number(heads[0]?.dataset["groupIndex"] ?? 0);
|
|
197
|
+
for (const head of heads) if (atEnd || head.offsetTop <= scroller.scrollTop + 1) next = Number(head.dataset["groupIndex"]);
|
|
198
|
+
setCurrent(next);
|
|
199
|
+
};
|
|
158
200
|
const focusCell = (index) => {
|
|
159
201
|
setAt(index);
|
|
160
202
|
grid.current?.querySelector(`[data-emoji-index="${index}"]`)?.focus();
|
|
@@ -197,6 +239,7 @@ function EmojiPicker({
|
|
|
197
239
|
label,
|
|
198
240
|
align,
|
|
199
241
|
side,
|
|
242
|
+
entrance,
|
|
200
243
|
className: "crewlet-emoji-picker",
|
|
201
244
|
initialFocus: () => field.current,
|
|
202
245
|
trigger: (open, toggle) => tooltip ? /* @__PURE__ */ jsx(Tooltip, { content: tooltip, disabled: open, children: trigger(open, toggle) }) : trigger(open, toggle),
|
|
@@ -205,36 +248,56 @@ function EmojiPicker({
|
|
|
205
248
|
setQuery("");
|
|
206
249
|
setAt(0);
|
|
207
250
|
setPointed(null);
|
|
251
|
+
setCurrent(0);
|
|
208
252
|
}
|
|
209
253
|
onOpenChange?.(open);
|
|
210
254
|
},
|
|
211
|
-
children: (close) => /* @__PURE__ */ jsxs(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
255
|
+
children: (close) => /* @__PURE__ */ jsxs(
|
|
256
|
+
"div",
|
|
257
|
+
{
|
|
258
|
+
className: "crewlet-emoji-picker__body",
|
|
259
|
+
style: { "--crewlet-emoji-picker-columns": EMOJI_PICKER_COLUMNS },
|
|
260
|
+
children: [
|
|
261
|
+
/* @__PURE__ */ jsx(Toolbar, { label: labels.categories, className: "crewlet-emoji-picker__tabs", children: groups.map(
|
|
262
|
+
(group, number) => group.items.length === 0 ? null : /* @__PURE__ */ jsx(Tooltip, { content: group.label, children: /* @__PURE__ */ jsx(
|
|
263
|
+
"button",
|
|
264
|
+
{
|
|
265
|
+
type: "button",
|
|
266
|
+
className: cx("crewlet-emoji-picker__tab", !found && number === current && "is-current"),
|
|
267
|
+
"aria-label": group.label,
|
|
268
|
+
"aria-current": !found && number === current ? "true" : void 0,
|
|
269
|
+
onClick: () => jumpTo(number),
|
|
270
|
+
children: groupGlyphs[group.label] ?? /* @__PURE__ */ jsx(HashGlyph, { size: "lg" })
|
|
271
|
+
}
|
|
272
|
+
) }, group.label)
|
|
273
|
+
) }),
|
|
274
|
+
/* @__PURE__ */ jsx(
|
|
275
|
+
Input,
|
|
276
|
+
{
|
|
277
|
+
ref: field,
|
|
278
|
+
placeholder: labels.search,
|
|
279
|
+
"aria-label": labels.search,
|
|
280
|
+
leading: /* @__PURE__ */ jsx(SearchGlyph, { size: "sm" }),
|
|
281
|
+
value: query,
|
|
282
|
+
onChange: (event) => {
|
|
283
|
+
setQuery(event.target.value);
|
|
284
|
+
setAt(0);
|
|
285
|
+
},
|
|
286
|
+
onKeyDown: (event) => onFieldKeys(event, close)
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
/* @__PURE__ */ jsxs("div", { ref: grid, className: "crewlet-emoji-picker__scroll", onScroll: track, children: [
|
|
235
290
|
drawn.map(
|
|
236
291
|
(group, number) => group.cells.length === 0 ? null : /* @__PURE__ */ jsxs("div", { role: "group", "aria-labelledby": `${id}-group-${number}`, children: [
|
|
237
|
-
/* @__PURE__ */ jsx(
|
|
292
|
+
/* @__PURE__ */ jsx(
|
|
293
|
+
"div",
|
|
294
|
+
{
|
|
295
|
+
id: `${id}-group-${number}`,
|
|
296
|
+
className: "crewlet-emoji-picker__group",
|
|
297
|
+
"data-group-index": found ? void 0 : number,
|
|
298
|
+
children: group.label
|
|
299
|
+
}
|
|
300
|
+
),
|
|
238
301
|
/* @__PURE__ */ jsx("div", { className: "crewlet-emoji-picker__grid", children: group.cells.map((cell) => /* @__PURE__ */ jsx(
|
|
239
302
|
"button",
|
|
240
303
|
{
|
|
@@ -258,19 +321,19 @@ function EmojiPicker({
|
|
|
258
321
|
] }, group.label)
|
|
259
322
|
),
|
|
260
323
|
found && found.length === 0 ? /* @__PURE__ */ jsx("p", { className: "crewlet-emoji-picker__none", role: "status", children: labels.none(query.trim()) }) : null
|
|
261
|
-
]
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
]
|
|
270
|
-
|
|
271
|
-
|
|
324
|
+
] }),
|
|
325
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-emoji-picker__preview", "aria-hidden": "true", children: shown ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
326
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-emoji-picker__preview-emoji", children: shown.emoji }),
|
|
327
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-emoji-picker__preview-words", children: [
|
|
328
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-emoji-picker__preview-name", children: shown.name }),
|
|
329
|
+
shown.shortcode ? /* @__PURE__ */ jsx("span", { className: "crewlet-emoji-picker__preview-code", children: shown.shortcode }) : null
|
|
330
|
+
] })
|
|
331
|
+
] }) : /* @__PURE__ */ jsx("span", { className: "crewlet-emoji-picker__preview-idle", children: labels.idle }) })
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
)
|
|
272
335
|
}
|
|
273
336
|
);
|
|
274
337
|
}
|
|
275
338
|
|
|
276
|
-
export { EMOJI_GROUPS, EMOJI_PICKER_COLUMNS, EMOJI_PICKER_LABELS, EmojiPicker, emojiName, emojiOfShortcode, emojiShortcode, isShortcode, searchEmoji };
|
|
339
|
+
export { EMOJI_GROUPS, EMOJI_GROUP_GLYPHS, EMOJI_PICKER_COLUMNS, EMOJI_PICKER_LABELS, EmojiPicker, emojiName, emojiOfShortcode, emojiShortcode, isShortcode, searchEmoji };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { emojiOfShortcode, emojiName, EmojiPicker } from './chunk-
|
|
1
|
+
import { emojiOfShortcode, emojiName, EmojiPicker } from './chunk-NOP55WRY.js';
|
|
2
2
|
import { heldHint } from './chunk-TDFLCUBE.js';
|
|
3
3
|
import { Tooltip } from './chunk-HXVMXH6U.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -60,11 +60,12 @@ function ReactionBar({ reactions, onToggle, add, disabledReason, labels: overrid
|
|
|
60
60
|
add
|
|
61
61
|
] });
|
|
62
62
|
}
|
|
63
|
-
function AddReaction({ label = "Add a reaction", align = "start", disabledReason, ...picker }) {
|
|
63
|
+
function AddReaction({ label = "Add a reaction", align = "start", entrance = "instant", disabledReason, ...picker }) {
|
|
64
64
|
return /* @__PURE__ */ jsx(
|
|
65
65
|
EmojiPicker,
|
|
66
66
|
{
|
|
67
67
|
...picker,
|
|
68
|
+
entrance,
|
|
68
69
|
label,
|
|
69
70
|
tooltip: heldHint(label, disabledReason),
|
|
70
71
|
align,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useListbox, useOptionKeys } from './chunk-KW7T23RT.js';
|
|
2
|
-
import { Input } from './chunk-
|
|
2
|
+
import { Input } from './chunk-TE3OMB3Z.js';
|
|
3
3
|
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './HitArea-QUOS6ZDJ.css';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// src/utils/fieldMirror.ts
|
|
2
|
+
var MIRRORED_TEXT_STYLES = [
|
|
3
|
+
"boxSizing",
|
|
4
|
+
"width",
|
|
5
|
+
"paddingTop",
|
|
6
|
+
"paddingRight",
|
|
7
|
+
"paddingBottom",
|
|
8
|
+
"paddingLeft",
|
|
9
|
+
"borderTopWidth",
|
|
10
|
+
"borderRightWidth",
|
|
11
|
+
"borderBottomWidth",
|
|
12
|
+
"borderLeftWidth",
|
|
13
|
+
"borderStyle",
|
|
14
|
+
"direction",
|
|
15
|
+
"fontFamily",
|
|
16
|
+
"fontSize",
|
|
17
|
+
"fontStretch",
|
|
18
|
+
"fontStyle",
|
|
19
|
+
"fontVariant",
|
|
20
|
+
"fontWeight",
|
|
21
|
+
"letterSpacing",
|
|
22
|
+
"lineHeight",
|
|
23
|
+
"tabSize",
|
|
24
|
+
"textIndent",
|
|
25
|
+
"textTransform",
|
|
26
|
+
"whiteSpace",
|
|
27
|
+
"wordBreak",
|
|
28
|
+
"wordSpacing",
|
|
29
|
+
"overflowWrap"
|
|
30
|
+
];
|
|
31
|
+
function copyTextStyles(from, to) {
|
|
32
|
+
for (const key of MIRRORED_TEXT_STYLES) to.style[key] = from[key];
|
|
33
|
+
}
|
|
34
|
+
function caretPoint(field, index, relativeTo) {
|
|
35
|
+
const style = getComputedStyle(field);
|
|
36
|
+
const doc = field.ownerDocument;
|
|
37
|
+
const mirror = doc.createElement("div");
|
|
38
|
+
copyTextStyles(style, mirror);
|
|
39
|
+
Object.assign(mirror.style, {
|
|
40
|
+
position: "absolute",
|
|
41
|
+
top: "0",
|
|
42
|
+
left: "-9999px",
|
|
43
|
+
visibility: "hidden",
|
|
44
|
+
overflow: "hidden",
|
|
45
|
+
whiteSpace: field instanceof HTMLTextAreaElement ? "pre-wrap" : "pre",
|
|
46
|
+
overflowWrap: "break-word"
|
|
47
|
+
});
|
|
48
|
+
const at = Math.max(0, Math.min(index, field.value.length));
|
|
49
|
+
mirror.textContent = field.value.slice(0, at);
|
|
50
|
+
const marker = doc.createElement("span");
|
|
51
|
+
marker.textContent = field.value.slice(at) || ".";
|
|
52
|
+
mirror.append(marker);
|
|
53
|
+
doc.body.append(mirror);
|
|
54
|
+
const height = Number.parseFloat(style.lineHeight) || marker.offsetHeight;
|
|
55
|
+
let left = Number.parseFloat(style.borderLeftWidth) + marker.offsetLeft - field.scrollLeft;
|
|
56
|
+
let top = Number.parseFloat(style.borderTopWidth) + marker.offsetTop - field.scrollTop;
|
|
57
|
+
mirror.remove();
|
|
58
|
+
if (relativeTo) {
|
|
59
|
+
const own = field.getBoundingClientRect();
|
|
60
|
+
const box = relativeTo.getBoundingClientRect();
|
|
61
|
+
left += own.left - box.left;
|
|
62
|
+
top += own.top - box.top;
|
|
63
|
+
}
|
|
64
|
+
return { left, top, height };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { caretPoint, copyTextStyles };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { releaseFocus, usePresence } from './chunk-SNKQNAJI.js';
|
|
2
2
|
import { useRailShape, RailShapeContext, RailLeavingContext } from './chunk-JLOESTT2.js';
|
|
3
3
|
import { useMediaMatch } from './chunk-COS6LJ4K.js';
|
|
4
|
-
import { Menu } from './chunk-
|
|
4
|
+
import { Menu } from './chunk-QHUKJN33.js';
|
|
5
5
|
import { PeekContext, AsideContext } from './chunk-MBEZOURR.js';
|
|
6
6
|
import { ResizeHandle, clampSize } from './chunk-FQ6J4DK7.js';
|
|
7
7
|
import { isApplePlatform, ariaKeyshortcuts, Kbd } from './chunk-VBBLHS2Y.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RefusalStrip, ReceiptStrip } from './chunk-OKPGW76D.js';
|
|
2
2
|
import { ChangeList } from './chunk-BRUJ3XXH.js';
|
|
3
3
|
import { StatusCard } from './chunk-7L75YB57.js';
|
|
4
|
-
import { Checkbox } from './chunk-
|
|
4
|
+
import { Checkbox } from './chunk-DTEDUAEW.js';
|
|
5
5
|
import { Disclosure } from './chunk-D5O64CVE.js';
|
|
6
6
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
7
7
|
import { Spinner } from './chunk-XSPCITPN.js';
|
|
@@ -6,7 +6,7 @@ import { useLayerContainer, viewportBounds, visibleBounds, LAYER_GAP, anchorGone
|
|
|
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,6 +43,7 @@ function Menu({
|
|
|
43
43
|
renderTrigger,
|
|
44
44
|
header,
|
|
45
45
|
tooltip,
|
|
46
|
+
entrance = "rise",
|
|
46
47
|
activeDescendant = false,
|
|
47
48
|
className
|
|
48
49
|
}) {
|
|
@@ -273,6 +274,7 @@ function Menu({
|
|
|
273
274
|
className: cx(
|
|
274
275
|
"crewlet-menu",
|
|
275
276
|
container !== null && container !== document.body ? "crewlet-menu--in-host" : null,
|
|
277
|
+
entrance === "instant" && "crewlet-menu--instant",
|
|
276
278
|
activeDescendant && "crewlet-menu--descendant",
|
|
277
279
|
className
|
|
278
280
|
),
|
|
@@ -1,10 +1,10 @@
|
|
|
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
9
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
10
10
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
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-
|
|
4
|
+
import { Popover } from './chunk-KDRJZWE3.js';
|
|
5
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';
|