@thecb/components 10.4.0-beta.1 → 10.4.0-beta.11

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
@@ -12598,22 +12598,21 @@ var WHITE$1 = WHITE,
12598
12598
  MANATEE_GREY$1 = MANATEE_GREY,
12599
12599
  MATISSE_BLUE$1 = MATISSE_BLUE,
12600
12600
  RASPBERRY$1 = RASPBERRY,
12601
- ERROR_COLOR$1 = ERROR_COLOR,
12602
- STORM_GREY$1 = STORM_GREY;
12601
+ ERROR_COLOR$1 = ERROR_COLOR;
12603
12602
  var LINK_TEXT_DECORATION$1 = LINK_TEXT_DECORATION;
12604
12603
  var disabledBorderColor = {
12605
- primary: STORM_GREY$1,
12606
- secondary: STORM_GREY$1,
12604
+ primary: MANATEE_GREY$1,
12605
+ secondary: MANATEE_GREY$1,
12607
12606
  back: TRANSPARENT$1,
12608
- smallPrimary: STORM_GREY$1,
12609
- smallSecondary: STORM_GREY$1,
12607
+ smallPrimary: MANATEE_GREY$1,
12608
+ smallSecondary: MANATEE_GREY$1,
12610
12609
  smallGhost: TRANSPARENT$1,
12611
12610
  ghost: TRANSPARENT$1,
12612
12611
  tertiary: TRANSPARENT$1,
12613
- danger: STORM_GREY$1,
12614
- dangerSecondary: STORM_GREY$1,
12615
- whiteSecondary: TRANSPARENT$1,
12616
- whitePrimary: TRANSPARENT$1
12612
+ danger: MANATEE_GREY$1,
12613
+ dangerSecondary: MANATEE_GREY$1,
12614
+ whiteSecondary: MANATEE_GREY$1,
12615
+ whitePrimary: MANATEE_GREY$1
12617
12616
  };
12618
12617
  var disabledColor = {
12619
12618
  primary: WHITE$1,
@@ -13034,7 +13033,7 @@ var ButtonWithAction = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
13034
13033
  disabledStyles: disabledStyles,
13035
13034
  "aria-disabled": disabled,
13036
13035
  as: "button",
13037
- onClick: isLoading || disabled ? undefined : action,
13036
+ onClick: isLoading || disabled ? noop$1 : action,
13038
13037
  borderRadius: "2px",
13039
13038
  theme: themeContext,
13040
13039
  extraStyles: "margin: 0.5rem; ".concat(extraStyles),
@@ -20581,7 +20580,7 @@ var BoxWithShadow$1 = themeComponent(BoxWithShadow, "BoxWithShadow", fallbackVal
20581
20580
 
20582
20581
  // import theme from "styled-theming";
20583
20582
  var MATISSE_BLUE$2 = MATISSE_BLUE,
20584
- STORM_GREY$2 = STORM_GREY;
20583
+ STORM_GREY$1 = STORM_GREY;
20585
20584
  var LINK_TEXT_DECORATION$2 = LINK_TEXT_DECORATION;
20586
20585
 
20587
20586
  /*
@@ -20590,8 +20589,8 @@ var LINK_TEXT_DECORATION$2 = LINK_TEXT_DECORATION;
20590
20589
  */
20591
20590
 
20592
20591
  var color$5 = "".concat(MATISSE_BLUE$2);
20593
- var activeColor$2 = "".concat(STORM_GREY$2);
20594
- var activeBreadcrumbColor = "".concat(STORM_GREY$2);
20592
+ var activeColor$2 = "".concat(STORM_GREY$1);
20593
+ var activeBreadcrumbColor = "".concat(STORM_GREY$1);
20595
20594
  var fontSize$2 = "0.875rem";
20596
20595
  var lineHeight = "1.25rem";
20597
20596
  var fontWeight$1 = "400";
@@ -27777,9 +27776,7 @@ var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref) {
27777
27776
  action = _ref.action,
27778
27777
  destination = _ref.destination,
27779
27778
  children = _ref.children,
27780
- dataQa = _ref.dataQa,
27781
- _ref$disabled = _ref.disabled,
27782
- disabled = _ref$disabled === void 0 ? false : _ref$disabled;
27779
+ dataQa = _ref.dataQa;
27783
27780
  return isLink ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
27784
27781
  to: destination,
27785
27782
  "data-qa": dataQa,
@@ -27789,14 +27786,13 @@ var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref) {
27789
27786
  }, /*#__PURE__*/React__default.createElement(Box, {
27790
27787
  padding: "0",
27791
27788
  minHeight: "100%",
27792
- extraStyles: disabled ? "cursor: default;" : "cursor: pointer;"
27789
+ extraStyles: "cursor: pointer;"
27793
27790
  }, children)) : /*#__PURE__*/React__default.createElement(Box, {
27794
- onClick: disabled ? noop$1 : action,
27791
+ onClick: action,
27795
27792
  padding: "0",
27796
27793
  minHeight: "100%",
27797
- dataQa: dataQa,
27798
- "aria-disabled": disabled,
27799
- extraStyles: disabled ? "cursor: default;" : "cursor: pointer;"
27794
+ extraStyles: "cursor: pointer;",
27795
+ dataQa: dataQa
27800
27796
  }, children);
