@thecb/components 9.2.4-beta.8 → 9.2.4
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 +84 -45
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +84 -45
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/country-dropdown/CountryDropdown.js +2 -0
- package/src/components/atoms/dropdown/Dropdown.js +8 -5
- package/src/components/atoms/form-layouts/FormInput.js +3 -0
- package/src/components/atoms/form-select/FormSelect.js +3 -1
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +3 -1
- package/src/components/molecules/address-form/AddressForm.js +5 -0
- package/src/components/molecules/email-form/EmailForm.js +3 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +6 -0
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +5 -0
- package/src/components/molecules/phone-form/PhoneForm.js +3 -1
- package/src/components/molecules/radio-section/RadioSection.js +7 -3
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +3 -2
package/dist/index.esm.js
CHANGED
|
@@ -23791,7 +23791,9 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23791
23791
|
_ref13$smoothScroll = _ref13.smoothScroll,
|
|
23792
23792
|
smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
|
|
23793
23793
|
_ref13$ariaInvalid = _ref13.ariaInvalid,
|
|
23794
|
-
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid
|
|
23794
|
+
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
|
|
23795
|
+
_ref13$isRequired = _ref13.isRequired,
|
|
23796
|
+
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
|
|
23795
23797
|
|
|
23796
23798
|
var _useState = useState(""),
|
|
23797
23799
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -23984,11 +23986,13 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23984
23986
|
clearTimeout(timer);
|
|
23985
23987
|
setTimer(setTimeout(function () {
|
|
23986
23988
|
return setInputValue("");
|
|
23987
|
-
},
|
|
23989
|
+
}, 20000));
|
|
23988
23990
|
}
|
|
23989
23991
|
|
|
23990
23992
|
setFilteredOptions(options.filter(function (option) {
|
|
23991
|
-
|
|
23993
|
+
var _option$value, _option$value$toLower, _option$text, _option$text$toLowerC;
|
|
23994
|
+
|
|
23995
|
+
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;
|
|
23992
23996
|
}));
|
|
23993
23997
|
}, [inputValue]);
|
|
23994
23998
|
useEffect$1(function () {
|
|
@@ -24062,7 +24066,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24062
24066
|
},
|
|
24063
24067
|
padding: "12px",
|
|
24064
24068
|
placeholder: getSelection(),
|
|
24065
|
-
required: options.required,
|
|
24069
|
+
required: options.required || isRequired,
|
|
24066
24070
|
role: "combobox",
|
|
24067
24071
|
themeValues: themeValues,
|
|
24068
24072
|
title: hasTitles ? getSelection() : null,
|
|
@@ -24230,7 +24234,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24230
24234
|
_ref$dataQa = _ref.dataQa,
|
|
24231
24235
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
24232
24236
|
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
24233
|
-
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions
|
|
24237
|
+
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
|
|
24238
|
+
_ref$isRequired = _ref.isRequired,
|
|
24239
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
24234
24240
|
|
|
24235
24241
|
var _useState = useState(false),
|
|
24236
24242
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24292,7 +24298,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24292
24298
|
},
|
|
24293
24299
|
disabled: disabled,
|
|
24294
24300
|
autocompleteValue: autocompleteValue,
|
|
24295
|
-
smoothScroll: smoothScroll
|
|
24301
|
+
smoothScroll: smoothScroll,
|
|
24302
|
+
isRequired: isRequired
|
|
24296
24303
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
24297
24304
|
direction: "row",
|
|
24298
24305
|
justify: "space-between"
|
|
@@ -25063,6 +25070,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25063
25070
|
fieldActions = _ref.fieldActions,
|
|
25064
25071
|
showErrors = _ref.showErrors,
|
|
25065
25072
|
onChange = _ref.onChange,
|
|
25073
|
+
_ref$isRequired = _ref.isRequired,
|
|
25074
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25066
25075
|
_ref$dataQa = _ref.dataQa,
|
|
25067
25076
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25068
25077
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
@@ -25074,7 +25083,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25074
25083
|
errorMessages: errorMessages,
|
|
25075
25084
|
showErrors: showErrors,
|
|
25076
25085
|
onChange: onChange,
|
|
25077
|
-
autocompleteValue: "country-name"
|
|
25086
|
+
autocompleteValue: "country-name",
|
|
25087
|
+
isRequired: isRequired
|
|
25078
25088
|
});
|
|
25079
25089
|
};
|
|
25080
25090
|
|
|
@@ -25921,7 +25931,7 @@ var fallbackValues$k = {
|
|
|
25921
25931
|
};
|
|
25922
25932
|
|
|
25923
25933
|
var _excluded$p = ["showErrors", "themeValues"],
|
|
25924
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
|
|
25934
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
|
|
25925
25935
|
var InputField = styled.input.withConfig({
|
|
25926
25936
|
displayName: "FormInput__InputField",
|
|
25927
25937
|
componentId: "sc-l094r1-0"
|
|
@@ -26008,6 +26018,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26008
26018
|
removeFromValue = _ref15.removeFromValue,
|
|
26009
26019
|
_ref15$dataQa = _ref15.dataQa,
|
|
26010
26020
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
26021
|
+
_ref15$isRequired = _ref15.isRequired,
|
|
26022
|
+
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
26011
26023
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
26012
26024
|
|
|
26013
26025
|
var _useState = useState(false),
|
|
@@ -26094,7 +26106,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26094
26106
|
$customHeight: customHeight,
|
|
26095
26107
|
$extraStyles: extraStyles,
|
|
26096
26108
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26097
|
-
autoComplete: autocompleteValue
|
|
26109
|
+
autoComplete: autocompleteValue,
|
|
26110
|
+
required: isRequired
|
|
26098
26111
|
}, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
|
|
26099
26112
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26100
26113
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26113,7 +26126,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26113
26126
|
$customHeight: customHeight,
|
|
26114
26127
|
$extraStyles: extraStyles,
|
|
26115
26128
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26116
|
-
autoComplete: autocompleteValue
|
|
26129
|
+
autoComplete: autocompleteValue,
|
|
26130
|
+
required: isRequired
|
|
26117
26131
|
}, props))), /*#__PURE__*/React.createElement(Stack, {
|
|
26118
26132
|
direction: "row",
|
|
26119
26133
|
justify: "space-between",
|
|
@@ -27332,7 +27346,6 @@ var fallbackValues$v = {
|
|
|
27332
27346
|
inactiveColor: inactiveColor
|
|
27333
27347
|
};
|
|
27334
27348
|
|
|
27335
|
-
var _excluded$w = ["radioOn", "radioFocused", "toggleRadio", "name", "disabled", "ariaDescribedBy", "themeValues", "ariaLabelledBy", "ariaLabel"];
|
|
27336
27349
|
var HiddenRadioButton = styled.input.withConfig({
|
|
27337
27350
|
displayName: "RadioButton__HiddenRadioButton",
|
|
27338
27351
|
componentId: "sc-1jed2i-0"
|
|
@@ -27357,8 +27370,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27357
27370
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27358
27371
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27359
27372
|
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27360
|
-
|
|
27361
|
-
|
|
27373
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27374
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27362
27375
|
var buttonBorder = {
|
|
27363
27376
|
onFocused: {
|
|
27364
27377
|
borderColor: themeValues.activeColor,
|
|
@@ -27401,7 +27414,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27401
27414
|
width: "0px"
|
|
27402
27415
|
}
|
|
27403
27416
|
};
|
|
27404
|
-
var extraProps =
|
|
27417
|
+
var extraProps = {};
|
|
27405
27418
|
|
|
27406
27419
|
if (ariaLabelledBy && ariaLabelledBy.length) {
|
|
27407
27420
|
extraProps["aria-labelledby"] = ariaLabelledBy;
|
|
@@ -27420,7 +27433,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27420
27433
|
disabled: disabled,
|
|
27421
27434
|
onClick: toggleRadio,
|
|
27422
27435
|
"aria-describedby": ariaDescribedBy,
|
|
27423
|
-
tabIndex: "-1"
|
|
27436
|
+
tabIndex: "-1",
|
|
27437
|
+
required: isRequired
|
|
27424
27438
|
}, extraProps)), /*#__PURE__*/React.createElement(Motion, {
|
|
27425
27439
|
borderWidth: "1px",
|
|
27426
27440
|
borderStyle: "solid",
|
|
@@ -38110,7 +38124,9 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38110
38124
|
field = _ref.field,
|
|
38111
38125
|
fieldActions = _ref.fieldActions,
|
|
38112
38126
|
showErrors = _ref.showErrors,
|
|
38113
|
-
countryCode = _ref.countryCode
|
|
38127
|
+
countryCode = _ref.countryCode,
|
|
38128
|
+
_ref$isRequired = _ref.isRequired,
|
|
38129
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
38114
38130
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38115
38131
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38116
38132
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
@@ -38120,7 +38136,8 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38120
38136
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38121
38137
|
errorMessages: errorMessages,
|
|
38122
38138
|
showErrors: showErrors,
|
|
38123
|
-
autocompleteValue: "address-level1"
|
|
38139
|
+
autocompleteValue: "address-level1",
|
|
38140
|
+
isRequired: isRequired
|
|
38124
38141
|
});
|
|
38125
38142
|
};
|
|
38126
38143
|
|
|
@@ -38689,7 +38706,7 @@ var TableRowWrapper = styled.tr.withConfig({
|
|
|
38689
38706
|
return extraStyles;
|
|
38690
38707
|
});
|
|
38691
38708
|
|
|
38692
|
-
var _excluded$
|
|
38709
|
+
var _excluded$w = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
|
|
38693
38710
|
|
|
38694
38711
|
var TableRow = function TableRow(_ref) {
|
|
38695
38712
|
var children = _ref.children,
|
|
@@ -38699,7 +38716,7 @@ var TableRow = function TableRow(_ref) {
|
|
|
38699
38716
|
hoverEffect = _ref$hoverEffect === void 0 ? true : _ref$hoverEffect,
|
|
38700
38717
|
onClick = _ref.onClick,
|
|
38701
38718
|
themeValues = _ref.themeValues,
|
|
38702
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
38719
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
38703
38720
|
|
|
38704
38721
|
return /*#__PURE__*/React.createElement(TableRowWrapper, _extends({
|
|
38705
38722
|
onClick: onClick,
|
|
@@ -39459,7 +39476,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39459
39476
|
}
|
|
39460
39477
|
},
|
|
39461
39478
|
showErrors: showErrors,
|
|
39462
|
-
dataQa: "Country"
|
|
39479
|
+
dataQa: "Country",
|
|
39480
|
+
isRequired: true
|
|
39463
39481
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39464
39482
|
labelTextWhenNoError: "Address",
|
|
39465
39483
|
errorMessages: street1ErrorMessages,
|
|
@@ -39470,7 +39488,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39470
39488
|
return e.key === "Enter" && handleSubmit(e);
|
|
39471
39489
|
},
|
|
39472
39490
|
autocompleteValue: "address-line1",
|
|
39473
|
-
dataQa: "Address"
|
|
39491
|
+
dataQa: "Address",
|
|
39492
|
+
isRequired: true
|
|
39474
39493
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39475
39494
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39476
39495
|
field: fields.street2,
|
|
@@ -39491,7 +39510,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39491
39510
|
return e.key === "Enter" && handleSubmit(e);
|
|
39492
39511
|
},
|
|
39493
39512
|
autocompleteValue: "address-level2",
|
|
39494
|
-
dataQa: "City"
|
|
39513
|
+
dataQa: "City",
|
|
39514
|
+
isRequired: true
|
|
39495
39515
|
}), /*#__PURE__*/React.createElement(FormStateDropdown, {
|
|
39496
39516
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39497
39517
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39502,7 +39522,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39502
39522
|
onKeyDown: function onKeyDown(e) {
|
|
39503
39523
|
return e.key === "Enter" && handleSubmit(e);
|
|
39504
39524
|
},
|
|
39505
|
-
dataQa: "State or Province"
|
|
39525
|
+
dataQa: "State or Province",
|
|
39526
|
+
isRequired: true
|
|
39506
39527
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39507
39528
|
isNum: isUS,
|
|
39508
39529
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39515,7 +39536,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39515
39536
|
return e.key === "Enter" && handleSubmit(e);
|
|
39516
39537
|
},
|
|
39517
39538
|
autocompleteValue: "postal-code",
|
|
39518
|
-
dataQa: "Zip code"
|
|
39539
|
+
dataQa: "Zip code",
|
|
39540
|
+
isRequired: true
|
|
39519
39541
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
39520
39542
|
name: "address checkbox",
|
|
39521
39543
|
title: "Save address to wallet",
|
|
@@ -40418,7 +40440,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40418
40440
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40419
40441
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40420
40442
|
saveToWallet = _ref.saveToWallet,
|
|
40421
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40443
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40444
|
+
_ref$isRequired = _ref.isRequired,
|
|
40445
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40422
40446
|
|
|
40423
40447
|
if (clearOnDismount) {
|
|
40424
40448
|
useEffect$1(function () {
|
|
@@ -40447,7 +40471,8 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40447
40471
|
},
|
|
40448
40472
|
isEmail: true,
|
|
40449
40473
|
autocompleteValue: "email",
|
|
40450
|
-
dataQa: "Email address"
|
|
40474
|
+
dataQa: "Email address",
|
|
40475
|
+
isRequired: isRequired
|
|
40451
40476
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
40452
40477
|
name: "email checkbox",
|
|
40453
40478
|
title: "Save email address to wallet",
|
|
@@ -47256,7 +47281,7 @@ var fallbackValues$N = {
|
|
|
47256
47281
|
labeledAmountTotal: labeledAmountTotal
|
|
47257
47282
|
};
|
|
47258
47283
|
|
|
47259
|
-
var _excluded$
|
|
47284
|
+
var _excluded$x = ["amount"],
|
|
47260
47285
|
_excluded2$1 = ["amount"];
|
|
47261
47286
|
|
|
47262
47287
|
var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
@@ -47501,7 +47526,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
47501
47526
|
return fee.amount > 0;
|
|
47502
47527
|
}).map(function (_ref5) {
|
|
47503
47528
|
var amount = _ref5.amount,
|
|
47504
|
-
rest = _objectWithoutProperties(_ref5, _excluded$
|
|
47529
|
+
rest = _objectWithoutProperties(_ref5, _excluded$x);
|
|
47505
47530
|
|
|
47506
47531
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
47507
47532
|
amount: displayCurrency(amount)
|
|
@@ -47904,12 +47929,12 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47904
47929
|
}, errorMessage))))));
|
|
47905
47930
|
};
|
|
47906
47931
|
|
|
47907
|
-
var _excluded$
|
|
47932
|
+
var _excluded$y = ["version"];
|
|
47908
47933
|
|
|
47909
47934
|
var TermsAndConditions = function TermsAndConditions(_ref) {
|
|
47910
47935
|
var _ref$version = _ref.version,
|
|
47911
47936
|
version = _ref$version === void 0 ? "v1" : _ref$version,
|
|
47912
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
47937
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
47913
47938
|
|
|
47914
47939
|
var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
|
|
47915
47940
|
return /*#__PURE__*/React.createElement(TermsAndConditionsControl, rest);
|
|
@@ -47982,7 +48007,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47982
48007
|
onKeyDown: function onKeyDown(e) {
|
|
47983
48008
|
return e.key === "Enter" && handleSubmit(e);
|
|
47984
48009
|
},
|
|
47985
|
-
autocompleteValue: "name"
|
|
48010
|
+
autocompleteValue: "name",
|
|
48011
|
+
isRequired: true
|
|
47986
48012
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
47987
48013
|
labelTextWhenNoError: "Routing number",
|
|
47988
48014
|
dataQa: "Routing number",
|
|
@@ -48004,7 +48030,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48004
48030
|
},
|
|
48005
48031
|
onKeyDown: function onKeyDown(e) {
|
|
48006
48032
|
return e.key === "Enter" && handleSubmit(e);
|
|
48007
|
-
}
|
|
48033
|
+
},
|
|
48034
|
+
isRequired: true
|
|
48008
48035
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48009
48036
|
labelTextWhenNoError: "Confirm routing number",
|
|
48010
48037
|
dataQa: "Confirm routing number",
|
|
@@ -48015,7 +48042,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48015
48042
|
onKeyDown: function onKeyDown(e) {
|
|
48016
48043
|
return e.key === "Enter" && handleSubmit(e);
|
|
48017
48044
|
},
|
|
48018
|
-
isNum: true
|
|
48045
|
+
isNum: true,
|
|
48046
|
+
isRequired: true
|
|
48019
48047
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48020
48048
|
labelTextWhenNoError: "Account number",
|
|
48021
48049
|
dataQa: "Account number",
|
|
@@ -48037,7 +48065,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48037
48065
|
},
|
|
48038
48066
|
onKeyDown: function onKeyDown(e) {
|
|
48039
48067
|
return e.key === "Enter" && handleSubmit(e);
|
|
48040
|
-
}
|
|
48068
|
+
},
|
|
48069
|
+
isRequired: true
|
|
48041
48070
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48042
48071
|
labelTextWhenNoError: "Confirm account number",
|
|
48043
48072
|
dataQa: "Confirm account number",
|
|
@@ -48048,6 +48077,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48048
48077
|
onKeyDown: function onKeyDown(e) {
|
|
48049
48078
|
return e.key === "Enter" && handleSubmit(e);
|
|
48050
48079
|
},
|
|
48080
|
+
isRequired: true,
|
|
48051
48081
|
isNum: true
|
|
48052
48082
|
}), allowBankAccountType && /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
48053
48083
|
labelTextWhenNoError: "Account type",
|
|
@@ -48065,7 +48095,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48065
48095
|
fieldActions: actions.fields.accountType,
|
|
48066
48096
|
showErrors: showErrors,
|
|
48067
48097
|
errorMessages: accountTypeErrors,
|
|
48068
|
-
field: fields.accountType
|
|
48098
|
+
field: fields.accountType,
|
|
48099
|
+
isRequired: true
|
|
48069
48100
|
}), !hideDefaultPayment && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48070
48101
|
title: "Save as Default Payment Method",
|
|
48071
48102
|
dataQa: "default-payment-ach",
|
|
@@ -48203,7 +48234,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48203
48234
|
onKeyDown: function onKeyDown(e) {
|
|
48204
48235
|
return e.key === "Enter" && handleSubmit(e);
|
|
48205
48236
|
},
|
|
48206
|
-
autocompleteValue: "cc-name"
|
|
48237
|
+
autocompleteValue: "cc-name",
|
|
48238
|
+
isRequired: true
|
|
48207
48239
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48208
48240
|
labelTextWhenNoError: "Credit card number",
|
|
48209
48241
|
dataQa: "Credit card number",
|
|
@@ -48216,7 +48248,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48216
48248
|
return e.key === "Enter" && handleSubmit(e);
|
|
48217
48249
|
},
|
|
48218
48250
|
isNum: true,
|
|
48219
|
-
autocompleteValue: "cc-number"
|
|
48251
|
+
autocompleteValue: "cc-number",
|
|
48252
|
+
isRequired: true
|
|
48220
48253
|
}), /*#__PURE__*/React.createElement(FormInputRow, {
|
|
48221
48254
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48222
48255
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48234,7 +48267,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48234
48267
|
isNum: true,
|
|
48235
48268
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48236
48269
|
,
|
|
48237
|
-
autocompleteValue: "cc-exp"
|
|
48270
|
+
autocompleteValue: "cc-exp",
|
|
48271
|
+
isRequired: true
|
|
48238
48272
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48239
48273
|
labelTextWhenNoError: "CVV",
|
|
48240
48274
|
dataQa: "CVV",
|
|
@@ -48247,7 +48281,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48247
48281
|
onKeyDown: function onKeyDown(e) {
|
|
48248
48282
|
return e.key === "Enter" && handleSubmit(e);
|
|
48249
48283
|
},
|
|
48250
|
-
autocompleteValue: "cc-csc"
|
|
48284
|
+
autocompleteValue: "cc-csc",
|
|
48285
|
+
isRequired: true
|
|
48251
48286
|
})), !hideZipCode && /*#__PURE__*/React.createElement(Box, {
|
|
48252
48287
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48253
48288
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48263,7 +48298,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48263
48298
|
onKeyDown: function onKeyDown(e) {
|
|
48264
48299
|
return e.key === "Enter" && handleSubmit(e);
|
|
48265
48300
|
},
|
|
48266
|
-
autocompleteValue: "billing postal-code"
|
|
48301
|
+
autocompleteValue: "billing postal-code",
|
|
48302
|
+
isRequired: true
|
|
48267
48303
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React.createElement(Cluster, {
|
|
48268
48304
|
childGap: "4px",
|
|
48269
48305
|
align: "center"
|
|
@@ -48456,7 +48492,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48456
48492
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48457
48493
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48458
48494
|
saveToWallet = _ref.saveToWallet,
|
|
48459
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48495
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48496
|
+
_ref$isRequired = _ref.isRequired,
|
|
48497
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48460
48498
|
|
|
48461
48499
|
if (clearOnDismount) {
|
|
48462
48500
|
useEffect$1(function () {
|
|
@@ -48483,7 +48521,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48483
48521
|
},
|
|
48484
48522
|
autocompleteValue: "tel-national",
|
|
48485
48523
|
dataQa: "Phone number",
|
|
48486
|
-
isNum: true
|
|
48524
|
+
isNum: true,
|
|
48525
|
+
isRequired: isRequired
|
|
48487
48526
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48488
48527
|
name: "phone checkbox",
|
|
48489
48528
|
title: "Save phone number to wallet",
|
|
@@ -48674,7 +48713,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48674
48713
|
extraStyles: containerStyles
|
|
48675
48714
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48676
48715
|
childGap: "0",
|
|
48677
|
-
role: "radiogroup",
|
|
48716
|
+
"aria-role": "radiogroup",
|
|
48678
48717
|
"aria-required": isSectionRequired
|
|
48679
48718
|
}, sections.filter(function (section) {
|
|
48680
48719
|
return !section.hidden;
|
|
@@ -48698,7 +48737,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48698
48737
|
role: "radio",
|
|
48699
48738
|
"aria-checked": openSection === section.id,
|
|
48700
48739
|
"aria-disabled": section.disabled,
|
|
48701
|
-
"aria-required":
|
|
48740
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48702
48741
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48703
48742
|
childGap: "0"
|
|
48704
48743
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48737,7 +48776,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48737
48776
|
return toggleOpenSection(section.id);
|
|
48738
48777
|
},
|
|
48739
48778
|
tabIndex: "-1",
|
|
48740
|
-
|
|
48779
|
+
isRequired: section === null || section === void 0 ? void 0 : section.required
|
|
48741
48780
|
})), section.titleIcon && /*#__PURE__*/React.createElement(Cluster, {
|
|
48742
48781
|
align: "center"
|
|
48743
48782
|
}, section.titleIcon), /*#__PURE__*/React.createElement(Box, {
|