@linzjs/lui 17.26.1-1 → 17.28.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/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/dist/components/LuiResizableLayout/LuiResizableLayout.d.ts +3 -2
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +8 -8
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiResizableLayout/LuiResizableLayout.scss +107 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [17.28.1](https://github.com/linz/lui/compare/v17.28.0...v17.28.1) (2023-01-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* dry-run semantic-release ([#826](https://github.com/linz/lui/issues/826)) ([5862a1b](https://github.com/linz/lui/commit/5862a1be0a3b1aba1060c7305bc170e07ec886c4))
|
|
7
|
+
* Fixing release pipeline :tada: ([#827](https://github.com/linz/lui/issues/827)) ([208e32d](https://github.com/linz/lui/commit/208e32dbd3316c9368193d02538ea530bde9bd48))
|
|
8
|
+
|
|
9
|
+
# [17.27.0](https://github.com/linz/lui/compare/v17.26.0...v17.27.0) (2023-01-20)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* remove dry-run ([#817](https://github.com/linz/lui/issues/817)) ([763c619](https://github.com/linz/lui/commit/763c619348ac770aeb3499cb379b2ce24f66dbe4))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* Adding support for [@next](https://github.com/next) release distribution ([#815](https://github.com/linz/lui/issues/815)) ([d2808da](https://github.com/linz/lui/commit/d2808da61ee4b39dc7f65bd14579d6d54eb48779))
|
|
20
|
+
|
|
1
21
|
# [17.26.0](https://github.com/linz/lui/compare/v17.25.1...v17.26.0) (2023-01-05)
|
|
2
22
|
|
|
3
23
|
|
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ We aim to make each component generic, extendable, accessible, and amazing.
|
|
|
42
42
|
All styles are implemented in SCSS and compiled to plain CSS. This means any team can use the CSS. A ReactJS wrapper
|
|
43
43
|
over the CSS is part of this project.
|
|
44
44
|
|
|
45
|
-
There
|
|
45
|
+
There are lots of things to do in this project, often things will be left until there is demand. Please join the Slack channel
|
|
46
46
|
#cop-lui.
|
|
47
47
|
|
|
48
48
|
## Documentation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode, RefObject } from 'react';
|
|
2
2
|
import { MinSizes } from 'split-grid';
|
|
3
|
-
import '
|
|
3
|
+
import '../../scss/Components/LuiResizableLayout/LuiResizableLayout.scss';
|
|
4
4
|
export declare enum SplitPanelState {
|
|
5
5
|
OPEN = 0,
|
|
6
6
|
CLOSED_LEFT = 1,
|
|
@@ -14,7 +14,8 @@ export declare const LuiResizableLayout: React.FC<{
|
|
|
14
14
|
givenGridTemplateColumns?: string;
|
|
15
15
|
givenColumnMinSizes?: MinSizes;
|
|
16
16
|
givenColumnSnapOffset?: number;
|
|
17
|
-
callbackOnSplitStateChange?: (currentSplitState: SplitPanelState, leftWidth: number, rightWidth: number
|
|
17
|
+
callbackOnSplitStateChange?: (currentSplitState: SplitPanelState, leftWidth: number, rightWidth: number) => void;
|
|
18
|
+
callbackOnDraging?: (newColumnPosition: string) => void;
|
|
18
19
|
splitStateChecker?: (leftWidth: number, rightWidth: number) => SplitPanelState;
|
|
19
20
|
callbackOnClickLeftArrowButton?: (leftWidth: number, rightWidth: number) => void;
|
|
20
21
|
callbackOnClickRightArrowButton?: (leftWidth: number, rightWidth: number) => void;
|
package/dist/index.js
CHANGED
|
@@ -2829,7 +2829,7 @@ function styleInject(css, ref) {
|
|
|
2829
2829
|
}
|
|
2830
2830
|
}
|
|
2831
2831
|
|
|
2832
|
-
var css_248z$9 = ".LuiResizableLayout-leftPanel {\n display: flex;\n flex-direction: column;\n /* this overflow and the one below (LuiResizableLayout-leftPanelBody) are need to make only\n the search result div scroll (instead of the whole page) */\n overflow: auto;\n}\n\n.LuiResizableLayout-rightPanel {\n display: flex;\n flex-direction: column;\n /* this overflow and the one below (LuiResizableLayout-leftPanelBody) are need to make only\n the search result div scroll (instead of the whole page) */\n overflow: auto;\n}\n\n.LuiResizableLayout-leftPanelBody {\n overflow-y: auto;\n}\n\n.LuiResizableLayout-gutterParentControl {\n display: flex;\n /* use visibility and opacity instead of display: none as we want to be able to fade in on hover */\n visibility: hidden;\n opacity: 0;\n position: fixed;\n top: 50%;\n z-index: 500;\n margin-left: -30px;\n /*half total control width, minus half the gutter width*/\n transition: 0.3s all 2s ease-in;\n}\n\n.LuiResizableLayout-gutterControlLeft, .LuiResizableLayout-gutterControlRight {\n background-color: #
|
|
2832
|
+
var css_248z$9 = ".LuiResizableLayout-leftPanel {\n display: flex;\n flex-direction: column;\n /* this overflow and the one below (LuiResizableLayout-leftPanelBody) are need to make only\n the search result div scroll (instead of the whole page) */\n overflow: auto;\n}\n\n.LuiResizableLayout-rightPanel {\n display: flex;\n flex-direction: column;\n /* this overflow and the one below (LuiResizableLayout-leftPanelBody) are need to make only\n the search result div scroll (instead of the whole page) */\n overflow: auto;\n}\n\n.LuiResizableLayout-leftPanelBody {\n overflow-y: auto;\n}\n\n.LuiResizableLayout-gutterParentControl {\n display: flex;\n /* use visibility and opacity instead of display: none as we want to be able to fade in on hover */\n visibility: hidden;\n opacity: 0;\n position: fixed;\n top: 50%;\n z-index: 500;\n margin-left: -30px;\n /*half total control width, minus half the gutter width*/\n transition: 0.3s all 2s ease-in;\n}\n\n.LuiResizableLayout-gutterControlLeft, .LuiResizableLayout-gutterControlRight {\n background-color: #eaeaea;\n width: 32px;\n height: 80px;\n text-align: center;\n display: flex;\n align-items: center;\n}\n\n.LuiResizableLayout-gutterControlLeft {\n border-radius: 3px 0 0 3px;\n}\n\n.LuiResizableLayout-gutterControlRight {\n border-radius: 0 3px 3px 0;\n}\n\n.LuiResizableLayout-gutterControlLeft > .LuiIcon, .LuiResizableLayout-gutterControlRight > .LuiIcon {\n height: auto;\n}\n\n.LuiResizableLayout-gutterControlLeft:hover, .LuiResizableLayout-gutterControlRight:hover {\n background-color: #73c8e1;\n cursor: pointer;\n}\n\n.LuiResizableLayout-gutterControl-collapsed {\n visibility: hidden;\n}\n\n/* TODO: move the expand gutter button so it doesn't show over the scroll bar */\n.LuiResizableLayout-gutterParentControlVisible {\n visibility: visible;\n opacity: 1;\n}\n\n.LuiResizableLayout-grid {\n display: grid;\n height: 100%;\n}\n\n.LuiResizableLayout-gutterCol {\n grid-row: 1/-1;\n cursor: col-resize;\n width: 16px;\n z-index: 1;\n}\n\n.LuiResizableLayout-gutterCol-collapsed {\n width: 4px;\n}\n\n.LuiResizableLayout-gutterCol1 {\n grid-column: 2;\n}\n\n.LuiResizableLayout-gutterCol:hover > .LuiResizableLayout-gutterParentControl {\n visibility: visible;\n opacity: 1;\n transition: 0s all 0s ease-in;\n}\n\n.LuiResizableLayout-gutterSlider {\n width: 4px;\n height: 100%;\n background-color: #eaeaea;\n pointer-events: none;\n}\n\n.LuiResizableLayout-gutterCol:hover .LuiResizableLayout-gutterSlider, .LuiResizableLayout-gutterCol:active .LuiResizableLayout-gutterSlider {\n background-color: #73c8e1;\n}";
|
|
2833
2833
|
styleInject(css_248z$9);
|
|
2834
2834
|
|
|
2835
2835
|
var GutterComponent = function (props) {
|
|
@@ -2858,7 +2858,7 @@ exports.SplitPanelState = void 0;
|
|
|
2858
2858
|
SplitPanelState[SplitPanelState["CLOSED_RIGHT"] = 2] = "CLOSED_RIGHT";
|
|
2859
2859
|
})(exports.SplitPanelState || (exports.SplitPanelState = {}));
|
|
2860
2860
|
var LuiResizableLayout = function (props) {
|
|
2861
|
-
var givenLeftRef = props.givenLeftRef, givenRightRef = props.givenRightRef, givenGridTemplateColumns = props.givenGridTemplateColumns, givenColumnMinSizes = props.givenColumnMinSizes, givenColumnSnapOffset = props.givenColumnSnapOffset, callbackOnClickLeftArrowButton = props.callbackOnClickLeftArrowButton, callbackOnClickRightArrowButton = props.callbackOnClickRightArrowButton;
|
|
2861
|
+
var givenLeftRef = props.givenLeftRef, givenRightRef = props.givenRightRef, givenGridTemplateColumns = props.givenGridTemplateColumns, givenColumnMinSizes = props.givenColumnMinSizes, givenColumnSnapOffset = props.givenColumnSnapOffset, callbackOnClickLeftArrowButton = props.callbackOnClickLeftArrowButton, callbackOnClickRightArrowButton = props.callbackOnClickRightArrowButton, callbackOnDraging = props.callbackOnDraging;
|
|
2862
2862
|
var _a = React.useState(givenGridTemplateColumns ? givenGridTemplateColumns : '1fr 4px 1fr'), gridTemplateColumns = _a[0], setGridTemplateColumns = _a[1];
|
|
2863
2863
|
var _b = React.useState(0), leftWidth = _b[0], setLeftWidth = _b[1];
|
|
2864
2864
|
var _c = React.useState(0), rightWidth = _c[0], setRightWidth = _c[1];
|
|
@@ -2867,10 +2867,10 @@ var LuiResizableLayout = function (props) {
|
|
|
2867
2867
|
var defaultRightRef = React.useRef(null);
|
|
2868
2868
|
var leftRef = givenLeftRef ? givenLeftRef : defaultLeftRef;
|
|
2869
2869
|
var rightRef = givenRightRef ? givenRightRef : defaultRightRef;
|
|
2870
|
-
var updateSplitStateAndNotifyParent = function (newSplitState, leftWidth, rightWidth
|
|
2870
|
+
var updateSplitStateAndNotifyParent = function (newSplitState, leftWidth, rightWidth) {
|
|
2871
2871
|
setSplitState(newSplitState);
|
|
2872
2872
|
props.callbackOnSplitStateChange &&
|
|
2873
|
-
props.callbackOnSplitStateChange(newSplitState, leftWidth, rightWidth
|
|
2873
|
+
props.callbackOnSplitStateChange(newSplitState, leftWidth, rightWidth);
|
|
2874
2874
|
};
|
|
2875
2875
|
var defaultSplitStateChecker = function (leftWidth, rightWidth) {
|
|
2876
2876
|
if (leftWidth <= 0) {
|
|
@@ -2907,8 +2907,8 @@ var LuiResizableLayout = function (props) {
|
|
|
2907
2907
|
var rightWidth = observerRight.contentRect.width;
|
|
2908
2908
|
// Update split state
|
|
2909
2909
|
props.splitStateChecker
|
|
2910
|
-
? updateSplitStateAndNotifyParent(props.splitStateChecker(leftWidth, rightWidth), leftWidth, rightWidth
|
|
2911
|
-
: updateSplitStateAndNotifyParent(defaultSplitStateChecker(leftWidth, rightWidth), leftWidth, rightWidth
|
|
2910
|
+
? updateSplitStateAndNotifyParent(props.splitStateChecker(leftWidth, rightWidth), leftWidth, rightWidth)
|
|
2911
|
+
: updateSplitStateAndNotifyParent(defaultSplitStateChecker(leftWidth, rightWidth), leftWidth, rightWidth);
|
|
2912
2912
|
// update the panel widths, which will be used to passed to the leftArrow/rightArrow button call back
|
|
2913
2913
|
setLeftWidth(leftWidth);
|
|
2914
2914
|
setRightWidth(rightWidth);
|
|
@@ -2923,9 +2923,9 @@ var LuiResizableLayout = function (props) {
|
|
|
2923
2923
|
return function () { return obs === null || obs === void 0 ? void 0 : obs.disconnect(); };
|
|
2924
2924
|
}, [leftRef.current, rightRef.current]);
|
|
2925
2925
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2926
|
+
// @ts-ignore
|
|
2926
2927
|
var handleDrag = function (direction, track, style) {
|
|
2927
|
-
|
|
2928
|
-
setGridTemplateColumns(style);
|
|
2928
|
+
callbackOnDraging && callbackOnDraging(style);
|
|
2929
2929
|
};
|
|
2930
2930
|
var onLeftClickArrowButton = function (leftWidth, rightWidth) {
|
|
2931
2931
|
callbackOnClickLeftArrowButton
|