@mui/x-charts-pro 8.27.4 → 8.28.0

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.
Files changed (88) hide show
  1. package/BarChartPro/BarChartPro.js +2 -2
  2. package/CHANGELOG.md +143 -0
  3. package/ChartsDataProviderPro/ChartsDataProviderPro.js +1 -1
  4. package/FunnelChart/FunnelPlot.js +8 -3
  5. package/FunnelChart/FunnelSection.js +7 -3
  6. package/FunnelChart/FunnelSectionLabel.d.ts +6 -0
  7. package/FunnelChart/FunnelSectionLabel.js +18 -5
  8. package/FunnelChart/funnelClasses.d.ts +29 -0
  9. package/FunnelChart/funnelClasses.js +29 -0
  10. package/FunnelChart/funnelSectionClasses.d.ts +13 -0
  11. package/FunnelChart/funnelSectionClasses.js +19 -0
  12. package/FunnelChart/index.d.ts +2 -0
  13. package/FunnelChart/index.js +8 -0
  14. package/Heatmap/Heatmap.js +2 -2
  15. package/Heatmap/HeatmapCell.d.ts +34 -0
  16. package/Heatmap/HeatmapCell.js +64 -0
  17. package/Heatmap/HeatmapItem.d.ts +1 -8
  18. package/Heatmap/HeatmapItem.js +4 -19
  19. package/Heatmap/heatmapClasses.d.ts +6 -1
  20. package/Heatmap/heatmapClasses.js +18 -3
  21. package/Heatmap/index.d.ts +4 -2
  22. package/Heatmap/index.js +17 -13
  23. package/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
  24. package/LineChartPro/LineChartPro.js +2 -2
  25. package/SankeyChart/SankeyLinkElement.js +4 -2
  26. package/SankeyChart/SankeyLinkLabel.js +3 -0
  27. package/SankeyChart/SankeyNodeElement.d.ts +1 -1
  28. package/SankeyChart/SankeyNodeElement.js +5 -3
  29. package/SankeyChart/SankeyNodeLabel.js +3 -0
  30. package/SankeyChart/SankeyPlot.js +2 -2
  31. package/SankeyChart/index.d.ts +2 -1
  32. package/SankeyChart/index.js +7 -0
  33. package/SankeyChart/sankeyClasses.d.ts +27 -6
  34. package/SankeyChart/sankeyClasses.js +27 -8
  35. package/ScatterChartPro/ScatterChartPro.js +2 -2
  36. package/esm/BarChartPro/BarChartPro.js +2 -2
  37. package/esm/ChartsDataProviderPro/ChartsDataProviderPro.js +1 -1
  38. package/esm/FunnelChart/FunnelPlot.js +8 -3
  39. package/esm/FunnelChart/FunnelSection.js +9 -5
  40. package/esm/FunnelChart/FunnelSectionLabel.d.ts +6 -0
  41. package/esm/FunnelChart/FunnelSectionLabel.js +20 -7
  42. package/esm/FunnelChart/funnelClasses.d.ts +29 -0
  43. package/esm/FunnelChart/funnelClasses.js +19 -0
  44. package/esm/FunnelChart/funnelSectionClasses.d.ts +13 -0
  45. package/esm/FunnelChart/funnelSectionClasses.js +20 -0
  46. package/esm/FunnelChart/index.d.ts +2 -0
  47. package/esm/FunnelChart/index.js +1 -0
  48. package/esm/Heatmap/Heatmap.js +2 -2
  49. package/esm/Heatmap/HeatmapCell.d.ts +34 -0
  50. package/esm/Heatmap/HeatmapCell.js +58 -0
  51. package/esm/Heatmap/HeatmapItem.d.ts +1 -8
  52. package/esm/Heatmap/HeatmapItem.js +4 -19
  53. package/esm/Heatmap/heatmapClasses.d.ts +6 -1
  54. package/esm/Heatmap/heatmapClasses.js +16 -2
  55. package/esm/Heatmap/index.d.ts +4 -2
  56. package/esm/Heatmap/index.js +2 -1
  57. package/esm/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
  58. package/esm/LineChartPro/LineChartPro.js +2 -2
  59. package/esm/SankeyChart/SankeyLinkElement.js +4 -2
  60. package/esm/SankeyChart/SankeyLinkLabel.js +3 -0
  61. package/esm/SankeyChart/SankeyNodeElement.d.ts +1 -1
  62. package/esm/SankeyChart/SankeyNodeElement.js +5 -3
  63. package/esm/SankeyChart/SankeyNodeLabel.js +3 -0
  64. package/esm/SankeyChart/SankeyPlot.js +2 -2
  65. package/esm/SankeyChart/index.d.ts +2 -1
  66. package/esm/SankeyChart/index.js +1 -1
  67. package/esm/SankeyChart/sankeyClasses.d.ts +27 -6
  68. package/esm/SankeyChart/sankeyClasses.js +25 -6
  69. package/esm/ScatterChartPro/ScatterChartPro.js +2 -2
  70. package/esm/index.js +1 -1
  71. package/esm/internals/plugins/useChartProExport/exportImage.js +1 -1
  72. package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
  73. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +13 -0
  74. package/esm/themeAugmentation/components.d.ts +19 -1
  75. package/esm/themeAugmentation/overrides.d.ts +5 -2
  76. package/esm/themeAugmentation/props.d.ts +8 -0
  77. package/index.js +1 -1
  78. package/internals/plugins/useChartProExport/exportImage.js +1 -1
  79. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
  80. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +13 -0
  81. package/package.json +2 -2
  82. package/themeAugmentation/components.d.ts +19 -1
  83. package/themeAugmentation/overrides.d.ts +5 -2
  84. package/themeAugmentation/props.d.ts +8 -0
  85. package/Heatmap/internals/HeatmapCell.d.ts +0 -21
  86. package/Heatmap/internals/HeatmapCell.js +0 -18
  87. package/esm/Heatmap/internals/HeatmapCell.d.ts +0 -21
  88. package/esm/Heatmap/internals/HeatmapCell.js +0 -12
