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

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 (288) hide show
  1. package/dist/lib/browser/{chunk-2FKSMWNY.mjs → chunk-BDBC6H6V.mjs} +79 -5
  2. package/dist/lib/browser/chunk-BDBC6H6V.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +921 -736
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +30 -18
  7. package/dist/lib/browser/testing/index.mjs.map +3 -3
  8. package/dist/lib/browser/translations.mjs +18 -0
  9. package/dist/lib/browser/translations.mjs.map +7 -0
  10. package/dist/lib/node-esm/{chunk-ZNBLTSHI.mjs → chunk-3JSJK2ZY.mjs} +79 -5
  11. package/dist/lib/node-esm/chunk-3JSJK2ZY.mjs.map +7 -0
  12. package/dist/lib/node-esm/index.mjs +921 -736
  13. package/dist/lib/node-esm/index.mjs.map +4 -4
  14. package/dist/lib/node-esm/meta.json +1 -1
  15. package/dist/lib/node-esm/testing/index.mjs +30 -18
  16. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  17. package/dist/lib/node-esm/translations.mjs +20 -0
  18. package/dist/lib/node-esm/translations.mjs.map +7 -0
  19. package/dist/types/src/components/Avatars/Avatar.d.ts +1 -1
  20. package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
  21. package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
  22. package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
  23. package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  24. package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
  25. package/dist/types/src/components/Button/Button.d.ts +2 -2
  26. package/dist/types/src/components/Button/Button.d.ts.map +1 -1
  27. package/dist/types/src/components/Button/Button.stories.d.ts +1 -1
  28. package/dist/types/src/components/Button/Button.stories.d.ts.map +1 -1
  29. package/dist/types/src/components/Button/IconButton.d.ts +1 -0
  30. package/dist/types/src/components/Button/IconButton.d.ts.map +1 -1
  31. package/dist/types/src/components/Button/IconButton.stories.d.ts +3 -0
  32. package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -1
  33. package/dist/types/src/components/Button/Toggle.d.ts +2 -2
  34. package/dist/types/src/components/Button/Toggle.d.ts.map +1 -1
  35. package/dist/types/src/components/Button/Toggle.stories.d.ts.map +1 -1
  36. package/dist/types/src/components/Button/ToggleGroup.d.ts +6 -6
  37. package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -1
  38. package/dist/types/src/components/Button/ToggleGroup.stories.d.ts +2 -2
  39. package/dist/types/src/components/Button/ToggleGroup.stories.d.ts.map +1 -1
  40. package/dist/types/src/components/Card/Card.d.ts +70 -50
  41. package/dist/types/src/components/Card/Card.d.ts.map +1 -1
  42. package/dist/types/src/components/Card/Card.stories.d.ts +2 -2
  43. package/dist/types/src/components/Card/Card.stories.d.ts.map +1 -1
  44. package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts.map +1 -1
  45. package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
  46. package/dist/types/src/components/Clipboard/index.d.ts +10 -1
  47. package/dist/types/src/components/Clipboard/index.d.ts.map +1 -1
  48. package/dist/types/src/components/DensityProvider/DensityProvider.d.ts.map +1 -1
  49. package/dist/types/src/components/Dialog/AlertDialog.d.ts +42 -31
  50. package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -1
  51. package/dist/types/src/components/Dialog/AlertDialog.stories.d.ts.map +1 -1
  52. package/dist/types/src/components/Dialog/Dialog.d.ts +47 -30
  53. package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
  54. package/dist/types/src/components/Dialog/Dialog.stories.d.ts +3 -2
  55. package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -1
  56. package/dist/types/src/components/ElevationProvider/ElevationProvider.d.ts.map +1 -1
  57. package/dist/types/src/components/ErrorFallback/ErrorFallback.d.ts.map +1 -1
  58. package/dist/types/src/components/ErrorFallback/ErrorFallback.stories.d.ts.map +1 -1
  59. package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts +14 -3
  60. package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts.map +1 -1
  61. package/dist/types/src/components/ErrorFallback/ThrowError.d.ts.map +1 -1
  62. package/dist/types/src/components/Focus/Focus.d.ts +36 -0
  63. package/dist/types/src/components/Focus/Focus.d.ts.map +1 -0
  64. package/dist/types/src/components/Focus/Focus.stories.d.ts +9 -0
  65. package/dist/types/src/components/Focus/Focus.stories.d.ts.map +1 -0
  66. package/dist/types/src/components/Focus/index.d.ts +2 -0
  67. package/dist/types/src/components/Focus/index.d.ts.map +1 -0
  68. package/dist/types/src/components/Icon/Icon.d.ts +3 -0
  69. package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
  70. package/dist/types/src/components/Icon/Icon.stories.d.ts +11 -3
  71. package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -1
  72. package/dist/types/src/components/Image/Image.d.ts +2 -1
  73. package/dist/types/src/components/Image/Image.d.ts.map +1 -1
  74. package/dist/types/src/components/Image/Image.stories.d.ts +3 -2
  75. package/dist/types/src/components/Image/Image.stories.d.ts.map +1 -1
  76. package/dist/types/src/components/Input/Input.d.ts +14 -17
  77. package/dist/types/src/components/Input/Input.d.ts.map +1 -1
  78. package/dist/types/src/components/Input/Input.stories.d.ts +3 -3
  79. package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
  80. package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
  81. package/dist/types/src/components/List/List.d.ts +5 -3
  82. package/dist/types/src/components/List/List.d.ts.map +1 -1
  83. package/dist/types/src/components/List/List.stories.d.ts +3 -1
  84. package/dist/types/src/components/List/List.stories.d.ts.map +1 -1
  85. package/dist/types/src/components/List/ListDropIndicator.d.ts.map +1 -1
  86. package/dist/types/src/components/List/Tree.d.ts +2 -2
  87. package/dist/types/src/components/List/Tree.d.ts.map +1 -1
  88. package/dist/types/src/components/List/Tree.stories.d.ts.map +1 -1
  89. package/dist/types/src/components/List/TreeDropIndicator.d.ts.map +1 -1
  90. package/dist/types/src/components/List/Treegrid.d.ts +5 -9
  91. package/dist/types/src/components/List/Treegrid.d.ts.map +1 -1
  92. package/dist/types/src/components/List/Treegrid.stories.d.ts.map +1 -1
  93. package/dist/types/src/components/Main/Main.d.ts +7 -3
  94. package/dist/types/src/components/Main/Main.d.ts.map +1 -1
  95. package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
  96. package/dist/types/src/components/Main/useSwipeToDismiss.d.ts.map +1 -1
  97. package/dist/types/src/components/Menu/ContextMenu.d.ts.map +1 -1
  98. package/dist/types/src/components/Menu/ContextMenu.stories.d.ts.map +1 -1
  99. package/dist/types/src/components/Menu/DropdownMenu.d.ts +58 -49
  100. package/dist/types/src/components/Menu/DropdownMenu.d.ts.map +1 -1
  101. package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts +14 -1
  102. package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts.map +1 -1
  103. package/dist/types/src/components/Message/Message.d.ts.map +1 -1
  104. package/dist/types/src/components/Message/Message.stories.d.ts +2 -2
  105. package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
  106. package/dist/types/src/components/Popover/Popover.d.ts +38 -22
  107. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  108. package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
  109. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +12 -9
  110. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  111. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +18 -5
  112. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
  113. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +42 -13
  114. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -1
  115. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +5 -6
  116. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -1
  117. package/dist/types/src/components/Select/Select.d.ts.map +1 -1
  118. package/dist/types/src/components/Select/Select.stories.d.ts +2 -2
  119. package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
  120. package/dist/types/src/components/Separator/Separator.d.ts +3 -3
  121. package/dist/types/src/components/Separator/Separator.d.ts.map +1 -1
  122. package/dist/types/src/components/Skeleton/Skeleton.stories.d.ts.map +1 -1
  123. package/dist/types/src/components/Splitter/Splitter.d.ts +19 -17
  124. package/dist/types/src/components/Splitter/Splitter.d.ts.map +1 -1
  125. package/dist/types/src/components/Splitter/Splitter.stories.d.ts.map +1 -1
  126. package/dist/types/src/components/Status/Status.d.ts +3 -4
  127. package/dist/types/src/components/Status/Status.d.ts.map +1 -1
  128. package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
  129. package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
  130. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +1 -1
  131. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  132. package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts +1 -1
  133. package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts.map +1 -1
  134. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +54 -55
  135. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
  136. package/dist/types/src/components/ThemeProvider/index.d.ts +1 -1
  137. package/dist/types/src/components/ThemeProvider/index.d.ts.map +1 -1
  138. package/dist/types/src/components/Toast/Toast.d.ts +16 -16
  139. package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
  140. package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
  141. package/dist/types/src/components/Toolbar/Toolbar.d.ts +11 -19
  142. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  143. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
  144. package/dist/types/src/components/Tooltip/Tooltip.d.ts +10 -10
  145. package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  146. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +2 -2
  147. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  148. package/dist/types/src/components/index.d.ts +1 -0
  149. package/dist/types/src/components/index.d.ts.map +1 -1
  150. package/dist/types/src/exemplars/generics.stories.d.ts +6 -5
  151. package/dist/types/src/exemplars/generics.stories.d.ts.map +1 -1
  152. package/dist/types/src/exemplars/slot.stories.d.ts +1 -0
  153. package/dist/types/src/exemplars/slot.stories.d.ts.map +1 -1
  154. package/dist/types/src/exemplars/tabster.stories.d.ts.map +1 -1
  155. package/dist/types/src/exemplars/virtualizer.stories.d.ts.map +1 -1
  156. package/dist/types/src/hooks/index.d.ts +1 -0
  157. package/dist/types/src/hooks/index.d.ts.map +1 -1
  158. package/dist/types/src/hooks/useDensityContext.d.ts +1 -1
  159. package/dist/types/src/hooks/useDensityContext.d.ts.map +1 -1
  160. package/dist/types/src/hooks/useElevationContext.d.ts.map +1 -1
  161. package/dist/types/src/hooks/useIconHref.d.ts.map +1 -1
  162. package/dist/types/src/hooks/useSafeArea.d.ts.map +1 -1
  163. package/dist/types/src/hooks/useSafeCollisionPadding.d.ts.map +1 -1
  164. package/dist/types/src/hooks/useVisualViewport.d.ts.map +1 -1
  165. package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
  166. package/dist/types/src/playground/Custom.stories.d.ts +1 -1
  167. package/dist/types/src/playground/Custom.stories.d.ts.map +1 -1
  168. package/dist/types/src/playground/Typography.stories.d.ts.map +1 -1
  169. package/dist/types/src/primitives/Column/Column.d.ts +21 -14
  170. package/dist/types/src/primitives/Column/Column.d.ts.map +1 -1
  171. package/dist/types/src/primitives/Column/Column.stories.d.ts +19 -0
  172. package/dist/types/src/primitives/Column/Column.stories.d.ts.map +1 -1
  173. package/dist/types/src/primitives/Container/Container.d.ts +4 -5
  174. package/dist/types/src/primitives/Container/Container.d.ts.map +1 -1
  175. package/dist/types/src/primitives/Container/Container.stories.d.ts.map +1 -1
  176. package/dist/types/src/primitives/Flex/Flex.d.ts +5 -7
  177. package/dist/types/src/primitives/Flex/Flex.d.ts.map +1 -1
  178. package/dist/types/src/primitives/Flex/Flex.stories.d.ts.map +1 -1
  179. package/dist/types/src/primitives/Grid/Grid.d.ts +3 -8
  180. package/dist/types/src/primitives/Grid/Grid.d.ts.map +1 -1
  181. package/dist/types/src/primitives/Grid/Grid.stories.d.ts.map +1 -1
  182. package/dist/types/src/primitives/Panel/Panel.d.ts +24 -15
  183. package/dist/types/src/primitives/Panel/Panel.d.ts.map +1 -1
  184. package/dist/types/src/primitives/Panel/Panel.stories.d.ts.map +1 -1
  185. package/dist/types/src/testing/Loading.d.ts.map +1 -1
  186. package/dist/types/src/testing/decorators/withLayout.d.ts.map +1 -1
  187. package/dist/types/src/testing/decorators/withLayoutVariants.d.ts.map +1 -1
  188. package/dist/types/src/testing/decorators/withTheme.d.ts +1 -1
  189. package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
  190. package/dist/types/src/translations.d.ts +3 -3
  191. package/dist/types/src/translations.d.ts.map +1 -1
  192. package/dist/types/src/util/usePx.d.ts.map +1 -1
  193. package/dist/types/tsconfig.tsbuildinfo +1 -1
  194. package/package.json +28 -25
  195. package/src/components/Avatars/Avatar.stories.tsx +2 -3
  196. package/src/components/Avatars/Avatar.tsx +1 -2
  197. package/src/components/Avatars/AvatarGroup.stories.tsx +0 -1
  198. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +1 -2
  199. package/src/components/Button/Button.stories.tsx +0 -1
  200. package/src/components/Button/Button.tsx +5 -13
  201. package/src/components/Button/IconButton.stories.tsx +6 -4
  202. package/src/components/Button/IconButton.tsx +3 -4
  203. package/src/components/Button/Toggle.stories.tsx +0 -1
  204. package/src/components/Button/Toggle.tsx +4 -4
  205. package/src/components/Button/ToggleGroup.stories.tsx +0 -1
  206. package/src/components/Button/ToggleGroup.tsx +12 -16
  207. package/src/components/Card/Card.stories.tsx +12 -12
  208. package/src/components/Card/Card.tsx +266 -108
  209. package/src/components/Clipboard/CopyButton.tsx +3 -4
  210. package/src/components/Dialog/AlertDialog.stories.tsx +5 -6
  211. package/src/components/Dialog/AlertDialog.tsx +67 -126
  212. package/src/components/Dialog/Dialog.stories.tsx +64 -9
  213. package/src/components/Dialog/Dialog.tsx +84 -88
  214. package/src/components/ErrorFallback/ErrorFallback.stories.tsx +3 -8
  215. package/src/components/ErrorFallback/ErrorStack.tsx +36 -2
  216. package/src/components/Focus/AUDIT.md +43 -0
  217. package/src/components/Focus/Focus.stories.tsx +230 -0
  218. package/src/components/Focus/Focus.tsx +201 -0
  219. package/src/components/Focus/index.ts +5 -0
  220. package/src/components/Icon/Icon.stories.tsx +43 -13
  221. package/src/components/Icon/Icon.tsx +5 -1
  222. package/src/components/Image/Image.stories.tsx +3 -3
  223. package/src/components/Image/Image.tsx +31 -8
  224. package/src/components/Input/Input.stories.tsx +3 -4
  225. package/src/components/Input/Input.tsx +7 -7
  226. package/src/components/Link/Link.stories.tsx +0 -1
  227. package/src/components/List/List.stories.tsx +0 -1
  228. package/src/components/List/List.tsx +6 -5
  229. package/src/components/List/Tree.stories.tsx +1 -2
  230. package/src/components/List/Tree.tsx +0 -1
  231. package/src/components/List/Treegrid.stories.tsx +26 -27
  232. package/src/components/List/Treegrid.tsx +14 -14
  233. package/src/components/Main/Main.stories.tsx +0 -1
  234. package/src/components/Main/Main.tsx +1 -2
  235. package/src/components/Menu/ContextMenu.stories.tsx +0 -1
  236. package/src/components/Menu/DropdownMenu.stories.tsx +0 -1
  237. package/src/components/Menu/DropdownMenu.tsx +48 -42
  238. package/src/components/Message/Message.stories.tsx +6 -7
  239. package/src/components/Message/Message.tsx +1 -5
  240. package/src/components/Popover/Popover.stories.tsx +4 -5
  241. package/src/components/Popover/Popover.tsx +42 -42
  242. package/src/components/ScrollArea/ScrollArea.stories.tsx +93 -30
  243. package/src/components/ScrollArea/ScrollArea.tsx +39 -23
  244. package/src/components/ScrollContainer/ScrollContainer.stories.tsx +20 -18
  245. package/src/components/ScrollContainer/ScrollContainer.tsx +200 -91
  246. package/src/components/Select/Select.stories.tsx +5 -6
  247. package/src/components/Separator/Separator.tsx +4 -7
  248. package/src/components/Skeleton/Skeleton.stories.tsx +0 -1
  249. package/src/components/Splitter/Splitter.stories.tsx +29 -29
  250. package/src/components/Splitter/Splitter.tsx +35 -34
  251. package/src/components/Status/Status.stories.tsx +0 -1
  252. package/src/components/Status/Status.tsx +8 -5
  253. package/src/components/Tag/Tag.stories.tsx +0 -1
  254. package/src/components/ThemeProvider/ThemeProvider.stories.tsx +0 -1
  255. package/src/components/ThemeProvider/ThemeProvider.tsx +5 -4
  256. package/src/components/ThemeProvider/index.ts +1 -1
  257. package/src/components/Toast/Toast.stories.tsx +0 -1
  258. package/src/components/Toast/Toast.tsx +16 -31
  259. package/src/components/Toolbar/Toolbar.stories.tsx +0 -1
  260. package/src/components/Toolbar/Toolbar.tsx +21 -35
  261. package/src/components/Tooltip/Tooltip.stories.tsx +6 -7
  262. package/src/components/Tooltip/Tooltip.tsx +15 -16
  263. package/src/components/index.ts +1 -0
  264. package/src/exemplars/generics.stories.tsx +7 -15
  265. package/src/exemplars/slot.stories.tsx +67 -57
  266. package/src/exemplars/tabster.stories.tsx +1 -1
  267. package/src/exemplars/virtualizer.stories.tsx +4 -4
  268. package/src/hooks/index.ts +1 -0
  269. package/src/hooks/useDensityContext.ts +2 -2
  270. package/src/playground/Custom.stories.tsx +6 -9
  271. package/src/primitives/Column/AUDIT.md +148 -0
  272. package/src/primitives/Column/Column.stories.tsx +122 -19
  273. package/src/primitives/Column/Column.tsx +73 -42
  274. package/src/primitives/Container/Container.stories.tsx +0 -1
  275. package/src/primitives/Container/Container.tsx +5 -8
  276. package/src/primitives/Flex/Flex.stories.tsx +0 -1
  277. package/src/primitives/Flex/Flex.tsx +10 -12
  278. package/src/primitives/Grid/Grid.stories.tsx +0 -1
  279. package/src/primitives/Grid/Grid.tsx +4 -9
  280. package/src/primitives/Panel/Panel.stories.tsx +9 -8
  281. package/src/primitives/Panel/Panel.tsx +64 -63
  282. package/src/testing/Loading.tsx +25 -4
  283. package/src/testing/decorators/withLayout.tsx +6 -6
  284. package/src/testing/decorators/withTheme.tsx +10 -7
  285. package/src/translations.ts +3 -3
  286. package/src/util/usePx.ts +1 -0
  287. package/dist/lib/browser/chunk-2FKSMWNY.mjs.map +0 -7
  288. package/dist/lib/node-esm/chunk-ZNBLTSHI.mjs.map +0 -7
