@crewlethq/ui 0.100.2 → 0.102.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/AgentHandoffPanel/index.js +6 -6
- package/dist/AppShell/index.js +3 -3
- package/dist/ArrangeList/index.js +1 -1
- package/dist/ArtifactBar/index.js +1 -1
- package/dist/ArtifactCard/index.js +2 -2
- package/dist/AuthLayout/index.js +1 -1
- package/dist/AvatarPicker/index.js +3 -3
- package/dist/BriefCard/index.js +1 -1
- package/dist/CharacterPicker/index.js +2 -2
- package/dist/Combobox/index.js +2 -2
- package/dist/CommandPalette/index.js +4 -4
- package/dist/CommentThread/index.js +6 -6
- package/dist/Composer/index.js +2 -2
- package/dist/DataGrid/DataGrid.d.ts +145 -41
- package/dist/DataGrid/index.d.ts +2 -2
- package/dist/DataGrid/index.js +7 -5
- package/dist/DataGrid/parts.d.ts +163 -0
- package/dist/{DataGrid-SAHEL4SN.css → DataGrid-YNLCEH3E.css} +228 -19
- package/dist/DataTable/index.js +4 -4
- package/dist/DataView/index.js +6 -6
- package/dist/DatasetSource/index.js +1 -1
- package/dist/DeepWorkCard/index.js +1 -1
- package/dist/DocTabsEditor/index.js +4 -4
- package/dist/EditingStatus/index.js +2 -2
- package/dist/EntityList/index.js +1 -1
- package/dist/InlineEditor/index.js +3 -3
- package/dist/KeyValueRows/index.js +3 -3
- package/dist/ListInput/index.js +4 -4
- package/dist/OpenInAppCard/index.js +1 -1
- package/dist/OrgTable/OrgTable.d.ts +5 -20
- package/dist/OrgTable/index.js +10 -3
- package/dist/{OrgTable-XYHEFI5X.css → OrgTable-5NXRECVP.css} +29 -9
- package/dist/PeekRail/index.js +2 -2
- package/dist/PrincipalPicker/index.js +3 -3
- package/dist/ProposalCard/index.js +3 -3
- package/dist/RailList/index.js +3 -2
- package/dist/RefusalCard/index.js +1 -1
- package/dist/RelatedRow/index.js +3 -2
- package/dist/ResultTableCard/index.js +1 -1
- package/dist/RichEditor/index.js +1 -1
- package/dist/SetupWizard/index.js +1 -1
- package/dist/ShareDialog/index.js +2 -2
- package/dist/SheetColumnEditor/index.js +5 -5
- package/dist/SheetGrid/index.js +3 -3
- package/dist/SlideFilmstrip/index.js +2 -2
- package/dist/StatusCard/index.js +1 -1
- package/dist/Switcher/index.js +4 -4
- package/dist/TableCells/TableCells.d.ts +10 -2
- package/dist/TableCells/index.js +4 -3
- package/dist/Text/index.js +2 -1
- package/dist/ThreadSummary/index.js +1 -1
- package/dist/TimeRangePicker/index.js +4 -4
- package/dist/TimeWindowPicker/index.js +4 -4
- package/dist/TreeGrid/TreeGrid.d.ts +143 -12
- package/dist/TreeGrid/index.d.ts +1 -1
- package/dist/TreeGrid/index.js +15 -2
- package/dist/{TreeGrid-H3GHMKZX.css → TreeGrid-XZCH5WCC.css} +232 -2
- package/dist/ValueField/index.js +3 -3
- package/dist/{chunk-G44KKOMB.js → chunk-2LLMUJFB.js} +1 -1
- package/dist/{chunk-BK4KUIAZ.js → chunk-AP6JSZGT.js} +12 -4
- package/dist/chunk-BZUBONYA.js +557 -0
- package/dist/{chunk-PCXMJZTE.js → chunk-DBH7ORCH.js} +1 -1
- package/dist/{chunk-MKTHLT4E.js → chunk-EMXUREKE.js} +1 -1
- package/dist/{chunk-CL3FWLDO.js → chunk-HI47TXSW.js} +1 -1
- package/dist/{chunk-PXYDEDNN.js → chunk-J3QFTG4B.js} +1 -1
- package/dist/{chunk-G6QKJGQQ.js → chunk-L72GPZ56.js} +1 -1
- package/dist/{chunk-HYVYYODN.js → chunk-M6EVTMTK.js} +1 -1
- package/dist/chunk-MO5YV3XV.js +899 -0
- package/dist/{chunk-XQWWA2LG.js → chunk-PAJAGGSE.js} +19 -51
- package/dist/{chunk-NHQ7O4DG.js → chunk-PF6X74C5.js} +3 -3
- package/dist/{chunk-SBVTOIFP.js → chunk-PMO6W5NE.js} +2 -2
- package/dist/chunk-WSIJDWUG.js +10 -0
- package/dist/{chunk-O5CEG7TQ.js → chunk-XLMURU75.js} +1 -6
- package/dist/{chunk-V3QWPHY4.js → chunk-XRKBPNX4.js} +1 -1
- package/dist/generated/index.js +77 -77
- package/dist/index.js +77 -77
- package/dist/styles.css +492 -33
- package/dist/utils/titleIfCut.d.ts +18 -0
- package/package.json +3 -3
- package/dist/chunk-CCNAGB3F.js +0 -591
- package/dist/chunk-CTQZK5J3.js +0 -8
- package/dist/chunk-ERESJG6C.js +0 -353
- package/dist/{Editor-XRI2NOO5.js → Editor-YHHCK5SJ.js} +2 -2
- package/dist/{chunk-NRMF2PKX.js → chunk-3Z2BSKS5.js} +1 -1
- package/dist/{chunk-6IAW2ZIE.js → chunk-5KJOG5YP.js} +2 -2
- package/dist/{chunk-HBHKMFAH.js → chunk-7L6JJ7VJ.js} +1 -1
- package/dist/{chunk-HEXH3HQJ.js → chunk-A5ISYHW7.js} +2 -2
- package/dist/{chunk-CRRW4UGJ.js → chunk-AC255TMQ.js} +1 -1
- package/dist/{chunk-YPXXDYTR.js → chunk-AP6SM6BL.js} +1 -1
- package/dist/{chunk-QCCWXOKK.js → chunk-DK7CXQFY.js} +1 -1
- package/dist/{chunk-GCKHZMWG.js → chunk-E23AXDKL.js} +1 -1
- package/dist/{chunk-V6CVW6PF.js → chunk-GA773IOZ.js} +1 -1
- package/dist/{chunk-TXQ6FZJL.js → chunk-HU5PAZMU.js} +1 -1
- package/dist/{chunk-CTHZHMVG.js → chunk-IA3NL54W.js} +1 -1
- package/dist/{chunk-3JE6YIG5.js → chunk-JZADK2FT.js} +2 -2
- package/dist/{chunk-S4JRQJEP.js → chunk-LNQSNXGJ.js} +1 -1
- package/dist/{chunk-HR5O6PSR.js → chunk-MTKHMGJH.js} +1 -1
- package/dist/{chunk-NIZRR2NN.js → chunk-OAKECTYH.js} +1 -1
- package/dist/{chunk-I2GJLUU3.js → chunk-OU6ZSWEJ.js} +1 -1
- package/dist/{chunk-LNXL22Y7.js → chunk-RSI6EJSH.js} +1 -1
- package/dist/{chunk-BGRYFVSK.js → chunk-XHQ2JJCB.js} +1 -1
- package/dist/{chunk-CQAR3F33.js → chunk-XLVWSNW3.js} +1 -1
package/dist/chunk-ERESJG6C.js
DELETED
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
import { useTreeState, treeExpandable, treeLevel, treePosInSet, treeSetSize, treeItemAction, treePrevious, treeNext, treeStep } from './chunk-MY374UUD.js';
|
|
2
|
-
import { tableTrack } from './chunk-CTQZK5J3.js';
|
|
3
|
-
import { LayerNodeBridge } from './chunk-X4HBZSXA.js';
|
|
4
|
-
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
5
|
-
import { LayerHost, LAYER_REPOSITION_EVENT } from './chunk-FIX72ZEC.js';
|
|
6
|
-
import { focusables } from './chunk-TUEM2XIW.js';
|
|
7
|
-
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
8
|
-
import { cx } from './chunk-ODEQTPFM.js';
|
|
9
|
-
import './TreeGrid-H3GHMKZX.css';
|
|
10
|
-
import { useRef, useState, useLayoutEffect, useEffect, useMemo, useCallback, useImperativeHandle } from 'react';
|
|
11
|
-
import { ChevronRightGlyph } from '@crewlethq/icons/glyphs';
|
|
12
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
var LABELS = {
|
|
15
|
-
expand: (label) => `Expand ${label}`,
|
|
16
|
-
collapse: (label) => `Collapse ${label}`
|
|
17
|
-
};
|
|
18
|
-
function controlIn(cell) {
|
|
19
|
-
return focusables(cell).find((el) => !el.closest('[aria-hidden="true"]')) ?? null;
|
|
20
|
-
}
|
|
21
|
-
var TEXT_INPUTS = /* @__PURE__ */ new Set(["text", "search", "url", "email", "tel", "password", "number"]);
|
|
22
|
-
function caretKey(target, key) {
|
|
23
|
-
const lines = target instanceof HTMLTextAreaElement || target.isContentEditable;
|
|
24
|
-
const field = lines || target instanceof HTMLInputElement && TEXT_INPUTS.has(target.type);
|
|
25
|
-
if (!field) return false;
|
|
26
|
-
if (key === "ArrowLeft" || key === "ArrowRight" || key === "Home" || key === "End") return true;
|
|
27
|
-
return lines && (key === "ArrowUp" || key === "ArrowDown");
|
|
28
|
-
}
|
|
29
|
-
function TreeGrid({
|
|
30
|
-
label,
|
|
31
|
-
columns,
|
|
32
|
-
rows: forest,
|
|
33
|
-
renderCell,
|
|
34
|
-
cellHasControl,
|
|
35
|
-
onRowKey,
|
|
36
|
-
onRowKeyDown,
|
|
37
|
-
hasRowMenu,
|
|
38
|
-
addRow,
|
|
39
|
-
selectedId = null,
|
|
40
|
-
onSelect,
|
|
41
|
-
readOnly,
|
|
42
|
-
defaultExpanded,
|
|
43
|
-
expanded: held,
|
|
44
|
-
onExpandedChange,
|
|
45
|
-
headless = false,
|
|
46
|
-
layout = "scroll",
|
|
47
|
-
onWidthChange,
|
|
48
|
-
labels,
|
|
49
|
-
ref,
|
|
50
|
-
className
|
|
51
|
-
}) {
|
|
52
|
-
const text = { ...LABELS, ...labels };
|
|
53
|
-
const frame = useRef(null);
|
|
54
|
-
const [width, setWidth] = useState(0);
|
|
55
|
-
const reportWidth = useRef(onWidthChange);
|
|
56
|
-
reportWidth.current = onWidthChange;
|
|
57
|
-
const measures = onWidthChange !== void 0 || columns.some((one) => one.hideBelow !== void 0);
|
|
58
|
-
useLayoutEffect(() => {
|
|
59
|
-
const el = frame.current;
|
|
60
|
-
if (!measures || !el) return;
|
|
61
|
-
const read = (next) => setWidth(Math.round(next));
|
|
62
|
-
read(el.getBoundingClientRect().width);
|
|
63
|
-
if (typeof ResizeObserver !== "function") return;
|
|
64
|
-
const observer = new ResizeObserver(([entry]) => {
|
|
65
|
-
if (entry) read(entry.contentRect.width);
|
|
66
|
-
});
|
|
67
|
-
observer.observe(el);
|
|
68
|
-
return () => observer.disconnect();
|
|
69
|
-
}, [measures]);
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
if (width > 0) reportWidth.current?.(width);
|
|
72
|
-
}, [width]);
|
|
73
|
-
const drawn = useMemo(
|
|
74
|
-
() => columns.filter((one) => one.hideBelow === void 0 || width <= 0 || width >= one.hideBelow),
|
|
75
|
-
[columns, width]
|
|
76
|
-
);
|
|
77
|
-
const tree = useTreeState(forest, selectedId, { defaultExpanded, expanded: held, onExpandedChange });
|
|
78
|
-
const { model, expanded, rows, active, setActive, toggle } = tree;
|
|
79
|
-
const [column, setColumn] = useState(null);
|
|
80
|
-
const [menuFor, setMenuFor] = useState(null);
|
|
81
|
-
const current = useRef({ addRow, onSelect });
|
|
82
|
-
current.current = { addRow, onSelect };
|
|
83
|
-
const isAddRow = (id) => current.current.addRow?.(id) ?? null;
|
|
84
|
-
const rowEls = useRef(/* @__PURE__ */ new Map());
|
|
85
|
-
const refs = useRef(/* @__PURE__ */ new Map());
|
|
86
|
-
const rowRef = (id) => {
|
|
87
|
-
let callback = refs.current.get(id);
|
|
88
|
-
if (!callback) {
|
|
89
|
-
callback = (el) => {
|
|
90
|
-
if (el) rowEls.current.set(id, el);
|
|
91
|
-
else rowEls.current.delete(id);
|
|
92
|
-
};
|
|
93
|
-
refs.current.set(id, callback);
|
|
94
|
-
}
|
|
95
|
-
return callback;
|
|
96
|
-
};
|
|
97
|
-
const [request, setRequest] = useState(null);
|
|
98
|
-
const focusAt = useCallback(
|
|
99
|
-
(id, col) => {
|
|
100
|
-
if (current.current.addRow?.(id) == null) current.current.onSelect?.(id);
|
|
101
|
-
setActive(id);
|
|
102
|
-
setColumn(col);
|
|
103
|
-
setRequest({ id, column: col });
|
|
104
|
-
},
|
|
105
|
-
[setActive]
|
|
106
|
-
);
|
|
107
|
-
useLayoutEffect(() => {
|
|
108
|
-
const row = request ? rowEls.current.get(request.id) : void 0;
|
|
109
|
-
if (!request || !row) return;
|
|
110
|
-
if (request.column === null) {
|
|
111
|
-
row.focus();
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const cell = row.querySelector(`[aria-colindex="${request.column}"]`);
|
|
115
|
-
const control = cell ? controlIn(cell) : null;
|
|
116
|
-
(control ?? cell ?? row).focus();
|
|
117
|
-
}, [request]);
|
|
118
|
-
const focusRef = useRef(() => {
|
|
119
|
-
});
|
|
120
|
-
focusRef.current = (id) => {
|
|
121
|
-
if (!model.parent.has(id)) return;
|
|
122
|
-
tree.open(id);
|
|
123
|
-
focusAt(id, null);
|
|
124
|
-
};
|
|
125
|
-
const { expandAll, collapseAll } = tree;
|
|
126
|
-
useImperativeHandle(
|
|
127
|
-
ref,
|
|
128
|
-
() => ({ focusNode: (id) => focusRef.current(id), expandAll, collapseAll }),
|
|
129
|
-
[expandAll, collapseAll]
|
|
130
|
-
);
|
|
131
|
-
function onKeyDownCapture(event) {
|
|
132
|
-
const target = event.target;
|
|
133
|
-
const row = target.closest("[data-tree-id]");
|
|
134
|
-
if (!row) return;
|
|
135
|
-
const id = row.getAttribute("data-tree-id");
|
|
136
|
-
const onRow = target === row;
|
|
137
|
-
const cellIndex = target.closest("[role='gridcell']")?.getAttribute("aria-colindex");
|
|
138
|
-
const col = onRow || !cellIndex ? null : Number(cellIndex);
|
|
139
|
-
const add = isAddRow(id);
|
|
140
|
-
const cells = add ? add.cells : drawn.length;
|
|
141
|
-
const handled = () => {
|
|
142
|
-
event.preventDefault();
|
|
143
|
-
event.stopPropagation();
|
|
144
|
-
};
|
|
145
|
-
if (onRow && add === null) {
|
|
146
|
-
if (onRowKeyDown?.(id, event)) {
|
|
147
|
-
handled();
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
const action = treeItemAction(event);
|
|
151
|
-
if (action === "menu") {
|
|
152
|
-
if (hasRowMenu?.(id)) {
|
|
153
|
-
handled();
|
|
154
|
-
setMenuFor(id);
|
|
155
|
-
}
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
if (action !== null) {
|
|
159
|
-
if (onRowKey?.(id, action)) handled();
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
if (event.ctrlKey || event.metaKey || event.altKey) return;
|
|
164
|
-
const sameColumn = (next) => {
|
|
165
|
-
if (next === null) return;
|
|
166
|
-
const other = isAddRow(next);
|
|
167
|
-
const count = other ? other.cells : drawn.length;
|
|
168
|
-
focusAt(next, col === null ? null : Math.min(col, count));
|
|
169
|
-
};
|
|
170
|
-
if (col !== null && caretKey(target, event.key)) return;
|
|
171
|
-
if (col !== null) {
|
|
172
|
-
switch (event.key) {
|
|
173
|
-
case "ArrowRight":
|
|
174
|
-
handled();
|
|
175
|
-
if (col < cells) focusAt(id, col + 1);
|
|
176
|
-
return;
|
|
177
|
-
case "ArrowLeft":
|
|
178
|
-
handled();
|
|
179
|
-
focusAt(id, col > 1 ? col - 1 : null);
|
|
180
|
-
return;
|
|
181
|
-
case "Home":
|
|
182
|
-
handled();
|
|
183
|
-
focusAt(id, 1);
|
|
184
|
-
return;
|
|
185
|
-
case "End":
|
|
186
|
-
handled();
|
|
187
|
-
focusAt(id, cells);
|
|
188
|
-
return;
|
|
189
|
-
case "ArrowDown":
|
|
190
|
-
handled();
|
|
191
|
-
sameColumn(treeNext(model, expanded, id));
|
|
192
|
-
return;
|
|
193
|
-
case "ArrowUp":
|
|
194
|
-
handled();
|
|
195
|
-
sameColumn(treePrevious(model, expanded, id));
|
|
196
|
-
return;
|
|
197
|
-
default:
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
if (event.key === "ArrowRight" && !(treeExpandable(model, id) && !expanded.has(id))) {
|
|
202
|
-
handled();
|
|
203
|
-
focusAt(id, 1);
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
if (add !== null && event.key === "Enter") {
|
|
207
|
-
handled();
|
|
208
|
-
focusAt(id, 1);
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
const step = treeStep(tree, id, event);
|
|
212
|
-
if (step === void 0) return;
|
|
213
|
-
handled();
|
|
214
|
-
if (step === null) return;
|
|
215
|
-
if ("toggle" in step) toggle(step.toggle);
|
|
216
|
-
else focusAt(step.focus, null);
|
|
217
|
-
}
|
|
218
|
-
const [layer, setLayer] = useState(null);
|
|
219
|
-
const onScroll = () => layer?.dispatchEvent(new CustomEvent(LAYER_REPOSITION_EVENT));
|
|
220
|
-
const stop = (id, col) => id === active && column === col;
|
|
221
|
-
const grid = {
|
|
222
|
-
expanded: (id) => expanded.has(id),
|
|
223
|
-
expandable: (id) => treeExpandable(model, id),
|
|
224
|
-
toggle,
|
|
225
|
-
tabStop: stop,
|
|
226
|
-
opened: (id, col) => {
|
|
227
|
-
setActive(id);
|
|
228
|
-
setColumn(col);
|
|
229
|
-
},
|
|
230
|
-
press: (id) => ({
|
|
231
|
-
onMouseDown: (event) => {
|
|
232
|
-
event.preventDefault();
|
|
233
|
-
focusAt(id, null);
|
|
234
|
-
}
|
|
235
|
-
}),
|
|
236
|
-
menuOpen: (id) => menuFor === id,
|
|
237
|
-
setMenuOpen: (id, open) => setMenuFor((was) => open ? id : was === id ? null : was),
|
|
238
|
-
columnKey: (col) => drawn[col - 1]?.key,
|
|
239
|
-
shown: (key) => drawn.some((one) => one.key === key)
|
|
240
|
-
};
|
|
241
|
-
const template = drawn.map(tableTrack).join(" ");
|
|
242
|
-
return /* @__PURE__ */ jsx(
|
|
243
|
-
"div",
|
|
244
|
-
{
|
|
245
|
-
ref: frame,
|
|
246
|
-
className: cx(
|
|
247
|
-
"crewlet-tree-grid",
|
|
248
|
-
headless && "crewlet-tree-grid--headless",
|
|
249
|
-
layout === "container" && "crewlet-tree-grid--container",
|
|
250
|
-
className
|
|
251
|
-
),
|
|
252
|
-
children: /* @__PURE__ */ jsxs(LayerHost, { className: "crewlet-tree-grid__layer", children: [
|
|
253
|
-
/* @__PURE__ */ jsx("div", { className: "crewlet-tree-grid__scroller", onScroll, children: /* @__PURE__ */ jsxs(
|
|
254
|
-
"div",
|
|
255
|
-
{
|
|
256
|
-
role: "treegrid",
|
|
257
|
-
"aria-label": label,
|
|
258
|
-
"aria-colcount": drawn.length,
|
|
259
|
-
"aria-readonly": readOnly || void 0,
|
|
260
|
-
className: "crewlet-tree-grid__grid",
|
|
261
|
-
style: { "--crewlet-tree-grid-columns": template },
|
|
262
|
-
onKeyDownCapture,
|
|
263
|
-
children: [
|
|
264
|
-
/* @__PURE__ */ jsx("div", { role: "rowgroup", className: "crewlet-tree-grid__head", children: /* @__PURE__ */ jsx("div", { role: "row", className: "crewlet-tree-grid__row", children: drawn.map((one, index) => /* @__PURE__ */ jsx("div", { role: "columnheader", "aria-colindex": index + 1, children: one.headerHidden ? /* @__PURE__ */ jsx(VisuallyHidden, { children: one.header }) : one.header }, one.key)) }) }),
|
|
265
|
-
/* @__PURE__ */ jsx("div", { role: "rowgroup", className: "crewlet-tree-grid__body", children: rows.map((id) => {
|
|
266
|
-
const add = isAddRow(id);
|
|
267
|
-
const cells = add ? add.cells : drawn.length;
|
|
268
|
-
const expandable = treeExpandable(model, id);
|
|
269
|
-
const open = expanded.has(id);
|
|
270
|
-
const name = model.label.get(id) ?? "";
|
|
271
|
-
return (
|
|
272
|
-
/* The row's keys are the GRID's, captured at the treegrid so
|
|
273
|
-
one handler serves every row and reaches a cell's control
|
|
274
|
-
first. A listener on the row itself would be a second
|
|
275
|
-
place for them to live. */
|
|
276
|
-
/* eslint-disable-next-line jsx-a11y/click-events-have-key-events -- see above */
|
|
277
|
-
/* @__PURE__ */ jsx(
|
|
278
|
-
"div",
|
|
279
|
-
{
|
|
280
|
-
role: "row",
|
|
281
|
-
"data-tree-id": id,
|
|
282
|
-
ref: rowRef(id),
|
|
283
|
-
tabIndex: id === active && column === null ? 0 : -1,
|
|
284
|
-
"aria-level": treeLevel(model, id),
|
|
285
|
-
"aria-setsize": treeSetSize(model, id),
|
|
286
|
-
"aria-posinset": treePosInSet(model, id),
|
|
287
|
-
"aria-expanded": expandable ? open : void 0,
|
|
288
|
-
"aria-selected": add ? void 0 : id === selectedId,
|
|
289
|
-
"aria-label": add ? add.label : void 0,
|
|
290
|
-
className: cx("crewlet-tree-grid__row", add && "crewlet-tree-grid__row--add"),
|
|
291
|
-
style: { "--crewlet-tree-grid-depth": treeLevel(model, id) - 1 },
|
|
292
|
-
onClick: (event) => {
|
|
293
|
-
if (!event.currentTarget.contains(event.target)) return;
|
|
294
|
-
if (event.target.closest("button, input, label, [role='menu']")) return;
|
|
295
|
-
focusAt(id, null);
|
|
296
|
-
},
|
|
297
|
-
children: Array.from({ length: cells }, (_, index) => {
|
|
298
|
-
const col = index + 1;
|
|
299
|
-
return /* @__PURE__ */ jsxs(
|
|
300
|
-
"div",
|
|
301
|
-
{
|
|
302
|
-
role: "gridcell",
|
|
303
|
-
"aria-colindex": col,
|
|
304
|
-
tabIndex: stop(id, col) && !cellHasControl?.(id, col, drawn[col - 1]?.key ?? "") ? 0 : -1,
|
|
305
|
-
"data-size": !add && drawn[col - 1]?.size === "sm" ? "sm" : void 0,
|
|
306
|
-
className: "crewlet-tree-grid__cell",
|
|
307
|
-
children: [
|
|
308
|
-
col === 1 && /* THE PRESS LANDS ON THE ROW. The chevron is a
|
|
309
|
-
pointer-only control hidden from assistive
|
|
310
|
-
technology (the keyboard opens and closes a row
|
|
311
|
-
with Right and Left), and focus inside a hidden
|
|
312
|
-
subtree is focus nowhere, so the press is stopped
|
|
313
|
-
from focusing it and the row takes the focus. */
|
|
314
|
-
/* @__PURE__ */ jsx(
|
|
315
|
-
"span",
|
|
316
|
-
{
|
|
317
|
-
className: "crewlet-tree-grid__toggle",
|
|
318
|
-
"data-open": open ? "" : void 0,
|
|
319
|
-
"aria-hidden": "true",
|
|
320
|
-
...grid.press(id),
|
|
321
|
-
children: expandable && /* @__PURE__ */ jsx(
|
|
322
|
-
IconButton,
|
|
323
|
-
{
|
|
324
|
-
size: "sm",
|
|
325
|
-
label: open ? text.collapse(name) : text.expand(name),
|
|
326
|
-
icon: /* @__PURE__ */ jsx(ChevronRightGlyph, {}),
|
|
327
|
-
tabIndex: -1,
|
|
328
|
-
onClick: () => toggle(id)
|
|
329
|
-
}
|
|
330
|
-
)
|
|
331
|
-
}
|
|
332
|
-
),
|
|
333
|
-
renderCell(id, col, grid)
|
|
334
|
-
]
|
|
335
|
-
},
|
|
336
|
-
col
|
|
337
|
-
);
|
|
338
|
-
})
|
|
339
|
-
},
|
|
340
|
-
id
|
|
341
|
-
)
|
|
342
|
-
);
|
|
343
|
-
}) })
|
|
344
|
-
]
|
|
345
|
-
}
|
|
346
|
-
) }),
|
|
347
|
-
/* @__PURE__ */ jsx(LayerNodeBridge, { onNode: setLayer })
|
|
348
|
-
] })
|
|
349
|
-
}
|
|
350
|
-
);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
export { TreeGrid };
|
|
@@ -4,11 +4,11 @@ import './chunk-KOJPDCGQ.js';
|
|
|
4
4
|
import { safeHref, MARKDOWN_CALLOUT_TONES } from './chunk-KBZO4B33.js';
|
|
5
5
|
import { Toolbar } from './chunk-NXFTCPF6.js';
|
|
6
6
|
import { Menu } from './chunk-JK6WLRYP.js';
|
|
7
|
-
import { Button } from './chunk-6KUOHUY5.js';
|
|
8
|
-
import './chunk-XSPCITPN.js';
|
|
9
7
|
import { FormField, Input } from './chunk-56ES76ST.js';
|
|
10
8
|
import './chunk-NICEDVZM.js';
|
|
11
9
|
import './chunk-PGCLHYVP.js';
|
|
10
|
+
import { Button } from './chunk-6KUOHUY5.js';
|
|
11
|
+
import './chunk-XSPCITPN.js';
|
|
12
12
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
13
13
|
import './chunk-TDFLCUBE.js';
|
|
14
14
|
import './chunk-QZKGFBAR.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Select } from './chunk-IAR2ULSK.js';
|
|
2
2
|
import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-EE3DJMSQ.js';
|
|
3
3
|
import { Popover } from './chunk-LCAKSEMB.js';
|
|
4
|
-
import { Button } from './chunk-6KUOHUY5.js';
|
|
5
4
|
import { Input } from './chunk-56ES76ST.js';
|
|
5
|
+
import { Button } from './chunk-6KUOHUY5.js';
|
|
6
6
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
7
7
|
import { isComposing } from './chunk-TUEM2XIW.js';
|
|
8
8
|
import { useFocusModality } from './chunk-4ITETIGZ.js';
|
|
@@ -2,11 +2,11 @@ import { Select } from './chunk-IAR2ULSK.js';
|
|
|
2
2
|
import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chunk-LFSIKGRQ.js';
|
|
3
3
|
import { HueSwatch } from './chunk-PJMDZEWY.js';
|
|
4
4
|
import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
|
|
5
|
-
import { Menu } from './chunk-JK6WLRYP.js';
|
|
6
5
|
import { Checkbox } from './chunk-M6G7XLLP.js';
|
|
6
|
+
import { Menu } from './chunk-JK6WLRYP.js';
|
|
7
|
+
import { FormField, Input } from './chunk-56ES76ST.js';
|
|
7
8
|
import { Kbd } from './chunk-CMAZZY2I.js';
|
|
8
9
|
import { Button } from './chunk-6KUOHUY5.js';
|
|
9
|
-
import { FormField, Input } from './chunk-56ES76ST.js';
|
|
10
10
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
11
11
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
12
12
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -4,9 +4,9 @@ import { RelativeTime } from './chunk-EJNJMHQG.js';
|
|
|
4
4
|
import { Card } from './chunk-U2IQNDDR.js';
|
|
5
5
|
import { AvatarStack } from './chunk-YTLWOHOY.js';
|
|
6
6
|
import { ArtifactKindGround } from './chunk-J5T5TDM2.js';
|
|
7
|
-
import { ArtifactKindGlyph } from './chunk-RSKW25Y5.js';
|
|
8
7
|
import { Checkbox } from './chunk-M6G7XLLP.js';
|
|
9
8
|
import { ArtifactAccessGlyph } from './chunk-DOY3KC6I.js';
|
|
9
|
+
import { ArtifactKindGlyph } from './chunk-RSKW25Y5.js';
|
|
10
10
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
11
11
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
12
12
|
import './ArtifactKinds-27TE3KJL.css';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { releaseFocus, usePresence } from './chunk-PCAT2EFB.js';
|
|
2
2
|
import { useRailShape, RailShapeContext, RailLeavingContext } from './chunk-JLOESTT2.js';
|
|
3
|
-
import { Menu } from './chunk-JK6WLRYP.js';
|
|
4
3
|
import { useMediaMatch } from './chunk-YJQXESOJ.js';
|
|
5
|
-
import {
|
|
4
|
+
import { Menu } from './chunk-JK6WLRYP.js';
|
|
6
5
|
import { PeekContext, AsideContext, ResizeHandle, clampSize } from './chunk-PIYJNCN7.js';
|
|
6
|
+
import { isApplePlatform, ariaKeyshortcuts, Kbd } from './chunk-CMAZZY2I.js';
|
|
7
7
|
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
8
8
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
9
9
|
import { Tooltip } from './chunk-QZKGFBAR.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useListbox, useOptionKeys } from './chunk-YGRTX67J.js';
|
|
2
|
-
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
3
2
|
import { Input } from './chunk-56ES76ST.js';
|
|
3
|
+
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './HitArea-QUOS6ZDJ.css';
|
|
6
6
|
import './Combobox-GBCWXWEB.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Menu } from './chunk-JK6WLRYP.js';
|
|
2
1
|
import { useReorder } from './chunk-BVML4UVB.js';
|
|
2
|
+
import { Menu } from './chunk-JK6WLRYP.js';
|
|
3
3
|
import { Input } from './chunk-56ES76ST.js';
|
|
4
4
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Kbd } from './chunk-CMAZZY2I.js';
|
|
2
1
|
import { Textarea } from './chunk-56ES76ST.js';
|
|
2
|
+
import { Kbd } from './chunk-CMAZZY2I.js';
|
|
3
3
|
import { isComposing } from './chunk-TUEM2XIW.js';
|
|
4
4
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SlideStage } from './chunk-O6EV6GKI.js';
|
|
2
|
-
import { Menu } from './chunk-JK6WLRYP.js';
|
|
3
2
|
import { useReorder } from './chunk-BVML4UVB.js';
|
|
3
|
+
import { Menu } from './chunk-JK6WLRYP.js';
|
|
4
4
|
import { Kbd, isApplePlatform } from './chunk-CMAZZY2I.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Modal } from './chunk-EMDRNB23.js';
|
|
2
2
|
import { useListbox, useHighlightRest } from './chunk-YGRTX67J.js';
|
|
3
|
+
import { Input } from './chunk-56ES76ST.js';
|
|
3
4
|
import { Kbd } from './chunk-CMAZZY2I.js';
|
|
4
5
|
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
5
|
-
import { Input } from './chunk-56ES76ST.js';
|
|
6
6
|
import { isComposing } from './chunk-TUEM2XIW.js';
|
|
7
7
|
import { Count } from './chunk-D2GT3CR4.js';
|
|
8
8
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Button } from './chunk-6KUOHUY5.js';
|
|
2
1
|
import { FormField, Label, Input } from './chunk-56ES76ST.js';
|
|
2
|
+
import { Button } from './chunk-6KUOHUY5.js';
|
|
3
3
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
4
4
|
import { announce } from './chunk-2G355KDJ.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Modal } from './chunk-EMDRNB23.js';
|
|
2
2
|
import { Callout } from './chunk-BPCY7ZID.js';
|
|
3
3
|
import { SegmentedControl } from './chunk-FP6OFRAU.js';
|
|
4
|
-
import { Button } from './chunk-6KUOHUY5.js';
|
|
5
4
|
import { FormField, Input } from './chunk-56ES76ST.js';
|
|
5
|
+
import { Button } from './chunk-6KUOHUY5.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,8 +1,8 @@
|
|
|
1
1
|
import { useReorder } from './chunk-BVML4UVB.js';
|
|
2
|
-
import { Kbd } from './chunk-CMAZZY2I.js';
|
|
3
|
-
import { Button } from './chunk-6KUOHUY5.js';
|
|
4
2
|
import { FormField, Textarea } from './chunk-56ES76ST.js';
|
|
5
3
|
import { characterCountState, CharacterCount, countCharacters } from './chunk-PGCLHYVP.js';
|
|
4
|
+
import { Kbd } from './chunk-CMAZZY2I.js';
|
|
5
|
+
import { Button } from './chunk-6KUOHUY5.js';
|
|
6
6
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
7
7
|
import { isComposing } from './chunk-TUEM2XIW.js';
|
|
8
8
|
import { announce } from './chunk-2G355KDJ.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useRoving, tabStop } from './chunk-EGMQURBR.js';
|
|
2
1
|
import { Avatar } from './chunk-XZY6S3UC.js';
|
|
2
|
+
import { useRoving, tabStop } from './chunk-EGMQURBR.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import { CREWLET_CHARACTERS, CREWLET_CHARACTER_GEOMETRY } from '@crewlethq/icons/characters';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -2,8 +2,8 @@ import { Select } from './chunk-IAR2ULSK.js';
|
|
|
2
2
|
import { Modal } from './chunk-EMDRNB23.js';
|
|
3
3
|
import { CopyButton } from './chunk-ZGKGSW42.js';
|
|
4
4
|
import { Callout } from './chunk-BPCY7ZID.js';
|
|
5
|
-
import { useMediaMatch } from './chunk-YJQXESOJ.js';
|
|
6
5
|
import { PrincipalAvatar } from './chunk-HF5L56YQ.js';
|
|
6
|
+
import { useMediaMatch } from './chunk-YJQXESOJ.js';
|
|
7
7
|
import { Button } from './chunk-6KUOHUY5.js';
|
|
8
8
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
9
9
|
import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
|
|
@@ -6,9 +6,9 @@ import { isEmptyValue, displayText, ratingMax, findPerson, findOption, statusTon
|
|
|
6
6
|
import { presenceLabels } from './chunk-Z7JYG5TF.js';
|
|
7
7
|
import { Tag } from './chunk-SJ3EUCFD.js';
|
|
8
8
|
import { Popover } from './chunk-LCAKSEMB.js';
|
|
9
|
+
import { Avatar } from './chunk-XZY6S3UC.js';
|
|
9
10
|
import { StatusDot } from './chunk-QRE6JCHS.js';
|
|
10
11
|
import { Menu } from './chunk-JK6WLRYP.js';
|
|
11
|
-
import { Avatar } from './chunk-XZY6S3UC.js';
|
|
12
12
|
import { Button } from './chunk-6KUOHUY5.js';
|
|
13
13
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
14
14
|
import { Tooltip } from './chunk-QZKGFBAR.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StatusDot } from './chunk-QRE6JCHS.js';
|
|
2
1
|
import { toISO, useNow, formatRelative } from './chunk-EJNJMHQG.js';
|
|
2
|
+
import { StatusDot } from './chunk-QRE6JCHS.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './EditingStatus-TMGT265J.css';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Modal } from './chunk-EMDRNB23.js';
|
|
2
2
|
import { useClipboard } from './chunk-STJ7QBC3.js';
|
|
3
|
-
import { Menu } from './chunk-JK6WLRYP.js';
|
|
4
3
|
import { EmptyValue } from './chunk-RE3FBGQQ.js';
|
|
5
4
|
import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
|
|
6
5
|
import { Checkbox } from './chunk-M6G7XLLP.js';
|
|
6
|
+
import { Menu } from './chunk-JK6WLRYP.js';
|
|
7
7
|
import { Button } from './chunk-6KUOHUY5.js';
|
|
8
8
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
9
9
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ButtonLink } from './chunk-6KUOHUY5.js';
|
|
2
1
|
import { useAppShellPeek, ResizeHandle } from './chunk-PIYJNCN7.js';
|
|
2
|
+
import { ButtonLink } from './chunk-6KUOHUY5.js';
|
|
3
3
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './HitArea-QUOS6ZDJ.css';
|
|
@@ -2,8 +2,8 @@ import { Modal } from './chunk-EMDRNB23.js';
|
|
|
2
2
|
import { useListbox, useOptionKeys } from './chunk-YGRTX67J.js';
|
|
3
3
|
import { KeyChip, highlightMatch } from './chunk-HBDA76EZ.js';
|
|
4
4
|
import { Popover } from './chunk-LCAKSEMB.js';
|
|
5
|
-
import { useMediaMatch } from './chunk-YJQXESOJ.js';
|
|
6
5
|
import { Skeleton } from './chunk-I4IUX3JF.js';
|
|
6
|
+
import { useMediaMatch } from './chunk-YJQXESOJ.js';
|
|
7
7
|
import { Input } from './chunk-56ES76ST.js';
|
|
8
8
|
import { focusables, isComposing } from './chunk-TUEM2XIW.js';
|
|
9
9
|
import { returnFocus } from './chunk-4ITETIGZ.js';
|