@foris/avocado-not-front 0.17.0 → 0.18.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.
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ChartConfig } from './chart.types';
3
+ interface DynamicChartProps {
4
+ config: ChartConfig;
5
+ }
6
+ declare const DynamicChart: React.FC<DynamicChartProps>;
7
+ export default DynamicChart;
@@ -0,0 +1,9 @@
1
+ import { ChartTheme } from './chart.types';
2
+ export declare const chartRegistry: {
3
+ area: (config: import("./chart.types").ChartConfig) => JSX.Element;
4
+ bar: (config: import("./chart.types").ChartConfig) => JSX.Element;
5
+ line: (config: import("./chart.types").ChartConfig) => JSX.Element;
6
+ pie: (config: import("./chart.types").ChartConfig) => JSX.Element;
7
+ };
8
+ export declare const chartColors: string[];
9
+ export declare const chartBaseTheme: ChartTheme;
@@ -0,0 +1,14 @@
1
+ export type ChartType = 'bar' | 'line' | 'area' | 'pie';
2
+ export interface ChartTheme {
3
+ fontFamily: string;
4
+ fontSize: number;
5
+ labelColor: string;
6
+ tooltipBg: string;
7
+ tooltipColor: string;
8
+ }
9
+ export interface ChartConfig {
10
+ type: ChartType;
11
+ data: any[];
12
+ xKey: string;
13
+ yKeys: string[];
14
+ }
@@ -0,0 +1,2 @@
1
+ import { ChartConfig } from '../chart.types';
2
+ export declare const AreaChart: (config: ChartConfig) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ChartConfig } from '../chart.types';
2
+ export declare const BarChart: (config: ChartConfig) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ChartConfig } from '../chart.types';
2
+ export declare const LineChart: (config: ChartConfig) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ChartConfig } from '../chart.types';
2
+ export declare const PieChart: (config: ChartConfig) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { AreaChart } from './AreaChart';
2
+ import { BarChart } from './BarChart';
3
+ import { LineChart } from './LineChart';
4
+ import { PieChart } from './PieChart';
5
+ export { AreaChart, BarChart, LineChart, PieChart };
@@ -6,6 +6,7 @@ import Checkbox from './checkbox/Checkbox';
6
6
  import CodeEditor from './code-editor/CodeEditor';
7
7
  import ContentWrapper from './content-wrapper/ContentWrapper';
8
8
  import Divider from './divider/Divider';
9
+ import DynamicChart from './dynamic-chart/DynamicChart';
9
10
  import Header from './header/Header';
10
11
  import Modal from './modal/Modal';
11
12
  import OverlayRenderer from './overlay-renderer/OverlayRenderer';
@@ -15,4 +16,4 @@ import Switch from './switch/Switch';
15
16
  import Table from './table/Table';
16
17
  import TextField from './text-field/TextField';
17
18
  import Toast from './toast/Toast';
18
- export { Body, Breadcrumbs, Button, CardNotification, Checkbox, CodeEditor, ContentWrapper, Divider, Header, Modal, OverlayRenderer, RoundButton, Select, Switch, Table, TextField, Toast, };
19
+ export { Body, Breadcrumbs, Button, CardNotification, Checkbox, CodeEditor, ContentWrapper, Divider, DynamicChart, Header, Modal, OverlayRenderer, RoundButton, Select, Switch, Table, TextField, Toast, };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './hooks';
2
2
  export * from './types';
3
+ export { DynamicChart } from './components';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foris/avocado-not-front",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -28,10 +28,11 @@
28
28
  "react-dom": "18.2.0",
29
29
  "react-select": "5.8.0",
30
30
  "react-select-async-paginate": "0.7.3",
31
+ "recharts": "3.1.0",
31
32
  "zustand": "4.5.4",
32
33
  "@foris/avocado-core": "0.10.0",
33
- "@foris/avocado-icons": "1.15.0",
34
- "@foris/avocado-suite": "0.36.0"
34
+ "@foris/avocado-suite": "0.36.0",
35
+ "@foris/avocado-icons": "1.15.0"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@testing-library/jest-dom": "6.4.0",