@vuu-ui/vuu-layout 3.0.0-beta.3 → 3.1.0-beta.1

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 (337) hide show
  1. package/package.json +19 -16
  2. package/src/Component.mjs +14 -0
  3. package/src/LayoutContainer.css.js +24 -0
  4. package/src/LayoutContainer.mjs +26 -0
  5. package/src/debug.mjs +16 -0
  6. package/src/dock-layout/DockLayout.css.js +36 -0
  7. package/src/dock-layout/DockLayout.mjs +43 -0
  8. package/src/dock-layout/Drawer.css.js +150 -0
  9. package/src/dock-layout/Drawer.mjs +82 -0
  10. package/src/dock-layout/index.mjs +2 -0
  11. package/src/drag-drop/BoxModel.mjs +337 -0
  12. package/src/drag-drop/DragState.mjs +119 -0
  13. package/src/drag-drop/Draggable.mjs +140 -0
  14. package/src/drag-drop/DropTarget.mjs +286 -0
  15. package/src/drag-drop/DropTargetRenderer.mjs +275 -0
  16. package/src/drag-drop/dragDropTypes.mjs +0 -0
  17. package/src/drag-drop/index.mjs +3 -0
  18. package/src/flexbox/Flexbox.css.js +45 -0
  19. package/src/flexbox/Flexbox.mjs +45 -0
  20. package/src/flexbox/FlexboxLayout.mjs +27 -0
  21. package/src/flexbox/Splitter.css.js +57 -0
  22. package/src/flexbox/Splitter.mjs +112 -0
  23. package/src/flexbox/flexbox-utils.mjs +92 -0
  24. package/src/flexbox/flexboxTypes.mjs +0 -0
  25. package/src/flexbox/index.mjs +2 -0
  26. package/src/flexbox/useSplitterResizing.mjs +181 -0
  27. package/src/index.mjs +20 -0
  28. package/src/layout-action.mjs +20 -0
  29. package/src/layout-header/ActionButton.mjs +15 -0
  30. package/src/layout-header/Header.css.js +32 -0
  31. package/src/layout-header/Header.mjs +99 -0
  32. package/src/layout-header/index.mjs +1 -0
  33. package/src/layout-header/useHeader.mjs +76 -0
  34. package/src/layout-provider/LayoutProvider.mjs +242 -0
  35. package/src/layout-provider/LayoutProviderContext.mjs +13 -0
  36. package/src/layout-provider/index.mjs +2 -0
  37. package/src/layout-provider/useLayoutDragDrop.mjs +147 -0
  38. package/src/layout-reducer/flexUtils.mjs +186 -0
  39. package/src/layout-reducer/index.mjs +4 -0
  40. package/src/layout-reducer/insert-layout-element.mjs +179 -0
  41. package/src/layout-reducer/layout-reducer.mjs +121 -0
  42. package/src/layout-reducer/layoutTypes.mjs +34 -0
  43. package/src/layout-reducer/layoutUtils.mjs +178 -0
  44. package/src/layout-reducer/move-layout-element.mjs +18 -0
  45. package/src/layout-reducer/remove-layout-element.mjs +161 -0
  46. package/src/layout-reducer/replace-layout-element.mjs +70 -0
  47. package/src/layout-reducer/resize-flex-children.mjs +48 -0
  48. package/src/layout-reducer/wrap-layout-element.mjs +134 -0
  49. package/src/layout-view/View.css.js +76 -0
  50. package/src/layout-view/View.mjs +116 -0
  51. package/src/layout-view/useView.mjs +69 -0
  52. package/src/layout-view/useViewBroadcastChannel.mjs +29 -0
  53. package/src/layout-view/useViewResize.mjs +27 -0
  54. package/src/layout-view/viewTypes.mjs +0 -0
  55. package/src/layout-view-actions/ViewContext.mjs +11 -0
  56. package/src/layout-view-actions/useViewActionDispatcher.mjs +116 -0
  57. package/src/layout-view-actions/useViewContributions.mjs +31 -0
  58. package/src/palette/Palette.css.js +31 -0
  59. package/src/palette/Palette.mjs +85 -0
  60. package/src/palette/index.mjs +1 -0
  61. package/src/placeholder/LayoutStartPanel.css.js +35 -0
  62. package/src/placeholder/LayoutStartPanel.mjs +57 -0
  63. package/src/placeholder/Placeholder.css.js +20 -0
  64. package/src/placeholder/Placeholder.mjs +33 -0
  65. package/src/placeholder/index.mjs +1 -0
  66. package/src/responsive/index.mjs +2 -0
  67. package/src/responsive/measureMinimumNodeSize.mjs +24 -0
  68. package/src/responsive/useResizeObserver.mjs +109 -0
  69. package/src/responsive/utils.mjs +27 -0
  70. package/src/stack/Stack.css.js +44 -0
  71. package/src/stack/Stack.mjs +98 -0
  72. package/src/stack/StackLayout.mjs +116 -0
  73. package/src/stack/index.mjs +3 -0
  74. package/src/stack/stackTypes.mjs +0 -0
  75. package/src/tabs/TabPanel.css.js +17 -0
  76. package/src/tabs/TabPanel.mjs +11 -0
  77. package/src/tabs/index.mjs +1 -0
  78. package/src/tools/config-wrapper/ConfigWrapper.mjs +55 -0
  79. package/src/tools/config-wrapper/index.mjs +1 -0
  80. package/src/tools/devtools-box/layout-configurator.css.js +113 -0
  81. package/src/tools/devtools-tree/layout-tree-viewer.css.js +17 -0
  82. package/src/tools/index.mjs +3 -0
  83. package/src/use-persistent-state.mjs +43 -0
  84. package/src/utils/index.mjs +5 -0
  85. package/src/utils/pathUtils.mjs +212 -0
  86. package/src/utils/propUtils.mjs +15 -0
  87. package/src/utils/refUtils.mjs +5 -0
  88. package/src/utils/styleUtils.mjs +9 -0
  89. package/src/utils/typeOf.mjs +15 -0
  90. package/cjs/Component.js +0 -14
  91. package/cjs/Component.js.map +0 -1
  92. package/cjs/LayoutContainer.css.js +0 -6
  93. package/cjs/LayoutContainer.css.js.map +0 -1
  94. package/cjs/LayoutContainer.js +0 -33
  95. package/cjs/LayoutContainer.js.map +0 -1
  96. package/cjs/dock-layout/DockLayout.css.js +0 -6
  97. package/cjs/dock-layout/DockLayout.css.js.map +0 -1
  98. package/cjs/dock-layout/DockLayout.js +0 -41
  99. package/cjs/dock-layout/DockLayout.js.map +0 -1
  100. package/cjs/dock-layout/Drawer.css.js +0 -6
  101. package/cjs/dock-layout/Drawer.css.js.map +0 -1
  102. package/cjs/dock-layout/Drawer.js +0 -95
  103. package/cjs/dock-layout/Drawer.js.map +0 -1
  104. package/cjs/drag-drop/BoxModel.js +0 -416
  105. package/cjs/drag-drop/BoxModel.js.map +0 -1
  106. package/cjs/drag-drop/DragState.js +0 -161
  107. package/cjs/drag-drop/DragState.js.map +0 -1
  108. package/cjs/drag-drop/Draggable.js +0 -192
  109. package/cjs/drag-drop/Draggable.js.map +0 -1
  110. package/cjs/drag-drop/DropTarget.js +0 -257
  111. package/cjs/drag-drop/DropTarget.js.map +0 -1
  112. package/cjs/drag-drop/DropTargetRenderer.js +0 -218
  113. package/cjs/drag-drop/DropTargetRenderer.js.map +0 -1
  114. package/cjs/flexbox/Flexbox.css.js +0 -6
  115. package/cjs/flexbox/Flexbox.css.js.map +0 -1
  116. package/cjs/flexbox/Flexbox.js +0 -69
  117. package/cjs/flexbox/Flexbox.js.map +0 -1
  118. package/cjs/flexbox/FlexboxLayout.js +0 -30
  119. package/cjs/flexbox/FlexboxLayout.js.map +0 -1
  120. package/cjs/flexbox/Splitter.css.js +0 -6
  121. package/cjs/flexbox/Splitter.css.js.map +0 -1
  122. package/cjs/flexbox/Splitter.js +0 -122
  123. package/cjs/flexbox/Splitter.js.map +0 -1
  124. package/cjs/flexbox/flexbox-utils.js +0 -95
  125. package/cjs/flexbox/flexbox-utils.js.map +0 -1
  126. package/cjs/flexbox/useSplitterResizing.js +0 -197
  127. package/cjs/flexbox/useSplitterResizing.js.map +0 -1
  128. package/cjs/index.js +0 -122
  129. package/cjs/index.js.map +0 -1
  130. package/cjs/layout-action.js +0 -24
  131. package/cjs/layout-action.js.map +0 -1
  132. package/cjs/layout-header/Header.css.js +0 -6
  133. package/cjs/layout-header/Header.css.js.map +0 -1
  134. package/cjs/layout-header/Header.js +0 -152
  135. package/cjs/layout-header/Header.js.map +0 -1
  136. package/cjs/layout-header/useHeader.js +0 -85
  137. package/cjs/layout-header/useHeader.js.map +0 -1
  138. package/cjs/layout-provider/LayoutProvider.js +0 -304
  139. package/cjs/layout-provider/LayoutProvider.js.map +0 -1
  140. package/cjs/layout-provider/LayoutProviderContext.js +0 -23
  141. package/cjs/layout-provider/LayoutProviderContext.js.map +0 -1
  142. package/cjs/layout-provider/useLayoutDragDrop.js +0 -177
  143. package/cjs/layout-provider/useLayoutDragDrop.js.map +0 -1
  144. package/cjs/layout-reducer/flexUtils.js +0 -227
  145. package/cjs/layout-reducer/flexUtils.js.map +0 -1
  146. package/cjs/layout-reducer/insert-layout-element.js +0 -286
  147. package/cjs/layout-reducer/insert-layout-element.js.map +0 -1
  148. package/cjs/layout-reducer/layout-reducer.js +0 -202
  149. package/cjs/layout-reducer/layout-reducer.js.map +0 -1
  150. package/cjs/layout-reducer/layoutTypes.js +0 -40
  151. package/cjs/layout-reducer/layoutTypes.js.map +0 -1
  152. package/cjs/layout-reducer/layoutUtils.js +0 -237
  153. package/cjs/layout-reducer/layoutUtils.js.map +0 -1
  154. package/cjs/layout-reducer/move-layout-element.js +0 -31
  155. package/cjs/layout-reducer/move-layout-element.js.map +0 -1
  156. package/cjs/layout-reducer/remove-layout-element.js +0 -237
  157. package/cjs/layout-reducer/remove-layout-element.js.map +0 -1
  158. package/cjs/layout-reducer/replace-layout-element.js +0 -96
  159. package/cjs/layout-reducer/replace-layout-element.js.map +0 -1
  160. package/cjs/layout-reducer/resize-flex-children.js +0 -62
  161. package/cjs/layout-reducer/resize-flex-children.js.map +0 -1
  162. package/cjs/layout-reducer/wrap-layout-element.js +0 -211
  163. package/cjs/layout-reducer/wrap-layout-element.js.map +0 -1
  164. package/cjs/layout-view/View.css.js +0 -6
  165. package/cjs/layout-view/View.css.js.map +0 -1
  166. package/cjs/layout-view/View.js +0 -160
  167. package/cjs/layout-view/View.js.map +0 -1
  168. package/cjs/layout-view/useView.js +0 -75
  169. package/cjs/layout-view/useView.js.map +0 -1
  170. package/cjs/layout-view/useViewBroadcastChannel.js +0 -35
  171. package/cjs/layout-view/useViewBroadcastChannel.js.map +0 -1
  172. package/cjs/layout-view/useViewResize.js +0 -42
  173. package/cjs/layout-view/useViewResize.js.map +0 -1
  174. package/cjs/layout-view-actions/ViewContext.js +0 -16
  175. package/cjs/layout-view-actions/ViewContext.js.map +0 -1
  176. package/cjs/layout-view-actions/useViewActionDispatcher.js +0 -112
  177. package/cjs/layout-view-actions/useViewActionDispatcher.js.map +0 -1
  178. package/cjs/layout-view-actions/useViewContributions.js +0 -33
  179. package/cjs/layout-view-actions/useViewContributions.js.map +0 -1
  180. package/cjs/palette/Palette.css.js +0 -6
  181. package/cjs/palette/Palette.css.js.map +0 -1
  182. package/cjs/palette/Palette.js +0 -115
  183. package/cjs/palette/Palette.js.map +0 -1
  184. package/cjs/placeholder/LayoutStartPanel.css.js +0 -6
  185. package/cjs/placeholder/LayoutStartPanel.css.js.map +0 -1
  186. package/cjs/placeholder/LayoutStartPanel.js +0 -56
  187. package/cjs/placeholder/LayoutStartPanel.js.map +0 -1
  188. package/cjs/placeholder/Placeholder.css.js +0 -6
  189. package/cjs/placeholder/Placeholder.css.js.map +0 -1
  190. package/cjs/placeholder/Placeholder.js +0 -34
  191. package/cjs/placeholder/Placeholder.js.map +0 -1
  192. package/cjs/responsive/useResizeObserver.js +0 -118
  193. package/cjs/responsive/useResizeObserver.js.map +0 -1
  194. package/cjs/responsive/utils.js +0 -34
  195. package/cjs/responsive/utils.js.map +0 -1
  196. package/cjs/stack/Stack.css.js +0 -6
  197. package/cjs/stack/Stack.css.js.map +0 -1
  198. package/cjs/stack/Stack.js +0 -150
  199. package/cjs/stack/Stack.js.map +0 -1
  200. package/cjs/stack/StackLayout.js +0 -116
  201. package/cjs/stack/StackLayout.js.map +0 -1
  202. package/cjs/use-persistent-state.js +0 -63
  203. package/cjs/use-persistent-state.js.map +0 -1
  204. package/cjs/utils/pathUtils.js +0 -293
  205. package/cjs/utils/pathUtils.js.map +0 -1
  206. package/cjs/utils/propUtils.js +0 -27
  207. package/cjs/utils/propUtils.js.map +0 -1
  208. package/cjs/utils/refUtils.js +0 -12
  209. package/cjs/utils/refUtils.js.map +0 -1
  210. package/cjs/utils/styleUtils.js +0 -15
  211. package/cjs/utils/styleUtils.js.map +0 -1
  212. package/cjs/utils/typeOf.js +0 -27
  213. package/cjs/utils/typeOf.js.map +0 -1
  214. package/esm/Component.js +0 -12
  215. package/esm/Component.js.map +0 -1
  216. package/esm/LayoutContainer.css.js +0 -4
  217. package/esm/LayoutContainer.css.js.map +0 -1
  218. package/esm/LayoutContainer.js +0 -31
  219. package/esm/LayoutContainer.js.map +0 -1
  220. package/esm/dock-layout/DockLayout.css.js +0 -4
  221. package/esm/dock-layout/DockLayout.css.js.map +0 -1
  222. package/esm/dock-layout/DockLayout.js +0 -39
  223. package/esm/dock-layout/DockLayout.js.map +0 -1
  224. package/esm/dock-layout/Drawer.css.js +0 -4
  225. package/esm/dock-layout/Drawer.css.js.map +0 -1
  226. package/esm/dock-layout/Drawer.js +0 -93
  227. package/esm/dock-layout/Drawer.js.map +0 -1
  228. package/esm/drag-drop/BoxModel.js +0 -409
  229. package/esm/drag-drop/BoxModel.js.map +0 -1
  230. package/esm/drag-drop/DragState.js +0 -159
  231. package/esm/drag-drop/DragState.js.map +0 -1
  232. package/esm/drag-drop/Draggable.js +0 -190
  233. package/esm/drag-drop/Draggable.js.map +0 -1
  234. package/esm/drag-drop/DropTarget.js +0 -253
  235. package/esm/drag-drop/DropTarget.js.map +0 -1
  236. package/esm/drag-drop/DropTargetRenderer.js +0 -216
  237. package/esm/drag-drop/DropTargetRenderer.js.map +0 -1
  238. package/esm/flexbox/Flexbox.css.js +0 -4
  239. package/esm/flexbox/Flexbox.css.js.map +0 -1
  240. package/esm/flexbox/Flexbox.js +0 -67
  241. package/esm/flexbox/Flexbox.js.map +0 -1
  242. package/esm/flexbox/FlexboxLayout.js +0 -28
  243. package/esm/flexbox/FlexboxLayout.js.map +0 -1
  244. package/esm/flexbox/Splitter.css.js +0 -4
  245. package/esm/flexbox/Splitter.css.js.map +0 -1
  246. package/esm/flexbox/Splitter.js +0 -120
  247. package/esm/flexbox/Splitter.js.map +0 -1
  248. package/esm/flexbox/flexbox-utils.js +0 -89
  249. package/esm/flexbox/flexbox-utils.js.map +0 -1
  250. package/esm/flexbox/useSplitterResizing.js +0 -195
  251. package/esm/flexbox/useSplitterResizing.js.map +0 -1
  252. package/esm/index.js +0 -33
  253. package/esm/index.js.map +0 -1
  254. package/esm/layout-action.js +0 -22
  255. package/esm/layout-action.js.map +0 -1
  256. package/esm/layout-header/Header.css.js +0 -4
  257. package/esm/layout-header/Header.css.js.map +0 -1
  258. package/esm/layout-header/Header.js +0 -150
  259. package/esm/layout-header/Header.js.map +0 -1
  260. package/esm/layout-header/useHeader.js +0 -83
  261. package/esm/layout-header/useHeader.js.map +0 -1
  262. package/esm/layout-provider/LayoutProvider.js +0 -297
  263. package/esm/layout-provider/LayoutProvider.js.map +0 -1
  264. package/esm/layout-provider/LayoutProviderContext.js +0 -20
  265. package/esm/layout-provider/LayoutProviderContext.js.map +0 -1
  266. package/esm/layout-provider/useLayoutDragDrop.js +0 -175
  267. package/esm/layout-provider/useLayoutDragDrop.js.map +0 -1
  268. package/esm/layout-reducer/flexUtils.js +0 -218
  269. package/esm/layout-reducer/flexUtils.js.map +0 -1
  270. package/esm/layout-reducer/insert-layout-element.js +0 -282
  271. package/esm/layout-reducer/insert-layout-element.js.map +0 -1
  272. package/esm/layout-reducer/layout-reducer.js +0 -200
  273. package/esm/layout-reducer/layout-reducer.js.map +0 -1
  274. package/esm/layout-reducer/layoutTypes.js +0 -36
  275. package/esm/layout-reducer/layoutTypes.js.map +0 -1
  276. package/esm/layout-reducer/layoutUtils.js +0 -226
  277. package/esm/layout-reducer/layoutUtils.js.map +0 -1
  278. package/esm/layout-reducer/move-layout-element.js +0 -29
  279. package/esm/layout-reducer/move-layout-element.js.map +0 -1
  280. package/esm/layout-reducer/remove-layout-element.js +0 -235
  281. package/esm/layout-reducer/remove-layout-element.js.map +0 -1
  282. package/esm/layout-reducer/replace-layout-element.js +0 -92
  283. package/esm/layout-reducer/replace-layout-element.js.map +0 -1
  284. package/esm/layout-reducer/resize-flex-children.js +0 -59
  285. package/esm/layout-reducer/resize-flex-children.js.map +0 -1
  286. package/esm/layout-reducer/wrap-layout-element.js +0 -209
  287. package/esm/layout-reducer/wrap-layout-element.js.map +0 -1
  288. package/esm/layout-view/View.css.js +0 -4
  289. package/esm/layout-view/View.css.js.map +0 -1
  290. package/esm/layout-view/View.js +0 -158
  291. package/esm/layout-view/View.js.map +0 -1
  292. package/esm/layout-view/useView.js +0 -73
  293. package/esm/layout-view/useView.js.map +0 -1
  294. package/esm/layout-view/useViewBroadcastChannel.js +0 -33
  295. package/esm/layout-view/useViewBroadcastChannel.js.map +0 -1
  296. package/esm/layout-view/useViewResize.js +0 -40
  297. package/esm/layout-view/useViewResize.js.map +0 -1
  298. package/esm/layout-view-actions/ViewContext.js +0 -12
  299. package/esm/layout-view-actions/ViewContext.js.map +0 -1
  300. package/esm/layout-view-actions/useViewActionDispatcher.js +0 -110
  301. package/esm/layout-view-actions/useViewActionDispatcher.js.map +0 -1
  302. package/esm/layout-view-actions/useViewContributions.js +0 -31
  303. package/esm/layout-view-actions/useViewContributions.js.map +0 -1
  304. package/esm/palette/Palette.css.js +0 -4
  305. package/esm/palette/Palette.css.js.map +0 -1
  306. package/esm/palette/Palette.js +0 -112
  307. package/esm/palette/Palette.js.map +0 -1
  308. package/esm/placeholder/LayoutStartPanel.css.js +0 -4
  309. package/esm/placeholder/LayoutStartPanel.css.js.map +0 -1
  310. package/esm/placeholder/LayoutStartPanel.js +0 -54
  311. package/esm/placeholder/LayoutStartPanel.js.map +0 -1
  312. package/esm/placeholder/Placeholder.css.js +0 -4
  313. package/esm/placeholder/Placeholder.css.js.map +0 -1
  314. package/esm/placeholder/Placeholder.js +0 -32
  315. package/esm/placeholder/Placeholder.js.map +0 -1
  316. package/esm/responsive/useResizeObserver.js +0 -112
  317. package/esm/responsive/useResizeObserver.js.map +0 -1
  318. package/esm/responsive/utils.js +0 -31
  319. package/esm/responsive/utils.js.map +0 -1
  320. package/esm/stack/Stack.css.js +0 -4
  321. package/esm/stack/Stack.css.js.map +0 -1
  322. package/esm/stack/Stack.js +0 -148
  323. package/esm/stack/Stack.js.map +0 -1
  324. package/esm/stack/StackLayout.js +0 -114
  325. package/esm/stack/StackLayout.js.map +0 -1
  326. package/esm/use-persistent-state.js +0 -58
  327. package/esm/use-persistent-state.js.map +0 -1
  328. package/esm/utils/pathUtils.js +0 -280
  329. package/esm/utils/pathUtils.js.map +0 -1
  330. package/esm/utils/propUtils.js +0 -23
  331. package/esm/utils/propUtils.js.map +0 -1
  332. package/esm/utils/refUtils.js +0 -10
  333. package/esm/utils/refUtils.js.map +0 -1
  334. package/esm/utils/styleUtils.js +0 -13
  335. package/esm/utils/styleUtils.js.map +0 -1
  336. package/esm/utils/typeOf.js +0 -23
  337. package/esm/utils/typeOf.js.map +0 -1
