@thecb/components 9.2.5-beta.0 → 9.2.6-beta.0

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.
Files changed (28) hide show
  1. package/dist/index.cjs.js +126 -54
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +126 -54
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +49322 -0
  6. package/package.json +1 -1
  7. package/src/.DS_Store +0 -0
  8. package/src/components/.DS_Store +0 -0
  9. package/src/components/atoms/.DS_Store +0 -0
  10. package/src/components/atoms/country-dropdown/CountryDropdown.js +2 -0
  11. package/src/components/atoms/dropdown/Dropdown.js +7 -4
  12. package/src/components/atoms/form-layouts/FormInput.js +3 -0
  13. package/src/components/atoms/form-select/FormSelect.js +3 -1
  14. package/src/components/atoms/icons/.DS_Store +0 -0
  15. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +3 -1
  16. package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.js +2 -0
  17. package/src/components/molecules/address-form/AddressForm.js +5 -0
  18. package/src/components/molecules/email-form/EmailForm.js +3 -1
  19. package/src/components/molecules/modal/Modal.js +17 -3
  20. package/src/components/molecules/payment-form-ach/PaymentFormACH.js +6 -0
  21. package/src/components/molecules/payment-form-card/PaymentFormCard.js +5 -0
  22. package/src/components/molecules/phone-form/PhoneForm.js +3 -1
  23. package/src/components/molecules/radio-section/RadioSection.js +9 -2
  24. package/src/components/molecules/radio-section/RadioSection.stories.js +4 -2
  25. package/src/components/molecules/radio-section/radio-button/RadioButton.js +3 -1
  26. package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +1 -0
  27. package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +1 -0
  28. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +5 -1
package/dist/index.cjs.js CHANGED
@@ -23799,7 +23799,9 @@ var Dropdown = function Dropdown(_ref13) {
23799
23799
  _ref13$smoothScroll = _ref13.smoothScroll,
23800
23800
  smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
23801
23801
  _ref13$ariaInvalid = _ref13.ariaInvalid,
23802
- ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid;
23802
+ ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
23803
+ _ref13$isRequired = _ref13.isRequired,
23804
+ isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
23803
23805
 
23804
23806
  var _useState = React.useState(""),
23805
23807
  _useState2 = _slicedToArray(_useState, 2),
@@ -23996,7 +23998,9 @@ var Dropdown = function Dropdown(_ref13) {
23996
23998
  }
23997
23999
 
23998
24000
  setFilteredOptions(options.filter(function (option) {
23999
- return option.value.toLowerCase().match(inputValue.toLowerCase()) || option.text.toLowerCase().match(inputValue.toLowerCase());
24001
+ var _option$value, _option$value$toLower, _option$text, _option$text$toLowerC;
24002
+
24003
+ return (option === null || option === void 0 ? void 0 : (_option$value = option.value) === null || _option$value === void 0 ? void 0 : (_option$value$toLower = _option$value.toLowerCase()) === null || _option$value$toLower === void 0 ? void 0 : _option$value$toLower.indexOf(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase())) >= 0 || ((_option$text = option.text) === null || _option$text === void 0 ? void 0 : (_option$text$toLowerC = _option$text.toLowerCase()) === null || _option$text$toLowerC === void 0 ? void 0 : _option$text$toLowerC.indexOf(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase())) >= 0;
24000
24004
  }));
24001
24005
  }, [inputValue]);
