@dxos/react-ui 0.8.4-main.fffef41 → 0.8.4-staging.ac66bdf99f

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 (382) hide show
  1. package/dist/lib/browser/chunk-OCVRIJCH.mjs +848 -0
  2. package/dist/lib/browser/chunk-OCVRIJCH.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +4111 -67
  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 +88 -64
  7. package/dist/lib/browser/testing/index.mjs.map +4 -4
  8. package/dist/lib/node-esm/chunk-QUD5P3RU.mjs +850 -0
  9. package/dist/lib/node-esm/chunk-QUD5P3RU.mjs.map +7 -0
  10. package/dist/lib/node-esm/index.mjs +4111 -67
  11. package/dist/lib/node-esm/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/testing/index.mjs +88 -64
  14. package/dist/lib/node-esm/testing/index.mjs.map +4 -4
  15. package/dist/types/src/components/Avatars/Avatar.d.ts +1 -1
  16. package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
  17. package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
  18. package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
  19. package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  20. package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
  21. package/dist/types/src/components/Button/Button.d.ts +3 -3
  22. package/dist/types/src/components/Button/Button.d.ts.map +1 -1
  23. package/dist/types/src/components/Button/Button.stories.d.ts.map +1 -1
  24. package/dist/types/src/components/Button/IconButton.d.ts +2 -1
  25. package/dist/types/src/components/Button/IconButton.d.ts.map +1 -1
  26. package/dist/types/src/components/Button/IconButton.stories.d.ts +3 -0
  27. package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -1
  28. package/dist/types/src/components/Button/Toggle.d.ts +2 -2
  29. package/dist/types/src/components/Button/Toggle.d.ts.map +1 -1
  30. package/dist/types/src/components/Button/Toggle.stories.d.ts.map +1 -1
  31. package/dist/types/src/components/Button/ToggleGroup.d.ts +10 -10
  32. package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -1
  33. package/dist/types/src/components/Button/ToggleGroup.stories.d.ts +4 -4
  34. package/dist/types/src/components/Button/ToggleGroup.stories.d.ts.map +1 -1
  35. package/dist/types/src/components/Card/Card.d.ts +120 -0
  36. package/dist/types/src/components/Card/Card.d.ts.map +1 -0
  37. package/dist/types/src/components/Card/Card.stories.d.ts +21 -0
  38. package/dist/types/src/components/Card/Card.stories.d.ts.map +1 -0
  39. package/dist/types/src/components/Card/index.d.ts +2 -0
  40. package/dist/types/src/components/Card/index.d.ts.map +1 -0
  41. package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
  42. package/dist/types/src/components/Clipboard/index.d.ts +10 -1
  43. package/dist/types/src/components/Clipboard/index.d.ts.map +1 -1
  44. package/dist/types/src/components/DensityProvider/DensityProvider.d.ts +1 -1
  45. package/dist/types/src/components/DensityProvider/DensityProvider.d.ts.map +1 -1
  46. package/dist/types/src/components/Dialog/AlertDialog.d.ts +39 -19
  47. package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -1
  48. package/dist/types/src/components/Dialog/AlertDialog.stories.d.ts.map +1 -1
  49. package/dist/types/src/components/Dialog/Dialog.d.ts +54 -21
  50. package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
  51. package/dist/types/src/components/Dialog/Dialog.stories.d.ts +10 -10
  52. package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -1
  53. package/dist/types/src/components/ElevationProvider/ElevationProvider.d.ts +1 -1
  54. package/dist/types/src/components/ElevationProvider/ElevationProvider.d.ts.map +1 -1
  55. package/dist/types/src/components/ErrorFallback/ErrorFallback.d.ts +11 -0
  56. package/dist/types/src/components/ErrorFallback/ErrorFallback.d.ts.map +1 -0
  57. package/dist/types/src/components/ErrorFallback/ErrorFallback.stories.d.ts +7 -0
  58. package/dist/types/src/components/ErrorFallback/ErrorFallback.stories.d.ts.map +1 -0
  59. package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts +19 -0
  60. package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts.map +1 -0
  61. package/dist/types/src/components/ErrorFallback/ThrowError.d.ts +9 -0
  62. package/dist/types/src/components/ErrorFallback/ThrowError.d.ts.map +1 -0
  63. package/dist/types/src/components/ErrorFallback/index.d.ts +5 -0
  64. package/dist/types/src/components/ErrorFallback/index.d.ts.map +1 -0
  65. package/dist/types/src/components/Focus/Focus.d.ts +36 -0
  66. package/dist/types/src/components/Focus/Focus.d.ts.map +1 -0
  67. package/dist/types/src/components/Focus/Focus.stories.d.ts +9 -0
  68. package/dist/types/src/components/Focus/Focus.stories.d.ts.map +1 -0
  69. package/dist/types/src/components/Focus/index.d.ts +2 -0
  70. package/dist/types/src/components/Focus/index.d.ts.map +1 -0
  71. package/dist/types/src/components/Icon/Icon.d.ts +4 -1
  72. package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
  73. package/dist/types/src/components/Icon/Icon.stories.d.ts +11 -3
  74. package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -1
  75. package/dist/types/src/components/Image/Image.d.ts +14 -0
  76. package/dist/types/src/components/Image/Image.d.ts.map +1 -0
  77. package/dist/types/src/components/Image/Image.stories.d.ts +33 -0
  78. package/dist/types/src/components/Image/Image.stories.d.ts.map +1 -0
  79. package/dist/types/src/components/Image/index.d.ts +2 -0
  80. package/dist/types/src/components/Image/index.d.ts.map +1 -0
  81. package/dist/types/src/components/Input/Input.d.ts +7 -7
  82. package/dist/types/src/components/Input/Input.d.ts.map +1 -1
  83. package/dist/types/src/components/Input/Input.stories.d.ts +8 -8
  84. package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
  85. package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
  86. package/dist/types/src/components/List/List.d.ts +6 -4
  87. package/dist/types/src/components/List/List.d.ts.map +1 -1
  88. package/dist/types/src/components/List/List.stories.d.ts +3 -1
  89. package/dist/types/src/components/List/List.stories.d.ts.map +1 -1
  90. package/dist/types/src/components/List/Tree.d.ts.map +1 -1
  91. package/dist/types/src/components/List/Tree.stories.d.ts.map +1 -1
  92. package/dist/types/src/components/List/Treegrid.d.ts +5 -9
  93. package/dist/types/src/components/List/Treegrid.d.ts.map +1 -1
  94. package/dist/types/src/components/List/Treegrid.stories.d.ts.map +1 -1
  95. package/dist/types/src/components/Main/Main.d.ts +9 -10
  96. package/dist/types/src/components/Main/Main.d.ts.map +1 -1
  97. package/dist/types/src/components/Main/Main.stories.d.ts +0 -3
  98. package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
  99. package/dist/types/src/components/{Menus → Menu}/ContextMenu.d.ts +6 -6
  100. package/dist/types/src/components/Menu/ContextMenu.d.ts.map +1 -0
  101. package/dist/types/src/components/Menu/ContextMenu.stories.d.ts.map +1 -0
  102. package/dist/types/src/components/{Menus → Menu}/DropdownMenu.d.ts +52 -51
  103. package/dist/types/src/components/Menu/DropdownMenu.d.ts.map +1 -0
  104. package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts +28 -0
  105. package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts.map +1 -0
  106. package/dist/types/src/components/Menu/index.d.ts.map +1 -0
  107. package/dist/types/src/components/Message/Message.d.ts +1 -1
  108. package/dist/types/src/components/Message/Message.d.ts.map +1 -1
  109. package/dist/types/src/components/Message/Message.stories.d.ts +5 -6
  110. package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
  111. package/dist/types/src/components/Popover/Popover.d.ts +33 -24
  112. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  113. package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
  114. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +27 -27
  115. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  116. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +57 -8
  117. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
  118. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +37 -14
  119. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -1
  120. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +10 -5
  121. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -1
  122. package/dist/types/src/components/Select/Select.d.ts +9 -9
  123. package/dist/types/src/components/Select/Select.d.ts.map +1 -1
  124. package/dist/types/src/components/Select/Select.stories.d.ts +2 -2
  125. package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
  126. package/dist/types/src/components/Separator/Separator.d.ts +4 -4
  127. package/dist/types/src/components/Separator/Separator.d.ts.map +1 -1
  128. package/dist/types/src/components/Skeleton/Skeleton.d.ts +12 -0
  129. package/dist/types/src/components/Skeleton/Skeleton.d.ts.map +1 -0
  130. package/dist/types/src/components/Skeleton/Skeleton.stories.d.ts +17 -0
  131. package/dist/types/src/components/Skeleton/Skeleton.stories.d.ts.map +1 -0
  132. package/dist/types/src/components/Skeleton/index.d.ts +2 -0
  133. package/dist/types/src/components/Skeleton/index.d.ts.map +1 -0
  134. package/dist/types/src/components/Splitter/Splitter.d.ts +34 -0
  135. package/dist/types/src/components/Splitter/Splitter.d.ts.map +1 -0
  136. package/dist/types/src/components/Splitter/Splitter.stories.d.ts +7 -0
  137. package/dist/types/src/components/Splitter/Splitter.stories.d.ts.map +1 -0
  138. package/dist/types/src/components/Splitter/index.d.ts +2 -0
  139. package/dist/types/src/components/Splitter/index.d.ts.map +1 -0
  140. package/dist/types/src/components/Status/Status.d.ts +3 -4
  141. package/dist/types/src/components/Status/Status.d.ts.map +1 -1
  142. package/dist/types/src/components/Status/Status.stories.d.ts +4 -2
  143. package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
  144. package/dist/types/src/components/Tag/Tag.d.ts +1 -1
  145. package/dist/types/src/components/Tag/Tag.d.ts.map +1 -1
  146. package/dist/types/src/components/Tag/Tag.stories.d.ts +0 -5
  147. package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
  148. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +3 -3
  149. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  150. package/dist/types/src/components/{Menus/DropdownMenu.stories.d.ts → ThemeProvider/ThemeProvider.stories.d.ts} +2 -5
  151. package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts.map +1 -0
  152. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +1 -8
  153. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
  154. package/dist/types/src/components/ThemeProvider/index.d.ts +2 -1
  155. package/dist/types/src/components/ThemeProvider/index.d.ts.map +1 -1
  156. package/dist/types/src/components/Toast/Toast.d.ts +19 -19
  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 +36 -18
  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 +9 -9
  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 +10 -5
  167. package/dist/types/src/components/index.d.ts.map +1 -1
  168. package/dist/types/src/exemplars/generics.stories.d.ts +19 -0
  169. package/dist/types/src/exemplars/generics.stories.d.ts.map +1 -0
  170. package/dist/types/src/exemplars/slot.stories.d.ts +15 -0
  171. package/dist/types/src/exemplars/slot.stories.d.ts.map +1 -0
  172. package/dist/types/src/exemplars/tabster.stories.d.ts +8 -0
  173. package/dist/types/src/exemplars/tabster.stories.d.ts.map +1 -0
  174. package/dist/types/src/exemplars/virtualizer.stories.d.ts +11 -0
  175. package/dist/types/src/exemplars/virtualizer.stories.d.ts.map +1 -0
  176. package/dist/types/src/hooks/index.d.ts +1 -0
  177. package/dist/types/src/hooks/index.d.ts.map +1 -1
  178. package/dist/types/src/hooks/useDensityContext.d.ts +2 -2
  179. package/dist/types/src/hooks/useDensityContext.d.ts.map +1 -1
  180. package/dist/types/src/hooks/useElevationContext.d.ts +1 -1
  181. package/dist/types/src/hooks/useElevationContext.d.ts.map +1 -1
  182. package/dist/types/src/index.d.ts +2 -1
  183. package/dist/types/src/index.d.ts.map +1 -1
  184. package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
  185. package/dist/types/src/playground/Custom.stories.d.ts.map +1 -1
  186. package/dist/types/src/primitives/Column/Column.d.ts +33 -0
  187. package/dist/types/src/primitives/Column/Column.d.ts.map +1 -0
  188. package/dist/types/src/primitives/Column/Column.stories.d.ts +25 -0
  189. package/dist/types/src/primitives/Column/Column.stories.d.ts.map +1 -0
  190. package/dist/types/src/primitives/Column/index.d.ts +2 -0
  191. package/dist/types/src/primitives/Column/index.d.ts.map +1 -0
  192. package/dist/types/src/primitives/Container/Container.d.ts +7 -0
  193. package/dist/types/src/primitives/Container/Container.d.ts.map +1 -0
  194. package/dist/types/src/primitives/Container/Container.stories.d.ts +6 -0
  195. package/dist/types/src/primitives/Container/Container.stories.d.ts.map +1 -0
  196. package/dist/types/src/primitives/Container/index.d.ts +2 -0
  197. package/dist/types/src/primitives/Container/index.d.ts.map +1 -0
  198. package/dist/types/src/primitives/Flex/Flex.d.ts +11 -0
  199. package/dist/types/src/primitives/Flex/Flex.d.ts.map +1 -0
  200. package/dist/types/src/primitives/Flex/Flex.stories.d.ts +8 -0
  201. package/dist/types/src/primitives/Flex/Flex.stories.d.ts.map +1 -0
  202. package/dist/types/src/primitives/Flex/index.d.ts +2 -0
  203. package/dist/types/src/primitives/Flex/index.d.ts.map +1 -0
  204. package/dist/types/src/primitives/Grid/Grid.d.ts +10 -0
  205. package/dist/types/src/primitives/Grid/Grid.d.ts.map +1 -0
  206. package/dist/types/src/primitives/Grid/Grid.stories.d.ts +8 -0
  207. package/dist/types/src/primitives/Grid/Grid.stories.d.ts.map +1 -0
  208. package/dist/types/src/primitives/Grid/index.d.ts +2 -0
  209. package/dist/types/src/primitives/Grid/index.d.ts.map +1 -0
  210. package/dist/types/src/primitives/Panel/Panel.d.ts +35 -0
  211. package/dist/types/src/primitives/Panel/Panel.d.ts.map +1 -0
  212. package/dist/types/src/primitives/Panel/Panel.stories.d.ts +6 -0
  213. package/dist/types/src/primitives/Panel/Panel.stories.d.ts.map +1 -0
  214. package/dist/types/src/primitives/Panel/index.d.ts +2 -0
  215. package/dist/types/src/primitives/Panel/index.d.ts.map +1 -0
  216. package/dist/types/src/primitives/index.d.ts +6 -0
  217. package/dist/types/src/primitives/index.d.ts.map +1 -0
  218. package/dist/types/src/testing/Loading.d.ts +9 -0
  219. package/dist/types/src/testing/Loading.d.ts.map +1 -0
  220. package/dist/types/src/testing/decorators/withLayout.d.ts +3 -3
  221. package/dist/types/src/testing/decorators/withLayout.d.ts.map +1 -1
  222. package/dist/types/src/testing/decorators/withLayoutVariants.d.ts +1 -1
  223. package/dist/types/src/testing/decorators/withLayoutVariants.d.ts.map +1 -1
  224. package/dist/types/src/testing/decorators/withTheme.d.ts +3 -2
  225. package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
  226. package/dist/types/src/testing/index.d.ts +1 -0
  227. package/dist/types/src/testing/index.d.ts.map +1 -1
  228. package/dist/types/src/translations.d.ts +11 -0
  229. package/dist/types/src/translations.d.ts.map +1 -0
  230. package/dist/types/src/util/index.d.ts +1 -2
  231. package/dist/types/src/util/index.d.ts.map +1 -1
  232. package/dist/types/src/util/usePx.d.ts.map +1 -1
  233. package/dist/types/tsconfig.tsbuildinfo +1 -1
  234. package/package.json +42 -32
  235. package/src/components/Avatars/Avatar.stories.tsx +7 -9
  236. package/src/components/Avatars/Avatar.tsx +7 -15
  237. package/src/components/Avatars/AvatarGroup.stories.tsx +2 -3
  238. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +3 -4
  239. package/src/components/Breadcrumb/Breadcrumb.tsx +11 -37
  240. package/src/components/Button/Button.stories.tsx +3 -4
  241. package/src/components/Button/Button.tsx +12 -26
  242. package/src/components/Button/IconButton.stories.tsx +8 -6
  243. package/src/components/Button/IconButton.tsx +9 -6
  244. package/src/components/Button/Toggle.stories.tsx +2 -3
  245. package/src/components/Button/Toggle.tsx +4 -4
  246. package/src/components/Button/ToggleGroup.stories.tsx +2 -3
  247. package/src/components/Button/ToggleGroup.tsx +12 -16
  248. package/src/components/Card/Card.stories.tsx +151 -0
  249. package/src/components/Card/Card.tsx +493 -0
  250. package/src/components/Card/index.ts +5 -0
  251. package/src/components/Clipboard/CopyButton.tsx +7 -8
  252. package/src/components/DensityProvider/DensityProvider.tsx +1 -1
  253. package/src/components/Dialog/AlertDialog.stories.tsx +16 -17
  254. package/src/components/Dialog/AlertDialog.tsx +123 -82
  255. package/src/components/Dialog/Dialog.stories.tsx +138 -28
  256. package/src/components/Dialog/Dialog.tsx +197 -71
  257. package/src/components/ElevationProvider/ElevationProvider.tsx +1 -1
  258. package/src/components/ErrorFallback/ErrorFallback.stories.tsx +45 -0
  259. package/src/components/ErrorFallback/ErrorFallback.tsx +70 -0
  260. package/src/components/ErrorFallback/ErrorStack.tsx +114 -0
  261. package/src/components/ErrorFallback/ThrowError.tsx +37 -0
  262. package/src/components/ErrorFallback/index.ts +9 -0
  263. package/src/components/Focus/AUDIT.md +43 -0
  264. package/src/components/Focus/Focus.stories.tsx +230 -0
  265. package/src/components/Focus/Focus.tsx +201 -0
  266. package/src/components/Focus/index.ts +5 -0
  267. package/src/components/Icon/Icon.stories.tsx +45 -15
  268. package/src/components/Icon/Icon.tsx +7 -3
  269. package/src/components/Image/Image.stories.tsx +86 -0
  270. package/src/components/Image/Image.tsx +223 -0
  271. package/src/components/Image/index.ts +5 -0
  272. package/src/components/Input/Input.stories.tsx +21 -41
  273. package/src/components/Input/Input.tsx +38 -74
  274. package/src/components/Link/Link.stories.tsx +2 -3
  275. package/src/components/Link/Link.tsx +2 -2
  276. package/src/components/List/List.stories.tsx +30 -34
  277. package/src/components/List/List.tsx +17 -21
  278. package/src/components/List/ListDropIndicator.tsx +7 -7
  279. package/src/components/List/Tree.stories.tsx +5 -6
  280. package/src/components/List/Tree.tsx +0 -1
  281. package/src/components/List/TreeDropIndicator.tsx +6 -6
  282. package/src/components/List/Treegrid.stories.tsx +29 -30
  283. package/src/components/List/Treegrid.tsx +23 -28
  284. package/src/components/Main/Main.stories.tsx +41 -24
  285. package/src/components/Main/Main.tsx +139 -83
  286. package/src/components/{Menus → Menu}/ContextMenu.stories.tsx +2 -3
  287. package/src/components/{Menus → Menu}/ContextMenu.tsx +9 -33
  288. package/src/components/{Menus → Menu}/DropdownMenu.stories.tsx +2 -3
  289. package/src/components/{Menus → Menu}/DropdownMenu.tsx +115 -107
  290. package/src/components/Message/Message.stories.tsx +27 -13
  291. package/src/components/Message/Message.tsx +43 -34
  292. package/src/components/Popover/Popover.stories.tsx +7 -8
  293. package/src/components/Popover/Popover.tsx +97 -92
  294. package/src/components/ScrollArea/ScrollArea.stories.tsx +223 -34
  295. package/src/components/ScrollArea/ScrollArea.tsx +97 -79
  296. package/src/components/ScrollArea/index.ts +1 -1
  297. package/src/components/ScrollContainer/ScrollContainer.stories.tsx +47 -25
  298. package/src/components/ScrollContainer/ScrollContainer.tsx +225 -109
  299. package/src/components/Select/Select.stories.tsx +7 -8
  300. package/src/components/Select/Select.tsx +11 -27
  301. package/src/components/Separator/Separator.tsx +5 -8
  302. package/src/components/Skeleton/Skeleton.stories.tsx +51 -0
  303. package/src/components/Skeleton/Skeleton.tsx +26 -0
  304. package/src/components/Skeleton/index.ts +5 -0
  305. package/src/components/Splitter/Splitter.stories.tsx +83 -0
  306. package/src/components/Splitter/Splitter.tsx +127 -0
  307. package/src/components/Splitter/index.ts +5 -0
  308. package/src/components/Status/Status.stories.tsx +21 -18
  309. package/src/components/Status/Status.tsx +10 -7
  310. package/src/components/Tag/Tag.stories.tsx +6 -12
  311. package/src/components/Tag/Tag.tsx +3 -8
  312. package/src/components/ThemeProvider/ThemeProvider.stories.tsx +31 -0
  313. package/src/components/ThemeProvider/ThemeProvider.tsx +10 -10
  314. package/src/components/ThemeProvider/TranslationsProvider.tsx +1 -16
  315. package/src/components/ThemeProvider/index.ts +3 -3
  316. package/src/components/Toast/Toast.stories.tsx +2 -3
  317. package/src/components/Toast/Toast.tsx +22 -41
  318. package/src/components/Toolbar/Toolbar.stories.tsx +2 -3
  319. package/src/components/Toolbar/Toolbar.tsx +185 -23
  320. package/src/components/Tooltip/Tooltip.stories.tsx +20 -19
  321. package/src/components/Tooltip/Tooltip.tsx +40 -38
  322. package/src/components/index.ts +11 -6
  323. package/src/exemplars/generics.stories.tsx +41 -0
  324. package/src/exemplars/slot.stories.tsx +117 -0
  325. package/src/exemplars/tabster.stories.tsx +127 -0
  326. package/src/exemplars/virtualizer.stories.tsx +137 -0
  327. package/src/hooks/index.ts +1 -0
  328. package/src/hooks/useDensityContext.ts +3 -3
  329. package/src/hooks/useElevationContext.ts +1 -1
  330. package/src/index.ts +2 -1
  331. package/src/playground/Controls.stories.tsx +3 -10
  332. package/src/playground/Custom.stories.tsx +15 -18
  333. package/src/playground/Typography.stories.tsx +3 -3
  334. package/src/primitives/Column/AUDIT.md +148 -0
  335. package/src/primitives/Column/Column.stories.tsx +181 -0
  336. package/src/primitives/Column/Column.tsx +165 -0
  337. package/src/primitives/Column/index.ts +5 -0
  338. package/src/primitives/Container/Container.stories.tsx +29 -0
  339. package/src/primitives/Container/Container.tsx +19 -0
  340. package/src/primitives/Container/index.ts +5 -0
  341. package/src/primitives/Flex/Flex.stories.tsx +57 -0
  342. package/src/primitives/Flex/Flex.tsx +27 -0
  343. package/src/primitives/Flex/index.ts +5 -0
  344. package/src/primitives/Grid/Grid.stories.tsx +56 -0
  345. package/src/primitives/Grid/Grid.tsx +30 -0
  346. package/src/primitives/Grid/index.ts +5 -0
  347. package/src/primitives/Panel/Panel.stories.tsx +68 -0
  348. package/src/primitives/Panel/Panel.tsx +120 -0
  349. package/src/primitives/Panel/index.ts +5 -0
  350. package/src/primitives/index.ts +9 -0
  351. package/src/testing/Loading.tsx +47 -0
  352. package/src/testing/decorators/withLayout.tsx +39 -18
  353. package/src/testing/decorators/withLayoutVariants.tsx +20 -23
  354. package/src/testing/decorators/withTheme.tsx +26 -20
  355. package/src/testing/index.ts +2 -0
  356. package/src/translations.ts +19 -0
  357. package/src/util/index.ts +2 -2
  358. package/src/util/usePx.ts +1 -0
  359. package/dist/lib/browser/chunk-N5GDJTT2.mjs +0 -4707
  360. package/dist/lib/browser/chunk-N5GDJTT2.mjs.map +0 -7
  361. package/dist/lib/node-esm/chunk-SP7VQH72.mjs +0 -4709
  362. package/dist/lib/node-esm/chunk-SP7VQH72.mjs.map +0 -7
  363. package/dist/types/src/components/AnchoredOverflow/AnchoredOverflow.d.ts +0 -15
  364. package/dist/types/src/components/AnchoredOverflow/AnchoredOverflow.d.ts.map +0 -1
  365. package/dist/types/src/components/AnchoredOverflow/index.d.ts +0 -2
  366. package/dist/types/src/components/AnchoredOverflow/index.d.ts.map +0 -1
  367. package/dist/types/src/components/Menus/ContextMenu.d.ts.map +0 -1
  368. package/dist/types/src/components/Menus/ContextMenu.stories.d.ts.map +0 -1
  369. package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +0 -1
  370. package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts.map +0 -1
  371. package/dist/types/src/components/Menus/index.d.ts.map +0 -1
  372. package/dist/types/src/util/ThemedClassName.d.ts +0 -5
  373. package/dist/types/src/util/ThemedClassName.d.ts.map +0 -1
  374. package/dist/types/src/util/domino.d.ts +0 -18
  375. package/dist/types/src/util/domino.d.ts.map +0 -1
  376. package/src/components/AnchoredOverflow/AnchoredOverflow.tsx +0 -59
  377. package/src/components/AnchoredOverflow/index.ts +0 -5
  378. package/src/util/ThemedClassName.ts +0 -7
  379. package/src/util/domino.ts +0 -53
  380. /package/dist/types/src/components/{Menus → Menu}/ContextMenu.stories.d.ts +0 -0
  381. /package/dist/types/src/components/{Menus → Menu}/index.d.ts +0 -0
  382. /package/src/components/{Menus → Menu}/index.ts +0 -0
