@linzjs/lui 17.3.0 → 17.3.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 +7 -0
- package/README.md +1 -1
- package/dist/components/LuiSidePanel/LuiSidePanel.d.ts +1 -0
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +7 -6
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/lui.esm.js
CHANGED
|
@@ -60309,29 +60309,30 @@ var LuiBadge = function (props) { return (React__default.createElement("p", { cl
|
|
|
60309
60309
|
var LuiSidePanelContext = React__default.createContext({ setProps: function () { return undefined; } });
|
|
60310
60310
|
/* eslint-disable react/prop-types */
|
|
60311
60311
|
var LuiSidePanel = function (_a) {
|
|
60312
|
-
var children = _a.children, onClose = _a.onClose, width = _a.width;
|
|
60312
|
+
var children = _a.children, onClose = _a.onClose, width = _a.width, top = _a.top;
|
|
60313
60313
|
var setProps = React__default.useContext(LuiSidePanelContext).setProps;
|
|
60314
60314
|
React__default.useEffect(function () {
|
|
60315
|
-
setProps({ children: children, onClose: onClose, width: width });
|
|
60315
|
+
setProps({ children: children, onClose: onClose, width: width, top: top });
|
|
60316
60316
|
return function () {
|
|
60317
60317
|
setProps(undefined);
|
|
60318
60318
|
};
|
|
60319
|
-
}, [setProps, children, onClose, width]);
|
|
60319
|
+
}, [setProps, children, onClose, width, top]);
|
|
60320
60320
|
return React__default.createElement(React__default.Fragment, null);
|
|
60321
60321
|
};
|
|
60322
60322
|
var LuiSidePanelContainer = function (props) {
|
|
60323
|
-
var _a = props !== null && props !== void 0 ? props : {}, children = _a.children, onClose = _a.onClose, _b = _a.width, width = _b === void 0 ? '50%' : _b;
|
|
60323
|
+
var _a = props !== null && props !== void 0 ? props : {}, children = _a.children, onClose = _a.onClose, _b = _a.width, width = _b === void 0 ? '50%' : _b, _c = _a.top, top = _c === void 0 ? 60 : _c;
|
|
60324
60324
|
return (React__default.createElement("section", { style: {
|
|
60325
|
-
position: '
|
|
60325
|
+
position: 'fixed',
|
|
60326
60326
|
right: 0,
|
|
60327
60327
|
bottom: 0,
|
|
60328
|
-
top:
|
|
60328
|
+
top: top,
|
|
60329
60329
|
background: 'white',
|
|
60330
60330
|
width: children ? width !== null && width !== void 0 ? width : '50%' : '0%',
|
|
60331
60331
|
transition: 'width 0.2s ease',
|
|
60332
60332
|
boxShadow: '-0.1em 0 0.4em rgba(0, 0, 0, 0.2)',
|
|
60333
60333
|
padding: children ? '0px 20px 0px 20px' : 0,
|
|
60334
60334
|
whiteSpace: 'nowrap',
|
|
60335
|
+
zIndex: 3,
|
|
60335
60336
|
} },
|
|
60336
60337
|
children && (React__default.createElement("button", { type: "button", "data-testid": "close", onClick: onClose, style: {
|
|
60337
60338
|
color: '#5e5e61',
|