@trackunit/react-components 1.7.6 → 1.7.8
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
|
@@ -51,24 +51,24 @@ const cvaIcon = cssClassVarianceUtilities.cvaMerge(["aspect-square", "inline-gri
|
|
|
51
51
|
default: "text-current",
|
|
52
52
|
black: "text-black",
|
|
53
53
|
white: "text-white",
|
|
54
|
-
unused: "text-unused-
|
|
54
|
+
unused: "text-unused-400",
|
|
55
55
|
utilized: "text-utilized-600",
|
|
56
56
|
heavily_utilized: "text-heavily_utilized-500",
|
|
57
|
-
unknown_utilization: "text-
|
|
57
|
+
unknown_utilization: "text-unknown_utilization-600",
|
|
58
58
|
site_area: "text-site_area-600",
|
|
59
|
-
site_classic_poi: "text-site_classic_poi-
|
|
60
|
-
site_classic_zone: "text-site_classic_zone-
|
|
59
|
+
site_classic_poi: "text-site_classic_poi-600",
|
|
60
|
+
site_classic_zone: "text-site_classic_zone-600",
|
|
61
61
|
site_depot: "text-site_depot-500",
|
|
62
62
|
site_work_place: "text-site_work_place-600",
|
|
63
63
|
site_construction_site: "text-site_construction_site-500",
|
|
64
|
-
site_unknown: "text-site_unknown-
|
|
65
|
-
on_rent: "text-on_rent-
|
|
66
|
-
returned: "text-returned-
|
|
67
|
-
available: "text-available-
|
|
68
|
-
pickup_ready: "text-pickup_ready-
|
|
69
|
-
transfer: "text-transfer-
|
|
70
|
-
in_repair: "text-in_repair-
|
|
71
|
-
other_rental_status: "text-other_rental_status-
|
|
64
|
+
site_unknown: "text-site_unknown-600",
|
|
65
|
+
on_rent: "text-on_rent-400",
|
|
66
|
+
returned: "text-returned-500",
|
|
67
|
+
available: "text-available-500",
|
|
68
|
+
pickup_ready: "text-pickup_ready-500",
|
|
69
|
+
transfer: "text-transfer-300",
|
|
70
|
+
in_repair: "text-in_repair-400",
|
|
71
|
+
other_rental_status: "text-other_rental_status-500",
|
|
72
72
|
},
|
|
73
73
|
size: {
|
|
74
74
|
small: "w-4",
|
|
@@ -2230,9 +2230,12 @@ const cvaHighlight = cssClassVarianceUtilities.cvaMerge([
|
|
|
2230
2230
|
"truncate",
|
|
2231
2231
|
"max-w-full",
|
|
2232
2232
|
"w-fit",
|
|
2233
|
-
"text-xs",
|
|
2234
2233
|
], {
|
|
2235
2234
|
variants: {
|
|
2235
|
+
size: {
|
|
2236
|
+
small: ["text-xs"],
|
|
2237
|
+
medium: ["text-sm"],
|
|
2238
|
+
},
|
|
2236
2239
|
color: {
|
|
2237
2240
|
info: ["bg-info-100", "text-info-700"],
|
|
2238
2241
|
success: ["bg-success-100", "text-success-700"],
|
|
@@ -2242,6 +2245,7 @@ const cvaHighlight = cssClassVarianceUtilities.cvaMerge([
|
|
|
2242
2245
|
},
|
|
2243
2246
|
},
|
|
2244
2247
|
defaultVariants: {
|
|
2248
|
+
size: "small",
|
|
2245
2249
|
color: "warning",
|
|
2246
2250
|
},
|
|
2247
2251
|
});
|
|
@@ -2258,8 +2262,8 @@ const cvaHighlightText = cssClassVarianceUtilities.cvaMerge(["truncate"]);
|
|
|
2258
2262
|
* @param {HighlightProps} props - The props for the highlight component
|
|
2259
2263
|
* @returns {ReactElement} highlight component
|
|
2260
2264
|
*/
|
|
2261
|
-
const Highlight = ({ className, dataTestId, children, color = "warning", ref }) => {
|
|
2262
|
-
return (jsxRuntime.jsx("div", { className: cvaHighlight({ className, color }), "data-testid": dataTestId, ref: ref, children: jsxRuntime.jsx("span", { className: cvaHighlightText(), children: children }) }));
|
|
2265
|
+
const Highlight = ({ className, dataTestId, children, size = "small", color = "warning", ref, }) => {
|
|
2266
|
+
return (jsxRuntime.jsx("div", { className: cvaHighlight({ className, size, color }), "data-testid": dataTestId, ref: ref, children: jsxRuntime.jsx("span", { className: cvaHighlightText(), children: children }) }));
|
|
2263
2267
|
};
|
|
2264
2268
|
Highlight.displayName = "Highlight";
|
|
2265
2269
|
|
package/index.esm.js
CHANGED
|
@@ -49,24 +49,24 @@ const cvaIcon = cvaMerge(["aspect-square", "inline-grid", "relative"], {
|
|
|
49
49
|
default: "text-current",
|
|
50
50
|
black: "text-black",
|
|
51
51
|
white: "text-white",
|
|
52
|
-
unused: "text-unused-
|
|
52
|
+
unused: "text-unused-400",
|
|
53
53
|
utilized: "text-utilized-600",
|
|
54
54
|
heavily_utilized: "text-heavily_utilized-500",
|
|
55
|
-
unknown_utilization: "text-
|
|
55
|
+
unknown_utilization: "text-unknown_utilization-600",
|
|
56
56
|
site_area: "text-site_area-600",
|
|
57
|
-
site_classic_poi: "text-site_classic_poi-
|
|
58
|
-
site_classic_zone: "text-site_classic_zone-
|
|
57
|
+
site_classic_poi: "text-site_classic_poi-600",
|
|
58
|
+
site_classic_zone: "text-site_classic_zone-600",
|
|
59
59
|
site_depot: "text-site_depot-500",
|
|
60
60
|
site_work_place: "text-site_work_place-600",
|
|
61
61
|
site_construction_site: "text-site_construction_site-500",
|
|
62
|
-
site_unknown: "text-site_unknown-
|
|
63
|
-
on_rent: "text-on_rent-
|
|
64
|
-
returned: "text-returned-
|
|
65
|
-
available: "text-available-
|
|
66
|
-
pickup_ready: "text-pickup_ready-
|
|
67
|
-
transfer: "text-transfer-
|
|
68
|
-
in_repair: "text-in_repair-
|
|
69
|
-
other_rental_status: "text-other_rental_status-
|
|
62
|
+
site_unknown: "text-site_unknown-600",
|
|
63
|
+
on_rent: "text-on_rent-400",
|
|
64
|
+
returned: "text-returned-500",
|
|
65
|
+
available: "text-available-500",
|
|
66
|
+
pickup_ready: "text-pickup_ready-500",
|
|
67
|
+
transfer: "text-transfer-300",
|
|
68
|
+
in_repair: "text-in_repair-400",
|
|
69
|
+
other_rental_status: "text-other_rental_status-500",
|
|
70
70
|
},
|
|
71
71
|
size: {
|
|
72
72
|
small: "w-4",
|
|
@@ -2228,9 +2228,12 @@ const cvaHighlight = cvaMerge([
|
|
|
2228
2228
|
"truncate",
|
|
2229
2229
|
"max-w-full",
|
|
2230
2230
|
"w-fit",
|
|
2231
|
-
"text-xs",
|
|
2232
2231
|
], {
|
|
2233
2232
|
variants: {
|
|
2233
|
+
size: {
|
|
2234
|
+
small: ["text-xs"],
|
|
2235
|
+
medium: ["text-sm"],
|
|
2236
|
+
},
|
|
2234
2237
|
color: {
|
|
2235
2238
|
info: ["bg-info-100", "text-info-700"],
|
|
2236
2239
|
success: ["bg-success-100", "text-success-700"],
|
|
@@ -2240,6 +2243,7 @@ const cvaHighlight = cvaMerge([
|
|
|
2240
2243
|
},
|
|
2241
2244
|
},
|
|
2242
2245
|
defaultVariants: {
|
|
2246
|
+
size: "small",
|
|
2243
2247
|
color: "warning",
|
|
2244
2248
|
},
|
|
2245
2249
|
});
|
|
@@ -2256,8 +2260,8 @@ const cvaHighlightText = cvaMerge(["truncate"]);
|
|
|
2256
2260
|
* @param {HighlightProps} props - The props for the highlight component
|
|
2257
2261
|
* @returns {ReactElement} highlight component
|
|
2258
2262
|
*/
|
|
2259
|
-
const Highlight = ({ className, dataTestId, children, color = "warning", ref }) => {
|
|
2260
|
-
return (jsx("div", { className: cvaHighlight({ className, color }), "data-testid": dataTestId, ref: ref, children: jsx("span", { className: cvaHighlightText(), children: children }) }));
|
|
2263
|
+
const Highlight = ({ className, dataTestId, children, size = "small", color = "warning", ref, }) => {
|
|
2264
|
+
return (jsx("div", { className: cvaHighlight({ className, size, color }), "data-testid": dataTestId, ref: ref, children: jsx("span", { className: cvaHighlightText(), children: children }) }));
|
|
2261
2265
|
};
|
|
2262
2266
|
Highlight.displayName = "Highlight";
|
|
2263
2267
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.8",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"@tanstack/react-router": "1.114.29",
|
|
19
19
|
"string-ts": "^2.0.0",
|
|
20
20
|
"tailwind-merge": "^2.0.0",
|
|
21
|
-
"@trackunit/ui-design-tokens": "1.6.
|
|
22
|
-
"@trackunit/css-class-variance-utilities": "1.6.
|
|
23
|
-
"@trackunit/shared-utils": "1.8.
|
|
24
|
-
"@trackunit/ui-icons": "1.6.
|
|
25
|
-
"@trackunit/react-table-pagination": "1.6.
|
|
26
|
-
"@trackunit/react-test-setup": "1.3.
|
|
21
|
+
"@trackunit/ui-design-tokens": "1.6.7",
|
|
22
|
+
"@trackunit/css-class-variance-utilities": "1.6.6",
|
|
23
|
+
"@trackunit/shared-utils": "1.8.6",
|
|
24
|
+
"@trackunit/ui-icons": "1.6.6",
|
|
25
|
+
"@trackunit/react-table-pagination": "1.6.6",
|
|
26
|
+
"@trackunit/react-test-setup": "1.3.6"
|
|
27
27
|
},
|
|
28
28
|
"module": "./index.esm.js",
|
|
29
29
|
"main": "./index.cjs.js",
|
|
@@ -2,6 +2,10 @@ import { ReactNode, Ref } from "react";
|
|
|
2
2
|
import { CommonProps, Size } from "../../common";
|
|
3
3
|
export type HighlightSize = Extract<Size, "small" | "medium">;
|
|
4
4
|
export interface HighlightProps extends CommonProps {
|
|
5
|
+
/**
|
|
6
|
+
* The size of the highlight. Allowed values: "small" (text-xs), "medium" (text-sm).
|
|
7
|
+
*/
|
|
8
|
+
size?: HighlightSize;
|
|
5
9
|
/**
|
|
6
10
|
* The color of the highlight. Allowed values: "primary", "success", "warning", "danger", "unknown".
|
|
7
11
|
*/
|
|
@@ -27,6 +31,6 @@ export interface HighlightProps extends CommonProps {
|
|
|
27
31
|
* @returns {ReactElement} highlight component
|
|
28
32
|
*/
|
|
29
33
|
export declare const Highlight: {
|
|
30
|
-
({ className, dataTestId, children, color, ref }: HighlightProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
({ className, dataTestId, children, size, color, ref, }: HighlightProps): import("react/jsx-runtime").JSX.Element;
|
|
31
35
|
displayName: string;
|
|
32
36
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const cvaHighlight: (props?: ({
|
|
2
|
+
size?: "small" | "medium" | null | undefined;
|
|
2
3
|
color?: "info" | "success" | "warning" | "danger" | "unknown" | null | undefined;
|
|
3
4
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
4
5
|
export declare const cvaHighlightText: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|