@crewlethq/ui 0.194.0 → 0.196.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 (170) hide show
  1. package/README.md +10 -2
  2. package/dist/AgentHandoffPanel/index.js +16 -16
  3. package/dist/AgentIdentity/index.js +14 -14
  4. package/dist/AppShell/index.js +3 -3
  5. package/dist/ArrangeFrame/index.js +3 -3
  6. package/dist/ArrangeList/index.js +7 -7
  7. package/dist/ArtifactBar/index.js +1 -1
  8. package/dist/ArtifactCard/index.js +8 -8
  9. package/dist/ArtifactPanel/index.js +3 -3
  10. package/dist/AttentionList/index.js +3 -3
  11. package/dist/AuthLayout/index.js +1 -1
  12. package/dist/AvatarPicker/index.js +1 -1
  13. package/dist/BriefCard/index.js +3 -3
  14. package/dist/ChangeList/index.js +3 -3
  15. package/dist/CheckGrid/index.js +6 -6
  16. package/dist/Checkbox/index.js +5 -5
  17. package/dist/ChipField/index.js +3 -3
  18. package/dist/ColorField/index.js +5 -5
  19. package/dist/Combobox/index.js +5 -5
  20. package/dist/CommandPalette/index.js +12 -12
  21. package/dist/CommentThread/index.js +13 -13
  22. package/dist/Composer/index.js +11 -11
  23. package/dist/ConfirmField/index.js +5 -5
  24. package/dist/ConsequenceList/index.js +6 -6
  25. package/dist/DataGrid/index.js +9 -9
  26. package/dist/DataTable/index.js +12 -12
  27. package/dist/DataView/index.js +14 -14
  28. package/dist/DeepWorkCard/index.js +8 -6
  29. package/dist/Dictation/index.js +1 -1
  30. package/dist/DocTabsEditor/index.js +9 -9
  31. package/dist/DockColumn/index.js +1 -1
  32. package/dist/DurationField/index.js +9 -9
  33. package/dist/{Editor-FORDIRIB.js → Editor-TJXYBJUK.js} +7 -7
  34. package/dist/EmojiPicker/index.js +5 -5
  35. package/dist/EntityList/index.js +1 -1
  36. package/dist/FieldSpotlight/FieldSpotlight.d.ts +38 -0
  37. package/dist/FieldSpotlight/index.d.ts +3 -0
  38. package/dist/FieldSpotlight/index.js +4 -0
  39. package/dist/FieldSpotlight-HRZJERTW.css +86 -0
  40. package/dist/HuePicker/index.js +1 -1
  41. package/dist/InboxList/index.js +3 -3
  42. package/dist/Input/index.js +4 -4
  43. package/dist/KeyValueRows/index.js +7 -7
  44. package/dist/LinkInterstitial/index.js +12 -12
  45. package/dist/ListInput/index.js +10 -10
  46. package/dist/MarkdownEditor/index.js +1 -1
  47. package/dist/MemberPicker/index.js +6 -6
  48. package/dist/MergeConflicts/index.js +1 -1
  49. package/dist/MessageActions/index.js +6 -6
  50. package/dist/Modal/index.js +11 -11
  51. package/dist/MoneyField/index.js +5 -5
  52. package/dist/NoticeList/index.js +3 -3
  53. package/dist/NumberField/index.js +8 -8
  54. package/dist/OpenInAppCard/index.js +3 -3
  55. package/dist/OrgTable/index.js +12 -12
  56. package/dist/PeopleRail/index.js +1 -1
  57. package/dist/PresetChips/index.js +1 -1
  58. package/dist/PrincipalPicker/index.js +6 -6
  59. package/dist/ProposalCard/index.js +13 -13
  60. package/dist/RailList/index.js +8 -8
  61. package/dist/ReactionBar/index.js +6 -6
  62. package/dist/ReadingPane/index.js +2 -2
  63. package/dist/RefusalCard/index.js +1 -1
  64. package/dist/Reorder/index.js +3 -3
  65. package/dist/ResultTableCard/index.js +3 -3
  66. package/dist/RichEditor/index.js +1 -1
  67. package/dist/RunChip/index.js +6 -2
  68. package/dist/ScopeList/index.js +8 -8
  69. package/dist/SectionFrame/index.js +3 -3
  70. package/dist/SegmentedControl/index.js +1 -1
  71. package/dist/SelectionBar/index.js +3 -3
  72. package/dist/SendKeys/index.js +3 -3
  73. package/dist/SettingForm/index.js +7 -7
  74. package/dist/SetupWizard/index.js +6 -2
  75. package/dist/ShareDialog/index.js +13 -13
  76. package/dist/SheetColumnEditor/index.js +9 -9
  77. package/dist/SheetGrid/index.js +2 -2
  78. package/dist/SidePanel/index.js +2 -2
  79. package/dist/SidebarNav/index.js +2 -2
  80. package/dist/SlideFilmstrip/index.js +6 -6
  81. package/dist/StatusCard/index.js +1 -1
  82. package/dist/Stepper/Stepper.d.ts +43 -32
  83. package/dist/Stepper/StepperPlan.d.ts +40 -0
  84. package/dist/Stepper/index.d.ts +3 -1
  85. package/dist/Stepper/index.js +5 -1
  86. package/dist/{Stepper-BRWYNQAC.css → Stepper-XZSL7JBS.css} +162 -0
  87. package/dist/Switcher/index.js +13 -13
  88. package/dist/TableCells/index.js +1 -1
  89. package/dist/Tabs/index.js +1 -1
  90. package/dist/TagGroup/index.js +2 -2
  91. package/dist/TagsInput/index.js +3 -3
  92. package/dist/ThemeSwitcher/index.js +1 -1
  93. package/dist/TimeRangePicker/index.js +12 -12
  94. package/dist/TimeWindowPicker/index.js +7 -7
  95. package/dist/TreeCanvas/index.js +2 -2
  96. package/dist/TreeGrid/index.js +10 -10
  97. package/dist/ValueField/index.js +8 -8
  98. package/dist/VersionCompare/index.js +2 -2
  99. package/dist/{chunk-DEQM77O7.js → chunk-24YRBUX6.js} +2 -2
  100. package/dist/{chunk-CNKQ4TVM.js → chunk-2GPPECF7.js} +1 -1
  101. package/dist/{chunk-VNCKUYYT.js → chunk-3FZ5DTBJ.js} +1 -1
  102. package/dist/{chunk-W47E4PT4.js → chunk-3PO66X4J.js} +3 -3
  103. package/dist/{chunk-NCAKCLQE.js → chunk-42VX7Z6F.js} +2 -2
  104. package/dist/{chunk-ORX3PYX3.js → chunk-AFHKRJQ5.js} +1 -1
  105. package/dist/{chunk-MZAMX65M.js → chunk-ALPGZ777.js} +1 -1
  106. package/dist/{chunk-IFL6DM5K.js → chunk-AS2MKIME.js} +1 -1
  107. package/dist/{chunk-7CLO6XZ6.js → chunk-AZRLUV5H.js} +1 -1
  108. package/dist/{chunk-YW3IH3EU.js → chunk-B2ZLRYFY.js} +1 -1
  109. package/dist/{chunk-XKFZBWXA.js → chunk-BBSQDG3Z.js} +2 -2
  110. package/dist/{chunk-X2N7XQDN.js → chunk-BM3APAUM.js} +1 -1
  111. package/dist/{chunk-D5PENLAM.js → chunk-CGLQDHHJ.js} +2 -2
  112. package/dist/{chunk-6EJS374X.js → chunk-DRU64ZEX.js} +2 -2
  113. package/dist/{chunk-XLB7QIXK.js → chunk-DXU2XJCF.js} +3 -3
  114. package/dist/{chunk-EEDTDHAX.js → chunk-FOLTVEB7.js} +2 -2
  115. package/dist/{chunk-ZH45BDTS.js → chunk-FXY6K5WC.js} +1 -1
  116. package/dist/{chunk-6FHN76QP.js → chunk-G6TM7JFC.js} +1 -1
  117. package/dist/{chunk-YOGPQDXA.js → chunk-GELA3UIZ.js} +2 -2
  118. package/dist/{chunk-QGQYMKCP.js → chunk-HBPOOFTF.js} +2 -2
  119. package/dist/{chunk-L63OLY2D.js → chunk-HRZKHF23.js} +2 -2
  120. package/dist/{chunk-6AU73W3Y.js → chunk-IIUBXQ44.js} +2 -2
  121. package/dist/{chunk-ANCFMQBV.js → chunk-IJD6RJCB.js} +1 -1
  122. package/dist/{chunk-B4TAERAM.js → chunk-J7NT7MHB.js} +1 -1
  123. package/dist/chunk-KKOELP6M.js +456 -0
  124. package/dist/chunk-LM4TJV2S.js +61 -0
  125. package/dist/{chunk-CVNUXLMI.js → chunk-MBL55UDW.js} +1 -1
  126. package/dist/{chunk-2ZNOHIT4.js → chunk-N5FHPJ3J.js} +2 -2
  127. package/dist/{chunk-YER6BEBM.js → chunk-OADUUHVZ.js} +1 -1
  128. package/dist/{chunk-IFRKD6YP.js → chunk-OCMHWEAF.js} +1 -1
  129. package/dist/{chunk-SFBIOHM3.js → chunk-OL63ZF4M.js} +1 -1
  130. package/dist/{chunk-MKOWEHDH.js → chunk-P4OF32M3.js} +1 -1
  131. package/dist/{chunk-J4JT2OSY.js → chunk-PCDJI7WM.js} +1 -1
  132. package/dist/{chunk-T2DGBIFD.js → chunk-R53YO3HR.js} +1 -1
  133. package/dist/{chunk-2SSTJDRV.js → chunk-RBWQO75A.js} +1 -1
  134. package/dist/{chunk-N2AIHIYX.js → chunk-RCFXPLTH.js} +2 -2
  135. package/dist/{chunk-5PCC5XTZ.js → chunk-RJXIQ7SP.js} +1 -1
  136. package/dist/{chunk-ZX4WIEQE.js → chunk-TLVMB4WD.js} +3 -3
  137. package/dist/{chunk-EJDWUXFJ.js → chunk-TPKGNBRP.js} +3 -3
  138. package/dist/{chunk-MENY4GKL.js → chunk-U6XYIBL3.js} +1 -1
  139. package/dist/{chunk-M5P5N5PE.js → chunk-UCJDC5UJ.js} +2 -2
  140. package/dist/{chunk-MX5UU2H3.js → chunk-UGJHVTJB.js} +4 -4
  141. package/dist/{chunk-MMMO7HHQ.js → chunk-VBYMOSYV.js} +2 -2
  142. package/dist/{chunk-XHQ6BRGS.js → chunk-WUPB2CXA.js} +1 -1
  143. package/dist/{chunk-ITRT36AQ.js → chunk-XBZATXHE.js} +1 -1
  144. package/dist/{chunk-EZO5MYII.js → chunk-XI5KCORY.js} +1 -1
  145. package/dist/{chunk-KFG43OLH.js → chunk-YB5XT2BD.js} +1 -1
  146. package/dist/{chunk-YXRMGI4B.js → chunk-YGDYQNDM.js} +1 -1
  147. package/dist/{chunk-OOH3GW7F.js → chunk-Z6IF6V4I.js} +1 -1
  148. package/dist/{chunk-3ZPBG7CZ.js → chunk-ZSVC5GSM.js} +1 -1
  149. package/dist/{chunk-H2K5UVTW.js → chunk-ZVRUDJIC.js} +2 -2
  150. package/dist/generated/index.d.ts +1 -0
  151. package/dist/generated/index.js +146 -145
  152. package/dist/index.js +146 -145
  153. package/dist/{session-NK2VB5MB.js → session-X3EEB6VF.js} +5 -5
  154. package/dist/styles.css +252 -1
  155. package/dist/utils/index.js +1 -1
  156. package/package.json +3 -3
  157. package/dist/chunk-2MN3RNRM.js +0 -201
  158. package/dist/{chunk-NLYURJUF.js → chunk-67UIVO27.js} +2 -2
  159. package/dist/{chunk-HC5Y4ZVY.js → chunk-BT7GHYYR.js} +1 -1
  160. package/dist/{chunk-AHJI2VH3.js → chunk-IMYAUG56.js} +1 -1
  161. package/dist/{chunk-X242LRUF.js → chunk-K657TVMA.js} +1 -1
  162. package/dist/{chunk-FPNKZ6I2.js → chunk-KF7ZOWJW.js} +1 -1
  163. package/dist/{chunk-YNPIGUJF.js → chunk-MQJRR7A6.js} +1 -1
  164. package/dist/{chunk-2Q4U57SU.js → chunk-PJ2XQCQ6.js} +1 -1
  165. package/dist/{chunk-SB2QSRS7.js → chunk-QGZPXZHE.js} +1 -1
  166. package/dist/{chunk-CLMCSTM4.js → chunk-V7C4LBAN.js} +1 -1
  167. package/dist/{chunk-JJEGPEV7.js → chunk-VCMO7KK3.js} +0 -0
  168. package/dist/{chunk-GEFO45DZ.js → chunk-WZQVDAYB.js} +1 -1
  169. package/dist/{chunk-LXPA2SRT.js → chunk-XZ47PWVD.js} +1 -1
  170. package/dist/{chunk-ETWGKTMC.js → chunk-ZE3F4B23.js} +1 -1
