@dxos/react-ui 0.8.4-main.8360d9e660 → 0.8.4-main.8baae0fced

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 (300) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/chunk-A5QCIG5R.mjs +24 -0
  4. package/dist/lib/browser/chunk-A5QCIG5R.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-EJSGYGYH.mjs → chunk-LY5XDQR5.mjs} +84 -12
  6. package/dist/lib/browser/chunk-LY5XDQR5.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +1322 -811
  8. package/dist/lib/browser/index.mjs.map +4 -4
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/testing/index.mjs +30 -24
  11. package/dist/lib/browser/testing/index.mjs.map +3 -3
  12. package/dist/lib/browser/translations.mjs +9 -0
  13. package/dist/lib/browser/translations.mjs.map +7 -0
  14. package/dist/lib/node-esm/{chunk-B7MXDDMJ.mjs → chunk-NGKLIKP3.mjs} +84 -12
  15. package/dist/lib/node-esm/chunk-NGKLIKP3.mjs.map +7 -0
  16. package/dist/lib/node-esm/chunk-XCFLA74M.mjs +26 -0
  17. package/dist/lib/node-esm/chunk-XCFLA74M.mjs.map +7 -0
  18. package/dist/lib/node-esm/index.mjs +1322 -811
  19. package/dist/lib/node-esm/index.mjs.map +4 -4
  20. package/dist/lib/node-esm/meta.json +1 -1
  21. package/dist/lib/node-esm/testing/index.mjs +30 -24
  22. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  23. package/dist/lib/node-esm/translations.mjs +10 -0
  24. package/dist/lib/node-esm/translations.mjs.map +7 -0
  25. package/dist/types/src/components/Avatars/Avatar.d.ts +1 -1
  26. package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
  27. package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
  28. package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
  29. package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  30. package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
  31. package/dist/types/src/components/Button/Button.d.ts.map +1 -1
  32. package/dist/types/src/components/Button/Button.stories.d.ts +1 -1
  33. package/dist/types/src/components/Button/Button.stories.d.ts.map +1 -1
  34. package/dist/types/src/components/Button/IconButton.d.ts +1 -0
  35. package/dist/types/src/components/Button/IconButton.d.ts.map +1 -1
  36. package/dist/types/src/components/Button/IconButton.stories.d.ts +3 -0
  37. package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -1
  38. package/dist/types/src/components/Button/Toggle.stories.d.ts.map +1 -1
  39. package/dist/types/src/components/Button/ToggleGroup.d.ts +2 -2
  40. package/dist/types/src/components/Button/ToggleGroup.stories.d.ts +2 -2
  41. package/dist/types/src/components/Button/ToggleGroup.stories.d.ts.map +1 -1
  42. package/dist/types/src/components/Card/Card.d.ts +59 -42
  43. package/dist/types/src/components/Card/Card.d.ts.map +1 -1
  44. package/dist/types/src/components/Card/Card.stories.d.ts +2 -2
  45. package/dist/types/src/components/Card/Card.stories.d.ts.map +1 -1
  46. package/dist/types/src/components/Carousel/Carousel.d.ts +106 -0
  47. package/dist/types/src/components/Carousel/Carousel.d.ts.map +1 -0
  48. package/dist/types/src/components/Carousel/index.d.ts +2 -0
  49. package/dist/types/src/components/Carousel/index.d.ts.map +1 -0
  50. package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts.map +1 -1
  51. package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
  52. package/dist/types/src/components/Clipboard/index.d.ts +1 -1
  53. package/dist/types/src/components/Clipboard/index.d.ts.map +1 -1
  54. package/dist/types/src/components/DensityProvider/DensityProvider.d.ts.map +1 -1
  55. package/dist/types/src/components/Dialog/AlertDialog.d.ts +34 -23
  56. package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -1
  57. package/dist/types/src/components/Dialog/AlertDialog.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/Dialog/Dialog.d.ts +38 -21
  59. package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
  60. package/dist/types/src/components/Dialog/Dialog.stories.d.ts +3 -2
  61. package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -1
  62. package/dist/types/src/components/ElevationProvider/ElevationProvider.d.ts.map +1 -1
  63. package/dist/types/src/components/ErrorFallback/ErrorFallback.d.ts.map +1 -1
  64. package/dist/types/src/components/ErrorFallback/ErrorFallback.stories.d.ts.map +1 -1
  65. package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts +14 -3
  66. package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts.map +1 -1
  67. package/dist/types/src/components/ErrorFallback/ThrowError.d.ts.map +1 -1
  68. package/dist/types/src/components/Focus/Focus.d.ts +36 -0
  69. package/dist/types/src/components/Focus/Focus.d.ts.map +1 -0
  70. package/dist/types/src/components/Focus/Focus.stories.d.ts +9 -0
  71. package/dist/types/src/components/Focus/Focus.stories.d.ts.map +1 -0
  72. package/dist/types/src/components/Focus/index.d.ts +2 -0
  73. package/dist/types/src/components/Focus/index.d.ts.map +1 -0
  74. package/dist/types/src/components/Icon/Icon.d.ts +4 -0
  75. package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
  76. package/dist/types/src/components/Icon/Icon.stories.d.ts +11 -3
  77. package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -1
  78. package/dist/types/src/components/Image/Image.d.ts +2 -1
  79. package/dist/types/src/components/Image/Image.d.ts.map +1 -1
  80. package/dist/types/src/components/Image/Image.stories.d.ts +3 -2
  81. package/dist/types/src/components/Image/Image.stories.d.ts.map +1 -1
  82. package/dist/types/src/components/Input/Input.d.ts +12 -15
  83. package/dist/types/src/components/Input/Input.d.ts.map +1 -1
  84. package/dist/types/src/components/Input/Input.stories.d.ts +3 -3
  85. package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
  86. package/dist/types/src/components/Link/Link.d.ts.map +1 -1
  87. package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
  88. package/dist/types/src/components/List/List.d.ts +5 -3
  89. package/dist/types/src/components/List/List.d.ts.map +1 -1
  90. package/dist/types/src/components/List/List.stories.d.ts +3 -1
  91. package/dist/types/src/components/List/List.stories.d.ts.map +1 -1
  92. package/dist/types/src/components/List/ListDropIndicator.d.ts.map +1 -1
  93. package/dist/types/src/components/List/Tree.d.ts +2 -2
  94. package/dist/types/src/components/List/Tree.d.ts.map +1 -1
  95. package/dist/types/src/components/List/Tree.stories.d.ts.map +1 -1
  96. package/dist/types/src/components/List/TreeDropIndicator.d.ts.map +1 -1
  97. package/dist/types/src/components/List/Treegrid.d.ts +5 -9
  98. package/dist/types/src/components/List/Treegrid.d.ts.map +1 -1
  99. package/dist/types/src/components/List/Treegrid.stories.d.ts.map +1 -1
  100. package/dist/types/src/components/Main/Main.d.ts +7 -3
  101. package/dist/types/src/components/Main/Main.d.ts.map +1 -1
  102. package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
  103. package/dist/types/src/components/Main/useSwipeToDismiss.d.ts.map +1 -1
  104. package/dist/types/src/components/MediaPlayer/MediaPlayer.d.ts +46 -0
  105. package/dist/types/src/components/MediaPlayer/MediaPlayer.d.ts.map +1 -0
  106. package/dist/types/src/components/MediaPlayer/MediaPlayer.stories.d.ts +16 -0
  107. package/dist/types/src/components/MediaPlayer/MediaPlayer.stories.d.ts.map +1 -0
  108. package/dist/types/src/components/MediaPlayer/index.d.ts +2 -0
  109. package/dist/types/src/components/MediaPlayer/index.d.ts.map +1 -0
  110. package/dist/types/src/components/Menu/ContextMenu.d.ts.map +1 -1
  111. package/dist/types/src/components/Menu/ContextMenu.stories.d.ts.map +1 -1
  112. package/dist/types/src/components/Menu/DropdownMenu.d.ts +13 -6
  113. package/dist/types/src/components/Menu/DropdownMenu.d.ts.map +1 -1
  114. package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts +9 -1
  115. package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts.map +1 -1
  116. package/dist/types/src/components/Message/Message.d.ts +1 -1
  117. package/dist/types/src/components/Message/Message.d.ts.map +1 -1
  118. package/dist/types/src/components/Message/Message.stories.d.ts +2 -2
  119. package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
  120. package/dist/types/src/components/Popover/Popover.d.ts +14 -3
  121. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  122. package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
  123. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +12 -9
  124. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  125. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +18 -5
  126. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
  127. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +42 -13
  128. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -1
  129. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +5 -6
  130. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -1
  131. package/dist/types/src/components/Select/Select.d.ts.map +1 -1
  132. package/dist/types/src/components/Select/Select.stories.d.ts +2 -2
  133. package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
  134. package/dist/types/src/components/Skeleton/Skeleton.stories.d.ts.map +1 -1
  135. package/dist/types/src/components/Splitter/Splitter.d.ts +19 -17
  136. package/dist/types/src/components/Splitter/Splitter.d.ts.map +1 -1
  137. package/dist/types/src/components/Splitter/Splitter.stories.d.ts.map +1 -1
  138. package/dist/types/src/components/Status/Status.d.ts +3 -4
  139. package/dist/types/src/components/Status/Status.d.ts.map +1 -1
  140. package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
  141. package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
  142. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +1 -1
  143. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  144. package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts +1 -1
  145. package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts.map +1 -1
  146. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +54 -55
  147. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
  148. package/dist/types/src/components/ThemeProvider/index.d.ts +1 -1
  149. package/dist/types/src/components/ThemeProvider/index.d.ts.map +1 -1
  150. package/dist/types/src/components/Toast/Toast.d.ts +4 -4
  151. package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
  152. package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
  153. package/dist/types/src/components/Toolbar/Toolbar.d.ts +11 -15
  154. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  155. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
  156. package/dist/types/src/components/Tooltip/Tooltip.d.ts +8 -8
  157. package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  158. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +2 -2
  159. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  160. package/dist/types/src/components/index.d.ts +3 -0
  161. package/dist/types/src/components/index.d.ts.map +1 -1
  162. package/dist/types/src/exemplars/generics.stories.d.ts +6 -5
  163. package/dist/types/src/exemplars/generics.stories.d.ts.map +1 -1
  164. package/dist/types/src/exemplars/slot.stories.d.ts +1 -0
  165. package/dist/types/src/exemplars/slot.stories.d.ts.map +1 -1
  166. package/dist/types/src/exemplars/tabster.stories.d.ts.map +1 -1
  167. package/dist/types/src/exemplars/virtualizer.stories.d.ts.map +1 -1
  168. package/dist/types/src/hooks/useDensityContext.d.ts +1 -1
  169. package/dist/types/src/hooks/useDensityContext.d.ts.map +1 -1
  170. package/dist/types/src/hooks/useElevationContext.d.ts.map +1 -1
  171. package/dist/types/src/hooks/useIconHref.d.ts.map +1 -1
  172. package/dist/types/src/hooks/useSafeArea.d.ts.map +1 -1
  173. package/dist/types/src/hooks/useSafeCollisionPadding.d.ts.map +1 -1
  174. package/dist/types/src/hooks/useVisualViewport.d.ts.map +1 -1
  175. package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
  176. package/dist/types/src/playground/Custom.stories.d.ts +1 -1
  177. package/dist/types/src/playground/Custom.stories.d.ts.map +1 -1
  178. package/dist/types/src/playground/Typography.stories.d.ts.map +1 -1
  179. package/dist/types/src/primitives/Column/Column.d.ts +21 -14
  180. package/dist/types/src/primitives/Column/Column.d.ts.map +1 -1
  181. package/dist/types/src/primitives/Column/Column.stories.d.ts +19 -0
  182. package/dist/types/src/primitives/Column/Column.stories.d.ts.map +1 -1
  183. package/dist/types/src/primitives/Container/Container.d.ts +4 -5
  184. package/dist/types/src/primitives/Container/Container.d.ts.map +1 -1
  185. package/dist/types/src/primitives/Container/Container.stories.d.ts.map +1 -1
  186. package/dist/types/src/primitives/Flex/Flex.d.ts +5 -7
  187. package/dist/types/src/primitives/Flex/Flex.d.ts.map +1 -1
  188. package/dist/types/src/primitives/Flex/Flex.stories.d.ts.map +1 -1
  189. package/dist/types/src/primitives/Grid/Grid.d.ts +3 -8
  190. package/dist/types/src/primitives/Grid/Grid.d.ts.map +1 -1
  191. package/dist/types/src/primitives/Grid/Grid.stories.d.ts.map +1 -1
  192. package/dist/types/src/primitives/Panel/Panel.d.ts +24 -15
  193. package/dist/types/src/primitives/Panel/Panel.d.ts.map +1 -1
  194. package/dist/types/src/primitives/Panel/Panel.stories.d.ts.map +1 -1
  195. package/dist/types/src/testing/Loading.d.ts.map +1 -1
  196. package/dist/types/src/testing/decorators/withLayout.d.ts.map +1 -1
  197. package/dist/types/src/testing/decorators/withLayoutVariants.d.ts.map +1 -1
  198. package/dist/types/src/testing/decorators/withTheme.d.ts +1 -1
  199. package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
  200. package/dist/types/src/translations.d.ts +8 -3
  201. package/dist/types/src/translations.d.ts.map +1 -1
  202. package/dist/types/src/util/usePx.d.ts.map +1 -1
  203. package/dist/types/tsconfig.tsbuildinfo +1 -1
  204. package/package.json +29 -26
  205. package/src/components/Avatars/Avatar.stories.tsx +2 -3
  206. package/src/components/Avatars/Avatar.tsx +1 -2
  207. package/src/components/Avatars/AvatarGroup.stories.tsx +0 -1
  208. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +1 -2
  209. package/src/components/Button/Button.stories.tsx +0 -1
  210. package/src/components/Button/Button.tsx +3 -11
  211. package/src/components/Button/IconButton.stories.tsx +6 -4
  212. package/src/components/Button/IconButton.tsx +3 -3
  213. package/src/components/Button/Toggle.stories.tsx +0 -1
  214. package/src/components/Button/ToggleGroup.stories.tsx +0 -1
  215. package/src/components/Card/Card.stories.tsx +15 -15
  216. package/src/components/Card/Card.tsx +190 -66
  217. package/src/components/Carousel/Carousel.tsx +379 -0
  218. package/src/components/Carousel/index.ts +5 -0
  219. package/src/components/Clipboard/CopyButton.tsx +5 -6
  220. package/src/components/Dialog/AlertDialog.stories.tsx +5 -6
  221. package/src/components/Dialog/AlertDialog.tsx +51 -93
  222. package/src/components/Dialog/Dialog.stories.tsx +64 -9
  223. package/src/components/Dialog/Dialog.tsx +66 -56
  224. package/src/components/ErrorFallback/ErrorFallback.stories.tsx +3 -8
  225. package/src/components/ErrorFallback/ErrorStack.tsx +36 -2
  226. package/src/components/Focus/AUDIT.md +43 -0
  227. package/src/components/Focus/Focus.stories.tsx +230 -0
  228. package/src/components/Focus/Focus.tsx +201 -0
  229. package/src/components/Focus/index.ts +5 -0
  230. package/src/components/Icon/Icon.stories.tsx +43 -13
  231. package/src/components/Icon/Icon.tsx +13 -3
  232. package/src/components/Image/Image.stories.tsx +3 -3
  233. package/src/components/Image/Image.tsx +31 -8
  234. package/src/components/Input/Input.stories.tsx +3 -4
  235. package/src/components/Input/Input.tsx +3 -3
  236. package/src/components/Link/Link.stories.tsx +0 -1
  237. package/src/components/Link/Link.tsx +10 -2
  238. package/src/components/List/List.stories.tsx +1 -2
  239. package/src/components/List/List.tsx +7 -6
  240. package/src/components/List/ListDropIndicator.tsx +0 -1
  241. package/src/components/List/Tree.stories.tsx +2 -3
  242. package/src/components/List/Tree.tsx +0 -1
  243. package/src/components/List/Treegrid.stories.tsx +26 -27
  244. package/src/components/List/Treegrid.tsx +14 -14
  245. package/src/components/Main/Main.stories.tsx +0 -1
  246. package/src/components/Main/Main.tsx +0 -1
  247. package/src/components/MediaPlayer/MediaPlayer.stories.tsx +50 -0
  248. package/src/components/MediaPlayer/MediaPlayer.tsx +153 -0
  249. package/src/components/MediaPlayer/index.ts +5 -0
  250. package/src/components/Menu/ContextMenu.stories.tsx +0 -1
  251. package/src/components/Menu/DropdownMenu.stories.tsx +0 -1
  252. package/src/components/Menu/DropdownMenu.tsx +3 -3
  253. package/src/components/Message/Message.stories.tsx +7 -8
  254. package/src/components/Message/Message.tsx +23 -10
  255. package/src/components/Popover/Popover.stories.tsx +4 -5
  256. package/src/components/Popover/Popover.tsx +1 -1
  257. package/src/components/ScrollArea/ScrollArea.stories.tsx +89 -30
  258. package/src/components/ScrollArea/ScrollArea.tsx +39 -23
  259. package/src/components/ScrollContainer/ScrollContainer.stories.tsx +19 -17
  260. package/src/components/ScrollContainer/ScrollContainer.tsx +199 -92
  261. package/src/components/Select/Select.stories.tsx +5 -6
  262. package/src/components/Skeleton/Skeleton.stories.tsx +0 -1
  263. package/src/components/Splitter/Splitter.stories.tsx +29 -29
  264. package/src/components/Splitter/Splitter.tsx +35 -34
  265. package/src/components/Status/Status.stories.tsx +0 -1
  266. package/src/components/Status/Status.tsx +8 -5
  267. package/src/components/Tag/Tag.stories.tsx +0 -1
  268. package/src/components/ThemeProvider/ThemeProvider.stories.tsx +0 -1
  269. package/src/components/ThemeProvider/ThemeProvider.tsx +5 -4
  270. package/src/components/ThemeProvider/index.ts +1 -1
  271. package/src/components/Toast/Toast.stories.tsx +0 -1
  272. package/src/components/Toolbar/Toolbar.stories.tsx +0 -1
  273. package/src/components/Toolbar/Toolbar.tsx +19 -15
  274. package/src/components/Tooltip/Tooltip.stories.tsx +7 -8
  275. package/src/components/Tooltip/Tooltip.tsx +14 -13
  276. package/src/components/index.ts +3 -0
  277. package/src/exemplars/generics.stories.tsx +7 -15
  278. package/src/exemplars/slot.stories.tsx +65 -57
  279. package/src/exemplars/tabster.stories.tsx +1 -1
  280. package/src/exemplars/virtualizer.stories.tsx +4 -5
  281. package/src/hooks/useDensityContext.ts +2 -2
  282. package/src/playground/Custom.stories.tsx +6 -9
  283. package/src/primitives/Column/AUDIT.md +148 -0
  284. package/src/primitives/Column/Column.stories.tsx +122 -19
  285. package/src/primitives/Column/Column.tsx +73 -41
  286. package/src/primitives/Container/Container.stories.tsx +0 -1
  287. package/src/primitives/Container/Container.tsx +5 -8
  288. package/src/primitives/Flex/Flex.stories.tsx +0 -1
  289. package/src/primitives/Flex/Flex.tsx +10 -12
  290. package/src/primitives/Grid/Grid.stories.tsx +0 -1
  291. package/src/primitives/Grid/Grid.tsx +4 -9
  292. package/src/primitives/Panel/Panel.stories.tsx +8 -7
  293. package/src/primitives/Panel/Panel.tsx +64 -63
  294. package/src/testing/Loading.tsx +25 -4
  295. package/src/testing/decorators/withLayout.tsx +7 -17
  296. package/src/testing/decorators/withTheme.tsx +10 -7
  297. package/src/translations.ts +8 -3
  298. package/src/util/usePx.ts +1 -0
  299. package/dist/lib/browser/chunk-EJSGYGYH.mjs.map +0 -7
  300. package/dist/lib/node-esm/chunk-B7MXDDMJ.mjs.map +0 -7