@@ -1,111 +1,135 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
+ ErrorStack,
3
4
  ThemeProvider,
4
- Tooltip
5
- } from "../chunk-SP7VQH72.mjs";
5
+ Tooltip,
6
+ parseCaptureOwnerStack
7
+ } from "../chunk-QUD5P3RU.mjs";
6
8
 
7
9
  // src/testing/decorators/withLayout.tsx
8
- import React from "react";
9
- import { mx } from "@dxos/react-ui-theme";
10
- var withLayout = (props) => (Story) => {
10
+ import React, { memo } from "react";
11
+ import { mx } from "@dxos/ui-theme";
12
+ var withLayout = (props = {}) => (Story) => {
13
+ const MemoizedStory = /* @__PURE__ */ memo(Story);
11
14
  if (typeof props === "function") {
12
- const Container3 = props;
13
- return /* @__PURE__ */ React.createElement(Container3, null, /* @__PURE__ */ React.createElement(Story, null));
15
+ const Container2 = props;
16
+ return /* @__PURE__ */ React.createElement(Container2, null, /* @__PURE__ */ React.createElement(MemoizedStory, null));
17
+ } else {
18
+ const { layout = "default", classNames, scroll } = props;
19
+ const Container2 = layouts[layout] ?? layouts.fullscreen;
20
+ return /* @__PURE__ */ React.createElement(Container2, {
21
+ classNames: mx(classNames, scroll ? "overflow-y-auto" : "overflow-hidden")
22
+ }, /* @__PURE__ */ React.createElement(MemoizedStory, null));
14
23
  }
15
- const Container2 = layouts[props.container] ?? layouts.default;
16
- return /* @__PURE__ */ React.createElement(Container2, {
17
- classNames: mx(props.classNames, props.scroll ? "overflow-y-auto" : "overflow-hidden")
18
- }, /* @__PURE__ */ React.createElement(Story, null));
19
24
  };
20
25
  var layouts = {
21
- default: ({ children, classNames }) => /* @__PURE__ */ React.createElement("div", {
26
+ default: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
27
+ role: "none",
28
+ className: mx("p-4", classNames)
29
+ }, children),
30
+ fullscreen: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
22
31
  role: "none",
23
- className: mx(classNames)
32
+ className: mx("fixed inset-0 flex overflow-hidden bg-black", classNames)
24
33
  }, children),
