@thecb/components 9.3.0-beta.2 → 9.3.1-beta.0
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 +44 -103
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +44 -103
- 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 +1 -3
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +0 -1
- package/src/components/atoms/dropdown/Dropdown.js +3 -7
- package/src/components/atoms/form-layouts/FormInput.js +0 -4
- package/src/components/atoms/form-select/FormSelect.js +9 -22
- package/src/components/atoms/form-select/FormSelect.stories.js +2 -2
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +1 -4
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +0 -1
- package/src/components/molecules/address-form/AddressForm.js +0 -6
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +0 -7
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +0 -7
- package/src/components/molecules/radio-section/RadioSection.js +4 -4
- package/src/components/molecules/radio-section/RadioSection.stories.js +2 -3
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +1 -4
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +0 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -22130,9 +22130,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22130
22130
|
extraStyles = _ref4.extraStyles,
|
|
22131
22131
|
textExtraStyles = _ref4.textExtraStyles,
|
|
22132
22132
|
_ref4$dataQa = _ref4.dataQa,
|
|
22133
|
-
dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa
|
|
22134
|
-
_ref4$isRequired = _ref4.isRequired,
|
|
22135
|
-
isRequired = _ref4$isRequired === void 0 ? false : _ref4$isRequired;
|
|
22133
|
+
dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa;
|
|
22136
22134
|
|
|
22137
22135
|
var _useState = React.useState(false),
|
|
22138
22136
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -22186,8 +22184,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22186
22184
|
errorStyles: themeValues.errorStyles,
|
|
22187
22185
|
disabledStyles: themeValues.disabledStyles,
|
|
22188
22186
|
disabledCheckedStyles: themeValues.disabledCheckedStyles,
|
|
22189
|
-
focusedStyles: themeValues.focusedStyles
|
|
22190
|
-
"aria-required": isRequired
|
|
22187
|
+
focusedStyles: themeValues.focusedStyles
|
|
22191
22188
|
}, /*#__PURE__*/React__default.createElement(CheckboxIcon, {
|
|
22192
22189
|
viewBox: "0 0 24 24",
|
|
22193
22190
|
disabled: disabled,
|
|
@@ -23771,11 +23768,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
23771
23768
|
_ref8$smoothScroll = _ref8.smoothScroll,
|
|
23772
23769
|
smoothScroll = _ref8$smoothScroll === void 0 ? true : _ref8$smoothScroll,
|
|
23773
23770
|
_ref8$ariaInvalid = _ref8.ariaInvalid,
|
|
23774
|
-
ariaInvalid = _ref8$ariaInvalid === void 0 ? false : _ref8$ariaInvalid
|
|
23775
|
-
_ref8$isRequired = _ref8.isRequired,
|
|
23776
|
-
isRequired = _ref8$isRequired === void 0 ? false : _ref8$isRequired;
|
|
23777
|
-
|
|
23778
|
-
var required = options.required || isRequired;
|
|
23771
|
+
ariaInvalid = _ref8$ariaInvalid === void 0 ? false : _ref8$ariaInvalid;
|
|
23779
23772
|
|
|
23780
23773
|
var _useState = React.useState(""),
|
|
23781
23774
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24024,8 +24017,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24024
24017
|
"aria-labelledby": ariaLabelledby,
|
|
24025
24018
|
"aria-describedby": ariaDescribedby,
|
|
24026
24019
|
"aria-expanded": isOpen,
|
|
24027
|
-
"aria-required": required,
|
|
24028
|
-
required: required,
|
|
24020
|
+
"aria-required": options.required,
|
|
24029
24021
|
"aria-invalid": ariaInvalid,
|
|
24030
24022
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
24031
24023
|
borderRadius: "2px",
|
|
@@ -24047,14 +24039,14 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24047
24039
|
},
|
|
24048
24040
|
padding: "12px",
|
|
24049
24041
|
placeholder: getSelection(),
|
|
24042
|
+
required: options.required,
|
|
24050
24043
|
role: "combobox",
|
|
24051
24044
|
themeValues: themeValues,
|
|
24052
24045
|
title: hasTitles ? getSelection() : null,
|
|
24053
24046
|
type: "text",
|
|
24054
24047
|
tabIndex: 0,
|
|
24055
24048
|
value: inputValue,
|
|
24056
|
-
width: "100%"
|
|
24057
|
-
disabled: disabledValues.includes(inputValue)
|
|
24049
|
+
width: "100%"
|
|
24058
24050
|
}), /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
24059
24051
|
open: isOpen,
|
|
24060
24052
|
onClick: _onClick
|
|
@@ -24065,8 +24057,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24065
24057
|
widthFitOptions: widthFitOptions,
|
|
24066
24058
|
tabIndex: 0,
|
|
24067
24059
|
role: "listbox",
|
|
24068
|
-
id: "".concat(ariaLabelledby, "_listbox")
|
|
24069
|
-
required: required
|
|
24060
|
+
id: "".concat(ariaLabelledby, "_listbox")
|
|
24070
24061
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
24071
24062
|
childGap: "0",
|
|
24072
24063
|
as: "ul"
|
|
@@ -24212,9 +24203,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24212
24203
|
_ref$dataQa = _ref.dataQa,
|
|
24213
24204
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
24214
24205
|
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
24215
|
-
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions
|
|
24216
|
-
_ref$isRequired = _ref.isRequired,
|
|
24217
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
24206
|
+
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions;
|
|
24218
24207
|
|
|
24219
24208
|
var _useState = React.useState(false),
|
|
24220
24209
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24222,17 +24211,6 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24222
24211
|
setOpen = _useState2[1];
|
|
24223
24212
|
|
|
24224
24213
|
var dropdownRef = React.useRef(null);
|
|
24225
|
-
var required = (options === null || options === void 0 ? void 0 : options.required) || isRequired;
|
|
24226
|
-
var labelId = React.useMemo(function () {
|
|
24227
|
-
return function (labelTextWhenNoError) {
|
|
24228
|
-
return createIdFromString(labelTextWhenNoError);
|
|
24229
|
-
};
|
|
24230
|
-
}, [labelTextWhenNoError]);
|
|
24231
|
-
var descriptionId = React.useMemo(function () {
|
|
24232
|
-
return function (field, labelTextWhenNoError) {
|
|
24233
|
-
return field.hasErrors && field.dirty ? labelId(labelTextWhenNoError) + "error-message" : "";
|
|
24234
|
-
};
|
|
24235
|
-
}, [field, labelTextWhenNoError]);
|
|
24236
24214
|
|
|
24237
24215
|
var handleClickAway = function handleClickAway(event) {
|
|
24238
24216
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
@@ -24248,8 +24226,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24248
24226
|
});
|
|
24249
24227
|
return /*#__PURE__*/React__default.createElement(SelectContainer, {
|
|
24250
24228
|
ref: dropdownRef,
|
|
24251
|
-
"aria-role": "group",
|
|
24252
24229
|
disabled: disabled,
|
|
24230
|
+
"aria-disabled": disabled,
|
|
24253
24231
|
"data-qa": dataQa
|
|
24254
24232
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
24255
24233
|
padding: "0",
|
|
@@ -24263,10 +24241,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24263
24241
|
color: themeValues.labelColor,
|
|
24264
24242
|
weight: themeValues.fontWeight,
|
|
24265
24243
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
24266
|
-
id:
|
|
24244
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
24267
24245
|
}, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
24268
|
-
ariaLabelledby:
|
|
24269
|
-
ariaDescribedby:
|
|
24246
|
+
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24247
|
+
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24270
24248
|
maxHeight: dropdownMaxHeight,
|
|
24271
24249
|
widthFitOptions: widthFitOptions,
|
|
24272
24250
|
hasTitles: hasTitles,
|
|
@@ -24287,8 +24265,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24287
24265
|
},
|
|
24288
24266
|
disabled: disabled,
|
|
24289
24267
|
autocompleteValue: autocompleteValue,
|
|
24290
|
-
smoothScroll: smoothScroll
|
|
24291
|
-
isRequired: required
|
|
24268
|
+
smoothScroll: smoothScroll
|
|
24292
24269
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
24293
24270
|
direction: "row",
|
|
24294
24271
|
justify: "space-between"
|
|
@@ -25058,9 +25035,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25058
25035
|
showErrors = _ref.showErrors,
|
|
25059
25036
|
onChange = _ref.onChange,
|
|
25060
25037
|
_ref$dataQa = _ref.dataQa,
|
|
25061
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa
|
|
25062
|
-
_ref$isRequired = _ref.isRequired,
|
|
25063
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
25038
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25064
25039
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
25065
25040
|
options: options,
|
|
25066
25041
|
field: field,
|
|
@@ -25070,8 +25045,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25070
25045
|
errorMessages: errorMessages,
|
|
25071
25046
|
showErrors: showErrors,
|
|
25072
25047
|
onChange: onChange,
|
|
25073
|
-
autocompleteValue: "country-name"
|
|
25074
|
-
isRequired: isRequired
|
|
25048
|
+
autocompleteValue: "country-name"
|
|
25075
25049
|
});
|
|
25076
25050
|
};
|
|
25077
25051
|
|
|
@@ -25916,7 +25890,7 @@ var fallbackValues$k = {
|
|
|
25916
25890
|
};
|
|
25917
25891
|
|
|
25918
25892
|
var _excluded$p = ["showErrors", "themeValues"],
|
|
25919
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"
|
|
25893
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
|
|
25920
25894
|
var InputField = styled__default.input.withConfig({
|
|
25921
25895
|
displayName: "FormInput__InputField",
|
|
25922
25896
|
componentId: "sc-l094r1-0"
|
|
@@ -26003,12 +25977,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26003
25977
|
removeFromValue = _ref15.removeFromValue,
|
|
26004
25978
|
_ref15$dataQa = _ref15.dataQa,
|
|
26005
25979
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
26006
|
-
_ref15$isRequired = _ref15.isRequired,
|
|
26007
|
-
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
26008
25980
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
26009
25981
|
|
|
26010
|
-
var required = isRequired || (props === null || props === void 0 ? void 0 : props.required);
|
|
26011
|
-
|
|
26012
25982
|
var _useState = React.useState(false),
|
|
26013
25983
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26014
25984
|
showPassword = _useState2[0],
|
|
@@ -26093,8 +26063,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26093
26063
|
$customHeight: customHeight,
|
|
26094
26064
|
$extraStyles: extraStyles,
|
|
26095
26065
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26096
|
-
autoComplete: autocompleteValue
|
|
26097
|
-
required: required
|
|
26066
|
+
autoComplete: autocompleteValue
|
|
26098
26067
|
}, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
|
|
26099
26068
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26100
26069
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26113,8 +26082,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26113
26082
|
$customHeight: customHeight,
|
|
26114
26083
|
$extraStyles: extraStyles,
|
|
26115
26084
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26116
|
-
autoComplete: autocompleteValue
|
|
26117
|
-
required: required
|
|
26085
|
+
autoComplete: autocompleteValue
|
|
26118
26086
|
}, props))), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26119
26087
|
direction: "row",
|
|
26120
26088
|
justify: "space-between",
|
|
@@ -27296,9 +27264,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27296
27264
|
_ref2$ariaLabelledBy = _ref2.ariaLabelledBy,
|
|
27297
27265
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27298
27266
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27299
|
-
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel
|
|
27300
|
-
_ref2$required = _ref2.required,
|
|
27301
|
-
required = _ref2$required === void 0 ? false : _ref2$required;
|
|
27267
|
+
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel;
|
|
27302
27268
|
var buttonBorder = {
|
|
27303
27269
|
onFocused: {
|
|
27304
27270
|
borderColor: themeValues.activeColor,
|
|
@@ -27358,8 +27324,6 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27358
27324
|
type: "radio",
|
|
27359
27325
|
id: "radio-".concat(name),
|
|
27360
27326
|
disabled: disabled,
|
|
27361
|
-
required: required,
|
|
27362
|
-
"aria-required": required,
|
|
27363
27327
|
onClick: toggleRadio,
|
|
27364
27328
|
"aria-describedby": ariaDescribedBy,
|
|
27365
27329
|
tabIndex: "-1"
|
|
@@ -38052,9 +38016,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38052
38016
|
field = _ref.field,
|
|
38053
38017
|
fieldActions = _ref.fieldActions,
|
|
38054
38018
|
showErrors = _ref.showErrors,
|
|
38055
|
-
countryCode = _ref.countryCode
|
|
38056
|
-
_ref$isRequired = _ref.isRequired,
|
|
38057
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
38019
|
+
countryCode = _ref.countryCode;
|
|
38058
38020
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38059
38021
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38060
38022
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
@@ -38064,8 +38026,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38064
38026
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38065
38027
|
errorMessages: errorMessages,
|
|
38066
38028
|
showErrors: showErrors,
|
|
38067
|
-
autocompleteValue: "address-level1"
|
|
38068
|
-
isRequired: isRequired
|
|
38029
|
+
autocompleteValue: "address-level1"
|
|
38069
38030
|
});
|
|
38070
38031
|
};
|
|
38071
38032
|
|
|
@@ -39391,7 +39352,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39391
39352
|
labelTextWhenNoError: "Country",
|
|
39392
39353
|
errorMessages: countryErrorMessages,
|
|
39393
39354
|
field: fields.country,
|
|
39394
|
-
isRequired: true,
|
|
39395
39355
|
onChange: function onChange(value) {
|
|
39396
39356
|
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39397
39357
|
// we can write a reset function for fields
|
|
@@ -39416,8 +39376,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39416
39376
|
return e.key === "Enter" && handleSubmit(e);
|
|
39417
39377
|
},
|
|
39418
39378
|
autocompleteValue: "address-line1",
|
|
39419
|
-
dataQa: "Address"
|
|
39420
|
-
isRequired: true
|
|
39379
|
+
dataQa: "Address"
|
|
39421
39380
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39422
39381
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39423
39382
|
field: fields.street2,
|
|
@@ -39427,8 +39386,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39427
39386
|
return e.key === "Enter" && handleSubmit(e);
|
|
39428
39387
|
},
|
|
39429
39388
|
autocompleteValue: "address-line2",
|
|
39430
|
-
dataQa: "Address Line 2"
|
|
39431
|
-
isRequired: false
|
|
39389
|
+
dataQa: "Address Line 2"
|
|
39432
39390
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39433
39391
|
labelTextWhenNoError: "City",
|
|
39434
39392
|
errorMessages: cityErrorMessages,
|
|
@@ -39439,8 +39397,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39439
39397
|
return e.key === "Enter" && handleSubmit(e);
|
|
39440
39398
|
},
|
|
39441
39399
|
autocompleteValue: "address-level2",
|
|
39442
|
-
dataQa: "City"
|
|
39443
|
-
isRequired: true
|
|
39400
|
+
dataQa: "City"
|
|
39444
39401
|
}), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
|
|
39445
39402
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39446
39403
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39451,8 +39408,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39451
39408
|
onKeyDown: function onKeyDown(e) {
|
|
39452
39409
|
return e.key === "Enter" && handleSubmit(e);
|
|
39453
39410
|
},
|
|
39454
|
-
dataQa: "State or Province"
|
|
39455
|
-
isRequired: true
|
|
39411
|
+
dataQa: "State or Province"
|
|
39456
39412
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39457
39413
|
isNum: isUS,
|
|
39458
39414
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39465,8 +39421,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39465
39421
|
return e.key === "Enter" && handleSubmit(e);
|
|
39466
39422
|
},
|
|
39467
39423
|
autocompleteValue: "postal-code",
|
|
39468
|
-
dataQa: "Zip code"
|
|
39469
|
-
isRequired: true
|
|
39424
|
+
dataQa: "Zip code"
|
|
39470
39425
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
39471
39426
|
name: "address checkbox",
|
|
39472
39427
|
title: "Save address to wallet",
|
|
@@ -47751,8 +47706,7 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47751
47706
|
title: "Terms and Conditions",
|
|
47752
47707
|
error: error,
|
|
47753
47708
|
checked: isChecked,
|
|
47754
|
-
onChange: onCheck
|
|
47755
|
-
isRequired: true
|
|
47709
|
+
onChange: onCheck
|
|
47756
47710
|
}), /*#__PURE__*/React__default.createElement(Box, {
|
|
47757
47711
|
padding: "0 0 0 58px"
|
|
47758
47712
|
}, /*#__PURE__*/React__default.createElement(Stack, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -47865,8 +47819,7 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47865
47819
|
checked: isChecked,
|
|
47866
47820
|
onChange: onCheck,
|
|
47867
47821
|
checkboxMargin: checkboxMargin,
|
|
47868
|
-
extraStyles: "align-self: flex-start;"
|
|
47869
|
-
isRequired: true
|
|
47822
|
+
extraStyles: "align-self: flex-start;"
|
|
47870
47823
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
47871
47824
|
childGap: "0.25rem",
|
|
47872
47825
|
fullHeight: true
|
|
@@ -47972,8 +47925,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47972
47925
|
onKeyDown: function onKeyDown(e) {
|
|
47973
47926
|
return e.key === "Enter" && handleSubmit(e);
|
|
47974
47927
|
},
|
|
47975
|
-
autocompleteValue: "name"
|
|
47976
|
-
isRequired: true
|
|
47928
|
+
autocompleteValue: "name"
|
|
47977
47929
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
47978
47930
|
labelTextWhenNoError: "Routing number",
|
|
47979
47931
|
dataQa: "Routing number",
|
|
@@ -47995,8 +47947,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47995
47947
|
},
|
|
47996
47948
|
onKeyDown: function onKeyDown(e) {
|
|
47997
47949
|
return e.key === "Enter" && handleSubmit(e);
|
|
47998
|
-
}
|
|
47999
|
-
isRequired: true
|
|
47950
|
+
}
|
|
48000
47951
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48001
47952
|
labelTextWhenNoError: "Confirm routing number",
|
|
48002
47953
|
dataQa: "Confirm routing number",
|
|
@@ -48007,7 +47958,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48007
47958
|
onKeyDown: function onKeyDown(e) {
|
|
48008
47959
|
return e.key === "Enter" && handleSubmit(e);
|
|
48009
47960
|
},
|
|
48010
|
-
isRequired: true,
|
|
48011
47961
|
isNum: true
|
|
48012
47962
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48013
47963
|
labelTextWhenNoError: "Account number",
|
|
@@ -48016,7 +47966,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48016
47966
|
field: fields.accountNumber,
|
|
48017
47967
|
fieldActions: actions.fields.accountNumber,
|
|
48018
47968
|
showErrors: showErrors,
|
|
48019
|
-
isRequired: true,
|
|
48020
47969
|
isNum: true,
|
|
48021
47970
|
helperModal: function helperModal() {
|
|
48022
47971
|
return /*#__PURE__*/React__default.createElement(AccountAndRoutingModal$1, {
|
|
@@ -48035,7 +47984,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48035
47984
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48036
47985
|
labelTextWhenNoError: "Confirm account number",
|
|
48037
47986
|
dataQa: "Confirm account number",
|
|
48038
|
-
isRequired: true,
|
|
48039
47987
|
errorMessages: confirmAccountNumberErrors,
|
|
48040
47988
|
field: fields.confirmAccountNumber,
|
|
48041
47989
|
fieldActions: actions.fields.confirmAccountNumber,
|
|
@@ -48046,7 +47994,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48046
47994
|
isNum: true
|
|
48047
47995
|
}), allowBankAccountType && /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
48048
47996
|
labelTextWhenNoError: "Account type",
|
|
48049
|
-
isRequired: true,
|
|
48050
47997
|
dataQa: "Account type",
|
|
48051
47998
|
options: [{
|
|
48052
47999
|
text: "Select account type",
|
|
@@ -48084,8 +48031,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48084
48031
|
version: "v2",
|
|
48085
48032
|
showCheckbox: false,
|
|
48086
48033
|
description: "View",
|
|
48087
|
-
terms: termsContent
|
|
48088
|
-
isRequired: true
|
|
48034
|
+
terms: termsContent
|
|
48089
48035
|
})))));
|
|
48090
48036
|
};
|
|
48091
48037
|
|
|
@@ -48178,7 +48124,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48178
48124
|
"aria-label": "Card payment"
|
|
48179
48125
|
}, /*#__PURE__*/React__default.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React__default.createElement(CountryDropdown, {
|
|
48180
48126
|
labelTextWhenNoError: "Country",
|
|
48181
|
-
isRequired: true,
|
|
48182
48127
|
errorMessages: countryErrorMessages,
|
|
48183
48128
|
field: fields.country,
|
|
48184
48129
|
onChange: function onChange(value) {
|
|
@@ -48201,8 +48146,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48201
48146
|
onKeyDown: function onKeyDown(e) {
|
|
48202
48147
|
return e.key === "Enter" && handleSubmit(e);
|
|
48203
48148
|
},
|
|
48204
|
-
autocompleteValue: "cc-name"
|
|
48205
|
-
isRequired: true
|
|
48149
|
+
autocompleteValue: "cc-name"
|
|
48206
48150
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48207
48151
|
labelTextWhenNoError: "Credit card number",
|
|
48208
48152
|
dataQa: "Credit card number",
|
|
@@ -48215,8 +48159,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48215
48159
|
return e.key === "Enter" && handleSubmit(e);
|
|
48216
48160
|
},
|
|
48217
48161
|
isNum: true,
|
|
48218
|
-
autocompleteValue: "cc-number"
|
|
48219
|
-
isRequired: true
|
|
48162
|
+
autocompleteValue: "cc-number"
|
|
48220
48163
|
}), /*#__PURE__*/React__default.createElement(FormInputRow, {
|
|
48221
48164
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48222
48165
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48234,8 +48177,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48234
48177
|
isNum: true,
|
|
48235
48178
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48236
48179
|
,
|
|
48237
|
-
autocompleteValue: "cc-exp"
|
|
48238
|
-
isRequired: true
|
|
48180
|
+
autocompleteValue: "cc-exp"
|
|
48239
48181
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48240
48182
|
labelTextWhenNoError: "CVV",
|
|
48241
48183
|
dataQa: "CVV",
|
|
@@ -48248,8 +48190,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48248
48190
|
onKeyDown: function onKeyDown(e) {
|
|
48249
48191
|
return e.key === "Enter" && handleSubmit(e);
|
|
48250
48192
|
},
|
|
48251
|
-
autocompleteValue: "cc-csc"
|
|
48252
|
-
isRequired: true
|
|
48193
|
+
autocompleteValue: "cc-csc"
|
|
48253
48194
|
})), !hideZipCode && /*#__PURE__*/React__default.createElement(Box, {
|
|
48254
48195
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48255
48196
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48265,8 +48206,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48265
48206
|
onKeyDown: function onKeyDown(e) {
|
|
48266
48207
|
return e.key === "Enter" && handleSubmit(e);
|
|
48267
48208
|
},
|
|
48268
|
-
autocompleteValue: "billing postal-code"
|
|
48269
|
-
isRequired: true
|
|
48209
|
+
autocompleteValue: "billing postal-code"
|
|
48270
48210
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48271
48211
|
childGap: "4px",
|
|
48272
48212
|
align: "center"
|
|
@@ -48282,8 +48222,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48282
48222
|
version: "v2",
|
|
48283
48223
|
showCheckbox: false,
|
|
48284
48224
|
description: "View",
|
|
48285
|
-
terms: termsContent
|
|
48286
|
-
isRequired: true
|
|
48225
|
+
terms: termsContent
|
|
48287
48226
|
})))));
|
|
48288
48227
|
};
|
|
48289
48228
|
|
|
@@ -48620,7 +48559,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48620
48559
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48621
48560
|
_ref$containerStyles = _ref.containerStyles,
|
|
48622
48561
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48623
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48562
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48563
|
+
_ref$ariaLabel = _ref.ariaLabel,
|
|
48564
|
+
ariaLabel = _ref$ariaLabel === void 0 ? "Please select an option." : _ref$ariaLabel;
|
|
48624
48565
|
|
|
48625
48566
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48626
48567
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48676,7 +48617,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48676
48617
|
extraStyles: containerStyles
|
|
48677
48618
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48678
48619
|
childGap: "0",
|
|
48679
|
-
role: "radiogroup"
|
|
48620
|
+
role: "radiogroup",
|
|
48621
|
+
"aria-label": ariaLabel
|
|
48680
48622
|
}, sections.filter(function (section) {
|
|
48681
48623
|
return !section.hidden;
|
|
48682
48624
|
}).map(function (section) {
|
|
@@ -48736,8 +48678,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48736
48678
|
toggleRadio: section.disabled ? noop : function () {
|
|
48737
48679
|
return toggleOpenSection(section.id);
|
|
48738
48680
|
},
|
|
48739
|
-
tabIndex: "-1"
|
|
48740
|
-
required: section === null || section === void 0 ? void 0 : section.required
|
|
48681
|
+
tabIndex: "-1"
|
|
48741
48682
|
})), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48742
48683
|
align: "center"
|
|
48743
48684
|
}, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48749,7 +48690,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48749
48690
|
}, section.title))), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48750
48691
|
childGap: "0.5rem",
|
|
48751
48692
|
"aria-label": (section === null || section === void 0 ? void 0 : section.rightIconsLabel) || null,
|
|
48752
|
-
role: (section === null || section === void 0 ? void 0 : section.rightIconsRole) ||
|
|
48693
|
+
role: (section === null || section === void 0 ? void 0 : section.rightIconsRole) || null
|
|
48753
48694
|
}, section.rightIcons.map(function (icon) {
|
|
48754
48695
|
return /*#__PURE__*/React__default.createElement(RightIcon, {
|
|
48755
48696
|
src: icon.img,
|