24002
24006
  React.useEffect(function () {
@@ -24070,7 +24074,7 @@ var Dropdown = function Dropdown(_ref13) {
24070
24074
  },
24071
24075
  padding: "12px",
24072
24076
  placeholder: getSelection(),
24073
- required: options.required,
24077
+ required: options.required || isRequired,
24074
24078
  role: "combobox",
24075
24079
  themeValues: themeValues,
24076
24080
  title: hasTitles ? getSelection() : null,
@@ -24238,7 +24242,9 @@ var FormSelect = function FormSelect(_ref) {
24238
24242
  _ref$dataQa = _ref.dataQa,
24239
24243
  dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
24240
24244
  _ref$widthFitOptions = _ref.widthFitOptions,
24241
- widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions;
24245
+ widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
24246
+ _ref$isRequired = _ref.isRequired,
24247
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
24242
24248
 
24243
24249
  var _useState = React.useState(false),
24244
24250
  _useState2 = _slicedToArray(_useState, 2),
@@ -24300,7 +24306,8 @@ var FormSelect = function FormSelect(_ref) {
24300
24306
  },
24301
24307
  disabled: disabled,
24302
24308
  autocompleteValue: autocompleteValue,
24303
- smoothScroll: smoothScroll
24309
+ smoothScroll: smoothScroll,
24310
+ isRequired: isRequired
24304
24311
  }), /*#__PURE__*/React__default.createElement(Stack, {
24305
24312
  direction: "row",
24306
24313
  justify: "space-between"
@@ -25071,6 +25078,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
25071
25078
  fieldActions = _ref.fieldActions,
25072
25079
  showErrors = _ref.showErrors,
25073
25080
  onChange = _ref.onChange,
25081
+ _ref$isRequired = _ref.isRequired,
25082
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
25074
25083
  _ref$dataQa = _ref.dataQa,
25075
25084
  dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
25076
25085
  return /*#__PURE__*/React__default.createElement(FormSelect$1, {
@@ -25082,7 +25091,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
25082
25091
  errorMessages: errorMessages,
25083
25092
  showErrors: showErrors,
25084
25093
  onChange: onChange,
25085
- autocompleteValue: "country-name"
25094
+ autocompleteValue: "country-name",
25095
+ isRequired: isRequired
25086
25096
  });
25087
25097
  };
25088
25098
 
@@ -25929,7 +25939,7 @@ var fallbackValues$k = {
25929
25939
  };
25930
25940
 
25931
25941
  var _excluded$p = ["showErrors", "themeValues"],
25932
- _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
25942
+ _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
25933
25943
  var InputField = styled__default.input.withConfig({
25934
25944
  displayName: "FormInput__InputField",
25935
25945
  componentId: "sc-l094r1-0"
@@ -26016,6 +26026,8 @@ var FormInput = function FormInput(_ref15) {
26016
26026
  removeFromValue = _ref15.removeFromValue,
26017
26027
  _ref15$dataQa = _ref15.dataQa,
26018
26028
  dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
26029
+ _ref15$isRequired = _ref15.isRequired,
26030
+ isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
26019
26031
  props = _objectWithoutProperties(_ref15, _excluded2);
26020
26032
 
26021
26033
  var _useState = React.useState(false),
@@ -26102,7 +26114,8 @@ var FormInput = function FormInput(_ref15) {
26102
26114
  $customHeight: customHeight,
26103
26115
  $extraStyles: extraStyles,
26104
26116
  "data-qa": dataQa || labelTextWhenNoError,
26105
- autoComplete: autocompleteValue
26117
+ autoComplete: autocompleteValue,
26118
+ required: isRequired
26106
26119
  }, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
26107
26120
  "aria-labelledby": createIdFromString(labelTextWhenNoError),
26108
26121
  "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
@@ -26121,7 +26134,8 @@ var FormInput = function FormInput(_ref15) {
26121
26134
  $customHeight: customHeight,
26122
26135
  $extraStyles: extraStyles,
26123
26136
  "data-qa": dataQa || labelTextWhenNoError,
26124
- autoComplete: autocompleteValue
26137
+ autoComplete: autocompleteValue,
26138
+ required: isRequired
26125
26139
  }, props))), /*#__PURE__*/React__default.createElement(Stack, {
26126
26140
  direction: "row",
26127
26141
  justify: "space-between",
@@ -27363,7 +27377,9 @@ var RadioButton$1 = function RadioButton(_ref2) {
27363
27377
  _ref2$ariaLabelledBy = _ref2.ariaLabelledBy,
27364
27378
  ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
27365
27379
  _ref2$ariaLabel = _ref2.ariaLabel,
27366
- ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel;
27380
+ ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
27381
+ _ref2$isRequired = _ref2.isRequired,
27382
+ isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
27367
27383
  var buttonBorder = {
27368
27384
  onFocused: {
27369
27385
  borderColor: themeValues.activeColor,
@@ -27425,7 +27441,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
27425
27441
  disabled: disabled,
27426
27442
  onClick: toggleRadio,
27427
27443
  "aria-describedby": ariaDescribedBy,
27428
- tabIndex: "-1"
27444
+ tabIndex: "-1",
27445
+ required: isRequired
27429
27446
  }, extraProps)), /*#__PURE__*/React__default.createElement(Motion, {
27430
27447
  borderWidth: "1px",
27431
27448
  borderStyle: "solid",
@@ -38115,7 +38132,9 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
38115
38132
  field = _ref.field,
38116
38133
  fieldActions = _ref.fieldActions,
38117
38134
  showErrors = _ref.showErrors,
38118
- countryCode = _ref.countryCode;
38135
+ countryCode = _ref.countryCode,
38136
+ _ref$isRequired = _ref.isRequired,
38137
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
38119
38138
  var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
38120
38139
  var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
38121
38140
  return /*#__PURE__*/React__default.createElement(FormSelect$1, {
@@ -38125,7 +38144,8 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
38125
38144
  labelTextWhenNoError: labelTextWhenNoError,
38126
38145
  errorMessages: errorMessages,
38127
38146
  showErrors: showErrors,
38128
- autocompleteValue: "address-level1"
38147
+ autocompleteValue: "address-level1",
38148
+ isRequired: isRequired
38129
38149
  });
38130
38150
  };
38131
38151
 
@@ -39464,7 +39484,8 @@ var AddressForm = function AddressForm(_ref) {
39464
39484
  }
39465
39485
  },
39466
39486
  showErrors: showErrors,
39467
- dataQa: "Country"
39487
+ dataQa: "Country",
39488
+ isRequired: true
39468
39489
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
39469
39490
  labelTextWhenNoError: "Address",
39470
39491
  errorMessages: street1ErrorMessages,
@@ -39475,7 +39496,8 @@ var AddressForm = function AddressForm(_ref) {
39475
39496
  return e.key === "Enter" && handleSubmit(e);
39476
39497
  },
39477
39498
  autocompleteValue: "address-line1",
39478
- dataQa: "Address"
39499
+ dataQa: "Address",
39500
+ isRequired: true
39479
39501
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
39480
39502
  labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
39481
39503
  field: fields.street2,
@@ -39496,7 +39518,8 @@ var AddressForm = function AddressForm(_ref) {
39496
39518
  return e.key === "Enter" && handleSubmit(e);
39497
39519
  },
39498
39520
  autocompleteValue: "address-level2",
39499
- dataQa: "City"
39521
+ dataQa: "City",
39522
+ isRequired: true
39500
39523
  }), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
39501
39524
  labelTextWhenNoError: isUS ? "State" : "State or Province",
39502
39525
  errorMessages: stateProvinceErrorMessages,
@@ -39507,7 +39530,8 @@ var AddressForm = function AddressForm(_ref) {
39507
39530
  onKeyDown: function onKeyDown(e) {
39508
39531
  return e.key === "Enter" && handleSubmit(e);
39509
39532
  },
39510
- dataQa: "State or Province"
39533
+ dataQa: "State or Province",
39534
+ isRequired: true
39511
39535
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
39512
39536
  isNum: isUS,
39513
39537
  formatter: isUS ? zipFormat : null,
@@ -39520,7 +39544,8 @@ var AddressForm = function AddressForm(_ref) {
39520
39544
  return e.key === "Enter" && handleSubmit(e);
39521
39545
  },
39522
39546
  autocompleteValue: "postal-code",
39523
- dataQa: "Zip code"
39547
+ dataQa: "Zip code",
39548
+ isRequired: true
39524
39549
  }), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
39525
39550
  name: "address checkbox",
39526
39551
  title: "Save address to wallet",
@@ -40423,7 +40448,9 @@ var EmailForm = function EmailForm(_ref) {
40423
40448
  handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
40424
40449
  showWalletCheckbox = _ref.showWalletCheckbox,
40425
40450
  saveToWallet = _ref.saveToWallet,
40426
- walletCheckboxMarked = _ref.walletCheckboxMarked;
40451
+ walletCheckboxMarked = _ref.walletCheckboxMarked,
40452
+ _ref$isRequired = _ref.isRequired,
40453
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
40427
40454
 
40428
40455
  if (clearOnDismount) {
40429
40456
  React.useEffect(function () {
@@ -40452,7 +40479,8 @@ var EmailForm = function EmailForm(_ref) {
40452
40479
  },
40453
40480
  isEmail: true,
40454
40481
  autocompleteValue: "email",
40455
- dataQa: "Email address"
40482
+ dataQa: "Email address",
40483
+ isRequired: isRequired
40456
40484
  }), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
40457
40485
  name: "email checkbox",
40458
40486
  title: "Save email address to wallet",
@@ -45725,7 +45753,9 @@ var Modal$1 = function Modal(_ref) {
45725
45753
  buttonExtraStyles = _ref.buttonExtraStyles,
45726
45754
  children = _ref.children,
45727
45755
  _ref$dataQa = _ref.dataQa,
45728
- dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
45756
+ dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
45757
+ _ref$initialFocus = _ref.initialFocus,
45758
+ initialFocus = _ref$initialFocus === void 0 ? null : _ref$initialFocus;
45729
45759
 
45730
45760
  var _useContext = React.useContext(styled.ThemeContext),
45731
45761
  isMobile = _useContext.isMobile;
@@ -45735,7 +45765,7 @@ var Modal$1 = function Modal(_ref) {
45735
45765
  ref: modalContainerRef,
45736
45766
  "data-qa": dataQa
45737
45767
  }, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal // fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
45738
- , {
45768
+ , _extends({
45739
45769
  focusTrapOptions: {
45740
45770
  fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
45741
45771
  },
@@ -45749,11 +45779,14 @@ var Modal$1 = function Modal(_ref) {
45749
45779
  alignItems: "center"
45750
45780
  },
45751
45781
  dialogStyle: {
45752
- width: customWidth || "615px",
45753
- overflow: "auto"
45782
+ width: customWidth || "615px"
45754
45783
  },
45755
- underlayClickExits: underlayClickExits
45756
- }, /*#__PURE__*/React__default.createElement(Box, {
45784
+ underlayClickExits: underlayClickExits,
45785
+ "aria-modal": true,
45786
+ "aria-name": modalHeaderText
45787
+ }, initialFocus ? {
45788
+ initialFocus: initialFocus
45789
+ } : {}), /*#__PURE__*/React__default.createElement(Box, {
45757
45790
  padding: "0",
45758
45791
  borderRadius: "2px",
45759
45792
  boxShadow: "inset 0px -2px 0px 0px rgb(0, 80, 149)"
@@ -45799,7 +45832,9 @@ var Modal$1 = function Modal(_ref) {
45799
45832
  text: cancelButtonText,
45800
45833
  dataQa: cancelButtonText,
45801
45834
  extraStyles: buttonExtraStyles,
45802
- className: "modal-cancel-button"
45835
+ className: "modal-cancel-button",
45836
+ role: "button",
45837
+ name: cancelButtonText
45803
45838
  })), /*#__PURE__*/React__default.createElement(Box, {
45804
45839
  width: "100%",
45805
45840
  padding: "0"
@@ -45811,7 +45846,9 @@ var Modal$1 = function Modal(_ref) {
45811
45846
  isLoading: isLoading,
45812
45847
  disabled: isContinueActionDisabled,
45813
45848
  extraStyles: buttonExtraStyles,
45814
- className: "modal-continue-button"
45849
+ className: "modal-continue-button",
45850
+ role: "button",
45851
+ name: continueButtonText
45815
45852
  }))) : /*#__PURE__*/React__default.createElement(Stack, {
45816
45853
  childGap: "1rem",
45817
45854
  direction: "row",
@@ -45822,7 +45859,9 @@ var Modal$1 = function Modal(_ref) {
45822
45859
  text: cancelButtonText,
45823
45860
  dataQa: cancelButtonText,
45824
45861
  extraStyles: buttonExtraStyles,
45825
- className: "modal-cancel-button"
45862
+ className: "modal-cancel-button",
45863
+ role: "button",
45864
+ name: cancelButtonText
45826
45865
  }), /*#__PURE__*/React__default.createElement(ButtonWithAction, {
45827
45866
  variant: useDangerButton ? "danger" : "primary",
45828
45867
  action: continueAction,
@@ -45831,7 +45870,9 @@ var Modal$1 = function Modal(_ref) {
45831
45870
  isLoading: isLoading,
45832
45871
  disabled: isContinueActionDisabled,
45833
45872
  extraStyles: buttonExtraStyles,
45834
- className: "modal-continue-button"
45873
+ className: "modal-continue-button",
45874
+ role: "button",
45875
+ name: continueButtonText
45835
45876
  }))) : /*#__PURE__*/React__default.createElement(Box, {
45836
45877
  padding: "0.5rem"
45837
45878
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
@@ -45840,7 +45881,9 @@ var Modal$1 = function Modal(_ref) {
45840
45881
  text: closeButtonText,
45841
45882
  dataQa: closeButtonText,
45842
45883
  extraStyles: buttonExtraStyles,
45843
- className: "modal-close-button"
45884
+ className: "modal-close-button",
45885
+ role: "button",
45886
+ name: closeButtonText
45844
45887
  }))))))))), children);