@@ -1,20 +1,39 @@
1
1
  import composeClasses from '@mui/utils/composeClasses';
2
2
  import generateUtilityClass from '@mui/utils/generateUtilityClass';
3
3
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
4
- export function getSankeyPlotUtilityClass(slot) {
4
+
5
+ /**
6
+ * @deprecated Use `SankeyClasses` instead.
7
+ */
8
+
9
+ export function getSankeyUtilityClass(slot) {
5
10
  return generateUtilityClass('MuiSankeyChart', slot);
6
11
  }
7
- export const sankeyPlotClasses = generateUtilityClasses('MuiSankeyChart', ['root', 'nodes', 'nodeLabels', 'links', 'linkLabels']);
8
- export const useUtilityClasses = ownerState => {
12
+
13
+ /**
14
+ * @deprecated Use `getSankeyUtilityClass` instead.
15
+ */
16
+ export const getSankeyPlotUtilityClass = getSankeyUtilityClass;
17
+ export const sankeyClasses = generateUtilityClasses('MuiSankeyChart', ['root', 'nodes', 'nodeLabels', 'links', 'linkLabels', 'node', 'link', 'nodeLabel', 'linkLabel']);
18
+
19
+ /**
20
+ * @deprecated Use `sankeyClasses` instead.
21
+ */
22
+ export const sankeyPlotClasses = sankeyClasses;
23
+ export const useUtilityClasses = options => {
9
24
  const {
10
25
  classes
11
- } = ownerState;
26
+ } = options ?? {};
12
27
  const slots = {
13
28
  root: ['root'],
14
29
  nodes: ['nodes'],
15
30
  nodeLabels: ['nodeLabels'],
16
31
  links: ['links'],
17
- linkLabels: ['linkLabels']
32
+ linkLabels: ['linkLabels'],
33
+ node: ['node'],
34
+ link: ['link'],
35
+ nodeLabel: ['nodeLabel'],
36
+ linkLabel: ['linkLabel']
18
37
  };
19
- return composeClasses(slots, getSankeyPlotUtilityClass, classes);
38
+ return composeClasses(slots, getSankeyUtilityClass, classes);
20
39
  };
@@ -1563,8 +1563,8 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
1563
1563
  requiredKeys: PropTypes.arrayOf(PropTypes.string),
1564
1564
  type: PropTypes.oneOf(['doubleTapReset']).isRequired
1565
1565
  }), PropTypes.shape({
1566
- pointerMode: PropTypes.any,
1567
- requiredKeys: PropTypes.array,
1566
+ pointerMode: PropTypes.oneOf(['mouse', 'touch']),
1567
+ requiredKeys: PropTypes.arrayOf(PropTypes.string),
1568
1568
  type: PropTypes.oneOf(['brush']).isRequired
1569
1569
  })]).isRequired)
