@micromag/screen-timeline 0.3.251 → 0.3.262

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-timeline-container .micromag-screen-timeline-empty{margin:5px auto;border:2px dashed #343434;color:#343434}.micromag-screen-timeline-container{position:relative}.micromag-screen-timeline-container .micromag-screen-timeline-empty{height:50px;margin-right:10px}.micromag-screen-timeline-container .micromag-screen-timeline-item{position:relative}.micromag-screen-timeline-container .micromag-screen-timeline-element{display:-webkit-flex;display:-ms-flexbox;display:flex}.micromag-screen-timeline-container .micromag-screen-timeline-timeline{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:15px;padding-right:20px}.micromag-screen-timeline-container .micromag-screen-timeline-line{-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;width:1px}.micromag-screen-timeline-container .micromag-screen-timeline-line.micromag-screen-timeline-hidden{width:auto}.micromag-screen-timeline-container .micromag-screen-timeline-bullet{width:15px;height:15px;margin:2px 0;border-width:1px;border-style:solid}.micromag-screen-timeline-container .micromag-screen-timeline-content{-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.micromag-screen-timeline-container .micromag-screen-timeline-content.micromag-screen-timeline-lastContent{margin-bottom:20px}.micromag-screen-timeline-container .micromag-screen-timeline-description,.micromag-screen-timeline-container .micromag-screen-timeline-imageContainer,.micromag-screen-timeline-container .micromag-screen-timeline-title{padding:8px 0}.micromag-screen-timeline-container .micromag-screen-timeline-image,.micromag-screen-timeline-container .micromag-screen-timeline-imageContainer,.micromag-screen-timeline-container .micromag-screen-timeline-video{position:relative}.micromag-screen-timeline-container .micromag-screen-timeline-imageContainer{overflow:hidden}.micromag-screen-timeline-container .micromag-screen-timeline-callToAction{position:absolute;bottom:0;left:0;width:100%;-webkit-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.micromag-screen-timeline-container .micromag-screen-timeline-callToAction a{padding:0}.micromag-screen-timeline-container .micromag-screen-timeline-callToAction.micromag-screen-timeline-disabled{opacity:0;pointer-events:none}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-scroll{padding:10px}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-timeline{padding-right:0}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-bullet{width:10px;height:10px;border-color:hsla(0,0%,100%,.6);background-color:hsla(0,0%,100%,.6);mix-blend-mode:difference}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-content.micromag-screen-timeline-lastContent{margin-bottom:4px}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-description,.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-imageContainer,.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-title{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:100%;padding:2px 0}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-line{background-color:hsla(0,0%,100%,.6);mix-blend-mode:difference}.micromag-screen-timeline-container.micromag-screen-timeline-circleBulletShape .micromag-screen-timeline-bullet{border-radius:50%}.micromag-screen-timeline-container.micromag-screen-timeline-withoutLines .micromag-screen-timeline-timeline{visibility:hidden}
1
+ .micromag-screen-timeline-container .micromag-screen-timeline-background{position:absolute;top:0;left:0;width:100%;height:100%}.micromag-screen-timeline-container .micromag-screen-timeline-empty{margin:5px auto;border:2px dashed #343434;color:#343434}.micromag-screen-timeline-container{position:relative}.micromag-screen-timeline-container .micromag-screen-timeline-background{z-index:0}.micromag-screen-timeline-container .micromag-screen-timeline-content{z-index:1}.micromag-screen-timeline-container .micromag-screen-timeline-empty{height:50px;margin-right:10px}.micromag-screen-timeline-container .micromag-screen-timeline-item{position:relative}.micromag-screen-timeline-container .micromag-screen-timeline-element{display:-webkit-flex;display:-ms-flexbox;display:flex}.micromag-screen-timeline-container .micromag-screen-timeline-timeline{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:15px;padding-right:20px}.micromag-screen-timeline-container .micromag-screen-timeline-line{-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;width:1px}.micromag-screen-timeline-container .micromag-screen-timeline-line.micromag-screen-timeline-hidden{width:auto}.micromag-screen-timeline-container .micromag-screen-timeline-bullet{width:15px;height:15px;margin:2px 0;border-width:1px;border-style:solid}.micromag-screen-timeline-container .micromag-screen-timeline-body{-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.micromag-screen-timeline-container .micromag-screen-timeline-body.micromag-screen-timeline-last{margin-bottom:20px}.micromag-screen-timeline-container .micromag-screen-timeline-description,.micromag-screen-timeline-container .micromag-screen-timeline-imageContainer,.micromag-screen-timeline-container .micromag-screen-timeline-title{padding:8px 0}.micromag-screen-timeline-container .micromag-screen-timeline-image,.micromag-screen-timeline-container .micromag-screen-timeline-imageContainer,.micromag-screen-timeline-container .micromag-screen-timeline-video{position:relative}.micromag-screen-timeline-container .micromag-screen-timeline-imageContainer{overflow:hidden}.micromag-screen-timeline-container .micromag-screen-timeline-callToAction{position:absolute;bottom:0;left:0;width:100%;-webkit-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.micromag-screen-timeline-container .micromag-screen-timeline-callToAction a{padding:0}.micromag-screen-timeline-container .micromag-screen-timeline-callToAction.micromag-screen-timeline-disabled{opacity:0;pointer-events:none}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-scroll{padding:10px}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-timeline{padding-right:0}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-bullet{width:10px;height:10px;border-color:hsla(0,0%,100%,.6);background-color:hsla(0,0%,100%,.6);mix-blend-mode:difference}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-body.micromag-screen-timeline-last{margin-bottom:4px}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-description,.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-imageContainer,.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-title{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:100%;padding:2px 0}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-line{background-color:hsla(0,0%,100%,.6);mix-blend-mode:difference}.micromag-screen-timeline-container.micromag-screen-timeline-circleBulletShape .micromag-screen-timeline-bullet{border-radius:50%}.micromag-screen-timeline-container.micromag-screen-timeline-withoutLines .micromag-screen-timeline-timeline{visibility:hidden}
package/es/index.js CHANGED
@@ -22,7 +22,7 @@ import Visual from '@micromag/element-visual';
22
22
  import _extends from '@babel/runtime/helpers/extends';
23
23
  import { Text as Text$1, Container as Container$1 } from '@micromag/transforms/apple-news';
24
24
 
25
- var styles = {"container":"micromag-screen-timeline-container","empty":"micromag-screen-timeline-empty","item":"micromag-screen-timeline-item","element":"micromag-screen-timeline-element","timeline":"micromag-screen-timeline-timeline","line":"micromag-screen-timeline-line","hidden":"micromag-screen-timeline-hidden","bullet":"micromag-screen-timeline-bullet","content":"micromag-screen-timeline-content","lastContent":"micromag-screen-timeline-lastContent","description":"micromag-screen-timeline-description","imageContainer":"micromag-screen-timeline-imageContainer","title":"micromag-screen-timeline-title","image":"micromag-screen-timeline-image","video":"micromag-screen-timeline-video","callToAction":"micromag-screen-timeline-callToAction","disabled":"micromag-screen-timeline-disabled","isPlaceholder":"micromag-screen-timeline-isPlaceholder","scroll":"micromag-screen-timeline-scroll","circleBulletShape":"micromag-screen-timeline-circleBulletShape","withoutLines":"micromag-screen-timeline-withoutLines"};
25
+ var styles = {"container":"micromag-screen-timeline-container","background":"micromag-screen-timeline-background","empty":"micromag-screen-timeline-empty","content":"micromag-screen-timeline-content","item":"micromag-screen-timeline-item","element":"micromag-screen-timeline-element","timeline":"micromag-screen-timeline-timeline","line":"micromag-screen-timeline-line","hidden":"micromag-screen-timeline-hidden","bullet":"micromag-screen-timeline-bullet","body":"micromag-screen-timeline-body","last":"micromag-screen-timeline-last","description":"micromag-screen-timeline-description","imageContainer":"micromag-screen-timeline-imageContainer","title":"micromag-screen-timeline-title","image":"micromag-screen-timeline-image","video":"micromag-screen-timeline-video","callToAction":"micromag-screen-timeline-callToAction","disabled":"micromag-screen-timeline-disabled","isPlaceholder":"micromag-screen-timeline-isPlaceholder","scroll":"micromag-screen-timeline-scroll","circleBulletShape":"micromag-screen-timeline-circleBulletShape","withoutLines":"micromag-screen-timeline-withoutLines"};
26
26
 
27
27
  var propTypes = {
28
28
  layout: PropTypes.oneOf(['normal', 'title-description-image', 'title-image-description', 'image-title-description']),
@@ -230,6 +230,7 @@ var Timeline = function Timeline(_ref) {
230
230
  playing: backgroundPlaying,
231
231
  active: active,
232
232
  shouldLoad: mediaShouldLoad,
233
+ withoutVideo: isPreview,
233
234
  onLoaded: onImageLoaded
234
235
  }) : null));
