@royaloperahouse/chord 2.9.1-b-development → 2.9.1-c-development

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/chord.esm.js CHANGED
@@ -2845,10 +2845,12 @@ var PrimaryButton = function PrimaryButton(_ref) {
2845
2845
  };
2846
2846
 
2847
2847
  var _templateObject$5;
2848
- var PrimaryButtonWrapper$1 = /*#__PURE__*/styled(Button)(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: var(--base-color-transparent);\n border-color: ", ";\n"])), function (_ref) {
2848
+ var SecondaryButtonWrapper = /*#__PURE__*/styled(Button)(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: var(--base-color-transparent);\n\n ", "\n"])), function (_ref) {
2849
2849
  var color = _ref.color,
2850
2850
  theme = _ref.theme;
2851
- return color ? "var(--base-color-" + color + ")" : theme.colors.primary;
2851
+ var themeColor = (theme == null ? void 0 : theme.colors) && color && theme.colors[color];
2852
+ if (!themeColor) themeColor = color ? "var(--base-color-" + color + ")" : theme.colors.primary;
2853
+ return "\n border-color: " + themeColor + ";\n color: " + themeColor + ";\n ";
2852
2854
  });
2853
2855
 
2854
2856
  var _excluded$2 = ["children"];
@@ -2857,7 +2859,7 @@ var SecondaryButton = function SecondaryButton(_ref) {
2857
2859
  var children = _ref.children,
2858
2860
  props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
2859
2861
 
2860
- return /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper$1, Object.assign({
2862
+ return /*#__PURE__*/React__default.createElement(SecondaryButtonWrapper, Object.assign({
2861
2863
  color: Colors.Primary
2862
2864
  }, props), children);
2863
2865
  };
@@ -7424,7 +7426,9 @@ var UpsellCard = function UpsellCard(_ref) {
7424
7426
  _ref$stackCtasEarly = _ref.stackCtasEarly,
7425
7427
  stackCtasEarly = _ref$stackCtasEarly === void 0 ? false : _ref$stackCtasEarly,
7426
7428
  _ref$theme = _ref.theme,
7427
- theme = _ref$theme === void 0 ? ThemeType.Core : _ref$theme;
7429
+ theme = _ref$theme === void 0 ? ThemeType.Core : _ref$theme,
7430
+ _ref$secondaryTheme = _ref.secondaryTheme,
7431
+ secondaryTheme = _ref$secondaryTheme === void 0 ? ThemeType.Core : _ref$secondaryTheme;
7428
7432
 
7429
7433
  var truncate = function truncate(str, n) {
7430
7434
  return str.length >= n ? str.slice(0, n) : str;
@@ -7451,9 +7455,11 @@ var UpsellCard = function UpsellCard(_ref) {
7451
7455
  title: offerText.title,
7452
7456
  description: offerText.description
7453
7457
  });
7454
- }), link && /*#__PURE__*/React__default.createElement(ButtonContainer, {
7458
+ }), ((link == null ? void 0 : link.text) || (secondaryLink == null ? void 0 : secondaryLink.text)) && /*#__PURE__*/React__default.createElement(ButtonContainer, {
7455
7459
  stackCtasEarly: stackCtasEarly
7456
- }, /*#__PURE__*/React__default.createElement(PrimaryButton, Object.assign({}, link), truncate(link.text, LENGTH_SMALL_TEXT)), secondaryLink && /*#__PURE__*/React__default.createElement(SecondaryButton, Object.assign({}, secondaryLink), truncate(secondaryLink.text, LENGTH_SMALL_TEXT)))));
7460
+ }, (link == null ? void 0 : link.text) && /*#__PURE__*/React__default.createElement(PrimaryButton, Object.assign({}, link), truncate(link.text, LENGTH_SMALL_TEXT)), (secondaryLink == null ? void 0 : secondaryLink.text) && /*#__PURE__*/React__default.createElement(Theme, {
7461
+ theme: secondaryTheme
7462
+ }, /*#__PURE__*/React__default.createElement(SecondaryButton, Object.assign({}, secondaryLink), truncate(secondaryLink.text, LENGTH_SMALL_TEXT))))));
7457
7463
  };
