@crewlethq/ui 0.18.0 → 0.19.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 +19 -2
- package/dist/AccessDeniedCard/index.js +2 -2
- package/dist/AppShell/index.js +2 -2
- package/dist/ArrangeBoard/ArrangeBoard.d.ts +32 -0
- package/dist/ArrangeBoard/index.d.ts +3 -0
- package/dist/ArrangeBoard/index.js +2 -0
- package/dist/ArrangeBoard-MQE35P6Z.css +80 -0
- package/dist/ArrangeFrame/ArrangeFrame.d.ts +82 -0
- package/dist/ArrangeFrame/index.d.ts +5 -0
- package/dist/ArrangeFrame/index.js +5 -0
- package/dist/ArrangeFrame/useGridResize.d.ts +66 -0
- package/dist/ArrangeFrame-3PLZAG22.css +329 -0
- package/dist/ArrangeGroup/ArrangeGroup.d.ts +42 -0
- package/dist/ArrangeGroup/index.d.ts +3 -0
- package/dist/ArrangeGroup/index.js +4 -0
- package/dist/ArrangeGroup-SHFHA7BE.css +170 -0
- package/dist/ArrangeList/ArrangeList.d.ts +64 -0
- package/dist/ArrangeList/index.d.ts +3 -0
- package/dist/ArrangeList/index.js +10 -0
- package/dist/ArrangeList-NNRTDFI5.css +94 -0
- package/dist/ArtifactCard/index.js +2 -2
- package/dist/AuthLayout/index.js +2 -2
- package/dist/AvatarPicker/index.js +4 -4
- package/dist/Canvas/index.js +2 -2
- package/dist/Card/index.js +1 -1
- package/dist/Checkbox/index.js +3 -3
- package/dist/Combobox/index.js +4 -4
- package/dist/CommandPalette/index.js +6 -6
- package/dist/Composer/index.js +3 -3
- package/dist/ConfirmField/index.js +3 -3
- package/dist/DataTable/index.js +8 -8
- package/dist/DataView/index.js +13 -13
- package/dist/DateTimePicker/index.js +3 -3
- package/dist/Divider/Divider.d.ts +15 -0
- package/dist/Divider/index.d.ts +3 -0
- package/dist/Divider/index.js +2 -0
- package/dist/Divider-3Z77ZAJH.css +37 -0
- package/dist/HuePicker/HuePicker.d.ts +16 -4
- package/dist/HuePicker/index.js +2 -2
- package/dist/{HuePicker-5QIUR6L7.css → HuePicker-PAIGH6LR.css} +6 -0
- package/dist/IconTile/IconTile.d.ts +23 -0
- package/dist/IconTile/index.d.ts +3 -0
- package/dist/IconTile/index.js +2 -0
- package/dist/IconTile-4GNWTLAW.css +30 -0
- package/dist/Input/index.js +2 -2
- package/dist/LinkInterstitial/index.js +4 -4
- package/dist/ListInput/index.js +5 -5
- package/dist/MarkdownEditor/index.js +2 -2
- package/dist/Menu/index.js +2 -2
- package/dist/Modal/Modal.d.ts +20 -0
- package/dist/Modal/index.js +3 -3
- package/dist/{Modal-RQAYGG4L.css → Modal-XOSV6FAH.css} +14 -0
- package/dist/Note/Note.d.ts +23 -0
- package/dist/Note/index.d.ts +3 -0
- package/dist/Note/index.js +2 -0
- package/dist/Note-RT4L6VUT.css +58 -0
- package/dist/OrgTable/index.js +5 -5
- package/dist/PinTile/PinTile.d.ts +37 -0
- package/dist/PinTile/index.d.ts +3 -0
- package/dist/PinTile/index.js +4 -0
- package/dist/PinTile-IIA25MNZ.css +141 -0
- package/dist/PresenceStack/index.js +1 -1
- package/dist/PrincipalPicker/index.js +5 -5
- package/dist/Reorder/index.d.ts +2 -0
- package/dist/Reorder/index.js +4 -0
- package/dist/Reorder/useReorder.d.ts +138 -0
- package/dist/ShareDialog/index.js +7 -7
- package/dist/SheetGrid/index.js +4 -4
- package/dist/StatGroup/StatGroup.d.ts +7 -1
- package/dist/StatGroup/index.js +1 -1
- package/dist/{StatGroup-HVG6O62W.css → StatGroup-PADTJCUQ.css} +7 -0
- package/dist/Switcher/index.js +8 -8
- package/dist/TagsInput/index.js +3 -3
- package/dist/TimeWindowPicker/index.js +5 -5
- package/dist/TreeCanvas/index.js +3 -3
- package/dist/TreeGrid/index.js +2 -2
- package/dist/chunk-35XVR5JQ.js +81 -0
- package/dist/chunk-63WJLRB2.js +24 -0
- package/dist/{chunk-L4ZLXYPO.js → chunk-6A7P6II6.js} +1 -1
- package/dist/chunk-6KWNXIDE.js +18 -0
- package/dist/chunk-6MIXD6IW.js +49 -0
- package/dist/{chunk-NZY77ZDU.js → chunk-7FQEUNHX.js} +4 -4
- package/dist/{chunk-2TZATTIU.js → chunk-7IJARUIF.js} +18 -5
- package/dist/chunk-AIVZVKYZ.js +126 -0
- package/dist/{chunk-76FXDZAZ.js → chunk-AJESMWJS.js} +4 -4
- package/dist/chunk-DEJHAOC5.js +279 -0
- package/dist/{chunk-ERV5BUS3.js → chunk-EIGEIT4O.js} +3 -3
- package/dist/chunk-FFMCMSJB.js +1 -0
- package/dist/{chunk-LFZ45HV2.js → chunk-G3EEUNZQ.js} +1 -1
- package/dist/{chunk-2YR5ZPQ3.js → chunk-HTCJSUIZ.js} +3 -3
- package/dist/{chunk-75CLJNDQ.js → chunk-I6NZKJGK.js} +1 -1
- package/dist/chunk-IXJHTFXG.js +17 -0
- package/dist/{chunk-3UAA4IWJ.js → chunk-JEDWC3GI.js} +1 -1
- package/dist/{chunk-QVAFL2LE.js → chunk-JXRI5YD2.js} +3 -3
- package/dist/{chunk-ZFH7H7GS.js → chunk-LOLELDBW.js} +1 -1
- package/dist/{chunk-KVT3TJVG.js → chunk-OIMAK5AE.js} +6 -6
- package/dist/chunk-QO7QEQKV.js +24 -0
- package/dist/{chunk-A7EBCHEG.js → chunk-RT323I4I.js} +1 -1
- package/dist/{chunk-BOW2VUCH.js → chunk-T7ICFXEC.js} +1 -1
- package/dist/{chunk-2OLCUNG7.js → chunk-TBIZSQHB.js} +1 -1
- package/dist/{chunk-4U3GQ7D2.js → chunk-TODND5AD.js} +1 -1
- package/dist/{chunk-IFKBDRNJ.js → chunk-UXELEORU.js} +3 -3
- package/dist/{chunk-6NIMZ5XC.js → chunk-VJLYGPPE.js} +1 -1
- package/dist/{chunk-7QFAORCY.js → chunk-WHZFDS62.js} +1 -1
- package/dist/chunk-XJ2QEBMM.js +277 -0
- package/dist/{chunk-PA4CYTBY.js → chunk-XU4ZUGLE.js} +19 -4
- package/dist/{chunk-T3ZWBZ65.js → chunk-YSJYWQSP.js} +2 -2
- package/dist/{chunk-CXBAIVYZ.js → chunk-YSY6UJ4F.js} +1 -1
- package/dist/{chunk-EG6NYWVK.js → chunk-YZCJ63JF.js} +1 -1
- package/dist/generated/index.d.ts +9 -0
- package/dist/generated/index.js +80 -71
- package/dist/index.js +80 -71
- package/dist/styles.css +993 -3
- package/package.json +3 -3
- package/dist/chunk-EXHQ2QVW.js +0 -1
- package/dist/{chunk-ESKP3TXM.js → chunk-4Z7PW3L6.js} +0 -0
- package/dist/{chunk-AQCV62K6.js → chunk-7ZNKEPLN.js} +1 -1
- package/dist/{chunk-OYOQU7O5.js → chunk-EDGCPVVD.js} +1 -1
- package/dist/{chunk-NS7BVLL3.js → chunk-JULMZNGT.js} +1 -1
- package/dist/{chunk-5NVKTB6E.js → chunk-L4H7SSWF.js} +1 -1
- package/dist/{chunk-FYXRWBJJ.js → chunk-PUQY4WXR.js} +2 -2
- package/dist/{chunk-4GB57WIT.js → chunk-Q55TXPA3.js} +1 -1
- package/dist/{chunk-B2Z2CDM5.js → chunk-T5TFZ2JB.js} +1 -1
- package/dist/{chunk-AMH67MLM.js → chunk-TXAFKH2A.js} +1 -1
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { announce } from './chunk-RSAQOKH3.js';
|
|
2
|
+
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
3
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
+
import './ArrangeFrame-3PLZAG22.css';
|
|
5
|
+
import { forwardRef, useRef, useCallback, useState, useEffect } from 'react';
|
|
6
|
+
import { TrashGlyph } from '@crewlethq/icons/glyphs';
|
|
7
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var clamp = (n, lo, hi) => Math.max(lo, Math.min(hi, n));
|
|
10
|
+
function gridOf(node) {
|
|
11
|
+
const grid = node.parentElement;
|
|
12
|
+
const own = node.getBoundingClientRect();
|
|
13
|
+
if (!grid) return { columns: 12, step: own.width, gap: 0, left: 0, width: own.width };
|
|
14
|
+
const style = getComputedStyle(grid);
|
|
15
|
+
const tracks = style.gridTemplateColumns.split(" ").map(parseFloat).filter((n) => !Number.isNaN(n));
|
|
16
|
+
const gap = parseFloat(style.columnGap) || 0;
|
|
17
|
+
const track = tracks[0] ?? grid.clientWidth / 12;
|
|
18
|
+
const box = grid.getBoundingClientRect();
|
|
19
|
+
const padLeft = parseFloat(style.paddingLeft) || 0;
|
|
20
|
+
const padRight = parseFloat(style.paddingRight) || 0;
|
|
21
|
+
return {
|
|
22
|
+
columns: tracks.length || 12,
|
|
23
|
+
step: track + gap,
|
|
24
|
+
gap,
|
|
25
|
+
left: box.left + padLeft - own.left,
|
|
26
|
+
width: box.width - padLeft - padRight
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function useGridResize(frame, { name, size, rowHeight, minColumns = 1, maxColumns, minRows = 2, maxRows = 60, vertical = true, onResize }) {
|
|
30
|
+
const [live, setLive] = useState(null);
|
|
31
|
+
const [guides, setGuides] = useState(null);
|
|
32
|
+
const drag = useRef(null);
|
|
33
|
+
const say = useCallback(
|
|
34
|
+
(next, columns) => {
|
|
35
|
+
const height = next.rows === null ? "its height fits its content" : `${next.rows * rowHeight} pixels tall`;
|
|
36
|
+
announce(`${name}: ${next.columns} of ${columns} columns wide, ${height}.`);
|
|
37
|
+
},
|
|
38
|
+
[name, rowHeight]
|
|
39
|
+
);
|
|
40
|
+
const cancel = useCallback(() => {
|
|
41
|
+
drag.current = null;
|
|
42
|
+
setLive(null);
|
|
43
|
+
setGuides(null);
|
|
44
|
+
}, []);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (!live) return;
|
|
47
|
+
const onKey = (e) => {
|
|
48
|
+
if (e.key === "Escape") cancel();
|
|
49
|
+
};
|
|
50
|
+
window.addEventListener("keydown", onKey);
|
|
51
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
52
|
+
}, [live, cancel]);
|
|
53
|
+
const sizeAt = (d, x, y) => {
|
|
54
|
+
const hi = Math.min(maxColumns ?? d.columns, d.columns);
|
|
55
|
+
const columns = clamp(Math.round((d.width + (x - d.x) + d.gap) / d.step), Math.min(minColumns, hi), hi);
|
|
56
|
+
const dy = y - d.y;
|
|
57
|
+
const rows = !vertical ? size.rows : size.rows === null && Math.abs(dy) < rowHeight / 2 ? null : clamp(Math.round((d.height + dy) / rowHeight), minRows, maxRows);
|
|
58
|
+
return { columns, rows };
|
|
59
|
+
};
|
|
60
|
+
const handleProps = {
|
|
61
|
+
"aria-label": `Resize ${name}`,
|
|
62
|
+
"aria-keyshortcuts": "ArrowLeft ArrowRight ArrowUp ArrowDown Enter",
|
|
63
|
+
onPointerDown: (event) => {
|
|
64
|
+
if (event.button !== 0 || !frame.current) return;
|
|
65
|
+
event.preventDefault();
|
|
66
|
+
event.stopPropagation();
|
|
67
|
+
try {
|
|
68
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
69
|
+
} catch {
|
|
70
|
+
}
|
|
71
|
+
const rect = frame.current.getBoundingClientRect();
|
|
72
|
+
const grid = gridOf(frame.current);
|
|
73
|
+
drag.current = {
|
|
74
|
+
pointer: event.pointerId,
|
|
75
|
+
x: event.clientX,
|
|
76
|
+
y: event.clientY,
|
|
77
|
+
width: rect.width,
|
|
78
|
+
height: rect.height,
|
|
79
|
+
step: grid.step,
|
|
80
|
+
gap: grid.gap,
|
|
81
|
+
columns: grid.columns
|
|
82
|
+
};
|
|
83
|
+
setGuides({ left: grid.left, width: grid.width, columns: grid.columns, gap: grid.gap });
|
|
84
|
+
setLive(size);
|
|
85
|
+
},
|
|
86
|
+
onPointerMove: (event) => {
|
|
87
|
+
const d = drag.current;
|
|
88
|
+
if (!d || d.pointer !== event.pointerId) return;
|
|
89
|
+
const next = sizeAt(d, event.clientX, event.clientY);
|
|
90
|
+
setLive((was) => was && was.columns === next.columns && was.rows === next.rows ? was : next);
|
|
91
|
+
},
|
|
92
|
+
onPointerUp: (event) => {
|
|
93
|
+
const d = drag.current;
|
|
94
|
+
if (!d || d.pointer !== event.pointerId) return;
|
|
95
|
+
const next = sizeAt(d, event.clientX, event.clientY);
|
|
96
|
+
drag.current = null;
|
|
97
|
+
setLive(null);
|
|
98
|
+
setGuides(null);
|
|
99
|
+
if (next.columns !== size.columns || next.rows !== size.rows) {
|
|
100
|
+
onResize(next);
|
|
101
|
+
say(next, d.columns);
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
onPointerCancel: cancel,
|
|
105
|
+
onKeyDown: (event) => {
|
|
106
|
+
if (!frame.current || event.altKey || event.ctrlKey || event.metaKey) return;
|
|
107
|
+
const grid = gridOf(frame.current);
|
|
108
|
+
const hi = Math.min(maxColumns ?? grid.columns, grid.columns);
|
|
109
|
+
const rowsNow = size.rows ?? Math.round(frame.current.getBoundingClientRect().height / rowHeight);
|
|
110
|
+
let next = null;
|
|
111
|
+
if (event.key === "ArrowLeft") next = { ...size, columns: clamp(size.columns - 1, Math.min(minColumns, hi), hi) };
|
|
112
|
+
if (event.key === "ArrowRight") next = { ...size, columns: clamp(size.columns + 1, Math.min(minColumns, hi), hi) };
|
|
113
|
+
if (vertical && event.key === "ArrowUp") next = { ...size, rows: clamp(rowsNow - 1, minRows, maxRows) };
|
|
114
|
+
if (vertical && event.key === "ArrowDown") next = { ...size, rows: clamp(rowsNow + 1, minRows, maxRows) };
|
|
115
|
+
if (vertical && event.key === "Enter") next = { ...size, rows: null };
|
|
116
|
+
if (!next) return;
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
if (next.columns === size.columns && next.rows === size.rows) return;
|
|
120
|
+
onResize(next);
|
|
121
|
+
say(next, grid.columns);
|
|
122
|
+
},
|
|
123
|
+
onDoubleClick: () => {
|
|
124
|
+
if (!vertical || size.rows === null) return;
|
|
125
|
+
const next = { ...size, rows: null };
|
|
126
|
+
onResize(next);
|
|
127
|
+
say(next, frame.current ? gridOf(frame.current).columns : 12);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
return { live, guides, handleProps };
|
|
131
|
+
}
|
|
132
|
+
var FIELDS = 'input, textarea, select, [contenteditable="true"]';
|
|
133
|
+
function assign(ref, value) {
|
|
134
|
+
if (typeof ref === "function") ref(value);
|
|
135
|
+
else if (ref) ref.current = value;
|
|
136
|
+
}
|
|
137
|
+
var ArrangeFrame = forwardRef(function ArrangeFrame2({
|
|
138
|
+
name,
|
|
139
|
+
editing,
|
|
140
|
+
columns,
|
|
141
|
+
rows = null,
|
|
142
|
+
rowHeight = 24,
|
|
143
|
+
handle,
|
|
144
|
+
resize,
|
|
145
|
+
actions,
|
|
146
|
+
onRemove,
|
|
147
|
+
fixed,
|
|
148
|
+
container = false,
|
|
149
|
+
bare = false,
|
|
150
|
+
selected = false,
|
|
151
|
+
fresh,
|
|
152
|
+
className,
|
|
153
|
+
style,
|
|
154
|
+
children,
|
|
155
|
+
...rest
|
|
156
|
+
}, ref) {
|
|
157
|
+
const node = useRef(null);
|
|
158
|
+
const setNode = useCallback(
|
|
159
|
+
(el) => {
|
|
160
|
+
node.current = el;
|
|
161
|
+
assign(ref, el);
|
|
162
|
+
},
|
|
163
|
+
[ref]
|
|
164
|
+
);
|
|
165
|
+
const vertical = resize?.vertical !== false;
|
|
166
|
+
const { live, guides, handleProps: resizeProps } = useGridResize(node, {
|
|
167
|
+
name,
|
|
168
|
+
size: { columns, rows },
|
|
169
|
+
rowHeight,
|
|
170
|
+
minColumns: resize?.minColumns,
|
|
171
|
+
maxColumns: resize?.maxColumns,
|
|
172
|
+
minRows: resize?.minRows,
|
|
173
|
+
maxRows: resize?.maxRows,
|
|
174
|
+
vertical,
|
|
175
|
+
onResize: (next) => resize?.onResize(next)
|
|
176
|
+
});
|
|
177
|
+
const shown = live ?? { columns, rows };
|
|
178
|
+
const placed = {
|
|
179
|
+
...style,
|
|
180
|
+
gridColumn: `span ${shown.columns}`,
|
|
181
|
+
...shown.rows !== null ? { height: `${shown.rows * rowHeight}px` } : {}
|
|
182
|
+
};
|
|
183
|
+
const onField = useRef(false);
|
|
184
|
+
const surface = editing && handle ? {
|
|
185
|
+
draggable: true,
|
|
186
|
+
tabIndex: 0,
|
|
187
|
+
role: "group",
|
|
188
|
+
"aria-label": name,
|
|
189
|
+
"aria-describedby": handle["aria-describedby"],
|
|
190
|
+
onPointerDownCapture: (event) => {
|
|
191
|
+
onField.current = event.target.closest(FIELDS) !== null;
|
|
192
|
+
},
|
|
193
|
+
onDragStart: (event) => {
|
|
194
|
+
if (onField.current) event.preventDefault();
|
|
195
|
+
else handle.onDragStart(event);
|
|
196
|
+
},
|
|
197
|
+
onDragEnd: handle.onDragEnd,
|
|
198
|
+
// The block's own keys only: arrows typed in a group's name move the caret.
|
|
199
|
+
onKeyDown: (event) => {
|
|
200
|
+
if (event.target === event.currentTarget) handle.onKeyDown(event);
|
|
201
|
+
}
|
|
202
|
+
} : {};
|
|
203
|
+
const resizeName = vertical ? `Resize ${name}` : `Change the width of ${name}`;
|
|
204
|
+
return /* @__PURE__ */ jsxs(
|
|
205
|
+
"div",
|
|
206
|
+
{
|
|
207
|
+
ref: setNode,
|
|
208
|
+
className: cx(
|
|
209
|
+
"crewlet-arrange-frame",
|
|
210
|
+
editing && "is-editing",
|
|
211
|
+
container && "is-container",
|
|
212
|
+
bare && "is-bare",
|
|
213
|
+
editing && selected && "is-selected",
|
|
214
|
+
live && "is-resizing",
|
|
215
|
+
shown.rows !== null && "is-fixed-height",
|
|
216
|
+
fresh && "is-fresh",
|
|
217
|
+
className
|
|
218
|
+
),
|
|
219
|
+
style: placed,
|
|
220
|
+
"data-columns": shown.columns,
|
|
221
|
+
...surface,
|
|
222
|
+
...rest,
|
|
223
|
+
children: [
|
|
224
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-arrange-frame__content", inert: editing && !container || void 0, children }),
|
|
225
|
+
editing ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
226
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-arrange-frame__bar", role: "group", "aria-label": `Tools for ${name}`, children: [
|
|
227
|
+
actions,
|
|
228
|
+
onRemove || fixed ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
229
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-arrange-frame__sep", "aria-hidden": "true" }),
|
|
230
|
+
/* @__PURE__ */ jsx(
|
|
231
|
+
IconButton,
|
|
232
|
+
{
|
|
233
|
+
size: "sm",
|
|
234
|
+
variant: "ghost-danger",
|
|
235
|
+
label: `Remove ${name}`,
|
|
236
|
+
icon: /* @__PURE__ */ jsx(TrashGlyph, { size: "sm" }),
|
|
237
|
+
...fixed ? { disabledReason: fixed } : {},
|
|
238
|
+
onClick: () => onRemove?.()
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
] }) : null
|
|
242
|
+
] }),
|
|
243
|
+
resize ? /* @__PURE__ */ jsx(
|
|
244
|
+
"button",
|
|
245
|
+
{
|
|
246
|
+
type: "button",
|
|
247
|
+
className: cx("crewlet-arrange-frame__resize", vertical ? "is-corner" : "is-edge"),
|
|
248
|
+
title: vertical ? `${resizeName}. Double click to fit the height to its content.` : resizeName,
|
|
249
|
+
draggable: false,
|
|
250
|
+
...resizeProps,
|
|
251
|
+
"aria-label": resizeName,
|
|
252
|
+
children: /* @__PURE__ */ jsx("span", { className: "crewlet-arrange-frame__grip", "aria-hidden": "true" })
|
|
253
|
+
}
|
|
254
|
+
) : null,
|
|
255
|
+
guides ? /* @__PURE__ */ jsx(
|
|
256
|
+
"span",
|
|
257
|
+
{
|
|
258
|
+
className: "crewlet-arrange-frame__guides",
|
|
259
|
+
"aria-hidden": "true",
|
|
260
|
+
style: {
|
|
261
|
+
left: `${guides.left}px`,
|
|
262
|
+
width: `${guides.width}px`,
|
|
263
|
+
gridTemplateColumns: `repeat(${guides.columns}, minmax(0, 1fr))`,
|
|
264
|
+
columnGap: `${guides.gap}px`
|
|
265
|
+
},
|
|
266
|
+
children: Array.from({ length: guides.columns }, (_, i) => /* @__PURE__ */ jsx("span", {}, i))
|
|
267
|
+
}
|
|
268
|
+
) : null,
|
|
269
|
+
live ? /* @__PURE__ */ jsxs("span", { className: "crewlet-arrange-frame__size", "aria-hidden": "true", children: [
|
|
270
|
+
`${live.columns} ${live.columns === 1 ? "column" : "columns"}`,
|
|
271
|
+
vertical ? ` \xB7 ${live.rows === null ? "Height fits content" : `${live.rows * rowHeight} px tall`}` : ""
|
|
272
|
+
] }) : null
|
|
273
|
+
] }) : null
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
);
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
export { ArrangeFrame, useGridResize };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Select } from './chunk-FC4YTTFJ.js';
|
|
2
|
-
import { Input } from './chunk-4GB57WIT.js';
|
|
3
|
-
import { Popover } from './chunk-BWRGFKJP.js';
|
|
4
2
|
import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-GXQ3B46I.js';
|
|
5
3
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
6
|
-
import {
|
|
4
|
+
import { Input } from './chunk-Q55TXPA3.js';
|
|
5
|
+
import { Popover } from './chunk-BWRGFKJP.js';
|
|
7
6
|
import { isComposing } from './chunk-R25RGPUB.js';
|
|
7
|
+
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
8
8
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
9
9
|
import './TimeWindowPicker-BZ5HHATU.css';
|
|
10
10
|
import { useMemo, useState, useRef, useId, useEffect } from 'react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './HuePicker-PAIGH6LR.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmptyState } from './chunk-RA2ULG6H.js';
|
|
2
|
-
import { Card } from './chunk-
|
|
2
|
+
import { Card } from './chunk-YZCJ63JF.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './AccessDeniedCard-WXM5DBDZ.css';
|
|
5
5
|
import { ShieldGlyph, LockGlyph, EyeOffGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Select } from './chunk-FC4YTTFJ.js';
|
|
2
|
-
import { Modal } from './chunk-2TZATTIU.js';
|
|
3
2
|
import { CopyButton } from './chunk-W46LPU4R.js';
|
|
3
|
+
import { Modal } from './chunk-7IJARUIF.js';
|
|
4
4
|
import { Callout } from './chunk-SVSCLHHI.js';
|
|
5
5
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
6
|
-
import { useMediaMatch } from './chunk-IG75YMUN.js';
|
|
7
|
-
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
8
6
|
import { PrincipalAvatar } from './chunk-4KP4RC3O.js';
|
|
9
7
|
import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
|
|
8
|
+
import { useMediaMatch } from './chunk-IG75YMUN.js';
|
|
9
|
+
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
10
10
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
11
11
|
import './ShareDialog-YZ4F37MW.css';
|
|
12
12
|
import { useState, useId } from 'react';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
|
+
import './IconTile-4GNWTLAW.css';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function IconTile({ children, hue, size = "md", className, ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
"span",
|
|
8
|
+
{
|
|
9
|
+
"aria-hidden": "true",
|
|
10
|
+
...rest,
|
|
11
|
+
className: cx("crewlet-icon-tile", `crewlet-icon-tile--${size}`, hue && `crewlet-icon-tile--${hue}`, className),
|
|
12
|
+
children
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { IconTile };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
|
-
import './StatGroup-
|
|
2
|
+
import './StatGroup-PADTJCUQ.css';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
function StatGroup({ columns = 4, className, children, ...rest }) {
|
|
5
|
+
function StatGroup({ columns = 4, flush = false, className, children, ...rest }) {
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
...rest,
|
|
10
|
-
className: cx("crewlet-stat-group", className),
|
|
10
|
+
className: cx("crewlet-stat-group", flush && "crewlet-stat-group--flush", className),
|
|
11
11
|
style: { "--crewlet-stat-group-cols": columns, ...rest.style },
|
|
12
12
|
children
|
|
13
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useListbox } from './chunk-F73MC7EZ.js';
|
|
2
|
-
import { Input } from './chunk-
|
|
2
|
+
import { Input } from './chunk-Q55TXPA3.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './Combobox-4FUVYIE7.css';
|
|
5
5
|
import { forwardRef, useId, useMemo, useRef, useCallback } from 'react';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { PageHeader } from './chunk-HOXGBLEY.js';
|
|
2
2
|
import { Toolbar } from './chunk-PGRPNDWM.js';
|
|
3
|
-
import { DataTable } from './chunk-
|
|
4
|
-
import { Menu } from './chunk-
|
|
5
|
-
import { DateTimePicker } from './chunk-
|
|
3
|
+
import { DataTable } from './chunk-AJESMWJS.js';
|
|
4
|
+
import { Menu } from './chunk-JULMZNGT.js';
|
|
5
|
+
import { DateTimePicker } from './chunk-L4H7SSWF.js';
|
|
6
6
|
import { useListbox, useOptionKeys } from './chunk-F73MC7EZ.js';
|
|
7
7
|
import { Kbd } from './chunk-SMBKXWML.js';
|
|
8
|
-
import { Input } from './chunk-4GB57WIT.js';
|
|
9
|
-
import { Popover } from './chunk-BWRGFKJP.js';
|
|
10
8
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
11
|
-
import {
|
|
9
|
+
import { Input } from './chunk-Q55TXPA3.js';
|
|
12
10
|
import { RelativeTime } from './chunk-3CZ7XAVY.js';
|
|
11
|
+
import { Popover } from './chunk-BWRGFKJP.js';
|
|
13
12
|
import { Count } from './chunk-BHHIIK3M.js';
|
|
13
|
+
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
14
14
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
15
15
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
16
16
|
import './DataView-N6JX464S.css';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
|
+
import './ArrangeBoard-MQE35P6Z.css';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function ArrangeBoard({
|
|
6
|
+
editing,
|
|
7
|
+
columns = 12,
|
|
8
|
+
className,
|
|
9
|
+
style,
|
|
10
|
+
children,
|
|
11
|
+
...rest
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: cx("crewlet-arrange-board", editing && "is-editing", className),
|
|
17
|
+
style: { ...style, "--crewlet-arrange-board-columns": columns },
|
|
18
|
+
...rest,
|
|
19
|
+
children
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { ArrangeBoard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTreeState, useMeasuredSizes, layoutForest, treeAncestors, useLayoutAnchor, treeExpandable, layoutConnectors, treeItemAction, treeStep, treePosInSet, treeSetSize, treeLevel, placeGroups } from './chunk-MY374UUD.js';
|
|
2
|
-
import { CANVAS_COMPOSE_CONTEXT, CANVAS_FIT_MAX_ZOOM, Canvas } from './chunk-
|
|
2
|
+
import { CANVAS_COMPOSE_CONTEXT, CANVAS_FIT_MAX_ZOOM, Canvas } from './chunk-TXAFKH2A.js';
|
|
3
3
|
import { focusables } from './chunk-R25RGPUB.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './TreeCanvas-L2XYONWL.css';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PrincipalAvatar } from './chunk-4KP4RC3O.js';
|
|
2
2
|
import { RelativeTime } from './chunk-3CZ7XAVY.js';
|
|
3
3
|
import { AvatarStack } from './chunk-UAN5NE7M.js';
|
|
4
|
-
import { Card } from './chunk-
|
|
4
|
+
import { Card } from './chunk-YZCJ63JF.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
7
|
import './ArtifactCard-EXVAEBV6.css';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Modal } from './chunk-
|
|
1
|
+
import { Modal } from './chunk-7IJARUIF.js';
|
|
2
2
|
import { useListbox, useHighlightRest } from './chunk-F73MC7EZ.js';
|
|
3
3
|
import { Kbd } from './chunk-SMBKXWML.js';
|
|
4
|
-
import { Input } from './chunk-
|
|
5
|
-
import { isComposing } from './chunk-R25RGPUB.js';
|
|
4
|
+
import { Input } from './chunk-Q55TXPA3.js';
|
|
6
5
|
import { Count } from './chunk-BHHIIK3M.js';
|
|
6
|
+
import { isComposing } from './chunk-R25RGPUB.js';
|
|
7
7
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
8
8
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
9
9
|
import './CommandPalette-HBTNKHZQ.css';
|