1570
1570
  })
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.27.4
2
+ * @mui/x-charts-pro v8.28.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -23,6 +23,7 @@ export async function exportImage(element, svg, params) {
23
23
  } = params ?? {};
24
24
  const drawDocumentPromise = getDrawDocument();
25
25
  const doc = ownerDocument(element);
26
+ const ratio = Math.max(window.devicePixelRatio || 1, 1);
26
27
  const iframe = createExportIframe(fileName);
27
28
  /* We apply the min/max width and height to ensure the SVG doesn't resize in the export.
28
29
  * We apply to the original SVG so that the cloned tree will contain the styles and revert these
@@ -62,7 +63,6 @@ export async function exportImage(element, svg, params) {
62
63
  /* Use the size from the export body in case `onBeforeExport` adds some elements that should be in the export. */
63
64
  const exportDocBodySize = iframe.contentDocument.body.getBoundingClientRect();
64
65
  const canvas = document.createElement('canvas');
65
- const ratio = window.devicePixelRatio || 1;
66
66
  canvas.width = exportDocBodySize.width * ratio;
67
67
  canvas.height = exportDocBodySize.height * ratio;
68
68
  canvas.style.width = `${exportDocBodySize.width}px`;
@@ -99,7 +99,7 @@ export type DoubleTapResetInteraction = Unpack<{
99
99
  } & AllModeProp & AllKeysProp>;
