@vuu-ui/vuu-layout 0.5.10 → 0.5.11

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 (114) hide show
  1. package/LICENSE +201 -0
  2. package/cjs/index.js +20 -0
  3. package/cjs/index.js.map +7 -0
  4. package/esm/index.js +20 -0
  5. package/esm/index.js.map +7 -0
  6. package/index.css +2 -0
  7. package/index.css.map +7 -0
  8. package/package.json +13 -10
  9. package/src/Component.css +0 -0
  10. package/src/Component.tsx +0 -20
  11. package/src/DraggableLayout.css +0 -18
  12. package/src/DraggableLayout.tsx +0 -26
  13. package/src/__tests__/flexbox-utils.spec.js +0 -90
  14. package/src/chest-of-drawers/Chest.css +0 -36
  15. package/src/chest-of-drawers/Chest.tsx +0 -42
  16. package/src/chest-of-drawers/Drawer.css +0 -159
  17. package/src/chest-of-drawers/Drawer.tsx +0 -118
  18. package/src/chest-of-drawers/index.ts +0 -2
  19. package/src/common-types.ts +0 -9
  20. package/src/debug.ts +0 -16
  21. package/src/drag-drop/BoxModel.ts +0 -551
  22. package/src/drag-drop/DragState.ts +0 -219
  23. package/src/drag-drop/Draggable.ts +0 -282
  24. package/src/drag-drop/DropMenu.css +0 -71
  25. package/src/drag-drop/DropMenu.tsx +0 -61
  26. package/src/drag-drop/DropTarget.ts +0 -393
  27. package/src/drag-drop/DropTargetRenderer.css +0 -40
  28. package/src/drag-drop/DropTargetRenderer.tsx +0 -277
  29. package/src/drag-drop/dragDropTypes.ts +0 -47
  30. package/src/drag-drop/index.ts +0 -5
  31. package/src/editable-label/EditableLabel.css +0 -28
  32. package/src/editable-label/EditableLabel.tsx +0 -99
  33. package/src/editable-label/index.ts +0 -1
  34. package/src/flexbox/Flexbox.css +0 -45
  35. package/src/flexbox/Flexbox.tsx +0 -70
  36. package/src/flexbox/FlexboxLayout.tsx +0 -28
  37. package/src/flexbox/FluidGrid.css +0 -134
  38. package/src/flexbox/FluidGrid.tsx +0 -82
  39. package/src/flexbox/FluidGridLayout.tsx +0 -9
  40. package/src/flexbox/Splitter.css +0 -140
  41. package/src/flexbox/Splitter.tsx +0 -127
  42. package/src/flexbox/flexbox-utils.ts +0 -128
  43. package/src/flexbox/flexboxTypes.ts +0 -68
  44. package/src/flexbox/index.ts +0 -5
  45. package/src/flexbox/useResponsiveSizing.ts +0 -82
  46. package/src/flexbox/useSplitterResizing.ts +0 -270
  47. package/src/index.ts +0 -19
  48. package/src/layout-action.ts +0 -21
  49. package/src/layout-header/ActionButton.tsx +0 -23
  50. package/src/layout-header/Header.css +0 -8
  51. package/src/layout-header/Header.tsx +0 -216
  52. package/src/layout-header/index.ts +0 -1
  53. package/src/layout-provider/LayoutProvider.tsx +0 -161
  54. package/src/layout-provider/LayoutProviderContext.ts +0 -17
  55. package/src/layout-provider/index.ts +0 -3
  56. package/src/layout-provider/useLayoutDragDrop.ts +0 -210
  57. package/src/layout-reducer/flexUtils.ts +0 -276
  58. package/src/layout-reducer/index.ts +0 -5
  59. package/src/layout-reducer/insert-layout-element.ts +0 -365
  60. package/src/layout-reducer/layout-reducer.ts +0 -237
  61. package/src/layout-reducer/layoutTypes.ts +0 -159
  62. package/src/layout-reducer/layoutUtils.ts +0 -288
  63. package/src/layout-reducer/remove-layout-element.ts +0 -226
  64. package/src/layout-reducer/replace-layout-element.ts +0 -113
  65. package/src/layout-reducer/resize-flex-children.ts +0 -55
  66. package/src/layout-reducer/wrap-layout-element.ts +0 -307
  67. package/src/layout-view/View.css +0 -61
  68. package/src/layout-view/View.tsx +0 -143
  69. package/src/layout-view/ViewContext.ts +0 -30
  70. package/src/layout-view/index.ts +0 -5
  71. package/src/layout-view/useView.tsx +0 -104
  72. package/src/layout-view/useViewActionDispatcher.ts +0 -123
  73. package/src/layout-view/useViewResize.ts +0 -53
  74. package/src/layout-view/viewTypes.ts +0 -35
  75. package/src/palette/Palette.css +0 -33
  76. package/src/palette/Palette.tsx +0 -140
  77. package/src/palette/PaletteSalt.css +0 -9
  78. package/src/palette/PaletteSalt.tsx +0 -79
  79. package/src/palette/index.ts +0 -3
  80. package/src/placeholder/Placeholder.css +0 -10
  81. package/src/placeholder/Placeholder.tsx +0 -38
  82. package/src/placeholder/index.ts +0 -1
  83. package/src/registry/ComponentRegistry.ts +0 -44
  84. package/src/registry/index.ts +0 -1
  85. package/src/responsive/breakpoints.ts +0 -62
  86. package/src/responsive/index.ts +0 -3
  87. package/src/responsive/measureMinimumNodeSize.ts +0 -23
  88. package/src/responsive/overflowUtils.js +0 -14
  89. package/src/responsive/use-breakpoints.ts +0 -101
  90. package/src/responsive/useResizeObserver.ts +0 -154
  91. package/src/responsive/utils.ts +0 -37
  92. package/src/stack/Stack.css +0 -39
  93. package/src/stack/Stack.tsx +0 -173
  94. package/src/stack/StackLayout.tsx +0 -119
  95. package/src/stack/index.ts +0 -4
  96. package/src/stack/stackTypes.ts +0 -22
  97. package/src/tabs/TabPanel.css +0 -12
  98. package/src/tabs/TabPanel.tsx +0 -17
  99. package/src/tabs/index.ts +0 -1
  100. package/src/tools/config-wrapper/ConfigWrapper.tsx +0 -55
  101. package/src/tools/config-wrapper/index.ts +0 -1
  102. package/src/tools/devtools-box/layout-configurator.css +0 -112
  103. package/src/tools/devtools-box/layout-configurator.jsx +0 -369
  104. package/src/tools/devtools-tree/layout-tree-viewer.css +0 -15
  105. package/src/tools/devtools-tree/layout-tree-viewer.jsx +0 -36
  106. package/src/tools/index.ts +0 -4
  107. package/src/use-persistent-state.ts +0 -112
  108. package/src/utils/index.ts +0 -5
  109. package/src/utils/pathUtils.ts +0 -283
  110. package/src/utils/propUtils.ts +0 -26
  111. package/src/utils/refUtils.ts +0 -16
  112. package/src/utils/styleUtils.ts +0 -13
  113. package/src/utils/typeOf.ts +0 -25
  114. package/tsconfig-emit-types.json +0 -11
