@thecb/components 9.2.4-beta.5 → 9.2.4-beta.6
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 +50 -112
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +50 -112
- 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 +7 -12
- 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 +2 -5
- package/src/components/molecules/radio-group/RadioGroup.stories.js +0 -1
- package/src/components/molecules/radio-section/RadioSection.js +125 -136
- package/src/components/molecules/radio-section/RadioSection.stories.js +2 -7
- 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) {
|
|
@@ -27310,9 +27279,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27310
27279
|
_ref5$handleChange = _ref5.handleChange,
|
|
27311
27280
|
handleChange = _ref5$handleChange === void 0 ? noop : _ref5$handleChange,
|
|
27312
27281
|
field = _ref5.field,
|
|
27313
|
-
config = _ref5.config
|
|
27314
|
-
_ref5$isRequired = _ref5.isRequired,
|
|
27315
|
-
isRequired = _ref5$isRequired === void 0 ? false : _ref5$isRequired;
|
|
27282
|
+
config = _ref5.config;
|
|
27316
27283
|
|
|
27317
27284
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
27318
27285
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
@@ -27345,8 +27312,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27345
27312
|
setValue(e.target.value);
|
|
27346
27313
|
handleChange(e);
|
|
27347
27314
|
},
|
|
27348
|
-
defaultChecked: getDefaultChecked(value, index)
|
|
27349
|
-
required: isRequired
|
|
27315
|
+
defaultChecked: getDefaultChecked(value, index)
|
|
27350
27316
|
}), /*#__PURE__*/React.createElement(Text$1, {
|
|
27351
27317
|
as: "label",
|
|
27352
27318
|
htmlFor: id,
|
|
@@ -27390,8 +27356,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27390
27356
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27391
27357
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27392
27358
|
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27393
|
-
_ref2$
|
|
27394
|
-
|
|
27359
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27360
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27395
27361
|
var buttonBorder = {
|
|
27396
27362
|
onFocused: {
|
|
27397
27363
|
borderColor: themeValues.activeColor,
|
|
@@ -27451,11 +27417,10 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27451
27417
|
type: "radio",
|
|
27452
27418
|
id: "radio-".concat(name),
|
|
27453
27419
|
disabled: disabled,
|
|
27454
|
-
required: required,
|
|
27455
|
-
"aria-required": required,
|
|
27456
27420
|
onClick: toggleRadio,
|
|
27457
27421
|
"aria-describedby": ariaDescribedBy,
|
|
27458
|
-
tabIndex: "-1"
|
|
27422
|
+
tabIndex: "-1",
|
|
27423
|
+
required: isRequired
|
|
27459
27424
|
}, extraProps)), /*#__PURE__*/React.createElement(Motion, {
|
|
27460
27425
|
borderWidth: "1px",
|
|
27461
27426
|
borderStyle: "solid",
|
|
@@ -38145,9 +38110,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38145
38110
|
field = _ref.field,
|
|
38146
38111
|
fieldActions = _ref.fieldActions,
|
|
38147
38112
|
showErrors = _ref.showErrors,
|
|
38148
|
-
countryCode = _ref.countryCode
|
|
38149
|
-
_ref$isRequired = _ref.isRequired,
|
|
38150
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
38113
|
+
countryCode = _ref.countryCode;
|
|
38151
38114
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38152
38115
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38153
38116
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
@@ -38157,8 +38120,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38157
38120
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38158
38121
|
errorMessages: errorMessages,
|
|
38159
38122
|
showErrors: showErrors,
|
|
38160
|
-
autocompleteValue: "address-level1"
|
|
38161
|
-
isRequired: isRequired
|
|
38123
|
+
autocompleteValue: "address-level1"
|
|
38162
38124
|
});
|
|
38163
38125
|
};
|
|
38164
38126
|
|
|
@@ -39484,7 +39446,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39484
39446
|
labelTextWhenNoError: "Country",
|
|
39485
39447
|
errorMessages: countryErrorMessages,
|
|
39486
39448
|
field: fields.country,
|
|
39487
|
-
isRequired: true,
|
|
39488
39449
|
onChange: function onChange(value) {
|
|
39489
39450
|
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39490
39451
|
// we can write a reset function for fields
|
|
@@ -39509,8 +39470,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39509
39470
|
return e.key === "Enter" && handleSubmit(e);
|
|
39510
39471
|
},
|
|
39511
39472
|
autocompleteValue: "address-line1",
|
|
39512
|
-
dataQa: "Address"
|
|
39513
|
-
isRequired: true
|
|
39473
|
+
dataQa: "Address"
|
|
39514
39474
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39515
39475
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39516
39476
|
field: fields.street2,
|
|
@@ -39520,8 +39480,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39520
39480
|
return e.key === "Enter" && handleSubmit(e);
|
|
39521
39481
|
},
|
|
39522
39482
|
autocompleteValue: "address-line2",
|
|
39523
|
-
dataQa: "Address Line 2"
|
|
39524
|
-
isRequired: false
|
|
39483
|
+
dataQa: "Address Line 2"
|
|
39525
39484
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39526
39485
|
labelTextWhenNoError: "City",
|
|
39527
39486
|
errorMessages: cityErrorMessages,
|
|
@@ -39532,8 +39491,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39532
39491
|
return e.key === "Enter" && handleSubmit(e);
|
|
39533
39492
|
},
|
|
39534
39493
|
autocompleteValue: "address-level2",
|
|
39535
|
-
dataQa: "City"
|
|
39536
|
-
isRequired: true
|
|
39494
|
+
dataQa: "City"
|
|
39537
39495
|
}), /*#__PURE__*/React.createElement(FormStateDropdown, {
|
|
39538
39496
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39539
39497
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39544,8 +39502,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39544
39502
|
onKeyDown: function onKeyDown(e) {
|
|
39545
39503
|
return e.key === "Enter" && handleSubmit(e);
|
|
39546
39504
|
},
|
|
39547
|
-
dataQa: "State or Province"
|
|
39548
|
-
isRequired: true
|
|
39505
|
+
dataQa: "State or Province"
|
|
39549
39506
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39550
39507
|
isNum: isUS,
|
|
39551
39508
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39558,8 +39515,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39558
39515
|
return e.key === "Enter" && handleSubmit(e);
|
|
39559
39516
|
},
|
|
39560
39517
|
autocompleteValue: "postal-code",
|
|
39561
|
-
dataQa: "Zip code"
|
|
39562
|
-
isRequired: true
|
|
39518
|
+
dataQa: "Zip code"
|
|
39563
39519
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
39564
39520
|
name: "address checkbox",
|
|
39565
39521
|
title: "Save address to wallet",
|
|
@@ -48026,8 +47982,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48026
47982
|
onKeyDown: function onKeyDown(e) {
|
|
48027
47983
|
return e.key === "Enter" && handleSubmit(e);
|
|
48028
47984
|
},
|
|
48029
|
-
autocompleteValue: "name"
|
|
48030
|
-
isRequired: true
|
|
47985
|
+
autocompleteValue: "name"
|
|
48031
47986
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48032
47987
|
labelTextWhenNoError: "Routing number",
|
|
48033
47988
|
dataQa: "Routing number",
|
|
@@ -48049,8 +48004,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48049
48004
|
},
|
|
48050
48005
|
onKeyDown: function onKeyDown(e) {
|
|
48051
48006
|
return e.key === "Enter" && handleSubmit(e);
|
|
48052
|
-
}
|
|
48053
|
-
isRequired: true
|
|
48007
|
+
}
|
|
48054
48008
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48055
48009
|
labelTextWhenNoError: "Confirm routing number",
|
|
48056
48010
|
dataQa: "Confirm routing number",
|
|
@@ -48061,7 +48015,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48061
48015
|
onKeyDown: function onKeyDown(e) {
|
|
48062
48016
|
return e.key === "Enter" && handleSubmit(e);
|
|
48063
48017
|
},
|
|
48064
|
-
isRequired: true,
|
|
48065
48018
|
isNum: true
|
|
48066
48019
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48067
48020
|
labelTextWhenNoError: "Account number",
|
|
@@ -48070,7 +48023,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48070
48023
|
field: fields.accountNumber,
|
|
48071
48024
|
fieldActions: actions.fields.accountNumber,
|
|
48072
48025
|
showErrors: showErrors,
|
|
48073
|
-
isRequired: true,
|
|
48074
48026
|
isNum: true,
|
|
48075
48027
|
helperModal: function helperModal() {
|
|
48076
48028
|
return /*#__PURE__*/React.createElement(AccountAndRoutingModal$1, {
|
|
@@ -48089,7 +48041,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48089
48041
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48090
48042
|
labelTextWhenNoError: "Confirm account number",
|
|
48091
48043
|
dataQa: "Confirm account number",
|
|
48092
|
-
isRequired: true,
|
|
48093
48044
|
errorMessages: confirmAccountNumberErrors,
|
|
48094
48045
|
field: fields.confirmAccountNumber,
|
|
48095
48046
|
fieldActions: actions.fields.confirmAccountNumber,
|
|
@@ -48100,7 +48051,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48100
48051
|
isNum: true
|
|
48101
48052
|
}), allowBankAccountType && /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
48102
48053
|
labelTextWhenNoError: "Account type",
|
|
48103
|
-
isRequired: true,
|
|
48104
48054
|
dataQa: "Account type",
|
|
48105
48055
|
options: [{
|
|
48106
48056
|
text: "Select account type",
|
|
@@ -48231,7 +48181,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48231
48181
|
"aria-label": "Card payment"
|
|
48232
48182
|
}, /*#__PURE__*/React.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React.createElement(CountryDropdown, {
|
|
48233
48183
|
labelTextWhenNoError: "Country",
|
|
48234
|
-
isRequired: true,
|
|
48235
48184
|
errorMessages: countryErrorMessages,
|
|
48236
48185
|
field: fields.country,
|
|
48237
48186
|
onChange: function onChange(value) {
|
|
@@ -48254,10 +48203,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48254
48203
|
onKeyDown: function onKeyDown(e) {
|
|
48255
48204
|
return e.key === "Enter" && handleSubmit(e);
|
|
48256
48205
|
},
|
|
48257
|
-
autocompleteValue: "cc-name"
|
|
48258
|
-
isRequired: true
|
|
48206
|
+
autocompleteValue: "cc-name"
|
|
48259
48207
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48260
|
-
isRequired: true,
|
|
48261
48208
|
labelTextWhenNoError: "Credit card number",
|
|
48262
48209
|
dataQa: "Credit card number",
|
|
48263
48210
|
errorMessages: creditCardNumberErrors,
|
|
@@ -48287,8 +48234,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48287
48234
|
isNum: true,
|
|
48288
48235
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48289
48236
|
,
|
|
48290
|
-
autocompleteValue: "cc-exp"
|
|
48291
|
-
isRequired: true
|
|
48237
|
+
autocompleteValue: "cc-exp"
|
|
48292
48238
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48293
48239
|
labelTextWhenNoError: "CVV",
|
|
48294
48240
|
dataQa: "CVV",
|
|
@@ -48301,8 +48247,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48301
48247
|
onKeyDown: function onKeyDown(e) {
|
|
48302
48248
|
return e.key === "Enter" && handleSubmit(e);
|
|
48303
48249
|
},
|
|
48304
|
-
autocompleteValue: "cc-csc"
|
|
48305
|
-
isRequired: true
|
|
48250
|
+
autocompleteValue: "cc-csc"
|
|
48306
48251
|
})), !hideZipCode && /*#__PURE__*/React.createElement(Box, {
|
|
48307
48252
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48308
48253
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48318,8 +48263,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48318
48263
|
onKeyDown: function onKeyDown(e) {
|
|
48319
48264
|
return e.key === "Enter" && handleSubmit(e);
|
|
48320
48265
|
},
|
|
48321
|
-
autocompleteValue: "billing postal-code"
|
|
48322
|
-
isRequired: true
|
|
48266
|
+
autocompleteValue: "billing postal-code"
|
|
48323
48267
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React.createElement(Cluster, {
|
|
48324
48268
|
childGap: "4px",
|
|
48325
48269
|
align: "center"
|
|
@@ -48567,7 +48511,7 @@ PhoneForm.mapDispatchToProps = mapDispatchToProps$8;
|
|
|
48567
48511
|
var DefaultHeading = styled.div.withConfig({
|
|
48568
48512
|
displayName: "RadioGroup__DefaultHeading",
|
|
48569
48513
|
componentId: "sc-7lqrl8-0"
|
|
48570
|
-
})(["font-size:0.875rem;color:", "
|
|
48514
|
+
})(["font-size:0.875rem;color:", " margin:0;padding:8px 0px;"], CHARADE_GREY);
|
|
48571
48515
|
var StyledFieldset = styled.fieldset.withConfig({
|
|
48572
48516
|
displayName: "RadioGroup__StyledFieldset",
|
|
48573
48517
|
componentId: "sc-7lqrl8-1"
|
|
@@ -48588,9 +48532,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48588
48532
|
_ref$handleChange = _ref.handleChange,
|
|
48589
48533
|
handleChange = _ref$handleChange === void 0 ? noop : _ref$handleChange,
|
|
48590
48534
|
field = _ref.field,
|
|
48591
|
-
fieldActions = _ref.fieldActions
|
|
48592
|
-
_ref$isRequired = _ref.isRequired,
|
|
48593
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48535
|
+
fieldActions = _ref.fieldActions;
|
|
48594
48536
|
|
|
48595
48537
|
var setValue = function setValue(value) {
|
|
48596
48538
|
return fieldActions.set(value);
|
|
@@ -48599,8 +48541,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48599
48541
|
return /*#__PURE__*/React.createElement(StyledFieldset, {
|
|
48600
48542
|
role: "radiogroup",
|
|
48601
48543
|
"aria-labelledby": "radio-group-".concat(groupName, "-heading"),
|
|
48602
|
-
$extraStyles: extraStyles
|
|
48603
|
-
required: isRequired
|
|
48544
|
+
$extraStyles: extraStyles
|
|
48604
48545
|
}, Heading !== null && Heading, /*#__PURE__*/React.createElement(Stack, {
|
|
48605
48546
|
childGap: "4px"
|
|
48606
48547
|
}, config.map(function (c, idx) {
|
|
@@ -48613,8 +48554,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48613
48554
|
handleChange: handleChange,
|
|
48614
48555
|
field: field,
|
|
48615
48556
|
config: config,
|
|
48616
|
-
"aria-invalid": field.dirty && field.hasErrors
|
|
48617
|
-
isRequired: isRequired
|
|
48557
|
+
"aria-invalid": field.dirty && field.hasErrors
|
|
48618
48558
|
}));
|
|
48619
48559
|
})));
|
|
48620
48560
|
};
|
|
@@ -48677,8 +48617,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48677
48617
|
_ref$containerStyles = _ref.containerStyles,
|
|
48678
48618
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48679
48619
|
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48680
|
-
_ref$
|
|
48681
|
-
|
|
48620
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48621
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48682
48622
|
|
|
48683
48623
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48684
48624
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48735,12 +48675,11 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48735
48675
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48736
48676
|
childGap: "0",
|
|
48737
48677
|
role: "radiogroup",
|
|
48738
|
-
required:
|
|
48739
|
-
id: "cristin"
|
|
48678
|
+
required: isSectionRequired
|
|
48740
48679
|
}, sections.filter(function (section) {
|
|
48741
48680
|
return !section.hidden;
|
|
48742
48681
|
}).map(function (section) {
|
|
48743
|
-
return
|
|
48682
|
+
return /*#__PURE__*/React.createElement(Motion, {
|
|
48744
48683
|
tabIndex: section.hideRadioButton || section.disabled ? "-1" : "0",
|
|
48745
48684
|
onKeyDown: function onKeyDown(e) {
|
|
48746
48685
|
return !section.disabled && handleKeyDown(section.id, e);
|
|
@@ -48757,10 +48696,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48757
48696
|
key: "item-".concat(section.id),
|
|
48758
48697
|
extraStyles: borderStyles,
|
|
48759
48698
|
role: "radio",
|
|
48760
|
-
"aria-label": section.title || console.log("typeof section.title", _typeof(section.title)),
|
|
48761
48699
|
"aria-checked": openSection === section.id,
|
|
48762
48700
|
"aria-disabled": section.disabled,
|
|
48763
|
-
required: section
|
|
48701
|
+
required: !!(section !== null && section !== void 0 && section.required)
|
|
48764
48702
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48765
48703
|
childGap: "0"
|
|
48766
48704
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48799,7 +48737,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48799
48737
|
return toggleOpenSection(section.id);
|
|
48800
48738
|
},
|
|
48801
48739
|
tabIndex: "-1",
|
|
48802
|
-
|
|
48740
|
+
isRequired: !!(section !== null && section !== void 0 && section.required)
|
|
48803
48741
|
})), section.titleIcon && /*#__PURE__*/React.createElement(Cluster, {
|
|
48804
48742
|
align: "center"
|
|
48805
48743
|
}, section.titleIcon), /*#__PURE__*/React.createElement(Box, {
|