@mui/x-charts 9.10.1 → 9.11.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 (177) hide show
  1. package/BarChart/BarChart.js +4 -2
  2. package/BarChart/BarChart.mjs +4 -2
  3. package/BarChart/BarPlot.d.mts +3 -3
  4. package/BarChart/BarPlot.d.ts +3 -3
  5. package/BarChart/BarPlot.js +1 -1
  6. package/BarChart/BarPlot.mjs +1 -1
  7. package/BarChart/BatchBarPlot/BatchBarPlot.d.mts +2 -2
  8. package/BarChart/BatchBarPlot/BatchBarPlot.d.ts +2 -2
  9. package/BarChart/IndividualBarPlot.d.mts +2 -2
  10. package/BarChart/IndividualBarPlot.d.ts +2 -2
  11. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.mts +4 -4
  12. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +4 -4
  13. package/BarChart/useRegisterItemClickHandlers.d.mts +2 -1
  14. package/BarChart/useRegisterItemClickHandlers.d.ts +2 -1
  15. package/BarChart/useRegisterItemClickHandlers.js +8 -0
  16. package/BarChart/useRegisterItemClickHandlers.mjs +8 -1
  17. package/CHANGELOG.md +118 -0
  18. package/ChartsContainer/ChartsContainer.js +4 -2
  19. package/ChartsContainer/ChartsContainer.mjs +4 -2
  20. package/ChartsDataProvider/ChartsDataProvider.js +3 -1
  21. package/ChartsDataProvider/ChartsDataProvider.mjs +3 -1
  22. package/ChartsRadialDataProvider/ChartsRadialDataProvider.js +3 -1
  23. package/ChartsRadialDataProvider/ChartsRadialDataProvider.mjs +3 -1
  24. package/ChartsXAxis/useAxisTicksProps.d.mts +101 -101
  25. package/ChartsXAxis/useAxisTicksProps.d.ts +101 -101
  26. package/ChartsYAxis/useAxisTicksProps.d.mts +101 -101
  27. package/ChartsYAxis/useAxisTicksProps.d.ts +101 -101
  28. package/LineChart/AreaPlot.d.mts +3 -2
  29. package/LineChart/AreaPlot.d.ts +3 -2
  30. package/LineChart/AreaPlot.js +8 -2
  31. package/LineChart/AreaPlot.mjs +9 -3
  32. package/LineChart/LineChart.js +2 -1
  33. package/LineChart/LineChart.mjs +2 -1
  34. package/LineChart/LinePlot.d.mts +3 -2
  35. package/LineChart/LinePlot.d.ts +3 -2
  36. package/LineChart/LinePlot.js +2 -2
  37. package/LineChart/LinePlot.mjs +3 -3
  38. package/LineChart/MarkPlot.d.mts +5 -4
  39. package/LineChart/MarkPlot.d.ts +5 -4
  40. package/LineChart/MarkPlot.js +17 -8
  41. package/LineChart/MarkPlot.mjs +17 -8
  42. package/LineChart/useLineItemClickHandler.d.mts +25 -1
  43. package/LineChart/useLineItemClickHandler.d.ts +25 -1
  44. package/LineChart/useLineItemClickHandler.js +48 -1
  45. package/LineChart/useLineItemClickHandler.mjs +47 -1
  46. package/PieChart/PieArcPlot.d.mts +3 -2
  47. package/PieChart/PieArcPlot.d.ts +3 -2
  48. package/PieChart/PieArcPlot.js +16 -1
  49. package/PieChart/PieArcPlot.mjs +16 -1
  50. package/PieChart/PieChart.js +3 -1
  51. package/PieChart/PieChart.mjs +3 -1
  52. package/PieChart/PiePlot.js +1 -1
  53. package/PieChart/PiePlot.mjs +1 -1
  54. package/README.md +1 -11
  55. package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +1 -1
  56. package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +1 -1
  57. package/RadarChart/RadarChart.js +3 -1
  58. package/RadarChart/RadarChart.mjs +3 -1
  59. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +3 -1
  60. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +3 -1
  61. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +4 -1
  62. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +4 -1
  63. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.mts +5 -4
  64. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +5 -4
  65. package/RadarChart/RadarSeriesPlot/useRegisterRadarItemActivation.d.mts +15 -0
  66. package/RadarChart/RadarSeriesPlot/useRegisterRadarItemActivation.d.ts +15 -0
  67. package/RadarChart/RadarSeriesPlot/useRegisterRadarItemActivation.js +32 -0
  68. package/RadarChart/RadarSeriesPlot/useRegisterRadarItemActivation.mjs +26 -0
  69. package/RadarChart/useRadarChartProps.js +5 -1
  70. package/RadarChart/useRadarChartProps.mjs +5 -1
  71. package/ScatterChart/Scatter.d.mts +3 -2
  72. package/ScatterChart/Scatter.d.ts +3 -2
  73. package/ScatterChart/Scatter.js +10 -1
  74. package/ScatterChart/Scatter.mjs +10 -1
  75. package/ScatterChart/ScatterChart.js +1 -0
  76. package/ScatterChart/ScatterChart.mjs +1 -0
  77. package/ScatterChart/async/ScatterAsync.js +9 -0
  78. package/ScatterChart/async/ScatterAsync.mjs +9 -0
  79. package/SparkLineChart/SparkLineChart.js +2 -1
  80. package/SparkLineChart/SparkLineChart.mjs +2 -1
  81. package/Toolbar/ToolbarButton.js +1 -1
  82. package/Toolbar/ToolbarButton.mjs +1 -1
  83. package/hooks/useFocusedItem.d.mts +1 -1
  84. package/hooks/useFocusedItem.d.ts +1 -1
  85. package/hooks/useItemHighlightStateGetter.d.mts +1 -1
  86. package/hooks/useItemHighlightStateGetter.d.ts +1 -1
  87. package/index.js +1 -1
  88. package/index.mjs +1 -1
  89. package/internals/createCommonKeyboardFocusHandler.d.mts +2 -2
  90. package/internals/createCommonKeyboardFocusHandler.d.ts +2 -2
  91. package/internals/index.d.mts +1 -0
  92. package/internals/index.d.ts +1 -0
  93. package/internals/index.js +8 -0
  94. package/internals/index.mjs +1 -0
  95. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.mts +8 -1
  96. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +8 -1
  97. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +11 -3
  98. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.mjs +11 -3
  99. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +1 -0
  100. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +1 -0
  101. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemWithData.types.d.mts +12 -0
  102. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemWithData.types.d.ts +12 -0
  103. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemWithData.types.js +5 -0
  104. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemWithData.types.mjs +1 -0
  105. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.mts +1 -0
  106. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.ts +1 -0
  107. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.js +11 -0
  108. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.mjs +1 -0
  109. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +6 -0
  110. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +6 -0
  111. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisClickPayload.d.mts +21 -0
  112. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisClickPayload.d.ts +21 -0
  113. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisClickPayload.js +46 -0
  114. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisClickPayload.mjs +40 -0
  115. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +13 -31
  116. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.mjs +13 -31
  117. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.mts +2 -2
  118. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +2 -2
  119. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +11 -11
  120. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +11 -11
  121. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.mts +4 -4
  122. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +4 -4
  123. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +19 -0
  124. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +19 -0
  125. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.mts +5 -3
  126. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +5 -3
  127. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.js +15 -0
  128. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.mjs +14 -0
  129. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.types.d.mts +5 -2
  130. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.types.d.ts +5 -2
  131. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.d.mts +2 -1
  132. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.d.ts +2 -1
  133. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js +10 -2
  134. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.mjs +2 -1
  135. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/itemActivation.d.mts +13 -0
  136. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/itemActivation.d.ts +13 -0
  137. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/itemActivation.js +39 -0
  138. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/itemActivation.mjs +32 -0
  139. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +47 -7
  140. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +47 -7
  141. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.mts +3 -0
  142. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +3 -0
  143. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +3 -1
  144. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +2 -0
  145. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +39 -2
  146. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +39 -2
  147. package/internals/plugins/featurePlugins/useChartPolarAxis/getPolarAxisClickPayload.d.mts +27 -0
  148. package/internals/plugins/featurePlugins/useChartPolarAxis/getPolarAxisClickPayload.d.ts +27 -0
  149. package/internals/plugins/featurePlugins/useChartPolarAxis/getPolarAxisClickPayload.js +36 -0
  150. package/internals/plugins/featurePlugins/useChartPolarAxis/getPolarAxisClickPayload.mjs +30 -0
  151. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +19 -20
  152. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +19 -20
  153. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.mts +2 -2
  154. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +2 -2
  155. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.mts +1 -1
  156. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +1 -1
  157. package/internals/seriesSelectorOfType.d.mts +4 -4
  158. package/internals/seriesSelectorOfType.d.ts +4 -4
  159. package/internals/useRegisterItemActivation.d.mts +23 -0
  160. package/internals/useRegisterItemActivation.d.ts +23 -0
  161. package/internals/useRegisterItemActivation.js +53 -0
  162. package/internals/useRegisterItemActivation.mjs +46 -0
  163. package/models/axis.d.mts +1 -1
  164. package/models/axis.d.ts +1 -1
  165. package/models/events.d.mts +11 -0
  166. package/models/events.d.ts +11 -0
  167. package/models/events.js +5 -0
  168. package/models/events.mjs +1 -0
  169. package/models/index.d.mts +1 -0
  170. package/models/index.d.ts +1 -0
  171. package/moduleAugmentation/barChartBatchRendererOnItemClick.d.mts +3 -4
  172. package/moduleAugmentation/barChartBatchRendererOnItemClick.d.ts +3 -4
  173. package/moduleAugmentation/keyboardActivation.d.mts +7 -0
  174. package/moduleAugmentation/keyboardActivation.d.ts +7 -0
  175. package/moduleAugmentation/keyboardActivation.js +8 -0
  176. package/moduleAugmentation/keyboardActivation.mjs +2 -0
  177. package/package.json +18 -4