25
- column: ({ children, classNames }) => /* @__PURE__ */ React.createElement("div", {
34
+ centered: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
35
+ role: "none",
36
+ className: mx("fixed inset-0 grid overflow-hidden place-items-center bg-black")
37
+ }, /* @__PURE__ */ React.createElement("div", {
26
38
  role: "none",
27
- className: "fixed inset-0 flex justify-center overflow-hidden bg-deckSurface"
39
+ className: mx("flex flex-col bg-base-surface", classNames)
40
+ }, children)),
41
+ column: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
42
+ role: "none",
43
+ className: "fixed inset-0 flex overflow-hidden justify-center bg-black"
28
44
  }, /* @__PURE__ */ React.createElement("div", {
29
45
  role: "none",
30
- className: mx("flex flex-col is-[40rem] bg-baseSurface", classNames)
46
+ className: mx("flex flex-col w-[40rem] bg-base-surface", classNames)
31
47
  }, children))
32
48
  };
33
49
 
34
50
  // src/testing/decorators/withLayoutVariants.tsx
35
- import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
36
51
  import React2 from "react";
37
- import { mx as mx2, surfaceShadow } from "@dxos/react-ui-theme";
38
- var Container = ({ children, elevation, surface }) => {
39
- var _effect = _useSignals();
40
- try {
41
- return /* @__PURE__ */ React2.createElement("div", {
42
- className: mx2("rounded-md border border-separator p-2", surface, surfaceShadow({
43
- elevation
44
- }))
45
- }, children);
46
- } finally {
47
- _effect.f();
48
- }
49
- };
52
+ import { mx as mx2, surfaceShadow } from "@dxos/ui-theme";
53
+ var Container = ({ children, elevation, surface }) => /* @__PURE__ */ React2.createElement("div", {
54
+ className: mx2("p-4 rounded-sm", surface, surfaceShadow({
55
+ elevation
56
+ }))
57
+ }, children);
50
58
  var Panel = ({ Story, elevations, densities, className }) => {
51
- var _effect = _useSignals();
52
- try {
53
- return /* @__PURE__ */ React2.createElement("div", {
54
- className: mx2("flex flex-col bs-full p-4 gap-4", className)
55
- }, elevations?.map(({ elevation, surface }) => densities?.map((density) => /* @__PURE__ */ React2.createElement(Container, {
56
- key: `${elevation}--${density}`,
57
- surface,
58
- elevation
59
- }, /* @__PURE__ */ React2.createElement(Story, null)))));
60
- } finally {
61
- _effect.f();
62
- }
59
+ return /* @__PURE__ */ React2.createElement("div", {
60
+ className: mx2("flex flex-col h-full p-8 gap-8", className)
61
+ }, elevations?.map(({ elevation, surface }) => densities?.map((density) => /* @__PURE__ */ React2.createElement(Container, {
62
+ key: `${elevation}--${density}`,
63
+ surface,
64
+ elevation
65
+ }, /* @__PURE__ */ React2.createElement(Story, null)))));
63
66
  };
