@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
|
@@ -4,7 +4,9 @@ export declare const AccordionContainer: import("styled-components").StyledCompo
|
|
|
4
4
|
export declare const ChildrenContainer: import("styled-components").StyledComponent<"div", any, {
|
|
5
5
|
isVisible: boolean;
|
|
6
6
|
}, never>;
|
|
7
|
-
export declare const TitleContainer: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
+
export declare const TitleContainer: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
hasChildren?: boolean | undefined;
|
|
9
|
+
}, never>;
|
|
8
10
|
export declare const TitleText: import("styled-components").StyledComponent<({ children, size, color, className, tag: Tag, }: import("../../../types/typography").ITaggedTypographyProps) => import("react").JSX.Element, any, {}, never>;
|
|
9
11
|
export declare const ContentContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../types/typography").ITaggedTypographyProps & import("react").RefAttributes<HTMLParagraphElement>>, any, {
|
|
10
12
|
textHeight?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const TextContainer: import("styled-components").StyledComponent<"
|
|
1
|
+
export declare const TextContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../types/typography").ITaggedTypographyProps & import("react").RefAttributes<HTMLParagraphElement>>, any, {}, never>;
|
|
@@ -7008,7 +7008,7 @@ var Theme = function Theme(_ref) {
|
|
|
7008
7008
|
};
|
|
7009
7009
|
|
|
7010
7010
|
var _templateObject$I;
|
|
7011
|
-
var TextContainer$1 = /*#__PURE__*/styled__default
|
|
7011
|
+
var TextContainer$1 = /*#__PURE__*/styled__default(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);
|
|
7012
7012
|
|
|
7013
7013
|
var addTypographyClasses = function addTypographyClasses(html) {
|
|
7014
7014
|
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'] + "\">");
|
|
@@ -7033,8 +7033,9 @@ var BodyContent = function BodyContent(_ref) {
|
|
|
7033
7033
|
columnStartDevice: columnStartDevice,
|
|
7034
7034
|
columnSpanDevice: columnSpanDevice
|
|
7035
7035
|
}, /*#__PURE__*/React__default.createElement(TextContainer$1, {
|
|
7036
|
+
tag: "div",
|
|
7037
|
+
size: "large",
|
|
7036
7038
|
"data-testid": "text-container",
|
|
7037
|
-
className: typographyStyles.bodycopy + " " + typographyStyles['bodycopy--large'],
|
|
7038
7039
|
dangerouslySetInnerHTML: {
|
|
7039
7040
|
__html: addTypographyClasses(text)
|
|
7040
7041
|
}
|
|
@@ -8125,15 +8126,21 @@ var ChildrenContainer = /*#__PURE__*/styled__default.div(_templateObject2$D || (
|
|
|
8125
8126
|
var isVisible = _ref3.isVisible;
|
|
8126
8127
|
return isVisible ? 'auto' : 'none';
|
|
8127
8128
|
}, devices.mobile);
|
|
8128
|
-
var TitleContainer$3 = /*#__PURE__*/styled__default.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"])))
|
|
8129
|
+
var TitleContainer$3 = /*#__PURE__*/styled__default.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) {
|
|
8130
|
+
var hasChildren = _ref4.hasChildren;
|
|
8131
|
+
return hasChildren ? 'pointer' : 'default';
|
|
8132
|
+
}, function (_ref5) {
|
|
8133
|
+
var hasChildren = _ref5.hasChildren;
|
|
8134
|
+
return hasChildren ? 'auto' : 'none';
|
|
8135
|
+
}, devices.mobile);
|
|
8129
8136
|
var TitleText$1 = /*#__PURE__*/styled__default(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"])));
|
|
8130
8137
|
var ExtendedBodyCopyHarmonic = /*#__PURE__*/styled__default(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"])));
|
|
8131
8138
|
var ContentContainer = /*#__PURE__*/styled__default(ExtendedBodyCopyHarmonic).withConfig({
|
|
8132
8139
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
8133
8140
|
return prop !== 'textHeight';
|
|
8134
8141
|
}
|
|
8135
|
-
})(_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 (
|
|
8136
|
-
var textHeight =
|
|
8142
|
+
})(_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) {
|
|
8143
|
+
var textHeight = _ref6.textHeight;
|
|
8137
8144
|
return textHeight;
|
|
8138
8145
|
}, devices.mobile);
|
|
8139
8146
|
var PrintHideWrapper = /*#__PURE__*/styled__default.div(_templateObject7$a || (_templateObject7$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n @media print {\n display: none;\n }\n"])));
|
|
@@ -8191,7 +8198,8 @@ var Accordion = function Accordion(_ref) {
|
|
|
8191
8198
|
role: "button",
|
|
8192
8199
|
"aria-label": title,
|
|
8193
8200
|
"aria-expanded": openAccordion,
|
|
8194
|
-
"aria-controls": contentContainerId
|
|
8201
|
+
"aria-controls": contentContainerId,
|
|
8202
|
+
hasChildren: !!children
|
|
8195
8203
|
}, /*#__PURE__*/React__default.createElement(TitleText$1, null, title), children && (/*#__PURE__*/React__default.createElement(PrintHideWrapper, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
8196
8204
|
iconName: iconName
|
|
8197
8205
|
})))), /*#__PURE__*/React__default.createElement(ContentContainer, {
|
|
@@ -8200,7 +8208,8 @@ var Accordion = function Accordion(_ref) {
|
|
|
8200
8208
|
textHeight: textHeight,
|
|
8201
8209
|
id: contentContainerId,
|
|
8202
8210
|
"aria-live": "polite",
|
|
8203
|
-
tag: "div"
|
|
8211
|
+
tag: "div",
|
|
8212
|
+
size: "large"
|
|
8204
8213
|
}, /*#__PURE__*/React__default.createElement(ChildrenContainer, {
|
|
8205
8214
|
isVisible: childrenVisibility
|
|
8206
8215
|
}, children)));
|
|
@@ -8781,6 +8790,7 @@ var Editorial = function Editorial(_ref) {
|
|
|
8781
8790
|
tag: "span"
|
|
8782
8791
|
}, subtitle) : null, /*#__PURE__*/React__default.createElement(EditorialText, {
|
|
8783
8792
|
tag: "div",
|
|
8793
|
+
size: "large",
|
|
8784
8794
|
dangerouslySetInnerHTML: {
|
|
8785
8795
|
__html: text
|
|
8786
8796
|
}
|
|
@@ -9062,10 +9072,6 @@ var PageHeading = function PageHeading(_ref) {
|
|
|
9062
9072
|
_ref$sponsor = _ref.sponsor,
|
|
9063
9073
|
sponsor = _ref$sponsor === void 0 ? false : _ref$sponsor,
|
|
9064
9074
|
children = _ref.children,
|
|
9065
|
-
_ref$copyCharLimit = _ref.copyCharLimit,
|
|
9066
|
-
copyCharLimit = _ref$copyCharLimit === void 0 ? 250 : _ref$copyCharLimit,
|
|
9067
|
-
_ref$titleCharLimit = _ref.titleCharLimit,
|
|
9068
|
-
titleCharLimit = _ref$titleCharLimit === void 0 ? 40 : _ref$titleCharLimit,
|
|
9069
9075
|
className = _ref.className,
|
|
9070
9076
|
showBadge = _ref.showBadge,
|
|
9071
9077
|
theme = _ref.theme;
|
|
@@ -9076,8 +9082,6 @@ var PageHeading = function PageHeading(_ref) {
|
|
|
9076
9082
|
pressedColor: ThemeColor['white-pressed']
|
|
9077
9083
|
});
|
|
9078
9084
|
var linkText = themedLink == null ? void 0 : themedLink.text;
|
|
9079
|
-
var truncatedText = text == null ? void 0 : text.substring(0, copyCharLimit);
|
|
9080
|
-
var truncatedTitle = title == null ? void 0 : title.substring(0, titleCharLimit);
|
|
9081
9085
|
var isTitleUnAvailable = !title;
|
|
9082
9086
|
var renderBadge = function renderBadge(currentTheme) {
|
|
9083
9087
|
if (!showBadge) return null;
|
|
@@ -9111,13 +9115,14 @@ var PageHeading = function PageHeading(_ref) {
|
|
|
9111
9115
|
color: "white",
|
|
9112
9116
|
size: "large",
|
|
9113
9117
|
hierarchy: hierarchy
|
|
9114
|
-
},
|
|
9118
|
+
}, title))), text ? (/*#__PURE__*/React__default.createElement(TextWrapper, {
|
|
9115
9119
|
"data-testid": "page-heading-text"
|
|
9116
9120
|
}, /*#__PURE__*/React__default.createElement(BodyCopyHarmonic, {
|
|
9121
|
+
tag: "div",
|
|
9117
9122
|
color: "white",
|
|
9118
9123
|
size: "large",
|
|
9119
9124
|
dangerouslySetInnerHTML: {
|
|
9120
|
-
__html:
|
|
9125
|
+
__html: text
|
|
9121
9126
|
}
|
|
9122
9127
|
}))) : null, sponsor ? (/*#__PURE__*/React__default.createElement(LogoWrapper, {
|
|
9123
9128
|
"data-testid": "page-heading-sponsor",
|