@royaloperahouse/chord 2.2.5-b-select-test → 2.2.5-c-chord-development

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.
@@ -10,8 +10,6 @@ var styled = require('styled-components');
10
10
  var styled__default = _interopDefault(styled);
11
11
  var moment = _interopDefault(require('moment'));
12
12
  var server = require('react-dom/server');
13
- var ReactSelect = require('react-select');
14
- var ReactSelect__default = _interopDefault(ReactSelect);
15
13
  var Modal = _interopDefault(require('react-modal'));
16
14
  var ScrollLock = _interopDefault(require('react-scrolllock'));
17
15
 
@@ -2177,12 +2175,14 @@ var Icon = /*#__PURE__*/React.memo(function (_ref) {
2177
2175
  });
2178
2176
  Icon.displayName = 'Icon';
2179
2177
 
2178
+ var _excluded = ["children", "iconName", "iconDirection", "color"];
2179
+
2180
2180
  var Button = function Button(_ref) {
2181
2181
  var children = _ref.children,
2182
2182
  iconName = _ref.iconName,
2183
2183
  iconDirection = _ref.iconDirection,
2184
2184
  color = _ref.color,
2185
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "iconName", "iconDirection", "color"]);
2185
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
2186
2186
 
2187
2187
  var truncatedString = children.substring(0, 30);
