@moderneinc/react-charts 1.1.0 → 1.2.0-next.3312d9
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/dist/components/parliament-chart/hooks/{useParliamentChart.d.ts → use-parliament-chart.hook.d.ts} +1 -1
- package/dist/components/parliament-chart/{ParliamentChart.d.ts → parliament-chart.component.d.ts} +1 -1
- package/dist/components/parliament-chart/{ParliamentChart.types.d.ts → parliament-chart.types.d.ts} +1 -1
- package/dist/components/stacked-area-chart/hooks/use-stacked-area-chart.hook.d.ts +6 -0
- package/dist/components/stacked-area-chart/stacked-area-chart.component.d.ts +10 -0
- package/dist/components/stacked-area-chart/stacked-area-chart.constants.d.ts +115 -0
- package/dist/components/stacked-area-chart/stacked-area-chart.types.d.ts +186 -0
- package/dist/components/stacked-area-chart/utils/color.utils.d.ts +9 -0
- package/dist/components/timeline-chart/hooks/use-timeline-chart.hook.d.ts +2 -0
- package/dist/components/timeline-chart/timeline-chart.component.d.ts +9 -0
- package/dist/components/timeline-chart/timeline-chart.types.d.ts +126 -0
- package/dist/components/timeline-chart/timeline-selected-events.component.d.ts +9 -0
- package/dist/index.cjs +106 -11
- package/dist/index.d.ts +14 -8
- package/dist/index.js +21416 -3000
- package/dist/theme/{defaultColors.d.ts → default-colors.d.ts} +8 -0
- package/dist/theme/timeline-defaults.d.ts +50 -0
- package/package.json +8 -5
- /package/dist/components/parliament-chart/{ParliamentChart.constants.d.ts → parliament-chart.constants.d.ts} +0 -0
- /package/dist/components/parliament-chart/utils/{parliamentArcCalculator.d.ts → parliament-arc-calculator.d.ts} +0 -0
- /package/dist/components/parliament-chart/utils/{parliamentChartData.utils.d.ts → parliament-chart-data.utils.d.ts} +0 -0
- /package/dist/components/parliament-chart/utils/{parliamentSvgEnhanced.d.ts → parliament-svg-enhanced.d.ts} +0 -0
- /package/dist/components/parliament-chart/utils/{parliamentSvgPatterns.d.ts → parliament-svg-patterns.d.ts} +0 -0
- /package/dist/components/parliament-chart/utils/{parliamentSvg.d.ts → parliament-svg.d.ts} +0 -0
|
@@ -13,6 +13,14 @@ export declare const DEFAULT_CHART_COLORS: {
|
|
|
13
13
|
readonly 600: "#40c048";
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Measure gradient colors used for progress/distance categories
|
|
18
|
+
* Shared between ParliamentChart and StackedAreaChart for visual consistency
|
|
19
|
+
*
|
|
20
|
+
* Color progression: Green (best/complete) → Red (worst/farthest)
|
|
21
|
+
* Used for categories like: Complete, Closest, Close, Far, Farthest
|
|
22
|
+
*/
|
|
23
|
+
export declare const MEASURE_GRADIENT_COLORS: readonly ["#4CA75A", "#FDDA04", "#FFC008", "#FF9800", "#F9A91B", "#FF5C24", "#ED4134", "#CB3446"];
|
|
16
24
|
/**
|
|
17
25
|
* Color configuration type for parliament chart theming
|
|
18
26
|
*/
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
|
2
|
+
export declare const TIMELINE_DEFAULTS: {
|
|
3
|
+
readonly colors: {
|
|
4
|
+
readonly primary: "#992FB9";
|
|
5
|
+
readonly background: "#FFFFFF";
|
|
6
|
+
readonly border: "#9CA3AF";
|
|
7
|
+
readonly highlightBackground: "rgba(229, 231, 235, 0.5)";
|
|
8
|
+
readonly monthLabel: "#9ca3af";
|
|
9
|
+
readonly tooltipText: "#6b7280";
|
|
10
|
+
};
|
|
11
|
+
readonly dimensions: {
|
|
12
|
+
readonly height: 32;
|
|
13
|
+
readonly eventWidth: 2;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const defaultSlotProps: {
|
|
17
|
+
header: {
|
|
18
|
+
sx: SxProps<Theme>;
|
|
19
|
+
};
|
|
20
|
+
title: {
|
|
21
|
+
sx: SxProps<Theme>;
|
|
22
|
+
};
|
|
23
|
+
instructions: {
|
|
24
|
+
sx: SxProps<Theme>;
|
|
25
|
+
};
|
|
26
|
+
monthLabelsContainer: {
|
|
27
|
+
sx: SxProps<Theme>;
|
|
28
|
+
};
|
|
29
|
+
monthLabel: {
|
|
30
|
+
sx: SxProps<Theme>;
|
|
31
|
+
};
|
|
32
|
+
timeline: {
|
|
33
|
+
sx: SxProps<Theme>;
|
|
34
|
+
};
|
|
35
|
+
event: {
|
|
36
|
+
sx: SxProps<Theme>;
|
|
37
|
+
};
|
|
38
|
+
selection: {
|
|
39
|
+
sx: SxProps<Theme>;
|
|
40
|
+
};
|
|
41
|
+
tooltip: {
|
|
42
|
+
sx: SxProps<Theme>;
|
|
43
|
+
};
|
|
44
|
+
tooltipEventName: {
|
|
45
|
+
sx: SxProps<Theme>;
|
|
46
|
+
};
|
|
47
|
+
tooltipDate: {
|
|
48
|
+
sx: SxProps<Theme>;
|
|
49
|
+
};
|
|
50
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moderneinc/react-charts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-next.3312d9",
|
|
4
4
|
"description": "Parliament chart visualization library for React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"devEngines": {
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"format": "biome format --write .",
|
|
41
41
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
42
42
|
"preview": "vite preview",
|
|
43
|
-
"release": "semantic-release"
|
|
43
|
+
"release": "semantic-release",
|
|
44
|
+
"update:nvmrc": "jq -r '.devEngines.runtime.version' package.json > .nvmrc"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
47
|
"@emotion/react": ">=11.0.0",
|
|
@@ -48,7 +49,8 @@
|
|
|
48
49
|
"@mui/icons-material": ">=7.0.0",
|
|
49
50
|
"@mui/material": ">=7.0.0",
|
|
50
51
|
"react": "^18.0.0 || ^19.0.0",
|
|
51
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
52
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
53
|
+
"recharts": ">=2.0.0"
|
|
52
54
|
},
|
|
53
55
|
"dependencies": {
|
|
54
56
|
"hast-util-to-html": "^9.0.5",
|
|
@@ -77,7 +79,7 @@
|
|
|
77
79
|
"@typescript-eslint/eslint-plugin": "^8.44.0",
|
|
78
80
|
"@typescript-eslint/parser": "^8.44.0",
|
|
79
81
|
"@vitejs/plugin-react": "^4.3.4",
|
|
80
|
-
"@vitest/ui": "^2.
|
|
82
|
+
"@vitest/ui": "^3.2.4",
|
|
81
83
|
"eslint": "^9.36.0",
|
|
82
84
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
83
85
|
"eslint-plugin-react-refresh": "^0.4.16",
|
|
@@ -85,12 +87,13 @@
|
|
|
85
87
|
"jsdom": "^27.0.0",
|
|
86
88
|
"react": "^19.1.1",
|
|
87
89
|
"react-dom": "^19.1.1",
|
|
90
|
+
"recharts": "^2.15.0",
|
|
88
91
|
"semantic-release": "^24.2.0",
|
|
89
92
|
"storybook": "^8.4.7",
|
|
90
93
|
"typescript": "^5.9.2",
|
|
91
94
|
"vite": "^6.0.11",
|
|
92
95
|
"vite-plugin-dts": "^4.4.3",
|
|
93
|
-
"vitest": "^2.
|
|
96
|
+
"vitest": "^3.2.4"
|
|
94
97
|
},
|
|
95
98
|
"publishConfig": {
|
|
96
99
|
"access": "public",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|