@crewlethq/ui 0.126.1 → 0.126.3

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 (134) hide show
  1. package/dist/AgentHandoffPanel/index.js +5 -5
  2. package/dist/AppShell/index.js +2 -2
  3. package/dist/ArrangeList/index.js +2 -2
  4. package/dist/ArtifactBar/index.js +4 -4
  5. package/dist/ArtifactCard/index.js +2 -2
  6. package/dist/AttentionList/index.js +2 -2
  7. package/dist/AuthLayout/index.js +3 -3
  8. package/dist/AvatarPicker/index.js +6 -6
  9. package/dist/BriefCard/index.js +4 -4
  10. package/dist/Card/index.js +1 -1
  11. package/dist/Combobox/index.js +2 -2
  12. package/dist/CommandPalette/CommandPalette.d.ts +10 -0
  13. package/dist/CommandPalette/index.js +6 -6
  14. package/dist/{CommandPalette-TOZYLWLE.css → CommandPalette-UC3GJCP5.css} +7 -0
  15. package/dist/CommentThread/index.js +7 -7
  16. package/dist/Composer/index.js +3 -3
  17. package/dist/ContrastBadge/index.js +2 -2
  18. package/dist/ContrastHelp/index.js +3 -3
  19. package/dist/DataGrid/index.js +6 -6
  20. package/dist/DataTable/index.js +5 -5
  21. package/dist/DataView/index.js +9 -9
  22. package/dist/DatasetSource/index.js +1 -1
  23. package/dist/DeepWorkCard/index.js +4 -4
  24. package/dist/DocTabsEditor/index.js +6 -6
  25. package/dist/EditingStatus/index.js +2 -2
  26. package/dist/{Editor-WIP3YYJ5.js → Editor-CTZXT2FC.js} +3 -3
  27. package/dist/EntityList/index.js +4 -4
  28. package/dist/FolderTile/index.js +2 -2
  29. package/dist/HuePicker/index.js +4 -4
  30. package/dist/InboxList/index.js +1 -1
  31. package/dist/{InboxList-PKF6XXTA.css → InboxList-XOUPZUCK.css} +15 -2
  32. package/dist/InlineEditor/index.js +3 -3
  33. package/dist/KeyValueRows/index.js +3 -3
  34. package/dist/LinkInterstitial/index.js +2 -2
  35. package/dist/ListInput/index.js +6 -6
  36. package/dist/{ListInput-X2GEG2X7.css → ListInput-L6XJUDTB.css} +5 -3
  37. package/dist/LogoSlot/index.js +3 -3
  38. package/dist/MarkdownEditor/index.js +4 -4
  39. package/dist/Menu/Menu.d.ts +4 -2
  40. package/dist/Menu/index.js +1 -1
  41. package/dist/{Menu-PXOAJ4DP.css → Menu-M32ZXT6N.css} +16 -2
  42. package/dist/MergeConflicts/index.js +4 -4
  43. package/dist/Modal/index.js +1 -1
  44. package/dist/{Modal-XK3OTUQK.css → Modal-ENCXGQKV.css} +10 -0
  45. package/dist/OpenInAppCard/index.js +4 -4
  46. package/dist/OrgTable/index.js +9 -9
  47. package/dist/PrincipalPicker/index.js +3 -3
  48. package/dist/ProposalCard/index.js +6 -6
  49. package/dist/RailList/index.js +5 -5
  50. package/dist/RefusalCard/index.js +4 -4
  51. package/dist/RelatedRow/index.js +2 -2
  52. package/dist/ResultTableCard/index.js +4 -4
  53. package/dist/RichEditor/index.js +1 -1
  54. package/dist/SegmentedControl/index.js +3 -3
  55. package/dist/Select/index.js +2 -2
  56. package/dist/SetupWizard/index.js +2 -2
  57. package/dist/ShareDialog/index.js +5 -5
  58. package/dist/SheetColumnEditor/index.js +11 -11
  59. package/dist/SheetGrid/index.js +2 -2
  60. package/dist/SlideFilmstrip/index.js +2 -2
  61. package/dist/StatusCard/index.js +3 -3
  62. package/dist/Switcher/index.js +6 -6
  63. package/dist/TableCells/index.js +1 -1
  64. package/dist/Tabs/index.js +2 -2
  65. package/dist/ThemeGallery/index.js +1 -1
  66. package/dist/ThemeSwitcher/index.js +4 -4
  67. package/dist/TimeRangePicker/index.js +8 -8
  68. package/dist/TimeWindowPicker/index.js +5 -5
  69. package/dist/TreeGrid/index.js +7 -7
  70. package/dist/ValueField/index.js +4 -4
  71. package/dist/VersionCompare/index.js +4 -4
  72. package/dist/{chunk-LFW5ISQY.js → chunk-2JXILC4H.js} +2 -2
  73. package/dist/{chunk-TLHPKKWZ.js → chunk-2S3J5LEN.js} +4 -4
  74. package/dist/{chunk-RFZ5MMLI.js → chunk-35ALKQC5.js} +1 -1
  75. package/dist/{chunk-V4T5CQA4.js → chunk-3R7AB45M.js} +3 -3
  76. package/dist/{chunk-L3PK6KON.js → chunk-4OKNZZ5E.js} +1 -1
  77. package/dist/{chunk-OIC6S5ES.js → chunk-4Q7AWZ6O.js} +1 -1
  78. package/dist/{chunk-ON5A6G3Z.js → chunk-4QDFH4AA.js} +1 -1
  79. package/dist/{chunk-HYIBP6MW.js → chunk-4VQYVWPU.js} +2 -2
  80. package/dist/{chunk-LV2CE5EN.js → chunk-5GIBHRCS.js} +1 -1
  81. package/dist/{chunk-JDA4ADTD.js → chunk-7MKWQ3ZL.js} +1 -1
  82. package/dist/{chunk-SJHSUTB7.js → chunk-C7BHAZVR.js} +3 -3
  83. package/dist/{chunk-BWSO2YRR.js → chunk-CMS5MLTU.js} +1 -1
  84. package/dist/{chunk-4AJVOHLY.js → chunk-DL6Y7SVB.js} +2 -2
  85. package/dist/{chunk-PHZJQU73.js → chunk-EOMLCNC4.js} +2 -2
  86. package/dist/{chunk-35S25WJZ.js → chunk-FIQGLZ5Q.js} +62 -45
  87. package/dist/{chunk-MTEQ3WO3.js → chunk-FODDW4BC.js} +1 -1
  88. package/dist/{chunk-7Y5OSXA2.js → chunk-GCE475FL.js} +1 -1
  89. package/dist/{chunk-766IY2ZW.js → chunk-GHRCG45F.js} +1 -1
  90. package/dist/{chunk-ELV2BL4R.js → chunk-GQPKDPMS.js} +2 -2
  91. package/dist/{chunk-OG4GX2TB.js → chunk-IU7QVXHA.js} +69 -4
  92. package/dist/{chunk-M557YJHH.js → chunk-JDWMDK5A.js} +1 -1
  93. package/dist/{chunk-AIIHTVWW.js → chunk-JLOZE7QG.js} +1 -1
  94. package/dist/{chunk-BBWCMOK7.js → chunk-K6OZBRR4.js} +1 -1
  95. package/dist/{chunk-ESLLB6TP.js → chunk-K6YVJS5T.js} +1 -1
  96. package/dist/{chunk-UGF5YD5O.js → chunk-KANE3PVJ.js} +1 -1
  97. package/dist/{chunk-5L56E6AF.js → chunk-L2N7SZFY.js} +1 -1
  98. package/dist/{chunk-M2JND4EM.js → chunk-NKB2ORTZ.js} +1 -1
  99. package/dist/{chunk-PIYD74IU.js → chunk-NKYBXVYQ.js} +2 -2
  100. package/dist/{chunk-LETSZEMX.js → chunk-NSUMHNUS.js} +1 -1
  101. package/dist/{chunk-IYEMN7RK.js → chunk-ORBM3IHQ.js} +1 -1
  102. package/dist/{chunk-SON7ATOT.js → chunk-P47YVFX6.js} +2 -2
  103. package/dist/{chunk-LBA2DNKW.js → chunk-PYF5DNOK.js} +29 -6
  104. package/dist/{chunk-PCSIMBUQ.js → chunk-QDXSBVZR.js} +2 -2
  105. package/dist/{chunk-IMNCBQVO.js → chunk-RA5FPMPE.js} +1 -1
  106. package/dist/{chunk-GJJQPF75.js → chunk-RABEMWTA.js} +12 -9
  107. package/dist/{chunk-LPQF7Z44.js → chunk-SIL5WE55.js} +1 -1
  108. package/dist/{chunk-CFMNGQMN.js → chunk-TLZ7NG6T.js} +1 -1
  109. package/dist/{chunk-L6PGMA2K.js → chunk-TU6IC2XD.js} +1 -1
  110. package/dist/{chunk-SHSQNFW2.js → chunk-UL46NV3X.js} +2 -2
  111. package/dist/{chunk-MLSDZFBN.js → chunk-UMEK5DHS.js} +15 -7
  112. package/dist/{chunk-U3VDJ7QJ.js → chunk-VCFV7FTE.js} +1 -1
  113. package/dist/{chunk-E32PP25Z.js → chunk-VIS6DKGQ.js} +1 -1
  114. package/dist/{chunk-6IBC6CPE.js → chunk-VPQX3EQQ.js} +1 -1
  115. package/dist/{chunk-54OD6YIS.js → chunk-WC5UG64S.js} +1 -1
  116. package/dist/{chunk-WGJRD3PY.js → chunk-WMZ2MROV.js} +1 -1
  117. package/dist/{chunk-VDADSS7I.js → chunk-X227R7IP.js} +1 -1
  118. package/dist/{chunk-VR72FN5R.js → chunk-XBWENJGX.js} +1 -1
  119. package/dist/{chunk-H6QSHVKY.js → chunk-XKHW7ZHP.js} +1 -1
  120. package/dist/{chunk-ESIB6MBQ.js → chunk-XX7UCYDH.js} +1 -1
  121. package/dist/{chunk-NK44SXPJ.js → chunk-Z64KEJ3N.js} +3 -3
  122. package/dist/generated/index.js +98 -98
  123. package/dist/index.js +98 -98
  124. package/dist/styles.css +58 -12
  125. package/dist/utils/useScrollerFocus.d.ts +21 -0
  126. package/package.json +3 -3
  127. package/dist/{chunk-WLL3PFI3.js → chunk-2DZV4PHK.js} +1 -1
  128. package/dist/{chunk-F7NHMBGJ.js → chunk-3YOLD7WG.js} +1 -1
  129. package/dist/{chunk-YKCLV77Z.js → chunk-6ZFQ6TAM.js} +1 -1
  130. package/dist/{chunk-G3WSU5J7.js → chunk-BF3PFRBE.js} +1 -1
  131. package/dist/{chunk-D6I7HBZC.js → chunk-CPWSBK3F.js} +1 -1
  132. package/dist/{chunk-6N53ZWRM.js → chunk-KRF3GQ63.js} +1 -1
  133. package/dist/{chunk-U56B2BAX.js → chunk-Q7WKCU2U.js} +1 -1
  134. package/dist/{chunk-CWGZE3JW.js → chunk-WUJ54OTI.js} +1 -1
