@mantine/charts 7.13.5 → 7.14.1

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 (60) hide show
  1. package/cjs/AreaChart/AreaChart.cjs +1 -1
  2. package/cjs/AreaChart/AreaChart.cjs.map +1 -1
  3. package/cjs/BarChart/BarChart.cjs +7 -1
  4. package/cjs/BarChart/BarChart.cjs.map +1 -1
  5. package/cjs/ChartLegend/ChartLegend.cjs +1 -1
  6. package/cjs/ChartLegend/ChartLegend.cjs.map +1 -1
  7. package/cjs/ChartTooltip/ChartTooltip.cjs +9 -7
  8. package/cjs/ChartTooltip/ChartTooltip.cjs.map +1 -1
  9. package/cjs/ChartTooltip/ChartTooltip.module.css.cjs +1 -1
  10. package/cjs/CompositeChart/CompositeChart.cjs +2 -2
  11. package/cjs/CompositeChart/CompositeChart.cjs.map +1 -1
  12. package/cjs/FunnelChart/FunnelChart.cjs +131 -0
  13. package/cjs/FunnelChart/FunnelChart.cjs.map +1 -0
  14. package/cjs/FunnelChart/FunnelChart.module.css.cjs +7 -0
  15. package/cjs/FunnelChart/FunnelChart.module.css.cjs.map +1 -0
  16. package/cjs/LineChart/LineChart.cjs +1 -1
  17. package/cjs/LineChart/LineChart.cjs.map +1 -1
  18. package/cjs/PointLabel/PointLabel.cjs +2 -2
  19. package/cjs/PointLabel/PointLabel.cjs.map +1 -1
  20. package/cjs/RadialBarChart/RadialBarChart.cjs +149 -0
  21. package/cjs/RadialBarChart/RadialBarChart.cjs.map +1 -0
  22. package/cjs/RadialBarChart/RadialBarChart.module.css.cjs +7 -0
  23. package/cjs/RadialBarChart/RadialBarChart.module.css.cjs.map +1 -0
  24. package/cjs/index.cjs +4 -0
  25. package/cjs/index.cjs.map +1 -1
  26. package/esm/AreaChart/AreaChart.mjs +1 -1
  27. package/esm/AreaChart/AreaChart.mjs.map +1 -1
  28. package/esm/BarChart/BarChart.mjs +7 -1
  29. package/esm/BarChart/BarChart.mjs.map +1 -1
  30. package/esm/ChartLegend/ChartLegend.mjs +1 -1
  31. package/esm/ChartLegend/ChartLegend.mjs.map +1 -1
  32. package/esm/ChartTooltip/ChartTooltip.mjs +10 -8
  33. package/esm/ChartTooltip/ChartTooltip.mjs.map +1 -1
  34. package/esm/ChartTooltip/ChartTooltip.module.css.mjs +1 -1
  35. package/esm/CompositeChart/CompositeChart.mjs +2 -2
  36. package/esm/CompositeChart/CompositeChart.mjs.map +1 -1
  37. package/esm/FunnelChart/FunnelChart.mjs +129 -0
  38. package/esm/FunnelChart/FunnelChart.mjs.map +1 -0
  39. package/esm/FunnelChart/FunnelChart.module.css.mjs +5 -0
  40. package/esm/FunnelChart/FunnelChart.module.css.mjs.map +1 -0
  41. package/esm/LineChart/LineChart.mjs +1 -1
  42. package/esm/LineChart/LineChart.mjs.map +1 -1
  43. package/esm/PointLabel/PointLabel.mjs +2 -2
  44. package/esm/PointLabel/PointLabel.mjs.map +1 -1
  45. package/esm/RadialBarChart/RadialBarChart.mjs +147 -0
  46. package/esm/RadialBarChart/RadialBarChart.mjs.map +1 -0
  47. package/esm/RadialBarChart/RadialBarChart.module.css.mjs +5 -0
  48. package/esm/RadialBarChart/RadialBarChart.module.css.mjs.map +1 -0
  49. package/esm/index.mjs +2 -0
  50. package/esm/index.mjs.map +1 -1
  51. package/lib/FunnelChart/FunnelChart.d.ts +56 -0
  52. package/lib/FunnelChart/index.d.ts +2 -0
  53. package/lib/PointLabel/PointLabel.d.ts +2 -1
  54. package/lib/RadialBarChart/RadialBarChart.d.ts +48 -0
  55. package/lib/RadialBarChart/index.d.ts +2 -0
  56. package/lib/index.d.mts +2 -0
  57. package/lib/index.d.ts +2 -0
  58. package/package.json +3 -3
  59. package/styles.css +43 -0
  60. package/styles.layer.css +43 -0
