@trackunit/react-components 0.4.3 → 0.4.5
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
|
@@ -4224,7 +4224,18 @@ const cvaPage = cssClassVarianceUtilities.cvaMerge(["grid", "h-full"], {
|
|
|
4224
4224
|
layout: "none",
|
|
4225
4225
|
},
|
|
4226
4226
|
});
|
|
4227
|
-
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
|
+
});
|
|
4228
4239
|
|
|
4229
4240
|
/**
|
|
4230
4241
|
* Renders the page component. Adds padding and layout to the page.
|
|
@@ -4240,8 +4251,8 @@ const Page = ({ layout, className, children, dataTestId }) => {
|
|
|
4240
4251
|
* @param {PageContentProps} props - The component props.
|
|
4241
4252
|
* @returns {React.ReactNode} - The rendered component.
|
|
4242
4253
|
*/
|
|
4243
|
-
const PageContent = ({ className, children, dataTestId }) => {
|
|
4244
|
-
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 }));
|
|
4245
4256
|
};
|
|
4246
4257
|
|
|
4247
4258
|
const cvaPageHeaderContainer = cssClassVarianceUtilities.cvaMerge(["bg-white", "tu-page-header"], {
|
package/index.esm.js
CHANGED
|
@@ -4204,7 +4204,18 @@ const cvaPage = cvaMerge(["grid", "h-full"], {
|
|
|
4204
4204
|
layout: "none",
|
|
4205
4205
|
},
|
|
4206
4206
|
});
|
|
4207
|
-
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
|
+
});
|
|
4208
4219
|
|
|
4209
4220
|
/**
|
|
4210
4221
|
* Renders the page component. Adds padding and layout to the page.
|
|
@@ -4220,8 +4231,8 @@ const Page = ({ layout, className, children, dataTestId }) => {
|
|
|
4220
4231
|
* @param {PageContentProps} props - The component props.
|
|
4221
4232
|
* @returns {React.ReactNode} - The rendered component.
|
|
4222
4233
|
*/
|
|
4223
|
-
const PageContent = ({ className, children, dataTestId }) => {
|
|
4224
|
-
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 }));
|
|
4225
4236
|
};
|
|
4226
4237
|
|
|
4227
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 {};
|