@crewlethq/ui 0.4.3 → 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 (237) 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-ITNACQ2X.css → DataTable-OLHPF7D4.css} +44 -43
  45. package/dist/DataView/index.js +14 -14
  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 +5 -5
  69. package/dist/Listbox/index.js +2 -2
  70. package/dist/Listbox/useListbox.d.ts +16 -0
  71. package/dist/Listbox/useOptionKeys.d.ts +12 -1
  72. package/dist/{Listbox-X2DOTSQA.css → Listbox-6WJNJQVQ.css} +60 -7
  73. package/dist/Menu/index.js +4 -4
  74. package/dist/{Menu-6DE7I66I.css → Menu-BT5PMFJI.css} +15 -0
  75. package/dist/Meter/Meter.d.ts +103 -16
  76. package/dist/Meter/index.d.ts +2 -2
  77. package/dist/Meter/index.js +1 -1
  78. package/dist/{Meter-SKOOXQBC.css → Meter-5VCSFMZW.css} +46 -7
  79. package/dist/Modal/index.js +4 -4
  80. package/dist/{Modal-XYQJ4BL6.css → Modal-JAYBS2KS.css} +13 -4
  81. package/dist/OrgLabel/OrgLabel.d.ts +60 -24
  82. package/dist/OrgLabel/index.d.ts +1 -1
  83. package/dist/OrgLabel/index.js +2 -1
  84. package/dist/{OrgLabel-D7U6QJZD.css → OrgLabel-CR233G34.css} +9 -18
  85. package/dist/OrgNode/index.js +3 -2
  86. package/dist/OrgTable/OrgTable.d.ts +2 -2
  87. package/dist/OrgTable/index.js +8 -7
  88. package/dist/Popover/index.js +2 -2
  89. package/dist/PricingCard/index.js +3 -3
  90. package/dist/{PricingCard-JFI7RYXP.css → PricingCard-7EFXRSD2.css} +4 -5
  91. package/dist/SearchTrigger/SearchTrigger.d.ts +23 -4
  92. package/dist/SearchTrigger/index.d.ts +1 -1
  93. package/dist/SearchTrigger/index.js +1 -1
  94. package/dist/SearchTrigger-Z5D4AAY7.css +112 -0
  95. package/dist/SegmentedControl/index.js +2 -2
  96. package/dist/SegmentedMeter/SegmentedMeter.d.ts +107 -0
  97. package/dist/SegmentedMeter/index.d.ts +3 -0
  98. package/dist/SegmentedMeter/index.js +2 -0
  99. package/dist/SegmentedMeter-KQNML2TW.css +109 -0
  100. package/dist/Select/index.js +3 -3
  101. package/dist/{Select-2X77FSWR.css → Select-E24U5LBC.css} +34 -0
  102. package/dist/Shortcut/index.js +2 -2
  103. package/dist/SidebarNav/SidebarNav.d.ts +85 -25
  104. package/dist/SidebarNav/index.d.ts +1 -1
  105. package/dist/SidebarNav/index.js +1 -1
  106. package/dist/SidebarNav-X5NLZNWA.css +424 -0
  107. package/dist/StatCard/StatCard.d.ts +59 -12
  108. package/dist/StatCard/index.d.ts +1 -1
  109. package/dist/StatCard/index.js +1 -1
  110. package/dist/StatCard-KPAFD4E2.css +204 -0
  111. package/dist/StatGroup/index.js +1 -1
  112. package/dist/{StatGroup-TGB6AEKM.css → StatGroup-HVG6O62W.css} +8 -9
  113. package/dist/StatusDot/StatusDot.d.ts +24 -6
  114. package/dist/StatusDot/index.js +1 -1
  115. package/dist/StatusDot-7OMCQCZF.css +186 -0
  116. package/dist/Stepper/Stepper.d.ts +78 -0
  117. package/dist/Stepper/index.d.ts +3 -0
  118. package/dist/Stepper/index.js +4 -0
  119. package/dist/Stepper-HW4JM3YH.css +176 -0
  120. package/dist/Table/index.js +1 -1
  121. package/dist/{Table-MDOLVUAW.css → Table-TGCS4C3F.css} +14 -4
  122. package/dist/Tabs/index.js +1 -1
  123. package/dist/{Tabs-VLICJFVB.css → Tabs-XCNPHA7B.css} +79 -27
  124. package/dist/Tag/Tag.d.ts +29 -22
  125. package/dist/Tag/index.js +2 -2
  126. package/dist/{Tag-VNZEYLB6.css → Tag-GBE7LQJP.css} +82 -83
  127. package/dist/TagsInput/index.js +6 -6
  128. package/dist/ThemeSwitcher/ThemeSwitcher.d.ts +53 -21
  129. package/dist/ThemeSwitcher/index.d.ts +3 -3
  130. package/dist/ThemeSwitcher/index.js +4 -3
  131. package/dist/ThemeSwitcher/preferences.d.ts +19 -5
  132. package/dist/ThemeToggle/ThemeToggle.d.ts +40 -0
  133. package/dist/ThemeToggle/index.d.ts +2 -0
  134. package/dist/ThemeToggle/index.js +5 -0
  135. package/dist/TimeWindowPicker/index.js +8 -8
  136. package/dist/Toaster/index.js +2 -2
  137. package/dist/Toolbar/index.js +2 -2
  138. package/dist/{Toolbar-IP6LXN45.css → Toolbar-HUOSMNTH.css} +3 -1
  139. package/dist/Tooltip/index.js +2 -2
  140. package/dist/Tree/index.d.ts +2 -2
  141. package/dist/Tree/index.js +1 -1
  142. package/dist/Tree/layout.d.ts +103 -28
  143. package/dist/TreeCanvas/TreeCanvas.d.ts +60 -14
  144. package/dist/TreeCanvas/index.d.ts +1 -1
  145. package/dist/TreeCanvas/index.js +6 -6
  146. package/dist/TreeCanvas/motion.d.ts +3 -2
  147. package/dist/{TreeCanvas-WBNQPHC7.css → TreeCanvas-HVOV4SQN.css} +154 -30
  148. package/dist/TreeGrid/index.js +4 -4
  149. package/dist/{chunk-F6OE5FH3.js → chunk-2FPENTCF.js} +1 -1
  150. package/dist/chunk-4AK52VHB.js +88 -0
  151. package/dist/{chunk-7EM5T4ME.js → chunk-4IQD3HUQ.js} +2 -2
  152. package/dist/{chunk-YODNNSZL.js → chunk-4PZ6FJKW.js} +43 -13
  153. package/dist/{chunk-F27EPQ7D.js → chunk-4UQ7SMPK.js} +1 -1
  154. package/dist/chunk-5QWIJSQM.js +73 -0
  155. package/dist/{chunk-GTOUGQQK.js → chunk-6MU7HNB4.js} +13 -10
  156. package/dist/{chunk-S2XHHEW4.js → chunk-74KMX7YH.js} +4 -4
  157. package/dist/{chunk-WNI2WSJF.js → chunk-7KBNFFM3.js} +1 -1
  158. package/dist/{chunk-DD5BBGBE.js → chunk-AUS5FNQE.js} +9 -5
  159. package/dist/{chunk-CMEE37QJ.js → chunk-BMYPGGPV.js} +4 -4
  160. package/dist/{chunk-H4FBTAYS.js → chunk-BNCCEER3.js} +8 -8
  161. package/dist/chunk-C5WJUZVR.js +56 -0
  162. package/dist/{chunk-5WS6L6FA.js → chunk-CAIHUYXV.js} +9 -9
  163. package/dist/{chunk-XV6WRMBC.js → chunk-CQY5NTRS.js} +4 -1
  164. package/dist/{chunk-UOGSZKLT.js → chunk-D6EVJUGU.js} +2 -2
  165. package/dist/{chunk-6ZFVFA56.js → chunk-DHPUMOTX.js} +2 -2
  166. package/dist/{chunk-HZ5XZNPS.js → chunk-DS2C73RJ.js} +3 -3
  167. package/dist/{chunk-O6232G37.js → chunk-DSUY5F4E.js} +17 -5
  168. package/dist/{chunk-Q4ZPPART.js → chunk-EFYPAJT3.js} +3 -3
  169. package/dist/{chunk-WQX73TWF.js → chunk-ERVO6OUF.js} +18 -17
  170. package/dist/{chunk-BZYDZBAN.js → chunk-ETYEBKR4.js} +3 -3
  171. package/dist/{chunk-34VGEDVV.js → chunk-FD5UEN6X.js} +30 -30
  172. package/dist/{chunk-5SDBMKUO.js → chunk-FIFNP6PL.js} +3 -3
  173. package/dist/{chunk-7HPRF5XN.js → chunk-FUF52K7E.js} +98 -16
  174. package/dist/{chunk-5KPQ6D7N.js → chunk-FZVJDJFN.js} +2 -2
  175. package/dist/chunk-IA232OTU.js +156 -0
  176. package/dist/{chunk-2EOKFKHX.js → chunk-IG27QX7Q.js} +7 -7
  177. package/dist/chunk-IKB6HFGK.js +55 -0
  178. package/dist/{chunk-FBZAKNSX.js → chunk-IPVQKAHO.js} +10 -7
  179. package/dist/{chunk-3EYF6HKB.js → chunk-IVFJD7WY.js} +28 -9
  180. package/dist/{chunk-WOYYD2YR.js → chunk-JGRNTBF2.js} +11 -11
  181. package/dist/chunk-K3OWD7BJ.js +121 -0
  182. package/dist/{chunk-BJSKPEZI.js → chunk-KD4H66L6.js} +7 -20
  183. package/dist/{chunk-SFZOKW2G.js → chunk-KJ34ZBBI.js} +8 -3
  184. package/dist/{chunk-HQNHV7D6.js → chunk-LFHCXZO5.js} +6 -6
  185. package/dist/{chunk-LWKJQTOM.js → chunk-MICH6QSJ.js} +1 -1
  186. package/dist/chunk-N3DPO6HG.js +226 -0
  187. package/dist/{chunk-S4GZWSKR.js → chunk-OM5E3TTK.js} +1 -1
  188. package/dist/{chunk-3QRYCPXQ.js → chunk-OPKIKM35.js} +6 -6
  189. package/dist/{chunk-5EKIWVOR.js → chunk-PGRPNDWM.js} +2 -2
  190. package/dist/{chunk-LFJ6UJTI.js → chunk-PQNILU27.js} +9 -9
  191. package/dist/{chunk-QNCVHRZL.js → chunk-QVAFL2LE.js} +1 -1
  192. package/dist/{chunk-QEUY3A5P.js → chunk-QY7UU5ZB.js} +3 -2
  193. package/dist/{chunk-ITHXJHBB.js → chunk-R25RGPUB.js} +1 -0
  194. package/dist/{chunk-KLJCCMF3.js → chunk-R6735B37.js} +2 -2
  195. package/dist/{chunk-3ZP55QZE.js → chunk-R6FBDTP3.js} +4 -4
  196. package/dist/{chunk-7FZ53WDJ.js → chunk-RIAZM6L3.js} +1 -1
  197. package/dist/chunk-RJM4QCGG.js +550 -0
  198. package/dist/{chunk-NTRZGNEX.js → chunk-S3BCVWTU.js} +215 -46
  199. package/dist/chunk-S7KW47IQ.js +121 -0
  200. package/dist/{chunk-OFHBK7RI.js → chunk-SJQ546ID.js} +34 -14
  201. package/dist/{chunk-D35VTV2Z.js → chunk-SV7QAONL.js} +1 -1
  202. package/dist/{chunk-IAJLHVUA.js → chunk-TIWAHZZ6.js} +1 -1
  203. package/dist/{chunk-2PRH365R.js → chunk-UA7O3KKJ.js} +1 -1
  204. package/dist/{chunk-NPZY6YYL.js → chunk-UG5ZMAXW.js} +6 -6
  205. package/dist/{chunk-FEFTGVMF.js → chunk-V2N3BMOT.js} +7 -2
  206. package/dist/{chunk-NDCATSW7.js → chunk-V34H2YCY.js} +1 -1
  207. package/dist/chunk-WIATRXEJ.js +22 -0
  208. package/dist/{chunk-5C5YMZQU.js → chunk-WOFOMTGB.js} +16 -10
  209. package/dist/{chunk-QYOFACSP.js → chunk-WSOFKOLP.js} +3 -3
  210. package/dist/{chunk-MNAXYY3R.js → chunk-WUVZDFHS.js} +31 -11
  211. package/dist/{chunk-UG46QBLT.js → chunk-YIMOT5OO.js} +10 -10
  212. package/dist/{chunk-2ZQMA2WB.js → chunk-ZPSOF6VL.js} +2 -2
  213. package/dist/generated/index.d.ts +3 -0
  214. package/dist/generated/index.js +66 -62
  215. package/dist/index.js +66 -62
  216. package/dist/styles.css +2719 -799
  217. package/dist/utils/index.d.ts +1 -1
  218. package/dist/utils/tone.d.ts +7 -12
  219. package/package.json +4 -4
  220. package/scripts/check-css-literals.mjs +159 -23
  221. package/scripts/check-css-variables.mjs +5 -3
  222. package/scripts/css-source.mjs +97 -5
  223. package/dist/Avatar-P2KRQM2B.css +0 -156
  224. package/dist/Charts-D7G2BSXH.css +0 -277
  225. package/dist/CommandPalette-CSJDUCQA.css +0 -115
  226. package/dist/Kbd-W66MXQI5.css +0 -61
  227. package/dist/SearchTrigger-QXOYAUUY.css +0 -79
  228. package/dist/SidebarNav-QGSFKZYA.css +0 -319
  229. package/dist/StatCard-KYPKZUWX.css +0 -111
  230. package/dist/StatusDot-HA2L2FSX.css +0 -84
  231. package/dist/chunk-22O7LAW2.js +0 -41
  232. package/dist/chunk-2HQR4U4D.js +0 -143
  233. package/dist/chunk-ESCO4XYW.js +0 -144
  234. package/dist/chunk-F4PJZ4ED.js +0 -245
  235. package/dist/chunk-PNFASD6F.js +0 -98
  236. package/dist/chunk-PZSWF74H.js +0 -15
  237. /package/dist/{chunk-ZCR6YGQ4.js → chunk-PKIN4IMB.js} +0 -0
