@royaloperahouse/chord 1.4.0 → 1.6.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
@@ -3162,14 +3162,16 @@ var RotatorButtons = function RotatorButtons(_ref) {
3162
3162
  onClick: onClickLeftHandler,
3163
3163
  onKeyDown: onPrevKeyDownHandler,
3164
3164
  tabIndex: 0,
3165
- "data-testid": "iconprev"
3165
+ "data-testid": "iconprev",
3166
+ className: "carousel-icon-wrapper-left"
3166
3167
  }, renderPrevIcon()) : /*#__PURE__*/React__default.createElement(IconUnavailableWrapper, {
3167
3168
  "data-testid": "iconprevnoavailable"
3168
3169
  }, renderPrevIcon()), availableNext ? /*#__PURE__*/React__default.createElement(IconWrapper$1, {
3169
3170
  onClick: onClickRightHandler,
3170
3171
  onKeyDown: onNextKeyDownHandler,
3171
3172
  tabIndex: 0,
3172
- "data-testid": "iconnext"
3173
+ "data-testid": "iconnext",
3174
+ className: "carousel-icon-wrapper-right"
3173
3175
  }, renderNextIcon()) : /*#__PURE__*/React__default.createElement(IconUnavailableWrapper, {
3174
3176
  "data-testid": "iconnextnoavailable"
3175
3177
  }, renderNextIcon()));
@@ -4050,7 +4052,7 @@ var Footer = function Footer(_ref) {
4050
4052
  };
4051
4053
 
4052
4054
  var _templateObject$x, _templateObject2$i, _templateObject3$b, _templateObject4$7, _templateObject5$4, _templateObject6$4;
