@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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## [2.10.0]
1
+ ## [TBD]
2
2
  - Upsell Card, Upsell Cards, Upsell section:
3
3
  - Add secondary CTA
4
4
  - Update device styling
@@ -2840,10 +2840,12 @@ var PrimaryButton = function PrimaryButton(_ref) {
2840
2840
  };
2841
2841
 
2842
2842
  var _templateObject$5;
2843
- var PrimaryButtonWrapper$1 = /*#__PURE__*/styled__default(Button)(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: var(--base-color-transparent);\n border-color: ", ";\n"])), function (_ref) {
2843
+ var SecondaryButtonWrapper = /*#__PURE__*/styled__default(Button)(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: var(--base-color-transparent);\n\n ", "\n"])), function (_ref) {
2844
2844
  var color = _ref.color,
2845
2845
  theme = _ref.theme;
2846
- return color ? "var(--base-color-" + color + ")" : theme.colors.primary;
2846
+ var themeColor = (theme == null ? void 0 : theme.colors) && color && theme.colors[color];
2847
+ if (!themeColor) themeColor = color ? "var(--base-color-" + color + ")" : theme.colors.primary;
2848
+ return "\n border-color: " + themeColor + ";\n color: " + themeColor + ";\n ";
2847
2849
  });
2848
2850
 
2849
2851
  var _excluded$2 = ["children"];
@@ -2852,7 +2854,7 @@ var SecondaryButton = function SecondaryButton(_ref) {
2852
2854
  var children = _ref.children,
2853
2855
  props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
2854
2856
 
2855
- return /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper$1, Object.assign({
2857
+ return /*#__PURE__*/React__default.createElement(SecondaryButtonWrapper, Object.assign({
2856
2858
  color: exports.Colors.Primary
2857
2859
  }, props), children);
2858
2860
  };
@@ -7419,7 +7421,9 @@ var UpsellCard = function UpsellCard(_ref) {
7419
7421
  _ref$stackCtasEarly = _ref.stackCtasEarly,
7420
7422
  stackCtasEarly = _ref$stackCtasEarly === void 0 ? false : _ref$stackCtasEarly,
7421
7423
  _ref$theme = _ref.theme,
7422
- theme = _ref$theme === void 0 ? exports.ThemeType.Core : _ref$theme;
7424
+ theme = _ref$theme === void 0 ? exports.ThemeType.Core : _ref$theme,
7425
+ _ref$secondaryTheme = _ref.secondaryTheme,
7426
+ secondaryTheme = _ref$secondaryTheme === void 0 ? exports.ThemeType.Core : _ref$secondaryTheme;
7423
7427
 
7424
7428
  var truncate = function truncate(str, n) {
7425
7429
  return str.length >= n ? str.slice(0, n) : str;
@@ -7446,9 +7450,11 @@ var UpsellCard = function UpsellCard(_ref) {
7446
7450
  title: offerText.title,
7447
7451
  description: offerText.description
7448
7452
  });
7449
- }), link && /*#__PURE__*/React__default.createElement(ButtonContainer, {
7453
+ }), ((link == null ? void 0 : link.text) || (secondaryLink == null ? void 0 : secondaryLink.text)) && /*#__PURE__*/React__default.createElement(ButtonContainer, {
7450
7454
  stackCtasEarly: stackCtasEarly
7451
- }, /*#__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)))));
7455
+ }, (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, {
7456
+ theme: secondaryTheme
7457
+ }, /*#__PURE__*/React__default.createElement(SecondaryButton, Object.assign({}, secondaryLink), truncate(secondaryLink.text, LENGTH_SMALL_TEXT))))));
7452
7458
  };
7453
7459
 
7454
7460
  var _templateObject$L;
@@ -7468,7 +7474,8 @@ var UpsellCards = function UpsellCards(_ref) {
7468
7474
  link: card.link,
7469
7475
  secondaryLink: card.secondaryLink,
7470
7476
  stackCtasEarly: true,
7471
- theme: card.theme
7477
+ theme: card.theme,
7478
+ secondaryTheme: card.secondaryTheme
7472
7479
  });
7473
7480
  }));
7474
7481
  };
@@ -9323,7 +9330,7 @@ var TextLinksContainer = /*#__PURE__*/styled__default.div(_templateObject7$d ||
9323
9330
  var TextLinkWrapper$2 = /*#__PURE__*/styled__default.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"])));
9324
9331
  var ExtraContentWrapper = /*#__PURE__*/styled__default.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);
9325
9332
  var IconWrapper$2 = /*#__PURE__*/styled__default.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);
9326
- var PrimaryButtonWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject11$2 || (_templateObject11$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: var(--button-height);\n\n @media ", " {\n width: 100%;\n }\n"])), devices.mobile);
9333
+ var PrimaryButtonWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject11$2 || (_templateObject11$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: var(--button-height);\n\n @media ", " {\n width: 100%;\n }\n"])), devices.mobile);
9327
9334
  var MobileTitleWrapper = /*#__PURE__*/styled__default.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);
9328
9335
  var PromoWithTagsTypeTags = /*#__PURE__*/styled__default(TypeTags)(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9329
9336
  var PromoWithTagsHeader = /*#__PURE__*/styled__default(Header)(_templateObject14$1 || (_templateObject14$1 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
@@ -9505,7 +9512,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
9505
9512
  "data-testid": "buttons-wrapper",
9506
9513
  primaryButtonTextLength: firstButtonText.length,
9507
9514
  tertiaryButtonTextLength: secondButtonText.length
9508
- }, firstButton && /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper$2, null, disableCTA ? /*#__PURE__*/React__default.createElement(FirstButtonComponent, {
9515
+ }, firstButton && /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper$1, null, disableCTA ? /*#__PURE__*/React__default.createElement(FirstButtonComponent, {
9509
9516
  bgColor: exports.Colors.MidGrey,
9510
9517
  onClick: function onClick() {
9511
9518
  return null;
@@ -11844,7 +11851,8 @@ var UpsellSection = function UpsellSection(_ref) {
11844
11851
  theme = _ref$theme === void 0 ? exports.ThemeType.Core : _ref$theme;
11845
11852
  var themedUpsellCards = upsellCards ? [].concat(upsellCards).map(function (card) {
11846
11853
  return _extends({}, card, {
11847
- theme: card.theme || theme
11854
+ theme: card.theme || theme,
11855
+ secondaryTheme: card.secondaryTheme || theme
11848
11856
  });
11849
11857
  }) : [];
11850
11858
  return /*#__PURE__*/React__default.createElement(Theme, {