@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.cjs.js
CHANGED
|
@@ -22134,9 +22134,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22134
22134
|
extraStyles = _ref4.extraStyles,
|
|
22135
22135
|
textExtraStyles = _ref4.textExtraStyles,
|
|
22136
22136
|
_ref4$dataQa = _ref4.dataQa,
|
|
22137
|
-
dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa
|
|
22138
|
-
_ref4$isRequired = _ref4.isRequired,
|
|
22139
|
-
isRequired = _ref4$isRequired === void 0 ? false : _ref4$isRequired;
|
|
22137
|
+
dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa;
|
|
22140
22138
|
|
|
22141
22139
|
var _useState = React.useState(false),
|
|
22142
22140
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -22190,8 +22188,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22190
22188
|
errorStyles: themeValues.errorStyles,
|
|
22191
22189
|
disabledStyles: themeValues.disabledStyles,
|
|
22192
22190
|
disabledCheckedStyles: themeValues.disabledCheckedStyles,
|
|
22193
|
-
focusedStyles: themeValues.focusedStyles
|
|
22194
|
-
"aria-required": isRequired
|
|
22191
|
+
focusedStyles: themeValues.focusedStyles
|
|
22195
22192
|
}, /*#__PURE__*/React__default.createElement(CheckboxIcon, {
|
|
22196
22193
|
viewBox: "0 0 24 24",
|
|
22197
22194
|
disabled: disabled,
|
|
@@ -23806,8 +23803,6 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23806
23803
|
_ref13$isRequired = _ref13.isRequired,
|
|
23807
23804
|
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
|
|
23808
23805
|
|
|
23809
|
-
var required = options.required || isRequired;
|
|
23810
|
-
|
|
23811
23806
|
var _useState = React.useState(""),
|
|
23812
23807
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23813
23808
|
inputValue = _useState2[0],
|
|
@@ -23999,11 +23994,13 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23999
23994
|
clearTimeout(timer);
|
|
24000
23995
|
setTimer(setTimeout(function () {
|
|
24001
23996
|
return setInputValue("");
|
|
24002
|
-
},
|
|
23997
|
+
}, 20000));
|
|
24003
23998
|
}
|
|
24004
23999
|
|
|
24005
24000
|
setFilteredOptions(options.filter(function (option) {
|
|
24006
|
-
|
|
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;
|
|
24007
24004
|
}));
|
|
24008
24005
|
}, [inputValue]);
|
|
24009
24006
|
React.useEffect(function () {
|
|
@@ -24055,7 +24052,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24055
24052
|
"aria-labelledby": ariaLabelledby,
|
|
24056
24053
|
"aria-describedby": ariaDescribedby,
|
|
24057
24054
|
"aria-expanded": isOpen,
|
|
24058
|
-
"aria-required": required,
|
|
24055
|
+
"aria-required": options.required,
|
|
24059
24056
|
"aria-invalid": ariaInvalid,
|
|
24060
24057
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
24061
24058
|
borderRadius: "2px",
|
|
@@ -24077,6 +24074,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24077
24074
|
},
|
|
24078
24075
|
padding: "12px",
|
|
24079
24076
|
placeholder: getSelection(),
|
|
24077
|
+
required: options.required || isRequired,
|
|
24080
24078
|
role: "combobox",
|
|
24081
24079
|
themeValues: themeValues,
|
|
24082
24080
|
title: hasTitles ? getSelection() : null,
|
|
@@ -24084,9 +24082,6 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24084
24082
|
tabIndex: 0,
|
|
24085
24083
|
value: inputValue,
|
|
24086
24084
|
width: "100%"
|
|
24087
|
-
/* Non-semantic elements need the aria-* version of the attribute */
|
|
24088
|
-
,
|
|
24089
|
-
"aria-disabled": disabledValues.includes(inputValue)
|
|
24090
24085
|
}), /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
24091
24086
|
open: isOpen,
|
|
24092
24087
|
onClick: _onClick
|
|
@@ -24097,8 +24092,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24097
24092
|
widthFitOptions: widthFitOptions,
|
|
24098
24093
|
tabIndex: 0,
|
|
24099
24094
|
role: "listbox",
|
|
24100
|
-
id: "".concat(ariaLabelledby, "_listbox")
|
|
24101
|
-
required: required
|
|
24095
|
+
id: "".concat(ariaLabelledby, "_listbox")
|
|
24102
24096
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
24103
24097
|
childGap: "0",
|
|
24104
24098
|
as: "ul"
|
|
@@ -24258,17 +24252,6 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24258
24252
|
setOpen = _useState2[1];
|
|
24259
24253
|
|
|
24260
24254
|
var dropdownRef = React.useRef(null);
|
|
24261
|
-
var required = (options === null || options === void 0 ? void 0 : options.required) || isRequired;
|
|
24262
|
-
var labelId = React.useMemo(function () {
|
|
24263
|
-
return function (labelTextWhenNoError) {
|
|
24264
|
-
return createIdFromString(labelTextWhenNoError);
|
|
24265
|
-
};
|
|
24266
|
-
}, [labelTextWhenNoError]);
|
|
24267
|
-
var descriptionId = React.useMemo(function () {
|
|
24268
|
-
return function (field, labelTextWhenNoError) {
|
|
24269
|
-
return field.hasErrors && field.dirty ? labelId(labelTextWhenNoError) + "error-message" : "";
|
|
24270
|
-
};
|
|
24271
|
-
}, [field, labelTextWhenNoError]);
|
|
24272
24255
|
|
|
24273
24256
|
var handleClickAway = function handleClickAway(event) {
|
|
24274
24257
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
@@ -24284,8 +24267,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24284
24267
|
});
|
|
24285
24268
|
return /*#__PURE__*/React__default.createElement(SelectContainer, {
|
|
24286
24269
|
ref: dropdownRef,
|
|
24287
|
-
"aria-role": "group",
|
|
24288
24270
|
disabled: disabled,
|
|
24271
|
+
"aria-disabled": disabled,
|
|
24289
24272
|
"data-qa": dataQa
|
|
24290
24273
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
24291
24274
|
padding: "0",
|
|
@@ -24299,10 +24282,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24299
24282
|
color: themeValues.labelColor,
|
|
24300
24283
|
weight: themeValues.fontWeight,
|
|
24301
24284
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
24302
|
-
id:
|
|
24285
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
24303
24286
|
}, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
24304
|
-
ariaLabelledby:
|
|
24305
|
-
ariaDescribedby:
|
|
24287
|
+
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24288
|
+
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24306
24289
|
maxHeight: dropdownMaxHeight,
|
|
24307
24290
|
widthFitOptions: widthFitOptions,
|
|
24308
24291
|
hasTitles: hasTitles,
|
|
@@ -24324,7 +24307,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24324
24307
|
disabled: disabled,
|
|
24325
24308
|
autocompleteValue: autocompleteValue,
|
|
24326
24309
|
smoothScroll: smoothScroll,
|
|
24327
|
-
isRequired:
|
|
24310
|
+
isRequired: isRequired
|
|
24328
24311
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
24329
24312
|
direction: "row",
|
|
24330
24313
|
justify: "space-between"
|
|
@@ -25095,10 +25078,10 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25095
25078
|
fieldActions = _ref.fieldActions,
|
|
25096
25079
|
showErrors = _ref.showErrors,
|
|
25097
25080
|
onChange = _ref.onChange,
|
|
25098
|
-
_ref$dataQa = _ref.dataQa,
|
|
25099
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
25100
25081
|
_ref$isRequired = _ref.isRequired,
|
|
25101
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired
|
|
25082
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25083
|
+
_ref$dataQa = _ref.dataQa,
|
|
25084
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25102
25085
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
25103
25086
|
options: options,
|
|
25104
25087
|
field: field,
|
|
@@ -27285,7 +27268,7 @@ var HiddenRadioInput = styled__default.input.withConfig({
|
|
|
27285
27268
|
var Circle = styled__default.div.withConfig({
|
|
27286
27269
|
displayName: "RadioButtonWithLabel__Circle",
|
|
27287
27270
|
componentId: "sc-1m9whwg-1"
|
|
27288
|
-
})(["flex-shrink:0;margin-right:8px;width:1.5rem;height
|
|
27271
|
+
})(["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) {
|
|
27289
27272
|
var inactiveBorderColor = _ref.inactiveBorderColor;
|
|
27290
27273
|
return "1px solid ".concat(inactiveBorderColor);
|
|
27291
27274
|
}, function (_ref2) {
|
|
@@ -27295,12 +27278,12 @@ var Circle = styled__default.div.withConfig({
|
|
|
27295
27278
|
var InputAndLabelContainer = styled__default(Cluster).withConfig({
|
|
27296
27279
|
displayName: "RadioButtonWithLabel__InputAndLabelContainer",
|
|
27297
27280
|
componentId: "sc-1m9whwg-2"
|
|
27298
|
-
})(["overflow:visible;", ":checked + label ", ":after{transform:scale(0.85);transition:transform 0.15s;}", ":checked + label ", "{border:", "
|
|
27281
|
+
})(["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) {
|
|
27299
27282
|
var activeColor = _ref3.activeColor;
|
|
27300
|
-
return "1px solid "
|
|
27283
|
+
return "1px solid ".concat(activeColor, ";");
|
|
27301
27284
|
}, HiddenRadioInput, Circle, function (_ref4) {
|
|
27302
27285
|
var activeColor = _ref4.activeColor;
|
|
27303
|
-
return "0px 0px 2px 1px "
|
|
27286
|
+
return "0px 0px 2px 1px ".concat(activeColor, ";");
|
|
27304
27287
|
});
|
|
27305
27288
|
|
|
27306
27289
|
var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
@@ -27318,9 +27301,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27318
27301
|
_ref5$handleChange = _ref5.handleChange,
|
|
27319
27302
|
handleChange = _ref5$handleChange === void 0 ? noop : _ref5$handleChange,
|
|
27320
27303
|
field = _ref5.field,
|
|
27321
|
-
config = _ref5.config
|
|
27322
|
-
_ref5$isRequired = _ref5.isRequired,
|
|
27323
|
-
isRequired = _ref5$isRequired === void 0 ? false : _ref5$isRequired;
|
|
27304
|
+
config = _ref5.config;
|
|
27324
27305
|
|
|
27325
27306
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
27326
27307
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
@@ -27353,8 +27334,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27353
27334
|
setValue(e.target.value);
|
|
27354
27335
|
handleChange(e);
|
|
27355
27336
|
},
|
|
27356
|
-
defaultChecked: getDefaultChecked(value, index)
|
|
27357
|
-
required: isRequired
|
|
27337
|
+
defaultChecked: getDefaultChecked(value, index)
|
|
27358
27338
|
}), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27359
27339
|
as: "label",
|
|
27360
27340
|
htmlFor: id,
|
|
@@ -27398,8 +27378,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27398
27378
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27399
27379
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27400
27380
|
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27401
|
-
_ref2$
|
|
27402
|
-
|
|
27381
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27382
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27403
27383
|
var buttonBorder = {
|
|
27404
27384
|
onFocused: {
|
|
27405
27385
|
borderColor: themeValues.activeColor,
|
|
@@ -27459,11 +27439,10 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27459
27439
|
type: "radio",
|
|
27460
27440
|
id: "radio-".concat(name),
|
|
27461
27441
|
disabled: disabled,
|
|
27462
|
-
required: required,
|
|
27463
|
-
"aria-required": required,
|
|
27464
27442
|
onClick: toggleRadio,
|
|
27465
27443
|
"aria-describedby": ariaDescribedBy,
|
|
27466
|
-
tabIndex: "-1"
|
|
27444
|
+
tabIndex: "-1",
|
|
27445
|
+
required: isRequired
|
|
27467
27446
|
}, extraProps)), /*#__PURE__*/React__default.createElement(Motion, {
|
|
27468
27447
|
borderWidth: "1px",
|
|
27469
27448
|
borderStyle: "solid",
|
|
@@ -39492,7 +39471,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39492
39471
|
labelTextWhenNoError: "Country",
|
|
39493
39472
|
errorMessages: countryErrorMessages,
|
|
39494
39473
|
field: fields.country,
|
|
39495
|
-
isRequired: true,
|
|
39496
39474
|
onChange: function onChange(value) {
|
|
39497
39475
|
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39498
39476
|
// we can write a reset function for fields
|
|
@@ -39506,7 +39484,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39506
39484
|
}
|
|
39507
39485
|
},
|
|
39508
39486
|
showErrors: showErrors,
|
|
39509
|
-
dataQa: "Country"
|
|
39487
|
+
dataQa: "Country",
|
|
39488
|
+
isRequired: true
|
|
39510
39489
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39511
39490
|
labelTextWhenNoError: "Address",
|
|
39512
39491
|
errorMessages: street1ErrorMessages,
|
|
@@ -39528,8 +39507,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39528
39507
|
return e.key === "Enter" && handleSubmit(e);
|
|
39529
39508
|
},
|
|
39530
39509
|
autocompleteValue: "address-line2",
|
|
39531
|
-
dataQa: "Address Line 2"
|
|
39532
|
-
isRequired: false
|
|
39510
|
+
dataQa: "Address Line 2"
|
|
39533
39511
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39534
39512
|
labelTextWhenNoError: "City",
|
|
39535
39513
|
errorMessages: cityErrorMessages,
|
|
@@ -40470,7 +40448,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40470
40448
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40471
40449
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40472
40450
|
saveToWallet = _ref.saveToWallet,
|
|
40473
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40451
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40452
|
+
_ref$isRequired = _ref.isRequired,
|
|
40453
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40474
40454
|
|
|
40475
40455
|
if (clearOnDismount) {
|
|
40476
40456
|
React.useEffect(function () {
|
|
@@ -40499,7 +40479,8 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40499
40479
|
},
|
|
40500
40480
|
isEmail: true,
|
|
40501
40481
|
autocompleteValue: "email",
|
|
40502
|
-
dataQa: "Email address"
|
|
40482
|
+
dataQa: "Email address",
|
|
40483
|
+
isRequired: isRequired
|
|
40503
40484
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
40504
40485
|
name: "email checkbox",
|
|
40505
40486
|
title: "Save email address to wallet",
|
|
@@ -48069,8 +48050,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48069
48050
|
onKeyDown: function onKeyDown(e) {
|
|
48070
48051
|
return e.key === "Enter" && handleSubmit(e);
|
|
48071
48052
|
},
|
|
48072
|
-
|
|
48073
|
-
|
|
48053
|
+
isNum: true,
|
|
48054
|
+
isRequired: true
|
|
48074
48055
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48075
48056
|
labelTextWhenNoError: "Account number",
|
|
48076
48057
|
dataQa: "Account number",
|
|
@@ -48078,7 +48059,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48078
48059
|
field: fields.accountNumber,
|
|
48079
48060
|
fieldActions: actions.fields.accountNumber,
|
|
48080
48061
|
showErrors: showErrors,
|
|
48081
|
-
isRequired: true,
|
|
48082
48062
|
isNum: true,
|
|
48083
48063
|
helperModal: function helperModal() {
|
|
48084
48064
|
return /*#__PURE__*/React__default.createElement(AccountAndRoutingModal$1, {
|
|
@@ -48093,11 +48073,11 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48093
48073
|
},
|
|
48094
48074
|
onKeyDown: function onKeyDown(e) {
|
|
48095
48075
|
return e.key === "Enter" && handleSubmit(e);
|
|
48096
|
-
}
|
|
48076
|
+
},
|
|
48077
|
+
isRequired: true
|
|
48097
48078
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48098
48079
|
labelTextWhenNoError: "Confirm account number",
|
|
48099
48080
|
dataQa: "Confirm account number",
|
|
48100
|
-
isRequired: true,
|
|
48101
48081
|
errorMessages: confirmAccountNumberErrors,
|
|
48102
48082
|
field: fields.confirmAccountNumber,
|
|
48103
48083
|
fieldActions: actions.fields.confirmAccountNumber,
|
|
@@ -48105,10 +48085,10 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48105
48085
|
onKeyDown: function onKeyDown(e) {
|
|
48106
48086
|
return e.key === "Enter" && handleSubmit(e);
|
|
48107
48087
|
},
|
|
48088
|
+
isRequired: true,
|
|
48108
48089
|
isNum: true
|
|
48109
48090
|
}), allowBankAccountType && /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
48110
48091
|
labelTextWhenNoError: "Account type",
|
|
48111
|
-
isRequired: true,
|
|
48112
48092
|
dataQa: "Account type",
|
|
48113
48093
|
options: [{
|
|
48114
48094
|
text: "Select account type",
|
|
@@ -48123,7 +48103,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48123
48103
|
fieldActions: actions.fields.accountType,
|
|
48124
48104
|
showErrors: showErrors,
|
|
48125
48105
|
errorMessages: accountTypeErrors,
|
|
48126
|
-
field: fields.accountType
|
|
48106
|
+
field: fields.accountType,
|
|
48107
|
+
isRequired: true
|
|
48127
48108
|
}), !hideDefaultPayment && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48128
48109
|
title: "Save as Default Payment Method",
|
|
48129
48110
|
dataQa: "default-payment-ach",
|
|
@@ -48239,7 +48220,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48239
48220
|
"aria-label": "Card payment"
|
|
48240
48221
|
}, /*#__PURE__*/React__default.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React__default.createElement(CountryDropdown, {
|
|
48241
48222
|
labelTextWhenNoError: "Country",
|
|
48242
|
-
isRequired: true,
|
|
48243
48223
|
errorMessages: countryErrorMessages,
|
|
48244
48224
|
field: fields.country,
|
|
48245
48225
|
onChange: function onChange(value) {
|
|
@@ -48265,7 +48245,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48265
48245
|
autocompleteValue: "cc-name",
|
|
48266
48246
|
isRequired: true
|
|
48267
48247
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48268
|
-
isRequired: true,
|
|
48269
48248
|
labelTextWhenNoError: "Credit card number",
|
|
48270
48249
|
dataQa: "Credit card number",
|
|
48271
48250
|
errorMessages: creditCardNumberErrors,
|
|
@@ -48277,7 +48256,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48277
48256
|
return e.key === "Enter" && handleSubmit(e);
|
|
48278
48257
|
},
|
|
48279
48258
|
isNum: true,
|
|
48280
|
-
autocompleteValue: "cc-number"
|
|
48259
|
+
autocompleteValue: "cc-number",
|
|
48260
|
+
isRequired: true
|
|
48281
48261
|
}), /*#__PURE__*/React__default.createElement(FormInputRow, {
|
|
48282
48262
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48283
48263
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48520,7 +48500,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48520
48500
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48521
48501
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48522
48502
|
saveToWallet = _ref.saveToWallet,
|
|
48523
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48503
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48504
|
+
_ref$isRequired = _ref.isRequired,
|
|
48505
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48524
48506
|
|
|
48525
48507
|
if (clearOnDismount) {
|
|
48526
48508
|
React.useEffect(function () {
|
|
@@ -48547,7 +48529,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48547
48529
|
},
|
|
48548
48530
|
autocompleteValue: "tel-national",
|
|
48549
48531
|
dataQa: "Phone number",
|
|
48550
|
-
isNum: true
|
|
48532
|
+
isNum: true,
|
|
48533
|
+
isRequired: isRequired
|
|
48551
48534
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48552
48535
|
name: "phone checkbox",
|
|
48553
48536
|
title: "Save phone number to wallet",
|
|
@@ -48575,7 +48558,7 @@ PhoneForm.mapDispatchToProps = mapDispatchToProps$8;
|
|
|
48575
48558
|
var DefaultHeading = styled__default.div.withConfig({
|
|
48576
48559
|
displayName: "RadioGroup__DefaultHeading",
|
|
48577
48560
|
componentId: "sc-7lqrl8-0"
|
|
48578
|
-
})(["font-size:0.875rem;color:", "
|
|
48561
|
+
})(["font-size:0.875rem;color:", " margin:0;padding:8px 0px;"], CHARADE_GREY);
|
|
48579
48562
|
var StyledFieldset = styled__default.fieldset.withConfig({
|
|
48580
48563
|
displayName: "RadioGroup__StyledFieldset",
|
|
48581
48564
|
componentId: "sc-7lqrl8-1"
|
|
@@ -48596,9 +48579,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48596
48579
|
_ref$handleChange = _ref.handleChange,
|
|
48597
48580
|
handleChange = _ref$handleChange === void 0 ? noop : _ref$handleChange,
|
|
48598
48581
|
field = _ref.field,
|
|
48599
|
-
fieldActions = _ref.fieldActions
|
|
48600
|
-
_ref$isRequired = _ref.isRequired,
|
|
48601
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48582
|
+
fieldActions = _ref.fieldActions;
|
|
48602
48583
|
|
|
48603
48584
|
var setValue = function setValue(value) {
|
|
48604
48585
|
return fieldActions.set(value);
|
|
@@ -48607,8 +48588,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48607
48588
|
return /*#__PURE__*/React__default.createElement(StyledFieldset, {
|
|
48608
48589
|
role: "radiogroup",
|
|
48609
48590
|
"aria-labelledby": "radio-group-".concat(groupName, "-heading"),
|
|
48610
|
-
$extraStyles: extraStyles
|
|
48611
|
-
required: isRequired
|
|
48591
|
+
$extraStyles: extraStyles
|
|
48612
48592
|
}, Heading !== null && Heading, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48613
48593
|
childGap: "4px"
|
|
48614
48594
|
}, config.map(function (c, idx) {
|
|
@@ -48621,8 +48601,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48621
48601
|
handleChange: handleChange,
|
|
48622
48602
|
field: field,
|
|
48623
48603
|
config: config,
|
|
48624
|
-
"aria-invalid": field.dirty && field.hasErrors
|
|
48625
|
-
isRequired: isRequired
|
|
48604
|
+
"aria-invalid": field.dirty && field.hasErrors
|
|
48626
48605
|
}));
|
|
48627
48606
|
})));
|
|
48628
48607
|
};
|
|
@@ -48684,7 +48663,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48684
48663
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48685
48664
|
_ref$containerStyles = _ref.containerStyles,
|
|
48686
48665
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48687
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48666
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48667
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48668
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48688
48669
|
|
|
48689
48670
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48690
48671
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48740,7 +48721,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48740
48721
|
extraStyles: containerStyles
|
|
48741
48722
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48742
48723
|
childGap: "0",
|
|
48743
|
-
role: "radiogroup"
|
|
48724
|
+
"aria-role": "radiogroup",
|
|
48725
|
+
"aria-required": isSectionRequired
|
|
48744
48726
|
}, sections.filter(function (section) {
|
|
48745
48727
|
return !section.hidden;
|
|
48746
48728
|
}).map(function (section) {
|
|
@@ -48762,7 +48744,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48762
48744
|
extraStyles: borderStyles,
|
|
48763
48745
|
role: "radio",
|
|
48764
48746
|
"aria-checked": openSection === section.id,
|
|
48765
|
-
"aria-disabled": section.disabled
|
|
48747
|
+
"aria-disabled": section.disabled,
|
|
48748
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48766
48749
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48767
48750
|
childGap: "0"
|
|
48768
48751
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48801,7 +48784,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48801
48784
|
return toggleOpenSection(section.id);
|
|
48802
48785
|
},
|
|
48803
48786
|
tabIndex: "-1",
|
|
48804
|
-
|
|
48787
|
+
isRequired: section === null || section === void 0 ? void 0 : section.required
|
|
48805
48788
|
})), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48806
48789
|
align: "center"
|
|
48807
48790
|
}, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {
|