@royaloperahouse/harmonic 1.0.6-e → 1.0.6-g

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 CHANGED
@@ -5,6 +5,8 @@
5
5
  - Added new CustomStrategy filter
6
6
  - Fixed alignment between title and sponsor logo upon Header
7
7
  - extended HighlightsCarousel to change infinit from false to true
8
+ ## [1.0.5]
9
+ - PrimaryButton hover only for device detected hover functionality
8
10
 
9
11
  ## [1.0.4]
10
12
  - Castfilter: fix NDVA issues
@@ -1,5 +1,6 @@
1
1
  export declare const AccordionContainer: import("styled-components").StyledComponent<"div", any, {
2
- showLine?: boolean | undefined;
2
+ showTopLine?: boolean | undefined;
3
+ showBottomLine?: boolean | undefined;
3
4
  }, never>;
4
5
  export declare const ChildrenContainer: import("styled-components").StyledComponent<"div", any, {
5
6
  isVisible: boolean;
@@ -5518,22 +5518,25 @@ var NavTopContainer = /*#__PURE__*/styled__default.div(_templateObject12 || (_te
5518
5518
  var NavTopContainerMobile = /*#__PURE__*/styled__default.div(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: none;\n\n @media ", " {\n display: flex;\n width: fit-content;\n align-items: center;\n height: 10%;\n margin-left: 20px;\n padding-bottom: 36px;\n }\n"])), devices.mobileAndTablet);
5519
5519
 
5520
5520
  var _templateObject$B, _templateObject2$q, _templateObject3$f, _templateObject4$e, _templateObject5$a, _templateObject6$6, _templateObject7$4;
5521
- var AccordionContainer = /*#__PURE__*/styled__default.div(_templateObject$B || (_templateObject$B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n border-top: 2px solid var(--color-base-light-grey);\n border-bottom: ", ";\n"])), function (_ref) {
5522
- var showLine = _ref.showLine;
5523
- return showLine ? '2px solid var(--color-base-light-grey)' : 'none';
5521
+ var AccordionContainer = /*#__PURE__*/styled__default.div(_templateObject$B || (_templateObject$B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n border-top: ", ";\n border-bottom: ", ";\n"])), function (_ref) {
5522
+ var showTopLine = _ref.showTopLine;
5523
+ return showTopLine ? '2px solid var(--color-base-light-grey)' : 'none';
5524
+ }, function (_ref2) {
5525
+ var showBottomLine = _ref2.showBottomLine;
5526
+ return showBottomLine ? '2px solid var(--color-base-light-grey)' : 'none';
5524
5527
  });
5525
- var ChildrenContainer = /*#__PURE__*/styled__default.div(_templateObject2$q || (_templateObject2$q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0px 20px 28px 20px;\n\n opacity: ", ";\n transition: opacity 0.2s ease;\n pointer-events: ", ";\n\n\n @media ", " {\n margin: 12px 0px 24px 0px;\n }\n \n @media print { \n visibility: visible;\n }\n}\n"])), function (_ref2) {
5526
- var isVisible = _ref2.isVisible;
5527
- return isVisible ? 1 : 0;
5528
- }, function (_ref3) {
5528
+ var ChildrenContainer = /*#__PURE__*/styled__default.div(_templateObject2$q || (_templateObject2$q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0px 20px 28px 20px;\n\n opacity: ", ";\n transition: opacity 0.2s ease;\n pointer-events: ", ";\n\n\n @media ", " {\n margin: 12px 0px 24px 0px;\n }\n \n @media print { \n visibility: visible;\n }\n}\n"])), function (_ref3) {
5529
5529
  var isVisible = _ref3.isVisible;
5530
+ return isVisible ? 1 : 0;
5531
+ }, function (_ref4) {
5532
+ var isVisible = _ref4.isVisible;
5530
5533
  return isVisible ? 'auto' : 'none';
5531
5534
  }, devices.mobile);
5532
- var TitleContainer$1 = /*#__PURE__*/styled__default.div(_templateObject3$f || (_templateObject3$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-top: 28px;\n padding-bottom: 28px;\n color: var(--color-primary-black);\n\n && svg {\n width: 24px;\n height: 24px;\n }\n\n :hover {\n cursor: ", ";\n pointer-events: ", ";\n }\n\n @media ", " {\n padding-top: 16px;\n padding-bottom: 16px;\n }\n"])), function (_ref4) {
5533
- var hasChildren = _ref4.hasChildren;
5534
- return hasChildren ? 'pointer' : 'default';
5535
- }, function (_ref5) {
5535
+ var TitleContainer$1 = /*#__PURE__*/styled__default.div(_templateObject3$f || (_templateObject3$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-top: 28px;\n padding-bottom: 28px;\n color: var(--color-primary-black);\n\n && svg {\n width: 24px;\n height: 24px;\n }\n\n :hover {\n cursor: ", ";\n pointer-events: ", ";\n }\n\n @media ", " {\n padding-top: 16px;\n padding-bottom: 16px;\n }\n"])), function (_ref5) {
5536
5536
  var hasChildren = _ref5.hasChildren;
5537
+ return hasChildren ? 'pointer' : 'default';
5538
+ }, function (_ref6) {
5539
+ var hasChildren = _ref6.hasChildren;
5537
5540
  return hasChildren ? 'auto' : 'none';
5538
5541
  }, devices.mobile);
5539
5542
  var TitleText = /*#__PURE__*/styled__default(HarmonicSubtitle)(_templateObject4$e || (_templateObject4$e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: calc(100% - 32px);\n"])));
@@ -5542,14 +5545,14 @@ var ContentContainer = /*#__PURE__*/styled__default(ExtendedBodyCopyHarmonic).wi
5542
5545
  shouldForwardProp: function shouldForwardProp(prop) {
5543
5546
  return prop !== 'textHeight';
5544
5547
  }
5545
- })(_templateObject6$6 || (_templateObject6$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-height: ", ";\n overflow: ", ";\n margin-bottom: ", ";\n\n @media print {\n max-height: max-content;\n }\n\n & em {\n font-family: var(--font-family-body-italics);\n }\n\n & u {\n font-size: var(--font-size-body-1);\n font-family: var(--font-family-body);\n }\n\n @media ", " {\n transition: 100% 0.2s ease;\n }\n"])), function (_ref6) {
5546
- var textHeight = _ref6.textHeight;
5547
- return textHeight;
5548
- }, function (_ref7) {
5548
+ })(_templateObject6$6 || (_templateObject6$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-height: ", ";\n overflow: ", ";\n margin-bottom: ", ";\n\n @media print {\n max-height: max-content;\n }\n\n & em {\n font-family: var(--font-family-body-italics);\n }\n\n & u {\n font-size: var(--font-size-body-1);\n font-family: var(--font-family-body);\n }\n\n @media ", " {\n transition: 100% 0.2s ease;\n }\n"])), function (_ref7) {
5549
5549
  var textHeight = _ref7.textHeight;
5550
- return textHeight === '0px' ? 'hidden' : 'visible';
5550
+ return textHeight;
5551
5551
  }, function (_ref8) {
5552
5552
  var textHeight = _ref8.textHeight;
5553
+ return textHeight === '0px' ? 'hidden' : 'visible';
5554
+ }, function (_ref9) {
5555
+ var textHeight = _ref9.textHeight;
5553
5556
  return textHeight === '0px' ? '0px' : '12px';
5554
5557
  }, devices.mobile);
5555
5558
  var PrintHideWrapper = /*#__PURE__*/styled__default.div(_templateObject7$4 || (_templateObject7$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n @media print {\n display: none;\n }\n"])));
@@ -5571,14 +5574,17 @@ var Accordion = function Accordion(_ref) {
5571
5574
  var _expandedStateIcon$ic, _collapsedStateIcon$i;
5572
5575
  var _ref$title = _ref.title,
5573
5576
  title = _ref$title === void 0 ? '' : _ref$title,
5574
- _ref$showLine = _ref.showLine,
5575
- showLine = _ref$showLine === void 0 ? true : _ref$showLine,
5577
+ _ref$showTopLine = _ref.showTopLine,
5578
+ showTopLine = _ref$showTopLine === void 0 ? true : _ref$showTopLine,
5579
+ _ref$showBottomLine = _ref.showBottomLine,
5580
+ showBottomLine = _ref$showBottomLine === void 0 ? true : _ref$showBottomLine,
5576
5581
  children = _ref.children,
5577
5582
  _ref$initOpen = _ref.initOpen,
5578
5583
  initOpen = _ref$initOpen === void 0 ? false : _ref$initOpen,
5579
5584
  className = _ref.className,
5580
5585
  expandedStateIcon = _ref.expandedStateIcon,
5581
- collapsedStateIcon = _ref.collapsedStateIcon;
5586
+ collapsedStateIcon = _ref.collapsedStateIcon,
5587
+ childrenContainerStyle = _ref.childrenContainerStyle;
5582
5588
  var _useState = React.useState(initOpen),
5583
5589
  openAccordion = _useState[0],
5584
5590
  setOpenAccordion = _useState[1];
@@ -5714,7 +5720,8 @@ var Accordion = function Accordion(_ref) {
5714
5720
  };
5715
5721
  var contentContainerId = title + "-accordion-content";
5716
5722
  return /*#__PURE__*/React__default.createElement(AccordionContainer, {
5717
- showLine: showLine,
5723
+ showTopLine: showTopLine,
5724
+ showBottomLine: showBottomLine,
5718
5725
  className: className
5719
5726
  }, /*#__PURE__*/React__default.createElement(TitleContainer$1, {
5720
5727
  onClick: toggleAccordion,
@@ -5733,9 +5740,10 @@ var Accordion = function Accordion(_ref) {
5733
5740
  "aria-live": openAccordion ? 'polite' : 'off',
5734
5741
  tag: "div",
5735
5742
  size: "large"
5736
- }, childrenVisibility && /*#__PURE__*/React__default.createElement(ChildrenContainer, {
5737
- isVisible: childrenVisibility
5738
- }, children)));
5743
+ }, childrenVisibility && (/*#__PURE__*/React__default.createElement(ChildrenContainer, {
5744
+ isVisible: childrenVisibility,
5745
+ style: childrenContainerStyle
5746
+ }, children))));
5739
5747
  };
5740
5748
 
5741
5749
  var _templateObject$C;
@@ -5754,7 +5762,7 @@ var Accordions = function Accordions(_ref) {
5754
5762
  return /*#__PURE__*/React__default.createElement(Accordion, {
5755
5763
  key: accordion.title + "-" + index,
5756
5764
  title: accordion.title,
5757
- showLine: isLastAccordion(index),
5765
+ showBottomLine: isLastAccordion(index),
5758
5766
  expandedStateIcon: accordion.expandedStateIcon,
5759
5767
  collapsedStateIcon: accordion.collapsedStateIcon
5760
5768
  }, accordion.children);
@@ -10618,7 +10626,8 @@ var ReadMore = function ReadMore(_ref) {
10618
10626
  return /*#__PURE__*/React__default.createElement(AccordionContainer, {
10619
10627
  tabIndex: 0,
10620
10628
  onKeyDown: handleKeyDown,
10621
- className: className
10629
+ className: className,
10630
+ showTopLine: false
10622
10631
  }, /*#__PURE__*/React__default.createElement(ReadMoreContainer, {
10623
10632
  "aria-label": title,
10624
10633
  "aria-expanded": isFullTextOpen,