@thecb/components 9.2.3-beta.3 → 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 +54 -66
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +54 -66
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.js +1 -3
- package/src/components/atoms/checkbox/Checkbox.stories.js +2 -3
- package/src/components/atoms/country-dropdown/CountryDropdown.js +2 -2
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +0 -1
- package/src/components/atoms/dropdown/Dropdown.js +5 -8
- package/src/components/atoms/form-select/FormSelect.js +9 -20
- package/src/components/atoms/form-select/FormSelect.stories.js +2 -2
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.js +6 -9
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +0 -1
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +0 -1
- package/src/components/molecules/address-form/AddressForm.js +1 -2
- package/src/components/molecules/email-form/EmailForm.js +3 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +4 -4
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +1 -2
- package/src/components/molecules/phone-form/PhoneForm.js +3 -1
- package/src/components/molecules/radio-group/RadioGroup.js +1 -1
- package/src/components/molecules/radio-section/RadioSection.js +9 -3
- package/src/components/molecules/radio-section/RadioSection.stories.js +1 -0
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +2 -3
package/dist/index.esm.js
CHANGED
|
@@ -22126,9 +22126,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22126
22126
|
extraStyles = _ref4.extraStyles,
|
|
22127
22127
|
textExtraStyles = _ref4.textExtraStyles,
|
|
22128
22128
|
_ref4$dataQa = _ref4.dataQa,
|
|
22129
|
-
dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa
|
|
22130
|
-
_ref4$isRequired = _ref4.isRequired,
|
|
22131
|
-
isRequired = _ref4$isRequired === void 0 ? false : _ref4$isRequired;
|
|
22129
|
+
dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa;
|
|
22132
22130
|
|
|
22133
22131
|
var _useState = useState(false),
|
|
22134
22132
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -22182,8 +22180,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22182
22180
|
errorStyles: themeValues.errorStyles,
|
|
22183
22181
|
disabledStyles: themeValues.disabledStyles,
|
|
22184
22182
|
disabledCheckedStyles: themeValues.disabledCheckedStyles,
|
|
22185
|
-
focusedStyles: themeValues.focusedStyles
|
|
22186
|
-
"aria-required": isRequired
|
|
22183
|
+
focusedStyles: themeValues.focusedStyles
|
|
22187
22184
|
}, /*#__PURE__*/React.createElement(CheckboxIcon, {
|
|
22188
22185
|
viewBox: "0 0 24 24",
|
|
22189
22186
|
disabled: disabled,
|
|
@@ -23798,8 +23795,6 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23798
23795
|
_ref13$isRequired = _ref13.isRequired,
|
|
23799
23796
|
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
|
|
23800
23797
|
|
|
23801
|
-
var required = options.required || isRequired;
|
|
23802
|
-
|
|
23803
23798
|
var _useState = useState(""),
|
|
23804
23799
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23805
23800
|
inputValue = _useState2[0],
|
|
@@ -23991,11 +23986,11 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23991
23986
|
clearTimeout(timer);
|
|
23992
23987
|
setTimer(setTimeout(function () {
|
|
23993
23988
|
return setInputValue("");
|
|
23994
|
-
},
|
|
23989
|
+
}, 20000));
|
|
23995
23990
|
}
|
|
23996
23991
|
|
|
23997
23992
|
setFilteredOptions(options.filter(function (option) {
|
|
23998
|
-
return option.value.toLowerCase().
|
|
23993
|
+
return option.value.toLowerCase().match(inputValue.toLowerCase()) || option.text.toLowerCase().match(inputValue.toLowerCase());
|
|
23999
23994
|
}));
|
|
24000
23995
|
}, [inputValue]);
|
|
24001
23996
|
useEffect$1(function () {
|
|
@@ -24047,7 +24042,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24047
24042
|
"aria-labelledby": ariaLabelledby,
|
|
24048
24043
|
"aria-describedby": ariaDescribedby,
|
|
24049
24044
|
"aria-expanded": isOpen,
|
|
24050
|
-
"aria-required": required,
|
|
24045
|
+
"aria-required": options.required,
|
|
24051
24046
|
"aria-invalid": ariaInvalid,
|
|
24052
24047
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
24053
24048
|
borderRadius: "2px",
|
|
@@ -24069,6 +24064,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24069
24064
|
},
|
|
24070
24065
|
padding: "12px",
|
|
24071
24066
|
placeholder: getSelection(),
|
|
24067
|
+
required: options.required || isRequired,
|
|
24072
24068
|
role: "combobox",
|
|
24073
24069
|
themeValues: themeValues,
|
|
24074
24070
|
title: hasTitles ? getSelection() : null,
|
|
@@ -24076,9 +24072,6 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24076
24072
|
tabIndex: 0,
|
|
24077
24073
|
value: inputValue,
|
|
24078
24074
|
width: "100%"
|
|
24079
|
-
/* Non-semantic elements need the aria-* version of the attribute */
|
|
24080
|
-
,
|
|
24081
|
-
"aria-disabled": disabledValues.includes(inputValue)
|
|
24082
24075
|
}), /*#__PURE__*/React.createElement(IconWrapper, {
|
|
24083
24076
|
open: isOpen,
|
|
24084
24077
|
onClick: _onClick
|
|
@@ -24089,8 +24082,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24089
24082
|
widthFitOptions: widthFitOptions,
|
|
24090
24083
|
tabIndex: 0,
|
|
24091
24084
|
role: "listbox",
|
|
24092
|
-
id: "".concat(ariaLabelledby, "_listbox")
|
|
24093
|
-
required: required
|
|
24085
|
+
id: "".concat(ariaLabelledby, "_listbox")
|
|
24094
24086
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
24095
24087
|
childGap: "0",
|
|
24096
24088
|
as: "ul"
|
|
@@ -24250,17 +24242,6 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24250
24242
|
setOpen = _useState2[1];
|
|
24251
24243
|
|
|
24252
24244
|
var dropdownRef = useRef(null);
|
|
24253
|
-
var required = (options === null || options === void 0 ? void 0 : options.required) || isRequired;
|
|
24254
|
-
var labelId = useMemo(function () {
|
|
24255
|
-
return function (labelTextWhenNoError) {
|
|
24256
|
-
return createIdFromString(labelTextWhenNoError);
|
|
24257
|
-
};
|
|
24258
|
-
}, [labelTextWhenNoError]);
|
|
24259
|
-
var descriptionId = useMemo(function () {
|
|
24260
|
-
return function (field, labelTextWhenNoError) {
|
|
24261
|
-
return field.hasErrors && field.dirty ? labelId(labelTextWhenNoError) + "error-message" : "";
|
|
24262
|
-
};
|
|
24263
|
-
}, [field, labelTextWhenNoError]);
|
|
24264
24245
|
|
|
24265
24246
|
var handleClickAway = function handleClickAway(event) {
|
|
24266
24247
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
@@ -24276,8 +24257,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24276
24257
|
});
|
|
24277
24258
|
return /*#__PURE__*/React.createElement(SelectContainer, {
|
|
24278
24259
|
ref: dropdownRef,
|
|
24279
|
-
"aria-role": "group",
|
|
24280
24260
|
disabled: disabled,
|
|
24261
|
+
"aria-disabled": disabled,
|
|
24281
24262
|
"data-qa": dataQa
|
|
24282
24263
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
24283
24264
|
padding: "0",
|
|
@@ -24291,10 +24272,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24291
24272
|
color: themeValues.labelColor,
|
|
24292
24273
|
weight: themeValues.fontWeight,
|
|
24293
24274
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
24294
|
-
id:
|
|
24275
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
24295
24276
|
}, labelTextWhenNoError))), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
24296
|
-
ariaLabelledby:
|
|
24297
|
-
ariaDescribedby:
|
|
24277
|
+
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24278
|
+
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24298
24279
|
maxHeight: dropdownMaxHeight,
|
|
24299
24280
|
widthFitOptions: widthFitOptions,
|
|
24300
24281
|
hasTitles: hasTitles,
|
|
@@ -24316,7 +24297,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24316
24297
|
disabled: disabled,
|
|
24317
24298
|
autocompleteValue: autocompleteValue,
|
|
24318
24299
|
smoothScroll: smoothScroll,
|
|
24319
|
-
isRequired:
|
|
24300
|
+
isRequired: isRequired
|
|
24320
24301
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
24321
24302
|
direction: "row",
|
|
24322
24303
|
justify: "space-between"
|
|
@@ -25087,10 +25068,10 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25087
25068
|
fieldActions = _ref.fieldActions,
|
|
25088
25069
|
showErrors = _ref.showErrors,
|
|
25089
25070
|
onChange = _ref.onChange,
|
|
25090
|
-
_ref$dataQa = _ref.dataQa,
|
|
25091
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
25092
25071
|
_ref$isRequired = _ref.isRequired,
|
|
25093
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired
|
|
25072
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25073
|
+
_ref$dataQa = _ref.dataQa,
|
|
25074
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25094
25075
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
25095
25076
|
options: options,
|
|
25096
25077
|
field: field,
|
|
@@ -27277,7 +27258,7 @@ var HiddenRadioInput = styled.input.withConfig({
|
|
|
27277
27258
|
var Circle = styled.div.withConfig({
|
|
27278
27259
|
displayName: "RadioButtonWithLabel__Circle",
|
|
27279
27260
|
componentId: "sc-1m9whwg-1"
|
|
27280
|
-
})(["flex-shrink:0;margin-right:8px;width:1.5rem;height
|
|
27261
|
+
})(["flex-shrink:0;margin-right:8px;width:1.5rem;height 1.5rem;border:", ";border-radius:50%;box-sizing:border-box;padding:2px;:after{content:\"\";width:100%;height:100%;display:block;background:", ";border-radius:50%;transform:scale(0);}"], function (_ref) {
|
|
27281
27262
|
var inactiveBorderColor = _ref.inactiveBorderColor;
|
|
27282
27263
|
return "1px solid ".concat(inactiveBorderColor);
|
|
27283
27264
|
}, function (_ref2) {
|
|
@@ -27287,12 +27268,12 @@ var Circle = styled.div.withConfig({
|
|
|
27287
27268
|
var InputAndLabelContainer = styled(Cluster).withConfig({
|
|
27288
27269
|
displayName: "RadioButtonWithLabel__InputAndLabelContainer",
|
|
27289
27270
|
componentId: "sc-1m9whwg-2"
|
|
27290
|
-
})(["overflow:visible;", ":checked + label ", ":after{transform:scale(0.85);transition:transform 0.15s;}", ":checked + label ", "{border:", "
|
|
27271
|
+
})(["overflow:visible;", ":checked + label ", ":after{transform:scale(0.85);transition:transform 0.15s;}", ":checked + label ", "{border:", "}", ":focus + label ", "{{box-shadow:", "}"], HiddenRadioInput, Circle, HiddenRadioInput, Circle, function (_ref3) {
|
|
27291
27272
|
var activeColor = _ref3.activeColor;
|
|
27292
|
-
return "1px solid "
|
|
27273
|
+
return "1px solid ".concat(activeColor, ";");
|
|
27293
27274
|
}, HiddenRadioInput, Circle, function (_ref4) {
|
|
27294
27275
|
var activeColor = _ref4.activeColor;
|
|
27295
|
-
return "0px 0px 2px 1px "
|
|
27276
|
+
return "0px 0px 2px 1px ".concat(activeColor, ";");
|
|
27296
27277
|
});
|
|
27297
27278
|
|
|
27298
27279
|
var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
@@ -27387,8 +27368,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27387
27368
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27388
27369
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27389
27370
|
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27390
|
-
_ref2$
|
|
27391
|
-
|
|
27371
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27372
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27392
27373
|
var buttonBorder = {
|
|
27393
27374
|
onFocused: {
|
|
27394
27375
|
borderColor: themeValues.activeColor,
|
|
@@ -27448,11 +27429,10 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27448
27429
|
type: "radio",
|
|
27449
27430
|
id: "radio-".concat(name),
|
|
27450
27431
|
disabled: disabled,
|
|
27451
|
-
required: required,
|
|
27452
|
-
"aria-required": required,
|
|
27453
27432
|
onClick: toggleRadio,
|
|
27454
27433
|
"aria-describedby": ariaDescribedBy,
|
|
27455
|
-
tabIndex: "-1"
|
|
27434
|
+
tabIndex: "-1",
|
|
27435
|
+
required: isRequired
|
|
27456
27436
|
}, extraProps)), /*#__PURE__*/React.createElement(Motion, {
|
|
27457
27437
|
borderWidth: "1px",
|
|
27458
27438
|
borderStyle: "solid",
|
|
@@ -39481,7 +39461,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39481
39461
|
labelTextWhenNoError: "Country",
|
|
39482
39462
|
errorMessages: countryErrorMessages,
|
|
39483
39463
|
field: fields.country,
|
|
39484
|
-
isRequired: true,
|
|
39485
39464
|
onChange: function onChange(value) {
|
|
39486
39465
|
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39487
39466
|
// we can write a reset function for fields
|
|
@@ -39495,7 +39474,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39495
39474
|
}
|
|
39496
39475
|
},
|
|
39497
39476
|
showErrors: showErrors,
|
|
39498
|
-
dataQa: "Country"
|
|
39477
|
+
dataQa: "Country",
|
|
39478
|
+
isRequired: true
|
|
39499
39479
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39500
39480
|
labelTextWhenNoError: "Address",
|
|
39501
39481
|
errorMessages: street1ErrorMessages,
|
|
@@ -39517,8 +39497,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39517
39497
|
return e.key === "Enter" && handleSubmit(e);
|
|
39518
39498
|
},
|
|
39519
39499
|
autocompleteValue: "address-line2",
|
|
39520
|
-
dataQa: "Address Line 2"
|
|
39521
|
-
isRequired: false
|
|
39500
|
+
dataQa: "Address Line 2"
|
|
39522
39501
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39523
39502
|
labelTextWhenNoError: "City",
|
|
39524
39503
|
errorMessages: cityErrorMessages,
|
|
@@ -40459,7 +40438,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40459
40438
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40460
40439
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40461
40440
|
saveToWallet = _ref.saveToWallet,
|
|
40462
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40441
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40442
|
+
_ref$isRequired = _ref.isRequired,
|
|
40443
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40463
40444
|
|
|
40464
40445
|
if (clearOnDismount) {
|
|
40465
40446
|
useEffect$1(function () {
|
|
@@ -40488,7 +40469,8 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40488
40469
|
},
|
|
40489
40470
|
isEmail: true,
|
|
40490
40471
|
autocompleteValue: "email",
|
|
40491
|
-
dataQa: "Email address"
|
|
40472
|
+
dataQa: "Email address",
|
|
40473
|
+
isRequired: isRequired
|
|
40492
40474
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
40493
40475
|
name: "email checkbox",
|
|
40494
40476
|
title: "Save email address to wallet",
|
|
@@ -48058,8 +48040,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48058
48040
|
onKeyDown: function onKeyDown(e) {
|
|
48059
48041
|
return e.key === "Enter" && handleSubmit(e);
|
|
48060
48042
|
},
|
|
48061
|
-
|
|
48062
|
-
|
|
48043
|
+
isNum: true,
|
|
48044
|
+
isRequired: true
|
|
48063
48045
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48064
48046
|
labelTextWhenNoError: "Account number",
|
|
48065
48047
|
dataQa: "Account number",
|
|
@@ -48067,7 +48049,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48067
48049
|
field: fields.accountNumber,
|
|
48068
48050
|
fieldActions: actions.fields.accountNumber,
|
|
48069
48051
|
showErrors: showErrors,
|
|
48070
|
-
isRequired: true,
|
|
48071
48052
|
isNum: true,
|
|
48072
48053
|
helperModal: function helperModal() {
|
|
48073
48054
|
return /*#__PURE__*/React.createElement(AccountAndRoutingModal$1, {
|
|
@@ -48082,11 +48063,11 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48082
48063
|
},
|
|
48083
48064
|
onKeyDown: function onKeyDown(e) {
|
|
48084
48065
|
return e.key === "Enter" && handleSubmit(e);
|
|
48085
|
-
}
|
|
48066
|
+
},
|
|
48067
|
+
isRequired: true
|
|
48086
48068
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48087
48069
|
labelTextWhenNoError: "Confirm account number",
|
|
48088
48070
|
dataQa: "Confirm account number",
|
|
48089
|
-
isRequired: true,
|
|
48090
48071
|
errorMessages: confirmAccountNumberErrors,
|
|
48091
48072
|
field: fields.confirmAccountNumber,
|
|
48092
48073
|
fieldActions: actions.fields.confirmAccountNumber,
|
|
@@ -48094,10 +48075,10 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48094
48075
|
onKeyDown: function onKeyDown(e) {
|
|
48095
48076
|
return e.key === "Enter" && handleSubmit(e);
|
|
48096
48077
|
},
|
|
48078
|
+
isRequired: true,
|
|
48097
48079
|
isNum: true
|
|
48098
48080
|
}), allowBankAccountType && /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
48099
48081
|
labelTextWhenNoError: "Account type",
|
|
48100
|
-
isRequired: true,
|
|
48101
48082
|
dataQa: "Account type",
|
|
48102
48083
|
options: [{
|
|
48103
48084
|
text: "Select account type",
|
|
@@ -48112,7 +48093,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48112
48093
|
fieldActions: actions.fields.accountType,
|
|
48113
48094
|
showErrors: showErrors,
|
|
48114
48095
|
errorMessages: accountTypeErrors,
|
|
48115
|
-
field: fields.accountType
|
|
48096
|
+
field: fields.accountType,
|
|
48097
|
+
isRequired: true
|
|
48116
48098
|
}), !hideDefaultPayment && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48117
48099
|
title: "Save as Default Payment Method",
|
|
48118
48100
|
dataQa: "default-payment-ach",
|
|
@@ -48228,7 +48210,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48228
48210
|
"aria-label": "Card payment"
|
|
48229
48211
|
}, /*#__PURE__*/React.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React.createElement(CountryDropdown, {
|
|
48230
48212
|
labelTextWhenNoError: "Country",
|
|
48231
|
-
isRequired: true,
|
|
48232
48213
|
errorMessages: countryErrorMessages,
|
|
48233
48214
|
field: fields.country,
|
|
48234
48215
|
onChange: function onChange(value) {
|
|
@@ -48254,7 +48235,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48254
48235
|
autocompleteValue: "cc-name",
|
|
48255
48236
|
isRequired: true
|
|
48256
48237
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48257
|
-
isRequired: true,
|
|
48258
48238
|
labelTextWhenNoError: "Credit card number",
|
|
48259
48239
|
dataQa: "Credit card number",
|
|
48260
48240
|
errorMessages: creditCardNumberErrors,
|
|
@@ -48266,7 +48246,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48266
48246
|
return e.key === "Enter" && handleSubmit(e);
|
|
48267
48247
|
},
|
|
48268
48248
|
isNum: true,
|
|
48269
|
-
autocompleteValue: "cc-number"
|
|
48249
|
+
autocompleteValue: "cc-number",
|
|
48250
|
+
isRequired: true
|
|
48270
48251
|
}), /*#__PURE__*/React.createElement(FormInputRow, {
|
|
48271
48252
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48272
48253
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48509,7 +48490,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48509
48490
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48510
48491
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48511
48492
|
saveToWallet = _ref.saveToWallet,
|
|
48512
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48493
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48494
|
+
_ref$isRequired = _ref.isRequired,
|
|
48495
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48513
48496
|
|
|
48514
48497
|
if (clearOnDismount) {
|
|
48515
48498
|
useEffect$1(function () {
|
|
@@ -48536,7 +48519,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48536
48519
|
},
|
|
48537
48520
|
autocompleteValue: "tel-national",
|
|
48538
48521
|
dataQa: "Phone number",
|
|
48539
|
-
isNum: true
|
|
48522
|
+
isNum: true,
|
|
48523
|
+
isRequired: isRequired
|
|
48540
48524
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48541
48525
|
name: "phone checkbox",
|
|
48542
48526
|
title: "Save phone number to wallet",
|
|
@@ -48564,7 +48548,7 @@ PhoneForm.mapDispatchToProps = mapDispatchToProps$8;
|
|
|
48564
48548
|
var DefaultHeading = styled.div.withConfig({
|
|
48565
48549
|
displayName: "RadioGroup__DefaultHeading",
|
|
48566
48550
|
componentId: "sc-7lqrl8-0"
|
|
48567
|
-
})(["font-size:0.875rem;color:", "
|
|
48551
|
+
})(["font-size:0.875rem;color:", " margin:0;padding:8px 0px;"], CHARADE_GREY);
|
|
48568
48552
|
var StyledFieldset = styled.fieldset.withConfig({
|
|
48569
48553
|
displayName: "RadioGroup__StyledFieldset",
|
|
48570
48554
|
componentId: "sc-7lqrl8-1"
|
|
@@ -48669,7 +48653,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48669
48653
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48670
48654
|
_ref$containerStyles = _ref.containerStyles,
|
|
48671
48655
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48672
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48656
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48657
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48658
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48673
48659
|
|
|
48674
48660
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48675
48661
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48725,7 +48711,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48725
48711
|
extraStyles: containerStyles
|
|
48726
48712
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48727
48713
|
childGap: "0",
|
|
48728
|
-
role: "radiogroup"
|
|
48714
|
+
"aria-role": "radiogroup",
|
|
48715
|
+
"aria-required": isSectionRequired
|
|
48729
48716
|
}, sections.filter(function (section) {
|
|
48730
48717
|
return !section.hidden;
|
|
48731
48718
|
}).map(function (section) {
|
|
@@ -48747,7 +48734,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48747
48734
|
extraStyles: borderStyles,
|
|
48748
48735
|
role: "radio",
|
|
48749
48736
|
"aria-checked": openSection === section.id,
|
|
48750
|
-
"aria-disabled": section.disabled
|
|
48737
|
+
"aria-disabled": section.disabled,
|
|
48738
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48751
48739
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48752
48740
|
childGap: "0"
|
|
48753
48741
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48786,7 +48774,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48786
48774
|
return toggleOpenSection(section.id);
|
|
48787
48775
|
},
|
|
48788
48776
|
tabIndex: "-1",
|
|
48789
|
-
|
|
48777
|
+
isRequired: section === null || section === void 0 ? void 0 : section.required
|
|
48790
48778
|
})), section.titleIcon && /*#__PURE__*/React.createElement(Cluster, {
|
|
48791
48779
|
align: "center"
|
|
48792
48780
|
}, section.titleIcon), /*#__PURE__*/React.createElement(Box, {
|