@@ -1,5 +1,5 @@
1
1
  import { Select } from './chunk-DPCXOBXN.js';
2
- import { typedNumber, NumberField } from './chunk-5PCC5XTZ.js';
2
+ import { typedNumber, NumberField } from './chunk-RJXIQ7SP.js';
3
3
  import { PresetChips } from './chunk-WLYNWP34.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './DurationField-TJFIAUMW.css';
@@ -1,4 +1,4 @@
1
- import { SidebarNav } from './chunk-AHJI2VH3.js';
1
+ import { SidebarNav } from './chunk-IMYAUG56.js';
2
2
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './SectionFrame-M62UUVFQ.css';
@@ -1,11 +1,11 @@
1
- import { consequencesAnswered, ConsequenceList } from './chunk-EZO5MYII.js';
1
+ import { consequencesAnswered, ConsequenceList } from './chunk-XI5KCORY.js';
2
2
  import { ChangeGroups } from './chunk-XXHIU65G.js';
3
3
  import { Button } from './chunk-YVMIT2OW.js';
4
4
  import { IconButton } from './chunk-66H4BC5Z.js';
5
- import { HeadingLevelProvider } from './chunk-PQADV6P6.js';
6
5
  import { useComposedRef } from './chunk-L72URIHR.js';
