@lanaco/lnc-react-ui 3.9.0 → 3.10.0
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/lib/index.esm.js +14 -2
- package/lib/index.js +14 -2
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -82432,8 +82432,12 @@ var getWidth = function getWidth(direction, isOpen, isFullPage, drawerSize, unse
|
|
|
82432
82432
|
if (isOpen) return "width: " + drawerSize + ";";
|
|
82433
82433
|
return "width: 0;";
|
|
82434
82434
|
};
|
|
82435
|
-
var StyledDrawer = newStyled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n touch-action: none;\n overflow: auto;\n max-height:
|
|
82435
|
+
var StyledDrawer = newStyled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n touch-action: none;\n overflow: auto;\n max-height: ", ";\n ", "\n max-width: ", ";\n ", "\n position: fixed;\n z-index: ", ";\n ", ";\n ", ";\n -webkit-transition: ", ";\n -moz-transition: ", ";\n -ms-transition: ", ";\n -o-transition: ", ";\n transition: ", ";\n padding: ", ";\n\n box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);\n\n background-color: ", ";\n color: ", ";\n ", ";\n"])), function (p) {
|
|
82436
|
+
return p.isOpen || p.unsetHeight === false ? "100vh" : 0;
|
|
82437
|
+
}, function (props) {
|
|
82436
82438
|
return getHeight(props.direction, props.isOpen, props.isFullPage, props.drawerSize, props.unsetHeight);
|
|
82439
|
+
}, function (p) {
|
|
82440
|
+
return p.isOpen || p.unsetWidth === false ? "100vw" : 0;
|
|
82437
82441
|
}, function (props) {
|
|
82438
82442
|
return getWidth(props.direction, props.isOpen, props.isFullPage, props.drawerSize, props.unsetWidth);
|
|
82439
82443
|
}, function (props) {
|
|
@@ -82597,7 +82601,7 @@ var SwipeableDrawer = /*#__PURE__*/React__default.forwardRef(function (props, re
|
|
|
82597
82601
|
drawerSize: drawerSize,
|
|
82598
82602
|
onTouchStart: handleTouchStart,
|
|
82599
82603
|
onTouchMove: handleTouchMove
|
|
82600
|
-
}, rest), children
|
|
82604
|
+
}, rest), children)));
|
|
82601
82605
|
});
|
|
82602
82606
|
SwipeableDrawer.defaultProps = {
|
|
82603
82607
|
direction: "right",
|
|
@@ -82611,7 +82615,15 @@ SwipeableDrawer.defaultProps = {
|
|
|
82611
82615
|
isFullPage: false,
|
|
82612
82616
|
drawerSize: "12.5rem",
|
|
82613
82617
|
size: "small",
|
|
82618
|
+
/**
|
|
82619
|
+
* used to fit size of the drawer to the size of its child
|
|
82620
|
+
* when position is top or bottom
|
|
82621
|
+
*/
|
|
82614
82622
|
unsetHeight: false,
|
|
82623
|
+
/**
|
|
82624
|
+
* used to fit size of the drawer to the size of its child
|
|
82625
|
+
* when position is right or left
|
|
82626
|
+
*/
|
|
82615
82627
|
unsetWidth: false,
|
|
82616
82628
|
//-------------------------
|
|
82617
82629
|
onClose: function onClose() {},
|
package/lib/index.js
CHANGED
|
@@ -82481,8 +82481,12 @@ var getWidth = function getWidth(direction, isOpen, isFullPage, drawerSize, unse
|
|
|
82481
82481
|
if (isOpen) return "width: " + drawerSize + ";";
|
|
82482
82482
|
return "width: 0;";
|
|
82483
82483
|
};
|
|
82484
|
-
var StyledDrawer = newStyled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral__default["default"](["\n touch-action: none;\n overflow: auto;\n max-height:
|
|
82484
|
+
var StyledDrawer = newStyled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral__default["default"](["\n touch-action: none;\n overflow: auto;\n max-height: ", ";\n ", "\n max-width: ", ";\n ", "\n position: fixed;\n z-index: ", ";\n ", ";\n ", ";\n -webkit-transition: ", ";\n -moz-transition: ", ";\n -ms-transition: ", ";\n -o-transition: ", ";\n transition: ", ";\n padding: ", ";\n\n box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);\n\n background-color: ", ";\n color: ", ";\n ", ";\n"])), function (p) {
|
|
82485
|
+
return p.isOpen || p.unsetHeight === false ? "100vh" : 0;
|
|
82486
|
+
}, function (props) {
|
|
82485
82487
|
return getHeight(props.direction, props.isOpen, props.isFullPage, props.drawerSize, props.unsetHeight);
|
|
82488
|
+
}, function (p) {
|
|
82489
|
+
return p.isOpen || p.unsetWidth === false ? "100vw" : 0;
|
|
82486
82490
|
}, function (props) {
|
|
82487
82491
|
return getWidth(props.direction, props.isOpen, props.isFullPage, props.drawerSize, props.unsetWidth);
|
|
82488
82492
|
}, function (props) {
|
|
@@ -82646,7 +82650,7 @@ var SwipeableDrawer = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
82646
82650
|
drawerSize: drawerSize,
|
|
82647
82651
|
onTouchStart: handleTouchStart,
|
|
82648
82652
|
onTouchMove: handleTouchMove
|
|
82649
|
-
}, rest), children
|
|
82653
|
+
}, rest), children)));
|
|
82650
82654
|
});
|
|
82651
82655
|
SwipeableDrawer.defaultProps = {
|
|
82652
82656
|
direction: "right",
|
|
@@ -82660,7 +82664,15 @@ SwipeableDrawer.defaultProps = {
|
|
|
82660
82664
|
isFullPage: false,
|
|
82661
82665
|
drawerSize: "12.5rem",
|
|
82662
82666
|
size: "small",
|
|
82667
|
+
/**
|
|
82668
|
+
* used to fit size of the drawer to the size of its child
|
|
82669
|
+
* when position is top or bottom
|
|
82670
|
+
*/
|
|
82663
82671
|
unsetHeight: false,
|
|
82672
|
+
/**
|
|
82673
|
+
* used to fit size of the drawer to the size of its child
|
|
82674
|
+
* when position is right or left
|
|
82675
|
+
*/
|
|
82664
82676
|
unsetWidth: false,
|
|
82665
82677
|
//-------------------------
|
|
82666
82678
|
onClose: function onClose() {},
|