@thecb/components 9.1.0 → 9.1.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.
- package/dist/index.cjs.js +150 -100
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +150 -100
- package/dist/index.esm.js.map +1 -1
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +49322 -0
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/checkbox/Checkbox.js +3 -1
- package/src/components/atoms/country-dropdown/CountryDropdown.js +3 -1
- package/src/components/atoms/form-layouts/FormInput.js +11 -3
- package/src/components/{molecules → atoms/icons}/.DS_Store +0 -0
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.js +3 -1
- package/src/components/molecules/address-form/AddressForm.js +6 -0
- package/src/components/molecules/edit-name-form/EditNameForm.js +2 -0
- package/src/components/molecules/email-form/EmailForm.js +5 -2
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +6 -0
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +6 -0
- package/src/components/molecules/phone-form/PhoneForm.js +3 -1
- package/src/components/molecules/radio-group/RadioGroup.js +3 -1
- package/src/components/molecules/radio-section/RadioSection.js +1 -0
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +3 -1
- /package/src/components/atoms/icons/{ExternalLinkicon.js → ExternalLinkIcon.js} +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -22096,7 +22096,8 @@ var StyledCheckbox = styled.div.withConfig({
|
|
|
22096
22096
|
focusedStyles = _ref3.focusedStyles,
|
|
22097
22097
|
errorStyles = _ref3.errorStyles,
|
|
22098
22098
|
disabledStyles = _ref3.disabledStyles,
|
|
22099
|
-
disabledCheckedStyles = _ref3.disabledCheckedStyles
|
|
22099
|
+
disabledCheckedStyles = _ref3.disabledCheckedStyles,
|
|
22100
|
+
_ref3$required = _ref3.required;
|
|
22100
22101
|
return error ? css(["", " ", ""], errorStyles, focused && focusedStyles) : disabled ? css(["", ""], checked ? disabledCheckedStyles : disabledStyles) : checked ? css(["", " ", ""], checkedStyles, focused && focusedStyles) : css(["", " ", ""], defaultStyles, focused && focusedStyles);
|
|
22101
22102
|
});
|
|
22102
22103
|
|
|
@@ -22159,7 +22160,8 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22159
22160
|
onChange: onChange,
|
|
22160
22161
|
tabIndex: "-1",
|
|
22161
22162
|
"aria-invalid": error,
|
|
22162
|
-
"aria-describedby": error ? "".concat(name, "-error-message") : ""
|
|
22163
|
+
"aria-describedby": error ? "".concat(name, "-error-message") : "",
|
|
22164
|
+
required: required
|
|
22163
22165
|
}), /*#__PURE__*/React.createElement(StyledCheckbox, {
|
|
22164
22166
|
role: "checkbox",
|
|
22165
22167
|
error: error,
|
|
@@ -25023,7 +25025,9 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25023
25025
|
showErrors = _ref.showErrors,
|
|
25024
25026
|
onChange = _ref.onChange,
|
|
25025
25027
|
_ref$dataQa = _ref.dataQa,
|
|
25026
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa
|
|
25028
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
25029
|
+
_ref$isRequired = _ref.isRequired,
|
|
25030
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
25027
25031
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
25028
25032
|
options: options,
|
|
25029
25033
|
field: field,
|
|
@@ -25033,7 +25037,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25033
25037
|
errorMessages: errorMessages,
|
|
25034
25038
|
showErrors: showErrors,
|
|
25035
25039
|
onChange: onChange,
|
|
25036
|
-
autocompleteValue: "country-name"
|
|
25040
|
+
autocompleteValue: "country-name",
|
|
25041
|
+
required: isRequired
|
|
25037
25042
|
});
|
|
25038
25043
|
};
|
|
25039
25044
|
|
|
@@ -25878,7 +25883,7 @@ var fallbackValues$k = {
|
|
|
25878
25883
|
};
|
|
25879
25884
|
|
|
25880
25885
|
var _excluded$p = ["showErrors", "themeValues"],
|
|
25881
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
|
|
25886
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
|
|
25882
25887
|
var InputField = styled.input.withConfig({
|
|
25883
25888
|
displayName: "FormInput__InputField",
|
|
25884
25889
|
componentId: "sc-l094r1-0"
|
|
@@ -25913,7 +25918,10 @@ var FormattedInputField = styled(function (_ref8) {
|
|
|
25913
25918
|
themeValues = _ref8.themeValues,
|
|
25914
25919
|
props = _objectWithoutProperties(_ref8, _excluded$p);
|
|
25915
25920
|
|
|
25916
|
-
|
|
25921
|
+
var isRequired = props.isRequired;
|
|
25922
|
+
return /*#__PURE__*/React.createElement(FormattedInput, isRequired ? _objectSpread2(_objectSpread2({}, props), {}, {
|
|
25923
|
+
required: true
|
|
25924
|
+
}) : _objectSpread2({}, props));
|
|
25917
25925
|
}).withConfig({
|
|
25918
25926
|
displayName: "FormInput__FormattedInputField",
|
|
25919
25927
|
componentId: "sc-l094r1-1"
|
|
@@ -25965,6 +25973,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
25965
25973
|
removeFromValue = _ref15.removeFromValue,
|
|
25966
25974
|
_ref15$dataQa = _ref15.dataQa,
|
|
25967
25975
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
25976
|
+
_ref15$isRequired = _ref15.isRequired,
|
|
25977
|
+
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
25968
25978
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
25969
25979
|
|
|
25970
25980
|
var _useState = useState(false),
|
|
@@ -26051,7 +26061,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26051
26061
|
$customHeight: customHeight,
|
|
26052
26062
|
$extraStyles: extraStyles,
|
|
26053
26063
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26054
|
-
autoComplete: autocompleteValue
|
|
26064
|
+
autoComplete: autocompleteValue,
|
|
26065
|
+
required: isRequired
|
|
26055
26066
|
}, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
|
|
26056
26067
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26057
26068
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26070,7 +26081,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26070
26081
|
$customHeight: customHeight,
|
|
26071
26082
|
$extraStyles: extraStyles,
|
|
26072
26083
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26073
|
-
autoComplete: autocompleteValue
|
|
26084
|
+
autoComplete: autocompleteValue,
|
|
26085
|
+
required: isRequired
|
|
26074
26086
|
}, props))), /*#__PURE__*/React.createElement(Stack, {
|
|
26075
26087
|
direction: "row",
|
|
26076
26088
|
justify: "space-between",
|
|
@@ -27176,7 +27188,9 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27176
27188
|
_ref5$handleChange = _ref5.handleChange,
|
|
27177
27189
|
handleChange = _ref5$handleChange === void 0 ? noop : _ref5$handleChange,
|
|
27178
27190
|
field = _ref5.field,
|
|
27179
|
-
config = _ref5.config
|
|
27191
|
+
config = _ref5.config,
|
|
27192
|
+
_ref5$required = _ref5.required,
|
|
27193
|
+
required = _ref5$required === void 0 ? false : _ref5$required;
|
|
27180
27194
|
|
|
27181
27195
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
27182
27196
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
@@ -27209,7 +27223,8 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27209
27223
|
setValue(e.target.value);
|
|
27210
27224
|
handleChange(e);
|
|
27211
27225
|
},
|
|
27212
|
-
defaultChecked: getDefaultChecked(value, index)
|
|
27226
|
+
defaultChecked: getDefaultChecked(value, index),
|
|
27227
|
+
required: required
|
|
27213
27228
|
}), /*#__PURE__*/React.createElement(Text$1, {
|
|
27214
27229
|
as: "label",
|
|
27215
27230
|
htmlFor: id,
|
|
@@ -27252,7 +27267,9 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27252
27267
|
_ref2$ariaLabelledBy = _ref2.ariaLabelledBy,
|
|
27253
27268
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27254
27269
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27255
|
-
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel
|
|
27270
|
+
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27271
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27272
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27256
27273
|
var buttonBorder = {
|
|
27257
27274
|
onFocused: {
|
|
27258
27275
|
borderColor: themeValues.activeColor,
|
|
@@ -27312,7 +27329,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27312
27329
|
disabled: disabled,
|
|
27313
27330
|
onClick: toggleRadio,
|
|
27314
27331
|
"aria-describedby": ariaDescribedBy,
|
|
27315
|
-
tabIndex: "-1"
|
|
27332
|
+
tabIndex: "-1",
|
|
27333
|
+
required: isRequired
|
|
27316
27334
|
}, extraProps)), /*#__PURE__*/React.createElement(Motion, {
|
|
27317
27335
|
borderWidth: "1px",
|
|
27318
27336
|
borderStyle: "solid",
|
|
@@ -38705,7 +38723,7 @@ validatorFns[INCLUDED_IN] = (value, args, form) =>
|
|
|
38705
38723
|
|
|
38706
38724
|
const REQUIRED = 'validator/REQUIRED';
|
|
38707
38725
|
const REQUIRED_ERROR = 'error/REQUIRED';
|
|
38708
|
-
const required = createValidator(REQUIRED, REQUIRED_ERROR);
|
|
38726
|
+
const required$1 = createValidator(REQUIRED, REQUIRED_ERROR);
|
|
38709
38727
|
validatorFns[REQUIRED] = (value, args, form) => value !== '';
|
|
38710
38728
|
|
|
38711
38729
|
const ONLY_INTEGERS = 'validator/ONLY_INTEGERS';
|
|
@@ -39318,15 +39336,15 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39318
39336
|
}, []);
|
|
39319
39337
|
}
|
|
39320
39338
|
|
|
39321
|
-
var street1ErrorMessages = _defineProperty({}, required.error, "Street is required");
|
|
39339
|
+
var street1ErrorMessages = _defineProperty({}, required$1.error, "Street is required");
|
|
39322
39340
|
|
|
39323
|
-
var cityErrorMessages = _defineProperty({}, required.error, "City is required");
|
|
39341
|
+
var cityErrorMessages = _defineProperty({}, required$1.error, "City is required");
|
|
39324
39342
|
|
|
39325
|
-
var zipErrorMessages = (_zipErrorMessages = {}, _defineProperty(_zipErrorMessages, required.error, "Zip code is required"), _defineProperty(_zipErrorMessages, hasLength.error, "Zip code must be 5 or 9 digits"), _zipErrorMessages);
|
|
39343
|
+
var zipErrorMessages = (_zipErrorMessages = {}, _defineProperty(_zipErrorMessages, required$1.error, "Zip code is required"), _defineProperty(_zipErrorMessages, hasLength.error, "Zip code must be 5 or 9 digits"), _zipErrorMessages);
|
|
39326
39344
|
|
|
39327
|
-
var stateProvinceErrorMessages = _defineProperty({}, required.error, "State or Province is required");
|
|
39345
|
+
var stateProvinceErrorMessages = _defineProperty({}, required$1.error, "State or Province is required");
|
|
39328
39346
|
|
|
39329
|
-
var countryErrorMessages = _defineProperty({}, required.error, "Country is required");
|
|
39347
|
+
var countryErrorMessages = _defineProperty({}, required$1.error, "Country is required");
|
|
39330
39348
|
|
|
39331
39349
|
var isUS = fields.country.rawValue === "US";
|
|
39332
39350
|
return /*#__PURE__*/React.createElement(FormContainer$1, {
|
|
@@ -39351,7 +39369,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39351
39369
|
}
|
|
39352
39370
|
},
|
|
39353
39371
|
showErrors: showErrors,
|
|
39354
|
-
dataQa: "Country"
|
|
39372
|
+
dataQa: "Country",
|
|
39373
|
+
isRequired: true
|
|
39355
39374
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39356
39375
|
labelTextWhenNoError: "Address",
|
|
39357
39376
|
errorMessages: street1ErrorMessages,
|
|
@@ -39362,7 +39381,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39362
39381
|
return e.key === "Enter" && handleSubmit(e);
|
|
39363
39382
|
},
|
|
39364
39383
|
autocompleteValue: "address-line1",
|
|
39365
|
-
dataQa: "Address"
|
|
39384
|
+
dataQa: "Address",
|
|
39385
|
+
required: true
|
|
39366
39386
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39367
39387
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39368
39388
|
field: fields.street2,
|
|
@@ -39372,7 +39392,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39372
39392
|
return e.key === "Enter" && handleSubmit(e);
|
|
39373
39393
|
},
|
|
39374
39394
|
autocompleteValue: "address-line2",
|
|
39375
|
-
dataQa: "Address Line 2"
|
|
39395
|
+
dataQa: "Address Line 2",
|
|
39396
|
+
required: true
|
|
39376
39397
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39377
39398
|
labelTextWhenNoError: "City",
|
|
39378
39399
|
errorMessages: cityErrorMessages,
|
|
@@ -39383,7 +39404,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39383
39404
|
return e.key === "Enter" && handleSubmit(e);
|
|
39384
39405
|
},
|
|
39385
39406
|
autocompleteValue: "address-level2",
|
|
39386
|
-
dataQa: "City"
|
|
39407
|
+
dataQa: "City",
|
|
39408
|
+
required: true
|
|
39387
39409
|
}), /*#__PURE__*/React.createElement(FormStateDropdown, {
|
|
39388
39410
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39389
39411
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39394,7 +39416,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39394
39416
|
onKeyDown: function onKeyDown(e) {
|
|
39395
39417
|
return e.key === "Enter" && handleSubmit(e);
|
|
39396
39418
|
},
|
|
39397
|
-
dataQa: "State or Province"
|
|
39419
|
+
dataQa: "State or Province",
|
|
39420
|
+
required: true
|
|
39398
39421
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39399
39422
|
isNum: isUS,
|
|
39400
39423
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39407,7 +39430,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39407
39430
|
return e.key === "Enter" && handleSubmit(e);
|
|
39408
39431
|
},
|
|
39409
39432
|
autocompleteValue: "postal-code",
|
|
39410
|
-
dataQa: "Zip code"
|
|
39433
|
+
dataQa: "Zip code",
|
|
39434
|
+
required: true
|
|
39411
39435
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
39412
39436
|
name: "address checkbox",
|
|
39413
39437
|
title: "Save address to wallet",
|
|
@@ -39418,23 +39442,23 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39418
39442
|
|
|
39419
39443
|
var formConfig = {
|
|
39420
39444
|
street1: {
|
|
39421
|
-
validators: [required()]
|
|
39445
|
+
validators: [required$1()]
|
|
39422
39446
|
},
|
|
39423
39447
|
street2: {
|
|
39424
39448
|
validators: []
|
|
39425
39449
|
},
|
|
39426
39450
|
city: {
|
|
39427
|
-
validators: [required()]
|
|
39451
|
+
validators: [required$1()]
|
|
39428
39452
|
},
|
|
39429
39453
|
stateProvince: {
|
|
39430
|
-
validators: [required()]
|
|
39454
|
+
validators: [required$1()]
|
|
39431
39455
|
},
|
|
39432
39456
|
country: {
|
|
39433
39457
|
defaultValue: "US",
|
|
39434
|
-
validators: [required()]
|
|
39458
|
+
validators: [required$1()]
|
|
39435
39459
|
},
|
|
39436
39460
|
zip: {
|
|
39437
|
-
validators: [required(), validateWhen(validateWhen(hasLength(5, 5), hasLength(0, 5)), matchesRegex("US"), "country"), validateWhen(validateWhen(hasLength(9, 9), hasLength(6, 9)), matchesRegex("US"), "country")],
|
|
39461
|
+
validators: [required$1(), validateWhen(validateWhen(hasLength(5, 5), hasLength(0, 5)), matchesRegex("US"), "country"), validateWhen(validateWhen(hasLength(9, 9), hasLength(6, 9)), matchesRegex("US"), "country")],
|
|
39438
39462
|
constraints: [validateWhen(onlyIntegers(), matchesRegex("US"), "country"), validateWhen(hasLength(0, 9), matchesRegex("US"), "country")]
|
|
39439
39463
|
}
|
|
39440
39464
|
};
|
|
@@ -39526,9 +39550,9 @@ var ChangePasswordForm = function ChangePasswordForm(_ref) {
|
|
|
39526
39550
|
}, []);
|
|
39527
39551
|
}
|
|
39528
39552
|
|
|
39529
|
-
var currentPasswordErrorMessages = _defineProperty({}, required.error, "Current Password is required");
|
|
39553
|
+
var currentPasswordErrorMessages = _defineProperty({}, required$1.error, "Current Password is required");
|
|
39530
39554
|
|
|
39531
|
-
var newPasswordErrorMessages = (_newPasswordErrorMess = {}, _defineProperty(_newPasswordErrorMess, required.error, "New Password field is required."), _defineProperty(_newPasswordErrorMess, hasLength.error, "Your new password must have at least 8 characters"), _defineProperty(_newPasswordErrorMess, hasNumber.error, "Your new password must contain at least one number"), _defineProperty(_newPasswordErrorMess, hasLowercaseLetter.error, "Your new password must contain at least one lowercase letter"), _defineProperty(_newPasswordErrorMess, hasUppercaseLetter.error, "Your new password must contain at least one uppercase letter"), _defineProperty(_newPasswordErrorMess, hasSpecialCharacter.error, "Your new password must contain at least one special character (!@#$%^&*.?)"), _newPasswordErrorMess);
|
|
39555
|
+
var newPasswordErrorMessages = (_newPasswordErrorMess = {}, _defineProperty(_newPasswordErrorMess, required$1.error, "New Password field is required."), _defineProperty(_newPasswordErrorMess, hasLength.error, "Your new password must have at least 8 characters"), _defineProperty(_newPasswordErrorMess, hasNumber.error, "Your new password must contain at least one number"), _defineProperty(_newPasswordErrorMess, hasLowercaseLetter.error, "Your new password must contain at least one lowercase letter"), _defineProperty(_newPasswordErrorMess, hasUppercaseLetter.error, "Your new password must contain at least one uppercase letter"), _defineProperty(_newPasswordErrorMess, hasSpecialCharacter.error, "Your new password must contain at least one special character (!@#$%^&*.?)"), _newPasswordErrorMess);
|
|
39532
39556
|
|
|
39533
39557
|
var confirmNewPasswordErrorMessages = _defineProperty({}, matchesField.error, "Confirm password must match your new password");
|
|
39534
39558
|
|
|
@@ -39621,13 +39645,13 @@ var ChangePasswordForm = function ChangePasswordForm(_ref) {
|
|
|
39621
39645
|
|
|
39622
39646
|
var formConfig$1 = {
|
|
39623
39647
|
currentPassword: {
|
|
39624
|
-
validators: [required()]
|
|
39648
|
+
validators: [required$1()]
|
|
39625
39649
|
},
|
|
39626
39650
|
newPassword: {
|
|
39627
|
-
validators: [required(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
39651
|
+
validators: [required$1(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
39628
39652
|
},
|
|
39629
39653
|
confirmNewPassword: {
|
|
39630
|
-
validators: [required(), matchesField("newPassword")]
|
|
39654
|
+
validators: [required$1(), matchesField("newPassword")]
|
|
39631
39655
|
}
|
|
39632
39656
|
};
|
|
39633
39657
|
|
|
@@ -39970,9 +39994,9 @@ var EditNameForm = function EditNameForm(_ref) {
|
|
|
39970
39994
|
}, []);
|
|
39971
39995
|
}
|
|
39972
39996
|
|
|
39973
|
-
var firstNameErrorMessages = _defineProperty({}, required.error, "First name is required");
|
|
39997
|
+
var firstNameErrorMessages = _defineProperty({}, required$1.error, "First name is required");
|
|
39974
39998
|
|
|
39975
|
-
var lastNameErrorMessages = _defineProperty({}, required.error, "Last name is required");
|
|
39999
|
+
var lastNameErrorMessages = _defineProperty({}, required$1.error, "Last name is required");
|
|
39976
40000
|
|
|
39977
40001
|
return /*#__PURE__*/React.createElement(FormContainer$1, {
|
|
39978
40002
|
role: "form",
|
|
@@ -39987,7 +40011,8 @@ var EditNameForm = function EditNameForm(_ref) {
|
|
|
39987
40011
|
onKeyDown: function onKeyDown(e) {
|
|
39988
40012
|
return e.key === "Enter" && handleSubmit(e);
|
|
39989
40013
|
},
|
|
39990
|
-
autocompleteValue: "given-name"
|
|
40014
|
+
autocompleteValue: "given-name",
|
|
40015
|
+
isRequired: true
|
|
39991
40016
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39992
40017
|
labelTextWhenNoError: "Last Name",
|
|
39993
40018
|
dataQa: "Edit Last Name",
|
|
@@ -39998,16 +40023,17 @@ var EditNameForm = function EditNameForm(_ref) {
|
|
|
39998
40023
|
onKeyDown: function onKeyDown(e) {
|
|
39999
40024
|
return e.key === "Enter" && handleSubmit(e);
|
|
40000
40025
|
},
|
|
40001
|
-
autocompleteValue: "family-name"
|
|
40026
|
+
autocompleteValue: "family-name",
|
|
40027
|
+
isRequired: true
|
|
40002
40028
|
})));
|
|
40003
40029
|
};
|
|
40004
40030
|
|
|
40005
40031
|
var formConfig$2 = {
|
|
40006
40032
|
firstName: {
|
|
40007
|
-
validators: [required()]
|
|
40033
|
+
validators: [required$1()]
|
|
40008
40034
|
},
|
|
40009
40035
|
lastName: {
|
|
40010
|
-
validators: [required()]
|
|
40036
|
+
validators: [required$1()]
|
|
40011
40037
|
}
|
|
40012
40038
|
};
|
|
40013
40039
|
|
|
@@ -40310,7 +40336,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40310
40336
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40311
40337
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40312
40338
|
saveToWallet = _ref.saveToWallet,
|
|
40313
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40339
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40340
|
+
_ref$isRequired = _ref.isRequired,
|
|
40341
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40314
40342
|
|
|
40315
40343
|
if (clearOnDismount) {
|
|
40316
40344
|
useEffect$1(function () {
|
|
@@ -40320,13 +40348,14 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40320
40348
|
}, []);
|
|
40321
40349
|
}
|
|
40322
40350
|
|
|
40323
|
-
var emailFieldErrorMessages = (_emailFieldErrorMessa = {}, _defineProperty(_emailFieldErrorMessa, required.error, "Email address is required"), _defineProperty(_emailFieldErrorMessa, isProbablyEmail.error, "Invalid email address"), _emailFieldErrorMessa);
|
|
40351
|
+
var emailFieldErrorMessages = (_emailFieldErrorMessa = {}, _defineProperty(_emailFieldErrorMessa, required$1.error, "Email address is required"), _defineProperty(_emailFieldErrorMessa, isProbablyEmail.error, "Invalid email address"), _emailFieldErrorMessa);
|
|
40324
40352
|
return /*#__PURE__*/React.createElement(FormContainer$1, {
|
|
40325
40353
|
variant: variant,
|
|
40326
40354
|
role: "form",
|
|
40327
40355
|
"aria-label": "Email address"
|
|
40328
40356
|
}, guestCheckout && /*#__PURE__*/React.createElement(Paragraph$1, {
|
|
40329
|
-
margin: "0 0 1.125rem 0"
|
|
40357
|
+
margin: "0 0 1.125rem 0",
|
|
40358
|
+
id: "explanation"
|
|
40330
40359
|
}, "If desired, you can create a wallet later for faster checkout"), /*#__PURE__*/React.createElement(FormInputColumn, null, /*#__PURE__*/React.createElement(FormInput$1, {
|
|
40331
40360
|
labelTextWhenNoError: "Email address",
|
|
40332
40361
|
errorMessages: emailFieldErrorMessages,
|
|
@@ -40339,18 +40368,20 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40339
40368
|
},
|
|
40340
40369
|
isEmail: true,
|
|
40341
40370
|
autocompleteValue: "email",
|
|
40342
|
-
dataQa: "Email address"
|
|
40371
|
+
dataQa: "Email address",
|
|
40372
|
+
required: isRequired
|
|
40343
40373
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
40344
40374
|
name: "email checkbox",
|
|
40345
40375
|
title: "Save email address to wallet",
|
|
40346
40376
|
checked: walletCheckboxMarked,
|
|
40347
|
-
onChange: saveToWallet
|
|
40377
|
+
onChange: saveToWallet,
|
|
40378
|
+
"aria-describedby": "explanation"
|
|
40348
40379
|
})));
|
|
40349
40380
|
};
|
|
40350
40381
|
|
|
40351
40382
|
var formConfig$3 = {
|
|
40352
40383
|
email: {
|
|
40353
|
-
validators: [required(), isProbablyEmail()]
|
|
40384
|
+
validators: [required$1(), isProbablyEmail()]
|
|
40354
40385
|
}
|
|
40355
40386
|
};
|
|
40356
40387
|
|
|
@@ -40417,7 +40448,7 @@ var ForgotPasswordForm = function ForgotPasswordForm(_ref) {
|
|
|
40417
40448
|
}, []);
|
|
40418
40449
|
}
|
|
40419
40450
|
|
|
40420
|
-
var EmailErrorMessages = (_EmailErrorMessages = {}, _defineProperty(_EmailErrorMessages, required.error, "Email address is required"), _defineProperty(_EmailErrorMessages, isProbablyEmail.error, "Email address is not valid"), _EmailErrorMessages);
|
|
40451
|
+
var EmailErrorMessages = (_EmailErrorMessages = {}, _defineProperty(_EmailErrorMessages, required$1.error, "Email address is required"), _defineProperty(_EmailErrorMessages, isProbablyEmail.error, "Email address is not valid"), _EmailErrorMessages);
|
|
40421
40452
|
return /*#__PURE__*/React.createElement(FormInput$1, {
|
|
40422
40453
|
labelTextWhenNoError: "Email address",
|
|
40423
40454
|
errorMessages: EmailErrorMessages,
|
|
@@ -40434,7 +40465,7 @@ var ForgotPasswordForm = function ForgotPasswordForm(_ref) {
|
|
|
40434
40465
|
|
|
40435
40466
|
var formConfig$4 = {
|
|
40436
40467
|
email: {
|
|
40437
|
-
validators: [required(), isProbablyEmail()]
|
|
40468
|
+
validators: [required$1(), isProbablyEmail()]
|
|
40438
40469
|
}
|
|
40439
40470
|
};
|
|
40440
40471
|
|
|
@@ -42096,9 +42127,9 @@ var LoginForm = function LoginForm(_ref) {
|
|
|
42096
42127
|
}, []);
|
|
42097
42128
|
}
|
|
42098
42129
|
|
|
42099
|
-
var emailErrorMessages = (_emailErrorMessages = {}, _defineProperty(_emailErrorMessages, required.error, "Email address is required"), _defineProperty(_emailErrorMessages, isProbablyEmail.error, "Invalid email address"), _emailErrorMessages);
|
|
42130
|
+
var emailErrorMessages = (_emailErrorMessages = {}, _defineProperty(_emailErrorMessages, required$1.error, "Email address is required"), _defineProperty(_emailErrorMessages, isProbablyEmail.error, "Invalid email address"), _emailErrorMessages);
|
|
42100
42131
|
|
|
42101
|
-
var passwordErrorMessages = _defineProperty({}, required.error, "Password is required");
|
|
42132
|
+
var passwordErrorMessages = _defineProperty({}, required$1.error, "Password is required");
|
|
42102
42133
|
|
|
42103
42134
|
return /*#__PURE__*/React.createElement(FormInputColumn, {
|
|
42104
42135
|
role: "form",
|
|
@@ -42131,10 +42162,10 @@ var LoginForm = function LoginForm(_ref) {
|
|
|
42131
42162
|
|
|
42132
42163
|
var formConfig$5 = {
|
|
42133
42164
|
email: {
|
|
42134
|
-
validators: [required(), isProbablyEmail()]
|
|
42165
|
+
validators: [required$1(), isProbablyEmail()]
|
|
42135
42166
|
},
|
|
42136
42167
|
password: {
|
|
42137
|
-
validators: [required()]
|
|
42168
|
+
validators: [required$1()]
|
|
42138
42169
|
}
|
|
42139
42170
|
};
|
|
42140
42171
|
|
|
@@ -46739,7 +46770,7 @@ var PartialAmountForm = function PartialAmountForm(_ref) {
|
|
|
46739
46770
|
}, []);
|
|
46740
46771
|
}
|
|
46741
46772
|
|
|
46742
|
-
var amountErrors = (_amountErrors = {}, _defineProperty(_amountErrors, required.error, "Amount is required"), _defineProperty(_amountErrors, numberGreaterThanOrEqualTo.error, "There is a minimum payment of ".concat(displayCurrency(minimum))), _defineProperty(_amountErrors, numberLessThanOrEqualTo.error, "There is a maximum payment of ".concat(displayCurrency(maximum))), _amountErrors);
|
|
46773
|
+
var amountErrors = (_amountErrors = {}, _defineProperty(_amountErrors, required$1.error, "Amount is required"), _defineProperty(_amountErrors, numberGreaterThanOrEqualTo.error, "There is a minimum payment of ".concat(displayCurrency(minimum))), _defineProperty(_amountErrors, numberLessThanOrEqualTo.error, "There is a maximum payment of ".concat(displayCurrency(maximum))), _amountErrors);
|
|
46743
46774
|
|
|
46744
46775
|
var getPartialAmountFormErrors = function getPartialAmountFormErrors(itemAmount) {
|
|
46745
46776
|
var errorMessages = amountErrors;
|
|
@@ -46813,7 +46844,7 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
46813
46844
|
var createPartialAmountFormValidators = function createPartialAmountFormValidators(item, lineItems, maximum) {
|
|
46814
46845
|
var minimum = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
46815
46846
|
var blockPartialPaymentOverpay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
46816
|
-
var validators = [required(), validateSum(numberGreaterThanOrEqualTo(minimum), lineItems.filter(function (lineItem) {
|
|
46847
|
+
var validators = [required$1(), validateSum(numberGreaterThanOrEqualTo(minimum), lineItems.filter(function (lineItem) {
|
|
46817
46848
|
return lineItem != item;
|
|
46818
46849
|
}).reduce(function (acc, curr) {
|
|
46819
46850
|
return [].concat(_toConsumableArray(acc), [curr.id]);
|
|
@@ -47875,17 +47906,17 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47875
47906
|
|
|
47876
47907
|
var showTerms = !!termsContent;
|
|
47877
47908
|
|
|
47878
|
-
var nameErrors = _defineProperty({}, required.error, "Name is required");
|
|
47909
|
+
var nameErrors = _defineProperty({}, required$1.error, "Name is required");
|
|
47879
47910
|
|
|
47880
|
-
var routingNumberErrors = (_routingNumberErrors = {}, _defineProperty(_routingNumberErrors, required.error, "Routing number is required"), _defineProperty(_routingNumberErrors, hasLength.error, "Routing number must be 9 digits"), _defineProperty(_routingNumberErrors, isRoutingNumber.error, "Invalid routing number"), _routingNumberErrors);
|
|
47911
|
+
var routingNumberErrors = (_routingNumberErrors = {}, _defineProperty(_routingNumberErrors, required$1.error, "Routing number is required"), _defineProperty(_routingNumberErrors, hasLength.error, "Routing number must be 9 digits"), _defineProperty(_routingNumberErrors, isRoutingNumber.error, "Invalid routing number"), _routingNumberErrors);
|
|
47881
47912
|
|
|
47882
47913
|
var confirmRoutingNumberErrors = _defineProperty({}, matchesField.error, "Confirm routing number field must match routing number");
|
|
47883
47914
|
|
|
47884
|
-
var accountNumberErrors = (_accountNumberErrors = {}, _defineProperty(_accountNumberErrors, required.error, "Account number is required"), _defineProperty(_accountNumberErrors, hasLength.error, "Account number must be between 5 and 17 digits"), _accountNumberErrors);
|
|
47915
|
+
var accountNumberErrors = (_accountNumberErrors = {}, _defineProperty(_accountNumberErrors, required$1.error, "Account number is required"), _defineProperty(_accountNumberErrors, hasLength.error, "Account number must be between 5 and 17 digits"), _accountNumberErrors);
|
|
47885
47916
|
|
|
47886
47917
|
var confirmAccountNumberErrors = _defineProperty({}, matchesField.error, "Confirm account number field must match account number");
|
|
47887
47918
|
|
|
47888
|
-
var accountTypeErrors = _defineProperty({}, required.error, "Account type is required");
|
|
47919
|
+
var accountTypeErrors = _defineProperty({}, required$1.error, "Account type is required");
|
|
47889
47920
|
|
|
47890
47921
|
return /*#__PURE__*/React.createElement(FormContainer$1, {
|
|
47891
47922
|
variant: variant,
|
|
@@ -47901,7 +47932,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47901
47932
|
onKeyDown: function onKeyDown(e) {
|
|
47902
47933
|
return e.key === "Enter" && handleSubmit(e);
|
|
47903
47934
|
},
|
|
47904
|
-
autocompleteValue: "name"
|
|
47935
|
+
autocompleteValue: "name",
|
|
47936
|
+
isRequired: true
|
|
47905
47937
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
47906
47938
|
labelTextWhenNoError: "Routing number",
|
|
47907
47939
|
dataQa: "Routing number",
|
|
@@ -47923,7 +47955,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47923
47955
|
},
|
|
47924
47956
|
onKeyDown: function onKeyDown(e) {
|
|
47925
47957
|
return e.key === "Enter" && handleSubmit(e);
|
|
47926
|
-
}
|
|
47958
|
+
},
|
|
47959
|
+
isRequired: true
|
|
47927
47960
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
47928
47961
|
labelTextWhenNoError: "Confirm routing number",
|
|
47929
47962
|
dataQa: "Confirm routing number",
|
|
@@ -47934,6 +47967,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47934
47967
|
onKeyDown: function onKeyDown(e) {
|
|
47935
47968
|
return e.key === "Enter" && handleSubmit(e);
|
|
47936
47969
|
},
|
|
47970
|
+
isRequired: true,
|
|
47937
47971
|
isNum: true
|
|
47938
47972
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
47939
47973
|
labelTextWhenNoError: "Account number",
|
|
@@ -47942,6 +47976,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47942
47976
|
field: fields.accountNumber,
|
|
47943
47977
|
fieldActions: actions.fields.accountNumber,
|
|
47944
47978
|
showErrors: showErrors,
|
|
47979
|
+
isRequired: true,
|
|
47945
47980
|
isNum: true,
|
|
47946
47981
|
helperModal: function helperModal() {
|
|
47947
47982
|
return /*#__PURE__*/React.createElement(AccountAndRoutingModal$1, {
|
|
@@ -47959,6 +47994,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47959
47994
|
}
|
|
47960
47995
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
47961
47996
|
labelTextWhenNoError: "Confirm account number",
|
|
47997
|
+
isRequired: true,
|
|
47962
47998
|
dataQa: "Confirm account number",
|
|
47963
47999
|
errorMessages: confirmAccountNumberErrors,
|
|
47964
48000
|
field: fields.confirmAccountNumber,
|
|
@@ -47987,6 +48023,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47987
48023
|
field: fields.accountType
|
|
47988
48024
|
}), !hideDefaultPayment && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
47989
48025
|
title: "Save as Default Payment Method",
|
|
48026
|
+
required: true,
|
|
47990
48027
|
dataQa: "default-payment-ach",
|
|
47991
48028
|
name: "default-payment-ach",
|
|
47992
48029
|
onChange: toggleCheckbox,
|
|
@@ -48013,10 +48050,10 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48013
48050
|
|
|
48014
48051
|
var formConfig$6 = {
|
|
48015
48052
|
name: {
|
|
48016
|
-
validators: [required()]
|
|
48053
|
+
validators: [required$1()]
|
|
48017
48054
|
},
|
|
48018
48055
|
routingNumber: {
|
|
48019
|
-
validators: [required(), hasLength(9, 9), isRoutingNumber()],
|
|
48056
|
+
validators: [required$1(), hasLength(9, 9), isRoutingNumber()],
|
|
48020
48057
|
constraints: [onlyIntegers(), hasLength(0, 9)]
|
|
48021
48058
|
},
|
|
48022
48059
|
confirmRoutingNumber: {
|
|
@@ -48024,7 +48061,7 @@ var formConfig$6 = {
|
|
|
48024
48061
|
constraints: [onlyIntegers(), hasLength(0, 9)]
|
|
48025
48062
|
},
|
|
48026
48063
|
accountNumber: {
|
|
48027
|
-
validators: [required(), hasLength(5, 17)],
|
|
48064
|
+
validators: [required$1(), hasLength(5, 17)],
|
|
48028
48065
|
constraints: [onlyIntegers(), hasLength(0, 17)]
|
|
48029
48066
|
},
|
|
48030
48067
|
confirmAccountNumber: {
|
|
@@ -48033,7 +48070,7 @@ var formConfig$6 = {
|
|
|
48033
48070
|
},
|
|
48034
48071
|
accountType: {
|
|
48035
48072
|
defaultValue: "CHECKING",
|
|
48036
|
-
validators: [required()]
|
|
48073
|
+
validators: [required$1()]
|
|
48037
48074
|
}
|
|
48038
48075
|
};
|
|
48039
48076
|
|
|
@@ -48084,14 +48121,14 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48084
48121
|
}
|
|
48085
48122
|
}, []);
|
|
48086
48123
|
|
|
48087
|
-
var nameOnCardErrors = _defineProperty({}, required.error, "Name is required");
|
|
48124
|
+
var nameOnCardErrors = _defineProperty({}, required$1.error, "Name is required");
|
|
48088
48125
|
|
|
48089
|
-
var creditCardNumberErrors = (_creditCardNumberErro = {}, _defineProperty(_creditCardNumberErro, required.error, "Credit card number is required"), _defineProperty(_creditCardNumberErro, hasLength.error, "Credit card number is invalid"), _defineProperty(_creditCardNumberErro, matchesRegex.error, "".concat(displayCardBrand(fields.creditCardNumber.rawValue), " is not accepted")), _creditCardNumberErro);
|
|
48090
|
-
var expirationDateErrors = (_expirationDateErrors = {}, _defineProperty(_expirationDateErrors, required.error, "Expiration date is required"), _defineProperty(_expirationDateErrors, hasLength.error, "Expiration date is invalid"), _defineProperty(_expirationDateErrors, isValidMonth.error, "Expiration month is invalid"), _defineProperty(_expirationDateErrors, dateAfterToday.error, "Expiration date is invalid"), _expirationDateErrors);
|
|
48091
|
-
var cvvErrors = (_cvvErrors = {}, _defineProperty(_cvvErrors, required.error, "CVV is required"), _defineProperty(_cvvErrors, hasLength.error, "CVV is invalid"), _cvvErrors);
|
|
48092
|
-
var zipCodeErrors = (_zipCodeErrors = {}, _defineProperty(_zipCodeErrors, required.error, "Zip code is required"), _defineProperty(_zipCodeErrors, hasLength.error, "Zip code is invalid"), _zipCodeErrors);
|
|
48126
|
+
var creditCardNumberErrors = (_creditCardNumberErro = {}, _defineProperty(_creditCardNumberErro, required$1.error, "Credit card number is required"), _defineProperty(_creditCardNumberErro, hasLength.error, "Credit card number is invalid"), _defineProperty(_creditCardNumberErro, matchesRegex.error, "".concat(displayCardBrand(fields.creditCardNumber.rawValue), " is not accepted")), _creditCardNumberErro);
|
|
48127
|
+
var expirationDateErrors = (_expirationDateErrors = {}, _defineProperty(_expirationDateErrors, required$1.error, "Expiration date is required"), _defineProperty(_expirationDateErrors, hasLength.error, "Expiration date is invalid"), _defineProperty(_expirationDateErrors, isValidMonth.error, "Expiration month is invalid"), _defineProperty(_expirationDateErrors, dateAfterToday.error, "Expiration date is invalid"), _expirationDateErrors);
|
|
48128
|
+
var cvvErrors = (_cvvErrors = {}, _defineProperty(_cvvErrors, required$1.error, "CVV is required"), _defineProperty(_cvvErrors, hasLength.error, "CVV is invalid"), _cvvErrors);
|
|
48129
|
+
var zipCodeErrors = (_zipCodeErrors = {}, _defineProperty(_zipCodeErrors, required$1.error, "Zip code is required"), _defineProperty(_zipCodeErrors, hasLength.error, "Zip code is invalid"), _zipCodeErrors);
|
|
48093
48130
|
|
|
48094
|
-
var countryErrorMessages = _defineProperty({}, required.error, "Country is required");
|
|
48131
|
+
var countryErrorMessages = _defineProperty({}, required$1.error, "Country is required");
|
|
48095
48132
|
|
|
48096
48133
|
var isUS = fields.country.rawValue === "US";
|
|
48097
48134
|
return /*#__PURE__*/React.createElement(FormContainer$1, {
|
|
@@ -48111,7 +48148,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48111
48148
|
}
|
|
48112
48149
|
},
|
|
48113
48150
|
showErrors: showErrors,
|
|
48114
|
-
dataQa: "Country"
|
|
48151
|
+
dataQa: "Country",
|
|
48152
|
+
isRequired: true
|
|
48115
48153
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48116
48154
|
labelTextWhenNoError: "Name on card",
|
|
48117
48155
|
dataQa: "Name on card",
|
|
@@ -48122,7 +48160,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48122
48160
|
onKeyDown: function onKeyDown(e) {
|
|
48123
48161
|
return e.key === "Enter" && handleSubmit(e);
|
|
48124
48162
|
},
|
|
48125
|
-
autocompleteValue: "cc-name"
|
|
48163
|
+
autocompleteValue: "cc-name",
|
|
48164
|
+
required: true
|
|
48126
48165
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48127
48166
|
labelTextWhenNoError: "Credit card number",
|
|
48128
48167
|
dataQa: "Credit card number",
|
|
@@ -48135,7 +48174,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48135
48174
|
return e.key === "Enter" && handleSubmit(e);
|
|
48136
48175
|
},
|
|
48137
48176
|
isNum: true,
|
|
48138
|
-
autocompleteValue: "cc-number"
|
|
48177
|
+
autocompleteValue: "cc-number",
|
|
48178
|
+
required: true
|
|
48139
48179
|
}), /*#__PURE__*/React.createElement(FormInputRow, {
|
|
48140
48180
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48141
48181
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48153,7 +48193,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48153
48193
|
isNum: true,
|
|
48154
48194
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48155
48195
|
,
|
|
48156
|
-
autocompleteValue: "cc-exp"
|
|
48196
|
+
autocompleteValue: "cc-exp",
|
|
48197
|
+
required: true
|
|
48157
48198
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48158
48199
|
labelTextWhenNoError: "CVV",
|
|
48159
48200
|
dataQa: "CVV",
|
|
@@ -48166,7 +48207,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48166
48207
|
onKeyDown: function onKeyDown(e) {
|
|
48167
48208
|
return e.key === "Enter" && handleSubmit(e);
|
|
48168
48209
|
},
|
|
48169
|
-
autocompleteValue: "cc-csc"
|
|
48210
|
+
autocompleteValue: "cc-csc",
|
|
48211
|
+
required: true
|
|
48170
48212
|
})), !hideZipCode && /*#__PURE__*/React.createElement(Box, {
|
|
48171
48213
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48172
48214
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48182,7 +48224,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48182
48224
|
onKeyDown: function onKeyDown(e) {
|
|
48183
48225
|
return e.key === "Enter" && handleSubmit(e);
|
|
48184
48226
|
},
|
|
48185
|
-
autocompleteValue: "billing postal-code"
|
|
48227
|
+
autocompleteValue: "billing postal-code",
|
|
48228
|
+
required: true
|
|
48186
48229
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React.createElement(Cluster, {
|
|
48187
48230
|
childGap: "4px",
|
|
48188
48231
|
align: "center"
|
|
@@ -48207,25 +48250,25 @@ var PaymentFormCard$1 = withWindowSize(PaymentFormCard);
|
|
|
48207
48250
|
var formConfig$7 = {
|
|
48208
48251
|
country: {
|
|
48209
48252
|
defaultValue: "US",
|
|
48210
|
-
validators: [required()]
|
|
48253
|
+
validators: [required$1()]
|
|
48211
48254
|
},
|
|
48212
48255
|
nameOnCard: {
|
|
48213
|
-
validators: [required()]
|
|
48256
|
+
validators: [required$1()]
|
|
48214
48257
|
},
|
|
48215
48258
|
creditCardNumber: {
|
|
48216
|
-
validators: [required(), hasLength(15, 16)],
|
|
48259
|
+
validators: [required$1(), hasLength(15, 16)],
|
|
48217
48260
|
constraints: [onlyIntegers(), hasLength(0, 16)]
|
|
48218
48261
|
},
|
|
48219
48262
|
expirationDate: {
|
|
48220
|
-
validators: [required(), hasLength(4, 4), isValidMonth(0), dateAfterToday("MMYY", "month", true)],
|
|
48263
|
+
validators: [required$1(), hasLength(4, 4), isValidMonth(0), dateAfterToday("MMYY", "month", true)],
|
|
48221
48264
|
constraints: [onlyExpirationDate(), hasLength(0, 4)]
|
|
48222
48265
|
},
|
|
48223
48266
|
cvv: {
|
|
48224
|
-
validators: [required(), hasLength(3, 4)],
|
|
48267
|
+
validators: [required$1(), hasLength(3, 4)],
|
|
48225
48268
|
constraints: [onlyIntegers(), hasLength(0, 4)]
|
|
48226
48269
|
},
|
|
48227
48270
|
zipCode: {
|
|
48228
|
-
validators: [required(), validateWhen(validateWhen(hasLength(5, 5), hasLength(0, 5)), matchesRegex("US"), "country"), validateWhen(validateWhen(hasLength(9, 9), hasLength(6, 9)), matchesRegex("US"), "country")],
|
|
48271
|
+
validators: [required$1(), validateWhen(validateWhen(hasLength(5, 5), hasLength(0, 5)), matchesRegex("US"), "country"), validateWhen(validateWhen(hasLength(9, 9), hasLength(6, 9)), matchesRegex("US"), "country")],
|
|
48229
48272
|
constraints: [validateWhen(onlyIntegers(), matchesRegex("US"), "country"), validateWhen(hasLength(0, 9), matchesRegex("US"), "country")]
|
|
48230
48273
|
}
|
|
48231
48274
|
};
|
|
@@ -48375,7 +48418,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48375
48418
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48376
48419
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48377
48420
|
saveToWallet = _ref.saveToWallet,
|
|
48378
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48421
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48422
|
+
_ref$isRequired = _ref.isRequired,
|
|
48423
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48379
48424
|
|
|
48380
48425
|
if (clearOnDismount) {
|
|
48381
48426
|
useEffect$1(function () {
|
|
@@ -48385,7 +48430,7 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48385
48430
|
}, []);
|
|
48386
48431
|
}
|
|
48387
48432
|
|
|
48388
|
-
var phoneErrorMessage = (_phoneErrorMessage = {}, _defineProperty(_phoneErrorMessage, required.error, "Phone number is required"), _defineProperty(_phoneErrorMessage, hasLength.error, "Phone number must be 10 digits"), _phoneErrorMessage);
|
|
48433
|
+
var phoneErrorMessage = (_phoneErrorMessage = {}, _defineProperty(_phoneErrorMessage, required$1.error, "Phone number is required"), _defineProperty(_phoneErrorMessage, hasLength.error, "Phone number must be 10 digits"), _phoneErrorMessage);
|
|
48389
48434
|
return /*#__PURE__*/React.createElement(FormContainer$1, {
|
|
48390
48435
|
variant: variant,
|
|
48391
48436
|
role: "form",
|
|
@@ -48402,7 +48447,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48402
48447
|
},
|
|
48403
48448
|
autocompleteValue: "tel-national",
|
|
48404
48449
|
dataQa: "Phone number",
|
|
48405
|
-
isNum: true
|
|
48450
|
+
isNum: true,
|
|
48451
|
+
required: isRequired
|
|
48406
48452
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48407
48453
|
name: "phone checkbox",
|
|
48408
48454
|
title: "Save phone number to wallet",
|
|
@@ -48413,7 +48459,7 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48413
48459
|
|
|
48414
48460
|
var formConfig$8 = {
|
|
48415
48461
|
phone: {
|
|
48416
|
-
validators: [required(), hasLength(10, 10)],
|
|
48462
|
+
validators: [required$1(), hasLength(10, 10)],
|
|
48417
48463
|
constraints: [onlyIntegers(), hasLength(0, 10)]
|
|
48418
48464
|
}
|
|
48419
48465
|
};
|
|
@@ -48451,7 +48497,9 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48451
48497
|
_ref$handleChange = _ref.handleChange,
|
|
48452
48498
|
handleChange = _ref$handleChange === void 0 ? noop : _ref$handleChange,
|
|
48453
48499
|
field = _ref.field,
|
|
48454
|
-
fieldActions = _ref.fieldActions
|
|
48500
|
+
fieldActions = _ref.fieldActions,
|
|
48501
|
+
_ref$isRequired = _ref.isRequired,
|
|
48502
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48455
48503
|
|
|
48456
48504
|
var setValue = function setValue(value) {
|
|
48457
48505
|
return fieldActions.set(value);
|
|
@@ -48465,6 +48513,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48465
48513
|
childGap: "4px"
|
|
48466
48514
|
}, config.map(function (c, idx) {
|
|
48467
48515
|
return /*#__PURE__*/React.createElement(RadioButtonWithLabel$1, _extends({
|
|
48516
|
+
required: isRequired,
|
|
48468
48517
|
index: idx,
|
|
48469
48518
|
key: c.id
|
|
48470
48519
|
}, c, {
|
|
@@ -48651,7 +48700,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48651
48700
|
toggleRadio: section.disabled ? noop : function () {
|
|
48652
48701
|
return toggleOpenSection(section.id);
|
|
48653
48702
|
},
|
|
48654
|
-
tabIndex: "-1"
|
|
48703
|
+
tabIndex: "-1",
|
|
48704
|
+
isRequired: true
|
|
48655
48705
|
})), section.titleIcon && /*#__PURE__*/React.createElement(Cluster, {
|
|
48656
48706
|
align: "center"
|
|
48657
48707
|
}, section.titleIcon), /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48710,12 +48760,12 @@ var RegistrationForm = function RegistrationForm(_ref) {
|
|
|
48710
48760
|
}, []);
|
|
48711
48761
|
}
|
|
48712
48762
|
|
|
48713
|
-
var firstNameErrorMessages = _defineProperty({}, required.error, "First name is required");
|
|
48763
|
+
var firstNameErrorMessages = _defineProperty({}, required$1.error, "First name is required");
|
|
48714
48764
|
|
|
48715
|
-
var lastNameErrorMessages = _defineProperty({}, required.error, "Last name is required");
|
|
48765
|
+
var lastNameErrorMessages = _defineProperty({}, required$1.error, "Last name is required");
|
|
48716
48766
|
|
|
48717
|
-
var emailErrorMessages = (_emailErrorMessages = {}, _defineProperty(_emailErrorMessages, required.error, "Email is required"), _defineProperty(_emailErrorMessages, isProbablyEmail.error, "Invalid email address"), _emailErrorMessages);
|
|
48718
|
-
var passwordErrorMessages = (_passwordErrorMessage = {}, _defineProperty(_passwordErrorMessage, required.error, "Password is required"), _defineProperty(_passwordErrorMessage, hasLength.error, "Password must have at least 8 characters"), _defineProperty(_passwordErrorMessage, hasNumber.error, "Password must contain at least one number"), _defineProperty(_passwordErrorMessage, hasLowercaseLetter.error, "Password must contain at least one lowercase letter"), _defineProperty(_passwordErrorMessage, hasUppercaseLetter.error, "Password must contain at least one uppercase letter"), _defineProperty(_passwordErrorMessage, hasSpecialCharacter.error, "Password must contain at least one special character (!@#$%^&*.?)"), _passwordErrorMessage);
|
|
48767
|
+
var emailErrorMessages = (_emailErrorMessages = {}, _defineProperty(_emailErrorMessages, required$1.error, "Email is required"), _defineProperty(_emailErrorMessages, isProbablyEmail.error, "Invalid email address"), _emailErrorMessages);
|
|
48768
|
+
var passwordErrorMessages = (_passwordErrorMessage = {}, _defineProperty(_passwordErrorMessage, required$1.error, "Password is required"), _defineProperty(_passwordErrorMessage, hasLength.error, "Password must have at least 8 characters"), _defineProperty(_passwordErrorMessage, hasNumber.error, "Password must contain at least one number"), _defineProperty(_passwordErrorMessage, hasLowercaseLetter.error, "Password must contain at least one lowercase letter"), _defineProperty(_passwordErrorMessage, hasUppercaseLetter.error, "Password must contain at least one uppercase letter"), _defineProperty(_passwordErrorMessage, hasSpecialCharacter.error, "Password must contain at least one special character (!@#$%^&*.?)"), _passwordErrorMessage);
|
|
48719
48769
|
|
|
48720
48770
|
var confirmPasswordErrorMessages = _defineProperty({}, matchesField.error, "Confirm password must match password");
|
|
48721
48771
|
|
|
@@ -48791,19 +48841,19 @@ var RegistrationForm = function RegistrationForm(_ref) {
|
|
|
48791
48841
|
|
|
48792
48842
|
var formConfig$9 = {
|
|
48793
48843
|
firstName: {
|
|
48794
|
-
validators: [required()]
|
|
48844
|
+
validators: [required$1()]
|
|
48795
48845
|
},
|
|
48796
48846
|
lastName: {
|
|
48797
|
-
validators: [required()]
|
|
48847
|
+
validators: [required$1()]
|
|
48798
48848
|
},
|
|
48799
48849
|
email: {
|
|
48800
|
-
validators: [required(), isProbablyEmail()]
|
|
48850
|
+
validators: [required$1(), isProbablyEmail()]
|
|
48801
48851
|
},
|
|
48802
48852
|
password: {
|
|
48803
|
-
validators: [required(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
48853
|
+
validators: [required$1(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
48804
48854
|
},
|
|
48805
48855
|
confirmPassword: {
|
|
48806
|
-
validators: [required(), matchesField("password")]
|
|
48856
|
+
validators: [required$1(), matchesField("password")]
|
|
48807
48857
|
}
|
|
48808
48858
|
};
|
|
48809
48859
|
|
|
@@ -48884,7 +48934,7 @@ var ResetPasswordForm = function ResetPasswordForm(_ref) {
|
|
|
48884
48934
|
}, []);
|
|
48885
48935
|
}
|
|
48886
48936
|
|
|
48887
|
-
var passwordErrorMessages = (_passwordErrorMessage = {}, _defineProperty(_passwordErrorMessage, required.error, "Password is required"), _defineProperty(_passwordErrorMessage, hasLength.error, "Password must have at least 8 characters"), _defineProperty(_passwordErrorMessage, hasNumber.error, "Password must contain at least one number"), _defineProperty(_passwordErrorMessage, hasLowercaseLetter.error, "Password must contain at least one lowercase letter"), _defineProperty(_passwordErrorMessage, hasUppercaseLetter.error, "Password must contain at least one uppercase letter"), _defineProperty(_passwordErrorMessage, hasSpecialCharacter.error, "Password must contain at least one special character (!@#$%^&*.?)"), _passwordErrorMessage);
|
|
48937
|
+
var passwordErrorMessages = (_passwordErrorMessage = {}, _defineProperty(_passwordErrorMessage, required$1.error, "Password is required"), _defineProperty(_passwordErrorMessage, hasLength.error, "Password must have at least 8 characters"), _defineProperty(_passwordErrorMessage, hasNumber.error, "Password must contain at least one number"), _defineProperty(_passwordErrorMessage, hasLowercaseLetter.error, "Password must contain at least one lowercase letter"), _defineProperty(_passwordErrorMessage, hasUppercaseLetter.error, "Password must contain at least one uppercase letter"), _defineProperty(_passwordErrorMessage, hasSpecialCharacter.error, "Password must contain at least one special character (!@#$%^&*.?)"), _passwordErrorMessage);
|
|
48888
48938
|
|
|
48889
48939
|
var confirmPasswordErrorMessages = _defineProperty({}, matchesField.error, "Confirm password must match password");
|
|
48890
48940
|
|
|
@@ -48923,10 +48973,10 @@ var ResetPasswordForm = function ResetPasswordForm(_ref) {
|
|
|
48923
48973
|
|
|
48924
48974
|
var formConfig$a = {
|
|
48925
48975
|
password: {
|
|
48926
|
-
validators: [required(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
48976
|
+
validators: [required$1(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
48927
48977
|
},
|
|
48928
48978
|
confirmPassword: {
|
|
48929
|
-
validators: [required(), matchesField("password")]
|
|
48979
|
+
validators: [required$1(), matchesField("password")]
|
|
48930
48980
|
}
|
|
48931
48981
|
};
|
|
48932
48982
|
|