@@ -0,0 +1,88 @@
1
+ import { cx } from './chunk-ODEQTPFM.js';
2
+ import './SegmentedMeter-KQNML2TW.css';
3
+ import { jsxs, jsx } from 'react/jsx-runtime';
4
+
5
+ function settle(difference, scale) {
6
+ if (Math.abs(difference) <= scale * 1e-12) return 0;
7
+ return Number(difference.toPrecision(12));
8
+ }
9
+ function checked(segments, total) {
10
+ const seen = /* @__PURE__ */ new Set();
11
+ for (const segment of segments) {
12
+ if (seen.has(segment.id)) {
13
+ throw new RangeError(`SegmentedMeter segment ids must be unique; "${segment.id}" is used twice`);
14
+ }
15
+ seen.add(segment.id);
16
+ if (!Number.isFinite(segment.value) || segment.value < 0) {
17
+ throw new RangeError(
18
+ `SegmentedMeter segment "${segment.id}" must be a finite count of at least 0; it was ${segment.value}`
19
+ );
20
+ }
21
+ }
22
+ if (total !== void 0 && (!Number.isFinite(total) || total < 0)) {
23
+ throw new RangeError(`SegmentedMeter total must be a finite count of at least 0; it was ${total}`);
24
+ }
25
+ }
26
+ function measure(segments, total) {
27
+ const sum = segments.reduce((running, segment) => running + segment.value, 0);
28
+ const whole = total ?? sum;
29
+ const scale = Math.max(whole, sum);
30
+ const remainder = Math.max(0, settle(whole - sum, scale));
31
+ return { whole, scale, remainder };
32
+ }
33
+ function segmentedMeterLabel(segments, total, remainderLabel) {
34
+ checked(segments, total);
35
+ const { whole, remainder } = measure(segments, total);
36
+ const words = segments.filter((segment) => segment.value > 0).map((segment) => `${segment.value} ${segment.label}`);
37
+ if (remainder > 0 && remainderLabel !== void 0) words.push(`${remainder} ${remainderLabel}`);
38
+ return `${words.length === 0 ? "0" : words.join(", ")} of ${whole}`;
39
+ }
40
+ function SegmentedMeter({
41
+ segments,
42
+ total,
43
+ remainderLabel,
44
+ size = "default",
45
+ label,
46
+ decorative = false,
47
+ className,
48
+ style,
49
+ ...rest
50
+ }) {
51
+ checked(segments, total);
52
+ const { scale, remainder } = measure(segments, total);
53
+ const parts = segments.filter((segment) => segment.value > 0);
54
+ const share = (value) => `${value / scale * 100}%`;
55
+ const leftover = scale === 0 ? "100%" : remainder > 0 ? share(remainder) : null;
56
+ const drawn = parts.length + (leftover === null ? 0 : 1);
57
+ return /* @__PURE__ */ jsxs(
58
+ "div",
59
+ {
60
+ ...rest,
61
+ className: cx("crewlet-segmented-meter", `crewlet-segmented-meter--${size}`, className),
62
+ style: { "--crewlet-segmented-meter-count": drawn, ...style },
63
+ role: decorative ? void 0 : "img",
64
+ "aria-label": decorative ? void 0 : label ?? segmentedMeterLabel(segments, total, remainderLabel),
65
+ "aria-hidden": decorative ? true : void 0,
66
+ children: [
67
+ parts.map((segment) => /* @__PURE__ */ jsx(
68
+ "span",
69
+ {
70
+ className: "crewlet-segmented-meter__segment",
71
+ "data-tone": segment.tone,
72
+ style: { flexBasis: share(segment.value) }
73
+ },
74
+ segment.id
75
+ )),
76
+ leftover === null ? null : /* @__PURE__ */ jsx(
77
+ "span",
78
+ {
79
+ className: "crewlet-segmented-meter__segment crewlet-segmented-meter__remainder",
80
+ style: { flexBasis: leftover }
81
+ }
82
+ )
83
+ ]
84
+ }
85
+ );
86
+ }
87
+
88
+ export { SegmentedMeter, segmentedMeterLabel };
@@ -1,5 +1,5 @@
1
- import { Button } from './chunk-BZYDZBAN.js';
2
- import './ErrorBoundary-ME36CQTA.css';
1
+ import { Button } from './chunk-ETYEBKR4.js';
2
+ import './ErrorBoundary-U2PA3LY2.css';
3
3
  import { Component } from 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
