@micromag/element-visual 0.2.375 → 0.2.390
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 +8 -5
- package/lib/index.js +8 -5
- package/package.json +5 -5
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
|
-
|
|
127
|
-
|
|
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
|
-
|
|
140
|
-
|
|
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.
|
|
3
|
+
"version": "0.2.390",
|
|
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.
|
|
54
|
-
"@micromag/element-image": "^0.2.
|
|
55
|
-
"@micromag/element-video": "^0.2.
|
|
53
|
+
"@micromag/core": "^0.2.386",
|
|
54
|
+
"@micromag/element-image": "^0.2.386",
|
|
55
|
+
"@micromag/element-video": "^0.2.386",
|
|
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": "
|
|
63
|
+
"gitHead": "cb4d507668b42099d0c9f9183afcdfd38395a419"
|
|
64
64
|
}
|