@mui/x-charts 8.5.0 → 8.5.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/BarChart/BarChart.js +2 -3
- package/BarChart/BarLabel/BarLabel.d.ts +1 -1
- package/BarChart/seriesConfig/seriesProcessor.js +1 -1
- package/CHANGELOG.md +204 -0
- package/ChartsAxisHighlight/ChartsAxisHighlightPath.d.ts +1 -1
- package/ChartsGrid/ChartsHorizontalGrid.js +1 -1
- package/ChartsGrid/ChartsVerticalGrid.js +1 -1
- package/ChartsGrid/styledComponents.d.ts +2 -2
- package/ChartsReferenceLine/common.d.ts +1 -1
- package/ChartsTooltip/ChartsTooltip.js +1 -1
- package/ChartsTooltip/ChartsTooltipContainer.js +21 -16
- package/ChartsTooltip/ChartsTooltipTable.d.ts +4 -4
- package/ChartsTooltip/utils.d.ts +6 -0
- package/ChartsTooltip/utils.js +19 -1
- package/LineChart/LineChart.js +2 -3
- package/PieChart/PieChart.js +4 -11
- package/RadarChart/RadarChart.js +2 -3
- package/RadarChart/index.d.ts +1 -1
- package/ScatterChart/ScatterChart.js +2 -3
- package/Toolbar/Toolbar.d.ts +9 -8
- package/Toolbar/Toolbar.js +24 -8
- package/Toolbar/Toolbar.types.d.ts +1 -1
- package/Toolbar/ToolbarButton.js +18 -4
- package/esm/BarChart/BarChart.js +2 -3
- package/esm/BarChart/BarLabel/BarLabel.d.ts +1 -1
- package/esm/BarChart/seriesConfig/seriesProcessor.js +1 -1
- package/esm/ChartsAxisHighlight/ChartsAxisHighlightPath.d.ts +1 -1
- package/esm/ChartsGrid/ChartsHorizontalGrid.js +1 -1
- package/esm/ChartsGrid/ChartsVerticalGrid.js +1 -1
- package/esm/ChartsGrid/styledComponents.d.ts +2 -2
- package/esm/ChartsReferenceLine/common.d.ts +1 -1
- package/esm/ChartsTooltip/ChartsTooltip.js +1 -1
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +22 -17
- package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +4 -4
- package/esm/ChartsTooltip/utils.d.ts +6 -0
- package/esm/ChartsTooltip/utils.js +16 -1
- package/esm/LineChart/LineChart.js +2 -3
- package/esm/PieChart/PieChart.js +4 -11
- package/esm/RadarChart/RadarChart.js +2 -3
- package/esm/RadarChart/index.d.ts +1 -1
- package/esm/ScatterChart/ScatterChart.js +2 -3
- package/esm/Toolbar/Toolbar.d.ts +9 -8
- package/esm/Toolbar/Toolbar.js +23 -7
- package/esm/Toolbar/Toolbar.types.d.ts +1 -1
- package/esm/Toolbar/ToolbarButton.js +19 -4
- package/esm/index.js +1 -1
- package/esm/internals/components/AxisSharedComponents.d.ts +1 -1
- package/esm/internals/components/ChartsWrapper/ChartsWrapper.d.ts +5 -0
- package/esm/internals/components/ChartsWrapper/ChartsWrapper.js +22 -3
- package/esm/internals/constants.d.ts +8 -1
- package/esm/internals/constants.js +9 -1
- package/esm/internals/defaultValueFormatters.d.ts +6 -0
- package/esm/internals/defaultValueFormatters.js +15 -0
- package/esm/internals/index.d.ts +7 -0
- package/esm/internals/index.js +7 -0
- package/esm/internals/invertScale.d.ts +2 -0
- package/esm/internals/invertScale.js +8 -0
- package/esm/internals/material/index.js +2 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +3 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +2917 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +1 -0
- package/esm/internals/plugins/models/seriesConfig/colorProcessor.types.d.ts +5 -0
- package/esm/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +3 -2
- package/esm/internals/store/useSelector.js +3 -1
- package/esm/locales/index.d.ts +3 -1
- package/esm/locales/index.js +2 -0
- package/esm/locales/ptBR.d.ts +16 -0
- package/esm/locales/ptBR.js +9 -0
- package/esm/locales/ptPT.d.ts +16 -0
- package/esm/locales/ptPT.js +9 -0
- package/esm/models/axis.d.ts +3 -1
- package/esm/models/index.d.ts +1 -1
- package/esm/models/seriesType/bar.d.ts +2 -2
- package/esm/models/slots/chartsBaseSlotProps.d.ts +6 -0
- package/esm/models/slots/chartsBaseSlots.d.ts +2 -1
- package/index.js +1 -1
- package/internals/components/AxisSharedComponents.d.ts +1 -1
- package/internals/components/ChartsWrapper/ChartsWrapper.d.ts +5 -0
- package/internals/components/ChartsWrapper/ChartsWrapper.js +22 -3
- package/internals/constants.d.ts +8 -1
- package/internals/constants.js +10 -2
- package/internals/defaultValueFormatters.d.ts +6 -0
- package/internals/defaultValueFormatters.js +21 -0
- package/internals/index.d.ts +7 -0
- package/internals/index.js +76 -0
- package/internals/invertScale.d.ts +2 -0
- package/internals/invertScale.js +14 -0
- package/internals/material/index.js +2 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +2917 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +2 -1
- package/internals/plugins/models/seriesConfig/colorProcessor.types.d.ts +5 -0
- package/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +3 -2
- package/internals/store/useSelector.js +4 -1
- package/locales/index.d.ts +3 -1
- package/locales/index.js +22 -0
- package/locales/ptBR.d.ts +16 -0
- package/locales/ptBR.js +15 -0
- package/locales/ptPT.d.ts +16 -0
- package/locales/ptPT.js +15 -0
- package/models/axis.d.ts +3 -1
- package/models/index.d.ts +1 -1
- package/models/seriesType/bar.d.ts +2 -2
- package/models/slots/chartsBaseSlotProps.d.ts +6 -0
- package/models/slots/chartsBaseSlots.d.ts +2 -1
- package/package.json +5 -5
- package/Toolbar/internals/ChartsToolbar.d.ts +0 -6
- package/Toolbar/internals/ChartsToolbar.js +0 -14
- package/esm/Toolbar/internals/ChartsToolbar.d.ts +0 -6
- package/esm/Toolbar/internals/ChartsToolbar.js +0 -8
package/BarChart/BarChart.js
CHANGED
|
@@ -24,7 +24,6 @@ var _ChartDataProvider = require("../ChartDataProvider");
|
|
|
24
24
|
var _ChartsSurface = require("../ChartsSurface");
|
|
25
25
|
var _useChartContainerProps = require("../ChartContainer/useChartContainerProps");
|
|
26
26
|
var _ChartsWrapper = require("../internals/components/ChartsWrapper");
|
|
27
|
-
var _ChartsToolbar = require("../Toolbar/internals/ChartsToolbar");
|
|
28
27
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
28
|
/**
|
|
30
29
|
* Demos:
|
|
@@ -60,10 +59,10 @@ const BarChart = exports.BarChart = /*#__PURE__*/React.forwardRef(function BarCh
|
|
|
60
59
|
chartsSurfaceProps
|
|
61
60
|
} = (0, _useChartContainerProps.useChartContainerProps)(chartContainerProps, ref);
|
|
62
61
|
const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
63
|
-
const Toolbar = props.slots?.toolbar
|
|
62
|
+
const Toolbar = props.slots?.toolbar;
|
|
64
63
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProvider.ChartDataProvider, (0, _extends2.default)({}, chartDataProviderProps, {
|
|
65
64
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
|
|
66
|
-
children: [props.showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, {}) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
65
|
+
children: [props.showToolbar && Toolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
67
66
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
|
|
68
67
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_BarPlot.BarPlot, (0, _extends2.default)({}, barPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
|
|
69
68
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), children]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BarLabelOwnerState } from "./BarLabel.types.js";
|
|
3
|
-
export declare const BarLabelComponent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<React.SVGTextElementAttributes<SVGTextElement>, keyof React.SVGTextElementAttributes<SVGTextElement>>, {}>;
|
|
3
|
+
export declare const BarLabelComponent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.SVGTextElementAttributes<SVGTextElement>, keyof React.SVGTextElementAttributes<SVGTextElement>>, {}>;
|
|
4
4
|
export type BarLabelProps = Omit<React.SVGProps<SVGTextElement>, 'ref' | 'id' | 'x' | 'y' | 'width' | 'height'> & BarLabelOwnerState & {
|
|
5
5
|
/**
|
|
6
6
|
* The x-coordinate of the stack this bar label belongs to.
|
|
@@ -63,7 +63,7 @@ const seriesProcessor = (params, dataset) => {
|
|
|
63
63
|
(0, _warning.warnOnce)([`MUI X Charts: your dataset key "${dataKey}" is used for plotting bars, but contains nonnumerical elements.`, 'Bar plots only support numbers and null values.']);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
return
|
|
66
|
+
return null;
|
|
67
67
|
}
|
|
68
68
|
return value;
|
|
69
69
|
}) : series[id].data,
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,210 @@
|
|
|
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.5.2
|
|
9
|
+
|
|
10
|
+
_Jun 12, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Improve Data Grid selectors performance
|
|
15
|
+
- 🐞 Fix `useSyncExternalStore` import error in React 17
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
18
|
+
@alisasanib, @noobyogi0010.
|
|
19
|
+
|
|
20
|
+
The following are all team members who have contributed to this release:
|
|
21
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @JCQuintas, @KenanYusuf, @LukasTy, @mapache-salvaje, @michelengelen, @noraleonte, @oliviertassinari, @prakhargupta1, @romgrk.
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@8.5.2`
|
|
26
|
+
|
|
27
|
+
- [DataGrid] Improve selectors performance (#18234) @romgrk
|
|
28
|
+
- [DataGrid] Fix data grid palette when using CSS vars (#18310) @KenanYusuf
|
|
29
|
+
- [DataGrid] Ignore data source request if the grid got unmounted (#18268) @arminmeh
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@8.5.2`, plus:
|
|
34
|
+
|
|
35
|
+
- [DataGridPro] Fix flex column width if it is a pinned column (#18293) @alisasanib
|
|
36
|
+
- [DataGridPro] Fix inconsistent filtering results with aggregation (#17954) @cherniavskii
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-premium@8.5.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid-pro@8.5.2`.
|
|
41
|
+
|
|
42
|
+
### Date and Time Pickers
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-date-pickers@8.5.2`
|
|
45
|
+
|
|
46
|
+
- [pickers] Add `PickerDay2` and `DateRangePickerDay2` components (#15921) @noraleonte
|
|
47
|
+
- [pickers] Fix `hiddenLabel` prop propagation (#18195) @noobyogi0010
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-date-pickers-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
50
|
+
|
|
51
|
+
Same changes as in `@mui/x-date-pickers@8.5.2`.
|
|
52
|
+
|
|
53
|
+
### Charts
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-charts@8.5.2`
|
|
56
|
+
|
|
57
|
+
- [charts] Add a default value formatter for continuous scales (#18178) @bernardobelchior
|
|
58
|
+
- [charts] Add margin-bottom to charts toolbar (#18326) @bernardobelchior
|
|
59
|
+
- [charts] Fix grid with band scale (#18295) @alexfauquette
|
|
60
|
+
- [charts] Remove unnecessary style changes in tests (#18317) @JCQuintas
|
|
61
|
+
- [charts] Remove `sx` prop merging from `useComponentRenderer` (#18235) @bernardobelchior
|
|
62
|
+
- [charts] Fix `useSyncExternalStore` import error in React 17 (#18314) @bernardobelchior
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-charts-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-charts@8.5.2`, plus:
|
|
67
|
+
|
|
68
|
+
- [charts-pro] Document zoom slider tooltip value formatting (#18261) @bernardobelchior
|
|
69
|
+
- [charts-pro] Funnel `gap` prop does not impact the drawing area (#18233) @JCQuintas
|
|
70
|
+
- [charts-pro] Use `ChartsToolbarPro` types in pro charts (#18243) @bernardobelchior
|
|
71
|
+
|
|
72
|
+
### Tree View
|
|
73
|
+
|
|
74
|
+
#### `@mui/x-tree-view@8.5.2`
|
|
75
|
+
|
|
76
|
+
- [tree-view] Fix `useSyncExternalStore` import error in React 17 (#18314) @bernardobelchior
|
|
77
|
+
|
|
78
|
+
#### `@mui/x-tree-view-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
79
|
+
|
|
80
|
+
Same changes as in `@mui/x-tree-view@8.5.2`.
|
|
81
|
+
|
|
82
|
+
### Docs
|
|
83
|
+
|
|
84
|
+
- [docs] Add toolbar custom trigger and panel recipe (#18297) @KenanYusuf
|
|
85
|
+
- [docs] Copyedit the Priority support page (#18311) @mapache-salvaje
|
|
86
|
+
- [docs] Remove confusing opt-out mention in telemetry docs (#18257) @prakhargupta1
|
|
87
|
+
- [docs] Revise the Master Detail doc (#17927) @mapache-salvaje
|
|
88
|
+
- [docs] Revise the list view doc (#17928) @mapache-salvaje
|
|
89
|
+
- [docs] Audit and revise the Pro column docs (#17844) @mapache-salvaje
|
|
90
|
+
- [docs] Add some more context on Heatmap (#18256) @oliviertassinari
|
|
91
|
+
- [x-telemetry] Reduce Telemetry overhead (#18292) @oliviertassinari
|
|
92
|
+
- [code-infra] Align Node version used in CI to v22 (#18319) @LukasTy
|
|
93
|
+
- [code-infra] Fix pkg.pr.new publishing (#18316) @bernardobelchior
|
|
94
|
+
- [code-infra] Revert `React` to `19.0.0` (#18265) @LukasTy
|
|
95
|
+
- [code-infra] Use `catalog` for reused dependencies (#18302) @LukasTy
|
|
96
|
+
- [infra] Remove unused karma/mocha deps and files (#18340) @JCQuintas
|
|
97
|
+
- [infra] Update github label references to use 'scope' instead of 'component' (#18260) @michelengelen
|
|
98
|
+
- [infra] Use a single browser server in CI (#18230) @JCQuintas
|
|
99
|
+
|
|
100
|
+
## 8.5.1
|
|
101
|
+
|
|
102
|
+
<!-- generated comparing v8.5.0..master -->
|
|
103
|
+
|
|
104
|
+
_Jun 5, 2025_
|
|
105
|
+
|
|
106
|
+
We'd like to extend a big thank you to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
107
|
+
|
|
108
|
+
- 📊 Allow exporting pie charts
|
|
109
|
+
- 📚 Documentation improvements
|
|
110
|
+
- 🌎 Improve Portuguese (ptPT) translations on the Data Grid
|
|
111
|
+
- 🌎 Improve Portuguese (ptPT, ptBR) translations on Charts
|
|
112
|
+
- 🌎 Improve Arabic (ar-SD) locale
|
|
113
|
+
- 🐞 Bugfixes
|
|
114
|
+
|
|
115
|
+
Special thanks go out to the community members for their valuable contributions: @moosekebab, @TiagoPortfolio.
|
|
116
|
+
The following are all team members who have contributed to this release:
|
|
117
|
+
@alexfauquette, @bernardobelchior, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @arminmeh.
|
|
118
|
+
|
|
119
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
120
|
+
|
|
121
|
+
### Data Grid
|
|
122
|
+
|
|
123
|
+
#### `@mui/x-data-grid@8.5.1`
|
|
124
|
+
|
|
125
|
+
- [DataGrid] Fix `registerPipeProcessor()` for Node v20 (#18241) @arminmeh
|
|
126
|
+
- [DataGrid] Fix background color in column header filler cells (#18188) @KenanYusuf
|
|
127
|
+
- [DataGrid] Keep pipe pre-processors execution order when callback reference changes (#17558) @arminmeh
|
|
128
|
+
- [DataGrid] Use `useComponentRenderer` from x-internals (#18203) @bernardobelchior
|
|
129
|
+
- [l10n] Improve Arabic (ar-SD) locale (#17959) @moosekebab
|
|
130
|
+
- [l10n] Improve Portuguese from Portugal (pt-PT) locale (#18064) @TiagoPortfolio
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-data-grid-pro@8.5.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
133
|
+
|
|
134
|
+
Same changes as in `@mui/x-data-grid@8.5.1`, plus:
|
|
135
|
+
|
|
136
|
+
- [DataGridPro] Skip rendering detail panels of the rows turned into skeleton rows with lazy loading (#17958) @arminmeh
|
|
137
|
+
|
|
138
|
+
#### `@mui/x-data-grid-premium@8.5.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
139
|
+
|
|
140
|
+
Same changes as in `@mui/x-data-grid-pro@8.5.1`.
|
|
141
|
+
|
|
142
|
+
### Date and Time Pickers
|
|
143
|
+
|
|
144
|
+
#### `@mui/x-date-pickers@8.5.1`
|
|
145
|
+
|
|
146
|
+
- [pickers] Fix `transformOrigin` resolving based on popper `placement` (#18206) @LukasTy
|
|
147
|
+
|
|
148
|
+
#### `@mui/x-date-pickers-pro@8.5.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
149
|
+
|
|
150
|
+
Same changes as in `@mui/x-date-pickers@8.5.1`.
|
|
151
|
+
|
|
152
|
+
### Charts
|
|
153
|
+
|
|
154
|
+
#### `@mui/x-charts@8.5.1`
|
|
155
|
+
|
|
156
|
+
- [charts] Allow skipping tooltip render (#18050) @alexfauquette
|
|
157
|
+
- [charts] Fix act warnings in toolbar tests (#18212) @JCQuintas
|
|
158
|
+
- [charts] Fix prop typo in `extendVertically` (#18211) @JCQuintas
|
|
159
|
+
- [charts] Fix responsive height for ChartsWrapper (#18183) @alexfauquette
|
|
160
|
+
- [charts] Improve charts toolbar accessibility (#18056) @bernardobelchior
|
|
161
|
+
- [charts] Let line series propagate null from the dataset (#18223) @alexfauquette
|
|
162
|
+
- [l10n] Add Portuguese locales for charts (pt-PT, pt-BR) (#18069) @bernardobelchior
|
|
163
|
+
|
|
164
|
+
#### `@mui/x-charts-pro@8.5.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
165
|
+
|
|
166
|
+
Same changes as in `@mui/x-charts@8.5.1`, plus:
|
|
167
|
+
|
|
168
|
+
- [charts-pro] Add `linear-sharp` curve as alternative to square edge (#17966) @JCQuintas
|
|
169
|
+
- [charts-pro] Add correct classes to `FunnelSectionLabel` (#18061) @JCQuintas
|
|
170
|
+
- [charts-pro] Allow exporting a pie chart (#18063) @bernardobelchior
|
|
171
|
+
- [charts-pro] Fix initial render for zoom slider selection (#18208) @bernardobelchior
|
|
172
|
+
- [charts-pro] Fix props being passed to DOM in FunnelChart (#18192) @JCQuintas
|
|
173
|
+
- [charts-pro] Show axis value in zoom slider tooltip (#18054) @bernardobelchior
|
|
174
|
+
- [charts-pro] Render the toolbar in the heatmap chart (#18247) @bernardobelchior
|
|
175
|
+
|
|
176
|
+
### Tree View
|
|
177
|
+
|
|
178
|
+
#### `@mui/x-tree-view@8.5.1`
|
|
179
|
+
|
|
180
|
+
Internal changes.
|
|
181
|
+
|
|
182
|
+
#### `@mui/x-tree-view-pro@8.5.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
183
|
+
|
|
184
|
+
Same changes as in `@mui/x-tree-view@8.5.1`.
|
|
185
|
+
|
|
186
|
+
### Docs
|
|
187
|
+
|
|
188
|
+
- [docs] Update `valueFormatter` signature in migration guide (#18226) @michelengelen
|
|
189
|
+
|
|
190
|
+
### Core
|
|
191
|
+
|
|
192
|
+
- chore(deps): bump @next/eslint-plugin-next to 15.3.3 (#18155) @renovate[bot]
|
|
193
|
+
- chore(deps): bump @types/lodash to ^4.17.17 (#17990) @renovate[bot]
|
|
194
|
+
- chore(deps): bump babel (#18157) @renovate[bot]
|
|
195
|
+
- chore(deps): bump eslint to ^9.28.0 (#17352) @renovate[bot]
|
|
196
|
+
- chore(deps): bump material ui (#17802) @renovate[bot]
|
|
197
|
+
- chore(deps): bump next to ^15.3.3 (#18159) @renovate[bot]
|
|
198
|
+
- chore(deps): bump ossf/scorecard-action action to v2.4.2 (#18160) @renovate[bot]
|
|
199
|
+
- chore(deps): bump react-router to ^7.6.1 (#18162) @renovate[bot]
|
|
200
|
+
- chore(deps): bump yargs to ^18.0.0 (#18169) @renovate[bot]
|
|
201
|
+
- [code-infra] Different approach to console testing for `processRowUpdate` (#18213) @JCQuintas
|
|
202
|
+
- [code-infra] Fix act warnings in DataGrid/toolbar (#18207) @JCQuintas
|
|
203
|
+
- [code-infra] Remove `istanbul` references (#18194) @JCQuintas
|
|
204
|
+
- [code-infra] Remove codesandbox:ci (#18179) @JCQuintas
|
|
205
|
+
- [code-infra] Replace `mocha` with `vitest` on e2e and regression tests (#18071) @JCQuintas
|
|
206
|
+
- [code-infra] Upgrade @mui/internal-test-utils (#18191) @JCQuintas
|
|
207
|
+
- [code-infra] Use vitest for `no-direct-state-access` tests (#18209) @JCQuintas
|
|
208
|
+
- [infra] Improve test setup (#18228) @LukasTy
|
|
209
|
+
- [infra] Update bug and feature request templates to standardize label types (#18198) @michelengelen
|
|
210
|
+
- [infra] Use `playwright` docker image (#18186) @LukasTy
|
|
211
|
+
|
|
8
212
|
## 8.5.0
|
|
9
213
|
|
|
10
214
|
_May 29, 2025_
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartsAxisHighlightType } from "./ChartsAxisHighlight.types.js";
|
|
2
|
-
export declare const ChartsAxisHighlightPath: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
2
|
+
export declare const ChartsAxisHighlightPath: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
3
3
|
ownerState: {
|
|
4
4
|
axisHighlight: ChartsAxisHighlightType;
|
|
5
5
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const GridRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<import("react").SVGProps<SVGGElement>, keyof import("react").SVGProps<SVGGElement>>, {}>;
|
|
2
|
-
export declare const GridLine: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<import("react").SVGLineElementAttributes<SVGLineElement>, keyof import("react").SVGLineElementAttributes<SVGLineElement>>, {}>;
|
|
1
|
+
export declare const GridRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").SVGProps<SVGGElement>, keyof import("react").SVGProps<SVGGElement>>, {}>;
|
|
2
|
+
export declare const GridLine: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").SVGLineElementAttributes<SVGLineElement>, keyof import("react").SVGLineElementAttributes<SVGLineElement>>, {}>;
|
|
@@ -38,4 +38,4 @@ export type CommonChartsReferenceLineProps = {
|
|
|
38
38
|
*/
|
|
39
39
|
classes?: Partial<ChartsReferenceLineClasses>;
|
|
40
40
|
};
|
|
41
|
-
export declare const ReferenceLineRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").SVGProps<SVGGElement>, {}>;
|
|
41
|
+
export declare const ReferenceLineRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").SVGProps<SVGGElement>, {}>;
|
|
@@ -32,7 +32,7 @@ function ChartsTooltip(props) {
|
|
|
32
32
|
} = props;
|
|
33
33
|
const classes = (0, _chartsTooltipClasses.useUtilityClasses)(propClasses);
|
|
34
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipContainer.ChartsTooltipContainer, (0, _extends2.default)({}, props, {
|
|
35
|
-
classes:
|
|
35
|
+
classes: propClasses,
|
|
36
36
|
children: trigger === 'axis' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisTooltipContent.ChartsAxisTooltipContent, {
|
|
37
37
|
classes: classes
|
|
38
38
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsItemTooltipContent.ChartsItemTooltipContent, {
|
|
@@ -18,6 +18,7 @@ var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
|
|
|
18
18
|
var _NoSsr = _interopRequireDefault(require("@mui/material/NoSsr"));
|
|
19
19
|
var _useSvgRef = require("../hooks/useSvgRef");
|
|
20
20
|
var _utils = require("./utils");
|
|
21
|
+
var _chartsTooltipClasses = require("./chartsTooltipClasses");
|
|
21
22
|
var _useSelector = require("../internals/store/useSelector");
|
|
22
23
|
var _useStore = require("../internals/store/useStore");
|
|
23
24
|
var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
|
|
@@ -53,12 +54,14 @@ function ChartsTooltipContainer(inProps) {
|
|
|
53
54
|
});
|
|
54
55
|
const {
|
|
55
56
|
trigger = 'axis',
|
|
56
|
-
classes,
|
|
57
|
+
classes: propClasses,
|
|
57
58
|
children
|
|
58
59
|
} = props,
|
|
59
60
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
61
|
+
const classes = (0, _chartsTooltipClasses.useUtilityClasses)(propClasses);
|
|
60
62
|
const svgRef = (0, _useSvgRef.useSvgRef)();
|
|
61
63
|
const pointerType = (0, _utils.usePointerType)();
|
|
64
|
+
const isFineMainPointer = (0, _utils.useIsFineMainPointer)();
|
|
62
65
|
const popperRef = React.useRef(null);
|
|
63
66
|
const positionRef = (0, _useLazyRef.default)(() => ({
|
|
64
67
|
x: 0,
|
|
@@ -67,14 +70,12 @@ function ChartsTooltipContainer(inProps) {
|
|
|
67
70
|
const axisSystem = (0, _useAxisSystem.useAxisSystem)();
|
|
68
71
|
const store = (0, _useStore.useStore)();
|
|
69
72
|
const isOpen = (0, _useSelector.useSelector)(store, trigger === 'axis' ? axisSystem === 'polar' && _useChartPolarInteraction.selectorChartsInteractionPolarAxisTooltip || axisSystem === 'cartesian' && _useChartCartesianAxis.selectorChartsInteractionAxisTooltip || noAxis : _useChartInteraction.selectorChartsInteractionItemIsDefined);
|
|
70
|
-
const popperOpen = pointerType !== null && isOpen; // tooltipHasData;
|
|
71
|
-
|
|
72
73
|
React.useEffect(() => {
|
|
73
74
|
const element = svgRef.current;
|
|
74
75
|
if (element === null) {
|
|
75
76
|
return () => {};
|
|
76
77
|
}
|
|
77
|
-
const
|
|
78
|
+
const handlePointerEvent = event => {
|
|
78
79
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
79
80
|
positionRef.current = {
|
|
80
81
|
x: event.clientX,
|
|
@@ -82,9 +83,11 @@ function ChartsTooltipContainer(inProps) {
|
|
|
82
83
|
};
|
|
83
84
|
popperRef.current?.update();
|
|
84
85
|
};
|
|
85
|
-
element.addEventListener('
|
|
86
|
+
element.addEventListener('pointerdown', handlePointerEvent);
|
|
87
|
+
element.addEventListener('pointermove', handlePointerEvent);
|
|
86
88
|
return () => {
|
|
87
|
-
element.removeEventListener('
|
|
89
|
+
element.removeEventListener('pointerdown', handlePointerEvent);
|
|
90
|
+
element.removeEventListener('pointermove', handlePointerEvent);
|
|
88
91
|
};
|
|
89
92
|
}, [svgRef, positionRef]);
|
|
90
93
|
const anchorEl = React.useMemo(() => ({
|
|
@@ -100,32 +103,34 @@ function ChartsTooltipContainer(inProps) {
|
|
|
100
103
|
toJSON: () => ''
|
|
101
104
|
})
|
|
102
105
|
}), [positionRef]);
|
|
106
|
+
const isMouse = pointerType?.pointerType === 'mouse' || isFineMainPointer;
|
|
107
|
+
const isTouch = pointerType?.pointerType === 'touch' || !isFineMainPointer;
|
|
103
108
|
const modifiers = React.useMemo(() => [{
|
|
104
109
|
name: 'offset',
|
|
105
110
|
options: {
|
|
106
111
|
offset: () => {
|
|
107
|
-
if (
|
|
108
|
-
|
|
109
|
-
return [0, 8];
|
|
112
|
+
if (isTouch) {
|
|
113
|
+
return [0, 64];
|
|
110
114
|
}
|
|
111
|
-
|
|
115
|
+
// The popper offset: [skidding, distance]
|
|
116
|
+
return [0, 8];
|
|
112
117
|
}
|
|
113
118
|
}
|
|
114
|
-
}, ...(
|
|
115
|
-
: [{
|
|
119
|
+
}, ...(!isMouse ? [{
|
|
116
120
|
name: 'flip',
|
|
117
121
|
options: {
|
|
118
122
|
fallbackPlacements: ['top-end', 'top-start', 'bottom-end', 'bottom']
|
|
119
123
|
}
|
|
120
|
-
}]
|
|
124
|
+
}] : []) // Keep default behavior
|
|
125
|
+
], [isMouse, isTouch]);
|
|
121
126
|
if (trigger === 'none') {
|
|
122
127
|
return null;
|
|
123
128
|
}
|
|
124
129
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NoSsr.default, {
|
|
125
|
-
children:
|
|
130
|
+
children: isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(ChartsTooltipRoot, (0, _extends2.default)({
|
|
126
131
|
className: classes?.root,
|
|
127
|
-
open:
|
|
128
|
-
placement:
|
|
132
|
+
open: isOpen,
|
|
133
|
+
placement: isMouse ? 'right-start' : 'top',
|
|
129
134
|
popperRef: popperRef,
|
|
130
135
|
anchorEl: anchorEl,
|
|
131
136
|
modifiers: modifiers
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @ignore - internal component.
|
|
3
3
|
*/
|
|
4
|
-
export declare const ChartsTooltipPaper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
+
export declare const ChartsTooltipPaper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
|
|
5
5
|
/**
|
|
6
6
|
* @ignore - internal component.
|
|
7
7
|
*/
|
|
8
|
-
export declare const ChartsTooltipTable: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, keyof import("react").ClassAttributes<HTMLTableElement> | keyof import("react").TableHTMLAttributes<HTMLTableElement>>, {}>;
|
|
8
|
+
export declare const ChartsTooltipTable: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, keyof import("react").ClassAttributes<HTMLTableElement> | keyof import("react").TableHTMLAttributes<HTMLTableElement>>, {}>;
|
|
9
9
|
/**
|
|
10
10
|
* @ignore - internal component.
|
|
11
11
|
*/
|
|
12
|
-
export declare const ChartsTooltipRow: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, keyof import("react").ClassAttributes<HTMLTableRowElement> | keyof import("react").HTMLAttributes<HTMLTableRowElement>>, {}>;
|
|
12
|
+
export declare const ChartsTooltipRow: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, keyof import("react").ClassAttributes<HTMLTableRowElement> | keyof import("react").HTMLAttributes<HTMLTableRowElement>>, {}>;
|
|
13
13
|
/**
|
|
14
14
|
* @ignore - internal component.
|
|
15
15
|
*/
|
|
16
|
-
export declare const ChartsTooltipCell: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "className" | "children" | "sx" | "align" | "
|
|
16
|
+
export declare const ChartsTooltipCell: import("@emotion/styled").StyledComponent<Pick<import("@mui/material/Typography").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "className" | "children" | "sx" | "align" | "variant" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping">, "p" | "slot" | "style" | "title" | "ref" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "content" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "sx" | "align" | "variant" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
17
17
|
component?: React.ElementType;
|
|
18
18
|
}, {}, {}>;
|
package/ChartsTooltip/utils.d.ts
CHANGED
|
@@ -13,4 +13,10 @@ type PointerType = Pick<MousePosition, 'pointerType'>;
|
|
|
13
13
|
export declare function usePointerType(): null | PointerType;
|
|
14
14
|
export type TriggerOptions = 'item' | 'axis' | 'none';
|
|
15
15
|
export declare function utcFormatter(v: string | number | Date): string;
|
|
16
|
+
/**
|
|
17
|
+
* Returns true if the main pointer is fine (e.g. mouse).
|
|
18
|
+
* This is useful for determining how to position tooltips or other UI elements based on the type of input device.
|
|
19
|
+
* @returns true if the main pointer is fine, false otherwise.
|
|
20
|
+
*/
|
|
21
|
+
export declare const useIsFineMainPointer: () => boolean;
|
|
16
22
|
export {};
|
package/ChartsTooltip/utils.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
5
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
6
|
Object.defineProperty(exports, "__esModule", {
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
9
|
+
exports.useIsFineMainPointer = void 0;
|
|
8
10
|
exports.useMouseTracker = useMouseTracker;
|
|
9
11
|
exports.usePointerType = usePointerType;
|
|
10
12
|
exports.utcFormatter = utcFormatter;
|
|
11
13
|
var React = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
|
|
12
15
|
var _hooks = require("../hooks");
|
|
13
16
|
/**
|
|
14
17
|
* @deprecated We recommend using vanilla JS to let popper track mouse position.
|
|
@@ -88,4 +91,19 @@ function utcFormatter(v) {
|
|
|
88
91
|
return v.toUTCString();
|
|
89
92
|
}
|
|
90
93
|
return v.toLocaleString();
|
|
91
|
-
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Taken from @mui/x-date-time-pickers
|
|
97
|
+
const mainPointerFineMediaQuery = '@media (pointer: fine)';
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Returns true if the main pointer is fine (e.g. mouse).
|
|
101
|
+
* This is useful for determining how to position tooltips or other UI elements based on the type of input device.
|
|
102
|
+
* @returns true if the main pointer is fine, false otherwise.
|
|
103
|
+
*/
|
|
104
|
+
const useIsFineMainPointer = () => {
|
|
105
|
+
return (0, _useMediaQuery.default)(mainPointerFineMediaQuery, {
|
|
106
|
+
defaultMatches: true
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
exports.useIsFineMainPointer = useIsFineMainPointer;
|
package/LineChart/LineChart.js
CHANGED
|
@@ -11,7 +11,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _styles = require("@mui/material/styles");
|
|
14
|
-
var _ChartsToolbar = require("../Toolbar/internals/ChartsToolbar");
|
|
15
14
|
var _AreaPlot = require("./AreaPlot");
|
|
16
15
|
var _LinePlot = require("./LinePlot");
|
|
17
16
|
var _MarkPlot = require("./MarkPlot");
|
|
@@ -65,10 +64,10 @@ const LineChart = exports.LineChart = /*#__PURE__*/React.forwardRef(function Lin
|
|
|
65
64
|
chartsSurfaceProps
|
|
66
65
|
} = (0, _useChartContainerProps.useChartContainerProps)(chartContainerProps, ref);
|
|
67
66
|
const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
68
|
-
const Toolbar = props.slots?.toolbar
|
|
67
|
+
const Toolbar = props.slots?.toolbar;
|
|
69
68
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProvider.ChartDataProvider, (0, _extends2.default)({}, chartDataProviderProps, {
|
|
70
69
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
|
|
71
|
-
children: [props.showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, {}) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
70
|
+
children: [props.showToolbar && Toolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
72
71
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
|
|
73
72
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AreaPlot.AreaPlot, (0, _extends2.default)({}, areaPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LinePlot.LinePlot, (0, _extends2.default)({}, linePlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
|
|
74
73
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
package/PieChart/PieChart.js
CHANGED
|
@@ -12,7 +12,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _styles = require("@mui/material/styles");
|
|
15
|
-
var
|
|
15
|
+
var _constants = require("../internals/constants");
|
|
16
16
|
var _ChartsTooltip = require("../ChartsTooltip");
|
|
17
17
|
var _ChartsLegend = require("../ChartsLegend");
|
|
18
18
|
var _PiePlot = require("./PiePlot");
|
|
@@ -25,13 +25,6 @@ var _PieChart2 = require("./PieChart.plugins");
|
|
|
25
25
|
var _defaultizeMargin = require("../internals/defaultizeMargin");
|
|
26
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
27
|
const _excluded = ["series", "width", "height", "margin", "colors", "sx", "skipAnimation", "hideLegend", "children", "slots", "slotProps", "onItemClick", "loading", "highlightedItem", "onHighlightChange", "className", "showToolbar"];
|
|
28
|
-
const defaultMargin = {
|
|
29
|
-
top: 5,
|
|
30
|
-
bottom: 5,
|
|
31
|
-
left: 5,
|
|
32
|
-
right: 5
|
|
33
|
-
};
|
|
34
|
-
|
|
35
28
|
/**
|
|
36
29
|
* Demos:
|
|
37
30
|
*
|
|
@@ -67,7 +60,7 @@ const PieChart = exports.PieChart = /*#__PURE__*/React.forwardRef(function PieCh
|
|
|
67
60
|
showToolbar
|
|
68
61
|
} = props,
|
|
69
62
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
70
|
-
const margin = (0, _defaultizeMargin.defaultizeMargin)(marginProps,
|
|
63
|
+
const margin = (0, _defaultizeMargin.defaultizeMargin)(marginProps, _constants.DEFAULT_PIE_CHART_MARGIN);
|
|
71
64
|
const {
|
|
72
65
|
chartDataProviderProps,
|
|
73
66
|
chartsSurfaceProps
|
|
@@ -86,13 +79,13 @@ const PieChart = exports.PieChart = /*#__PURE__*/React.forwardRef(function PieCh
|
|
|
86
79
|
plugins: _PieChart2.PIE_CHART_PLUGINS
|
|
87
80
|
}), ref);
|
|
88
81
|
const Tooltip = slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
89
|
-
const Toolbar = props.slots?.toolbar
|
|
82
|
+
const Toolbar = props.slots?.toolbar;
|
|
90
83
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProvider.ChartDataProvider, (0, _extends2.default)({}, chartDataProviderProps, {
|
|
91
84
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, {
|
|
92
85
|
legendPosition: props.slotProps?.legend?.position,
|
|
93
86
|
legendDirection: props?.slotProps?.legend?.direction ?? 'vertical',
|
|
94
87
|
sx: sx,
|
|
95
|
-
children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, {}) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, {
|
|
88
|
+
children: [showToolbar && Toolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, {
|
|
96
89
|
direction: props?.slotProps?.legend?.direction ?? 'vertical',
|
|
97
90
|
slots: slots,
|
|
98
91
|
slotProps: slotProps
|