@trackunit/react-form-components 1.0.7 → 1.0.9

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/index.cjs.js CHANGED
@@ -578,7 +578,7 @@ const Checkbox = React__namespace.forwardRef(({ className, dataTestId = "checkbo
578
578
  const icon = indeterminate ? (jsxRuntime.jsx(IndeterminateIcon, { className: cvaCheckboxIcon() })) : (checked && jsxRuntime.jsx(CheckIcon, { className: cvaCheckboxIcon() }));
579
579
  const internalRef = React__namespace.useRef(null);
580
580
  const labelRef = React__namespace.useRef(null);
581
- const textIsCutOff = reactComponents.useIsTextCutOff(labelRef.current);
581
+ const textIsCutOff = reactComponents.useIsTextCutOff(labelRef);
582
582
  const isReadonly = disabled || readOnly;
583
583
  const onKeyPress = e => {
584
584
  var _a, _b;
@@ -1488,8 +1488,8 @@ const RadioItem = ({ label, value, dataTestId, className, description, suffix, .
1488
1488
  const isChecked = (groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.value) === value;
1489
1489
  const labelRef = React.useRef(null);
1490
1490
  const descriptionRef = React.useRef(null);
1491
- const labelTextIsCutOff = reactComponents.useIsTextCutOff(labelRef.current);
1492
- const descriptionTextIsCutOff = reactComponents.useIsTextCutOff(descriptionRef.current);
1491
+ const labelTextIsCutOff = reactComponents.useIsTextCutOff(labelRef);
1492
+ const descriptionTextIsCutOff = reactComponents.useIsTextCutOff(descriptionRef);
1493
1493
  const descriptionId = description ? `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}-description` : undefined;
1494
1494
  const inputId = `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`;
1495
1495
  return (jsxRuntime.jsxs("label", { className: cvaRadioItemWrapper({ className }), "data-testid": dataTestId ? `${dataTestId}-Wrapper` : undefined, htmlFor: inputId, children: [jsxRuntime.jsx("input", { "aria-describedby": descriptionId, checked: isChecked, className: cvaRadioItem({
package/index.esm.js CHANGED
@@ -559,7 +559,7 @@ const Checkbox = React.forwardRef(({ className, dataTestId = "checkbox", onChang
559
559
  const icon = indeterminate ? (jsx(IndeterminateIcon, { className: cvaCheckboxIcon() })) : (checked && jsx(CheckIcon, { className: cvaCheckboxIcon() }));
560
560
  const internalRef = React.useRef(null);
561
561
  const labelRef = React.useRef(null);
562
- const textIsCutOff = useIsTextCutOff(labelRef.current);
562
+ const textIsCutOff = useIsTextCutOff(labelRef);
563
563
  const isReadonly = disabled || readOnly;
564
564
  const onKeyPress = e => {
565
565
  var _a, _b;
@@ -1469,8 +1469,8 @@ const RadioItem = ({ label, value, dataTestId, className, description, suffix, .
1469
1469
  const isChecked = (groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.value) === value;
1470
1470
  const labelRef = useRef(null);
1471
1471
  const descriptionRef = useRef(null);
1472
- const labelTextIsCutOff = useIsTextCutOff(labelRef.current);
1473
- const descriptionTextIsCutOff = useIsTextCutOff(descriptionRef.current);
1472
+ const labelTextIsCutOff = useIsTextCutOff(labelRef);
1473
+ const descriptionTextIsCutOff = useIsTextCutOff(descriptionRef);
1474
1474
  const descriptionId = description ? `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}-description` : undefined;
1475
1475
  const inputId = `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`;
1476
1476
  return (jsxs("label", { className: cvaRadioItemWrapper({ className }), "data-testid": dataTestId ? `${dataTestId}-Wrapper` : undefined, htmlFor: inputId, children: [jsx("input", { "aria-describedby": descriptionId, checked: isChecked, className: cvaRadioItem({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-components",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -18,7 +18,7 @@
18
18
  "react-hook-form": "7.53.1",
19
19
  "tailwind-merge": "^2.0.0",
20
20
  "@trackunit/css-class-variance-utilities": "^1.0.1",
21
- "@trackunit/react-components": "^1.0.7",
21
+ "@trackunit/react-components": "^1.0.9",
22
22
  "@trackunit/ui-icons": "^1.0.1",
23
23
  "@trackunit/shared-utils": "^1.0.2",
24
24
  "@trackunit/i18n-library-translation": "^1.0.3"