luna-one 3.1.545 → 3.1.546

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.
@@ -104,7 +104,8 @@ var UnboundedCards = function UnboundedCards(_ref) {
104
104
  modalContent: card === null || card === void 0 ? void 0 : card.modalContent,
105
105
  setOverride: card === null || card === void 0 ? void 0 : card.setOverride,
106
106
  override: card === null || card === void 0 ? void 0 : card.override,
107
- video: card === null || card === void 0 ? void 0 : card.video
107
+ video: card === null || card === void 0 ? void 0 : card.video,
108
+ onClick: card === null || card === void 0 ? void 0 : card.onClick
108
109
  };
109
110
 
110
111
  if (cardContent !== null && cardContent !== void 0 && cardContent.cardLink) {
@@ -43,7 +43,8 @@ var CTAButtons = function CTAButtons(_ref) {
43
43
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_terraOne.Button, {
44
44
  key: "button-".concat(variant ? variant + "-" : "").concat(index),
45
45
  className: (index + 1) % 2 !== 0 ? buttonsVariants === null || buttonsVariants === void 0 ? void 0 : buttonsVariants.primary : buttonsVariants === null || buttonsVariants === void 0 ? void 0 : buttonsVariants.secondary,
46
- url: button === null || button === void 0 ? void 0 : button.url
46
+ url: button === null || button === void 0 ? void 0 : button.url,
47
+ onClick: button === null || button === void 0 ? void 0 : button.onClick
47
48
  }, button.text));
48
49
  } else {
49
50
  return renderButtonWithVideo(button, index, buttonsVariants, variant);
@@ -110,16 +110,18 @@ var CtaWithHeader = function CtaWithHeader(_ref) {
110
110
  override: button === null || button === void 0 ? void 0 : button.override,
111
111
  setOverride: button === null || button === void 0 ? void 0 : button.setOverride,
112
112
  VideoComponent: _Video["default"] ? _Video["default"] : null,
113
- Link: Link
113
+ Link: Link,
114
+ onClick: button === null || button === void 0 ? void 0 : button.onClick
114
115
  }, button.text)) : /*#__PURE__*/_react["default"].createElement(_terraOne.Button, {
115
116
  key: index,
116
117
  className: (index + 1) % 2 !== 0 ? (_buttonsVarians = buttonsVarians) === null || _buttonsVarians === void 0 ? void 0 : _buttonsVarians.primary : (_buttonsVarians2 = buttonsVarians) === null || _buttonsVarians2 === void 0 ? void 0 : _buttonsVarians2.secondary,
117
- url: button.url,
118
+ url: button === null || button === void 0 ? void 0 : button.url,
118
119
  video: button === null || button === void 0 ? void 0 : button.video,
119
120
  override: button === null || button === void 0 ? void 0 : button.override,
120
121
  setOverride: button === null || button === void 0 ? void 0 : button.setOverride,
121
122
  VideoComponent: _Video["default"] ? _Video["default"] : null,
122
- Link: !external && Link
123
+ Link: !external && Link,
124
+ onClick: button === null || button === void 0 ? void 0 : button.onClick
123
125
  }, button.text && button.text));
124
126
  })));
125
127
  };
@@ -181,14 +181,14 @@
181
181
  flex-direction: row;
182
182
  flex-wrap: wrap;
183
183
 
184
- a {
184
+ a, button {
185
185
  margin: 40px 32px 0 0;
186
186
  height: unset !important;
187
187
  white-space: pre-wrap;
188
188
  }
189
189
 
190
190
  &--multiple {
191
- a.ter-button + a.ter-button {
191
+ a.ter-button + a.ter-button, button.ter-button + button.ter-button {
192
192
  margin-top: 40px;
193
193
  }
194
194
  @media (max-width: $breakpoint-xs) {
@@ -54,7 +54,8 @@ var LinkList = function LinkList(_ref) {
54
54
  icon: link === null || link === void 0 ? void 0 : link.icon,
55
55
  Link: link === null || link === void 0 ? void 0 : link.Link,
56
56
  video: link === null || link === void 0 ? void 0 : link.video,
57
- setVisible: setVisible
57
+ setVisible: setVisible,
58
+ onClick: link === null || link === void 0 ? void 0 : link.onClick
58
59
  });
59
60
  }));
60
61
  };
@@ -19,7 +19,7 @@ var _terraOne = require("terra-one");
19
19
 