7458
7464
 
7459
7465
  var _templateObject$L;
@@ -7473,7 +7479,8 @@ var UpsellCards = function UpsellCards(_ref) {
7473
7479
  link: card.link,
7474
7480
  secondaryLink: card.secondaryLink,
7475
7481
  stackCtasEarly: true,
7476
- theme: card.theme
7482
+ theme: card.theme,
7483
+ secondaryTheme: card.secondaryTheme
7477
7484
  });
7478
7485
  }));
7479
7486
  };
@@ -9328,7 +9335,7 @@ var TextLinksContainer = /*#__PURE__*/styled.div(_templateObject7$d || (_templat
9328
9335
  var TextLinkWrapper$2 = /*#__PURE__*/styled.div(_templateObject8$a || (_templateObject8$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 24px;\n margin-bottom: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n"])));
9329
9336
  var ExtraContentWrapper = /*#__PURE__*/styled.div(_templateObject9$5 || (_templateObject9$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n padding-right: 68px;\n\n iframe {\n height: 800px;\n }\n\n @media ", " {\n padding: 30px 0 0;\n }\n\n @media ", " {\n padding: 0;\n position: initial;\n }\n"])), devices.tablet, devices.mobile);
9330
9337
  var IconWrapper$2 = /*#__PURE__*/styled.div(_templateObject10$5 || (_templateObject10$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n position: absolute;\n top: 25px;\n right: 35px;\n width: 24px;\n height: 24px;\n\n @media ", " {\n top: 30px;\n right: 30px;\n }\n\n @media ", " {\n top: 3px;\n right: 20px;\n }\n"])), devices.tablet, devices.mobile);
9331
- var PrimaryButtonWrapper$2 = /*#__PURE__*/styled.div(_templateObject11$2 || (_templateObject11$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: var(--button-height);\n\n @media ", " {\n width: 100%;\n }\n"])), devices.mobile);
9338
+ var PrimaryButtonWrapper$1 = /*#__PURE__*/styled.div(_templateObject11$2 || (_templateObject11$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: var(--button-height);\n\n @media ", " {\n width: 100%;\n }\n"])), devices.mobile);
9332
9339
  var MobileTitleWrapper = /*#__PURE__*/styled.div(_templateObject12$1 || (_templateObject12$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: none;\n margin: 0 50px 0 20px;\n\n h2,\n h3 {\n margin: 0;\n }\n\n @media ", " {\n display: block;\n }\n"])), devices.mobile);
9333
9340
  var PromoWithTagsTypeTags = /*#__PURE__*/styled(TypeTags)(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9334
9341
  var PromoWithTagsHeader = /*#__PURE__*/styled(Header)(_templateObject14$1 || (_templateObject14$1 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
@@ -9510,7 +9517,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
9510
9517
  "data-testid": "buttons-wrapper",
9511
9518
  primaryButtonTextLength: firstButtonText.length,
9512
9519
  tertiaryButtonTextLength: secondButtonText.length
9513
- }, firstButton && /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper$2, null, disableCTA ? /*#__PURE__*/React__default.createElement(FirstButtonComponent, {
9520
+ }, firstButton && /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper$1, null, disableCTA ? /*#__PURE__*/React__default.createElement(FirstButtonComponent, {
9514
9521
  bgColor: Colors.MidGrey,
9515
9522
  onClick: function onClick() {
9516
9523
  return null;
@@ -11849,7 +11856,8 @@ var UpsellSection = function UpsellSection(_ref) {
11849
11856
  theme = _ref$theme === void 0 ? ThemeType.Core : _ref$theme;
11850
11857
  var themedUpsellCards = upsellCards ? [].concat(upsellCards).map(function (card) {
11851
11858
  return _extends({}, card, {
11852
- theme: card.theme || theme
11859
+ theme: card.theme || theme,
11860
+ secondaryTheme: card.secondaryTheme || theme
11853
11861
  });
11854
11862
  }) : [];
11855
11863
  return /*#__PURE__*/React__default.createElement(Theme, {