@micromag/screen-slideshow 0.3.246 → 0.3.251

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.
@@ -1 +1 @@
1
- .micromag-screen-slideshow-container .micromag-screen-slideshow-background,.micromag-screen-slideshow-container .micromag-screen-slideshow-inner{position:absolute;top:0;left:0;width:100%;height:100%}.micromag-screen-slideshow-container{position:relative;width:100%;height:100%;overflow:hidden}.micromag-screen-slideshow-disabled.micromag-screen-slideshow-container{overflow:hidden;pointer-events:none}.micromag-screen-slideshow-hidden.micromag-screen-slideshow-container{display:none;visibility:hidden}.micromag-screen-slideshow-placeholder.micromag-screen-slideshow-container .micromag-screen-slideshow-content{position:relative;padding:6px}.micromag-screen-slideshow-container .micromag-screen-slideshow-background{z-index:0}.micromag-screen-slideshow-container .micromag-screen-slideshow-content{z-index:1}
1
+ .micromag-screen-slideshow-container .micromag-screen-slideshow-content{position:absolute;top:0;left:0;width:100%;height:100%}.micromag-screen-slideshow-container{position:relative;width:100%;height:100%;overflow:hidden}.micromag-screen-slideshow-disabled.micromag-screen-slideshow-container{overflow:hidden;pointer-events:none}.micromag-screen-slideshow-hidden.micromag-screen-slideshow-container{display:none;visibility:hidden}.micromag-screen-slideshow-placeholder.micromag-screen-slideshow-container .micromag-screen-slideshow-content{position:relative;padding:6px}
package/es/index.js CHANGED
@@ -15,7 +15,7 @@ import Container from '@micromag/element-container';
15
15
  import Text from '@micromag/element-text';
16
16
  import Visual from '@micromag/element-visual';
17
17
 
18
- var styles = {"container":"micromag-screen-slideshow-container","background":"micromag-screen-slideshow-background","inner":"micromag-screen-slideshow-inner","disabled":"micromag-screen-slideshow-disabled","hidden":"micromag-screen-slideshow-hidden","placeholder":"micromag-screen-slideshow-placeholder","content":"micromag-screen-slideshow-content"};
18
+ var styles = {"container":"micromag-screen-slideshow-container","content":"micromag-screen-slideshow-content","disabled":"micromag-screen-slideshow-disabled","hidden":"micromag-screen-slideshow-hidden","placeholder":"micromag-screen-slideshow-placeholder"};
19
19
 
20
20
  var propTypes = {
21
21
  layout: PropTypes.oneOf(['top', 'middle', 'bottom']),
@@ -156,7 +156,6 @@ var SlideshowScreen = function SlideshowScreen(_ref) {
156
156
  },
157
157
  playing: backgroundPlaying,
158
158
  active: active,
159
- withoutVideo: isPreview,
160
159
  onLoaded: onImageLoaded
161
160
  })) : null))), withCaptions ? /*#__PURE__*/React.createElement(Transitions, {
162
161
  transitions: transitions,
@@ -184,14 +183,20 @@ var SlideshowScreen = function SlideshowScreen(_ref) {
184
183
  return /*#__PURE__*/React.createElement("div", {
185
184
  className: classNames([styles.container, (_ref3 = {}, _defineProperty(_ref3, className, className !== null), _defineProperty(_ref3, styles.isPlaceholder, isPlaceholder), _ref3)]),
186
185
  "data-screen-ready": ready
187
- }, /*#__PURE__*/React.createElement(Container, {
186
+ }, !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
187
+ background: background,
188
188
  width: width,
189
189
  height: height,
190
- className: styles.content
190
+ resolution: resolution,
191
+ playing: backgroundPlaying,
192
+ shouldLoad: mediaShouldLoad
193
+ }) : null, /*#__PURE__*/React.createElement(Container, {
194
+ width: width,
195
+ height: height
191
196
  }, /*#__PURE__*/React.createElement("div", {
192
- className: styles.inner,
197
+ className: styles.content,
193
198
  style: {
194
- paddingTop: !isPreview ? viewerTopHeight : null,
199
+ paddingTop: current && !isPreview ? viewerTopHeight : null,
195
200
  paddingBottom: (hasCallToAction ? callToActionHeight - finalSpacing : 0) + (current && !isPreview ? viewerBottomHeight : 0)
196
201
  }
197
202
  }, items, !isPlaceholder && hasCallToAction ? /*#__PURE__*/React.createElement("div", {
@@ -210,16 +215,7 @@ var SlideshowScreen = function SlideshowScreen(_ref) {
210
215
  },
211
216
  enableInteraction: enableInteraction,
212
217
  disableInteraction: disableInteraction
213
- })) : null)), !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
214
- background: background,
215
- width: width,
216
- height: height,
217
- resolution: resolution,
218
- playing: backgroundPlaying,
219
- shouldLoad: mediaShouldLoad,
220
- withoutVideo: isPreview,
221
- className: styles.background
222
- }) : null);
218
+ })) : null)));
223
219
  };
224
220
 