64
67
  var withLayoutVariants = ({ elevations = [
65
68
  {
66
- elevation: "base",
67
- surface: "bg-baseSurface"
69
+ elevation: "dialog",
70
+ surface: "bg-modal-surface"
68
71
  },
69
72
  {
70
73
  elevation: "positioned",
71
- surface: "bg-cardSurface"
74
+ surface: "bg-card-surface"
72
75
  },
73
76
  {
74
- elevation: "dialog",
75
- surface: "bg-modalSurface"
77
+ elevation: "base",
78
+ surface: "bg-base-surface"
76
79
  }
77
80
  ], densities = [
78
81
  "coarse"
79
82
  ] } = {}) => {
80
- return (Story) => /* @__PURE__ */ React2.createElement("div", {
81
- className: "fixed inset-0 grid grid-cols-2 overflow-y-auto"
82
- }, /* @__PURE__ */ React2.createElement(Panel, {
83
+ return (Story) => /* @__PURE__ */ React2.createElement(Panel, {
83
84
  Story,
84
- className: "light",
85
85
  elevations,
86
86
  densities
87
- }), /* @__PURE__ */ React2.createElement(Panel, {
88
- Story,
89
- className: "dark",
90
- elevations,
91
- densities
92
- }));
87
+ });
93
88
  };
94
89
 
95
90
  // src/testing/decorators/withTheme.tsx
96
- import React3, { memo } from "react";
97
- import { defaultTx } from "@dxos/react-ui-theme";
98
- var withTheme = (Story, context) => {
91
+ import React3 from "react";
92
+ import { defaultTx } from "@dxos/ui-theme";
93
+ var withTheme = ({ tx = defaultTx, noCache, platform } = {}) => (Story, context) => {
99
94
  const { globals: { theme }, parameters: { translations } } = context;
100
- const MemoizedStory = /* @__PURE__ */ memo(Story);
101
95
  return /* @__PURE__ */ React3.createElement(ThemeProvider, {
102
- tx: defaultTx,
96
+ tx,
103
97
  themeMode: theme,
104
98
  resourceExtensions: translations,
105
- noCache: true
106
- }, /* @__PURE__ */ React3.createElement(Tooltip.Provider, null, /* @__PURE__ */ React3.createElement(MemoizedStory, null)));
99
+ noCache,
100
+ platform
101
+ }, /* @__PURE__ */ React3.createElement(Tooltip.Provider, null, /* @__PURE__ */ React3.createElement(Story, null)));
102
+ };
103
+
104
+ // src/testing/Loading.tsx
105
+ import React4, { captureOwnerStack, useEffect, useState } from "react";
106
+ import { mx as mx3 } from "@dxos/ui-theme";
107
+ import { safeStringify } from "@dxos/util";
108
+ var Loading = ({ data }) => {
109
+ const [visible, setVisible] = useState(false);
110
+ const ownerFrames = parseCaptureOwnerStack(captureOwnerStack());
111
+ useEffect(() => {
112
+ const t = setTimeout(() => setVisible(true), 500);
113
+ return () => clearTimeout(t);
114
+ }, []);
115
+ return /* @__PURE__ */ React4.createElement("div", {
116
+ className: "w-full p-2"
117
+ }, /* @__PURE__ */ React4.createElement("div", {
118
+ className: mx3("flex flex-col w-full p-2 border-2 border-teal-500 rounded-md", "opacity-0 transition delay-1000 duration-1000", visible && "opacity-100")
119
+ }, /* @__PURE__ */ React4.createElement("h2", {
120
+ className: "uppercase capitalize text-xs"
121
+ }, "Loading State"), /* @__PURE__ */ React4.createElement("pre", {
122
+ className: "text-sm text-description"
123
+ }, safeStringify(data, void 0, 2)), /* @__PURE__ */ React4.createElement("h3", {
124
+ className: "uppercase capitalize text-xs mt-2"
125
+ }, "Owner stack"), ownerFrames && ownerFrames.length > 0 ? /* @__PURE__ */ React4.createElement(ErrorStack, {
126
+ frames: ownerFrames
127
+ }) : /* @__PURE__ */ React4.createElement("p", {
128
+ className: "text-xs text-subdued"
129
+ }, "No owner stack (production build or unsupported context).")));
107
130
  };