@@ -1,29 +1,58 @@
1
1
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
- import './Meter-SKOOXQBC.css';
3
+ import './Meter-5VCSFMZW.css';
4
4
  import { useId } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
 
7
+ var METER_STATES = Object.freeze(["ok", "near", "refusing"]);
8
+ var DEFAULT_METER_THRESHOLDS = Object.freeze({ near: 0.75 });
9
+ var STATE_TONES = {
10
+ ok: "quantity",
11
+ near: "warning",
12
+ refusing: "danger"
13
+ };
14
+ function meterStateTone(state) {
15
+ if (!Object.hasOwn(STATE_TONES, state)) {
16
+ throw new RangeError(`Meter state must be one of ${METER_STATES.join(", ")}; it was ${String(state)}`);
17
+ }
18
+ return STATE_TONES[state];
19
+ }
20
+ function meterState(fraction, thresholds = DEFAULT_METER_THRESHOLDS) {
21
+ const { near } = thresholds;
22
+ if (!Number.isFinite(near) || near <= 0 || near > 1) {
23
+ throw new RangeError(`Meter thresholds.near must be a fraction of the limit above 0 and at most 1; it was ${near}`);
24
+ }
25
+ if (fraction >= 1) return "refusing";
26
+ if (fraction >= near) return "near";
27
+ return "ok";
28
+ }
7
29
  function meterTone(percent) {
8
- if (percent >= 100) return "danger";
9
- if (percent >= 75) return "warning";
10
- return "brand";
30
+ return meterStateTone(meterState(percent / 100));
11
31
  }
