@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
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { type SeriesId } from "../models/seriesType/common.mjs";
3
- import { type BarElementOwnerState } from "./barElementClasses.mjs";
3
+ import { type BarElementOwnerState } from "./barClasses.mjs";
4
4
  export interface BarProps extends Omit<React.SVGProps<SVGRectElement>, 'color' | 'ref' | 'x' | 'y' | 'height' | 'width'> {
5
5
  seriesId: SeriesId;
6
6
  dataIndex: number;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { type SeriesId } from "../models/seriesType/common.js";
3
- import { type BarElementOwnerState } from "./barElementClasses.js";
3
+ import { type BarElementOwnerState } from "./barClasses.js";
4
4
  export interface BarProps extends Omit<React.SVGProps<SVGRectElement>, 'color' | 'ref' | 'x' | 'y' | 'height' | 'width'> {
5
5
  seriesId: SeriesId;
6
6
  dataIndex: number;
@@ -135,7 +135,10 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
135
135
  * @default false
136
136
  */
137
137
  disableAxisListener: _propTypes.default.bool,
138
- enableKeyboardNavigation: _propTypes.default.bool,
138
+ /**
139
+ * If `true`, disables keyboard navigation for the chart.
140
+ */
141
+ disableKeyboardNavigation: _propTypes.default.bool,
139
142
  /**
140
143
  * Option to display a cartesian grid in the background.
141
144
  */
@@ -304,7 +307,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
304
307
  /**
305
308
  * The callback fired when the tooltip item changes.
306
309
  *
307
- * @param {SeriesItemIdentifier<TSeries> | null} tooltipItem The newly highlighted item.
310
+ * @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
308
311
  */
309
312
  onTooltipItemChange: _propTypes.default.func,
310
313
  /**
@@ -128,7 +128,10 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
128
128
  * @default false
129
129
  */
130
130
  disableAxisListener: PropTypes.bool,
131
- enableKeyboardNavigation: PropTypes.bool,
131
+ /**
132
+ * If `true`, disables keyboard navigation for the chart.
133
+ */
134
+ disableKeyboardNavigation: PropTypes.bool,
132
135
  /**
133
136
  * Option to display a cartesian grid in the background.
134
137
  */
@@ -297,7 +300,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
297
300
  /**
298
301
  * The callback fired when the tooltip item changes.
299
302
  *
300
- * @param {SeriesItemIdentifier<TSeries> | null} tooltipItem The newly highlighted item.
303
+ * @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
301
304
  */
302
305
  onTooltipItemChange: PropTypes.func,
303
306
  /**
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
3
- import { type BarElementOwnerState } from "./barElementClasses.mjs";
3
+ import { type BarElementOwnerState } from "./barClasses.mjs";
4
4
  import { type BarProps } from "./AnimatedBarElement.mjs";
5
5
  export interface BarElementSlots {
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
3
- import { type BarElementOwnerState } from "./barElementClasses.js";
3
+ import { type BarElementOwnerState } from "./barClasses.js";
4
4
  import { type BarProps } from "./AnimatedBarElement.js";
5
5
  export interface BarElementSlots {
6
6
  /**
@@ -12,9 +12,10 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
12
12
  var React = _interopRequireWildcard(require("react"));
13
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
14
  var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
15
+ var _barClasses = require("./barClasses");
15
16
  var _barElementClasses = require("./barElementClasses");
16
17
  var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
17
- var _useItemHighlighted = require("../hooks/useItemHighlighted");
18
+ var _useItemHighlightState = require("../hooks/useItemHighlightState");
18
19
  var _AnimatedBarElement = require("./AnimatedBarElement");
19
20
  var _useIsItemFocused = require("../hooks/useIsItemFocused");
20
21
  var _jsxRuntime = require("react/jsx-runtime");
@@ -46,10 +47,9 @@ function BarElement(props) {
46
47
  dataIndex
47
48
  }), [seriesId, dataIndex]);
48
49
  const interactionProps = (0, _useInteractionItemProps.useInteractionItemProps)(itemIdentifier);
49
- const {
50
- isFaded,
51
- isHighlighted
52
- } = (0, _useItemHighlighted.useItemHighlighted)(itemIdentifier);
50
+ const highlightState = (0, _useItemHighlightState.useItemHighlightState)(itemIdentifier);
51
+ const isHighlighted = highlightState === 'highlighted';
52
+ const isFaded = highlightState === 'faded';
53
53
  const isFocused = (0, _useIsItemFocused.useIsItemFocused)(React.useMemo(() => ({
54
54
  type: 'bar',
55
55
  seriesId,
@@ -64,7 +64,8 @@ function BarElement(props) {
64
64
  isHighlighted,
65
65
  isFocused
66
66
  };
67
- const classes = (0, _barElementClasses.useUtilityClasses)(ownerState);
67
+ const classes = (0, _barClasses.useUtilityClasses)(ownerState);
68
+ const deprecatedClasses = (0, _barElementClasses.useUtilityClasses)(ownerState);
68
69
  const Bar = slots?.bar ?? _AnimatedBarElement.AnimatedBarElement;
69
70
  const barProps = (0, _useSlotProps.default)({
70
71
  elementType: Bar,
@@ -89,7 +90,7 @@ function BarElement(props) {
89
90
  layout,
90
91
  hidden
91
92
  }),
92
- className: classes.root,
93
+ className: `${classes.element} ${deprecatedClasses.root}`,
93
94
  ownerState
94
95
  });
95
96
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Bar, (0, _extends2.default)({}, barProps));
@@ -6,9 +6,10 @@ const _excluded = ["seriesId", "dataIndex", "classes", "color", "slots", "slotPr
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import useSlotProps from '@mui/utils/useSlotProps';
9
- import { useUtilityClasses } from "./barElementClasses.mjs";
9
+ import { useUtilityClasses } from "./barClasses.mjs";
10
+ import { useUtilityClasses as useDeprecatedUtilityClasses } from "./barElementClasses.mjs";
10
11
  import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
11
- import { useItemHighlighted } from "../hooks/useItemHighlighted.mjs";
12
+ import { useItemHighlightState } from "../hooks/useItemHighlightState.mjs";
12
13
  import { AnimatedBarElement } from "./AnimatedBarElement.mjs";
13
14
  import { useIsItemFocused } from "../hooks/useIsItemFocused.mjs";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -39,10 +40,9 @@ function BarElement(props) {
39
40
  dataIndex
40
41
  }), [seriesId, dataIndex]);
41
42
  const interactionProps = useInteractionItemProps(itemIdentifier);
42
- const {
43
- isFaded,
44
- isHighlighted
45
- } = useItemHighlighted(itemIdentifier);
43
+ const highlightState = useItemHighlightState(itemIdentifier);
44
+ const isHighlighted = highlightState === 'highlighted';
45
+ const isFaded = highlightState === 'faded';
46
46
  const isFocused = useIsItemFocused(React.useMemo(() => ({
47
47
  type: 'bar',
48
48
  seriesId,
@@ -58,6 +58,7 @@ function BarElement(props) {
58
58
  isFocused
59
59
  };
60
60
  const classes = useUtilityClasses(ownerState);
61
+ const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
61
62
  const Bar = slots?.bar ?? AnimatedBarElement;
62
63
  const barProps = useSlotProps({
63
64
  elementType: Bar,
@@ -82,7 +83,7 @@ function BarElement(props) {
82
83
  layout,
83
84
  hidden
84
85
  }),
85
- className: classes.root,
86
+ className: `${classes.element} ${deprecatedClasses.root}`,
86
87
  ownerState
87
88
  });
88
89
  return /*#__PURE__*/_jsx(Bar, _extends({}, barProps));
@@ -25,6 +25,10 @@ const BarLabelComponent = exports.BarLabelComponent = (0, _styles.styled)('text'
25
25
  [`&.${_barLabelClasses.barLabelClasses.faded}`]: styles.faded
26
26
  }, {
27
27
  [`&.${_barLabelClasses.barLabelClasses.highlighted}`]: styles.highlighted
28
+ }, {
29
+ [`&[data-faded]`]: styles.faded
30
+ }, {
31
+ [`&[data-highlighted]`]: styles.highlighted
28
32
  }, styles.root]
29
33
  })(({
30
34
  theme
@@ -17,6 +17,10 @@ export const BarLabelComponent = styled('text', {
17
17
  [`&.${barLabelClasses.faded}`]: styles.faded
18
18
  }, {
19
19
  [`&.${barLabelClasses.highlighted}`]: styles.highlighted
20
+ }, {
21
+ [`&[data-faded]`]: styles.faded
22
+ }, {
23
+ [`&[data-highlighted]`]: styles.highlighted
20
24
  }, styles.root]
21
25
  })(({
22
26
  theme
@@ -1,5 +1,5 @@
1
1
  import { type SeriesId } from "../../models/seriesType/common.mjs";
2
- import type { BarLabelClasses } from "./barLabelClasses.mjs";
2
+ import type { BarClasses } from "../barClasses.mjs";
3
3
  import { type BarValueType } from "../../models/index.mjs";
4
4
  export interface BarLabelOwnerState {
5
5
  seriesId: SeriesId;
@@ -9,7 +9,7 @@ export interface BarLabelOwnerState {
9
9
  isHighlighted: boolean;
10
10
  skipAnimation: boolean;
11
11
  layout: 'vertical' | 'horizontal';
12
- classes?: Partial<BarLabelClasses>;
12
+ classes?: Partial<BarClasses>;
13
13
  }
14
14
  export type BarItem = {
15
15
  /**
@@ -1,5 +1,5 @@
1
1
  import { type SeriesId } from "../../models/seriesType/common.js";
2
- import type { BarLabelClasses } from "./barLabelClasses.js";
2
+ import type { BarClasses } from "../barClasses.js";
3
3
  import { type BarValueType } from "../../models/index.js";
4
4
  export interface BarLabelOwnerState {
5
5
  seriesId: SeriesId;
@@ -9,7 +9,7 @@ export interface BarLabelOwnerState {
9
9
  isHighlighted: boolean;
10
10
  skipAnimation: boolean;
11
11
  layout: 'vertical' | 'horizontal';
12
- classes?: Partial<BarLabelClasses>;
12
+ classes?: Partial<BarClasses>;
13
13
  }
14
14
  export type BarItem = {
15
15
  /**
@@ -11,10 +11,11 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _useSlotProps2 = _interopRequireDefault(require("@mui/utils/useSlotProps"));
13
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
+ var _barClasses = require("../barClasses");
14
15
  var _barLabelClasses = require("./barLabelClasses");
15
16
  var _getBarLabel = require("./getBarLabel");
16
17
  var _BarLabel = require("./BarLabel");
17
- var _useItemHighlighted = require("../../hooks/useItemHighlighted");
18
+ var _useItemHighlightState = require("../../hooks/useItemHighlightState");
18
19
  var _jsxRuntime = require("react/jsx-runtime");
19
20
  const _excluded = ["seriesId", "classes", "color", "dataIndex", "barLabel", "slots", "slotProps", "xOrigin", "yOrigin", "x", "y", "width", "height", "value", "skipAnimation", "layout", "barLabelPlacement", "hidden"],
20
21
  _excluded2 = ["ownerState"];
@@ -43,14 +44,13 @@ function BarLabelItem(props) {
43
44
  hidden
44
45
  } = props,
45
46
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
46
- const {
47
- isFaded,
48
- isHighlighted
49
- } = (0, _useItemHighlighted.useItemHighlighted)({
47
+ const highlightState = (0, _useItemHighlightState.useItemHighlightState)({
50
48
  type: 'bar',
51
49
  seriesId,
52
50
  dataIndex
53
51
  });
52
+ const isHighlighted = highlightState === 'highlighted';
53
+ const isFaded = highlightState === 'faded';
54
54
  const ownerState = {
55
55
  seriesId,
56
56
  classes: innerClasses,
@@ -61,7 +61,8 @@ function BarLabelItem(props) {
61
61
  skipAnimation,
62
62
  layout
63
63
  };
64
- const classes = (0, _barLabelClasses.useUtilityClasses)(ownerState);
64
+ const classes = (0, _barClasses.useUtilityClasses)(ownerState);
65
+ const deprecatedClasses = (0, _barLabelClasses.useUtilityClasses)(ownerState);
65
66
  const Component = slots?.barLabel ?? _BarLabel.BarLabel;
66
67
  const _useSlotProps = (0, _useSlotProps2.default)({
67
68
  elementType: Component,
@@ -74,7 +75,7 @@ function BarLabelItem(props) {
74
75
  width,
75
76
  height,
76
77
  placement: barLabelPlacement,
77
- className: classes.root,
78
+ className: `${classes.label} ${deprecatedClasses.root}`,
78
79
  'data-highlighted': isHighlighted || undefined,
79
80
  'data-faded': isFaded || undefined
80
81
  }),
@@ -5,10 +5,11 @@ const _excluded = ["seriesId", "classes", "color", "dataIndex", "barLabel", "slo
5
5
  import * as React from 'react';
6
6
  import useSlotProps from '@mui/utils/useSlotProps';
7
7
  import PropTypes from 'prop-types';
8
- import { useUtilityClasses } from "./barLabelClasses.mjs";
8
+ import { useUtilityClasses } from "../barClasses.mjs";
9
+ import { useUtilityClasses as useDeprecatedUtilityClasses } from "./barLabelClasses.mjs";
9
10
  import { getBarLabel } from "./getBarLabel.mjs";
10
11
  import { BarLabel } from "./BarLabel.mjs";
11
- import { useItemHighlighted } from "../../hooks/useItemHighlighted.mjs";
12
+ import { useItemHighlightState } from "../../hooks/useItemHighlightState.mjs";
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
14
  /**
14
15
  * @ignore - internal component.
@@ -35,14 +36,13 @@ function BarLabelItem(props) {
35
36
  hidden
36
37
  } = props,
37
38
  other = _objectWithoutPropertiesLoose(props, _excluded);
38
- const {
39
- isFaded,
40
- isHighlighted
41
- } = useItemHighlighted({
39
+ const highlightState = useItemHighlightState({
42
40
  type: 'bar',
43
41
  seriesId,
44
42
  dataIndex
45
43
  });
44
+ const isHighlighted = highlightState === 'highlighted';
45
+ const isFaded = highlightState === 'faded';
46
46
  const ownerState = {
47
47
  seriesId,
48
48
  classes: innerClasses,
@@ -54,6 +54,7 @@ function BarLabelItem(props) {
54
54
  layout
55
55
  };
56
56
  const classes = useUtilityClasses(ownerState);
57
+ const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
57
58
  const Component = slots?.barLabel ?? BarLabel;
58
59
  const _useSlotProps = useSlotProps({
59
60
  elementType: Component,
@@ -66,7 +67,7 @@ function BarLabelItem(props) {
66
67
  width,
67
68
  height,
68
69
  placement: barLabelPlacement,
69
- className: classes.root,
70
+ className: `${classes.label} ${deprecatedClasses.root}`,
70
71
  'data-highlighted': isHighlighted || undefined,
71
72
  'data-faded': isFaded || undefined
72
73
  }),
@@ -1,4 +1,7 @@
1
1
  import type { BarLabelOwnerState } from "./BarLabel.types.mjs";
2
+ /**
3
+ * @deprecated Use `BarClasses` from `../barClasses` instead.
4
+ */
2
5
  export interface BarLabelClasses {
3
6
  /** Styles applied to the root element. */
4
7
  root: string;
@@ -20,7 +23,19 @@ export interface BarLabelClasses {
20
23
  */
21
24
  series: string;
22
25
  }
26
+ /**
27
+ * @deprecated Use `BarClassKey` from `../barClasses` instead.
28
+ */
23
29
  export type BarLabelClassKey = keyof BarLabelClasses;
30
+ /**
31
+ * @deprecated Use `getBarUtilityClass` from `../barClasses` instead.
32
+ */
24
33
  export declare function getBarLabelUtilityClass(slot: string): string;
34
+ /**
35
+ * @deprecated Use `barClasses` from `../barClasses` instead.
36
+ */
25
37
  export declare const barLabelClasses: Record<"root" | "animate" | "highlighted" | "faded", string>;
38
+ /**
39
+ * @deprecated Use `useBarLabelUtilityClasses` from `../barClasses` instead.
40
+ */
26
41
  export declare const useUtilityClasses: (ownerState: BarLabelOwnerState) => Record<"root", string>;
@@ -1,4 +1,7 @@
1
1
  import type { BarLabelOwnerState } from "./BarLabel.types.js";
2
+ /**
3
+ * @deprecated Use `BarClasses` from `../barClasses` instead.
4
+ */
2
5
  export interface BarLabelClasses {
3
6
  /** Styles applied to the root element. */
4
7
  root: string;
@@ -20,7 +23,19 @@ export interface BarLabelClasses {
20
23
  */
21
24
  series: string;
22
25
  }
26
+ /**
27
+ * @deprecated Use `BarClassKey` from `../barClasses` instead.
28
+ */
23
29
  export type BarLabelClassKey = keyof BarLabelClasses;
30
+ /**
31
+ * @deprecated Use `getBarUtilityClass` from `../barClasses` instead.
32
+ */
24
33
  export declare function getBarLabelUtilityClass(slot: string): string;
34
+ /**
35
+ * @deprecated Use `barClasses` from `../barClasses` instead.
36
+ */
25
37
  export declare const barLabelClasses: Record<"root" | "animate" | "highlighted" | "faded", string>;
38
+ /**
39
+ * @deprecated Use `useBarLabelUtilityClasses` from `../barClasses` instead.
40
+ */
26
41
  export declare const useUtilityClasses: (ownerState: BarLabelOwnerState) => Record<"root", string>;
@@ -10,10 +10,29 @@ exports.useUtilityClasses = void 0;
10
10
  var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
11
11
  var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
12
12
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
13
+ /**
14
+ * @deprecated Use `BarClasses` from `../barClasses` instead.
15
+ */
16
+
17
+ /**
18
+ * @deprecated Use `BarClassKey` from `../barClasses` instead.
19
+ */
20
+
21
+ /**
22
+ * @deprecated Use `getBarUtilityClass` from `../barClasses` instead.
23
+ */
13
24
  function getBarLabelUtilityClass(slot) {
14
25
  return (0, _generateUtilityClass.default)('MuiBarLabel', slot);
15
26
  }
27
+
28
+ /**
29
+ * @deprecated Use `barClasses` from `../barClasses` instead.
30
+ */
16
31
  const barLabelClasses = exports.barLabelClasses = (0, _generateUtilityClasses.default)('MuiBarLabel', ['root', 'highlighted', 'faded', 'animate']);
32
+
33
+ /**
34
+ * @deprecated Use `useBarLabelUtilityClasses` from `../barClasses` instead.
35
+ */
17
36
  const useUtilityClasses = ownerState => {
18
37
  const {
19
38
  classes,
@@ -1,10 +1,30 @@
1
1
  import generateUtilityClass from '@mui/utils/generateUtilityClass';
2
2
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
3
3
  import composeClasses from '@mui/utils/composeClasses';
4
+
5
+ /**
6
+ * @deprecated Use `BarClasses` from `../barClasses` instead.
7
+ */
8
+
9
+ /**
10
+ * @deprecated Use `BarClassKey` from `../barClasses` instead.
11
+ */
12
+
13
+ /**
14
+ * @deprecated Use `getBarUtilityClass` from `../barClasses` instead.
15
+ */
4
16
  export function getBarLabelUtilityClass(slot) {
5
17
  return generateUtilityClass('MuiBarLabel', slot);
6
18
  }
19
+
20
+ /**
21
+ * @deprecated Use `barClasses` from `../barClasses` instead.
22
+ */
7
23
  export const barLabelClasses = generateUtilityClasses('MuiBarLabel', ['root', 'highlighted', 'faded', 'animate']);
24
+
25
+ /**
26
+ * @deprecated Use `useBarLabelUtilityClasses` from `../barClasses` instead.
27
+ */
8
28
  export const useUtilityClasses = ownerState => {
9
29
  const {
10
30
  classes,
@@ -12,7 +12,6 @@ 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 _barElementClasses = require("./barElementClasses");
16
15
  var _hooks = require("../hooks");
17
16
  var _BarLabelPlot = require("./BarLabel/BarLabelPlot");
18
17
  var _useSkipAnimation = require("../hooks/useSkipAnimation");
@@ -28,7 +27,7 @@ const BarPlotRoot = (0, _styles.styled)('g', {
28
27
  name: 'MuiBarPlot',
29
28
  slot: 'Root'
30
29
  })({
31
- [`& .${_barElementClasses.barElementClasses.root}`]: {
30
+ [`& .${_barClasses.barClasses.element}`]: {
32
31
  transitionProperty: 'opacity, fill',
33
32
  transitionDuration: `${_animation.ANIMATION_DURATION_MS}ms`,
34
33
  transitionTimingFunction: _animation.ANIMATION_TIMING_FUNCTION
@@ -6,13 +6,12 @@ const _excluded = ["skipAnimation", "onItemClick", "borderRadius", "barLabel", "
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { styled } from '@mui/material/styles';
9
- import { barElementClasses } from "./barElementClasses.mjs";
10
9
  import { useDrawingArea, useXAxes, useYAxes } from "../hooks/index.mjs";
11
10
  import { BarLabelPlot } from "./BarLabel/BarLabelPlot.mjs";
12
11
  import { useSkipAnimation } from "../hooks/useSkipAnimation.mjs";
13
12
  import { useInternalIsZoomInteracting } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.mjs";
14
13
  import { useBarPlotData } from "./useBarPlotData.mjs";
15
- import { useUtilityClasses } from "./barClasses.mjs";
14
+ import { barClasses, useUtilityClasses } from "./barClasses.mjs";
16
15
  import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
17
16
  import { IndividualBarPlot } from "./IndividualBarPlot.mjs";
18
17
  import { BatchBarPlot } from "./BatchBarPlot/index.mjs";
@@ -21,7 +20,7 @@ const BarPlotRoot = styled('g', {
21
20
  name: 'MuiBarPlot',
22
21
  slot: 'Root'
23
22
  })({
24
- [`& .${barElementClasses.root}`]: {
23
+ [`& .${barClasses.element}`]: {
25
24
  transitionProperty: 'opacity, fill',
26
25
  transitionDuration: `${ANIMATION_DURATION_MS}ms`,
27
26
  transitionTimingFunction: ANIMATION_TIMING_FUNCTION
@@ -1,3 +1,4 @@
1
+ import { type SeriesId } from "../models/seriesType/common.mjs";
1
2
  export interface BarClasses {
2
3
  /** Styles applied to the bar plot element. */
3
4
  root: string;
@@ -5,8 +6,27 @@ export interface BarClasses {
5
6
  series: string;
6
7
  /** Styles applied to the group surrounding a series' labels. */
7
8
  seriesLabels: string;
9
+ /** Styles applied to an individual bar element. */
10
+ element: string;
11
+ /** Styles applied to an individual bar label. */
12
+ label: string;
13
+ /** Styles applied to a bar label when it is animated. */
14
+ labelAnimate: string;
8
15
  }
9
16
  export type BarClassKey = keyof BarClasses;
17
+ export interface BarElementOwnerState {
18
+ seriesId: SeriesId;
19
+ dataIndex: number;
20
+ color: string;
21
+ isFaded: boolean;
22
+ isHighlighted: boolean;
23
+ isFocused: boolean;
24
+ classes?: Partial<BarClasses>;
25
+ }
10
26
  export declare function getBarUtilityClass(slot: string): string;
11
27
  export declare const barClasses: BarClasses;
12
- export declare const useUtilityClasses: (classes?: Partial<BarClasses>) => Record<"root" | "series" | "seriesLabels", string>;
28
+ export interface UseUtilityClassesOptions {
29
+ skipAnimation?: boolean;
30
+ classes?: Partial<BarClasses>;
31
+ }
32
+ export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"root" | "label" | "series" | "seriesLabels" | "element", string>;
@@ -1,3 +1,4 @@
1
+ import { type SeriesId } from "../models/seriesType/common.js";
1
2
  export interface BarClasses {
2
3
  /** Styles applied to the bar plot element. */
3
4
  root: string;
@@ -5,8 +6,27 @@ export interface BarClasses {
5
6
  series: string;
6
7
  /** Styles applied to the group surrounding a series' labels. */
7
8
  seriesLabels: string;
9
+ /** Styles applied to an individual bar element. */
10
+ element: string;
11
+ /** Styles applied to an individual bar label. */
12
+ label: string;
13
+ /** Styles applied to a bar label when it is animated. */
14
+ labelAnimate: string;
8
15
  }
9
16
  export type BarClassKey = keyof BarClasses;
17
+ export interface BarElementOwnerState {
18
+ seriesId: SeriesId;
19
+ dataIndex: number;
20
+ color: string;
21
+ isFaded: boolean;
22
+ isHighlighted: boolean;
23
+ isFocused: boolean;
24
+ classes?: Partial<BarClasses>;
25
+ }
10
26
  export declare function getBarUtilityClass(slot: string): string;
11
27
  export declare const barClasses: BarClasses;
12
- export declare const useUtilityClasses: (classes?: Partial<BarClasses>) => Record<"root" | "series" | "seriesLabels", string>;
28
+ export interface UseUtilityClassesOptions {
29
+ skipAnimation?: boolean;
30
+ classes?: Partial<BarClasses>;
31
+ }
32
+ export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"root" | "label" | "series" | "seriesLabels" | "element", string>;
@@ -13,12 +13,18 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
13
13
  function getBarUtilityClass(slot) {
14
14
  return (0, _generateUtilityClass.default)('MuiBarChart', slot);
15
15
  }
16
- const barClasses = exports.barClasses = (0, _generateUtilityClasses.default)('MuiBarChart', ['root', 'series', 'seriesLabels']);
17
- const useUtilityClasses = classes => {
16
+ const barClasses = exports.barClasses = (0, _generateUtilityClasses.default)('MuiBarChart', ['root', 'series', 'seriesLabels', 'element', 'label', 'labelAnimate']);
17
+ const useUtilityClasses = options => {
18
+ const {
19
+ skipAnimation,
20
+ classes
21
+ } = options ?? {};
18
22
  const slots = {
19
23
  root: ['root'],
20
24
  series: ['series'],
21
- seriesLabels: ['seriesLabels']
25
+ seriesLabels: ['seriesLabels'],
26
+ element: ['element'],
27
+ label: ['label', !skipAnimation && 'labelAnimate']
22
28
  };
23
29
  return (0, _composeClasses.default)(slots, getBarUtilityClass, classes);
24
30
  };
@@ -4,12 +4,18 @@ import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
4
4
  export function getBarUtilityClass(slot) {
5
5
  return generateUtilityClass('MuiBarChart', slot);
6
6
  }
7
- export const barClasses = generateUtilityClasses('MuiBarChart', ['root', 'series', 'seriesLabels']);
8
- export const useUtilityClasses = classes => {
7
+ export const barClasses = generateUtilityClasses('MuiBarChart', ['root', 'series', 'seriesLabels', 'element', 'label', 'labelAnimate']);
8
+ export const useUtilityClasses = options => {
9
+ const {
10
+ skipAnimation,
11
+ classes
12
+ } = options ?? {};
9
13
  const slots = {
10
14
  root: ['root'],
11
15
  series: ['series'],
12
- seriesLabels: ['seriesLabels']
16
+ seriesLabels: ['seriesLabels'],
17
+ element: ['element'],
18
+ label: ['label', !skipAnimation && 'labelAnimate']
13
19
  };
14
20
  return composeClasses(slots, getBarUtilityClass, classes);
15
21
  };
@@ -1,4 +1,8 @@
1
- import { type SeriesId } from "../models/seriesType/common.mjs";
1
+ import type { BarElementOwnerState } from "./barClasses.mjs";
2
+ export { type BarElementOwnerState };
3
+ /**
4
+ * @deprecated Use `BarClasses` from `./barClasses` instead.
5
+ */
2
6
  export interface BarElementClasses {
3
7
  /** Styles applied to the root element. */
4
8
  root: string;
@@ -18,16 +22,19 @@ export interface BarElementClasses {
18
22
  */
19
23
  series: string;
20
24
  }
25
+ /**
26
+ * @deprecated Use `BarClassKey` from `./barClasses` instead.
27
+ */
21
28
  export type BarElementClassKey = keyof BarElementClasses;
22
- export interface BarElementOwnerState {
23
- seriesId: SeriesId;
24
- dataIndex: number;
25
- color: string;
26
- isFaded: boolean;
27
- isHighlighted: boolean;
28
- isFocused: boolean;
29
- classes?: Partial<BarElementClasses>;
30
- }
29
+ /**
30
+ * @deprecated Use `getBarUtilityClass` from `./barClasses` instead.
31
+ */
31
32
  export declare function getBarElementUtilityClass(slot: string): string;
33
+ /**
34
+ * @deprecated Use `barClasses` from `./barClasses` instead.
35
+ */
32
36
  export declare const barElementClasses: BarElementClasses;
37
+ /**
38
+ * @deprecated Use `useBarElementUtilityClasses` from `./barClasses` instead.
39
+ */
33
40
  export declare const useUtilityClasses: (ownerState: BarElementOwnerState) => Record<"root", string>;