@crewlethq/ui 0.51.0 → 0.52.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 (64) hide show
  1. package/README.md +14 -0
  2. package/dist/AgentHandoffPanel/index.js +3 -3
  3. package/dist/ArrangeList/index.js +3 -3
  4. package/dist/ArtifactCard/index.js +3 -3
  5. package/dist/Checkbox/index.js +2 -2
  6. package/dist/ChoiceButtons/ChoiceButtons.d.ts +21 -1
  7. package/dist/ChoiceButtons/index.d.ts +1 -1
  8. package/dist/ChoiceButtons/index.js +1 -1
  9. package/dist/{ChoiceButtons-FLIFXFFS.css → ChoiceButtons-HWXEF2H3.css} +60 -0
  10. package/dist/ColorField/index.js +2 -2
  11. package/dist/Combobox/index.js +2 -2
  12. package/dist/CommandPalette/index.js +2 -2
  13. package/dist/CommentThread/index.js +3 -3
  14. package/dist/Composer/index.js +2 -2
  15. package/dist/ConfirmField/index.js +2 -2
  16. package/dist/DataGrid/index.js +3 -3
  17. package/dist/DataTable/index.js +3 -3
  18. package/dist/DataView/index.js +4 -4
  19. package/dist/DocTabsEditor/index.js +2 -2
  20. package/dist/{Editor-MLGK3KOG.js → Editor-SZFWVDAU.js} +2 -2
  21. package/dist/Input/FormField.d.ts +7 -1
  22. package/dist/Input/index.js +1 -1
  23. package/dist/{Input-VDSV7VWJ.css → Input-GMOWHZRG.css} +9 -0
  24. package/dist/ListInput/ListInput.d.ts +2 -0
  25. package/dist/ListInput/index.js +2 -2
  26. package/dist/{ListInput-P2ECUQJ2.css → ListInput-RLQND5QK.css} +30 -6
  27. package/dist/LogoSlot/LogoSlot.d.ts +9 -1
  28. package/dist/LogoSlot/LogoSlotGroup.d.ts +38 -0
  29. package/dist/LogoSlot/index.d.ts +3 -1
  30. package/dist/LogoSlot/index.js +1 -1
  31. package/dist/{LogoSlot-T2UFOJXU.css → LogoSlot-ETD74ELF.css} +98 -0
  32. package/dist/PrincipalPicker/index.js +3 -3
  33. package/dist/RichEditor/index.js +1 -1
  34. package/dist/SheetColumnEditor/index.js +3 -3
  35. package/dist/Switcher/index.js +2 -2
  36. package/dist/TimeWindowPicker/index.js +2 -2
  37. package/dist/{chunk-ZCIL5IHU.js → chunk-2GIWL7IS.js} +1 -1
  38. package/dist/{chunk-V7GOOXPK.js → chunk-3NXWH5NC.js} +1 -1
  39. package/dist/{chunk-WQ7S7CKZ.js → chunk-5O72FSOK.js} +1 -1
  40. package/dist/{chunk-73WHPLWQ.js → chunk-5WYPSVRX.js} +1 -1
  41. package/dist/{chunk-R6R2UHVG.js → chunk-6VQA2LZC.js} +1 -1
  42. package/dist/{chunk-FB5CFQTG.js → chunk-7PE56HHD.js} +1 -1
  43. package/dist/{chunk-P5JBDHWC.js → chunk-C6Z3MLSA.js} +1 -1
  44. package/dist/{chunk-UUTEWGO6.js → chunk-CQEYF3UW.js} +6 -4
  45. package/dist/{chunk-S63QOMXC.js → chunk-CUL5XV6O.js} +1 -1
  46. package/dist/{chunk-H7NMJ5AI.js → chunk-EZ43L6T7.js} +1 -1
  47. package/dist/{chunk-627KFRON.js → chunk-FNPZ3LLQ.js} +1 -1
  48. package/dist/{chunk-KHZYAEGZ.js → chunk-G5SUSCWL.js} +1 -1
  49. package/dist/{chunk-VBIM6HFC.js → chunk-GPZXBJFU.js} +1 -1
  50. package/dist/{chunk-WX6IJJ4U.js → chunk-GRKGLZFM.js} +2 -2
  51. package/dist/{chunk-VTSJMDGP.js → chunk-J53T2QAH.js} +2 -2
  52. package/dist/{chunk-KHP7TJF7.js → chunk-KFR75JOK.js} +1 -1
  53. package/dist/{chunk-EXRRTKWT.js → chunk-LJHH4WWB.js} +8 -4
  54. package/dist/{chunk-MIEBOO7Y.js → chunk-NMR7AJSB.js} +1 -1
  55. package/dist/{chunk-NCHKKYPQ.js → chunk-RQI43UJ7.js} +1 -1
  56. package/dist/{chunk-H55D66IK.js → chunk-SSHDQBHR.js} +1 -1
  57. package/dist/{chunk-GHY63X4C.js → chunk-UJ4VVK7R.js} +1 -1
  58. package/dist/{chunk-2UFUP2ZH.js → chunk-UKE7LTFZ.js} +27 -10
  59. package/dist/chunk-WXRH7NZW.js +80 -0
  60. package/dist/generated/index.js +46 -46
  61. package/dist/index.js +46 -46
  62. package/dist/styles.css +201 -10
  63. package/package.json +3 -3
  64. package/dist/chunk-BWOIUOO3.js +0 -62