45845
45888
  };
45846
45889
 
@@ -47685,7 +47728,9 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
47685
47728
  color: themeValues.linkColor,
47686
47729
  weight: themeValues.fontWeight,
47687
47730
  hoverStyles: themeValues.modalLinkHoverFocus,
47688
- extraStyles: "cursor: pointer;"
47731
+ extraStyles: "cursor: pointer;",
47732
+ role: "button",
47733
+ className: "modal-trigger"
47689
47734
  }, link));
47690
47735
  };
47691
47736
 
@@ -47742,8 +47787,10 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47742
47787
  variant = _ref.variant,
47743
47788
  _ref$linkVariant = _ref.linkVariant,
47744
47789
  linkVariant = _ref$linkVariant === void 0 ? "p" : _ref$linkVariant,
47745
- themeValues = _ref.themeValues;
47746
- return /*#__PURE__*/React__default.createElement(Modal$1, {
47790
+ themeValues = _ref.themeValues,
47791
+ _ref$initialFocus = _ref.initialFocus,
47792
+ initialFocus = _ref$initialFocus === void 0 ? null : _ref$initialFocus;
47793
+ return /*#__PURE__*/React__default.createElement(Modal$1, _extends({
47747
47794
  modalOpen: isOpen,
47748
47795
  hideModal: function hideModal() {
47749
47796
  return toggleOpen(false);
@@ -47769,7 +47816,9 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47769
47816
  toggleAccepted(true);
47770
47817
  toggleOpen(false);
47771
47818
  }
47772
- }, /*#__PURE__*/React__default.createElement(Text$1, {
47819
+ }, initialFocus ? {
47820
+ initialFocus: initialFocus
47821
+ } : {}), /*#__PURE__*/React__default.createElement(Text$1, {
47773
47822
  variant: linkVariant,
47774
47823
  onClick: function onClick() {
47775
47824
  return toggleOpen(true);
@@ -47781,7 +47830,9 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47781
47830
  color: themeValues.linkColor,
47782
47831
  weight: themeValues.fontWeight,
47783
47832
  hoverStyles: themeValues.modalLinkHoverFocus,
47784
- extraStyles: "display: inline-block; width: fit-content; cursor: pointer"
47833
+ extraStyles: "display: inline-block; width: fit-content; cursor: pointer",
47834
+ role: "button",
47835
+ className: "modal-trigger"
47785
47836
  }, link));
47786
47837
  };
47787
47838
 
@@ -47816,7 +47867,8 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47816
47867
  terms: terms,
47817
47868
  isOpen: showTerms,
47818
47869
  toggleOpen: toggleShowTerms,
47819
- linkVariant: linkVariant
47870
+ linkVariant: linkVariant,
47871
+ initialFocus: "[role=\"button\"]:not(.modal-trigger)"
47820
47872
  })))));