@@ -1,8 +1,10 @@
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-B7MXDDMJ.mjs";
5
+ Tooltip,
6
+ parseCaptureOwnerStack
7
+ } from "../chunk-NGKLIKP3.mjs";
6
8
 
7
9
  // src/testing/decorators/withLayout.tsx
8
10
  import React, { memo } from "react";
@@ -16,32 +18,26 @@ var withLayout = (props = {}) => (Story) => {
16
18
  const { layout = "default", classNames, scroll } = props;
17
19
  const Container2 = layouts[layout] ?? layouts.fullscreen;
18
20
  return /* @__PURE__ */ React.createElement(Container2, {
19
- classNames: mx(classNames, scroll ? "overflow-y-auto" : "overflow-hidden")
21
+ classNames: mx(scroll ? "overflow-y-auto" : "overflow-hidden", classNames)
20
22
  }, /* @__PURE__ */ React.createElement(MemoizedStory, null));
21
23
  }
22
24
  };
23
25
  var layouts = {
24
26
  default: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
25
- role: "none",
26
27
  className: mx("p-4", classNames)
27
28
  }, children),
28
29
  fullscreen: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
29
- role: "none",
30
- className: mx("fixed inset-0 flex overflow-hidden bg-base-surface", classNames)
30
+ className: mx("fixed inset-0 flex overflow-hidden bg-black", classNames)
31
31
  }, children),
