@crewlethq/ui 0.4.4 → 0.5.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 (231) hide show
  1. package/README.md +888 -24
  2. package/dist/Accordion/index.js +2 -2
  3. package/dist/AddPill/index.js +1 -1
  4. package/dist/{AddPill-DFWXYLIQ.css → AddPill-IJQYCY6C.css} +9 -0
  5. package/dist/AppShell/AppShell.d.ts +26 -5
  6. package/dist/AppShell/index.js +3 -3
  7. package/dist/{AppShell-NVE6LHNI.css → AppShell-XARELGIH.css} +178 -25
  8. package/dist/Avatar/Avatar.d.ts +85 -40
  9. package/dist/Avatar/AvatarStack.d.ts +76 -0
  10. package/dist/Avatar/index.d.ts +5 -2
  11. package/dist/Avatar/index.js +1 -1
  12. package/dist/Avatar-XID7Z74C.css +200 -0
  13. package/dist/AvatarStack-GEJBNV7E.css +72 -0
  14. package/dist/BrandLockup/index.js +1 -1
  15. package/dist/{BrandLockup-6ISDEHPJ.css → BrandLockup-JKGXFCZF.css} +25 -19
  16. package/dist/Button/Button.d.ts +7 -2
  17. package/dist/Button/index.js +1 -1
  18. package/dist/{Button-D4J6B4MA.css → Button-X4B2TJAQ.css} +50 -19
  19. package/dist/Callout/index.js +1 -1
  20. package/dist/Canvas/index.js +4 -4
  21. package/dist/Card/Card.d.ts +9 -5
  22. package/dist/Card/index.js +1 -1
  23. package/dist/{Card-RLR254LD.css → Card-GLP7SUV6.css} +25 -18
  24. package/dist/Charts/BarList.d.ts +18 -1
  25. package/dist/Charts/ChartTooltip.d.ts +68 -0
  26. package/dist/Charts/StackedBar.d.ts +25 -7
  27. package/dist/Charts/StackedColumns.d.ts +112 -0
  28. package/dist/Charts/TimeSeries.d.ts +33 -2
  29. package/dist/Charts/dataColor.d.ts +22 -14
  30. package/dist/Charts/index.d.ts +6 -0
  31. package/dist/Charts/index.js +1 -1
  32. package/dist/Charts/useChartHover.d.ts +56 -0
  33. package/dist/Charts-B3YEF7R4.css +742 -0
  34. package/dist/Checkbox/index.js +1 -1
  35. package/dist/{Checkbox-VGW26YLQ.css → Checkbox-BOXQ747I.css} +2 -2
  36. package/dist/CodeBlock/index.js +4 -4
  37. package/dist/Combobox/index.js +5 -5
  38. package/dist/CommandPalette/CommandPalette.d.ts +97 -6
  39. package/dist/CommandPalette/index.d.ts +1 -1
  40. package/dist/CommandPalette/index.js +9 -7
  41. package/dist/CommandPalette-C5AMKGN2.css +259 -0
  42. package/dist/Copyable/index.js +3 -3
  43. package/dist/DataTable/index.js +7 -7
  44. package/dist/{DataTable-37UWTRN6.css → DataTable-OLHPF7D4.css} +35 -38
  45. package/dist/DataView/index.js +15 -15
  46. package/dist/{DataView-256YF32J.css → DataView-N6JX464S.css} +5 -4
  47. package/dist/DateTimePicker/index.js +5 -5
  48. package/dist/DiffList/index.js +1 -1
  49. package/dist/Disclosure/index.js +2 -2
  50. package/dist/EntityChip/EntityChip.d.ts +9 -12
  51. package/dist/EntityChip/index.d.ts +1 -1
  52. package/dist/EntityChip/index.js +2 -2
  53. package/dist/ErrorBoundary/index.js +2 -2
  54. package/dist/{ErrorBoundary-ME36CQTA.css → ErrorBoundary-U2PA3LY2.css} +4 -4
  55. package/dist/IconButton/index.js +1 -1
  56. package/dist/{IconButton-VQGNMJDI.css → IconButton-TVEUWK6L.css} +2 -2
  57. package/dist/ImageUpload/ImageUpload.d.ts +10 -7
  58. package/dist/ImageUpload/index.js +2 -2
  59. package/dist/{ImageUpload-HKFIZR6D.css → ImageUpload-YCHJMUGX.css} +24 -10
  60. package/dist/Input/index.js +2 -2
  61. package/dist/Kbd/Kbd.d.ts +14 -4
  62. package/dist/Kbd/index.js +1 -1
  63. package/dist/Kbd-JPLDVJIP.css +71 -0
  64. package/dist/Layer/index.js +1 -1
  65. package/dist/Link/index.js +1 -1
  66. package/dist/List/index.js +1 -1
  67. package/dist/{List-XTHESXLR.css → List-MYJIV6MP.css} +12 -2
  68. package/dist/ListInput/index.js +6 -6
  69. package/dist/Listbox/index.js +2 -2
  70. package/dist/Listbox/useListbox.d.ts +2 -0
  71. package/dist/{Listbox-ZXYYNN6U.css → Listbox-6WJNJQVQ.css} +32 -7
  72. package/dist/Menu/index.js +4 -4
  73. package/dist/Meter/Meter.d.ts +103 -16
  74. package/dist/Meter/index.d.ts +2 -2
  75. package/dist/Meter/index.js +1 -1
  76. package/dist/{Meter-SKOOXQBC.css → Meter-5VCSFMZW.css} +46 -7
  77. package/dist/Modal/index.js +4 -4
  78. package/dist/{Modal-XYQJ4BL6.css → Modal-JAYBS2KS.css} +13 -4
  79. package/dist/OrgLabel/OrgLabel.d.ts +60 -24
  80. package/dist/OrgLabel/index.d.ts +1 -1
  81. package/dist/OrgLabel/index.js +2 -1
  82. package/dist/{OrgLabel-D7U6QJZD.css → OrgLabel-CR233G34.css} +9 -18
  83. package/dist/OrgNode/index.js +3 -2
  84. package/dist/OrgTable/OrgTable.d.ts +2 -2
  85. package/dist/OrgTable/index.js +8 -7
  86. package/dist/Popover/index.js +2 -2
  87. package/dist/PricingCard/index.js +3 -3
  88. package/dist/{PricingCard-JFI7RYXP.css → PricingCard-7EFXRSD2.css} +4 -5
  89. package/dist/SearchTrigger/SearchTrigger.d.ts +23 -4
  90. package/dist/SearchTrigger/index.d.ts +1 -1
  91. package/dist/SearchTrigger/index.js +1 -1
  92. package/dist/SearchTrigger-Z5D4AAY7.css +112 -0
  93. package/dist/SegmentedControl/index.js +2 -2
  94. package/dist/SegmentedMeter/SegmentedMeter.d.ts +107 -0
  95. package/dist/SegmentedMeter/index.d.ts +3 -0
  96. package/dist/SegmentedMeter/index.js +2 -0
  97. package/dist/SegmentedMeter-KQNML2TW.css +109 -0
  98. package/dist/Select/index.js +3 -3
  99. package/dist/Shortcut/index.js +2 -2
  100. package/dist/SidebarNav/SidebarNav.d.ts +85 -25
  101. package/dist/SidebarNav/index.d.ts +1 -1
  102. package/dist/SidebarNav/index.js +1 -1
  103. package/dist/SidebarNav-X5NLZNWA.css +424 -0
  104. package/dist/StatCard/StatCard.d.ts +59 -12
  105. package/dist/StatCard/index.d.ts +1 -1
  106. package/dist/StatCard/index.js +1 -1
  107. package/dist/StatCard-KPAFD4E2.css +204 -0
  108. package/dist/StatGroup/index.js +1 -1
  109. package/dist/{StatGroup-TGB6AEKM.css → StatGroup-HVG6O62W.css} +8 -9
  110. package/dist/StatusDot/StatusDot.d.ts +24 -6
  111. package/dist/StatusDot/index.js +1 -1
  112. package/dist/StatusDot-7OMCQCZF.css +186 -0
  113. package/dist/Stepper/Stepper.d.ts +78 -0
  114. package/dist/Stepper/index.d.ts +3 -0
  115. package/dist/Stepper/index.js +4 -0
  116. package/dist/Stepper-HW4JM3YH.css +176 -0
  117. package/dist/Tabs/index.js +1 -1
  118. package/dist/{Tabs-MJ2E3VPK.css → Tabs-XCNPHA7B.css} +46 -26
  119. package/dist/Tag/Tag.d.ts +29 -22
  120. package/dist/Tag/index.js +2 -2
  121. package/dist/{Tag-VNZEYLB6.css → Tag-GBE7LQJP.css} +82 -83
  122. package/dist/TagsInput/index.js +7 -7
  123. package/dist/ThemeSwitcher/ThemeSwitcher.d.ts +53 -21
  124. package/dist/ThemeSwitcher/index.d.ts +3 -3
  125. package/dist/ThemeSwitcher/index.js +4 -3
  126. package/dist/ThemeSwitcher/preferences.d.ts +19 -5
  127. package/dist/ThemeToggle/ThemeToggle.d.ts +40 -0
  128. package/dist/ThemeToggle/index.d.ts +2 -0
  129. package/dist/ThemeToggle/index.js +5 -0
  130. package/dist/TimeWindowPicker/index.js +8 -8
  131. package/dist/Toaster/index.js +2 -2
  132. package/dist/Toolbar/index.js +2 -2
  133. package/dist/{Toolbar-IP6LXN45.css → Toolbar-HUOSMNTH.css} +3 -1
  134. package/dist/Tooltip/index.js +2 -2
  135. package/dist/Tree/index.d.ts +2 -2
  136. package/dist/Tree/index.js +1 -1
  137. package/dist/Tree/layout.d.ts +103 -28
  138. package/dist/TreeCanvas/TreeCanvas.d.ts +60 -14
  139. package/dist/TreeCanvas/index.d.ts +1 -1
  140. package/dist/TreeCanvas/index.js +6 -6
  141. package/dist/TreeCanvas/motion.d.ts +3 -2
  142. package/dist/{TreeCanvas-WBNQPHC7.css → TreeCanvas-HVOV4SQN.css} +154 -30
  143. package/dist/TreeGrid/index.js +4 -4
  144. package/dist/{chunk-F6OE5FH3.js → chunk-2FPENTCF.js} +1 -1
  145. package/dist/chunk-4AK52VHB.js +88 -0
  146. package/dist/{chunk-7EM5T4ME.js → chunk-4IQD3HUQ.js} +2 -2
  147. package/dist/{chunk-YODNNSZL.js → chunk-4PZ6FJKW.js} +43 -13
  148. package/dist/{chunk-F27EPQ7D.js → chunk-4UQ7SMPK.js} +1 -1
  149. package/dist/chunk-5QWIJSQM.js +73 -0
  150. package/dist/{chunk-KIC7BZYJ.js → chunk-6MU7HNB4.js} +6 -5
  151. package/dist/{chunk-S2XHHEW4.js → chunk-74KMX7YH.js} +4 -4
  152. package/dist/{chunk-WNI2WSJF.js → chunk-7KBNFFM3.js} +1 -1
  153. package/dist/{chunk-EFSG7HNU.js → chunk-AUS5FNQE.js} +1 -1
  154. package/dist/{chunk-CMEE37QJ.js → chunk-BMYPGGPV.js} +4 -4
  155. package/dist/{chunk-H4FBTAYS.js → chunk-BNCCEER3.js} +8 -8
  156. package/dist/chunk-C5WJUZVR.js +56 -0
  157. package/dist/{chunk-5WS6L6FA.js → chunk-CAIHUYXV.js} +9 -9
  158. package/dist/{chunk-5KSRXHOW.js → chunk-CQY5NTRS.js} +1 -1
  159. package/dist/{chunk-MW356IVK.js → chunk-D6EVJUGU.js} +2 -2
  160. package/dist/{chunk-7PEFUMQJ.js → chunk-DHPUMOTX.js} +2 -2
  161. package/dist/{chunk-HZ5XZNPS.js → chunk-DS2C73RJ.js} +3 -3
  162. package/dist/{chunk-GKHAKGOF.js → chunk-DSUY5F4E.js} +3 -3
  163. package/dist/{chunk-Q4ZPPART.js → chunk-EFYPAJT3.js} +3 -3
  164. package/dist/{chunk-PATXSJGR.js → chunk-ERVO6OUF.js} +17 -17
  165. package/dist/{chunk-BZYDZBAN.js → chunk-ETYEBKR4.js} +3 -3
  166. package/dist/{chunk-CC67MUUO.js → chunk-FD5UEN6X.js} +30 -30
  167. package/dist/{chunk-5SDBMKUO.js → chunk-FIFNP6PL.js} +3 -3
  168. package/dist/{chunk-7HPRF5XN.js → chunk-FUF52K7E.js} +98 -16
  169. package/dist/{chunk-5KPQ6D7N.js → chunk-FZVJDJFN.js} +2 -2
  170. package/dist/chunk-IA232OTU.js +156 -0
  171. package/dist/{chunk-2EOKFKHX.js → chunk-IG27QX7Q.js} +7 -7
  172. package/dist/chunk-IKB6HFGK.js +55 -0
  173. package/dist/{chunk-T43A26SD.js → chunk-IPVQKAHO.js} +6 -6
  174. package/dist/{chunk-3EYF6HKB.js → chunk-IVFJD7WY.js} +28 -9
  175. package/dist/{chunk-XJWXPRSK.js → chunk-JGRNTBF2.js} +11 -11
  176. package/dist/chunk-K3OWD7BJ.js +121 -0
  177. package/dist/{chunk-6KCO2D5C.js → chunk-KD4H66L6.js} +7 -20
  178. package/dist/{chunk-SFZOKW2G.js → chunk-KJ34ZBBI.js} +8 -3
  179. package/dist/{chunk-AQTBF4EB.js → chunk-LFHCXZO5.js} +5 -5
  180. package/dist/{chunk-LWKJQTOM.js → chunk-MICH6QSJ.js} +1 -1
  181. package/dist/chunk-N3DPO6HG.js +226 -0
  182. package/dist/{chunk-S4GZWSKR.js → chunk-OM5E3TTK.js} +1 -1
  183. package/dist/{chunk-3QRYCPXQ.js → chunk-OPKIKM35.js} +6 -6
  184. package/dist/{chunk-5EKIWVOR.js → chunk-PGRPNDWM.js} +2 -2
  185. package/dist/{chunk-FSOW3ARP.js → chunk-PQNILU27.js} +9 -9
  186. package/dist/{chunk-QNCVHRZL.js → chunk-QVAFL2LE.js} +1 -1
  187. package/dist/{chunk-Q3B66TJM.js → chunk-QY7UU5ZB.js} +1 -1
  188. package/dist/{chunk-ITHXJHBB.js → chunk-R25RGPUB.js} +1 -0
  189. package/dist/{chunk-KLJCCMF3.js → chunk-R6735B37.js} +2 -2
  190. package/dist/{chunk-3ZP55QZE.js → chunk-R6FBDTP3.js} +4 -4
  191. package/dist/{chunk-7FZ53WDJ.js → chunk-RIAZM6L3.js} +1 -1
  192. package/dist/chunk-RJM4QCGG.js +550 -0
  193. package/dist/{chunk-NTRZGNEX.js → chunk-S3BCVWTU.js} +215 -46
  194. package/dist/chunk-S7KW47IQ.js +121 -0
  195. package/dist/{chunk-KNYYCWMK.js → chunk-SJQ546ID.js} +4 -4
  196. package/dist/{chunk-D35VTV2Z.js → chunk-SV7QAONL.js} +1 -1
  197. package/dist/{chunk-IAJLHVUA.js → chunk-TIWAHZZ6.js} +1 -1
  198. package/dist/{chunk-2PRH365R.js → chunk-UA7O3KKJ.js} +1 -1
  199. package/dist/{chunk-NPZY6YYL.js → chunk-UG5ZMAXW.js} +6 -6
  200. package/dist/{chunk-NDCATSW7.js → chunk-V34H2YCY.js} +1 -1
  201. package/dist/chunk-WIATRXEJ.js +22 -0
  202. package/dist/{chunk-5C5YMZQU.js → chunk-WOFOMTGB.js} +16 -10
  203. package/dist/{chunk-QYOFACSP.js → chunk-WSOFKOLP.js} +3 -3
  204. package/dist/{chunk-MNAXYY3R.js → chunk-WUVZDFHS.js} +31 -11
  205. package/dist/{chunk-DB2VDLVR.js → chunk-YIMOT5OO.js} +10 -10
  206. package/dist/{chunk-2ZQMA2WB.js → chunk-ZPSOF6VL.js} +2 -2
  207. package/dist/generated/index.d.ts +3 -0
  208. package/dist/generated/index.js +69 -65
  209. package/dist/index.js +69 -65
  210. package/dist/styles.css +2538 -741
  211. package/dist/utils/index.d.ts +1 -1
  212. package/dist/utils/tone.d.ts +7 -12
  213. package/package.json +4 -4
  214. package/scripts/check-css-literals.mjs +159 -23
  215. package/scripts/check-css-variables.mjs +5 -3
  216. package/scripts/css-source.mjs +97 -5
  217. package/dist/Avatar-P2KRQM2B.css +0 -156
  218. package/dist/Charts-D7G2BSXH.css +0 -277
  219. package/dist/CommandPalette-CSJDUCQA.css +0 -115
  220. package/dist/Kbd-W66MXQI5.css +0 -61
  221. package/dist/SearchTrigger-QXOYAUUY.css +0 -79
  222. package/dist/SidebarNav-QGSFKZYA.css +0 -319
  223. package/dist/StatCard-KYPKZUWX.css +0 -111
  224. package/dist/StatusDot-HA2L2FSX.css +0 -84
  225. package/dist/chunk-22O7LAW2.js +0 -41
  226. package/dist/chunk-AJNCATWZ.js +0 -144
  227. package/dist/chunk-F4PJZ4ED.js +0 -245
  228. package/dist/chunk-PNFASD6F.js +0 -98
  229. package/dist/chunk-PZSWF74H.js +0 -15
  230. package/dist/chunk-R66KLW7S.js +0 -143
  231. /package/dist/{chunk-ZCR6YGQ4.js → chunk-PKIN4IMB.js} +0 -0