@@ -1,13 +1,13 @@
1
- export { REFERENCE_NAME_PATTERN, ValueField, completeReference, isWholeReference, rankReferences, referenceAt, urlSchemeOf } from '../chunk-PCSIMBUQ.js';
2
- import '../chunk-YKCLV77Z.js';
3
- import '../chunk-CWGZE3JW.js';
1
+ export { REFERENCE_NAME_PATTERN, ValueField, completeReference, isWholeReference, rankReferences, referenceAt, urlSchemeOf } from '../chunk-QDXSBVZR.js';
2
+ import '../chunk-6ZFQ6TAM.js';
3
+ import '../chunk-WUJ54OTI.js';
4
4
  import '../chunk-KW7T23RT.js';
5
- import '../chunk-2YTOOH3A.js';
6
5
  import '../chunk-NN44J7BP.js';
7
6
  import '../chunk-NICEDVZM.js';
8
7
  import '../chunk-JLKO7PSK.js';
9
8
  import '../chunk-PJV5HVZY.js';
10
9
  import '../chunk-TEXK4RK6.js';
10
+ import '../chunk-2YTOOH3A.js';
11
11
  import '../chunk-X5YI6E5X.js';
12
12
  import '../chunk-TDFLCUBE.js';
13
13
  import '../chunk-HXVMXH6U.js';