32
32
  centered: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
33
- role: "none",
34
- className: mx("fixed inset-0 grid overflow-hidden place-items-center bg-base-surface")
33
+ className: mx("fixed inset-0 grid overflow-hidden place-items-center bg-black")
35
34
  }, /* @__PURE__ */ React.createElement("div", {
36
- role: "none",
37
- className: mx("flex flex-col bg-group-surface", classNames)
35
+ className: mx("flex flex-col bg-base-surface", classNames)
38
36
  }, children)),
39
37
  column: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
40
- role: "none",
41
- className: "fixed inset-0 flex overflow-hidden justify-center bg-base-surface"
38
+ className: "fixed inset-0 flex overflow-hidden justify-center bg-black"
42
39
  }, /* @__PURE__ */ React.createElement("div", {
43
- role: "none",
44
- className: mx("flex flex-col w-[40rem] bg-group-surface", classNames)
40
+ className: mx("flex flex-col w-[40rem] bg-base-surface", classNames)
45
41
  }, children))
46
42
  };
47
43
 
@@ -86,35 +82,45 @@ var withLayoutVariants = ({ elevations = [
86
82
  };
87
83
 
88
84
  // src/testing/decorators/withTheme.tsx
89
- import React3, { memo as memo2 } from "react";
85
+ import React3 from "react";
90
86
  import { defaultTx } from "@dxos/ui-theme";
91
- var withTheme = ({ tx = defaultTx, ...props } = {}) => (Story, context) => {
87
+ var withTheme = ({ tx = defaultTx, noCache, platform } = {}) => (Story, context) => {
92
88
  const { globals: { theme }, parameters: { translations } } = context;
93
- const MemoizedStory = /* @__PURE__ */ memo2(Story);
94
89
  return /* @__PURE__ */ React3.createElement(ThemeProvider, {
95
- ...props,
96
90
  tx,
97
91
  themeMode: theme,
98
92
  resourceExtensions: translations,
99
- noCache: true
100
- }, /* @__PURE__ */ React3.createElement(Tooltip.Provider, null, /* @__PURE__ */ React3.createElement(MemoizedStory, null)));
93
+ noCache,
94
+ platform
95
+ }, /* @__PURE__ */ React3.createElement(Tooltip.Provider, null, /* @__PURE__ */ React3.createElement(Story, null)));
101
96
  };
102
97
 
103
98
  // src/testing/Loading.tsx
99
+ import React4, { captureOwnerStack, useEffect, useState } from "react";
104
100
  import { mx as mx3 } from "@dxos/ui-theme";
105
101
  import { safeStringify } from "@dxos/util";
106
- import React4, { useEffect, useState } from "react";
107
102
  var Loading = ({ data }) => {
108
103
  const [visible, setVisible] = useState(false);
104
+ const ownerFrames = parseCaptureOwnerStack(captureOwnerStack());
109
105
  useEffect(() => {
110
106
  const t = setTimeout(() => setVisible(true), 500);
111
107
  return () => clearTimeout(t);
112
108
  }, []);
113
109
  return /* @__PURE__ */ React4.createElement("div", {
114
- className: mx3("flex flex-col opacity-0 transition delay-1000 duration-1000", visible && "opacity-100")
110
+ className: "w-full p-2"
111
+ }, /* @__PURE__ */ React4.createElement("div", {
112
+ 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")
115
113
  }, /* @__PURE__ */ React4.createElement("h2", {
116
- className: "uppercase"
117
- }, "Loading"), /* @__PURE__ */ React4.createElement("pre", null, safeStringify(data, void 0, 2)));
114
+ className: "uppercase capitalize text-xs"
115
+ }, "Loading State"), /* @__PURE__ */ React4.createElement("pre", {
116
+ className: "text-sm text-description"
117
+ }, safeStringify(data, void 0, 2)), /* @__PURE__ */ React4.createElement("h3", {
118
+ className: "uppercase capitalize text-xs mt-2"
119
+ }, "Owner stack"), ownerFrames && ownerFrames.length > 0 ? /* @__PURE__ */ React4.createElement(ErrorStack, {
120
+ frames: ownerFrames
121
+ }) : /* @__PURE__ */ React4.createElement("p", {
122
+ className: "text-xs text-subdued"
123
+ }, "No owner stack (production build or unsupported context).")));
118
124
  };
