@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.
Files changed (190) hide show
  1. package/README.md +60 -0
  2. package/dist/AgentHandoffPanel/index.js +4 -4
  3. package/dist/AppShell/index.js +4 -4
  4. package/dist/{AppShell-5P575KYA.css → AppShell-BIUFNT3J.css} +30 -11
  5. package/dist/ArrangeList/index.js +4 -4
  6. package/dist/ArtifactBar/index.js +9 -9
  7. package/dist/{ArtifactBar-6PGWGKN2.css → ArtifactBar-UMZCTARR.css} +9 -0
  8. package/dist/ArtifactCard/ArtifactCard.d.ts +30 -1
  9. package/dist/ArtifactCard/index.js +12 -5
  10. package/dist/{ArtifactCard-OGTMO2KI.css → ArtifactCard-SOB63NV5.css} +72 -1
  11. package/dist/ArtifactCover/index.js +2 -2
  12. package/dist/ArtifactIcon/index.js +2 -2
  13. package/dist/ArtifactKindGlyph/ArtifactKindGlyph.d.ts +7 -3
  14. package/dist/ArtifactKindGlyph/index.js +1 -1
  15. package/dist/ArtifactKindIllustration/ArtifactKindIllustration.d.ts +4 -3
  16. package/dist/ArtifactKindIllustration/index.js +1 -1
  17. package/dist/{ArtifactKinds-CVD3FCYO.css → ArtifactKinds-O3CALPVX.css} +1 -0
  18. package/dist/ArtifactMakeRow/index.js +2 -2
  19. package/dist/ArtifactNameCell/ArtifactNameCell.d.ts +14 -1
  20. package/dist/ArtifactNameCell/index.d.ts +1 -1
  21. package/dist/ArtifactNameCell/index.js +2 -2
  22. package/dist/{ArtifactNameCell-RTVP4LO4.css → ArtifactNameCell-3AHLUSE5.css} +12 -0
  23. package/dist/AvatarPicker/index.js +7 -7
  24. package/dist/BrandChip/BrandChip.d.ts +26 -0
  25. package/dist/BrandChip/index.d.ts +3 -0
  26. package/dist/BrandChip/index.js +2 -0
  27. package/dist/BrandChip-SQWBC2WU.css +81 -0
  28. package/dist/BrandSample/BrandSample.d.ts +75 -0
  29. package/dist/BrandSample/index.d.ts +3 -0
  30. package/dist/BrandSample/index.js +5 -0
  31. package/dist/BrandSample-G5V7GKR2.css +185 -0
  32. package/dist/BrandScope/BrandScope.d.ts +61 -0
  33. package/dist/BrandScope/index.d.ts +4 -0
  34. package/dist/BrandScope/index.js +4 -0
  35. package/dist/BrandScope-H2KZHGT7.css +29 -0
  36. package/dist/Canvas/index.js +2 -2
  37. package/dist/CanvasBoard/index.js +4 -4
  38. package/dist/CanvasToolbar/index.js +3 -3
  39. package/dist/Checkbox/Checkbox.d.ts +8 -0
  40. package/dist/Checkbox/index.js +3 -3
  41. package/dist/{Checkbox-ALWG3WV2.css → Checkbox-MB22OW6P.css} +18 -0
  42. package/dist/ColorField/ColorField.d.ts +63 -0
  43. package/dist/ColorField/index.d.ts +3 -0
  44. package/dist/ColorField/index.js +11 -0
  45. package/dist/ColorField-2OIOWT3Z.css +68 -0
  46. package/dist/ColorSwatch/ColorSwatch.d.ts +43 -0
  47. package/dist/ColorSwatch/index.d.ts +3 -0
  48. package/dist/ColorSwatch/index.js +9 -0
  49. package/dist/ColorSwatch-DNMUFHNS.css +83 -0
  50. package/dist/Combobox/Combobox.d.ts +45 -4
  51. package/dist/Combobox/index.d.ts +1 -1
  52. package/dist/Combobox/index.js +3 -3
  53. package/dist/Combobox-GBCWXWEB.css +163 -0
  54. package/dist/CommandPalette/index.js +5 -5
  55. package/dist/CommentThread/index.js +5 -5
  56. package/dist/Composer/index.js +3 -3
  57. package/dist/ConfirmField/index.js +3 -3
  58. package/dist/ContrastBadge/ContrastBadge.d.ts +63 -0
  59. package/dist/ContrastBadge/index.d.ts +3 -0
  60. package/dist/ContrastBadge/index.js +6 -0
  61. package/dist/ContrastBadge-CBZPGG3G.css +47 -0
  62. package/dist/DataGrid/DataGrid.d.ts +28 -1
  63. package/dist/DataGrid/index.js +8 -1
  64. package/dist/{DataGrid-AQKPJD7W.css → DataGrid-VNGQESJA.css} +15 -0
  65. package/dist/DataTable/index.js +6 -6
  66. package/dist/DataView/index.js +10 -10
  67. package/dist/DateTimePicker/index.js +3 -3
  68. package/dist/DocTabsEditor/index.js +4 -4
  69. package/dist/{Editor-6U4BJ25W.js → Editor-MLGK3KOG.js} +3 -3
  70. package/dist/FolderTile/FolderTile.d.ts +91 -0
  71. package/dist/FolderTile/index.d.ts +3 -0
  72. package/dist/FolderTile/index.js +7 -0
  73. package/dist/FolderTile-FDT5Y63Z.css +231 -0
  74. package/dist/HuePicker/index.js +6 -6
  75. package/dist/Input/index.js +2 -2
  76. package/dist/LinkInterstitial/index.js +3 -3
  77. package/dist/ListInput/index.js +3 -3
  78. package/dist/LogoSlot/LogoSlot.d.ts +84 -0
  79. package/dist/LogoSlot/index.d.ts +3 -0
  80. package/dist/LogoSlot/index.js +9 -0
  81. package/dist/LogoSlot-T2UFOJXU.css +159 -0
  82. package/dist/MarkdownEditor/index.js +6 -6
  83. package/dist/Menu/index.js +2 -2
  84. package/dist/MergeConflicts/index.js +6 -6
  85. package/dist/Modal/Modal.d.ts +13 -0
  86. package/dist/Modal/index.js +2 -2
  87. package/dist/{Modal-TOEWHDCQ.css → Modal-3HMP7WAZ.css} +30 -0
  88. package/dist/OrgTable/index.js +1 -1
  89. package/dist/PresenterView/index.js +3 -3
  90. package/dist/PrincipalPicker/index.js +4 -4
  91. package/dist/RichEditor/index.js +1 -1
  92. package/dist/SegmentedControl/index.js +5 -5
  93. package/dist/Select/index.js +2 -2
  94. package/dist/SelectionBar/SelectionBar.d.ts +50 -0
  95. package/dist/SelectionBar/index.d.ts +3 -0
  96. package/dist/SelectionBar/index.js +9 -0
  97. package/dist/SelectionBar-XPWKUOSC.css +61 -0
  98. package/dist/ShareDialog/index.js +6 -6
  99. package/dist/SheetColumnEditor/index.js +10 -10
  100. package/dist/SheetGrid/index.js +4 -4
  101. package/dist/SlideFilmstrip/index.js +3 -3
  102. package/dist/Switcher/index.js +4 -4
  103. package/dist/Tabs/index.js +4 -4
  104. package/dist/TagsInput/index.js +2 -2
  105. package/dist/ThemeGallery/ThemeGallery.d.ts +13 -2
  106. package/dist/ThemeGallery/index.js +3 -1
  107. package/dist/{ThemeGallery-X35Y25EX.css → ThemeGallery-UEFZRT6W.css} +21 -0
  108. package/dist/ThemeSwitcher/index.js +6 -6
  109. package/dist/TimeWindowPicker/index.js +6 -6
  110. package/dist/TreeCanvas/index.js +3 -3
  111. package/dist/TreeGrid/index.js +1 -1
  112. package/dist/TypeSpecimen/TypeSpecimen.d.ts +49 -0
  113. package/dist/TypeSpecimen/index.d.ts +3 -0
  114. package/dist/TypeSpecimen/index.js +3 -0
  115. package/dist/TypeSpecimen-WK6YNHL7.css +96 -0
  116. package/dist/VersionCompare/index.js +6 -6
  117. package/dist/{chunk-RBUA7ZNK.js → chunk-34RMTXDZ.js} +1 -1
  118. package/dist/{chunk-YFUG6ARA.js → chunk-3QSKDZR5.js} +1 -1
  119. package/dist/chunk-5SGHW42B.js +23 -0
  120. package/dist/{chunk-R2EOET5Q.js → chunk-627KFRON.js} +2 -2
  121. package/dist/{chunk-SMVWDO72.js → chunk-6FVGSWLS.js} +1 -1
  122. package/dist/{chunk-ILDNJHRU.js → chunk-AVL52EME.js} +1 -1
  123. package/dist/chunk-B235ANDO.js +66 -0
  124. package/dist/{chunk-MZ3QFQDL.js → chunk-CAVWDJF4.js} +1 -1
  125. package/dist/{chunk-BLQRC7QR.js → chunk-D6MTBXAJ.js} +2 -2
  126. package/dist/{chunk-2MYSESZF.js → chunk-FB5CFQTG.js} +82 -12
  127. package/dist/{chunk-KNMQS3JY.js → chunk-GHY63X4C.js} +1 -1
  128. package/dist/{chunk-DY4DQ7EB.js → chunk-GP4YWZFO.js} +1 -1
  129. package/dist/{chunk-NRWJUGNA.js → chunk-H55D66IK.js} +1 -1
  130. package/dist/{chunk-JNFTFAPN.js → chunk-H7NMJ5AI.js} +2 -2
  131. package/dist/{chunk-GKRPPSWY.js → chunk-ILFEWRLG.js} +1 -1
  132. package/dist/chunk-ITI2Z44C.js +139 -0
  133. package/dist/{chunk-P5VGSVWG.js → chunk-J24Q4HTD.js} +17 -8
  134. package/dist/{chunk-2FDTSARB.js → chunk-JFDIMO3A.js} +2 -2
  135. package/dist/chunk-JKAFEFFC.js +44 -0
  136. package/dist/{chunk-6HYPQ5PY.js → chunk-JWNYI7UD.js} +1 -1
  137. package/dist/{chunk-WT5UPL6P.js → chunk-KHZYAEGZ.js} +1 -1
  138. package/dist/chunk-M4QM477B.js +80 -0
  139. package/dist/{chunk-YUDUYMZB.js → chunk-MIEBOO7Y.js} +2 -2
  140. package/dist/{chunk-IVA7ZWDS.js → chunk-NAWUXCBC.js} +5 -5
  141. package/dist/{chunk-YUAQSWNW.js → chunk-NCHKKYPQ.js} +6 -3
  142. package/dist/chunk-OCRVY42T.js +50 -0
  143. package/dist/chunk-OEEYL2CM.js +73 -0
  144. package/dist/chunk-P3OIM6OC.js +38 -0
  145. package/dist/{chunk-FWBKMPNR.js → chunk-P3QWT5VR.js} +1 -1
  146. package/dist/chunk-P5JBDHWC.js +206 -0
  147. package/dist/{chunk-WQJSOTEO.js → chunk-PGR2PKH6.js} +1 -1
  148. package/dist/{chunk-U2XAJONO.js → chunk-Q44X36QC.js} +80 -36
  149. package/dist/{chunk-R2IBCEU6.js → chunk-R3BA3C4Y.js} +2 -2
  150. package/dist/{chunk-HDMLHJFI.js → chunk-R6R2UHVG.js} +4 -4
  151. package/dist/{chunk-VBEMIZIJ.js → chunk-RFPCHMSX.js} +1 -1
  152. package/dist/{chunk-CE2THTQR.js → chunk-RSKW25Y5.js} +4 -3
  153. package/dist/{chunk-UBZDYOCA.js → chunk-RV6XB5UV.js} +12 -1
  154. package/dist/{chunk-LXCRHVMZ.js → chunk-SEPSXOGJ.js} +1 -1
  155. package/dist/{chunk-K2FNW3MK.js → chunk-SQ4JFHO7.js} +1 -1
  156. package/dist/{chunk-F45VSK2M.js → chunk-SS4XCUUJ.js} +2 -2
  157. package/dist/{chunk-E4BOVKNJ.js → chunk-UTESMBPL.js} +5 -3
  158. package/dist/chunk-UZMNR366.js +9 -0
  159. package/dist/{chunk-GQXVLFQB.js → chunk-V7GOOXPK.js} +1 -1
  160. package/dist/{chunk-KMNY3KEB.js → chunk-VBIM6HFC.js} +2 -2
  161. package/dist/{chunk-Z5RZXVQ7.js → chunk-VN47PYUF.js} +7 -7
  162. package/dist/{chunk-CNTBUK24.js → chunk-VP2ODUCC.js} +2 -2
  163. package/dist/{chunk-VIAQW6RK.js → chunk-VTSJMDGP.js} +5 -5
  164. package/dist/chunk-W6FOEBIL.js +119 -0
  165. package/dist/chunk-WLSEAIVC.js +48 -0
  166. package/dist/{chunk-DETVVKAH.js → chunk-WQ7S7CKZ.js} +3 -3
  167. package/dist/{chunk-OKUULQ22.js → chunk-WXOYHVWG.js} +2 -2
  168. package/dist/{chunk-NILOJV62.js → chunk-X4NIE7CI.js} +1 -1
  169. package/dist/{chunk-PZZHO6OS.js → chunk-XS2FJVMT.js} +1 -1
  170. package/dist/{chunk-6AKG2VLR.js → chunk-YCC2S7DF.js} +4 -1
  171. package/dist/{chunk-5CLWBPB5.js → chunk-ZCIL5IHU.js} +1 -1
  172. package/dist/chunk-ZH77BXMA.js +14 -0
  173. package/dist/generated/index.d.ts +10 -0
  174. package/dist/generated/index.js +101 -89
  175. package/dist/index.js +101 -89
  176. package/dist/styles.css +1370 -22
  177. package/dist/utils/fontFamily.d.ts +29 -0
  178. package/dist/utils/hexColour.d.ts +12 -0
  179. package/package.json +3 -3
  180. package/scripts/check-css-variables.mjs +18 -2
  181. package/dist/Combobox-YDONYDTM.css +0 -81
  182. package/dist/chunk-LOBV4QON.js +0 -137
  183. package/dist/{chunk-245IXG5P.js → chunk-3WMOEGEL.js} +0 -0
  184. package/dist/{chunk-ICPQIAD6.js → chunk-D7Q5MQRF.js} +1 -1
  185. package/dist/{chunk-ISDEXIXH.js → chunk-E6HXFFWO.js} +1 -1
  186. package/dist/{chunk-D4EOPIFL.js → chunk-EXRRTKWT.js} +1 -1
  187. package/dist/{chunk-S6J3EWDP.js → chunk-SXBJMBSV.js} +1 -1
  188. package/dist/{chunk-3JIZ2A6K.js → chunk-TMM32U7D.js} +1 -1
  189. package/dist/{chunk-LD3GEVQU.js → chunk-XQZ6EWOE.js} +1 -1
  190. package/dist/{chunk-K77LKW3X.js → chunk-ZFM5L7M4.js} +2 -2
