@thecb/components 9.2.4-beta.5 → 9.2.4-beta.7
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.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) {
|
|
@@ -27318,9 +27287,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27318
27287
|
_ref5$handleChange = _ref5.handleChange,
|
|
27319
27288
|
handleChange = _ref5$handleChange === void 0 ? noop : _ref5$handleChange,
|
|
27320
27289
|
field = _ref5.field,
|
|
27321
|
-
config = _ref5.config
|
|
27322
|
-
_ref5$isRequired = _ref5.isRequired,
|
|
27323
|
-
isRequired = _ref5$isRequired === void 0 ? false : _ref5$isRequired;
|
|
27290
|
+
config = _ref5.config;
|
|
27324
27291
|
|
|
27325
27292
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
27326
27293
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
@@ -27353,8 +27320,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27353
27320
|
setValue(e.target.value);
|
|
27354
27321
|
handleChange(e);
|
|
27355
27322
|
},
|
|
27356
|
-
defaultChecked: getDefaultChecked(value, index)
|
|
27357
|
-
required: isRequired
|
|
27323
|
+
defaultChecked: getDefaultChecked(value, index)
|
|
27358
27324
|
}), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27359
27325
|
as: "label",
|
|
27360
27326
|
htmlFor: id,
|
|
@@ -27398,8 +27364,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27398
27364
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27399
27365
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27400
27366
|
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27401
|
-
_ref2$
|
|
27402
|
-
|
|
27367
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27368
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27403
27369
|
var buttonBorder = {
|
|
27404
27370
|
onFocused: {
|
|
27405
27371
|
borderColor: themeValues.activeColor,
|
|
@@ -27459,11 +27425,10 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27459
27425
|
type: "radio",
|
|
27460
27426
|
id: "radio-".concat(name),
|
|
27461
27427
|
disabled: disabled,
|
|
27462
|
-
required: required,
|
|
27463
|
-
"aria-required": required,
|
|
27464
27428
|
onClick: toggleRadio,
|
|
27465
27429
|
"aria-describedby": ariaDescribedBy,
|
|
27466
|
-
tabIndex: "-1"
|
|
27430
|
+
tabIndex: "-1",
|
|
27431
|
+
required: isRequired
|
|
27467
27432
|
}, extraProps)), /*#__PURE__*/React__default.createElement(Motion, {
|
|
27468
27433
|
borderWidth: "1px",
|
|
27469
27434
|
borderStyle: "solid",
|
|
@@ -38153,9 +38118,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38153
38118
|
field = _ref.field,
|
|
38154
38119
|
fieldActions = _ref.fieldActions,
|
|
38155
38120
|
showErrors = _ref.showErrors,
|
|
38156
|
-
countryCode = _ref.countryCode
|
|
38157
|
-
_ref$isRequired = _ref.isRequired,
|
|
38158
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
38121
|
+
countryCode = _ref.countryCode;
|
|
38159
38122
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38160
38123
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38161
38124
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
@@ -38165,8 +38128,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38165
38128
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38166
38129
|
errorMessages: errorMessages,
|
|
38167
38130
|
showErrors: showErrors,
|
|
38168
|
-
autocompleteValue: "address-level1"
|
|
38169
|
-
isRequired: isRequired
|
|
38131
|
+
autocompleteValue: "address-level1"
|
|
38170
38132
|
});
|
|
38171
38133
|
};
|
|
38172
38134
|
|
|
@@ -39492,7 +39454,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39492
39454
|
labelTextWhenNoError: "Country",
|
|
39493
39455
|
errorMessages: countryErrorMessages,
|
|
39494
39456
|
field: fields.country,
|
|
39495
|
-
isRequired: true,
|
|
39496
39457
|
onChange: function onChange(value) {
|
|
39497
39458
|
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39498
39459
|
// we can write a reset function for fields
|
|
@@ -39517,8 +39478,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39517
39478
|
return e.key === "Enter" && handleSubmit(e);
|
|
39518
39479
|
},
|
|
39519
39480
|
autocompleteValue: "address-line1",
|
|
39520
|
-
dataQa: "Address"
|
|
39521
|
-
isRequired: true
|
|
39481
|
+
dataQa: "Address"
|
|
39522
39482
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39523
39483
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39524
39484
|
field: fields.street2,
|
|
@@ -39528,8 +39488,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39528
39488
|
return e.key === "Enter" && handleSubmit(e);
|
|
39529
39489
|
},
|
|
39530
39490
|
autocompleteValue: "address-line2",
|
|
39531
|
-
dataQa: "Address Line 2"
|
|
39532
|
-
isRequired: false
|
|
39491
|
+
dataQa: "Address Line 2"
|
|
39533
39492
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39534
39493
|
labelTextWhenNoError: "City",
|
|
39535
39494
|
errorMessages: cityErrorMessages,
|
|
@@ -39540,8 +39499,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39540
39499
|
return e.key === "Enter" && handleSubmit(e);
|
|
39541
39500
|
},
|
|
39542
39501
|
autocompleteValue: "address-level2",
|
|
39543
|
-
dataQa: "City"
|
|
39544
|
-
isRequired: true
|
|
39502
|
+
dataQa: "City"
|
|
39545
39503
|
}), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
|
|
39546
39504
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39547
39505
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39552,8 +39510,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39552
39510
|
onKeyDown: function onKeyDown(e) {
|
|
39553
39511
|
return e.key === "Enter" && handleSubmit(e);
|
|
39554
39512
|
},
|
|
39555
|
-
dataQa: "State or Province"
|
|
39556
|
-
isRequired: true
|
|
39513
|
+
dataQa: "State or Province"
|
|
39557
39514
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39558
39515
|
isNum: isUS,
|
|
39559
39516
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39566,8 +39523,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39566
39523
|
return e.key === "Enter" && handleSubmit(e);
|
|
39567
39524
|
},
|
|
39568
39525
|
autocompleteValue: "postal-code",
|
|
39569
|
-
dataQa: "Zip code"
|
|
39570
|
-
isRequired: true
|
|
39526
|
+
dataQa: "Zip code"
|
|
39571
39527
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
39572
39528
|
name: "address checkbox",
|
|
39573
39529
|
title: "Save address to wallet",
|
|
@@ -48034,8 +47990,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48034
47990
|
onKeyDown: function onKeyDown(e) {
|
|
48035
47991
|
return e.key === "Enter" && handleSubmit(e);
|
|
48036
47992
|
},
|
|
48037
|
-
autocompleteValue: "name"
|
|
48038
|
-
isRequired: true
|
|
47993
|
+
autocompleteValue: "name"
|
|
48039
47994
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48040
47995
|
labelTextWhenNoError: "Routing number",
|
|
48041
47996
|
dataQa: "Routing number",
|
|
@@ -48057,8 +48012,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48057
48012
|
},
|
|
48058
48013
|
onKeyDown: function onKeyDown(e) {
|
|
48059
48014
|
return e.key === "Enter" && handleSubmit(e);
|
|
48060
|
-
}
|
|
48061
|
-
isRequired: true
|
|
48015
|
+
}
|
|
48062
48016
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48063
48017
|
labelTextWhenNoError: "Confirm routing number",
|
|
48064
48018
|
dataQa: "Confirm routing number",
|
|
@@ -48069,7 +48023,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48069
48023
|
onKeyDown: function onKeyDown(e) {
|
|
48070
48024
|
return e.key === "Enter" && handleSubmit(e);
|
|
48071
48025
|
},
|
|
48072
|
-
isRequired: true,
|
|
48073
48026
|
isNum: true
|
|
48074
48027
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48075
48028
|
labelTextWhenNoError: "Account number",
|
|
@@ -48078,7 +48031,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48078
48031
|
field: fields.accountNumber,
|
|
48079
48032
|
fieldActions: actions.fields.accountNumber,
|
|
48080
48033
|
showErrors: showErrors,
|
|
48081
|
-
isRequired: true,
|
|
48082
48034
|
isNum: true,
|
|
48083
48035
|
helperModal: function helperModal() {
|
|
48084
48036
|
return /*#__PURE__*/React__default.createElement(AccountAndRoutingModal$1, {
|
|
@@ -48097,7 +48049,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48097
48049
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48098
48050
|
labelTextWhenNoError: "Confirm account number",
|
|
48099
48051
|
dataQa: "Confirm account number",
|
|
48100
|
-
isRequired: true,
|
|
48101
48052
|
errorMessages: confirmAccountNumberErrors,
|
|
48102
48053
|
field: fields.confirmAccountNumber,
|
|
48103
48054
|
fieldActions: actions.fields.confirmAccountNumber,
|
|
@@ -48108,7 +48059,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48108
48059
|
isNum: true
|
|
48109
48060
|
}), allowBankAccountType && /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
48110
48061
|
labelTextWhenNoError: "Account type",
|
|
48111
|
-
isRequired: true,
|
|
48112
48062
|
dataQa: "Account type",
|
|
48113
48063
|
options: [{
|
|
48114
48064
|
text: "Select account type",
|
|
@@ -48239,7 +48189,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48239
48189
|
"aria-label": "Card payment"
|
|
48240
48190
|
}, /*#__PURE__*/React__default.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React__default.createElement(CountryDropdown, {
|
|
48241
48191
|
labelTextWhenNoError: "Country",
|
|
48242
|
-
isRequired: true,
|
|
48243
48192
|
errorMessages: countryErrorMessages,
|
|
48244
48193
|
field: fields.country,
|
|
48245
48194
|
onChange: function onChange(value) {
|
|
@@ -48262,10 +48211,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48262
48211
|
onKeyDown: function onKeyDown(e) {
|
|
48263
48212
|
return e.key === "Enter" && handleSubmit(e);
|
|
48264
48213
|
},
|
|
48265
|
-
autocompleteValue: "cc-name"
|
|
48266
|
-
isRequired: true
|
|
48214
|
+
autocompleteValue: "cc-name"
|
|
48267
48215
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48268
|
-
isRequired: true,
|
|
48269
48216
|
labelTextWhenNoError: "Credit card number",
|
|
48270
48217
|
dataQa: "Credit card number",
|
|
48271
48218
|
errorMessages: creditCardNumberErrors,
|
|
@@ -48295,8 +48242,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48295
48242
|
isNum: true,
|
|
48296
48243
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48297
48244
|
,
|
|
48298
|
-
autocompleteValue: "cc-exp"
|
|
48299
|
-
isRequired: true
|
|
48245
|
+
autocompleteValue: "cc-exp"
|
|
48300
48246
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48301
48247
|
labelTextWhenNoError: "CVV",
|
|
48302
48248
|
dataQa: "CVV",
|
|
@@ -48309,8 +48255,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48309
48255
|
onKeyDown: function onKeyDown(e) {
|
|
48310
48256
|
return e.key === "Enter" && handleSubmit(e);
|
|
48311
48257
|
},
|
|
48312
|
-
autocompleteValue: "cc-csc"
|
|
48313
|
-
isRequired: true
|
|
48258
|
+
autocompleteValue: "cc-csc"
|
|
48314
48259
|
})), !hideZipCode && /*#__PURE__*/React__default.createElement(Box, {
|
|
48315
48260
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48316
48261
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48326,8 +48271,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48326
48271
|
onKeyDown: function onKeyDown(e) {
|
|
48327
48272
|
return e.key === "Enter" && handleSubmit(e);
|
|
48328
48273
|
},
|
|
48329
|
-
autocompleteValue: "billing postal-code"
|
|
48330
|
-
isRequired: true
|
|
48274
|
+
autocompleteValue: "billing postal-code"
|
|
48331
48275
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48332
48276
|
childGap: "4px",
|
|
48333
48277
|
align: "center"
|
|
@@ -48575,7 +48519,7 @@ PhoneForm.mapDispatchToProps = mapDispatchToProps$8;
|
|
|
48575
48519
|
var DefaultHeading = styled__default.div.withConfig({
|
|
48576
48520
|
displayName: "RadioGroup__DefaultHeading",
|
|
48577
48521
|
componentId: "sc-7lqrl8-0"
|
|
48578
|
-
})(["font-size:0.875rem;color:", "
|
|
48522
|
+
})(["font-size:0.875rem;color:", " margin:0;padding:8px 0px;"], CHARADE_GREY);
|
|
48579
48523
|
var StyledFieldset = styled__default.fieldset.withConfig({
|
|
48580
48524
|
displayName: "RadioGroup__StyledFieldset",
|
|
48581
48525
|
componentId: "sc-7lqrl8-1"
|
|
@@ -48596,9 +48540,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48596
48540
|
_ref$handleChange = _ref.handleChange,
|
|
48597
48541
|
handleChange = _ref$handleChange === void 0 ? noop : _ref$handleChange,
|
|
48598
48542
|
field = _ref.field,
|
|
48599
|
-
fieldActions = _ref.fieldActions
|
|
48600
|
-
_ref$isRequired = _ref.isRequired,
|
|
48601
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48543
|
+
fieldActions = _ref.fieldActions;
|
|
48602
48544
|
|
|
48603
48545
|
var setValue = function setValue(value) {
|
|
48604
48546
|
return fieldActions.set(value);
|
|
@@ -48607,8 +48549,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48607
48549
|
return /*#__PURE__*/React__default.createElement(StyledFieldset, {
|
|
48608
48550
|
role: "radiogroup",
|
|
48609
48551
|
"aria-labelledby": "radio-group-".concat(groupName, "-heading"),
|
|
48610
|
-
$extraStyles: extraStyles
|
|
48611
|
-
required: isRequired
|
|
48552
|
+
$extraStyles: extraStyles
|
|
48612
48553
|
}, Heading !== null && Heading, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48613
48554
|
childGap: "4px"
|
|
48614
48555
|
}, config.map(function (c, idx) {
|
|
@@ -48621,8 +48562,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48621
48562
|
handleChange: handleChange,
|
|
48622
48563
|
field: field,
|
|
48623
48564
|
config: config,
|
|
48624
|
-
"aria-invalid": field.dirty && field.hasErrors
|
|
48625
|
-
isRequired: isRequired
|
|
48565
|
+
"aria-invalid": field.dirty && field.hasErrors
|
|
48626
48566
|
}));
|
|
48627
48567
|
})));
|
|
48628
48568
|
};
|
|
@@ -48685,8 +48625,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48685
48625
|
_ref$containerStyles = _ref.containerStyles,
|
|
48686
48626
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48687
48627
|
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48688
|
-
_ref$
|
|
48689
|
-
|
|
48628
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48629
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48690
48630
|
|
|
48691
48631
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48692
48632
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48743,12 +48683,11 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48743
48683
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48744
48684
|
childGap: "0",
|
|
48745
48685
|
role: "radiogroup",
|
|
48746
|
-
required:
|
|
48747
|
-
id: "cristin"
|
|
48686
|
+
"aria-required": isSectionRequired
|
|
48748
48687
|
}, sections.filter(function (section) {
|
|
48749
48688
|
return !section.hidden;
|
|
48750
48689
|
}).map(function (section) {
|
|
48751
|
-
return
|
|
48690
|
+
return /*#__PURE__*/React__default.createElement(Motion, {
|
|
48752
48691
|
tabIndex: section.hideRadioButton || section.disabled ? "-1" : "0",
|
|
48753
48692
|
onKeyDown: function onKeyDown(e) {
|
|
48754
48693
|
return !section.disabled && handleKeyDown(section.id, e);
|
|
@@ -48765,10 +48704,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48765
48704
|
key: "item-".concat(section.id),
|
|
48766
48705
|
extraStyles: borderStyles,
|
|
48767
48706
|
role: "radio",
|
|
48768
|
-
"aria-label": section.title || console.log("typeof section.title", _typeof(section.title)),
|
|
48769
48707
|
"aria-checked": openSection === section.id,
|
|
48770
48708
|
"aria-disabled": section.disabled,
|
|
48771
|
-
required: section
|
|
48709
|
+
required: !!(section !== null && section !== void 0 && section.required)
|
|
48772
48710
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48773
48711
|
childGap: "0"
|
|
48774
48712
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48807,7 +48745,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48807
48745
|
return toggleOpenSection(section.id);
|
|
48808
48746
|
},
|
|
48809
48747
|
tabIndex: "-1",
|
|
48810
|
-
|
|
48748
|
+
isRequired: !!(section !== null && section !== void 0 && section.required)
|
|
48811
48749
|
})), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48812
48750
|
align: "center"
|
|
48813
48751
|
}, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {
|