@lanaco/lnc-react-ui 3.0.9 → 3.1.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 CHANGED
@@ -79295,7 +79295,7 @@ Drawer.propTypes = {
79295
79295
  color: PropTypes.oneOf(["primary", "secondary", "success", "warning", "danger", "information", "neutral"])
79296
79296
  };
79297
79297
 
79298
- var _excluded$5 = ["item", "onItemSelected", "animation", "color", "size", "className", "style", "__TYPE__", "children"];
79298
+ var _excluded$5 = ["item", "onItemSelected", "defaultOpen", "animation", "color", "size", "className", "style", "__TYPE__", "children"];
79299
79299
  var _templateObject$5;
79300
79300
  var StyledNested$1 = newStyled(motion.div)(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n margin-left: 0.3rem;\n padding-left: 0.3rem;\n border-left: ", ";\n border-radius: 2px;\n"])), function (props) {
79301
79301
  return "2px solid ".concat(getColorRgbaValue(props.theme, "MenuItem", props.color, "focus", "background"));
@@ -79303,6 +79303,7 @@ var StyledNested$1 = newStyled(motion.div)(_templateObject$5 || (_templateObject
79303
79303
  var NestedDropdownItem = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
79304
79304
  var item = props.item,
79305
79305
  onItemSelected = props.onItemSelected,
79306
+ defaultOpen = props.defaultOpen,
79306
79307
  animation = props.animation,
79307
79308
  color = props.color,
79308
79309
  size = props.size,
@@ -79312,7 +79313,7 @@ var NestedDropdownItem = /*#__PURE__*/React__default.forwardRef(function (props,
79312
79313
  var children = props.children,
79313
79314
  rest = _objectWithoutProperties$b(props, _excluded$5);
79314
79315
  var theme = useTheme$1();
79315
- var _useState = useState(false),
79316
+ var _useState = useState(defaultOpen),
79316
79317
  _useState2 = _slicedToArray$2(_useState, 2),
79317
79318
  show = _useState2[0],
79318
79319
  setShow = _useState2[1];
@@ -79347,6 +79348,7 @@ var NestedDropdownItem = /*#__PURE__*/React__default.forwardRef(function (props,
79347
79348
  }, rest), clonedChildren)));
79348
79349
  });
