@mantine/charts 8.2.8 → 8.3.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.
- package/cjs/AreaChart/AreaChart.cjs.map +1 -1
- package/cjs/AreaChart/AreaGradient.cjs.map +1 -1
- package/cjs/AreaChart/AreaSplit.cjs.map +1 -1
- package/cjs/AreaChart/get-split-offset.cjs.map +1 -1
- package/cjs/BarChart/BarChart.cjs.map +1 -1
- package/cjs/BubbleChart/BubbleChart.cjs.map +1 -1
- package/cjs/ChartLegend/ChartLegend.cjs.map +1 -1
- package/cjs/ChartTooltip/ChartTooltip.cjs.map +1 -1
- package/cjs/CompositeChart/CompositeChart.cjs.map +1 -1
- package/cjs/DonutChart/DonutChart.cjs.map +1 -1
- package/cjs/FunnelChart/FunnelChart.cjs.map +1 -1
- package/cjs/Heatmap/Heatmap.cjs +42 -8
- package/cjs/Heatmap/Heatmap.cjs.map +1 -1
- package/cjs/Heatmap/get-boundaries/get-boundaries.cjs.map +1 -1
- package/cjs/Heatmap/get-columns/get-columns.cjs +70 -0
- package/cjs/Heatmap/get-columns/get-columns.cjs.map +1 -0
- package/cjs/Heatmap/get-dates-range/get-dates-range.cjs.map +1 -1
- package/cjs/Heatmap/get-heat-color/get-heat-color.cjs.map +1 -1
- package/cjs/Heatmap/get-months-range/get-months-range.cjs.map +1 -1
- package/cjs/Heatmap/rotate-weekdays-names/rotate-weekdays-names.cjs.map +1 -1
- package/cjs/LineChart/LineChart.cjs.map +1 -1
- package/cjs/PieChart/PieChart.cjs.map +1 -1
- package/cjs/PointLabel/PointLabel.cjs.map +1 -1
- package/cjs/RadarChart/RadarChart.cjs.map +1 -1
- package/cjs/RadialBarChart/RadialBarChart.cjs.map +1 -1
- package/cjs/ScatterChart/ScatterChart.cjs.map +1 -1
- package/cjs/Sparkline/Sparkline.cjs.map +1 -1
- package/cjs/utils/get-series-labels/get-series-labels.cjs.map +1 -1
- package/esm/AreaChart/AreaChart.mjs.map +1 -1
- package/esm/AreaChart/AreaGradient.mjs.map +1 -1
- package/esm/AreaChart/AreaSplit.mjs.map +1 -1
- package/esm/AreaChart/get-split-offset.mjs.map +1 -1
- package/esm/BarChart/BarChart.mjs.map +1 -1
- package/esm/BubbleChart/BubbleChart.mjs.map +1 -1
- package/esm/ChartLegend/ChartLegend.mjs.map +1 -1
- package/esm/ChartTooltip/ChartTooltip.mjs.map +1 -1
- package/esm/CompositeChart/CompositeChart.mjs.map +1 -1
- package/esm/DonutChart/DonutChart.mjs +1 -1
- package/esm/DonutChart/DonutChart.mjs.map +1 -1
- package/esm/FunnelChart/FunnelChart.mjs +1 -1
- package/esm/FunnelChart/FunnelChart.mjs.map +1 -1
- package/esm/Heatmap/Heatmap.mjs +42 -8
- package/esm/Heatmap/Heatmap.mjs.map +1 -1
- package/esm/Heatmap/get-boundaries/get-boundaries.mjs.map +1 -1
- package/esm/Heatmap/get-columns/get-columns.mjs +67 -0
- package/esm/Heatmap/get-columns/get-columns.mjs.map +1 -0
- package/esm/Heatmap/get-dates-range/get-dates-range.mjs.map +1 -1
- package/esm/Heatmap/get-heat-color/get-heat-color.mjs.map +1 -1
- package/esm/Heatmap/get-months-range/get-months-range.mjs.map +1 -1
- package/esm/Heatmap/rotate-weekdays-names/rotate-weekdays-names.mjs.map +1 -1
- package/esm/LineChart/LineChart.mjs.map +1 -1
- package/esm/PieChart/PieChart.mjs +1 -1
- package/esm/PieChart/PieChart.mjs.map +1 -1
- package/esm/PointLabel/PointLabel.mjs.map +1 -1
- package/esm/RadarChart/RadarChart.mjs.map +1 -1
- package/esm/RadialBarChart/RadialBarChart.mjs.map +1 -1
- package/esm/ScatterChart/ScatterChart.mjs.map +1 -1
- package/esm/Sparkline/Sparkline.mjs.map +1 -1
- package/esm/utils/get-series-labels/get-series-labels.mjs.map +1 -1
- package/lib/Heatmap/Heatmap.d.ts +2 -0
- package/lib/Heatmap/get-columns/get-columns.d.ts +15 -0
- package/package.json +5 -5
- package/styles.css +2 -0
- package/styles.layer.css +2 -0
package/lib/Heatmap/Heatmap.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ export interface HeatmapProps extends BoxProps, StylesApiProps<HeatmapFactory>,
|
|
|
47
47
|
tooltipProps?: Partial<TooltipFloatingProps>;
|
|
48
48
|
/** Props passed down to each rect depending on its date and associated value */
|
|
49
49
|
getRectProps?: (input: HeatmapRectData) => React.ComponentPropsWithoutRef<'rect'>;
|
|
50
|
+
/** If set, inserts a spacer column between months @default `false` */
|
|
51
|
+
splitMonths?: boolean;
|
|
50
52
|
}
|
|
51
53
|
export type HeatmapFactory = Factory<{
|
|
52
54
|
props: HeatmapProps;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type HeatmapColumn = {
|
|
2
|
+
type: 'spacer';
|
|
3
|
+
} | {
|
|
4
|
+
type: 'column';
|
|
5
|
+
month: number;
|
|
6
|
+
weekIndex: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Builds a list of visual columns for the heatmap. When `splitMonths` is false,
|
|
10
|
+
* there is exactly one column per week. When `splitMonths` is true, weeks that
|
|
11
|
+
* span two months are split into two columns and a spacer column is inserted
|
|
12
|
+
* between different months.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getColumns(datesRange: (string | null)[][], splitMonths?: boolean): HeatmapColumn[];
|
|
15
|
+
export declare function getFirstMonthColumnIndex(columns: HeatmapColumn[], month: number): number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/charts",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.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": "8.
|
|
39
|
-
"@mantine/hooks": "8.
|
|
38
|
+
"@mantine/core": "8.3.1",
|
|
39
|
+
"@mantine/hooks": "8.3.1",
|
|
40
40
|
"react": "^18.x || ^19.x",
|
|
41
41
|
"react-dom": "^18.x || ^19.x",
|
|
42
42
|
"recharts": ">=2.13.3"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@mantine-tests/core": "workspace:*",
|
|
46
46
|
"@mantine/core": "workspace:*",
|
|
47
47
|
"@mantine/hooks": "workspace:*",
|
|
48
|
-
"react": "19.
|
|
49
|
-
"react-dom": "19.
|
|
48
|
+
"react": "19.1.1",
|
|
49
|
+
"react-dom": "19.1.1"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/styles.css
CHANGED
package/styles.layer.css
CHANGED