@crewlethq/ui 0.148.0 → 0.150.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 (273) hide show
  1. package/dist/ActivityLine/index.js +3 -3
  2. package/dist/AgentHandoffPanel/index.js +8 -8
  3. package/dist/AppShell/index.js +5 -5
  4. package/dist/ArrangeFrame/index.js +3 -3
  5. package/dist/ArrangeList/index.js +5 -5
  6. package/dist/ArtifactBar/index.js +7 -7
  7. package/dist/ArtifactCard/index.js +6 -6
  8. package/dist/ArtifactPanel/index.js +4 -4
  9. package/dist/ArtifactRef/index.js +2 -2
  10. package/dist/AttentionList/index.js +4 -4
  11. package/dist/Avatar/index.js +1 -1
  12. package/dist/{Avatar-HD7YSWDV.css → Avatar-OUKBB6UF.css} +19 -5
  13. package/dist/AvatarPicker/index.js +8 -8
  14. package/dist/BriefCard/index.js +3 -3
  15. package/dist/Button/index.js +2 -2
  16. package/dist/Callout/index.js +3 -3
  17. package/dist/Canvas/index.js +4 -4
  18. package/dist/CanvasBoard/index.js +6 -6
  19. package/dist/CanvasToolbar/index.js +5 -5
  20. package/dist/ChangeMark/index.js +2 -2
  21. package/dist/ChatMessage/index.js +3 -3
  22. package/dist/ChatThread/index.js +4 -4
  23. package/dist/CheckGrid/index.js +5 -5
  24. package/dist/Checkbox/index.js +4 -4
  25. package/dist/Clamp/index.js +3 -3
  26. package/dist/CodeBlock/CodeBlock.d.ts +11 -1
  27. package/dist/CodeBlock/index.js +6 -6
  28. package/dist/CodeBlock/syntax.d.ts +23 -0
  29. package/dist/{CodeBlock-LS7H6KUQ.css → CodeBlock-GPNAG43I.css} +34 -0
  30. package/dist/ColorField/index.js +4 -4
  31. package/dist/ColorSwatch/index.js +6 -6
  32. package/dist/Combobox/index.js +4 -4
  33. package/dist/CommandPalette/index.js +6 -6
  34. package/dist/CommentThread/index.js +7 -7
  35. package/dist/Composer/index.js +4 -4
  36. package/dist/ConfirmField/index.js +4 -4
  37. package/dist/ConflictNote/index.js +3 -3
  38. package/dist/ContrastHelp/index.js +3 -3
  39. package/dist/Copyable/index.js +5 -5
  40. package/dist/DataGrid/index.js +7 -6
  41. package/dist/DataTable/index.js +8 -8
  42. package/dist/DataView/index.js +11 -11
  43. package/dist/DateTimePicker/index.js +4 -4
  44. package/dist/DeepWorkCard/index.js +4 -4
  45. package/dist/DeliveryReceipt/DeliveryReceipt.d.ts +69 -53
  46. package/dist/DeliveryReceipt/index.js +8 -1
  47. package/dist/DeliveryReceipt-GTES3RSG.css +90 -0
  48. package/dist/DocTabsEditor/index.js +6 -6
  49. package/dist/DownloadButton/index.js +3 -3
  50. package/dist/DurationField/DurationField.d.ts +59 -0
  51. package/dist/DurationField/index.d.ts +3 -0
  52. package/dist/DurationField/index.js +32 -0
  53. package/dist/DurationField-TJFIAUMW.css +23 -0
  54. package/dist/{Editor-PGDR7XMZ.js → Editor-FXREHINI.js} +5 -5
  55. package/dist/EmojiPicker/index.js +4 -4
  56. package/dist/EntityChip/index.js +1 -1
  57. package/dist/ErrorBoundary/index.js +3 -3
  58. package/dist/FactList/index.js +2 -2
  59. package/dist/FileDrop/index.js +3 -3
  60. package/dist/FilterPill/index.js +3 -3
  61. package/dist/FollowBanner/index.js +5 -5
  62. package/dist/Fullscreen/index.js +3 -3
  63. package/dist/GraphCanvas/index.js +6 -6
  64. package/dist/HuePicker/index.js +7 -7
  65. package/dist/IconButton/index.js +2 -2
  66. package/dist/ImageUpload/index.js +1 -1
  67. package/dist/InlineEditor/index.js +3 -3
  68. package/dist/InlineRef/index.js +1 -1
  69. package/dist/{InlineRef-LHU6MH4I.css → InlineRef-CUBTBIYD.css} +2 -1
  70. package/dist/Input/index.js +3 -3
  71. package/dist/KeyValueRows/index.js +5 -5
  72. package/dist/LinkInterstitial/index.js +6 -6
  73. package/dist/ListDetail/index.js +3 -3
  74. package/dist/ListInput/index.js +5 -5
  75. package/dist/LogoSlot/index.js +4 -4
  76. package/dist/MarkdownEditor/index.js +7 -7
  77. package/dist/MemberPicker/index.js +5 -5
  78. package/dist/Menu/index.js +4 -4
  79. package/dist/MergeConflicts/index.js +7 -7
  80. package/dist/MessageActions/index.js +5 -5
  81. package/dist/Modal/index.js +4 -4
  82. package/dist/NoticeList/index.js +3 -3
  83. package/dist/NumberField/NumberField.d.ts +56 -0
  84. package/dist/NumberField/index.d.ts +3 -0
  85. package/dist/NumberField/index.js +29 -0
  86. package/dist/NumberField-G7H4VNZP.css +30 -0
  87. package/dist/OpenInAppCard/index.js +4 -4
  88. package/dist/OrgLabel/index.js +1 -1
  89. package/dist/OrgNode/index.js +1 -1
  90. package/dist/OrgTable/index.js +10 -9
  91. package/dist/PeekRail/index.js +4 -4
  92. package/dist/PeopleRail/index.js +5 -5
  93. package/dist/PinTile/index.js +3 -3
  94. package/dist/PresenceStack/index.js +1 -1
  95. package/dist/PresenterView/index.js +5 -5
  96. package/dist/PresetChips/PresetChips.d.ts +27 -0
  97. package/dist/PresetChips/index.d.ts +2 -0
  98. package/dist/PresetChips/index.js +21 -0
  99. package/dist/Principal/index.js +1 -1
  100. package/dist/PrincipalPicker/index.js +6 -6
  101. package/dist/ProposalCard/index.js +8 -8
  102. package/dist/RailList/index.js +5 -5
  103. package/dist/ReactionBar/index.js +5 -5
  104. package/dist/ReceiptStrip/index.js +3 -3
  105. package/dist/ResultTableCard/index.js +4 -4
  106. package/dist/RichEditor/index.js +5 -5
  107. package/dist/SandboxedFrame/index.js +5 -5
  108. package/dist/SectionFrame/index.js +4 -4
  109. package/dist/SegmentedControl/index.js +6 -6
  110. package/dist/SelectionBar/index.js +3 -3
  111. package/dist/SendButton/index.js +3 -3
  112. package/dist/SettingForm/SettingForm.d.ts +50 -0
  113. package/dist/SettingForm/index.d.ts +3 -0
  114. package/dist/SettingForm/index.js +20 -0
  115. package/dist/SettingForm-ODVZZ7JZ.css +30 -0
  116. package/dist/SettingsTable/SettingsTable.d.ts +47 -34
  117. package/dist/SettingsTable/index.d.ts +3 -2
  118. package/dist/SettingsTable/index.js +7 -5
  119. package/dist/SettingsTable-KAMWVCQB.css +169 -0
  120. package/dist/ShareDialog/index.js +9 -9
  121. package/dist/SheetColumnEditor/index.js +11 -11
  122. package/dist/SheetGrid/index.js +7 -7
  123. package/dist/SidePanel/index.js +3 -3
  124. package/dist/SidebarNav/index.js +3 -3
  125. package/dist/SlideCompare/index.js +3 -3
  126. package/dist/SlideFilmstrip/index.js +5 -5
  127. package/dist/SlideNav/index.js +3 -3
  128. package/dist/StatusLine/index.js +2 -2
  129. package/dist/Switcher/index.js +6 -6
  130. package/dist/TableCells/index.js +1 -1
  131. package/dist/Tabs/index.js +5 -5
  132. package/dist/TagsInput/index.js +3 -3
  133. package/dist/ThemeSwitcher/index.js +7 -7
  134. package/dist/ThemeToggle/index.js +3 -3
  135. package/dist/ThreadSummary/index.js +2 -2
  136. package/dist/TimeRangePicker/index.js +10 -10
  137. package/dist/TimeWindowPicker/index.js +5 -5
  138. package/dist/Tooltip/Tooltip.d.ts +8 -1
  139. package/dist/Tooltip/index.js +1 -1
  140. package/dist/TreeCanvas/index.js +5 -5
  141. package/dist/TreeGrid/index.js +8 -7
  142. package/dist/ValueField/index.js +5 -5
  143. package/dist/VersionCompare/index.js +7 -7
  144. package/dist/VersionTimeline/index.js +4 -4
  145. package/dist/WorkingLine/index.js +2 -2
  146. package/dist/{chunk-CYRGASHY.js → chunk-27NS67UI.js} +2 -2
  147. package/dist/{chunk-2RJFKMTX.js → chunk-27ZF7D3C.js} +2 -2
  148. package/dist/chunk-2EPEVS2M.js +158 -0
  149. package/dist/{chunk-SPCNQUEU.js → chunk-2PSOUDCS.js} +1 -1
  150. package/dist/{chunk-IEM64WYC.js → chunk-2QPELDAA.js} +2 -2
  151. package/dist/{chunk-RG6XQJ74.js → chunk-2W2KAF7D.js} +1 -1
  152. package/dist/{chunk-CLEQII3E.js → chunk-3EL3IF3W.js} +1 -1
  153. package/dist/{chunk-2Z5SMA7Q.js → chunk-3OZPHFDT.js} +1 -1
  154. package/dist/{chunk-BXP6WDKR.js → chunk-3Q5USPLM.js} +2 -2
  155. package/dist/{chunk-YLOADTDS.js → chunk-3RLOH5AR.js} +1 -1
  156. package/dist/{chunk-IAER2ZMS.js → chunk-4DUK2TC4.js} +1 -1
  157. package/dist/{chunk-T7J2U3IN.js → chunk-4LNSURYZ.js} +1 -1
  158. package/dist/{chunk-WTRAMP4V.js → chunk-5ORAUELE.js} +3 -3
  159. package/dist/chunk-6QWSGM4W.js +21 -0
  160. package/dist/{chunk-VXSCGB2L.js → chunk-6RBE5RVG.js} +2 -2
  161. package/dist/{chunk-7UN7ICUE.js → chunk-733FZXNS.js} +2 -2
  162. package/dist/{chunk-UOVEN5RY.js → chunk-7C6NHVMX.js} +5 -5
  163. package/dist/{chunk-RIAEOKY7.js → chunk-7CVV3DQC.js} +1 -1
  164. package/dist/{chunk-RJZO5NQW.js → chunk-7FY7L6WD.js} +2 -2
  165. package/dist/{chunk-OU4P4E3U.js → chunk-7J2RIAZ4.js} +1 -1
  166. package/dist/{chunk-BPCXMQMB.js → chunk-7MAU74EI.js} +1 -1
  167. package/dist/{chunk-UJETUDIL.js → chunk-7PK2Z5JY.js} +2 -2
  168. package/dist/{chunk-SSRQLPGT.js → chunk-7SXCCVUR.js} +2 -2
  169. package/dist/{chunk-RMGAZEEX.js → chunk-7WXLPNZF.js} +1 -1
  170. package/dist/{chunk-MMJYDMGL.js → chunk-AH7R777J.js} +2 -2
  171. package/dist/{chunk-5L4ZSNGP.js → chunk-AU4EKD2G.js} +1 -1
  172. package/dist/{chunk-PDGXQBFS.js → chunk-BFZAGIXR.js} +3 -1
  173. package/dist/{chunk-QNN4OYLU.js → chunk-BJE7TPO6.js} +2 -2
  174. package/dist/chunk-BQMDD2FD.js +224 -0
  175. package/dist/{chunk-TYCICVST.js → chunk-BRMJPZC4.js} +1 -1
  176. package/dist/{chunk-EZG3SRSM.js → chunk-CA62YCFK.js} +1 -1
  177. package/dist/{chunk-JXLFC5BX.js → chunk-CC5NUAOF.js} +1 -1
  178. package/dist/{chunk-74B3HREV.js → chunk-CJGLMT44.js} +1 -1
  179. package/dist/{chunk-TCQIJ2VO.js → chunk-CRGYWLP6.js} +1 -1
  180. package/dist/{chunk-2UEMCSVB.js → chunk-CXJMWEZC.js} +1 -1
  181. package/dist/{chunk-HHCD55D3.js → chunk-D33K2BCZ.js} +1 -1
  182. package/dist/chunk-DDGHRDGV.js +134 -0
  183. package/dist/{chunk-SNKLBPXQ.js → chunk-DGB7R42F.js} +1 -1
  184. package/dist/{chunk-GYVL23ZK.js → chunk-DLYYW77C.js} +1 -1
  185. package/dist/{chunk-7VE7SOH6.js → chunk-E3JUS3CR.js} +1 -1
  186. package/dist/{chunk-X2R3GWCB.js → chunk-ECHQLOWI.js} +2 -2
  187. package/dist/{chunk-QA774VCH.js → chunk-ECYA6XZL.js} +1 -1
  188. package/dist/{chunk-QDVXEQJC.js → chunk-EDQHZOU3.js} +3 -3
  189. package/dist/{chunk-HLCQHRHJ.js → chunk-EO64FXVL.js} +1 -1
  190. package/dist/{chunk-BXGFDSC7.js → chunk-F6OYNO7O.js} +3 -3
  191. package/dist/{chunk-U62CXJPE.js → chunk-FCRJAFTU.js} +7 -7
  192. package/dist/{chunk-LO3CTXQI.js → chunk-FMKQSDBQ.js} +3 -3
  193. package/dist/{chunk-4DJONKYN.js → chunk-FYVV6GJN.js} +1 -1
  194. package/dist/{chunk-D7XI5DN5.js → chunk-GMXOZEF5.js} +1 -1
  195. package/dist/{chunk-3HY3KHMR.js → chunk-GR6XGA5V.js} +2 -2
  196. package/dist/{chunk-R4H352IB.js → chunk-HHTAGV5R.js} +1 -1
  197. package/dist/{chunk-EVOLZQTB.js → chunk-HIDOUXLD.js} +1 -1
  198. package/dist/{chunk-CMLRFHBD.js → chunk-HJ6ZY4UX.js} +2 -2
  199. package/dist/chunk-HU56GCZ7.js +198 -0
  200. package/dist/{chunk-F37ZBF4D.js → chunk-HYUO2RHC.js} +1 -1
  201. package/dist/{chunk-QGDQ5YDC.js → chunk-IMF3CPTY.js} +2 -2
  202. package/dist/{chunk-TRV7VZW6.js → chunk-IRGS5FEC.js} +1 -1
  203. package/dist/{chunk-P67SLIPX.js → chunk-IRLHICS4.js} +2 -2
  204. package/dist/{chunk-HDJMTHAP.js → chunk-IZH5DCOQ.js} +1 -1
  205. package/dist/{chunk-3ZJ6X3ZJ.js → chunk-JD5K6Y7Q.js} +3 -3
  206. package/dist/{chunk-7R77GFUO.js → chunk-JNDZGQGS.js} +2 -2
  207. package/dist/{chunk-DJAYXYDZ.js → chunk-KM5OKCW6.js} +2 -2
  208. package/dist/{chunk-NDZEN2ON.js → chunk-KQUENZR3.js} +1 -1
  209. package/dist/{chunk-PD3RJT3F.js → chunk-LDSLEEWR.js} +3 -3
  210. package/dist/{chunk-MCZJ2SD7.js → chunk-LZ3TKYAY.js} +2 -2
  211. package/dist/{chunk-LDVZYLA6.js → chunk-M2USLODI.js} +2 -2
  212. package/dist/{chunk-VGAZHT6S.js → chunk-M4VA76JF.js} +6 -6
  213. package/dist/{chunk-5Y3BFCGM.js → chunk-MUBJN75T.js} +5 -5
  214. package/dist/{chunk-5B5N4X5H.js → chunk-N3LAAA4R.js} +3 -3
  215. package/dist/{chunk-RVFSUF7V.js → chunk-N3R2POGO.js} +3 -3
  216. package/dist/chunk-NG6GEBSJ.js +53 -0
  217. package/dist/chunk-NZHWGKPW.js +334 -0
  218. package/dist/{chunk-XIJU47UT.js → chunk-O2J5PSWI.js} +2 -2
  219. package/dist/{chunk-R75TTEHL.js → chunk-OAD4AXYJ.js} +1 -1
  220. package/dist/{chunk-ZCA3JNQS.js → chunk-ODN3LSYW.js} +1 -1
  221. package/dist/{chunk-BKHS6YPM.js → chunk-OMVGWZ3V.js} +1 -1
  222. package/dist/chunk-OX332RI7.js +127 -0
  223. package/dist/{chunk-ETVXKUW7.js → chunk-PW6QXVIX.js} +3 -3
  224. package/dist/{chunk-N37AX25G.js → chunk-Q3SHCEXN.js} +7 -196
  225. package/dist/{chunk-PGLRFPYY.js → chunk-Q7RI66TT.js} +4 -4
  226. package/dist/{chunk-FYN2HXEB.js → chunk-QRUQOITJ.js} +1 -1
  227. package/dist/{chunk-XNTYJAHL.js → chunk-QULAFXL3.js} +1 -1
  228. package/dist/{chunk-QO76JNSB.js → chunk-R2RHSKAT.js} +3 -3
  229. package/dist/{chunk-V2K6EHJA.js → chunk-RNVPYDRQ.js} +1 -1
  230. package/dist/{chunk-QPAUKLNC.js → chunk-RUKSDKG5.js} +4 -3
  231. package/dist/{chunk-WGSIKYDE.js → chunk-RUNZWWN6.js} +5 -5
  232. package/dist/{chunk-QNG5MH7P.js → chunk-RXHY5T2Z.js} +2 -2
  233. package/dist/{chunk-Z3GOZ42N.js → chunk-S4ADDFRT.js} +3 -3
  234. package/dist/{chunk-EFTWYGN5.js → chunk-TBOVJ7RL.js} +1 -1
  235. package/dist/{chunk-ZPJX57QO.js → chunk-TPABM6DW.js} +2 -2
  236. package/dist/{chunk-ACXYNJZR.js → chunk-TSLXQVBC.js} +1 -1
  237. package/dist/{chunk-WK3OWTOD.js → chunk-TTUFOH2Y.js} +1 -1
  238. package/dist/{chunk-LHGDKWHV.js → chunk-U3ZUZ7VU.js} +3 -3
  239. package/dist/{chunk-X4QL7STV.js → chunk-UEO3A76N.js} +1 -1
  240. package/dist/{chunk-LILN66O3.js → chunk-V4CGY2CI.js} +1 -1
  241. package/dist/{chunk-PY3PKWAN.js → chunk-V67VL3WD.js} +1 -1
  242. package/dist/{chunk-JLWCONCZ.js → chunk-VARFEAUH.js} +5 -5
  243. package/dist/{chunk-OL42IZ6I.js → chunk-VFC7KVCW.js} +1 -1
  244. package/dist/{chunk-HTWN4IJJ.js → chunk-W2T7RGH7.js} +2 -2
  245. package/dist/{chunk-3FBJACLW.js → chunk-WAF36OFS.js} +5 -5
  246. package/dist/{chunk-EILMLMSG.js → chunk-WOHPQEBZ.js} +1 -1
  247. package/dist/{chunk-QWDTC2UI.js → chunk-WSKVFRKK.js} +1 -1
  248. package/dist/{chunk-TAOVSH32.js → chunk-X5ZUDJNK.js} +1 -1
  249. package/dist/{chunk-CNEHTSA5.js → chunk-XJU53WMW.js} +1 -1
  250. package/dist/{chunk-VGYVCLN4.js → chunk-XQMRSL7Z.js} +1 -1
  251. package/dist/{chunk-UC4YASMJ.js → chunk-YMBXTGFC.js} +2 -2
  252. package/dist/{chunk-VWEF6LTZ.js → chunk-YOCTDR2P.js} +1 -1
  253. package/dist/{chunk-H4OV6SYF.js → chunk-YRNIPS4M.js} +2 -2
  254. package/dist/{chunk-2BIGA4VD.js → chunk-YWPUT6JQ.js} +2 -2
  255. package/dist/{chunk-5DYNF5U2.js → chunk-Z6HWOPI7.js} +1 -1
  256. package/dist/{chunk-DQ3MKG7I.js → chunk-Z6OZNSHF.js} +1 -1
  257. package/dist/{chunk-PRNJO37A.js → chunk-Z7BA2EVV.js} +2 -2
  258. package/dist/{chunk-YKM3HCDL.js → chunk-ZAQ7CEYN.js} +2 -2
  259. package/dist/{chunk-WYO5KDET.js → chunk-ZC73GPA3.js} +1 -1
  260. package/dist/{chunk-SQHDMVU7.js → chunk-ZFSKRN6D.js} +1 -1
  261. package/dist/{chunk-4DKECHWE.js → chunk-ZMZNKDPO.js} +4 -4
  262. package/dist/{chunk-2FAEKL36.js → chunk-ZNEMXLTY.js} +1 -1
  263. package/dist/generated/index.d.ts +4 -0
  264. package/dist/generated/index.js +153 -148
  265. package/dist/index.js +153 -148
  266. package/dist/styles.css +286 -132
  267. package/package.json +3 -3
  268. package/dist/DeliveryReceipt-BILVVNTO.css +0 -64
  269. package/dist/SettingsTable-MTZJTKA6.css +0 -182
  270. package/dist/chunk-GTNXDLYH.js +0 -146
  271. package/dist/chunk-L6E4DVIF.js +0 -131
  272. package/dist/chunk-TNYRJVKE.js +0 -94
  273. /package/dist/{chunk-II7TPQ64.js → chunk-2DASEYUG.js} +0 -0
