@thecb/components 9.2.5-beta.0 → 9.2.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +126 -54
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +126 -54
- 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/country-dropdown/CountryDropdown.js +2 -0
- package/src/components/atoms/dropdown/Dropdown.js +7 -4
- package/src/components/atoms/form-layouts/FormInput.js +3 -0
- package/src/components/atoms/form-select/FormSelect.js +3 -1
- package/src/components/atoms/icons/.DS_Store +0 -0
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +3 -1
- package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.js +2 -0
- package/src/components/molecules/address-form/AddressForm.js +5 -0
- package/src/components/molecules/email-form/EmailForm.js +3 -1
- package/src/components/molecules/modal/Modal.js +17 -3
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +6 -0
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +5 -0
- package/src/components/molecules/phone-form/PhoneForm.js +3 -1
- package/src/components/molecules/radio-section/RadioSection.js +9 -2
- package/src/components/molecules/radio-section/RadioSection.stories.js +4 -2
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +3 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +1 -0
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +1 -0
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +5 -1
package/dist/index.esm.js
CHANGED
|
@@ -23791,7 +23791,9 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23791
23791
|
_ref13$smoothScroll = _ref13.smoothScroll,
|
|
23792
23792
|
smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
|
|
23793
23793
|
_ref13$ariaInvalid = _ref13.ariaInvalid,
|
|
23794
|
-
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid
|
|
23794
|
+
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
|
|
23795
|
+
_ref13$isRequired = _ref13.isRequired,
|
|
23796
|
+
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
|
|
23795
23797
|
|
|
23796
23798
|
var _useState = useState(""),
|
|
23797
23799
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -23988,7 +23990,9 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23988
23990
|
}
|
|
23989
23991
|
|
|
23990
23992
|
setFilteredOptions(options.filter(function (option) {
|
|
23991
|
-
|
|
23993
|
+
var _option$value, _option$value$toLower, _option$text, _option$text$toLowerC;
|
|
23994
|
+
|
|
23995
|
+
return (option === null || option === void 0 ? void 0 : (_option$value = option.value) === null || _option$value === void 0 ? void 0 : (_option$value$toLower = _option$value.toLowerCase()) === null || _option$value$toLower === void 0 ? void 0 : _option$value$toLower.indexOf(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase())) >= 0 || ((_option$text = option.text) === null || _option$text === void 0 ? void 0 : (_option$text$toLowerC = _option$text.toLowerCase()) === null || _option$text$toLowerC === void 0 ? void 0 : _option$text$toLowerC.indexOf(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase())) >= 0;
|
|
23992
23996
|
}));
|
|
23993
23997
|
}, [inputValue]);
|
|
23994
23998
|
useEffect$1(function () {
|
|
@@ -24062,7 +24066,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24062
24066
|
},
|
|
24063
24067
|
padding: "12px",
|
|
24064
24068
|
placeholder: getSelection(),
|
|
24065
|
-
required: options.required,
|
|
24069
|
+
required: options.required || isRequired,
|
|
24066
24070
|
role: "combobox",
|
|
24067
24071
|
themeValues: themeValues,
|
|
24068
24072
|
title: hasTitles ? getSelection() : null,
|
|
@@ -24230,7 +24234,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24230
24234
|
_ref$dataQa = _ref.dataQa,
|
|
24231
24235
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
24232
24236
|
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
24233
|
-
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions
|
|
24237
|
+
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
|
|
24238
|
+
_ref$isRequired = _ref.isRequired,
|
|
24239
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
24234
24240
|
|
|
24235
24241
|
var _useState = useState(false),
|
|
24236
24242
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24292,7 +24298,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24292
24298
|
},
|
|
24293
24299
|
disabled: disabled,
|
|
24294
24300
|
autocompleteValue: autocompleteValue,
|
|
24295
|
-
smoothScroll: smoothScroll
|
|
24301
|
+
smoothScroll: smoothScroll,
|
|
24302
|
+
isRequired: isRequired
|
|
24296
24303
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
24297
24304
|
direction: "row",
|
|
24298
24305
|
justify: "space-between"
|
|
@@ -25063,6 +25070,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25063
25070
|
fieldActions = _ref.fieldActions,
|
|
25064
25071
|
showErrors = _ref.showErrors,
|
|
25065
25072
|
onChange = _ref.onChange,
|
|
25073
|
+
_ref$isRequired = _ref.isRequired,
|
|
25074
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25066
25075
|
_ref$dataQa = _ref.dataQa,
|
|
25067
25076
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25068
25077
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
@@ -25074,7 +25083,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25074
25083
|
errorMessages: errorMessages,
|
|
25075
25084
|
showErrors: showErrors,
|
|
25076
25085
|
onChange: onChange,
|
|
25077
|
-
autocompleteValue: "country-name"
|
|
25086
|
+
autocompleteValue: "country-name",
|
|
25087
|
+
isRequired: isRequired
|
|
25078
25088
|
});
|
|
25079
25089
|
};
|
|
25080
25090
|
|
|
@@ -25921,7 +25931,7 @@ var fallbackValues$k = {
|
|
|
25921
25931
|
};
|
|
25922
25932
|
|
|
25923
25933
|
var _excluded$p = ["showErrors", "themeValues"],
|
|
25924
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
|
|
25934
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
|
|
25925
25935
|
var InputField = styled.input.withConfig({
|
|
25926
25936
|
displayName: "FormInput__InputField",
|
|
25927
25937
|
componentId: "sc-l094r1-0"
|
|
@@ -26008,6 +26018,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26008
26018
|
removeFromValue = _ref15.removeFromValue,
|
|
26009
26019
|
_ref15$dataQa = _ref15.dataQa,
|
|
26010
26020
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
26021
|
+
_ref15$isRequired = _ref15.isRequired,
|
|
26022
|
+
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
26011
26023
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
26012
26024
|
|
|
26013
26025
|
var _useState = useState(false),
|
|
@@ -26094,7 +26106,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26094
26106
|
$customHeight: customHeight,
|
|
26095
26107
|
$extraStyles: extraStyles,
|
|
26096
26108
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26097
|
-
autoComplete: autocompleteValue
|
|
26109
|
+
autoComplete: autocompleteValue,
|
|
26110
|
+
required: isRequired
|
|
26098
26111
|
}, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
|
|
26099
26112
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26100
26113
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26113,7 +26126,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26113
26126
|
$customHeight: customHeight,
|
|
26114
26127
|
$extraStyles: extraStyles,
|
|
26115
26128
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26116
|
-
autoComplete: autocompleteValue
|
|
26129
|
+
autoComplete: autocompleteValue,
|
|
26130
|
+
required: isRequired
|
|
26117
26131
|
}, props))), /*#__PURE__*/React.createElement(Stack, {
|
|
26118
26132
|
direction: "row",
|
|
26119
26133
|
justify: "space-between",
|
|
@@ -27355,7 +27369,9 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27355
27369
|
_ref2$ariaLabelledBy = _ref2.ariaLabelledBy,
|
|
27356
27370
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27357
27371
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27358
|
-
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel
|
|
27372
|
+
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27373
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27374
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27359
27375
|
var buttonBorder = {
|
|
27360
27376
|
onFocused: {
|
|
27361
27377
|
borderColor: themeValues.activeColor,
|
|
@@ -27417,7 +27433,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27417
27433
|
disabled: disabled,
|
|
27418
27434
|
onClick: toggleRadio,
|
|
27419
27435
|
"aria-describedby": ariaDescribedBy,
|
|
27420
|
-
tabIndex: "-1"
|
|
27436
|
+
tabIndex: "-1",
|
|
27437
|
+
required: isRequired
|
|
27421
27438
|
}, extraProps)), /*#__PURE__*/React.createElement(Motion, {
|
|
27422
27439
|
borderWidth: "1px",
|
|
27423
27440
|
borderStyle: "solid",
|
|
@@ -38107,7 +38124,9 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38107
38124
|
field = _ref.field,
|
|
38108
38125
|
fieldActions = _ref.fieldActions,
|
|
38109
38126
|
showErrors = _ref.showErrors,
|
|
38110
|
-
countryCode = _ref.countryCode
|
|
38127
|
+
countryCode = _ref.countryCode,
|
|
38128
|
+
_ref$isRequired = _ref.isRequired,
|
|
38129
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
38111
38130
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38112
38131
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38113
38132
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
@@ -38117,7 +38136,8 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38117
38136
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38118
38137
|
errorMessages: errorMessages,
|
|
38119
38138
|
showErrors: showErrors,
|
|
38120
|
-
autocompleteValue: "address-level1"
|
|
38139
|
+
autocompleteValue: "address-level1",
|
|
38140
|
+
isRequired: isRequired
|
|
38121
38141
|
});
|
|
38122
38142
|
};
|
|
38123
38143
|
|
|
@@ -39456,7 +39476,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39456
39476
|
}
|
|
39457
39477
|
},
|
|
39458
39478
|
showErrors: showErrors,
|
|
39459
|
-
dataQa: "Country"
|
|
39479
|
+
dataQa: "Country",
|
|
39480
|
+
isRequired: true
|
|
39460
39481
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39461
39482
|
labelTextWhenNoError: "Address",
|
|
39462
39483
|
errorMessages: street1ErrorMessages,
|
|
@@ -39467,7 +39488,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39467
39488
|
return e.key === "Enter" && handleSubmit(e);
|
|
39468
39489
|
},
|
|
39469
39490
|
autocompleteValue: "address-line1",
|
|
39470
|
-
dataQa: "Address"
|
|
39491
|
+
dataQa: "Address",
|
|
39492
|
+
isRequired: true
|
|
39471
39493
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39472
39494
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39473
39495
|
field: fields.street2,
|
|
@@ -39488,7 +39510,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39488
39510
|
return e.key === "Enter" && handleSubmit(e);
|
|
39489
39511
|
},
|
|
39490
39512
|
autocompleteValue: "address-level2",
|
|
39491
|
-
dataQa: "City"
|
|
39513
|
+
dataQa: "City",
|
|
39514
|
+
isRequired: true
|
|
39492
39515
|
}), /*#__PURE__*/React.createElement(FormStateDropdown, {
|
|
39493
39516
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39494
39517
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39499,7 +39522,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39499
39522
|
onKeyDown: function onKeyDown(e) {
|
|
39500
39523
|
return e.key === "Enter" && handleSubmit(e);
|
|
39501
39524
|
},
|
|
39502
|
-
dataQa: "State or Province"
|
|
39525
|
+
dataQa: "State or Province",
|
|
39526
|
+
isRequired: true
|
|
39503
39527
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39504
39528
|
isNum: isUS,
|
|
39505
39529
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39512,7 +39536,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39512
39536
|
return e.key === "Enter" && handleSubmit(e);
|
|
39513
39537
|
},
|
|
39514
39538
|
autocompleteValue: "postal-code",
|
|
39515
|
-
dataQa: "Zip code"
|
|
39539
|
+
dataQa: "Zip code",
|
|
39540
|
+
isRequired: true
|
|
39516
39541
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
39517
39542
|
name: "address checkbox",
|
|
39518
39543
|
title: "Save address to wallet",
|
|
@@ -40415,7 +40440,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40415
40440
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40416
40441
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40417
40442
|
saveToWallet = _ref.saveToWallet,
|
|
40418
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40443
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40444
|
+
_ref$isRequired = _ref.isRequired,
|
|
40445
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40419
40446
|
|
|
40420
40447
|
if (clearOnDismount) {
|
|
40421
40448
|
useEffect$1(function () {
|
|
@@ -40444,7 +40471,8 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40444
40471
|
},
|
|
40445
40472
|
isEmail: true,
|
|
40446
40473
|
autocompleteValue: "email",
|
|
40447
|
-
dataQa: "Email address"
|
|
40474
|
+
dataQa: "Email address",
|
|
40475
|
+
isRequired: isRequired
|
|
40448
40476
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
40449
40477
|
name: "email checkbox",
|
|
40450
40478
|
title: "Save email address to wallet",
|
|
@@ -45717,7 +45745,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45717
45745
|
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
45718
45746
|
children = _ref.children,
|
|
45719
45747
|
_ref$dataQa = _ref.dataQa,
|
|
45720
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa
|
|
45748
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
45749
|
+
_ref$initialFocus = _ref.initialFocus,
|
|
45750
|
+
initialFocus = _ref$initialFocus === void 0 ? null : _ref$initialFocus;
|
|
45721
45751
|
|
|
45722
45752
|
var _useContext = useContext(ThemeContext),
|
|
45723
45753
|
isMobile = _useContext.isMobile;
|
|
@@ -45727,7 +45757,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45727
45757
|
ref: modalContainerRef,
|
|
45728
45758
|
"data-qa": dataQa
|
|
45729
45759
|
}, modalOpen && /*#__PURE__*/React.createElement(reactAriaModal // fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
|
|
45730
|
-
, {
|
|
45760
|
+
, _extends({
|
|
45731
45761
|
focusTrapOptions: {
|
|
45732
45762
|
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
45733
45763
|
},
|
|
@@ -45741,11 +45771,14 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45741
45771
|
alignItems: "center"
|
|
45742
45772
|
},
|
|
45743
45773
|
dialogStyle: {
|
|
45744
|
-
width: customWidth || "615px"
|
|
45745
|
-
overflow: "auto"
|
|
45774
|
+
width: customWidth || "615px"
|
|
45746
45775
|
},
|
|
45747
|
-
underlayClickExits: underlayClickExits
|
|
45748
|
-
|
|
45776
|
+
underlayClickExits: underlayClickExits,
|
|
45777
|
+
"aria-modal": true,
|
|
45778
|
+
"aria-name": modalHeaderText
|
|
45779
|
+
}, initialFocus ? {
|
|
45780
|
+
initialFocus: initialFocus
|
|
45781
|
+
} : {}), /*#__PURE__*/React.createElement(Box, {
|
|
45749
45782
|
padding: "0",
|
|
45750
45783
|
borderRadius: "2px",
|
|
45751
45784
|
boxShadow: "inset 0px -2px 0px 0px rgb(0, 80, 149)"
|
|
@@ -45791,7 +45824,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45791
45824
|
text: cancelButtonText,
|
|
45792
45825
|
dataQa: cancelButtonText,
|
|
45793
45826
|
extraStyles: buttonExtraStyles,
|
|
45794
|
-
className: "modal-cancel-button"
|
|
45827
|
+
className: "modal-cancel-button",
|
|
45828
|
+
role: "button",
|
|
45829
|
+
name: cancelButtonText
|
|
45795
45830
|
})), /*#__PURE__*/React.createElement(Box, {
|
|
45796
45831
|
width: "100%",
|
|
45797
45832
|
padding: "0"
|
|
@@ -45803,7 +45838,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45803
45838
|
isLoading: isLoading,
|
|
45804
45839
|
disabled: isContinueActionDisabled,
|
|
45805
45840
|
extraStyles: buttonExtraStyles,
|
|
45806
|
-
className: "modal-continue-button"
|
|
45841
|
+
className: "modal-continue-button",
|
|
45842
|
+
role: "button",
|
|
45843
|
+
name: continueButtonText
|
|
45807
45844
|
}))) : /*#__PURE__*/React.createElement(Stack, {
|
|
45808
45845
|
childGap: "1rem",
|
|
45809
45846
|
direction: "row",
|
|
@@ -45814,7 +45851,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45814
45851
|
text: cancelButtonText,
|
|
45815
45852
|
dataQa: cancelButtonText,
|
|
45816
45853
|
extraStyles: buttonExtraStyles,
|
|
45817
|
-
className: "modal-cancel-button"
|
|
45854
|
+
className: "modal-cancel-button",
|
|
45855
|
+
role: "button",
|
|
45856
|
+
name: cancelButtonText
|
|
45818
45857
|
}), /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
45819
45858
|
variant: useDangerButton ? "danger" : "primary",
|
|
45820
45859
|
action: continueAction,
|
|
@@ -45823,7 +45862,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45823
45862
|
isLoading: isLoading,
|
|
45824
45863
|
disabled: isContinueActionDisabled,
|
|
45825
45864
|
extraStyles: buttonExtraStyles,
|
|
45826
|
-
className: "modal-continue-button"
|
|
45865
|
+
className: "modal-continue-button",
|
|
45866
|
+
role: "button",
|
|
45867
|
+
name: continueButtonText
|
|
45827
45868
|
}))) : /*#__PURE__*/React.createElement(Box, {
|
|
45828
45869
|
padding: "0.5rem"
|
|
45829
45870
|
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
@@ -45832,7 +45873,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45832
45873
|
text: closeButtonText,
|
|
45833
45874
|
dataQa: closeButtonText,
|
|
45834
45875
|
extraStyles: buttonExtraStyles,
|
|
45835
|
-
className: "modal-close-button"
|
|
45876
|
+
className: "modal-close-button",
|
|
45877
|
+
role: "button",
|
|
45878
|
+
name: closeButtonText
|
|
45836
45879
|
}))))))))), children);
|
|
45837
45880
|
};
|
|
45838
45881
|
|
|
@@ -47677,7 +47720,9 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
|
|
|
47677
47720
|
color: themeValues.linkColor,
|
|
47678
47721
|
weight: themeValues.fontWeight,
|
|
47679
47722
|
hoverStyles: themeValues.modalLinkHoverFocus,
|
|
47680
|
-
extraStyles: "cursor: pointer;"
|
|
47723
|
+
extraStyles: "cursor: pointer;",
|
|
47724
|
+
role: "button",
|
|
47725
|
+
className: "modal-trigger"
|
|
47681
47726
|
}, link));
|
|
47682
47727
|
};
|
|
47683
47728
|
|
|
@@ -47734,8 +47779,10 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
47734
47779
|
variant = _ref.variant,
|
|
47735
47780
|
_ref$linkVariant = _ref.linkVariant,
|
|
47736
47781
|
linkVariant = _ref$linkVariant === void 0 ? "p" : _ref$linkVariant,
|
|
47737
|
-
themeValues = _ref.themeValues
|
|
47738
|
-
|
|
47782
|
+
themeValues = _ref.themeValues,
|
|
47783
|
+
_ref$initialFocus = _ref.initialFocus,
|
|
47784
|
+
initialFocus = _ref$initialFocus === void 0 ? null : _ref$initialFocus;
|
|
47785
|
+
return /*#__PURE__*/React.createElement(Modal$1, _extends({
|
|
47739
47786
|
modalOpen: isOpen,
|
|
47740
47787
|
hideModal: function hideModal() {
|
|
47741
47788
|
return toggleOpen(false);
|
|
@@ -47761,7 +47808,9 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
47761
47808
|
toggleAccepted(true);
|
|
47762
47809
|
toggleOpen(false);
|
|
47763
47810
|
}
|
|
47764
|
-
},
|
|
47811
|
+
}, initialFocus ? {
|
|
47812
|
+
initialFocus: initialFocus
|
|
47813
|
+
} : {}), /*#__PURE__*/React.createElement(Text$1, {
|
|
47765
47814
|
variant: linkVariant,
|
|
47766
47815
|
onClick: function onClick() {
|
|
47767
47816
|
return toggleOpen(true);
|
|
@@ -47773,7 +47822,9 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
47773
47822
|
color: themeValues.linkColor,
|
|
47774
47823
|
weight: themeValues.fontWeight,
|
|
47775
47824
|
hoverStyles: themeValues.modalLinkHoverFocus,
|
|
47776
|
-
extraStyles: "display: inline-block; width: fit-content; cursor: pointer"
|
|
47825
|
+
extraStyles: "display: inline-block; width: fit-content; cursor: pointer",
|
|
47826
|
+
role: "button",
|
|
47827
|
+
className: "modal-trigger"
|
|
47777
47828
|
}, link));
|
|
47778
47829
|
};
|
|
47779
47830
|
|
|
@@ -47808,7 +47859,8 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47808
47859
|
terms: terms,
|
|
47809
47860
|
isOpen: showTerms,
|
|
47810
47861
|
toggleOpen: toggleShowTerms,
|
|
47811
|
-
linkVariant: linkVariant
|
|
47862
|
+
linkVariant: linkVariant,
|
|
47863
|
+
initialFocus: "[role=\"button\"]:not(.modal-trigger)"
|
|
47812
47864
|
})))));
|
|
47813
47865
|
};
|
|
47814
47866
|
|
|
@@ -47891,7 +47943,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47891
47943
|
isOpen: showTerms,
|
|
47892
47944
|
toggleOpen: toggleTerms,
|
|
47893
47945
|
linkVariant: modalVariant,
|
|
47894
|
-
title: modalTitle
|
|
47946
|
+
title: modalTitle,
|
|
47947
|
+
initialFocus: ".modal-close-button"
|
|
47895
47948
|
})), /*#__PURE__*/React.createElement("div", {
|
|
47896
47949
|
"aria-live": "polite",
|
|
47897
47950
|
"aria-atomic": true
|
|
@@ -47980,7 +48033,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47980
48033
|
onKeyDown: function onKeyDown(e) {
|
|
47981
48034
|
return e.key === "Enter" && handleSubmit(e);
|
|
47982
48035
|
},
|
|
47983
|
-
autocompleteValue: "name"
|
|
48036
|
+
autocompleteValue: "name",
|
|
48037
|
+
isRequired: true
|
|
47984
48038
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
47985
48039
|
labelTextWhenNoError: "Routing number",
|
|
47986
48040
|
dataQa: "Routing number",
|
|
@@ -48002,7 +48056,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48002
48056
|
},
|
|
48003
48057
|
onKeyDown: function onKeyDown(e) {
|
|
48004
48058
|
return e.key === "Enter" && handleSubmit(e);
|
|
48005
|
-
}
|
|
48059
|
+
},
|
|
48060
|
+
isRequired: true
|
|
48006
48061
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48007
48062
|
labelTextWhenNoError: "Confirm routing number",
|
|
48008
48063
|
dataQa: "Confirm routing number",
|
|
@@ -48013,7 +48068,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48013
48068
|
onKeyDown: function onKeyDown(e) {
|
|
48014
48069
|
return e.key === "Enter" && handleSubmit(e);
|
|
48015
48070
|
},
|
|
48016
|
-
isNum: true
|
|
48071
|
+
isNum: true,
|
|
48072
|
+
isRequired: true
|
|
48017
48073
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48018
48074
|
labelTextWhenNoError: "Account number",
|
|
48019
48075
|
dataQa: "Account number",
|
|
@@ -48035,7 +48091,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48035
48091
|
},
|
|
48036
48092
|
onKeyDown: function onKeyDown(e) {
|
|
48037
48093
|
return e.key === "Enter" && handleSubmit(e);
|
|
48038
|
-
}
|
|
48094
|
+
},
|
|
48095
|
+
isRequired: true
|
|
48039
48096
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48040
48097
|
labelTextWhenNoError: "Confirm account number",
|
|
48041
48098
|
dataQa: "Confirm account number",
|
|
@@ -48046,6 +48103,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48046
48103
|
onKeyDown: function onKeyDown(e) {
|
|
48047
48104
|
return e.key === "Enter" && handleSubmit(e);
|
|
48048
48105
|
},
|
|
48106
|
+
isRequired: true,
|
|
48049
48107
|
isNum: true
|
|
48050
48108
|
}), allowBankAccountType && /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
48051
48109
|
labelTextWhenNoError: "Account type",
|
|
@@ -48063,7 +48121,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48063
48121
|
fieldActions: actions.fields.accountType,
|
|
48064
48122
|
showErrors: showErrors,
|
|
48065
48123
|
errorMessages: accountTypeErrors,
|
|
48066
|
-
field: fields.accountType
|
|
48124
|
+
field: fields.accountType,
|
|
48125
|
+
isRequired: true
|
|
48067
48126
|
}), !hideDefaultPayment && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48068
48127
|
title: "Save as Default Payment Method",
|
|
48069
48128
|
dataQa: "default-payment-ach",
|
|
@@ -48201,7 +48260,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48201
48260
|
onKeyDown: function onKeyDown(e) {
|
|
48202
48261
|
return e.key === "Enter" && handleSubmit(e);
|
|
48203
48262
|
},
|
|
48204
|
-
autocompleteValue: "cc-name"
|
|
48263
|
+
autocompleteValue: "cc-name",
|
|
48264
|
+
isRequired: true
|
|
48205
48265
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48206
48266
|
labelTextWhenNoError: "Credit card number",
|
|
48207
48267
|
dataQa: "Credit card number",
|
|
@@ -48214,7 +48274,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48214
48274
|
return e.key === "Enter" && handleSubmit(e);
|
|
48215
48275
|
},
|
|
48216
48276
|
isNum: true,
|
|
48217
|
-
autocompleteValue: "cc-number"
|
|
48277
|
+
autocompleteValue: "cc-number",
|
|
48278
|
+
isRequired: true
|
|
48218
48279
|
}), /*#__PURE__*/React.createElement(FormInputRow, {
|
|
48219
48280
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48220
48281
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48232,7 +48293,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48232
48293
|
isNum: true,
|
|
48233
48294
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48234
48295
|
,
|
|
48235
|
-
autocompleteValue: "cc-exp"
|
|
48296
|
+
autocompleteValue: "cc-exp",
|
|
48297
|
+
isRequired: true
|
|
48236
48298
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48237
48299
|
labelTextWhenNoError: "CVV",
|
|
48238
48300
|
dataQa: "CVV",
|
|
@@ -48245,7 +48307,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48245
48307
|
onKeyDown: function onKeyDown(e) {
|
|
48246
48308
|
return e.key === "Enter" && handleSubmit(e);
|
|
48247
48309
|
},
|
|
48248
|
-
autocompleteValue: "cc-csc"
|
|
48310
|
+
autocompleteValue: "cc-csc",
|
|
48311
|
+
isRequired: true
|
|
48249
48312
|
})), !hideZipCode && /*#__PURE__*/React.createElement(Box, {
|
|
48250
48313
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48251
48314
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48261,7 +48324,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48261
48324
|
onKeyDown: function onKeyDown(e) {
|
|
48262
48325
|
return e.key === "Enter" && handleSubmit(e);
|
|
48263
48326
|
},
|
|
48264
|
-
autocompleteValue: "billing postal-code"
|
|
48327
|
+
autocompleteValue: "billing postal-code",
|
|
48328
|
+
isRequired: true
|
|
48265
48329
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React.createElement(Cluster, {
|
|
48266
48330
|
childGap: "4px",
|
|
48267
48331
|
align: "center"
|
|
@@ -48454,7 +48518,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48454
48518
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48455
48519
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48456
48520
|
saveToWallet = _ref.saveToWallet,
|
|
48457
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48521
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48522
|
+
_ref$isRequired = _ref.isRequired,
|
|
48523
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48458
48524
|
|
|
48459
48525
|
if (clearOnDismount) {
|
|
48460
48526
|
useEffect$1(function () {
|
|
@@ -48481,7 +48547,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48481
48547
|
},
|
|
48482
48548
|
autocompleteValue: "tel-national",
|
|
48483
48549
|
dataQa: "Phone number",
|
|
48484
|
-
isNum: true
|
|
48550
|
+
isNum: true,
|
|
48551
|
+
isRequired: isRequired
|
|
48485
48552
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48486
48553
|
name: "phone checkbox",
|
|
48487
48554
|
title: "Save phone number to wallet",
|
|
@@ -48614,7 +48681,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48614
48681
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48615
48682
|
_ref$containerStyles = _ref.containerStyles,
|
|
48616
48683
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48617
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48684
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48685
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48686
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48618
48687
|
|
|
48619
48688
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48620
48689
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48670,7 +48739,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48670
48739
|
extraStyles: containerStyles
|
|
48671
48740
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48672
48741
|
childGap: "0",
|
|
48673
|
-
role: "radiogroup"
|
|
48742
|
+
"aria-role": "radiogroup",
|
|
48743
|
+
"aria-required": isSectionRequired
|
|
48674
48744
|
}, sections.filter(function (section) {
|
|
48675
48745
|
return !section.hidden;
|
|
48676
48746
|
}).map(function (section) {
|
|
@@ -48692,7 +48762,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48692
48762
|
extraStyles: borderStyles,
|
|
48693
48763
|
role: "radio",
|
|
48694
48764
|
"aria-checked": openSection === section.id,
|
|
48695
|
-
"aria-disabled": section.disabled
|
|
48765
|
+
"aria-disabled": section.disabled,
|
|
48766
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48696
48767
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48697
48768
|
childGap: "0"
|
|
48698
48769
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48730,7 +48801,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48730
48801
|
toggleRadio: section.disabled ? noop : function () {
|
|
48731
48802
|
return toggleOpenSection(section.id);
|
|
48732
48803
|
},
|
|
48733
|
-
tabIndex: "-1"
|
|
48804
|
+
tabIndex: "-1",
|
|
48805
|
+
isRequired: section === null || section === void 0 ? void 0 : section.required
|
|
48734
48806
|
})), section.titleIcon && /*#__PURE__*/React.createElement(Cluster, {
|
|
48735
48807
|
align: "center"
|
|
48736
48808
|
}, section.titleIcon), /*#__PURE__*/React.createElement(Box, {
|