|
import { alpha } from "@mui/material"; |
|
|
|
export const commonStyles = { |
|
|
|
tooltip: { |
|
sx: { |
|
bgcolor: "background.tooltip", |
|
"& .MuiTooltip-arrow": { |
|
color: "background.tooltip", |
|
}, |
|
padding: "12px 16px", |
|
maxWidth: 300, |
|
fontSize: "0.875rem", |
|
lineHeight: 1.4, |
|
}, |
|
}, |
|
|
|
|
|
progressBar: { |
|
position: "absolute", |
|
left: -16, |
|
top: -8, |
|
height: "calc(100% + 16px)", |
|
opacity: (theme) => (theme.palette.mode === "light" ? 0.1 : 0.2), |
|
transition: "width 0.3s ease", |
|
zIndex: 0, |
|
}, |
|
|
|
|
|
cellContainer: { |
|
display: "flex", |
|
alignItems: "center", |
|
height: "100%", |
|
width: "100%", |
|
position: "relative", |
|
}, |
|
|
|
|
|
hoverEffect: (theme, isActive = false) => ({ |
|
backgroundColor: isActive |
|
? alpha( |
|
theme.palette.primary.main, |
|
theme.palette.mode === "light" ? 0.08 : 0.16 |
|
) |
|
: theme.palette.action.hover, |
|
"& .MuiTypography-root": { |
|
color: isActive ? "primary.main" : "text.primary", |
|
}, |
|
"& .MuiSvgIcon-root": { |
|
color: isActive ? "primary.main" : "text.primary", |
|
}, |
|
}), |
|
|
|
|
|
filterGroup: { |
|
title: { |
|
mb: 1, |
|
fontSize: "0.8rem", |
|
fontWeight: 700, |
|
color: "text.primary", |
|
display: "flex", |
|
alignItems: "center", |
|
gap: 0.5, |
|
}, |
|
container: { |
|
display: "flex", |
|
flexWrap: "wrap", |
|
gap: 0.5, |
|
alignItems: "center", |
|
}, |
|
}, |
|
|
|
|
|
optionButton: { |
|
display: "flex", |
|
alignItems: "center", |
|
gap: 0.8, |
|
cursor: "pointer", |
|
padding: "4px 10px", |
|
borderRadius: 1, |
|
height: "32px", |
|
"& .MuiSvgIcon-root": { |
|
fontSize: "0.9rem", |
|
}, |
|
"& .MuiTypography-root": { |
|
fontSize: "0.85rem", |
|
}, |
|
}, |
|
|
|
|
|
scoreIndicator: { |
|
dot: { |
|
width: 10, |
|
height: 10, |
|
borderRadius: "50%", |
|
marginLeft: -1, |
|
}, |
|
bar: { |
|
position: "absolute", |
|
left: -16, |
|
top: -8, |
|
height: "calc(100% + 16px)", |
|
opacity: (theme) => (theme.palette.mode === "light" ? 0.1 : 0.2), |
|
transition: "width 0.3s ease", |
|
}, |
|
}, |
|
|
|
|
|
popoverContent: { |
|
p: 3, |
|
width: 280, |
|
maxHeight: 400, |
|
overflowY: "auto", |
|
}, |
|
}; |
|
|
|
|
|
export const componentStyles = { |
|
|
|
headerCell: { |
|
borderRight: (theme) => |
|
`1px solid ${alpha( |
|
theme.palette.divider, |
|
theme.palette.mode === "dark" ? 0.05 : 0.1 |
|
)}`, |
|
"&:last-child": { |
|
borderRight: "none", |
|
}, |
|
whiteSpace: "nowrap", |
|
overflow: "hidden", |
|
textOverflow: "ellipsis", |
|
padding: "8px 16px", |
|
backgroundColor: (theme) => theme.palette.background.paper, |
|
position: "sticky !important", |
|
top: 0, |
|
zIndex: 10, |
|
}, |
|
|
|
|
|
tableCell: { |
|
borderRight: (theme) => |
|
`1px solid ${alpha( |
|
theme.palette.divider, |
|
theme.palette.mode === "dark" ? 0.05 : 0.1 |
|
)}`, |
|
"&:last-child": { |
|
borderRight: "none", |
|
}, |
|
whiteSpace: "nowrap", |
|
overflow: "hidden", |
|
textOverflow: "ellipsis", |
|
}, |
|
}; |
|
|