79349
79350
  NestedDropdownItem.defaultProps = {
79351
+ defaultOpen: false,
79350
79352
  /**
79351
79353
  * Animation use on nested items open/close
79352
79354
  */
@@ -79384,6 +79386,7 @@ NestedDropdownItem.defaultProps = {
79384
79386
  NestedDropdownItem.propTypes = {
79385
79387
  item: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
79386
79388
  //--------------------------
79389
+ defaultOpen: PropTypes.bool,
79387
79390
  animation: PropTypes.object,
79388
79391
  className: PropTypes.string,
79389
79392
  style: PropTypes.object,
@@ -79976,7 +79979,7 @@ MenuItem.propTypes = {
79976
79979
  __TYPE__: PropTypes.string
79977
79980
  };
79978
79981
 
79979
- var _excluded$1 = ["item", "onItemSelected", "tuckIn", "tuckInSize", "animation", "color", "size", "className", "style", "__TYPE__", "children"];
79982
+ var _excluded$1 = ["item", "onItemSelected", "defaultOpen", "tuckIn", "tuckInSize", "animation", "color", "size", "className", "style", "__TYPE__", "children"];
79980
79983
  var _templateObject$1;
79981
79984
  var StyledNested = newStyled(motion.div)(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n border-radius: 2px;\n"])), function (props) {
79982
79985
  return props.tuckIn == true && "margin-left: ".concat(props.tuckInSize, ";");
@@ -79988,6 +79991,7 @@ var StyledNested = newStyled(motion.div)(_templateObject$1 || (_templateObject$1
79988
79991
  var NestedMenuItem = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
79989
79992
  var item = props.item,
79990
79993
  onItemSelected = props.onItemSelected,
79994
+ defaultOpen = props.defaultOpen,
79991
79995
  tuckIn = props.tuckIn,
79992
79996
  tuckInSize = props.tuckInSize,
79993
79997
  animation = props.animation,
@@ -79999,7 +80003,7 @@ var NestedMenuItem = /*#__PURE__*/React__default.forwardRef(function (props, ref
79999
80003
  var children = props.children,
80000
80004
  rest = _objectWithoutProperties$b(props, _excluded$1);
80001
80005
  var theme = useTheme$1();
80002
- var _useState = useState(false),
80006
+ var _useState = useState(defaultOpen),
80003
80007
  _useState2 = _slicedToArray$2(_useState, 2),
80004
80008
  show = _useState2[0],
80005
80009
  setShow = _useState2[1];
@@ -80037,6 +80041,7 @@ var NestedMenuItem = /*#__PURE__*/React__default.forwardRef(function (props, ref
80037
80041
  }, animation, rest), clonedChildren)));
80038
80042
  });
80039
80043
  NestedMenuItem.defaultProps = {
80044
+ defaultOpen: false,
80040
80045
  tuckIn: true,
80041
80046
  tuckInSize: "0.3rem",
80042
80047
  /**
@@ -80076,6 +80081,7 @@ NestedMenuItem.defaultProps = {
80076
80081
  NestedMenuItem.propTypes = {
80077
80082
  item: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
80078
80083
  //--------------------------
80084
+ defaultOpen: PropTypes.bool,
80079
80085
  /**
80080
80086
  * Determines wether nested items will be tucked in to the right (using margin-right and padding-left).
80081
80087
  */
package/lib/index.js CHANGED
@@ -79344,7 +79344,7 @@ Drawer.propTypes = {
79344
79344
  color: PropTypes__default["default"].oneOf(["primary", "secondary", "success", "warning", "danger", "information", "neutral"])
79345
79345
  };
79346
79346
 
79347
- var _excluded$5 = ["item", "onItemSelected", "animation", "color", "size", "className", "style", "__TYPE__", "children"];
79347
+ var _excluded$5 = ["item", "onItemSelected", "defaultOpen", "animation", "color", "size", "className", "style", "__TYPE__", "children"];
79348
79348
  var _templateObject$5;
79349
79349
  var StyledNested$1 = newStyled(motion.div)(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral__default["default"](["\n margin-left: 0.3rem;\n padding-left: 0.3rem;\n border-left: ", ";\n border-radius: 2px;\n"])), function (props) {
79350
79350
  return "2px solid ".concat(getColorRgbaValue(props.theme, "MenuItem", props.color, "focus", "background"));
@@ -79352,6 +79352,7 @@ var StyledNested$1 = newStyled(motion.div)(_templateObject$5 || (_templateObject
79352
79352
  var NestedDropdownItem = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
79353
79353
  var item = props.item,
79354
79354
  onItemSelected = props.onItemSelected,
79355
+ defaultOpen = props.defaultOpen,
79355
79356
  animation = props.animation,
79356
79357
  color = props.color,
79357
79358
  size = props.size,
@@ -79361,7 +79362,7 @@ var NestedDropdownItem = /*#__PURE__*/React__default["default"].forwardRef(funct
79361
79362
  var children = props.children,
79362
79363
  rest = _objectWithoutProperties__default["default"](props, _excluded$5);
79363
79364
  var theme = useTheme$1();
79364
- var _useState = React.useState(false),
79365
+ var _useState = React.useState(defaultOpen),
79365
79366
  _useState2 = _slicedToArray__default["default"](_useState, 2),
79366
79367
  show = _useState2[0],
79367
79368
  setShow = _useState2[1];
@@ -79396,6 +79397,7 @@ var NestedDropdownItem = /*#__PURE__*/React__default["default"].forwardRef(funct
79396
79397
  }, rest), clonedChildren)));
79397
79398
  });
79398
79399
  NestedDropdownItem.defaultProps = {
79400
+ defaultOpen: false,
79399
79401
  /**
79400
79402
  * Animation use on nested items open/close
79401
79403
  */
@@ -79433,6 +79435,7 @@ NestedDropdownItem.defaultProps = {
79433
79435
  NestedDropdownItem.propTypes = {
79434
79436
  item: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].element]).isRequired,
79435
79437
  //--------------------------
79438
+ defaultOpen: PropTypes__default["default"].bool,
79436
79439
  animation: PropTypes__default["default"].object,
79437
79440
  className: PropTypes__default["default"].string,
79438
79441
  style: PropTypes__default["default"].object,
@@ -80025,7 +80028,7 @@ MenuItem.propTypes = {
80025
80028
  __TYPE__: PropTypes__default["default"].string
80026
80029
  };
80027
80030
 
80028
- var _excluded$1 = ["item", "onItemSelected", "tuckIn", "tuckInSize", "animation", "color", "size", "className", "style", "__TYPE__", "children"];
80031
+ var _excluded$1 = ["item", "onItemSelected", "defaultOpen", "tuckIn", "tuckInSize", "animation", "color", "size", "className", "style", "__TYPE__", "children"];
80029
80032
  var _templateObject$1;
80030
80033
  var StyledNested = newStyled(motion.div)(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral__default["default"](["\n ", "\n ", "\n ", "\n border-radius: 2px;\n"])), function (props) {
80031
80034
  return props.tuckIn == true && "margin-left: ".concat(props.tuckInSize, ";");
@@ -80037,6 +80040,7 @@ var StyledNested = newStyled(motion.div)(_templateObject$1 || (_templateObject$1
80037
80040
  var NestedMenuItem = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
80038
80041
  var item = props.item,
80039
80042
  onItemSelected = props.onItemSelected,
80043
+ defaultOpen = props.defaultOpen,
80040
80044
  tuckIn = props.tuckIn,
80041
80045
  tuckInSize = props.tuckInSize,
80042
80046
  animation = props.animation,
@@ -80048,7 +80052,7 @@ var NestedMenuItem = /*#__PURE__*/React__default["default"].forwardRef(function
80048
80052
  var children = props.children,
80049
80053
  rest = _objectWithoutProperties__default["default"](props, _excluded$1);
80050
80054
  var theme = useTheme$1();
80051
- var _useState = React.useState(false),
80055
+ var _useState = React.useState(defaultOpen),
80052
80056
  _useState2 = _slicedToArray__default["default"](_useState, 2),
80053
80057
  show = _useState2[0],
80054
80058
  setShow = _useState2[1];
@@ -80086,6 +80090,7 @@ var NestedMenuItem = /*#__PURE__*/React__default["default"].forwardRef(function
80086
80090
  }, animation, rest), clonedChildren)));
80087
80091
  });
80088
80092
  NestedMenuItem.defaultProps = {
80093
+ defaultOpen: false,
80089
80094
  tuckIn: true,
80090
80095
  tuckInSize: "0.3rem",
80091
80096
  /**
@@ -80125,6 +80130,7 @@ NestedMenuItem.defaultProps = {
80125
80130
  NestedMenuItem.propTypes = {
80126
80131
  item: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].element]).isRequired,
80127
80132
  //--------------------------
80133
+ defaultOpen: PropTypes__default["default"].bool,
80128
80134
  /**
80129
80135
  * Determines wether nested items will be tucked in to the right (using margin-right and padding-left).
80130
80136
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
3
  "type": "module",
4
- "version": "3.0.9",
4
+ "version": "3.1.0",
5
5
  "description": "component library",
6
6
  "main": "lib/index.js",
7
7
  "module": "lib/index.esm.js",