235
236
  break;
@@ -278,7 +279,7 @@ var Timeline = function Timeline(_ref) {
278
279
  className: classNames([styles.line, _defineProperty({}, styles.hidden, bottomLineHidden)]),
279
280
  style: _objectSpread({}, !bottomLineHidden ? getStyleFromColor(lineColor, 'backgroundColor') : null)
280
281
  })), /*#__PURE__*/React.createElement("div", {
281
- className: classNames([styles.content, _defineProperty({}, styles.lastContent, lastType && !lastItem)])
282
+ className: classNames([styles.body, _defineProperty({}, styles.last, lastType && !lastItem)])
282
283
  }, elementContent));
283
284
  })));
284
285
  }); // Call to Action
@@ -312,18 +313,10 @@ var Timeline = function Timeline(_ref) {
312
313
  return /*#__PURE__*/React.createElement("div", {
313
314
  className: classNames([styles.container, (_ref10 = {}, _defineProperty(_ref10, className, className !== null), _defineProperty(_ref10, styles.isPlaceholder, isPlaceholder), _defineProperty(_ref10, styles["".concat(bulletShape, "BulletShape")], bulletShape !== null), _defineProperty(_ref10, styles.withoutLines, itemsCount < 2), _ref10)]),
314
315
  "data-screen-ready": ready
315
- }, !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
316
- background: background,
316
+ }, /*#__PURE__*/React.createElement(Container, {
317
317
  width: width,
318
318
  height: height,
319
- resolution: resolution,
320
- playing: backgroundPlaying,
321
- muted: muted,
322
- shouldLoad: mediaShouldLoad,
323
- mediaRef: mediaRef
324
- }) : null, /*#__PURE__*/React.createElement(Container, {
325
- width: width,
326
- height: height
319
+ className: styles.content
327
320
  }, /*#__PURE__*/React.createElement(Scroll, {
328
321
  className: styles.scroll,
329
322
  verticalAlign: "middle",
@@ -333,7 +326,7 @@ var Timeline = function Timeline(_ref) {
333
326
  }, /*#__PURE__*/React.createElement(Layout, {
334
327
  style: !isPlaceholder ? {
335
328
  padding: spacing,
336
- paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
329
+ paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
337
330
  paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
338
331
  } : null
339
332
  }, timelineElements)), !isPlaceholder && hasCallToAction ? /*#__PURE__*/React.createElement("div", {
@@ -350,7 +343,18 @@ var Timeline = function Timeline(_ref) {
350
343
  animationDisabled: isPreview,
351
344
  focusable: current && isView,
352
345
  openWebView: openWebView
353
- }))) : null));
346
+ }))) : null), !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
347
+ background: background,
348
+ width: width,
349
+ height: height,
350
+ resolution: resolution,
351
+ playing: backgroundPlaying,
352
+ muted: muted,
353
+ shouldLoad: mediaShouldLoad,
354
+ mediaRef: mediaRef,
355
+ withoutVideo: isPreview,
356
+ className: styles.container
357
+ }) : null);
354
358
  };