@@ -1,11 +1,11 @@
1
- export { VERSION_COMPARE_LABELS, VERSION_COMPARE_LENSES, VersionCompare } from '../chunk-JDA4ADTD.js';
1
+ export { VERSION_COMPARE_LABELS, VERSION_COMPARE_LENSES, VersionCompare } from '../chunk-7MKWQ3ZL.js';
2
2
  import '../chunk-U3LHWQQK.js';
3
3
  import '../chunk-7U4V36SB.js';
4
- import '../chunk-MTEQ3WO3.js';
5
- import '../chunk-5L56E6AF.js';
4
+ import '../chunk-FODDW4BC.js';
5
+ import '../chunk-L2N7SZFY.js';
6
6
  import '../chunk-7F3OPUM5.js';
7
7
  import '../chunk-QRE6JCHS.js';
8
- import '../chunk-35S25WJZ.js';
8
+ import '../chunk-FIQGLZ5Q.js';
9
9
  import '../chunk-PPUR46MK.js';
10
10
  import '../chunk-M2M6ZD7P.js';
11
11
  import '../chunk-XSPCITPN.js';
@@ -1,7 +1,7 @@
1
- import { HuePicker } from './chunk-766IY2ZW.js';
1
+ import { HuePicker } from './chunk-GHRCG45F.js';
2
2
  import { Popover } from './chunk-KDRJZWE3.js';
3
- import { NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
4
3
  import { CharacterPicker } from './chunk-ZIL6MTMZ.js';
4
+ import { NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
5
5
  import { Avatar } from './chunk-XZY6S3UC.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
7
7
  import './AvatarPicker-POOJUOKC.css';
@@ -1,12 +1,12 @@
1
- import { Select } from './chunk-YKCLV77Z.js';
1
+ import { Select } from './chunk-6ZFQ6TAM.js';
2
2
  import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chunk-LFSIKGRQ.js';
3
- import { HueSwatch } from './chunk-766IY2ZW.js';
3
+ import { HueSwatch } from './chunk-GHRCG45F.js';
4
4
  import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
5
- import { Menu } from './chunk-35S25WJZ.js';
6
5
  import { Checkbox } from './chunk-KFTVPWG2.js';
6
+ import { Menu } from './chunk-FIQGLZ5Q.js';
7
+ import { FormField, Input } from './chunk-NN44J7BP.js';
7
8
  import { Kbd } from './chunk-VBBLHS2Y.js';
8
9
  import { Button } from './chunk-M2M6ZD7P.js';
9
- import { FormField, Input } from './chunk-NN44J7BP.js';
10
10
  import { IconButton } from './chunk-X5YI6E5X.js';
11
11
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
12
12
  import { cx } from './chunk-ODEQTPFM.js';
@@ -85,7 +85,7 @@ function ThemeGallery({
85
85
  /* @__PURE__ */ jsx("span", { className: "crewlet-theme-gallery__name", children: theme.name }),
86
86
  chosen ? /* @__PURE__ */ jsx(CheckGlyph, { size: "xs", className: "crewlet-theme-gallery__check", "aria-hidden": "true" }) : null
87
87
  ] }),
88
- theme.tag && theme.tagTone ? theme.tagTone === "brand" ? /* @__PURE__ */ jsx("span", { className: "crewlet-theme-gallery__tag crewlet-theme-gallery__tag--brand", children: /* @__PURE__ */ jsx(Tag, { size: "xs", variant: "brand", children: theme.tag }) }) : /* @__PURE__ */ jsx("span", { className: "crewlet-theme-gallery__tag", title: theme.tag, children: theme.tag }) : null
88
+ theme.tag && theme.tagTone ? theme.tagTone === "brand" ? /* @__PURE__ */ jsx("span", { className: "crewlet-theme-gallery__tag crewlet-theme-gallery__tag--brand", children: /* @__PURE__ */ jsx(Tag, { size: "xs", variant: "brand", appearance: chosen ? "outline" : "soft", children: theme.tag }) }) : /* @__PURE__ */ jsx("span", { className: "crewlet-theme-gallery__tag", title: theme.tag, children: theme.tag }) : null
89
89
  ]
