@thecb/components 10.2.4-beta.0 → 10.2.4-beta.10

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
@@ -6504,7 +6504,7 @@ var BoxWrapper = styled__default(function (_ref) {
6504
6504
  });
6505
6505
  /* eslint-enable no-unused-vars */
6506
6506
 
6507
- var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "children"];
6507
+ var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "disabled", "children"];
6508
6508
 
6509
6509
  /*
6510
6510
  Box component to create generic boxes
@@ -6552,6 +6552,7 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
6552
6552
  _ref$srOnly = _ref.srOnly,
6553
6553
  srOnly = _ref$srOnly === void 0 ? false : _ref$srOnly,
6554
6554
  dataQa = _ref.dataQa,
6555
+ _ref$disabled = _ref.disabled,
6555
6556
  children = _ref.children,
6556
6557
  rest = _objectWithoutProperties(_ref, _excluded$3);
6557
6558
  return /*#__PURE__*/React__default.createElement(BoxWrapper, _extends({
@@ -12910,12 +12911,13 @@ var ButtonWithAction = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
12910
12911
  children = _ref2.children,
12911
12912
  extraDisabledStyles = _ref2.extraDisabledStyles,
12912
12913
  rest = _objectWithoutProperties(_ref2, _excluded$h);
12914
+ var isGhostVariant = variant === "ghost" || variant === "smallGhost";
12913
12915
  var themeContext = React.useContext(styled.ThemeContext);
12914
12916
  var themeValues = createThemeValues(themeContext, fallbackValues$1, "Button", variant);
12915
12917
  var isMobile = themeContext.isMobile;
12916
12918
  var hoverStyles = "\n outline: none;\n background-color: ".concat(themeValues.hoverBackgroundColor, ";\n border-color: ").concat(themeValues.hoverBorderColor, ";\n color: ").concat(themeValues.hoverColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n cursor: pointer;\n ");
12917
12919
  var activeStyles = "\n outline: none;\n background-color: ".concat(themeValues.activeBackgroundColor, ";\n border-color: ").concat(themeValues.activeBorderColor, ";\n color: ").concat(themeValues.activeColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n ");
12918
- var disabledStyles = "\n background-color: #6D717E;\n border-color: #6D717E;\n color: #FFFFFF;\n cursor: default;\n &:focus {\n outline: 3px solid #6D717E;\n outline-offset: 2px;\n }\n ".concat(extraDisabledStyles, "\n ");
12920
+ var disabledStyles = "\n background-color: ".concat(isGhostVariant ? "transparent;" : "#6D717E;", ";\n border-color: ").concat(isGhostVariant ? "transparent;" : "#6D717E;", ";\n color: ").concat(isGhostVariant ? "#6D717E;" : "#FFFFFF", ";\n cursor: default;\n &:focus {\n outline: 3px solid #6D717E;\n outline-offset: 2px;\n }\n ").concat(extraDisabledStyles, "\n ");
12919
12921
  return /*#__PURE__*/React__default.createElement(Box, _extends({
12920
12922
  ref: ref,
12921
12923
  variant: variant,
@@ -12946,7 +12948,7 @@ var ButtonWithAction = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
12946
12948
  variant: themeValues.fontSizeVariant,
12947
12949
  color: themeValues.color,
12948
12950
  textWrap: textWrap,
12949
- extraStyles: textExtraStyles
12951
+ extraStyles: disabled ? textExtraStyles + disabledStyles : textExtraStyles
12950
12952
  }, text)));
12951
12953
  });
12952
12954
 
@@ -13014,7 +13016,9 @@ var AccountsIcon$1 = themeComponent(AccountsIcon, "Icons", fallbackValues$2, "in
13014
13016
  // Fill color based on default "success" variant color
13015
13017
  var AutopayIcon = function AutopayIcon(_ref) {
13016
13018
  var _ref$fill = _ref.fill,
13017
- fill = _ref$fill === void 0 ? "#317D4F" : _ref$fill;
13019
+ fill = _ref$fill === void 0 ? "#317D4F" : _ref$fill,
13020
+ _ref$color = _ref.color,
13021
+ color = _ref$color === void 0 ? "#317D4F" : _ref$color;
13018
13022
  return /*#__PURE__*/React__default.createElement("svg", {
13019
13023
  width: "16",
13020
13024
  height: "16",
@@ -13038,7 +13042,7 @@ var AutopayIcon = function AutopayIcon(_ref) {
13038
13042
  mask: "url(#mask0_5560_39870)"
13039
13043
  }, /*#__PURE__*/React__default.createElement("path", {
13040
13044
  d: "M0 0H16V16H0V0Z",
13041
- fill: fill
13045
+ fill: fill || color
13042
13046
  })));
13043
13047
  };
13044
13048
 
@@ -18985,13 +18989,15 @@ var background$1 = {
18985
18989
  info: "".concat(INFO_BLUE),
18986
18990
  warn: "".concat(HALF_COLONIAL_WHITE),
18987
18991
  primary: "".concat(CORNFLOWER_BLUE),
18988
- success: "".concat(HINT_GREEN)
18992
+ success: "".concat(HINT_GREEN),
18993
+ disabled: "".concat(GRECIAN_GREY)
18989
18994
  };
18990
18995
  var color$4 = {
18991
18996
  info: "".concat(MATISSE_BLUE),
18992
18997
  warn: "".concat(ZEST_ORANGE),
18993
18998
  primary: "".concat(ROYAL_BLUE_VIVID),
18994
- success: "".concat(SEA_GREEN)
18999
+ success: "".concat(SEA_GREEN),
19000
+ disabled: "".concat(MANATEE_GREY)
18995
19001
  };
18996
19002
  var fallbackValues$7 = {
18997
19003
  background: background$1,
@@ -19015,10 +19021,12 @@ var Badge = function Badge(_ref) {
19015
19021
  return /*#__PURE__*/React__default.createElement(StyledBadgeContainer, {
19016
19022
  background: themeValues.background
19017
19023
  }, iconOnLeft && Icon && /*#__PURE__*/React__default.createElement(Icon, {
19024
+ color: themeValues.color,
19018
19025
  fill: themeValues.color
19019
19026
  }), /*#__PURE__*/React__default.createElement(StyledBadge, {
19020
19027
  color: themeValues.color
19021
19028
  }, label), !iconOnLeft && Icon && /*#__PURE__*/React__default.createElement(Icon, {
19029
+ color: themeValues.color,
19022
19030
  fill: themeValues.color
19023
19031
  }));
19024
19032
  };
@@ -27584,18 +27592,18 @@ var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref) {
27584
27592
  return isLink ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
27585
27593
  to: destination,
27586
27594
  "data-qa": dataQa,
27587
- disabled: disabled
27595
+ "aria-disabled": disabled
27588
27596
  }, /*#__PURE__*/React__default.createElement(Box, {
27589
27597
  padding: "0",
27590
27598
  minHeight: "100%",
27591
- extraStyles: "cursor: pointer;"
27599
+ extraStyles: disabled ? "cursor: default;" : "cursor: pointer;"
27592
27600
  }, children)) : /*#__PURE__*/React__default.createElement(Box, {
27593
27601
  onClick: disabled ? noop : action,
27594
27602
  padding: "0",
27595
27603
  minHeight: "100%",
27596
27604
  dataQa: dataQa,
27597
27605
  "aria-disabled": disabled,
27598
- extraStyles: disabled ? "cursor: default; opacity: 0.7;" : "cursor: pointer; opacity: 1;"
27606
+ extraStyles: disabled ? "cursor: default;" : "cursor: pointer;"
27599
27607
  }, children);
27600
27608
  };
27601
27609
  var Placeholder = function Placeholder(_ref2) {
@@ -27612,6 +27620,7 @@ var Placeholder = function Placeholder(_ref2) {
27612
27620
  dataQa = _ref2.dataQa,
27613
27621
  _ref2$disabled = _ref2.disabled,
27614
27622
  disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;
27623
+ var tintedColor = "".concat(curriedTint$1(0.9, themeValues.color));
27615
27624
  return /*#__PURE__*/React__default.createElement(PlaceholderContentWrapper, {
27616
27625
  isLink: isLink,
27617
27626
  action: action,
@@ -27625,7 +27634,7 @@ var Placeholder = function Placeholder(_ref2) {
27625
27634
  minHeight: themeValues.height,
27626
27635
  hiddenStyles: !visible,
27627
27636
  extraStyles: "\n background: linear-gradient(\n to right,\n ".concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, ").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%);\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 5px 1px, 1px 5px;\n display: flex;\n justify-content: center;\n align-items:center;"),
27628
- hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY : curriedTint$1(0.9, themeValues.color), ";")
27637
+ hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY : tintedColor, ";")
27629
27638
  }, /*#__PURE__*/React__default.createElement(Center, {
27630
27639
  maxWidth: "300px"
27631
27640
  }, /*#__PURE__*/React__default.createElement(Box, {
@@ -42462,10 +42471,22 @@ var PROPERTIES_COMMERCIAL_AUTO_ICON = "PROPERTIES_COMMERCIAL_AUTO";
42462
42471
  var MISC_BILL_ICON = "MISC_SINGLE_BILL";
42463
42472
  var iconsMap = (_iconsMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconsMap, ACCOUNTS_GENERIC_ICON, AccountGenericIcon), ACCOUNTS_CONSTRUCTION_ICON, AccountConstructionIcon), ACCOUNTS_HEALTH_ICON, AccountMedicalIcon), ACCOUNTS_DENTAL_ICON, AccountDentalIcon), ACCOUNTS_UTILITY_ELECTRIC_ICON, AccountElectricIcon), ACCOUNTS_UTILITY_GARBAGE_ICON, AccountGarbageIcon), ACCOUNTS_UTILITY_GAS_ICON, AccountGasIcon), ACCOUNTS_UTILITY_WATER_ICON, AccountWaterIcon), PROPERTIES_PERSONAL_ICON, PropertyPersonalIcon), PROPERTIES_GARAGE_ICON, PropertyGarageIcon), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconsMap, PROPERTIES_BUSINESS_ICON, PropertyBusinessIcon), PROPERTIES_STOREFRONT_ICON, PropertyStorefrontIcon), PROPERTIES_APARTMENT_ICON, PropertyApartmentIcon), PROPERTIES_LAND_ICON, PropertyLandIcon), PROPERTIES_CAR_ICON, PropertyCarIcon), PROPERTIES_MOTORCYCLE_ICON, PropertyMotorcycleIcon), PROPERTIES_COMMERCIAL_AUTO_ICON, PropertyCommercialVehicleIcon), MISC_BILL_ICON, AccountBillIcon));
