luna-one 3.1.561 → 3.1.563

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.
@@ -176,7 +176,7 @@ var renderFullBgHeroImage = function renderFullBgHeroImage(image) {
176
176
  var lottieRatio = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
177
177
  var imageType = (image === null || image === void 0 ? void 0 : image.type) || "default";
178
178
  var lottieStyles = {};
179
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, imageType === "image" && renderImageComponent(image, size), imageType != "image" && (0, _renderImageOrLottieAnimation.renderImageOrLottieAnimation)(imageType === 'focalPointImage' ? image === null || image === void 0 ? void 0 : image.focalPointImage : image, null, variant ? imageBackgroundSizes[variant] : null, (0, _generateFocusedImageAlt["default"])(image), elementClass, lottieStyles, true, lottieRatio));
179
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, imageType === "image" && renderImageComponent(image, size), imageType != "image" && (0, _renderImageOrLottieAnimation.renderImageOrLottieAnimation)(imageType === 'focalPointImage' ? image === null || image === void 0 ? void 0 : image.focalPointImage : image, null, variant ? imageBackgroundSizes[variant] : null, (0, _generateFocusedImageAlt["default"])(image), elementClass, lottieStyles, true, lottieRatio, image === null || image === void 0 ? void 0 : image.lazyLoad));
180
180
  };
181
181
 
182
182
  exports.renderFullBgHeroImage = renderFullBgHeroImage;
@@ -63,7 +63,8 @@ var SuperHero = function SuperHero(_ref) {
63
63
  setVideoProgress = content.setVideoProgress,
64
64
  _content$override = content.override,
65
65
  override = _content$override === void 0 ? false : _content$override,
66
- superHeroAnimation = content.superHeroAnimation;
66
+ superHeroAnimation = content.superHeroAnimation,
67
+ lazyLoad = content.lazyLoad;
67
68
 
68
69
  var _useState = (0, _react.useState)(false),
69
70
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
@@ -104,7 +105,7 @@ var SuperHero = function SuperHero(_ref) {
104
105
  setHovering = _useVideo.setHovering,
105
106
  togglePlaying = _useVideo.togglePlaying;
106
107
 
107
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _SuperHeroMethods.renderVariantsOneToSeven)(variant, contentSide, focusedImage, _SuperHeroMethods.imageSizes, eyebrow, header, subHeader, text, cta, ctas, theme, Link, mouse, color, backgroundColor, paddingClass, modalDeployed, image, video, thumbnail, hovering, playing, deployModal, hideModal, setHovering, togglePlaying, content, ContentComponent, transcriptVisable, setTranscriptVisable, transcript, transcriptText, closeTranscript, alignTop, videoProgress, setVideoProgress, override, superHeroAnimation), (0, _SuperHeroMethods.renderVariantEightToTen)(variant, ContentComponent, contentSide, focusedImage, _SuperHeroMethods.imageSizes, eyebrow, header, subHeader, text, cta, ctas, theme, Link, mouse, color, backgroundColor, dataPoints, superHeroAnimation));
108
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _SuperHeroMethods.renderVariantsOneToSeven)(variant, contentSide, focusedImage, _SuperHeroMethods.imageSizes, eyebrow, header, subHeader, text, cta, ctas, theme, Link, mouse, color, backgroundColor, paddingClass, modalDeployed, image, video, thumbnail, hovering, playing, deployModal, hideModal, setHovering, togglePlaying, content, ContentComponent, transcriptVisable, setTranscriptVisable, transcript, transcriptText, closeTranscript, alignTop, videoProgress, setVideoProgress, override, superHeroAnimation, lazyLoad), (0, _SuperHeroMethods.renderVariantEightToTen)(variant, ContentComponent, contentSide, focusedImage, _SuperHeroMethods.imageSizes, eyebrow, header, subHeader, text, cta, ctas, theme, Link, mouse, color, backgroundColor, dataPoints, superHeroAnimation, lazyLoad));
108
109
  };
109
110
 
110
111
  var _default = SuperHero;
@@ -378,16 +378,17 @@ var determineCurrentBreakpoint = function determineCurrentBreakpoint() {
378
378
  }
