@thecb/components 9.1.0-beta.8 → 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.cjs.js
CHANGED
|
@@ -22104,7 +22104,8 @@ var StyledCheckbox = styled__default.div.withConfig({
|
|
|
22104
22104
|
focusedStyles = _ref3.focusedStyles,
|
|
22105
22105
|
errorStyles = _ref3.errorStyles,
|
|
22106
22106
|
disabledStyles = _ref3.disabledStyles,
|
|
22107
|
-
disabledCheckedStyles = _ref3.disabledCheckedStyles
|
|
22107
|
+
disabledCheckedStyles = _ref3.disabledCheckedStyles,
|
|
22108
|
+
_ref3$required = _ref3.required;
|
|
22108
22109
|
return error ? styled.css(["", " ", ""], errorStyles, focused && focusedStyles) : disabled ? styled.css(["", ""], checked ? disabledCheckedStyles : disabledStyles) : checked ? styled.css(["", " ", ""], checkedStyles, focused && focusedStyles) : styled.css(["", " ", ""], defaultStyles, focused && focusedStyles);
|
|
22109
22110
|
});
|
|
22110
22111
|
|
|
@@ -22167,7 +22168,8 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22167
22168
|
onChange: onChange,
|
|
22168
22169
|
tabIndex: "-1",
|
|
22169
22170
|
"aria-invalid": error,
|
|
22170
|
-
"aria-describedby": error ? "".concat(name, "-error-message") : ""
|
|
22171
|
+
"aria-describedby": error ? "".concat(name, "-error-message") : "",
|
|
22172
|
+
required: required
|
|
22171
22173
|
}), /*#__PURE__*/React__default.createElement(StyledCheckbox, {
|
|
22172
22174
|
role: "checkbox",
|
|
22173
22175
|
error: error,
|
|
@@ -25031,7 +25033,9 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25031
25033
|
showErrors = _ref.showErrors,
|
|
25032
25034
|
onChange = _ref.onChange,
|
|
25033
25035
|
_ref$dataQa = _ref.dataQa,
|
|
25034
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa
|
|
25036
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
25037
|
+
_ref$isRequired = _ref.isRequired,
|
|
25038
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
25035
25039
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
25036
25040
|
options: options,
|
|
25037
25041
|
field: field,
|
|
@@ -25041,7 +25045,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25041
25045
|
errorMessages: errorMessages,
|
|
25042
25046
|
showErrors: showErrors,
|
|
25043
25047
|
onChange: onChange,
|
|
25044
|
-
autocompleteValue: "country-name"
|
|
25048
|
+
autocompleteValue: "country-name",
|
|
25049
|
+
required: isRequired
|
|
25045
25050
|
});
|
|
25046
25051
|
};
|
|
25047
25052
|
|
|
@@ -25886,7 +25891,7 @@ var fallbackValues$k = {
|
|
|
25886
25891
|
};
|
|
25887
25892
|
|
|
25888
25893
|
var _excluded$p = ["showErrors", "themeValues"],
|
|
25889
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
|
|
25894
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
|
|
25890
25895
|
var InputField = styled__default.input.withConfig({
|
|
25891
25896
|
displayName: "FormInput__InputField",
|
|
25892
25897
|
componentId: "sc-l094r1-0"
|
|
@@ -25921,7 +25926,10 @@ var FormattedInputField = styled__default(function (_ref8) {
|
|
|
25921
25926
|
themeValues = _ref8.themeValues,
|
|
25922
25927
|
props = _objectWithoutProperties(_ref8, _excluded$p);
|
|
25923
25928
|
|
|
25924
|
-
|
|
25929
|
+
var isRequired = props.isRequired;
|
|
25930
|
+
return /*#__PURE__*/React__default.createElement(FormattedInput, isRequired ? _objectSpread2(_objectSpread2({}, props), {}, {
|
|
25931
|
+
required: true
|
|
25932
|
+
}) : _objectSpread2({}, props));
|
|
25925
25933
|
}).withConfig({
|
|
25926
25934
|
displayName: "FormInput__FormattedInputField",
|
|
25927
25935
|
componentId: "sc-l094r1-1"
|
|
@@ -25973,6 +25981,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
25973
25981
|
removeFromValue = _ref15.removeFromValue,
|
|
25974
25982
|
_ref15$dataQa = _ref15.dataQa,
|
|
25975
25983
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
25984
|
+
_ref15$isRequired = _ref15.isRequired,
|
|
25985
|
+
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
25976
25986
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
25977
25987
|
|
|
25978
25988
|
var _useState = React.useState(false),
|
|
@@ -26059,7 +26069,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26059
26069
|
$customHeight: customHeight,
|
|
26060
26070
|
$extraStyles: extraStyles,
|
|
26061
26071
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26062
|
-
autoComplete: autocompleteValue
|
|
26072
|
+
autoComplete: autocompleteValue,
|
|
26073
|
+
required: isRequired
|
|
26063
26074
|
}, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
|
|
26064
26075
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26065
26076
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26078,7 +26089,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26078
26089
|
$customHeight: customHeight,
|
|
26079
26090
|
$extraStyles: extraStyles,
|
|
26080
26091
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26081
|
-
autoComplete: autocompleteValue
|
|
26092
|
+
autoComplete: autocompleteValue,
|
|
26093
|
+
required: isRequired
|
|
26082
26094
|
}, props))), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26083
26095
|
direction: "row",
|
|
26084
26096
|
justify: "space-between",
|
|
@@ -27184,7 +27196,9 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27184
27196
|
_ref5$handleChange = _ref5.handleChange,
|
|
27185
27197
|
handleChange = _ref5$handleChange === void 0 ? noop : _ref5$handleChange,
|
|
27186
27198
|
field = _ref5.field,
|
|
27187
|
-
config = _ref5.config
|
|
27199
|
+
config = _ref5.config,
|
|
27200
|
+
_ref5$required = _ref5.required,
|
|
27201
|
+
required = _ref5$required === void 0 ? false : _ref5$required;
|
|
27188
27202
|
|
|
27189
27203
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
27190
27204
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
@@ -27217,7 +27231,8 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27217
27231
|
setValue(e.target.value);
|
|
27218
27232
|
handleChange(e);
|
|
27219
27233
|
},
|
|
27220
|
-
defaultChecked: getDefaultChecked(value, index)
|
|
27234
|
+
defaultChecked: getDefaultChecked(value, index),
|
|
27235
|
+
required: required
|
|
27221
27236
|
}), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27222
27237
|
as: "label",
|
|
27223
27238
|
htmlFor: id,
|
|
@@ -27260,7 +27275,9 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27260
27275
|
_ref2$ariaLabelledBy = _ref2.ariaLabelledBy,
|
|
27261
27276
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27262
27277
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27263
|
-
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel
|
|
27278
|
+
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27279
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27280
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27264
27281
|
var buttonBorder = {
|
|
27265
27282
|
onFocused: {
|
|
27266
27283
|
borderColor: themeValues.activeColor,
|
|
@@ -27320,7 +27337,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27320
27337
|
disabled: disabled,
|
|
27321
27338
|
onClick: toggleRadio,
|
|
27322
27339
|
"aria-describedby": ariaDescribedBy,
|
|
27323
|
-
tabIndex: "-1"
|
|
27340
|
+
tabIndex: "-1",
|
|
27341
|
+
required: isRequired
|
|
27324
27342
|
}, extraProps)), /*#__PURE__*/React__default.createElement(Motion, {
|
|
27325
27343
|
borderWidth: "1px",
|
|
27326
27344
|
borderStyle: "solid",
|
|
@@ -38713,7 +38731,7 @@ validatorFns[INCLUDED_IN] = (value, args, form) =>
|
|
|
38713
38731
|
|
|
38714
38732
|
const REQUIRED = 'validator/REQUIRED';
|
|
38715
38733
|
const REQUIRED_ERROR = 'error/REQUIRED';
|
|
38716
|
-
const required = createValidator(REQUIRED, REQUIRED_ERROR);
|
|
38734
|
+
const required$1 = createValidator(REQUIRED, REQUIRED_ERROR);
|
|
38717
38735
|
validatorFns[REQUIRED] = (value, args, form) => value !== '';
|
|
38718
38736
|
|
|
38719
38737
|
const ONLY_INTEGERS = 'validator/ONLY_INTEGERS';
|
|
@@ -39326,15 +39344,15 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39326
39344
|
}, []);
|
|
39327
39345
|
}
|
|
39328
39346
|
|
|
39329
|
-
var street1ErrorMessages = _defineProperty({}, required.error, "Street is required");
|
|
39347
|
+
var street1ErrorMessages = _defineProperty({}, required$1.error, "Street is required");
|
|
39330
39348
|
|
|
39331
|
-
var cityErrorMessages = _defineProperty({}, required.error, "City is required");
|
|
39349
|
+
var cityErrorMessages = _defineProperty({}, required$1.error, "City is required");
|
|
39332
39350
|
|
|
39333
|
-
var zipErrorMessages = (_zipErrorMessages = {}, _defineProperty(_zipErrorMessages, required.error, "Zip code is required"), _defineProperty(_zipErrorMessages, hasLength.error, "Zip code must be 5 or 9 digits"), _zipErrorMessages);
|
|
39351
|
+
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);
|
|
39334
39352
|
|
|
39335
|
-
var stateProvinceErrorMessages = _defineProperty({}, required.error, "State or Province is required");
|
|
39353
|
+
var stateProvinceErrorMessages = _defineProperty({}, required$1.error, "State or Province is required");
|
|
39336
39354
|
|
|
39337
|
-
var countryErrorMessages = _defineProperty({}, required.error, "Country is required");
|
|
39355
|
+
var countryErrorMessages = _defineProperty({}, required$1.error, "Country is required");
|
|
39338
39356
|
|
|
39339
39357
|
var isUS = fields.country.rawValue === "US";
|
|
39340
39358
|
return /*#__PURE__*/React__default.createElement(FormContainer$1, {
|
|
@@ -39359,7 +39377,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39359
39377
|
}
|
|
39360
39378
|
},
|
|
39361
39379
|
showErrors: showErrors,
|
|
39362
|
-
dataQa: "Country"
|
|
39380
|
+
dataQa: "Country",
|
|
39381
|
+
isRequired: true
|
|
39363
39382
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39364
39383
|
labelTextWhenNoError: "Address",
|
|
39365
39384
|
errorMessages: street1ErrorMessages,
|
|
@@ -39370,7 +39389,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39370
39389
|
return e.key === "Enter" && handleSubmit(e);
|
|
39371
39390
|
},
|
|
39372
39391
|
autocompleteValue: "address-line1",
|
|
39373
|
-
dataQa: "Address"
|
|
39392
|
+
dataQa: "Address",
|
|
39393
|
+
required: true
|
|
39374
39394
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39375
39395
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39376
39396
|
field: fields.street2,
|
|
@@ -39380,7 +39400,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39380
39400
|
return e.key === "Enter" && handleSubmit(e);
|
|
39381
39401
|
},
|
|
39382
39402
|
autocompleteValue: "address-line2",
|
|
39383
|
-
dataQa: "Address Line 2"
|
|
39403
|
+
dataQa: "Address Line 2",
|
|
39404
|
+
required: true
|
|
39384
39405
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39385
39406
|
labelTextWhenNoError: "City",
|
|
39386
39407
|
errorMessages: cityErrorMessages,
|
|
@@ -39391,7 +39412,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39391
39412
|
return e.key === "Enter" && handleSubmit(e);
|
|
39392
39413
|
},
|
|
39393
39414
|
autocompleteValue: "address-level2",
|
|
39394
|
-
dataQa: "City"
|
|
39415
|
+
dataQa: "City",
|
|
39416
|
+
required: true
|
|
39395
39417
|
}), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
|
|
39396
39418
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39397
39419
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39402,7 +39424,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39402
39424
|
onKeyDown: function onKeyDown(e) {
|
|
39403
39425
|
return e.key === "Enter" && handleSubmit(e);
|
|
39404
39426
|
},
|
|
39405
|
-
dataQa: "State or Province"
|
|
39427
|
+
dataQa: "State or Province",
|
|
39428
|
+
required: true
|
|
39406
39429
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39407
39430
|
isNum: isUS,
|
|
39408
39431
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39415,7 +39438,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39415
39438
|
return e.key === "Enter" && handleSubmit(e);
|
|
39416
39439
|
},
|
|
39417
39440
|
autocompleteValue: "postal-code",
|
|
39418
|
-
dataQa: "Zip code"
|
|
39441
|
+
dataQa: "Zip code",
|
|
39442
|
+
required: true
|
|
39419
39443
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
39420
39444
|
name: "address checkbox",
|
|
39421
39445
|
title: "Save address to wallet",
|
|
@@ -39426,23 +39450,23 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39426
39450
|
|
|
39427
39451
|
var formConfig = {
|
|
39428
39452
|
street1: {
|
|
39429
|
-
validators: [required()]
|
|
39453
|
+
validators: [required$1()]
|
|
39430
39454
|
},
|
|
39431
39455
|
street2: {
|
|
39432
39456
|
validators: []
|
|
39433
39457
|
},
|
|
39434
39458
|
city: {
|
|
39435
|
-
validators: [required()]
|
|
39459
|
+
validators: [required$1()]
|
|
39436
39460
|
},
|
|
39437
39461
|
stateProvince: {
|
|
39438
|
-
validators: [required()]
|
|
39462
|
+
validators: [required$1()]
|
|
39439
39463
|
},
|
|
39440
39464
|
country: {
|
|
39441
39465
|
defaultValue: "US",
|
|
39442
|
-
validators: [required()]
|
|
39466
|
+
validators: [required$1()]
|
|
39443
39467
|
},
|
|
39444
39468
|
zip: {
|
|
39445
|
-
validators: [required(), validateWhen(validateWhen(hasLength(5, 5), hasLength(0, 5)), matchesRegex("US"), "country"), validateWhen(validateWhen(hasLength(9, 9), hasLength(6, 9)), matchesRegex("US"), "country")],
|
|
39469
|
+
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")],
|
|
39446
39470
|
constraints: [validateWhen(onlyIntegers(), matchesRegex("US"), "country"), validateWhen(hasLength(0, 9), matchesRegex("US"), "country")]
|
|
39447
39471
|
}
|
|
39448
39472
|
};
|
|
@@ -39534,9 +39558,9 @@ var ChangePasswordForm = function ChangePasswordForm(_ref) {
|
|
|
39534
39558
|
}, []);
|
|
39535
39559
|
}
|
|
39536
39560
|
|
|
39537
|
-
var currentPasswordErrorMessages = _defineProperty({}, required.error, "Current Password is required");
|
|
39561
|
+
var currentPasswordErrorMessages = _defineProperty({}, required$1.error, "Current Password is required");
|
|
39538
39562
|
|
|
39539
|
-
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);
|
|
39563
|
+
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);
|
|
39540
39564
|
|
|
39541
39565
|
var confirmNewPasswordErrorMessages = _defineProperty({}, matchesField.error, "Confirm password must match your new password");
|
|
39542
39566
|
|
|
@@ -39629,13 +39653,13 @@ var ChangePasswordForm = function ChangePasswordForm(_ref) {
|
|
|
39629
39653
|
|
|
39630
39654
|
var formConfig$1 = {
|
|
39631
39655
|
currentPassword: {
|
|
39632
|
-
validators: [required()]
|
|
39656
|
+
validators: [required$1()]
|
|
39633
39657
|
},
|
|
39634
39658
|
newPassword: {
|
|
39635
|
-
validators: [required(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
39659
|
+
validators: [required$1(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
39636
39660
|
},
|
|
39637
39661
|
confirmNewPassword: {
|
|
39638
|
-
validators: [required(), matchesField("newPassword")]
|
|
39662
|
+
validators: [required$1(), matchesField("newPassword")]
|
|
39639
39663
|
}
|
|
39640
39664
|
};
|
|
39641
39665
|
|
|
@@ -39978,9 +40002,9 @@ var EditNameForm = function EditNameForm(_ref) {
|
|
|
39978
40002
|
}, []);
|
|
39979
40003
|
}
|
|
39980
40004
|
|
|
39981
|
-
var firstNameErrorMessages = _defineProperty({}, required.error, "First name is required");
|
|
40005
|
+
var firstNameErrorMessages = _defineProperty({}, required$1.error, "First name is required");
|
|
39982
40006
|
|
|
39983
|
-
var lastNameErrorMessages = _defineProperty({}, required.error, "Last name is required");
|
|
40007
|
+
var lastNameErrorMessages = _defineProperty({}, required$1.error, "Last name is required");
|
|
39984
40008
|
|
|
39985
40009
|
return /*#__PURE__*/React__default.createElement(FormContainer$1, {
|
|
39986
40010
|
role: "form",
|
|
@@ -39995,7 +40019,8 @@ var EditNameForm = function EditNameForm(_ref) {
|
|
|
39995
40019
|
onKeyDown: function onKeyDown(e) {
|
|
39996
40020
|
return e.key === "Enter" && handleSubmit(e);
|
|
39997
40021
|
},
|
|
39998
|
-
autocompleteValue: "given-name"
|
|
40022
|
+
autocompleteValue: "given-name",
|
|
40023
|
+
isRequired: true
|
|
39999
40024
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
40000
40025
|
labelTextWhenNoError: "Last Name",
|
|
40001
40026
|
dataQa: "Edit Last Name",
|
|
@@ -40006,16 +40031,17 @@ var EditNameForm = function EditNameForm(_ref) {
|
|
|
40006
40031
|
onKeyDown: function onKeyDown(e) {
|
|
40007
40032
|
return e.key === "Enter" && handleSubmit(e);
|
|
40008
40033
|
},
|
|
40009
|
-
autocompleteValue: "family-name"
|
|
40034
|
+
autocompleteValue: "family-name",
|
|
40035
|
+
isRequired: true
|
|
40010
40036
|
})));
|
|
40011
40037
|
};
|
|
40012
40038
|
|
|
40013
40039
|
var formConfig$2 = {
|
|
40014
40040
|
firstName: {
|
|
40015
|
-
validators: [required()]
|
|
40041
|
+
validators: [required$1()]
|
|
40016
40042
|
},
|
|
40017
40043
|
lastName: {
|
|
40018
|
-
validators: [required()]
|
|
40044
|
+
validators: [required$1()]
|
|
40019
40045
|
}
|
|
40020
40046
|
};
|
|
40021
40047
|
|
|
@@ -40318,7 +40344,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40318
40344
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40319
40345
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40320
40346
|
saveToWallet = _ref.saveToWallet,
|
|
40321
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40347
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40348
|
+
_ref$isRequired = _ref.isRequired,
|
|
40349
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40322
40350
|
|
|
40323
40351
|
if (clearOnDismount) {
|
|
40324
40352
|
React.useEffect(function () {
|
|
@@ -40328,13 +40356,14 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40328
40356
|
}, []);
|
|
40329
40357
|
}
|
|
40330
40358
|
|
|
40331
|
-
var emailFieldErrorMessages = (_emailFieldErrorMessa = {}, _defineProperty(_emailFieldErrorMessa, required.error, "Email address is required"), _defineProperty(_emailFieldErrorMessa, isProbablyEmail.error, "Invalid email address"), _emailFieldErrorMessa);
|
|
40359
|
+
var emailFieldErrorMessages = (_emailFieldErrorMessa = {}, _defineProperty(_emailFieldErrorMessa, required$1.error, "Email address is required"), _defineProperty(_emailFieldErrorMessa, isProbablyEmail.error, "Invalid email address"), _emailFieldErrorMessa);
|
|
40332
40360
|
return /*#__PURE__*/React__default.createElement(FormContainer$1, {
|
|
40333
40361
|
variant: variant,
|
|
40334
40362
|
role: "form",
|
|
40335
40363
|
"aria-label": "Email address"
|
|
40336
40364
|
}, guestCheckout && /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
40337
|
-
margin: "0 0 1.125rem 0"
|
|
40365
|
+
margin: "0 0 1.125rem 0",
|
|
40366
|
+
id: "explanation"
|
|
40338
40367
|
}, "If desired, you can create a wallet later for faster checkout"), /*#__PURE__*/React__default.createElement(FormInputColumn, null, /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
40339
40368
|
labelTextWhenNoError: "Email address",
|
|
40340
40369
|
errorMessages: emailFieldErrorMessages,
|
|
@@ -40347,18 +40376,20 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40347
40376
|
},
|
|
40348
40377
|
isEmail: true,
|
|
40349
40378
|
autocompleteValue: "email",
|
|
40350
|
-
dataQa: "Email address"
|
|
40379
|
+
dataQa: "Email address",
|
|
40380
|
+
required: isRequired
|
|
40351
40381
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
40352
40382
|
name: "email checkbox",
|
|
40353
40383
|
title: "Save email address to wallet",
|
|
40354
40384
|
checked: walletCheckboxMarked,
|
|
40355
|
-
onChange: saveToWallet
|
|
40385
|
+
onChange: saveToWallet,
|
|
40386
|
+
"aria-describedby": "explanation"
|
|
40356
40387
|
})));
|
|
40357
40388
|
};
|
|
40358
40389
|
|
|
40359
40390
|
var formConfig$3 = {
|
|
40360
40391
|
email: {
|
|
40361
|
-
validators: [required(), isProbablyEmail()]
|
|
40392
|
+
validators: [required$1(), isProbablyEmail()]
|
|
40362
40393
|
}
|
|
40363
40394
|
};
|
|
40364
40395
|
|
|
@@ -40425,7 +40456,7 @@ var ForgotPasswordForm = function ForgotPasswordForm(_ref) {
|
|
|
40425
40456
|
}, []);
|
|
40426
40457
|
}
|
|
40427
40458
|
|
|
40428
|
-
var EmailErrorMessages = (_EmailErrorMessages = {}, _defineProperty(_EmailErrorMessages, required.error, "Email address is required"), _defineProperty(_EmailErrorMessages, isProbablyEmail.error, "Email address is not valid"), _EmailErrorMessages);
|
|
40459
|
+
var EmailErrorMessages = (_EmailErrorMessages = {}, _defineProperty(_EmailErrorMessages, required$1.error, "Email address is required"), _defineProperty(_EmailErrorMessages, isProbablyEmail.error, "Email address is not valid"), _EmailErrorMessages);
|
|
40429
40460
|
return /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
40430
40461
|
labelTextWhenNoError: "Email address",
|
|
40431
40462
|
errorMessages: EmailErrorMessages,
|
|
@@ -40442,7 +40473,7 @@ var ForgotPasswordForm = function ForgotPasswordForm(_ref) {
|
|
|
40442
40473
|
|
|
40443
40474
|
var formConfig$4 = {
|
|
40444
40475
|
email: {
|
|
40445
|
-
validators: [required(), isProbablyEmail()]
|
|
40476
|
+
validators: [required$1(), isProbablyEmail()]
|
|
40446
40477
|
}
|
|
40447
40478
|
};
|
|
40448
40479
|
|
|
@@ -42104,9 +42135,9 @@ var LoginForm = function LoginForm(_ref) {
|
|
|
42104
42135
|
}, []);
|
|
42105
42136
|
}
|
|
42106
42137
|
|
|
42107
|
-
var emailErrorMessages = (_emailErrorMessages = {}, _defineProperty(_emailErrorMessages, required.error, "Email address is required"), _defineProperty(_emailErrorMessages, isProbablyEmail.error, "Invalid email address"), _emailErrorMessages);
|
|
42138
|
+
var emailErrorMessages = (_emailErrorMessages = {}, _defineProperty(_emailErrorMessages, required$1.error, "Email address is required"), _defineProperty(_emailErrorMessages, isProbablyEmail.error, "Invalid email address"), _emailErrorMessages);
|
|
42108
42139
|
|
|
42109
|
-
var passwordErrorMessages = _defineProperty({}, required.error, "Password is required");
|
|
42140
|
+
var passwordErrorMessages = _defineProperty({}, required$1.error, "Password is required");
|
|
42110
42141
|
|
|
42111
42142
|
return /*#__PURE__*/React__default.createElement(FormInputColumn, {
|
|
42112
42143
|
role: "form",
|
|
@@ -42139,10 +42170,10 @@ var LoginForm = function LoginForm(_ref) {
|
|
|
42139
42170
|
|
|
42140
42171
|
var formConfig$5 = {
|
|
42141
42172
|
email: {
|
|
42142
|
-
validators: [required(), isProbablyEmail()]
|
|
42173
|
+
validators: [required$1(), isProbablyEmail()]
|
|
42143
42174
|
},
|
|
42144
42175
|
password: {
|
|
42145
|
-
validators: [required()]
|
|
42176
|
+
validators: [required$1()]
|
|
42146
42177
|
}
|
|
42147
42178
|
};
|
|
42148
42179
|
|
|
@@ -46747,7 +46778,7 @@ var PartialAmountForm = function PartialAmountForm(_ref) {
|
|
|
46747
46778
|
}, []);
|
|
46748
46779
|
}
|
|
46749
46780
|
|
|
46750
|
-
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);
|
|
46781
|
+
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);
|
|
46751
46782
|
|
|
46752
46783
|
var getPartialAmountFormErrors = function getPartialAmountFormErrors(itemAmount) {
|
|
46753
46784
|
var errorMessages = amountErrors;
|
|
@@ -46821,7 +46852,7 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
46821
46852
|
var createPartialAmountFormValidators = function createPartialAmountFormValidators(item, lineItems, maximum) {
|
|
46822
46853
|
var minimum = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
46823
46854
|
var blockPartialPaymentOverpay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
46824
|
-
var validators = [required(), validateSum(numberGreaterThanOrEqualTo(minimum), lineItems.filter(function (lineItem) {
|
|
46855
|
+
var validators = [required$1(), validateSum(numberGreaterThanOrEqualTo(minimum), lineItems.filter(function (lineItem) {
|
|
46825
46856
|
return lineItem != item;
|
|
46826
46857
|
}).reduce(function (acc, curr) {
|
|
46827
46858
|
return [].concat(_toConsumableArray(acc), [curr.id]);
|
|
@@ -47883,17 +47914,17 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47883
47914
|
|
|
47884
47915
|
var showTerms = !!termsContent;
|
|
47885
47916
|
|
|
47886
|
-
var nameErrors = _defineProperty({}, required.error, "Name is required");
|
|
47917
|
+
var nameErrors = _defineProperty({}, required$1.error, "Name is required");
|
|
47887
47918
|
|
|
47888
|
-
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);
|
|
47919
|
+
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);
|
|
47889
47920
|
|
|
47890
47921
|
var confirmRoutingNumberErrors = _defineProperty({}, matchesField.error, "Confirm routing number field must match routing number");
|
|
47891
47922
|
|
|
47892
|
-
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);
|
|
47923
|
+
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);
|
|
47893
47924
|
|
|
47894
47925
|
var confirmAccountNumberErrors = _defineProperty({}, matchesField.error, "Confirm account number field must match account number");
|
|
47895
47926
|
|
|
47896
|
-
var accountTypeErrors = _defineProperty({}, required.error, "Account type is required");
|
|
47927
|
+
var accountTypeErrors = _defineProperty({}, required$1.error, "Account type is required");
|
|
47897
47928
|
|
|
47898
47929
|
return /*#__PURE__*/React__default.createElement(FormContainer$1, {
|
|
47899
47930
|
variant: variant,
|
|
@@ -47909,7 +47940,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47909
47940
|
onKeyDown: function onKeyDown(e) {
|
|
47910
47941
|
return e.key === "Enter" && handleSubmit(e);
|
|
47911
47942
|
},
|
|
47912
|
-
autocompleteValue: "name"
|
|
47943
|
+
autocompleteValue: "name",
|
|
47944
|
+
isRequired: true
|
|
47913
47945
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
47914
47946
|
labelTextWhenNoError: "Routing number",
|
|
47915
47947
|
dataQa: "Routing number",
|
|
@@ -47931,7 +47963,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47931
47963
|
},
|
|
47932
47964
|
onKeyDown: function onKeyDown(e) {
|
|
47933
47965
|
return e.key === "Enter" && handleSubmit(e);
|
|
47934
|
-
}
|
|
47966
|
+
},
|
|
47967
|
+
isRequired: true
|
|
47935
47968
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
47936
47969
|
labelTextWhenNoError: "Confirm routing number",
|
|
47937
47970
|
dataQa: "Confirm routing number",
|
|
@@ -47942,6 +47975,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47942
47975
|
onKeyDown: function onKeyDown(e) {
|
|
47943
47976
|
return e.key === "Enter" && handleSubmit(e);
|
|
47944
47977
|
},
|
|
47978
|
+
isRequired: true,
|
|
47945
47979
|
isNum: true
|
|
47946
47980
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
47947
47981
|
labelTextWhenNoError: "Account number",
|
|
@@ -47950,6 +47984,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47950
47984
|
field: fields.accountNumber,
|
|
47951
47985
|
fieldActions: actions.fields.accountNumber,
|
|
47952
47986
|
showErrors: showErrors,
|
|
47987
|
+
isRequired: true,
|
|
47953
47988
|
isNum: true,
|
|
47954
47989
|
helperModal: function helperModal() {
|
|
47955
47990
|
return /*#__PURE__*/React__default.createElement(AccountAndRoutingModal$1, {
|
|
@@ -47967,6 +48002,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47967
48002
|
}
|
|
47968
48003
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
47969
48004
|
labelTextWhenNoError: "Confirm account number",
|
|
48005
|
+
isRequired: true,
|
|
47970
48006
|
dataQa: "Confirm account number",
|
|
47971
48007
|
errorMessages: confirmAccountNumberErrors,
|
|
47972
48008
|
field: fields.confirmAccountNumber,
|
|
@@ -47995,6 +48031,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47995
48031
|
field: fields.accountType
|
|
47996
48032
|
}), !hideDefaultPayment && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
47997
48033
|
title: "Save as Default Payment Method",
|
|
48034
|
+
required: true,
|
|
47998
48035
|
dataQa: "default-payment-ach",
|
|
47999
48036
|
name: "default-payment-ach",
|
|
48000
48037
|
onChange: toggleCheckbox,
|
|
@@ -48021,10 +48058,10 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48021
48058
|
|
|
48022
48059
|
var formConfig$6 = {
|
|
48023
48060
|
name: {
|
|
48024
|
-
validators: [required()]
|
|
48061
|
+
validators: [required$1()]
|
|
48025
48062
|
},
|
|
48026
48063
|
routingNumber: {
|
|
48027
|
-
validators: [required(), hasLength(9, 9), isRoutingNumber()],
|
|
48064
|
+
validators: [required$1(), hasLength(9, 9), isRoutingNumber()],
|
|
48028
48065
|
constraints: [onlyIntegers(), hasLength(0, 9)]
|
|
48029
48066
|
},
|
|
48030
48067
|
confirmRoutingNumber: {
|
|
@@ -48032,7 +48069,7 @@ var formConfig$6 = {
|
|
|
48032
48069
|
constraints: [onlyIntegers(), hasLength(0, 9)]
|
|
48033
48070
|
},
|
|
48034
48071
|
accountNumber: {
|
|
48035
|
-
validators: [required(), hasLength(5, 17)],
|
|
48072
|
+
validators: [required$1(), hasLength(5, 17)],
|
|
48036
48073
|
constraints: [onlyIntegers(), hasLength(0, 17)]
|
|
48037
48074
|
},
|
|
48038
48075
|
confirmAccountNumber: {
|
|
@@ -48041,7 +48078,7 @@ var formConfig$6 = {
|
|
|
48041
48078
|
},
|
|
48042
48079
|
accountType: {
|
|
48043
48080
|
defaultValue: "CHECKING",
|
|
48044
|
-
validators: [required()]
|
|
48081
|
+
validators: [required$1()]
|
|
48045
48082
|
}
|
|
48046
48083
|
};
|
|
48047
48084
|
|
|
@@ -48092,14 +48129,14 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48092
48129
|
}
|
|
48093
48130
|
}, []);
|
|
48094
48131
|
|
|
48095
|
-
var nameOnCardErrors = _defineProperty({}, required.error, "Name is required");
|
|
48132
|
+
var nameOnCardErrors = _defineProperty({}, required$1.error, "Name is required");
|
|
48096
48133
|
|
|
48097
|
-
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);
|
|
48098
|
-
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);
|
|
48099
|
-
var cvvErrors = (_cvvErrors = {}, _defineProperty(_cvvErrors, required.error, "CVV is required"), _defineProperty(_cvvErrors, hasLength.error, "CVV is invalid"), _cvvErrors);
|
|
48100
|
-
var zipCodeErrors = (_zipCodeErrors = {}, _defineProperty(_zipCodeErrors, required.error, "Zip code is required"), _defineProperty(_zipCodeErrors, hasLength.error, "Zip code is invalid"), _zipCodeErrors);
|
|
48134
|
+
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);
|
|
48135
|
+
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);
|
|
48136
|
+
var cvvErrors = (_cvvErrors = {}, _defineProperty(_cvvErrors, required$1.error, "CVV is required"), _defineProperty(_cvvErrors, hasLength.error, "CVV is invalid"), _cvvErrors);
|
|
48137
|
+
var zipCodeErrors = (_zipCodeErrors = {}, _defineProperty(_zipCodeErrors, required$1.error, "Zip code is required"), _defineProperty(_zipCodeErrors, hasLength.error, "Zip code is invalid"), _zipCodeErrors);
|
|
48101
48138
|
|
|
48102
|
-
var countryErrorMessages = _defineProperty({}, required.error, "Country is required");
|
|
48139
|
+
var countryErrorMessages = _defineProperty({}, required$1.error, "Country is required");
|
|
48103
48140
|
|
|
48104
48141
|
var isUS = fields.country.rawValue === "US";
|
|
48105
48142
|
return /*#__PURE__*/React__default.createElement(FormContainer$1, {
|
|
@@ -48119,7 +48156,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48119
48156
|
}
|
|
48120
48157
|
},
|
|
48121
48158
|
showErrors: showErrors,
|
|
48122
|
-
dataQa: "Country"
|
|
48159
|
+
dataQa: "Country",
|
|
48160
|
+
isRequired: true
|
|
48123
48161
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48124
48162
|
labelTextWhenNoError: "Name on card",
|
|
48125
48163
|
dataQa: "Name on card",
|
|
@@ -48130,7 +48168,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48130
48168
|
onKeyDown: function onKeyDown(e) {
|
|
48131
48169
|
return e.key === "Enter" && handleSubmit(e);
|
|
48132
48170
|
},
|
|
48133
|
-
autocompleteValue: "cc-name"
|
|
48171
|
+
autocompleteValue: "cc-name",
|
|
48172
|
+
required: true
|
|
48134
48173
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48135
48174
|
labelTextWhenNoError: "Credit card number",
|
|
48136
48175
|
dataQa: "Credit card number",
|
|
@@ -48143,7 +48182,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48143
48182
|
return e.key === "Enter" && handleSubmit(e);
|
|
48144
48183
|
},
|
|
48145
48184
|
isNum: true,
|
|
48146
|
-
autocompleteValue: "cc-number"
|
|
48185
|
+
autocompleteValue: "cc-number",
|
|
48186
|
+
required: true
|
|
48147
48187
|
}), /*#__PURE__*/React__default.createElement(FormInputRow, {
|
|
48148
48188
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48149
48189
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48161,7 +48201,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48161
48201
|
isNum: true,
|
|
48162
48202
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48163
48203
|
,
|
|
48164
|
-
autocompleteValue: "cc-exp"
|
|
48204
|
+
autocompleteValue: "cc-exp",
|
|
48205
|
+
required: true
|
|
48165
48206
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48166
48207
|
labelTextWhenNoError: "CVV",
|
|
48167
48208
|
dataQa: "CVV",
|
|
@@ -48174,7 +48215,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48174
48215
|
onKeyDown: function onKeyDown(e) {
|
|
48175
48216
|
return e.key === "Enter" && handleSubmit(e);
|
|
48176
48217
|
},
|
|
48177
|
-
autocompleteValue: "cc-csc"
|
|
48218
|
+
autocompleteValue: "cc-csc",
|
|
48219
|
+
required: true
|
|
48178
48220
|
})), !hideZipCode && /*#__PURE__*/React__default.createElement(Box, {
|
|
48179
48221
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48180
48222
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48190,7 +48232,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48190
48232
|
onKeyDown: function onKeyDown(e) {
|
|
48191
48233
|
return e.key === "Enter" && handleSubmit(e);
|
|
48192
48234
|
},
|
|
48193
|
-
autocompleteValue: "billing postal-code"
|
|
48235
|
+
autocompleteValue: "billing postal-code",
|
|
48236
|
+
required: true
|
|
48194
48237
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48195
48238
|
childGap: "4px",
|
|
48196
48239
|
align: "center"
|
|
@@ -48215,25 +48258,25 @@ var PaymentFormCard$1 = withWindowSize(PaymentFormCard);
|
|
|
48215
48258
|
var formConfig$7 = {
|
|
48216
48259
|
country: {
|
|
48217
48260
|
defaultValue: "US",
|
|
48218
|
-
validators: [required()]
|
|
48261
|
+
validators: [required$1()]
|
|
48219
48262
|
},
|
|
48220
48263
|
nameOnCard: {
|
|
48221
|
-
validators: [required()]
|
|
48264
|
+
validators: [required$1()]
|
|
48222
48265
|
},
|
|
48223
48266
|
creditCardNumber: {
|
|
48224
|
-
validators: [required(), hasLength(15, 16)],
|
|
48267
|
+
validators: [required$1(), hasLength(15, 16)],
|
|
48225
48268
|
constraints: [onlyIntegers(), hasLength(0, 16)]
|
|
48226
48269
|
},
|
|
48227
48270
|
expirationDate: {
|
|
48228
|
-
validators: [required(), hasLength(4, 4), isValidMonth(0), dateAfterToday("MMYY", "month", true)],
|
|
48271
|
+
validators: [required$1(), hasLength(4, 4), isValidMonth(0), dateAfterToday("MMYY", "month", true)],
|
|
48229
48272
|
constraints: [onlyExpirationDate(), hasLength(0, 4)]
|
|
48230
48273
|
},
|
|
48231
48274
|
cvv: {
|
|
48232
|
-
validators: [required(), hasLength(3, 4)],
|
|
48275
|
+
validators: [required$1(), hasLength(3, 4)],
|
|
48233
48276
|
constraints: [onlyIntegers(), hasLength(0, 4)]
|
|
48234
48277
|
},
|
|
48235
48278
|
zipCode: {
|
|
48236
|
-
validators: [required(), validateWhen(validateWhen(hasLength(5, 5), hasLength(0, 5)), matchesRegex("US"), "country"), validateWhen(validateWhen(hasLength(9, 9), hasLength(6, 9)), matchesRegex("US"), "country")],
|
|
48279
|
+
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")],
|
|
48237
48280
|
constraints: [validateWhen(onlyIntegers(), matchesRegex("US"), "country"), validateWhen(hasLength(0, 9), matchesRegex("US"), "country")]
|
|
48238
48281
|
}
|
|
48239
48282
|
};
|
|
@@ -48383,7 +48426,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48383
48426
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48384
48427
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48385
48428
|
saveToWallet = _ref.saveToWallet,
|
|
48386
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48429
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48430
|
+
_ref$isRequired = _ref.isRequired,
|
|
48431
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48387
48432
|
|
|
48388
48433
|
if (clearOnDismount) {
|
|
48389
48434
|
React.useEffect(function () {
|
|
@@ -48393,7 +48438,7 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48393
48438
|
}, []);
|
|
48394
48439
|
}
|
|
48395
48440
|
|
|
48396
|
-
var phoneErrorMessage = (_phoneErrorMessage = {}, _defineProperty(_phoneErrorMessage, required.error, "Phone number is required"), _defineProperty(_phoneErrorMessage, hasLength.error, "Phone number must be 10 digits"), _phoneErrorMessage);
|
|
48441
|
+
var phoneErrorMessage = (_phoneErrorMessage = {}, _defineProperty(_phoneErrorMessage, required$1.error, "Phone number is required"), _defineProperty(_phoneErrorMessage, hasLength.error, "Phone number must be 10 digits"), _phoneErrorMessage);
|
|
48397
48442
|
return /*#__PURE__*/React__default.createElement(FormContainer$1, {
|
|
48398
48443
|
variant: variant,
|
|
48399
48444
|
role: "form",
|
|
@@ -48410,7 +48455,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48410
48455
|
},
|
|
48411
48456
|
autocompleteValue: "tel-national",
|
|
48412
48457
|
dataQa: "Phone number",
|
|
48413
|
-
isNum: true
|
|
48458
|
+
isNum: true,
|
|
48459
|
+
required: isRequired
|
|
48414
48460
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48415
48461
|
name: "phone checkbox",
|
|
48416
48462
|
title: "Save phone number to wallet",
|
|
@@ -48421,7 +48467,7 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48421
48467
|
|
|
48422
48468
|
var formConfig$8 = {
|
|
48423
48469
|
phone: {
|
|
48424
|
-
validators: [required(), hasLength(10, 10)],
|
|
48470
|
+
validators: [required$1(), hasLength(10, 10)],
|
|
48425
48471
|
constraints: [onlyIntegers(), hasLength(0, 10)]
|
|
48426
48472
|
}
|
|
48427
48473
|
};
|
|
@@ -48459,7 +48505,9 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48459
48505
|
_ref$handleChange = _ref.handleChange,
|
|
48460
48506
|
handleChange = _ref$handleChange === void 0 ? noop : _ref$handleChange,
|
|
48461
48507
|
field = _ref.field,
|
|
48462
|
-
fieldActions = _ref.fieldActions
|
|
48508
|
+
fieldActions = _ref.fieldActions,
|
|
48509
|
+
_ref$isRequired = _ref.isRequired,
|
|
48510
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48463
48511
|
|
|
48464
48512
|
var setValue = function setValue(value) {
|
|
48465
48513
|
return fieldActions.set(value);
|
|
@@ -48473,6 +48521,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48473
48521
|
childGap: "4px"
|
|
48474
48522
|
}, config.map(function (c, idx) {
|
|
48475
48523
|
return /*#__PURE__*/React__default.createElement(RadioButtonWithLabel$1, _extends({
|
|
48524
|
+
required: isRequired,
|
|
48476
48525
|
index: idx,
|
|
48477
48526
|
key: c.id
|
|
48478
48527
|
}, c, {
|
|
@@ -48659,7 +48708,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48659
48708
|
toggleRadio: section.disabled ? noop : function () {
|
|
48660
48709
|
return toggleOpenSection(section.id);
|
|
48661
48710
|
},
|
|
48662
|
-
tabIndex: "-1"
|
|
48711
|
+
tabIndex: "-1",
|
|
48712
|
+
isRequired: true
|
|
48663
48713
|
})), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48664
48714
|
align: "center"
|
|
48665
48715
|
}, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48718,12 +48768,12 @@ var RegistrationForm = function RegistrationForm(_ref) {
|
|
|
48718
48768
|
}, []);
|
|
48719
48769
|
}
|
|
48720
48770
|
|
|
48721
|
-
var firstNameErrorMessages = _defineProperty({}, required.error, "First name is required");
|
|
48771
|
+
var firstNameErrorMessages = _defineProperty({}, required$1.error, "First name is required");
|
|
48722
48772
|
|
|
48723
|
-
var lastNameErrorMessages = _defineProperty({}, required.error, "Last name is required");
|
|
48773
|
+
var lastNameErrorMessages = _defineProperty({}, required$1.error, "Last name is required");
|
|
48724
48774
|
|
|
48725
|
-
var emailErrorMessages = (_emailErrorMessages = {}, _defineProperty(_emailErrorMessages, required.error, "Email is required"), _defineProperty(_emailErrorMessages, isProbablyEmail.error, "Invalid email address"), _emailErrorMessages);
|
|
48726
|
-
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);
|
|
48775
|
+
var emailErrorMessages = (_emailErrorMessages = {}, _defineProperty(_emailErrorMessages, required$1.error, "Email is required"), _defineProperty(_emailErrorMessages, isProbablyEmail.error, "Invalid email address"), _emailErrorMessages);
|
|
48776
|
+
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);
|
|
48727
48777
|
|
|
48728
48778
|
var confirmPasswordErrorMessages = _defineProperty({}, matchesField.error, "Confirm password must match password");
|
|
48729
48779
|
|
|
@@ -48799,19 +48849,19 @@ var RegistrationForm = function RegistrationForm(_ref) {
|
|
|
48799
48849
|
|
|
48800
48850
|
var formConfig$9 = {
|
|
48801
48851
|
firstName: {
|
|
48802
|
-
validators: [required()]
|
|
48852
|
+
validators: [required$1()]
|
|
48803
48853
|
},
|
|
48804
48854
|
lastName: {
|
|
48805
|
-
validators: [required()]
|
|
48855
|
+
validators: [required$1()]
|
|
48806
48856
|
},
|
|
48807
48857
|
email: {
|
|
48808
|
-
validators: [required(), isProbablyEmail()]
|
|
48858
|
+
validators: [required$1(), isProbablyEmail()]
|
|
48809
48859
|
},
|
|
48810
48860
|
password: {
|
|
48811
|
-
validators: [required(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
48861
|
+
validators: [required$1(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
48812
48862
|
},
|
|
48813
48863
|
confirmPassword: {
|
|
48814
|
-
validators: [required(), matchesField("password")]
|
|
48864
|
+
validators: [required$1(), matchesField("password")]
|
|
48815
48865
|
}
|
|
48816
48866
|
};
|
|
48817
48867
|
|
|
@@ -48892,7 +48942,7 @@ var ResetPasswordForm = function ResetPasswordForm(_ref) {
|
|
|
48892
48942
|
}, []);
|
|
48893
48943
|
}
|
|
48894
48944
|
|
|
48895
|
-
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);
|
|
48945
|
+
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);
|
|
48896
48946
|
|
|
48897
48947
|
var confirmPasswordErrorMessages = _defineProperty({}, matchesField.error, "Confirm password must match password");
|
|
48898
48948
|
|
|
@@ -48931,10 +48981,10 @@ var ResetPasswordForm = function ResetPasswordForm(_ref) {
|
|
|
48931
48981
|
|
|
48932
48982
|
var formConfig$a = {
|
|
48933
48983
|
password: {
|
|
48934
|
-
validators: [required(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
48984
|
+
validators: [required$1(), hasLength(8, 100), hasNumber(), hasLowercaseLetter(), hasUppercaseLetter(), hasSpecialCharacter()]
|
|
48935
48985
|
},
|
|
48936
48986
|
confirmPassword: {
|
|
48937
|
-
validators: [required(), matchesField("password")]
|
|
48987
|
+
validators: [required$1(), matchesField("password")]
|
|
48938
48988
|
}
|
|
48939
48989
|
};
|
|
48940
48990
|
|