@trackunit/react-components 0.1.162 → 0.1.163
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 +2 -2
- package/index.esm.js +2 -2
- package/package.json +1 -1
- package/src/components/Card/Card.d.ts +1 -7
package/index.cjs.js
CHANGED
|
@@ -788,8 +788,8 @@ const ROLE_CARD = "region";
|
|
|
788
788
|
* @returns {JSX.Element} Card component
|
|
789
789
|
*/
|
|
790
790
|
const Card = (_a) => {
|
|
791
|
-
var { children, onClick, fullHeight = false, onMouseEnter, onMouseLeave, className, dataTestId
|
|
792
|
-
return (jsxRuntime.jsx("div", Object.assign({
|
|
791
|
+
var { children, onClick, fullHeight = false, onMouseEnter, onMouseLeave, className, dataTestId } = _a, rest = __rest$1(_a, ["children", "onClick", "fullHeight", "onMouseEnter", "onMouseLeave", "className", "dataTestId"]);
|
|
792
|
+
return (jsxRuntime.jsx("div", Object.assign({ onClick: onClick, className: cvaCard({ fullHeight, clickable: Boolean(onClick), className }), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, "data-testid": dataTestId, role: ROLE_CARD }, rest, { children: children })));
|
|
793
793
|
};
|
|
794
794
|
|
|
795
795
|
/**
|
package/index.esm.js
CHANGED
|
@@ -759,8 +759,8 @@ const ROLE_CARD = "region";
|
|
|
759
759
|
* @returns {JSX.Element} Card component
|
|
760
760
|
*/
|
|
761
761
|
const Card = (_a) => {
|
|
762
|
-
var { children, onClick, fullHeight = false, onMouseEnter, onMouseLeave, className, dataTestId
|
|
763
|
-
return (jsx("div", Object.assign({
|
|
762
|
+
var { children, onClick, fullHeight = false, onMouseEnter, onMouseLeave, className, dataTestId } = _a, rest = __rest$1(_a, ["children", "onClick", "fullHeight", "onMouseEnter", "onMouseLeave", "className", "dataTestId"]);
|
|
763
|
+
return (jsx("div", Object.assign({ onClick: onClick, className: cvaCard({ fullHeight, clickable: Boolean(onClick), className }), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, "data-testid": dataTestId, role: ROLE_CARD }, rest, { children: children })));
|
|
764
764
|
};
|
|
765
765
|
|
|
766
766
|
/**
|
package/package.json
CHANGED
|
@@ -6,12 +6,6 @@ export interface CardProps extends CommonProps, React.InputHTMLAttributes<HTMLDi
|
|
|
6
6
|
* Whether the card should have full height or not.
|
|
7
7
|
*/
|
|
8
8
|
fullHeight?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* The css grid area to place the card.
|
|
11
|
-
*
|
|
12
|
-
* @deprecated Use tailwind based grid layouts instead.
|
|
13
|
-
*/
|
|
14
|
-
gridArea?: string;
|
|
15
9
|
/**
|
|
16
10
|
* Children to show in the card
|
|
17
11
|
*/
|
|
@@ -36,4 +30,4 @@ export interface CardProps extends CommonProps, React.InputHTMLAttributes<HTMLDi
|
|
|
36
30
|
* @param {CardProps} props - The props for the Card component
|
|
37
31
|
* @returns {JSX.Element} Card component
|
|
38
32
|
*/
|
|
39
|
-
export declare const Card: ({ children, onClick, fullHeight, onMouseEnter, onMouseLeave, className, dataTestId,
|
|
33
|
+
export declare const Card: ({ children, onClick, fullHeight, onMouseEnter, onMouseLeave, className, dataTestId, ...rest }: CardProps) => JSX.Element;
|