2188
2188
  return /*#__PURE__*/React__default.createElement(ButtonWrapper, Object.assign({}, rest, {
@@ -2250,9 +2250,11 @@ var AspectRatioWidth;
2250
2250
  ButtonType["Tertiary"] = "Tertiary";
2251
2251
  })(exports.ButtonType || (exports.ButtonType = {}));
2252
2252
 
2253
+ var _excluded$1 = ["children"];
2254
+
2253
2255
  var PrimaryButton = function PrimaryButton(_ref) {
2254
2256
  var children = _ref.children,
2255
- props = _objectWithoutPropertiesLoose(_ref, ["children"]);
2257
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
2256
2258
 
2257
2259
  return /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper, Object.assign({
2258
2260
  color: exports.Colors.White
@@ -2266,9 +2268,11 @@ var PrimaryButtonWrapper$1 = /*#__PURE__*/styled__default(Button)(_templateObjec
2266
2268
  return color ? "var(--base-color-" + color + ")" : theme.colors.primary;
2267
2269
  });
2268
2270
 
2271
+ var _excluded$2 = ["children"];
2272
+
2269
2273
  var SecondaryButton = function SecondaryButton(_ref) {
2270
2274
  var children = _ref.children,
2271
- props = _objectWithoutPropertiesLoose(_ref, ["children"]);
2275
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
2272
2276
 
2273
2277
  return /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper$1, Object.assign({
2274
2278
  color: exports.Colors.Primary
@@ -2282,10 +2286,12 @@ var TertiaryButtonWrapper = /*#__PURE__*/styled__default.a(_templateObject$6 ||
2282
2286
  });
2283
2287
  var TertiaryIconWrapper = /*#__PURE__*/styled__default.span(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: var(--button-icon-width);\n min-width: 20px;\n height: var(--button-icon-height);\n margin-left: var(--button-icon-margin);\n display: inline-block;\n"])));
2284
2288
 
2289
+ var _excluded$3 = ["children", "color"];
2290
+
2285
2291
  var Button$1 = function Button(_ref) {
2286
2292
  var children = _ref.children,
2287
2293
  color = _ref.color,
2288
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "color"]);
2294
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
2289
2295
 
2290
2296
  var truncatedString = children.substring(0, 100);
2291
2297
  return /*#__PURE__*/React__default.createElement(TertiaryButtonWrapper, Object.assign({}, rest, {
@@ -3247,6 +3253,8 @@ var TabLinkWrapper = /*#__PURE__*/styled__default.a(_templateObject$l || (_templ
3247
3253
  });
3248
3254
  var TabLinkIconWrapper = /*#__PURE__*/styled__default.span(_templateObject2$9 || (_templateObject2$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: var(--button-icon-width);\n height: var(--button-icon-height);\n margin-right: var(--button-icon-margin);\n"])));
3249
3255
 
3256
+ var _excluded$4 = ["children", "iconName", "iconDirection", "color", "hoverColor"];
3257
+
3250
3258
  var TabLink = function TabLink(_ref) {
3251
3259
  var children = _ref.children,
3252
3260
  iconName = _ref.iconName,
@@ -3255,7 +3263,7 @@ var TabLink = function TabLink(_ref) {
3255
3263
  color = _ref$color === void 0 ? exports.Colors.DarkGrey : _ref$color,
3256
3264
  _ref$hoverColor = _ref.hoverColor,
3257
3265
  hoverColor = _ref$hoverColor === void 0 ? exports.Colors.Primary : _ref$hoverColor,
3258
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "iconName", "iconDirection", "color", "hoverColor"]);
3266
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
3259
3267
 
3260
3268
  return /*#__PURE__*/React__default.createElement(TabLinkWrapper, Object.assign({
3261
3269
  color: color,
@@ -3305,6 +3313,7 @@ var TextAreaError = /*#__PURE__*/styled__default.div(_templateObject4$2 || (_tem
3305
3313
  return darkMode ? 'var(--base-color-white)' : 'var(--base-color-errorstate)';
3306
3314
  });
3307
3315
 
3316
+ var _excluded$5 = ["label", "error", "width", "darkMode", "height", "columnStartDesktop", "columnStartDevice", "columnSpanDesktop", "columnSpanDevice", "maxLength", "tabIndex"];
3308
3317
  /**
3309
3318
  * An HTML textarea component for Chord.
3310
3319
  *
@@ -3366,7 +3375,7 @@ var TextArea = function TextArea(_ref) {
3366
3375
  maxLength = _ref$maxLength === void 0 ? 950 : _ref$maxLength,
3367
3376
  _ref$tabIndex = _ref.tabIndex,
3368
3377
  tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
3369
- textareaProps = _objectWithoutPropertiesLoose(_ref, ["label", "error", "width", "darkMode", "height", "columnStartDesktop", "columnStartDevice", "columnSpanDesktop", "columnSpanDevice", "maxLength", "tabIndex"]);
3378
+ textareaProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
3370
3379
 
3371
3380
  return /*#__PURE__*/React__default.createElement(GridItem, {
3372
3381
  columnStartDesktop: columnStartDesktop,
@@ -3401,7 +3410,7 @@ var InputWrapper = /*#__PURE__*/styled__default.div(_templateObject2$b || (_temp
3401
3410
  if (!width) return 'none';
3402
3411
  return width + 'px';
3403
3412
  });
3404
- var Input = /*#__PURE__*/styled__default.input(_templateObject3$6 || (_templateObject3$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n box-sizing: border-box;\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 letter-spacing: var(--letter-spacing-altHeader-6);\n line-height: var(--line-height-altHeader-6);\n text-transform: var(--text-transform-altHeader);\n width: 100%;\n height: 48px;\n padding-left: 20px;\n -moz-appearance: textfield;\n padding-right: ", ";\n outline: none;\n border: ", ";\n &:disabled {\n background-color: var(--base-color-lightgrey);\n border: 1px solid transparent;\n outline: none;\n }\n\n &:focus {\n outline: ", ";\n }\n\n /* remove search decoration */\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n display: none;\n }\n\n /* remove number decoration */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n"])), function (_ref2) {
3413
+ var Input = /*#__PURE__*/styled__default.input(_templateObject3$6 || (_templateObject3$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n box-sizing: border-box;\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 letter-spacing: var(--letter-spacing-altHeader-6);\n line-height: var(--line-height-altHeader-6);\n text-transform: var(--text-transform-altHeader);\n width: 100%;\n height: 48px;\n padding-left: 20px;\n -moz-appearance: textfield;\n padding-right: ", ";\n outline: none;\n border: ", ";\n &:disabled {\n background-color: var(--base-color-lightgrey);\n border: 1px solid transparent;\n outline: none;\n }\n\n &:focus {\n outline: ", ";\n }\n\n /* remove search decoration */\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n display: none; \n }\n\n /* remove number decoration */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n"])), function (_ref2) {
3405
3414
  var isPasswordField = _ref2.isPasswordField;
3406
3415
  if (isPasswordField) return "80px";
3407
3416
  return "20px";
@@ -3426,6 +3435,7 @@ var ErrorLabel = /*#__PURE__*/styled__default.div(_templateObject6 || (_template
3426
3435
  return "var(--base-color-errorstate)";
3427
3436
  });
3428
3437
 
3438
+ var _excluded$6 = ["label", "type", "error", "darkMode", "width"];
3429
3439
  /**
3430
3440
  * A text field component, that wraps around the native `<input />` element
3431
3441
  * and adds some extra states and information around it (i.e. a text and an error labels,
@@ -3473,7 +3483,7 @@ var TextField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3473
3483
  _ref$darkMode = _ref.darkMode,
3474
3484
  darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
3475
3485
  width = _ref.width,
3476
- inputProps = _objectWithoutPropertiesLoose(_ref, ["label", "type", "error", "darkMode", "width"]);
3486
+ inputProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
3477
3487
 
3478
3488
  var _useState = React.useState(false),
3479
3489
  showPassword = _useState[0],
@@ -3509,7 +3519,7 @@ var TextField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3509
3519
  "data-testid": "text-field-input",
3510
3520
  ref: ref
3511
3521
  }, inputProps)), isPasswordField && /*#__PURE__*/React__default.createElement(ShowHideButton, {
3512
- type: "button",
3522
+ type: 'button',
3513
3523
  onClick: showHideClickHandler
3514
3524
  }, /*#__PURE__*/React__default.createElement(Overline, {
3515
3525
  level: 1
@@ -3531,12 +3541,14 @@ var TextLinkWrapper = /*#__PURE__*/styled__default.a(_templateObject$o || (_temp
3531
3541
  });
3532
3542
  var TextLinkIconWrapper = /*#__PURE__*/styled__default.span(_templateObject2$c || (_templateObject2$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: var(--button-icon-width);\n height: var(--button-icon-height);\n margin-left: var(--button-icon-margin);\n"])));
3533
3543
 
3544
+ var _excluded$7 = ["children", "iconName", "iconDirection", "color"];
3545
+
3534
3546
  var TextLink = function TextLink(_ref) {
3535
3547
  var children = _ref.children,
3536
3548
  iconName = _ref.iconName,
3537
3549
  iconDirection = _ref.iconDirection,
3538
3550
  color = _ref.color,
3539
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "iconName", "iconDirection", "color"]);
3551
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$7);
3540
3552
 
3541
3553
  var truncatedString = children.substring(0, 30);
3542
3554
  return /*#__PURE__*/React__default.createElement(TextLinkWrapper, Object.assign({
@@ -5144,6 +5156,8 @@ var ContactNewsletter = function ContactNewsletter(_ref) {
5144
5156
  }, contact.title))));
5145
5157
  };
5146
5158
 
5159
+ var _excluded$8 = ["dataRoh"];
5160
+
5147
5161
  var Footer = function Footer(_ref) {
5148
5162
  var data = _ref.data;
5149
5163
  var policyLinks = data.policyLinks;
@@ -5153,7 +5167,7 @@ var Footer = function Footer(_ref) {
5153
5167
 
5154
5168
  var _data$artsLogo = data.artsLogo,
5155
5169
  artsDataRoh = _data$artsLogo.dataRoh,
5156
- artsLogo = _objectWithoutPropertiesLoose(_data$artsLogo, ["dataRoh"]);
5170
+ artsLogo = _objectWithoutPropertiesLoose(_data$artsLogo, _excluded$8);
5157
5171
 
5158
5172
  var additionalInfo = data.additionalInfo;
5159
5173
  return /*#__PURE__*/React__default.createElement(FooterSection, null, /*#__PURE__*/React__default.createElement(Grid, null, /*#__PURE__*/React__default.createElement(GridItem, {
@@ -5208,6 +5222,8 @@ var ArrowsContainer = /*#__PURE__*/styled__default.div(_templateObject5$9 || (_t
5208
5222
  });
5209
5223
  var ArrowWrapper = /*#__PURE__*/styled__default.div(_templateObject6$7 || (_templateObject6$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 24px;\n height: 24px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: flex-center;\n\n :hover {\n && svg path {\n fill: var(--base-color-primary);\n }\n }\n"])));
5210
5224
 
5225
+ var _excluded$9 = ["id", "text"];
5226
+
5211
5227
  var AnchorTabBar = function AnchorTabBar(_ref) {
5212
5228
  var tabs = _ref.tabs,
5213
5229
  onTabClick = _ref.onTabClick,
@@ -5422,7 +5438,7 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
5422
5438
  }, tabs.map(function (_ref4) {
5423
5439
  var id = _ref4.id,
5424
5440
  text = _ref4.text,
5425
- rest = _objectWithoutPropertiesLoose(_ref4, ["id", "text"]);
5441
+ rest = _objectWithoutPropertiesLoose(_ref4, _excluded$9);
5426
5442
 
5427
5443
  return /*#__PURE__*/React__default.createElement("li", {
5428
5444
  key: id
@@ -5478,6 +5494,9 @@ var PrimaryButtonReverse = /*#__PURE__*/styled__default(PrimaryButton)(_template
5478
5494
  var MessageWrapper = /*#__PURE__*/styled__default.div(_templateObject9$1 || (_templateObject9$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-right: var(--grid-outer-margin);\n height: var(--button-height);\n\n h6 {\n margin: 0;\n padding: 0;\n }\n\n @media ", " {\n & {\n margin-right: var(--grid-margin);\n }\n }\n\n @media ", " {\n & {\n display: none;\n }\n }\n"])), devices.tablet, devices.mobile);
5479
5495
  var MessageWrapperMobile = /*#__PURE__*/styled__default.div(_templateObject10$1 || (_templateObject10$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n h6 {\n margin: 0;\n padding: 0;\n }\n display: none;\n\n @media ", " {\n & {\n display: flex;\n align-items: center;\n margin-left: var(--grid-margin);\n padding: 12px 0;\n }\n }\n"])), devices.mobile);
5480
5496
 
5497
+ var _excluded$a = ["text"],
5498
+ _excluded2 = ["text"];
5499
+
5481
5500
  var TitleWithCTA = function TitleWithCTA(_ref) {
5482
5501
  var title = _ref.title,
5483
5502
  links = _ref.links,
@@ -5487,11 +5506,11 @@ var TitleWithCTA = function TitleWithCTA(_ref) {
5487
5506
 
5488
5507
  var _ref2 = (links == null ? void 0 : links[0]) || {},
5489
5508
  primaryButtonText = _ref2.text,
5490
- primaryButtonProps = _objectWithoutPropertiesLoose(_ref2, ["text"]);
5509
+ primaryButtonProps = _objectWithoutPropertiesLoose(_ref2, _excluded$a);
5491
5510
 
5492
5511
  var _ref3 = (links == null ? void 0 : links[1]) || {},
5493
5512
  secondaryButtonText = _ref3.text,
5494
- secondaryButtonProps = _objectWithoutPropertiesLoose(_ref3, ["text"]);
5513
+ secondaryButtonProps = _objectWithoutPropertiesLoose(_ref3, _excluded2);
5495
5514
 
5496
5515
  return /*#__PURE__*/React__default.createElement(TitleCTAGridWrapper, {
5497
5516
  sticky: sticky
@@ -5767,7 +5786,8 @@ var Accordions = function Accordions(_ref) {
5767
5786
  visibleStandfirst: accordion.visibleStandfirst,
5768
5787
  contentType: accordion.contentType,
5769
5788
  displayLevel: accordion.displayLevel,
5770
- semanticLevel: accordion.semanticLevel
5789
+ semanticLevel: accordion.semanticLevel,
5790
+ initOpen: accordion.initOpen
5771
5791
  }, accordion.children);
5772
5792
  }));
5773
5793
  };
@@ -5824,7 +5844,7 @@ var AnnouncementBanner = function AnnouncementBanner(_ref) {
5824
5844
  }))))));
5825
5845
  };
5826
5846
 
5827
- var _templateObject$N, _templateObject2$w, _templateObject3$p, _templateObject4$i, _templateObject5$c, _templateObject6$a, _templateObject7$7, _templateObject8$5, _templateObject9$2, _templateObject10$2, _templateObject11$1, _templateObject12;
5847
+ var _templateObject$N, _templateObject2$w, _templateObject3$p, _templateObject4$i, _templateObject5$c, _templateObject6$a, _templateObject7$7, _templateObject8$5, _templateObject9$2, _templateObject10$2, _templateObject11$1, _templateObject12, _templateObject13;
5828
5848
  var LENGTH_LARGE_TEXT = 28;
5829
5849
  var LENGTH_SMALL_TEXT$1 = 19;
5830
5850
  var LENGTH_TEXT_TABLET = 10;
@@ -5852,20 +5872,21 @@ var ContentContainer$2 = /*#__PURE__*/styled__default.div(_templateObject4$i ||
5852
5872
  var TitleContainer$4 = /*#__PURE__*/styled__default.div(_templateObject5$c || (_templateObject5$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: calc(-1 * var(--editorial-margin-between)) 0 calc(-1 * var(--editorial-margin-between)) 0;\n\n @media ", " {\n display: none;\n }\n"])), devices.mobileAndTablet);
5853
5873
  var TitleContainerMobile = /*#__PURE__*/styled__default.div(_templateObject6$a || (_templateObject6$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: calc(-1 * var(--editorial-margin-between)) 0 calc(-1 * var(--editorial-margin-between)) 0;\n display: none;\n\n @media ", " {\n display: block;\n }\n"])), devices.mobileAndTablet);
5854
5874
  var TextContainer$1 = /*#__PURE__*/styled__default.div(_templateObject7$7 || (_templateObject7$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: var(--font-family-body);\n font-feature-settings: var(--font-feature-settings-body);\n font-size: var(--font-size-body-1);\n font-weight: var(--font-weight-body-1);\n line-height: var(--line-height-body-1);\n letter-spacing: var(--letter-spacing-body-1);\n text-transform: var(--text-transform-body);\n margin-top: var(--editorial-spacing-hover);\n padding: 0;\n white-space: break-spaces;\n overflow-wrap: break-word;\n\n em {\n font-family: var(--font-family-body-italics);\n }\n"])));
5855
- var SubtitleContainer = /*#__PURE__*/styled__default.span(_templateObject8$5 || (_templateObject8$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: var(--font-family-subtitle);\n font-feature-settings: var(--font-feature-settings-subtitle);\n font-size: var(--font-size-subtitle-2);\n font-weight: var(--font-weight-subtitle-2);\n line-height: var(--line-height-subtitle-2);\n letter-spacing: var(--letter-spacing-subtitle-2);\n text-transform: var(--text-transform-subtitle);\n display: block;\n overflow-wrap: break-word;\n"])));
5856
- var LabelContainer = /*#__PURE__*/styled__default.div(_templateObject9$2 || (_templateObject9$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n visibility: ", ";\n width: fit-content;\n height: 30px;\n\n @media ", " {\n margin-left: ", ";\n }\n"])), function (_ref6) {
5875
+ var HighlightTextContainer = /*#__PURE__*/styled__default(TextContainer$1)(_templateObject8$5 || (_templateObject8$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-primary);\n margin-top: 4px;\n"])));
5876
+ var SubtitleContainer = /*#__PURE__*/styled__default.span(_templateObject9$2 || (_templateObject9$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: var(--font-family-subtitle);\n font-feature-settings: var(--font-feature-settings-subtitle);\n font-size: var(--font-size-subtitle-2);\n font-weight: var(--font-weight-subtitle-2);\n line-height: var(--line-height-subtitle-2);\n letter-spacing: var(--letter-spacing-subtitle-2);\n text-transform: var(--text-transform-subtitle);\n display: block;\n overflow-wrap: break-word;\n"])));
5877
+ var LabelContainer = /*#__PURE__*/styled__default.div(_templateObject10$2 || (_templateObject10$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n visibility: ", ";\n width: fit-content;\n height: 30px;\n\n @media ", " {\n margin-left: ", ";\n }\n"])), function (_ref6) {
5857
5878
  var isVisible = _ref6.isVisible;
5858
5879
  return isVisible ? "visible" : 'hidden';
5859
5880
  }, devices.mobile, function (_ref7) {
5860
5881
  var isGridCard = _ref7.isGridCard;
5861
5882
  return isGridCard ? '20px' : '0';
5862
5883
  });
5863
- var LabelElements = /*#__PURE__*/styled__default.div(_templateObject10$2 || (_templateObject10$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 30px;\n padding: 0 8px;\n background-color: ", ";\n color: var(--base-color-white);\n"])), function (_ref8) {
5884
+ var LabelElements = /*#__PURE__*/styled__default.div(_templateObject11$1 || (_templateObject11$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 30px;\n padding: 0 8px;\n background-color: ", ";\n color: var(--base-color-white);\n"])), function (_ref8) {
5864
5885
  var bgColor = _ref8.bgColor,
5865
5886
  theme = _ref8.theme;
5866
5887
  return bgColor ? "var(--base-color-" + bgColor + ")" : theme.colors.primary;
5867
5888
  });
5868
- var LabelIconWrapper = /*#__PURE__*/styled__default.div(_templateObject11$1 || (_templateObject11$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-left: 10px;\n\n svg {\n height: 24px;\n width: 24px;\n }\n"])));
5889
+ var LabelIconWrapper = /*#__PURE__*/styled__default.div(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-left: 10px;\n\n svg {\n height: 24px;\n width: 24px;\n }\n"])));
5869
5890
 
5870
5891
  var getButtonsOpacity = function getButtonsOpacity(_ref9) {
5871
5892
  var onlyShowButtonsOnHover = _ref9.onlyShowButtonsOnHover;
@@ -5877,7 +5898,7 @@ var getButtonsMinHeight = function getButtonsMinHeight(_ref10) {
5877
5898
  return onlyShowButtonsOnHover ? 'min-height: unset;' : 'min-height: 120px;';
5878
5899
  };
5879
5900
 
5880
- var ButtonsContainer$1 = /*#__PURE__*/styled__default.div(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", ";\n display: flex;\n gap: 16px;\n margin-top: var(--editorial-margin-between);\n\n ", "\n\n @media ", " {\n ", ";\n margin-left: ", ";\n margin-right: ", ";\n opacity: 1 !important;\n gap: 24px;\n margin-top: 24px;\n flex-direction: column;\n align-items: center;\n }\n\n @media ", " {\n ", ";\n opacity: 1 !important;\n gap: 24px;\n margin-top: 24px;\n align-items: flex-start;\n\n ", "\n }\n"])), getButtonsOpacity, function (_ref11) {
5901
+ var ButtonsContainer$1 = /*#__PURE__*/styled__default.div(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", ";\n display: flex;\n gap: 16px;\n margin-top: var(--editorial-margin-between);\n\n ", "\n\n @media ", " {\n ", ";\n margin-left: ", ";\n margin-right: ", ";\n opacity: 1 !important;\n gap: 24px;\n margin-top: 24px;\n flex-direction: column;\n align-items: center;\n }\n\n @media ", " {\n ", ";\n opacity: 1 !important;\n gap: 24px;\n margin-top: 24px;\n align-items: flex-start;\n\n ", "\n }\n"])), getButtonsOpacity, function (_ref11) {
5881
5902
  var size = _ref11.size,
5882
5903
  primaryButtonTextLength = _ref11.primaryButtonTextLength,
5883
5904
  tertiaryButtonTextLength = _ref11.tertiaryButtonTextLength;
@@ -5972,6 +5993,9 @@ var truncateReactNodeString = function truncateReactNodeString(node, resultLengt
5972
5993
  return truncateHtmlString(nodeString, resultLength, addDots);
5973
5994
  };
5974
5995
 
5996
+ var _excluded$b = ["text"],
5997
+ _excluded2$1 = ["text"];
5998
+
5975
5999
  var _buttonTypeToButton;
5976
6000
  var LENGTH_LARGE_TEXT$1 = 28;
5977
6001
  var LENGTH_SMALL_TEXT$2 = 19;
@@ -5987,6 +6011,8 @@ var Card = function Card(_ref) {
5987
6011
  subtitle = _ref.subtitle,
5988
6012
  _ref$text = _ref.text,
5989
6013
  text = _ref$text === void 0 ? '' : _ref$text,
6014
+ _ref$highlightText = _ref.highlightText,
6015
+ highlightText = _ref$highlightText === void 0 ? '' : _ref$highlightText,
5990
6016
  links = _ref.links,
5991
6017
  _ref$tags = _ref.tags,
5992
6018
  tags = _ref$tags === void 0 ? [] : _ref$tags,
@@ -6022,7 +6048,7 @@ var Card = function Card(_ref) {
6022
6048
  var _ref2 = firstButton || {},
6023
6049
  _ref2$text = _ref2.text,
6024
6050
  firstButtonText = _ref2$text === void 0 ? '' : _ref2$text,
6025
- restFirstButton = _objectWithoutPropertiesLoose(_ref2, ["text"]);
6051
+ restFirstButton = _objectWithoutPropertiesLoose(_ref2, _excluded$b);
6026
6052
 
6027
6053
  var primaryButtonTextTruncate = size === 'small' ? truncate(firstButtonText, LENGTH_SMALL_TEXT$2) : truncate(firstButtonText, LENGTH_LARGE_TEXT$1);
6028
6054
  var secondButton = links == null ? void 0 : links[1];
@@ -6030,7 +6056,7 @@ var Card = function Card(_ref) {
6030
6056
  var _ref3 = secondButton || {},
6031
6057
  _ref3$text = _ref3.text,
6032
6058
  secondButtonText = _ref3$text === void 0 ? '' : _ref3$text,
6033
- restSecondButton = _objectWithoutPropertiesLoose(_ref3, ["text"]);
6059
+ restSecondButton = _objectWithoutPropertiesLoose(_ref3, _excluded2$1);
6034
6060
 
6035
6061
  var tertiaryButtonTextTruncate = size === 'small' ? truncate(secondButtonText, LENGTH_SMALL_TEXT$2) : truncate(secondButtonText, LENGTH_LARGE_TEXT$1);
6036
6062
 
@@ -6099,7 +6125,9 @@ var Card = function Card(_ref) {
6099
6125
  dangerouslySetInnerHTML: {
6100
6126
  __html: truncatedText
6101
6127
  }
6102
- }))), links && /*#__PURE__*/React__default.createElement(ButtonsContainer$1, {
6128
+ }), highlightText && /*#__PURE__*/React__default.createElement(HighlightTextContainer, null, /*#__PURE__*/React__default.createElement(BodyText, {
6129
+ level: 1
6130
+ }, highlightText)))), links && /*#__PURE__*/React__default.createElement(ButtonsContainer$1, {
6103
6131
  ref: node,
6104
6132
  "data-testid": "buttonscontainer",
6105
6133
  size: size,
@@ -6143,6 +6171,7 @@ var Cards = function Cards(_ref) {
6143
6171
  title: card.title,
6144
6172
  subtitle: card.subtitle,
6145
6173
  text: card.text,
6174
+ highlightText: card.highlightText,
6146
6175
  links: card.links,
6147
6176
  tags: card.tags,
6148
6177
  withContinueWatching: card.withContinueWatching,
@@ -6534,6 +6563,8 @@ var LogoWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject6$c || (_tem
6534
6563
  var ButtonWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject7$9 || (_templateObject7$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n grid-area: button;\n justify-self: end;\n align-self: end;\n\n @media ", " {\n & {\n justify-self: center;\n align-self: center;\n width: 100%;\n margin-top: 16px;\n }\n }\n"])), devices.mobile);
6535
6564
  var PageHeadingText = /*#__PURE__*/styled__default.div(_templateObject8$6 || (_templateObject8$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: var(--font-size-altHeader-6);\n font-weight: var(--font-weight-altHeader-6);\n letter-spacing: var(--letter-spacing-altHeader-6);\n line-height: var(--line-height-altHeader-6);\n font-feature-settings: var(--font-feature-settings-altHeader);\n font-family: var(--font-family-altHeader);\n text-transform: var(--text-transform-altHeader);\n word-break: var(--word-break-altHeader);\n"])));
6536
6565
 
6566
+ var _excluded$c = ["text"];
6567
+
6537
6568
  var PageHeading = function PageHeading(_ref) {
6538
6569
  var title = _ref.title,
6539
6570
  text = _ref.text,
@@ -6544,7 +6575,7 @@ var PageHeading = function PageHeading(_ref) {
6544
6575
 
6545
6576
  var _ref2 = link || {},
6546
6577
  linkText = _ref2.text,
6547
- restLink = _objectWithoutPropertiesLoose(_ref2, ["text"]);
6578
+ restLink = _objectWithoutPropertiesLoose(_ref2, _excluded$c);
6548
6579
 
6549
6580
  var truncatedText = text == null ? void 0 : text.substring(0, 250);
6550
6581
  var truncatedTitle = title && title.substring(0, 40);
@@ -6572,9 +6603,11 @@ var PageHeading = function PageHeading(_ref) {
6572
6603
  }, /*#__PURE__*/React__default.createElement(PrimaryButton, Object.assign({}, restLink), linkText)) : null));
6573
6604
  };
6574
6605
 
6606
+ var _excluded$d = ["link"];
6607
+
6575
6608
  var PageHeadingCore = function PageHeadingCore(_ref) {
6576
6609
  var link = _ref.link,
6577
- rest = _objectWithoutPropertiesLoose(_ref, ["link"]);
6610
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$d);
6578
6611
 
6579
6612
  var coreLink = link && _extends({}, link, {
6580
6613
  color: exports.Colors.White,
@@ -6588,9 +6621,11 @@ var PageHeadingCore = function PageHeadingCore(_ref) {
6588
6621
  })));
6589
6622
  };
6590
6623
 
6624
+ var _excluded$e = ["link"];
6625
+
6591
6626
  var PageHeadingCinema = function PageHeadingCinema(_ref) {
6592
6627
  var link = _ref.link,
6593
- rest = _objectWithoutPropertiesLoose(_ref, ["link"]);
6628
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$e);
6594
6629
 
6595
6630
  var cinemaLink = link && _extends({}, link, {
6596
6631
  color: exports.Colors.Black,
@@ -6614,6 +6649,8 @@ var TextWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject6$d || (_tem
6614
6649
  var ButtonWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject7$a || (_templateObject7$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n grid-area: button;\n align-self: end;\n display: flex;\n justify-content: center;\n margin-top: 40px;\n\n @media ", " {\n & {\n margin-top: 0px;\n margin-bottom: 20px;\n }\n }\n"])), devices.mobile);
6615
6650
  var ScrollDownWrapper = /*#__PURE__*/styled__default.div(_templateObject8$7 || (_templateObject8$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 20px;\n left: var(--grid-outer-margin);\n width: fit-content;\n z-index: ", ";\n\n @keyframes UpDown {\n 0%,\n 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(8px);\n }\n }\n\n a {\n font-size: var(--font-size-overline-1);\n font-weight: var(--font-weight-overline-1);\n letter-spacing: var(--letter-spacing-overline-1);\n border: none;\n padding: 0;\n :hover {\n border: none;\n\n > span {\n animation: UpDown 1500ms linear infinite;\n }\n }\n }\n\n @media ", " {\n & {\n display: none;\n }\n }\n\n @media ", " {\n & {\n display: none;\n }\n }\n"])), zIndexes.contentOverlay, devices.mobile, devices.tablet);
6616
6651
 
6652
+ var _excluded$f = ["text"];
6653
+
6617
6654
  var PageHeadingImpact = function PageHeadingImpact(_ref) {
6618
6655
  var children = _ref.children,
6619
6656
  text = _ref.text,
@@ -6630,7 +6667,7 @@ var PageHeadingImpact = function PageHeadingImpact(_ref) {
6630
6667
 
6631
6668
  var _ref2 = link || {},
6632
6669
  linkText = _ref2.text,
6633
- restLink = _objectWithoutPropertiesLoose(_ref2, ["text"]);
6670
+ restLink = _objectWithoutPropertiesLoose(_ref2, _excluded$f);
6634
6671
 
6635
6672
  return /*#__PURE__*/React__default.createElement(ImpactWrapper, {
6636
6673
  bgUrlDesktop: bgUrlDesktop,
@@ -6723,9 +6760,11 @@ var PageHeadingPanel = function PageHeadingPanel(_ref) {
6723
6760
  var _templateObject$W;
6724
6761
  var StreamWrapper = /*#__PURE__*/styled__default.div(_templateObject$W || (_templateObject$W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n h2::selection,\n div::selection {\n color: #1866dc;\n background-color: #fff;\n }\n"])));
6725
6762
 
6763
+ var _excluded$g = ["link"];
6764
+
6726
6765
  var PageHeadingStream = function PageHeadingStream(_ref) {
6727
6766
  var link = _ref.link,
6728
- rest = _objectWithoutPropertiesLoose(_ref, ["link"]);
6767
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$g);
6729
6768
 
6730
6769
  var streamLink = link && _extends({}, link, {
6731
6770
  color: exports.Colors.Black,
@@ -6874,7 +6913,7 @@ var CompactHeaderBranding = function CompactHeaderBranding(_ref) {
6874
6913
  var isIOS = function isIOS() {
6875
6914
  try {
6876
6915
  console.warn('Do not use this on server side rendering, it may throw an error.');
6877
- if (typeof navigator === undefined) return false;
6916
+ if (typeof navigator === 'undefined') return false;
6878
6917
  return ['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(navigator.platform) || // iPad on iOS 13 detection
6879
6918
  navigator.userAgent.includes('Mac') && 'ontouchend' in document;
6880
6919
  } catch (e) {
@@ -6890,7 +6929,7 @@ var useIOS = function useIOS() {
6890
6929
  setIOS = _useState[1];
6891
6930
 
6892
6931
  React.useEffect(function () {
6893
- if (typeof navigator === undefined) return;
6932
+ if (typeof navigator === 'undefined') return;
6894
6933
  setIOS(isIOS());
6895
6934
  }, []);
6896
6935
  return IOS;
@@ -6919,6 +6958,8 @@ var useMobile = function useMobile() {
6919
6958
  return mobile;
6920
6959
  };
6921
6960
 
6961
+ var _excluded$h = ["text"];
6962
+
6922
6963
  var useResponsiveVideo = function useResponsiveVideo(video, poster) {
6923
6964
  var mobileVideo = video.mobile || video.desktop;
6924
6965
  var desktopVideo = video.desktop || video.mobile;
@@ -7033,7 +7074,7 @@ var PageHeadingCompact = function PageHeadingCompact(_ref4) {
7033
7074
 
7034
7075
  var _ref5 = link || {},
7035
7076
  linkText = _ref5.text,
7036
- restLink = _objectWithoutPropertiesLoose(_ref5, ["text"]);
7077
+ restLink = _objectWithoutPropertiesLoose(_ref5, _excluded$h);
7037
7078
 
7038
7079
  var titleSize = title && title.length > 20 ? 4 : 3;
7039
7080
  var video = {
@@ -7209,8 +7250,8 @@ var PeopleListing = function PeopleListing(_ref) {
7209
7250
  var _templateObject$_, _templateObject2$I, _templateObject3$A, _templateObject4$s;
7210
7251
  var ReplacementWrapper = /*#__PURE__*/styled__default.div(_templateObject$_ || (_templateObject$_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n"])));
7211
7252
  var CreditListingWrapper = /*#__PURE__*/styled__default(PeopleListingGrid)(_templateObject2$I || (_templateObject2$I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n p {\n line-height: 1.5;\n }\n"])));
7212
- var DescriptionWrapper = /*#__PURE__*/styled__default.div(_templateObject3$A || (_templateObject3$A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n p {\n line-height: 25px;\n margin-bottom: 3px;\n }\n"])));
7213
- var RoleWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject4$s || (_templateObject4$s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n overflow-wrap: break-word;\n min-height: 1.5em;\n"])));
7253
+ var DescriptionWrapper = /*#__PURE__*/styled__default.div(_templateObject3$A || (_templateObject3$A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n p {\n line-height: 1.5;\n margin-bottom: 4px;\n }\n"])));
7254
+ var RoleWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject4$s || (_templateObject4$s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n overflow-wrap: break-word;\n"])));
7214
7255
 
7215
7256
  var getConcatenatedPropLength = function getConcatenatedPropLength(array, prop) {
7216
7257
  return array.reduce(function (acc, item) {
@@ -7221,12 +7262,18 @@ var getConcatenatedPropLength = function getConcatenatedPropLength(array, prop)
7221
7262
  var concatenateMusicTitle = function concatenateMusicTitle(musicTitle) {
7222
7263
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, musicTitle.map(function (title, index) {
7223
7264
  if (musicTitle.length > 1 && index === musicTitle.length - 1) {
7224
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, ' ', "and ", /*#__PURE__*/React__default.createElement("i", null, title));
7265
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, ' ', "and ", /*#__PURE__*/React__default.createElement("i", {
7266
+ key: index
7267
+ }, title));
7225
7268
  } else if (index > 0) {
7226
- return /*#__PURE__*/React__default.createElement("i", null, ", ", title);
7269
+ return /*#__PURE__*/React__default.createElement("i", {
7270
+ key: index
7271
+ }, ", ", title);
7227
7272
  }
7228
7273
 
7229
- return /*#__PURE__*/React__default.createElement("i", null, title);
7274
+ return /*#__PURE__*/React__default.createElement("i", {
7275
+ key: index
7276
+ }, title);
7230
7277
  }));
7231
7278
  };
7232
7279
 
@@ -7278,7 +7325,7 @@ var CreditListing = function CreditListing(_ref) {
7278
7325
  }));
7279
7326
  };
7280
7327
 
7281
- var _templateObject$$, _templateObject2$J, _templateObject3$B, _templateObject4$t, _templateObject5$l, _templateObject6$g, _templateObject7$c, _templateObject8$9, _templateObject9$4, _templateObject10$4, _templateObject11$2, _templateObject12$1, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
7328
+ var _templateObject$$, _templateObject2$J, _templateObject3$B, _templateObject4$t, _templateObject5$l, _templateObject6$g, _templateObject7$c, _templateObject8$9, _templateObject9$4, _templateObject10$4, _templateObject11$2, _templateObject12$1, _templateObject13$1, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
7282
7329
  var LENGTH_TEXT = 28;
7283
7330
  var LENGTH_TEXT_TABLET$1 = 12;
7284
7331
  var GridTemplateImageToLeft = "'left left left left left left left left . right right right right right . .'";
@@ -7345,7 +7392,7 @@ var ExtraContentWrapper = /*#__PURE__*/styled__default.div(_templateObject9$4 ||
7345
7392
  var IconWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject10$4 || (_templateObject10$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n position: absolute;\n top: 25px;\n right: 35px;\n width: 24px;\n height: 24px;\n\n @media ", " {\n top: 30px;\n right: 30px;\n }\n\n @media ", " {\n top: 3px;\n right: 20px;\n }\n"])), devices.tablet, devices.mobile);
7346
7393
  var PrimaryButtonWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject11$2 || (_templateObject11$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: var(--button-height);\n\n @media ", " {\n width: 100%;\n }\n"])), devices.mobile);
7347
7394
  var MobileTitleWrapper = /*#__PURE__*/styled__default.div(_templateObject12$1 || (_templateObject12$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: none;\n margin: 0 50px 0 20px;\n\n h2,\n h3 {\n margin: 0;\n }\n\n @media ", " {\n display: block;\n }\n"])), devices.mobile);
7348
- var PromoWithTagsTypeTags = /*#__PURE__*/styled__default(TypeTags)(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
7395
+ var PromoWithTagsTypeTags = /*#__PURE__*/styled__default(TypeTags)(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
7349
7396
  var PromoWithTagsHeader = /*#__PURE__*/styled__default(Header)(_templateObject14 || (_templateObject14 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
7350
7397
  var PromoWithTagsTextLink = /*#__PURE__*/styled__default(TextLink)(_templateObject15 || (_templateObject15 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
7351
7398
  var asCardOverrides = /*#__PURE__*/styled.css(_templateObject16 || (_templateObject16 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", " {\n font-size: var(--font-size-subtitle-2);\n }\n\n ", " {\n font-size: var(--font-size-overline-1);\n }\n\n ", " {\n flex-direction: row;\n @media ", " {\n flex-direction: row;\n }\n }\n\n ", " {\n font-size: var(--font-size-overline-2);\n font-weight: var(--font-weight-overline-2);\n line-height: var(--line-height-overline-2);\n letter-spacing: var(--letter-spacing-overline-2);\n }\n"])), PromoWithTagsSubtitle, PromoWithTagsTypeTags, ButtonsContainer$2, devices.tablet, PromoWithTagsTextLink);
@@ -7367,6 +7414,10 @@ var PromoWithTagsContainer = /*#__PURE__*/styled__default.div(_templateObject19
7367
7414
  var TimerWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 32px;\n"])));
7368
7415
  var EndDateText = /*#__PURE__*/styled__default.div(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom: 1px solid var(--base-color-black);\n padding-bottom: 32px;\n margin-bottom: 32px;\n\n @media ", " {\n padding-bottom: 20px;\n margin-bottom: 20px;\n }\n"])), devices.mobile);
7369
7416
 
7417
+ var _excluded$i = ["text"],
7418
+ _excluded2$2 = ["text"],
7419
+ _excluded3 = ["text"];
7420
+
7370
7421
  var _buttonTypeToButton$1;
7371
7422
  var LENGTH_TEXT$1 = 28;
7372
7423
  var LENGTH_TEXT_PARAGRAPH = 130;
@@ -7437,7 +7488,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
7437
7488
  var _ref2 = firstButton || {},
7438
7489
  _ref2$text = _ref2.text,
7439
7490
  firstButtonText = _ref2$text === void 0 ? '' : _ref2$text,
7440
- restFirstButton = _objectWithoutPropertiesLoose(_ref2, ["text"]);
7491
+ restFirstButton = _objectWithoutPropertiesLoose(_ref2, _excluded$i);
7441
7492
 
7442
7493
  var primaryButtonTextTruncate = truncate(firstButtonText, LENGTH_TEXT$1);
7443
7494
  var secondButton = links == null ? void 0 : links[1];
@@ -7445,7 +7496,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
7445
7496
  var _ref3 = secondButton || {},
7446
7497
  _ref3$text = _ref3.text,
7447
7498
  secondButtonText = _ref3$text === void 0 ? '' : _ref3$text,
7448
- restSecondButton = _objectWithoutPropertiesLoose(_ref3, ["text"]);
7499
+ restSecondButton = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);
7449
7500
 
7450
7501
  var secondButtonTextTruncate = truncate(secondButtonText, LENGTH_TEXT$1);
7451
7502
  var textTruncate = asCard ? truncate(text || '', LENGTH_TEXT_PARAGRAPH) : text;
@@ -7454,7 +7505,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
7454
7505
  var textLinkItems = textLinks ? textLinks.map(function (link, index) {
7455
7506
  var _link$text = link.text,
7456
7507
  textLinkText = _link$text === void 0 ? '' : _link$text,
7457
- restTextLink = _objectWithoutPropertiesLoose(link, ["text"]);
7508
+ restTextLink = _objectWithoutPropertiesLoose(link, _excluded3);
7458
7509
 
7459
7510
  return /*#__PURE__*/React__default.createElement(TextLinkWrapper$2, {
7460
7511
  key: index
@@ -7612,6 +7663,8 @@ var ButtonsContainer$3 = /*#__PURE__*/styled__default.div(_templateObject7$d ||
7612
7663
  return '';
7613
7664
  });
7614
7665
 
7666
+ var _excluded$j = ["text"],
7667
+ _excluded2$3 = ["text"];
7615
7668
  var LENGTH_TEXT$3 = 28;
7616
7669
 
7617
7670
  var PromoWithTitle = function PromoWithTitle(_ref) {
@@ -7637,7 +7690,7 @@ var PromoWithTitle = function PromoWithTitle(_ref) {
7637
7690
  var _ref2 = primaryButton || {},
7638
7691
  _ref2$text = _ref2.text,
7639
7692
  primaryButtonText = _ref2$text === void 0 ? '' : _ref2$text,
7640
- restPrimaryButton = _objectWithoutPropertiesLoose(_ref2, ["text"]);
7693
+ restPrimaryButton = _objectWithoutPropertiesLoose(_ref2, _excluded$j);
7641
7694
 
7642
7695
  var primaryButtonTextTruncate = truncate(primaryButtonText, LENGTH_TEXT$3);
7643
7696
  var tertiaryButton = links == null ? void 0 : links[1];
@@ -7645,7 +7698,7 @@ var PromoWithTitle = function PromoWithTitle(_ref) {
7645
7698
  var _ref3 = tertiaryButton || {},
7646
7699
  _ref3$text = _ref3.text,
7647
7700
  tertiaryButtonText = _ref3$text === void 0 ? '' : _ref3$text,
7648
- restTertiaryButton = _objectWithoutPropertiesLoose(_ref3, ["text"]);
7701
+ restTertiaryButton = _objectWithoutPropertiesLoose(_ref3, _excluded2$3);
7649
7702
 
7650
7703
  var tertiaryButtonTextTruncate = truncate(tertiaryButtonText, LENGTH_TEXT$3);
7651
7704
  return /*#__PURE__*/React__default.createElement(PromoWithTitleGrid, {
@@ -7818,72 +7871,426 @@ var SectionTitle = function SectionTitle(_ref) {
7818
7871
  }, description))));
7819
7872
  };
7820
7873
 
7821
- var _templateObject$14, _templateObject2$M, _templateObject3$E, _templateObject4$v;
7822
- var Container$1 = /*#__PURE__*/styled__default.div(_templateObject$14 || (_templateObject$14 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n"])));
7823
- var SelectWrapper = /*#__PURE__*/styled__default.div(_templateObject2$M || (_templateObject2$M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: auto;\n max-width: ", ";\n\n .chord-select__control {\n min-height: 48px;\n border-radius: 0;\n border: ", ";\n &:hover {\n border-color: ", ";\n }\n }\n .chord-select__control--is-focused {\n border-color: var(--base-color-darkgrey);\n box-shadow: ", ";\n }\n .chord-select__indicator-separator {\n display: none;\n }\n .chord-select__control--menu-is-open {\n .chord-select__indicator {\n svg {\n transform: rotate(180deg);\n }\n }\n }\n .chord-select__indicator {\n font-size: 25px;\n padding: 0;\n margin-right: 12px;\n color: var(--base-color-black);\n svg {\n height: 1em;\n width: 1em;\n color: inherit;\n path {\n fill: currentColor;\n color: inherit;\n }\n }\n }\n .chord-select__single-value,\n .chord-select__placeholder {\n margin-left: 0;\n margin-right: 0;\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 letter-spacing: var(--letter-spacing-altHeader-6);\n line-height: var(--line-height-altHeader-6);\n text-transform: var(--text-transform-altHeader);\n }\n .chord-select__placeholder {\n color: var(--base-color-darkgrey);\n }\n .chord-select__single-value {\n color: var(--base-color-black);\n }\n .chord-select__value-container {\n padding-left: 20px;\n padding-right: 15px;\n padding-top: 1px;\n padding-bottom: 0px;\n }\n .chord-select--is-disabled {\n .chord-select__control {\n border: 1px solid var(--base-color-lightgrey);\n background: var(--base-color-lightgrey);\n }\n .chord-select__indicator,\n .chord-select__single-value {\n color: var(--base-color-darkgrey);\n }\n }\n .chord-select__menu {\n margin-top: -1px;\n box-shadow: none;\n border-radius: 0;\n border: 1px solid var(--base-color-darkgrey);\n background: var(--base-color-lightgrey);\n }\n .chord-select__menu-list {\n padding-top: 0;\n padding-bottom: 0;\n }\n .chord-select__option {\n padding: 10px 20px;\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 letter-spacing: var(--letter-spacing-altHeader-6);\n line-height: var(--line-height-altHeader-6);\n text-transform: var(--text-transform-altHeader);\n color: var(--base-color-black);\n &:active,\n &.chord-select__option--is-focused {\n background: var(--base-color-midgrey);\n }\n }\n .chord-select__option--is-selected {\n color: var(--base-color-black);\n background: none;\n }\n .chord-select__input-container {\n margin: 0;\n padding-top: 0;\n padding-bottom: 0;\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 letter-spacing: var(--letter-spacing-altHeader-6);\n line-height: var(--line-height-altHeader-6);\n text-transform: var(--text-transform-altHeader);\n color: var(--base-color-black);\n }\n .chord-select__menu-notice {\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 letter-spacing: var(--letter-spacing-altHeader-6);\n line-height: var(--line-height-altHeader-6);\n text-transform: var(--text-transform-altHeader);\n color: var(--base-color-darkgrey);\n padding: 10px 20px;\n text-align: left;\n }\n .chord-select__group-heading {\n padding: 0 20px;\n text-transform: none;\n font-family: var(--font-family-body);\n font-feature-settings: var(--font-feature-settings-body);\n font-size: var(--font-size-body-2);\n font-weight: var(--font-weight-body-2);\n color: var(--base-color-darkgrey);\n &:not(:empty) {\n margin-bottom: 5px;\n }\n }\n .chord-select__group {\n padding-top: 0;\n padding-bottom: 10px;\n &:last-child {\n padding-bottom: 0;\n }\n }\n"])), function (_ref) {
7824
- var width = _ref.width;
7825
- if (!width) return 'none';
7826
- return width + 'px';
7874
+ var _templateObject$14, _templateObject2$M, _templateObject3$E, _templateObject4$v, _templateObject5$n, _templateObject6$i, _templateObject7$e, _templateObject8$a, _templateObject9$5, _templateObject10$5, _templateObject11$3;
7875
+ var stateStyles = /*#__PURE__*/styled.css(_templateObject$14 || (_templateObject$14 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n &:focus,\n &.focus {\n outline: ", ";\n }\n\n &.disabled {\n background-color: ", ";\n color: ", ";\n pointer-events: none;\n cursor: none;\n }\n"])), function (_ref) {
7876
+ var theme = _ref.theme;
7877
+ return "3px solid " + theme.colors.lapisLazuli;
7827
7878
  }, function (_ref2) {
7828
- var error = _ref2.error;
7829
- if (error !== undefined) return "1px solid var(--base-color-errorstate)";
7830
- return "1px solid var(--base-color-darkgrey)";
7879
+ var theme = _ref2.theme;
7880
+ return theme.colors.lightgrey;
7831
7881
  }, function (_ref3) {
7832
- var error = _ref3.error;
7833
- if (error !== undefined) return "var(--base-color-errorstate)";
7834
- return "var(--base-color-darkgrey)";
7835
- }, function (_ref4) {
7836
- var darkMode = _ref4.darkMode;
7837
- if (darkMode) return "0 0 0 4px var(--base-color-lemonchiffon)";
7838
- return "0 0 0 3px var(--base-color-lapislazuli)";
7839
- });
7840
- var TextLabel$1 = /*#__PURE__*/styled__default.p(_templateObject3$E || (_templateObject3$E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0 0 20px;\n color: ", ";\n"])), function (_ref5) {
7841
- var darkMode = _ref5.darkMode;
7842
- if (darkMode) return "var(--base-color-white)";
7843
- return "var(--base-color-black)";
7882
+ var theme = _ref3.theme;
7883
+ return theme.colors.lightgrey;
7844
7884
  });
7845
- var ErrorLabel$1 = /*#__PURE__*/styled__default.p(_templateObject4$v || (_templateObject4$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 20px 0 0;\n color: ", ";\n"])), function (_ref6) {
7846
- var darkMode = _ref6.darkMode;
7847
- if (darkMode) return "var(--base-color-white)";
7848
- return "var(--base-color-errorstate)";
7885
+ var borderStyles = /*#__PURE__*/styled.css(_templateObject2$M || (_templateObject2$M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 0;\n outline: 1px solid ", ";\n"])), function (_ref4) {
7886
+ var theme = _ref4.theme;
7887
+ return theme.colors.darkgrey;
7849
7888
  });
7889
+ var noMarginAndPaddingStyles = /*#__PURE__*/styled.css(_templateObject3$E || (_templateObject3$E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n"])));
7890
+ var listItemStyles = /*#__PURE__*/styled.css(_templateObject4$v || (_templateObject4$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n list-style: none;\n user-select: none;\n"])));
7891
+ var ArrowIcon = /*#__PURE__*/styled__default(Icon).attrs(function (_ref5) {
7892
+ var theme = _ref5.theme;
7893
+ return {
7894
+ iconName: 'DropdownArrow',
7895
+ color: theme.colors.black,
7896
+ title: 'Select Arrow'
7897
+ };
7898
+ })(_templateObject5$n || (_templateObject5$n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n pointer-events: none;\n\n max-width: 24px;\n max-height: 24px;\n\n svg {\n width: 24px;\n height: 24px;\n }\n"])));
7899
+ var Wrapper$5 = /*#__PURE__*/styled__default.div(_templateObject6$i || (_templateObject6$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n height: initial;\n\n display: flex;\n flex-direction: column;\n gap: 20px;\n"])), noMarginAndPaddingStyles);
7900
+ var SelectWrapper = /*#__PURE__*/styled__default.div(_templateObject7$e || (_templateObject7$e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n height: inherit;\n"])), noMarginAndPaddingStyles);
7901
+ var Options = /*#__PURE__*/styled__default.div(_templateObject8$a || (_templateObject8$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n z-index: 1;\n\n ", "\n ", "\n"])), noMarginAndPaddingStyles, borderStyles);
7902
+ var Option = /*#__PURE__*/styled__default.li(_templateObject9$5 || (_templateObject9$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n ", "\n\n ", "\n"])), noMarginAndPaddingStyles, listItemStyles, function (_ref6) {
7903
+ var theme = _ref6.theme,
7904
+ hover = _ref6.hover;
7905
+ var _theme$colors = theme.colors,
7906
+ lightgrey = _theme$colors.lightgrey,
7907
+ midgrey = _theme$colors.midgrey;
7908
+ if (hover) return "background-color: " + midgrey;
7909
+ return "\n background-color: " + lightgrey + ";\n &:hover { background-color: " + midgrey + " }\n ";
7910
+ });
7911
+
7912
+ var selectStyles = function selectStyles(width, height) {
7913
+ return styled.css(_templateObject10$5 || (_templateObject10$5 = _taggedTemplateLiteralLoose(["\n position: relative;\n z-index: ", ";\n\n width: ", ";\n height: ", ";\n\n * {\n width: ", ";\n }\n\n ", " {\n position: absolute;\n top: ", ";\n }\n ", " {\n height: ", ";\n }\n p {\n height: ", ";\n padding-inline: 20px;\n\n display: flex;\n align-items: center;\n }\n"])), zIndexes[3], width, height, width, Options, height, Option, height, height);
7914
+ };
7850
7915
 
7851
- var DropdownIndicator = function DropdownIndicator(props) {
7852
- return /*#__PURE__*/React__default.createElement(ReactSelect.components.DropdownIndicator, Object.assign({}, props), /*#__PURE__*/React__default.createElement(Icon, {
7853
- iconName: 'DropdownArrow'
7854
- }));
7916
+ var SelectList = /*#__PURE__*/styled__default.ul(_templateObject11$3 || (_templateObject11$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n\n ", "\n ", "\n ", "\n ", "\n\n & ", " {\n position: absolute;\n\n top: 13px;\n right: 16px;\n }\n"])), function (_ref7) {
7917
+ var width = _ref7.width,
7918
+ height = _ref7.height;
7919
+ return selectStyles(width === 'default' ? "354px" : width + "px", height === 'default' ? "48px" : height + "px");
7920
+ }, stateStyles, noMarginAndPaddingStyles, listItemStyles, borderStyles, ArrowIcon);
7921
+
7922
+ var useKeyboardAccessibility = function useKeyboardAccessibility(_ref) {
7923
+ var selectRef = _ref.selectRef,
7924
+ optionsRef = _ref.optionsRef,
7925
+ shouldHighlightOption = _ref.shouldHighlightOption;
7926
+
7927
+ var _useState = React.useState(-1),
7928
+ itemToHighlight = _useState[0],
7929
+ setItemToHighlight = _useState[1];
7930
+
7931
+ var clampIndex = function clampIndex(index) {
7932
+ if (index < -1) return -1;
7933
+ if (index > optionsRef.current.length - 1) return optionsRef.current.length - 1;
7934
+ return index;
7935
+ };
7936
+
7937
+ var highlightNextOption = function highlightNextOption() {
7938
+ return setItemToHighlight(function (prev) {
7939
+ return clampIndex(prev + 1);
7940
+ });
7941
+ };
7942
+
7943
+ var highlightPrevOption = function highlightPrevOption() {
7944
+ return setItemToHighlight(function (prev) {
7945
+ return clampIndex(prev - 1);
7946
+ });
7947
+ };
7948
+
7949
+ var reset = function reset() {
7950
+ var _selectRef$current;
7951
+
7952
+ (_selectRef$current = selectRef.current) == null ? void 0 : _selectRef$current.blur();
7953
+ setItemToHighlight(-1);
7954
+ };
7955
+
7956
+ var handleKeyUp = function handleKeyUp(event) {
7957
+ if (!shouldHighlightOption) return;
7958
+ var shouldHighlightOptionNext = event.key === 'ArrowDown';
7959
+ var shouldHighlightOptionPrev = event.key === 'ArrowUp';
7960
+ if (shouldHighlightOptionNext) return highlightNextOption();
7961
+ if (shouldHighlightOptionPrev) return highlightPrevOption();
7962
+ };
7963
+
7964
+ var preventScrollingWhileNavigating = function preventScrollingWhileNavigating(event) {
7965
+ if (!shouldHighlightOption) return;
7966
+ if (!['ArrowDown', 'ArrowUp'].includes(event.key)) return;
7967
+ event.preventDefault();
7968
+ };
7969
+
7970
+ var handleHighlighted = function handleHighlighted(cb) {
7971
+ return function (event) {
7972
+ if (itemToHighlight === -1) return;
7973
+ if (event.key !== 'Enter') return;
7974
+ cb(itemToHighlight);
7975
+ reset();
7976
+ };
7977
+ };
7978
+
7979
+ React.useEffect(function () {
7980
+ if (shouldHighlightOption) return;
7981
+ reset();
7982
+ }, [shouldHighlightOption]);
7983
+ return {
7984
+ handleKeyUp: handleKeyUp,
7985
+ preventScrollingWhileNavigating: preventScrollingWhileNavigating,
7986
+ handleHighlighted: handleHighlighted,
7987
+ itemToHighlight: itemToHighlight
7988
+ };
7855
7989
  };
7856
7990
 
7857
- function Select(_ref) {
7858
- var label = _ref.label,
7859
- darkMode = _ref.darkMode,
7860
- width = _ref.width,
7861
- error = _ref.error,
7862
- _ref$isSearchable = _ref.isSearchable,
7863
- isSearchable = _ref$isSearchable === void 0 ? false : _ref$isSearchable,
7864
- selectProps = _objectWithoutPropertiesLoose(_ref, ["label", "darkMode", "width", "error", "isSearchable"]);
7991
+ var useVisualAccessibility = function useVisualAccessibility(_ref2) {
7992
+ var selectRef = _ref2.selectRef,
7993
+ isSelectDisabled = _ref2.isSelectDisabled;
7865
7994
 
7866
- return /*#__PURE__*/React__default.createElement(Container$1, null, /*#__PURE__*/React__default.createElement("label", null, !!label && /*#__PURE__*/React__default.createElement(TextLabel$1, {
7867
- darkMode: darkMode,
7868
- "data-testid": "text-field-text-label"
7869
- }, /*#__PURE__*/React__default.createElement(AltHeader, {
7870
- level: 6
7871
- }, label)), /*#__PURE__*/React__default.createElement(SelectWrapper, {
7872
- width: width,
7873
- error: error
7874
- }, /*#__PURE__*/React__default.createElement(ReactSelect__default, Object.assign({
7875
- components: {
7876
- DropdownIndicator: DropdownIndicator
7995
+ var addFocusClass = function addFocusClass() {
7996
+ var _selectRef$current2;
7997
+
7998
+ (_selectRef$current2 = selectRef.current) == null ? void 0 : _selectRef$current2.classList.add('focus');
7999
+ };
8000
+
8001
+ var removeFocusClass = function removeFocusClass() {
8002
+ var _selectRef$current3;
8003
+
8004
+ (_selectRef$current3 = selectRef.current) == null ? void 0 : _selectRef$current3.classList.remove('focus');
8005
+ };
8006
+
8007
+ var toggleFocus = function toggleFocus() {
8008
+ var _selectRef$current4;
8009
+
8010
+ if ((_selectRef$current4 = selectRef.current) != null && _selectRef$current4.classList.contains('focus')) removeFocusClass();else addFocusClass();
8011
+ };
8012
+
8013
+ var withClickAwayHandler = function withClickAwayHandler(cb) {
8014
+ return function (event) {
8015
+ if (!selectRef.current) return;
8016
+ if (selectRef.current.contains(event.target)) return;
8017
+ removeFocusClass();
8018
+ cb();
8019
+ };
8020
+ };
8021
+
8022
+ React.useEffect(function () {
8023
+ if (!selectRef.current) return;
8024
+
8025
+ if (isSelectDisabled) {
8026
+ selectRef.current.classList.add('disabled');
8027
+ } else selectRef.current.classList.remove('disabled');
8028
+ }, [isSelectDisabled]);
8029
+ return {
8030
+ withClickAwayHandler: withClickAwayHandler,
8031
+ toggleFocus: toggleFocus,
8032
+ addFocusClass: addFocusClass,
8033
+ removeFocusClass: removeFocusClass
8034
+ };
8035
+ };
8036
+
8037
+ var useAccessibility = function useAccessibility(props) {
8038
+ var selectRef = props.selectRef;
8039
+
8040
+ var _useKeyboardAccessibi = useKeyboardAccessibility(props),
8041
+ handleKeyUp = _useKeyboardAccessibi.handleKeyUp,
8042
+ preventScrollingWhileNavigating = _useKeyboardAccessibi.preventScrollingWhileNavigating,
8043
+ handleHighlighted = _useKeyboardAccessibi.handleHighlighted,
8044
+ itemToHighlight = _useKeyboardAccessibi.itemToHighlight;
8045
+
8046
+ var _useVisualAccessibili = useVisualAccessibility(props),
8047
+ addFocusClass = _useVisualAccessibili.addFocusClass,
8048
+ removeFocusClass = _useVisualAccessibili.removeFocusClass,
8049
+ toggleFocus = _useVisualAccessibili.toggleFocus,
8050
+ withClickAwayHandler = _useVisualAccessibili.withClickAwayHandler;
8051
+
8052
+ React.useEffect(function () {
8053
+ if (!selectRef.current) return;
8054
+ selectRef.current.addEventListener('keydown', preventScrollingWhileNavigating);
8055
+ selectRef.current.addEventListener('keyup', handleKeyUp);
8056
+ selectRef.current.addEventListener('click', toggleFocus);
8057
+ selectRef.current.addEventListener('focus', addFocusClass);
8058
+ selectRef.current.addEventListener('blur', removeFocusClass);
8059
+ return function () {
8060
+ var _selectRef$current5, _selectRef$current6, _selectRef$current7, _selectRef$current8, _selectRef$current9;
8061
+
8062
+ (_selectRef$current5 = selectRef.current) == null ? void 0 : _selectRef$current5.removeEventListener('keydown', preventScrollingWhileNavigating);
8063
+ (_selectRef$current6 = selectRef.current) == null ? void 0 : _selectRef$current6.removeEventListener('keyup', handleKeyUp);
8064
+ (_selectRef$current7 = selectRef.current) == null ? void 0 : _selectRef$current7.removeEventListener('click', toggleFocus);
8065
+ (_selectRef$current8 = selectRef.current) == null ? void 0 : _selectRef$current8.removeEventListener('focus', addFocusClass);
8066
+ (_selectRef$current9 = selectRef.current) == null ? void 0 : _selectRef$current9.removeEventListener('blur', removeFocusClass);
8067
+ };
8068
+ });
8069
+ return {
8070
+ withClickAwayHandler: withClickAwayHandler,
8071
+ handleHighlighted: handleHighlighted,
8072
+ itemToHighlight: itemToHighlight
8073
+ };
8074
+ };
8075
+ /**
8076
+ * A select component, created using <ul> and <li> elements, with bespoke accessibility
8077
+ * logic.
8078
+ *
8079
+ * # Usage
8080
+ * ## Defining a component that uses a typical Select element
8081
+ * ```tsx
8082
+ * const MyComponent = () => {
8083
+ * const handleSelect = (value: number, text: string) => {
8084
+ * console.log("Selected", value);
8085
+ * };
8086
+ *
8087
+ * return <>
8088
+ * <Select
8089
+ * label="This is a label"
8090
+ * options={[
8091
+ * { text: "Option 1", value: 1 },
8092
+ * { text: "Option 2", value: 2 },
8093
+ * ]}
8094
+ * onSelect={handleSelect}
8095
+ * />
8096
+ * </>
8097
+ * }
8098
+ * ```
8099
+ *
8100
+ * ## Defining a component that uses a disabled Select element
8101
+ * ```tsx
8102
+ * const MyComponent = () => {
8103
+ * const handleSelect = (value: number, text: string) => {
8104
+ * console.log("Selected", value);
8105
+ * };
8106
+ *
8107
+ * return <>
8108
+ * <Select
8109
+ * disabled // Select component disabled explicitely
8110
+ * label="This is a label"
8111
+ * options={[
8112
+ * { text: "Option 1", value: 1 },
8113
+ * { text: "Option 2", value: 2 },
8114
+ * ]}
8115
+ * onSelect={handleSelect}
8116
+ * />
8117
+ * <Select
8118
+ * label="This is a label"
8119
+ * options={[]} // Select component disabled implicitely by passing an empty array of options
8120
+ * onSelect={handleSelect}
8121
+ * />
8122
+ * </>
8123
+ * }
8124
+ * ```
8125
+ *
8126
+ * ## Defining a component with a non-labelled Select element
8127
+ * ```tsx
8128
+ * const MyComponent = () => {
8129
+ * const handleSelect = (value: number, text: string) => {
8130
+ * console.log("Selected", value);
8131
+ * };
8132
+ *
8133
+ * return <>
8134
+ * <Select
8135
+ * label=""
8136
+ * options={[
8137
+ * { text: "Option 1", value: 1 },
8138
+ * { text: "Option 2", value: 2 },
8139
+ * ]}
8140
+ * onSelect={handleSelect}
8141
+ * />
8142
+ * </>
8143
+ * }
8144
+ * ```
8145
+ *
8146
+ * ## Changing the dimensions of a Select element (px)
8147
+ * ```tsx
8148
+ * const MyComponent = () => {
8149
+ * const handleSelect = (value: number, text: string) => {
8150
+ * console.log("Selected", value);
8151
+ * };
8152
+ *
8153
+ * const selectWidthPx = 100;
8154
+ * const selectHeightPx = 27;
8155
+ *
8156
+ * return <>
8157
+ * <Select
8158
+ * label="This is a label"
8159
+ * options={[
8160
+ * { text: "Option 1", value: 1 },
8161
+ * { text: "Option 2", value: 2 },
8162
+ * ]}
8163
+ * onSelect={handleSelect}
8164
+ * width={selectWidthPx}
8165
+ * height={selectHeightPx}
8166
+ * />
8167
+ * </>
8168
+ * }
8169
+ * ```
8170
+ */
8171
+
8172
+
8173
+ function Select(_ref3) {
8174
+ var _ref4, _selectedValue$text, _options$;
8175
+
8176
+ var label = _ref3.label,
8177
+ options = _ref3.options,
8178
+ onSelect = _ref3.onSelect,
8179
+ _ref3$disabled = _ref3.disabled,
8180
+ disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
8181
+ _ref3$resetWhenOption = _ref3.resetWhenOptionsUpdate,
8182
+ resetWhenOptionsUpdate = _ref3$resetWhenOption === void 0 ? false : _ref3$resetWhenOption,
8183
+ _ref3$width = _ref3.width,
8184
+ width = _ref3$width === void 0 ? 'default' : _ref3$width,
8185
+ _ref3$height = _ref3.height,
8186
+ height = _ref3$height === void 0 ? 'default' : _ref3$height;
8187
+ var selectRef = React.useRef(null);
8188
+ var optionsRef = React.useRef([]);
8189
+
8190
+ var _useState2 = React.useState(null),
8191
+ selectedValue = _useState2[0],
8192
+ setSelectedValue = _useState2[1];
8193
+
8194
+ var _useState3 = React.useState(false),
8195
+ isOpen = _useState3[0],
8196
+ setIsOpen = _useState3[1];
8197
+
8198
+ var isDisabled = disabled || options.length === 0;
8199
+
8200
+ var _useAccessibility = useAccessibility({
8201
+ selectRef: selectRef,
8202
+ optionsRef: optionsRef,
8203
+ shouldHighlightOption: isOpen,
8204
+ isSelectDisabled: isDisabled
8205
+ }),
8206
+ withClickAwayHandler = _useAccessibility.withClickAwayHandler,
8207
+ handleHighlighted = _useAccessibility.handleHighlighted,
8208
+ itemToHighlight = _useAccessibility.itemToHighlight;
8209
+
8210
+ var openSelect = function openSelect() {
8211
+ return setIsOpen(true);
8212
+ };
8213
+
8214
+ var closeSelect = function closeSelect() {
8215
+ return setIsOpen(false);
8216
+ };
8217
+
8218
+ var toggleSelect = function toggleSelect() {
8219
+ return setIsOpen(function (prev) {
8220
+ return !prev;
8221
+ });
8222
+ };
8223
+
8224
+ var closeSelectOnBlur = withClickAwayHandler(closeSelect);
8225
+
8226
+ var handleOptionSelection = function handleOptionSelection(index) {
8227
+ var option = options[index];
8228
+ setSelectedValue(option);
8229
+ onSelect(option.value, option.text);
8230
+ };
8231
+
8232
+ React.useEffect(function () {
8233
+ document.addEventListener('click', closeSelectOnBlur, false);
8234
+ return function () {
8235
+ document.removeEventListener('click', closeSelectOnBlur, false);
8236
+ };
8237
+ }, []);
8238
+ React.useEffect(function () {
8239
+ if (!resetWhenOptionsUpdate) return;
8240
+
8241
+ if (options.length === 0) {
8242
+ setSelectedValue(null);
8243
+ return;
8244
+ }
8245
+
8246
+ setSelectedValue(options[0]);
8247
+ }, [options, resetWhenOptionsUpdate]);
8248
+ return /*#__PURE__*/React__default.createElement(Wrapper$5, null, label !== '' && /*#__PURE__*/React__default.createElement(BodyText, {
8249
+ level: 1,
8250
+ tag: "p",
8251
+ "data-testid": "select-label"
8252
+ }, label), /*#__PURE__*/React__default.createElement(SelectList, {
8253
+ id: "select",
8254
+ ref: selectRef,
8255
+ onClick: toggleSelect,
8256
+ onFocus: openSelect,
8257
+ onBlur: closeSelect,
8258
+ onMouseDown: function onMouseDown(e) {
8259
+ return e.preventDefault();
7877
8260
  },
7878
- isSearchable: isSearchable,
7879
- className: "chord-select-container",
7880
- classNamePrefix: "chord-select"
7881
- }, selectProps)))), !!error && /*#__PURE__*/React__default.createElement(ErrorLabel$1, {
7882
- darkMode: darkMode,
7883
- "data-testid": "text-field-error-label"
7884
- }, /*#__PURE__*/React__default.createElement(AltHeader, {
7885
- level: 6
7886
- }, error)));
8261
+ onKeyUp: handleHighlighted(handleOptionSelection),
8262
+ width: width,
8263
+ height: height,
8264
+ role: "listbox",
8265
+ tabIndex: 0,
8266
+ "aria-labelledby": label,
8267
+ "aria-selected": isOpen,
8268
+ "aria-disabled": isDisabled,
8269
+ "data-testid": "select"
8270
+ }, /*#__PURE__*/React__default.createElement(SelectWrapper, null, /*#__PURE__*/React__default.createElement(BodyText, {
8271
+ level: 1,
8272
+ tag: "p",
8273
+ "data-testid": "selected-value"
8274
+ }, (_ref4 = (_selectedValue$text = selectedValue == null ? void 0 : selectedValue.text) != null ? _selectedValue$text : (_options$ = options[0]) == null ? void 0 : _options$.text) != null ? _ref4 : ''), isOpen && /*#__PURE__*/React__default.createElement(Options, {
8275
+ "data-testid": "options"
8276
+ }, options.map(function (option, index) {
8277
+ return /*#__PURE__*/React__default.createElement(Option, {
8278
+ ref: function ref(element) {
8279
+ if (!element || optionsRef.current.length === options.length) return;
8280
+ optionsRef.current.push(element);
8281
+ },
8282
+ role: "option",
8283
+ tabIndex: index + 1,
8284
+ hover: index === itemToHighlight,
8285
+ key: option.text,
8286
+ onClick: function onClick() {
8287
+ return handleOptionSelection(index);
8288
+ }
8289
+ }, /*#__PURE__*/React__default.createElement(BodyText, {
8290
+ level: 1,
8291
+ tag: "p"
8292
+ }, option.text));
8293
+ }))), /*#__PURE__*/React__default.createElement(ArrowIcon, null)));
7887
8294
  }
7888
8295
 
7889
8296
  var _templateObject$15;
@@ -7916,7 +8323,7 @@ var TextOnly = function TextOnly(_ref) {
7916
8323
  };
7917
8324
 
7918
8325
  var _templateObject$16, _templateObject2$N;
7919
- var Wrapper$5 = /*#__PURE__*/styled__default.div(_templateObject$16 || (_templateObject$16 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n height: 100%;\n width: fit-content;\n\n ", " {\n height: calc(100% - 12px - var(--line-height-body-2));\n @supports not (aspect-ratio: ", ") {\n width: ", ";\n }\n }\n"])), ImageAspectRatioWrapper, function (_ref) {
8326
+ var Wrapper$6 = /*#__PURE__*/styled__default.div(_templateObject$16 || (_templateObject$16 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n height: 100%;\n width: fit-content;\n\n ", " {\n height: calc(100% - 12px - var(--line-height-body-2));\n @supports not (aspect-ratio: ", ") {\n width: ", ";\n }\n }\n"])), ImageAspectRatioWrapper, function (_ref) {
7920
8327
  var _ref$aspectRatio = _ref.aspectRatio,
7921
8328
  aspectRatio = _ref$aspectRatio === void 0 ? exports.AspectRatio['1:1'] : _ref$aspectRatio;
7922
8329
  return aspectRatio;
@@ -7955,7 +8362,7 @@ var ImageWithCaption = function ImageWithCaption(_ref) {
7955
8362
  return window.removeEventListener('resize', setWrapperHeight);
7956
8363
  };
7957
8364
  }, [wrapperRef]);
7958
- return /*#__PURE__*/React__default.createElement(Wrapper$5, {
8365
+ return /*#__PURE__*/React__default.createElement(Wrapper$6, {
7959
8366
  aspectRatio: aspectRatio,
7960
8367
  ref: wrapperRef,
7961
8368
  height: height
@@ -7994,13 +8401,13 @@ var Quote = function Quote(_ref) {
7994
8401
  }, attribution))));
7995
8402
  };
7996
8403
 
7997
- var _templateObject$18, _templateObject2$P, _templateObject3$G, _templateObject4$w, _templateObject5$n, _templateObject6$i;
8404
+ var _templateObject$18, _templateObject2$P, _templateObject3$G, _templateObject4$w, _templateObject5$o, _templateObject6$j;
7998
8405
  var CardContainer$1 = /*#__PURE__*/styled__default.div(_templateObject$18 || (_templateObject$18 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n width: 100%;\n display: grid;\n grid-template-columns: repeat(7, minmax(0, 1fr));\n gap: 15px;\n min-height: 50px;\n"])));
7999
8406
  var ContentContainer$4 = /*#__PURE__*/styled__default.div(_templateObject2$P || (_templateObject2$P = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n"])));
8000
8407
  var StyledImage = /*#__PURE__*/styled__default.img(_templateObject3$G || (_templateObject3$G = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px solid var(--base-color-white);\n"])));
8001
8408
  var ImageWrapper = /*#__PURE__*/styled__default.div(_templateObject4$w || (_templateObject4$w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n"])));
8002
- var IconWrapper$3 = /*#__PURE__*/styled__default.div(_templateObject5$n || (_templateObject5$n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background: rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n span {\n width: 40px;\n height: 40px;\n @media ", " {\n width: 24px;\n height: 24px;\n }\n @media ", " {\n width: 18px;\n height: 18px;\n }\n }\n"])), devices.tablet, devices.mobile);
8003
- var TitleWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject6$i || (_templateObject6$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 8px;\n div {\n @media ", " {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n"])), devices.mobile);
8409
+ var IconWrapper$3 = /*#__PURE__*/styled__default.div(_templateObject5$o || (_templateObject5$o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background: rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n span {\n width: 40px;\n height: 40px;\n @media ", " {\n width: 24px;\n height: 24px;\n }\n @media ", " {\n width: 18px;\n height: 18px;\n }\n }\n"])), devices.tablet, devices.mobile);
8410
+ var TitleWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject6$j || (_templateObject6$j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 8px;\n div {\n @media ", " {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n"])), devices.mobile);
8004
8411
 
8005
8412
  var MiniCard = function MiniCard(_ref) {
8006
8413
  var _ref$title = _ref.title,
@@ -8140,101 +8547,19 @@ var ReadMore = function ReadMore(_ref) {
8140
8547
  }, isFullTextOpen ? "" + hideText : "" + showMoreText)));
8141
8548
  };
8142
8549
 
8143
- var _templateObject$1a, _templateObject2$R, _templateObject3$I, _templateObject4$y;
8144
- var MenuContainer$2 = /*#__PURE__*/styled__default.menu(_templateObject$1a || (_templateObject$1a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n padding: 0;\n margin: 0;\n"])));
8145
- var MenuList = /*#__PURE__*/styled__default.ul(_templateObject2$R || (_templateObject2$R = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0;\n margin: 0;\n list-style: none;\n border-right: 1px solid var(--base-color-", ");\n li {\n margin-left: -5px;\n @media ", " {\n margin-left: 0px;\n }\n }\n @media ", " {\n display: ", ";\n background: var(--base-color-", ");\n border: 1px solid var(--base-color-", ");\n border-top: 0;\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n }\n"])), exports.Colors.LightGrey, devices.mobile, devices.mobile, function (_ref) {
8146
- var mobileOpen = _ref.mobileOpen;
8147
- return mobileOpen ? "block" : 'none';
8148
- }, exports.Colors.White, exports.Colors.DarkGrey);
8149
- var MenuItem$1 = /*#__PURE__*/styled__default.button(_templateObject3$I || (_templateObject3$I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n line-height: var(--line-height-navigation);\n font-size: var(--font-size-navigation);\n font-family: var(--font-family-navigation);\n font-weight: var(--font-weight-navigation);\n letter-spacing: var(--letter-spacing-navigation);\n color: var(--base-color-", ");\n text-transform: uppercase;\n margin: 0;\n padding: 16px 20px 15px 5px;\n border: 0;\n border-radius: 0;\n display: block;\n width: 100%;\n text-align: left;\n background: ", ";\n cursor: pointer;\n &:hover {\n background: var(--base-color-", ");\n }\n @media ", " {\n padding: 16px 20px 15px 20px;\n }\n"])), exports.Colors.Black, function (_ref2) {
8150
- var active = _ref2.active;
8151
- return active ? "var(--base-color-" + exports.Colors.MidGrey + ")" : 'none';
8152
- }, exports.Colors.MidGrey, devices.mobile);
8153
- var MobileButton = /*#__PURE__*/styled__default.button(_templateObject4$y || (_templateObject4$y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n line-height: var(--line-height-navigation);\n font-size: var(--font-size-navigation);\n font-family: var(--font-family-navigation);\n font-weight: var(--font-weight-navigation);\n letter-spacing: var(--letter-spacing-navigation);\n color: var(--base-color-", ");\n text-transform: uppercase;\n margin: 0;\n padding: 16px 46px 14px 20px;\n background: var(--base-color-", ");\n border: 1px solid var(--base-color-", ");\n border-radius: 0;\n display: none;\n width: 100%;\n text-align: left;\n cursor: pointer;\n position: relative;\n span {\n width: 25px;\n height: 25px;\n position: absolute;\n top: 50%;\n margin-top: -12px;\n right: 10px;\n }\n @media ", " {\n display: block;\n }\n"])), exports.Colors.Black, exports.Colors.White, exports.Colors.DarkGrey, devices.mobile);
8154
-
8155
- /**
8156
- * Vertical menu component uses for navigation
8157
- * inside website chapter. It looks like a vertical
8158
- * list with clickable items on desktop and dropdown
8159
- * list on mobile.
8160
- *
8161
- * ## Menu items
8162
- * Menu items should be passed as `items` prop. This
8163
- * should be an array of objects. Each object should
8164
- * have `text` (text displayed as a menu item) and
8165
- * `onClick` (click handler function)
8166
- *
8167
- * ## Active menu item
8168
- * Active menu item should be passed as component `activeItem`
8169
- * prop. This indicates on which menu item should be highlighted
8170
- * as active one. Should be equal to `text` prop from one of the `items`
8171
- */
8172
-
8173
- var AuxiliaryNav = function AuxiliaryNav(_ref) {
8174
- var items = _ref.items,
8175
- activeItem = _ref.activeItem;
8176
-
8177
- var _useState = React.useState(false),
8178
- mobileOpen = _useState[0],
8179
- setMobileOpen = _useState[1];
8180
-
8181
- var containerRef = React.useRef(null);
8182
-
8183
- var mobileButtonClickHandler = function mobileButtonClickHandler() {
8184
- setMobileOpen(function (prev) {
8185
- return !prev;
8186
- });
8187
- };
8188
-
8189
- var outsideClickHandler = function outsideClickHandler(event) {
8190
- if (containerRef.current && !containerRef.current.contains(event.target)) {
8191
- setMobileOpen(false);
8192
- }
8193
- };
8194
-
8195
- React.useEffect(function () {
8196
- document.addEventListener('mousedown', outsideClickHandler);
8197
- return function () {
8198
- document.removeEventListener('mousedown', outsideClickHandler);
8199
- };
8200
- }, [containerRef]);
8201
- return /*#__PURE__*/React__default.createElement(MenuContainer$2, {
8202
- ref: containerRef,
8203
- "data-testid": "nav-menu-container"
8204
- }, /*#__PURE__*/React__default.createElement(MobileButton, {
8205
- mobileOpen: mobileOpen,
8206
- onClick: mobileButtonClickHandler,
8207
- "data-testid": "nav-menu-mobile-button"
8208
- }, activeItem, /*#__PURE__*/React__default.createElement(Icon, {
8209
- iconName: "DropdownArrow",
8210
- direction: mobileOpen ? 'left' : 'right'
8211
- })), /*#__PURE__*/React__default.createElement(MenuList, {
8212
- mobileOpen: mobileOpen,
8213
- "data-testid": "nav-menu-list"
8214
- }, items.map(function (item, idx) {
8215
- return /*#__PURE__*/React__default.createElement("li", {
8216
- key: item.text + "-" + idx
8217
- }, /*#__PURE__*/React__default.createElement(MenuItem$1, {
8218
- onClick: item.onClick,
8219
- active: item.text === activeItem,
8220
- "data-testid": "nav-menu-item" + (item.text === activeItem ? '-active' : '')
8221
- }, item.text));
8222
- })));
8223
- };
8224
-
8225
- var _templateObject$1b, _templateObject2$S, _templateObject3$J, _templateObject4$z, _templateObject5$o, _templateObject6$j;
8226
- var Container$2 = /*#__PURE__*/styled__default.div(_templateObject$1b || (_templateObject$1b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
8227
- var Sections = /*#__PURE__*/styled__default.div(_templateObject2$S || (_templateObject2$S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n"])));
8228
- var Section = /*#__PURE__*/styled__default.div(_templateObject3$J || (_templateObject3$J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n height: 2px;\n background-color: ", ";\n"])), function (_ref) {
8550
+ var _templateObject$1a, _templateObject2$R, _templateObject3$I, _templateObject4$y, _templateObject5$p, _templateObject6$k;
8551
+ var Container$1 = /*#__PURE__*/styled__default.div(_templateObject$1a || (_templateObject$1a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
8552
+ var Sections = /*#__PURE__*/styled__default.div(_templateObject2$R || (_templateObject2$R = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n"])));
8553
+ var Section = /*#__PURE__*/styled__default.div(_templateObject3$I || (_templateObject3$I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n height: 2px;\n background-color: ", ";\n"])), function (_ref) {
8229
8554
  var color = _ref.color;
8230
8555
  return "var(--base-color-" + color + ")";
8231
8556
  });
8232
- var BottomLine = /*#__PURE__*/styled__default.div(_templateObject4$z || (_templateObject4$z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: 20px;\n"])));
8233
- var Text = /*#__PURE__*/styled__default.div(_templateObject5$o || (_templateObject5$o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n"])), function (_ref2) {
8557
+ var BottomLine = /*#__PURE__*/styled__default.div(_templateObject4$y || (_templateObject4$y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: 20px;\n"])));
8558
+ var Text = /*#__PURE__*/styled__default.div(_templateObject5$p || (_templateObject5$p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n"])), function (_ref2) {
8234
8559
  var color = _ref2.color;
8235
8560
  return "var(--base-color-" + color + ")";
8236
8561
  });
8237
- var LabelText = /*#__PURE__*/styled__default.div(_templateObject6$j || (_templateObject6$j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 1px;\n white-space: nowrap;\n color: ", ";\n"])), function (_ref3) {
8562
+ var LabelText = /*#__PURE__*/styled__default.div(_templateObject6$k || (_templateObject6$k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 1px;\n white-space: nowrap;\n color: ", ";\n"])), function (_ref3) {
8238
8563
  var color = _ref3.color;
8239
8564
  return "var(--base-color-" + color + ")";
8240
8565
  });
@@ -8295,7 +8620,7 @@ var PasswordStrength = function PasswordStrength(_ref) {
8295
8620
  return index < activeSections ? 'password-strength-section-active' : 'password-strength-section';
8296
8621
  };
8297
8622
 
8298
- return /*#__PURE__*/React__default.createElement(Container$2, {
8623
+ return /*#__PURE__*/React__default.createElement(Container$1, {
8299
8624
  "data-testid": "password-strength-container"
8300
8625
  }, /*#__PURE__*/React__default.createElement(Sections, {
8301
8626
  "data-testid": "password-strength-sections"
@@ -8320,6 +8645,88 @@ var PasswordStrength = function PasswordStrength(_ref) {
8320
8645
  }, strengthLabel))));
8321
8646
  };
8322
8647
 
8648
+ var _templateObject$1b, _templateObject2$S, _templateObject3$J, _templateObject4$z;
8649
+ var MenuContainer$2 = /*#__PURE__*/styled__default.menu(_templateObject$1b || (_templateObject$1b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n padding: 0;\n margin: 0;\n"])));
8650
+ var MenuList = /*#__PURE__*/styled__default.ul(_templateObject2$S || (_templateObject2$S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0;\n margin: 0;\n list-style: none;\n border-right: 1px solid var(--base-color-", ");\n li {\n margin-left: -5px;\n @media ", " {\n margin-left: 0px;\n }\n }\n @media ", " {\n display: ", ";\n background: var(--base-color-", ");\n border: 1px solid var(--base-color-", ");\n border-top: 0;\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n }\n"])), exports.Colors.LightGrey, devices.mobile, devices.mobile, function (_ref) {
8651
+ var mobileOpen = _ref.mobileOpen;
8652
+ return mobileOpen ? "block" : 'none';
8653
+ }, exports.Colors.White, exports.Colors.DarkGrey);
8654
+ var MenuItem$1 = /*#__PURE__*/styled__default.button(_templateObject3$J || (_templateObject3$J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n line-height: var(--line-height-navigation);\n font-size: var(--font-size-navigation);\n font-family: var(--font-family-navigation);\n font-weight: var(--font-weight-navigation);\n letter-spacing: var(--letter-spacing-navigation);\n color: var(--base-color-", ");\n text-transform: uppercase;\n margin: 0;\n padding: 16px 20px 15px 5px;\n border: 0;\n border-radius: 0;\n display: block;\n width: 100%;\n text-align: left;\n background: ", ";\n cursor: pointer;\n &:hover {\n background: var(--base-color-", ");\n }\n @media ", " {\n padding: 16px 20px 15px 20px;\n }\n"])), exports.Colors.Black, function (_ref2) {
8655
+ var active = _ref2.active;
8656
+ return active ? "var(--base-color-" + exports.Colors.MidGrey + ")" : 'none';
8657
+ }, exports.Colors.MidGrey, devices.mobile);
8658
+ var MobileButton = /*#__PURE__*/styled__default.button(_templateObject4$z || (_templateObject4$z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n line-height: var(--line-height-navigation);\n font-size: var(--font-size-navigation);\n font-family: var(--font-family-navigation);\n font-weight: var(--font-weight-navigation);\n letter-spacing: var(--letter-spacing-navigation);\n color: var(--base-color-", ");\n text-transform: uppercase;\n margin: 0;\n padding: 16px 46px 14px 20px;\n background: var(--base-color-", ");\n border: 1px solid var(--base-color-", ");\n border-radius: 0;\n display: none;\n width: 100%;\n text-align: left;\n cursor: pointer;\n position: relative;\n span {\n width: 25px;\n height: 25px;\n position: absolute;\n top: 50%;\n margin-top: -12px;\n right: 10px;\n }\n @media ", " {\n display: block;\n }\n"])), exports.Colors.Black, exports.Colors.White, exports.Colors.DarkGrey, devices.mobile);
8659
+
8660
+ /**
8661
+ * Vertical menu component uses for navigation
8662
+ * inside website chapter. It looks like a vertical
8663
+ * list with clickable items on desktop and dropdown
8664
+ * list on mobile.
8665
+ *
8666
+ * ## Menu items
8667
+ * Menu items should be passed as `items` prop. This
8668
+ * should be an array of objects. Each object should
8669
+ * have `text` (text displayed as a menu item) and
8670
+ * `onClick` (click handler function)
8671
+ *
8672
+ * ## Active menu item
8673
+ * Active menu item should be passed as component `activeItem`
8674
+ * prop. This indicates on which menu item should be highlighted
8675
+ * as active one. Should be equal to `text` prop from one of the `items`
8676
+ */
8677
+
8678
+ var AuxiliaryNav = function AuxiliaryNav(_ref) {
8679
+ var items = _ref.items,
8680
+ activeItem = _ref.activeItem;
8681
+
8682
+ var _useState = React.useState(false),
8683
+ mobileOpen = _useState[0],
8684
+ setMobileOpen = _useState[1];
8685
+
8686
+ var containerRef = React.useRef(null);
8687
+
8688
+ var mobileButtonClickHandler = function mobileButtonClickHandler() {
8689
+ setMobileOpen(function (prev) {
8690
+ return !prev;
8691
+ });
8692
+ };
8693
+
8694
+ var outsideClickHandler = function outsideClickHandler(event) {
8695
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
8696
+ setMobileOpen(false);
8697
+ }
8698
+ };
8699
+
8700
+ React.useEffect(function () {
8701
+ document.addEventListener('mousedown', outsideClickHandler);
8702
+ return function () {
8703
+ document.removeEventListener('mousedown', outsideClickHandler);
8704
+ };
8705
+ }, [containerRef]);
8706
+ return /*#__PURE__*/React__default.createElement(MenuContainer$2, {
8707
+ ref: containerRef,
8708
+ "data-testid": "nav-menu-container"
8709
+ }, /*#__PURE__*/React__default.createElement(MobileButton, {
8710
+ mobileOpen: mobileOpen,
8711
+ onClick: mobileButtonClickHandler,
8712
+ "data-testid": "nav-menu-mobile-button"
8713
+ }, activeItem, /*#__PURE__*/React__default.createElement(Icon, {
8714
+ iconName: "DropdownArrow",
8715
+ direction: mobileOpen ? 'left' : 'right'
8716
+ })), /*#__PURE__*/React__default.createElement(MenuList, {
8717
+ mobileOpen: mobileOpen,
8718
+ "data-testid": "nav-menu-list"
8719
+ }, items.map(function (item, idx) {
8720
+ return /*#__PURE__*/React__default.createElement("li", {
8721
+ key: item.text + "-" + idx
8722
+ }, /*#__PURE__*/React__default.createElement(MenuItem$1, {
8723
+ onClick: item.onClick,
8724
+ active: item.text === activeItem,
8725
+ "data-testid": "nav-menu-item" + (item.text === activeItem ? '-active' : '')
8726
+ }, item.text));
8727
+ })));
8728
+ };
8729
+
8323
8730
  var UpsellSection = function UpsellSection(_ref) {
8324
8731
  var title = _ref.title,
8325
8732
  richText = _ref.richText,
@@ -8444,6 +8851,7 @@ var CloseButton = /*#__PURE__*/styled__default.button(_templateObject2$U || (_te
8444
8851
  var ContentWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject3$K || (_templateObject3$K = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
8445
8852
  var Overlay = /*#__PURE__*/styled__default(Grid)(_templateObject4$A || (_templateObject4$A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100vh;\n align-content: center;\n background-color: rgba(0, 0, 0, 0.4);\n"])));
8446
8853
 
8854
+ var _excluded$k = ["isOpen", "setIsOpen", "children", "appElementId"];
8447
8855
  var MAX_Z_INDEX = 9999999999;
8448
8856
 
8449
8857
  if (Modal.defaultStyles.content) {
@@ -8520,7 +8928,7 @@ var ModalWindow = function ModalWindow(_ref) {
8520
8928
  setIsOpen = _ref.setIsOpen,
8521
8929
  children = _ref.children,
8522
8930
  appElementId = _ref.appElementId,
8523
- modalProps = _objectWithoutPropertiesLoose(_ref, ["isOpen", "setIsOpen", "children", "appElementId"]);
8931
+ modalProps = _objectWithoutPropertiesLoose(_ref, _excluded$k);
8524
8932
 
8525
8933
  var isMobile = useMobile();
8526
8934
  var customStyles = {