90
90
  },
91
91
  theme.id
@@ -1,8 +1,8 @@
1
- import { Modal } from './chunk-OG4GX2TB.js';
1
+ import { Modal } from './chunk-IU7QVXHA.js';
2
2
  import { Callout } from './chunk-RCQLXOGS.js';
3
- import { SegmentedControl } from './chunk-MTEQ3WO3.js';
4
- import { Button } from './chunk-M2M6ZD7P.js';
3
+ import { SegmentedControl } from './chunk-FODDW4BC.js';
5
4
  import { FormField, Input } from './chunk-NN44J7BP.js';
5
+ import { Button } from './chunk-M2M6ZD7P.js';
6
6
  import { useState } from 'react';
7
7
  import { ClockGlyph } from '@crewlethq/icons/glyphs';
8
8
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  import { SlideStage } from './chunk-7O53SWKI.js';
2
2
  import { useReorder } from './chunk-JMBPMSNI.js';
3
- import { Menu } from './chunk-35S25WJZ.js';
3
+ import { Menu } from './chunk-FIQGLZ5Q.js';
4
4
  import { Kbd, isApplePlatform } from './chunk-VBBLHS2Y.js';
5
5
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,5 +1,5 @@
1
1
  import { FileDrop, FilePickButton } from './chunk-XF5PDUDH.js';
2
- import { contrastRatio } from './chunk-F7NHMBGJ.js';
2
+ import { contrastRatio } from './chunk-3YOLD7WG.js';
3
3
  import { normalizeHex } from './chunk-7W3LYIOC.js';
4
4
  import { Button } from './chunk-M2M6ZD7P.js';
5
5
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
@@ -9,7 +9,7 @@ import { jsx } from 'react/jsx-runtime';
9
9
  var engine = null;
10
10
  var loading = null;
