@royaloperahouse/chord 2.4.8-c-chord-development → 2.4.8-e-chord-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
@@ -8900,7 +8900,13 @@ var PeopleListing = function PeopleListing(_ref) {
8900
8900
 
8901
8901
  var _templateObject$12, _templateObject2$L, _templateObject3$C, _templateObject4$u;
8902
8902
  var ReplacementWrapper = /*#__PURE__*/styled.div(_templateObject$12 || (_templateObject$12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n"])));
8903
- var CreditListingWrapper = /*#__PURE__*/styled(PeopleListingGrid)(_templateObject2$L || (_templateObject2$L = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n p {\n line-height: 1.5;\n }\n"])));
8903
+ var CreditListingWrapper = /*#__PURE__*/styled(PeopleListingGrid)(_templateObject2$L || (_templateObject2$L = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n p {\n line-height: 1.5;\n }\n\n grid-template-columns: ", ";\n\n @media ", " {\n grid-template-columns: 1fr;\n }\n\n @media ", " {\n grid-template-columns: repeat(2, 1fr);\n }\n\n @media ", " {\n grid-template-columns: ", ";\n }\n"])), function (_ref) {
8904
+ var columnCount = _ref.columnCount;
8905
+ return "repeat(" + columnCount + ", 1fr)";
8906
+ }, devices.mobile, devices.tablet, devices.desktop, function (_ref2) {
8907
+ var columnCount = _ref2.columnCount;
8908
+ return "repeat(" + columnCount + ", 1fr)";
8909
+ });
8904
8910
  var DescriptionWrapper = /*#__PURE__*/styled.div(_templateObject3$C || (_templateObject3$C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n p {\n line-height: 1.5;\n margin-bottom: 4px;\n }\n"])));
8905
8911
  var RoleWrapper$1 = /*#__PURE__*/styled.div(_templateObject4$u || (_templateObject4$u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n overflow-wrap: break-word;\n"])));
8906
8912
 
@@ -8929,9 +8935,13 @@ var concatenateMusicTitle = function concatenateMusicTitle(musicTitle) {
8929
8935
  };
8930
8936
 
8931
8937
  var CreditListing = function CreditListing(_ref) {
8932
- var roles = _ref.roles;
8938
+ var roles = _ref.roles,
8939
+ _ref$columnCount = _ref.columnCount,
8940
+ columnCount = _ref$columnCount === void 0 ? 4 : _ref$columnCount;
8933
8941
  var charThreshold = 180;
8934
- return /*#__PURE__*/React__default.createElement(CreditListingWrapper, null, roles.map(function (_ref2, index) {
8942
+ return /*#__PURE__*/React__default.createElement(CreditListingWrapper, {
8943
+ columnCount: columnCount
8944
+ }, roles.map(function (_ref2, index) {
8935
8945
  var name = _ref2.name,
8936
8946
  people = _ref2.people,
8937
8947
  description = _ref2.description,
@@ -8940,9 +8950,11 @@ var CreditListing = function CreditListing(_ref) {
8940
8950
  additionalInfo = _ref2.additionalInfo,
8941
8951
  dataROH = _ref2.dataROH;
8942
8952
  var namesLength = getConcatenatedPropLength(people, 'name');
8953
+ var columnSpanDesktop = namesLength > charThreshold ? people.length > 2 ? 4 : 2 : 1;
8954
+ var columnSpanBodyText = namesLength > charThreshold ? 6 : 2;
8943
8955
  return /*#__PURE__*/React__default.createElement(GridItem, {
8944
- columnSpanDesktop: namesLength > charThreshold ? 2 : 1,
8945
- columnSpanDevice: namesLength > charThreshold ? 2 : 1,
8956
+ columnSpanDesktop: columnSpanDesktop,
8957
+ columnSpanDevice: columnSpanDesktop,
8946
8958
  columnSpanSmallDevice: 2,
8947
8959
  key: name + "-" + index
8948
8960
  }, /*#__PURE__*/React__default.createElement(TextWrapper$2, null, /*#__PURE__*/React__default.createElement(RoleWrapper$1, {
@@ -8971,7 +8983,8 @@ var CreditListing = function CreditListing(_ref) {
8971
8983
  tag: "p"
8972
8984
  }, concatenateMusicTitle(musicTitle)), additionalInfo && /*#__PURE__*/React__default.createElement(BodyText, {
8973
8985
  level: 1,
8974
- tag: "p"
8986
+ tag: "p",
8987
+ columnSpanDesktop: columnSpanBodyText
8975
8988
  }, additionalInfo)));
8976
8989
  }));
8977
8990
  };