@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.esm.js CHANGED
@@ -26296,7 +26296,7 @@ var FormattedAddress = function FormattedAddress(_ref) {
26296
26296
  var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$n, "default");
26297
26297
 
26298
26298
  var textColor$1 = "".concat(CHARADE_GREY);
26299
- var autopayTextColor = "".concat(REGENT_GREY);
26299
+ var autopayTextColor = "".concat(SEA_GREEN);
26300
26300
  var fallbackValues$o = {
26301
26301
  textColor: textColor$1,
26302
26302
  autopayTextColor: autopayTextColor
@@ -26332,8 +26332,8 @@ var FormattedBankAccount = function FormattedBankAccount(_ref2) {
26332
26332
  }, "Savings Account ending in ", lastFour), autoPay && /*#__PURE__*/React__default.createElement(Text$1, {
26333
26333
  variant: "p",
26334
26334
  color: themeValues.autopayTextColor,
26335
- extraStyles: "font-style: italic;"
26336
- }, "Autopay Enabled")));
26335
+ extraStyles: "font-style: italic; font-size: .75rem;"
26336
+ }, "Autopay On")));
26337
26337
  };
26338
26338
  var FormattedBankAccount$1 = themeComponent(FormattedBankAccount, "FormattedBankAccount", fallbackValues$o);
26339
26339
 
@@ -26382,7 +26382,7 @@ var CardType = function CardType(_ref) {
26382
26382
  };
26383
26383
 
26384
26384
  var textColor$2 = "".concat(CHARADE_GREY);
26385
- var autopayTextColor$1 = "".concat(REGENT_GREY);
26385
+ var autopayTextColor$1 = "".concat(SEA_GREEN);
26386
26386
  var fallbackValues$p = {
26387
26387
  textColor: textColor$2,
26388
26388
  autopayTextColor: autopayTextColor$1
@@ -26411,13 +26411,15 @@ var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
26411
26411
  return /*#__PURE__*/React__default.createElement(Text$1, {
26412
26412
  as: as,
26413
26413
  variant: "pXS",
26414
- color: ASH_GREY,
26414
+ fontSize: ".75rem",
26415
+ color: STORM_GREY,
26415
26416
  extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
26416
26417
  }, "Exp Date ", expireDate);
26417
26418
  case EXPIRING_SOON:
26418
26419
  return /*#__PURE__*/React__default.createElement(Text$1, {
26419
26420
  as: as,
26420
26421
  variant: "pXS",
26422
+ fontSize: ".75rem",
26421
26423
  color: FIRE_YELLOW,
26422
26424
  extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
26423
26425
  }, "Expiring Soon ", expireDate);
@@ -26425,7 +26427,8 @@ var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
26425
26427
  return /*#__PURE__*/React__default.createElement(Text$1, {
26426
26428
  as: as,
26427
26429
  variant: "pXS",
26428
- color: ASH_GREY,
26430
+ fontSize: ".75rem",
26431
+ color: STORM_GREY,
26429
26432
  extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
26430
26433
  }, "Expired");
26431
26434
  }
@@ -26478,8 +26481,8 @@ var FormattedCreditCard = function FormattedCreditCard(_ref) {
26478
26481
  }, "Card ending in ".concat(lastFour)), expireDate && /*#__PURE__*/React__default.createElement(Fragment$1, null, renderCardStatus(expirationStatus, expireDate, "left", "p"))), autoPay && /*#__PURE__*/React__default.createElement(Text$1, {
26479
26482
  variant: "p",
26480
26483
  color: themeValues.autopayTextColor,
26481
- extraStyles: "font-style: italic;"
26482
- }, "Autopay Enabled")));
26484
+ extraStyles: "font-style: italic; font-size: .75rem;"
26485
+ }, "Autopay On")));
26483
26486
  };
26484
26487
  var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$p);
26485
26488
 
@@ -48081,7 +48084,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
48081
48084
  weight: themeValues.fontWeight,
48082
48085
  hoverStyles: themeValues.modalLinkHoverFocus,
48083
48086
  textDecoration: themeValues.modalLinkTextDecoration,
48084
- extraStyles: "display: inline-block; width: fit-content; cursor: pointer",
48087
+ extraStyles: "display: inline-block; width: fit-content; cursor: pointer; min-height: 24px; line-height: 24px;",
48085
48088
  role: "button" // This should always be a "button" since it opens a modal
48086
48089
  ,
48087
48090
  className: "modal-trigger"
@@ -48995,7 +48998,7 @@ var InnerRadioSection = function InnerRadioSection(_ref) {
48995
48998
  padding: section.titleIcon ? "0 0 0 8px" : "0"
48996
48999
  }, /*#__PURE__*/React__default.createElement(Text$1, {
48997
49000
  as: "label",
48998
- htmlFor: "radio-input-".concat(idString(section)),
49001
+ htmlFor: "radio-".concat(idString(section)),
48999
49002
  color: CHARADE_GREY
49000
49003
  }, section.title))), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster, {
49001
49004
  id: "right-icons-".concat(idString(section)),
@@ -51458,16 +51461,15 @@ var TurnstileWidget = /*#__PURE__*/forwardRef(function (_ref4, ref) {
51458
51461
  }, error)));
51459
51462
  });
51460
51463
 