20
20
  var _Video = _interopRequireDefault(require("../Video/Video"));
21
21
 
22
- var renderGatsbyLinkOrAnchorTag = function renderGatsbyLinkOrAnchorTag(linkText, destination, theme, mouse, icon, external, Link, video, override, setOverride, setVisible) {
22
+ var renderGatsbyLinkOrAnchorTag = function renderGatsbyLinkOrAnchorTag(linkText, destination, theme, mouse, icon, external, Link, video, override, setOverride, setVisible, onClick) {
23
23
  var _theme$color;
24
24
 
25
25
  if (override) {
@@ -42,7 +42,8 @@ var renderGatsbyLinkOrAnchorTag = function renderGatsbyLinkOrAnchorTag(linkText,
42
42
  setOverride: setOverride ? setOverride : null,
43
43
  override: override ? override : null,
44
44
  children: linkText,
45
- video: video ? video : null
45
+ video: video ? video : null,
46
+ onClick: onClick
46
47
  });
47
48
  };
48
49
 
@@ -55,7 +56,8 @@ var SingleLink = function SingleLink(_ref) {
55
56
  external = _ref.external,
56
57
  Link = _ref.Link,
57
58
  video = _ref.video,
58
- setVisible = _ref.setVisible;
59
+ setVisible = _ref.setVisible,
60
+ onClick = _ref.onClick;
59
61
 
60
62
  var _useState = (0, _react.useState)(false),
61
63
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
@@ -64,7 +66,7 @@ var SingleLink = function SingleLink(_ref) {
64
66
 
65
67
  return /*#__PURE__*/_react["default"].createElement("div", {
66
68
  className: "luna-link"
67
- }, renderGatsbyLinkOrAnchorTag(linkText, destination, theme, mouse, icon, external, Link, video, override, setOverride, setVisible), icon && external && (0, _interalExternalArrows.arrowDiagonalRight)(theme === null || theme === void 0 ? void 0 : theme.color), icon && !external && (0, _interalExternalArrows.arrowRight)(theme === null || theme === void 0 ? void 0 : theme.color));
69
+ }, renderGatsbyLinkOrAnchorTag(linkText, destination, theme, mouse, icon, external, Link, video, override, setOverride, setVisible, onClick), icon && external && (0, _interalExternalArrows.arrowDiagonalRight)(theme === null || theme === void 0 ? void 0 : theme.color), icon && !external && (0, _interalExternalArrows.arrowRight)(theme === null || theme === void 0 ? void 0 : theme.color));
68
70
  };
69
71
 
70
72
  exports.SingleLink = SingleLink;
