@mui/x-charts-pro 9.0.0-alpha.2 → 9.0.0-alpha.4

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 (275) hide show
  1. package/BarChartPro/BarChartPro.d.mts +2 -2
  2. package/BarChartPro/BarChartPro.d.ts +2 -2
  3. package/BarChartPro/BarChartPro.js +43 -10
  4. package/BarChartPro/BarChartPro.mjs +43 -10
  5. package/CHANGELOG.md +246 -1
  6. package/ChartsContainerPro/ChartsContainerPro.d.mts +2 -2
  7. package/ChartsContainerPro/ChartsContainerPro.d.ts +2 -2
  8. package/ChartsContainerPro/ChartsContainerPro.js +2 -2
  9. package/ChartsContainerPro/ChartsContainerPro.mjs +2 -2
  10. package/ChartsContainerPro/useChartsContainerProProps.d.mts +4 -4
  11. package/ChartsContainerPro/useChartsContainerProProps.d.ts +4 -4
  12. package/ChartsContainerPro/useChartsContainerProProps.js +3 -3
  13. package/ChartsContainerPro/useChartsContainerProProps.mjs +3 -3
  14. package/ChartsDataProviderPro/ChartsDataProviderPro.d.mts +2 -2
  15. package/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +2 -2
  16. package/ChartsDataProviderPro/ChartsDataProviderPro.js +8 -11
  17. package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +8 -11
  18. package/ChartsDataProviderPro/useChartsDataProviderProProps.d.mts +1 -1
  19. package/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +1 -1
  20. package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
  21. package/ChartsToolbarPro/ChartsToolbarPro.mjs +2 -2
  22. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
  23. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.mjs +2 -2
  24. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
  25. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.mjs +2 -2
  26. package/ChartsToolbarPro/index.d.mts +2 -1
  27. package/ChartsToolbarPro/index.d.ts +2 -1
  28. package/ChartsToolbarPro/index.mjs +2 -1
  29. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.js +1 -1
  30. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.mjs +2 -2
  31. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.js +1 -1
  32. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.mjs +2 -2
  33. package/FunnelChart/FunnelChart.d.mts +2 -2
  34. package/FunnelChart/FunnelChart.d.ts +2 -2
  35. package/FunnelChart/FunnelChart.js +23 -8
  36. package/FunnelChart/FunnelChart.mjs +23 -8
  37. package/FunnelChart/FunnelPlot.js +8 -3
  38. package/FunnelChart/FunnelPlot.mjs +8 -3
  39. package/FunnelChart/FunnelSection.d.mts +3 -3
  40. package/FunnelChart/FunnelSection.d.ts +3 -3
  41. package/FunnelChart/FunnelSection.js +8 -9
  42. package/FunnelChart/FunnelSection.mjs +8 -9
  43. package/FunnelChart/FunnelSectionLabel.d.mts +9 -3
  44. package/FunnelChart/FunnelSectionLabel.d.ts +9 -3
  45. package/FunnelChart/FunnelSectionLabel.js +15 -6
  46. package/FunnelChart/FunnelSectionLabel.mjs +15 -6
  47. package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.mts +3 -3
  48. package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +3 -3
  49. package/FunnelChart/funnelClasses.d.mts +29 -0
  50. package/FunnelChart/funnelClasses.d.ts +29 -0
  51. package/FunnelChart/funnelClasses.js +29 -0
  52. package/FunnelChart/funnelClasses.mjs +19 -0
  53. package/FunnelChart/index.d.mts +2 -2
  54. package/FunnelChart/index.d.ts +2 -2
  55. package/FunnelChart/index.js +4 -4
  56. package/FunnelChart/index.mjs +1 -1
  57. package/FunnelChart/seriesConfig/legend.js +0 -2
  58. package/FunnelChart/seriesConfig/legend.mjs +0 -2
  59. package/FunnelChart/useFunnelChartProps.d.mts +2 -2
  60. package/FunnelChart/useFunnelChartProps.d.ts +2 -2
  61. package/FunnelChart/useFunnelChartProps.js +2 -2
  62. package/FunnelChart/useFunnelChartProps.mjs +2 -2
  63. package/Heatmap/Heatmap.d.mts +2 -11
  64. package/Heatmap/Heatmap.d.ts +2 -11
  65. package/Heatmap/Heatmap.js +25 -19
  66. package/Heatmap/Heatmap.mjs +25 -19
  67. package/Heatmap/HeatmapCell.d.mts +33 -0
  68. package/Heatmap/HeatmapCell.d.ts +33 -0
  69. package/Heatmap/HeatmapCell.js +62 -0
  70. package/Heatmap/HeatmapCell.mjs +55 -0
  71. package/Heatmap/HeatmapItem.d.mts +1 -9
  72. package/Heatmap/HeatmapItem.d.ts +1 -9
  73. package/Heatmap/HeatmapItem.js +5 -23
  74. package/Heatmap/HeatmapItem.mjs +5 -23
  75. package/Heatmap/HeatmapSVGPlot.js +14 -7
  76. package/Heatmap/HeatmapSVGPlot.mjs +15 -8
  77. package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js +2 -2
  78. package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.mjs +1 -1
  79. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +16 -13
  80. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.mjs +16 -13
  81. package/Heatmap/heatmapClasses.d.mts +6 -1
  82. package/Heatmap/heatmapClasses.d.ts +6 -1
  83. package/Heatmap/heatmapClasses.js +18 -3
  84. package/Heatmap/heatmapClasses.mjs +16 -2
  85. package/Heatmap/index.d.mts +4 -2
  86. package/Heatmap/index.d.ts +4 -2
  87. package/Heatmap/index.js +17 -13
  88. package/Heatmap/index.mjs +2 -1
  89. package/Heatmap/seriesConfig/getColor.js +5 -3
  90. package/Heatmap/seriesConfig/getColor.mjs +5 -3
  91. package/Heatmap/seriesConfig/getItemAtPosition.d.mts +2 -2
  92. package/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
  93. package/Heatmap/seriesConfig/getItemAtPosition.js +3 -11
  94. package/Heatmap/seriesConfig/getItemAtPosition.mjs +3 -11
  95. package/Heatmap/seriesConfig/identifierCleaner.d.mts +3 -0
  96. package/Heatmap/seriesConfig/identifierCleaner.d.ts +3 -0
  97. package/Heatmap/seriesConfig/identifierCleaner.js +15 -0
  98. package/Heatmap/seriesConfig/identifierCleaner.mjs +9 -0
  99. package/Heatmap/seriesConfig/identifierSerializer.d.mts +3 -0
  100. package/Heatmap/seriesConfig/identifierSerializer.d.ts +3 -0
  101. package/Heatmap/seriesConfig/identifierSerializer.js +11 -0
  102. package/Heatmap/seriesConfig/identifierSerializer.mjs +5 -0
  103. package/Heatmap/seriesConfig/index.js +4 -2
  104. package/Heatmap/seriesConfig/index.mjs +5 -3
  105. package/Heatmap/seriesConfig/keyboardFocusHandler.js +6 -19
  106. package/Heatmap/seriesConfig/keyboardFocusHandler.mjs +6 -19
  107. package/Heatmap/seriesConfig/seriesProcessor.js +8 -3
  108. package/Heatmap/seriesConfig/seriesProcessor.mjs +8 -3
  109. package/Heatmap/seriesConfig/tooltip.js +7 -6
  110. package/Heatmap/seriesConfig/tooltip.mjs +7 -6
  111. package/Heatmap/seriesConfig/tooltipPosition.js +3 -4
  112. package/Heatmap/seriesConfig/tooltipPosition.mjs +3 -4
  113. package/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
  114. package/Heatmap/shouldRegisterPointerInteractionsGlobally.mjs +1 -1
  115. package/Heatmap/useHeatmapProps.d.mts +2 -2
  116. package/Heatmap/useHeatmapProps.d.ts +2 -2
  117. package/Heatmap/useHeatmapProps.js +4 -6
  118. package/Heatmap/useHeatmapProps.mjs +4 -6
  119. package/LineChartPro/LineChartPro.d.mts +2 -2
  120. package/LineChartPro/LineChartPro.d.ts +2 -2
  121. package/LineChartPro/LineChartPro.js +40 -13
  122. package/LineChartPro/LineChartPro.mjs +40 -13
  123. package/PieChartPro/PieChartPro.d.mts +2 -2
  124. package/PieChartPro/PieChartPro.d.ts +2 -2
  125. package/PieChartPro/PieChartPro.js +22 -7
  126. package/PieChartPro/PieChartPro.mjs +22 -7
  127. package/RadarChartPro/RadarChartPro.d.mts +1 -1
  128. package/RadarChartPro/RadarChartPro.d.ts +1 -1
  129. package/RadarChartPro/RadarChartPro.js +20 -2
  130. package/RadarChartPro/RadarChartPro.mjs +20 -2
  131. package/SankeyChart/SankeyChart.d.mts +2 -2
  132. package/SankeyChart/SankeyChart.d.ts +2 -2
  133. package/SankeyChart/SankeyChart.js +21 -12
  134. package/SankeyChart/SankeyChart.mjs +21 -12
  135. package/SankeyChart/SankeyDataProvider.d.mts +2 -2
  136. package/SankeyChart/SankeyDataProvider.d.ts +2 -2
  137. package/SankeyChart/SankeyDataProvider.js +2 -2
  138. package/SankeyChart/SankeyDataProvider.mjs +2 -2
  139. package/SankeyChart/SankeyLinkElement.js +7 -3
  140. package/SankeyChart/SankeyLinkElement.mjs +8 -4
  141. package/SankeyChart/SankeyLinkLabel.js +3 -0
  142. package/SankeyChart/SankeyLinkLabel.mjs +3 -0
  143. package/SankeyChart/SankeyLinkLabelPlot.d.mts +2 -2
  144. package/SankeyChart/SankeyLinkLabelPlot.d.ts +2 -2
  145. package/SankeyChart/SankeyLinkLabelPlot.js +1 -1
  146. package/SankeyChart/SankeyLinkLabelPlot.mjs +1 -1
  147. package/SankeyChart/SankeyLinkPlot.d.mts +2 -2
  148. package/SankeyChart/SankeyLinkPlot.d.ts +2 -2
  149. package/SankeyChart/SankeyLinkPlot.js +1 -1
  150. package/SankeyChart/SankeyLinkPlot.mjs +1 -1
  151. package/SankeyChart/SankeyNodeElement.d.mts +1 -1
  152. package/SankeyChart/SankeyNodeElement.d.ts +1 -1
  153. package/SankeyChart/SankeyNodeElement.js +20 -18
  154. package/SankeyChart/SankeyNodeElement.mjs +21 -19
  155. package/SankeyChart/SankeyNodeLabel.js +3 -0
  156. package/SankeyChart/SankeyNodeLabel.mjs +3 -0
  157. package/SankeyChart/SankeyNodeLabelPlot.d.mts +2 -2
  158. package/SankeyChart/SankeyNodeLabelPlot.d.ts +2 -2
  159. package/SankeyChart/SankeyNodeLabelPlot.js +1 -1
  160. package/SankeyChart/SankeyNodeLabelPlot.mjs +1 -1
  161. package/SankeyChart/SankeyNodePlot.d.mts +2 -2
  162. package/SankeyChart/SankeyNodePlot.d.ts +2 -2
  163. package/SankeyChart/SankeyNodePlot.js +1 -1
  164. package/SankeyChart/SankeyNodePlot.mjs +1 -1
  165. package/SankeyChart/SankeyPlot.d.mts +2 -2
  166. package/SankeyChart/SankeyPlot.d.ts +2 -2
  167. package/SankeyChart/SankeyPlot.js +3 -3
  168. package/SankeyChart/SankeyPlot.mjs +3 -3
  169. package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.js +2 -2
  170. package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.mjs +1 -1
  171. package/SankeyChart/index.d.mts +2 -1
  172. package/SankeyChart/index.d.ts +2 -1
  173. package/SankeyChart/index.js +3 -3
  174. package/SankeyChart/index.mjs +1 -1
  175. package/SankeyChart/sankeyClasses.d.mts +15 -6
  176. package/SankeyChart/sankeyClasses.d.ts +15 -6
  177. package/SankeyChart/sankeyClasses.js +12 -8
  178. package/SankeyChart/sankeyClasses.mjs +10 -6
  179. package/SankeyChart/sankeyHighlightHooks.d.mts +2 -2
  180. package/SankeyChart/sankeyHighlightHooks.d.ts +2 -2
  181. package/SankeyChart/sankeyHighlightHooks.js +2 -10
  182. package/SankeyChart/sankeyHighlightHooks.mjs +3 -11
  183. package/SankeyChart/useSankeyChartProps.d.mts +2 -2
  184. package/SankeyChart/useSankeyChartProps.d.ts +2 -2
  185. package/SankeyChart/useSankeyChartProps.js +2 -2
  186. package/SankeyChart/useSankeyChartProps.mjs +2 -2
  187. package/ScatterChartPro/ScatterChartPro.d.mts +2 -2
  188. package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
  189. package/ScatterChartPro/ScatterChartPro.js +62 -17
  190. package/ScatterChartPro/ScatterChartPro.mjs +62 -17
  191. package/context/useChartProApiContext.d.mts +1 -1
  192. package/context/useChartProApiContext.d.ts +1 -1
  193. package/context/useChartProApiContext.js +1 -1
  194. package/context/useChartProApiContext.mjs +1 -1
  195. package/index.d.mts +0 -4
  196. package/index.d.ts +0 -4
  197. package/index.js +2 -34
  198. package/index.mjs +1 -4
  199. package/internals/ChartsWatermark.d.mts +2 -2
  200. package/internals/ChartsWatermark.d.ts +2 -2
  201. package/internals/ChartsWatermark.js +5 -8
  202. package/internals/ChartsWatermark.mjs +3 -6
  203. package/internals/index.d.mts +0 -1
  204. package/internals/index.d.ts +0 -1
  205. package/internals/index.js +0 -8
  206. package/internals/index.mjs +0 -1
  207. package/internals/plugins/allPlugins.d.mts +4 -4
  208. package/internals/plugins/allPlugins.d.ts +4 -4
  209. package/internals/plugins/useChartProExport/common.js +4 -8
  210. package/internals/plugins/useChartProExport/common.mjs +4 -8
  211. package/internals/plugins/useChartProExport/exportImage.js +1 -1
  212. package/internals/plugins/useChartProExport/exportImage.mjs +1 -1
  213. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.mts +1 -1
  214. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
  215. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +16 -1
  216. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.mjs +16 -1
  217. package/models/seriesType/heatmap.d.mts +36 -9
  218. package/models/seriesType/heatmap.d.ts +36 -9
  219. package/models/seriesType/heatmap.js +28 -1
  220. package/models/seriesType/heatmap.mjs +25 -1
  221. package/package.json +5 -61
  222. package/plugins/selectors/useChartHeatmapPosition.selectors.d.mts +2 -2
  223. package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +2 -2
  224. package/plugins/selectors/useChartHeatmapPosition.selectors.js +4 -4
  225. package/plugins/selectors/useChartHeatmapPosition.selectors.mjs +4 -4
  226. package/themeAugmentation/components.d.mts +19 -1
  227. package/themeAugmentation/components.d.ts +19 -1
  228. package/themeAugmentation/overrides.d.mts +5 -2
  229. package/themeAugmentation/overrides.d.ts +5 -2
  230. package/themeAugmentation/props.d.mts +8 -0
  231. package/themeAugmentation/props.d.ts +8 -0
  232. package/typeOverloads/modules.d.mts +2 -2
  233. package/typeOverloads/modules.d.ts +2 -2
  234. package/ChartContainer/index.d.mts +0 -1
  235. package/ChartContainer/index.d.ts +0 -1
  236. package/ChartContainer/index.js +0 -16
  237. package/ChartContainer/index.mjs +0 -2
  238. package/ChartContainerPro/ChartContainerPro.d.mts +0 -21
  239. package/ChartContainerPro/ChartContainerPro.d.ts +0 -21
  240. package/ChartContainerPro/ChartContainerPro.js +0 -24
  241. package/ChartContainerPro/ChartContainerPro.mjs +0 -20
  242. package/ChartContainerPro/index.d.mts +0 -9
  243. package/ChartContainerPro/index.d.ts +0 -9
  244. package/ChartContainerPro/index.js +0 -17
  245. package/ChartContainerPro/index.mjs +0 -6
  246. package/ChartContainerPro/useChartContainerProProps.d.mts +0 -12
  247. package/ChartContainerPro/useChartContainerProProps.d.ts +0 -12
  248. package/ChartContainerPro/useChartContainerProProps.js +0 -19
  249. package/ChartContainerPro/useChartContainerProProps.mjs +0 -14
  250. package/ChartDataProvider/index.d.mts +0 -1
  251. package/ChartDataProvider/index.d.ts +0 -1
  252. package/ChartDataProvider/index.js +0 -16
  253. package/ChartDataProvider/index.mjs +0 -2
  254. package/ChartDataProviderPro/ChartDataProviderPro.d.mts +0 -20
  255. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -20
  256. package/ChartDataProviderPro/ChartDataProviderPro.js +0 -30
  257. package/ChartDataProviderPro/ChartDataProviderPro.mjs +0 -21
  258. package/ChartDataProviderPro/index.d.mts +0 -2
  259. package/ChartDataProviderPro/index.d.ts +0 -2
  260. package/ChartDataProviderPro/index.js +0 -13
  261. package/ChartDataProviderPro/index.mjs +0 -2
  262. package/ChartDataProviderPro/useChartDataProviderProProps.d.mts +0 -10
  263. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -10
  264. package/ChartDataProviderPro/useChartDataProviderProProps.js +0 -12
  265. package/ChartDataProviderPro/useChartDataProviderProProps.mjs +0 -8
  266. package/FunnelChart/funnelSectionClasses.d.mts +0 -30
  267. package/FunnelChart/funnelSectionClasses.d.ts +0 -30
  268. package/FunnelChart/funnelSectionClasses.js +0 -44
  269. package/FunnelChart/funnelSectionClasses.mjs +0 -35
  270. package/Heatmap/internals/HeatmapCell.d.mts +0 -21
  271. package/Heatmap/internals/HeatmapCell.d.ts +0 -21
  272. package/Heatmap/internals/HeatmapCell.js +0 -18
  273. package/Heatmap/internals/HeatmapCell.mjs +0 -12
  274. package/tests/constants.js +0 -7
  275. package/tests/constants.mjs +0 -1