7
6
  import { useLayerContainer } from './chunk-NCM4VYRF.js';
8
7
  import { focusables, useModalLayer, useBodyScrollLock } from './chunk-EDPMHSLZ.js';
8
+ import { HeadingLevelProvider } from './chunk-PQADV6P6.js';
9
9
  import { cx } from './chunk-ODEQTPFM.js';
10
10
  import './Modal-TVHT3TEL.css';
11
11
  import './ConfirmModal-V2OAWUGJ.css';
@@ -1,8 +1,8 @@
1
1
  import { groupInOrder } from './chunk-JADTOJUL.js';
2
2
  import { Text } from './chunk-475DOAWF.js';
3
- import { Checkbox } from './chunk-YER6BEBM.js';
4
- import { Input } from './chunk-NLYURJUF.js';
3
+ import { Checkbox } from './chunk-OADUUHVZ.js';
5
4
  import { Button } from './chunk-YVMIT2OW.js';
5
+ import { Input } from './chunk-67UIVO27.js';
6
6
  import { headingTag, useHeadingLevel } from './chunk-PQADV6P6.js';
7
7
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
8
8
  import { cx } from './chunk-ODEQTPFM.js';
@@ -4,9 +4,9 @@ import { HueSwatch } from './chunk-5F62NQON.js';
4
4
  import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
5
5
  import { Kbd } from './chunk-25LIX6UI.js';
6
6
  import { Menu } from './chunk-43N4EHFR.js';
7
- import { Checkbox } from './chunk-YER6BEBM.js';
8
- import { FormField, Input } from './chunk-NLYURJUF.js';
7
+ import { Checkbox } from './chunk-OADUUHVZ.js';
9
8
  import { Button } from './chunk-YVMIT2OW.js';
9
+ import { FormField, Input } from './chunk-67UIVO27.js';
10
10
  import { IconButton } from './chunk-66H4BC5Z.js';
11
11
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
12
12
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,6 +1,6 @@
1
- import { useReorder } from './chunk-ETWGKTMC.js';
1
+ import { useReorder } from './chunk-ZE3F4B23.js';
2
2
  import { Menu } from './chunk-43N4EHFR.js';
3
- import { Input } from './chunk-NLYURJUF.js';
3
+ import { Input } from './chunk-67UIVO27.js';
4
4
  import { IconButton } from './chunk-66H4BC5Z.js';
5
5
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -2,7 +2,7 @@ import { Select } from './chunk-DPCXOBXN.js';
2
2
  import { PrincipalAvatar } from './chunk-265IX4YA.js';
3
3
  import { useMediaMatch } from './chunk-COS6LJ4K.js';
4
4
  import { CopyButton } from './chunk-NAHBGKE7.js';
5
- import { Modal } from './chunk-YOGPQDXA.js';
5
+ import { Modal } from './chunk-GELA3UIZ.js';
6
6
  import { Callout } from './chunk-XJLGQ7U7.js';