11
11
  function loadEngine() {
12
- loading ??= import('./Editor-WIP3YYJ5.js').then(
12
+ loading ??= import('./Editor-CTZXT2FC.js').then(
13
13
  (module) => {
14
14
  engine = module.Editor;
15
15
  return engine;
@@ -1,6 +1,6 @@
1
1
  import { Toolbar } from './chunk-NPEI2QAN.js';
2
- import { SegmentedControl } from './chunk-MTEQ3WO3.js';
3
- import { tabId } from './chunk-5L56E6AF.js';
2
+ import { SegmentedControl } from './chunk-FODDW4BC.js';
3
+ import { tabId } from './chunk-L2N7SZFY.js';
4
4
  import { IconButton } from './chunk-X5YI6E5X.js';
5
5
  import { cx } from './chunk-ODEQTPFM.js';
6
6
  import './MarkdownEditor-BLCJRGDC.css';
@@ -1,7 +1,7 @@
1
1
  import { Skeleton } from './chunk-WFAJYBLX.js';
2
2
  import { PrincipalAvatar } from './chunk-HF5L56YQ.js';
3
3
  import { RelativeTime } from './chunk-GBKBME7Q.js';
4
- import { Card } from './chunk-GJJQPF75.js';
4
+ import { Card } from './chunk-RABEMWTA.js';
5
5
  import { ArtifactKindGround } from './chunk-W3A6NBUM.js';
6
6
  import { Checkbox } from './chunk-KFTVPWG2.js';
7
7
  import { ArtifactAccessGlyph } from './chunk-DOY3KC6I.js';
@@ -1,5 +1,5 @@
1
1
  import { diffLines, diffStat, collapseDiff, DiffSummary, DiffView } from './chunk-U3LHWQQK.js';
2
- import { SegmentedControl } from './chunk-MTEQ3WO3.js';
2
+ import { SegmentedControl } from './chunk-FODDW4BC.js';
3
3
  import { EmptyState } from './chunk-PPUR46MK.js';
4
4
  import { useHeadingLevel, headingTag, nextHeadingLevel, HeadingLevelProvider } from './chunk-PQADV6P6.js';
5
5
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,15 +1,15 @@
1
1
  import { PageHeader } from './chunk-FPDIHEM4.js';
2
2
  import { FilterPill } from './chunk-E4QX4VET.js';
3
3
  import { DateTimePicker } from './chunk-AQZPZYSY.js';
4
- import { DataTable } from './chunk-PHZJQU73.js';
4
+ import { DataTable } from './chunk-EOMLCNC4.js';
5
5
  import { useListbox, useOptionKeys } from './chunk-KW7T23RT.js';
6
6
  import { Toolbar } from './chunk-NPEI2QAN.js';
7
7
  import { Popover } from './chunk-KDRJZWE3.js';
8
- import { Menu } from './chunk-35S25WJZ.js';
9
8
  import { RelativeTime } from './chunk-GBKBME7Q.js';
9
+ import { Menu } from './chunk-FIQGLZ5Q.js';
10
+ import { Input } from './chunk-NN44J7BP.js';
10
11
  import { Kbd } from './chunk-VBBLHS2Y.js';
11
12
  import { Button } from './chunk-M2M6ZD7P.js';
12
- import { Input } from './chunk-NN44J7BP.js';
13
13
  import { IconButton } from './chunk-X5YI6E5X.js';
14
14
  import { Count } from './chunk-Y5CMDLQM.js';
15
15
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
@@ -7,7 +7,7 @@ import { presenceLabels } from './chunk-Z7JYG5TF.js';
7
7
  import { Tag } from './chunk-SJ3EUCFD.js';
8
8
  import { Popover } from './chunk-KDRJZWE3.js';
9
9
  import { StatusDot } from './chunk-QRE6JCHS.js';
10
- import { Menu } from './chunk-35S25WJZ.js';
10
+ import { Menu } from './chunk-FIQGLZ5Q.js';
11
11
  import { Avatar } from './chunk-XZY6S3UC.js';
12
12
  import { Button } from './chunk-M2M6ZD7P.js';
13
13
  import { IconButton } from './chunk-X5YI6E5X.js';
@@ -1,6 +1,6 @@
1
- import { Select } from './chunk-YKCLV77Z.js';
1
+ import { Select } from './chunk-6ZFQ6TAM.js';
2
2
  import { SidebarNav, NavItem } from './chunk-SM2MM4DQ.js';
3
- import { Card } from './chunk-GJJQPF75.js';
3
+ import { Card } from './chunk-RABEMWTA.js';
4
4
  import { Text } from './chunk-475DOAWF.js';
5
5
  import './RailList-N2ZBPRM2.css';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,9 +1,9 @@
1
- import { Modal } from './chunk-OG4GX2TB.js';
1
+ import { Modal } from './chunk-IU7QVXHA.js';
2
2
  import { useClipboard } from './chunk-STJ7QBC3.js';
3
- import { Menu } from './chunk-35S25WJZ.js';
4
3
  import { EmptyValue } from './chunk-WGLOH33S.js';
5
4
  import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
6
5
  import { Checkbox } from './chunk-KFTVPWG2.js';
6
+ import { Menu } from './chunk-FIQGLZ5Q.js';
7
7
  import { Button } from './chunk-M2M6ZD7P.js';
8
8
  import { IconButton } from './chunk-X5YI6E5X.js';
9
9
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
@@ -6,7 +6,7 @@ import { useLayerContainer, viewportBounds, visibleBounds, LAYER_GAP, anchorGone
6
6
  import { usePopupLayer } from './chunk-EDPMHSLZ.js';
7
7
  import { returnFocus } from './chunk-4ITETIGZ.js';
8
8
  import { cx } from './chunk-ODEQTPFM.js';
9
- import './Menu-PXOAJ4DP.css';
9
+ import './Menu-M32ZXT6N.css';
10
10
  import { useId, useState, useRef, useCallback, useLayoutEffect, useEffect } from 'react';
11
11
  import { createPortal } from 'react-dom';
12
12
  import { EllipsisVerticalGlyph, CheckGlyph } from '@crewlethq/icons/glyphs';
@@ -55,6 +55,7 @@ function Menu({
55
55
  const [uncontrolled, setUncontrolled] = useState(false);
56
56
  const open = controlled ?? uncontrolled;
57
57
  const triggerRef = useRef(null);
58
+ const panel = useRef(null);
58
59
  const menu = useRef(null);
59
60
  const opener = useRef(null);
60
61
  const startAt = useRef("first");
@@ -91,13 +92,13 @@ function Menu({
91
92
  useLayoutEffect(() => {
92
93
  if (!open) return;
93
94
  const active2 = document.activeElement;
94
- if (!(active2 instanceof Node && menu.current?.contains(active2))) {
95
+ if (!(active2 instanceof Node && panel.current?.contains(active2))) {
95
96
  opener.current = active2 instanceof HTMLElement ? active2 : null;
96
97
  }
97
98
  }, [open]);
98
99
  const position = useCallback(() => {
99
100
  const at = triggerRef.current;
100
- const box = menu.current;
101
+ const box = panel.current;
101
102
  if (!at || !box || !container) return;
102
103
  const inHost = container !== document.body;
103
104
  const host = inHost ? container.getBoundingClientRect() : viewportBounds();
@@ -136,7 +137,7 @@ function Menu({
136
137
  window.addEventListener("resize", onLayout);
137
138
  window.addEventListener("scroll", onLayout, true);
138
139
  const resize = typeof ResizeObserver === "function" ? new ResizeObserver(onLayout) : null;
139
- if (menu.current) resize?.observe(menu.current);
140
+ if (panel.current) resize?.observe(panel.current);
140
141
  return () => {
141
142
  container?.removeEventListener(LAYER_REPOSITION_EVENT, onLayout);
142
143
  window.removeEventListener("resize", onLayout);
@@ -268,47 +269,63 @@ function Menu({
268
269
  },
269
270
  entry.key
270
271
  );
271
- const list = open ? /* @__PURE__ */ jsxs(
272
- "div",
273
- {
274
- className: cx(
275
- "crewlet-menu",
276
- container !== null && container !== document.body ? "crewlet-menu--in-host" : null,
277
- entrance === "instant" && "crewlet-menu--instant",
278
- activeDescendant && "crewlet-menu--descendant",
279
- className
280
- ),
281
- id: menuId,
282
- role: "menu",
283
- "aria-label": label,
284
- "aria-describedby": header ? headerId : void 0,
285
- "aria-activedescendant": activeDescendant && active >= 0 ? itemId(active) : void 0,
286
- tabIndex: -1,
287
- ref: (el) => {
288
- menu.current = el;
289
- popup.panelRef(el);
290
- },
291
- style: place ? {
292
- left: place.left,
293
- top: place.top,
294
- zIndex: popup.zIndex,
295
- "--crewlet-menu-room": `${place.room}px`,
296
- ...place.floor === void 0 ? null : { "--crewlet-menu-floor": `${place.floor}px` }
297
- } : { visibility: "hidden" },
298
- onKeyDown: onMenuKeyDown,
299
- onPointerDown: (event) => event.stopPropagation(),
300
- onClick: (event) => event.stopPropagation(),
301
- children: [
302
- header ? (
303
- // PRESENTATIONAL, so a menu holds only items to a screen reader, and
304
- // the menu's description, so what it says is heard when it opens.
305
- /* @__PURE__ */ jsx("div", { role: "presentation", id: headerId, className: "crewlet-menu__header", children: header })
306
- ) : null,
307
- runs(items).map(
308
- (run) => run.kind === "separator" ? /* @__PURE__ */ jsx("div", { role: "separator", className: "crewlet-menu__separator" }, run.key) : run.kind === "answers" ? /* @__PURE__ */ jsx("div", { role: "group", className: "crewlet-menu__group", children: run.items.map(item) }, run.key) : item(run.item)
309
- )
310
- ]
311
- }
272
+ const list = open ? (
273
+ // THE PANEL IS NO CONTROL. Its keys are the menu's, bubbled up from the
274
+ // list or an item, and its presses are stopped so one on the header is
275
+ // not a press outside that closes the menu.
276
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
277
+ /* @__PURE__ */ jsxs(
278
+ "div",
279
+ {
280
+ className: cx(
281
+ "crewlet-menu",
282
+ container !== null && container !== document.body ? "crewlet-menu--in-host" : null,
283
+ entrance === "instant" && "crewlet-menu--instant",
284
+ activeDescendant && "crewlet-menu--descendant",
285
+ className
286
+ ),
287
+ ref: (el) => {
288
+ panel.current = el;
289
+ popup.panelRef(el);
290
+ },
291
+ style: place ? {
292
+ left: place.left,
293
+ top: place.top,
294
+ zIndex: popup.zIndex,
295
+ "--crewlet-menu-room": `${place.room}px`,
296
+ ...place.floor === void 0 ? null : { "--crewlet-menu-floor": `${place.floor}px` }
297
+ } : { visibility: "hidden" },
298
+ onKeyDown: onMenuKeyDown,
299
+ onPointerDown: (event) => event.stopPropagation(),
300
+ onClick: (event) => event.stopPropagation(),
301
+ children: [
302
+ header ? (
303
+ // OUTSIDE THE MENU, beside it in the panel. A menu may own only items,
304
+ // groups of them and separators, and a presentational wrapper removes
305
+ // its own role, not its contents': a header holding a description
306
+ // list or a tag was a menu owning a list. It is still the menu's
307
+ // description, so what it says is heard when the menu opens.
308
+ /* @__PURE__ */ jsx("div", { id: headerId, className: "crewlet-menu__header", children: header })
309
+ ) : null,
310
+ /* @__PURE__ */ jsx(
311
+ "div",
312
+ {
313
+ className: "crewlet-menu__list",
314
+ id: menuId,
315
+ role: "menu",
316
+ "aria-label": label,
317
+ "aria-describedby": header ? headerId : void 0,
318
+ "aria-activedescendant": activeDescendant && active >= 0 ? itemId(active) : void 0,
319
+ tabIndex: -1,
320
+ ref: menu,
321
+ children: runs(items).map(
322
+ (run) => run.kind === "separator" ? /* @__PURE__ */ jsx("div", { role: "separator", className: "crewlet-menu__separator" }, run.key) : run.kind === "answers" ? /* @__PURE__ */ jsx("div", { role: "group", className: "crewlet-menu__group", children: run.items.map(item) }, run.key) : item(run.item)
323
+ )
324
+ }
325
+ )
326
+ ]
327
+ }
328
+ )
312
329
  ) : null;
313
330
  const shared = {
314
331
  ref: sharedRef,
@@ -1,4 +1,4 @@
1
- import { tabId } from './chunk-5L56E6AF.js';
1
+ import { tabId } from './chunk-L2N7SZFY.js';
2
2
  import { useRoving, tabStop } from './chunk-7F3OPUM5.js';
3
3
  import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
4
4
  import { Count } from './chunk-Y5CMDLQM.js';
@@ -1,6 +1,6 @@
1
1
  import { Table } from './chunk-YGN4SBNP.js';
2
2
  import { DownloadButton } from './chunk-GCRACVZO.js';
3
- import { StatusCard } from './chunk-VDADSS7I.js';
3
+ import { StatusCard } from './chunk-X227R7IP.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './ResultTableCard-AP355LQM.css';
6
6
  import { useState } from 'react';
@@ -1,5 +1,5 @@
1
1
  import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
2
- import { SegmentedControl } from './chunk-MTEQ3WO3.js';
2
+ import { SegmentedControl } from './chunk-FODDW4BC.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
@@ -1,8 +1,8 @@
1
- import { Select } from './chunk-YKCLV77Z.js';
1
+ import { Select } from './chunk-6ZFQ6TAM.js';
2
2
  import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-EE3DJMSQ.js';
3
3
  import { Popover } from './chunk-KDRJZWE3.js';
4
- import { Button } from './chunk-M2M6ZD7P.js';
5
4
  import { Input } from './chunk-NN44J7BP.js';
5
+ import { Button } from './chunk-M2M6ZD7P.js';
6
6
  import { IconButton } from './chunk-X5YI6E5X.js';
7
7
  import { isComposing } from './chunk-EDPMHSLZ.js';
8
8
  import { useFocusModality } from './chunk-4ITETIGZ.js';
@@ -5,12 +5,65 @@ import { useLayerContainer } from './chunk-FIX72ZEC.js';
5
5
  import { focusables, useModalLayer, useBodyScrollLock } from './chunk-EDPMHSLZ.js';
6
6
  import { HeadingLevelProvider } from './chunk-PQADV6P6.js';
7
7
  import { cx } from './chunk-ODEQTPFM.js';
8
- import './Modal-XK3OTUQK.css';
9
- import { useId, useRef, useCallback } from 'react';
8
+ import './Modal-ENCXGQKV.css';
9
+ import { useState, useLayoutEffect, useId, useRef, useCallback } from 'react';
10
10
  import { createPortal } from 'react-dom';
11
11
  import { ChevronLeftGlyph, XGlyph } from '@crewlethq/icons/glyphs';
12
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
13
 
14
+ var STOPS = [
15
+ "a[href]",
16
+ "button:not([disabled])",
17
+ "input:not([disabled]):not([type='hidden'])",
18
+ "select:not([disabled])",
19
+ "textarea:not([disabled])",
20
+ "[contenteditable='true']",
21
+ "[tabindex]"
22
+ ].join(",");
23
+ function holdsStop(scroller) {
24
+ for (const el of scroller.querySelectorAll(STOPS)) {
25
+ if (el.tabIndex >= 0 && !el.closest("[hidden],[inert]")) return true;
26
+ }
27
+ return false;
28
+ }
29
+ function scrolls(scroller) {
30
+ const style = getComputedStyle(scroller);
31
+ const along = (overflow, content, box) => (overflow === "auto" || overflow === "scroll") && content > box;
32
+ return along(style.overflowY, scroller.scrollHeight, scroller.clientHeight) || along(style.overflowX, scroller.scrollWidth, scroller.clientWidth);
33
+ }
34
+ function useScrollerFocus(scroller) {
35
+ const [needed, setNeeded] = useState(false);
36
+ useLayoutEffect(() => {
37
+ if (!scroller) {
38
+ setNeeded(false);
39
+ return void 0;
40
+ }
41
+ const measure = () => setNeeded(scrolls(scroller) && !holdsStop(scroller));
42
+ const resize = typeof ResizeObserver === "function" ? new ResizeObserver(measure) : null;
43
+ const watch = () => {
44
+ resize?.disconnect();
45
+ resize?.observe(scroller);
46
+ for (const child of scroller.children) resize?.observe(child);
47
+ };
48
+ const mutation = typeof MutationObserver === "function" ? new MutationObserver(() => {
49
+ watch();
50
+ measure();
51
+ }) : null;
52
+ mutation?.observe(scroller, {
53
+ childList: true,
54
+ subtree: true,
55
+ attributes: true,
56
+ attributeFilter: ["tabindex", "disabled", "hidden", "inert", "href", "contenteditable"]
57
+ });
58
+ watch();
59
+ measure();
60
+ return () => {
61
+ resize?.disconnect();
62
+ mutation?.disconnect();
63
+ };
64
+ }, [scroller]);
65
+ return needed;
66
+ }
14
67
  function Modal({ open, ...rest }) {
15
68
  const container = useLayerContainer();
16
69
  return open && container ? /* @__PURE__ */ jsx(ModalFrame, { container, ...rest }, hostKey(container)) : null;
@@ -72,6 +125,12 @@ function ModalFrame({
72
125
  const phone = phoneSheet && variant === "dialog" && !prompt;
73
126
  const frame = useRef(null);
74
127
  const body = useRef(null);
128
+ const [bodyElement, setBodyElement] = useState(null);
129
+ const bodyRef = useCallback((el) => {
130
+ body.current = el;
131
+ setBodyElement(el);
132
+ }, []);
133
+ const bodyTakesFocus = useScrollerFocus(bodyElement);
75
134
  const foot = useRef(null);
76
135
  const start = useRef(initialFocus);
77
136
  start.current = initialFocus;
@@ -154,7 +213,13 @@ function ModalFrame({
154
213
  given(children) || prompt && given(title) ? /* @__PURE__ */ jsxs(
155
214
  "div",
156
215
  {
157
- ref: body,
216
+ ref: bodyRef,
217
+ ...bodyTakesFocus ? {
218
+ tabIndex: 0,
219
+ role: "group",
220
+ "aria-labelledby": labelledBy,
221
+ "aria-label": labelledBy === void 0 ? ariaLabel : void 0
222
+ } : {},
158
223
  className: cx(
159
224
  "crewlet-modal__body",
160
225
  stackBody ? "crewlet-modal__body--stacked" : void 0,
@@ -289,4 +354,4 @@ function ConfirmModal({
289
354
  );
290
355
  }
291
356
 
292
- export { ConfirmModal, Modal };
357
+ export { ConfirmModal, Modal, useScrollerFocus };
@@ -1,6 +1,6 @@
1
1
  import { RefusalStrip, ReceiptStrip } from './chunk-TMHG4576.js';
2
2
  import { ChangeList } from './chunk-NB53SAL4.js';
3
- import { StatusCard } from './chunk-VDADSS7I.js';
3
+ import { StatusCard } from './chunk-X227R7IP.js';
4
4
  import { Checkbox } from './chunk-KFTVPWG2.js';
5
5
  import { Disclosure } from './chunk-D5O64CVE.js';
6
6
  import { Button } from './chunk-M2M6ZD7P.js';
@@ -1,7 +1,7 @@
1
1
  import { StepList } from './chunk-EHD4CEHK.js';
2
2
  import { Meter } from './chunk-MXOT2CWL.js';
3
3
  import { ReceiptStrip } from './chunk-TMHG4576.js';
4
- import { StatusCard } from './chunk-VDADSS7I.js';
4
+ import { StatusCard } from './chunk-X227R7IP.js';
5
5
  import { Disclosure } from './chunk-D5O64CVE.js';
6
6
  import { Spinner } from './chunk-XSPCITPN.js';
7
7
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,7 +1,7 @@
1
1
  import { safeHref } from './chunk-KBZO4B33.js';
2
2
  import { IconTile } from './chunk-VRVNLJUA.js';
3
3
  import { ReceiptStrip } from './chunk-TMHG4576.js';
4
- import { StatusCard } from './chunk-VDADSS7I.js';
4
+ import { StatusCard } from './chunk-X227R7IP.js';
5
5
  import { ButtonLink, Button } from './chunk-M2M6ZD7P.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
7
7
  import './OpenInAppCard-CKHCK7DO.css';
@@ -1,6 +1,6 @@
1
1
  import { SuggestionList, SuggestionRow } from './chunk-IR3OWPAZ.js';
2
2
  import { developing } from './chunk-6C7GQOBV.js';
3
- import { StatusCard } from './chunk-VDADSS7I.js';
3
+ import { StatusCard } from './chunk-X227R7IP.js';
4
4
  import { StatusDot } from './chunk-QRE6JCHS.js';
5
5
  import { Button } from './chunk-M2M6ZD7P.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,4 +1,4 @@
1
- import { SegmentedControl } from './chunk-MTEQ3WO3.js';
1
+ import { SegmentedControl } from './chunk-FODDW4BC.js';
2
2
  import { Button } from './chunk-M2M6ZD7P.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './MergeConflicts-HCXPRQVR.css';
@@ -1,6 +1,6 @@
1
1
  import { useRoving, tabStop, revealInRow } from './chunk-7F3OPUM5.js';
2
2
  import { StatusDot } from './chunk-QRE6JCHS.js';
3
- import { Menu } from './chunk-35S25WJZ.js';
3
+ import { Menu } from './chunk-FIQGLZ5Q.js';
4
4
  import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
5
5
  import { Count } from './chunk-Y5CMDLQM.js';
6
6
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
@@ -1,4 +1,4 @@
1
- import { Card } from './chunk-GJJQPF75.js';
1
+ import { Card } from './chunk-RABEMWTA.js';
2
2
  import { Button } from './chunk-M2M6ZD7P.js';
3
3
  import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
4
4
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
@@ -1,11 +1,11 @@
1
- import { Modal } from './chunk-OG4GX2TB.js';
1
+ import { Modal } from './chunk-IU7QVXHA.js';
2
2
  import { useListbox, useOptionKeys } from './chunk-KW7T23RT.js';
3
3
  import { KeyChip, highlightMatch } from './chunk-HBDA76EZ.js';
4
4
  import { Popover } from './chunk-KDRJZWE3.js';
5
5
  import { Skeleton } from './chunk-WFAJYBLX.js';
6
6
  import { Text } from './chunk-475DOAWF.js';
7
- import { useMediaMatch } from './chunk-COS6LJ4K.js';
8
7
  import { Input } from './chunk-NN44J7BP.js';
8
+ import { useMediaMatch } from './chunk-COS6LJ4K.js';
9
9
  import { focusables, isComposing } from './chunk-EDPMHSLZ.js';
10
10
  import { returnFocus } from './chunk-4ITETIGZ.js';
11
11
  import { announce } from './chunk-WGMKERCR.js';
@@ -1,4 +1,4 @@
1
- import { Combobox } from './chunk-CWGZE3JW.js';
1
+ import { Combobox } from './chunk-WUJ54OTI.js';
2
2
  import { PRINCIPAL_KINDS, PrincipalAvatar } from './chunk-HF5L56YQ.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './PrincipalPicker-P6UYHDJR.css';
@@ -1,5 +1,5 @@
1
1
  import { useThemePreference, useDensityPreference } from './chunk-Z24ZUSTX.js';
2
- import { SegmentedControl } from './chunk-MTEQ3WO3.js';
2
+ import { SegmentedControl } from './chunk-FODDW4BC.js';
3
3
  import { SunGlyph, MonitorGlyph, MoonGlyph } from '@crewlethq/icons/glyphs';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
@@ -1,5 +1,5 @@
1
- import { Select } from './chunk-YKCLV77Z.js';
2
- import { Modal } from './chunk-OG4GX2TB.js';
1
+ import { Select } from './chunk-6ZFQ6TAM.js';
2
+ import { Modal } from './chunk-IU7QVXHA.js';
3
3
  import { CopyButton } from './chunk-AVK7RRQ4.js';
4
4
  import { Callout } from './chunk-RCQLXOGS.js';
5
5
  import { PrincipalAvatar } from './chunk-HF5L56YQ.js';