@crewlethq/ui 0.48.2 → 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 +60 -0
- package/dist/AgentHandoffPanel/index.js +4 -4
- package/dist/AppShell/index.js +4 -4
- package/dist/{AppShell-5P575KYA.css → AppShell-BIUFNT3J.css} +30 -11
- package/dist/ArrangeList/index.js +4 -4
- package/dist/ArtifactBar/index.js +9 -9
- package/dist/{ArtifactBar-6PGWGKN2.css → ArtifactBar-UMZCTARR.css} +9 -0
- package/dist/ArtifactCard/ArtifactCard.d.ts +30 -1
- package/dist/ArtifactCard/index.js +12 -5
- 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/AvatarPicker/index.js +7 -7
- 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/Canvas/index.js +2 -2
- package/dist/CanvasBoard/index.js +4 -4
- package/dist/CanvasToolbar/index.js +3 -3
- package/dist/Checkbox/Checkbox.d.ts +8 -0
- package/dist/Checkbox/index.js +3 -3
- 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 +3 -3
- package/dist/Combobox-GBCWXWEB.css +163 -0
- package/dist/CommandPalette/index.js +5 -5
- package/dist/CommentThread/index.js +5 -5
- package/dist/Composer/index.js +3 -3
- package/dist/ConfirmField/index.js +3 -3
- 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 +6 -6
- package/dist/DataView/index.js +10 -10
- package/dist/DateTimePicker/index.js +3 -3
- package/dist/DocTabsEditor/index.js +4 -4
- package/dist/{Editor-6U4BJ25W.js → Editor-MLGK3KOG.js} +3 -3
- 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/HuePicker/index.js +6 -6
- package/dist/Input/index.js +2 -2
- package/dist/LinkInterstitial/index.js +3 -3
- package/dist/ListInput/index.js +3 -3
- 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/MarkdownEditor/index.js +6 -6
- package/dist/Menu/index.js +2 -2
- package/dist/MergeConflicts/index.js +6 -6
- package/dist/Modal/Modal.d.ts +13 -0
- package/dist/Modal/index.js +2 -2
- package/dist/{Modal-TOEWHDCQ.css → Modal-3HMP7WAZ.css} +30 -0
- package/dist/OrgTable/index.js +1 -1
- package/dist/PresenterView/index.js +3 -3
- package/dist/PrincipalPicker/index.js +4 -4
- package/dist/RichEditor/index.js +1 -1
- package/dist/SegmentedControl/index.js +5 -5
- package/dist/Select/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 +6 -6
- package/dist/SheetColumnEditor/index.js +10 -10
- package/dist/SheetGrid/index.js +4 -4
- package/dist/SlideFilmstrip/index.js +3 -3
- package/dist/Switcher/index.js +4 -4
- package/dist/Tabs/index.js +4 -4
- package/dist/TagsInput/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/ThemeSwitcher/index.js +6 -6
- package/dist/TimeWindowPicker/index.js +6 -6
- package/dist/TreeCanvas/index.js +3 -3
- package/dist/TreeGrid/index.js +1 -1
- 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/VersionCompare/index.js +6 -6
- package/dist/{chunk-RBUA7ZNK.js → chunk-34RMTXDZ.js} +1 -1
- package/dist/{chunk-YFUG6ARA.js → chunk-3QSKDZR5.js} +1 -1
- package/dist/chunk-5SGHW42B.js +23 -0
- package/dist/{chunk-R2EOET5Q.js → chunk-627KFRON.js} +2 -2
- package/dist/{chunk-SMVWDO72.js → chunk-6FVGSWLS.js} +1 -1
- package/dist/{chunk-ILDNJHRU.js → chunk-AVL52EME.js} +1 -1
- package/dist/chunk-B235ANDO.js +66 -0
- package/dist/{chunk-MZ3QFQDL.js → chunk-CAVWDJF4.js} +1 -1
- package/dist/{chunk-BLQRC7QR.js → chunk-D6MTBXAJ.js} +2 -2
- package/dist/{chunk-2MYSESZF.js → chunk-FB5CFQTG.js} +82 -12
- package/dist/{chunk-KNMQS3JY.js → chunk-GHY63X4C.js} +1 -1
- package/dist/{chunk-DY4DQ7EB.js → chunk-GP4YWZFO.js} +1 -1
- package/dist/{chunk-NRWJUGNA.js → chunk-H55D66IK.js} +1 -1
- package/dist/{chunk-JNFTFAPN.js → chunk-H7NMJ5AI.js} +2 -2
- package/dist/{chunk-GKRPPSWY.js → chunk-ILFEWRLG.js} +1 -1
- package/dist/chunk-ITI2Z44C.js +139 -0
- package/dist/{chunk-P5VGSVWG.js → chunk-J24Q4HTD.js} +17 -8
- package/dist/{chunk-2FDTSARB.js → chunk-JFDIMO3A.js} +2 -2
- package/dist/chunk-JKAFEFFC.js +44 -0
- package/dist/{chunk-6HYPQ5PY.js → chunk-JWNYI7UD.js} +1 -1
- package/dist/{chunk-WT5UPL6P.js → chunk-KHZYAEGZ.js} +1 -1
- package/dist/chunk-M4QM477B.js +80 -0
- package/dist/{chunk-YUDUYMZB.js → chunk-MIEBOO7Y.js} +2 -2
- package/dist/{chunk-IVA7ZWDS.js → chunk-NAWUXCBC.js} +5 -5
- package/dist/{chunk-YUAQSWNW.js → chunk-NCHKKYPQ.js} +6 -3
- 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-WQJSOTEO.js → chunk-PGR2PKH6.js} +1 -1
- package/dist/{chunk-U2XAJONO.js → chunk-Q44X36QC.js} +80 -36
- package/dist/{chunk-R2IBCEU6.js → chunk-R3BA3C4Y.js} +2 -2
- package/dist/{chunk-HDMLHJFI.js → chunk-R6R2UHVG.js} +4 -4
- package/dist/{chunk-VBEMIZIJ.js → chunk-RFPCHMSX.js} +1 -1
- package/dist/{chunk-CE2THTQR.js → chunk-RSKW25Y5.js} +4 -3
- package/dist/{chunk-UBZDYOCA.js → chunk-RV6XB5UV.js} +12 -1
- package/dist/{chunk-LXCRHVMZ.js → chunk-SEPSXOGJ.js} +1 -1
- package/dist/{chunk-K2FNW3MK.js → chunk-SQ4JFHO7.js} +1 -1
- package/dist/{chunk-F45VSK2M.js → chunk-SS4XCUUJ.js} +2 -2
- package/dist/{chunk-E4BOVKNJ.js → chunk-UTESMBPL.js} +5 -3
- package/dist/chunk-UZMNR366.js +9 -0
- package/dist/{chunk-GQXVLFQB.js → chunk-V7GOOXPK.js} +1 -1
- package/dist/{chunk-KMNY3KEB.js → chunk-VBIM6HFC.js} +2 -2
- package/dist/{chunk-Z5RZXVQ7.js → chunk-VN47PYUF.js} +7 -7
- package/dist/{chunk-CNTBUK24.js → chunk-VP2ODUCC.js} +2 -2
- package/dist/{chunk-VIAQW6RK.js → chunk-VTSJMDGP.js} +5 -5
- package/dist/chunk-W6FOEBIL.js +119 -0
- package/dist/chunk-WLSEAIVC.js +48 -0
- package/dist/{chunk-DETVVKAH.js → chunk-WQ7S7CKZ.js} +3 -3
- package/dist/{chunk-OKUULQ22.js → chunk-WXOYHVWG.js} +2 -2
- package/dist/{chunk-NILOJV62.js → chunk-X4NIE7CI.js} +1 -1
- package/dist/{chunk-PZZHO6OS.js → chunk-XS2FJVMT.js} +1 -1
- package/dist/{chunk-6AKG2VLR.js → chunk-YCC2S7DF.js} +4 -1
- package/dist/{chunk-5CLWBPB5.js → chunk-ZCIL5IHU.js} +1 -1
- package/dist/chunk-ZH77BXMA.js +14 -0
- package/dist/generated/index.d.ts +10 -0
- package/dist/generated/index.js +101 -89
- package/dist/index.js +101 -89
- package/dist/styles.css +1370 -22
- 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-LOBV4QON.js +0 -137
- package/dist/{chunk-245IXG5P.js → chunk-3WMOEGEL.js} +0 -0
- package/dist/{chunk-ICPQIAD6.js → chunk-D7Q5MQRF.js} +1 -1
- package/dist/{chunk-ISDEXIXH.js → chunk-E6HXFFWO.js} +1 -1
- package/dist/{chunk-D4EOPIFL.js → chunk-EXRRTKWT.js} +1 -1
- package/dist/{chunk-S6J3EWDP.js → chunk-SXBJMBSV.js} +1 -1
- package/dist/{chunk-3JIZ2A6K.js → chunk-TMM32U7D.js} +1 -1
- package/dist/{chunk-LD3GEVQU.js → chunk-XQZ6EWOE.js} +1 -1
- package/dist/{chunk-K77LKW3X.js → chunk-ZFM5L7M4.js} +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SlideStage } from './chunk-RMEBFYL7.js';
|
|
2
2
|
import { useReorder } from './chunk-XJ2QEBMM.js';
|
|
3
3
|
import { Kbd, isApplePlatform } from './chunk-SMBKXWML.js';
|
|
4
|
-
import { Menu } from './chunk-
|
|
4
|
+
import { Menu } from './chunk-TMM32U7D.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
7
|
import './SlideFilmstrip-PAT7P4OG.css';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Toolbar } from './chunk-NR4CPM4T.js';
|
|
2
|
-
import { SegmentedControl } from './chunk-
|
|
3
|
-
import { tabId } from './chunk-
|
|
2
|
+
import { SegmentedControl } from './chunk-6FVGSWLS.js';
|
|
3
|
+
import { tabId } from './chunk-ILFEWRLG.js';
|
|
4
4
|
import { IconButton } from './chunk-LACA4JGC.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './MarkdownEditor-WOKV7CLK.css';
|
|
@@ -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,9 +1,9 @@
|
|
|
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';
|
|
5
5
|
import { Skeleton } from './chunk-TEUQWOWZ.js';
|
|
6
|
-
import { Input } from './chunk-
|
|
6
|
+
import { Input } from './chunk-EXRRTKWT.js';
|
|
7
7
|
import { announce } from './chunk-RSAQOKH3.js';
|
|
8
8
|
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
9
9
|
import { focusables, isComposing } from './chunk-H5XTJ7GJ.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { SegmentedControl } from './chunk-SMVWDO72.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
|
-
import { Menu } from './chunk-
|
|
5
|
+
import { Menu } from './chunk-TMM32U7D.js';
|
|
6
6
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
7
|
-
import { returnFocus } from './chunk-NUZHC6MM.js';
|
|
8
7
|
import { IconButton } from './chunk-LACA4JGC.js';
|
|
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Note } from './chunk-5SZGKSGL.js';
|
|
2
|
-
import { CanvasToolbar, toolForKey } from './chunk-
|
|
3
|
-
import { IDENTITY_VIEW, Canvas } from './chunk-
|
|
2
|
+
import { CanvasToolbar, toolForKey } from './chunk-X4NIE7CI.js';
|
|
3
|
+
import { IDENTITY_VIEW, Canvas } from './chunk-D7Q5MQRF.js';
|
|
4
4
|
import { IconButton } from './chunk-LACA4JGC.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './CanvasBoard-JMYNIAHK.css';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Select } from './chunk-
|
|
1
|
+
import { Select } from './chunk-XQZ6EWOE.js';
|
|
2
2
|
import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chunk-LFSIKGRQ.js';
|
|
3
|
-
import { HueSwatch } from './chunk-
|
|
3
|
+
import { HueSwatch } from './chunk-34RMTXDZ.js';
|
|
4
4
|
import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
|
|
5
|
-
import { Checkbox } from './chunk-
|
|
5
|
+
import { Checkbox } from './chunk-NCHKKYPQ.js';
|
|
6
6
|
import { Kbd } from './chunk-SMBKXWML.js';
|
|
7
|
-
import { FormField, Input } from './chunk-
|
|
8
|
-
import { Menu } from './chunk-
|
|
7
|
+
import { FormField, Input } from './chunk-EXRRTKWT.js';
|
|
8
|
+
import { Menu } from './chunk-TMM32U7D.js';
|
|
9
9
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
10
10
|
import { IconButton } from './chunk-LACA4JGC.js';
|
|
11
11
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { normalizeHex } from './chunk-UZMNR366.js';
|
|
2
|
+
import { FormField, Input } from './chunk-EXRRTKWT.js';
|
|
3
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
+
import './ColorField-2OIOWT3Z.css';
|
|
5
|
+
import { useId, useState } from 'react';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var LABELS = {
|
|
9
|
+
invalid: "Enter the colour as # and six hex digits, such as #5b3df5.",
|
|
10
|
+
missing: "Choose a colour.",
|
|
11
|
+
picker: (label) => `Pick the ${label} colour`,
|
|
12
|
+
placeholder: "#rrggbb"
|
|
13
|
+
};
|
|
14
|
+
var PICKER_START = "#000000";
|
|
15
|
+
function ColorField({
|
|
16
|
+
label,
|
|
17
|
+
value,
|
|
18
|
+
onChange,
|
|
19
|
+
required = false,
|
|
20
|
+
optional,
|
|
21
|
+
helper,
|
|
22
|
+
error,
|
|
23
|
+
disabled = false,
|
|
24
|
+
name,
|
|
25
|
+
id,
|
|
26
|
+
className,
|
|
27
|
+
labels
|
|
28
|
+
}) {
|
|
29
|
+
const text = { ...LABELS, ...labels };
|
|
30
|
+
const autoId = useId();
|
|
31
|
+
const fieldId = id ?? autoId;
|
|
32
|
+
const committed = normalizeHex(value) ?? "";
|
|
33
|
+
const [draft, setDraft] = useState(committed);
|
|
34
|
+
const [seen, setSeen] = useState(committed);
|
|
35
|
+
const [left, setLeft] = useState(false);
|
|
36
|
+
if (committed !== seen) {
|
|
37
|
+
setSeen(committed);
|
|
38
|
+
if ((normalizeHex(draft) ?? "") !== committed) {
|
|
39
|
+
setDraft(committed);
|
|
40
|
+
setLeft(false);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const typed = draft.trim();
|
|
44
|
+
const reads = normalizeHex(typed);
|
|
45
|
+
const refusal = typed === "" ? required ? text.missing : null : reads === null ? text.invalid : null;
|
|
46
|
+
const shown = error ?? (left ? refusal : null);
|
|
47
|
+
const swatch = reads ?? (typed === "" ? null : committed || null);
|
|
48
|
+
const take = (next) => {
|
|
49
|
+
setDraft(next);
|
|
50
|
+
const colour = normalizeHex(next);
|
|
51
|
+
if (colour !== null) onChange(colour);
|
|
52
|
+
else if (next.trim() === "" && !required) onChange("");
|
|
53
|
+
};
|
|
54
|
+
const settle = () => {
|
|
55
|
+
setLeft(true);
|
|
56
|
+
if (reads !== null && reads !== draft) setDraft(reads);
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
FormField,
|
|
60
|
+
{
|
|
61
|
+
label,
|
|
62
|
+
htmlFor: fieldId,
|
|
63
|
+
required,
|
|
64
|
+
optional,
|
|
65
|
+
helper,
|
|
66
|
+
error: shown ?? void 0,
|
|
67
|
+
className: cx("crewlet-color-field", className),
|
|
68
|
+
children: (field) => /* @__PURE__ */ jsxs("span", { className: "crewlet-color-field__row", children: [
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
"span",
|
|
71
|
+
{
|
|
72
|
+
className: cx("crewlet-color-field__swatch", swatch === null && "is-empty", disabled && "is-disabled"),
|
|
73
|
+
style: swatch ? { "--crewlet-color-field-value": swatch } : void 0,
|
|
74
|
+
children: /* @__PURE__ */ jsx(
|
|
75
|
+
"input",
|
|
76
|
+
{
|
|
77
|
+
type: "color",
|
|
78
|
+
className: "crewlet-color-field__picker",
|
|
79
|
+
value: swatch ?? PICKER_START,
|
|
80
|
+
disabled,
|
|
81
|
+
"aria-label": text.picker(label),
|
|
82
|
+
onChange: (event) => {
|
|
83
|
+
setLeft(true);
|
|
84
|
+
take(event.target.value);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ jsx(
|
|
91
|
+
Input,
|
|
92
|
+
{
|
|
93
|
+
id: field.id,
|
|
94
|
+
name,
|
|
95
|
+
appearance: "reference",
|
|
96
|
+
width: "sm",
|
|
97
|
+
value: draft,
|
|
98
|
+
placeholder: text.placeholder,
|
|
99
|
+
maxLength: 9,
|
|
100
|
+
spellCheck: false,
|
|
101
|
+
autoComplete: "off",
|
|
102
|
+
autoCapitalize: "off",
|
|
103
|
+
disabled,
|
|
104
|
+
error: Boolean(shown),
|
|
105
|
+
"aria-describedby": field.describedBy,
|
|
106
|
+
"aria-required": required || void 0,
|
|
107
|
+
onChange: (event) => take(event.target.value),
|
|
108
|
+
onBlur: settle,
|
|
109
|
+
onKeyDown: (event) => {
|
|
110
|
+
if (event.key === "Enter") settle();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
] })
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export { ColorField };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Copyable } from './chunk-7SHAFLEX.js';
|
|
2
|
+
import { normalizeHex } from './chunk-UZMNR366.js';
|
|
3
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
+
import './ColorSwatch-DNMUFHNS.css';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var LABELS = {
|
|
8
|
+
copy: (name) => `Copy the ${name} colour`,
|
|
9
|
+
copied: (hex) => `${hex} copied to the clipboard`,
|
|
10
|
+
failed: "The browser refused the clipboard",
|
|
11
|
+
empty: "Not set"
|
|
12
|
+
};
|
|
13
|
+
function ColorSwatch({
|
|
14
|
+
name,
|
|
15
|
+
value,
|
|
16
|
+
description,
|
|
17
|
+
copyable = true,
|
|
18
|
+
size = "md",
|
|
19
|
+
className,
|
|
20
|
+
labels
|
|
21
|
+
}) {
|
|
22
|
+
const text = { ...LABELS, ...labels };
|
|
23
|
+
const hex = normalizeHex(value);
|
|
24
|
+
const chip = hex ? { "--crewlet-color-swatch-value": hex } : void 0;
|
|
25
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-color-swatch", `crewlet-color-swatch--${size}`, className), children: [
|
|
26
|
+
/* @__PURE__ */ jsx("span", { className: cx("crewlet-color-swatch__chip", !hex && "is-empty"), style: chip, "aria-hidden": "true" }),
|
|
27
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-color-swatch__words", children: [
|
|
28
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-color-swatch__name", children: name }),
|
|
29
|
+
description ? /* @__PURE__ */ jsx("span", { className: "crewlet-color-swatch__description", children: description }) : null,
|
|
30
|
+
hex ? copyable ? /* @__PURE__ */ jsx(
|
|
31
|
+
Copyable,
|
|
32
|
+
{
|
|
33
|
+
variant: "inline",
|
|
34
|
+
monospace: true,
|
|
35
|
+
value: hex,
|
|
36
|
+
ariaLabel: text.copy(name),
|
|
37
|
+
title: text.copy(name),
|
|
38
|
+
copiedMessage: text.copied(hex),
|
|
39
|
+
failedMessage: text.failed,
|
|
40
|
+
failedResetMs: null,
|
|
41
|
+
className: "crewlet-color-swatch__value"
|
|
42
|
+
}
|
|
43
|
+
) : /* @__PURE__ */ jsx("span", { className: "crewlet-color-swatch__value crewlet-color-swatch__value--plain", children: hex }) : /* @__PURE__ */ jsx("span", { className: "crewlet-color-swatch__empty", children: text.empty })
|
|
44
|
+
] })
|
|
45
|
+
] });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { ColorSwatch };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Modal } from './chunk-YCC2S7DF.js';
|
|
1
2
|
import { useClipboard } from './chunk-STJ7QBC3.js';
|
|
2
|
-
import { Modal } from './chunk-6AKG2VLR.js';
|
|
3
|
-
import { Checkbox } from './chunk-YUAQSWNW.js';
|
|
4
3
|
import { EmptyValue } from './chunk-EUCC37WY.js';
|
|
5
4
|
import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
|
|
6
|
-
import {
|
|
5
|
+
import { Checkbox } from './chunk-NCHKKYPQ.js';
|
|
6
|
+
import { Menu } from './chunk-TMM32U7D.js';
|
|
7
7
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
8
8
|
import { IconButton } from './chunk-LACA4JGC.js';
|
|
9
9
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
@@ -6,10 +6,10 @@ import { ChangeMark } from './chunk-66X5WDKE.js';
|
|
|
6
6
|
import { isEmptyValue, displayText, ratingMax, findPerson, findOption, statusTone, editText, textMax, sheetLabels, normalizeValue, sameValue, spokenText, drawnColumns, fitSamples, fittedWidth, columnWidth, SHEET_COLUMN_BOUNDS, sortRows, SHEET_ROW_HEIGHT, cellKey, columnOffsets, SHEET_ROW_NUMBER_WIDTH, rangeOf, presenceByCell, presenceByRow, presenceByColumn, scrollToRow, planClear, visibleRows, cellDescription, nextSort, rowName, inRange, hasPrevious, flagText, toTSV, planPaste, parseTSV, isMod, moveFrom, isTypingKey, editorSide, optionHue, parseText, liveOptions, checkValue } from './chunk-LFSIKGRQ.js';
|
|
7
7
|
import { presenceLabels } from './chunk-Z7JYG5TF.js';
|
|
8
8
|
import { Popover } from './chunk-KHJIEPZV.js';
|
|
9
|
-
import { StatusDot } from './chunk-WIATRXEJ.js';
|
|
10
9
|
import { Tooltip } from './chunk-I33UIUZD.js';
|
|
10
|
+
import { StatusDot } from './chunk-WIATRXEJ.js';
|
|
11
11
|
import { Avatar } from './chunk-PZKHBB7D.js';
|
|
12
|
-
import { Menu } from './chunk-
|
|
12
|
+
import { Menu } from './chunk-TMM32U7D.js';
|
|
13
13
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
14
14
|
import { isComposing } from './chunk-H5XTJ7GJ.js';
|
|
15
15
|
import { IconButton } from './chunk-LACA4JGC.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Toolbar } from './chunk-NR4CPM4T.js';
|
|
2
|
-
import { ShortcutTip } from './chunk-
|
|
2
|
+
import { ShortcutTip } from './chunk-D7Q5MQRF.js';
|
|
3
3
|
import { IconButton } from './chunk-LACA4JGC.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './CanvasToolbar-EM5EVZED.css';
|
|
@@ -4,7 +4,7 @@ import { Button } from './chunk-OG6CL3EB.js';
|
|
|
4
4
|
import { focusables, useModalLayer, useBodyScrollLock } from './chunk-H5XTJ7GJ.js';
|
|
5
5
|
import { IconButton } from './chunk-LACA4JGC.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
|
-
import './Modal-
|
|
7
|
+
import './Modal-3HMP7WAZ.css';
|
|
8
8
|
import { useId, useRef, useCallback } from 'react';
|
|
9
9
|
import { createPortal } from 'react-dom';
|
|
10
10
|
import { ChevronLeftGlyph, XGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -42,6 +42,7 @@ function ModalFrame({
|
|
|
42
42
|
variant = "dialog",
|
|
43
43
|
shape = "framed",
|
|
44
44
|
placement,
|
|
45
|
+
phoneSheet = false,
|
|
45
46
|
role = "dialog",
|
|
46
47
|
dismissable = true,
|
|
47
48
|
closeOnBackdrop = true,
|
|
@@ -65,6 +66,7 @@ function ModalFrame({
|
|
|
65
66
|
const banded = !prompt;
|
|
66
67
|
const sheet = variant === "sheet";
|
|
67
68
|
const place = placement ?? (prompt ? "center" : "top");
|
|
69
|
+
const phone = phoneSheet && variant === "dialog" && !prompt;
|
|
68
70
|
const frame = useRef(null);
|
|
69
71
|
const body = useRef(null);
|
|
70
72
|
const foot = useRef(null);
|
|
@@ -184,6 +186,7 @@ function ModalFrame({
|
|
|
184
186
|
"crewlet-modal-overlay",
|
|
185
187
|
`crewlet-modal-overlay--${variant}`,
|
|
186
188
|
`crewlet-modal-overlay--${place}`,
|
|
189
|
+
phone && "crewlet-modal-overlay--phone-sheet",
|
|
187
190
|
backdrop === "clear" && "crewlet-modal-overlay--clear",
|
|
188
191
|
// Fixed against the window, absolute inside a LayerHost: a fullscreen
|
|
189
192
|
// container paints only its own subtree, so a surface drawn there
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
|
+
import './BrandChip-SQWBC2WU.css';
|
|
3
|
+
import { SwatchBookGlyph, ChevronRightGlyph } from '@crewlethq/icons/glyphs';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function BrandChip({ href, label, mark, className, ...rest }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs("a", { ...rest, href, className: cx("crewlet-brand-chip", className), children: [
|
|
8
|
+
/* @__PURE__ */ jsx("span", { className: cx("crewlet-brand-chip__mark", !mark && "crewlet-brand-chip__mark--glyph"), "aria-hidden": "true", children: mark ? /* @__PURE__ */ jsx("img", { src: mark, alt: "", className: "crewlet-brand-chip__image", draggable: false }) : /* @__PURE__ */ jsx(SwatchBookGlyph, { size: "sm" }) }),
|
|
9
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-chip__label", children: label }),
|
|
10
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-brand-chip__chevron", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronRightGlyph, { size: "xs" }) })
|
|
11
|
+
] });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { BrandChip };
|
|
@@ -23,7 +23,10 @@ export * from '../AsideLayout/index.js';
|
|
|
23
23
|
export * from '../AuthLayout/index.js';
|
|
24
24
|
export * from '../Avatar/index.js';
|
|
25
25
|
export * from '../AvatarPicker/index.js';
|
|
26
|
+
export * from '../BrandChip/index.js';
|
|
26
27
|
export * from '../BrandLockup/index.js';
|
|
28
|
+
export * from '../BrandSample/index.js';
|
|
29
|
+
export * from '../BrandScope/index.js';
|
|
27
30
|
export * from '../Breadcrumb/index.js';
|
|
28
31
|
export * from '../Button/index.js';
|
|
29
32
|
export * from '../CalendarGrid/index.js';
|
|
@@ -42,6 +45,8 @@ export * from '../Checkbox/index.js';
|
|
|
42
45
|
export * from '../ChoiceButtons/index.js';
|
|
43
46
|
export * from '../ChoiceList/index.js';
|
|
44
47
|
export * from '../CodeBlock/index.js';
|
|
48
|
+
export * from '../ColorField/index.js';
|
|
49
|
+
export * from '../ColorSwatch/index.js';
|
|
45
50
|
export * from '../Combobox/index.js';
|
|
46
51
|
export * from '../CommandPalette/index.js';
|
|
47
52
|
export * from '../CommentThread/index.js';
|
|
@@ -49,6 +54,7 @@ export * from '../Composer/index.js';
|
|
|
49
54
|
export * from '../ConfirmField/index.js';
|
|
50
55
|
export * from '../ConflictNote/index.js';
|
|
51
56
|
export * from '../Container/index.js';
|
|
57
|
+
export * from '../ContrastBadge/index.js';
|
|
52
58
|
export * from '../Copyable/index.js';
|
|
53
59
|
export * from '../Count/index.js';
|
|
54
60
|
export * from '../CursorFlag/index.js';
|
|
@@ -76,6 +82,7 @@ export * from '../FactList/index.js';
|
|
|
76
82
|
export * from '../FileDrop/index.js';
|
|
77
83
|
export * from '../FilterChip/index.js';
|
|
78
84
|
export * from '../FindingList/index.js';
|
|
85
|
+
export * from '../FolderTile/index.js';
|
|
79
86
|
export * from '../FollowBanner/index.js';
|
|
80
87
|
export * from '../FrameProtocol/index.js';
|
|
81
88
|
export * from '../Fullscreen/index.js';
|
|
@@ -103,6 +110,7 @@ export * from '../Listbox/index.js';
|
|
|
103
110
|
export * from '../LiveCursor/index.js';
|
|
104
111
|
export * from '../LivePreview/index.js';
|
|
105
112
|
export * from '../LockedLabel/index.js';
|
|
113
|
+
export * from '../LogoSlot/index.js';
|
|
106
114
|
export * from '../Markdown/index.js';
|
|
107
115
|
export * from '../MarkdownEditor/index.js';
|
|
108
116
|
export * from '../MediaMatch/index.js';
|
|
@@ -145,6 +153,7 @@ export * from '../SectionFrame/index.js';
|
|
|
145
153
|
export * from '../SegmentedControl/index.js';
|
|
146
154
|
export * from '../SegmentedMeter/index.js';
|
|
147
155
|
export * from '../Select/index.js';
|
|
156
|
+
export * from '../SelectionBar/index.js';
|
|
148
157
|
export * from '../SettingsTable/index.js';
|
|
149
158
|
export * from '../ShareDialog/index.js';
|
|
150
159
|
export * from '../SheetColumnEditor/index.js';
|
|
@@ -186,6 +195,7 @@ export * from '../Tooltip/index.js';
|
|
|
186
195
|
export * from '../Tree/index.js';
|
|
187
196
|
export * from '../TreeCanvas/index.js';
|
|
188
197
|
export * from '../TreeGrid/index.js';
|
|
198
|
+
export * from '../TypeSpecimen/index.js';
|
|
189
199
|
export * from '../VersionCompare/index.js';
|
|
190
200
|
export * from '../VersionTimeline/index.js';
|
|
191
201
|
export * from '../VisuallyHidden/index.js';
|