@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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [17.3.1](https://github.com/linz/lui/compare/v17.3.0...v17.3.1) (2022-05-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Release for homero's slide panel ([172b611](https://github.com/linz/lui/commit/172b611861b925ac1d5c8b8ad4ac0fd17cc331e5))
7
+
1
8
  # [17.3.0](https://github.com/linz/lui/compare/v17.2.0...v17.3.0) (2022-05-25)
2
9
 
3
10
 
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Lui - Linz User Interface!!
1
+ # Lui - Linz User Interface!
2
2
 
3
3
  > It's written in CSS and a React wrapper!
4
4
  >
@@ -2,5 +2,6 @@ import React from 'react';
2
2
  export declare const LuiSidePanel: React.FC<{
3
3
  onClose: () => void;
4
4
  width?: string;
5
+ top?: number;
5
6
  }>;
6
7
  export declare const LuiSidePanelProvider: React.FC;
package/dist/index.js CHANGED
@@ -60337,29 +60337,30 @@ var LuiBadge = function (props) { return (React__default["default"].createElemen
60337
60337
  var LuiSidePanelContext = React__default["default"].createContext({ setProps: function () { return undefined; } });
60338
60338
  /* eslint-disable react/prop-types */
60339
60339
  var LuiSidePanel = function (_a) {
60340
- var children = _a.children, onClose = _a.onClose, width = _a.width;
60340
+ var children = _a.children, onClose = _a.onClose, width = _a.width, top = _a.top;
60341
60341
  var setProps = React__default["default"].useContext(LuiSidePanelContext).setProps;
60342
60342
  React__default["default"].useEffect(function () {
60343
- setProps({ children: children, onClose: onClose, width: width });
60343
+ setProps({ children: children, onClose: onClose, width: width, top: top });
60344
60344
  return function () {
60345
60345
  setProps(undefined);
60346
60346
  };
60347
- }, [setProps, children, onClose, width]);
60347
+ }, [setProps, children, onClose, width, top]);
60348
60348
  return React__default["default"].createElement(React__default["default"].Fragment, null);
60349
60349
  };
60350
60350
  var LuiSidePanelContainer = function (props) {
60351
- var _a = props !== null && props !== void 0 ? props : {}, children = _a.children, onClose = _a.onClose, _b = _a.width, width = _b === void 0 ? '50%' : _b;
60351
+ 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;
60352
60352
  return (React__default["default"].createElement("section", { style: {
60353
- position: 'absolute',
60353
+ position: 'fixed',
60354
60354
  right: 0,
60355
60355
  bottom: 0,
60356
- top: 0,
60356
+ top: top,
60357
60357
  background: 'white',
60358
60358
  width: children ? width !== null && width !== void 0 ? width : '50%' : '0%',
60359
60359
  transition: 'width 0.2s ease',
60360
60360
  boxShadow: '-0.1em 0 0.4em rgba(0, 0, 0, 0.2)',
60361
60361
  padding: children ? '0px 20px 0px 20px' : 0,
60362
60362
  whiteSpace: 'nowrap',
60363
+ zIndex: 3,
60363
60364
  } },
60364
60365
  children && (React__default["default"].createElement("button", { type: "button", "data-testid": "close", onClick: onClose, style: {
60365
60366
  color: '#5e5e61',