119
125
  export {
120
126
  Loading,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
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-base-surface', 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-base-surface')}>\n <div role='none' className={mx('flex flex-col bg-group-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-base-surface'>\n <div role='none' className={mx('flex flex-col w-[40rem] bg-group-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, { memo } 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, ...props }: Partial<ThemeContextValue> = {}): Decorator =>\n (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 {...props} tx={tx} themeMode={theme as ThemeMode} resourceExtensions={translations} noCache>\n <Tooltip.Provider>\n <MemoizedStory />\n </Tooltip.Provider>\n </ThemeProvider>\n );\n };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { mx } from '@dxos/ui-theme';\nimport { safeStringify } from '@dxos/util';\nimport React, { useEffect, useState } from 'react';\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 useEffect(() => {\n const t = setTimeout(() => setVisible(true), 500);\n return () => clearTimeout(t);\n }, []);\n return (\n <div className={mx('flex flex-col opacity-0 transition delay-1000 duration-1000', visible && 'opacity-100')}>\n <h2 className='uppercase'>Loading</h2>\n <pre>{safeStringify(data, undefined, 2)}</pre>\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,qBAAKF,KAAAA;AAC3B,MAAI,OAAOD,UAAU,YAAY;AAC/B,UAAMI,aAAYJ;AAClB,WACE,sBAAA,cAACI,YAAAA,MACC,sBAAA,cAACF,eAAA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C,EAAEC,KAAI,MAAgB;AAC5C,QAAM,CAACC,SAASC,UAAAA,IAAcC,SAAS,KAAA;AACvCC,YAAU,MAAA;AACR,UAAMC,IAAIC,WAAW,MAAMJ,WAAW,IAAA,GAAO,GAAA;AAC7C,WAAO,MAAMK,aAAaF,CAAAA;EAC5B,GAAG,CAAA,CAAE;AACL,SACE,gBAAAG,OAAA,cAACC,OAAAA;IAAIC,WAAWC,IAAG,+DAA+DV,WAAW,aAAA;KAC3F,gBAAAO,OAAA,cAACI,MAAAA;IAAGF,WAAU;KAAY,SAAA,GAC1B,gBAAAF,OAAA,cAACK,OAAAA,MAAKC,cAAcd,MAAMe,QAAW,CAAA,CAAA,CAAA;AAG3C;",
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", "memo", "defaultTx", "withTheme", "tx", "defaultTx", "props", "Story", "context", "globals", "theme", "parameters", "translations", "MemoizedStory", "memo", "React", "ThemeProvider", "themeMode", "resourceExtensions", "noCache", "Tooltip", "Provider", "mx", "safeStringify", "React", "useEffect", "useState", "Loading", "data", "visible", "setVisible", "useState", "useEffect", "t", "setTimeout", "clearTimeout", "React", "div", "className", "mx", "h2", "pre", "safeStringify", "undefined"]
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(scroll ? 'overflow-y-auto' : 'overflow-hidden', classNames)}>\n <MemoizedStory />\n </Container>\n );\n }\n };\n\nconst layouts: Record<ContainerType, FC<ContainerProps>> = {\n default: ({ classNames, children }: ContainerProps) => <div className={mx('p-4', classNames)}>{children}</div>,\n\n fullscreen: ({ classNames, children }: ContainerProps) => (\n <div className={mx('fixed inset-0 flex overflow-hidden bg-black', classNames)}>{children}</div>\n ),\n\n centered: ({ classNames, children }: ContainerProps) => (\n <div className={mx('fixed inset-0 grid overflow-hidden place-items-center bg-black')}>\n <div className={mx('flex flex-col bg-base-surface', classNames)}>{children}</div>\n </div>\n ),\n\n column: ({ classNames, children }: ContainerProps) => (\n <div className='fixed inset-0 flex overflow-hidden justify-center bg-black'>\n <div className={mx('flex flex-col w-[40rem] bg-base-surface', classNames)}>{children}</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,gBAAgBL,qBAAKI,KAAAA;AAC3B,MAAI,OAAOD,UAAU,YAAY;AAC/B,UAAMG,aAAYH;AAClB,WACE,sBAAA,cAACG,YAAAA,MACC,sBAAA,cAACD,eAAAA,IAAAA,CAAAA;EAGP,OAAO;AACL,UAAM,EAAEE,SAAS,WAAWC,YAAYC,OAAM,IAAKN;AACnD,UAAMG,aAAYI,QAAQH,MAAAA,KAAWG,QAAQC;AAC7C,WACE,sBAAA,cAACL,YAAAA;MAAUE,YAAYP,GAAGQ,SAAS,oBAAoB,mBAAmBD,UAAAA;OACxE,sBAAA,cAACH,eAAAA,IAAAA,CAAAA;EAGP;AACF;AAEF,IAAMK,UAAqD;EACzDE,SAAS,CAAC,EAAEJ,YAAYK,SAAQ,MAAuB,sBAAA,cAACC,OAAAA;IAAIC,WAAWd,GAAG,OAAOO,UAAAA;KAAcK,QAAAA;EAE/FF,YAAY,CAAC,EAAEH,YAAYK,SAAQ,MACjC,sBAAA,cAACC,OAAAA;IAAIC,WAAWd,GAAG,+CAA+CO,UAAAA;KAAcK,QAAAA;EAGlFG,UAAU,CAAC,EAAER,YAAYK,SAAQ,MAC/B,sBAAA,cAACC,OAAAA;I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9C;",
6
+ "names": ["React", "memo", "mx", "withLayout", "props", "Story", "MemoizedStory", "Container", "layout", "classNames", "scroll", "layouts", "fullscreen", "default", "children", "div", "className", "centered", "column", "React", "mx", "surfaceShadow", "Container", "children", "elevation", "surface", "div", "className", "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
  }
@@ -0,0 +1,10 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ translationKey,
4
+ translations
5
+ } from "./chunk-XCFLA74M.mjs";
6
+ export {
7
+ translationKey,
8
+ translations
9
+ };
10
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
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"],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AC;AAWF,KAAK,sBAAsB,GAAG,eAAe,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG;IACxG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAkBF,eAAO,MAAM,MAAM;IACjB,IAAI,2EA7DsF,eAAe;IA8DzG,OAAO;IACP,KAAK;IACL,WAAW;CACZ,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,YAAY,EACV,YAAY,EACZ,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,IAAI,QAAQ,GAC5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatars/Avatar.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAoDtD,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
+ {"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;eAEtB,IAAI;AAenB,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;eAEvB,IAAI;AAEnB,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,M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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;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -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,gBAAgB,CAAC;AAG9D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,Y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AAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG;IACnF,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,CAAC;CACnB,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAAE,OAAO,CAAC,EAAE,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"}
@@ -4,7 +4,7 @@ import { type ButtonProps } from './Button';
4
4
  declare const meta: {
5
5
  title: string;
6
6
  component: React.NamedExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
- render: ({ children, ...args }: Omit<ButtonProps, "ref">) => React.JSX.Element;
7
+ render: ({ children, ...args }: Omit<ButtonProps, 'ref'>) => React.JSX.Element;
8
8
  decorators: import("@storybook/react").Decorator[];
9
9
  };
10
10
  export default meta;
@@ -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;eAEjB,IAAI;AAEnB,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"}
@@ -8,6 +8,7 @@ type IconButtonProps = Omit<ButtonProps, 'children'> & Partial<Pick<IconProps, '
8
8
  noTooltip?: boolean;
9
9
  caretDown?: boolean;
10
10
  iconOnly?: boolean;
11
+ square?: boolean;
11
12
  iconEnd?: boolean;
12
13
  iconClassNames?: ThemedClassName<any>['classNames'];
13
14
  tooltipSide?: TooltipSide;
@@ -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,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAClD,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,GAAG;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC;IACpD,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEJ,QAAA,MAAM,UAAU,wGAMf,CAAC;AAiCF,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
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;AACvD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,KAAK,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAClD,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,GAAG;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC;IACpD,WAAW,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;;;QAGzB,MAAM;;CAEyB,CAAC;eAErB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,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;;;QAcpC,MAAM;;CAEqB,CAAC;eAEjB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
@@ -3,14 +3,14 @@ import React from 'react';
3
3
  import { type ButtonProps } from './Button';
4
4
  import { type IconButtonProps } from './IconButton';
5
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> & {
6
+ declare const ToggleGroup: React.ForwardRefExoticComponent<(Omit<Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
7
7
  asChild?: boolean;
8
8
  }, "className"> & {
9
9
  classNames?: import("@dxos/ui-types").ClassNameValue;
10
10
  } & {
11
11
  elevation?: import("@dxos/ui-types").Elevation;
12
12
  asChild?: boolean;
13
- }, "ref"> | Omit<Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
13
+ }, "ref"> | Omit<Omit<ToggleGroupPrimitive.ToggleGroupSingleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
14
14
  asChild?: boolean;
15
15
  }, "className"> & {
16
16
  classNames?: import("@dxos/ui-types").ClassNameValue;
@@ -3,14 +3,14 @@ import React from 'react';
3
3
  import { type ToggleGroupProps } from './ToggleGroup';
4
4
  declare const meta: {
5
5
  title: string;
6
- component: React.ForwardRefExoticComponent<(Omit<Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
6
+ component: React.ForwardRefExoticComponent<(Omit<Omit<import("@radix-ui/react-toggle-group").ToggleGroupMultipleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
7
7
  asChild?: boolean;
8
8
  }, "className"> & {
9
9
  classNames?: import("@dxos/ui-types").ClassNameValue;
10
10
  } & {
11
11
  elevation?: import("@dxos/ui-types").Elevation;
12
12
  asChild?: boolean;
13
- }, "ref"> | Omit<Omit<import("@radix-ui/react-toggle-group").ToggleGroupMultipleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
13
+ }, "ref"> | Omit<Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps, "className"> & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
14
14
  asChild?: boolean;
15
15
  }, "className"> & {
16
16
  classNames?: import("@dxos/ui-types").ClassNameValue;
@@ -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;eAEtB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -1,25 +1,52 @@
1
- import React from 'react';
2
- import { type Density, type SlottableProps } from '@dxos/ui-types';
1
+ import React, { CSSProperties, MouseEventHandler, type PropsWithChildren } from 'react';
2
+ import { type Density } from '@dxos/ui-types';
3
3
  import { type ThemedClassName } from '../../util';
4
4
  import { type IconProps } from '../Icon';
5
5
  import { ToolbarCloseIconButtonProps, ToolbarDragHandleProps, type ToolbarMenuItem, type ToolbarMenuProps, type ToolbarRootProps } from '../Toolbar';
6
6
  type CardContextValue = {
7
7
  menuItems?: CardMenuItem<any>[];
8
8
  };
9
- type CardRootProps = SlottableProps<HTMLDivElement, {
9
+ type CardRootProps = {
10
10
  id?: string;
11
11
  border?: boolean;
12
12
  fullWidth?: boolean;
13
13
  density?: Density;
14
- }>;
14
+ style?: CSSProperties;
15
+ tabIndex?: number;
16
+ onClick?: MouseEventHandler<HTMLDivElement>;
17
+ 'data-selected'?: boolean;
18
+ 'data-testid'?: string;
19
+ };
15
20
  type CardToolbarProps = ToolbarRootProps;
16
21
  type CardDragHandleProps = ToolbarDragHandleProps;
17
22
  type CloseIconButtonProps = ToolbarCloseIconButtonProps;
18
23
  type CardMenuItem<T extends any | void = void> = ToolbarMenuItem<T>;
19
24
  type CardMenuProps<T extends any | void = void> = ToolbarMenuProps<T>;
25
+ type CardRowProps = {
26
+ icon?: string;
27
+ fullWidth?: boolean;
28
+ };
29
+ type CardHeadingProps = {
30
+ variant?: 'default' | 'subtitle';
31
+ };
32
+ type CardTextProps = {
33
+ truncate?: boolean;
34
+ variant?: 'default' | 'description';
35
+ };
36
+ type CardHtmlProps = {
37
+ html: string;
38
+ variant?: 'default' | 'description';
39
+ };
20
40
  type CardPosterProps = ThemedClassName<{
21
41
  alt: string;
22
42
  aspect?: 'video' | 'auto';
43
+ /**
44
+ * How the image fills the poster box. `'contain'` (default) preserves
45
+ * aspect ratio and may letterbox; `'cover'` fills the box edge-to-edge,
46
+ * cropping as needed. Forwarded to the underlying `Image`'s
47
+ * `object-fit`.
48
+ */
49
+ fit?: 'contain' | 'cover';
23
50
  } & Partial<{
24
51
  image: string;
25
52
  icon: string;
@@ -35,70 +62,60 @@ type CardLinkProps = {
35
62
  href: string;
36
63
  };
37
64
  export declare const Card: {
38
- Root: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
39
- id?: string;
40
- border?: boolean;
41
- fullWidth?: boolean;
42
- density?: Density;
43
- } & {
65
+ Root: React.ForwardRefExoticComponent<Omit<CardRootProps, "className"> & {
44
66
  classNames?: import("@dxos/ui-types").ClassNameValue;
45
- asChild?: boolean;
46
- } & React.RefAttributes<HTMLDivElement>>;
47
- Toolbar: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toolbar").ToolbarProps & Partial<{
48
- density: Density;
49
- disabled: boolean;
50
- layoutManaged: boolean;
51
- }>, "className"> & {
67
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
68
+ Toolbar: React.ForwardRefExoticComponent<Omit<ToolbarRootProps, "className"> & {
52
69
  classNames?: import("@dxos/ui-types").ClassNameValue;
53
- } & React.RefAttributes<HTMLDivElement>>;
70
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
54
71
  ToolbarIconButton: React.ForwardRefExoticComponent<Omit<import("..").IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
55
72
  ToolbarSeparator: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-separator").SeparatorProps, "className"> & {
56
73
  classNames?: import("@dxos/ui-types").ClassNameValue;
57
74
  } & {
58
75
  subdued?: boolean;
59
76
  } & {
60
- variant?: "gap" | "line";
77
+ variant?: 'gap' | 'line';
61
78
  } & React.RefAttributes<HTMLDivElement>>;
62
- IconBlock: React.ForwardRefExoticComponent<Omit<{
63
- children?: React.ReactNode | undefined;
64
- }, "className"> & {
79
+ IconBlock: React.ForwardRefExoticComponent<Omit<PropsWithChildren<{
80
+ padding?: boolean;
81
+ }>, "className"> & {
65
82
  classNames?: import("@dxos/ui-types").ClassNameValue;
66
83
  } & React.RefAttributes<HTMLDivElement>>;
67
84
  DragHandle: React.ForwardRefExoticComponent<ToolbarDragHandleProps & React.RefAttributes<HTMLButtonElement>>;
68
85
  CloseIconButton: React.ForwardRefExoticComponent<ToolbarCloseIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
69
86
  Menu: <T extends unknown = void>({ context, items, ...props }: CardMenuProps<T>) => React.JSX.Element;
70
87
  Icon: (props: IconProps) => React.JSX.Element;
71
- Title: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
72
- classNames?: import("@dxos/ui-types").ClassNameValue;
88
+ Title: React.ForwardRefExoticComponent<Omit<{
73
89
  asChild?: boolean;
74
- } & React.RefAttributes<HTMLDivElement>>;
75
- Content: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
90
+ }, "className"> & {
76
91
  classNames?: import("@dxos/ui-types").ClassNameValue;
92
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
93
+ Content: React.ForwardRefExoticComponent<Omit<{
77
94
  asChild?: boolean;
78
- } & React.RefAttributes<HTMLDivElement>>;
79
- Row: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
80
- icon?: string;
81
- } & {
95
+ }, "className"> & {
82
96
  classNames?: import("@dxos/ui-types").ClassNameValue;
97
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
98
+ Row: React.ForwardRefExoticComponent<Omit<CardRowProps & {
83
99
  asChild?: boolean;
84
- } & React.RefAttributes<HTMLDivElement>>;
85
- Section: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
100
+ }, "className"> & {
86
101
  classNames?: import("@dxos/ui-types").ClassNameValue;
102
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
103
+ Section: React.ForwardRefExoticComponent<Omit<{
87
104
  asChild?: boolean;
88
- } & React.RefAttributes<HTMLDivElement>>;
89
- Heading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
90
- variant?: "default" | "subtitle";
91
- } & {
105
+ }, "className"> & {
92
106
  classNames?: import("@dxos/ui-types").ClassNameValue;
107
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
108
+ Heading: React.ForwardRefExoticComponent<Omit<CardHeadingProps & {
93
109
  asChild?: boolean;
94
- } & React.RefAttributes<HTMLDivElement>>;
95
- Text: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
96
- truncate?: boolean;
97
- variant?: "default" | "description";
98
- } & {
110
+ }, "className"> & {
99
111
  classNames?: import("@dxos/ui-types").ClassNameValue;
112
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
113
+ Text: React.ForwardRefExoticComponent<Omit<CardTextProps & {
100
114
  asChild?: boolean;
101
- } & React.RefAttributes<HTMLDivElement>>;
115
+ }, "className"> & {
116
+ classNames?: import("@dxos/ui-types").ClassNameValue;
117
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
118
+ Html: ({ html, variant, ...props }: CardHtmlProps & ThemedClassName<object>) => React.JSX.Element;
102
119
  Poster: (props: CardPosterProps) => React.JSX.Element | undefined;
103
120
  Action: ({ icon, actionIcon, label, onClick }: CardActionProps) => React.JSX.Element;
104
121
  Link: ({ label, href }: CardLinkProps) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAMA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAInE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAEL,2BAA2B,EAC3B,sBAAsB,EACtB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAC;AAMpB,KAAK,gBAAgB,GAAG;IACtB,SAAS,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;CACjC,CAAC;AASF,KAAK,aAAa,GAAG,cAAc,CACjC,cAAc,EACd;IACE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AA0BF,KAAK,gBAAgB,GAAG,gBAAgB,CAAC;AAgBzC,KAAK,mBAAmB,GAAG,sBAAsB,CAAC;AAclD,KAAK,oBAAoB,GAAG,2BAA2B,CAAC;AAcxD,KAAK,YAAY,CAAC,CAAC,SAAS,GAAG,GAAG,IAAI,GAAG,IAAI,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AAEp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IAAI,gCApIqD,aAAa,GAAG,eAAe,CAAC,MAAM,CAAC;IAqIhG,MAAM,UAjGmB,eAAe;IAkGxC,MAAM,yCA9D+E,eAAe;IA+DpG,IAAI,oBA1C6B,aAAa;CA2C/C,CAAC;AAEF,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,GACd,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
- type StoryProps = {
3
+ type DefaultStoryProps = {
4
4
  title: string;
5
5
  description?: string;
6
6
  image?: string;
@@ -8,7 +8,7 @@ type StoryProps = {
8
8
  };
9
9
  declare const meta: {
10
10
  title: string;
11
- render: ({ title, description, image, fullWidth }: StoryProps) => React.JSX.Element;
11
+ render: ({ title, description, image, fullWidth }: DefaultStoryProps) => React.JSX.Element;
12
12
  decorators: import("@storybook/react").Decorator[];
13
13
  };
14
14
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/Card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAiB,MAAM,OAAO,CAAC;AAUtC,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAqCF,QAAA,MAAM,IAAI;;uDAnCsD,UAAU;;CAuCrC,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAInC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM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