@mui/x-charts-pro 8.27.5 → 8.28.2
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/BarChartPro/BarChartPro.js +2 -2
- package/CHANGELOG.md +155 -0
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +1 -1
- package/FunnelChart/FunnelPlot.js +8 -3
- package/FunnelChart/FunnelSection.js +7 -3
- package/FunnelChart/FunnelSectionLabel.d.ts +6 -0
- package/FunnelChart/FunnelSectionLabel.js +18 -5
- package/FunnelChart/funnelClasses.d.ts +29 -0
- package/FunnelChart/funnelClasses.js +29 -0
- package/FunnelChart/funnelSectionClasses.d.ts +13 -0
- package/FunnelChart/funnelSectionClasses.js +19 -0
- package/FunnelChart/index.d.ts +2 -0
- package/FunnelChart/index.js +8 -0
- package/Heatmap/Heatmap.js +2 -2
- package/Heatmap/HeatmapCell.d.ts +34 -0
- package/Heatmap/HeatmapCell.js +64 -0
- package/Heatmap/HeatmapItem.d.ts +1 -8
- package/Heatmap/HeatmapItem.js +4 -19
- package/Heatmap/heatmapClasses.d.ts +6 -1
- package/Heatmap/heatmapClasses.js +18 -3
- package/Heatmap/index.d.ts +4 -2
- package/Heatmap/index.js +17 -13
- package/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
- package/LineChartPro/LineChartPro.js +2 -2
- package/SankeyChart/SankeyLinkElement.js +4 -2
- package/SankeyChart/SankeyLinkLabel.js +3 -0
- package/SankeyChart/SankeyNodeElement.d.ts +1 -1
- package/SankeyChart/SankeyNodeElement.js +5 -3
- package/SankeyChart/SankeyNodeLabel.js +3 -0
- package/SankeyChart/SankeyPlot.js +2 -2
- package/SankeyChart/index.d.ts +2 -1
- package/SankeyChart/index.js +7 -0
- package/SankeyChart/sankeyClasses.d.ts +27 -6
- package/SankeyChart/sankeyClasses.js +27 -8
- package/ScatterChartPro/ScatterChartPro.js +2 -2
- package/esm/BarChartPro/BarChartPro.js +2 -2
- package/esm/ChartsDataProviderPro/ChartsDataProviderPro.js +1 -1
- package/esm/FunnelChart/FunnelPlot.js +8 -3
- package/esm/FunnelChart/FunnelSection.js +9 -5
- package/esm/FunnelChart/FunnelSectionLabel.d.ts +6 -0
- package/esm/FunnelChart/FunnelSectionLabel.js +20 -7
- package/esm/FunnelChart/funnelClasses.d.ts +29 -0
- package/esm/FunnelChart/funnelClasses.js +19 -0
- package/esm/FunnelChart/funnelSectionClasses.d.ts +13 -0
- package/esm/FunnelChart/funnelSectionClasses.js +20 -0
- package/esm/FunnelChart/index.d.ts +2 -0
- package/esm/FunnelChart/index.js +1 -0
- package/esm/Heatmap/Heatmap.js +2 -2
- package/esm/Heatmap/HeatmapCell.d.ts +34 -0
- package/esm/Heatmap/HeatmapCell.js +58 -0
- package/esm/Heatmap/HeatmapItem.d.ts +1 -8
- package/esm/Heatmap/HeatmapItem.js +4 -19
- package/esm/Heatmap/heatmapClasses.d.ts +6 -1
- package/esm/Heatmap/heatmapClasses.js +16 -2
- package/esm/Heatmap/index.d.ts +4 -2
- package/esm/Heatmap/index.js +2 -1
- package/esm/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
- package/esm/LineChartPro/LineChartPro.js +2 -2
- package/esm/SankeyChart/SankeyLinkElement.js +4 -2
- package/esm/SankeyChart/SankeyLinkLabel.js +3 -0
- package/esm/SankeyChart/SankeyNodeElement.d.ts +1 -1
- package/esm/SankeyChart/SankeyNodeElement.js +5 -3
- package/esm/SankeyChart/SankeyNodeLabel.js +3 -0
- package/esm/SankeyChart/SankeyPlot.js +2 -2
- package/esm/SankeyChart/index.d.ts +2 -1
- package/esm/SankeyChart/index.js +1 -1
- package/esm/SankeyChart/sankeyClasses.d.ts +27 -6
- package/esm/SankeyChart/sankeyClasses.js +25 -6
- package/esm/ScatterChartPro/ScatterChartPro.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +13 -0
- package/esm/themeAugmentation/components.d.ts +19 -1
- package/esm/themeAugmentation/overrides.d.ts +5 -2
- package/esm/themeAugmentation/props.d.ts +8 -0
- package/index.js +1 -1
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +13 -0
- package/package.json +2 -2
- package/themeAugmentation/components.d.ts +19 -1
- package/themeAugmentation/overrides.d.ts +5 -2
- package/themeAugmentation/props.d.ts +8 -0
- package/Heatmap/internals/HeatmapCell.d.ts +0 -21
- package/Heatmap/internals/HeatmapCell.js +0 -18
- package/esm/Heatmap/internals/HeatmapCell.d.ts +0 -21
- package/esm/Heatmap/internals/HeatmapCell.js +0 -12
|
@@ -1595,8 +1595,8 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1595
1595
|
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1596
1596
|
type: _propTypes.default.oneOf(['doubleTapReset']).isRequired
|
|
1597
1597
|
}), _propTypes.default.shape({
|
|
1598
|
-
pointerMode: _propTypes.default.
|
|
1599
|
-
requiredKeys: _propTypes.default.
|
|
1598
|
+
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
1599
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1600
1600
|
type: _propTypes.default.oneOf(['brush']).isRequired
|
|
1601
1601
|
})]).isRequired)
|
|
1602
1602
|
})
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,161 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.28.2
|
|
9
|
+
|
|
10
|
+
_Apr 1, 2026_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 4 contributors who made this release possible.
|
|
13
|
+
|
|
14
|
+
Special thanks go out to this community member for their valuable contribution:
|
|
15
|
+
@mixelburg, @sibananda485
|
|
16
|
+
|
|
17
|
+
The following team members contributed to this release:
|
|
18
|
+
@dav-is, @JCQuintas
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid@8.28.2`
|
|
23
|
+
|
|
24
|
+
- [DataGrid] Export `GridColumnUnsortedIconProps` for custom column icon slots (#21898) @mixelburg
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-pro@8.28.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid@8.28.2`.
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-premium@8.28.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid-pro@8.28.2`, plus:
|
|
33
|
+
|
|
34
|
+
- [DataGridPremium] Fix clipboard paste issue in portal (#21949) @sibananda485
|
|
35
|
+
|
|
36
|
+
### Charts
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-charts@8.28.2`
|
|
39
|
+
|
|
40
|
+
- [charts] Fix zoom slider preview with discard filter mode (#21906) @JCQuintas
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-charts-pro@8.28.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-charts@8.28.2`.
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-charts-premium@8.28.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
47
|
+
|
|
48
|
+
Same changes as in `@mui/x-charts-pro@8.28.2`.
|
|
49
|
+
|
|
50
|
+
### Docs
|
|
51
|
+
|
|
52
|
+
- [docs] Fix JSDOM → jsdom casing (#21908) @JCQuintas
|
|
53
|
+
|
|
54
|
+
### Core
|
|
55
|
+
|
|
56
|
+
- [docs-infra] Set `SEARCH_INDEX` Env for v8 (#21875) @dav-is
|
|
57
|
+
|
|
58
|
+
## 8.28.1
|
|
59
|
+
|
|
60
|
+
_Mar 26, 2026_
|
|
61
|
+
|
|
62
|
+
We'd like to extend a big thank you to the 2 contributors who made this release possible.
|
|
63
|
+
|
|
64
|
+
The following team members contributed to this release:
|
|
65
|
+
@arminmeh, @cherniavskii
|
|
66
|
+
|
|
67
|
+
### Data Grid
|
|
68
|
+
|
|
69
|
+
#### `@mui/x-data-grid@8.28.1`
|
|
70
|
+
|
|
71
|
+
- [DataGrid] Prevent repeated `hasScrollbar` state updates (#21847) @arminmeh
|
|
72
|
+
|
|
73
|
+
#### `@mui/x-data-grid-pro@8.28.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
74
|
+
|
|
75
|
+
Same changes as in `@mui/x-data-grid@8.28.1`, plus:
|
|
76
|
+
|
|
77
|
+
- [DataGridPro] `fetchRows()` API's default `start` and `end` params based on scroll position with lazy loading (#21811) @arminmeh
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-data-grid-premium@8.28.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
80
|
+
|
|
81
|
+
Same changes as in `@mui/x-data-grid-pro@8.28.1`.
|
|
82
|
+
|
|
83
|
+
### Core
|
|
84
|
+
|
|
85
|
+
- [internal] Remove headless data grid packages (#21848) @cherniavskii
|
|
86
|
+
|
|
87
|
+
## 8.28.0
|
|
88
|
+
|
|
89
|
+
_Mar 19, 2026_
|
|
90
|
+
|
|
91
|
+
We'd like to extend a big thank you to the 5 contributors who made this release possible.
|
|
92
|
+
|
|
93
|
+
The following team members contributed to this release:
|
|
94
|
+
@alexfauquette, @brijeshb42, @Janpot, @JCQuintas, @sai6855
|
|
95
|
+
|
|
96
|
+
### Data Grid
|
|
97
|
+
|
|
98
|
+
#### `@mui/x-data-grid@8.28.0`
|
|
99
|
+
|
|
100
|
+
- [DataGrid] Move `elementOverrides` to constants and remove duplicates (@sai6855) (#21752) @github-actions[bot]
|
|
101
|
+
|
|
102
|
+
#### `@mui/x-data-grid-pro@8.28.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
103
|
+
|
|
104
|
+
Same changes as in `@mui/x-data-grid@8.28.0`.
|
|
105
|
+
|
|
106
|
+
#### `@mui/x-data-grid-premium@8.28.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
107
|
+
|
|
108
|
+
Same changes as in `@mui/x-data-grid-pro@8.28.0`.
|
|
109
|
+
|
|
110
|
+
### Date and Time Pickers
|
|
111
|
+
|
|
112
|
+
#### `@mui/x-date-pickers@8.27.2`
|
|
113
|
+
|
|
114
|
+
Internal changes.
|
|
115
|
+
|
|
116
|
+
#### `@mui/x-date-pickers-pro@8.27.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
117
|
+
|
|
118
|
+
Same changes as in `@mui/x-date-pickers@8.27.2`.
|
|
119
|
+
|
|
120
|
+
### Charts
|
|
121
|
+
|
|
122
|
+
#### `@mui/x-charts@8.28.0`
|
|
123
|
+
|
|
124
|
+
- [charts] Improve deprecation warnings (#21760) (#21767) @alexfauquette
|
|
125
|
+
- [charts] Refactor `FunnelChart` classes structure (@JCQuintas) (#21763) @github-actions[bot]
|
|
126
|
+
- [charts] Refactor `Heatmap` classes structure (#21653) (#21745) @JCQuintas
|
|
127
|
+
- [charts] Refactor `PieChart` classes structure (@JCQuintas) (#21715) @github-actions[bot]
|
|
128
|
+
- [charts] Refactor `RadarChart` classes structure (@JCQuintas) (#21730) @github-actions[bot]
|
|
129
|
+
- [charts] Refactor `SankeyChart` classes structure (#21654) (#21726) @JCQuintas
|
|
130
|
+
- [charts] Rename `data-series-id` by `data-series` (#21761) (#21772) @alexfauquette
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-charts-pro@8.28.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
133
|
+
|
|
134
|
+
Same changes as in `@mui/x-charts@8.28.0`, plus:
|
|
135
|
+
|
|
136
|
+
- [charts-pro] Allow `brush` interaction to accept `requiredKeys/pointerMode` (#21723) @JCQuintas
|
|
137
|
+
|
|
138
|
+
#### `@mui/x-charts-premium@8.28.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
139
|
+
|
|
140
|
+
Same changes as in `@mui/x-charts-pro@8.28.0`.
|
|
141
|
+
|
|
142
|
+
### Tree View
|
|
143
|
+
|
|
144
|
+
#### `@mui/x-tree-view@8.27.2`
|
|
145
|
+
|
|
146
|
+
Internal changes.
|
|
147
|
+
|
|
148
|
+
#### `@mui/x-tree-view-pro@8.27.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
149
|
+
|
|
150
|
+
Same changes as in `@mui/x-tree-view@8.27.2`.
|
|
151
|
+
|
|
152
|
+
### Codemod
|
|
153
|
+
|
|
154
|
+
#### `@mui/x-codemod@8.27.0`
|
|
155
|
+
|
|
156
|
+
Internal changes.
|
|
157
|
+
|
|
158
|
+
### Core
|
|
159
|
+
|
|
160
|
+
- [code-infra] Fix contributor generation in changelog (#21712) @brijeshb42
|
|
161
|
+
- [code-infra] Install pkg-pr-new (#21778) @Janpot
|
|
162
|
+
|
|
8
163
|
## 8.27.5
|
|
9
164
|
|
|
10
165
|
_Mar 11, 2026_
|
|
@@ -17,7 +17,7 @@ var _material = require("../internals/material");
|
|
|
17
17
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
18
18
|
var _useChartsDataProviderProProps = require("./useChartsDataProviderProProps");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const releaseInfo = "
|
|
20
|
+
const releaseInfo = "MTc3NTAwMTYwMDAwMA==";
|
|
21
21
|
const packageIdentifier = 'x-charts-pro';
|
|
22
22
|
const defaultSeriesConfigPro = exports.defaultSeriesConfigPro = _internals.defaultSeriesConfig;
|
|
23
23
|
|
|
@@ -15,6 +15,7 @@ var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
|
15
15
|
var _internals = require("@mui/x-charts/internals");
|
|
16
16
|
var _FunnelSection = require("./FunnelSection");
|
|
17
17
|
var _labelUtils = require("./labelUtils");
|
|
18
|
+
var _funnelClasses = require("./funnelClasses");
|
|
18
19
|
var _useFunnelSeries = require("../hooks/useFunnelSeries");
|
|
19
20
|
var _curves = require("./curves");
|
|
20
21
|
var _FunnelSectionLabel = require("./FunnelSectionLabel");
|
|
@@ -110,7 +111,9 @@ function FunnelPlot(props) {
|
|
|
110
111
|
} = props,
|
|
111
112
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
112
113
|
const data = useAggregatedData();
|
|
113
|
-
|
|
114
|
+
const classes = (0, _funnelClasses.useUtilityClasses)();
|
|
115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
116
|
+
className: classes.root,
|
|
114
117
|
children: [data.map(series => {
|
|
115
118
|
if (series.length === 0) {
|
|
116
119
|
return null;
|
|
@@ -150,7 +153,8 @@ function FunnelPlot(props) {
|
|
|
150
153
|
id,
|
|
151
154
|
label,
|
|
152
155
|
seriesId,
|
|
153
|
-
dataIndex
|
|
156
|
+
dataIndex,
|
|
157
|
+
variant
|
|
154
158
|
}) => {
|
|
155
159
|
if (!label || !label.value) {
|
|
156
160
|
return null;
|
|
@@ -158,7 +162,8 @@ function FunnelPlot(props) {
|
|
|
158
162
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FunnelSectionLabel.FunnelSectionLabel, (0, _extends2.default)({
|
|
159
163
|
label: label,
|
|
160
164
|
dataIndex: dataIndex,
|
|
161
|
-
seriesId: seriesId
|
|
165
|
+
seriesId: seriesId,
|
|
166
|
+
variant: variant
|
|
162
167
|
}, other), id);
|
|
163
168
|
})
|
|
164
169
|
}, series[0].seriesId);
|
|
@@ -15,11 +15,12 @@ var _internals = require("@mui/x-charts/internals");
|
|
|
15
15
|
var _hooks = require("@mui/x-charts/hooks");
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
var _funnelSectionClasses = require("./funnelSectionClasses");
|
|
18
|
+
var _funnelClasses = require("./funnelClasses");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
const _excluded = ["seriesId", "dataIndex", "classes", "color", "onClick", "className", "variant"];
|
|
20
21
|
const FunnelSectionPath = exports.FunnelSectionPath = (0, _styles.styled)('path', {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
name: 'MuiFunnelChart',
|
|
23
|
+
slot: 'Section'
|
|
23
24
|
})(() => ({
|
|
24
25
|
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, fill-opacity 0.2s ease-in, filter 0.2s ease-in'
|
|
25
26
|
}));
|
|
@@ -52,6 +53,9 @@ const FunnelSection = exports.FunnelSection = (0, _internals.consumeSlots)('MuiF
|
|
|
52
53
|
seriesId,
|
|
53
54
|
dataIndex
|
|
54
55
|
});
|
|
56
|
+
const newClasses = (0, _funnelClasses.useUtilityClasses)({
|
|
57
|
+
variant
|
|
58
|
+
});
|
|
55
59
|
const isOutlined = variant === 'outlined';
|
|
56
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FunnelSectionPath, (0, _extends2.default)({}, interactionProps, {
|
|
57
61
|
filter: isHighlighted && !isOutlined ? 'brightness(120%)' : undefined,
|
|
@@ -65,7 +69,7 @@ const FunnelSection = exports.FunnelSection = (0, _internals.consumeSlots)('MuiF
|
|
|
65
69
|
onClick: onClick,
|
|
66
70
|
"data-highlighted": isHighlighted || undefined,
|
|
67
71
|
"data-faded": isFaded || undefined,
|
|
68
|
-
className: (0, _clsx.default)(classes?.root, className, isOutlined ? classes?.outlined : classes?.filled, isHighlighted && classes?.highlighted, isFaded && classes?.faded)
|
|
72
|
+
className: (0, _clsx.default)(newClasses.section, classes?.root, className, isOutlined ? classes?.outlined : classes?.filled, isHighlighted && classes?.highlighted, isFaded && classes?.faded)
|
|
69
73
|
}, other, {
|
|
70
74
|
ref: ref
|
|
71
75
|
}));
|
|
@@ -11,9 +11,15 @@ export interface FunnelSectionLabelConfig {
|
|
|
11
11
|
export interface FunnelSectionLabelProps extends Omit<React.SVGProps<SVGTextElement>, 'ref' | 'id'> {
|
|
12
12
|
classes?: Partial<FunnelSectionClasses>;
|
|
13
13
|
label: FunnelSectionLabelConfig;
|
|
14
|
+
/**
|
|
15
|
+
* Indicate if the section is filled or outlined.
|
|
16
|
+
* Can be used to apply different styles to the label.
|
|
17
|
+
*/
|
|
18
|
+
variant?: 'filled' | 'outlined';
|
|
14
19
|
seriesId: SeriesId;
|
|
15
20
|
dataIndex: number;
|
|
16
21
|
}
|
|
22
|
+
export declare const FunnelSectionLabelText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.SVGTextElementAttributes<SVGTextElement>, keyof React.SVGTextElementAttributes<SVGTextElement>>, {}>;
|
|
17
23
|
/**
|
|
18
24
|
* @ignore - internal component.
|
|
19
25
|
*/
|
|
@@ -6,15 +6,24 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.FunnelSectionLabel = void 0;
|
|
9
|
+
exports.FunnelSectionLabelText = exports.FunnelSectionLabel = void 0;
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _styles = require("@mui/material/styles");
|
|
14
14
|
var _internals = require("@mui/x-charts/internals");
|
|
15
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
16
|
var _funnelSectionClasses = require("./funnelSectionClasses");
|
|
17
|
+
var _funnelClasses = require("./funnelClasses");
|
|
16
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
const _excluded = ["classes", "color", "onClick", "className", "label", "seriesId", "dataIndex"];
|
|
19
|
+
const _excluded = ["classes", "color", "onClick", "className", "label", "variant", "seriesId", "dataIndex"];
|
|
20
|
+
const FunnelSectionLabelText = exports.FunnelSectionLabelText = (0, _styles.styled)('text', {
|
|
21
|
+
name: 'MuiFunnelChart',
|
|
22
|
+
slot: 'SectionLabel'
|
|
23
|
+
})(() => ({
|
|
24
|
+
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, fill-opacity 0.2s ease-in, filter 0.2s ease-in'
|
|
25
|
+
}));
|
|
26
|
+
|
|
18
27
|
/**
|
|
19
28
|
* @ignore - internal component.
|
|
20
29
|
*/
|
|
@@ -23,11 +32,15 @@ const FunnelSectionLabel = exports.FunnelSectionLabel = (0, _internals.consumeSl
|
|
|
23
32
|
}, /*#__PURE__*/React.forwardRef(function FunnelSectionLabel(props, ref) {
|
|
24
33
|
const {
|
|
25
34
|
classes,
|
|
26
|
-
label
|
|
35
|
+
label,
|
|
36
|
+
variant = 'filled'
|
|
27
37
|
} = props,
|
|
28
38
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
29
39
|
const theme = (0, _styles.useTheme)();
|
|
30
|
-
|
|
40
|
+
const newClasses = (0, _funnelClasses.useUtilityClasses)({
|
|
41
|
+
variant
|
|
42
|
+
});
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FunnelSectionLabelText, (0, _extends2.default)({
|
|
31
44
|
stroke: "none",
|
|
32
45
|
pointerEvents: "none",
|
|
33
46
|
fontFamily: theme.typography.body2.fontFamily,
|
|
@@ -39,7 +52,7 @@ const FunnelSectionLabel = exports.FunnelSectionLabel = (0, _internals.consumeSl
|
|
|
39
52
|
fontStyle: theme.typography.body2.fontStyle,
|
|
40
53
|
fontVariant: theme.typography.body2.fontVariant,
|
|
41
54
|
fill: (theme.vars || theme)?.palette?.text?.primary,
|
|
42
|
-
className: classes?.label,
|
|
55
|
+
className: (0, _clsx.default)(newClasses.sectionLabel, classes?.label),
|
|
43
56
|
x: label.x,
|
|
44
57
|
y: label.y,
|
|
45
58
|
textAnchor: label.textAnchor ?? 'middle',
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type SeriesId } from '@mui/x-charts/internals';
|
|
2
|
+
export interface FunnelClasses {
|
|
3
|
+
/** Styles applied to the funnel plot element. */
|
|
4
|
+
root: string;
|
|
5
|
+
/** Styles applied to an individual funnel section element. */
|
|
6
|
+
section: string;
|
|
7
|
+
/** Styles applied to a funnel section element if `variant="filled"`. */
|
|
8
|
+
sectionFilled: string;
|
|
9
|
+
/** Styles applied to a funnel section element if `variant="outlined"`. */
|
|
10
|
+
sectionOutlined: string;
|
|
11
|
+
/** Styles applied to a funnel section label element. */
|
|
12
|
+
sectionLabel: string;
|
|
13
|
+
}
|
|
14
|
+
export type FunnelClassKey = keyof FunnelClasses;
|
|
15
|
+
export interface FunnelSectionOwnerState {
|
|
16
|
+
seriesId: SeriesId;
|
|
17
|
+
dataIndex: number;
|
|
18
|
+
color: string;
|
|
19
|
+
isFaded: boolean;
|
|
20
|
+
isHighlighted: boolean;
|
|
21
|
+
classes?: Partial<FunnelClasses>;
|
|
22
|
+
}
|
|
23
|
+
export declare function getFunnelUtilityClass(slot: string): string;
|
|
24
|
+
export declare const funnelClasses: FunnelClasses;
|
|
25
|
+
export interface UseUtilityClassesOptions {
|
|
26
|
+
variant?: 'filled' | 'outlined';
|
|
27
|
+
classes?: Partial<FunnelClasses>;
|
|
28
|
+
}
|
|
29
|
+
export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"section" | "sectionLabel" | "root", string>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.funnelClasses = void 0;
|
|
8
|
+
exports.getFunnelUtilityClass = getFunnelUtilityClass;
|
|
9
|
+
exports.useUtilityClasses = void 0;
|
|
10
|
+
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
11
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
12
|
+
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
13
|
+
function getFunnelUtilityClass(slot) {
|
|
14
|
+
return (0, _generateUtilityClass.default)('MuiFunnelChart', slot);
|
|
15
|
+
}
|
|
16
|
+
const funnelClasses = exports.funnelClasses = (0, _generateUtilityClasses.default)('MuiFunnelChart', ['root', 'section', 'sectionFilled', 'sectionOutlined', 'sectionLabel', 'sectionLabelFilled', 'sectionLabelOutlined']);
|
|
17
|
+
const useUtilityClasses = options => {
|
|
18
|
+
const {
|
|
19
|
+
variant,
|
|
20
|
+
classes
|
|
21
|
+
} = options ?? {};
|
|
22
|
+
const slots = {
|
|
23
|
+
root: ['root'],
|
|
24
|
+
section: ['section', variant === 'filled' && 'sectionFilled', variant === 'outlined' && 'sectionOutlined'],
|
|
25
|
+
sectionLabel: ['sectionLabel', variant === 'filled' && 'sectionLabelFilled', variant === 'outlined' && 'sectionLabelOutlined']
|
|
26
|
+
};
|
|
27
|
+
return (0, _composeClasses.default)(slots, getFunnelUtilityClass, classes);
|
|
28
|
+
};
|
|
29
|
+
exports.useUtilityClasses = useUtilityClasses;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { FunnelSectionProps } from "./FunnelSection.js";
|
|
2
2
|
import type { FunnelSectionLabelProps } from "./FunnelSectionLabel.js";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `FunnelClasses` from `funnelClasses` instead.
|
|
5
|
+
*/
|
|
3
6
|
export interface FunnelSectionClasses {
|
|
4
7
|
/** Styles applied to the root element. */
|
|
5
8
|
root: string;
|
|
@@ -16,9 +19,19 @@ export interface FunnelSectionClasses {
|
|
|
16
19
|
/**
|
|
17
20
|
* Styles applied to the root element for a specified series.
|
|
18
21
|
* Needs to be suffixed with the series ID: `.${funnelSectionClasses.series}-${seriesId}`.
|
|
22
|
+
* @deprecated Use `[data-series]` selector instead.
|
|
19
23
|
*/
|
|
20
24
|
series: string;
|
|
21
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Use `useUtilityClasses` from `funnelClasses` instead.
|
|
28
|
+
*/
|
|
22
29
|
export declare const useUtilityClasses: (props: FunnelSectionProps) => Record<"label" | "filled" | "outlined" | "highlighted" | "faded" | "root", string>;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Use `useUtilityClasses` from `funnelClasses` instead.
|
|
32
|
+
*/
|
|
23
33
|
export declare const useLabelUtilityClasses: (props: FunnelSectionLabelProps) => Record<"label", string>;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use `funnelClasses` from `funnelClasses` instead.
|
|
36
|
+
*/
|
|
24
37
|
export declare const funnelSectionClasses: FunnelSectionClasses;
|
|
@@ -8,9 +8,20 @@ exports.useUtilityClasses = exports.useLabelUtilityClasses = exports.funnelSecti
|
|
|
8
8
|
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
9
9
|
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
10
10
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `FunnelClasses` from `funnelClasses` instead.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `getFunnelUtilityClass` from `funnelClasses` instead.
|
|
17
|
+
*/
|
|
11
18
|
function getFunnelSectionUtilityClass(slot) {
|
|
12
19
|
return (0, _generateUtilityClass.default)('MuiFunnelSection', slot);
|
|
13
20
|
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use `useUtilityClasses` from `funnelClasses` instead.
|
|
24
|
+
*/
|
|
14
25
|
const useUtilityClasses = props => {
|
|
15
26
|
const {
|
|
16
27
|
classes,
|
|
@@ -28,6 +39,10 @@ const useUtilityClasses = props => {
|
|
|
28
39
|
};
|
|
29
40
|
return (0, _composeClasses.default)(slots, getFunnelSectionUtilityClass, classes);
|
|
30
41
|
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use `useUtilityClasses` from `funnelClasses` instead.
|
|
45
|
+
*/
|
|
31
46
|
exports.useUtilityClasses = useUtilityClasses;
|
|
32
47
|
const useLabelUtilityClasses = props => {
|
|
33
48
|
const {
|
|
@@ -40,5 +55,9 @@ const useLabelUtilityClasses = props => {
|
|
|
40
55
|
};
|
|
41
56
|
return (0, _composeClasses.default)(slots, getFunnelSectionUtilityClass, classes);
|
|
42
57
|
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated Use `funnelClasses` from `funnelClasses` instead.
|
|
61
|
+
*/
|
|
43
62
|
exports.useLabelUtilityClasses = useLabelUtilityClasses;
|
|
44
63
|
const funnelSectionClasses = exports.funnelSectionClasses = (0, _generateUtilityClasses.default)('MuiFunnelSection', ['root', 'highlighted', 'faded', 'filled', 'outlined', 'label', 'series', 'data-index']);
|
package/FunnelChart/index.d.ts
CHANGED
|
@@ -13,5 +13,7 @@ export * from "./FunnelChart.plugins.js";
|
|
|
13
13
|
export type { FunnelCurveType } from "./curves/index.js";
|
|
14
14
|
export { funnelSectionClasses } from "./funnelSectionClasses.js";
|
|
15
15
|
export type { FunnelSectionClasses } from "./funnelSectionClasses.js";
|
|
16
|
+
export { funnelClasses } from "./funnelClasses.js";
|
|
17
|
+
export type { FunnelClassKey, FunnelClasses } from "./funnelClasses.js";
|
|
16
18
|
export { FunnelSection } from "./FunnelSection.js";
|
|
17
19
|
export { FunnelSectionLabel } from "./FunnelSectionLabel.js";
|
package/FunnelChart/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var _exportNames = {
|
|
|
7
7
|
Unstable_FunnelChart: true,
|
|
8
8
|
FunnelChart: true,
|
|
9
9
|
funnelSectionClasses: true,
|
|
10
|
+
funnelClasses: true,
|
|
10
11
|
FunnelSection: true,
|
|
11
12
|
FunnelSectionLabel: true
|
|
12
13
|
};
|
|
@@ -29,6 +30,12 @@ Object.defineProperty(exports, "FunnelSectionLabel", {
|
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
32
|
exports.Unstable_FunnelChart = void 0;
|
|
33
|
+
Object.defineProperty(exports, "funnelClasses", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () {
|
|
36
|
+
return _funnelClasses.funnelClasses;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
32
39
|
Object.defineProperty(exports, "funnelSectionClasses", {
|
|
33
40
|
enumerable: true,
|
|
34
41
|
get: function () {
|
|
@@ -109,6 +116,7 @@ Object.keys(_FunnelChart2).forEach(function (key) {
|
|
|
109
116
|
});
|
|
110
117
|
});
|
|
111
118
|
var _funnelSectionClasses = require("./funnelSectionClasses");
|
|
119
|
+
var _funnelClasses = require("./funnelClasses");
|
|
112
120
|
var _FunnelSection = require("./FunnelSection");
|
|
113
121
|
var _FunnelSectionLabel = require("./FunnelSectionLabel");
|
|
114
122
|
/**
|
package/Heatmap/Heatmap.js
CHANGED
|
@@ -569,8 +569,8 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
569
569
|
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
570
570
|
type: _propTypes.default.oneOf(['doubleTapReset']).isRequired
|
|
571
571
|
}), _propTypes.default.shape({
|
|
572
|
-
pointerMode: _propTypes.default.
|
|
573
|
-
requiredKeys: _propTypes.default.
|
|
572
|
+
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
573
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
574
574
|
type: _propTypes.default.oneOf(['brush']).isRequired
|
|
575
575
|
})]).isRequired)
|
|
576
576
|
})
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SeriesId } from "../models/index.js";
|
|
3
|
+
import type { HeatmapClasses } from "./heatmapClasses.js";
|
|
4
|
+
export interface HeatmapCellOwnerState {
|
|
5
|
+
seriesId: SeriesId;
|
|
6
|
+
dataIndex: number;
|
|
7
|
+
color: string;
|
|
8
|
+
value: number;
|
|
9
|
+
isFaded: boolean;
|
|
10
|
+
isHighlighted: boolean;
|
|
11
|
+
classes?: Partial<HeatmapClasses>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use `HeatmapCellOwnerState` instead.
|
|
15
|
+
*/
|
|
16
|
+
export type HeatmapItemOwnerState = HeatmapCellOwnerState;
|
|
17
|
+
export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
ownerState: HeatmapCellOwnerState;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Demos:
|
|
26
|
+
*
|
|
27
|
+
* - [Heatmap](https://mui.com/x/react-charts/heatmap/)
|
|
28
|
+
*
|
|
29
|
+
* API:
|
|
30
|
+
*
|
|
31
|
+
* - [HeatmapCell API](https://mui.com/x/api/charts/heatmap-cell/)
|
|
32
|
+
*/
|
|
33
|
+
declare const HeatmapCell: React.ForwardRefExoticComponent<Omit<HeatmapCellProps, "ref"> & React.RefAttributes<SVGRectElement>>;
|
|
34
|
+
export { HeatmapCell };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.HeatmapCell = void 0;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
var _styles = require("@mui/material/styles");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `HeatmapCellOwnerState` instead.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const HeatmapCellRoot = (0, _styles.styled)('rect', {
|
|
20
|
+
name: 'MuiHeatmap',
|
|
21
|
+
slot: 'Cell',
|
|
22
|
+
overridesResolver: (_, styles) => styles.cell
|
|
23
|
+
})(({
|
|
24
|
+
ownerState
|
|
25
|
+
}) => ({
|
|
26
|
+
filter: ownerState.isHighlighted && 'saturate(120%)' || ownerState.isFaded && 'saturate(80%)' || undefined,
|
|
27
|
+
fill: ownerState.color,
|
|
28
|
+
shapeRendering: 'crispEdges'
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Demos:
|
|
33
|
+
*
|
|
34
|
+
* - [Heatmap](https://mui.com/x/react-charts/heatmap/)
|
|
35
|
+
*
|
|
36
|
+
* API:
|
|
37
|
+
*
|
|
38
|
+
* - [HeatmapCell API](https://mui.com/x/api/charts/heatmap-cell/)
|
|
39
|
+
*/
|
|
40
|
+
const HeatmapCell = exports.HeatmapCell = /*#__PURE__*/React.forwardRef(function HeatmapCell(props, ref) {
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(HeatmapCellRoot, (0, _extends2.default)({
|
|
42
|
+
ref: ref
|
|
43
|
+
}, props));
|
|
44
|
+
});
|
|
45
|
+
if (process.env.NODE_ENV !== "production") HeatmapCell.displayName = "HeatmapCell";
|
|
46
|
+
process.env.NODE_ENV !== "production" ? HeatmapCell.propTypes = {
|
|
47
|
+
// ----------------------------- Warning --------------------------------
|
|
48
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
49
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
50
|
+
// ----------------------------------------------------------------------
|
|
51
|
+
height: _propTypes.default.number.isRequired,
|
|
52
|
+
ownerState: _propTypes.default.shape({
|
|
53
|
+
classes: _propTypes.default.object,
|
|
54
|
+
color: _propTypes.default.string.isRequired,
|
|
55
|
+
dataIndex: _propTypes.default.number.isRequired,
|
|
56
|
+
isFaded: _propTypes.default.bool.isRequired,
|
|
57
|
+
isHighlighted: _propTypes.default.bool.isRequired,
|
|
58
|
+
seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
59
|
+
value: _propTypes.default.number.isRequired
|
|
60
|
+
}).isRequired,
|
|
61
|
+
width: _propTypes.default.number.isRequired,
|
|
62
|
+
x: _propTypes.default.number.isRequired,
|
|
63
|
+
y: _propTypes.default.number.isRequired
|
|
64
|
+
} : void 0;
|
package/Heatmap/HeatmapItem.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from '@mui/x-charts/internals';
|
|
3
|
-
import { type
|
|
3
|
+
import { type HeatmapCellProps } from "./HeatmapCell.js";
|
|
4
4
|
export interface HeatmapItemSlots {
|
|
5
5
|
/**
|
|
6
6
|
* The component that renders the heatmap cell.
|
|
@@ -33,13 +33,6 @@ export interface HeatmapItemProps {
|
|
|
33
33
|
*/
|
|
34
34
|
slots?: HeatmapItemSlots;
|
|
35
35
|
}
|
|
36
|
-
export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
|
|
37
|
-
x: number;
|
|
38
|
-
y: number;
|
|
39
|
-
width: number;
|
|
40
|
-
height: number;
|
|
41
|
-
ownerState: HeatmapItemOwnerState;
|
|
42
|
-
}
|
|
43
36
|
/**
|
|
44
37
|
* @ignore - internal component.
|
|
45
38
|
*/
|