@estiva-app/ui 0.103.0 → 0.104.2
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/MoveDialog.d.ts +12 -1
- package/dist/MoveDialog.d.ts.map +1 -1
- package/dist/ResolveDialog.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +337 -329
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/registry.json +8 -2
- package/src/MoveDialog.mdx +6 -0
- package/src/MoveDialog.stories.tsx +13 -0
- package/src/MoveDialog.test.tsx +40 -1
- package/src/MoveDialog.tsx +19 -1
- package/src/ResolveDialog.test.tsx +11 -0
- package/src/ResolveDialog.tsx +5 -2
- package/src/gates/gates.test.ts +13 -1
- package/src/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1202,32 +1202,87 @@ function MembersPill({ members, count, onClick, className }) {
|
|
|
1202
1202
|
// src/MoveDialog.tsx
|
|
1203
1203
|
import { useEffect as useEffect4, useRef as useRef7, useState as useState5 } from "react";
|
|
1204
1204
|
|
|
1205
|
+
// src/Checkbox.tsx
|
|
1206
|
+
import { Checkbox as BaseCheckbox } from "@base-ui/react/checkbox";
|
|
1207
|
+
import { Field as BaseField } from "@base-ui/react/field";
|
|
1208
|
+
import { IconCheck } from "@tabler/icons-react";
|
|
1209
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1210
|
+
function squareClasses(checked, disabled, interactive, className) {
|
|
1211
|
+
return cn(
|
|
1212
|
+
"inline-flex items-center justify-center size-4 shrink-0 rounded-sm border transition-colors",
|
|
1213
|
+
checked ? "bg-accent-primary border-accent-primary text-text-inverse" : "bg-transparent border-border-strong hover:border-text-muted",
|
|
1214
|
+
disabled && "opacity-50 pointer-events-none",
|
|
1215
|
+
interactive ? "cursor-pointer" : "pointer-events-none",
|
|
1216
|
+
className
|
|
1217
|
+
);
|
|
1218
|
+
}
|
|
1219
|
+
var tickClasses = (checked) => cn("flex", !checked && "invisible");
|
|
1220
|
+
var WORDS_CLASSES = "text-body-2 text-text-primary";
|
|
1221
|
+
var ROW_CLASSES = "flex shrink-0 items-center gap-3 h-10 px-3 rounded-lg transition-colors";
|
|
1222
|
+
function Checkbox({ checked, onChange, disabled: ownDisabled = false, label, row, leading, className, ...aria }) {
|
|
1223
|
+
const formBusy = useFormBusy();
|
|
1224
|
+
const disabled = ownDisabled || formBusy;
|
|
1225
|
+
if (!onChange) {
|
|
1226
|
+
const picture = /* @__PURE__ */ jsx17("span", { "aria-hidden": "true", className: squareClasses(checked, disabled, false, className), children: /* @__PURE__ */ jsx17("span", { className: tickClasses(checked), children: /* @__PURE__ */ jsx17(IconCheck, { size: 12, stroke: 3 }) }) });
|
|
1227
|
+
if (label === void 0) return picture;
|
|
1228
|
+
return /* @__PURE__ */ jsxs11("span", { className: "flex items-center gap-2", children: [
|
|
1229
|
+
picture,
|
|
1230
|
+
/* @__PURE__ */ jsx17("span", { className: WORDS_CLASSES, children: label })
|
|
1231
|
+
] });
|
|
1232
|
+
}
|
|
1233
|
+
const box = /* @__PURE__ */ jsx17(
|
|
1234
|
+
BaseCheckbox.Root,
|
|
1235
|
+
{
|
|
1236
|
+
checked,
|
|
1237
|
+
disabled,
|
|
1238
|
+
"aria-label": aria["aria-label"],
|
|
1239
|
+
"aria-required": aria["aria-required"],
|
|
1240
|
+
onCheckedChange: (next) => onChange(next),
|
|
1241
|
+
onClick: (e) => e.stopPropagation(),
|
|
1242
|
+
className: (state) => squareClasses(state.checked, state.disabled, true, className),
|
|
1243
|
+
children: /* @__PURE__ */ jsx17(BaseCheckbox.Indicator, { keepMounted: true, className: (state) => tickClasses(state.checked), children: /* @__PURE__ */ jsx17(IconCheck, { size: 12, stroke: 3 }) })
|
|
1244
|
+
}
|
|
1245
|
+
);
|
|
1246
|
+
if (label === void 0) return box;
|
|
1247
|
+
if (row) {
|
|
1248
|
+
return /* @__PURE__ */ jsx17(BaseField.Root, { disabled, children: /* @__PURE__ */ jsxs11(BaseField.Label, { className: cn(ROW_CLASSES, checked && "bg-bg-selected", !disabled && "cursor-pointer hover:bg-bg-hover"), children: [
|
|
1249
|
+
leading,
|
|
1250
|
+
/* @__PURE__ */ jsx17("span", { className: cn("flex-1 min-w-0 truncate", WORDS_CLASSES), children: label }),
|
|
1251
|
+
box
|
|
1252
|
+
] }) });
|
|
1253
|
+
}
|
|
1254
|
+
return /* @__PURE__ */ jsx17(BaseField.Root, { disabled, children: /* @__PURE__ */ jsxs11(BaseField.Label, { className: cn("flex items-center gap-2", !disabled && "cursor-pointer"), children: [
|
|
1255
|
+
box,
|
|
1256
|
+
/* @__PURE__ */ jsx17("span", { className: WORDS_CLASSES, children: label })
|
|
1257
|
+
] }) });
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1205
1260
|
// src/EmptyState.tsx
|
|
1206
1261
|
import { IconMessage2 } from "@tabler/icons-react";
|
|
1207
|
-
import { jsx as
|
|
1262
|
+
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1208
1263
|
function EmptyState({ icon, message, scope = "page", action, className }) {
|
|
1209
1264
|
if (scope === "rows") {
|
|
1210
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ jsx18("div", { className: cn("px-2 py-1", className), children: /* @__PURE__ */ jsx18("p", { className: "text-caption text-text-muted", children: message }) });
|
|
1211
1266
|
}
|
|
1212
1267
|
if (scope === "section") {
|
|
1213
|
-
const line = /* @__PURE__ */
|
|
1268
|
+
const line = /* @__PURE__ */ jsx18("p", { className: cn("text-caption text-text-muted", !action && className), children: message });
|
|
1214
1269
|
if (!action) return line;
|
|
1215
|
-
return /* @__PURE__ */
|
|
1270
|
+
return /* @__PURE__ */ jsxs12("div", { className: cn("flex items-center justify-between gap-2", className), children: [
|
|
1216
1271
|
line,
|
|
1217
|
-
/* @__PURE__ */
|
|
1272
|
+
/* @__PURE__ */ jsx18(Button, { variant: "muted", onClick: action.onClick, children: action.label })
|
|
1218
1273
|
] });
|
|
1219
1274
|
}
|
|
1220
|
-
return /* @__PURE__ */
|
|
1221
|
-
/* @__PURE__ */
|
|
1222
|
-
/* @__PURE__ */
|
|
1223
|
-
action && /* @__PURE__ */
|
|
1275
|
+
return /* @__PURE__ */ jsxs12("div", { className: cn("flex flex-1 flex-col items-center justify-center gap-2", className), children: [
|
|
1276
|
+
/* @__PURE__ */ jsx18("span", { className: "text-text-secondary", children: icon ?? /* @__PURE__ */ jsx18(IconMessage2, { size: 16, stroke: 1.5 }) }),
|
|
1277
|
+
/* @__PURE__ */ jsx18("p", { className: "text-body-2 text-text-secondary text-center", children: message }),
|
|
1278
|
+
action && /* @__PURE__ */ jsx18(Button, { variant: "outlined", className: "mt-2", onClick: action.onClick, children: action.label })
|
|
1224
1279
|
] });
|
|
1225
1280
|
}
|
|
1226
1281
|
|
|
1227
1282
|
// src/Field.tsx
|
|
1228
1283
|
import { cloneElement, isValidElement } from "react";
|
|
1229
|
-
import { Field as
|
|
1230
|
-
import { jsx as
|
|
1284
|
+
import { Field as BaseField2 } from "@base-ui/react/field";
|
|
1285
|
+
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1231
1286
|
var LINE_STYLES = {
|
|
1232
1287
|
helper: "text-caption text-text-muted",
|
|
1233
1288
|
warning: "text-caption text-warning-default",
|
|
@@ -1241,20 +1296,20 @@ function Field({ label, required = false, helper, error, children }) {
|
|
|
1241
1296
|
// `group/field`: the label, the box and the line under it are one thing under the pointer —
|
|
1242
1297
|
// anywhere in it strengthens the box's border, as hovering the box does (Katerina, 28 September).
|
|
1243
1298
|
// Before, the 8px between the label and the box was a gap where the border went out again.
|
|
1244
|
-
/* @__PURE__ */
|
|
1245
|
-
/* @__PURE__ */
|
|
1299
|
+
/* @__PURE__ */ jsxs13(BaseField2.Root, { invalid: !!error, className: "group/field flex flex-col gap-2", children: [
|
|
1300
|
+
/* @__PURE__ */ jsxs13(BaseField2.Label, { className: cn("text-input-label text-text-primary", required && "flex items-center"), children: [
|
|
1246
1301
|
label,
|
|
1247
|
-
required && /* @__PURE__ */
|
|
1302
|
+
required && /* @__PURE__ */ jsx19("span", { "aria-hidden": "true", className: "text-error-default ml-0.5", children: "*" })
|
|
1248
1303
|
] }),
|
|
1249
|
-
/* @__PURE__ */
|
|
1304
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-1.5", children: [
|
|
1250
1305
|
control,
|
|
1251
|
-
error != null ? /* @__PURE__ */
|
|
1306
|
+
error != null ? /* @__PURE__ */ jsx19(BaseField2.Error, { match: true, className: LINE_STYLES.error, children: error }) : helper != null ? /* @__PURE__ */ jsx19(BaseField2.Description, { className: LINE_STYLES.helper, children: helper }) : null
|
|
1252
1307
|
] })
|
|
1253
1308
|
] })
|
|
1254
1309
|
);
|
|
1255
1310
|
}
|
|
1256
1311
|
function FieldLine({ tone = "helper", children, className }) {
|
|
1257
|
-
return /* @__PURE__ */
|
|
1312
|
+
return /* @__PURE__ */ jsx19("p", { role: tone === "error" ? "alert" : "status", className: cn(LINE_STYLES[tone], className), children });
|
|
1258
1313
|
}
|
|
1259
1314
|
|
|
1260
1315
|
// src/FormDialog.tsx
|
|
@@ -1280,7 +1335,7 @@ import { createContext as createContext4, useContext as useContext4, useId } fro
|
|
|
1280
1335
|
import { Separator } from "@base-ui/react/separator";
|
|
1281
1336
|
|
|
1282
1337
|
// src/SectionLabel.tsx
|
|
1283
|
-
import { jsx as
|
|
1338
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1284
1339
|
function SectionLabel({
|
|
1285
1340
|
children,
|
|
1286
1341
|
tone = "primary",
|
|
@@ -1288,7 +1343,7 @@ function SectionLabel({
|
|
|
1288
1343
|
folds = false,
|
|
1289
1344
|
className
|
|
1290
1345
|
}) {
|
|
1291
|
-
return /* @__PURE__ */
|
|
1346
|
+
return /* @__PURE__ */ jsx20(
|
|
1292
1347
|
"span",
|
|
1293
1348
|
{
|
|
1294
1349
|
className: cn(
|
|
@@ -1309,7 +1364,7 @@ function SectionLabel({
|
|
|
1309
1364
|
}
|
|
1310
1365
|
|
|
1311
1366
|
// src/Divider.tsx
|
|
1312
|
-
import { jsx as
|
|
1367
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1313
1368
|
var DividerInPanel = createContext4(false);
|
|
1314
1369
|
function Divider({ orientation = "horizontal", label, tone = "default", look = "caption", sticky = false, className }) {
|
|
1315
1370
|
const inset = useContext4(DividerInPanel) ? "mx-0" : "mx-3";
|
|
@@ -1320,27 +1375,27 @@ function Divider({ orientation = "horizontal", label, tone = "default", look = "
|
|
|
1320
1375
|
const id = typeof label === "string" ? void 0 : labelId;
|
|
1321
1376
|
const stays = sticky && "sticky top-0 z-10 bg-bg-surface";
|
|
1322
1377
|
if (look === "section") {
|
|
1323
|
-
return /* @__PURE__ */
|
|
1324
|
-
/* @__PURE__ */
|
|
1325
|
-
/* @__PURE__ */
|
|
1326
|
-
/* @__PURE__ */
|
|
1378
|
+
return /* @__PURE__ */ jsxs14(Separator, { orientation: "horizontal", ...named2, className: cn("flex shrink-0 items-center gap-2 px-2 py-1.5", stays, className), children: [
|
|
1379
|
+
/* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: "h-px flex-1 bg-border-subtle" }),
|
|
1380
|
+
/* @__PURE__ */ jsx21("span", { id, className: "flex min-w-0", children: /* @__PURE__ */ jsx21(SectionLabel, { tone: "muted", truncate: true, children: label }) }),
|
|
1381
|
+
/* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: "h-px flex-1 bg-border-subtle" })
|
|
1327
1382
|
] });
|
|
1328
1383
|
}
|
|
1329
|
-
return /* @__PURE__ */
|
|
1384
|
+
return /* @__PURE__ */ jsxs14(
|
|
1330
1385
|
Separator,
|
|
1331
1386
|
{
|
|
1332
1387
|
orientation: "horizontal",
|
|
1333
1388
|
...named2,
|
|
1334
1389
|
className: cn("flex shrink-0 items-center gap-2", inset, stays, className),
|
|
1335
1390
|
children: [
|
|
1336
|
-
/* @__PURE__ */
|
|
1337
|
-
/* @__PURE__ */
|
|
1338
|
-
/* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: cn("h-px flex-1", line) }),
|
|
1392
|
+
/* @__PURE__ */ jsx21("span", { id, className: cn("shrink-0 text-caption", tone === "warning" ? "text-warning-default" : "text-text-muted"), children: label }),
|
|
1393
|
+
/* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: cn("h-px flex-1", line) })
|
|
1339
1394
|
]
|
|
1340
1395
|
}
|
|
1341
1396
|
);
|
|
1342
1397
|
}
|
|
1343
|
-
return /* @__PURE__ */
|
|
1398
|
+
return /* @__PURE__ */ jsx21(
|
|
1344
1399
|
Separator,
|
|
1345
1400
|
{
|
|
1346
1401
|
orientation,
|
|
@@ -1356,10 +1411,10 @@ function triggerDisabled(trigger) {
|
|
|
1356
1411
|
}
|
|
1357
1412
|
|
|
1358
1413
|
// src/Menu.tsx
|
|
1359
|
-
import { Fragment as Fragment3, jsx as
|
|
1414
|
+
import { Fragment as Fragment3, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1360
1415
|
var MenuContext = createContext5(null);
|
|
1361
1416
|
function MenuPanel({ children, className, ...props }) {
|
|
1362
|
-
return /* @__PURE__ */
|
|
1417
|
+
return /* @__PURE__ */ jsx22(
|
|
1363
1418
|
"div",
|
|
1364
1419
|
{
|
|
1365
1420
|
className: cn(
|
|
@@ -1391,7 +1446,7 @@ var VIEWPORT_PAD2 = 8;
|
|
|
1391
1446
|
var HOVER_OPEN_DELAY = 0;
|
|
1392
1447
|
var HOVER_CLOSE_DELAY = 150;
|
|
1393
1448
|
function Menu({ trigger, align = "left", openOnHover = false, open, onOpenChange, actionsRef, children, className, contentClassName }) {
|
|
1394
|
-
return /* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ jsxs15(
|
|
1395
1450
|
BaseMenu.Root,
|
|
1396
1451
|
{
|
|
1397
1452
|
open,
|
|
@@ -1399,7 +1454,7 @@ function Menu({ trigger, align = "left", openOnHover = false, open, onOpenChange
|
|
|
1399
1454
|
actionsRef,
|
|
1400
1455
|
modal: false,
|
|
1401
1456
|
children: [
|
|
1402
|
-
/* @__PURE__ */
|
|
1457
|
+
/* @__PURE__ */ jsx22(
|
|
1403
1458
|
BaseMenu.Trigger,
|
|
1404
1459
|
{
|
|
1405
1460
|
render: trigger,
|
|
@@ -1409,7 +1464,7 @@ function Menu({ trigger, align = "left", openOnHover = false, open, onOpenChange
|
|
|
1409
1464
|
closeDelay: HOVER_CLOSE_DELAY
|
|
1410
1465
|
}
|
|
1411
1466
|
),
|
|
1412
|
-
/* @__PURE__ */
|
|
1467
|
+
/* @__PURE__ */ jsx22(BaseMenu.Portal, { children: /* @__PURE__ */ jsx22(
|
|
1413
1468
|
BaseMenu.Positioner,
|
|
1414
1469
|
{
|
|
1415
1470
|
side: "bottom",
|
|
@@ -1417,13 +1472,13 @@ function Menu({ trigger, align = "left", openOnHover = false, open, onOpenChange
|
|
|
1417
1472
|
sideOffset: GAP2,
|
|
1418
1473
|
collisionPadding: VIEWPORT_PAD2,
|
|
1419
1474
|
className: "z-50 data-[anchor-hidden]:hidden",
|
|
1420
|
-
children: /* @__PURE__ */
|
|
1475
|
+
children: /* @__PURE__ */ jsx22(
|
|
1421
1476
|
BaseMenu.Popup,
|
|
1422
1477
|
{
|
|
1423
1478
|
"data-interactive": true,
|
|
1424
1479
|
className: cn("min-w-[180px] outline-none p-0", className),
|
|
1425
|
-
render: /* @__PURE__ */
|
|
1426
|
-
children: /* @__PURE__ */
|
|
1480
|
+
render: /* @__PURE__ */ jsx22(MenuPanel, {}),
|
|
1481
|
+
children: /* @__PURE__ */ jsx22(ScrollArea, { viewportClassName: "max-h-[var(--available-height)]", contentClassName: cn("flex flex-col gap-0.5 p-2", contentClassName), children: /* @__PURE__ */ jsx22(MenuContext.Provider, { value: { openOnHover }, children: /* @__PURE__ */ jsx22(DividerInPanel.Provider, { value: true, children }) }) })
|
|
1427
1482
|
}
|
|
1428
1483
|
)
|
|
1429
1484
|
}
|
|
@@ -1439,20 +1494,20 @@ function MenuSub({ label, leading, selected, children, className }) {
|
|
|
1439
1494
|
'[@estiva-app/ui] Menu: `openOnHover` and `MenuSub` cannot be used together \u2014 leaving the submenu panel strands the menu open. Open this menu on a press instead. See Menu.mdx, "Hover-opened menus".'
|
|
1440
1495
|
);
|
|
1441
1496
|
}
|
|
1442
|
-
return /* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */
|
|
1497
|
+
return /* @__PURE__ */ jsxs15(BaseMenu.SubmenuRoot, { children: [
|
|
1498
|
+
/* @__PURE__ */ jsx22(
|
|
1444
1499
|
BaseMenu.SubmenuTrigger,
|
|
1445
1500
|
{
|
|
1446
1501
|
openOnHover: true,
|
|
1447
1502
|
delay: 0,
|
|
1448
1503
|
closeDelay: 150,
|
|
1449
1504
|
nativeButton: true,
|
|
1450
|
-
render: /* @__PURE__ */
|
|
1505
|
+
render: /* @__PURE__ */ jsx22("button", { type: "button" }),
|
|
1451
1506
|
className: menuItemClassName({ size: "default", selected }),
|
|
1452
|
-
children: /* @__PURE__ */
|
|
1507
|
+
children: /* @__PURE__ */ jsx22(MenuItemBody, { label, leading, submenu: true })
|
|
1453
1508
|
}
|
|
1454
1509
|
),
|
|
1455
|
-
/* @__PURE__ */
|
|
1510
|
+
/* @__PURE__ */ jsx22(BaseMenu.Portal, { children: /* @__PURE__ */ jsx22(
|
|
1456
1511
|
BaseMenu.Positioner,
|
|
1457
1512
|
{
|
|
1458
1513
|
side: "inline-end",
|
|
@@ -1460,7 +1515,7 @@ function MenuSub({ label, leading, selected, children, className }) {
|
|
|
1460
1515
|
sideOffset: GAP2,
|
|
1461
1516
|
collisionPadding: VIEWPORT_PAD2,
|
|
1462
1517
|
className: "z-50 data-[anchor-hidden]:hidden",
|
|
1463
|
-
children: /* @__PURE__ */
|
|
1518
|
+
children: /* @__PURE__ */ jsx22(BaseMenu.Popup, { className: cn("w-[160px]", className), "data-interactive": true, render: /* @__PURE__ */ jsx22(MenuPanel, {}), children })
|
|
1464
1519
|
}
|
|
1465
1520
|
) })
|
|
1466
1521
|
] });
|
|
@@ -1501,29 +1556,29 @@ function menuItemClassName({ size, selected, shut = false, className }) {
|
|
|
1501
1556
|
}
|
|
1502
1557
|
function MenuItemBody({ label, children, size = "default", description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected, shut = false }) {
|
|
1503
1558
|
const labelColour = shut ? "text-text-disabled" : destructive ? "text-error-default" : "text-text-primary";
|
|
1504
|
-
const edge = trailing ?? (shortcut ? /* @__PURE__ */
|
|
1505
|
-
return /* @__PURE__ */
|
|
1506
|
-
leading && /* @__PURE__ */
|
|
1507
|
-
children ?? /* @__PURE__ */
|
|
1508
|
-
aside ? /* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */
|
|
1511
|
-
] }) : /* @__PURE__ */
|
|
1512
|
-
description && /* @__PURE__ */
|
|
1559
|
+
const edge = trailing ?? (shortcut ? /* @__PURE__ */ jsx22(Kbd, { children: shortcut }) : submenu ? /* @__PURE__ */ jsx22(IconChevronRight, { size: 16, stroke: 1.5, className: "shrink-0 text-text-muted" }) : null);
|
|
1560
|
+
return /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
1561
|
+
leading && /* @__PURE__ */ jsx22("span", { className: "flex shrink-0 items-center", children: leading }),
|
|
1562
|
+
children ?? /* @__PURE__ */ jsxs15("span", { className: cn("flex min-w-0 flex-1 flex-col", size === "tall" && "gap-[2px]"), children: [
|
|
1563
|
+
aside ? /* @__PURE__ */ jsxs15("span", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
1564
|
+
/* @__PURE__ */ jsx22("span", { className: cn("truncate text-body-2", labelColour), children: label }),
|
|
1565
|
+
/* @__PURE__ */ jsx22("span", { className: cn("shrink-0 text-caption", shut ? "text-text-disabled" : "text-text-muted"), children: aside })
|
|
1566
|
+
] }) : /* @__PURE__ */ jsx22("span", { className: cn("truncate text-body-2", labelColour), children: label }),
|
|
1567
|
+
description && /* @__PURE__ */ jsx22("span", { className: cn("truncate text-caption", shut ? "text-text-disabled" : "text-text-secondary"), children: description })
|
|
1513
1568
|
] }),
|
|
1514
1569
|
(edge || hint) && // One grid cell holding both, right-aligned: the slot is as wide as
|
|
1515
1570
|
// the wider of the two and never changes, so revealing the hint moves
|
|
1516
1571
|
// nothing. No transition here either — the hint switches on the same
|
|
1517
1572
|
// :hover / `selected` as the fill, in the same frame.
|
|
1518
|
-
/* @__PURE__ */
|
|
1519
|
-
edge && /* @__PURE__ */
|
|
1520
|
-
hint && /* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ jsxs15("span", { className: "grid shrink-0 items-center justify-items-end [&>*]:col-start-1 [&>*]:row-start-1", children: [
|
|
1574
|
+
edge && /* @__PURE__ */ jsx22("span", { className: cn("flex items-center", hint && "group-hover:opacity-0 group-data-[highlighted]:opacity-0", hint && selected && "opacity-0"), children: edge }),
|
|
1575
|
+
hint && /* @__PURE__ */ jsx22("span", { className: cn("flex items-center opacity-0 group-hover:opacity-100 group-data-[highlighted]:opacity-100", selected && "opacity-100"), children: hint })
|
|
1521
1576
|
] })
|
|
1522
1577
|
] });
|
|
1523
1578
|
}
|
|
1524
1579
|
function MenuItem({ label, children, size = "default", description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected, disabledReason, className, ...props }) {
|
|
1525
1580
|
const shut = !!disabledReason;
|
|
1526
|
-
const body = /* @__PURE__ */
|
|
1581
|
+
const body = /* @__PURE__ */ jsx22(
|
|
1527
1582
|
MenuItemBody,
|
|
1528
1583
|
{
|
|
1529
1584
|
label,
|
|
@@ -1542,18 +1597,18 @@ function MenuItem({ label, children, size = "default", description, aside, leadi
|
|
|
1542
1597
|
}
|
|
1543
1598
|
);
|
|
1544
1599
|
const rowClassName = menuItemClassName({ size, selected, shut, className });
|
|
1545
|
-
const withReason = (row) => shut ? /* @__PURE__ */
|
|
1600
|
+
const withReason = (row) => shut ? /* @__PURE__ */ jsx22(TooltipTrigger, { label: disabledReason ?? "", children: row }) : row;
|
|
1546
1601
|
if (!useContext5(MenuContext)) {
|
|
1547
1602
|
return withReason(
|
|
1548
|
-
/* @__PURE__ */
|
|
1603
|
+
/* @__PURE__ */ jsx22("button", { type: "button", className: rowClassName, ...props, ...shut ? { "aria-disabled": true, onClick: void 0 } : {}, children: body })
|
|
1549
1604
|
);
|
|
1550
1605
|
}
|
|
1551
1606
|
return withReason(
|
|
1552
|
-
/* @__PURE__ */
|
|
1607
|
+
/* @__PURE__ */ jsx22(
|
|
1553
1608
|
BaseMenu.Item,
|
|
1554
1609
|
{
|
|
1555
1610
|
nativeButton: true,
|
|
1556
|
-
render: /* @__PURE__ */
|
|
1611
|
+
render: /* @__PURE__ */ jsx22("button", { type: "button" }),
|
|
1557
1612
|
className: rowClassName,
|
|
1558
1613
|
...props,
|
|
1559
1614
|
disabled: props.disabled || shut,
|
|
@@ -1563,39 +1618,39 @@ function MenuItem({ label, children, size = "default", description, aside, leadi
|
|
|
1563
1618
|
);
|
|
1564
1619
|
}
|
|
1565
1620
|
function EnterHint({ target }) {
|
|
1566
|
-
return /* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */
|
|
1568
|
-
target && /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ jsxs15("span", { className: "flex shrink-0 items-center gap-1.5 text-text-muted", children: [
|
|
1622
|
+
/* @__PURE__ */ jsx22(Kbd, { children: "\u21A9 Enter" }),
|
|
1623
|
+
target && /* @__PURE__ */ jsx22("span", { className: "text-menu signal:font-mono signal:text-small signal:tracking-wider leaf:font-mono leaf:text-small leaf:tracking-wider", children: target })
|
|
1569
1624
|
] });
|
|
1570
1625
|
}
|
|
1571
1626
|
function MenuSection({ label, children, className }) {
|
|
1572
1627
|
const inMenu = useContext5(MenuContext) !== null;
|
|
1573
|
-
const heading = /* @__PURE__ */
|
|
1628
|
+
const heading = /* @__PURE__ */ jsx22("div", { className: cn("flex h-8 items-center px-2", className), children: /* @__PURE__ */ jsx22(SectionLabel, { tone: "secondary", children: label }) });
|
|
1574
1629
|
if (!inMenu) {
|
|
1575
|
-
return /* @__PURE__ */
|
|
1630
|
+
return /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-0.5", children: [
|
|
1576
1631
|
heading,
|
|
1577
1632
|
children
|
|
1578
1633
|
] });
|
|
1579
1634
|
}
|
|
1580
|
-
return /* @__PURE__ */
|
|
1581
|
-
/* @__PURE__ */
|
|
1635
|
+
return /* @__PURE__ */ jsxs15(BaseMenu.Group, { className: "flex flex-col gap-0.5", children: [
|
|
1636
|
+
/* @__PURE__ */ jsx22(BaseMenu.GroupLabel, { render: heading }),
|
|
1582
1637
|
children
|
|
1583
1638
|
] });
|
|
1584
1639
|
}
|
|
1585
1640
|
function MenuSeparator() {
|
|
1586
|
-
return /* @__PURE__ */
|
|
1641
|
+
return /* @__PURE__ */ jsx22(Divider, { className: "my-1" });
|
|
1587
1642
|
}
|
|
1588
1643
|
function MenuRow({ children, className }) {
|
|
1589
|
-
return /* @__PURE__ */
|
|
1644
|
+
return /* @__PURE__ */ jsx22("div", { className: cn("flex items-center gap-2 px-2 py-1.5", className), children });
|
|
1590
1645
|
}
|
|
1591
1646
|
|
|
1592
1647
|
// src/ContainerHeader.tsx
|
|
1593
|
-
import { jsx as
|
|
1648
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1594
1649
|
function ContainerHeader({ title, chevron = false, titleMenu, actions, className }) {
|
|
1595
1650
|
const text = typeof title === "string";
|
|
1596
|
-
const name = /* @__PURE__ */
|
|
1597
|
-
text ? /* @__PURE__ */
|
|
1598
|
-
(chevron || titleMenu != null) && /* @__PURE__ */
|
|
1651
|
+
const name = /* @__PURE__ */ jsxs16("div", { className: cn("flex items-center gap-1", text ? "shrink-0" : "min-w-0 flex-1"), children: [
|
|
1652
|
+
text ? /* @__PURE__ */ jsx23("span", { className: "whitespace-nowrap text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx23("div", { className: "min-w-0 flex-1", children: title }),
|
|
1653
|
+
(chevron || titleMenu != null) && /* @__PURE__ */ jsx23(IconChevronDown, { size: 12, stroke: 1.5, className: "shrink-0 text-text-secondary" })
|
|
1599
1654
|
] });
|
|
1600
1655
|
return (
|
|
1601
1656
|
// The title 16px in, where the column's content starts (Katerina, 7 October; it was 20px).
|
|
@@ -1603,34 +1658,34 @@ function ContainerHeader({ title, chevron = false, titleMenu, actions, className
|
|
|
1603
1658
|
// (pl-2.5 + the button's px-1.5 = pl-4): the words stay where a title's
|
|
1604
1659
|
// are, and the fill is inside the bar — a negative margin had it clipped
|
|
1605
1660
|
// (Katerina, 5 October).
|
|
1606
|
-
/* @__PURE__ */
|
|
1607
|
-
/* @__PURE__ */
|
|
1661
|
+
/* @__PURE__ */ jsxs16("div", { className: cn("flex h-12 shrink-0 items-center justify-between overflow-hidden border-b border-border-subtle py-2 pr-4", titleMenu != null ? "pl-2.5" : "pl-4", className), children: [
|
|
1662
|
+
/* @__PURE__ */ jsx23("div", { className: cn("flex items-center gap-2 overflow-hidden", text ? "shrink-0" : "min-w-0 flex-1"), children: titleMenu != null ? /* @__PURE__ */ jsx23(
|
|
1608
1663
|
Menu,
|
|
1609
1664
|
{
|
|
1610
|
-
trigger: /* @__PURE__ */
|
|
1665
|
+
trigger: /* @__PURE__ */ jsx23(BaseButton5, { type: "button", className: cn("flex min-w-0 items-center px-1.5 py-1", MENU_TRIGGER_CLASSES), children: name }),
|
|
1611
1666
|
children: titleMenu
|
|
1612
1667
|
}
|
|
1613
1668
|
) : name }),
|
|
1614
|
-
actions && /* @__PURE__ */
|
|
1669
|
+
actions && /* @__PURE__ */ jsx23("div", { className: "flex shrink-0 items-center justify-end gap-3", children: /* @__PURE__ */ jsx23("div", { className: "flex shrink-0 items-center gap-1", children: actions }) })
|
|
1615
1670
|
] })
|
|
1616
1671
|
);
|
|
1617
1672
|
}
|
|
1618
1673
|
|
|
1619
1674
|
// src/DialogShell.tsx
|
|
1620
|
-
import { jsx as
|
|
1675
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1621
1676
|
function DialogShell({ title, onClose, headerContent, footer, children, bodyClassName, bodyMaxHeight, width = 502, alert = false }) {
|
|
1622
1677
|
const Parts = alert ? AlertDialog : Dialog2;
|
|
1623
1678
|
const popupRef = useRef4(null);
|
|
1624
|
-
return /* @__PURE__ */
|
|
1679
|
+
return /* @__PURE__ */ jsx24(
|
|
1625
1680
|
Parts.Root,
|
|
1626
1681
|
{
|
|
1627
1682
|
open: true,
|
|
1628
1683
|
onOpenChange: (open) => {
|
|
1629
1684
|
if (!open) onClose();
|
|
1630
1685
|
},
|
|
1631
|
-
children: /* @__PURE__ */
|
|
1632
|
-
/* @__PURE__ */
|
|
1633
|
-
/* @__PURE__ */
|
|
1686
|
+
children: /* @__PURE__ */ jsxs17(Parts.Portal, { children: [
|
|
1687
|
+
/* @__PURE__ */ jsx24(Parts.Backdrop, { className: "fixed inset-0 z-40 bg-scrim" }),
|
|
1688
|
+
/* @__PURE__ */ jsx24("div", { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxs17(
|
|
1634
1689
|
Parts.Popup,
|
|
1635
1690
|
{
|
|
1636
1691
|
ref: popupRef,
|
|
@@ -1639,11 +1694,11 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
1639
1694
|
className: "bg-bg-elevated border border-border-subtle rounded-lg shadow-lg pointer-events-auto flex flex-col overflow-hidden outline-none",
|
|
1640
1695
|
style: { width },
|
|
1641
1696
|
children: [
|
|
1642
|
-
/* @__PURE__ */
|
|
1697
|
+
/* @__PURE__ */ jsx24(
|
|
1643
1698
|
ContainerHeader,
|
|
1644
1699
|
{
|
|
1645
1700
|
className: "pl-5",
|
|
1646
|
-
title: headerContent ?? /* @__PURE__ */
|
|
1701
|
+
title: headerContent ?? /* @__PURE__ */ jsx24(Parts.Title, { className: "block truncate text-h4 text-text-primary", render: /* @__PURE__ */ jsx24("span", {}), children: title }),
|
|
1647
1702
|
actions: (
|
|
1648
1703
|
/*
|
|
1649
1704
|
The ✕ IS the `Close` part now, rather than a button that calls
|
|
@@ -1657,10 +1712,10 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
1657
1712
|
so the ✕, Escape and the outside press are one path with one
|
|
1658
1713
|
reason attached, instead of one of the three going around.
|
|
1659
1714
|
*/
|
|
1660
|
-
/* @__PURE__ */
|
|
1715
|
+
/* @__PURE__ */ jsx24(
|
|
1661
1716
|
Parts.Close,
|
|
1662
1717
|
{
|
|
1663
|
-
render: /* @__PURE__ */
|
|
1718
|
+
render: /* @__PURE__ */ jsx24(IconButton, { tooltip: "Close", "aria-label": "Close", children: /* @__PURE__ */ jsx24(IconX3, { size: 16, stroke: 1.5 }) })
|
|
1664
1719
|
}
|
|
1665
1720
|
)
|
|
1666
1721
|
)
|
|
@@ -1668,9 +1723,9 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
1668
1723
|
),
|
|
1669
1724
|
bodyMaxHeight ? (
|
|
1670
1725
|
// The line above the footer on a box of the shell's own, not pushed into ScrollArea (UIG-9).
|
|
1671
|
-
/* @__PURE__ */
|
|
1672
|
-
) : /* @__PURE__ */
|
|
1673
|
-
footer != null && /* @__PURE__ */
|
|
1726
|
+
/* @__PURE__ */ jsx24("div", { className: cn(footer != null && "border-b border-border-subtle"), children: /* @__PURE__ */ jsx24(ScrollArea, { viewportClassName: bodyMaxHeight, contentClassName: cn("pl-5 pr-4 py-4", bodyClassName), children }) })
|
|
1727
|
+
) : /* @__PURE__ */ jsx24("div", { className: cn("pl-5 pr-4 py-4", footer != null && "border-b border-border-subtle", bodyClassName), children }),
|
|
1728
|
+
footer != null && /* @__PURE__ */ jsx24("div", { className: "h-12 flex items-center justify-end gap-2 pl-5 pr-4 shrink-0", children: footer })
|
|
1674
1729
|
]
|
|
1675
1730
|
}
|
|
1676
1731
|
) })
|
|
@@ -1683,7 +1738,7 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
1683
1738
|
import { useLayoutEffect as useLayoutEffect2, useRef as useRef5 } from "react";
|
|
1684
1739
|
import { Fieldset } from "@base-ui/react/fieldset";
|
|
1685
1740
|
import { Form as BaseForm } from "@base-ui/react/form";
|
|
1686
|
-
import { jsx as
|
|
1741
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1687
1742
|
var FIELDS_CLASSES = "flex flex-col gap-6";
|
|
1688
1743
|
var CONTROL = 'input:not([type="hidden"]), textarea, select, button, [role="checkbox"], [role="combobox"], [tabindex]:not([tabindex="-1"])';
|
|
1689
1744
|
var ONE_LINE = /* @__PURE__ */ new Set(["", "text", "search", "email", "url", "tel", "password", "number"]);
|
|
@@ -1743,7 +1798,7 @@ function Form({ onSubmit, busy: ownBusy = false, enterSends = true, layout = "fi
|
|
|
1743
1798
|
const oneLine = ONE_LINE.has((target.getAttribute("type") ?? "").toLowerCase()) && target.getAttribute("role") !== "combobox";
|
|
1744
1799
|
if (enterSends && oneLine) form.current?.requestSubmit();
|
|
1745
1800
|
};
|
|
1746
|
-
return /* @__PURE__ */
|
|
1801
|
+
return /* @__PURE__ */ jsx25(
|
|
1747
1802
|
BaseForm,
|
|
1748
1803
|
{
|
|
1749
1804
|
ref: form,
|
|
@@ -1766,13 +1821,13 @@ function Form({ onSubmit, busy: ownBusy = false, enterSends = true, layout = "fi
|
|
|
1766
1821
|
if (busyNow.current) return;
|
|
1767
1822
|
void onSubmit();
|
|
1768
1823
|
},
|
|
1769
|
-
children: /* @__PURE__ */
|
|
1824
|
+
children: /* @__PURE__ */ jsx25(Fieldset.Root, { disabled: busy, className: "contents", children: /* @__PURE__ */ jsx25(FormBusyContext.Provider, { value: busy, children }) })
|
|
1770
1825
|
}
|
|
1771
1826
|
);
|
|
1772
1827
|
}
|
|
1773
1828
|
|
|
1774
1829
|
// src/FormDialog.tsx
|
|
1775
|
-
import { Fragment as Fragment4, jsx as
|
|
1830
|
+
import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1776
1831
|
function FormDialog({ title, submitLabel, busyLabel, submitVariant = "primary", ready = true, onSubmit, onClose, children }) {
|
|
1777
1832
|
const [busy, setBusy] = useState3(false);
|
|
1778
1833
|
const sending = useRef6(false);
|
|
@@ -1798,25 +1853,25 @@ function FormDialog({ title, submitLabel, busyLabel, submitVariant = "primary",
|
|
|
1798
1853
|
}
|
|
1799
1854
|
if (answer !== false && !closed.current) close();
|
|
1800
1855
|
};
|
|
1801
|
-
return /* @__PURE__ */
|
|
1856
|
+
return /* @__PURE__ */ jsx26(
|
|
1802
1857
|
DialogShell,
|
|
1803
1858
|
{
|
|
1804
1859
|
title,
|
|
1805
1860
|
onClose: close,
|
|
1806
|
-
footer: /* @__PURE__ */
|
|
1807
|
-
/* @__PURE__ */
|
|
1808
|
-
/* @__PURE__ */
|
|
1861
|
+
footer: /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
1862
|
+
/* @__PURE__ */ jsx26(Button, { variant: "muted", onClick: close, disabled: busy, children: "Cancel" }),
|
|
1863
|
+
/* @__PURE__ */ jsx26(Button, { variant: submitVariant, type: "submit", form: formId, disabled: !ready || busy, children: busy && busyLabel ? busyLabel : submitLabel })
|
|
1809
1864
|
] }),
|
|
1810
|
-
children: /* @__PURE__ */
|
|
1865
|
+
children: /* @__PURE__ */ jsx26(Form, { id: formId, busy, onSubmit: send, children })
|
|
1811
1866
|
}
|
|
1812
1867
|
);
|
|
1813
1868
|
}
|
|
1814
1869
|
|
|
1815
1870
|
// src/Select.tsx
|
|
1816
|
-
import { IconCheck, IconChevronDown as IconChevronDown2 } from "@tabler/icons-react";
|
|
1871
|
+
import { IconCheck as IconCheck2, IconChevronDown as IconChevronDown2 } from "@tabler/icons-react";
|
|
1817
1872
|
import { Select as BaseSelect } from "@base-ui/react/select";
|
|
1818
1873
|
import { useEffect as useEffect3, useState as useState4 } from "react";
|
|
1819
|
-
import { jsx as
|
|
1874
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1820
1875
|
var GAP3 = 4;
|
|
1821
1876
|
var VIEWPORT_PAD3 = 8;
|
|
1822
1877
|
function Select({ value, onChange, options, size = "default", fill = "field", ariaLabel, placeholder = "Select\u2026", disabled, disabledReason, className, ...aria }) {
|
|
@@ -1828,7 +1883,7 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
1828
1883
|
}, [held]);
|
|
1829
1884
|
const trigger = (
|
|
1830
1885
|
// @estiva-escape(no-copied-look): N1 (Katerina, 24 September: record only): Select's box drops the hover while held, so it cannot take FIELD_SHELL_CLASSES as it is
|
|
1831
|
-
/* @__PURE__ */
|
|
1886
|
+
/* @__PURE__ */ jsxs19(
|
|
1832
1887
|
BaseSelect.Trigger,
|
|
1833
1888
|
{
|
|
1834
1889
|
"aria-label": ariaLabel,
|
|
@@ -1863,21 +1918,21 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
1863
1918
|
className
|
|
1864
1919
|
),
|
|
1865
1920
|
children: [
|
|
1866
|
-
/* @__PURE__ */
|
|
1867
|
-
selected?.leading && /* @__PURE__ */
|
|
1868
|
-
/* @__PURE__ */
|
|
1921
|
+
/* @__PURE__ */ jsxs19("span", { className: cn("flex min-w-0 items-center gap-2", !selected && "text-text-muted"), children: [
|
|
1922
|
+
selected?.leading && /* @__PURE__ */ jsx27("span", { className: "flex shrink-0 items-center", children: selected.leading }),
|
|
1923
|
+
/* @__PURE__ */ jsx27(BaseSelect.Value, { className: "truncate", children: () => selected?.label ?? placeholder })
|
|
1869
1924
|
] }),
|
|
1870
|
-
/* @__PURE__ */
|
|
1925
|
+
/* @__PURE__ */ jsx27(
|
|
1871
1926
|
BaseSelect.Icon,
|
|
1872
1927
|
{
|
|
1873
|
-
render: /* @__PURE__ */
|
|
1928
|
+
render: /* @__PURE__ */ jsx27(IconChevronDown2, { size: size === "small" ? 14 : 16, stroke: 1.5, className: "shrink-0 text-text-secondary" })
|
|
1874
1929
|
}
|
|
1875
1930
|
)
|
|
1876
1931
|
]
|
|
1877
1932
|
}
|
|
1878
1933
|
)
|
|
1879
1934
|
);
|
|
1880
|
-
return /* @__PURE__ */
|
|
1935
|
+
return /* @__PURE__ */ jsxs19(
|
|
1881
1936
|
BaseSelect.Root,
|
|
1882
1937
|
{
|
|
1883
1938
|
value,
|
|
@@ -1891,8 +1946,8 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
1891
1946
|
disabled: disabled && !held,
|
|
1892
1947
|
modal: false,
|
|
1893
1948
|
children: [
|
|
1894
|
-
held ? /* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
1949
|
+
held ? /* @__PURE__ */ jsx27(TooltipTrigger, { label: disabledReason ?? "", children: trigger }) : trigger,
|
|
1950
|
+
/* @__PURE__ */ jsx27(BaseSelect.Portal, { children: /* @__PURE__ */ jsx27(
|
|
1896
1951
|
BaseSelect.Positioner,
|
|
1897
1952
|
{
|
|
1898
1953
|
side: "bottom",
|
|
@@ -1901,25 +1956,25 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
1901
1956
|
collisionPadding: VIEWPORT_PAD3,
|
|
1902
1957
|
alignItemWithTrigger: false,
|
|
1903
1958
|
className: "z-50 data-[anchor-hidden]:hidden",
|
|
1904
|
-
children: /* @__PURE__ */
|
|
1959
|
+
children: /* @__PURE__ */ jsx27(
|
|
1905
1960
|
BaseSelect.Popup,
|
|
1906
1961
|
{
|
|
1907
|
-
render: /* @__PURE__ */
|
|
1962
|
+
render: /* @__PURE__ */ jsx27(MenuPanel, {}),
|
|
1908
1963
|
className: "min-w-[var(--anchor-width)] p-0",
|
|
1909
|
-
children: /* @__PURE__ */
|
|
1964
|
+
children: /* @__PURE__ */ jsx27(ScrollArea, { viewportClassName: "max-h-[min(288px,var(--available-height))]", contentClassName: "flex flex-col gap-0.5 p-2", children: options.map((option) => /* @__PURE__ */ jsxs19(
|
|
1910
1965
|
BaseSelect.Item,
|
|
1911
1966
|
{
|
|
1912
1967
|
value: option.value,
|
|
1913
1968
|
className: cn(menuItemClassName({ size: "default" }), "justify-between data-[selected]:font-medium"),
|
|
1914
1969
|
children: [
|
|
1915
|
-
/* @__PURE__ */
|
|
1916
|
-
option.leading && /* @__PURE__ */
|
|
1917
|
-
/* @__PURE__ */
|
|
1970
|
+
/* @__PURE__ */ jsxs19("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1971
|
+
option.leading && /* @__PURE__ */ jsx27("span", { className: "flex shrink-0 items-center", children: option.leading }),
|
|
1972
|
+
/* @__PURE__ */ jsx27(BaseSelect.ItemText, { className: "truncate text-body-2 text-text-primary", children: option.label })
|
|
1918
1973
|
] }),
|
|
1919
|
-
/* @__PURE__ */
|
|
1974
|
+
/* @__PURE__ */ jsx27(
|
|
1920
1975
|
BaseSelect.ItemIndicator,
|
|
1921
1976
|
{
|
|
1922
|
-
render: /* @__PURE__ */
|
|
1977
|
+
render: /* @__PURE__ */ jsx27(IconCheck2, { size: 16, stroke: 1.5, className: "shrink-0 text-text-secondary" })
|
|
1923
1978
|
}
|
|
1924
1979
|
)
|
|
1925
1980
|
]
|
|
@@ -1936,7 +1991,7 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
1936
1991
|
}
|
|
1937
1992
|
|
|
1938
1993
|
// src/MoveDialog.tsx
|
|
1939
|
-
import { Fragment as Fragment5, jsx as
|
|
1994
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1940
1995
|
var TOP = "__top__";
|
|
1941
1996
|
function MoveDialog({
|
|
1942
1997
|
title,
|
|
@@ -1951,9 +2006,11 @@ function MoveDialog({
|
|
|
1951
2006
|
heading = "Move",
|
|
1952
2007
|
folderLabel = "Folder",
|
|
1953
2008
|
noFolder = "There is no other folder it can be moved to.",
|
|
2009
|
+
check,
|
|
1954
2010
|
onMove,
|
|
1955
2011
|
onClose
|
|
1956
2012
|
}) {
|
|
2013
|
+
const [ticked, setTicked] = useState5(check?.checked ?? false);
|
|
1957
2014
|
const nests = !!placesIn;
|
|
1958
2015
|
const destinations = folders && (nests ? folders : folders.filter((folder2) => folder2.id !== from));
|
|
1959
2016
|
const offered = (id) => !!id && !!destinations?.some((candidate) => candidate.id === id);
|
|
@@ -1989,21 +2046,23 @@ function MoveDialog({
|
|
|
1989
2046
|
const valueOf = (place) => place.id || TOP;
|
|
1990
2047
|
const parent = picked ?? (startAtTop && targets[0] && !targets[0].id ? TOP : void 0);
|
|
1991
2048
|
const ready = !!folder && (!nests || !!parent);
|
|
1992
|
-
|
|
2049
|
+
const checkLabel = folder ? check?.label(folder) : void 0;
|
|
2050
|
+
const asked2 = checkLabel === void 0 ? {} : { checked: ticked };
|
|
2051
|
+
return /* @__PURE__ */ jsx28(
|
|
1993
2052
|
FormDialog,
|
|
1994
2053
|
{
|
|
1995
2054
|
title: heading,
|
|
1996
2055
|
submitLabel: "Move",
|
|
1997
2056
|
busyLabel: "Moving\u2026",
|
|
1998
2057
|
ready,
|
|
1999
|
-
onSubmit: () => onMove(nests ? { folder, parent: parent === TOP ? "" : parent } : { folder }),
|
|
2058
|
+
onSubmit: () => onMove({ ...nests ? { folder, parent: parent === TOP ? "" : parent } : { folder }, ...asked2 }),
|
|
2000
2059
|
onClose,
|
|
2001
|
-
children: destinations?.length === 0 ? /* @__PURE__ */
|
|
2002
|
-
/* @__PURE__ */
|
|
2003
|
-
/* @__PURE__ */
|
|
2004
|
-
/* @__PURE__ */
|
|
2060
|
+
children: destinations?.length === 0 ? /* @__PURE__ */ jsx28(EmptyState, { scope: "section", message: noFolder }) : /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
2061
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-2", children: [
|
|
2062
|
+
/* @__PURE__ */ jsx28("p", { className: "text-body-2-strong text-text-primary", children: title }),
|
|
2063
|
+
/* @__PURE__ */ jsx28("p", { className: "text-body-2 text-text-secondary", children: description })
|
|
2005
2064
|
] }),
|
|
2006
|
-
/* @__PURE__ */
|
|
2065
|
+
/* @__PURE__ */ jsx28(Field, { label: folderLabel, children: /* @__PURE__ */ jsx28(
|
|
2007
2066
|
Select,
|
|
2008
2067
|
{
|
|
2009
2068
|
value: folder,
|
|
@@ -2013,7 +2072,7 @@ function MoveDialog({
|
|
|
2013
2072
|
ariaLabel: folderLabel
|
|
2014
2073
|
}
|
|
2015
2074
|
) }),
|
|
2016
|
-
nests && folder && (status === "failed" ? /* @__PURE__ */
|
|
2075
|
+
nests && folder && (status === "failed" ? /* @__PURE__ */ jsx28(EmptyState, { scope: "section", message: `${folderName} could not be read.`, action: { label: "Try again", onClick: () => readPlaces(folder) } }) : Array.isArray(status) && targets.length === 0 ? /* @__PURE__ */ jsx28(EmptyState, { scope: "section", message: `There is nowhere in ${folderName} to put it.` }) : /* @__PURE__ */ jsx28(Field, { label: "Put it under", children: /* @__PURE__ */ jsx28(
|
|
2017
2076
|
Select,
|
|
2018
2077
|
{
|
|
2019
2078
|
value: parent ?? "",
|
|
@@ -2026,7 +2085,8 @@ function MoveDialog({
|
|
|
2026
2085
|
disabled: !Array.isArray(status),
|
|
2027
2086
|
ariaLabel: "Put it under"
|
|
2028
2087
|
}
|
|
2029
|
-
) }))
|
|
2088
|
+
) })),
|
|
2089
|
+
checkLabel !== void 0 && /* @__PURE__ */ jsx28(Checkbox, { checked: ticked, onChange: setTicked, label: checkLabel })
|
|
2030
2090
|
] })
|
|
2031
2091
|
}
|
|
2032
2092
|
);
|
|
@@ -2037,7 +2097,7 @@ import { useId as useId3, useState as useState7 } from "react";
|
|
|
2037
2097
|
import { IconArrowLeft, IconUserMinus, IconUserPlus } from "@tabler/icons-react";
|
|
2038
2098
|
|
|
2039
2099
|
// src/Chip.tsx
|
|
2040
|
-
import { Fragment as Fragment6, jsx as
|
|
2100
|
+
import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2041
2101
|
var typeStyles = {
|
|
2042
2102
|
neutral: "bg-bg-inset text-text-primary",
|
|
2043
2103
|
brand: "bg-accent-muted text-accent-text signal:border signal:border-accent-outline",
|
|
@@ -2049,8 +2109,8 @@ var typeStyles = {
|
|
|
2049
2109
|
function Chip({ type = "neutral", label, leadingIcon, trailingIcon, href, onClick, className }) {
|
|
2050
2110
|
const inApp = useInAppClick(href, onClick);
|
|
2051
2111
|
const classes = cn("inline-flex min-w-0 items-center justify-center gap-1.5 rounded-full max-h-[20px] px-2 py-1", typeStyles[type], className);
|
|
2052
|
-
const inside = /* @__PURE__ */
|
|
2053
|
-
leadingIcon && /* @__PURE__ */
|
|
2112
|
+
const inside = /* @__PURE__ */ jsxs21(Fragment6, { children: [
|
|
2113
|
+
leadingIcon && /* @__PURE__ */ jsx29("span", { className: "flex size-3 shrink-0 items-center justify-center", children: leadingIcon }),
|
|
2054
2114
|
label && // A chip given a `max-w-*` cuts a long label with an ellipsis instead
|
|
2055
2115
|
// of growing past it — Ship's project chip on an issue row
|
|
2056
2116
|
// (2026-09-09). Clipped sideways only: `overflow-x-clip`, not
|
|
@@ -2059,11 +2119,11 @@ function Chip({ type = "neutral", label, leadingIcon, trailingIcon, href, onClic
|
|
|
2059
2119
|
// the screenshot diff caught every descender cut off. `clip` is the
|
|
2060
2120
|
// one overflow that leaves the other axis visible. A chip with no cap
|
|
2061
2121
|
// draws exactly as before.
|
|
2062
|
-
/* @__PURE__ */
|
|
2063
|
-
trailingIcon && /* @__PURE__ */
|
|
2122
|
+
/* @__PURE__ */ jsx29("span", { className: cn("min-w-0 overflow-x-clip text-ellipsis whitespace-nowrap signal:tracking-wide", CHIP_TEXT_CLASSES), children: label }),
|
|
2123
|
+
trailingIcon && /* @__PURE__ */ jsx29("span", { className: "flex size-3 shrink-0 items-center justify-center", children: trailingIcon })
|
|
2064
2124
|
] });
|
|
2065
|
-
if (href) return /* @__PURE__ */
|
|
2066
|
-
return /* @__PURE__ */
|
|
2125
|
+
if (href) return /* @__PURE__ */ jsx29("a", { href, onClick: inApp, className: cn("relative", classes), children: inside });
|
|
2126
|
+
return /* @__PURE__ */ jsx29("div", { className: classes, children: inside });
|
|
2067
2127
|
}
|
|
2068
2128
|
|
|
2069
2129
|
// src/ChipInput.tsx
|
|
@@ -2071,7 +2131,7 @@ import { useMemo as useMemo2, useState as useState6 } from "react";
|
|
|
2071
2131
|
import { Button as BaseButton6 } from "@base-ui/react/button";
|
|
2072
2132
|
import { Combobox } from "@base-ui/react/combobox";
|
|
2073
2133
|
import { IconX as IconX4 } from "@tabler/icons-react";
|
|
2074
|
-
import { jsx as
|
|
2134
|
+
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2075
2135
|
var CHIP_BOX = (
|
|
2076
2136
|
// Curved, not a pill (Katerina, 2026-09-01): the Avatar keeps its own
|
|
2077
2137
|
// rounded-sm corners — never a forced circle — and the chip's corner
|
|
@@ -2082,10 +2142,10 @@ var CHIP_LABEL = "text-caption font-medium text-text-primary";
|
|
|
2082
2142
|
var CHIP_REMOVE = "size-4 flex items-center justify-center rounded-full hover:bg-bg-hover text-text-secondary";
|
|
2083
2143
|
var chipPadding = (leading, removable) => cn(leading ? "pl-[2px]" : "pl-2", removable ? "pr-1" : "pr-2");
|
|
2084
2144
|
function InputChip({ label, leading, onRemove, removeLabel, truncate, className }) {
|
|
2085
|
-
return /* @__PURE__ */
|
|
2086
|
-
leading && /* @__PURE__ */
|
|
2087
|
-
/* @__PURE__ */
|
|
2088
|
-
onRemove && /* @__PURE__ */
|
|
2145
|
+
return /* @__PURE__ */ jsxs22("div", { className: cn(CHIP_BOX, chipPadding(!!leading, !!onRemove), className), children: [
|
|
2146
|
+
leading && /* @__PURE__ */ jsx30("span", { className: "flex shrink-0 items-center", children: leading }),
|
|
2147
|
+
/* @__PURE__ */ jsx30("span", { className: cn(CHIP_LABEL, truncate && "min-w-0 truncate"), children: label }),
|
|
2148
|
+
onRemove && /* @__PURE__ */ jsx30(
|
|
2089
2149
|
BaseButton6,
|
|
2090
2150
|
{
|
|
2091
2151
|
type: "button",
|
|
@@ -2095,7 +2155,7 @@ function InputChip({ label, leading, onRemove, removeLabel, truncate, className
|
|
|
2095
2155
|
},
|
|
2096
2156
|
className: cn(CHIP_REMOVE, truncate && "shrink-0"),
|
|
2097
2157
|
"aria-label": removeLabel ?? `Remove ${label}`,
|
|
2098
|
-
children: /* @__PURE__ */
|
|
2158
|
+
children: /* @__PURE__ */ jsx30(IconX4, { size: 10, stroke: 1.5 })
|
|
2099
2159
|
}
|
|
2100
2160
|
)
|
|
2101
2161
|
] });
|
|
@@ -2149,7 +2209,7 @@ function ChipInput({
|
|
|
2149
2209
|
setQuery("");
|
|
2150
2210
|
}
|
|
2151
2211
|
}
|
|
2152
|
-
return /* @__PURE__ */
|
|
2212
|
+
return /* @__PURE__ */ jsxs22(
|
|
2153
2213
|
Combobox.Root,
|
|
2154
2214
|
{
|
|
2155
2215
|
multiple: true,
|
|
@@ -2166,13 +2226,13 @@ function ChipInput({
|
|
|
2166
2226
|
filter,
|
|
2167
2227
|
itemToStringLabel: (option) => option.label,
|
|
2168
2228
|
children: [
|
|
2169
|
-
/* @__PURE__ */
|
|
2170
|
-
value.map((option) => /* @__PURE__ */
|
|
2171
|
-
chipLeading && /* @__PURE__ */
|
|
2172
|
-
/* @__PURE__ */
|
|
2173
|
-
/* @__PURE__ */
|
|
2229
|
+
/* @__PURE__ */ jsxs22(Combobox.Chips, { ref: setBox, className: cn(FIELD_SHELL_CLASSES, FIELD_SHELL_FOCUS_CLASSES, "px-3 py-1.5 flex flex-wrap items-center gap-1.5 min-h-[38px] cursor-text"), children: [
|
|
2230
|
+
value.map((option) => /* @__PURE__ */ jsxs22(Combobox.Chip, { className: cn(CHIP_BOX, chipPadding(!!chipLeading, true)), children: [
|
|
2231
|
+
chipLeading && /* @__PURE__ */ jsx30("span", { className: "flex shrink-0 items-center", children: chipLeading(option) }),
|
|
2232
|
+
/* @__PURE__ */ jsx30("span", { className: CHIP_LABEL, children: option.label }),
|
|
2233
|
+
/* @__PURE__ */ jsx30(Combobox.ChipRemove, { className: CHIP_REMOVE, "aria-label": `Remove ${option.label}`, children: /* @__PURE__ */ jsx30(IconX4, { size: 10, stroke: 1.5 }) })
|
|
2174
2234
|
] }, option.id)),
|
|
2175
|
-
/* @__PURE__ */
|
|
2235
|
+
/* @__PURE__ */ jsx30(
|
|
2176
2236
|
Combobox.Input,
|
|
2177
2237
|
{
|
|
2178
2238
|
autoFocus,
|
|
@@ -2184,18 +2244,18 @@ function ChipInput({
|
|
|
2184
2244
|
}
|
|
2185
2245
|
)
|
|
2186
2246
|
] }),
|
|
2187
|
-
/* @__PURE__ */
|
|
2247
|
+
/* @__PURE__ */ jsx30(Combobox.Portal, { children: /* @__PURE__ */ jsx30(
|
|
2188
2248
|
Combobox.Positioner,
|
|
2189
2249
|
{
|
|
2190
2250
|
anchor: box,
|
|
2191
2251
|
sideOffset: GAP4,
|
|
2192
2252
|
collisionPadding: VIEWPORT_PAD4,
|
|
2193
2253
|
className: "z-50 data-[anchor-hidden]:hidden",
|
|
2194
|
-
children: /* @__PURE__ */
|
|
2254
|
+
children: /* @__PURE__ */ jsx30(Combobox.Popup, { className: "w-[var(--anchor-width)] p-0", render: /* @__PURE__ */ jsx30(MenuPanel, {}), children: /* @__PURE__ */ jsx30(ScrollArea, { viewportClassName: "max-h-[240px]", contentClassName: "flex flex-col p-2", children: /* @__PURE__ */ jsx30(Combobox.List, { className: "flex flex-col gap-0.5", children: (option) => /* @__PURE__ */ jsx30(
|
|
2195
2255
|
Combobox.Item,
|
|
2196
2256
|
{
|
|
2197
2257
|
value: option,
|
|
2198
|
-
render: /* @__PURE__ */
|
|
2258
|
+
render: /* @__PURE__ */ jsx30(
|
|
2199
2259
|
MenuItem,
|
|
2200
2260
|
{
|
|
2201
2261
|
size: "tall",
|
|
@@ -2217,7 +2277,7 @@ var GAP4 = 4;
|
|
|
2217
2277
|
var VIEWPORT_PAD4 = 8;
|
|
2218
2278
|
|
|
2219
2279
|
// src/MembersDialog.tsx
|
|
2220
|
-
import { Fragment as Fragment7, jsx as
|
|
2280
|
+
import { Fragment as Fragment7, jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2221
2281
|
var LEADING_CLASSES = "size-8 rounded-md bg-accent-muted flex items-center justify-center shrink-0 text-accent-text";
|
|
2222
2282
|
function MembersDialog({ members, count, self, candidates = [], onAdd, note, initialView = "list", onClose }) {
|
|
2223
2283
|
const [view, setView] = useState7(onAdd ? initialView : "list");
|
|
@@ -2243,21 +2303,21 @@ function MembersDialog({ members, count, self, candidates = [], onAdd, note, ini
|
|
|
2243
2303
|
const roster = ownRow ? [ownRow, ...members.filter((m) => m !== ownRow)] : members;
|
|
2244
2304
|
const selfOnTop = self && !ownRow;
|
|
2245
2305
|
if (view === "add" && onAdd) {
|
|
2246
|
-
return /* @__PURE__ */
|
|
2306
|
+
return /* @__PURE__ */ jsx31(
|
|
2247
2307
|
DialogShell,
|
|
2248
2308
|
{
|
|
2249
2309
|
title: "Add members",
|
|
2250
2310
|
onClose,
|
|
2251
|
-
headerContent: /* @__PURE__ */
|
|
2252
|
-
/* @__PURE__ */
|
|
2253
|
-
/* @__PURE__ */
|
|
2311
|
+
headerContent: /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2312
|
+
/* @__PURE__ */ jsx31(IconButton, { tooltip: "Back to members", "aria-label": "Back to members", className: "-ml-2", onClick: () => setView("list"), children: /* @__PURE__ */ jsx31(IconArrowLeft, { size: 16, stroke: 1.5 }) }),
|
|
2313
|
+
/* @__PURE__ */ jsx31("span", { className: "truncate text-h4 text-text-primary", children: "Add members" })
|
|
2254
2314
|
] }),
|
|
2255
2315
|
bodyClassName: "flex flex-col gap-6",
|
|
2256
|
-
footer: /* @__PURE__ */
|
|
2257
|
-
/* @__PURE__ */
|
|
2258
|
-
/* @__PURE__ */
|
|
2316
|
+
footer: /* @__PURE__ */ jsxs23(Fragment7, { children: [
|
|
2317
|
+
/* @__PURE__ */ jsx31(Button, { variant: "muted", onClick: onClose, children: "Cancel" }),
|
|
2318
|
+
/* @__PURE__ */ jsx31(Button, { variant: "primary", type: "submit", form: formId, disabled: chosen.length === 0, children: "Invite" })
|
|
2259
2319
|
] }),
|
|
2260
|
-
children: /* @__PURE__ */
|
|
2320
|
+
children: /* @__PURE__ */ jsx31(Form, { id: formId, onSubmit: add, children: /* @__PURE__ */ jsx31(Field, { label: "Invite people", required: true, children: /* @__PURE__ */ jsx31(
|
|
2261
2321
|
ChipInput,
|
|
2262
2322
|
{
|
|
2263
2323
|
value: chosen,
|
|
@@ -2265,58 +2325,58 @@ function MembersDialog({ members, count, self, candidates = [], onAdd, note, ini
|
|
|
2265
2325
|
options: candidates,
|
|
2266
2326
|
placeholder: "Search people...",
|
|
2267
2327
|
excludeIds: members.map((m) => m.id),
|
|
2268
|
-
chipLeading: (o) => /* @__PURE__ */
|
|
2269
|
-
rowLeading: (o) => /* @__PURE__ */
|
|
2328
|
+
chipLeading: (o) => /* @__PURE__ */ jsx31(Avatar, { name: o.label, src: o.picture, bot: o.bot, size: 16 }),
|
|
2329
|
+
rowLeading: (o) => /* @__PURE__ */ jsx31(Avatar, { name: o.label, src: o.picture, bot: o.bot, size: 32 }),
|
|
2270
2330
|
autoFocus: true
|
|
2271
2331
|
}
|
|
2272
2332
|
) }) })
|
|
2273
2333
|
}
|
|
2274
2334
|
);
|
|
2275
2335
|
}
|
|
2276
|
-
return /* @__PURE__ */
|
|
2336
|
+
return /* @__PURE__ */ jsxs23(
|
|
2277
2337
|
DialogShell,
|
|
2278
2338
|
{
|
|
2279
2339
|
title: "Members",
|
|
2280
2340
|
onClose,
|
|
2281
|
-
headerContent: /* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
2283
|
-
/* @__PURE__ */
|
|
2341
|
+
headerContent: /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2342
|
+
/* @__PURE__ */ jsx31("span", { className: "truncate text-h4 text-text-primary", children: "Members" }),
|
|
2343
|
+
/* @__PURE__ */ jsx31(Chip, { label: String(count ?? members.length) })
|
|
2284
2344
|
] }),
|
|
2285
2345
|
bodyMaxHeight: "max-h-[400px]",
|
|
2286
2346
|
bodyClassName: "p-0 py-2",
|
|
2287
2347
|
children: [
|
|
2288
|
-
(selfOnTop || onAdd) && /* @__PURE__ */
|
|
2289
|
-
selfOnTop && /* @__PURE__ */
|
|
2348
|
+
(selfOnTop || onAdd) && /* @__PURE__ */ jsxs23("div", { className: "flex flex-col px-2", children: [
|
|
2349
|
+
selfOnTop && /* @__PURE__ */ jsx31(
|
|
2290
2350
|
MenuItem,
|
|
2291
2351
|
{
|
|
2292
2352
|
size: "tall",
|
|
2293
2353
|
className: "py-2",
|
|
2294
2354
|
disabled: toggling,
|
|
2295
2355
|
onClick: () => void toggle(),
|
|
2296
|
-
leading: /* @__PURE__ */
|
|
2356
|
+
leading: /* @__PURE__ */ jsx31("span", { className: LEADING_CLASSES, children: self.action === "join" ? /* @__PURE__ */ jsx31(IconUserPlus, { size: 16, stroke: 1.5 }) : /* @__PURE__ */ jsx31(IconUserMinus, { size: 16, stroke: 1.5 }) }),
|
|
2297
2357
|
label: self.action === "join" ? "Join" : "Leave"
|
|
2298
2358
|
}
|
|
2299
2359
|
),
|
|
2300
|
-
onAdd && /* @__PURE__ */
|
|
2360
|
+
onAdd && /* @__PURE__ */ jsx31(
|
|
2301
2361
|
MenuItem,
|
|
2302
2362
|
{
|
|
2303
2363
|
size: "tall",
|
|
2304
2364
|
className: "py-2",
|
|
2305
2365
|
onClick: () => setView("add"),
|
|
2306
|
-
leading: /* @__PURE__ */
|
|
2366
|
+
leading: /* @__PURE__ */ jsx31("span", { className: LEADING_CLASSES, children: /* @__PURE__ */ jsx31(IconUserPlus, { size: 16, stroke: 1.5 }) }),
|
|
2307
2367
|
label: "Add members"
|
|
2308
2368
|
}
|
|
2309
2369
|
)
|
|
2310
2370
|
] }),
|
|
2311
|
-
roster.map((member) => /* @__PURE__ */
|
|
2312
|
-
/* @__PURE__ */
|
|
2313
|
-
/* @__PURE__ */
|
|
2314
|
-
/* @__PURE__ */
|
|
2315
|
-
member.caption && /* @__PURE__ */
|
|
2371
|
+
roster.map((member) => /* @__PURE__ */ jsxs23("div", { className: "flex h-12 items-center gap-3 px-5", children: [
|
|
2372
|
+
/* @__PURE__ */ jsx31(Avatar, { size: 32, name: member.name, src: member.picture, bot: member.bot }),
|
|
2373
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-[2px]", children: [
|
|
2374
|
+
/* @__PURE__ */ jsx31("div", { className: "truncate text-body-2 text-text-primary", children: member.name }),
|
|
2375
|
+
member.caption && /* @__PURE__ */ jsx31("div", { className: "truncate text-caption text-text-secondary", children: member.caption })
|
|
2316
2376
|
] }),
|
|
2317
|
-
member === ownRow && /* @__PURE__ */
|
|
2377
|
+
member === ownRow && /* @__PURE__ */ jsx31(Button, { variant: "destructive", size: "small", disabled: toggling, onClick: () => void toggle(), children: "Leave" })
|
|
2318
2378
|
] }, member.id)),
|
|
2319
|
-
note && /* @__PURE__ */
|
|
2379
|
+
note && /* @__PURE__ */ jsx31("div", { className: "px-5 pb-2 pt-3 text-caption text-text-secondary", children: note })
|
|
2320
2380
|
]
|
|
2321
2381
|
}
|
|
2322
2382
|
);
|
|
@@ -2324,7 +2384,7 @@ function MembersDialog({ members, count, self, candidates = [], onAdd, note, ini
|
|
|
2324
2384
|
|
|
2325
2385
|
// src/Banner.tsx
|
|
2326
2386
|
import { IconX as IconX5 } from "@tabler/icons-react";
|
|
2327
|
-
import { jsx as
|
|
2387
|
+
import { jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2328
2388
|
var TONE_STYLES = {
|
|
2329
2389
|
ok: "bg-success-muted text-success-default",
|
|
2330
2390
|
error: "bg-error-muted text-error-default",
|
|
@@ -2334,21 +2394,21 @@ var TONE_STYLES = {
|
|
|
2334
2394
|
function Banner({ tone, children, icon, action, onDismiss, dismissLabel = "Dismiss", className }) {
|
|
2335
2395
|
const role = tone === "error" ? "alert" : "status";
|
|
2336
2396
|
if (!onDismiss && !icon && !action) {
|
|
2337
|
-
return /* @__PURE__ */
|
|
2397
|
+
return /* @__PURE__ */ jsx32("div", { role, className: cn("px-4 py-2 text-body-2", TONE_STYLES[tone], className), children });
|
|
2338
2398
|
}
|
|
2339
2399
|
const oneLine = Boolean(icon || action);
|
|
2340
|
-
return /* @__PURE__ */
|
|
2341
|
-
icon && /* @__PURE__ */
|
|
2342
|
-
/* @__PURE__ */
|
|
2343
|
-
action && /* @__PURE__ */
|
|
2344
|
-
onDismiss && /* @__PURE__ */
|
|
2400
|
+
return /* @__PURE__ */ jsxs24("div", { role, className: cn("flex items-center gap-3 px-4 py-2 text-body-2", TONE_STYLES[tone], className), children: [
|
|
2401
|
+
icon && /* @__PURE__ */ jsx32("span", { className: "flex shrink-0", children: icon }),
|
|
2402
|
+
/* @__PURE__ */ jsx32("span", { className: cn("min-w-0 flex-1", oneLine && "truncate"), children }),
|
|
2403
|
+
action && /* @__PURE__ */ jsx32(Button, { variant: "muted", size: "small", className: "shrink-0", onClick: action.onClick, children: action.label }),
|
|
2404
|
+
onDismiss && /* @__PURE__ */ jsx32(IconButton, { variant: "current", "aria-label": dismissLabel, onClick: onDismiss, className: "-mr-1 shrink-0", children: /* @__PURE__ */ jsx32(IconX5, { size: 16, stroke: 1.5 }) })
|
|
2345
2405
|
] });
|
|
2346
2406
|
}
|
|
2347
2407
|
|
|
2348
2408
|
// src/BlockHandle.tsx
|
|
2349
2409
|
import { useCallback as useCallback2, useEffect as useEffect5, useRef as useRef8, useState as useState8 } from "react";
|
|
2350
2410
|
import { IconGripVertical } from "@tabler/icons-react";
|
|
2351
|
-
import { jsx as
|
|
2411
|
+
import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2352
2412
|
function readId(element) {
|
|
2353
2413
|
const own = element.getAttribute("data-block-id") ?? element.querySelector("[data-block-id]")?.getAttribute("data-block-id");
|
|
2354
2414
|
return own || void 0;
|
|
@@ -2413,7 +2473,7 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
2413
2473
|
setLine(null);
|
|
2414
2474
|
editing?.endDrag();
|
|
2415
2475
|
};
|
|
2416
|
-
return /* @__PURE__ */
|
|
2476
|
+
return /* @__PURE__ */ jsxs25(
|
|
2417
2477
|
"div",
|
|
2418
2478
|
{
|
|
2419
2479
|
ref: frame,
|
|
@@ -2441,16 +2501,16 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
2441
2501
|
if (!frame.current?.contains(e.relatedTarget)) setLine(null);
|
|
2442
2502
|
},
|
|
2443
2503
|
children: [
|
|
2444
|
-
/* @__PURE__ */
|
|
2445
|
-
/* @__PURE__ */
|
|
2446
|
-
line !== null && /* @__PURE__ */
|
|
2504
|
+
/* @__PURE__ */ jsx33("div", { ref: content, children }),
|
|
2505
|
+
/* @__PURE__ */ jsx33("div", { "aria-hidden": true, className: "absolute inset-y-0 -left-7 w-7" }),
|
|
2506
|
+
line !== null && /* @__PURE__ */ jsx33("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-x-0 h-px bg-accent-primary", style: { top: line } }),
|
|
2447
2507
|
block && (rows || own) && // The top is the block's, measured: it depends on the document, not on a size of ours.
|
|
2448
|
-
/* @__PURE__ */
|
|
2508
|
+
/* @__PURE__ */ jsx33("div", { className: cn("absolute -left-7", rows && "cursor-grab active:cursor-grabbing"), style: { top }, children: /* @__PURE__ */ jsxs25(
|
|
2449
2509
|
Menu,
|
|
2450
2510
|
{
|
|
2451
2511
|
open,
|
|
2452
2512
|
onOpenChange: setOpen,
|
|
2453
|
-
trigger: /* @__PURE__ */
|
|
2513
|
+
trigger: /* @__PURE__ */ jsx33(
|
|
2454
2514
|
IconButton,
|
|
2455
2515
|
{
|
|
2456
2516
|
"aria-label": "Block menu",
|
|
@@ -2471,12 +2531,12 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
2471
2531
|
endDrag();
|
|
2472
2532
|
setBlock(null);
|
|
2473
2533
|
},
|
|
2474
|
-
children: /* @__PURE__ */
|
|
2534
|
+
children: /* @__PURE__ */ jsx33(IconGripVertical, { size: 16, stroke: 1.5 })
|
|
2475
2535
|
}
|
|
2476
2536
|
),
|
|
2477
2537
|
children: [
|
|
2478
2538
|
rows,
|
|
2479
|
-
rows && own && /* @__PURE__ */
|
|
2539
|
+
rows && own && /* @__PURE__ */ jsx33(MenuSeparator, {}),
|
|
2480
2540
|
own
|
|
2481
2541
|
]
|
|
2482
2542
|
}
|
|
@@ -2486,61 +2546,6 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
2486
2546
|
);
|
|
2487
2547
|
}
|
|
2488
2548
|
|
|
2489
|
-
// src/Checkbox.tsx
|
|
2490
|
-
import { Checkbox as BaseCheckbox } from "@base-ui/react/checkbox";
|
|
2491
|
-
import { Field as BaseField2 } from "@base-ui/react/field";
|
|
2492
|
-
import { IconCheck as IconCheck2 } from "@tabler/icons-react";
|
|
2493
|
-
import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2494
|
-
function squareClasses(checked, disabled, interactive, className) {
|
|
2495
|
-
return cn(
|
|
2496
|
-
"inline-flex items-center justify-center size-4 shrink-0 rounded-sm border transition-colors",
|
|
2497
|
-
checked ? "bg-accent-primary border-accent-primary text-text-inverse" : "bg-transparent border-border-strong hover:border-text-muted",
|
|
2498
|
-
disabled && "opacity-50 pointer-events-none",
|
|
2499
|
-
interactive ? "cursor-pointer" : "pointer-events-none",
|
|
2500
|
-
className
|
|
2501
|
-
);
|
|
2502
|
-
}
|
|
2503
|
-
var tickClasses = (checked) => cn("flex", !checked && "invisible");
|
|
2504
|
-
var WORDS_CLASSES = "text-body-2 text-text-primary";
|
|
2505
|
-
var ROW_CLASSES = "flex shrink-0 items-center gap-3 h-10 px-3 rounded-lg transition-colors";
|
|
2506
|
-
function Checkbox({ checked, onChange, disabled: ownDisabled = false, label, row, leading, className, ...aria }) {
|
|
2507
|
-
const formBusy = useFormBusy();
|
|
2508
|
-
const disabled = ownDisabled || formBusy;
|
|
2509
|
-
if (!onChange) {
|
|
2510
|
-
const picture = /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: squareClasses(checked, disabled, false, className), children: /* @__PURE__ */ jsx33("span", { className: tickClasses(checked), children: /* @__PURE__ */ jsx33(IconCheck2, { size: 12, stroke: 3 }) }) });
|
|
2511
|
-
if (label === void 0) return picture;
|
|
2512
|
-
return /* @__PURE__ */ jsxs25("span", { className: "flex items-center gap-2", children: [
|
|
2513
|
-
picture,
|
|
2514
|
-
/* @__PURE__ */ jsx33("span", { className: WORDS_CLASSES, children: label })
|
|
2515
|
-
] });
|
|
2516
|
-
}
|
|
2517
|
-
const box = /* @__PURE__ */ jsx33(
|
|
2518
|
-
BaseCheckbox.Root,
|
|
2519
|
-
{
|
|
2520
|
-
checked,
|
|
2521
|
-
disabled,
|
|
2522
|
-
"aria-label": aria["aria-label"],
|
|
2523
|
-
"aria-required": aria["aria-required"],
|
|
2524
|
-
onCheckedChange: (next) => onChange(next),
|
|
2525
|
-
onClick: (e) => e.stopPropagation(),
|
|
2526
|
-
className: (state) => squareClasses(state.checked, state.disabled, true, className),
|
|
2527
|
-
children: /* @__PURE__ */ jsx33(BaseCheckbox.Indicator, { keepMounted: true, className: (state) => tickClasses(state.checked), children: /* @__PURE__ */ jsx33(IconCheck2, { size: 12, stroke: 3 }) })
|
|
2528
|
-
}
|
|
2529
|
-
);
|
|
2530
|
-
if (label === void 0) return box;
|
|
2531
|
-
if (row) {
|
|
2532
|
-
return /* @__PURE__ */ jsx33(BaseField2.Root, { disabled, children: /* @__PURE__ */ jsxs25(BaseField2.Label, { className: cn(ROW_CLASSES, checked && "bg-bg-selected", !disabled && "cursor-pointer hover:bg-bg-hover"), children: [
|
|
2533
|
-
leading,
|
|
2534
|
-
/* @__PURE__ */ jsx33("span", { className: cn("flex-1 min-w-0 truncate", WORDS_CLASSES), children: label }),
|
|
2535
|
-
box
|
|
2536
|
-
] }) });
|
|
2537
|
-
}
|
|
2538
|
-
return /* @__PURE__ */ jsx33(BaseField2.Root, { disabled, children: /* @__PURE__ */ jsxs25(BaseField2.Label, { className: cn("flex items-center gap-2", !disabled && "cursor-pointer"), children: [
|
|
2539
|
-
box,
|
|
2540
|
-
/* @__PURE__ */ jsx33("span", { className: WORDS_CLASSES, children: label })
|
|
2541
|
-
] }) });
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
2549
|
// src/CommandPalette.tsx
|
|
2545
2550
|
import {
|
|
2546
2551
|
createContext as createContext6,
|
|
@@ -5886,12 +5891,15 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
5886
5891
|
|
|
5887
5892
|
// src/ResolveDialog.tsx
|
|
5888
5893
|
import { useState as useState21 } from "react";
|
|
5889
|
-
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
5894
|
+
import { jsx as jsx80, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
5890
5895
|
function ResolveDialog({ onResolve, onCancel, refused }) {
|
|
5891
5896
|
const [note, setNote] = useState21("");
|
|
5892
5897
|
return (
|
|
5893
5898
|
// Outlined at rest and green on hover in Signal, the kit's `resolve` look.
|
|
5894
|
-
/* @__PURE__ */ jsx80(FormDialog, { title: "Resolve", submitLabel: "Resolve", submitVariant: "resolve", onSubmit: () => onResolve(note), onClose: onCancel, children: /* @__PURE__ */
|
|
5899
|
+
/* @__PURE__ */ jsx80(FormDialog, { title: "Resolve", submitLabel: "Resolve", submitVariant: "resolve", onSubmit: () => onResolve(note), onClose: onCancel, children: /* @__PURE__ */ jsxs58(Field, { label: "Resolution message (optional)", children: [
|
|
5900
|
+
/* @__PURE__ */ jsx80(Textarea, { autoFocus: true, value: note, onChange: (e) => setNote(e.target.value), placeholder: "Summarize the outcome or decision...", className: "h-[109px]" }),
|
|
5901
|
+
refused && /* @__PURE__ */ jsx80(FieldLine, { tone: "error", children: refused })
|
|
5902
|
+
] }) })
|
|
5895
5903
|
);
|
|
5896
5904
|
}
|
|
5897
5905
|
|
|
@@ -5938,7 +5946,7 @@ function useFaceLine(root, active, toDot = false) {
|
|
|
5938
5946
|
}
|
|
5939
5947
|
|
|
5940
5948
|
// src/ConversationCard.tsx
|
|
5941
|
-
import { Fragment as Fragment23, jsx as jsx81, jsxs as
|
|
5949
|
+
import { Fragment as Fragment23, jsx as jsx81, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
5942
5950
|
function When({ time, at: given, timeHref, timeLabel = "Link to this" }) {
|
|
5943
5951
|
const at = momentOf(given);
|
|
5944
5952
|
const exact = at === void 0 ? void 0 : exactTime(at);
|
|
@@ -5949,8 +5957,8 @@ function When({ time, at: given, timeHref, timeLabel = "Link to this" }) {
|
|
|
5949
5957
|
return /* @__PURE__ */ jsx81(MetaText, { className: "shrink-0", children: exact ? /* @__PURE__ */ jsx81(WithTooltip, { label: exact, children: said }) : time });
|
|
5950
5958
|
}
|
|
5951
5959
|
function Head({ author, time, at, timeHref, timeLabel, edited, isNew, urgent, meta }) {
|
|
5952
|
-
return /* @__PURE__ */
|
|
5953
|
-
/* @__PURE__ */
|
|
5960
|
+
return /* @__PURE__ */ jsxs59("div", { className: "flex w-full items-center gap-2", children: [
|
|
5961
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
5954
5962
|
/* @__PURE__ */ jsx81("span", { "data-face": true, className: "relative flex shrink-0", children: /* @__PURE__ */ jsx81(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }) }),
|
|
5955
5963
|
/* @__PURE__ */ jsx81("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
5956
5964
|
/* @__PURE__ */ jsx81(When, { time, at, timeHref, timeLabel }),
|
|
@@ -5965,13 +5973,13 @@ function attentionOf(fresh, urgent, inThreadCard) {
|
|
|
5965
5973
|
return urgent ? "warning" : "accent";
|
|
5966
5974
|
}
|
|
5967
5975
|
function EndedLine({ by, note, at }) {
|
|
5968
|
-
return /* @__PURE__ */
|
|
5976
|
+
return /* @__PURE__ */ jsxs59("div", { "data-resolved": "line", className: "relative flex items-start py-1", children: [
|
|
5969
5977
|
/* @__PURE__ */ jsx81("span", { className: "flex h-[17px] w-10 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx81("span", { "data-dot": true, className: "relative z-10 flex size-2 items-center justify-center rounded-full bg-bg-surface", children: /* @__PURE__ */ jsx81("span", { className: "size-1 rounded-full bg-success-default" }) }) }),
|
|
5970
|
-
/* @__PURE__ */
|
|
5978
|
+
/* @__PURE__ */ jsxs59("p", { className: "min-w-0 text-h5 leading-snug", children: [
|
|
5971
5979
|
/* @__PURE__ */ jsx81("span", { className: "whitespace-nowrap text-text-primary", children: by }),
|
|
5972
5980
|
/* @__PURE__ */ jsx81(IconArrowNarrowRight, { size: 12, stroke: 1.5, className: "mx-1.5 -mt-px inline shrink-0 text-text-primary" }),
|
|
5973
5981
|
/* @__PURE__ */ jsx81("span", { className: "text-text-secondary", children: note }),
|
|
5974
|
-
at && /* @__PURE__ */
|
|
5982
|
+
at && /* @__PURE__ */ jsxs59(MetaText, { size: "chip", children: [
|
|
5975
5983
|
" \xB7 ",
|
|
5976
5984
|
at
|
|
5977
5985
|
] })
|
|
@@ -5980,7 +5988,7 @@ function EndedLine({ by, note, at }) {
|
|
|
5980
5988
|
}
|
|
5981
5989
|
function ResolvedCheck({ by, note, at }) {
|
|
5982
5990
|
const said = `Resolved by ${by}${at ? `, ${at}` : ""}${note ? `: ${note}` : ""}`;
|
|
5983
|
-
return /* @__PURE__ */ jsx81(WithTooltip, { label: said, wrapperClassName: "flex shrink-0", children: /* @__PURE__ */
|
|
5991
|
+
return /* @__PURE__ */ jsx81(WithTooltip, { label: said, wrapperClassName: "flex shrink-0", children: /* @__PURE__ */ jsxs59("span", { className: "flex items-center gap-1 text-caption text-success-default", children: [
|
|
5984
5992
|
/* @__PURE__ */ jsx81(IconCircleCheck4, { size: 14, stroke: 1.5 }),
|
|
5985
5993
|
"Resolved"
|
|
5986
5994
|
] }) });
|
|
@@ -5990,9 +5998,9 @@ function Words({ children }) {
|
|
|
5990
5998
|
}
|
|
5991
5999
|
function Reactions({ reactions, refused, readOnly }) {
|
|
5992
6000
|
if ((!reactions || reactions.reactions.length === 0) && !refused) return null;
|
|
5993
|
-
return /* @__PURE__ */
|
|
6001
|
+
return /* @__PURE__ */ jsxs59("div", { className: "relative flex w-full flex-col gap-1 pb-2 pl-8 pt-1", children: [
|
|
5994
6002
|
reactions && /* @__PURE__ */ jsx81(ReactionRow, { ...reactions, onToggle: readOnly ? void 0 : reactions.onToggle }),
|
|
5995
|
-
refused && /* @__PURE__ */
|
|
6003
|
+
refused && /* @__PURE__ */ jsxs59(FieldLine, { tone: "error", children: [
|
|
5996
6004
|
"Not reacted: ",
|
|
5997
6005
|
refused,
|
|
5998
6006
|
"."
|
|
@@ -6000,7 +6008,7 @@ function Reactions({ reactions, refused, readOnly }) {
|
|
|
6000
6008
|
] });
|
|
6001
6009
|
}
|
|
6002
6010
|
function Editing({ author, children }) {
|
|
6003
|
-
return /* @__PURE__ */ jsx81("div", { className: "p-2", children: /* @__PURE__ */
|
|
6011
|
+
return /* @__PURE__ */ jsx81("div", { className: "p-2", children: /* @__PURE__ */ jsxs59("div", { className: "flex items-start gap-2", children: [
|
|
6004
6012
|
/* @__PURE__ */ jsx81(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot, className: "mt-1 shrink-0" }),
|
|
6005
6013
|
/* @__PURE__ */ jsx81("div", { className: "min-w-0 flex-1", children })
|
|
6006
6014
|
] }) });
|
|
@@ -6049,8 +6057,8 @@ function ConversationCard(props) {
|
|
|
6049
6057
|
const marked = selected ?? (item && !item.under ? item.open : void 0);
|
|
6050
6058
|
const under = !!item?.under;
|
|
6051
6059
|
const repliesRow = replies && replies.count > 0 && /* @__PURE__ */ jsx81(RepliesRow, { ...replies, onOpen: replies.onOpen ?? (under ? item?.toggle : void 0), open: replies.open ?? (under && !!item?.open), urgent });
|
|
6052
|
-
return /* @__PURE__ */
|
|
6053
|
-
/* @__PURE__ */
|
|
6060
|
+
return /* @__PURE__ */ jsxs59(Fragment23, { children: [
|
|
6061
|
+
/* @__PURE__ */ jsxs59(
|
|
6054
6062
|
Card,
|
|
6055
6063
|
{
|
|
6056
6064
|
ref: root,
|
|
@@ -6075,11 +6083,11 @@ function ConversationCard(props) {
|
|
|
6075
6083
|
setHovered(false);
|
|
6076
6084
|
},
|
|
6077
6085
|
children: [
|
|
6078
|
-
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */
|
|
6079
|
-
deleted ? /* @__PURE__ */
|
|
6086
|
+
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs59("div", { "data-comment-body": true, className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6087
|
+
deleted ? /* @__PURE__ */ jsxs59(Fragment23, { children: [
|
|
6080
6088
|
!!about && /* @__PURE__ */ jsx81("div", { className: "relative w-full pl-8 pr-2", children: about }),
|
|
6081
6089
|
/* @__PURE__ */ jsx81("p", { className: cn("w-full pb-2 pl-8 pr-2 text-caption italic text-text-muted", !!about && "pt-1"), children: "This comment was deleted." })
|
|
6082
|
-
] }) : /* @__PURE__ */
|
|
6090
|
+
] }) : /* @__PURE__ */ jsxs59(Fragment23, { children: [
|
|
6083
6091
|
/* @__PURE__ */ jsx81(
|
|
6084
6092
|
Head,
|
|
6085
6093
|
{
|
|
@@ -6147,9 +6155,9 @@ function ConversationCard(props) {
|
|
|
6147
6155
|
]
|
|
6148
6156
|
}
|
|
6149
6157
|
),
|
|
6150
|
-
deleting && onDelete && /* @__PURE__ */ jsx81(ConfirmDialog, { title: `Delete this ${noun}?`, confirmLabel: `Delete ${noun}`, destructive: true, onConfirm: onDelete, onClose: () => setDeleting(false), refused: deleteRefused, children: deleteNote !== void 0 ? typeof deleteNote === "string" ? /* @__PURE__ */ jsx81("p", { children: deleteNote }) : deleteNote : /* @__PURE__ */
|
|
6158
|
+
deleting && onDelete && /* @__PURE__ */ jsx81(ConfirmDialog, { title: `Delete this ${noun}?`, confirmLabel: `Delete ${noun}`, destructive: true, onConfirm: onDelete, onClose: () => setDeleting(false), refused: deleteRefused, children: deleteNote !== void 0 ? typeof deleteNote === "string" ? /* @__PURE__ */ jsx81("p", { children: deleteNote }) : deleteNote : /* @__PURE__ */ jsxs59(Fragment23, { children: [
|
|
6151
6159
|
/* @__PURE__ */ jsx81("p", { children: "It is deleted for everyone." }),
|
|
6152
|
-
replies && replies.count > 0 && /* @__PURE__ */
|
|
6160
|
+
replies && replies.count > 0 && /* @__PURE__ */ jsxs59("p", { children: [
|
|
6153
6161
|
"Its ",
|
|
6154
6162
|
replies.count === 1 ? "reply stays" : `${replies.count} replies stay`,
|
|
6155
6163
|
"."
|
|
@@ -6186,8 +6194,8 @@ function ReplyCard(props) {
|
|
|
6186
6194
|
useLayoutEffect7(() => {
|
|
6187
6195
|
if (drawn) drawn.added += 1;
|
|
6188
6196
|
}, [drawn]);
|
|
6189
|
-
return /* @__PURE__ */
|
|
6190
|
-
/* @__PURE__ */
|
|
6197
|
+
return /* @__PURE__ */ jsxs59(Fragment23, { children: [
|
|
6198
|
+
/* @__PURE__ */ jsxs59(
|
|
6191
6199
|
Card,
|
|
6192
6200
|
{
|
|
6193
6201
|
ref: root,
|
|
@@ -6210,7 +6218,7 @@ function ReplyCard(props) {
|
|
|
6210
6218
|
setHovered(false);
|
|
6211
6219
|
},
|
|
6212
6220
|
children: [
|
|
6213
|
-
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */
|
|
6221
|
+
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs59("div", { className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6214
6222
|
/* @__PURE__ */ jsx81(Head, { author, time: props.time, at: props.at, timeHref: props.timeHref, timeLabel: props.timeLabel, edited: props.edited, isNew, urgent }),
|
|
6215
6223
|
about && /* @__PURE__ */ jsx81("div", { className: "w-full pl-8 pr-2 pt-0.5", children: about }),
|
|
6216
6224
|
/* @__PURE__ */ jsx81(Words, { children }),
|
|
@@ -6258,9 +6266,9 @@ function ReplyCard(props) {
|
|
|
6258
6266
|
import { Fragment as Fragment24, useCallback as useCallback6, useEffect as useEffect14, useLayoutEffect as useLayoutEffect8, useRef as useRef20, useState as useState25 } from "react";
|
|
6259
6267
|
|
|
6260
6268
|
// src/Panel.tsx
|
|
6261
|
-
import { jsx as jsx82, jsxs as
|
|
6269
|
+
import { jsx as jsx82, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
6262
6270
|
function Frame({ title, chevron = false, actions, header, children, footer, bodyClassName, bodyRef, onBodyScroll, className, broken = false }) {
|
|
6263
|
-
return /* @__PURE__ */
|
|
6271
|
+
return /* @__PURE__ */ jsxs60("div", { className: cn("flex h-full min-h-0 flex-1 flex-col", className), children: [
|
|
6264
6272
|
header ?? /* @__PURE__ */ jsx82(ContainerHeader, { title, chevron, actions }),
|
|
6265
6273
|
broken ? (
|
|
6266
6274
|
// The message takes the room the body had and centres itself in it.
|
|
@@ -6382,7 +6390,7 @@ function useWatchSeen(seen, root, attribute) {
|
|
|
6382
6390
|
}
|
|
6383
6391
|
|
|
6384
6392
|
// src/ConversationLayout.tsx
|
|
6385
|
-
import { Fragment as Fragment25, jsx as jsx83, jsxs as
|
|
6393
|
+
import { Fragment as Fragment25, jsx as jsx83, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6386
6394
|
var threadOf = (item) => typeof item?.thread === "function" ? item.thread() : item?.thread;
|
|
6387
6395
|
function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
6388
6396
|
if (loading) return /* @__PURE__ */ jsx83(SkeletonConversation, {});
|
|
@@ -6395,7 +6403,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6395
6403
|
} : null;
|
|
6396
6404
|
const draw2 = (item) => {
|
|
6397
6405
|
if (!under) {
|
|
6398
|
-
return /* @__PURE__ */
|
|
6406
|
+
return /* @__PURE__ */ jsxs61(Fragment24, { children: [
|
|
6399
6407
|
item.before,
|
|
6400
6408
|
/* @__PURE__ */ jsx83("div", { "data-conversation-item": item.id, className: cn("flex flex-col", SHOWN_CLASSES), children: /* @__PURE__ */ jsx83(InConversationItem.Provider, { value: stateOf(item), children: item.card }) })
|
|
6401
6409
|
] }, item.id);
|
|
@@ -6416,10 +6424,10 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6416
6424
|
seen.set(name, count);
|
|
6417
6425
|
stretches.push({ key: `${item.day === void 0 ? "no-day" : `day:${name}`}#${count}`, day: item.day, items: [item] });
|
|
6418
6426
|
}
|
|
6419
|
-
return /* @__PURE__ */
|
|
6427
|
+
return /* @__PURE__ */ jsxs61(Fragment25, { children: [
|
|
6420
6428
|
above,
|
|
6421
6429
|
stretches.map(
|
|
6422
|
-
(stretch) => stretch.day === void 0 ? /* @__PURE__ */ jsx83(Fragment24, { children: stretch.items.map(draw2) }, stretch.key) : /* @__PURE__ */
|
|
6430
|
+
(stretch) => stretch.day === void 0 ? /* @__PURE__ */ jsx83(Fragment24, { children: stretch.items.map(draw2) }, stretch.key) : /* @__PURE__ */ jsxs61("div", { className: "flex flex-col gap-2", children: [
|
|
6423
6431
|
/* @__PURE__ */ jsx83(Divider, { look: "section", label: stretch.day, sticky: true }),
|
|
6424
6432
|
stretch.items.map(draw2)
|
|
6425
6433
|
] }, stretch.key)
|
|
@@ -6440,7 +6448,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6440
6448
|
children: list.map(draw2)
|
|
6441
6449
|
}
|
|
6442
6450
|
);
|
|
6443
|
-
return /* @__PURE__ */
|
|
6451
|
+
return /* @__PURE__ */ jsxs61(Fragment25, { children: [
|
|
6444
6452
|
above,
|
|
6445
6453
|
items.filter((item) => !item.resolved && !item.gone).map(draw2),
|
|
6446
6454
|
group("On deleted blocks", gone),
|
|
@@ -6450,7 +6458,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6450
6458
|
function UnderItem({ item, isOpen, state, caret }) {
|
|
6451
6459
|
const root = useRef20(null);
|
|
6452
6460
|
const line = useFaceLine(root, isOpen);
|
|
6453
|
-
return /* @__PURE__ */
|
|
6461
|
+
return /* @__PURE__ */ jsxs61(
|
|
6454
6462
|
Card,
|
|
6455
6463
|
{
|
|
6456
6464
|
ref: root,
|
|
@@ -6462,7 +6470,7 @@ function UnderItem({ item, isOpen, state, caret }) {
|
|
|
6462
6470
|
quietUntilHover: !isOpen,
|
|
6463
6471
|
className: cn("relative flex flex-col", isOpen && "pb-2", SHOWN_CLASSES),
|
|
6464
6472
|
children: [
|
|
6465
|
-
/* @__PURE__ */ jsx83(InConversationItem.Provider, { value: state, children: /* @__PURE__ */ jsx83(InThreadCard.Provider, { value: isOpen, children: /* @__PURE__ */
|
|
6473
|
+
/* @__PURE__ */ jsx83(InConversationItem.Provider, { value: state, children: /* @__PURE__ */ jsx83(InThreadCard.Provider, { value: isOpen, children: /* @__PURE__ */ jsxs61(LineByLayout.Provider, { value: true, children: [
|
|
6466
6474
|
/* @__PURE__ */ jsx83("div", { className: "-m-px flex flex-col", children: item.card }),
|
|
6467
6475
|
isOpen && /* @__PURE__ */ jsx83(caretOnOpen.Provider, { value: caret, children: threadOf(item) })
|
|
6468
6476
|
] }) }) }),
|
|
@@ -6591,7 +6599,7 @@ function ConversationLayout({
|
|
|
6591
6599
|
// The body at least the column's height: the comments start at its top, and the note under them (`below`) is pushed
|
|
6592
6600
|
// to its foot, so with few comments it sits on the box, as a short conversation's last line does in Peek's two
|
|
6593
6601
|
// columns (Katerina, 2 November); with many it comes after them, and scrolls with them.
|
|
6594
|
-
/* @__PURE__ */
|
|
6602
|
+
/* @__PURE__ */ jsxs61(Panel, { className: cn("w-[384px] flex-none", className), title, actions, bodyRef: setBody, bodyClassName: "flex min-h-full flex-col gap-2 p-3", footer: box && /* @__PURE__ */ jsx83("div", { className: "p-3", children: box }), children: [
|
|
6595
6603
|
/* @__PURE__ */ jsx83(List, { items, open, under: true, above, loading, empty, change, caret }),
|
|
6596
6604
|
!loading && below != null && below !== false && below !== "" && /* @__PURE__ */ jsx83("div", { className: "mt-auto flex flex-col gap-2", children: below })
|
|
6597
6605
|
] })
|
|
@@ -6599,21 +6607,21 @@ function ConversationLayout({
|
|
|
6599
6607
|
}
|
|
6600
6608
|
const opened = threadOf(items.find((item) => item.id === open));
|
|
6601
6609
|
const side = opened || aside;
|
|
6602
|
-
return /* @__PURE__ */
|
|
6610
|
+
return /* @__PURE__ */ jsxs61("div", { className: cn("flex min-h-0 min-w-0 flex-1", className), children: [
|
|
6603
6611
|
/* @__PURE__ */ jsx83(
|
|
6604
6612
|
ErrorBoundary,
|
|
6605
6613
|
{
|
|
6606
6614
|
label: "conversation",
|
|
6607
|
-
frame: (message) => /* @__PURE__ */
|
|
6615
|
+
frame: (message) => /* @__PURE__ */ jsxs61("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
6608
6616
|
/* @__PURE__ */ jsx83(ContainerHeader, { title }),
|
|
6609
6617
|
/* @__PURE__ */ jsx83("div", { className: "flex min-h-0 flex-1 flex-col px-4", children: message })
|
|
6610
6618
|
] }),
|
|
6611
|
-
children: /* @__PURE__ */
|
|
6619
|
+
children: /* @__PURE__ */ jsxs61("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
6612
6620
|
header,
|
|
6613
|
-
/* @__PURE__ */
|
|
6621
|
+
/* @__PURE__ */ jsxs61(ScrollArea, { className: "min-h-0 flex-1", viewportRef: setBody, onScroll: scrolled, contentClassName: "flex min-h-full flex-col", children: [
|
|
6614
6622
|
top != null && top !== false && top !== "" && /* @__PURE__ */ jsx83("div", { className: "shrink-0 px-4 pt-4", children: top }),
|
|
6615
6623
|
/* @__PURE__ */ jsx83("div", { className: "min-h-0 flex-1" }),
|
|
6616
|
-
/* @__PURE__ */
|
|
6624
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex shrink-0 flex-col gap-2 p-4", children: [
|
|
6617
6625
|
/* @__PURE__ */ jsx83(List, { items, open, under: false, above, loading, empty, change, caret }),
|
|
6618
6626
|
!loading && below
|
|
6619
6627
|
] })
|
|
@@ -6630,10 +6638,10 @@ function ConversationLayout({
|
|
|
6630
6638
|
}
|
|
6631
6639
|
|
|
6632
6640
|
// src/ConversationPlace.tsx
|
|
6633
|
-
import { jsx as jsx84, jsxs as
|
|
6641
|
+
import { jsx as jsx84, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6634
6642
|
function ConversationPlace({ relation, place, children, className, ...props }) {
|
|
6635
|
-
return /* @__PURE__ */
|
|
6636
|
-
/* @__PURE__ */
|
|
6643
|
+
return /* @__PURE__ */ jsxs62("div", { className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
6644
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex items-center gap-2", children: [
|
|
6637
6645
|
/* @__PURE__ */ jsx84(Chip, { type: "neutral", label: relation }),
|
|
6638
6646
|
place && /* @__PURE__ */ jsx84("span", { className: "truncate text-caption text-text-muted", children: place })
|
|
6639
6647
|
] }),
|
|
@@ -6642,21 +6650,21 @@ function ConversationPlace({ relation, place, children, className, ...props }) {
|
|
|
6642
6650
|
}
|
|
6643
6651
|
|
|
6644
6652
|
// src/QuotedLine.tsx
|
|
6645
|
-
import { jsx as jsx85, jsxs as
|
|
6653
|
+
import { jsx as jsx85, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
6646
6654
|
var SINCE = { reworded: "Changed since", gone: "Deleted from the page" };
|
|
6647
6655
|
function QuotedLine({ words, state = "here", label }) {
|
|
6648
6656
|
const shown2 = words ?? label ?? "";
|
|
6649
6657
|
const inThePage = !!words && state === "here";
|
|
6650
|
-
return /* @__PURE__ */
|
|
6658
|
+
return /* @__PURE__ */ jsxs63("div", { "data-quoted": words ? state : "part", className: "flex w-full min-w-0 flex-col gap-0.5", children: [
|
|
6651
6659
|
/* @__PURE__ */ jsx85(WithTooltip, { label: shown2, wrapperClassName: "flex min-w-0", children: /* @__PURE__ */ jsx85("p", { className: "line-clamp-2 text-caption text-text-secondary", children: /* @__PURE__ */ jsx85("mark", { className: cn("rounded-sm px-0.5 text-text-primary [box-decoration-break:clone]", inThePage ? "bg-warning-muted" : "bg-bg-inset text-text-secondary", state === "gone" && "line-through"), children: shown2 }) }) }),
|
|
6652
6660
|
state !== "here" && /* @__PURE__ */ jsx85("span", { className: "text-caption italic text-text-muted", children: SINCE[state] })
|
|
6653
6661
|
] });
|
|
6654
6662
|
}
|
|
6655
6663
|
|
|
6656
6664
|
// src/ReactionHorizon.tsx
|
|
6657
|
-
import { Fragment as Fragment26, jsx as jsx86, jsxs as
|
|
6665
|
+
import { Fragment as Fragment26, jsx as jsx86, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6658
6666
|
function Said({ limit, omitted, noun }) {
|
|
6659
|
-
return /* @__PURE__ */
|
|
6667
|
+
return /* @__PURE__ */ jsxs64(Fragment26, { children: [
|
|
6660
6668
|
"Reactions are shown for the latest ",
|
|
6661
6669
|
limit,
|
|
6662
6670
|
" ",
|
|
@@ -6671,8 +6679,8 @@ function Said({ limit, omitted, noun }) {
|
|
|
6671
6679
|
function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepRoom = false }) {
|
|
6672
6680
|
const room = keepRoom && omitted <= 0 && /* @__PURE__ */ jsx86("p", { "aria-hidden": true, className: "invisible text-caption text-text-muted", children: /* @__PURE__ */ jsx86(Said, { limit, omitted: 1, noun }) });
|
|
6673
6681
|
if (omitted <= 0 && !cut) return room || null;
|
|
6674
|
-
return /* @__PURE__ */
|
|
6675
|
-
/* @__PURE__ */
|
|
6682
|
+
return /* @__PURE__ */ jsxs64(Fragment26, { children: [
|
|
6683
|
+
/* @__PURE__ */ jsxs64("p", { className: "text-caption text-text-muted", children: [
|
|
6676
6684
|
omitted > 0 && /* @__PURE__ */ jsx86(Said, { limit, omitted, noun }),
|
|
6677
6685
|
omitted > 0 && cut && " ",
|
|
6678
6686
|
cut && "Some reactions may be missing."
|
|
@@ -6682,11 +6690,11 @@ function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepR
|
|
|
6682
6690
|
}
|
|
6683
6691
|
|
|
6684
6692
|
// src/PinnedComment.tsx
|
|
6685
|
-
import { jsx as jsx87, jsxs as
|
|
6693
|
+
import { jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6686
6694
|
function PinnedComment({ author, time, at: given, words, deleted = false }) {
|
|
6687
6695
|
const at = momentOf(given);
|
|
6688
|
-
return /* @__PURE__ */ jsx87(Card, { fill: "elevated", clip: true, children: deleted ? /* @__PURE__ */ jsx87("p", { className: "p-2 text-caption italic text-text-muted", children: "This comment was deleted." }) : /* @__PURE__ */
|
|
6689
|
-
/* @__PURE__ */
|
|
6696
|
+
return /* @__PURE__ */ jsx87(Card, { fill: "elevated", clip: true, children: deleted ? /* @__PURE__ */ jsx87("p", { className: "p-2 text-caption italic text-text-muted", children: "This comment was deleted." }) : /* @__PURE__ */ jsxs65("div", { className: "flex flex-col p-2", children: [
|
|
6697
|
+
/* @__PURE__ */ jsxs65("div", { className: "flex items-center gap-2", children: [
|
|
6690
6698
|
/* @__PURE__ */ jsx87(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }),
|
|
6691
6699
|
/* @__PURE__ */ jsx87("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
6692
6700
|
/* @__PURE__ */ jsx87(MetaText, { className: "shrink-0", children: at === void 0 ? time : /* @__PURE__ */ jsx87(WithTooltip, { label: exactTime(at), children: /* @__PURE__ */ jsx87("time", { dateTime: new Date(at).toISOString(), children: time }) }) })
|
|
@@ -6697,13 +6705,13 @@ function PinnedComment({ author, time, at: given, words, deleted = false }) {
|
|
|
6697
6705
|
|
|
6698
6706
|
// src/ArchiveDialog.tsx
|
|
6699
6707
|
import { useState as useState26 } from "react";
|
|
6700
|
-
import { jsx as jsx88, jsxs as
|
|
6708
|
+
import { jsx as jsx88, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
6701
6709
|
var listOf = (parts) => parts.length <= 1 ? parts[0] ?? "" : `${parts.slice(0, -1).join(", ")} and ${parts.at(-1)}`;
|
|
6702
6710
|
function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, onClose, onArchive }) {
|
|
6703
6711
|
const [resolution, setResolution] = useState26("");
|
|
6704
6712
|
const where = apps.length ? `, ${listOf(apps.map((app) => `in ${app}`))}` : "";
|
|
6705
|
-
return /* @__PURE__ */
|
|
6706
|
-
/* @__PURE__ */
|
|
6713
|
+
return /* @__PURE__ */ jsxs66(FormDialog, { title: `Archive \u201C${title}\u201D?`, submitLabel: `Archive ${what}`, ready: hides !== null, onSubmit: () => onArchive(resolution.trim()), onClose, children: [
|
|
6714
|
+
/* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-2 text-body-2 text-text-primary", children: [
|
|
6707
6715
|
/* @__PURE__ */ jsx88("p", { children: hides === null ? `Counting what archiving this ${what} would hide\u2026` : hides.length ? `This hides the ${what} and ${listOf(hides)} from every list${where}.` : `This hides the ${what} from every list${where}.` }),
|
|
6708
6716
|
staysVisible.length > 0 && /* @__PURE__ */ jsx88("p", { children: `${listOf(staysVisible)} stay visible there.` }),
|
|
6709
6717
|
/* @__PURE__ */ jsx88("p", { className: "text-text-secondary", children: getBack })
|
|
@@ -6723,15 +6731,15 @@ function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, o
|
|
|
6723
6731
|
// src/ArchivedNotice.tsx
|
|
6724
6732
|
import { useState as useState27 } from "react";
|
|
6725
6733
|
import { IconArchive } from "@tabler/icons-react";
|
|
6726
|
-
import { jsx as jsx89, jsxs as
|
|
6734
|
+
import { jsx as jsx89, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
6727
6735
|
function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive, onOpenParent }) {
|
|
6728
6736
|
const [unarchiving, setUnarchiving] = useState27(false);
|
|
6729
6737
|
const parent = withWhat ?? (withTitle ? "parent" : void 0);
|
|
6730
6738
|
const named2 = withTitle ? ` \u201C${withTitle}\u201D` : "";
|
|
6731
6739
|
const line = parent ? `Archived with its ${parent}${named2} by ${by} \xB7 ${when}` : `Archived by ${by} \xB7 ${when}`;
|
|
6732
|
-
return /* @__PURE__ */
|
|
6740
|
+
return /* @__PURE__ */ jsxs67(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
6733
6741
|
/* @__PURE__ */ jsx89(IconArchive, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
6734
|
-
/* @__PURE__ */
|
|
6742
|
+
/* @__PURE__ */ jsxs67("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
6735
6743
|
/* @__PURE__ */ jsx89("span", { className: "text-body-2-strong text-text-primary", children: line }),
|
|
6736
6744
|
resolution && /* @__PURE__ */ jsx89("p", { className: "whitespace-pre-wrap text-caption text-text-secondary", children: resolution })
|
|
6737
6745
|
] }),
|
|
@@ -6755,10 +6763,10 @@ function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive
|
|
|
6755
6763
|
// src/DeletedNotice.tsx
|
|
6756
6764
|
import { useState as useState28 } from "react";
|
|
6757
6765
|
import { IconTrash } from "@tabler/icons-react";
|
|
6758
|
-
import { jsx as jsx90, jsxs as
|
|
6766
|
+
import { jsx as jsx90, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
6759
6767
|
function DeletedNotice({ by, when, onRestore }) {
|
|
6760
6768
|
const [restoring, setRestoring] = useState28(false);
|
|
6761
|
-
return /* @__PURE__ */
|
|
6769
|
+
return /* @__PURE__ */ jsxs68(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
6762
6770
|
/* @__PURE__ */ jsx90(IconTrash, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
6763
6771
|
/* @__PURE__ */ jsx90("span", { className: "min-w-0 flex-1 text-body-2-strong text-text-primary", children: `Deleted by ${by} \xB7 ${when}` }),
|
|
6764
6772
|
onRestore && /* @__PURE__ */ jsx90(
|
|
@@ -6788,7 +6796,7 @@ function NoAccessNotice({ what }) {
|
|
|
6788
6796
|
// src/Thread.tsx
|
|
6789
6797
|
import { Children, useCallback as useCallback7, useContext as useContext15, useLayoutEffect as useLayoutEffect9, useRef as useRef21, useState as useState29 } from "react";
|
|
6790
6798
|
import { IconX as IconX6 } from "@tabler/icons-react";
|
|
6791
|
-
import { Fragment as Fragment27, jsx as jsx92, jsxs as
|
|
6799
|
+
import { Fragment as Fragment27, jsx as jsx92, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
6792
6800
|
var always = () => true;
|
|
6793
6801
|
var anyIn = (children) => Children.toArray(children).length > 0;
|
|
6794
6802
|
function Replies({ children, loading, empty }) {
|
|
@@ -6839,27 +6847,27 @@ function Thread({
|
|
|
6839
6847
|
const foot = notice ?? box;
|
|
6840
6848
|
const layoutLine = useContext15(LineByLayout);
|
|
6841
6849
|
if (place === "under") {
|
|
6842
|
-
return /* @__PURE__ */
|
|
6850
|
+
return /* @__PURE__ */ jsxs69("div", { ref: under, "data-thread": "under", className: cn("flex flex-col", className), children: [
|
|
6843
6851
|
(loading || anyIn(children)) && // The replies hang from a line under the comment's face (20px in: its 8px and half its 24px), one step in (Ship's way).
|
|
6844
6852
|
// 8px from the one card's right edge too, as the box under them: a hovered reply never touches it (Katerina, 31 October).
|
|
6845
6853
|
// 2px, as the line from the comment's face that runs into it (Katerina, 1 November), and drawn the same way, a
|
|
6846
6854
|
// filled bar rather than a border: a border snaps to the screen's pixels on its own, and at some zooms the two
|
|
6847
6855
|
// stood a pixel apart (Katerina: "the line breaks in the middle").
|
|
6848
|
-
/* @__PURE__ */
|
|
6856
|
+
/* @__PURE__ */ jsxs69("div", { "data-thread-replies": true, className: "relative ml-[19px] mr-2 flex flex-col gap-1 pl-2.5", children: [
|
|
6849
6857
|
!layoutLine && /* @__PURE__ */ jsx92("span", { "aria-hidden": true, className: "absolute bottom-0 left-0 top-0 w-0.5 bg-border-default" }),
|
|
6850
6858
|
/* @__PURE__ */ jsx92(caretOnOpen.Provider, { value: 0, children: loading ? /* @__PURE__ */ jsx92(SkeletonConversation, {}) : children })
|
|
6851
6859
|
] }),
|
|
6852
6860
|
foot && /* @__PURE__ */ jsx92("div", { className: "px-2 pt-2", children: foot })
|
|
6853
6861
|
] });
|
|
6854
6862
|
}
|
|
6855
|
-
return /* @__PURE__ */
|
|
6863
|
+
return /* @__PURE__ */ jsxs69(
|
|
6856
6864
|
Panel,
|
|
6857
6865
|
{
|
|
6858
6866
|
className,
|
|
6859
6867
|
bodyRef: setBody,
|
|
6860
6868
|
bodyClassName: "flex flex-col",
|
|
6861
6869
|
title,
|
|
6862
|
-
actions: /* @__PURE__ */
|
|
6870
|
+
actions: /* @__PURE__ */ jsxs69(Fragment27, { children: [
|
|
6863
6871
|
resolved && /* @__PURE__ */ jsx92(Chip, { type: "success", label: "Resolved" }),
|
|
6864
6872
|
actions,
|
|
6865
6873
|
onClose && /* @__PURE__ */ jsx92(IconButton, { tooltip: "Close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx92(IconX6, { size: 16, stroke: 1.5 }) })
|
|
@@ -6921,9 +6929,9 @@ function showInConversationWhenDrawn(id, { wait = WAIT_MS, ...options } = {}) {
|
|
|
6921
6929
|
// src/SearchInput.tsx
|
|
6922
6930
|
import "react";
|
|
6923
6931
|
import { Input as Input3 } from "@base-ui/react/input";
|
|
6924
|
-
import { jsx as jsx93, jsxs as
|
|
6932
|
+
import { jsx as jsx93, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
6925
6933
|
function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...props }) {
|
|
6926
|
-
return /* @__PURE__ */
|
|
6934
|
+
return /* @__PURE__ */ jsxs70(
|
|
6927
6935
|
"div",
|
|
6928
6936
|
{
|
|
6929
6937
|
className: cn(
|
|
@@ -6952,21 +6960,21 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
6952
6960
|
// src/PageHeader.tsx
|
|
6953
6961
|
import { Fragment as Fragment28 } from "react";
|
|
6954
6962
|
import { IconLock as IconLock2 } from "@tabler/icons-react";
|
|
6955
|
-
import { Fragment as Fragment29, jsx as jsx94, jsxs as
|
|
6963
|
+
import { Fragment as Fragment29, jsx as jsx94, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
6956
6964
|
function PageHeader({ title, leading, private: locked = false, after, meta, time, members, actions, className }) {
|
|
6957
6965
|
const words = (meta ?? []).map((one) => typeof one === "string" ? { label: one } : one);
|
|
6958
6966
|
const quiet = words.length > 0 || time != null || members != null;
|
|
6959
|
-
const name = /* @__PURE__ */
|
|
6967
|
+
const name = /* @__PURE__ */ jsxs71("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
6960
6968
|
leading != null && /* @__PURE__ */ jsx94("span", { className: "flex shrink-0 items-center text-text-secondary", children: leading }),
|
|
6961
6969
|
locked && /* @__PURE__ */ jsx94(WithTooltip, { label: "Private", children: /* @__PURE__ */ jsx94(IconLock2, { size: 16, stroke: 1.5, role: "img", "aria-label": "Private", className: "shrink-0 text-text-secondary" }) }),
|
|
6962
6970
|
typeof title === "string" ? /* @__PURE__ */ jsx94("span", { className: "truncate text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx94("div", { className: "flex min-w-0 items-center", children: title }),
|
|
6963
6971
|
after != null && /* @__PURE__ */ jsx94("span", { className: "flex shrink-0 items-center", children: after })
|
|
6964
6972
|
] });
|
|
6965
|
-
const right = quiet || actions != null ? /* @__PURE__ */
|
|
6973
|
+
const right = quiet || actions != null ? /* @__PURE__ */ jsxs71(Fragment29, { children: [
|
|
6966
6974
|
quiet && // The quiet group: 12px between its parts, and 12px clear of the buttons — the bar sets
|
|
6967
6975
|
// its actions 4px apart, so the group adds the other 8px, as Peek's and Leaf's bars do.
|
|
6968
|
-
/* @__PURE__ */
|
|
6969
|
-
words.length > 0 && /* @__PURE__ */ jsx94("div", { className: "flex items-center gap-2", children: words.map((one, i) => /* @__PURE__ */
|
|
6976
|
+
/* @__PURE__ */ jsxs71("div", { className: cn("flex items-center gap-3", actions != null && "pr-2"), children: [
|
|
6977
|
+
words.length > 0 && /* @__PURE__ */ jsx94("div", { className: "flex items-center gap-2", children: words.map((one, i) => /* @__PURE__ */ jsxs71(Fragment28, { children: [
|
|
6970
6978
|
i > 0 && // eslint-disable-next-line token-spacing/no-restricted-classes -- @estiva-escape: Peek's dot between its counts, 3px measured on 31 October; the scale steps from 2px to 4px
|
|
6971
6979
|
/* @__PURE__ */ jsx94("span", { "aria-hidden": "true", className: "size-[3px] shrink-0 rounded-full bg-text-muted" }),
|
|
6972
6980
|
/* @__PURE__ */ jsx94(MetaText, { tone: one.done ? "success" : "secondary", children: one.label })
|
|
@@ -6980,9 +6988,9 @@ function PageHeader({ title, leading, private: locked = false, after, meta, time
|
|
|
6980
6988
|
}
|
|
6981
6989
|
|
|
6982
6990
|
// src/ListColumn.tsx
|
|
6983
|
-
import { jsx as jsx95, jsxs as
|
|
6991
|
+
import { jsx as jsx95, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
6984
6992
|
function Column({ title, chevron = false, titleMenu, actions, above, collapsed = false, children, className, broken = false }) {
|
|
6985
|
-
return /* @__PURE__ */
|
|
6993
|
+
return /* @__PURE__ */ jsxs72(
|
|
6986
6994
|
"div",
|
|
6987
6995
|
{
|
|
6988
6996
|
className: cn(
|
|
@@ -7021,7 +7029,7 @@ function ListColumn(props) {
|
|
|
7021
7029
|
|
|
7022
7030
|
// src/Tabs.tsx
|
|
7023
7031
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
7024
|
-
import { Fragment as Fragment30, jsx as jsx96, jsxs as
|
|
7032
|
+
import { Fragment as Fragment30, jsx as jsx96, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
7025
7033
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
7026
7034
|
return /* @__PURE__ */ jsx96(
|
|
7027
7035
|
BaseTabs.Root,
|
|
@@ -7038,7 +7046,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7038
7046
|
"aria-label": aria["aria-label"],
|
|
7039
7047
|
"aria-labelledby": aria["aria-labelledby"],
|
|
7040
7048
|
className: "flex items-center gap-2",
|
|
7041
|
-
children: tabs.map((tab) => /* @__PURE__ */
|
|
7049
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs73(
|
|
7042
7050
|
BaseTabs.Tab,
|
|
7043
7051
|
{
|
|
7044
7052
|
value: tab.id,
|
|
@@ -7051,11 +7059,11 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7051
7059
|
),
|
|
7052
7060
|
children: [
|
|
7053
7061
|
tab.icon,
|
|
7054
|
-
/* @__PURE__ */
|
|
7062
|
+
/* @__PURE__ */ jsxs73("span", { className: "flex items-baseline", children: [
|
|
7055
7063
|
tab.label,
|
|
7056
7064
|
tab.count !== void 0 ? /* @__PURE__ */ jsx96("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
7057
7065
|
] }),
|
|
7058
|
-
tab.unread ? /* @__PURE__ */
|
|
7066
|
+
tab.unread ? /* @__PURE__ */ jsxs73(Fragment30, { children: [
|
|
7059
7067
|
/* @__PURE__ */ jsx96(UnreadDot, { className: "h-auto w-auto" }),
|
|
7060
7068
|
/* @__PURE__ */ jsx96("span", { className: "sr-only", children: "new" })
|
|
7061
7069
|
] }) : null
|
|
@@ -7073,7 +7081,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7073
7081
|
import { createContext as createContext13, useContext as useContext16, useMemo as useMemo7 } from "react";
|
|
7074
7082
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
7075
7083
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck5, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
7076
|
-
import { jsx as jsx97, jsxs as
|
|
7084
|
+
import { jsx as jsx97, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
7077
7085
|
var SURFACE_STYLES = {
|
|
7078
7086
|
success: "bg-success-muted signal:bg-bg-inset signal:border signal:border-border-default signal:shadow-md leaf:bg-bg-inset leaf:border leaf:border-border-default leaf:shadow-md",
|
|
7079
7087
|
brand: "bg-accent-muted signal:bg-bg-inset signal:border signal:border-border-default signal:shadow-md leaf:bg-bg-inset leaf:border leaf:border-border-default leaf:shadow-md",
|
|
@@ -7113,8 +7121,8 @@ function LeadingIcon({ type }) {
|
|
|
7113
7121
|
}
|
|
7114
7122
|
function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, className }) {
|
|
7115
7123
|
const hasAction = !!(actionLabel && onAction);
|
|
7116
|
-
return /* @__PURE__ */
|
|
7117
|
-
/* @__PURE__ */
|
|
7124
|
+
return /* @__PURE__ */ jsxs74("div", { className: pillClassName(type, hasAction, className), children: [
|
|
7125
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
7118
7126
|
leadingIcon && /* @__PURE__ */ jsx97(LeadingIcon, { type }),
|
|
7119
7127
|
/* @__PURE__ */ jsx97("span", { className: LABEL_CLASSES, children: label })
|
|
7120
7128
|
] }),
|
|
@@ -7140,7 +7148,7 @@ function ToastProvider({ children }) {
|
|
|
7140
7148
|
}),
|
|
7141
7149
|
[manager]
|
|
7142
7150
|
);
|
|
7143
|
-
return /* @__PURE__ */ jsx97(ToastContext.Provider, { value, children: /* @__PURE__ */
|
|
7151
|
+
return /* @__PURE__ */ jsx97(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs74(BaseToast.Provider, { toastManager: manager, limit: VISIBLE_TOASTS, children: [
|
|
7144
7152
|
children,
|
|
7145
7153
|
/* @__PURE__ */ jsx97(BaseToast.Portal, { children: /* @__PURE__ */ jsx97(BaseToast.Viewport, { className: "fixed bottom-4 left-4 z-[100] flex flex-col-reverse items-start gap-2 pointer-events-none", children: /* @__PURE__ */ jsx97(ToastList, {}) }) })
|
|
7146
7154
|
] }) });
|
|
@@ -7150,14 +7158,14 @@ function ToastList() {
|
|
|
7150
7158
|
return toasts.map((toast) => {
|
|
7151
7159
|
const type = toast.type ?? "neutral";
|
|
7152
7160
|
const { leadingIcon = true, actionLabel, onAction } = toast.data ?? {};
|
|
7153
|
-
return /* @__PURE__ */
|
|
7161
|
+
return /* @__PURE__ */ jsxs74(
|
|
7154
7162
|
BaseToast.Root,
|
|
7155
7163
|
{
|
|
7156
7164
|
toast,
|
|
7157
7165
|
swipeDirection: ["left", "down"],
|
|
7158
7166
|
className: pillClassName(type, !!actionLabel, "pointer-events-auto data-[limited]:hidden"),
|
|
7159
7167
|
children: [
|
|
7160
|
-
/* @__PURE__ */
|
|
7168
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
7161
7169
|
leadingIcon && /* @__PURE__ */ jsx97(LeadingIcon, { type }),
|
|
7162
7170
|
/* @__PURE__ */ jsx97(BaseToast.Title, { render: /* @__PURE__ */ jsx97("span", {}), className: LABEL_CLASSES })
|
|
7163
7171
|
] }),
|