@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.
package/dist/chord.esm.js CHANGED
@@ -2,7 +2,6 @@ import React__default, { createElement, memo, useRef, useCallback, useEffect, us
2
2
  import styled, { css, ThemeProvider, createGlobalStyle } from 'styled-components';
3
3
  import moment from 'moment';
4
4
  import { renderToString } from 'react-dom/server';
5
- import ReactSelect, { components } from 'react-select';
6
5
  import Modal from 'react-modal';
7
6
  import ScrollLock from 'react-scrolllock';
8
7
 
@@ -2172,12 +2171,14 @@ var Icon = /*#__PURE__*/memo(function (_ref) {
2172
2171
  });
2173
2172
  Icon.displayName = 'Icon';
2174
2173
 
2174
+ var _excluded = ["children", "iconName", "iconDirection", "color"];
2175
+
2175
2176
  var Button = function Button(_ref) {
2176
2177
  var children = _ref.children,
2177
2178
  iconName = _ref.iconName,
2178
2179
  iconDirection = _ref.iconDirection,
2179
2180
  color = _ref.color,
2180
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "iconName", "iconDirection", "color"]);
2181
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
2181
2182
 
2182
2183
  var truncatedString = children.substring(0, 30);
2183
2184
  return /*#__PURE__*/React__default.createElement(ButtonWrapper, Object.assign({}, rest, {
@@ -2253,9 +2254,11 @@ var ButtonType;
2253
2254
  ButtonType["Tertiary"] = "Tertiary";
2254
2255
  })(ButtonType || (ButtonType = {}));
2255
2256
 
2257
+ var _excluded$1 = ["children"];
2258
+
2256
2259
  var PrimaryButton = function PrimaryButton(_ref) {
2257
2260
  var children = _ref.children,
2258
- props = _objectWithoutPropertiesLoose(_ref, ["children"]);
2261
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
2259
2262
 
2260
2263
  return /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper, Object.assign({
2261
2264
  color: Colors.White
@@ -2269,9 +2272,11 @@ var PrimaryButtonWrapper$1 = /*#__PURE__*/styled(Button)(_templateObject$5 || (_
2269
2272
  return color ? "var(--base-color-" + color + ")" : theme.colors.primary;
2270
2273
  });
2271
2274
 
2275
+ var _excluded$2 = ["children"];
2276
+
2272
2277
  var SecondaryButton = function SecondaryButton(_ref) {
2273
2278
  var children = _ref.children,
2274
- props = _objectWithoutPropertiesLoose(_ref, ["children"]);
2279
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
2275
2280
 
2276
2281
  return /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper$1, Object.assign({
2277
2282
  color: Colors.Primary
@@ -2285,10 +2290,12 @@ var TertiaryButtonWrapper = /*#__PURE__*/styled.a(_templateObject$6 || (_templat
2285
2290
  });
2286
2291
  var TertiaryIconWrapper = /*#__PURE__*/styled.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"])));
2287
2292
 
2293
+ var _excluded$3 = ["children", "color"];
2294
+
2288
2295
  var Button$1 = function Button(_ref) {
2289
2296
  var children = _ref.children,
2290
2297
  color = _ref.color,
2291
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "color"]);
2298
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
2292
2299
 
2293
2300
  var truncatedString = children.substring(0, 100);
2294
2301
  return /*#__PURE__*/React__default.createElement(TertiaryButtonWrapper, Object.assign({}, rest, {
@@ -3250,6 +3257,8 @@ var TabLinkWrapper = /*#__PURE__*/styled.a(_templateObject$l || (_templateObject
3250
3257
  });
3251
3258
  var TabLinkIconWrapper = /*#__PURE__*/styled.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"])));
3252
3259
 
3260
+ var _excluded$4 = ["children", "iconName", "iconDirection", "color", "hoverColor"];
3261
+
3253
3262
  var TabLink = function TabLink(_ref) {
3254
3263
  var children = _ref.children,
3255
3264
  iconName = _ref.iconName,
@@ -3258,7 +3267,7 @@ var TabLink = function TabLink(_ref) {
3258
3267
  color = _ref$color === void 0 ? Colors.DarkGrey : _ref$color,
3259
3268
  _ref$hoverColor = _ref.hoverColor,
3260
3269
  hoverColor = _ref$hoverColor === void 0 ? Colors.Primary : _ref$hoverColor,
3261
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "iconName", "iconDirection", "color", "hoverColor"]);
3270
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
3262
3271
 
3263
3272
  return /*#__PURE__*/React__default.createElement(TabLinkWrapper, Object.assign({
3264
3273
  color: color,
@@ -3308,6 +3317,7 @@ var TextAreaError = /*#__PURE__*/styled.div(_templateObject4$2 || (_templateObje
3308
3317
  return darkMode ? 'var(--base-color-white)' : 'var(--base-color-errorstate)';
3309
3318
  });
3310
3319
 
3320
+ var _excluded$5 = ["label", "error", "width", "darkMode", "height", "columnStartDesktop", "columnStartDevice", "columnSpanDesktop", "columnSpanDevice", "maxLength", "tabIndex"];
3311
3321
  /**
3312
3322
  * An HTML textarea component for Chord.
3313
3323
  *
@@ -3369,7 +3379,7 @@ var TextArea = function TextArea(_ref) {
3369
3379
  maxLength = _ref$maxLength === void 0 ? 950 : _ref$maxLength,
3370
3380
  _ref$tabIndex = _ref.tabIndex,
3371
3381
  tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
3372
- textareaProps = _objectWithoutPropertiesLoose(_ref, ["label", "error", "width", "darkMode", "height", "columnStartDesktop", "columnStartDevice", "columnSpanDesktop", "columnSpanDevice", "maxLength", "tabIndex"]);
3382
+ textareaProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
3373
3383
 
3374
3384
  return /*#__PURE__*/React__default.createElement(GridItem, {
3375
3385
  columnStartDesktop: columnStartDesktop,
@@ -3404,7 +3414,7 @@ var InputWrapper = /*#__PURE__*/styled.div(_templateObject2$b || (_templateObjec
3404
3414
  if (!width) return 'none';
3405
3415
  return width + 'px';
3406
3416
  });
3407
- var Input = /*#__PURE__*/styled.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) {
3417
+ var Input = /*#__PURE__*/styled.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) {
3408
3418
  var isPasswordField = _ref2.isPasswordField;
3409
3419
  if (isPasswordField) return "80px";
3410
3420
  return "20px";
@@ -3429,6 +3439,7 @@ var ErrorLabel = /*#__PURE__*/styled.div(_templateObject6 || (_templateObject6 =
3429
3439
  return "var(--base-color-errorstate)";
3430
3440
  });
3431
3441
 
3442
+ var _excluded$6 = ["label", "type", "error", "darkMode", "width"];
3432
3443
  /**
3433
3444
  * A text field component, that wraps around the native `<input />` element
3434
3445
  * and adds some extra states and information around it (i.e. a text and an error labels,
@@ -3476,7 +3487,7 @@ var TextField = /*#__PURE__*/forwardRef(function (_ref, ref) {
3476
3487
  _ref$darkMode = _ref.darkMode,
3477
3488
  darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
3478
3489
  width = _ref.width,
3479
- inputProps = _objectWithoutPropertiesLoose(_ref, ["label", "type", "error", "darkMode", "width"]);
3490
+ inputProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
3480
3491
 
3481
3492
  var _useState = useState(false),
3482
3493
  showPassword = _useState[0],
@@ -3512,7 +3523,7 @@ var TextField = /*#__PURE__*/forwardRef(function (_ref, ref) {
3512
3523
  "data-testid": "text-field-input",
3513
3524
  ref: ref
3514
3525
  }, inputProps)), isPasswordField && /*#__PURE__*/React__default.createElement(ShowHideButton, {
3515
- type: "button",
3526
+ type: 'button',
3516
3527
  onClick: showHideClickHandler
3517
3528
  }, /*#__PURE__*/React__default.createElement(Overline, {
3518
3529
  level: 1
@@ -3534,12 +3545,14 @@ var TextLinkWrapper = /*#__PURE__*/styled.a(_templateObject$o || (_templateObjec
3534
3545
  });
3535
3546
  var TextLinkIconWrapper = /*#__PURE__*/styled.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"])));
3536
3547
 
3548
+ var _excluded$7 = ["children", "iconName", "iconDirection", "color"];
3549
+
3537
3550
  var TextLink = function TextLink(_ref) {
3538
3551
  var children = _ref.children,
3539
3552
  iconName = _ref.iconName,
3540
3553
  iconDirection = _ref.iconDirection,
3541
3554
  color = _ref.color,
3542
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "iconName", "iconDirection", "color"]);
3555
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$7);
3543
3556
 
3544
3557
  var truncatedString = children.substring(0, 30);
3545
3558
  return /*#__PURE__*/React__default.createElement(TextLinkWrapper, Object.assign({
@@ -5147,6 +5160,8 @@ var ContactNewsletter = function ContactNewsletter(_ref) {
5147
5160
  }, contact.title))));
5148
5161
  };
5149
5162
 
5163
+ var _excluded$8 = ["dataRoh"];
5164
+
5150
5165
  var Footer = function Footer(_ref) {
5151
5166
  var data = _ref.data;
5152
5167
  var policyLinks = data.policyLinks;
@@ -5156,7 +5171,7 @@ var Footer = function Footer(_ref) {
5156
5171
 
5157
5172
  var _data$artsLogo = data.artsLogo,
5158
5173
  artsDataRoh = _data$artsLogo.dataRoh,
5159
- artsLogo = _objectWithoutPropertiesLoose(_data$artsLogo, ["dataRoh"]);
5174
+ artsLogo = _objectWithoutPropertiesLoose(_data$artsLogo, _excluded$8);
5160
5175
 
5161
5176
  var additionalInfo = data.additionalInfo;
5162
5177
  return /*#__PURE__*/React__default.createElement(FooterSection, null, /*#__PURE__*/React__default.createElement(Grid, null, /*#__PURE__*/React__default.createElement(GridItem, {
@@ -5211,6 +5226,8 @@ var ArrowsContainer = /*#__PURE__*/styled.div(_templateObject5$9 || (_templateOb
5211
5226
  });
5212
5227
  var ArrowWrapper = /*#__PURE__*/styled.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"])));
5213
5228
 
5229
+ var _excluded$9 = ["id", "text"];
5230
+
5214
5231
  var AnchorTabBar = function AnchorTabBar(_ref) {
5215
5232
  var tabs = _ref.tabs,
5216
5233
  onTabClick = _ref.onTabClick,
@@ -5425,7 +5442,7 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
5425
5442
  }, tabs.map(function (_ref4) {
5426
5443
  var id = _ref4.id,
5427
5444
  text = _ref4.text,
5428
- rest = _objectWithoutPropertiesLoose(_ref4, ["id", "text"]);
5445
+ rest = _objectWithoutPropertiesLoose(_ref4, _excluded$9);
5429
5446
 
5430
5447
  return /*#__PURE__*/React__default.createElement("li", {
5431
5448
  key: id
@@ -5481,6 +5498,9 @@ var PrimaryButtonReverse = /*#__PURE__*/styled(PrimaryButton)(_templateObject8$3
5481
5498
  var MessageWrapper = /*#__PURE__*/styled.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);
5482
5499
  var MessageWrapperMobile = /*#__PURE__*/styled.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);
5483
5500
 
5501
+ var _excluded$a = ["text"],
5502
+ _excluded2 = ["text"];
5503
+
5484
5504
  var TitleWithCTA = function TitleWithCTA(_ref) {
5485
5505
  var title = _ref.title,
5486
5506
  links = _ref.links,
@@ -5490,11 +5510,11 @@ var TitleWithCTA = function TitleWithCTA(_ref) {
5490
5510
 
5491
5511
  var _ref2 = (links == null ? void 0 : links[0]) || {},
5492
5512
  primaryButtonText = _ref2.text,
5493
- primaryButtonProps = _objectWithoutPropertiesLoose(_ref2, ["text"]);
5513
+ primaryButtonProps = _objectWithoutPropertiesLoose(_ref2, _excluded$a);
5494
5514
 
5495
5515
  var _ref3 = (links == null ? void 0 : links[1]) || {},
5496
5516
  secondaryButtonText = _ref3.text,
5497
- secondaryButtonProps = _objectWithoutPropertiesLoose(_ref3, ["text"]);
5517
+ secondaryButtonProps = _objectWithoutPropertiesLoose(_ref3, _excluded2);
5498
5518
 
5499
5519
  return /*#__PURE__*/React__default.createElement(TitleCTAGridWrapper, {
5500
5520
  sticky: sticky
@@ -5770,7 +5790,8 @@ var Accordions = function Accordions(_ref) {
5770
5790
  visibleStandfirst: accordion.visibleStandfirst,
5771
5791
  contentType: accordion.contentType,
5772
5792
  displayLevel: accordion.displayLevel,
5773
- semanticLevel: accordion.semanticLevel
5793
+ semanticLevel: accordion.semanticLevel,
5794
+ initOpen: accordion.initOpen
5774
5795
  }, accordion.children);
5775
5796
  }));
5776
5797
  };
@@ -5827,7 +5848,7 @@ var AnnouncementBanner = function AnnouncementBanner(_ref) {
5827
5848
  }))))));
5828
5849
  };
5829
5850
 
5830
- var _templateObject$N, _templateObject2$w, _templateObject3$p, _templateObject4$i, _templateObject5$c, _templateObject6$a, _templateObject7$7, _templateObject8$5, _templateObject9$2, _templateObject10$2, _templateObject11$1, _templateObject12;
5851
+ 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;
5831
5852
  var LENGTH_LARGE_TEXT = 28;
5832
5853
  var LENGTH_SMALL_TEXT$1 = 19;
5833
5854
  var LENGTH_TEXT_TABLET = 10;
@@ -5855,20 +5876,21 @@ var ContentContainer$2 = /*#__PURE__*/styled.div(_templateObject4$i || (_templat
5855
5876
  var TitleContainer$4 = /*#__PURE__*/styled.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);
5856
5877
  var TitleContainerMobile = /*#__PURE__*/styled.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);
5857
5878
  var TextContainer$1 = /*#__PURE__*/styled.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"])));
5858
- var SubtitleContainer = /*#__PURE__*/styled.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"])));
5859
- var LabelContainer = /*#__PURE__*/styled.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) {
5879
+ var HighlightTextContainer = /*#__PURE__*/styled(TextContainer$1)(_templateObject8$5 || (_templateObject8$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-primary);\n margin-top: 4px;\n"])));
5880
+ var SubtitleContainer = /*#__PURE__*/styled.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"])));
5881
+ var LabelContainer = /*#__PURE__*/styled.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) {
5860
5882
  var isVisible = _ref6.isVisible;
5861
5883
  return isVisible ? "visible" : 'hidden';
5862
5884
  }, devices.mobile, function (_ref7) {
5863
5885
  var isGridCard = _ref7.isGridCard;
5864
5886
  return isGridCard ? '20px' : '0';
5865
5887
  });
5866
- var LabelElements = /*#__PURE__*/styled.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) {
5888
+ var LabelElements = /*#__PURE__*/styled.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) {
5867
5889
  var bgColor = _ref8.bgColor,
5868
5890
  theme = _ref8.theme;
5869
5891
  return bgColor ? "var(--base-color-" + bgColor + ")" : theme.colors.primary;
5870
5892
  });
5871
- var LabelIconWrapper = /*#__PURE__*/styled.div(_templateObject11$1 || (_templateObject11$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-left: 10px;\n\n svg {\n height: 24px;\n width: 24px;\n }\n"])));
5893
+ var LabelIconWrapper = /*#__PURE__*/styled.div(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-left: 10px;\n\n svg {\n height: 24px;\n width: 24px;\n }\n"])));
5872
5894
 
5873
5895
  var getButtonsOpacity = function getButtonsOpacity(_ref9) {
5874
5896
  var onlyShowButtonsOnHover = _ref9.onlyShowButtonsOnHover;
@@ -5880,7 +5902,7 @@ var getButtonsMinHeight = function getButtonsMinHeight(_ref10) {
5880
5902
  return onlyShowButtonsOnHover ? 'min-height: unset;' : 'min-height: 120px;';
5881
5903
  };
5882
5904
 
5883
- var ButtonsContainer$1 = /*#__PURE__*/styled.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) {
5905
+ var ButtonsContainer$1 = /*#__PURE__*/styled.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) {
5884
5906
  var size = _ref11.size,
5885
5907
  primaryButtonTextLength = _ref11.primaryButtonTextLength,
5886
5908
  tertiaryButtonTextLength = _ref11.tertiaryButtonTextLength;
@@ -5975,6 +5997,9 @@ var truncateReactNodeString = function truncateReactNodeString(node, resultLengt
5975
5997
  return truncateHtmlString(nodeString, resultLength, addDots);
5976
5998
  };
5977
5999
 
6000
+ var _excluded$b = ["text"],
6001
+ _excluded2$1 = ["text"];
6002
+
5978
6003
  var _buttonTypeToButton;
5979
6004
  var LENGTH_LARGE_TEXT$1 = 28;
5980
6005
  var LENGTH_SMALL_TEXT$2 = 19;
@@ -5990,6 +6015,8 @@ var Card = function Card(_ref) {
5990
6015
  subtitle = _ref.subtitle,
5991
6016
  _ref$text = _ref.text,
5992
6017
  text = _ref$text === void 0 ? '' : _ref$text,
6018
+ _ref$highlightText = _ref.highlightText,
6019
+ highlightText = _ref$highlightText === void 0 ? '' : _ref$highlightText,
5993
6020
  links = _ref.links,
5994
6021
  _ref$tags = _ref.tags,
5995
6022
  tags = _ref$tags === void 0 ? [] : _ref$tags,
@@ -6025,7 +6052,7 @@ var Card = function Card(_ref) {
6025
6052
  var _ref2 = firstButton || {},
6026
6053
  _ref2$text = _ref2.text,
6027
6054
  firstButtonText = _ref2$text === void 0 ? '' : _ref2$text,
6028
- restFirstButton = _objectWithoutPropertiesLoose(_ref2, ["text"]);
6055
+ restFirstButton = _objectWithoutPropertiesLoose(_ref2, _excluded$b);
6029
6056
 
6030
6057
  var primaryButtonTextTruncate = size === 'small' ? truncate(firstButtonText, LENGTH_SMALL_TEXT$2) : truncate(firstButtonText, LENGTH_LARGE_TEXT$1);
6031
6058
  var secondButton = links == null ? void 0 : links[1];
@@ -6033,7 +6060,7 @@ var Card = function Card(_ref) {
6033
6060
  var _ref3 = secondButton || {},
6034
6061
  _ref3$text = _ref3.text,
6035
6062
  secondButtonText = _ref3$text === void 0 ? '' : _ref3$text,
6036
- restSecondButton = _objectWithoutPropertiesLoose(_ref3, ["text"]);
6063
+ restSecondButton = _objectWithoutPropertiesLoose(_ref3, _excluded2$1);
6037
6064
 
6038
6065
  var tertiaryButtonTextTruncate = size === 'small' ? truncate(secondButtonText, LENGTH_SMALL_TEXT$2) : truncate(secondButtonText, LENGTH_LARGE_TEXT$1);
6039
6066
 
@@ -6102,7 +6129,9 @@ var Card = function Card(_ref) {
6102
6129
  dangerouslySetInnerHTML: {
6103
6130
  __html: truncatedText
6104
6131
  }
6105
- }))), links && /*#__PURE__*/React__default.createElement(ButtonsContainer$1, {
6132
+ }), highlightText && /*#__PURE__*/React__default.createElement(HighlightTextContainer, null, /*#__PURE__*/React__default.createElement(BodyText, {
6133
+ level: 1
6134
+ }, highlightText)))), links && /*#__PURE__*/React__default.createElement(ButtonsContainer$1, {
6106
6135
  ref: node,
6107
6136
  "data-testid": "buttonscontainer",
6108
6137
  size: size,
@@ -6146,6 +6175,7 @@ var Cards = function Cards(_ref) {
6146
6175
  title: card.title,
6147
6176
  subtitle: card.subtitle,
6148
6177
  text: card.text,
6178
+ highlightText: card.highlightText,
6149
6179
  links: card.links,
6150
6180
  tags: card.tags,
6151
6181
  withContinueWatching: card.withContinueWatching,
@@ -6537,6 +6567,8 @@ var LogoWrapper$2 = /*#__PURE__*/styled.div(_templateObject6$c || (_templateObje
6537
6567
  var ButtonWrapper$1 = /*#__PURE__*/styled.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);
6538
6568
  var PageHeadingText = /*#__PURE__*/styled.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"])));
6539
6569
 
6570
+ var _excluded$c = ["text"];
6571
+
6540
6572
  var PageHeading = function PageHeading(_ref) {
6541
6573
  var title = _ref.title,
6542
6574
  text = _ref.text,
@@ -6547,7 +6579,7 @@ var PageHeading = function PageHeading(_ref) {
6547
6579
 
6548
6580
  var _ref2 = link || {},
6549
6581
  linkText = _ref2.text,
6550
- restLink = _objectWithoutPropertiesLoose(_ref2, ["text"]);
6582
+ restLink = _objectWithoutPropertiesLoose(_ref2, _excluded$c);
6551
6583
 
6552
6584
  var truncatedText = text == null ? void 0 : text.substring(0, 250);
6553
6585
  var truncatedTitle = title && title.substring(0, 40);
@@ -6575,9 +6607,11 @@ var PageHeading = function PageHeading(_ref) {
6575
6607
  }, /*#__PURE__*/React__default.createElement(PrimaryButton, Object.assign({}, restLink), linkText)) : null));
6576
6608
  };
6577
6609
 
6610
+ var _excluded$d = ["link"];
6611
+
6578
6612
  var PageHeadingCore = function PageHeadingCore(_ref) {
6579
6613
  var link = _ref.link,
6580
- rest = _objectWithoutPropertiesLoose(_ref, ["link"]);
6614
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$d);
6581
6615
 
6582
6616
  var coreLink = link && _extends({}, link, {
6583
6617
  color: Colors.White,
@@ -6591,9 +6625,11 @@ var PageHeadingCore = function PageHeadingCore(_ref) {
6591
6625
  })));
6592
6626
  };
6593
6627
 
6628
+ var _excluded$e = ["link"];
6629
+
6594
6630
  var PageHeadingCinema = function PageHeadingCinema(_ref) {
6595
6631
  var link = _ref.link,
6596
- rest = _objectWithoutPropertiesLoose(_ref, ["link"]);
6632
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$e);
6597
6633
 
6598
6634
  var cinemaLink = link && _extends({}, link, {
6599
6635
  color: Colors.Black,
@@ -6617,6 +6653,8 @@ var TextWrapper$1 = /*#__PURE__*/styled.div(_templateObject6$d || (_templateObje
6617
6653
  var ButtonWrapper$2 = /*#__PURE__*/styled.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);
6618
6654
  var ScrollDownWrapper = /*#__PURE__*/styled.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);
6619
6655
 
6656
+ var _excluded$f = ["text"];
6657
+
6620
6658
  var PageHeadingImpact = function PageHeadingImpact(_ref) {
6621
6659
  var children = _ref.children,
6622
6660
  text = _ref.text,
@@ -6633,7 +6671,7 @@ var PageHeadingImpact = function PageHeadingImpact(_ref) {
6633
6671
 
6634
6672
  var _ref2 = link || {},
6635
6673
  linkText = _ref2.text,
6636
- restLink = _objectWithoutPropertiesLoose(_ref2, ["text"]);
6674
+ restLink = _objectWithoutPropertiesLoose(_ref2, _excluded$f);
6637
6675
 
6638
6676
  return /*#__PURE__*/React__default.createElement(ImpactWrapper, {
6639
6677
  bgUrlDesktop: bgUrlDesktop,
@@ -6726,9 +6764,11 @@ var PageHeadingPanel = function PageHeadingPanel(_ref) {
6726
6764
  var _templateObject$W;
6727
6765
  var StreamWrapper = /*#__PURE__*/styled.div(_templateObject$W || (_templateObject$W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n h2::selection,\n div::selection {\n color: #1866dc;\n background-color: #fff;\n }\n"])));
6728
6766
 
6767
+ var _excluded$g = ["link"];
6768
+
6729
6769
  var PageHeadingStream = function PageHeadingStream(_ref) {
6730
6770
  var link = _ref.link,
6731
- rest = _objectWithoutPropertiesLoose(_ref, ["link"]);
6771
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$g);
6732
6772
 
6733
6773
  var streamLink = link && _extends({}, link, {
6734
6774
  color: Colors.Black,
@@ -6877,7 +6917,7 @@ var CompactHeaderBranding = function CompactHeaderBranding(_ref) {
6877
6917
  var isIOS = function isIOS() {
6878
6918
  try {
6879
6919
  console.warn('Do not use this on server side rendering, it may throw an error.');
6880
- if (typeof navigator === undefined) return false;
6920
+ if (typeof navigator === 'undefined') return false;
6881
6921
  return ['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(navigator.platform) || // iPad on iOS 13 detection
6882
6922
  navigator.userAgent.includes('Mac') && 'ontouchend' in document;
6883
6923
  } catch (e) {
@@ -6893,7 +6933,7 @@ var useIOS = function useIOS() {
6893
6933
  setIOS = _useState[1];
6894
6934
 
6895
6935
  useEffect(function () {
6896
- if (typeof navigator === undefined) return;
6936
+ if (typeof navigator === 'undefined') return;
6897
6937
  setIOS(isIOS());
6898
6938
  }, []);
6899
6939
  return IOS;
@@ -6922,6 +6962,8 @@ var useMobile = function useMobile() {
6922
6962
  return mobile;
6923
6963
  };
6924
6964
 
6965
+ var _excluded$h = ["text"];
6966
+
6925
6967
  var useResponsiveVideo = function useResponsiveVideo(video, poster) {
6926
6968
  var mobileVideo = video.mobile || video.desktop;
6927
6969
  var desktopVideo = video.desktop || video.mobile;
@@ -7036,7 +7078,7 @@ var PageHeadingCompact = function PageHeadingCompact(_ref4) {
7036
7078
 
7037
7079
  var _ref5 = link || {},
7038
7080
  linkText = _ref5.text,
7039
- restLink = _objectWithoutPropertiesLoose(_ref5, ["text"]);
7081
+ restLink = _objectWithoutPropertiesLoose(_ref5, _excluded$h);
7040
7082
 
7041
7083
  var titleSize = title && title.length > 20 ? 4 : 3;
7042
7084
  var video = {
@@ -7212,8 +7254,8 @@ var PeopleListing = function PeopleListing(_ref) {
7212
7254
  var _templateObject$_, _templateObject2$I, _templateObject3$A, _templateObject4$s;
7213
7255
  var ReplacementWrapper = /*#__PURE__*/styled.div(_templateObject$_ || (_templateObject$_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n"])));
7214
7256
  var CreditListingWrapper = /*#__PURE__*/styled(PeopleListingGrid)(_templateObject2$I || (_templateObject2$I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n p {\n line-height: 1.5;\n }\n"])));
7215
- var DescriptionWrapper = /*#__PURE__*/styled.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"])));
7216
- var RoleWrapper$1 = /*#__PURE__*/styled.div(_templateObject4$s || (_templateObject4$s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n overflow-wrap: break-word;\n min-height: 1.5em;\n"])));
7257
+ var DescriptionWrapper = /*#__PURE__*/styled.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"])));
7258
+ var RoleWrapper$1 = /*#__PURE__*/styled.div(_templateObject4$s || (_templateObject4$s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--base-color-darkgrey);\n overflow-wrap: break-word;\n"])));
7217
7259
 
7218
7260
  var getConcatenatedPropLength = function getConcatenatedPropLength(array, prop) {
7219
7261
  return array.reduce(function (acc, item) {
@@ -7224,12 +7266,18 @@ var getConcatenatedPropLength = function getConcatenatedPropLength(array, prop)
7224
7266
  var concatenateMusicTitle = function concatenateMusicTitle(musicTitle) {
7225
7267
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, musicTitle.map(function (title, index) {
7226
7268
  if (musicTitle.length > 1 && index === musicTitle.length - 1) {
7227
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, ' ', "and ", /*#__PURE__*/React__default.createElement("i", null, title));
7269
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, ' ', "and ", /*#__PURE__*/React__default.createElement("i", {
7270
+ key: index
7271
+ }, title));
7228
7272
  } else if (index > 0) {
7229
- return /*#__PURE__*/React__default.createElement("i", null, ", ", title);
7273
+ return /*#__PURE__*/React__default.createElement("i", {
7274
+ key: index
7275
+ }, ", ", title);
7230
7276
  }
7231
7277
 
7232
- return /*#__PURE__*/React__default.createElement("i", null, title);
7278
+ return /*#__PURE__*/React__default.createElement("i", {
7279
+ key: index
7280
+ }, title);
7233
7281
  }));
7234
7282
  };
7235
7283
 
@@ -7281,7 +7329,7 @@ var CreditListing = function CreditListing(_ref) {
7281
7329
  }));
7282
7330
  };
7283
7331
 
7284
- 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;
7332
+ 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;
7285
7333
  var LENGTH_TEXT = 28;
7286
7334
  var LENGTH_TEXT_TABLET$1 = 12;
7287
7335
  var GridTemplateImageToLeft = "'left left left left left left left left . right right right right right . .'";
@@ -7348,7 +7396,7 @@ var ExtraContentWrapper = /*#__PURE__*/styled.div(_templateObject9$4 || (_templa
7348
7396
  var IconWrapper$2 = /*#__PURE__*/styled.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);
7349
7397
  var PrimaryButtonWrapper$2 = /*#__PURE__*/styled.div(_templateObject11$2 || (_templateObject11$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: var(--button-height);\n\n @media ", " {\n width: 100%;\n }\n"])), devices.mobile);
7350
7398
  var MobileTitleWrapper = /*#__PURE__*/styled.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);
7351
- var PromoWithTagsTypeTags = /*#__PURE__*/styled(TypeTags)(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
7399
+ var PromoWithTagsTypeTags = /*#__PURE__*/styled(TypeTags)(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
7352
7400
  var PromoWithTagsHeader = /*#__PURE__*/styled(Header)(_templateObject14 || (_templateObject14 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
7353
7401
  var PromoWithTagsTextLink = /*#__PURE__*/styled(TextLink)(_templateObject15 || (_templateObject15 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
7354
7402
  var asCardOverrides = /*#__PURE__*/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);
@@ -7370,6 +7418,10 @@ var PromoWithTagsContainer = /*#__PURE__*/styled.div(_templateObject19 || (_temp
7370
7418
  var TimerWrapper$1 = /*#__PURE__*/styled.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 32px;\n"])));
7371
7419
  var EndDateText = /*#__PURE__*/styled.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);
7372
7420
 
7421
+ var _excluded$i = ["text"],
7422
+ _excluded2$2 = ["text"],
7423
+ _excluded3 = ["text"];
7424
+
7373
7425
  var _buttonTypeToButton$1;
7374
7426
  var LENGTH_TEXT$1 = 28;
7375
7427
  var LENGTH_TEXT_PARAGRAPH = 130;
@@ -7440,7 +7492,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
7440
7492
  var _ref2 = firstButton || {},
7441
7493
  _ref2$text = _ref2.text,
7442
7494
  firstButtonText = _ref2$text === void 0 ? '' : _ref2$text,
7443
- restFirstButton = _objectWithoutPropertiesLoose(_ref2, ["text"]);
7495
+ restFirstButton = _objectWithoutPropertiesLoose(_ref2, _excluded$i);
7444
7496
 
7445
7497
  var primaryButtonTextTruncate = truncate(firstButtonText, LENGTH_TEXT$1);
7446
7498
  var secondButton = links == null ? void 0 : links[1];
@@ -7448,7 +7500,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
7448
7500
  var _ref3 = secondButton || {},
7449
7501
  _ref3$text = _ref3.text,
7450
7502
  secondButtonText = _ref3$text === void 0 ? '' : _ref3$text,
7451
- restSecondButton = _objectWithoutPropertiesLoose(_ref3, ["text"]);
7503
+ restSecondButton = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);
7452
7504
 
7453
7505
  var secondButtonTextTruncate = truncate(secondButtonText, LENGTH_TEXT$1);
7454
7506
  var textTruncate = asCard ? truncate(text || '', LENGTH_TEXT_PARAGRAPH) : text;
@@ -7457,7 +7509,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
7457
7509
  var textLinkItems = textLinks ? textLinks.map(function (link, index) {
7458
7510
  var _link$text = link.text,
7459
7511
  textLinkText = _link$text === void 0 ? '' : _link$text,
7460
- restTextLink = _objectWithoutPropertiesLoose(link, ["text"]);
7512
+ restTextLink = _objectWithoutPropertiesLoose(link, _excluded3);
7461
7513
 
7462
7514
  return /*#__PURE__*/React__default.createElement(TextLinkWrapper$2, {
7463
7515
  key: index
@@ -7615,6 +7667,8 @@ var ButtonsContainer$3 = /*#__PURE__*/styled.div(_templateObject7$d || (_templat
7615
7667
  return '';
7616
7668
  });
7617
7669
 
7670
+ var _excluded$j = ["text"],
7671
+ _excluded2$3 = ["text"];
7618
7672
  var LENGTH_TEXT$3 = 28;
7619
7673
 
7620
7674
  var PromoWithTitle = function PromoWithTitle(_ref) {
@@ -7640,7 +7694,7 @@ var PromoWithTitle = function PromoWithTitle(_ref) {
7640
7694
  var _ref2 = primaryButton || {},
7641
7695
  _ref2$text = _ref2.text,
7642
7696
  primaryButtonText = _ref2$text === void 0 ? '' : _ref2$text,
7643
- restPrimaryButton = _objectWithoutPropertiesLoose(_ref2, ["text"]);
7697
+ restPrimaryButton = _objectWithoutPropertiesLoose(_ref2, _excluded$j);
7644
7698
 
7645
7699
  var primaryButtonTextTruncate = truncate(primaryButtonText, LENGTH_TEXT$3);
7646
7700
  var tertiaryButton = links == null ? void 0 : links[1];
@@ -7648,7 +7702,7 @@ var PromoWithTitle = function PromoWithTitle(_ref) {
7648
7702
  var _ref3 = tertiaryButton || {},
7649
7703
  _ref3$text = _ref3.text,
7650
7704
  tertiaryButtonText = _ref3$text === void 0 ? '' : _ref3$text,
7651
- restTertiaryButton = _objectWithoutPropertiesLoose(_ref3, ["text"]);
7705
+ restTertiaryButton = _objectWithoutPropertiesLoose(_ref3, _excluded2$3);
7652
7706
 
7653
7707
  var tertiaryButtonTextTruncate = truncate(tertiaryButtonText, LENGTH_TEXT$3);
7654
7708
  return /*#__PURE__*/React__default.createElement(PromoWithTitleGrid, {
@@ -7821,72 +7875,426 @@ var SectionTitle = function SectionTitle(_ref) {
7821
7875
  }, description))));
7822
7876
  };
7823
7877
 
7824
- var _templateObject$14, _templateObject2$M, _templateObject3$E, _templateObject4$v;
7825
- var Container$1 = /*#__PURE__*/styled.div(_templateObject$14 || (_templateObject$14 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n"])));
7826
- var SelectWrapper = /*#__PURE__*/styled.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) {
7827
- var width = _ref.width;
7828
- if (!width) return 'none';
7829
- return width + 'px';
7878
+ var _templateObject$14, _templateObject2$M, _templateObject3$E, _templateObject4$v, _templateObject5$n, _templateObject6$i, _templateObject7$e, _templateObject8$a, _templateObject9$5, _templateObject10$5, _templateObject11$3;
7879
+ var stateStyles = /*#__PURE__*/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) {
7880
+ var theme = _ref.theme;
7881
+ return "3px solid " + theme.colors.lapisLazuli;
7830
7882
  }, function (_ref2) {
7831
- var error = _ref2.error;
7832
- if (error !== undefined) return "1px solid var(--base-color-errorstate)";
7833
- return "1px solid var(--base-color-darkgrey)";
7883
+ var theme = _ref2.theme;
7884
+ return theme.colors.lightgrey;
7834
7885
  }, function (_ref3) {
7835
- var error = _ref3.error;
7836
- if (error !== undefined) return "var(--base-color-errorstate)";
7837
- return "var(--base-color-darkgrey)";
7838
- }, function (_ref4) {
7839
- var darkMode = _ref4.darkMode;
7840
- if (darkMode) return "0 0 0 4px var(--base-color-lemonchiffon)";
7841
- return "0 0 0 3px var(--base-color-lapislazuli)";
7842
- });
7843
- var TextLabel$1 = /*#__PURE__*/styled.p(_templateObject3$E || (_templateObject3$E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0 0 20px;\n color: ", ";\n"])), function (_ref5) {
7844
- var darkMode = _ref5.darkMode;
7845
- if (darkMode) return "var(--base-color-white)";
7846
- return "var(--base-color-black)";
7886
+ var theme = _ref3.theme;
7887
+ return theme.colors.lightgrey;
7847
7888
  });
7848
- var ErrorLabel$1 = /*#__PURE__*/styled.p(_templateObject4$v || (_templateObject4$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 20px 0 0;\n color: ", ";\n"])), function (_ref6) {
7849
- var darkMode = _ref6.darkMode;
7850
- if (darkMode) return "var(--base-color-white)";
7851
- return "var(--base-color-errorstate)";
7889
+ var borderStyles = /*#__PURE__*/css(_templateObject2$M || (_templateObject2$M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 0;\n outline: 1px solid ", ";\n"])), function (_ref4) {
7890
+ var theme = _ref4.theme;
7891
+ return theme.colors.darkgrey;
7852
7892
  });
7893
+ var noMarginAndPaddingStyles = /*#__PURE__*/css(_templateObject3$E || (_templateObject3$E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n"])));
7894
+ var listItemStyles = /*#__PURE__*/css(_templateObject4$v || (_templateObject4$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n list-style: none;\n user-select: none;\n"])));
7895
+ var ArrowIcon = /*#__PURE__*/styled(Icon).attrs(function (_ref5) {
7896
+ var theme = _ref5.theme;
7897
+ return {
7898
+ iconName: 'DropdownArrow',
7899
+ color: theme.colors.black,
7900
+ title: 'Select Arrow'
7901
+ };
7902
+ })(_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"])));
7903
+ var Wrapper$5 = /*#__PURE__*/styled.div(_templateObject6$i || (_templateObject6$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n height: initial;\n\n display: flex;\n flex-direction: column;\n gap: 20px;\n"])), noMarginAndPaddingStyles);
7904
+ var SelectWrapper = /*#__PURE__*/styled.div(_templateObject7$e || (_templateObject7$e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n height: inherit;\n"])), noMarginAndPaddingStyles);
7905
+ var Options = /*#__PURE__*/styled.div(_templateObject8$a || (_templateObject8$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n z-index: 1;\n\n ", "\n ", "\n"])), noMarginAndPaddingStyles, borderStyles);
7906
+ var Option = /*#__PURE__*/styled.li(_templateObject9$5 || (_templateObject9$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n ", "\n\n ", "\n"])), noMarginAndPaddingStyles, listItemStyles, function (_ref6) {
7907
+ var theme = _ref6.theme,
7908
+ hover = _ref6.hover;
7909
+ var _theme$colors = theme.colors,
7910
+ lightgrey = _theme$colors.lightgrey,
7911
+ midgrey = _theme$colors.midgrey;
7912
+ if (hover) return "background-color: " + midgrey;
7913
+ return "\n background-color: " + lightgrey + ";\n &:hover { background-color: " + midgrey + " }\n ";
7914
+ });
7915
+
7916
+ var selectStyles = function selectStyles(width, height) {
7917
+ return 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);
7918
+ };
7853
7919
 
7854
- var DropdownIndicator = function DropdownIndicator(props) {
7855
- return /*#__PURE__*/React__default.createElement(components.DropdownIndicator, Object.assign({}, props), /*#__PURE__*/React__default.createElement(Icon, {
7856
- iconName: 'DropdownArrow'
7857
- }));
7920
+ var SelectList = /*#__PURE__*/styled.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) {
7921
+ var width = _ref7.width,
7922
+ height = _ref7.height;
7923
+ return selectStyles(width === 'default' ? "354px" : width + "px", height === 'default' ? "48px" : height + "px");
7924
+ }, stateStyles, noMarginAndPaddingStyles, listItemStyles, borderStyles, ArrowIcon);
7925
+
7926
+ var useKeyboardAccessibility = function useKeyboardAccessibility(_ref) {
7927
+ var selectRef = _ref.selectRef,
7928
+ optionsRef = _ref.optionsRef,
7929
+ shouldHighlightOption = _ref.shouldHighlightOption;
7930
+
7931
+ var _useState = useState(-1),
7932
+ itemToHighlight = _useState[0],
7933
+ setItemToHighlight = _useState[1];
7934
+
7935
+ var clampIndex = function clampIndex(index) {
7936
+ if (index < -1) return -1;
7937
+ if (index > optionsRef.current.length - 1) return optionsRef.current.length - 1;
7938
+ return index;
7939
+ };
7940
+
7941
+ var highlightNextOption = function highlightNextOption() {
7942
+ return setItemToHighlight(function (prev) {
7943
+ return clampIndex(prev + 1);
7944
+ });
7945
+ };
7946
+
7947
+ var highlightPrevOption = function highlightPrevOption() {
7948
+ return setItemToHighlight(function (prev) {
7949
+ return clampIndex(prev - 1);
7950
+ });
7951
+ };
7952
+
7953
+ var reset = function reset() {
7954
+ var _selectRef$current;
7955
+
7956
+ (_selectRef$current = selectRef.current) == null ? void 0 : _selectRef$current.blur();
7957
+ setItemToHighlight(-1);
7958
+ };
7959
+
7960
+ var handleKeyUp = function handleKeyUp(event) {
7961
+ if (!shouldHighlightOption) return;
7962
+ var shouldHighlightOptionNext = event.key === 'ArrowDown';
7963
+ var shouldHighlightOptionPrev = event.key === 'ArrowUp';
7964
+ if (shouldHighlightOptionNext) return highlightNextOption();
7965
+ if (shouldHighlightOptionPrev) return highlightPrevOption();
7966
+ };
7967
+
7968
+ var preventScrollingWhileNavigating = function preventScrollingWhileNavigating(event) {
7969
+ if (!shouldHighlightOption) return;
7970
+ if (!['ArrowDown', 'ArrowUp'].includes(event.key)) return;
7971
+ event.preventDefault();
7972
+ };
7973
+
7974
+ var handleHighlighted = function handleHighlighted(cb) {
7975
+ return function (event) {
7976
+ if (itemToHighlight === -1) return;
7977
+ if (event.key !== 'Enter') return;
7978
+ cb(itemToHighlight);
7979
+ reset();
7980
+ };
7981
+ };
7982
+
7983
+ useEffect(function () {
7984
+ if (shouldHighlightOption) return;
7985
+ reset();
7986
+ }, [shouldHighlightOption]);
7987
+ return {
7988
+ handleKeyUp: handleKeyUp,
7989
+ preventScrollingWhileNavigating: preventScrollingWhileNavigating,
7990
+ handleHighlighted: handleHighlighted,
7991
+ itemToHighlight: itemToHighlight
7992
+ };
7858
7993
  };
7859
7994
 
7860
- function Select(_ref) {
7861
- var label = _ref.label,
7862
- darkMode = _ref.darkMode,
7863
- width = _ref.width,
7864
- error = _ref.error,
7865
- _ref$isSearchable = _ref.isSearchable,
7866
- isSearchable = _ref$isSearchable === void 0 ? false : _ref$isSearchable,
7867
- selectProps = _objectWithoutPropertiesLoose(_ref, ["label", "darkMode", "width", "error", "isSearchable"]);
7995
+ var useVisualAccessibility = function useVisualAccessibility(_ref2) {
7996
+ var selectRef = _ref2.selectRef,
7997
+ isSelectDisabled = _ref2.isSelectDisabled;
7868
7998
 
7869
- return /*#__PURE__*/React__default.createElement(Container$1, null, /*#__PURE__*/React__default.createElement("label", null, !!label && /*#__PURE__*/React__default.createElement(TextLabel$1, {
7870
- darkMode: darkMode,
7871
- "data-testid": "text-field-text-label"
7872
- }, /*#__PURE__*/React__default.createElement(AltHeader, {
7873
- level: 6
7874
- }, label)), /*#__PURE__*/React__default.createElement(SelectWrapper, {
7875
- width: width,
7876
- error: error
7877
- }, /*#__PURE__*/React__default.createElement(ReactSelect, Object.assign({
7878
- components: {
7879
- DropdownIndicator: DropdownIndicator
7999
+ var addFocusClass = function addFocusClass() {
8000
+ var _selectRef$current2;
8001
+
8002
+ (_selectRef$current2 = selectRef.current) == null ? void 0 : _selectRef$current2.classList.add('focus');
8003
+ };
8004
+
8005
+ var removeFocusClass = function removeFocusClass() {
8006
+ var _selectRef$current3;
8007
+
8008
+ (_selectRef$current3 = selectRef.current) == null ? void 0 : _selectRef$current3.classList.remove('focus');
8009
+ };
8010
+
8011
+ var toggleFocus = function toggleFocus() {
8012
+ var _selectRef$current4;
8013
+
8014
+ if ((_selectRef$current4 = selectRef.current) != null && _selectRef$current4.classList.contains('focus')) removeFocusClass();else addFocusClass();
8015
+ };
8016
+
8017
+ var withClickAwayHandler = function withClickAwayHandler(cb) {
8018
+ return function (event) {
8019
+ if (!selectRef.current) return;
8020
+ if (selectRef.current.contains(event.target)) return;
8021
+ removeFocusClass();
8022
+ cb();
8023
+ };
8024
+ };
8025
+
8026
+ useEffect(function () {
8027
+ if (!selectRef.current) return;
8028
+
8029
+ if (isSelectDisabled) {
8030
+ selectRef.current.classList.add('disabled');
8031
+ } else selectRef.current.classList.remove('disabled');
8032
+ }, [isSelectDisabled]);
8033
+ return {
8034
+ withClickAwayHandler: withClickAwayHandler,
8035
+ toggleFocus: toggleFocus,
8036
+ addFocusClass: addFocusClass,
8037
+ removeFocusClass: removeFocusClass
8038
+ };
8039
+ };
8040
+
8041
+ var useAccessibility = function useAccessibility(props) {
8042
+ var selectRef = props.selectRef;
8043
+
8044
+ var _useKeyboardAccessibi = useKeyboardAccessibility(props),
8045
+ handleKeyUp = _useKeyboardAccessibi.handleKeyUp,
8046
+ preventScrollingWhileNavigating = _useKeyboardAccessibi.preventScrollingWhileNavigating,
8047
+ handleHighlighted = _useKeyboardAccessibi.handleHighlighted,
8048
+ itemToHighlight = _useKeyboardAccessibi.itemToHighlight;
8049
+
8050
+ var _useVisualAccessibili = useVisualAccessibility(props),
8051
+ addFocusClass = _useVisualAccessibili.addFocusClass,
8052
+ removeFocusClass = _useVisualAccessibili.removeFocusClass,
8053
+ toggleFocus = _useVisualAccessibili.toggleFocus,
8054
+ withClickAwayHandler = _useVisualAccessibili.withClickAwayHandler;
8055
+
8056
+ useEffect(function () {
8057
+ if (!selectRef.current) return;
8058
+ selectRef.current.addEventListener('keydown', preventScrollingWhileNavigating);
8059
+ selectRef.current.addEventListener('keyup', handleKeyUp);
8060
+ selectRef.current.addEventListener('click', toggleFocus);
8061
+ selectRef.current.addEventListener('focus', addFocusClass);
8062
+ selectRef.current.addEventListener('blur', removeFocusClass);
8063
+ return function () {
8064
+ var _selectRef$current5, _selectRef$current6, _selectRef$current7, _selectRef$current8, _selectRef$current9;
8065
+
8066
+ (_selectRef$current5 = selectRef.current) == null ? void 0 : _selectRef$current5.removeEventListener('keydown', preventScrollingWhileNavigating);
8067
+ (_selectRef$current6 = selectRef.current) == null ? void 0 : _selectRef$current6.removeEventListener('keyup', handleKeyUp);
8068
+ (_selectRef$current7 = selectRef.current) == null ? void 0 : _selectRef$current7.removeEventListener('click', toggleFocus);
8069
+ (_selectRef$current8 = selectRef.current) == null ? void 0 : _selectRef$current8.removeEventListener('focus', addFocusClass);
8070
+ (_selectRef$current9 = selectRef.current) == null ? void 0 : _selectRef$current9.removeEventListener('blur', removeFocusClass);
8071
+ };
8072
+ });
8073
+ return {
8074
+ withClickAwayHandler: withClickAwayHandler,
8075
+ handleHighlighted: handleHighlighted,
8076
+ itemToHighlight: itemToHighlight
8077
+ };
8078
+ };
8079
+ /**
8080
+ * A select component, created using <ul> and <li> elements, with bespoke accessibility
8081
+ * logic.
8082
+ *
8083
+ * # Usage
8084
+ * ## Defining a component that uses a typical Select element
8085
+ * ```tsx
8086
+ * const MyComponent = () => {
8087
+ * const handleSelect = (value: number, text: string) => {
8088
+ * console.log("Selected", value);
8089
+ * };
8090
+ *
8091
+ * return <>
8092
+ * <Select
8093
+ * label="This is a label"
8094
+ * options={[
8095
+ * { text: "Option 1", value: 1 },
8096
+ * { text: "Option 2", value: 2 },
8097
+ * ]}
8098
+ * onSelect={handleSelect}
8099
+ * />
8100
+ * </>
8101
+ * }
8102
+ * ```
8103
+ *
8104
+ * ## Defining a component that uses a disabled Select element
8105
+ * ```tsx
8106
+ * const MyComponent = () => {
8107
+ * const handleSelect = (value: number, text: string) => {
8108
+ * console.log("Selected", value);
8109
+ * };
8110
+ *
8111
+ * return <>
8112
+ * <Select
8113
+ * disabled // Select component disabled explicitely
8114
+ * label="This is a label"
8115
+ * options={[
8116
+ * { text: "Option 1", value: 1 },
8117
+ * { text: "Option 2", value: 2 },
8118
+ * ]}
8119
+ * onSelect={handleSelect}
8120
+ * />
8121
+ * <Select
8122
+ * label="This is a label"
8123
+ * options={[]} // Select component disabled implicitely by passing an empty array of options
8124
+ * onSelect={handleSelect}
8125
+ * />
8126
+ * </>
8127
+ * }
8128
+ * ```
8129
+ *
8130
+ * ## Defining a component with a non-labelled Select element
8131
+ * ```tsx
8132
+ * const MyComponent = () => {
8133
+ * const handleSelect = (value: number, text: string) => {
8134
+ * console.log("Selected", value);
8135
+ * };
8136
+ *
8137
+ * return <>
8138
+ * <Select
8139
+ * label=""
8140
+ * options={[
8141
+ * { text: "Option 1", value: 1 },
8142
+ * { text: "Option 2", value: 2 },
8143
+ * ]}
8144
+ * onSelect={handleSelect}
8145
+ * />
8146
+ * </>
8147
+ * }
8148
+ * ```
8149
+ *
8150
+ * ## Changing the dimensions of a Select element (px)
8151
+ * ```tsx
8152
+ * const MyComponent = () => {
8153
+ * const handleSelect = (value: number, text: string) => {
8154
+ * console.log("Selected", value);
8155
+ * };
8156
+ *
8157
+ * const selectWidthPx = 100;
8158
+ * const selectHeightPx = 27;
8159
+ *
8160
+ * return <>
8161
+ * <Select
8162
+ * label="This is a label"
8163
+ * options={[
8164
+ * { text: "Option 1", value: 1 },
8165
+ * { text: "Option 2", value: 2 },
8166
+ * ]}
8167
+ * onSelect={handleSelect}
8168
+ * width={selectWidthPx}
8169
+ * height={selectHeightPx}
8170
+ * />
8171
+ * </>
8172
+ * }
8173
+ * ```
8174
+ */
8175
+
8176
+
8177
+ function Select(_ref3) {
8178
+ var _ref4, _selectedValue$text, _options$;
8179
+
8180
+ var label = _ref3.label,
8181
+ options = _ref3.options,
8182
+ onSelect = _ref3.onSelect,
8183
+ _ref3$disabled = _ref3.disabled,
8184
+ disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
8185
+ _ref3$resetWhenOption = _ref3.resetWhenOptionsUpdate,
8186
+ resetWhenOptionsUpdate = _ref3$resetWhenOption === void 0 ? false : _ref3$resetWhenOption,
8187
+ _ref3$width = _ref3.width,
8188
+ width = _ref3$width === void 0 ? 'default' : _ref3$width,
8189
+ _ref3$height = _ref3.height,
8190
+ height = _ref3$height === void 0 ? 'default' : _ref3$height;
8191
+ var selectRef = useRef(null);
8192
+ var optionsRef = useRef([]);
8193
+
8194
+ var _useState2 = useState(null),
8195
+ selectedValue = _useState2[0],
8196
+ setSelectedValue = _useState2[1];
8197
+
8198
+ var _useState3 = useState(false),
8199
+ isOpen = _useState3[0],
8200
+ setIsOpen = _useState3[1];
8201
+
8202
+ var isDisabled = disabled || options.length === 0;
8203
+
8204
+ var _useAccessibility = useAccessibility({
8205
+ selectRef: selectRef,
8206
+ optionsRef: optionsRef,
8207
+ shouldHighlightOption: isOpen,
8208
+ isSelectDisabled: isDisabled
8209
+ }),
8210
+ withClickAwayHandler = _useAccessibility.withClickAwayHandler,
8211
+ handleHighlighted = _useAccessibility.handleHighlighted,
8212
+ itemToHighlight = _useAccessibility.itemToHighlight;
8213
+
8214
+ var openSelect = function openSelect() {
8215
+ return setIsOpen(true);
8216
+ };
8217
+
8218
+ var closeSelect = function closeSelect() {
8219
+ return setIsOpen(false);
8220
+ };
8221
+
8222
+ var toggleSelect = function toggleSelect() {
8223
+ return setIsOpen(function (prev) {
8224
+ return !prev;
8225
+ });
8226
+ };
8227
+
8228
+ var closeSelectOnBlur = withClickAwayHandler(closeSelect);
8229
+
8230
+ var handleOptionSelection = function handleOptionSelection(index) {
8231
+ var option = options[index];
8232
+ setSelectedValue(option);
8233
+ onSelect(option.value, option.text);
8234
+ };
8235
+
8236
+ useEffect(function () {
8237
+ document.addEventListener('click', closeSelectOnBlur, false);
8238
+ return function () {
8239
+ document.removeEventListener('click', closeSelectOnBlur, false);
8240
+ };
8241
+ }, []);
8242
+ useEffect(function () {
8243
+ if (!resetWhenOptionsUpdate) return;
8244
+
8245
+ if (options.length === 0) {
8246
+ setSelectedValue(null);
8247
+ return;
8248
+ }
8249
+
8250
+ setSelectedValue(options[0]);
8251
+ }, [options, resetWhenOptionsUpdate]);
8252
+ return /*#__PURE__*/React__default.createElement(Wrapper$5, null, label !== '' && /*#__PURE__*/React__default.createElement(BodyText, {
8253
+ level: 1,
8254
+ tag: "p",
8255
+ "data-testid": "select-label"
8256
+ }, label), /*#__PURE__*/React__default.createElement(SelectList, {
8257
+ id: "select",
8258
+ ref: selectRef,
8259
+ onClick: toggleSelect,
8260
+ onFocus: openSelect,
8261
+ onBlur: closeSelect,
8262
+ onMouseDown: function onMouseDown(e) {
8263
+ return e.preventDefault();
7880
8264
  },
7881
- isSearchable: isSearchable,
7882
- className: "chord-select-container",
7883
- classNamePrefix: "chord-select"
7884
- }, selectProps)))), !!error && /*#__PURE__*/React__default.createElement(ErrorLabel$1, {
7885
- darkMode: darkMode,
7886
- "data-testid": "text-field-error-label"
7887
- }, /*#__PURE__*/React__default.createElement(AltHeader, {
7888
- level: 6
7889
- }, error)));
8265
+ onKeyUp: handleHighlighted(handleOptionSelection),
8266
+ width: width,
8267
+ height: height,
8268
+ role: "listbox",
8269
+ tabIndex: 0,
8270
+ "aria-labelledby": label,
8271
+ "aria-selected": isOpen,
8272
+ "aria-disabled": isDisabled,
8273
+ "data-testid": "select"
8274
+ }, /*#__PURE__*/React__default.createElement(SelectWrapper, null, /*#__PURE__*/React__default.createElement(BodyText, {
8275
+ level: 1,
8276
+ tag: "p",
8277
+ "data-testid": "selected-value"
8278
+ }, (_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, {
8279
+ "data-testid": "options"
8280
+ }, options.map(function (option, index) {
8281
+ return /*#__PURE__*/React__default.createElement(Option, {
8282
+ ref: function ref(element) {
8283
+ if (!element || optionsRef.current.length === options.length) return;
8284
+ optionsRef.current.push(element);
8285
+ },
8286
+ role: "option",
8287
+ tabIndex: index + 1,
8288
+ hover: index === itemToHighlight,
8289
+ key: option.text,
8290
+ onClick: function onClick() {
8291
+ return handleOptionSelection(index);
8292
+ }
8293
+ }, /*#__PURE__*/React__default.createElement(BodyText, {
8294
+ level: 1,
8295
+ tag: "p"
8296
+ }, option.text));
8297
+ }))), /*#__PURE__*/React__default.createElement(ArrowIcon, null)));
7890
8298
  }
7891
8299
 
7892
8300
  var _templateObject$15;
@@ -7919,7 +8327,7 @@ var TextOnly = function TextOnly(_ref) {
7919
8327
  };
7920
8328
 
7921
8329
  var _templateObject$16, _templateObject2$N;
7922
- var Wrapper$5 = /*#__PURE__*/styled.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) {
8330
+ var Wrapper$6 = /*#__PURE__*/styled.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) {
7923
8331
  var _ref$aspectRatio = _ref.aspectRatio,
7924
8332
  aspectRatio = _ref$aspectRatio === void 0 ? AspectRatio['1:1'] : _ref$aspectRatio;
7925
8333
  return aspectRatio;
@@ -7958,7 +8366,7 @@ var ImageWithCaption = function ImageWithCaption(_ref) {
7958
8366
  return window.removeEventListener('resize', setWrapperHeight);
7959
8367
  };
7960
8368
  }, [wrapperRef]);
7961
- return /*#__PURE__*/React__default.createElement(Wrapper$5, {
8369
+ return /*#__PURE__*/React__default.createElement(Wrapper$6, {
7962
8370
  aspectRatio: aspectRatio,
7963
8371
  ref: wrapperRef,
7964
8372
  height: height
@@ -7997,13 +8405,13 @@ var Quote = function Quote(_ref) {
7997
8405
  }, attribution))));
7998
8406
  };
7999
8407
 
8000
- var _templateObject$18, _templateObject2$P, _templateObject3$G, _templateObject4$w, _templateObject5$n, _templateObject6$i;
8408
+ var _templateObject$18, _templateObject2$P, _templateObject3$G, _templateObject4$w, _templateObject5$o, _templateObject6$j;
8001
8409
  var CardContainer$1 = /*#__PURE__*/styled.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"])));
8002
8410
  var ContentContainer$4 = /*#__PURE__*/styled.div(_templateObject2$P || (_templateObject2$P = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n"])));
8003
8411
  var StyledImage = /*#__PURE__*/styled.img(_templateObject3$G || (_templateObject3$G = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px solid var(--base-color-white);\n"])));
8004
8412
  var ImageWrapper = /*#__PURE__*/styled.div(_templateObject4$w || (_templateObject4$w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n"])));
8005
- var IconWrapper$3 = /*#__PURE__*/styled.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);
8006
- var TitleWrapper$2 = /*#__PURE__*/styled.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);
8413
+ var IconWrapper$3 = /*#__PURE__*/styled.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);
8414
+ var TitleWrapper$2 = /*#__PURE__*/styled.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);
8007
8415
 
8008
8416
  var MiniCard = function MiniCard(_ref) {
8009
8417
  var _ref$title = _ref.title,
@@ -8143,101 +8551,19 @@ var ReadMore = function ReadMore(_ref) {
8143
8551
  }, isFullTextOpen ? "" + hideText : "" + showMoreText)));
8144
8552
  };
8145
8553
 
8146
- var _templateObject$1a, _templateObject2$R, _templateObject3$I, _templateObject4$y;
8147
- var MenuContainer$2 = /*#__PURE__*/styled.menu(_templateObject$1a || (_templateObject$1a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n padding: 0;\n margin: 0;\n"])));
8148
- var MenuList = /*#__PURE__*/styled.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"])), Colors.LightGrey, devices.mobile, devices.mobile, function (_ref) {
8149
- var mobileOpen = _ref.mobileOpen;
8150
- return mobileOpen ? "block" : 'none';
8151
- }, Colors.White, Colors.DarkGrey);
8152
- var MenuItem$1 = /*#__PURE__*/styled.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"])), Colors.Black, function (_ref2) {
8153
- var active = _ref2.active;
8154
- return active ? "var(--base-color-" + Colors.MidGrey + ")" : 'none';
8155
- }, Colors.MidGrey, devices.mobile);
8156
- var MobileButton = /*#__PURE__*/styled.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"])), Colors.Black, Colors.White, Colors.DarkGrey, devices.mobile);
8157
-
8158
- /**
8159
- * Vertical menu component uses for navigation
8160
- * inside website chapter. It looks like a vertical
8161
- * list with clickable items on desktop and dropdown
8162
- * list on mobile.
8163
- *
8164
- * ## Menu items
8165
- * Menu items should be passed as `items` prop. This
8166
- * should be an array of objects. Each object should
8167
- * have `text` (text displayed as a menu item) and
8168
- * `onClick` (click handler function)
8169
- *
8170
- * ## Active menu item
8171
- * Active menu item should be passed as component `activeItem`
8172
- * prop. This indicates on which menu item should be highlighted
8173
- * as active one. Should be equal to `text` prop from one of the `items`
8174
- */
8175
-
8176
- var AuxiliaryNav = function AuxiliaryNav(_ref) {
8177
- var items = _ref.items,
8178
- activeItem = _ref.activeItem;
8179
-
8180
- var _useState = useState(false),
8181
- mobileOpen = _useState[0],
8182
- setMobileOpen = _useState[1];
8183
-
8184
- var containerRef = useRef(null);
8185
-
8186
- var mobileButtonClickHandler = function mobileButtonClickHandler() {
8187
- setMobileOpen(function (prev) {
8188
- return !prev;
8189
- });
8190
- };
8191
-
8192
- var outsideClickHandler = function outsideClickHandler(event) {
8193
- if (containerRef.current && !containerRef.current.contains(event.target)) {
8194
- setMobileOpen(false);
8195
- }
8196
- };
8197
-
8198
- useEffect(function () {
8199
- document.addEventListener('mousedown', outsideClickHandler);
8200
- return function () {
8201
- document.removeEventListener('mousedown', outsideClickHandler);
8202
- };
8203
- }, [containerRef]);
8204
- return /*#__PURE__*/React__default.createElement(MenuContainer$2, {
8205
- ref: containerRef,
8206
- "data-testid": "nav-menu-container"
8207
- }, /*#__PURE__*/React__default.createElement(MobileButton, {
8208
- mobileOpen: mobileOpen,
8209
- onClick: mobileButtonClickHandler,
8210
- "data-testid": "nav-menu-mobile-button"
8211
- }, activeItem, /*#__PURE__*/React__default.createElement(Icon, {
8212
- iconName: "DropdownArrow",
8213
- direction: mobileOpen ? 'left' : 'right'
8214
- })), /*#__PURE__*/React__default.createElement(MenuList, {
8215
- mobileOpen: mobileOpen,
8216
- "data-testid": "nav-menu-list"
8217
- }, items.map(function (item, idx) {
8218
- return /*#__PURE__*/React__default.createElement("li", {
8219
- key: item.text + "-" + idx
8220
- }, /*#__PURE__*/React__default.createElement(MenuItem$1, {
8221
- onClick: item.onClick,
8222
- active: item.text === activeItem,
8223
- "data-testid": "nav-menu-item" + (item.text === activeItem ? '-active' : '')
8224
- }, item.text));
8225
- })));
8226
- };
8227
-
8228
- var _templateObject$1b, _templateObject2$S, _templateObject3$J, _templateObject4$z, _templateObject5$o, _templateObject6$j;
8229
- var Container$2 = /*#__PURE__*/styled.div(_templateObject$1b || (_templateObject$1b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
8230
- var Sections = /*#__PURE__*/styled.div(_templateObject2$S || (_templateObject2$S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n"])));
8231
- var Section = /*#__PURE__*/styled.div(_templateObject3$J || (_templateObject3$J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n height: 2px;\n background-color: ", ";\n"])), function (_ref) {
8554
+ var _templateObject$1a, _templateObject2$R, _templateObject3$I, _templateObject4$y, _templateObject5$p, _templateObject6$k;
8555
+ var Container$1 = /*#__PURE__*/styled.div(_templateObject$1a || (_templateObject$1a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
8556
+ var Sections = /*#__PURE__*/styled.div(_templateObject2$R || (_templateObject2$R = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n"])));
8557
+ var Section = /*#__PURE__*/styled.div(_templateObject3$I || (_templateObject3$I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n height: 2px;\n background-color: ", ";\n"])), function (_ref) {
8232
8558
  var color = _ref.color;
8233
8559
  return "var(--base-color-" + color + ")";
8234
8560
  });
8235
- var BottomLine = /*#__PURE__*/styled.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"])));
8236
- var Text = /*#__PURE__*/styled.div(_templateObject5$o || (_templateObject5$o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n"])), function (_ref2) {
8561
+ var BottomLine = /*#__PURE__*/styled.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"])));
8562
+ var Text = /*#__PURE__*/styled.div(_templateObject5$p || (_templateObject5$p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n"])), function (_ref2) {
8237
8563
  var color = _ref2.color;
8238
8564
  return "var(--base-color-" + color + ")";
8239
8565
  });
8240
- var LabelText = /*#__PURE__*/styled.div(_templateObject6$j || (_templateObject6$j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 1px;\n white-space: nowrap;\n color: ", ";\n"])), function (_ref3) {
8566
+ var LabelText = /*#__PURE__*/styled.div(_templateObject6$k || (_templateObject6$k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 1px;\n white-space: nowrap;\n color: ", ";\n"])), function (_ref3) {
8241
8567
  var color = _ref3.color;
8242
8568
  return "var(--base-color-" + color + ")";
8243
8569
  });
@@ -8298,7 +8624,7 @@ var PasswordStrength = function PasswordStrength(_ref) {
8298
8624
  return index < activeSections ? 'password-strength-section-active' : 'password-strength-section';
8299
8625
  };
8300
8626
 
8301
- return /*#__PURE__*/React__default.createElement(Container$2, {
8627
+ return /*#__PURE__*/React__default.createElement(Container$1, {
8302
8628
  "data-testid": "password-strength-container"
8303
8629
  }, /*#__PURE__*/React__default.createElement(Sections, {
8304
8630
  "data-testid": "password-strength-sections"
@@ -8323,6 +8649,88 @@ var PasswordStrength = function PasswordStrength(_ref) {
8323
8649
  }, strengthLabel))));
8324
8650
  };
8325
8651
 
8652
+ var _templateObject$1b, _templateObject2$S, _templateObject3$J, _templateObject4$z;
8653
+ var MenuContainer$2 = /*#__PURE__*/styled.menu(_templateObject$1b || (_templateObject$1b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n padding: 0;\n margin: 0;\n"])));
8654
+ var MenuList = /*#__PURE__*/styled.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"])), Colors.LightGrey, devices.mobile, devices.mobile, function (_ref) {
8655
+ var mobileOpen = _ref.mobileOpen;
8656
+ return mobileOpen ? "block" : 'none';
8657
+ }, Colors.White, Colors.DarkGrey);
8658
+ var MenuItem$1 = /*#__PURE__*/styled.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"])), Colors.Black, function (_ref2) {
8659
+ var active = _ref2.active;
8660
+ return active ? "var(--base-color-" + Colors.MidGrey + ")" : 'none';
8661
+ }, Colors.MidGrey, devices.mobile);
8662
+ var MobileButton = /*#__PURE__*/styled.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"])), Colors.Black, Colors.White, Colors.DarkGrey, devices.mobile);
8663
+
8664
+ /**
8665
+ * Vertical menu component uses for navigation
8666
+ * inside website chapter. It looks like a vertical
8667
+ * list with clickable items on desktop and dropdown
8668
+ * list on mobile.
8669
+ *
8670
+ * ## Menu items
8671
+ * Menu items should be passed as `items` prop. This
8672
+ * should be an array of objects. Each object should
8673
+ * have `text` (text displayed as a menu item) and
8674
+ * `onClick` (click handler function)
8675
+ *
8676
+ * ## Active menu item
8677
+ * Active menu item should be passed as component `activeItem`
8678
+ * prop. This indicates on which menu item should be highlighted
8679
+ * as active one. Should be equal to `text` prop from one of the `items`
8680
+ */
8681
+
8682
+ var AuxiliaryNav = function AuxiliaryNav(_ref) {
8683
+ var items = _ref.items,
8684
+ activeItem = _ref.activeItem;
8685
+
8686
+ var _useState = useState(false),
8687
+ mobileOpen = _useState[0],
8688
+ setMobileOpen = _useState[1];
8689
+
8690
+ var containerRef = useRef(null);
8691
+
8692
+ var mobileButtonClickHandler = function mobileButtonClickHandler() {
8693
+ setMobileOpen(function (prev) {
8694
+ return !prev;
8695
+ });
8696
+ };
8697
+
8698
+ var outsideClickHandler = function outsideClickHandler(event) {
8699
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
8700
+ setMobileOpen(false);
8701
+ }
8702
+ };
8703
+
8704
+ useEffect(function () {
8705
+ document.addEventListener('mousedown', outsideClickHandler);
8706
+ return function () {
8707
+ document.removeEventListener('mousedown', outsideClickHandler);
8708
+ };
8709
+ }, [containerRef]);
8710
+ return /*#__PURE__*/React__default.createElement(MenuContainer$2, {
8711
+ ref: containerRef,
8712
+ "data-testid": "nav-menu-container"
8713
+ }, /*#__PURE__*/React__default.createElement(MobileButton, {
8714
+ mobileOpen: mobileOpen,
8715
+ onClick: mobileButtonClickHandler,
8716
+ "data-testid": "nav-menu-mobile-button"
8717
+ }, activeItem, /*#__PURE__*/React__default.createElement(Icon, {
8718
+ iconName: "DropdownArrow",
8719
+ direction: mobileOpen ? 'left' : 'right'
8720
+ })), /*#__PURE__*/React__default.createElement(MenuList, {
8721
+ mobileOpen: mobileOpen,
8722
+ "data-testid": "nav-menu-list"
8723
+ }, items.map(function (item, idx) {
8724
+ return /*#__PURE__*/React__default.createElement("li", {
8725
+ key: item.text + "-" + idx
8726
+ }, /*#__PURE__*/React__default.createElement(MenuItem$1, {
8727
+ onClick: item.onClick,
8728
+ active: item.text === activeItem,
8729
+ "data-testid": "nav-menu-item" + (item.text === activeItem ? '-active' : '')
8730
+ }, item.text));
8731
+ })));
8732
+ };
8733
+
8326
8734
  var UpsellSection = function UpsellSection(_ref) {
8327
8735
  var title = _ref.title,
8328
8736
  richText = _ref.richText,
@@ -8447,6 +8855,7 @@ var CloseButton = /*#__PURE__*/styled.button(_templateObject2$U || (_templateObj
8447
8855
  var ContentWrapper$1 = /*#__PURE__*/styled.div(_templateObject3$K || (_templateObject3$K = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
8448
8856
  var Overlay = /*#__PURE__*/styled(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"])));
8449
8857
 
8858
+ var _excluded$k = ["isOpen", "setIsOpen", "children", "appElementId"];
8450
8859
  var MAX_Z_INDEX = 9999999999;
8451
8860
 
8452
8861
  if (Modal.defaultStyles.content) {
@@ -8523,7 +8932,7 @@ var ModalWindow = function ModalWindow(_ref) {
8523
8932
  setIsOpen = _ref.setIsOpen,
8524
8933
  children = _ref.children,
8525
8934
  appElementId = _ref.appElementId,
8526
- modalProps = _objectWithoutPropertiesLoose(_ref, ["isOpen", "setIsOpen", "children", "appElementId"]);
8935
+ modalProps = _objectWithoutPropertiesLoose(_ref, _excluded$k);
8527
8936
 
8528
8937
  var isMobile = useMobile();
8529
8938
  var customStyles = {