@crewlethq/ui 0.160.0 → 0.161.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/ArtifactCard/index.js +2 -2
- package/dist/AttachmentChip/index.js +2 -2
- package/dist/AttentionList/index.js +1 -1
- package/dist/{AttentionList-CUPNJX6B.css → AttentionList-F5Q4DS5K.css} +7 -1
- package/dist/BriefCard/index.js +3 -3
- package/dist/ChangeList/index.js +2 -2
- package/dist/ChipField/index.js +2 -2
- package/dist/ContrastBadge/index.js +2 -2
- package/dist/ContrastHelp/index.js +3 -3
- package/dist/DatasetSource/index.js +2 -2
- package/dist/DeepWorkCard/index.js +4 -4
- package/dist/EntityList/index.js +3 -3
- package/dist/InboxList/InboxList.d.ts +23 -7
- package/dist/InboxList/index.js +1 -1
- package/dist/{InboxList-XOUPZUCK.css → InboxList-NQABW65H.css} +95 -9
- package/dist/LinkCard/LinkCard.d.ts +13 -5
- package/dist/LinkCard/index.js +1 -1
- package/dist/{LinkCard-5I4MYU6I.css → LinkCard-W4SVOHLD.css} +35 -8
- package/dist/LogoSlot/index.js +3 -3
- package/dist/OpenInAppCard/index.js +4 -4
- package/dist/PricingCard/index.js +2 -2
- package/dist/ProposalCard/ProposalCard.d.ts +26 -5
- package/dist/ProposalCard/index.js +4 -4
- package/dist/RefusalCard/index.js +3 -3
- package/dist/ResultTableCard/index.js +3 -3
- package/dist/ReviewList/index.js +2 -2
- package/dist/RichEditor/index.js +2 -2
- package/dist/RunChip/index.js +2 -2
- package/dist/SetupWizard/index.js +2 -2
- package/dist/SheetGrid/index.js +2 -2
- package/dist/StatusCard/index.js +2 -2
- package/dist/{StepList-OAJ45IBX.css → StepList-MQVJ3DZF.css} +14 -0
- package/dist/Stepper/StepList.d.ts +20 -5
- package/dist/Stepper/index.js +1 -1
- package/dist/TableCells/index.js +2 -2
- package/dist/Tag/index.js +1 -1
- package/dist/{Tag-SNAX7OQH.css → Tag-H2EA4ZCW.css} +12 -1
- package/dist/TagsInput/index.js +2 -2
- package/dist/ThemeGallery/index.js +2 -2
- package/dist/ThreadSummary/index.js +2 -2
- package/dist/{chunk-3ZW42I4H.js → chunk-2JDLC5A4.js} +1 -1
- package/dist/{chunk-GBNQJGV4.js → chunk-2LVAA4JM.js} +1 -1
- package/dist/{chunk-EHD4CEHK.js → chunk-2MN3RNRM.js} +2 -1
- package/dist/{chunk-UVVPYLZX.js → chunk-3GIGAGEG.js} +1 -1
- package/dist/{chunk-2EG6YZJC.js → chunk-3ZBYTHLJ.js} +1 -1
- package/dist/{chunk-EKRW7F45.js → chunk-4BBS3XU2.js} +1 -1
- package/dist/{chunk-MA7EOX4J.js → chunk-ALJGUP4X.js} +1 -1
- package/dist/{chunk-GY3XZ5FW.js → chunk-DSKPTCYM.js} +1 -1
- package/dist/{chunk-L6SYLG3F.js → chunk-EH2DDHHP.js} +1 -1
- package/dist/{chunk-2DZV4PHK.js → chunk-EZIMNB6H.js} +1 -1
- package/dist/{chunk-VIGFEWSQ.js → chunk-GI4THYUT.js} +2 -2
- package/dist/{chunk-M4CXGMYO.js → chunk-GXX6B5XM.js} +1 -1
- package/dist/{chunk-DZIID2CS.js → chunk-HM3HM3OF.js} +1 -1
- package/dist/{chunk-5O4KQYCS.js → chunk-HOIZJFYS.js} +1 -1
- package/dist/{chunk-35Q3WVLB.js → chunk-ITFAH735.js} +2 -2
- package/dist/{chunk-FSVTNCAU.js → chunk-JSYAITYQ.js} +1 -1
- package/dist/{chunk-HOCXIVKC.js → chunk-KP7DRFIR.js} +1 -1
- package/dist/{chunk-TFRTT2L5.js → chunk-MCYS3HLW.js} +1 -1
- package/dist/{chunk-ZUXJG3JN.js → chunk-MKKUM4AR.js} +1 -1
- package/dist/{chunk-JBUJMWWE.js → chunk-OVWDE63E.js} +25 -9
- package/dist/{chunk-7DYHWFU2.js → chunk-PJMDWQC2.js} +1 -1
- package/dist/{chunk-UMEK5DHS.js → chunk-PUPOP3XN.js} +129 -18
- package/dist/{chunk-VBRIKJLO.js → chunk-QNWWXSDW.js} +1 -1
- package/dist/{chunk-PVMDBNZ5.js → chunk-RSZE4FED.js} +41 -32
- package/dist/{chunk-OZNL3WOR.js → chunk-T6HFLCXB.js} +1 -1
- package/dist/{chunk-SPJUVFOI.js → chunk-TLMAPIWU.js} +1 -1
- package/dist/{chunk-FQQEC3AB.js → chunk-W3PSFOH2.js} +1 -1
- package/dist/{chunk-R43WH27Z.js → chunk-XDFFMIHY.js} +1 -1
- package/dist/{chunk-CLOWVDGV.js → chunk-YL3G6LPS.js} +1 -1
- package/dist/{chunk-YSGFG6OG.js → chunk-Z226JFUB.js} +1 -1
- package/dist/generated/index.js +47 -47
- package/dist/index.js +47 -47
- package/dist/styles.css +168 -24
- package/package.json +3 -3
- package/dist/{Editor-RDC4N2UZ.js → Editor-CL2RZDZG.js} +1 -1
- package/dist/{chunk-RMPHADLT.js → chunk-L5UJPASY.js} +1 -1
|
@@ -5,20 +5,53 @@ import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
|
|
|
5
5
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
7
|
import './ChatScale-LGESYXCO.css';
|
|
8
|
-
import './InboxList-
|
|
9
|
-
import { createContext,
|
|
8
|
+
import './InboxList-NQABW65H.css';
|
|
9
|
+
import { createContext, useRef, useCallback, useLayoutEffect, useEffect, useContext, useId, useState, cloneElement, Children, isValidElement } from 'react';
|
|
10
10
|
import { ChevronDownGlyph } from '@crewlethq/icons/glyphs';
|
|
11
11
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
var InboxDensity = createContext("default");
|
|
14
|
-
var
|
|
14
|
+
var ROWS = ".crewlet-inbox-row:not(.crewlet-inbox-row--leaving)";
|
|
15
|
+
var CONTROL = ":scope > .crewlet-inbox-row__body > .crewlet-inbox-row__control";
|
|
16
|
+
var ASIDE_CONTROLS = ":scope > .crewlet-inbox-row__body > .crewlet-inbox-row__aside :is(a[href], button, input, select, textarea, [tabindex])";
|
|
17
|
+
var PARKED = "data-crewlet-inbox-tabindex";
|
|
18
|
+
function reachableRows(list) {
|
|
19
|
+
return [...list.querySelectorAll(ROWS)].filter((row) => !row.closest("[hidden]"));
|
|
20
|
+
}
|
|
21
|
+
function controlOf(row) {
|
|
22
|
+
return row.querySelector(CONTROL);
|
|
23
|
+
}
|
|
24
|
+
function park(control) {
|
|
25
|
+
if (!control.hasAttribute(PARKED)) control.setAttribute(PARKED, control.getAttribute("tabindex") ?? "");
|
|
26
|
+
if (control.getAttribute("tabindex") !== "-1") control.tabIndex = -1;
|
|
27
|
+
}
|
|
28
|
+
function unpark(control) {
|
|
29
|
+
const given = control.getAttribute(PARKED);
|
|
30
|
+
if (given === null) return;
|
|
31
|
+
control.removeAttribute(PARKED);
|
|
32
|
+
if (given === "") control.removeAttribute("tabindex");
|
|
33
|
+
else control.setAttribute("tabindex", given);
|
|
34
|
+
}
|
|
35
|
+
function rove(list, held) {
|
|
36
|
+
const rows = reachableRows(list);
|
|
37
|
+
const stop = (held !== null && rows.includes(held) ? held : void 0) ?? rows.find((row) => controlOf(row)?.getAttribute("aria-current") === "true") ?? rows[0];
|
|
38
|
+
for (const row of rows) {
|
|
39
|
+
const control = controlOf(row);
|
|
40
|
+
if (!control) continue;
|
|
41
|
+
const next = row === stop ? "0" : "-1";
|
|
42
|
+
if (control.getAttribute("tabindex") !== next) control.setAttribute("tabindex", next);
|
|
43
|
+
for (const each of row.querySelectorAll(ASIDE_CONTROLS)) {
|
|
44
|
+
if (row === stop) unpark(each);
|
|
45
|
+
else park(each);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
15
49
|
function walkRows(event) {
|
|
16
50
|
if (event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
|
|
17
51
|
const target = event.target;
|
|
18
52
|
if (!(target instanceof HTMLElement) || !target.matches(".crewlet-inbox-row__control")) return;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
53
|
+
if (!event.currentTarget.contains(target)) return;
|
|
54
|
+
const rows = reachableRows(event.currentTarget).map(controlOf).filter((control) => control !== null);
|
|
22
55
|
const at = rows.indexOf(target);
|
|
23
56
|
if (at < 0) return;
|
|
24
57
|
const next = event.key === "ArrowDown" ? rows[at + 1] : event.key === "ArrowUp" ? rows[at - 1] : event.key === "Home" ? rows[0] : event.key === "End" ? rows[rows.length - 1] : void 0;
|
|
@@ -26,7 +59,25 @@ function walkRows(event) {
|
|
|
26
59
|
event.preventDefault();
|
|
27
60
|
next?.focus();
|
|
28
61
|
}
|
|
29
|
-
function InboxList({ label, density = "default", className, children, onKeyDown, ...rest }) {
|
|
62
|
+
function InboxList({ label, density = "default", className, children, onKeyDown, onFocus, ...rest }) {
|
|
63
|
+
const root = useRef(null);
|
|
64
|
+
const held = useRef(null);
|
|
65
|
+
const sync = useCallback(() => {
|
|
66
|
+
if (root.current) rove(root.current, held.current);
|
|
67
|
+
}, []);
|
|
68
|
+
useLayoutEffect(sync);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
const list = root.current;
|
|
71
|
+
if (!list || typeof MutationObserver === "undefined") return;
|
|
72
|
+
const observer = new MutationObserver(sync);
|
|
73
|
+
observer.observe(list, {
|
|
74
|
+
childList: true,
|
|
75
|
+
subtree: true,
|
|
76
|
+
attributes: true,
|
|
77
|
+
attributeFilter: ["aria-current", "hidden", "class"]
|
|
78
|
+
});
|
|
79
|
+
return () => observer.disconnect();
|
|
80
|
+
}, [sync]);
|
|
30
81
|
return (
|
|
31
82
|
// The keys are heard from the rows' own buttons as they bubble: the list
|
|
32
83
|
// takes no focus and no press of its own.
|
|
@@ -35,8 +86,17 @@ function InboxList({ label, density = "default", className, children, onKeyDown,
|
|
|
35
86
|
"nav",
|
|
36
87
|
{
|
|
37
88
|
...rest,
|
|
89
|
+
ref: root,
|
|
38
90
|
"aria-label": label,
|
|
39
91
|
className: cx("crewlet-inbox-list", density === "chat" && "crewlet-inbox-list--chat", className),
|
|
92
|
+
onFocus: (event) => {
|
|
93
|
+
onFocus?.(event);
|
|
94
|
+
const row = event.target instanceof Element ? event.target.closest(".crewlet-inbox-row") : null;
|
|
95
|
+
if (row && root.current?.contains(row)) {
|
|
96
|
+
held.current = row;
|
|
97
|
+
sync();
|
|
98
|
+
}
|
|
99
|
+
},
|
|
40
100
|
onKeyDown: (event) => {
|
|
41
101
|
onKeyDown?.(event);
|
|
42
102
|
walkRows(event);
|
|
@@ -216,6 +276,17 @@ function InboxGroup({
|
|
|
216
276
|
);
|
|
217
277
|
}
|
|
218
278
|
var toldOutsideList = false;
|
|
279
|
+
function neighbourOf(row) {
|
|
280
|
+
if (!row) return null;
|
|
281
|
+
const scope = row.closest(".crewlet-inbox-list") ?? row.parentElement;
|
|
282
|
+
if (!scope) return null;
|
|
283
|
+
const all = [...scope.querySelectorAll(".crewlet-inbox-row")].filter(
|
|
284
|
+
(each) => each === row || !each.classList.contains("crewlet-inbox-row--leaving") && !each.closest("[hidden]")
|
|
285
|
+
);
|
|
286
|
+
const at = all.indexOf(row);
|
|
287
|
+
const next = all[at + 1] ?? all[at - 1];
|
|
288
|
+
return next ? controlOf(next) : null;
|
|
289
|
+
}
|
|
219
290
|
function InboxRow({
|
|
220
291
|
title,
|
|
221
292
|
qualifier,
|
|
@@ -249,6 +320,7 @@ function InboxRow({
|
|
|
249
320
|
...rest
|
|
250
321
|
}) {
|
|
251
322
|
const self = useRef(null);
|
|
323
|
+
const tray = useRef(null);
|
|
252
324
|
const presence = usePresence(!leaving, self, INBOX_ROW_LEAVE);
|
|
253
325
|
useEffect(() => {
|
|
254
326
|
if (toldOutsideList || !developing()) return;
|
|
@@ -261,7 +333,7 @@ function InboxRow({
|
|
|
261
333
|
}, []);
|
|
262
334
|
const gone = !presence.present;
|
|
263
335
|
useLayoutEffect(() => {
|
|
264
|
-
if (presence.leaving) releaseFocus(self.current);
|
|
336
|
+
if (presence.leaving) releaseFocus(self.current, neighbourOf(self.current));
|
|
265
337
|
}, [presence.leaving]);
|
|
266
338
|
const told = useRef(false);
|
|
267
339
|
useEffect(() => {
|
|
@@ -275,14 +347,25 @@ function InboxRow({
|
|
|
275
347
|
}, [gone, onLeft]);
|
|
276
348
|
const ids = useId();
|
|
277
349
|
const part = (name) => `${ids}-${name}`;
|
|
350
|
+
const hasLeading = leading !== void 0;
|
|
278
351
|
const hasQualifier = qualifier !== void 0;
|
|
279
352
|
const hasStatus = status !== void 0 && status !== null;
|
|
280
353
|
const hasMeta = meta !== void 0;
|
|
281
354
|
const hasOutcome = outcome !== void 0 && outcome !== null;
|
|
282
355
|
const hasContext = context !== void 0 && context !== null;
|
|
283
356
|
const hasActions = actions !== void 0 && actions !== null && actions !== false;
|
|
357
|
+
useLayoutEffect(() => {
|
|
358
|
+
const row = self.current;
|
|
359
|
+
const box = tray.current;
|
|
360
|
+
if (!hasActions || !row || !box) return;
|
|
361
|
+
const measure = () => row.style.setProperty("--crewlet-inbox-row-tray", `${box.offsetWidth}px`);
|
|
362
|
+
measure();
|
|
363
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
364
|
+
const observer = new ResizeObserver(measure);
|
|
365
|
+
observer.observe(box);
|
|
366
|
+
return () => observer.disconnect();
|
|
367
|
+
}, [hasActions, gone]);
|
|
284
368
|
const labelledBy = [
|
|
285
|
-
leading === void 0 ? null : part("leading"),
|
|
286
369
|
part("title"),
|
|
287
370
|
hasQualifier ? part("qualifier") : null,
|
|
288
371
|
hasStatus || hasMeta ? part("end") : null,
|
|
@@ -299,14 +382,17 @@ function InboxRow({
|
|
|
299
382
|
hasMeta ? /* @__PURE__ */ jsx("span", { className: "crewlet-inbox-row__meta", children: meta }) : null
|
|
300
383
|
] });
|
|
301
384
|
const contents = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
385
|
+
hasLeading ? (
|
|
386
|
+
// THE LEADING SLOT'S PLACE: a copy nobody sees or reads, so the words
|
|
387
|
+
// lay out beside the mark exactly as before, while the mark itself is
|
|
388
|
+
// drawn over it from outside the control.
|
|
389
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "crewlet-inbox-row__leading crewlet-inbox-row__leading--place", children: leading })
|
|
390
|
+
) : null,
|
|
306
391
|
/* @__PURE__ */ jsxs("span", { className: "crewlet-inbox-row__main", children: [
|
|
307
392
|
/* @__PURE__ */ jsx("span", { className: "crewlet-inbox-row__head", children: /* @__PURE__ */ jsxs("span", { className: "crewlet-inbox-row__head-text", children: [
|
|
308
|
-
hasStatus || hasMeta ? (
|
|
309
|
-
// THE FLOAT'S PLACE, held by a copy nobody reads or sees
|
|
393
|
+
hasStatus || hasMeta || hasActions ? (
|
|
394
|
+
// THE FLOAT'S PLACE, held by a copy nobody reads or sees, with
|
|
395
|
+
// the room a row's quick actions take kept at its end.
|
|
310
396
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "crewlet-inbox-row__head-end crewlet-inbox-row__head-end--place", children: headEnd })
|
|
311
397
|
) : null,
|
|
312
398
|
/* @__PURE__ */ jsx("span", { id: part("title"), className: "crewlet-inbox-row__title", children: title }),
|
|
@@ -371,13 +457,36 @@ function InboxRow({
|
|
|
371
457
|
] });
|
|
372
458
|
const controlClass = cx(
|
|
373
459
|
"crewlet-inbox-row__control",
|
|
374
|
-
|
|
460
|
+
hasLeading && "crewlet-inbox-row__control--leading",
|
|
375
461
|
unread && "crewlet-inbox-row__control--unread",
|
|
376
462
|
actionable && "crewlet-inbox-row__control--actionable",
|
|
377
463
|
done && "crewlet-inbox-row__control--done"
|
|
378
464
|
);
|
|
379
465
|
const current = selected ? "true" : void 0;
|
|
380
|
-
const
|
|
466
|
+
const describedBy = hasLeading ? part("leading") : void 0;
|
|
467
|
+
const control = href !== void 0 ? /* @__PURE__ */ jsx(
|
|
468
|
+
"a",
|
|
469
|
+
{
|
|
470
|
+
className: controlClass,
|
|
471
|
+
href,
|
|
472
|
+
"aria-current": current,
|
|
473
|
+
"aria-labelledby": labelledBy,
|
|
474
|
+
"aria-describedby": describedBy,
|
|
475
|
+
onClick,
|
|
476
|
+
children: contents
|
|
477
|
+
}
|
|
478
|
+
) : /* @__PURE__ */ jsx(
|
|
479
|
+
"button",
|
|
480
|
+
{
|
|
481
|
+
type: "button",
|
|
482
|
+
className: controlClass,
|
|
483
|
+
"aria-current": current,
|
|
484
|
+
"aria-labelledby": labelledBy,
|
|
485
|
+
"aria-describedby": describedBy,
|
|
486
|
+
onClick,
|
|
487
|
+
children: contents
|
|
488
|
+
}
|
|
489
|
+
);
|
|
381
490
|
if (gone) return null;
|
|
382
491
|
return /* @__PURE__ */ jsxs(
|
|
383
492
|
"li",
|
|
@@ -388,6 +497,7 @@ function InboxRow({
|
|
|
388
497
|
className: cx(
|
|
389
498
|
"crewlet-inbox-row",
|
|
390
499
|
selected && "crewlet-inbox-row--selected",
|
|
500
|
+
hasLeading && "crewlet-inbox-row--leading",
|
|
391
501
|
hasActions && "crewlet-inbox-row--actions",
|
|
392
502
|
arrived && "crewlet-inbox-row--arrived",
|
|
393
503
|
presence.leaving && "crewlet-inbox-row--leaving",
|
|
@@ -398,7 +508,8 @@ function InboxRow({
|
|
|
398
508
|
control,
|
|
399
509
|
aside === void 0 || aside === null || aside === false ? null : /* @__PURE__ */ jsx("div", { className: "crewlet-inbox-row__aside", children: aside })
|
|
400
510
|
] }),
|
|
401
|
-
|
|
511
|
+
hasLeading ? /* @__PURE__ */ jsx("span", { id: part("leading"), className: "crewlet-inbox-row__leading crewlet-inbox-row__leading--drawn", children: leading }) : null,
|
|
512
|
+
hasActions ? /* @__PURE__ */ jsx("div", { ref: tray, className: "crewlet-inbox-row__actions", children: actions }) : null
|
|
402
513
|
]
|
|
403
514
|
}
|
|
404
515
|
);
|
|
@@ -4,7 +4,7 @@ import { Button } from './chunk-34K3XN47.js';
|
|
|
4
4
|
import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
|
-
import './AttentionList-
|
|
7
|
+
import './AttentionList-F5Q4DS5K.css';
|
|
8
8
|
import { useId, useState } from 'react';
|
|
9
9
|
import { BellGlyph, ChevronDownGlyph, CircleAlertGlyph, TriangleAlertGlyph, InfoGlyph } from '@crewlethq/icons/glyphs';
|
|
10
10
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -3,9 +3,9 @@ import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './ChatScale-LGESYXCO.css';
|
|
5
5
|
import './VisuallyHidden-OUYVMKEH.css';
|
|
6
|
-
import './LinkCard-
|
|
6
|
+
import './LinkCard-W4SVOHLD.css';
|
|
7
7
|
import { useId } from 'react';
|
|
8
|
-
import { jsxs,
|
|
8
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
function LinkCard({
|
|
11
11
|
href,
|
|
@@ -20,28 +20,27 @@ function LinkCard({
|
|
|
20
20
|
statusTone = "neutral",
|
|
21
21
|
owner,
|
|
22
22
|
className,
|
|
23
|
+
style,
|
|
23
24
|
...rest
|
|
24
25
|
}) {
|
|
25
26
|
const id = useId();
|
|
26
27
|
const safe = href === void 0 ? null : safeHref(href);
|
|
27
28
|
const ids = {
|
|
28
|
-
title: `${id}-title`,
|
|
29
|
-
tab: `${id}-tab`,
|
|
30
29
|
source: `${id}-source`,
|
|
31
30
|
meta: `${id}-meta`,
|
|
32
31
|
status: `${id}-status`,
|
|
33
32
|
owner: `${id}-owner`
|
|
34
33
|
};
|
|
35
|
-
const
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
const words = /* @__PURE__ */ jsxs("span", { className: "crewlet-link-card__title", children: [
|
|
35
|
+
code ? /* @__PURE__ */ jsx("span", { className: "crewlet-link-card__code", children: code }) : null,
|
|
36
|
+
code ? " " : null,
|
|
37
|
+
title
|
|
38
|
+
] });
|
|
39
|
+
const sourceLine = /* @__PURE__ */ jsxs("span", { id: ids.source, className: "crewlet-link-card__source", children: [
|
|
40
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-link-card__mark", "aria-hidden": "true", children: source.mark }),
|
|
41
|
+
source.name
|
|
42
|
+
] });
|
|
43
|
+
const details = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45
44
|
meta ? /* @__PURE__ */ jsx("span", { id: ids.meta, className: "crewlet-link-card__meta", children: meta }) : null,
|
|
46
45
|
status || owner ? /* @__PURE__ */ jsxs("span", { className: "crewlet-link-card__fields", children: [
|
|
47
46
|
status ? /* @__PURE__ */ jsxs("span", { id: ids.status, className: "crewlet-link-card__status", children: [
|
|
@@ -54,27 +53,37 @@ function LinkCard({
|
|
|
54
53
|
] }) : null
|
|
55
54
|
] }) : null
|
|
56
55
|
] });
|
|
57
|
-
const classes = cx("crewlet-link-card", `crewlet-link-card--${statusTone}`, className);
|
|
56
|
+
const classes = cx("crewlet-link-card", `crewlet-link-card--${statusTone}`, safe === null && "crewlet-link-card--inert", className);
|
|
58
57
|
if (safe === null) {
|
|
59
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ jsxs("div", { className: classes, style, title: address, children: [
|
|
59
|
+
sourceLine,
|
|
60
|
+
words,
|
|
61
|
+
details
|
|
62
|
+
] });
|
|
60
63
|
}
|
|
61
64
|
const describedBy = [ids.source, meta ? ids.meta : null, status ? ids.status : null, owner ? ids.owner : null].filter(Boolean).join(" ");
|
|
62
|
-
return /* @__PURE__ */ jsxs(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
65
|
+
return /* @__PURE__ */ jsxs("div", { className: classes, style, children: [
|
|
66
|
+
sourceLine,
|
|
67
|
+
/* @__PURE__ */ jsxs(
|
|
68
|
+
"a",
|
|
69
|
+
{
|
|
70
|
+
...rest,
|
|
71
|
+
href: safe,
|
|
72
|
+
title: address,
|
|
73
|
+
className: "crewlet-link-card__link",
|
|
74
|
+
"aria-describedby": describedBy,
|
|
75
|
+
...external ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
76
|
+
children: [
|
|
77
|
+
words,
|
|
78
|
+
external ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
+
" ",
|
|
80
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: newTabLabel })
|
|
81
|
+
] }) : null
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
details
|
|
86
|
+
] });
|
|
78
87
|
}
|
|
79
88
|
|
|
80
89
|
export { LinkCard };
|
|
@@ -9,7 +9,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
9
9
|
var engine = null;
|
|
10
10
|
var loading = null;
|
|
11
11
|
function loadEngine() {
|
|
12
|
-
loading ??= import('./Editor-
|
|
12
|
+
loading ??= import('./Editor-CL2RZDZG.js').then(
|
|
13
13
|
(module) => {
|
|
14
14
|
engine = module.Editor;
|
|
15
15
|
return engine;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconTile } from './chunk-VRVNLJUA.js';
|
|
2
|
-
import { Tag } from './chunk-
|
|
2
|
+
import { Tag } from './chunk-HOIZJFYS.js';
|
|
3
3
|
import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './ReviewList-2IZA67EX.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Link } from './chunk-UTKI2SAM.js';
|
|
2
|
-
import { Tag } from './chunk-
|
|
2
|
+
import { Tag } from './chunk-HOIZJFYS.js';
|
|
3
3
|
import { RelativeTime } from './chunk-GBKBME7Q.js';
|
|
4
4
|
import { EmptyValue } from './chunk-WGLOH33S.js';
|
|
5
5
|
import { Text } from './chunk-475DOAWF.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemeSwatch } from './chunk-3XQUEF5C.js';
|
|
2
2
|
import { useHighlightRest } from './chunk-KW7T23RT.js';
|
|
3
|
-
import { Tag } from './chunk-
|
|
3
|
+
import { Tag } from './chunk-HOIZJFYS.js';
|
|
4
4
|
import { useRoving, tabStop } from './chunk-7F3OPUM5.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './ThemeGallery-UEFZRT6W.css';
|