225
221
  SlideshowScreen.propTypes = propTypes;
package/lib/index.js CHANGED
@@ -32,7 +32,7 @@ var Container__default = /*#__PURE__*/_interopDefaultLegacy(Container);
32
32
  var Text__default = /*#__PURE__*/_interopDefaultLegacy(Text);
33
33
  var Visual__default = /*#__PURE__*/_interopDefaultLegacy(Visual);
34
34
 
35
- var styles = {"container":"micromag-screen-slideshow-container","background":"micromag-screen-slideshow-background","inner":"micromag-screen-slideshow-inner","disabled":"micromag-screen-slideshow-disabled","hidden":"micromag-screen-slideshow-hidden","placeholder":"micromag-screen-slideshow-placeholder","content":"micromag-screen-slideshow-content"};
35
+ var styles = {"container":"micromag-screen-slideshow-container","content":"micromag-screen-slideshow-content","disabled":"micromag-screen-slideshow-disabled","hidden":"micromag-screen-slideshow-hidden","placeholder":"micromag-screen-slideshow-placeholder"};
36
36
 
37
37
  var propTypes = {
38
38
  layout: PropTypes__default["default"].oneOf(['top', 'middle', 'bottom']),
@@ -173,7 +173,6 @@ var SlideshowScreen = function SlideshowScreen(_ref) {
173
173
  },
174
174
  playing: backgroundPlaying,
175
175
  active: active,
176
- withoutVideo: isPreview,
177
176
  onLoaded: onImageLoaded
178
177
  })) : null))), withCaptions ? /*#__PURE__*/React__default["default"].createElement(components.Transitions, {
179
178
  transitions: transitions,
@@ -201,14 +200,20 @@ var SlideshowScreen = function SlideshowScreen(_ref) {
201
200
  return /*#__PURE__*/React__default["default"].createElement("div", {
202
201
  className: classNames__default["default"]([styles.container, (_ref3 = {}, _defineProperty__default["default"](_ref3, className, className !== null), _defineProperty__default["default"](_ref3, styles.isPlaceholder, isPlaceholder), _ref3)]),
203
202
  "data-screen-ready": ready
204
- }, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
203
+ }, !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
204
+ background: background,
205
205
  width: width,
206
206
  height: height,
207
- className: styles.content
207
+ resolution: resolution,
208
+ playing: backgroundPlaying,
209
+ shouldLoad: mediaShouldLoad
210
+ }) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
211
+ width: width,
212
+ height: height
208
213
  }, /*#__PURE__*/React__default["default"].createElement("div", {
209
- className: styles.inner,
214
+ className: styles.content,
210
215
  style: {
211
- paddingTop: !isPreview ? viewerTopHeight : null,
216
+ paddingTop: current && !isPreview ? viewerTopHeight : null,
212
217
  paddingBottom: (hasCallToAction ? callToActionHeight - finalSpacing : 0) + (current && !isPreview ? viewerBottomHeight : 0)
213
218
  }
214
219
  }, items, !isPlaceholder && hasCallToAction ? /*#__PURE__*/React__default["default"].createElement("div", {
@@ -227,16 +232,7 @@ var SlideshowScreen = function SlideshowScreen(_ref) {
227
232
  },
228
233
  enableInteraction: enableInteraction,
229
234
  disableInteraction: disableInteraction
230
- })) : null)), !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
231
- background: background,
232
- width: width,
233
- height: height,
234
- resolution: resolution,
235
- playing: backgroundPlaying,
236
- shouldLoad: mediaShouldLoad,
237
- withoutVideo: isPreview,
238
- className: styles.background
239
- }) : null);
235
+ })) : null)));
240
236
  };
241
237
 
242
238
  SlideshowScreen.propTypes = propTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-slideshow",
3
- "version": "0.3.246",
3
+ "version": "0.3.251",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,14 +49,14 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.3.246",
53
- "@micromag/element-background": "^0.3.246",
54
- "@micromag/element-call-to-action": "^0.3.246",
55
- "@micromag/element-container": "^0.3.246",
56
- "@micromag/element-layout": "^0.3.246",
57
- "@micromag/element-text": "^0.3.246",
58
- "@micromag/element-visual": "^0.3.246",
59
- "@micromag/transforms": "^0.3.246",
52
+ "@micromag/core": "^0.3.251",
53
+ "@micromag/element-background": "^0.3.251",
54
+ "@micromag/element-call-to-action": "^0.3.251",
55
+ "@micromag/element-container": "^0.3.251",
56
+ "@micromag/element-layout": "^0.3.251",
57
+ "@micromag/element-text": "^0.3.251",
58
+ "@micromag/element-visual": "^0.3.251",
59
+ "@micromag/transforms": "^0.3.251",
60
60
  "classnames": "^2.2.6",
61
61
  "lodash": "^4.17.21",
62
62
  "prop-types": "^15.7.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "473a4ad55684e54d3f1e62e760792ed6e003f8e7"
69
+ "gitHead": "3b6fb00baaa7f3ab90684a88cbe4c30929b6b27d"
70
70
  }