@trackunit/react-components 0.4.2 → 0.4.4
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
|
@@ -254,16 +254,6 @@ const cvaTag = cssClassVarianceUtilities.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
|
-
customer_type_contractor: "bg-customer_type_contractor-100 text-customer_type_contractor-700",
|
|
258
|
-
customer_type_dealer: "bg-customer_type_dealer-100 text-customer_type_dealer-700",
|
|
259
|
-
customer_type_rental: "bg-customer_type_rental-100 text-customer_type_rental-700",
|
|
260
|
-
customer_type_oem: "bg-customer_type_oem-100 text-customer_type_oem-700",
|
|
261
|
-
customer_type_service: "bg-customer_type_service-100 text-customer_type_service-700",
|
|
262
|
-
customer_type_distributor: "bg-customer_type_distributor-100 text-customer_type_distributor-700",
|
|
263
|
-
customer_type_other_customer_type: "bg-customer_type_other_customer_type-100 text-customer_type_other_customer_type-700",
|
|
264
|
-
customer_source_user_defined: "bg-customer_source_user_defined-100 text-customer_source_user_defined-700",
|
|
265
|
-
customer_source_classic_migration: "bg-customer_source_classic_migration-100 text-customer_source_classic_migration-700",
|
|
266
|
-
customer_source_system_defined: "bg-customer_source_system_defined-100 text-customer_source_system_defined-700",
|
|
267
257
|
},
|
|
268
258
|
},
|
|
269
259
|
defaultVariants: {
|
|
@@ -4234,7 +4224,18 @@ const cvaPage = cssClassVarianceUtilities.cvaMerge(["grid", "h-full"], {
|
|
|
4234
4224
|
layout: "none",
|
|
4235
4225
|
},
|
|
4236
4226
|
});
|
|
4237
|
-
const cvaPageContent = cssClassVarianceUtilities.cvaMerge(["overflow-auto", "
|
|
4227
|
+
const cvaPageContent = cssClassVarianceUtilities.cvaMerge(["overflow-auto", "page-content", "grid", "gap-responsive-space"], {
|
|
4228
|
+
variants: {
|
|
4229
|
+
layout: {
|
|
4230
|
+
content: "",
|
|
4231
|
+
"v-min-fr": ["grid-rows-min-fr"],
|
|
4232
|
+
"h-min-fr": ["grid-cols-min-fr", "sm:grid-cols-1", "sm:grid-rows-min-fr"],
|
|
4233
|
+
},
|
|
4234
|
+
},
|
|
4235
|
+
defaultVariants: {
|
|
4236
|
+
layout: "content",
|
|
4237
|
+
},
|
|
4238
|
+
});
|
|
4238
4239
|
|
|
4239
4240
|
/**
|
|
4240
4241
|
* Renders the page component. Adds padding and layout to the page.
|
|
@@ -4250,8 +4251,8 @@ const Page = ({ layout, className, children, dataTestId }) => {
|
|
|
4250
4251
|
* @param {PageContentProps} props - The component props.
|
|
4251
4252
|
* @returns {React.ReactNode} - The rendered component.
|
|
4252
4253
|
*/
|
|
4253
|
-
const PageContent = ({ className, children, dataTestId }) => {
|
|
4254
|
-
return (jsxRuntime.jsx("div", { className: cvaPageContent({ className }), "data-testid": dataTestId
|
|
4254
|
+
const PageContent = ({ className, children, dataTestId, layout }) => {
|
|
4255
|
+
return (jsxRuntime.jsx("div", { className: cvaPageContent({ className, layout }), "data-testid": dataTestId ? dataTestId : "page-content", children: children }));
|
|
4255
4256
|
};
|
|
4256
4257
|
|
|
4257
4258
|
const cvaPageHeaderContainer = cssClassVarianceUtilities.cvaMerge(["bg-white", "tu-page-header"], {
|
package/index.esm.js
CHANGED
|
@@ -234,16 +234,6 @@ const cvaTag = cvaMerge([
|
|
|
234
234
|
unknown: "bg-unknown-100 text-unknown-700",
|
|
235
235
|
moving: "bg-neutral-100 text-neutral-700",
|
|
236
236
|
active: "bg-neutral-100 text-neutral-700",
|
|
237
|
-
customer_type_contractor: "bg-customer_type_contractor-100 text-customer_type_contractor-700",
|
|
238
|
-
customer_type_dealer: "bg-customer_type_dealer-100 text-customer_type_dealer-700",
|
|
239
|
-
customer_type_rental: "bg-customer_type_rental-100 text-customer_type_rental-700",
|
|
240
|
-
customer_type_oem: "bg-customer_type_oem-100 text-customer_type_oem-700",
|
|
241
|
-
customer_type_service: "bg-customer_type_service-100 text-customer_type_service-700",
|
|
242
|
-
customer_type_distributor: "bg-customer_type_distributor-100 text-customer_type_distributor-700",
|
|
243
|
-
customer_type_other_customer_type: "bg-customer_type_other_customer_type-100 text-customer_type_other_customer_type-700",
|
|
244
|
-
customer_source_user_defined: "bg-customer_source_user_defined-100 text-customer_source_user_defined-700",
|
|
245
|
-
customer_source_classic_migration: "bg-customer_source_classic_migration-100 text-customer_source_classic_migration-700",
|
|
246
|
-
customer_source_system_defined: "bg-customer_source_system_defined-100 text-customer_source_system_defined-700",
|
|
247
237
|
},
|
|
248
238
|
},
|
|
249
239
|
defaultVariants: {
|
|
@@ -4214,7 +4204,18 @@ const cvaPage = cvaMerge(["grid", "h-full"], {
|
|
|
4214
4204
|
layout: "none",
|
|
4215
4205
|
},
|
|
4216
4206
|
});
|
|
4217
|
-
const cvaPageContent = cvaMerge(["overflow-auto", "
|
|
4207
|
+
const cvaPageContent = cvaMerge(["overflow-auto", "page-content", "grid", "gap-responsive-space"], {
|
|
4208
|
+
variants: {
|
|
4209
|
+
layout: {
|
|
4210
|
+
content: "",
|
|
4211
|
+
"v-min-fr": ["grid-rows-min-fr"],
|
|
4212
|
+
"h-min-fr": ["grid-cols-min-fr", "sm:grid-cols-1", "sm:grid-rows-min-fr"],
|
|
4213
|
+
},
|
|
4214
|
+
},
|
|
4215
|
+
defaultVariants: {
|
|
4216
|
+
layout: "content",
|
|
4217
|
+
},
|
|
4218
|
+
});
|
|
4218
4219
|
|
|
4219
4220
|
/**
|
|
4220
4221
|
* Renders the page component. Adds padding and layout to the page.
|
|
@@ -4230,8 +4231,8 @@ const Page = ({ layout, className, children, dataTestId }) => {
|
|
|
4230
4231
|
* @param {PageContentProps} props - The component props.
|
|
4231
4232
|
* @returns {React.ReactNode} - The rendered component.
|
|
4232
4233
|
*/
|
|
4233
|
-
const PageContent = ({ className, children, dataTestId }) => {
|
|
4234
|
-
return (jsx("div", { className: cvaPageContent({ className }), "data-testid": dataTestId
|
|
4234
|
+
const PageContent = ({ className, children, dataTestId, layout }) => {
|
|
4235
|
+
return (jsx("div", { className: cvaPageContent({ className, layout }), "data-testid": dataTestId ? dataTestId : "page-content", children: children }));
|
|
4235
4236
|
};
|
|
4236
4237
|
|
|
4237
4238
|
const cvaPageHeaderContainer = cvaMerge(["bg-white", "tu-page-header"], {
|
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const cvaPage: (props?: ({
|
|
2
2
|
layout?: "content" | "header-content" | "sidebar-content" | "none" | null | undefined;
|
|
3
3
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
4
|
-
export declare const cvaPageContent: (props?:
|
|
4
|
+
export declare const cvaPageContent: (props?: ({
|
|
5
|
+
layout?: "content" | "v-min-fr" | "h-min-fr" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -4,6 +4,7 @@ import { CommonProps } from "../../common";
|
|
|
4
4
|
* The props for the page content component.
|
|
5
5
|
*/
|
|
6
6
|
interface PageContentProps extends CommonProps {
|
|
7
|
+
layout: "content" | "h-min-fr" | "v-min-fr";
|
|
7
8
|
children?: React.ReactNode;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
@@ -13,5 +14,5 @@ interface PageContentProps extends CommonProps {
|
|
|
13
14
|
* @param {PageContentProps} props - The component props.
|
|
14
15
|
* @returns {React.ReactNode} - The rendered component.
|
|
15
16
|
*/
|
|
16
|
-
export declare const PageContent: ({ className, children, dataTestId }: PageContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const PageContent: ({ className, children, dataTestId, layout }: PageContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ActivityColors, CriticalityColors,
|
|
1
|
+
import { ActivityColors, CriticalityColors, GeneralColors, IntentColors } from "@trackunit/ui-design-tokens";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { CommonProps, Size } from "../../common";
|
|
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;
|
|
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" |
|
|
4
|
+
color?: "primary" | "secondary" | "accent" | "neutral" | "black" | "white" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "stopped" | "idle" | "unknown" | "moving" | "active" | 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;
|