@@ -15,7 +15,7 @@ var _styles = require("@mui/material/styles");
15
15
  var _ChartsSurface = require("@mui/x-charts/ChartsSurface");
16
16
  var _ChartsOverlay = require("@mui/x-charts/ChartsOverlay");
17
17
  var _ChartsWrapper = require("@mui/x-charts/ChartsWrapper");
18
- var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
18
+ var _useChartsContainerProProps = require("../ChartsContainerPro/useChartsContainerProProps");
19
19
  var _SankeyPlot = require("./SankeyPlot");
20
20
  var _useSankeyChartProps = require("./useSankeyChartProps");
21
21
  var _SankeyTooltip = require("./SankeyTooltip");
@@ -44,24 +44,24 @@ const SankeyChart = exports.SankeyChart = /*#__PURE__*/React.forwardRef(function
44
44
  name: 'MuiSankeyChart'
45
45
  });
46
46
  const {
47
- chartContainerProps,
47
+ chartsContainerProps,
48
48
  sankeyPlotProps,
49
49
  overlayProps,
50
50
  chartsWrapperProps,
51
51
  children
52
52
  } = (0, _useSankeyChartProps.useSankeyChartProps)(themedProps);
53
- const _useChartContainerPro = (0, _useChartContainerProProps.useChartContainerProProps)(chartContainerProps),
53
+ const _useChartsContainerPr = (0, _useChartsContainerProProps.useChartsContainerProProps)(chartsContainerProps),
54
54
  {
55
- chartDataProviderProProps: {
55
+ chartsDataProviderProProps: {
56
56
  series
57
57
  },
58
58
  chartsSurfaceProps
59
- } = _useChartContainerPro,
60
- chartDataProviderProProps = (0, _objectWithoutPropertiesLoose2.default)(_useChartContainerPro.chartDataProviderProProps, _excluded);
59
+ } = _useChartsContainerPr,
60
+ chartsDataProviderProProps = (0, _objectWithoutPropertiesLoose2.default)(_useChartsContainerPr.chartsDataProviderProProps, _excluded);
61
61
  const Tooltip = themedProps.slots?.tooltip ?? _SankeyTooltip.SankeyTooltip;