@@ -146,28 +146,36 @@ function treeTypeAhead(tree, expanded, from, text) {
146
146
 
147
147
  // src/Tree/layout.ts
148
148
  var MIN_OUTLINE_HEIGHT = 1;
149
- function bandsOf(roots, gapY) {
149
+ function roomOf(membership) {
150
+ return { head: membership?.group.inset.top ?? 0, foot: membership?.group.inset.bottom ?? 0 };
151
+ }
152
+ function bandsOf(roots, gapY, groupOf) {
150
153
  const height = [];
154
+ const head = [];
155
+ const foot = [];
151
156
  const visit = (node, depth) => {
157
+ const room = roomOf(groupOf.get(node.id));
152
158
  height[depth] = Math.max(height[depth] ?? 0, node.height);
159
+ head[depth] = Math.max(head[depth] ?? 0, room.head);
160
+ foot[depth] = Math.max(foot[depth] ?? 0, room.foot);
153
161
  node.children.forEach((child) => visit(child, depth + 1));
154
162
  };
155
163
  roots.forEach((root) => visit(root, 0));
156
164
  const top = [];
157
165
  let at = 0;
158
166
  for (let depth = 0; depth < height.length; depth++) {
159
- top[depth] = at;
160
- at += height[depth] + gapY;
167
+ top[depth] = at + head[depth];
168
+ at = top[depth] + height[depth] + foot[depth] + gapY;
161
169
  }
162
170
  return { top, height };
163
171
  }
164
172
  function shift(outline, dx, dy) {
165
- return outline.map((s) => ({ top: s.top + dy, bottom: s.bottom + dy, value: s.value + dx }));
173
+ return outline.map((s) => ({ ...s, top: s.top + dy, bottom: s.bottom + dy, value: s.value + dx }));
166
174
  }
167
175
  function mirror(outline) {
168
176
  return outline.map((s) => ({ ...s, value: -s.value }));
169
177
  }
170
- function merge(a, b, pick) {
178
+ function merge(a, b, keep) {
171
179
  const cuts = [...new Set([...a, ...b].flatMap((s) => [s.top, s.bottom]))].sort((x, y) => x - y);
172
180
  const out = [];
173
181
  let i = 0;
@@ -177,13 +185,16 @@ function merge(a, b, pick) {
177
185
  const hi = cuts[k + 1];
178
186
  while (i < a.length && a[i].bottom <= lo) i++;
179
187
  while (j < b.length && b[j].bottom <= lo) j++;
180
- const va = i < a.length && a[i].top <= lo ? a[i].value : void 0;
181
- const vb = j < b.length && b[j].top <= lo ? b[j].value : void 0;
182
- const value = va !== void 0 && vb !== void 0 ? pick(va, vb) : va ?? vb;
183
- if (value === void 0) continue;
188
+ const sa = i < a.length && a[i].top <= lo ? a[i] : void 0;
189
+ const sb = j < b.length && b[j].top <= lo ? b[j] : void 0;
190
+ const chosen = sa && sb ? (keep === "max" ? sb.value > sa.value : sb.value < sa.value) ? sb : sa : sa ?? sb;
191
+ if (chosen === void 0) continue;
184
192
  const last = out[out.length - 1];
185
- if (last && last.bottom === lo && last.value === value) last.bottom = hi;
186
- else out.push({ top: lo, bottom: hi, value });
193
+ if (last && last.bottom === lo && last.value === chosen.value && last.group === chosen.group) {
194
+ last.bottom = hi;
195
+ } else {
196
+ out.push({ top: lo, bottom: hi, value: chosen.value, group: chosen.group, pad: chosen.pad });
197
+ }
187
198
  }
188
199
  return out;
189
200
  }
@@ -193,7 +204,9 @@ function separation(right, left, gap) {
193
204
  for (const s of left) {
194
205
  while (i < right.length && right[i].bottom <= s.top) i++;
195
206
  for (let k = i; k < right.length && right[k].top < s.bottom; k++) {
196
- need = Math.max(need, right[k].value - s.value);
207
+ const edge = right[k];
208
+ const inside = edge.group !== null && edge.group === s.group ? edge.pad + s.pad : 0;
209
+ need = Math.max(need, edge.value - s.value - inside);
197
210
  }
198
211
  }
199
212
  if (Number.isFinite(need)) return need + gap;
@@ -207,7 +220,7 @@ function packFromLeft(kids2, gap) {
207
220
  for (let i = 1; i < kids2.length; i++) {
208
221
  const at = separation(reach, kids2[i].left, gap);
209
222
  positions.push(at);
210
- reach = merge(reach, shift(kids2[i].right, at, 0), Math.max);
223
+ reach = merge(reach, shift(kids2[i].right, at, 0), "max");
211
224
  }
212
225
  return positions;
213
226
  }
@@ -220,24 +233,42 @@ function pack(kids2, gap) {
220
233
  const centre = (averaged[0] + averaged[averaged.length - 1]) / 2;
221
234
  return averaged.map((p) => p - centre);
222
235
  }
223
- function build(node, gaps, bands, depth) {
224
- const kids2 = node.children.map((child) => build(child, gaps, bands, depth + 1));
236
+ function childDrop(node, gaps, groupOf) {
237
+ const own = groupOf.get(node.id);
238
+ const body = own ? own.tallest : node.height;
239
+ let head = 0;
240
+ for (const child of node.children) head = Math.max(head, roomOf(groupOf.get(child.id)).head);
241
+ return body + roomOf(own).foot + gaps.gapY + head;
242
+ }
243
+ function build(node, gaps, bands, depth, groupOf) {
244
+ const kids2 = node.children.map((child) => build(child, gaps, bands, depth + 1, groupOf));
225
245
  const half = node.width / 2;
226
246
  const tall = Math.max(node.height, MIN_OUTLINE_HEIGHT);
227
247
  const inBand = bands ? (bands.height[depth] - node.height) / 2 : 0;
228
- let left = [{ top: inBand, bottom: inBand + tall, value: -half }];
229
- let right = [{ top: inBand, bottom: inBand + tall, value: half }];
248
+ const member = groupOf.get(node.id);
249
+ const pad = member?.group.inset.x ?? 0;
250
+ const group = member?.group.id ?? null;
251
+ let top = inBand;
252
+ let bottom = inBand + tall;
253
+ if (member) {
254
+ const body = Math.max(member.tallest, MIN_OUTLINE_HEIGHT);
255
+ const at = bands ? (bands.height[depth] - member.tallest) / 2 : 0;
256
+ top = at - member.group.inset.top;
257
+ bottom = at + body + member.group.inset.bottom;
258
+ }
259
+ let left = [{ top, bottom, value: -half - pad, group, pad }];
260
+ let right = [{ top, bottom, value: half + pad, group, pad }];
230
261
  if (kids2.length === 0) return { node, kids: kids2, offsets: [], inBand, left, right };
231
262
  const offsets = pack(kids2, gaps.gapX);
232
- const childTop = bands ? bands.top[depth + 1] - bands.top[depth] : node.height + gaps.gapY;
263
+ const childTop = bands ? bands.top[depth + 1] - bands.top[depth] : childDrop(node, gaps, groupOf);
233
264
  if (!bands && childTop > node.height) {
234
- const band = (value) => [{ top: node.height, bottom: childTop, value }];
235
- left = merge(left, band(Math.min(-half, offsets[0])), Math.min);
236
- right = merge(right, band(Math.max(half, offsets[offsets.length - 1])), Math.max);
265
+ const band = (value) => [{ top: node.height, bottom: childTop, value, group: null, pad: 0 }];
266
+ left = merge(left, band(Math.min(-half, offsets[0])), "min");
267
+ right = merge(right, band(Math.max(half, offsets[offsets.length - 1])), "max");
237
268
  }
238
269
  kids2.forEach((kid, i) => {
239
- left = merge(left, shift(kid.left, offsets[i], childTop), Math.min);
240
- right = merge(right, shift(kid.right, offsets[i], childTop), Math.max);
270
+ left = merge(left, shift(kid.left, offsets[i], childTop), "min");
271
+ right = merge(right, shift(kid.right, offsets[i], childTop), "max");
241
272
  });
242
273
  return { node, kids: kids2, offsets, inBand, left, right };
243
274
  }
@@ -251,30 +282,107 @@ function validate(roots, gaps) {
251
282
  if (gaps.ranks !== void 0 && gaps.ranks !== "per-parent" && gaps.ranks !== "shared") {
252
283
  throw new RangeError(`layoutForest: ranks is "${gaps.ranks}"; it is "per-parent" or "shared"`);
253
284
  }
254
- const seen = /* @__PURE__ */ new Set();
255
- const visit = (node) => {
285
+ const seen = /* @__PURE__ */ new Map();
286
+ const place = /* @__PURE__ */ new Map();
287
+ const visit = (node, parent, index) => {
256
288
  if (seen.has(node.id)) {
257
289
  throw new RangeError(`layoutForest: the id "${node.id}" appears twice; every box needs its own id`);
258
290
  }
259
- seen.add(node.id);
291
+ seen.set(node.id, node);
292
+ place.set(node.id, { parent, index });
260
293
  if (!size(node.width) || !size(node.height)) {
261
294
  throw new RangeError(
262
295
  `layoutForest: "${node.id}" is ${node.width} by ${node.height}; a size must be finite and non-negative`
263
296
  );
264
297
  }
265
- node.children.forEach(visit);
298
+ node.children.forEach((child, i) => visit(child, node.id, i));
266
299
  };
267
- roots.forEach(visit);
300
+ roots.forEach((root, i) => visit(root, null, i));
301
+ const groupOf = /* @__PURE__ */ new Map();
302
+ const named = /* @__PURE__ */ new Set();
303
+ for (const group of gaps.groups ?? []) {
304
+ const { id, members, inset } = group;
305
+ if (named.has(id)) throw new RangeError(`layoutForest: the group "${id}" appears twice`);
306
+ named.add(id);
307
+ if (!size(inset.x) || !size(inset.top) || !size(inset.bottom)) {
308
+ throw new RangeError(
309
+ `layoutForest: the group "${id}" has the inset ${JSON.stringify(inset)}; each side must be finite and non-negative`
310
+ );
311
+ }
312
+ if (members.length === 0) throw new RangeError(`layoutForest: the group "${id}" has no members`);
313
+ let tallest = 0;
314
+ const indices = [];
315
+ let parent;
316
+ for (const member of members) {
317
+ const node = seen.get(member);
318
+ if (!node) throw new RangeError(`layoutForest: the group "${id}" names "${member}", which is no box of the forest`);
319
+ const other = groupOf.get(member);
320
+ if (other) {
321
+ throw new RangeError(
322
+ `layoutForest: "${member}" is in the group "${other.group.id}" and in "${id}"; a box is in one group at most`
323
+ );
324
+ }
325
+ const at = place.get(member);
326
+ if (parent !== void 0 && at.parent !== parent) {
327
+ throw new RangeError(
328
+ `layoutForest: the group "${id}" holds boxes of different parents; a group is a run of siblings`
329
+ );
330
+ }
331
+ parent = at.parent;
332
+ indices.push(at.index);
333
+ tallest = Math.max(tallest, node.height);
334
+ groupOf.set(member, { group, tallest: 0 });
335
+ }
336
+ indices.sort((a, b) => a - b);
337
+ if (indices[indices.length - 1] - indices[0] + 1 !== indices.length) {
338
+ throw new RangeError(
339
+ `layoutForest: the group "${id}" skips a sibling between its members; a group is a CONSECUTIVE run of siblings`
340
+ );
341
+ }
342
+ for (const member of members) groupOf.set(member, { group, tallest });
343
+ }
344
+ return groupOf;
345
+ }
346
+ function placeGroups(byId, groups) {
347
+ return groups.map(({ id, members, inset }) => {
348
+ let left = Infinity;
349
+ let top = Infinity;
350
+ let right = -Infinity;
351
+ let bottom = -Infinity;
352
+ for (const member of members) {
353
+ const box = byId.get(member);
354
+ if (!box) continue;
355
+ left = Math.min(left, box.x);
356
+ top = Math.min(top, box.y);
357
+ right = Math.max(right, box.x + box.width);
358
+ bottom = Math.max(bottom, box.y + box.height);
359
+ }
360
+ return {
361
+ id,
362
+ members,
363
+ inset,
364
+ x: left - inset.x,
365
+ y: top - inset.top,
366
+ width: right - left + inset.x * 2,
367
+ height: bottom - top + inset.top + inset.bottom
368
+ };
369
+ });
268
370
  }
269
371
  function layoutForest(roots, gaps) {
270
- validate(roots, gaps);
372
+ const groupOf = validate(roots, gaps);
271
373
  const margin = gaps.margin ?? 0;
272
374
  const nodes = [];
273
375
  if (roots.length === 0) {
274
- return { nodes, byId: /* @__PURE__ */ new Map(), bounds: { x: 0, y: 0, width: 0, height: 0 } };
376
+ return {
377
+ nodes,
378
+ byId: /* @__PURE__ */ new Map(),
379
+ groups: [],
380
+ ranks: gaps.ranks ?? "per-parent",
381
+ bounds: { x: 0, y: 0, width: 0, height: 0 }
382
+ };
275
383
  }
276
- const bands = gaps.ranks === "shared" ? bandsOf(roots, gaps.gapY) : null;
277
- const trees = roots.map((root) => build(root, gaps, bands, 0));
384
+ const bands = gaps.ranks === "shared" ? bandsOf(roots, gaps.gapY, groupOf) : null;
385
+ const trees = roots.map((root) => build(root, gaps, bands, 0, groupOf));
278
386
  const centres = pack(trees, gaps.gapX);
279
387
  const place = (tree, centre, top, depth, parent) => {
280
388
  const { node } = tree;
@@ -287,29 +395,74 @@ function layoutForest(roots, gaps) {
287
395
  depth,
288
396
  parent
289
397
  });
290
- const childTop = bands ? bands.top[depth + 1] : top + node.height + gaps.gapY;
398
+ const childTop = bands ? bands.top[depth + 1] : top + childDrop(node, gaps, groupOf);
291
399
  tree.kids.forEach((kid, i) => place(kid, centre + tree.offsets[i], childTop, depth + 1, node.id));
292
400
  };
293
- trees.forEach((tree, i) => place(tree, centres[i], bands ? bands.top[0] : 0, 0, null));
401
+ let rootHead = 0;
402
+ for (const root of roots) rootHead = Math.max(rootHead, roomOf(groupOf.get(root.id)).head);
403
+ trees.forEach((tree, i) => place(tree, centres[i], bands ? bands.top[0] : rootHead, 0, null));
404
+ const padOf = (id) => groupOf.get(id)?.group.inset.x ?? 0;
294
405
  let minX = Infinity;
295
- for (const node of nodes) minX = Math.min(minX, node.x);
296
- let maxX = -Infinity;
297
- let maxY = 0;
406
+ for (const node of nodes) minX = Math.min(minX, node.x - padOf(node.id));
298
407
  for (const node of nodes) {
299
408
  node.x += margin - minX;
300
409
  node.y += margin;
301
- maxX = Math.max(maxX, node.x + node.width);
302
- maxY = Math.max(maxY, node.y + node.height);
410
+ }
411
+ const byId = new Map(nodes.map((node) => [node.id, node]));
412
+ const groups = placeGroups(byId, gaps.groups ?? []);
413
+ let maxX = -Infinity;
414
+ let maxY = 0;
415
+ for (const one of [...nodes, ...groups]) {
416
+ maxX = Math.max(maxX, one.x + one.width);
417
+ maxY = Math.max(maxY, one.y + one.height);
303
418
  }
304
419
  return {
305
420
  nodes,
306
- byId: new Map(nodes.map((node) => [node.id, node])),
421
+ byId,
422
+ groups,
423
+ ranks: gaps.ranks ?? "per-parent",
307
424
  bounds: { x: 0, y: 0, width: maxX + margin, height: maxY + margin }
308
425
  };
309
426
  }
310
- var CONNECTOR_RADIUS = 12;
311
- function layoutConnectors(layout, shape = "step") {
427
+ var ELBOW_RADIUS = 6;
428
+ var CENTRED = 1e-6;
429
+ var STEP_RADIUS = 12;
430
+ function busOf(layout) {
431
+ const boxOf = /* @__PURE__ */ new Map();
432
+ for (const group of layout.groups ?? []) for (const member of group.members) boxOf.set(member, group);
433
+ const topOf = (node) => Math.min(boxOf.get(node.id)?.y ?? node.y, node.y);
434
+ const bottomOf = (node) => {
435
+ const box = boxOf.get(node.id);
436
+ return Math.max(box ? box.y + box.height : -Infinity, node.y + node.height);
437
+ };
438
+ const shared = layout.ranks === "shared";
439
+ const rankTop = /* @__PURE__ */ new Map();
440
+ const rankBottom = /* @__PURE__ */ new Map();
441
+ if (shared) {
442
+ for (const node of layout.nodes) {
443
+ rankTop.set(node.depth, Math.min(rankTop.get(node.depth) ?? Infinity, topOf(node)));
444
+ rankBottom.set(node.depth, Math.max(rankBottom.get(node.depth) ?? -Infinity, bottomOf(node)));
445
+ }
446
+ }
447
+ const reach = /* @__PURE__ */ new Map();
448
+ for (const node of layout.nodes) {
449
+ if (node.parent === null) continue;
450
+ const top = shared ? rankTop.get(node.depth) : topOf(node);
451
+ reach.set(node.parent, Math.min(reach.get(node.parent) ?? Infinity, top));
452
+ }
453
+ const bus = /* @__PURE__ */ new Map();
454
+ for (const [id, top] of reach) {
455
+ const parent = layout.byId.get(id);
456
+ if (!parent) continue;
457
+ const bottom = parent.y + parent.height;
458
+ const from = shared ? rankBottom.get(parent.depth) : bottomOf(parent);
459
+ bus.set(id, Math.min(Math.max(from + (top - from) / 2, bottom), top));
460
+ }
461
+ return bus;
462
+ }
463
+ function layoutConnectors(layout, shape = "elbow") {
312
464
  const out = [];
465
+ const bus = busOf(layout);
313
466
  for (const node of layout.nodes) {
314
467
  if (node.parent === null) continue;
315
468
  const parent = layout.byId.get(node.parent);
@@ -318,19 +471,35 @@ function layoutConnectors(layout, shape = "step") {
318
471
  const fromY = parent.y + parent.height;
319
472
  const toX = node.x + node.width / 2;
320
473
  const toY = node.y;
321
- const midY = fromY + (toY - fromY) / 2;
474
+ const midY = bus.get(parent.id) ?? fromY + (toY - fromY) / 2;
322
475
  const across = toX - fromX;
323
476
  const at = (d) => out.push({ id: node.id, parent: parent.id, d });
477
+ if (shape === "straight") {
478
+ at(`M${fromX} ${fromY}L${toX} ${toY}`);
479
+ continue;
480
+ }
324
481
  if (shape === "curve") {
325
482
  at(`M ${fromX} ${fromY} C ${fromX} ${midY}, ${toX} ${midY}, ${toX} ${toY}`);
326
483
  continue;
327
484
  }
328
- if (Math.abs(across) < 0.5) {
485
+ if (Math.abs(across) < CENTRED) {
329
486
  at(`M${fromX} ${fromY}V${toY}`);
330
487
  continue;
331
488
  }
332
- const radius = Math.min(CONNECTOR_RADIUS, Math.abs(across) / 2, Math.abs(midY - fromY));
489
+ const radius = Math.min(
490
+ shape === "elbow" ? ELBOW_RADIUS : STEP_RADIUS,
491
+ Math.abs(across) / 2,
492
+ Math.max(0, midY - fromY),
493
+ Math.max(0, toY - midY)
494
+ );
333
495
  const step = across > 0 ? radius : -radius;
496
+ if (shape === "elbow") {
497
+ const first = across > 0 ? 0 : 1;
498
+ at(
499
+ `M${fromX} ${fromY}V${midY - radius}A${radius} ${radius} 0 0 ${first} ${fromX + step} ${midY}H${toX - step}A${radius} ${radius} 0 0 ${1 - first} ${toX} ${midY + radius}V${toY}`
500
+ );
501
+ continue;
502
+ }
334
503
  at(
335
504
  `M${fromX} ${fromY}V${midY - radius}Q${fromX} ${midY},${fromX + step} ${midY}H${toX - step}Q${toX} ${midY},${toX} ${midY + radius}V${toY}`
336
505
  );
@@ -526,4 +695,4 @@ function useLayoutAnchor(positions, anchorId, keep) {
526
695
  }, [positions, anchorId]);
527
696
  }
528
697
 
529
- export { SIZE_EPSILON, TYPE_AHEAD_RESET_MS, createTreeModel, isTypeAheadKey, layoutConnectors, layoutForest, treeAllExpandable, treeAncestors, treeCollapseOrAscend, treeExpandOrDescend, treeExpandTo, treeExpandable, treeFirst, treeFirstChild, treeItemAction, treeLast, treeLevel, treeNext, treeParent, treePosInSet, treePrevious, treeSetSize, treeStep, treeTypeAhead, treeVisible, typeAheadBuffer, useLayoutAnchor, useMeasuredSizes, useTreeState };
698
+ export { SIZE_EPSILON, TYPE_AHEAD_RESET_MS, createTreeModel, isTypeAheadKey, layoutConnectors, layoutForest, placeGroups, treeAllExpandable, treeAncestors, treeCollapseOrAscend, treeExpandOrDescend, treeExpandTo, treeExpandable, treeFirst, treeFirstChild, treeItemAction, treeLast, treeLevel, treeNext, treeParent, treePosInSet, treePrevious, treeSetSize, treeStep, treeTypeAhead, treeVisible, typeAheadBuffer, useLayoutAnchor, useMeasuredSizes, useTreeState };
@@ -0,0 +1,121 @@
1
+ import { useThemePreference, useDensityPreference } from './chunk-K3OWD7BJ.js';
2
+ import { SegmentedControl } from './chunk-DHPUMOTX.js';
3
+ import { SunGlyph, MonitorGlyph, MoonGlyph } from '@crewlethq/icons/glyphs';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ function ThemeSwitcher(props) {
7
+ if (props.value !== void 0) {
8
+ const { storageKey: _none, ...controlled } = props;
9
+ return /* @__PURE__ */ jsx(ThemeRow, { ...controlled });
10
+ }
11
+ const { value: _stored, storageKey = "crewlet_theme", ...row } = props;
12
+ return /* @__PURE__ */ jsx(StoredThemeSwitcher, { ...row, storageKey });
13
+ }
14
+ function StoredThemeSwitcher({
15
+ storageKey,
16
+ onChange,
17
+ ...row
18
+ }) {
19
+ const [theme, choose] = useThemePreference({ storageKey });
20
+ return /* @__PURE__ */ jsx(
21
+ ThemeRow,
22
+ {
23
+ ...row,
24
+ value: theme,
25
+ onChange: (next) => {
26
+ choose(next);
27
+ onChange?.(next);
28
+ }
29
+ }
30
+ );
31
+ }
32
+ function ThemeRow({
33
+ value,
34
+ onChange,
35
+ label = "Theme",
36
+ lightLabel = "Light",
37
+ systemLabel = "Follow the system",
38
+ darkLabel = "Dark",
39
+ size = "sm",
40
+ className
41
+ }) {
42
+ return /* @__PURE__ */ jsx(
43
+ SegmentedControl,
44
+ {
45
+ label,
46
+ semantics: "radio",
47
+ size,
48
+ className,
49
+ value,
50
+ onValueChange: onChange,
51
+ options: [
52
+ { value: "light", icon: /* @__PURE__ */ jsx(SunGlyph, {}), srLabel: lightLabel, title: lightLabel },
53
+ { value: "system", icon: /* @__PURE__ */ jsx(MonitorGlyph, {}), srLabel: systemLabel, title: systemLabel },
54
+ { value: "dark", icon: /* @__PURE__ */ jsx(MoonGlyph, {}), srLabel: darkLabel, title: darkLabel }
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ function DensitySwitcher(props) {
60
+ if (props.value !== void 0) {
61
+ const { storageKey: _none, ...controlled } = props;
62
+ return /* @__PURE__ */ jsx(DensityRow, { ...controlled });
63
+ }
64
+ const { value: _stored, storageKey = "crewlet_density", ...row } = props;
65
+ return /* @__PURE__ */ jsx(StoredDensitySwitcher, { ...row, storageKey });
66
+ }
67
+ function StoredDensitySwitcher({
68
+ storageKey,
69
+ onChange,
70
+ ...row
71
+ }) {
72
+ const [density, choose] = useDensityPreference({ storageKey });
73
+ return /* @__PURE__ */ jsx(
74
+ DensityRow,
75
+ {
76
+ ...row,
77
+ value: density,
78
+ onChange: (next) => {
79
+ choose(next);
80
+ onChange?.(next);
81
+ }
82
+ }
83
+ );
84
+ }
85
+ function DensityRow({
86
+ value,
87
+ onChange,
88
+ label = "Density",
89
+ compactLabel = "Compact",
90
+ normalLabel = "Normal",
91
+ comfortableLabel = "Comfortable",
92
+ compactMark = "S",
93
+ normalMark = "M",
94
+ comfortableMark = "L",
95
+ size = "sm",
96
+ className
97
+ }) {
98
+ return /* @__PURE__ */ jsx(
99
+ SegmentedControl,
100
+ {
101
+ label,
102
+ semantics: "radio",
103
+ size,
104
+ className,
105
+ value,
106
+ onValueChange: onChange,
107
+ options: [
108
+ { value: "compact", label: compactMark, srLabel: compactLabel, title: compactLabel },
109
+ { value: "normal", label: normalMark, srLabel: normalLabel, title: normalLabel },
110
+ {
111
+ value: "comfortable",
112
+ label: comfortableMark,
113
+ srLabel: comfortableLabel,
114
+ title: comfortableLabel
115
+ }
116
+ ]
117
+ }
118
+ );
119
+ }
120
+
121
+ export { DensitySwitcher, ThemeSwitcher };
@@ -1,10 +1,10 @@
1
- import { useListbox, useOptionKeys } from './chunk-KIC7BZYJ.js';
1
+ import { useListbox, useOptionKeys } from './chunk-6MU7HNB4.js';
2
2
  import { useLayerContainer, viewportBounds, outsideBounds, placePopup, LAYER_GAP, LAYER_REPOSITION_EVENT } from './chunk-7RPGY3JE.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Select-E24U5LBC.css';
5
5
  import { forwardRef, useId, useMemo, useState, useRef, useCallback, useEffect, useLayoutEffect } from 'react';
6
6
  import { createPortal } from 'react-dom';
7
- import { KeyboardArrowDownGlyph, CheckGlyph, SearchGlyph } from '@crewlethq/icons/glyphs';
7
+ import { ChevronDownGlyph, CheckGlyph, SearchGlyph } from '@crewlethq/icons/glyphs';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
9
 
10
10
  var same = (a, b) => String(a) === String(b);
@@ -139,7 +139,7 @@ var NativeSelect = forwardRef(function NativeSelect2({ id, value, onChange, opti
139
139
  ]
140
140
  }
141
141
  ),
142
- /* @__PURE__ */ jsx(KeyboardArrowDownGlyph, { className: "crewlet-select__chevron", size: "sm" })
142
+ /* @__PURE__ */ jsx(ChevronDownGlyph, { className: "crewlet-select__chevron", size: "sm" })
143
143
  ]
144
144
  }
145
145
  );
@@ -505,7 +505,7 @@ var ListboxSelect = forwardRef(function ListboxSelect2({
505
505
  onKeyDown,
506
506
  children: [
507
507
  renderTrigger ? renderTrigger(single, { open }) : /* @__PURE__ */ jsx("span", { className: cx("crewlet-select__label", !hasValue && "is-placeholder"), children: label }),
508
- /* @__PURE__ */ jsx(KeyboardArrowDownGlyph, { className: "crewlet-select__chevron", size: "sm" })
508
+ /* @__PURE__ */ jsx(ChevronDownGlyph, { className: "crewlet-select__chevron", size: "sm" })
509
509
  ]
510
510
  }
511
511
  ),
@@ -1,4 +1,4 @@
1
- import { CopyButton } from './chunk-3QRYCPXQ.js';
1
+ import { CopyButton } from './chunk-OPKIKM35.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
3
  import './CodeBlock-GYNJ2HI6.css';
4
4
  import { forwardRef, useRef, useState, useLayoutEffect } from 'react';
@@ -1,4 +1,4 @@
1
- import { OrgLabel } from './chunk-5C5YMZQU.js';
1
+ import { OrgLabel } from './chunk-WOFOMTGB.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
3
  import './OrgNode-BT7T2Q2X.css';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { cx } from './chunk-ODEQTPFM.js';
2
- import './Checkbox-VGW26YLQ.css';
2
+ import './Checkbox-BOXQ747I.css';
3
3
  import { forwardRef, useId, useRef, useCallback, useEffect } from 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
@@ -4,14 +4,14 @@ import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Toaster-NVDCEIP5.css';
5
5
  import { createContext, useMemo, useState, useRef, useEffect, useContext, useCallback } from 'react';
6
6
  import { createPortal } from 'react-dom';
7
- import { CloseGlyph, ErrorFillGlyph, WarningFillGlyph, CheckCircleFillGlyph, InfoFillGlyph } from '@crewlethq/icons/glyphs';
7
+ import { XGlyph, CircleAlertGlyph, TriangleAlertGlyph, CircleCheckGlyph, InfoGlyph } from '@crewlethq/icons/glyphs';
8
8
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
9
9
 
10
10
  var ICONS = {
11
- info: /* @__PURE__ */ jsx(InfoFillGlyph, { size: "md" }),
12
- success: /* @__PURE__ */ jsx(CheckCircleFillGlyph, { size: "md" }),
13
- warning: /* @__PURE__ */ jsx(WarningFillGlyph, { size: "md" }),
14
- danger: /* @__PURE__ */ jsx(ErrorFillGlyph, { size: "md" })
11
+ info: /* @__PURE__ */ jsx(InfoGlyph, { size: "md" }),
12
+ success: /* @__PURE__ */ jsx(CircleCheckGlyph, { size: "md" }),
13
+ warning: /* @__PURE__ */ jsx(TriangleAlertGlyph, { size: "md" }),
14
+ danger: /* @__PURE__ */ jsx(CircleAlertGlyph, { size: "md" })
15
15
  };
16
16
  var TITLES = {
17
17
  info: null,
@@ -124,7 +124,7 @@ function ToastItem({
124
124
  action()
125
125
  ] })
126
126
  ] }),
127
- /* @__PURE__ */ jsx("button", { type: "button", className: "crewlet-toast__dismiss", onClick: dismiss, "aria-label": dismissLabel, children: /* @__PURE__ */ jsx(CloseGlyph, { size: "sm" }) }),
127
+ /* @__PURE__ */ jsx("button", { type: "button", className: "crewlet-toast__dismiss", onClick: dismiss, "aria-label": dismissLabel, children: /* @__PURE__ */ jsx(XGlyph, { size: "sm" }) }),
128
128
  duration > 0 ? /* @__PURE__ */ jsx(
129
129
  "div",
130
130
  {
@@ -2,7 +2,7 @@ import { CardHeaderSlotContext } from './chunk-AV2DXAEL.js';
2
2
  import { Count } from './chunk-BHHIIK3M.js';
3
3
  import { useHeadingLevel, HeadingLevelProvider, nextHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
- import './Card-RLR254LD.css';
5
+ import './Card-GLP7SUV6.css';
6
6
  import { createContext, useId, useState, isValidElement, useRef, useCallback, useMemo, Children, cloneElement, useContext, useEffect, Fragment } from 'react';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';
8
8
 
@@ -0,0 +1,22 @@
1
+ import { cx } from './chunk-ODEQTPFM.js';
2
+ import './StatusDot-7OMCQCZF.css';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+
5
+ function StatusDot({ tone = "neutral", pulse = false, children, className }) {
6
+ const worded = children !== void 0 && children !== null && children !== false && children !== "";
7
+ const dot = /* @__PURE__ */ jsx(
8
+ "span",
9
+ {
10
+ "aria-hidden": true,
11
+ className: cx("crewlet-status-dot", `crewlet-status-dot--${tone}`, pulse && "is-pulsing", !worded && className)
12
+ }
13
+ );
14
+ if (!worded) return dot;
15
+ return /* @__PURE__ */ jsxs("span", { className: cx("crewlet-status", className), children: [
16
+ dot,
17
+ " ",
18
+ /* @__PURE__ */ jsx("span", { className: "crewlet-status__label", children })
19
+ ] });
20
+ }
21
+
22
+ export { StatusDot };
@@ -1,21 +1,27 @@
1
+ import { Avatar } from './chunk-IA232OTU.js';
1
2
  import { cx } from './chunk-ODEQTPFM.js';
2
- import './OrgLabel-D7U6QJZD.css';
3
+ import './OrgLabel-CR233G34.css';
3
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
5
 
5
6
  function OrgLabel(props) {
6
- const { layout = "node", icon, iconRing = "none", iconSize = "md", className } = props;
7
- const zone = /* @__PURE__ */ jsx(
7
+ const { layout = "node", className } = props;
8
+ const zone = props.avatar === void 0 ? /* @__PURE__ */ jsx(
8
9
  "span",
9
10
  {
10
- className: cx(
11
- "crewlet-org-label__icon",
12
- iconRing === "dashed" && "crewlet-org-label__icon--dashed",
13
- iconSize === "lg" && "crewlet-org-label__icon--lg"
14
- ),
11
+ className: cx("crewlet-org-label__icon", props.iconSize === "lg" && "crewlet-org-label__icon--lg"),
15
12
  "aria-hidden": "true",
16
- children: icon
13
+ children: props.icon
17
14
  }
18
- );
15
+ ) : /* @__PURE__ */ jsx("span", { className: "crewlet-org-label__icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
16
+ Avatar,
17
+ {
18
+ name: props.avatar.name,
19
+ kind: props.avatar.kind,
20
+ src: props.avatar.src,
21
+ size: layout === "row" ? "xs" : "sm",
22
+ decorative: true
23
+ }
24
+ ) });
19
25
  if (layout === "row") {
20
26
  return /* @__PURE__ */ jsxs("span", { className: cx("crewlet-org-label", "crewlet-org-label--row", className), "data-tone": props.tone, children: [
21
27
  zone,