@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.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,
|
|
@@ -23794,11 +23791,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23794
23791
|
_ref13$smoothScroll = _ref13.smoothScroll,
|
|
23795
23792
|
smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
|
|
23796
23793
|
_ref13$ariaInvalid = _ref13.ariaInvalid,
|
|
23797
|
-
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid
|
|
23798
|
-
_ref13$isRequired = _ref13.isRequired,
|
|
23799
|
-
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
|
|
23800
|
-
|
|
23801
|
-
var required = options.required || isRequired;
|
|
23794
|
+
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid;
|
|
23802
23795
|
|
|
23803
23796
|
var _useState = useState(""),
|
|
23804
23797
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24047,7 +24040,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24047
24040
|
"aria-labelledby": ariaLabelledby,
|
|
24048
24041
|
"aria-describedby": ariaDescribedby,
|
|
24049
24042
|
"aria-expanded": isOpen,
|
|
24050
|
-
"aria-required": required,
|
|
24043
|
+
"aria-required": options.required,
|
|
24051
24044
|
"aria-invalid": ariaInvalid,
|
|
24052
24045
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
24053
24046
|
borderRadius: "2px",
|
|
@@ -24069,6 +24062,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24069
24062
|
},
|
|
24070
24063
|
padding: "12px",
|
|
24071
24064
|
placeholder: getSelection(),
|
|
24065
|
+
required: options.required,
|
|
24072
24066
|
role: "combobox",
|
|
24073
24067
|
themeValues: themeValues,
|
|
24074
24068
|
title: hasTitles ? getSelection() : null,
|
|
@@ -24076,9 +24070,6 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24076
24070
|
tabIndex: 0,
|
|
24077
24071
|
value: inputValue,
|
|
24078
24072
|
width: "100%"
|
|
24079
|
-
/* Non-semantic elements need the aria-* version of the attribute */
|
|
24080
|
-
,
|
|
24081
|
-
"aria-disabled": disabledValues.includes(inputValue)
|
|
24082
24073
|
}), /*#__PURE__*/React.createElement(IconWrapper, {
|
|
24083
24074
|
open: isOpen,
|
|
24084
24075
|
onClick: _onClick
|
|
@@ -24089,8 +24080,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24089
24080
|
widthFitOptions: widthFitOptions,
|
|
24090
24081
|
tabIndex: 0,
|
|
24091
24082
|
role: "listbox",
|
|
24092
|
-
id: "".concat(ariaLabelledby, "_listbox")
|
|
24093
|
-
required: required
|
|
24083
|
+
id: "".concat(ariaLabelledby, "_listbox")
|
|
24094
24084
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
24095
24085
|
childGap: "0",
|
|
24096
24086
|
as: "ul"
|
|
@@ -24240,9 +24230,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24240
24230
|
_ref$dataQa = _ref.dataQa,
|
|
24241
24231
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
24242
24232
|
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
24243
|
-
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions
|
|
24244
|
-
_ref$isRequired = _ref.isRequired,
|
|
24245
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
24233
|
+
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions;
|
|
24246
24234
|
|
|
24247
24235
|
var _useState = useState(false),
|
|
24248
24236
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24250,17 +24238,6 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24250
24238
|
setOpen = _useState2[1];
|
|
24251
24239
|
|
|
24252
24240
|
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
24241
|
|
|
24265
24242
|
var handleClickAway = function handleClickAway(event) {
|
|
24266
24243
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
@@ -24276,8 +24253,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24276
24253
|
});
|
|
24277
24254
|
return /*#__PURE__*/React.createElement(SelectContainer, {
|
|
24278
24255
|
ref: dropdownRef,
|
|
24279
|
-
"aria-role": "group",
|
|
24280
24256
|
disabled: disabled,
|
|
24257
|
+
"aria-disabled": disabled,
|
|
24281
24258
|
"data-qa": dataQa
|
|
24282
24259
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
24283
24260
|
padding: "0",
|
|
@@ -24291,10 +24268,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24291
24268
|
color: themeValues.labelColor,
|
|
24292
24269
|
weight: themeValues.fontWeight,
|
|
24293
24270
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
24294
|
-
id:
|
|
24271
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
24295
24272
|
}, labelTextWhenNoError))), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
24296
|
-
ariaLabelledby:
|
|
24297
|
-
ariaDescribedby:
|
|
24273
|
+
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24274
|
+
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24298
24275
|
maxHeight: dropdownMaxHeight,
|
|
24299
24276
|
widthFitOptions: widthFitOptions,
|
|
24300
24277
|
hasTitles: hasTitles,
|
|
@@ -24315,8 +24292,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24315
24292
|
},
|
|
24316
24293
|
disabled: disabled,
|
|
24317
24294
|
autocompleteValue: autocompleteValue,
|
|
24318
|
-
smoothScroll: smoothScroll
|
|
24319
|
-
isRequired: required
|
|
24295
|
+
smoothScroll: smoothScroll
|
|
24320
24296
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
24321
24297
|
direction: "row",
|
|
24322
24298
|
justify: "space-between"
|
|
@@ -25088,9 +25064,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25088
25064
|
showErrors = _ref.showErrors,
|
|
25089
25065
|
onChange = _ref.onChange,
|
|
25090
25066
|
_ref$dataQa = _ref.dataQa,
|
|
25091
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa
|
|
25092
|
-
_ref$isRequired = _ref.isRequired,
|
|
25093
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
25067
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25094
25068
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
25095
25069
|
options: options,
|
|
25096
25070
|
field: field,
|
|
@@ -25100,8 +25074,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25100
25074
|
errorMessages: errorMessages,
|
|
25101
25075
|
showErrors: showErrors,
|
|
25102
25076
|
onChange: onChange,
|
|
25103
|
-
autocompleteValue: "country-name"
|
|
25104
|
-
isRequired: isRequired
|
|
25077
|
+
autocompleteValue: "country-name"
|
|
25105
25078
|
});
|
|
25106
25079
|
};
|
|
25107
25080
|
|
|
@@ -25948,7 +25921,7 @@ var fallbackValues$k = {
|
|
|
25948
25921
|
};
|
|
25949
25922
|
|
|
25950
25923
|
var _excluded$p = ["showErrors", "themeValues"],
|
|
25951
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"
|
|
25924
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
|
|
25952
25925
|
var InputField = styled.input.withConfig({
|
|
25953
25926
|
displayName: "FormInput__InputField",
|
|
25954
25927
|
componentId: "sc-l094r1-0"
|
|
@@ -26035,8 +26008,6 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26035
26008
|
removeFromValue = _ref15.removeFromValue,
|
|
26036
26009
|
_ref15$dataQa = _ref15.dataQa,
|
|
26037
26010
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
26038
|
-
_ref15$isRequired = _ref15.isRequired,
|
|
26039
|
-
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
26040
26011
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
26041
26012
|
|
|
26042
26013
|
var _useState = useState(false),
|
|
@@ -26123,8 +26094,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26123
26094
|
$customHeight: customHeight,
|
|
26124
26095
|
$extraStyles: extraStyles,
|
|
26125
26096
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26126
|
-
autoComplete: autocompleteValue
|
|
26127
|
-
required: isRequired
|
|
26097
|
+
autoComplete: autocompleteValue
|
|
26128
26098
|
}, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
|
|
26129
26099
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26130
26100
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26143,8 +26113,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26143
26113
|
$customHeight: customHeight,
|
|
26144
26114
|
$extraStyles: extraStyles,
|
|
26145
26115
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26146
|
-
autoComplete: autocompleteValue
|
|
26147
|
-
required: isRequired
|
|
26116
|
+
autoComplete: autocompleteValue
|
|
26148
26117
|
}, props))), /*#__PURE__*/React.createElement(Stack, {
|
|
26149
26118
|
direction: "row",
|
|
26150
26119
|
justify: "space-between",
|
|
@@ -27277,7 +27246,7 @@ var HiddenRadioInput = styled.input.withConfig({
|
|
|
27277
27246
|
var Circle = styled.div.withConfig({
|
|
27278
27247
|
displayName: "RadioButtonWithLabel__Circle",
|
|
27279
27248
|
componentId: "sc-1m9whwg-1"
|
|
27280
|
-
})(["flex-shrink:0;margin-right:8px;width:1.5rem;height
|
|
27249
|
+
})(["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
27250
|
var inactiveBorderColor = _ref.inactiveBorderColor;
|
|
27282
27251
|
return "1px solid ".concat(inactiveBorderColor);
|
|
27283
27252
|
}, function (_ref2) {
|
|
@@ -27287,12 +27256,12 @@ var Circle = styled.div.withConfig({
|
|
|
27287
27256
|
var InputAndLabelContainer = styled(Cluster).withConfig({
|
|
27288
27257
|
displayName: "RadioButtonWithLabel__InputAndLabelContainer",
|
|
27289
27258
|
componentId: "sc-1m9whwg-2"
|
|
27290
|
-
})(["overflow:visible;", ":checked + label ", ":after{transform:scale(0.85);transition:transform 0.15s;}", ":checked + label ", "{border:", "
|
|
27259
|
+
})(["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
27260
|
var activeColor = _ref3.activeColor;
|
|
27292
|
-
return "1px solid "
|
|
27261
|
+
return "1px solid ".concat(activeColor, ";");
|
|
27293
27262
|
}, HiddenRadioInput, Circle, function (_ref4) {
|
|
27294
27263
|
var activeColor = _ref4.activeColor;
|
|
27295
|
-
return "0px 0px 2px 1px "
|
|
27264
|
+
return "0px 0px 2px 1px ".concat(activeColor, ";");
|
|
27296
27265
|
});
|
|
27297
27266
|
|
|
27298
27267
|
var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
@@ -27387,8 +27356,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27387
27356
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27388
27357
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27389
27358
|
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27390
|
-
_ref2$
|
|
27391
|
-
|
|
27359
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27360
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27392
27361
|
var buttonBorder = {
|
|
27393
27362
|
onFocused: {
|
|
27394
27363
|
borderColor: themeValues.activeColor,
|
|
@@ -27448,11 +27417,10 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27448
27417
|
type: "radio",
|
|
27449
27418
|
id: "radio-".concat(name),
|
|
27450
27419
|
disabled: disabled,
|
|
27451
|
-
required: required,
|
|
27452
|
-
"aria-required": required,
|
|
27453
27420
|
onClick: toggleRadio,
|
|
27454
27421
|
"aria-describedby": ariaDescribedBy,
|
|
27455
|
-
tabIndex: "-1"
|
|
27422
|
+
tabIndex: "-1",
|
|
27423
|
+
required: isRequired
|
|
27456
27424
|
}, extraProps)), /*#__PURE__*/React.createElement(Motion, {
|
|
27457
27425
|
borderWidth: "1px",
|
|
27458
27426
|
borderStyle: "solid",
|
|
@@ -38142,9 +38110,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38142
38110
|
field = _ref.field,
|
|
38143
38111
|
fieldActions = _ref.fieldActions,
|
|
38144
38112
|
showErrors = _ref.showErrors,
|
|
38145
|
-
countryCode = _ref.countryCode
|
|
38146
|
-
_ref$isRequired = _ref.isRequired,
|
|
38147
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
38113
|
+
countryCode = _ref.countryCode;
|
|
38148
38114
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38149
38115
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38150
38116
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
@@ -38154,8 +38120,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38154
38120
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38155
38121
|
errorMessages: errorMessages,
|
|
38156
38122
|
showErrors: showErrors,
|
|
38157
|
-
autocompleteValue: "address-level1"
|
|
38158
|
-
isRequired: isRequired
|
|
38123
|
+
autocompleteValue: "address-level1"
|
|
38159
38124
|
});
|
|
38160
38125
|
};
|
|
38161
38126
|
|
|
@@ -39481,7 +39446,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39481
39446
|
labelTextWhenNoError: "Country",
|
|
39482
39447
|
errorMessages: countryErrorMessages,
|
|
39483
39448
|
field: fields.country,
|
|
39484
|
-
isRequired: true,
|
|
39485
39449
|
onChange: function onChange(value) {
|
|
39486
39450
|
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39487
39451
|
// we can write a reset function for fields
|
|
@@ -39506,8 +39470,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39506
39470
|
return e.key === "Enter" && handleSubmit(e);
|
|
39507
39471
|
},
|
|
39508
39472
|
autocompleteValue: "address-line1",
|
|
39509
|
-
dataQa: "Address"
|
|
39510
|
-
isRequired: true
|
|
39473
|
+
dataQa: "Address"
|
|
39511
39474
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39512
39475
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39513
39476
|
field: fields.street2,
|
|
@@ -39517,8 +39480,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39517
39480
|
return e.key === "Enter" && handleSubmit(e);
|
|
39518
39481
|
},
|
|
39519
39482
|
autocompleteValue: "address-line2",
|
|
39520
|
-
dataQa: "Address Line 2"
|
|
39521
|
-
isRequired: false
|
|
39483
|
+
dataQa: "Address Line 2"
|
|
39522
39484
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39523
39485
|
labelTextWhenNoError: "City",
|
|
39524
39486
|
errorMessages: cityErrorMessages,
|
|
@@ -39529,8 +39491,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39529
39491
|
return e.key === "Enter" && handleSubmit(e);
|
|
39530
39492
|
},
|
|
39531
39493
|
autocompleteValue: "address-level2",
|
|
39532
|
-
dataQa: "City"
|
|
39533
|
-
isRequired: true
|
|
39494
|
+
dataQa: "City"
|
|
39534
39495
|
}), /*#__PURE__*/React.createElement(FormStateDropdown, {
|
|
39535
39496
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39536
39497
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39541,8 +39502,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39541
39502
|
onKeyDown: function onKeyDown(e) {
|
|
39542
39503
|
return e.key === "Enter" && handleSubmit(e);
|
|
39543
39504
|
},
|
|
39544
|
-
dataQa: "State or Province"
|
|
39545
|
-
isRequired: true
|
|
39505
|
+
dataQa: "State or Province"
|
|
39546
39506
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39547
39507
|
isNum: isUS,
|
|
39548
39508
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39555,8 +39515,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39555
39515
|
return e.key === "Enter" && handleSubmit(e);
|
|
39556
39516
|
},
|
|
39557
39517
|
autocompleteValue: "postal-code",
|
|
39558
|
-
dataQa: "Zip code"
|
|
39559
|
-
isRequired: true
|
|
39518
|
+
dataQa: "Zip code"
|
|
39560
39519
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
39561
39520
|
name: "address checkbox",
|
|
39562
39521
|
title: "Save address to wallet",
|
|
@@ -48023,8 +47982,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48023
47982
|
onKeyDown: function onKeyDown(e) {
|
|
48024
47983
|
return e.key === "Enter" && handleSubmit(e);
|
|
48025
47984
|
},
|
|
48026
|
-
autocompleteValue: "name"
|
|
48027
|
-
isRequired: true
|
|
47985
|
+
autocompleteValue: "name"
|
|
48028
47986
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48029
47987
|
labelTextWhenNoError: "Routing number",
|
|
48030
47988
|
dataQa: "Routing number",
|
|
@@ -48046,8 +48004,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48046
48004
|
},
|
|
48047
48005
|
onKeyDown: function onKeyDown(e) {
|
|
48048
48006
|
return e.key === "Enter" && handleSubmit(e);
|
|
48049
|
-
}
|
|
48050
|
-
isRequired: true
|
|
48007
|
+
}
|
|
48051
48008
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48052
48009
|
labelTextWhenNoError: "Confirm routing number",
|
|
48053
48010
|
dataQa: "Confirm routing number",
|
|
@@ -48058,7 +48015,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48058
48015
|
onKeyDown: function onKeyDown(e) {
|
|
48059
48016
|
return e.key === "Enter" && handleSubmit(e);
|
|
48060
48017
|
},
|
|
48061
|
-
isRequired: true,
|
|
48062
48018
|
isNum: true
|
|
48063
48019
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48064
48020
|
labelTextWhenNoError: "Account number",
|
|
@@ -48067,7 +48023,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48067
48023
|
field: fields.accountNumber,
|
|
48068
48024
|
fieldActions: actions.fields.accountNumber,
|
|
48069
48025
|
showErrors: showErrors,
|
|
48070
|
-
isRequired: true,
|
|
48071
48026
|
isNum: true,
|
|
48072
48027
|
helperModal: function helperModal() {
|
|
48073
48028
|
return /*#__PURE__*/React.createElement(AccountAndRoutingModal$1, {
|
|
@@ -48086,7 +48041,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48086
48041
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48087
48042
|
labelTextWhenNoError: "Confirm account number",
|
|
48088
48043
|
dataQa: "Confirm account number",
|
|
48089
|
-
isRequired: true,
|
|
48090
48044
|
errorMessages: confirmAccountNumberErrors,
|
|
48091
48045
|
field: fields.confirmAccountNumber,
|
|
48092
48046
|
fieldActions: actions.fields.confirmAccountNumber,
|
|
@@ -48097,7 +48051,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48097
48051
|
isNum: true
|
|
48098
48052
|
}), allowBankAccountType && /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
48099
48053
|
labelTextWhenNoError: "Account type",
|
|
48100
|
-
isRequired: true,
|
|
48101
48054
|
dataQa: "Account type",
|
|
48102
48055
|
options: [{
|
|
48103
48056
|
text: "Select account type",
|
|
@@ -48228,7 +48181,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48228
48181
|
"aria-label": "Card payment"
|
|
48229
48182
|
}, /*#__PURE__*/React.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React.createElement(CountryDropdown, {
|
|
48230
48183
|
labelTextWhenNoError: "Country",
|
|
48231
|
-
isRequired: true,
|
|
48232
48184
|
errorMessages: countryErrorMessages,
|
|
48233
48185
|
field: fields.country,
|
|
48234
48186
|
onChange: function onChange(value) {
|
|
@@ -48251,10 +48203,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48251
48203
|
onKeyDown: function onKeyDown(e) {
|
|
48252
48204
|
return e.key === "Enter" && handleSubmit(e);
|
|
48253
48205
|
},
|
|
48254
|
-
autocompleteValue: "cc-name"
|
|
48255
|
-
isRequired: true
|
|
48206
|
+
autocompleteValue: "cc-name"
|
|
48256
48207
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48257
|
-
isRequired: true,
|
|
48258
48208
|
labelTextWhenNoError: "Credit card number",
|
|
48259
48209
|
dataQa: "Credit card number",
|
|
48260
48210
|
errorMessages: creditCardNumberErrors,
|
|
@@ -48284,8 +48234,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48284
48234
|
isNum: true,
|
|
48285
48235
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48286
48236
|
,
|
|
48287
|
-
autocompleteValue: "cc-exp"
|
|
48288
|
-
isRequired: true
|
|
48237
|
+
autocompleteValue: "cc-exp"
|
|
48289
48238
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48290
48239
|
labelTextWhenNoError: "CVV",
|
|
48291
48240
|
dataQa: "CVV",
|
|
@@ -48298,8 +48247,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48298
48247
|
onKeyDown: function onKeyDown(e) {
|
|
48299
48248
|
return e.key === "Enter" && handleSubmit(e);
|
|
48300
48249
|
},
|
|
48301
|
-
autocompleteValue: "cc-csc"
|
|
48302
|
-
isRequired: true
|
|
48250
|
+
autocompleteValue: "cc-csc"
|
|
48303
48251
|
})), !hideZipCode && /*#__PURE__*/React.createElement(Box, {
|
|
48304
48252
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48305
48253
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48315,8 +48263,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48315
48263
|
onKeyDown: function onKeyDown(e) {
|
|
48316
48264
|
return e.key === "Enter" && handleSubmit(e);
|
|
48317
48265
|
},
|
|
48318
|
-
autocompleteValue: "billing postal-code"
|
|
48319
|
-
isRequired: true
|
|
48266
|
+
autocompleteValue: "billing postal-code"
|
|
48320
48267
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React.createElement(Cluster, {
|
|
48321
48268
|
childGap: "4px",
|
|
48322
48269
|
align: "center"
|
|
@@ -48564,7 +48511,7 @@ PhoneForm.mapDispatchToProps = mapDispatchToProps$8;
|
|
|
48564
48511
|
var DefaultHeading = styled.div.withConfig({
|
|
48565
48512
|
displayName: "RadioGroup__DefaultHeading",
|
|
48566
48513
|
componentId: "sc-7lqrl8-0"
|
|
48567
|
-
})(["font-size:0.875rem;color:", "
|
|
48514
|
+
})(["font-size:0.875rem;color:", " margin:0;padding:8px 0px;"], CHARADE_GREY);
|
|
48568
48515
|
var StyledFieldset = styled.fieldset.withConfig({
|
|
48569
48516
|
displayName: "RadioGroup__StyledFieldset",
|
|
48570
48517
|
componentId: "sc-7lqrl8-1"
|
|
@@ -48669,7 +48616,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48669
48616
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48670
48617
|
_ref$containerStyles = _ref.containerStyles,
|
|
48671
48618
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48672
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48619
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48620
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48621
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48673
48622
|
|
|
48674
48623
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48675
48624
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48725,7 +48674,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48725
48674
|
extraStyles: containerStyles
|
|
48726
48675
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48727
48676
|
childGap: "0",
|
|
48728
|
-
role: "radiogroup"
|
|
48677
|
+
role: "radiogroup",
|
|
48678
|
+
"aria-required": isSectionRequired
|
|
48729
48679
|
}, sections.filter(function (section) {
|
|
48730
48680
|
return !section.hidden;
|
|
48731
48681
|
}).map(function (section) {
|
|
@@ -48747,7 +48697,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48747
48697
|
extraStyles: borderStyles,
|
|
48748
48698
|
role: "radio",
|
|
48749
48699
|
"aria-checked": openSection === section.id,
|
|
48750
|
-
"aria-disabled": section.disabled
|
|
48700
|
+
"aria-disabled": section.disabled,
|
|
48701
|
+
"aria-required": !!(section !== null && section !== void 0 && section.required)
|
|
48751
48702
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48752
48703
|
childGap: "0"
|
|
48753
48704
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48786,7 +48737,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48786
48737
|
return toggleOpenSection(section.id);
|
|
48787
48738
|
},
|
|
48788
48739
|
tabIndex: "-1",
|
|
48789
|
-
|
|
48740
|
+
isRequired: !!(section !== null && section !== void 0 && section.required)
|
|
48790
48741
|
})), section.titleIcon && /*#__PURE__*/React.createElement(Cluster, {
|
|
48791
48742
|
align: "center"
|
|
48792
48743
|
}, section.titleIcon), /*#__PURE__*/React.createElement(Box, {
|