12
32
  function progressTone(percent) {
13
- return percent >= 100 ? "success" : "brand";
33
+ return percent >= 100 ? "success" : "quantity";
34
+ }
35
+ function drawnTone({
36
+ state,
37
+ tone,
38
+ polarity = "spent",
39
+ thresholds
40
+ }, fraction, percent) {
41
+ if (state !== void 0) return meterStateTone(state);
42
+ if (tone !== void 0) return tone;
43
+ if (polarity === "progress") return progressTone(percent);
44
+ return meterStateTone(meterState(fraction, thresholds));
14
45
  }
15
- var RAMPS = {
16
- spent: meterTone,
17
- progress: progressTone
18
- };
19
46
  function Meter({
20
47
  value,
21
48
  max,
22
49
  label,
23
50
  valueText,
24
51
  hint,
52
+ state,
25
53
  tone,
26
- polarity = "spent",
54
+ polarity,
55
+ thresholds,
27
56
  size = "default",
28
57
  hideLabel = false,
29
58
  className,
@@ -31,8 +60,9 @@ function Meter({
31
60
  }) {
32
61
  const labelId = useId();
33
62
  const bounded = max > 0;
34
- const percent = bounded ? Math.min(100, Math.max(0, value / max * 100)) : 0;
35
- const drawn = tone ?? RAMPS[polarity](percent);
63
+ const fraction = bounded ? value / max : 0;
64
+ const percent = bounded ? Math.min(100, Math.max(0, fraction * 100)) : 0;
65
+ const drawn = drawnTone({ state, tone, polarity, thresholds }, fraction, percent);
36
66
  const trailing = hint ?? valueText;
37
67
  const reported = bounded ? Math.min(max, Math.max(0, value)) : value;
38
68
  const spoken = bounded ? valueText ?? (reported === value ? void 0 : `${value} of ${max}`) : void 0;
@@ -60,4 +90,4 @@ function Meter({
60
90
  ] });
61
91
  }
62
92
 
63
- export { Meter, meterTone, progressTone };
93
+ export { DEFAULT_METER_THRESHOLDS, METER_STATES, Meter, meterState, meterStateTone, meterTone, progressTone };
@@ -1,6 +1,6 @@
1
1
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
- import './IconButton-VQGNMJDI.css';
3
+ import './IconButton-TVEUWK6L.css';
4
4
  import { forwardRef, useId, Children, isValidElement, cloneElement } from 'react';
5
5
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
6
 
@@ -0,0 +1,73 @@
1
+ import { StatusDot } from './chunk-WIATRXEJ.js';
2
+ import { VisuallyHidden } from './chunk-BZFWDIV6.js';
3
+ import { cx } from './chunk-ODEQTPFM.js';
4
+ import './Stepper-HW4JM3YH.css';
5
+ import { CheckGlyph } from '@crewlethq/icons/glyphs';
6
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
+
8
+ function Stepper({
9
+ steps,
10
+ current,
11
+ label,
12
+ tone = "info",
13
+ pulse = false,
14
+ doneLabel = "Done",
15
+ className,
16
+ ...rest
17
+ }) {
18
+ const seen = /* @__PURE__ */ new Set();
19
+ for (const step of steps) {
20
+ if (seen.has(step.id)) throw new RangeError(`Stepper step ids must be unique; "${step.id}" is used twice`);
21
+ seen.add(step.id);
22
+ }
23
+ const at = current === null ? steps.length : steps.findIndex((step) => step.id === current);
24
+ if (at < 0) {
25
+ throw new RangeError(
26
+ `Stepper current must be the id of one of its steps, or null once every step is done; "${current}" is not one of ${steps.map((step) => `"${step.id}"`).join(", ")}`
27
+ );
28
+ }
29
+ if (steps.length === 0) return null;
30
+ const stateOf = (index) => index < at ? "done" : index === at ? "current" : "later";
31
+ return (
32
+ /*
33
+ * `role="list"` although an `ol` already has one, which is why the lint
34
+ * rule that calls it redundant is silenced here rather than obeyed, as
35
+ * `Legend` and `DiffList` silence it: the stylesheet takes the markers off,
36
+ * and WebKit answers a marker-less list as a group of paragraphs, so a
37
+ * reader would no longer be told how many steps there are before hearing
38
+ * them. The role puts that back.
39
+ */
40
+ // eslint-disable-next-line jsx-a11y/no-redundant-roles
41
+ /* @__PURE__ */ jsx(
42
+ "ol",
43
+ {
44
+ ...rest,
45
+ role: "list",
46
+ className: cx("crewlet-stepper", `crewlet-stepper--${tone}`, className),
47
+ "aria-label": label,
48
+ children: steps.map((step, index) => {
49
+ const state = stateOf(index);
50
+ return /* @__PURE__ */ jsx(
51
+ "li",
52
+ {
53
+ className: cx("crewlet-stepper__step", `crewlet-stepper__step--${state}`),
54
+ "aria-current": state === "current" ? "step" : void 0,
55
+ children: /* @__PURE__ */ jsxs("span", { className: "crewlet-stepper__chip", children: [
56
+ state === "done" ? /* @__PURE__ */ jsxs(Fragment, { children: [
57
+ /* @__PURE__ */ jsx(CheckGlyph, { size: "xs", className: "crewlet-stepper__check" }),
58
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: doneLabel }),
59
+ " "
60
+ ] }) : null,
61
+ state === "current" ? /* @__PURE__ */ jsx(StatusDot, { tone, pulse, className: "crewlet-stepper__dot" }) : null,
62
+ /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__label", children: step.label })
63
+ ] })
64
+ },
65
+ step.id
66
+ );
67
+ })
68
+ }
69
+ )
70
+ );
71
+ }
72
+
73
+ export { Stepper };
@@ -1,5 +1,5 @@
1
- import { usePopupLayer, isComposing } from './chunk-ITHXJHBB.js';
2
- import './Listbox-X2DOTSQA.css';
1
+ import { usePopupLayer, isComposing } from './chunk-R25RGPUB.js';
2
+ import './Listbox-6WJNJQVQ.css';
3
3
  import { useState, useRef, useCallback, useEffect } from 'react';