@@ -63,11 +63,12 @@ var SummaryCard = function SummaryCard(summaryCard, labels, version) {
63
63
  className: "product-summary-card--container__regions"
64
64
  }, (labels === null || labels === void 0 ? void 0 : labels.regionsLabel) && /*#__PURE__*/_react["default"].createElement("h1", {
65
65
  className: "product-summary-card--container__regions-label"
66
- }, labels === null || labels === void 0 ? void 0 : labels.regionsLabel), renderRegions()), cta && (cta === null || cta === void 0 ? void 0 : cta.url) && (cta === null || cta === void 0 ? void 0 : cta.text) && /*#__PURE__*/_react["default"].createElement("div", {
66
+ }, labels === null || labels === void 0 ? void 0 : labels.regionsLabel), renderRegions()), cta && /*#__PURE__*/_react["default"].createElement("div", {
67
67
  className: "product-summary-card--container__link"
68
68
  }, /*#__PURE__*/_react["default"].createElement(_terraOne.LunaLink, {
69
69
  className: external ? "text-link-external" : "text-link",
70
- to: cta === null || cta === void 0 ? void 0 : cta.url
70
+ to: cta === null || cta === void 0 ? void 0 : cta.url,
71
+ onClick: cta === null || cta === void 0 ? void 0 : cta.onClick
71
72
  }, cta === null || cta === void 0 ? void 0 : cta.text))), version && /*#__PURE__*/_react["default"].createElement("div", {
72
73
  className: "product-summary-card__version"
73
74
  }, /*#__PURE__*/_react["default"].createElement("p", {
@@ -110,7 +111,7 @@ var renderBulletsOrLinks = function renderBulletsOrLinks(type, list) {
110
111
  if (list && list.length) {
111
112
  if (type === "links") {
112
113
  return list.map(function (item, i) {
113
- var external = (0, _checkForExternalLink["default"])(item === null || item === void 0 ? void 0 : item.url);
114
+ var external = item !== null && item !== void 0 && item.type && (item === null || item === void 0 ? void 0 : item.type) === "pdf" ? true : (0, _checkForExternalLink["default"])(item === null || item === void 0 ? void 0 : item.url);
114
115
  return /*#__PURE__*/_react["default"].createElement("li", {
115
116
  className: "product-summary-column__bullets",
116
117
  key: i
@@ -51,7 +51,8 @@ var UnboundedCard = function UnboundedCard(_ref) {
51
51
  buttonSecondary = content.buttonSecondary,
52
52
  cardLink = content.cardLink,
53
53
  modalContent = content.modalContent,
54
- modalType = content.modalType;
54
+ modalType = content.modalType,
55
+ onClick = content.onClick;
55
56
 
56
57
  var _useVideo = (0, _useVideo2.useVideo)(false, false, false),
57
58
  modalDeployed = _useVideo.modalDeployed,
@@ -86,6 +87,7 @@ var UnboundedCard = function UnboundedCard(_ref) {
86
87
  to: cardLink === null || cardLink === void 0 ? void 0 : cardLink.url,
87
88
  rel: "noreferrer noopener",
88
89
  video: cardLink === null || cardLink === void 0 ? void 0 : cardLink.video,
90
+ onClick: cardLink === null || cardLink === void 0 ? void 0 : cardLink.onClick,
89
91
  VideoComponent: VideoComponent && cardLink !== null && cardLink !== void 0 && cardLink.video ? VideoComponent : null,
90
92
  setOverride: cardLink !== null && cardLink !== void 0 && cardLink.video ? setOverride : null,
91
93
  override: cardLink !== null && cardLink !== void 0 && cardLink.video ? override : null
@@ -97,6 +99,7 @@ var UnboundedCard = function UnboundedCard(_ref) {
97
99
  })) : /*#__PURE__*/_react["default"].createElement(_terraOne.LunaLink, {
98
100
  target: "_self",
99
101
  className: "ter-bounded-card__link",
102
+ onClick: cardLink === null || cardLink === void 0 ? void 0 : cardLink.onClick,
100
103
  to: cardLink === null || cardLink === void 0 ? void 0 : cardLink.url,
101
104
  rel: "noreferrer noopener",
102
105
  Link: Link
@@ -105,11 +108,12 @@ var UnboundedCard = function UnboundedCard(_ref) {
105
108
  }, cardLink === null || cardLink === void 0 ? void 0 : cardLink.text), /*#__PURE__*/_react["default"].createElement(_CardLinkIcon.CardLinkIcon, {
106
109
  iconClass: "ter-bounded-card__link-icon",
107
110
  external: cardLink === null || cardLink === void 0 ? void 0 : cardLink.external
108
- }))), (!Link || (cardLink === null || cardLink === void 0 ? void 0 : cardLink.external) === true) && !(cardLink !== null && cardLink !== void 0 && cardLink.video) && /*#__PURE__*/_react["default"].createElement("a", {
111
+ }))), (!Link || (cardLink === null || cardLink === void 0 ? void 0 : cardLink.external) === true || (cardLink === null || cardLink === void 0 ? void 0 : cardLink.onClick)) && !(cardLink !== null && cardLink !== void 0 && cardLink.video) && /*#__PURE__*/_react["default"].createElement("a", {
109
112
  target: (cardLink === null || cardLink === void 0 ? void 0 : cardLink.external) === true ? "_blank" : "_self",
110
113
  className: "ter-bounded-card__link",
111
114
  href: cardLink === null || cardLink === void 0 ? void 0 : cardLink.url,
112
- rel: "noreferrer noopener"
115
+ rel: "noreferrer noopener",
116
+ onClick: cardLink === null || cardLink === void 0 ? void 0 : cardLink.onClick
113
117
  }, /*#__PURE__*/_react["default"].createElement("span", {
114
118
  className: "ter-bounded-card__link-text"
115
119
  }, cardLink === null || cardLink === void 0 ? void 0 : cardLink.text), /*#__PURE__*/_react["default"].createElement(_CardLinkIcon.CardLinkIcon, {
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.renderCardImage = exports.renderButton = void 0;
9
9
 
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
11
+
10
12
  var _react = _interopRequireDefault(require("react"));
11
13
 
12
14
  var _generateFocusedImageAlt = _interopRequireDefault(require("../../utils/generateFocusedImageAlt"));
@@ -81,7 +83,7 @@ var renderModal = function renderModal(modalType, imageSizes, modalContent, moda
81
83
  };
82
84
 
83
85
  var renderButton = function renderButton(buttonContent, Link) {
84
- return /*#__PURE__*/_react["default"].createElement(_terraOne.Button, {
86
+ return /*#__PURE__*/_react["default"].createElement(_terraOne.Button, (0, _defineProperty2["default"])({
85
87
  name: (buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.name) || null,
86
88
  text: (buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.text) || null,
87
89
  className: (buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.type) || "ter-button--primary--1",
@@ -93,7 +95,7 @@ var renderButton = function renderButton(buttonContent, Link) {
93
95
  video: buttonContent !== null && buttonContent !== void 0 && buttonContent.video ? buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.video : null,
94
96
  setOverride: buttonContent !== null && buttonContent !== void 0 && buttonContent.setOverride ? buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.setOverride : null,
95
97
  override: buttonContent !== null && buttonContent !== void 0 && buttonContent.override ? buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.override : null
96
- });
98
+ }, "onClick", buttonContent === null || buttonContent === void 0 ? void 0 : buttonContent.onClick));
97
99
  };
98
100
 
99
101
  exports.renderButton = renderButton;
@@ -141,7 +141,7 @@ var imageSizes = {
141
141
  };
142
142
 
143
143
  var PullQuote = function PullQuote(props) {
144
- var _topImage$focalPointI, _sideImage$focalPoint, _backgroundImage$foca, _content$cta, _content$cta2, _content$cta3, _content$cta4, _content$cta5, _content$cta6, _content$cta7, _content$cta8, _content$cta9, _content$cta10, _content$cta11, _content$cta12, _content$cta13;
144
+ var _topImage$focalPointI, _sideImage$focalPoint, _backgroundImage$foca, _content$cta, _content$cta2, _content$cta3, _content$cta4, _content$cta5, _content$cta6, _content$cta7, _content$cta8, _content$cta9, _content$cta10, _content$cta11, _content$cta12, _content$cta13, _content$cta14, _content$cta15, _content$cta16;
145
145
 
146
146
  var _props$content = props.content,
147
147
  content = _props$content === void 0 ? {} : _props$content,
@@ -281,16 +281,17 @@ var PullQuote = function PullQuote(props) {
281
281
  style: {
282
282
  color: color
283
283
  }
284
- }, quoteSourceTitle), ((content === null || content === void 0 ? void 0 : (_content$cta = content.cta) === null || _content$cta === void 0 ? void 0 : _content$cta.url) && (content === null || content === void 0 ? void 0 : (_content$cta2 = content.cta) === null || _content$cta2 === void 0 ? void 0 : _content$cta2.text) || (content === null || content === void 0 ? void 0 : (_content$cta3 = content.cta) === null || _content$cta3 === void 0 ? void 0 : _content$cta3.text) && (content === null || content === void 0 ? void 0 : (_content$cta4 = content.cta) === null || _content$cta4 === void 0 ? void 0 : _content$cta4.video)) && /*#__PURE__*/_react["default"].createElement(_terraOne.Button, {
284
+ }, quoteSourceTitle), ((content === null || content === void 0 ? void 0 : (_content$cta = content.cta) === null || _content$cta === void 0 ? void 0 : _content$cta.url) && (content === null || content === void 0 ? void 0 : (_content$cta2 = content.cta) === null || _content$cta2 === void 0 ? void 0 : _content$cta2.text) || (content === null || content === void 0 ? void 0 : (_content$cta3 = content.cta) === null || _content$cta3 === void 0 ? void 0 : _content$cta3.onClick) && (content === null || content === void 0 ? void 0 : (_content$cta4 = content.cta) === null || _content$cta4 === void 0 ? void 0 : _content$cta4.text) || (content === null || content === void 0 ? void 0 : (_content$cta5 = content.cta) === null || _content$cta5 === void 0 ? void 0 : _content$cta5.text) && (content === null || content === void 0 ? void 0 : (_content$cta6 = content.cta) === null || _content$cta6 === void 0 ? void 0 : _content$cta6.video)) && /*#__PURE__*/_react["default"].createElement(_terraOne.Button, {
285
285
  Link: content === null || content === void 0 ? void 0 : content.Link,
286
- url: content === null || content === void 0 ? void 0 : (_content$cta5 = content.cta) === null || _content$cta5 === void 0 ? void 0 : _content$cta5.url,
287
- text: content === null || content === void 0 ? void 0 : (_content$cta6 = content.cta) === null || _content$cta6 === void 0 ? void 0 : _content$cta6.text,
288
- className: "ter-button--".concat(content === null || content === void 0 ? void 0 : (_content$cta7 = content.cta) === null || _content$cta7 === void 0 ? void 0 : _content$cta7.className) || "ter-button--primary--2",
286
+ url: content === null || content === void 0 ? void 0 : (_content$cta7 = content.cta) === null || _content$cta7 === void 0 ? void 0 : _content$cta7.url,
287
+ text: content === null || content === void 0 ? void 0 : (_content$cta8 = content.cta) === null || _content$cta8 === void 0 ? void 0 : _content$cta8.text,
288
+ className: "ter-button--".concat(content === null || content === void 0 ? void 0 : (_content$cta9 = content.cta) === null || _content$cta9 === void 0 ? void 0 : _content$cta9.className) || "ter-button--primary--2",
289
289
  external: content === null || content === void 0 ? void 0 : content.external,
290
290
  VideoComponent: _Video["default"] ? _Video["default"] : null,
291
- video: content !== null && content !== void 0 && (_content$cta8 = content.cta) !== null && _content$cta8 !== void 0 && _content$cta8.video ? content === null || content === void 0 ? void 0 : (_content$cta9 = content.cta) === null || _content$cta9 === void 0 ? void 0 : _content$cta9.video : null,
292
- setOverride: content !== null && content !== void 0 && (_content$cta10 = content.cta) !== null && _content$cta10 !== void 0 && _content$cta10.setOverride ? content === null || content === void 0 ? void 0 : (_content$cta11 = content.cta) === null || _content$cta11 === void 0 ? void 0 : _content$cta11.setOverride : null,
293
- override: content !== null && content !== void 0 && (_content$cta12 = content.cta) !== null && _content$cta12 !== void 0 && _content$cta12.override ? content === null || content === void 0 ? void 0 : (_content$cta13 = content.cta) === null || _content$cta13 === void 0 ? void 0 : _content$cta13.override : null
291
+ video: content !== null && content !== void 0 && (_content$cta10 = content.cta) !== null && _content$cta10 !== void 0 && _content$cta10.video ? content === null || content === void 0 ? void 0 : (_content$cta11 = content.cta) === null || _content$cta11 === void 0 ? void 0 : _content$cta11.video : null,
292
+ setOverride: content !== null && content !== void 0 && (_content$cta12 = content.cta) !== null && _content$cta12 !== void 0 && _content$cta12.setOverride ? content === null || content === void 0 ? void 0 : (_content$cta13 = content.cta) === null || _content$cta13 === void 0 ? void 0 : _content$cta13.setOverride : null,
293
+ override: content !== null && content !== void 0 && (_content$cta14 = content.cta) !== null && _content$cta14 !== void 0 && _content$cta14.override ? content === null || content === void 0 ? void 0 : (_content$cta15 = content.cta) === null || _content$cta15 === void 0 ? void 0 : _content$cta15.override : null,
294
+ onClick: content === null || content === void 0 ? void 0 : (_content$cta16 = content.cta) === null || _content$cta16 === void 0 ? void 0 : _content$cta16.onClick
294
295
  })))))));
295
296
  };
296
297
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luna-one",
3
- "version": "3.1.545",
3
+ "version": "3.1.546",
4
4
  "peerDependencies": {
5
5
  "react": "^17.0.2",
6
6
  "react-dom": "^17.0.2",
@@ -51,7 +51,7 @@
51
51
  "react-scroll": "^1.8.7",
52
52
  "react-slidedown": "^2.4.7",
53
53
  "smoothscroll-polyfill": "^0.4.4",
54
- "terra-one": "^3.0.178"
54
+ "terra-one": "^3.0.179"
55
55
  },
56
56
  "scripts": {
57
57
  "start": "start-storybook -p 9009 -s public",