@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/CHANGELOG.md +3 -0
- package/dist/chord.cjs.development.js +22 -9
- package/dist/chord.cjs.development.js.map +1 -1
- package/dist/chord.cjs.production.min.js +1 -1
- package/dist/chord.cjs.production.min.js.map +1 -1
- package/dist/chord.esm.js +22 -9
- package/dist/chord.esm.js.map +1 -1
- package/dist/types/card.d.ts +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4985,10 +4985,15 @@ var getButtonsOpacity = function getButtonsOpacity(_ref4) {
|
|
|
4985
4985
|
return onlyShowButtonsOnHover ? 'opacity: 0;' : 'opacity: 1;';
|
|
4986
4986
|
};
|
|
4987
4987
|
|
|
4988
|
-
var
|
|
4989
|
-
var
|
|
4990
|
-
|
|
4991
|
-
|
|
4988
|
+
var getButtonsMinHeight = function getButtonsMinHeight(_ref5) {
|
|
4989
|
+
var onlyShowButtonsOnHover = _ref5.onlyShowButtonsOnHover;
|
|
4990
|
+
return onlyShowButtonsOnHover ? 'min-height: unset;' : 'min-height: 120px;';
|
|
4991
|
+
};
|
|
4992
|
+
|
|
4993
|
+
var ButtonsContainer$1 = /*#__PURE__*/styled__default.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) {
|
|
4994
|
+
var size = _ref6.size,
|
|
4995
|
+
primaryButtonTextLength = _ref6.primaryButtonTextLength,
|
|
4996
|
+
tertiaryButtonTextLength = _ref6.tertiaryButtonTextLength;
|
|
4992
4997
|
var isLinksLayoutColumn = size === 'small' ? primaryButtonTextLength >= LENGTH_SMALL_TEXT || tertiaryButtonTextLength >= LENGTH_SMALL_TEXT : primaryButtonTextLength >= LENGTH_LARGE_TEXT || tertiaryButtonTextLength >= LENGTH_LARGE_TEXT;
|
|
4993
4998
|
|
|
4994
4999
|
if (isLinksLayoutColumn) {
|
|
@@ -4996,9 +5001,15 @@ var ButtonsContainer$1 = /*#__PURE__*/styled__default.div(_templateObject9$3 ||
|
|
|
4996
5001
|
}
|
|
4997
5002
|
|
|
4998
5003
|
return '';
|
|
4999
|
-
}, devices.mobile,
|
|
5000
|
-
var
|
|
5001
|
-
|
|
5004
|
+
}, devices.mobile, getButtonsMinHeight, function (_ref7) {
|
|
5005
|
+
var fullWidth = _ref7.fullWidth;
|
|
5006
|
+
return fullWidth ? '0' : '20px';
|
|
5007
|
+
}, function (_ref8) {
|
|
5008
|
+
var fullWidth = _ref8.fullWidth;
|
|
5009
|
+
return fullWidth ? '0' : '20px';
|
|
5010
|
+
}, devices.tablet, getButtonsMinHeight, function (_ref9) {
|
|
5011
|
+
var primaryButtonTextLength = _ref9.primaryButtonTextLength,
|
|
5012
|
+
tertiaryButtonTextLength = _ref9.tertiaryButtonTextLength;
|
|
5002
5013
|
var isLinksLayoutColumnTablet = primaryButtonTextLength >= LENGTH_TEXT_TABLET || tertiaryButtonTextLength >= LENGTH_TEXT_TABLET;
|
|
5003
5014
|
|
|
5004
5015
|
if (isLinksLayoutColumnTablet) {
|
|
@@ -5147,7 +5158,8 @@ var Card = function Card(_ref) {
|
|
|
5147
5158
|
size: size,
|
|
5148
5159
|
primaryButtonTextLength: firstButtonText.length,
|
|
5149
5160
|
tertiaryButtonTextLength: secondButtonText.length,
|
|
5150
|
-
onlyShowButtonsOnHover: onlyShowButtonsOnHover
|
|
5161
|
+
onlyShowButtonsOnHover: onlyShowButtonsOnHover,
|
|
5162
|
+
fullWidth: fullWidth
|
|
5151
5163
|
}, firstButton && /*#__PURE__*/React__default.createElement(FirstButtonComponent, Object.assign({}, restFirstButton), primaryButtonTextTruncate), secondButton && /*#__PURE__*/React__default.createElement(SecondButtonComponent, Object.assign({}, restSecondButton), tertiaryButtonTextTruncate)));
|
|
5152
5164
|
};
|
|
5153
5165
|
|
|
@@ -5186,7 +5198,8 @@ var Cards = function Cards(_ref) {
|
|
|
5186
5198
|
links: card.links,
|
|
5187
5199
|
tags: card.tags,
|
|
5188
5200
|
withContinueWatching: card.withContinueWatching,
|
|
5189
|
-
onlyShowButtonsOnHover: card.onlyShowButtonsOnHover
|
|
5201
|
+
onlyShowButtonsOnHover: card.onlyShowButtonsOnHover,
|
|
5202
|
+
fullWidth: card.fullWidth
|
|
5190
5203
|
}));
|
|
5191
5204
|
}));
|
|
5192
5205
|
};
|