@thecb/components 9.2.3-beta.3 → 9.2.4-beta.10
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 +47 -96
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +47 -96
- 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 -3
- 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/radio-button-with-label/RadioButtonWithLabel.js +6 -9
- 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 -6
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +0 -6
- package/src/components/molecules/radio-group/RadioGroup.js +1 -1
- package/src/components/molecules/radio-section/RadioSection.js +5 -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,
|
|
@@ -23802,11 +23799,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23802
23799
|
_ref13$smoothScroll = _ref13.smoothScroll,
|
|
23803
23800
|
smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
|
|
23804
23801
|
_ref13$ariaInvalid = _ref13.ariaInvalid,
|
|
23805
|
-
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid
|
|
23806
|
-
_ref13$isRequired = _ref13.isRequired,
|
|
23807
|
-
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
|
|
23808
|
-
|
|
23809
|
-
var required = options.required || isRequired;
|
|
23802
|
+
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid;
|
|
23810
23803
|
|
|
23811
23804
|
var _useState = React.useState(""),
|
|
23812
23805
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24055,7 +24048,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24055
24048
|
"aria-labelledby": ariaLabelledby,
|
|
24056
24049
|
"aria-describedby": ariaDescribedby,
|
|
24057
24050
|
"aria-expanded": isOpen,
|
|
24058
|
-
"aria-required": required,
|
|
24051
|
+
"aria-required": options.required,
|
|
24059
24052
|
"aria-invalid": ariaInvalid,
|
|
24060
24053
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
24061
24054
|
borderRadius: "2px",
|
|
@@ -24077,6 +24070,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24077
24070
|
},
|
|
24078
24071
|
padding: "12px",
|
|
24079
24072
|
placeholder: getSelection(),
|
|
24073
|
+
required: options.required,
|
|
24080
24074
|
role: "combobox",
|
|
24081
24075
|
themeValues: themeValues,
|
|
24082
24076
|
title: hasTitles ? getSelection() : null,
|
|
@@ -24084,9 +24078,6 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24084
24078
|
tabIndex: 0,
|
|
24085
24079
|
value: inputValue,
|
|
24086
24080
|
width: "100%"
|
|
24087
|
-
/* Non-semantic elements need the aria-* version of the attribute */
|
|
24088
|
-
,
|
|
24089
|
-
"aria-disabled": disabledValues.includes(inputValue)
|
|
24090
24081
|
}), /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
24091
24082
|
open: isOpen,
|
|
24092
24083
|
onClick: _onClick
|
|
@@ -24097,8 +24088,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24097
24088
|
widthFitOptions: widthFitOptions,
|
|
24098
24089
|
tabIndex: 0,
|
|
24099
24090
|
role: "listbox",
|
|
24100
|
-
id: "".concat(ariaLabelledby, "_listbox")
|
|
24101
|
-
required: required
|
|
24091
|
+
id: "".concat(ariaLabelledby, "_listbox")
|
|
24102
24092
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
24103
24093
|
childGap: "0",
|
|
24104
24094
|
as: "ul"
|
|
@@ -24248,9 +24238,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24248
24238
|
_ref$dataQa = _ref.dataQa,
|
|
24249
24239
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
24250
24240
|
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
24251
|
-
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions
|
|
24252
|
-
_ref$isRequired = _ref.isRequired,
|
|
24253
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
24241
|
+
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions;
|
|
24254
24242
|
|
|
24255
24243
|
var _useState = React.useState(false),
|
|
24256
24244
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24258,17 +24246,6 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24258
24246
|
setOpen = _useState2[1];
|
|
24259
24247
|
|
|
24260
24248
|
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
24249
|
|
|
24273
24250
|
var handleClickAway = function handleClickAway(event) {
|
|
24274
24251
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
@@ -24284,8 +24261,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24284
24261
|
});
|
|
24285
24262
|
return /*#__PURE__*/React__default.createElement(SelectContainer, {
|
|
24286
24263
|
ref: dropdownRef,
|
|
24287
|
-
"aria-role": "group",
|
|
24288
24264
|
disabled: disabled,
|
|
24265
|
+
"aria-disabled": disabled,
|
|
24289
24266
|
"data-qa": dataQa
|
|
24290
24267
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
24291
24268
|
padding: "0",
|
|
@@ -24299,10 +24276,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24299
24276
|
color: themeValues.labelColor,
|
|
24300
24277
|
weight: themeValues.fontWeight,
|
|
24301
24278
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
24302
|
-
id:
|
|
24279
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
24303
24280
|
}, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
24304
|
-
ariaLabelledby:
|
|
24305
|
-
ariaDescribedby:
|
|
24281
|
+
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24282
|
+
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24306
24283
|
maxHeight: dropdownMaxHeight,
|
|
24307
24284
|
widthFitOptions: widthFitOptions,
|
|
24308
24285
|
hasTitles: hasTitles,
|
|
@@ -24323,8 +24300,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24323
24300
|
},
|
|
24324
24301
|
disabled: disabled,
|
|
24325
24302
|
autocompleteValue: autocompleteValue,
|
|
24326
|
-
smoothScroll: smoothScroll
|
|
24327
|
-
isRequired: required
|
|
24303
|
+
smoothScroll: smoothScroll
|
|
24328
24304
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
24329
24305
|
direction: "row",
|
|
24330
24306
|
justify: "space-between"
|
|
@@ -25096,9 +25072,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25096
25072
|
showErrors = _ref.showErrors,
|
|
25097
25073
|
onChange = _ref.onChange,
|
|
25098
25074
|
_ref$dataQa = _ref.dataQa,
|
|
25099
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa
|
|
25100
|
-
_ref$isRequired = _ref.isRequired,
|
|
25101
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
25075
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25102
25076
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
25103
25077
|
options: options,
|
|
25104
25078
|
field: field,
|
|
@@ -25108,8 +25082,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25108
25082
|
errorMessages: errorMessages,
|
|
25109
25083
|
showErrors: showErrors,
|
|
25110
25084
|
onChange: onChange,
|
|
25111
|
-
autocompleteValue: "country-name"
|
|
25112
|
-
isRequired: isRequired
|
|
25085
|
+
autocompleteValue: "country-name"
|
|
25113
25086
|
});
|
|
25114
25087
|
};
|
|
25115
25088
|
|
|
@@ -25956,7 +25929,7 @@ var fallbackValues$k = {
|
|
|
25956
25929
|
};
|
|
25957
25930
|
|
|
25958
25931
|
var _excluded$p = ["showErrors", "themeValues"],
|
|
25959
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"
|
|
25932
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
|
|
25960
25933
|
var InputField = styled__default.input.withConfig({
|
|
25961
25934
|
displayName: "FormInput__InputField",
|
|
25962
25935
|
componentId: "sc-l094r1-0"
|
|
@@ -26043,8 +26016,6 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26043
26016
|
removeFromValue = _ref15.removeFromValue,
|
|
26044
26017
|
_ref15$dataQa = _ref15.dataQa,
|
|
26045
26018
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
26046
|
-
_ref15$isRequired = _ref15.isRequired,
|
|
26047
|
-
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
26048
26019
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
26049
26020
|
|
|
26050
26021
|
var _useState = React.useState(false),
|
|
@@ -26131,8 +26102,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26131
26102
|
$customHeight: customHeight,
|
|
26132
26103
|
$extraStyles: extraStyles,
|
|
26133
26104
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26134
|
-
autoComplete: autocompleteValue
|
|
26135
|
-
required: isRequired
|
|
26105
|
+
autoComplete: autocompleteValue
|
|
26136
26106
|
}, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
|
|
26137
26107
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26138
26108
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26151,8 +26121,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26151
26121
|
$customHeight: customHeight,
|
|
26152
26122
|
$extraStyles: extraStyles,
|
|
26153
26123
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26154
|
-
autoComplete: autocompleteValue
|
|
26155
|
-
required: isRequired
|
|
26124
|
+
autoComplete: autocompleteValue
|
|
26156
26125
|
}, props))), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26157
26126
|
direction: "row",
|
|
26158
26127
|
justify: "space-between",
|
|
@@ -27285,7 +27254,7 @@ var HiddenRadioInput = styled__default.input.withConfig({
|
|
|
27285
27254
|
var Circle = styled__default.div.withConfig({
|
|
27286
27255
|
displayName: "RadioButtonWithLabel__Circle",
|
|
27287
27256
|
componentId: "sc-1m9whwg-1"
|
|
27288
|
-
})(["flex-shrink:0;margin-right:8px;width:1.5rem;height
|
|
27257
|
+
})(["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
27258
|
var inactiveBorderColor = _ref.inactiveBorderColor;
|
|
27290
27259
|
return "1px solid ".concat(inactiveBorderColor);
|
|
27291
27260
|
}, function (_ref2) {
|
|
@@ -27295,12 +27264,12 @@ var Circle = styled__default.div.withConfig({
|
|
|
27295
27264
|
var InputAndLabelContainer = styled__default(Cluster).withConfig({
|
|
27296
27265
|
displayName: "RadioButtonWithLabel__InputAndLabelContainer",
|
|
27297
27266
|
componentId: "sc-1m9whwg-2"
|
|
27298
|
-
})(["overflow:visible;", ":checked + label ", ":after{transform:scale(0.85);transition:transform 0.15s;}", ":checked + label ", "{border:", "
|
|
27267
|
+
})(["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
27268
|
var activeColor = _ref3.activeColor;
|
|
27300
|
-
return "1px solid "
|
|
27269
|
+
return "1px solid ".concat(activeColor, ";");
|
|
27301
27270
|
}, HiddenRadioInput, Circle, function (_ref4) {
|
|
27302
27271
|
var activeColor = _ref4.activeColor;
|
|
27303
|
-
return "0px 0px 2px 1px "
|
|
27272
|
+
return "0px 0px 2px 1px ".concat(activeColor, ";");
|
|
27304
27273
|
});
|
|
27305
27274
|
|
|
27306
27275
|
var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
@@ -27395,8 +27364,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27395
27364
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27396
27365
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27397
27366
|
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27398
|
-
_ref2$
|
|
27399
|
-
|
|
27367
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27368
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27400
27369
|
var buttonBorder = {
|
|
27401
27370
|
onFocused: {
|
|
27402
27371
|
borderColor: themeValues.activeColor,
|
|
@@ -27456,11 +27425,10 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27456
27425
|
type: "radio",
|
|
27457
27426
|
id: "radio-".concat(name),
|
|
27458
27427
|
disabled: disabled,
|
|
27459
|
-
required: required,
|
|
27460
|
-
"aria-required": required,
|
|
27461
27428
|
onClick: toggleRadio,
|
|
27462
27429
|
"aria-describedby": ariaDescribedBy,
|
|
27463
|
-
tabIndex: "-1"
|
|
27430
|
+
tabIndex: "-1",
|
|
27431
|
+
required: isRequired
|
|
27464
27432
|
}, extraProps)), /*#__PURE__*/React__default.createElement(Motion, {
|
|
27465
27433
|
borderWidth: "1px",
|
|
27466
27434
|
borderStyle: "solid",
|
|
@@ -38150,9 +38118,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38150
38118
|
field = _ref.field,
|
|
38151
38119
|
fieldActions = _ref.fieldActions,
|
|
38152
38120
|
showErrors = _ref.showErrors,
|
|
38153
|
-
countryCode = _ref.countryCode
|
|
38154
|
-
_ref$isRequired = _ref.isRequired,
|
|
38155
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
38121
|
+
countryCode = _ref.countryCode;
|
|
38156
38122
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38157
38123
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38158
38124
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
@@ -38162,8 +38128,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38162
38128
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38163
38129
|
errorMessages: errorMessages,
|
|
38164
38130
|
showErrors: showErrors,
|
|
38165
|
-
autocompleteValue: "address-level1"
|
|
38166
|
-
isRequired: isRequired
|
|
38131
|
+
autocompleteValue: "address-level1"
|
|
38167
38132
|
});
|
|
38168
38133
|
};
|
|
38169
38134
|
|
|
@@ -39489,7 +39454,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39489
39454
|
labelTextWhenNoError: "Country",
|
|
39490
39455
|
errorMessages: countryErrorMessages,
|
|
39491
39456
|
field: fields.country,
|
|
39492
|
-
isRequired: true,
|
|
39493
39457
|
onChange: function onChange(value) {
|
|
39494
39458
|
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39495
39459
|
// we can write a reset function for fields
|
|
@@ -39514,8 +39478,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39514
39478
|
return e.key === "Enter" && handleSubmit(e);
|
|
39515
39479
|
},
|
|
39516
39480
|
autocompleteValue: "address-line1",
|
|
39517
|
-
dataQa: "Address"
|
|
39518
|
-
isRequired: true
|
|
39481
|
+
dataQa: "Address"
|
|
39519
39482
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39520
39483
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39521
39484
|
field: fields.street2,
|
|
@@ -39525,8 +39488,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39525
39488
|
return e.key === "Enter" && handleSubmit(e);
|
|
39526
39489
|
},
|
|
39527
39490
|
autocompleteValue: "address-line2",
|
|
39528
|
-
dataQa: "Address Line 2"
|
|
39529
|
-
isRequired: false
|
|
39491
|
+
dataQa: "Address Line 2"
|
|
39530
39492
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39531
39493
|
labelTextWhenNoError: "City",
|
|
39532
39494
|
errorMessages: cityErrorMessages,
|
|
@@ -39537,8 +39499,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39537
39499
|
return e.key === "Enter" && handleSubmit(e);
|
|
39538
39500
|
},
|
|
39539
39501
|
autocompleteValue: "address-level2",
|
|
39540
|
-
dataQa: "City"
|
|
39541
|
-
isRequired: true
|
|
39502
|
+
dataQa: "City"
|
|
39542
39503
|
}), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
|
|
39543
39504
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39544
39505
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39549,8 +39510,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39549
39510
|
onKeyDown: function onKeyDown(e) {
|
|
39550
39511
|
return e.key === "Enter" && handleSubmit(e);
|
|
39551
39512
|
},
|
|
39552
|
-
dataQa: "State or Province"
|
|
39553
|
-
isRequired: true
|
|
39513
|
+
dataQa: "State or Province"
|
|
39554
39514
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39555
39515
|
isNum: isUS,
|
|
39556
39516
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39563,8 +39523,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39563
39523
|
return e.key === "Enter" && handleSubmit(e);
|
|
39564
39524
|
},
|
|
39565
39525
|
autocompleteValue: "postal-code",
|
|
39566
|
-
dataQa: "Zip code"
|
|
39567
|
-
isRequired: true
|
|
39526
|
+
dataQa: "Zip code"
|
|
39568
39527
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
39569
39528
|
name: "address checkbox",
|
|
39570
39529
|
title: "Save address to wallet",
|
|
@@ -48031,8 +47990,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48031
47990
|
onKeyDown: function onKeyDown(e) {
|
|
48032
47991
|
return e.key === "Enter" && handleSubmit(e);
|
|
48033
47992
|
},
|
|
48034
|
-
autocompleteValue: "name"
|
|
48035
|
-
isRequired: true
|
|
47993
|
+
autocompleteValue: "name"
|
|
48036
47994
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48037
47995
|
labelTextWhenNoError: "Routing number",
|
|
48038
47996
|
dataQa: "Routing number",
|
|
@@ -48054,8 +48012,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48054
48012
|
},
|
|
48055
48013
|
onKeyDown: function onKeyDown(e) {
|
|
48056
48014
|
return e.key === "Enter" && handleSubmit(e);
|
|
48057
|
-
}
|
|
48058
|
-
isRequired: true
|
|
48015
|
+
}
|
|
48059
48016
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48060
48017
|
labelTextWhenNoError: "Confirm routing number",
|
|
48061
48018
|
dataQa: "Confirm routing number",
|
|
@@ -48066,7 +48023,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48066
48023
|
onKeyDown: function onKeyDown(e) {
|
|
48067
48024
|
return e.key === "Enter" && handleSubmit(e);
|
|
48068
48025
|
},
|
|
48069
|
-
isRequired: true,
|
|
48070
48026
|
isNum: true
|
|
48071
48027
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48072
48028
|
labelTextWhenNoError: "Account number",
|
|
@@ -48075,7 +48031,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48075
48031
|
field: fields.accountNumber,
|
|
48076
48032
|
fieldActions: actions.fields.accountNumber,
|
|
48077
48033
|
showErrors: showErrors,
|
|
48078
|
-
isRequired: true,
|
|
48079
48034
|
isNum: true,
|
|
48080
48035
|
helperModal: function helperModal() {
|
|
48081
48036
|
return /*#__PURE__*/React__default.createElement(AccountAndRoutingModal$1, {
|
|
@@ -48094,7 +48049,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48094
48049
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48095
48050
|
labelTextWhenNoError: "Confirm account number",
|
|
48096
48051
|
dataQa: "Confirm account number",
|
|
48097
|
-
isRequired: true,
|
|
48098
48052
|
errorMessages: confirmAccountNumberErrors,
|
|
48099
48053
|
field: fields.confirmAccountNumber,
|
|
48100
48054
|
fieldActions: actions.fields.confirmAccountNumber,
|
|
@@ -48105,7 +48059,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48105
48059
|
isNum: true
|
|
48106
48060
|
}), allowBankAccountType && /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
48107
48061
|
labelTextWhenNoError: "Account type",
|
|
48108
|
-
isRequired: true,
|
|
48109
48062
|
dataQa: "Account type",
|
|
48110
48063
|
options: [{
|
|
48111
48064
|
text: "Select account type",
|
|
@@ -48236,7 +48189,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48236
48189
|
"aria-label": "Card payment"
|
|
48237
48190
|
}, /*#__PURE__*/React__default.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React__default.createElement(CountryDropdown, {
|
|
48238
48191
|
labelTextWhenNoError: "Country",
|
|
48239
|
-
isRequired: true,
|
|
48240
48192
|
errorMessages: countryErrorMessages,
|
|
48241
48193
|
field: fields.country,
|
|
48242
48194
|
onChange: function onChange(value) {
|
|
@@ -48259,10 +48211,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48259
48211
|
onKeyDown: function onKeyDown(e) {
|
|
48260
48212
|
return e.key === "Enter" && handleSubmit(e);
|
|
48261
48213
|
},
|
|
48262
|
-
autocompleteValue: "cc-name"
|
|
48263
|
-
isRequired: true
|
|
48214
|
+
autocompleteValue: "cc-name"
|
|
48264
48215
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48265
|
-
isRequired: true,
|
|
48266
48216
|
labelTextWhenNoError: "Credit card number",
|
|
48267
48217
|
dataQa: "Credit card number",
|
|
48268
48218
|
errorMessages: creditCardNumberErrors,
|
|
@@ -48292,8 +48242,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48292
48242
|
isNum: true,
|
|
48293
48243
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48294
48244
|
,
|
|
48295
|
-
autocompleteValue: "cc-exp"
|
|
48296
|
-
isRequired: true
|
|
48245
|
+
autocompleteValue: "cc-exp"
|
|
48297
48246
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48298
48247
|
labelTextWhenNoError: "CVV",
|
|
48299
48248
|
dataQa: "CVV",
|
|
@@ -48306,8 +48255,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48306
48255
|
onKeyDown: function onKeyDown(e) {
|
|
48307
48256
|
return e.key === "Enter" && handleSubmit(e);
|
|
48308
48257
|
},
|
|
48309
|
-
autocompleteValue: "cc-csc"
|
|
48310
|
-
isRequired: true
|
|
48258
|
+
autocompleteValue: "cc-csc"
|
|
48311
48259
|
})), !hideZipCode && /*#__PURE__*/React__default.createElement(Box, {
|
|
48312
48260
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48313
48261
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48323,8 +48271,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48323
48271
|
onKeyDown: function onKeyDown(e) {
|
|
48324
48272
|
return e.key === "Enter" && handleSubmit(e);
|
|
48325
48273
|
},
|
|
48326
|
-
autocompleteValue: "billing postal-code"
|
|
48327
|
-
isRequired: true
|
|
48274
|
+
autocompleteValue: "billing postal-code"
|
|
48328
48275
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48329
48276
|
childGap: "4px",
|
|
48330
48277
|
align: "center"
|
|
@@ -48572,7 +48519,7 @@ PhoneForm.mapDispatchToProps = mapDispatchToProps$8;
|
|
|
48572
48519
|
var DefaultHeading = styled__default.div.withConfig({
|
|
48573
48520
|
displayName: "RadioGroup__DefaultHeading",
|
|
48574
48521
|
componentId: "sc-7lqrl8-0"
|
|
48575
|
-
})(["font-size:0.875rem;color:", "
|
|
48522
|
+
})(["font-size:0.875rem;color:", " margin:0;padding:8px 0px;"], CHARADE_GREY);
|
|
48576
48523
|
var StyledFieldset = styled__default.fieldset.withConfig({
|
|
48577
48524
|
displayName: "RadioGroup__StyledFieldset",
|
|
48578
48525
|
componentId: "sc-7lqrl8-1"
|
|
@@ -48677,7 +48624,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48677
48624
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48678
48625
|
_ref$containerStyles = _ref.containerStyles,
|
|
48679
48626
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48680
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48627
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48628
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48629
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48681
48630
|
|
|
48682
48631
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48683
48632
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48733,7 +48682,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48733
48682
|
extraStyles: containerStyles
|
|
48734
48683
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48735
48684
|
childGap: "0",
|
|
48736
|
-
role: "radiogroup"
|
|
48685
|
+
role: "radiogroup",
|
|
48686
|
+
"aria-required": isSectionRequired
|
|
48737
48687
|
}, sections.filter(function (section) {
|
|
48738
48688
|
return !section.hidden;
|
|
48739
48689
|
}).map(function (section) {
|
|
@@ -48755,7 +48705,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48755
48705
|
extraStyles: borderStyles,
|
|
48756
48706
|
role: "radio",
|
|
48757
48707
|
"aria-checked": openSection === section.id,
|
|
48758
|
-
"aria-disabled": section.disabled
|
|
48708
|
+
"aria-disabled": section.disabled,
|
|
48709
|
+
"aria-required": !!(section !== null && section !== void 0 && section.required)
|
|
48759
48710
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48760
48711
|
childGap: "0"
|
|
48761
48712
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48794,7 +48745,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48794
48745
|
return toggleOpenSection(section.id);
|
|
48795
48746
|
},
|
|
48796
48747
|
tabIndex: "-1",
|
|
48797
|
-
|
|
48748
|
+
isRequired: !!(section !== null && section !== void 0 && section.required)
|
|
48798
48749
|
})), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48799
48750
|
align: "center"
|
|
48800
48751
|
}, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {
|