@thecb/components 9.3.0-beta.2 → 9.3.1-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 (23) hide show
  1. package/dist/index.cjs.js +44 -103
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +44 -103
  4. package/dist/index.esm.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/components/atoms/checkbox/Checkbox.js +1 -3
  7. package/src/components/atoms/checkbox/Checkbox.stories.js +2 -3
  8. package/src/components/atoms/country-dropdown/CountryDropdown.js +1 -3
  9. package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +0 -1
  10. package/src/components/atoms/dropdown/Dropdown.js +3 -7
  11. package/src/components/atoms/form-layouts/FormInput.js +0 -4
  12. package/src/components/atoms/form-select/FormSelect.js +9 -22
  13. package/src/components/atoms/form-select/FormSelect.stories.js +2 -2
  14. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +1 -4
  15. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +0 -1
  16. package/src/components/molecules/address-form/AddressForm.js +0 -6
  17. package/src/components/molecules/payment-form-ach/PaymentFormACH.js +0 -7
  18. package/src/components/molecules/payment-form-card/PaymentFormCard.js +0 -7
  19. package/src/components/molecules/radio-section/RadioSection.js +4 -4
  20. package/src/components/molecules/radio-section/RadioSection.stories.js +2 -3
  21. package/src/components/molecules/radio-section/radio-button/RadioButton.js +1 -4
  22. package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +0 -1
  23. package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +0 -1
