@mui/x-charts 9.0.0 → 9.0.2

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 (124) hide show
  1. package/BarChart/BarChart.js +27 -9
  2. package/BarChart/BarChart.mjs +27 -9
  3. package/BarChart/BarElement.js +1 -5
  4. package/BarChart/BarElement.mjs +1 -5
  5. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.mts +1 -0
  6. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +1 -0
  7. package/BarChart/seriesConfig/bar/seriesProcessor.js +37 -13
  8. package/BarChart/seriesConfig/bar/seriesProcessor.mjs +37 -13
  9. package/CHANGELOG.md +215 -6891
  10. package/ChartsContainer/ChartsContainer.js +59 -30
  11. package/ChartsContainer/ChartsContainer.mjs +59 -30
  12. package/ChartsDataProvider/useChartsDataProviderProps.js +1 -6
  13. package/ChartsDataProvider/useChartsDataProviderProps.mjs +1 -6
  14. package/ChartsGrid/styledComponents.js +2 -2
  15. package/ChartsGrid/styledComponents.mjs +2 -2
  16. package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.mts +38 -0
  17. package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.ts +38 -0
  18. package/ChartsRadialDataProvider/ChartsRadialDataProvider.js +115 -0
  19. package/ChartsRadialDataProvider/ChartsRadialDataProvider.mjs +109 -0
  20. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.d.mts +9 -0
  21. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.d.ts +9 -0
  22. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.js +13 -0
  23. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.mjs +7 -0
  24. package/ChartsRadialDataProvider/index.d.mts +2 -0
  25. package/ChartsRadialDataProvider/index.d.ts +2 -0
  26. package/ChartsRadialDataProvider/index.js +27 -0
  27. package/ChartsRadialDataProvider/index.mjs +2 -0
  28. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.mts +13 -0
  29. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.ts +13 -0
  30. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.js +46 -0
  31. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.mjs +39 -0
  32. package/ChartsRadialGrid/ChartsRadialGrid.d.mts +33 -0
  33. package/ChartsRadialGrid/ChartsRadialGrid.d.ts +33 -0
  34. package/ChartsRadialGrid/ChartsRadialGrid.js +99 -0
  35. package/ChartsRadialGrid/ChartsRadialGrid.mjs +94 -0
  36. package/ChartsRadialGrid/ChartsRadiusGrid.d.mts +13 -0
  37. package/ChartsRadialGrid/ChartsRadiusGrid.d.ts +13 -0
  38. package/ChartsRadialGrid/ChartsRadiusGrid.js +73 -0
  39. package/ChartsRadialGrid/ChartsRadiusGrid.mjs +66 -0
  40. package/ChartsRadialGrid/ChartsRotationGrid.d.mts +13 -0
  41. package/ChartsRadialGrid/ChartsRotationGrid.d.ts +13 -0
  42. package/ChartsRadialGrid/ChartsRotationGrid.js +65 -0
  43. package/ChartsRadialGrid/ChartsRotationGrid.mjs +58 -0
  44. package/ChartsRadialGrid/chartsRadialGridClasses.d.mts +13 -0
  45. package/ChartsRadialGrid/chartsRadialGridClasses.d.ts +13 -0
  46. package/ChartsRadialGrid/chartsRadialGridClasses.js +14 -0
  47. package/ChartsRadialGrid/chartsRadialGridClasses.mjs +6 -0
  48. package/ChartsRadialGrid/index.d.mts +3 -0
  49. package/ChartsRadialGrid/index.d.ts +3 -0
  50. package/ChartsRadialGrid/index.js +19 -0
  51. package/ChartsRadialGrid/index.mjs +2 -0
  52. package/ChartsRadialGrid/styledComponents.d.mts +4 -0
  53. package/ChartsRadialGrid/styledComponents.d.ts +4 -0
  54. package/ChartsRadialGrid/styledComponents.js +50 -0
  55. package/ChartsRadialGrid/styledComponents.mjs +44 -0
  56. package/ChartsXAxis/useAxisTicksProps.d.mts +407 -326
  57. package/ChartsXAxis/useAxisTicksProps.d.ts +407 -326
  58. package/ChartsYAxis/useAxisTicksProps.d.mts +407 -326
  59. package/ChartsYAxis/useAxisTicksProps.d.ts +407 -326
  60. package/LineChart/LineChart.d.mts +1 -2
  61. package/LineChart/LineChart.d.ts +1 -2
  62. package/LineChart/LineChart.js +27 -9
  63. package/LineChart/LineChart.mjs +27 -9
  64. package/LineChart/seriesConfig/seriesProcessor.js +37 -13
  65. package/LineChart/seriesConfig/seriesProcessor.mjs +37 -13
  66. package/RadarChart/RadarAxis/useRadarAxis.d.mts +1 -1
  67. package/RadarChart/RadarAxis/useRadarAxis.d.ts +1 -1
  68. package/RadarChart/RadarAxis/useRadarAxis.js +2 -2
  69. package/RadarChart/RadarAxis/useRadarAxis.mjs +2 -2
  70. package/ScatterChart/Scatter.d.mts +11 -0
  71. package/ScatterChart/Scatter.d.ts +11 -0
  72. package/ScatterChart/Scatter.js +11 -0
  73. package/ScatterChart/Scatter.mjs +14 -0
  74. package/ScatterChart/ScatterChart.js +29 -10
  75. package/ScatterChart/ScatterChart.mjs +29 -10
  76. package/ScatterChart/seriesConfig/seriesProcessor.js +9 -4
  77. package/ScatterChart/seriesConfig/seriesProcessor.mjs +9 -4
  78. package/SparkLineChart/SparkLineChart.js +27 -9
  79. package/SparkLineChart/SparkLineChart.mjs +27 -9
  80. package/hooks/useTicks.d.mts +1 -1
  81. package/hooks/useTicks.d.ts +1 -1
  82. package/hooks/useTicks.js +21 -3
  83. package/hooks/useTicks.mjs +21 -3
  84. package/index.d.mts +2 -0
  85. package/index.d.ts +2 -0
  86. package/index.js +25 -1
  87. package/index.mjs +3 -1
  88. package/internals/material/index.js +6 -1
  89. package/internals/material/index.mjs +6 -1
  90. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +8 -12
  91. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +8 -12
  92. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +1 -0
  93. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +1 -0
  94. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +7 -4
  95. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs +8 -5
  96. package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +3 -3
  97. package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.mjs +3 -3
  98. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +3 -3
  99. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +3 -3
  100. package/models/axis.d.mts +11 -2
  101. package/models/axis.d.ts +11 -2
  102. package/models/seriesType/bar.d.mts +9 -0
  103. package/models/seriesType/bar.d.ts +9 -0
  104. package/models/seriesType/line.d.mts +9 -0
  105. package/models/seriesType/line.d.ts +9 -0
  106. package/models/seriesType/scatter.d.mts +9 -0
  107. package/models/seriesType/scatter.d.ts +9 -0
  108. package/models/slots/chartsBaseSlotProps.d.mts +17 -0
  109. package/models/slots/chartsBaseSlotProps.d.ts +17 -0
  110. package/models/slots/chartsBaseSlots.d.mts +7 -1
  111. package/models/slots/chartsBaseSlots.d.ts +7 -1
  112. package/models/z-axis.d.mts +9 -0
  113. package/models/z-axis.d.ts +9 -0
  114. package/package.json +31 -3
  115. package/themeAugmentation/components.d.mts +4 -0
  116. package/themeAugmentation/components.d.ts +4 -0
  117. package/themeAugmentation/overrides.d.mts +2 -0
  118. package/themeAugmentation/overrides.d.ts +2 -0
  119. package/themeAugmentation/props.d.mts +2 -0
  120. package/themeAugmentation/props.d.ts +2 -0
  121. package/utils/epsilon.d.mts +1 -0
  122. package/utils/epsilon.d.ts +1 -0
  123. package/utils/epsilon.js +7 -0
  124. package/utils/epsilon.mjs +1 -0