package/package.json CHANGED
@@ -1,24 +1,30 @@
1
1
  {
2
- "version": "3.0.0-beta.3",
2
+ "version": "3.1.0-beta.1",
3
3
  "description": "VUU Layout Components",
4
+ "main": "src/index.ts",
4
5
  "author": "heswell",
5
6
  "license": "Apache-2.0",
7
+ "scripts": {
8
+ "build:dev": "node ../../scripts/run-build.mjs",
9
+ "build": "node ../../scripts/run-build-rslib.ts",
10
+ "type-defs": "node ../../scripts/build-type-defs.mjs"
11
+ },
6
12
  "types": "types/index.d.ts",
7
13
  "devDependencies": {
8
- "@vuu-ui/vuu-data-types": "3.0.0-beta.3",
9
- "@vuu-ui/vuu-filter-types": "3.0.0-beta.3"
14
+ "@vuu-ui/vuu-data-types": "3.1.0-beta.1",
15
+ "@vuu-ui/vuu-filter-types": "3.1.0-beta.1"
10
16
  },
11
17
  "dependencies": {
12
18
  "@salt-ds/core": "1.54.1",
13
19
  "@salt-ds/styles": "0.2.1",
14
20
  "@salt-ds/window": "0.1.1",
15
- "@vuu-ui/vuu-data-react": "3.0.0-beta.3",
16
- "@vuu-ui/vuu-datatable": "3.0.0-beta.3",
17
- "@vuu-ui/vuu-filters": "3.0.0-beta.3",
18
- "@vuu-ui/vuu-popups": "3.0.0-beta.3",
19
- "@vuu-ui/vuu-table": "3.0.0-beta.3",
20
- "@vuu-ui/vuu-ui-controls": "3.0.0-beta.3",
21
- "@vuu-ui/vuu-utils": "3.0.0-beta.3"
21
+ "@vuu-ui/vuu-data-react": "3.1.0-beta.1",
22
+ "@vuu-ui/vuu-datatable": "3.1.0-beta.1",
23
+ "@vuu-ui/vuu-filters": "3.1.0-beta.1",
24
+ "@vuu-ui/vuu-popups": "3.1.0-beta.1",
25
+ "@vuu-ui/vuu-table": "3.1.0-beta.1",
26
+ "@vuu-ui/vuu-ui-controls": "3.1.0-beta.1",
27
+ "@vuu-ui/vuu-utils": "3.1.0-beta.1"
22
28
  },
23
29
  "peerDependencies": {
24
30
  "clsx": "^2.0.0",
@@ -28,19 +34,16 @@
28
34
  "sideEffects": false,
29
35
  "files": [
30
36
  "README.md",
31
- "esm",
32
- "cjs",
37
+ "src",
33
38
  "/types"
34
39
  ],
35
40
  "exports": {
36
41
  ".": {
37
- "require": "./cjs/index.js",
38
- "import": "./esm/index.js",
42
+ "import": "./src/index.js",
39
43
  "types": "./types/index.d.ts"
40
44
  }
41
45
  },
42
- "main": "cjs/index.js",
43
- "module": "esm/index.js",
46
+ "module": "index.js",
44
47
  "name": "@vuu-ui/vuu-layout",
45
48
  "type": "module"
46
49
  }
@@ -0,0 +1,14 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { registerComponent } from "@vuu-ui/vuu-utils";
4
+ const Component_Component = /*#__PURE__*/ forwardRef(function({ resizeable, ...props }, ref) {
5
+ return /*#__PURE__*/ jsx("div", {
6
+ ...props,
7
+ className: "Component",
8
+ ref: ref
9
+ });
10
+ });
11
+ Component_Component.displayName = "Component";
12
+ var src_Component = Component_Component;
13
+ registerComponent("Component", Component_Component, "component");
14
+ export default src_Component;
@@ -0,0 +1,24 @@
1
+ const css = `
2
+ .vuuLayoutContainer {
3
+ outline: none;
4
+ display: inline-block;
5
+ }
6
+
7
+ [data-dragging="true"] {
8
+ z-index: 100;
9
+ position: absolute !important;
10
+ }
11
+
12
+ .vuuSimpleDraggableWrapper {
13
+ background-color: #fff;
14
+ box-shadow: 0 6px 10px #0003;
15
+ }
16
+
17
+ .vuuSimpleDraggableWrapper > * {
18
+ width: 100%;
19
+ height: 100%;
20
+ }
21
+
22
+
23
+ `;
24
+ export default css;
@@ -0,0 +1,26 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { registerComponent } from "@vuu-ui/vuu-utils";
3
+ import { useComponentCssInjection } from "@salt-ds/styles";
4
+ import { useWindow } from "@salt-ds/window";
5
+ import clsx from "clsx";
6
+ import { forwardRef } from "react";
7
+ import LayoutContainer_0 from "./LayoutContainer.css";
8
+ const LayoutContainer_LayoutContainer = /*#__PURE__*/ forwardRef(function({ children, className: classNameProp, dropTarget, resizeable: _, ...htmlAttributes }, forwardedRef) {
9
+ const targetWindow = useWindow();
10
+ useComponentCssInjection({
11
+ testId: "vuu-layout-container",
12
+ css: LayoutContainer_0,
13
+ window: targetWindow
14
+ });
15
+ const className = clsx("vuuLayoutContainer", classNameProp);
16
+ return /*#__PURE__*/ jsx("div", {
17
+ className: className,
18
+ ref: forwardedRef,
19
+ ...htmlAttributes,
20
+ children: children
21
+ });
22
+ });
23
+ const componentName = "LayoutContainer";
24
+ LayoutContainer_LayoutContainer.displayName = componentName;
25
+ registerComponent(componentName, LayoutContainer_LayoutContainer, "container");
26
+ export { LayoutContainer_LayoutContainer as LayoutContainer };
package/src/debug.mjs ADDED
@@ -0,0 +1,16 @@
1
+ import { typeOf } from "./utils/index.mjs";
2
+ const tree = (el, depth = 0)=>{
3
+ const type = typeOf(el);
4
+ const spaces = " ";
5
+ let str = `\n${spaces.slice(0, depth)}${type}`;
6
+ if ("View" !== type) {
7
+ const els = el.props.children || [];
8
+ (Array.isArray(els) ? els : [
9
+ els
10
+ ]).forEach((child)=>{
11
+ str += tree(child, depth + 1);
12
+ });
13
+ }
14
+ return str;
15
+ };
16
+ export { tree };
@@ -0,0 +1,36 @@
1
+ const css = `
2
+ .vuuDockLayout {
3
+ --chest-bg: var(--hw-chest-bg, inherit);
4
+ --drawer-bg: var(--hw-drawer-bg, inherit);
5
+ --drawer-size: var(--hw-drawer-size, 200px);
6
+ --drawer-peek-size: var(--hw-drawer-peek-size, 32px);
7
+ --drawer-transition-duration: var(--hw-drawer-transition-duration, .4s);
8
+ background-color: var(--chest-bg);
9
+ display: flex;
10
+ }
11
+
12
+ .vuuDockLayout-horizontal {
13
+ flex-direction: row;
14
+ }
15
+
16
+ .vuuDockLayout-vertical {
17
+ flex-direction: column;
18
+ }
19
+
20
+ .vuuDockLayout-content {
21
+ background-color: var(--chest-bg);
22
+ flex-grow: 1;
23
+ flex-shrink: 1;
24
+ justify-content: center;
25
+ align-items: center;
26
+ display: flex;
27
+ overflow: hidden;
28
+ }
29
+
30
+ .vuuDockLayout-horizontal .vuuDockLayout-content, .vuuDockLayout-vertical .vuuDockLayout-content {
31
+ flex-basis: 100%;
32
+ }
33
+
34
+
35
+ `;
36
+ export default css;
@@ -0,0 +1,43 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { asReactElements, partition, registerComponent } from "@vuu-ui/vuu-utils";
3
+ import clsx from "clsx";
4
+ import { useComponentCssInjection } from "@salt-ds/styles";
5
+ import { useWindow } from "@salt-ds/window";
6
+ import { useMemo } from "react";
7
+ import Drawer from "./Drawer.mjs";
8
+ import DockLayout from "./DockLayout.css";
9
+ const isDrawer = (component)=>component.type === Drawer;
10
+ const isVertical = (element)=>element.props.position && element.props.position.match(/top|bottom/);
11
+ const classBase = "vuuDockLayout";
12
+ const DockLayout_DockLayout = (props)=>{
13
+ const targetWindow = useWindow();
14
+ useComponentCssInjection({
15
+ testId: "vuu-dock-layput",
16
+ css: DockLayout,
17
+ window: targetWindow
18
+ });
19
+ const { children, className: classNameProp, id, style } = props;
20
+ const childElements = useMemo(()=>asReactElements(children), [
21
+ children
22
+ ]);
23
+ const [drawers, content] = partition(childElements, isDrawer);
24
+ const [verticalDrawers, horizontalDrawers] = partition(drawers, isVertical);
25
+ const orientation = 0 === verticalDrawers.length ? "horizontal" : 0 === horizontalDrawers.length ? "vertical" : "both";
26
+ const className = clsx(classBase, classNameProp, `${classBase}-${orientation}`);
27
+ return /*#__PURE__*/ jsxs("div", {
28
+ className: className,
29
+ id: id,
30
+ style: style,
31
+ children: [
32
+ drawers,
33
+ /*#__PURE__*/ jsx("div", {
34
+ className: `${classBase}-content`,
35
+ children: content
36
+ })
37
+ ]
38
+ });
39
+ };
40
+ DockLayout_DockLayout.displayName = "DockLayout";
41
+ var dock_layout_DockLayout = DockLayout_DockLayout;
42
+ registerComponent("DockLayout", DockLayout_DockLayout, "container");
43
+ export default dock_layout_DockLayout;
@@ -0,0 +1,150 @@
1
+ const css = `
2
+ .vuuDrawer {
3
+ --drawer-leading-edge-border: solid 1px var(--salt-container-primary-borderColor, none);
4
+ --vuu-close-icon-svg: var(--svg-chevron-double-right);
5
+ transition: flex-basis;
6
+ transition-duration: var(--drawer-transition-duration);
7
+ z-index: 1;
8
+ flex: 1 1 0;
9
+ min-width: 0;
10
+ min-height: 0;
11
+ display: flex;
12
+ position: relative;
13
+ }
14
+
15
+ .vuuDrawer-peekaboo {
16
+ flex-basis: var(--drawer-peek-size);
17
+ flex-grow: 0;
18
+ flex-shrink: 0;
19
+ }
20
+
21
+ .vuuDrawer-inline.vuuDrawer-open {
22
+ flex-basis: var(--drawer-size);
23
+ flex-grow: 0;
24
+ flex-shrink: 0;
25
+ }
26
+
27
+ .vuuDrawer-liner {
28
+ background-color: var(--drawer-bg);
29
+ position: relative;
30
+ overflow: hidden;
31
+ }
32
+
33
+ .vuuDrawer-content {
34
+ height: 100%;
35
+ top: 0;
36
+ right: var(--drawer-peek-size);
37
+ transition: right;
38
+ transition-duration: var(--drawer-transition-duration);
39
+ flex: 100%;
40
+ width: 100%;
41
+ position: absolute;
42
+ overflow: hidden;
43
+ }
44
+
45
+ .vuuDrawer-open .vuuDrawer-content {
46
+ right: 0;
47
+ }
48
+
49
+ .vuuDrawer-left {
50
+ border-right: var(--drawer-leading-edge-border);
51
+ }
52
+
53
+ .vuuDrawer-right {
54
+ border-left: var(--drawer-leading-edge-border);
55
+ }
56
+
57
+ .vuuDrawer-top {
58
+ border-bottom: var(--drawer-leading-edge-border);
59
+ }
60
+
61
+ .vuuDrawer-bottom {
62
+ border-top: var(--drawer-leading-edge-border);
63
+ }
64
+
65
+ .vuuDrawer-left .vuuDrawer-liner, .vuuDrawer-right .vuuDrawer-liner {
66
+ height: 100%;
67
+ transition: width;
68
+ }
69
+
70
+ .vuuDrawer-top .vuuDrawer-liner, .vuuDrawer-bottom .vuuDrawer-liner {
71
+ width: 100%;
72
+ transition: height;
73
+ }
74
+
75
+ .vuuDrawer-inline .vuuDrawer-liner {
76
+ width: 100%;
77
+ height: 100%;
78
+ }
79
+
80
+ .vuuDrawer-over .vuuDrawer-liner {
81
+ transition-duration: .4s;
82
+ position: absolute;
83
+ }
84
+
85
+ .vuuDrawer-over.vuuDrawer-left .vuuDrawer-liner {
86
+ width: 0;
87
+ top: 0;
88
+ left: 0;
89
+ }
90
+
91
+ .vuuDrawer-over.vuuDrawer-right .vuuDrawer-liner {
92
+ width: 0;
93
+ top: 0;
94
+ right: 0;
95
+ }
96
+
97
+ .vuuDrawer-over.vuuDrawer-top .vuuDrawer-liner {
98
+ height: 0;
99
+ top: 0;
100
+ left: 0;
101
+ }
102
+
103
+ .vuuDrawer-over.vuuDrawer-bottom .vuuDrawer-liner {
104
+ height: 0;
105
+ bottom: 0;
106
+ left: 0;
107
+ }
108
+
109
+ .vuuDrawer-left.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner, .vuuDrawer-right.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner {
110
+ width: var(--drawer-peek-size);
111
+ }
112
+
113
+ .vuuDrawer-top.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner, .vuuDrawer-bottom.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner {
114
+ height: var(--drawer-peek-size);
115
+ }
116
+
117
+ .vuuDrawer-left.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner, .vuuDrawer-right.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner {
118
+ width: var(--drawer-size);
119
+ }
120
+
121
+ .vuuDrawer-top.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner, .vuuDrawer-bottom.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner {
122
+ height: var(--drawer-size);
123
+ }
124
+
125
+ .vuuDrawer-top, .vuuDrawer-left {
126
+ order: 0;
127
+ }
128
+
129
+ .vuuDrawer-bottom, .vuuDrawer-right {
130
+ order: 99;
131
+ }
132
+
133
+ .vuuDrawer-left, .vuuDrawer-right {
134
+ flex-direction: column;
135
+ }
136
+
137
+ .vuuToggleButton-container {
138
+ --saltButton-height: 28px;
139
+ --saltButton-width: 28px;
140
+ --vuu-icon-size: 12px;
141
+ flex: 0 0 28px;
142
+ }
143
+
144
+ .vuuDrawer-open {
145
+ --vuu-close-icon-svg: var(--svg-chevron-double-left);
146
+ }
147
+
148
+
149
+ `;
150
+ export default css;
@@ -0,0 +1,82 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Button, useControlled } from "@salt-ds/core";
3
+ import clsx from "clsx";
4
+ import { useComponentCssInjection } from "@salt-ds/styles";
5
+ import { useWindow } from "@salt-ds/window";
6
+ import { useCallback } from "react";
7
+ import Drawer from "./Drawer.css";
8
+ const classBase = "vuuDrawer";
9
+ const sizeAttribute = (value)=>"string" == typeof value ? value : value + "px";
10
+ const getStyle = (styleProp, sizeOpen, sizeClosed)=>{
11
+ const hasSizeOpen = void 0 !== sizeOpen;
12
+ const hasSizeClosed = void 0 !== sizeClosed;
13
+ if (!styleProp && !hasSizeClosed && !hasSizeOpen) return;
14
+ if (!hasSizeClosed && !hasSizeOpen) return styleProp;
15
+ return {
16
+ ...styleProp,
17
+ "--drawer-size": hasSizeOpen ? sizeAttribute(sizeOpen) : void 0,
18
+ "--drawer-peek-size": hasSizeClosed ? sizeAttribute(sizeClosed) : void 0
19
+ };
20
+ };
21
+ const Drawer_Drawer = ({ children, className: classNameProp, clickToOpen, defaultOpen, sizeOpen, sizeClosed, style: styleProp, open: openProp, position = "left", inline, onClick, peekaboo = false, toggleButton, ...props })=>{
22
+ const targetWindow = useWindow();
23
+ useComponentCssInjection({
24
+ testId: "vuu-drawer",
25
+ css: Drawer,
26
+ window: targetWindow
27
+ });
28
+ const [open, setOpen] = useControlled({
29
+ controlled: openProp,
30
+ default: defaultOpen ?? false,
31
+ name: "Drawer",
32
+ state: "open"
33
+ });
34
+ const className = clsx(classBase, classNameProp, `${classBase}-${position}`, {
35
+ [`${classBase}-open`]: open,
36
+ [`${classBase}-inline`]: inline,
37
+ [`${classBase}-over`]: !inline,
38
+ [`${classBase}-peekaboo`]: peekaboo
39
+ });
40
+ const toggleDrawer = useCallback(()=>{
41
+ setOpen(!open);
42
+ }, [
43
+ open,
44
+ setOpen
45
+ ]);
46
+ const style = getStyle(styleProp, sizeOpen, sizeClosed);
47
+ const handleClick = clickToOpen ? toggleDrawer : onClick;
48
+ const renderToggleButton = ()=>/*#__PURE__*/ jsx("div", {
49
+ className: clsx("vuuToggleButton-container"),
50
+ children: open ? /*#__PURE__*/ jsx(Button, {
51
+ "aria-label": "close",
52
+ onClick: toggleDrawer,
53
+ "data-icon": "close",
54
+ variant: "secondary"
55
+ }) : /*#__PURE__*/ jsx(Button, {
56
+ "aria-label": "open",
57
+ onClick: toggleDrawer,
58
+ "data-icon": "close",
59
+ variant: "secondary"
60
+ })
61
+ });
62
+ return /*#__PURE__*/ jsxs("div", {
63
+ ...props,
64
+ className: className,
65
+ onClick: handleClick,
66
+ style: style,
67
+ children: [
68
+ "start" == toggleButton ? renderToggleButton() : null,
69
+ /*#__PURE__*/ jsx("div", {
70
+ className: `${classBase}-liner`,
71
+ children: /*#__PURE__*/ jsx("div", {
72
+ className: `${classBase}-content`,
73
+ children: children
74
+ })
75
+ }),
76
+ "end" == toggleButton ? renderToggleButton() : null
77
+ ]
78
+ });
79
+ };
80
+ Drawer_Drawer.displayName = "Drawer";
81
+ var dock_layout_Drawer = Drawer_Drawer;
82
+ export default dock_layout_Drawer;
@@ -0,0 +1,2 @@
1
+ export { default as DockLayout } from "./DockLayout.mjs";
2
+ export { default as Drawer } from "./Drawer.mjs";