@trackunit/react-form-components 0.1.92 → 0.1.93

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
@@ -595,10 +595,10 @@ const Checkbox = React__namespace.forwardRef(({ className, dataTestId = "checkbo
595
595
  disabled: isReadonly,
596
596
  invalid: isReadonly ? false : isInvalid,
597
597
  state: indeterminate ? "indeterminate" : checked ? "selected" : "deselected",
598
- }), id: uuid, tabIndex: isReadonly ? -1 : tabIndex, children: icon }), label ? (jsxRuntime.jsx(reactComponents.Tooltip, { className: "w-full", disabled: !textIsCutOff, label: label, placement: "top", children: jsxRuntime.jsx("span", { className: cvaLabel({
598
+ }), id: uuid, tabIndex: isReadonly ? -1 : tabIndex, children: icon }), jsxRuntime.jsx(reactComponents.Tooltip, { className: "w-full", disabled: !textIsCutOff, label: label, placement: "top", children: jsxRuntime.jsx("span", { className: cvaLabel({
599
599
  invalid: isReadonly ? false : isInvalid,
600
600
  disabled: isReadonly,
601
- }), id: `checkbox-label-${label}`, ref: labelRef, children: label }) }, "tooltip-" + rest.name)) : null, suffix] }));
601
+ }), id: `checkbox-label-${label}`, ref: labelRef, children: label }) }, "tooltip-" + rest.name), suffix] }));
602
602
  });
603
603
  Checkbox.displayName = "Checkbox";
604
604
 
@@ -1438,7 +1438,6 @@ const cvaRadioItemWrapper = cssClassVarianceUtilities.cvaMerge([
1438
1438
  "grid-cols-min-fr",
1439
1439
  "has-[:nth-child(3)]:grid-cols-min-fr-min", //if there's 3 children
1440
1440
  ]);
1441
- const cvaRadioItemLabelContainer = cssClassVarianceUtilities.cvaMerge(["grid", "flex-grow"]);
1442
1441
  const cvaRadioItemDescription = cssClassVarianceUtilities.cvaMerge([
1443
1442
  "-mt-1",
1444
1443
  "text-sm",
@@ -1500,10 +1499,10 @@ const RadioItem = ({ label, value, dataTestId, className, description, suffix, .
1500
1499
  checked: isChecked,
1501
1500
  disabled: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.disabled,
1502
1501
  invalid: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.isInvalid,
1503
- }), "data-testid": dataTestId, id: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, onChange: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.onChange, type: "radio", value: value, ...rest }), jsxRuntime.jsxs("div", { className: cvaRadioItemLabelContainer(), children: [jsxRuntime.jsx(reactComponents.Tooltip, { className: "w-full", disabled: !labelTextIsCutOff, label: label, placement: "top", children: jsxRuntime.jsx("label", { className: cvaLabel({
1504
- invalid: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.isInvalid,
1505
- disabled: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.disabled,
1506
- }), "data-testid": dataTestId ? `${dataTestId}-Label` : undefined, htmlFor: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, ref: labelRef, children: label }) }, "tooltip-" + rest.name), description ? (jsxRuntime.jsx(reactComponents.Tooltip, { className: "w-full", disabled: !descriptionTextIsCutOff, label: description, placement: "top", children: jsxRuntime.jsx("label", { className: cvaRadioItemDescription({ disabled: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.disabled }), "data-testid": dataTestId ? `${dataTestId}-Description` : null, htmlFor: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, ref: descriptionRef, children: description }) }, "description-tooltip-" + rest.name)) : null] }), suffix] }));
1502
+ }), "data-testid": dataTestId, id: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, onChange: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.onChange, type: "radio", value: value, ...rest }), jsxRuntime.jsx(reactComponents.Tooltip, { className: "w-full", disabled: !labelTextIsCutOff, label: label, placement: "top", children: jsxRuntime.jsx("label", { className: cvaLabel({
1503
+ invalid: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.isInvalid,
1504
+ disabled: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.disabled,
1505
+ }), "data-testid": dataTestId ? `${dataTestId}-Label` : undefined, htmlFor: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, ref: labelRef, children: label }) }, "tooltip-" + rest.name), description ? (jsxRuntime.jsx(reactComponents.Tooltip, { className: "w-full", disabled: !descriptionTextIsCutOff, label: description, placement: "top", children: jsxRuntime.jsx("label", { className: cvaRadioItemDescription({ disabled: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.disabled }), "data-testid": dataTestId ? `${dataTestId}-Description` : null, htmlFor: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, ref: descriptionRef, children: description }) }, "description-tooltip-" + rest.name)) : null, suffix] }));
1507
1506
  };
1508
1507
 
