@vuu-ui/vuu-layout 3.0.0 → 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.
- package/package.json +19 -16
- package/src/Component.mjs +14 -0
- package/src/LayoutContainer.css.js +24 -0
- package/src/LayoutContainer.mjs +26 -0
- package/src/debug.mjs +16 -0
- package/src/dock-layout/DockLayout.css.js +36 -0
- package/src/dock-layout/DockLayout.mjs +43 -0
- package/src/dock-layout/Drawer.css.js +150 -0
- package/src/dock-layout/Drawer.mjs +82 -0
- package/src/dock-layout/index.mjs +2 -0
- package/src/drag-drop/BoxModel.mjs +337 -0
- package/src/drag-drop/DragState.mjs +119 -0
- package/src/drag-drop/Draggable.mjs +140 -0
- package/src/drag-drop/DropTarget.mjs +286 -0
- package/src/drag-drop/DropTargetRenderer.mjs +275 -0
- package/src/drag-drop/dragDropTypes.mjs +0 -0
- package/src/drag-drop/index.mjs +3 -0
- package/src/flexbox/Flexbox.css.js +45 -0
- package/src/flexbox/Flexbox.mjs +45 -0
- package/src/flexbox/FlexboxLayout.mjs +27 -0
- package/src/flexbox/Splitter.css.js +57 -0
- package/src/flexbox/Splitter.mjs +112 -0
- package/src/flexbox/flexbox-utils.mjs +92 -0
- package/src/flexbox/flexboxTypes.mjs +0 -0
- package/src/flexbox/index.mjs +2 -0
- package/src/flexbox/useSplitterResizing.mjs +181 -0
- package/src/index.mjs +20 -0
- package/src/layout-action.mjs +20 -0
- package/src/layout-header/ActionButton.mjs +15 -0
- package/src/layout-header/Header.css.js +32 -0
- package/src/layout-header/Header.mjs +99 -0
- package/src/layout-header/index.mjs +1 -0
- package/src/layout-header/useHeader.mjs +76 -0
- package/src/layout-provider/LayoutProvider.mjs +242 -0
- package/src/layout-provider/LayoutProviderContext.mjs +13 -0
- package/src/layout-provider/index.mjs +2 -0
- package/src/layout-provider/useLayoutDragDrop.mjs +147 -0
- package/src/layout-reducer/flexUtils.mjs +186 -0
- package/src/layout-reducer/index.mjs +4 -0
- package/src/layout-reducer/insert-layout-element.mjs +179 -0
- package/src/layout-reducer/layout-reducer.mjs +121 -0
- package/src/layout-reducer/layoutTypes.mjs +34 -0
- package/src/layout-reducer/layoutUtils.mjs +178 -0
- package/src/layout-reducer/move-layout-element.mjs +18 -0
- package/src/layout-reducer/remove-layout-element.mjs +161 -0
- package/src/layout-reducer/replace-layout-element.mjs +70 -0
- package/src/layout-reducer/resize-flex-children.mjs +48 -0
- package/src/layout-reducer/wrap-layout-element.mjs +134 -0
- package/src/layout-view/View.css.js +76 -0
- package/src/layout-view/View.mjs +116 -0
- package/src/layout-view/useView.mjs +69 -0
- package/src/layout-view/useViewBroadcastChannel.mjs +29 -0
- package/src/layout-view/useViewResize.mjs +27 -0
- package/src/layout-view/viewTypes.mjs +0 -0
- package/src/layout-view-actions/ViewContext.mjs +11 -0
- package/src/layout-view-actions/useViewActionDispatcher.mjs +116 -0
- package/src/layout-view-actions/useViewContributions.mjs +31 -0
- package/src/palette/Palette.css.js +31 -0
- package/src/palette/Palette.mjs +85 -0
- package/src/palette/index.mjs +1 -0
- package/src/placeholder/LayoutStartPanel.css.js +35 -0
- package/src/placeholder/LayoutStartPanel.mjs +57 -0
- package/src/placeholder/Placeholder.css.js +20 -0
- package/src/placeholder/Placeholder.mjs +33 -0
- package/src/placeholder/index.mjs +1 -0
- package/src/responsive/index.mjs +2 -0
- package/src/responsive/measureMinimumNodeSize.mjs +24 -0
- package/src/responsive/useResizeObserver.mjs +109 -0
- package/src/responsive/utils.mjs +27 -0
- package/src/stack/Stack.css.js +44 -0
- package/src/stack/Stack.mjs +98 -0
- package/src/stack/StackLayout.mjs +116 -0
- package/src/stack/index.mjs +3 -0
- package/src/stack/stackTypes.mjs +0 -0
- package/src/tabs/TabPanel.css.js +17 -0
- package/src/tabs/TabPanel.mjs +11 -0
- package/src/tabs/index.mjs +1 -0
- package/src/tools/config-wrapper/ConfigWrapper.mjs +55 -0
- package/src/tools/config-wrapper/index.mjs +1 -0
- package/src/tools/devtools-box/layout-configurator.css.js +113 -0
- package/src/tools/devtools-tree/layout-tree-viewer.css.js +17 -0
- package/src/tools/index.mjs +3 -0
- package/src/use-persistent-state.mjs +43 -0
- package/src/utils/index.mjs +5 -0
- package/src/utils/pathUtils.mjs +212 -0
- package/src/utils/propUtils.mjs +15 -0
- package/src/utils/refUtils.mjs +5 -0
- package/src/utils/styleUtils.mjs +9 -0
- package/src/utils/typeOf.mjs +15 -0
- package/cjs/Component.js +0 -14
- package/cjs/Component.js.map +0 -1
- package/cjs/LayoutContainer.css.js +0 -6
- package/cjs/LayoutContainer.css.js.map +0 -1
- package/cjs/LayoutContainer.js +0 -33
- package/cjs/LayoutContainer.js.map +0 -1
- package/cjs/dock-layout/DockLayout.css.js +0 -6
- package/cjs/dock-layout/DockLayout.css.js.map +0 -1
- package/cjs/dock-layout/DockLayout.js +0 -41
- package/cjs/dock-layout/DockLayout.js.map +0 -1
- package/cjs/dock-layout/Drawer.css.js +0 -6
- package/cjs/dock-layout/Drawer.css.js.map +0 -1
- package/cjs/dock-layout/Drawer.js +0 -95
- package/cjs/dock-layout/Drawer.js.map +0 -1
- package/cjs/drag-drop/BoxModel.js +0 -416
- package/cjs/drag-drop/BoxModel.js.map +0 -1
- package/cjs/drag-drop/DragState.js +0 -161
- package/cjs/drag-drop/DragState.js.map +0 -1
- package/cjs/drag-drop/Draggable.js +0 -192
- package/cjs/drag-drop/Draggable.js.map +0 -1
- package/cjs/drag-drop/DropTarget.js +0 -257
- package/cjs/drag-drop/DropTarget.js.map +0 -1
- package/cjs/drag-drop/DropTargetRenderer.js +0 -218
- package/cjs/drag-drop/DropTargetRenderer.js.map +0 -1
- package/cjs/flexbox/Flexbox.css.js +0 -6
- package/cjs/flexbox/Flexbox.css.js.map +0 -1
- package/cjs/flexbox/Flexbox.js +0 -69
- package/cjs/flexbox/Flexbox.js.map +0 -1
- package/cjs/flexbox/FlexboxLayout.js +0 -30
- package/cjs/flexbox/FlexboxLayout.js.map +0 -1
- package/cjs/flexbox/Splitter.css.js +0 -6
- package/cjs/flexbox/Splitter.css.js.map +0 -1
- package/cjs/flexbox/Splitter.js +0 -122
- package/cjs/flexbox/Splitter.js.map +0 -1
- package/cjs/flexbox/flexbox-utils.js +0 -95
- package/cjs/flexbox/flexbox-utils.js.map +0 -1
- package/cjs/flexbox/useSplitterResizing.js +0 -197
- package/cjs/flexbox/useSplitterResizing.js.map +0 -1
- package/cjs/index.js +0 -122
- package/cjs/index.js.map +0 -1
- package/cjs/layout-action.js +0 -24
- package/cjs/layout-action.js.map +0 -1
- package/cjs/layout-header/Header.css.js +0 -6
- package/cjs/layout-header/Header.css.js.map +0 -1
- package/cjs/layout-header/Header.js +0 -152
- package/cjs/layout-header/Header.js.map +0 -1
- package/cjs/layout-header/useHeader.js +0 -85
- package/cjs/layout-header/useHeader.js.map +0 -1
- package/cjs/layout-provider/LayoutProvider.js +0 -304
- package/cjs/layout-provider/LayoutProvider.js.map +0 -1
- package/cjs/layout-provider/LayoutProviderContext.js +0 -23
- package/cjs/layout-provider/LayoutProviderContext.js.map +0 -1
- package/cjs/layout-provider/useLayoutDragDrop.js +0 -177
- package/cjs/layout-provider/useLayoutDragDrop.js.map +0 -1
- package/cjs/layout-reducer/flexUtils.js +0 -227
- package/cjs/layout-reducer/flexUtils.js.map +0 -1
- package/cjs/layout-reducer/insert-layout-element.js +0 -286
- package/cjs/layout-reducer/insert-layout-element.js.map +0 -1
- package/cjs/layout-reducer/layout-reducer.js +0 -202
- package/cjs/layout-reducer/layout-reducer.js.map +0 -1
- package/cjs/layout-reducer/layoutTypes.js +0 -40
- package/cjs/layout-reducer/layoutTypes.js.map +0 -1
- package/cjs/layout-reducer/layoutUtils.js +0 -237
- package/cjs/layout-reducer/layoutUtils.js.map +0 -1
- package/cjs/layout-reducer/move-layout-element.js +0 -31
- package/cjs/layout-reducer/move-layout-element.js.map +0 -1
- package/cjs/layout-reducer/remove-layout-element.js +0 -237
- package/cjs/layout-reducer/remove-layout-element.js.map +0 -1
- package/cjs/layout-reducer/replace-layout-element.js +0 -96
- package/cjs/layout-reducer/replace-layout-element.js.map +0 -1
- package/cjs/layout-reducer/resize-flex-children.js +0 -62
- package/cjs/layout-reducer/resize-flex-children.js.map +0 -1
- package/cjs/layout-reducer/wrap-layout-element.js +0 -211
- package/cjs/layout-reducer/wrap-layout-element.js.map +0 -1
- package/cjs/layout-view/View.css.js +0 -6
- package/cjs/layout-view/View.css.js.map +0 -1
- package/cjs/layout-view/View.js +0 -160
- package/cjs/layout-view/View.js.map +0 -1
- package/cjs/layout-view/useView.js +0 -75
- package/cjs/layout-view/useView.js.map +0 -1
- package/cjs/layout-view/useViewBroadcastChannel.js +0 -35
- package/cjs/layout-view/useViewBroadcastChannel.js.map +0 -1
- package/cjs/layout-view/useViewResize.js +0 -42
- package/cjs/layout-view/useViewResize.js.map +0 -1
- package/cjs/layout-view-actions/ViewContext.js +0 -16
- package/cjs/layout-view-actions/ViewContext.js.map +0 -1
- package/cjs/layout-view-actions/useViewActionDispatcher.js +0 -112
- package/cjs/layout-view-actions/useViewActionDispatcher.js.map +0 -1
- package/cjs/layout-view-actions/useViewContributions.js +0 -33
- package/cjs/layout-view-actions/useViewContributions.js.map +0 -1
- package/cjs/palette/Palette.css.js +0 -6
- package/cjs/palette/Palette.css.js.map +0 -1
- package/cjs/palette/Palette.js +0 -115
- package/cjs/palette/Palette.js.map +0 -1
- package/cjs/placeholder/LayoutStartPanel.css.js +0 -6
- package/cjs/placeholder/LayoutStartPanel.css.js.map +0 -1
- package/cjs/placeholder/LayoutStartPanel.js +0 -56
- package/cjs/placeholder/LayoutStartPanel.js.map +0 -1
- package/cjs/placeholder/Placeholder.css.js +0 -6
- package/cjs/placeholder/Placeholder.css.js.map +0 -1
- package/cjs/placeholder/Placeholder.js +0 -34
- package/cjs/placeholder/Placeholder.js.map +0 -1
- package/cjs/responsive/useResizeObserver.js +0 -118
- package/cjs/responsive/useResizeObserver.js.map +0 -1
- package/cjs/responsive/utils.js +0 -34
- package/cjs/responsive/utils.js.map +0 -1
- package/cjs/stack/Stack.css.js +0 -6
- package/cjs/stack/Stack.css.js.map +0 -1
- package/cjs/stack/Stack.js +0 -150
- package/cjs/stack/Stack.js.map +0 -1
- package/cjs/stack/StackLayout.js +0 -116
- package/cjs/stack/StackLayout.js.map +0 -1
- package/cjs/use-persistent-state.js +0 -63
- package/cjs/use-persistent-state.js.map +0 -1
- package/cjs/utils/pathUtils.js +0 -293
- package/cjs/utils/pathUtils.js.map +0 -1
- package/cjs/utils/propUtils.js +0 -27
- package/cjs/utils/propUtils.js.map +0 -1
- package/cjs/utils/refUtils.js +0 -12
- package/cjs/utils/refUtils.js.map +0 -1
- package/cjs/utils/styleUtils.js +0 -15
- package/cjs/utils/styleUtils.js.map +0 -1
- package/cjs/utils/typeOf.js +0 -27
- package/cjs/utils/typeOf.js.map +0 -1
- package/esm/Component.js +0 -12
- package/esm/Component.js.map +0 -1
- package/esm/LayoutContainer.css.js +0 -4
- package/esm/LayoutContainer.css.js.map +0 -1
- package/esm/LayoutContainer.js +0 -31
- package/esm/LayoutContainer.js.map +0 -1
- package/esm/dock-layout/DockLayout.css.js +0 -4
- package/esm/dock-layout/DockLayout.css.js.map +0 -1
- package/esm/dock-layout/DockLayout.js +0 -39
- package/esm/dock-layout/DockLayout.js.map +0 -1
- package/esm/dock-layout/Drawer.css.js +0 -4
- package/esm/dock-layout/Drawer.css.js.map +0 -1
- package/esm/dock-layout/Drawer.js +0 -93
- package/esm/dock-layout/Drawer.js.map +0 -1
- package/esm/drag-drop/BoxModel.js +0 -409
- package/esm/drag-drop/BoxModel.js.map +0 -1
- package/esm/drag-drop/DragState.js +0 -159
- package/esm/drag-drop/DragState.js.map +0 -1
- package/esm/drag-drop/Draggable.js +0 -190
- package/esm/drag-drop/Draggable.js.map +0 -1
- package/esm/drag-drop/DropTarget.js +0 -253
- package/esm/drag-drop/DropTarget.js.map +0 -1
- package/esm/drag-drop/DropTargetRenderer.js +0 -216
- package/esm/drag-drop/DropTargetRenderer.js.map +0 -1
- package/esm/flexbox/Flexbox.css.js +0 -4
- package/esm/flexbox/Flexbox.css.js.map +0 -1
- package/esm/flexbox/Flexbox.js +0 -67
- package/esm/flexbox/Flexbox.js.map +0 -1
- package/esm/flexbox/FlexboxLayout.js +0 -28
- package/esm/flexbox/FlexboxLayout.js.map +0 -1
- package/esm/flexbox/Splitter.css.js +0 -4
- package/esm/flexbox/Splitter.css.js.map +0 -1
- package/esm/flexbox/Splitter.js +0 -120
- package/esm/flexbox/Splitter.js.map +0 -1
- package/esm/flexbox/flexbox-utils.js +0 -89
- package/esm/flexbox/flexbox-utils.js.map +0 -1
- package/esm/flexbox/useSplitterResizing.js +0 -195
- package/esm/flexbox/useSplitterResizing.js.map +0 -1
- package/esm/index.js +0 -33
- package/esm/index.js.map +0 -1
- package/esm/layout-action.js +0 -22
- package/esm/layout-action.js.map +0 -1
- package/esm/layout-header/Header.css.js +0 -4
- package/esm/layout-header/Header.css.js.map +0 -1
- package/esm/layout-header/Header.js +0 -150
- package/esm/layout-header/Header.js.map +0 -1
- package/esm/layout-header/useHeader.js +0 -83
- package/esm/layout-header/useHeader.js.map +0 -1
- package/esm/layout-provider/LayoutProvider.js +0 -297
- package/esm/layout-provider/LayoutProvider.js.map +0 -1
- package/esm/layout-provider/LayoutProviderContext.js +0 -20
- package/esm/layout-provider/LayoutProviderContext.js.map +0 -1
- package/esm/layout-provider/useLayoutDragDrop.js +0 -175
- package/esm/layout-provider/useLayoutDragDrop.js.map +0 -1
- package/esm/layout-reducer/flexUtils.js +0 -218
- package/esm/layout-reducer/flexUtils.js.map +0 -1
- package/esm/layout-reducer/insert-layout-element.js +0 -282
- package/esm/layout-reducer/insert-layout-element.js.map +0 -1
- package/esm/layout-reducer/layout-reducer.js +0 -200
- package/esm/layout-reducer/layout-reducer.js.map +0 -1
- package/esm/layout-reducer/layoutTypes.js +0 -36
- package/esm/layout-reducer/layoutTypes.js.map +0 -1
- package/esm/layout-reducer/layoutUtils.js +0 -226
- package/esm/layout-reducer/layoutUtils.js.map +0 -1
- package/esm/layout-reducer/move-layout-element.js +0 -29
- package/esm/layout-reducer/move-layout-element.js.map +0 -1
- package/esm/layout-reducer/remove-layout-element.js +0 -235
- package/esm/layout-reducer/remove-layout-element.js.map +0 -1
- package/esm/layout-reducer/replace-layout-element.js +0 -92
- package/esm/layout-reducer/replace-layout-element.js.map +0 -1
- package/esm/layout-reducer/resize-flex-children.js +0 -59
- package/esm/layout-reducer/resize-flex-children.js.map +0 -1
- package/esm/layout-reducer/wrap-layout-element.js +0 -209
- package/esm/layout-reducer/wrap-layout-element.js.map +0 -1
- package/esm/layout-view/View.css.js +0 -4
- package/esm/layout-view/View.css.js.map +0 -1
- package/esm/layout-view/View.js +0 -158
- package/esm/layout-view/View.js.map +0 -1
- package/esm/layout-view/useView.js +0 -73
- package/esm/layout-view/useView.js.map +0 -1
- package/esm/layout-view/useViewBroadcastChannel.js +0 -33
- package/esm/layout-view/useViewBroadcastChannel.js.map +0 -1
- package/esm/layout-view/useViewResize.js +0 -40
- package/esm/layout-view/useViewResize.js.map +0 -1
- package/esm/layout-view-actions/ViewContext.js +0 -12
- package/esm/layout-view-actions/ViewContext.js.map +0 -1
- package/esm/layout-view-actions/useViewActionDispatcher.js +0 -110
- package/esm/layout-view-actions/useViewActionDispatcher.js.map +0 -1
- package/esm/layout-view-actions/useViewContributions.js +0 -31
- package/esm/layout-view-actions/useViewContributions.js.map +0 -1
- package/esm/palette/Palette.css.js +0 -4
- package/esm/palette/Palette.css.js.map +0 -1
- package/esm/palette/Palette.js +0 -112
- package/esm/palette/Palette.js.map +0 -1
- package/esm/placeholder/LayoutStartPanel.css.js +0 -4
- package/esm/placeholder/LayoutStartPanel.css.js.map +0 -1
- package/esm/placeholder/LayoutStartPanel.js +0 -54
- package/esm/placeholder/LayoutStartPanel.js.map +0 -1
- package/esm/placeholder/Placeholder.css.js +0 -4
- package/esm/placeholder/Placeholder.css.js.map +0 -1
- package/esm/placeholder/Placeholder.js +0 -32
- package/esm/placeholder/Placeholder.js.map +0 -1
- package/esm/responsive/useResizeObserver.js +0 -112
- package/esm/responsive/useResizeObserver.js.map +0 -1
- package/esm/responsive/utils.js +0 -31
- package/esm/responsive/utils.js.map +0 -1
- package/esm/stack/Stack.css.js +0 -4
- package/esm/stack/Stack.css.js.map +0 -1
- package/esm/stack/Stack.js +0 -148
- package/esm/stack/Stack.js.map +0 -1
- package/esm/stack/StackLayout.js +0 -114
- package/esm/stack/StackLayout.js.map +0 -1
- package/esm/use-persistent-state.js +0 -58
- package/esm/use-persistent-state.js.map +0 -1
- package/esm/utils/pathUtils.js +0 -280
- package/esm/utils/pathUtils.js.map +0 -1
- package/esm/utils/propUtils.js +0 -23
- package/esm/utils/propUtils.js.map +0 -1
- package/esm/utils/refUtils.js +0 -10
- package/esm/utils/refUtils.js.map +0 -1
- package/esm/utils/styleUtils.js +0 -13
- package/esm/utils/styleUtils.js.map +0 -1
- package/esm/utils/typeOf.js +0 -23
- package/esm/utils/typeOf.js.map +0 -1
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { isContainer } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import react, { isValidElement } from "react";
|
|
3
|
+
import { getProp, getProps } from "./propUtils.mjs";
|
|
4
|
+
import { typeOf } from "./typeOf.mjs";
|
|
5
|
+
const removeFinalPathSegment = (path)=>{
|
|
6
|
+
const pos = path.lastIndexOf(".");
|
|
7
|
+
if (-1 === pos) return path;
|
|
8
|
+
return path.slice(0, pos);
|
|
9
|
+
};
|
|
10
|
+
const getChildren = (c)=>react.isValidElement(c.props.children) ? [
|
|
11
|
+
c.props.children
|
|
12
|
+
] : c.props.children;
|
|
13
|
+
const resolvePath = (source, path = "")=>{
|
|
14
|
+
const [step1, ...steps] = path.split(".");
|
|
15
|
+
if (step1?.startsWith("#")) {
|
|
16
|
+
const node = findTargetById(source, step1.slice(1), true);
|
|
17
|
+
if (node && steps.length) return resolvePath(node, steps.join("."));
|
|
18
|
+
} else if ("ACTIVE_CHILD" === step1) {
|
|
19
|
+
const { active } = getProps(source);
|
|
20
|
+
const children = getChildren(source);
|
|
21
|
+
const { path } = getProps(children[active]);
|
|
22
|
+
return path;
|
|
23
|
+
}
|
|
24
|
+
return "";
|
|
25
|
+
};
|
|
26
|
+
const resolveJSONPath = (source, path = "")=>{
|
|
27
|
+
const [step1, ...steps] = path.split(".");
|
|
28
|
+
if (step1?.startsWith("#")) {
|
|
29
|
+
const node = findTargetJSONById(source, step1.slice(1), true);
|
|
30
|
+
if (node && steps.length) return resolveJSONPath(node, steps.join("."));
|
|
31
|
+
} else if ("ACTIVE_CHILD" === step1) {
|
|
32
|
+
const { children, props } = source;
|
|
33
|
+
const { active } = props;
|
|
34
|
+
if ("number" == typeof active && children?.[active]) return children[active];
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
function followPathToParent(source, path) {
|
|
38
|
+
const { "data-path": dataPath, path: sourcePath = dataPath } = getProps(source);
|
|
39
|
+
if ("0" === path) return null;
|
|
40
|
+
if (path === sourcePath) return null;
|
|
41
|
+
return followPath(source, removeFinalPathSegment(path), true);
|
|
42
|
+
}
|
|
43
|
+
function findTarget(source, test) {
|
|
44
|
+
if (source) {
|
|
45
|
+
const { children, ...props } = getProps(source);
|
|
46
|
+
if (test(props)) return source;
|
|
47
|
+
if (react.Children.count(children) > 0) {
|
|
48
|
+
const array = react.isValidElement(children) ? [
|
|
49
|
+
children
|
|
50
|
+
] : children;
|
|
51
|
+
for (const child of array){
|
|
52
|
+
const target = findTarget(child, test);
|
|
53
|
+
if (target) return target;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function containerOf(source, target) {
|
|
59
|
+
if (target === source) return null;
|
|
60
|
+
const { path: sourcePath, children } = getProps(source);
|
|
61
|
+
const { idx, finalStep } = pathUtils_nextStep(sourcePath, getProp(target, "path"));
|
|
62
|
+
if (finalStep) return source;
|
|
63
|
+
if (void 0 === children || void 0 === children[idx]) return null;
|
|
64
|
+
return containerOf(children[idx], target);
|
|
65
|
+
}
|
|
66
|
+
const getChild = (children, idx)=>{
|
|
67
|
+
if (react.isValidElement(children) && 0 == idx) return children;
|
|
68
|
+
if (Array.isArray(children)) return children[idx];
|
|
69
|
+
};
|
|
70
|
+
function followPathToComponent(component, path) {
|
|
71
|
+
const paths = path.split(".");
|
|
72
|
+
let children = [
|
|
73
|
+
component
|
|
74
|
+
];
|
|
75
|
+
for(let i = 0; i < paths.length; i++){
|
|
76
|
+
const idx = parseInt(paths[i]);
|
|
77
|
+
const child = children[idx];
|
|
78
|
+
if (i === paths.length - 1) return child;
|
|
79
|
+
children = getChildren(child);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const findTargetById = (source, id, throwIfNotFound = true)=>{
|
|
83
|
+
const { children, id: idProp } = source.props;
|
|
84
|
+
if (idProp === id) return source;
|
|
85
|
+
if (react.Children.count(children) > 0) {
|
|
86
|
+
const childArray = isValidElement(children) ? [
|
|
87
|
+
children
|
|
88
|
+
] : children;
|
|
89
|
+
for (const child of childArray)if (isValidElement(child)) {
|
|
90
|
+
const target = findTargetById(child, id, false);
|
|
91
|
+
if (target) return target;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (true === throwIfNotFound) throw Error(`pathUtils.findTargetById id #${id} not found in source`);
|
|
95
|
+
};
|
|
96
|
+
const findTargetJSONById = (source, id, throwIfNotFound = true)=>{
|
|
97
|
+
const { children, id: idProp } = source;
|
|
98
|
+
if (idProp === id) return source;
|
|
99
|
+
if (Array.isArray(children) && children.length > 0) {
|
|
100
|
+
for (const child of children)if (null !== child && "object" == typeof child) {
|
|
101
|
+
const target = findTargetJSONById(child, id, false);
|
|
102
|
+
if (target) return target;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (true === throwIfNotFound) throw Error(`pathUtils.findTargetJSONById id #${id} not found in source`);
|
|
106
|
+
};
|
|
107
|
+
function followPath(source, path, throwIfNotFound = false) {
|
|
108
|
+
if (path.startsWith("#")) return findTargetById(source, path.slice(1), throwIfNotFound);
|
|
109
|
+
const { "data-path": dataPath, path: sourcePath = dataPath } = getProps(source);
|
|
110
|
+
if (0 !== path.indexOf(sourcePath)) throw Error(`pathUtils.followPath path ${path} is not within source path ${sourcePath}`);
|
|
111
|
+
const route = path.slice(sourcePath.length + 1);
|
|
112
|
+
if ("" === route) return source;
|
|
113
|
+
let target = source;
|
|
114
|
+
const paths = route.split(".");
|
|
115
|
+
for(let i = 0; i < paths.length; i++){
|
|
116
|
+
if (0 === react.Children.count(target.props.children)) {
|
|
117
|
+
const message = `element at 0.${paths.slice(0, i).join(".")} has no children, so cannot fulfill rest of path ${paths.slice(i).join(".")}`;
|
|
118
|
+
if (!throwIfNotFound) return void console.warn(message);
|
|
119
|
+
throw Error(message);
|
|
120
|
+
}
|
|
121
|
+
target = getChild(target.props.children, parseInt(paths[i]));
|
|
122
|
+
if (void 0 === target) {
|
|
123
|
+
const message = `model at 0.${paths.slice(0, i).join(".")} has no children that fulfill next step of path ${paths.slice(i).join(".")}`;
|
|
124
|
+
if (throwIfNotFound) throw Error(message);
|
|
125
|
+
console.warn(message);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return target;
|
|
129
|
+
}
|
|
130
|
+
function nextLeaf(root, path) {
|
|
131
|
+
const parent = followPathToParent(root, path);
|
|
132
|
+
let pathIndices = path.split(".").map((idx)=>parseInt(idx, 10));
|
|
133
|
+
if (parent) {
|
|
134
|
+
const lastIdx = pathIndices.pop();
|
|
135
|
+
const { children } = parent.props;
|
|
136
|
+
if (children.length - 1 > lastIdx) return firstLeaf(children[lastIdx + 1]);
|
|
137
|
+
{
|
|
138
|
+
const parentIdx = pathIndices.pop();
|
|
139
|
+
const nextParent = followPathToParent(root, getProp(parent, "path"));
|
|
140
|
+
if (nextParent && "number" == typeof parentIdx) {
|
|
141
|
+
pathIndices = nextParent.props.path.split(".").map((idx)=>parseInt(idx, 10));
|
|
142
|
+
if (nextParent.props.children.length - 1 > parentIdx) {
|
|
143
|
+
const nextStep = nextParent.props.children[parentIdx + 1];
|
|
144
|
+
if (isContainer(typeOf(nextStep))) return firstLeaf(nextStep);
|
|
145
|
+
return nextStep;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return firstLeaf(root);
|
|
151
|
+
}
|
|
152
|
+
function previousLeaf(root, path) {
|
|
153
|
+
const pathIndices = path.split(".").map((idx)=>parseInt(idx, 10));
|
|
154
|
+
let lastIdx = pathIndices.pop();
|
|
155
|
+
let parent = followPathToParent(root, path);
|
|
156
|
+
if (null != parent && "number" == typeof lastIdx) {
|
|
157
|
+
const { children } = parent.props;
|
|
158
|
+
if (lastIdx > 0) return lastLeaf(children[lastIdx - 1]);
|
|
159
|
+
while(pathIndices.length > 1){
|
|
160
|
+
lastIdx = pathIndices.pop();
|
|
161
|
+
parent = followPathToParent(root, getProp(parent, "path"));
|
|
162
|
+
if (lastIdx > 0) {
|
|
163
|
+
const nextStep = parent.props.children[lastIdx - 1];
|
|
164
|
+
if (isContainer(typeOf(nextStep))) return lastLeaf(nextStep);
|
|
165
|
+
return nextStep;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return lastLeaf(root);
|
|
170
|
+
}
|
|
171
|
+
function firstLeaf(layoutRoot) {
|
|
172
|
+
if (isContainer(typeOf(layoutRoot))) {
|
|
173
|
+
const { children } = layoutRoot.props || layoutRoot;
|
|
174
|
+
return firstLeaf(children[0]);
|
|
175
|
+
}
|
|
176
|
+
return layoutRoot;
|
|
177
|
+
}
|
|
178
|
+
function lastLeaf(root) {
|
|
179
|
+
if (isContainer(typeOf(root))) {
|
|
180
|
+
const { children } = root.props || root;
|
|
181
|
+
return lastLeaf(children[children.length - 1]);
|
|
182
|
+
}
|
|
183
|
+
return root;
|
|
184
|
+
}
|
|
185
|
+
function pathUtils_nextStep(pathSoFar, targetPath, followPathToEnd = false) {
|
|
186
|
+
if (pathSoFar === targetPath) return {
|
|
187
|
+
idx: -1,
|
|
188
|
+
finalStep: true
|
|
189
|
+
};
|
|
190
|
+
const pathVisited = `${pathSoFar}.`;
|
|
191
|
+
if (!targetPath.startsWith(pathVisited)) throw Error("pathUtils nextStep has strayed from the path");
|
|
192
|
+
const endOfTheLine = followPathToEnd ? 0 : 1;
|
|
193
|
+
const paths = targetPath.replace(pathVisited, "").split(".").map((n)=>parseInt(n, 10));
|
|
194
|
+
return {
|
|
195
|
+
idx: paths[0],
|
|
196
|
+
finalStep: paths.length === endOfTheLine
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function resetPath(model, path, additionalProps) {
|
|
200
|
+
if (getProp(model, "path") === path) return model;
|
|
201
|
+
const children = [];
|
|
202
|
+
react.Children.forEach(model.props.children, (child, i)=>{
|
|
203
|
+
if (getProp(child, "path")) children.push(resetPath(child, `${path}.${i}`));
|
|
204
|
+
else children.push(child);
|
|
205
|
+
});
|
|
206
|
+
const pathPropName = model.props["data-path"] ? "data-path" : "path";
|
|
207
|
+
return react.cloneElement(model, {
|
|
208
|
+
[pathPropName]: path,
|
|
209
|
+
...additionalProps
|
|
210
|
+
}, children);
|
|
211
|
+
}
|
|
212
|
+
export { containerOf, findTarget, followPath, followPathToComponent, followPathToParent, getChild, nextLeaf, pathUtils_nextStep as nextStep, previousLeaf, resetPath, resolveJSONPath, resolvePath };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const NO_PROPS = {};
|
|
2
|
+
const getProp = (component, propName)=>{
|
|
3
|
+
const props = getProps(component);
|
|
4
|
+
return props[propName] ?? props[`data-${propName}`];
|
|
5
|
+
};
|
|
6
|
+
const getProps = (component)=>component?.props || component || NO_PROPS;
|
|
7
|
+
const getChildProp = (container)=>{
|
|
8
|
+
const props = getProps(container);
|
|
9
|
+
if (props.children) {
|
|
10
|
+
const { children: [target, ...rest] } = props;
|
|
11
|
+
if (rest.length > 0) console.warn(`getChild expected a single child, found ${rest.length + 1}`);
|
|
12
|
+
return target;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export { getChildProp, getProp, getProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function typeOf(element) {
|
|
2
|
+
if (element) {
|
|
3
|
+
const type = element.type;
|
|
4
|
+
if ("function" == typeof type || "object" == typeof type) {
|
|
5
|
+
const elementName = type.displayName || type.name || type.type?.name;
|
|
6
|
+
if ("string" == typeof elementName) return elementName;
|
|
7
|
+
}
|
|
8
|
+
if ("string" == typeof element.type) return element.type;
|
|
9
|
+
if (element.constructor) return element.constructor.displayName;
|
|
10
|
+
throw Error("typeOf unable to determine type of element");
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const isTypeOf = (element, type)=>typeOf(element) === type;
|
|
14
|
+
const isLayoutJSON = (layout)=>void 0 !== layout && "type" in layout;
|
|
15
|
+
export { isLayoutJSON, isTypeOf, typeOf };
|
package/cjs/Component.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var vuuUtils = require('@vuu-ui/vuu-utils');
|
|
6
|
-
|
|
7
|
-
const Component = React.forwardRef(function Component2({ resizeable, ...props }, ref) {
|
|
8
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className: "Component", ref });
|
|
9
|
-
});
|
|
10
|
-
Component.displayName = "Component";
|
|
11
|
-
vuuUtils.registerComponent("Component", Component, "component");
|
|
12
|
-
|
|
13
|
-
module.exports = Component;
|
|
14
|
-
//# sourceMappingURL=Component.js.map
|
package/cjs/Component.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../packages/vuu-layout/src/Component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from \"react\";\nimport { registerComponent } from \"@vuu-ui/vuu-utils\";\n\nexport interface ComponentProps extends HTMLAttributes<HTMLDivElement> {\n resizeable?: boolean;\n}\n\nconst Component = forwardRef(function Component(\n { resizeable, ...props }: ComponentProps,\n ref: React.ForwardedRef<HTMLDivElement>,\n) {\n return <div {...props} className=\"Component\" ref={ref} />;\n}) as React.FunctionComponent<ComponentProps>;\nComponent.displayName = \"Component\";\n\nexport default Component;\n\nregisterComponent(\"Component\", Component, \"component\");\n"],"names":["forwardRef","Component","registerComponent"],"mappings":";;;;;;AAOM,MAAA,SAAA,GAAYA,iBAAW,SAASC,UAAAA,CACpC,EAAE,UAAY,EAAA,GAAG,KAAM,EAAA,EACvB,GACA,EAAA;AACA,EAAA,sCAAQ,KAAK,EAAA,EAAA,GAAG,KAAO,EAAA,SAAA,EAAU,aAAY,GAAU,EAAA,CAAA;AACzD,CAAC;AACD,SAAA,CAAU,WAAc,GAAA,WAAA;AAIxBC,0BAAkB,CAAA,WAAA,EAAa,WAAW,WAAW,CAAA;;;;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var layoutContainerCss = ".vuuLayoutContainer {\n display: inline-block;\n outline: none;\n}\n\n[data-dragging=\"true\"] {\n position: absolute !important;\n z-index: 100;\n}\n\n.vuuSimpleDraggableWrapper {\n background-color: white;\n box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.2);\n}\n.vuuSimpleDraggableWrapper > * {\n height: 100%;\n width: 100%;\n}\n";
|
|
4
|
-
|
|
5
|
-
module.exports = layoutContainerCss;
|
|
6
|
-
//# sourceMappingURL=LayoutContainer.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutContainer.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/cjs/LayoutContainer.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var vuuUtils = require('@vuu-ui/vuu-utils');
|
|
5
|
-
var styles = require('@salt-ds/styles');
|
|
6
|
-
var window = require('@salt-ds/window');
|
|
7
|
-
var cx = require('clsx');
|
|
8
|
-
var React = require('react');
|
|
9
|
-
var LayoutContainer$1 = require('./LayoutContainer.css.js');
|
|
10
|
-
|
|
11
|
-
const LayoutContainer = React.forwardRef(function LayoutContainer2({
|
|
12
|
-
children,
|
|
13
|
-
className: classNameProp,
|
|
14
|
-
dropTarget,
|
|
15
|
-
resizeable: _,
|
|
16
|
-
// ignore, its just a marker used by the layout system
|
|
17
|
-
...htmlAttributes
|
|
18
|
-
}, forwardedRef) {
|
|
19
|
-
const targetWindow = window.useWindow();
|
|
20
|
-
styles.useComponentCssInjection({
|
|
21
|
-
testId: "vuu-layout-container",
|
|
22
|
-
css: LayoutContainer$1,
|
|
23
|
-
window: targetWindow
|
|
24
|
-
});
|
|
25
|
-
const className = cx("vuuLayoutContainer", classNameProp);
|
|
26
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, ref: forwardedRef, ...htmlAttributes, children });
|
|
27
|
-
});
|
|
28
|
-
const componentName = "LayoutContainer";
|
|
29
|
-
LayoutContainer.displayName = componentName;
|
|
30
|
-
vuuUtils.registerComponent(componentName, LayoutContainer, "container");
|
|
31
|
-
|
|
32
|
-
exports.LayoutContainer = LayoutContainer;
|
|
33
|
-
//# sourceMappingURL=LayoutContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutContainer.js","sources":["../../../packages/vuu-layout/src/LayoutContainer.tsx"],"sourcesContent":["import { registerComponent } from \"@vuu-ui/vuu-utils\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport cx from \"clsx\";\nimport { ForwardedRef, forwardRef, HTMLAttributes } from \"react\";\n\nimport layoutContainerCss from \"./LayoutContainer.css\";\n\nexport interface LayoutContainerProps extends HTMLAttributes<HTMLDivElement> {\n dropTarget?: boolean;\n resizeable?: boolean;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const LayoutContainer = forwardRef(function LayoutContainer(\n {\n children,\n className: classNameProp,\n dropTarget,\n resizeable: _, // ignore, its just a marker used by the layout system\n ...htmlAttributes\n }: LayoutContainerProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-layout-container\",\n css: layoutContainerCss,\n window: targetWindow,\n });\n\n const className = cx(\"vuuLayoutContainer\", classNameProp);\n return (\n <div className={className} ref={forwardedRef} {...htmlAttributes}>\n {children}\n </div>\n );\n});\n\nconst componentName = \"LayoutContainer\";\n\nLayoutContainer.displayName = componentName;\n\nregisterComponent(componentName, LayoutContainer, \"container\");\n"],"names":["forwardRef","LayoutContainer","useWindow","useComponentCssInjection","layoutContainerCss","registerComponent"],"mappings":";;;;;;;;;;AAaa,MAAA,eAAA,GAAkBA,gBAAW,CAAA,SAASC,gBACjD,CAAA;AAAA,EACE,QAAA;AAAA,EACA,SAAW,EAAA,aAAA;AAAA,EACX,UAAA;AAAA,EACA,UAAY,EAAA,CAAA;AAAA;AAAA,EACZ,GAAG;AACL,CAAA,EACA,YACA,EAAA;AACA,EAAA,MAAM,eAAeC,gBAAU,EAAA;AAC/B,EAAyBC,+BAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,sBAAA;AAAA,IACR,GAAK,EAAAC,iBAAA;AAAA,IACL,MAAQ,EAAA;AAAA,GACT,CAAA;AAED,EAAM,MAAA,SAAA,GAAY,EAAG,CAAA,oBAAA,EAAsB,aAAa,CAAA;AACxD,EAAA,sCACG,KAAI,EAAA,EAAA,SAAA,EAAsB,KAAK,YAAe,EAAA,GAAG,gBAC/C,QACH,EAAA,CAAA;AAEJ,CAAC;AAED,MAAM,aAAgB,GAAA,iBAAA;AAEtB,eAAA,CAAgB,WAAc,GAAA,aAAA;AAE9BC,0BAAkB,CAAA,aAAA,EAAe,iBAAiB,WAAW,CAAA;;;;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var dockLayoutCss = ".vuuDockLayout {\n --chest-bg: var(--hw-chest-bg, inherit);\n --drawer-bg: var(--hw-drawer-bg, inherit);\n --drawer-size: var(--hw-drawer-size, 200px);\n --drawer-peek-size: var(--hw-drawer-peek-size, 32px);\n --drawer-transition-duration: var(--hw-drawer-transition-duration, 0.4s);\n background-color: var(--chest-bg);\n display: flex;\n}\n\n.vuuDockLayout-horizontal {\n flex-direction: row;\n}\n\n.vuuDockLayout-vertical {\n flex-direction: column;\n}\n\n.vuuDockLayout-content {\n background-color: var(--chest-bg);\n flex-grow: 1;\n flex-shrink: 1;\n overflow: hidden;\n /* position: relative; */\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.vuuDockLayout-horizontal .vuuDockLayout-content {\n flex-basis: 100%;\n}\n\n.vuuDockLayout-vertical .vuuDockLayout-content {\n flex-basis: 100%;\n}\n";
|
|
4
|
-
|
|
5
|
-
module.exports = dockLayoutCss;
|
|
6
|
-
//# sourceMappingURL=DockLayout.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DockLayout.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var vuuUtils = require('@vuu-ui/vuu-utils');
|
|
5
|
-
var cx = require('clsx');
|
|
6
|
-
var styles = require('@salt-ds/styles');
|
|
7
|
-
var window = require('@salt-ds/window');
|
|
8
|
-
var React = require('react');
|
|
9
|
-
var Drawer = require('./Drawer.js');
|
|
10
|
-
var DockLayout$1 = require('./DockLayout.css.js');
|
|
11
|
-
|
|
12
|
-
const isDrawer = (component) => component.type === Drawer;
|
|
13
|
-
const isVertical = (element) => (
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
-
element.props.position && // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
-
element.props.position.match(/top|bottom/)
|
|
17
|
-
);
|
|
18
|
-
const classBase = "vuuDockLayout";
|
|
19
|
-
const DockLayout = (props) => {
|
|
20
|
-
const targetWindow = window.useWindow();
|
|
21
|
-
styles.useComponentCssInjection({
|
|
22
|
-
testId: "vuu-dock-layput",
|
|
23
|
-
css: DockLayout$1,
|
|
24
|
-
window: targetWindow
|
|
25
|
-
});
|
|
26
|
-
const { children, className: classNameProp, id, style } = props;
|
|
27
|
-
const childElements = React.useMemo(() => vuuUtils.asReactElements(children), [children]);
|
|
28
|
-
const [drawers, content] = vuuUtils.partition(childElements, isDrawer);
|
|
29
|
-
const [verticalDrawers, horizontalDrawers] = vuuUtils.partition(drawers, isVertical);
|
|
30
|
-
const orientation = verticalDrawers.length === 0 ? "horizontal" : horizontalDrawers.length === 0 ? "vertical" : "both";
|
|
31
|
-
const className = cx(classBase, classNameProp, `${classBase}-${orientation}`);
|
|
32
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, id, style, children: [
|
|
33
|
-
drawers,
|
|
34
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-content`, children: content })
|
|
35
|
-
] });
|
|
36
|
-
};
|
|
37
|
-
DockLayout.displayName = "DockLayout";
|
|
38
|
-
vuuUtils.registerComponent("DockLayout", DockLayout, "container");
|
|
39
|
-
|
|
40
|
-
module.exports = DockLayout;
|
|
41
|
-
//# sourceMappingURL=DockLayout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DockLayout.js","sources":["../../../../packages/vuu-layout/src/dock-layout/DockLayout.tsx"],"sourcesContent":["import {\n asReactElements,\n partition,\n registerComponent,\n} from \"@vuu-ui/vuu-utils\";\nimport cx from \"clsx\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { HTMLAttributes, ReactElement, useMemo } from \"react\";\nimport Drawer from \"./Drawer\";\n\nimport dockLayoutCss from \"./DockLayout.css\";\n\nconst isDrawer = (component: ReactElement) => component.type === Drawer;\nconst isVertical = (element: ReactElement) =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (element.props as any).position &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (element.props as any).position.match(/top|bottom/);\n\nexport type DockLayoutProps = HTMLAttributes<HTMLDivElement>;\n\nconst classBase = \"vuuDockLayout\";\n\nconst DockLayout = (props: DockLayoutProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-dock-layput\",\n css: dockLayoutCss,\n window: targetWindow,\n });\n\n const { children, className: classNameProp, id, style } = props;\n const childElements = useMemo(() => asReactElements(children), [children]);\n\n const [drawers, content] = partition(childElements, isDrawer);\n const [verticalDrawers, horizontalDrawers] = partition(drawers, isVertical);\n const orientation =\n verticalDrawers.length === 0\n ? \"horizontal\"\n : horizontalDrawers.length === 0\n ? \"vertical\"\n : \"both\";\n\n const className = cx(classBase, classNameProp, `${classBase}-${orientation}`);\n\n return (\n <div className={className} id={id} style={style}>\n {drawers}\n <div className={`${classBase}-content`}>{content}</div>\n </div>\n );\n};\nDockLayout.displayName = \"DockLayout\";\n\nexport default DockLayout;\n\nregisterComponent(\"DockLayout\", DockLayout, \"container\");\n"],"names":["useWindow","useComponentCssInjection","dockLayoutCss","useMemo","asReactElements","partition","jsxs","registerComponent"],"mappings":";;;;;;;;;;;AAaA,MAAM,QAAW,GAAA,CAAC,SAA4B,KAAA,SAAA,CAAU,IAAS,KAAA,MAAA;AACjE,MAAM,aAAa,CAAC,OAAA;AAAA;AAAA,EAEjB,QAAQ,KAAc,CAAA,QAAA;AAAA,EAEtB,OAAQ,CAAA,KAAA,CAAc,QAAS,CAAA,KAAA,CAAM,YAAY;AAAA,CAAA;AAIpD,MAAM,SAAY,GAAA,eAAA;AAEZ,MAAA,UAAA,GAAa,CAAC,KA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ge-border: solid 1px var(--salt-container-primary-borderColor, none);\n --vuu-close-icon-svg: var(--svg-chevron-double-right);\n\n transition: flex-basis;\n transition-duration: var(--drawer-transition-duration);\n position: relative;\n z-index: 1;\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n min-width: 0;\n min-height: 0;\n display: flex;\n}\n\n.vuuDrawer-peekaboo {\n flex-basis: var(--drawer-peek-size);\n flex-grow: 0;\n flex-shrink: 0;\n}\n\n.vuuDrawer-inline.vuuDrawer-open {\n flex-basis: var(--drawer-size);\n flex-grow: 0;\n flex-shrink: 0;\n}\n\n.vuuDrawer-liner {\n background-color: var(--drawer-bg);\n overflow: hidden;\n position: relative;\n}\n\n.vuuDrawer-content {\n height: 100%;\n overflow: hidden;\n position: absolute;\n top: 0;\n right: var(--drawer-peek-size);\n transition: right;\n transition-duration: var(--drawer-transition-duration);\n width: 100%;\n flex: 1 1 100%;\n}\n\n.vuuDrawer-open .vuuDrawer-content {\n right: 0;\n}\n\n/* .vuuDrawer:not(.vuuDrawer-open) .vuuDrawer-liner > * {\n display: none;\n} */\n\n.vuuDrawer-left {\n border-right: var(--drawer-leading-edge-border);\n}\n.vuuDrawer-right {\n border-left: var(--drawer-leading-edge-border);\n}\n.vuuDrawer-top {\n border-bottom: var(--drawer-leading-edge-border);\n}\n.vuuDrawer-bottom {\n border-top: var(--drawer-leading-edge-border);\n}\n\n.vuuDrawer-left .vuuDrawer-liner,\n.vuuDrawer-right .vuuDrawer-liner {\n height: 100%;\n transition: width;\n}\n\n.vuuDrawer-top .vuuDrawer-liner,\n.vuuDrawer-bottom .vuuDrawer-liner {\n width: 100%;\n transition: height;\n}\n\n.vuuDrawer-inline .vuuDrawer-liner {\n width: 100%;\n height: 100%;\n}\n\n.vuuDrawer-over .vuuDrawer-liner {\n position: absolute;\n transition-duration: 0.4s;\n}\n\n.vuuDrawer-over.vuuDrawer-left .vuuDrawer-liner {\n top: 0;\n left: 0;\n width: 0;\n}\n\n.vuuDrawer-over.vuuDrawer-right .vuuDrawer-liner {\n top: 0;\n right: 0;\n width: 0;\n}\n\n.vuuDrawer-over.vuuDrawer-top .vuuDrawer-liner {\n height: 0;\n top: 0;\n left: 0;\n}\n\n.vuuDrawer-over.vuuDrawer-bottom .vuuDrawer-liner {\n bottom: 0;\n height: 0;\n left: 0;\n}\n\n.vuuDrawer-left.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner,\n.vuuDrawer-right.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner {\n width: var(--drawer-peek-size);\n}\n\n.vuuDrawer-top.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner,\n.vuuDrawer-bottom.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner {\n height: var(--drawer-peek-size);\n}\n\n.vuuDrawer-left.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner,\n.vuuDrawer-right.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner {\n width: var(--drawer-size);\n}\n\n.vuuDrawer-top.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner,\n.vuuDrawer-bottom.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner {\n height: var(--drawer-size);\n}\n\n.vuuDrawer-top,\n.vuuDrawer-left {\n order: 0;\n}\n\n.vuuDrawer-bottom,\n.vuuDrawer-right {\n order: 99;\n}\n\n.vuuDrawer-left,\n.vuuDrawer-right {\n flex-direction: column;\n}\n\n.vuuToggleButton-container {\n --saltButton-height: 28px;\n --saltButton-width: 28px;\n --vuu-icon-size: 12px;\n flex: 0 0 28px;\n}\n\n.vuuDrawer-open {\n --vuu-close-icon-svg: var(--svg-chevron-double-left);\n\n}\n";
|
|
4
|
-
|
|
5
|
-
module.exports = drawerCss;
|
|
6
|
-
//# sourceMappingURL=Drawer.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var core = require('@salt-ds/core');
|
|
5
|
-
var cx = require('clsx');
|
|
6
|
-
var styles = require('@salt-ds/styles');
|
|
7
|
-
var window = require('@salt-ds/window');
|
|
8
|
-
var React = require('react');
|
|
9
|
-
var Drawer$1 = require('./Drawer.css.js');
|
|
10
|
-
|
|
11
|
-
const classBase = "vuuDrawer";
|
|
12
|
-
const sizeAttribute = (value) => {
|
|
13
|
-
return typeof value === "string" ? value : value + "px";
|
|
14
|
-
};
|
|
15
|
-
const getStyle = (styleProp, sizeOpen, sizeClosed) => {
|
|
16
|
-
const hasSizeOpen = sizeOpen !== void 0;
|
|
17
|
-
const hasSizeClosed = sizeClosed !== void 0;
|
|
18
|
-
if (!styleProp && !hasSizeClosed && !hasSizeOpen) {
|
|
19
|
-
return void 0;
|
|
20
|
-
}
|
|
21
|
-
if (!hasSizeClosed && !hasSizeOpen) {
|
|
22
|
-
return styleProp;
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
...styleProp,
|
|
26
|
-
"--drawer-size": hasSizeOpen ? sizeAttribute(sizeOpen) : void 0,
|
|
27
|
-
"--drawer-peek-size": hasSizeClosed ? sizeAttribute(sizeClosed) : void 0
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
const Drawer = ({
|
|
31
|
-
children,
|
|
32
|
-
className: classNameProp,
|
|
33
|
-
clickToOpen,
|
|
34
|
-
defaultOpen,
|
|
35
|
-
sizeOpen,
|
|
36
|
-
sizeClosed,
|
|
37
|
-
style: styleProp,
|
|
38
|
-
open: openProp,
|
|
39
|
-
position = "left",
|
|
40
|
-
inline,
|
|
41
|
-
onClick,
|
|
42
|
-
peekaboo = false,
|
|
43
|
-
toggleButton,
|
|
44
|
-
...props
|
|
45
|
-
}) => {
|
|
46
|
-
const targetWindow = window.useWindow();
|
|
47
|
-
styles.useComponentCssInjection({
|
|
48
|
-
testId: "vuu-drawer",
|
|
49
|
-
css: Drawer$1,
|
|
50
|
-
window: targetWindow
|
|
51
|
-
});
|
|
52
|
-
const [open, setOpen] = core.useControlled({
|
|
53
|
-
controlled: openProp,
|
|
54
|
-
default: defaultOpen ?? false,
|
|
55
|
-
name: "Drawer",
|
|
56
|
-
state: "open"
|
|
57
|
-
});
|
|
58
|
-
const className = cx(classBase, classNameProp, `${classBase}-${position}`, {
|
|
59
|
-
[`${classBase}-open`]: open,
|
|
60
|
-
[`${classBase}-inline`]: inline,
|
|
61
|
-
[`${classBase}-over`]: !inline,
|
|
62
|
-
[`${classBase}-peekaboo`]: peekaboo
|
|
63
|
-
});
|
|
64
|
-
const toggleDrawer = React.useCallback(() => {
|
|
65
|
-
setOpen(!open);
|
|
66
|
-
}, [open, setOpen]);
|
|
67
|
-
const style = getStyle(styleProp, sizeOpen, sizeClosed);
|
|
68
|
-
const handleClick = clickToOpen ? toggleDrawer : onClick;
|
|
69
|
-
const renderToggleButton = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("vuuToggleButton-container"), children: open ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
70
|
-
core.Button,
|
|
71
|
-
{
|
|
72
|
-
"aria-label": "close",
|
|
73
|
-
onClick: toggleDrawer,
|
|
74
|
-
"data-icon": "close",
|
|
75
|
-
variant: "secondary"
|
|
76
|
-
}
|
|
77
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
78
|
-
core.Button,
|
|
79
|
-
{
|
|
80
|
-
"aria-label": "open",
|
|
81
|
-
onClick: toggleDrawer,
|
|
82
|
-
"data-icon": "close",
|
|
83
|
-
variant: "secondary"
|
|
84
|
-
}
|
|
85
|
-
) });
|
|
86
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, className, onClick: handleClick, style, children: [
|
|
87
|
-
toggleButton == "start" ? renderToggleButton() : null,
|
|
88
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-liner`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-content`, children }) }),
|
|
89
|
-
toggleButton == "end" ? renderToggleButton() : null
|
|
90
|
-
] });
|
|
91
|
-
};
|
|
92
|
-
Drawer.displayName = "Drawer";
|
|
93
|
-
|
|
94
|
-
module.exports = Drawer;
|
|
95
|
-
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../../../../packages/vuu-layout/src/dock-layout/Drawer.tsx"],"sourcesContent":["import { Button, useControlled } from \"@salt-ds/core\";\nimport cx from \"clsx\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { CSSProperties, HTMLAttributes, useCallback } from \"react\";\n\nimport drawerCss from \"./Drawer.css\";\n\nconst classBase = \"vuuDrawer\";\n\nconst sizeAttribute = (value: string | number) => {\n return typeof value === \"string\" ? value : value + \"px\";\n};\n\nconst getStyle = (\n styleProp?: CSSProperties,\n sizeOpen?: number,\n sizeClosed?: number,\n) => {\n const hasSizeOpen = sizeOpen !== undefined;\n const hasSizeClosed = sizeClosed !== undefined;\n\n if (!styleProp && !hasSizeClosed && !hasSizeOpen) {\n return undefined;\n }\n\n if (!hasSizeClosed && !hasSizeOpen) {\n return styleProp;\n }\n\n return {\n ...styleProp,\n \"--drawer-size\": hasSizeOpen ? sizeAttribute(sizeOpen) : undefined,\n \"--drawer-peek-size\": hasSizeClosed ? sizeAttribute(sizeClosed) : undefined,\n };\n};\n\nexport interface DrawerProps extends HTMLAttributes<HTMLDivElement> {\n clickToOpen?: boolean;\n defaultOpen?: boolean;\n inline?: boolean;\n open?: boolean;\n peekaboo?: boolean;\n position?: \"left\" | \"right\" | \"top\" | \"bottom\";\n sizeOpen?: number;\n sizeClosed?: number;\n toggleButton?: \"start\" | \"end\";\n}\nconst Drawer = ({\n children,\n className: classNameProp,\n clickToOpen,\n defaultOpen,\n sizeOpen,\n sizeClosed,\n style: styleProp,\n open: openProp,\n position = \"left\",\n inline,\n onClick,\n peekaboo = false,\n toggleButton,\n ...props\n}: DrawerProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-drawer\",\n css: drawerCss,\n window: targetWindow,\n });\n\n const [open, setOpen] = useControlled({\n controlled: openProp,\n default: defaultOpen ?? false,\n name: \"Drawer\",\n state: \"open\",\n });\n\n const className = cx(classBase, classNameProp, `${classBase}-${position}`, {\n [`${classBase}-open`]: open,\n [`${classBase}-inline`]: inline,\n [`${classBase}-over`]: !inline,\n [`${classBase}-peekaboo`]: peekaboo,\n });\n\n const toggleDrawer = useCallback(() => {\n setOpen(!open);\n }, [open, setOpen]);\n\n const style = getStyle(styleProp, sizeOpen, sizeClosed);\n\n const handleClick = clickToOpen ? toggleDrawer : onClick;\n\n const renderToggleButton = () => (\n <div className={cx(\"vuuToggleButton-container\")}>\n {open ? (\n <Button\n aria-label=\"close\"\n onClick={toggleDrawer}\n data-icon=\"close\"\n variant=\"secondary\"\n />\n ) : (\n <Button\n aria-label=\"open\"\n onClick={toggleDrawer}\n data-icon=\"close\"\n variant=\"secondary\"\n />\n )}\n </div>\n );\n\n return (\n <div {...props} className={className} onClick={handleClick} style={style}>\n {toggleButton == \"start\" ? renderToggleButton() : null}\n <div className={`${classBase}-liner`}>\n <div className={`${classBase}-content`}>{children}</div>\n </div>\n {toggleButton == \"end\" ? renderToggleButton() : null}\n </div>\n );\n};\nDrawer.displayName = \"Drawer\";\n\nexport default Drawer;\n"],"names":["useWindow","useComponentCssInjection","drawerCss","useControlled","useCallback","jsx","Button"],"mappings":";;;;;;;;;;AAQA,MAAM,SAAY,GAAA,WAAA;AAElB,MAAM,aAAA,GAAgB,CAAC,KAA2B,KAAA;AAChD,EAAA,OAAO,OAAO,KAAA,KAAU,QAAW,GAAA,KAAA,GAAQ,KAAQ,GAAA,IAAA;AACrD,CAAA;AAEA,MAAM,QAAW,GAAA,CACf,SACA,EAAA,QAAA,EACA,UAC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