@thecb/components 12.0.6-beta.0 → 12.1.0-beta.0
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 +26 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +26 -27
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.js +15 -21
- package/src/components/atoms/checkbox/Checkbox.stories.js +7 -1
- package/src/components/atoms/icons/ForgotPasswordIcon.js +1 -0
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +1 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.stories.js +121 -0
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +1 -1
- package/src/components/molecules/payment-form-card/PaymentFormCard.stories.js +120 -0
package/dist/index.cjs.js
CHANGED
|
@@ -13938,7 +13938,8 @@ var ForgotPasswordIcon = function ForgotPasswordIcon(_ref) {
|
|
|
13938
13938
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
13939
13939
|
width: "100",
|
|
13940
13940
|
height: "100",
|
|
13941
|
-
viewBox: "0 0 100 100"
|
|
13941
|
+
viewBox: "0 0 100 100",
|
|
13942
|
+
"aria-hidden": "true"
|
|
13942
13943
|
}, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("path", {
|
|
13943
13944
|
id: "prefix__a",
|
|
13944
13945
|
d: "M0 0h100v100H0z"
|
|
@@ -22237,45 +22238,43 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
|
22237
22238
|
func();
|
|
22238
22239
|
}
|
|
22239
22240
|
};
|
|
22240
|
-
var
|
|
22241
|
-
var
|
|
22242
|
-
var
|
|
22241
|
+
var normalizedName = name ? name.replace(/\s+/g, "-") : name;
|
|
22242
|
+
var checkboxId = "checkbox-".concat(normalizedName);
|
|
22243
|
+
var titleId = title ? "checkboxlabel-".concat(normalizedName) : undefined;
|
|
22244
|
+
// aria-label fallback when no visible title or external labelledById is provided
|
|
22245
|
+
var ariaLabel = !labelledById && !title ? name : undefined;
|
|
22243
22246
|
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
22244
22247
|
ref: ref,
|
|
22245
22248
|
padding: "0",
|
|
22246
|
-
tabIndex: "0",
|
|
22247
|
-
role: "checkbox",
|
|
22248
|
-
"aria-checked": checked,
|
|
22249
|
-
"aria-required": isRequired || undefined,
|
|
22250
|
-
"aria-invalid": error,
|
|
22251
|
-
"aria-label": ariaLabel,
|
|
22252
|
-
"aria-labelledby": ariaLabelledById,
|
|
22253
|
-
"aria-describedby": error ? "".concat(name, "-error-message") : undefined,
|
|
22254
|
-
onFocus: function onFocus() {
|
|
22255
|
-
return setFocused(true);
|
|
22256
|
-
},
|
|
22257
|
-
onBlur: function onBlur() {
|
|
22258
|
-
return setFocused(false);
|
|
22259
|
-
},
|
|
22260
|
-
onKeyDown: function onKeyDown(e) {
|
|
22261
|
-
return handleClick(e, onChange);
|
|
22262
|
-
},
|
|
22263
22249
|
hiddenStyles: hidden,
|
|
22264
22250
|
background: themeValues.backgroundColor,
|
|
22265
|
-
extraStyles: "\n
|
|
22251
|
+
extraStyles: "\n ".concat(extraStyles, "; \n margin: ").concat(checkboxMargin, ";\n ")
|
|
22266
22252
|
}, rest), /*#__PURE__*/React__default.createElement(CheckboxLabelContainer, {
|
|
22253
|
+
htmlFor: checkboxId,
|
|
22267
22254
|
"data-qa": dataQa
|
|
22268
22255
|
}, /*#__PURE__*/React__default.createElement(CheckboxContainer, {
|
|
22269
22256
|
"data-qa": "Checkbox"
|
|
22270
22257
|
}, /*#__PURE__*/React__default.createElement(HiddenCheckbox, {
|
|
22271
|
-
id:
|
|
22258
|
+
id: checkboxId,
|
|
22272
22259
|
disabled: disabled,
|
|
22273
22260
|
name: name,
|
|
22274
22261
|
checked: checked,
|
|
22275
22262
|
onChange: onChange,
|
|
22276
|
-
tabIndex: "
|
|
22263
|
+
tabIndex: "0",
|
|
22277
22264
|
required: isRequired,
|
|
22278
|
-
"aria-
|
|
22265
|
+
"aria-invalid": error,
|
|
22266
|
+
"aria-label": ariaLabel,
|
|
22267
|
+
"aria-labelledby": labelledById,
|
|
22268
|
+
"aria-describedby": error ? "".concat(name, "-error-message") : undefined,
|
|
22269
|
+
onKeyDown: function onKeyDown(e) {
|
|
22270
|
+
return handleClick(e, onChange);
|
|
22271
|
+
},
|
|
22272
|
+
onFocus: function onFocus() {
|
|
22273
|
+
return setFocused(true);
|
|
22274
|
+
},
|
|
22275
|
+
onBlur: function onBlur() {
|
|
22276
|
+
return setFocused(false);
|
|
22277
|
+
}
|
|
22279
22278
|
}), /*#__PURE__*/React__default.createElement(StyledCheckbox, {
|
|
22280
22279
|
"aria-hidden": "true",
|
|
22281
22280
|
error: error,
|
|
@@ -48453,7 +48452,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48453
48452
|
}, showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48454
48453
|
name: "bank checkbox",
|
|
48455
48454
|
dataQa: "Save checking account to wallet",
|
|
48456
|
-
title: "Save checking account to wallet.",
|
|
48455
|
+
title: "Save checking account to wallet (optional).",
|
|
48457
48456
|
checked: walletCheckboxMarked,
|
|
48458
48457
|
onChange: saveToWallet
|
|
48459
48458
|
}), showTerms && /*#__PURE__*/React__default.createElement(Cover, {
|
|
@@ -48642,7 +48641,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48642
48641
|
}, showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48643
48642
|
name: "credit card checkbox",
|
|
48644
48643
|
dataQa: "Save credit card to wallet",
|
|
48645
|
-
title: "Save credit card to wallet.",
|
|
48644
|
+
title: "Save credit card to wallet (optional).",
|
|
48646
48645
|
checked: walletCheckboxMarked,
|
|
48647
48646
|
onChange: saveToWallet
|
|
48648
48647
|
}), showTerms && /*#__PURE__*/React__default.createElement(Cover, {
|