@foris/avocado-suite 1.10.3 → 1.12.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.
Files changed (46) hide show
  1. package/dist/avocado-suite.es.js +11391 -10590
  2. package/dist/avocado-suite.umd.js +148 -148
  3. package/dist/components/bar-chart/BarChart.d.ts +36 -0
  4. package/dist/components/bar-chart/BarChart.test.d.ts +1 -0
  5. package/dist/components/bar-chart/barChart.types.d.ts +12 -0
  6. package/dist/components/bar-chart/index.d.ts +3 -0
  7. package/dist/components/bar-chart/utils/barChart.util.d.ts +4 -0
  8. package/dist/components/bar-chart/utils/barChart.util.test.d.ts +1 -0
  9. package/dist/components/donut/Donut.d.ts +39 -12
  10. package/dist/components/donut/Donut.test.d.ts +1 -0
  11. package/dist/components/donut/donut-labels/DonutLabels.d.ts +1 -1
  12. package/dist/components/donut/donut-legend/DonutLegend.d.ts +1 -1
  13. package/dist/components/donut/donut.util.d.ts +58 -0
  14. package/dist/components/donut/donut.util.test.d.ts +1 -0
  15. package/dist/components/header-navigation/HeaderNavigation.d.ts +15 -2
  16. package/dist/components/header-navigation/index.d.ts +1 -1
  17. package/dist/components/line-chart/LineChart.d.ts +5 -0
  18. package/dist/components/line-chart/LineChart.test.d.ts +1 -0
  19. package/dist/components/line-chart/components/line-chart-guide/LineChartGuide.d.ts +17 -0
  20. package/dist/components/line-chart/components/line-chart-guide/index.d.ts +2 -0
  21. package/dist/components/line-chart/hooks/useReducedMotion.d.ts +2 -0
  22. package/dist/components/line-chart/index.d.ts +3 -0
  23. package/dist/components/line-chart/lineChart.constants.d.ts +16 -0
  24. package/dist/components/line-chart/types/lineChart.types.d.ts +90 -0
  25. package/dist/components/line-chart/utils/lineChart.utils.d.ts +11 -0
  26. package/dist/components/line-chart/utils/lineChart.utils.test.d.ts +1 -0
  27. package/dist/components/progress-bar/ProgressBar.d.ts +9 -11
  28. package/dist/components/progress-bar-base/ProgressBarBase.d.ts +33 -0
  29. package/dist/components/progress-bar-base/ProgressBarBase.test.d.ts +0 -0
  30. package/dist/components/progress-bar-base/ProgressBarBase.types.test.d.ts +1 -0
  31. package/dist/components/progress-bar-base/index.d.ts +2 -0
  32. package/dist/components/progress-bar-base/progressBarBase.util.d.ts +20 -0
  33. package/dist/components/segmented-progress/SegmentedProgress.d.ts +13 -0
  34. package/dist/components/segmented-progress/SegmentedProgress.test.d.ts +0 -0
  35. package/dist/components/segmented-progress/index.d.ts +2 -0
  36. package/dist/constants/chart.constants.d.ts +5 -0
  37. package/dist/index.d.ts +14 -2
  38. package/dist/shared/components/chart-legend/ChartLegend.d.ts +6 -0
  39. package/dist/shared/components/chart-legend/index.d.ts +1 -0
  40. package/dist/shared/components/chart-tooltip/ChartTooltip.d.ts +10 -0
  41. package/dist/shared/components/chart-tooltip/index.d.ts +2 -0
  42. package/dist/style.css +1 -1
  43. package/dist/types/chart.types.d.ts +11 -0
  44. package/dist/utils/chart.util.d.ts +15 -0
  45. package/dist/utils/chart.util.test.d.ts +1 -0
  46. package/package.json +5 -3
@@ -0,0 +1,11 @@
1
+ import type { Color } from '../../../avocado-icons';
2
+ /**
3
+ * A design-system color token name, such as `'palette-4-80'` or `'success-50'`, as in Donut.
4
+ * Charts accept tokens rather than raw colors so custom colors follow the active theme.
5
+ */
6
+ export type ChartColor = `${Color}`;
7
+ export interface ChartLegendItem {
8
+ label: string;
9
+ color: string;
10
+ swatch: 'square' | 'line';
11
+ }
@@ -0,0 +1,15 @@
1
+ import type { ChartColor, ChartLegendItem } from '../types/chart.types';
2
+ /** CSS value of a color token; it follows the active theme. */
3
+ export declare const getChartColorVar: (color: ChartColor) => string;
4
+ /**
5
+ * Color of the series at `index`: its own token when given, otherwise the shared palette by
6
+ * position. Every chart part drawn for a series (marks, legend, tooltip) should use this value.
7
+ */
8
+ export declare const getChartSeriesColor: (index: number, color?: ChartColor) => string;
9
+ interface ChartLegendEntry {
10
+ label: string;
11
+ color?: ChartColor;
12
+ }
13
+ /** Legend entries: one square per series, then the reference line, which Recharts cannot see. */
14
+ export declare const getChartLegendItems: (series: readonly ChartLegendEntry[], reference?: ChartLegendEntry) => ChartLegendItem[];
15
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foris/avocado-suite",
3
- "version": "1.10.3",
3
+ "version": "1.12.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,7 +37,7 @@
37
37
  "remark-gfm": "4.0.1",
38
38
  "zustand": "4.5.4",
39
39
  "@foris/avocado-core": "1.3.4",
40
- "@foris/avocado-icons": "1.17.0"
40
+ "@foris/avocado-icons": "1.18.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@testing-library/jest-dom": "6.4.0",
@@ -52,6 +52,7 @@
52
52
  "@vitest/ui": "4.1.9",
53
53
  "classnames": "2.3.2",
54
54
  "jsdom": "24.0.0",
55
+ "recharts": "3.1.0",
55
56
  "sass": "1.62.1",
56
57
  "typescript": "5.1.3",
57
58
  "vite": "6.3.6",
@@ -63,7 +64,8 @@
63
64
  "react-joyride": "2.9.3",
64
65
  "react-select": "5.8.0",
65
66
  "react-select-async-paginate": "0.7.3",
66
- "react-toastify": "9.0.3"
67
+ "react-toastify": "9.0.3",
68
+ "recharts": "3.1.0"
67
69
  },
68
70
  "scripts": {
69
71
  "build": "tsc && vite build",