@thecb/components 9.2.4-beta.11 → 9.2.4-beta.13
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 +38 -18
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +38 -18
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/dropdown/Dropdown.js +3 -2
- package/src/components/atoms/form-layouts/FormInput.js +3 -0
- package/src/components/atoms/form-select/FormSelect.js +3 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +6 -0
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +5 -0
- package/src/components/molecules/radio-section/RadioSection.js +5 -1
package/dist/index.esm.js
CHANGED
|
@@ -23791,7 +23791,9 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
23791
23791
|
_ref13$smoothScroll = _ref13.smoothScroll,
|
|
23792
23792
|
smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
|
|
23793
23793
|
_ref13$ariaInvalid = _ref13.ariaInvalid,
|
|
23794
|
-
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid
|
|
23794
|
+
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
|
|
23795
|
+
_ref13$isRequired = _ref13.isRequired,
|
|
23796
|
+
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
|
|
23795
23797
|
|
|
23796
23798
|
var _useState = useState(""),
|
|
23797
23799
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24062,7 +24064,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24062
24064
|
},
|
|
24063
24065
|
padding: "12px",
|
|
24064
24066
|
placeholder: getSelection(),
|
|
24065
|
-
required: options.required,
|
|
24067
|
+
required: options.required || isRequired,
|
|
24066
24068
|
role: "combobox",
|
|
24067
24069
|
themeValues: themeValues,
|
|
24068
24070
|
title: hasTitles ? getSelection() : null,
|
|
@@ -24230,7 +24232,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24230
24232
|
_ref$dataQa = _ref.dataQa,
|
|
24231
24233
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
24232
24234
|
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
24233
|
-
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions
|
|
24235
|
+
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
|
|
24236
|
+
_ref$isRequired = _ref.isRequired,
|
|
24237
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
24234
24238
|
|
|
24235
24239
|
var _useState = useState(false),
|
|
24236
24240
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24292,7 +24296,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24292
24296
|
},
|
|
24293
24297
|
disabled: disabled,
|
|
24294
24298
|
autocompleteValue: autocompleteValue,
|
|
24295
|
-
smoothScroll: smoothScroll
|
|
24299
|
+
smoothScroll: smoothScroll,
|
|
24300
|
+
isRequired: isRequired
|
|
24296
24301
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
24297
24302
|
direction: "row",
|
|
24298
24303
|
justify: "space-between"
|
|
@@ -25921,7 +25926,7 @@ var fallbackValues$k = {
|
|
|
25921
25926
|
};
|
|
25922
25927
|
|
|
25923
25928
|
var _excluded$p = ["showErrors", "themeValues"],
|
|
25924
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
|
|
25929
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
|
|
25925
25930
|
var InputField = styled.input.withConfig({
|
|
25926
25931
|
displayName: "FormInput__InputField",
|
|
25927
25932
|
componentId: "sc-l094r1-0"
|
|
@@ -26008,6 +26013,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26008
26013
|
removeFromValue = _ref15.removeFromValue,
|
|
26009
26014
|
_ref15$dataQa = _ref15.dataQa,
|
|
26010
26015
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
26016
|
+
_ref15$isRequired = _ref15.isRequired,
|
|
26017
|
+
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
26011
26018
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
26012
26019
|
|
|
26013
26020
|
var _useState = useState(false),
|
|
@@ -26094,7 +26101,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26094
26101
|
$customHeight: customHeight,
|
|
26095
26102
|
$extraStyles: extraStyles,
|
|
26096
26103
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26097
|
-
autoComplete: autocompleteValue
|
|
26104
|
+
autoComplete: autocompleteValue,
|
|
26105
|
+
required: isRequired
|
|
26098
26106
|
}, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
|
|
26099
26107
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26100
26108
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26113,7 +26121,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26113
26121
|
$customHeight: customHeight,
|
|
26114
26122
|
$extraStyles: extraStyles,
|
|
26115
26123
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26116
|
-
autoComplete: autocompleteValue
|
|
26124
|
+
autoComplete: autocompleteValue,
|
|
26125
|
+
required: isRequired
|
|
26117
26126
|
}, props))), /*#__PURE__*/React.createElement(Stack, {
|
|
26118
26127
|
direction: "row",
|
|
26119
26128
|
justify: "space-between",
|
|
@@ -47982,7 +47991,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47982
47991
|
onKeyDown: function onKeyDown(e) {
|
|
47983
47992
|
return e.key === "Enter" && handleSubmit(e);
|
|
47984
47993
|
},
|
|
47985
|
-
autocompleteValue: "name"
|
|
47994
|
+
autocompleteValue: "name",
|
|
47995
|
+
isRequired: true
|
|
47986
47996
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
47987
47997
|
labelTextWhenNoError: "Routing number",
|
|
47988
47998
|
dataQa: "Routing number",
|
|
@@ -48004,7 +48014,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48004
48014
|
},
|
|
48005
48015
|
onKeyDown: function onKeyDown(e) {
|
|
48006
48016
|
return e.key === "Enter" && handleSubmit(e);
|
|
48007
|
-
}
|
|
48017
|
+
},
|
|
48018
|
+
isRequired: true
|
|
48008
48019
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48009
48020
|
labelTextWhenNoError: "Confirm routing number",
|
|
48010
48021
|
dataQa: "Confirm routing number",
|
|
@@ -48015,7 +48026,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48015
48026
|
onKeyDown: function onKeyDown(e) {
|
|
48016
48027
|
return e.key === "Enter" && handleSubmit(e);
|
|
48017
48028
|
},
|
|
48018
|
-
isNum: true
|
|
48029
|
+
isNum: true,
|
|
48030
|
+
isRequired: true
|
|
48019
48031
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48020
48032
|
labelTextWhenNoError: "Account number",
|
|
48021
48033
|
dataQa: "Account number",
|
|
@@ -48037,7 +48049,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48037
48049
|
},
|
|
48038
48050
|
onKeyDown: function onKeyDown(e) {
|
|
48039
48051
|
return e.key === "Enter" && handleSubmit(e);
|
|
48040
|
-
}
|
|
48052
|
+
},
|
|
48053
|
+
isRequired: true
|
|
48041
48054
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48042
48055
|
labelTextWhenNoError: "Confirm account number",
|
|
48043
48056
|
dataQa: "Confirm account number",
|
|
@@ -48048,6 +48061,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48048
48061
|
onKeyDown: function onKeyDown(e) {
|
|
48049
48062
|
return e.key === "Enter" && handleSubmit(e);
|
|
48050
48063
|
},
|
|
48064
|
+
isRequired: true,
|
|
48051
48065
|
isNum: true
|
|
48052
48066
|
}), allowBankAccountType && /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
48053
48067
|
labelTextWhenNoError: "Account type",
|
|
@@ -48065,7 +48079,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48065
48079
|
fieldActions: actions.fields.accountType,
|
|
48066
48080
|
showErrors: showErrors,
|
|
48067
48081
|
errorMessages: accountTypeErrors,
|
|
48068
|
-
field: fields.accountType
|
|
48082
|
+
field: fields.accountType,
|
|
48083
|
+
isRequired: true
|
|
48069
48084
|
}), !hideDefaultPayment && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48070
48085
|
title: "Save as Default Payment Method",
|
|
48071
48086
|
dataQa: "default-payment-ach",
|
|
@@ -48203,7 +48218,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48203
48218
|
onKeyDown: function onKeyDown(e) {
|
|
48204
48219
|
return e.key === "Enter" && handleSubmit(e);
|
|
48205
48220
|
},
|
|
48206
|
-
autocompleteValue: "cc-name"
|
|
48221
|
+
autocompleteValue: "cc-name",
|
|
48222
|
+
isRequired: true
|
|
48207
48223
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48208
48224
|
labelTextWhenNoError: "Credit card number",
|
|
48209
48225
|
dataQa: "Credit card number",
|
|
@@ -48216,7 +48232,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48216
48232
|
return e.key === "Enter" && handleSubmit(e);
|
|
48217
48233
|
},
|
|
48218
48234
|
isNum: true,
|
|
48219
|
-
autocompleteValue: "cc-number"
|
|
48235
|
+
autocompleteValue: "cc-number",
|
|
48236
|
+
isRequired: true
|
|
48220
48237
|
}), /*#__PURE__*/React.createElement(FormInputRow, {
|
|
48221
48238
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48222
48239
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48234,7 +48251,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48234
48251
|
isNum: true,
|
|
48235
48252
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48236
48253
|
,
|
|
48237
|
-
autocompleteValue: "cc-exp"
|
|
48254
|
+
autocompleteValue: "cc-exp",
|
|
48255
|
+
isRequired: true
|
|
48238
48256
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48239
48257
|
labelTextWhenNoError: "CVV",
|
|
48240
48258
|
dataQa: "CVV",
|
|
@@ -48247,7 +48265,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48247
48265
|
onKeyDown: function onKeyDown(e) {
|
|
48248
48266
|
return e.key === "Enter" && handleSubmit(e);
|
|
48249
48267
|
},
|
|
48250
|
-
autocompleteValue: "cc-csc"
|
|
48268
|
+
autocompleteValue: "cc-csc",
|
|
48269
|
+
isRequired: true
|
|
48251
48270
|
})), !hideZipCode && /*#__PURE__*/React.createElement(Box, {
|
|
48252
48271
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48253
48272
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48263,7 +48282,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48263
48282
|
onKeyDown: function onKeyDown(e) {
|
|
48264
48283
|
return e.key === "Enter" && handleSubmit(e);
|
|
48265
48284
|
},
|
|
48266
|
-
autocompleteValue: "billing postal-code"
|
|
48285
|
+
autocompleteValue: "billing postal-code",
|
|
48286
|
+
isRequired: true
|
|
48267
48287
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React.createElement(Cluster, {
|
|
48268
48288
|
childGap: "4px",
|
|
48269
48289
|
align: "center"
|
|
@@ -48674,7 +48694,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48674
48694
|
extraStyles: containerStyles
|
|
48675
48695
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48676
48696
|
childGap: "0",
|
|
48677
|
-
role: "radiogroup",
|
|
48697
|
+
"aria-role": "radiogroup",
|
|
48678
48698
|
"aria-required": isSectionRequired
|
|
48679
48699
|
}, sections.filter(function (section) {
|
|
48680
48700
|
return !section.hidden;
|