@@ -4,9 +4,9 @@
4
4
 
5
5
  import { Primitive } from '@radix-ui/react-primitive';
6
6
  import { Slot } from '@radix-ui/react-slot';
7
- import React, { type CSSProperties, forwardRef } from 'react';
7
+ import React, { type CSSProperties } from 'react';
8
8
 
9
- import { composableProps } from '@dxos/ui-theme';
9
+ import { composableProps, slottable } from '@dxos/ui-theme';
10
10
  import { type SlottableProps } from '@dxos/ui-types';
11
11
 
12
12
  import { useThemeContext } from '../../hooks';
@@ -17,29 +17,35 @@ import { useThemeContext } from '../../hooks';
17
17
 
18
18
  const COLUMN_ROOT_NAME = 'Column.Root';
19
19
 
20
- type GutterSize = 'sm' | 'md' | 'lg' | 'rail';
20
+ type GutterSize = 'xs' | 'sm' | 'md' | 'lg';
21
21
 
22
22
  const gutterSizes: Record<GutterSize, string> = {
23
+ xs: 'var(--dx-gutter-xs)',
23
24
  sm: 'var(--dx-gutter-sm)',
24
25
  md: 'var(--dx-gutter-md)',
25
26
  lg: 'var(--dx-gutter-lg)',
26
- rail: 'var(--dx-rail-item)',
27
27
  };
