@micromag/screen-timeline 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-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}
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}
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","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"};
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"};
26
26
 
27
27
  var propTypes = {
28
28
  layout: PropTypes.oneOf(['normal', 'title-description-image', 'title-image-description', 'image-title-description']),
@@ -230,7 +230,6 @@ var Timeline = function Timeline(_ref) {
230
230
  playing: backgroundPlaying,
231
231
  active: active,
232
232
  shouldLoad: mediaShouldLoad,
233
- withoutVideo: isPreview,
234
233
  onLoaded: onImageLoaded
235
234
  }) : null));
236
235
  break;
@@ -279,7 +278,7 @@ var Timeline = function Timeline(_ref) {
279
278
  className: classNames([styles.line, _defineProperty({}, styles.hidden, bottomLineHidden)]),
280
279
  style: _objectSpread({}, !bottomLineHidden ? getStyleFromColor(lineColor, 'backgroundColor') : null)
281
280
  })), /*#__PURE__*/React.createElement("div", {
282
- className: classNames([styles.body, _defineProperty({}, styles.last, lastType && !lastItem)])
281
+ className: classNames([styles.content, _defineProperty({}, styles.lastContent, lastType && !lastItem)])
283
282
  }, elementContent));
284
283
  })));
285
284
  }); // Call to Action
@@ -313,10 +312,18 @@ var Timeline = function Timeline(_ref) {
313
312
  return /*#__PURE__*/React.createElement("div", {
314
313
  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)]),
315
314
  "data-screen-ready": ready
316
- }, /*#__PURE__*/React.createElement(Container, {
315
+ }, !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
316
+ background: background,
317
317
  width: width,
318
318
  height: height,
319
- className: styles.content
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
320
327
  }, /*#__PURE__*/React.createElement(Scroll, {
321
328
  className: styles.scroll,
322
329
  verticalAlign: "middle",
@@ -326,7 +333,7 @@ var Timeline = function Timeline(_ref) {
326
333
  }, /*#__PURE__*/React.createElement(Layout, {
327
334
  style: !isPlaceholder ? {
328
335
  padding: spacing,
329
- paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
336
+ paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
330
337
  paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
331
338
  } : null
332
339
  }, timelineElements)), !isPlaceholder && hasCallToAction ? /*#__PURE__*/React.createElement("div", {
@@ -343,18 +350,7 @@ var Timeline = function Timeline(_ref) {
343
350
  animationDisabled: isPreview,
344
351
  focusable: current && isView,
345
352
  openWebView: openWebView
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);
353
+ }))) : null));
358
354
  };
359
355
 
360
356
  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","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"};
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"};
49
49
 
50
50
  var propTypes = {
51
51
  layout: PropTypes__default["default"].oneOf(['normal', 'title-description-image', 'title-image-description', 'image-title-description']),
@@ -253,7 +253,6 @@ var Timeline = function Timeline(_ref) {
253
253
  playing: backgroundPlaying,
254
254
  active: active,
255
255
  shouldLoad: mediaShouldLoad,
256
- withoutVideo: isPreview,
257
256
  onLoaded: onImageLoaded
258
257
  }) : null));
259
258
  break;
@@ -302,7 +301,7 @@ var Timeline = function Timeline(_ref) {
302
301
  className: classNames__default["default"]([styles.line, _defineProperty__default["default"]({}, styles.hidden, bottomLineHidden)]),
303
302
  style: _objectSpread__default["default"]({}, !bottomLineHidden ? utils.getStyleFromColor(lineColor, 'backgroundColor') : null)
304
303
  })), /*#__PURE__*/React__default["default"].createElement("div", {
305
- className: classNames__default["default"]([styles.body, _defineProperty__default["default"]({}, styles.last, lastType && !lastItem)])
304
+ className: classNames__default["default"]([styles.content, _defineProperty__default["default"]({}, styles.lastContent, lastType && !lastItem)])
306
305
  }, elementContent));
307
306
  })));
308
307
  }); // Call to Action
@@ -336,10 +335,18 @@ var Timeline = function Timeline(_ref) {
336
335
  return /*#__PURE__*/React__default["default"].createElement("div", {
337
336
  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)]),
338
337
  "data-screen-ready": ready
339
- }, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
338
+ }, !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
339
+ background: background,
340
340
  width: width,
341
341
  height: height,
342
- className: styles.content
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
343
350
  }, /*#__PURE__*/React__default["default"].createElement(Scroll__default["default"], {
344
351
  className: styles.scroll,
345
352
  verticalAlign: "middle",
@@ -349,7 +356,7 @@ var Timeline = function Timeline(_ref) {
349
356
  }, /*#__PURE__*/React__default["default"].createElement(Layout__default["default"], {
350
357
  style: !isPlaceholder ? {
351
358
  padding: spacing,
352
- paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
359
+ paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
353
360
  paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
354
361
  } : null
355
362
  }, timelineElements)), !isPlaceholder && hasCallToAction ? /*#__PURE__*/React__default["default"].createElement("div", {
@@ -366,18 +373,7 @@ var Timeline = function Timeline(_ref) {
366
373
  animationDisabled: isPreview,
367
374
  focusable: current && isView,
368
375
  openWebView: openWebView
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);
376
+ }))) : null));
381
377
  };
382
378
 
383
379
  Timeline.propTypes = propTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-timeline",
3
- "version": "0.3.246",
3
+ "version": "0.3.251",
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.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-heading": "^0.3.246",
57
- "@micromag/element-layout": "^0.3.246",
58
- "@micromag/element-scroll": "^0.3.246",
59
- "@micromag/element-text": "^0.3.246",
60
- "@micromag/element-visual": "^0.3.246",
61
- "@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-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",
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": "473a4ad55684e54d3f1e62e760792ed6e003f8e7"
71
+ "gitHead": "3b6fb00baaa7f3ab90684a88cbe4c30929b6b27d"
72
72
  }