@thecb/components 12.1.0-beta.0 → 12.1.0-beta.1
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 +28 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +28 -25
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.js +21 -15
- package/src/components/atoms/checkbox/Checkbox.stories.js +1 -7
- package/src/components/molecules/partial-amount-form/PartialAmountField.js +2 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +1 -1
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +1 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.stories.js +0 -121
- package/src/components/molecules/payment-form-card/PaymentFormCard.stories.js +0 -120
package/dist/index.esm.js
CHANGED
|
@@ -22230,43 +22230,45 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
22230
22230
|
func();
|
|
22231
22231
|
}
|
|
22232
22232
|
};
|
|
22233
|
-
var
|
|
22234
|
-
var
|
|
22235
|
-
var
|
|
22236
|
-
// aria-label fallback when no visible title or external labelledById is provided
|
|
22237
|
-
var ariaLabel = !labelledById && !title ? name : undefined;
|
|
22233
|
+
var titleId = title ? "checkboxlabel-".concat(name) : undefined;
|
|
22234
|
+
var ariaLabelledById = labelledById !== null && labelledById !== void 0 ? labelledById : titleId;
|
|
22235
|
+
var ariaLabel = ariaLabelledById ? undefined : name;
|
|
22238
22236
|
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
22239
22237
|
ref: ref,
|
|
22240
22238
|
padding: "0",
|
|
22239
|
+
tabIndex: "0",
|
|
22240
|
+
role: "checkbox",
|
|
22241
|
+
"aria-checked": checked,
|
|
22242
|
+
"aria-required": isRequired || undefined,
|
|
22243
|
+
"aria-invalid": error,
|
|
22244
|
+
"aria-label": ariaLabel,
|
|
22245
|
+
"aria-labelledby": ariaLabelledById,
|
|
22246
|
+
"aria-describedby": error ? "".concat(name, "-error-message") : undefined,
|
|
22247
|
+
onFocus: function onFocus() {
|
|
22248
|
+
return setFocused(true);
|
|
22249
|
+
},
|
|
22250
|
+
onBlur: function onBlur() {
|
|
22251
|
+
return setFocused(false);
|
|
22252
|
+
},
|
|
22253
|
+
onKeyDown: function onKeyDown(e) {
|
|
22254
|
+
return handleClick(e, onChange);
|
|
22255
|
+
},
|
|
22241
22256
|
hiddenStyles: hidden,
|
|
22242
22257
|
background: themeValues.backgroundColor,
|
|
22243
|
-
extraStyles: "\n ".concat(extraStyles, "; \n margin: ").concat(checkboxMargin, ";\n ")
|
|
22258
|
+
extraStyles: "\n :focus {\n outline: 0;\n }\n ".concat(extraStyles, "; \n margin: ").concat(checkboxMargin, ";\n ")
|
|
22244
22259
|
}, rest), /*#__PURE__*/React__default.createElement(CheckboxLabelContainer, {
|
|
22245
|
-
htmlFor: checkboxId,
|
|
22246
22260
|
"data-qa": dataQa
|
|
22247
22261
|
}, /*#__PURE__*/React__default.createElement(CheckboxContainer, {
|
|
22248
22262
|
"data-qa": "Checkbox"
|
|
22249
22263
|
}, /*#__PURE__*/React__default.createElement(HiddenCheckbox, {
|
|
22250
|
-
id:
|
|
22264
|
+
id: "checkbox-".concat(name),
|
|
22251
22265
|
disabled: disabled,
|
|
22252
22266
|
name: name,
|
|
22253
22267
|
checked: checked,
|
|
22254
22268
|
onChange: onChange,
|
|
22255
|
-
tabIndex: "
|
|
22269
|
+
tabIndex: "-1",
|
|
22256
22270
|
required: isRequired,
|
|
22257
|
-
"aria-
|
|
22258
|
-
"aria-label": ariaLabel,
|
|
22259
|
-
"aria-labelledby": labelledById,
|
|
22260
|
-
"aria-describedby": error ? "".concat(name, "-error-message") : undefined,
|
|
22261
|
-
onKeyDown: function onKeyDown(e) {
|
|
22262
|
-
return handleClick(e, onChange);
|
|
22263
|
-
},
|
|
22264
|
-
onFocus: function onFocus() {
|
|
22265
|
-
return setFocused(true);
|
|
22266
|
-
},
|
|
22267
|
-
onBlur: function onBlur() {
|
|
22268
|
-
return setFocused(false);
|
|
22269
|
-
}
|
|
22271
|
+
"aria-hidden": "true"
|
|
22270
22272
|
}), /*#__PURE__*/React__default.createElement(StyledCheckbox, {
|
|
22271
22273
|
"aria-hidden": "true",
|
|
22272
22274
|
error: error,
|
|
@@ -47160,7 +47162,7 @@ var PartialAmountField = function PartialAmountField(_ref) {
|
|
|
47160
47162
|
extraStyles: "display: block;",
|
|
47161
47163
|
variant: themeValues.detailVariant,
|
|
47162
47164
|
weight: "400"
|
|
47163
|
-
}, lineItem.subDescription))),
|
|
47165
|
+
}, lineItem.subDescription, " payment amount"))),
|
|
47164
47166
|
key: lineItem.id,
|
|
47165
47167
|
field: field,
|
|
47166
47168
|
fieldActions: fieldActions,
|
|
@@ -47172,6 +47174,7 @@ var PartialAmountField = function PartialAmountField(_ref) {
|
|
|
47172
47174
|
placeholder: "$0.00",
|
|
47173
47175
|
formatter: moneyFormat,
|
|
47174
47176
|
isNum: true,
|
|
47177
|
+
isRequired: true,
|
|
47175
47178
|
decorator: /*#__PURE__*/React__default.createElement(Text$1, {
|
|
47176
47179
|
variant: "p"
|
|
47177
47180
|
}, "Amount owed:", " ", /*#__PURE__*/React__default.createElement(Text$1, {
|
|
@@ -48444,7 +48447,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48444
48447
|
}, showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48445
48448
|
name: "bank checkbox",
|
|
48446
48449
|
dataQa: "Save checking account to wallet",
|
|
48447
|
-
title: "Save checking account to wallet
|
|
48450
|
+
title: "Save checking account to wallet.",
|
|
48448
48451
|
checked: walletCheckboxMarked,
|
|
48449
48452
|
onChange: saveToWallet
|
|
48450
48453
|
}), showTerms && /*#__PURE__*/React__default.createElement(Cover, {
|
|
@@ -48633,7 +48636,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48633
48636
|
}, showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48634
48637
|
name: "credit card checkbox",
|
|
48635
48638
|
dataQa: "Save credit card to wallet",
|
|
48636
|
-
title: "Save credit card to wallet
|
|
48639
|
+
title: "Save credit card to wallet.",
|
|
48637
48640
|
checked: walletCheckboxMarked,
|
|
48638
48641
|
onChange: saveToWallet
|
|
48639
48642
|
}), showTerms && /*#__PURE__*/React__default.createElement(Cover, {
|