@micromag/element-visual 0.2.379 → 0.2.391

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/es/index.js CHANGED
@@ -11,7 +11,7 @@ import Video from '@micromag/element-video';
11
11
 
12
12
  var styles = {"container":"micromag-element-visual-container","videoContainer":"micromag-element-visual-videoContainer"};
13
13
 
14
- var _excluded = ["media", "width", "height", "objectFit", "playing", "videoLoop", "videoInitialMuted", "onLoaded", "className"];
14
+ var _excluded = ["media", "width", "height", "objectFit", "playing", "videoLoop", "videoInitialMuted", "onLoaded", "className", "videoClassName"];
15
15
  var propTypes = {
16
16
  media: PropTypes.media,
17
17
  width: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
@@ -21,7 +21,8 @@ var propTypes = {
21
21
  videoLoop: PropTypes$1.bool,
22
22
  videoInitialMuted: PropTypes$1.bool,
23
23
  onLoaded: PropTypes$1.func,
24
- className: PropTypes$1.string
24
+ className: PropTypes$1.string,
25
+ videoClassName: PropTypes$1.string
25
26
  };
26
27
  var defaultProps = {
27
28
  media: null,
@@ -32,7 +33,8 @@ var defaultProps = {
32
33
  videoLoop: true,
33
34
  videoInitialMuted: true,
34
35
  onLoaded: null,
35
- className: null
36
+ className: null,
37
+ videoClassName: null
36
38
  };
37
39
 
38
40
  var Visual = function Visual(_ref) {
@@ -45,6 +47,7 @@ var Visual = function Visual(_ref) {
45
47
  videoInitialMuted = _ref.videoInitialMuted,
46
48
  onLoaded = _ref.onLoaded,
47
49
  className = _ref.className,
50
+ videoClassName = _ref.videoClassName,
48
51
  props = _objectWithoutProperties(_ref, _excluded);
49
52
 
50
53
  var _ref2 = media || {},
@@ -123,8 +126,8 @@ var Visual = function Visual(_ref) {
123
126
  height: height
124
127
  }
125
128
  }, /*#__PURE__*/React.createElement("div", {
126
- style: videoContainerStyle,
127
- className: styles.videoContainer
129
+ className: classNames([styles.videoContainer, _defineProperty({}, videoClassName, videoClassName !== null)]),
130
+ style: videoContainerStyle
128
131
  }, /*#__PURE__*/React.createElement(Video, Object.assign({}, elProps, {
129
132
  width: objectFit === null ? width : null,
130
133
  height: objectFit === null ? height : null,
package/lib/index.js CHANGED
@@ -24,7 +24,7 @@ var Video__default = /*#__PURE__*/_interopDefaultLegacy(Video);
24
24
 
25
25
  var styles = {"container":"micromag-element-visual-container","videoContainer":"micromag-element-visual-videoContainer"};
26
26
 
27
- var _excluded = ["media", "width", "height", "objectFit", "playing", "videoLoop", "videoInitialMuted", "onLoaded", "className"];
27
+ var _excluded = ["media", "width", "height", "objectFit", "playing", "videoLoop", "videoInitialMuted", "onLoaded", "className", "videoClassName"];
28
28
  var propTypes = {
29
29
  media: core.PropTypes.media,
30
30
  width: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
@@ -34,7 +34,8 @@ var propTypes = {
34
34
  videoLoop: PropTypes__default["default"].bool,
35
35
  videoInitialMuted: PropTypes__default["default"].bool,
36
36
  onLoaded: PropTypes__default["default"].func,
37
- className: PropTypes__default["default"].string
37
+ className: PropTypes__default["default"].string,
38
+ videoClassName: PropTypes__default["default"].string
38
39
  };
39
40
  var defaultProps = {
40
41
  media: null,
@@ -45,7 +46,8 @@ var defaultProps = {
45
46
  videoLoop: true,
46
47
  videoInitialMuted: true,
47
48
  onLoaded: null,
48
- className: null
49
+ className: null,
50
+ videoClassName: null
49
51
  };
50
52
 
51
53
  var Visual = function Visual(_ref) {
@@ -58,6 +60,7 @@ var Visual = function Visual(_ref) {
58
60
  videoInitialMuted = _ref.videoInitialMuted,
59
61
  onLoaded = _ref.onLoaded,
60
62
  className = _ref.className,
63
+ videoClassName = _ref.videoClassName,
61
64
  props = _objectWithoutProperties__default["default"](_ref, _excluded);
62
65
 
63
66
  var _ref2 = media || {},
@@ -136,8 +139,8 @@ var Visual = function Visual(_ref) {
136
139
  height: height
137
140
  }
138
141
  }, /*#__PURE__*/React__default["default"].createElement("div", {
139
- style: videoContainerStyle,
140
- className: styles.videoContainer
142
+ className: classNames__default["default"]([styles.videoContainer, _defineProperty__default["default"]({}, videoClassName, videoClassName !== null)]),
143
+ style: videoContainerStyle
141
144
  }, /*#__PURE__*/React__default["default"].createElement(Video__default["default"], Object.assign({}, elProps, {
142
145
  width: objectFit === null ? width : null,
143
146
  height: objectFit === null ? height : null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-visual",
3
- "version": "0.2.379",
3
+ "version": "0.2.391",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -50,9 +50,9 @@
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
52
  "@folklore/size": "^0.1.15",
53
- "@micromag/core": "^0.2.379",
54
- "@micromag/element-image": "^0.2.379",
55
- "@micromag/element-video": "^0.2.379",
53
+ "@micromag/core": "^0.2.391",
54
+ "@micromag/element-image": "^0.2.391",
55
+ "@micromag/element-video": "^0.2.391",
56
56
  "classnames": "^2.2.6",
57
57
  "prop-types": "^15.7.2",
58
58
  "uuid": "^8.3.2"
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "b3261cde1fac196f335a2f2b3091494919dd62b2"
63
+ "gitHead": "8136754d570e4fc8c1bb9c89f8635279f252e89f"
64
64
  }