@@ -1,9 +1,10 @@
1
+ import { Checkbox } from './chunk-NCHKKYPQ.js';
1
2
  import { EmptyState } from './chunk-PPUR46MK.js';
2
3
  import { useMediaMatch } from './chunk-RTPQDNW3.js';
3
4
  import { Button } from './chunk-OG6CL3EB.js';
4
5
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
5
6
  import { cx } from './chunk-ODEQTPFM.js';
6
- import './DataGrid-AQKPJD7W.css';
7
+ import './DataGrid-VNGQESJA.css';
7
8
  import { useId, useRef, useState, useMemo, useCallback, useLayoutEffect, useImperativeHandle } from 'react';
8
9
  import { breakpoint } from '@crewlethq/tokens';
9
10
  import { ChevronDownGlyph, ChevronUpGlyph } from '@crewlethq/icons/glyphs';
@@ -50,8 +51,10 @@ var LABELS = {
50
51
  hiddenToFit: (names) => `Hidden to fit: ${names}`,
51
52
  loadMore: "Load more",
52
53
  showEveryColumn: "Show every column",
53
- and: "and"
54
+ and: "and",
55
+ selectAll: "Select every row"
54
56
  };
57
+ var SELECT_COLUMN = "crewlet-select";
55
58
  function parseGridSort(raw) {
56
59
  if (!raw) return null;
57
60
  return raw.startsWith("-") ? { key: raw.slice(1), desc: true } : { key: raw, desc: false };
@@ -103,7 +106,7 @@ function overflowing(wrap) {
103
106
  const inner = wrap.getBoundingClientRect().left + wrap.clientLeft + wrap.clientWidth;
104
107
  return last.getBoundingClientRect().right > inner + 0.5;
105
108
  }
106
- function squeezed(wrap, visible) {
109
+ function squeezed(wrap, visible, leading = 0) {
107
110
  const heads = wrap.querySelector(":scope > .crewlet-data-grid__head")?.children;
108
111
  if (!heads) return false;
109
112
  const cap = wrap.clientWidth * SHRINK_SHARE - 1;
@@ -114,10 +117,10 @@ function squeezed(wrap, visible) {
114
117
  for (let i = 0; i < visible.length; i++) {
115
118
  const column = visible[i];
116
119
  if (!column.shrink || column.width) continue;
117
- const head = heads[i];
120
+ const head = heads[i + leading];
118
121
  if (!head || head.getBoundingClientRect().width >= cap) continue;
119
122
  for (const row of rows) {
120
- const cell = row.querySelectorAll(":scope > .crewlet-data-grid__cell")[i];
123
+ const cell = row.querySelectorAll(":scope > .crewlet-data-grid__cell")[i + leading];
121
124
  if (cell && cutShort(cell)) return true;
122
125
  }
123
126
  }
@@ -145,6 +148,7 @@ function DataGrid({
145
148
  onRowActivate,
146
149
  rowHref,
147
150
  isSelected,
151
+ selection,
148
152
  isFailed,
149
153
  sort: sortRaw = "",
150
154
  onSortChange,
@@ -208,6 +212,70 @@ function DataGrid({
208
212
  if (bands) return bands.flatMap(walk);
209
213
  return sortRows(rows ?? []);
210
214
  }, [bands, rows, sortRows]);
215
+ const anchor = useRef(null);
216
+ const pickable = useMemo(
217
+ () => selection ? flat.filter((row) => selection.isSelectable?.(row) ?? true) : [],
218
+ [flat, selection]
219
+ );
220
+ const pickedCount = selection ? pickable.filter((row) => selection.selected.has(rowKey(row))).length : 0;
221
+ const allPicked = pickable.length > 0 && pickedCount === pickable.length;
222
+ const pick = (row, on, range) => {
223
+ if (!selection) return;
224
+ const key = rowKey(row);
225
+ const next = new Set(selection.selected);
226
+ const to = flat.findIndex((r) => rowKey(r) === key);
227
+ const from = range && anchor.current !== null ? flat.findIndex((r) => rowKey(r) === anchor.current) : -1;
228
+ const span = from >= 0 && to >= 0 ? flat.slice(Math.min(from, to), Math.max(from, to) + 1) : [row];
229
+ for (const r of span) {
230
+ if (selection.isSelectable?.(r) === false) continue;
231
+ if (on) next.add(rowKey(r));
232
+ else next.delete(rowKey(r));
233
+ }
234
+ anchor.current = key;
235
+ selection.onChange(next);
236
+ };
237
+ const pickAll = () => {
238
+ if (!selection) return;
239
+ const next = new Set(selection.selected);
240
+ for (const row of pickable) {
241
+ if (allPicked) next.delete(rowKey(row));
242
+ else next.add(rowKey(row));
243
+ }
244
+ anchor.current = null;
245
+ selection.onChange(next);
246
+ };
247
+ const selectColumn = selection ? {
248
+ key: SELECT_COLUMN,
249
+ header: /* @__PURE__ */ jsx(
250
+ Checkbox,
251
+ {
252
+ hideLabel: true,
253
+ label: text.selectAll,
254
+ checked: allPicked,
255
+ indeterminate: pickedCount > 0 && !allPicked,
256
+ disabled: pickable.length === 0,
257
+ onChange: pickAll
258
+ }
259
+ ),
260
+ cell: (row) => (
261
+ // ABOVE THE ROW'S LINK, so the press lands on the box.
262
+ /* @__PURE__ */ jsx("span", { className: "crewlet-data-grid__select", "data-above-row": true, children: /* @__PURE__ */ jsx(
263
+ Checkbox,
264
+ {
265
+ hideLabel: true,
266
+ label: selection.rowLabel(row),
267
+ checked: selection.selected.has(rowKey(row)),
268
+ disabled: selection.isSelectable?.(row) === false,
269
+ onChange: (event) => pick(row, event.target.checked, event.nativeEvent.shiftKey === true)
270
+ }
271
+ ) })
272
+ ),
273
+ action: true,
274
+ phoneLead: true,
275
+ width: "calc(var(--size-target-min) + var(--spacing-3) * 2)"
276
+ } : null;
277
+ const drawnColumns = selectColumn ? [selectColumn, ...visibleColumns] : visibleColumns;
278
+ const leading = drawnColumns.length - visibleColumns.length;
211
279
  const [boxWidth, setBoxWidth] = useState(0);
212
280
  useLayoutEffect(() => {
213
281
  if (!wrap || typeof ResizeObserver !== "function") return;
@@ -221,11 +289,11 @@ function DataGrid({
221
289
  const next = fitGridColumns({
222
290
  fit: fit.set === shownKeys ? fit : { ...NO_FIT, set: shownKeys },
223
291
  width: el.clientWidth,
224
- overflows: overflowing(el) || squeezed(el, visibleColumns),
292
+ overflows: overflowing(el) || squeezed(el, visibleColumns, leading),
225
293
  visible: visibleColumns
226
294
  });
227
295
  if (next !== null) setFit(next);
228
- }, [wrap, phone, fit, shownKeys, visibleColumns, flat, boxWidth]);
296
+ }, [wrap, phone, fit, shownKeys, visibleColumns, leading, flat, boxWidth]);
229
297
  useImperativeHandle(
230
298
  handleRef,
231
299
  () => ({
@@ -250,7 +318,7 @@ function DataGrid({
250
318
  else if (sort?.key === column.key && sort.desc) onSortChange("");
251
319
  else onSortChange(column.key);
252
320
  }
253
- const template = visibleColumns.map((c) => c.width ?? (c.shrink ? `fit-content(${SHRINK_CAP})` : `minmax(${c.floor ?? 0}, 1fr)`)).join(" ");
321
+ const template = drawnColumns.map((c) => c.width ?? (c.shrink ? `fit-content(${SHRINK_CAP})` : `minmax(${c.floor ?? 0}, 1fr)`)).join(" ");
254
322
  if (flat.length === 0 && !bands?.length && empty) {
255
323
  return /* @__PURE__ */ jsx("div", { className: cx("crewlet-data-grid", className), "data-flush": flush || void 0, children: /* @__PURE__ */ jsx(
256
324
  EmptyState,
@@ -269,6 +337,7 @@ function DataGrid({
269
337
  const at = index;
270
338
  const link = rowHref?.(row);
271
339
  const marked = Boolean(isSelected?.(row));
340
+ const picked = Boolean(selection?.selected.has(rowKey(row)));
272
341
  const rowId = `${gridId}-row-${at}`;
273
342
  const overlay = link !== void 0 ? (
274
343
  // eslint-disable-next-line jsx-a11y/anchor-has-content
@@ -292,7 +361,7 @@ function DataGrid({
292
361
  onClick: (e) => onRowActivate(row, e)
293
362
  }
294
363
  ) : null;
295
- const inner = visibleColumns.map((column, i) => /* @__PURE__ */ jsxs(
364
+ const inner = drawnColumns.map((column, i) => /* @__PURE__ */ jsxs(
296
365
  "span",
297
366
  {
298
367
  role: "cell",
@@ -319,6 +388,7 @@ function DataGrid({
319
388
  className: cx(
320
389
  "crewlet-data-grid__row",
321
390
  marked && "crewlet-data-grid__row--selected",
391
+ picked && "crewlet-data-grid__row--picked",
322
392
  isFailed?.(row) && "crewlet-data-grid__row--failed",
323
393
  cursor === at && "crewlet-data-grid__row--cursor"
324
394
  ),
@@ -335,13 +405,13 @@ function DataGrid({
335
405
  // A BAND IS ROWS OF THE TABLE: its head and its foot are rows of one
336
406
  // cell each across every column, and its own box is layout alone.
337
407
  /* @__PURE__ */ jsxs("div", { className: "crewlet-data-grid__band", role: "none", children: [
338
- /* @__PURE__ */ jsx("div", { className: "crewlet-data-grid__band-head", role: "row", children: /* @__PURE__ */ jsxs("span", { className: "crewlet-data-grid__band-cell", role: "rowheader", "aria-colspan": visibleColumns.length, children: [
408
+ /* @__PURE__ */ jsx("div", { className: "crewlet-data-grid__band-head", role: "row", children: /* @__PURE__ */ jsxs("span", { className: "crewlet-data-grid__band-cell", role: "rowheader", "aria-colspan": drawnColumns.length, children: [
339
409
  band.mark,
340
410
  /* @__PURE__ */ jsx("span", { className: "crewlet-data-grid__truncate", children: band.label }),
341
411
  /* @__PURE__ */ jsx("span", { className: "crewlet-data-grid__band-count", children: band.total != null && band.total !== loaded ? `${loaded} of ${band.total}` : loaded })
342
412
  ] }) }),
343
413
  band.bands ? band.bands.map((sub) => renderBand(sub)) : sortRows(band.rows).map(renderRow),
344
- band.footer && /* @__PURE__ */ jsx("div", { className: "crewlet-data-grid__band-foot", role: "row", children: /* @__PURE__ */ jsx("span", { className: "crewlet-data-grid__band-cell", role: "cell", "aria-colspan": visibleColumns.length, children: band.footer }) })
414
+ band.footer && /* @__PURE__ */ jsx("div", { className: "crewlet-data-grid__band-foot", role: "row", children: /* @__PURE__ */ jsx("span", { className: "crewlet-data-grid__band-cell", role: "cell", "aria-colspan": drawnColumns.length, children: band.footer }) })
345
415
  ] }, band.key)
346
416
  );
347
417
  }
@@ -358,7 +428,7 @@ function DataGrid({
358
428
  style: { gridTemplateColumns: template },
359
429
  onPointerDown,
360
430
  children: [
361
- /* @__PURE__ */ jsx("div", { className: "crewlet-data-grid__head", role: "row", children: visibleColumns.map((column) => {
431
+ /* @__PURE__ */ jsx("div", { className: "crewlet-data-grid__head", role: "row", children: drawnColumns.map((column) => {
362
432
  const sorted = sort?.key === column.key;
363
433
  const sortable = Boolean(column.sortValue && onSortChange);
364
434
  const headClass = cx(
@@ -1,5 +1,5 @@
1
1
  import { Kbd } from './chunk-SMBKXWML.js';
2
- import { Textarea } from './chunk-D4EOPIFL.js';
2
+ import { Textarea } from './chunk-EXRRTKWT.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Composer-TXULCPPV.css';
5
5
  import { forwardRef } from 'react';
@@ -1,5 +1,5 @@
1
+ import { ConfirmModal } from './chunk-YCC2S7DF.js';
1
2
  import { InlineCode } from './chunk-5CLW2CXT.js';
2
- import { ConfirmModal } from './chunk-6AKG2VLR.js';
3
3
  import { Callout } from './chunk-SZZRIHGT.js';
4
4
  import './LinkInterstitial-ET4MSVSV.css';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  import { Switch } from './chunk-A722MUNR.js';
2
2
  import { useReorder } from './chunk-XJ2QEBMM.js';
3
- import { Checkbox } from './chunk-YUAQSWNW.js';
3
+ import { Checkbox } from './chunk-NCHKKYPQ.js';
4
4
  import { IconButton } from './chunk-LACA4JGC.js';
5
5
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,7 +1,7 @@
1
- import { Document } from './chunk-PWG3VHRQ.js';
2
1
  import { PrincipalAvatar } from './chunk-CI3VPIJN.js';
3
2
  import { toInstant, RelativeTime, formatExact, toISO } from './chunk-3CZ7XAVY.js';
4
- import { Composer } from './chunk-KNMQS3JY.js';
3
+ import { Document } from './chunk-PWG3VHRQ.js';
4
+ import { Composer } from './chunk-GHY63X4C.js';
5
5
  import { Count } from './chunk-BHHIIK3M.js';
6
6
  import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
7
7
  import { Button } from './chunk-OG6CL3EB.js';
@@ -1,7 +1,7 @@
1
1
  import { StatusDot } from './chunk-WIATRXEJ.js';
2
2
  import { useRoving, tabStop } from './chunk-EGMQURBR.js';
3
3
  import { Count } from './chunk-BHHIIK3M.js';
4
- import { Menu } from './chunk-3JIZ2A6K.js';
4
+ import { Menu } from './chunk-TMM32U7D.js';
5
5
  import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
6
6
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
7
7
  import { cx } from './chunk-ODEQTPFM.js';
@@ -0,0 +1,139 @@
1
+ import { FileDrop, FilePickButton } from './chunk-THDGBD6Y.js';
2
+ import { contrastRatio } from './chunk-B235ANDO.js';
3
+ import { normalizeHex } from './chunk-UZMNR366.js';
4
+ import { Button } from './chunk-OG6CL3EB.js';
5
+ import { VisuallyHidden } from './chunk-BZFWDIV6.js';
6
+ import { cx } from './chunk-ODEQTPFM.js';
7
+ import './LogoSlot-T2UFOJXU.css';
8
+ import { useId } from 'react';
9
+ import { ImageGlyph, CircleAlertGlyph, UploadGlyph, TrashGlyph } from '@crewlethq/icons/glyphs';
10
+ import { themes } from '@crewlethq/tokens';
11
+ import { jsx, jsxs } from 'react/jsx-runtime';
12
+
13
+ var LABELS = {
14
+ choose: "Choose a file",
15
+ replace: "Replace",
16
+ remove: "Remove",
17
+ drop: "Drop the file to use it",
18
+ uploading: "Uploading",
19
+ empty: "No logo yet",
20
+ hint: "SVG, PNG or WebP, up to 2 MB."
21
+ };
22
+ var DEFAULT_GROUNDS = {
23
+ light: themes.light.color.surface.background,
24
+ dark: themes.dark.color.surface.background
25
+ };
26
+ var INKS = [themes.light.color.text.secondary, themes.dark.color.text.secondary];
27
+ function inkOn(ground) {
28
+ let best = INKS[0];
29
+ let most = -1;
30
+ for (const ink of INKS) {
31
+ const ratio = contrastRatio(ink, ground) ?? 0;
32
+ if (ratio > most) {
33
+ most = ratio;
34
+ best = ink;
35
+ }
36
+ }
37
+ return best;
38
+ }
39
+ function LogoSlot({
40
+ label,
41
+ description,
42
+ ground,
43
+ groundColor,
44
+ shape = "wide",
45
+ src,
46
+ alt,
47
+ guide = true,
48
+ uploading = false,
49
+ error,
50
+ editable = false,
51
+ onFile,
52
+ onRemove,
53
+ accept = "image/svg+xml,image/png,image/webp",
54
+ download,
55
+ emptyNote,
56
+ className,
57
+ labels
58
+ }) {
59
+ const text = { ...LABELS, ...labels };
60
+ const labelId = useId();
61
+ const descriptionId = useId();
62
+ const groundValue = normalizeHex(groundColor) ?? DEFAULT_GROUNDS[ground];
63
+ const filled = Boolean(src);
64
+ const take = (files) => {
65
+ const first = files[0];
66
+ if (first && !uploading) onFile?.(first.file);
67
+ };
68
+ const stage = /* @__PURE__ */ jsx(
69
+ "div",
70
+ {
71
+ className: cx(
72
+ "crewlet-logo-slot__stage",
73
+ `crewlet-logo-slot__stage--${ground}`,
74
+ `crewlet-logo-slot__stage--${shape}`,
75
+ !filled && "is-empty",
76
+ uploading && "is-uploading"
77
+ ),
78
+ style: { "--crewlet-logo-slot-ground": groundValue, "--crewlet-logo-slot-ink": inkOn(groundValue) },
79
+ children: /* @__PURE__ */ jsx("span", { className: cx("crewlet-logo-slot__space", guide && "has-guide"), children: filled ? /* @__PURE__ */ jsx("img", { src: src ?? void 0, alt, className: "crewlet-logo-slot__image", draggable: false }) : /* @__PURE__ */ jsx("span", { className: "crewlet-logo-slot__placeholder", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ImageGlyph, { size: "lg" }) }) })
80
+ }
81
+ );
82
+ return /* @__PURE__ */ jsxs(
83
+ "div",
84
+ {
85
+ role: "group",
86
+ "aria-labelledby": labelId,
87
+ "aria-describedby": description ? descriptionId : void 0,
88
+ "aria-busy": uploading || void 0,
89
+ className: cx("crewlet-logo-slot", className),
90
+ children: [
91
+ /* @__PURE__ */ jsxs("div", { className: "crewlet-logo-slot__head", children: [
92
+ /* @__PURE__ */ jsxs("span", { className: "crewlet-logo-slot__words", children: [
93
+ /* @__PURE__ */ jsx("span", { id: labelId, className: "crewlet-logo-slot__label", children: label }),
94
+ description ? /* @__PURE__ */ jsx("span", { id: descriptionId, className: "crewlet-logo-slot__description", children: description }) : null
95
+ ] }),
96
+ download && filled ? /* @__PURE__ */ jsx("span", { className: "crewlet-logo-slot__download", children: download }) : null
97
+ ] }),
98
+ editable ? /* @__PURE__ */ jsx(FileDrop, { title: text.drop, onFiles: take, disabled: uploading, children: stage }) : stage,
99
+ !filled && (!editable || emptyNote) ? /* @__PURE__ */ jsx("p", { className: "crewlet-logo-slot__empty", children: emptyNote ?? text.empty }) : null,
100
+ error ? /* @__PURE__ */ jsxs("p", { className: "crewlet-logo-slot__error", role: "alert", children: [
101
+ /* @__PURE__ */ jsx(CircleAlertGlyph, { size: "sm", "aria-hidden": "true" }),
102
+ /* @__PURE__ */ jsx("span", { children: error })
103
+ ] }) : null,
104
+ editable ? /* @__PURE__ */ jsxs("div", { className: "crewlet-logo-slot__foot", children: [
105
+ /* @__PURE__ */ jsx(
106
+ FilePickButton,
107
+ {
108
+ size: "small",
109
+ variant: "secondary",
110
+ leadingIcon: /* @__PURE__ */ jsx(UploadGlyph, { size: "sm" }),
111
+ accept,
112
+ multiple: false,
113
+ loading: uploading,
114
+ "aria-describedby": labelId,
115
+ onFiles: take,
116
+ children: filled ? text.replace : text.choose
117
+ }
118
+ ),
119
+ filled && onRemove ? /* @__PURE__ */ jsx(
120
+ Button,
121
+ {
122
+ size: "small",
123
+ variant: "ghost",
124
+ leadingIcon: /* @__PURE__ */ jsx(TrashGlyph, { size: "sm" }),
125
+ disabledReason: uploading ? text.uploading : void 0,
126
+ "aria-describedby": labelId,
127
+ onClick: onRemove,
128
+ children: text.remove
129
+ }
130
+ ) : null,
131
+ /* @__PURE__ */ jsx("span", { className: "crewlet-logo-slot__hint", children: text.hint })
132
+ ] }) : null,
133
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("span", { role: "status", children: uploading ? text.uploading : "" }) })
134
+ ]
135
+ }
136
+ );
137
+ }
138
+
139
+ export { LogoSlot };
@@ -1,21 +1,30 @@
1
- import { ArtifactKindGlyph } from './chunk-CE2THTQR.js';
1
+ import { ArtifactKindGlyph } from './chunk-RSKW25Y5.js';
2
2
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
- import './ArtifactKinds-CVD3FCYO.css';
5
- import './ArtifactNameCell-RTVP4LO4.css';
6
- import { PinGlyph } from '@crewlethq/icons/glyphs';
4
+ import './ArtifactKinds-O3CALPVX.css';
5
+ import './ArtifactNameCell-3AHLUSE5.css';
6
+ import { FolderGlyph, PinGlyph } from '@crewlethq/icons/glyphs';
7
7
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
8
8
 
9
9
  var LABELS = {
10
- kinds: { html: "HTML", doc: "Doc", slides: "Slides", design: "Design", dashboard: "Dashboard", sheet: "Sheet" },
11
- pinned: "Pinned"
10
+ kinds: { html: "HTML", doc: "Doc", slides: "Slides", design: "Design", dashboard: "Dashboard", sheet: "Sheet", brand: "Brand" },
11
+ pinned: "Pinned",
12
+ folder: "Folder"
12
13
  };
13
14
  function ArtifactNameCell({ kind, title, detail, pinned = false, trashed = false, className, labels }) {
14
15
  const text = { ...LABELS, ...labels, kinds: { ...LABELS.kinds, ...labels?.kinds } };
15
- const kindWord = text.kinds[kind];
16
+ const folder = kind === "folder";
17
+ const kindWord = folder ? text.folder : text.kinds[kind];
16
18
  const about = detail?.trim();
17
19
  return /* @__PURE__ */ jsxs("span", { className: cx("crewlet-artifact-name", trashed && "crewlet-artifact-name--trashed", className), children: [
18
- /* @__PURE__ */ jsx("span", { className: cx("crewlet-artifact-name__mark", `crewlet-kind--${kind}`), "aria-hidden": "true", children: /* @__PURE__ */ jsx(ArtifactKindGlyph, { kind, size: "sm" }) }),
20
+ /* @__PURE__ */ jsx(
21
+ "span",
22
+ {
23
+ className: cx("crewlet-artifact-name__mark", folder ? "crewlet-artifact-name__mark--folder" : `crewlet-kind--${kind}`),
24
+ "aria-hidden": "true",
25
+ children: folder ? /* @__PURE__ */ jsx(FolderGlyph, { size: "sm" }) : /* @__PURE__ */ jsx(ArtifactKindGlyph, { kind, size: "sm" })
26
+ }
27
+ ),
19
28
  /* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-name__words", children: [
20
29
  /* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-name__title-row", children: [
21
30
  /* @__PURE__ */ jsx("span", { className: "crewlet-artifact-name__title", title, children: title }),
@@ -1,6 +1,6 @@
1
- import { Select } from './chunk-LD3GEVQU.js';
1
+ import { Select } from './chunk-XQZ6EWOE.js';
2
+ import { Modal } from './chunk-YCC2S7DF.js';
2
3
  import { CopyButton } from './chunk-7SHAFLEX.js';
3
- import { Modal } from './chunk-6AKG2VLR.js';
4
4
  import { Callout } from './chunk-SZZRIHGT.js';
5
5
  import { PrincipalAvatar } from './chunk-CI3VPIJN.js';
6
6
  import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
@@ -0,0 +1,44 @@
1
+ import { fontStack, safeFontFamily } from './chunk-5SGHW42B.js';
2
+ import { cx } from './chunk-ODEQTPFM.js';
3
+ import './TypeSpecimen-WK6YNHL7.css';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var LABELS = {
7
+ glyphs: "Aa",
8
+ sample: "Every doc, deck and page your company makes, in its own type."
9
+ };
10
+ function quotedFamily(family) {
11
+ return `"${family.replace(/["\\\r\n]/g, "").trim()}"`;
12
+ }
13
+ function TypeSpecimen({
14
+ family,
15
+ label,
16
+ fontFamily,
17
+ sample,
18
+ detail,
19
+ weight = "regular",
20
+ size = "md",
21
+ className,
22
+ labels
23
+ }) {
24
+ const text = { ...LABELS, ...labels };
25
+ const stack = fontStack(safeFontFamily(fontFamily) ?? quotedFamily(family), "var(--font-family-sans)");
26
+ return /* @__PURE__ */ jsxs(
27
+ "figure",
28
+ {
29
+ className: cx("crewlet-type-specimen", `crewlet-type-specimen--${size}`, `crewlet-type-specimen--${weight}`, className),
30
+ style: { "--crewlet-type-specimen-family": stack },
31
+ children: [
32
+ /* @__PURE__ */ jsxs("figcaption", { className: "crewlet-type-specimen__caption", children: [
33
+ /* @__PURE__ */ jsx("span", { className: "crewlet-type-specimen__label", children: label }),
34
+ /* @__PURE__ */ jsx("span", { className: "crewlet-type-specimen__family", children: family }),
35
+ detail ? /* @__PURE__ */ jsx("span", { className: "crewlet-type-specimen__detail", children: detail }) : null
36
+ ] }),
37
+ /* @__PURE__ */ jsx("span", { className: "crewlet-type-specimen__glyphs", "aria-hidden": "true", children: text.glyphs }),
38
+ /* @__PURE__ */ jsx("span", { className: "crewlet-type-specimen__sample", children: sample ?? text.sample })
39
+ ]
40
+ }
41
+ );
42
+ }
43
+
44
+ export { TypeSpecimen };
@@ -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-6U4BJ25W.js').then(
12
+ loading ??= import('./Editor-MLGK3KOG.js').then(
13
13
  (module) => {
14
14
  engine = module.Editor;
15
15
  return engine;
@@ -1,4 +1,4 @@
1
- import { Combobox } from './chunk-LOBV4QON.js';
1
+ import { Combobox } from './chunk-P5JBDHWC.js';
2
2
  import { PRINCIPAL_KINDS, PrincipalAvatar } from './chunk-CI3VPIJN.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './PrincipalPicker-7NNZTGUP.css';
@@ -0,0 +1,80 @@
1
+ import { Card } from './chunk-INHXF2CL.js';
2
+ import { VisuallyHidden } from './chunk-BZFWDIV6.js';
3
+ import { cx } from './chunk-ODEQTPFM.js';
4
+ import './FolderTile-FDT5Y63Z.css';
5
+ import { useId } from 'react';
6
+ import { FolderGlyph } from '@crewlethq/icons/glyphs';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
8
+
9
+ var CONTENTS = {
10
+ artifacts: (count) => count === 1 ? "1 artifact" : `${count} artifacts`,
11
+ folders: (count) => count === 1 ? "1 folder" : `${count} folders`,
12
+ nothing: "Nothing you can open yet"
13
+ };
14
+ function describeFolderContents(contents, labels) {
15
+ const text = { ...CONTENTS, ...labels };
16
+ const parts = [];
17
+ if (contents.artifacts > 0) parts.push(text.artifacts(contents.artifacts));
18
+ if (contents.folders > 0) parts.push(text.folders(contents.folders));
19
+ return parts.length > 0 ? parts.join(" \xB7 ") : text.nothing;
20
+ }
21
+ var LABELS = {
22
+ ...CONTENTS,
23
+ folder: "Folder",
24
+ selected: "Selected"
25
+ };
26
+ function FolderTile({
27
+ name,
28
+ href,
29
+ visibility,
30
+ contents,
31
+ actions,
32
+ selected = false,
33
+ dropTarget = false,
34
+ size = "tile",
35
+ className,
36
+ labels
37
+ }) {
38
+ const text = { ...LABELS, ...labels };
39
+ const nameId = useId();
40
+ const factsId = useId();
41
+ return /* @__PURE__ */ jsxs(
42
+ Card,
43
+ {
44
+ variant: "subtle",
45
+ padding: "none",
46
+ interactive: true,
47
+ selected,
48
+ className: cx(
49
+ "crewlet-folder-tile",
50
+ `crewlet-folder-tile--${size}`,
51
+ dropTarget && "is-drop-target",
52
+ actions ? "crewlet-folder-tile--with-actions" : null,
53
+ className
54
+ ),
55
+ children: [
56
+ /* @__PURE__ */ jsxs("a", { href, className: "crewlet-folder-tile__link", "aria-labelledby": nameId, "aria-describedby": factsId, children: [
57
+ /* @__PURE__ */ jsx("span", { className: "crewlet-folder-tile__glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx(FolderGlyph, { size: size === "row" ? "md" : "lg" }) }),
58
+ /* @__PURE__ */ jsxs("span", { className: "crewlet-folder-tile__body", children: [
59
+ /* @__PURE__ */ jsx("span", { id: nameId, className: "crewlet-folder-tile__name", title: name, children: name }),
60
+ /* @__PURE__ */ jsxs("span", { id: factsId, className: "crewlet-folder-tile__facts", children: [
61
+ /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
62
+ text.folder,
63
+ selected ? `, ${text.selected}` : "",
64
+ visibility || contents ? ", " : ""
65
+ ] }),
66
+ visibility ? /* @__PURE__ */ jsx("span", { className: "crewlet-folder-tile__visibility", children: visibility }) : null,
67
+ contents ? /* @__PURE__ */ jsxs("span", { className: "crewlet-folder-tile__contents", children: [
68
+ visibility ? /* @__PURE__ */ jsx(VisuallyHidden, { children: ", " }) : null,
69
+ describeFolderContents(contents, text)
70
+ ] }) : null
71
+ ] })
72
+ ] })
73
+ ] }),
74
+ actions ? /* @__PURE__ */ jsx("span", { className: "crewlet-folder-tile__actions", children: actions }) : null
75
+ ]
76
+ }
77
+ );
78
+ }
79
+
80
+ export { FolderTile, describeFolderContents };
@@ -1,7 +1,7 @@
1
- import { Modal } from './chunk-6AKG2VLR.js';
1
+ import { Modal } from './chunk-YCC2S7DF.js';
2
2
  import { useListbox, useHighlightRest } from './chunk-7KHM2FZH.js';
3
3
  import { Kbd } from './chunk-SMBKXWML.js';
4
- import { Input } from './chunk-D4EOPIFL.js';
4
+ import { Input } from './chunk-EXRRTKWT.js';
5
5
  import { Count } from './chunk-BHHIIK3M.js';
6
6
  import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
7
7
  import { isComposing } from './chunk-H5XTJ7GJ.js';
@@ -1,14 +1,14 @@
1
1
  import { PageHeader } from './chunk-DKB73KZI.js';
2
- import { DataTable } from './chunk-DETVVKAH.js';
3
- import { DateTimePicker } from './chunk-K77LKW3X.js';
2
+ import { DateTimePicker } from './chunk-ZFM5L7M4.js';
3
+ import { DataTable } from './chunk-WQ7S7CKZ.js';
4
4
  import { useListbox, useOptionKeys } from './chunk-7KHM2FZH.js';
5
- import { Popover } from './chunk-KHJIEPZV.js';
6
5
  import { Toolbar } from './chunk-NR4CPM4T.js';
6
+ import { Popover } from './chunk-KHJIEPZV.js';
7
7
  import { RelativeTime } from './chunk-3CZ7XAVY.js';
8
8
  import { Kbd } from './chunk-SMBKXWML.js';
9
- import { Input } from './chunk-D4EOPIFL.js';
9
+ import { Input } from './chunk-EXRRTKWT.js';
10
10
  import { Count } from './chunk-BHHIIK3M.js';
11
- import { Menu } from './chunk-3JIZ2A6K.js';
11
+ import { Menu } from './chunk-TMM32U7D.js';
12
12
  import { Button } from './chunk-OG6CL3EB.js';
13
13
  import { IconButton } from './chunk-LACA4JGC.js';
14
14
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
@@ -1,6 +1,7 @@
1
- import { FormField } from './chunk-D4EOPIFL.js';
1
+ import { FormField } from './chunk-EXRRTKWT.js';
2
+ import { VisuallyHidden } from './chunk-BZFWDIV6.js';
2
3
  import { cx } from './chunk-ODEQTPFM.js';
3
- import './Checkbox-ALWG3WV2.css';
4
+ import './Checkbox-MB22OW6P.css';
4
5
  import { forwardRef, useId, useRef, useCallback, useEffect } from 'react';
5
6
  import { jsxs, jsx } from 'react/jsx-runtime';
6
7
 
@@ -11,6 +12,7 @@ var Checkbox = forwardRef(function Checkbox2({
11
12
  framed = false,
12
13
  size = "md",
13
14
  indeterminate = false,
15
+ hideLabel = false,
14
16
  onCheckedChange,
15
17
  onChange,
16
18
  className = "",
@@ -44,6 +46,7 @@ var Checkbox = forwardRef(function Checkbox2({
44
46
  tone === "danger" && "crewlet-checkbox--danger",
45
47
  framed && "crewlet-checkbox--framed",
46
48
  size === "sm" && "crewlet-checkbox--sm",
49
+ hideLabel && "crewlet-checkbox--bare",
47
50
  disabled && "is-disabled",
48
51
  className
49
52
  ),
@@ -65,7 +68,7 @@ var Checkbox = forwardRef(function Checkbox2({
65
68
  ...rest
66
69
  }
67
70
  ),
68
- /* @__PURE__ */ jsxs("span", { className: "crewlet-checkbox__text", children: [
71
+ hideLabel ? /* @__PURE__ */ jsx(VisuallyHidden, { id: labelId, children: label }) : /* @__PURE__ */ jsxs("span", { className: "crewlet-checkbox__text", children: [
69
72
  /* @__PURE__ */ jsx("span", { className: "crewlet-checkbox__label", id: labelId, children: label }),
70
73
  description ? /* @__PURE__ */ jsx("span", { className: "crewlet-checkbox__description", id: descriptionId, children: description }) : null
71
74
  ] })