62
62
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SankeyDataProvider.SankeyDataProvider, (0, _extends2.default)({
63
63
  series: series
64
- }, chartDataProviderProProps, {
64
+ }, chartsDataProviderProProps, {
65
65
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
66
66
  ref: ref,
67
67
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
@@ -94,14 +94,19 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
94
94
  * @default rainbowSurgePalette
95
95
  */
96
96
  colors: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.func]),
97
+ /**
98
+ * The description of the chart.
99
+ * Used to provide an accessible description for the chart.
100
+ */
97
101
  desc: _propTypes.default.string,
98
- enableKeyboardNavigation: _propTypes.default.bool,
102
+ /**
103
+ * If `true`, disables keyboard navigation for the chart.
104
+ */
105
+ disableKeyboardNavigation: _propTypes.default.bool,
99
106
  /**
100
107
  * Options to enable features planned for the next major.
101
108
  */
102
- experimentalFeatures: _propTypes.default.shape({
103
- preferStrictDomainInLineCharts: _propTypes.default.bool
104
- }),
109
+ experimentalFeatures: _propTypes.default.object,
105
110
  /**
106
111
  * The height of the chart in px. If not defined, it takes the height of the parent element.
107
112
  */
@@ -194,7 +199,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
194
199
  /**
195
200
  * The callback fired when the tooltip item changes.
196
201
  *
197
- * @param {SeriesItemIdentifier<TSeries> | null} tooltipItem The newly highlighted item.
202
+ * @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
198
203
  */
