@panneau/element-range 3.0.307 → 4.0.1

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.
Files changed (2) hide show
  1. package/es/index.js +11 -23
  2. package/package.json +4 -4
package/es/index.js CHANGED
@@ -1,32 +1,22 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import classNames from 'classnames';
3
- import PropTypes from 'prop-types';
4
3
  import React, { useCallback } from 'react';
5
4
 
6
5
  var styles = {"container":"panneau-element-range-container"};
7
6
 
8
- var propTypes = {
9
- title: PropTypes.string,
10
- max: PropTypes.number,
11
- value: PropTypes.value,
12
- onChange: PropTypes.func.isRequired,
13
- className: PropTypes.string
14
- };
15
- var defaultProps = {
16
- title: null,
17
- value: 50,
18
- max: 100,
19
- className: null
20
- };
21
- var Range = function Range(_ref) {
22
- var title = _ref.title,
23
- value = _ref.value,
7
+ function Range(_ref) {
8
+ var _ref$title = _ref.title,
9
+ title = _ref$title === void 0 ? null : _ref$title,
10
+ _ref$value = _ref.value,
11
+ value = _ref$value === void 0 ? 50 : _ref$value,
24
12
  onChange = _ref.onChange,
25
- max = _ref.max,
26
- className = _ref.className;
13
+ _ref$max = _ref.max,
14
+ max = _ref$max === void 0 ? 100 : _ref$max,
15
+ _ref$className = _ref.className,
16
+ className = _ref$className === void 0 ? null : _ref$className;
27
17
  var onValueChange = useCallback(function (e) {
28
18
  onChange(e.target.value);
29
- }, [max]);
19
+ }, [onChange, max]);
30
20
  return /*#__PURE__*/React.createElement("div", {
31
21
  className: classNames([styles.container, _defineProperty({}, className, className !== null)])
32
22
  }, /*#__PURE__*/React.createElement("h4", null, /*#__PURE__*/React.createElement("label", {
@@ -41,8 +31,6 @@ var Range = function Range(_ref) {
41
31
  onChange: onValueChange,
42
32
  value: value
43
33
  }));
44
- };
45
- Range.propTypes = propTypes;
46
- Range.defaultProps = defaultProps;
34
+ }
47
35
 
48
36
  export { Range as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/element-range",
3
- "version": "3.0.307",
3
+ "version": "4.0.1",
4
4
  "description": "Range element",
5
5
  "keywords": [
6
6
  "javascript"
@@ -59,13 +59,13 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@babel/runtime": "^7.12.5",
62
- "@panneau/core": "^3.0.307",
62
+ "@panneau/core": "^4.0.1",
63
63
  "classnames": "^2.5.1",
64
64
  "prop-types": "^15.7.2",
65
- "react-intl": "^5.15.8||^6.0.0"
65
+ "react-intl": "^5.15.8 || ^6.0.0 || ^7.0.0"
66
66
  },
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "cbe5e8b1705d01c5653a4df617a06243344310d3"
70
+ "gitHead": "dbdf65640625c027ecd56cf2b816b80a5c38cb8d"
71
71
  }