100
100
  export type BrushInteraction = Unpack<{
101
101
  type: 'brush';
102
- } & NoModeProp & NoKeysProp>;
102
+ } & AllModeProp & AllKeysProp>;
103
103
  export type AnyInteraction = {
104
104
  type: string;
105
105
  pointerMode?: InteractionMode;
@@ -16,6 +16,19 @@ export const useZoomOnBrush = ({
16
16
  React.useEffect(() => {
17
17
  instance.setZoomBrushEnabled(isZoomOnBrushEnabled);
18
18
  }, [isZoomOnBrushEnabled, instance]);
19
+ React.useEffect(() => {
20
+ if (!isZoomOnBrushEnabled) {
21
+ return;
22
+ }
23
+ instance.updateZoomInteractionListeners('brush', {
24
+ requiredKeys: config.requiredKeys,
25
+ pointerMode: config.pointerMode,
26
+ pointerOptions: {
27
+ mouse: config.mouse,
28
+ touch: config.touch
29
+ }
30
+ });
31
+ }, [isZoomOnBrushEnabled, config, instance]);
19
32
 
20
33
  // Zoom on brush
21
34
  React.useEffect(() => {
@@ -1,5 +1,15 @@
1
1
  import { type ComponentsProps, type ComponentsOverrides } from '@mui/material/styles';
2
2
  export interface ChartsProComponents<Theme = unknown> {
3
+ MuiFunnelChart?: {
4
+ defaultProps?: ComponentsProps['MuiFunnelChart'];
5
+ styleOverrides?: ComponentsOverrides<Theme>['MuiFunnelChart'];
6
+ };
7
+ MuiFunnelSection?: {
8
+ defaultProps?: ComponentsProps['MuiFunnelSection'];
9
+ };
10
+ MuiFunnelSectionLabel?: {
11
+ defaultProps?: ComponentsProps['MuiFunnelSection'];
12
+ };
3
13
  MuiBarChartPro?: {
4
14
  defaultProps?: ComponentsProps['MuiBarChartPro'];
5
15
  };
@@ -8,11 +18,19 @@ export interface ChartsProComponents<Theme = unknown> {
8
18
  };
9
19
  MuiHeatmap?: {
10
20
  defaultProps?: ComponentsProps['MuiHeatmap'];
11
- styleOverrides?: ComponentsOverrides<Theme>['MuiHeatmap'];
21
+ };
22
+ MuiHeatmapPlot?: {
23
+ styleOverrides?: ComponentsOverrides<Theme>['MuiHeatmapPlot'];
12
24
  };
13
25
  MuiScatterChartPro?: {
14
26
  defaultProps?: ComponentsProps['MuiScatterChartPro'];
15
27
  };
28
+ MuiSankeyChart?: {
29
+ defaultProps?: ComponentsProps['MuiSankeyChart'];
30
+ };
31
+ MuiSankeyPlot?: {
32
+ styleOverrides?: ComponentsOverrides<Theme>['MuiSankeyPlot'];
33
+ };
16
34
  }
17
35
  declare module '@mui/material/styles' {
18
36
  interface Components<Theme = unknown> extends ChartsProComponents<Theme> {}
@@ -1,6 +1,9 @@
1
- import { type HeatmapClassKey } from "../Heatmap/index.js";
1
+ import { type FunnelClasses } from "../FunnelChart/index.js";
2
+ type ExtractSafe<T, U extends T> = T extends U ? T : never;
2
3
  export interface ChartsProComponentNameToClassKey {
3
- MuiHeatmap: HeatmapClassKey;
4
+ MuiFunnelChart: ExtractSafe<keyof FunnelClasses, 'section' | 'sectionLabel'>;
5
+ MuiHeatmapPlot: 'root';
6
+ MuiSankeyPlot: 'root';
4
7
  }
5
8
  declare module '@mui/material/styles' {
6
9
  interface ComponentNameToClassKey extends ChartsProComponentNameToClassKey {}
@@ -2,11 +2,19 @@ import { type ScatterChartProProps } from "../ScatterChartPro/index.js";
2
2
  import { type BarChartProProps } from "../BarChartPro/index.js";
3
3
  import { type HeatmapProps } from "../Heatmap/Heatmap.js";
4
4
  import { type LineChartProProps } from "../LineChartPro/index.js";
5
+ import { type FunnelChartProps } from "../FunnelChart/index.js";
6
+ import { type FunnelSectionProps } from "../FunnelChart/FunnelSection.js";
7
+ import { type FunnelSectionLabelProps } from "../FunnelChart/FunnelSectionLabel.js";
8
+ import { type SankeyChartProps } from "../SankeyChart/SankeyChart.js";
5
9
  export interface ChartsProComponentsPropsList {
6
10
  MuiBarChartPro: BarChartProProps;
7
11
  MuiLineChartPro: LineChartProProps;
8
12
  MuiHeatmap: HeatmapProps;
9
13
  MuiScatterChartPro: ScatterChartProProps;
14
+ MuiFunnelChart: FunnelChartProps;
15
+ MuiFunnelSection: FunnelSectionProps;
16
+ MuiFunnelSectionLabel: FunnelSectionLabelProps;
17
+ MuiSankeyChart: SankeyChartProps;
10
18
  }
11
19
  declare module '@mui/material/styles' {
12
20
  interface ComponentsPropsList extends ChartsProComponentsPropsList {}
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.27.4
2
+ * @mui/x-charts-pro v8.28.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -33,6 +33,7 @@ async function exportImage(element, svg, params) {
33
33
  } = params ?? {};
34
34
  const drawDocumentPromise = getDrawDocument();
35
35
  const doc = (0, _ownerDocument.default)(element);
36
+ const ratio = Math.max(window.devicePixelRatio || 1, 1);
36
37
  const iframe = (0, _common.createExportIframe)(fileName);
37
38
  /* We apply the min/max width and height to ensure the SVG doesn't resize in the export.
38
39
  * We apply to the original SVG so that the cloned tree will contain the styles and revert these
@@ -72,7 +73,6 @@ async function exportImage(element, svg, params) {
72
73
  /* Use the size from the export body in case `onBeforeExport` adds some elements that should be in the export. */
73
74
  const exportDocBodySize = iframe.contentDocument.body.getBoundingClientRect();
74
75
  const canvas = document.createElement('canvas');
75
- const ratio = window.devicePixelRatio || 1;
76
76
  canvas.width = exportDocBodySize.width * ratio;
77
77
  canvas.height = exportDocBodySize.height * ratio;
78
78
  canvas.style.width = `${exportDocBodySize.width}px`;
@@ -99,7 +99,7 @@ export type DoubleTapResetInteraction = Unpack<{
99
99
  } & AllModeProp & AllKeysProp>;
100
100
  export type BrushInteraction = Unpack<{
101
101
  type: 'brush';
102
- } & NoModeProp & NoKeysProp>;
102
+ } & AllModeProp & AllKeysProp>;
103
103
  export type AnyInteraction = {
104
104
  type: string;
105
105
  pointerMode?: InteractionMode;
@@ -22,6 +22,19 @@ const useZoomOnBrush = ({
22
22
  React.useEffect(() => {
23
23
  instance.setZoomBrushEnabled(isZoomOnBrushEnabled);
24
24
  }, [isZoomOnBrushEnabled, instance]);
25
+ React.useEffect(() => {
26
+ if (!isZoomOnBrushEnabled) {
27
+ return;
28
+ }
29
+ instance.updateZoomInteractionListeners('brush', {
30
+ requiredKeys: config.requiredKeys,
31
+ pointerMode: config.pointerMode,
32
+ pointerOptions: {
33
+ mouse: config.mouse,
34
+ touch: config.touch
35
+ }
36
+ });
37
+ }, [isZoomOnBrushEnabled, config, instance]);
25
38
 
26
39
  // Zoom on brush
27
40
  React.useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts-pro",
3
- "version": "8.27.4",
3
+ "version": "8.28.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The Pro plan edition of the MUI X Charts components.",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -31,7 +31,7 @@
31
31
  "@mui/utils": "^7.3.5",
32
32
  "clsx": "^2.1.1",
33
33
  "prop-types": "^15.8.1",
34
- "@mui/x-charts": "8.27.4",
34
+ "@mui/x-charts": "8.28.0",
35
35
  "@mui/x-charts-vendor": "8.26.0",
36
36
  "@mui/x-internals": "8.26.0",
37
37
  "@mui/x-internal-gestures": "0.4.0",
@@ -1,5 +1,15 @@
1
1
  import { type ComponentsProps, type ComponentsOverrides } from '@mui/material/styles';
2
2
  export interface ChartsProComponents<Theme = unknown> {
3
+ MuiFunnelChart?: {
4
+ defaultProps?: ComponentsProps['MuiFunnelChart'];
5
+ styleOverrides?: ComponentsOverrides<Theme>['MuiFunnelChart'];
6
+ };
7
+ MuiFunnelSection?: {
8
+ defaultProps?: ComponentsProps['MuiFunnelSection'];
9
+ };
10
+ MuiFunnelSectionLabel?: {
11
+ defaultProps?: ComponentsProps['MuiFunnelSection'];
12
+ };
3
13
  MuiBarChartPro?: {
4
14
  defaultProps?: ComponentsProps['MuiBarChartPro'];
5
15
  };
@@ -8,11 +18,19 @@ export interface ChartsProComponents<Theme = unknown> {
8
18
  };
9
19
  MuiHeatmap?: {
10
20
  defaultProps?: ComponentsProps['MuiHeatmap'];
11
- styleOverrides?: ComponentsOverrides<Theme>['MuiHeatmap'];
21
+ };
22
+ MuiHeatmapPlot?: {
23
+ styleOverrides?: ComponentsOverrides<Theme>['MuiHeatmapPlot'];
12
24
  };
13
25
  MuiScatterChartPro?: {
14
26
  defaultProps?: ComponentsProps['MuiScatterChartPro'];
15
27
  };
28
+ MuiSankeyChart?: {
29
+ defaultProps?: ComponentsProps['MuiSankeyChart'];
30
+ };
31
+ MuiSankeyPlot?: {
32
+ styleOverrides?: ComponentsOverrides<Theme>['MuiSankeyPlot'];
33
+ };
16
34
  }
17
35
  declare module '@mui/material/styles' {
18
36
  interface Components<Theme = unknown> extends ChartsProComponents<Theme> {}
@@ -1,6 +1,9 @@
1
- import { type HeatmapClassKey } from "../Heatmap/index.js";
1
+ import { type FunnelClasses } from "../FunnelChart/index.js";
2
+ type ExtractSafe<T, U extends T> = T extends U ? T : never;
2
3
  export interface ChartsProComponentNameToClassKey {
3
- MuiHeatmap: HeatmapClassKey;
4
+ MuiFunnelChart: ExtractSafe<keyof FunnelClasses, 'section' | 'sectionLabel'>;
5
+ MuiHeatmapPlot: 'root';
6
+ MuiSankeyPlot: 'root';
4
7
  }
5
8
  declare module '@mui/material/styles' {
6
9
  interface ComponentNameToClassKey extends ChartsProComponentNameToClassKey {}
@@ -2,11 +2,19 @@ import { type ScatterChartProProps } from "../ScatterChartPro/index.js";
2
2
  import { type BarChartProProps } from "../BarChartPro/index.js";
3
3
  import { type HeatmapProps } from "../Heatmap/Heatmap.js";
4
4
  import { type LineChartProProps } from "../LineChartPro/index.js";
5
+ import { type FunnelChartProps } from "../FunnelChart/index.js";
6
+ import { type FunnelSectionProps } from "../FunnelChart/FunnelSection.js";
7
+ import { type FunnelSectionLabelProps } from "../FunnelChart/FunnelSectionLabel.js";
8
+ import { type SankeyChartProps } from "../SankeyChart/SankeyChart.js";
5
9
  export interface ChartsProComponentsPropsList {
6
10
  MuiBarChartPro: BarChartProProps;
7
11
  MuiLineChartPro: LineChartProProps;
8
12
  MuiHeatmap: HeatmapProps;
9
13
  MuiScatterChartPro: ScatterChartProProps;
14
+ MuiFunnelChart: FunnelChartProps;
15
+ MuiFunnelSection: FunnelSectionProps;
16
+ MuiFunnelSectionLabel: FunnelSectionLabelProps;
17
+ MuiSankeyChart: SankeyChartProps;
10
18
  }
11
19
  declare module '@mui/material/styles' {
12
20
  interface ComponentsPropsList extends ChartsProComponentsPropsList {}
@@ -1,21 +0,0 @@
1
- import type * as React from 'react';
2
- import type { SeriesId } from '@mui/x-charts/models';
3
- import type { HeatmapClasses } from "../heatmapClasses.js";
4
- export interface HeatmapItemOwnerState {
5
- seriesId: SeriesId;
6
- dataIndex: number;
7
- color: string;
8
- isFaded: boolean;
9
- isHighlighted: boolean;
10
- classes?: Partial<HeatmapClasses>;
11
- }
12
- export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
13
- x: number;
14
- y: number;
15
- width: number;
16
- height: number;
17
- ownerState: HeatmapItemOwnerState;
18
- }
19
- export declare const HeatmapCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
20
- ownerState: HeatmapItemOwnerState;
21
- }, Pick<React.SVGProps<SVGRectElement>, keyof React.SVGProps<SVGRectElement>>, {}>;
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.HeatmapCell = void 0;
7
- var _styles = require("@mui/material/styles");
8
- const HeatmapCell = exports.HeatmapCell = (0, _styles.styled)('rect', {
9
- name: 'MuiHeatmap',
10
- slot: 'Cell',
11
- overridesResolver: (_, styles) => styles.arc // FIXME: Inconsistent naming with slot
12
- })(({
13
- ownerState
14
- }) => ({
15
- filter: ownerState.isHighlighted && 'saturate(120%)' || ownerState.isFaded && 'saturate(80%)' || undefined,
16
- fill: ownerState.color,
17
- shapeRendering: 'crispEdges'
18
- }));
@@ -1,21 +0,0 @@
1
- import type * as React from 'react';
2
- import type { SeriesId } from '@mui/x-charts/models';
3
- import type { HeatmapClasses } from "../heatmapClasses.js";
4
- export interface HeatmapItemOwnerState {
5
- seriesId: SeriesId;
6
- dataIndex: number;
7
- color: string;
8
- isFaded: boolean;
9
- isHighlighted: boolean;
10
- classes?: Partial<HeatmapClasses>;
11
- }
12
- export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
13
- x: number;
14
- y: number;
15
- width: number;
16
- height: number;
17
- ownerState: HeatmapItemOwnerState;
18
- }
19
- export declare const HeatmapCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
20
- ownerState: HeatmapItemOwnerState;
21
- }, Pick<React.SVGProps<SVGRectElement>, keyof React.SVGProps<SVGRectElement>>, {}>;
@@ -1,12 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
- export const HeatmapCell = styled('rect', {
3
- name: 'MuiHeatmap',
4
- slot: 'Cell',
5
- overridesResolver: (_, styles) => styles.arc // FIXME: Inconsistent naming with slot
6
- })(({
7
- ownerState
8
- }) => ({
9
- filter: ownerState.isHighlighted && 'saturate(120%)' || ownerState.isFaded && 'saturate(80%)' || undefined,
10
- fill: ownerState.color,
11
- shapeRendering: 'crispEdges'
12
- }));