355
359
 
356
360
  Timeline.propTypes = propTypes;
package/lib/index.js CHANGED
@@ -45,7 +45,7 @@ var Text__default = /*#__PURE__*/_interopDefaultLegacy(Text);
45
45
  var Visual__default = /*#__PURE__*/_interopDefaultLegacy(Visual);
46
46
  var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
47
47
 
48
- var styles = {"container":"micromag-screen-timeline-container","empty":"micromag-screen-timeline-empty","item":"micromag-screen-timeline-item","element":"micromag-screen-timeline-element","timeline":"micromag-screen-timeline-timeline","line":"micromag-screen-timeline-line","hidden":"micromag-screen-timeline-hidden","bullet":"micromag-screen-timeline-bullet","content":"micromag-screen-timeline-content","lastContent":"micromag-screen-timeline-lastContent","description":"micromag-screen-timeline-description","imageContainer":"micromag-screen-timeline-imageContainer","title":"micromag-screen-timeline-title","image":"micromag-screen-timeline-image","video":"micromag-screen-timeline-video","callToAction":"micromag-screen-timeline-callToAction","disabled":"micromag-screen-timeline-disabled","isPlaceholder":"micromag-screen-timeline-isPlaceholder","scroll":"micromag-screen-timeline-scroll","circleBulletShape":"micromag-screen-timeline-circleBulletShape","withoutLines":"micromag-screen-timeline-withoutLines"};
48
+ var styles = {"container":"micromag-screen-timeline-container","background":"micromag-screen-timeline-background","empty":"micromag-screen-timeline-empty","content":"micromag-screen-timeline-content","item":"micromag-screen-timeline-item","element":"micromag-screen-timeline-element","timeline":"micromag-screen-timeline-timeline","line":"micromag-screen-timeline-line","hidden":"micromag-screen-timeline-hidden","bullet":"micromag-screen-timeline-bullet","body":"micromag-screen-timeline-body","last":"micromag-screen-timeline-last","description":"micromag-screen-timeline-description","imageContainer":"micromag-screen-timeline-imageContainer","title":"micromag-screen-timeline-title","image":"micromag-screen-timeline-image","video":"micromag-screen-timeline-video","callToAction":"micromag-screen-timeline-callToAction","disabled":"micromag-screen-timeline-disabled","isPlaceholder":"micromag-screen-timeline-isPlaceholder","scroll":"micromag-screen-timeline-scroll","circleBulletShape":"micromag-screen-timeline-circleBulletShape","withoutLines":"micromag-screen-timeline-withoutLines"};
49
49
 
