@thecb/components 9.2.5-beta.0 → 9.2.5
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 +83 -36
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +83 -36
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/country-dropdown/CountryDropdown.js +2 -0
- package/src/components/atoms/dropdown/Dropdown.js +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/state-province-dropdown/StateProvinceDropdown.js +3 -1
- package/src/components/molecules/address-form/AddressForm.js +5 -0
- package/src/components/molecules/email-form/EmailForm.js +3 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +6 -0
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +5 -0
- package/src/components/molecules/phone-form/PhoneForm.js +3 -1
- package/src/components/molecules/radio-section/RadioSection.js +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/dist/index.cjs.js
CHANGED
|
@@ -23799,7 +23799,9 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23799
23799
|
_ref13$smoothScroll = _ref13.smoothScroll,
|
|
23800
23800
|
smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
|
|
23801
23801
|
_ref13$ariaInvalid = _ref13.ariaInvalid,
|
|
23802
|
-
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid
|
|
23802
|
+
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
|
|
23803
|
+
_ref13$isRequired = _ref13.isRequired,
|
|
23804
|
+
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
|
|
23803
23805
|
|
|
23804
23806
|
var _useState = React.useState(""),
|
|
23805
23807
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -23996,7 +23998,9 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23996
23998
|
}
|
|
23997
23999
|
|
|
23998
24000
|
setFilteredOptions(options.filter(function (option) {
|
|
23999
|
-
|
|
24001
|
+
var _option$value, _option$value$toLower, _option$text, _option$text$toLowerC;
|
|
24002
|
+
|
|
24003
|
+
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;
|
|
24000
24004
|
}));
|
|
24001
24005
|
}, [inputValue]);
|
|
24002
24006
|
React.useEffect(function () {
|
|
@@ -24070,7 +24074,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24070
24074
|
},
|
|
24071
24075
|
padding: "12px",
|
|
24072
24076
|
placeholder: getSelection(),
|
|
24073
|
-
required: options.required,
|
|
24077
|
+
required: options.required || isRequired,
|
|
24074
24078
|
role: "combobox",
|
|
24075
24079
|
themeValues: themeValues,
|
|
24076
24080
|
title: hasTitles ? getSelection() : null,
|
|
@@ -24238,7 +24242,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24238
24242
|
_ref$dataQa = _ref.dataQa,
|
|
24239
24243
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
24240
24244
|
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
24241
|
-
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions
|
|
24245
|
+
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
|
|
24246
|
+
_ref$isRequired = _ref.isRequired,
|
|
24247
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
24242
24248
|
|
|
24243
24249
|
var _useState = React.useState(false),
|
|
24244
24250
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24300,7 +24306,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24300
24306
|
},
|
|
24301
24307
|
disabled: disabled,
|
|
24302
24308
|
autocompleteValue: autocompleteValue,
|
|
24303
|
-
smoothScroll: smoothScroll
|
|
24309
|
+
smoothScroll: smoothScroll,
|
|
24310
|
+
isRequired: isRequired
|
|
24304
24311
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
24305
24312
|
direction: "row",
|
|
24306
24313
|
justify: "space-between"
|
|
@@ -25071,6 +25078,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25071
25078
|
fieldActions = _ref.fieldActions,
|
|
25072
25079
|
showErrors = _ref.showErrors,
|
|
25073
25080
|
onChange = _ref.onChange,
|
|
25081
|
+
_ref$isRequired = _ref.isRequired,
|
|
25082
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25074
25083
|
_ref$dataQa = _ref.dataQa,
|
|
25075
25084
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25076
25085
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
@@ -25082,7 +25091,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25082
25091
|
errorMessages: errorMessages,
|
|
25083
25092
|
showErrors: showErrors,
|
|
25084
25093
|
onChange: onChange,
|
|
25085
|
-
autocompleteValue: "country-name"
|
|
25094
|
+
autocompleteValue: "country-name",
|
|
25095
|
+
isRequired: isRequired
|
|
25086
25096
|
});
|
|
25087
25097
|
};
|
|
25088
25098
|
|
|
@@ -25929,7 +25939,7 @@ var fallbackValues$k = {
|
|
|
25929
25939
|
};
|
|
25930
25940
|
|
|
25931
25941
|
var _excluded$p = ["showErrors", "themeValues"],
|
|
25932
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
|
|
25942
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
|
|
25933
25943
|
var InputField = styled__default.input.withConfig({
|
|
25934
25944
|
displayName: "FormInput__InputField",
|
|
25935
25945
|
componentId: "sc-l094r1-0"
|
|
@@ -26016,6 +26026,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26016
26026
|
removeFromValue = _ref15.removeFromValue,
|
|
26017
26027
|
_ref15$dataQa = _ref15.dataQa,
|
|
26018
26028
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
26029
|
+
_ref15$isRequired = _ref15.isRequired,
|
|
26030
|
+
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
26019
26031
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
26020
26032
|
|
|
26021
26033
|
var _useState = React.useState(false),
|
|
@@ -26102,7 +26114,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26102
26114
|
$customHeight: customHeight,
|
|
26103
26115
|
$extraStyles: extraStyles,
|
|
26104
26116
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26105
|
-
autoComplete: autocompleteValue
|
|
26117
|
+
autoComplete: autocompleteValue,
|
|
26118
|
+
required: isRequired
|
|
26106
26119
|
}, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
|
|
26107
26120
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26108
26121
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26121,7 +26134,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26121
26134
|
$customHeight: customHeight,
|
|
26122
26135
|
$extraStyles: extraStyles,
|
|
26123
26136
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26124
|
-
autoComplete: autocompleteValue
|
|
26137
|
+
autoComplete: autocompleteValue,
|
|
26138
|
+
required: isRequired
|
|
26125
26139
|
}, props))), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26126
26140
|
direction: "row",
|
|
26127
26141
|
justify: "space-between",
|
|
@@ -27363,7 +27377,9 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27363
27377
|
_ref2$ariaLabelledBy = _ref2.ariaLabelledBy,
|
|
27364
27378
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27365
27379
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27366
|
-
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel
|
|
27380
|
+
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27381
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27382
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27367
27383
|
var buttonBorder = {
|
|
27368
27384
|
onFocused: {
|
|
27369
27385
|
borderColor: themeValues.activeColor,
|
|
@@ -27425,7 +27441,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27425
27441
|
disabled: disabled,
|
|
27426
27442
|
onClick: toggleRadio,
|
|
27427
27443
|
"aria-describedby": ariaDescribedBy,
|
|
27428
|
-
tabIndex: "-1"
|
|
27444
|
+
tabIndex: "-1",
|
|
27445
|
+
required: isRequired
|
|
27429
27446
|
}, extraProps)), /*#__PURE__*/React__default.createElement(Motion, {
|
|
27430
27447
|
borderWidth: "1px",
|
|
27431
27448
|
borderStyle: "solid",
|
|
@@ -38115,7 +38132,9 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38115
38132
|
field = _ref.field,
|
|
38116
38133
|
fieldActions = _ref.fieldActions,
|
|
38117
38134
|
showErrors = _ref.showErrors,
|
|
38118
|
-
countryCode = _ref.countryCode
|
|
38135
|
+
countryCode = _ref.countryCode,
|
|
38136
|
+
_ref$isRequired = _ref.isRequired,
|
|
38137
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
38119
38138
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38120
38139
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38121
38140
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
@@ -38125,7 +38144,8 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38125
38144
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38126
38145
|
errorMessages: errorMessages,
|
|
38127
38146
|
showErrors: showErrors,
|
|
38128
|
-
autocompleteValue: "address-level1"
|
|
38147
|
+
autocompleteValue: "address-level1",
|
|
38148
|
+
isRequired: isRequired
|
|
38129
38149
|
});
|
|
38130
38150
|
};
|
|
38131
38151
|
|
|
@@ -39464,7 +39484,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39464
39484
|
}
|
|
39465
39485
|
},
|
|
39466
39486
|
showErrors: showErrors,
|
|
39467
|
-
dataQa: "Country"
|
|
39487
|
+
dataQa: "Country",
|
|
39488
|
+
isRequired: true
|
|
39468
39489
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39469
39490
|
labelTextWhenNoError: "Address",
|
|
39470
39491
|
errorMessages: street1ErrorMessages,
|
|
@@ -39475,7 +39496,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39475
39496
|
return e.key === "Enter" && handleSubmit(e);
|
|
39476
39497
|
},
|
|
39477
39498
|
autocompleteValue: "address-line1",
|
|
39478
|
-
dataQa: "Address"
|
|
39499
|
+
dataQa: "Address",
|
|
39500
|
+
isRequired: true
|
|
39479
39501
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39480
39502
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39481
39503
|
field: fields.street2,
|
|
@@ -39496,7 +39518,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39496
39518
|
return e.key === "Enter" && handleSubmit(e);
|
|
39497
39519
|
},
|
|
39498
39520
|
autocompleteValue: "address-level2",
|
|
39499
|
-
dataQa: "City"
|
|
39521
|
+
dataQa: "City",
|
|
39522
|
+
isRequired: true
|
|
39500
39523
|
}), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
|
|
39501
39524
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39502
39525
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39507,7 +39530,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39507
39530
|
onKeyDown: function onKeyDown(e) {
|
|
39508
39531
|
return e.key === "Enter" && handleSubmit(e);
|
|
39509
39532
|
},
|
|
39510
|
-
dataQa: "State or Province"
|
|
39533
|
+
dataQa: "State or Province",
|
|
39534
|
+
isRequired: true
|
|
39511
39535
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39512
39536
|
isNum: isUS,
|
|
39513
39537
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39520,7 +39544,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39520
39544
|
return e.key === "Enter" && handleSubmit(e);
|
|
39521
39545
|
},
|
|
39522
39546
|
autocompleteValue: "postal-code",
|
|
39523
|
-
dataQa: "Zip code"
|
|
39547
|
+
dataQa: "Zip code",
|
|
39548
|
+
isRequired: true
|
|
39524
39549
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
39525
39550
|
name: "address checkbox",
|
|
39526
39551
|
title: "Save address to wallet",
|
|
@@ -40423,7 +40448,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40423
40448
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40424
40449
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40425
40450
|
saveToWallet = _ref.saveToWallet,
|
|
40426
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40451
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40452
|
+
_ref$isRequired = _ref.isRequired,
|
|
40453
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40427
40454
|
|
|
40428
40455
|
if (clearOnDismount) {
|
|
40429
40456
|
React.useEffect(function () {
|
|
@@ -40452,7 +40479,8 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40452
40479
|
},
|
|
40453
40480
|
isEmail: true,
|
|
40454
40481
|
autocompleteValue: "email",
|
|
40455
|
-
dataQa: "Email address"
|
|
40482
|
+
dataQa: "Email address",
|
|
40483
|
+
isRequired: isRequired
|
|
40456
40484
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
40457
40485
|
name: "email checkbox",
|
|
40458
40486
|
title: "Save email address to wallet",
|
|
@@ -47988,7 +48016,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47988
48016
|
onKeyDown: function onKeyDown(e) {
|
|
47989
48017
|
return e.key === "Enter" && handleSubmit(e);
|
|
47990
48018
|
},
|
|
47991
|
-
autocompleteValue: "name"
|
|
48019
|
+
autocompleteValue: "name",
|
|
48020
|
+
isRequired: true
|
|
47992
48021
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
47993
48022
|
labelTextWhenNoError: "Routing number",
|
|
47994
48023
|
dataQa: "Routing number",
|
|
@@ -48010,7 +48039,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48010
48039
|
},
|
|
48011
48040
|
onKeyDown: function onKeyDown(e) {
|
|
48012
48041
|
return e.key === "Enter" && handleSubmit(e);
|
|
48013
|
-
}
|
|
48042
|
+
},
|
|
48043
|
+
isRequired: true
|
|
48014
48044
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48015
48045
|
labelTextWhenNoError: "Confirm routing number",
|
|
48016
48046
|
dataQa: "Confirm routing number",
|
|
@@ -48021,7 +48051,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48021
48051
|
onKeyDown: function onKeyDown(e) {
|
|
48022
48052
|
return e.key === "Enter" && handleSubmit(e);
|
|
48023
48053
|
},
|
|
48024
|
-
isNum: true
|
|
48054
|
+
isNum: true,
|
|
48055
|
+
isRequired: true
|
|
48025
48056
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48026
48057
|
labelTextWhenNoError: "Account number",
|
|
48027
48058
|
dataQa: "Account number",
|
|
@@ -48043,7 +48074,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48043
48074
|
},
|
|
48044
48075
|
onKeyDown: function onKeyDown(e) {
|
|
48045
48076
|
return e.key === "Enter" && handleSubmit(e);
|
|
48046
|
-
}
|
|
48077
|
+
},
|
|
48078
|
+
isRequired: true
|
|
48047
48079
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48048
48080
|
labelTextWhenNoError: "Confirm account number",
|
|
48049
48081
|
dataQa: "Confirm account number",
|
|
@@ -48054,6 +48086,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48054
48086
|
onKeyDown: function onKeyDown(e) {
|
|
48055
48087
|
return e.key === "Enter" && handleSubmit(e);
|
|
48056
48088
|
},
|
|
48089
|
+
isRequired: true,
|
|
48057
48090
|
isNum: true
|
|
48058
48091
|
}), allowBankAccountType && /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
48059
48092
|
labelTextWhenNoError: "Account type",
|
|
@@ -48071,7 +48104,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48071
48104
|
fieldActions: actions.fields.accountType,
|
|
48072
48105
|
showErrors: showErrors,
|
|
48073
48106
|
errorMessages: accountTypeErrors,
|
|
48074
|
-
field: fields.accountType
|
|
48107
|
+
field: fields.accountType,
|
|
48108
|
+
isRequired: true
|
|
48075
48109
|
}), !hideDefaultPayment && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48076
48110
|
title: "Save as Default Payment Method",
|
|
48077
48111
|
dataQa: "default-payment-ach",
|
|
@@ -48209,7 +48243,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48209
48243
|
onKeyDown: function onKeyDown(e) {
|
|
48210
48244
|
return e.key === "Enter" && handleSubmit(e);
|
|
48211
48245
|
},
|
|
48212
|
-
autocompleteValue: "cc-name"
|
|
48246
|
+
autocompleteValue: "cc-name",
|
|
48247
|
+
isRequired: true
|
|
48213
48248
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48214
48249
|
labelTextWhenNoError: "Credit card number",
|
|
48215
48250
|
dataQa: "Credit card number",
|
|
@@ -48222,7 +48257,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48222
48257
|
return e.key === "Enter" && handleSubmit(e);
|
|
48223
48258
|
},
|
|
48224
48259
|
isNum: true,
|
|
48225
|
-
autocompleteValue: "cc-number"
|
|
48260
|
+
autocompleteValue: "cc-number",
|
|
48261
|
+
isRequired: true
|
|
48226
48262
|
}), /*#__PURE__*/React__default.createElement(FormInputRow, {
|
|
48227
48263
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48228
48264
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48240,7 +48276,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48240
48276
|
isNum: true,
|
|
48241
48277
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48242
48278
|
,
|
|
48243
|
-
autocompleteValue: "cc-exp"
|
|
48279
|
+
autocompleteValue: "cc-exp",
|
|
48280
|
+
isRequired: true
|
|
48244
48281
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48245
48282
|
labelTextWhenNoError: "CVV",
|
|
48246
48283
|
dataQa: "CVV",
|
|
@@ -48253,7 +48290,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48253
48290
|
onKeyDown: function onKeyDown(e) {
|
|
48254
48291
|
return e.key === "Enter" && handleSubmit(e);
|
|
48255
48292
|
},
|
|
48256
|
-
autocompleteValue: "cc-csc"
|
|
48293
|
+
autocompleteValue: "cc-csc",
|
|
48294
|
+
isRequired: true
|
|
48257
48295
|
})), !hideZipCode && /*#__PURE__*/React__default.createElement(Box, {
|
|
48258
48296
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48259
48297
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48269,7 +48307,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48269
48307
|
onKeyDown: function onKeyDown(e) {
|
|
48270
48308
|
return e.key === "Enter" && handleSubmit(e);
|
|
48271
48309
|
},
|
|
48272
|
-
autocompleteValue: "billing postal-code"
|
|
48310
|
+
autocompleteValue: "billing postal-code",
|
|
48311
|
+
isRequired: true
|
|
48273
48312
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48274
48313
|
childGap: "4px",
|
|
48275
48314
|
align: "center"
|
|
@@ -48462,7 +48501,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48462
48501
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48463
48502
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48464
48503
|
saveToWallet = _ref.saveToWallet,
|
|
48465
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48504
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48505
|
+
_ref$isRequired = _ref.isRequired,
|
|
48506
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48466
48507
|
|
|
48467
48508
|
if (clearOnDismount) {
|
|
48468
48509
|
React.useEffect(function () {
|
|
@@ -48489,7 +48530,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48489
48530
|
},
|
|
48490
48531
|
autocompleteValue: "tel-national",
|
|
48491
48532
|
dataQa: "Phone number",
|
|
48492
|
-
isNum: true
|
|
48533
|
+
isNum: true,
|
|
48534
|
+
isRequired: isRequired
|
|
48493
48535
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48494
48536
|
name: "phone checkbox",
|
|
48495
48537
|
title: "Save phone number to wallet",
|
|
@@ -48622,7 +48664,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48622
48664
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48623
48665
|
_ref$containerStyles = _ref.containerStyles,
|
|
48624
48666
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48625
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48667
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48668
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48669
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48626
48670
|
|
|
48627
48671
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48628
48672
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48678,7 +48722,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48678
48722
|
extraStyles: containerStyles
|
|
48679
48723
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48680
48724
|
childGap: "0",
|
|
48681
|
-
role: "radiogroup"
|
|
48725
|
+
"aria-role": "radiogroup",
|
|
48726
|
+
"aria-required": isSectionRequired
|
|
48682
48727
|
}, sections.filter(function (section) {
|
|
48683
48728
|
return !section.hidden;
|
|
48684
48729
|
}).map(function (section) {
|
|
@@ -48700,7 +48745,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48700
48745
|
extraStyles: borderStyles,
|
|
48701
48746
|
role: "radio",
|
|
48702
48747
|
"aria-checked": openSection === section.id,
|
|
48703
|
-
"aria-disabled": section.disabled
|
|
48748
|
+
"aria-disabled": section.disabled,
|
|
48749
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48704
48750
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48705
48751
|
childGap: "0"
|
|
48706
48752
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48738,7 +48784,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48738
48784
|
toggleRadio: section.disabled ? noop : function () {
|
|
48739
48785
|
return toggleOpenSection(section.id);
|
|
48740
48786
|
},
|
|
48741
|
-
tabIndex: "-1"
|
|
48787
|
+
tabIndex: "-1",
|
|
48788
|
+
isRequired: section === null || section === void 0 ? void 0 : section.required
|
|
48742
48789
|
})), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48743
48790
|
align: "center"
|
|
48744
48791
|
}, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {
|