@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.
@@ -8895,7 +8895,13 @@ var PeopleListing = function PeopleListing(_ref) {
8895
8895
 
8896
8896
  var _templateObject$12, _templateObject2$L, _templateObject3$C, _templateObject4$u;
8897
8897
  var ReplacementWrapper = /*#__PURE__*/styled__default.div(_templateObject$12 || (_templateObject$12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n"])));
8898
- var CreditListingWrapper = /*#__PURE__*/styled__default(PeopleListingGrid)(_templateObject2$L || (_templateObject2$L = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n p {\n line-height: 1.5;\n }\n"])));
8898
+ var CreditListingWrapper = /*#__PURE__*/styled__default(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) {
8899
+ var columnCount = _ref.columnCount;
8900
+ return "repeat(" + columnCount + ", 1fr)";
8901
+ }, devices.mobile, devices.tablet, devices.desktop, function (_ref2) {
8902
+ var columnCount = _ref2.columnCount;
8903
+ return "repeat(" + columnCount + ", 1fr)";
8904
+ });
8899
8905
  var DescriptionWrapper = /*#__PURE__*/styled__default.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"])));
8900
8906
  var RoleWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject4$u || (_templateObject4$u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n overflow-wrap: break-word;\n"])));
8901
8907
 
@@ -8924,9 +8930,13 @@ var concatenateMusicTitle = function concatenateMusicTitle(musicTitle) {
8924
8930
  };
8925
8931
 
8926
8932
  var CreditListing = function CreditListing(_ref) {
8927
- var roles = _ref.roles;
8933
+ var roles = _ref.roles,
8934
+ _ref$columnCount = _ref.columnCount,
8935
+ columnCount = _ref$columnCount === void 0 ? 4 : _ref$columnCount;
8928
8936
  var charThreshold = 180;
8929
- return /*#__PURE__*/React__default.createElement(CreditListingWrapper, null, roles.map(function (_ref2, index) {
8937
+ return /*#__PURE__*/React__default.createElement(CreditListingWrapper, {
8938
+ columnCount: columnCount
8939
+ }, roles.map(function (_ref2, index) {
8930
8940
  var name = _ref2.name,
8931
8941
  people = _ref2.people,
8932
8942
  description = _ref2.description,
@@ -8935,9 +8945,11 @@ var CreditListing = function CreditListing(_ref) {
8935
8945
  additionalInfo = _ref2.additionalInfo,
8936
8946
  dataROH = _ref2.dataROH;
8937
8947
  var namesLength = getConcatenatedPropLength(people, 'name');
8948
+ var columnSpanDesktop = namesLength > charThreshold ? people.length > 2 ? 4 : 2 : 1;
8949
+ var columnSpanBodyText = namesLength > charThreshold ? 6 : 2;
8938
8950
  return /*#__PURE__*/React__default.createElement(GridItem, {
8939
- columnSpanDesktop: namesLength > charThreshold ? 2 : 1,
8940
- columnSpanDevice: namesLength > charThreshold ? 2 : 1,
8951
+ columnSpanDesktop: columnSpanDesktop,
8952
+ columnSpanDevice: columnSpanDesktop,
8941
8953
  columnSpanSmallDevice: 2,
8942
8954
  key: name + "-" + index
8943
8955
  }, /*#__PURE__*/React__default.createElement(TextWrapper$2, null, /*#__PURE__*/React__default.createElement(RoleWrapper$1, {
@@ -8966,7 +8978,8 @@ var CreditListing = function CreditListing(_ref) {
8966
8978
  tag: "p"
8967
8979
  }, concatenateMusicTitle(musicTitle)), additionalInfo && /*#__PURE__*/React__default.createElement(BodyText, {
8968
8980
  level: 1,
8969
- tag: "p"
8981
+ tag: "p",
8982
+ columnSpanDesktop: columnSpanBodyText
8970
8983
  }, additionalInfo)));
8971
8984
  }));
8972
8985
  };