@trackunit/react-components 1.4.60 → 1.4.62

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
@@ -86,7 +86,7 @@ const cvaIcon = cssClassVarianceUtilities.cvaMerge(["aspect-square", "inline-gri
86
86
  ],
87
87
  defaultVariants: {
88
88
  color: "default",
89
- size: "large",
89
+ size: "medium",
90
90
  },
91
91
  });
92
92
  cssClassVarianceUtilities.cvaMerge([], {
@@ -134,7 +134,7 @@ const isSafari = () => {
134
134
  * @param {IconProps} props - The props for the Icon component
135
135
  * @returns {ReactElement} Icon component
136
136
  */
137
- const Icon = ({ name, size = "large", className, dataTestId, color, onClick, type, style, forwardedRef, ariaLabel, fontSize, ariaLabelledBy, ariaDescribedBy, }) => {
137
+ const Icon = ({ name, size = "medium", className, dataTestId, color, onClick, type, style, forwardedRef, ariaLabel, fontSize, ariaLabelledBy, ariaDescribedBy, }) => {
138
138
  const useTagRef = react.useRef(null);
139
139
  const ICON_CONTAINER_ID = sharedUtils.uuidv4();
140
140
  const correctIconType = react.useMemo(() => {
@@ -2563,20 +2563,25 @@ const Tooltip = ({ children, dataTestId = "tool-tip", disabled, className, label
2563
2563
 
2564
2564
  const cvaIndicator = cssClassVarianceUtilities.cvaMerge(["flex", "items-center"]);
2565
2565
  const cvaIndicatorIcon = cssClassVarianceUtilities.cvaMerge(["mr-2"]);
2566
- const cvaIndicatorLabel = cssClassVarianceUtilities.cvaMerge(["capitalize", "text-secondary-600"], {
2566
+ const cvaIndicatorLabel = cssClassVarianceUtilities.cvaMerge(["capitalize"], {
2567
2567
  variants: {
2568
2568
  size: {
2569
- small: "pl-1 pr-1 text-xs",
2570
- medium: "pl-2 pr-2 text-sm",
2569
+ small: "text-xs",
2570
+ medium: "text-sm",
2571
2571
  },
2572
2572
  weight: {
2573
2573
  normal: "font-normal",
2574
2574
  medium: "font-medium",
2575
2575
  },
2576
+ background: {
2577
+ visible: "pl-2 pr-1",
2578
+ hidden: "pl-1 pr-1",
2579
+ },
2576
2580
  },
2577
2581
  defaultVariants: {
2578
2582
  size: "medium",
2579
2583
  weight: "medium",
2584
+ background: "visible",
2580
2585
  },
2581
2586
  });
2582
2587
  const cvaIndicatorPing = cssClassVarianceUtilities.cvaMerge(["animate-ping-sm", "absolute", "inline-flex", "h-full", "w-full", "rounded-full", "opacity-75", "bg-neutral-600"], {
@@ -2685,7 +2690,7 @@ const cvaIndicatorIconBackground = cssClassVarianceUtilities.cvaMerge(["rounded-
2685
2690
  * @returns {ReactElement} Indicator component
2686
2691
  */
2687
2692
  const Indicator = ({ dataTestId, icon, label, color = "unknown", withBackground = true, withLabel = true, ping = false, size, weight, className, ...rest }) => {
2688
- return (jsxRuntime.jsx(Tooltip, { className: className, disabled: withLabel, label: label, placement: "bottom", children: jsxRuntime.jsxs("div", { "aria-label": label, className: cvaIndicator(), "data-testid": dataTestId, ...rest, children: [jsxRuntime.jsxs("div", { className: cvaIndicatorIconBackground({ color, background: withBackground ? "visible" : "hidden" }), "data-testid": dataTestId ? `${dataTestId}-background` : "indicator-background", children: [ping ? (jsxRuntime.jsx("div", { className: cvaIndicatorPing({ color }), "data-testid": dataTestId ? `${dataTestId}-ping` : "indicator-ping" })) : null, icon] }), label !== undefined && withLabel ? (jsxRuntime.jsx("div", { className: cvaIndicatorLabel({ size, weight }), "data-testid": dataTestId ? `${dataTestId}-label` : "indicator-label", children: label })) : null] }) }));
2693
+ return (jsxRuntime.jsx(Tooltip, { className: className, disabled: withLabel, label: label, placement: "bottom", children: jsxRuntime.jsxs("div", { "aria-label": label, className: cvaIndicator(), "data-testid": dataTestId, ...rest, children: [jsxRuntime.jsxs("div", { className: cvaIndicatorIconBackground({ color, background: withBackground ? "visible" : "hidden" }), "data-testid": dataTestId ? `${dataTestId}-background` : "indicator-background", children: [ping ? (jsxRuntime.jsx("div", { className: cvaIndicatorPing({ color }), "data-testid": dataTestId ? `${dataTestId}-ping` : "indicator-ping" })) : null, icon] }), label !== undefined && withLabel ? (jsxRuntime.jsx("div", { className: cvaIndicatorLabel({ size, weight, background: withBackground ? "visible" : "hidden" }), "data-testid": dataTestId ? `${dataTestId}-label` : "indicator-label", children: label })) : null] }) }));
2689
2694
  };
2690
2695
 
2691
2696
  const cvaKPI = cssClassVarianceUtilities.cvaMerge(["w-full", "px-4", "py-2", "flex", "flex-col", "gap-1"], {
package/index.esm.js CHANGED
@@ -84,7 +84,7 @@ const cvaIcon = cvaMerge(["aspect-square", "inline-grid", "relative"], {
84
84
  ],
85
85
  defaultVariants: {
86
86
  color: "default",
87
- size: "large",
87
+ size: "medium",
88
88
  },
89
89
  });
90
90
  cvaMerge([], {
@@ -132,7 +132,7 @@ const isSafari = () => {
132
132
  * @param {IconProps} props - The props for the Icon component
133
133
  * @returns {ReactElement} Icon component
134
134
  */
135
- const Icon = ({ name, size = "large", className, dataTestId, color, onClick, type, style, forwardedRef, ariaLabel, fontSize, ariaLabelledBy, ariaDescribedBy, }) => {
135
+ const Icon = ({ name, size = "medium", className, dataTestId, color, onClick, type, style, forwardedRef, ariaLabel, fontSize, ariaLabelledBy, ariaDescribedBy, }) => {
136
136
  const useTagRef = useRef(null);
137
137
  const ICON_CONTAINER_ID = uuidv4();
138
138
  const correctIconType = useMemo(() => {
@@ -2561,20 +2561,25 @@ const Tooltip = ({ children, dataTestId = "tool-tip", disabled, className, label
2561
2561
 
2562
2562
  const cvaIndicator = cvaMerge(["flex", "items-center"]);
2563
2563
  const cvaIndicatorIcon = cvaMerge(["mr-2"]);
2564
- const cvaIndicatorLabel = cvaMerge(["capitalize", "text-secondary-600"], {
2564
+ const cvaIndicatorLabel = cvaMerge(["capitalize"], {
2565
2565
  variants: {
2566
2566
  size: {
2567
- small: "pl-1 pr-1 text-xs",
2568
- medium: "pl-2 pr-2 text-sm",
2567
+ small: "text-xs",
2568
+ medium: "text-sm",
2569
2569
  },
2570
2570
  weight: {
2571
2571
  normal: "font-normal",
2572
2572
  medium: "font-medium",
2573
2573
  },
2574
+ background: {
2575
+ visible: "pl-2 pr-1",
2576
+ hidden: "pl-1 pr-1",
2577
+ },
2574
2578
  },
2575
2579
  defaultVariants: {
2576
2580
  size: "medium",
2577
2581
  weight: "medium",
2582
+ background: "visible",
2578
2583
  },
2579
2584
  });
2580
2585
  const cvaIndicatorPing = cvaMerge(["animate-ping-sm", "absolute", "inline-flex", "h-full", "w-full", "rounded-full", "opacity-75", "bg-neutral-600"], {
@@ -2683,7 +2688,7 @@ const cvaIndicatorIconBackground = cvaMerge(["rounded-full", "items-center", "ju
2683
2688
  * @returns {ReactElement} Indicator component
2684
2689
  */
2685
2690
  const Indicator = ({ dataTestId, icon, label, color = "unknown", withBackground = true, withLabel = true, ping = false, size, weight, className, ...rest }) => {
2686
- return (jsx(Tooltip, { className: className, disabled: withLabel, label: label, placement: "bottom", children: jsxs("div", { "aria-label": label, className: cvaIndicator(), "data-testid": dataTestId, ...rest, children: [jsxs("div", { className: cvaIndicatorIconBackground({ color, background: withBackground ? "visible" : "hidden" }), "data-testid": dataTestId ? `${dataTestId}-background` : "indicator-background", children: [ping ? (jsx("div", { className: cvaIndicatorPing({ color }), "data-testid": dataTestId ? `${dataTestId}-ping` : "indicator-ping" })) : null, icon] }), label !== undefined && withLabel ? (jsx("div", { className: cvaIndicatorLabel({ size, weight }), "data-testid": dataTestId ? `${dataTestId}-label` : "indicator-label", children: label })) : null] }) }));
2691
+ return (jsx(Tooltip, { className: className, disabled: withLabel, label: label, placement: "bottom", children: jsxs("div", { "aria-label": label, className: cvaIndicator(), "data-testid": dataTestId, ...rest, children: [jsxs("div", { className: cvaIndicatorIconBackground({ color, background: withBackground ? "visible" : "hidden" }), "data-testid": dataTestId ? `${dataTestId}-background` : "indicator-background", children: [ping ? (jsx("div", { className: cvaIndicatorPing({ color }), "data-testid": dataTestId ? `${dataTestId}-ping` : "indicator-ping" })) : null, icon] }), label !== undefined && withLabel ? (jsx("div", { className: cvaIndicatorLabel({ size, weight, background: withBackground ? "visible" : "hidden" }), "data-testid": dataTestId ? `${dataTestId}-label` : "indicator-label", children: label })) : null] }) }));
2687
2692
  };
2688
2693
 
2689
2694
  const cvaKPI = cvaMerge(["w-full", "px-4", "py-2", "flex", "flex-col", "gap-1"], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "1.4.60",
3
+ "version": "1.4.62",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -18,11 +18,11 @@
18
18
  "@tanstack/react-router": "1.47.1",
19
19
  "string-ts": "^2.0.0",
20
20
  "tailwind-merge": "^2.0.0",
21
- "@trackunit/ui-design-tokens": "1.3.49",
22
- "@trackunit/css-class-variance-utilities": "1.3.49",
23
- "@trackunit/shared-utils": "1.5.49",
24
- "@trackunit/ui-icons": "1.3.49",
25
- "@trackunit/react-table-pagination": "1.3.50"
21
+ "@trackunit/ui-design-tokens": "1.3.50",
22
+ "@trackunit/css-class-variance-utilities": "1.3.50",
23
+ "@trackunit/shared-utils": "1.5.50",
24
+ "@trackunit/ui-icons": "1.3.50",
25
+ "@trackunit/react-table-pagination": "1.3.51"
26
26
  },
27
27
  "module": "./index.esm.js",
28
28
  "main": "./index.cjs.js",
@@ -3,6 +3,7 @@ export declare const cvaIndicatorIcon: (props?: import("class-variance-authority
3
3
  export declare const cvaIndicatorLabel: (props?: ({
4
4
  size?: "small" | "medium" | null | undefined;
5
5
  weight?: "medium" | "normal" | null | undefined;
6
+ background?: "visible" | "hidden" | null | undefined;
6
7
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
8
  export declare const cvaIndicatorPing: (props?: ({
8
9
  color?: "primary" | "secondary" | "neutral" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "idle" | "stopped" | "moving" | "active" | "unknown" | "unused" | "utilized" | "heavily_utilized" | "unknown_utilization" | "available" | "on_rent" | "pickup_ready" | "transfer" | "in_repair" | "returned" | "other_rental_status" | "site_area" | "site_classic_poi" | "site_classic_zone" | "site_depot" | "site_work_place" | "site_construction_site" | "site_unknown" | "white" | "black" | null | undefined;