@royaloperahouse/harmonic 0.12.0-c → 0.12.0-e
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/components/molecules/Accordion/Accordion.style.d.ts +3 -1
- package/dist/components/molecules/BodyContent/BodyContent.style.d.ts +1 -1
- package/dist/harmonic.cjs.development.js +20 -15
- 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 +20 -15
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/types/editorial.d.ts +0 -8
- package/package.json +1 -1
package/dist/harmonic.esm.js
CHANGED
|
@@ -7049,7 +7049,7 @@ var Theme = function Theme(_ref) {
|
|
|
7049
7049
|
};
|
|
7050
7050
|
|
|
7051
7051
|
var _templateObject$I;
|
|
7052
|
-
var TextContainer$1 = /*#__PURE__*/styled
|
|
7052
|
+
var TextContainer$1 = /*#__PURE__*/styled(BodyCopyHarmonic)(_templateObject$I || (_templateObject$I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--color-base-black);\n font-feature-settings: var(--font-feature-settings-body);\n text-transform: var(--text-transform-body);\n\n & h1,\n h2,\n h3,\n h4 {\n font-feature-settings: var(--font-feature-settings-header);\n text-transform: var(--text-transform-header);\n white-space: break-spaces;\n overflow-wrap: break-word;\n margin: 60px 0 16px;\n\n + p {\n margin-top: 0px;\n }\n }\n\n & h5,\n h6 {\n font-feature-settings: var(--font-feature-settings-subtitle);\n text-transform: var(--text-transform-subtitle);\n white-space: break-spaces;\n overflow-wrap: break-word;\n margin: 60px 0 16px;\n\n + p {\n margin-top: 10px;\n }\n }\n\n & a {\n color: var(--color-base-black);\n text-decoration: underline;\n cursor: pointer;\n\n &:hover {\n color: var(--color-rbo-black-hovered);\n }\n\n &:active {\n color: var(--color-rbo-black-pressed);\n }\n }\n\n p {\n margin: 30px 0;\n }\n\n p:has(+ ul),\n p:has(+ ol) {\n margin-bottom: 12px;\n }\n\n & ul,\n & ol {\n padding: 0;\n list-style: none;\n margin-block-start: 0;\n margin-block-end: 0;\n }\n\n & ul li,\n & ol li {\n line-height: var(--line-height-listing);\n position: relative;\n padding-left: 32px;\n\n @media ", " {\n padding-left: 28px;\n }\n }\n\n & ul > li:before {\n display: inline-block;\n content: '\u2014';\n position: absolute;\n left: 0;\n width: 20px;\n text-align: right;\n margin-right: 12px;\n\n @media ", " {\n width: 16px;\n margin-right: 12px;\n }\n }\n\n & ol {\n counter-reset: custom-ol;\n }\n\n & ol > li {\n counter-increment: custom-ol;\n }\n\n & ol > li::before {\n content: counter(custom-ol, decimal-leading-zero) '';\n position: absolute;\n left: 0;\n min-width: 20px;\n text-align: right;\n margin-right: 12px;\n display: inline-block;\n\n @media ", " {\n min-width: 16px;\n margin-right: 12px;\n }\n }\n"])), devices.mobile, devices.mobile, devices.mobile);
|
|
7053
7053
|
|
|
7054
7054
|
var addTypographyClasses = function addTypographyClasses(html) {
|
|
7055
7055
|
return html.replace(/<h1>/g, "<h1 class=\"" + typographyStyles.header + " " + typographyStyles['header--large'] + "\">").replace(/<h2>/g, "<h2 class=\"" + typographyStyles.header + " " + typographyStyles['header--large'] + "\">").replace(/<h3>/g, "<h3 class=\"" + typographyStyles.header + " " + typographyStyles['header--medium'] + "\">").replace(/<h4>/g, "<h4 class=\"" + typographyStyles.header + " " + typographyStyles['header--medium'] + "\">").replace(/<h5>/g, "<h5 class=\"" + typographyStyles.header + " " + typographyStyles['header--small'] + "\">").replace(/<h6>/g, "<h6 class=\"" + typographyStyles.header + " " + typographyStyles['header--small'] + "\">");
|
|
@@ -7074,8 +7074,9 @@ var BodyContent = function BodyContent(_ref) {
|
|
|
7074
7074
|
columnStartDevice: columnStartDevice,
|
|
7075
7075
|
columnSpanDevice: columnSpanDevice
|
|
7076
7076
|
}, /*#__PURE__*/React__default.createElement(TextContainer$1, {
|
|
7077
|
+
tag: "div",
|
|
7078
|
+
size: "large",
|
|
7077
7079
|
"data-testid": "text-container",
|
|
7078
|
-
className: typographyStyles.bodycopy + " " + typographyStyles['bodycopy--large'],
|
|
7079
7080
|
dangerouslySetInnerHTML: {
|
|
7080
7081
|
__html: addTypographyClasses(text)
|
|
7081
7082
|
}
|
|
@@ -8166,15 +8167,21 @@ var ChildrenContainer = /*#__PURE__*/styled.div(_templateObject2$D || (_template
|
|
|
8166
8167
|
var isVisible = _ref3.isVisible;
|
|
8167
8168
|
return isVisible ? 'auto' : 'none';
|
|
8168
8169
|
}, devices.mobile);
|
|
8169
|
-
var TitleContainer$3 = /*#__PURE__*/styled.div(_templateObject3$r || (_templateObject3$r = /*#__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: pointer;\n }\n"])))
|
|
8170
|
+
var TitleContainer$3 = /*#__PURE__*/styled.div(_templateObject3$r || (_templateObject3$r = /*#__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) {
|
|
8171
|
+
var hasChildren = _ref4.hasChildren;
|
|
8172
|
+
return hasChildren ? 'pointer' : 'default';
|
|
8173
|
+
}, function (_ref5) {
|
|
8174
|
+
var hasChildren = _ref5.hasChildren;
|
|
8175
|
+
return hasChildren ? 'auto' : 'none';
|
|
8176
|
+
}, devices.mobile);
|
|
8170
8177
|
var TitleText$1 = /*#__PURE__*/styled(HarmonicSubtitle)(_templateObject4$n || (_templateObject4$n = /*#__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"])));
|
|
8171
8178
|
var ExtendedBodyCopyHarmonic = /*#__PURE__*/styled(BodyCopyHarmonic)(_templateObject5$h || (_templateObject5$h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow: auto;\n transition: max-height 0.2s ease;\n font-feature-settings: var(--font-feature-settings-body);\n text-transform: var(--text-transform-body);\n"])));
|
|
8172
8179
|
var ContentContainer = /*#__PURE__*/styled(ExtendedBodyCopyHarmonic).withConfig({
|
|
8173
8180
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
8174
8181
|
return prop !== 'textHeight';
|
|
8175
8182
|
}
|
|
8176
|
-
})(_templateObject6$d || (_templateObject6$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-height: ", ";\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 (
|
|
8177
|
-
var textHeight =
|
|
8183
|
+
})(_templateObject6$d || (_templateObject6$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-height: ", ";\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) {
|
|
8184
|
+
var textHeight = _ref6.textHeight;
|
|
8178
8185
|
return textHeight;
|
|
8179
8186
|
}, devices.mobile);
|
|
8180
8187
|
var PrintHideWrapper = /*#__PURE__*/styled.div(_templateObject7$a || (_templateObject7$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n @media print {\n display: none;\n }\n"])));
|
|
@@ -8232,7 +8239,8 @@ var Accordion = function Accordion(_ref) {
|
|
|
8232
8239
|
role: "button",
|
|
8233
8240
|
"aria-label": title,
|
|
8234
8241
|
"aria-expanded": openAccordion,
|
|
8235
|
-
"aria-controls": contentContainerId
|
|
8242
|
+
"aria-controls": contentContainerId,
|
|
8243
|
+
hasChildren: !!children
|
|
8236
8244
|
}, /*#__PURE__*/React__default.createElement(TitleText$1, null, title), children && (/*#__PURE__*/React__default.createElement(PrintHideWrapper, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
8237
8245
|
iconName: iconName
|
|
8238
8246
|
})))), /*#__PURE__*/React__default.createElement(ContentContainer, {
|
|
@@ -8241,7 +8249,8 @@ var Accordion = function Accordion(_ref) {
|
|
|
8241
8249
|
textHeight: textHeight,
|
|
8242
8250
|
id: contentContainerId,
|
|
8243
8251
|
"aria-live": "polite",
|
|
8244
|
-
tag: "div"
|
|
8252
|
+
tag: "div",
|
|
8253
|
+
size: "large"
|
|
8245
8254
|
}, /*#__PURE__*/React__default.createElement(ChildrenContainer, {
|
|
8246
8255
|
isVisible: childrenVisibility
|
|
8247
8256
|
}, children)));
|
|
@@ -8822,6 +8831,7 @@ var Editorial = function Editorial(_ref) {
|
|
|
8822
8831
|
tag: "span"
|
|
8823
8832
|
}, subtitle) : null, /*#__PURE__*/React__default.createElement(EditorialText, {
|
|
8824
8833
|
tag: "div",
|
|
8834
|
+
size: "large",
|
|
8825
8835
|
dangerouslySetInnerHTML: {
|
|
8826
8836
|
__html: text
|
|
8827
8837
|
}
|
|
@@ -9103,10 +9113,6 @@ var PageHeading = function PageHeading(_ref) {
|
|
|
9103
9113
|
_ref$sponsor = _ref.sponsor,
|
|
9104
9114
|
sponsor = _ref$sponsor === void 0 ? false : _ref$sponsor,
|
|
9105
9115
|
children = _ref.children,
|
|
9106
|
-
_ref$copyCharLimit = _ref.copyCharLimit,
|
|
9107
|
-
copyCharLimit = _ref$copyCharLimit === void 0 ? 250 : _ref$copyCharLimit,
|
|
9108
|
-
_ref$titleCharLimit = _ref.titleCharLimit,
|
|
9109
|
-
titleCharLimit = _ref$titleCharLimit === void 0 ? 40 : _ref$titleCharLimit,
|
|
9110
9116
|
className = _ref.className,
|
|
9111
9117
|
showBadge = _ref.showBadge,
|
|
9112
9118
|
theme = _ref.theme;
|
|
@@ -9117,8 +9123,6 @@ var PageHeading = function PageHeading(_ref) {
|
|
|
9117
9123
|
pressedColor: ThemeColor['white-pressed']
|
|
9118
9124
|
});
|
|
9119
9125
|
var linkText = themedLink == null ? void 0 : themedLink.text;
|
|
9120
|
-
var truncatedText = text == null ? void 0 : text.substring(0, copyCharLimit);
|
|
9121
|
-
var truncatedTitle = title == null ? void 0 : title.substring(0, titleCharLimit);
|
|
9122
9126
|
var isTitleUnAvailable = !title;
|
|
9123
9127
|
var renderBadge = function renderBadge(currentTheme) {
|
|
9124
9128
|
if (!showBadge) return null;
|
|
@@ -9152,13 +9156,14 @@ var PageHeading = function PageHeading(_ref) {
|
|
|
9152
9156
|
color: "white",
|
|
9153
9157
|
size: "large",
|
|
9154
9158
|
hierarchy: hierarchy
|
|
9155
|
-
},
|
|
9159
|
+
}, title))), text ? (/*#__PURE__*/React__default.createElement(TextWrapper, {
|
|
9156
9160
|
"data-testid": "page-heading-text"
|
|
9157
9161
|
}, /*#__PURE__*/React__default.createElement(BodyCopyHarmonic, {
|
|
9162
|
+
tag: "div",
|
|
9158
9163
|
color: "white",
|
|
9159
9164
|
size: "large",
|
|
9160
9165
|
dangerouslySetInnerHTML: {
|
|
9161
|
-
__html:
|
|
9166
|
+
__html: text
|
|
9162
9167
|
}
|
|
9163
9168
|
}))) : null, sponsor ? (/*#__PURE__*/React__default.createElement(LogoWrapper, {
|
|
9164
9169
|
"data-testid": "page-heading-sponsor",
|