@crewlethq/ui 0.48.3 → 0.49.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 +56 -0
- package/dist/AgentHandoffPanel/index.js +3 -3
- package/dist/ArrangeList/index.js +2 -2
- package/dist/ArtifactBar/index.js +4 -4
- package/dist/{ArtifactBar-6PGWGKN2.css → ArtifactBar-UMZCTARR.css} +9 -0
- package/dist/ArtifactCard/ArtifactCard.d.ts +30 -1
- package/dist/ArtifactCard/index.js +10 -3
- package/dist/{ArtifactCard-OGTMO2KI.css → ArtifactCard-SOB63NV5.css} +72 -1
- package/dist/ArtifactCover/index.js +2 -2
- package/dist/ArtifactIcon/index.js +2 -2
- package/dist/ArtifactKindGlyph/ArtifactKindGlyph.d.ts +7 -3
- package/dist/ArtifactKindGlyph/index.js +1 -1
- package/dist/ArtifactKindIllustration/ArtifactKindIllustration.d.ts +4 -3
- package/dist/ArtifactKindIllustration/index.js +1 -1
- package/dist/{ArtifactKinds-CVD3FCYO.css → ArtifactKinds-O3CALPVX.css} +1 -0
- package/dist/ArtifactMakeRow/index.js +2 -2
- package/dist/ArtifactNameCell/ArtifactNameCell.d.ts +14 -1
- package/dist/ArtifactNameCell/index.d.ts +1 -1
- package/dist/ArtifactNameCell/index.js +2 -2
- package/dist/{ArtifactNameCell-RTVP4LO4.css → ArtifactNameCell-3AHLUSE5.css} +12 -0
- package/dist/BrandChip/BrandChip.d.ts +26 -0
- package/dist/BrandChip/index.d.ts +3 -0
- package/dist/BrandChip/index.js +2 -0
- package/dist/BrandChip-SQWBC2WU.css +81 -0
- package/dist/BrandSample/BrandSample.d.ts +75 -0
- package/dist/BrandSample/index.d.ts +3 -0
- package/dist/BrandSample/index.js +5 -0
- package/dist/BrandSample-G5V7GKR2.css +185 -0
- package/dist/BrandScope/BrandScope.d.ts +61 -0
- package/dist/BrandScope/index.d.ts +4 -0
- package/dist/BrandScope/index.js +4 -0
- package/dist/BrandScope-H2KZHGT7.css +29 -0
- package/dist/Checkbox/Checkbox.d.ts +8 -0
- package/dist/Checkbox/index.js +1 -1
- package/dist/{Checkbox-ALWG3WV2.css → Checkbox-MB22OW6P.css} +18 -0
- package/dist/ColorField/ColorField.d.ts +63 -0
- package/dist/ColorField/index.d.ts +3 -0
- package/dist/ColorField/index.js +11 -0
- package/dist/ColorField-2OIOWT3Z.css +68 -0
- package/dist/ColorSwatch/ColorSwatch.d.ts +43 -0
- package/dist/ColorSwatch/index.d.ts +3 -0
- package/dist/ColorSwatch/index.js +9 -0
- package/dist/ColorSwatch-DNMUFHNS.css +83 -0
- package/dist/Combobox/Combobox.d.ts +45 -4
- package/dist/Combobox/index.d.ts +1 -1
- package/dist/Combobox/index.js +1 -1
- package/dist/Combobox-GBCWXWEB.css +163 -0
- package/dist/CommandPalette/index.js +3 -3
- package/dist/CommentThread/index.js +3 -3
- package/dist/Composer/index.js +2 -2
- package/dist/ContrastBadge/ContrastBadge.d.ts +63 -0
- package/dist/ContrastBadge/index.d.ts +3 -0
- package/dist/ContrastBadge/index.js +6 -0
- package/dist/ContrastBadge-CBZPGG3G.css +47 -0
- package/dist/DataGrid/DataGrid.d.ts +28 -1
- package/dist/DataGrid/index.js +8 -1
- package/dist/{DataGrid-AQKPJD7W.css → DataGrid-VNGQESJA.css} +15 -0
- package/dist/DataTable/index.js +3 -3
- package/dist/DataView/index.js +8 -8
- package/dist/DateTimePicker/index.js +2 -2
- package/dist/FolderTile/FolderTile.d.ts +91 -0
- package/dist/FolderTile/index.d.ts +3 -0
- package/dist/FolderTile/index.js +7 -0
- package/dist/FolderTile-FDT5Y63Z.css +231 -0
- package/dist/LinkInterstitial/index.js +2 -2
- package/dist/ListInput/index.js +2 -2
- package/dist/LogoSlot/LogoSlot.d.ts +84 -0
- package/dist/LogoSlot/index.d.ts +3 -0
- package/dist/LogoSlot/index.js +9 -0
- package/dist/LogoSlot-T2UFOJXU.css +159 -0
- package/dist/Modal/Modal.d.ts +13 -0
- package/dist/Modal/index.js +1 -1
- package/dist/{Modal-TOEWHDCQ.css → Modal-3HMP7WAZ.css} +30 -0
- package/dist/PresenterView/index.js +2 -2
- package/dist/PrincipalPicker/index.js +2 -2
- package/dist/SelectionBar/SelectionBar.d.ts +50 -0
- package/dist/SelectionBar/index.d.ts +3 -0
- package/dist/SelectionBar/index.js +9 -0
- package/dist/SelectionBar-XPWKUOSC.css +61 -0
- package/dist/ShareDialog/index.js +3 -3
- package/dist/SheetColumnEditor/index.js +3 -3
- package/dist/SheetGrid/index.js +2 -2
- package/dist/Switcher/index.js +2 -2
- package/dist/ThemeGallery/ThemeGallery.d.ts +13 -2
- package/dist/ThemeGallery/index.js +3 -1
- package/dist/{ThemeGallery-X35Y25EX.css → ThemeGallery-UEFZRT6W.css} +21 -0
- package/dist/TimeWindowPicker/index.js +2 -2
- package/dist/TypeSpecimen/TypeSpecimen.d.ts +49 -0
- package/dist/TypeSpecimen/index.d.ts +3 -0
- package/dist/TypeSpecimen/index.js +3 -0
- package/dist/TypeSpecimen-WK6YNHL7.css +96 -0
- package/dist/chunk-5SGHW42B.js +23 -0
- package/dist/{chunk-ILDNJHRU.js → chunk-AVL52EME.js} +1 -1
- package/dist/chunk-B235ANDO.js +66 -0
- package/dist/{chunk-2MYSESZF.js → chunk-FB5CFQTG.js} +82 -12
- package/dist/{chunk-DY4DQ7EB.js → chunk-GP4YWZFO.js} +1 -1
- package/dist/{chunk-LIJQT74Y.js → chunk-H55D66IK.js} +1 -1
- package/dist/{chunk-6EBGPCAW.js → chunk-H7NMJ5AI.js} +1 -1
- package/dist/chunk-ITI2Z44C.js +139 -0
- package/dist/{chunk-P5VGSVWG.js → chunk-J24Q4HTD.js} +17 -8
- package/dist/{chunk-5EBDOE3C.js → chunk-JFDIMO3A.js} +1 -1
- package/dist/chunk-JKAFEFFC.js +44 -0
- package/dist/{chunk-32TGEMQQ.js → chunk-KHZYAEGZ.js} +1 -1
- package/dist/chunk-M4QM477B.js +80 -0
- package/dist/{chunk-TWZEWXNW.js → chunk-MIEBOO7Y.js} +2 -2
- package/dist/{chunk-SMOFYZJ5.js → chunk-NAWUXCBC.js} +3 -3
- package/dist/{chunk-F57N6ZJG.js → chunk-NCHKKYPQ.js} +5 -2
- package/dist/chunk-OCRVY42T.js +50 -0
- package/dist/chunk-OEEYL2CM.js +73 -0
- package/dist/chunk-P3OIM6OC.js +38 -0
- package/dist/{chunk-FWBKMPNR.js → chunk-P3QWT5VR.js} +1 -1
- package/dist/chunk-P5JBDHWC.js +206 -0
- package/dist/{chunk-OKE5YSLD.js → chunk-Q44X36QC.js} +79 -35
- package/dist/{chunk-R2IBCEU6.js → chunk-R3BA3C4Y.js} +2 -2
- package/dist/{chunk-CE2THTQR.js → chunk-RSKW25Y5.js} +4 -3
- package/dist/{chunk-UBZDYOCA.js → chunk-RV6XB5UV.js} +12 -1
- package/dist/{chunk-E4BOVKNJ.js → chunk-UTESMBPL.js} +5 -3
- package/dist/chunk-UZMNR366.js +9 -0
- package/dist/{chunk-CWKWMIIJ.js → chunk-V7GOOXPK.js} +1 -1
- package/dist/{chunk-7JED2NYP.js → chunk-VBIM6HFC.js} +1 -1
- package/dist/{chunk-U4HOKU6P.js → chunk-VN47PYUF.js} +5 -5
- package/dist/{chunk-MUQJCH2Y.js → chunk-VTSJMDGP.js} +2 -2
- package/dist/chunk-W6FOEBIL.js +119 -0
- package/dist/chunk-WLSEAIVC.js +48 -0
- package/dist/{chunk-AS2BMY3E.js → chunk-WQ7S7CKZ.js} +2 -2
- package/dist/{chunk-6AKG2VLR.js → chunk-YCC2S7DF.js} +4 -1
- package/dist/chunk-ZH77BXMA.js +14 -0
- package/dist/generated/index.d.ts +10 -0
- package/dist/generated/index.js +80 -68
- package/dist/index.js +80 -68
- package/dist/styles.css +1414 -85
- package/dist/utils/fontFamily.d.ts +29 -0
- package/dist/utils/hexColour.d.ts +12 -0
- package/package.json +3 -3
- package/scripts/check-css-variables.mjs +18 -2
- package/dist/Combobox-YDONYDTM.css +0 -81
- package/dist/chunk-OOJTPR7N.js +0 -137
- package/dist/{chunk-245IXG5P.js → chunk-3WMOEGEL.js} +0 -0
- package/dist/{chunk-ISDEXIXH.js → chunk-E6HXFFWO.js} +1 -1
- package/dist/{chunk-6R5BSA36.js → chunk-GHY63X4C.js} +1 -1
- package/dist/{chunk-ICVS3U4S.js → chunk-PGR2PKH6.js} +1 -1
- package/dist/{chunk-VKFG4FLE.js → chunk-R6R2UHVG.js} +1 -1
- package/dist/{chunk-OO7QJCJQ.js → chunk-WXOYHVWG.js} +1 -1
- package/dist/{chunk-UFXLNC2N.js → chunk-ZFM5L7M4.js} +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { BrandScope } from './chunk-P3OIM6OC.js';
|
|
2
|
+
import { normalizeHex } from './chunk-UZMNR366.js';
|
|
3
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
+
import './BrandSample-G5V7GKR2.css';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var LABELS = {
|
|
8
|
+
heading: "Quarterly review",
|
|
9
|
+
body: "Every team finished the quarter on plan.",
|
|
10
|
+
link: "See the breakdown",
|
|
11
|
+
byline: "Prepared by an agent",
|
|
12
|
+
slideHeading: "The year ahead",
|
|
13
|
+
slideFooter: "Company review",
|
|
14
|
+
label: (name, kind, mode) => `A ${kind === "doc" ? "doc" : "slide"} in the ${name} brand, ${mode} mode`
|
|
15
|
+
};
|
|
16
|
+
function BrandSample({
|
|
17
|
+
kind,
|
|
18
|
+
mode,
|
|
19
|
+
name,
|
|
20
|
+
colors,
|
|
21
|
+
logo,
|
|
22
|
+
logoOnDark,
|
|
23
|
+
mark,
|
|
24
|
+
headingFamily,
|
|
25
|
+
bodyFamily,
|
|
26
|
+
className,
|
|
27
|
+
labels
|
|
28
|
+
}) {
|
|
29
|
+
const text = { ...LABELS, ...labels };
|
|
30
|
+
const modeLogo = (mode === "dark" ? logoOnDark || logo : logo) || null;
|
|
31
|
+
const secondary = normalizeHex(colors.secondary) !== null;
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
BrandScope,
|
|
34
|
+
{
|
|
35
|
+
colors,
|
|
36
|
+
headingFamily,
|
|
37
|
+
bodyFamily,
|
|
38
|
+
mode,
|
|
39
|
+
role: "img",
|
|
40
|
+
"aria-label": text.label(name, kind, mode),
|
|
41
|
+
className: cx("crewlet-brand-sample", `crewlet-brand-sample--${kind}`, `crewlet-brand-sample--${mode}`, className),
|
|
42
|
+
children: kind === "doc" ? /* @__PURE__ */ jsxs("div", { className: "crewlet-brand-sample__page", children: [
|
|
43
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__brand", children: modeLogo ? /* @__PURE__ */ jsx("img", { src: modeLogo, alt: "", className: "crewlet-brand-sample__logo", draggable: false }) : /* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__wordmark", children: name }) }),
|
|
44
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__heading", children: text.heading }),
|
|
45
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__rule" }),
|
|
46
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-brand-sample__body", children: [
|
|
47
|
+
text.body,
|
|
48
|
+
" ",
|
|
49
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__link", children: text.link })
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__byline", children: text.byline })
|
|
52
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "crewlet-brand-sample__slide", children: [
|
|
53
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__brand", children: mark || modeLogo ? /* @__PURE__ */ jsx(
|
|
54
|
+
"img",
|
|
55
|
+
{
|
|
56
|
+
src: (mark || modeLogo) ?? void 0,
|
|
57
|
+
alt: "",
|
|
58
|
+
className: cx("crewlet-brand-sample__logo", mark ? "crewlet-brand-sample__logo--mark" : null),
|
|
59
|
+
draggable: false
|
|
60
|
+
}
|
|
61
|
+
) : /* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__wordmark", children: name }) }),
|
|
62
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-brand-sample__bar", children: [
|
|
63
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__bar-primary" }),
|
|
64
|
+
secondary ? /* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__bar-secondary" }) : null
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__heading crewlet-brand-sample__heading--slide", children: text.slideHeading }),
|
|
67
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-sample__footer", children: `${name} \xB7 ${text.slideFooter}` })
|
|
68
|
+
] })
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { BrandSample };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { safeFontFamily, fontStack } from './chunk-5SGHW42B.js';
|
|
2
|
+
import { normalizeHex } from './chunk-UZMNR366.js';
|
|
3
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
+
import '@crewlethq/tokens/css/brand-scope';
|
|
5
|
+
import './BrandScope-H2KZHGT7.css';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var COLOR_INPUTS = {
|
|
9
|
+
primary: "--brand-primary",
|
|
10
|
+
primary_on_dark: "--brand-primary-on-dark",
|
|
11
|
+
secondary: "--brand-secondary",
|
|
12
|
+
text: "--brand-text",
|
|
13
|
+
light_ground: "--brand-light-ground",
|
|
14
|
+
dark_ground: "--brand-dark-ground"
|
|
15
|
+
};
|
|
16
|
+
function brandScopeInputs(colors, headingFamily, bodyFamily) {
|
|
17
|
+
const inputs = {};
|
|
18
|
+
for (const [role, input] of Object.entries(COLOR_INPUTS)) {
|
|
19
|
+
const value = normalizeHex(colors[role]);
|
|
20
|
+
if (value !== null) inputs[input] = value;
|
|
21
|
+
}
|
|
22
|
+
if (safeFontFamily(headingFamily)) inputs["--brand-font-heading"] = fontStack(headingFamily, "var(--font-family-display)");
|
|
23
|
+
if (safeFontFamily(bodyFamily)) inputs["--brand-font-body"] = fontStack(bodyFamily, "var(--font-family-sans)");
|
|
24
|
+
return inputs;
|
|
25
|
+
}
|
|
26
|
+
function BrandScope({ colors, headingFamily, bodyFamily, mode, className, children, ...rest }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: "crewlet-brand-scope",
|
|
31
|
+
"data-mode": mode,
|
|
32
|
+
style: brandScopeInputs(colors, headingFamily, bodyFamily),
|
|
33
|
+
children: /* @__PURE__ */ jsx("div", { ...rest, className: cx("crewlet-brand-scope__layer", className), children })
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { BrandScope, brandScopeInputs };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document } from './chunk-PWG3VHRQ.js';
|
|
2
|
-
import { ArtifactKindGlyph } from './chunk-
|
|
2
|
+
import { ArtifactKindGlyph } from './chunk-RSKW25Y5.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './ArtifactCover-D4MBEJ5H.css';
|
|
5
5
|
import './DashboardCover-KYGYMRKW.css';
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { useListbox, useOptionKeys } from './chunk-7KHM2FZH.js';
|
|
2
|
+
import { Input } from './chunk-EXRRTKWT.js';
|
|
3
|
+
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
4
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
+
import './HitArea-QUOS6ZDJ.css';
|
|
6
|
+
import './Combobox-GBCWXWEB.css';
|
|
7
|
+
import { forwardRef, useCallback, useId, useMemo, useRef, useEffect } from 'react';
|
|
8
|
+
import { CheckGlyph } from '@crewlethq/icons/glyphs';
|
|
9
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
var INLINE_ROWS = 6;
|
|
12
|
+
var Combobox = forwardRef(function Combobox2({
|
|
13
|
+
value,
|
|
14
|
+
onValueChange,
|
|
15
|
+
options,
|
|
16
|
+
renderList,
|
|
17
|
+
onCommit,
|
|
18
|
+
label,
|
|
19
|
+
tabCommits = false,
|
|
20
|
+
commitOn = "mousedown",
|
|
21
|
+
mono = false,
|
|
22
|
+
emptyMessage,
|
|
23
|
+
id,
|
|
24
|
+
className,
|
|
25
|
+
containerClassName,
|
|
26
|
+
...props
|
|
27
|
+
}, ref) {
|
|
28
|
+
const { inline = false, open: openProp, onOpenChange: onOpenChangeProp, rows: rowsProp, chosen, ...rest } = props;
|
|
29
|
+
const open = inline ? true : Boolean(openProp);
|
|
30
|
+
const onOpenChange = useCallback(
|
|
31
|
+
(next) => {
|
|
32
|
+
if (!inline) onOpenChangeProp?.(next);
|
|
33
|
+
},
|
|
34
|
+
[inline, onOpenChangeProp]
|
|
35
|
+
);
|
|
36
|
+
const rows = Math.max(1, Math.round(rowsProp ?? INLINE_ROWS));
|
|
37
|
+
const generatedId = useId();
|
|
38
|
+
const fieldId = id ?? generatedId;
|
|
39
|
+
const offered = useMemo(() => options ?? [], [options]);
|
|
40
|
+
const showing = open && (offered.length > 0 || renderList !== void 0 || emptyMessage !== void 0);
|
|
41
|
+
const lists = open && (offered.length > 0 || renderList !== void 0);
|
|
42
|
+
const box = useRef(null);
|
|
43
|
+
const commit = useCallback(
|
|
44
|
+
(index) => {
|
|
45
|
+
const option = offered[index];
|
|
46
|
+
if (!option || option.disabled) return;
|
|
47
|
+
if (onCommit) onCommit(option, index);
|
|
48
|
+
else onValueChange(option.value);
|
|
49
|
+
onOpenChange(false);
|
|
50
|
+
},
|
|
51
|
+
[offered, onCommit, onOpenChange, onValueChange]
|
|
52
|
+
);
|
|
53
|
+
const listbox = useListbox({
|
|
54
|
+
id: fieldId,
|
|
55
|
+
// A list that is showing with nothing in it still owns Escape: the reader
|
|
56
|
+
// can see it, so dismissing it is what Escape means there too. An inline
|
|
57
|
+
// list is not a popup: it has nothing to dismiss, and Escape reaches the
|
|
58
|
+
// surface around it.
|
|
59
|
+
open: showing,
|
|
60
|
+
count: offered.length,
|
|
61
|
+
onCommit: commit,
|
|
62
|
+
onClose: () => onOpenChange(false),
|
|
63
|
+
tabCommits,
|
|
64
|
+
popup: !inline
|
|
65
|
+
});
|
|
66
|
+
const isDisabled = useCallback((index) => Boolean(offered[index]?.disabled), [offered]);
|
|
67
|
+
const optionKeys = useOptionKeys({ listbox, count: offered.length, disabled: isDisabled, ends: value === "" });
|
|
68
|
+
const chosenIndex = chosen === void 0 ? -1 : offered.findIndex((option) => option.value === chosen);
|
|
69
|
+
const { opening, step } = optionKeys;
|
|
70
|
+
const setActive = listbox.setActive;
|
|
71
|
+
const placed = useRef(false);
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
if (!inline) return;
|
|
74
|
+
if (!placed.current) {
|
|
75
|
+
placed.current = true;
|
|
76
|
+
setActive(opening(chosenIndex));
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
setActive(step(0, 1));
|
|
80
|
+
}, [inline, value]);
|
|
81
|
+
function onKeyDown(event) {
|
|
82
|
+
if (inline && optionKeys.onKeyDown(event)) return;
|
|
83
|
+
if (listbox.onKeyDown(event)) return;
|
|
84
|
+
if (inline) return;
|
|
85
|
+
if (!showing && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
onOpenChange(true);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const handlers = (index) => {
|
|
91
|
+
const { onMouseDown, onMouseEnter } = listbox.optionHandlers(index);
|
|
92
|
+
if (commitOn === "click") {
|
|
93
|
+
return {
|
|
94
|
+
onMouseEnter,
|
|
95
|
+
// The press is still swallowed, so the field keeps focus and the value
|
|
96
|
+
// being completed keeps its caret; only what TAKES the row moves.
|
|
97
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
98
|
+
onClick: () => commit(index)
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return { onMouseDown, onMouseEnter };
|
|
102
|
+
};
|
|
103
|
+
const fieldRef = (el) => {
|
|
104
|
+
box.current = el;
|
|
105
|
+
if (typeof ref === "function") ref(el);
|
|
106
|
+
else if (ref) ref.current = el;
|
|
107
|
+
};
|
|
108
|
+
const row = (option, index, picked) => /* @__PURE__ */ jsxs(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
id: listbox.optionId(index),
|
|
112
|
+
role: "option",
|
|
113
|
+
"aria-selected": picked,
|
|
114
|
+
"aria-disabled": option.disabled || void 0,
|
|
115
|
+
className: cx(
|
|
116
|
+
"crewlet-listbox__option",
|
|
117
|
+
HIT_AREA_CLASS,
|
|
118
|
+
index === listbox.active && "is-highlight",
|
|
119
|
+
option.disabled && "is-disabled"
|
|
120
|
+
),
|
|
121
|
+
...option.disabled ? {} : handlers(index),
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-combobox__label", children: option.label ?? option.value }),
|
|
124
|
+
option.hint ? /* @__PURE__ */ jsx("span", { className: "crewlet-listbox__hint", children: option.hint }) : null,
|
|
125
|
+
inline && picked ? /* @__PURE__ */ jsx("span", { className: "crewlet-combobox__check", "aria-hidden": "true", children: /* @__PURE__ */ jsx(CheckGlyph, { size: "sm" }) }) : null
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
option.value
|
|
129
|
+
);
|
|
130
|
+
if (inline) {
|
|
131
|
+
const listed = offered.length > 0 || renderList !== void 0;
|
|
132
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-combobox", "crewlet-combobox--inline", containerClassName), children: [
|
|
133
|
+
/* @__PURE__ */ jsx(
|
|
134
|
+
Input,
|
|
135
|
+
{
|
|
136
|
+
...rest,
|
|
137
|
+
ref: fieldRef,
|
|
138
|
+
id: fieldId,
|
|
139
|
+
className,
|
|
140
|
+
value,
|
|
141
|
+
role: "combobox",
|
|
142
|
+
"aria-autocomplete": "list",
|
|
143
|
+
"aria-expanded": listed,
|
|
144
|
+
"aria-controls": listed ? listbox.listId : void 0,
|
|
145
|
+
"aria-activedescendant": offered.length > 0 && listbox.active >= 0 ? listbox.optionId(listbox.active) : void 0,
|
|
146
|
+
autoComplete: "off",
|
|
147
|
+
spellCheck: false,
|
|
148
|
+
onChange: (event) => onValueChange(event.target.value),
|
|
149
|
+
onKeyDown
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
/* @__PURE__ */ jsxs("div", { className: cx("crewlet-combobox__list", mono && "is-mono"), style: { "--crewlet-combobox-rows": rows }, children: [
|
|
153
|
+
listed ? /* @__PURE__ */ jsx("div", { ref: listbox.listRef, className: "crewlet-combobox__options", role: "listbox", id: listbox.listId, "aria-label": label, children: renderList ? renderList({
|
|
154
|
+
listId: listbox.listId,
|
|
155
|
+
active: listbox.active,
|
|
156
|
+
optionId: listbox.optionId,
|
|
157
|
+
optionHandlers: handlers
|
|
158
|
+
}) : offered.map((option, index) => row(option, index, index === chosenIndex)) }) : null,
|
|
159
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-combobox__empty", role: "status", children: !listed && emptyMessage ? /* @__PURE__ */ jsx("div", { className: "crewlet-listbox__empty", children: emptyMessage }) : null })
|
|
160
|
+
] })
|
|
161
|
+
] });
|
|
162
|
+
}
|
|
163
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-combobox", containerClassName), ref: listbox.anchorRef, children: [
|
|
164
|
+
/* @__PURE__ */ jsx(
|
|
165
|
+
Input,
|
|
166
|
+
{
|
|
167
|
+
...rest,
|
|
168
|
+
ref: fieldRef,
|
|
169
|
+
id: fieldId,
|
|
170
|
+
className,
|
|
171
|
+
value,
|
|
172
|
+
role: "combobox",
|
|
173
|
+
"aria-autocomplete": "list",
|
|
174
|
+
"aria-expanded": lists,
|
|
175
|
+
"aria-controls": lists ? listbox.listId : void 0,
|
|
176
|
+
"aria-activedescendant": lists && offered.length > 0 ? listbox.optionId(listbox.active) : void 0,
|
|
177
|
+
autoComplete: "off",
|
|
178
|
+
spellCheck: false,
|
|
179
|
+
onChange: (event) => onValueChange(event.target.value),
|
|
180
|
+
onKeyDown
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
showing ? /* @__PURE__ */ jsx(
|
|
184
|
+
"div",
|
|
185
|
+
{
|
|
186
|
+
ref: listbox.listRef,
|
|
187
|
+
className: cx("crewlet-combobox__panel", mono && "is-mono"),
|
|
188
|
+
role: lists ? "listbox" : void 0,
|
|
189
|
+
id: lists ? listbox.listId : void 0,
|
|
190
|
+
"aria-label": lists ? label : void 0,
|
|
191
|
+
children: renderList ? renderList({
|
|
192
|
+
listId: listbox.listId,
|
|
193
|
+
active: listbox.active,
|
|
194
|
+
optionId: listbox.optionId,
|
|
195
|
+
optionHandlers: handlers
|
|
196
|
+
}) : offered.length > 0 ? (
|
|
197
|
+
// A completion list has no choice of its own: the row the
|
|
198
|
+
// arrows are on is the one announced as selected.
|
|
199
|
+
offered.map((option, index) => row(option, index, index === listbox.active))
|
|
200
|
+
) : /* @__PURE__ */ jsx("div", { className: "crewlet-listbox__empty", children: emptyMessage })
|
|
201
|
+
}
|
|
202
|
+
) : null
|
|
203
|
+
] });
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
export { Combobox };
|
|
@@ -2,30 +2,32 @@ import { Skeleton } from './chunk-TEUQWOWZ.js';
|
|
|
2
2
|
import { PrincipalAvatar } from './chunk-CI3VPIJN.js';
|
|
3
3
|
import { RelativeTime } from './chunk-3CZ7XAVY.js';
|
|
4
4
|
import { AvatarStack } from './chunk-5AQBPHZD.js';
|
|
5
|
-
import { ArtifactKindGround } from './chunk-
|
|
5
|
+
import { ArtifactKindGround } from './chunk-RV6XB5UV.js';
|
|
6
6
|
import { Card } from './chunk-INHXF2CL.js';
|
|
7
|
+
import { Checkbox } from './chunk-NCHKKYPQ.js';
|
|
7
8
|
import { ArtifactAccessGlyph } from './chunk-BGLKLXL3.js';
|
|
8
|
-
import { ArtifactKindGlyph } from './chunk-
|
|
9
|
+
import { ArtifactKindGlyph } from './chunk-RSKW25Y5.js';
|
|
9
10
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
10
11
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
11
|
-
import './ArtifactKinds-
|
|
12
|
-
import './ArtifactCard-
|
|
12
|
+
import './ArtifactKinds-O3CALPVX.css';
|
|
13
|
+
import './ArtifactCard-SOB63NV5.css';
|
|
13
14
|
import { useId } from 'react';
|
|
14
15
|
import { PinGlyph } from '@crewlethq/icons/glyphs';
|
|
15
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
16
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
16
17
|
|
|
17
18
|
function ArtifactPreviewGlyph({ kind }) {
|
|
18
19
|
return /* @__PURE__ */ jsx(ArtifactKindGround, { kind });
|
|
19
20
|
}
|
|
20
21
|
var LABELS = {
|
|
21
|
-
kinds: { html: "HTML", doc: "Doc", slides: "Slides", design: "Design", dashboard: "Dashboard", sheet: "Sheet" },
|
|
22
|
+
kinds: { html: "HTML", doc: "Doc", slides: "Slides", design: "Design", dashboard: "Dashboard", sheet: "Sheet", brand: "Brand" },
|
|
22
23
|
pinned: "Pinned",
|
|
23
24
|
version: (version) => `v${version}`,
|
|
24
25
|
changes: (count) => count === 1 ? "1 change since you looked" : `${count} changes since you looked`,
|
|
25
26
|
present: (count) => count === 1 ? "1 here now" : `${count} here now`,
|
|
26
27
|
updated: "Edited",
|
|
27
28
|
by: (name) => `by ${name}`,
|
|
28
|
-
access: { private: "Private", shared: "Shared", company: "Shared with the company" }
|
|
29
|
+
access: { private: "Private", shared: "Shared", company: "Shared with the company" },
|
|
30
|
+
select: (title) => `Select ${title}`
|
|
29
31
|
};
|
|
30
32
|
function ArtifactCard({
|
|
31
33
|
title,
|
|
@@ -42,6 +44,10 @@ function ArtifactCard({
|
|
|
42
44
|
project,
|
|
43
45
|
access,
|
|
44
46
|
actions,
|
|
47
|
+
selectable = false,
|
|
48
|
+
selected = false,
|
|
49
|
+
selecting = false,
|
|
50
|
+
onSelectedChange,
|
|
45
51
|
trashed = false,
|
|
46
52
|
size = "card",
|
|
47
53
|
className,
|
|
@@ -56,6 +62,7 @@ function ArtifactCard({
|
|
|
56
62
|
};
|
|
57
63
|
const titleId = useId();
|
|
58
64
|
const factsId = useId();
|
|
65
|
+
const boxId = useId();
|
|
59
66
|
const present = presence && presence.length > 0 ? presence : null;
|
|
60
67
|
const changedBy = updatedBy && updatedBy !== owner?.name ? updatedBy : void 0;
|
|
61
68
|
const edited = /* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -108,37 +115,74 @@ function ArtifactCard({
|
|
|
108
115
|
}
|
|
109
116
|
);
|
|
110
117
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
const picking = selectable && selecting;
|
|
119
|
+
const bodyContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
120
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-artifact-card__preview", "aria-hidden": true, children: preview ?? /* @__PURE__ */ jsx(ArtifactPreviewGlyph, { kind }) }),
|
|
121
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-card__body", children: [
|
|
122
|
+
/* @__PURE__ */ jsx("span", { className: cx("crewlet-artifact-card__badge", `crewlet-kind--${kind}`), "aria-hidden": true, children: /* @__PURE__ */ jsx(ArtifactKindGlyph, { kind, size: "sm" }) }),
|
|
123
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-card__title-row", children: [
|
|
124
|
+
/* @__PURE__ */ jsx("span", { id: titleId, className: "crewlet-artifact-card__title", title, children: title }),
|
|
125
|
+
pinned ? /* @__PURE__ */ jsx("span", { className: "crewlet-artifact-card__pin", title: text.pinned, "aria-hidden": true, children: /* @__PURE__ */ jsx(PinGlyph, { size: "sm" }) }) : null
|
|
126
|
+
] }),
|
|
127
|
+
/* @__PURE__ */ jsxs("span", { id: factsId, className: "crewlet-artifact-card__facts", children: [
|
|
128
|
+
/* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
129
|
+
text.kinds[kind],
|
|
130
|
+
pinned ? `, ${text.pinned}` : ""
|
|
131
|
+
] }),
|
|
132
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-card__line crewlet-artifact-card__meta", children: [
|
|
133
|
+
access ? /* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-card__access", title: text.access[access], children: [
|
|
134
|
+
/* @__PURE__ */ jsx(ArtifactAccessGlyph, { access }),
|
|
135
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: text.access[access] })
|
|
136
|
+
] }) : null,
|
|
137
|
+
owner ? /* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-card__owner", children: [
|
|
138
|
+
/* @__PURE__ */ jsx(PrincipalAvatar, { principal: owner, size: "xs" }),
|
|
139
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-artifact-card__owner-name", children: owner.name })
|
|
140
|
+
] }) : null,
|
|
141
|
+
edited
|
|
119
142
|
] }),
|
|
120
|
-
|
|
121
|
-
/* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
122
|
-
text.kinds[kind],
|
|
123
|
-
pinned ? `, ${text.pinned}` : ""
|
|
124
|
-
] }),
|
|
125
|
-
/* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-card__line crewlet-artifact-card__meta", children: [
|
|
126
|
-
access ? /* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-card__access", title: text.access[access], children: [
|
|
127
|
-
/* @__PURE__ */ jsx(ArtifactAccessGlyph, { access }),
|
|
128
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: text.access[access] })
|
|
129
|
-
] }) : null,
|
|
130
|
-
owner ? /* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-card__owner", children: [
|
|
131
|
-
/* @__PURE__ */ jsx(PrincipalAvatar, { principal: owner, size: "xs" }),
|
|
132
|
-
/* @__PURE__ */ jsx("span", { className: "crewlet-artifact-card__owner-name", children: owner.name })
|
|
133
|
-
] }) : null,
|
|
134
|
-
edited
|
|
135
|
-
] }),
|
|
136
|
-
extra
|
|
137
|
-
] })
|
|
143
|
+
extra
|
|
138
144
|
] })
|
|
139
|
-
] })
|
|
140
|
-
actions ? /* @__PURE__ */ jsx("span", { className: "crewlet-artifact-card__actions", children: actions }) : null
|
|
145
|
+
] })
|
|
141
146
|
] });
|
|
147
|
+
return /* @__PURE__ */ jsxs(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
className: cx(
|
|
151
|
+
"crewlet-artifact-card",
|
|
152
|
+
"crewlet-artifact-card--card",
|
|
153
|
+
trashed && "crewlet-artifact-card--trashed",
|
|
154
|
+
selectable && selected && "is-selected",
|
|
155
|
+
picking && "crewlet-artifact-card--selecting",
|
|
156
|
+
className
|
|
157
|
+
),
|
|
158
|
+
children: [
|
|
159
|
+
picking ? (
|
|
160
|
+
// WHILE CHOOSING, THE BODY IS THE BOX'S LABEL: one press anywhere
|
|
161
|
+
// ticks it. It is not a stop of its own; the box is, named for the
|
|
162
|
+
// card, so a keyboard meets one control per card.
|
|
163
|
+
/* @__PURE__ */ jsx("label", { htmlFor: boxId, className: "crewlet-artifact-card__link", children: bodyContent })
|
|
164
|
+
) : /* @__PURE__ */ jsx("a", { href, className: "crewlet-artifact-card__link", "aria-labelledby": titleId, "aria-describedby": factsId, children: bodyContent }),
|
|
165
|
+
selectable ? (
|
|
166
|
+
// THE BOX STANDS ON THE PREVIEW'S FOOT, not over its top: a cover's
|
|
167
|
+
// own title starts at its top corner, and a box there hid its first
|
|
168
|
+
// words. The anchor has the preview's shape, so the box sits on the
|
|
169
|
+
// seam opposite the kind's badge whatever the card's width.
|
|
170
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-artifact-card__select-anchor", children: /* @__PURE__ */ jsx("span", { className: "crewlet-artifact-card__select", children: /* @__PURE__ */ jsx(
|
|
171
|
+
Checkbox,
|
|
172
|
+
{
|
|
173
|
+
id: boxId,
|
|
174
|
+
hideLabel: true,
|
|
175
|
+
label: text.select(title),
|
|
176
|
+
checked: selected,
|
|
177
|
+
"aria-describedby": factsId,
|
|
178
|
+
onChange: (event) => onSelectedChange?.(event.target.checked, { range: event.nativeEvent.shiftKey === true })
|
|
179
|
+
}
|
|
180
|
+
) }) })
|
|
181
|
+
) : null,
|
|
182
|
+
actions ? /* @__PURE__ */ jsx("span", { className: "crewlet-artifact-card__actions", children: actions }) : null
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
);
|
|
142
186
|
}
|
|
143
187
|
function ArtifactCardSkeleton({ className }) {
|
|
144
188
|
return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-artifact-card", "crewlet-artifact-card--card", "crewlet-artifact-card--skeleton", className), "aria-hidden": true, children: [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ArtifactKindGlyph } from './chunk-
|
|
1
|
+
import { ArtifactKindGlyph } from './chunk-RSKW25Y5.js';
|
|
2
2
|
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
3
3
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './HitArea-QUOS6ZDJ.css';
|
|
6
|
-
import './ArtifactKinds-
|
|
6
|
+
import './ArtifactKinds-O3CALPVX.css';
|
|
7
7
|
import './ArtifactMakeRow-6UX2LTF7.css';
|
|
8
8
|
import { useId } from 'react';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { TableGlyph, LayoutDashboardGlyph, PaletteGlyph, PresentationGlyph, FileTextGlyph, FileCodeGlyph } from '@crewlethq/icons/glyphs';
|
|
1
|
+
import { SwatchBookGlyph, TableGlyph, LayoutDashboardGlyph, PaletteGlyph, PresentationGlyph, FileTextGlyph, FileCodeGlyph } from '@crewlethq/icons/glyphs';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
// src/ArtifactKindGlyph/ArtifactKindGlyph.tsx
|
|
5
|
-
var ARTIFACT_KINDS = ["html", "doc", "slides", "design", "dashboard", "sheet"];
|
|
5
|
+
var ARTIFACT_KINDS = ["html", "doc", "slides", "design", "dashboard", "sheet", "brand"];
|
|
6
6
|
var KIND_GLYPHS = {
|
|
7
7
|
html: FileCodeGlyph,
|
|
8
8
|
doc: FileTextGlyph,
|
|
9
9
|
slides: PresentationGlyph,
|
|
10
10
|
design: PaletteGlyph,
|
|
11
11
|
dashboard: LayoutDashboardGlyph,
|
|
12
|
-
sheet: TableGlyph
|
|
12
|
+
sheet: TableGlyph,
|
|
13
|
+
brand: SwatchBookGlyph
|
|
13
14
|
};
|
|
14
15
|
function ArtifactKindGlyph({ kind, size = "md" }) {
|
|
15
16
|
const Drawn = KIND_GLYPHS[kind];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
2
2
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
-
import './ArtifactKinds-
|
|
3
|
+
import './ArtifactKinds-O3CALPVX.css';
|
|
4
4
|
import './ArtifactKindIllustration-KLFL7KBG.css';
|
|
5
5
|
import { useId } from 'react';
|
|
6
6
|
import { CheckGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -87,6 +87,17 @@ var DRAWINGS = {
|
|
|
87
87
|
/* @__PURE__ */ jsx("rect", { className: "l", x: "108", y: "73", width: "22", height: "4", rx: "2" }),
|
|
88
88
|
/* @__PURE__ */ jsx("rect", { className: "l", x: "30", y: "87", width: "20", height: "4", rx: "2" }),
|
|
89
89
|
/* @__PURE__ */ jsx("rect", { className: "l", x: "68", y: "87", width: "14", height: "4", rx: "2" })
|
|
90
|
+
] }),
|
|
91
|
+
brand: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
92
|
+
/* @__PURE__ */ jsx("rect", { className: "b", x: "30", y: "16", width: "100", height: "88", rx: "8" }),
|
|
93
|
+
/* @__PURE__ */ jsx("circle", { className: "m", cx: "48", cy: "36", r: "8" }),
|
|
94
|
+
/* @__PURE__ */ jsx("rect", { className: "l", x: "62", y: "30", width: "36", height: "5", rx: "2.5" }),
|
|
95
|
+
/* @__PURE__ */ jsx("rect", { className: "l", x: "62", y: "39", width: "24", height: "4", rx: "2" }),
|
|
96
|
+
/* @__PURE__ */ jsx("rect", { className: "m", x: "40", y: "54", width: "24", height: "24", rx: "5" }),
|
|
97
|
+
/* @__PURE__ */ jsx("rect", { className: "s", x: "68", y: "54", width: "24", height: "24", rx: "5" }),
|
|
98
|
+
/* @__PURE__ */ jsx("rect", { className: "l", x: "96", y: "54", width: "24", height: "24", rx: "5" }),
|
|
99
|
+
/* @__PURE__ */ jsx("rect", { className: "l", x: "40", y: "88", width: "42", height: "4", rx: "2" }),
|
|
100
|
+
/* @__PURE__ */ jsx("rect", { className: "l", x: "86", y: "88", width: "22", height: "4", rx: "2" })
|
|
90
101
|
] })
|
|
91
102
|
};
|
|
92
103
|
function ArtifactKindGround({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ThemeSwatch } from './chunk-MNFU2RNT.js';
|
|
2
|
+
import { Tag } from './chunk-KYIAFNU7.js';
|
|
2
3
|
import { useHighlightRest } from './chunk-7KHM2FZH.js';
|
|
3
4
|
import { useRoving, tabStop } from './chunk-EGMQURBR.js';
|
|
4
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
-
import './ThemeGallery-
|
|
6
|
+
import './ThemeGallery-UEFZRT6W.css';
|
|
6
7
|
import { useId } from 'react';
|
|
7
8
|
import { themeGroups, themeRegistry } from '@crewlethq/tokens';
|
|
8
9
|
import { CheckGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -69,7 +70,7 @@ function ThemeGallery({
|
|
|
69
70
|
type: "button",
|
|
70
71
|
role: "radio",
|
|
71
72
|
"aria-checked": chosen,
|
|
72
|
-
"aria-label": `${theme.name}, ${theme.tag}
|
|
73
|
+
"aria-label": theme.tag ? `${theme.name}, ${theme.tag}` : theme.name,
|
|
73
74
|
"aria-describedby": section.group ? headingId : void 0,
|
|
74
75
|
tabIndex: at === stop ? 0 : -1,
|
|
75
76
|
disabled,
|
|
@@ -83,7 +84,8 @@ function ThemeGallery({
|
|
|
83
84
|
/* @__PURE__ */ jsxs("span", { className: "crewlet-theme-gallery__label", children: [
|
|
84
85
|
/* @__PURE__ */ jsx("span", { className: "crewlet-theme-gallery__name", children: theme.name }),
|
|
85
86
|
chosen ? /* @__PURE__ */ jsx(CheckGlyph, { size: "xs", className: "crewlet-theme-gallery__check", "aria-hidden": "true" }) : null
|
|
86
|
-
] })
|
|
87
|
+
] }),
|
|
88
|
+
theme.tag && theme.tagTone ? theme.tagTone === "brand" ? /* @__PURE__ */ jsx("span", { className: "crewlet-theme-gallery__tag crewlet-theme-gallery__tag--brand", children: /* @__PURE__ */ jsx(Tag, { size: "xs", variant: "brand", children: theme.tag }) }) : /* @__PURE__ */ jsx("span", { className: "crewlet-theme-gallery__tag", title: theme.tag, children: theme.tag }) : null
|
|
87
89
|
]
|
|
88
90
|
},
|
|
89
91
|
theme.id
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Timeline } from './chunk-AUQPBL4O.js';
|
|
2
2
|
import { Section } from './chunk-JQ7IFSF6.js';
|
|
3
3
|
import { Disclosure } from './chunk-OGXHZHRX.js';
|
|
4
|
-
import { Composer } from './chunk-
|
|
4
|
+
import { Composer } from './chunk-GHY63X4C.js';
|
|
5
5
|
import { ArtifactPanel } from './chunk-NBDN5JZV.js';
|
|
6
6
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
7
7
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modal } from './chunk-
|
|
1
|
+
import { Modal } from './chunk-YCC2S7DF.js';
|
|
2
2
|
import { useListbox, useOptionKeys } from './chunk-7KHM2FZH.js';
|
|
3
3
|
import { Popover } from './chunk-KHJIEPZV.js';
|
|
4
4
|
import { KeyChip, highlightMatch } from './chunk-FYTIJM2T.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { SegmentedControl } from './chunk-6FVGSWLS.js';
|
|
2
1
|
import { Tooltip } from './chunk-I33UIUZD.js';
|
|
3
|
-
import {
|
|
2
|
+
import { SegmentedControl } from './chunk-6FVGSWLS.js';
|
|
3
|
+
import { ArtifactIcon } from './chunk-AVL52EME.js';
|
|
4
4
|
import { isApplePlatform, Kbd } from './chunk-SMBKXWML.js';
|
|
5
5
|
import { Menu } from './chunk-TMM32U7D.js';
|
|
6
6
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
7
7
|
import { IconButton } from './chunk-LACA4JGC.js';
|
|
8
8
|
import { returnFocus } from './chunk-NUZHC6MM.js';
|
|
9
9
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
10
|
-
import './ArtifactKinds-
|
|
11
|
-
import './ArtifactBar-
|
|
10
|
+
import './ArtifactKinds-O3CALPVX.css';
|
|
11
|
+
import './ArtifactBar-UMZCTARR.css';
|
|
12
12
|
import { useId, useState, useRef, useEffect } from 'react';
|
|
13
13
|
import { ChevronLeftGlyph, EllipsisGlyph, ChevronDownGlyph } from '@crewlethq/icons/glyphs';
|
|
14
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -250,7 +250,7 @@ function BarTitle({
|
|
|
250
250
|
el?.select();
|
|
251
251
|
}, [editing]);
|
|
252
252
|
if (onRename === void 0) {
|
|
253
|
-
return /* @__PURE__ */ jsx(Heading, { id, className: "crewlet-artifact-bar__title", title, children: title });
|
|
253
|
+
return /* @__PURE__ */ jsx(Heading, { id, className: "crewlet-artifact-bar__title", title, children: /* @__PURE__ */ jsx("span", { className: "crewlet-artifact-bar__text", children: title }) });
|
|
254
254
|
}
|
|
255
255
|
const finish = (refocus) => {
|
|
256
256
|
settled.current = true;
|
|
@@ -2,9 +2,9 @@ import { Select } from './chunk-XQZ6EWOE.js';
|
|
|
2
2
|
import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chunk-LFSIKGRQ.js';
|
|
3
3
|
import { HueSwatch } from './chunk-34RMTXDZ.js';
|
|
4
4
|
import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
|
|
5
|
-
import { Checkbox } from './chunk-
|
|
6
|
-
import { FormField, Input } from './chunk-EXRRTKWT.js';
|
|
5
|
+
import { Checkbox } from './chunk-NCHKKYPQ.js';
|
|
7
6
|
import { Kbd } from './chunk-SMBKXWML.js';
|
|
7
|
+
import { FormField, Input } from './chunk-EXRRTKWT.js';
|
|
8
8
|
import { Menu } from './chunk-TMM32U7D.js';
|
|
9
9
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
10
10
|
import { IconButton } from './chunk-LACA4JGC.js';
|