@royaloperahouse/chord 1.1.0 → 1.2.0

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
@@ -4989,10 +4989,15 @@ var getButtonsOpacity = function getButtonsOpacity(_ref4) {
4989
4989
  return onlyShowButtonsOnHover ? 'opacity: 0;' : 'opacity: 1;';
4990
4990
  };
4991
4991
 
4992
- var ButtonsContainer$1 = /*#__PURE__*/styled.div(_templateObject9$3 || (_templateObject9$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", ";\n display: flex;\n gap: 16px;\n margin-top: var(--editorial-margin-between);\n\n ", "\n\n @media ", " {\n opacity: 1 !important;\n gap: 24px;\n margin-top: 24px;\n flex-direction: column;\n align-items: center;\n }\n\n @media ", " {\n opacity: 1 !important;\n gap: 24px;\n margin-top: 24px;\n align-items: flex-start;\n\n ", "\n }\n"])), getButtonsOpacity, function (_ref5) {
4993
- var size = _ref5.size,
4994
- primaryButtonTextLength = _ref5.primaryButtonTextLength,
4995
- tertiaryButtonTextLength = _ref5.tertiaryButtonTextLength;
4992
+ var getButtonsMinHeight = function getButtonsMinHeight(_ref5) {
4993
+ var onlyShowButtonsOnHover = _ref5.onlyShowButtonsOnHover;
4994
+ return onlyShowButtonsOnHover ? 'min-height: unset;' : 'min-height: 120px;';
4995
+ };
4996
+
4997
+ var ButtonsContainer$1 = /*#__PURE__*/styled.div(_templateObject9$3 || (_templateObject9$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", ";\n display: flex;\n gap: 16px;\n margin-top: var(--editorial-margin-between);\n\n ", "\n\n @media ", " {\n ", ";\n margin-left: ", ";\n margin-right: ", ";\n opacity: 1 !important;\n gap: 24px;\n margin-top: 24px;\n flex-direction: column;\n align-items: center;\n }\n\n @media ", " {\n ", ";\n opacity: 1 !important;\n gap: 24px;\n margin-top: 24px;\n align-items: flex-start;\n\n ", "\n }\n"])), getButtonsOpacity, function (_ref6) {
4998
+ var size = _ref6.size,
4999
+ primaryButtonTextLength = _ref6.primaryButtonTextLength,
5000
+ tertiaryButtonTextLength = _ref6.tertiaryButtonTextLength;
4996
5001
  var isLinksLayoutColumn = size === 'small' ? primaryButtonTextLength >= LENGTH_SMALL_TEXT || tertiaryButtonTextLength >= LENGTH_SMALL_TEXT : primaryButtonTextLength >= LENGTH_LARGE_TEXT || tertiaryButtonTextLength >= LENGTH_LARGE_TEXT;
4997
5002
 
4998
5003
  if (isLinksLayoutColumn) {
@@ -5000,9 +5005,15 @@ var ButtonsContainer$1 = /*#__PURE__*/styled.div(_templateObject9$3 || (_templat
5000
5005
  }
5001
5006
 
5002
5007
  return '';
5003
- }, devices.mobile, devices.tablet, function (_ref6) {
5004
- var primaryButtonTextLength = _ref6.primaryButtonTextLength,
5005
- tertiaryButtonTextLength = _ref6.tertiaryButtonTextLength;
5008
+ }, devices.mobile, getButtonsMinHeight, function (_ref7) {
5009
+ var fullWidth = _ref7.fullWidth;
5010
+ return fullWidth ? '0' : '20px';
5011
+ }, function (_ref8) {
5012
+ var fullWidth = _ref8.fullWidth;
5013
+ return fullWidth ? '0' : '20px';
5014
+ }, devices.tablet, getButtonsMinHeight, function (_ref9) {
5015
+ var primaryButtonTextLength = _ref9.primaryButtonTextLength,
5016
+ tertiaryButtonTextLength = _ref9.tertiaryButtonTextLength;
5006
5017
  var isLinksLayoutColumnTablet = primaryButtonTextLength >= LENGTH_TEXT_TABLET || tertiaryButtonTextLength >= LENGTH_TEXT_TABLET;
5007
5018
 
5008
5019
  if (isLinksLayoutColumnTablet) {
@@ -5151,7 +5162,8 @@ var Card = function Card(_ref) {
5151
5162
  size: size,
5152
5163
  primaryButtonTextLength: firstButtonText.length,
5153
5164
  tertiaryButtonTextLength: secondButtonText.length,
5154
- onlyShowButtonsOnHover: onlyShowButtonsOnHover
5165
+ onlyShowButtonsOnHover: onlyShowButtonsOnHover,
5166
+ fullWidth: fullWidth
5155
5167
  }, firstButton && /*#__PURE__*/React__default.createElement(FirstButtonComponent, Object.assign({}, restFirstButton), primaryButtonTextTruncate), secondButton && /*#__PURE__*/React__default.createElement(SecondButtonComponent, Object.assign({}, restSecondButton), tertiaryButtonTextTruncate)));
5156
5168
  };
5157
5169
 
@@ -5190,7 +5202,8 @@ var Cards = function Cards(_ref) {
5190
5202
  links: card.links,
5191
5203
  tags: card.tags,
5192
5204
  withContinueWatching: card.withContinueWatching,
5193
- onlyShowButtonsOnHover: card.onlyShowButtonsOnHover
5205
+ onlyShowButtonsOnHover: card.onlyShowButtonsOnHover,
5206
+ fullWidth: card.fullWidth
5194
5207
  }));
5195
5208
  }));
5196
5209
  };