@dxos/react-ui 0.8.4-main.d05673bc65 → 0.8.4-main.dfabb4ec29

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 (290) hide show
  1. package/dist/lib/browser/{chunk-2FKSMWNY.mjs → chunk-BDBC6H6V.mjs} +79 -5
  2. package/dist/lib/browser/chunk-BDBC6H6V.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +949 -758
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +30 -24
  7. package/dist/lib/browser/testing/index.mjs.map +3 -3
  8. package/dist/lib/browser/translations.mjs +18 -0
  9. package/dist/lib/browser/translations.mjs.map +7 -0
  10. package/dist/lib/node-esm/{chunk-ZNBLTSHI.mjs → chunk-3JSJK2ZY.mjs} +79 -5
  11. package/dist/lib/node-esm/chunk-3JSJK2ZY.mjs.map +7 -0
  12. package/dist/lib/node-esm/index.mjs +949 -758
  13. package/dist/lib/node-esm/index.mjs.map +4 -4
  14. package/dist/lib/node-esm/meta.json +1 -1
  15. package/dist/lib/node-esm/testing/index.mjs +30 -24
  16. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  17. package/dist/lib/node-esm/translations.mjs +20 -0
  18. package/dist/lib/node-esm/translations.mjs.map +7 -0
  19. package/dist/types/src/components/Avatars/Avatar.d.ts +1 -1
  20. package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
  21. package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
  22. package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
  23. package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  24. package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
  25. package/dist/types/src/components/Button/Button.d.ts +2 -2
  26. package/dist/types/src/components/Button/Button.d.ts.map +1 -1
  27. package/dist/types/src/components/Button/Button.stories.d.ts +1 -1
  28. package/dist/types/src/components/Button/Button.stories.d.ts.map +1 -1
  29. package/dist/types/src/components/Button/IconButton.d.ts +1 -0
  30. package/dist/types/src/components/Button/IconButton.d.ts.map +1 -1
  31. package/dist/types/src/components/Button/IconButton.stories.d.ts +3 -0
  32. package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -1
  33. package/dist/types/src/components/Button/Toggle.d.ts +2 -2
  34. package/dist/types/src/components/Button/Toggle.d.ts.map +1 -1
  35. package/dist/types/src/components/Button/Toggle.stories.d.ts.map +1 -1
  36. package/dist/types/src/components/Button/ToggleGroup.d.ts +6 -6
  37. package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -1
  38. package/dist/types/src/components/Button/ToggleGroup.stories.d.ts +2 -2
  39. package/dist/types/src/components/Button/ToggleGroup.stories.d.ts.map +1 -1
  40. package/dist/types/src/components/Card/Card.d.ts +68 -51
  41. package/dist/types/src/components/Card/Card.d.ts.map +1 -1
  42. package/dist/types/src/components/Card/Card.stories.d.ts +2 -2
  43. package/dist/types/src/components/Card/Card.stories.d.ts.map +1 -1
  44. package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts.map +1 -1
  45. package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
  46. package/dist/types/src/components/Clipboard/index.d.ts +10 -1
  47. package/dist/types/src/components/Clipboard/index.d.ts.map +1 -1
  48. package/dist/types/src/components/DensityProvider/DensityProvider.d.ts.map +1 -1
  49. package/dist/types/src/components/Dialog/AlertDialog.d.ts +42 -31
  50. package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -1
  51. package/dist/types/src/components/Dialog/AlertDialog.stories.d.ts.map +1 -1
  52. package/dist/types/src/components/Dialog/Dialog.d.ts +47 -30
  53. package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
  54. package/dist/types/src/components/Dialog/Dialog.stories.d.ts +3 -2
  55. package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -1
  56. package/dist/types/src/components/ElevationProvider/ElevationProvider.d.ts.map +1 -1
  57. package/dist/types/src/components/ErrorFallback/ErrorFallback.d.ts.map +1 -1
  58. package/dist/types/src/components/ErrorFallback/ErrorFallback.stories.d.ts.map +1 -1
  59. package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts +14 -3
  60. package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts.map +1 -1
  61. package/dist/types/src/components/ErrorFallback/ThrowError.d.ts.map +1 -1
  62. package/dist/types/src/components/Focus/Focus.d.ts +36 -0
  63. package/dist/types/src/components/Focus/Focus.d.ts.map +1 -0
  64. package/dist/types/src/components/Focus/Focus.stories.d.ts +9 -0
  65. package/dist/types/src/components/Focus/Focus.stories.d.ts.map +1 -0
  66. package/dist/types/src/components/Focus/index.d.ts +2 -0
  67. package/dist/types/src/components/Focus/index.d.ts.map +1 -0
  68. package/dist/types/src/components/Icon/Icon.d.ts +4 -0
  69. package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
  70. package/dist/types/src/components/Icon/Icon.stories.d.ts +11 -3
  71. package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -1
  72. package/dist/types/src/components/Image/Image.d.ts +2 -1
  73. package/dist/types/src/components/Image/Image.d.ts.map +1 -1
  74. package/dist/types/src/components/Image/Image.stories.d.ts +3 -2
  75. package/dist/types/src/components/Image/Image.stories.d.ts.map +1 -1
  76. package/dist/types/src/components/Input/Input.d.ts +14 -17
  77. package/dist/types/src/components/Input/Input.d.ts.map +1 -1
  78. package/dist/types/src/components/Input/Input.stories.d.ts +3 -3
  79. package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
  80. package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
  81. package/dist/types/src/components/List/List.d.ts +5 -3
  82. package/dist/types/src/components/List/List.d.ts.map +1 -1
  83. package/dist/types/src/components/List/List.stories.d.ts +3 -1
  84. package/dist/types/src/components/List/List.stories.d.ts.map +1 -1
  85. package/dist/types/src/components/List/ListDropIndicator.d.ts.map +1 -1
  86. package/dist/types/src/components/List/Tree.d.ts +2 -2
  87. package/dist/types/src/components/List/Tree.d.ts.map +1 -1
  88. package/dist/types/src/components/List/Tree.stories.d.ts.map +1 -1
  89. package/dist/types/src/components/List/TreeDropIndicator.d.ts.map +1 -1
  90. package/dist/types/src/components/List/Treegrid.d.ts +5 -9
  91. package/dist/types/src/components/List/Treegrid.d.ts.map +1 -1
  92. package/dist/types/src/components/List/Treegrid.stories.d.ts.map +1 -1
  93. package/dist/types/src/components/Main/Main.d.ts +7 -3
  94. package/dist/types/src/components/Main/Main.d.ts.map +1 -1
  95. package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
  96. package/dist/types/src/components/Main/useSwipeToDismiss.d.ts.map +1 -1
  97. package/dist/types/src/components/Menu/ContextMenu.d.ts.map +1 -1
  98. package/dist/types/src/components/Menu/ContextMenu.stories.d.ts.map +1 -1
  99. package/dist/types/src/components/Menu/DropdownMenu.d.ts +58 -49
  100. package/dist/types/src/components/Menu/DropdownMenu.d.ts.map +1 -1
  101. package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts +14 -1
  102. package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts.map +1 -1
  103. package/dist/types/src/components/Message/Message.d.ts +1 -1
  104. package/dist/types/src/components/Message/Message.d.ts.map +1 -1
  105. package/dist/types/src/components/Message/Message.stories.d.ts +2 -2
  106. package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
  107. package/dist/types/src/components/Popover/Popover.d.ts +38 -22
  108. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  109. package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
  110. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +12 -9
  111. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  112. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +18 -5
  113. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
  114. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +42 -13
  115. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -1
  116. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +5 -6
  117. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -1
  118. package/dist/types/src/components/Select/Select.d.ts.map +1 -1
  119. package/dist/types/src/components/Select/Select.stories.d.ts +2 -2
  120. package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
  121. package/dist/types/src/components/Separator/Separator.d.ts +3 -3
  122. package/dist/types/src/components/Separator/Separator.d.ts.map +1 -1
  123. package/dist/types/src/components/Skeleton/Skeleton.stories.d.ts.map +1 -1
  124. package/dist/types/src/components/Splitter/Splitter.d.ts +19 -17
  125. package/dist/types/src/components/Splitter/Splitter.d.ts.map +1 -1
  126. package/dist/types/src/components/Splitter/Splitter.stories.d.ts.map +1 -1
  127. package/dist/types/src/components/Status/Status.d.ts +3 -4
  128. package/dist/types/src/components/Status/Status.d.ts.map +1 -1
  129. package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
  130. package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
  131. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +1 -1
  132. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  133. package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts +1 -1
  134. package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts.map +1 -1
  135. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +54 -55
  136. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
  137. package/dist/types/src/components/ThemeProvider/index.d.ts +1 -1
  138. package/dist/types/src/components/ThemeProvider/index.d.ts.map +1 -1
  139. package/dist/types/src/components/Toast/Toast.d.ts +16 -16
  140. package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
  141. package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
  142. package/dist/types/src/components/Toolbar/Toolbar.d.ts +11 -19
  143. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  144. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
  145. package/dist/types/src/components/Tooltip/Tooltip.d.ts +10 -10
  146. package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  147. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +2 -2
  148. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  149. package/dist/types/src/components/index.d.ts +1 -0
  150. package/dist/types/src/components/index.d.ts.map +1 -1
  151. package/dist/types/src/exemplars/generics.stories.d.ts +6 -5
  152. package/dist/types/src/exemplars/generics.stories.d.ts.map +1 -1
  153. package/dist/types/src/exemplars/slot.stories.d.ts +1 -0
  154. package/dist/types/src/exemplars/slot.stories.d.ts.map +1 -1
  155. package/dist/types/src/exemplars/tabster.stories.d.ts.map +1 -1
  156. package/dist/types/src/exemplars/virtualizer.stories.d.ts.map +1 -1
  157. package/dist/types/src/hooks/index.d.ts +1 -0
  158. package/dist/types/src/hooks/index.d.ts.map +1 -1
  159. package/dist/types/src/hooks/useDensityContext.d.ts +1 -1
  160. package/dist/types/src/hooks/useDensityContext.d.ts.map +1 -1
  161. package/dist/types/src/hooks/useElevationContext.d.ts.map +1 -1
  162. package/dist/types/src/hooks/useIconHref.d.ts.map +1 -1
  163. package/dist/types/src/hooks/useSafeArea.d.ts.map +1 -1
  164. package/dist/types/src/hooks/useSafeCollisionPadding.d.ts.map +1 -1
  165. package/dist/types/src/hooks/useVisualViewport.d.ts.map +1 -1
  166. package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
  167. package/dist/types/src/playground/Custom.stories.d.ts +1 -1
  168. package/dist/types/src/playground/Custom.stories.d.ts.map +1 -1
  169. package/dist/types/src/playground/Typography.stories.d.ts.map +1 -1
  170. package/dist/types/src/primitives/Column/Column.d.ts +21 -14
  171. package/dist/types/src/primitives/Column/Column.d.ts.map +1 -1
  172. package/dist/types/src/primitives/Column/Column.stories.d.ts +19 -0
  173. package/dist/types/src/primitives/Column/Column.stories.d.ts.map +1 -1
  174. package/dist/types/src/primitives/Container/Container.d.ts +4 -5
  175. package/dist/types/src/primitives/Container/Container.d.ts.map +1 -1
  176. package/dist/types/src/primitives/Container/Container.stories.d.ts.map +1 -1
  177. package/dist/types/src/primitives/Flex/Flex.d.ts +5 -7
  178. package/dist/types/src/primitives/Flex/Flex.d.ts.map +1 -1
  179. package/dist/types/src/primitives/Flex/Flex.stories.d.ts.map +1 -1
  180. package/dist/types/src/primitives/Grid/Grid.d.ts +3 -8
  181. package/dist/types/src/primitives/Grid/Grid.d.ts.map +1 -1
  182. package/dist/types/src/primitives/Grid/Grid.stories.d.ts.map +1 -1
  183. package/dist/types/src/primitives/Panel/Panel.d.ts +24 -15
  184. package/dist/types/src/primitives/Panel/Panel.d.ts.map +1 -1
  185. package/dist/types/src/primitives/Panel/Panel.stories.d.ts.map +1 -1
  186. package/dist/types/src/testing/Loading.d.ts.map +1 -1
  187. package/dist/types/src/testing/decorators/withLayout.d.ts.map +1 -1
  188. package/dist/types/src/testing/decorators/withLayoutVariants.d.ts.map +1 -1
  189. package/dist/types/src/testing/decorators/withTheme.d.ts +1 -1
  190. package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
  191. package/dist/types/src/translations.d.ts +3 -3
  192. package/dist/types/src/translations.d.ts.map +1 -1
  193. package/dist/types/src/util/usePx.d.ts.map +1 -1
  194. package/dist/types/tsconfig.tsbuildinfo +1 -1
  195. package/package.json +28 -25
  196. package/src/components/Avatars/Avatar.stories.tsx +2 -3
  197. package/src/components/Avatars/Avatar.tsx +1 -2
  198. package/src/components/Avatars/AvatarGroup.stories.tsx +0 -1
  199. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +1 -2
  200. package/src/components/Button/Button.stories.tsx +0 -1
  201. package/src/components/Button/Button.tsx +5 -13
  202. package/src/components/Button/IconButton.stories.tsx +6 -4
  203. package/src/components/Button/IconButton.tsx +3 -4
  204. package/src/components/Button/Toggle.stories.tsx +0 -1
  205. package/src/components/Button/Toggle.tsx +4 -4
  206. package/src/components/Button/ToggleGroup.stories.tsx +0 -1
  207. package/src/components/Button/ToggleGroup.tsx +12 -16
  208. package/src/components/Card/Card.stories.tsx +15 -15
  209. package/src/components/Card/Card.tsx +280 -115
  210. package/src/components/Clipboard/CopyButton.tsx +5 -6
  211. package/src/components/Dialog/AlertDialog.stories.tsx +5 -6
  212. package/src/components/Dialog/AlertDialog.tsx +67 -126
  213. package/src/components/Dialog/Dialog.stories.tsx +64 -9
  214. package/src/components/Dialog/Dialog.tsx +84 -88
  215. package/src/components/ErrorFallback/ErrorFallback.stories.tsx +3 -8
  216. package/src/components/ErrorFallback/ErrorStack.tsx +36 -2
  217. package/src/components/Focus/AUDIT.md +43 -0
  218. package/src/components/Focus/Focus.stories.tsx +230 -0
  219. package/src/components/Focus/Focus.tsx +201 -0
  220. package/src/components/Focus/index.ts +5 -0
  221. package/src/components/Icon/Icon.stories.tsx +43 -13
  222. package/src/components/Icon/Icon.tsx +14 -3
  223. package/src/components/Image/Image.stories.tsx +3 -3
  224. package/src/components/Image/Image.tsx +31 -8
  225. package/src/components/Input/Input.stories.tsx +3 -4
  226. package/src/components/Input/Input.tsx +7 -7
  227. package/src/components/Link/Link.stories.tsx +0 -1
  228. package/src/components/List/List.stories.tsx +1 -2
  229. package/src/components/List/List.tsx +7 -6
  230. package/src/components/List/ListDropIndicator.tsx +0 -1
  231. package/src/components/List/Tree.stories.tsx +2 -3
  232. package/src/components/List/Tree.tsx +0 -1
  233. package/src/components/List/Treegrid.stories.tsx +26 -27
  234. package/src/components/List/Treegrid.tsx +14 -14
  235. package/src/components/Main/Main.stories.tsx +0 -1
  236. package/src/components/Main/Main.tsx +1 -2
  237. package/src/components/Menu/ContextMenu.stories.tsx +0 -1
  238. package/src/components/Menu/DropdownMenu.stories.tsx +0 -1
  239. package/src/components/Menu/DropdownMenu.tsx +48 -42
  240. package/src/components/Message/Message.stories.tsx +7 -8
  241. package/src/components/Message/Message.tsx +23 -10
  242. package/src/components/Popover/Popover.stories.tsx +4 -5
  243. package/src/components/Popover/Popover.tsx +42 -42
  244. package/src/components/ScrollArea/ScrollArea.stories.tsx +89 -30
  245. package/src/components/ScrollArea/ScrollArea.tsx +39 -23
  246. package/src/components/ScrollContainer/ScrollContainer.stories.tsx +20 -18
  247. package/src/components/ScrollContainer/ScrollContainer.tsx +199 -92
  248. package/src/components/Select/Select.stories.tsx +5 -6
  249. package/src/components/Separator/Separator.tsx +4 -7
  250. package/src/components/Skeleton/Skeleton.stories.tsx +0 -1
  251. package/src/components/Splitter/Splitter.stories.tsx +29 -29
  252. package/src/components/Splitter/Splitter.tsx +35 -34
  253. package/src/components/Status/Status.stories.tsx +0 -1
  254. package/src/components/Status/Status.tsx +8 -5
  255. package/src/components/Tag/Tag.stories.tsx +0 -1
  256. package/src/components/ThemeProvider/ThemeProvider.stories.tsx +0 -1
  257. package/src/components/ThemeProvider/ThemeProvider.tsx +5 -4
  258. package/src/components/ThemeProvider/index.ts +1 -1
  259. package/src/components/Toast/Toast.stories.tsx +0 -1
  260. package/src/components/Toast/Toast.tsx +16 -31
  261. package/src/components/Toolbar/Toolbar.stories.tsx +0 -1
  262. package/src/components/Toolbar/Toolbar.tsx +21 -35
  263. package/src/components/Tooltip/Tooltip.stories.tsx +7 -8
  264. package/src/components/Tooltip/Tooltip.tsx +15 -16
  265. package/src/components/index.ts +1 -0
  266. package/src/exemplars/generics.stories.tsx +7 -15
  267. package/src/exemplars/slot.stories.tsx +65 -57
  268. package/src/exemplars/tabster.stories.tsx +1 -1
  269. package/src/exemplars/virtualizer.stories.tsx +4 -5
  270. package/src/hooks/index.ts +1 -0
  271. package/src/hooks/useDensityContext.ts +2 -2
  272. package/src/playground/Custom.stories.tsx +6 -9
  273. package/src/primitives/Column/AUDIT.md +148 -0
  274. package/src/primitives/Column/Column.stories.tsx +122 -19
  275. package/src/primitives/Column/Column.tsx +73 -42
  276. package/src/primitives/Container/Container.stories.tsx +0 -1
  277. package/src/primitives/Container/Container.tsx +5 -8
  278. package/src/primitives/Flex/Flex.stories.tsx +0 -1
  279. package/src/primitives/Flex/Flex.tsx +10 -12
  280. package/src/primitives/Grid/Grid.stories.tsx +0 -1
  281. package/src/primitives/Grid/Grid.tsx +4 -9
  282. package/src/primitives/Panel/Panel.stories.tsx +9 -8
  283. package/src/primitives/Panel/Panel.tsx +64 -63
  284. package/src/testing/Loading.tsx +25 -4
  285. package/src/testing/decorators/withLayout.tsx +7 -17
  286. package/src/testing/decorators/withTheme.tsx +10 -7
  287. package/src/translations.ts +3 -3
  288. package/src/util/usePx.ts +1 -0
  289. package/dist/lib/browser/chunk-2FKSMWNY.mjs.map +0 -7
  290. package/dist/lib/node-esm/chunk-ZNBLTSHI.mjs.map +0 -7
@@ -4,6 +4,7 @@ import {
4
4
  DensityProvider,
5
5
  ElevationContext,
6
6
  ElevationProvider,
7
+ ErrorStack,
7
8
  ThemeContext,
8
9
  ThemeProvider,
9
10
  Tooltip,
@@ -11,12 +12,13 @@ import {
11
12
  createTooltipScope,
12
13
  hasIosKeyboard,
13
14
  initialSafeArea,
15
+ parseCaptureOwnerStack,
14
16
  useElevationContext,
15
17
  useSafeArea,
16
18
  useThemeContext,
17
19
  useTooltipContext,
18
20
  useTranslation
19
- } from "./chunk-ZNBLTSHI.mjs";
21
+ } from "./chunk-3JSJK2ZY.mjs";
20
22
 
21
23
  // src/index.ts
22
24
  import { Trans } from "react-i18next";
@@ -24,13 +26,13 @@ export * from "@dxos/react-hooks";
24
26
  export * from "@dxos/ui-types";
25
27
 
26
28
  // src/components/ThemeProvider/index.ts
27
- import { isLabel, toLocalizedString } from "@dxos/ui-types";
29
+ import { isLabel, toLocalizedString } from "@dxos/ui-types/translations";
28
30
 
29
31
  // src/hooks/useDensityContext.ts
30
32
  import { useContext } from "react";
31
- var useDensityContext = (propsDensity) => {
33
+ var useDensityContext = (densityProp) => {
32
34
  const { density } = useContext(DensityContext);
33
- return propsDensity ?? density;
35
+ return densityProp ?? density;
34
36
  };
35
37
 
36
38
  // src/hooks/useIconHref.ts
@@ -41,6 +43,26 @@ var useIconHref = (icon) => {
41
43
  return icon ? `${url}#${icon}` : void 0;
42
44
  };
43
45
 
46
+ // src/hooks/useSafeCollisionPadding.ts
47
+ import { useMemo } from "react";
48
+ var propIsNumber = (prop) => Number.isFinite(prop);
49
+ var propsIsRecord = (prop) => !!(prop && typeof prop === "object");
50
+ var safePadding = (propsPadding, safePadding2, side) => {
51
+ return (propIsNumber(safePadding2[side]) ? safePadding2[side] : 0) + (propIsNumber(propsPadding) ? propsPadding : propsIsRecord(propsPadding) ? propsPadding[side] ?? 0 : 0);
52
+ };
53
+ var useSafeCollisionPadding = (collisionPadding) => {
54
+ const { safeAreaPadding } = useThemeContext();
55
+ return useMemo(() => ({
56
+ top: safePadding(collisionPadding, safeAreaPadding, "top"),
57
+ right: safePadding(collisionPadding, safeAreaPadding, "right"),
58
+ bottom: safePadding(collisionPadding, safeAreaPadding, "bottom"),
59
+ left: safePadding(collisionPadding, safeAreaPadding, "left")
60
+ }), [
61
+ collisionPadding,
62
+ safeAreaPadding
63
+ ]);
64
+ };
65
+
44
66
  // src/hooks/useTranslationsContext.ts
45
67
  import { useContext as useContext2 } from "react";
46
68
  var useTranslationsContext = () => useContext2(TranslationsContext);
@@ -65,7 +87,7 @@ var useVisualViewport = (deps) => {
65
87
  };
66
88
 
67
89
  // src/util/usePx.ts
68
- import { useCallback as useCallback2, useEffect, useMemo, useState as useState2 } from "react";
90
+ import { useCallback as useCallback2, useEffect, useMemo as useMemo2, useState as useState2 } from "react";
69
91
  var getDocumentElementFontSize = () => parseFloat(getComputedStyle(document.documentElement).fontSize);
70
92
  var usePx = (rem) => {
71
93
  const [fontSize, setFontSize] = useState2(() => {
@@ -101,17 +123,17 @@ var usePx = (rem) => {
101
123
  }
102
124
  };
103
125
  }, []);
104
- return useMemo(() => rem * fontSize, [
126
+ return useMemo2(() => rem * fontSize, [
105
127
  fontSize
106
128
  ]);
107
129
  };
108
130
 
109
131
  // src/components/Avatars/Avatar.tsx
110
- import "@dxos/lit-ui/dx-avatar.pcss";
111
132
  import { createContext } from "@radix-ui/react-context";
112
133
  import { Primitive } from "@radix-ui/react-primitive";
113
134
  import { Slot } from "@radix-ui/react-slot";
114
135
  import React, { forwardRef } from "react";
136
+ import "@dxos/lit-ui/dx-avatar.pcss";
115
137
  import { DxAvatar } from "@dxos/lit-ui/react";
116
138
  import { useId } from "@dxos/react-hooks";
117
139
  import { mx } from "@dxos/ui-theme";
@@ -176,12 +198,19 @@ import { Slot as Slot3 } from "@radix-ui/react-slot";
176
198
  import React4, { forwardRef as forwardRef4 } from "react";
177
199
 
178
200
  // src/components/Icon/Icon.tsx
179
- import React2, { forwardRef as forwardRef2, memo } from "react";
180
- var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef2(({ icon, classNames, size = 4, ...props }, forwardedRef) => {
201
+ import React2, { forwardRef as forwardRef2, memo, useMemo as useMemo3 } from "react";
202
+ var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef2(({ classNames, icon, size, synchronized, style, ...props }, forwardedRef) => {
181
203
  const { tx } = useThemeContext();
204
+ const spinDelay = useMemo3(() => synchronized ? `${-(Date.now() % 1e3)}ms` : void 0, [
205
+ synchronized
206
+ ]);
182
207
  const href = useIconHref(icon);
183
208
  return /* @__PURE__ */ React2.createElement("svg", {
184
209
  ...props,
210
+ style: {
211
+ ...style,
212
+ animationDelay: spinDelay
213
+ },
185
214
  className: tx("icon.root", {
186
215
  size
187
216
  }, classNames),
@@ -285,11 +314,11 @@ var BUTTON_NAME = "Button";
285
314
  var [ButtonGroupProvider, useButtonGroupContext] = createContext2(BUTTON_GROUP_NAME, {
286
315
  inGroup: false
287
316
  });
288
- var Button = /* @__PURE__ */ memo2(/* @__PURE__ */ forwardRef5(({ classNames, children, density: propsDensity, elevation: propsElevation, variant = "default", asChild, ...props }, ref) => {
317
+ var Button = /* @__PURE__ */ memo2(/* @__PURE__ */ forwardRef5(({ classNames, children, density: densityProp, elevation: elevationProp, variant = "default", asChild, ...props }, ref) => {
289
318
  const { inGroup } = useButtonGroupContext(BUTTON_NAME);
290
319
  const { tx } = useThemeContext();
291
- const elevation = useElevationContext(propsElevation);
292
- const density = useDensityContext(propsDensity);
320
+ const elevation = useElevationContext(elevationProp);
321
+ const density = useDensityContext(densityProp);
293
322
  const Comp = asChild ? Slot4 : Primitive4.button;
294
323
  return /* @__PURE__ */ React5.createElement(Comp, {
295
324
  ref,
@@ -352,12 +381,13 @@ var IconOnlyButton = /* @__PURE__ */ forwardRef6(({ noTooltip, tooltipSide, ...p
352
381
  ref: forwardedRef
353
382
  }));
354
383
  });
355
- var LabelledIconButton = /* @__PURE__ */ forwardRef6(({ size = 5, icon, iconOnly, iconEnd, iconClassNames, label, caretDown, noTooltip: _, classNames, ...props }, forwardedRef) => {
384
+ var LabelledIconButton = /* @__PURE__ */ forwardRef6(({ size, icon, iconOnly, square, iconEnd, iconClassNames, label, caretDown, noTooltip: _, classNames, ...props }, forwardedRef) => {
356
385
  const { tx } = useThemeContext();
357
386
  return /* @__PURE__ */ React6.createElement(Button, {
358
387
  ...props,
359
388
  classNames: tx("iconButton.root", {
360
- iconOnly
389
+ iconOnly,
390
+ square
361
391
  }, classNames),
362
392
  ref: forwardedRef
363
393
  }, icon && !iconEnd && /* @__PURE__ */ React6.createElement(Icon, {
@@ -377,10 +407,10 @@ var LabelledIconButton = /* @__PURE__ */ forwardRef6(({ size = 5, icon, iconOnly
377
407
  });
378
408
 
379
409
  // src/components/Button/Toggle.tsx
380
- import { Toggle as TogglePrimitive } from "@radix-ui/react-toggle";
410
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
381
411
  import React7, { forwardRef as forwardRef7 } from "react";
382
412
  var Toggle = /* @__PURE__ */ forwardRef7(({ defaultPressed, pressed, onPressedChange, ...props }, forwardedRef) => {
383
- return /* @__PURE__ */ React7.createElement(TogglePrimitive, {
413
+ return /* @__PURE__ */ React7.createElement(TogglePrimitive.Root, {
384
414
  defaultPressed,
385
415
  pressed,
386
416
  onPressedChange,
@@ -392,10 +422,10 @@ var Toggle = /* @__PURE__ */ forwardRef7(({ defaultPressed, pressed, onPressedCh
392
422
  });
393
423
 
394
424
  // src/components/Button/ToggleGroup.tsx
395
- import { ToggleGroupItem as ToggleGroupItemPrimitive, ToggleGroup as ToggleGroupPrimitive } from "@radix-ui/react-toggle-group";
425
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
396
426
  import React8, { forwardRef as forwardRef8 } from "react";
397
427
  var ToggleGroup = /* @__PURE__ */ forwardRef8(({ classNames, children, ...props }, forwardedRef) => {
398
- return /* @__PURE__ */ React8.createElement(ToggleGroupPrimitive, {
428
+ return /* @__PURE__ */ React8.createElement(ToggleGroupPrimitive.Root, {
399
429
  ...props,
400
430
  asChild: true
401
431
  }, /* @__PURE__ */ React8.createElement(ButtonGroup, {
@@ -405,7 +435,7 @@ var ToggleGroup = /* @__PURE__ */ forwardRef8(({ classNames, children, ...props
405
435
  }));
406
436
  });
407
437
  var ToggleGroupItem = /* @__PURE__ */ forwardRef8(({ variant, elevation, density, classNames, children, ...props }, forwardedRef) => {
408
- return /* @__PURE__ */ React8.createElement(ToggleGroupItemPrimitive, {
438
+ return /* @__PURE__ */ React8.createElement(ToggleGroupPrimitive.Item, {
409
439
  ...props,
410
440
  asChild: true
411
441
  }, /* @__PURE__ */ React8.createElement(Button, {
@@ -418,7 +448,7 @@ var ToggleGroupItem = /* @__PURE__ */ forwardRef8(({ variant, elevation, density
418
448
  }));
419
449
  });
420
450
  var ToggleGroupIconItem = /* @__PURE__ */ forwardRef8(({ variant, label, icon, size, elevation, density, classNames, ...props }, forwardedRef) => {
421
- return /* @__PURE__ */ React8.createElement(ToggleGroupItemPrimitive, {
451
+ return /* @__PURE__ */ React8.createElement(ToggleGroupPrimitive.Item, {
422
452
  ...props,
423
453
  asChild: true
424
454
  }, /* @__PURE__ */ React8.createElement(IconButton, {
@@ -434,24 +464,25 @@ var ToggleGroupIconItem = /* @__PURE__ */ forwardRef8(({ variant, label, icon, s
434
464
  });
435
465
 
436
466
  // src/components/Card/Card.tsx
437
- import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
438
- import { Slot as Slot11 } from "@radix-ui/react-slot";
439
- import React19, { createContext as createContext3, forwardRef as forwardRef18, useContext as useContext3 } from "react";
440
- import { composableProps as composableProps7, mx as mx6 } from "@dxos/ui-theme";
467
+ import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
468
+ import { Slot as Slot12 } from "@radix-ui/react-slot";
469
+ import DOMPurify from "dompurify";
470
+ import React19, { createContext as createContext3, forwardRef as forwardRef13, useContext as useContext3, useMemo as useMemo5 } from "react";
471
+ import { composable as composable3, composableProps as composableProps7, iconSize, mx as mx6, slottable as slottable6 } from "@dxos/ui-theme";
441
472
 
442
473
  // src/primitives/Column/Column.tsx
443
474
  import { Primitive as Primitive5 } from "@radix-ui/react-primitive";
444
475
  import { Slot as Slot5 } from "@radix-ui/react-slot";
445
- import React9, { forwardRef as forwardRef9 } from "react";
446
- import { composableProps } from "@dxos/ui-theme";
476
+ import React9 from "react";
477
+ import { composableProps, slottable } from "@dxos/ui-theme";
447
478
  var COLUMN_ROOT_NAME = "Column.Root";
448
479
  var gutterSizes = {
480
+ xs: "var(--dx-gutter-xs)",
449
481
  sm: "var(--dx-gutter-sm)",
450
482
  md: "var(--dx-gutter-md)",
451
- lg: "var(--dx-gutter-lg)",
452
- rail: "var(--dx-rail-item)"
483
+ lg: "var(--dx-gutter-lg)"
453
484
  };
454
- var Root = /* @__PURE__ */ forwardRef9(({ children, asChild, role, gutter = "md", ...props }, forwardedRef) => {
485
+ var ColumnRoot = slottable(({ children, asChild, role, gutter = "md", ...props }, forwardedRef) => {
455
486
  const { className, ...rest } = composableProps(props);
456
487
  const Comp = asChild ? Slot5 : Primitive5.div;
457
488
  const { tx } = useThemeContext();
@@ -461,6 +492,7 @@ var Root = /* @__PURE__ */ forwardRef9(({ children, asChild, role, gutter = "md"
461
492
  role: role ?? "none",
462
493
  style: {
463
494
  "--gutter": gutterSize,
495
+ "--dx-col": "2 / span 1",
464
496
  gridTemplateColumns: [
465
497
  gutterSize,
466
498
  "minmax(0,1fr)",
@@ -473,9 +505,9 @@ var Root = /* @__PURE__ */ forwardRef9(({ children, asChild, role, gutter = "md"
473
505
  ref: forwardedRef
474
506
  }, children);
475
507
  });
476
- Root.displayName = COLUMN_ROOT_NAME;
508
+ ColumnRoot.displayName = COLUMN_ROOT_NAME;
477
509
  var COLUMN_ROW_NAME = "Column.Row";
478
- var Row = /* @__PURE__ */ forwardRef9(({ children, asChild, role, ...props }, forwardedRef) => {
510
+ var ColumnRow = slottable(({ children, asChild, role, ...props }, forwardedRef) => {
479
511
  const { className, ...rest } = composableProps(props);
480
512
  const Comp = asChild ? Slot5 : Primitive5.div;
481
513
  const { tx } = useThemeContext();
@@ -486,37 +518,45 @@ var Row = /* @__PURE__ */ forwardRef9(({ children, asChild, role, ...props }, fo
486
518
  ref: forwardedRef
487
519
  }, children);
488
520
  });
489
- Row.displayName = COLUMN_ROW_NAME;
490
- var COLUMN_SEGMENT_NAME = "Column.Segment";
491
- var Segment = /* @__PURE__ */ forwardRef9(({ children, asChild, role, ...props }, forwardedRef) => {
521
+ ColumnRow.displayName = COLUMN_ROW_NAME;
522
+ var COLUMN_BLEED_NAME = "Column.Bleed";
523
+ var ColumnBleed = slottable(({ children, asChild, ...props }, forwardedRef) => {
524
+ const { tx } = useThemeContext();
492
525
  const { className, ...rest } = composableProps(props);
493
526
  const Comp = asChild ? Slot5 : Primitive5.div;
527
+ return /* @__PURE__ */ React9.createElement(Comp, {
528
+ ...rest,
529
+ className: tx("column.bleed", {}, className),
530
+ ref: forwardedRef
531
+ }, children);
532
+ });
533
+ ColumnBleed.displayName = COLUMN_BLEED_NAME;
534
+ var COLUMN_CENTER_NAME = "Column.Center";
535
+ var ColumnCenter = slottable(({ children, asChild, ...props }, forwardedRef) => {
494
536
  const { tx } = useThemeContext();
537
+ const { className, ...rest } = composableProps(props);
538
+ const Comp = asChild ? Slot5 : Primitive5.div;
495
539
  return /* @__PURE__ */ React9.createElement(Comp, {
496
540
  ...rest,
497
- role: role ?? "none",
498
- className: tx("column.segment", {}, className),
541
+ className: tx("column.center", {}, className),
499
542
  ref: forwardedRef
500
- }, asChild ? children : /* @__PURE__ */ React9.createElement("div", {
501
- className: "contents"
502
- }, children));
543
+ }, children);
503
544
  });
504
- Segment.displayName = COLUMN_SEGMENT_NAME;
545
+ ColumnCenter.displayName = COLUMN_CENTER_NAME;
505
546
  var Column = {
506
- Root,
507
- Row,
508
- Segment
547
+ Root: ColumnRoot,
548
+ Row: ColumnRow,
549
+ Bleed: ColumnBleed,
550
+ Center: ColumnCenter
509
551
  };
510
552
 
511
553
  // src/primitives/Container/Container.tsx
512
- import React10, { forwardRef as forwardRef10 } from "react";
513
- import { composableProps as composableProps2, mx as mx2 } from "@dxos/ui-theme";
514
- import { Slot as Slot6 } from "@radix-ui/react-slot";
515
554
  import { Primitive as Primitive6 } from "@radix-ui/react-primitive";
516
- var Container = /* @__PURE__ */ forwardRef10(({ children, asChild, ...props }, forwardedRef) => {
517
- const { className, ...rest } = composableProps2(props, {
518
- role: "none"
519
- });
555
+ import { Slot as Slot6 } from "@radix-ui/react-slot";
556
+ import React10 from "react";
557
+ import { composableProps as composableProps2, mx as mx2, slottable as slottable2 } from "@dxos/ui-theme";
558
+ var Container = slottable2(({ children, asChild, ...props }, forwardedRef) => {
559
+ const { className, ...rest } = composableProps2(props);
520
560
  const Comp = asChild ? Slot6 : Primitive6.div;
521
561
  return /* @__PURE__ */ React10.createElement(Comp, {
522
562
  ...rest,
@@ -526,22 +566,24 @@ var Container = /* @__PURE__ */ forwardRef10(({ children, asChild, ...props }, f
526
566
  });
527
567
 
528
568
  // src/primitives/Flex/Flex.tsx
529
- import React11, { forwardRef as forwardRef11 } from "react";
530
- import { composableProps as composableProps3, mx as mx3 } from "@dxos/ui-theme";
531
- var Flex = /* @__PURE__ */ forwardRef11(({ children, role, column, grow, ...props }, forwardedRef) => {
569
+ import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
570
+ import { Slot as Slot7 } from "@radix-ui/react-slot";
571
+ import React11 from "react";
572
+ import { composableProps as composableProps3, mx as mx3, slottable as slottable3 } from "@dxos/ui-theme";
573
+ var Flex = slottable3(({ children, asChild, column, grow, ...props }, forwardedRef) => {
532
574
  const { className, ...rest } = composableProps3(props);
533
- return /* @__PURE__ */ React11.createElement("div", {
575
+ const Comp = asChild ? Slot7 : Primitive7.div;
576
+ return /* @__PURE__ */ React11.createElement(Comp, {
534
577
  ref: forwardedRef,
535
578
  ...rest,
536
- role: role ?? "none",
537
579
  className: mx3("flex", column && "flex-col", grow && "flex-1 overflow-hidden", className)
538
580
  }, children);
539
581
  });
540
582
 
541
583
  // src/primitives/Grid/Grid.tsx
542
- import React12, { forwardRef as forwardRef12 } from "react";
543
- import { composableProps as composableProps4, mx as mx4 } from "@dxos/ui-theme";
544
- var Grid = /* @__PURE__ */ forwardRef12(({ children, style, role, cols, rows, grow = true, ...props }, forwardedRef) => {
584
+ import React12 from "react";
585
+ import { composable, composableProps as composableProps4, mx as mx4 } from "@dxos/ui-theme";
586
+ var Grid = composable(({ children, style, role, cols, rows, grow = true, ...props }, forwardedRef) => {
545
587
  const { className, ...rest } = composableProps4(props);
546
588
  return /* @__PURE__ */ React12.createElement("div", {
547
589
  ref: forwardedRef,
@@ -557,15 +599,15 @@ var Grid = /* @__PURE__ */ forwardRef12(({ children, style, role, cols, rows, gr
557
599
  });
558
600
 
559
601
  // src/primitives/Panel/Panel.tsx
560
- import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
561
- import { Slot as Slot7 } from "@radix-ui/react-slot";
562
- import React13, { forwardRef as forwardRef13 } from "react";
563
- import { composableProps as composableProps5 } from "@dxos/ui-theme";
602
+ import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
603
+ import { Slot as Slot8 } from "@radix-ui/react-slot";
604
+ import React13 from "react";
605
+ import { composableProps as composableProps5, slottable as slottable4 } from "@dxos/ui-theme";
564
606
  var GRID_TEMPLATE_ROWS = "auto 1fr auto";
565
607
  var GRID_TEMPLATE_AREAS = '"toolbar" "content" "statusbar"';
566
- var Root2 = /* @__PURE__ */ forwardRef13(({ children, asChild, role, style, ...props }, forwardedRef) => {
608
+ var PanelRoot = slottable4(({ children, asChild, role, style, ...props }, forwardedRef) => {
567
609
  const { className, ...rest } = composableProps5(props);
568
- const Comp = asChild ? Slot7 : Primitive7.div;
610
+ const Comp = asChild ? Slot8 : Primitive8.div;
569
611
  const { tx } = useThemeContext();
570
612
  return /* @__PURE__ */ React13.createElement(Comp, {
571
613
  ...rest,
@@ -579,22 +621,24 @@ var Root2 = /* @__PURE__ */ forwardRef13(({ children, asChild, role, style, ...p
579
621
  ref: forwardedRef
580
622
  }, children);
581
623
  });
582
- Root2.displayName = "Panel.Root";
583
- var Toolbar = /* @__PURE__ */ forwardRef13(({ children, asChild, ...props }, forwardedRef) => {
624
+ PanelRoot.displayName = "Panel.Root";
625
+ var PanelToolbar = slottable4(({ children, asChild, size, ...props }, forwardedRef) => {
584
626
  const { className, ...rest } = composableProps5(props);
585
- const Comp = asChild ? Slot7 : Primitive7.div;
627
+ const Comp = asChild ? Slot8 : Primitive8.div;
586
628
  const { tx } = useThemeContext();
587
629
  return /* @__PURE__ */ React13.createElement(Comp, {
588
630
  ...rest,
589
631
  "data-slot": "toolbar",
590
- className: tx("panel.toolbar", {}, className),
632
+ className: tx("panel.toolbar", {
633
+ size
634
+ }, className),
591
635
  ref: forwardedRef
592
636
  }, children);
593
637
  });
594
- Toolbar.displayName = "Panel.Toolbar";
595
- var Content = /* @__PURE__ */ forwardRef13(({ children, asChild, ...props }, forwardedRef) => {
638
+ PanelToolbar.displayName = "Panel.Toolbar";
639
+ var PanelContent = slottable4(({ children, asChild, ...props }, forwardedRef) => {
596
640
  const { className, ...rest } = composableProps5(props);
597
- const Comp = asChild ? Slot7 : Primitive7.div;
641
+ const Comp = asChild ? Slot8 : Primitive8.div;
598
642
  const { tx } = useThemeContext();
599
643
  return /* @__PURE__ */ React13.createElement(Comp, {
600
644
  ...rest,
@@ -603,31 +647,33 @@ var Content = /* @__PURE__ */ forwardRef13(({ children, asChild, ...props }, for
603
647
  ref: forwardedRef
604
648
  }, children);
605
649
  });
606
- Content.displayName = "Panel.Content";
607
- var Statusbar = /* @__PURE__ */ forwardRef13(({ children, asChild, ...props }, forwardedRef) => {
650
+ PanelContent.displayName = "Panel.Content";
651
+ var PanelStatusbar = slottable4(({ children, asChild, size, ...props }, forwardedRef) => {
608
652
  const { className, ...rest } = composableProps5(props);
609
- const Comp = asChild ? Slot7 : Primitive7.div;
653
+ const Comp = asChild ? Slot8 : Primitive8.div;
610
654
  const { tx } = useThemeContext();
611
655
  return /* @__PURE__ */ React13.createElement(Comp, {
612
656
  ...rest,
613
657
  "data-slot": "statusbar",
614
- className: tx("panel.statusbar", {}, className),
658
+ className: tx("panel.statusbar", {
659
+ size
660
+ }, className),
615
661
  ref: forwardedRef
616
662
  }, children);
617
663
  });
618
- Statusbar.displayName = "Panel.Statusbar";
664
+ PanelStatusbar.displayName = "Panel.Statusbar";
619
665
  var Panel = {
620
- Root: Root2,
621
- Toolbar,
622
- Content,
623
- Statusbar
666
+ Root: PanelRoot,
667
+ Toolbar: PanelToolbar,
668
+ Content: PanelContent,
669
+ Statusbar: PanelStatusbar
624
670
  };
625
671
 
626
672
  // src/components/Image/Image.tsx
627
673
  import React14, { useCallback as useCallback3, useRef, useState as useState3 } from "react";
628
674
  import { mx as mx5 } from "@dxos/ui-theme";
629
675
  var cache = /* @__PURE__ */ new Map();
630
- var Image = ({ classNames, src, alt = "", crossOrigin = "anonymous", sampleSize = 64, contrast = 0.9 }) => {
676
+ var Image = ({ classNames, src, alt = "", fit = "contain", crossOrigin = "anonymous", sampleSize = 64, contrast = 0.9 }) => {
631
677
  const [crossOriginState, setCrossOriginState] = useState3(crossOrigin);
632
678
  const [dominantColor, setDominantColor] = useState3(void 0);
633
679
  const [imageLoaded, setImageLoaded] = useState3(false);
@@ -666,7 +712,13 @@ var Image = ({ classNames, src, alt = "", crossOrigin = "anonymous", sampleSize
666
712
  src
667
713
  ]);
668
714
  return /* @__PURE__ */ React14.createElement("div", {
669
- className: mx5(`relative flex w-full justify-center overflow-hidden transition-all duration-700`, classNames),
715
+ // `isolate` (`isolation: isolate`) creates a new stacking context so
716
+ // the inner <img>'s `z-10` stays scoped to this wrapper. Without it
717
+ // the z-10 leaks into the parent's stacking context and elevates the
718
+ // image above any pseudo-element rings (e.g. Focus.Item's
719
+ // `dx-ring-pseudo` `::after`) painted on ancestors — most visibly,
720
+ // the focus ring on a Card containing a Card.Poster.
721
+ className: mx5(`relative flex w-full justify-center overflow-hidden transition-all duration-700 isolate`, classNames),
670
722
  style: {
671
723
  backgroundColor: dominantColor
672
724
  }
@@ -689,7 +741,7 @@ var Image = ({ classNames, src, alt = "", crossOrigin = "anonymous", sampleSize
689
741
  crossOrigin: crossOriginState,
690
742
  onError: handleImageError,
691
743
  onLoad: handleImageLoad,
692
- className: "z-10 object-contain transition-opacity duration-500",
744
+ className: mx5("z-10 transition-opacity duration-500", fit === "cover" ? "w-full h-full object-cover" : "object-contain"),
693
745
  style: {
694
746
  opacity: imageLoaded ? 1 : 0
695
747
  }
@@ -727,7 +779,9 @@ var extractDominantColor = (canvas, img, { sampleSize = 64, contrast = 0.95 }) =
727
779
  const green = pixels[i + 1];
728
780
  const blue = pixels[i + 2];
729
781
  const alpha = pixels[i + 3];
730
- if (alpha === 0) continue;
782
+ if (alpha === 0) {
783
+ continue;
784
+ }
731
785
  const max = Math.max(red, green, blue);
732
786
  const min = Math.min(red, green, blue);
733
787
  const saturation = max === 0 ? 0 : (max - min) / max;
@@ -755,72 +809,45 @@ var isTransparent = (pixels, sampleSize, threshold = 0.5) => {
755
809
  const edgePixels = sampleSize * 4 - 4;
756
810
  for (let x = 0; x < sampleSize; x++) {
757
811
  const topIndex = x * 4;
758
- if (pixels[topIndex + 3] === 0) edgeTransparentPixels++;
812
+ if (pixels[topIndex + 3] === 0) {
813
+ edgeTransparentPixels++;
814
+ }
759
815
  const bottomIndex = ((sampleSize - 1) * sampleSize + x) * 4;
760
- if (pixels[bottomIndex + 3] === 0) edgeTransparentPixels++;
816
+ if (pixels[bottomIndex + 3] === 0) {
817
+ edgeTransparentPixels++;
818
+ }
761
819
  }
762
820
  for (let y = 1; y < sampleSize - 1; y++) {
763
821
  const leftIndex = y * sampleSize * 4;
764
- if (pixels[leftIndex + 3] === 0) edgeTransparentPixels++;
822
+ if (pixels[leftIndex + 3] === 0) {
823
+ edgeTransparentPixels++;
824
+ }
765
825
  const rightIndex = (y * sampleSize + sampleSize - 1) * 4;
766
- if (pixels[rightIndex + 3] === 0) edgeTransparentPixels++;
826
+ if (pixels[rightIndex + 3] === 0) {
827
+ edgeTransparentPixels++;
828
+ }
767
829
  }
768
830
  return edgeTransparentPixels / edgePixels > threshold;
769
831
  };
770
832
 
771
833
  // src/components/Toolbar/Toolbar.tsx
772
- import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
773
- import { Slot as Slot10 } from "@radix-ui/react-slot";
834
+ import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
835
+ import { Slot as Slot11 } from "@radix-ui/react-slot";
774
836
  import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
775
- import React18, { Fragment, forwardRef as forwardRef17 } from "react";
837
+ import React18, { forwardRef as forwardRef12 } from "react";
776
838
  import { useTranslation as useTranslation2 } from "react-i18next";
777
- import { composableProps as composableProps6 } from "@dxos/ui-theme";
778
-
779
- // src/translations.ts
780
- var translationKey = "@dxos/react-ui";
781
- var translations = [
782
- {
783
- "en-US": {
784
- [translationKey]: {
785
- "toolbar menu label": "Action menu",
786
- "toolbar drag handle label": "Drag to rearrange",
787
- "toolbar close label": "Close"
788
- }
789
- }
790
- }
791
- ];
839
+ import { composable as composable2, composableProps as composableProps6, slottable as slottable5 } from "@dxos/ui-theme";
840
+ import { translationKey } from "#translations";
792
841
 
793
842
  // src/components/Menu/ContextMenu.tsx
794
843
  import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
795
- import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
796
- import { Slot as Slot8 } from "@radix-ui/react-slot";
797
- import React15, { forwardRef as forwardRef14 } from "react";
798
-
799
- // src/hooks/useSafeCollisionPadding.ts
800
- import { useMemo as useMemo2 } from "react";
801
- var propIsNumber = (prop) => Number.isFinite(prop);
802
- var propsIsRecord = (prop) => !!(prop && typeof prop === "object");
803
- var safePadding = (propsPadding, safePadding2, side) => {
804
- return (propIsNumber(safePadding2[side]) ? safePadding2[side] : 0) + (propIsNumber(propsPadding) ? propsPadding : propsIsRecord(propsPadding) ? propsPadding[side] ?? 0 : 0);
805
- };
806
- var useSafeCollisionPadding = (collisionPadding) => {
807
- const { safeAreaPadding } = useThemeContext();
808
- return useMemo2(() => ({
809
- top: safePadding(collisionPadding, safeAreaPadding, "top"),
810
- right: safePadding(collisionPadding, safeAreaPadding, "right"),
811
- bottom: safePadding(collisionPadding, safeAreaPadding, "bottom"),
812
- left: safePadding(collisionPadding, safeAreaPadding, "left")
813
- }), [
814
- collisionPadding,
815
- safeAreaPadding
816
- ]);
817
- };
818
-
819
- // src/components/Menu/ContextMenu.tsx
844
+ import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
845
+ import { Slot as Slot9 } from "@radix-ui/react-slot";
846
+ import React15, { forwardRef as forwardRef9 } from "react";
820
847
  var ContextMenuRoot = ContextMenuPrimitive.ContextMenu;
821
848
  var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
822
849
  var ContextMenuPortal = ContextMenuPrimitive.Portal;
823
- var ContextMenuContent = /* @__PURE__ */ forwardRef14(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
850
+ var ContextMenuContent = /* @__PURE__ */ forwardRef9(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
824
851
  const { tx } = useThemeContext();
825
852
  const elevation = useElevationContext();
826
853
  const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
@@ -834,16 +861,16 @@ var ContextMenuContent = /* @__PURE__ */ forwardRef14(({ classNames, children, c
834
861
  ref: forwardedRef
835
862
  }, children);
836
863
  });
837
- var ContextMenuViewport = /* @__PURE__ */ forwardRef14(({ classNames, asChild, children, ...props }, forwardedRef) => {
864
+ var ContextMenuViewport = /* @__PURE__ */ forwardRef9(({ classNames, asChild, children, ...props }, forwardedRef) => {
838
865
  const { tx } = useThemeContext();
839
- const Comp = asChild ? Slot8 : Primitive8.div;
866
+ const Comp = asChild ? Slot9 : Primitive9.div;
840
867
  return /* @__PURE__ */ React15.createElement(Comp, {
841
868
  ...props,
842
869
  className: tx("menu.viewport", {}, classNames),
843
870
  ref: forwardedRef
844
871
  }, children);
845
872
  });
846
- var ContextMenuArrow = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
873
+ var ContextMenuArrow = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
847
874
  const { tx } = useThemeContext();
848
875
  return /* @__PURE__ */ React15.createElement(ContextMenuPrimitive.Arrow, {
849
876
  ...props,
@@ -853,7 +880,7 @@ var ContextMenuArrow = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, f
853
880
  });
854
881
  var ContextMenuGroup = ContextMenuPrimitive.Group;
855
882
  var ContextMenuItemIndicator = ContextMenuPrimitive.ItemIndicator;
856
- var ContextMenuItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
883
+ var ContextMenuItem = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
857
884
  const { tx } = useThemeContext();
858
885
  return /* @__PURE__ */ React15.createElement(ContextMenuPrimitive.Item, {
859
886
  ...props,
@@ -861,7 +888,7 @@ var ContextMenuItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, fo
861
888
  ref: forwardedRef
862
889
  });
863
890
  });
864
- var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
891
+ var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
865
892
  const { tx } = useThemeContext();
866
893
  return /* @__PURE__ */ React15.createElement(ContextMenuPrimitive.CheckboxItem, {
867
894
  ...props,
@@ -869,7 +896,7 @@ var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef14(({ classNames, ...pro
869
896
  ref: forwardedRef
870
897
  });
871
898
  });
872
- var ContextMenuSeparator = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
899
+ var ContextMenuSeparator = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
873
900
  const { tx } = useThemeContext();
874
901
  return /* @__PURE__ */ React15.createElement(ContextMenuPrimitive.Separator, {
875
902
  ...props,
@@ -877,7 +904,7 @@ var ContextMenuSeparator = /* @__PURE__ */ forwardRef14(({ classNames, ...props
877
904
  ref: forwardedRef
878
905
  });
879
906
  });
880
- var ContextMenuGroupLabel = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
907
+ var ContextMenuGroupLabel = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
881
908
  const { tx } = useThemeContext();
882
909
  return /* @__PURE__ */ React15.createElement(ContextMenuPrimitive.Label, {
883
910
  ...props,
@@ -907,18 +934,17 @@ import { createContextScope } from "@radix-ui/react-context";
907
934
  import { useId as useId2 } from "@radix-ui/react-id";
908
935
  import * as MenuPrimitive from "@radix-ui/react-menu";
909
936
  import { createMenuScope } from "@radix-ui/react-menu";
910
- import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
911
- import { Slot as Slot9 } from "@radix-ui/react-slot";
937
+ import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
938
+ import { Slot as Slot10 } from "@radix-ui/react-slot";
912
939
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
913
- import React16, { forwardRef as forwardRef15, useCallback as useCallback4, useEffect as useEffect2, useMemo as useMemo3, useRef as useRef2 } from "react";
940
+ import React16, { forwardRef as forwardRef10, useCallback as useCallback4, useEffect as useEffect2, useMemo as useMemo4, useRef as useRef2 } from "react";
914
941
  var DROPDOWN_MENU_NAME = "DropdownMenu";
915
942
  var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [
916
943
  createMenuScope
917
944
  ]);
918
945
  var useMenuScope = createMenuScope();
919
946
  var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);
920
- var DropdownMenuRoot = (props) => {
921
- const { __scopeDropdownMenu, children, dir, open: openProp, defaultOpen, onOpenChange, modal = true } = props;
947
+ var DropdownMenuRoot = ({ __scopeDropdownMenu, children, dir, modal = true, open: openProp, defaultOpen, onOpenChange }) => {
922
948
  const menuScope = useMenuScope(__scopeDropdownMenu);
923
949
  const triggerRef = useRef2(null);
924
950
  const [open = false, setOpen] = useControllableState({
@@ -939,22 +965,22 @@ var DropdownMenuRoot = (props) => {
939
965
  modal
940
966
  }, /* @__PURE__ */ React16.createElement(MenuPrimitive.Root, {
941
967
  ...menuScope,
942
- open,
943
- onOpenChange: setOpen,
944
968
  dir,
945
- modal
969
+ modal,
970
+ open,
971
+ onOpenChange: setOpen
946
972
  }, children));
947
973
  };
948
974
  DropdownMenuRoot.displayName = DROPDOWN_MENU_NAME;
949
975
  var TRIGGER_NAME = "DropdownMenuTrigger";
950
- var DropdownMenuTrigger = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
976
+ var DropdownMenuTrigger = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
951
977
  const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
952
978
  const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
953
979
  const menuScope = useMenuScope(__scopeDropdownMenu);
954
980
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.Anchor, {
955
981
  asChild: true,
956
982
  ...menuScope
957
- }, /* @__PURE__ */ React16.createElement(Primitive9.button, {
983
+ }, /* @__PURE__ */ React16.createElement(Primitive10.button, {
958
984
  type: "button",
959
985
  id: context.triggerId,
960
986
  "aria-haspopup": "menu",
@@ -1024,9 +1050,9 @@ var DropdownMenuPortal = (props) => {
1024
1050
  });
1025
1051
  };
1026
1052
  DropdownMenuPortal.displayName = PORTAL_NAME;
1027
- var DropdownMenuViewport = /* @__PURE__ */ forwardRef15(({ classNames, asChild, children, ...props }, forwardedRef) => {
1053
+ var DropdownMenuViewport = /* @__PURE__ */ forwardRef10(({ classNames, asChild, children, ...props }, forwardedRef) => {
1028
1054
  const { tx } = useThemeContext();
1029
- const Comp = asChild ? Slot9 : Primitive9.div;
1055
+ const Comp = asChild ? Slot10 : Primitive10.div;
1030
1056
  return /* @__PURE__ */ React16.createElement(Comp, {
1031
1057
  ...props,
1032
1058
  className: tx("menu.viewport", {}, classNames),
@@ -1034,7 +1060,7 @@ var DropdownMenuViewport = /* @__PURE__ */ forwardRef15(({ classNames, asChild,
1034
1060
  }, children);
1035
1061
  });
1036
1062
  var CONTENT_NAME = "DropdownMenuContent";
1037
- var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1063
+ var DropdownMenuContent = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1038
1064
  const { __scopeDropdownMenu, classNames, collisionPadding = 8, collisionBoundary, ...contentProps } = props;
1039
1065
  const { tx } = useThemeContext();
1040
1066
  const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
@@ -1042,7 +1068,7 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) =>
1042
1068
  const menuScope = useMenuScope(__scopeDropdownMenu);
1043
1069
  const hasInteractedOutsideRef = useRef2(false);
1044
1070
  const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
1045
- const computedCollisionBoundary = useMemo3(() => {
1071
+ const computedCollisionBoundary = useMemo4(() => {
1046
1072
  const closestBoundary = context.triggerRef.current?.closest("[data-popover-collision-boundary]");
1047
1073
  return closestBoundary ? Array.isArray(collisionBoundary) ? [
1048
1074
  closestBoundary,
@@ -1100,7 +1126,7 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) =>
1100
1126
  });
1101
1127
  DropdownMenuContent.displayName = CONTENT_NAME;
1102
1128
  var GROUP_NAME = "DropdownMenuGroup";
1103
- var DropdownMenuGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1129
+ var DropdownMenuGroup = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1104
1130
  const { __scopeDropdownMenu, ...groupProps } = props;
1105
1131
  const menuScope = useMenuScope(__scopeDropdownMenu);
1106
1132
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.Group, {
@@ -1111,7 +1137,7 @@ var DropdownMenuGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1111
1137
  });
1112
1138
  DropdownMenuGroup.displayName = GROUP_NAME;
1113
1139
  var LABEL_NAME = "DropdownMenuLabel";
1114
- var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1140
+ var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1115
1141
  const { __scopeDropdownMenu, classNames, ...labelProps } = props;
1116
1142
  const menuScope = useMenuScope(__scopeDropdownMenu);
1117
1143
  const { tx } = useThemeContext();
@@ -1124,7 +1150,7 @@ var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef15((props, forwardedRef)
1124
1150
  });
1125
1151
  DropdownMenuGroupLabel.displayName = LABEL_NAME;
1126
1152
  var ITEM_NAME = "DropdownMenuItem";
1127
- var DropdownMenuItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1153
+ var DropdownMenuItem = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1128
1154
  const { __scopeDropdownMenu, classNames, ...itemProps } = props;
1129
1155
  const menuScope = useMenuScope(__scopeDropdownMenu);
1130
1156
  const { tx } = useThemeContext();
@@ -1137,7 +1163,7 @@ var DropdownMenuItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1137
1163
  });
1138
1164
  DropdownMenuItem.displayName = ITEM_NAME;
1139
1165
  var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
1140
- var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1166
+ var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1141
1167
  const { __scopeDropdownMenu, classNames, ...checkboxItemProps } = props;
1142
1168
  const menuScope = useMenuScope(__scopeDropdownMenu);
1143
1169
  const { tx } = useThemeContext();
@@ -1150,7 +1176,7 @@ var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef15((props, forwardedRef
1150
1176
  });
1151
1177
  DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
1152
1178
  var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
1153
- var DropdownMenuRadioGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1179
+ var DropdownMenuRadioGroup = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1154
1180
  const { __scopeDropdownMenu, ...radioGroupProps } = props;
1155
1181
  const menuScope = useMenuScope(__scopeDropdownMenu);
1156
1182
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.RadioGroup, {
@@ -1161,7 +1187,7 @@ var DropdownMenuRadioGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef)
1161
1187
  });
1162
1188
  DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;
1163
1189
  var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
1164
- var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1190
+ var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1165
1191
  const { __scopeDropdownMenu, classNames, ...itemProps } = props;
1166
1192
  const menuScope = useMenuScope(__scopeDropdownMenu);
1167
1193
  const { tx } = useThemeContext();
@@ -1174,7 +1200,7 @@ var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) =
1174
1200
  });
1175
1201
  DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;
1176
1202
  var INDICATOR_NAME = "DropdownMenuItemIndicator";
1177
- var DropdownMenuItemIndicator = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1203
+ var DropdownMenuItemIndicator = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1178
1204
  const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
1179
1205
  const menuScope = useMenuScope(__scopeDropdownMenu);
1180
1206
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.ItemIndicator, {
@@ -1185,7 +1211,7 @@ var DropdownMenuItemIndicator = /* @__PURE__ */ forwardRef15((props, forwardedRe
1185
1211
  });
1186
1212
  DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
1187
1213
  var SEPARATOR_NAME = "DropdownMenuSeparator";
1188
- var DropdownMenuSeparator = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1214
+ var DropdownMenuSeparator = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1189
1215
  const { __scopeDropdownMenu, classNames, ...separatorProps } = props;
1190
1216
  const menuScope = useMenuScope(__scopeDropdownMenu);
1191
1217
  const { tx } = useThemeContext();
@@ -1198,7 +1224,7 @@ var DropdownMenuSeparator = /* @__PURE__ */ forwardRef15((props, forwardedRef) =
1198
1224
  });
1199
1225
  DropdownMenuSeparator.displayName = SEPARATOR_NAME;
1200
1226
  var ARROW_NAME = "DropdownMenuArrow";
1201
- var DropdownMenuArrow = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1227
+ var DropdownMenuArrow = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1202
1228
  const { __scopeDropdownMenu, classNames, ...arrowProps } = props;
1203
1229
  const menuScope = useMenuScope(__scopeDropdownMenu);
1204
1230
  const { tx } = useThemeContext();
@@ -1225,7 +1251,7 @@ var DropdownMenuSub = (props) => {
1225
1251
  }, children);
1226
1252
  };
1227
1253
  var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
1228
- var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1254
+ var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1229
1255
  const { __scopeDropdownMenu, ...subTriggerProps } = props;
1230
1256
  const menuScope = useMenuScope(__scopeDropdownMenu);
1231
1257
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.SubTrigger, {
@@ -1236,7 +1262,7 @@ var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef15((props, forwardedRef)
1236
1262
  });
1237
1263
  DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;
1238
1264
  var SUB_CONTENT_NAME = "DropdownMenuSubContent";
1239
- var DropdownMenuSubContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1265
+ var DropdownMenuSubContent = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1240
1266
  const { __scopeDropdownMenu, ...subContentProps } = props;
1241
1267
  const menuScope = useMenuScope(__scopeDropdownMenu);
1242
1268
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.SubContent, {
@@ -1280,13 +1306,13 @@ var DropdownMenu = {
1280
1306
  var useDropdownMenuMenuScope = useMenuScope;
1281
1307
 
1282
1308
  // src/components/Separator/Separator.tsx
1283
- import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
1284
- import React17, { forwardRef as forwardRef16 } from "react";
1285
- var Separator3 = /* @__PURE__ */ forwardRef16(({ classNames, orientation = "horizontal", subdued, ...props }, forwardedRef) => {
1309
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
1310
+ import React17, { forwardRef as forwardRef11 } from "react";
1311
+ var Separator3 = /* @__PURE__ */ forwardRef11(({ classNames, orientation = "horizontal", subdued, ...props }, forwardedRef) => {
1286
1312
  const { tx } = useThemeContext();
1287
- return /* @__PURE__ */ React17.createElement(SeparatorPrimitive, {
1288
- orientation,
1313
+ return /* @__PURE__ */ React17.createElement(SeparatorPrimitive.Root, {
1289
1314
  ...props,
1315
+ orientation,
1290
1316
  className: tx("separator.root", {
1291
1317
  orientation,
1292
1318
  subdued
@@ -1296,18 +1322,14 @@ var Separator3 = /* @__PURE__ */ forwardRef16(({ classNames, orientation = "hori
1296
1322
  });
1297
1323
 
1298
1324
  // src/components/Toolbar/Toolbar.tsx
1299
- var ToolbarRoot = /* @__PURE__ */ forwardRef17(({ children, density, disabled, layoutManaged, textBlockWidth: textBlockWidthProp, orientation, ...props }, forwardedRef) => {
1300
- const { className, dir: _, ...rest } = composableProps6(props);
1325
+ var ToolbarRoot = composable2(({ children, density, disabled, layoutManaged, orientation, ...props }, forwardedRef) => {
1326
+ const { className, role, ...rest } = composableProps6(props);
1301
1327
  const { tx } = useThemeContext();
1302
- const InnerRoot = textBlockWidthProp ? "div" : Fragment;
1303
- const innerRootProps = textBlockWidthProp ? {
1304
- role: "none",
1305
- className: tx("toolbar.inner", {
1306
- layoutManaged
1307
- }, className)
1308
- } : {};
1309
1328
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Root, {
1310
1329
  ...rest,
1330
+ ...role !== "none" && {
1331
+ role
1332
+ },
1311
1333
  orientation,
1312
1334
  "data-arrow-keys": orientation === "vertical" ? "up down" : "left right",
1313
1335
  className: tx("toolbar.root", {
@@ -1316,11 +1338,11 @@ var ToolbarRoot = /* @__PURE__ */ forwardRef17(({ children, density, disabled, l
1316
1338
  layoutManaged
1317
1339
  }, className),
1318
1340
  ref: forwardedRef
1319
- }, /* @__PURE__ */ React18.createElement(InnerRoot, innerRootProps, children));
1341
+ }, children);
1320
1342
  });
1321
- var ToolbarText = /* @__PURE__ */ forwardRef17(({ children, asChild, ...props }, forwardedRef) => {
1343
+ var ToolbarText = slottable5(({ children, asChild, ...props }, forwardedRef) => {
1322
1344
  const { className, ...rest } = composableProps6(props);
1323
- const Comp = asChild ? Slot10 : Primitive10.div;
1345
+ const Comp = asChild ? Slot11 : Primitive11.div;
1324
1346
  const { tx } = useThemeContext();
1325
1347
  return /* @__PURE__ */ React18.createElement(Comp, {
1326
1348
  ...rest,
@@ -1328,7 +1350,7 @@ var ToolbarText = /* @__PURE__ */ forwardRef17(({ children, asChild, ...props },
1328
1350
  ref: forwardedRef
1329
1351
  }, children);
1330
1352
  });
1331
- var ToolbarButton = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1353
+ var ToolbarButton = /* @__PURE__ */ forwardRef12((props, forwardedRef) => {
1332
1354
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Button, {
1333
1355
  asChild: true
1334
1356
  }, /* @__PURE__ */ React18.createElement(Button, {
@@ -1336,7 +1358,7 @@ var ToolbarButton = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1336
1358
  ref: forwardedRef
1337
1359
  }));
1338
1360
  });
1339
- var ToolbarIconButton = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1361
+ var ToolbarIconButton = /* @__PURE__ */ forwardRef12((props, forwardedRef) => {
1340
1362
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Button, {
1341
1363
  asChild: true
1342
1364
  }, /* @__PURE__ */ React18.createElement(IconButton, {
@@ -1345,7 +1367,7 @@ var ToolbarIconButton = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1345
1367
  ref: forwardedRef
1346
1368
  }));
1347
1369
  });
1348
- var ToolbarToggle = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1370
+ var ToolbarToggle = /* @__PURE__ */ forwardRef12((props, forwardedRef) => {
1349
1371
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Button, {
1350
1372
  asChild: true
1351
1373
  }, /* @__PURE__ */ React18.createElement(Toggle, {
@@ -1353,7 +1375,7 @@ var ToolbarToggle = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1353
1375
  ref: forwardedRef
1354
1376
  }));
1355
1377
  });
1356
- var ToolbarLink = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1378
+ var ToolbarLink = /* @__PURE__ */ forwardRef12((props, forwardedRef) => {
1357
1379
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Link, {
1358
1380
  asChild: true
1359
1381
  }, /* @__PURE__ */ React18.createElement(Link, {
@@ -1361,7 +1383,7 @@ var ToolbarLink = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1361
1383
  ref: forwardedRef
1362
1384
  }));
1363
1385
  });
1364
- var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef17(({ classNames, children, elevation, ...props }, forwardedRef) => {
1386
+ var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef12(({ classNames, children, elevation, ...props }, forwardedRef) => {
1365
1387
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
1366
1388
  ...props,
1367
1389
  asChild: true
@@ -1372,7 +1394,7 @@ var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef17(({ classNames, children,
1372
1394
  ref: forwardedRef
1373
1395
  }));
1374
1396
  });
1375
- var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef17(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
1397
+ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef12(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
1376
1398
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.ToolbarToggleItem, {
1377
1399
  ...props,
1378
1400
  asChild: true
@@ -1385,7 +1407,7 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef17(({ variant, density, e
1385
1407
  ref: forwardedRef
1386
1408
  }));
1387
1409
  });
1388
- var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef17(({ variant, density, elevation, classNames, icon, label, iconOnly, ...props }, forwardedRef) => {
1410
+ var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef12(({ variant, density, elevation, classNames, icon, label, iconOnly, ...props }, forwardedRef) => {
1389
1411
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.ToolbarToggleItem, {
1390
1412
  ...props,
1391
1413
  asChild: true
@@ -1400,10 +1422,11 @@ var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef17(({ variant, densit
1400
1422
  ref: forwardedRef
1401
1423
  }));
1402
1424
  });
1403
- var ToolbarSeparator = /* @__PURE__ */ forwardRef17(({ variant = "gap", ...props }, forwardedRef) => {
1425
+ var ToolbarSeparator = /* @__PURE__ */ forwardRef12(({ variant = "gap", ...props }, forwardedRef) => {
1404
1426
  return variant === "line" ? /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Separator, {
1405
1427
  asChild: true
1406
1428
  }, /* @__PURE__ */ React18.createElement(Separator3, {
1429
+ orientation: "vertical",
1407
1430
  ...props,
1408
1431
  ref: forwardedRef
1409
1432
  })) : /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Separator, {
@@ -1411,30 +1434,29 @@ var ToolbarSeparator = /* @__PURE__ */ forwardRef17(({ variant = "gap", ...props
1411
1434
  ref: forwardedRef
1412
1435
  });
1413
1436
  });
1414
- var ToolbarDragHandle = /* @__PURE__ */ forwardRef17(({ testId = "drag-handle", label }, forwardedRef) => {
1437
+ var ToolbarDragHandle = /* @__PURE__ */ forwardRef12(({ testId = "drag-handle", label }, forwardedRef) => {
1415
1438
  const { t } = useTranslation2(translationKey);
1416
1439
  return /* @__PURE__ */ React18.createElement(ToolbarIconButton, {
1417
1440
  "data-testid": testId,
1441
+ tabIndex: -1,
1418
1442
  noTooltip: true,
1419
1443
  iconOnly: true,
1420
1444
  icon: "ph--dots-six-vertical--regular",
1421
1445
  variant: "ghost",
1422
- label: label ?? t("toolbar drag handle label"),
1423
- classNames: "cursor-pointer",
1424
- size: 5,
1446
+ label: label ?? t("toolbar-drag-handle.label"),
1447
+ classNames: "dx-focus-ring-none cursor-pointer",
1425
1448
  disabled: !forwardedRef,
1426
1449
  ref: forwardedRef
1427
1450
  });
1428
1451
  });
1429
- var ToolbarCloseIconButton = /* @__PURE__ */ forwardRef17(({ onClick, label }, forwardedRef) => {
1452
+ var ToolbarCloseIconButton = /* @__PURE__ */ forwardRef12(({ onClick, label }, forwardedRef) => {
1430
1453
  const { t } = useTranslation2(translationKey);
1431
1454
  return /* @__PURE__ */ React18.createElement(ToolbarIconButton, {
1432
1455
  iconOnly: true,
1433
1456
  icon: "ph--x--regular",
1434
1457
  variant: "ghost",
1435
- label: label ?? t("toolbar close label"),
1458
+ label: label ?? t("toolbar-close.label"),
1436
1459
  classNames: "cursor-pointer",
1437
- size: 5,
1438
1460
  onClick,
1439
1461
  ref: forwardedRef
1440
1462
  });
@@ -1448,13 +1470,13 @@ var ToolbarMenu = ({ context, items }) => {
1448
1470
  iconOnly: true,
1449
1471
  variant: "ghost",
1450
1472
  icon: "ph--dots-three-vertical--regular",
1451
- label: t("toolbar menu label")
1473
+ label: t("toolbar-menu.label")
1452
1474
  })), (items?.length ?? 0) > 0 && /* @__PURE__ */ React18.createElement(DropdownMenu.Portal, null, /* @__PURE__ */ React18.createElement(DropdownMenu.Content, null, /* @__PURE__ */ React18.createElement(DropdownMenu.Viewport, null, items?.map(({ label, onClick: onSelect }, index) => /* @__PURE__ */ React18.createElement(DropdownMenu.Item, {
1453
1475
  key: index,
1454
1476
  onSelect: () => onSelect(context)
1455
1477
  }, label))), /* @__PURE__ */ React18.createElement(DropdownMenu.Arrow, null))));
1456
1478
  };
1457
- var Toolbar2 = {
1479
+ var Toolbar = {
1458
1480
  Root: ToolbarRoot,
1459
1481
  Text: ToolbarText,
1460
1482
  Button: ToolbarButton,
@@ -1472,84 +1494,140 @@ var Toolbar2 = {
1472
1494
 
1473
1495
  // src/components/Card/Card.tsx
1474
1496
  var CardContext = /* @__PURE__ */ createContext3({});
1475
- var CardRoot = /* @__PURE__ */ forwardRef18(({ children, id, asChild, role, border = true, fullWidth, ...props }, forwardedRef) => {
1497
+ var CARD_ROOT_NAME = "Card.Root";
1498
+ var CardRoot = composable3(({ children, id, role, border = true, fullWidth, density, ...props }, forwardedRef) => {
1476
1499
  const { className, ...rest } = composableProps7(props);
1477
- const Comp = asChild ? Slot11 : Primitive11.div;
1478
1500
  const { tx } = useThemeContext();
1479
- return /* @__PURE__ */ React19.createElement(Comp, {
1501
+ return /* @__PURE__ */ React19.createElement(Column.Root, {
1502
+ asChild: true,
1503
+ gutter: density === "coarse" ? "lg" : "md",
1504
+ classNames: tx("card.root", {
1505
+ border,
1506
+ fullWidth
1507
+ }, className),
1508
+ role: role ?? "group"
1509
+ }, /* @__PURE__ */ React19.createElement("div", {
1480
1510
  ...rest,
1481
1511
  ...id && {
1482
1512
  "data-object-id": id
1483
1513
  },
1484
- role: role ?? "group",
1485
- className: tx("card.root", {
1486
- border,
1487
- fullWidth
1488
- }, className),
1489
1514
  ref: forwardedRef
1490
- }, /* @__PURE__ */ React19.createElement(Column.Root, {
1491
- gutter: "rail"
1492
1515
  }, children));
1493
1516
  });
1494
- var CardToolbar = /* @__PURE__ */ forwardRef18(({ children, classNames, density = "fine", ...props }, forwardedRef) => {
1517
+ CardRoot.displayName = CARD_ROOT_NAME;
1518
+ var CARD_TOOLBAR_NAME = "Card.Toolbar";
1519
+ var CardToolbar = composable3(({ children, classNames, ...props }, forwardedRef) => {
1495
1520
  const { tx } = useThemeContext();
1496
- return /* @__PURE__ */ React19.createElement(Toolbar2.Root, {
1521
+ return /* @__PURE__ */ React19.createElement(Toolbar.Root, {
1497
1522
  ...props,
1523
+ style: iconSize(5),
1498
1524
  classNames: [
1499
- tx("card.toolbar", {
1500
- coarse: density !== "fine"
1501
- }),
1525
+ tx("card.toolbar", {}),
1502
1526
  classNames
1503
1527
  ],
1504
1528
  ref: forwardedRef
1505
1529
  }, children);
1506
1530
  });
1507
- var CardMenu = ({ context, items }) => {
1531
+ CardToolbar.displayName = CARD_TOOLBAR_NAME;
1532
+ var CARD_DRAG_HANDLE_NAME = "Card.DragHandle";
1533
+ var CardDragHandle = /* @__PURE__ */ forwardRef13((props, forwardedRef) => {
1534
+ return /* @__PURE__ */ React19.createElement(CardIconBlock, {
1535
+ padding: true
1536
+ }, /* @__PURE__ */ React19.createElement(Toolbar.DragHandle, {
1537
+ ...props,
1538
+ ref: forwardedRef
1539
+ }));
1540
+ });
1541
+ CardDragHandle.displayName = CARD_DRAG_HANDLE_NAME;
1542
+ var CARD_CLOSE_ICON_BUTTON_NAME = "Card.CloseIconButton";
1543
+ var CloseIconButton = /* @__PURE__ */ forwardRef13((props, forwardedRef) => {
1544
+ return /* @__PURE__ */ React19.createElement(CardIconBlock, {
1545
+ padding: true
1546
+ }, /* @__PURE__ */ React19.createElement(Toolbar.CloseIconButton, {
1547
+ ...props,
1548
+ ref: forwardedRef
1549
+ }));
1550
+ });
1551
+ CloseIconButton.displayName = CARD_CLOSE_ICON_BUTTON_NAME;
1552
+ var CARD_MENU_NAME = "Card.Menu";
1553
+ var CardMenu = ({ context, items, ...props }) => {
1508
1554
  const { menuItems } = useContext3(CardContext) ?? {};
1509
1555
  const combinedItems = [
1510
1556
  ...items ?? [],
1511
1557
  ...menuItems ?? []
1512
1558
  ];
1513
- return /* @__PURE__ */ React19.createElement(Toolbar2.Menu, {
1559
+ return /* @__PURE__ */ React19.createElement(CardIconBlock, {
1560
+ padding: true
1561
+ }, /* @__PURE__ */ React19.createElement(Toolbar.Menu, {
1562
+ ...props,
1514
1563
  context,
1515
1564
  items: combinedItems
1516
- });
1565
+ }));
1517
1566
  };
1518
- var CardTitle = /* @__PURE__ */ forwardRef18(({ children, asChild, role, ...props }, forwardedRef) => {
1519
- const { className, ...rest } = composableProps7(props);
1520
- const Comp = asChild ? Slot11 : Primitive11.div;
1567
+ CardMenu.displayName = CARD_MENU_NAME;
1568
+ var CARD_ICON_NAME = "Card.Icon";
1569
+ var CardIcon = (props) => {
1570
+ return /* @__PURE__ */ React19.createElement(CardIconBlock, null, /* @__PURE__ */ React19.createElement(Icon, props));
1571
+ };
1572
+ CardIcon.displayName = CARD_ICON_NAME;
1573
+ var CARD_ICON_BLOCK_NAME = "Card.IconBlock";
1574
+ var CardIconBlock = /* @__PURE__ */ forwardRef13(({ classNames, children, padding, ...props }, forwardedRef) => {
1575
+ const { tx } = useThemeContext();
1576
+ return /* @__PURE__ */ React19.createElement("div", {
1577
+ ...props,
1578
+ className: tx("card.icon-block", {
1579
+ padding
1580
+ }, classNames),
1581
+ ref: forwardedRef
1582
+ }, children);
1583
+ });
1584
+ CardIconBlock.displayName = CARD_ICON_BLOCK_NAME;
1585
+ var CARD_TITLE_NAME = "Card.Title";
1586
+ var CardTitle = slottable6(({ children, asChild, ...props }, forwardedRef) => {
1521
1587
  const { tx } = useThemeContext();
1588
+ const { className, ...rest } = composableProps7(props, {
1589
+ role: "heading"
1590
+ });
1591
+ const Comp = asChild ? Slot12 : Primitive12.div;
1522
1592
  return /* @__PURE__ */ React19.createElement(Comp, {
1523
1593
  ...rest,
1524
- role: role ?? "heading",
1525
1594
  className: tx("card.title", {}, className),
1526
1595
  ref: forwardedRef
1527
1596
  }, children);
1528
1597
  });
1529
- var CardContent = /* @__PURE__ */ forwardRef18(({ children, role, ...props }, forwardedRef) => {
1598
+ CardTitle.displayName = CARD_TITLE_NAME;
1599
+ var CARD_CONTENT_NAME = "Card.Content";
1600
+ var CardContent = slottable6(({ children, asChild, ...props }, forwardedRef) => {
1601
+ const { className, ...rest } = composableProps7(props);
1602
+ const Comp = asChild ? Slot12 : Primitive12.div;
1530
1603
  const { tx } = useThemeContext();
1531
- return /* @__PURE__ */ React19.createElement("div", {
1532
- ...props,
1533
- role: role ?? "none",
1534
- className: tx("card.content", {}),
1604
+ return /* @__PURE__ */ React19.createElement(Comp, {
1605
+ ...rest,
1606
+ className: tx("card.content", {}, className),
1535
1607
  ref: forwardedRef
1536
1608
  }, children);
1537
1609
  });
1538
- var CardRow = /* @__PURE__ */ forwardRef18(({ children, role, icon, ...props }, forwardedRef) => {
1610
+ CardContent.displayName = CARD_CONTENT_NAME;
1611
+ var CARD_ROW_NAME = "Card.Row";
1612
+ var CardRow = slottable6(({ children, asChild, icon, ...props }, forwardedRef) => {
1539
1613
  const { className, ...rest } = composableProps7(props);
1540
- return /* @__PURE__ */ React19.createElement(Column.Row, {
1614
+ const Comp = asChild ? Slot12 : Primitive12.div;
1615
+ const { tx } = useThemeContext();
1616
+ return /* @__PURE__ */ React19.createElement(Comp, {
1541
1617
  ...rest,
1542
- role: role ?? "none",
1543
- classNames: className,
1618
+ className: tx("card.row", {}, className),
1544
1619
  ref: forwardedRef
1545
1620
  }, icon && /* @__PURE__ */ React19.createElement(CardIcon, {
1546
1621
  classNames: "text-subdued",
1547
- icon
1548
- }) || /* @__PURE__ */ React19.createElement("div", null), children, /* @__PURE__ */ React19.createElement("div", null));
1622
+ icon,
1623
+ size: 4
1624
+ }) || /* @__PURE__ */ React19.createElement("div", null), children);
1549
1625
  });
1550
- var CardSection = /* @__PURE__ */ forwardRef18(({ children, asChild, role, ...props }, forwardedRef) => {
1626
+ CardRow.displayName = CARD_ROW_NAME;
1627
+ var CARD_SECTION_NAME = "Card.Section";
1628
+ var CardSection = slottable6(({ children, asChild, role, ...props }, forwardedRef) => {
1551
1629
  const { className, ...rest } = composableProps7(props);
1552
- const Comp = asChild ? Slot11 : Primitive11.div;
1630
+ const Comp = asChild ? Slot12 : Primitive12.div;
1553
1631
  return /* @__PURE__ */ React19.createElement(Comp, {
1554
1632
  ...rest,
1555
1633
  role: role ?? "none",
@@ -1557,9 +1635,11 @@ var CardSection = /* @__PURE__ */ forwardRef18(({ children, asChild, role, ...pr
1557
1635
  ref: forwardedRef
1558
1636
  }, children);
1559
1637
  });
1560
- var CardHeading = /* @__PURE__ */ forwardRef18(({ children, asChild, role, variant = "default", ...props }, forwardedRef) => {
1638
+ CardSection.displayName = CARD_SECTION_NAME;
1639
+ var CARD_HEADING_NAME = "Card.Heading";
1640
+ var CardHeading = slottable6(({ children, asChild, role, variant = "default", ...props }, forwardedRef) => {
1561
1641
  const { className, ...rest } = composableProps7(props);
1562
- const Comp = asChild ? Slot11 : Primitive11.div;
1642
+ const Comp = asChild ? Slot12 : Primitive12.div;
1563
1643
  const { tx } = useThemeContext();
1564
1644
  return /* @__PURE__ */ React19.createElement(Comp, {
1565
1645
  ...rest,
@@ -1570,9 +1650,11 @@ var CardHeading = /* @__PURE__ */ forwardRef18(({ children, asChild, role, varia
1570
1650
  ref: forwardedRef
1571
1651
  }, children);
1572
1652
  });
1573
- var CardText = /* @__PURE__ */ forwardRef18(({ children, asChild, role, truncate, variant = "default", ...props }, forwardedRef) => {
1653
+ CardHeading.displayName = CARD_HEADING_NAME;
1654
+ var CARD_TEXT_NAME = "Card.Text";
1655
+ var CardText = slottable6(({ children, asChild, role, truncate, variant = "default", ...props }, forwardedRef) => {
1574
1656
  const { className, ...rest } = composableProps7(props);
1575
- const Comp = asChild ? Slot11 : Primitive11.div;
1657
+ const Comp = asChild ? Slot12 : Primitive12.div;
1576
1658
  const { tx } = useThemeContext();
1577
1659
  return /* @__PURE__ */ React19.createElement(Comp, {
1578
1660
  ...rest,
@@ -1588,13 +1670,32 @@ var CardText = /* @__PURE__ */ forwardRef18(({ children, asChild, role, truncate
1588
1670
  })
1589
1671
  }, children));
1590
1672
  });
1673
+ CardText.displayName = CARD_TEXT_NAME;
1674
+ var CARD_HTML_NAME = "Card.Html";
1675
+ var CardHtml = ({ html, variant = "default", ...props }) => {
1676
+ const { tx } = useThemeContext();
1677
+ const sanitized = useMemo5(() => DOMPurify.sanitize(html), [
1678
+ html
1679
+ ]);
1680
+ return /* @__PURE__ */ React19.createElement("div", {
1681
+ ...props,
1682
+ className: tx("card.text", {
1683
+ variant
1684
+ }),
1685
+ // eslint-disable-next-line react/no-danger
1686
+ dangerouslySetInnerHTML: {
1687
+ __html: sanitized
1688
+ }
1689
+ });
1690
+ };
1691
+ CardHtml.displayName = CARD_HTML_NAME;
1692
+ var CARD_POSTER_NAME = "Card.Poster";
1591
1693
  var CardPoster = (props) => {
1592
1694
  const { tx } = useThemeContext();
1593
1695
  const aspect = props.aspect === "auto" ? "aspect-auto" : "aspect-video";
1594
1696
  if (props.image) {
1595
1697
  return /* @__PURE__ */ React19.createElement("div", {
1596
- role: "none",
1597
- className: "col-span-full mb-1"
1698
+ className: "col-span-full"
1598
1699
  }, /* @__PURE__ */ React19.createElement(Image, {
1599
1700
  classNames: [
1600
1701
  tx("card.poster", {}),
@@ -1602,7 +1703,8 @@ var CardPoster = (props) => {
1602
1703
  props.classNames
1603
1704
  ],
1604
1705
  src: props.image,
1605
- alt: props.alt
1706
+ alt: props.alt,
1707
+ fit: props.fit
1606
1708
  }));
1607
1709
  }
1608
1710
  if (props.icon) {
@@ -1619,6 +1721,8 @@ var CardPoster = (props) => {
1619
1721
  }));
1620
1722
  }
1621
1723
  };
1724
+ CardPoster.displayName = CARD_POSTER_NAME;
1725
+ var CARD_ACTION_NAME = "Card.Action";
1622
1726
  var CardAction = ({ icon, actionIcon = "ph--arrow-right--regular", label, onClick }) => {
1623
1727
  const { tx } = useThemeContext();
1624
1728
  return /* @__PURE__ */ React19.createElement(Button, {
@@ -1627,13 +1731,17 @@ var CardAction = ({ icon, actionIcon = "ph--arrow-right--regular", label, onClic
1627
1731
  onClick
1628
1732
  }, icon ? /* @__PURE__ */ React19.createElement(CardIcon, {
1629
1733
  classNames: "text-subdued",
1630
- icon
1734
+ icon,
1735
+ size: 4
1631
1736
  }) : /* @__PURE__ */ React19.createElement("div", null), /* @__PURE__ */ React19.createElement("span", {
1632
1737
  className: tx("card.action-label", {}, !actionIcon ? "col-span-2" : void 0)
1633
1738
  }, label), actionIcon && /* @__PURE__ */ React19.createElement(CardIcon, {
1634
- icon: actionIcon
1739
+ icon: actionIcon,
1740
+ size: 4
1635
1741
  }));
1636
1742
  };
1743
+ CardAction.displayName = CARD_ACTION_NAME;
1744
+ var CARD_LINK_NAME = "Card.Link";
1637
1745
  var CardLink = ({ label, href }) => {
1638
1746
  const { tx } = useThemeContext();
1639
1747
  return /* @__PURE__ */ React19.createElement("a", {
@@ -1652,42 +1760,27 @@ var CardLink = ({ label, href }) => {
1652
1760
  icon: "ph--arrow-square-out--regular"
1653
1761
  }));
1654
1762
  };
1655
- var CardIcon = ({ toolbar, ...props }) => {
1656
- return /* @__PURE__ */ React19.createElement(CardIconBlock, null, /* @__PURE__ */ React19.createElement(Icon, {
1657
- ...props,
1658
- size: toolbar ? 5 : 4
1659
- }));
1660
- };
1661
- var CardIconBlock = ({ classNames, children, role, ...props }) => {
1662
- const { tx } = useThemeContext();
1663
- return /* @__PURE__ */ React19.createElement("div", {
1664
- ...props,
1665
- role: role ?? "none",
1666
- className: tx("card.icon-block", {}, classNames)
1667
- }, children);
1668
- };
1763
+ CardLink.displayName = CARD_LINK_NAME;
1669
1764
  var Card = {
1670
1765
  Root: CardRoot,
1671
1766
  // Toolbar
1672
1767
  Toolbar: CardToolbar,
1673
- ToolbarIconButton: Toolbar2.IconButton,
1674
- ToolbarSeparator: Toolbar2.Separator,
1675
- DragHandle: /* @__PURE__ */ forwardRef18((props, ref) => /* @__PURE__ */ React19.createElement(Toolbar2.DragHandle, {
1676
- testId: "card-drag-handle",
1677
- ...props,
1678
- ref
1679
- })),
1680
- CloseIconButton: Toolbar2.CloseIconButton,
1681
- Title: CardTitle,
1768
+ ToolbarIconButton: Toolbar.IconButton,
1769
+ ToolbarSeparator: Toolbar.Separator,
1770
+ // Toolbar blocks
1771
+ IconBlock: CardIconBlock,
1772
+ DragHandle: CardDragHandle,
1773
+ CloseIconButton,
1682
1774
  Menu: CardMenu,
1683
1775
  Icon: CardIcon,
1684
- IconBlock: CardIconBlock,
1776
+ Title: CardTitle,
1685
1777
  // Content
1686
1778
  Content: CardContent,
1687
1779
  Row: CardRow,
1688
1780
  Section: CardSection,
1689
1781
  Heading: CardHeading,
1690
1782
  Text: CardText,
1783
+ Html: CardHtml,
1691
1784
  Poster: CardPoster,
1692
1785
  Action: CardAction,
1693
1786
  Link: CardLink
@@ -1732,19 +1825,17 @@ var CopyButton = ({ classNames, value, size = 5, ...props }) => {
1732
1825
  onClick: () => setTextValue(value),
1733
1826
  "data-testid": "copy-invitation"
1734
1827
  }, /* @__PURE__ */ React21.createElement("div", {
1735
- role: "none",
1736
1828
  className: mx7("flex gap-1 items-center", isCopied && inactiveLabelStyles)
1737
1829
  }, /* @__PURE__ */ React21.createElement("span", {
1738
1830
  className: "px-1"
1739
- }, t("copy label")), /* @__PURE__ */ React21.createElement(Icon, {
1831
+ }, t("copy.label")), /* @__PURE__ */ React21.createElement(Icon, {
1740
1832
  icon: "ph--copy--regular",
1741
1833
  size
1742
1834
  })), /* @__PURE__ */ React21.createElement("div", {
1743
- role: "none",
1744
1835
  className: mx7("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
1745
1836
  }, /* @__PURE__ */ React21.createElement("span", {
1746
1837
  className: "px-1"
1747
- }, t("copy success label")), /* @__PURE__ */ React21.createElement(Icon, {
1838
+ }, t("copy-success.label")), /* @__PURE__ */ React21.createElement(Icon, {
1748
1839
  icon: "ph--check--regular",
1749
1840
  size
1750
1841
  })));
@@ -1753,7 +1844,7 @@ var CopyButtonIconOnly = ({ __scopeTooltip, value, classNames, size, variant, ..
1753
1844
  const { t } = useTranslation(osTranslations);
1754
1845
  const { textValue, setTextValue } = useClipboard();
1755
1846
  const isCopied = textValue === value;
1756
- const label = isCopied ? t("copy success label") : props.label ?? t("copy label");
1847
+ const label = isCopied ? t("copy-success.label") : props.label ?? t("copy.label");
1757
1848
  const { onOpen } = useTooltipContext("CopyButton", __scopeTooltip);
1758
1849
  return /* @__PURE__ */ React21.createElement(IconButton, {
1759
1850
  iconOnly: true,
@@ -1779,20 +1870,27 @@ var Clipboard = {
1779
1870
 
1780
1871
  // src/components/Dialog/Dialog.tsx
1781
1872
  import { createContext as createContext5 } from "@radix-ui/react-context";
1782
- import { DialogClose as DialogClosePrimitive, DialogContent as DialogContentPrimitive, DialogDescription as DialogDescriptionPrimitive, DialogOverlay as DialogOverlayPrimitive, DialogPortal as DialogPortalPrimitive, Root as DialogRootPrimitive, DialogTitle as DialogTitlePrimitive, DialogTrigger as DialogTriggerPrimitive } from "@radix-ui/react-dialog";
1783
- import React22, { forwardRef as forwardRef19 } from "react";
1873
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
1874
+ import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
1875
+ import { Slot as Slot13 } from "@radix-ui/react-slot";
1876
+ import React22, { forwardRef as forwardRef14 } from "react";
1784
1877
  import { useTranslation as useTranslation3 } from "react-i18next";
1785
- import { osTranslations as osTranslations2 } from "@dxos/ui-theme";
1878
+ import { composableProps as composableProps8, osTranslations as osTranslations2, slottable as slottable7 } from "@dxos/ui-theme";
1786
1879
  var DialogRoot = (props) => /* @__PURE__ */ React22.createElement(ElevationProvider, {
1787
1880
  elevation: "dialog"
1788
- }, /* @__PURE__ */ React22.createElement(DialogRootPrimitive, props));
1789
- var DialogTrigger = DialogTriggerPrimitive;
1790
- var DialogPortal = DialogPortalPrimitive;
1881
+ }, /* @__PURE__ */ React22.createElement(DialogPrimitive.Root, {
1882
+ // NOTE: Radix warning unless set to undefined.
1883
+ // https://www.radix-ui.com/primitives/docs/components/dialog#description
1884
+ "aria-describedby": void 0,
1885
+ ...props
1886
+ }));
1887
+ var DialogTrigger = DialogPrimitive.Trigger;
1888
+ var DialogPortal = DialogPrimitive.Portal;
1791
1889
  var DIALOG_OVERLAY_NAME = "DialogOverlay";
1792
1890
  var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext5(DIALOG_OVERLAY_NAME, {});
1793
- var DialogOverlay = /* @__PURE__ */ forwardRef19(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
1891
+ var DialogOverlay = /* @__PURE__ */ forwardRef14(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
1794
1892
  const { tx } = useThemeContext();
1795
- return /* @__PURE__ */ React22.createElement(DialogOverlayPrimitive, {
1893
+ return /* @__PURE__ */ React22.createElement(DialogPrimitive.Overlay, {
1796
1894
  ...props,
1797
1895
  "data-block-align": blockAlign,
1798
1896
  className: tx("dialog.overlay", {}, classNames),
@@ -1803,64 +1901,60 @@ var DialogOverlay = /* @__PURE__ */ forwardRef19(({ classNames, children, blockA
1803
1901
  });
1804
1902
  DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
1805
1903
  var DIALOG_CONTENT_NAME = "DialogContent";
1806
- var DialogContent = /* @__PURE__ */ forwardRef19(({ classNames, children, size = "md", inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {
1904
+ var DialogContent = /* @__PURE__ */ forwardRef14(({ classNames, children, size = "md", inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {
1807
1905
  const { tx } = useThemeContext();
1808
1906
  const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
1809
- return /* @__PURE__ */ React22.createElement(DialogContentPrimitive, {
1907
+ return /* @__PURE__ */ React22.createElement(DialogPrimitive.Content, {
1810
1908
  ...props,
1811
1909
  // NOTE: Radix warning unless set to undefined.
1812
1910
  // https://www.radix-ui.com/primitives/docs/components/dialog#description
1813
1911
  "aria-describedby": void 0,
1814
1912
  className: tx("dialog.content", {
1815
- inOverlayLayout: propsInOverlayLayout || inOverlayLayout,
1816
- size
1913
+ size,
1914
+ inOverlayLayout: propsInOverlayLayout || inOverlayLayout
1817
1915
  }, classNames),
1818
1916
  ref: forwardedRef
1819
- }, /* @__PURE__ */ React22.createElement(Column.Root, null, children));
1917
+ }, /* @__PURE__ */ React22.createElement(Column.Root, {
1918
+ classNames: "dx-expander",
1919
+ gutter: "sm"
1920
+ }, children));
1820
1921
  });
1821
1922
  DialogContent.displayName = DIALOG_CONTENT_NAME;
1822
- var DialogHeader = /* @__PURE__ */ forwardRef19(({ classNames, srOnly, ...props }, forwardedRef) => {
1923
+ var DialogHeader = slottable7(({ children, asChild, ...props }, forwardedRef) => {
1924
+ const { className, ...rest } = composableProps8(props);
1925
+ const Comp = asChild ? Slot13 : Primitive13.div;
1823
1926
  const { tx } = useThemeContext();
1824
- return /* @__PURE__ */ React22.createElement(Column.Segment, {
1825
- asChild: true
1826
- }, /* @__PURE__ */ React22.createElement("div", {
1827
- role: "heading",
1828
- ...props,
1829
- className: tx("dialog.header", {
1830
- srOnly
1831
- }, [
1832
- classNames
1833
- ]),
1927
+ return /* @__PURE__ */ React22.createElement(Comp, {
1928
+ ...rest,
1929
+ className: tx("dialog.header", {}, className),
1834
1930
  ref: forwardedRef
1835
- }));
1931
+ }, children);
1836
1932
  });
1837
- var DialogCloseIconButton = /* @__PURE__ */ forwardRef19(({ label, ...props }, forwardedRef) => {
1933
+ var DialogCloseIconButton = /* @__PURE__ */ forwardRef14(({ label, ...props }, forwardedRef) => {
1838
1934
  const { t } = useTranslation3(osTranslations2);
1839
1935
  return /* @__PURE__ */ React22.createElement(IconButton, {
1840
1936
  ...props,
1841
- label: label ?? t("close dialog label"),
1937
+ label: label ?? t("close-dialog.label"),
1842
1938
  icon: "ph--x--regular",
1843
1939
  iconOnly: true,
1844
1940
  size: 4,
1845
- density: "fine",
1846
1941
  variant: "ghost",
1847
1942
  ref: forwardedRef
1848
1943
  });
1849
1944
  });
1850
- var DialogBody = /* @__PURE__ */ forwardRef19(({ children, ...props }, forwardedRef) => {
1945
+ var DialogBody = slottable7(({ children, asChild, ...props }, forwardedRef) => {
1946
+ const { className, ...rest } = composableProps8(props);
1947
+ const Comp = asChild ? Slot13 : Primitive13.div;
1851
1948
  const { tx } = useThemeContext();
1852
- return /* @__PURE__ */ React22.createElement(Column.Segment, {
1853
- asChild: true
1854
- }, /* @__PURE__ */ React22.createElement("div", {
1855
- role: "none",
1856
- ...props,
1857
- className: tx("dialog.body"),
1949
+ return /* @__PURE__ */ React22.createElement(Comp, {
1950
+ ...rest,
1951
+ className: tx("dialog.body", {}, className),
1858
1952
  ref: forwardedRef
1859
- }, children));
1953
+ }, children);
1860
1954
  });
1861
- var DialogTitle = /* @__PURE__ */ forwardRef19(({ classNames, srOnly, ...props }, forwardedRef) => {
1955
+ var DialogTitle = /* @__PURE__ */ forwardRef14(({ classNames, srOnly, ...props }, forwardedRef) => {
1862
1956
  const { tx } = useThemeContext();
1863
- return /* @__PURE__ */ React22.createElement(DialogTitlePrimitive, {
1957
+ return /* @__PURE__ */ React22.createElement(DialogPrimitive.Title, {
1864
1958
  ...props,
1865
1959
  className: tx("dialog.title", {
1866
1960
  srOnly
@@ -1868,9 +1962,9 @@ var DialogTitle = /* @__PURE__ */ forwardRef19(({ classNames, srOnly, ...props }
1868
1962
  ref: forwardedRef
1869
1963
  });
1870
1964
  });
1871
- var DialogDescription = /* @__PURE__ */ forwardRef19(({ classNames, srOnly, ...props }, forwardedRef) => {
1965
+ var DialogDescription = /* @__PURE__ */ forwardRef14(({ classNames, srOnly, ...props }, forwardedRef) => {
1872
1966
  const { tx } = useThemeContext();
1873
- return /* @__PURE__ */ React22.createElement(DialogDescriptionPrimitive, {
1967
+ return /* @__PURE__ */ React22.createElement(DialogPrimitive.Description, {
1874
1968
  ...props,
1875
1969
  className: tx("dialog.description", {
1876
1970
  srOnly
@@ -1878,17 +1972,17 @@ var DialogDescription = /* @__PURE__ */ forwardRef19(({ classNames, srOnly, ...p
1878
1972
  ref: forwardedRef
1879
1973
  });
1880
1974
  });
1881
- var DialogActionBar = /* @__PURE__ */ forwardRef19(({ children, classNames, ...props }, forwardedRef) => {
1975
+ var DialogActionBar = slottable7(({ children, asChild, ...props }, forwardedRef) => {
1976
+ const { className: classNames, ...rest } = composableProps8(props);
1977
+ const Comp = asChild ? Slot13 : Primitive13.div;
1882
1978
  const { tx } = useThemeContext();
1883
- return /* @__PURE__ */ React22.createElement(Column.Segment, {
1884
- asChild: true
1885
- }, /* @__PURE__ */ React22.createElement("div", {
1886
- ...props,
1979
+ return /* @__PURE__ */ React22.createElement(Comp, {
1980
+ ...rest,
1887
1981
  className: tx("dialog.actionbar", {}, classNames),
1888
1982
  ref: forwardedRef
1889
- }, children));
1983
+ }, children);
1890
1984
  });
1891
- var DialogClose = DialogClosePrimitive;
1985
+ var DialogClose = DialogPrimitive.Close;
1892
1986
  var Dialog = {
1893
1987
  Root: DialogRoot,
1894
1988
  Trigger: DialogTrigger,
@@ -1905,109 +1999,86 @@ var Dialog = {
1905
1999
  };
1906
2000
 
1907
2001
  // src/components/Dialog/AlertDialog.tsx
1908
- import { AlertDialogAction as AlertDialogActionPrimitive, AlertDialogCancel as AlertDialogCancelPrimitive, AlertDialogContent as AlertDialogContentPrimitive, AlertDialogDescription as AlertDialogDescriptionPrimitive, AlertDialogOverlay as AlertDialogOverlayPrimitive, AlertDialogPortal as AlertDialogPortalPrimitive, Root as AlertDialogRootPrimitive, AlertDialogTitle as AlertDialogTitlePrimitive, AlertDialogTrigger as AlertDialogTriggerPrimitive } from "@radix-ui/react-alert-dialog";
2002
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
1909
2003
  import { createContext as createContext6 } from "@radix-ui/react-context";
1910
- import React23, { forwardRef as forwardRef20 } from "react";
2004
+ import React23, { forwardRef as forwardRef15 } from "react";
1911
2005
  var AlertDialogRoot = (props) => /* @__PURE__ */ React23.createElement(ElevationProvider, {
1912
2006
  elevation: "dialog"
1913
- }, /* @__PURE__ */ React23.createElement(AlertDialogRootPrimitive, props));
1914
- var AlertDialogTrigger = AlertDialogTriggerPrimitive;
1915
- var AlertDialogPortal = AlertDialogPortalPrimitive;
1916
- var AlertDialogCancel = AlertDialogCancelPrimitive;
1917
- var AlertDialogAction = AlertDialogActionPrimitive;
1918
- var AlertDialogTitle = /* @__PURE__ */ forwardRef20(({ classNames, srOnly, ...props }, forwardedRef) => {
1919
- const { tx } = useThemeContext();
1920
- return /* @__PURE__ */ React23.createElement(AlertDialogTitlePrimitive, {
1921
- ...props,
1922
- className: tx("dialog.title", {
1923
- srOnly
1924
- }, classNames),
1925
- ref: forwardedRef
1926
- });
1927
- });
1928
- var AlertDialogDescription = /* @__PURE__ */ forwardRef20(({ classNames, srOnly, ...props }, forwardedRef) => {
1929
- const { tx } = useThemeContext();
1930
- return /* @__PURE__ */ React23.createElement(AlertDialogDescriptionPrimitive, {
1931
- ...props,
1932
- className: tx("dialog.description", {
1933
- srOnly
1934
- }, classNames),
1935
- ref: forwardedRef
1936
- });
1937
- });
2007
+ }, /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Root, props));
2008
+ var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
2009
+ var AlertDialogPortal = AlertDialogPrimitive.Portal;
2010
+ var AlertDialogCancel = AlertDialogPrimitive.Cancel;
2011
+ var AlertDialogAction = AlertDialogPrimitive.Action;
1938
2012
  var ALERT_DIALOG_OVERLAY_NAME = "AlertDialogOverlay";
1939
2013
  var ALERT_DIALOG_CONTENT_NAME = "AlertDialogContent";
1940
- var ALERT_DIALOG_BODY_NAME = "AlertDialogBody";
1941
- var ALERT_DIALOG_ACTIONBAR_NAME = "AlertDialogActionBar";
1942
2014
  var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext6(ALERT_DIALOG_OVERLAY_NAME, {
1943
2015
  inOverlayLayout: false
1944
2016
  });
1945
- var AlertDialogOverlay = /* @__PURE__ */ forwardRef20(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
2017
+ var AlertDialogOverlay = /* @__PURE__ */ forwardRef15(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
1946
2018
  const { tx } = useThemeContext();
1947
- return /* @__PURE__ */ React23.createElement(AlertDialogOverlayPrimitive, {
2019
+ return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Overlay, {
1948
2020
  ...props,
1949
2021
  "data-block-align": blockAlign,
1950
- className: tx(
1951
- "dialog.overlay",
1952
- {},
1953
- classNames,
1954
- // TODO(burdon): Move to dialog.ts.
1955
- "data-[h-align=start]:justify-center",
1956
- "data-[h-align=start]:items-start",
1957
- "data-[h-align=center]:place-content-center"
1958
- ),
2022
+ className: tx("dialog.overlay", {}, classNames),
1959
2023
  ref: forwardedRef
1960
2024
  }, /* @__PURE__ */ React23.createElement(OverlayLayoutProvider2, {
1961
2025
  inOverlayLayout: true
1962
2026
  }, children));
1963
2027
  });
1964
2028
  AlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;
1965
- var AlertDialogContent = /* @__PURE__ */ forwardRef20(({ classNames, children, size = "md", ...props }, forwardedRef) => {
2029
+ var AlertDialogContent = /* @__PURE__ */ forwardRef15(({ classNames, children, size = "md", ...props }, forwardedRef) => {
1966
2030
  const { tx } = useThemeContext();
1967
2031
  const { inOverlayLayout } = useOverlayLayoutContext2(ALERT_DIALOG_CONTENT_NAME);
1968
- return /* @__PURE__ */ React23.createElement(AlertDialogContentPrimitive, {
2032
+ return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Content, {
1969
2033
  ...props,
1970
2034
  className: tx("dialog.content", {
1971
2035
  inOverlayLayout,
1972
2036
  size
1973
2037
  }, classNames),
2038
+ // NOTE: Radix warning unless set to undefined.
2039
+ // https://www.radix-ui.com/primitives/docs/components/dialog#description
2040
+ "aria-describedby": void 0,
1974
2041
  ref: forwardedRef
1975
- }, /* @__PURE__ */ React23.createElement(Column.Root, null, children));
2042
+ }, /* @__PURE__ */ React23.createElement(Column.Root, {
2043
+ classNames: "dx-expander",
2044
+ gutter: "sm"
2045
+ }, children));
1976
2046
  });
1977
2047
  AlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;
1978
- var AlertDialogBody = /* @__PURE__ */ forwardRef20(({ children, ...props }, forwardedRef) => {
2048
+ var AlertDialogTitle = /* @__PURE__ */ forwardRef15(({ classNames, srOnly, ...props }, forwardedRef) => {
1979
2049
  const { tx } = useThemeContext();
1980
- return /* @__PURE__ */ React23.createElement(Column.Segment, {
1981
- asChild: true
1982
- }, /* @__PURE__ */ React23.createElement("div", {
1983
- role: "none",
2050
+ return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Title, {
1984
2051
  ...props,
1985
- className: tx("dialog.body"),
2052
+ className: tx("dialog.title", {
2053
+ srOnly
2054
+ }, classNames),
1986
2055
  ref: forwardedRef
1987
- }, children));
2056
+ });
1988
2057
  });
1989
- AlertDialogBody.displayName = ALERT_DIALOG_BODY_NAME;
1990
- var AlertDialogActionBar = /* @__PURE__ */ forwardRef20(({ children, classNames, ...props }, forwardedRef) => {
2058
+ var AlertDialogDescription = /* @__PURE__ */ forwardRef15(({ classNames, srOnly, ...props }, forwardedRef) => {
1991
2059
  const { tx } = useThemeContext();
1992
- return /* @__PURE__ */ React23.createElement(Column.Segment, {
1993
- asChild: true
1994
- }, /* @__PURE__ */ React23.createElement("div", {
2060
+ return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Description, {
1995
2061
  ...props,
1996
- className: tx("dialog.actionbar", {}, classNames),
2062
+ className: tx("dialog.description", {
2063
+ srOnly
2064
+ }, classNames),
1997
2065
  ref: forwardedRef
1998
- }, children));
2066
+ });
1999
2067
  });
2000
- AlertDialogActionBar.displayName = ALERT_DIALOG_ACTIONBAR_NAME;
2001
2068
  var AlertDialog = {
2002
2069
  Root: AlertDialogRoot,
2003
2070
  Trigger: AlertDialogTrigger,
2004
2071
  Portal: AlertDialogPortal,
2005
2072
  Overlay: AlertDialogOverlay,
2006
2073
  Content: AlertDialogContent,
2007
- Body: AlertDialogBody,
2074
+ // Shared with Dialog.
2075
+ Header: Dialog.Header,
2076
+ Body: Dialog.Body,
2008
2077
  Title: AlertDialogTitle,
2009
2078
  Description: AlertDialogDescription,
2010
- ActionBar: AlertDialogActionBar,
2079
+ ActionBar: Dialog.ActionBar,
2080
+ CloseIconButton: Dialog.CloseIconButton,
2081
+ // AlertDialog-specific dismissal.
2011
2082
  Cancel: AlertDialogCancel,
2012
2083
  Action: AlertDialogAction
2013
2084
  };
@@ -2016,94 +2087,43 @@ var AlertDialog = {
2016
2087
  import { ErrorBoundary } from "@dxos/react-error-boundary";
2017
2088
 
2018
2089
  // src/components/ErrorFallback/ErrorFallback.tsx
2019
- import React25 from "react";
2020
- import { safeStringify } from "@dxos/util";
2021
-
2022
- // src/components/ErrorFallback/ErrorStack.tsx
2023
- import ErrorStackParser from "error-stack-parser";
2024
2090
  import React24 from "react";
2025
- import { mx as mx8 } from "@dxos/ui-theme";
2026
- var ErrorStack = ({ error }) => {
2027
- const frames = ErrorStackParser.parse(error);
2028
- return /* @__PURE__ */ React24.createElement("div", {
2029
- className: "font-mono text-sm"
2030
- }, frames.map((frame, i) => {
2031
- const isLast = i === frames.length - 1;
2032
- const local = frame.fileName ? parseLocalFrame(frame.fileName, frame.lineNumber, frame.columnNumber) : void 0;
2033
- const name = frame.functionName ?? "<anonymous>";
2034
- return /* @__PURE__ */ React24.createElement("div", {
2035
- key: i,
2036
- className: mx8("grid grid-cols-[16px_1fr_auto_auto] items-stretch gap-x-2", local && "cursor-pointer hover:bg-hover-surface")
2037
- }, /* @__PURE__ */ React24.createElement("div", {
2038
- className: "relative"
2039
- }, /* @__PURE__ */ React24.createElement("div", {
2040
- className: mx8("absolute left-1/2 -translate-x-1/2 w-px bg-neutral-500", isLast ? "top-0 h-1/2" : "inset-y-0")
2041
- }), /* @__PURE__ */ React24.createElement("div", {
2042
- className: "absolute top-1/2 -translate-y-1/2 left-1/2 right-0 h-px bg-neutral-500"
2043
- })), local ? /* @__PURE__ */ React24.createElement("a", {
2044
- href: local.href,
2045
- className: "truncate self-center"
2046
- }, name) : /* @__PURE__ */ React24.createElement("span", {
2047
- className: "text-subdued truncate self-center"
2048
- }, name), /* @__PURE__ */ React24.createElement("span", {
2049
- className: "text-xs text-subdued truncate self-center"
2050
- }, local?.fileName ?? ""), /* @__PURE__ */ React24.createElement("span", {
2051
- className: "text-xs text-subdued text-right self-center"
2052
- }, local ? `${frame.lineNumber}:${frame.columnNumber}` : ""));
2053
- }));
2054
- };
2055
- var parseLocalFrame = (fileUrl, line, col) => {
2056
- try {
2057
- const { pathname } = new URL(fileUrl);
2058
- if (!pathname.startsWith("/@fs/")) {
2059
- return void 0;
2060
- }
2061
- const localPath = pathname.slice(4);
2062
- return {
2063
- href: `vscode://file/${localPath}:${line ?? 1}:${col ?? 1}`,
2064
- fileName: pathname.split("/").pop() ?? localPath
2065
- };
2066
- } catch {
2067
- return void 0;
2068
- }
2069
- };
2070
-
2071
- // src/components/ErrorFallback/ErrorFallback.tsx
2091
+ import { safeStringify } from "@dxos/util";
2072
2092
  var ErrorFallback = ({ children, error, title, data }) => {
2073
2093
  const isDev = process.env.NODE_ENV === "development";
2074
2094
  const message = error instanceof Error ? error.message : String(error);
2075
- return /* @__PURE__ */ React25.createElement("div", {
2095
+ return /* @__PURE__ */ React24.createElement("div", {
2076
2096
  role: "alert",
2077
2097
  "data-testid": "error-boundary-fallback",
2078
2098
  className: "flex flex-col p-4 gap-4 overflow-auto"
2079
- }, /* @__PURE__ */ React25.createElement("h1", {
2099
+ }, /* @__PURE__ */ React24.createElement("h1", {
2080
2100
  className: "text-lg text-info-text"
2081
- }, title ?? "Runtime Error"), /* @__PURE__ */ React25.createElement("p", null, message), isDev && error instanceof Error && /* @__PURE__ */ React25.createElement(Section, {
2101
+ }, title ?? "Runtime Error"), /* @__PURE__ */ React24.createElement("p", null, message), isDev && error instanceof Error && /* @__PURE__ */ React24.createElement(Section, {
2082
2102
  title: "Stack",
2083
2103
  onClick: () => {
2084
2104
  const text = error instanceof Error ? error.stack ?? error.message : String(error);
2085
2105
  void navigator.clipboard.writeText(text);
2086
2106
  }
2087
- }, /* @__PURE__ */ React25.createElement(ErrorStack, {
2107
+ }, /* @__PURE__ */ React24.createElement(ErrorStack, {
2088
2108
  error
2089
- })), data && /* @__PURE__ */ React25.createElement(Section, {
2109
+ })), data && /* @__PURE__ */ React24.createElement(Section, {
2090
2110
  title: "Data",
2091
2111
  onClick: () => {
2092
2112
  void navigator.clipboard.writeText(JSON.stringify(data, void 0, 2));
2093
2113
  }
2094
- }, /* @__PURE__ */ React25.createElement("pre", {
2114
+ }, /* @__PURE__ */ React24.createElement("pre", {
2095
2115
  className: "overflow-x-auto text-xs"
2096
2116
  }, safeStringify(data, void 0, 2))), children);
2097
2117
  };
2098
2118
  var Section = ({ children, title, onClick }) => {
2099
- return /* @__PURE__ */ React25.createElement("div", {
2119
+ return /* @__PURE__ */ React24.createElement("div", {
2100
2120
  className: "flex flex-col gap-1"
2101
- }, onClick && /* @__PURE__ */ React25.createElement("button", {
2121
+ }, onClick && /* @__PURE__ */ React24.createElement("button", {
2102
2122
  type: "button",
2103
2123
  onClick,
2104
2124
  className: "flex items-center gap-1 text-xs text-subdued hover:text-primary-500 transition-colors",
2105
2125
  title: `Copy ${title}`
2106
- }, /* @__PURE__ */ React25.createElement("h2", {
2126
+ }, /* @__PURE__ */ React24.createElement("h2", {
2107
2127
  className: "text-xs uppercase text-subdued"
2108
2128
  }, title)), children);
2109
2129
  };
@@ -2136,13 +2156,122 @@ var generator = ({ error, delay }) => {
2136
2156
  return error?.() ?? new Error(`Error generated after ${delay}ms`);
2137
2157
  };
2138
2158
 
2159
+ // src/components/Focus/Focus.tsx
2160
+ import { useArrowNavigationGroup, useFocusableGroup, useMergedTabsterAttributes_unstable } from "@fluentui/react-tabster";
2161
+ import { useComposedRefs } from "@radix-ui/react-compose-refs";
2162
+ import { Primitive as Primitive14 } from "@radix-ui/react-primitive";
2163
+ import { Slot as Slot14 } from "@radix-ui/react-slot";
2164
+ import React25, { createContext as createContext7, useCallback as useCallback6, useContext as useContext5, useRef as useRef3, useState as useState6 } from "react";
2165
+ import { composableProps as composableProps9, slottable as slottable8 } from "@dxos/ui-theme";
2166
+ var FOCUS_STATE_ATTR = "focus-state";
2167
+ var FocusContext = /* @__PURE__ */ createContext7({});
2168
+ var useFocus = () => useContext5(FocusContext);
2169
+ var Group3 = slottable8(({ children, asChild, orientation = "vertical", border = false, ...props }, forwardedRef) => {
2170
+ const Comp = asChild ? Slot14 : Primitive14.div;
2171
+ const { tx } = useThemeContext();
2172
+ const rootRef = useRef3(null);
2173
+ const focusableGroupAttrs = useFocusableGroup({
2174
+ tabBehavior: "limited-trap-focus"
2175
+ });
2176
+ const arrowNavigationAttrs = useArrowNavigationGroup({
2177
+ axis: orientation,
2178
+ memorizeCurrent: true
2179
+ });
2180
+ const tabsterAttrs = useMergedTabsterAttributes_unstable(focusableGroupAttrs, arrowNavigationAttrs);
2181
+ const [state, setState] = useState6();
2182
+ const [groupHasFocus, setGroupHasFocus] = useState6(false);
2183
+ const handleFocusIn = useCallback6(() => setGroupHasFocus(true), []);
2184
+ const handleFocusOut = useCallback6((event) => {
2185
+ const related = event.relatedTarget;
2186
+ if (!related || !rootRef.current?.contains(related)) {
2187
+ setGroupHasFocus(false);
2188
+ }
2189
+ }, []);
2190
+ const { className, ...rest } = composableProps9(props);
2191
+ return /* @__PURE__ */ React25.createElement(FocusContext.Provider, {
2192
+ value: {
2193
+ setFocus: setState,
2194
+ groupHasFocus
2195
+ }
2196
+ }, /* @__PURE__ */ React25.createElement(Comp, {
2197
+ ...rest,
2198
+ tabIndex: 0,
2199
+ className: tx("focus.group", {
2200
+ border
2201
+ }, className),
2202
+ ...tabsterAttrs,
2203
+ ...state && {
2204
+ [`data-${FOCUS_STATE_ATTR}`]: state
2205
+ },
2206
+ onBlur: handleFocusOut,
2207
+ onFocus: handleFocusIn,
2208
+ ref: useComposedRefs(rootRef, forwardedRef)
2209
+ }, children));
2210
+ });
2211
+ var Item4 = slottable8(({ children, asChild, current, border = false, onCurrentChange, onClick, onFocus, onBlur, ...props }, forwardedRef) => {
2212
+ const Comp = asChild ? Slot14 : Primitive14.div;
2213
+ const { tx } = useThemeContext();
2214
+ const focusableGroupAttrs = useFocusableGroup({
2215
+ ignoreDefaultKeydown: {
2216
+ Enter: true
2217
+ }
2218
+ });
2219
+ const [focused, setFocused] = useState6(false);
2220
+ const handleClick = useCallback6((event) => {
2221
+ onCurrentChange?.();
2222
+ onClick?.(event);
2223
+ }, [
2224
+ onCurrentChange,
2225
+ onClick
2226
+ ]);
2227
+ const handleKeyDown = useCallback6((event) => {
2228
+ if (event.key === "Enter") {
2229
+ onCurrentChange?.();
2230
+ }
2231
+ }, [
2232
+ onCurrentChange
2233
+ ]);
2234
+ const handleFocus = useCallback6((event) => {
2235
+ setFocused(true);
2236
+ onFocus?.(event);
2237
+ }, [
2238
+ onFocus
2239
+ ]);
2240
+ const handleBlur = useCallback6((event) => {
2241
+ setFocused(false);
2242
+ onBlur?.(event);
2243
+ }, [
2244
+ onBlur
2245
+ ]);
2246
+ const isCurrent = current ?? focused;
2247
+ const { className, ...rest } = composableProps9(props);
2248
+ return /* @__PURE__ */ React25.createElement(Comp, {
2249
+ ...rest,
2250
+ tabIndex: 0,
2251
+ className: tx("focus.item", {
2252
+ border
2253
+ }, className),
2254
+ ...focusableGroupAttrs,
2255
+ "aria-current": isCurrent || void 0,
2256
+ onClick: handleClick,
2257
+ onKeyDown: handleKeyDown,
2258
+ onFocus: handleFocus,
2259
+ onBlur: handleBlur,
2260
+ ref: forwardedRef
2261
+ }, children);
2262
+ });
2263
+ var Focus = {
2264
+ Group: Group3,
2265
+ Item: Item4
2266
+ };
2267
+
2139
2268
  // src/components/Input/Input.tsx
2140
- import { Root as CheckboxPrimitive } from "@radix-ui/react-checkbox";
2269
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
2141
2270
  import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
2142
- import React26, { forwardRef as forwardRef21 } from "react";
2271
+ import React26, { forwardRef as forwardRef16 } from "react";
2143
2272
  import { DescriptionAndValidation as DescriptionAndValidationPrimitive, Description as DescriptionPrimitive, INPUT_NAME, InputRoot, Label as LabelPrimitive, PinInput as PinInputPrimitive, TextArea as TextAreaPrimitive, TextInput as TextInputPrimitive, Validation as ValidationPrimitive, useInputContext } from "@dxos/react-input";
2144
- import { mx as mx9 } from "@dxos/ui-theme";
2145
- var Label3 = /* @__PURE__ */ forwardRef21(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2273
+ import { mx as mx8 } from "@dxos/ui-theme";
2274
+ var Label3 = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2146
2275
  const { tx } = useThemeContext();
2147
2276
  return /* @__PURE__ */ React26.createElement(LabelPrimitive, {
2148
2277
  ...props,
@@ -2152,7 +2281,7 @@ var Label3 = /* @__PURE__ */ forwardRef21(({ classNames, children, srOnly, ...pr
2152
2281
  ref: forwardedRef
2153
2282
  }, children);
2154
2283
  });
2155
- var Description = /* @__PURE__ */ forwardRef21(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2284
+ var Description3 = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2156
2285
  const { tx } = useThemeContext();
2157
2286
  return /* @__PURE__ */ React26.createElement(DescriptionPrimitive, {
2158
2287
  ...props,
@@ -2162,7 +2291,7 @@ var Description = /* @__PURE__ */ forwardRef21(({ classNames, children, srOnly,
2162
2291
  ref: forwardedRef
2163
2292
  }, children);
2164
2293
  });
2165
- var Validation = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, children, srOnly, ...props }, forwardedRef) => {
2294
+ var Validation = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, children, srOnly, ...props }, forwardedRef) => {
2166
2295
  const { tx } = useThemeContext();
2167
2296
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
2168
2297
  return /* @__PURE__ */ React26.createElement(ValidationPrimitive, {
@@ -2174,7 +2303,7 @@ var Validation = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, child
2174
2303
  ref: forwardedRef
2175
2304
  }, children);
2176
2305
  });
2177
- var DescriptionAndValidation = /* @__PURE__ */ forwardRef21(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2306
+ var DescriptionAndValidation = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2178
2307
  const { tx } = useThemeContext();
2179
2308
  return /* @__PURE__ */ React26.createElement(DescriptionAndValidationPrimitive, {
2180
2309
  ...props,
@@ -2184,7 +2313,7 @@ var DescriptionAndValidation = /* @__PURE__ */ forwardRef21(({ classNames, child
2184
2313
  ref: forwardedRef
2185
2314
  }, children);
2186
2315
  });
2187
- var PinInput = /* @__PURE__ */ forwardRef21(({ classNames, density: propsDensity, elevation: propsElevation, ...props }, forwardedRef) => {
2316
+ var PinInput = /* @__PURE__ */ forwardRef16(({ classNames, density: propsDensity, elevation: propsElevation, ...props }, forwardedRef) => {
2188
2317
  const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
2189
2318
  const { tx } = useThemeContext();
2190
2319
  const density = useDensityContext(propsDensity);
@@ -2205,11 +2334,11 @@ var PinInput = /* @__PURE__ */ forwardRef21(({ classNames, density: propsDensity
2205
2334
  ref: forwardedRef
2206
2335
  });
2207
2336
  });
2208
- var TextInput = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, noAutoFill, ...props }, forwardedRef) => {
2337
+ var TextInput = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, density: densityProp, elevation: elevationProp, variant, noAutoFill, ...props }, forwardedRef) => {
2209
2338
  const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
2210
2339
  const { tx } = useThemeContext();
2211
- const density = useDensityContext(propsDensity);
2212
- const elevation = useElevationContext(propsElevation);
2340
+ const density = useDensityContext(densityProp);
2341
+ const elevation = useElevationContext(elevationProp);
2213
2342
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
2214
2343
  return /* @__PURE__ */ React26.createElement(TextInputPrimitive, {
2215
2344
  ...props,
@@ -2227,7 +2356,7 @@ var TextInput = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, densit
2227
2356
  ref: forwardedRef
2228
2357
  });
2229
2358
  });
2230
- var TextArea = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
2359
+ var TextArea = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
2231
2360
  const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
2232
2361
  const { tx } = useThemeContext();
2233
2362
  const density = useDensityContext(propsDensity);
@@ -2248,7 +2377,7 @@ var TextArea = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, density
2248
2377
  ref: forwardedRef
2249
2378
  });
2250
2379
  });
2251
- var Checkbox = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, ...props }, forwardedRef) => {
2380
+ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, ...props }, forwardedRef) => {
2252
2381
  const [checked, onCheckedChange] = useControllableState2({
2253
2382
  prop: propsChecked,
2254
2383
  defaultProp: propsDefaultChecked,
@@ -2256,7 +2385,7 @@ var Checkbox = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, checked
2256
2385
  });
2257
2386
  const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
2258
2387
  const { tx } = useThemeContext();
2259
- return /* @__PURE__ */ React26.createElement(CheckboxPrimitive, {
2388
+ return /* @__PURE__ */ React26.createElement(CheckboxPrimitive.Root, {
2260
2389
  ...props,
2261
2390
  checked,
2262
2391
  onCheckedChange,
@@ -2278,7 +2407,7 @@ var Checkbox = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, checked
2278
2407
  })
2279
2408
  }));
2280
2409
  });
2281
- var Switch = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, ...props }, forwardedRef) => {
2410
+ var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, ...props }, forwardedRef) => {
2282
2411
  const [checked, onCheckedChange] = useControllableState2({
2283
2412
  prop: propsChecked,
2284
2413
  defaultProp: propsDefaultChecked ?? false,
@@ -2287,7 +2416,7 @@ var Switch = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, checked:
2287
2416
  const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
2288
2417
  return /* @__PURE__ */ React26.createElement("input", {
2289
2418
  type: "checkbox",
2290
- className: mx9("dx-checkbox--switch dx-focus-ring", classNames),
2419
+ className: mx8("dx-checkbox--switch dx-focus-ring", classNames),
2291
2420
  checked,
2292
2421
  onChange: (event) => {
2293
2422
  onCheckedChange(event.target.checked);
@@ -2310,16 +2439,17 @@ var Input = {
2310
2439
  Checkbox,
2311
2440
  Switch,
2312
2441
  Label: Label3,
2313
- Description,
2442
+ Description: Description3,
2314
2443
  Validation,
2315
2444
  DescriptionAndValidation
2316
2445
  };
2317
2446
 
2318
2447
  // src/components/List/List.tsx
2319
- import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
2320
- import { Slot as Slot12 } from "@radix-ui/react-slot";
2321
- import React28, { forwardRef as forwardRef22 } from "react";
2448
+ import { Primitive as Primitive15 } from "@radix-ui/react-primitive";
2449
+ import { Slot as Slot15 } from "@radix-ui/react-slot";
2450
+ import React28, { forwardRef as forwardRef17 } from "react";
2322
2451
  import { LIST_ITEM_NAME, LIST_NAME, ListItemCollapsibleContent, List as ListPrimitive, ListItem as ListPrimitiveItem, ListItemHeading as ListPrimitiveItemHeading, ListItemOpenTrigger as ListPrimitiveItemOpenTrigger, useListContext, useListItemContext } from "@dxos/react-list";
2452
+ import { composable as composable4, composableProps as composableProps10 } from "@dxos/ui-theme";
2323
2453
 
2324
2454
  // src/components/List/ListDropIndicator.tsx
2325
2455
  import React27 from "react";
@@ -2345,7 +2475,6 @@ var offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;
2345
2475
  var ListDropIndicator = ({ edge, gap = 0, lineInset = 0, terminalInset = lineInset - terminalSize }) => {
2346
2476
  const orientation = edgeToOrientationMap[edge];
2347
2477
  return /* @__PURE__ */ React27.createElement("div", {
2348
- role: "none",
2349
2478
  style: {
2350
2479
  "--line-thickness": `${strokeSize}px`,
2351
2480
  "--line-offset": `calc(-0.5 * (${gap}px + ${strokeSize}px))`,
@@ -2360,19 +2489,20 @@ var ListDropIndicator = ({ edge, gap = 0, lineInset = 0, terminalInset = lineIns
2360
2489
  };
2361
2490
 
2362
2491
  // src/components/List/List.tsx
2363
- var List = /* @__PURE__ */ forwardRef22(({ classNames, children, ...props }, forwardedRef) => {
2492
+ var List = composable4(({ children, ...props }, forwardedRef) => {
2364
2493
  const { tx } = useThemeContext();
2365
2494
  const density = useDensityContext(props.density);
2495
+ const { className, ...rest } = composableProps10(props);
2366
2496
  return /* @__PURE__ */ React28.createElement(DensityProvider, {
2367
2497
  density
2368
2498
  }, /* @__PURE__ */ React28.createElement(ListPrimitive, {
2369
- ...props,
2370
- className: tx("list.root", {}, classNames),
2499
+ ...rest,
2500
+ className: tx("list.root", {}, className),
2371
2501
  ref: forwardedRef
2372
2502
  }, children));
2373
2503
  });
2374
- var ListItemEndcap = /* @__PURE__ */ forwardRef22(({ children, classNames, asChild, ...props }, forwardedRef) => {
2375
- const Comp = asChild ? Slot12 : Primitive12.div;
2504
+ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChild, ...props }, forwardedRef) => {
2505
+ const Comp = asChild ? Slot15 : Primitive15.div;
2376
2506
  const density = useDensityContext();
2377
2507
  const { tx } = useThemeContext();
2378
2508
  return /* @__PURE__ */ React28.createElement(Comp, {
@@ -2390,14 +2520,13 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
2390
2520
  const density = useDensityContext();
2391
2521
  const { tx } = useThemeContext();
2392
2522
  return /* @__PURE__ */ React28.createElement("div", {
2393
- role: "none",
2394
2523
  ...props,
2395
2524
  className: tx("list.item.openTrigger", {
2396
2525
  density
2397
2526
  }, classNames)
2398
2527
  });
2399
2528
  };
2400
- var ListItemHeading = /* @__PURE__ */ forwardRef22(({ children, classNames, ...props }, forwardedRef) => {
2529
+ var ListItemHeading = /* @__PURE__ */ forwardRef17(({ children, classNames, ...props }, forwardedRef) => {
2401
2530
  const { tx } = useThemeContext();
2402
2531
  const density = useDensityContext();
2403
2532
  return /* @__PURE__ */ React28.createElement(ListPrimitiveItemHeading, {
@@ -2406,9 +2535,9 @@ var ListItemHeading = /* @__PURE__ */ forwardRef22(({ children, classNames, ...p
2406
2535
  density
2407
2536
  }, classNames),
2408
2537
  ref: forwardedRef
2409
- }, children);
2538
+ }, /* @__PURE__ */ React28.createElement("span", null, children));
2410
2539
  });
2411
- var ListItemOpenTrigger = /* @__PURE__ */ forwardRef22(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
2540
+ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
2412
2541
  const { tx } = useThemeContext();
2413
2542
  const density = useDensityContext();
2414
2543
  const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
@@ -2424,7 +2553,7 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef22(({ __listItemScope, class
2424
2553
  classNames: tx("list.item.openTriggerIcon", {})
2425
2554
  }));
2426
2555
  });
2427
- var ListItemRoot = /* @__PURE__ */ forwardRef22(({ classNames, children, ...props }, forwardedRef) => {
2556
+ var ListItemRoot = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
2428
2557
  const { tx } = useThemeContext();
2429
2558
  const density = useDensityContext();
2430
2559
  return /* @__PURE__ */ React28.createElement(ListPrimitiveItem, {
@@ -2447,7 +2576,7 @@ var ListItem = {
2447
2576
  };
2448
2577
 
2449
2578
  // src/components/List/Tree.tsx
2450
- import React30, { forwardRef as forwardRef23 } from "react";
2579
+ import React30, { forwardRef as forwardRef18 } from "react";
2451
2580
 
2452
2581
  // src/components/List/TreeDropIndicator.tsx
2453
2582
  import React29 from "react";
@@ -2495,13 +2624,13 @@ var TreeDropIndicator = ({ instruction, gap = 0 }) => {
2495
2624
  };
2496
2625
 
2497
2626
  // src/components/List/Tree.tsx
2498
- var TreeRoot = /* @__PURE__ */ forwardRef23((props, forwardedRef) => {
2627
+ var TreeRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
2499
2628
  return /* @__PURE__ */ React30.createElement(List, {
2500
2629
  ...props,
2501
2630
  ref: forwardedRef
2502
2631
  });
2503
2632
  });
2504
- var TreeBranch = /* @__PURE__ */ forwardRef23(({ __listScope, ...props }, forwardedRef) => {
2633
+ var TreeBranch = /* @__PURE__ */ forwardRef18(({ __listScope, ...props }, forwardedRef) => {
2505
2634
  const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
2506
2635
  return /* @__PURE__ */ React30.createElement(List, {
2507
2636
  ...props,
@@ -2509,7 +2638,7 @@ var TreeBranch = /* @__PURE__ */ forwardRef23(({ __listScope, ...props }, forwar
2509
2638
  ref: forwardedRef
2510
2639
  });
2511
2640
  });
2512
- var TreeItemRoot = /* @__PURE__ */ forwardRef23((props, forwardedRef) => {
2641
+ var TreeItemRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
2513
2642
  return /* @__PURE__ */ React30.createElement(ListItem.Root, {
2514
2643
  role: "treeitem",
2515
2644
  ...props,
@@ -2536,20 +2665,24 @@ var TreeItem = {
2536
2665
  // src/components/List/Treegrid.tsx
2537
2666
  import { useFocusFinders } from "@fluentui/react-tabster";
2538
2667
  import { createContextScope as createContextScope2 } from "@radix-ui/react-context";
2539
- import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
2540
- import { Slot as Slot13 } from "@radix-ui/react-slot";
2668
+ import { Primitive as Primitive16 } from "@radix-ui/react-primitive";
2669
+ import { Slot as Slot16 } from "@radix-ui/react-slot";
2541
2670
  import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
2542
- import React31, { forwardRef as forwardRef24, useCallback as useCallback6 } from "react";
2671
+ import React31, { forwardRef as forwardRef19, useCallback as useCallback7 } from "react";
2672
+ import { composable as composable5, composableProps as composableProps11 } from "@dxos/ui-theme";
2543
2673
  var TREEGRID_ROW_NAME = "TreegridRow";
2544
2674
  var [createTreegridRowContext, createTreegridRowScope] = createContextScope2(TREEGRID_ROW_NAME, []);
2545
2675
  var [TreegridRowProvider, useTreegridRowContext] = createTreegridRowContext(TREEGRID_ROW_NAME);
2546
- var PATH_SEPARATOR = "~";
2547
- var PARENT_OF_SEPARATOR = " ";
2548
- var TreegridRoot = /* @__PURE__ */ forwardRef24(({ asChild, classNames, children, style, gridTemplateColumns, ...props }, forwardedRef) => {
2676
+ var TREEGRID_PATH_SEPARATOR = "~";
2677
+ var TREEGRID_PARENT_OF_SEPARATOR = " ";
2678
+ var TreegridRoot = composable5(({ asChild, classNames, children, style, gridTemplateColumns, onKeyDown: onKeyDownProp, ...props }, forwardedRef) => {
2549
2679
  const { tx } = useThemeContext();
2550
- const Comp = asChild ? Slot13 : Primitive13.div;
2680
+ const { className, role: _role, ...rest } = composableProps11(props, {
2681
+ classNames
2682
+ });
2683
+ const Comp = asChild ? Slot16 : Primitive16.div;
2551
2684
  const { findFirstFocusable } = useFocusFinders();
2552
- const handleKeyDown = useCallback6((event) => {
2685
+ const handleKeyDown = useCallback7((event) => {
2553
2686
  switch (event.key) {
2554
2687
  case "ArrowDown":
2555
2688
  case "ArrowUp": {
@@ -2578,14 +2711,15 @@ var TreegridRoot = /* @__PURE__ */ forwardRef24(({ asChild, classNames, children
2578
2711
  break;
2579
2712
  }
2580
2713
  }
2581
- props.onKeyDown?.(event);
2714
+ onKeyDownProp?.(event);
2582
2715
  }, [
2583
- findFirstFocusable
2716
+ findFirstFocusable,
2717
+ onKeyDownProp
2584
2718
  ]);
2585
2719
  return /* @__PURE__ */ React31.createElement(Comp, {
2586
2720
  role: "treegrid",
2587
- ...props,
2588
- className: tx("treegrid.root", {}, classNames),
2721
+ ...rest,
2722
+ className: tx("treegrid.root", {}, className),
2589
2723
  style: {
2590
2724
  ...style,
2591
2725
  gridTemplateColumns
@@ -2594,10 +2728,10 @@ var TreegridRoot = /* @__PURE__ */ forwardRef24(({ asChild, classNames, children
2594
2728
  ref: forwardedRef
2595
2729
  }, children);
2596
2730
  });
2597
- var TreegridRow = /* @__PURE__ */ forwardRef24(({ __treegridRowScope, asChild, classNames, children, id, parentOf, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, ...props }, forwardedRef) => {
2731
+ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, classNames, children, id, parentOf, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, ...props }, forwardedRef) => {
2598
2732
  const { tx } = useThemeContext();
2599
- const Comp = asChild ? Slot13 : Primitive13.div;
2600
- const pathParts = id.split(PATH_SEPARATOR);
2733
+ const Comp = asChild ? Slot16 : Primitive16.div;
2734
+ const pathParts = id.split(TREEGRID_PATH_SEPARATOR);
2601
2735
  const level = pathParts.length - 1;
2602
2736
  const [open, onOpenChange] = useControllableState3({
2603
2737
  prop: propsOpen,
@@ -2623,7 +2757,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef24(({ __treegridRowScope, asChild, c
2623
2757
  ref: forwardedRef
2624
2758
  }, children));
2625
2759
  });
2626
- var TreegridCell = /* @__PURE__ */ forwardRef24(({ classNames, children, indent, ...props }, forwardedRef) => {
2760
+ var TreegridCell = /* @__PURE__ */ forwardRef19(({ classNames, children, indent, ...props }, forwardedRef) => {
2627
2761
  const { tx } = useThemeContext();
2628
2762
  return /* @__PURE__ */ React31.createElement("div", {
2629
2763
  role: "gridcell",
@@ -2637,28 +2771,24 @@ var TreegridCell = /* @__PURE__ */ forwardRef24(({ classNames, children, indent,
2637
2771
  var Treegrid = {
2638
2772
  Root: TreegridRoot,
2639
2773
  Row: TreegridRow,
2640
- Cell: TreegridCell,
2641
- PARENT_OF_SEPARATOR,
2642
- PATH_SEPARATOR,
2643
- createTreegridRowScope,
2644
- useTreegridRowContext
2774
+ Cell: TreegridCell
2645
2775
  };
2646
2776
 
2647
2777
  // src/components/Main/Main.tsx
2648
- import { useFocusableGroup } from "@fluentui/react-tabster";
2649
- import { createContext as createContext7 } from "@radix-ui/react-context";
2778
+ import { useFocusableGroup as useFocusableGroup2 } from "@fluentui/react-tabster";
2779
+ import { createContext as createContext8 } from "@radix-ui/react-context";
2650
2780
  import { DialogContent as DialogContent2, Root as DialogRoot2, DialogTitle as DialogTitle2 } from "@radix-ui/react-dialog";
2651
- import { Primitive as Primitive14 } from "@radix-ui/react-primitive";
2652
- import { Slot as Slot14 } from "@radix-ui/react-slot";
2781
+ import { Primitive as Primitive17 } from "@radix-ui/react-primitive";
2782
+ import { Slot as Slot17 } from "@radix-ui/react-slot";
2653
2783
  import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
2654
- import React32, { forwardRef as forwardRef25, useCallback as useCallback8, useEffect as useEffect5, useRef as useRef3, useState as useState7 } from "react";
2784
+ import React32, { forwardRef as forwardRef20, useCallback as useCallback9, useEffect as useEffect5, useRef as useRef4, useState as useState8 } from "react";
2655
2785
  import { addEventListener } from "@dxos/async";
2656
2786
  import { log } from "@dxos/log";
2657
2787
  import { useForwardedRef, useMediaQuery } from "@dxos/react-hooks";
2658
2788
  import { osTranslations as osTranslations3 } from "@dxos/ui-theme";
2659
2789
 
2660
2790
  // src/components/Main/useSwipeToDismiss.ts
2661
- import { useCallback as useCallback7, useEffect as useEffect4, useState as useState6 } from "react";
2791
+ import { useCallback as useCallback8, useEffect as useEffect4, useState as useState7 } from "react";
2662
2792
  var useSwipeToDismiss = (ref, {
2663
2793
  onDismiss,
2664
2794
  dismissThreshold = 64,
@@ -2667,22 +2797,22 @@ var useSwipeToDismiss = (ref, {
2667
2797
  /* side = 'inline-start' */
2668
2798
  }) => {
2669
2799
  const $root = ref.current;
2670
- const [motionState, setMotionState] = useState6(0);
2671
- const [gestureStartX, setGestureStartX] = useState6(0);
2672
- const setIdle = useCallback7(() => {
2800
+ const [motionState, setMotionState] = useState7(0);
2801
+ const [gestureStartX, setGestureStartX] = useState7(0);
2802
+ const setIdle = useCallback8(() => {
2673
2803
  setMotionState(0);
2674
2804
  $root?.style.removeProperty("inset-inline-start");
2675
2805
  $root?.style.setProperty("transition-duration", "200ms");
2676
2806
  }, [
2677
2807
  $root
2678
2808
  ]);
2679
- const setFollowing = useCallback7(() => {
2809
+ const setFollowing = useCallback8(() => {
2680
2810
  setMotionState(2);
2681
2811
  $root?.style.setProperty("transition-duration", "0ms");
2682
2812
  }, [
2683
2813
  $root
2684
2814
  ]);
2685
- const handlePointerDown = useCallback7(({ screenX }) => {
2815
+ const handlePointerDown = useCallback8(({ screenX }) => {
2686
2816
  if (motionState === 0) {
2687
2817
  setMotionState(1);
2688
2818
  setGestureStartX(screenX);
@@ -2690,7 +2820,7 @@ var useSwipeToDismiss = (ref, {
2690
2820
  }, [
2691
2821
  motionState
2692
2822
  ]);
2693
- const handlePointerMove = useCallback7(({ screenX }) => {
2823
+ const handlePointerMove = useCallback8(({ screenX }) => {
2694
2824
  if ($root) {
2695
2825
  const delta = Math.min(screenX - gestureStartX, 0);
2696
2826
  switch (motionState) {
@@ -2714,7 +2844,7 @@ var useSwipeToDismiss = (ref, {
2714
2844
  motionState,
2715
2845
  gestureStartX
2716
2846
  ]);
2717
- const handlePointerUp = useCallback7(() => {
2847
+ const handlePointerUp = useCallback8(() => {
2718
2848
  setIdle();
2719
2849
  }, [
2720
2850
  setIdle
@@ -2760,7 +2890,7 @@ var handleOpenAutoFocus = (event) => {
2760
2890
  };
2761
2891
  var landmarkAttr = "data-main-landmark";
2762
2892
  var useLandmarkMover = (propsOnKeyDown, landmark) => {
2763
- const handleKeyDown = useCallback8((event) => {
2893
+ const handleKeyDown = useCallback9((event) => {
2764
2894
  const target = event.target;
2765
2895
  if (event.target === event.currentTarget && event.key === "Tab" && target.hasAttribute(landmarkAttr)) {
2766
2896
  event.preventDefault();
@@ -2774,7 +2904,7 @@ var useLandmarkMover = (propsOnKeyDown, landmark) => {
2774
2904
  }, [
2775
2905
  propsOnKeyDown
2776
2906
  ]);
2777
- const focusableGroupAttrs = useFocusableGroup({
2907
+ const focusableGroupAttrs = useFocusableGroup2({
2778
2908
  tabBehavior: "limited",
2779
2909
  ignoreDefaultKeydown: {
2780
2910
  Tab: true
@@ -2787,25 +2917,15 @@ var useLandmarkMover = (propsOnKeyDown, landmark) => {
2787
2917
  ...focusableGroupAttrs
2788
2918
  };
2789
2919
  };
2790
- var [MainProvider, useMainContext] = createContext7(MAIN_NAME, {
2920
+ var [MainProvider, useMainContext] = createContext8(MAIN_NAME, {
2791
2921
  resizing: false,
2792
2922
  navigationSidebarState: "closed",
2793
2923
  setNavigationSidebarState: (_nextState) => {
2794
- log.warn("Not initialized", void 0, {
2795
- F: __dxlog_file,
2796
- L: 111,
2797
- S: void 0,
2798
- C: (f, a) => f(...a)
2799
- });
2924
+ log.warn("Not initialized", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 67, S: void 0 });
2800
2925
  },
2801
2926
  complementarySidebarState: "closed",
2802
2927
  setComplementarySidebarState: (_nextState) => {
2803
- log.warn("Not initialized", void 0, {
2804
- F: __dxlog_file,
2805
- L: 116,
2806
- S: void 0,
2807
- C: (f, a) => f(...a)
2808
- });
2928
+ log.warn("Not initialized", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 71, S: void 0 });
2809
2929
  }
2810
2930
  });
2811
2931
  var useSidebars = (consumerName) => {
@@ -2813,22 +2933,22 @@ var useSidebars = (consumerName) => {
2813
2933
  return {
2814
2934
  navigationSidebarState,
2815
2935
  setNavigationSidebarState,
2816
- toggleNavigationSidebar: useCallback8(() => setNavigationSidebarState(navigationSidebarState === "expanded" ? "closed" : "expanded"), [
2936
+ toggleNavigationSidebar: useCallback9(() => setNavigationSidebarState(navigationSidebarState === "expanded" ? "closed" : "expanded"), [
2817
2937
  navigationSidebarState,
2818
2938
  setNavigationSidebarState
2819
2939
  ]),
2820
- openNavigationSidebar: useCallback8(() => setNavigationSidebarState("expanded"), []),
2821
- collapseNavigationSidebar: useCallback8(() => setNavigationSidebarState("collapsed"), []),
2822
- closeNavigationSidebar: useCallback8(() => setNavigationSidebarState("closed"), []),
2940
+ openNavigationSidebar: useCallback9(() => setNavigationSidebarState("expanded"), []),
2941
+ collapseNavigationSidebar: useCallback9(() => setNavigationSidebarState("collapsed"), []),
2942
+ closeNavigationSidebar: useCallback9(() => setNavigationSidebarState("closed"), []),
2823
2943
  complementarySidebarState,
2824
2944
  setComplementarySidebarState,
2825
- toggleComplementarySidebar: useCallback8(() => setComplementarySidebarState(complementarySidebarState === "expanded" ? "closed" : "expanded"), [
2945
+ toggleComplementarySidebar: useCallback9(() => setComplementarySidebarState(complementarySidebarState === "expanded" ? "closed" : "expanded"), [
2826
2946
  complementarySidebarState,
2827
2947
  setComplementarySidebarState
2828
2948
  ]),
2829
- openComplementarySidebar: useCallback8(() => setComplementarySidebarState("expanded"), []),
2830
- collapseComplementarySidebar: useCallback8(() => setComplementarySidebarState("collapsed"), []),
2831
- closeComplementarySidebar: useCallback8(() => setComplementarySidebarState("closed"), [])
2949
+ openComplementarySidebar: useCallback9(() => setComplementarySidebarState("expanded"), []),
2950
+ collapseComplementarySidebar: useCallback9(() => setComplementarySidebarState("collapsed"), []),
2951
+ closeComplementarySidebar: useCallback9(() => setComplementarySidebarState("closed"), [])
2832
2952
  };
2833
2953
  };
2834
2954
  var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNavigationSidebarState = "closed", onNavigationSidebarStateChange, complementarySidebarState: propsComplementarySidebarState, defaultComplementarySidebarState = "closed", onComplementarySidebarStateChange, children, ...props }) => {
@@ -2843,8 +2963,8 @@ var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNa
2843
2963
  defaultProp: defaultComplementarySidebarState,
2844
2964
  onChange: onComplementarySidebarStateChange
2845
2965
  });
2846
- const [resizing, setResizing] = useState7(false);
2847
- const resizeInterval = useRef3(null);
2966
+ const [resizing, setResizing] = useState8(false);
2967
+ const resizeInterval = useRef4(null);
2848
2968
  useEffect5(() => addEventListener(window, "resize", () => {
2849
2969
  setResizing(true);
2850
2970
  if (resizeInterval.current) {
@@ -2865,7 +2985,7 @@ var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNa
2865
2985
  }, children);
2866
2986
  };
2867
2987
  MainRoot.displayName = MAIN_ROOT_NAME;
2868
- var MainOverlay = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
2988
+ var MainOverlay = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
2869
2989
  const [isLg] = useMediaQuery("lg");
2870
2990
  const { navigationSidebarState, setNavigationSidebarState, complementarySidebarState, setComplementarySidebarState } = useMainContext(MAIN_OVERLAY_NAME);
2871
2991
  const { tx } = useThemeContext();
@@ -2886,16 +3006,16 @@ var MainOverlay = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwar
2886
3006
  });
2887
3007
  });
2888
3008
  MainOverlay.displayName = MAIN_OVERLAY_NAME;
2889
- var MainSidebar = /* @__PURE__ */ forwardRef25(({ classNames, children, swipeToDismiss, onOpenAutoFocus, state, resizing, onStateChange, side, label, ...props }, forwardedRef) => {
3009
+ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToDismiss, onOpenAutoFocus, state, resizing, onStateChange, side, label, ...props }, forwardedRef) => {
2890
3010
  const [isLg] = useMediaQuery("lg");
2891
3011
  const { tx } = useThemeContext();
2892
3012
  const { t } = useTranslation(osTranslations3);
2893
3013
  const ref = useForwardedRef(forwardedRef);
2894
- const noopRef = useRef3(null);
3014
+ const noopRef = useRef4(null);
2895
3015
  useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
2896
3016
  onDismiss: () => onStateChange?.("closed")
2897
3017
  });
2898
- const handleKeyDown = useCallback8((event) => {
3018
+ const handleKeyDown = useCallback9((event) => {
2899
3019
  const focusGroupParent = event.target.closest("[data-tabster]");
2900
3020
  if (event.key === "Escape" && focusGroupParent) {
2901
3021
  event.preventDefault();
@@ -2906,14 +3026,14 @@ var MainSidebar = /* @__PURE__ */ forwardRef25(({ classNames, children, swipeToD
2906
3026
  }, [
2907
3027
  props.onKeyDown
2908
3028
  ]);
2909
- const Root9 = isLg ? Primitive14.div : DialogContent2;
3029
+ const Root14 = isLg ? Primitive17.div : DialogContent2;
2910
3030
  return /* @__PURE__ */ React32.createElement(DialogRoot2, {
2911
3031
  open: state !== "closed",
2912
3032
  "aria-label": toLocalizedString(label, t),
2913
3033
  modal: false
2914
3034
  }, !isLg && /* @__PURE__ */ React32.createElement(DialogTitle2, {
2915
3035
  className: "sr-only"
2916
- }, toLocalizedString(label, t)), /* @__PURE__ */ React32.createElement(Root9, {
3036
+ }, toLocalizedString(label, t)), /* @__PURE__ */ React32.createElement(Root14, {
2917
3037
  ...!isLg && {
2918
3038
  forceMount: true,
2919
3039
  tabIndex: -1,
@@ -2931,7 +3051,7 @@ var MainSidebar = /* @__PURE__ */ forwardRef25(({ classNames, children, swipeToD
2931
3051
  ref
2932
3052
  }, children));
2933
3053
  });
2934
- var MainNavigationSidebar = /* @__PURE__ */ forwardRef25((props, forwardedRef) => {
3054
+ var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
2935
3055
  const { navigationSidebarState, setNavigationSidebarState, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
2936
3056
  const mover = useLandmarkMover(props.onKeyDown, "0");
2937
3057
  return /* @__PURE__ */ React32.createElement(MainSidebar, {
@@ -2945,7 +3065,7 @@ var MainNavigationSidebar = /* @__PURE__ */ forwardRef25((props, forwardedRef) =
2945
3065
  });
2946
3066
  });
2947
3067
  MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
2948
- var MainComplementarySidebar = /* @__PURE__ */ forwardRef25((props, forwardedRef) => {
3068
+ var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
2949
3069
  const { complementarySidebarState, setComplementarySidebarState, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
2950
3070
  const mover = useLandmarkMover(props.onKeyDown, "2");
2951
3071
  return /* @__PURE__ */ React32.createElement(MainSidebar, {
@@ -2959,17 +3079,17 @@ var MainComplementarySidebar = /* @__PURE__ */ forwardRef25((props, forwardedRef
2959
3079
  });
2960
3080
  });
2961
3081
  MainComplementarySidebar.displayName = COMPLEMENTARY_SIDEBAR_NAME;
2962
- var MainContent = /* @__PURE__ */ forwardRef25(({ asChild, classNames, bounce, handlesFocus, children, role, ...props }, forwardedRef) => {
3082
+ var MainContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, bounce, handlesFocus, children, role, ...props }, forwardedRef) => {
2963
3083
  const { navigationSidebarState, complementarySidebarState } = useMainContext(MAIN_NAME);
2964
3084
  const { tx } = useThemeContext();
2965
- const Comp = asChild ? Slot14 : role ? Primitive14.div : "main";
3085
+ const Comp = asChild ? Slot17 : role ? Primitive17.div : "main";
2966
3086
  const mover = useLandmarkMover(props.onKeyDown, "1");
2967
3087
  return /* @__PURE__ */ React32.createElement(Comp, {
2968
- role,
2969
3088
  ...handlesFocus && {
2970
3089
  ...mover
2971
3090
  },
2972
3091
  ...props,
3092
+ role,
2973
3093
  "data-sidebar-left-state": navigationSidebarState,
2974
3094
  "data-sidebar-right-state": complementarySidebarState,
2975
3095
  "data-handles-focus": handlesFocus,
@@ -2990,11 +3110,13 @@ var Main = {
2990
3110
  };
2991
3111
 
2992
3112
  // src/components/Message/Message.tsx
2993
- import { createContext as createContext8 } from "@radix-ui/react-context";
2994
- import { Primitive as Primitive15 } from "@radix-ui/react-primitive";
2995
- import { Slot as Slot15 } from "@radix-ui/react-slot";
2996
- import React33, { forwardRef as forwardRef26 } from "react";
3113
+ import { createContext as createContext9 } from "@radix-ui/react-context";
3114
+ import { Primitive as Primitive18 } from "@radix-ui/react-primitive";
3115
+ import { Slot as Slot18 } from "@radix-ui/react-slot";
3116
+ import React33, { forwardRef as forwardRef21 } from "react";
3117
+ import { useTranslation as useTranslation4 } from "react-i18next";
2997
3118
  import { useId as useId3 } from "@dxos/react-hooks";
3119
+ import { translationKey as translationKey2 } from "#translations";
2998
3120
  var messageIcons = {
2999
3121
  success: "ph--check-circle--duotone",
3000
3122
  info: "ph--info--duotone",
@@ -3003,13 +3125,13 @@ var messageIcons = {
3003
3125
  neutral: "ph--info--duotone"
3004
3126
  };
3005
3127
  var MESSAGE_NAME = "Message";
3006
- var [MessageProvider, useMessageContext] = createContext8(MESSAGE_NAME);
3007
- var MessageRoot = /* @__PURE__ */ forwardRef26(({ asChild, valence = "neutral", elevation: propsElevation, classNames, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
3128
+ var [MessageProvider, useMessageContext] = createContext9(MESSAGE_NAME);
3129
+ var MessageRoot = /* @__PURE__ */ forwardRef21(({ asChild, valence = "neutral", elevation: propsElevation, classNames, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
3008
3130
  const { tx } = useThemeContext();
3009
3131
  const titleId = useId3("message__title", propsTitleId);
3010
3132
  const descriptionId = useId3("message__description", propsDescriptionId);
3011
3133
  const elevation = useElevationContext(propsElevation);
3012
- const Comp = asChild ? Slot15 : Primitive15.div;
3134
+ const Comp = asChild ? Slot18 : Primitive18.div;
3013
3135
  return /* @__PURE__ */ React33.createElement(MessageProvider, {
3014
3136
  titleId,
3015
3137
  descriptionId,
@@ -3028,32 +3150,37 @@ var MessageRoot = /* @__PURE__ */ forwardRef26(({ asChild, valence = "neutral",
3028
3150
  });
3029
3151
  MessageRoot.displayName = MESSAGE_NAME;
3030
3152
  var MESSAGE_TITLE_NAME = "MessageTitle";
3031
- var MessageTitle = /* @__PURE__ */ forwardRef26(({ asChild, classNames, children, icon: iconProp, ...props }, forwardedRef) => {
3153
+ var MessageTitle = /* @__PURE__ */ forwardRef21(({ classNames, children, icon: iconProp, onClose }, forwardedRef) => {
3154
+ const { t } = useTranslation4(translationKey2);
3032
3155
  const { tx } = useThemeContext();
3033
3156
  const { titleId, valence } = useMessageContext(MESSAGE_TITLE_NAME);
3034
- const Comp = asChild ? Slot15 : Primitive15.h2;
3035
3157
  const icon = iconProp ?? messageIcons[valence];
3036
- return /* @__PURE__ */ React33.createElement(Comp, {
3037
- ...props,
3158
+ return /* @__PURE__ */ React33.createElement("div", {
3038
3159
  className: tx("message.header", {}, classNames),
3039
3160
  id: titleId,
3040
3161
  ref: forwardedRef
3041
- }, !icon && valence === "neutral" ? /* @__PURE__ */ React33.createElement("div", null) : /* @__PURE__ */ React33.createElement(Icon, {
3042
- size: 5,
3043
- icon,
3044
- classNames: tx("message.icon", {
3162
+ }, icon && /* @__PURE__ */ React33.createElement("div", {
3163
+ className: tx("message.icon", {
3045
3164
  valence
3046
3165
  })
3047
- }), /* @__PURE__ */ React33.createElement("span", {
3166
+ }, /* @__PURE__ */ React33.createElement(Icon, {
3167
+ icon
3168
+ })), /* @__PURE__ */ React33.createElement("h2", {
3048
3169
  className: tx("message.title", {}, classNames)
3049
- }, children));
3170
+ }, children), onClose && /* @__PURE__ */ React33.createElement(IconButton, {
3171
+ variant: "ghost",
3172
+ icon: "ph--x--regular",
3173
+ iconOnly: true,
3174
+ label: t("toolbar-close.label"),
3175
+ onClick: onClose
3176
+ }));
3050
3177
  });
3051
3178
  MessageTitle.displayName = MESSAGE_TITLE_NAME;
3052
3179
  var MESSAGE_CONTENT_NAME = "MessageContent";
3053
- var MessageContent = /* @__PURE__ */ forwardRef26(({ asChild, classNames, children, ...props }, forwardedRef) => {
3180
+ var MessageContent = /* @__PURE__ */ forwardRef21(({ asChild, classNames, children, ...props }, forwardedRef) => {
3054
3181
  const { tx } = useThemeContext();
3055
3182
  const { descriptionId } = useMessageContext(MESSAGE_CONTENT_NAME);
3056
- const Comp = asChild ? Slot15 : Primitive15.p;
3183
+ const Comp = asChild ? Slot18 : Primitive18.p;
3057
3184
  return /* @__PURE__ */ React33.createElement(Comp, {
3058
3185
  ...props,
3059
3186
  className: tx("message.content", {}, classNames),
@@ -3071,7 +3198,7 @@ var Callout = Message;
3071
3198
 
3072
3199
  // src/components/Popover/Popover.tsx
3073
3200
  import { composeEventHandlers as composeEventHandlers2 } from "@radix-ui/primitive";
3074
- import { useComposedRefs } from "@radix-ui/react-compose-refs";
3201
+ import { useComposedRefs as useComposedRefs2 } from "@radix-ui/react-compose-refs";
3075
3202
  import { createContextScope as createContextScope3 } from "@radix-ui/react-context";
3076
3203
  import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
3077
3204
  import { useFocusGuards } from "@radix-ui/react-focus-guards";
@@ -3081,11 +3208,11 @@ import * as PopperPrimitive from "@radix-ui/react-popper";
3081
3208
  import { createPopperScope } from "@radix-ui/react-popper";
3082
3209
  import { Portal as PortalPrimitive } from "@radix-ui/react-portal";
3083
3210
  import { Presence } from "@radix-ui/react-presence";
3084
- import { Primitive as Primitive16 } from "@radix-ui/react-primitive";
3085
- import { Slot as Slot16 } from "@radix-ui/react-slot";
3211
+ import { Primitive as Primitive19 } from "@radix-ui/react-primitive";
3212
+ import { Slot as Slot19 } from "@radix-ui/react-slot";
3086
3213
  import { useControllableState as useControllableState5 } from "@radix-ui/react-use-controllable-state";
3087
3214
  import { hideOthers } from "aria-hidden";
3088
- import React34, { forwardRef as forwardRef27, useCallback as useCallback9, useEffect as useEffect6, useMemo as useMemo4, useRef as useRef4, useState as useState8 } from "react";
3215
+ import React34, { forwardRef as forwardRef22, useCallback as useCallback10, useEffect as useEffect6, useMemo as useMemo6, useRef as useRef5, useState as useState9 } from "react";
3089
3216
  import { RemoveScroll } from "react-remove-scroll";
3090
3217
  var POPOVER_NAME = "Popover";
3091
3218
  var [createPopoverContext, createPopoverScope] = createContextScope3(POPOVER_NAME, [
@@ -3096,8 +3223,8 @@ var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);
3096
3223
  var PopoverRoot = (props) => {
3097
3224
  const { __scopePopover, children, open: openProp, defaultOpen, onOpenChange, modal = false } = props;
3098
3225
  const popperScope = usePopperScope(__scopePopover);
3099
- const triggerRef = useRef4(null);
3100
- const [hasCustomAnchor, setHasCustomAnchor] = useState8(false);
3226
+ const triggerRef = useRef5(null);
3227
+ const [hasCustomAnchor, setHasCustomAnchor] = useState9(false);
3101
3228
  const [open = false, setOpen] = useControllableState5({
3102
3229
  prop: openProp,
3103
3230
  defaultProp: defaultOpen,
@@ -3109,18 +3236,18 @@ var PopoverRoot = (props) => {
3109
3236
  triggerRef,
3110
3237
  open,
3111
3238
  onOpenChange: setOpen,
3112
- onOpenToggle: useCallback9(() => setOpen((prevOpen) => !prevOpen), [
3239
+ onOpenToggle: useCallback10(() => setOpen((prevOpen) => !prevOpen), [
3113
3240
  setOpen
3114
3241
  ]),
3115
3242
  hasCustomAnchor,
3116
- onCustomAnchorAdd: useCallback9(() => setHasCustomAnchor(true), []),
3117
- onCustomAnchorRemove: useCallback9(() => setHasCustomAnchor(false), []),
3243
+ onCustomAnchorAdd: useCallback10(() => setHasCustomAnchor(true), []),
3244
+ onCustomAnchorRemove: useCallback10(() => setHasCustomAnchor(false), []),
3118
3245
  modal
3119
3246
  }, children));
3120
3247
  };
3121
3248
  PopoverRoot.displayName = POPOVER_NAME;
3122
3249
  var ANCHOR_NAME = "PopoverAnchor";
3123
- var PopoverAnchor = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3250
+ var PopoverAnchor = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3124
3251
  const { __scopePopover, ...anchorProps } = props;
3125
3252
  const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
3126
3253
  const popperScope = usePopperScope(__scopePopover);
@@ -3140,12 +3267,12 @@ var PopoverAnchor = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3140
3267
  });
3141
3268
  PopoverAnchor.displayName = ANCHOR_NAME;
3142
3269
  var TRIGGER_NAME2 = "PopoverTrigger";
3143
- var PopoverTrigger = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3270
+ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3144
3271
  const { __scopePopover, asChild, ...triggerProps } = props;
3145
3272
  const context = usePopoverContext(TRIGGER_NAME2, __scopePopover);
3146
3273
  const popperScope = usePopperScope(__scopePopover);
3147
- const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
3148
- const Comp = asChild ? Slot16 : Primitive16.button;
3274
+ const composedTriggerRef = useComposedRefs2(forwardedRef, context.triggerRef);
3275
+ const Comp = asChild ? Slot19 : Primitive19.button;
3149
3276
  const trigger = /* @__PURE__ */ React34.createElement(Comp, {
3150
3277
  type: "button",
3151
3278
  "aria-haspopup": "dialog",
@@ -3197,7 +3324,7 @@ var PopoverPortal = (props) => {
3197
3324
  };
3198
3325
  PopoverPortal.displayName = PORTAL_NAME2;
3199
3326
  var CONTENT_NAME2 = "PopoverContent";
3200
- var PopoverContent = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3327
+ var PopoverContent = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3201
3328
  const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
3202
3329
  const { forceMount = portalContext.forceMount, ...contentProps } = props;
3203
3330
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
@@ -3212,11 +3339,11 @@ var PopoverContent = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3212
3339
  }));
3213
3340
  });
3214
3341
  PopoverContent.displayName = CONTENT_NAME2;
3215
- var PopoverContentModal = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3342
+ var PopoverContentModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3216
3343
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
3217
- const contentRef = useRef4(null);
3218
- const composedRefs = useComposedRefs(forwardedRef, contentRef);
3219
- const isRightClickOutsideRef = useRef4(false);
3344
+ const contentRef = useRef5(null);
3345
+ const composedRefs = useComposedRefs2(forwardedRef, contentRef);
3346
+ const isRightClickOutsideRef = useRef5(false);
3220
3347
  useEffect6(() => {
3221
3348
  const content = contentRef.current;
3222
3349
  if (content) {
@@ -3224,7 +3351,7 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef27((props, forwardedRef) =>
3224
3351
  }
3225
3352
  }, []);
3226
3353
  return /* @__PURE__ */ React34.createElement(RemoveScroll, {
3227
- as: Slot16,
3354
+ as: Slot19,
3228
3355
  allowPinchZoom: true
3229
3356
  }, /* @__PURE__ */ React34.createElement(PopoverContentImpl, {
3230
3357
  ...props,
@@ -3253,10 +3380,10 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef27((props, forwardedRef) =>
3253
3380
  })
3254
3381
  }));
3255
3382
  });
3256
- var PopoverContentNonModal = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3383
+ var PopoverContentNonModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3257
3384
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
3258
- const hasInteractedOutsideRef = useRef4(false);
3259
- const hasPointerDownOutsideRef = useRef4(false);
3385
+ const hasInteractedOutsideRef = useRef5(false);
3386
+ const hasPointerDownOutsideRef = useRef5(false);
3260
3387
  return /* @__PURE__ */ React34.createElement(PopoverContentImpl, {
3261
3388
  ...props,
3262
3389
  ref: forwardedRef,
@@ -3292,7 +3419,7 @@ var PopoverContentNonModal = /* @__PURE__ */ forwardRef27((props, forwardedRef)
3292
3419
  }
3293
3420
  });
3294
3421
  });
3295
- var PopoverContentImpl = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3422
+ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3296
3423
  const { __scopePopover, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, collisionPadding = 8, collisionBoundary, classNames, ...contentProps } = props;
3297
3424
  const context = usePopoverContext(CONTENT_NAME2, __scopePopover);
3298
3425
  const popperScope = usePopperScope(__scopePopover);
@@ -3300,7 +3427,7 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3300
3427
  const elevation = useElevationContext();
3301
3428
  const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
3302
3429
  useFocusGuards();
3303
- const computedCollisionBoundary = useMemo4(() => {
3430
+ const computedCollisionBoundary = useMemo6(() => {
3304
3431
  const closestBoundary = context.triggerRef.current?.closest("[data-popover-collision-boundary]");
3305
3432
  return closestBoundary ? Array.isArray(collisionBoundary) ? [
3306
3433
  closestBoundary,
@@ -3356,10 +3483,10 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3356
3483
  })));
3357
3484
  });
3358
3485
  var CLOSE_NAME = "PopoverClose";
3359
- var PopoverClose = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3486
+ var PopoverClose = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3360
3487
  const { __scopePopover, ...closeProps } = props;
3361
3488
  const context = usePopoverContext(CLOSE_NAME, __scopePopover);
3362
- return /* @__PURE__ */ React34.createElement(Primitive16.button, {
3489
+ return /* @__PURE__ */ React34.createElement(Primitive19.button, {
3363
3490
  type: "button",
3364
3491
  ...closeProps,
3365
3492
  ref: forwardedRef,
@@ -3368,7 +3495,7 @@ var PopoverClose = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3368
3495
  });
3369
3496
  PopoverClose.displayName = CLOSE_NAME;
3370
3497
  var ARROW_NAME2 = "PopoverArrow";
3371
- var PopoverArrow = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3498
+ var PopoverArrow = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3372
3499
  const { __scopePopover, classNames, ...arrowProps } = props;
3373
3500
  const popperScope = usePopperScope(__scopePopover);
3374
3501
  const { tx } = useThemeContext();
@@ -3380,9 +3507,9 @@ var PopoverArrow = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3380
3507
  });
3381
3508
  });
3382
3509
  PopoverArrow.displayName = ARROW_NAME2;
3383
- var PopoverViewport = /* @__PURE__ */ forwardRef27(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
3510
+ var PopoverViewport = /* @__PURE__ */ forwardRef22(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
3384
3511
  const { tx } = useThemeContext();
3385
- const Comp = asChild ? Slot16 : Primitive16.div;
3512
+ const Comp = asChild ? Slot19 : Primitive19.div;
3386
3513
  return /* @__PURE__ */ React34.createElement(Comp, {
3387
3514
  ...props,
3388
3515
  className: tx("popover.viewport", {
@@ -3406,8 +3533,8 @@ var Popover = {
3406
3533
  };
3407
3534
 
3408
3535
  // src/components/Status/Status.tsx
3409
- import React35, { forwardRef as forwardRef28 } from "react";
3410
- var Status = /* @__PURE__ */ forwardRef28(({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {
3536
+ import React35, { forwardRef as forwardRef23 } from "react";
3537
+ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {
3411
3538
  const { tx } = useThemeContext();
3412
3539
  return /* @__PURE__ */ React35.createElement("span", {
3413
3540
  role: "status",
@@ -3432,26 +3559,33 @@ var Status = /* @__PURE__ */ forwardRef28(({ classNames, children, progress = 0,
3432
3559
  });
3433
3560
 
3434
3561
  // src/components/ScrollArea/ScrollArea.tsx
3435
- import { createContext as createContext9 } from "@radix-ui/react-context";
3436
- import { Primitive as Primitive17 } from "@radix-ui/react-primitive";
3437
- import { Slot as Slot17 } from "@radix-ui/react-slot";
3438
- import React36, { forwardRef as forwardRef29 } from "react";
3439
- import { composableProps as composableProps8 } from "@dxos/ui-theme";
3562
+ import { createContext as createContext10 } from "@radix-ui/react-context";
3563
+ import { Primitive as Primitive20 } from "@radix-ui/react-primitive";
3564
+ import { Slot as Slot20 } from "@radix-ui/react-slot";
3565
+ import React36, { useMemo as useMemo7 } from "react";
3566
+ import { composableProps as composableProps12, scrollbar, slottable as slottable9 } from "@dxos/ui-theme";
3440
3567
  var SCROLLAREA_NAME = "ScrollArea";
3441
- var [ScrollAreaProvider, useScrollAreaContext] = createContext9(SCROLLAREA_NAME);
3568
+ var [ScrollAreaProvider, useScrollAreaContext] = createContext10(SCROLLAREA_NAME);
3442
3569
  var SCROLLAREA_ROOT_NAME = "ScrollArea.Root";
3443
- var ScrollAreaRoot = /* @__PURE__ */ forwardRef29(({ children, asChild, orientation = "vertical", autoHide = true, margin = false, padding = false, thin = false, snap = false, ...props }, forwardedRef) => {
3444
- const { className, ...rest } = composableProps8(props);
3445
- const Comp = asChild ? Slot17 : Primitive17.div;
3570
+ var ScrollAreaRoot = slottable9(({ children, asChild, orientation = "vertical", autoHide = true, centered = false, padding = false, thin = false, snap = false, ...props }, forwardedRef) => {
3446
3571
  const { tx } = useThemeContext();
3447
- const options = {
3572
+ const { className, ...rest } = composableProps12(props);
3573
+ const Comp = asChild ? Slot20 : Primitive20.div;
3574
+ const options = useMemo7(() => ({
3448
3575
  orientation,
3449
3576
  autoHide,
3450
- margin,
3577
+ centered,
3451
3578
  padding,
3452
3579
  thin,
3453
3580
  snap
3454
- };
3581
+ }), [
3582
+ orientation,
3583
+ autoHide,
3584
+ centered,
3585
+ padding,
3586
+ thin,
3587
+ snap
3588
+ ]);
3455
3589
  return /* @__PURE__ */ React36.createElement(ScrollAreaProvider, options, /* @__PURE__ */ React36.createElement(Comp, {
3456
3590
  ...rest,
3457
3591
  className: tx("scrollArea.root", options, className),
@@ -3460,12 +3594,21 @@ var ScrollAreaRoot = /* @__PURE__ */ forwardRef29(({ children, asChild, orientat
3460
3594
  });
3461
3595
  ScrollAreaRoot.displayName = SCROLLAREA_ROOT_NAME;
3462
3596
  var SCROLLAREA_VIEWPORT_NAME = "ScrollArea.Viewport";
3463
- var ScrollAreaViewport = /* @__PURE__ */ forwardRef29(({ classNames, children, ...props }, forwardedRef) => {
3597
+ var ScrollAreaViewport = slottable9(({ children, asChild, ...props }, forwardedRef) => {
3464
3598
  const { tx } = useThemeContext();
3465
3599
  const options = useScrollAreaContext(SCROLLAREA_VIEWPORT_NAME);
3466
- return /* @__PURE__ */ React36.createElement("div", {
3467
- ...props,
3468
- className: tx("scrollArea.viewport", options, classNames),
3600
+ const density = options.thin ? scrollbar.thin : scrollbar.coarse;
3601
+ const { className, ...rest } = composableProps12(props);
3602
+ const { style, ...restWithoutStyle } = rest;
3603
+ const Comp = asChild ? Slot20 : Primitive20.div;
3604
+ return /* @__PURE__ */ React36.createElement(Comp, {
3605
+ ...restWithoutStyle,
3606
+ style: {
3607
+ "--scroll-width": `${density.size}px`,
3608
+ "--scroll-padding": `${density.padding}px`,
3609
+ ...style
3610
+ },
3611
+ className: tx("scrollArea.viewport", options, className),
3469
3612
  ref: forwardedRef
3470
3613
  }, children);
3471
3614
  });
@@ -3476,161 +3619,202 @@ var ScrollArea = {
3476
3619
  };
3477
3620
 
3478
3621
  // src/components/ScrollContainer/ScrollContainer.tsx
3479
- import { createContext as createContext10 } from "@radix-ui/react-context";
3480
- import React37, { forwardRef as forwardRef30, useCallback as useCallback10, useEffect as useEffect7, useImperativeHandle, useMemo as useMemo5, useRef as useRef5, useState as useState9 } from "react";
3622
+ import { createContext as createContext11 } from "@radix-ui/react-context";
3623
+ import React37, { forwardRef as forwardRef24, useCallback as useCallback11, useEffect as useEffect7, useImperativeHandle, useMemo as useMemo8, useRef as useRef6, useState as useState10 } from "react";
3481
3624
  import { addEventListener as addEventListener2, combine } from "@dxos/async";
3482
3625
  import { invariant } from "@dxos/invariant";
3483
- import { useForwardedRef as useForwardedRef2 } from "@dxos/react-hooks";
3484
- import { mx as mx10 } from "@dxos/ui-theme";
3626
+ import { useMergeRefs } from "@dxos/react-hooks";
3627
+ import { composable as composable6, composableProps as composableProps13, slottable as slottable10 } from "@dxos/ui-theme";
3628
+ import { mx as mx9 } from "@dxos/ui-theme";
3485
3629
  var __dxlog_file2 = "/__w/dxos/dxos/packages/ui/react-ui/src/components/ScrollContainer/ScrollContainer.tsx";
3486
3630
  var isBottom = (el) => {
3487
3631
  return !!(el && el.scrollHeight - el.scrollTop === el.clientHeight);
3488
3632
  };
3489
- var [ScrollContainerProvider, useScrollContainerContext] = createContext10("ScrollContainer");
3490
- var Root6 = /* @__PURE__ */ forwardRef30(({ children, classNames, pin, fade, behavior: behaviorProp = "smooth" }, forwardedRef) => {
3491
- const scrollerRef = useRef5(null);
3492
- const autoScrollRef = useRef5(false);
3493
- const [overflow, setOverflow] = useState9(false);
3494
- const [pinned, setPinned] = useState9(pin);
3495
- const timeoutRef = useRef5(void 0);
3496
- const scrollToBottom = useCallback10((behavior = behaviorProp) => {
3633
+ var [ScrollContainerProvider, useScrollContainerContext] = createContext11("ScrollContainer");
3634
+ var Root10 = /* @__PURE__ */ forwardRef24(({ children, pin, behavior: behaviorProp = "smooth" }, forwardedRef) => {
3635
+ const scrollerRef = useRef6(null);
3636
+ const autoScrollRef = useRef6(false);
3637
+ const [pinned, setPinned] = useState10(pin);
3638
+ const [overflow, setOverflow] = useState10(false);
3639
+ const timeoutRef = useRef6(void 0);
3640
+ const scrollToBottom = useCallback11((behavior = behaviorProp) => {
3497
3641
  if (scrollerRef.current) {
3498
- autoScrollRef.current = true;
3499
- scrollerRef.current.classList.add("scrollbar-none");
3500
- scrollerRef.current.scrollTo({
3501
- top: scrollerRef.current.scrollHeight,
3502
- behavior
3503
- });
3504
- clearTimeout(timeoutRef.current);
3505
3642
  if (behavior !== "instant") {
3643
+ autoScrollRef.current = true;
3644
+ scrollerRef.current.classList.add("scrollbar-none");
3645
+ clearTimeout(timeoutRef.current);
3506
3646
  timeoutRef.current = setTimeout(() => {
3507
3647
  scrollerRef.current?.classList.remove("scrollbar-none");
3508
3648
  autoScrollRef.current = false;
3509
3649
  }, 500);
3510
3650
  }
3651
+ scrollerRef.current.scrollTo({
3652
+ top: scrollerRef.current.scrollHeight,
3653
+ behavior
3654
+ });
3511
3655
  setPinned(true);
3512
3656
  }
3513
- }, []);
3514
- const controller = useMemo5(() => ({
3515
- viewport: scrollerRef.current,
3657
+ }, [
3658
+ behaviorProp
3659
+ ]);
3660
+ const controller = useMemo8(() => ({
3661
+ get viewport() {
3662
+ return scrollerRef.current;
3663
+ },
3516
3664
  scrollToTop: () => {
3517
- invariant(scrollerRef.current, void 0, {
3518
- F: __dxlog_file2,
3519
- L: 95,
3520
- S: void 0,
3521
- A: [
3522
- "scrollerRef.current",
3523
- ""
3524
- ]
3525
- });
3665
+ invariant(scrollerRef.current, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 54, S: void 0, A: ["scrollerRef.current", ""] });
3526
3666
  scrollerRef.current.scrollTo({
3527
3667
  top: 0,
3528
3668
  behavior: "smooth"
3529
3669
  });
3530
3670
  setPinned(false);
3531
3671
  },
3532
- scrollToBottom: () => {
3533
- scrollToBottom("smooth");
3672
+ scrollToBottom: (behavior = "smooth") => {
3673
+ scrollToBottom(behavior);
3534
3674
  }
3535
3675
  }), [
3536
- scrollToBottom,
3537
- scrollerRef.current
3676
+ scrollToBottom
3538
3677
  ]);
3539
3678
  useImperativeHandle(forwardedRef, () => controller, [
3540
3679
  controller
3541
3680
  ]);
3542
- useEffect7(() => {
3543
- if (!scrollerRef.current) {
3544
- return;
3545
- }
3546
- return combine(
3547
- // Check if user scrolls.
3548
- addEventListener2(scrollerRef.current, "wheel", () => {
3549
- setPinned(isBottom(scrollerRef.current));
3550
- }),
3551
- // Check if scrolls.
3552
- addEventListener2(scrollerRef.current, "scroll", () => {
3553
- setOverflow((scrollerRef.current?.scrollTop ?? 0) > 0);
3554
- })
3555
- );
3681
+ const setViewport = useCallback11((el) => {
3682
+ scrollerRef.current = el;
3556
3683
  }, []);
3557
3684
  return /* @__PURE__ */ React37.createElement(ScrollContainerProvider, {
3558
3685
  pinned,
3686
+ overflow,
3559
3687
  controller,
3560
- scrollToBottom
3561
- }, /* @__PURE__ */ React37.createElement("div", {
3562
- className: "relative grid dx-container overflow-hidden"
3563
- }, fade && /* @__PURE__ */ React37.createElement("div", {
3564
- role: "none",
3565
- "data-visible": overflow,
3566
- className: mx10(
3567
- // NOTE: Gradients may not be visible with dark reader extensions.
3568
- "z-10 absolute top-0 inset-x-0 h-24 w-full",
3569
- 'opacity-0 duration-200 transition-opacity data-[visible="true"]:opacity-100',
3570
- "bg-gradient-to-b from-(--surface-bg) to-transparent pointer-events-none"
3571
- )
3572
- }), /* @__PURE__ */ React37.createElement(ScrollArea.Root, {
3573
- classNames: mx10("min-h-0", classNames),
3574
- thin: true
3575
- }, /* @__PURE__ */ React37.createElement(ScrollArea.Viewport, {
3576
- ref: scrollerRef
3577
- }, children))));
3578
- });
3579
- Root6.displayName = "ScrollContainer.Root";
3688
+ setViewport,
3689
+ setPinned,
3690
+ setOverflow
3691
+ }, children);
3692
+ });
3693
+ Root10.displayName = "ScrollContainer.Root";
3694
+ var Content6 = composable6(({ children, thin, padding, centered, ...props }, forwardedRef) => {
3695
+ return /* @__PURE__ */ React37.createElement(ScrollArea.Root, {
3696
+ ...composableProps13(props, {
3697
+ classNames: "relative"
3698
+ }),
3699
+ thin,
3700
+ padding,
3701
+ centered,
3702
+ ref: forwardedRef
3703
+ }, children);
3704
+ });
3705
+ Content6.displayName = "ScrollContainer.Content";
3580
3706
  var VIEWPORT_NAME = "ScrollContainer.Viewport";
3581
- var Viewport = /* @__PURE__ */ forwardRef30(({ classNames, children, ...props }, forwardedRef) => {
3582
- const contentRef = useForwardedRef2(forwardedRef);
3583
- const { pinned, scrollToBottom } = useScrollContainerContext(VIEWPORT_NAME);
3707
+ var Viewport = slottable10(({ children, asChild, ...props }, forwardedRef) => {
3708
+ const scrollerRef = useRef6(null);
3709
+ const mergedRef = useMergeRefs([
3710
+ forwardedRef,
3711
+ scrollerRef
3712
+ ]);
3713
+ const { setViewport, setPinned, setOverflow } = useScrollContainerContext(VIEWPORT_NAME);
3584
3714
  useEffect7(() => {
3585
- if (!pinned || !contentRef.current) {
3715
+ const el = scrollerRef.current;
3716
+ if (!el) {
3586
3717
  return;
3587
3718
  }
3588
- scrollToBottom();
3589
- const resizeObserver = new ResizeObserver(() => scrollToBottom());
3590
- resizeObserver.observe(contentRef.current);
3591
- return () => resizeObserver.disconnect();
3719
+ setViewport(el);
3720
+ return combine(addEventListener2(el, "wheel", () => setPinned(isBottom(el))), addEventListener2(el, "scroll", () => setOverflow((el.scrollTop ?? 0) > 0)), () => setViewport(null));
3592
3721
  }, [
3593
- pinned,
3594
- scrollToBottom
3722
+ setViewport,
3723
+ setPinned,
3724
+ setOverflow
3595
3725
  ]);
3596
- return /* @__PURE__ */ React37.createElement("div", {
3597
- className: mx10("w-full", classNames),
3598
- ...props,
3599
- ref: contentRef
3600
- }, children);
3726
+ return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(ScrollArea.Viewport, {
3727
+ asChild,
3728
+ ...composableProps13(props),
3729
+ ref: mergedRef
3730
+ }, children), /* @__PURE__ */ React37.createElement(PinEffect, {
3731
+ scrollerRef
3732
+ }));
3601
3733
  });
3602
3734
  Viewport.displayName = VIEWPORT_NAME;
3735
+ var PIN_EFFECT_NAME = "ScrollContainer.PinEffect";
3736
+ var PinEffect = ({ scrollerRef }) => {
3737
+ const { pinned, controller } = useScrollContainerContext(PIN_EFFECT_NAME);
3738
+ useEffect7(() => {
3739
+ const viewport = scrollerRef.current;
3740
+ if (!pinned || !viewport) {
3741
+ return;
3742
+ }
3743
+ controller?.scrollToBottom("instant");
3744
+ const resizeObserver = new ResizeObserver(() => controller?.scrollToBottom("smooth"));
3745
+ Array.from(viewport.children).forEach((child) => {
3746
+ resizeObserver.observe(child);
3747
+ });
3748
+ const mutationObserver = new MutationObserver((mutations) => {
3749
+ mutations.forEach((mutation) => {
3750
+ mutation.addedNodes.forEach((node) => {
3751
+ if (node instanceof Element) {
3752
+ resizeObserver.observe(node);
3753
+ }
3754
+ });
3755
+ });
3756
+ controller?.scrollToBottom("smooth");
3757
+ });
3758
+ mutationObserver.observe(viewport, {
3759
+ childList: true
3760
+ });
3761
+ return () => {
3762
+ resizeObserver.disconnect();
3763
+ mutationObserver.disconnect();
3764
+ };
3765
+ }, [
3766
+ pinned,
3767
+ controller,
3768
+ scrollerRef
3769
+ ]);
3770
+ return null;
3771
+ };
3772
+ var FADE_NAME = "ScrollContainer.Fade";
3773
+ var Fade = () => {
3774
+ const { overflow } = useScrollContainerContext(FADE_NAME);
3775
+ return /* @__PURE__ */ React37.createElement("div", {
3776
+ "data-visible": overflow,
3777
+ className: mx9(
3778
+ // NOTE: Gradients may not be visible with dark reader extensions.
3779
+ "z-10 absolute top-0 inset-x-0 h-24 w-full",
3780
+ 'opacity-0 duration-200 transition-opacity data-[visible="true"]:opacity-100',
3781
+ "bg-gradient-to-b from-(--color-base-surface) to-transparent pointer-events-none"
3782
+ )
3783
+ });
3784
+ };
3785
+ Fade.displayName = FADE_NAME;
3603
3786
  var SCROLL_DOWN_BUTTON_NAME = "ScrollContainer.ScrollDownButton";
3604
3787
  var ScrollDownButton = ({ classNames }) => {
3605
- const { pinned, scrollToBottom } = useScrollContainerContext(SCROLL_DOWN_BUTTON_NAME);
3788
+ const { pinned, controller } = useScrollContainerContext(SCROLL_DOWN_BUTTON_NAME);
3606
3789
  return /* @__PURE__ */ React37.createElement("div", {
3607
- role: "none",
3608
- className: mx10("absolute bottom-2 right-4 opacity-100 transition-opacity duration-300", pinned && "opacity-0", classNames)
3790
+ className: mx9("absolute bottom-2 right-4 opacity-100 transition-opacity duration-300", pinned && "opacity-0", classNames)
3609
3791
  }, /* @__PURE__ */ React37.createElement(IconButton, {
3610
3792
  variant: "primary",
3611
3793
  icon: "ph--arrow-down--regular",
3612
3794
  iconOnly: true,
3613
3795
  size: 4,
3614
3796
  label: "Scroll down",
3615
- onClick: () => scrollToBottom()
3797
+ onClick: () => controller?.scrollToBottom()
3616
3798
  }));
3617
3799
  };
3618
3800
  ScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
3619
3801
  var ScrollContainer = {
3620
- Root: Root6,
3802
+ Root: Root10,
3803
+ Content: Content6,
3621
3804
  Viewport,
3805
+ Fade,
3622
3806
  ScrollDownButton
3623
3807
  };
3624
3808
 
3625
3809
  // src/components/Select/Select.tsx
3626
3810
  import * as SelectPrimitive from "@radix-ui/react-select";
3627
- import React38, { forwardRef as forwardRef31 } from "react";
3811
+ import React38, { forwardRef as forwardRef25 } from "react";
3628
3812
  var SelectRoot = SelectPrimitive.Root;
3629
3813
  var SelectTrigger = SelectPrimitive.Trigger;
3630
3814
  var SelectValue = SelectPrimitive.Value;
3631
3815
  var SelectIcon = SelectPrimitive.Icon;
3632
3816
  var SelectPortal = SelectPrimitive.Portal;
3633
- var SelectTriggerButton = /* @__PURE__ */ forwardRef31(({ children, placeholder, ...props }, forwardedRef) => {
3817
+ var SelectTriggerButton = /* @__PURE__ */ forwardRef25(({ children, placeholder, ...props }, forwardedRef) => {
3634
3818
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.Trigger, {
3635
3819
  asChild: true,
3636
3820
  ref: forwardedRef
@@ -3645,7 +3829,7 @@ var SelectTriggerButton = /* @__PURE__ */ forwardRef31(({ children, placeholder,
3645
3829
  icon: "ph--caret-down--bold"
3646
3830
  }))));
3647
3831
  });
3648
- var SelectContent = /* @__PURE__ */ forwardRef31(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
3832
+ var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
3649
3833
  const { tx } = useThemeContext();
3650
3834
  const elevation = useElevationContext();
3651
3835
  const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
@@ -3660,7 +3844,7 @@ var SelectContent = /* @__PURE__ */ forwardRef31(({ classNames, children, collis
3660
3844
  ref: forwardedRef
3661
3845
  }, children);
3662
3846
  });
3663
- var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef31(({ classNames, children, ...props }, forwardedRef) => {
3847
+ var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3664
3848
  const { tx } = useThemeContext();
3665
3849
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.SelectScrollUpButton, {
3666
3850
  ...props,
@@ -3671,7 +3855,7 @@ var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef31(({ classNames, children
3671
3855
  icon: "ph--caret-up--bold"
3672
3856
  }));
3673
3857
  });
3674
- var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef31(({ classNames, children, ...props }, forwardedRef) => {
3858
+ var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3675
3859
  const { tx } = useThemeContext();
3676
3860
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.SelectScrollDownButton, {
3677
3861
  ...props,
@@ -3682,7 +3866,7 @@ var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef31(({ classNames, childr
3682
3866
  icon: "ph--caret-down--bold"
3683
3867
  }));
3684
3868
  });
3685
- var SelectViewport2 = /* @__PURE__ */ forwardRef31(({ classNames, children, ...props }, forwardedRef) => {
3869
+ var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3686
3870
  const { tx } = useThemeContext();
3687
3871
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.SelectViewport, {
3688
3872
  ...props,
@@ -3690,7 +3874,7 @@ var SelectViewport2 = /* @__PURE__ */ forwardRef31(({ classNames, children, ...p
3690
3874
  ref: forwardedRef
3691
3875
  }, children);
3692
3876
  });
3693
- var SelectItem = /* @__PURE__ */ forwardRef31(({ classNames, ...props }, forwardedRef) => {
3877
+ var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
3694
3878
  const { tx } = useThemeContext();
3695
3879
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.Item, {
3696
3880
  ...props,
@@ -3699,7 +3883,7 @@ var SelectItem = /* @__PURE__ */ forwardRef31(({ classNames, ...props }, forward
3699
3883
  });
3700
3884
  });
3701
3885
  var SelectItemText = SelectPrimitive.ItemText;
3702
- var SelectItemIndicator = /* @__PURE__ */ forwardRef31(({ classNames, children, ...props }, forwardedRef) => {
3886
+ var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3703
3887
  const { tx } = useThemeContext();
3704
3888
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.ItemIndicator, {
3705
3889
  ...props,
@@ -3707,7 +3891,7 @@ var SelectItemIndicator = /* @__PURE__ */ forwardRef31(({ classNames, children,
3707
3891
  ref: forwardedRef
3708
3892
  }, children);
3709
3893
  });
3710
- var SelectOption = /* @__PURE__ */ forwardRef31(({ children, classNames, ...props }, forwardedRef) => {
3894
+ var SelectOption = /* @__PURE__ */ forwardRef25(({ children, classNames, ...props }, forwardedRef) => {
3711
3895
  const { tx } = useThemeContext();
3712
3896
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.Item, {
3713
3897
  ...props,
@@ -3721,7 +3905,7 @@ var SelectOption = /* @__PURE__ */ forwardRef31(({ children, classNames, ...prop
3721
3905
  });
3722
3906
  var SelectGroup = SelectPrimitive.Group;
3723
3907
  var SelectLabel = SelectPrimitive.Label;
3724
- var SelectSeparator = /* @__PURE__ */ forwardRef31(({ classNames, ...props }, forwardedRef) => {
3908
+ var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
3725
3909
  const { tx } = useThemeContext();
3726
3910
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.Separator, {
3727
3911
  ...props,
@@ -3729,7 +3913,7 @@ var SelectSeparator = /* @__PURE__ */ forwardRef31(({ classNames, ...props }, fo
3729
3913
  ref: forwardedRef
3730
3914
  });
3731
3915
  });
3732
- var SelectArrow = /* @__PURE__ */ forwardRef31(({ classNames, ...props }, forwardedRef) => {
3916
+ var SelectArrow = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
3733
3917
  const { tx } = useThemeContext();
3734
3918
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.Arrow, {
3735
3919
  ...props,
@@ -3759,8 +3943,8 @@ var Select = {
3759
3943
  };
3760
3944
 
3761
3945
  // src/components/Skeleton/Skeleton.tsx
3762
- import React39, { forwardRef as forwardRef32 } from "react";
3763
- var Skeleton = /* @__PURE__ */ forwardRef32(({ classNames, variant = "default", ...props }, forwardedRef) => {
3946
+ import React39, { forwardRef as forwardRef26 } from "react";
3947
+ var Skeleton = /* @__PURE__ */ forwardRef26(({ classNames, variant = "default", ...props }, forwardedRef) => {
3764
3948
  const { tx } = useThemeContext();
3765
3949
  return /* @__PURE__ */ React39.createElement("div", {
3766
3950
  ...props,
@@ -3773,47 +3957,47 @@ var Skeleton = /* @__PURE__ */ forwardRef32(({ classNames, variant = "default",
3773
3957
 
3774
3958
  // src/components/Splitter/Splitter.tsx
3775
3959
  import { createContextScope as createContextScope4 } from "@radix-ui/react-context";
3776
- import { Primitive as Primitive18 } from "@radix-ui/react-primitive";
3777
- import { Slot as Slot18 } from "@radix-ui/react-slot";
3778
- import React40, { forwardRef as forwardRef33 } from "react";
3779
- import { composableProps as composableProps9 } from "@dxos/ui-theme";
3960
+ import { Primitive as Primitive21 } from "@radix-ui/react-primitive";
3961
+ import { Slot as Slot21 } from "@radix-ui/react-slot";
3962
+ import React40 from "react";
3963
+ import { composableProps as composableProps14, slottable as slottable11 } from "@dxos/ui-theme";
3780
3964
  var SPLITTER_NAME = "Splitter";
3781
3965
  var [createSplitterContext, createSplitterScope] = createContextScope4(SPLITTER_NAME);
3782
3966
  var [SplitterProvider, useSplitterContext] = createSplitterContext(SPLITTER_NAME);
3783
3967
  var ROOT_NAME = "Splitter.Root";
3784
- var Root8 = /* @__PURE__ */ forwardRef33(({ __scopeSplitter, asChild, mode = "upper", ratio = 0.5, transition = 250, children, ...props }, forwardedRef) => {
3785
- const { className, ...rest } = composableProps9(props);
3786
- const Comp = asChild ? Slot18 : Primitive18.div;
3968
+ var Root12 = slottable11(({ asChild, mode = "top", ratio = 0.5, transition = 250, children, ...props }, forwardedRef) => {
3787
3969
  const { tx } = useThemeContext();
3970
+ const { __scopeSplitter, ...rest } = props;
3971
+ const { className, ...restProps } = composableProps14(rest);
3972
+ const Comp = asChild ? Slot21 : Primitive21.div;
3788
3973
  return /* @__PURE__ */ React40.createElement(SplitterProvider, {
3789
3974
  scope: __scopeSplitter,
3790
3975
  mode,
3791
3976
  ratio,
3792
3977
  transition
3793
3978
  }, /* @__PURE__ */ React40.createElement(Comp, {
3794
- role: "none",
3795
- ...rest,
3979
+ ...restProps,
3796
3980
  ref: forwardedRef,
3797
3981
  className: tx("splitter.root", {}, className)
3798
3982
  }, children));
3799
3983
  });
3800
- Root8.displayName = ROOT_NAME;
3984
+ Root12.displayName = ROOT_NAME;
3801
3985
  var PANEL_NAME = "Splitter.Panel";
3802
- var Panel2 = /* @__PURE__ */ forwardRef33(({ __scopeSplitter, asChild, children, position, style, ...props }, forwardedRef) => {
3803
- const { className, ...rest } = composableProps9(props);
3804
- const Comp = asChild ? Slot18 : Primitive18.div;
3805
- const { mode, ratio, transition } = useSplitterContext(PANEL_NAME, __scopeSplitter);
3986
+ var Panel2 = slottable11(({ classNames, asChild, children, position, style, ...props }, forwardedRef) => {
3806
3987
  const { tx } = useThemeContext();
3807
- const isUpper = position === "upper";
3808
- const top = isUpper ? "0%" : mode === "upper" ? "100%" : mode === "lower" ? "0%" : `${ratio * 100}%`;
3809
- const height = isUpper ? mode === "upper" ? "100%" : mode === "lower" ? "0%" : `${ratio * 100}%` : mode === "lower" ? "100%" : mode === "upper" ? "0%" : `${(1 - ratio) * 100}%`;
3988
+ const { __scopeSplitter, ...rest } = props;
3989
+ const Comp = asChild ? Slot21 : Primitive21.div;
3990
+ const { mode, ratio = 0.5, transition } = useSplitterContext(PANEL_NAME, __scopeSplitter);
3991
+ const { className, ...restProps } = composableProps14(rest);
3992
+ const isTopPanel = position === "top";
3993
+ const topOffset = isTopPanel ? "0%" : mode === "top" ? "100%" : mode === "bottom" ? "0%" : `${ratio * 100}%`;
3994
+ const height = isTopPanel ? mode === "top" ? "100%" : mode === "bottom" ? "0%" : `${ratio * 100}%` : mode === "bottom" ? "100%" : mode === "top" ? "0%" : `${(1 - ratio) * 100}%`;
3810
3995
  return /* @__PURE__ */ React40.createElement(Comp, {
3811
- role: "none",
3812
- ...rest,
3996
+ ...restProps,
3813
3997
  ref: forwardedRef,
3814
3998
  className: tx("splitter.panel", {}, className),
3815
3999
  style: {
3816
- top,
4000
+ top: topOffset,
3817
4001
  height,
3818
4002
  transition: `top ${transition}ms, height ${transition}ms ease-out`,
3819
4003
  ...style
@@ -3822,17 +4006,17 @@ var Panel2 = /* @__PURE__ */ forwardRef33(({ __scopeSplitter, asChild, children,
3822
4006
  });
3823
4007
  Panel2.displayName = PANEL_NAME;
3824
4008
  var Splitter = {
3825
- Root: Root8,
4009
+ Root: Root12,
3826
4010
  Panel: Panel2
3827
4011
  };
3828
4012
 
3829
4013
  // src/components/Tag/Tag.tsx
3830
- import { Primitive as Primitive19 } from "@radix-ui/react-primitive";
3831
- import { Slot as Slot19 } from "@radix-ui/react-slot";
3832
- import React41, { forwardRef as forwardRef34 } from "react";
3833
- var Tag = /* @__PURE__ */ forwardRef34(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
4014
+ import { Primitive as Primitive22 } from "@radix-ui/react-primitive";
4015
+ import { Slot as Slot22 } from "@radix-ui/react-slot";
4016
+ import React41, { forwardRef as forwardRef27 } from "react";
4017
+ var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
3834
4018
  const { tx } = useThemeContext();
3835
- const Comp = asChild ? Slot19 : Primitive19.span;
4019
+ const Comp = asChild ? Slot22 : Primitive22.span;
3836
4020
  return /* @__PURE__ */ React41.createElement(Comp, {
3837
4021
  ...props,
3838
4022
  className: tx("tag.root", {
@@ -3844,21 +4028,22 @@ var Tag = /* @__PURE__ */ forwardRef34(({ asChild, palette = "neutral", classNam
3844
4028
  });
3845
4029
 
3846
4030
  // src/components/Toast/Toast.tsx
3847
- import { Primitive as Primitive20 } from "@radix-ui/react-primitive";
3848
- import { Slot as Slot20 } from "@radix-ui/react-slot";
3849
- import { ToastAction as ToastActionPrimitive, ToastClose as ToastClosePrimitive, ToastDescription as ToastDescriptionPrimitive, ToastProvider as ToastProviderPrimitive, Root as ToastRootPrimitive, ToastTitle as ToastTitlePrimitive, ToastViewport as ToastViewportPrimitive } from "@radix-ui/react-toast";
3850
- import React42, { forwardRef as forwardRef35 } from "react";
3851
- var ToastProvider = ToastProviderPrimitive;
3852
- var ToastViewport = /* @__PURE__ */ forwardRef35(({ classNames, ...props }, forwardedRef) => {
4031
+ import { Primitive as Primitive23 } from "@radix-ui/react-primitive";
4032
+ import { Slot as Slot23 } from "@radix-ui/react-slot";
4033
+ import * as ToastPrimitive from "@radix-ui/react-toast";
4034
+ import React42, { forwardRef as forwardRef28 } from "react";
4035
+ var ToastProvider = ToastPrimitive.Provider;
4036
+ var ToastViewport = /* @__PURE__ */ forwardRef28(({ classNames, ...props }, forwardedRef) => {
3853
4037
  const { tx } = useThemeContext();
3854
- return /* @__PURE__ */ React42.createElement(ToastViewportPrimitive, {
4038
+ return /* @__PURE__ */ React42.createElement(ToastPrimitive.Viewport, {
4039
+ ...props,
3855
4040
  className: tx("toast.viewport", {}, classNames),
3856
4041
  ref: forwardedRef
3857
4042
  });
3858
4043
  });
3859
- var ToastRoot = /* @__PURE__ */ forwardRef35(({ classNames, children, ...props }, forwardedRef) => {
4044
+ var ToastRoot = /* @__PURE__ */ forwardRef28(({ classNames, children, ...props }, forwardedRef) => {
3860
4045
  const { tx } = useThemeContext();
3861
- return /* @__PURE__ */ React42.createElement(ToastRootPrimitive, {
4046
+ return /* @__PURE__ */ React42.createElement(ToastPrimitive.Root, {
3862
4047
  ...props,
3863
4048
  className: tx("toast.root", {}, classNames),
3864
4049
  ref: forwardedRef
@@ -3866,44 +4051,44 @@ var ToastRoot = /* @__PURE__ */ forwardRef35(({ classNames, children, ...props }
3866
4051
  elevation: "toast"
3867
4052
  }, children));
3868
4053
  });
3869
- var ToastBody = /* @__PURE__ */ forwardRef35(({ asChild, classNames, ...props }, forwardedRef) => {
4054
+ var ToastBody = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
3870
4055
  const { tx } = useThemeContext();
3871
- const Comp = asChild ? Slot20 : Primitive20.div;
4056
+ const Comp = asChild ? Slot23 : Primitive23.div;
3872
4057
  return /* @__PURE__ */ React42.createElement(Comp, {
3873
4058
  ...props,
3874
4059
  className: tx("toast.body", {}, classNames),
3875
4060
  ref: forwardedRef
3876
4061
  });
3877
4062
  });
3878
- var ToastTitle = /* @__PURE__ */ forwardRef35(({ asChild, classNames, ...props }, forwardedRef) => {
4063
+ var ToastTitle = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
3879
4064
  const { tx } = useThemeContext();
3880
- const Comp = asChild ? Slot20 : ToastTitlePrimitive;
4065
+ const Comp = asChild ? Slot23 : ToastPrimitive.Title;
3881
4066
  return /* @__PURE__ */ React42.createElement(Comp, {
3882
4067
  ...props,
3883
4068
  className: tx("toast.title", {}, classNames),
3884
4069
  ref: forwardedRef
3885
4070
  });
3886
4071
  });
3887
- var ToastDescription = /* @__PURE__ */ forwardRef35(({ asChild, classNames, ...props }, forwardedRef) => {
4072
+ var ToastDescription = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
3888
4073
  const { tx } = useThemeContext();
3889
- const Comp = asChild ? Slot20 : ToastDescriptionPrimitive;
4074
+ const Comp = asChild ? Slot23 : ToastPrimitive.Description;
3890
4075
  return /* @__PURE__ */ React42.createElement(Comp, {
3891
4076
  ...props,
3892
4077
  className: tx("toast.description", {}, classNames),
3893
4078
  ref: forwardedRef
3894
4079
  });
3895
4080
  });
3896
- var ToastActions = /* @__PURE__ */ forwardRef35(({ asChild, classNames, ...props }, forwardedRef) => {
4081
+ var ToastActions = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
3897
4082
  const { tx } = useThemeContext();
3898
- const Comp = asChild ? Slot20 : Primitive20.div;
4083
+ const Comp = asChild ? Slot23 : Primitive23.div;
3899
4084
  return /* @__PURE__ */ React42.createElement(Comp, {
3900
4085
  ...props,
3901
4086
  className: tx("toast.actions", {}, classNames),
3902
4087
  ref: forwardedRef
3903
4088
  });
3904
4089
  });
3905
- var ToastAction = ToastActionPrimitive;
3906
- var ToastClose = ToastClosePrimitive;
4090
+ var ToastAction = ToastPrimitive.Action;
4091
+ var ToastClose = ToastPrimitive.Close;
3907
4092
  var Toast = {
3908
4093
  Provider: ToastProvider,
3909
4094
  Viewport: ToastViewport,
@@ -3938,6 +4123,7 @@ export {
3938
4123
  ErrorFallback,
3939
4124
  ErrorStack,
3940
4125
  Flex,
4126
+ Focus,
3941
4127
  Grid,
3942
4128
  Icon,
3943
4129
  IconButton,
@@ -3959,6 +4145,8 @@ export {
3959
4145
  Skeleton,
3960
4146
  Splitter,
3961
4147
  Status,
4148
+ TREEGRID_PARENT_OF_SEPARATOR,
4149
+ TREEGRID_PATH_SEPARATOR,
3962
4150
  Tag,
3963
4151
  ThemeContext,
3964
4152
  ThemeProvider,
@@ -3968,7 +4156,7 @@ export {
3968
4156
  ToggleGroup,
3969
4157
  ToggleGroupIconItem,
3970
4158
  ToggleGroupItem,
3971
- Toolbar2 as Toolbar,
4159
+ Toolbar,
3972
4160
  Tooltip,
3973
4161
  Trans,
3974
4162
  Tree,
@@ -3982,6 +4170,7 @@ export {
3982
4170
  initialSafeArea,
3983
4171
  isLabel,
3984
4172
  messageIcons,
4173
+ parseCaptureOwnerStack,
3985
4174
  toLocalizedString,
3986
4175
  useAvatarContext,
3987
4176
  useButtonGroupContext,
@@ -3990,6 +4179,7 @@ export {
3990
4179
  useDropdownMenuContext,
3991
4180
  useDropdownMenuMenuScope,
3992
4181
  useElevationContext,
4182
+ useFocus,
3993
4183
  useIconHref,
3994
4184
  useLandmarkMover,
3995
4185
  useListContext,
@@ -3997,6 +4187,7 @@ export {
3997
4187
  useMainContext,
3998
4188
  usePx,
3999
4189
  useSafeArea,
4190
+ useSafeCollisionPadding,
4000
4191
  useScrollContainerContext,
4001
4192
  useSidebars,
4002
4193
  useThemeContext,