@homebound/beam 2.80.3 → 2.80.4

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.
@@ -8,12 +8,13 @@ const HelperText_1 = require("../components/HelperText");
8
8
  const Css_1 = require("../Css");
9
9
  const ErrorMessage_1 = require("./ErrorMessage");
10
10
  const utils_1 = require("../utils");
11
+ const defaultTestId_1 = require("../utils/defaultTestId");
11
12
  function CheckboxBase(props) {
12
13
  const { ariaProps, description, isDisabled = false, isIndeterminate = false, isSelected, inputProps, label, errorMsg, helperText, } = props;
13
14
  const ref = (0, react_1.useRef)(null);
14
15
  const { isFocusVisible, focusProps } = (0, react_aria_1.useFocusRing)(ariaProps);
15
16
  const { hoverProps, isHovered } = (0, react_aria_1.useHover)({ isDisabled });
16
- const tid = (0, utils_1.useTestIds)(props);
17
+ const tid = (0, utils_1.useTestIds)(props, (0, defaultTestId_1.defaultTestId)(label));
17
18
  const markIcon = isIndeterminate ? dashSmall : isSelected ? checkmarkSmall : "";
18
19
  return ((0, jsx_runtime_1.jsxs)("label", Object.assign({ css: Css_1.Css.df.cursorPointer.relative
19
20
  // Prevents accidental checkbox clicks due to label width being longer
@@ -22,7 +23,7 @@ function CheckboxBase(props) {
22
23
  .maxw((0, Css_1.px)(320))
23
24
  .if(description !== undefined)
24
25
  .maxw((0, Css_1.px)(344))
25
- .if(isDisabled).cursorNotAllowed.$ }, { children: [(0, jsx_runtime_1.jsx)(react_aria_1.VisuallyHidden, { children: (0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref }, inputProps, focusProps), void 0) }, void 0), (0, jsx_runtime_1.jsx)("span", Object.assign({}, hoverProps, { css: {
26
+ .if(isDisabled).cursorNotAllowed.$ }, { children: [(0, jsx_runtime_1.jsx)(react_aria_1.VisuallyHidden, { children: (0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref }, inputProps, focusProps, tid), void 0) }, void 0), (0, jsx_runtime_1.jsx)("span", Object.assign({}, hoverProps, { css: {
26
27
  ...baseStyles,
27
28
  ...((isSelected || isIndeterminate) && filledBoxStyles),
28
29
  ...((isSelected || isIndeterminate) && isHovered && filledBoxHoverStyles),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.80.3",
3
+ "version": "2.80.4",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",