@thecb/components 7.8.3-beta.2 → 7.8.3

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/index.d.ts CHANGED
@@ -259,6 +259,7 @@ interface ClusterProps {
259
259
  justifySelf?: string;
260
260
  alignSelf?: string;
261
261
  flexGrow?: string;
262
+ innerWrapperAs?: string;
262
263
  }
263
264
 
264
265
  declare const Cluster: React.FC<Expand<ClusterProps> &
package/dist/index.esm.js CHANGED
@@ -6665,7 +6665,7 @@ var ClusterInnerWrapper = styled.div.withConfig({
6665
6665
  return childGap;
6666
6666
  });
6667
6667
 
6668
- var _excluded$6 = ["justify", "align", "childGap", "minHeight", "minWidth", "nowrap", "overflow", "justifySelf", "alignSelf", "flexGrow", "extraStyles", "children"];
6668
+ var _excluded$6 = ["justify", "align", "childGap", "minHeight", "minWidth", "nowrap", "overflow", "justifySelf", "alignSelf", "flexGrow", "extraStyles", "children", "innerWrapperAs"];
6669
6669
  /*
6670
6670
  Cluster components suit any groups of elements that differ in
6671
6671
  length and are liable to wrap. Buttons that appear together at the
@@ -6689,6 +6689,8 @@ var Cluster = function Cluster(_ref) {
6689
6689
  flexGrow = _ref.flexGrow,
6690
6690
  extraStyles = _ref.extraStyles,
6691
6691
  children = _ref.children,
6692
+ _ref$innerWrapperAs = _ref.innerWrapperAs,
6693
+ innerWrapperAs = _ref$innerWrapperAs === void 0 ? "div" : _ref$innerWrapperAs,
6692
6694
  rest = _objectWithoutProperties(_ref, _excluded$6);
6693
6695
 
6694
6696
  return /*#__PURE__*/React.createElement(ClusterWrapper, _extends({
@@ -6704,7 +6706,8 @@ var Cluster = function Cluster(_ref) {
6704
6706
  childGap: childGap,
6705
6707
  minHeight: minHeight,
6706
6708
  minWidth: minWidth,
6707
- $nowrap: nowrap
6709
+ $nowrap: nowrap,
6710
+ as: innerWrapperAs
6708
6711
  }, safeChildren(children, /*#__PURE__*/React.createElement(Fragment$1, null))));
6709
6712
  };
6710
6713
 
