@mantine/charts 9.5.1 → 9.6.0
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 +49 -11
- 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/BarChart/BarChart.cjs +44 -6
- package/cjs/BarChart/BarChart.cjs.map +1 -1
- package/cjs/BarsList/BarsList.cjs.map +1 -1
- package/cjs/BubbleChart/BubbleChart.cjs.map +1 -1
- package/cjs/BulletChart/BulletChart.cjs +7 -5
- package/cjs/BulletChart/BulletChart.cjs.map +1 -1
- package/cjs/CandlestickChart/CandlestickChart.cjs +340 -0
- package/cjs/CandlestickChart/CandlestickChart.cjs.map +1 -0
- package/cjs/CandlestickChart/get-candle-geometry/get-candle-geometry.cjs +30 -0
- package/cjs/CandlestickChart/get-candle-geometry/get-candle-geometry.cjs.map +1 -0
- package/cjs/CandlestickChart/get-candlestick-domain/get-candlestick-domain.cjs +40 -0
- package/cjs/CandlestickChart/get-candlestick-domain/get-candlestick-domain.cjs.map +1 -0
- package/cjs/ChartBrush/ChartBrush.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 +44 -6
- 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/GaugeChart/GaugeChart.cjs +208 -0
- package/cjs/GaugeChart/GaugeChart.cjs.map +1 -0
- package/cjs/GaugeChart/GaugeChart.module.cjs +10 -0
- package/cjs/GaugeChart/GaugeChart.module.cjs.map +1 -0
- package/cjs/Heatmap/Heatmap.cjs +5 -2
- package/cjs/Heatmap/Heatmap.cjs.map +1 -1
- package/cjs/Heatmap/HeatmapSplitWeeks.cjs +2 -1
- package/cjs/Heatmap/HeatmapSplitWeeks.cjs.map +1 -1
- package/cjs/Heatmap/HeatmapWeeks.cjs.map +1 -1
- package/cjs/LineChart/LineChart.cjs +44 -6
- package/cjs/LineChart/LineChart.cjs.map +1 -1
- package/cjs/MatrixChart/MatrixChart.cjs +211 -0
- package/cjs/MatrixChart/MatrixChart.cjs.map +1 -0
- package/cjs/MatrixChart/MatrixChart.module.cjs +14 -0
- package/cjs/MatrixChart/MatrixChart.module.cjs.map +1 -0
- package/cjs/MatrixChart/build-cell-map/build-cell-map.cjs +17 -0
- package/cjs/MatrixChart/build-cell-map/build-cell-map.cjs.map +1 -0
- package/cjs/MatrixChart/get-domain/get-domain.cjs +28 -0
- package/cjs/MatrixChart/get-domain/get-domain.cjs.map +1 -0
- package/cjs/MatrixChart/get-legend-width/get-legend-width.cjs +15 -0
- package/cjs/MatrixChart/get-legend-width/get-legend-width.cjs.map +1 -0
- package/cjs/MatrixChart/get-unique-values/get-unique-values.cjs +19 -0
- package/cjs/MatrixChart/get-unique-values/get-unique-values.cjs.map +1 -0
- package/cjs/PieChart/PieChart.cjs +2 -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/SankeyChart/SankeyChart.cjs.map +1 -1
- package/cjs/ScatterChart/ScatterChart.cjs +43 -7
- package/cjs/ScatterChart/ScatterChart.cjs.map +1 -1
- package/cjs/Sparkline/Sparkline.cjs.map +1 -1
- package/cjs/SunburstChart/SunburstChart.cjs.map +1 -1
- package/cjs/Treemap/Treemap.cjs.map +1 -1
- package/cjs/WaffleChart/WaffleChart.cjs +189 -0
- package/cjs/WaffleChart/WaffleChart.cjs.map +1 -0
- package/cjs/WaffleChart/WaffleChart.module.cjs +14 -0
- package/cjs/WaffleChart/WaffleChart.module.cjs.map +1 -0
- package/cjs/_virtual/_rolldown/runtime.cjs +1 -1
- package/cjs/index.cjs +8 -0
- package/cjs/utils/get-pie-chart-data/get-pie-chart-data.cjs.map +1 -1
- package/esm/AreaChart/AreaChart.mjs +50 -12
- 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/BarChart/BarChart.mjs +45 -7
- package/esm/BarChart/BarChart.mjs.map +1 -1
- package/esm/BarsList/BarsList.mjs.map +1 -1
- package/esm/BubbleChart/BubbleChart.mjs.map +1 -1
- package/esm/BulletChart/BulletChart.mjs +7 -5
- package/esm/BulletChart/BulletChart.mjs.map +1 -1
- package/esm/CandlestickChart/CandlestickChart.mjs +340 -0
- package/esm/CandlestickChart/CandlestickChart.mjs.map +1 -0
- package/esm/CandlestickChart/get-candle-geometry/get-candle-geometry.mjs +30 -0
- package/esm/CandlestickChart/get-candle-geometry/get-candle-geometry.mjs.map +1 -0
- package/esm/CandlestickChart/get-candlestick-domain/get-candlestick-domain.mjs +39 -0
- package/esm/CandlestickChart/get-candlestick-domain/get-candlestick-domain.mjs.map +1 -0
- package/esm/ChartLegend/ChartLegend.mjs.map +1 -1
- package/esm/ChartTooltip/ChartTooltip.mjs.map +1 -1
- package/esm/CompositeChart/CompositeChart.mjs +45 -7
- package/esm/CompositeChart/CompositeChart.mjs.map +1 -1
- package/esm/DonutChart/DonutChart.mjs.map +1 -1
- package/esm/FunnelChart/FunnelChart.mjs.map +1 -1
- package/esm/GaugeChart/GaugeChart.mjs +208 -0
- package/esm/GaugeChart/GaugeChart.mjs.map +1 -0
- package/esm/GaugeChart/GaugeChart.module.mjs +10 -0
- package/esm/GaugeChart/GaugeChart.module.mjs.map +1 -0
- package/esm/Heatmap/Heatmap.mjs +5 -2
- package/esm/Heatmap/Heatmap.mjs.map +1 -1
- package/esm/Heatmap/HeatmapSplitWeeks.mjs +2 -1
- package/esm/Heatmap/HeatmapSplitWeeks.mjs.map +1 -1
- package/esm/Heatmap/HeatmapWeeks.mjs.map +1 -1
- package/esm/LineChart/LineChart.mjs +45 -7
- package/esm/LineChart/LineChart.mjs.map +1 -1
- package/esm/MatrixChart/MatrixChart.mjs +211 -0
- package/esm/MatrixChart/MatrixChart.mjs.map +1 -0
- package/esm/MatrixChart/MatrixChart.module.mjs +14 -0
- package/esm/MatrixChart/MatrixChart.module.mjs.map +1 -0
- package/esm/MatrixChart/build-cell-map/build-cell-map.mjs +16 -0
- package/esm/MatrixChart/build-cell-map/build-cell-map.mjs.map +1 -0
- package/esm/MatrixChart/get-domain/get-domain.mjs +28 -0
- package/esm/MatrixChart/get-domain/get-domain.mjs.map +1 -0
- package/esm/MatrixChart/get-legend-width/get-legend-width.mjs +15 -0
- package/esm/MatrixChart/get-legend-width/get-legend-width.mjs.map +1 -0
- package/esm/MatrixChart/get-unique-values/get-unique-values.mjs +19 -0
- package/esm/MatrixChart/get-unique-values/get-unique-values.mjs.map +1 -0
- package/esm/PieChart/PieChart.mjs +2 -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/SankeyChart/SankeyChart.mjs.map +1 -1
- package/esm/ScatterChart/ScatterChart.mjs +44 -8
- package/esm/ScatterChart/ScatterChart.mjs.map +1 -1
- package/esm/Sparkline/Sparkline.mjs.map +1 -1
- package/esm/SunburstChart/SunburstChart.mjs.map +1 -1
- package/esm/Treemap/Treemap.mjs.map +1 -1
- package/esm/WaffleChart/WaffleChart.mjs +189 -0
- package/esm/WaffleChart/WaffleChart.mjs.map +1 -0
- package/esm/WaffleChart/WaffleChart.module.mjs +14 -0
- package/esm/WaffleChart/WaffleChart.module.mjs.map +1 -0
- package/esm/index.mjs +5 -1
- package/lib/AreaChart/AreaChart.d.ts +7 -3
- package/lib/AreaChart/AreaGradient.d.ts +1 -1
- package/lib/AreaChart/AreaSplit.d.ts +1 -1
- package/lib/CandlestickChart/CandlestickChart.d.ts +68 -0
- package/lib/CandlestickChart/get-candle-geometry/get-candle-geometry.d.ts +30 -0
- package/lib/CandlestickChart/get-candlestick-domain/get-candlestick-domain.d.ts +21 -0
- package/lib/CandlestickChart/index.d.ts +3 -0
- package/lib/GaugeChart/GaugeChart.d.ts +57 -0
- package/lib/GaugeChart/index.d.ts +10 -0
- package/lib/Heatmap/HeatmapSplitWeeks.d.ts +1 -1
- package/lib/Heatmap/HeatmapWeeks.d.ts +1 -1
- package/lib/MatrixChart/MatrixChart.d.ts +64 -0
- package/lib/MatrixChart/build-cell-map/build-cell-map.d.ts +3 -0
- package/lib/MatrixChart/get-domain/get-domain.d.ts +10 -0
- package/lib/MatrixChart/get-legend-width/get-legend-width.d.ts +9 -0
- package/lib/MatrixChart/get-unique-values/get-unique-values.d.ts +2 -0
- package/lib/MatrixChart/index.d.ts +8 -0
- package/lib/PointLabel/PointLabel.d.ts +1 -1
- package/lib/WaffleChart/WaffleChart.d.ts +57 -0
- package/lib/WaffleChart/index.d.ts +10 -0
- package/lib/index.d.mts +4 -0
- package/lib/index.d.ts +4 -0
- package/lib/types.d.ts +16 -2
- package/package.json +5 -5
- package/styles.css +109 -0
- package/styles.layer.css +109 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ComposedChart as ReChartsComposedChart } from 'recharts';
|
|
2
|
+
import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
|
|
3
|
+
import { ChartTooltipStylesNames } from '../ChartTooltip';
|
|
4
|
+
import type { BaseChartStylesNames, GridChartBaseProps } from '../types';
|
|
5
|
+
export interface CandlestickChartDataKeys {
|
|
6
|
+
/** Key of the data object for the open value */
|
|
7
|
+
open: string;
|
|
8
|
+
/** Key of the data object for the high value */
|
|
9
|
+
high: string;
|
|
10
|
+
/** Key of the data object for the low value */
|
|
11
|
+
low: string;
|
|
12
|
+
/** Key of the data object for the close value */
|
|
13
|
+
close: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CandlestickChartLabels {
|
|
16
|
+
/** Label of the open value displayed in the tooltip */
|
|
17
|
+
open: string;
|
|
18
|
+
/** Label of the high value displayed in the tooltip */
|
|
19
|
+
high: string;
|
|
20
|
+
/** Label of the low value displayed in the tooltip */
|
|
21
|
+
low: string;
|
|
22
|
+
/** Label of the close value displayed in the tooltip */
|
|
23
|
+
close: string;
|
|
24
|
+
}
|
|
25
|
+
export type CandlestickChartStylesNames = 'candle' | Exclude<BaseChartStylesNames, 'brush'> | ChartTooltipStylesNames;
|
|
26
|
+
export type CandlestickChartCssVariables = {
|
|
27
|
+
root: '--chart-text-color' | '--chart-grid-color';
|
|
28
|
+
};
|
|
29
|
+
export interface CandlestickChartProps extends BoxProps, Pick<GridChartBaseProps, 'dataKey' | 'withXAxis' | 'withYAxis' | 'xAxisProps' | 'yAxisProps' | 'gridProps' | 'tickLine' | 'strokeDasharray' | 'gridAxis' | 'unit' | 'tooltipAnimationDuration' | 'tooltipProps' | 'withTooltip' | 'textColor' | 'gridColor' | 'valueFormatter' | 'xAxisLabel' | 'yAxisLabel' | 'referenceLines' | 'referenceAreas' | 'referenceDots' | 'accessibilityLayer'>, StylesApiProps<CandlestickChartFactory>, ElementProps<'div'> {
|
|
30
|
+
/** Data used to display chart */
|
|
31
|
+
data: Record<string, any>[];
|
|
32
|
+
/** Keys of the `data` object used to read open, high, low and close values @default `{ open: 'open', high: 'high', low: 'low', close: 'close' }` */
|
|
33
|
+
dataKeys?: CandlestickChartDataKeys;
|
|
34
|
+
/** Labels of open, high, low and close values displayed in the tooltip @default `{ open: 'Open', high: 'High', low: 'Low', close: 'Close' }` */
|
|
35
|
+
labels?: Partial<CandlestickChartLabels>;
|
|
36
|
+
/** Color of candles with `close >= open`, key of `theme.colors` or any valid CSS color @default 'teal.6' */
|
|
37
|
+
upColor?: MantineColor;
|
|
38
|
+
/** Color of candles with `close < open`, key of `theme.colors` or any valid CSS color @default 'red.6' */
|
|
39
|
+
downColor?: MantineColor;
|
|
40
|
+
/** Maximum candle width in px */
|
|
41
|
+
maxCandleWidth?: number;
|
|
42
|
+
/** Stroke width of the candle wick and body outline @default 1 */
|
|
43
|
+
candleStrokeWidth?: number;
|
|
44
|
+
/** Props passed down to recharts `ComposedChart` component */
|
|
45
|
+
composedChartProps?: React.ComponentProps<typeof ReChartsComposedChart>;
|
|
46
|
+
/** Additional components that are rendered inside recharts `ComposedChart` component */
|
|
47
|
+
children?: React.ReactNode;
|
|
48
|
+
}
|
|
49
|
+
export type CandlestickChartFactory = Factory<{
|
|
50
|
+
props: CandlestickChartProps;
|
|
51
|
+
ref: HTMLDivElement;
|
|
52
|
+
stylesNames: CandlestickChartStylesNames;
|
|
53
|
+
vars: CandlestickChartCssVariables;
|
|
54
|
+
}>;
|
|
55
|
+
export declare const CandlestickChart: import("@mantine/core").MantineComponent<{
|
|
56
|
+
props: CandlestickChartProps;
|
|
57
|
+
ref: HTMLDivElement;
|
|
58
|
+
stylesNames: CandlestickChartStylesNames;
|
|
59
|
+
vars: CandlestickChartCssVariables;
|
|
60
|
+
}>;
|
|
61
|
+
export declare namespace CandlestickChart {
|
|
62
|
+
type Props = CandlestickChartProps;
|
|
63
|
+
type CssVariables = CandlestickChartCssVariables;
|
|
64
|
+
type Factory = CandlestickChartFactory;
|
|
65
|
+
type Labels = CandlestickChartLabels;
|
|
66
|
+
type DataKeys = CandlestickChartDataKeys;
|
|
67
|
+
type StylesNames = CandlestickChartStylesNames;
|
|
68
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface GetCandleGeometryInput {
|
|
2
|
+
/** Left edge of the slot recharts allocated to the candle */
|
|
3
|
+
x: number;
|
|
4
|
+
/** Top edge of the slot, corresponding to `high` */
|
|
5
|
+
y: number;
|
|
6
|
+
/** Width of the slot */
|
|
7
|
+
width: number;
|
|
8
|
+
/** Height of the slot, spanning `high` to `low` */
|
|
9
|
+
height: number;
|
|
10
|
+
open: unknown;
|
|
11
|
+
high: unknown;
|
|
12
|
+
low: unknown;
|
|
13
|
+
close: unknown;
|
|
14
|
+
}
|
|
15
|
+
export interface CandleGeometry {
|
|
16
|
+
/** Horizontal center of the slot, where the wick is drawn */
|
|
17
|
+
centerX: number;
|
|
18
|
+
/** Top of the open/close body */
|
|
19
|
+
bodyY: number;
|
|
20
|
+
/** Height of the open/close body, never less than 1px so a doji stays visible */
|
|
21
|
+
bodyHeight: number;
|
|
22
|
+
/** `true` when the candle closed at or above its open */
|
|
23
|
+
isUp: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Maps one OHLC row onto the slot recharts allocated for it. Returns `null` when the row
|
|
27
|
+
* cannot be drawn – the same condition `getCandlestickDomain` uses to decide which rows
|
|
28
|
+
* contribute to the axis, so the two never disagree about what is on the chart.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getCandleGeometry({ x, y, width, height, open, high, low, close, }: GetCandleGeometryInput): CandleGeometry | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function isRenderableValue(value: unknown): value is number;
|
|
2
|
+
interface GetCandlestickDomainInput {
|
|
3
|
+
data: Record<string, any>[];
|
|
4
|
+
openKey: string;
|
|
5
|
+
highKey: string;
|
|
6
|
+
lowKey: string;
|
|
7
|
+
closeKey: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Calculates an explicit y-axis domain padded by 5% of the range. Rows with missing or
|
|
11
|
+
* non-finite values are ignored – `NaN` and `Infinity` are numbers, and letting either
|
|
12
|
+
* reach the bounds produces a `NaN` domain that blanks the entire chart instead of just
|
|
13
|
+
* the offending row. Bounds are reduced iteratively rather than spread into
|
|
14
|
+
* `Math.min`/`Math.max`, which throws on large datasets.
|
|
15
|
+
*
|
|
16
|
+
* A row counts only when all four OHLC values are renderable, which is the same condition
|
|
17
|
+
* the candle shape uses. Taking `low`/`high` independently would let a half-filled row
|
|
18
|
+
* stretch the domain toward a candle that is never drawn, squashing the real ones.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getCandlestickDomain({ data, openKey, highKey, lowKey, closeKey, }: GetCandlestickDomainInput): [number, number] | undefined;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CandlestickChartCssVariables, CandlestickChartFactory, CandlestickChartLabels, CandlestickChartProps, CandlestickChartDataKeys, CandlestickChartStylesNames } from './CandlestickChart';
|
|
2
|
+
export { CandlestickChart } from './CandlestickChart';
|
|
3
|
+
export type { CandlestickChartProps, CandlestickChartStylesNames, CandlestickChartCssVariables, CandlestickChartFactory, CandlestickChartLabels, CandlestickChartDataKeys, };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
|
|
2
|
+
export interface GaugeChartSection {
|
|
3
|
+
/** Upper bound value for this section */
|
|
4
|
+
value: number;
|
|
5
|
+
/** Color of the section */
|
|
6
|
+
color: MantineColor;
|
|
7
|
+
}
|
|
8
|
+
export type GaugeChartStylesNames = 'root' | 'track' | 'section' | 'needle' | 'label';
|
|
9
|
+
export type GaugeChartCssVariables = {
|
|
10
|
+
root: '--gauge-size';
|
|
11
|
+
};
|
|
12
|
+
export interface GaugeChartProps extends BoxProps, StylesApiProps<GaugeChartFactory>, ElementProps<'svg', 'display' | 'opacity' | 'viewBox' | 'width' | 'height' | 'target'> {
|
|
13
|
+
/** Current value to display. Fills the arc from `min` up to `value`, unless `sections` is set – then the arc is colored by thresholds and the value is displayed only in the center label. */
|
|
14
|
+
value: number;
|
|
15
|
+
/** Minimum value of the gauge, @default 0 */
|
|
16
|
+
min?: number;
|
|
17
|
+
/** Maximum value of the gauge, @default 100 */
|
|
18
|
+
max?: number;
|
|
19
|
+
/** Value marked on the arc with a line marker, use to display a goal or the current value of a gauge with `sections` */
|
|
20
|
+
target?: number;
|
|
21
|
+
/** Threshold sections of the gauge arc, each section is filled from the previous section upper bound to its own `value`. If set, the arc is not filled based on `value`. */
|
|
22
|
+
sections?: GaugeChartSection[];
|
|
23
|
+
/** Arc thickness in px, @default 12 */
|
|
24
|
+
thickness?: number;
|
|
25
|
+
/** Chart size (width and height), @default 200 */
|
|
26
|
+
size?: number;
|
|
27
|
+
/** Start angle in degrees, @default -120 */
|
|
28
|
+
startAngle?: number;
|
|
29
|
+
/** End angle in degrees, @default 120 */
|
|
30
|
+
endAngle?: number;
|
|
31
|
+
/** Label displayed in the center of the gauge */
|
|
32
|
+
label?: React.ReactNode;
|
|
33
|
+
/** Value formatter for default label, @default (v) => String(v) */
|
|
34
|
+
valueFormatter?: (value: number) => string;
|
|
35
|
+
/** Color of the gauge track (unfilled portion) */
|
|
36
|
+
trackColor?: MantineColor;
|
|
37
|
+
/** Color of the filled arc when sections are not provided */
|
|
38
|
+
filledColor?: MantineColor;
|
|
39
|
+
/** Color of the target marker */
|
|
40
|
+
targetColor?: MantineColor;
|
|
41
|
+
/** Thickness of the target marker, @default 2 */
|
|
42
|
+
targetSize?: number;
|
|
43
|
+
/** Whether to round arc endpoints. Not applied to `sections` – rounded caps of adjacent sections would overlap each other. @default false */
|
|
44
|
+
roundCaps?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export type GaugeChartFactory = Factory<{
|
|
47
|
+
props: GaugeChartProps;
|
|
48
|
+
ref: SVGSVGElement;
|
|
49
|
+
stylesNames: GaugeChartStylesNames;
|
|
50
|
+
vars: GaugeChartCssVariables;
|
|
51
|
+
}>;
|
|
52
|
+
export declare const GaugeChart: import("@mantine/core").MantineComponent<{
|
|
53
|
+
props: GaugeChartProps;
|
|
54
|
+
ref: SVGSVGElement;
|
|
55
|
+
stylesNames: GaugeChartStylesNames;
|
|
56
|
+
vars: GaugeChartCssVariables;
|
|
57
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GaugeChartCssVariables, GaugeChartFactory, GaugeChartProps, GaugeChartSection, GaugeChartStylesNames } from './GaugeChart';
|
|
2
|
+
export { GaugeChart } from './GaugeChart';
|
|
3
|
+
export type { GaugeChartProps, GaugeChartStylesNames, GaugeChartCssVariables, GaugeChartFactory, GaugeChartSection, };
|
|
4
|
+
export declare namespace GaugeChart {
|
|
5
|
+
type Props = GaugeChartProps;
|
|
6
|
+
type StylesNames = GaugeChartStylesNames;
|
|
7
|
+
type CssVariables = GaugeChartCssVariables;
|
|
8
|
+
type Factory = GaugeChartFactory;
|
|
9
|
+
type Section = GaugeChartSection;
|
|
10
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HeatmapWeeksSharedProps } from './HeatmapWeeks.types';
|
|
2
|
-
export declare function HeatmapSplitWeeks({ data, datesRange, rectSize, gap, rectRadius, min, max, colors, withTooltip, setHoveredRect, getRectProps, getStyles, }: HeatmapWeeksSharedProps): import("react
|
|
2
|
+
export declare function HeatmapSplitWeeks({ data, datesRange, rectSize, gap, rectRadius, min, max, colors, withTooltip, setHoveredRect, getRectProps, getStyles, }: HeatmapWeeksSharedProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HeatmapWeeksSharedProps } from './HeatmapWeeks.types';
|
|
2
|
-
export declare function HeatmapWeeks({ data, datesRange, rectSize, gap, rectRadius, min, max, colors, withTooltip, setHoveredRect, getRectProps, getStyles, }: HeatmapWeeksSharedProps): import("react
|
|
2
|
+
export declare function HeatmapWeeks({ data, datesRange, rectSize, gap, rectRadius, min, max, colors, withTooltip, setHoveredRect, getRectProps, getStyles, }: HeatmapWeeksSharedProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps, TooltipFloatingProps } from '@mantine/core';
|
|
2
|
+
export interface MatrixChartCell {
|
|
3
|
+
x: string;
|
|
4
|
+
y: string;
|
|
5
|
+
value: number | null;
|
|
6
|
+
}
|
|
7
|
+
export type MatrixChartData = MatrixChartCell[];
|
|
8
|
+
export type MatrixChartStylesNames = 'root' | 'cell' | 'xLabel' | 'yLabel' | 'legend' | 'legendLabel' | 'legendRect';
|
|
9
|
+
export interface MatrixChartProps extends BoxProps, StylesApiProps<MatrixChartFactory>, ElementProps<'svg', 'display' | 'opacity' | 'viewBox' | 'width' | 'height'> {
|
|
10
|
+
/** Array of cell objects with x, y, and value */
|
|
11
|
+
data: MatrixChartData;
|
|
12
|
+
/** Labels for x-axis (columns), displayed along top or bottom */
|
|
13
|
+
xLabels?: string[];
|
|
14
|
+
/** Labels for y-axis (rows), displayed along left side */
|
|
15
|
+
yLabels?: string[];
|
|
16
|
+
/** Value domain [min, max] for color interpolation, auto-calculated if not set */
|
|
17
|
+
domain?: [number, number];
|
|
18
|
+
/** Array of colors for value interpolation, by default 4 shades of green colors are used */
|
|
19
|
+
colors?: MantineColor[];
|
|
20
|
+
/** Cell size in px, @default 20 */
|
|
21
|
+
cellSize?: number;
|
|
22
|
+
/** Gap between cells in px, @default 1 */
|
|
23
|
+
gap?: number;
|
|
24
|
+
/** Cell border radius, @default 2 */
|
|
25
|
+
cellRadius?: number;
|
|
26
|
+
/** If set, tooltip is displayed on cell hover, requires `getTooltipLabel` to be set @default false */
|
|
27
|
+
withTooltip?: boolean;
|
|
28
|
+
/** A function to generate tooltip label based on the hovered cell, required for the tooltip to be visible */
|
|
29
|
+
getTooltipLabel?: (cell: MatrixChartCell) => React.ReactNode;
|
|
30
|
+
/** Props passed down to the `Tooltip.Floating` component */
|
|
31
|
+
tooltipProps?: Partial<TooltipFloatingProps>;
|
|
32
|
+
/** Callback to add custom props to cells */
|
|
33
|
+
getCellProps?: (cell: MatrixChartCell) => React.ComponentProps<'rect'>;
|
|
34
|
+
/** Width reserved for y-axis labels, @default 60 */
|
|
35
|
+
yLabelsWidth?: number;
|
|
36
|
+
/** Height reserved for x-axis labels, @default 60 */
|
|
37
|
+
xLabelsHeight?: number;
|
|
38
|
+
/** X-axis label position, @default 'bottom' */
|
|
39
|
+
xLabelsPosition?: 'top' | 'bottom';
|
|
40
|
+
/** Font size for axis labels, @default 12 */
|
|
41
|
+
fontSize?: number;
|
|
42
|
+
/** Color for empty/null cells */
|
|
43
|
+
emptyColor?: MantineColor;
|
|
44
|
+
/** Whether to show legend, @default false */
|
|
45
|
+
withLegend?: boolean;
|
|
46
|
+
/** Legend labels, @default ['Less', 'More'] */
|
|
47
|
+
legendLabels?: [string, string];
|
|
48
|
+
/** If set, x-axis labels are displayed, @default false */
|
|
49
|
+
withXLabels?: boolean;
|
|
50
|
+
/** If set, y-axis labels are displayed, @default false */
|
|
51
|
+
withYLabels?: boolean;
|
|
52
|
+
/** Rotation angle for x-axis labels in degrees, @default -90 */
|
|
53
|
+
xLabelsRotation?: number;
|
|
54
|
+
}
|
|
55
|
+
export type MatrixChartFactory = Factory<{
|
|
56
|
+
props: MatrixChartProps;
|
|
57
|
+
ref: SVGSVGElement;
|
|
58
|
+
stylesNames: MatrixChartStylesNames;
|
|
59
|
+
}>;
|
|
60
|
+
export declare const MatrixChart: import("@mantine/core").MantineComponent<{
|
|
61
|
+
props: MatrixChartProps;
|
|
62
|
+
ref: SVGSVGElement;
|
|
63
|
+
stylesNames: MatrixChartStylesNames;
|
|
64
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MatrixChartCell } from '../MatrixChart';
|
|
2
|
+
/**
|
|
3
|
+
* Calculates the value domain used for color interpolation. Rows with missing or
|
|
4
|
+
* non-finite values are ignored – `NaN` and `Infinity` are numbers, and letting either
|
|
5
|
+
* reach the bounds produces a `NaN` domain, which resolves every cell color to
|
|
6
|
+
* `undefined` and paints the whole matrix with the SVG default fill instead of just
|
|
7
|
+
* skipping the offending cell. Bounds are reduced iteratively rather than spread into
|
|
8
|
+
* `Math.min`/`Math.max`, which throws on large matrices.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getDomain(data: MatrixChartCell[], domain?: [number, number]): [number, number];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface GetLegendWidthInput {
|
|
2
|
+
legendLabels: [string, string];
|
|
3
|
+
fontSize: number;
|
|
4
|
+
colorsCount: number;
|
|
5
|
+
cellSize: number;
|
|
6
|
+
gap: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function getLegendWidth({ legendLabels, fontSize, colorsCount, cellSize, gap, }: GetLegendWidthInput): number;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MatrixChartFactory, MatrixChartProps, MatrixChartStylesNames } from './MatrixChart';
|
|
2
|
+
export { MatrixChart } from './MatrixChart';
|
|
3
|
+
export type { MatrixChartProps, MatrixChartStylesNames, MatrixChartFactory, MatrixChartCell, MatrixChartData, } from './MatrixChart';
|
|
4
|
+
export declare namespace MatrixChart {
|
|
5
|
+
type Props = MatrixChartProps;
|
|
6
|
+
type StylesNames = MatrixChartStylesNames;
|
|
7
|
+
type Factory = MatrixChartFactory;
|
|
8
|
+
}
|
|
@@ -4,5 +4,5 @@ interface PointLabelProps {
|
|
|
4
4
|
value?: number;
|
|
5
5
|
valueFormatter?: (value: number) => string;
|
|
6
6
|
}
|
|
7
|
-
export declare function PointLabel({ x, y, value, valueFormatter }: PointLabelProps): import("react
|
|
7
|
+
export declare function PointLabel({ x, y, value, valueFormatter }: PointLabelProps): import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
|
|
2
|
+
export interface WaffleChartCell {
|
|
3
|
+
/** Segment name */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Segment value */
|
|
6
|
+
value: number;
|
|
7
|
+
/** Segment color */
|
|
8
|
+
color: MantineColor;
|
|
9
|
+
/** Unique key for the segment */
|
|
10
|
+
key?: string | number;
|
|
11
|
+
}
|
|
12
|
+
export type WaffleChartStylesNames = 'root' | 'grid' | 'cell' | 'legend' | 'legendItem' | 'legendSwatch' | 'legendLabel';
|
|
13
|
+
export type WaffleChartCssVariables = {
|
|
14
|
+
root: '--waffle-cell-radius' | '--waffle-empty-color';
|
|
15
|
+
};
|
|
16
|
+
export interface WaffleChartProps extends BoxProps, StylesApiProps<WaffleChartFactory>, ElementProps<'div'> {
|
|
17
|
+
/** Array of data segments with name, value, and color */
|
|
18
|
+
data: WaffleChartCell[];
|
|
19
|
+
/** Number of rows, @default 10 */
|
|
20
|
+
rows?: number;
|
|
21
|
+
/** Number of columns, @default 10 */
|
|
22
|
+
columns?: number;
|
|
23
|
+
/** Total value for the chart, determines how many cells are filled vs empty, sum of all values by default */
|
|
24
|
+
total?: number;
|
|
25
|
+
/** Gap between cells in px, @default 2 */
|
|
26
|
+
gap?: number;
|
|
27
|
+
/** Cell border radius, @default 0 */
|
|
28
|
+
cellRadius?: number;
|
|
29
|
+
/** Color of empty (unfilled) cells */
|
|
30
|
+
emptyColor?: MantineColor;
|
|
31
|
+
/** Whether to show tooltip on hover, @default false */
|
|
32
|
+
withTooltip?: boolean;
|
|
33
|
+
/** Custom tooltip label formatter */
|
|
34
|
+
getTooltipLabel?: (cell: WaffleChartCell & {
|
|
35
|
+
count: number;
|
|
36
|
+
}) => React.ReactNode;
|
|
37
|
+
/** Whether to show legend, @default true */
|
|
38
|
+
withLegend?: boolean;
|
|
39
|
+
/** Legend position, @default 'bottom' */
|
|
40
|
+
legendPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
41
|
+
/** Fill direction, @default 'left-to-right' */
|
|
42
|
+
fillDirection?: 'left-to-right' | 'right-to-left' | 'top-to-bottom' | 'bottom-to-top';
|
|
43
|
+
/** Chart size (width), auto-calculated from columns if not set */
|
|
44
|
+
size?: number;
|
|
45
|
+
}
|
|
46
|
+
export type WaffleChartFactory = Factory<{
|
|
47
|
+
props: WaffleChartProps;
|
|
48
|
+
ref: HTMLDivElement;
|
|
49
|
+
stylesNames: WaffleChartStylesNames;
|
|
50
|
+
vars: WaffleChartCssVariables;
|
|
51
|
+
}>;
|
|
52
|
+
export declare const WaffleChart: import("@mantine/core").MantineComponent<{
|
|
53
|
+
props: WaffleChartProps;
|
|
54
|
+
ref: HTMLDivElement;
|
|
55
|
+
stylesNames: WaffleChartStylesNames;
|
|
56
|
+
vars: WaffleChartCssVariables;
|
|
57
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WaffleChartCell, WaffleChartCssVariables, WaffleChartFactory, WaffleChartProps, WaffleChartStylesNames } from './WaffleChart';
|
|
2
|
+
export { WaffleChart } from './WaffleChart';
|
|
3
|
+
export type { WaffleChartProps, WaffleChartStylesNames, WaffleChartCssVariables, WaffleChartFactory, WaffleChartCell, };
|
|
4
|
+
export declare namespace WaffleChart {
|
|
5
|
+
type Props = WaffleChartProps;
|
|
6
|
+
type StylesNames = WaffleChartStylesNames;
|
|
7
|
+
type CssVariables = WaffleChartCssVariables;
|
|
8
|
+
type Factory = WaffleChartFactory;
|
|
9
|
+
type Cell = WaffleChartCell;
|
|
10
|
+
}
|
package/lib/index.d.mts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './RadarChart/index.js';
|
|
|
11
11
|
export * from './ScatterChart/index.js';
|
|
12
12
|
export * from './BubbleChart/index.js';
|
|
13
13
|
export * from './CompositeChart/index.js';
|
|
14
|
+
export * from './CandlestickChart/index.js';
|
|
14
15
|
export * from './RadialBarChart/index.js';
|
|
15
16
|
export * from './FunnelChart/index.js';
|
|
16
17
|
export * from './Heatmap/index.js';
|
|
@@ -19,4 +20,7 @@ export * from './Treemap/index.js';
|
|
|
19
20
|
export * from './SankeyChart/index.js';
|
|
20
21
|
export * from './SunburstChart/index.js';
|
|
21
22
|
export * from './BulletChart/index.js';
|
|
23
|
+
export * from './GaugeChart/index.js';
|
|
24
|
+
export * from './WaffleChart/index.js';
|
|
25
|
+
export * from './MatrixChart/index.js';
|
|
22
26
|
export * from './types';
|
package/lib/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './RadarChart/index.js';
|
|
|
11
11
|
export * from './ScatterChart/index.js';
|
|
12
12
|
export * from './BubbleChart/index.js';
|
|
13
13
|
export * from './CompositeChart/index.js';
|
|
14
|
+
export * from './CandlestickChart/index.js';
|
|
14
15
|
export * from './RadialBarChart/index.js';
|
|
15
16
|
export * from './FunnelChart/index.js';
|
|
16
17
|
export * from './Heatmap/index.js';
|
|
@@ -19,4 +20,7 @@ export * from './Treemap/index.js';
|
|
|
19
20
|
export * from './SankeyChart/index.js';
|
|
20
21
|
export * from './SunburstChart/index.js';
|
|
21
22
|
export * from './BulletChart/index.js';
|
|
23
|
+
export * from './GaugeChart/index.js';
|
|
24
|
+
export * from './WaffleChart/index.js';
|
|
25
|
+
export * from './MatrixChart/index.js';
|
|
22
26
|
export * from './types';
|
package/lib/types.d.ts
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
import type { BrushProps, CartesianGridProps, DotProps, LabelProps, LegendProps, ReferenceLineProps, TooltipProps, XAxisProps, YAxisProps } from 'recharts';
|
|
1
|
+
import type { BrushProps, CartesianGridProps, DotProps, LabelProps, LegendProps, ReferenceAreaProps, ReferenceDotProps, ReferenceLineProps, TooltipProps, XAxisProps, YAxisProps } from 'recharts';
|
|
2
2
|
import type { MantineColor } from '@mantine/core';
|
|
3
3
|
export interface ChartReferenceLineProps extends Omit<ReferenceLineProps, 'ref' | 'label'> {
|
|
4
4
|
color?: MantineColor;
|
|
5
5
|
label?: string | Omit<LabelProps, 'ref'>;
|
|
6
6
|
labelPosition?: LabelProps['position'];
|
|
7
7
|
}
|
|
8
|
+
export interface ChartReferenceAreaProps extends Omit<ReferenceAreaProps, 'ref' | 'label'> {
|
|
9
|
+
color?: MantineColor;
|
|
10
|
+
label?: string | Omit<LabelProps, 'ref'>;
|
|
11
|
+
labelPosition?: LabelProps['position'];
|
|
12
|
+
}
|
|
13
|
+
export interface ChartReferenceDotProps extends Omit<ReferenceDotProps, 'ref' | 'label'> {
|
|
14
|
+
color?: MantineColor;
|
|
15
|
+
label?: string | Omit<LabelProps, 'ref'>;
|
|
16
|
+
labelPosition?: LabelProps['position'];
|
|
17
|
+
}
|
|
8
18
|
export interface ChartSeries {
|
|
9
19
|
name: string;
|
|
10
20
|
color?: MantineColor;
|
|
11
21
|
label?: string;
|
|
12
22
|
yAxisId?: string;
|
|
13
23
|
}
|
|
14
|
-
export type BaseChartStylesNames = 'root' | 'container' | 'axis' | 'grid' | 'referenceLine' | 'axisLabel' | 'brush';
|
|
24
|
+
export type BaseChartStylesNames = 'root' | 'container' | 'axis' | 'grid' | 'referenceLine' | 'referenceArea' | 'referenceDot' | 'axisLabel' | 'brush';
|
|
15
25
|
export type ChartData = Record<string, any>[];
|
|
16
26
|
export interface GridChartBaseProps {
|
|
17
27
|
/** Data used to display chart */
|
|
@@ -20,6 +30,10 @@ export interface GridChartBaseProps {
|
|
|
20
30
|
dataKey: string;
|
|
21
31
|
/** Reference lines that should be displayed on the chart */
|
|
22
32
|
referenceLines?: ChartReferenceLineProps[];
|
|
33
|
+
/** Reference areas that should be displayed on the chart */
|
|
34
|
+
referenceAreas?: ChartReferenceAreaProps[];
|
|
35
|
+
/** Reference dots that should be displayed on the chart */
|
|
36
|
+
referenceDots?: ChartReferenceDotProps[];
|
|
23
37
|
/** Determines whether x-axis should be displayed, `true` by default */
|
|
24
38
|
withXAxis?: boolean;
|
|
25
39
|
/** Determines whether y-axis should be displayed, `true` by default */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/charts",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
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": "9.
|
|
39
|
-
"@mantine/hooks": "9.
|
|
38
|
+
"@mantine/core": "9.6.0",
|
|
39
|
+
"@mantine/hooks": "9.6.0",
|
|
40
40
|
"react": "^19.2.0",
|
|
41
41
|
"react-dom": "^19.2.0",
|
|
42
42
|
"recharts": ">=3.2.1"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@mantine-tests/core": "workspace:*",
|
|
46
46
|
"@mantine/core": "workspace:*",
|
|
47
47
|
"@mantine/hooks": "workspace:*",
|
|
48
|
-
"react": "19.2.
|
|
49
|
-
"react-dom": "19.2.
|
|
48
|
+
"react": "19.2.8",
|
|
49
|
+
"react-dom": "19.2.8"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/styles.css
CHANGED
|
@@ -621,3 +621,112 @@
|
|
|
621
621
|
right: 0;
|
|
622
622
|
transform: translateY(50%);
|
|
623
623
|
}
|
|
624
|
+
|
|
625
|
+
.m_b7f9c72a {
|
|
626
|
+
width: var(--gauge-size);
|
|
627
|
+
height: auto;
|
|
628
|
+
aspect-ratio: var(--gauge-aspect-ratio, 1);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.m_46e401ac {
|
|
632
|
+
display: flex;
|
|
633
|
+
align-items: center;
|
|
634
|
+
justify-content: center;
|
|
635
|
+
width: 100%;
|
|
636
|
+
height: 100%;
|
|
637
|
+
font-size: var(--mantine-font-size-lg);
|
|
638
|
+
font-weight: var(--mantine-font-weight-bold);
|
|
639
|
+
color: var(--mantine-color-text);
|
|
640
|
+
line-height: 1;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.m_16f4c1f4 {
|
|
644
|
+
display: inline-flex;
|
|
645
|
+
flex-direction: column;
|
|
646
|
+
align-items: center;
|
|
647
|
+
gap: var(--mantine-spacing-sm);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.m_16f4c1f4[data-vertical] {
|
|
651
|
+
flex-direction: row;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.m_16edca74 {
|
|
655
|
+
rx: var(--waffle-cell-radius);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.m_16edca74[data-empty] {
|
|
659
|
+
fill: var(--waffle-empty-color, var(--mantine-color-default-border));
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.m_21fe489f {
|
|
663
|
+
display: flex;
|
|
664
|
+
flex-wrap: wrap;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
[data-vertical] > .m_21fe489f {
|
|
668
|
+
flex-direction: column;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.m_f27dd052 {
|
|
672
|
+
display: flex;
|
|
673
|
+
align-items: center;
|
|
674
|
+
gap: calc(var(--mantine-spacing-xs) / 2);
|
|
675
|
+
cursor: default;
|
|
676
|
+
padding: calc(var(--mantine-spacing-xs) / 2) calc(var(--mantine-spacing-sm) / 2);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.m_5b8415bb {
|
|
680
|
+
display: block;
|
|
681
|
+
width: calc(0.75rem * var(--mantine-scale));
|
|
682
|
+
height: calc(0.75rem * var(--mantine-scale));
|
|
683
|
+
border-radius: var(--waffle-cell-radius, calc(0.125rem * var(--mantine-scale)));
|
|
684
|
+
flex-shrink: 0;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.m_5d5dd195 {
|
|
688
|
+
font-size: var(--mantine-font-size-sm);
|
|
689
|
+
color: var(--mantine-color-text);
|
|
690
|
+
line-height: 1;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.m_c56bc032 {
|
|
694
|
+
display: block;
|
|
695
|
+
width: fit-content;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
:where([data-mantine-color-scheme='light']) .m_c56bc032 {
|
|
699
|
+
--matrix-level-1: rgba(81, 207, 102, 0.3);
|
|
700
|
+
--matrix-level-2: rgba(64, 192, 87, 0.45);
|
|
701
|
+
--matrix-level-3: rgba(55, 178, 77, 0.75);
|
|
702
|
+
--matrix-level-4: rgba(43, 138, 62, 1);
|
|
703
|
+
--matrix-empty-bg: var(--mantine-color-gray-2);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
:where([data-mantine-color-scheme='dark']) .m_c56bc032 {
|
|
707
|
+
--matrix-level-1: rgba(43, 138, 62, 0.3);
|
|
708
|
+
--matrix-level-2: rgba(47, 158, 68, 0.45);
|
|
709
|
+
--matrix-level-3: rgba(55, 178, 77, 0.75);
|
|
710
|
+
--matrix-level-4: rgba(81, 207, 102, 1);
|
|
711
|
+
--matrix-empty-bg: var(--mantine-color-dark-5);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.m_c564c8b2 {
|
|
715
|
+
stroke-width: calc(0.0625rem * var(--mantine-scale));
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.m_c564c8b2:where([data-empty]) {
|
|
719
|
+
fill: var(--matrix-empty-bg);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.m_21c5c4ac,
|
|
723
|
+
.m_237a9d4b,
|
|
724
|
+
.m_3135f197 {
|
|
725
|
+
cursor: default;
|
|
726
|
+
user-select: none;
|
|
727
|
+
fill: var(--mantine-color-dimmed);
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
.m_af0486e1:where([data-empty]) {
|
|
731
|
+
fill: var(--matrix-empty-bg);
|
|
732
|
+
}
|