27801
27797
  };
27802
27798
  var Placeholder = function Placeholder(_ref2) {
@@ -27810,16 +27806,12 @@ var Placeholder = function Placeholder(_ref2) {
27810
27806
  variant = _ref2.variant,
27811
27807
  largeIcon = _ref2.largeIcon,
27812
27808
  themeValues = _ref2.themeValues,
27813
- dataQa = _ref2.dataQa,
27814
- _ref2$disabled = _ref2.disabled,
27815
- disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;
27816
- var tintedColor = "".concat(curriedTint$1(0.9, themeValues.color));
27809
+ dataQa = _ref2.dataQa;
27817
27810
  return /*#__PURE__*/React__default.createElement(PlaceholderContentWrapper, {
27818
27811
  isLink: isLink,
27819
27812
  action: action,
27820
27813
  destination: destination,
27821
- dataQa: dataQa,
27822
- disabled: disabled
27814
+ dataQa: dataQa
27823
27815
  }, /*#__PURE__*/React__default.createElement(Box, {
27824
27816
  padding: "0",
27825
27817
  borderRadius: "4px",
@@ -27827,14 +27819,14 @@ var Placeholder = function Placeholder(_ref2) {
27827
27819
  minHeight: themeValues.height,
27828
27820
  hiddenStyles: !visible,
27829
27821
  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;"),
27830
- hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY : tintedColor, ";")
27822
+ hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY : curriedTint$1(0.9, themeValues.color), ";")
27831
27823
  }, /*#__PURE__*/React__default.createElement(Center, {
27832
27824
  maxWidth: "300px"
27833
27825
  }, /*#__PURE__*/React__default.createElement(Box, {
27834
27826
  padding: "0",
27835
27827
  tabIndex: "0",
27836
27828
  onKeyPress: function onKeyPress(e) {
27837
- return e.key === "Enter" && !disabled && action();
27829
+ return e.key === "Enter" && action();
27838
27830
  }
27839
27831
  }, /*#__PURE__*/React__default.createElement(Cluster, {
27840
27832
  justify: "center",
@@ -42656,23 +42648,31 @@ var PROPERTIES_COMMERCIAL_AUTO_ICON = "PROPERTIES_COMMERCIAL_AUTO";
42656
42648
  var MISC_BILL_ICON = "MISC_SINGLE_BILL";
42657
42649
  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));
42658
42650
 
42651
+ var disabledBackgroundColor$1 = {
42652
+ primary: TRANSPARENT
42653
+ };
42654
+ var disabledBorderColor$1 = {
42655
+ primary: GHOST_GREY
42656
+ };
42657
+ var disabledColor$1 = {
42658
+ primary: MANATEE_GREY
42659
+ };
42659
42660
  var activeBackgroundColor$1 = {
42660
- primary: "".concat(CORNFLOWER_BLUE),
42661
- disabled: "".concat(TRANSPARENT)
42661
+ primary: CORNFLOWER_BLUE
42662
42662
  };
42663
42663
  var backgroundColor$9 = {
42664
- primary: "".concat(LINK_WATER),
42665
- disabled: "".concat(TRANSPARENT)
42664
+ primary: LINK_WATER
42666
42665
  };
42667
42666
  var borderColor$5 = {
42668
- primary: "".concat(MOON_RAKER),
42669
- disabled: "".concat(GHOST_GREY)
42667
+ primary: MOON_RAKER
42670
42668
  };
42671
42669
  var color$b = {
42672
- primary: "".concat(ROYAL_BLUE_VIVID),
42673
- disabled: "".concat(MANATEE_GREY)
42670
+ primary: ROYAL_BLUE_VIVID
42674
42671
  };
42675
42672
  var fallbackValues$I = {
42673
+ disabledBackgroundColor: disabledBackgroundColor$1,
42674
+ disabledBorderColor: disabledBorderColor$1,
42675
+ disabledColor: disabledColor$1,
42676
42676
  activeBackgroundColor: activeBackgroundColor$1,
42677
42677
  backgroundColor: backgroundColor$9,
42678
42678
  borderColor: borderColor$5,
@@ -42682,35 +42682,30 @@ var fallbackValues$I = {
42682
42682
  var Container = styled__default(Box).withConfig({
42683
42683
  displayName: "LinkCardstyled__Container",
42684
42684
  componentId: "sc-l5q1h2-0"
42685
- })(["display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:40px;flex-shrink:0;align-self:stretch;border-radius:8px;", " transition:all .2s ease-in-out;&:hover,&:active{cursor:", ";box-shadow:", ";}&:hover:not(:active){", "}&:active{", "}"], function (_ref) {
42686
- var theme = _ref.theme;
42687
- return "\n background-color: ".concat(theme.backgroundColor, ";\n border: 1px solid ").concat(theme.borderColor, ";\n ");
42685
+ })(["display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:40px;flex-shrink:0;align-self:stretch;border-radius:8px;", " transition:all .2s ease-in-out;", ""], function (_ref) {
42686
+ var isDisabled = _ref.isDisabled,
42687
+ theme = _ref.theme;
42688
+ return "\n background-color: ".concat(isDisabled ? theme.disabledBackgroundColor : theme.backgroundColor, ";\n border: 1px solid ").concat(isDisabled ? theme.disabledBorderColor : theme.borderColor, ";\n ");
42688
42689
  }, function (_ref2) {
42689
- var disabled = _ref2.disabled;
42690
- return disabled ? "default" : "pointer";
42691
- }, function (_ref3) {
42692
- var disabled = _ref3.disabled;
42693
- return "\n ".concat(disabled ? "none" : "0px 0px 0px 0px rgba(41, 42, 51, 0.1),\n 0px 5px 11px 0px rgba(41, 42, 51, 0.1),\n 0px 4px 19px 0px rgba(41, 42, 51, 0.09),\n 0px 27px 26px 0px rgba(41, 42, 51, 0.05),\n 0px 56px 31px 0px rgba(41, 42, 51, 0.01),\n 0px 80px 33px 0px rgba(41, 42, 51, 0);", "\n ");
42694
- }, function (_ref4) {
42695
- var theme = _ref4.theme;
42696
- return "border: 1px solid ".concat(theme.borderColor, ";");
42697
- }, function (_ref5) {
42698
- var theme = _ref5.theme;
42699
- return "\n background-color: ".concat(theme.activeBackgroundColor, ";\n border: 1px solid ").concat(theme.borderColor, ";\n ;");
42690
+ var isDisabled = _ref2.isDisabled,
42691
+ theme = _ref2.theme;
42692
+ return isDisabled ? "\n &:hover,\n &:active {\n cursor: default;\n box-shadow: none;\n border: 1px solid ".concat(theme.disabledBorderColor, ";\n }\n ") : "\n &:hover,\n &:active {\n cursor: pointer;\n box-shadow: 0px 0px 0px 0px rgba(41, 42, 51, 0.1),\n 0px 5px 11px 0px rgba(41, 42, 51, 0.1),\n 0px 4px 19px 0px rgba(41, 42, 51, 0.09),\n 0px 27px 26px 0px rgba(41, 42, 51, 0.05),\n 0px 56px 31px 0px rgba(41, 42, 51, 0.01),\n 0px 80px 33px 0px rgba(41, 42, 51, 0);\n }\n\n &:hover:not(:active) {\n border: 1px solid ".concat(theme.borderColor, ";\n }\n\n &:active {\n background-color: ").concat(theme.activeBackgroundColor, ";\n border: 1px solid ").concat(theme.borderColor, ";\n }\n ");
42700
42693
  });
42701
42694
  var Title$2 = styled__default(Heading$1).withConfig({
42702
42695
  displayName: "LinkCardstyled__Title",
42703
42696
  componentId: "sc-l5q1h2-1"
42704
- })(["display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;overflow:hidden;text-overflow:ellipsis;font-size:16px;line-height:150%;background-color:transparent;font-weight:", ";", ";"], FONT_WEIGHT_SEMIBOLD, function (_ref6) {
42705
- var theme = _ref6.theme;
42706
- return "color: ".concat(theme.color, ";");
42697
+ })(["display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;overflow:hidden;text-overflow:ellipsis;font-size:16px;line-height:150%;background-color:transparent;font-weight:", ";", ";"], FONT_WEIGHT_SEMIBOLD, function (_ref3) {
42698
+ var isDisabled = _ref3.isDisabled,
42699
+ theme = _ref3.theme;
42700
+ return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
42707
42701
  });
42708
42702
  var Subtitle = styled__default(Paragraph$1).withConfig({
42709
42703
  displayName: "LinkCardstyled__Subtitle",
42710
42704
  componentId: "sc-l5q1h2-2"
42711
- })(["overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;font-size:14px;line-height:150 %;letter-spacing:0.14px;font-weight:", ";", ";"], FONT_WEIGHT_SEMIBOLD, function (_ref7) {
42712
- var theme = _ref7.theme;
42713
- return "color: ".concat(theme.color, ";");
42705
+ })(["overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;font-size:14px;line-height:150%;letter-spacing:0.14px;font-weight:", ";", ";"], FONT_WEIGHT_SEMIBOLD, function (_ref4) {
42706
+ var isDisabled = _ref4.isDisabled,
42707
+ theme = _ref4.theme;
42708
+ return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
42714
42709
  });
42715
42710
  var Footer = styled__default(Stack).withConfig({
42716
42711
  displayName: "LinkCardstyled__Footer",
@@ -42718,8 +42713,7 @@ var Footer = styled__default(Stack).withConfig({
42718
42713
  })(["align-items:center;width:100%;"]);
42719
42714
 
42720
42715
  var LinkCard = function LinkCard(_ref) {
42721
- var _ref$variant = _ref.variant,
42722
- _ref$title = _ref.title,
42716
+ var _ref$title = _ref.title,
42723
42717
  title = _ref$title === void 0 ? "Test Workflow" : _ref$title,
42724
42718
  _ref$subtitle = _ref.subtitle,
42725
42719
  subtitle = _ref$subtitle === void 0 ? "Link your benefit plan" : _ref$subtitle,
@@ -42756,7 +42750,10 @@ var LinkCard = function LinkCard(_ref) {
42756
42750
  hoverStyles: extraHoverStyles,
42757
42751
  activeStyles: extraActiveStyles,
42758
42752
  onClick: disabled ? noop$1 : onClick,
42759
- disabled: disabled
42753
+ "aria-disabled": disabled,
42754
+ isDisabled: disabled,
42755
+ role: "group",
42756
+ "aria-label": "".concat(title, ", ").concat(subtitle)
42760
42757
  }, /*#__PURE__*/React__default.createElement(Stack, {
42761
42758
  childGap: 0,
42762
42759
  bottomItem: 3,
@@ -42771,13 +42768,15 @@ var LinkCard = function LinkCard(_ref) {
42771
42768
  }, /*#__PURE__*/React__default.createElement(Title$2, {
42772
42769
  variant: titleVariant,
42773
42770
  theme: themeValues,
42774
- margin: 0
42771
+ margin: 0,
42772
+ isDisabled: disabled
42775
42773
  }, title)), /*#__PURE__*/React__default.createElement(Box, {
42776
42774
  padding: "0 0 40px",
42777
42775
  width: "100%"
42778
42776
  }, /*#__PURE__*/React__default.createElement(Subtitle, {
42779
42777
  variant: "pS",
42780
- theme: themeValues
42778
+ theme: themeValues,
42779
+ isDisabled: disabled
42781
42780
  }, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
42782
42781
  background: "transparent",
42783
42782
  borderWidthOverride: "0 0 0 0",
@@ -46744,8 +46743,11 @@ var AutopayModal = function AutopayModal(_ref) {
46744
46743
  description = _ref.description,
46745
46744
  subDescription = _ref.subDescription,
46746
46745
  allowedPaymentInstruments = _ref.allowedPaymentInstruments,
46747
- _ref$isInCustomerMana = _ref.isInCustomerManagement,
46748
- isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
46746
+ _ref$disableActions = _ref.disableActions,
46747
+ disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions,
46748
+ _action = _ref.action,
46749
+ _onClick = _ref.onClick,
46750
+ onKeyPress = _ref.onKeyPress;
46749
46751
  var generateMethodNeededText = function generateMethodNeededText(planText, allowedPaymentInstruments) {
46750
46752
  var allowsCard = allowedPaymentInstruments.includes(CC_METHOD);
46751
46753
  var allowsACH = allowedPaymentInstruments.includes(ACH_METHOD);
@@ -46774,27 +46776,27 @@ var AutopayModal = function AutopayModal(_ref) {
46774
46776
  case "secondary":
46775
46777
  {
46776
46778
  return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
46777
- disabled: isInCustomerManagement,
46778
46779
  text: autoPayActive ? "Turn off ".concat(shortPlan) : "Set Up ".concat(shortPlan),
46779
46780
  variant: "secondary",
46780
46781
  action: function action() {
46781
- toggleModal(true);
46782
+ _action || toggleModal(true);
46782
46783
  },
46783
46784
  dataQa: "Turn off Autopay",
46784
- extraStyles: isMobile ? "flex-grow: 1; width: 100%; margin: 0;" : "flex-grow: 1; min-width: 165px;"
46785
+ extraStyles: isMobile ? "flex-grow: 1; width: 100%; margin: 0;" : "flex-grow: 1; min-width: 165px;",
46786
+ disabled: disableActions
46785
46787
  });
46786
46788
  }
46787
46789
  case "tertiary":
46788
46790
  {
46789
46791
  return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
46790
- disabled: isInCustomerManagement,
46791
46792
  text: autoPayActive ? "Manage ".concat(shortPlan) : "Set Up ".concat(shortPlan),
46792
- variant: isInCustomerManagement ? "disabledTertiary" : "tertiary",
46793
+ variant: "tertiary",
46793
46794
  action: function action() {
46794
- isInCustomerManagement ? noop$1 : toggleModal(true);
46795
+ _action || toggleModal(true);
46795
46796
  },
46796
46797
  dataQa: "Manage Autopay",
46797
- extraStyles: isMobile && "flex-grow: 1; width: 100%;"
46798
+ extraStyles: isMobile && "flex-grow: 1; width: 100%;",
46799
+ disabled: disableActions
46798
46800
  });
46799
46801
  }
46800
46802
  case "link":
@@ -46802,7 +46804,7 @@ var AutopayModal = function AutopayModal(_ref) {
46802
46804
  return /*#__PURE__*/React__default.createElement(Box, {
46803
46805
  padding: "0",
46804
46806
  onClick: function onClick() {
46805
- isInCustomerManagement ? noop$1 : toggleModal(true);
46807
+ _onClick || toggleModal(true);
46806
46808
  },
46807
46809
  hoverStyles: hoverStyles,
46808
46810
  activeStyles: activeStyles,
@@ -46813,9 +46815,9 @@ var AutopayModal = function AutopayModal(_ref) {
46813
46815
  }, /*#__PURE__*/React__default.createElement(AutopayOnIcon, null), /*#__PURE__*/React__default.createElement(Text$1, {
46814
46816
  variant: "pS",
46815
46817
  onClick: function onClick() {
46816
- return toggleModal(true);
46818
+ return _onClick || toggleModal(true);
46817
46819
  },
46818
- onKeyPress: isInCustomerManagement ? noop$1 : function (e) {
46820
+ onKeyPress: onKeyPress || function (e) {
46819
46821
  e.key === "Enter" && toggleModal(true);
46820
46822
  },
46821
46823
  tabIndex: "0",
@@ -46823,16 +46825,17 @@ var AutopayModal = function AutopayModal(_ref) {
46823
46825
  color: SEA_GREEN,
46824
46826
  weight: themeValues.fontWeight,
46825
46827
  hoverStyles: themeValues.modalLinkHoverFocus,
46826
- extraStyles: "padding-left: 0.25rem;"
46828
+ extraStyles: "padding-left: 0.25rem;",
46829
+ disabled: disableActions
46827
46830
  }, "".concat(shortPlan, " ").concat(nextAutopayDate))));
46828
46831
  }
46829
46832
  }
46830
46833
  };
46831
46834
  return /*#__PURE__*/React__default.createElement(Modal$1, _extends({
46832
- showModal: isInCustomerManagement ? noop$1 : function () {
46835
+ showModal: disableActions ? noop$1 : function () {
46833
46836
  return toggleModal(true);
46834
46837
  },
46835
- hideModal: isInCustomerManagement ? noop$1 : function () {
46838
+ hideModal: disableActions ? noop$1 : function () {
46836
46839
  return toggleModal(false);
46837
46840
  },
46838
46841
  modalOpen: modalOpen
@@ -46852,7 +46855,9 @@ var AmountModule = function AmountModule(_ref) {
46852
46855
  nextAutopayDate = _ref.nextAutopayDate,
46853
46856
  description = _ref.description,
46854
46857
  subDescription = _ref.subDescription,
46855
- allowedPaymentInstruments = _ref.allowedPaymentInstruments;
46858
+ allowedPaymentInstruments = _ref.allowedPaymentInstruments,
46859
+ _ref$disableActions = _ref.disableActions,
46860
+ disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
46856
46861
  var _useState = React.useState(false),
46857
46862
  _useState2 = _slicedToArray(_useState, 2),
46858
46863
  modalOpen = _useState2[0],
@@ -46882,7 +46887,19 @@ var AmountModule = function AmountModule(_ref) {
46882
46887
  controlType: "link",
46883
46888
  description: description,
46884
46889
  subDescription: subDescription,
46885
- allowedPaymentInstruments: allowedPaymentInstruments
46890
+ allowedPaymentInstruments: allowedPaymentInstruments,
46891
+ disableActions: disableActions,
46892
+ action: function action() {
46893
+ return disableActions ? noop$1 : toggleModal(true);
46894
+ },
46895
+ onClick: function onClick() {
46896
+ return disableActions ? noop$1 : toggleModal(true);
46897
+ },
46898
+ onKeyPress: disableActions ? function () {
46899
+ return noop$1;
46900
+ } : function (e) {
46901
+ e.key === "Enter" && toggleModal(true);
46902
+ }
46886
46903
  })));
46887
46904
  };
46888
46905
 
@@ -46905,8 +46922,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
46905
46922
  description = _ref.description,
46906
46923
  subDescription = _ref.subDescription,
46907
46924
  allowedPaymentInstruments = _ref.allowedPaymentInstruments,
46908
- _ref$isInCustomerMana = _ref.isInCustomerManagement,
46909
- isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
46925
+ _ref$disableActions = _ref.disableActions,
46926
+ disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
46910
46927
  var planType = isPaymentPlan ? "Payment Plan" : "Autopay";
46911
46928
  var _useState = React.useState(false),
46912
46929
  _useState2 = _slicedToArray(_useState, 2),
@@ -46959,7 +46976,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
46959
46976
  nextAutopayDate: nextAutopayDate,
46960
46977
  description: description,
46961
46978
  subDescription: subDescription,
46962
- allowedPaymentInstruments: allowedPaymentInstruments
46979
+ allowedPaymentInstruments: allowedPaymentInstruments,
46980
+ disableActions: disableActions
46963
46981
  }))), /*#__PURE__*/React__default.createElement(Box, {
46964
46982
  padding: isMobile ? "16px" : "0"
46965
46983
  }, /*#__PURE__*/React__default.createElement(Cluster, {
@@ -46970,24 +46988,26 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
46970
46988
  padding: isMobile ? "0 8px 0 0" : "0",
46971
46989
  extraStyles: isMobile && "flex-grow: 1;"
46972
46990
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
46973
- variant: isInCustomerManagement ? "disabledTertiary" : "tertiary",
46991
+ variant: "tertiary",
46974
46992
  text: config.type === "ACCOUNT" ? "Account Details" : "Property Details",
46975
- action: handleDetailsClick,
46993
+ action: disableActions ? noop$1 : handleDetailsClick,
46976
46994
  dataQa: "Account Details",
46977
46995
  extraStyles: isMobile && "flex-grow: 1; width: 100%;"
46978
46996
  })), /*#__PURE__*/React__default.createElement(Box, {
46979
46997
  padding: isMobile ? "0 8px 0 0" : "0",
46980
46998
  extraStyles: isMobile && "flex-grow: 1;"
46981
46999
  }, autoPayAvailable && !autoPayEnabled ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
46982
- variant: isInCustomerManagement ? "disabledTertiary" : "tertiary",
47000
+ variant: "tertiary",
46983
47001
  text: "Set Up ".concat(planType),
46984
47002
  action: function action() {
46985
- setDetailedObligation(obligations, config, obligationAssocID);
46986
- handleAutopayAction();
47003
+ if (!disableActions) {
47004
+ setDetailedObligation(obligations, config, obligationAssocID);
47005
+ handleAutopayAction();
47006
+ }
46987
47007
  },
46988
47008
  dataQa: "Set Up Autopay",
46989
47009
  extraStyles: isMobile && "flex-grow: 1; width: 100%;",
46990
- disabled: isInCustomerManagement
47010
+ disabled: disableActions
46991
47011
  }) : /*#__PURE__*/React__default.createElement(AutopayModalModule, {
46992
47012
  autoPayActive: autoPayEnabled,
46993
47013
  autoPaySchedule: autoPaySchedule,
@@ -47004,31 +47024,44 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
47004
47024
  description: description,
47005
47025
  subDescription: subDescription,
47006
47026
  allowedPaymentInstruments: allowedPaymentInstruments,
47007
- isInCustomerManagement: isInCustomerManagement
47027
+ disableActions: disableActions,
47028
+ action: function action() {
47029
+ return disableActions ? noop$1 : toggleModal(true);
47030
+ },
47031
+ onClick: function onClick() {
47032
+ return disableActions ? noop$1 : toggleModal(true);
47033
+ },
47034
+ onKeyPress: disableActions ? function () {
47035
+ return noop$1;
47036
+ } : function (e) {
47037
+ e.key === "Enter" && toggleModal(true);
47038
+ }
47008
47039
  })), !isMobile && /*#__PURE__*/React__default.createElement(Box, {
47009
47040
  padding: "0"
47010
47041
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
47011
47042
  isLoading: isLoading,
47012
- action: isInCustomerManagement ? noop : function () {
47043
+ action: disableActions ? noop$1 : function () {
47013
47044
  return handleClick(obligations);
47014
47045
  },
47015
47046
  text: "Pay Now",
47016
- variant: isMobile ? isInCustomerManagement ? "disabledSmallSecondary" : "smallSecondary" : isInCustomerManagement ? "disabledSecondary" : "secondary",
47047
+ variant: isMobile ? "smallSecondary" : "secondary",
47017
47048
  dataQa: "Pay Now",
47018
- disabled: isInCustomerManagement
47049
+ disabled: disableActions
47019
47050
  }))), isMobile && /*#__PURE__*/React__default.createElement(Box, {
47020
47051
  padding: "8px 0 0",
47021
47052
  width: "100%"
47022
47053
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
47023
47054
  isLoading: isLoading,
47024
47055
  action: function action() {
47025
- return handleClick(obligations);
47056
+ return disableActions ? noop$1 : function () {
47057
+ return handleClick(obligations);
47058
+ };
47026
47059
  },
47027
47060
  text: "Pay Now",
47028
47061
  variant: isMobile ? "smallSecondary" : "secondary",
47029
47062
  dataQa: "Pay Now",
47030
47063
  extraStyles: isMobile && "flex-grow: 1; width: 100%; margin: 0;",
47031
- disabled: isInCustomerManagement
47064
+ disabled: disableActions
47032
47065
  }))));
47033
47066
  };
47034
47067
 
@@ -47039,8 +47072,8 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
47039
47072
  removeAccount = _ref.removeAccount,
47040
47073
  accountType = _ref.accountType,
47041
47074
  isMobile = _ref.isMobile,
47042
- _ref$isInCustomerMana = _ref.isInCustomerManagement,
47043
- isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
47075
+ _ref$disableActions = _ref.disableActions,
47076
+ disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
47044
47077
  var _useState = React.useState(false),
47045
47078
  _useState2 = _slicedToArray(_useState, 2),
47046
47079
  modalIsOpen = _useState2[0],
@@ -47053,10 +47086,10 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
47053
47086
  }, "".concat(agencyName, " - ")) : "";
47054
47087
  var identifier = accountType === "Account" && obligations.length > 1 ? "accounts" : accountType === "Property" && obligations.length > 1 ? "properties" : accountType.toLowerCase();
47055
47088
  return /*#__PURE__*/React__default.createElement(Modal$1, {
47056
- showModal: function showModal() {
47089
+ showModal: disableActions ? noop : function () {
47057
47090
  return setModalIsOpen(true);
47058
47091
  },
47059
- hideModal: function hideModal() {
47092
+ hideModal: disableActions ? noop : function () {
47060
47093
  return setModalIsOpen(false);
47061
47094
  },
47062
47095
  modalOpen: modalIsOpen,
@@ -47064,8 +47097,10 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
47064
47097
  modalBodyText: "Are you sure you want to remove the ".concat(identifier, " ").concat(accounts, "? Any autopay scheduled against ").concat(obligations.length > 1 ? "them" : "it", " will be deactivated."),
47065
47098
  continueButtonText: "Remove",
47066
47099
  continueAction: function continueAction() {
47067
- removeAccount();
47068
- setModalIsOpen(false);
47100
+ if (!disableActions) {
47101
+ removeAccount();
47102
+ setModalIsOpen(false);
47103
+ }
47069
47104
  },
47070
47105
  useDangerButton: true
47071
47106
  }, /*#__PURE__*/React__default.createElement(Box, {
@@ -47073,13 +47108,13 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
47073
47108
  extraStyles: "flex-grow: 1;"
47074
47109
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
47075
47110
  text: "Remove",
47076
- variant: isInCustomerManagement ? "disabledSecondary" : "secondary",
47077
- action: isInCustomerManagement ? noop : function () {
47111
+ variant: "secondary",
47112
+ action: disableActions ? noop : function () {
47078
47113
  return setModalIsOpen(true);
47079
47114
  },
47080
47115
  dataQa: "Remove Account",
47081
47116
  extraStyles: isMobile ? "flex-grow: 1; width: 100%; margin: 0;" : "flex-grow: 1;",
47082
- disabled: isInCustomerManagement
47117
+ disabled: disableActions
47083
47118
  })));
47084
47119
  };
47085
47120
 
@@ -47100,8 +47135,8 @@ var InactiveControlsModule = function InactiveControlsModule(_ref) {
47100
47135
  description = _ref.description,
47101
47136
  subDescription = _ref.subDescription,
47102
47137
  allowedPaymentInstruments = _ref.allowedPaymentInstruments,
47103
- _ref$isInCustomerMana = _ref.isInCustomerManagement,
47104
- isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
47138
+ _ref$disableActions = _ref.disableActions,
47139
+ disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
47105
47140
  var _useState = React.useState(false),
47106
47141
  _useState2 = _slicedToArray(_useState, 2),
47107
47142
  modalOpen = _useState2[0],
@@ -47140,16 +47175,27 @@ var InactiveControlsModule = function InactiveControlsModule(_ref) {
47140
47175
  description: description,
47141
47176
  subDescription: subDescription,
47142
47177
  allowedPaymentInstruments: allowedPaymentInstruments,
47143
- isInCustomerManagement: isInCustomerManagement
47178
+ disableActions: disableActions,
47179
+ action: function action() {
47180
+ return disableActions ? noop$1 : toggleModal(true);
47181
+ },
47182
+ onClick: function onClick() {
47183
+ return disableActions ? noop$1 : toggleModal(true);
47184
+ },
47185
+ onKeyPress: disableActions ? function () {
47186
+ return noop$1;
47187
+ } : function (e) {
47188
+ e.key === "Enter" && toggleModal(true);
47189
+ }
47144
47190
  })), /*#__PURE__*/React__default.createElement(Box, {
47145
47191
  padding: "0",
47146
47192
  extraStyles: "flex-grow: 1;"
47147
47193
  }, /*#__PURE__*/React__default.createElement(RemoveAccountModalModule, {
47148
47194
  agencyName: agencyName,
47149
- removeAccount: isInCustomerManagement ? noop$1 : handleRemoveAccount,
47195
+ removeAccount: disableActions ? noop$1 : handleRemoveAccount,
47150
47196
  accountType: configType === "ACCOUNT" ? "Account" : "Property",
47151
47197
  isMobile: isMobile,
47152
- isInCustomerManagement: isInCustomerManagement
47198
+ disableActions: disableActions
47153
47199
  }))));
