@trackunit/react-components 1.8.32 → 1.8.35
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
|
@@ -1896,9 +1896,9 @@ const ROLE_CARD = "region";
|
|
|
1896
1896
|
* @param {CardProps} props - The props for the Card component
|
|
1897
1897
|
* @returns {ReactElement} Card component
|
|
1898
1898
|
*/
|
|
1899
|
-
const Card = ({ children, onClick, fullHeight = false, onMouseEnter, onMouseLeave, className, dataTestId, ...rest })
|
|
1900
|
-
return (jsxRuntime.jsx("div", { className: cvaCard({ fullHeight, clickable: Boolean(onClick), className }), "data-testid": dataTestId, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, role: ROLE_CARD, ...rest, children: children }));
|
|
1901
|
-
};
|
|
1899
|
+
const Card = react.forwardRef(function Card({ children, onClick, fullHeight = false, onMouseEnter, onMouseLeave, className, dataTestId, ...rest }, ref) {
|
|
1900
|
+
return (jsxRuntime.jsx("div", { className: cvaCard({ fullHeight, clickable: Boolean(onClick), className }), "data-testid": dataTestId, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, ref: ref, role: ROLE_CARD, ...rest, children: children }));
|
|
1901
|
+
});
|
|
1902
1902
|
|
|
1903
1903
|
/**
|
|
1904
1904
|
* The CardBody component should be used to inform the user of important information.
|
|
@@ -1980,7 +1980,7 @@ const Heading = ({ variant = "primary", inverted = false, subtle = false, classN
|
|
|
1980
1980
|
};
|
|
1981
1981
|
|
|
1982
1982
|
/**
|
|
1983
|
-
* Header for Cards
|
|
1983
|
+
* Header for Cards.
|
|
1984
1984
|
*
|
|
1985
1985
|
* @param {CardHeaderProps} props - The props for the CardHeader component
|
|
1986
1986
|
* @returns {ReactElement} CardHeader component
|
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { useRef, useMemo, useEffect, useState, useCallback, createElement, useReducer, Fragment as Fragment$1, memo,
|
|
2
|
+
import { useRef, useMemo, useEffect, useState, useCallback, createElement, useReducer, forwardRef, Fragment as Fragment$1, memo, createContext, useContext, isValidElement, cloneElement, Children } from 'react';
|
|
3
3
|
import { objectKeys, uuidv4, objectEntries, objectValues, nonNullable } from '@trackunit/shared-utils';
|
|
4
4
|
import { intentPalette, generalPalette, criticalityPalette, activityPalette, utilizationPalette, sitesPalette, rentalStatusPalette, themeScreenSizeAsNumber, color } from '@trackunit/ui-design-tokens';
|
|
5
5
|
import { iconNames } from '@trackunit/ui-icons';
|
|
@@ -1894,9 +1894,9 @@ const ROLE_CARD = "region";
|
|
|
1894
1894
|
* @param {CardProps} props - The props for the Card component
|
|
1895
1895
|
* @returns {ReactElement} Card component
|
|
1896
1896
|
*/
|
|
1897
|
-
const Card = ({ children, onClick, fullHeight = false, onMouseEnter, onMouseLeave, className, dataTestId, ...rest })
|
|
1898
|
-
return (jsx("div", { className: cvaCard({ fullHeight, clickable: Boolean(onClick), className }), "data-testid": dataTestId, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, role: ROLE_CARD, ...rest, children: children }));
|
|
1899
|
-
};
|
|
1897
|
+
const Card = forwardRef(function Card({ children, onClick, fullHeight = false, onMouseEnter, onMouseLeave, className, dataTestId, ...rest }, ref) {
|
|
1898
|
+
return (jsx("div", { className: cvaCard({ fullHeight, clickable: Boolean(onClick), className }), "data-testid": dataTestId, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, ref: ref, role: ROLE_CARD, ...rest, children: children }));
|
|
1899
|
+
});
|
|
1900
1900
|
|
|
1901
1901
|
/**
|
|
1902
1902
|
* The CardBody component should be used to inform the user of important information.
|
|
@@ -1978,7 +1978,7 @@ const Heading = ({ variant = "primary", inverted = false, subtle = false, classN
|
|
|
1978
1978
|
};
|
|
1979
1979
|
|
|
1980
1980
|
/**
|
|
1981
|
-
* Header for Cards
|
|
1981
|
+
* Header for Cards.
|
|
1982
1982
|
*
|
|
1983
1983
|
* @param {CardHeaderProps} props - The props for the CardHeader component
|
|
1984
1984
|
* @returns {ReactElement} CardHeader component
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.35",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"@floating-ui/react": "^0.26.25",
|
|
18
18
|
"string-ts": "^2.0.0",
|
|
19
19
|
"tailwind-merge": "^2.0.0",
|
|
20
|
-
"@trackunit/ui-design-tokens": "1.6.
|
|
21
|
-
"@trackunit/css-class-variance-utilities": "1.6.
|
|
22
|
-
"@trackunit/shared-utils": "1.8.
|
|
23
|
-
"@trackunit/ui-icons": "1.6.
|
|
24
|
-
"@trackunit/react-table-pagination": "1.6.
|
|
25
|
-
"@trackunit/react-test-setup": "1.3.
|
|
20
|
+
"@trackunit/ui-design-tokens": "1.6.60",
|
|
21
|
+
"@trackunit/css-class-variance-utilities": "1.6.58",
|
|
22
|
+
"@trackunit/shared-utils": "1.8.59",
|
|
23
|
+
"@trackunit/ui-icons": "1.6.57",
|
|
24
|
+
"@trackunit/react-table-pagination": "1.6.57",
|
|
25
|
+
"@trackunit/react-test-setup": "1.3.58",
|
|
26
26
|
"@tanstack/react-router": "1.114.29"
|
|
27
27
|
},
|
|
28
28
|
"module": "./index.esm.js",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputHTMLAttributes, MouseEventHandler,
|
|
1
|
+
import { InputHTMLAttributes, MouseEventHandler, ReactNode } from "react";
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
3
|
export declare const ROLE_CARD = "region";
|
|
4
4
|
export interface CardProps extends CommonProps, InputHTMLAttributes<HTMLDivElement> {
|
|
@@ -30,4 +30,4 @@ export interface CardProps extends CommonProps, InputHTMLAttributes<HTMLDivEleme
|
|
|
30
30
|
* @param {CardProps} props - The props for the Card component
|
|
31
31
|
* @returns {ReactElement} Card component
|
|
32
32
|
*/
|
|
33
|
-
export declare const Card: (
|
|
33
|
+
export declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -39,7 +39,7 @@ export interface CardHeaderProps extends CommonProps {
|
|
|
39
39
|
actions?: ReactNode | null;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
* Header for Cards
|
|
42
|
+
* Header for Cards.
|
|
43
43
|
*
|
|
44
44
|
* @param {CardHeaderProps} props - The props for the CardHeader component
|
|
45
45
|
* @returns {ReactElement} CardHeader component
|