luna-one 3.1.303 → 3.1.304
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.
|
@@ -21,6 +21,8 @@ var _useScreenSize2 = require("../../utils/hooks/useScreenSize");
|
|
|
21
21
|
|
|
22
22
|
var _terraOne = require("terra-one");
|
|
23
23
|
|
|
24
|
+
var _useMouse2 = _interopRequireDefault(require("../../utils/hooks/useMouse"));
|
|
25
|
+
|
|
24
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
27
|
|
|
26
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -44,6 +46,9 @@ var OverlayNotice = function OverlayNotice(_ref) {
|
|
|
44
46
|
isClosed = _useState4[0],
|
|
45
47
|
setIsClosed = _useState4[1];
|
|
46
48
|
|
|
49
|
+
var _useMouse = (0, _useMouse2.default)(),
|
|
50
|
+
mouse = _useMouse.mouse;
|
|
51
|
+
|
|
47
52
|
(0, _react.useEffect)(function () {
|
|
48
53
|
//Set a short timer so that the banner doesn't appear instantly
|
|
49
54
|
var slideInTimer = setTimeout(function () {
|
|
@@ -58,7 +63,8 @@ var OverlayNotice = function OverlayNotice(_ref) {
|
|
|
58
63
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
59
64
|
className: "overlay-notice__container ".concat(isClosed ? "overlay-notice__container--closed" : "")
|
|
60
65
|
}, renderExpandButton && /*#__PURE__*/_react.default.createElement("button", {
|
|
61
|
-
|
|
66
|
+
"aria-label": "View more details about ".concat(header),
|
|
67
|
+
className: mouse ? "overlay-notice__button overlay-notice__button--expand" : "overlay-notice__button overlay-notice__button--expand tabFocus ".concat(isClosed ? "overlay-notice__button--expand--closed" : ""),
|
|
62
68
|
onClick: function onClick() {
|
|
63
69
|
return setExpanded(true);
|
|
64
70
|
}
|
|
@@ -75,15 +81,26 @@ var OverlayNotice = function OverlayNotice(_ref) {
|
|
|
75
81
|
}, header && /*#__PURE__*/_react.default.createElement("div", {
|
|
76
82
|
className: "overlay-notice__header"
|
|
77
83
|
}, header), details && renderDetails && /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
-
className: "overlay-notice__details"
|
|
84
|
+
className: "overlay-notice__details",
|
|
85
|
+
style: isExpanded || width > 600 ? {
|
|
86
|
+
display: "block"
|
|
87
|
+
} : {
|
|
88
|
+
display: "none"
|
|
89
|
+
}
|
|
79
90
|
}, details)), button && renderDetails && /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
-
className: "overlay-notice__cta-button"
|
|
91
|
+
className: "overlay-notice__cta-button",
|
|
92
|
+
style: isExpanded || width > 600 ? {
|
|
93
|
+
display: "block"
|
|
94
|
+
} : {
|
|
95
|
+
display: "none"
|
|
96
|
+
}
|
|
81
97
|
}, /*#__PURE__*/_react.default.createElement(_terraOne.Button, {
|
|
82
98
|
className: "ter-button--primary--1",
|
|
83
99
|
url: button === null || button === void 0 ? void 0 : button.url,
|
|
84
100
|
text: button === null || button === void 0 ? void 0 : button.text
|
|
85
101
|
})), /*#__PURE__*/_react.default.createElement("button", {
|
|
86
|
-
className: "overlay-notice__button overlay-notice__button--close",
|
|
102
|
+
className: mouse ? "overlay-notice__button overlay-notice__button--close" : "overlay-notice__button overlay-notice__button--close tabFocus",
|
|
103
|
+
"aria-label": "dismiss notice",
|
|
87
104
|
onClick: function onClick(e) {
|
|
88
105
|
setIsClosed(true);
|
|
89
106
|
handleClose(e.target.value);
|
|
@@ -91,7 +108,7 @@ var OverlayNotice = function OverlayNotice(_ref) {
|
|
|
91
108
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
92
109
|
src: _closeDarkNavy.default,
|
|
93
110
|
alt: "Close Icon",
|
|
94
|
-
className: "overlay-notice__close-button-icon"
|
|
111
|
+
className: mouse ? "overlay-notice__close-button-icon" : "overlay-notice__close-button-icon tabFocus"
|
|
95
112
|
})))));
|
|
96
113
|
};
|
|
97
114
|
|
|
@@ -193,6 +193,10 @@
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
&--close.tabFocus:focus {
|
|
197
|
+
outline: 2px solid $sky-blue;
|
|
198
|
+
}
|
|
199
|
+
|
|
196
200
|
&--expand {
|
|
197
201
|
background-color: $trimble-blue;
|
|
198
202
|
position: absolute;
|
|
@@ -215,6 +219,9 @@
|
|
|
215
219
|
background-color: $sky-blue;
|
|
216
220
|
}
|
|
217
221
|
}
|
|
222
|
+
&--expand.tabFocus:focus {
|
|
223
|
+
outline: 2px solid $sky-blue;
|
|
224
|
+
}
|
|
218
225
|
|
|
219
226
|
@media screen and (max-width: $breakpoint-xs) {
|
|
220
227
|
width: 20px;
|
|
@@ -344,7 +344,6 @@
|
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
&__text,
|
|
347
|
-
&__text p,
|
|
348
347
|
&__text h1,
|
|
349
348
|
&__text h2,
|
|
350
349
|
&__text h3,
|
|
@@ -361,6 +360,19 @@
|
|
|
361
360
|
font-size: $body-font-size-mobile;
|
|
362
361
|
}
|
|
363
362
|
}
|
|
363
|
+
&__text p {
|
|
364
|
+
font-size: $body-font-size;
|
|
365
|
+
line-height: 18px;
|
|
366
|
+
letter-spacing: -0.005em;
|
|
367
|
+
@include benton-light();
|
|
368
|
+
@media screen and (max-width: $breakpoint-xxs) {
|
|
369
|
+
font-size: $body-font-size-mobile;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
&__text p:last-child {
|
|
374
|
+
margin-bottom: 37px;
|
|
375
|
+
}
|
|
364
376
|
|
|
365
377
|
&__text-#ffffff p,
|
|
366
378
|
&__text-#ffffff h1,
|
|
@@ -442,6 +454,7 @@
|
|
|
442
454
|
height: auto;
|
|
443
455
|
min-height: unset;
|
|
444
456
|
}
|
|
457
|
+
|
|
445
458
|
}
|
|
446
459
|
|
|
447
460
|
.super-hero-fullscreen {
|
|
@@ -476,8 +489,22 @@
|
|
|
476
489
|
font-size: $subheading-size-mobile;
|
|
477
490
|
}
|
|
478
491
|
}
|
|
492
|
+
|
|
493
|
+
&__text p {
|
|
494
|
+
font-size: $body-font-size;
|
|
495
|
+
@include benton-light();
|
|
496
|
+
|
|
497
|
+
@media screen and (max-width: $breakpoint-sm) {
|
|
498
|
+
font-size: $body-font-size-mobile;
|
|
499
|
+
line-height: 23px;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
&__text p:last-child {
|
|
504
|
+
margin-bottom: 37px;
|
|
505
|
+
}
|
|
506
|
+
|
|
479
507
|
&__text,
|
|
480
|
-
&__text p,
|
|
481
508
|
&__text h1,
|
|
482
509
|
&__text h2,
|
|
483
510
|
&__text h3,
|
|
@@ -22,7 +22,7 @@ var _DataPoint = _interopRequireDefault(require("../../components/DataPoint/Data
|
|
|
22
22
|
var _Video = _interopRequireDefault(require("../../components/Video/Video"));
|
|
23
23
|
|
|
24
24
|
var ctaRowOrColumn = function ctaRowOrColumn(ctas, variant) {
|
|
25
|
-
var rowVariants = [
|
|
25
|
+
var rowVariants = ["variant_3", "variant_6"];
|
|
26
26
|
|
|
27
27
|
if (!ctas) {
|
|
28
28
|
return;
|
|
@@ -52,7 +52,7 @@ var ctaRowOrColumn = function ctaRowOrColumn(ctas, variant) {
|
|
|
52
52
|
var width = 0;
|
|
53
53
|
var height = 0;
|
|
54
54
|
|
|
55
|
-
if (typeof window !==
|
|
55
|
+
if (typeof window !== "undefined") {
|
|
56
56
|
var _window = window,
|
|
57
57
|
innerWidth = _window.innerWidth,
|
|
58
58
|
innerHeight = _window.innerHeight;
|
|
@@ -67,9 +67,9 @@ var ctaRowOrColumn = function ctaRowOrColumn(ctas, variant) {
|
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
if (variant && variant === findRowVariant() && !hasLongText() && getWindowDimensions().width > 600) {
|
|
70
|
-
ctas.direction =
|
|
70
|
+
ctas.direction = "row";
|
|
71
71
|
} else {
|
|
72
|
-
ctas.direction =
|
|
72
|
+
ctas.direction = "column";
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
return ctas;
|
|
@@ -344,7 +344,7 @@ var renderImage = function renderImage(image, focusedImage, variant) {
|
|
|
344
344
|
if (image && !focusedImage) {
|
|
345
345
|
return /*#__PURE__*/_react.default.createElement(_terraOne.Image, {
|
|
346
346
|
src: (image === null || image === void 0 ? void 0 : image.src) ? image.src : _fpoSquare.default,
|
|
347
|
-
alt: (image === null || image === void 0 ? void 0 : image.alt) ||
|
|
347
|
+
alt: (image === null || image === void 0 ? void 0 : image.alt) || "placeholder image",
|
|
348
348
|
className: "luna-super-hero__image",
|
|
349
349
|
onError: function onError(e) {
|
|
350
350
|
e.target.onerror = null;
|
|
@@ -365,19 +365,19 @@ var renderImage = function renderImage(image, focusedImage, variant) {
|
|
|
365
365
|
};
|
|
366
366
|
|
|
367
367
|
var checkForVariant = function checkForVariant(variant) {
|
|
368
|
-
if (variant ===
|
|
369
|
-
return
|
|
368
|
+
if (variant === "variant_8" || variant === "variant_9" || variant === "variant_10") {
|
|
369
|
+
return "super-hero--fullscreen-components";
|
|
370
370
|
} else {
|
|
371
|
-
return
|
|
371
|
+
return "super-hero--padded-components";
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
|
|
375
375
|
exports.checkForVariant = checkForVariant;
|
|
376
376
|
|
|
377
377
|
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) {
|
|
378
|
-
var alignmentClass = alignTop ?
|
|
378
|
+
var alignmentClass = alignTop ? "luna-super-hero__image-wrapper--uneven-alignment" : "";
|
|
379
379
|
|
|
380
|
-
if (checkForVariant(variant) ===
|
|
380
|
+
if (checkForVariant(variant) === "super-hero--padded-components") {
|
|
381
381
|
return /*#__PURE__*/_react.default.createElement("section", {
|
|
382
382
|
className: "luna-super-hero luna-super-hero-".concat(variant, "-").concat(contentSide, " ").concat(paddingClass),
|
|
383
383
|
style: {
|
|
@@ -386,7 +386,7 @@ var renderVariantsOneToSeven = function renderVariantsOneToSeven(variant, conten
|
|
|
386
386
|
}, /*#__PURE__*/_react.default.createElement("aside", {
|
|
387
387
|
className: "luna-super-hero__image-wrapper luna-super-hero__image-wrapper-".concat(variant, "-").concat(contentSide, " ").concat(alignmentClass)
|
|
388
388
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
389
|
-
tabIndex: mouse ?
|
|
389
|
+
tabIndex: mouse ? "" : "1"
|
|
390
390
|
}, renderImage(image, focusedImage, variant)), /*#__PURE__*/_react.default.createElement(_Video.default, {
|
|
391
391
|
content: content
|
|
392
392
|
})), !modalDeployed && /*#__PURE__*/_react.default.createElement("aside", {
|
|
@@ -403,7 +403,10 @@ var renderVariantsOneToSeven = function renderVariantsOneToSeven(variant, conten
|
|
|
403
403
|
}
|
|
404
404
|
}, header), subHeader && /*#__PURE__*/_react.default.createElement("h5", {
|
|
405
405
|
className: "luna-super-hero__subHeader",
|
|
406
|
-
style: {
|
|
406
|
+
style: !text ? {
|
|
407
|
+
color: color,
|
|
408
|
+
marginBottom: "37px"
|
|
409
|
+
} : {
|
|
407
410
|
color: color
|
|
408
411
|
}
|
|
409
412
|
}, subHeader), text && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -419,7 +422,7 @@ var renderVariantsOneToSeven = function renderVariantsOneToSeven(variant, conten
|
|
|
419
422
|
url: cta.url,
|
|
420
423
|
text: cta.text,
|
|
421
424
|
className: // TODO this will change once we have themes and button styling/themes confirmed
|
|
422
|
-
(theme === null || theme === void 0 ? void 0 : theme.ctaOne) ? "ter-button--".concat(theme === null || theme === void 0 ? void 0 : theme.ctaOne) :
|
|
425
|
+
(theme === null || theme === void 0 ? void 0 : theme.ctaOne) ? "ter-button--".concat(theme === null || theme === void 0 ? void 0 : theme.ctaOne) : "ter-button--primary--1"
|
|
423
426
|
}), ctas && /*#__PURE__*/_react.default.createElement(_terraOne.CTASection, {
|
|
424
427
|
ctas: ctaRowOrColumn(ctas, variant)
|
|
425
428
|
}))));
|
|
@@ -431,26 +434,26 @@ var renderVariantsOneToSeven = function renderVariantsOneToSeven(variant, conten
|
|
|
431
434
|
exports.renderVariantsOneToSeven = renderVariantsOneToSeven;
|
|
432
435
|
|
|
433
436
|
var renderVariantEightToTen = function renderVariantEightToTen(variant, ContentComponent, contentSide, focusedImage, imageSizes, eyebrow, header, subHeader, text, cta, ctas, theme, Link, mouse, color, backgroundColor, dataPoints) {
|
|
434
|
-
if (checkForVariant(variant) ===
|
|
437
|
+
if (checkForVariant(variant) === "super-hero--fullscreen-components") {
|
|
435
438
|
var _focusedImage$focalPo2, _React$createElement;
|
|
436
439
|
|
|
437
440
|
return /*#__PURE__*/_react.default.createElement("section", {
|
|
438
|
-
className: "super-hero-fullscreen super-hero-fullscreen-".concat(variant, " ").concat((dataPoints === null || dataPoints === void 0 ? void 0 : dataPoints.length) ?
|
|
441
|
+
className: "super-hero-fullscreen super-hero-fullscreen-".concat(variant, " ").concat((dataPoints === null || dataPoints === void 0 ? void 0 : dataPoints.length) ? "super-hero-fullscreen--data-points" : ""),
|
|
439
442
|
style: {
|
|
440
|
-
backgroundColor: (theme === null || theme === void 0 ? void 0 : theme.backgroundColor) ||
|
|
443
|
+
backgroundColor: (theme === null || theme === void 0 ? void 0 : theme.backgroundColor) || "#F8F8FB"
|
|
441
444
|
}
|
|
442
445
|
}, /*#__PURE__*/_react.default.createElement(_reactAwesomeReveal.Fade, {
|
|
443
446
|
className: "super-hero-fullscreen__hero-image super-hero-fullscreen__hero-image-".concat(variant, "-").concat(contentSide, " super-hero-fullscreen--focused super-hero-fullscreen--focused-").concat(variant, "-").concat(contentSide)
|
|
444
447
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
445
|
-
tabIndex: mouse ?
|
|
448
|
+
tabIndex: mouse ? "" : "0"
|
|
446
449
|
}, (dataPoints === null || dataPoints === void 0 ? void 0 : dataPoints.length) && /*#__PURE__*/_react.default.createElement(_reactAwesomeReveal.Fade, {
|
|
447
450
|
className: "super-hero-fullscreen__data-points super-hero-fullscreen__data-points--mobile"
|
|
448
451
|
}, /*#__PURE__*/_react.default.createElement(_DataPoint.default, {
|
|
449
452
|
points: dataPoints,
|
|
450
|
-
variant:
|
|
453
|
+
variant: "variant_2A",
|
|
451
454
|
theme: {
|
|
452
|
-
color:
|
|
453
|
-
backgroundColor:
|
|
455
|
+
color: "#ffffff",
|
|
456
|
+
backgroundColor: "#0063A3"
|
|
454
457
|
}
|
|
455
458
|
})), /*#__PURE__*/_react.default.createElement(_terraOne.FocusedImage, {
|
|
456
459
|
focalPointImage: focusedImage === null || focusedImage === void 0 ? void 0 : focusedImage.focalPointImage,
|
|
@@ -461,10 +464,10 @@ var renderVariantEightToTen = function renderVariantEightToTen(variant, ContentC
|
|
|
461
464
|
className: "super-hero-fullscreen__data-points"
|
|
462
465
|
}, /*#__PURE__*/_react.default.createElement(_DataPoint.default, {
|
|
463
466
|
points: dataPoints,
|
|
464
|
-
variant:
|
|
467
|
+
variant: "variant_2A",
|
|
465
468
|
theme: {
|
|
466
|
-
color:
|
|
467
|
-
backgroundColor:
|
|
469
|
+
color: "#ffffff",
|
|
470
|
+
backgroundColor: "#0063A3"
|
|
468
471
|
}
|
|
469
472
|
})), /*#__PURE__*/_react.default.createElement(_reactAwesomeReveal.Fade, {
|
|
470
473
|
className: "super-hero-fullscreen__container super-hero-fullscreen__container-".concat(variant, "-").concat(contentSide)
|
|
@@ -482,7 +485,10 @@ var renderVariantEightToTen = function renderVariantEightToTen(variant, ContentC
|
|
|
482
485
|
}
|
|
483
486
|
}, header), subHeader && /*#__PURE__*/_react.default.createElement("h5", {
|
|
484
487
|
className: "super-hero-fullscreen__subHeader",
|
|
485
|
-
style: {
|
|
488
|
+
style: !text ? {
|
|
489
|
+
color: color,
|
|
490
|
+
marginBottom: "37px"
|
|
491
|
+
} : {
|
|
486
492
|
color: color
|
|
487
493
|
}
|
|
488
494
|
}, subHeader), text && /*#__PURE__*/_react.default.createElement("div", (_React$createElement = {
|
|
@@ -492,11 +498,11 @@ var renderVariantEightToTen = function renderVariantEightToTen(variant, ContentC
|
|
|
492
498
|
}), (0, _defineProperty2.default)(_React$createElement, "dangerouslySetInnerHTML", {
|
|
493
499
|
__html: text
|
|
494
500
|
}), _React$createElement)), !ctas && cta && /*#__PURE__*/_react.default.createElement(_terraOne.Button, {
|
|
495
|
-
tabIndex: mouse ?
|
|
501
|
+
tabIndex: mouse ? "" : "0",
|
|
496
502
|
Link: Link,
|
|
497
503
|
url: cta.url,
|
|
498
504
|
text: cta.text,
|
|
499
|
-
className: (theme === null || theme === void 0 ? void 0 : theme.ctaOne) ? "ter-button--".concat(theme === null || theme === void 0 ? void 0 : theme.ctaOne) :
|
|
505
|
+
className: (theme === null || theme === void 0 ? void 0 : theme.ctaOne) ? "ter-button--".concat(theme === null || theme === void 0 ? void 0 : theme.ctaOne) : "ter-button--primary--1"
|
|
500
506
|
}), ctas && /*#__PURE__*/_react.default.createElement(_terraOne.CTASection, {
|
|
501
507
|
ctas: ctas
|
|
502
508
|
})))));
|