4053
- var AnchorTapbarWrapper = /*#__PURE__*/styled.div(_templateObject$x || (_templateObject$x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: sticky;\n top: 0;\n background-color: var(--base-color-white);\n z-index: ", ";\n"])), zIndexes.anchor);
4055
+ var AnchorTabbarWrapper = /*#__PURE__*/styled.div(_templateObject$x || (_templateObject$x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: sticky;\n top: 0;\n background-color: var(--base-color-white);\n z-index: ", ";\n"])), zIndexes.anchor);
4054
4056
  var TabsGrid = /*#__PURE__*/styled(Grid)(_templateObject2$i || (_templateObject2$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: var(--anchor-tabs-height);\n"])));
4055
4057
  var TabsWrapper = /*#__PURE__*/styled.div(_templateObject3$b || (_templateObject3$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n"])));
4056
4058
  var TabsList = /*#__PURE__*/styled.ul(_templateObject4$7 || (_templateObject4$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: ", ";\n display: flex;\n gap: 32px;\n justify-content: ", ";\n align-items: center;\n list-style: none;\n padding: 0;\n margin: 0;\n height: var(--anchor-tabs-height);\n white-space: nowrap;\n overflow: scroll;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n scroll-behavior: smooth;\n\n @media ", " {\n & {\n width: ", ";\n }\n }\n"])), function (_ref) {
@@ -4181,7 +4183,7 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
4181
4183
  setCanScrollToRight(scrollLeft + clientWidth < scrollWidth);
4182
4184
  };
4183
4185
 
4184
- return /*#__PURE__*/React__default.createElement(AnchorTapbarWrapper, null, /*#__PURE__*/React__default.createElement(TabsGrid, null, /*#__PURE__*/React__default.createElement(GridItem, {
4186
+ return /*#__PURE__*/React__default.createElement(AnchorTabbarWrapper, null, /*#__PURE__*/React__default.createElement(TabsGrid, null, /*#__PURE__*/React__default.createElement(GridItem, {
4185
4187
  columnStartDesktop: tabsColumnStart,
4186
4188
  columnSpanDesktop: tabsColumnSpan,
4187
4189
  columnStartDevice: 2,
@@ -5492,13 +5494,22 @@ var Information = function Information(_ref) {
5492
5494
  };
5493
5495
 
5494
5496
  var _templateObject$L, _templateObject2$v, _templateObject3$m, _templateObject4$g, _templateObject5$b, _templateObject6$8, _templateObject7$5, _templateObject8$5;
5495
- var PageHeadingWrapper = /*#__PURE__*/styled.div(_templateObject$L || (_templateObject$L = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding-bottom: 80px;\n background-color: ", ";\n color: var(--base-color-white);\n\n h2 {\n margin: 0;\n padding: 0;\n }\n\n @media ", " {\n padding-bottom: 0;\n }\n"])), function (_ref) {
5497
+ var PageHeadingWrapper = /*#__PURE__*/styled.div(_templateObject$L || (_templateObject$L = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding-bottom: 80px;\n background-color: ", ";\n color: var(--base-color-white);\n\n ", ";\n\n h2 {\n margin: 0;\n padding: 0;\n }\n\n @media ", " {\n padding-bottom: 0;\n }\n"])), function (_ref) {
5496
5498
  var theme = _ref.theme;
5497
5499
  return theme.colors.primary;
5500
+ }, function (_ref2) {
5501
+ var isPageHeadingWithoutTitle = _ref2.isPageHeadingWithoutTitle;
5502
+ return isPageHeadingWithoutTitle && "\n padding-bottom: 42px;\n ";
5498
5503
  }, devices.mobile);
5499
5504
  var PageHeadingGrid = /*#__PURE__*/styled(Grid)(_templateObject2$v || (_templateObject2$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n gap: 0 var(--grid-column-gap);\n grid-template-rows: min-content min-content;\n grid-template-areas:\n '. . title title title title title title title title title title . . logo .'\n '. . text text text text text text text text text button button button . .';\n\n @media ", " {\n & {\n grid-template-rows: 20px min-content min-content min-content 20px;\n grid-template-areas:\n '. . . . . . . . . . . . . .'\n '. title title title title title title title title title title logo logo .'\n '. text text text text text text text text text text text text .'\n '. button button button button button button button button button button button button .'\n '. . . . . . . . . . . . . .';\n }\n }\n\n @media ", " {\n & {\n grid-template-areas:\n '. title title title title title title title title title title logo logo .'\n '. text text text text text text text text text button button button .';\n }\n }\n"])), devices.mobile, devices.tablet);
5500
- var TitleWrapper$1 = /*#__PURE__*/styled.div(_templateObject3$m || (_templateObject3$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n grid-area: title;\n margin-top: 80px;\n\n @media ", " {\n & {\n margin-top: 0;\n }\n }\n"])), devices.mobile);
5501
- var ChildrenWrapper = /*#__PURE__*/styled.div(_templateObject4$g || (_templateObject4$g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 20px;\n width: fit-content;\n height: 36px;\n\n @media ", " {\n & {\n height: 30px;\n }\n }\n"])), devices.mobile);
5505
+ var TitleWrapper$1 = /*#__PURE__*/styled.div(_templateObject3$m || (_templateObject3$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n grid-area: title;\n margin-top: 80px;\n\n ", ";\n\n @media ", " {\n & {\n margin-top: 0;\n }\n }\n"])), function (_ref3) {
5506
+ var isPageHeadingWithoutTitle = _ref3.isPageHeadingWithoutTitle;
5507
+ return isPageHeadingWithoutTitle && "\n margin-top: 42px;\n ";
5508
+ }, devices.mobile);
5509
+ var ChildrenWrapper = /*#__PURE__*/styled.div(_templateObject4$g || (_templateObject4$g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 20px;\n width: fit-content;\n height: 36px;\n\n ", ";\n\n @media ", " {\n & {\n height: 30px;\n }\n }\n"])), function (_ref4) {
5510
+ var isPageHeadingWithoutTitle = _ref4.isPageHeadingWithoutTitle;
5511
+ return isPageHeadingWithoutTitle && "\n margin: 10px 0;\n ";
5512
+ }, devices.mobile);
5502
5513
  var TextWrapper = /*#__PURE__*/styled.div(_templateObject5$b || (_templateObject5$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n grid-area: text;\n align-self: end;\n margin-top: 12px;\n\n h6 {\n margin: 0;\n padding: 0;\n }\n"])));
5503
5514
  var LogoWrapper$1 = /*#__PURE__*/styled.div(_templateObject6$8 || (_templateObject6$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n grid-area: logo;\n justify-self: end;\n margin-top: 20px;\n position: relative;\n\n > div {\n position: absolute;\n top: 0;\n right: 0;\n }\n\n @media ", " {\n & {\n align-self: start;\n margin-top: 0;\n }\n }\n"])), devices.mobile);
5504
5515
  var ButtonWrapper$1 = /*#__PURE__*/styled.div(_templateObject7$5 || (_templateObject7$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n grid-area: button;\n justify-self: end;\n align-self: end;\n\n @media ", " {\n & {\n justify-self: center;\n align-self: center;\n width: 100%;\n margin-top: 16px;\n }\n }\n"])), devices.mobile);
@@ -5519,12 +5530,17 @@ var PageHeading = function PageHeading(_ref) {
5519
5530
  restLink = _objectWithoutPropertiesLoose(_ref2, _excluded$e);
5520
5531
 
5521
5532
  var truncatedText = text == null ? void 0 : text.substring(0, 250);
5522
- var truncatedTitle = title.substring(0, 40);
5533
+ var truncatedTitle = title && title.substring(0, 40);
5534
+ var isTitleUnAvailable = !title;
5523
5535
  return /*#__PURE__*/React__default.createElement(PageHeadingWrapper, {
5524
- "data-testid": "page-heading-wrapper"
5536
+ "data-testid": "page-heading-wrapper",
5537
+ isPageHeadingWithoutTitle: isTitleUnAvailable
5525
5538
  }, /*#__PURE__*/React__default.createElement(PageHeadingGrid, null, /*#__PURE__*/React__default.createElement(TitleWrapper$1, {
5526
- "data-testid": "page-heading-title"
5527
- }, children ? /*#__PURE__*/React__default.createElement(ChildrenWrapper, null, children) : null, /*#__PURE__*/React__default.createElement(Header, {
5539
+ "data-testid": "page-heading-title",
5540
+ isPageHeadingWithoutTitle: isTitleUnAvailable
5541
+ }, children ? /*#__PURE__*/React__default.createElement(ChildrenWrapper, {
5542
+ isPageHeadingWithoutTitle: isTitleUnAvailable
5543
+ }, children) : null, !isTitleUnAvailable && /*#__PURE__*/React__default.createElement(Header, {
5528
5544
  level: 2
5529
5545
  }, truncatedTitle)), text ? /*#__PURE__*/React__default.createElement(TextWrapper, {
5530
5546
  "data-testid": "page-heading-text"