package/index.css ADDED
@@ -0,0 +1,2 @@
1
+ .vuuDialog{background:var(--salt-container-primary-background);border:var(--vuuDialog-border, solid 1px #ccc);border-radius:5px;padding:var(--vuuDialog-padding, 0);box-shadow:var(--salt-overlayable-shadow, none);height:var(--vuuDialog-height, fit-content);width:var(--vuuDialog-width, fit-content)}.vuuDialog-header{--saltButton-height: 28px;--saltButton-width: 28px;--saltToolbar-background: transparent;--saltToolbar-height: calc(var(--salt-size-base) + 5px);border-bottom:solid 1px var(--salt-container-primary-borderColor)}.vuuDialog-header>.Responsive-inner{align-items:center}.vuuDialog-header>.Responsive-inner>:last-child{right:2px}.vuuDrawer{--drawer-leading-edge-border: solid 1px var(--salt-container-primary-borderColor, none);--vuu-close-icon-svg: var(--svg-chevron-double-right);transition:flex-basis;transition-duration:var(--drawer-transition-duration);position:relative;z-index:1;flex-basis:0;flex-grow:1;flex-shrink:1;min-width:0;min-height:0;display:flex}.vuuDrawer-peekaboo{flex-basis:var(--drawer-peek-size);flex-grow:0;flex-shrink:0}.vuuDrawer-inline.vuuDrawer-open{flex-basis:var(--drawer-size);flex-grow:0;flex-shrink:0}.vuuDrawer-liner{background-color:var(--drawer-bg);overflow:hidden;position:relative}.vuuDrawer-content{height:100%;overflow:hidden;position:absolute;top:0;right:var(--drawer-peek-size);transition:right;transition-duration:var(--drawer-transition-duration);width:100%;flex:1 1 100%}.vuuDrawer-open .vuuDrawer-content{right:0}.vuuDrawer-left{border-right:var(--drawer-leading-edge-border)}.vuuDrawer-right{border-left:var(--drawer-leading-edge-border)}.vuuDrawer-top{border-bottom:var(--drawer-leading-edge-border)}.vuuDrawer-bottom{border-top:var(--drawer-leading-edge-border)}.vuuDrawer-left .vuuDrawer-liner,.vuuDrawer-right .vuuDrawer-liner{height:100%;transition:width}.vuuDrawer-top .vuuDrawer-liner,.vuuDrawer-bottom .vuuDrawer-liner{width:100%;transition:height}.vuuDrawer-inline .vuuDrawer-liner{width:100%;height:100%}.vuuDrawer-over .vuuDrawer-liner{position:absolute;transition-duration:.4s}.vuuDrawer-over.vuuDrawer-left .vuuDrawer-liner{top:0;left:0;width:0}.vuuDrawer-over.vuuDrawer-right .vuuDrawer-liner{top:0;right:0;width:0}.vuuDrawer-over.vuuDrawer-top .vuuDrawer-liner{height:0;top:0;left:0}.vuuDrawer-over.vuuDrawer-bottom .vuuDrawer-liner{bottom:0;height:0;left:0}.vuuDrawer-left.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner,.vuuDrawer-right.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner{width:var(--drawer-peek-size)}.vuuDrawer-top.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner,.vuuDrawer-bottom.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner{height:var(--drawer-peek-size)}.vuuDrawer-left.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner,.vuuDrawer-right.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner{width:var(--drawer-size)}.vuuDrawer-top.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner,.vuuDrawer-bottom.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner{height:var(--drawer-size)}.vuuDrawer-top,.vuuDrawer-left{order:0}.vuuDrawer-bottom,.vuuDrawer-right{order:99}.vuuDrawer-left,.vuuDrawer-right{flex-direction:column}.vuuToggleButton-container{--saltButton-height: 28px;--saltButton-width: 28px;--vuu-icon-size: 12px;flex:0 0 28px}.vuuDrawer-open{--vuu-close-icon-svg: var(--svg-chevron-double-left)}.hwChest{--chest-bg: var(--hw-chest-bg, inherit);--drawer-bg: var(--hw-drawer-bg, inherit);--drawer-size: var(--hw-drawer-size, 200px);--drawer-peek-size: var(--hw-drawer-peek-size, 32px);--drawer-transition-duration: var(--hw-drawer-transition-duration, .4s);background-color:var(--chest-bg);display:flex}.hwChest-horizontal{flex-direction:row}.hwChest-vertical{flex-direction:column}.hwChest-content{background-color:var(--chest-bg);flex-grow:1;flex-shrink:1;overflow:hidden;display:flex;align-items:center;justify-content:center}.hwChest-horizontal .hwChest-content,.hwChest-vertical .hwChest-content{flex-basis:100%}.vuuPopup{box-shadow:0 6px 12px #0000002d;position:absolute;top:0;left:0;width:0;height:0;overflow:visible;z-index:1000}.vuuPopup{position:absolute}.vuuDropMenu{margin-left:-50%;margin-bottom:-50%;background-color:#fff;border:solid 1px var(--grey40);display:inline-flex;justify-content:center;align-items:center;padding:3px;border-radius:3px}.vuuDropMenu-left,.vuuDropMenu-right{flex-direction:column}.vuuDropMenu-bottom{transform:translateY(-30px)}.vuuDropMenu-right{transform:translate(-20px)}.vuuDropMenu-item{--vuu-icon-size: 20px;width:32px;height:32px;background-color:var(--grey20);border-bottom:solid 1px var(--grey40);cursor:pointer;display:flex;align-items:center;justify-content:center}.vuuDropMenu-item .Icon{transform:scale(1.25);transform-origin:center center}.vuuDropMenu-left .vuuDropMenu-item .hwIcon{transform:scale(1.25) rotate(180deg);transform-origin:center center}.vuuDropMenu-top .vuuDropMenu-item .hwIcon{transform:scale(1.25) rotate(270deg);transform-origin:center center}.vuuDropMenu-bottom .vuuDropMenu-item .hwIcon{transform:scale(1.25) rotate(90deg);transform-origin:center center}.vuuDropMenu-item .hwIcon-path{fill:gray}.vuuDropMenu-item:hover{background-color:#c8c8c880}.vuuDropMenu-item:hover .hwIcon-path-2{fill:#00f}.vuuDropMenu-item:last-child{border-bottom:none}#hw-drag-canvas{visibility:hidden;z-index:1;position:absolute;top:0px;left:0;right:0;bottom:0;background-color:transparent}#hw-drag-canvas>svg{position:absolute}.drawing #hw-drag-canvas{visibility:visible}path.drop-target{stroke:#00f;stroke-width:4px;fill:transparent}path.drop-target.centre{stroke:red}#vuu-drop-outline{fill:#0000ff4d;stroke:none;stroke-dasharray:4 2}#hw-drop-guides{fill:none;stroke:#0000004d;stroke-dasharray:2 3}.DraggableLayout{display:inline-block;outline:none}[data-dragging=true]{position:absolute!important;z-index:100}.vuuSimpleDraggableWrapper{background-color:#fff;box-shadow:0 6px 10px #0003}.vuuSimpleDraggableWrapper>*{height:100%;width:100%}.vuuPlaceholder{flex-basis:0;flex-grow:1;flex-shrink:1}.vuuPlaceholder-shim{flex-grow:0;flex-shrink:0}.Splitter{--splitter-size: 3px;--splitter-border-width: 4px;--splitter-border-style: none;--splitter-border-color: white;align-items:center;background-color:var(--grey60);border-color:var(--splitter-border-color);border-style:var(--splitter-border-style);box-sizing:border-box;display:flex;justify-content:center;position:relative;outline:none;z-index:1}.Splitter:hover{background-color:var(--grey40)}.active.Splitter{background-color:var(--blue500)}.Splitter.column{cursor:ns-resize;height:var(--splitter-size);border-width:var(--splitter-border-width) 0}.Splitter:not(.column){cursor:ew-resize;width:var(--splitter-size);border-width:0 var(--splitter-border-width)}.Splitter:before{border:none;border-radius:0;content:"";display:block;padding:0}.Splitter .grab-zone{position:absolute;background-color:#ff000003;cursor:inherit}.Splitter.column .grab-zone{left:0;right:0;top:-5px;bottom:-5px}.Splitter:not(column) .grab-zone{left:-5px;right:-5px;top:0;bottom:0}.Splitter:not(.column):before{width:1px;height:10px;background:linear-gradient(to bottom,var(--grey900) 10%,transparent 10%,transparent 30%,var(--grey900) 30%,var(--grey900) 40%,transparent 40%,transparent 60%,var(--grey900) 60%,var(--grey900) 70%,transparent 70%,transparent 90%,var(--grey900) 90%)}.active.Splitter.column:before{background:linear-gradient(to right,#ffffff 10%,transparent 10%,transparent 30%,#ffffff 30%,#ffffff 40%,transparent 40%,transparent 60%,#ffffff 60%,#ffffff 70%,transparent 70%,transparent 90%,#ffffff 90%)}.active.Splitter:not(.column):before{background:linear-gradient(to bottom,#ffffff 10%,transparent 10%,transparent 30%,#ffffff 30%,#ffffff 40%,transparent 40%,transparent 60%,#ffffff 60%,#ffffff 70%,transparent 70%,transparent 90%,#ffffff 90%)}.Splitter.column:before{width:10px;height:1px;background:linear-gradient(to right,var(--grey900) 10%,transparent 10%,transparent 30%,var(--grey900) 30%,var(--grey900) 40%,transparent 40%,transparent 60%,var(--grey900) 60%,var(--grey900) 70%,transparent 70%,transparent 90%,var(--grey900) 90%)}:root{--hw-space-unit: 4px;--hw-flex-gap: 3;--hw-fluid-grid-col-bg: rgba(200, 200, 200, .3)}.hwFlexbox{background-color:var(--container1-background);box-sizing:border-box;display:flex;gap:calc(var(--spacing) * var(--space));min-height:0;min-width:0;overflow:hidden}.hwFlexbox-column{flex-direction:column}.hwFlexbox-row{flex-direction:row}.hwFlexbox>.Splitter{flex-basis:auto;flex-grow:0;flex-shrink:0}.hwFlexbox.full-page{height:100vh;width:100vw}.flex-fill{border-color:red;flex:0;flex-grow:1;flex-shrink:1}.vuuView.flex-fill{border-color:red}:root{--hw-space-unit: 4px;--hw-fluid-grid-col-bg: rgba(252, 209, 232, .7)}.hwFluidGrid{--gap: var(--gutter-width);display:flex;gap:calc(var(--grid-gap) * var(--hw-space-unit));flex-wrap:wrap;padding:0}.hwFluidGrid>*{--gutter-width: calc(var(--hw-flex-gap) * var(--hw-space-unit));--gutter-count: calc(var(--parent-col-count) - 1);--total-gutter-width: calc(var(--gutter-count) * var(--gutter-width));--available-width: calc(100% - var(--total-gutter-width));flex-basis:0;flex-grow:1;flex-shrink:1;position:relative}.hwFluidGrid>*:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border:dashed 2px blue}.hwFluidGrid>[data-xs]{--internal-gutter-count: calc(var(--col-span) - 1);--percent-width: calc(var(--col-span) / var(--parent-col-count));--internal-gutter-width: calc(var(--internal-gutter-count) * var(--gutter-width));flex-basis:calc(var(--available-width) * var(--percent-width) + var(--internal-gutter-width));flex-grow:0}.hwFluidGrid>[data-xs="1"]{--col-span: 1}.hwFluidGrid>[data-xs="2"]{--col-span: 2}.hwFluidGrid>[data-xs="3"]{--col-span: 3}.hwFluidGrid>[data-xs="4"]{--col-span: 4}.hwFluidGrid>[data-xs="6"]{--col-span: 6}.hwFluidGrid>[data-xs="8"]{--col-span: 8}.hwFluidGrid>[data-xs="9"]{--col-span: 9}.hwFluidGrid>[data-xs="10"]{--col-span: 10}.hwFluidGrid>[data-xs="11"]{--col-span: 11}.hwFluidGrid>[data-xs="12"]{--col-span: 12}@media (min-width: 600px){.hwFluidGrid>[data-sm="1"]{--col-span: 1}.hwFluidGrid>[data-sm="2"]{--col-span: 2}.hwFluidGrid>[data-sm="3"]{--col-span: 3}.hwFluidGrid>[data-sm="4"]{--col-span: 4}.hwFluidGrid>[data-sm="6"]{--col-span: 6}.hwFluidGrid>[data-sm="8"]{--col-span: 8}.hwFluidGrid>[data-sm="9"]{--col-span: 9}.hwFluidGrid>[data-sm="10"]{--col-span: 10}.hwFluidGrid>[data-sm="11"]{--col-span: 11}.hwFluidGrid>[data-sm="12"]{--col-span: 12}}.hwFluidGrid-show-grid{--gutter-width: calc(var(--hw-flex-gap) * var(--hw-space-unit));--grid-gutter-count: calc(var(--grid-col-count, var(--parent-col-count)) - 1);--grid-total-gutter-width: calc(var(--grid-gutter-count) * var(--gutter-width));--grid-available-width: calc(100% - var(--grid-total-gutter-width));--grid-percent-width: calc(1 / var(--grid-col-count, var(--parent-col-count)));--column-width: calc(var(--grid-available-width) * var(--grid-percent-width));background:repeating-linear-gradient(to right,var(--hw-fluid-grid-col-bg) 0,var(--hw-fluid-grid-col-bg) var(--column-width),white var(--column-width),white calc(var(--column-width) + var(--gutter-width)))}.vuuView{border-color:var(--vuuView-borderColor, var(--salt-container-primary-borderColor));border-width:var(--vuuView-borderWidth, 1px);border-style:var(--vuuView-borderStyle, none);display:flex;flex-direction:column;margin:var(--vuuView-margin, 0px);min-height:50px;min-width:50px;outline:none;overflow:hidden;position:relative}.vuuView.focus-visible:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border:dotted cornflowerblue 2px}.vuuView.dragging{box-shadow:0 6px 12px #0000002d}.vuuView-main{display:flex;flex-direction:var(--vuuView-flexDirection, column);flex-wrap:var(--vuuView-flex-wrap, nowrap);flex:1;overflow:hidden;position:relative}.vuuView-main>*{flex-basis:auto;flex-grow:var(--vuuView-flex-grow, 1);flex-shrink:var(--vuuView-flex-shrink, 1)}.vuuView-collapsed .vuuView-main{display:none}.vuuView-collapsed+.Splitter{display:none}.vuuView-collapsed .Toolbar-vertical{border-right:solid 1px var(--grey40)}.vuuView-collapsed .Toolbar-vertical .toolbar-title{display:none}.vuuHeader{--saltToolbar-background: var(--salt-container-tertiary-background)}.salt-density-high .vuuHeader{--saltToolbarField-marginTop: 0}.vuuPalette-horizontal{align-items:center;display:flex}.vuuPaletteItem{--vuu-icon-color: var(--salt-separable-primary-borderColor);--vuu-icon-inset:calc(50% - 12px) auto auto -3px;--vuu-icon-height: 24px;--vuu-icon-width: 24px;--list-item-text-padding: 0 0 0 calc(var(--salt-size-unit) * 3)}.vuuPaletteItem[data-draggable]:after{height:22px;width:6px;content:"";position:absolute;background-image:linear-gradient(45deg,rgb(180,183,190) 25%,transparent 25%),linear-gradient(-45deg,rgb(180,183,190) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgb(180,183,190) 25%),linear-gradient(-45deg,transparent 75%,rgb(180,183,190) 25%);background-size:4px 4px;background-position:0 0,2px 0,2px -2px,0 2px}.vuuSimpleDraggableWrapper>.vuuPaletteItem{--vuu-icon-color: var(--salt-selectable-foreground)}.vuuPalette{--list-item-header-bg: inherit;--list-item-header-color: inherit;--list-item-padding: 0 6px 0 24px;--list-item-header-twisty-color: black;--list-item-header-twisty-left: 3px;--list-item-header-twisty-right: auto}.Tabs{display:flex;box-sizing:border-box;flex-direction:column}.Tabs-horizontal{flex-direction:row}.Tabs .Toolbar:before{left:0;width:100%;bottom:0;height:1px;content:"";position:absolute;background:var(--grey60)}.vuuTabHeader{--saltTabs-activationIndicator-background: transparent;--saltToolbarField-marginTop: calc(var(--salt-size-unit) - 1px);border-bottom:solid 1px var(--salt-container-primary-borderColor)}.vuuTabHeader+.hwFlexbox,.vuuTabHeader+*{flex:1}.vuuTabHeader+.vuuView>.vuuHeader{height:0;overflow:hidden}.Layout-svg-button{--spacing-medium: 5px}[data-design-mode=true] .Component{filter:grayscale(100%);opacity:.4}[data-design-mode=true] .Component:after{color:#000;content:"Component";height:12px;background-color:#ff0}.LayoutConfigurator{--margin-color: #f3cea5;--border-color: #fddda0;--padding-color: #c6d092;--content-color: #8cb6c0;display:flex;flex-direction:column;align-items:stretch;background-color:var(--margin-color)}.LayoutConfigurator .layout-outer{flex:1 1 auto;display:flex;flex-direction:column;align-items:stretch}.LayoutBox{--hw-control-font-size: 13px;--hw-text-input-bg: rgba(255, 255, 255, .3);--hwTextInput-padding: 3px;--hw-text-input-position: absolute;--hwTextInput-width: 30px;flex:1 1 auto}.LayoutBox>.layout-top{flex:0 0 40px;padding-left:12px;display:flex;flex-direction:row;align-items:center;position:relative}.LayoutBox>.layout-bottom{flex:0 0 40px;position:relative;display:flex;flex-direction:row;align-items:center}.LayoutBox>.layout-inner>.layout-right,.LayoutBox>.layout-inner>.layout-left{flex:0 0 40px;display:flex;flex-direction:column;justify-content:center;align-items:center}.layout-top,.layout-bottom{--hw-text-input-margin: 0 0 0 -15px}.layout-top>.layout-input,.layout-bottom>.layout-input{left:50%}.LayoutBox>.layout-inner{flex:1 1 auto;display:flex;flex-direction:row;align-items:stretch}.LayoutBox.layout-margin{background-color:var(--margin-color);border:dashed 2px black}.LayoutBox.layout-border{background-color:var(--border-color);border:solid 2px black}.LayoutBox.layout-padding{background-color:var(--padding-color);border:dashed 2px black}.LayoutBox .layout-content{flex:1 1 auto;background-color:var(--content-color);border:solid 2px #808080}.LayoutBox .layout-title{color:#161616;font-size:11px;left:4px;line-height:15px;position:absolute;top:1px}.hwLayoutTreeNode{cursor:default}.hwLayoutTreeNode:hover{background-color:#fff3}.hwLayoutTreeNode[aria-selected=true]{background-color:#6495ed;color:#fff}
2
+ /*# sourceMappingURL=index.css.map */
package/index.css.map ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/vuu-popups/src/dialog/Dialog.css", "../../../packages/vuu-layout/src/chest-of-drawers/Drawer.css", "../../../packages/vuu-layout/src/chest-of-drawers/Chest.css", "../../../packages/vuu-popups/src/popup/popup-service.css", "../../../packages/vuu-layout/src/drag-drop/DropMenu.css", "../../../packages/vuu-layout/src/drag-drop/DropTargetRenderer.css", "../../../packages/vuu-layout/src/DraggableLayout.css", "../../../packages/vuu-layout/src/placeholder/Placeholder.css", "../../../packages/vuu-layout/src/flexbox/Splitter.css", "../../../packages/vuu-layout/src/flexbox/Flexbox.css", "../../../packages/vuu-layout/src/flexbox/FluidGrid.css", "../../../packages/vuu-layout/src/layout-view/View.css", "../../../packages/vuu-layout/src/layout-header/Header.css", "../../../packages/vuu-layout/src/palette/Palette.css", "../../../packages/vuu-layout/src/palette/PaletteSalt.css", "../../../packages/vuu-layout/src/stack/Stack.css", "../../../packages/vuu-layout/src/tools/devtools-box/layout-configurator.css", "../../../packages/vuu-layout/src/tools/devtools-tree/layout-tree-viewer.css"],
4
+ "sourcesContent": [".vuuDialog {\n background: var(--salt-container-primary-background);\n border: var(--vuuDialog-border, solid 1px #ccc);\n border-radius: 5px;\n padding: var(--vuuDialog-padding, 0);\n box-shadow: var(--salt-overlayable-shadow, none);\n height: var(--vuuDialog-height, fit-content);\n width: var(--vuuDialog-width, fit-content);\n}\n\n.vuuDialog-header {\n --saltButton-height: 28px;\n --saltButton-width: 28px;\n\n --saltToolbar-background: transparent;\n --saltToolbar-height: calc(var(--salt-size-base) + 5px);\n border-bottom: solid 1px var(--salt-container-primary-borderColor);\n}\n\n.vuuDialog-header > .Responsive-inner {\n align-items: center;\n}\n\n.vuuDialog-header > .Responsive-inner > :last-child{\n right: 2px;\n}\n\n\n", ".vuuDrawer {\n --drawer-leading-edge-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", ".hwChest {\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.hwChest-horizontal {\n flex-direction: row;\n}\n\n.hwChest-vertical {\n flex-direction: column;\n}\n\n.hwChest-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.hwChest-horizontal .hwChest-content {\n flex-basis: 100%;\n}\n\n.hwChest-vertical .hwChest-content {\n flex-basis: 100%;\n}\n", ".vuuPopup {\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n overflow: visible;\n z-index: 1000;\n}\n\n.vuuPopup {\n position: absolute;\n}\n", ".vuuDropMenu {\n margin-left: -50%;\n margin-bottom: -50%;\n background-color: white;\n border: solid 1px var(--grey40);\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 3px;\n border-radius: 3px;\n}\n\n.vuuDropMenu-left,\n.vuuDropMenu-right {\n flex-direction: column;\n}\n\n.vuuDropMenu-bottom {\n transform: translate(0, -30px);\n}\n\n.vuuDropMenu-right {\n transform: translate(-20px, 0);\n}\n\n.vuuDropMenu-item {\n --vuu-icon-size: 20px;\n width: 32px;\n height: 32px;\n background-color: var(--grey20);\n border-bottom: solid 1px var(--grey40);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.vuuDropMenu-item .Icon {\n transform: scale(1.25);\n transform-origin: center center;\n}\n\n.vuuDropMenu-left .vuuDropMenu-item .hwIcon {\n transform: scale(1.25) rotate(180deg);\n transform-origin: center center;\n}\n\n.vuuDropMenu-top .vuuDropMenu-item .hwIcon {\n transform: scale(1.25) rotate(270deg);\n transform-origin: center center;\n}\n\n.vuuDropMenu-bottom .vuuDropMenu-item .hwIcon {\n transform: scale(1.25) rotate(90deg);\n transform-origin: center center;\n}\n\n.vuuDropMenu-item .hwIcon-path {\n fill: grey;\n}\n.vuuDropMenu-item:hover {\n background-color: rgba(200, 200, 200, 0.5);\n}\n\n.vuuDropMenu-item:hover .hwIcon-path-2 {\n fill: blue;\n}\n\n.vuuDropMenu-item:last-child {\n border-bottom: none;\n}\n", "#hw-drag-canvas {\n visibility: hidden;\n z-index: 1;\n position: absolute;\n top: 0px;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: transparent;\n}\n\n#hw-drag-canvas > svg {\n position: absolute;\n}\n\n.drawing #hw-drag-canvas {\n visibility: visible;\n}\n\npath.drop-target {\n stroke: blue;\n stroke-width: 4px;\n fill: transparent;\n}\n\npath.drop-target.centre {\n stroke: red;\n}\n\n#vuu-drop-outline {\n fill: rgba(0,0,255,.3);\n stroke: none;\n stroke-dasharray: 4 2;\n}\n\n#hw-drop-guides {\n fill: none;\n stroke: rgba(0, 0, 0, 0.3);\n stroke-dasharray: 2 3;\n}\n", ".DraggableLayout {\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", ".vuuPlaceholder {\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n}\n\n.vuuPlaceholder-shim {\n flex-grow: 0;\n flex-shrink: 0;\n}\n", ".Splitter {\n --splitter-size: 3px;\n --splitter-border-width: 4px;\n --splitter-border-style: none;\n --splitter-border-color: white;\n\n align-items: center;\n background-color: var(--grey60);\n border-color: var(--splitter-border-color);\n border-style: var(--splitter-border-style);\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n position: relative;\n outline: none;\n z-index: 1;\n}\n\n.Splitter:hover {\n background-color: var(--grey40);\n}\n.active.Splitter {\n background-color: var(--blue500);\n}\n\n.Splitter.column {\n cursor: ns-resize;\n height: var(--splitter-size);\n border-width: var(--splitter-border-width) 0;\n}\n\n.Splitter:not(.column) {\n cursor: ew-resize;\n width: var(--splitter-size);\n border-width: 0 var(--splitter-border-width);\n}\n\n.Splitter:before {\n border: none;\n border-radius: 0;\n content: '';\n display: block;\n padding: 0;\n}\n\n.Splitter .grab-zone {\n position: absolute;\n background-color: rgba(255, 0, 0, 0.01);\n cursor: inherit;\n}\n\n.Splitter.column .grab-zone {\n left: 0;\n right: 0;\n top: -5px;\n bottom: -5px;\n}\n\n.Splitter:not(column) .grab-zone {\n left: -5px;\n right: -5px;\n top: 0;\n bottom: 0;\n}\n\n.Splitter:not(.column):before {\n width: 1px;\n height: 10px;\n background: linear-gradient(\n to bottom,\n var(--grey900) 10%,\n transparent 10%,\n transparent 30%,\n var(--grey900) 30%,\n var(--grey900) 40%,\n transparent 40%,\n transparent 60%,\n var(--grey900) 60%,\n var(--grey900) 70%,\n transparent 70%,\n transparent 90%,\n var(--grey900) 90%\n );\n}\n\n.active.Splitter.column:before {\n background: linear-gradient(\n to right,\n #ffffff 10%,\n transparent 10%,\n transparent 30%,\n #ffffff 30%,\n #ffffff 40%,\n transparent 40%,\n transparent 60%,\n #ffffff 60%,\n #ffffff 70%,\n transparent 70%,\n transparent 90%,\n #ffffff 90%\n );\n}\n\n.active.Splitter:not(.column):before {\n background: linear-gradient(\n to bottom,\n #ffffff 10%,\n transparent 10%,\n transparent 30%,\n #ffffff 30%,\n #ffffff 40%,\n transparent 40%,\n transparent 60%,\n #ffffff 60%,\n #ffffff 70%,\n transparent 70%,\n transparent 90%,\n #ffffff 90%\n );\n}\n\n.Splitter.column:before {\n width: 10px;\n height: 1px;\n background: linear-gradient(\n to right,\n var(--grey900) 10%,\n transparent 10%,\n transparent 30%,\n var(--grey900) 30%,\n var(--grey900) 40%,\n transparent 40%,\n transparent 60%,\n var(--grey900) 60%,\n var(--grey900) 70%,\n transparent 70%,\n transparent 90%,\n var(--grey900) 90%\n );\n}\n", ":root {\n --hw-space-unit: 4px;\n --hw-flex-gap: 3;\n --hw-fluid-grid-col-bg: rgba(200, 200, 200, 0.3);\n}\n\n.hwFlexbox {\n background-color: var(--container1-background);\n box-sizing: border-box;\n display: flex;\n gap: calc(var(--spacing) * var(--space));\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n.hwFlexbox-column {\n flex-direction: column;\n}\n\n.hwFlexbox-row {\n flex-direction: row;\n}\n\n.hwFlexbox > .Splitter {\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n}\n\n.hwFlexbox.full-page {\n height: 100vh;\n width: 100vw;\n}\n\n.flex-fill {\n border-color: red;\n flex: 0;\n flex-grow: 1;\n flex-shrink: 1;\n}\n\n.vuuView.flex-fill {\n border-color: red;\n}\n", ":root {\n --hw-space-unit: 4px;\n --hw-fluid-grid-col-bg: rgba(252, 209, 232, 0.7);\n}\n\n.hwFluidGrid {\n --gap: var(--gutter-width);\n\n display: flex;\n gap: calc(var(--grid-gap) * var(--hw-space-unit));\n flex-wrap: wrap;\n padding: 0;\n}\n\n.hwFluidGrid > * {\n --gutter-width: calc(var(--hw-flex-gap) * var(--hw-space-unit));\n --gutter-count: calc(var(--parent-col-count) - 1);\n --total-gutter-width: calc(var(--gutter-count) * var(--gutter-width));\n --available-width: calc(100% - var(--total-gutter-width));\n\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n position: relative;\n}\n\n.hwFluidGrid > *:after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: dashed 2px blue;\n}\n\n.hwFluidGrid > [data-xs] {\n --internal-gutter-count: calc(var(--col-span) - 1);\n --percent-width: calc(var(--col-span) / var(--parent-col-count));\n --internal-gutter-width: calc(var(--internal-gutter-count) * var(--gutter-width));\n flex-basis: calc(var(--available-width) * var(--percent-width) + var(--internal-gutter-width));\n flex-grow: 0;\n}\n\n.hwFluidGrid > [data-xs='1'] {\n --col-span: 1;\n}\n.hwFluidGrid > [data-xs='2'] {\n --col-span: 2;\n}\n.hwFluidGrid > [data-xs='3'] {\n --col-span: 3;\n}\n\n.hwFluidGrid > [data-xs='4'] {\n --col-span: 4;\n}\n\n.hwFluidGrid > [data-xs='6'] {\n --col-span: 6;\n}\n\n.hwFluidGrid > [data-xs='8'] {\n --col-span: 8;\n}\n\n.hwFluidGrid > [data-xs='9'] {\n --col-span: 9;\n}\n.hwFluidGrid > [data-xs='10'] {\n --col-span: 10;\n}\n.hwFluidGrid > [data-xs='11'] {\n --col-span: 11;\n}\n\n.hwFluidGrid > [data-xs='12'] {\n --col-span: 12;\n}\n\n@media (min-width: 600px) {\n .hwFluidGrid > [data-sm='1'] {\n --col-span: 1;\n }\n .hwFluidGrid > [data-sm='2'] {\n --col-span: 2;\n }\n\n .hwFluidGrid > [data-sm='3'] {\n --col-span: 3;\n }\n\n .hwFluidGrid > [data-sm='4'] {\n --col-span: 4;\n }\n\n .hwFluidGrid > [data-sm='6'] {\n --col-span: 6;\n }\n\n .hwFluidGrid > [data-sm='8'] {\n --col-span: 8;\n }\n .hwFluidGrid > [data-sm='9'] {\n --col-span: 9;\n }\n .hwFluidGrid > [data-sm='10'] {\n --col-span: 10;\n }\n .hwFluidGrid > [data-sm='11'] {\n --col-span: 11;\n }\n .hwFluidGrid > [data-sm='12'] {\n --col-span: 12;\n }\n}\n\n/* Display the grid background */\n\n.hwFluidGrid-show-grid {\n --gutter-width: calc(var(--hw-flex-gap) * var(--hw-space-unit));\n --grid-gutter-count: calc(var(--grid-col-count, var(--parent-col-count)) - 1);\n --grid-total-gutter-width: calc(var(--grid-gutter-count) * var(--gutter-width));\n --grid-available-width: calc(100% - var(--grid-total-gutter-width));\n --grid-percent-width: calc(1 / var(--grid-col-count, var(--parent-col-count)));\n --column-width: calc(var(--grid-available-width) * var(--grid-percent-width));\n background: repeating-linear-gradient(\n to right,\n var(--hw-fluid-grid-col-bg) 0,\n var(--hw-fluid-grid-col-bg) var(--column-width),\n white var(--column-width),\n white calc(var(--column-width) + var(--gutter-width))\n );\n}\n", ".vuuView {\n border-color: var(--vuuView-borderColor, var(--salt-container-primary-borderColor));\n border-width: var(--vuuView-borderWidth, 1px);\n border-style: var(--vuuView-borderStyle, none);\n\n display: flex;\n flex-direction: column;\n margin: var(--vuuView-margin, 0px);\n min-height: 50px;\n min-width: 50px;\n outline: none;\n overflow: hidden;\n position: relative;\n}\n\n.vuuView.focus-visible:after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: dotted cornflowerblue 2px;\n}\n\n.vuuView.dragging {\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n}\n\n.vuuView-main {\n /* height: var(--view-content-height);\n width: var(--view-content-width); */\n display: flex;\n flex-direction: var(--vuuView-flexDirection, column);\n flex-wrap: var(--vuuView-flex-wrap, nowrap);\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n.vuuView-main > * {\n flex-basis: auto;\n flex-grow: var(--vuuView-flex-grow, 1);\n flex-shrink: var(--vuuView-flex-shrink, 1);\n}\n\n.vuuView-collapsed .vuuView-main {\n display: none;\n}\n\n.vuuView-collapsed + .Splitter {\n display: none;\n}\n\n.vuuView-collapsed .Toolbar-vertical {\n border-right: solid 1px var(--grey40);\n}\n\n.vuuView-collapsed .Toolbar-vertical .toolbar-title {\n display: none;\n}\n", ".vuuHeader {\n --saltToolbar-background: var(--salt-container-tertiary-background);\n}\n\n.salt-density-high .vuuHeader {\n--saltToolbarField-marginTop: 0;\n}\n\n", ".vuuPalette-horizontal {\n align-items: center;\n display: flex;\n}\n\n.vuuPaletteItem {\n --vuu-icon-color: var(--salt-separable-primary-borderColor);\n --vuu-icon-inset: calc(50% - 12px) auto auto -3px;\n --vuu-icon-height: 24px;\n --vuu-icon-width: 24px;\n --list-item-text-padding: 0 0 0 calc(var(--salt-size-unit) * 3);\n}\n\n.vuuPaletteItem[data-draggable]:after {\n height: 22px;\n width: 6px;\n content: \"\";\n position: absolute;\n\n background-image: \n linear-gradient(45deg, rgb(180, 183, 190) 25%, transparent 25%),\n linear-gradient(-45deg, rgb(180, 183, 190) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, rgb(180, 183, 190) 25%),\n linear-gradient(-45deg, transparent 75%, rgb(180, 183, 190) 25%);\n background-size: 4px 4px;\n background-position: 0 0, 2px 0, 2px -2px, 0 2px; \n\n}\n\n.vuuSimpleDraggableWrapper > .vuuPaletteItem {\n --vuu-icon-color: var(--salt-selectable-foreground);\n\n}", ".vuuPalette {\n --list-item-header-bg: inherit;\n --list-item-header-color: inherit;\n --list-item-padding: 0 6px 0 24px;\n --list-item-header-twisty-color: black;\n --list-item-header-twisty-left: 3px;\n --list-item-header-twisty-right: auto;\n}\n\n", ".Tabs {\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n}\n\n.Tabs-horizontal {\n flex-direction: row;\n}\n\n.Tabs .Toolbar:before {\n left: 0;\n width: 100%;\n bottom: 0;\n height: 1px;\n content: '';\n position: absolute;\n background: var(--grey60);\n}\n\n.vuuTabHeader {\n --saltTabs-activationIndicator-background: transparent;\n --saltToolbarField-marginTop: calc(var(--salt-size-unit) - 1px);\n border-bottom: solid 1px var(--salt-container-primary-borderColor);\n}\n\n.vuuTabHeader + .hwFlexbox,\n.vuuTabHeader + * {\n flex: 1;\n}\n\n.vuuTabHeader + .vuuView > .vuuHeader {\n height: 0;\n overflow: hidden;\n}\n\n.Layout-svg-button {\n --spacing-medium: 5px;\n}\n", "[data-design-mode='true'] .Component {\n filter: grayscale(100%);\n opacity: 0.4;\n}\n\n[data-design-mode='true'] .Component:after {\n color: black;\n content: 'Component';\n height: 12px;\n background-color: yellow;\n}\n\n.LayoutConfigurator {\n --margin-color: #f3cea5;\n --border-color: #fddda0;\n --padding-color: #c6d092;\n --content-color: #8cb6c0;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n background-color: var(--margin-color);\n}\n\n.LayoutConfigurator .layout-outer {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n.LayoutBox {\n --hw-control-font-size: 13px;\n --hw-text-input-bg: rgba(255, 255, 255, 0.3);\n --hwTextInput-padding: 3px;\n --hw-text-input-position: absolute;\n --hwTextInput-width: 30px;\n\n flex: 1 1 auto;\n}\n\n.LayoutBox > .layout-top {\n flex: 0 0 40px;\n padding-left: 12px;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: relative;\n}\n\n.LayoutBox > .layout-bottom {\n flex: 0 0 40px;\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.LayoutBox > .layout-inner > .layout-right,\n.LayoutBox > .layout-inner > .layout-left {\n flex: 0 0 40px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.layout-top,\n.layout-bottom {\n --hw-text-input-margin: 0 0 0 -15px;\n}\n\n.layout-top > .layout-input,\n.layout-bottom > .layout-input {\n left: 50%;\n}\n\n.LayoutBox > .layout-inner {\n flex: 1 1 auto;\n display: flex;\n flex-direction: row;\n align-items: stretch;\n}\n\n.LayoutBox.layout-margin {\n background-color: var(--margin-color);\n border: dashed 2px black;\n}\n\n.LayoutBox.layout-border {\n background-color: var(--border-color);\n border: solid 2px black;\n}\n\n.LayoutBox.layout-padding {\n background-color: var(--padding-color);\n border: dashed 2px black;\n}\n\n.LayoutBox .layout-content {\n flex: 1 1 auto;\n background-color: var(--content-color);\n border: solid 2px #808080;\n}\n\n.LayoutBox .layout-title {\n color: #161616;\n font-size: 11px;\n left: 4px;\n line-height: 15px;\n position: absolute;\n top: 1px;\n}\n", ".hwLayoutTreeViewer {\n}\n\n.hwLayoutTreeNode {\n cursor: default;\n}\n\n.hwLayoutTreeNode:hover {\n background-color: rgba(255, 255, 255, 0.2);\n}\n\n.hwLayoutTreeNode[aria-selected='true'] {\n background-color: cornflowerblue;\n color: white;\n}\n"],
5
+ "mappings": "AAAA,WACE,oDACA,+CAFF,kBAIE,oCACA,gDACA,4CACA,0CAGF,kBACE,0BACA,yBAEA,sCACA,wDACA,kEAGF,oCACE,mBAGF,gDACE,UCxBF,WACE,wFACA,sDAEA,sBACA,sDACA,kBACA,UACA,aACA,YACA,cACA,YACA,aACA,aAGF,oBACE,mCACA,YACA,cAGF,iCACE,8BACA,YACA,cAGF,iBACE,kCACA,gBACA,kBAGF,mBACE,YACA,gBACA,kBACA,MACA,8BACA,iBACA,sDACA,WACA,cAGF,mCACE,QAOF,gBACE,+CAEF,iBACE,8CAEF,eACE,gDAEF,kBACE,6CAGF,mEAEE,YACA,iBAGF,mEAEE,WACA,kBAGF,mCACE,WACA,YAGF,iCACE,kBACA,wBAGF,gDACE,MACA,OACA,QAGF,iDACE,MACA,QACA,QAGF,+CACE,SACA,MACA,OAGF,kDACE,SACA,SACA,OAGF,uIAEE,8BAGF,uIAEE,+BAGF,+HAEE,yBAGF,+HAEE,0BAGF,+BAEE,QAGF,mCAEE,SAGF,iCAEE,sBAGF,2BACE,0BACA,yBACA,sBACA,cAGF,gBACE,qDC5JF,SACE,wCACA,0CACA,4CACA,qDACA,wEACA,iCACA,aAGF,oBACE,mBAGF,kBACE,sBAGF,iBACE,iCACA,YACA,cACA,gBAEA,aACA,mBACA,uBAGF,wEACE,gBC9BF,UACE,gCACA,kBACA,MACA,OACA,QACA,SACA,iBACA,aAGF,UACE,kBCZF,aACE,iBACA,mBACA,sBACA,+BACA,oBACA,uBACA,mBAPF,8BAYA,qCAEE,sBAGF,oBACE,4BAGF,mBACE,2BAGF,kBACE,sBACA,WACA,YACA,+BACA,sCACA,eACA,aACA,mBACA,uBAGF,wBACE,sBACA,+BAGF,4CACE,qCACA,+BAGF,2CACE,qCACA,+BAGF,8CACE,oCACA,+BAGF,+BACE,UAEF,wBACE,2BAGF,uCACE,UAGF,6BACE,mBCrEF,gBACE,kBACA,UACA,kBACA,QACA,OACA,QACA,SACA,6BAGF,oBACE,kBAGF,yBACE,mBAGF,iBACE,YACA,iBACA,iBAGF,wBACE,WAGF,kBACE,eACA,YACA,qBAGF,gBACE,UACA,iBACA,qBCtCF,iBACE,qBACA,aAGF,qBACE,4BACA,YAGF,2BACE,sBACA,4BAEF,6BACE,YACA,WChBF,gBACE,aACA,YACA,cAGF,qBACE,YACA,cCRF,UACE,qBACA,6BACA,8BACA,+BAEA,mBACA,+BACA,0CACA,0CACA,sBACA,aACA,uBACA,kBACA,aACA,UAGF,gBACE,+BAEF,iBACE,gCAGF,iBACE,iBACA,4BACA,4CAGF,uBACE,iBACA,2BACA,4CAGF,iBACE,YAtCF,gBAwCE,WACA,cAzCF,UA6CA,qBACE,kBACA,2BACA,eAGF,4BACE,OACA,QACA,SACA,YAGF,iCACE,UACA,WACA,MACA,SAGF,8BACE,UACA,YACA,wPAiBF,+BACE,6MAiBF,qCACE,8MAiBF,wBACE,WACA,WACA,uPC5HF,MACE,qBACA,iBACA,gDAGF,WACE,8CACA,sBACA,aACA,wCACA,aACA,YACA,gBAGF,kBACE,sBAGF,eACE,mBAGF,qBACE,gBACA,YACA,cAGF,qBACE,aACA,YAGF,WACE,iBACA,OACA,YACA,cAGF,mBACE,iBC3CF,MACE,qBACA,gDAGF,aACE,2BAEA,aACA,iDACA,eAVF,UAcA,eACE,gEACA,kDACA,sEACA,0DAEA,aACA,YACA,cACA,kBAGF,qBACE,WACA,kBACA,MACA,OACA,QACA,SACA,uBAGF,uBACE,mDACA,iEACA,kFACA,8FACA,YAGF,2BACE,cAEF,2BACE,cAEF,2BACE,cAGF,2BACE,cAGF,2BACE,cAGF,2BACE,cAGF,2BACE,cAEF,4BACE,eAEF,4BACE,eAGF,4BACE,eAGF,0BACE,2BACE,cAEF,2BACE,cAGF,2BACE,cAGF,2BACE,cAGF,2BACE,cAGF,2BACE,cAEF,2BACE,cAEF,4BACE,eAEF,4BACE,eAEF,4BACE,gBAMJ,uBACE,gEACA,8EACA,gFACA,oEACA,+EACA,8EACA,6MC9HF,SACE,mFACA,6CACA,8CAEA,aACA,sBACA,kCACA,gBACA,eACA,aACA,gBACA,kBAGF,6BACE,WACA,kBACA,MACA,OACA,QACA,SACA,iCAGF,kBACE,gCAGF,cAGE,aACA,oDACA,2CACA,OACA,gBACA,kBAGF,gBACE,gBACA,sCACA,0CAGF,iCACE,aAGF,6BACE,aAGF,qCACE,qCAGF,oDACE,aC3DF,WACE,oEAGF,8BACA,gCCLA,uBACE,mBACA,aAGF,gBACE,4DACA,iDACA,wBACA,uBACA,gEAGF,sCACE,YACA,UACA,WACA,kBAEA,mQAKA,wBACA,6CAIF,2CACE,oDC9BF,YACE,+BACA,kCACA,kCACA,uCACA,oCACA,sCCNF,MACE,aACA,sBACA,sBAGF,iBACE,mBAGF,sBACE,OACA,WACA,SACA,WACA,WACA,kBACA,yBAGF,cACE,uDACA,gEACA,kEAGF,yCAEE,OAGF,kCACE,SACA,gBAGF,mBACE,sBCrCF,mCACE,uBACA,WAGF,yCACE,WACA,oBACA,YACA,sBAGF,oBACE,wBACA,wBACA,yBACA,yBACA,aACA,sBACA,oBACA,qCAGF,kCACE,cACA,aACA,sBACA,oBAGF,WACE,6BACA,4CACA,2BACA,mCACA,0BAEA,cAGF,uBACE,cACA,kBACA,aACA,mBACA,mBACA,kBAGF,0BACE,cACA,kBACA,aACA,mBACA,mBAGF,6EAEE,cACA,aACA,sBACA,uBACA,mBAGF,2BAEE,oCAGF,uDAEE,SAGF,yBACE,cACA,aACA,mBACA,oBAGF,yBACE,qCACA,wBAGF,yBACE,qCACA,uBAGF,0BACE,sCACA,wBAGF,2BACE,cACA,sCACA,yBAGF,yBACE,cACA,eACA,SACA,iBACA,kBACA,QC3GF,kBACE,eAGF,wBACE,uBAGF,sCACE,yBACA",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,22 +1,25 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-layout",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "description": "VUU Layout Components",
5
- "main": "src/index.ts",
6
5
  "author": "heswell",
7
6
  "license": "Apache-2.0",
8
- "scripts": {
9
- "build": "node ../../scripts/run-build.mjs",
10
- "type-defs": "tsc --project tsconfig-emit-types.json"
11
- },
12
- "types": "src/index.ts",
13
7
  "peerDependencies": {
14
8
  "@salt-ds/core": "1.0.0",
15
9
  "@salt-ds/icons": "1.0.0",
16
10
  "@heswell/salt-lab": "1.0.0-alpha.0",
17
- "@vuu-ui/vuu-utils": "0.5.10",
11
+ "@vuu-ui/vuu-utils": "0.5.11",
18
12
  "classnames": "^2.2.6",
19
13
  "react": "^17.0.2",
20
14
  "react-dom": "^17.0.2"
21
- }
22
- }
15
+ },
16
+ "files": [
17
+ "cjs",
18
+ "esm",
19
+ "index.css",
20
+ "index.css.map",
21
+ "README.md"
22
+ ],
23
+ "module": "esm/index.js",
24
+ "main": "cjs/index.js"
25
+ }
package/src/Component.css DELETED
File without changes
package/src/Component.tsx DELETED
@@ -1,20 +0,0 @@
1
- import React, { forwardRef, HTMLAttributes } from 'react';
2
- import { registerComponent } from './registry/ComponentRegistry';
3
-
4
- import './Component.css';
5
-
6
- export interface ComponentProps extends HTMLAttributes<HTMLDivElement> {
7
- resizeable?: boolean;
8
- }
9
-
10
- const Component = forwardRef(function Component(
11
- { resizeable, ...props }: ComponentProps,
12
- ref: React.ForwardedRef<HTMLDivElement>
13
- ) {
14
- return <div {...props} className="Component" ref={ref} />;
15
- }) as React.FunctionComponent<ComponentProps>;
16
- Component.displayName = 'Component';
17
-
18
- export default Component;
19
-
20
- registerComponent('Component', Component);
@@ -1,18 +0,0 @@
1
- .DraggableLayout {
2
- display: inline-block;
3
- outline: none;
4
- }
5
-
6
- [data-dragging='true'] {
7
- position: absolute !important;
8
- z-index: 100;
9
- }
10
-
11
- .vuuSimpleDraggableWrapper {
12
- background-color: white;
13
- box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.2);
14
- }
15
- .vuuSimpleDraggableWrapper > * {
16
- height: 100%;
17
- width: 100%;
18
- }
@@ -1,26 +0,0 @@
1
- import classnames from 'classnames';
2
- import { useRef } from 'react';
3
- import { registerComponent } from './registry/ComponentRegistry';
4
-
5
- import './DraggableLayout.css';
6
-
7
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
- export const DraggableLayout = function DraggableLayout(props: any) {
9
- const sourceRef = useRef();
10
- sourceRef.current = props;
11
-
12
- const { className: classNameProp, id, style } = props;
13
-
14
- const className = classnames('DraggableLayout', classNameProp);
15
- return (
16
- <div className={className} id={id} style={style}>
17
- {props.children}
18
- </div>
19
- );
20
- };
21
-
22
- const componentName = 'DraggableLayout';
23
-
24
- DraggableLayout.displayName = componentName;
25
-
26
- registerComponent(componentName, DraggableLayout, 'container');
@@ -1,90 +0,0 @@
1
- import {
2
- findSplitterAndPlaceholderPositions,
3
- PLACEHOLDER,
4
- SPLITTER
5
- } from '../flexbox/flexbox-utils';
6
-
7
- describe('findSplitterAndPlaceholderPositions', () => {
8
- let positions;
9
- describe('WHEN there are less than 2 items', () => {
10
- it('THEN no splitters are inserted', () => {
11
- positions = findSplitterAndPlaceholderPositions([]);
12
- expect(positions).toEqual([]);
13
-
14
- positions = findSplitterAndPlaceholderPositions([{ resizeable: true }]);
15
- expect(positions).toEqual([0]);
16
-
17
- positions = findSplitterAndPlaceholderPositions([{ resizeable: false }]);
18
- expect(positions).toEqual([0]);
19
- });
20
- });
21
-
22
- describe('WHEN there are no resizeable items', () => {
23
- it('THEN no splitters are inserted', () => {
24
- positions = findSplitterAndPlaceholderPositions([
25
- { resizeable: false },
26
- { resizeable: false }
27
- ]);
28
- expect(positions).toEqual([0, 0]);
29
-
30
- positions = findSplitterAndPlaceholderPositions([
31
- { resizeable: false },
32
- { resizeable: false },
33
- { resizeable: false }
34
- ]);
35
- expect(positions).toEqual([0, 0, 0]);
36
-
37
- positions = findSplitterAndPlaceholderPositions([
38
- { resizeable: false },
39
- { resizeable: false },
40
- { resizeable: false },
41
- { resizeable: false }
42
- ]);
43
- expect(positions).toEqual([0, 0, 0, 0]);
44
- });
45
- });
46
-
47
- describe('WHEN all items are resizeable', () => {
48
- it('THEN splitters are inserted between items', () => {
49
- positions = findSplitterAndPlaceholderPositions([{ resizeable: true }, { resizeable: true }]);
50
- expect(positions).toEqual([1, 0]);
51
-
52
- positions = findSplitterAndPlaceholderPositions([
53
- { resizeable: true },
54
- { resizeable: true },
55
- { resizeable: true }
56
- ]);
57
- expect(positions).toEqual([1, 1, 0]);
58
-
59
- positions = findSplitterAndPlaceholderPositions([
60
- { resizeable: true },
61
- { resizeable: true },
62
- { resizeable: true },
63
- { resizeable: true }
64
- ]);
65
- expect(positions).toEqual([1, 1, 1, 0]);
66
- });
67
- });
68
-
69
- describe('WHEN some items are resizeable', () => {
70
- it('THEN splitters are inserted where appropriate between items', () => {
71
- // positions = findSplitterAndPlaceholderPositions([{resizeable: true},{resizeable: true}]);
72
- // expect(positions).toEqual([1,0])
73
-
74
- positions = findSplitterAndPlaceholderPositions([
75
- { resizeable: false },
76
- { resizeable: true },
77
- { resizeable: true }
78
- ]);
79
- expect(positions).toEqual([0, 1, 0]);
80
-
81
- positions = findSplitterAndPlaceholderPositions([
82
- { resizeable: false },
83
- { resizeable: true },
84
- { resizeable: true },
85
- { resizeable: true }
86
- ]);
87
- expect(positions).toEqual([0, 1, 1, 0]);
88
- });
89
- });
90
- });
@@ -1,36 +0,0 @@
1
- .hwChest {
2
- --chest-bg: var(--hw-chest-bg, inherit);
3
- --drawer-bg: var(--hw-drawer-bg, inherit);
4
- --drawer-size: var(--hw-drawer-size, 200px);
5
- --drawer-peek-size: var(--hw-drawer-peek-size, 32px);
6
- --drawer-transition-duration: var(--hw-drawer-transition-duration, 0.4s);
7
- background-color: var(--chest-bg);
8
- display: flex;
9
- }
10
-
11
- .hwChest-horizontal {
12
- flex-direction: row;
13
- }
14
-
15
- .hwChest-vertical {
16
- flex-direction: column;
17
- }
18
-
19
- .hwChest-content {
20
- background-color: var(--chest-bg);
21
- flex-grow: 1;
22
- flex-shrink: 1;
23
- overflow: hidden;
24
- /* position: relative; */
25
- display: flex;
26
- align-items: center;
27
- justify-content: center;
28
- }
29
-
30
- .hwChest-horizontal .hwChest-content {
31
- flex-basis: 100%;
32
- }
33
-
34
- .hwChest-vertical .hwChest-content {
35
- flex-basis: 100%;
36
- }
@@ -1,42 +0,0 @@
1
- import React, { HTMLAttributes, ReactElement } from "react";
2
- import cx from "classnames";
3
- import Drawer from "./Drawer";
4
- import { partition } from "@vuu-ui/vuu-utils";
5
- import { registerComponent } from "../registry/ComponentRegistry";
6
-
7
- import "./Chest.css";
8
-
9
- const isDrawer = (component: ReactElement) => component.type === Drawer;
10
- const isVertical = ({ props: { position = "left" } }: ReactElement) =>
11
- position.match(/top|bottom/);
12
-
13
- export interface ChestProps extends HTMLAttributes<HTMLDivElement> {
14
- children: ReactElement[];
15
- }
16
-
17
- const Chest = (props: ChestProps) => {
18
- const { children, className: classNameProp, id, style } = props;
19
- const classBase = "hwChest";
20
- const [drawers, content] = partition(children, isDrawer);
21
- const [verticalDrawers, horizontalDrawers] = partition(drawers, isVertical);
22
- const orientation =
23
- verticalDrawers.length === 0
24
- ? "horizontal"
25
- : horizontalDrawers.length === 0
26
- ? "vertical"
27
- : "both";
28
-
29
- const className = cx(classBase, classNameProp, `${classBase}-${orientation}`);
30
-
31
- return (
32
- <div className={className} id={id} style={style}>
33
- {drawers}
34
- <div className={`${classBase}-content`}>{content}</div>
35
- </div>
36
- );
37
- };
38
- Chest.displayName = "Chest";
39
-
40
- export default Chest;
41
-
42
- registerComponent("Chest", Chest, "container");
@@ -1,159 +0,0 @@
1
- .vuuDrawer {
2
- --drawer-leading-edge-border: solid 1px var(--salt-container-primary-borderColor, none);
3
- --vuu-close-icon-svg: var(--svg-chevron-double-right);
4
-
5
- transition: flex-basis;
6
- transition-duration: var(--drawer-transition-duration);
7
- position: relative;
8
- z-index: 1;
9
- flex-basis: 0;
10
- flex-grow: 1;
11
- flex-shrink: 1;
12
- min-width: 0;
13
- min-height: 0;
14
- display: flex;
15
- }
16
-
17
- .vuuDrawer-peekaboo {
18
- flex-basis: var(--drawer-peek-size);
19
- flex-grow: 0;
20
- flex-shrink: 0;
21
- }
22
-
23
- .vuuDrawer-inline.vuuDrawer-open {
24
- flex-basis: var(--drawer-size);
25
- flex-grow: 0;
26
- flex-shrink: 0;
27
- }
28
-
29
- .vuuDrawer-liner {
30
- background-color: var(--drawer-bg);
31
- overflow: hidden;
32
- position: relative;
33
- }
34
-
35
- .vuuDrawer-content {
36
- height: 100%;
37
- overflow: hidden;
38
- position: absolute;
39
- top: 0;
40
- right: var(--drawer-peek-size);
41
- transition: right;
42
- transition-duration: var(--drawer-transition-duration);
43
- width: 100%;
44
- flex: 1 1 100%;
45
- }
46
-
47
- .vuuDrawer-open .vuuDrawer-content {
48
- right: 0;
49
- }
50
-
51
- /* .vuuDrawer:not(.vuuDrawer-open) .vuuDrawer-liner > * {
52
- display: none;
53
- } */
54
-
55
- .vuuDrawer-left {
56
- border-right: var(--drawer-leading-edge-border);
57
- }
58
- .vuuDrawer-right {
59
- border-left: var(--drawer-leading-edge-border);
60
- }
61
- .vuuDrawer-top {
62
- border-bottom: var(--drawer-leading-edge-border);
63
- }
64
- .vuuDrawer-bottom {
65
- border-top: var(--drawer-leading-edge-border);
66
- }
67
-
68
- .vuuDrawer-left .vuuDrawer-liner,
69
- .vuuDrawer-right .vuuDrawer-liner {
70
- height: 100%;
71
- transition: width;
72
- }
73
-
74
- .vuuDrawer-top .vuuDrawer-liner,
75
- .vuuDrawer-bottom .vuuDrawer-liner {
76
- width: 100%;
77
- transition: height;
78
- }
79
-
80
- .vuuDrawer-inline .vuuDrawer-liner {
81
- width: 100%;
82
- height: 100%;
83
- }
84
-
85
- .vuuDrawer-over .vuuDrawer-liner {
86
- position: absolute;
87
- transition-duration: 0.4s;
88
- }
89
-
90
- .vuuDrawer-over.vuuDrawer-left .vuuDrawer-liner {
91
- top: 0;
92
- left: 0;
93
- width: 0;
94
- }
95
-
96
- .vuuDrawer-over.vuuDrawer-right .vuuDrawer-liner {
97
- top: 0;
98
- right: 0;
99
- width: 0;
100
- }
101
-
102
- .vuuDrawer-over.vuuDrawer-top .vuuDrawer-liner {
103
- height: 0;
104
- top: 0;
105
- left: 0;
106
- }
107
-
108
- .vuuDrawer-over.vuuDrawer-bottom .vuuDrawer-liner {
109
- bottom: 0;
110
- height: 0;
111
- left: 0;
112
- }
113
-
114
- .vuuDrawer-left.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner,
115
- .vuuDrawer-right.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner {
116
- width: var(--drawer-peek-size);
117
- }
118
-
119
- .vuuDrawer-top.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner,
120
- .vuuDrawer-bottom.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner {
121
- height: var(--drawer-peek-size);
122
- }
123
-
124
- .vuuDrawer-left.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner,
125
- .vuuDrawer-right.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner {
126
- width: var(--drawer-size);
127
- }
128
-
129
- .vuuDrawer-top.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner,
130
- .vuuDrawer-bottom.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner {
131
- height: var(--drawer-size);
132
- }
133
-
134
- .vuuDrawer-top,
135
- .vuuDrawer-left {
136
- order: 0;
137
- }
138
-
139
- .vuuDrawer-bottom,
140
- .vuuDrawer-right {
141
- order: 99;
142
- }
143
-
144
- .vuuDrawer-left,
145
- .vuuDrawer-right {
146
- flex-direction: column;
147
- }
148
-
149
- .vuuToggleButton-container {
150
- --saltButton-height: 28px;
151
- --saltButton-width: 28px;
152
- --vuu-icon-size: 12px;
153
- flex: 0 0 28px;
154
- }
155
-
156
- .vuuDrawer-open {
157
- --vuu-close-icon-svg: var(--svg-chevron-double-left);
158
-
159
- }
@@ -1,118 +0,0 @@
1
- import { Button, useControlled } from "@salt-ds/core";
2
- import cx from "classnames";
3
- import { CSSProperties, HTMLAttributes, useCallback } from "react";
4
-
5
- import "./Drawer.css";
6
-
7
- const classBase = "vuuDrawer";
8
-
9
- const sizeAttribute = (value: string | number) => {
10
- return typeof value === "string" ? value : value + "px";
11
- };
12
-
13
- const getStyle = (
14
- styleProp?: CSSProperties,
15
- sizeOpen?: number,
16
- sizeClosed?: number
17
- ) => {
18
- const hasSizeOpen = sizeOpen !== undefined;
19
- const hasSizeClosed = sizeClosed !== undefined;
20
-
21
- if (!styleProp && !hasSizeClosed && !hasSizeOpen) {
22
- return undefined;
23
- }
24
-
25
- if (!hasSizeClosed && !hasSizeOpen) {
26
- return styleProp;
27
- }
28
-
29
- return {
30
- ...styleProp,
31
- "--drawer-size": hasSizeOpen ? sizeAttribute(sizeOpen) : undefined,
32
- "--drawer-peek-size": hasSizeClosed ? sizeAttribute(sizeClosed) : undefined,
33
- };
34
- };
35
-
36
- export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
37
- clickToOpen?: boolean;
38
- defaultOpen: boolean;
39
- inline?: boolean;
40
- open?: boolean;
41
- peekaboo?: boolean;
42
- position?: "left" | "right" | "top" | "bottom";
43
- sizeOpen?: number;
44
- sizeClosed?: number;
45
- toggleButton?: "start" | "end";
46
- }
47
- const Drawer = ({
48
- children,
49
- className: classNameProp,
50
- clickToOpen,
51
- defaultOpen,
52
- sizeOpen,
53
- sizeClosed,
54
- style: styleProp,
55
- open: openProp,
56
- position = "left",
57
- inline,
58
- onClick,
59
- peekaboo = false,
60
- toggleButton,
61
- ...props
62
- }: DrawerProps) => {
63
- const [open, setOpen] = useControlled({
64
- controlled: openProp,
65
- default: defaultOpen ?? false,
66
- name: "Drawer",
67
- state: "open",
68
- });
69
-
70
- const className = cx(classBase, classNameProp, `${classBase}-${position}`, {
71
- [`${classBase}-open`]: open,
72
- [`${classBase}-inline`]: inline,
73
- [`${classBase}-over`]: !inline,
74
- [`${classBase}-peekaboo`]: peekaboo,
75
- });
76
-
77
- const toggleDrawer = useCallback(() => {
78
- console.log("toggleDrawer");
79
- setOpen(!open);
80
- }, [open, setOpen]);
81
-
82
- const style = getStyle(styleProp, sizeOpen, sizeClosed);
83
-
84
- const handleClick = clickToOpen ? toggleDrawer : onClick;
85
-
86
- const renderToggleButton = () => (
87
- <div className={cx("vuuToggleButton-container")}>
88
- {open ? (
89
- <Button
90
- aria-label="close"
91
- onClick={toggleDrawer}
92
- data-icon="close"
93
- variant="secondary"
94
- />
95
- ) : (
96
- <Button
97
- aria-label="open"
98
- onClick={toggleDrawer}
99
- data-icon="close"
100
- variant="secondary"
101
- />
102
- )}
103
- </div>
104
- );
105
-
106
- return (
107
- <div {...props} className={className} onClick={handleClick} style={style}>
108
- {toggleButton == "start" ? renderToggleButton() : null}
109
- <div className={`${classBase}-liner`}>
110
- <div className={`${classBase}-content`}>{children}</div>
111
- </div>
112
- {toggleButton == "end" ? renderToggleButton() : null}
113
- </div>
114
- );
115
- };
116
- Drawer.displayName = "Drawer";
117
-
118
- export default Drawer;
@@ -1,2 +0,0 @@
1
- export { default as Chest } from './Chest';
2
- export { default as Drawer } from './Drawer';
@@ -1,9 +0,0 @@
1
- export interface rect {
2
- bottom: number;
3
- left: number;
4
- right: number;
5
- top: number;
6
- }
7
- export type rectTuple = [number, number, number, number];
8
-
9
- export type dimension = 'width' | 'height';