@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.
- package/BarChart/AnimatedBarElement.d.mts +1 -1
- package/BarChart/AnimatedBarElement.d.ts +1 -1
- package/BarChart/BarChart.js +5 -2
- package/BarChart/BarChart.mjs +5 -2
- package/BarChart/BarElement.d.mts +1 -1
- package/BarChart/BarElement.d.ts +1 -1
- package/BarChart/BarElement.js +8 -7
- package/BarChart/BarElement.mjs +8 -7
- package/BarChart/BarLabel/BarLabel.js +4 -0
- package/BarChart/BarLabel/BarLabel.mjs +4 -0
- package/BarChart/BarLabel/BarLabel.types.d.mts +2 -2
- package/BarChart/BarLabel/BarLabel.types.d.ts +2 -2
- package/BarChart/BarLabel/BarLabelItem.js +8 -7
- package/BarChart/BarLabel/BarLabelItem.mjs +8 -7
- package/BarChart/BarLabel/barLabelClasses.d.mts +15 -0
- package/BarChart/BarLabel/barLabelClasses.d.ts +15 -0
- package/BarChart/BarLabel/barLabelClasses.js +19 -0
- package/BarChart/BarLabel/barLabelClasses.mjs +20 -0
- package/BarChart/BarPlot.js +1 -2
- package/BarChart/BarPlot.mjs +2 -3
- package/BarChart/barClasses.d.mts +21 -1
- package/BarChart/barClasses.d.ts +21 -1
- package/BarChart/barClasses.js +9 -3
- package/BarChart/barClasses.mjs +9 -3
- package/BarChart/barElementClasses.d.mts +17 -10
- package/BarChart/barElementClasses.d.ts +17 -10
- package/BarChart/barElementClasses.js +19 -0
- package/BarChart/barElementClasses.mjs +20 -0
- package/BarChart/index.d.mts +1 -1
- package/BarChart/index.d.ts +1 -1
- package/BarChart/index.js +1 -8
- package/BarChart/index.mjs +1 -1
- package/CHANGELOG.md +123 -1
- package/ChartContainer/ChartContainer.d.mts +1 -1
- package/ChartContainer/ChartContainer.d.ts +1 -1
- package/ChartContainer/useChartContainerProps.d.mts +2 -2
- package/ChartContainer/useChartContainerProps.d.ts +2 -2
- package/ChartDataProvider/ChartDataProvider.d.mts +1 -1
- package/ChartDataProvider/ChartDataProvider.d.ts +1 -1
- package/ChartDataProvider/useChartDataProviderProps.d.mts +2 -2
- package/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
- package/ChartsContainer/ChartsContainer.d.mts +1 -1
- package/ChartsContainer/ChartsContainer.d.ts +1 -1
- package/ChartsContainer/ChartsContainer.js +5 -2
- package/ChartsContainer/ChartsContainer.mjs +5 -2
- package/ChartsContainer/useChartsContainerProps.d.mts +3 -3
- package/ChartsContainer/useChartsContainerProps.d.ts +3 -3
- package/ChartsContainer/useChartsContainerProps.js +3 -3
- package/ChartsContainer/useChartsContainerProps.mjs +3 -3
- package/ChartsDataProvider/ChartsDataProvider.d.mts +2 -2
- package/ChartsDataProvider/ChartsDataProvider.d.ts +2 -2
- package/ChartsDataProvider/useChartsDataProviderProps.d.mts +2 -2
- package/ChartsDataProvider/useChartsDataProviderProps.d.ts +2 -2
- package/ChartsLabel/ChartsLabelMark.d.mts +8 -1
- package/ChartsLabel/ChartsLabelMark.d.ts +8 -1
- package/ChartsLabel/ChartsLabelMark.js +29 -3
- package/ChartsLabel/ChartsLabelMark.mjs +29 -3
- package/ChartsLabel/labelMarkClasses.d.mts +2 -0
- package/ChartsLabel/labelMarkClasses.d.ts +2 -0
- package/ChartsLabel/labelMarkClasses.js +1 -1
- package/ChartsLabel/labelMarkClasses.mjs +1 -1
- package/ChartsLegend/ChartsLegend.js +4 -2
- package/ChartsLegend/ChartsLegend.mjs +4 -2
- package/ChartsLegend/legendContext.types.d.mts +1 -0
- package/ChartsLegend/legendContext.types.d.ts +1 -0
- package/ChartsTooltip/ChartsAxisTooltipContent.js +3 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.mjs +3 -1
- package/ChartsTooltip/ChartsItemTooltipContent.js +6 -2
- package/ChartsTooltip/ChartsItemTooltipContent.mjs +6 -2
- package/ChartsTooltip/ChartsTooltipContainer.js +7 -5
- package/ChartsTooltip/ChartsTooltipContainer.mjs +6 -4
- package/ChartsTooltip/ChartsTooltipTable.d.mts +1 -1
- package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/ChartsTooltip/useAxesTooltip.d.mts +1 -0
- package/ChartsTooltip/useAxesTooltip.d.ts +1 -0
- package/ChartsTooltip/useAxesTooltip.js +6 -4
- package/ChartsTooltip/useAxesTooltip.mjs +6 -4
- package/ChartsTooltip/useItemTooltip.d.mts +5 -3
- package/ChartsTooltip/useItemTooltip.d.ts +5 -3
- package/ChartsXAxis/useAxisTicksProps.d.mts +286 -286
- package/ChartsXAxis/useAxisTicksProps.d.ts +286 -286
- package/ChartsYAxis/useAxisTicksProps.d.mts +286 -286
- package/ChartsYAxis/useAxisTicksProps.d.ts +286 -286
- package/LineChart/AreaElement.d.mts +12 -0
- package/LineChart/AreaElement.d.ts +12 -0
- package/LineChart/AreaElement.js +28 -9
- package/LineChart/AreaElement.mjs +30 -9
- package/LineChart/AreaPlot.js +10 -4
- package/LineChart/AreaPlot.mjs +11 -5
- package/LineChart/CircleMarkElement.js +9 -2
- package/LineChart/CircleMarkElement.mjs +10 -3
- package/LineChart/LineChart.js +5 -2
- package/LineChart/LineChart.mjs +5 -2
- package/LineChart/LineElement.d.mts +12 -0
- package/LineChart/LineElement.d.ts +12 -0
- package/LineChart/LineElement.js +28 -9
- package/LineChart/LineElement.mjs +30 -9
- package/LineChart/LineHighlightElement.d.mts +12 -0
- package/LineChart/LineHighlightElement.d.ts +12 -0
- package/LineChart/LineHighlightElement.js +22 -3
- package/LineChart/LineHighlightElement.mjs +24 -3
- package/LineChart/LinePlot.js +11 -5
- package/LineChart/LinePlot.mjs +12 -6
- package/LineChart/MarkElement.js +9 -2
- package/LineChart/MarkElement.mjs +10 -3
- package/LineChart/MarkPlot.js +19 -9
- package/LineChart/MarkPlot.mjs +20 -10
- package/LineChart/index.d.mts +3 -1
- package/LineChart/index.d.ts +3 -1
- package/LineChart/index.js +10 -2
- package/LineChart/index.mjs +2 -1
- package/LineChart/lineClasses.d.mts +34 -0
- package/LineChart/lineClasses.d.ts +34 -0
- package/LineChart/lineClasses.js +32 -0
- package/LineChart/lineClasses.mjs +23 -0
- package/LineChart/markElementClasses.d.mts +17 -8
- package/LineChart/markElementClasses.d.ts +17 -8
- package/LineChart/markElementClasses.js +19 -0
- package/LineChart/markElementClasses.mjs +20 -0
- package/LineChart/seriesConfig/legend.js +1 -0
- package/LineChart/seriesConfig/legend.mjs +1 -0
- package/LineChart/seriesConfig/seriesProcessor.js +1 -1
- package/LineChart/seriesConfig/seriesProcessor.mjs +1 -1
- package/LineChart/seriesConfig/tooltip.js +2 -1
- package/LineChart/seriesConfig/tooltip.mjs +2 -1
- package/PieChart/FocusedPieArc.js +8 -6
- package/PieChart/FocusedPieArc.mjs +8 -6
- package/PieChart/PieArc.d.mts +14 -11
- package/PieChart/PieArc.d.ts +14 -11
- package/PieChart/PieArc.js +22 -4
- package/PieChart/PieArc.mjs +24 -4
- package/PieChart/PieArcLabel.d.mts +16 -2
- package/PieChart/PieArcLabel.d.ts +16 -2
- package/PieChart/PieArcLabel.js +26 -5
- package/PieChart/PieArcLabel.mjs +28 -5
- package/PieChart/PieArcLabelPlot.js +6 -1
- package/PieChart/PieArcLabelPlot.mjs +6 -1
- package/PieChart/PieArcPlot.js +6 -1
- package/PieChart/PieArcPlot.mjs +6 -1
- package/PieChart/PieChart.js +5 -2
- package/PieChart/PieChart.mjs +5 -2
- package/PieChart/PiePlot.d.mts +1 -0
- package/PieChart/PiePlot.d.ts +1 -0
- package/PieChart/PiePlot.js +4 -1
- package/PieChart/PiePlot.mjs +4 -1
- package/PieChart/dataTransform/useTransformData.js +6 -8
- package/PieChart/dataTransform/useTransformData.mjs +6 -8
- package/PieChart/pieClasses.d.mts +22 -1
- package/PieChart/pieClasses.d.ts +22 -1
- package/PieChart/pieClasses.js +10 -3
- package/PieChart/pieClasses.mjs +10 -3
- package/RadarChart/RadarChart.js +5 -2
- package/RadarChart/RadarChart.mjs +5 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.mts +3 -3
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +3 -3
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.mts +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +4 -9
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +4 -9
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.mts +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -16
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.mjs +8 -16
- package/RadarChart/seriesConfig/tooltip.js +13 -8
- package/RadarChart/seriesConfig/tooltip.mjs +13 -8
- package/RadarChart/useRadarChartProps.js +3 -3
- package/RadarChart/useRadarChartProps.mjs +3 -3
- package/ScatterChart/BatchScatter.d.mts +2 -1
- package/ScatterChart/BatchScatter.d.ts +2 -1
- package/ScatterChart/BatchScatter.js +5 -3
- package/ScatterChart/BatchScatter.mjs +4 -3
- package/ScatterChart/FocusedScatterMark.d.mts +4 -1
- package/ScatterChart/FocusedScatterMark.d.ts +4 -1
- package/ScatterChart/FocusedScatterMark.js +12 -2
- package/ScatterChart/FocusedScatterMark.mjs +11 -1
- package/ScatterChart/Scatter.d.mts +1 -1
- package/ScatterChart/Scatter.d.ts +1 -1
- package/ScatterChart/Scatter.js +11 -9
- package/ScatterChart/Scatter.mjs +11 -9
- package/ScatterChart/ScatterChart.js +5 -2
- package/ScatterChart/ScatterChart.mjs +5 -2
- package/ScatterChart/ScatterPlot.d.mts +2 -1
- package/ScatterChart/ScatterPlot.d.ts +2 -1
- package/ScatterChart/ScatterPlot.js +16 -2
- package/ScatterChart/ScatterPlot.mjs +16 -2
- package/ScatterChart/index.d.mts +2 -2
- package/ScatterChart/index.d.ts +2 -2
- package/ScatterChart/scatterClasses.d.mts +14 -2
- package/ScatterChart/scatterClasses.d.ts +14 -2
- package/ScatterChart/scatterClasses.js +9 -3
- package/ScatterChart/scatterClasses.mjs +9 -3
- package/SparkLineChart/SparkLineChart.js +5 -2
- package/SparkLineChart/SparkLineChart.mjs +5 -2
- package/context/ChartApi.d.mts +1 -1
- package/context/ChartApi.d.ts +1 -1
- package/context/ChartProvider/ChartProvider.types.d.mts +2 -2
- package/context/ChartProvider/ChartProvider.types.d.ts +2 -2
- package/context/ChartsProvider/ChartsProvider.d.mts +1 -1
- package/context/ChartsProvider/ChartsProvider.d.ts +1 -1
- package/context/ChartsProvider/ChartsProvider.types.d.mts +3 -3
- package/context/ChartsProvider/ChartsProvider.types.d.ts +3 -3
- package/hooks/index.d.mts +2 -2
- package/hooks/index.d.ts +2 -2
- package/hooks/index.js +8 -8
- package/hooks/index.mjs +2 -2
- package/hooks/useInteractionItemProps.d.mts +1 -2
- package/hooks/useInteractionItemProps.d.ts +1 -2
- package/hooks/{useItemHighlighted.d.mts → useItemHighlightState.d.mts} +5 -13
- package/hooks/{useItemHighlighted.d.ts → useItemHighlightState.d.ts} +5 -13
- package/hooks/{useItemHighlighted.js → useItemHighlightState.js} +5 -10
- package/hooks/useItemHighlightState.mjs +17 -0
- package/hooks/useItemHighlightStateGetter.d.mts +9 -0
- package/hooks/useItemHighlightStateGetter.d.ts +9 -0
- package/hooks/useItemHighlightStateGetter.js +21 -0
- package/hooks/useItemHighlightStateGetter.mjs +16 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/commonNextFocusItem.d.mts +5 -5
- package/internals/commonNextFocusItem.d.ts +5 -5
- package/internals/createCommonKeyboardFocusHandler.d.mts +2 -2
- package/internals/createCommonKeyboardFocusHandler.d.ts +2 -2
- package/internals/identifierCleaner.d.mts +8 -4
- package/internals/identifierCleaner.d.ts +8 -4
- package/internals/identifierCleaner.js +5 -1
- package/internals/identifierCleaner.mjs +5 -1
- package/internals/identifierSerializer.d.mts +10 -2
- package/internals/identifierSerializer.d.ts +10 -2
- package/internals/identifierSerializer.js +8 -0
- package/internals/identifierSerializer.mjs +8 -0
- package/internals/plugins/allPlugins.d.mts +2 -2
- package/internals/plugins/allPlugins.d.ts +2 -2
- package/internals/plugins/corePlugins/corePlugins.d.mts +1 -1
- package/internals/plugins/corePlugins/corePlugins.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.mts +6 -6
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +6 -6
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.mts +9 -9
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +9 -9
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +28 -28
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +28 -28
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesLayout.types.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesLayout.types.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.d.mts +6 -6
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.d.ts +6 -6
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +21 -11
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +21 -11
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.mts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.ts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.mts +10 -10
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.ts +10 -10
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/serializeIdentifier.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/serializeIdentifier.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.mts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.mts +1 -2
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +1 -2
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +0 -5
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.mjs +0 -4
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.mts +10 -29
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +10 -29
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +27 -64
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.mjs +24 -60
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.mts +3 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +8 -10
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +8 -10
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +8 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +8 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +6 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.mjs +6 -4
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.mts +10 -10
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +10 -10
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.mts +16 -16
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +16 -16
- package/internals/plugins/models/chart.d.mts +1 -1
- package/internals/plugins/models/chart.d.ts +1 -1
- package/models/seriesType/config.d.mts +18 -6
- package/models/seriesType/config.d.ts +18 -6
- package/models/seriesType/index.d.mts +8 -8
- package/models/seriesType/index.d.ts +8 -8
- package/models/seriesType/line.d.mts +2 -1
- package/models/seriesType/line.d.ts +2 -1
- package/models/seriesType/radar.d.mts +1 -1
- package/models/seriesType/radar.d.ts +1 -1
- package/package.json +3 -3
- package/themeAugmentation/components.d.mts +26 -1
- package/themeAugmentation/components.d.ts +26 -1
- package/themeAugmentation/overrides.d.mts +15 -1
- package/themeAugmentation/overrides.d.ts +15 -1
- package/hooks/useItemHighlighted.mjs +0 -22
- package/hooks/useItemHighlightedGetter.d.mts +0 -53
- package/hooks/useItemHighlightedGetter.d.ts +0 -53
- package/hooks/useItemHighlightedGetter.js +0 -26
- package/hooks/useItemHighlightedGetter.mjs +0 -21
|
@@ -2,6 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
3
3
|
import { type AnimatedAreaProps } from "./AnimatedArea.mjs";
|
|
4
4
|
import { type SeriesId } from "../models/seriesType/common.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
7
|
+
*/
|
|
5
8
|
export interface AreaElementClasses {
|
|
6
9
|
/** Styles applied to the root element. */
|
|
7
10
|
root: string;
|
|
@@ -21,6 +24,9 @@ export interface AreaElementClasses {
|
|
|
21
24
|
*/
|
|
22
25
|
series: string;
|
|
23
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
29
|
+
*/
|
|
24
30
|
export type AreaElementClassKey = keyof AreaElementClasses;
|
|
25
31
|
export interface AreaElementOwnerState {
|
|
26
32
|
seriesId: SeriesId;
|
|
@@ -30,7 +36,13 @@ export interface AreaElementOwnerState {
|
|
|
30
36
|
isHighlighted: boolean;
|
|
31
37
|
classes?: Partial<AreaElementClasses>;
|
|
32
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
41
|
+
*/
|
|
33
42
|
export declare function getAreaElementUtilityClass(slot: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
45
|
+
*/
|
|
34
46
|
export declare const areaElementClasses: AreaElementClasses;
|
|
35
47
|
export interface AreaElementSlots {
|
|
36
48
|
/**
|
|
@@ -2,6 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
3
3
|
import { type AnimatedAreaProps } from "./AnimatedArea.js";
|
|
4
4
|
import { type SeriesId } from "../models/seriesType/common.js";
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
7
|
+
*/
|
|
5
8
|
export interface AreaElementClasses {
|
|
6
9
|
/** Styles applied to the root element. */
|
|
7
10
|
root: string;
|
|
@@ -21,6 +24,9 @@ export interface AreaElementClasses {
|
|
|
21
24
|
*/
|
|
22
25
|
series: string;
|
|
23
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
29
|
+
*/
|
|
24
30
|
export type AreaElementClassKey = keyof AreaElementClasses;
|
|
25
31
|
export interface AreaElementOwnerState {
|
|
26
32
|
seriesId: SeriesId;
|
|
@@ -30,7 +36,13 @@ export interface AreaElementOwnerState {
|
|
|
30
36
|
isHighlighted: boolean;
|
|
31
37
|
classes?: Partial<AreaElementClasses>;
|
|
32
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
41
|
+
*/
|
|
33
42
|
export declare function getAreaElementUtilityClass(slot: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
45
|
+
*/
|
|
34
46
|
export declare const areaElementClasses: AreaElementClasses;
|
|
35
47
|
export interface AreaElementSlots {
|
|
36
48
|
/**
|
package/LineChart/AreaElement.js
CHANGED
|
@@ -18,15 +18,33 @@ var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
|
18
18
|
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
19
19
|
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
20
20
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
21
|
-
var
|
|
21
|
+
var _useItemHighlightState = require("../hooks/useItemHighlightState");
|
|
22
22
|
var _AnimatedArea = require("./AnimatedArea");
|
|
23
|
+
var _lineClasses = require("./lineClasses");
|
|
23
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
25
|
const _excluded = ["seriesId", "classes", "color", "gradientId", "slots", "slotProps", "onClick"];
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
34
|
+
*/
|
|
25
35
|
function getAreaElementUtilityClass(slot) {
|
|
26
36
|
return (0, _generateUtilityClass.default)('MuiAreaElement', slot);
|
|
27
37
|
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
41
|
+
*/
|
|
28
42
|
const areaElementClasses = exports.areaElementClasses = (0, _generateUtilityClasses.default)('MuiAreaElement', ['root', 'highlighted', 'faded', 'series']);
|
|
29
|
-
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
|
|
46
|
+
*/
|
|
47
|
+
const useDeprecatedUtilityClasses = ownerState => {
|
|
30
48
|
const {
|
|
31
49
|
classes,
|
|
32
50
|
seriesId,
|
|
@@ -64,10 +82,9 @@ function AreaElement(props) {
|
|
|
64
82
|
seriesId
|
|
65
83
|
}), [seriesId]);
|
|
66
84
|
const interactionProps = (0, _useInteractionItemProps.useInteractionItemProps)(identifier);
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
} = (0, _useItemHighlighted.useItemHighlighted)(identifier);
|
|
85
|
+
const highlightState = (0, _useItemHighlightState.useItemHighlightState)(identifier);
|
|
86
|
+
const isHighlighted = highlightState === 'highlighted';
|
|
87
|
+
const isFaded = highlightState === 'faded';
|
|
71
88
|
const ownerState = {
|
|
72
89
|
seriesId,
|
|
73
90
|
classes: innerClasses,
|
|
@@ -76,7 +93,8 @@ function AreaElement(props) {
|
|
|
76
93
|
isFaded,
|
|
77
94
|
isHighlighted
|
|
78
95
|
};
|
|
79
|
-
const classes = useUtilityClasses(
|
|
96
|
+
const classes = (0, _lineClasses.useUtilityClasses)();
|
|
97
|
+
const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
|
|
80
98
|
const Area = slots?.area ?? _AnimatedArea.AnimatedArea;
|
|
81
99
|
const areaProps = (0, _useSlotProps.default)({
|
|
82
100
|
elementType: Area,
|
|
@@ -85,9 +103,10 @@ function AreaElement(props) {
|
|
|
85
103
|
onClick,
|
|
86
104
|
cursor: onClick ? 'pointer' : 'unset',
|
|
87
105
|
'data-highlighted': isHighlighted || undefined,
|
|
88
|
-
'data-faded': isFaded || undefined
|
|
106
|
+
'data-faded': isFaded || undefined,
|
|
107
|
+
'data-series-id': seriesId
|
|
89
108
|
}),
|
|
90
|
-
className: classes.root
|
|
109
|
+
className: `${classes.area} ${deprecatedClasses.root}`,
|
|
91
110
|
ownerState
|
|
92
111
|
});
|
|
93
112
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Area, (0, _extends2.default)({}, other, areaProps));
|
|
@@ -10,14 +10,34 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
10
10
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
11
11
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
12
12
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
|
|
13
|
-
import {
|
|
13
|
+
import { useItemHighlightState } from "../hooks/useItemHighlightState.mjs";
|
|
14
14
|
import { AnimatedArea } from "./AnimatedArea.mjs";
|
|
15
|
+
import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
23
|
+
*/
|
|
15
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
27
|
+
*/
|
|
16
28
|
export function getAreaElementUtilityClass(slot) {
|
|
17
29
|
return generateUtilityClass('MuiAreaElement', slot);
|
|
18
30
|
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
34
|
+
*/
|
|
19
35
|
export const areaElementClasses = generateUtilityClasses('MuiAreaElement', ['root', 'highlighted', 'faded', 'series']);
|
|
20
|
-
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
|
|
39
|
+
*/
|
|
40
|
+
const useDeprecatedUtilityClasses = ownerState => {
|
|
21
41
|
const {
|
|
22
42
|
classes,
|
|
23
43
|
seriesId,
|
|
@@ -55,10 +75,9 @@ function AreaElement(props) {
|
|
|
55
75
|
seriesId
|
|
56
76
|
}), [seriesId]);
|
|
57
77
|
const interactionProps = useInteractionItemProps(identifier);
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} = useItemHighlighted(identifier);
|
|
78
|
+
const highlightState = useItemHighlightState(identifier);
|
|
79
|
+
const isHighlighted = highlightState === 'highlighted';
|
|
80
|
+
const isFaded = highlightState === 'faded';
|
|
62
81
|
const ownerState = {
|
|
63
82
|
seriesId,
|
|
64
83
|
classes: innerClasses,
|
|
@@ -67,7 +86,8 @@ function AreaElement(props) {
|
|
|
67
86
|
isFaded,
|
|
68
87
|
isHighlighted
|
|
69
88
|
};
|
|
70
|
-
const classes =
|
|
89
|
+
const classes = useLineUtilityClasses();
|
|
90
|
+
const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
|
|
71
91
|
const Area = slots?.area ?? AnimatedArea;
|
|
72
92
|
const areaProps = useSlotProps({
|
|
73
93
|
elementType: Area,
|
|
@@ -76,9 +96,10 @@ function AreaElement(props) {
|
|
|
76
96
|
onClick,
|
|
77
97
|
cursor: onClick ? 'pointer' : 'unset',
|
|
78
98
|
'data-highlighted': isHighlighted || undefined,
|
|
79
|
-
'data-faded': isFaded || undefined
|
|
99
|
+
'data-faded': isFaded || undefined,
|
|
100
|
+
'data-series-id': seriesId
|
|
80
101
|
}),
|
|
81
|
-
className: classes.root
|
|
102
|
+
className: `${classes.area} ${deprecatedClasses.root}`,
|
|
82
103
|
ownerState
|
|
83
104
|
});
|
|
84
105
|
return /*#__PURE__*/_jsx(Area, _extends({}, other, areaProps));
|
package/LineChart/AreaPlot.js
CHANGED
|
@@ -12,19 +12,21 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _styles = require("@mui/material/styles");
|
|
15
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
16
|
var _AreaElement = require("./AreaElement");
|
|
16
17
|
var _useSkipAnimation = require("../hooks/useSkipAnimation");
|
|
17
18
|
var _useAxis = require("../hooks/useAxis");
|
|
18
19
|
var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
|
|
19
20
|
var _useAreaPlotData = require("./useAreaPlotData");
|
|
20
21
|
var _animation = require("../internals/animation/animation");
|
|
22
|
+
var _lineClasses = require("./lineClasses");
|
|
21
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
const _excluded = ["slots", "slotProps", "onItemClick", "skipAnimation"];
|
|
24
|
+
const _excluded = ["slots", "slotProps", "onItemClick", "skipAnimation", "className"];
|
|
23
25
|
const AreaPlotRoot = (0, _styles.styled)('g', {
|
|
24
26
|
name: 'MuiAreaPlot',
|
|
25
27
|
slot: 'Root'
|
|
26
28
|
})({
|
|
27
|
-
[`& .${
|
|
29
|
+
[`& .${_lineClasses.lineClasses.area}`]: {
|
|
28
30
|
transitionProperty: 'opacity, fill',
|
|
29
31
|
transitionDuration: `${_animation.ANIMATION_DURATION_MS}ms`,
|
|
30
32
|
transitionTimingFunction: _animation.ANIMATION_TIMING_FUNCTION
|
|
@@ -56,13 +58,17 @@ function AreaPlot(props) {
|
|
|
56
58
|
slots,
|
|
57
59
|
slotProps,
|
|
58
60
|
onItemClick,
|
|
59
|
-
skipAnimation: inSkipAnimation
|
|
61
|
+
skipAnimation: inSkipAnimation,
|
|
62
|
+
className
|
|
60
63
|
} = props,
|
|
61
64
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
62
65
|
const isZoomInteracting = (0, _useInternalIsZoomInteracting.useInternalIsZoomInteracting)();
|
|
63
66
|
const skipAnimation = (0, _useSkipAnimation.useSkipAnimation)(isZoomInteracting || inSkipAnimation);
|
|
64
67
|
const completedData = useAggregatedData();
|
|
65
|
-
|
|
68
|
+
const classes = (0, _lineClasses.useUtilityClasses)();
|
|
69
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AreaPlotRoot, (0, _extends2.default)({
|
|
70
|
+
className: (0, _clsx.default)(classes.areaPlot, className)
|
|
71
|
+
}, other, {
|
|
66
72
|
children: completedData.map(({
|
|
67
73
|
d,
|
|
68
74
|
seriesId,
|
package/LineChart/AreaPlot.mjs
CHANGED
|
@@ -2,22 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["slots", "slotProps", "onItemClick", "skipAnimation"];
|
|
5
|
+
const _excluded = ["slots", "slotProps", "onItemClick", "skipAnimation", "className"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
|
-
import
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import { AreaElement } from "./AreaElement.mjs";
|
|
10
11
|
import { useSkipAnimation } from "../hooks/useSkipAnimation.mjs";
|
|
11
12
|
import { useXAxes, useYAxes } from "../hooks/useAxis.mjs";
|
|
12
13
|
import { useInternalIsZoomInteracting } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.mjs";
|
|
13
14
|
import { useAreaPlotData } from "./useAreaPlotData.mjs";
|
|
14
15
|
import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
|
|
16
|
+
import { lineClasses, useUtilityClasses } from "./lineClasses.mjs";
|
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
18
|
const AreaPlotRoot = styled('g', {
|
|
17
19
|
name: 'MuiAreaPlot',
|
|
18
20
|
slot: 'Root'
|
|
19
21
|
})({
|
|
20
|
-
[`& .${
|
|
22
|
+
[`& .${lineClasses.area}`]: {
|
|
21
23
|
transitionProperty: 'opacity, fill',
|
|
22
24
|
transitionDuration: `${ANIMATION_DURATION_MS}ms`,
|
|
23
25
|
transitionTimingFunction: ANIMATION_TIMING_FUNCTION
|
|
@@ -49,13 +51,17 @@ function AreaPlot(props) {
|
|
|
49
51
|
slots,
|
|
50
52
|
slotProps,
|
|
51
53
|
onItemClick,
|
|
52
|
-
skipAnimation: inSkipAnimation
|
|
54
|
+
skipAnimation: inSkipAnimation,
|
|
55
|
+
className
|
|
53
56
|
} = props,
|
|
54
57
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
55
58
|
const isZoomInteracting = useInternalIsZoomInteracting();
|
|
56
59
|
const skipAnimation = useSkipAnimation(isZoomInteracting || inSkipAnimation);
|
|
57
60
|
const completedData = useAggregatedData();
|
|
58
|
-
|
|
61
|
+
const classes = useUtilityClasses();
|
|
62
|
+
return /*#__PURE__*/_jsx(AreaPlotRoot, _extends({
|
|
63
|
+
className: clsx(classes.areaPlot, className)
|
|
64
|
+
}, other, {
|
|
59
65
|
children: completedData.map(({
|
|
60
66
|
d,
|
|
61
67
|
seriesId,
|
|
@@ -15,6 +15,7 @@ var _styles = require("@mui/material/styles");
|
|
|
15
15
|
var _animation = require("../internals/animation/animation");
|
|
16
16
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
17
17
|
var _markElementClasses = require("./markElementClasses");
|
|
18
|
+
var _lineClasses = require("./lineClasses");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
const _excluded = ["x", "y", "seriesId", "classes", "color", "dataIndex", "onClick", "skipAnimation", "isFaded", "isHighlighted", "shape", "hidden"];
|
|
20
21
|
const Circle = (0, _styles.styled)('circle', {
|
|
@@ -71,7 +72,11 @@ function CircleMarkElement(props) {
|
|
|
71
72
|
isFaded,
|
|
72
73
|
skipAnimation
|
|
73
74
|
};
|
|
74
|
-
const classes = (0,
|
|
75
|
+
const classes = (0, _lineClasses.useUtilityClasses)({
|
|
76
|
+
skipAnimation,
|
|
77
|
+
classes: innerClasses
|
|
78
|
+
});
|
|
79
|
+
const deprecatedClasses = (0, _markElementClasses.useUtilityClasses)(ownerState);
|
|
75
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Circle, (0, _extends2.default)({}, other, {
|
|
76
81
|
cx: x,
|
|
77
82
|
cy: y,
|
|
@@ -79,13 +84,15 @@ function CircleMarkElement(props) {
|
|
|
79
84
|
fill: (theme.vars || theme).palette.background.paper,
|
|
80
85
|
stroke: color,
|
|
81
86
|
strokeWidth: 2,
|
|
82
|
-
className: classes.root
|
|
87
|
+
className: `${classes.mark} ${deprecatedClasses.root}`,
|
|
83
88
|
onClick: onClick,
|
|
84
89
|
cursor: onClick ? 'pointer' : 'unset',
|
|
85
90
|
pointerEvents: hidden ? 'none' : undefined
|
|
86
91
|
}, interactionProps, {
|
|
87
92
|
"data-highlighted": isHighlighted || undefined,
|
|
88
93
|
"data-faded": isFaded || undefined,
|
|
94
|
+
"data-series-id": seriesId,
|
|
95
|
+
"data-index": dataIndex,
|
|
89
96
|
opacity: hidden ? 0 : 1
|
|
90
97
|
}));
|
|
91
98
|
}
|
|
@@ -8,7 +8,8 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import { styled, useTheme } from '@mui/material/styles';
|
|
9
9
|
import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
|
|
10
10
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
|
|
11
|
-
import { markElementClasses, useUtilityClasses } from "./markElementClasses.mjs";
|
|
11
|
+
import { markElementClasses, useUtilityClasses as useDeprecatedUtilityClasses } from "./markElementClasses.mjs";
|
|
12
|
+
import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
const Circle = styled('circle', {
|
|
14
15
|
slot: 'internal',
|
|
@@ -64,7 +65,11 @@ function CircleMarkElement(props) {
|
|
|
64
65
|
isFaded,
|
|
65
66
|
skipAnimation
|
|
66
67
|
};
|
|
67
|
-
const classes =
|
|
68
|
+
const classes = useLineUtilityClasses({
|
|
69
|
+
skipAnimation,
|
|
70
|
+
classes: innerClasses
|
|
71
|
+
});
|
|
72
|
+
const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
|
|
68
73
|
return /*#__PURE__*/_jsx(Circle, _extends({}, other, {
|
|
69
74
|
cx: x,
|
|
70
75
|
cy: y,
|
|
@@ -72,13 +77,15 @@ function CircleMarkElement(props) {
|
|
|
72
77
|
fill: (theme.vars || theme).palette.background.paper,
|
|
73
78
|
stroke: color,
|
|
74
79
|
strokeWidth: 2,
|
|
75
|
-
className: classes.root
|
|
80
|
+
className: `${classes.mark} ${deprecatedClasses.root}`,
|
|
76
81
|
onClick: onClick,
|
|
77
82
|
cursor: onClick ? 'pointer' : 'unset',
|
|
78
83
|
pointerEvents: hidden ? 'none' : undefined
|
|
79
84
|
}, interactionProps, {
|
|
80
85
|
"data-highlighted": isHighlighted || undefined,
|
|
81
86
|
"data-faded": isFaded || undefined,
|
|
87
|
+
"data-series-id": seriesId,
|
|
88
|
+
"data-index": dataIndex,
|
|
82
89
|
opacity: hidden ? 0 : 1
|
|
83
90
|
}));
|
|
84
91
|
}
|
package/LineChart/LineChart.js
CHANGED
|
@@ -129,11 +129,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
129
129
|
* @default false
|
|
130
130
|
*/
|
|
131
131
|
disableAxisListener: _propTypes.default.bool,
|
|
132
|
+
/**
|
|
133
|
+
* If `true`, disables keyboard navigation for the chart.
|
|
134
|
+
*/
|
|
135
|
+
disableKeyboardNavigation: _propTypes.default.bool,
|
|
132
136
|
/**
|
|
133
137
|
* If `true`, render the line highlight item.
|
|
134
138
|
*/
|
|
135
139
|
disableLineItemHighlight: _propTypes.default.bool,
|
|
136
|
-
enableKeyboardNavigation: _propTypes.default.bool,
|
|
137
140
|
/**
|
|
138
141
|
* Options to enable features planned for the next major.
|
|
139
142
|
*/
|
|
@@ -309,7 +312,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
309
312
|
/**
|
|
310
313
|
* The callback fired when the tooltip item changes.
|
|
311
314
|
*
|
|
312
|
-
* @param {SeriesItemIdentifier<
|
|
315
|
+
* @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
|
|
313
316
|
*/
|
|
314
317
|
onTooltipItemChange: _propTypes.default.func,
|
|
315
318
|
/**
|
package/LineChart/LineChart.mjs
CHANGED
|
@@ -122,11 +122,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
122
122
|
* @default false
|
|
123
123
|
*/
|
|
124
124
|
disableAxisListener: PropTypes.bool,
|
|
125
|
+
/**
|
|
126
|
+
* If `true`, disables keyboard navigation for the chart.
|
|
127
|
+
*/
|
|
128
|
+
disableKeyboardNavigation: PropTypes.bool,
|
|
125
129
|
/**
|
|
126
130
|
* If `true`, render the line highlight item.
|
|
127
131
|
*/
|
|
128
132
|
disableLineItemHighlight: PropTypes.bool,
|
|
129
|
-
enableKeyboardNavigation: PropTypes.bool,
|
|
130
133
|
/**
|
|
131
134
|
* Options to enable features planned for the next major.
|
|
132
135
|
*/
|
|
@@ -302,7 +305,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
302
305
|
/**
|
|
303
306
|
* The callback fired when the tooltip item changes.
|
|
304
307
|
*
|
|
305
|
-
* @param {SeriesItemIdentifier<
|
|
308
|
+
* @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
|
|
306
309
|
*/
|
|
307
310
|
onTooltipItemChange: PropTypes.func,
|
|
308
311
|
/**
|
|
@@ -2,6 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
3
3
|
import { type AnimatedLineProps } from "./AnimatedLine.mjs";
|
|
4
4
|
import { type SeriesId } from "../models/seriesType/common.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
7
|
+
*/
|
|
5
8
|
export interface LineElementClasses {
|
|
6
9
|
/** Styles applied to the root element. */
|
|
7
10
|
root: string;
|
|
@@ -21,6 +24,9 @@ export interface LineElementClasses {
|
|
|
21
24
|
*/
|
|
22
25
|
series: string;
|
|
23
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
29
|
+
*/
|
|
24
30
|
export type LineElementClassKey = keyof LineElementClasses;
|
|
25
31
|
export interface LineElementOwnerState {
|
|
26
32
|
seriesId: SeriesId;
|
|
@@ -32,7 +38,13 @@ export interface LineElementOwnerState {
|
|
|
32
38
|
/** If `true`, the line is hidden. */
|
|
33
39
|
hidden?: boolean;
|
|
34
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
43
|
+
*/
|
|
35
44
|
export declare function getLineElementUtilityClass(slot: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
47
|
+
*/
|
|
36
48
|
export declare const lineElementClasses: LineElementClasses;
|
|
37
49
|
export interface LineElementSlots {
|
|
38
50
|
/**
|
|
@@ -2,6 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
3
3
|
import { type AnimatedLineProps } from "./AnimatedLine.js";
|
|
4
4
|
import { type SeriesId } from "../models/seriesType/common.js";
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
7
|
+
*/
|
|
5
8
|
export interface LineElementClasses {
|
|
6
9
|
/** Styles applied to the root element. */
|
|
7
10
|
root: string;
|
|
@@ -21,6 +24,9 @@ export interface LineElementClasses {
|
|
|
21
24
|
*/
|
|
22
25
|
series: string;
|
|
23
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
29
|
+
*/
|
|
24
30
|
export type LineElementClassKey = keyof LineElementClasses;
|
|
25
31
|
export interface LineElementOwnerState {
|
|
26
32
|
seriesId: SeriesId;
|
|
@@ -32,7 +38,13 @@ export interface LineElementOwnerState {
|
|
|
32
38
|
/** If `true`, the line is hidden. */
|
|
33
39
|
hidden?: boolean;
|
|
34
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
43
|
+
*/
|
|
35
44
|
export declare function getLineElementUtilityClass(slot: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
47
|
+
*/
|
|
36
48
|
export declare const lineElementClasses: LineElementClasses;
|
|
37
49
|
export interface LineElementSlots {
|
|
38
50
|
/**
|
package/LineChart/LineElement.js
CHANGED
|
@@ -19,14 +19,32 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
|
|
|
19
19
|
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
20
20
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
21
21
|
var _AnimatedLine = require("./AnimatedLine");
|
|
22
|
-
var
|
|
22
|
+
var _useItemHighlightState = require("../hooks/useItemHighlightState");
|
|
23
|
+
var _lineClasses = require("./lineClasses");
|
|
23
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
25
|
const _excluded = ["seriesId", "classes", "color", "gradientId", "slots", "slotProps", "onClick", "hidden"];
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
34
|
+
*/
|
|
25
35
|
function getLineElementUtilityClass(slot) {
|
|
26
36
|
return (0, _generateUtilityClass.default)('MuiLineElement', slot);
|
|
27
37
|
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
41
|
+
*/
|
|
28
42
|
const lineElementClasses = exports.lineElementClasses = (0, _generateUtilityClasses.default)('MuiLineElement', ['root', 'highlighted', 'faded', 'series']);
|
|
29
|
-
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
|
|
46
|
+
*/
|
|
47
|
+
const useDeprecatedUtilityClasses = ownerState => {
|
|
30
48
|
const {
|
|
31
49
|
classes,
|
|
32
50
|
seriesId,
|
|
@@ -65,10 +83,9 @@ function LineElement(props) {
|
|
|
65
83
|
seriesId
|
|
66
84
|
}), [seriesId]);
|
|
67
85
|
const interactionProps = (0, _useInteractionItemProps.useInteractionItemProps)(identifier);
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
} = (0, _useItemHighlighted.useItemHighlighted)(identifier);
|
|
86
|
+
const highlightState = (0, _useItemHighlightState.useItemHighlightState)(identifier);
|
|
87
|
+
const isHighlighted = highlightState === 'highlighted';
|
|
88
|
+
const isFaded = highlightState === 'faded';
|
|
72
89
|
const ownerState = {
|
|
73
90
|
seriesId,
|
|
74
91
|
classes: innerClasses,
|
|
@@ -78,7 +95,8 @@ function LineElement(props) {
|
|
|
78
95
|
isHighlighted,
|
|
79
96
|
hidden
|
|
80
97
|
};
|
|
81
|
-
const classes = useUtilityClasses(
|
|
98
|
+
const classes = (0, _lineClasses.useUtilityClasses)();
|
|
99
|
+
const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
|
|
82
100
|
const Line = slots?.line ?? _AnimatedLine.AnimatedLine;
|
|
83
101
|
const lineProps = (0, _useSlotProps.default)({
|
|
84
102
|
elementType: Line,
|
|
@@ -87,9 +105,10 @@ function LineElement(props) {
|
|
|
87
105
|
onClick,
|
|
88
106
|
cursor: onClick ? 'pointer' : 'unset',
|
|
89
107
|
'data-highlighted': isHighlighted || undefined,
|
|
90
|
-
'data-faded': isFaded || undefined
|
|
108
|
+
'data-faded': isFaded || undefined,
|
|
109
|
+
'data-series-id': seriesId
|
|
91
110
|
}),
|
|
92
|
-
className: classes.root
|
|
111
|
+
className: `${classes.line} ${deprecatedClasses.root}`,
|
|
93
112
|
ownerState
|
|
94
113
|
});
|
|
95
114
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, (0, _extends2.default)({}, other, lineProps));
|
|
@@ -11,13 +11,33 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
11
11
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
12
12
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
|
|
13
13
|
import { AnimatedLine } from "./AnimatedLine.mjs";
|
|
14
|
-
import {
|
|
14
|
+
import { useItemHighlightState } from "../hooks/useItemHighlightState.mjs";
|
|
15
|
+
import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
23
|
+
*/
|
|
15
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
27
|
+
*/
|
|
16
28
|
export function getLineElementUtilityClass(slot) {
|
|
17
29
|
return generateUtilityClass('MuiLineElement', slot);
|
|
18
30
|
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
34
|
+
*/
|
|
19
35
|
export const lineElementClasses = generateUtilityClasses('MuiLineElement', ['root', 'highlighted', 'faded', 'series']);
|
|
20
|
-
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
|
|
39
|
+
*/
|
|
40
|
+
const useDeprecatedUtilityClasses = ownerState => {
|
|
21
41
|
const {
|
|
22
42
|
classes,
|
|
23
43
|
seriesId,
|
|
@@ -56,10 +76,9 @@ function LineElement(props) {
|
|
|
56
76
|
seriesId
|
|
57
77
|
}), [seriesId]);
|
|
58
78
|
const interactionProps = useInteractionItemProps(identifier);
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
} = useItemHighlighted(identifier);
|
|
79
|
+
const highlightState = useItemHighlightState(identifier);
|
|
80
|
+
const isHighlighted = highlightState === 'highlighted';
|
|
81
|
+
const isFaded = highlightState === 'faded';
|
|
63
82
|
const ownerState = {
|
|
64
83
|
seriesId,
|
|
65
84
|
classes: innerClasses,
|
|
@@ -69,7 +88,8 @@ function LineElement(props) {
|
|
|
69
88
|
isHighlighted,
|
|
70
89
|
hidden
|
|
71
90
|
};
|
|
72
|
-
const classes =
|
|
91
|
+
const classes = useLineUtilityClasses();
|
|
92
|
+
const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
|
|
73
93
|
const Line = slots?.line ?? AnimatedLine;
|
|
74
94
|
const lineProps = useSlotProps({
|
|
75
95
|
elementType: Line,
|
|
@@ -78,9 +98,10 @@ function LineElement(props) {
|
|
|
78
98
|
onClick,
|
|
79
99
|
cursor: onClick ? 'pointer' : 'unset',
|
|
80
100
|
'data-highlighted': isHighlighted || undefined,
|
|
81
|
-
'data-faded': isFaded || undefined
|
|
101
|
+
'data-faded': isFaded || undefined,
|
|
102
|
+
'data-series-id': seriesId
|
|
82
103
|
}),
|
|
83
|
-
className: classes.root
|
|
104
|
+
className: `${classes.line} ${deprecatedClasses.root}`,
|
|
84
105
|
ownerState
|
|
85
106
|
});
|
|
86
107
|
return /*#__PURE__*/_jsx(Line, _extends({}, other, lineProps));
|