108
131
  export {
132
+ Loading,
109
133
  withLayout,
110
134
  withLayoutVariants,
111
135
  withTheme
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/testing/decorators/withLayout.tsx", "../../../../src/testing/decorators/withLayoutVariants.tsx", "../../../../src/testing/decorators/withTheme.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React, { type FC, type PropsWithChildren } from 'react';\n\nimport { type ClassNameValue, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nexport type ContainerProps = ThemedClassName<PropsWithChildren>;\n\nexport type ContainerType = 'default' | 'column';\n\nexport type WithLayoutProps =\n | FC<ContainerProps>\n | { classNames?: ClassNameValue; container?: ContainerType; scroll?: boolean };\n\n/**\n * Adds layout container.\n */\nexport const withLayout =\n (props: WithLayoutProps): Decorator =>\n (Story) => {\n if (typeof props === 'function') {\n const Container = props;\n return (\n <Container>\n <Story />\n </Container>\n );\n }\n\n const Container = layouts[(props as any).container as ContainerType] ?? layouts.default;\n return (\n <Container classNames={mx(props.classNames, props.scroll ? 'overflow-y-auto' : 'overflow-hidden')}>\n <Story />\n </Container>\n );\n };\n\nconst layouts: Record<ContainerType, FC<ContainerProps>> = {\n default: ({ children, classNames }: ContainerProps) => (\n <div role='none' className={mx(classNames)}>\n {children}\n </div>\n ),\n\n column: ({ children, classNames }: ContainerProps) => (\n <div role='none' className='fixed inset-0 flex justify-center overflow-hidden bg-deckSurface'>\n <div role='none' className={mx('flex flex-col is-[40rem] bg-baseSurface', classNames)}>\n {children}\n </div>\n </div>\n ),\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React, { type ComponentType, type PropsWithChildren } from 'react';\n\nimport { mx, surfaceShadow } from '@dxos/react-ui-theme';\nimport { type Density, type Elevation } from '@dxos/react-ui-types';\n\ntype Config = {\n elevations?: { elevation: Elevation; surface?: string }[];\n densities?: Density[];\n};\n\nconst Container = ({ children, elevation, surface }: PropsWithChildren<{ elevation: Elevation; surface?: string }>) => (\n <div className={mx('rounded-md border border-separator p-2', surface, surfaceShadow({ elevation }))}>{children}</div>\n);\n\nconst Panel = ({\n Story,\n elevations,\n densities,\n className,\n}: { Story: ComponentType } & Config & { className?: string }) => (\n <div className={mx('flex flex-col bs-full p-4 gap-4', className)}>\n {elevations?.map(({ elevation, surface }) =>\n densities?.map((density) => (\n <Container key={`${elevation}--${density}`} surface={surface} elevation={elevation}>\n <Story />\n </Container>\n )),\n )}\n </div>\n);\n\nexport const withLayoutVariants = ({\n elevations = [\n { elevation: 'base', surface: 'bg-baseSurface' },\n { elevation: 'positioned', surface: 'bg-cardSurface' },\n { elevation: 'dialog', surface: 'bg-modalSurface' },\n ],\n densities = ['coarse'],\n}: Config = {}): Decorator => {\n return (Story) => (\n <div className='fixed inset-0 grid grid-cols-2 overflow-y-auto'>\n <Panel Story={Story} className='light' elevations={elevations} densities={densities} />\n <Panel Story={Story} className='dark' elevations={elevations} densities={densities} />\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React, { memo } from 'react';\n\nimport { defaultTx } from '@dxos/react-ui-theme';\n\nimport { type ThemeMode, ThemeProvider, Tooltip } from '../../components';\n\n/**\n * Adds theme decorator (add to preview.ts)\n */\nexport const withTheme: Decorator = (Story, context) => {\n const {\n globals: { theme },\n parameters: { translations },\n } = context;\n\n // Prevent re-rendering of the story.\n const MemoizedStory = memo(Story);\n\n return (\n <ThemeProvider tx={defaultTx} themeMode={theme as ThemeMode} resourceExtensions={translations} noCache>\n <Tooltip.Provider>\n <MemoizedStory />\n </Tooltip.Provider>\n </ThemeProvider>\n );\n};\n"],
5
- "mappings": ";;;;;;;AAKA,OAAOA,WAAgD;AAGvD,SAASC,UAAU;AAaZ,IAAMC,aACX,CAACC,UACD,CAACC,UAAAA;AACC,MAAI,OAAOD,UAAU,YAAY;AAC/B,UAAME,aAAYF;AAClB,WACE,sBAAA,cAACE,YAAAA,MACC,sBAAA,cAACD,OAAAA,IAAAA,CAAAA;EAGP;AAEA,QAAMC,aAAYC,QAASH,MAAcI,SAAS,KAAsBD,QAAQE;AAChF,SACE,sBAAA,cAACH,YAAAA;IAAUI,YAAYC,GAAGP,MAAMM,YAAYN,MAAMQ,SAAS,oBAAoB,iBAAA;KAC7E,sBAAA,cAACP,OAAAA,IAAAA,CAAAA;AAGP;AAEF,IAAME,UAAqD;EACzDE,SAAS,CAAC,EAAEI,UAAUH,WAAU,MAC9B,sBAAA,cAACI,OAAAA;IAAIC,MAAK;IAAOC,WAAWL,GAAGD,UAAAA;KAC5BG,QAAAA;EAILI,QAAQ,CAAC,EAAEJ,UAAUH,WAAU,MAC7B,sBAAA,cAACI,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,sBAAA,cAACF,OAAAA;IAAIC,MAAK;IAAOC,WAAWL,GAAG,2CAA2CD,UAAAA;KACvEG,QAAAA,CAAAA;AAIT;;;;AClDA,OAAOK,YAA2D;AAElE,SAASC,MAAAA,KAAIC,qBAAqB;AAQlC,IAAMC,YAAY,CAAC,EAAEC,UAAUC,WAAWC,QAAO,MAAiE;;;WAChH,gBAAAC,OAAA,cAACC,OAAAA;MAAIC,WAAWC,IAAG,0CAA0CJ,SAASK,cAAc;QAAEN;MAAU,CAAA,CAAA;OAAMD,QAAAA;;;;;AAGxG,IAAMQ,QAAQ,CAAC,EACbC,OACAC,YACAC,WACAN,UAAS,MACkD;;;WAC3D,gBAAAF,OAAA,cAACC,OAAAA;MAAIC,WAAWC,IAAG,mCAAmCD,SAAAA;OACnDK,YAAYE,IAAI,CAAC,EAAEX,WAAWC,QAAO,MACpCS,WAAWC,IAAI,CAACC,YACd,gBAAAV,OAAA,cAACJ,WAAAA;MAAUe,KAAK,GAAGb,SAAAA,KAAcY,OAAAA;MAAWX;MAAkBD;OAC5D,gBAAAE,OAAA,cAACM,OAAAA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA;;;;;AAOJ,IAAMM,qBAAqB,CAAC,EACjCL,aAAa;EACX;IAAET,WAAW;IAAQC,SAAS;EAAiB;EAC/C;IAAED,WAAW;IAAcC,SAAS;EAAiB;EACrD;IAAED,WAAW;IAAUC,SAAS;EAAkB;GAEpDS,YAAY;EAAC;EAAS,IACZ,CAAC,MAAC;AACZ,SAAO,CAACF,UACN,gBAAAN,OAAA,cAACC,OAAAA;IAAIC,WAAU;KACb,gBAAAF,OAAA,cAACK,OAAAA;IAAMC;IAAcJ,WAAU;IAAQK;IAAwBC;MAC/D,gBAAAR,OAAA,cAACK,OAAAA;IAAMC;IAAcJ,WAAU;IAAOK;IAAwBC;;AAGpE;;;AC7CA,OAAOK,UAASC,YAAY;AAE5B,SAASC,iBAAiB;AAOnB,IAAMC,YAAuB,CAACC,OAAOC,YAAAA;AAC1C,QAAM,EACJC,SAAS,EAAEC,MAAK,GAChBC,YAAY,EAAEC,aAAY,EAAE,IAC1BJ;AAGJ,QAAMK,gBAAgBC,qBAAKP,KAAAA;AAE3B,SACE,gBAAAQ,OAAA,cAACC,eAAAA;IAAcC,IAAIC;IAAWC,WAAWT;IAAoBU,oBAAoBR;IAAcS,SAAAA;KAC7F,gBAAAN,OAAA,cAACO,QAAQC,UAAQ,MACf,gBAAAR,OAAA,cAACF,eAAAA,IAAAA,CAAAA,CAAAA;AAIT;",
6
- "names": ["React", "mx", "withLayout", "props", "Story", "Container", "layouts", "container", "default", "classNames", "mx", "scroll", "children", "div", "role", "className", "column", "React", "mx", "surfaceShadow", "Container", "children", "elevation", "surface", "React", "div", "className", "mx", "surfaceShadow", "Panel", "Story", "elevations", "densities", "map", "density", "key", "withLayoutVariants", "React", "memo", "defaultTx", "withTheme", "Story", "context", "globals", "theme", "parameters", "translations", "MemoizedStory", "memo", "React", "ThemeProvider", "tx", "defaultTx", "themeMode", "resourceExtensions", "noCache", "Tooltip", "Provider"]
3
+ "sources": ["../../../../src/testing/decorators/withLayout.tsx", "../../../../src/testing/decorators/withLayoutVariants.tsx", "../../../../src/testing/decorators/withTheme.tsx", "../../../../src/testing/Loading.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React, { type FC, type PropsWithChildren, memo } from 'react';\n\nimport { type ClassNameValue, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nexport type ContainerProps = ThemedClassName<PropsWithChildren>;\n\nexport type ContainerType = 'default' | 'fullscreen' | 'centered' | 'column';\n\nexport type WithLayoutProps =\n | FC<ContainerProps>\n | {\n classNames?: ClassNameValue;\n layout?: ContainerType;\n scroll?: boolean;\n };\n\n/**\n * Adds layout container.\n */\nexport const withLayout =\n (props: WithLayoutProps = {}): Decorator =>\n (Story) => {\n // Prevent re-rendering of the story.\n const MemoizedStory = memo(Story);\n if (typeof props === 'function') {\n const Container = props;\n return (\n <Container>\n <MemoizedStory />\n </Container>\n );\n } else {\n const { layout = 'default', classNames, scroll } = props;\n const Container = layouts[layout] ?? layouts.fullscreen;\n return (\n <Container classNames={mx(classNames, scroll ? 'overflow-y-auto' : 'overflow-hidden')}>\n <MemoizedStory />\n </Container>\n );\n }\n };\n\nconst layouts: Record<ContainerType, FC<ContainerProps>> = {\n default: ({ classNames, children }: ContainerProps) => (\n <div role='none' className={mx('p-4', classNames)}>\n {children}\n </div>\n ),\n\n fullscreen: ({ classNames, children }: ContainerProps) => (\n <div role='none' className={mx('fixed inset-0 flex overflow-hidden bg-black', classNames)}>\n {children}\n </div>\n ),\n\n centered: ({ classNames, children }: ContainerProps) => (\n <div role='none' className={mx('fixed inset-0 grid overflow-hidden place-items-center bg-black')}>\n <div role='none' className={mx('flex flex-col bg-base-surface', classNames)}>\n {children}\n </div>\n </div>\n ),\n\n column: ({ classNames, children }: ContainerProps) => (\n <div role='none' className='fixed inset-0 flex overflow-hidden justify-center bg-black'>\n <div role='none' className={mx('flex flex-col w-[40rem] bg-base-surface', classNames)}>\n {children}\n </div>\n </div>\n ),\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React, { type ComponentType, type PropsWithChildren } from 'react';\n\nimport { mx, surfaceShadow } from '@dxos/ui-theme';\nimport { type Density, type Elevation } from '@dxos/ui-types';\n\ntype Config = {\n elevations?: { elevation: Elevation; surface?: string }[];\n densities?: Density[];\n};\n\nconst Container = ({ children, elevation, surface }: PropsWithChildren<{ elevation: Elevation; surface?: string }>) => (\n <div className={mx('p-4 rounded-sm', surface, surfaceShadow({ elevation }))}>{children}</div>\n);\n\nconst Panel = ({\n Story,\n elevations,\n densities,\n className,\n}: { Story: ComponentType } & Config & { className?: string }) => {\n return (\n <div className={mx('flex flex-col h-full p-8 gap-8', className)}>\n {elevations?.map(({ elevation, surface }) =>\n densities?.map((density) => (\n <Container key={`${elevation}--${density}`} surface={surface} elevation={elevation}>\n <Story />\n </Container>\n )),\n )}\n </div>\n );\n};\n\nexport const withLayoutVariants = ({\n elevations = [\n { elevation: 'dialog', surface: 'bg-modal-surface' },\n { elevation: 'positioned', surface: 'bg-card-surface' },\n { elevation: 'base', surface: 'bg-base-surface' },\n ],\n densities = ['coarse'],\n}: Config = {}): Decorator => {\n return (Story) => <Panel Story={Story} elevations={elevations} densities={densities} />;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React from 'react';\n\nimport { defaultTx } from '@dxos/ui-theme';\nimport { type ThemeMode } from '@dxos/ui-types';\n\nimport { type ThemeContextValue, ThemeProvider, Tooltip } from '../../components';\n\n/**\n * Adds theme decorator.\n */\nexport const withTheme =\n ({ tx = defaultTx, noCache, platform }: Partial<ThemeContextValue> = {}): Decorator =>\n (Story, context) => {\n const {\n globals: { theme },\n parameters: { translations },\n } = context;\n\n return (\n <ThemeProvider\n tx={tx}\n themeMode={theme as ThemeMode}\n resourceExtensions={translations}\n noCache={noCache}\n platform={platform}\n >\n <Tooltip.Provider>\n <Story />\n </Tooltip.Provider>\n </ThemeProvider>\n );\n };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { captureOwnerStack, useEffect, useState } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { safeStringify } from '@dxos/util';\n\nimport { ErrorStack, parseCaptureOwnerStack } from '../components';\n\nexport type LoadingProps = { data?: any };\n\n/**\n * Storybook loading component.\n */\nexport const Loading = ({ data }: LoadingProps) => {\n const [visible, setVisible] = useState(false);\n const ownerFrames = parseCaptureOwnerStack(captureOwnerStack());\n\n useEffect(() => {\n const t = setTimeout(() => setVisible(true), 500);\n return () => clearTimeout(t);\n }, []);\n\n return (\n <div className='w-full p-2'>\n <div\n className={mx(\n 'flex flex-col w-full p-2 border-2 border-teal-500 rounded-md',\n 'opacity-0 transition delay-1000 duration-1000',\n visible && 'opacity-100',\n )}\n >\n <h2 className='uppercase capitalize text-xs'>Loading State</h2>\n <pre className='text-sm text-description'>{safeStringify(data, undefined, 2)}</pre>\n\n <h3 className='uppercase capitalize text-xs mt-2'>Owner stack</h3>\n {ownerFrames && ownerFrames.length > 0 ? (\n <ErrorStack frames={ownerFrames} />\n ) : (\n <p className='text-xs text-subdued'>No owner stack (production build or unsupported context).</p>\n )}\n </div>\n </div>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;AAKA,OAAOA,SAA0CC,YAAY;AAG7D,SAASC,UAAU;AAiBZ,IAAMC,aACX,CAACC,QAAyB,CAAC,MAC3B,CAACC,UAAAA;AAEC,QAAMC,gBAAgBC,qBA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U;AACnB,SAASC,qBAAqB;AASvB,IAAMC,UAAU,CAAC,EAAEC,KAAI,MAAgB;AAC5C,QAAM,CAACC,SAASC,UAAAA,IAAcC,SAAS,KAAA;AACvC,QAAMC,cAAcC,uBAAuBC,kBAAAA,CAAAA;AAE3CC,YAAU,MAAA;AACR,UAAMC,IAAIC,WAAW,MAAMP,WAAW,IAAA,GAAO,GAAA;AAC7C,WAAO,MAAMQ,aAAaF,CAAAA;EAC5B,GAAG,CAAA,CAAE;AAEL,SACE,gBAAAG,OAAA,cAACC,OAAAA;IAAIC,WAAU;KACb,gBAAAF,OAAA,cAACC,OAAAA;IACCC,WAAWC,IACT,gEACA,iDACAb,WAAW,aAAA;KAGb,gBAAAU,OAAA,cAACI,MAAAA;IAAGF,WAAU;KAA+B,eAAA,GAC7C,gBAAAF,OAAA,cAACK,OAAAA;IAAIH,WAAU;KAA4BI,cAAcjB,MAAMkB,QAAW,CAAA,CAAA,GAE1E,gBAAAP,OAAA,cAACQ,MAAAA;IAAGN,WAAU;KAAoC,aAAA,GACjDT,eAAeA,YAAYgB,SAAS,IACnC,gBAAAT,OAAA,cAACU,YAAAA;IAAWC,QAAQlB;OAEpB,gBAAAO,OAAA,cAACY,KAAAA;IAAEV,WAAU;KAAuB,2DAAA,CAAA,CAAA;AAK9C;",
6
+ "names": ["React", "memo", "mx", "withLayout", "props", "Story", "MemoizedStory", "memo", "Container", "layout", "classNames", "scroll", "layouts", "fullscreen", "mx", "default", "children", "div", "role", "className", "centered", "column", "React", "mx", "surfaceShadow", "Container", "children", "elevation", "surface", "React", "div", "className", "mx", "surfaceShadow", "Panel", "Story", "elevations", "densities", "map", "density", "key", "withLayoutVariants", "React", "defaultTx", "withTheme", "tx", "defaultTx", "noCache", "platform", "Story", "context", "globals", "theme", "parameters", "translations", "React", "ThemeProvider", "themeMode", "resourceExtensions", "Tooltip", "Provider", "React", "captureOwnerStack", "useEffect", "useState", "mx", "safeStringify", "Loading", "data", "visible", "setVisible", "useState", "ownerFrames", "parseCaptureOwnerStack", "captureOwnerStack", "useEffect", "t", "setTimeout", "clearTimeout", "React", "div", "className", "mx", "h2", "pre", "safeStringify", "undefined", "h3", "length", "ErrorStack", "frames", "p"]
7
7
  }
@@ -1,6 +1,6 @@
1
- import '@dxos/lit-ui/dx-avatar.pcss';
2
1
  import { Primitive } from '@radix-ui/react-primitive';
3
2
  import React, { type ComponentProps, type ComponentPropsWithRef, type PropsWithChildren } from 'react';
3
+ import '@dxos/lit-ui/dx-avatar.pcss';
4
4
  import { type AvatarAnimation, type AvatarStatus, type AvatarVariant, type DxAvatar as NaturalDxAvatar } from '@dxos/lit-ui';
5
5
  import { DxAvatar } from '@dxos/lit-ui/react';
6
6
  import { type ThemedClassName } from '../../util';
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatars/Avatar.tsx"],"names":[],"mappings":"AAIA,OAAO,6BAA6B,CAAC;AAGrC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAEnH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,QAAQ,IAAI,eAAe,EACjC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAK9C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAE7E,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAGF,QAAA,MAAuB,gBAAgB,8CAAkD,CAAC;AAQ1F,KAAK,kBAAkB,GAAG,eA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CAAC;AAEF,eAAO,MAAM,KAAK,yBAIjB,CAAC;AAEF,eAAO,MAAM,WAAW,yBAIvB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAOlB,CAAC;AAEF,eAAO,MAAM,YAAY,yBAOxB,CAAC;AAEF,eAAO,MAAM,WAAW,yBAA4D,CAAC;AAErF,eAAO,MAAM,WAAW,yBASvB,CAAC;AAEF,eAAO,MAAM,KAAK,yBAA8D,CAAC;AAEjF,eAAO,MAAM,KAAK,yBAOjB,CAAC"}
1
+ {"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatars/Avatar.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAmDtD,QAAA,MAAM,IAAI;;;;CAI0B,CAAC;AAErC,eAAe,IAAI,CAAC;AAepB,eAAO,MAAM,OAAO,yBAenB,CAAC;AAEF,eAAO,MAAM,KAAK,yBAIjB,CAAC;AAEF,eAAO,MAAM,WAAW,yBAIvB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAOlB,CAAC;AAEF,eAAO,MAAM,YAAY,yBAOxB,CAAC;AAEF,eAAO,MAAM,WAAW,yBAA4D,CAAC;AAErF,eAAO,MAAM,WAAW,yBASvB,CAAC;AAEF,eAAO,MAAM,KAAK,yBAA8D,CAAC;AAEjF,eAAO,MAAM,KAAK,yBAOjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarGroup.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatars/AvatarGroup.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAkC1B,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
1
+ {"version":3,"file":"AvatarGroup.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatars/AvatarGroup.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAiC1B,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../../../src/components/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAGrG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,KAAK,mBAAmB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG;IACxF,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAiBF,KAAK,mBAAmB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAiB/G,KAAK,uBAAuB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAiBnH,KAAK,mBA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;AAUnH,KAAK,mBAAmB,GAAG,SAAS,CAAC;AAOrC,KAAK,sBAAsB,GAAG,eAAe,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAYnG,KAAK,wBAAwB,GAAG,eAAe,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AAgBjG,eAAO,MAAM,UAAU;;;;;;oDAd0C,wBAAwB;CAqBxF,CAAC;AAEF,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,GACzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Breadcrumb/Breadcrumb.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA8BpE,QAAA,MAAM,IAAI;;eAEsB,GAAG;oBA9BN,mBAAmB;;CAiCX,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
1
+ {"version":3,"file":"Breadcrumb.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Breadcrumb/Breadcrumb.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA8BpE,QAAA,MAAM,IAAI;;eAEsB,GAAG;oBA9BN,mBAAmB;;CAiCX,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { Primitive } from '@radix-ui/react-primitive';
2
2
  import React, { type ComponentPropsWithRef } from 'react';
3
- import { type Density, type Elevation } from '@dxos/react-ui-types';
3
+ import { type Density, type Elevation } from '@dxos/ui-types';
4
4
  import { type ThemedClassName } from '../../util';
5
- interface ButtonProps extends ThemedClassName<ComponentPropsWithRef<typeof Primitive.button>> {
5
+ type ButtonProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.button>> & {
6
6
  variant?: 'default' | 'primary' | 'outline' | 'ghost' | 'destructive';
7
7
  density?: Density;
8
8
  elevation?: Elevation;
9
9
  asChild?: boolean;
10
- }
10
+ };
11
11
  type ButtonGroupContextValue = {
12
12
  inGroup?: boolean;
13
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAoB,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGpE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,UAAU,WAAY,SAAQ,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;IAC3F,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAA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E,OAAO,CAAA;CAAE,CAAC;AAErD,QAAA,MAAM,iBAAiB,gBAAgB,CAAC;AAGxC,QAAA,MAA4B,qBAAqB,mDAE/C,CAAC;AAEH,QAAA,MAAM,MAAM,+FAoCX,CAAC;AAIF,KAAK,gBAAgB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG;IACrF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,WAAW,sGAWhB,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAC;AAEzE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Button.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAuBjE,QAAA,MAAM,IAAI;;;oCArBmC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;;CA0BtC,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAInC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC"}
1
+ {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Button.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAuBjE,QAAA,MAAM,IAAI;;;oCArBmC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;;CA0BtC,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAInC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC"}
@@ -5,9 +5,10 @@ import { type TooltipSide } from '../Tooltip';
5
5
  import { type ButtonProps } from './Button';
6
6
  type IconButtonProps = Omit<ButtonProps, 'children'> & Partial<Pick<IconProps, 'icon' | 'size'>> & {
7
7
  label: string;
8
- iconOnly?: boolean;
9
8
  noTooltip?: boolean;
10
9
  caretDown?: boolean;
10
+ iconOnly?: boolean;
11
+ iconEnd?: boolean;
11
12
  iconClassNames?: ThemedClassName<any>['classNames'];
12
13
  tooltipSide?: TooltipSide;
13
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/IconButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAW,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,KAAK,eAAe,G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AAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEJ,QAAA,MAAM,UAAU,wGAMf,CAAC;AAiCF,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -6,6 +6,9 @@ declare const meta: {
6
6
  component: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
7
  render: any;
8
8
  decorators: import("@storybook/react").Decorator[];
9
+ parameters: {
10
+ layout: string;
11
+ };
9
12
  };
10
13
  export default meta;
11
14
  type Story = StoryObj<typeof meta>;
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/IconButton.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAehE,QAAA,MAAM,IAAI;;;YAGgB,GAAG;;CAEM,CAAC;AAEpC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC"}
1
+ {"version":3,"file":"IconButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/IconButton.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAchE,QAAA,MAAM,IAAI;;;YAGgB,GAAG;;;;;CAKM,CAAC;AAEpC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC"}
@@ -1,7 +1,7 @@
1
- import { type ToggleProps as TogglePrimitiveProps } from '@radix-ui/react-toggle';
1
+ import * as TogglePrimitive from '@radix-ui/react-toggle';
2
2
  import React from 'react';
3
3
  import { type ButtonProps } from './Button';
4
- type ToggleProps = Omit<TogglePrimitiveProps, 'asChild'> & ButtonProps;
4
+ type ToggleProps = Omit<TogglePrimitive.ToggleProps, 'asChild'> & ButtonProps;
5
5
  declare const Toggle: React.ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
6
  export { Toggle };
7
7
  export type { ToggleProps };
@@ -1 +1 @@
1
- {"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Toggle.tsx"],"names":[],"mappings":"AAIA,OAAO,EAA6B,KAAK,WAAW,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC7G,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,KAAK,WAAW,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,GAAG,WAAW,CAAC;AAEvE,QAAA,MAAM,MAAM,oGAQX,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Toggle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,KAAK,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,WAAW,CAAC;AAE9E,QAAA,MAAM,MAAM,oGAQX,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Toggle.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Toggle.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAUpD,QAAA,MAAM,IAAI;;;oBARmB,WAAW;;;;;CAgBT,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
1
+ {"version":3,"file":"Toggle.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Toggle.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAUpD,QAAA,MAAM,IAAI;;;oBARmB,WAAW;;;;;CAgBT,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
@@ -1,26 +1,26 @@
1
- import { type ToggleGroupItemProps as ToggleGroupItemPrimitiveProps, type ToggleGroupMultipleProps, type ToggleGroupSingleProps } from '@radix-ui/react-toggle-group';
1
+ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
2
2
  import React from 'react';
3
3
  import { type ButtonProps } from './Button';
4
4
  import { type IconButtonProps } from './IconButton';
5
- type ToggleGroupProps = Omit<ToggleGroupSingleProps, 'className'> | Omit<ToggleGroupMultipleProps, 'className'>;
6
- declare const ToggleGroup: React.ForwardRefExoticComponent<(Omit<Omit<ToggleGroupSingleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
5
+ type ToggleGroupProps = Omit<ToggleGroupPrimitive.ToggleGroupSingleProps, 'className'> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps, 'className'>;
6
+ declare const ToggleGroup: React.ForwardRefExoticComponent<(Omit<Omit<ToggleGroupPrimitive.ToggleGroupSingleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
7
7
  asChild?: boolean;
8
8
  }, "className"> & {
9
- classNames?: import("@dxos/react-ui-types").ClassNameValue;
9
+ classNames?: import("@dxos/ui-types").ClassNameValue;
10
10
  } & {
11
- elevation?: import("@dxos/react-ui-types").Elevation;
11
+ elevation?: import("@dxos/ui-types").Elevation;
12
12
  asChild?: boolean;
13
- }, "ref"> | Omit<Omit<ToggleGroupMultipleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
13
+ }, "ref"> | Omit<Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
14
14
  asChild?: boolean;
15
15
  }, "className"> & {
16
- classNames?: import("@dxos/react-ui-types").ClassNameValue;
16
+ classNames?: import("@dxos/ui-types").ClassNameValue;
17
17
  } & {
18
- elevation?: import("@dxos/react-ui-types").Elevation;
18
+ elevation?: import("@dxos/ui-types").Elevation;
19
19
  asChild?: boolean;
20
20
  }, "ref">) & React.RefAttributes<HTMLDivElement>>;
21
- type ToggleGroupItemProps = Omit<ToggleGroupItemPrimitiveProps, 'className'> & ButtonProps;
21
+ type ToggleGroupItemProps = Omit<ToggleGroupPrimitive.ToggleGroupItemProps, 'className'> & ButtonProps;
22
22
  declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
23
- type ToggleGroupIconItemProps = Omit<ToggleGroupItemPrimitiveProps, 'className'> & IconButtonProps;
23
+ type ToggleGroupIconItemProps = Omit<ToggleGroupPrimitive.ToggleGroupItemProps, 'className'> & IconButtonProps;
24
24
  declare const ToggleGroupIconItem: React.ForwardRefExoticComponent<Omit<ToggleGroupIconItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
25
25
  export { ToggleGroup, ToggleGroupItem, ToggleGroupIconItem };
26
26
  export type { ToggleGroupProps, ToggleGroupItemProps };
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/ToggleGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,oBAAoB,IAAI,6BAA6B,EAC1D,KAAK,wBAAwB,EAE7B,KAAK,sBAAsB,EAC5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAA8C,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACxF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,KAAK,gBAAgB,GAAG,IAAI,CAAC,sBAAsB,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;AAEhH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;iDAQhB,CAAC;AAEF,KAAK,oBAAoB,GAAG,IAAI,CAAC,6BAA6B,EAAE,WAAW,CAAC,GAAG,WAAW,CAAC;AAE3F,QAAA,MAAM,eAAe,6GAQpB,CAAC;AAEF,KAAK,wBAAwB,GAAG,IAAI,CAAC,6BAA6B,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC;AAEnG,QAAA,MAAM,mBAAmB,iHAQxB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC;AAC7D,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"ToggleGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/ToggleGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAA8C,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACxF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,KAAK,gBAAgB,GACjB,IAAI,CAAC,oBAAoB,CAAC,sBAAsB,EAAE,WAAW,CAAC,GAC9D,IAAI,CAAC,oBAAoB,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;AAErE,QAAA,MAAM,WAAW;;;;;;;;;;;;;;iDAQhB,CAAC;AAEF,KAAK,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,WAAW,CAAC,GAAG,WAAW,CAAC;AAEvG,QAAA,MAAM,eAAe,6GAQpB,CAAC;AAEF,KAAK,wBAAwB,GAAG,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC;AAE/G,QAAA,MAAM,mBAAmB,iHAQxB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC;AAC7D,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -6,16 +6,16 @@ declare const meta: {
6
6
  component: React.ForwardRefExoticComponent<(Omit<Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
7
7
  asChild?: boolean;
8
8
  }, "className"> & {
9
- classNames?: import("@dxos/react-ui-types").ClassNameValue;
9
+ classNames?: import("@dxos/ui-types").ClassNameValue;
10
10
  } & {
11
- elevation?: import("@dxos/react-ui-types").Elevation;
11
+ elevation?: import("@dxos/ui-types").Elevation;
12
12
  asChild?: boolean;
13
13
  }, "ref"> | Omit<Omit<import("@radix-ui/react-toggle-group").ToggleGroupMultipleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
14
14
  asChild?: boolean;
15
15
  }, "className"> & {
16
- classNames?: import("@dxos/react-ui-types").ClassNameValue;
16
+ classNames?: import("@dxos/ui-types").ClassNameValue;
17
17
  } & {
18
- elevation?: import("@dxos/react-ui-types").Elevation;
18
+ elevation?: import("@dxos/ui-types").Elevation;
19
19
  asChild?: boolean;
20
20
  }, "ref">) & React.RefAttributes<HTMLDivElement>>;
21
21
  render: (props: ToggleGroupProps) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroup.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/ToggleGroup.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAgC,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAgBpF,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;oBAbmB,gBAAgB;;CAkBT,CAAC;AAErC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
1
+ {"version":3,"file":"ToggleGroup.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/ToggleGroup.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAgC,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAgBpF,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;oBAbmB,gBAAgB;;CAkBT,CAAC;AAErC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -0,0 +1,120 @@
1
+ import React, { CSSProperties, MouseEventHandler } from 'react';
2
+ import { type Density } from '@dxos/ui-types';
3
+ import { type ThemedClassName } from '../../util';
4
+ import { type IconProps } from '../Icon';
5
+ import { ToolbarCloseIconButtonProps, ToolbarDragHandleProps, type ToolbarMenuItem, type ToolbarMenuProps, type ToolbarRootProps } from '../Toolbar';
6
+ type CardContextValue = {
7
+ menuItems?: CardMenuItem<any>[];
8
+ };
9
+ type CardRootOwnProps = {
10
+ id?: string;
11
+ border?: boolean;
12
+ fullWidth?: boolean;
13
+ density?: Density;
14
+ style?: CSSProperties;
15
+ tabIndex?: number;
16
+ onClick?: MouseEventHandler<HTMLDivElement>;
17
+ 'data-selected'?: boolean;
18
+ 'data-testid'?: string;
19
+ };
20
+ type CardRootProps = CardRootOwnProps;
21
+ type CardToolbarProps = ToolbarRootProps;
22
+ type CardDragHandleProps = ToolbarDragHandleProps;
23
+ type CloseIconButtonProps = ToolbarCloseIconButtonProps;
24
+ type CardMenuItem<T extends any | void = void> = ToolbarMenuItem<T>;
25
+ type CardMenuProps<T extends any | void = void> = ToolbarMenuProps<T>;
26
+ type CardRowProps = {
27
+ icon?: string;
28
+ fullWidth?: boolean;
29
+ };
30
+ type CardHeadingProps = {
31
+ variant?: 'default' | 'subtitle';
32
+ };
33
+ type CardTextProps = {
34
+ truncate?: boolean;
35
+ variant?: 'default' | 'description';
36
+ };
37
+ type CardHtmlProps = {
38
+ html: string;
39
+ variant?: 'default' | 'description';
40
+ };
41
+ type CardPosterProps = ThemedClassName<{
42
+ alt: string;
43
+ aspect?: 'video' | 'auto';
44
+ } & Partial<{
45
+ image: string;
46
+ icon: string;
47
+ }>>;
48
+ type CardActionProps = {
49
+ icon?: string;
50
+ label: string;
51
+ actionIcon?: string;
52
+ onClick?: () => void;
53
+ };
54
+ type CardLinkProps = {
55
+ label: string;
56
+ href: string;
57
+ };
58
+ export declare const Card: {
59
+ Root: React.ForwardRefExoticComponent<Omit<CardRootOwnProps & {
60
+ asChild?: boolean;
61
+ }, "className"> & {
62
+ classNames?: import("@dxos/ui-types").ClassNameValue;
63
+ } & Pick<React.HTMLAttributes<Element>, "children" | "style" | "className" | "role"> & React.RefAttributes<HTMLDivElement>>;
64
+ Toolbar: React.ForwardRefExoticComponent<Omit<ToolbarRootProps, "className"> & {
65
+ classNames?: import("@dxos/ui-types").ClassNameValue;
66
+ } & Pick<React.HTMLAttributes<Element>, "children" | "style" | "className" | "role"> & React.RefAttributes<HTMLDivElement>>;
67
+ ToolbarIconButton: React.ForwardRefExoticComponent<Omit<import("..").IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
68
+ ToolbarSeparator: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-separator").SeparatorProps, "className"> & {
69
+ classNames?: import("@dxos/ui-types").ClassNameValue;
70
+ } & {
71
+ subdued?: boolean;
72
+ } & {
73
+ variant?: "gap" | "line";
74
+ } & React.RefAttributes<HTMLDivElement>>;
75
+ IconBlock: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<{
76
+ padding?: boolean;
77
+ }>, "className"> & {
78
+ classNames?: import("@dxos/ui-types").ClassNameValue;
79
+ } & React.RefAttributes<HTMLDivElement>>;
80
+ DragHandle: React.ForwardRefExoticComponent<ToolbarDragHandleProps & React.RefAttributes<HTMLButtonElement>>;
81
+ CloseIconButton: React.ForwardRefExoticComponent<ToolbarCloseIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
82
+ Menu: <T extends unknown = void>({ context, items, ...props }: CardMenuProps<T>) => React.JSX.Element;
83
+ Icon: (props: IconProps) => React.JSX.Element;
84
+ Title: React.ForwardRefExoticComponent<Omit<{
85
+ asChild?: boolean;
86
+ }, "className"> & {
87
+ classNames?: import("@dxos/ui-types").ClassNameValue;
88
+ } & Pick<React.HTMLAttributes<Element>, "children" | "style" | "className" | "role"> & React.RefAttributes<HTMLDivElement>>;
89
+ Content: React.ForwardRefExoticComponent<Omit<{
90
+ asChild?: boolean;
91
+ }, "className"> & {
92
+ classNames?: import("@dxos/ui-types").ClassNameValue;
93
+ } & Pick<React.HTMLAttributes<Element>, "children" | "style" | "className" | "role"> & React.RefAttributes<HTMLDivElement>>;
94
+ Row: React.ForwardRefExoticComponent<Omit<CardRowProps & {
95
+ asChild?: boolean;
96
+ }, "className"> & {
97
+ classNames?: import("@dxos/ui-types").ClassNameValue;
98
+ } & Pick<React.HTMLAttributes<Element>, "children" | "style" | "className" | "role"> & React.RefAttributes<HTMLDivElement>>;
99
+ Section: React.ForwardRefExoticComponent<Omit<{
100
+ asChild?: boolean;
101
+ }, "className"> & {
102
+ classNames?: import("@dxos/ui-types").ClassNameValue;
103
+ } & Pick<React.HTMLAttributes<Element>, "children" | "style" | "className" | "role"> & React.RefAttributes<HTMLDivElement>>;
104
+ Heading: React.ForwardRefExoticComponent<Omit<CardHeadingProps & {
105
+ asChild?: boolean;
106
+ }, "className"> & {
107
+ classNames?: import("@dxos/ui-types").ClassNameValue;
108
+ } & Pick<React.HTMLAttributes<Element>, "children" | "style" | "className" | "role"> & React.RefAttributes<HTMLDivElement>>;
109
+ Text: React.ForwardRefExoticComponent<Omit<CardTextProps & {
110
+ asChild?: boolean;
111
+ }, "className"> & {
112
+ classNames?: import("@dxos/ui-types").ClassNameValue;
113
+ } & Pick<React.HTMLAttributes<Element>, "children" | "style" | "className" | "role"> & React.RefAttributes<HTMLDivElement>>;
114
+ Html: ({ html, variant, ...props }: CardHtmlProps & ThemedClassName<object>) => React.JSX.Element;
115
+ Poster: (props: CardPosterProps) => React.JSX.Element | undefined;
116
+ Action: ({ icon, actionIcon, label, onClick }: CardActionProps) => React.JSX.Element;
117
+ Link: ({ label, href }: CardLinkProps) => React.JSX.Element;
118
+ };
119
+ export type { CardContextValue, CardRootProps, CardToolbarProps, CardDragHandleProps, CloseIconButtonProps, CardMenuProps, };
120
+ //# sourceMappingURL=Card.d.ts.map