@@ -124,6 +124,13 @@
124
124
  opacity: 0.5;
125
125
  }
126
126
 
127
+ .crewlet-logo-slot__notes {
128
+ display: flex;
129
+ flex-direction: column;
130
+ gap: var(--spacing-1);
131
+ min-width: 0;
132
+ }
133
+
127
134
  .crewlet-logo-slot__empty {
128
135
  margin: 0;
129
136
  color: var(--color-text-tertiary);
@@ -157,3 +164,94 @@
157
164
  color: var(--color-text-tertiary);
158
165
  font-size: var(--font-size-xs);
159
166
  }
167
+
168
+ /*
169
+ * A GROUP OF SLOTS, aligned row by row (LogoSlotGroup.tsx). Each slot is a
170
+ * subgrid spanning the group's four rows: its name and description, its
171
+ * stage, what is said under it, and its actions. A row holds the tallest of
172
+ * its parts across the slots, so every stage, note and action row starts on
173
+ * one line. The steps between the parts are margins rather than the grid's
174
+ * gap, so a row no slot uses (no notes anywhere) takes no room at all.
175
+ */
176
+ .crewlet-logo-slot-group {
177
+ display: flex;
178
+ flex-direction: column;
179
+ gap: var(--spacing-3);
180
+ min-width: 0;
181
+ }
182
+
183
+ .crewlet-logo-slot-group__slots {
184
+ display: grid;
185
+ grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr));
186
+ column-gap: var(--spacing-5);
187
+ row-gap: var(--spacing-6);
188
+ }
189
+
190
+ .crewlet-logo-slot-group__slots > .crewlet-logo-slot {
191
+ display: grid;
192
+ grid-row: span 4;
193
+ grid-template-rows: subgrid;
194
+ row-gap: 0;
195
+ align-content: start;
196
+ }
197
+
198
+ .crewlet-logo-slot-group__slots > .crewlet-logo-slot > .crewlet-logo-slot__head {
199
+ grid-row: 1;
200
+ margin-block-end: var(--spacing-2);
201
+ }
202
+
203
+ .crewlet-logo-slot-group__slots > .crewlet-logo-slot > :is(.crewlet-logo-slot__stage, .crewlet-file-drop) {
204
+ grid-row: 2;
205
+ }
206
+
207
+ .crewlet-logo-slot-group__slots > .crewlet-logo-slot > .crewlet-logo-slot__notes {
208
+ grid-row: 3;
209
+ margin-block-start: var(--spacing-2);
210
+ }
211
+
212
+ .crewlet-logo-slot-group__slots > .crewlet-logo-slot > .crewlet-logo-slot__foot {
213
+ grid-row: 4;
214
+ margin-block-start: var(--spacing-2);
215
+ }
216
+
217
+ .crewlet-logo-slot-group__hint {
218
+ margin: 0;
219
+ color: var(--color-text-tertiary);
220
+ font-size: var(--font-size-xs);
221
+ line-height: var(--font-line-height-normal);
222
+ }
223
+
224
+ /*
225
+ * SMALL: a thumbnail of the slot for a summary of what is set. The stage
226
+ * keeps its ground, its edge and the space the logo keeps, at half the height
227
+ * with a tighter inset, and the words step down to the summary's sizes.
228
+ */
229
+ .crewlet-logo-slot--sm {
230
+ --crewlet-logo-slot-height: calc(var(--size-row-lg) * 1.5);
231
+ --crewlet-logo-slot-padding: var(--spacing-2);
232
+ --crewlet-logo-slot-clear: var(--spacing-1);
233
+
234
+ gap: var(--spacing-1);
235
+ }
236
+
237
+ .crewlet-logo-slot--sm .crewlet-logo-slot__label {
238
+ font-size: var(--font-size-xs);
239
+ }
240
+
241
+ .crewlet-logo-slot--sm .crewlet-logo-slot__description,
242
+ .crewlet-logo-slot--sm .crewlet-logo-slot__empty {
243
+ font-size: var(--font-size-2xs);
244
+ }
245
+
246
+ .crewlet-logo-slot--sm .crewlet-logo-slot__stage {
247
+ border-radius: var(--radius-md);
248
+ }
249
+
250
+ .crewlet-logo-slot--sm .crewlet-logo-slot__placeholder {
251
+ width: calc(var(--size-row-lg) * 1.5);
252
+ height: var(--size-row-sm);
253
+ }
254
+
255
+ .crewlet-logo-slot--sm .crewlet-logo-slot__stage--square .crewlet-logo-slot__placeholder {
256
+ width: var(--size-row-sm);
257
+ }
@@ -1,10 +1,10 @@
1
- export { PrincipalPicker } from '../chunk-KHZYAEGZ.js';
2
- import '../chunk-P5JBDHWC.js';
1
+ export { PrincipalPicker } from '../chunk-G5SUSCWL.js';
2
+ import '../chunk-C6Z3MLSA.js';
3
3
  import '../chunk-7KHM2FZH.js';
