@royaloperahouse/chord 0.7.47 → 0.7.48
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 +3 -0
- package/dist/chord.cjs.development.js +24 -15
- package/dist/chord.cjs.development.js.map +1 -1
- package/dist/chord.cjs.production.min.js +1 -1
- package/dist/chord.cjs.production.min.js.map +1 -1
- package/dist/chord.esm.js +24 -15
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/molecules/Information/Information.style.d.ts +3 -3
- package/dist/types/information.d.ts +10 -4
- package/package.json +1 -1
package/dist/chord.esm.js
CHANGED
|
@@ -5252,40 +5252,48 @@ var TitleVariant;
|
|
|
5252
5252
|
TitleVariant["AltHeader"] = "AltHeader";
|
|
5253
5253
|
})(TitleVariant || (TitleVariant = {}));
|
|
5254
5254
|
|
|
5255
|
+
var BackgroundColour;
|
|
5256
|
+
|
|
5257
|
+
(function (BackgroundColour) {
|
|
5258
|
+
BackgroundColour["Cinema"] = "cinema";
|
|
5259
|
+
BackgroundColour["Core"] = "core";
|
|
5260
|
+
BackgroundColour["Stream"] = "stream";
|
|
5261
|
+
BackgroundColour["White"] = "white";
|
|
5262
|
+
})(BackgroundColour || (BackgroundColour = {}));
|
|
5263
|
+
|
|
5255
5264
|
var _templateObject$K, _templateObject2$t, _templateObject3$l, _templateObject4$f;
|
|
5256
5265
|
var InfoContent = /*#__PURE__*/styled('div')(_templateObject$K || (_templateObject$K = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: var(--font-family-altHeader);\n font-feature-settings: var(--font-feature-settings-altHeader);\n font-size: var(--font-size-altHeader-6);\n font-weight: var(--font-weight-altHeader-6);\n -webkit-letter-spacing: var(--letter-spacing-altHeader-6);\n -moz-letter-spacing: var(--letter-spacing-altHeader-6);\n -ms-letter-spacing: var(--letter-spacing-altHeader-6);\n letter-spacing: var(--letter-spacing-altHeader-6);\n line-height: var(--line-height-altHeader-6);\n word-break: var(--word-break-altHeader);\n"])));
|
|
5257
5266
|
var InfoTitle = /*#__PURE__*/styled('div')(_templateObject2$t || (_templateObject2$t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n * {\n margin-block: 0;\n }\n"])));
|
|
5258
5267
|
var InfoCTAWrapper = /*#__PURE__*/styled('div')(_templateObject3$l || (_templateObject3$l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 32px 0;\n\n ", "}\n"])), function (props) {
|
|
5259
|
-
if (!props.
|
|
5268
|
+
if (!props.infoThemed) {
|
|
5260
5269
|
return;
|
|
5261
5270
|
} else {
|
|
5262
5271
|
if (props.variant === CtaVariant.Primary || props.variant === CtaVariant.Secondary) {
|
|
5263
|
-
return "a {\n color: var(--base-color-black);\n background: var(--base-color-white);\n }";
|
|
5272
|
+
return "a {\n color: var(--base-color-black);\n background: var(--base-color-white);\n border-color: var(--base-color-transparent);\n }";
|
|
5264
5273
|
} else {
|
|
5265
|
-
return "a {\n color: var(--base-color-white);\n background: var(--base-color-
|
|
5274
|
+
return "a {\n color: var(--base-color-white);\n background: var(--base-color-transparent});\n }\n svg > path {\n fill: var(--base-color-white);\n stroke: var(--base-color-white);\n stroke-width: 1;\n }\n ";
|
|
5266
5275
|
}
|
|
5267
5276
|
}
|
|
5268
5277
|
});
|
|
5269
|
-
var InfoWrapper$1 = /*#__PURE__*/styled(Grid)(_templateObject4$f || (_templateObject4$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 60px 0;\n color: ", ";\n background: ", ";\n"])), function (props) {
|
|
5270
|
-
return props.
|
|
5278
|
+
var InfoWrapper$1 = /*#__PURE__*/styled(Grid)(_templateObject4$f || (_templateObject4$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 60px 0;\n color: ", ";\n background: ", "\n }};\n"])), function (props) {
|
|
5279
|
+
return props.background !== BackgroundColour.White ? 'var(--base-color-white)' : 'var(--base-color-black)';
|
|
5271
5280
|
}, function (props) {
|
|
5272
|
-
return
|
|
5281
|
+
return "var(--base-color-" + props.background + ")";
|
|
5273
5282
|
});
|
|
5274
5283
|
|
|
5275
5284
|
var InfoCta = function InfoCta(_ref) {
|
|
5276
|
-
var _ref$
|
|
5277
|
-
important = _ref$important === void 0 ? false : _ref$important,
|
|
5278
|
-
_ref$variant = _ref.variant,
|
|
5285
|
+
var _ref$variant = _ref.variant,
|
|
5279
5286
|
variant = _ref$variant === void 0 ? CtaVariant.Primary : _ref$variant,
|
|
5280
5287
|
_ref$theme = _ref.theme,
|
|
5281
5288
|
theme = _ref$theme === void 0 ? CtaTheme.Core : _ref$theme,
|
|
5282
5289
|
link = _ref.link,
|
|
5283
5290
|
text = _ref.text,
|
|
5284
5291
|
iconName = _ref.iconName,
|
|
5285
|
-
iconDirection = _ref.iconDirection
|
|
5292
|
+
iconDirection = _ref.iconDirection,
|
|
5293
|
+
infoThemed = _ref.infoThemed;
|
|
5286
5294
|
return /*#__PURE__*/React__default.createElement(InfoCTAWrapper, {
|
|
5287
5295
|
variant: variant,
|
|
5288
|
-
|
|
5296
|
+
infoThemed: infoThemed,
|
|
5289
5297
|
theme: theme
|
|
5290
5298
|
}, variant === CtaVariant.Secondary ? /*#__PURE__*/React__default.createElement(SecondaryButton, {
|
|
5291
5299
|
color: Colors[theme],
|
|
@@ -5343,7 +5351,7 @@ var renderTitle = function renderTitle(props) {
|
|
|
5343
5351
|
var Information = function Information(_ref) {
|
|
5344
5352
|
var body = _ref.body,
|
|
5345
5353
|
title = _ref.title,
|
|
5346
|
-
|
|
5354
|
+
background = _ref.background,
|
|
5347
5355
|
cta = _ref.cta;
|
|
5348
5356
|
var titleWords = title.text.split(' ');
|
|
5349
5357
|
var titleWordLengths = titleWords.map(function (word) {
|
|
@@ -5351,8 +5359,9 @@ var Information = function Information(_ref) {
|
|
|
5351
5359
|
});
|
|
5352
5360
|
var maxTitleWordLength = Math.max.apply(Math, titleWordLengths);
|
|
5353
5361
|
var titleColumnSpan = getColumnSpan(title.variant, title.textSize, maxTitleWordLength);
|
|
5362
|
+
var bgColour = background != null ? background : BackgroundColour.White;
|
|
5354
5363
|
return /*#__PURE__*/React__default.createElement(InfoWrapper$1, {
|
|
5355
|
-
|
|
5364
|
+
background: bgColour,
|
|
5356
5365
|
"data-testid": "infoWrapper"
|
|
5357
5366
|
}, /*#__PURE__*/React__default.createElement(GridItem, {
|
|
5358
5367
|
columnStartDesktop: 2,
|
|
@@ -5372,7 +5381,7 @@ var Information = function Information(_ref) {
|
|
|
5372
5381
|
link: cta.link,
|
|
5373
5382
|
variant: cta.variant,
|
|
5374
5383
|
theme: cta.theme,
|
|
5375
|
-
|
|
5384
|
+
infoThemed: bgColour !== BackgroundColour.White,
|
|
5376
5385
|
text: cta.text,
|
|
5377
5386
|
iconName: cta.iconName,
|
|
5378
5387
|
iconDirection: cta.iconDirection
|
|
@@ -5791,7 +5800,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
|
|
|
5791
5800
|
},
|
|
5792
5801
|
tabIndex: 0,
|
|
5793
5802
|
onKeyPress: function onKeyPress(e) {
|
|
5794
|
-
e.key ===
|
|
5803
|
+
e.key === 'Enter' && setShowExtraContent(false);
|
|
5795
5804
|
}
|
|
5796
5805
|
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
5797
5806
|
iconName: "Close",
|