28
28
 
29
- type ColumnRootProps = SlottableProps<HTMLDivElement, { gutter?: GutterSize }>;
29
+ type ColumnRootProps = { gutter?: GutterSize };
30
30
 
31
31
  /**
32
- * Creates a vertical channel with left/right gutter columns.
33
- * The `--gutter` CSS variable is set for nested components (Dialog, ScrollArea, Form.Viewport, etc.).
34
- * Use `gutter='rail'` for icon-slot row layouts (Card); `gutter='md'` for whitespace layouts (Dialog).
35
- * Direct children must use Column.Row (spans all 3 cols) or Column.Segment (center col only).
32
+ * Creates a 3-column CSS grid with left/right gutter columns and a center content column.
33
+ * Sets `--gutter` and `--dx-col` CSS variables for nested components.
36
34
  *
37
- * NOTE: The theme applies a `dx-column` marker class to this element.
38
- * ScrollArea.Root detects this via `[.dx-column_&]:col-span-full` to span all 3 grid columns,
39
- * ensuring scroll content extends under the gutters rather than being confined to the center column.
40
- * The `--gutter` CSS variable is also consumed by ScrollArea's `margin` option to align scrollbar spacing.
35
+ * `--dx-col` defaults to `2 / span 1` (center column),
36
+ * enabling `withColumn` utilities to cascade the correct grid placement to slotted children.
37
+ *
38
+ * Direct children participate in the grid in one of several ways:
39
+ * - **Column.Center** — places element in the center column (col 2). Preferred for plain content.
40
+ * - **Column.Bleed** — spans all 3 columns gutter-to-gutter. Preferred for `ScrollArea` and
41
+ * other content that should ignore the gutters.
42
+ * - **Column.Row** — 3-col subgrid row (icons in gutters, content in center).
43
+ *
44
+ * Use `withColumn.center()` / `withColumn.bleed()` helpers to apply placement on slotted elements.
45
+ *
46
+ * Gutter sizes: `'sm'` for compact layouts (Dialog); `'md'` (default); `'lg'` for wider spacing.
41
47
  */