47821
47873
  };
47822
47874
 
@@ -47899,7 +47951,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47899
47951
  isOpen: showTerms,
47900
47952
  toggleOpen: toggleTerms,
47901
47953
  linkVariant: modalVariant,
47902
- title: modalTitle
47954
+ title: modalTitle,
47955
+ initialFocus: ".modal-close-button"
47903
47956
  })), /*#__PURE__*/React__default.createElement("div", {
47904
47957
  "aria-live": "polite",
47905
47958
  "aria-atomic": true
@@ -47988,7 +48041,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
47988
48041
  onKeyDown: function onKeyDown(e) {
47989
48042
  return e.key === "Enter" && handleSubmit(e);
47990
48043
  },
47991
- autocompleteValue: "name"
48044
+ autocompleteValue: "name",
48045
+ isRequired: true
47992
48046
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
47993
48047
  labelTextWhenNoError: "Routing number",
47994
48048
  dataQa: "Routing number",
@@ -48010,7 +48064,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48010
48064
  },
48011
48065
  onKeyDown: function onKeyDown(e) {
48012
48066
  return e.key === "Enter" && handleSubmit(e);
48013
- }
48067
+ },
48068
+ isRequired: true
48014
48069
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
48015
48070
  labelTextWhenNoError: "Confirm routing number",