4
4
  import '../chunk-CI3VPIJN.js';
5
5
  import '../chunk-5AQBPHZD.js';
6
6
  import '../chunk-PZKHBB7D.js';
7
- import '../chunk-EXRRTKWT.js';
7
+ import '../chunk-LJHH4WWB.js';
8
8
  import '../chunk-XCUUI7E7.js';
9
9
  import '../chunk-PQADV6P6.js';
10
10
  import '../chunk-RSAQOKH3.js';
@@ -1,4 +1,4 @@
1
- export { RichEditor, preloadRichEditor } from '../chunk-KHP7TJF7.js';
1
+ export { RichEditor, preloadRichEditor } from '../chunk-KFR75JOK.js';
2
2
  export { RICH_EDITOR_LABELS, richEditorLabels } from '../chunk-CSQTDGTS.js';
3
3
  import '../chunk-BAKPMH3S.js';
4
4
  import '../chunk-BPCY7ZID.js';
@@ -1,4 +1,4 @@
1
- export { SHEET_COLUMN_EDITOR_LABELS, SheetColumnEditor, SheetColumnTypeGlyph } from '../chunk-VTSJMDGP.js';
1
+ export { SHEET_COLUMN_EDITOR_LABELS, SheetColumnEditor, SheetColumnTypeGlyph } from '../chunk-J53T2QAH.js';
2
2
  import '../chunk-XQZ6EWOE.js';
3
3
  import '../chunk-FFMCMSJB.js';
4
4
  import '../chunk-7KHM2FZH.js';
@@ -10,9 +10,9 @@ import '../chunk-6FVGSWLS.js';
10
10
  import '../chunk-ILFEWRLG.js';
11
11
  import '../chunk-WIATRXEJ.js';
12
12
  import '../chunk-EGMQURBR.js';
13
- import '../chunk-NCHKKYPQ.js';
13
+ import '../chunk-RQI43UJ7.js';
14
14
  import '../chunk-SMBKXWML.js';
15
- import '../chunk-EXRRTKWT.js';
15
+ import '../chunk-LJHH4WWB.js';
16
16
  import '../chunk-XCUUI7E7.js';
17
17
  import '../chunk-BHHIIK3M.js';
18
18
  import '../chunk-PQADV6P6.js';
@@ -1,10 +1,10 @@
1
- export { Switcher } from '../chunk-VBIM6HFC.js';
1
+ export { Switcher } from '../chunk-GPZXBJFU.js';
2
2
  import '../chunk-YCC2S7DF.js';
3
3
  import '../chunk-7KHM2FZH.js';
4
4
  import '../chunk-KHJIEPZV.js';
5
5
  import '../chunk-FYTIJM2T.js';
6
6
  import '../chunk-TEUQWOWZ.js';
7
- import '../chunk-EXRRTKWT.js';
7
+ import '../chunk-LJHH4WWB.js';
8
8
  import '../chunk-XCUUI7E7.js';