@@ -46550,6 +46553,7 @@ var PrevNextPlaceholder = function PrevNextPlaceholder(_ref) {
46550
46553
 
46551
46554
  var PrevNextButton = function PrevNextButton(_ref2) {
46552
46555
  var action = _ref2.action,
46556
+ ariaLabel = _ref2.ariaLabel,
46553
46557
  arrowColor = _ref2.arrowColor,
46554
46558
  borderRadius = _ref2.borderRadius,
46555
46559
  buttonHeight = _ref2.buttonHeight,
@@ -46559,12 +46563,14 @@ var PrevNextButton = function PrevNextButton(_ref2) {
46559
46563
  return /*#__PURE__*/React.createElement(Box, {
46560
46564
  padding: "0",
46561
46565
  minHeight: buttonHeight,
46562
- extraStyles: "max-height: ".concat(buttonHeight, ";")
46566
+ extraStyles: "max-height: ".concat(buttonHeight, ";"),
46567
+ as: "li"
46563
46568
  }, /*#__PURE__*/React.createElement(ButtonWithAction, {
46564
46569
  action: action,
46565
46570
  contentOverride: true,
46566
46571
  dataQa: type,
46567
- extraStyles: "\n background-color: ".concat(numberColor, ";\n border-color: ").concat(numberColor, ";\n border-radius: ").concat(borderRadius, ";\n margin: 0;\n max-height: ").concat(buttonHeight, ";\n min-height: 100%;\n min-width: ").concat(buttonWidth, ";\n padding: 0;\n &:focus {\n outline: none\n }\n ")
46572
+ "aria-label": ariaLabel,
46573
+ extraStyles: "\n background-color: ".concat(numberColor, ";\n border-color: ").concat(numberColor, ";\n border-radius: ").concat(borderRadius, ";\n margin: 0;\n max-height: ").concat(buttonHeight, ";\n min-height: 100%;\n min-width: ").concat(buttonWidth, ";\n padding: 0;\n ")
46568
46574
  }, /*#__PURE__*/React.createElement(Box, {
46569
46575
  padding: "0",
46570
46576
  extraStyles: type === "prev" && "transform: scaleX(-1)"
@@ -46588,26 +46594,30 @@ var getPagesPanel = function getPagesPanel(page, pagesCount) {
46588
46594
 
46589
46595
  if (page > space + 1) {
46590
46596
  pages.push({
46591
- isDelimiter: true
46597
+ isDelimiter: true,
46598
+ id: "first-delimiter"
46592
46599
  });
46593
46600
  }
46594
46601
 
46595
46602
  for (var j = Math.max(1, page - space) + 1; j < Math.min(lastPageNumber, page + space); j++) {
46596
46603
  pages.push({
46597
46604
  index: j,
46598
- isButton: true
46605
+ isButton: true,
46606
+ id: "page-".concat(j)
46599
46607
  });
46600
46608
  }
46601
46609
 
46602
46610
  if (page < lastPageNumber - space) {
46603
46611
  pages.push({
46604
- isDelimiter: true
46612
+ isDelimiter: true,
46613
+ id: "last-delimiter"
46605
46614
  });
46606
46615
  }
46607
46616
 
46608
46617
  pages.push({
46609
46618
  index: lastPageNumber,
46610
- isButton: true
46619
+ isButton: true,
46620
+ id: "page-".concat(lastPageNumber)
46611
46621
  });
46612
46622
  var activePage = pages.find(function (p) {
46613
46623
  return p.index === page;
@@ -46642,18 +46652,26 @@ var Pagination = function Pagination(_ref3) {
46642
46652
  pageNext = _ref3.pageNext,
46643
46653
  pagePrevious = _ref3.pagePrevious,
46644
46654
  setCurrentPage = _ref3.setCurrentPage,
46655
+ ariaLabel = _ref3.ariaLabel,
46645
46656
  themeValues = _ref3.themeValues;
46646
46657
 
46647
46658
  var _useContext = useContext(ThemeContext),
46648
46659
  isMobile = _useContext.isMobile;
46649
46660
 
46650
- var extraStyles = "\n min-width: ".concat(buttonWidth, "; min-height: 100%; padding: 0;\n border-radius: ").concat(borderRadius, ";\n &:hover, &:focus {\n text-decoration: none;\n > * > span {\n text-decoration: none;\n }\n }\n > * > span {\n color: ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor, "\n }\n margin: 0;\n &:hover {\n background-color: ").concat(themeValues.hoverBackgroundColor, "\n }\n &:focus {\n outline: none\n }\n ");
46651
- var extraDisabledStyles = "\n border: ".concat(activeBorderWidth, " solid ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor, ";\n color: ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.activeColor, ";\n background-color: ").concat(themeValues.activeBackgroundColor, ";\n &:focus {\n box-shadow: none;\n }\n &:hover {\n background-color: initial;\n }\n ");
46661
+ var extraStyles = "\n min-width: ".concat(buttonWidth, "; min-height: 100%; padding: 0;\n border-radius: ").concat(borderRadius, ";\n &:hover, &:focus {\n text-decoration: none;\n > * > span {\n text-decoration: none;\n }\n }\n > * > span {\n color: ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor, "\n }\n margin: 0;\n &:hover {\n background-color: ").concat(themeValues.hoverBackgroundColor, "\n }\n ");
46662
+ var currentPageStyles = "\n border: ".concat(activeBorderWidth, " solid ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor, ";\n color: ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.activeColor, ";\n background-color: ").concat(themeValues.activeBackgroundColor, ";\n &:focus {\n box-shadow: none;\n }\n &:hover {\n background-color: initial;\n border: ").concat(activeBorderWidth, " solid ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor, ";\n background-color: ").concat(themeValues.activeBackgroundColor, ";\n }\n ");
46652
46663
  return /*#__PURE__*/React.createElement(Cluster, {
46653
46664
  justify: "center",
46654
- childGap: childGap
46665
+ childGap: childGap,
46666
+ overflow: true,
46667
+ as: "nav",
46668
+ role: "navigation",
46669
+ innerWrapperAs: "ul",
46670
+ "aria-label": ariaLabel,
46671
+ extraStyles: "> ul { padding: 0px; > li { list-style-type: none; } };"
46655
46672
  }, currentPage > 1 ? /*#__PURE__*/React.createElement(PrevNextButton, {
46656
46673
  action: pagePrevious,
46674
+ ariaLabel: "Previous Page",
46657
46675
  arrowColor: arrowColor !== null && arrowColor !== void 0 ? arrowColor : themeValues.arrowColor,
46658
46676
  borderRadius: borderRadius,
46659
46677
  buttonHeight: buttonHeight,
@@ -46675,33 +46693,37 @@ var Pagination = function Pagination(_ref3) {
46675
46693
  }, "".concat(currentPage, " of ").concat(pageCount)))) : getPagesPanel(currentPage, pageCount).map(function (item, index) {
46676
46694
  return item.isButton ? /*#__PURE__*/React.createElement(Box, {
46677
46695
  padding: "0",
46678
- extraStyles: "max-height: ".concat(buttonHeight, ";")
46696
+ extraStyles: "max-height: ".concat(buttonHeight, ";"),
46697
+ as: "li",
46698
+ key: item.id
46679
46699
  }, /*#__PURE__*/React.createElement(ButtonWithAction, {
46680
46700
  variant: "ghost",
46681
- key: item.index,
46682
46701
  text: item.index,
46683
- disabled: item.active,
46684
- extraDisabledStyles: extraDisabledStyles,
46702
+ "aria-current": item.active ? "page" : undefined,
46703
+ "aria-label": "".concat(item.index == pageCount ? "Last Page, " : "", "page ").concat(item.index),
46685
46704
  action: !item.active ? function () {
46686
46705
  return setCurrentPage({
46687
46706
  pageNumber: item.index
46688
46707
  });
46689
46708
  } : noop,
46690
46709
  textExtraStyles: "font-size: ".concat(fontSize, "; font-weight: ").concat(fontWeight, ";"),
46691
- extraStyles: extraStyles,
46710
+ extraStyles: "".concat(extraStyles).concat(item.active ? currentPageStyles : ""),
46692
46711
  dataQa: index
46693
46712
  }, item.index)) : /*#__PURE__*/React.createElement(Box, {
46694
- padding: "0 10px"
46713
+ padding: "0 10px",
46714
+ as: "li",
46715
+ key: item.id
46695
46716
  }, /*#__PURE__*/React.createElement(Cluster, {
46696
46717
  justify: "flex-end"
46697
46718
  }, /*#__PURE__*/React.createElement(Text$1, {
46698
- key: index,
46699
46719
  variant: "pXL",
46700
46720
  weight: fontWeight,
46701
- color: numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor
46702
- }, "...")));
46721
+ color: numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor,
46722
+ role: "presentation"
46723
+ }, "…")));
46703
46724
  }), currentPage < pageCount ? /*#__PURE__*/React.createElement(PrevNextButton, {
46704
46725
  action: pageNext,
46726
+ ariaLabel: "Next Page",
46705
46727
  arrowColor: arrowColor !== null && arrowColor !== void 0 ? arrowColor : themeValues.arrowColor,
46706
46728
  borderRadius: borderRadius,
46707
46729
  buttonHeight: buttonHeight,
@@ -47121,101 +47143,6 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
47121
47143
 
47122
47144
  var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$L, "default");
47123
47145
 
47124
- var backgroundColor$c = {
47125
- "default": "#ffffff",
47126
- footer: "#ffffff"
47127
- };
47128
- var linkColor$6 = {
47129
- "default": "#3176AA",
47130
- footer: "#ffffff"
47131
- };
47132
- var border$3 = {
47133
- "default": "#cdcdcd",
47134
- footer: "#cdcdcd"
47135
- };
47136
- var fontSize$b = {
47137
- "default": "1rem",
47138
- footer: "0.875rem"
47139
- };
47140
- var lineHeight$5 = {
47141
- "default": "1.5rem",
47142
- footer: "1.25rem"
47143
- };
47144
- var fontWeight$8 = {
47145
- "default": FONT_WEIGHT_REGULAR,
47146
- footer: FONT_WEIGHT_SEMIBOLD
47147
- };
47148
- var standardInteractionStyles = "\n &:hover {\n outline: none; \n text-decoration: underline;\n }\n &:focus {\n outline: 3px solid #3181E3;\n outline-offset: 2px;\n }\n";
47149
- var modalLinkHoverFocus$2 = {
47150
- "default": standardInteractionStyles,
47151
- footer: standardInteractionStyles
47152
- };
47153
- var fallbackValues$M = {
47154
- backgroundColor: backgroundColor$c,
47155
- linkColor: linkColor$6,
47156
- border: border$3,
47157
- fontSize: fontSize$b,
47158
- lineHeight: lineHeight$5,
47159
- fontWeight: fontWeight$8,
47160
- modalLinkHoverFocus: modalLinkHoverFocus$2
47161
- };
47162
-
47163
- var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47164
- var link = _ref.link,
47165
- _ref$title = _ref.title,
47166
- title = _ref$title === void 0 ? "Terms & Conditions" : _ref$title,
47167
- isOpen = _ref.isOpen,
47168
- toggleOpen = _ref.toggleOpen,
47169
- toggleAccepted = _ref.toggleAccepted,
47170
- acceptText = _ref.acceptText,
47171
- terms = _ref.terms,
47172
- variant = _ref.variant,
47173
- _ref$linkVariant = _ref.linkVariant,
47174
- linkVariant = _ref$linkVariant === void 0 ? "p" : _ref$linkVariant,
47175
- themeValues = _ref.themeValues;
47176
- return /*#__PURE__*/React.createElement(Modal$1, {
47177
- modalOpen: isOpen,
47178
- hideModal: function hideModal() {
47179
- return toggleOpen(false);
47180
- },
47181
- showModal: function showModal() {
47182
- return toggleOpen(true);
47183
- },
47184
- modalHeaderText: title,
47185
- modalBodyText: /*#__PURE__*/React.createElement(Box, {
47186
- background: themeValues.backgroundColor,
47187
- border: "1px solid ".concat(themeValues.border),
47188
- borderRadius: "3px",
47189
- extraStyles: "overflow: scroll; max-height: 20rem;"
47190
- }, /*#__PURE__*/React.createElement(Text$1, {
47191
- variant: "p",
47192
- extraStyles: "& a { text-decoration: underline; }"
47193
- }, terms)),
47194
- defaultWrapper: false,
47195
- onlyCloseButton: !acceptText,
47196
- continueButtonText: acceptText,
47197
- continueAction: function continueAction() {
47198
- toggleAccepted(true);
47199
- toggleOpen(false);
47200
- }
47201
- }, /*#__PURE__*/React.createElement(Text$1, {
47202
- variant: linkVariant,
47203
- onClick: function onClick() {
47204
- return toggleOpen(true);
47205
- },
47206
- onKeyPress: function onKeyPress(e) {
47207
- return e.key === "Enter" && toggleOpen(true);
47208
- },
47209
- tabIndex: "0",
47210
- color: themeValues.linkColor,
47211
- weight: themeValues.fontWeight,
47212
- hoverStyles: themeValues.modalLinkHoverFocus,
47213
- extraStyles: "display: inline-block; width: fit-content; cursor: pointer"
47214
- }, link));
47215
- };
47216
-
47217
- var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$M, "default");
47218
-
47219
47146
  var PaymentFormACH = function PaymentFormACH(_ref) {
47220
47147
  var _routingNumberErrors, _accountNumberErrors;
47221
47148
 
@@ -47234,10 +47161,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
47234
47161
  handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
47235
47162
  showWalletCheckbox = _ref.showWalletCheckbox,
47236
47163
  saveToWallet = _ref.saveToWallet,
47237
- walletCheckboxMarked = _ref.walletCheckboxMarked,
47238
- termsContent = _ref.termsContent,
47239
- _ref$termsTitle = _ref.termsTitle,
47240
- termsTitle = _ref$termsTitle === void 0 ? "Terms &amp; Conditions" : _ref$termsTitle;
47164
+ walletCheckboxMarked = _ref.walletCheckboxMarked;
47241
47165
 
47242
47166
  if (clearOnDismount) {
47243
47167
  useEffect$1(function () {
@@ -47257,14 +47181,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
47257
47181
  showAccount = _useState4[0],
47258
47182
  toggleShowAccount = _useState4[1];
47259
47183
 
47260
- var _useState5 = useState(false),
47261
- _useState6 = _slicedToArray(_useState5, 2),
47262
- termsModalOpen = _useState6[0],
47263
- setTermsModalOpen = _useState6[1];
47264
-
47265
- var showTerms = !!termsContent;
47266
- var showTermsLinkVariant = showWalletCheckbox ? "p" : "pS";
47267
-
47268
47184
  var nameErrors = _defineProperty({}, required.error, "Name is required");
47269
47185
 
47270
47186
  var routingNumberErrors = (_routingNumberErrors = {}, _defineProperty(_routingNumberErrors, required.error, "Routing number is required"), _defineProperty(_routingNumberErrors, hasLength.error, "Routing number must be 9 digits"), _defineProperty(_routingNumberErrors, isRoutingNumber.error, "Invalid routing number"), _routingNumberErrors);
@@ -47373,27 +47289,12 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
47373
47289
  onChange: toggleCheckbox,
47374
47290
  checked: defaultMethod.value,
47375
47291
  hidden: hideDefaultPayment
47376
- }), (showWalletCheckbox || showTerms) && /*#__PURE__*/React.createElement(Cluster, {
47377
- childGap: "4px"
47378
- }, showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
47292
+ }), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
47379
47293
  name: "bank checkbox",
47380
- title: "Save checking account to wallet.",
47294
+ title: "Save checking account to wallet",
47381
47295
  checked: walletCheckboxMarked,
47382
47296
  onChange: saveToWallet
47383
- }), showTerms && /*#__PURE__*/React.createElement(Cover, {
47384
- singleChild: true
47385
- }, /*#__PURE__*/React.createElement(Cluster, {
47386
- childGap: 0
47387
- }, /*#__PURE__*/React.createElement(Text$1, {
47388
- variant: showTermsLinkVariant
47389
- }, "View\xA0"), /*#__PURE__*/React.createElement(TermsAndConditionsModal$1, {
47390
- link: termsTitle,
47391
- linkVariant: showTermsLinkVariant,
47392
- terms: termsContent,
47393
- title: termsTitle,
47394
- isOpen: termsModalOpen,
47395
- toggleOpen: setTermsModalOpen
47396
- }))))));
47297
+ })));
47397
47298
  };
