@plesk/ui-library 3.28.1 → 3.28.2

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.
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  // Copyright 1999-2020. Plesk International GmbH. All rights reserved.
3
3
 
4
4
  /* eslint-disable react/no-deprecated */
5
- import React, { cloneElement, isValidElement, useContext, useState } from 'react';
5
+ import React, { cloneElement, forwardRef, isValidElement, useContext, useState } from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import classNames from 'classnames';
8
8
  import { CLS_PREFIX } from '../../constants';
@@ -72,7 +72,7 @@ const renderCaret = ({
72
72
  */
73
73
 
74
74
 
75
- const Button = ({
75
+ const Button = /*#__PURE__*/forwardRef(({
76
76
  baseClassName,
77
77
  className,
78
78
  component: Tag,
@@ -90,7 +90,7 @@ const Button = ({
90
90
  arrow,
91
91
  disabled,
92
92
  ...props
93
- }) => {
93
+ }, ref) => {
94
94
  const [selectedState, setSelectedState] = useState(false);
95
95
 
96
96
  const handleToggle = () => {
@@ -145,6 +145,7 @@ const Button = ({
145
145
  const isArrowButton = arrow === 'forward' || arrow === 'backward';
146
146
  const hasAriaDisabled = Tag === 'button' && disabled && tooltip;
147
147
  let button = /*#__PURE__*/React.createElement(Tag, _extends({
148
+ ref: ref,
148
149
  className: classNames(baseClassName, {
149
150
  [`${baseClassName}--${size}`]: size,
150
151
  [`${baseClassName}--${intent}`]: intent && !ghost,
@@ -184,8 +185,8 @@ const Button = ({
184
185
  }
185
186
 
186
187
  return button;
187
- };
188
-
188
+ });
189
+ Button.displayName = 'Button';
189
190
  Button.propTypes = {
190
191
  /**
191
192
  * Button size.
@@ -279,7 +280,12 @@ Button.propTypes = {
279
280
  /**
280
281
  * @ignore
281
282
  */
282
- baseClassName: PropTypes.string
283
+ baseClassName: PropTypes.string,
284
+
285
+ /**
286
+ * @ignore
287
+ */
288
+ onClick: PropTypes.func
283
289
  };
284
290
  Button.defaultProps = {
285
291
  size: undefined,
@@ -297,6 +303,7 @@ Button.defaultProps = {
297
303
  component: 'button',
298
304
  className: undefined,
299
305
  baseClassName: `${CLS_PREFIX}button`,
300
- arrow: undefined
306
+ arrow: undefined,
307
+ onClick: undefined
301
308
  };
302
309
  export default Button;
@@ -875,14 +875,9 @@ class List extends Component {
875
875
 
876
876
  if (totalRows && /*#__PURE__*/isValidElement(pagination)) {
877
877
  const {
878
- itemsPerPageOptions = ITEMS_PER_PAGE_OPTIONS,
879
- itemsPerPage
878
+ itemsPerPageOptions = ITEMS_PER_PAGE_OPTIONS
880
879
  } = pagination.props;
881
880
 
882
- if (Number.isInteger(itemsPerPage)) {
883
- return totalRows > itemsPerPage;
884
- }
885
-
886
881
  if (Array.isArray(itemsPerPageOptions)) {
887
882
  const numericOptions = itemsPerPageOptions.filter(v => Number(v) === v);
888
883
 
@@ -98,4 +98,5 @@ export { default as Tour } from './Tour';
98
98
  export { default as Translate } from './Translate';
99
99
  export { default as Link } from './Link';
100
100
  export { default as Skeleton } from './Skeleton';
101
- export * from './Skeleton';
101
+ export * from './Skeleton';
102
+ export { PortalContext } from './Layer';
package/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Copyright 1999-2018. Plesk International GmbH. All rights reserved.
2
2
  import svg4everybody from 'svg4everybody';
3
- const version = "3.28.1";
3
+ const version = "3.28.2";
4
4
  export * from './publicPath';
5
5
  export { version };
6
6
  export * from './utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plesk/ui-library",
3
- "version": "3.28.1",
3
+ "version": "3.28.2",
4
4
  "description": "Plesk UI Library",
5
5
  "main": "index.js",
6
6
  "module": "esm/index.js",