@@ -0,0 +1,2 @@
1
+ export { FunnelChart } from './FunnelChart';
2
+ export type { FunnelChartCssVariables, FunnelChartFactory, FunnelChartProps, FunnelChartStylesNames, FunnelChartCell, } from './FunnelChart';
@@ -2,6 +2,7 @@ interface PointLabelProps {
2
2
  x?: number;
3
3
  y?: number;
4
4
  value?: number;
5
+ valueFormatter?: (value: number) => string;
5
6
  }
6
- export declare function PointLabel({ x, y, value }: PointLabelProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function PointLabel({ x, y, value, valueFormatter }: PointLabelProps): import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -0,0 +1,48 @@
1
+ import { LegendProps, RadialBarProps, RadialBarChart as ReChartsRadialBarChart, TooltipProps } from 'recharts';
2
+ import { BoxProps, ElementProps, Factory, StylesApiProps } from '@mantine/core';
3
+ export type RadialBarChartStylesNames = 'root' | 'tooltip';
4
+ export type RadialBarChartCssVariables = {
5
+ root: '--chart-empty-background';
6
+ };
7
+ export interface RadialBarChartProps extends BoxProps, StylesApiProps<RadialBarChartFactory>, ElementProps<'div'> {
8
+ /** Chart data */
9
+ data: Record<string, any>[];
10
+ /** Key from data object to use as data key */
11
+ dataKey: string;
12
+ /** Size of bars in px, `20` by default */
13
+ barSize?: number;
14
+ /** Determines whether empty bars area should be visible, `true` by default */
15
+ withBackground?: boolean;
16
+ /** Determines whether labels should be displayed, `false` by default */
17
+ withLabels?: boolean;
18
+ /** Determines whether the legend should be displayed, `false` by default */
19
+ withLegend?: boolean;
20
+ /** Determines whether the tooltip should be displayed when one of the bars is hovered, `true` by default */
21
+ withTooltip?: boolean;
22
+ /** Color of the empty background, by default depends on the color scheme */
23
+ emptyBackgroundColor?: string;
24
+ /** Angle at which chart starts, `90` by default */
25
+ startAngle?: number;
26
+ /** Angle at which chart ends, `-270` by default */
27
+ endAngle?: number;
28
+ /** Props passed down to recharts RadialBar component */
29
+ radialBarProps?: Omit<RadialBarProps, 'ref'>;
30
+ /** Props passed down to recharts RadarChartChart component */
31
+ radialBarChartProps?: React.ComponentPropsWithoutRef<typeof ReChartsRadialBarChart>;
32
+ /** Props passed down to recharts Legend component */
33
+ legendProps?: Omit<LegendProps, 'ref'>;
34
+ /** Props passed down to `Tooltip` recharts component */
35
+ tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;
36
+ }
37
+ export type RadialBarChartFactory = Factory<{
38
+ props: RadialBarChartProps;
39
+ ref: HTMLDivElement;
40
+ stylesNames: RadialBarChartStylesNames;
41
+ vars: RadialBarChartCssVariables;
42
+ }>;
43
+ export declare const RadialBarChart: import("@mantine/core").MantineComponent<{
44
+ props: RadialBarChartProps;
45
+ ref: HTMLDivElement;
46
+ stylesNames: RadialBarChartStylesNames;
47
+ vars: RadialBarChartCssVariables;
48
+ }>;
@@ -0,0 +1,2 @@
1
+ export { RadialBarChart } from './RadialBarChart';
2
+ export type { RadialBarChartCssVariables, RadialBarChartFactory, RadialBarChartProps, RadialBarChartStylesNames, } from './RadialBarChart';
package/lib/index.d.mts CHANGED
@@ -10,4 +10,6 @@ export * from './RadarChart/index.js';
10
10
  export * from './ScatterChart/index.js';
11
11
  export * from './BubbleChart/index.js';
12
12
  export * from './CompositeChart/index.js';
13
+ export * from './RadialBarChart/index.js';
14
+ export * from './FunnelChart/index.js';
13
15
  export * from './types';
package/lib/index.d.ts CHANGED
@@ -10,4 +10,6 @@ export * from './RadarChart/index.js';
10
10
  export * from './ScatterChart/index.js';
11
11
  export * from './BubbleChart/index.js';
12
12
  export * from './CompositeChart/index.js';
13
+ export * from './RadialBarChart/index.js';
14
+ export * from './FunnelChart/index.js';
13
15
  export * from './types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine/charts",
3
- "version": "7.13.5",
3
+ "version": "7.14.1",
4
4
  "description": "Charts components built with recharts and Mantine",
5
5
  "homepage": "https://mantine.dev/",
6
6
  "license": "MIT",
@@ -35,8 +35,8 @@
35
35
  "directory": "packages/@mantine/charts"
36
36
  },