47398
47299
 
47399
47300
  var formConfig$6 = {
@@ -47447,21 +47348,11 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
47447
47348
  showWalletCheckbox = _ref.showWalletCheckbox,
47448
47349
  saveToWallet = _ref.saveToWallet,
47449
47350
  walletCheckboxMarked = _ref.walletCheckboxMarked,
47450
- deniedCards = _ref.deniedCards,
47451
- termsContent = _ref.termsContent,
47452
- _ref$termsTitle = _ref.termsTitle,
47453
- termsTitle = _ref$termsTitle === void 0 ? "Terms &amp; Conditions" : _ref$termsTitle;
47351
+ deniedCards = _ref.deniedCards;
47454
47352
 
47455
47353
  var _useContext = useContext(ThemeContext),
47456
47354
  isMobile = _useContext.isMobile;
47457
47355
 
47458
- var _useState = useState(false),
47459
- _useState2 = _slicedToArray(_useState, 2),
47460
- termsModalOpen = _useState2[0],
47461
- setTermsModalOpen = _useState2[1];
47462
-
47463
- var showTerms = !!termsContent;
47464
- var showTermsLinkVariant = showWalletCheckbox ? "p" : "pS";
47465
47356
  useEffect$1(function () {
47466
47357
  if (deniedCards) {
47467
47358
  deniedCards.map(function (card) {
@@ -47570,27 +47461,12 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
47570
47461
  return e.key === "Enter" && handleSubmit(e);
47571
47462
  },
47572
47463
  autocomplete: "billing postal-code"
47573
- })), (showWalletCheckbox || showTerms) && /*#__PURE__*/React.createElement(Cluster, {
47574
- childGap: "4px"
47575
- }, showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
47464
+ })), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
47576
47465
  name: "credit card checkbox",