50
50
  var propTypes = {
51
51
  layout: PropTypes__default["default"].oneOf(['normal', 'title-description-image', 'title-image-description', 'image-title-description']),
@@ -253,6 +253,7 @@ var Timeline = function Timeline(_ref) {
253
253
  playing: backgroundPlaying,
254
254
  active: active,
255
255
  shouldLoad: mediaShouldLoad,
256
+ withoutVideo: isPreview,
256
257
  onLoaded: onImageLoaded
257
258
  }) : null));
258
259
  break;
@@ -301,7 +302,7 @@ var Timeline = function Timeline(_ref) {
301
302
  className: classNames__default["default"]([styles.line, _defineProperty__default["default"]({}, styles.hidden, bottomLineHidden)]),
302
303
  style: _objectSpread__default["default"]({}, !bottomLineHidden ? utils.getStyleFromColor(lineColor, 'backgroundColor') : null)
303
304
  })), /*#__PURE__*/React__default["default"].createElement("div", {
304
- className: classNames__default["default"]([styles.content, _defineProperty__default["default"]({}, styles.lastContent, lastType && !lastItem)])
305
+ className: classNames__default["default"]([styles.body, _defineProperty__default["default"]({}, styles.last, lastType && !lastItem)])
305
306
  }, elementContent));
