@lanaco/lnc-react-ui 3.8.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 +36 -14
- package/lib/index.js +36 -14
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -82416,24 +82416,30 @@ NestedDropdownItem.propTypes = {
|
|
|
82416
82416
|
__TYPE__: PropTypes.string
|
|
82417
82417
|
};
|
|
82418
82418
|
|
|
82419
|
-
var _excluded$4 = ["direction", "open", "duration", "enableOverlay", "zIndex", "closeOnClickOutside", "closeOnSwipe", "isFullPage", "onClose", "onOpen", "className", "style", "color", "overlayColor", "size", "drawerSize", "children"];
|
|
82419
|
+
var _excluded$4 = ["direction", "open", "duration", "enableOverlay", "zIndex", "closeOnClickOutside", "closeOnSwipe", "isFullPage", "unsetHeight", "unsetWidth", "onClose", "onOpen", "className", "style", "color", "overlayColor", "size", "drawerSize", "children"];
|
|
82420
82420
|
var _templateObject$4, _templateObject2;
|
|
82421
|
-
var getHeight = function getHeight(direction, isOpen, isFullPage, drawerSize) {
|
|
82422
|
-
if (direction === "right" || direction === "left") return "100
|
|
82423
|
-
if (isOpen && isFullPage) return "100
|
|
82424
|
-
if (isOpen) return
|
|
82425
|
-
return
|
|
82421
|
+
var getHeight = function getHeight(direction, isOpen, isFullPage, drawerSize, unsetHeight) {
|
|
82422
|
+
if (direction === "right" || direction === "left") return "height: 100%;";
|
|
82423
|
+
if (isOpen && isFullPage) return "height: 100%;";
|
|
82424
|
+
if (isOpen && unsetHeight === true) return;
|
|
82425
|
+
if (isOpen) return "height: " + drawerSize + ";";
|
|
82426
|
+
return "height: 0;";
|
|
82426
82427
|
};
|
|
82427
|
-
var getWidth = function getWidth(direction, isOpen, isFullPage, drawerSize) {
|
|
82428
|
-
if (direction === "top" || direction === "bottom") return "100
|
|
82429
|
-
if (isOpen && isFullPage) return "100
|
|
82430
|
-
if (isOpen) return
|
|
82431
|
-
return
|
|
82428
|
+
var getWidth = function getWidth(direction, isOpen, isFullPage, drawerSize, unsetWidth) {
|
|
82429
|
+
if (direction === "top" || direction === "bottom") return "width: 100%;";
|
|
82430
|
+
if (isOpen && isFullPage) return "width: 100%;";
|
|
82431
|
+
if (isOpen && unsetWidth === true) return;
|
|
82432
|
+
if (isOpen) return "width: " + drawerSize + ";";
|
|
82433
|
+
return "width: 0;";
|
|
82432
82434
|
};
|
|
82433
|
-
var StyledDrawer = newStyled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n touch-action: none;\n overflow: auto;\n max-height:
|
|
82434
|
-
return
|
|
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;
|
|
82435
82437
|
}, function (props) {
|
|
82436
|
-
return
|
|
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;
|
|
82441
|
+
}, function (props) {
|
|
82442
|
+
return getWidth(props.direction, props.isOpen, props.isFullPage, props.drawerSize, props.unsetWidth);
|
|
82437
82443
|
}, function (props) {
|
|
82438
82444
|
return props.zIndex;
|
|
82439
82445
|
}, function (props) {
|
|
@@ -82477,6 +82483,8 @@ var SwipeableDrawer = /*#__PURE__*/React__default.forwardRef(function (props, re
|
|
|
82477
82483
|
closeOnClickOutside = props.closeOnClickOutside,
|
|
82478
82484
|
closeOnSwipe = props.closeOnSwipe,
|
|
82479
82485
|
isFullPage = props.isFullPage,
|
|
82486
|
+
unsetHeight = props.unsetHeight,
|
|
82487
|
+
unsetWidth = props.unsetWidth,
|
|
82480
82488
|
onClose = props.onClose,
|
|
82481
82489
|
onOpen = props.onOpen,
|
|
82482
82490
|
className = props.className,
|
|
@@ -82582,6 +82590,8 @@ var SwipeableDrawer = /*#__PURE__*/React__default.forwardRef(function (props, re
|
|
|
82582
82590
|
isOpen: _isOpen,
|
|
82583
82591
|
direction: direction,
|
|
82584
82592
|
isFullPage: isFullPage,
|
|
82593
|
+
unsetHeight: unsetHeight,
|
|
82594
|
+
unsetWidth: unsetWidth,
|
|
82585
82595
|
duration: duration,
|
|
82586
82596
|
color: color,
|
|
82587
82597
|
theme: theme,
|
|
@@ -82605,6 +82615,16 @@ SwipeableDrawer.defaultProps = {
|
|
|
82605
82615
|
isFullPage: false,
|
|
82606
82616
|
drawerSize: "12.5rem",
|
|
82607
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
|
+
*/
|
|
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
|
+
*/
|
|
82627
|
+
unsetWidth: false,
|
|
82608
82628
|
//-------------------------
|
|
82609
82629
|
onClose: function onClose() {},
|
|
82610
82630
|
onOpen: function onOpen() {},
|
|
@@ -82633,6 +82653,8 @@ SwipeableDrawer.propTypes = {
|
|
|
82633
82653
|
* Determines whether drawer takes up the whole page
|
|
82634
82654
|
*/
|
|
82635
82655
|
isFullPage: PropTypes.bool,
|
|
82656
|
+
unsetHeight: PropTypes.bool,
|
|
82657
|
+
unsetWidth: PropTypes.bool,
|
|
82636
82658
|
//---------------------------------------------------------------
|
|
82637
82659
|
onClose: PropTypes.func,
|
|
82638
82660
|
onOpen: PropTypes.func,
|
package/lib/index.js
CHANGED
|
@@ -82465,24 +82465,30 @@ NestedDropdownItem.propTypes = {
|
|
|
82465
82465
|
__TYPE__: PropTypes__default["default"].string
|
|
82466
82466
|
};
|
|
82467
82467
|
|
|
82468
|
-
var _excluded$4 = ["direction", "open", "duration", "enableOverlay", "zIndex", "closeOnClickOutside", "closeOnSwipe", "isFullPage", "onClose", "onOpen", "className", "style", "color", "overlayColor", "size", "drawerSize", "children"];
|
|
82468
|
+
var _excluded$4 = ["direction", "open", "duration", "enableOverlay", "zIndex", "closeOnClickOutside", "closeOnSwipe", "isFullPage", "unsetHeight", "unsetWidth", "onClose", "onOpen", "className", "style", "color", "overlayColor", "size", "drawerSize", "children"];
|
|
82469
82469
|
var _templateObject$4, _templateObject2;
|
|
82470
|
-
var getHeight = function getHeight(direction, isOpen, isFullPage, drawerSize) {
|
|
82471
|
-
if (direction === "right" || direction === "left") return "100
|
|
82472
|
-
if (isOpen && isFullPage) return "100
|
|
82473
|
-
if (isOpen) return
|
|
82474
|
-
return
|
|
82470
|
+
var getHeight = function getHeight(direction, isOpen, isFullPage, drawerSize, unsetHeight) {
|
|
82471
|
+
if (direction === "right" || direction === "left") return "height: 100%;";
|
|
82472
|
+
if (isOpen && isFullPage) return "height: 100%;";
|
|
82473
|
+
if (isOpen && unsetHeight === true) return;
|
|
82474
|
+
if (isOpen) return "height: " + drawerSize + ";";
|
|
82475
|
+
return "height: 0;";
|
|
82475
82476
|
};
|
|
82476
|
-
var getWidth = function getWidth(direction, isOpen, isFullPage, drawerSize) {
|
|
82477
|
-
if (direction === "top" || direction === "bottom") return "100
|
|
82478
|
-
if (isOpen && isFullPage) return "100
|
|
82479
|
-
if (isOpen) return
|
|
82480
|
-
return
|
|
82477
|
+
var getWidth = function getWidth(direction, isOpen, isFullPage, drawerSize, unsetWidth) {
|
|
82478
|
+
if (direction === "top" || direction === "bottom") return "width: 100%;";
|
|
82479
|
+
if (isOpen && isFullPage) return "width: 100%;";
|
|
82480
|
+
if (isOpen && unsetWidth === true) return;
|
|
82481
|
+
if (isOpen) return "width: " + drawerSize + ";";
|
|
82482
|
+
return "width: 0;";
|
|
82481
82483
|
};
|
|
82482
|
-
var StyledDrawer = newStyled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral__default["default"](["\n touch-action: none;\n overflow: auto;\n max-height:
|
|
82483
|
-
return
|
|
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;
|
|
82484
82486
|
}, function (props) {
|
|
82485
|
-
return
|
|
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;
|
|
82490
|
+
}, function (props) {
|
|
82491
|
+
return getWidth(props.direction, props.isOpen, props.isFullPage, props.drawerSize, props.unsetWidth);
|
|
82486
82492
|
}, function (props) {
|
|
82487
82493
|
return props.zIndex;
|
|
82488
82494
|
}, function (props) {
|
|
@@ -82526,6 +82532,8 @@ var SwipeableDrawer = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
82526
82532
|
closeOnClickOutside = props.closeOnClickOutside,
|
|
82527
82533
|
closeOnSwipe = props.closeOnSwipe,
|
|
82528
82534
|
isFullPage = props.isFullPage,
|
|
82535
|
+
unsetHeight = props.unsetHeight,
|
|
82536
|
+
unsetWidth = props.unsetWidth,
|
|
82529
82537
|
onClose = props.onClose,
|
|
82530
82538
|
onOpen = props.onOpen,
|
|
82531
82539
|
className = props.className,
|
|
@@ -82631,6 +82639,8 @@ var SwipeableDrawer = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
82631
82639
|
isOpen: _isOpen,
|
|
82632
82640
|
direction: direction,
|
|
82633
82641
|
isFullPage: isFullPage,
|
|
82642
|
+
unsetHeight: unsetHeight,
|
|
82643
|
+
unsetWidth: unsetWidth,
|
|
82634
82644
|
duration: duration,
|
|
82635
82645
|
color: color,
|
|
82636
82646
|
theme: theme,
|
|
@@ -82654,6 +82664,16 @@ SwipeableDrawer.defaultProps = {
|
|
|
82654
82664
|
isFullPage: false,
|
|
82655
82665
|
drawerSize: "12.5rem",
|
|
82656
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
|
+
*/
|
|
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
|
+
*/
|
|
82676
|
+
unsetWidth: false,
|
|
82657
82677
|
//-------------------------
|
|
82658
82678
|
onClose: function onClose() {},
|
|
82659
82679
|
onOpen: function onOpen() {},
|
|
@@ -82682,6 +82702,8 @@ SwipeableDrawer.propTypes = {
|
|
|
82682
82702
|
* Determines whether drawer takes up the whole page
|
|
82683
82703
|
*/
|
|
82684
82704
|
isFullPage: PropTypes__default["default"].bool,
|
|
82705
|
+
unsetHeight: PropTypes__default["default"].bool,
|
|
82706
|
+
unsetWidth: PropTypes__default["default"].bool,
|
|
82685
82707
|
//---------------------------------------------------------------
|
|
82686
82708
|
onClose: PropTypes__default["default"].func,
|
|
82687
82709
|
onOpen: PropTypes__default["default"].func,
|