@thecb/components 11.11.0-beta.5 → 11.11.0-beta.7

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.cjs.js CHANGED
@@ -26304,7 +26304,7 @@ var FormattedAddress = function FormattedAddress(_ref) {
26304
26304
  var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$n, "default");
26305
26305
 
26306
26306
  var textColor$1 = "".concat(CHARADE_GREY);
26307
- var autopayTextColor = "".concat(REGENT_GREY);
26307
+ var autopayTextColor = "".concat(SEA_GREEN);
26308
26308
  var fallbackValues$o = {
26309
26309
  textColor: textColor$1,
26310
26310
  autopayTextColor: autopayTextColor
@@ -26340,8 +26340,8 @@ var FormattedBankAccount = function FormattedBankAccount(_ref2) {
26340
26340
  }, "Savings Account ending in ", lastFour), autoPay && /*#__PURE__*/React__default.createElement(Text$1, {
26341
26341
  variant: "p",
26342
26342
  color: themeValues.autopayTextColor,
26343
- extraStyles: "font-style: italic;"
26344
- }, "Autopay Enabled")));
26343
+ extraStyles: "font-style: italic; font-size: .75rem;"
26344
+ }, "Autopay On")));
26345
26345
  };
26346
26346
  var FormattedBankAccount$1 = themeComponent(FormattedBankAccount, "FormattedBankAccount", fallbackValues$o);
26347
26347
 
@@ -26390,7 +26390,7 @@ var CardType = function CardType(_ref) {
26390
26390
  };
26391
26391
 
26392
26392
  var textColor$2 = "".concat(CHARADE_GREY);
26393
- var autopayTextColor$1 = "".concat(REGENT_GREY);
26393
+ var autopayTextColor$1 = "".concat(SEA_GREEN);
26394
26394
  var fallbackValues$p = {
26395
26395
  textColor: textColor$2,
26396
26396
  autopayTextColor: autopayTextColor$1
@@ -26419,13 +26419,15 @@ var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
26419
26419
  return /*#__PURE__*/React__default.createElement(Text$1, {
26420
26420
  as: as,
26421
26421
  variant: "pXS",
26422
- color: ASH_GREY,
26422
+ fontSize: ".75rem",
26423
+ color: STORM_GREY,
26423
26424
  extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
26424
26425
  }, "Exp Date ", expireDate);
26425
26426
  case EXPIRING_SOON:
26426
26427
  return /*#__PURE__*/React__default.createElement(Text$1, {
26427
26428
  as: as,
26428
26429
  variant: "pXS",
26430
+ fontSize: ".75rem",
26429
26431
  color: FIRE_YELLOW,
26430
26432
  extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
26431
26433
  }, "Expiring Soon ", expireDate);
@@ -26433,7 +26435,8 @@ var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
26433
26435
  return /*#__PURE__*/React__default.createElement(Text$1, {
26434
26436
  as: as,
26435
26437
  variant: "pXS",
26436
- color: ASH_GREY,
26438
+ fontSize: ".75rem",
26439
+ color: STORM_GREY,
26437
26440
  extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
26438
26441
  }, "Expired");
26439
26442
  }
@@ -26486,8 +26489,8 @@ var FormattedCreditCard = function FormattedCreditCard(_ref) {
26486
26489
  }, "Card ending in ".concat(lastFour)), expireDate && /*#__PURE__*/React__default.createElement(React.Fragment, null, renderCardStatus(expirationStatus, expireDate, "left", "p"))), autoPay && /*#__PURE__*/React__default.createElement(Text$1, {
26487
26490
  variant: "p",
26488
26491
  color: themeValues.autopayTextColor,
26489
- extraStyles: "font-style: italic;"
26490
- }, "Autopay Enabled")));
26492
+ extraStyles: "font-style: italic; font-size: .75rem;"
26493
+ }, "Autopay On")));
26491
26494
  };
26492
26495
  var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$p);
26493
26496
 
@@ -48089,7 +48092,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
48089
48092
  weight: themeValues.fontWeight,
48090
48093
  hoverStyles: themeValues.modalLinkHoverFocus,
48091
48094
  textDecoration: themeValues.modalLinkTextDecoration,
48092
- extraStyles: "display: inline-block; width: fit-content; cursor: pointer",
48095
+ extraStyles: "display: inline-block; width: fit-content; cursor: pointer; min-height: 24px; line-height: 24px;",
48093
48096
  role: "button" // This should always be a "button" since it opens a modal
48094
48097
  ,
48095
48098
  className: "modal-trigger"
@@ -49003,7 +49006,7 @@ var InnerRadioSection = function InnerRadioSection(_ref) {
49003
49006
  padding: section.titleIcon ? "0 0 0 8px" : "0"
49004
49007
  }, /*#__PURE__*/React__default.createElement(Text$1, {
49005
49008
  as: "label",
49006
- htmlFor: "radio-input-".concat(idString(section)),
49009
+ htmlFor: "radio-".concat(idString(section)),
49007
49010
  color: CHARADE_GREY
49008
49011
  }, section.title))), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster, {
49009
49012
  id: "right-icons-".concat(idString(section)),
@@ -51466,16 +51469,15 @@ var TurnstileWidget = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
51466
51469
  }, error)));
51467
51470
  });
51468
51471
 
