@lanaco/lnc-react-ui 3.7.0 → 3.9.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 +31 -18
- package/lib/index.js +31 -18
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -77214,7 +77214,7 @@ function reducer(state, action) {
|
|
|
77214
77214
|
|
|
77215
77215
|
function noop$1() {}
|
|
77216
77216
|
|
|
77217
|
-
var _excluded$s = ["inputRef", "id", "disabled", "preventDefault", "acceptDropzone", "acceptInput", "multiple", "selectFileText", "control", "dndFileText", "showFileSize", "showDnD", "className", "style", "onChange", "onFocus", "onBlur", "onDropAccepted", "onDrop", "color", "size", "inputProps"];
|
|
77217
|
+
var _excluded$s = ["inputRef", "id", "disabled", "preventDefault", "acceptDropzone", "acceptInput", "multiple", "selectFileText", "control", "dndFileText", "showFileSize", "showDnD", "className", "style", "onChange", "onFocus", "onBlur", "onDropAccepted", "onDrop", "color", "size", "inputProps", "alwaysShowDropzone"];
|
|
77218
77218
|
var _templateObject$o, _templateObject2$8, _templateObject3$5;
|
|
77219
77219
|
var paddingBySize = {
|
|
77220
77220
|
small: "0.5rem 0.813rem",
|
|
@@ -77262,6 +77262,7 @@ var DragAndDropFile = /*#__PURE__*/React__default.forwardRef(function (props, re
|
|
|
77262
77262
|
color = props.color,
|
|
77263
77263
|
size = props.size,
|
|
77264
77264
|
inputProps = props.inputProps,
|
|
77265
|
+
alwaysShowDropzone = props.alwaysShowDropzone,
|
|
77265
77266
|
rest = _objectWithoutProperties$1(props, _excluded$s);
|
|
77266
77267
|
var theme = useTheme$1();
|
|
77267
77268
|
var _useState = useState(false),
|
|
@@ -77358,10 +77359,10 @@ var DragAndDropFile = /*#__PURE__*/React__default.forwardRef(function (props, re
|
|
|
77358
77359
|
if (_onBlur && !disabled) _onBlur(e);
|
|
77359
77360
|
},
|
|
77360
77361
|
onChange: handleOnChange
|
|
77361
|
-
}, inputProps)), !isDragActive && !displayDnD && /*#__PURE__*/React__default.createElement(PlusLabel, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
77362
|
+
}, inputProps)), !isDragActive && !displayDnD && !alwaysShowDropzone && /*#__PURE__*/React__default.createElement(PlusLabel, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
77362
77363
|
icon: "plus",
|
|
77363
77364
|
size: size
|
|
77364
|
-
})), (isDragActive || displayDnD) && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
77365
|
+
})), (isDragActive || displayDnD || alwaysShowDropzone) && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
77365
77366
|
icon: "upload",
|
|
77366
77367
|
size: size,
|
|
77367
77368
|
className: "dnd-icon-lnc"
|
|
@@ -77376,6 +77377,7 @@ DragAndDropFile.defaultProps = {
|
|
|
77376
77377
|
dndFileText: "Drag and drop file here or",
|
|
77377
77378
|
showFileSize: false,
|
|
77378
77379
|
showDnD: true,
|
|
77380
|
+
alwaysShowDropzone: false,
|
|
77379
77381
|
//------------------
|
|
77380
77382
|
onChange: function onChange() {},
|
|
77381
77383
|
onFocus: function onFocus() {},
|
|
@@ -77418,6 +77420,7 @@ DragAndDropFile.propTypes = {
|
|
|
77418
77420
|
* }
|
|
77419
77421
|
*/
|
|
77420
77422
|
showDnD: PropTypes.bool,
|
|
77423
|
+
alwaysShowDropzone: PropTypes.bool,
|
|
77421
77424
|
//-------------------------
|
|
77422
77425
|
onChange: PropTypes.func,
|
|
77423
77426
|
onFocus: PropTypes.func,
|
|
@@ -82413,24 +82416,26 @@ NestedDropdownItem.propTypes = {
|
|
|
82413
82416
|
__TYPE__: PropTypes.string
|
|
82414
82417
|
};
|
|
82415
82418
|
|
|
82416
|
-
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"];
|
|
82417
82420
|
var _templateObject$4, _templateObject2;
|
|
82418
|
-
var getHeight = function getHeight(direction, isOpen, isFullPage, drawerSize) {
|
|
82419
|
-
if (direction === "right" || direction === "left") return "100
|
|
82420
|
-
if (isOpen && isFullPage) return "100
|
|
82421
|
-
if (isOpen) return
|
|
82422
|
-
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;";
|
|
82423
82427
|
};
|
|
82424
|
-
var getWidth = function getWidth(direction, isOpen, isFullPage, drawerSize) {
|
|
82425
|
-
if (direction === "top" || direction === "bottom") return "100
|
|
82426
|
-
if (isOpen && isFullPage) return "100
|
|
82427
|
-
if (isOpen) return
|
|
82428
|
-
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;";
|
|
82429
82434
|
};
|
|
82430
|
-
var StyledDrawer = newStyled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n touch-action: none;\n overflow: auto;\n max-height: \"100vh\";\n
|
|
82431
|
-
return getHeight(props.direction, props.isOpen, props.isFullPage, props.drawerSize);
|
|
82435
|
+
var StyledDrawer = newStyled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n touch-action: none;\n overflow: auto;\n max-height: \"100vh\";\n ", "\n max-width: \"100vw\";\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 (props) {
|
|
82436
|
+
return getHeight(props.direction, props.isOpen, props.isFullPage, props.drawerSize, props.unsetHeight);
|
|
82432
82437
|
}, function (props) {
|
|
82433
|
-
return getWidth(props.direction, props.isOpen, props.isFullPage, props.drawerSize);
|
|
82438
|
+
return getWidth(props.direction, props.isOpen, props.isFullPage, props.drawerSize, props.unsetWidth);
|
|
82434
82439
|
}, function (props) {
|
|
82435
82440
|
return props.zIndex;
|
|
82436
82441
|
}, function (props) {
|
|
@@ -82474,6 +82479,8 @@ var SwipeableDrawer = /*#__PURE__*/React__default.forwardRef(function (props, re
|
|
|
82474
82479
|
closeOnClickOutside = props.closeOnClickOutside,
|
|
82475
82480
|
closeOnSwipe = props.closeOnSwipe,
|
|
82476
82481
|
isFullPage = props.isFullPage,
|
|
82482
|
+
unsetHeight = props.unsetHeight,
|
|
82483
|
+
unsetWidth = props.unsetWidth,
|
|
82477
82484
|
onClose = props.onClose,
|
|
82478
82485
|
onOpen = props.onOpen,
|
|
82479
82486
|
className = props.className,
|
|
@@ -82579,6 +82586,8 @@ var SwipeableDrawer = /*#__PURE__*/React__default.forwardRef(function (props, re
|
|
|
82579
82586
|
isOpen: _isOpen,
|
|
82580
82587
|
direction: direction,
|
|
82581
82588
|
isFullPage: isFullPage,
|
|
82589
|
+
unsetHeight: unsetHeight,
|
|
82590
|
+
unsetWidth: unsetWidth,
|
|
82582
82591
|
duration: duration,
|
|
82583
82592
|
color: color,
|
|
82584
82593
|
theme: theme,
|
|
@@ -82588,7 +82597,7 @@ var SwipeableDrawer = /*#__PURE__*/React__default.forwardRef(function (props, re
|
|
|
82588
82597
|
drawerSize: drawerSize,
|
|
82589
82598
|
onTouchStart: handleTouchStart,
|
|
82590
82599
|
onTouchMove: handleTouchMove
|
|
82591
|
-
}, rest), children)));
|
|
82600
|
+
}, rest), children, "askldjflkasjdflkasj ajdklfjals", /*#__PURE__*/React__default.createElement("div", null, "jsldfjlaskdjf"), /*#__PURE__*/React__default.createElement("div", null, "asdjkfaklsdjfkl"))));
|
|
82592
82601
|
});
|
|
82593
82602
|
SwipeableDrawer.defaultProps = {
|
|
82594
82603
|
direction: "right",
|
|
@@ -82602,6 +82611,8 @@ SwipeableDrawer.defaultProps = {
|
|
|
82602
82611
|
isFullPage: false,
|
|
82603
82612
|
drawerSize: "12.5rem",
|
|
82604
82613
|
size: "small",
|
|
82614
|
+
unsetHeight: false,
|
|
82615
|
+
unsetWidth: false,
|
|
82605
82616
|
//-------------------------
|
|
82606
82617
|
onClose: function onClose() {},
|
|
82607
82618
|
onOpen: function onOpen() {},
|
|
@@ -82630,6 +82641,8 @@ SwipeableDrawer.propTypes = {
|
|
|
82630
82641
|
* Determines whether drawer takes up the whole page
|
|
82631
82642
|
*/
|
|
82632
82643
|
isFullPage: PropTypes.bool,
|
|
82644
|
+
unsetHeight: PropTypes.bool,
|
|
82645
|
+
unsetWidth: PropTypes.bool,
|
|
82633
82646
|
//---------------------------------------------------------------
|
|
82634
82647
|
onClose: PropTypes.func,
|
|
82635
82648
|
onOpen: PropTypes.func,
|
package/lib/index.js
CHANGED
|
@@ -77263,7 +77263,7 @@ function reducer(state, action) {
|
|
|
77263
77263
|
|
|
77264
77264
|
function noop$1() {}
|
|
77265
77265
|
|
|
77266
|
-
var _excluded$s = ["inputRef", "id", "disabled", "preventDefault", "acceptDropzone", "acceptInput", "multiple", "selectFileText", "control", "dndFileText", "showFileSize", "showDnD", "className", "style", "onChange", "onFocus", "onBlur", "onDropAccepted", "onDrop", "color", "size", "inputProps"];
|
|
77266
|
+
var _excluded$s = ["inputRef", "id", "disabled", "preventDefault", "acceptDropzone", "acceptInput", "multiple", "selectFileText", "control", "dndFileText", "showFileSize", "showDnD", "className", "style", "onChange", "onFocus", "onBlur", "onDropAccepted", "onDrop", "color", "size", "inputProps", "alwaysShowDropzone"];
|
|
77267
77267
|
var _templateObject$o, _templateObject2$8, _templateObject3$5;
|
|
77268
77268
|
var paddingBySize = {
|
|
77269
77269
|
small: "0.5rem 0.813rem",
|
|
@@ -77311,6 +77311,7 @@ var DragAndDropFile = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
77311
77311
|
color = props.color,
|
|
77312
77312
|
size = props.size,
|
|
77313
77313
|
inputProps = props.inputProps,
|
|
77314
|
+
alwaysShowDropzone = props.alwaysShowDropzone,
|
|
77314
77315
|
rest = _objectWithoutProperties__default["default"](props, _excluded$s);
|
|
77315
77316
|
var theme = useTheme$1();
|
|
77316
77317
|
var _useState = React.useState(false),
|
|
@@ -77407,10 +77408,10 @@ var DragAndDropFile = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
77407
77408
|
if (_onBlur && !disabled) _onBlur(e);
|
|
77408
77409
|
},
|
|
77409
77410
|
onChange: handleOnChange
|
|
77410
|
-
}, inputProps)), !isDragActive && !displayDnD && /*#__PURE__*/React__default["default"].createElement(PlusLabel, null, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
77411
|
+
}, inputProps)), !isDragActive && !displayDnD && !alwaysShowDropzone && /*#__PURE__*/React__default["default"].createElement(PlusLabel, null, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
77411
77412
|
icon: "plus",
|
|
77412
77413
|
size: size
|
|
77413
|
-
})), (isDragActive || displayDnD) && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
77414
|
+
})), (isDragActive || displayDnD || alwaysShowDropzone) && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
77414
77415
|
icon: "upload",
|
|
77415
77416
|
size: size,
|
|
77416
77417
|
className: "dnd-icon-lnc"
|
|
@@ -77425,6 +77426,7 @@ DragAndDropFile.defaultProps = {
|
|
|
77425
77426
|
dndFileText: "Drag and drop file here or",
|
|
77426
77427
|
showFileSize: false,
|
|
77427
77428
|
showDnD: true,
|
|
77429
|
+
alwaysShowDropzone: false,
|
|
77428
77430
|
//------------------
|
|
77429
77431
|
onChange: function onChange() {},
|
|
77430
77432
|
onFocus: function onFocus() {},
|
|
@@ -77467,6 +77469,7 @@ DragAndDropFile.propTypes = {
|
|
|
77467
77469
|
* }
|
|
77468
77470
|
*/
|
|
77469
77471
|
showDnD: PropTypes__default["default"].bool,
|
|
77472
|
+
alwaysShowDropzone: PropTypes__default["default"].bool,
|
|
77470
77473
|
//-------------------------
|
|
77471
77474
|
onChange: PropTypes__default["default"].func,
|
|
77472
77475
|
onFocus: PropTypes__default["default"].func,
|
|
@@ -82462,24 +82465,26 @@ NestedDropdownItem.propTypes = {
|
|
|
82462
82465
|
__TYPE__: PropTypes__default["default"].string
|
|
82463
82466
|
};
|
|
82464
82467
|
|
|
82465
|
-
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"];
|
|
82466
82469
|
var _templateObject$4, _templateObject2;
|
|
82467
|
-
var getHeight = function getHeight(direction, isOpen, isFullPage, drawerSize) {
|
|
82468
|
-
if (direction === "right" || direction === "left") return "100
|
|
82469
|
-
if (isOpen && isFullPage) return "100
|
|
82470
|
-
if (isOpen) return
|
|
82471
|
-
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;";
|
|
82472
82476
|
};
|
|
82473
|
-
var getWidth = function getWidth(direction, isOpen, isFullPage, drawerSize) {
|
|
82474
|
-
if (direction === "top" || direction === "bottom") return "100
|
|
82475
|
-
if (isOpen && isFullPage) return "100
|
|
82476
|
-
if (isOpen) return
|
|
82477
|
-
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;";
|
|
82478
82483
|
};
|
|
82479
|
-
var StyledDrawer = newStyled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral__default["default"](["\n touch-action: none;\n overflow: auto;\n max-height: \"100vh\";\n
|
|
82480
|
-
return getHeight(props.direction, props.isOpen, props.isFullPage, props.drawerSize);
|
|
82484
|
+
var StyledDrawer = newStyled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral__default["default"](["\n touch-action: none;\n overflow: auto;\n max-height: \"100vh\";\n ", "\n max-width: \"100vw\";\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 (props) {
|
|
82485
|
+
return getHeight(props.direction, props.isOpen, props.isFullPage, props.drawerSize, props.unsetHeight);
|
|
82481
82486
|
}, function (props) {
|
|
82482
|
-
return getWidth(props.direction, props.isOpen, props.isFullPage, props.drawerSize);
|
|
82487
|
+
return getWidth(props.direction, props.isOpen, props.isFullPage, props.drawerSize, props.unsetWidth);
|
|
82483
82488
|
}, function (props) {
|
|
82484
82489
|
return props.zIndex;
|
|
82485
82490
|
}, function (props) {
|
|
@@ -82523,6 +82528,8 @@ var SwipeableDrawer = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
82523
82528
|
closeOnClickOutside = props.closeOnClickOutside,
|
|
82524
82529
|
closeOnSwipe = props.closeOnSwipe,
|
|
82525
82530
|
isFullPage = props.isFullPage,
|
|
82531
|
+
unsetHeight = props.unsetHeight,
|
|
82532
|
+
unsetWidth = props.unsetWidth,
|
|
82526
82533
|
onClose = props.onClose,
|
|
82527
82534
|
onOpen = props.onOpen,
|
|
82528
82535
|
className = props.className,
|
|
@@ -82628,6 +82635,8 @@ var SwipeableDrawer = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
82628
82635
|
isOpen: _isOpen,
|
|
82629
82636
|
direction: direction,
|
|
82630
82637
|
isFullPage: isFullPage,
|
|
82638
|
+
unsetHeight: unsetHeight,
|
|
82639
|
+
unsetWidth: unsetWidth,
|
|
82631
82640
|
duration: duration,
|
|
82632
82641
|
color: color,
|
|
82633
82642
|
theme: theme,
|
|
@@ -82637,7 +82646,7 @@ var SwipeableDrawer = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
82637
82646
|
drawerSize: drawerSize,
|
|
82638
82647
|
onTouchStart: handleTouchStart,
|
|
82639
82648
|
onTouchMove: handleTouchMove
|
|
82640
|
-
}, rest), children)));
|
|
82649
|
+
}, rest), children, "askldjflkasjdflkasj ajdklfjals", /*#__PURE__*/React__default["default"].createElement("div", null, "jsldfjlaskdjf"), /*#__PURE__*/React__default["default"].createElement("div", null, "asdjkfaklsdjfkl"))));
|
|
82641
82650
|
});
|
|
82642
82651
|
SwipeableDrawer.defaultProps = {
|
|
82643
82652
|
direction: "right",
|
|
@@ -82651,6 +82660,8 @@ SwipeableDrawer.defaultProps = {
|
|
|
82651
82660
|
isFullPage: false,
|
|
82652
82661
|
drawerSize: "12.5rem",
|
|
82653
82662
|
size: "small",
|
|
82663
|
+
unsetHeight: false,
|
|
82664
|
+
unsetWidth: false,
|
|
82654
82665
|
//-------------------------
|
|
82655
82666
|
onClose: function onClose() {},
|
|
82656
82667
|
onOpen: function onOpen() {},
|
|
@@ -82679,6 +82690,8 @@ SwipeableDrawer.propTypes = {
|
|
|
82679
82690
|
* Determines whether drawer takes up the whole page
|
|
82680
82691
|
*/
|
|
82681
82692
|
isFullPage: PropTypes__default["default"].bool,
|
|
82693
|
+
unsetHeight: PropTypes__default["default"].bool,
|
|
82694
|
+
unsetWidth: PropTypes__default["default"].bool,
|
|
82682
82695
|
//---------------------------------------------------------------
|
|
82683
82696
|
onClose: PropTypes__default["default"].func,
|
|
82684
82697
|
onOpen: PropTypes__default["default"].func,
|