7
7
  import { Button } from './chunk-YVMIT2OW.js';
8
8
  import { IconButton } from './chunk-66H4BC5Z.js';
@@ -1,4 +1,4 @@
1
- import { emojiOfShortcode, emojiName, EmojiPicker } from './chunk-2SSTJDRV.js';
1
+ import { emojiOfShortcode, emojiName, EmojiPicker } from './chunk-RBWQO75A.js';
2
2
  import { heldHint } from './chunk-TDFLCUBE.js';
3
3
  import { Tooltip } from './chunk-ZF5ELYJ3.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
@@ -0,0 +1,456 @@
1
+ import { Tag } from './chunk-ASBBB5AJ.js';
2
+ import { StatusDot } from './chunk-QRE6JCHS.js';
3
+ import { Spinner } from './chunk-XSPCITPN.js';
4
+ import { useAnnouncer } from './chunk-AZQBGKPR.js';
5
+ import { VisuallyHidden } from './chunk-RRRK2KB6.js';
6
+ import { cx } from './chunk-ODEQTPFM.js';
7
+ import './Stepper-XZSL7JBS.css';
8
+ import './StepList-MQVJ3DZF.css';
9
+ import { CircleCheckGlyph, CircleAlertGlyph, LockGlyph, CircleStopGlyph, CircleDashedGlyph, ClockGlyph, CheckGlyph, TriangleAlertGlyph, ChevronDownGlyph, ChevronRightGlyph, MinusGlyph, XGlyph } from '@crewlethq/icons/glyphs';
10
+ import { useMemo, useId, useState, useRef, useEffect, Fragment as Fragment$1 } from 'react';
11
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
12
+
13
+ var STEPPER_PLAN_STATES = [
14
+ "done",
15
+ "next",
16
+ "waiting",
17
+ "in-progress",
18
+ "checking",
19
+ "failed",
20
+ "optional",
21
+ "skipped",
22
+ "set-aside",
23
+ "not-needed"
24
+ ];
25
+ var STEPPER_PLAN_LABELS = {
26
+ done: "Done",
27
+ next: "Next",
28
+ waiting: "Waiting",
29
+ "in-progress": "In progress",
30
+ checking: "Checking",
31
+ failed: "Failed",
32
+ optional: "Optional",
33
+ skipped: "Skipped",
34
+ "set-aside": "Set aside",
35
+ "not-needed": "Already so"
36
+ };
37
+ var STEPPER_PLAN_MARKS = ["new", "edited"];
38
+ var STEPPER_PLAN_MARK_LABELS = {
39
+ new: "New",
40
+ edited: "Edited"
41
+ };
42
+ var ACTIVE = /* @__PURE__ */ new Set(["next", "in-progress", "checking", "failed", "set-aside"]);
43
+ var FINISHED = /* @__PURE__ */ new Set(["done", "not-needed"]);
44
+ var TAG_TONE = {
45
+ done: "success",
46
+ next: "brand",
47
+ waiting: "neutral",
48
+ "in-progress": "info",
49
+ checking: "info",
50
+ failed: "danger",
51
+ optional: "neutral",
52
+ skipped: "neutral",
53
+ "set-aside": "neutral",
54
+ "not-needed": "success"
55
+ };
56
+ var MARK_TONE = { new: "info", edited: "neutral" };
57
+ function planStates(steps, at) {
58
+ return steps.map((step, index) => step.state ?? (index < at ? "done" : index === at ? "next" : "waiting"));
59
+ }
60
+ function checkPlanCurrent(steps, at) {
61
+ const state = at < steps.length ? planStates(steps, at)[at] : void 0;
62
+ if (state !== void 0 && !ACTIVE.has(state)) {
63
+ throw new RangeError(
64
+ `Stepper plan step "${steps[at].id}" is current, so it must be next, in-progress, checking, failed or set-aside; it is ${state}`
65
+ );
66
+ }
67
+ }
68
+ function checkPlanRemoved(steps, removed) {
69
+ const kept = new Set(steps.map((step) => step.id));
70
+ const seen = /* @__PURE__ */ new Set();
71
+ for (const step of removed) {
72
+ if (seen.has(step.id)) throw new RangeError(`Stepper removed step ids must be unique; "${step.id}" is used twice`);
73
+ if (kept.has(step.id)) throw new RangeError(`Stepper step "${step.id}" is both in the plan and removed from it`);
74
+ seen.add(step.id);
75
+ }
76
+ }
77
+ function PlanMark({ state, index }) {
78
+ switch (state) {
79
+ case "done":
80
+ case "not-needed":
81
+ return /* @__PURE__ */ jsx(CheckGlyph, { size: "xs", className: "crewlet-stepper__check" });
82
+ case "next":
83
+ return /* @__PURE__ */ jsx(StatusDot, { tone: "brand", className: "crewlet-stepper__dot" });
84
+ case "in-progress":
85
+ return /* @__PURE__ */ jsx(StatusDot, { tone: "info", pulse: true, className: "crewlet-stepper__dot" });
86
+ case "checking":
87
+ return /* @__PURE__ */ jsx(Spinner, { size: "xs" });
88
+ case "failed":
89
+ return /* @__PURE__ */ jsx(XGlyph, { size: "xs" });
90
+ case "skipped":
91
+ return /* @__PURE__ */ jsx(MinusGlyph, { size: "xs" });
92
+ case "set-aside":
93
+ return /* @__PURE__ */ jsx(ClockGlyph, { size: "xs" });
94
+ default:
95
+ return /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__number", children: index + 1 });
96
+ }
97
+ }
98
+ function StepperPlan({
99
+ steps,
100
+ at,
101
+ label,
102
+ stateLabels,
103
+ markLabels,
104
+ removed,
105
+ removedLabel,
106
+ collapseDone,
107
+ attributes
108
+ }) {
109
+ const words = useMemo(() => stateLabels ? { ...STEPPER_PLAN_LABELS, ...stateLabels } : STEPPER_PLAN_LABELS, [stateLabels]);
110
+ const marks = useMemo(
111
+ () => markLabels ? { ...STEPPER_PLAN_MARK_LABELS, ...markLabels } : STEPPER_PLAN_MARK_LABELS,
112
+ [markLabels]
113
+ );
114
+ const states = useMemo(() => planStates(steps, at), [steps, at]);
115
+ const base = useId();
116
+ const [open, setOpen] = useState(() => /* @__PURE__ */ new Set());
117
+ const labels = useRef(/* @__PURE__ */ new Map());
118
+ const untils = useRef(/* @__PURE__ */ new Map());
119
+ const said = useRef(null);
120
+ const announce = useAnnouncer();
121
+ useEffect(() => {
122
+ const now = new Map(steps.map((step, index) => [step.id, states[index]]));
123
+ const before = said.current;
124
+ said.current = now;
125
+ if (before === null) return;
126
+ const lines = [];
127
+ for (const [id, state] of now) {
128
+ const was = before.get(id);
129
+ if (was === void 0 || was === state) continue;
130
+ const text = labels.current.get(id)?.textContent?.trim();
131
+ const until = state === "set-aside" ? untils.current.get(id)?.textContent?.trim() : void 0;
132
+ if (text) lines.push(until ? `${text}, ${words[state]}, ${until}` : `${text}, ${words[state]}`);
133
+ }
134
+ if (lines.length > 0) announce(lines.join(". "));
135
+ }, [steps, states, words, announce]);
136
+ const toggle = (id) => setOpen((was) => {
137
+ const next = new Set(was);
138
+ if (!next.delete(id)) next.add(id);
139
+ return next;
140
+ });
141
+ const list = (
142
+ // The role is restated for WebKit, which drops it from a list with no markers.
143
+ // eslint-disable-next-line jsx-a11y/no-redundant-roles
144
+ /* @__PURE__ */ jsx(
145
+ "ol",
146
+ {
147
+ ...attributes,
148
+ role: "list",
149
+ className: cx("crewlet-stepper", "crewlet-stepper--vertical", "crewlet-stepper--plan", attributes.className),
150
+ "aria-label": label,
151
+ children: steps.map((step, index) => {
152
+ const state = states[index];
153
+ const current = index === at;
154
+ const id = `${base}-${index}`;
155
+ const hasBody = step.body !== void 0 && step.body !== null && step.body !== false;
156
+ const collapsible = collapseDone && FINISHED.has(state) && hasBody;
157
+ const shown = !collapsible || open.has(step.id);
158
+ const until = state === "set-aside" && step.until !== void 0 && step.until !== null && step.until !== false;
159
+ const mark = step.mark;
160
+ const named = [`${id}-name`, `${id}-state`, until && `${id}-until`, mark && `${id}-mark`].filter(Boolean).join(" ");
161
+ const title = /* @__PURE__ */ jsxs(Fragment, { children: [
162
+ /* @__PURE__ */ jsxs("span", { id: `${id}-name`, className: "crewlet-stepper__label", children: [
163
+ /* @__PURE__ */ jsx(
164
+ "span",
165
+ {
166
+ ref: (element) => {
167
+ if (element) labels.current.set(step.id, element);
168
+ else labels.current.delete(step.id);
169
+ },
170
+ children: step.label
171
+ }
172
+ ),
173
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: "," })
174
+ ] }),
175
+ /* @__PURE__ */ jsxs("span", { id: `${id}-state`, className: "crewlet-stepper__state", children: [
176
+ /* @__PURE__ */ jsx(Tag, { size: "xs", variant: TAG_TONE[state], children: words[state] }),
177
+ until || mark ? /* @__PURE__ */ jsx(VisuallyHidden, { children: "," }) : null
178
+ ] }),
179
+ mark ? /* @__PURE__ */ jsx("span", { id: `${id}-mark`, className: "crewlet-stepper__revision", children: /* @__PURE__ */ jsx(Tag, { size: "xs", appearance: "outline", variant: MARK_TONE[mark], children: marks[mark] }) }) : null,
180
+ collapsible ? shown ? /* @__PURE__ */ jsx(ChevronDownGlyph, { size: "xs", className: "crewlet-stepper__chevron" }) : /* @__PURE__ */ jsx(ChevronRightGlyph, { size: "xs", className: "crewlet-stepper__chevron" }) : null
181
+ ] });
182
+ return /* @__PURE__ */ jsx(
183
+ "li",
184
+ {
185
+ className: cx(
186
+ "crewlet-stepper__step",
187
+ `crewlet-stepper__step--${state}`,
188
+ current && "crewlet-stepper__step--current"
189
+ ),
190
+ "aria-current": current ? "step" : void 0,
191
+ "aria-labelledby": named,
192
+ children: /* @__PURE__ */ jsxs("div", { className: "crewlet-stepper__row", children: [
193
+ /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__mark", "aria-hidden": "true", children: /* @__PURE__ */ jsx(PlanMark, { state, index }) }),
194
+ /* @__PURE__ */ jsxs("div", { className: "crewlet-stepper__text", children: [
195
+ collapsible ? /* @__PURE__ */ jsx(
196
+ "button",
197
+ {
198
+ type: "button",
199
+ className: "crewlet-stepper__title crewlet-stepper__toggle",
200
+ "aria-labelledby": named,
201
+ "aria-expanded": shown,
202
+ "aria-controls": `${id}-body`,
203
+ onClick: () => toggle(step.id),
204
+ children: title
205
+ }
206
+ ) : /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__title", children: title }),
207
+ until ? /* @__PURE__ */ jsxs("span", { id: `${id}-until`, className: "crewlet-stepper__until", children: [
208
+ /* @__PURE__ */ jsx(
209
+ "span",
210
+ {
211
+ ref: (element) => {
212
+ if (element) untils.current.set(step.id, element);
213
+ else untils.current.delete(step.id);
214
+ },
215
+ children: step.until
216
+ }
217
+ ),
218
+ mark ? /* @__PURE__ */ jsx(VisuallyHidden, { children: "," }) : null
219
+ ] }) : null,
220
+ step.description ? /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__description", children: step.description }) : null,
221
+ hasBody ? /* @__PURE__ */ jsx("div", { id: `${id}-body`, className: "crewlet-stepper__body", hidden: !shown, children: step.body }) : null
222
+ ] })
223
+ ] })
224
+ },
225
+ step.id
226
+ );
227
+ })
228
+ }
229
+ )
230
+ );
231
+ if (removed.length === 0) return list;
232
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
233
+ list,
234
+ /* @__PURE__ */ jsxs("div", { className: "crewlet-stepper__removed", children: [
235
+ /* @__PURE__ */ jsx("span", { id: `${base}-removed`, className: "crewlet-stepper__removed-title", children: removedLabel }),
236
+ /* @__PURE__ */ jsx("ul", { role: "list", className: "crewlet-stepper__removed-list", "aria-labelledby": `${base}-removed`, children: removed.map((step) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("del", { children: step.label }) }, step.id)) })
237
+ ] })
238
+ ] });
239
+ }
240
+ var NONE = [];
241
+ function Stepper({
242
+ steps,
243
+ current,
244
+ label,
245
+ tone = "info",
246
+ pulse = false,
247
+ orientation = "horizontal",
248
+ onSelect,
249
+ reached,
250
+ doneLabel = "Done",
251
+ optionalLabel = "Optional",
252
+ attentionLabel = "Needs attention",
253
+ variant = "sequence",
254
+ stateLabels,
255
+ markLabels,
256
+ removed = NONE,
257
+ removedLabel = "Removed",
258
+ collapseDone = false,
259
+ className,
260
+ ...rest
261
+ }) {
262
+ const seen = /* @__PURE__ */ new Set();
263
+ for (const step of steps) {
264
+ if (seen.has(step.id)) throw new RangeError(`Stepper step ids must be unique; "${step.id}" is used twice`);
265
+ seen.add(step.id);
266
+ }
267
+ const ids = () => steps.map((step) => `"${step.id}"`).join(", ");
268
+ const at = current === null ? steps.length : steps.findIndex((step) => step.id === current);
269
+ if (at < 0) {
270
+ throw new RangeError(
271
+ `Stepper current must be the id of one of its steps, or null once every step is done; "${current}" is not one of ${ids()}`
272
+ );
273
+ }
274
+ if (variant === "plan") {
275
+ checkPlanCurrent(steps, at);
276
+ checkPlanRemoved(steps, removed);
277
+ if (steps.length === 0) return null;
278
+ return /* @__PURE__ */ jsx(
279
+ StepperPlan,
280
+ {
281
+ steps,
282
+ at,
283
+ label,
284
+ stateLabels,
285
+ markLabels,
286
+ removed,
287
+ removedLabel,
288
+ collapseDone,
289
+ attributes: { ...rest, className }
290
+ }
291
+ );
292
+ }
293
+ const furthest = reached === void 0 ? at : steps.findIndex((step) => step.id === reached);
294
+ if (furthest < 0) throw new RangeError(`Stepper reached must be the id of one of its steps; "${reached}" is not one of ${ids()}`);
295
+ for (const [index, step] of steps.entries()) {
296
+ if (step.status === "current" && index !== at) {
297
+ throw new RangeError(`Stepper step "${step.id}" says it is current, but current is ${current === null ? "null" : `"${current}"`}`);
298
+ }
299
+ }
300
+ if (steps.length === 0) return null;
301
+ const visitedTo = Math.max(at, furthest);
302
+ const vertical = orientation === "vertical";
303
+ const drawnOf = (step, index) => {
304
+ if (index === at) return "current";
305
+ if (step.status !== void 0 && step.status !== "current") return step.status;
306
+ return index < at ? "done" : "upcoming";
307
+ };
308
+ return (
309
+ /*
310
+ * `role="list"` although an `ol` already has one, which is why the lint
311
+ * rule that calls it redundant is silenced here rather than obeyed, as
312
+ * `Legend` and `DiffList` silence it: the stylesheet takes the markers off,
313
+ * and WebKit answers a marker-less list as a group of paragraphs, so a
314
+ * reader would no longer be told how many steps there are before hearing
315
+ * them. The role puts that back.
316
+ */
317
+ // eslint-disable-next-line jsx-a11y/no-redundant-roles
318
+ /* @__PURE__ */ jsx(
319
+ "ol",
320
+ {
321
+ ...rest,
322
+ role: "list",
323
+ className: cx(
324
+ "crewlet-stepper",
325
+ `crewlet-stepper--${tone}`,
326
+ vertical && "crewlet-stepper--vertical",
327
+ onSelect && "crewlet-stepper--selectable",
328
+ className
329
+ ),
330
+ "aria-label": label,
331
+ children: steps.map((step, index) => {
332
+ const drawn = drawnOf(step, index);
333
+ const isCurrent = drawn === "current";
334
+ const attention = drawn === "attention" || isCurrent && step.status === "attention";
335
+ const optional = drawn === "optional" || isCurrent && step.status === "optional";
336
+ const note = attention ? attentionLabel : optional ? optionalLabel : null;
337
+ const selectable = onSelect !== void 0 && index <= visitedTo;
338
+ const mark = drawn === "done" ? /* @__PURE__ */ jsx(CheckGlyph, { size: "xs", className: "crewlet-stepper__check" }) : attention ? /* @__PURE__ */ jsx(TriangleAlertGlyph, { size: "xs", className: "crewlet-stepper__warning" }) : isCurrent ? /* @__PURE__ */ jsx(StatusDot, { tone, pulse, className: "crewlet-stepper__dot" }) : vertical ? /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__number", "aria-hidden": "true", children: index + 1 }) : null;
339
+ const words = /* @__PURE__ */ jsxs(Fragment, { children: [
340
+ drawn === "done" ? /* @__PURE__ */ jsxs(Fragment, { children: [
341
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: doneLabel }),
342
+ " "
343
+ ] }) : null,
344
+ /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__label", children: step.label }),
345
+ note !== null && !vertical ? /* @__PURE__ */ jsx(VisuallyHidden, { children: `, ${note}` }) : null
346
+ ] });
347
+ const content = vertical ? /* @__PURE__ */ jsxs(Fragment, { children: [
348
+ /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__mark", children: mark }),
349
+ /* @__PURE__ */ jsxs("span", { className: "crewlet-stepper__text", children: [
350
+ /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__title", children: words }),
351
+ step.description ? /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__description", children: step.description }) : null,
352
+ note !== null ? /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__note", children: note }) : null
353
+ ] })
354
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
355
+ mark,
356
+ words
357
+ ] });
358
+ const surface = vertical ? "crewlet-stepper__row" : "crewlet-stepper__chip";
359
+ return /* @__PURE__ */ jsx(
360
+ "li",
361
+ {
362
+ className: cx(
363
+ "crewlet-stepper__step",
364
+ `crewlet-stepper__step--${drawn}`,
365
+ attention && drawn !== "attention" && "crewlet-stepper__step--attention"
366
+ ),
367
+ "aria-current": isCurrent && !selectable ? "step" : void 0,
368
+ children: selectable ? /* @__PURE__ */ jsx(
369
+ "button",
370
+ {
371
+ type: "button",
372
+ className: cx(surface, "crewlet-stepper__target"),
373
+ "aria-current": isCurrent ? "step" : void 0,
374
+ onClick: () => onSelect(step.id),
375
+ children: content
376
+ }
377
+ ) : /* @__PURE__ */ jsx("span", { className: surface, children: content })
378
+ },
379
+ step.id
380
+ );
381
+ })
382
+ }
383
+ )
384
+ );
385
+ }
386
+ var STEP_STATES = [
387
+ "running",
388
+ "done",
389
+ "failed",
390
+ "refused",
391
+ "stopped",
392
+ "waiting",
393
+ "pending"
394
+ ];
395
+ var STEP_STATE_LABELS = {
396
+ running: "Running",
397
+ done: "Done",
398
+ failed: "Failed",
399
+ refused: "Not permitted",
400
+ stopped: "Stopped",
401
+ waiting: "Waiting for your approval",
402
+ pending: "Not started"
403
+ };
404
+ function StepStateMark({ state, className }) {
405
+ return /* @__PURE__ */ jsx("span", { className: cx("crewlet-step-mark", `crewlet-step-mark--${state}`, className), "aria-hidden": "true", children: state === "running" ? /* @__PURE__ */ jsx(Spinner, { size: "sm" }) : state === "done" ? /* @__PURE__ */ jsx(CircleCheckGlyph, { size: "sm" }) : state === "failed" ? /* @__PURE__ */ jsx(CircleAlertGlyph, { size: "sm" }) : state === "refused" ? /* @__PURE__ */ jsx(LockGlyph, { size: "sm" }) : state === "stopped" ? /* @__PURE__ */ jsx(CircleStopGlyph, { size: "sm" }) : state === "pending" ? /* @__PURE__ */ jsx(CircleDashedGlyph, { size: "sm" }) : /* @__PURE__ */ jsx(ClockGlyph, { size: "sm" }) });
406
+ }
407
+ function stepDetailPieces(text) {
408
+ const pieces = [];
409
+ let piece = "";
410
+ for (const character of text) {
411
+ if (character === " ") {
412
+ if (piece) pieces.push(piece);
413
+ pieces.push(" ");
414
+ piece = "";
415
+ continue;
416
+ }
417
+ piece += character;
418
+ if (character === "/" || character === "?" || character === "&") {
419
+ pieces.push(piece);
420
+ piece = "";
421
+ }
422
+ }
423
+ if (piece) pieces.push(piece);
424
+ return pieces;
425
+ }
426
+ function Detail({ children }) {
427
+ if (typeof children !== "string") return /* @__PURE__ */ jsx(Fragment, { children });
428
+ return /* @__PURE__ */ jsx(Fragment, { children: stepDetailPieces(children).map(
429
+ (piece, index) => piece === " " ? /* @__PURE__ */ jsx(Fragment$1, { children: " " }, index) : /* @__PURE__ */ jsx("span", { className: "crewlet-step-list__piece", children: piece }, index)
430
+ ) });
431
+ }
432
+ function StepList({ steps, label, summary, labels: overrides, className, ...rest }) {
433
+ const labels = overrides ? { ...STEP_STATE_LABELS, ...overrides } : STEP_STATE_LABELS;
434
+ const seen = /* @__PURE__ */ new Set();
435
+ for (const step of steps) {
436
+ if (seen.has(step.id)) throw new RangeError(`StepList step ids must be unique; "${step.id}" is used twice`);
437
+ seen.add(step.id);
438
+ }
439
+ return /* @__PURE__ */ jsxs("div", { ...rest, className: cx("crewlet-step-list", className), children: [
440
+ summary === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "crewlet-step-list__summary", children: summary }),
441
+ /* @__PURE__ */ jsx("ol", { role: "list", "aria-label": label, className: "crewlet-step-list__steps", children: steps.map((step) => /* @__PURE__ */ jsxs("li", { className: cx("crewlet-step-list__step", `crewlet-step-list__step--${step.state}`), children: [
442
+ /* @__PURE__ */ jsx(StepStateMark, { state: step.state, className: "crewlet-step-list__mark" }),
443
+ /* @__PURE__ */ jsxs("span", { className: "crewlet-step-list__text", children: [
444
+ /* @__PURE__ */ jsxs("span", { className: "crewlet-step-list__label", children: [
445
+ step.label,
446
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: `, ${labels[step.state]}` })
447
+ ] }),
448
+ step.note === void 0 || step.note === null ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-step-list__note", children: step.note }),
449
+ step.detail === void 0 ? null : /* @__PURE__ */ jsx("code", { className: "crewlet-step-list__detail", children: /* @__PURE__ */ jsx(Detail, { children: step.detail }) })
450
+ ] }),
451
+ step.duration === void 0 ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-step-list__duration", children: step.duration })
452
+ ] }, step.id)) })
453
+ ] });
454
+ }
455
+
456
+ export { STEPPER_PLAN_LABELS, STEPPER_PLAN_MARKS, STEPPER_PLAN_MARK_LABELS, STEPPER_PLAN_STATES, STEP_STATES, STEP_STATE_LABELS, StepList, StepStateMark, Stepper, stepDetailPieces };
@@ -0,0 +1,61 @@
1
+ import { prefersReducedMotion } from './chunk-COS6LJ4K.js';
2
+ import { cx } from './chunk-ODEQTPFM.js';
3
+ import './FieldSpotlight-HRZJERTW.css';
4
+ import { useId, useRef, useImperativeHandle } from 'react';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ var FOCUSABLE = [
8
+ 'input:not([disabled]):not([type="hidden"])',
9
+ "textarea:not([disabled])",
10
+ "select:not([disabled])",
11
+ "button:not([disabled])",
12
+ '[contenteditable="true"]',
13
+ '[tabindex]:not([tabindex="-1"])'
14
+ ].join(", ");
15
+ function FieldSpotlight({
16
+ label,
17
+ active = true,
18
+ tone = "accent",
19
+ pulse = false,
20
+ inline = false,
21
+ labelId,
22
+ ref,
23
+ className,
24
+ children,
25
+ ...rest
26
+ }) {
27
+ const autoId = useId();
28
+ const root = useRef(null);
29
+ useImperativeHandle(
30
+ ref,
31
+ () => ({
32
+ reveal: ({ focus = true } = {}) => {
33
+ const element = root.current;
34
+ if (!element) return;
35
+ if (focus) element.querySelector(FOCUSABLE)?.focus({ preventScroll: true });
36
+ element.scrollIntoView({ block: "center", behavior: prefersReducedMotion() ? "auto" : "smooth" });
37
+ }
38
+ }),
39
+ []
40
+ );
41
+ return /* @__PURE__ */ jsxs(
42
+ "div",
43
+ {
44
+ ...rest,
45
+ ref: root,
46
+ className: cx(
47
+ "crewlet-field-spotlight",
48
+ inline && "crewlet-field-spotlight--inline",
49
+ active && `crewlet-field-spotlight--${tone}`,
50
+ active && pulse && "crewlet-field-spotlight--pulse",
51
+ className
52
+ ),
53
+ children: [
54
+ active ? /* @__PURE__ */ jsx("span", { id: labelId ?? autoId, className: "crewlet-field-spotlight__label", children: label }) : null,
55
+ children
56
+ ]
57
+ }
58
+ );
59
+ }
60
+
61
+ export { FieldSpotlight };
@@ -1,4 +1,4 @@
1
- import { TreeGrid } from './chunk-N2AIHIYX.js';
1
+ import { TreeGrid } from './chunk-RCFXPLTH.js';
2
2
  import { OrgLabel } from './chunk-BZLQHZKH.js';