199
204
  onTooltipItemChange: _propTypes.default.func,
200
205
  /**
@@ -214,6 +219,10 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
214
219
  slots: _propTypes.default.object,
215
220
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
216
221
  theme: _propTypes.default.oneOf(['dark', 'light']),
222
+ /**
223
+ * The title of the chart.
224
+ * Used to provide an accessible label for the chart.
225
+ */
217
226
  title: _propTypes.default.string,
218
227
  /**
219
228
  * The tooltip item.
@@ -9,7 +9,7 @@ import { useThemeProps } from '@mui/material/styles';
9
9
  import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
10
10
  import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
11
11
  import { ChartsWrapper } from '@mui/x-charts/ChartsWrapper';
12
- import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.mjs";
12
+ import { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.mjs";
13
13
  import { SankeyPlot } from "./SankeyPlot.mjs";
14
14
  import { useSankeyChartProps } from "./useSankeyChartProps.mjs";
15
15
  import { SankeyTooltip } from "./SankeyTooltip/index.mjs";
@@ -37,24 +37,24 @@ const SankeyChart = /*#__PURE__*/React.forwardRef(function SankeyChart(props, re
37
37
  name: 'MuiSankeyChart'
38
38
  });
39
39
  const {
40
- chartContainerProps,
40
+ chartsContainerProps,
41
41
  sankeyPlotProps,
42
42
  overlayProps,
43
43
  chartsWrapperProps,
44
44
  children
45
45
  } = useSankeyChartProps(themedProps);
46
- const _useChartContainerPro = useChartContainerProProps(chartContainerProps),
46
+ const _useChartsContainerPr = useChartsContainerProProps(chartsContainerProps),
47
47
  {
48
- chartDataProviderProProps: {
48
+ chartsDataProviderProProps: {
49
49
  series
50
50
  },
51
51
  chartsSurfaceProps
52
- } = _useChartContainerPro,
53
- chartDataProviderProProps = _objectWithoutPropertiesLoose(_useChartContainerPro.chartDataProviderProProps, _excluded);
52
+ } = _useChartsContainerPr,
53
+ chartsDataProviderProProps = _objectWithoutPropertiesLoose(_useChartsContainerPr.chartsDataProviderProProps, _excluded);
54
54
  const Tooltip = themedProps.slots?.tooltip ?? SankeyTooltip;