48016
48071
  dataQa: "Confirm routing number",
@@ -48021,7 +48076,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48021
48076
  onKeyDown: function onKeyDown(e) {
48022
48077
  return e.key === "Enter" && handleSubmit(e);
48023
48078
  },
48024
- isNum: true
48079
+ isNum: true,
48080
+ isRequired: true
48025
48081
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
48026
48082
  labelTextWhenNoError: "Account number",
48027
48083
  dataQa: "Account number",
@@ -48043,7 +48099,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48043
48099
  },
48044
48100
  onKeyDown: function onKeyDown(e) {
48045
48101
  return e.key === "Enter" && handleSubmit(e);
48046
- }
48102
+ },
48103
+ isRequired: true
48047
48104
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
48048
48105
  labelTextWhenNoError: "Confirm account number",
48049
48106
  dataQa: "Confirm account number",
@@ -48054,6 +48111,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48054
48111
  onKeyDown: function onKeyDown(e) {
48055
48112
  return e.key === "Enter" && handleSubmit(e);
48056
48113
  },
48114
+ isRequired: true,
48057
48115
  isNum: true
48058
48116
  }), allowBankAccountType && /*#__PURE__*/React__default.createElement(FormSelect$1, {
48059
48117
  labelTextWhenNoError: "Account type",
@@ -48071,7 +48129,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48071
48129
  fieldActions: actions.fields.accountType,
48072
48130
  showErrors: showErrors,
48073
48131
  errorMessages: accountTypeErrors,
48074
- field: fields.accountType
48132
+ field: fields.accountType,
48133
+ isRequired: true
48075
48134
  }), !hideDefaultPayment && /*#__PURE__*/React__default.createElement(Checkbox$1, {
48076
48135
  title: "Save as Default Payment Method",
48077
48136
  dataQa: "default-payment-ach",
@@ -48209,7 +48268,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48209
48268
  onKeyDown: function onKeyDown(e) {
48210
48269
  return e.key === "Enter" && handleSubmit(e);
48211
48270
  },
48212
- autocompleteValue: "cc-name"
48271
+ autocompleteValue: "cc-name",
48272
+ isRequired: true
48213
48273
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
48214
48274
  labelTextWhenNoError: "Credit card number",
48215
48275
  dataQa: "Credit card number",
@@ -48222,7 +48282,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48222
48282
  return e.key === "Enter" && handleSubmit(e);
48223
48283
  },
48224
48284
  isNum: true,
48225
- autocompleteValue: "cc-number"
48285
+ autocompleteValue: "cc-number",
48286
+ isRequired: true
48226
48287
  }), /*#__PURE__*/React__default.createElement(FormInputRow, {
48227
48288
  breakpoint: isMobile ? "1000rem" : "21rem",
48228
48289
  childGap: isMobile ? "0rem" : "1rem"
@@ -48240,7 +48301,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48240
48301
  isNum: true,
48241
48302
  removeFromValue: /\// // removes "/" from browser autofill
48242
48303
  ,
48243
- autocompleteValue: "cc-exp"
48304
+ autocompleteValue: "cc-exp",
48305
+ isRequired: true
48244
48306
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
48245
48307
  labelTextWhenNoError: "CVV",
48246
48308
  dataQa: "CVV",
@@ -48253,7 +48315,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48253
48315
  onKeyDown: function onKeyDown(e) {
48254
48316
  return e.key === "Enter" && handleSubmit(e);
48255
48317
  },
48256
- autocompleteValue: "cc-csc"
48318
+ autocompleteValue: "cc-csc",
48319
+ isRequired: true
48257
48320
  })), !hideZipCode && /*#__PURE__*/React__default.createElement(Box, {
48258
48321
  padding: isMobile ? "0" : "0 0.5rem 0 0",
48259
48322
  width: isMobile ? "100%" : "50%"
@@ -48269,7 +48332,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48269
48332
  onKeyDown: function onKeyDown(e) {
48270
48333
  return e.key === "Enter" && handleSubmit(e);
48271
48334
  },
48272
- autocompleteValue: "billing postal-code"
48335
+ autocompleteValue: "billing postal-code",
48336
+ isRequired: true
48273
48337
  })), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
