@crewlethq/ui 0.131.1 → 0.132.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.
@@ -1,6 +1,7 @@
1
1
  import { type HTMLAttributes, type ReactNode } from 'react';
2
2
  import { type ChangeListLabels, type ChangeListRow } from '../ChangeList/index.js';
3
3
  import type { DiffListLabels } from '../DiffList/index.js';
4
+ import { type TimeValue } from '../RelativeTime/index.js';
4
5
  /**
5
6
  * Where a proposed change stands: `pending` (waiting on the person),
6
7
  * `stepup` (the approval needs a fresh sign-in), `applying` (approved and
@@ -92,6 +93,12 @@ export interface ProposalCardLabels {
92
93
  confirmationNeeded: string;
93
94
  /** The title of the collapsed `details` section. */
94
95
  details: string;
96
+ /** Said in the foot of a card with `stepUp` while it waits: the approval asks for a fresh sign-in. */
97
+ stepUpAhead: string;
98
+ /** What leads the time left on a card with `expiresAt`: "Expires" followed by "in 12m". */
99
+ expires: string;
100
+ /** Said in place of the time left once `expiresAt` has passed and the card still waits. */
101
+ lapsed: string;
95
102
  }
96
103
  export declare const PROPOSAL_CARD_LABELS: ProposalCardLabels;
97
104
  export interface ProposalCardProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
@@ -186,6 +193,27 @@ export interface ProposalCardProps extends Omit<HTMLAttributes<HTMLElement>, 'ti
186
193
  * Ignored in every other state, where the strip says what happened.
187
194
  */
188
195
  decisionRefusal?: ProposalDecisionRefusal | undefined;
196
+ /**
197
+ * Why this change deserves a closer read before it is decided, in the
198
+ * host's words: it was prepared after reading text somebody outside the
199
+ * organisation wrote, which may have asked for it. A warning callout at the
200
+ * head of the body, before the summary, while the card can still be decided
201
+ * or is being carried out. A settled card drops it with its decision.
202
+ */
203
+ caution?: ReactNode;
204
+ /**
205
+ * Whether approving asks the person to confirm it is them first. While the
206
+ * card waits (`pending`) its foot says so (`labels.stepUpAhead`), so the
207
+ * sign-in check is no surprise; in `stepup` the strip already says it.
208
+ */
209
+ stepUp?: boolean | undefined;
210
+ /**
211
+ * When the proposal stops waiting. While the card can be decided its foot
212
+ * counts down to it ("Expires in 12m") on the shared clock, with the exact
213
+ * instant on hover, and says `labels.lapsed` once it has passed. An
214
+ * unparseable value draws nothing.
215
+ */
216
+ expiresAt?: TimeValue;
189
217
  /** Replaces the default sentence of a step-up, declined, expired or stale card. */
190
218
  notice?: ReactNode;
191
219
  labels?: Partial<ProposalCardLabels> | undefined;
@@ -241,5 +269,11 @@ export interface ProposalCardProps extends Omit<HTMLAttributes<HTMLElement>, 'ti
241
269
  *
242
270
  * THE PRECISE REQUEST IS THERE, FOLDED (`details`): a compact disclosure,
243
271
  * collapsed by default, for a reader who wants the method, path and body.
272
+ *
273
+ * WHAT DECIDING INVOLVES IS SAID BEFORE THE PRESS. A change prepared from
274
+ * somebody else's words says so first (`caution`), and the foot says whether
275
+ * approving asks for a fresh sign-in (`stepUp`) and how long the decision
276
+ * stays open (`expiresAt`), each with its glyph, so neither the sign-in check
277
+ * nor a refusal for lateness comes as a surprise.
244
278
  */
245
- export declare function ProposalCard({ title, subtitle, state, scope, kind, summary, changes, changesHeading, note, details, tone, confirmation, approveLabel, onApprove, onDecline, onPrepareAgain, onRetry, receipt, failure, failureOutcome, failureHint, approveBlocked, decisionRefusal, notice, labels: overrides, changeLabels, diffLabels, className, ...rest }: ProposalCardProps): import("react").JSX.Element;
279
+ export declare function ProposalCard({ title, subtitle, state, scope, kind, summary, changes, changesHeading, note, details, tone, confirmation, approveLabel, onApprove, onDecline, onPrepareAgain, onRetry, receipt, failure, failureOutcome, failureHint, approveBlocked, decisionRefusal, caution, stepUp, expiresAt, notice, labels: overrides, changeLabels, diffLabels, className, ...rest }: ProposalCardProps): import("react").JSX.Element;
@@ -1,9 +1,12 @@
1
- export { PROPOSAL_CARD_LABELS, PROPOSAL_FAILURE_OUTCOMES, PROPOSAL_STATES, PROPOSAL_TONES, ProposalCard } from '../chunk-JDWMDK5A.js';
1
+ export { PROPOSAL_CARD_LABELS, PROPOSAL_FAILURE_OUTCOMES, PROPOSAL_STATES, PROPOSAL_TONES, ProposalCard } from '../chunk-F22XMDEK.js';
2
2
  import '../chunk-TMHG4576.js';
3
3
  import '../chunk-NB53SAL4.js';
4
4
  import '../chunk-RGJB34YN.js';
5
5
  import '../chunk-X227R7IP.js';
6
+ import '../chunk-RCQLXOGS.js';
6
7
  import '../chunk-SJ3EUCFD.js';
8
+ import '../chunk-GBKBME7Q.js';
9
+ import '../chunk-WGLOH33S.js';
7
10
  import '../chunk-RABEMWTA.js';
8
11
  import '../chunk-AV2DXAEL.js';
9
12
  import '../chunk-475DOAWF.js';
@@ -18,6 +18,26 @@
18
18
  text-align: end;
19
19
  }
20
20
 
21
+ /* WHAT APPROVING INVOLVES (a fresh sign-in, the time left), on a line of
22
+ its own above the decision and at its end, in the foot's quiet register,
23
+ each term led by its glyph. The terms wrap as units, never mid-term. */
24
+ .crewlet-proposal-card__terms {
25
+ display: flex;
26
+ flex: 1 1 100%;
27
+ flex-wrap: wrap;
28
+ justify-content: flex-end;
29
+ gap: var(--spacing-1) var(--spacing-3);
30
+ margin: 0;
31
+ color: var(--color-text-secondary);
32
+ font-size: var(--font-size-compact);
33
+ }
34
+
35
+ .crewlet-proposal-card__term {
36
+ display: inline-flex;
37
+ align-items: center;
38
+ gap: var(--spacing-1);
39
+ }
40
+
21
41
  /* THE DELIBERATE CONFIRMATION, on a row of its own above the decision. It
22
42
  starts at the foot's start edge, unlike the one-line reasons around it: a
23
43
  checkbox's sentence wraps under its own first line, and set at the end its
@@ -1,6 +1,6 @@
1
- export { RAIL_LIST_LABELS, RailList } from '../chunk-32QLSXKL.js';
1
+ export { RAIL_LIST_LABELS, RailList } from '../chunk-WWCQDCH5.js';
2
2
  import '../chunk-SM2MM4DQ.js';
3
- import '../chunk-6ZFQ6TAM.js';
3
+ import '../chunk-OU22GKZK.js';
4
4
  import '../chunk-6KWNXIDE.js';
5
5
  import '../chunk-KW7T23RT.js';
6
6
  import '../chunk-TODOBUXO.js';
@@ -1,4 +1,4 @@
1
- export { RichEditor, preloadRichEditor } from '../chunk-4H577HEE.js';
1
+ export { RichEditor, preloadRichEditor } from '../chunk-SVUSIXFQ.js';
2
2
  export { RICH_EDITOR_LABELS, richEditorLabels } from '../chunk-2DMTW2Y3.js';
3
3
  import '../chunk-KOJPDCGQ.js';
4
4
  import '../chunk-KBZO4B33.js';
@@ -10,6 +10,12 @@ export type SelectAlign = 'left' | 'right';
10
10
  * that keeps a row of them even and a cap that stops one long value pushing
11
11
  * the rest of the bar off the screen. A filter row of full-width selects is
12
12
  * one question per line, which is not what a filter bar is.
13
+ *
14
+ * The LIST follows the mode: a field's list matches its field, and a picker's
15
+ * sizes to its options with the trigger as a floor. Either way a list whose
16
+ * options carry a description is never narrower than a readable floor or
17
+ * wider than a readable measure, so a field in a table cell does not offer
18
+ * its sentences a word to a line, and no list is wider than the window.
13
19
  */
