@thecb/components 9.2.4-beta.2 → 9.2.4-beta.20
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 +61 -78
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +61 -78
- 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 +7 -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 +7 -12
- 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 +2 -5
- package/src/components/molecules/radio-group/RadioGroup.stories.js +0 -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,13 @@ 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
|
-
|
|
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;
|
|
23999
23996
|
}));
|
|
24000
23997
|
}, [inputValue]);
|
|
24001
23998
|
useEffect$1(function () {
|
|
@@ -24047,7 +24044,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24047
24044
|
"aria-labelledby": ariaLabelledby,
|
|
24048
24045
|
"aria-describedby": ariaDescribedby,
|
|
24049
24046
|
"aria-expanded": isOpen,
|
|
24050
|
-
"aria-required": required,
|
|
24047
|
+
"aria-required": options.required,
|
|
24051
24048
|
"aria-invalid": ariaInvalid,
|
|
24052
24049
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
24053
24050
|
borderRadius: "2px",
|
|
@@ -24069,6 +24066,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24069
24066
|
},
|
|
24070
24067
|
padding: "12px",
|
|
24071
24068
|
placeholder: getSelection(),
|
|
24069
|
+
required: options.required || isRequired,
|
|
24072
24070
|
role: "combobox",
|
|
24073
24071
|
themeValues: themeValues,
|
|
24074
24072
|
title: hasTitles ? getSelection() : null,
|
|
@@ -24076,9 +24074,6 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24076
24074
|
tabIndex: 0,
|
|
24077
24075
|
value: inputValue,
|
|
24078
24076
|
width: "100%"
|
|
24079
|
-
/* Non-semantic elements need the aria-* version of the attribute */
|
|
24080
|
-
,
|
|
24081
|
-
"aria-disabled": disabledValues.includes(inputValue)
|
|
24082
24077
|
}), /*#__PURE__*/React.createElement(IconWrapper, {
|
|
24083
24078
|
open: isOpen,
|
|
24084
24079
|
onClick: _onClick
|
|
@@ -24089,8 +24084,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24089
24084
|
widthFitOptions: widthFitOptions,
|
|
24090
24085
|
tabIndex: 0,
|
|
24091
24086
|
role: "listbox",
|
|
24092
|
-
id: "".concat(ariaLabelledby, "_listbox")
|
|
24093
|
-
required: required
|
|
24087
|
+
id: "".concat(ariaLabelledby, "_listbox")
|
|
24094
24088
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
24095
24089
|
childGap: "0",
|
|
24096
24090
|
as: "ul"
|
|
@@ -24250,17 +24244,6 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24250
24244
|
setOpen = _useState2[1];
|
|
24251
24245
|
|
|
24252
24246
|
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
24247
|
|
|
24265
24248
|
var handleClickAway = function handleClickAway(event) {
|
|
24266
24249
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
@@ -24276,8 +24259,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24276
24259
|
});
|
|
24277
24260
|
return /*#__PURE__*/React.createElement(SelectContainer, {
|
|
24278
24261
|
ref: dropdownRef,
|
|
24279
|
-
"aria-role": "group",
|
|
24280
24262
|
disabled: disabled,
|
|
24263
|
+
"aria-disabled": disabled,
|
|
24281
24264
|
"data-qa": dataQa
|
|
24282
24265
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
24283
24266
|
padding: "0",
|
|
@@ -24291,10 +24274,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24291
24274
|
color: themeValues.labelColor,
|
|
24292
24275
|
weight: themeValues.fontWeight,
|
|
24293
24276
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
24294
|
-
id:
|
|
24277
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
24295
24278
|
}, labelTextWhenNoError))), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
24296
|
-
ariaLabelledby:
|
|
24297
|
-
ariaDescribedby:
|
|
24279
|
+
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24280
|
+
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24298
24281
|
maxHeight: dropdownMaxHeight,
|
|
24299
24282
|
widthFitOptions: widthFitOptions,
|
|
24300
24283
|
hasTitles: hasTitles,
|
|
@@ -24316,7 +24299,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24316
24299
|
disabled: disabled,
|
|
24317
24300
|
autocompleteValue: autocompleteValue,
|
|
24318
24301
|
smoothScroll: smoothScroll,
|
|
24319
|
-
isRequired:
|
|
24302
|
+
isRequired: isRequired
|
|
24320
24303
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
24321
24304
|
direction: "row",
|
|
24322
24305
|
justify: "space-between"
|
|
@@ -25087,10 +25070,10 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25087
25070
|
fieldActions = _ref.fieldActions,
|
|
25088
25071
|
showErrors = _ref.showErrors,
|
|
25089
25072
|
onChange = _ref.onChange,
|
|
25090
|
-
_ref$dataQa = _ref.dataQa,
|
|
25091
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
25092
25073
|
_ref$isRequired = _ref.isRequired,
|
|
25093
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired
|
|
25074
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25075
|
+
_ref$dataQa = _ref.dataQa,
|
|
25076
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25094
25077
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
25095
25078
|
options: options,
|
|
25096
25079
|
field: field,
|
|
@@ -27277,7 +27260,7 @@ var HiddenRadioInput = styled.input.withConfig({
|
|
|
27277
27260
|
var Circle = styled.div.withConfig({
|
|
27278
27261
|
displayName: "RadioButtonWithLabel__Circle",
|
|
27279
27262
|
componentId: "sc-1m9whwg-1"
|
|
27280
|
-
})(["flex-shrink:0;margin-right:8px;width:1.5rem;height
|
|
27263
|
+
})(["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
27264
|
var inactiveBorderColor = _ref.inactiveBorderColor;
|
|
27282
27265
|
return "1px solid ".concat(inactiveBorderColor);
|
|
27283
27266
|
}, function (_ref2) {
|
|
@@ -27287,12 +27270,12 @@ var Circle = styled.div.withConfig({
|
|
|
27287
27270
|
var InputAndLabelContainer = styled(Cluster).withConfig({
|
|
27288
27271
|
displayName: "RadioButtonWithLabel__InputAndLabelContainer",
|
|
27289
27272
|
componentId: "sc-1m9whwg-2"
|
|
27290
|
-
})(["overflow:visible;", ":checked + label ", ":after{transform:scale(0.85);transition:transform 0.15s;}", ":checked + label ", "{border:", "
|
|
27273
|
+
})(["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
27274
|
var activeColor = _ref3.activeColor;
|
|
27292
|
-
return "1px solid "
|
|
27275
|
+
return "1px solid ".concat(activeColor, ";");
|
|
27293
27276
|
}, HiddenRadioInput, Circle, function (_ref4) {
|
|
27294
27277
|
var activeColor = _ref4.activeColor;
|
|
27295
|
-
return "0px 0px 2px 1px "
|
|
27278
|
+
return "0px 0px 2px 1px ".concat(activeColor, ";");
|
|
27296
27279
|
});
|
|
27297
27280
|
|
|
27298
27281
|
var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
@@ -27310,9 +27293,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27310
27293
|
_ref5$handleChange = _ref5.handleChange,
|
|
27311
27294
|
handleChange = _ref5$handleChange === void 0 ? noop : _ref5$handleChange,
|
|
27312
27295
|
field = _ref5.field,
|
|
27313
|
-
config = _ref5.config
|
|
27314
|
-
_ref5$isRequired = _ref5.isRequired,
|
|
27315
|
-
isRequired = _ref5$isRequired === void 0 ? false : _ref5$isRequired;
|
|
27296
|
+
config = _ref5.config;
|
|
27316
27297
|
|
|
27317
27298
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
27318
27299
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
@@ -27345,8 +27326,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27345
27326
|
setValue(e.target.value);
|
|
27346
27327
|
handleChange(e);
|
|
27347
27328
|
},
|
|
27348
|
-
defaultChecked: getDefaultChecked(value, index)
|
|
27349
|
-
required: isRequired
|
|
27329
|
+
defaultChecked: getDefaultChecked(value, index)
|
|
27350
27330
|
}), /*#__PURE__*/React.createElement(Text$1, {
|
|
27351
27331
|
as: "label",
|
|
27352
27332
|
htmlFor: id,
|
|
@@ -27390,8 +27370,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27390
27370
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27391
27371
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27392
27372
|
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27393
|
-
_ref2$
|
|
27394
|
-
|
|
27373
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27374
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27395
27375
|
var buttonBorder = {
|
|
27396
27376
|
onFocused: {
|
|
27397
27377
|
borderColor: themeValues.activeColor,
|
|
@@ -27451,11 +27431,10 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27451
27431
|
type: "radio",
|
|
27452
27432
|
id: "radio-".concat(name),
|
|
27453
27433
|
disabled: disabled,
|
|
27454
|
-
required: required,
|
|
27455
|
-
"aria-required": required,
|
|
27456
27434
|
onClick: toggleRadio,
|
|
27457
27435
|
"aria-describedby": ariaDescribedBy,
|
|
27458
|
-
tabIndex: "-1"
|
|
27436
|
+
tabIndex: "-1",
|
|
27437
|
+
required: isRequired
|
|
27459
27438
|
}, extraProps)), /*#__PURE__*/React.createElement(Motion, {
|
|
27460
27439
|
borderWidth: "1px",
|
|
27461
27440
|
borderStyle: "solid",
|
|
@@ -39484,7 +39463,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39484
39463
|
labelTextWhenNoError: "Country",
|
|
39485
39464
|
errorMessages: countryErrorMessages,
|
|
39486
39465
|
field: fields.country,
|
|
39487
|
-
isRequired: true,
|
|
39488
39466
|
onChange: function onChange(value) {
|
|
39489
39467
|
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39490
39468
|
// we can write a reset function for fields
|
|
@@ -39498,7 +39476,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39498
39476
|
}
|
|
39499
39477
|
},
|
|
39500
39478
|
showErrors: showErrors,
|
|
39501
|
-
dataQa: "Country"
|
|
39479
|
+
dataQa: "Country",
|
|
39480
|
+
isRequired: true
|
|
39502
39481
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39503
39482
|
labelTextWhenNoError: "Address",
|
|
39504
39483
|
errorMessages: street1ErrorMessages,
|
|
@@ -39520,8 +39499,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39520
39499
|
return e.key === "Enter" && handleSubmit(e);
|
|
39521
39500
|
},
|
|
39522
39501
|
autocompleteValue: "address-line2",
|
|
39523
|
-
dataQa: "Address Line 2"
|
|
39524
|
-
isRequired: false
|
|
39502
|
+
dataQa: "Address Line 2"
|
|
39525
39503
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39526
39504
|
labelTextWhenNoError: "City",
|
|
39527
39505
|
errorMessages: cityErrorMessages,
|
|
@@ -40462,7 +40440,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40462
40440
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40463
40441
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40464
40442
|
saveToWallet = _ref.saveToWallet,
|
|
40465
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40443
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40444
|
+
_ref$isRequired = _ref.isRequired,
|
|
40445
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40466
40446
|
|
|
40467
40447
|
if (clearOnDismount) {
|
|
40468
40448
|
useEffect$1(function () {
|
|
@@ -40491,7 +40471,8 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40491
40471
|
},
|
|
40492
40472
|
isEmail: true,
|
|
40493
40473
|
autocompleteValue: "email",
|
|
40494
|
-
dataQa: "Email address"
|
|
40474
|
+
dataQa: "Email address",
|
|
40475
|
+
isRequired: isRequired
|
|
40495
40476
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
40496
40477
|
name: "email checkbox",
|
|
40497
40478
|
title: "Save email address to wallet",
|
|
@@ -48061,8 +48042,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48061
48042
|
onKeyDown: function onKeyDown(e) {
|
|
48062
48043
|
return e.key === "Enter" && handleSubmit(e);
|
|
48063
48044
|
},
|
|
48064
|
-
|
|
48065
|
-
|
|
48045
|
+
isNum: true,
|
|
48046
|
+
isRequired: true
|
|
48066
48047
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48067
48048
|
labelTextWhenNoError: "Account number",
|
|
48068
48049
|
dataQa: "Account number",
|
|
@@ -48070,7 +48051,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48070
48051
|
field: fields.accountNumber,
|
|
48071
48052
|
fieldActions: actions.fields.accountNumber,
|
|
48072
48053
|
showErrors: showErrors,
|
|
48073
|
-
isRequired: true,
|
|
48074
48054
|
isNum: true,
|
|
48075
48055
|
helperModal: function helperModal() {
|
|
48076
48056
|
return /*#__PURE__*/React.createElement(AccountAndRoutingModal$1, {
|
|
@@ -48085,11 +48065,11 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48085
48065
|
},
|
|
48086
48066
|
onKeyDown: function onKeyDown(e) {
|
|
48087
48067
|
return e.key === "Enter" && handleSubmit(e);
|
|
48088
|
-
}
|
|
48068
|
+
},
|
|
48069
|
+
isRequired: true
|
|
48089
48070
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48090
48071
|
labelTextWhenNoError: "Confirm account number",
|
|
48091
48072
|
dataQa: "Confirm account number",
|
|
48092
|
-
isRequired: true,
|
|
48093
48073
|
errorMessages: confirmAccountNumberErrors,
|
|
48094
48074
|
field: fields.confirmAccountNumber,
|
|
48095
48075
|
fieldActions: actions.fields.confirmAccountNumber,
|
|
@@ -48097,10 +48077,10 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48097
48077
|
onKeyDown: function onKeyDown(e) {
|
|
48098
48078
|
return e.key === "Enter" && handleSubmit(e);
|
|
48099
48079
|
},
|
|
48080
|
+
isRequired: true,
|
|
48100
48081
|
isNum: true
|
|
48101
48082
|
}), allowBankAccountType && /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
48102
48083
|
labelTextWhenNoError: "Account type",
|
|
48103
|
-
isRequired: true,
|
|
48104
48084
|
dataQa: "Account type",
|
|
48105
48085
|
options: [{
|
|
48106
48086
|
text: "Select account type",
|
|
@@ -48115,7 +48095,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48115
48095
|
fieldActions: actions.fields.accountType,
|
|
48116
48096
|
showErrors: showErrors,
|
|
48117
48097
|
errorMessages: accountTypeErrors,
|
|
48118
|
-
field: fields.accountType
|
|
48098
|
+
field: fields.accountType,
|
|
48099
|
+
isRequired: true
|
|
48119
48100
|
}), !hideDefaultPayment && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48120
48101
|
title: "Save as Default Payment Method",
|
|
48121
48102
|
dataQa: "default-payment-ach",
|
|
@@ -48231,7 +48212,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48231
48212
|
"aria-label": "Card payment"
|
|
48232
48213
|
}, /*#__PURE__*/React.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React.createElement(CountryDropdown, {
|
|
48233
48214
|
labelTextWhenNoError: "Country",
|
|
48234
|
-
isRequired: true,
|
|
48235
48215
|
errorMessages: countryErrorMessages,
|
|
48236
48216
|
field: fields.country,
|
|
48237
48217
|
onChange: function onChange(value) {
|
|
@@ -48257,7 +48237,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48257
48237
|
autocompleteValue: "cc-name",
|
|
48258
48238
|
isRequired: true
|
|
48259
48239
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48260
|
-
isRequired: true,
|
|
48261
48240
|
labelTextWhenNoError: "Credit card number",
|
|
48262
48241
|
dataQa: "Credit card number",
|
|
48263
48242
|
errorMessages: creditCardNumberErrors,
|
|
@@ -48269,7 +48248,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48269
48248
|
return e.key === "Enter" && handleSubmit(e);
|
|
48270
48249
|
},
|
|
48271
48250
|
isNum: true,
|
|
48272
|
-
autocompleteValue: "cc-number"
|
|
48251
|
+
autocompleteValue: "cc-number",
|
|
48252
|
+
isRequired: true
|
|
48273
48253
|
}), /*#__PURE__*/React.createElement(FormInputRow, {
|
|
48274
48254
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48275
48255
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48512,7 +48492,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48512
48492
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48513
48493
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48514
48494
|
saveToWallet = _ref.saveToWallet,
|
|
48515
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48495
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48496
|
+
_ref$isRequired = _ref.isRequired,
|
|
48497
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48516
48498
|
|
|
48517
48499
|
if (clearOnDismount) {
|
|
48518
48500
|
useEffect$1(function () {
|
|
@@ -48539,7 +48521,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48539
48521
|
},
|
|
48540
48522
|
autocompleteValue: "tel-national",
|
|
48541
48523
|
dataQa: "Phone number",
|
|
48542
|
-
isNum: true
|
|
48524
|
+
isNum: true,
|
|
48525
|
+
isRequired: isRequired
|
|
48543
48526
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48544
48527
|
name: "phone checkbox",
|
|
48545
48528
|
title: "Save phone number to wallet",
|
|
@@ -48567,7 +48550,7 @@ PhoneForm.mapDispatchToProps = mapDispatchToProps$8;
|
|
|
48567
48550
|
var DefaultHeading = styled.div.withConfig({
|
|
48568
48551
|
displayName: "RadioGroup__DefaultHeading",
|
|
48569
48552
|
componentId: "sc-7lqrl8-0"
|
|
48570
|
-
})(["font-size:0.875rem;color:", "
|
|
48553
|
+
})(["font-size:0.875rem;color:", " margin:0;padding:8px 0px;"], CHARADE_GREY);
|
|
48571
48554
|
var StyledFieldset = styled.fieldset.withConfig({
|
|
48572
48555
|
displayName: "RadioGroup__StyledFieldset",
|
|
48573
48556
|
componentId: "sc-7lqrl8-1"
|
|
@@ -48588,9 +48571,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48588
48571
|
_ref$handleChange = _ref.handleChange,
|
|
48589
48572
|
handleChange = _ref$handleChange === void 0 ? noop : _ref$handleChange,
|
|
48590
48573
|
field = _ref.field,
|
|
48591
|
-
fieldActions = _ref.fieldActions
|
|
48592
|
-
_ref$isRequired = _ref.isRequired,
|
|
48593
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48574
|
+
fieldActions = _ref.fieldActions;
|
|
48594
48575
|
|
|
48595
48576
|
var setValue = function setValue(value) {
|
|
48596
48577
|
return fieldActions.set(value);
|
|
@@ -48599,8 +48580,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48599
48580
|
return /*#__PURE__*/React.createElement(StyledFieldset, {
|
|
48600
48581
|
role: "radiogroup",
|
|
48601
48582
|
"aria-labelledby": "radio-group-".concat(groupName, "-heading"),
|
|
48602
|
-
$extraStyles: extraStyles
|
|
48603
|
-
required: isRequired
|
|
48583
|
+
$extraStyles: extraStyles
|
|
48604
48584
|
}, Heading !== null && Heading, /*#__PURE__*/React.createElement(Stack, {
|
|
48605
48585
|
childGap: "4px"
|
|
48606
48586
|
}, config.map(function (c, idx) {
|
|
@@ -48613,8 +48593,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48613
48593
|
handleChange: handleChange,
|
|
48614
48594
|
field: field,
|
|
48615
48595
|
config: config,
|
|
48616
|
-
"aria-invalid": field.dirty && field.hasErrors
|
|
48617
|
-
isRequired: isRequired
|
|
48596
|
+
"aria-invalid": field.dirty && field.hasErrors
|
|
48618
48597
|
}));
|
|
48619
48598
|
})));
|
|
48620
48599
|
};
|
|
@@ -48676,7 +48655,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48676
48655
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48677
48656
|
_ref$containerStyles = _ref.containerStyles,
|
|
48678
48657
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48679
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48658
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48659
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48660
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48680
48661
|
|
|
48681
48662
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48682
48663
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48732,7 +48713,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48732
48713
|
extraStyles: containerStyles
|
|
48733
48714
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48734
48715
|
childGap: "0",
|
|
48735
|
-
role: "radiogroup"
|
|
48716
|
+
"aria-role": "radiogroup",
|
|
48717
|
+
"aria-required": isSectionRequired
|
|
48736
48718
|
}, sections.filter(function (section) {
|
|
48737
48719
|
return !section.hidden;
|
|
48738
48720
|
}).map(function (section) {
|
|
@@ -48754,7 +48736,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48754
48736
|
extraStyles: borderStyles,
|
|
48755
48737
|
role: "radio",
|
|
48756
48738
|
"aria-checked": openSection === section.id,
|
|
48757
|
-
"aria-disabled": section.disabled
|
|
48739
|
+
"aria-disabled": section.disabled,
|
|
48740
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48758
48741
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48759
48742
|
childGap: "0"
|
|
48760
48743
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48793,7 +48776,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48793
48776
|
return toggleOpenSection(section.id);
|
|
48794
48777
|
},
|
|
48795
48778
|
tabIndex: "-1",
|
|
48796
|
-
|
|
48779
|
+
isRequired: section === null || section === void 0 ? void 0 : section.required
|
|
48797
48780
|
})), section.titleIcon && /*#__PURE__*/React.createElement(Cluster, {
|
|
48798
48781
|
align: "center"
|
|
48799
48782
|
}, section.titleIcon), /*#__PURE__*/React.createElement(Box, {
|