37
37
  "peerDependencies": {
38
- "@mantine/core": "7.13.5",
39
- "@mantine/hooks": "7.13.5",
38
+ "@mantine/core": "7.14.1",
39
+ "@mantine/hooks": "7.14.1",
40
40
  "react": "^18.x || ^19.x",
41
41
  "react-dom": "^18.x || ^19.x",
42
42
  "recharts": "^2.13.3"
package/styles.css CHANGED
@@ -29,6 +29,11 @@
29
29
  padding-top: var(--mantine-spacing-sm);
30
30
  }
31
31
 
32
+ .m_b30369b5 {
33
+ width: calc(0.75rem * var(--mantine-scale));
34
+ height: calc(0.75rem * var(--mantine-scale));
35
+ }
36
+
32
37
  .m_3de8964e {
33
38
  font-size: var(--mantine-font-size-sm);
34
39
  display: flex;
@@ -227,3 +232,41 @@
227
232
  height: 100%;
228
233
  width: 100%;
229
234
  }
235
+
236
+ :where([data-mantine-color-scheme='light']) .m_cd2bd9e5 {
237
+ --chart-empty-background: var(--mantine-color-gray-1);
238
+ --chart-cursor-color: var(--mantine-color-gray-4);
239
+ }
240
+ :where([data-mantine-color-scheme='dark']) .m_cd2bd9e5 {
241
+ --chart-empty-background: var(--mantine-color-dark-6);
242
+ --chart-cursor-color: var(--mantine-color-dark-4);
243
+ }
244
+
245
+ .m_6bcc3420 {
246
+ padding: var(--mantine-spacing-md);
247
+ box-shadow: var(--mantine-shadow-md);
248
+ min-width: calc(12.5rem * var(--mantine-scale));
249
+ font-size: var(--mantine-font-size-sm);
250
+ display: flex;
251
+ align-items: center;
252
+ justify-content: space-between;
253
+ }
254
+
255
+ :where([data-mantine-color-scheme='light']) .m_6bcc3420 {
256
+ border: 1px solid var(--mantine-color-gray-2);
257
+ }
258
+
259
+ :where([data-mantine-color-scheme='dark']) .m_6bcc3420 {
260
+ border: 1px solid var(--mantine-color-dark-4);
261
+ }
262
+
263
+ .m_80d531e7 {
264
+ min-height: var(--chart-size, auto);
265
+ height: var(--chart-size, auto);
266
+ width: var(--chart-size, auto);
267
+ min-width: var(--chart-size, auto);
268
+ }
269
+
270
+ .m_80d531e7 :where(*) {
271
+ outline: 0;
272
+ }
package/styles.layer.css CHANGED
@@ -29,6 +29,11 @@
29
29
  padding-top: var(--mantine-spacing-sm);
30
30
  }
31
31
 
32
+ .m_b30369b5 {
33
+ width: calc(0.75rem * var(--mantine-scale));
34
+ height: calc(0.75rem * var(--mantine-scale));
35
+ }
36
+
32
37
  .m_3de8964e {
33
38
  font-size: var(--mantine-font-size-sm);
34
39
  display: flex;
@@ -227,4 +232,42 @@
227
232
  height: 100%;
228
233
  width: 100%;
229
234
  }
235
+
236
+ :where([data-mantine-color-scheme='light']) .m_cd2bd9e5 {
237
+ --chart-empty-background: var(--mantine-color-gray-1);
238
+ --chart-cursor-color: var(--mantine-color-gray-4);
239
+ }
240
+ :where([data-mantine-color-scheme='dark']) .m_cd2bd9e5 {
241
+ --chart-empty-background: var(--mantine-color-dark-6);
242
+ --chart-cursor-color: var(--mantine-color-dark-4);
243
+ }
244
+
245
+ .m_6bcc3420 {
246
+ padding: var(--mantine-spacing-md);
247
+ box-shadow: var(--mantine-shadow-md);
248
+ min-width: calc(12.5rem * var(--mantine-scale));
249
+ font-size: var(--mantine-font-size-sm);
250
+ display: flex;
251
+ align-items: center;
252
+ justify-content: space-between;
253
+ }
254
+
255
+ :where([data-mantine-color-scheme='light']) .m_6bcc3420 {
256
+ border: 1px solid var(--mantine-color-gray-2);
257
+ }
258
+
259
+ :where([data-mantine-color-scheme='dark']) .m_6bcc3420 {
260
+ border: 1px solid var(--mantine-color-dark-4);
261
+ }
262
+
263
+ .m_80d531e7 {
264
+ min-height: var(--chart-size, auto);
265
+ height: var(--chart-size, auto);
266
+ width: var(--chart-size, auto);
267
+ min-width: var(--chart-size, auto);
268
+ }
269
+
270
+ .m_80d531e7 :where(*) {
271
+ outline: 0;
272
+ }
230
273
  }