package/dist/index.esm.js CHANGED
@@ -22122,9 +22122,7 @@ var Checkbox = function Checkbox(_ref4) {
22122
22122
  extraStyles = _ref4.extraStyles,
22123
22123
  textExtraStyles = _ref4.textExtraStyles,
22124
22124
  _ref4$dataQa = _ref4.dataQa,
22125
- dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa,
22126
- _ref4$isRequired = _ref4.isRequired,
22127
- isRequired = _ref4$isRequired === void 0 ? false : _ref4$isRequired;
22125
+ dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa;
22128
22126
 
22129
22127
  var _useState = useState(false),
22130
22128
  _useState2 = _slicedToArray(_useState, 2),
@@ -22178,8 +22176,7 @@ var Checkbox = function Checkbox(_ref4) {
22178
22176
  errorStyles: themeValues.errorStyles,
22179
22177
  disabledStyles: themeValues.disabledStyles,
22180
22178
  disabledCheckedStyles: themeValues.disabledCheckedStyles,
22181
- focusedStyles: themeValues.focusedStyles,
22182
- "aria-required": isRequired
22179
+ focusedStyles: themeValues.focusedStyles
22183
22180
  }, /*#__PURE__*/React.createElement(CheckboxIcon, {
22184
22181
  viewBox: "0 0 24 24",
22185
22182
  disabled: disabled,
@@ -23763,11 +23760,7 @@ var Dropdown = function Dropdown(_ref8) {
23763
23760
  _ref8$smoothScroll = _ref8.smoothScroll,
23764
23761
  smoothScroll = _ref8$smoothScroll === void 0 ? true : _ref8$smoothScroll,
23765
23762
  _ref8$ariaInvalid = _ref8.ariaInvalid,
23766
- ariaInvalid = _ref8$ariaInvalid === void 0 ? false : _ref8$ariaInvalid,
23767
- _ref8$isRequired = _ref8.isRequired,
23768
- isRequired = _ref8$isRequired === void 0 ? false : _ref8$isRequired;
23769
-
23770
- var required = options.required || isRequired;
23763
+ ariaInvalid = _ref8$ariaInvalid === void 0 ? false : _ref8$ariaInvalid;
23771
23764
 
23772
23765
  var _useState = useState(""),
23773
23766
  _useState2 = _slicedToArray(_useState, 2),
@@ -24016,8 +24009,7 @@ var Dropdown = function Dropdown(_ref8) {
24016
24009
  "aria-labelledby": ariaLabelledby,
24017
24010
  "aria-describedby": ariaDescribedby,
24018
24011
  "aria-expanded": isOpen,
24019
- "aria-required": required,
24020
- required: required,
24012
+ "aria-required": options.required,
24021
24013
  "aria-invalid": ariaInvalid,
24022
24014
  background: isOpen ? themeValues.hoverColor : WHITE,
24023
24015
  borderRadius: "2px",
@@ -24039,14 +24031,14 @@ var Dropdown = function Dropdown(_ref8) {
24039
24031
  },
24040
24032
  padding: "12px",
24041
24033
  placeholder: getSelection(),
24034
+ required: options.required,
24042
24035
  role: "combobox",
24043
24036
  themeValues: themeValues,
24044
24037
  title: hasTitles ? getSelection() : null,
24045
24038
  type: "text",
24046
24039
  tabIndex: 0,
24047
24040
  value: inputValue,
24048
- width: "100%",
24049
- disabled: disabledValues.includes(inputValue)
24041
+ width: "100%"
24050
24042
  }), /*#__PURE__*/React.createElement(IconWrapper, {
24051
24043
  open: isOpen,
24052
24044
  onClick: _onClick
@@ -24057,8 +24049,7 @@ var Dropdown = function Dropdown(_ref8) {
24057
24049
  widthFitOptions: widthFitOptions,
24058
24050
  tabIndex: 0,
24059
24051
  role: "listbox",
24060
- id: "".concat(ariaLabelledby, "_listbox"),
24061
- required: required
24052
+ id: "".concat(ariaLabelledby, "_listbox")
24062
24053
  }, /*#__PURE__*/React.createElement(Stack, {
24063
24054
  childGap: "0",
24064
24055
  as: "ul"
@@ -24204,9 +24195,7 @@ var FormSelect = function FormSelect(_ref) {
24204
24195
  _ref$dataQa = _ref.dataQa,
24205
24196
  dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
24206
24197
  _ref$widthFitOptions = _ref.widthFitOptions,
24207
- widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
24208
- _ref$isRequired = _ref.isRequired,
24209
- isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
24198
+ widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions;
24210
24199
 
24211
24200
  var _useState = useState(false),
24212
24201
  _useState2 = _slicedToArray(_useState, 2),
@@ -24214,17 +24203,6 @@ var FormSelect = function FormSelect(_ref) {
24214
24203
  setOpen = _useState2[1];
24215
24204
 
24216
24205
  var dropdownRef = useRef(null);
24217
- var required = (options === null || options === void 0 ? void 0 : options.required) || isRequired;
24218
- var labelId = useMemo(function () {
24219
- return function (labelTextWhenNoError) {
24220
- return createIdFromString(labelTextWhenNoError);
24221
- };
24222
- }, [labelTextWhenNoError]);
24223
- var descriptionId = useMemo(function () {
24224
- return function (field, labelTextWhenNoError) {
24225
- return field.hasErrors && field.dirty ? labelId(labelTextWhenNoError) + "error-message" : "";
24226
- };
24227
- }, [field, labelTextWhenNoError]);
24228
24206
 
24229
24207
  var handleClickAway = function handleClickAway(event) {
24230
24208
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
@@ -24240,8 +24218,8 @@ var FormSelect = function FormSelect(_ref) {
24240
24218
  });
24241
24219
  return /*#__PURE__*/React.createElement(SelectContainer, {
24242
24220
  ref: dropdownRef,
24243
- "aria-role": "group",
24244
24221
  disabled: disabled,
24222
+ "aria-disabled": disabled,
24245
24223
  "data-qa": dataQa
24246
24224
  }, /*#__PURE__*/React.createElement(Box, {
24247
24225
  padding: "0",
@@ -24255,10 +24233,10 @@ var FormSelect = function FormSelect(_ref) {
24255
24233
  color: themeValues.labelColor,
24256
24234
  weight: themeValues.fontWeight,
24257
24235
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
24258
- id: labelId(labelTextWhenNoError)
24236
+ id: createIdFromString(labelTextWhenNoError)
24259
24237
  }, labelTextWhenNoError))), /*#__PURE__*/React.createElement(Dropdown$1, {
24260
- ariaLabelledby: labelId(labelTextWhenNoError),
24261
- ariaDescribedby: descriptionId(field, labelTextWhenNoError),
24238
+ ariaLabelledby: createIdFromString(labelTextWhenNoError),
24239
+ ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
24262
24240
  maxHeight: dropdownMaxHeight,
24263
24241
  widthFitOptions: widthFitOptions,
24264
24242
  hasTitles: hasTitles,
@@ -24279,8 +24257,7 @@ var FormSelect = function FormSelect(_ref) {
24279
24257
  },
24280
24258
  disabled: disabled,
24281
24259
  autocompleteValue: autocompleteValue,
24282
- smoothScroll: smoothScroll,
24283
- isRequired: required
24260
+ smoothScroll: smoothScroll
24284
24261
  }), /*#__PURE__*/React.createElement(Stack, {
24285
24262
  direction: "row",
24286
24263
  justify: "space-between"
@@ -25050,9 +25027,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
25050
25027
  showErrors = _ref.showErrors,
25051
25028
  onChange = _ref.onChange,
25052
25029
  _ref$dataQa = _ref.dataQa,
25053
- dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
25054
- _ref$isRequired = _ref.isRequired,
25055
- isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
25030
+ dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
25056
25031
  return /*#__PURE__*/React.createElement(FormSelect$1, {
25057
25032
  options: options,
25058
25033
  field: field,
@@ -25062,8 +25037,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
25062
25037
  errorMessages: errorMessages,
25063
25038
  showErrors: showErrors,
25064
25039
  onChange: onChange,
25065
- autocompleteValue: "country-name",
25066
- isRequired: isRequired
25040
+ autocompleteValue: "country-name"
25067
25041
  });
25068
25042
  };
25069
25043
 
@@ -25908,7 +25882,7 @@ var fallbackValues$k = {
25908
25882
  };
25909
25883
 
25910
25884
  var _excluded$p = ["showErrors", "themeValues"],
25911
- _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
25885
+ _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
25912
25886
  var InputField = styled.input.withConfig({
25913
25887
  displayName: "FormInput__InputField",
25914
25888
  componentId: "sc-l094r1-0"
@@ -25995,12 +25969,8 @@ var FormInput = function FormInput(_ref15) {
25995
25969
  removeFromValue = _ref15.removeFromValue,
25996
25970
  _ref15$dataQa = _ref15.dataQa,
25997
25971
  dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
25998
- _ref15$isRequired = _ref15.isRequired,
25999
- isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
26000
25972
  props = _objectWithoutProperties(_ref15, _excluded2);
26001
25973
 
26002
- var required = isRequired || (props === null || props === void 0 ? void 0 : props.required);
26003
-
26004
25974
  var _useState = useState(false),
26005
25975
  _useState2 = _slicedToArray(_useState, 2),
26006
25976
  showPassword = _useState2[0],
@@ -26085,8 +26055,7 @@ var FormInput = function FormInput(_ref15) {
26085
26055
  $customHeight: customHeight,
26086
26056
  $extraStyles: extraStyles,
26087
26057
  "data-qa": dataQa || labelTextWhenNoError,
26088
- autoComplete: autocompleteValue,
26089
- required: required
26058
+ autoComplete: autocompleteValue
26090
26059
  }, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
26091
26060
  "aria-labelledby": createIdFromString(labelTextWhenNoError),
26092
26061
  "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
@@ -26105,8 +26074,7 @@ var FormInput = function FormInput(_ref15) {
26105
26074
  $customHeight: customHeight,
26106
26075
  $extraStyles: extraStyles,
26107
26076
  "data-qa": dataQa || labelTextWhenNoError,
26108
- autoComplete: autocompleteValue,
26109
- required: required
26077
+ autoComplete: autocompleteValue
26110
26078
  }, props))), /*#__PURE__*/React.createElement(Stack, {
26111
26079
  direction: "row",
26112
26080
  justify: "space-between",
@@ -27288,9 +27256,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
27288
27256
  _ref2$ariaLabelledBy = _ref2.ariaLabelledBy,
27289
27257
  ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
27290
27258
  _ref2$ariaLabel = _ref2.ariaLabel,
27291
- ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
27292
- _ref2$required = _ref2.required,
27293
- required = _ref2$required === void 0 ? false : _ref2$required;
27259
+ ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel;
27294
27260
  var buttonBorder = {
27295
27261
  onFocused: {
27296
27262
  borderColor: themeValues.activeColor,
@@ -27350,8 +27316,6 @@ var RadioButton$1 = function RadioButton(_ref2) {
27350
27316
  type: "radio",
27351
27317
  id: "radio-".concat(name),
27352
27318
  disabled: disabled,
27353
- required: required,
27354
- "aria-required": required,
27355
27319
  onClick: toggleRadio,
27356
27320
  "aria-describedby": ariaDescribedBy,
27357
27321
  tabIndex: "-1"
@@ -38044,9 +38008,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
38044
38008
  field = _ref.field,
38045
38009
  fieldActions = _ref.fieldActions,
38046
38010
  showErrors = _ref.showErrors,
38047
- countryCode = _ref.countryCode,
38048
- _ref$isRequired = _ref.isRequired,
38049
- isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
38011
+ countryCode = _ref.countryCode;
38050
38012
  var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
38051
38013
  var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
38052
38014
  return /*#__PURE__*/React.createElement(FormSelect$1, {
@@ -38056,8 +38018,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
38056
38018
  labelTextWhenNoError: labelTextWhenNoError,
38057
38019
  errorMessages: errorMessages,
38058
38020
  showErrors: showErrors,
38059
- autocompleteValue: "address-level1",
38060
- isRequired: isRequired
38021
+ autocompleteValue: "address-level1"
38061
38022
  });
38062
38023
  };
38063
38024
 
@@ -39383,7 +39344,6 @@ var AddressForm = function AddressForm(_ref) {
39383
39344
  labelTextWhenNoError: "Country",
39384
39345
  errorMessages: countryErrorMessages,
39385
39346
  field: fields.country,
39386
- isRequired: true,
39387
39347
  onChange: function onChange(value) {
39388
39348
  actions.fields.country.set(value); // temporary measure to not dirty fields until
39389
39349
  // we can write a reset function for fields
@@ -39408,8 +39368,7 @@ var AddressForm = function AddressForm(_ref) {
39408
39368
  return e.key === "Enter" && handleSubmit(e);
39409
39369
  },
39410
39370
  autocompleteValue: "address-line1",
39411
- dataQa: "Address",
39412
- isRequired: true
39371
+ dataQa: "Address"
39413
39372
  }), /*#__PURE__*/React.createElement(FormInput$1, {
39414
39373
  labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
39415
39374
  field: fields.street2,
@@ -39419,8 +39378,7 @@ var AddressForm = function AddressForm(_ref) {
39419
39378
  return e.key === "Enter" && handleSubmit(e);
39420
39379
  },
39421
39380
  autocompleteValue: "address-line2",
39422
- dataQa: "Address Line 2",
39423
- isRequired: false
39381
+ dataQa: "Address Line 2"
39424
39382
  }), /*#__PURE__*/React.createElement(FormInput$1, {
39425
39383
  labelTextWhenNoError: "City",
39426
39384
  errorMessages: cityErrorMessages,
@@ -39431,8 +39389,7 @@ var AddressForm = function AddressForm(_ref) {
39431
39389
  return e.key === "Enter" && handleSubmit(e);
39432
39390
  },
39433
39391
  autocompleteValue: "address-level2",
39434
- dataQa: "City",
39435
- isRequired: true
39392
+ dataQa: "City"
39436
39393
  }), /*#__PURE__*/React.createElement(FormStateDropdown, {
39437
39394
  labelTextWhenNoError: isUS ? "State" : "State or Province",
39438
39395
  errorMessages: stateProvinceErrorMessages,
@@ -39443,8 +39400,7 @@ var AddressForm = function AddressForm(_ref) {
39443
39400
  onKeyDown: function onKeyDown(e) {
39444
39401
  return e.key === "Enter" && handleSubmit(e);
39445
39402
  },
39446
- dataQa: "State or Province",
39447
- isRequired: true
39403
+ dataQa: "State or Province"
39448
39404
  }), /*#__PURE__*/React.createElement(FormInput$1, {
39449
39405
  isNum: isUS,
39450
39406
  formatter: isUS ? zipFormat : null,
@@ -39457,8 +39413,7 @@ var AddressForm = function AddressForm(_ref) {
39457
39413
  return e.key === "Enter" && handleSubmit(e);
39458
39414
  },
39459
39415
  autocompleteValue: "postal-code",
39460
- dataQa: "Zip code",
39461
- isRequired: true
39416
+ dataQa: "Zip code"
39462
39417
  }), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
39463
39418
  name: "address checkbox",
39464
39419
  title: "Save address to wallet",
@@ -47743,8 +47698,7 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47743
47698
  title: "Terms and Conditions",
47744
47699
  error: error,
47745
47700
  checked: isChecked,
47746
- onChange: onCheck,
47747
- isRequired: true
47701
+ onChange: onCheck
47748
47702
  }), /*#__PURE__*/React.createElement(Box, {
47749
47703
  padding: "0 0 0 58px"
47750
47704
  }, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Box, {
@@ -47857,8 +47811,7 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47857
47811
  checked: isChecked,
47858
47812
  onChange: onCheck,
47859
47813
  checkboxMargin: checkboxMargin,
47860
- extraStyles: "align-self: flex-start;",
47861
- isRequired: true
47814
+ extraStyles: "align-self: flex-start;"
47862
47815
  }), /*#__PURE__*/React.createElement(Stack, {
47863
47816
  childGap: "0.25rem",
47864
47817
  fullHeight: true
@@ -47964,8 +47917,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
47964
47917
  onKeyDown: function onKeyDown(e) {
47965
47918
  return e.key === "Enter" && handleSubmit(e);
47966
47919
  },
47967
- autocompleteValue: "name",
47968
- isRequired: true
47920
+ autocompleteValue: "name"
47969
47921
  }), /*#__PURE__*/React.createElement(FormInput$1, {
47970
47922
  labelTextWhenNoError: "Routing number",
47971
47923
  dataQa: "Routing number",
@@ -47987,8 +47939,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
47987
47939
  },
47988
47940
  onKeyDown: function onKeyDown(e) {
47989
47941
  return e.key === "Enter" && handleSubmit(e);
47990
- },
47991
- isRequired: true
47942
+ }
47992
47943
  }), /*#__PURE__*/React.createElement(FormInput$1, {
47993
47944
  labelTextWhenNoError: "Confirm routing number",
47994
47945
  dataQa: "Confirm routing number",
@@ -47999,7 +47950,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
47999
47950
  onKeyDown: function onKeyDown(e) {
48000
47951
  return e.key === "Enter" && handleSubmit(e);
48001
47952
  },
48002
- isRequired: true,
48003
47953
  isNum: true
48004
47954
  }), /*#__PURE__*/React.createElement(FormInput$1, {
48005
47955
  labelTextWhenNoError: "Account number",
@@ -48008,7 +47958,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48008
47958
  field: fields.accountNumber,
48009
47959
  fieldActions: actions.fields.accountNumber,
48010
47960
  showErrors: showErrors,
48011
- isRequired: true,
48012
47961
  isNum: true,
48013
47962
  helperModal: function helperModal() {
48014
47963
  return /*#__PURE__*/React.createElement(AccountAndRoutingModal$1, {
@@ -48027,7 +47976,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48027
47976
  }), /*#__PURE__*/React.createElement(FormInput$1, {
48028
47977
  labelTextWhenNoError: "Confirm account number",
48029
47978
  dataQa: "Confirm account number",
48030
- isRequired: true,
48031
47979
  errorMessages: confirmAccountNumberErrors,
48032
47980
  field: fields.confirmAccountNumber,
48033
47981
  fieldActions: actions.fields.confirmAccountNumber,
@@ -48038,7 +47986,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48038
47986
  isNum: true
48039
47987
  }), allowBankAccountType && /*#__PURE__*/React.createElement(FormSelect$1, {
48040
47988
  labelTextWhenNoError: "Account type",
48041
- isRequired: true,
48042
47989
  dataQa: "Account type",
48043
47990
  options: [{
48044
47991
  text: "Select account type",
@@ -48076,8 +48023,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48076
48023
  version: "v2",
48077
48024
  showCheckbox: false,
48078
48025
  description: "View",
48079
- terms: termsContent,
48080
- isRequired: true
48026
+ terms: termsContent
48081
48027
  })))));
48082
48028
  };
48083
48029
 
@@ -48170,7 +48116,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48170
48116
  "aria-label": "Card payment"
48171
48117
  }, /*#__PURE__*/React.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React.createElement(CountryDropdown, {
48172
48118
  labelTextWhenNoError: "Country",
48173
- isRequired: true,
48174
48119
  errorMessages: countryErrorMessages,
48175
48120
  field: fields.country,
48176
48121
  onChange: function onChange(value) {
@@ -48193,8 +48138,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48193
48138
  onKeyDown: function onKeyDown(e) {
48194
48139
  return e.key === "Enter" && handleSubmit(e);
48195
48140
  },
48196
- autocompleteValue: "cc-name",
48197
- isRequired: true
48141
+ autocompleteValue: "cc-name"
48198
48142
  }), /*#__PURE__*/React.createElement(FormInput$1, {
48199
48143
  labelTextWhenNoError: "Credit card number",
48200
48144
  dataQa: "Credit card number",
@@ -48207,8 +48151,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48207
48151
  return e.key === "Enter" && handleSubmit(e);
48208
48152
  },
48209
48153
  isNum: true,
48210
- autocompleteValue: "cc-number",
48211
- isRequired: true
48154
+ autocompleteValue: "cc-number"
48212
48155
  }), /*#__PURE__*/React.createElement(FormInputRow, {
48213
48156
  breakpoint: isMobile ? "1000rem" : "21rem",
48214
48157
  childGap: isMobile ? "0rem" : "1rem"
@@ -48226,8 +48169,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48226
48169
  isNum: true,
48227
48170
  removeFromValue: /\// // removes "/" from browser autofill
48228
48171
  ,
48229
- autocompleteValue: "cc-exp",
48230
- isRequired: true
48172
+ autocompleteValue: "cc-exp"
48231
48173
  }), /*#__PURE__*/React.createElement(FormInput$1, {
48232
48174
  labelTextWhenNoError: "CVV",
48233
48175
  dataQa: "CVV",
@@ -48240,8 +48182,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48240
48182
  onKeyDown: function onKeyDown(e) {
48241
48183
  return e.key === "Enter" && handleSubmit(e);
48242
48184
  },
48243
- autocompleteValue: "cc-csc",
48244
- isRequired: true
48185
+ autocompleteValue: "cc-csc"
48245
48186
  })), !hideZipCode && /*#__PURE__*/React.createElement(Box, {
48246
48187
  padding: isMobile ? "0" : "0 0.5rem 0 0",
48247
48188
  width: isMobile ? "100%" : "50%"
@@ -48257,8 +48198,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48257
48198
  onKeyDown: function onKeyDown(e) {
48258
48199
  return e.key === "Enter" && handleSubmit(e);
48259
48200
  },
48260
- autocompleteValue: "billing postal-code",
48261
- isRequired: true
48201
+ autocompleteValue: "billing postal-code"
48262
48202
  })), (showWalletCheckbox || showTerms) && /*#__PURE__*/React.createElement(Cluster, {
48263
48203
  childGap: "4px",
48264
48204
  align: "center"
@@ -48274,8 +48214,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48274
48214
  version: "v2",
48275
48215
  showCheckbox: false,
48276
48216
  description: "View",
48277
- terms: termsContent,
48278
- isRequired: true
48217
+ terms: termsContent
48279
48218
  })))));
48280
48219
  };
48281
48220
 
@@ -48612,7 +48551,9 @@ var RadioSection = function RadioSection(_ref) {
48612
48551
  openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
48613
48552
  _ref$containerStyles = _ref.containerStyles,
48614
48553
  containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
48615
- ariaDescribedBy = _ref.ariaDescribedBy;
48554
+ ariaDescribedBy = _ref.ariaDescribedBy,
48555
+ _ref$ariaLabel = _ref.ariaLabel,
48556
+ ariaLabel = _ref$ariaLabel === void 0 ? "Please select an option." : _ref$ariaLabel;
48616
48557
 
48617
48558
  var handleKeyDown = function handleKeyDown(id, e) {
48618
48559
  if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
@@ -48668,7 +48609,8 @@ var RadioSection = function RadioSection(_ref) {
48668
48609
  extraStyles: containerStyles
48669
48610
  }, /*#__PURE__*/React.createElement(Stack, {
48670
48611
  childGap: "0",
48671
- role: "radiogroup"
48612
+ role: "radiogroup",
48613
+ "aria-label": ariaLabel
48672
48614
  }, sections.filter(function (section) {
48673
48615
  return !section.hidden;
48674
48616
  }).map(function (section) {
@@ -48728,8 +48670,7 @@ var RadioSection = function RadioSection(_ref) {
48728
48670
  toggleRadio: section.disabled ? noop : function () {
48729
48671
  return toggleOpenSection(section.id);
48730
48672
  },
48731
- tabIndex: "-1",
48732
- required: section === null || section === void 0 ? void 0 : section.required
48673
+ tabIndex: "-1"
48733
48674
  })), section.titleIcon && /*#__PURE__*/React.createElement(Cluster, {
48734
48675
  align: "center"
48735
48676
  }, section.titleIcon), /*#__PURE__*/React.createElement(Box, {
@@ -48741,7 +48682,7 @@ var RadioSection = function RadioSection(_ref) {
48741
48682
  }, section.title))), section.rightIcons && /*#__PURE__*/React.createElement(Cluster, {
48742
48683
  childGap: "0.5rem",
48743
48684
  "aria-label": (section === null || section === void 0 ? void 0 : section.rightIconsLabel) || null,
48744
- role: (section === null || section === void 0 ? void 0 : section.rightIconsRole) || "group"
48685
+ role: (section === null || section === void 0 ? void 0 : section.rightIconsRole) || null
48745
48686
  }, section.rightIcons.map(function (icon) {
48746
48687
  return /*#__PURE__*/React.createElement(RightIcon, {
48747
48688
  src: icon.img,