@micromag/element-container 0.3.420 → 0.3.429

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/lib/index.js +10 -17
  2. package/package.json +9 -3
package/lib/index.js CHANGED
@@ -5,23 +5,16 @@ var classNames = require('classnames');
5
5
  var PropTypes = require('prop-types');
6
6
  var React = require('react');
7
7
 
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
-
10
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
11
- var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
12
- var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
13
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
-
15
8
  var styles = {"container":"micromag-element-container-container"};
16
9
 
17
10
  var propTypes = {
18
- containerRef: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].shape({
19
- current: PropTypes__default["default"].any
11
+ containerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
12
+ current: PropTypes.any
20
13
  })]),
21
- width: PropTypes__default["default"].number.isRequired,
22
- height: PropTypes__default["default"].number.isRequired,
23
- className: PropTypes__default["default"].string,
24
- children: PropTypes__default["default"].node
14
+ width: PropTypes.number.isRequired,
15
+ height: PropTypes.number.isRequired,
16
+ className: PropTypes.string,
17
+ children: PropTypes.node
25
18
  };
26
19
  var defaultProps = {
27
20
  containerRef: null,
@@ -39,16 +32,16 @@ function Container(_ref) {
39
32
  width: width,
40
33
  height: height
41
34
  } : null;
42
- return /*#__PURE__*/React__default["default"].createElement("div", {
35
+ return /*#__PURE__*/React.createElement("div", {
43
36
  ref: containerRef,
44
- className: classNames__default["default"]([styles.container, _defineProperty__default["default"]({}, className, className !== null)]),
37
+ className: classNames([styles.container, _defineProperty({}, className, className !== null)]),
45
38
  style: containerStyle
46
39
  }, children);
47
40
  }
48
41
  Container.propTypes = propTypes;
49
42
  Container.defaultProps = defaultProps;
50
- var Container$1 = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
51
- return /*#__PURE__*/React__default["default"].createElement(Container, Object.assign({
43
+ var Container$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
44
+ return /*#__PURE__*/React.createElement(Container, Object.assign({
52
45
  containerRef: ref
53
46
  }, props));
54
47
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-container",
3
- "version": "0.3.420",
3
+ "version": "0.3.429",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -32,6 +32,12 @@
32
32
  "license": "ISC",
33
33
  "main": "lib/index.js",
34
34
  "module": "es/index.js",
35
+ "exports": {
36
+ ".": {
37
+ "require": "./lib/index.js",
38
+ "import": "./es/index.js"
39
+ }
40
+ },
35
41
  "files": [
36
42
  "lib",
37
43
  "es",
@@ -50,7 +56,7 @@
50
56
  },
51
57
  "dependencies": {
52
58
  "@babel/runtime": "^7.13.10",
53
- "@micromag/core": "^0.3.420",
59
+ "@micromag/core": "^0.3.429",
54
60
  "classnames": "^2.2.6",
55
61
  "lodash": "^4.17.21",
56
62
  "prop-types": "^15.7.2",
@@ -61,5 +67,5 @@
61
67
  "access": "public",
62
68
  "registry": "https://registry.npmjs.org/"
63
69
  },
64
- "gitHead": "5b0f037a41c3bca07a5bce8f0dce205242f7ad17"
70
+ "gitHead": "f15e72b88ecfda4c54b87626513149b58572c52b"
65
71
  }