306
307
  })));
307
308
  }); // Call to Action
@@ -335,18 +336,10 @@ var Timeline = function Timeline(_ref) {
335
336
  return /*#__PURE__*/React__default["default"].createElement("div", {
336
337
  className: classNames__default["default"]([styles.container, (_ref10 = {}, _defineProperty__default["default"](_ref10, className, className !== null), _defineProperty__default["default"](_ref10, styles.isPlaceholder, isPlaceholder), _defineProperty__default["default"](_ref10, styles["".concat(bulletShape, "BulletShape")], bulletShape !== null), _defineProperty__default["default"](_ref10, styles.withoutLines, itemsCount < 2), _ref10)]),
337
338
  "data-screen-ready": ready
338
- }, !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
339
- background: background,
339
+ }, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
340
340
  width: width,
341
341
  height: height,
342
- resolution: resolution,
343
- playing: backgroundPlaying,
344
- muted: muted,
345
- shouldLoad: mediaShouldLoad,
346
- mediaRef: mediaRef
347
- }) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
348
- width: width,
349
- height: height
342
+ className: styles.content
350
343
  }, /*#__PURE__*/React__default["default"].createElement(Scroll__default["default"], {
351
344
  className: styles.scroll,
352
345
  verticalAlign: "middle",
@@ -356,7 +349,7 @@ var Timeline = function Timeline(_ref) {
356
349
  }, /*#__PURE__*/React__default["default"].createElement(Layout__default["default"], {
357
350
  style: !isPlaceholder ? {
358
351
  padding: spacing,
359
- paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
352
+ paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
360
353
  paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
361
354
  } : null
362
355
  }, timelineElements)), !isPlaceholder && hasCallToAction ? /*#__PURE__*/React__default["default"].createElement("div", {
@@ -373,7 +366,18 @@ var Timeline = function Timeline(_ref) {
373
366
  animationDisabled: isPreview,
374
367
  focusable: current && isView,
375
368
  openWebView: openWebView
376
- }))) : null));
369
+ }))) : null), !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
370
+ background: background,
371
+ width: width,
372
+ height: height,
373
+ resolution: resolution,
374
+ playing: backgroundPlaying,
375
+ muted: muted,
376
+ shouldLoad: mediaShouldLoad,
377
+ mediaRef: mediaRef,
378
+ withoutVideo: isPreview,
379
+ className: styles.container
380
+ }) : null);
377
381
  };
378
382
 
379
383
  Timeline.propTypes = propTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-timeline",
3
- "version": "0.3.251",
3
+ "version": "0.3.262",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,16 +49,16 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
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-heading": "^0.3.251",
57
- "@micromag/element-layout": "^0.3.251",
58
- "@micromag/element-scroll": "^0.3.251",
59
- "@micromag/element-text": "^0.3.251",
60
- "@micromag/element-visual": "^0.3.251",
61
- "@micromag/transforms": "^0.3.251",
52
+ "@micromag/core": "^0.3.262",
53
+ "@micromag/element-background": "^0.3.262",
54
+ "@micromag/element-call-to-action": "^0.3.262",
55
+ "@micromag/element-container": "^0.3.262",
56
+ "@micromag/element-heading": "^0.3.262",
57
+ "@micromag/element-layout": "^0.3.262",
58
+ "@micromag/element-scroll": "^0.3.262",
59
+ "@micromag/element-text": "^0.3.262",
60
+ "@micromag/element-visual": "^0.3.262",
61
+ "@micromag/transforms": "^0.3.262",
62
62
  "classnames": "^2.2.6",
63
63
  "lodash": "^4.17.21",
64
64
  "prop-types": "^15.7.2",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "3b6fb00baaa7f3ab90684a88cbe4c30929b6b27d"
71
+ "gitHead": "2299eaeb150cfdd14b4da321bf9089ab1e6383c2"
72
72
  }