55
55
  return /*#__PURE__*/_jsx(SankeyDataProvider, _extends({
56
56
  series: series
57
- }, chartDataProviderProProps, {
57
+ }, chartsDataProviderProProps, {
58
58
  children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
59
59
  ref: ref,
60
60
  children: [/*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
@@ -87,14 +87,19 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
87
87
  * @default rainbowSurgePalette
88
88
  */
89
89
  colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
90
+ /**
91
+ * The description of the chart.
92
+ * Used to provide an accessible description for the chart.
93
+ */
90
94
  desc: PropTypes.string,
91
- enableKeyboardNavigation: PropTypes.bool,
95
+ /**
96
+ * If `true`, disables keyboard navigation for the chart.
97
+ */
98
+ disableKeyboardNavigation: PropTypes.bool,
92
99
  /**
93
100
  * Options to enable features planned for the next major.
94
101
  */
95
- experimentalFeatures: PropTypes.shape({
96
- preferStrictDomainInLineCharts: PropTypes.bool
97
- }),
102
+ experimentalFeatures: PropTypes.object,
98
103
  /**
99
104
  * The height of the chart in px. If not defined, it takes the height of the parent element.
100
105
  */
@@ -187,7 +192,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
187
192
  /**
188
193
  * The callback fired when the tooltip item changes.
189
194
  *
190
- * @param {SeriesItemIdentifier<TSeries> | null} tooltipItem The newly highlighted item.
195
+ * @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
191
196
  */
192
197
  onTooltipItemChange: PropTypes.func,
193
198
  /**
@@ -207,6 +212,10 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
207
212
  slots: PropTypes.object,
208
213
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
209
214
  theme: PropTypes.oneOf(['dark', 'light']),
215
+ /**
216
+ * The title of the chart.
217
+ * Used to provide an accessible label for the chart.
218
+ */
210
219
  title: PropTypes.string,
211
220
  /**
212
221
  * The tooltip item.
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import type { ChartContainerProProps } from "../ChartContainerPro/index.mjs";
2
+ import type { ChartsContainerProProps } from "../ChartsContainerPro/index.mjs";
3
3
  import type { SankeySeriesType } from "./sankey.types.mjs";
4
4
  import { type SankeyChartPluginSignatures } from "./SankeyChart.plugins.mjs";
5
- export interface SankeyDataProviderProps extends Omit<ChartContainerProProps<'sankey', SankeyChartPluginSignatures>, 'plugins' | 'series' | 'slotProps' | 'slots' | 'dataset' | 'hideLegend' | 'skipAnimation'> {
5
+ export interface SankeyDataProviderProps extends Omit<ChartsContainerProProps<'sankey', SankeyChartPluginSignatures>, 'plugins' | 'series' | 'slotProps' | 'slots' | 'dataset' | 'hideLegend' | 'skipAnimation'> {
6
6
  children?: React.ReactNode;
7
7
  series: readonly SankeySeriesType[];
8
8
  }
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import type { ChartContainerProProps } from "../ChartContainerPro/index.js";
2
+ import type { ChartsContainerProProps } from "../ChartsContainerPro/index.js";
3
3
  import type { SankeySeriesType } from "./sankey.types.js";
4
4
  import { type SankeyChartPluginSignatures } from "./SankeyChart.plugins.js";
5
- export interface SankeyDataProviderProps extends Omit<ChartContainerProProps<'sankey', SankeyChartPluginSignatures>, 'plugins' | 'series' | 'slotProps' | 'slots' | 'dataset' | 'hideLegend' | 'skipAnimation'> {
5
+ export interface SankeyDataProviderProps extends Omit<ChartsContainerProProps<'sankey', SankeyChartPluginSignatures>, 'plugins' | 'series' | 'slotProps' | 'slots' | 'dataset' | 'hideLegend' | 'skipAnimation'> {
6
6
  children?: React.ReactNode;
7
7
  series: readonly SankeySeriesType[];
8
8
  }
@@ -10,7 +10,7 @@ exports.SankeyDataProvider = SankeyDataProvider;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _SankeyChart = require("./SankeyChart.plugins");
13
- var _ChartDataProviderPro = require("../ChartDataProviderPro");
13
+ var _ChartsDataProviderPro = require("../ChartsDataProviderPro");
14
14
  var _seriesConfig = require("./seriesConfig");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
16
  const seriesConfig = {
@@ -26,7 +26,7 @@ const seriesConfig = {
26
26
  * - [Composition](https://mui.com/x/api/charts/composition/)
27
27
  */
28
28
  function SankeyDataProvider(props) {
29
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, props, {
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsDataProviderPro.ChartsDataProviderPro, (0, _extends2.default)({}, props, {
30
30
  seriesConfig: seriesConfig,
31
31
  plugins: _SankeyChart.SANKEY_CHART_PLUGINS
32
32
  }));
@@ -3,7 +3,7 @@
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import { SANKEY_CHART_PLUGINS } from "./SankeyChart.plugins.mjs";
6
- import { ChartDataProviderPro } from "../ChartDataProviderPro/index.mjs";
6
+ import { ChartsDataProviderPro } from "../ChartsDataProviderPro/index.mjs";
7
7
  import { sankeySeriesConfig } from "./seriesConfig/index.mjs";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  const seriesConfig = {
@@ -19,7 +19,7 @@ const seriesConfig = {
19
19
  * - [Composition](https://mui.com/x/api/charts/composition/)
20
20
  */
21
21
  function SankeyDataProvider(props) {
22
- return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, props, {
22
+ return /*#__PURE__*/_jsx(ChartsDataProviderPro, _extends({}, props, {
23
23
  seriesConfig: seriesConfig,
24
24
  plugins: SANKEY_CHART_PLUGINS
25
25
  }));
@@ -11,6 +11,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
13
13
  var _internals = require("@mui/x-charts/internals");
14
+ var _sankeyHighlightHooks = require("./sankeyHighlightHooks");
15
+ var _sankeyClasses = require("./sankeyClasses");
14
16
  var _jsxRuntime = require("react/jsx-runtime");
15
17
  /**
16
18
  * @ignore - internal component.
@@ -22,7 +24,6 @@ const SankeyLinkElement = exports.SankeyLinkElement = /*#__PURE__*/React.forward
22
24
  onClick,
23
25
  seriesId
24
26
  } = props;
25
- const store = (0, _internals.useStore)();
26
27
  const identifier = {
27
28
  type: 'sankey',
28
29
  seriesId,
@@ -31,11 +32,13 @@ const SankeyLinkElement = exports.SankeyLinkElement = /*#__PURE__*/React.forward
31
32
  sourceId: link.source.id,
32
33
  link
33
34
  };
34
- const isHighlighted = store.use(_internals.selectorChartsIsHighlighted, identifier);
35
- const isFaded = store.use(_internals.selectorChartsIsFaded, identifier);
35
+ const highlightState = (0, _sankeyHighlightHooks.useSankeyLinkHighlightState)(identifier);
36
+ const isFaded = highlightState === 'faded';
37
+ const isHighlighted = highlightState === 'highlighted';
36
38
 
37
39
  // Add interaction props for tooltips
38
40
  const interactionProps = (0, _internals.useInteractionItemProps)(identifier);
41
+ const classes = (0, _sankeyClasses.useUtilityClasses)();
39
42
  const handleClick = (0, _useEventCallback.default)(event => {
40
43
  onClick?.(event, identifier);
41
44
  });
@@ -50,6 +53,7 @@ const SankeyLinkElement = exports.SankeyLinkElement = /*#__PURE__*/React.forward
50
53
  }
51
54
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("path", (0, _extends2.default)({
52
55
  ref: ref,
56
+ className: classes.link,
53
57
  d: link.path,
54
58
  fill: link.color,
55
59
  opacity: finalOpacity,
@@ -3,7 +3,9 @@
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import useEventCallback from '@mui/utils/useEventCallback';
6
- import { selectorChartsIsFaded, selectorChartsIsHighlighted, useInteractionItemProps, useStore } from '@mui/x-charts/internals';
6
+ import { useInteractionItemProps } from '@mui/x-charts/internals';
7
+ import { useSankeyLinkHighlightState } from "./sankeyHighlightHooks.mjs";
8
+ import { useUtilityClasses } from "./sankeyClasses.mjs";
7
9
  import { jsx as _jsx } from "react/jsx-runtime";
8
10
  /**
9
11
  * @ignore - internal component.
@@ -15,7 +17,6 @@ export const SankeyLinkElement = /*#__PURE__*/React.forwardRef(function SankeyLi
15
17
  onClick,
16
18
  seriesId
17
19
  } = props;
18
- const store = useStore();
19
20
  const identifier = {
20
21
  type: 'sankey',
21
22
  seriesId,
@@ -24,11 +25,13 @@ export const SankeyLinkElement = /*#__PURE__*/React.forwardRef(function SankeyLi
24
25
  sourceId: link.source.id,
25
26
  link
26
27
  };
27
- const isHighlighted = store.use(selectorChartsIsHighlighted, identifier);
28
- const isFaded = store.use(selectorChartsIsFaded, identifier);
28
+ const highlightState = useSankeyLinkHighlightState(identifier);
29
+ const isFaded = highlightState === 'faded';
30
+ const isHighlighted = highlightState === 'highlighted';
29
31
 
30
32
  // Add interaction props for tooltips
31
33
  const interactionProps = useInteractionItemProps(identifier);
34
+ const classes = useUtilityClasses();
32
35
  const handleClick = useEventCallback(event => {
33
36
  onClick?.(event, identifier);
34
37
  });
@@ -43,6 +46,7 @@ export const SankeyLinkElement = /*#__PURE__*/React.forwardRef(function SankeyLi
43
46
  }
44
47
  return /*#__PURE__*/_jsx("path", _extends({
45
48
  ref: ref,
49
+ className: classes.link,
46
50
  d: link.path,
47
51
  fill: link.color,
48
52
  opacity: finalOpacity,
@@ -9,6 +9,7 @@ exports.SankeyLinkLabel = void 0;
9
9
  var React = _interopRequireWildcard(require("react"));
10
10
  var _styles = require("@mui/material/styles");
11
11
  var _useSankeySeries = require("../hooks/useSankeySeries");
12
+ var _sankeyClasses = require("./sankeyClasses");
12
13
  var _jsxRuntime = require("react/jsx-runtime");
13
14
  const getLinkMidpoint = link => {
14
15
  if (link.y0 === undefined || link.y1 === undefined) {
@@ -38,6 +39,7 @@ const SankeyLinkLabel = exports.SankeyLinkLabel = /*#__PURE__*/React.forwardRef(
38
39
  } = props;
39
40
  const theme = (0, _styles.useTheme)();
40
41
  const series = (0, _useSankeySeries.useSankeySeries)()[0];
42
+ const classes = (0, _sankeyClasses.useUtilityClasses)();
41
43
  if (!link.path || link.y0 === undefined || link.y1 === undefined) {
42
44
  return null; // No path defined or invalid coordinates, nothing to render
43
45
  }
@@ -52,6 +54,7 @@ const SankeyLinkLabel = exports.SankeyLinkLabel = /*#__PURE__*/React.forwardRef(
52
54
  }) : link.value;
53
55
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("text", {
54
56
  ref: ref,
57
+ className: classes.linkLabel,
55
58
  x: midpoint.x,
56
59
  y: midpoint.y,
57
60
  textAnchor: "middle",
@@ -3,6 +3,7 @@
3
3
  import * as React from 'react';
4
4
  import { useTheme } from '@mui/material/styles';
5
5
  import { useSankeySeries } from "../hooks/useSankeySeries.mjs";
6
+ import { useUtilityClasses } from "./sankeyClasses.mjs";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  const getLinkMidpoint = link => {
8
9
  if (link.y0 === undefined || link.y1 === undefined) {
@@ -32,6 +33,7 @@ export const SankeyLinkLabel = /*#__PURE__*/React.forwardRef(function SankeyLink
32
33
  } = props;
33
34
  const theme = useTheme();
34
35
  const series = useSankeySeries()[0];
36
+ const classes = useUtilityClasses();
35
37
  if (!link.path || link.y0 === undefined || link.y1 === undefined) {
36
38
  return null; // No path defined or invalid coordinates, nothing to render
37
39
  }
@@ -46,6 +48,7 @@ export const SankeyLinkLabel = /*#__PURE__*/React.forwardRef(function SankeyLink
46
48
  }) : link.value;
47
49
  return /*#__PURE__*/_jsx("text", {
48
50
  ref: ref,
51
+ className: classes.linkLabel,
49
52
  x: midpoint.x,
50
53
  y: midpoint.y,
51
54
  textAnchor: "middle",
@@ -1,9 +1,9 @@
1
- import { type SankeyPlotClasses } from "./sankeyClasses.mjs";
1
+ import { type SankeyClasses } from "./sankeyClasses.mjs";
2
2
  export interface SankeyLinkLabelPlotProps {
3
3
  /**
4
4
  * Classes applied to the various elements.
5
5
  */
6
- classes?: Partial<SankeyPlotClasses>;
6
+ classes?: Partial<SankeyClasses>;
7
7
  }
8
8
  declare function SankeyLinkLabelPlot(props: SankeyLinkLabelPlotProps): import("react/jsx-runtime").JSX.Element | null;
9
9
  export { SankeyLinkLabelPlot };
@@ -1,9 +1,9 @@
1
- import { type SankeyPlotClasses } from "./sankeyClasses.js";
1
+ import { type SankeyClasses } from "./sankeyClasses.js";
2
2
  export interface SankeyLinkLabelPlotProps {
3
3
  /**
4
4
  * Classes applied to the various elements.
5
5
  */
6
- classes?: Partial<SankeyPlotClasses>;
6
+ classes?: Partial<SankeyClasses>;
7
7
  }
8
8
  declare function SankeyLinkLabelPlot(props: SankeyLinkLabelPlotProps): import("react/jsx-runtime").JSX.Element | null;
9
9
  export { SankeyLinkLabelPlot };
@@ -21,7 +21,7 @@ function SankeyLinkLabelPlot(props) {
21
21
  const sankeySeries = (0, _useSankeySeries.useSankeySeries)()[0];
22
22
  const layout = (0, _useSankeySeries.useSankeyLayout)();
23
23
  if (!sankeySeries) {
24
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartDataProviderPro.` : (0, _formatErrorMessage2.default)(46));
24
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartsDataProviderPro.` : (0, _formatErrorMessage2.default)(46));
25
25
  }
26
26
 
27
27
  // Early return if no data or dimensions
@@ -15,7 +15,7 @@ function SankeyLinkLabelPlot(props) {
15
15
  const sankeySeries = useSankeySeries()[0];
16
16
  const layout = useSankeyLayout();
17
17
  if (!sankeySeries) {
18
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartDataProviderPro.` : _formatErrorMessage(46));
18
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartsDataProviderPro.` : _formatErrorMessage(46));
19
19
  }
20
20
 
21
21
  // Early return if no data or dimensions
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import type { SankeyLinkIdentifierWithData } from "./sankey.types.mjs";
3
- import { type SankeyPlotClasses } from "./sankeyClasses.mjs";
3
+ import { type SankeyClasses } from "./sankeyClasses.mjs";
4
4
  export interface SankeyLinkPlotProps {
5
5
  /**
6
6
  * Classes applied to the various elements.
7
7
  */
8
- classes?: Partial<SankeyPlotClasses>;
8
+ classes?: Partial<SankeyClasses>;
9
9
  /**
10
10
  * Callback fired when a sankey item is clicked.
11
11
  * @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import type { SankeyLinkIdentifierWithData } from "./sankey.types.js";
3
- import { type SankeyPlotClasses } from "./sankeyClasses.js";
3
+ import { type SankeyClasses } from "./sankeyClasses.js";
4
4
  export interface SankeyLinkPlotProps {
5
5
  /**
6
6
  * Classes applied to the various elements.
7
7
  */
8
- classes?: Partial<SankeyPlotClasses>;
8
+ classes?: Partial<SankeyClasses>;
9
9
  /**
10
10
  * Callback fired when a sankey item is clicked.
11
11
  * @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
@@ -37,7 +37,7 @@ function SankeyLinkPlot(props) {
37
37
  const sankeySeries = (0, _useSankeySeries.useSankeySeries)()[0];
38
38
  const layout = (0, _useSankeySeries.useSankeyLayout)();
39
39
  if (!sankeySeries) {
40
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartDataProviderPro.` : (0, _formatErrorMessage2.default)(46));
40
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartsDataProviderPro.` : (0, _formatErrorMessage2.default)(46));
41
41
  }
42
42
 
43
43
  // Early return if no data or dimensions
@@ -30,7 +30,7 @@ function SankeyLinkPlot(props) {
30
30
  const sankeySeries = useSankeySeries()[0];
31
31
  const layout = useSankeyLayout();
32
32
  if (!sankeySeries) {
33
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartDataProviderPro.` : _formatErrorMessage(46));
33
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartsDataProviderPro.` : _formatErrorMessage(46));
34
34
  }
35
35
 
36
36
  // Early return if no data or dimensions
@@ -20,4 +20,4 @@ export interface SankeyNodeElementProps {
20
20
  /**
21
21
  * @ignore - internal component.
22
22
  */
23
- export declare const SankeyNodeElement: React.ForwardRefExoticComponent<SankeyNodeElementProps & React.RefAttributes<SVGGElement>>;
23
+ export declare const SankeyNodeElement: React.ForwardRefExoticComponent<SankeyNodeElementProps & React.RefAttributes<SVGRectElement>>;
@@ -20,4 +20,4 @@ export interface SankeyNodeElementProps {
20
20
  /**
21
21
  * @ignore - internal component.
22
22
  */
23
- export declare const SankeyNodeElement: React.ForwardRefExoticComponent<SankeyNodeElementProps & React.RefAttributes<SVGGElement>>;
23
+ export declare const SankeyNodeElement: React.ForwardRefExoticComponent<SankeyNodeElementProps & React.RefAttributes<SVGRectElement>>;
@@ -11,6 +11,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
13
13
  var _internals = require("@mui/x-charts/internals");
14
+ var _sankeyHighlightHooks = require("./sankeyHighlightHooks");
15
+ var _sankeyClasses = require("./sankeyClasses");
14
16
  var _jsxRuntime = require("react/jsx-runtime");
15
17
  /**
16
18
  * @ignore - internal component.
@@ -21,7 +23,6 @@ const SankeyNodeElement = exports.SankeyNodeElement = /*#__PURE__*/React.forward
21
23
  onClick,
22
24
  seriesId
23
25
  } = props;
24
- const store = (0, _internals.useStore)();
25
26
  const x0 = node.x0 ?? 0;
26
27
  const y0 = node.y0 ?? 0;
27
28
  const x1 = node.x1 ?? 0;
@@ -35,11 +36,13 @@ const SankeyNodeElement = exports.SankeyNodeElement = /*#__PURE__*/React.forward
35
36
  nodeId: node.id,
36
37
  node
37
38
  };
38
- const isHighlighted = store.use(_internals.selectorChartsIsHighlighted, identifier);
39
- const isFaded = store.use(_internals.selectorChartsIsFaded, identifier);
39
+ const highlightState = (0, _sankeyHighlightHooks.useSankeyNodeHighlightState)(identifier);
40
+ const isFaded = highlightState === 'faded';
41
+ const isHighlighted = highlightState === 'highlighted';
40
42
 
41
43
  // Add interaction props for tooltips
42
44
  const interactionProps = (0, _internals.useInteractionItemProps)(identifier);
45
+ const classes = (0, _sankeyClasses.useUtilityClasses)();
43
46
  const handleClick = (0, _useEventCallback.default)(event => {
44
47
  onClick?.(event, identifier);
45
48
  });
@@ -49,22 +52,21 @@ const SankeyNodeElement = exports.SankeyNodeElement = /*#__PURE__*/React.forward
49
52
  } else if (isHighlighted) {
50
53
  opacity = 1;
51
54
  }
52
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
55
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", (0, _extends2.default)({
56
+ x: node.x0,
57
+ y: node.y0,
58
+ width: nodeWidth,
59
+ height: nodeHeight,
60
+ fill: node.color,
61
+ opacity: opacity,
62
+ onClick: onClick ? handleClick : undefined,
63
+ cursor: onClick ? 'pointer' : 'default',
64
+ stroke: "none",
65
+ "data-highlighted": isHighlighted || undefined,
66
+ "data-faded": isFaded || undefined,
53
67
  ref: ref,
54
68
  "data-node": node.id,
55
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", (0, _extends2.default)({
56
- x: node.x0,
57
- y: node.y0,
58
- width: nodeWidth,
59
- height: nodeHeight,
60
- fill: node.color,
61
- opacity: opacity,
62
- onClick: onClick ? handleClick : undefined,
63
- cursor: onClick ? 'pointer' : 'default',
64
- stroke: "none",
65
- "data-highlighted": isHighlighted || undefined,
66
- "data-faded": isFaded || undefined
67
- }, interactionProps))
68
- });
69
+ className: classes.node
70
+ }, interactionProps));
69
71
  });
70
72
  if (process.env.NODE_ENV !== "production") SankeyNodeElement.displayName = "SankeyNodeElement";
@@ -3,7 +3,9 @@
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import useEventCallback from '@mui/utils/useEventCallback';
6
- import { selectorChartsIsFaded, selectorChartsIsHighlighted, useInteractionItemProps, useStore } from '@mui/x-charts/internals';
6
+ import { useInteractionItemProps } from '@mui/x-charts/internals';
7
+ import { useSankeyNodeHighlightState } from "./sankeyHighlightHooks.mjs";
8
+ import { useUtilityClasses } from "./sankeyClasses.mjs";
7
9
  import { jsx as _jsx } from "react/jsx-runtime";
8
10
  /**
9
11
  * @ignore - internal component.
@@ -14,7 +16,6 @@ export const SankeyNodeElement = /*#__PURE__*/React.forwardRef(function SankeyNo
14
16
  onClick,
15
17
  seriesId
16
18
  } = props;
17
- const store = useStore();
18
19
  const x0 = node.x0 ?? 0;
19
20
  const y0 = node.y0 ?? 0;
20
21
  const x1 = node.x1 ?? 0;
@@ -28,11 +29,13 @@ export const SankeyNodeElement = /*#__PURE__*/React.forwardRef(function SankeyNo
28
29
  nodeId: node.id,
29
30
  node
30
31
  };
31
- const isHighlighted = store.use(selectorChartsIsHighlighted, identifier);
32
- const isFaded = store.use(selectorChartsIsFaded, identifier);
32
+ const highlightState = useSankeyNodeHighlightState(identifier);
33
+ const isFaded = highlightState === 'faded';
34
+ const isHighlighted = highlightState === 'highlighted';
33
35
 
34
36
  // Add interaction props for tooltips
35
37
  const interactionProps = useInteractionItemProps(identifier);
38
+ const classes = useUtilityClasses();
36
39
  const handleClick = useEventCallback(event => {
37
40
  onClick?.(event, identifier);
38
41
  });
@@ -42,22 +45,21 @@ export const SankeyNodeElement = /*#__PURE__*/React.forwardRef(function SankeyNo
42
45
  } else if (isHighlighted) {
43
46
  opacity = 1;
44
47
  }
45
- return /*#__PURE__*/_jsx("g", {
48
+ return /*#__PURE__*/_jsx("rect", _extends({
49
+ x: node.x0,
50
+ y: node.y0,
51
+ width: nodeWidth,
52
+ height: nodeHeight,
53
+ fill: node.color,
54
+ opacity: opacity,
55
+ onClick: onClick ? handleClick : undefined,
56
+ cursor: onClick ? 'pointer' : 'default',
57
+ stroke: "none",
58
+ "data-highlighted": isHighlighted || undefined,
59
+ "data-faded": isFaded || undefined,
46
60
  ref: ref,
47
61
  "data-node": node.id,
48
- children: /*#__PURE__*/_jsx("rect", _extends({
49
- x: node.x0,
50
- y: node.y0,
51
- width: nodeWidth,
52
- height: nodeHeight,
53
- fill: node.color,
54
- opacity: opacity,
55
- onClick: onClick ? handleClick : undefined,
56
- cursor: onClick ? 'pointer' : 'default',
57
- stroke: "none",
58
- "data-highlighted": isHighlighted || undefined,
59
- "data-faded": isFaded || undefined
60
- }, interactionProps))
61
- });
62
+ className: classes.node
63
+ }, interactionProps));
62
64
  });
63
65
  if (process.env.NODE_ENV !== "production") SankeyNodeElement.displayName = "SankeyNodeElement";
@@ -9,6 +9,7 @@ exports.SankeyNodeLabel = void 0;
9
9
  var React = _interopRequireWildcard(require("react"));
10
10
  var _styles = require("@mui/material/styles");
11
11
  var _sankeyHighlightHooks = require("./sankeyHighlightHooks");
12
+ var _sankeyClasses = require("./sankeyClasses");
12
13
  var _jsxRuntime = require("react/jsx-runtime");
13
14
  /**
14
15
  * @ignore - internal component.
@@ -30,6 +31,7 @@ const SankeyNodeLabel = exports.SankeyNodeLabel = /*#__PURE__*/React.forwardRef(
30
31
  : x0 - 6; // Left side for other columns
31
32
 
32
33
  const labelAnchor = isRightSide ? 'start' : 'end';
34
+ const classes = (0, _sankeyClasses.useUtilityClasses)();
33
35
  const highlightState = (0, _sankeyHighlightHooks.useSankeyNodeHighlightState)(React.useMemo(() => ({
34
36
  type: 'sankey',
35
37
  subType: 'node',
@@ -47,6 +49,7 @@ const SankeyNodeLabel = exports.SankeyNodeLabel = /*#__PURE__*/React.forwardRef(
47
49
  }
48
50
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("text", {
49
51
  ref: ref,
52
+ className: classes.nodeLabel,
50
53
  x: labelX,
51
54
  y: (y0 + y1) / 2,
52
55
  textAnchor: labelAnchor,