luna-one 3.1.288 → 3.1.292
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.
- package/dist/index.js +8 -0
- package/dist/luna/components/BlockListItems/BlockListItems.scss +5 -1
- package/dist/luna/components/BlockListItems/BlockListItemsMethods.js +8 -0
- package/dist/luna/components/BlockListItems/UnboundedCards.js +114 -0
- package/dist/luna/components/UnboundedCard/CardLinkIcon.js +45 -0
- package/dist/luna/components/UnboundedCard/UnboundedCard.js +89 -0
- package/dist/luna/components/UnboundedCard/UnboundedCard.scss +76 -0
- package/dist/luna/components/UnboundedCard/UnboundedCardMethods.js +90 -0
- package/dist/luna/components/UnboundedCard/playIcon.svg +17 -0
- package/dist/luna/components/Video/Video.js +27 -1
- package/dist/luna/heroes/FullBackgroundHero/FullBackgroundHero.js +9 -4
- package/dist/luna/heroes/FullBackgroundHero/FullBackgroundHero.scss +3 -3
- package/dist/luna/utils/checkForDangerouslySet.js +32 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -317,6 +317,12 @@ Object.defineProperty(exports, "OverlayNotice", {
|
|
|
317
317
|
return _OverlayNotice.default;
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
|
+
Object.defineProperty(exports, "UnboundedCard", {
|
|
321
|
+
enumerable: true,
|
|
322
|
+
get: function get() {
|
|
323
|
+
return _UnboundedCard.default;
|
|
324
|
+
}
|
|
325
|
+
});
|
|
320
326
|
Object.defineProperty(exports, "VideoComponent", {
|
|
321
327
|
enumerable: true,
|
|
322
328
|
get: function get() {
|
|
@@ -590,6 +596,8 @@ var _HTMLEmbed = _interopRequireDefault(require("./luna/components/HTMLEmbed/HTM
|
|
|
590
596
|
|
|
591
597
|
var _OverlayNotice = _interopRequireDefault(require("./luna/components/OverlayNotice/OverlayNotice"));
|
|
592
598
|
|
|
599
|
+
var _UnboundedCard = _interopRequireDefault(require("./luna/components/UnboundedCard/UnboundedCard"));
|
|
600
|
+
|
|
593
601
|
var _Video = _interopRequireDefault(require("./luna/components/Video/Video"));
|
|
594
602
|
|
|
595
603
|
var _FooterHandler = _interopRequireDefault(require("./application/components/FooterHandler/FooterHandler"));
|
|
@@ -9,8 +9,12 @@
|
|
|
9
9
|
grid-template-columns: repeat(3, 1fr);
|
|
10
10
|
grid-gap: 24px;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
@media screen and (max-width: $breakpoint-sm) {
|
|
14
|
+
grid-template-columns: repeat(2, 1fr);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@media screen and (max-width: $breakpoint-xs) {
|
|
14
18
|
grid-template-columns: repeat(1, 1fr);
|
|
15
19
|
grid-gap: 20px;
|
|
16
20
|
}
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _BoundedCards = _interopRequireDefault(require("./BoundedCards"));
|
|
13
13
|
|
|
14
|
+
var _UnboundedCards = _interopRequireDefault(require("./UnboundedCards"));
|
|
15
|
+
|
|
14
16
|
var _IconMiniBlocks = _interopRequireDefault(require("./IconMiniBlocks"));
|
|
15
17
|
|
|
16
18
|
var _IconListItemBlocks = _interopRequireDefault(require("./IconListItemBlocks"));
|
|
@@ -25,6 +27,12 @@ var renderBlockListItems = function renderBlockListItems(content, motion, type)
|
|
|
25
27
|
motion: motion
|
|
26
28
|
});
|
|
27
29
|
|
|
30
|
+
case "unbounded_cards":
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_UnboundedCards.default, {
|
|
32
|
+
content: content,
|
|
33
|
+
motion: motion
|
|
34
|
+
});
|
|
35
|
+
|
|
28
36
|
case "icon_mini_blocks":
|
|
29
37
|
return /*#__PURE__*/_react.default.createElement(_IconMiniBlocks.default, {
|
|
30
38
|
content: content,
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _UnboundedCard = require("../UnboundedCard/UnboundedCard");
|
|
13
|
+
|
|
14
|
+
require("./BlockListItems.scss");
|
|
15
|
+
|
|
16
|
+
var imageSizes = {
|
|
17
|
+
thumbnail: {
|
|
18
|
+
desktop: {
|
|
19
|
+
width: 275,
|
|
20
|
+
height: 180,
|
|
21
|
+
ratio: {
|
|
22
|
+
width: 55,
|
|
23
|
+
height: 36
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
tablet: {
|
|
27
|
+
width: 395,
|
|
28
|
+
height: 254,
|
|
29
|
+
ratio: {
|
|
30
|
+
width: 14,
|
|
31
|
+
height: 9
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
mobile: {
|
|
35
|
+
width: 600,
|
|
36
|
+
height: 386,
|
|
37
|
+
ratio: {
|
|
38
|
+
width: 14,
|
|
39
|
+
height: 9
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
modal: {
|
|
44
|
+
desktop: {
|
|
45
|
+
width: 1120,
|
|
46
|
+
height: 630,
|
|
47
|
+
ratio: {
|
|
48
|
+
width: 16,
|
|
49
|
+
height: 9
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
tablet: {
|
|
53
|
+
width: 840,
|
|
54
|
+
height: 475,
|
|
55
|
+
ratio: {
|
|
56
|
+
width: 168,
|
|
57
|
+
height: 95
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
mobile: {
|
|
61
|
+
width: 280,
|
|
62
|
+
height: 158,
|
|
63
|
+
ratio: {
|
|
64
|
+
width: 140,
|
|
65
|
+
height: 79
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var UnboundedCards = function UnboundedCards(_ref) {
|
|
72
|
+
var content = _ref.content,
|
|
73
|
+
motion = _ref.motion;
|
|
74
|
+
var GatsbyImage = content === null || content === void 0 ? void 0 : content.GatsbyImage;
|
|
75
|
+
var Link = content === null || content === void 0 ? void 0 : content.Link;
|
|
76
|
+
|
|
77
|
+
var renderUnboundedCards = function renderUnboundedCards() {
|
|
78
|
+
var _content$cards;
|
|
79
|
+
|
|
80
|
+
if ((content === null || content === void 0 ? void 0 : content.cards) && (content === null || content === void 0 ? void 0 : (_content$cards = content.cards) === null || _content$cards === void 0 ? void 0 : _content$cards.length)) {
|
|
81
|
+
return content.cards.map(function (card, index) {
|
|
82
|
+
var cardContent = {
|
|
83
|
+
eyebrow: card === null || card === void 0 ? void 0 : card.eyebrow,
|
|
84
|
+
header: card === null || card === void 0 ? void 0 : card.header,
|
|
85
|
+
image: card === null || card === void 0 ? void 0 : card.image,
|
|
86
|
+
imageSizes: imageSizes,
|
|
87
|
+
displayButton: content === null || content === void 0 ? void 0 : content.displayButton,
|
|
88
|
+
cardLink: card === null || card === void 0 ? void 0 : card.cardLink,
|
|
89
|
+
text: card === null || card === void 0 ? void 0 : card.text,
|
|
90
|
+
GatsbyImage: GatsbyImage,
|
|
91
|
+
Link: Link,
|
|
92
|
+
cardAlignment: content === null || content === void 0 ? void 0 : content.cardAlignment,
|
|
93
|
+
buttonSecondary: content === null || content === void 0 ? void 0 : content.buttonSecondary,
|
|
94
|
+
modalType: card === null || card === void 0 ? void 0 : card.modalType,
|
|
95
|
+
modalContent: card === null || card === void 0 ? void 0 : card.modalContent
|
|
96
|
+
};
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement(_UnboundedCard.UnboundedCard, {
|
|
98
|
+
key: index,
|
|
99
|
+
content: cardContent,
|
|
100
|
+
motion: motion ? motion : null
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return null;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
return /*#__PURE__*/_react.default.createElement("section", {
|
|
109
|
+
className: "ter-bounded-cards"
|
|
110
|
+
}, renderUnboundedCards());
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
var _default = UnboundedCards;
|
|
114
|
+
exports.default = _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.CardLinkIcon = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var CardLinkIcon = function CardLinkIcon(_ref) {
|
|
13
|
+
var iconClass = _ref.iconClass,
|
|
14
|
+
external = _ref.external;
|
|
15
|
+
|
|
16
|
+
if (external) {
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
+
className: "".concat(iconClass, " external-arrow")
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
20
|
+
width: "24",
|
|
21
|
+
height: "24",
|
|
22
|
+
viewBox: "0 0 24 24",
|
|
23
|
+
fill: "none",
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
26
|
+
"fill-rule": "evenodd",
|
|
27
|
+
"clip-rule": "evenodd",
|
|
28
|
+
d: "M18.9814 5.56388C18.9326 5.44487 18.8599 5.33338 18.7633 5.23674C18.568 5.04147 18.3121 4.94384 18.0562 4.94384C18.0561 4.94384 18.056 4.94384 18.056 4.94384H8.2149C7.66261 4.94384 7.2149 5.39156 7.2149 5.94384C7.2149 6.49613 7.66261 6.94384 8.2149 6.94384H15.6419L5.23673 17.3491C4.84621 17.7396 4.84621 18.3727 5.23673 18.7633C5.62726 19.1538 6.26042 19.1538 6.65095 18.7633L17.0562 8.35806V15.7851C17.0562 16.3374 17.5039 16.7851 18.0562 16.7851C18.6084 16.7851 19.0562 16.3374 19.0562 15.7851V5.94634C19.0562 5.93828 19.0561 5.93022 19.0559 5.92216C19.0532 5.79554 19.027 5.67471 18.9814 5.56388Z",
|
|
29
|
+
fill: "#252A2E"
|
|
30
|
+
})));
|
|
31
|
+
} else {
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
className: iconClass
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
35
|
+
fill: "currentColor",
|
|
36
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37
|
+
viewBox: "0 0 21 20"
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
39
|
+
d: "M10.5 9V6l4 4-4 4v-3h-4V9h4zm0-9c5.52 0 10 4.48 10 10s-4.48 10-10 10-10-4.48-10-10 4.48-10 10-10zm0 18c4.42 0 8-3.58 8-8s-3.58-8-8-8-8 3.58-8 8 3.58 8 8 8z",
|
|
40
|
+
fill: "currentColor"
|
|
41
|
+
})));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
exports.CardLinkIcon = CardLinkIcon;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.UnboundedCard = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
require("./UnboundedCard.scss");
|
|
11
|
+
|
|
12
|
+
var _reactAwesomeReveal = require("react-awesome-reveal");
|
|
13
|
+
|
|
14
|
+
var _checkForDangerouslySet = require("../../utils/checkForDangerouslySet");
|
|
15
|
+
|
|
16
|
+
var _CardLinkIcon = require("./CardLinkIcon");
|
|
17
|
+
|
|
18
|
+
var _UnboundedCardMethods = require("./UnboundedCardMethods");
|
|
19
|
+
|
|
20
|
+
var _useVideo2 = require("../../utils/hooks/useVideo");
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
var UnboundedCard = function UnboundedCard(_ref) {
|
|
27
|
+
var _ref$content = _ref.content,
|
|
28
|
+
content = _ref$content === void 0 ? {} : _ref$content,
|
|
29
|
+
motion = _ref.motion;
|
|
30
|
+
var image = content.image,
|
|
31
|
+
imageSizes = content.imageSizes,
|
|
32
|
+
eyebrow = content.eyebrow,
|
|
33
|
+
header = content.header,
|
|
34
|
+
text = content.text,
|
|
35
|
+
Link = content.Link,
|
|
36
|
+
cardAlignment = content.cardAlignment,
|
|
37
|
+
displayButton = content.displayButton,
|
|
38
|
+
buttonSecondary = content.buttonSecondary,
|
|
39
|
+
cardLink = content.cardLink,
|
|
40
|
+
modalContent = content.modalContent,
|
|
41
|
+
modalType = content.modalType;
|
|
42
|
+
|
|
43
|
+
var _useVideo = (0, _useVideo2.useVideo)(false, false, false),
|
|
44
|
+
modalDeployed = _useVideo.modalDeployed,
|
|
45
|
+
deployModal = _useVideo.deployModal,
|
|
46
|
+
hideModal = _useVideo.hideModal;
|
|
47
|
+
|
|
48
|
+
if (buttonSecondary) {
|
|
49
|
+
cardLink.type = "ter-button--primary--2";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
var componentBody = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _UnboundedCardMethods.renderCardImage)(image === null || image === void 0 ? void 0 : image.focalPointImage, imageSizes, modalContent, modalType, deployModal, hideModal, modalDeployed), /*#__PURE__*/_react.default.createElement("div", {
|
|
53
|
+
className: "ter-bounded-card__body"
|
|
54
|
+
}, eyebrow && /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
+
className: "ter-bounded-card__eyebrow"
|
|
56
|
+
}, eyebrow), header && /*#__PURE__*/_react.default.createElement("h4", {
|
|
57
|
+
className: "ter-bounded-card__header"
|
|
58
|
+
}, header), text && (0, _checkForDangerouslySet.checkAndSet)(text, "ter-bounded-card"), cardLink && displayButton && /*#__PURE__*/_react.default.createElement("div", {
|
|
59
|
+
className: "ter-bounded-card__link-holder"
|
|
60
|
+
}, (0, _UnboundedCardMethods.renderButton)(cardLink, Link)), cardLink && !displayButton && /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
className: "ter-bounded-card__link-holder"
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
63
|
+
target: (cardLink === null || cardLink === void 0 ? void 0 : cardLink.external) === false ? "_self" : "_blank",
|
|
64
|
+
className: "ter-bounded-card__link",
|
|
65
|
+
href: cardLink === null || cardLink === void 0 ? void 0 : cardLink.url,
|
|
66
|
+
rel: "noreferrer noopener"
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
68
|
+
className: "ter-bounded-card__link-text"
|
|
69
|
+
}, cardLink === null || cardLink === void 0 ? void 0 : cardLink.text), /*#__PURE__*/_react.default.createElement(_CardLinkIcon.CardLinkIcon, {
|
|
70
|
+
iconClass: "ter-bounded-card__link-icon",
|
|
71
|
+
external: cardLink === null || cardLink === void 0 ? void 0 : cardLink.external
|
|
72
|
+
})))));
|
|
73
|
+
|
|
74
|
+
if (motion) {
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement(_reactAwesomeReveal.Fade, {
|
|
76
|
+
direction: "up",
|
|
77
|
+
delay: 200,
|
|
78
|
+
triggerOnce: true,
|
|
79
|
+
cascade: true,
|
|
80
|
+
className: "ter-bounded-card ter-bounded-card--unbounded \n ".concat(cardAlignment ? "ter-bounded-card--reverse" : "", " \n ").concat(displayButton ? "ter-bounded-card--with-button" : "", " \n ")
|
|
81
|
+
}, componentBody);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
+
className: "ter-bounded-card ter-bounded-card--unbounded \n ".concat(cardAlignment ? "ter-bounded-card--reverse" : "", " \n ").concat(displayButton ? "ter-bounded-card--with-button" : "", " \n ")
|
|
86
|
+
}, componentBody);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
exports.UnboundedCard = UnboundedCard;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
@import "../../../global-styles/terra.scss";
|
|
2
|
+
|
|
3
|
+
.ter-bounded-card.ter-bounded-card--unbounded {
|
|
4
|
+
box-shadow: none;
|
|
5
|
+
background-color: transparent;
|
|
6
|
+
.ter-bounded-card__text {
|
|
7
|
+
flex-grow: 0;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ter-unbounded-card__image--with-modal {
|
|
12
|
+
position: relative;
|
|
13
|
+
&:hover .ter-unbounded-card__play-button {
|
|
14
|
+
transform: translateX(-50%) translateY(-50%) scale(1.2);
|
|
15
|
+
-webkit-transform: translateX(-50%) translateY(-50%) scale(1.2);
|
|
16
|
+
}
|
|
17
|
+
& > .ter-focused-image-container {
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ter-unbounded-card__play-button {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 50%;
|
|
25
|
+
left: 50%;
|
|
26
|
+
transform: translateX(-50%) translateY(-50%);
|
|
27
|
+
width: 60px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ter-unbounded-card-modal {
|
|
31
|
+
position: fixed;
|
|
32
|
+
top: 0;
|
|
33
|
+
bottom: 0;
|
|
34
|
+
right: 0;
|
|
35
|
+
left: 0;
|
|
36
|
+
z-index: 100;
|
|
37
|
+
transition: 0.3s;
|
|
38
|
+
animation: fade-in 0.5s linear;
|
|
39
|
+
height: 100%;
|
|
40
|
+
width: 100%;
|
|
41
|
+
opacity:0;
|
|
42
|
+
background: rgba(0, 0, 0, 0.7);
|
|
43
|
+
visibility: hidden;
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
&--deployed {
|
|
46
|
+
visibility: visible;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
opacity: 1;
|
|
49
|
+
transform: translateY(0);
|
|
50
|
+
}
|
|
51
|
+
&__close-wrapper {
|
|
52
|
+
height: 70px;
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: flex-end;
|
|
55
|
+
pointer-events: auto;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
}
|
|
58
|
+
&__close-button {
|
|
59
|
+
margin: 20px 50px 12px 50px;
|
|
60
|
+
display: inline-block;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ter-unbounded-card-modal--deployed .ter-focused-image-container {
|
|
65
|
+
max-width: 1120px;
|
|
66
|
+
max-height: 675px;
|
|
67
|
+
margin: 0 auto;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.video-modal-deployed .ter-bounded-cards {
|
|
71
|
+
// solves some strange behavior where the background cards were clickable while modal deployed
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
.luna-super-hero__modal {
|
|
74
|
+
pointer-events: auto;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.renderButton = exports.renderCardImage = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _terraOne = _interopRequireWildcard(require("terra-one"));
|
|
13
|
+
|
|
14
|
+
var _Video = _interopRequireDefault(require("../Video/Video"));
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
var renderCardImage = function renderCardImage(image, imageSizes, modalContent, modalType, deployModal, hideModal, modalDeployed) {
|
|
21
|
+
if (image && (modalContent === null || modalContent === void 0 ? void 0 : modalContent.video) && modalType && modalType !== "No Modal") {
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement("figure", {
|
|
23
|
+
className: "ter-bounded-card__image ter-unbounded-card__image--with-modal"
|
|
24
|
+
}, /*#__PURE__*/_react.default.createElement(_Video.default, {
|
|
25
|
+
content: modalContent
|
|
26
|
+
}));
|
|
27
|
+
} else if (image && imageSizes && modalType && modalType !== "No Modal") {
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("figure", {
|
|
29
|
+
className: "ter-bounded-card__image ter-unbounded-card__image--with-modal",
|
|
30
|
+
onClick: function onClick() {
|
|
31
|
+
return deployModal();
|
|
32
|
+
}
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_terraOne.FocusedImage, {
|
|
34
|
+
focalPointImage: image,
|
|
35
|
+
alt: image === null || image === void 0 ? void 0 : image.title,
|
|
36
|
+
fullHeightWrapper: true,
|
|
37
|
+
imageSizes: imageSizes.thumbnail
|
|
38
|
+
})), renderModal(modalType, imageSizes, image, modalDeployed, hideModal));
|
|
39
|
+
} else {
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement("figure", {
|
|
41
|
+
className: "ter-bounded-card__image"
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_terraOne.FocusedImage, {
|
|
43
|
+
focalPointImage: image && image,
|
|
44
|
+
alt: image === null || image === void 0 ? void 0 : image.title,
|
|
45
|
+
fullHeightWrapper: true,
|
|
46
|
+
imageSizes: imageSizes.thumbnail
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports.renderCardImage = renderCardImage;
|
|
52
|
+
|
|
53
|
+
var renderModal = function renderModal(modalType, imageSizes, modalContent, modalDeployed, hideModal) {
|
|
54
|
+
if (modalType === "Image") {
|
|
55
|
+
return modalDeployed && /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
+
className: "ter-unbounded-card-modal ".concat(modalDeployed ? "ter-unbounded-card-modal--deployed" : "")
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
className: "ter-unbounded-card-modal__close-wrapper",
|
|
59
|
+
onClick: function onClick() {
|
|
60
|
+
hideModal();
|
|
61
|
+
}
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement(_terraOne.Icon, {
|
|
63
|
+
color: "#ffffff",
|
|
64
|
+
type: "ter-icon--open-x-dark-48px",
|
|
65
|
+
size: "32px",
|
|
66
|
+
className: "ter-unbounded-card-modal__close-button"
|
|
67
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
className: "default-layout"
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement(_terraOne.FocusedImage, {
|
|
70
|
+
focalPointImage: modalContent,
|
|
71
|
+
alt: modalContent === null || modalContent === void 0 ? void 0 : modalContent.title,
|
|
72
|
+
fullHeightWrapper: true,
|
|
73
|
+
imageSizes: imageSizes.modal
|
|
74
|
+
})));
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var renderButton = function renderButton(buttonContent, Link) {
|
|
79
|
+
return /*#__PURE__*/_react.default.createElement(_terraOne.default, {
|
|
80
|
+
name: (buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.name) || null,
|
|
81
|
+
text: (buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.text) || null,
|
|
82
|
+
className: (buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.type) || "ter-button--primary--1",
|
|
83
|
+
onClick: (buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.onClick) || null,
|
|
84
|
+
url: (buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.url) || null,
|
|
85
|
+
external: (buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.external) || false,
|
|
86
|
+
Link: Link
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
exports.renderButton = renderButton;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<svg width="88" height="88" viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g filter="url(#filter0_d)">
|
|
3
|
+
<circle cx="44" cy="42" r="36" fill="white"/>
|
|
4
|
+
<path d="M58.0834 41.0402L37.8366 28.6668C37.6661 28.5626 37.4709 28.5057 37.2711 28.502C37.0712 28.4982 36.874 28.5478 36.6997 28.6455C36.5254 28.7433 36.3803 28.8857 36.2793 29.0582C36.1782 29.2307 36.125 29.4269 36.125 29.6268V54.3736C36.125 54.5734 36.1782 54.7697 36.2793 54.9421C36.3803 55.1146 36.5254 55.257 36.6997 55.3548C36.874 55.4526 37.0712 55.5021 37.2711 55.4984C37.4709 55.4946 37.6661 55.4377 37.8366 55.3335L58.0834 42.9601C58.2478 42.8596 58.3837 42.7186 58.4779 42.5505C58.5722 42.3824 58.6217 42.1929 58.6217 42.0002C58.6217 41.8075 58.5722 41.618 58.4779 41.4499C58.3837 41.2818 58.2478 41.1407 58.0834 41.0402Z" fill="#4DA2D3"/>
|
|
5
|
+
</g>
|
|
6
|
+
<defs>
|
|
7
|
+
<filter id="filter0_d" x="0" y="0" width="88" height="88" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
8
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
9
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
10
|
+
<feOffset dy="2"/>
|
|
11
|
+
<feGaussianBlur stdDeviation="4"/>
|
|
12
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.19 0"/>
|
|
13
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
|
14
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
|
15
|
+
</filter>
|
|
16
|
+
</defs>
|
|
17
|
+
</svg>
|
|
@@ -336,6 +336,32 @@ var imageSizes = {
|
|
|
336
336
|
height: 2
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
+
},
|
|
340
|
+
unbounded_cards: {
|
|
341
|
+
desktop: {
|
|
342
|
+
width: 275,
|
|
343
|
+
height: 180,
|
|
344
|
+
ratio: {
|
|
345
|
+
width: 55,
|
|
346
|
+
height: 36
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
tablet: {
|
|
350
|
+
width: 275,
|
|
351
|
+
height: 180,
|
|
352
|
+
ratio: {
|
|
353
|
+
width: 55,
|
|
354
|
+
height: 36
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
mobile: {
|
|
358
|
+
width: 275,
|
|
359
|
+
height: 180,
|
|
360
|
+
ratio: {
|
|
361
|
+
width: 55,
|
|
362
|
+
height: 36
|
|
363
|
+
}
|
|
364
|
+
}
|
|
339
365
|
}
|
|
340
366
|
};
|
|
341
367
|
exports.imageSizes = imageSizes;
|
|
@@ -357,7 +383,7 @@ var renderVideo = function renderVideo(video, thumbnail, hovering, modalDeployed
|
|
|
357
383
|
}
|
|
358
384
|
}, /*#__PURE__*/_react.default.createElement(_terraOne.Icon, {
|
|
359
385
|
color: "#ffffff",
|
|
360
|
-
type: "open-x-dark-48px",
|
|
386
|
+
type: "ter-icon--open-x-dark-48px",
|
|
361
387
|
size: "32px",
|
|
362
388
|
className: "luna-super-hero__close-button"
|
|
363
389
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -22,8 +22,6 @@ var _useStyles2 = _interopRequireDefault(require("../../utils/hooks/useStyles"))
|
|
|
22
22
|
var _reactAwesomeReveal = require("react-awesome-reveal");
|
|
23
23
|
|
|
24
24
|
var FullBackgroundHero = function FullBackgroundHero(_ref) {
|
|
25
|
-
var _rightContent$type;
|
|
26
|
-
|
|
27
25
|
var content = _ref.content,
|
|
28
26
|
theme = _ref.theme,
|
|
29
27
|
motion = _ref.motion,
|
|
@@ -38,7 +36,8 @@ var FullBackgroundHero = function FullBackgroundHero(_ref) {
|
|
|
38
36
|
_content$shapeType = content.shapeType,
|
|
39
37
|
shapeType = _content$shapeType === void 0 ? 'square' : _content$shapeType,
|
|
40
38
|
_content$shapeBorderC = content.shapeBorderColor,
|
|
41
|
-
shapeBorderColor = _content$shapeBorderC === void 0 ? '#F1F1F6' : _content$shapeBorderC
|
|
39
|
+
shapeBorderColor = _content$shapeBorderC === void 0 ? '#F1F1F6' : _content$shapeBorderC,
|
|
40
|
+
rightContentType = content.rightContentType;
|
|
42
41
|
|
|
43
42
|
var _useWindowSize = (0, _useWindowSize2.default)(),
|
|
44
43
|
size = _useWindowSize.size;
|
|
@@ -48,8 +47,14 @@ var FullBackgroundHero = function FullBackgroundHero(_ref) {
|
|
|
48
47
|
var _useStyles = (0, _useStyles2.default)(themes),
|
|
49
48
|
backgroundColor = _useStyles.backgroundColor;
|
|
50
49
|
|
|
50
|
+
var twoByTwoModifier = "";
|
|
51
|
+
|
|
52
|
+
if (rightContentType) {
|
|
53
|
+
twoByTwoModifier = rightContentType === 'Contentful2X2' ? 'luna-full-background-hero--2x2' : "";
|
|
54
|
+
}
|
|
55
|
+
|
|
51
56
|
return /*#__PURE__*/_react.default.createElement("section", {
|
|
52
|
-
className: "\n luna-full-background-hero \n luna-full-background-hero-".concat(variant, " ").concat(paddingClass, " \n ").concat(
|
|
57
|
+
className: "\n luna-full-background-hero \n luna-full-background-hero-".concat(variant, " ").concat(paddingClass, " \n ").concat(twoByTwoModifier, "\n "),
|
|
53
58
|
style: {
|
|
54
59
|
background: backgroundColor
|
|
55
60
|
}
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
min-height: 100vh;
|
|
17
17
|
|
|
18
18
|
@media screen and (min-width: $breakpoint-md) {
|
|
19
|
-
min-height: calc(100vh -
|
|
20
|
-
height:
|
|
19
|
+
min-height: calc(100vh - 105px);
|
|
20
|
+
height: calc(100vh - 105px);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
@media screen and (max-width: $breakpoint-md) {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
&--2x2 {
|
|
93
|
-
min-height:
|
|
93
|
+
min-height: 850px;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
&__image-wrapper {
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
|
-
exports.default = void 0;
|
|
8
|
+
exports.checkAndSet = exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
7
12
|
var tags = ["<p", "<a", "<im", "<h1", "<h2", "<h3", "<h4", "<h5", "<h6", "<di", "<sp", "<ul", "<ol", "<li", "<a ", "<ta"];
|
|
8
13
|
|
|
9
|
-
var
|
|
14
|
+
var checkForDangerouslySet = function checkForDangerouslySet(text) {
|
|
10
15
|
if (typeof text !== "string") {
|
|
11
16
|
return false;
|
|
12
17
|
}
|
|
@@ -23,4 +28,28 @@ var _default = function _default(text) {
|
|
|
23
28
|
}
|
|
24
29
|
};
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
var _default = checkForDangerouslySet;
|
|
32
|
+
exports.default = _default;
|
|
33
|
+
|
|
34
|
+
var checkAndSet = function checkAndSet(text, classNamePrefix, classNameSuffix, color) {
|
|
35
|
+
if (checkForDangerouslySet(text)) {
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
+
className: "".concat(classNamePrefix, "__").concat(classNameSuffix || "text-holder"),
|
|
38
|
+
style: {
|
|
39
|
+
color: color || "#242D2F"
|
|
40
|
+
},
|
|
41
|
+
dangerouslySetInnerHTML: {
|
|
42
|
+
__html: text
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
} else {
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement("p", {
|
|
47
|
+
className: "".concat(classNamePrefix, "__").concat(classNameSuffix || "text"),
|
|
48
|
+
style: {
|
|
49
|
+
color: color || "#242D2F"
|
|
50
|
+
}
|
|
51
|
+
}, text);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
exports.checkAndSet = checkAndSet;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "luna-one",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.292",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@storybook/addon-knobs": "^6.3.1",
|
|
6
6
|
"@testing-library/jest-dom": "^5.11.9",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"react-scroll": "^1.7.14",
|
|
23
23
|
"react-slidedown": "^2.4.5",
|
|
24
24
|
"smoothscroll-polyfill": "^0.4.4",
|
|
25
|
-
"terra-one": "
|
|
25
|
+
"terra-one": "~3.0.100"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"node-sass": "^4.12.0",
|