@mui/x-charts 9.0.0-alpha.2 → 9.0.0-alpha.3

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 (329) hide show
  1. package/BarChart/AnimatedBarElement.d.mts +1 -1
  2. package/BarChart/AnimatedBarElement.d.ts +1 -1
  3. package/BarChart/BarChart.js +5 -2
  4. package/BarChart/BarChart.mjs +5 -2
  5. package/BarChart/BarElement.d.mts +1 -1
  6. package/BarChart/BarElement.d.ts +1 -1
  7. package/BarChart/BarElement.js +8 -7
  8. package/BarChart/BarElement.mjs +8 -7
  9. package/BarChart/BarLabel/BarLabel.js +4 -0
  10. package/BarChart/BarLabel/BarLabel.mjs +4 -0
  11. package/BarChart/BarLabel/BarLabel.types.d.mts +2 -2
  12. package/BarChart/BarLabel/BarLabel.types.d.ts +2 -2
  13. package/BarChart/BarLabel/BarLabelItem.js +8 -7
  14. package/BarChart/BarLabel/BarLabelItem.mjs +8 -7
  15. package/BarChart/BarLabel/barLabelClasses.d.mts +15 -0
  16. package/BarChart/BarLabel/barLabelClasses.d.ts +15 -0
  17. package/BarChart/BarLabel/barLabelClasses.js +19 -0
  18. package/BarChart/BarLabel/barLabelClasses.mjs +20 -0
  19. package/BarChart/BarPlot.js +1 -2
  20. package/BarChart/BarPlot.mjs +2 -3
  21. package/BarChart/barClasses.d.mts +21 -1
  22. package/BarChart/barClasses.d.ts +21 -1
  23. package/BarChart/barClasses.js +9 -3
  24. package/BarChart/barClasses.mjs +9 -3
  25. package/BarChart/barElementClasses.d.mts +17 -10
  26. package/BarChart/barElementClasses.d.ts +17 -10
  27. package/BarChart/barElementClasses.js +19 -0
  28. package/BarChart/barElementClasses.mjs +20 -0
  29. package/BarChart/index.d.mts +1 -1
  30. package/BarChart/index.d.ts +1 -1
  31. package/BarChart/index.js +1 -8
  32. package/BarChart/index.mjs +1 -1
  33. package/CHANGELOG.md +123 -1
  34. package/ChartContainer/ChartContainer.d.mts +1 -1
  35. package/ChartContainer/ChartContainer.d.ts +1 -1
  36. package/ChartContainer/useChartContainerProps.d.mts +2 -2
  37. package/ChartContainer/useChartContainerProps.d.ts +2 -2
  38. package/ChartDataProvider/ChartDataProvider.d.mts +1 -1
  39. package/ChartDataProvider/ChartDataProvider.d.ts +1 -1
  40. package/ChartDataProvider/useChartDataProviderProps.d.mts +2 -2
  41. package/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
  42. package/ChartsContainer/ChartsContainer.d.mts +1 -1
  43. package/ChartsContainer/ChartsContainer.d.ts +1 -1
  44. package/ChartsContainer/ChartsContainer.js +5 -2
  45. package/ChartsContainer/ChartsContainer.mjs +5 -2
  46. package/ChartsContainer/useChartsContainerProps.d.mts +3 -3
  47. package/ChartsContainer/useChartsContainerProps.d.ts +3 -3
  48. package/ChartsContainer/useChartsContainerProps.js +3 -3
  49. package/ChartsContainer/useChartsContainerProps.mjs +3 -3
  50. package/ChartsDataProvider/ChartsDataProvider.d.mts +2 -2
  51. package/ChartsDataProvider/ChartsDataProvider.d.ts +2 -2
  52. package/ChartsDataProvider/useChartsDataProviderProps.d.mts +2 -2
  53. package/ChartsDataProvider/useChartsDataProviderProps.d.ts +2 -2
  54. package/ChartsLabel/ChartsLabelMark.d.mts +8 -1
  55. package/ChartsLabel/ChartsLabelMark.d.ts +8 -1
  56. package/ChartsLabel/ChartsLabelMark.js +29 -3
  57. package/ChartsLabel/ChartsLabelMark.mjs +29 -3
  58. package/ChartsLabel/labelMarkClasses.d.mts +2 -0
  59. package/ChartsLabel/labelMarkClasses.d.ts +2 -0
  60. package/ChartsLabel/labelMarkClasses.js +1 -1
  61. package/ChartsLabel/labelMarkClasses.mjs +1 -1
  62. package/ChartsLegend/ChartsLegend.js +4 -2
  63. package/ChartsLegend/ChartsLegend.mjs +4 -2
  64. package/ChartsLegend/legendContext.types.d.mts +1 -0
  65. package/ChartsLegend/legendContext.types.d.ts +1 -0
  66. package/ChartsTooltip/ChartsAxisTooltipContent.js +3 -1
  67. package/ChartsTooltip/ChartsAxisTooltipContent.mjs +3 -1
  68. package/ChartsTooltip/ChartsItemTooltipContent.js +6 -2
  69. package/ChartsTooltip/ChartsItemTooltipContent.mjs +6 -2
  70. package/ChartsTooltip/ChartsTooltipContainer.js +7 -5
  71. package/ChartsTooltip/ChartsTooltipContainer.mjs +6 -4
  72. package/ChartsTooltip/ChartsTooltipTable.d.mts +1 -1
  73. package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  74. package/ChartsTooltip/useAxesTooltip.d.mts +1 -0
  75. package/ChartsTooltip/useAxesTooltip.d.ts +1 -0
  76. package/ChartsTooltip/useAxesTooltip.js +6 -4
  77. package/ChartsTooltip/useAxesTooltip.mjs +6 -4
  78. package/ChartsTooltip/useItemTooltip.d.mts +5 -3
  79. package/ChartsTooltip/useItemTooltip.d.ts +5 -3
  80. package/ChartsXAxis/useAxisTicksProps.d.mts +286 -286
  81. package/ChartsXAxis/useAxisTicksProps.d.ts +286 -286
  82. package/ChartsYAxis/useAxisTicksProps.d.mts +286 -286
  83. package/ChartsYAxis/useAxisTicksProps.d.ts +286 -286
  84. package/LineChart/AreaElement.d.mts +12 -0
  85. package/LineChart/AreaElement.d.ts +12 -0
  86. package/LineChart/AreaElement.js +28 -9
  87. package/LineChart/AreaElement.mjs +30 -9
  88. package/LineChart/AreaPlot.js +10 -4
  89. package/LineChart/AreaPlot.mjs +11 -5
  90. package/LineChart/CircleMarkElement.js +9 -2
  91. package/LineChart/CircleMarkElement.mjs +10 -3
  92. package/LineChart/LineChart.js +5 -2
  93. package/LineChart/LineChart.mjs +5 -2
  94. package/LineChart/LineElement.d.mts +12 -0
  95. package/LineChart/LineElement.d.ts +12 -0
  96. package/LineChart/LineElement.js +28 -9
  97. package/LineChart/LineElement.mjs +30 -9
  98. package/LineChart/LineHighlightElement.d.mts +12 -0
  99. package/LineChart/LineHighlightElement.d.ts +12 -0
  100. package/LineChart/LineHighlightElement.js +22 -3
  101. package/LineChart/LineHighlightElement.mjs +24 -3
  102. package/LineChart/LinePlot.js +11 -5
  103. package/LineChart/LinePlot.mjs +12 -6
  104. package/LineChart/MarkElement.js +9 -2
  105. package/LineChart/MarkElement.mjs +10 -3
  106. package/LineChart/MarkPlot.js +19 -9
  107. package/LineChart/MarkPlot.mjs +20 -10
  108. package/LineChart/index.d.mts +3 -1
  109. package/LineChart/index.d.ts +3 -1
  110. package/LineChart/index.js +10 -2
  111. package/LineChart/index.mjs +2 -1
  112. package/LineChart/lineClasses.d.mts +34 -0
  113. package/LineChart/lineClasses.d.ts +34 -0
  114. package/LineChart/lineClasses.js +32 -0
  115. package/LineChart/lineClasses.mjs +23 -0
  116. package/LineChart/markElementClasses.d.mts +17 -8
  117. package/LineChart/markElementClasses.d.ts +17 -8
  118. package/LineChart/markElementClasses.js +19 -0
  119. package/LineChart/markElementClasses.mjs +20 -0
  120. package/LineChart/seriesConfig/legend.js +1 -0
  121. package/LineChart/seriesConfig/legend.mjs +1 -0
  122. package/LineChart/seriesConfig/seriesProcessor.js +1 -1
  123. package/LineChart/seriesConfig/seriesProcessor.mjs +1 -1
  124. package/LineChart/seriesConfig/tooltip.js +2 -1
  125. package/LineChart/seriesConfig/tooltip.mjs +2 -1
  126. package/PieChart/FocusedPieArc.js +8 -6
  127. package/PieChart/FocusedPieArc.mjs +8 -6
  128. package/PieChart/PieArc.d.mts +14 -11
  129. package/PieChart/PieArc.d.ts +14 -11
  130. package/PieChart/PieArc.js +22 -4
  131. package/PieChart/PieArc.mjs +24 -4
  132. package/PieChart/PieArcLabel.d.mts +16 -2
  133. package/PieChart/PieArcLabel.d.ts +16 -2
  134. package/PieChart/PieArcLabel.js +26 -5
  135. package/PieChart/PieArcLabel.mjs +28 -5
  136. package/PieChart/PieArcLabelPlot.js +6 -1
  137. package/PieChart/PieArcLabelPlot.mjs +6 -1
  138. package/PieChart/PieArcPlot.js +6 -1
  139. package/PieChart/PieArcPlot.mjs +6 -1
  140. package/PieChart/PieChart.js +5 -2
  141. package/PieChart/PieChart.mjs +5 -2
  142. package/PieChart/PiePlot.d.mts +1 -0
  143. package/PieChart/PiePlot.d.ts +1 -0
  144. package/PieChart/PiePlot.js +4 -1
  145. package/PieChart/PiePlot.mjs +4 -1
  146. package/PieChart/dataTransform/useTransformData.js +6 -8
  147. package/PieChart/dataTransform/useTransformData.mjs +6 -8
  148. package/PieChart/pieClasses.d.mts +22 -1
  149. package/PieChart/pieClasses.d.ts +22 -1
  150. package/PieChart/pieClasses.js +10 -3
  151. package/PieChart/pieClasses.mjs +10 -3
  152. package/RadarChart/RadarChart.js +5 -2
  153. package/RadarChart/RadarChart.mjs +5 -2
  154. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.mts +3 -3
  155. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +3 -3
  156. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +7 -14
  157. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +7 -14
  158. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.mts +2 -2
  159. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +2 -2
  160. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +7 -14
  161. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +7 -14
  162. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +4 -9
  163. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +4 -9
  164. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.mts +1 -1
  165. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +1 -1
  166. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -16
  167. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.mjs +8 -16
  168. package/RadarChart/seriesConfig/tooltip.js +13 -8
  169. package/RadarChart/seriesConfig/tooltip.mjs +13 -8
  170. package/RadarChart/useRadarChartProps.js +3 -3
  171. package/RadarChart/useRadarChartProps.mjs +3 -3
  172. package/ScatterChart/BatchScatter.d.mts +2 -1
  173. package/ScatterChart/BatchScatter.d.ts +2 -1
  174. package/ScatterChart/BatchScatter.js +5 -3
  175. package/ScatterChart/BatchScatter.mjs +4 -3
  176. package/ScatterChart/FocusedScatterMark.d.mts +4 -1
  177. package/ScatterChart/FocusedScatterMark.d.ts +4 -1
  178. package/ScatterChart/FocusedScatterMark.js +12 -2
  179. package/ScatterChart/FocusedScatterMark.mjs +11 -1
  180. package/ScatterChart/Scatter.d.mts +1 -1
  181. package/ScatterChart/Scatter.d.ts +1 -1
  182. package/ScatterChart/Scatter.js +11 -9
  183. package/ScatterChart/Scatter.mjs +11 -9
  184. package/ScatterChart/ScatterChart.js +5 -2
  185. package/ScatterChart/ScatterChart.mjs +5 -2
  186. package/ScatterChart/ScatterPlot.d.mts +2 -1
  187. package/ScatterChart/ScatterPlot.d.ts +2 -1
  188. package/ScatterChart/ScatterPlot.js +16 -2
  189. package/ScatterChart/ScatterPlot.mjs +16 -2
  190. package/ScatterChart/index.d.mts +2 -2
  191. package/ScatterChart/index.d.ts +2 -2
  192. package/ScatterChart/scatterClasses.d.mts +14 -2
  193. package/ScatterChart/scatterClasses.d.ts +14 -2
  194. package/ScatterChart/scatterClasses.js +9 -3
  195. package/ScatterChart/scatterClasses.mjs +9 -3
  196. package/SparkLineChart/SparkLineChart.js +5 -2
  197. package/SparkLineChart/SparkLineChart.mjs +5 -2
  198. package/context/ChartApi.d.mts +1 -1
  199. package/context/ChartApi.d.ts +1 -1
  200. package/context/ChartProvider/ChartProvider.types.d.mts +2 -2
  201. package/context/ChartProvider/ChartProvider.types.d.ts +2 -2
  202. package/context/ChartsProvider/ChartsProvider.d.mts +1 -1
  203. package/context/ChartsProvider/ChartsProvider.d.ts +1 -1
  204. package/context/ChartsProvider/ChartsProvider.types.d.mts +3 -3
  205. package/context/ChartsProvider/ChartsProvider.types.d.ts +3 -3
  206. package/hooks/index.d.mts +2 -2
  207. package/hooks/index.d.ts +2 -2
  208. package/hooks/index.js +8 -8
  209. package/hooks/index.mjs +2 -2
  210. package/hooks/useInteractionItemProps.d.mts +1 -2
  211. package/hooks/useInteractionItemProps.d.ts +1 -2
  212. package/hooks/{useItemHighlighted.d.mts → useItemHighlightState.d.mts} +5 -13
  213. package/hooks/{useItemHighlighted.d.ts → useItemHighlightState.d.ts} +5 -13
  214. package/hooks/{useItemHighlighted.js → useItemHighlightState.js} +5 -10
  215. package/hooks/useItemHighlightState.mjs +17 -0
  216. package/hooks/useItemHighlightStateGetter.d.mts +9 -0
  217. package/hooks/useItemHighlightStateGetter.d.ts +9 -0
  218. package/hooks/useItemHighlightStateGetter.js +21 -0
  219. package/hooks/useItemHighlightStateGetter.mjs +16 -0
  220. package/index.js +1 -1
  221. package/index.mjs +1 -1
  222. package/internals/commonNextFocusItem.d.mts +5 -5
  223. package/internals/commonNextFocusItem.d.ts +5 -5
  224. package/internals/createCommonKeyboardFocusHandler.d.mts +2 -2
  225. package/internals/createCommonKeyboardFocusHandler.d.ts +2 -2
  226. package/internals/identifierCleaner.d.mts +8 -4
  227. package/internals/identifierCleaner.d.ts +8 -4
  228. package/internals/identifierCleaner.js +5 -1
  229. package/internals/identifierCleaner.mjs +5 -1
  230. package/internals/identifierSerializer.d.mts +10 -2
  231. package/internals/identifierSerializer.d.ts +10 -2
  232. package/internals/identifierSerializer.js +8 -0
  233. package/internals/identifierSerializer.mjs +8 -0
  234. package/internals/plugins/allPlugins.d.mts +2 -2
  235. package/internals/plugins/allPlugins.d.ts +2 -2
  236. package/internals/plugins/corePlugins/corePlugins.d.mts +1 -1
  237. package/internals/plugins/corePlugins/corePlugins.d.ts +1 -1
  238. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.mts +6 -6
  239. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +6 -6
  240. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.mts +9 -9
  241. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +9 -9
  242. package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.mts +2 -2
  243. package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +2 -2
  244. package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.mts +3 -3
  245. package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.ts +3 -3
  246. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +4 -4
  247. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +4 -4
  248. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.mts +2 -2
  249. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.ts +2 -2
  250. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.mts +1 -1
  251. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.ts +1 -1
  252. package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.mts +1 -1
  253. package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.ts +1 -1
  254. package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.mts +1 -1
  255. package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.ts +1 -1
  256. package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.mts +1 -1
  257. package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.ts +1 -1
  258. package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.mts +3 -3
  259. package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.ts +3 -3
  260. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +28 -28
  261. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +28 -28
  262. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesLayout.types.d.mts +2 -2
  263. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesLayout.types.d.ts +2 -2
  264. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.d.mts +6 -6
  265. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.d.ts +6 -6
  266. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +21 -11
  267. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +21 -11
  268. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.mts +4 -4
  269. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.ts +4 -4
  270. package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.mts +10 -10
  271. package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.ts +10 -10
  272. package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.mts +3 -3
  273. package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.ts +3 -3
  274. package/internals/plugins/corePlugins/useChartSeriesConfig/utils/serializeIdentifier.d.mts +3 -3
  275. package/internals/plugins/corePlugins/useChartSeriesConfig/utils/serializeIdentifier.d.ts +3 -3
  276. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.mts +5 -5
  277. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -5
  278. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.mts +1 -1
  279. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
  280. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +5 -5
  281. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +5 -5
  282. package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.mts +1 -2
  283. package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +1 -2
  284. package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +0 -5
  285. package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.mjs +0 -4
  286. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.mts +10 -29
  287. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +10 -29
  288. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +27 -64
  289. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.mjs +24 -60
  290. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.mts +3 -3
  291. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +3 -3
  292. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +8 -10
  293. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +8 -10
  294. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +1 -1
  295. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +1 -1
  296. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +8 -2
  297. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +8 -2
  298. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +5 -5
  299. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +5 -5
  300. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +1 -1
  301. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
  302. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.mts +1 -1
  303. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
  304. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +6 -4
  305. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.mjs +6 -4
  306. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.mts +10 -10
  307. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +10 -10
  308. package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.mts +16 -16
  309. package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +16 -16
  310. package/internals/plugins/models/chart.d.mts +1 -1
  311. package/internals/plugins/models/chart.d.ts +1 -1
  312. package/models/seriesType/config.d.mts +18 -6
  313. package/models/seriesType/config.d.ts +18 -6
  314. package/models/seriesType/index.d.mts +8 -8
  315. package/models/seriesType/index.d.ts +8 -8
  316. package/models/seriesType/line.d.mts +2 -1
  317. package/models/seriesType/line.d.ts +2 -1
  318. package/models/seriesType/radar.d.mts +1 -1
  319. package/models/seriesType/radar.d.ts +1 -1
  320. package/package.json +3 -3
  321. package/themeAugmentation/components.d.mts +26 -1
  322. package/themeAugmentation/components.d.ts +26 -1
  323. package/themeAugmentation/overrides.d.mts +15 -1
  324. package/themeAugmentation/overrides.d.ts +15 -1
  325. package/hooks/useItemHighlighted.mjs +0 -22
  326. package/hooks/useItemHighlightedGetter.d.mts +0 -53
  327. package/hooks/useItemHighlightedGetter.d.ts +0 -53
  328. package/hooks/useItemHighlightedGetter.js +0 -26
  329. package/hooks/useItemHighlightedGetter.mjs +0 -21