47577
- title: "Save credit card to wallet.",
47466
+ title: "Save credit card to wallet",
47578
47467
  checked: walletCheckboxMarked,
47579
47468
  onChange: saveToWallet
47580
- }), showTerms && /*#__PURE__*/React.createElement(Cover, {
47581
- singleChild: true
47582
- }, /*#__PURE__*/React.createElement(Cluster, {
47583
- childGap: 0
47584
- }, /*#__PURE__*/React.createElement(Text$1, {
47585
- variant: showTermsLinkVariant
47586
- }, "View\xA0"), /*#__PURE__*/React.createElement(TermsAndConditionsModal$1, {
47587
- link: termsTitle,
47588
- linkVariant: showTermsLinkVariant,
47589
- terms: termsContent,
47590
- title: termsTitle,
47591
- isOpen: termsModalOpen,
47592
- toggleOpen: setTermsModalOpen
47593
- }))))));
47469
+ })));
47594
47470
  };
47595
47471
 
47596
47472
  var PaymentFormCard$1 = withWindowSize(PaymentFormCard);
@@ -47871,7 +47747,7 @@ var headingDisabledColor = "".concat(ATHENS_GREY);
47871
47747
  var bodyBackgroundColor$1 = "#eeeeee";
47872
47748
  var borderColor$5 = "".concat(GREY_CHATEAU);