51461
- var hoverColor$6 = SAPPHIRE_BLUE;
51462
- var activeColor$b = PEACOCK_BLUE;
51463
- var linkColor$6 = MATISSE_BLUE;
51464
- var borderColor$7 = "rgba(255, 255, 255, 0.85)";
51465
- var TOOLTIP_THEME_SOURCE = "Button";
51464
+ var hoverColor$6 = ROYAL_BLUE;
51465
+ var activeColor$b = CONGRESS_BLUE;
51466
+ var linkColor$6 = ROYAL_BLUE_VIVID;
51467
+ var textColor$5 = CHARADE_GREY;
51466
51468
  var fallbackValues$12 = {
51467
- borderColor: borderColor$7,
51468
51469
  linkColor: linkColor$6,
51469
51470
  hoverColor: hoverColor$6,
51470
- activeColor: activeColor$b
51471
+ activeColor: activeColor$b,
51472
+ textColor: textColor$5
51471
51473
  };
51472
51474
 
51473
51475
  var Tooltip = function Tooltip(_ref) {
@@ -51507,14 +51509,15 @@ var Tooltip = function Tooltip(_ref) {
51507
51509
  arrowBottom: "-8px",
51508
51510
  arrowLeft: "auto"
51509
51511
  } : _ref$arrowPosition,
51510
- arrowColor = _ref.arrowColor;
51512
+ _ref$backgroundColor = _ref.backgroundColor,
51513
+ backgroundColor = _ref$backgroundColor === void 0 ? WHITE : _ref$backgroundColor;
51511
51514
  var closeTimeoutRef = useRef(null);
51512
51515
  var _useState = useState(false),
51513
51516
  _useState2 = _slicedToArray(_useState, 2),
51514
51517
  tooltipOpen = _useState2[0],
51515
51518
  setTooltipOpen = _useState2[1];
51516
51519
  var themeContext = useContext(ThemeContext);
51517
- var themeValues = createThemeValues(themeContext, fallbackValues$12, TOOLTIP_THEME_SOURCE);
51520
+ var themeValues = createThemeValues(themeContext, fallbackValues$12, "Tooltip");
51518
51521
  var top = contentPosition.top,
51519
51522
  right = contentPosition.right,
51520
51523
  bottom = contentPosition.bottom,
@@ -51554,19 +51557,30 @@ var Tooltip = function Tooltip(_ref) {
51554
51557
  }, []);
51555
51558
  var renderTrigger = function renderTrigger() {
51556
51559
  if (hasCustomTrigger && children) {
51557
- return /*#__PURE__*/React__default.cloneElement(React__default.Children.only(children), {
51560
+ var _child$props, _child$props2;
51561
+ var child = React__default.Children.only(children);
51562
+ var _ref2 = (_child$props = child.props) !== null && _child$props !== void 0 ? _child$props : {},
51563
+ childOnFocus = _ref2.onFocus,
51564
+ childOnBlur = _ref2.onBlur,
51565
+ childOnKeyDown = _ref2.onKeyDown;
51566
+ return /*#__PURE__*/React__default.cloneElement(child, {
51558
51567
  "aria-describedby": tooltipID,
51559
- onFocus: function onFocus() {
51560
- return handleToggleTooltip(true);
51568
+ onFocus: function onFocus(e) {
51569
+ childOnFocus === null || childOnFocus === void 0 || childOnFocus(e);
51570
+ handleToggleTooltip(true);
51571
+ },
51572
+ onBlur: function onBlur(e) {
51573
+ childOnBlur === null || childOnBlur === void 0 || childOnBlur(e);
51574
+ handleToggleTooltip(false);
51561
51575
  },
51562
- onBlur: function onBlur() {
51563
- return handleToggleTooltip(false);
51576
+ onKeyDown: function onKeyDown(e) {
51577
+ childOnKeyDown === null || childOnKeyDown === void 0 || childOnKeyDown(e);
51578
+ handleKeyDown(e);
51564
51579
  },
51565
- onKeyDown: handleKeyDown,
51566
51580
  tabIndex: "0",
51567
- style: {
51581
+ style: _objectSpread2(_objectSpread2({}, (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.style), {}, {
51568
51582
  cursor: "pointer"
51569
- }
51583
+ })
51570
51584
  });
51571
51585
  }
51572
51586
  return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
@@ -51599,19 +51613,19 @@ var Tooltip = function Tooltip(_ref) {
51599
51613
  role: "tooltip",
51600
51614
  id: tooltipID,
51601
51615
  "aria-hidden": !tooltipOpen,
51602
- background: themeValues.borderColor,
51616
+ background: backgroundColor,
51603
51617
  "data-qa": "tooltip-contents",
51604
- 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 "),
51618
+ 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 "),
51605
51619
  boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
51606
51620
  border: "1px solid transparent",
51607
51621
  borderRadius: "4px",
51608
51622
  minWidth: minWidth,
51609
51623
  maxWidth: maxWidth
51610
51624
  }, typeof content === "string" ? /*#__PURE__*/React__default.createElement(Text$1, {
51611
- color: themeValues.linkColor
51625
+ color: themeValues.textColor
51612
51626
  }, content) : content, /*#__PURE__*/React__default.createElement(Box, {
51613
51627
  padding: "0",
51614
- 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 ")
51628
+ 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 ")
51615
51629
  })));
51616
51630
  };
51617
51631