1509
1508
  const cvaTimeRange = cssClassVarianceUtilities.cvaMerge([
package/index.esm.js CHANGED
@@ -576,10 +576,10 @@ const Checkbox = React.forwardRef(({ className, dataTestId = "checkbox", onChang
576
576
  disabled: isReadonly,
577
577
  invalid: isReadonly ? false : isInvalid,
578
578
  state: indeterminate ? "indeterminate" : checked ? "selected" : "deselected",
579
- }), id: uuid, tabIndex: isReadonly ? -1 : tabIndex, children: icon }), label ? (jsx(Tooltip, { className: "w-full", disabled: !textIsCutOff, label: label, placement: "top", children: jsx("span", { className: cvaLabel({
579
+ }), id: uuid, tabIndex: isReadonly ? -1 : tabIndex, children: icon }), jsx(Tooltip, { className: "w-full", disabled: !textIsCutOff, label: label, placement: "top", children: jsx("span", { className: cvaLabel({
580
580
  invalid: isReadonly ? false : isInvalid,
581
581
  disabled: isReadonly,
582
- }), id: `checkbox-label-${label}`, ref: labelRef, children: label }) }, "tooltip-" + rest.name)) : null, suffix] }));
582
+ }), id: `checkbox-label-${label}`, ref: labelRef, children: label }) }, "tooltip-" + rest.name), suffix] }));
583
583
  });
584
584
  Checkbox.displayName = "Checkbox";
585
585
 
@@ -1419,7 +1419,6 @@ const cvaRadioItemWrapper = cvaMerge([
1419
1419
  "grid-cols-min-fr",
1420
1420
  "has-[:nth-child(3)]:grid-cols-min-fr-min", //if there's 3 children
1421
1421
  ]);
1422
- const cvaRadioItemLabelContainer = cvaMerge(["grid", "flex-grow"]);
1423
1422
  const cvaRadioItemDescription = cvaMerge([
1424
1423
  "-mt-1",
1425
1424
  "text-sm",
@@ -1481,10 +1480,10 @@ const RadioItem = ({ label, value, dataTestId, className, description, suffix, .
1481
1480
  checked: isChecked,
1482
1481
  disabled: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.disabled,
1483
1482
  invalid: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.isInvalid,
1484
- }), "data-testid": dataTestId, id: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, onChange: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.onChange, type: "radio", value: value, ...rest }), jsxs("div", { className: cvaRadioItemLabelContainer(), children: [jsx(Tooltip, { className: "w-full", disabled: !labelTextIsCutOff, label: label, placement: "top", children: jsx("label", { className: cvaLabel({
1485
- invalid: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.isInvalid,
1486
- disabled: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.disabled,
1487
- }), "data-testid": dataTestId ? `${dataTestId}-Label` : undefined, htmlFor: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, ref: labelRef, children: label }) }, "tooltip-" + rest.name), description ? (jsx(Tooltip, { className: "w-full", disabled: !descriptionTextIsCutOff, label: description, placement: "top", children: jsx("label", { className: cvaRadioItemDescription({ disabled: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.disabled }), "data-testid": dataTestId ? `${dataTestId}-Description` : null, htmlFor: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, ref: descriptionRef, children: description }) }, "description-tooltip-" + rest.name)) : null] }), suffix] }));
1483
+ }), "data-testid": dataTestId, id: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, onChange: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.onChange, type: "radio", value: value, ...rest }), jsx(Tooltip, { className: "w-full", disabled: !labelTextIsCutOff, label: label, placement: "top", children: jsx("label", { className: cvaLabel({
1484
+ invalid: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.isInvalid,
1485
+ disabled: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.disabled,
1486
+ }), "data-testid": dataTestId ? `${dataTestId}-Label` : undefined, htmlFor: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, ref: labelRef, children: label }) }, "tooltip-" + rest.name), description ? (jsx(Tooltip, { className: "w-full", disabled: !descriptionTextIsCutOff, label: description, placement: "top", children: jsx("label", { className: cvaRadioItemDescription({ disabled: groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.disabled }), "data-testid": dataTestId ? `${dataTestId}-Description` : null, htmlFor: `${groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.id}-${value}`, ref: descriptionRef, children: description }) }, "description-tooltip-" + rest.name)) : null, suffix] }));
1488
1487
  };
1489
1488
 
1490
1489
  const cvaTimeRange = cvaMerge([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-components",
3
- "version": "0.1.92",
3
+ "version": "0.1.93",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -7,7 +7,6 @@ export declare const cvaRadioItem: (props?: ({
7
7
  disabled?: boolean | null | undefined;
8
8
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
9
9
  export declare const cvaRadioItemWrapper: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
10
- export declare const cvaRadioItemLabelContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
11
10
  export declare const cvaRadioItemDescription: (props?: ({
12
11
  disabled?: boolean | null | undefined;
13
12
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;