47154
47200
  };
47155
47201
 
@@ -47279,7 +47325,8 @@ var Obligation = function Obligation(_ref) {
47279
47325
  nextAutopayDate: nextAutopayDate,
47280
47326
  description: description,
47281
47327
  subDescription: subDescription,
47282
- allowedPaymentInstruments: allowedPaymentInstruments
47328
+ allowedPaymentInstruments: allowedPaymentInstruments,
47329
+ disableActions: isInCustomerManagement
47283
47330
  }))), !isMobile && /*#__PURE__*/React__default.createElement(PaymentDetailsActions, {
47284
47331
  obligations: obligations,
47285
47332
  autoPayEnabled: autoPayEnabled,
@@ -47298,7 +47345,7 @@ var Obligation = function Obligation(_ref) {
47298
47345
  description: description,
47299
47346
  subDescription: subDescription,
47300
47347
  allowedPaymentInstruments: allowedPaymentInstruments,
47301
- isInCustomerManagement: isInCustomerManagement
47348
+ disableActions: isInCustomerManagement
47302
47349
  }))), isMobile && /*#__PURE__*/React__default.createElement(PaymentDetailsActions, {
47303
47350
  obligations: obligations,
47304
47351
  autoPayEnabled: autoPayEnabled,
@@ -47317,7 +47364,7 @@ var Obligation = function Obligation(_ref) {
47317
47364
  description: description,
47318
47365
  subDescription: subDescription,
47319
47366
  allowedPaymentInstruments: allowedPaymentInstruments,
47320
- isInCustomerManagement: isInCustomerManagement
47367
+ disableActions: isInCustomerManagement
47321
47368
  }));
47322
47369
  var inactiveObligation = /*#__PURE__*/React__default.createElement(Box, {
47323
47370
  padding: "0",
@@ -47374,7 +47421,7 @@ var Obligation = function Obligation(_ref) {
47374
47421
  description: description,
47375
47422
  subDescription: subDescription,
47376
47423
  allowedPaymentInstruments: allowedPaymentInstruments,
47377
- isInCustomerManagement: isInCustomerManagement
47424
+ disableActions: isInCustomerManagement
47378
47425
  }))), isMobile && /*#__PURE__*/React__default.createElement(InactiveControlsModule, {
47379
47426
  obligations: obligations,
47380
47427
  autoPayEnabled: autoPayEnabled,
@@ -47392,7 +47439,7 @@ var Obligation = function Obligation(_ref) {
47392
47439
  description: description,
47393
47440
  subDescription: subDescription,
47394
47441
  allowedPaymentInstruments: allowedPaymentInstruments,
47395
- isInCustomerManagement: isInCustomerManagement
47442
+ disableActions: isInCustomerManagement
47396
47443
  }))));
47397
47444
  return inactive ? inactiveObligation : activeObligation;
47398
47445
  };