14
20
  export type SelectWidth = 'full' | 'auto';
15
21
  /** How much chrome a picker draws. See [SelectProps.appearance]. */
@@ -1,4 +1,4 @@
1
- export { Select } from '../chunk-6ZFQ6TAM.js';
1
+ export { Select } from '../chunk-OU22GKZK.js';
2
2
  import '../chunk-KW7T23RT.js';
3
3
  import '../chunk-JLKO7PSK.js';
4
4
  import '../chunk-2YTOOH3A.js';
@@ -257,12 +257,49 @@ svg.crewlet-select__chevron {
257
257
  /* Six rows and a scroll. A list that draws past the bottom of the dialog
258
258
  it was opened in is a list whose last answers nobody finds. */
259
259
  --crewlet-select-menu-max-height: 12rem;
260
+ /*
261
+ * THE FLOOR AND THE MEASURE a list asks for beside its trigger's width. A
262
+ * list of names asks for neither: it is as wide as its trigger at least,
263
+ * and a picker's is as wide as its longest name. A described list asks for
264
+ * both (below).
265
+ */
266
+ --crewlet-select-menu-min-width: 0px;
267
+ --crewlet-select-menu-max-width: 100vw;
260
268
 
261
269
  position: fixed;
262
270
  display: flex;
263
271
  flex-direction: column;
264
- min-width: 0;
265
- max-height: min(var(--crewlet-select-menu-max-height), 60vh);
272
+ /*
273
+ * THE WIDTH IS MADE HERE from three measurements the component writes when
274
+ * it places the panel (Select.tsx, `position`): the field's width
275
+ * (--crewlet-select-anchor-width), the room's (--crewlet-select-room-width)
276
+ * and the height beside the field (--crewlet-select-room-height). Each
277
+ * bound is the larger of the field and what the list asks for, and never
278
+ * more than the room, so on a phone the room wins over a floor that would
279
+ * hang past its edge.
280
+ *
281
+ * The field's width used to be the panel's whole width, written on the node
282
+ * with no minimum, so a field in a table cell offered a sentence per option
283
+ * in a 115px panel, a word or two to a line and one option taller than the
284
+ * window. A screen's own min-width could not lift it either: one class
285
+ * against this one, it won or lost by which stylesheet the page linked
286
+ * last.
287
+ */
288
+ min-width: min(
289
+ max(var(--crewlet-select-anchor-width, 0px), var(--crewlet-select-menu-min-width)),
290
+ var(--crewlet-select-room-width, 100vw)
291
+ );
292
+ max-width: min(
293
+ max(var(--crewlet-select-anchor-width, 0px), var(--crewlet-select-menu-max-width)),
294
+ var(--crewlet-select-room-width, 100vw)
295
+ );
296
+ /* Never taller than the larger side beside the field, so it fits on that
297
+ side and never covers the field and the answer it shows. */
298
+ max-height: min(
299
+ var(--crewlet-select-menu-max-height),
300
+ 60vh,
301
+ var(--crewlet-select-room-height, 100vh)
302
+ );
266
303
  /*
267
304
  * THE PANEL IS THE PRODUCT'S SURFACE, on the panel hairline, at the panel
268
305
  * corner. A list offered from a field is another panel over the one the
@@ -284,12 +321,30 @@ svg.crewlet-select__chevron {
284
321
  z-index: var(--z-index-popover);
285
322
  }
286
323
 
287
- /* SIX ROWS OF THE LIST'S OWN HEIGHT. A row with a second line (an option's
288
- description) is twice a one-line row, so the same six rows need twice the
289
- room: at 12rem a list of four described answers scrolled, and the first or
290
- the last of them was cut at the panel's edge. */
324
+ /* A FIELD'S LIST MATCHES ITS FIELD: exactly the field's width, unless the
325
+ list asks for a wider floor, and never wider than the room. */
326
+ .crewlet-select__menu--matches {
327
+ width: min(
328
+ max(var(--crewlet-select-anchor-width, 0px), var(--crewlet-select-menu-min-width)),
329
+ var(--crewlet-select-room-width, 100vw)
330
+ );
331
+ }
332
+
333
+ /*
334
+ * A DESCRIBED LIST READS AS PROSE, so it is set at a reading width. Its
335
+ * floor keeps a sentence to whole phrases a line (about fifty characters at
336
+ * the description's size), and its measure keeps a picker's long sentence
337
+ * from running one line across the window (about seventy).
338
+ *
339
+ * SIX ROWS OF THE LIST'S OWN HEIGHT. A row with a second line (an option's
340
+ * description) is twice a one-line row, so the same six rows need twice the
341
+ * room: at 12rem a list of four described answers scrolled, and the first or
342
+ * the last of them was cut at the panel's edge.
343
+ */
291
344
  .crewlet-select__menu--described {
292
345
  --crewlet-select-menu-max-height: 24rem;
346
+ --crewlet-select-menu-min-width: 22rem;
347
+ --crewlet-select-menu-max-width: 28rem;
293
348
  }
294
349
 
295
350
  /* Inside a layer host the panel is placed against the host's own box. */
@@ -443,6 +498,9 @@ svg.crewlet-select__chevron {
443
498
  font-size: var(--font-size-2xs);
444
499
  line-height: var(--font-line-height-normal);
445
500
  color: var(--color-text-tertiary);
501
+ /* A word longer than the measure (an address, an id) breaks rather than
502
+ running out of the panel, which clips it. */
503
+ overflow-wrap: break-word;
446
504
  }
447
505
 
448
506
  /* The second line stays the second line on the row the reader is on: it is
@@ -1,5 +1,5 @@
1
- export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-WZ5TDJ2K.js';
2
- import '../chunk-6ZFQ6TAM.js';
1
+ export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-7GFLKLCG.js';
2
+ import '../chunk-OU22GKZK.js';
3
3
  import '../chunk-VSD3536L.js';
4
4
  import '../chunk-KW7T23RT.js';
5
5
  import '../chunk-3T6URIXM.js';
@@ -1,5 +1,5 @@
1
- export { SHEET_COLUMN_EDITOR_LABELS, SheetColumnEditor, SheetColumnTypeGlyph } from '../chunk-CX4JXBS3.js';
2
- import '../chunk-6ZFQ6TAM.js';
1
+ export { SHEET_COLUMN_EDITOR_LABELS, SheetColumnEditor, SheetColumnTypeGlyph } from '../chunk-WIGJ4J5U.js';
2
+ import '../chunk-OU22GKZK.js';
3
3
  import '../chunk-FFMCMSJB.js';
4
4
  import '../chunk-KW7T23RT.js';
5
5
  import '../chunk-LFSIKGRQ.js';
@@ -1,5 +1,5 @@
1
- export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-GQPKDPMS.js';
2
- import '../chunk-6ZFQ6TAM.js';
1
+ export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-6W5D4A3V.js';
2
+ import '../chunk-OU22GKZK.js';
3
3
  import '../chunk-KW7T23RT.js';
4
4
  import '../chunk-EE3DJMSQ.js';
5
5
  import '../chunk-KDRJZWE3.js';
@@ -1,5 +1,5 @@
1
- export { REFERENCE_NAME_PATTERN, ValueField, completeReference, isWholeReference, rankReferences, referenceAt, urlSchemeOf } from '../chunk-QDXSBVZR.js';
2
- import '../chunk-6ZFQ6TAM.js';
1
+ export { REFERENCE_NAME_PATTERN, ValueField, completeReference, isWholeReference, rankReferences, referenceAt, urlSchemeOf } from '../chunk-TBNA64RD.js';
2
+ import '../chunk-OU22GKZK.js';
3
3
  import '../chunk-WUJ54OTI.js';
4
4
  import '../chunk-KW7T23RT.js';
5
5
  import '../chunk-NN44J7BP.js';
@@ -1,4 +1,4 @@
1
- import { Select } from './chunk-6ZFQ6TAM.js';
1
+ import { Select } from './chunk-OU22GKZK.js';
2
2
  import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-EE3DJMSQ.js';
3
3
  import { Popover } from './chunk-KDRJZWE3.js';
4
4
  import { Input } from './chunk-NN44J7BP.js';
@@ -1,4 +1,4 @@
1
- import { Select } from './chunk-6ZFQ6TAM.js';
1
+ import { Select } from './chunk-OU22GKZK.js';
2
2
  import { Modal } from './chunk-VSD3536L.js';
3
3
  import { CopyButton } from './chunk-2MEBMWNO.js';
4
4
  import { Callout } from './chunk-RCQLXOGS.js';
@@ -1,16 +1,18 @@
1
1
  import { RefusalStrip, ReceiptStrip } from './chunk-TMHG4576.js';
2
2
  import { ChangeList } from './chunk-NB53SAL4.js';
3
3
  import { StatusCard } from './chunk-X227R7IP.js';
4
+ import { Callout } from './chunk-RCQLXOGS.js';
5
+ import { useNow, formatUntil, formatExact, toISO } from './chunk-GBKBME7Q.js';
4
6
  import { Checkbox } from './chunk-KFTVPWG2.js';
5
7
  import { Disclosure } from './chunk-D5O64CVE.js';
6
8
  import { Button } from './chunk-M2M6ZD7P.js';
7
9
  import { Spinner } from './chunk-XSPCITPN.js';
8
10
  import { cx } from './chunk-ODEQTPFM.js';
9
11
  import './VisuallyHidden-OUYVMKEH.css';
10
- import './ProposalCard-SF332W4E.css';
12
+ import './ProposalCard-CU4C6BKL.css';
11
13
  import { useId, useRef, useLayoutEffect, useState, useEffect } from 'react';
12
- import { RefreshCwGlyph, LockGlyph, BanGlyph, ClockGlyph, CircleAlertGlyph, CircleCheckGlyph } from '@crewlethq/icons/glyphs';
13
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
14
+ import { LockGlyph, ClockGlyph, RefreshCwGlyph, BanGlyph, CircleAlertGlyph, CircleCheckGlyph } from '@crewlethq/icons/glyphs';
15
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
14
16
 
15
17
  var PROPOSAL_STATES = [
16
18
  "pending",
@@ -53,7 +55,10 @@ var PROPOSAL_CARD_LABELS = {
53
55
  unknownNotice: "Could not confirm whether this was applied. It may have landed.",
54
56
  busy: "The approved change is being carried out",
55
57
  confirmationNeeded: "Check the confirmation above first",
56
- details: "Technical details"
58
+ details: "Technical details",
59
+ stepUpAhead: "Approving asks you to confirm it\u2019s you",
60
+ expires: "Expires",
61
+ lapsed: "Past its time, so it can no longer be approved"
57
62
  };
58
63
  var SETTLED = /* @__PURE__ */ new Set(["applied", "declined", "expired", "stale", "failed"]);
59
64
  var ARMING_MS = 500;
@@ -110,6 +115,9 @@ function ProposalCard({
110
115
  failureHint,
111
116
  approveBlocked,
112
117
  decisionRefusal,
118
+ caution,
119
+ stepUp = false,
120
+ expiresAt,
113
121
  notice,
114
122
  labels: overrides,
115
123
  changeLabels,
@@ -142,6 +150,23 @@ function ProposalCard({
142
150
  const blocked = deciding && approveBlocked ? approveBlocked : void 0;
143
151
  const refusal = deciding ? decisionRefusal : void 0;
144
152
  const danger = tone === "danger" && !settled;
153
+ const now = useNow();
154
+ const until = deciding && expiresAt !== void 0 ? formatUntil(expiresAt, now) : null;
155
+ const signIn = state === "pending" && stepUp;
156
+ const terms = signIn || until !== null ? /* @__PURE__ */ jsxs("p", { className: "crewlet-proposal-card__terms", children: [
157
+ signIn ? /* @__PURE__ */ jsxs("span", { className: "crewlet-proposal-card__term", children: [
158
+ /* @__PURE__ */ jsx(LockGlyph, { size: "xs" }),
159
+ labels.stepUpAhead
160
+ ] }) : null,
161
+ until === null ? null : /* @__PURE__ */ jsxs("span", { className: "crewlet-proposal-card__term", children: [
162
+ /* @__PURE__ */ jsx(ClockGlyph, { size: "xs" }),
163
+ until === "due" ? labels.lapsed : /* @__PURE__ */ jsxs("time", { dateTime: toISO(expiresAt) ?? void 0, title: formatExact(expiresAt) ?? void 0, children: [
164
+ labels.expires,
165
+ " ",
166
+ until
167
+ ] })
168
+ ] })
169
+ ] }) : null;
145
170
  const identity = `${title}\0${approveLabel}`;
146
171
  const [tickedFor, setTickedFor] = useState(void 0);
147
172
  if (settled && tickedFor !== void 0) setTickedFor(void 0);
@@ -159,6 +184,7 @@ function ProposalCard({
159
184
  }, [armKey]);
160
185
  const arming = armKey !== void 0 && !(arm.key === armKey && arm.armed);
161
186
  const decision = deciding || state === "applying" ? /* @__PURE__ */ jsxs(Fragment, { children: [
187
+ terms,
162
188
  /* @__PURE__ */ jsx(
163
189
  "div",
164
190
  {
@@ -242,6 +268,7 @@ function ProposalCard({
242
268
  "data-tone": danger ? "danger" : void 0,
243
269
  "data-outcome": state === "failed" ? failureOutcome : void 0,
244
270
  children: [
271
+ caution === void 0 || caution === null || settled ? null : /* @__PURE__ */ jsx(Callout, { className: "crewlet-proposal-card__caution", variant: "warning", children: caution }),
245
272
  summary === void 0 || summary === null ? null : /* @__PURE__ */ jsx("p", { className: "crewlet-proposal-card__summary", children: summary }),
246
273
  /* @__PURE__ */ jsx(
247
274
  ChangeList,
@@ -1,12 +1,12 @@
1
1
  import { useListbox, useOptionKeys, useHighlightRest } from './chunk-KW7T23RT.js';
2
2
  import { useFieldError } from './chunk-JLKO7PSK.js';
3
3
  import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
4
- import { useLayerContainer, viewportBounds, LAYER_GAP, anchorGone, placePopup, LAYER_REPOSITION_EVENT } from './chunk-FIX72ZEC.js';
4
+ import { useLayerContainer, viewportBounds, visibleBounds, LAYER_GAP, anchorGone, placePopup, LAYER_REPOSITION_EVENT } from './chunk-FIX72ZEC.js';
5
5
  import { useFocusModality, returnFocus } from './chunk-4ITETIGZ.js';
6
6
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
7
7
  import { cx } from './chunk-ODEQTPFM.js';
8
8
  import './HitArea-QUOS6ZDJ.css';
9
- import './Select-AF5YMSC6.css';
9
+ import './Select-2FAOIL73.css';
10
10
  import { forwardRef, useId, useMemo, useState, useRef, useCallback, useEffect, useLayoutEffect } from 'react';
11
11
  import { createPortal } from 'react-dom';
12
12
  import { ChevronDownGlyph, CheckGlyph, SearchGlyph } from '@crewlethq/icons/glyphs';
@@ -169,6 +169,13 @@ var NativeSelect = forwardRef(function NativeSelect2({ id, value, onChange, opti
169
169
  }
170
170
  );
171
171
  });
172
+ function placeVars({ anchor, room, tall }) {
173
+ return {
174
+ "--crewlet-select-anchor-width": `${anchor}px`,
175
+ "--crewlet-select-room-width": `${room}px`,
176
+ "--crewlet-select-room-height": `${tall}px`
177
+ };
178
+ }
172
179
  var ListboxSelect = forwardRef(function ListboxSelect2({
173
180
  id,
174
181
  chosen,
@@ -334,16 +341,25 @@ var ListboxSelect = forwardRef(function ListboxSelect2({
334
341
  const inHost = container !== document.body;
335
342
  const host = inHost ? container.getBoundingClientRect() : viewportBounds();
336
343
  const rect = at.getBoundingClientRect();
337
- const matches = width === "full";
338
- const room = Math.max(0, host.width - 2 * LAYER_GAP);
339
- const floor = matches ? void 0 : Math.min(rect.width, room);
340
- box.style.maxWidth = `${room}px`;
341
- box.style.width = matches ? `${Math.min(rect.width, room)}px` : "";
342
- box.style.minWidth = floor === void 0 ? "" : `${floor}px`;
344
+ const bounds = visibleBounds(host, inHost);
345
+ const anchorY = rect.top - (inHost ? host.y : 0);
346
+ const sizes = {
347
+ anchor: rect.width,
348
+ // NEVER WIDER THAN THE ROOM IT IS PLACED IN: sized to its longest
349
+ // option, a panel wider than a phone hung past the edge however it was
350
+ // slid.
351
+ room: bounds.width,
352
+ tall: Math.max(
353
+ bounds.y + bounds.height - (anchorY + rect.height + LAYER_GAP),
354
+ anchorY - LAYER_GAP - bounds.y,
355
+ 0
356
+ )
357
+ };
358
+ for (const [name2, value] of Object.entries(placeVars(sizes))) box.style.setProperty(name2, value);
343
359
  const own = box.getBoundingClientRect();
344
360
  const local = {
345
361
  x: (align === "right" ? rect.right - own.width : rect.left) - (inHost ? host.x : 0),
346
- y: rect.top - (inHost ? host.y : 0),
362
+ y: anchorY,
347
363
  width: rect.width,
348
364
  height: rect.height
349
365
  };
@@ -351,16 +367,11 @@ var ListboxSelect = forwardRef(function ListboxSelect2({
351
367
  close(panel.current?.contains(document.activeElement) ?? false);
352
368
  return;
353
369
  }
354
- const spot = placePopup(
355
- local,
356
- { width: own.width, height: own.height },
357
- { x: LAYER_GAP, y: LAYER_GAP, width: host.width - 2 * LAYER_GAP, height: host.height - 2 * LAYER_GAP }
358
- );
359
- const applied = matches ? Math.min(rect.width, room) : void 0;
370
+ const spot = placePopup(local, { width: own.width, height: own.height }, bounds);
360
371
  setPlace(
361
- (was) => was && was.left === spot.left && was.top === spot.top && was.width === applied && was.minWidth === floor && was.maxWidth === room ? was : { left: spot.left, top: spot.top, width: applied, minWidth: floor, maxWidth: room }
372
+ (was) => was && was.left === spot.left && was.top === spot.top && was.anchor === sizes.anchor && was.room === sizes.room && was.tall === sizes.tall ? was : { left: spot.left, top: spot.top, ...sizes }
362
373
  );
363
- }, [align, close, container, width]);
374
+ }, [align, close, container]);
364
375
  useLayoutEffect(() => {
365
376
  if (!open) {
366
377
  setPlace(null);
@@ -498,10 +509,13 @@ var ListboxSelect = forwardRef(function ListboxSelect2({
498
509
  // lines tall, so the one-line cap scrolled a list of four described
499
510
  // answers and cut the first or the last of them.
500
511
  described && "crewlet-select__menu--described",
512
+ // A field's list matches its field; a picker's sizes to its options.
513
+ // The width policy follows the mode (Select.css, "The panel").
514
+ width === "full" && "crewlet-select__menu--matches",
501
515
  container !== null && container !== document.body ? "crewlet-select__menu--in-host" : "crewlet-select__menu--fixed",
502
516
  menuClassName
503
517
  ),
504
- style: place ? { left: place.left, top: place.top, width: place.width, minWidth: place.minWidth, maxWidth: place.maxWidth } : (
518
+ style: place ? { left: place.left, top: place.top, ...placeVars(place) } : (
505
519
  // Laid out but not painted, so its own height can be measured
506
520
  // before it is placed and no reader sees it in a corner first.
507
521
  { visibility: "hidden" }
@@ -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-HDHT5BX2.js').then(
12
+ loading ??= import('./Editor-A6XNXRDS.js').then(
13
13
  (module) => {
14
14
  engine = module.Editor;
15
15
  return engine;
@@ -1,11 +1,11 @@
1
- import { Select } from './chunk-6ZFQ6TAM.js';
1
+ import { Select } from './chunk-OU22GKZK.js';
2
2
  import { Combobox } from './chunk-WUJ54OTI.js';
3
3
  import { FormField, Textarea, InputAffix } from './chunk-NN44J7BP.js';
4
4
  import './Input-YVCNNTYT.css';
5
5
  import './VisuallyHidden-OUYVMKEH.css';
6
6
  import './HitArea-QUOS6ZDJ.css';
7
7
  import './Combobox-F5VEJIAO.css';
8
- import './Select-AF5YMSC6.css';
8
+ import './Select-2FAOIL73.css';
9
9
  import './ValueField-EIBD6RYS.css';
10
10
  import { useId, useRef, useState } from 'react';
11
11
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { Select } from './chunk-6ZFQ6TAM.js';
1
+ import { Select } from './chunk-OU22GKZK.js';
2
2
  import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chunk-LFSIKGRQ.js';
3
3
  import { HueSwatch } from './chunk-FIH5EMJF.js';
4
4
  import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
@@ -1,5 +1,5 @@
1
1
  import { SidebarNav, NavItem } from './chunk-SM2MM4DQ.js';
2
- import { Select } from './chunk-6ZFQ6TAM.js';
2
+ import { Select } from './chunk-OU22GKZK.js';
3
3
  import { Card } from './chunk-RABEMWTA.js';
4
4
  import { Text } from './chunk-475DOAWF.js';
5
5
  import './RailList-N2ZBPRM2.css';
@@ -2,18 +2,18 @@ import '../chunk-2KUAO2CX.js';
2
2
  export { ElementToPngError, elementToPng, parseCsv, peelPunctuation, serializeElement, toCsv } from '../chunk-BALBOOKX.js';
3
3
  export { TREE_ADD_MARK_MIN_ZOOM, TreeCanvas } from '../chunk-HMEFWPAA.js';
4
4
  export { TypeSpecimen } from '../chunk-JKAFEFFC.js';
5
- export { REFERENCE_NAME_PATTERN, ValueField, completeReference, isWholeReference, rankReferences, referenceAt, urlSchemeOf } from '../chunk-QDXSBVZR.js';
5
+ export { REFERENCE_NAME_PATTERN, ValueField, completeReference, isWholeReference, rankReferences, referenceAt, urlSchemeOf } from '../chunk-TBNA64RD.js';
6
6
  export { VERSION_COMPARE_LABELS, VERSION_COMPARE_LENSES, VersionCompare } from '../chunk-63NULHGF.js';
7
7
  export { VersionTimeline } from '../chunk-RM5RKPFV.js';
8
8
  export { WidgetFrame } from '../chunk-5ZTH54O6.js';
9
9
  export { TileGrid } from '../chunk-UFID3DSP.js';
10
10
  export { TIME_RANGE_CUSTOM, TIME_RANGE_PICKER_LABELS, TimeRangePicker, timeRangeFieldKey, timeRangeProblem } from '../chunk-B5MCTPXL.js';
11
- export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-GQPKDPMS.js';
11
+ export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-6W5D4A3V.js';
12
12
  export { ToastProvider, Toaster, readingDuration, toasterInsetStyle, useToast } from '../chunk-B6AQY6FH.js';
13
13
  export { TagsInput } from '../chunk-A5VNNA3V.js';
14
14
  export { ThemeGallery } from '../chunk-35ALKQC5.js';
15
- export { ThemeSwatch } from '../chunk-3XQUEF5C.js';
16
15
  export { DensitySwitcher, ThemeSwitcher } from '../chunk-JDRBZYIA.js';
16
+ export { ThemeSwatch } from '../chunk-3XQUEF5C.js';
17
17
  export { ThemeToggle } from '../chunk-5RXY2RL4.js';
18
18
  export { applyStoredPreferences, resolveTheme, useDensityPreference, useSystemTheme, useThemePreference } from '../chunk-Z24ZUSTX.js';
19
19
  export { ThinkingIndicator } from '../chunk-DX7ZHO47.js';
@@ -21,8 +21,8 @@ export { THREAD_SUMMARY_FACE, THREAD_SUMMARY_LABELS, ThreadSummary } from '../ch
21
21
  export { Switcher } from '../chunk-GPEXCG5K.js';
22
22
  export { TABLE_TAGS_CELL_LABELS, TableDateCell, TableEntityCell, TableKeyCell, TableNumberCell, TableStatusCell, TableTagsCell, TableTextCell, TableTwoLineCell } from '../chunk-R4YUMULC.js';
23
23
  export { StatCard } from '../chunk-2YADDY4A.js';
24
- export { Statement } from '../chunk-MZJKPTA5.js';
25
24
  export { StatGroup } from '../chunk-OUD75UB2.js';
25
+ export { Statement } from '../chunk-MZJKPTA5.js';
26
26
  export { StatusLegend } from '../chunk-CXFMNOPV.js';
27
27
  export { StatusLine } from '../chunk-435WY2WT.js';
28
28
  export { SLIDE_COMPARE_LABELS, SlideCompare } from '../chunk-FSCJV5M5.js';
@@ -30,8 +30,8 @@ export { SlideFilmstrip } from '../chunk-JG66SXCX.js';
30
30
  export { SlideGrid } from '../chunk-73L3774J.js';
31
31
  export { SOURCE_EDITOR_KEYS, SourceEditor, lineStart } from '../chunk-S656HY4W.js';
32
32
  export { SetupWizard } from '../chunk-2DZV4PHK.js';
33
- export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-WZ5TDJ2K.js';
34
- export { SHEET_COLUMN_EDITOR_LABELS, SheetColumnEditor, SheetColumnTypeGlyph } from '../chunk-CX4JXBS3.js';
33
+ export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-7GFLKLCG.js';
34
+ export { SHEET_COLUMN_EDITOR_LABELS, SheetColumnEditor, SheetColumnTypeGlyph } from '../chunk-WIGJ4J5U.js';
35
35
  export { CellDisplay, CellEditor, CheckboxCell, DateCell, LongTextCell, MultiSelectCell, NumberCell, PersonCell, RatingCell, SelectCell, SheetCell, SheetGrid, StatusCell, TextCell, UrlCell } from '../chunk-SRPV3EAJ.js';
36
36
  export { TagGroup } from '../chunk-FOUIZS7Q.js';
37
37
  export { matchesShortcut, useShortcut } from '../chunk-K6PKXCR2.js';
@@ -42,10 +42,10 @@ export { SelectionBar } from '../chunk-XIKU44QE.js';
42
42
  export { SEND_BUTTON_LABELS, SendButton } from '../chunk-PNSUXNNY.js';
43
43
  export { SettingsTable, SettingsTableRow } from '../chunk-FRXOUBN2.js';
44
44
  export { ReviewList } from '../chunk-7XYU5PSQ.js';
45
+ export { RichEditor, preloadRichEditor } from '../chunk-SVUSIXFQ.js';
46
+ export { RICH_EDITOR_LABELS, richEditorLabels } from '../chunk-2DMTW2Y3.js';
45
47
  export { canonicalMarkdown, roundTripMarkdown } from '../chunk-GBASM5EV.js';
46
48
  import '../chunk-7CSTEH5I.js';
47
- export { RichEditor, preloadRichEditor } from '../chunk-4H577HEE.js';
48
- export { RICH_EDITOR_LABELS, richEditorLabels } from '../chunk-2DMTW2Y3.js';
49
49
  export { RoomRow } from '../chunk-45OOFAL6.js';
50
50
  export { RUN_STATES, RunChip } from '../chunk-L6SYLG3F.js';
51
51
  export { FRAME_HELLO_TIMEOUT_MS, FRAME_LOAD_GRACE_MS, SandboxedFrame, SandboxedFrameNotice, SandboxedFramePlaceholder } from '../chunk-4EKHHHOQ.js';
@@ -58,12 +58,12 @@ export { RESULT_TABLE_CARD_LABELS, RESULT_TABLE_COLLAPSED_ROWS, RESULT_TABLE_MAX
58
58
  export { Table } from '../chunk-YGN4SBNP.js';
59
59
  export { PrincipalPicker } from '../chunk-NSUMHNUS.js';
60
60
  export { PropertyList } from '../chunk-N2DCSSYC.js';
61
- export { PROPOSAL_CARD_LABELS, PROPOSAL_FAILURE_OUTCOMES, PROPOSAL_STATES, PROPOSAL_TONES, ProposalCard } from '../chunk-JDWMDK5A.js';
61
+ export { PROPOSAL_CARD_LABELS, PROPOSAL_FAILURE_OUTCOMES, PROPOSAL_STATES, PROPOSAL_TONES, ProposalCard } from '../chunk-F22XMDEK.js';
62
62
  export { Prose } from '../chunk-DVVP27OD.js';
63
63
  export { QR_DARK, QR_LIGHT, QR_QUIET_ZONE, QrCode, qrModulePath, qrModules } from '../chunk-Y56FM3K4.js';
64
- export { RAIL_LIST_LABELS, RailList } from '../chunk-32QLSXKL.js';
64
+ export { RAIL_LIST_LABELS, RailList } from '../chunk-WWCQDCH5.js';
65
65
  export { NavDivider, NavGroup, NavItem, SidebarNav } from '../chunk-SM2MM4DQ.js';
66
- export { Select } from '../chunk-6ZFQ6TAM.js';
66
+ export { Select } from '../chunk-OU22GKZK.js';
67
67
  export { AddReaction, REACTION_BAR_LABELS, ReactionBar, reactionWho } from '../chunk-LZCGLS7U.js';
68
68
  export { PinTile } from '../chunk-7XRAYILF.js';
69
69
  export { PresenceStack } from '../chunk-MTIW75QU.js';
@@ -76,9 +76,9 @@ export { OrgTable, OrgTableActions, OrgTableAdd, OrgTableName } from '../chunk-6
76
76
  export { TreeGrid } from '../chunk-P4QAS5TS.js';
77
77
  export { Outline, scrollToHeading, useActiveHeading } from '../chunk-WYIPKGEO.js';
78
78
  export { PageNote } from '../chunk-CV4NES3P.js';
79
- export { PEEK_RAIL_LABELS, PEEK_RAIL_MAX_WIDTH, PEEK_RAIL_MIN_WIDTH, PEEK_RAIL_WIDTH, PeekHost, PeekNeighbours, PeekRail, isPlainPress, peekClickHandler, peekRowActivation, usePeekNeighbours, usePeekOrder, usePeekStep } from '../chunk-RFNPJDNS.js';
80
79
  export { PEOPLE_RAIL_LABELS, PeopleRail, peopleRailKey } from '../chunk-6NXY7OEH.js';
81
80
  import '../chunk-CENOOTAV.js';
81
+ export { PEEK_RAIL_LABELS, PEEK_RAIL_MAX_WIDTH, PEEK_RAIL_MIN_WIDTH, PEEK_RAIL_WIDTH, PeekHost, PeekNeighbours, PeekRail, isPlainPress, peekClickHandler, peekRowActivation, usePeekNeighbours, usePeekOrder, usePeekStep } from '../chunk-RFNPJDNS.js';
82
82
  export { MessageBubble } from '../chunk-KAQ2L74F.js';
83
83
  export { NewItemsNotice } from '../chunk-NCQC5Y4E.js';
84
84
  export { FactLine, ObjectHeader, SET_BY_VERBS, SetByLine } from '../chunk-W443OSWT.js';
@@ -171,8 +171,8 @@ export { CONFLICT_NOTE_LABELS, ConflictNote } from '../chunk-DM3BTGBZ.js';
171
171
  export { CHIP_FIELD_LABELS, ChipField } from '../chunk-YUW4DD2Z.js';
172
172
  export { ChoiceButtons } from '../chunk-AHW3K3SH.js';
173
173
  export { ChoiceCards } from '../chunk-FHPHRIPO.js';
174
- export { CLAMP_LABELS, Clamp } from '../chunk-IZGB6SQE.js';
175
174
  export { ChoiceList } from '../chunk-XU7RQNT6.js';
175
+ export { CLAMP_LABELS, Clamp } from '../chunk-IZGB6SQE.js';
176
176
  export { CodeBlock } from '../chunk-FPCTHIV6.js';
177
177
  export { Copyable } from '../chunk-3T6URIXM.js';
178
178
  export { CopyButton } from '../chunk-2MEBMWNO.js';
@@ -264,11 +264,11 @@ export { Menu } from '../chunk-WGAEHKGW.js';
264
264
  export { ACCESS_DENIED_REASONS, AccessDeniedCard } from '../chunk-QTMUKRTN.js';
265
265
  export { EmptyState } from '../chunk-PPUR46MK.js';
266
266
  export { Accordion, AccordionItem } from '../chunk-3QEAANRP.js';
267
- export { ACTION_CARD_GROUND, ActionCard, ActionCardRow } from '../chunk-OM2LABPS.js';
268
267
  export { ActivityLine } from '../chunk-FNJCCVQX.js';
269
268
  export { BouncingDots, WORKING_LINE_LABELS, WorkingLine, workingAnnouncement, workingSentence } from '../chunk-OYKQVTJB.js';
270
269
  export { AvatarStack, avatarStackLabel } from '../chunk-ARZGEHWE.js';
271
270
  export { AVATAR_CHARACTER_FULL_DETAIL, AVATAR_CORNER_RANGE, AVATAR_CORNER_RATIO, AVATAR_SIZES, AVATAR_STATUSES, AVATAR_STATUS_LABELS, Avatar, avatarCorner, avatarInitialsName, avatarPixels, avatarTint, getInitials } from '../chunk-XZY6S3UC.js';
271
+ export { ACTION_CARD_GROUND, ActionCard, ActionCardRow } from '../chunk-OM2LABPS.js';
272
272
  export { ADD_PILL_MS, AddPill } from '../chunk-5W3EYO5Q.js';
273
273
  export { AGENT_HANDOFF_LABELS, AgentHandoffPanel } from '../chunk-NZFYX5UF.js';
274
274
  export { Timeline, TimelineItem } from '../chunk-XDUXAQIS.js';
package/dist/index.js CHANGED
@@ -2,18 +2,18 @@ import './chunk-2KUAO2CX.js';
2
2
  export { ElementToPngError, elementToPng, parseCsv, peelPunctuation, serializeElement, toCsv } from './chunk-BALBOOKX.js';
3
3
  export { TREE_ADD_MARK_MIN_ZOOM, TreeCanvas } from './chunk-HMEFWPAA.js';
4
4
  export { TypeSpecimen } from './chunk-JKAFEFFC.js';
5
- export { REFERENCE_NAME_PATTERN, ValueField, completeReference, isWholeReference, rankReferences, referenceAt, urlSchemeOf } from './chunk-QDXSBVZR.js';
5
+ export { REFERENCE_NAME_PATTERN, ValueField, completeReference, isWholeReference, rankReferences, referenceAt, urlSchemeOf } from './chunk-TBNA64RD.js';
6
6
  export { VERSION_COMPARE_LABELS, VERSION_COMPARE_LENSES, VersionCompare } from './chunk-63NULHGF.js';
7
7
  export { VersionTimeline } from './chunk-RM5RKPFV.js';
8
8
  export { WidgetFrame } from './chunk-5ZTH54O6.js';
9
9
  export { TileGrid } from './chunk-UFID3DSP.js';
10
10
  export { TIME_RANGE_CUSTOM, TIME_RANGE_PICKER_LABELS, TimeRangePicker, timeRangeFieldKey, timeRangeProblem } from './chunk-B5MCTPXL.js';
11
- export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from './chunk-GQPKDPMS.js';
11
+ export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from './chunk-6W5D4A3V.js';
12
12
  export { ToastProvider, Toaster, readingDuration, toasterInsetStyle, useToast } from './chunk-B6AQY6FH.js';
13
13
  export { TagsInput } from './chunk-A5VNNA3V.js';
14
14
  export { ThemeGallery } from './chunk-35ALKQC5.js';
15
- export { ThemeSwatch } from './chunk-3XQUEF5C.js';
16
15
  export { DensitySwitcher, ThemeSwitcher } from './chunk-JDRBZYIA.js';
16
+ export { ThemeSwatch } from './chunk-3XQUEF5C.js';
17
17
  export { ThemeToggle } from './chunk-5RXY2RL4.js';
18
18
  export { applyStoredPreferences, resolveTheme, useDensityPreference, useSystemTheme, useThemePreference } from './chunk-Z24ZUSTX.js';
19
19
  export { ThinkingIndicator } from './chunk-DX7ZHO47.js';
@@ -21,8 +21,8 @@ export { THREAD_SUMMARY_FACE, THREAD_SUMMARY_LABELS, ThreadSummary } from './chu
21
21
  export { Switcher } from './chunk-GPEXCG5K.js';
22
22
  export { TABLE_TAGS_CELL_LABELS, TableDateCell, TableEntityCell, TableKeyCell, TableNumberCell, TableStatusCell, TableTagsCell, TableTextCell, TableTwoLineCell } from './chunk-R4YUMULC.js';
23
23
  export { StatCard } from './chunk-2YADDY4A.js';
24
- export { Statement } from './chunk-MZJKPTA5.js';
25
24
  export { StatGroup } from './chunk-OUD75UB2.js';
25
+ export { Statement } from './chunk-MZJKPTA5.js';
26
26
  export { StatusLegend } from './chunk-CXFMNOPV.js';
27
27
  export { StatusLine } from './chunk-435WY2WT.js';
28
28
  export { SLIDE_COMPARE_LABELS, SlideCompare } from './chunk-FSCJV5M5.js';
@@ -30,8 +30,8 @@ export { SlideFilmstrip } from './chunk-JG66SXCX.js';
30
30
  export { SlideGrid } from './chunk-73L3774J.js';
31
31
  export { SOURCE_EDITOR_KEYS, SourceEditor, lineStart } from './chunk-S656HY4W.js';
32
32
  export { SetupWizard } from './chunk-2DZV4PHK.js';
33
- export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from './chunk-WZ5TDJ2K.js';
34
- export { SHEET_COLUMN_EDITOR_LABELS, SheetColumnEditor, SheetColumnTypeGlyph } from './chunk-CX4JXBS3.js';
33
+ export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from './chunk-7GFLKLCG.js';
34
+ export { SHEET_COLUMN_EDITOR_LABELS, SheetColumnEditor, SheetColumnTypeGlyph } from './chunk-WIGJ4J5U.js';
35
35
  export { CellDisplay, CellEditor, CheckboxCell, DateCell, LongTextCell, MultiSelectCell, NumberCell, PersonCell, RatingCell, SelectCell, SheetCell, SheetGrid, StatusCell, TextCell, UrlCell } from './chunk-SRPV3EAJ.js';
36
36
  export { TagGroup } from './chunk-FOUIZS7Q.js';
37
37
  export { matchesShortcut, useShortcut } from './chunk-K6PKXCR2.js';
@@ -42,10 +42,10 @@ export { SelectionBar } from './chunk-XIKU44QE.js';
42
42
  export { SEND_BUTTON_LABELS, SendButton } from './chunk-PNSUXNNY.js';
43
43
  export { SettingsTable, SettingsTableRow } from './chunk-FRXOUBN2.js';
44
44
  export { ReviewList } from './chunk-7XYU5PSQ.js';
45
+ export { RichEditor, preloadRichEditor } from './chunk-SVUSIXFQ.js';
46
+ export { RICH_EDITOR_LABELS, richEditorLabels } from './chunk-2DMTW2Y3.js';
45
47
  export { canonicalMarkdown, roundTripMarkdown } from './chunk-GBASM5EV.js';
46
48
  import './chunk-7CSTEH5I.js';
47
- export { RichEditor, preloadRichEditor } from './chunk-4H577HEE.js';
48
- export { RICH_EDITOR_LABELS, richEditorLabels } from './chunk-2DMTW2Y3.js';
49
49
  export { RoomRow } from './chunk-45OOFAL6.js';
50
50
  export { RUN_STATES, RunChip } from './chunk-L6SYLG3F.js';
51
51
  export { FRAME_HELLO_TIMEOUT_MS, FRAME_LOAD_GRACE_MS, SandboxedFrame, SandboxedFrameNotice, SandboxedFramePlaceholder } from './chunk-4EKHHHOQ.js';
@@ -58,12 +58,12 @@ export { RESULT_TABLE_CARD_LABELS, RESULT_TABLE_COLLAPSED_ROWS, RESULT_TABLE_MAX
58
58
  export { Table } from './chunk-YGN4SBNP.js';
59
59
  export { PrincipalPicker } from './chunk-NSUMHNUS.js';
60
60
  export { PropertyList } from './chunk-N2DCSSYC.js';
61
- export { PROPOSAL_CARD_LABELS, PROPOSAL_FAILURE_OUTCOMES, PROPOSAL_STATES, PROPOSAL_TONES, ProposalCard } from './chunk-JDWMDK5A.js';
61
+ export { PROPOSAL_CARD_LABELS, PROPOSAL_FAILURE_OUTCOMES, PROPOSAL_STATES, PROPOSAL_TONES, ProposalCard } from './chunk-F22XMDEK.js';
62
62
  export { Prose } from './chunk-DVVP27OD.js';
63
63
  export { QR_DARK, QR_LIGHT, QR_QUIET_ZONE, QrCode, qrModulePath, qrModules } from './chunk-Y56FM3K4.js';
64
- export { RAIL_LIST_LABELS, RailList } from './chunk-32QLSXKL.js';
64
+ export { RAIL_LIST_LABELS, RailList } from './chunk-WWCQDCH5.js';
65
65
  export { NavDivider, NavGroup, NavItem, SidebarNav } from './chunk-SM2MM4DQ.js';
66
- export { Select } from './chunk-6ZFQ6TAM.js';
66
+ export { Select } from './chunk-OU22GKZK.js';
67
67
  export { AddReaction, REACTION_BAR_LABELS, ReactionBar, reactionWho } from './chunk-LZCGLS7U.js';
68
68
  export { PinTile } from './chunk-7XRAYILF.js';
69
69
  export { PresenceStack } from './chunk-MTIW75QU.js';
@@ -76,9 +76,9 @@ export { OrgTable, OrgTableActions, OrgTableAdd, OrgTableName } from './chunk-6B
76
76
  export { TreeGrid } from './chunk-P4QAS5TS.js';
77
77
  export { Outline, scrollToHeading, useActiveHeading } from './chunk-WYIPKGEO.js';
78
78
  export { PageNote } from './chunk-CV4NES3P.js';
79
- export { PEEK_RAIL_LABELS, PEEK_RAIL_MAX_WIDTH, PEEK_RAIL_MIN_WIDTH, PEEK_RAIL_WIDTH, PeekHost, PeekNeighbours, PeekRail, isPlainPress, peekClickHandler, peekRowActivation, usePeekNeighbours, usePeekOrder, usePeekStep } from './chunk-RFNPJDNS.js';
80
79
  export { PEOPLE_RAIL_LABELS, PeopleRail, peopleRailKey } from './chunk-6NXY7OEH.js';
81
80
  import './chunk-CENOOTAV.js';
81
+ export { PEEK_RAIL_LABELS, PEEK_RAIL_MAX_WIDTH, PEEK_RAIL_MIN_WIDTH, PEEK_RAIL_WIDTH, PeekHost, PeekNeighbours, PeekRail, isPlainPress, peekClickHandler, peekRowActivation, usePeekNeighbours, usePeekOrder, usePeekStep } from './chunk-RFNPJDNS.js';
82
82
  export { MessageBubble } from './chunk-KAQ2L74F.js';
83
83
  export { NewItemsNotice } from './chunk-NCQC5Y4E.js';
84
84
  export { FactLine, ObjectHeader, SET_BY_VERBS, SetByLine } from './chunk-W443OSWT.js';
@@ -171,8 +171,8 @@ export { CONFLICT_NOTE_LABELS, ConflictNote } from './chunk-DM3BTGBZ.js';
171
171
  export { CHIP_FIELD_LABELS, ChipField } from './chunk-YUW4DD2Z.js';
172
172
  export { ChoiceButtons } from './chunk-AHW3K3SH.js';
173
173
  export { ChoiceCards } from './chunk-FHPHRIPO.js';
174
- export { CLAMP_LABELS, Clamp } from './chunk-IZGB6SQE.js';
175
174
  export { ChoiceList } from './chunk-XU7RQNT6.js';
175
+ export { CLAMP_LABELS, Clamp } from './chunk-IZGB6SQE.js';
176
176
  export { CodeBlock } from './chunk-FPCTHIV6.js';
177
177
  export { Copyable } from './chunk-3T6URIXM.js';
178
178
  export { CopyButton } from './chunk-2MEBMWNO.js';
@@ -264,11 +264,11 @@ export { Menu } from './chunk-WGAEHKGW.js';
264
264
  export { ACCESS_DENIED_REASONS, AccessDeniedCard } from './chunk-QTMUKRTN.js';
265
265
  export { EmptyState } from './chunk-PPUR46MK.js';
266
266
  export { Accordion, AccordionItem } from './chunk-3QEAANRP.js';
267
- export { ACTION_CARD_GROUND, ActionCard, ActionCardRow } from './chunk-OM2LABPS.js';
268
267
  export { ActivityLine } from './chunk-FNJCCVQX.js';
269
268
  export { BouncingDots, WORKING_LINE_LABELS, WorkingLine, workingAnnouncement, workingSentence } from './chunk-OYKQVTJB.js';
270
269
  export { AvatarStack, avatarStackLabel } from './chunk-ARZGEHWE.js';
271
270
  export { AVATAR_CHARACTER_FULL_DETAIL, AVATAR_CORNER_RANGE, AVATAR_CORNER_RATIO, AVATAR_SIZES, AVATAR_STATUSES, AVATAR_STATUS_LABELS, Avatar, avatarCorner, avatarInitialsName, avatarPixels, avatarTint, getInitials } from './chunk-XZY6S3UC.js';
271
+ export { ACTION_CARD_GROUND, ActionCard, ActionCardRow } from './chunk-OM2LABPS.js';
272
272
  export { ADD_PILL_MS, AddPill } from './chunk-5W3EYO5Q.js';
273
273
  export { AGENT_HANDOFF_LABELS, AgentHandoffPanel } from './chunk-NZFYX5UF.js';
274
274
  export { Timeline, TimelineItem } from './chunk-XDUXAQIS.js';
package/dist/styles.css CHANGED
@@ -34155,7 +34155,7 @@ button.crewlet-presence-stack__member:focus-visible {
34155
34155
  }
34156
34156
 
34157
34157
 
34158
- /* ProposalCard-SF332W4E.css */
34158
+ /* ProposalCard-CU4C6BKL.css */
34159
34159
  /*
34160
34160
  * A proposed change. The card, its head, its strip and its foot are
34161
34161
  * StatusCard's; only the note's register is said here: the consequence is a
@@ -34176,6 +34176,26 @@ button.crewlet-presence-stack__member:focus-visible {
34176
34176
  text-align: end;
34177
34177
  }
34178
34178
 
34179
+ /* WHAT APPROVING INVOLVES (a fresh sign-in, the time left), on a line of
34180
+ its own above the decision and at its end, in the foot's quiet register,
34181
+ each term led by its glyph. The terms wrap as units, never mid-term. */
34182
+ .crewlet-proposal-card__terms {
34183
+ display: flex;
34184
+ flex: 1 1 100%;
34185
+ flex-wrap: wrap;
34186
+ justify-content: flex-end;
34187
+ gap: var(--spacing-1) var(--spacing-3);
34188
+ margin: 0;
34189
+ color: var(--color-text-secondary);
34190
+ font-size: var(--font-size-compact);
34191
+ }
34192
+
34193
+ .crewlet-proposal-card__term {
34194
+ display: inline-flex;
34195
+ align-items: center;
34196
+ gap: var(--spacing-1);
34197
+ }
34198
+
34179
34199
  /* THE DELIBERATE CONFIRMATION, on a row of its own above the decision. It
34180
34200
  starts at the foot's start edge, unlike the one-line reasons around it: a
34181
34201
  checkbox's sentence wraps under its own first line, and set at the end its
@@ -36917,7 +36937,7 @@ button.crewlet-presence-stack__member:focus-visible {
36917
36937
  }
36918
36938
 
36919
36939
 
36920
- /* Select-AF5YMSC6.css */
36940
+ /* Select-2FAOIL73.css */
36921
36941
  /*
36922
36942
  * Select: one chrome over two controls, and the product's only dropdown.
36923
36943
  *
@@ -37177,12 +37197,49 @@ svg.crewlet-select__chevron {
37177
37197
  /* Six rows and a scroll. A list that draws past the bottom of the dialog
37178
37198
  it was opened in is a list whose last answers nobody finds. */
37179
37199
  --crewlet-select-menu-max-height: 12rem;
37200
+ /*
37201
+ * THE FLOOR AND THE MEASURE a list asks for beside its trigger's width. A
37202
+ * list of names asks for neither: it is as wide as its trigger at least,
37203
+ * and a picker's is as wide as its longest name. A described list asks for
37204
+ * both (below).
37205
+ */
37206
+ --crewlet-select-menu-min-width: 0px;
37207
+ --crewlet-select-menu-max-width: 100vw;
37180
37208
 
37181
37209
  position: fixed;
37182
37210
  display: flex;
37183
37211
  flex-direction: column;
37184
- min-width: 0;
37185
- max-height: min(var(--crewlet-select-menu-max-height), 60vh);
37212
+ /*
37213
+ * THE WIDTH IS MADE HERE from three measurements the component writes when
37214
+ * it places the panel (Select.tsx, `position`): the field's width
37215
+ * (--crewlet-select-anchor-width), the room's (--crewlet-select-room-width)
37216
+ * and the height beside the field (--crewlet-select-room-height). Each
37217
+ * bound is the larger of the field and what the list asks for, and never
37218
+ * more than the room, so on a phone the room wins over a floor that would
37219
+ * hang past its edge.
37220
+ *
37221
+ * The field's width used to be the panel's whole width, written on the node
37222
+ * with no minimum, so a field in a table cell offered a sentence per option
37223
+ * in a 115px panel, a word or two to a line and one option taller than the
37224
+ * window. A screen's own min-width could not lift it either: one class
37225
+ * against this one, it won or lost by which stylesheet the page linked
37226
+ * last.
37227
+ */
37228
+ min-width: min(
37229
+ max(var(--crewlet-select-anchor-width, 0px), var(--crewlet-select-menu-min-width)),
37230
+ var(--crewlet-select-room-width, 100vw)
37231
+ );
37232
+ max-width: min(
37233
+ max(var(--crewlet-select-anchor-width, 0px), var(--crewlet-select-menu-max-width)),
37234
+ var(--crewlet-select-room-width, 100vw)
37235
+ );
37236
+ /* Never taller than the larger side beside the field, so it fits on that
37237
+ side and never covers the field and the answer it shows. */
37238
+ max-height: min(
37239
+ var(--crewlet-select-menu-max-height),
37240
+ 60vh,
37241
+ var(--crewlet-select-room-height, 100vh)
37242
+ );
37186
37243
  /*
37187
37244
  * THE PANEL IS THE PRODUCT'S SURFACE, on the panel hairline, at the panel
37188
37245
  * corner. A list offered from a field is another panel over the one the
@@ -37204,12 +37261,30 @@ svg.crewlet-select__chevron {
37204
37261
  z-index: var(--z-index-popover);
37205
37262
  }
37206
37263
 
37207
- /* SIX ROWS OF THE LIST'S OWN HEIGHT. A row with a second line (an option's
37208
- description) is twice a one-line row, so the same six rows need twice the
37209
- room: at 12rem a list of four described answers scrolled, and the first or
37210
- the last of them was cut at the panel's edge. */
37264
+ /* A FIELD'S LIST MATCHES ITS FIELD: exactly the field's width, unless the
37265
+ list asks for a wider floor, and never wider than the room. */
37266
+ .crewlet-select__menu--matches {
37267
+ width: min(
37268
+ max(var(--crewlet-select-anchor-width, 0px), var(--crewlet-select-menu-min-width)),
37269
+ var(--crewlet-select-room-width, 100vw)
37270
+ );
37271
+ }
37272
+
37273
+ /*
37274
+ * A DESCRIBED LIST READS AS PROSE, so it is set at a reading width. Its
37275
+ * floor keeps a sentence to whole phrases a line (about fifty characters at
37276
+ * the description's size), and its measure keeps a picker's long sentence
37277
+ * from running one line across the window (about seventy).
37278
+ *
37279
+ * SIX ROWS OF THE LIST'S OWN HEIGHT. A row with a second line (an option's
37280
+ * description) is twice a one-line row, so the same six rows need twice the
37281
+ * room: at 12rem a list of four described answers scrolled, and the first or
37282
+ * the last of them was cut at the panel's edge.
37283
+ */
37211
37284
  .crewlet-select__menu--described {
37212
37285
  --crewlet-select-menu-max-height: 24rem;
37286
+ --crewlet-select-menu-min-width: 22rem;
37287
+ --crewlet-select-menu-max-width: 28rem;
37213
37288
  }
37214
37289
 
37215
37290
  /* Inside a layer host the panel is placed against the host's own box. */
@@ -37363,6 +37438,9 @@ svg.crewlet-select__chevron {
37363
37438
  font-size: var(--font-size-2xs);
37364
37439
  line-height: var(--font-line-height-normal);
37365
37440
  color: var(--color-text-tertiary);
37441
+ /* A word longer than the measure (an address, an id) breaks rather than
37442
+ running out of the panel, which clips it. */
37443
+ overflow-wrap: break-word;
37366
37444
  }
37367
37445
 
37368
37446
  /* The second line stays the second line on the row the reader is on: it is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewlethq/ui",
3
- "version": "0.131.1",
3
+ "version": "0.132.0",
4
4
  "description": "Crewlet shared React components built on @crewlethq/tokens and @crewlethq/icons.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,8 +42,8 @@
42
42
  "clean": "rm -rf dist src/generated"
43
43
  },
44
44
  "dependencies": {
45
- "@crewlethq/icons": "0.131.1",
46
- "@crewlethq/tokens": "0.131.1",
45
+ "@crewlethq/icons": "0.132.0",
46
+ "@crewlethq/tokens": "0.132.0",
47
47
  "prosemirror-commands": "1.7.2",
48
48
  "prosemirror-gapcursor": "1.4.1",
49
49
  "prosemirror-history": "1.5.1",
@@ -1,5 +1,5 @@
1
- import { schema, readMarkdown, writeMarkdown } from './chunk-7CSTEH5I.js';
2
1
  import { richEditorLabels } from './chunk-2DMTW2Y3.js';
2
+ import { schema, readMarkdown, writeMarkdown } from './chunk-7CSTEH5I.js';
3
3
  import './chunk-KOJPDCGQ.js';
4
4
  import { safeHref, MARKDOWN_CALLOUT_TONES } from './chunk-KBZO4B33.js';
5
5
  import { Toolbar } from './chunk-NPEI2QAN.js';