@lanaco/lnc-react-ui 3.11.4 → 3.11.6

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
@@ -45481,6 +45481,8 @@ var NumberInput = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
45481
45481
  disabled: disabled,
45482
45482
  readOnly: readOnly,
45483
45483
  step: step,
45484
+ min: min,
45485
+ max: max,
45484
45486
  defaultValue: defaultValue,
45485
45487
  onFocus: handleFocus,
45486
45488
  onBlur: handleBlur,
@@ -45498,6 +45500,8 @@ var NumberInput = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
45498
45500
  disabled: disabled,
45499
45501
  readOnly: readOnly,
45500
45502
  step: step,
45503
+ min: min,
45504
+ max: max,
45501
45505
  value: inputValue,
45502
45506
  onFocus: handleFocus,
45503
45507
  onBlur: handleBlur,
@@ -47872,7 +47876,7 @@ var Button = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
47872
47876
  return "".concat(style, " fa-").concat(icon, " fa-fw");
47873
47877
  };
47874
47878
  var renderIcon = function renderIcon() {
47875
- return /*#__PURE__*/React__default.createElement(StyledIcon, {
47879
+ return /*#__PURE__*/React__default.isValidElement(icon) ? icon : /*#__PURE__*/React__default.createElement(StyledIcon, {
47876
47880
  className: getIconClass()
47877
47881
  });
47878
47882
  };
@@ -47928,7 +47932,7 @@ var Button = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
47928
47932
  }, rest), renderIcon());
47929
47933
  });
