@thecb/components 5.8.1-beta.3 → 5.8.1-beta.6

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
@@ -40367,7 +40367,7 @@ var AutopayModal = function AutopayModal(_ref) {
40367
40367
  toggleModal(true);
40368
40368
  },
40369
40369
  dataQa: "Turn off Autopay",
40370
- extraStyles: isMobile && "flex-grow: 1; width: 100%;"
40370
+ extraStyles: isMobile ? "flex-grow: 1; width: 100%;" : "margin: 0px"
40371
40371
  });
40372
40372
  }
40373
40373
 
@@ -40639,7 +40639,8 @@ var InactiveControlsModule = function InactiveControlsModule(_ref) {
40639
40639
  border: isMobile ? "1px solid ".concat(GHOST_GREY) : "0px",
40640
40640
  borderWidthOverride: isMobile ? "1px 0 0 0" : "0px"
40641
40641
  }, /*#__PURE__*/React.createElement(Cluster, {
40642
- childGap: isMobile ? "8px" : "18px"
40642
+ childGap: isMobile ? "8px" : "16px",
40643
+ nowrap: true
40643
40644
  }, autoPayEnabled && /*#__PURE__*/React.createElement(Box, {
40644
40645
  padding: "0",
40645
40646
  extraStyles: "flex-grow: 1;"
@@ -40664,7 +40665,7 @@ var InactiveControlsModule = function InactiveControlsModule(_ref) {
40664
40665
  text: "Remove",
40665
40666
  action: handleRemoveAccount,
40666
40667
  dataQa: "Remove Account",
40667
- extraStyles: isMobile && "flex-grow: 1; width: 100%;"
40668
+ extraStyles: isMobile ? "flex-grow: 1; width: 100%;" : "margin: 0px;"
40668
40669
  }))));
40669
40670
  };
40670
40671
 
@@ -40698,7 +40699,7 @@ var InactiveTitleModule = function InactiveTitleModule(_ref) {
40698
40699
  };
40699
40700
 
40700
40701
  var Obligation = function Obligation(_ref) {
40701
- var _obligation$customAtt;
40702
+ var _firstObligation$cust, _firstObligation$desc, _firstObligation$subD;
40702
40703
 
40703
40704
  var config = _ref.config,
40704
40705
  obligations = _ref.obligations,
@@ -40722,21 +40723,31 @@ var Obligation = function Obligation(_ref) {
40722
40723
  inactiveLookupInput = _ref$inactiveLookupIn === void 0 ? "Account" : _ref$inactiveLookupIn,
40723
40724
  _ref$inactiveLookupVa = _ref.inactiveLookupValue,
40724
40725
  inactiveLookupValue = _ref$inactiveLookupVa === void 0 ? "" : _ref$inactiveLookupVa;
40725
- var obligation = obligations[0];
40726
- var customAttributes = (_obligation$customAtt = obligation === null || obligation === void 0 ? void 0 : obligation.customAttributes) !== null && _obligation$customAtt !== void 0 ? _obligation$customAtt : {};
40726
+
40727
+ /*
40728
+ The value of obligations is always an array. It can contain:
40729
+ - A single obligation
40730
+ - A group of obligations (a "collection")
40731
+
40732
+ The top level desc/subdesc for all obligations in a collection is the same
40733
+ (Collection accounts look different in the Account Details page)
40734
+ */
40735
+ var firstObligation = obligations[0];
40736
+ var customAttributes = (_firstObligation$cust = firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.customAttributes) !== null && _firstObligation$cust !== void 0 ? _firstObligation$cust : {};
40727
40737
  var boxShadowValue = "0px 4px 4px rgba(41, 42, 51, 0.1), 0px 1px 1px 2px rgba(41, 42, 51, 0.1);";
40728
40738
  var activeObligation = /*#__PURE__*/React.createElement(Box, {
40729
40739
  padding: "0",
40730
40740
  borderRadius: "4px",
40731
40741
  boxShadow: boxShadowValue,
40732
40742
  as: "section",
40733
- "aria-label": "".concat(obligation.description, " ").concat(obligation.subDescription)
40743
+ "aria-label": "".concat((_firstObligation$desc = firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.description) !== null && _firstObligation$desc !== void 0 ? _firstObligation$desc : "account", " ").concat((_firstObligation$subD = firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.subDescription) !== null && _firstObligation$subD !== void 0 ? _firstObligation$subD : obligationAssocID)
40734
40744
  }, /*#__PURE__*/React.createElement(Box, {
40735
- background: WHITE
40745
+ background: WHITE,
40746
+ padding: "24px 16px"
40736
40747
  }, /*#__PURE__*/React.createElement(Stack, {
40737
40748
  childGap: "14px"
40738
40749
  }, /*#__PURE__*/React.createElement(Box, {
40739
- key: "".concat(obligations[0].id, "-top"),
40750
+ key: "".concat(firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.id, "-top"),
40740
40751
  padding: "0 8px",
40741
40752
  minWidth: "100%"
40742
40753
  }, /*#__PURE__*/React.createElement(Cluster, {
@@ -40756,12 +40767,12 @@ var Obligation = function Obligation(_ref) {
40756
40767
  iconValue: config.iconValue,
40757
40768
  customAttributes: customAttributes
40758
40769
  }), /*#__PURE__*/React.createElement(TitleModule, {
40759
- title: obligation.description,
40760
- subtitle: obligation.subDescription,
40770
+ title: firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.description,
40771
+ subtitle: firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.subDescription,
40761
40772
  titleColor: BRIGHT_GREY,
40762
40773
  isMobile: isMobile
40763
40774
  }))), !isMobile && /*#__PURE__*/React.createElement(AmountModule, {
40764
- totalAmountDue: obligations.reduce(function (acc, curr) {
40775
+ totalAmountDue: obligations === null || obligations === void 0 ? void 0 : obligations.reduce(function (acc, curr) {
40765
40776
  return acc + curr.amountDue;
40766
40777
  }, 0),
40767
40778
  autoPayEnabled: autoPayEnabled,
@@ -40812,7 +40823,7 @@ var Obligation = function Obligation(_ref) {
40812
40823
  }, /*#__PURE__*/React.createElement(Stack, {
40813
40824
  childGap: "14px"
40814
40825
  }, /*#__PURE__*/React.createElement(Box, {
40815
- key: "".concat(obligations[0].id, "-top"),
40826
+ key: "".concat(obligationAssocID, "-top"),
40816
40827
  padding: "0 8px",
40817
40828
  minWidth: "100%"
40818
40829
  }, /*#__PURE__*/React.createElement(Cluster, {