@lanaco/lnc-react-ui 3.11.3 → 3.11.5
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 +17 -9
- package/lib/index.js +17 -9
- package/package.json +2 -1
- package/{ +0 -0
package/lib/index.esm.js
CHANGED
|
@@ -47872,7 +47872,7 @@ var Button = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
47872
47872
|
return "".concat(style, " fa-").concat(icon, " fa-fw");
|
|
47873
47873
|
};
|
|
47874
47874
|
var renderIcon = function renderIcon() {
|
|
47875
|
-
return /*#__PURE__*/React__default.createElement(StyledIcon, {
|
|
47875
|
+
return /*#__PURE__*/React__default.isValidElement(icon) ? icon : /*#__PURE__*/React__default.createElement(StyledIcon, {
|
|
47876
47876
|
className: getIconClass()
|
|
47877
47877
|
});
|
|
47878
47878
|
};
|
|
@@ -47928,7 +47928,7 @@ var Button = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
47928
47928
|
}, rest), renderIcon());
|
|
47929
47929
|
});
|
|
47930
47930
|
Button.defaultProps = {
|
|
47931
|
-
icon:
|
|
47931
|
+
icon: null,
|
|
47932
47932
|
iconStyle: "solid",
|
|
47933
47933
|
borderRadius: "regular",
|
|
47934
47934
|
btnType: "filled",
|
|
@@ -47945,7 +47945,7 @@ Button.defaultProps = {
|
|
|
47945
47945
|
size: "small"
|
|
47946
47946
|
};
|
|
47947
47947
|
Button.propTypes = {
|
|
47948
|
-
icon: PropTypes.string,
|
|
47948
|
+
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
47949
47949
|
iconStyle: PropTypes.oneOf(["regular", "solid"]),
|
|
47950
47950
|
borderRadius: PropTypes.oneOf(["slight", "regular", "edged", "curved", "none"]),
|
|
47951
47951
|
/**
|
|
@@ -72934,7 +72934,8 @@ var PaginationContainer = newStyled.div(_templateObject2$c || (_templateObject2$
|
|
|
72934
72934
|
//========================================================================
|
|
72935
72935
|
|
|
72936
72936
|
var Pagination = function Pagination(props) {
|
|
72937
|
-
var
|
|
72937
|
+
var icons = props.icons,
|
|
72938
|
+
borderRadius = props.borderRadius,
|
|
72938
72939
|
currentPage = props.currentPage,
|
|
72939
72940
|
buttonType = props.buttonType,
|
|
72940
72941
|
currentPageButtonType = props.currentPageButtonType,
|
|
@@ -73034,25 +73035,25 @@ var Pagination = function Pagination(props) {
|
|
|
73034
73035
|
var br = {};
|
|
73035
73036
|
if (borderRadius) br.borderRadius = borderRadius;
|
|
73036
73037
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, withFirstLast && /*#__PURE__*/React__default.createElement(Button, _extends$4({}, themeProps, {
|
|
73037
|
-
icon: "angle-double-left",
|
|
73038
|
+
icon: icons.doubleLeft || "angle-double-left",
|
|
73038
73039
|
disabled: disabledFirst || disabled,
|
|
73039
73040
|
onClick: function onClick(e) {
|
|
73040
73041
|
return handlePageClick(e, "first");
|
|
73041
73042
|
}
|
|
73042
73043
|
}, br)), /*#__PURE__*/React__default.createElement(Button, _extends$4({}, themeProps, {
|
|
73043
|
-
icon: "angle-left",
|
|
73044
|
+
icon: icons.left || "angle-left",
|
|
73044
73045
|
disabled: disabledPrevious || disabled,
|
|
73045
73046
|
onClick: function onClick(e) {
|
|
73046
73047
|
return handlePageClick(e, "previous");
|
|
73047
73048
|
}
|
|
73048
73049
|
}, br)), renderPages(), /*#__PURE__*/React__default.createElement(Button, _extends$4({}, themeProps, {
|
|
73049
|
-
icon: "angle-right",
|
|
73050
|
+
icon: icons.right || "angle-right",
|
|
73050
73051
|
disabled: disabledNext || disabled,
|
|
73051
73052
|
onClick: function onClick(e) {
|
|
73052
73053
|
return handlePageClick(e, "next");
|
|
73053
73054
|
}
|
|
73054
73055
|
}, br)), withFirstLast && /*#__PURE__*/React__default.createElement(Button, _extends$4({}, themeProps, {
|
|
73055
|
-
icon: "angle-double-right",
|
|
73056
|
+
icon: icons.doubleRight || "angle-double-right",
|
|
73056
73057
|
disabled: disabledLast || disabled,
|
|
73057
73058
|
onClick: function onClick(e) {
|
|
73058
73059
|
return handlePageClick(e, "last");
|
|
@@ -73073,6 +73074,7 @@ var Pagination = function Pagination(props) {
|
|
|
73073
73074
|
}, renderButtons(borderRadius));
|
|
73074
73075
|
};
|
|
73075
73076
|
Pagination.defaultProps = {
|
|
73077
|
+
icons: {},
|
|
73076
73078
|
disabled: false,
|
|
73077
73079
|
borderRadius: "regular",
|
|
73078
73080
|
currentPage: 1,
|
|
@@ -73096,6 +73098,12 @@ Pagination.defaultProps = {
|
|
|
73096
73098
|
size: "small"
|
|
73097
73099
|
};
|
|
73098
73100
|
Pagination.propTypes = {
|
|
73101
|
+
icons: PropTypes.shape({
|
|
73102
|
+
left: PropTypes.element,
|
|
73103
|
+
right: PropTypes.element,
|
|
73104
|
+
doubleLeft: PropTypes.element,
|
|
73105
|
+
doubleRight: PropTypes.element
|
|
73106
|
+
}),
|
|
73099
73107
|
/**
|
|
73100
73108
|
* Applies to the movement buttons and to the page number buttons
|
|
73101
73109
|
*/
|
|
@@ -82859,7 +82867,7 @@ var MenuItem = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
82859
82867
|
onBlur(e);
|
|
82860
82868
|
};
|
|
82861
82869
|
var handleOnKeyDown = function handleOnKeyDown(e) {
|
|
82862
|
-
e.preventDefault(); //prevents scroll
|
|
82870
|
+
e.preventDefault(); // prevents scroll
|
|
82863
82871
|
|
|
82864
82872
|
if (e.key == "ArrowDown") {
|
|
82865
82873
|
focusNextItem(ref ? ref.current : itemRef.current);
|
package/lib/index.js
CHANGED
|
@@ -47921,7 +47921,7 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (props,
|
|
|
47921
47921
|
return "".concat(style, " fa-").concat(icon, " fa-fw");
|
|
47922
47922
|
};
|
|
47923
47923
|
var renderIcon = function renderIcon() {
|
|
47924
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledIcon, {
|
|
47924
|
+
return /*#__PURE__*/React__default["default"].isValidElement(icon) ? icon : /*#__PURE__*/React__default["default"].createElement(StyledIcon, {
|
|
47925
47925
|
className: getIconClass()
|
|
47926
47926
|
});
|
|
47927
47927
|
};
|
|
@@ -47977,7 +47977,7 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (props,
|
|
|
47977
47977
|
}, rest), renderIcon());
|
|
47978
47978
|
});
|
|
47979
47979
|
Button.defaultProps = {
|
|
47980
|
-
icon:
|
|
47980
|
+
icon: null,
|
|
47981
47981
|
iconStyle: "solid",
|
|
47982
47982
|
borderRadius: "regular",
|
|
47983
47983
|
btnType: "filled",
|
|
@@ -47994,7 +47994,7 @@ Button.defaultProps = {
|
|
|
47994
47994
|
size: "small"
|
|
47995
47995
|
};
|
|
47996
47996
|
Button.propTypes = {
|
|
47997
|
-
icon: PropTypes__default["default"].string,
|
|
47997
|
+
icon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].element]),
|
|
47998
47998
|
iconStyle: PropTypes__default["default"].oneOf(["regular", "solid"]),
|
|
47999
47999
|
borderRadius: PropTypes__default["default"].oneOf(["slight", "regular", "edged", "curved", "none"]),
|
|
48000
48000
|
/**
|
|
@@ -72983,7 +72983,8 @@ var PaginationContainer = newStyled.div(_templateObject2$c || (_templateObject2$
|
|
|
72983
72983
|
//========================================================================
|
|
72984
72984
|
|
|
72985
72985
|
var Pagination = function Pagination(props) {
|
|
72986
|
-
var
|
|
72986
|
+
var icons = props.icons,
|
|
72987
|
+
borderRadius = props.borderRadius,
|
|
72987
72988
|
currentPage = props.currentPage,
|
|
72988
72989
|
buttonType = props.buttonType,
|
|
72989
72990
|
currentPageButtonType = props.currentPageButtonType,
|
|
@@ -73083,25 +73084,25 @@ var Pagination = function Pagination(props) {
|
|
|
73083
73084
|
var br = {};
|
|
73084
73085
|
if (borderRadius) br.borderRadius = borderRadius;
|
|
73085
73086
|
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",
|
|
73087
|
+
icon: icons.doubleLeft || "angle-double-left",
|
|
73087
73088
|
disabled: disabledFirst || disabled,
|
|
73088
73089
|
onClick: function onClick(e) {
|
|
73089
73090
|
return handlePageClick(e, "first");
|
|
73090
73091
|
}
|
|
73091
73092
|
}, br)), /*#__PURE__*/React__default["default"].createElement(Button, _extends__default$1["default"]({}, themeProps, {
|
|
73092
|
-
icon: "angle-left",
|
|
73093
|
+
icon: icons.left || "angle-left",
|
|
73093
73094
|
disabled: disabledPrevious || disabled,
|
|
73094
73095
|
onClick: function onClick(e) {
|
|
73095
73096
|
return handlePageClick(e, "previous");
|
|
73096
73097
|
}
|
|
73097
73098
|
}, br)), renderPages(), /*#__PURE__*/React__default["default"].createElement(Button, _extends__default$1["default"]({}, themeProps, {
|
|
73098
|
-
icon: "angle-right",
|
|
73099
|
+
icon: icons.right || "angle-right",
|
|
73099
73100
|
disabled: disabledNext || disabled,
|
|
73100
73101
|
onClick: function onClick(e) {
|
|
73101
73102
|
return handlePageClick(e, "next");
|
|
73102
73103
|
}
|
|
73103
73104
|
}, br)), withFirstLast && /*#__PURE__*/React__default["default"].createElement(Button, _extends__default$1["default"]({}, themeProps, {
|
|
73104
|
-
icon: "angle-double-right",
|
|
73105
|
+
icon: icons.doubleRight || "angle-double-right",
|
|
73105
73106
|
disabled: disabledLast || disabled,
|
|
73106
73107
|
onClick: function onClick(e) {
|
|
73107
73108
|
return handlePageClick(e, "last");
|
|
@@ -73122,6 +73123,7 @@ var Pagination = function Pagination(props) {
|
|
|
73122
73123
|
}, renderButtons(borderRadius));
|
|
73123
73124
|
};
|
|
73124
73125
|
Pagination.defaultProps = {
|
|
73126
|
+
icons: {},
|
|
73125
73127
|
disabled: false,
|
|
73126
73128
|
borderRadius: "regular",
|
|
73127
73129
|
currentPage: 1,
|
|
@@ -73145,6 +73147,12 @@ Pagination.defaultProps = {
|
|
|
73145
73147
|
size: "small"
|
|
73146
73148
|
};
|
|
73147
73149
|
Pagination.propTypes = {
|
|
73150
|
+
icons: PropTypes__default["default"].shape({
|
|
73151
|
+
left: PropTypes__default["default"].element,
|
|
73152
|
+
right: PropTypes__default["default"].element,
|
|
73153
|
+
doubleLeft: PropTypes__default["default"].element,
|
|
73154
|
+
doubleRight: PropTypes__default["default"].element
|
|
73155
|
+
}),
|
|
73148
73156
|
/**
|
|
73149
73157
|
* Applies to the movement buttons and to the page number buttons
|
|
73150
73158
|
*/
|
|
@@ -82908,7 +82916,7 @@ var MenuItem = /*#__PURE__*/React__default["default"].forwardRef(function (props
|
|
|
82908
82916
|
onBlur(e);
|
|
82909
82917
|
};
|
|
82910
82918
|
var handleOnKeyDown = function handleOnKeyDown(e) {
|
|
82911
|
-
e.preventDefault(); //prevents scroll
|
|
82919
|
+
e.preventDefault(); // prevents scroll
|
|
82912
82920
|
|
|
82913
82921
|
if (e.key == "ArrowDown") {
|
|
82914
82922
|
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
|
+
"version": "3.11.5",
|
|
5
5
|
"description": "component library",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "lib/index.esm.js",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@storybook/react": "^6.5.9",
|
|
44
44
|
"@storybook/theming": "^6.5.9",
|
|
45
45
|
"babel-loader": "^8.2.2",
|
|
46
|
+
"cross-env": "^7.0.3",
|
|
46
47
|
"css-loader": "^5.2.6",
|
|
47
48
|
"eslint-plugin-react": "^7.24.0",
|
|
48
49
|
"jest": "^27.5.1",
|
package/{
DELETED
|
File without changes
|