@thecb/components 10.4.0-beta.1 → 10.4.0-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
@@ -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,17 @@ 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 ? noop$1 : function (e) {
46899
+ e.key === "Enter" && toggleModal(true);
46900
+ }
46886
46901
  })));
46887
46902
  };
46888
46903
 
@@ -46905,8 +46920,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
46905
46920
  description = _ref.description,
46906
46921
  subDescription = _ref.subDescription,
46907
46922
  allowedPaymentInstruments = _ref.allowedPaymentInstruments,
46908
- _ref$isInCustomerMana = _ref.isInCustomerManagement,
46909
- isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
46923
+ _ref$disableActions = _ref.disableActions,
46924
+ disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
46910
46925
  var planType = isPaymentPlan ? "Payment Plan" : "Autopay";
46911
46926
  var _useState = React.useState(false),
46912
46927
  _useState2 = _slicedToArray(_useState, 2),
@@ -46959,7 +46974,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
46959
46974
  nextAutopayDate: nextAutopayDate,
46960
46975
  description: description,
46961
46976
  subDescription: subDescription,
46962
- allowedPaymentInstruments: allowedPaymentInstruments
46977
+ allowedPaymentInstruments: allowedPaymentInstruments,
46978
+ disableActions: disableActions
46963
46979
  }))), /*#__PURE__*/React__default.createElement(Box, {
46964
46980
  padding: isMobile ? "16px" : "0"
46965
46981
  }, /*#__PURE__*/React__default.createElement(Cluster, {
@@ -46970,24 +46986,26 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
46970
46986
  padding: isMobile ? "0 8px 0 0" : "0",
46971
46987
  extraStyles: isMobile && "flex-grow: 1;"
46972
46988
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
46973
- variant: isInCustomerManagement ? "disabledTertiary" : "tertiary",
46989
+ variant: "tertiary",
46974
46990
  text: config.type === "ACCOUNT" ? "Account Details" : "Property Details",
46975
- action: handleDetailsClick,
46991
+ action: disableActions ? noop$1 : handleDetailsClick,
46976
46992
  dataQa: "Account Details",
46977
46993
  extraStyles: isMobile && "flex-grow: 1; width: 100%;"
46978
46994
  })), /*#__PURE__*/React__default.createElement(Box, {
46979
46995
  padding: isMobile ? "0 8px 0 0" : "0",
46980
46996
  extraStyles: isMobile && "flex-grow: 1;"
46981
46997
  }, autoPayAvailable && !autoPayEnabled ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
46982
- variant: isInCustomerManagement ? "disabledTertiary" : "tertiary",
46998
+ variant: "tertiary",
46983
46999
  text: "Set Up ".concat(planType),
46984
47000
  action: function action() {
46985
- setDetailedObligation(obligations, config, obligationAssocID);
46986
- handleAutopayAction();
47001
+ if (!disableActions) {
47002
+ setDetailedObligation(obligations, config, obligationAssocID);
47003
+ handleAutopayAction();
47004
+ }
46987
47005
  },
46988
47006
  dataQa: "Set Up Autopay",
46989
47007
  extraStyles: isMobile && "flex-grow: 1; width: 100%;",
46990
- disabled: isInCustomerManagement
47008
+ disabled: disableActions
46991
47009
  }) : /*#__PURE__*/React__default.createElement(AutopayModalModule, {
46992
47010
  autoPayActive: autoPayEnabled,
46993
47011
  autoPaySchedule: autoPaySchedule,
@@ -47004,31 +47022,38 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
47004
47022
  description: description,
47005
47023
  subDescription: subDescription,
47006
47024
  allowedPaymentInstruments: allowedPaymentInstruments,
47007
- isInCustomerManagement: isInCustomerManagement
47025
+ disableActions: disableActions,
47026
+ action: disableActions ? noop$1 : toggleModal(true),
47027
+ onClick: disableActions ? noop$1 : toggleModal(true),
47028
+ onKeyPress: disableActions ? noop$1 : function (e) {
47029
+ e.key === "Enter" && toggleModal(true);
47030
+ }
47008
47031
  })), !isMobile && /*#__PURE__*/React__default.createElement(Box, {
47009
47032
  padding: "0"
47010
47033
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
47011
47034
  isLoading: isLoading,
47012
- action: isInCustomerManagement ? noop : function () {
47035
+ action: disableActions ? noop$1 : function () {
47013
47036
  return handleClick(obligations);
47014
47037
  },
47015
47038
  text: "Pay Now",
47016
- variant: isMobile ? isInCustomerManagement ? "disabledSmallSecondary" : "smallSecondary" : isInCustomerManagement ? "disabledSecondary" : "secondary",
47039
+ variant: isMobile ? "smallSecondary" : "secondary",
47017
47040
  dataQa: "Pay Now",
47018
- disabled: isInCustomerManagement
47041
+ disabled: disableActions
47019
47042
  }))), isMobile && /*#__PURE__*/React__default.createElement(Box, {
47020
47043
  padding: "8px 0 0",
47021
47044
  width: "100%"
47022
47045
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
47023
47046
  isLoading: isLoading,
47024
47047
  action: function action() {
47025
- return handleClick(obligations);
47048
+ return disableActions ? noop$1 : function () {
47049
+ return handleClick(obligations);
47050
+ };
47026
47051
  },
47027
47052
  text: "Pay Now",
47028
47053
  variant: isMobile ? "smallSecondary" : "secondary",
47029
47054
  dataQa: "Pay Now",
47030
47055
  extraStyles: isMobile && "flex-grow: 1; width: 100%; margin: 0;",
47031
- disabled: isInCustomerManagement
47056
+ disabled: disableActions
47032
47057
  }))));