@@ -137,7 +137,9 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes /* remove-proptypes *
137
137
  /**
138
138
  * Options to enable features planned for the next major.
139
139
  */
140
- experimentalFeatures: _propTypes.default.object,
140
+ experimentalFeatures: _propTypes.default.shape({
141
+ keyboardActivation: _propTypes.default.bool
142
+ }),
141
143
  /**
142
144
  * Option to display a cartesian grid in the background.
143
145
  */
@@ -291,7 +293,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes /* remove-proptypes *
291
293
  onHighlightedAxisChange: _propTypes.default.func,
292
294
  /**
293
295
  * Callback fired when a bar item is clicked.
294
- * @param {MouseEvent | React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
296
+ * @param {ChartsActivationEvent | ChartsActivationEvent<SVGElement>} event The event source of the callback.
295
297
  * It is a native MouseEvent for `svg-batch` renderer and a React MouseEvent for `svg-single` renderer.
296
298
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
297
299
  */
@@ -130,7 +130,9 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes /* remove-proptypes *
130
130
  /**
131
131
  * Options to enable features planned for the next major.
132
132
  */
133
- experimentalFeatures: PropTypes.object,
133
+ experimentalFeatures: PropTypes.shape({
134
+ keyboardActivation: PropTypes.bool
135
+ }),
134
136
  /**
135
137
  * Option to display a cartesian grid in the background.
136
138
  */