51469
- var hoverColor$6 = SAPPHIRE_BLUE;
51470
- var activeColor$b = PEACOCK_BLUE;
51471
- var linkColor$6 = MATISSE_BLUE;
51472
- var borderColor$7 = "rgba(255, 255, 255, 0.85)";
51473
- var TOOLTIP_THEME_SOURCE = "Button";
51472
+ var hoverColor$6 = ROYAL_BLUE;
51473
+ var activeColor$b = CONGRESS_BLUE;
51474
+ var linkColor$6 = ROYAL_BLUE_VIVID;
51475
+ var textColor$5 = CHARADE_GREY;
51474
51476
  var fallbackValues$12 = {
51475
- borderColor: borderColor$7,
51476
51477
  linkColor: linkColor$6,
51477
51478
  hoverColor: hoverColor$6,
51478
- activeColor: activeColor$b
51479
+ activeColor: activeColor$b,
51480
+ textColor: textColor$5
51479
51481
  };
51480
51482
 
51481
51483
  var Tooltip = function Tooltip(_ref) {
@@ -51515,14 +51517,15 @@ var Tooltip = function Tooltip(_ref) {
51515
51517
  arrowBottom: "-8px",
51516
51518
  arrowLeft: "auto"
51517
51519
  } : _ref$arrowPosition,
51518
- arrowColor = _ref.arrowColor;
51520
+ _ref$backgroundColor = _ref.backgroundColor,
51521
+ backgroundColor = _ref$backgroundColor === void 0 ? WHITE : _ref$backgroundColor;
51519
51522
  var closeTimeoutRef = React.useRef(null);
51520
51523
  var _useState = React.useState(false),
51521
51524
  _useState2 = _slicedToArray(_useState, 2),
51522
51525
  tooltipOpen = _useState2[0],
51523
51526
  setTooltipOpen = _useState2[1];
51524
51527
  var themeContext = React.useContext(styled.ThemeContext);
51525
- var themeValues = createThemeValues(themeContext, fallbackValues$12, TOOLTIP_THEME_SOURCE);
51528
+ var themeValues = createThemeValues(themeContext, fallbackValues$12, "Tooltip");
51526
51529
  var top = contentPosition.top,
51527
51530
  right = contentPosition.right,
51528
51531
  bottom = contentPosition.bottom,
@@ -51562,19 +51565,30 @@ var Tooltip = function Tooltip(_ref) {
51562
51565
  }, []);
51563
51566
  var renderTrigger = function renderTrigger() {
51564
51567
  if (hasCustomTrigger && children) {
51565
- return /*#__PURE__*/React__default.cloneElement(React__default.Children.only(children), {
51568
+ var _child$props, _child$props2;
51569
+ var child = React__default.Children.only(children);
51570
+ var _ref2 = (_child$props = child.props) !== null && _child$props !== void 0 ? _child$props : {},
51571
+ childOnFocus = _ref2.onFocus,
51572
+ childOnBlur = _ref2.onBlur,
51573
+ childOnKeyDown = _ref2.onKeyDown;
51574
+ return /*#__PURE__*/React__default.cloneElement(child, {
51566
51575
  "aria-describedby": tooltipID,
51567
- onFocus: function onFocus() {
51568
- return handleToggleTooltip(true);
51576
+ onFocus: function onFocus(e) {
51577
+ childOnFocus === null || childOnFocus === void 0 || childOnFocus(e);
51578
+ handleToggleTooltip(true);
51579
+ },
51580
+ onBlur: function onBlur(e) {
51581
+ childOnBlur === null || childOnBlur === void 0 || childOnBlur(e);
51582
+ handleToggleTooltip(false);
51569
51583
  },
51570
- onBlur: function onBlur() {
51571
- return handleToggleTooltip(false);
51584
+ onKeyDown: function onKeyDown(e) {
51585
+ childOnKeyDown === null || childOnKeyDown === void 0 || childOnKeyDown(e);
51586
+ handleKeyDown(e);
51572
51587
  },
51573
- onKeyDown: handleKeyDown,
51574
51588
  tabIndex: "0",
51575
- style: {
51589
+ style: _objectSpread2(_objectSpread2({}, (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.style), {}, {
51576
51590
  cursor: "pointer"
51577
- }
51591
+ })
51578
51592
  });
51579
51593
  }
51580
51594
  return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
@@ -51607,19 +51621,19 @@ var Tooltip = function Tooltip(_ref) {
51607
51621
  role: "tooltip",
51608
51622
  id: tooltipID,
51609
51623
  "aria-hidden": !tooltipOpen,
51610
- background: themeValues.borderColor,
51624
+ background: backgroundColor,
51611
51625
  "data-qa": "tooltip-contents",
51612
- extraStyles: "\n position: absolute;\n display: ".concat(tooltipOpen ? "block" : "none", ";\n top: ").concat(top, ";\n right: ").concat(right, ";\n bottom: ").concat(bottom, ";\n left: ").concat(left, ";\n height: ").concat(height, ";\n ").concat(contentExtraStyles, "\n "),
51626
+ extraStyles: "\n position: absolute;\n display: ".concat(tooltipOpen ? "block" : "none", ";\n top: ").concat(top, ";\n right: ").concat(right, ";\n bottom: ").concat(bottom, ";\n left: ").concat(left, ";\n height: ").concat(height, ";\n color: ").concat(themeValues.textColor, ";\n ").concat(contentExtraStyles, "\n "),
51613
51627
  boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
51614
51628
  border: "1px solid transparent",
51615
51629
  borderRadius: "4px",
51616
51630
  minWidth: minWidth,
51617
51631
  maxWidth: maxWidth
51618
51632
  }, typeof content === "string" ? /*#__PURE__*/React__default.createElement(Text$1, {
51619
- color: themeValues.linkColor
51633
+ color: themeValues.textColor
51620
51634
  }, content) : content, /*#__PURE__*/React__default.createElement(Box, {
51621
51635
  padding: "0",
51622
- extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(arrowColor || themeValues.borderColor, arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
51636
+ extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(backgroundColor, arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
51623
51637
  })));
51624
51638
  };
51625
51639