47033
47058
  };
47034
47059
 
@@ -47039,8 +47064,8 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
47039
47064
  removeAccount = _ref.removeAccount,
47040
47065
  accountType = _ref.accountType,
47041
47066
  isMobile = _ref.isMobile,
47042
- _ref$isInCustomerMana = _ref.isInCustomerManagement,
47043
- isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
47067
+ _ref$disableActions = _ref.disableActions,
47068
+ disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
47044
47069
  var _useState = React.useState(false),
47045
47070
  _useState2 = _slicedToArray(_useState, 2),
47046
47071
  modalIsOpen = _useState2[0],
@@ -47053,10 +47078,10 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
47053
47078
  }, "".concat(agencyName, " - ")) : "";
47054
47079
  var identifier = accountType === "Account" && obligations.length > 1 ? "accounts" : accountType === "Property" && obligations.length > 1 ? "properties" : accountType.toLowerCase();
47055
47080
  return /*#__PURE__*/React__default.createElement(Modal$1, {
47056
- showModal: function showModal() {
47081
+ showModal: disableActions ? noop : function () {
47057
47082
  return setModalIsOpen(true);
47058
47083
  },
47059
- hideModal: function hideModal() {
47084
+ hideModal: disableActions ? noop : function () {
47060
47085
  return setModalIsOpen(false);
47061
47086
  },
47062
47087
  modalOpen: modalIsOpen,
@@ -47064,8 +47089,10 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
47064
47089
  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
47090
  continueButtonText: "Remove",
47066
47091
  continueAction: function continueAction() {
47067
- removeAccount();
47068
- setModalIsOpen(false);
47092
+ if (!disableActions) {
47093
+ removeAccount();
47094
+ setModalIsOpen(false);
47095
+ }
47069
47096
  },
47070
47097
  useDangerButton: true
47071
47098
  }, /*#__PURE__*/React__default.createElement(Box, {
@@ -47073,13 +47100,13 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
47073
47100
  extraStyles: "flex-grow: 1;"
47074
47101
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
47075
47102
  text: "Remove",
47076
- variant: isInCustomerManagement ? "disabledSecondary" : "secondary",
47077
- action: isInCustomerManagement ? noop : function () {
47103
+ variant: "secondary",
47104
+ action: disableActions ? noop : function () {
47078
47105
  return setModalIsOpen(true);
47079
47106
  },
47080
47107
  dataQa: "Remove Account",
47081
47108
  extraStyles: isMobile ? "flex-grow: 1; width: 100%; margin: 0;" : "flex-grow: 1;",
47082
- disabled: isInCustomerManagement
47109
+ disabled: disableActions
47083
47110
  })));
47084
47111
  };
47085
47112
 
@@ -47100,8 +47127,8 @@ var InactiveControlsModule = function InactiveControlsModule(_ref) {
47100
47127
  description = _ref.description,
47101
47128
  subDescription = _ref.subDescription,
47102
47129
  allowedPaymentInstruments = _ref.allowedPaymentInstruments,
47103
- _ref$isInCustomerMana = _ref.isInCustomerManagement,
47104
- isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
47130
+ _ref$disableActions = _ref.disableActions,
47131
+ disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
47105
47132
  var _useState = React.useState(false),
47106
47133
  _useState2 = _slicedToArray(_useState, 2),
47107
47134
  modalOpen = _useState2[0],
@@ -47140,16 +47167,21 @@ var InactiveControlsModule = function InactiveControlsModule(_ref) {
47140
47167
  description: description,
47141
47168
  subDescription: subDescription,
47142
47169
  allowedPaymentInstruments: allowedPaymentInstruments,
47143
- isInCustomerManagement: isInCustomerManagement
47170
+ disableActions: disableActions,
47171
+ action: disableActions ? noop$1 : toggleModal(true),
47172
+ onClick: disableActions ? noop$1 : toggleModal(true),
47173
+ onKeyPress: disableActions ? noop$1 : function (e) {
47174
+ e.key === "Enter" && toggleModal(true);
47175
+ }
47144
47176
  })), /*#__PURE__*/React__default.createElement(Box, {
47145
47177
  padding: "0",
47146
47178
  extraStyles: "flex-grow: 1;"
47147
47179
  }, /*#__PURE__*/React__default.createElement(RemoveAccountModalModule, {
47148
47180
  agencyName: agencyName,
47149
- removeAccount: isInCustomerManagement ? noop$1 : handleRemoveAccount,
47181
+ removeAccount: disableActions ? noop$1 : handleRemoveAccount,
47150
47182
  accountType: configType === "ACCOUNT" ? "Account" : "Property",
47151
47183
  isMobile: isMobile,
47152
- isInCustomerManagement: isInCustomerManagement
47184
+ disableActions: disableActions
47153
47185
  }))));
