@thecb/components 12.1.0-beta.11 → 12.1.0-beta.12
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 +29 -68
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +29 -68
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.js +5 -13
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +24 -36
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +23 -36
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +0 -29
package/dist/index.cjs.js
CHANGED
|
@@ -22156,7 +22156,7 @@ var ENTER = 13;
|
|
|
22156
22156
|
var ESCAPE = 27;
|
|
22157
22157
|
var SPACEBAR = 32;
|
|
22158
22158
|
|
|
22159
|
-
var _excluded$x = ["title", "name", "checked", "onChange", "disabled", "themeValues", "hidden", "error", "isRequired", "checkboxMargin", "extraStyles", "textExtraStyles", "labelledById", "dataQa", "checkboxExtraStyles", "hasIconOverride", "icon"
|
|
22159
|
+
var _excluded$x = ["title", "name", "checked", "onChange", "disabled", "themeValues", "hidden", "error", "isRequired", "checkboxMargin", "extraStyles", "textExtraStyles", "labelledById", "dataQa", "checkboxExtraStyles", "hasIconOverride", "icon"];
|
|
22160
22160
|
var CheckboxContainer = styled__default.span.withConfig({
|
|
22161
22161
|
displayName: "Checkbox__CheckboxContainer",
|
|
22162
22162
|
componentId: "sc-36kqbv-0"
|
|
@@ -22228,7 +22228,6 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
|
22228
22228
|
_ref5$hasIconOverride = _ref5.hasIconOverride,
|
|
22229
22229
|
hasIconOverride = _ref5$hasIconOverride === void 0 ? false : _ref5$hasIconOverride,
|
|
22230
22230
|
Icon = _ref5.icon,
|
|
22231
|
-
customAriaLabel = _ref5.customAriaLabel,
|
|
22232
22231
|
rest = _objectWithoutProperties(_ref5, _excluded$x);
|
|
22233
22232
|
var _useState = React.useState(false),
|
|
22234
22233
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -22239,12 +22238,9 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
|
22239
22238
|
func();
|
|
22240
22239
|
}
|
|
22241
22240
|
};
|
|
22242
|
-
var
|
|
22243
|
-
var
|
|
22244
|
-
var
|
|
22245
|
-
var ariaLabelledById = customAriaLabel ? undefined : labelledById !== null && labelledById !== void 0 ? labelledById : titleId;
|
|
22246
|
-
var ariaLabel = ariaLabelledById ? undefined : customAriaLabel !== null && customAriaLabel !== void 0 ? customAriaLabel : name;
|
|
22247
|
-
var errorMessageNormalized = error ? "".concat(normalizeName, "-error-message") : undefined;
|
|
22241
|
+
var titleId = title ? "checkboxlabel-".concat(name) : undefined;
|
|
22242
|
+
var ariaLabelledById = labelledById !== null && labelledById !== void 0 ? labelledById : titleId;
|
|
22243
|
+
var ariaLabel = ariaLabelledById ? undefined : name;
|
|
22248
22244
|
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
22249
22245
|
ref: ref,
|
|
22250
22246
|
padding: "0",
|
|
@@ -22255,7 +22251,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
|
22255
22251
|
"aria-invalid": error,
|
|
22256
22252
|
"aria-label": ariaLabel,
|
|
22257
22253
|
"aria-labelledby": ariaLabelledById,
|
|
22258
|
-
"aria-describedby":
|
|
22254
|
+
"aria-describedby": error ? "".concat(name, "-error-message") : undefined,
|
|
22259
22255
|
onFocus: function onFocus() {
|
|
22260
22256
|
return setFocused(true);
|
|
22261
22257
|
},
|
|
@@ -22273,7 +22269,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
|
22273
22269
|
}, /*#__PURE__*/React__default.createElement(CheckboxContainer, {
|
|
22274
22270
|
"data-qa": "Checkbox"
|
|
22275
22271
|
}, /*#__PURE__*/React__default.createElement(HiddenCheckbox, {
|
|
22276
|
-
id:
|
|
22272
|
+
id: "checkbox-".concat(name),
|
|
22277
22273
|
disabled: disabled,
|
|
22278
22274
|
name: name,
|
|
22279
22275
|
checked: checked,
|
|
@@ -48199,10 +48195,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
48199
48195
|
};
|
|
48200
48196
|
|
|
48201
48197
|
var TermsAndConditionsTitleDivId = "terms-and-conditions-title";
|
|
48202
|
-
var InlineTermsWrapper = styled__default.span.withConfig({
|
|
48203
|
-
displayName: "TermsAndConditionsControlV2__InlineTermsWrapper",
|
|
48204
|
-
componentId: "sc-16np073-0"
|
|
48205
|
-
})(["display:inline;> div{display:inline;}.modal-trigger{display:inline !important;}"]);
|
|
48206
48198
|
var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
48207
48199
|
var _ref$showCheckbox = _ref.showCheckbox,
|
|
48208
48200
|
showCheckbox = _ref$showCheckbox === void 0 ? true : _ref$showCheckbox,
|
|
@@ -48244,21 +48236,6 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
48244
48236
|
useScrollTo("terms-body-text", 0, 0, "smooth", 100);
|
|
48245
48237
|
}
|
|
48246
48238
|
};
|
|
48247
|
-
if (!showCheckbox && displayInline) {
|
|
48248
|
-
return /*#__PURE__*/React__default.createElement(InlineTermsWrapper, {
|
|
48249
|
-
id: TermsAndConditionsTitleDivId
|
|
48250
|
-
}, description && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
48251
|
-
color: CHARADE_GREY
|
|
48252
|
-
}, description), terms && /*#__PURE__*/React__default.createElement(TermsAndConditionsModal$1, {
|
|
48253
|
-
link: linkText,
|
|
48254
|
-
terms: terms,
|
|
48255
|
-
isOpen: showTerms,
|
|
48256
|
-
toggleOpen: toggleTerms,
|
|
48257
|
-
linkVariant: modalVariant,
|
|
48258
|
-
title: modalTitle,
|
|
48259
|
-
initialFocusSelector: initialFocusSelector
|
|
48260
|
-
}));
|
|
48261
|
-
}
|
|
48262
48239
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
48263
48240
|
padding: displayInline ? "0" : "1.5rem",
|
|
48264
48241
|
minWidth: displayInline ? "0" : "100%",
|
|
@@ -48471,33 +48448,25 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48471
48448
|
onChange: toggleCheckbox,
|
|
48472
48449
|
checked: defaultMethod.value,
|
|
48473
48450
|
hidden: hideDefaultPayment
|
|
48474
|
-
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(
|
|
48451
|
+
}), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48452
|
+
childGap: "4px",
|
|
48453
|
+
align: "center",
|
|
48454
|
+
overflow: true
|
|
48455
|
+
}, showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48475
48456
|
name: "bank checkbox",
|
|
48476
48457
|
dataQa: "Save checking account to wallet",
|
|
48477
|
-
|
|
48478
|
-
title: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, "Save checking account to wallet (optional).", " ", showTerms && /*#__PURE__*/React__default.createElement("span", {
|
|
48479
|
-
onClick: function onClick(e) {
|
|
48480
|
-
return e.stopPropagation();
|
|
48481
|
-
},
|
|
48482
|
-
style: {
|
|
48483
|
-
display: "inline"
|
|
48484
|
-
}
|
|
48485
|
-
}, /*#__PURE__*/React__default.createElement(TermsAndConditions, {
|
|
48486
|
-
version: "v2",
|
|
48487
|
-
showCheckbox: false,
|
|
48488
|
-
description: "View ",
|
|
48489
|
-
terms: termsContent,
|
|
48490
|
-
initialFocusSelector: ".modal-close-button"
|
|
48491
|
-
}))),
|
|
48458
|
+
title: "Save checking account to wallet.",
|
|
48492
48459
|
checked: walletCheckboxMarked,
|
|
48493
48460
|
onChange: saveToWallet
|
|
48494
|
-
}),
|
|
48461
|
+
}), showTerms && /*#__PURE__*/React__default.createElement(Cover, {
|
|
48462
|
+
singleChild: true
|
|
48463
|
+
}, /*#__PURE__*/React__default.createElement(TermsAndConditions, {
|
|
48495
48464
|
version: "v2",
|
|
48496
48465
|
showCheckbox: false,
|
|
48497
|
-
description: "View
|
|
48466
|
+
description: "View",
|
|
48498
48467
|
terms: termsContent,
|
|
48499
48468
|
initialFocusSelector: ".modal-close-button"
|
|
48500
|
-
})));
|
|
48469
|
+
})))));
|
|
48501
48470
|
};
|
|
48502
48471
|
|
|
48503
48472
|
var formConfig$6 = {
|
|
@@ -48669,33 +48638,25 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48669
48638
|
},
|
|
48670
48639
|
autocompleteValue: "billing postal-code",
|
|
48671
48640
|
isRequired: true
|
|
48672
|
-
})), showWalletCheckbox && /*#__PURE__*/React__default.createElement(
|
|
48673
|
-
|
|
48641
|
+
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48642
|
+
childGap: "4px",
|
|
48643
|
+
align: "center",
|
|
48644
|
+
overflow: true
|
|
48645
|
+
}, showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48646
|
+
name: "credit card checkbox",
|
|
48674
48647
|
dataQa: "Save credit card to wallet",
|
|
48675
|
-
|
|
48676
|
-
title: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, "Save credit card to wallet (optional).", " ", showTerms && /*#__PURE__*/React__default.createElement("span", {
|
|
48677
|
-
onClick: function onClick(e) {
|
|
48678
|
-
return e.stopPropagation();
|
|
48679
|
-
},
|
|
48680
|
-
style: {
|
|
48681
|
-
display: "inline"
|
|
48682
|
-
}
|
|
48683
|
-
}, /*#__PURE__*/React__default.createElement(TermsAndConditions, {
|
|
48684
|
-
version: "v2",
|
|
48685
|
-
showCheckbox: false,
|
|
48686
|
-
description: "View ",
|
|
48687
|
-
terms: termsContent,
|
|
48688
|
-
initialFocusSelector: ".modal-close-button"
|
|
48689
|
-
}))),
|
|
48648
|
+
title: "Save credit card to wallet.",
|
|
48690
48649
|
checked: walletCheckboxMarked,
|
|
48691
48650
|
onChange: saveToWallet
|
|
48692
|
-
}),
|
|
48651
|
+
}), showTerms && /*#__PURE__*/React__default.createElement(Cover, {
|
|
48652
|
+
singleChild: true
|
|
48653
|
+
}, /*#__PURE__*/React__default.createElement(TermsAndConditions, {
|
|
48693
48654
|
version: "v2",
|
|
48694
48655
|
showCheckbox: false,
|
|
48695
|
-
description: "View
|
|
48656
|
+
description: "View",
|
|
48696
48657
|
terms: termsContent,
|
|
48697
48658
|
initialFocusSelector: ".modal-close-button"
|
|
48698
|
-
})));
|
|
48659
|
+
})))));
|
|
48699
48660
|
};
|
|
48700
48661
|
var PaymentFormCard$1 = withWindowSize(PaymentFormCard);
|
|
48701
48662
|
|