@thecb/components 9.2.2 → 9.2.3
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 +80 -35
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +80 -35
- 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 +3 -2
- 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),
|
|
@@ -24070,7 +24072,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24070
24072
|
},
|
|
24071
24073
|
padding: "12px",
|
|
24072
24074
|
placeholder: getSelection(),
|
|
24073
|
-
required: options.required,
|
|
24075
|
+
required: options.required || isRequired,
|
|
24074
24076
|
role: "combobox",
|
|
24075
24077
|
themeValues: themeValues,
|
|
24076
24078
|
title: hasTitles ? getSelection() : null,
|
|
@@ -24238,7 +24240,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24238
24240
|
_ref$dataQa = _ref.dataQa,
|
|
24239
24241
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
24240
24242
|
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
24241
|
-
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions
|
|
24243
|
+
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
|
|
24244
|
+
_ref$isRequired = _ref.isRequired,
|
|
24245
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
24242
24246
|
|
|
24243
24247
|
var _useState = React.useState(false),
|
|
24244
24248
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24300,7 +24304,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24300
24304
|
},
|
|
24301
24305
|
disabled: disabled,
|
|
24302
24306
|
autocompleteValue: autocompleteValue,
|
|
24303
|
-
smoothScroll: smoothScroll
|
|
24307
|
+
smoothScroll: smoothScroll,
|
|
24308
|
+
isRequired: isRequired
|
|
24304
24309
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
24305
24310
|
direction: "row",
|
|
24306
24311
|
justify: "space-between"
|
|
@@ -25071,6 +25076,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25071
25076
|
fieldActions = _ref.fieldActions,
|
|
25072
25077
|
showErrors = _ref.showErrors,
|
|
25073
25078
|
onChange = _ref.onChange,
|
|
25079
|
+
_ref$isRequired = _ref.isRequired,
|
|
25080
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25074
25081
|
_ref$dataQa = _ref.dataQa,
|
|
25075
25082
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25076
25083
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
@@ -25082,7 +25089,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25082
25089
|
errorMessages: errorMessages,
|
|
25083
25090
|
showErrors: showErrors,
|
|
25084
25091
|
onChange: onChange,
|
|
25085
|
-
autocompleteValue: "country-name"
|
|
25092
|
+
autocompleteValue: "country-name",
|
|
25093
|
+
isRequired: isRequired
|
|
25086
25094
|
});
|
|
25087
25095
|
};
|
|
25088
25096
|
|
|
@@ -25929,7 +25937,7 @@ var fallbackValues$k = {
|
|
|
25929
25937
|
};
|
|
25930
25938
|
|
|
25931
25939
|
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"];
|
|
25940
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
|
|
25933
25941
|
var InputField = styled__default.input.withConfig({
|
|
25934
25942
|
displayName: "FormInput__InputField",
|
|
25935
25943
|
componentId: "sc-l094r1-0"
|
|
@@ -26016,6 +26024,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26016
26024
|
removeFromValue = _ref15.removeFromValue,
|
|
26017
26025
|
_ref15$dataQa = _ref15.dataQa,
|
|
26018
26026
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
26027
|
+
_ref15$isRequired = _ref15.isRequired,
|
|
26028
|
+
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
26019
26029
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
26020
26030
|
|
|
26021
26031
|
var _useState = React.useState(false),
|
|
@@ -26102,7 +26112,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26102
26112
|
$customHeight: customHeight,
|
|
26103
26113
|
$extraStyles: extraStyles,
|
|
26104
26114
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26105
|
-
autoComplete: autocompleteValue
|
|
26115
|
+
autoComplete: autocompleteValue,
|
|
26116
|
+
required: isRequired
|
|
26106
26117
|
}, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
|
|
26107
26118
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26108
26119
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26121,7 +26132,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26121
26132
|
$customHeight: customHeight,
|
|
26122
26133
|
$extraStyles: extraStyles,
|
|
26123
26134
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26124
|
-
autoComplete: autocompleteValue
|
|
26135
|
+
autoComplete: autocompleteValue,
|
|
26136
|
+
required: isRequired
|
|
26125
26137
|
}, props))), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26126
26138
|
direction: "row",
|
|
26127
26139
|
justify: "space-between",
|
|
@@ -27363,7 +27375,9 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27363
27375
|
_ref2$ariaLabelledBy = _ref2.ariaLabelledBy,
|
|
27364
27376
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27365
27377
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27366
|
-
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel
|
|
27378
|
+
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27379
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27380
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27367
27381
|
var buttonBorder = {
|
|
27368
27382
|
onFocused: {
|
|
27369
27383
|
borderColor: themeValues.activeColor,
|
|
@@ -27425,7 +27439,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27425
27439
|
disabled: disabled,
|
|
27426
27440
|
onClick: toggleRadio,
|
|
27427
27441
|
"aria-describedby": ariaDescribedBy,
|
|
27428
|
-
tabIndex: "-1"
|
|
27442
|
+
tabIndex: "-1",
|
|
27443
|
+
required: isRequired
|
|
27429
27444
|
}, extraProps)), /*#__PURE__*/React__default.createElement(Motion, {
|
|
27430
27445
|
borderWidth: "1px",
|
|
27431
27446
|
borderStyle: "solid",
|
|
@@ -38115,7 +38130,9 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38115
38130
|
field = _ref.field,
|
|
38116
38131
|
fieldActions = _ref.fieldActions,
|
|
38117
38132
|
showErrors = _ref.showErrors,
|
|
38118
|
-
countryCode = _ref.countryCode
|
|
38133
|
+
countryCode = _ref.countryCode,
|
|
38134
|
+
_ref$isRequired = _ref.isRequired,
|
|
38135
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
38119
38136
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38120
38137
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38121
38138
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
@@ -38125,7 +38142,8 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38125
38142
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38126
38143
|
errorMessages: errorMessages,
|
|
38127
38144
|
showErrors: showErrors,
|
|
38128
|
-
autocompleteValue: "address-level1"
|
|
38145
|
+
autocompleteValue: "address-level1",
|
|
38146
|
+
isRequired: isRequired
|
|
38129
38147
|
});
|
|
38130
38148
|
};
|
|
38131
38149
|
|
|
@@ -39464,7 +39482,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39464
39482
|
}
|
|
39465
39483
|
},
|
|
39466
39484
|
showErrors: showErrors,
|
|
39467
|
-
dataQa: "Country"
|
|
39485
|
+
dataQa: "Country",
|
|
39486
|
+
isRequired: true
|
|
39468
39487
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39469
39488
|
labelTextWhenNoError: "Address",
|
|
39470
39489
|
errorMessages: street1ErrorMessages,
|
|
@@ -39475,7 +39494,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39475
39494
|
return e.key === "Enter" && handleSubmit(e);
|
|
39476
39495
|
},
|
|
39477
39496
|
autocompleteValue: "address-line1",
|
|
39478
|
-
dataQa: "Address"
|
|
39497
|
+
dataQa: "Address",
|
|
39498
|
+
isRequired: true
|
|
39479
39499
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39480
39500
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39481
39501
|
field: fields.street2,
|
|
@@ -39496,7 +39516,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39496
39516
|
return e.key === "Enter" && handleSubmit(e);
|
|
39497
39517
|
},
|
|
39498
39518
|
autocompleteValue: "address-level2",
|
|
39499
|
-
dataQa: "City"
|
|
39519
|
+
dataQa: "City",
|
|
39520
|
+
isRequired: true
|
|
39500
39521
|
}), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
|
|
39501
39522
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39502
39523
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39507,7 +39528,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39507
39528
|
onKeyDown: function onKeyDown(e) {
|
|
39508
39529
|
return e.key === "Enter" && handleSubmit(e);
|
|
39509
39530
|
},
|
|
39510
|
-
dataQa: "State or Province"
|
|
39531
|
+
dataQa: "State or Province",
|
|
39532
|
+
isRequired: true
|
|
39511
39533
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39512
39534
|
isNum: isUS,
|
|
39513
39535
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39520,7 +39542,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39520
39542
|
return e.key === "Enter" && handleSubmit(e);
|
|
39521
39543
|
},
|
|
39522
39544
|
autocompleteValue: "postal-code",
|
|
39523
|
-
dataQa: "Zip code"
|
|
39545
|
+
dataQa: "Zip code",
|
|
39546
|
+
isRequired: true
|
|
39524
39547
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
39525
39548
|
name: "address checkbox",
|
|
39526
39549
|
title: "Save address to wallet",
|
|
@@ -40423,7 +40446,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40423
40446
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40424
40447
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40425
40448
|
saveToWallet = _ref.saveToWallet,
|
|
40426
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40449
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40450
|
+
_ref$isRequired = _ref.isRequired,
|
|
40451
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40427
40452
|
|
|
40428
40453
|
if (clearOnDismount) {
|
|
40429
40454
|
React.useEffect(function () {
|
|
@@ -40452,7 +40477,8 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40452
40477
|
},
|
|
40453
40478
|
isEmail: true,
|
|
40454
40479
|
autocompleteValue: "email",
|
|
40455
|
-
dataQa: "Email address"
|
|
40480
|
+
dataQa: "Email address",
|
|
40481
|
+
isRequired: isRequired
|
|
40456
40482
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
40457
40483
|
name: "email checkbox",
|
|
40458
40484
|
title: "Save email address to wallet",
|
|
@@ -47987,7 +48013,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47987
48013
|
onKeyDown: function onKeyDown(e) {
|
|
47988
48014
|
return e.key === "Enter" && handleSubmit(e);
|
|
47989
48015
|
},
|
|
47990
|
-
autocompleteValue: "name"
|
|
48016
|
+
autocompleteValue: "name",
|
|
48017
|
+
isRequired: true
|
|
47991
48018
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
47992
48019
|
labelTextWhenNoError: "Routing number",
|
|
47993
48020
|
dataQa: "Routing number",
|
|
@@ -48009,7 +48036,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48009
48036
|
},
|
|
48010
48037
|
onKeyDown: function onKeyDown(e) {
|
|
48011
48038
|
return e.key === "Enter" && handleSubmit(e);
|
|
48012
|
-
}
|
|
48039
|
+
},
|
|
48040
|
+
isRequired: true
|
|
48013
48041
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48014
48042
|
labelTextWhenNoError: "Confirm routing number",
|
|
48015
48043
|
dataQa: "Confirm routing number",
|
|
@@ -48020,7 +48048,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48020
48048
|
onKeyDown: function onKeyDown(e) {
|
|
48021
48049
|
return e.key === "Enter" && handleSubmit(e);
|
|
48022
48050
|
},
|
|
48023
|
-
isNum: true
|
|
48051
|
+
isNum: true,
|
|
48052
|
+
isRequired: true
|
|
48024
48053
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48025
48054
|
labelTextWhenNoError: "Account number",
|
|
48026
48055
|
dataQa: "Account number",
|
|
@@ -48042,7 +48071,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48042
48071
|
},
|
|
48043
48072
|
onKeyDown: function onKeyDown(e) {
|
|
48044
48073
|
return e.key === "Enter" && handleSubmit(e);
|
|
48045
|
-
}
|
|
48074
|
+
},
|
|
48075
|
+
isRequired: true
|
|
48046
48076
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48047
48077
|
labelTextWhenNoError: "Confirm account number",
|
|
48048
48078
|
dataQa: "Confirm account number",
|
|
@@ -48053,6 +48083,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48053
48083
|
onKeyDown: function onKeyDown(e) {
|
|
48054
48084
|
return e.key === "Enter" && handleSubmit(e);
|
|
48055
48085
|
},
|
|
48086
|
+
isRequired: true,
|
|
48056
48087
|
isNum: true
|
|
48057
48088
|
}), allowBankAccountType && /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
48058
48089
|
labelTextWhenNoError: "Account type",
|
|
@@ -48070,7 +48101,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48070
48101
|
fieldActions: actions.fields.accountType,
|
|
48071
48102
|
showErrors: showErrors,
|
|
48072
48103
|
errorMessages: accountTypeErrors,
|
|
48073
|
-
field: fields.accountType
|
|
48104
|
+
field: fields.accountType,
|
|
48105
|
+
isRequired: true
|
|
48074
48106
|
}), !hideDefaultPayment && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48075
48107
|
title: "Save as Default Payment Method",
|
|
48076
48108
|
dataQa: "default-payment-ach",
|
|
@@ -48208,7 +48240,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48208
48240
|
onKeyDown: function onKeyDown(e) {
|
|
48209
48241
|
return e.key === "Enter" && handleSubmit(e);
|
|
48210
48242
|
},
|
|
48211
|
-
autocompleteValue: "cc-name"
|
|
48243
|
+
autocompleteValue: "cc-name",
|
|
48244
|
+
isRequired: true
|
|
48212
48245
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48213
48246
|
labelTextWhenNoError: "Credit card number",
|
|
48214
48247
|
dataQa: "Credit card number",
|
|
@@ -48221,7 +48254,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48221
48254
|
return e.key === "Enter" && handleSubmit(e);
|
|
48222
48255
|
},
|
|
48223
48256
|
isNum: true,
|
|
48224
|
-
autocompleteValue: "cc-number"
|
|
48257
|
+
autocompleteValue: "cc-number",
|
|
48258
|
+
isRequired: true
|
|
48225
48259
|
}), /*#__PURE__*/React__default.createElement(FormInputRow, {
|
|
48226
48260
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48227
48261
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48239,7 +48273,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48239
48273
|
isNum: true,
|
|
48240
48274
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48241
48275
|
,
|
|
48242
|
-
autocompleteValue: "cc-exp"
|
|
48276
|
+
autocompleteValue: "cc-exp",
|
|
48277
|
+
isRequired: true
|
|
48243
48278
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48244
48279
|
labelTextWhenNoError: "CVV",
|
|
48245
48280
|
dataQa: "CVV",
|
|
@@ -48252,7 +48287,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48252
48287
|
onKeyDown: function onKeyDown(e) {
|
|
48253
48288
|
return e.key === "Enter" && handleSubmit(e);
|
|
48254
48289
|
},
|
|
48255
|
-
autocompleteValue: "cc-csc"
|
|
48290
|
+
autocompleteValue: "cc-csc",
|
|
48291
|
+
isRequired: true
|
|
48256
48292
|
})), !hideZipCode && /*#__PURE__*/React__default.createElement(Box, {
|
|
48257
48293
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48258
48294
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48268,7 +48304,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48268
48304
|
onKeyDown: function onKeyDown(e) {
|
|
48269
48305
|
return e.key === "Enter" && handleSubmit(e);
|
|
48270
48306
|
},
|
|
48271
|
-
autocompleteValue: "billing postal-code"
|
|
48307
|
+
autocompleteValue: "billing postal-code",
|
|
48308
|
+
isRequired: true
|
|
48272
48309
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48273
48310
|
childGap: "4px",
|
|
48274
48311
|
align: "center"
|
|
@@ -48461,7 +48498,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48461
48498
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48462
48499
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48463
48500
|
saveToWallet = _ref.saveToWallet,
|
|
48464
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48501
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48502
|
+
_ref$isRequired = _ref.isRequired,
|
|
48503
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48465
48504
|
|
|
48466
48505
|
if (clearOnDismount) {
|
|
48467
48506
|
React.useEffect(function () {
|
|
@@ -48488,7 +48527,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48488
48527
|
},
|
|
48489
48528
|
autocompleteValue: "tel-national",
|
|
48490
48529
|
dataQa: "Phone number",
|
|
48491
|
-
isNum: true
|
|
48530
|
+
isNum: true,
|
|
48531
|
+
isRequired: isRequired
|
|
48492
48532
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48493
48533
|
name: "phone checkbox",
|
|
48494
48534
|
title: "Save phone number to wallet",
|
|
@@ -48621,7 +48661,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48621
48661
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48622
48662
|
_ref$containerStyles = _ref.containerStyles,
|
|
48623
48663
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48624
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48664
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48665
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48666
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48625
48667
|
|
|
48626
48668
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48627
48669
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48677,7 +48719,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48677
48719
|
extraStyles: containerStyles
|
|
48678
48720
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48679
48721
|
childGap: "0",
|
|
48680
|
-
role: "radiogroup"
|
|
48722
|
+
"aria-role": "radiogroup",
|
|
48723
|
+
"aria-required": isSectionRequired
|
|
48681
48724
|
}, sections.filter(function (section) {
|
|
48682
48725
|
return !section.hidden;
|
|
48683
48726
|
}).map(function (section) {
|
|
@@ -48699,7 +48742,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48699
48742
|
extraStyles: borderStyles,
|
|
48700
48743
|
role: "radio",
|
|
48701
48744
|
"aria-checked": openSection === section.id,
|
|
48702
|
-
"aria-disabled": section.disabled
|
|
48745
|
+
"aria-disabled": section.disabled,
|
|
48746
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48703
48747
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48704
48748
|
childGap: "0"
|
|
48705
48749
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48737,7 +48781,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48737
48781
|
toggleRadio: section.disabled ? noop : function () {
|
|
48738
48782
|
return toggleOpenSection(section.id);
|
|
48739
48783
|
},
|
|
48740
|
-
tabIndex: "-1"
|
|
48784
|
+
tabIndex: "-1",
|
|
48785
|
+
isRequired: section === null || section === void 0 ? void 0 : section.required
|
|
48741
48786
|
})), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48742
48787
|
align: "center"
|
|
48743
48788
|
}, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {
|