104 lines
3.1 KiB
JavaScript
104 lines
3.1 KiB
JavaScript
"use strict";
|
|
|
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.ChartsTooltipTable = exports.ChartsTooltipRow = exports.ChartsTooltipPaper = exports.ChartsTooltipCell = void 0;
|
|
var _styles = require("@mui/material/styles");
|
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
var _chartsTooltipClasses = require("./chartsTooltipClasses");
|
|
/**
|
|
* @ignore - internal component.
|
|
*/
|
|
const ChartsTooltipPaper = exports.ChartsTooltipPaper = (0, _styles.styled)('div', {
|
|
name: 'MuiChartsTooltip',
|
|
slot: 'Container',
|
|
overridesResolver: (props, styles) => styles.paper // FIXME: Inconsistent naming with slot
|
|
})(({
|
|
theme
|
|
}) => ({
|
|
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
color: (theme.vars || theme).palette.text.primary,
|
|
borderRadius: (theme.vars || theme).shape?.borderRadius,
|
|
border: `solid ${(theme.vars || theme).palette.divider} 1px`
|
|
}));
|
|
|
|
/**
|
|
* @ignore - internal component.
|
|
*/
|
|
const ChartsTooltipTable = exports.ChartsTooltipTable = (0, _styles.styled)('table', {
|
|
name: 'MuiChartsTooltip',
|
|
slot: 'Table'
|
|
})(({
|
|
theme
|
|
}) => ({
|
|
borderSpacing: 0,
|
|
[`& .${_chartsTooltipClasses.chartsTooltipClasses.markContainer}`]: {
|
|
display: 'inline-block',
|
|
width: `calc(20px + ${theme.spacing(1.5)})`,
|
|
verticalAlign: 'middle'
|
|
},
|
|
'& caption': {
|
|
borderBottom: `solid ${(theme.vars || theme).palette.divider} 1px`,
|
|
padding: theme.spacing(0.5, 1.5),
|
|
textAlign: 'start',
|
|
whiteSpace: 'nowrap',
|
|
'& span': {
|
|
marginRight: theme.spacing(1.5)
|
|
}
|
|
}
|
|
}));
|
|
|
|
/**
|
|
* @ignore - internal component.
|
|
*/
|
|
const ChartsTooltipRow = exports.ChartsTooltipRow = (0, _styles.styled)('tr', {
|
|
name: 'MuiChartsTooltip',
|
|
slot: 'Row'
|
|
})(({
|
|
theme
|
|
}) => ({
|
|
'tr:first-of-type& td': {
|
|
paddingTop: theme.spacing(0.5)
|
|
},
|
|
'tr:last-of-type& td': {
|
|
paddingBottom: theme.spacing(0.5)
|
|
}
|
|
}));
|
|
|
|
/**
|
|
* @ignore - internal component.
|
|
*/
|
|
const ChartsTooltipCell = exports.ChartsTooltipCell = (0, _styles.styled)(_Typography.default, {
|
|
name: 'MuiChartsTooltip',
|
|
slot: 'Cell'
|
|
})(({
|
|
theme
|
|
}) => ({
|
|
verticalAlign: 'middle',
|
|
color: (theme.vars || theme).palette.text.secondary,
|
|
textAlign: 'start',
|
|
[`&.${_chartsTooltipClasses.chartsTooltipClasses.cell}`]: {
|
|
paddingLeft: theme.spacing(1),
|
|
paddingRight: theme.spacing(1)
|
|
},
|
|
[`&.${_chartsTooltipClasses.chartsTooltipClasses.labelCell}`]: {
|
|
whiteSpace: 'nowrap',
|
|
fontWeight: theme.typography.fontWeightRegular
|
|
},
|
|
[`&.${_chartsTooltipClasses.chartsTooltipClasses.valueCell}, &.${_chartsTooltipClasses.chartsTooltipClasses.axisValueCell}`]: {
|
|
color: (theme.vars || theme).palette.text.primary,
|
|
fontWeight: theme.typography.fontWeightMedium
|
|
},
|
|
[`&.${_chartsTooltipClasses.chartsTooltipClasses.valueCell}`]: {
|
|
paddingLeft: theme.spacing(1.5),
|
|
paddingRight: theme.spacing(1.5)
|
|
},
|
|
'td:first-of-type&, th:first-of-type&': {
|
|
paddingLeft: theme.spacing(1.5)
|
|
},
|
|
'td:last-of-type&, th:last-of-type&': {
|
|
paddingRight: theme.spacing(1.5)
|
|
}
|
|
})); |