9
9
  import '../chunk-PQADV6P6.js';
10
10
  import '../chunk-RSAQOKH3.js';
@@ -1,9 +1,9 @@
1
- export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-R6R2UHVG.js';
1
+ export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-6VQA2LZC.js';
2
2
  import '../chunk-XQZ6EWOE.js';
3
3
  import '../chunk-7KHM2FZH.js';
4
4
  import '../chunk-GXQ3B46I.js';
5
5
  import '../chunk-KHJIEPZV.js';
6
- import '../chunk-EXRRTKWT.js';
6
+ import '../chunk-LJHH4WWB.js';
7
7
  import '../chunk-XCUUI7E7.js';
8
8
  import '../chunk-PQADV6P6.js';
9
9
  import '../chunk-RSAQOKH3.js';
@@ -1,5 +1,5 @@
1
1
  import { InlineCode } from './chunk-5CLW2CXT.js';
2
- import { FormField, Input } from './chunk-EXRRTKWT.js';
2
+ import { FormField, Input } from './chunk-LJHH4WWB.js';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
 
5
5
  function confirmMatches(typed, phrase) {
@@ -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-GHY63X4C.js';
4
+ import { Composer } from './chunk-UJ4VVK7R.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';
@@ -2,7 +2,7 @@ import { Modal } from './chunk-YCC2S7DF.js';
2
2
  import { useClipboard } from './chunk-STJ7QBC3.js';
3
3
  import { EmptyValue } from './chunk-EUCC37WY.js';
4
4
  import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
5
- import { Checkbox } from './chunk-NCHKKYPQ.js';
5
+ import { Checkbox } from './chunk-RQI43UJ7.js';
6
6
  import { Menu } from './chunk-TMM32U7D.js';
7
7
  import { Button } from './chunk-OG6CL3EB.js';
8
8
  import { IconButton } from './chunk-LACA4JGC.js';
@@ -1,5 +1,5 @@
1
1
  import { normalizeHex, parseColourInput } from './chunk-7W3LYIOC.js';
2
- import { FormField, Input, InputAffix } from './chunk-EXRRTKWT.js';
2
+ import { FormField, Input, InputAffix } from './chunk-LJHH4WWB.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './ColorField-2OIOWT3Z.css';
5
5
  import { useId, useState } from 'react';
@@ -1,7 +1,7 @@
1
1
  import { Select } from './chunk-XQZ6EWOE.js';
2
2
  import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-GXQ3B46I.js';
3
3
  import { Popover } from './chunk-KHJIEPZV.js';
4
- import { Input } from './chunk-EXRRTKWT.js';
4
+ import { Input } from './chunk-LJHH4WWB.js';
5
5
  import { Button } from './chunk-OG6CL3EB.js';
6
6
  import { isComposing } from './chunk-H5XTJ7GJ.js';
7
7
  import { IconButton } from './chunk-LACA4JGC.js';
@@ -1,4 +1,4 @@
1
- import { Checkbox } from './chunk-NCHKKYPQ.js';
1
+ import { Checkbox } from './chunk-RQI43UJ7.js';
2
2
  import { EmptyState } from './chunk-PPUR46MK.js';
3
3
  import { useMediaMatch } from './chunk-RTPQDNW3.js';
4
4
  import { Button } from './chunk-OG6CL3EB.js';
@@ -1,5 +1,5 @@
1
1
  import { useListbox, useOptionKeys } from './chunk-7KHM2FZH.js';
2
- import { Input } from './chunk-EXRRTKWT.js';
2
+ import { Input } from './chunk-LJHH4WWB.js';
3
3
  import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './HitArea-QUOS6ZDJ.css';
@@ -1,13 +1,13 @@
1
1
  import { useReorder } from './chunk-XJ2QEBMM.js';
2
2
  import { Kbd } from './chunk-SMBKXWML.js';
3
- import { FormField, Textarea } from './chunk-EXRRTKWT.js';
3
+ import { FormField, Textarea } from './chunk-LJHH4WWB.js';
4
4
  import { characterCountState, CharacterCount, countCharacters } from './chunk-XCUUI7E7.js';
5
5
  import { announce } from './chunk-RSAQOKH3.js';
6
6
  import { Button } from './chunk-OG6CL3EB.js';
7
7
  import { isComposing } from './chunk-H5XTJ7GJ.js';
8
8
  import { IconButton } from './chunk-LACA4JGC.js';
9
9
  import { cx } from './chunk-ODEQTPFM.js';
10
- import './ListInput-P2ECUQJ2.css';
10
+ import './ListInput-RLQND5QK.css';
11
11
  import { forwardRef, useState, useRef, useImperativeHandle, useLayoutEffect, useId } from 'react';
12
12
  import { GripVerticalGlyph, ArrowUpGlyph, ArrowDownGlyph, XGlyph } from '@crewlethq/icons/glyphs';
13
13
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -41,7 +41,8 @@ var ListInput = forwardRef(function ListInput2({
41
41
  maxLength,
42
42
  undoRemove = false,
43
43
  itemError,
44
- fullMessage = (max) => `The list is full at ${max}. Remove one to add another.`,
44
+ fullMessage = () => "That's the most. Remove one to add another.",
45
+ tallyLabel = (count, max) => `${count} of ${max}`,
45
46
  addLabel = (name) => `Add ${name}`,
46
47
  addText = "Add",
47
48
  itemLabel = (name, position) => `${name} ${position}`,
@@ -240,7 +241,7 @@ var ListInput = forwardRef(function ListInput2({
240
241
  const addControl = /* @__PURE__ */ jsx(
241
242
  Button,
242
243
  {
243
- size: "small",
244
+ size: "medium",
244
245
  variant: "secondary",
245
246
  "aria-label": addLabel(itemName),
246
247
  disabled: disabled || full || draftRefused,
@@ -258,6 +259,7 @@ var ListInput = forwardRef(function ListInput2({
258
259
  helper,
259
260
  helperOnFocus,
260
261
  error,
262
+ tally: maxItems === void 0 ? void 0 : tallyLabel(count, maxItems),
261
263
  className: "crewlet-list-input",
262
264
  children: [
263
265
  full ? (
@@ -4,7 +4,7 @@ import { RelativeTime } from './chunk-3CZ7XAVY.js';
4
4
  import { AvatarStack } from './chunk-5AQBPHZD.js';
5
5
  import { ArtifactKindGround } from './chunk-RV6XB5UV.js';
6
6
  import { Card } from './chunk-INHXF2CL.js';
7
- import { Checkbox } from './chunk-NCHKKYPQ.js';
7
+ import { Checkbox } from './chunk-RQI43UJ7.js';
8
8
  import { ArtifactAccessGlyph } from './chunk-BGLKLXL3.js';
9
9
  import { ArtifactKindGlyph } from './chunk-RSKW25Y5.js';
10
10
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
@@ -1,7 +1,7 @@
1
1
  import { PrincipalAvatar } from './chunk-CI3VPIJN.js';
2
2
  import { toInstant, RelativeTime, formatExact, toISO } from './chunk-3CZ7XAVY.js';
3
3
  import { Document } from './chunk-PWG3VHRQ.js';
4
- import { Composer } from './chunk-GHY63X4C.js';
4
+ import { Composer } from './chunk-UJ4VVK7R.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,5 +1,5 @@
1
1
  import { useReorder } from './chunk-XJ2QEBMM.js';
2
- import { Input } from './chunk-EXRRTKWT.js';
2
+ import { Input } from './chunk-LJHH4WWB.js';
3
3
  import { Menu } from './chunk-TMM32U7D.js';
4
4
  import { IconButton } from './chunk-LACA4JGC.js';
5
5
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
@@ -1,4 +1,4 @@
1
- import { Combobox } from './chunk-P5JBDHWC.js';
1
+ import { Combobox } from './chunk-C6Z3MLSA.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';
@@ -3,7 +3,7 @@ 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-EXRRTKWT.js';
6
+ import { Input } from './chunk-LJHH4WWB.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,12 +1,12 @@
1
1
  import { PageHeader } from './chunk-DKB73KZI.js';
2
- import { DataTable } from './chunk-WQ7S7CKZ.js';
2
+ import { DataTable } from './chunk-5O72FSOK.js';
3
3
  import { DateTimePicker } from './chunk-ZFM5L7M4.js';
4
4
  import { useListbox, useOptionKeys } from './chunk-7KHM2FZH.js';
5
5
  import { Toolbar } from './chunk-NR4CPM4T.js';
6
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-EXRRTKWT.js';
9
+ import { Input } from './chunk-LJHH4WWB.js';
10
10
  import { Count } from './chunk-BHHIIK3M.js';
11
11
  import { Menu } from './chunk-TMM32U7D.js';
12
12
  import { Button } from './chunk-OG6CL3EB.js';
@@ -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-NCHKKYPQ.js';
5
+ import { Checkbox } from './chunk-RQI43UJ7.js';
6
6
  import { Kbd } from './chunk-SMBKXWML.js';
7
- import { FormField, Input } from './chunk-EXRRTKWT.js';
7
+ import { FormField, Input } from './chunk-LJHH4WWB.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';
@@ -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-MLGK3KOG.js').then(
12
+ loading ??= import('./Editor-SZFWVDAU.js').then(
13
13
  (module) => {
14
14
  engine = module.Editor;
15
15
  return engine;
@@ -6,7 +6,7 @@ import { IconButton } from './chunk-LACA4JGC.js';
6
6
  import { useFocusModality } from './chunk-NUZHC6MM.js';
7
7
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
8
8
  import { cx } from './chunk-ODEQTPFM.js';
9
- import './Input-VDSV7VWJ.css';
9
+ import './Input-GMOWHZRG.css';
10
10
  import './VisuallyHidden-L552H7OA.css';
11
11
  import { forwardRef, useRef, useState, useImperativeHandle, useEffect, useId } from 'react';
12
12
  import { XGlyph } from '@crewlethq/icons/glyphs';
@@ -208,6 +208,7 @@ var FormField = ({
208
208
  helperOnFocus = false,
209
209
  error,
210
210
  limit,
211
+ tally,
211
212
  labelAction,
212
213
  hideLabel = false,
213
214
  as = "div",
@@ -222,9 +223,11 @@ var FormField = ({
222
223
  const helperId = helper ? `${id}-helper` : void 0;
223
224
  const errorId = error ? `${id}-error` : void 0;
224
225
  const countId = limit ? `${id}-count` : void 0;
226
+ const hasTally = tally !== void 0 && tally !== null && tally !== false;
227
+ const tallyId = hasTally ? `${id}-tally` : void 0;
225
228
  const over = limit !== void 0 && characterCountState(limit.length, limit.max) === "over";
226
229
  const extra = describedBy === void 0 ? [] : typeof describedBy === "string" ? [describedBy] : [...describedBy];
227
- const described = [...extra, helperId, countId, errorId].filter(Boolean).join(" ");
230
+ const described = [...extra, helperId, tallyId, countId, errorId].filter(Boolean).join(" ");
228
231
  const invalid = Boolean(error) || over;
229
232
  const field = {
230
233
  id,
@@ -235,9 +238,10 @@ var FormField = ({
235
238
  const help = helper ? /* @__PURE__ */ jsx("div", { id: helperId, className: "crewlet-form-field__helper", children: helper }) : null;
236
239
  const body = /* @__PURE__ */ jsxs(Fragment, { children: [
237
240
  typeof children === "function" ? children(field) : children,
238
- limit ? /* @__PURE__ */ jsxs("div", { className: "crewlet-form-field__meta", children: [
241
+ limit || hasTally ? /* @__PURE__ */ jsxs("div", { className: "crewlet-form-field__meta", children: [
239
242
  help ?? /* @__PURE__ */ jsx("span", { className: "crewlet-form-field__meta-spacer" }),
240
- /* @__PURE__ */ jsx(CharacterCount, { id: countId, length: limit.length, max: limit.max, labels: limit.labels })
243
+ hasTally ? /* @__PURE__ */ jsx("span", { id: tallyId, className: "crewlet-form-field__tally", children: tally }) : null,
244
+ limit ? /* @__PURE__ */ jsx(CharacterCount, { id: countId, length: limit.length, max: limit.max, labels: limit.labels }) : null
241
245
  ] }) : help,
242
246
  error ? /* @__PURE__ */ jsx("div", { id: errorId, className: "crewlet-form-field__error", role: "alert", children: error }) : null
243
247
  ] });
@@ -1,7 +1,7 @@
1
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-EXRRTKWT.js';
4
+ import { Input } from './chunk-LJHH4WWB.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,4 +1,4 @@
1
- import { FormField } from './chunk-EXRRTKWT.js';
1
+ import { FormField } from './chunk-LJHH4WWB.js';
2
2
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Checkbox-MB22OW6P.css';
@@ -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-NCHKKYPQ.js';
3
+ import { Checkbox } from './chunk-RQI43UJ7.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,5 +1,5 @@
1
1
  import { Kbd } from './chunk-SMBKXWML.js';
2
- import { Textarea } from './chunk-EXRRTKWT.js';
2
+ import { Textarea } from './chunk-LJHH4WWB.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Composer-TXULCPPV.css';
5
5
  import { forwardRef } from 'react';
@@ -4,12 +4,25 @@ import { normalizeHex } from './chunk-7W3LYIOC.js';
4
4
  import { Button } from './chunk-OG6CL3EB.js';
5
5
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
7
- import './LogoSlot-T2UFOJXU.css';
8
- import { useId } from 'react';
7
+ import './LogoSlot-ETD74ELF.css';
8
+ import { createContext, useId, useContext } from 'react';
9
9
  import { ImageGlyph, CircleAlertGlyph, UploadGlyph, TrashGlyph } from '@crewlethq/icons/glyphs';
10
10
  import { themes } from '@crewlethq/tokens';
11
11
  import { jsx, jsxs } from 'react/jsx-runtime';
12
12
 
13
+ var LogoSlotGroupContext = createContext(null);
14
+ function useLogoSlotGroup() {
15
+ return useContext(LogoSlotGroupContext);
16
+ }
17
+ function LogoSlotGroup({ children, label, hint, className, ...rest }) {
18
+ const id = useId();
19
+ const hasHint = hint !== void 0 && hint !== null && hint !== false;
20
+ const hintId = hasHint ? `${id}-hint` : void 0;
21
+ return /* @__PURE__ */ jsx(LogoSlotGroupContext.Provider, { value: { hintId }, children: /* @__PURE__ */ jsxs("div", { ...rest, role: "group", "aria-label": label, className: cx("crewlet-logo-slot-group", className), children: [
22
+ /* @__PURE__ */ jsx("div", { className: "crewlet-logo-slot-group__slots", children }),
23
+ hasHint ? /* @__PURE__ */ jsx("p", { id: hintId, className: "crewlet-logo-slot-group__hint", children: hint }) : null
24
+ ] }) });
25
+ }
13
26
  var LABELS = {
14
27
  choose: "Choose a file",
15
28
  replace: "Replace",
@@ -42,6 +55,7 @@ function LogoSlot({
42
55
  ground,
43
56
  groundColor,
44
57
  shape = "wide",
58
+ size = "md",
45
59
  src,
46
60
  alt,
47
61
  guide = true,
@@ -57,6 +71,7 @@ function LogoSlot({
57
71
  labels
58
72
  }) {
59
73
  const text = { ...LABELS, ...labels };
74
+ const group = useLogoSlotGroup();
60
75
  const labelId = useId();
61
76
  const descriptionId = useId();
62
77
  const groundValue = normalizeHex(groundColor) ?? DEFAULT_GROUNDS[ground];
@@ -86,7 +101,7 @@ function LogoSlot({
86
101
  "aria-labelledby": labelId,
87
102
  "aria-describedby": description ? descriptionId : void 0,
88
103
  "aria-busy": uploading || void 0,
89
- className: cx("crewlet-logo-slot", className),
104
+ className: cx("crewlet-logo-slot", size === "sm" && "crewlet-logo-slot--sm", className),
90
105
  children: [
91
106
  /* @__PURE__ */ jsxs("div", { className: "crewlet-logo-slot__head", children: [
92
107
  /* @__PURE__ */ jsxs("span", { className: "crewlet-logo-slot__words", children: [
@@ -96,10 +111,12 @@ function LogoSlot({
96
111
  download && filled ? /* @__PURE__ */ jsx("span", { className: "crewlet-logo-slot__download", children: download }) : null
97
112
  ] }),
98
113
  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 })
114
+ !filled && (!editable || emptyNote) || error ? /* @__PURE__ */ jsxs("div", { className: "crewlet-logo-slot__notes", children: [
115
+ !filled && (!editable || emptyNote) ? /* @__PURE__ */ jsx("p", { className: "crewlet-logo-slot__empty", children: emptyNote ?? text.empty }) : null,
116
+ error ? /* @__PURE__ */ jsxs("p", { className: "crewlet-logo-slot__error", role: "alert", children: [
117
+ /* @__PURE__ */ jsx(CircleAlertGlyph, { size: "sm", "aria-hidden": "true" }),
118
+ /* @__PURE__ */ jsx("span", { children: error })
119
+ ] }) : null
103
120
  ] }) : null,
104
121
  editable ? /* @__PURE__ */ jsxs("div", { className: "crewlet-logo-slot__foot", children: [
105
122
  /* @__PURE__ */ jsx(
@@ -111,7 +128,7 @@ function LogoSlot({
111
128
  accept,
112
129
  multiple: false,
113
130
  loading: uploading,
114
- "aria-describedby": labelId,
131
+ "aria-describedby": [labelId, group?.hintId].filter(Boolean).join(" "),
115
132
  onFiles: take,
116
133
  children: filled ? text.replace : text.choose
117
134
  }
@@ -128,7 +145,7 @@ function LogoSlot({
128
145
  children: text.remove
129
146
  }
130
147
  ) : null,
131
- /* @__PURE__ */ jsx("span", { className: "crewlet-logo-slot__hint", children: text.hint })
148
+ group ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-logo-slot__hint", children: text.hint })
132
149
  ] }) : null,
133
150
  /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("span", { role: "status", children: uploading ? text.uploading : "" }) })
134
151
  ]
@@ -136,4 +153,4 @@ function LogoSlot({
136
153
  );
137
154
  }
138
155
 
139
- export { LogoSlot };
156
+ export { LogoSlot, LogoSlotGroup };
@@ -0,0 +1,80 @@
1
+ import { VisuallyHidden } from './chunk-BZFWDIV6.js';
2
+ import { cx } from './chunk-ODEQTPFM.js';
3
+ import './ChoiceButtons-HWXEF2H3.css';
4
+ import { useId } from 'react';
5
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
+
7
+ function ChoiceButtons({
8
+ label,
9
+ options,
10
+ recommended,
11
+ recommendedLabel = "Recommended",
12
+ onChoose,
13
+ pending,
14
+ disabledReason,
15
+ size = "md",
16
+ chosen,
17
+ className,
18
+ ...rest
19
+ }) {
20
+ const reasonId = useId();
21
+ const first = options.find((o) => o.value === recommended);
22
+ const ordered = first ? [first, ...options.filter((o) => o !== first)] : options;
23
+ const busy = pending !== void 0 && pending !== null;
24
+ const inert = busy || disabledReason !== void 0;
25
+ return /* @__PURE__ */ jsxs(
26
+ "div",
27
+ {
28
+ ...rest,
29
+ role: "group",
30
+ "aria-label": label,
31
+ className: cx("crewlet-choice-buttons", size === "sm" && "crewlet-choice-buttons--sm", className),
32
+ children: [
33
+ ordered.map((option) => {
34
+ const isRecommended = option === first;
35
+ const isChosen = chosen !== void 0 && chosen !== null && option.value === chosen;
36
+ return /* @__PURE__ */ jsxs(
37
+ "button",
38
+ {
39
+ type: "button",
40
+ className: cx(
41
+ "crewlet-choice-buttons__option",
42
+ isRecommended && "crewlet-choice-buttons__option--recommended",
43
+ isChosen && "is-chosen"
44
+ ),
45
+ "aria-pressed": chosen === void 0 ? void 0 : isChosen,
46
+ "aria-disabled": inert || void 0,
47
+ "aria-busy": pending === option.value || void 0,
48
+ "aria-describedby": disabledReason === void 0 ? void 0 : reasonId,
49
+ onClick: (event) => {
50
+ if (inert) {
51
+ event.preventDefault();
52
+ return;
53
+ }
54
+ onChoose(option.value);
55
+ },
56
+ children: [
57
+ option.media === void 0 || option.media === null ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-choice-buttons__media", "aria-hidden": "true", children: option.media }),
58
+ /* @__PURE__ */ jsxs("span", { className: "crewlet-choice-buttons__text", children: [
59
+ /* @__PURE__ */ jsx("span", { className: "crewlet-choice-buttons__label", children: option.label }),
60
+ option.detail === void 0 ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
61
+ " ",
62
+ /* @__PURE__ */ jsx("span", { className: "crewlet-choice-buttons__detail", children: option.detail })
63
+ ] })
64
+ ] }),
65
+ isRecommended ? /* @__PURE__ */ jsxs(Fragment, { children: [
66
+ " ",
67
+ /* @__PURE__ */ jsx("span", { className: "crewlet-choice-buttons__note", children: recommendedLabel })
68
+ ] }) : null
69
+ ]
70
+ },
71
+ option.value
72
+ );
73
+ }),
74
+ disabledReason === void 0 ? null : /* @__PURE__ */ jsx(VisuallyHidden, { id: reasonId, children: disabledReason })
75
+ ]
76
+ }
77
+ );
78
+ }
79
+
80
+ export { ChoiceButtons };