@codezee/sixtify-brahma 0.2.160 → 0.2.161
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/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MouseEvent } from "react";
|
|
1
|
+
import type { MouseEvent, ReactNode } from "react";
|
|
2
2
|
type RedirectionCellProps = {
|
|
3
3
|
mainLabel: string;
|
|
4
4
|
onClick: (event: MouseEvent<HTMLElement>) => void;
|
|
@@ -7,7 +7,9 @@ type RedirectionCellProps = {
|
|
|
7
7
|
avatar?: string;
|
|
8
8
|
includeAvatar?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
includeIcon?: boolean;
|
|
11
|
+
icon?: ReactNode;
|
|
10
12
|
};
|
|
11
|
-
export declare const RedirectionCell: ({ mainLabel, onClick, includeSubLabel, subLabel, avatar, includeAvatar, disabled, }: RedirectionCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const RedirectionCell: ({ mainLabel, onClick, includeSubLabel, subLabel, avatar, includeAvatar, disabled, includeIcon, icon, }: RedirectionCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
13
15
|
//# sourceMappingURL=RedirectionCell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectionCell.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/RedirectionCell/RedirectionCell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RedirectionCell.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/RedirectionCell/RedirectionCell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKnD,KAAK,oBAAoB,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAClD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,wGAU7B,oBAAoB,4CAsEtB,CAAC"}
|
|
@@ -6,7 +6,7 @@ const material_1 = require("@mui/material");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const useCellEnterClick_1 = require("../hooks/useCellEnterClick");
|
|
8
8
|
const ClickableCell_1 = require("./ClickableCell");
|
|
9
|
-
const RedirectionCell = ({ mainLabel, onClick, includeSubLabel = false, subLabel, avatar, includeAvatar = false, disabled = false, }) => {
|
|
9
|
+
const RedirectionCell = ({ mainLabel, onClick, includeSubLabel = false, subLabel, avatar, includeAvatar = false, disabled = false, includeIcon = false, icon, }) => {
|
|
10
10
|
const theme = (0, material_1.useTheme)();
|
|
11
11
|
const { butterflyBlue, black } = theme.palette.app.color;
|
|
12
12
|
const cellRef = (0, react_1.useRef)(null);
|
|
@@ -19,13 +19,13 @@ const RedirectionCell = ({ mainLabel, onClick, includeSubLabel = false, subLabel
|
|
|
19
19
|
onClick(event);
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)(ClickableCell_1.ClickableCell, { onClick: onClick, disabled: disabled, children: (0, jsx_runtime_1.jsx)(material_1.Box, { ref: cellRef, component: "div", onClick: handleClick, sx: { width: "100%" }, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(ClickableCell_1.ClickableCell, { onClick: onClick, disabled: disabled, children: (0, jsx_runtime_1.jsx)(material_1.Box, { ref: cellRef, component: "div", onClick: handleClick, sx: { width: "100%" }, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { width: "100%" }, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", gap: "5px", alignItems: "center", children: [includeAvatar && ((0, jsx_runtime_1.jsx)(material_1.Avatar, { src: avatar ?? "", alt: "Photo", sx: { width: 28, height: 28 } })), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: {
|
|
23
|
+
width: "100%",
|
|
24
|
+
color: disabled ? black[900] : butterflyBlue[900],
|
|
25
|
+
}, onMouseDown: (e) => {
|
|
26
|
+
if (!disabled) {
|
|
27
|
+
onClick(e);
|
|
28
|
+
}
|
|
29
|
+
}, children: mainLabel }), includeSubLabel && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: butterflyBlue[400], children: subLabel ?? "-" }))] })] }), includeIcon && icon && (0, jsx_runtime_1.jsx)(material_1.Box, { children: icon })] }) }) }));
|
|
30
30
|
};
|
|
31
31
|
exports.RedirectionCell = RedirectionCell;
|