47154
47186
  };
47155
47187
 
@@ -47279,7 +47311,8 @@ var Obligation = function Obligation(_ref) {
47279
47311
  nextAutopayDate: nextAutopayDate,
47280
47312
  description: description,
47281
47313
  subDescription: subDescription,
47282
- allowedPaymentInstruments: allowedPaymentInstruments
47314
+ allowedPaymentInstruments: allowedPaymentInstruments,
47315
+ disableActions: isInCustomerManagement
47283
47316
  }))), !isMobile && /*#__PURE__*/React__default.createElement(PaymentDetailsActions, {
47284
47317
  obligations: obligations,
47285
47318
  autoPayEnabled: autoPayEnabled,
@@ -47298,7 +47331,7 @@ var Obligation = function Obligation(_ref) {
47298
47331
  description: description,
47299
47332
  subDescription: subDescription,
47300
47333
  allowedPaymentInstruments: allowedPaymentInstruments,
47301
- isInCustomerManagement: isInCustomerManagement
47334
+ disableActions: isInCustomerManagement
47302
47335
  }))), isMobile && /*#__PURE__*/React__default.createElement(PaymentDetailsActions, {
47303
47336
  obligations: obligations,
47304
47337
  autoPayEnabled: autoPayEnabled,
@@ -47317,7 +47350,7 @@ var Obligation = function Obligation(_ref) {
47317
47350
  description: description,
47318
47351
  subDescription: subDescription,
47319
47352
  allowedPaymentInstruments: allowedPaymentInstruments,
47320
- isInCustomerManagement: isInCustomerManagement
47353
+ disableActions: isInCustomerManagement
47321
47354
  }));
47322
47355
  var inactiveObligation = /*#__PURE__*/React__default.createElement(Box, {
47323
47356
  padding: "0",
@@ -47374,7 +47407,7 @@ var Obligation = function Obligation(_ref) {
47374
47407
  description: description,
47375
47408
  subDescription: subDescription,
47376
47409
  allowedPaymentInstruments: allowedPaymentInstruments,
47377
- isInCustomerManagement: isInCustomerManagement
47410
+ disableActions: isInCustomerManagement
47378
47411
  }))), isMobile && /*#__PURE__*/React__default.createElement(InactiveControlsModule, {
47379
47412
  obligations: obligations,
47380
47413
  autoPayEnabled: autoPayEnabled,
@@ -47392,7 +47425,7 @@ var Obligation = function Obligation(_ref) {
47392
47425
  description: description,
47393
47426
  subDescription: subDescription,
47394
47427
  allowedPaymentInstruments: allowedPaymentInstruments,
47395
- isInCustomerManagement: isInCustomerManagement
47428
+ disableActions: isInCustomerManagement
47396
47429
  }))));
47397
47430
  return inactive ? inactiveObligation : activeObligation;
47398
47431
  };