@@ -2,6 +2,9 @@ import * as React from 'react';
2
2
  import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
3
3
  import { type AnimatedAreaProps } from "./AnimatedArea.mjs";
4
4
  import { type SeriesId } from "../models/seriesType/common.mjs";
5
+ /**
6
+ * @deprecated Use `LineClasses` from `./lineClasses` instead.
7
+ */
5
8
  export interface AreaElementClasses {
6
9
  /** Styles applied to the root element. */
7
10
  root: string;
@@ -21,6 +24,9 @@ export interface AreaElementClasses {
21
24
  */
22
25
  series: string;
23
26
  }
27
+ /**
28
+ * @deprecated Use `LineClassKey` from `./lineClasses` instead.
29
+ */
24
30
  export type AreaElementClassKey = keyof AreaElementClasses;
25
31
  export interface AreaElementOwnerState {
26
32
  seriesId: SeriesId;
@@ -30,7 +36,13 @@ export interface AreaElementOwnerState {
30
36
  isHighlighted: boolean;
31
37
  classes?: Partial<AreaElementClasses>;
32
38
  }
39
+ /**
40
+ * @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
41
+ */
33
42
  export declare function getAreaElementUtilityClass(slot: string): string;
43
+ /**
44
+ * @deprecated Use `lineClasses` from `./lineClasses` instead.
45
+ */
34
46
  export declare const areaElementClasses: AreaElementClasses;
35
47
  export interface AreaElementSlots {
36
48
  /**
@@ -2,6 +2,9 @@ import * as React from 'react';
2
2
  import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
3
3
  import { type AnimatedAreaProps } from "./AnimatedArea.js";
4
4
  import { type SeriesId } from "../models/seriesType/common.js";
5
+ /**
6
+ * @deprecated Use `LineClasses` from `./lineClasses` instead.
7
+ */
5
8
  export interface AreaElementClasses {
6
9
  /** Styles applied to the root element. */
7
10
  root: string;
@@ -21,6 +24,9 @@ export interface AreaElementClasses {
21
24
  */
22
25
  series: string;
23
26
  }
27
+ /**
28
+ * @deprecated Use `LineClassKey` from `./lineClasses` instead.
29
+ */
24
30
  export type AreaElementClassKey = keyof AreaElementClasses;
25
31
  export interface AreaElementOwnerState {
26
32
  seriesId: SeriesId;
@@ -30,7 +36,13 @@ export interface AreaElementOwnerState {
30
36
  isHighlighted: boolean;
31
37
  classes?: Partial<AreaElementClasses>;
32
38
  }
39
+ /**
40
+ * @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
41
+ */
33
42
  export declare function getAreaElementUtilityClass(slot: string): string;
43
+ /**
44
+ * @deprecated Use `lineClasses` from `./lineClasses` instead.
45
+ */
34
46
  export declare const areaElementClasses: AreaElementClasses;
35
47
  export interface AreaElementSlots {
36
48
  /**
@@ -18,15 +18,33 @@ var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
18
18
  var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
19
19
  var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
20
20
  var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
21
- var _useItemHighlighted = require("../hooks/useItemHighlighted");
21
+ var _useItemHighlightState = require("../hooks/useItemHighlightState");
22
22
  var _AnimatedArea = require("./AnimatedArea");
23
+ var _lineClasses = require("./lineClasses");
23
24
  var _jsxRuntime = require("react/jsx-runtime");
24
25
  const _excluded = ["seriesId", "classes", "color", "gradientId", "slots", "slotProps", "onClick"];
26
+ /**
27
+ * @deprecated Use `LineClasses` from `./lineClasses` instead.
28
+ */
29
+ /**
30
+ * @deprecated Use `LineClassKey` from `./lineClasses` instead.
31
+ */
32
+ /**
33
+ * @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
34
+ */
25
35
  function getAreaElementUtilityClass(slot) {
26
36
  return (0, _generateUtilityClass.default)('MuiAreaElement', slot);
27
37
  }
38
+
39
+ /**
40
+ * @deprecated Use `lineClasses` from `./lineClasses` instead.
41
+ */
28
42
  const areaElementClasses = exports.areaElementClasses = (0, _generateUtilityClasses.default)('MuiAreaElement', ['root', 'highlighted', 'faded', 'series']);
29
- const useUtilityClasses = ownerState => {
43
+
44
+ /**
45
+ * @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
46
+ */
47
+ const useDeprecatedUtilityClasses = ownerState => {
30
48
  const {
31
49
  classes,
32
50
  seriesId,
@@ -64,10 +82,9 @@ function AreaElement(props) {
64
82
  seriesId
65
83
  }), [seriesId]);
66
84
  const interactionProps = (0, _useInteractionItemProps.useInteractionItemProps)(identifier);
67
- const {
68
- isFaded,
69
- isHighlighted
70
- } = (0, _useItemHighlighted.useItemHighlighted)(identifier);
85
+ const highlightState = (0, _useItemHighlightState.useItemHighlightState)(identifier);
86
+ const isHighlighted = highlightState === 'highlighted';
87
+ const isFaded = highlightState === 'faded';
71
88
  const ownerState = {
72
89
  seriesId,
73
90
  classes: innerClasses,
@@ -76,7 +93,8 @@ function AreaElement(props) {
76
93
  isFaded,
77
94
  isHighlighted
78
95
  };
79
- const classes = useUtilityClasses(ownerState);
96
+ const classes = (0, _lineClasses.useUtilityClasses)();
97
+ const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
80
98
  const Area = slots?.area ?? _AnimatedArea.AnimatedArea;
81
99
  const areaProps = (0, _useSlotProps.default)({
82
100
  elementType: Area,
@@ -85,9 +103,10 @@ function AreaElement(props) {
85
103
  onClick,
86
104
  cursor: onClick ? 'pointer' : 'unset',
87
105
  'data-highlighted': isHighlighted || undefined,
88
- 'data-faded': isFaded || undefined
106
+ 'data-faded': isFaded || undefined,
107
+ 'data-series-id': seriesId
89
108
  }),
90
- className: classes.root,
109
+ className: `${classes.area} ${deprecatedClasses.root}`,
91
110
  ownerState
92
111
  });
93
112
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Area, (0, _extends2.default)({}, other, areaProps));
@@ -10,14 +10,34 @@ import useSlotProps from '@mui/utils/useSlotProps';
10
10
  import generateUtilityClass from '@mui/utils/generateUtilityClass';
11
11
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
12
12
  import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
13
- import { useItemHighlighted } from "../hooks/useItemHighlighted.mjs";
13
+ import { useItemHighlightState } from "../hooks/useItemHighlightState.mjs";
14
14
  import { AnimatedArea } from "./AnimatedArea.mjs";
15
+ import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
16
+
17
+ /**
18
+ * @deprecated Use `LineClasses` from `./lineClasses` instead.
19
+ */
20
+
21
+ /**
22
+ * @deprecated Use `LineClassKey` from `./lineClasses` instead.
23
+ */
15
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
+ /**
26
+ * @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
27
+ */
16
28
  export function getAreaElementUtilityClass(slot) {
17
29
  return generateUtilityClass('MuiAreaElement', slot);
18
30
  }
31
+
32
+ /**
33
+ * @deprecated Use `lineClasses` from `./lineClasses` instead.
34
+ */
19
35
  export const areaElementClasses = generateUtilityClasses('MuiAreaElement', ['root', 'highlighted', 'faded', 'series']);
20
- const useUtilityClasses = ownerState => {
36
+
37
+ /**
38
+ * @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
39
+ */
40
+ const useDeprecatedUtilityClasses = ownerState => {
21
41
  const {
22
42
  classes,
23
43
  seriesId,
@@ -55,10 +75,9 @@ function AreaElement(props) {
55
75
  seriesId
56
76
  }), [seriesId]);
57
77
  const interactionProps = useInteractionItemProps(identifier);
58
- const {
59
- isFaded,
60
- isHighlighted
61
- } = useItemHighlighted(identifier);
78
+ const highlightState = useItemHighlightState(identifier);
79
+ const isHighlighted = highlightState === 'highlighted';
80
+ const isFaded = highlightState === 'faded';
62
81
  const ownerState = {
63
82
  seriesId,
64
83
  classes: innerClasses,
@@ -67,7 +86,8 @@ function AreaElement(props) {
67
86
  isFaded,
68
87
  isHighlighted
69
88
  };
70
- const classes = useUtilityClasses(ownerState);
89
+ const classes = useLineUtilityClasses();
90
+ const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
71
91
  const Area = slots?.area ?? AnimatedArea;
72
92
  const areaProps = useSlotProps({
73
93
  elementType: Area,
@@ -76,9 +96,10 @@ function AreaElement(props) {
76
96
  onClick,
77
97
  cursor: onClick ? 'pointer' : 'unset',
78
98
  'data-highlighted': isHighlighted || undefined,
79
- 'data-faded': isFaded || undefined
99
+ 'data-faded': isFaded || undefined,
100
+ 'data-series-id': seriesId
80
101
  }),
81
- className: classes.root,
102
+ className: `${classes.area} ${deprecatedClasses.root}`,
82
103
  ownerState
83
104
  });
84
105
  return /*#__PURE__*/_jsx(Area, _extends({}, other, areaProps));
@@ -12,19 +12,21 @@ 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 _clsx = _interopRequireDefault(require("clsx"));
15
16
  var _AreaElement = require("./AreaElement");
16
17
  var _useSkipAnimation = require("../hooks/useSkipAnimation");
17
18
  var _useAxis = require("../hooks/useAxis");
18
19
  var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
19
20
  var _useAreaPlotData = require("./useAreaPlotData");
20
21
  var _animation = require("../internals/animation/animation");
22
+ var _lineClasses = require("./lineClasses");
21
23
  var _jsxRuntime = require("react/jsx-runtime");
22
- const _excluded = ["slots", "slotProps", "onItemClick", "skipAnimation"];
24
+ const _excluded = ["slots", "slotProps", "onItemClick", "skipAnimation", "className"];
23
25
  const AreaPlotRoot = (0, _styles.styled)('g', {
24
26
  name: 'MuiAreaPlot',
25
27
  slot: 'Root'
26
28
  })({
27
- [`& .${_AreaElement.areaElementClasses.root}`]: {
29
+ [`& .${_lineClasses.lineClasses.area}`]: {
28
30
  transitionProperty: 'opacity, fill',
29
31
  transitionDuration: `${_animation.ANIMATION_DURATION_MS}ms`,
30
32
  transitionTimingFunction: _animation.ANIMATION_TIMING_FUNCTION
@@ -56,13 +58,17 @@ function AreaPlot(props) {
56
58
  slots,
57
59
  slotProps,
58
60
  onItemClick,
59
- skipAnimation: inSkipAnimation
61
+ skipAnimation: inSkipAnimation,
62
+ className
60
63
  } = props,
61
64
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
62
65
  const isZoomInteracting = (0, _useInternalIsZoomInteracting.useInternalIsZoomInteracting)();
63
66
  const skipAnimation = (0, _useSkipAnimation.useSkipAnimation)(isZoomInteracting || inSkipAnimation);
64
67
  const completedData = useAggregatedData();
65
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(AreaPlotRoot, (0, _extends2.default)({}, other, {
68
+ const classes = (0, _lineClasses.useUtilityClasses)();
69
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(AreaPlotRoot, (0, _extends2.default)({
70
+ className: (0, _clsx.default)(classes.areaPlot, className)
71
+ }, other, {
66
72
  children: completedData.map(({
67
73
  d,
68
74
  seriesId,
@@ -2,22 +2,24 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["slots", "slotProps", "onItemClick", "skipAnimation"];
5
+ const _excluded = ["slots", "slotProps", "onItemClick", "skipAnimation", "className"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { styled } from '@mui/material/styles';
9
- import { AreaElement, areaElementClasses } from "./AreaElement.mjs";
9
+ import clsx from 'clsx';
10
+ import { AreaElement } from "./AreaElement.mjs";
10
11
  import { useSkipAnimation } from "../hooks/useSkipAnimation.mjs";
11
12
  import { useXAxes, useYAxes } from "../hooks/useAxis.mjs";
12
13
  import { useInternalIsZoomInteracting } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.mjs";
13
14
  import { useAreaPlotData } from "./useAreaPlotData.mjs";
14
15
  import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
16
+ import { lineClasses, useUtilityClasses } from "./lineClasses.mjs";
15
17
  import { jsx as _jsx } from "react/jsx-runtime";
16
18
  const AreaPlotRoot = styled('g', {
17
19
  name: 'MuiAreaPlot',
18
20
  slot: 'Root'
19
21
  })({
20
- [`& .${areaElementClasses.root}`]: {
22
+ [`& .${lineClasses.area}`]: {
21
23
  transitionProperty: 'opacity, fill',
22
24
  transitionDuration: `${ANIMATION_DURATION_MS}ms`,
23
25
  transitionTimingFunction: ANIMATION_TIMING_FUNCTION
@@ -49,13 +51,17 @@ function AreaPlot(props) {
49
51
  slots,
50
52
  slotProps,
51
53
  onItemClick,
52
- skipAnimation: inSkipAnimation
54
+ skipAnimation: inSkipAnimation,
55
+ className
53
56
  } = props,
54
57
  other = _objectWithoutPropertiesLoose(props, _excluded);
55
58
  const isZoomInteracting = useInternalIsZoomInteracting();
56
59
  const skipAnimation = useSkipAnimation(isZoomInteracting || inSkipAnimation);
57
60
  const completedData = useAggregatedData();
58
- return /*#__PURE__*/_jsx(AreaPlotRoot, _extends({}, other, {
61
+ const classes = useUtilityClasses();
62
+ return /*#__PURE__*/_jsx(AreaPlotRoot, _extends({
63
+ className: clsx(classes.areaPlot, className)
64
+ }, other, {
59
65
  children: completedData.map(({
60
66
  d,
61
67
  seriesId,
@@ -15,6 +15,7 @@ var _styles = require("@mui/material/styles");
15
15
  var _animation = require("../internals/animation/animation");
16
16
  var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
17
17
  var _markElementClasses = require("./markElementClasses");
18
+ var _lineClasses = require("./lineClasses");
18
19
  var _jsxRuntime = require("react/jsx-runtime");
19
20
  const _excluded = ["x", "y", "seriesId", "classes", "color", "dataIndex", "onClick", "skipAnimation", "isFaded", "isHighlighted", "shape", "hidden"];
20
21
  const Circle = (0, _styles.styled)('circle', {
@@ -71,7 +72,11 @@ function CircleMarkElement(props) {
71
72
  isFaded,
72
73
  skipAnimation
73
74
  };
74
- const classes = (0, _markElementClasses.useUtilityClasses)(ownerState);
75
+ const classes = (0, _lineClasses.useUtilityClasses)({
76
+ skipAnimation,
77
+ classes: innerClasses
78
+ });
79
+ const deprecatedClasses = (0, _markElementClasses.useUtilityClasses)(ownerState);
75
80
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Circle, (0, _extends2.default)({}, other, {
76
81
  cx: x,
77
82
  cy: y,
@@ -79,13 +84,15 @@ function CircleMarkElement(props) {
79
84
  fill: (theme.vars || theme).palette.background.paper,
80
85
  stroke: color,
81
86
  strokeWidth: 2,
82
- className: classes.root,
87
+ className: `${classes.mark} ${deprecatedClasses.root}`,
83
88
  onClick: onClick,
84
89
  cursor: onClick ? 'pointer' : 'unset',
85
90
  pointerEvents: hidden ? 'none' : undefined
86
91
  }, interactionProps, {
87
92
  "data-highlighted": isHighlighted || undefined,
88
93
  "data-faded": isFaded || undefined,
94
+ "data-series-id": seriesId,
95
+ "data-index": dataIndex,
89
96
  opacity: hidden ? 0 : 1
90
97
  }));
91
98
  }
@@ -8,7 +8,8 @@ import PropTypes from 'prop-types';
8
8
  import { styled, useTheme } from '@mui/material/styles';
9
9
  import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
10
10
  import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
11
- import { markElementClasses, useUtilityClasses } from "./markElementClasses.mjs";
11
+ import { markElementClasses, useUtilityClasses as useDeprecatedUtilityClasses } from "./markElementClasses.mjs";
12
+ import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
14
  const Circle = styled('circle', {
14
15
  slot: 'internal',
@@ -64,7 +65,11 @@ function CircleMarkElement(props) {
64
65
  isFaded,
65
66
  skipAnimation
66
67
  };
67
- const classes = useUtilityClasses(ownerState);
68
+ const classes = useLineUtilityClasses({
69
+ skipAnimation,
70
+ classes: innerClasses
71
+ });
72
+ const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
68
73
  return /*#__PURE__*/_jsx(Circle, _extends({}, other, {
69
74
  cx: x,
70
75
  cy: y,
@@ -72,13 +77,15 @@ function CircleMarkElement(props) {
72
77
  fill: (theme.vars || theme).palette.background.paper,
73
78
  stroke: color,
74
79
  strokeWidth: 2,
75
- className: classes.root,
80
+ className: `${classes.mark} ${deprecatedClasses.root}`,
76
81
  onClick: onClick,
77
82
  cursor: onClick ? 'pointer' : 'unset',
78
83
  pointerEvents: hidden ? 'none' : undefined
79
84
  }, interactionProps, {
80
85
  "data-highlighted": isHighlighted || undefined,
81
86
  "data-faded": isFaded || undefined,
87
+ "data-series-id": seriesId,
88
+ "data-index": dataIndex,
82
89
  opacity: hidden ? 0 : 1
83
90
  }));
84
91
  }
@@ -129,11 +129,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
129
129
  * @default false
130
130
  */
131
131
  disableAxisListener: _propTypes.default.bool,
132
+ /**
133
+ * If `true`, disables keyboard navigation for the chart.
134
+ */
135
+ disableKeyboardNavigation: _propTypes.default.bool,
132
136
  /**
133
137
  * If `true`, render the line highlight item.
134
138
  */
135
139
  disableLineItemHighlight: _propTypes.default.bool,
136
- enableKeyboardNavigation: _propTypes.default.bool,
137
140
  /**
138
141
  * Options to enable features planned for the next major.
139
142
  */
@@ -309,7 +312,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
309
312
  /**
310
313
  * The callback fired when the tooltip item changes.
311
314
  *
312
- * @param {SeriesItemIdentifier<TSeries> | null} tooltipItem The newly highlighted item.
315
+ * @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
313
316
  */
314
317
  onTooltipItemChange: _propTypes.default.func,
315
318
  /**
@@ -122,11 +122,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
122
122
  * @default false
123
123
  */
124
124
  disableAxisListener: PropTypes.bool,
125
+ /**
126
+ * If `true`, disables keyboard navigation for the chart.
127
+ */
128
+ disableKeyboardNavigation: PropTypes.bool,
125
129
  /**
126
130
  * If `true`, render the line highlight item.
127
131
  */
128
132
  disableLineItemHighlight: PropTypes.bool,
129
- enableKeyboardNavigation: PropTypes.bool,
130
133
  /**
131
134
  * Options to enable features planned for the next major.
132
135
  */
@@ -302,7 +305,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
302
305
  /**
303
306
  * The callback fired when the tooltip item changes.
304
307
  *
305
- * @param {SeriesItemIdentifier<TSeries> | null} tooltipItem The newly highlighted item.
308
+ * @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
306
309
  */
307
310
  onTooltipItemChange: PropTypes.func,
308
311
  /**
@@ -2,6 +2,9 @@ import * as React from 'react';
2
2
  import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
3
3
  import { type AnimatedLineProps } from "./AnimatedLine.mjs";
4
4
  import { type SeriesId } from "../models/seriesType/common.mjs";
5
+ /**
6
+ * @deprecated Use `LineClasses` from `./lineClasses` instead.
7
+ */
5
8
  export interface LineElementClasses {
6
9
  /** Styles applied to the root element. */
7
10
  root: string;
@@ -21,6 +24,9 @@ export interface LineElementClasses {
21
24
  */
22
25
  series: string;
23
26
  }
27
+ /**
28
+ * @deprecated Use `LineClassKey` from `./lineClasses` instead.
29
+ */
24
30
  export type LineElementClassKey = keyof LineElementClasses;
25
31
  export interface LineElementOwnerState {
26
32
  seriesId: SeriesId;
@@ -32,7 +38,13 @@ export interface LineElementOwnerState {
32
38
  /** If `true`, the line is hidden. */
33
39
  hidden?: boolean;
34
40
  }
41
+ /**
42
+ * @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
43
+ */
35
44
  export declare function getLineElementUtilityClass(slot: string): string;
45
+ /**
46
+ * @deprecated Use `lineClasses` from `./lineClasses` instead.
47
+ */
36
48
  export declare const lineElementClasses: LineElementClasses;
37
49
  export interface LineElementSlots {
38
50
  /**
@@ -2,6 +2,9 @@ import * as React from 'react';
2
2
  import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
3
3
  import { type AnimatedLineProps } from "./AnimatedLine.js";
4
4
  import { type SeriesId } from "../models/seriesType/common.js";
5
+ /**
6
+ * @deprecated Use `LineClasses` from `./lineClasses` instead.
7
+ */
5
8
  export interface LineElementClasses {
6
9
  /** Styles applied to the root element. */
7
10
  root: string;
@@ -21,6 +24,9 @@ export interface LineElementClasses {
21
24
  */
22
25
  series: string;
23
26
  }
27
+ /**
28
+ * @deprecated Use `LineClassKey` from `./lineClasses` instead.
29
+ */
24
30
  export type LineElementClassKey = keyof LineElementClasses;
25
31
  export interface LineElementOwnerState {
26
32
  seriesId: SeriesId;
@@ -32,7 +38,13 @@ export interface LineElementOwnerState {
32
38
  /** If `true`, the line is hidden. */
33
39
  hidden?: boolean;
34
40
  }
41
+ /**
42
+ * @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
43
+ */
35
44
  export declare function getLineElementUtilityClass(slot: string): string;
45
+ /**
46
+ * @deprecated Use `lineClasses` from `./lineClasses` instead.
47
+ */
36
48
  export declare const lineElementClasses: LineElementClasses;
37
49
  export interface LineElementSlots {
38
50
  /**
@@ -19,14 +19,32 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
19
19
  var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
20
20
  var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
21
21
  var _AnimatedLine = require("./AnimatedLine");
22
- var _useItemHighlighted = require("../hooks/useItemHighlighted");
22
+ var _useItemHighlightState = require("../hooks/useItemHighlightState");
23
+ var _lineClasses = require("./lineClasses");
23
24
  var _jsxRuntime = require("react/jsx-runtime");
24
25
  const _excluded = ["seriesId", "classes", "color", "gradientId", "slots", "slotProps", "onClick", "hidden"];
26
+ /**
27
+ * @deprecated Use `LineClasses` from `./lineClasses` instead.
28
+ */
29
+ /**
30
+ * @deprecated Use `LineClassKey` from `./lineClasses` instead.
31
+ */
32
+ /**
33
+ * @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
34
+ */
25
35
  function getLineElementUtilityClass(slot) {
26
36
  return (0, _generateUtilityClass.default)('MuiLineElement', slot);
27
37
  }
38
+
39
+ /**
40
+ * @deprecated Use `lineClasses` from `./lineClasses` instead.
41
+ */
28
42
  const lineElementClasses = exports.lineElementClasses = (0, _generateUtilityClasses.default)('MuiLineElement', ['root', 'highlighted', 'faded', 'series']);
29
- const useUtilityClasses = ownerState => {
43
+
44
+ /**
45
+ * @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
46
+ */
47
+ const useDeprecatedUtilityClasses = ownerState => {
30
48
  const {
31
49
  classes,
32
50
  seriesId,
@@ -65,10 +83,9 @@ function LineElement(props) {
65
83
  seriesId
66
84
  }), [seriesId]);
67
85
  const interactionProps = (0, _useInteractionItemProps.useInteractionItemProps)(identifier);
68
- const {
69
- isFaded,
70
- isHighlighted
71
- } = (0, _useItemHighlighted.useItemHighlighted)(identifier);
86
+ const highlightState = (0, _useItemHighlightState.useItemHighlightState)(identifier);
87
+ const isHighlighted = highlightState === 'highlighted';
88
+ const isFaded = highlightState === 'faded';
72
89
  const ownerState = {
73
90
  seriesId,
74
91
  classes: innerClasses,
@@ -78,7 +95,8 @@ function LineElement(props) {
78
95
  isHighlighted,
79
96
  hidden
80
97
  };
81
- const classes = useUtilityClasses(ownerState);
98
+ const classes = (0, _lineClasses.useUtilityClasses)();
99
+ const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
82
100
  const Line = slots?.line ?? _AnimatedLine.AnimatedLine;
83
101
  const lineProps = (0, _useSlotProps.default)({
84
102
  elementType: Line,
@@ -87,9 +105,10 @@ function LineElement(props) {
87
105
  onClick,
88
106
  cursor: onClick ? 'pointer' : 'unset',
89
107
  'data-highlighted': isHighlighted || undefined,
90
- 'data-faded': isFaded || undefined
108
+ 'data-faded': isFaded || undefined,
109
+ 'data-series-id': seriesId
91
110
  }),
92
- className: classes.root,
111
+ className: `${classes.line} ${deprecatedClasses.root}`,
93
112
  ownerState
94
113
  });
95
114
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, (0, _extends2.default)({}, other, lineProps));
@@ -11,13 +11,33 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
11
11
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
12
12
  import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
13
13
  import { AnimatedLine } from "./AnimatedLine.mjs";
14
- import { useItemHighlighted } from "../hooks/useItemHighlighted.mjs";
14
+ import { useItemHighlightState } from "../hooks/useItemHighlightState.mjs";
15
+ import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
16
+
17
+ /**
18
+ * @deprecated Use `LineClasses` from `./lineClasses` instead.
19
+ */
20
+
21
+ /**
22
+ * @deprecated Use `LineClassKey` from `./lineClasses` instead.
23
+ */
15
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
+ /**
26
+ * @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
27
+ */
16
28
  export function getLineElementUtilityClass(slot) {
17
29
  return generateUtilityClass('MuiLineElement', slot);
18
30
  }
31
+
32
+ /**
33
+ * @deprecated Use `lineClasses` from `./lineClasses` instead.
34
+ */
19
35
  export const lineElementClasses = generateUtilityClasses('MuiLineElement', ['root', 'highlighted', 'faded', 'series']);
20
- const useUtilityClasses = ownerState => {
36
+
37
+ /**
38
+ * @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
39
+ */
40
+ const useDeprecatedUtilityClasses = ownerState => {
21
41
  const {
22
42
  classes,
23
43
  seriesId,
@@ -56,10 +76,9 @@ function LineElement(props) {
56
76
  seriesId
57
77
  }), [seriesId]);
58
78
  const interactionProps = useInteractionItemProps(identifier);
59
- const {
60
- isFaded,
61
- isHighlighted
62
- } = useItemHighlighted(identifier);
79
+ const highlightState = useItemHighlightState(identifier);
80
+ const isHighlighted = highlightState === 'highlighted';
81
+ const isFaded = highlightState === 'faded';
63
82
  const ownerState = {
64
83
  seriesId,
65
84
  classes: innerClasses,
@@ -69,7 +88,8 @@ function LineElement(props) {
69
88
  isHighlighted,
70
89
  hidden
71
90
  };
72
- const classes = useUtilityClasses(ownerState);
91
+ const classes = useLineUtilityClasses();
92
+ const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
73
93
  const Line = slots?.line ?? AnimatedLine;
74
94
  const lineProps = useSlotProps({
75
95
  elementType: Line,
@@ -78,9 +98,10 @@ function LineElement(props) {
78
98
  onClick,
79
99
  cursor: onClick ? 'pointer' : 'unset',
80
100
  'data-highlighted': isHighlighted || undefined,
81
- 'data-faded': isFaded || undefined
101
+ 'data-faded': isFaded || undefined,
102
+ 'data-series-id': seriesId
82
103
  }),
83
- className: classes.root,
104
+ className: `${classes.line} ${deprecatedClasses.root}`,
84
105
  ownerState
85
106
  });
86
107
  return /*#__PURE__*/_jsx(Line, _extends({}, other, lineProps));