42
- const Root = forwardRef<HTMLDivElement, ColumnRootProps>(
48
+ const ColumnRoot = slottable<HTMLDivElement, ColumnRootProps>(
43
49
  ({ children, asChild, role, gutter = 'md', ...props }, forwardedRef) => {
44
50
  const { className, ...rest } = composableProps(props);
45
51
  const Comp = asChild ? Slot : Primitive.div;
@@ -52,6 +58,7 @@ const Root = forwardRef<HTMLDivElement, ColumnRootProps>(
52
58
  style={
53
59
  {
54
60
  '--gutter': gutterSize,
61
+ '--dx-col': '2 / span 1',
55
62
  gridTemplateColumns: [gutterSize, 'minmax(0,1fr)', gutterSize].join(' '),
56
63
  } as CSSProperties
57
64
  }
@@ -64,7 +71,7 @@ const Root = forwardRef<HTMLDivElement, ColumnRootProps>(
64
71
  },
65
72
  );
66
73
 
67
- Root.displayName = COLUMN_ROOT_NAME;
74
+ ColumnRoot.displayName = COLUMN_ROOT_NAME;
68
75
 
69
76
  //
70
77
  // Row
@@ -72,14 +79,14 @@ Root.displayName = COLUMN_ROOT_NAME;
72
79
 
73
80
  const COLUMN_ROW_NAME = 'Column.Row';
74
81
 
75
- type ColumnRowProps = SlottableProps<HTMLDivElement>;
82
+ type ColumnRowProps = {};
76
83
 
77
84
  /**
78
85
  * Spans all 3 columns of the parent Column.Root and uses CSS subgrid to inherit their sizing.
79
86
  * Children map to: [col-1: icon/slot] [col-2: content] [col-3: icon/action].
80
87
  * Must be a direct child of Column.Root.
81
88
  */
82
- const Row = forwardRef<HTMLDivElement, ColumnRowProps>(({ children, asChild, role, ...props }, forwardedRef) => {
89
+ const ColumnRow = slottable<HTMLDivElement, ColumnRowProps>(({ children, asChild, role, ...props }, forwardedRef) => {
83
90
  const { className, ...rest } = composableProps(props);
84
91
  const Comp = asChild ? Slot : Primitive.div;
85
92
  const { tx } = useThemeContext();
@@ -90,45 +97,69 @@ const Row = forwardRef<HTMLDivElement, ColumnRowProps>(({ children, asChild, rol
90
97
  );
91
98
  });
92
99
 
93
- Row.displayName = COLUMN_ROW_NAME;
100
+ ColumnRow.displayName = COLUMN_ROW_NAME;
94
101
 
95
102
  //
96
- // Segment
103
+ // Bleed
97
104
  //
98
105
 
99
- const COLUMN_SEGMENT_NAME = 'Column.Segment';
106
+ const COLUMN_BLEED_NAME = 'Column.Bleed';
100
107
 
101
- type ColumnSegmentProps = SlottableProps<HTMLDivElement>;
108
+ type ColumnBleedProps = SlottableProps;
102
109
 
103
110
  /**
104
- * Occupies only the center column (col-2) of the parent Column.Root grid.
105
- * Use `asChild` to merge grid positioning onto the child element, eliminating the wrapper div.
106
- * NOTE: Must not use overflow-hidden here since it will clip input focus rings.
111
+ * Spans all 3 columns of the parent Column.Root (gutter-to-gutter).
112
+ * Establishes a CSS subgrid so that grandchildren can participate in the parent column tracks.
113
+ * Use for `ScrollArea`, full-width dividers, tables, or any content that should ignore the gutters.
107
114
  */
108
- const Segment = forwardRef<HTMLDivElement, ColumnSegmentProps>(
109
- ({ children, asChild, role, ...props }, forwardedRef) => {
110
- const { className, ...rest } = composableProps(props);
111
- const Comp = asChild ? Slot : Primitive.div;
112
- const { tx } = useThemeContext();
113
- // With asChild, merge col-start-2 directly onto the child — no contents wrapper needed.
114
- return (
115
- <Comp {...rest} role={role ?? 'none'} className={tx('column.segment', {}, className)} ref={forwardedRef}>
116
- {asChild ? children : <div className='contents'>{children}</div>}
117
- </Comp>
118
- );
119
- },
120
- );
115
+ const ColumnBleed = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {
116
+ const { tx } = useThemeContext();
117
+ const { className, ...rest } = composableProps(props);
118
+ const Comp = asChild ? Slot : Primitive.div;
119
+ return (
120
+ <Comp {...rest} className={tx('column.bleed', {}, className)} ref={forwardedRef}>
121
+ {children}
122
+ </Comp>
123
+ );
124
+ });
125
+
126
+ ColumnBleed.displayName = COLUMN_BLEED_NAME;
127
+
128
+ //
129
+ // Center
130
+ //
131
+
132
+ const COLUMN_CENTER_NAME = 'Column.Center';
133
+
134
+ type ColumnCenterProps = SlottableProps;
135
+
136
+ /**
137
+ * Places its element in column 2 (the center track between gutters) of the parent Column.Root.
138
+ * Does NOT use subgrid — placement is explicit on this element only, so it is safe to nest
139
+ * arbitrary compound components (including ones that render `display: contents` wrappers).
140
+ */
141
+ const ColumnCenter = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {
142
+ const { tx } = useThemeContext();
143
+ const { className, ...rest } = composableProps(props);
144
+ const Comp = asChild ? Slot : Primitive.div;
145
+ return (
146
+ <Comp {...rest} className={tx('column.center', {}, className)} ref={forwardedRef}>
147
+ {children}
148
+ </Comp>
149
+ );
150
+ });
121
151
 
122
- Segment.displayName = COLUMN_SEGMENT_NAME;
152
+ ColumnCenter.displayName = COLUMN_CENTER_NAME;
123
153
 
124
154
  //
125
155
  // Column
126
156
  //
127
157
 
128
158
  export const Column = {
129
- Root,
130
- Row,
131
- Segment,
159
+ Root: ColumnRoot,
160
+ Row: ColumnRow,
161
+ Bleed: ColumnBleed,
162
+ Center: ColumnCenter,
132
163
  };
133
164
 
134
- export type { ColumnRootProps, ColumnRowProps, ColumnSegmentProps };
165
+ export type { ColumnRootProps, ColumnRowProps, ColumnBleedProps, ColumnCenterProps };
@@ -6,7 +6,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React from 'react';
7
7
 
8
8
  import { withLayout, withTheme } from '../../testing';
9
-
10
9
  import { Container } from './Container';
11
10
 
12
11
  const DefaultStory = () => (
@@ -2,17 +2,14 @@
2
2
  // Copyright 2026 DXOS.org
3
3
  //
4
4
 
5
- import React, { forwardRef } from 'react';
6
-
7
- import { composableProps, mx } from '@dxos/ui-theme';
8
- import { Slot } from '@radix-ui/react-slot';
9
- import { SlottableProps } from '@dxos/ui-types';
10
5
  import { Primitive } from '@radix-ui/react-primitive';
6
+ import { Slot } from '@radix-ui/react-slot';
7
+ import React from 'react';
11
8
 
12
- export type ContainerProps = SlottableProps<HTMLDivElement>;
9
+ import { composableProps, mx, slottable } from '@dxos/ui-theme';
13
10
 
14
- export const Container = forwardRef<HTMLDivElement, ContainerProps>(({ children, asChild, ...props }, forwardedRef) => {
15
- const { className, ...rest } = composableProps<HTMLDivElement>(props, { role: 'none' });
11
+ export const Container = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {
12
+ const { className, ...rest } = composableProps<HTMLDivElement>(props);
16
13
  const Comp = asChild ? Slot : Primitive.div;
17
14
  return (
18
15
  <Comp {...rest} className={mx('dx-container', className)} ref={forwardedRef}>
@@ -8,7 +8,6 @@ import React from 'react';
8
8
  import { type ChromaticPalette } from '@dxos/ui-types';
9
9
 
10
10
  import { withLayout, withTheme } from '../../testing';
11
-
12
11
  import { Flex } from './Flex';
13
12
 
14
13
  const Cell = ({ label, hue }: { label: string; hue: ChromaticPalette }) => (
@@ -2,28 +2,26 @@
2
2
  // Copyright 2026 DXOS.org
3
3
  //
4
4
 
5
- import React, { forwardRef } from 'react';
5
+ import { Primitive } from '@radix-ui/react-primitive';
6
+ import { Slot } from '@radix-ui/react-slot';
7
+ import React from 'react';
6
8
 
7
- import { composableProps, mx } from '@dxos/ui-theme';
8
- import { type ComposableProps } from '@dxos/ui-types';
9
+ import { composableProps, mx, slottable } from '@dxos/ui-theme';
9
10
 
10
- export type FlexProps = ComposableProps<HTMLDivElement> & {
11
- column?: boolean;
12
- grow?: boolean;
13
- };
11
+ export type FlexProps = { column?: boolean; grow?: boolean };
14
12
 
15
- export const Flex = forwardRef<HTMLDivElement, FlexProps>(
16
- ({ children, role, column, grow, ...props }, forwardedRef) => {
13
+ export const Flex = slottable<HTMLDivElement, FlexProps>(
14
+ ({ children, asChild, column, grow, ...props }, forwardedRef) => {
17
15
  const { className, ...rest } = composableProps(props);
16
+ const Comp = asChild ? Slot : Primitive.div;
18
17
  return (
19
- <div
18
+ <Comp
20
19
  ref={forwardedRef}
21
20
  {...rest}
22
- role={role ?? 'none'}
23
21
  className={mx('flex', column && 'flex-col', grow && 'flex-1 overflow-hidden', className)}
24
22
  >
25
23
  {children}
26
- </div>
24
+ </Comp>
27
25
  );
28
26
  },
29
27
  );
@@ -8,7 +8,6 @@ import React from 'react';
8
8
  import { type ChromaticPalette } from '@dxos/ui-types';
9
9
 
10
10
  import { withLayout, withTheme } from '../../testing';
11
-
12
11
  import { Grid } from './Grid';
13
12
 
14
13
  const Cell = ({ label, hue }: { label: string; hue: ChromaticPalette }) => (
@@ -2,18 +2,13 @@
2
2
  // Copyright 2026 DXOS.org
3
3
  //
4
4
 
5
- import React, { forwardRef } from 'react';
5
+ import React from 'react';
6
6
 
7
- import { composableProps, mx } from '@dxos/ui-theme';
8
- import { type ComposableProps } from '@dxos/ui-types';
7
+ import { composable, composableProps, mx } from '@dxos/ui-theme';
9
8
 
10
- export type GridProps = ComposableProps<HTMLDivElement> & {
11
- cols?: number;
12
- rows?: number;
13
- grow?: boolean;
14
- };
9
+ export type GridProps = { cols?: number; rows?: number; grow?: boolean };
15
10
 
16
- export const Grid = forwardRef<HTMLDivElement, GridProps>(
11
+ export const Grid = composable<HTMLDivElement, GridProps>(
17
12
  ({ children, style, role, cols, rows, grow = true, ...props }, forwardedRef) => {
18
13
  const { className, ...rest } = composableProps(props);
19
14
  return (
@@ -5,14 +5,15 @@
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React from 'react';
7
7
 
8
- import { Input, ScrollArea, Toolbar } from '../../components';
9
- import { withLayout, withTheme } from '../../testing';
8
+ import { composable, composableProps } from '@dxos/ui-theme';
10
9
 
10
+ import { Input, ScrollArea, ScrollAreaRootProps, Toolbar } from '../../components';
11
+ import { withLayout, withTheme } from '../../testing';
11
12
  import { Panel } from './Panel';
12
13
 
13
- const List = () => {
14
+ const List = composable<HTMLDivElement, ScrollAreaRootProps>((props, forwardedRef) => {
14
15
  return (
15
- <ScrollArea.Root margin role='list'>
16
+ <ScrollArea.Root centered {...composableProps(props, { role: 'list' })} ref={forwardedRef}>
16
17
  <ScrollArea.Viewport>
17
18
  {Array.from({ length: 100 }).map((_, i) => (
18
19
  <div key={i} role='listitem' className='p-1 hover:bg-hover-surface'>
@@ -22,11 +23,11 @@ const List = () => {
22
23
  </ScrollArea.Viewport>
23
24
  </ScrollArea.Root>
24
25
  );
25
- };
26
+ });
26
27
 
27
28
  const DefaultStory = () => {
28
29
  return (
29
- <Panel.Root className='dx-article'>
30
+ <Panel.Root className='dx-document'>
30
31
  <Panel.Toolbar asChild>
31
32
  <Toolbar.Root classNames='gap-2'>
32
33
  <Toolbar.IconButton icon='ph--plus--regular' variant='primary' label='Add' />
@@ -43,8 +44,8 @@ const DefaultStory = () => {
43
44
 
44
45
  <Panel.Statusbar asChild>
45
46
  <Toolbar.Root classNames='justify-between'>
46
- <Toolbar.IconButton variant='ghost' icon='ph--house--regular' iconOnly label='Add' size={4} />
47
- <Toolbar.IconButton variant='ghost' icon='ph--alarm--regular' iconOnly label='Status' size={4} />
47
+ <Toolbar.IconButton variant='ghost' icon='ph--house--regular' iconOnly label='Add' />
48
+ <Toolbar.IconButton variant='ghost' icon='ph--alarm--regular' iconOnly label='Status' />
48
49
  </Toolbar.Root>
49
50
  </Panel.Statusbar>
50
51
  </Panel.Root>
@@ -4,9 +4,9 @@
4
4
 
5
5
  import { Primitive } from '@radix-ui/react-primitive';
6
6
  import { Slot } from '@radix-ui/react-slot';
7
- import React, { forwardRef } from 'react';
7
+ import React, { type CSSProperties } from 'react';
8
8
 
9
- import { composableProps } from '@dxos/ui-theme';
9
+ import { composableProps, PanelStyleProps, slottable } from '@dxos/ui-theme';
10
10
  import { type SlottableProps } from '@dxos/ui-types';
11
11
 
12
12
  import { useThemeContext } from '../../hooks';
@@ -18,57 +18,61 @@ import { useThemeContext } from '../../hooks';
18
18
  const GRID_TEMPLATE_ROWS = 'auto 1fr auto';
19
19
  const GRID_TEMPLATE_AREAS = '"toolbar" "content" "statusbar"';
20
20
 
21
- type RootProps = SlottableProps<HTMLDivElement>;
22
-
23
- const Root = forwardRef<HTMLDivElement, RootProps>(({ children, asChild, role, style, ...props }, forwardedRef) => {
24
- const { className, ...rest } = composableProps(props);
25
- const Comp = asChild ? Slot : Primitive.div;
26
- const { tx } = useThemeContext();
27
- return (
28
- <Comp
29
- {...rest}
30
- role={role ?? 'none'}
31
- style={{
32
- gridTemplateRows: GRID_TEMPLATE_ROWS,
33
- gridTemplateAreas: GRID_TEMPLATE_AREAS,
34
- ...style,
35
- }}
36
- className={tx('panel.root', {}, className)}
37
- ref={forwardedRef}
38
- >
39
- {children}
40
- </Comp>
41
- );
42
- });
43
-
44
- Root.displayName = 'Panel.Root';
21
+ type PanelRootProps = SlottableProps<{ style?: CSSProperties }>;
22
+
23
+ const PanelRoot = slottable<HTMLDivElement, { style?: CSSProperties }>(
24
+ ({ children, asChild, role, style, ...props }, forwardedRef) => {
25
+ const { className, ...rest } = composableProps(props);
26
+ const Comp = asChild ? Slot : Primitive.div;
27
+ const { tx } = useThemeContext();
28
+ return (
29
+ <Comp
30
+ {...rest}
31
+ role={role ?? 'none'}
32
+ style={{
33
+ gridTemplateRows: GRID_TEMPLATE_ROWS,
34
+ gridTemplateAreas: GRID_TEMPLATE_AREAS,
35
+ ...style,
36
+ }}
37
+ className={tx('panel.root', {}, className)}
38
+ ref={forwardedRef}
39
+ >
40
+ {children}
41
+ </Comp>
42
+ );
43
+ },
44
+ );
45
+
46
+ PanelRoot.displayName = 'Panel.Root';
45
47
 
46
48
  //
47
49
  // Toolbar
48
50
  //
49
51
 
50
- type ToolbarProps = SlottableProps<HTMLDivElement>;
52
+ type PanelToolbarProps = SlottableProps & Pick<PanelStyleProps, 'size'>;
51
53
 
52
- const Toolbar = forwardRef<HTMLDivElement, ToolbarProps>(({ children, asChild, ...props }, forwardedRef) => {
53
- const { className, ...rest } = composableProps(props);
54
- const Comp = asChild ? Slot : Primitive.div;
55
- const { tx } = useThemeContext();
56
- return (
57
- <Comp {...rest} data-slot='toolbar' className={tx('panel.toolbar', {}, className)} ref={forwardedRef}>
58
- {children}
59
- </Comp>
60
- );
61
- });
54
+ const PanelToolbar = slottable<HTMLDivElement, Pick<PanelStyleProps, 'size'>>(
55
+ ({ children, asChild, size, ...props }, forwardedRef) => {
56
+ const { className, ...rest } = composableProps(props);
57
+ const Comp = asChild ? Slot : Primitive.div;
58
+ const { tx } = useThemeContext();
59
+ return (
60
+ <Comp {...rest} data-slot='toolbar' className={tx('panel.toolbar', { size }, className)} ref={forwardedRef}>
61
+ {children}
62
+ </Comp>
63
+ );
64
+ },
65
+ );
62
66
 
63
- Toolbar.displayName = 'Panel.Toolbar';
67
+ PanelToolbar.displayName = 'Panel.Toolbar';
64
68
 
65
69
  //
66
70
  // Content
67
71
  //
68
72
 
69
- type ContentProps = SlottableProps<HTMLDivElement>;
73
+ type PanelContentProps = SlottableProps;
70
74
 
71
- const Content = forwardRef<HTMLDivElement, ContentProps>(({ children, asChild, ...props }, forwardedRef) => {
75
+ const PanelContent = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {
72
76
  const { className, ...rest } = composableProps(props);
73
77
  const Comp = asChild ? Slot : Primitive.div;
74
78
  const { tx } = useThemeContext();
@@ -79,41 +83,38 @@ const Content = forwardRef<HTMLDivElement, ContentProps>(({ children, asChild, .
79
83
  );
80
84
  });
81
85
 
82
- Content.displayName = 'Panel.Content';
86
+ PanelContent.displayName = 'Panel.Content';
83
87
 
84
88
  //
85
89
  // Statusbar
86
90
  //
87
91
 
88
- type StatusbarProps = SlottableProps<HTMLDivElement>;
92
+ type PanelStatusbarProps = SlottableProps & Pick<PanelStyleProps, 'size'>;
89
93
 
90
- const Statusbar = forwardRef<HTMLDivElement, StatusbarProps>(({ children, asChild, ...props }, forwardedRef) => {
91
- const { className, ...rest } = composableProps(props);
92
- const Comp = asChild ? Slot : Primitive.div;
93
- const { tx } = useThemeContext();
94
- return (
95
- <Comp {...rest} data-slot='statusbar' className={tx('panel.statusbar', {}, className)} ref={forwardedRef}>
96
- {children}
97
- </Comp>
98
- );
99
- });
94
+ const PanelStatusbar = slottable<HTMLDivElement, Pick<PanelStyleProps, 'size'>>(
95
+ ({ children, asChild, size, ...props }, forwardedRef) => {
96
+ const { className, ...rest } = composableProps(props);
97
+ const Comp = asChild ? Slot : Primitive.div;
98
+ const { tx } = useThemeContext();
99
+ return (
100
+ <Comp {...rest} data-slot='statusbar' className={tx('panel.statusbar', { size }, className)} ref={forwardedRef}>
101
+ {children}
102
+ </Comp>
103
+ );
104
+ },
105
+ );
100
106
 
101
- Statusbar.displayName = 'Panel.Statusbar';
107
+ PanelStatusbar.displayName = 'Panel.Statusbar';
102
108
 
103
109
  //
104
110
  // Panel
105
111
  //
106
112
 
107
113
  export const Panel = {
108
- Root,
109
- Toolbar,
110
- Content,
111
- Statusbar,
114
+ Root: PanelRoot,
115
+ Toolbar: PanelToolbar,
116
+ Content: PanelContent,
117
+ Statusbar: PanelStatusbar,
112
118
  };
113
119
 
114
- export type {
115
- RootProps as PanelRootProps,
116
- ToolbarProps as PanelToolbarProps,
117
- ContentProps as PanelContentProps,
118
- StatusbarProps as PanelStatusbarProps,
119
- };
120
+ export type { PanelRootProps, PanelToolbarProps, PanelContentProps, PanelStatusbarProps };
@@ -2,9 +2,12 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
+ import React, { captureOwnerStack, useEffect, useState } from 'react';
6
+
5
7
  import { mx } from '@dxos/ui-theme';
6
8
  import { safeStringify } from '@dxos/util';
7
- import React, { useEffect, useState } from 'react';
9
+
10
+ import { ErrorStack, parseCaptureOwnerStack } from '../components';
8
11
 
9
12
  export type LoadingProps = { data?: any };
10
13
 
@@ -13,14 +16,32 @@ export type LoadingProps = { data?: any };
13
16
  */
14
17
  export const Loading = ({ data }: LoadingProps) => {
15
18
  const [visible, setVisible] = useState(false);
19
+ const ownerFrames = parseCaptureOwnerStack(captureOwnerStack());
20
+
16
21
  useEffect(() => {
17
22
  const t = setTimeout(() => setVisible(true), 500);
18
23
  return () => clearTimeout(t);
19
24
  }, []);
25
+
20
26
  return (
21
- <div className={mx('flex flex-col opacity-0 transition delay-1000 duration-1000', visible && 'opacity-100')}>
22
- <h2 className='uppercase'>Loading</h2>
23
- <pre>{safeStringify(data, undefined, 2)}</pre>
27
+ <div className='w-full p-2'>
28
+ <div
29
+ className={mx(
30
+ 'flex flex-col w-full p-2 border-2 border-teal-500 rounded-md',
31
+ 'opacity-0 transition delay-1000 duration-1000',
32
+ visible && 'opacity-100',
33
+ )}
34
+ >
35
+ <h2 className='uppercase capitalize text-xs'>Loading State</h2>
36
+ <pre className='text-sm text-description'>{safeStringify(data, undefined, 2)}</pre>
37
+
38
+ <h3 className='uppercase capitalize text-xs mt-2'>Owner stack</h3>
39
+ {ownerFrames && ownerFrames.length > 0 ? (
40
+ <ErrorStack frames={ownerFrames} />
41
+ ) : (
42
+ <p className='text-xs text-subdued'>No owner stack (production build or unsupported context).</p>
43
+ )}
44
+ </div>
24
45
  </div>
25
46
  );
26
47
  };
@@ -39,7 +39,7 @@ export const withLayout =
39
39
  const { layout = 'default', classNames, scroll } = props;
40
40
  const Container = layouts[layout] ?? layouts.fullscreen;
41
41
  return (
42
- <Container classNames={mx(classNames, scroll ? 'overflow-y-auto' : 'overflow-hidden')}>
42
+ <Container classNames={mx(scroll ? 'overflow-y-auto' : 'overflow-hidden', classNames)}>
43
43
  <MemoizedStory />
44
44
  </Container>
45
45
  );
@@ -54,22 +54,22 @@ const layouts: Record<ContainerType, FC<ContainerProps>> = {
54
54
  ),
55
55
 
56
56
  fullscreen: ({ classNames, children }: ContainerProps) => (
57
- <div role='none' className={mx('fixed inset-0 flex overflow-hidden bg-base-surface', classNames)}>
57
+ <div role='none' className={mx('fixed inset-0 flex overflow-hidden bg-black', classNames)}>
58
58
  {children}
59
59
  </div>
60
60
  ),
61
61
 
62
62
  centered: ({ classNames, children }: ContainerProps) => (
63
- <div role='none' className={mx('fixed inset-0 grid overflow-hidden place-items-center bg-base-surface')}>
64
- <div role='none' className={mx('flex flex-col w-[40rem] bg-group-surface', classNames)}>
63
+ <div role='none' className={mx('fixed inset-0 grid overflow-hidden place-items-center bg-black')}>
64
+ <div role='none' className={mx('flex flex-col bg-base-surface', classNames)}>
65
65
  {children}
66
66
  </div>
67
67
  </div>
68
68
  ),
69
69
 
70
70
  column: ({ classNames, children }: ContainerProps) => (
71
- <div role='none' className='fixed inset-0 flex overflow-hidden justify-center bg-base-surface'>
72
- <div role='none' className={mx('flex flex-col w-[40rem] bg-group-surface', classNames)}>
71
+ <div role='none' className='fixed inset-0 flex overflow-hidden justify-center bg-black'>
72
+ <div role='none' className={mx('flex flex-col w-[40rem] bg-base-surface', classNames)}>
73
73
  {children}
74
74
  </div>
75
75
  </div>
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import { type Decorator } from '@storybook/react';
6
- import React, { memo } from 'react';
6
+ import React from 'react';
7
7
 
8
8
  import { defaultTx } from '@dxos/ui-theme';
9
9
  import { type ThemeMode } from '@dxos/ui-types';
@@ -14,20 +14,23 @@ import { type ThemeContextValue, ThemeProvider, Tooltip } from '../../components
14
14
  * Adds theme decorator.
15
15
  */
16
16
  export const withTheme =
17
- ({ tx = defaultTx, ...props }: Partial<ThemeContextValue> = {}): Decorator =>
17
+ ({ tx = defaultTx, noCache, platform }: Partial<ThemeContextValue> = {}): Decorator =>
18
18
  (Story, context) => {
19
19
  const {
20
20
  globals: { theme },
21
21
  parameters: { translations },
22
22
  } = context;
23
23
 
24
- // Prevent re-rendering of the story.
25
- const MemoizedStory = memo(Story);
26
-
27
24
  return (
28
- <ThemeProvider {...props} tx={tx} themeMode={theme as ThemeMode} resourceExtensions={translations} noCache>
25
+ <ThemeProvider
26
+ tx={tx}
27
+ themeMode={theme as ThemeMode}
28
+ resourceExtensions={translations}
29
+ noCache={noCache}
30
+ platform={platform}
31
+ >
29
32
  <Tooltip.Provider>
30
- <MemoizedStory />
33
+ <Story />
31
34
  </Tooltip.Provider>
32
35
  </ThemeProvider>
33
36
  );