3
3
  import { createTreeModel, treeParent } from './chunk-MY374UUD.js';
4
4
  import { AddPill } from './chunk-EHRNLV3D.js';
@@ -2,8 +2,8 @@ import { EmptyValue } from './chunk-WGLOH33S.js';
2
2
  import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
3
3
  import { Menu } from './chunk-43N4EHFR.js';
4
4
  import { useClipboard } from './chunk-STJ7QBC3.js';
5
- import { Modal } from './chunk-YOGPQDXA.js';
6
- import { Checkbox } from './chunk-YER6BEBM.js';
5
+ import { Modal } from './chunk-GELA3UIZ.js';
6
+ import { Checkbox } from './chunk-OADUUHVZ.js';
7
7
  import { Button } from './chunk-YVMIT2OW.js';
8
8
  import { IconButton } from './chunk-66H4BC5Z.js';
9
9
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
@@ -1,4 +1,4 @@
1
- import { FormField } from './chunk-NLYURJUF.js';
1
+ import { FormField } from './chunk-67UIVO27.js';
2
2
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Checkbox-GAMV2XD7.css';
@@ -1,8 +1,8 @@
1
1
  import { Select } from './chunk-DPCXOBXN.js';
2
2
  import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-EE3DJMSQ.js';
3
3
  import { Popover } from './chunk-SWZV6R46.js';
4
- import { Input } from './chunk-NLYURJUF.js';
5
4
  import { Button } from './chunk-YVMIT2OW.js';
5
+ import { Input } from './chunk-67UIVO27.js';
6
6
  import { IconButton } from './chunk-66H4BC5Z.js';
7
7
  import { isComposing } from './chunk-EDPMHSLZ.js';
8
8
  import { useFocusModality } from './chunk-4ITETIGZ.js';
@@ -1,5 +1,5 @@
1
1
  import { SlideStage } from './chunk-7O53SWKI.js';
2
- import { useReorder } from './chunk-ETWGKTMC.js';
2
+ import { useReorder } from './chunk-ZE3F4B23.js';
3
3
  import { Kbd, isApplePlatform } from './chunk-25LIX6UI.js';
4
4
  import { Menu } from './chunk-43N4EHFR.js';
5
5
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
@@ -1,5 +1,5 @@
1
1
  import { minorUnits, parseMoney } from './chunk-G6DKKJN6.js';
2
- import { Input } from './chunk-NLYURJUF.js';
2
+ import { Input } from './chunk-67UIVO27.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './MoneyField-4PHZWHJL.css';
5
5
  import { forwardRef, useId } from 'react';