@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 +2 -0
- package/dist/components/molecules/Accordion/Accordion.style.d.ts +2 -1
- package/dist/harmonic.cjs.development.js +34 -25
- package/dist/harmonic.cjs.development.js.map +1 -1
- package/dist/harmonic.cjs.production.min.js +1 -1
- package/dist/harmonic.cjs.production.min.js.map +1 -1
- package/dist/harmonic.esm.js +34 -25
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/types/types.d.ts +5 -1
- package/package.json +1 -1
package/dist/harmonic.esm.js
CHANGED
|
@@ -5543,22 +5543,25 @@ var NavTopContainer = /*#__PURE__*/styled.div(_templateObject12 || (_templateObj
|
|
|
5543
5543
|
var NavTopContainerMobile = /*#__PURE__*/styled.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);
|
|
5544
5544
|
|
|
5545
5545
|
var _templateObject$B, _templateObject2$q, _templateObject3$f, _templateObject4$e, _templateObject5$a, _templateObject6$6, _templateObject7$4;
|
|
5546
|
-
var AccordionContainer = /*#__PURE__*/styled.div(_templateObject$B || (_templateObject$B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n border-top:
|
|
5547
|
-
var
|
|
5548
|
-
return
|
|
5546
|
+
var AccordionContainer = /*#__PURE__*/styled.div(_templateObject$B || (_templateObject$B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n border-top: ", ";\n border-bottom: ", ";\n"])), function (_ref) {
|
|
5547
|
+
var showTopLine = _ref.showTopLine;
|
|
5548
|
+
return showTopLine ? '2px solid var(--color-base-light-grey)' : 'none';
|
|
5549
|
+
}, function (_ref2) {
|
|
5550
|
+
var showBottomLine = _ref2.showBottomLine;
|
|
5551
|
+
return showBottomLine ? '2px solid var(--color-base-light-grey)' : 'none';
|
|
5549
5552
|
});
|
|
5550
|
-
var ChildrenContainer = /*#__PURE__*/styled.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 (
|
|
5551
|
-
var isVisible = _ref2.isVisible;
|
|
5552
|
-
return isVisible ? 1 : 0;
|
|
5553
|
-
}, function (_ref3) {
|
|
5553
|
+
var ChildrenContainer = /*#__PURE__*/styled.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) {
|
|
5554
5554
|
var isVisible = _ref3.isVisible;
|
|
5555
|
+
return isVisible ? 1 : 0;
|
|
5556
|
+
}, function (_ref4) {
|
|
5557
|
+
var isVisible = _ref4.isVisible;
|
|
5555
5558
|
return isVisible ? 'auto' : 'none';
|
|
5556
5559
|
}, devices.mobile);
|
|
5557
|
-
var TitleContainer$1 = /*#__PURE__*/styled.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 (
|
|
5558
|
-
var hasChildren = _ref4.hasChildren;
|
|
5559
|
-
return hasChildren ? 'pointer' : 'default';
|
|
5560
|
-
}, function (_ref5) {
|
|
5560
|
+
var TitleContainer$1 = /*#__PURE__*/styled.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) {
|
|
5561
5561
|
var hasChildren = _ref5.hasChildren;
|
|
5562
|
+
return hasChildren ? 'pointer' : 'default';
|
|
5563
|
+
}, function (_ref6) {
|
|
5564
|
+
var hasChildren = _ref6.hasChildren;
|
|
5562
5565
|
return hasChildren ? 'auto' : 'none';
|
|
5563
5566
|
}, devices.mobile);
|
|
5564
5567
|
var TitleText = /*#__PURE__*/styled(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"])));
|
|
@@ -5567,14 +5570,14 @@ var ContentContainer = /*#__PURE__*/styled(ExtendedBodyCopyHarmonic).withConfig(
|
|
|
5567
5570
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
5568
5571
|
return prop !== 'textHeight';
|
|
5569
5572
|
}
|
|
5570
|
-
})(_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 (
|
|
5571
|
-
var textHeight = _ref6.textHeight;
|
|
5572
|
-
return textHeight;
|
|
5573
|
-
}, function (_ref7) {
|
|
5573
|
+
})(_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) {
|
|
5574
5574
|
var textHeight = _ref7.textHeight;
|
|
5575
|
-
return textHeight
|
|
5575
|
+
return textHeight;
|
|
5576
5576
|
}, function (_ref8) {
|
|
5577
5577
|
var textHeight = _ref8.textHeight;
|
|
5578
|
+
return textHeight === '0px' ? 'hidden' : 'visible';
|
|
5579
|
+
}, function (_ref9) {
|
|
5580
|
+
var textHeight = _ref9.textHeight;
|
|
5578
5581
|
return textHeight === '0px' ? '0px' : '12px';
|
|
5579
5582
|
}, devices.mobile);
|
|
5580
5583
|
var PrintHideWrapper = /*#__PURE__*/styled.div(_templateObject7$4 || (_templateObject7$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n @media print {\n display: none;\n }\n"])));
|
|
@@ -5596,14 +5599,17 @@ var Accordion = function Accordion(_ref) {
|
|
|
5596
5599
|
var _expandedStateIcon$ic, _collapsedStateIcon$i;
|
|
5597
5600
|
var _ref$title = _ref.title,
|
|
5598
5601
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
5599
|
-
_ref$
|
|
5600
|
-
|
|
5602
|
+
_ref$showTopLine = _ref.showTopLine,
|
|
5603
|
+
showTopLine = _ref$showTopLine === void 0 ? true : _ref$showTopLine,
|
|
5604
|
+
_ref$showBottomLine = _ref.showBottomLine,
|
|
5605
|
+
showBottomLine = _ref$showBottomLine === void 0 ? true : _ref$showBottomLine,
|
|
5601
5606
|
children = _ref.children,
|
|
5602
5607
|
_ref$initOpen = _ref.initOpen,
|
|
5603
5608
|
initOpen = _ref$initOpen === void 0 ? false : _ref$initOpen,
|
|
5604
5609
|
className = _ref.className,
|
|
5605
5610
|
expandedStateIcon = _ref.expandedStateIcon,
|
|
5606
|
-
collapsedStateIcon = _ref.collapsedStateIcon
|
|
5611
|
+
collapsedStateIcon = _ref.collapsedStateIcon,
|
|
5612
|
+
childrenContainerStyle = _ref.childrenContainerStyle;
|
|
5607
5613
|
var _useState = useState(initOpen),
|
|
5608
5614
|
openAccordion = _useState[0],
|
|
5609
5615
|
setOpenAccordion = _useState[1];
|
|
@@ -5739,7 +5745,8 @@ var Accordion = function Accordion(_ref) {
|
|
|
5739
5745
|
};
|
|
5740
5746
|
var contentContainerId = title + "-accordion-content";
|
|
5741
5747
|
return /*#__PURE__*/React__default.createElement(AccordionContainer, {
|
|
5742
|
-
|
|
5748
|
+
showTopLine: showTopLine,
|
|
5749
|
+
showBottomLine: showBottomLine,
|
|
5743
5750
|
className: className
|
|
5744
5751
|
}, /*#__PURE__*/React__default.createElement(TitleContainer$1, {
|
|
5745
5752
|
onClick: toggleAccordion,
|
|
@@ -5758,9 +5765,10 @@ var Accordion = function Accordion(_ref) {
|
|
|
5758
5765
|
"aria-live": openAccordion ? 'polite' : 'off',
|
|
5759
5766
|
tag: "div",
|
|
5760
5767
|
size: "large"
|
|
5761
|
-
}, childrenVisibility && /*#__PURE__*/React__default.createElement(ChildrenContainer, {
|
|
5762
|
-
isVisible: childrenVisibility
|
|
5763
|
-
|
|
5768
|
+
}, childrenVisibility && (/*#__PURE__*/React__default.createElement(ChildrenContainer, {
|
|
5769
|
+
isVisible: childrenVisibility,
|
|
5770
|
+
style: childrenContainerStyle
|
|
5771
|
+
}, children))));
|
|
5764
5772
|
};
|
|
5765
5773
|
|
|
5766
5774
|
var _templateObject$C;
|
|
@@ -5779,7 +5787,7 @@ var Accordions = function Accordions(_ref) {
|
|
|
5779
5787
|
return /*#__PURE__*/React__default.createElement(Accordion, {
|
|
5780
5788
|
key: accordion.title + "-" + index,
|
|
5781
5789
|
title: accordion.title,
|
|
5782
|
-
|
|
5790
|
+
showBottomLine: isLastAccordion(index),
|
|
5783
5791
|
expandedStateIcon: accordion.expandedStateIcon,
|
|
5784
5792
|
collapsedStateIcon: accordion.collapsedStateIcon
|
|
5785
5793
|
}, accordion.children);
|
|
@@ -10659,7 +10667,8 @@ var ReadMore = function ReadMore(_ref) {
|
|
|
10659
10667
|
return /*#__PURE__*/React__default.createElement(AccordionContainer, {
|
|
10660
10668
|
tabIndex: 0,
|
|
10661
10669
|
onKeyDown: handleKeyDown,
|
|
10662
|
-
className: className
|
|
10670
|
+
className: className,
|
|
10671
|
+
showTopLine: false
|
|
10663
10672
|
}, /*#__PURE__*/React__default.createElement(ReadMoreContainer, {
|
|
10664
10673
|
"aria-label": title,
|
|
10665
10674
|
"aria-expanded": isFullTextOpen,
|