47873
47749
  var focusStyles = "outline: none;";
47874
- var fallbackValues$N = {
47750
+ var fallbackValues$M = {
47875
47751
  headingBackgroundColor: headingBackgroundColor$1,
47876
47752
  headingDisabledColor: headingDisabledColor,
47877
47753
  bodyBackgroundColor: bodyBackgroundColor$1,
@@ -48059,7 +47935,7 @@ var RadioSection = function RadioSection(_ref) {
48059
47935
  })));
48060
47936
  };
48061
47937
 
48062
- var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$N);
47938
+ var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$M);
48063
47939
 
48064
47940
  var RegistrationForm = function RegistrationForm(_ref) {
48065
47941
  var _emailErrorMessages, _passwordErrorMessage;
@@ -48356,7 +48232,7 @@ var ResetPasswordSuccess = withWindowSize(ResetConfirmationForm$2);
48356
48232
  var activeTabBackground = "#FFFFFF";
48357
48233
  var activeTabAccent = "#15749D";
48358
48234
  var activeTabHover = "#B8D5E1";
48359
- var fallbackValues$O = {
48235
+ var fallbackValues$N = {
48360
48236
  activeTabBackground: activeTabBackground,
48361
48237
  activeTabAccent: activeTabAccent,
48362
48238
  activeTabHover: activeTabHover
@@ -48435,12 +48311,12 @@ var Tabs = function Tabs(_ref) {
48435
48311
  }))));