42464
42473
 
42465
- var activeBackgroundColor$1 = CORNFLOWER_BLUE;
42466
- var backgroundColor$9 = LINK_WATER;
42467
- var borderColor$5 = MOON_RAKER;
42468
- var color$b = ROYAL_BLUE_VIVID;
42474
+ var activeBackgroundColor$1 = {
42475
+ primary: "".concat(CORNFLOWER_BLUE),
42476
+ disabled: "".concat(ATHENS_GREY)
42477
+ };
42478
+ var backgroundColor$9 = {
42479
+ primary: "".concat(LINK_WATER),
42480
+ disabled: "".concat(ATHENS_GREY)
42481
+ };
42482
+ var borderColor$5 = {
42483
+ primary: "".concat(MOON_RAKER),
42484
+ disabled: "".concat(GHOST_GREY)
42485
+ };
42486
+ var color$b = {
42487
+ primary: "".concat(ROYAL_BLUE_VIVID),
42488
+ disabled: "".concat(MANATEE_GREY)
42489
+ };
42469
42490
  var fallbackValues$I = {
42470
42491
  activeBackgroundColor: activeBackgroundColor$1,
42471
42492
  backgroundColor: backgroundColor$9,
@@ -42506,7 +42527,8 @@ var Footer = styled__default(Stack).withConfig({
42506
42527
  })(["align-items:center;width:100%;"]);
42507
42528
 
42508
42529
  var LinkCard = function LinkCard(_ref) {
42509
- var _ref$title = _ref.title,
42530
+ var _ref$variant = _ref.variant,
42531
+ _ref$title = _ref.title,
42510
42532
  title = _ref$title === void 0 ? "Test Workflow" : _ref$title,
42511
42533
  _ref$subtitle = _ref.subtitle,
42512
42534
  subtitle = _ref$subtitle === void 0 ? "Link your benefit plan" : _ref$subtitle,
@@ -42523,7 +42545,9 @@ var LinkCard = function LinkCard(_ref) {
42523
42545
  extraActiveStyles = _ref$extraActiveStyle === void 0 ? "" : _ref$extraActiveStyle,
42524
42546
  themeValues = _ref.themeValues,
42525
42547
  _ref$titleVariant = _ref.titleVariant,
42526
- titleVariant = _ref$titleVariant === void 0 ? "h3" : _ref$titleVariant;
42548
+ titleVariant = _ref$titleVariant === void 0 ? "h3" : _ref$titleVariant,
42549
+ _ref$disabled = _ref.disabled,
42550
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled;
42527
42551
  var _useContext = React.useContext(styled.ThemeContext),
42528
42552
  isMobile = _useContext.isMobile;
42529
42553
  var regex = /\W/g;
@@ -42540,7 +42564,8 @@ var LinkCard = function LinkCard(_ref) {
42540
42564
  extraStyles: extraStyles,
42541
42565
  hoverStyles: extraHoverStyles,
42542
42566
  activeStyles: extraActiveStyles,
42543
- onClick: onClick
42567
+ onClick: disabled ? noop : onClick,
42568
+ "aria-disabled": disabled
42544
42569
  }, /*#__PURE__*/React__default.createElement(Stack, {
42545
42570
  childGap: 0,
42546
42571
  bottomItem: 3,
@@ -42571,9 +42596,11 @@ var LinkCard = function LinkCard(_ref) {
42571
42596
  direction: "row",
42572
42597
  childGap: "6px",
42573
42598
  justify: "space-between"
42574
- }, showLeft && !leftContent && /*#__PURE__*/React__default.createElement(Box, null), showLeft && leftContent, showRight && rightContent))));
42599
+ }, showLeft && !!leftContent ? leftContent : /*#__PURE__*/React__default.createElement(Box, {
42600
+ extraStyles: "margin-right: auto;"
42601
+ }), showRight && !!rightContent && rightContent))));
42575
42602
  };
42576
- var LinkCard$1 = themeComponent(LinkCard, "LinkCard", fallbackValues$I);
42603
+ var LinkCard$1 = themeComponent(LinkCard, "LinkCard", fallbackValues$I, "primary");
42577
42604
 
42578
42605
  var LoginForm = function LoginForm(_ref) {
42579
42606
  var clearOnDismount = _ref.clearOnDismount,