@trackunit/react-components 0.1.222 → 0.1.224
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
|
@@ -284,6 +284,13 @@ const cvaTag = cssClassVarianceUtilities.cvaMerge([
|
|
|
284
284
|
unknown: "bg-unknown-100 text-unknown-700",
|
|
285
285
|
moving: "bg-neutral-100 text-neutral-700",
|
|
286
286
|
active: "bg-neutral-100 text-neutral-700",
|
|
287
|
+
contractor: "bg-contractor-100 text-contractor-700",
|
|
288
|
+
dealer: "bg-dealer-100 text-dealer-700",
|
|
289
|
+
rental: "bg-rental-100 text-rental-700",
|
|
290
|
+
oem: "bg-oem-100 text-oem-700",
|
|
291
|
+
service: "bg-service-100 text-service-700",
|
|
292
|
+
distributor: "bg-distributor-100 text-distributor-700",
|
|
293
|
+
other_customer_type: "bg-other_customer_type-100 text-other_customer_type-700",
|
|
287
294
|
},
|
|
288
295
|
},
|
|
289
296
|
defaultVariants: {
|
|
@@ -1432,7 +1439,7 @@ const EmptyState = ({ title, description, altText, image, customImageSrc, action
|
|
|
1432
1439
|
lazyLoadImage();
|
|
1433
1440
|
}
|
|
1434
1441
|
}, [customImageSrc, image]);
|
|
1435
|
-
return (jsxRuntime.jsx("div", { className:
|
|
1442
|
+
return (jsxRuntime.jsx("div", { className: cvaContainerStyles({ className }), "data-testid": dataTestId !== null && dataTestId !== void 0 ? dataTestId : "empty-state", children: loading ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Spinner, { dataTestId: "spinner", size: "large", centering: "centered" }), jsxRuntime.jsx(SkeletonLines, { dataTestId: "skeleton-lines", width: 50 })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("img", { className: cvaImgStyles(), width: 200, height: 200, src: customImageSrc ? customImageSrc : imageSource, alt: altText }), jsxRuntime.jsxs("div", { className: cvaTextStyles(), children: [jsxRuntime.jsx(Heading, { variant: "secondary", children: title }), jsxRuntime.jsx(Text, { align: "center", children: description })] }), action] })) }));
|
|
1436
1443
|
};
|
|
1437
1444
|
|
|
1438
1445
|
const cvaExternalLink = cssClassVarianceUtilities.cvaMerge(["underline", "text-primary-600", "hover:text-primary-500"]);
|
package/index.esm.js
CHANGED
|
@@ -254,6 +254,13 @@ const cvaTag = cvaMerge([
|
|
|
254
254
|
unknown: "bg-unknown-100 text-unknown-700",
|
|
255
255
|
moving: "bg-neutral-100 text-neutral-700",
|
|
256
256
|
active: "bg-neutral-100 text-neutral-700",
|
|
257
|
+
contractor: "bg-contractor-100 text-contractor-700",
|
|
258
|
+
dealer: "bg-dealer-100 text-dealer-700",
|
|
259
|
+
rental: "bg-rental-100 text-rental-700",
|
|
260
|
+
oem: "bg-oem-100 text-oem-700",
|
|
261
|
+
service: "bg-service-100 text-service-700",
|
|
262
|
+
distributor: "bg-distributor-100 text-distributor-700",
|
|
263
|
+
other_customer_type: "bg-other_customer_type-100 text-other_customer_type-700",
|
|
257
264
|
},
|
|
258
265
|
},
|
|
259
266
|
defaultVariants: {
|
|
@@ -1402,7 +1409,7 @@ const EmptyState = ({ title, description, altText, image, customImageSrc, action
|
|
|
1402
1409
|
lazyLoadImage();
|
|
1403
1410
|
}
|
|
1404
1411
|
}, [customImageSrc, image]);
|
|
1405
|
-
return (jsx("div", { className:
|
|
1412
|
+
return (jsx("div", { className: cvaContainerStyles({ className }), "data-testid": dataTestId !== null && dataTestId !== void 0 ? dataTestId : "empty-state", children: loading ? (jsxs(Fragment, { children: [jsx(Spinner, { dataTestId: "spinner", size: "large", centering: "centered" }), jsx(SkeletonLines, { dataTestId: "skeleton-lines", width: 50 })] })) : (jsxs(Fragment, { children: [jsx("img", { className: cvaImgStyles(), width: 200, height: 200, src: customImageSrc ? customImageSrc : imageSource, alt: altText }), jsxs("div", { className: cvaTextStyles(), children: [jsx(Heading, { variant: "secondary", children: title }), jsx(Text, { align: "center", children: description })] }), action] })) }));
|
|
1406
1413
|
};
|
|
1407
1414
|
|
|
1408
1415
|
const cvaExternalLink = cvaMerge(["underline", "text-primary-600", "hover:text-primary-500"]);
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ActivityColors, CriticalityColors, GeneralColors, IntentColors, RentalStatusColors, SitesColors, UtilizationColors } from "@trackunit/ui-design-tokens";
|
|
3
3
|
import { CommonProps } from "../../common/CommonProps";
|
|
4
4
|
export interface IndicatorProps extends CommonProps {
|
|
5
5
|
/**
|
|
@@ -9,7 +9,7 @@ export interface IndicatorProps extends CommonProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* A color token used to style the icon and the icon background
|
|
11
11
|
*/
|
|
12
|
-
color?:
|
|
12
|
+
color?: GeneralColors | IntentColors | CriticalityColors | ActivityColors | UtilizationColors | RentalStatusColors | SitesColors;
|
|
13
13
|
/**
|
|
14
14
|
* A text label to be displayed next to the indicator
|
|
15
15
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ActivityColors, CriticalityColors, GeneralColors, IntentColors } from "@trackunit/ui-design-tokens";
|
|
1
|
+
import { ActivityColors, CriticalityColors, GeneralColors, IntentColors, CustomerTypeColors } from "@trackunit/ui-design-tokens";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { CommonProps, Size } from "../../common/CommonProps";
|
|
4
4
|
export type TagSize = Extract<Size, "small" | "medium">;
|
|
5
|
-
export type TagColors = IntentColors | GeneralColors | CriticalityColors | ActivityColors;
|
|
5
|
+
export type TagColors = IntentColors | GeneralColors | CriticalityColors | ActivityColors | CustomerTypeColors;
|
|
6
6
|
export interface TagProps extends CommonProps {
|
|
7
7
|
/**
|
|
8
8
|
* The color of the tag.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const cvaTag: (props?: ({
|
|
2
2
|
size?: "small" | "medium" | null | undefined;
|
|
3
3
|
layout?: "default" | "withIcon" | null | undefined;
|
|
4
|
-
color?: "primary" | "secondary" | "accent" | "neutral" | "black" | "white" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "stopped" | "idle" | "unknown" | "moving" | "active" | null | undefined;
|
|
4
|
+
color?: "primary" | "secondary" | "accent" | "neutral" | "black" | "white" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "stopped" | "idle" | "unknown" | "moving" | "active" | "contractor" | "dealer" | "rental" | "oem" | "service" | "distributor" | "other_customer_type" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
export declare const cvaTagIconContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
7
7
|
export declare const cvaTagIcon: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|