48436
48312
  };
48437
48313
 
48438
- var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$O);
48314
+ var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$N);
48439
48315
 
48440
48316
  var activeTabBackground$1 = "#FFFFFF";
48441
48317
  var activeTabAccent$1 = "#15749D";
48442
48318
  var activeTabHover$1 = "#B8D5E1";
48443
- var fallbackValues$P = {
48319
+ var fallbackValues$O = {
48444
48320
  activeTabBackground: activeTabBackground$1,
48445
48321
  activeTabAccent: activeTabAccent$1,
48446
48322
  activeTabHover: activeTabHover$1
@@ -48496,7 +48372,100 @@ var TabSidebar = function TabSidebar(_ref) {
48496
48372
  })));
48497
48373
  };
48498
48374
 
48499
- var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$P);
48375
+ var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$O);
48376
+
48377
+ var backgroundColor$c = {
48378
+ "default": "#ffffff",
48379
+ footer: "#ffffff"
48380
+ };
48381
+ var linkColor$6 = {
48382
+ "default": "#3176AA",
48383
+ footer: "#ffffff"
48384
+ };
48385
+ var border$3 = {
48386
+ "default": "#cdcdcd",
48387
+ footer: "#cdcdcd"
48388
+ };
48389
+ var fontSize$b = {
48390
+ "default": "1rem",
48391
+ footer: "0.875rem"
48392
+ };
48393
+ var lineHeight$5 = {
48394
+ "default": "1.5rem",
48395
+ footer: "1.25rem"
48396
+ };
48397
+ var fontWeight$8 = {
48398
+ "default": FONT_WEIGHT_REGULAR,
48399
+ footer: FONT_WEIGHT_SEMIBOLD
48400
+ };
48401
+ var standardInteractionStyles = "\n &:hover {\n outline: none; \n text-decoration: underline;\n }\n &:focus {\n outline: 3px solid #3181E3;\n outline-offset: 2px;\n }\n";
48402
+ var modalLinkHoverFocus$2 = {
48403
+ "default": standardInteractionStyles,
48404
+ footer: standardInteractionStyles
48405
+ };
48406
+ var fallbackValues$P = {
48407
+ backgroundColor: backgroundColor$c,
48408
+ linkColor: linkColor$6,
48409
+ border: border$3,
48410
+ fontSize: fontSize$b,
48411
+ lineHeight: lineHeight$5,
48412
+ fontWeight: fontWeight$8,
48413
+ modalLinkHoverFocus: modalLinkHoverFocus$2
48414
+ };
48415
+
48416
+ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
48417
+ var link = _ref.link,
48418
+ _ref$title = _ref.title,
48419
+ title = _ref$title === void 0 ? "Terms & Conditions" : _ref$title,
48420
+ isOpen = _ref.isOpen,
48421
+ toggleOpen = _ref.toggleOpen,
48422
+ toggleAccepted = _ref.toggleAccepted,
48423
+ acceptText = _ref.acceptText,
48424
+ terms = _ref.terms,
48425
+ variant = _ref.variant,
48426
+ themeValues = _ref.themeValues;
48427
+ return /*#__PURE__*/React.createElement(Modal$1, {
48428
+ modalOpen: isOpen,
48429
+ hideModal: function hideModal() {
48430
+ return toggleOpen(false);
48431
+ },
48432
+ showModal: function showModal() {
48433
+ return toggleOpen(true);
48434
+ },
48435
+ modalHeaderText: title,
48436
+ modalBodyText: /*#__PURE__*/React.createElement(Box, {
48437
+ background: themeValues.backgroundColor,
48438
+ border: "1px solid ".concat(themeValues.border),
48439
+ borderRadius: "3px",
48440
+ extraStyles: "overflow: scroll; max-height: 20rem;"
48441
+ }, /*#__PURE__*/React.createElement(Text$1, {
48442
+ variant: "p",
48443
+ extraStyles: "& a { text-decoration: underline; }"
48444
+ }, terms)),
48445
+ defaultWrapper: false,
48446
+ onlyCloseButton: !acceptText,
48447
+ continueButtonText: acceptText,
48448
+ continueAction: function continueAction() {
48449
+ toggleAccepted(true);
48450
+ toggleOpen(false);
48451
+ }
48452
+ }, /*#__PURE__*/React.createElement(Text$1, {
48453
+ variant: variant === "default" ? "pS" : "pXS",
48454
+ onClick: function onClick() {
48455
+ return toggleOpen(true);
48456
+ },
48457
+ onKeyPress: function onKeyPress(e) {
48458
+ return e.key === "Enter" && toggleOpen(true);
48459
+ },
48460
+ tabIndex: "0",
48461
+ color: themeValues.linkColor,
48462
+ weight: themeValues.fontWeight,
48463
+ hoverStyles: themeValues.modalLinkHoverFocus,
48464
+ extraStyles: "display: inline-block; width: fit-content;"
48465
+ }, link));
48466
+ };
48467
+
48468
+ var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$P, "default");
48500
48469
 
48501
48470
  var TermsAndConditions = function TermsAndConditions(_ref) {
48502
48471
  var onCheck = _ref.onCheck,
@@ -48504,8 +48473,7 @@ var TermsAndConditions = function TermsAndConditions(_ref) {
48504
48473
  html = _ref.html,
48505
48474
  terms = _ref.terms,
48506
48475
  _ref$error = _ref.error,
48507
- error = _ref$error === void 0 ? false : _ref$error,
48508
- linkVariant = _ref.linkVariant;
48476
+ error = _ref$error === void 0 ? false : _ref$error;
48509
48477
 
48510
48478
  var _useState = useState(false),
48511
48479
  _useState2 = _slicedToArray(_useState, 2),
@@ -48526,8 +48494,7 @@ var TermsAndConditions = function TermsAndConditions(_ref) {
48526
48494
  link: "Learn More",
48527
48495
  terms: terms,
48528
48496
  isOpen: showTerms,
48529
- toggleOpen: toggleShowTerms,
48530
- linkVariant: linkVariant
48497
+ toggleOpen: toggleShowTerms
48531
48498
  })))));
48532
48499
  };
48533
48500