@@ -1,182 +0,0 @@
1
- /*
2
- * SettingsTable: a read-only table of settings, one row each, on one grid.
3
- *
4
- * THE TRACKS ARE FRACTIONS OF THE TABLE, so every table of one width shares
5
- * them: a page that stacks a table per group puts each column on one line
6
- * down the page with nothing to coordinate. `--crewlet-settings-table-columns`
7
- * is inherited, so a page that wants other proportions sets it once.
8
- *
9
- * Each row is its own grid on those tracks rather than a subgrid of the
10
- * table's, because the tracks are fractions: one row's long label can never
11
- * move another row's value, which is what a content-sized track would do.
12
- */
13
-
14
- .crewlet-settings-table {
15
- container: crewlet-settings-table / inline-size;
16
- display: flex;
17
- flex-direction: column;
18
- min-width: 0;
19
- font-size: var(--font-size-compact);
20
- /* The flush-panel recipe, standing on its own: the card's surface, its
21
- hairline and its corner. Inside a card it gives them up (below). */
22
- background: var(--color-surface-subtle);
23
- border: 1px solid var(--color-border-default);
24
- border-radius: var(--radius-lg);
25
- overflow: hidden;
26
- }
27
-
28
- /*
29
- * A TABLE THAT IS A CARD'S CONTENT IS THAT CARD'S TABLE. It draws no edge or
30
- * corner of its own inside one, so a card never holds a box inside a box; its
31
- * rows' hairlines run to the card's edges under the card's own head rule.
32
- */
33
- .crewlet-card > .crewlet-settings-table,
34
- .crewlet-card__body > .crewlet-settings-table {
35
- background: transparent;
36
- border: 0;
37
- border-radius: var(--radius-none);
38
- }
39
-
40
- .crewlet-settings-table__row {
41
- display: grid;
42
- grid-template-columns: var(
43
- --crewlet-settings-table-columns,
44
- minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr)
45
- );
46
- column-gap: var(--spacing-6);
47
- /* ONE BASELINE PER ROW: the name, the value and the source sit on the
48
- first line's baseline, whatever the name's key adds under it. */
49
- align-items: baseline;
50
- min-height: var(--size-row-md);
51
- padding: var(--spacing-3) var(--spacing-4);
52
- }
53
-
54
- .crewlet-settings-table__body > .crewlet-settings-table__row + .crewlet-settings-table__row {
55
- border-top: 1px solid var(--color-border-default);
56
- }
57
-
58
- /*
59
- * The column names, in the micro-label register a table's header takes
60
- * across the system, on the panel's own ground. Hidden by default (see the
61
- * component): still the table's column headers for assistive technology.
62
- */
63
- .crewlet-settings-table__head .crewlet-settings-table__row {
64
- min-height: 0;
65
- padding-block: var(--spacing-2);
66
- border-bottom: 1px solid var(--color-border-default);
67
- }
68
-
69
- .crewlet-settings-table__name {
70
- font-size: var(--font-size-2xs);
71
- font-weight: var(--font-weight-medium);
72
- letter-spacing: var(--font-letter-spacing-wide);
73
- text-transform: uppercase;
74
- color: var(--color-text-tertiary);
75
- white-space: nowrap;
76
- }
77
-
78
- .crewlet-settings-table__head--hidden {
79
- position: absolute;
80
- width: 1px;
81
- height: 1px;
82
- margin: -1px;
83
- padding: 0;
84
- border: 0;
85
- overflow: hidden;
86
- clip-path: inset(50%);
87
- white-space: nowrap;
88
- }
89
-
90
- .crewlet-settings-table__setting {
91
- display: flex;
92
- /* The name first and on top, so the cell's baseline is the name's first
93
- line, the one the row's value and source sit on. */
94
- align-items: flex-start;
95
- gap: var(--spacing-1);
96
- min-width: 0;
97
- }
98
-
99
- .crewlet-settings-table__label {
100
- color: var(--color-text-primary);
101
- line-height: var(--font-line-height-snug);
102
- }
103
-
104
- /*
105
- * THE KEY IS FOR THE READER WHO WILL GO AND CHANGE IT, so it is a control
106
- * after the name rather than a line under it: one quiet square that copies
107
- * the key and shows it on hover and focus. Its box is the name's first line,
108
- * so the square centres on that line, and the control's height never sets the
109
- * row's: a row with a key is as tall as one without.
110
- */
111
- .crewlet-settings-table__key {
112
- display: inline-flex;
113
- align-items: center;
114
- flex-shrink: 0;
115
- height: calc(1em * var(--font-line-height-snug));
116
- color: var(--color-text-tertiary);
117
- }
118
-
119
- /* Where a pointer can hover, the key shows with its row, its focus or a copy's outcome, and keeps its place unseen otherwise. */
120
- @media (hover: hover) {
121
- .crewlet-settings-table__key {
122
- opacity: 0;
123
- }
124
-
125
- .crewlet-settings-table__row:is(:hover, :focus-within) .crewlet-settings-table__key,
126
- .crewlet-settings-table__key:not([data-copy='idle']) {
127
- opacity: 1;
128
- }
129
- }
130
-
131
- @media (hover: hover) and (prefers-reduced-motion: no-preference) {
132
- .crewlet-settings-table__key {
133
- transition: opacity var(--motion-duration-fast) var(--motion-easing-default);
134
- }
135
- }
136
-
137
- /* Tabular figures, so a column of numbers reads down its digits. */
138
- .crewlet-settings-table__value {
139
- min-width: 0;
140
- color: var(--color-text-primary);
141
- font-weight: var(--font-weight-medium);
142
- font-variant-numeric: tabular-nums;
143
- overflow-wrap: anywhere;
144
- }
145
-
146
- .crewlet-settings-table__source {
147
- display: inline-flex;
148
- align-items: baseline;
149
- gap: var(--spacing-2);
150
- min-width: 0;
151
- font-size: var(--font-size-xs);
152
- color: var(--color-text-tertiary);
153
- }
154
-
155
- /* A value that differs from its default is the row a reader came to find. */
156
- .crewlet-settings-table__source--changed {
157
- color: var(--color-text-secondary);
158
- }
159
-
160
- .crewlet-settings-table__source--changed .crewlet-status-dot {
161
- align-self: center;
162
- }
163
-
164
- /*
165
- * NARROW: the name takes the row's first line, and the value and its source
166
- * share the second. Three columns at this width leave a name column a word
167
- * wide, which wraps every name into a stack of single words.
168
- */
169
- @container crewlet-settings-table (width < 32rem) {
170
- .crewlet-settings-table__row {
171
- grid-template-columns: minmax(0, 1fr) auto;
172
- row-gap: var(--spacing-1);
173
- }
174
-
175
- .crewlet-settings-table__setting {
176
- grid-column: 1 / -1;
177
- }
178
-
179
- .crewlet-settings-table__source {
180
- justify-self: end;
181
- }
182
- }
@@ -1,146 +0,0 @@
1
- import { cx } from './chunk-ODEQTPFM.js';
2
- import './ChatScale-LGESYXCO.css';
3
- import './DeliveryReceipt-BILVVNTO.css';
4
- import { useState } from 'react';
5
- import { TriangleAlertGlyph, CheckGlyph } from '@crewlethq/icons/glyphs';
6
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
7
-
8
- function andList(names) {
9
- if (names.length <= 1) return names[0] ?? "";
10
- return `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]}`;
11
- }
12
- var DELIVERY_RECEIPT_LABELS = {
13
- reached: (who) => /* @__PURE__ */ jsxs(Fragment, { children: [
14
- "Reached ",
15
- who
16
- ] }),
17
- reachedAnswered: (who, count) => /* @__PURE__ */ jsxs(Fragment, { children: [
18
- "Reached ",
19
- who,
20
- ", who ",
21
- count === 2 ? "both " : count > 2 ? "all " : "",
22
- "answered"
23
- ] }),
24
- partlyAnswered: (answered, waiting) => /* @__PURE__ */ jsxs(Fragment, { children: [
25
- answered,
26
- " answered, waiting on ",
27
- waiting
28
- ] }),
29
- reaches: (who) => /* @__PURE__ */ jsxs(Fragment, { children: [
30
- "Will reach ",
31
- who
32
- ] }),
33
- none: "Reached no agent",
34
- noneDraft: "Will reach no agent",
35
- list: andList,
36
- reason: (words) => `(${words})`,
37
- groups: (groups) => groups.join("; "),
38
- truncated: "Some seats were not reached",
39
- more: (count) => `and ${count} more`,
40
- fewer: "Show fewer"
41
- };
42
- function DeliveryReceipt({
43
- recipients,
44
- tense = "sent",
45
- truncated = false,
46
- hint,
47
- announce = false,
48
- max = 1,
49
- labels: overrides,
50
- className,
51
- ...rest
52
- }) {
53
- if (max !== Infinity && (!Number.isInteger(max) || max < 1)) {
54
- throw new RangeError(
55
- `DeliveryReceipt max must be a whole number of at least 1; it was ${max}`
56
- );
57
- }
58
- const [expanded, setExpanded] = useState(false);
59
- const labels = overrides ? { ...DELIVERY_RECEIPT_LABELS, ...overrides } : DELIVERY_RECEIPT_LABELS;
60
- const cap = expanded ? Infinity : max;
61
- const none = recipients.length === 0;
62
- const answered = tense === "sent" ? recipients.filter((r) => r.answered) : [];
63
- const waiting = tense === "sent" ? recipients.filter((r) => !r.answered) : recipients;
64
- let capped = false;
65
- const toggle = (count) => /* @__PURE__ */ jsx(
66
- "button",
67
- {
68
- type: "button",
69
- className: "crewlet-delivery-receipt__more",
70
- "aria-expanded": expanded,
71
- onClick: () => setExpanded((was) => !was),
72
- children: expanded ? labels.fewer : labels.more(count)
73
- }
74
- );
75
- const seats = (list, withReasons) => {
76
- const shown = list.length > cap + 1 ? list.slice(0, cap) : list;
77
- const hidden = list.length - shown.length;
78
- if (hidden > 0) capped = true;
79
- const order = [];
80
- const byReason = /* @__PURE__ */ new Map();
81
- for (const r of shown) {
82
- const key = withReasons ? r.reason ?? "" : "";
83
- const names = byReason.get(key);
84
- if (names) names.push(r.name);
85
- else {
86
- order.push(key);
87
- byReason.set(key, [r.name]);
88
- }
89
- }
90
- const words = labels.groups(
91
- order.map((key) => {
92
- const names = byReason.get(key) ?? [];
93
- const joined = hidden > 0 ? names.join(", ") : labels.list(names);
94
- return key ? `${joined} ${labels.reason(key)}` : joined;
95
- })
96
- );
97
- return hidden > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
98
- words,
99
- " ",
100
- toggle(hidden)
101
- ] }) : words;
102
- };
103
- let sentence;
104
- if (none) sentence = tense === "draft" ? labels.noneDraft : labels.none;
105
- else if (tense === "draft") sentence = labels.reaches(seats(recipients, true));
106
- else if (answered.length === 0) sentence = labels.reached(seats(recipients, true));
107
- else if (waiting.length === 0)
108
- sentence = labels.reachedAnswered(seats(recipients, true), answered.length);
109
- else sentence = labels.partlyAnswered(seats(answered, false), seats(waiting, true));
110
- const fewer = expanded && !capped ? toggle(0) : null;
111
- const after = [];
112
- if (truncated && !none) after.push({ key: "truncated", words: labels.truncated });
113
- if (none && hint)
114
- after.push({ key: "hint", className: "crewlet-delivery-receipt__hint", words: hint });
115
- const mark = none ? /* @__PURE__ */ jsx(TriangleAlertGlyph, { size: "xs" }) : answered.length > 0 ? /* @__PURE__ */ jsx(CheckGlyph, { size: "xs" }) : null;
116
- return /* @__PURE__ */ jsxs(
117
- "p",
118
- {
119
- ...rest,
120
- role: announce ? "status" : void 0,
121
- "data-tense": tense,
122
- className: cx(
123
- "crewlet-delivery-receipt",
124
- none && "crewlet-delivery-receipt--none",
125
- answered.length > 0 && "crewlet-delivery-receipt--answered",
126
- className
127
- ),
128
- children: [
129
- mark ? /* @__PURE__ */ jsx("span", { className: "crewlet-delivery-receipt__mark", "aria-hidden": "true", children: mark }) : null,
130
- /* @__PURE__ */ jsxs("span", { className: "crewlet-delivery-receipt__words", children: [
131
- sentence,
132
- fewer ? /* @__PURE__ */ jsxs(Fragment, { children: [
133
- " ",
134
- fewer
135
- ] }) : null,
136
- after.map((part) => /* @__PURE__ */ jsxs("span", { className: part.className, children: [
137
- ". ",
138
- part.words
139
- ] }, part.key))
140
- ] })
141
- ]
142
- }
143
- );
144
- }
145
-
146
- export { DELIVERY_RECEIPT_LABELS, DeliveryReceipt };
@@ -1,131 +0,0 @@
1
- import { CopyButton, copyGlyph, CopyStatus } from './chunk-TRV7VZW6.js';
2
- import { useClipboard } from './chunk-STJ7QBC3.js';
3
- import { IconButton } from './chunk-DJAYXYDZ.js';
4
- import { cx } from './chunk-ODEQTPFM.js';
5
- import './CodeBlock-LS7H6KUQ.css';
6
- import { forwardRef, useRef, useState, useLayoutEffect } from 'react';
7
- import { jsxs, jsx } from 'react/jsx-runtime';
8
-
9
- var CodeBlock = forwardRef(function CodeBlock2({
10
- code,
11
- language,
12
- filename,
13
- showLineNumbers = false,
14
- copyable = true,
15
- copyLabel,
16
- copyPlacement = "header",
17
- prompt,
18
- wrap = true,
19
- maxHeight,
20
- plain = false,
21
- selectable = false,
22
- focusWhenScrollable = false,
23
- label,
24
- className,
25
- style,
26
- ...rest
27
- }, ref) {
28
- const box = useRef(null);
29
- const body = code.replace(/\n+$/, "");
30
- const corner = !plain && copyable && copyPlacement === "corner";
31
- const showHeader = !plain && !corner && (filename !== void 0 || language !== void 0 || copyable);
32
- const perLine = showLineNumbers || prompt !== void 0;
33
- const [overflows, setOverflows] = useState(false);
34
- useLayoutEffect(() => {
35
- if (!focusWhenScrollable) return;
36
- const node = box.current;
37
- if (!node) return;
38
- const measure = () => setOverflows(node.scrollHeight > node.clientHeight || node.scrollWidth > node.clientWidth);
39
- measure();
40
- if (typeof ResizeObserver !== "function") return;
41
- const watch = new ResizeObserver(measure);
42
- watch.observe(node);
43
- return () => watch.disconnect();
44
- }, [focusWhenScrollable, body, wrap, showLineNumbers, prompt, maxHeight]);
45
- const focusable = selectable || focusWhenScrollable && overflows;
46
- const onKeyDown = (event) => {
47
- const isA = event.code === "KeyA" || !event.code && event.key.toLowerCase() === "a";
48
- if (!isA || event.altKey || event.shiftKey || !(event.metaKey || event.ctrlKey)) return;
49
- const node = box.current;
50
- const selection = window.getSelection?.();
51
- if (!node || !selection) return;
52
- event.preventDefault();
53
- selection.removeAllRanges();
54
- const range = document.createRange();
55
- range.selectNodeContents(node);
56
- selection.addRange(range);
57
- };
58
- let content = body;
59
- let digits;
60
- if (perLine) {
61
- const lines = body.split("\n");
62
- if (showLineNumbers) digits = String(lines.length).length;
63
- content = lines.map((line, index) => /* @__PURE__ */ jsxs("span", { className: "crewlet-codeblock__line", children: [
64
- showLineNumbers ? /* @__PURE__ */ jsx("span", { className: "crewlet-codeblock__ln", "aria-hidden": true, children: index + 1 }) : null,
65
- prompt === void 0 ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-codeblock__prompt", "aria-hidden": true, children: prompt }),
66
- /* @__PURE__ */ jsx("span", { className: "crewlet-codeblock__linecontent", children: line }),
67
- index < lines.length - 1 ? "\n" : null
68
- ] }, `${index}-${line}`));
69
- }
70
- return /* @__PURE__ */ jsxs(
71
- "div",
72
- {
73
- ...rest,
74
- ref,
75
- className: cx(
76
- "crewlet-codeblock",
77
- showLineNumbers && "crewlet-codeblock--numbered",
78
- !wrap && "crewlet-codeblock--nowrap",
79
- corner && "crewlet-codeblock--corner",
80
- maxHeight !== void 0 && "crewlet-codeblock--bounded",
81
- className
82
- ),
83
- style: maxHeight === void 0 && digits === void 0 ? style : {
84
- ...style,
85
- ...maxHeight === void 0 ? null : { "--crewlet-codeblock-max-height": typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight },
86
- ...digits === void 0 ? null : { "--crewlet-codeblock-digits": String(digits) }
87
- },
88
- children: [
89
- showHeader ? /* @__PURE__ */ jsxs("div", { className: "crewlet-codeblock__header", children: [
90
- /* @__PURE__ */ jsxs("span", { className: "crewlet-codeblock__meta", children: [
91
- filename === void 0 ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-codeblock__filename", children: filename }),
92
- language !== void 0 && filename === void 0 ? /* @__PURE__ */ jsx("span", { className: "crewlet-codeblock__lang", children: language }) : null
93
- ] }),
94
- copyable ? /* @__PURE__ */ jsx(CopyButton, { text: code, label: copyLabel ?? "Copy", className: "crewlet-codeblock__copy" }) : null
95
- ] }) : null,
96
- corner ? /* @__PURE__ */ jsx(CornerCopy, { text: code, label: copyLabel ?? "Copy code" }) : null,
97
- /* @__PURE__ */ jsx(
98
- "pre",
99
- {
100
- ref: box,
101
- className: "crewlet-codeblock__pre",
102
- "data-language": language,
103
- tabIndex: focusable ? 0 : void 0,
104
- role: focusable ? "region" : void 0,
105
- "aria-label": focusable ? label : void 0,
106
- onKeyDown: selectable ? onKeyDown : void 0,
107
- children: /* @__PURE__ */ jsx("code", { className: "crewlet-codeblock__code", children: content })
108
- }
109
- )
110
- ]
111
- }
112
- );
113
- });
114
- function CornerCopy({ text, label }) {
115
- const { state, attempt, copy } = useClipboard();
116
- const hint = state === "copied" ? "Copied" : state === "failed" ? "Copy failed" : label;
117
- return /* @__PURE__ */ jsxs("span", { className: "crewlet-codeblock__corner", children: [
118
- /* @__PURE__ */ jsx(IconButton, { label, size: "sm", variant: "ghost", icon: copyGlyph(state), tooltip: hint, onClick: () => void copy(text) }),
119
- /* @__PURE__ */ jsx(
120
- CopyStatus,
121
- {
122
- state,
123
- attempt,
124
- copiedMessage: "copied to the clipboard",
125
- failedMessage: "the browser refused the clipboard"
126
- }
127
- )
128
- ] });
129
- }
130
-
131
- export { CodeBlock };
@@ -1,94 +0,0 @@
1
- import { copyGlyph, CopyStatus } from './chunk-TRV7VZW6.js';
2
- import { useClipboard } from './chunk-STJ7QBC3.js';
3
- import { StatusDot } from './chunk-QRE6JCHS.js';
4
- import { IconButton } from './chunk-DJAYXYDZ.js';
5
- import { cx } from './chunk-ODEQTPFM.js';
6
- import './SettingsTable-MTZJTKA6.css';
7
- import { jsxs, jsx } from 'react/jsx-runtime';
8
-
9
- var COLUMNS = { setting: "Setting", value: "Value", source: "Source" };
10
- function SettingsTable({ header = false, columns, className, children, ...rest }) {
11
- const names = { ...COLUMNS, ...columns };
12
- return /* @__PURE__ */ jsxs("div", { ...rest, role: "table", className: cx("crewlet-settings-table", className), children: [
13
- /* @__PURE__ */ jsx(
14
- "div",
15
- {
16
- role: "rowgroup",
17
- className: cx("crewlet-settings-table__head", !header && "crewlet-settings-table__head--hidden"),
18
- children: /* @__PURE__ */ jsxs("div", { role: "row", className: "crewlet-settings-table__row", children: [
19
- /* @__PURE__ */ jsx("span", { role: "columnheader", className: "crewlet-settings-table__name", children: names.setting }),
20
- /* @__PURE__ */ jsx("span", { role: "columnheader", className: "crewlet-settings-table__name", children: names.value }),
21
- /* @__PURE__ */ jsx("span", { role: "columnheader", className: "crewlet-settings-table__name", children: names.source })
22
- ] })
23
- }
24
- ),
25
- /* @__PURE__ */ jsx("div", { role: "rowgroup", className: "crewlet-settings-table__body", children })
26
- ] });
27
- }
28
- function SettingsTableRow({
29
- label,
30
- settingKey,
31
- source,
32
- changed = false,
33
- className,
34
- children,
35
- ...rest
36
- }) {
37
- return /* @__PURE__ */ jsxs(
38
- "div",
39
- {
40
- ...rest,
41
- role: "row",
42
- "data-changed": changed ? "" : void 0,
43
- className: cx("crewlet-settings-table__row", className),
44
- children: [
45
- /* @__PURE__ */ jsxs("span", { role: "rowheader", className: "crewlet-settings-table__setting", children: [
46
- /* @__PURE__ */ jsx("span", { className: "crewlet-settings-table__label", children: label }),
47
- settingKey === void 0 ? null : /* @__PURE__ */ jsx(SettingKey, { settingKey })
48
- ] }),
49
- /* @__PURE__ */ jsx("span", { role: "cell", className: "crewlet-settings-table__value", children }),
50
- /* @__PURE__ */ jsxs(
51
- "span",
52
- {
53
- role: "cell",
54
- className: cx("crewlet-settings-table__source", changed && "crewlet-settings-table__source--changed"),
55
- children: [
56
- changed ? /* @__PURE__ */ jsx(StatusDot, { tone: "brand" }) : null,
57
- source
58
- ]
59
- }
60
- )
61
- ]
62
- }
63
- );
64
- }
65
- SettingsTable.Row = SettingsTableRow;
66
- function SettingKey({ settingKey }) {
67
- const { state, attempt, copy } = useClipboard({ failedResetMs: null });
68
- return /* @__PURE__ */ jsxs("span", { className: "crewlet-settings-table__key", "data-copy": state, children: [
69
- /* @__PURE__ */ jsx(
70
- IconButton,
71
- {
72
- size: "sm",
73
- variant: "ghost",
74
- icon: copyGlyph(state),
75
- label: `Copy the setting's key, ${settingKey}`,
76
- tooltip: settingKey,
77
- onClick: () => {
78
- void copy(settingKey);
79
- }
80
- }
81
- ),
82
- /* @__PURE__ */ jsx(
83
- CopyStatus,
84
- {
85
- state,
86
- attempt,
87
- copiedMessage: `${settingKey} copied to the clipboard`,
88
- failedMessage: "the browser refused the clipboard"
89
- }
90
- )
91
- ] });
92
- }
93
-
94
- export { SettingsTable, SettingsTableRow };
File without changes