47930
47934
  Button.defaultProps = {
47931
- icon: "",
47935
+ icon: null,
47932
47936
  iconStyle: "solid",
47933
47937
  borderRadius: "regular",
47934
47938
  btnType: "filled",
@@ -47945,7 +47949,7 @@ Button.defaultProps = {
47945
47949
  size: "small"
47946
47950
  };
47947
47951
  Button.propTypes = {
47948
- icon: PropTypes.string,
47952
+ icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
47949
47953
  iconStyle: PropTypes.oneOf(["regular", "solid"]),
47950
47954
  borderRadius: PropTypes.oneOf(["slight", "regular", "edged", "curved", "none"]),
47951
47955
  /**
@@ -72934,7 +72938,8 @@ var PaginationContainer = newStyled.div(_templateObject2$c || (_templateObject2$
72934
72938
  //========================================================================
72935
72939
 
72936
72940
  var Pagination = function Pagination(props) {
72937
- var borderRadius = props.borderRadius,
72941
+ var icons = props.icons,
72942
+ borderRadius = props.borderRadius,
72938
72943
  currentPage = props.currentPage,
72939
72944
  buttonType = props.buttonType,
72940
72945
  currentPageButtonType = props.currentPageButtonType,
@@ -73034,25 +73039,25 @@ var Pagination = function Pagination(props) {
73034
73039
  var br = {};
73035
73040
  if (borderRadius) br.borderRadius = borderRadius;
73036
73041
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, withFirstLast && /*#__PURE__*/React__default.createElement(Button, _extends$4({}, themeProps, {
73037
- icon: "angle-double-left",
73042
+ icon: icons.doubleLeft || "angle-double-left",
73038
73043
  disabled: disabledFirst || disabled,
73039
73044
  onClick: function onClick(e) {
73040
73045
  return handlePageClick(e, "first");
73041
73046
  }
73042
73047
  }, br)), /*#__PURE__*/React__default.createElement(Button, _extends$4({}, themeProps, {
73043
- icon: "angle-left",
73048
+ icon: icons.left || "angle-left",
73044
73049
  disabled: disabledPrevious || disabled,
73045
73050
  onClick: function onClick(e) {
73046
73051
  return handlePageClick(e, "previous");
73047
73052
  }
73048
73053
  }, br)), renderPages(), /*#__PURE__*/React__default.createElement(Button, _extends$4({}, themeProps, {
73049
- icon: "angle-right",
73054
+ icon: icons.right || "angle-right",
73050
73055
  disabled: disabledNext || disabled,
73051
73056
  onClick: function onClick(e) {
73052
73057
  return handlePageClick(e, "next");
73053
73058
  }
73054
73059
  }, br)), withFirstLast && /*#__PURE__*/React__default.createElement(Button, _extends$4({}, themeProps, {
73055
- icon: "angle-double-right",
73060
+ icon: icons.doubleRight || "angle-double-right",
73056
73061
  disabled: disabledLast || disabled,
73057
73062
  onClick: function onClick(e) {
73058
73063
  return handlePageClick(e, "last");
@@ -73073,6 +73078,7 @@ var Pagination = function Pagination(props) {
73073
73078
  }, renderButtons(borderRadius));
73074
73079
  };
73075
73080
  Pagination.defaultProps = {
73081
+ icons: {},
73076
73082
  disabled: false,
73077
73083
  borderRadius: "regular",
73078
73084
  currentPage: 1,
@@ -73096,6 +73102,12 @@ Pagination.defaultProps = {
73096
73102
  size: "small"
73097
73103
  };
73098
73104
  Pagination.propTypes = {
73105
+ icons: PropTypes.shape({
73106
+ left: PropTypes.element,
73107
+ right: PropTypes.element,
73108
+ doubleLeft: PropTypes.element,
73109
+ doubleRight: PropTypes.element
73110
+ }),
73099
73111
  /**
73100
73112
  * Applies to the movement buttons and to the page number buttons
73101
73113
  */
@@ -82859,7 +82871,7 @@ var MenuItem = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
82859
82871
  onBlur(e);
82860
82872
  };
82861
82873
  var handleOnKeyDown = function handleOnKeyDown(e) {
82862
- if (['Space', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].indexOf(e.code) > -1) e.preventDefault(); // prevents scroll
82874
+ e.preventDefault(); // prevents scroll
82863
82875
 
82864
82876
  if (e.key == "ArrowDown") {
82865
82877
  focusNextItem(ref ? ref.current : itemRef.current);
package/lib/index.js CHANGED
@@ -45530,6 +45530,8 @@ var NumberInput = /*#__PURE__*/React__default["default"].forwardRef(function (pr
45530
45530
  disabled: disabled,
45531
45531
  readOnly: readOnly,
45532
45532
  step: step,
45533
+ min: min,
45534
+ max: max,
45533
45535
  defaultValue: defaultValue,
45534
45536
  onFocus: handleFocus,
45535
45537
  onBlur: handleBlur,
@@ -45547,6 +45549,8 @@ var NumberInput = /*#__PURE__*/React__default["default"].forwardRef(function (pr
45547
45549
  disabled: disabled,
45548
45550
  readOnly: readOnly,
45549
45551
  step: step,
45552
+ min: min,
45553
+ max: max,
45550
45554
  value: inputValue,
45551
45555
  onFocus: handleFocus,
45552
45556
  onBlur: handleBlur,
@@ -47921,7 +47925,7 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (props,
47921
47925
  return "".concat(style, " fa-").concat(icon, " fa-fw");
47922
47926
  };
47923
47927
  var renderIcon = function renderIcon() {
47924
- return /*#__PURE__*/React__default["default"].createElement(StyledIcon, {
47928
+ return /*#__PURE__*/React__default["default"].isValidElement(icon) ? icon : /*#__PURE__*/React__default["default"].createElement(StyledIcon, {
47925
47929
  className: getIconClass()
47926
47930
  });
47927
47931
  };
@@ -47977,7 +47981,7 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (props,
47977
47981
  }, rest), renderIcon());
47978
47982
  });
47979
47983
  Button.defaultProps = {
47980
- icon: "",
47984
+ icon: null,
47981
47985
  iconStyle: "solid",
47982
47986
  borderRadius: "regular",
47983
47987
  btnType: "filled",
@@ -47994,7 +47998,7 @@ Button.defaultProps = {
47994
47998
  size: "small"
47995
47999
  };
47996
48000
  Button.propTypes = {
47997
- icon: PropTypes__default["default"].string,
48001
+ icon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].element]),
47998
48002
  iconStyle: PropTypes__default["default"].oneOf(["regular", "solid"]),
47999
48003
  borderRadius: PropTypes__default["default"].oneOf(["slight", "regular", "edged", "curved", "none"]),
48000
48004
  /**
@@ -72983,7 +72987,8 @@ var PaginationContainer = newStyled.div(_templateObject2$c || (_templateObject2$
72983
72987
  //========================================================================
72984
72988
 
72985
72989
  var Pagination = function Pagination(props) {
72986
- var borderRadius = props.borderRadius,
72990
+ var icons = props.icons,
72991
+ borderRadius = props.borderRadius,
72987
72992
  currentPage = props.currentPage,
72988
72993
  buttonType = props.buttonType,
72989
72994
  currentPageButtonType = props.currentPageButtonType,
@@ -73083,25 +73088,25 @@ var Pagination = function Pagination(props) {
73083
73088
  var br = {};
73084
73089
  if (borderRadius) br.borderRadius = borderRadius;
73085
73090
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, withFirstLast && /*#__PURE__*/React__default["default"].createElement(Button, _extends__default$1["default"]({}, themeProps, {
73086
- icon: "angle-double-left",
73091
+ icon: icons.doubleLeft || "angle-double-left",
73087
73092
  disabled: disabledFirst || disabled,
73088
73093
  onClick: function onClick(e) {
73089
73094
  return handlePageClick(e, "first");
73090
73095
  }
73091
73096
  }, br)), /*#__PURE__*/React__default["default"].createElement(Button, _extends__default$1["default"]({}, themeProps, {
73092
- icon: "angle-left",
73097
+ icon: icons.left || "angle-left",
73093
73098
  disabled: disabledPrevious || disabled,
73094
73099
  onClick: function onClick(e) {
73095
73100
  return handlePageClick(e, "previous");
73096
73101
  }
73097
73102
  }, br)), renderPages(), /*#__PURE__*/React__default["default"].createElement(Button, _extends__default$1["default"]({}, themeProps, {
73098
- icon: "angle-right",
73103
+ icon: icons.right || "angle-right",
73099
73104
  disabled: disabledNext || disabled,
73100
73105
  onClick: function onClick(e) {
73101
73106
  return handlePageClick(e, "next");
73102
73107
  }
73103
73108
  }, br)), withFirstLast && /*#__PURE__*/React__default["default"].createElement(Button, _extends__default$1["default"]({}, themeProps, {
73104
- icon: "angle-double-right",
73109
+ icon: icons.doubleRight || "angle-double-right",
73105
73110
  disabled: disabledLast || disabled,
73106
73111
  onClick: function onClick(e) {
73107
73112
  return handlePageClick(e, "last");
@@ -73122,6 +73127,7 @@ var Pagination = function Pagination(props) {
73122
73127
  }, renderButtons(borderRadius));
73123
73128
  };
73124
73129
  Pagination.defaultProps = {
73130
+ icons: {},
73125
73131
  disabled: false,
73126
73132
  borderRadius: "regular",
73127
73133
  currentPage: 1,
@@ -73145,6 +73151,12 @@ Pagination.defaultProps = {
73145
73151
  size: "small"
73146
73152
  };
73147
73153
  Pagination.propTypes = {
73154
+ icons: PropTypes__default["default"].shape({
73155
+ left: PropTypes__default["default"].element,
73156
+ right: PropTypes__default["default"].element,
73157
+ doubleLeft: PropTypes__default["default"].element,
73158
+ doubleRight: PropTypes__default["default"].element
73159
+ }),
73148
73160
  /**
73149
73161
  * Applies to the movement buttons and to the page number buttons
73150
73162
  */
@@ -82908,7 +82920,7 @@ var MenuItem = /*#__PURE__*/React__default["default"].forwardRef(function (props
82908
82920
  onBlur(e);
82909
82921
  };
82910
82922
  var handleOnKeyDown = function handleOnKeyDown(e) {
82911
- if (['Space', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].indexOf(e.code) > -1) e.preventDefault(); // prevents scroll
82923
+ e.preventDefault(); // prevents scroll
82912
82924
 
82913
82925
  if (e.key == "ArrowDown") {
82914
82926
  focusNextItem(ref ? ref.current : itemRef.current);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
3
  "type": "module",
4
- "version": "3.11.4",
4
+ "version": "3.11.6",
5
5
  "description": "component library",
6
6
  "main": "lib/index.js",
7
7
  "module": "lib/index.esm.js",