48274
48338
  childGap: "4px",
48275
48339
  align: "center"
@@ -48462,7 +48526,9 @@ var PhoneForm = function PhoneForm(_ref) {
48462
48526
  handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
48463
48527
  showWalletCheckbox = _ref.showWalletCheckbox,
48464
48528
  saveToWallet = _ref.saveToWallet,
48465
- walletCheckboxMarked = _ref.walletCheckboxMarked;
48529
+ walletCheckboxMarked = _ref.walletCheckboxMarked,
48530
+ _ref$isRequired = _ref.isRequired,
48531
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
48466
48532
 
48467
48533
  if (clearOnDismount) {
48468
48534
  React.useEffect(function () {
@@ -48489,7 +48555,8 @@ var PhoneForm = function PhoneForm(_ref) {
48489
48555
  },
48490
48556
  autocompleteValue: "tel-national",
48491
48557
  dataQa: "Phone number",
48492
- isNum: true
48558
+ isNum: true,
48559
+ isRequired: isRequired
48493
48560
  }), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
48494
48561
  name: "phone checkbox",
48495
48562
  title: "Save phone number to wallet",
@@ -48622,7 +48689,9 @@ var RadioSection = function RadioSection(_ref) {
48622
48689
  openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
48623
48690
  _ref$containerStyles = _ref.containerStyles,
48624
48691
  containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
48625
- ariaDescribedBy = _ref.ariaDescribedBy;
48692
+ ariaDescribedBy = _ref.ariaDescribedBy,
48693
+ _ref$isSectionRequire = _ref.isSectionRequired,
48694
+ isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
48626
48695
 
48627
48696
  var handleKeyDown = function handleKeyDown(id, e) {
48628
48697
  if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
@@ -48678,7 +48747,8 @@ var RadioSection = function RadioSection(_ref) {
48678
48747
  extraStyles: containerStyles
48679
48748
  }, /*#__PURE__*/React__default.createElement(Stack, {
48680
48749
  childGap: "0",
48681
- role: "radiogroup"
48750
+ "aria-role": "radiogroup",
48751
+ "aria-required": isSectionRequired
48682
48752
  }, sections.filter(function (section) {
48683
48753
  return !section.hidden;
48684
48754
  }).map(function (section) {
@@ -48700,7 +48770,8 @@ var RadioSection = function RadioSection(_ref) {
48700
48770
  extraStyles: borderStyles,
48701
48771
  role: "radio",
48702
48772
  "aria-checked": openSection === section.id,
48703
- "aria-disabled": section.disabled
48773
+ "aria-disabled": section.disabled,
48774
+ "aria-required": section === null || section === void 0 ? void 0 : section.required
48704
48775
  }, /*#__PURE__*/React__default.createElement(Stack, {
48705
48776
  childGap: "0"
48706
48777
  }, /*#__PURE__*/React__default.createElement(Box, {
@@ -48738,7 +48809,8 @@ var RadioSection = function RadioSection(_ref) {
48738
48809
  toggleRadio: section.disabled ? noop : function () {
48739
48810
  return toggleOpenSection(section.id);
48740
48811
  },
48741
- tabIndex: "-1"
48812
+ tabIndex: "-1",
48813
+ isRequired: section === null || section === void 0 ? void 0 : section.required
48742
48814
  })), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
48743
48815
  align: "center"
48744
48816
  }, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {