@dxos/react-ui 0.8.4-main.c85a9c8dae → 0.8.4-main.d05539e30a

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