@@ -0,0 +1,109 @@
1
+ 'use client';
2
+
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import * as React from 'react';
5
+ import PropTypes from 'prop-types';
6
+ import { defaultSlotsMaterial } from "../internals/material/index.mjs";
7
+ import { ChartsSlotsProvider } from "../context/ChartsSlotsContext.mjs";
8
+ import { ChartsProvider } from "../context/ChartsProvider/index.mjs";
9
+ import { ChartsLocalizationProvider } from "../ChartsLocalizationProvider/index.mjs";
10
+ import { useChartsRadialDataProviderProps } from "./useChartsRadialDataProviderProps.mjs";
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ /**
13
+ * Orchestrates the data providers for radial chart components and hooks.
14
+ *
15
+ * Similar to `ChartsDataProvider`, but uses the radial axis plugin instead of the cartesian one,
16
+ * and only supports the line series config.
17
+ *
18
+ * Demos:
19
+ *
20
+ * - [Composition](https://mui.com/x/react-charts/composition/)
21
+ *
22
+ * API:
23
+ *
24
+ * - [ChartsRadialDataProvider API](https://mui.com/x/api/charts/charts-radial-data-provider/)
25
+ */
26
+ function ChartsRadialDataProvider(props) {
27
+ const {
28
+ children,
29
+ localeText,
30
+ chartProviderProps,
31
+ slots,
32
+ slotProps
33
+ } = useChartsRadialDataProviderProps(props);
34
+ return /*#__PURE__*/_jsx(ChartsProvider, _extends({}, chartProviderProps, {
35
+ children: /*#__PURE__*/_jsx(ChartsLocalizationProvider, {
36
+ localeText: localeText,
37
+ children: /*#__PURE__*/_jsx(ChartsSlotsProvider, {
38
+ slots: slots,
39
+ slotProps: slotProps,
40
+ defaultSlots: defaultSlotsMaterial,
41
+ children: children
42
+ })
43
+ })
44
+ }));
45
+ }
46
+ process.env.NODE_ENV !== "production" ? ChartsRadialDataProvider.propTypes = {
47
+ // ----------------------------- Warning --------------------------------
48
+ // | These PropTypes are generated from the TypeScript type definitions |
49
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
50
+ // ----------------------------------------------------------------------
51
+ apiRef: PropTypes.shape({
52
+ current: PropTypes.any
53
+ }),
54
+ /**
55
+ * Color palette used to colorize multiple series.
56
+ * @default rainbowSurgePalette
57
+ */
58
+ colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
59
+ /**
60
+ * The height of the chart in px. If not defined, it takes the height of the parent element.
61
+ */
62
+ height: PropTypes.number,
63
+ /**
64
+ * This prop is used to help implement the accessibility logic.
65
+ * If you don't provide this prop. It falls back to a randomly generated id.
66
+ */
67
+ id: PropTypes.string,
68
+ /**
69
+ * Localized text for chart components.
70
+ */
71
+ localeText: PropTypes.object,
72
+ /**
73
+ * The margin between the SVG and the drawing area.
74
+ * It's used for leaving some space for extra information such as the x- and y-axis or legend.
75
+ *
76
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
77
+ */
78
+ margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
79
+ bottom: PropTypes.number,
80
+ left: PropTypes.number,
81
+ right: PropTypes.number,
82
+ top: PropTypes.number
83
+ })]),
84
+ /**
85
+ * The array of series to display.
86
+ * Each type of series has its own specificity.
87
+ * Please refer to the appropriate docs page to learn more about it.
88
+ */
89
+ series: PropTypes.arrayOf(PropTypes.object),
90
+ /**
91
+ * If `true`, animations are skipped.
92
+ * If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
93
+ */
94
+ skipAnimation: PropTypes.bool,
95
+ /**
96
+ * The props for the slots.
97
+ */
98
+ slotProps: PropTypes.object,
99
+ /**
100
+ * Slots to customize charts' components.
101
+ */
102
+ slots: PropTypes.object,
103
+ theme: PropTypes.oneOf(['dark', 'light']),
104
+ /**
105
+ * The width of the chart in px. If not defined, it takes the width of the parent element.
106
+ */
107
+ width: PropTypes.number
108
+ } : void 0;
109
+ export { ChartsRadialDataProvider as Unstable_ChartsRadialDataProvider };
@@ -0,0 +1,9 @@
1
+ import { type UseChartPolarAxisSignature } from "../internals/plugins/featurePlugins/useChartPolarAxis/index.mjs";
2
+ import { type UseChartTooltipSignature } from "../internals/plugins/featurePlugins/useChartTooltip/index.mjs";
3
+ import { type UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.mjs";
4
+ import { type UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.mjs";
5
+ import { type UseChartKeyboardNavigationSignature } from "../internals/plugins/featurePlugins/useChartKeyboardNavigation/index.mjs";
6
+ import { type UseChartVisibilityManagerSignature } from "../internals/plugins/featurePlugins/useChartVisibilityManager/index.mjs";
7
+ import type { PolarChartSeriesType } from "../models/seriesType/config.mjs";
8
+ export declare const RADIAL_PLUGINS: readonly [import("../internals/index.mjs").ChartPlugin<UseChartTooltipSignature<any>>, import("../internals/index.mjs").ChartPlugin<UseChartInteractionSignature>, import("../internals/index.mjs").ChartPlugin<UseChartPolarAxisSignature<any>>, import("../internals/index.mjs").ChartPlugin<UseChartHighlightSignature<any>>, import("../internals/index.mjs").ChartPlugin<UseChartKeyboardNavigationSignature>, import("../internals/index.mjs").ChartPlugin<UseChartVisibilityManagerSignature<any>>];
9
+ export type RadialPluginSignatures<SeriesType extends PolarChartSeriesType = PolarChartSeriesType> = [UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartHighlightSignature<SeriesType>, UseChartKeyboardNavigationSignature, UseChartVisibilityManagerSignature<SeriesType>];
@@ -0,0 +1,9 @@
1
+ import { type UseChartPolarAxisSignature } from "../internals/plugins/featurePlugins/useChartPolarAxis/index.js";
2
+ import { type UseChartTooltipSignature } from "../internals/plugins/featurePlugins/useChartTooltip/index.js";
3
+ import { type UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
4
+ import { type UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
5
+ import { type UseChartKeyboardNavigationSignature } from "../internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js";
6
+ import { type UseChartVisibilityManagerSignature } from "../internals/plugins/featurePlugins/useChartVisibilityManager/index.js";
7
+ import type { PolarChartSeriesType } from "../models/seriesType/config.js";
8
+ export declare const RADIAL_PLUGINS: readonly [import("../internals/index.js").ChartPlugin<UseChartTooltipSignature<any>>, import("../internals/index.js").ChartPlugin<UseChartInteractionSignature>, import("../internals/index.js").ChartPlugin<UseChartPolarAxisSignature<any>>, import("../internals/index.js").ChartPlugin<UseChartHighlightSignature<any>>, import("../internals/index.js").ChartPlugin<UseChartKeyboardNavigationSignature>, import("../internals/index.js").ChartPlugin<UseChartVisibilityManagerSignature<any>>];
9
+ export type RadialPluginSignatures<SeriesType extends PolarChartSeriesType = PolarChartSeriesType> = [UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartHighlightSignature<SeriesType>, UseChartKeyboardNavigationSignature, UseChartVisibilityManagerSignature<SeriesType>];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.RADIAL_PLUGINS = void 0;
7
+ var _useChartPolarAxis = require("../internals/plugins/featurePlugins/useChartPolarAxis");
8
+ var _useChartTooltip = require("../internals/plugins/featurePlugins/useChartTooltip");
9
+ var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
10
+ var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight");
11
+ var _useChartKeyboardNavigation = require("../internals/plugins/featurePlugins/useChartKeyboardNavigation");
12
+ var _useChartVisibilityManager = require("../internals/plugins/featurePlugins/useChartVisibilityManager");
13
+ const RADIAL_PLUGINS = exports.RADIAL_PLUGINS = [_useChartTooltip.useChartTooltip, _useChartInteraction.useChartInteraction, _useChartPolarAxis.useChartPolarAxis, _useChartHighlight.useChartHighlight, _useChartKeyboardNavigation.useChartKeyboardNavigation, _useChartVisibilityManager.useChartVisibilityManager];
@@ -0,0 +1,7 @@
1
+ import { useChartPolarAxis } from "../internals/plugins/featurePlugins/useChartPolarAxis/index.mjs";
2
+ import { useChartTooltip } from "../internals/plugins/featurePlugins/useChartTooltip/index.mjs";
3
+ import { useChartInteraction } from "../internals/plugins/featurePlugins/useChartInteraction/index.mjs";
4
+ import { useChartHighlight } from "../internals/plugins/featurePlugins/useChartHighlight/index.mjs";
5
+ import { useChartKeyboardNavigation } from "../internals/plugins/featurePlugins/useChartKeyboardNavigation/index.mjs";
6
+ import { useChartVisibilityManager } from "../internals/plugins/featurePlugins/useChartVisibilityManager/index.mjs";
7
+ export const RADIAL_PLUGINS = [useChartTooltip, useChartInteraction, useChartPolarAxis, useChartHighlight, useChartKeyboardNavigation, useChartVisibilityManager];
@@ -0,0 +1,2 @@
1
+ export * from "./ChartsRadialDataProvider.mjs";
2
+ export * from "./ChartsRadialDataProvider.plugins.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./ChartsRadialDataProvider.js";
2
+ export * from "./ChartsRadialDataProvider.plugins.js";
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _ChartsRadialDataProvider = require("./ChartsRadialDataProvider");
7
+ Object.keys(_ChartsRadialDataProvider).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _ChartsRadialDataProvider[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _ChartsRadialDataProvider[key];
14
+ }
15
+ });
16
+ });
17
+ var _ChartsRadialDataProvider2 = require("./ChartsRadialDataProvider.plugins");
18
+ Object.keys(_ChartsRadialDataProvider2).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _ChartsRadialDataProvider2[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _ChartsRadialDataProvider2[key];
25
+ }
26
+ });
27
+ });
@@ -0,0 +1,2 @@
1
+ export * from "./ChartsRadialDataProvider.mjs";
2
+ export * from "./ChartsRadialDataProvider.plugins.mjs";
@@ -0,0 +1,13 @@
1
+ import type { ChartsRadialDataProviderProps } from "./ChartsRadialDataProvider.mjs";
2
+ import { type ChartsProviderProps } from "../context/ChartsProvider/index.mjs";
3
+ import { type ChartAnyPluginSignature } from "../internals/plugins/models/index.mjs";
4
+ import { type RadialPluginSignatures } from "./ChartsRadialDataProvider.plugins.mjs";
5
+ import { type ChartsLocalizationProviderProps } from "../ChartsLocalizationProvider/index.mjs";
6
+ import { type PolarChartSeriesType } from "../models/seriesType/config.mjs";
7
+ export declare const useChartsRadialDataProviderProps: <SeriesType extends PolarChartSeriesType = PolarChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = RadialPluginSignatures<SeriesType>>(inProps: ChartsRadialDataProviderProps<SeriesType, TSignatures> & ChartsLocalizationProviderProps) => {
8
+ children: import("react").ReactNode;
9
+ localeText: Partial<import("../locales/index.mjs").ChartsLocaleText> | undefined;
10
+ chartProviderProps: ChartsProviderProps<SeriesType, TSignatures>;
11
+ slots: Partial<import("./ChartsRadialDataProvider.mjs").ChartsRadialDataProviderSlots> | undefined;
12
+ slotProps: Partial<import("./ChartsRadialDataProvider.mjs").ChartsRadialDataProviderSlotProps> | undefined;
13
+ };
@@ -0,0 +1,13 @@
1
+ import type { ChartsRadialDataProviderProps } from "./ChartsRadialDataProvider.js";
2
+ import { type ChartsProviderProps } from "../context/ChartsProvider/index.js";
3
+ import { type ChartAnyPluginSignature } from "../internals/plugins/models/index.js";
4
+ import { type RadialPluginSignatures } from "./ChartsRadialDataProvider.plugins.js";
5
+ import { type ChartsLocalizationProviderProps } from "../ChartsLocalizationProvider/index.js";
6
+ import { type PolarChartSeriesType } from "../models/seriesType/config.js";
7
+ export declare const useChartsRadialDataProviderProps: <SeriesType extends PolarChartSeriesType = PolarChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = RadialPluginSignatures<SeriesType>>(inProps: ChartsRadialDataProviderProps<SeriesType, TSignatures> & ChartsLocalizationProviderProps) => {
8
+ children: import("react").ReactNode;
9
+ localeText: Partial<import("../locales/index.js").ChartsLocaleText> | undefined;
10
+ chartProviderProps: ChartsProviderProps<SeriesType, TSignatures>;
11
+ slots: Partial<import("./ChartsRadialDataProvider.js").ChartsRadialDataProviderSlots> | undefined;
12
+ slotProps: Partial<import("./ChartsRadialDataProvider.js").ChartsRadialDataProviderSlotProps> | undefined;
13
+ };
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.useChartsRadialDataProviderProps = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
+ var _styles = require("@mui/material/styles");
12
+ var _ChartsRadialDataProvider = require("./ChartsRadialDataProvider.plugins");
13
+ const _excluded = ["children", "localeText", "plugins", "slots", "slotProps", "seriesConfig"];
14
+ const RADIAL_SERIES_CONFIG = {};
15
+ const useChartsRadialDataProviderProps = inProps => {
16
+ // eslint-disable-next-line mui/material-ui-name-matches-component-name
17
+ const props = (0, _styles.useThemeProps)({
18
+ props: inProps,
19
+ name: 'MuiChartsRadialDataProvider'
20
+ });
21
+ const {
22
+ children,
23
+ localeText,
24
+ plugins = _ChartsRadialDataProvider.RADIAL_PLUGINS,
25
+ slots,
26
+ slotProps,
27
+ seriesConfig = RADIAL_SERIES_CONFIG
28
+ } = props,
29
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
30
+ const theme = (0, _styles.useTheme)();
31
+ const chartProviderProps = {
32
+ plugins: plugins,
33
+ pluginParams: (0, _extends2.default)({
34
+ theme: theme.palette.mode,
35
+ seriesConfig
36
+ }, other)
37
+ };
38
+ return {
39
+ children,
40
+ localeText,
41
+ chartProviderProps,
42
+ slots,
43
+ slotProps
44
+ };
45
+ };
46
+ exports.useChartsRadialDataProviderProps = useChartsRadialDataProviderProps;
@@ -0,0 +1,39 @@
1
+ 'use client';
2
+
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
+ const _excluded = ["children", "localeText", "plugins", "slots", "slotProps", "seriesConfig"];
6
+ import { useTheme, useThemeProps } from '@mui/material/styles';
7
+ import { RADIAL_PLUGINS } from "./ChartsRadialDataProvider.plugins.mjs";
8
+ const RADIAL_SERIES_CONFIG = {};
9
+ export const useChartsRadialDataProviderProps = inProps => {
10
+ // eslint-disable-next-line mui/material-ui-name-matches-component-name
11
+ const props = useThemeProps({
12
+ props: inProps,
13
+ name: 'MuiChartsRadialDataProvider'
14
+ });
15
+ const {
16
+ children,
17
+ localeText,
18
+ plugins = RADIAL_PLUGINS,
19
+ slots,
20
+ slotProps,
21
+ seriesConfig = RADIAL_SERIES_CONFIG
22
+ } = props,
23
+ other = _objectWithoutPropertiesLoose(props, _excluded);
24
+ const theme = useTheme();
25
+ const chartProviderProps = {
26
+ plugins: plugins,
27
+ pluginParams: _extends({
28
+ theme: theme.palette.mode,
29
+ seriesConfig
30
+ }, other)
31
+ };
32
+ return {
33
+ children,
34
+ localeText,
35
+ chartProviderProps,
36
+ slots,
37
+ slotProps
38
+ };
39
+ };
@@ -0,0 +1,33 @@
1
+ import { type ChartsRadialGridClasses } from "./chartsRadialGridClasses.mjs";
2
+ export interface ChartsRadialGridProps {
3
+ /**
4
+ * A CSS class name applied to the root element.
5
+ */
6
+ className?: string;
7
+ /**
8
+ * Displays rotation (spoke) grid.
9
+ */
10
+ rotation?: boolean;
11
+ /**
12
+ * Displays radius (concentric) grid.
13
+ */
14
+ radius?: boolean;
15
+ /**
16
+ * Override or extend the styles applied to the component.
17
+ */
18
+ classes?: Partial<ChartsRadialGridClasses>;
19
+ }
20
+ /**
21
+ * Demos:
22
+ *
23
+ * - [Radar](https://mui.com/x/react-charts/radar/)
24
+ *
25
+ * API:
26
+ *
27
+ * - [ChartsRadialGrid API](https://mui.com/x/api/charts/charts-radial-grid/)
28
+ */
29
+ declare function ChartsRadialGrid(inProps: ChartsRadialGridProps): import("react/jsx-runtime").JSX.Element;
30
+ declare namespace ChartsRadialGrid {
31
+ var propTypes: any;
32
+ }
33
+ export { ChartsRadialGrid };
@@ -0,0 +1,33 @@
1
+ import { type ChartsRadialGridClasses } from "./chartsRadialGridClasses.js";
2
+ export interface ChartsRadialGridProps {
3
+ /**
4
+ * A CSS class name applied to the root element.
5
+ */
6
+ className?: string;
7
+ /**
8
+ * Displays rotation (spoke) grid.
9
+ */
10
+ rotation?: boolean;
11
+ /**
12
+ * Displays radius (concentric) grid.
13
+ */
14
+ radius?: boolean;
15
+ /**
16
+ * Override or extend the styles applied to the component.
17
+ */
18
+ classes?: Partial<ChartsRadialGridClasses>;
19
+ }
20
+ /**
21
+ * Demos:
22
+ *
23
+ * - [Radar](https://mui.com/x/react-charts/radar/)
24
+ *
25
+ * API:
26
+ *
27
+ * - [ChartsRadialGrid API](https://mui.com/x/api/charts/charts-radial-grid/)
28
+ */
29
+ declare function ChartsRadialGrid(inProps: ChartsRadialGridProps): import("react/jsx-runtime").JSX.Element;
30
+ declare namespace ChartsRadialGrid {
31
+ var propTypes: any;
32
+ }
33
+ export { ChartsRadialGrid };
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.ChartsRadialGrid = ChartsRadialGrid;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
+ var _propTypes = _interopRequireDefault(require("prop-types"));
12
+ var _clsx = _interopRequireDefault(require("clsx"));
13
+ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
+ var _styles = require("@mui/material/styles");
15
+ var _chartsRadialGridClasses = require("./chartsRadialGridClasses");
16
+ var _styledComponents = require("./styledComponents");
17
+ var _ChartsRotationGrid = require("./ChartsRotationGrid");
18
+ var _ChartsRadiusGrid = require("./ChartsRadiusGrid");
19
+ var _useAxis = require("../hooks/useAxis");
20
+ var _jsxRuntime = require("react/jsx-runtime");
21
+ const _excluded = ["className", "rotation", "radius"];
22
+ const useUtilityClasses = ({
23
+ classes
24
+ }) => {
25
+ const slots = {
26
+ root: ['root'],
27
+ rotationLine: ['line', 'rotationLine'],
28
+ radiusLine: ['line', 'radiusLine']
29
+ };
30
+ return (0, _composeClasses.default)(slots, _chartsRadialGridClasses.getChartsRadialGridUtilityClass, classes);
31
+ };
32
+ /**
33
+ * Demos:
34
+ *
35
+ * - [Radar](https://mui.com/x/react-charts/radar/)
36
+ *
37
+ * API:
38
+ *
39
+ * - [ChartsRadialGrid API](https://mui.com/x/api/charts/charts-radial-grid/)
40
+ */
41
+ function ChartsRadialGrid(inProps) {
42
+ const props = (0, _styles.useThemeProps)({
43
+ props: inProps,
44
+ name: 'MuiChartsRadialGrid'
45
+ });
46
+ const {
47
+ className,
48
+ rotation,
49
+ radius
50
+ } = props,
51
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
52
+ const {
53
+ rotationAxis,
54
+ rotationAxisIds
55
+ } = (0, _useAxis.useRotationAxes)();
56
+ const {
57
+ radiusAxis,
58
+ radiusAxisIds
59
+ } = (0, _useAxis.useRadiusAxes)();
60
+ const classes = useUtilityClasses(props);
61
+ const rotationAxisConfig = rotationAxis[rotationAxisIds[0]];
62
+ const radiusAxisConfig = radiusAxis[radiusAxisIds[0]];
63
+ const innerRadius = radiusAxisConfig?.scale.range()[0] ?? 0;
64
+ const outerRadius = radiusAxisConfig?.scale.range()[1] ?? 0;
65
+ const startAngle = rotationAxisConfig?.scale.range()[0] ?? 0;
66
+ const endAngle = rotationAxisConfig?.scale.range()[1] ?? 0;
67
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styledComponents.GridRoot, (0, _extends2.default)({}, other, {
68
+ className: (0, _clsx.default)(classes.root, className),
69
+ children: [rotation && rotationAxisConfig && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsRotationGrid.ChartsRotationGrid, {
70
+ axis: rotationAxisConfig,
71
+ outerRadius: outerRadius,
72
+ innerRadius: innerRadius,
73
+ classes: classes
74
+ }), radius && radiusAxisConfig && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsRadiusGrid.ChartsRadiusGrid, {
75
+ axis: radiusAxisConfig,
76
+ startAngle: startAngle,
77
+ endAngle: endAngle,
78
+ classes: classes
79
+ })]
80
+ }));
81
+ }
82
+ process.env.NODE_ENV !== "production" ? ChartsRadialGrid.propTypes = {
83
+ // ----------------------------- Warning --------------------------------
84
+ // | These PropTypes are generated from the TypeScript type definitions |
85
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
86
+ // ----------------------------------------------------------------------
87
+ /**
88
+ * Override or extend the styles applied to the component.
89
+ */
90
+ classes: _propTypes.default.object,
91
+ /**
92
+ * Displays radius (concentric) grid.
93
+ */
94
+ radius: _propTypes.default.bool,
95
+ /**
96
+ * Displays rotation (spoke) grid.
97
+ */
98
+ rotation: _propTypes.default.bool
99
+ } : void 0;
@@ -0,0 +1,94 @@
1
+ 'use client';
2
+
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
+ const _excluded = ["className", "rotation", "radius"];
6
+ import PropTypes from 'prop-types';
7
+ import clsx from 'clsx';
8
+ import composeClasses from '@mui/utils/composeClasses';
9
+ import { useThemeProps } from '@mui/material/styles';
10
+ import { getChartsRadialGridUtilityClass } from "./chartsRadialGridClasses.mjs";
11
+ import { GridRoot } from "./styledComponents.mjs";
12
+ import { ChartsRotationGrid } from "./ChartsRotationGrid.mjs";
13
+ import { ChartsRadiusGrid } from "./ChartsRadiusGrid.mjs";
14
+ import { useRotationAxes, useRadiusAxes } from "../hooks/useAxis.mjs";
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
+ const useUtilityClasses = ({
17
+ classes
18
+ }) => {
19
+ const slots = {
20
+ root: ['root'],
21
+ rotationLine: ['line', 'rotationLine'],
22
+ radiusLine: ['line', 'radiusLine']
23
+ };
24
+ return composeClasses(slots, getChartsRadialGridUtilityClass, classes);
25
+ };
26
+ /**
27
+ * Demos:
28
+ *
29
+ * - [Radar](https://mui.com/x/react-charts/radar/)
30
+ *
31
+ * API:
32
+ *
33
+ * - [ChartsRadialGrid API](https://mui.com/x/api/charts/charts-radial-grid/)
34
+ */
35
+ function ChartsRadialGrid(inProps) {
36
+ const props = useThemeProps({
37
+ props: inProps,
38
+ name: 'MuiChartsRadialGrid'
39
+ });
40
+ const {
41
+ className,
42
+ rotation,
43
+ radius
44
+ } = props,
45
+ other = _objectWithoutPropertiesLoose(props, _excluded);
46
+ const {
47
+ rotationAxis,
48
+ rotationAxisIds
49
+ } = useRotationAxes();
50
+ const {
51
+ radiusAxis,
52
+ radiusAxisIds
53
+ } = useRadiusAxes();
54
+ const classes = useUtilityClasses(props);
55
+ const rotationAxisConfig = rotationAxis[rotationAxisIds[0]];
56
+ const radiusAxisConfig = radiusAxis[radiusAxisIds[0]];
57
+ const innerRadius = radiusAxisConfig?.scale.range()[0] ?? 0;
58
+ const outerRadius = radiusAxisConfig?.scale.range()[1] ?? 0;
59
+ const startAngle = rotationAxisConfig?.scale.range()[0] ?? 0;
60
+ const endAngle = rotationAxisConfig?.scale.range()[1] ?? 0;
61
+ return /*#__PURE__*/_jsxs(GridRoot, _extends({}, other, {
62
+ className: clsx(classes.root, className),
63
+ children: [rotation && rotationAxisConfig && /*#__PURE__*/_jsx(ChartsRotationGrid, {
64
+ axis: rotationAxisConfig,
65
+ outerRadius: outerRadius,
66
+ innerRadius: innerRadius,
67
+ classes: classes
68
+ }), radius && radiusAxisConfig && /*#__PURE__*/_jsx(ChartsRadiusGrid, {
69
+ axis: radiusAxisConfig,
70
+ startAngle: startAngle,
71
+ endAngle: endAngle,
72
+ classes: classes
73
+ })]
74
+ }));
75
+ }
76
+ process.env.NODE_ENV !== "production" ? ChartsRadialGrid.propTypes = {
77
+ // ----------------------------- Warning --------------------------------
78
+ // | These PropTypes are generated from the TypeScript type definitions |
79
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
80
+ // ----------------------------------------------------------------------
81
+ /**
82
+ * Override or extend the styles applied to the component.
83
+ */
84
+ classes: PropTypes.object,
85
+ /**
86
+ * Displays radius (concentric) grid.
87
+ */
88
+ radius: PropTypes.bool,
89
+ /**
90
+ * Displays rotation (spoke) grid.
91
+ */
92
+ rotation: PropTypes.bool
93
+ } : void 0;
94
+ export { ChartsRadialGrid };
@@ -0,0 +1,13 @@
1
+ import { type ChartsRadialGridClasses } from "./chartsRadialGridClasses.mjs";
2
+ import { type PolarAxisDefaultized } from "../models/axis.mjs";
3
+ interface ChartsRadiusGridProps {
4
+ axis: PolarAxisDefaultized<any, any, any>;
5
+ startAngle: number;
6
+ endAngle: number;
7
+ classes: Partial<ChartsRadialGridClasses>;
8
+ }
9
+ /**
10
+ * @ignore - internal component.
11
+ */
12
+ export declare function ChartsRadiusGrid(props: ChartsRadiusGridProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { type ChartsRadialGridClasses } from "./chartsRadialGridClasses.js";
2
+ import { type PolarAxisDefaultized } from "../models/axis.js";
3
+ interface ChartsRadiusGridProps {
4
+ axis: PolarAxisDefaultized<any, any, any>;
5
+ startAngle: number;
6
+ endAngle: number;
7
+ classes: Partial<ChartsRadialGridClasses>;
8
+ }
9
+ /**
10
+ * @ignore - internal component.
11
+ */
12
+ export declare function ChartsRadiusGrid(props: ChartsRadiusGridProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};