379
379
  };
380
380
 
381
- var renderImage = function renderImage(image, focusedImage, variant, superHeroAnimation) {
381
+ var renderImage = function renderImage(image, focusedImage, variant, superHeroAnimation, lazyLoad) {
382
382
  if (superHeroAnimation && superHeroAnimation !== null && superHeroAnimation !== void 0 && superHeroAnimation.src) {
383
383
  return (0, _renderImageOrLottieAnimation.renderImageOrLottieAnimation)(superHeroAnimation, null, null, null, "ter-super-hero__lottie", null, true, generateAnimationRatio(imageSizes[variant], determineCurrentBreakpoint()));
384
384
  } else if (!image && focusedImage) {
385
- return (0, _renderImageOrLottieAnimation.renderImageOrLottieAnimation)(focusedImage === null || focusedImage === void 0 ? void 0 : focusedImage.focalPointImage, null, imageSizes[variant], (0, _generateFocusedImageAlt["default"])(focusedImage), "ter-super-hero__image", null);
385
+ return (0, _renderImageOrLottieAnimation.renderImageOrLottieAnimation)(focusedImage === null || focusedImage === void 0 ? void 0 : focusedImage.focalPointImage, null, imageSizes[variant], (0, _generateFocusedImageAlt["default"])(focusedImage), "ter-super-hero__image", null, undefined, undefined, lazyLoad);
386
386
  } else if (image && !focusedImage) {
387
387
  return /*#__PURE__*/_react["default"].createElement(_terraOne.Image, {
388
388
  src: image !== null && image !== void 0 && image.src ? image.src : _fpoSquare["default"],
389
389
  alt: (image === null || image === void 0 ? void 0 : image.alt) || "placeholder image",
390
390
  className: "luna-super-hero__image",
391
+ lazyLoad: lazyLoad,
391
392
  onError: function onError(e) {
392
393
  e.target.onerror = null;
393
394
  e.target.src = _fpoSquare["default"];
@@ -406,7 +407,7 @@ var checkForVariant = function checkForVariant(variant) {
406
407
 
407
408
  exports.checkForVariant = checkForVariant;
408
409
 
409
- var renderVariantsOneToSeven = function renderVariantsOneToSeven(variant, contentSide, focusedImage, imageSizes, eyebrow, header, subHeader, text, cta, ctas, theme, Link, mouse, color, backgroundColor, paddingClass, modalDeployed, image, video, thumbnail, hovering, playing, deployModal, hideModal, setHovering, togglePlaying, content, ContentComponent, transcriptVisable, setTranscriptVisable, transcript, transcriptText, closeTranscript, alignTop, videoProgress, setVideoProgress, override, superHeroAnimation) {
410
+ var renderVariantsOneToSeven = function renderVariantsOneToSeven(variant, contentSide, focusedImage, imageSizes, eyebrow, header, subHeader, text, cta, ctas, theme, Link, mouse, color, backgroundColor, paddingClass, modalDeployed, image, video, thumbnail, hovering, playing, deployModal, hideModal, setHovering, togglePlaying, content, ContentComponent, transcriptVisable, setTranscriptVisable, transcript, transcriptText, closeTranscript, alignTop, videoProgress, setVideoProgress, override, superHeroAnimation, lazyLoad) {
410
411
  var alignmentClass = alignTop ? "luna-super-hero__image-wrapper--uneven-alignment" : "";
411
412
 
412
413
  if (checkForVariant(variant) === "super-hero--padded-components") {
@@ -420,7 +421,7 @@ var renderVariantsOneToSeven = function renderVariantsOneToSeven(variant, conten
420
421
  className: "luna-super-hero__image-wrapper luna-super-hero__image-wrapper-".concat(variant, "-").concat(contentSide, " ").concat(alignmentClass)
421
422
  }, /*#__PURE__*/_react["default"].createElement("span", {
422
423
  tabIndex: mouse ? "" : "0"
423
- }, renderImage(image, focusedImage, variant, superHeroAnimation)), video && /*#__PURE__*/_react["default"].createElement(_Video["default"], {
424
+ }, renderImage(image, focusedImage, variant, superHeroAnimation, lazyLoad)), video && /*#__PURE__*/_react["default"].createElement(_Video["default"], {
424
425
  content: content,
425
426
  override: override
426
427
  })), !modalDeployed && /*#__PURE__*/_react["default"].createElement("aside", {
@@ -471,7 +472,7 @@ var renderVariantsOneToSeven = function renderVariantsOneToSeven(variant, conten
471
472
 
472
473
  exports.renderVariantsOneToSeven = renderVariantsOneToSeven;
473
474
 
474
- var renderVariantEightToTen = function renderVariantEightToTen(variant, ContentComponent, contentSide, focusedImage, imageSizes, eyebrow, header, subHeader, text, cta, ctas, theme, Link, mouse, color, backgroundColor, dataPoints, superHeroAnimation) {
475
+ var renderVariantEightToTen = function renderVariantEightToTen(variant, ContentComponent, contentSide, focusedImage, imageSizes, eyebrow, header, subHeader, text, cta, ctas, theme, Link, mouse, color, backgroundColor, dataPoints, superHeroAnimation, lazyLoad) {
475
476
  if (checkForVariant(variant) === "super-hero--fullscreen-components") {
476
477
  var hasDataPoints = dataPoints && Array.isArray(dataPoints) && (dataPoints === null || dataPoints === void 0 ? void 0 : dataPoints.length) > 0;
477
478
  return /*#__PURE__*/_react["default"].createElement("section", {
@@ -485,7 +486,7 @@ var renderVariantEightToTen = function renderVariantEightToTen(variant, ContentC
485
486
  }, /*#__PURE__*/_react["default"].createElement("span", {
486
487
  tabIndex: mouse ? "" : "0",
487
488
  className: "super-hero-fullscreen__hero-image-wrapper"
488
- }, renderImage(null, focusedImage, variant, superHeroAnimation))), hasDataPoints && /*#__PURE__*/_react["default"].createElement(_reactAwesomeReveal.Fade, {
489
+ }, renderImage(null, focusedImage, variant, superHeroAnimation, lazyLoad))), hasDataPoints && /*#__PURE__*/_react["default"].createElement(_reactAwesomeReveal.Fade, {
489
490
  className: "super-hero-fullscreen__data-points"
490
491
  }, /*#__PURE__*/_react["default"].createElement(_DataPoint["default"], {
491
492
  points: dataPoints,
@@ -619,4 +619,10 @@
619
619
  .ter-navbar--is-showing {
620
620
  border-bottom: 1px solid $concrete-gray;
621
621
  }
622
+
623
+ @media screen and (max-width: $breakpoint-xs) {
624
+ .luna-layout__sections {
625
+ padding-top: 60px;
626
+ }
627
+ }
622
628
  }
@@ -16,6 +16,7 @@ var _terraOne = require("terra-one");
16
16
  var renderImageOrLottieAnimation = function renderImageOrLottieAnimation(image, focusedImageStyles, focusedImageSizes, focusedImageAlt, elementClass, lottieStyles) {
17
17
  var fullHeightWrapper = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
18
18
  var lottieRatio = arguments.length > 7 ? arguments[7] : undefined;
19
+ var lazyLoad = arguments.length > 8 ? arguments[8] : undefined;
19
20
 
20
21
  if ((image === null || image === void 0 ? void 0 : image.type) === "lottieAnimation") {
21
22
  var animationRatio = lottieRatio ? lottieRatio : image === null || image === void 0 ? void 0 : image.ratio;
@@ -32,7 +33,8 @@ var renderImageOrLottieAnimation = function renderImageOrLottieAnimation(image,
32
33
  pictureStyles: focusedImageStyles,
33
34
  imageSizes: focusedImageSizes,
34
35
  alt: focusedImageAlt,
35
- className: elementClass
36
+ className: elementClass,
37
+ lazyLoad: lazyLoad
36
38
  });
37
39
  }
38
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luna-one",
3
- "version": "3.1.561",
3
+ "version": "3.1.563",
4
4
  "peerDependencies": {
5
5
  "react": "^17.0.2",
6
6
  "react-dom": "^17.0.2",