@thecb/components 12.1.0-beta.0 → 12.1.0-beta.10
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/README.md +5 -24
- package/dist/index.cjs.js +29 -26
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +29 -26
- package/dist/index.esm.js.map +1 -1
- package/package.json +4 -2
- package/src/components/atoms/checkbox/Checkbox.js +21 -15
- package/src/components/atoms/checkbox/Checkbox.stories.js +1 -7
- package/src/components/atoms/nav-footer/NavFooter.js +2 -2
- 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/terms-and-conditions/TermsAndConditionsControlV2.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/README.md
CHANGED
|
@@ -140,32 +140,13 @@ Publishing to NPM is automated. When a PR is merged to master, the package will
|
|
|
140
140
|
- Run `yarn add @thecb/components`.
|
|
141
141
|
- To verify it installed successfully, make sure it is in the applicaton's `package.json` file.
|
|
142
142
|
|
|
143
|
-
###
|
|
143
|
+
### Testing changes locally
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
Open the `@thecb/components`, and in the command line
|
|
145
|
+
See **[TESTING.md](./TESTING.md)** for a complete guide to testing your changes. In short, you have three options:
|
|
147
146
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
You should see a success message, and directions on how to link this package into an application. In the application you’d like the components, navigate to that application and in the command line
|
|
152
|
-
|
|
153
|
-
- Run `yarn link @thecb/components`
|
|
154
|
-
|
|
155
|
-
Now the package is linked locally and you can make changes to the `@thecb/components` and you’ll see the changes in the application running `@thecb/components`. To unlink the package, in the application running `@thecb/components` and in the command line
|
|
156
|
-
|
|
157
|
-
- Run `yarn unlink @thecb/components`
|
|
158
|
-
- Run `yarn install` ` --``force `
|
|
159
|
-
|
|
160
|
-
Next go to the `@thecb/components` and in the command line
|
|
161
|
-
|
|
162
|
-
- Run `yarn unlink`
|
|
163
|
-
|
|
164
|
-
Now the package is unlinked, and you’re using the version on NPM.
|
|
165
|
-
|
|
166
|
-
### Yalc
|
|
167
|
-
|
|
168
|
-
If you encounter issues using `yarn link`, a nice alternative is `yalc`. See [https://github.com/wclr/yalc](https://github.com/wclr/yalc) for usage instructions.
|
|
147
|
+
1. **Storybook** (`yarn storybook`) — fastest, for self-contained component changes
|
|
148
|
+
2. **Live Sync** (`yarn sync <path-to-project>`) — test inside a real running app without publishing
|
|
149
|
+
3. **Beta Publish** (`yarn publish-beta`) — publish to npm for CI/CD, QA, or sharing with teammates
|
|
169
150
|
|
|
170
151
|
### Importing and using components
|
|
171
152
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -22238,43 +22238,45 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
|
22238
22238
|
func();
|
|
22239
22239
|
}
|
|
22240
22240
|
};
|
|
22241
|
-
var
|
|
22242
|
-
var
|
|
22243
|
-
var
|
|
22244
|
-
// aria-label fallback when no visible title or external labelledById is provided
|
|
22245
|
-
var ariaLabel = !labelledById && !title ? name : 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;
|
|
22246
22244
|
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
22247
22245
|
ref: ref,
|
|
22248
22246
|
padding: "0",
|
|
22247
|
+
tabIndex: "0",
|
|
22248
|
+
role: "checkbox",
|
|
22249
|
+
"aria-checked": checked,
|
|
22250
|
+
"aria-required": isRequired || undefined,
|
|
22251
|
+
"aria-invalid": error,
|
|
22252
|
+
"aria-label": ariaLabel,
|
|
22253
|
+
"aria-labelledby": ariaLabelledById,
|
|
22254
|
+
"aria-describedby": error ? "".concat(name, "-error-message") : undefined,
|
|
22255
|
+
onFocus: function onFocus() {
|
|
22256
|
+
return setFocused(true);
|
|
22257
|
+
},
|
|
22258
|
+
onBlur: function onBlur() {
|
|
22259
|
+
return setFocused(false);
|
|
22260
|
+
},
|
|
22261
|
+
onKeyDown: function onKeyDown(e) {
|
|
22262
|
+
return handleClick(e, onChange);
|
|
22263
|
+
},
|
|
22249
22264
|
hiddenStyles: hidden,
|
|
22250
22265
|
background: themeValues.backgroundColor,
|
|
22251
|
-
extraStyles: "\n ".concat(extraStyles, "; \n margin: ").concat(checkboxMargin, ";\n ")
|
|
22266
|
+
extraStyles: "\n :focus {\n outline: 0;\n }\n ".concat(extraStyles, "; \n margin: ").concat(checkboxMargin, ";\n ")
|
|
22252
22267
|
}, rest), /*#__PURE__*/React__default.createElement(CheckboxLabelContainer, {
|
|
22253
|
-
htmlFor: checkboxId,
|
|
22254
22268
|
"data-qa": dataQa
|
|
22255
22269
|
}, /*#__PURE__*/React__default.createElement(CheckboxContainer, {
|
|
22256
22270
|
"data-qa": "Checkbox"
|
|
22257
22271
|
}, /*#__PURE__*/React__default.createElement(HiddenCheckbox, {
|
|
22258
|
-
id:
|
|
22272
|
+
id: "checkbox-".concat(name),
|
|
22259
22273
|
disabled: disabled,
|
|
22260
22274
|
name: name,
|
|
22261
22275
|
checked: checked,
|
|
22262
22276
|
onChange: onChange,
|
|
22263
|
-
tabIndex: "
|
|
22277
|
+
tabIndex: "-1",
|
|
22264
22278
|
required: isRequired,
|
|
22265
|
-
"aria-
|
|
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
|
+
"aria-hidden": "true"
|
|
22278
22280
|
}), /*#__PURE__*/React__default.createElement(StyledCheckbox, {
|
|
22279
22281
|
"aria-hidden": "true",
|
|
22280
22282
|
error: error,
|
|
@@ -27027,7 +27029,7 @@ var NavFooter = function NavFooter(_ref) {
|
|
|
27027
27029
|
background: backgroundColor,
|
|
27028
27030
|
minHeight: footerMinHeight,
|
|
27029
27031
|
minWidth: "100%",
|
|
27030
|
-
extraStyles: isMobile ? "
|
|
27032
|
+
extraStyles: isMobile ? "" : "min-height: ".concat(footerMinHeight, "; > * { min-height: 100%; };")
|
|
27031
27033
|
}, rest), /*#__PURE__*/React__default.createElement(Center, {
|
|
27032
27034
|
maxWidth: footerWidth || "76.5rem"
|
|
27033
27035
|
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
@@ -48247,7 +48249,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
48247
48249
|
}, html), /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48248
48250
|
justify: "flex-start",
|
|
48249
48251
|
align: "center",
|
|
48250
|
-
nowrap: true
|
|
48252
|
+
nowrap: true,
|
|
48253
|
+
overflow: true
|
|
48251
48254
|
}, showCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48252
48255
|
name: id,
|
|
48253
48256
|
error: hasError,
|
|
@@ -48452,7 +48455,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48452
48455
|
}, showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48453
48456
|
name: "bank checkbox",
|
|
48454
48457
|
dataQa: "Save checking account to wallet",
|
|
48455
|
-
title: "Save checking account to wallet
|
|
48458
|
+
title: "Save checking account to wallet.",
|
|
48456
48459
|
checked: walletCheckboxMarked,
|
|
48457
48460
|
onChange: saveToWallet
|
|
48458
48461
|
}), showTerms && /*#__PURE__*/React__default.createElement(Cover, {
|
|
@@ -48641,7 +48644,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48641
48644
|
}, showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48642
48645
|
name: "credit card checkbox",
|
|
48643
48646
|
dataQa: "Save credit card to wallet",
|
|
48644
|
-
title: "Save credit card to wallet
|
|
48647
|
+
title: "Save credit card to wallet.",
|
|
48645
48648
|
checked: walletCheckboxMarked,
|
|
48646
48649
|
onChange: saveToWallet
|
|
48647
48650
|
}), showTerms && /*#__PURE__*/React__default.createElement(Cover, {
|