@@ -284,7 +286,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes /* remove-proptypes *
284
286
  onHighlightedAxisChange: PropTypes.func,
285
287
  /**
286
288
  * Callback fired when a bar item is clicked.
287
- * @param {MouseEvent | React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
289
+ * @param {ChartsActivationEvent | ChartsActivationEvent<SVGElement>} event The event source of the callback.
288
290
  * It is a native MouseEvent for `svg-batch` renderer and a React MouseEvent for `svg-single` renderer.
289
291
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
290
292
  */
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { BarElementSlotProps, BarElementSlots } from "./BarElement.mjs";
3
- import type { BarItemIdentifier } from "../models/index.mjs";
3
+ import type { BarItemIdentifier, ChartsActivationEvent } from "../models/index.mjs";
4
4
  import type { BarLabelSlotProps, BarLabelSlots } from "./BarLabel/BarLabelItem.mjs";
5
5
  import type { RendererType } from "../ScatterChart/index.mjs";
6
6
  export interface BarPlotSlots extends BarElementSlots, BarLabelSlots {}
@@ -17,10 +17,10 @@ export interface BarPlotProps {
17
17
  skipAnimation?: boolean;
18
18
  /**
19
19
  * Callback fired when a bar item is clicked.
20
- * @param {MouseEvent} event The event source of the callback.
20
+ * @param {ChartsActivationEvent} event The event source of the callback.
21
21
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
22
22
  */
23
- onItemClick?(event: MouseEvent, barItemIdentifier: BarItemIdentifier): void;
23
+ onItemClick?(event: ChartsActivationEvent, barItemIdentifier: BarItemIdentifier): void;
24
24
  /**
25
25
  * Defines the border radius of the bar element.
26
26
  */
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { BarElementSlotProps, BarElementSlots } from "./BarElement.js";
3
- import type { BarItemIdentifier } from "../models/index.js";
3
+ import type { BarItemIdentifier, ChartsActivationEvent } from "../models/index.js";
4
4
  import type { BarLabelSlotProps, BarLabelSlots } from "./BarLabel/BarLabelItem.js";
5
5
  import type { RendererType } from "../ScatterChart/index.js";
6
6
  export interface BarPlotSlots extends BarElementSlots, BarLabelSlots {}
@@ -17,10 +17,10 @@ export interface BarPlotProps {
17
17
  skipAnimation?: boolean;
18
18
  /**
19
19
  * Callback fired when a bar item is clicked.
20
- * @param {MouseEvent} event The event source of the callback.
20
+ * @param {ChartsActivationEvent} event The event source of the callback.
21
21
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
22
22
  */
23
- onItemClick?(event: MouseEvent, barItemIdentifier: BarItemIdentifier): void;
23
+ onItemClick?(event: ChartsActivationEvent, barItemIdentifier: BarItemIdentifier): void;
24
24
  /**
25
25
  * Defines the border radius of the bar element.
26
26
  */
@@ -102,7 +102,7 @@ process.env.NODE_ENV !== "production" ? BarPlot.propTypes /* remove-proptypes */
102
102
  className: _propTypes.default.string,
103
103
  /**
104
104
  * Callback fired when a bar item is clicked.
105
- * @param {MouseEvent | React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
105
+ * @param {ChartsActivationEvent | ChartsActivationEvent<SVGElement>} event The event source of the callback.
106
106
  * It is a native MouseEvent for `svg-batch` renderer and a React MouseEvent for `svg-single` renderer.
107
107
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
108
108
  */
@@ -95,7 +95,7 @@ process.env.NODE_ENV !== "production" ? BarPlot.propTypes /* remove-proptypes */
95
95
  className: PropTypes.string,
96
96
  /**
97
97
  * Callback fired when a bar item is clicked.
98
- * @param {MouseEvent | React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
98
+ * @param {ChartsActivationEvent | ChartsActivationEvent<SVGElement>} event The event source of the callback.
99
99
  * It is a native MouseEvent for `svg-batch` renderer and a React MouseEvent for `svg-single` renderer.
100
100
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
101
101
  */
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import type { BarItemIdentifier } from "../../models/index.mjs";
2
+ import type { BarItemIdentifier, ChartsActivationEvent } from "../../models/index.mjs";
3
3
  import type { IndividualBarPlotProps } from "../IndividualBarPlot.mjs";
4
4
  interface BatchBarPlotProps extends Omit<IndividualBarPlotProps, 'onItemClick'> {
5
- onItemClick?: (event: MouseEvent, barItemIdentifier: BarItemIdentifier) => void;
5
+ onItemClick?: (event: ChartsActivationEvent, barItemIdentifier: BarItemIdentifier) => void;
6
6
  }
7
7
  export declare function BatchBarPlot({
8
8
  completedData,
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import type { BarItemIdentifier } from "../../models/index.js";
2
+ import type { BarItemIdentifier, ChartsActivationEvent } from "../../models/index.js";
3
3
  import type { IndividualBarPlotProps } from "../IndividualBarPlot.js";
4
4
  interface BatchBarPlotProps extends Omit<IndividualBarPlotProps, 'onItemClick'> {
5
- onItemClick?: (event: MouseEvent, barItemIdentifier: BarItemIdentifier) => void;
5
+ onItemClick?: (event: ChartsActivationEvent, barItemIdentifier: BarItemIdentifier) => void;
6
6
  }
7
7
  export declare function BatchBarPlot({
8
8
  completedData,
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import type { BarPlotSlotProps, BarPlotSlots } from "./BarPlot.mjs";
3
- import type { BarItemIdentifier } from "../models/index.mjs";
3
+ import type { BarItemIdentifier, ChartsActivationEvent } from "../models/index.mjs";
4
4
  import type { MaskData, ProcessedBarSeriesData } from "./types.mjs";
5
5
  export interface IndividualBarPlotProps {
6
6
  completedData: ProcessedBarSeriesData[];
7
7
  masksData: MaskData[];
8
8
  borderRadius?: number;
9
9
  skipAnimation?: boolean;
10
- onItemClick?: (event: MouseEvent, barItemIdentifier: BarItemIdentifier) => void;
10
+ onItemClick?: (event: ChartsActivationEvent, barItemIdentifier: BarItemIdentifier) => void;
11
11
  slotProps?: BarPlotSlotProps;
12
12
  slots?: BarPlotSlots;
13
13
  }
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import type { BarPlotSlotProps, BarPlotSlots } from "./BarPlot.js";
3
- import type { BarItemIdentifier } from "../models/index.js";
3
+ import type { BarItemIdentifier, ChartsActivationEvent } from "../models/index.js";
4
4
  import type { MaskData, ProcessedBarSeriesData } from "./types.js";
5
5
  export interface IndividualBarPlotProps {
6
6
  completedData: ProcessedBarSeriesData[];
7
7
  masksData: MaskData[];
8
8
  borderRadius?: number;
9
9
  skipAnimation?: boolean;
10
- onItemClick?: (event: MouseEvent, barItemIdentifier: BarItemIdentifier) => void;
10
+ onItemClick?: (event: ChartsActivationEvent, barItemIdentifier: BarItemIdentifier) => void;
11
11
  slotProps?: BarPlotSlotProps;
12
12
  slots?: BarPlotSlots;
13
13
  }
@@ -2,16 +2,16 @@ import type { AllSeriesType } from "../../../models/seriesType/index.mjs";
2
2
  export declare function getSeriesWithDefaultValues(seriesData: AllSeriesType<'bar'>, seriesIndex: number, colors: readonly string[]): {
3
3
  id: string;
4
4
  color: string;
5
- data?: ReadonlyArray<import("../../../index.mjs").BarValueType | null>;
5
+ data?: ReadonlyArray<import("@mui/x-charts/models").BarValueType | null>;
6
6
  dataKey?: string;
7
- valueGetter?: (item: import("../../../internals/index.mjs").DatasetElementType<unknown>) => import("../../../index.mjs").BarValueType | null;
7
+ valueGetter?: (item: import("../../../internals/index.mjs").DatasetElementType<unknown>) => import("@mui/x-charts/models").BarValueType | null;
8
8
  label?: string | ((location: 'tooltip' | 'legend') => string);
9
9
  layout?: 'horizontal' | 'vertical';
10
10
  minBarSize?: number;
11
11
  barLabel?: 'value' | ((item: import("@mui/x-charts/BarChart").BarItem, context: import("@mui/x-charts/BarChart").BarLabelContext) => string | null | undefined);
12
12
  type: 'bar';
13
13
  barLabelPlacement?: 'center' | 'outside';
14
- stackOffset?: import("../../../index.mjs").StackOffsetType;
14
+ stackOffset?: import("@mui/x-charts/models").StackOffsetType;
15
15
  colorGetter?: ((data: import("../../../internals/index.mjs").ColorCallbackValue<number | null>) => string) | undefined;
16
16
  valueFormatter?: import("../../../internals/index.mjs").SeriesValueFormatter<number | null> | undefined;
17
17
  highlightScope?: import("../../../internals/index.mjs").CommonHighlightScope | undefined;
@@ -19,5 +19,5 @@ export declare function getSeriesWithDefaultValues(seriesData: AllSeriesType<'ba
19
19
  xAxisId?: import("../../../internals/index.mjs").AxisId;
20
20
  yAxisId?: import("../../../internals/index.mjs").AxisId;
21
21
  stack?: string;
22
- stackOrder?: import("../../../index.mjs").StackOrderType;
22
+ stackOrder?: import("@mui/x-charts/models").StackOrderType;
23
23
  };
@@ -2,16 +2,16 @@ import type { AllSeriesType } from "../../../models/seriesType/index.js";
2
2
  export declare function getSeriesWithDefaultValues(seriesData: AllSeriesType<'bar'>, seriesIndex: number, colors: readonly string[]): {
3
3
  id: string;
4
4
  color: string;
5
- data?: ReadonlyArray<import("../../../index.js").BarValueType | null>;
5
+ data?: ReadonlyArray<import("@mui/x-charts/models").BarValueType | null>;
6
6
  dataKey?: string;
7
- valueGetter?: (item: import("../../../internals/index.js").DatasetElementType<unknown>) => import("../../../index.js").BarValueType | null;
7
+ valueGetter?: (item: import("../../../internals/index.js").DatasetElementType<unknown>) => import("@mui/x-charts/models").BarValueType | null;
8
8
  label?: string | ((location: 'tooltip' | 'legend') => string);
9
9
  layout?: 'horizontal' | 'vertical';
10
10
  minBarSize?: number;
11
11
  barLabel?: 'value' | ((item: import("@mui/x-charts/BarChart").BarItem, context: import("@mui/x-charts/BarChart").BarLabelContext) => string | null | undefined);
12
12
  type: 'bar';
13
13
  barLabelPlacement?: 'center' | 'outside';
14
- stackOffset?: import("../../../index.js").StackOffsetType;
14
+ stackOffset?: import("@mui/x-charts/models").StackOffsetType;
15
15
  colorGetter?: ((data: import("../../../internals/index.js").ColorCallbackValue<number | null>) => string) | undefined;
16
16
  valueFormatter?: import("../../../internals/index.js").SeriesValueFormatter<number | null> | undefined;
17
17
  highlightScope?: import("../../../internals/index.js").CommonHighlightScope | undefined;
@@ -19,5 +19,5 @@ export declare function getSeriesWithDefaultValues(seriesData: AllSeriesType<'ba
19
19
  xAxisId?: import("../../../internals/index.js").AxisId;
20
20
  yAxisId?: import("../../../internals/index.js").AxisId;
21
21
  stack?: string;
22
- stackOrder?: import("../../../index.js").StackOrderType;
22
+ stackOrder?: import("@mui/x-charts/models").StackOrderType;
23
23
  };
@@ -1,6 +1,7 @@
1
1
  import type { BarItemIdentifier } from "../models/seriesType/index.mjs";
2
+ import type { ChartsActivationEvent } from "../models/events.mjs";
2
3
  /**
3
4
  * Hook that registers pointer event handlers for chart item clicking.
4
5
  * @param onItemClick Callback for item click events.
5
6
  */
6
- export declare function useRegisterItemClickHandlers(onItemClick: ((event: MouseEvent, barItemIdentifier: BarItemIdentifier) => void) | undefined): void;
7
+ export declare function useRegisterItemClickHandlers(onItemClick: ((event: ChartsActivationEvent, barItemIdentifier: BarItemIdentifier) => void) | undefined): void;
@@ -1,6 +1,7 @@
1
1
  import type { BarItemIdentifier } from "../models/seriesType/index.js";
2
+ import type { ChartsActivationEvent } from "../models/events.js";
2
3
  /**
3
4
  * Hook that registers pointer event handlers for chart item clicking.
4
5
  * @param onItemClick Callback for item click events.
5
6
  */
6
- export declare function useRegisterItemClickHandlers(onItemClick: ((event: MouseEvent, barItemIdentifier: BarItemIdentifier) => void) | undefined): void;
7
+ export declare function useRegisterItemClickHandlers(onItemClick: ((event: ChartsActivationEvent, barItemIdentifier: BarItemIdentifier) => void) | undefined): void;
@@ -12,6 +12,7 @@ var _ChartsProvider = require("../context/ChartsProvider");
12
12
  var _getChartPoint = require("../internals/getChartPoint");
13
13
  var _useStore = require("../internals/store/useStore");
14
14
  var _useChartCartesianAxisPosition = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors");
15
+ var _useRegisterItemActivation = require("../internals/useRegisterItemActivation");
15
16
  /**
16
17
  * Hook that registers pointer event handlers for chart item clicking.
17
18
  * @param onItemClick Callback for item click events.
@@ -22,6 +23,13 @@ function useRegisterItemClickHandlers(onItemClick) {
22
23
  } = (0, _ChartsProvider.useChartsContext)();
23
24
  const chartsLayerContainerRef = (0, _useChartsLayerContainerRef.useChartsLayerContainerRef)();
24
25
  const store = (0, _useStore.useStore)();
26
+ (0, _useRegisterItemActivation.useRegisterItemActivation)({
27
+ type: 'bar'
28
+ }, onItemClick && ((event, item) => onItemClick(event, {
29
+ type: 'bar',
30
+ seriesId: item.seriesId,
31
+ dataIndex: item.dataIndex
32
+ })));
25
33
  React.useEffect(() => {
26
34
  const element = chartsLayerContainerRef.current;
27
35
  if (!element || !onItemClick) {
@@ -6,7 +6,7 @@ import { useChartsContext } from "../context/ChartsProvider/index.mjs";
6
6
  import { getChartPoint } from "../internals/getChartPoint.mjs";
7
7
  import { useStore } from "../internals/store/useStore.mjs";
8
8
  import { selectorBarItemAtPosition } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.mjs";
9
-
9
+ import { useRegisterItemActivation } from "../internals/useRegisterItemActivation.mjs";
10
10
  /**
11
11
  * Hook that registers pointer event handlers for chart item clicking.
12
12
  * @param onItemClick Callback for item click events.
@@ -17,6 +17,13 @@ export function useRegisterItemClickHandlers(onItemClick) {
17
17
  } = useChartsContext();
18
18
  const chartsLayerContainerRef = useChartsLayerContainerRef();
19
19
  const store = useStore();
20
+ useRegisterItemActivation({
21
+ type: 'bar'
22
+ }, onItemClick && ((event, item) => onItemClick(event, {
23
+ type: 'bar',
24
+ seriesId: item.seriesId,
25
+ dataIndex: item.dataIndex
26
+ })));
20
27
  React.useEffect(() => {
21
28
  const element = chartsLayerContainerRef.current;
22
29
  if (!element || !onItemClick) {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,123 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.11.0
4
+
5
+ _Aug 6, 2026_
6
+
7
+ We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
8
+
9
+ - ✨ Add `addItems()` and `getItemSelection()` API methods to Tree View
10
+
11
+ Special thanks go out to these community members for their valuable contributions:
12
+ @12joan, @Anexus5919, @kevincorizi-sbt, @mixelburg, @mustafajw07, @strazto
13
+
14
+ The following team members contributed to this release:
15
+ @flaviendelangle, @hasdfa, @JCQuintas, @LukasTy, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes
16
+
17
+ ### Data Grid
18
+
19
+ #### `@mui/x-data-grid@9.11.0`
20
+
21
+ - [DataGrid] Fix `updateRows` stripping class prototypes from rows in datasource mode (#22288) @mixelburg
22
+ - [DataGrid] Do not re-fetch data when an `Activity` becomes visible (#22603) @12joan
23
+ - [DataGrid] Fix toolbar button stealing focus when a sibling's disabled state changes (#23204) @MBilalShafi
24
+
25
+ #### `@mui/x-data-grid-pro@9.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
26
+
27
+ Same changes as in `@mui/x-data-grid@9.11.0`.
28
+
29
+ #### `@mui/x-data-grid-premium@9.11.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
30
+
31
+ Same changes as in `@mui/x-data-grid-pro@9.11.0`.
32
+
33
+ ### Date and Time Pickers
34
+
35
+ #### `@mui/x-date-pickers@9.11.0`
36
+
37
+ - [pickers] Fix day shift when editing dates predating timezone standardization (#23296) @JCQuintas
38
+
39
+ #### `@mui/x-date-pickers-pro@9.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
40
+
41
+ Same changes as in `@mui/x-date-pickers@9.11.0`, plus:
42
+
43
+ - [DateRangePicker] Fix disabled filler cells showing the range highlight (#23293) @JCQuintas
44
+
45
+ ### Charts
46
+
47
+ #### `@mui/x-charts@9.11.0`
48
+
49
+ - [charts] Activate the focused item with `Enter`/`Space` (#23218) @JCQuintas
50
+ - [charts] Extract the axis click payload builders (#23215) @JCQuintas
51
+ - [charts] Fix `GestureManager` event listener leak on chart unmount (#23283) @kevincorizi-sbt
52
+ - [charts] Fix `slotProps.legend.position` and `direction` in `RadarChart` (#23254) @JCQuintas
53
+ - [charts] Fix axis clicks being discarded on slight pointer movement (#23244) @noraleonte
54
+ - [charts] Fix image export of charts sized by their parent element (#23255) @JCQuintas
55
+ - [charts] Forward `experimentalFeatures` on `RadarChart` and `Heatmap` (#23216) @JCQuintas
56
+ - [charts] Hide focus indicator when the chart loses focus (#23213) @JCQuintas
57
+
58
+ #### `@mui/x-charts-pro@9.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
59
+
60
+ Same changes as in `@mui/x-charts@9.11.0`.
61
+
62
+ #### `@mui/x-charts-premium@9.11.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
63
+
64
+ Same changes as in `@mui/x-charts-pro@9.11.0`, plus:
65
+
66
+ - [charts-premium] Fix `RangeBar` type override (#23217) @JCQuintas
67
+
68
+ ### Tree View
69
+
70
+ #### `@mui/x-tree-view@9.11.0`
71
+
72
+ - [tree view] Add `addItems()` API method (#23159) @JCQuintas
73
+ - [tree view] Add `getItemSelection` API method (#23257) @noraleonte
74
+ - [tree view] Ignore `keepExistingSelection` when `multiSelect` is `false` (#23242) @JCQuintas
75
+ - [tree view] Prevent duplicate ids in multi-select arrow navigation (#23006) @Anexus5919
76
+
77
+ #### `@mui/x-tree-view-pro@9.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
78
+
79
+ Same changes as in `@mui/x-tree-view@9.11.0`, plus:
80
+
81
+ - [tree view] Discard superseded lazy-loading responses (#23005) @Anexus5919
82
+
83
+ ### Scheduler
84
+
85
+ #### `@mui/x-scheduler@9.0.0-beta.8`
86
+
87
+ - [scheduler] Add `localeText` prop to standalone views (#23210) @rita-codes
88
+ - [scheduler] Finetune touch experience for time grid events and introduce editing drawer (#22624) @noraleonte
89
+ - [scheduler] Introduce the edit dialog form context & lifecycle contract (#23284) @rita-codes
90
+ - [scheduler] Refactor edit dialog General tab into section components (#23206) @rita-codes
91
+ - [scheduler] Replace copied Base UI internals with `@base-ui/react/internals` imports (#21972) @flaviendelangle
92
+ - [scheduler] Hide resource picker when no resources are provided (#23290) @mustafajw07
93
+ - [scheduler] Support multi-resource occurrences in `EventTimeline` (#23240) @mustafajw07
94
+
95
+ #### `@mui/x-scheduler-premium@9.0.0-beta.8` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
96
+
97
+ Same changes as in `@mui/x-scheduler@9.0.0-beta.8`.
98
+
99
+ ### Codemod
100
+
101
+ #### `@mui/x-codemod@9.11.0`
102
+
103
+ - [codemod] Remove unused `@babel/core` and `@babel/traverse` dependencies (#23245) @LukasTy
104
+
105
+ ### Docs
106
+
107
+ - [docs] Add recipe for adding new rows from clipboard copy (#22913) @michelengelen
108
+ - [docs] Clarify the package versions in v8 upgrade guides (#22376) @strazto
109
+ - [docs] Replace README peer dependency lists with an npm install command (#23256) @LukasTy
110
+
111
+ ### Core
112
+
113
+ - [code-infra] Align action pin version comments (#23238) @LukasTy
114
+
115
+ ### Miscellaneous
116
+
117
+ - [chat] Drop the undeclared `@mui/icons-material` dependency (#23252) @LukasTy
118
+ - [chat] Sanitize image part URLs and share the URL allow-list with markdown (#23058) @hasdfa
119
+ - [test] Type the `PickersTextField` test stub instead of `as any` (#23194) @LukasTy
120
+
3
121
  ## 9.10.1
4
122
 
5
123
  _Jul 23, 2026_
@@ -108,7 +108,9 @@ process.env.NODE_ENV !== "production" ? ChartsContainer.propTypes /* remove-prop
108
108
  /**
109
109
  * Options to enable features planned for the next major.
110
110
  */
111
- experimentalFeatures: _propTypes.default.any,
111
+ experimentalFeatures: _propTypes.default.shape({
112
+ keyboardActivation: _propTypes.default.bool
113
+ }),
112
114
  /**
113
115
  * The height of the chart in px. If not defined, it takes the height of the parent element.
114
116
  */
@@ -248,7 +250,7 @@ process.env.NODE_ENV !== "production" ? ChartsContainer.propTypes /* remove-prop
248
250
  /**
249
251
  * Callback fired when clicking close to an item.
250
252
  * This is only available for scatter plot for now.
251
- * @param {MouseEvent} event Mouse event caught at the svg level
253
+ * @param {ChartsActivationEvent} event Event caught at the svg level
252
254
  * @param {ScatterItemIdentifier} scatterItemIdentifier Identify which item got clicked
253
255
  */
254
256
  onItemClick: _propTypes.default.func,
@@ -101,7 +101,9 @@ process.env.NODE_ENV !== "production" ? ChartsContainer.propTypes /* remove-prop
101
101
  /**
102
102
  * Options to enable features planned for the next major.
103
103
  */
104
- experimentalFeatures: PropTypes.any,
104
+ experimentalFeatures: PropTypes.shape({
105
+ keyboardActivation: PropTypes.bool
106
+ }),
105
107
  /**
106
108
  * The height of the chart in px. If not defined, it takes the height of the parent element.
107
109
  */
@@ -241,7 +243,7 @@ process.env.NODE_ENV !== "production" ? ChartsContainer.propTypes /* remove-prop
241
243
  /**
242
244
  * Callback fired when clicking close to an item.
243
245
  * This is only available for scatter plot for now.
244
- * @param {MouseEvent} event Mouse event caught at the svg level
246
+ * @param {ChartsActivationEvent} event Event caught at the svg level
245
247
  * @param {ScatterItemIdentifier} scatterItemIdentifier Identify which item got clicked
246
248
  */
247
249
  onItemClick: PropTypes.func,
@@ -83,7 +83,9 @@ process.env.NODE_ENV !== "production" ? ChartsDataProvider.propTypes /* remove-p
83
83
  /**
84
84
  * Options to enable features planned for the next major.
85
85
  */
86
- experimentalFeatures: _propTypes.default.any,
86
+ experimentalFeatures: _propTypes.default.shape({
87
+ keyboardActivation: _propTypes.default.bool
88
+ }),
87
89
  /**
88
90
  * The height of the chart in px. If not defined, it takes the height of the parent element.
89
91
  */
@@ -76,7 +76,9 @@ process.env.NODE_ENV !== "production" ? ChartsDataProvider.propTypes /* remove-p
76
76
  /**
77
77
  * Options to enable features planned for the next major.
78
78
  */
79
- experimentalFeatures: PropTypes.any,
79
+ experimentalFeatures: PropTypes.shape({
80
+ keyboardActivation: PropTypes.bool
81
+ }),
80
82
  /**
81
83
  * The height of the chart in px. If not defined, it takes the height of the parent element.
82
84
  */
@@ -70,7 +70,9 @@ process.env.NODE_ENV !== "production" ? ChartsRadialDataProvider.propTypes /* re
70
70
  /**
71
71
  * Options to enable features planned for the next major.
72
72
  */
73
- experimentalFeatures: _propTypes.default.any,
73
+ experimentalFeatures: _propTypes.default.shape({
74
+ keyboardActivation: _propTypes.default.bool
75
+ }),
74
76
  /**
75
77
  * The height of the chart in px. If not defined, it takes the height of the parent element.
76
78
  */
@@ -63,7 +63,9 @@ process.env.NODE_ENV !== "production" ? ChartsRadialDataProvider.propTypes /* re
63
63
  /**
64
64
  * Options to enable features planned for the next major.
65
65
  */
66
- experimentalFeatures: PropTypes.any,
66
+ experimentalFeatures: PropTypes.shape({
67
+ keyboardActivation: PropTypes.bool
68
+ }),
67
69
  /**
68
70
  * The height of the chart in px. If not defined, it takes the height of the parent element.
69
71
  */