4
4
 
5
5
  function useListbox({
@@ -12,7 +12,7 @@ function useListbox({
12
12
  popup = true
13
13
  }) {
14
14
  const [at, setAt] = useState(0);
15
- const active = count === 0 ? -1 : Math.min(Math.max(at, 0), count - 1);
15
+ const active = count === 0 ? -1 : Math.min(Math.max(at, -1), count - 1);
16
16
  const listId = `${id}-listbox`;
17
17
  const layer = usePopupLayer({ open: open && popup, onDismiss: () => onClose() });
18
18
  const list = useRef(null);
@@ -25,13 +25,13 @@ function useListbox({
25
25
  );
26
26
  useEffect(() => {
27
27
  const box = list.current;
28
- const row = box?.querySelector('[aria-selected="true"]');
29
- if (!box || !row) return;
28
+ const row = active >= 0 ? document.getElementById(`${listId}-${active}`) : null;
29
+ if (!box || !row || !box.contains(row)) return;
30
30
  const bounds = box.getBoundingClientRect();
31
31
  const spot = row.getBoundingClientRect();
32
32
  if (spot.top < bounds.top) box.scrollTop -= bounds.top - spot.top;
33
33
  else if (spot.bottom > bounds.bottom) box.scrollTop += spot.bottom - bounds.bottom;
34
- }, [active, count, open]);
34
+ }, [active, count, open, listId]);
35
35
  function onKeyDown(event) {
36
36
  if (!open || isComposing(event)) return false;
37
37
  if (event.key === "Escape") {
@@ -52,6 +52,7 @@ function useListbox({
52
52
  setAt((active - 1 + count) % count);
53
53
  return true;
54
54
  case "Enter":
55
+ if (event.metaKey || event.ctrlKey || event.altKey) return false;
55
56
  event.preventDefault();
56
57
  onCommit(active);
57
58
  return true;
@@ -69,6 +70,7 @@ function useListbox({
69
70
  setActive: setAt,
70
71
  listId,
71
72
  listRef,
73
+ panelRef: layer.panelRef,
72
74
  anchorRef: layer.insideRef,
73
75
  optionId: (index) => `${listId}-${index}`,
74
76
  onKeyDown,
@@ -82,7 +84,7 @@ function useListbox({
82
84
  };
83
85
  }
84
86
  var TYPE_AHEAD_WINDOW = 500;
85
- function useOptionKeys({ listbox, count, disabled, textOf }) {
87
+ function useOptionKeys({ listbox, count, disabled, textOf, ends = true }) {
86
88
  const typed = useRef({ text: "", at: 0 });
87
89
  const { active, setActive } = listbox;
88
90
  const step = useCallback(
@@ -96,7 +98,7 @@ function useOptionKeys({ listbox, count, disabled, textOf }) {
96
98
  },
97
99
  [count, disabled]
98
100
  );
99
- const opening = useCallback((chosen) => chosen >= 0 && !disabled?.(chosen) ? chosen : Math.max(step(0, 1), 0), [disabled, step]);
101
+ const opening = useCallback((chosen) => chosen >= 0 && !disabled?.(chosen) ? chosen : step(0, 1), [disabled, step]);
100
102
  const typeAhead = useCallback(
101
103
  (key) => {
102
104
  if (!textOf) return false;
@@ -118,6 +120,7 @@ function useOptionKeys({ listbox, count, disabled, textOf }) {
118
120
  );
119
121
  const onKeyDown = useCallback(
120
122
  (event) => {
123
+ if (isComposing(event)) return false;
121
124
  if (event.key === "ArrowDown" || event.key === "ArrowUp") {
122
125
  event.preventDefault();
123
126
  const by = event.key === "ArrowDown" ? 1 : -1;
@@ -125,7 +128,7 @@ function useOptionKeys({ listbox, count, disabled, textOf }) {
125
128
  if (next >= 0) setActive(next);
126
129
  return true;
127
130
  }
128
- if (event.key === "Home" || event.key === "End") {
131
+ if (ends && (event.key === "Home" || event.key === "End")) {
129
132
  event.preventDefault();
130
133
  const next = event.key === "Home" ? step(0, 1) : step(count - 1, -1);
131
134
  if (next >= 0) setActive(next);
@@ -139,7 +142,7 @@ function useOptionKeys({ listbox, count, disabled, textOf }) {
139
142
  }
140
143
  return false;
141
144
  },
142
- [active, count, setActive, step, typeAhead]
145
+ [active, count, ends, setActive, step, typeAhead]
143
146
  );
144
147
  return { onKeyDown, step, opening };
145
148
  }
@@ -1,7 +1,7 @@
1
- import { StatusDot } from './chunk-PZSWF74H.js';
1
+ import { StatusDot } from './chunk-WIATRXEJ.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
- import './Tag-VNZEYLB6.css';
4
- import { CloseGlyph } from '@crewlethq/icons/glyphs';
3
+ import './Tag-GBE7LQJP.css';
4
+ import { XGlyph } from '@crewlethq/icons/glyphs';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
6
 
7
7
  function Tag(props) {
@@ -63,7 +63,7 @@ function Tag(props) {
63
63
  onRemove();
64
64
  },
65
65
  "aria-label": removeAriaLabel,
66
- children: /* @__PURE__ */ jsx(CloseGlyph, { size: "xs" })
66
+ children: /* @__PURE__ */ jsx(XGlyph, { size: "xs" })
67
67
  }
68
68
  );
69
69
  if (split) {
@@ -1,5 +1,5 @@
1
1
  import { cx } from './chunk-ODEQTPFM.js';
2
- import './BrandLockup-6ISDEHPJ.css';
2
+ import './BrandLockup-JKGXFCZF.css';
3
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
4
 
5
5
  function BrandLockup({ name, mark, context, href, renderLink, className }) {
@@ -1,5 +1,5 @@
1
1
  import { useLayerContainer, viewportBounds, LAYER_GAP, outsideBounds, placePopup, LAYER_REPOSITION_EVENT } from './chunk-7RPGY3JE.js';
2
- import { usePopupLayer, focusables } from './chunk-ITHXJHBB.js';
2
+ import { usePopupLayer, focusables } from './chunk-R25RGPUB.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Popover-WJGCF3ZQ.css';
5
5
  import { useId, useState, useRef, useCallback, useLayoutEffect, useEffect, cloneElement } from 'react';
@@ -50,10 +50,10 @@ function Popover({
50
50
  const inHost = container !== document.body;
51
51
  const host = inHost ? container.getBoundingClientRect() : viewportBounds();
52
52
  const rect = at.getBoundingClientRect();
53
+ box.style.width = width === "match" ? `${rect.width}px` : "";
53
54
  const own = box.getBoundingClientRect();
54
- const panelWidth = width === "match" ? rect.width : own.width;
55
55
  const local = {
56
- x: (align === "end" ? rect.right - panelWidth : rect.left) - (inHost ? host.x : 0),
56
+ x: (align === "end" ? rect.right - own.width : rect.left) - (inHost ? host.x : 0),
57
57
  y: rect.top - (inHost ? host.y : 0),
58
58
  width: rect.width,
59
59
  height: rect.height
@@ -69,15 +69,16 @@ function Popover({
69
69
  close("anchor-gone");
70
70
  return;
71
71
  }
72
+ const asked = width === "match" ? rect.width : void 0;
72
73
  const spot = placePopup(
73
74
  local,
74
- { width: panelWidth, height: own.height },
75
+ { width: own.width, height: own.height },
75
76
  bounds,
76
77
  LAYER_GAP,
77
78
  side === "top" ? "above" : "below"
78
79
  );
79
80
  setPlace(
80
- (was) => was && was.left === spot.left && was.top === spot.top && was.side === spot.side && was.width === panelWidth ? was : { left: spot.left, top: spot.top, side: spot.side, width: width === "match" ? panelWidth : void 0 }
81
+ (was) => was && was.left === spot.left && was.top === spot.top && was.side === spot.side && was.width === asked ? was : { left: spot.left, top: spot.top, side: spot.side, width: asked }
81
82
  );
82
83
  }, [align, close, container, side, width]);
83
84
  useLayoutEffect(() => {
@@ -87,10 +88,13 @@ function Popover({
87
88
  container?.addEventListener(LAYER_REPOSITION_EVENT, onLayout);
88
89
  window.addEventListener("resize", onLayout);
89
90
  window.addEventListener("scroll", onLayout, true);
91
+ const resize = typeof ResizeObserver === "function" ? new ResizeObserver(onLayout) : null;
92
+ if (panel.current) resize?.observe(panel.current);
90
93
  return () => {
91
94
  container?.removeEventListener(LAYER_REPOSITION_EVENT, onLayout);
92
95
  window.removeEventListener("resize", onLayout);
93
96
  window.removeEventListener("scroll", onLayout, true);
97
+ resize?.disconnect();
94
98
  };
95
99
  }, [open, container, position]);
96
100
  useEffect(() => {
@@ -1,12 +1,12 @@
1
1
  import { LayerNodeBridge } from './chunk-53DVJCVW.js';
2
2
  import { LAYER_REPOSITION_EVENT, LayerHost } from './chunk-7RPGY3JE.js';
3
- import { IconButton } from './chunk-F27EPQ7D.js';
4
- import { Button } from './chunk-BZYDZBAN.js';
3
+ import { IconButton } from './chunk-4UQ7SMPK.js';
4
+ import { Button } from './chunk-ETYEBKR4.js';
5
5
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
7
7
  import './Canvas-Q6JETCWR.css';
8
8
  import { useId, useRef, useState, useCallback, useLayoutEffect, useImperativeHandle, useEffect } from 'react';
9
- import { ZoomOutGlyph, ZoomInGlyph, FitScreenGlyph } from '@crewlethq/icons/glyphs';
9
+ import { ZoomOutGlyph, ZoomInGlyph, FullscreenGlyph } from '@crewlethq/icons/glyphs';
10
10
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
11
11
 
12
12
  // src/Canvas/geometry.ts
@@ -528,7 +528,7 @@ function Canvas({
528
528
  {
529
529
  size: "sm",
530
530
  label: text.fit,
531
- icon: /* @__PURE__ */ jsx(FitScreenGlyph, {}),
531
+ icon: /* @__PURE__ */ jsx(FullscreenGlyph, {}),
532
532
  onClick: () => content && apply(fitView(content, sizeNow.current), "near"),
533
533
  disabled: !ready
534
534
  }
@@ -1,12 +1,12 @@
1
- import { TreeGrid } from './chunk-5SDBMKUO.js';
2
- import { createTreeModel } from './chunk-NTRZGNEX.js';
3
- import { OrgLabel } from './chunk-5C5YMZQU.js';
4
- import { AddPill } from './chunk-S4GZWSKR.js';
5
- import { IconButton } from './chunk-F27EPQ7D.js';
1
+ import { TreeGrid } from './chunk-FIFNP6PL.js';
2
+ import { createTreeModel } from './chunk-S3BCVWTU.js';
3
+ import { OrgLabel } from './chunk-WOFOMTGB.js';
4
+ import { AddPill } from './chunk-OM5E3TTK.js';
5
+ import { IconButton } from './chunk-4UQ7SMPK.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
7
7
  import './OrgTable-VWMFC3TB.css';
8
8
  import { useMemo, useRef, useImperativeHandle, useCallback } from 'react';
9
- import { KeyboardArrowDownGlyph, KeyboardArrowUpGlyph } from '@crewlethq/icons/glyphs';
9
+ import { ChevronDownGlyph, ChevronUpGlyph } from '@crewlethq/icons/glyphs';
10
10
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
11
11
 
12
12
  var LABELS = {
@@ -69,7 +69,7 @@ function OrgTable({
69
69
  size: "sm",
70
70
  label: text.expandAll,
71
71
  title: text.expandAll,
72
- icon: /* @__PURE__ */ jsx(KeyboardArrowDownGlyph, {}),
72
+ icon: /* @__PURE__ */ jsx(ChevronDownGlyph, {}),
73
73
  onClick: () => grid.current?.expandAll()
74
74
  }
75
75
  ),
@@ -79,7 +79,7 @@ function OrgTable({
79
79
  size: "sm",
80
80
  label: text.collapseAll,
81
81
  title: text.collapseAll,
82
- icon: /* @__PURE__ */ jsx(KeyboardArrowUpGlyph, {}),
82
+ icon: /* @__PURE__ */ jsx(ChevronUpGlyph, {}),
83
83
  onClick: () => grid.current?.collapseAll()
84
84
  }
85
85
  )
@@ -0,0 +1,56 @@
1
+ import { useThemePreference, useSystemTheme, resolveTheme } from './chunk-K3OWD7BJ.js';
2
+ import { IconButton } from './chunk-4UQ7SMPK.js';
3
+ import { SunGlyph, MoonGlyph } from '@crewlethq/icons/glyphs';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ function ThemeToggle(props) {
7
+ if (props.value !== void 0) {
8
+ const { storageKey: _none, ...controlled } = props;
9
+ return /* @__PURE__ */ jsx(ToggleButton, { ...controlled });
10
+ }
11
+ const { value: _stored, storageKey = "crewlet_theme", ...button } = props;
12
+ return /* @__PURE__ */ jsx(StoredThemeToggle, { ...button, storageKey });
13
+ }
14
+ function StoredThemeToggle({
15
+ storageKey,
16
+ onChange,
17
+ ...button
18
+ }) {
19
+ const [theme, choose] = useThemePreference({ storageKey });
20
+ return /* @__PURE__ */ jsx(
21
+ ToggleButton,
22
+ {
23
+ ...button,
24
+ value: theme,
25
+ onChange: (next) => {
26
+ choose(next);
27
+ onChange?.(next);
28
+ }
29
+ }
30
+ );
31
+ }
32
+ function ToggleButton({
33
+ value,
34
+ onChange,
35
+ toLightLabel = "Switch to the light theme",
36
+ toDarkLabel = "Switch to the dark theme",
37
+ size = "sm",
38
+ variant = "ghost",
39
+ className
40
+ }) {
41
+ const system = useSystemTheme();
42
+ const next = resolveTheme(value, system) === "dark" ? "light" : "dark";
43
+ return /* @__PURE__ */ jsx(
44
+ IconButton,
45
+ {
46
+ label: next === "light" ? toLightLabel : toDarkLabel,
47
+ icon: next === "light" ? /* @__PURE__ */ jsx(SunGlyph, {}) : /* @__PURE__ */ jsx(MoonGlyph, {}),
48
+ size,
49
+ variant,
50
+ className,
51
+ onClick: () => onChange(next)
52
+ }
53
+ );
54
+ }
55
+
56
+ export { ThemeToggle };
@@ -1,14 +1,14 @@
1
- import { avatarSquareCorner, Avatar } from './chunk-PNFASD6F.js';
2
- import './ImageUpload-HKFIZR6D.css';
1
+ import { avatarCorner, Avatar } from './chunk-IA232OTU.js';
2
+ import './ImageUpload-YCHJMUGX.css';
3
3
  import { useRef } from 'react';
4
- import { PhotoCameraGlyph, CloseGlyph } from '@crewlethq/icons/glyphs';
4
+ import { CameraGlyph, XGlyph } from '@crewlethq/icons/glyphs';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
6
 
7
7
  var ImageUpload = ({
8
8
  src,
9
9
  name,
10
10
  size = 64,
11
- shape = "square",
11
+ kind = "agent",
12
12
  readOnly = false,
13
13
  uploading = false,
14
14
  accept = "image/*",
@@ -41,7 +41,7 @@ var ImageUpload = ({
41
41
  const empty = !src && !readOnly;
42
42
  const wrapperClasses = [
43
43
  "crewlet-image-upload",
44
- `crewlet-image-upload--${shape}`,
44
+ `crewlet-image-upload--${kind}`,
45
45
  uploading ? "is-uploading" : "",
46
46
  empty ? "is-empty" : "",
47
47
  className
@@ -54,7 +54,7 @@ var ImageUpload = ({
54
54
  * showed the badge's corners through the overlay at every size but the one
55
55
  * the step was chosen for.
56
56
  */
57
- "--crewlet-image-upload-corner": avatarSquareCorner(size),
57
+ "--crewlet-image-upload-corner": `${avatarCorner(size)}px`,
58
58
  ...style
59
59
  };
60
60
  const triggerLabel = uploading ? "Uploading image" : src ? "Change image" : "Upload image";
@@ -69,9 +69,9 @@ var ImageUpload = ({
69
69
  "aria-label": triggerLabel,
70
70
  "aria-busy": uploading,
71
71
  children: [
72
- /* @__PURE__ */ jsx(Avatar, { src, name, size, shape }),
72
+ /* @__PURE__ */ jsx(Avatar, { src, name, size, kind }),
73
73
  !readOnly ? /* @__PURE__ */ jsx("span", { className: "crewlet-image-upload__overlay", "aria-hidden": true, children: uploading ? /* @__PURE__ */ jsx("span", { className: "crewlet-image-upload__spinner" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
74
- /* @__PURE__ */ jsx(PhotoCameraGlyph, { size: "lg" }),
74
+ /* @__PURE__ */ jsx(CameraGlyph, { size: "lg" }),
75
75
  /* @__PURE__ */ jsx("span", { className: "crewlet-image-upload__overlay-text", children: src ? "Change" : "Upload" })
76
76
  ] }) }) : null
77
77
  ]
@@ -85,7 +85,7 @@ var ImageUpload = ({
85
85
  onClick: handleRemove,
86
86
  disabled: uploading,
87
87
  "aria-label": "Remove image",
88
- children: /* @__PURE__ */ jsx(CloseGlyph, { size: "sm" })
88
+ children: /* @__PURE__ */ jsx(XGlyph, { size: "sm" })
89
89
  }
90
90
  ) : null,
91
91
  !readOnly ? (
@@ -1,5 +1,5 @@
1
1
  import { useLayerContainer, viewportBounds, LAYER_GAP, outsideBounds, placePopup, LAYER_REPOSITION_EVENT } from './chunk-7RPGY3JE.js';
2
- import { usePopupLayer } from './chunk-ITHXJHBB.js';
2
+ import { usePopupLayer } from './chunk-R25RGPUB.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Tooltip-LKQF7CE4.css';
5
5
  import { useId, useState, useRef, useCallback, useEffect, useLayoutEffect, cloneElement } from 'react';
@@ -123,10 +123,13 @@ function Tooltip({
123
123
  container?.addEventListener(LAYER_REPOSITION_EVENT, onLayout);
124
124
  window.addEventListener("resize", onLayout);
125
125
  window.addEventListener("scroll", onLayout, true);
126
+ const resize = typeof ResizeObserver === "function" ? new ResizeObserver(onLayout) : null;
127
+ if (panel.current) resize?.observe(panel.current);
126
128
  return () => {
127
129
  container?.removeEventListener(LAYER_REPOSITION_EVENT, onLayout);
128
130
  window.removeEventListener("resize", onLayout);
129
131
  window.removeEventListener("scroll", onLayout, true);
132
+ resize?.disconnect();
130
133
  };
131
134
  }, [open, container, position]);
132
135
  useEffect(() => {
@@ -1,5 +1,5 @@
1
- import { useListbox } from './chunk-GTOUGQQK.js';
2
- import { Input } from './chunk-O6232G37.js';
1
+ import { useListbox } from './chunk-6MU7HNB4.js';
2
+ import { Input } from './chunk-DSUY5F4E.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Combobox-4FUVYIE7.css';
5
5
  import { forwardRef, useId, useMemo, useRef, useCallback } from 'react';
@@ -1,8 +1,8 @@
1
- import { useRoving, tabStop, tabId } from './chunk-QEUY3A5P.js';
1
+ import { useRoving, tabStop, tabId } from './chunk-QY7UU5ZB.js';
2
2
  import { Count } from './chunk-BHHIIK3M.js';
3
3
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
- import './Tabs-VLICJFVB.css';
5
+ import './Tabs-XCNPHA7B.css';
6
6
  import './SegmentedControl-X3BI3XU4.css';
7
7
  import { useId } from 'react';
8
8
  import { jsxs, jsx } from 'react/jsx-runtime';