@thecb/components 10.6.5-beta.1 → 10.6.6-beta.1

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
@@ -6296,7 +6296,7 @@ var displayCardBrand = function displayCardBrand(number) {
6296
6296
  return "Mastercard";
6297
6297
  } else if (/^4/.test(number)) {
6298
6298
  return "Visa";
6299
- } else if (/^3[4,7]/.test(number)) {
6299
+ } else if (/^3[4,7]\d{13}$/.test(number)) {
6300
6300
  return "American Express";
6301
6301
  } else return "Unknown Card";
6302
6302
  };
@@ -39722,9 +39722,7 @@ var WalletName = function WalletName(_ref) {
39722
39722
  _ref$linkButtonExtraS = _ref.linkButtonExtraStyles,
39723
39723
  linkButtonExtraStyles = _ref$linkButtonExtraS === void 0 ? "" : _ref$linkButtonExtraS,
39724
39724
  _ref$isLoading = _ref.isLoading,
39725
- isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
39726
- _ref$dataQa = _ref.dataQa,
39727
- dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
39725
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
39728
39726
  var _useContext = useContext(ThemeContext),
39729
39727
  isMobile = _useContext.isMobile;
39730
39728
  return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Module$1, {
@@ -39754,7 +39752,6 @@ var WalletName = function WalletName(_ref) {
39754
39752
  }, text), (text || actionText) && /*#__PURE__*/React.createElement(React.Fragment, null, "\xA0"), action && actionText && /*#__PURE__*/React.createElement(ButtonWithAction, {
39755
39753
  disabled: disableAction,
39756
39754
  text: actionText,
39757
- dataQa: dataQa,
39758
39755
  action: action,
39759
39756
  variant: "smallGhost",
39760
39757
  extraStyles: "\n margin: 0;\n min-width: 0;\n span {font-size: 0.75rem;}\n ".concat(linkButtonExtraStyles, "\n ")
@@ -48542,11 +48539,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
48542
48539
  buttonGroupStyles = _ref.buttonGroupStyles,
48543
48540
  _ref$hideAdditionalBu = _ref.hideAdditionalButton,
48544
48541
  hideAdditionalButton = _ref$hideAdditionalBu === void 0 ? false : _ref$hideAdditionalBu,
48545
- additionalButton = _ref.additionalButton,
48546
- _ref$nextButtonTestId = _ref.nextButtonTestId,
48547
- nextButtonTestId = _ref$nextButtonTestId === void 0 ? null : _ref$nextButtonTestId,
48548
- _ref$backButtonTestId = _ref.backButtonTestId,
48549
- backButtonTestId = _ref$backButtonTestId === void 0 ? null : _ref$backButtonTestId;
48542
+ additionalButton = _ref.additionalButton;
48550
48543
  var _useContext = useContext(ThemeContext),
48551
48544
  isMobile = _useContext.isMobile;
48552
48545
  var backButton = !!cancelURL && !!cancelText ? /*#__PURE__*/React.createElement(ButtonWithLink, {
@@ -48554,7 +48547,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
48554
48547
  url: cancelURL,
48555
48548
  variant: backButtonVariant,
48556
48549
  extraStyles: isMobile && "flex-grow: 1",
48557
- dataQa: backButtonTestId || cancelText,
48550
+ dataQa: cancelText,
48558
48551
  "aria-labelledby": "".concat(kebabCaseString(cancelText), "-button"),
48559
48552
  role: "link"
48560
48553
  }) : backButtonAction && /*#__PURE__*/React.createElement(ButtonWithAction, {
@@ -48571,7 +48564,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
48571
48564
  text: redirectText,
48572
48565
  variant: forwardButtonVariant,
48573
48566
  extraStyles: isMobile && "flex-grow: 1",
48574
- dataQa: nextButtonTestId || redirectText,
48567
+ dataQa: redirectText,
48575
48568
  disabled: isForwardButtonDisabled,
48576
48569
  "aria-labelledby": "".concat(kebabCaseString(redirectText), "-button"),
48577
48570
  role: forwardButtonAriaRole
@@ -48581,7 +48574,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
48581
48574
  action: forwardButtonAction,
48582
48575
  isLoading: forwardButtonLoading,
48583
48576
  extraStyles: isMobile && "flex-grow: 1",
48584
- dataQa: nextButtonTestId || forwardButtonText,
48577
+ dataQa: forwardButtonText,
48585
48578
  disabled: isForwardButtonDisabled,
48586
48579
  "aria-labelledby": "".concat(kebabCaseString(forwardButtonText), "-button"),
48587
48580
  role: forwardButtonAriaRole
@@ -49550,7 +49543,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
49550
49543
  }
49551
49544
  }, []);
49552
49545
  var nameOnCardErrors = _defineProperty({}, required.error, "Name is required");
49553
- var creditCardNumberErrors = _defineProperty(_defineProperty(_defineProperty({}, required.error, "Credit card number is required"), hasLength.error, "Credit card number is invalid"), matchesRegex.error, "".concat(displayCardBrand(fields.creditCardNumber.rawValue), " is not accepted"));
49546
+ var creditCardNumberErrors = _defineProperty(_defineProperty(_defineProperty({}, required.error, "Credit card number is required"), hasLength.error, "Credit card number is invalid"), matchesRegex.error, "".concat(displayCardBrand(fields.creditCardNumber.rawValue), " cards are not available for payment"));
49554
49547
  var expirationDateErrors = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, required.error, "Expiration date is required"), hasLength.error, "Expiration date is invalid"), isValidMonth.error, "Expiration month is invalid"), dateAfterToday.error, "Expiration date is invalid");
49555
49548
  var cvvErrors = _defineProperty(_defineProperty({}, required.error, "CVV is required"), hasLength.error, "CVV is invalid");
49556
49549
  var zipCodeErrors = _defineProperty(_defineProperty({}, required.error, "Zip code is required"), hasLength.error, "Zip code is invalid");