zeonailabs-reactlib 1.0.0 → 1.0.2
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/ActivityFeed/ActivityFeed.d.ts +17 -0
- package/dist/components/ActivityFeed/ActivityFeed.test.d.ts +1 -0
- package/dist/components/ActivityFeed/formatRelativeTime.d.ts +1 -0
- package/dist/components/ActivityFeed/index.d.ts +3 -0
- package/dist/components/AreaChart/AreaChart.d.ts +19 -0
- package/dist/components/AreaChart/AreaChart.test.d.ts +1 -0
- package/dist/components/AreaChart/index.d.ts +2 -0
- package/dist/components/BarChart/BarChart.d.ts +19 -0
- package/dist/components/BarChart/BarChart.test.d.ts +1 -0
- package/dist/components/BarChart/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +8 -0
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/DataTable/DataTable.d.ts +23 -0
- package/dist/components/DataTable/DataTable.test.d.ts +1 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DonutChart/DonutChart.d.ts +19 -0
- package/dist/components/DonutChart/DonutChart.test.d.ts +1 -0
- package/dist/components/DonutChart/index.d.ts +2 -0
- package/dist/components/GeoPoints/GeoPoints.d.ts +24 -0
- package/dist/components/GeoPoints/GeoPoints.test.d.ts +1 -0
- package/dist/components/GeoPoints/index.d.ts +2 -0
- package/dist/components/KpiStatsCard/KpiStatsCard.d.ts +17 -0
- package/dist/components/KpiStatsCard/KpiStatsCard.test.d.ts +1 -0
- package/dist/components/KpiStatsCard/index.d.ts +2 -0
- package/dist/components/LineChart/LineChart.d.ts +17 -0
- package/dist/components/LineChart/LineChart.test.d.ts +1 -0
- package/dist/components/LineChart/index.d.ts +2 -0
- package/dist/components/ScatterChart/ScatterChart.d.ts +21 -0
- package/dist/components/ScatterChart/ScatterChart.test.d.ts +1 -0
- package/dist/components/ScatterChart/index.d.ts +2 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +1 -151
- package/package.json +19 -10
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ActivityFeedItem {
|
|
3
|
+
id: string | number;
|
|
4
|
+
description: React.ReactNode;
|
|
5
|
+
timestamp: Date | string | number;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
iconColor?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ActivityFeedProps {
|
|
10
|
+
items: ActivityFeedItem[];
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
emptyMessage?: string;
|
|
13
|
+
maxHeight?: number | string;
|
|
14
|
+
now?: Date;
|
|
15
|
+
}
|
|
16
|
+
declare const ActivityFeed: React.FC<ActivityFeedProps>;
|
|
17
|
+
export default ActivityFeed;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatRelativeTime: (timestamp: Date | string | number, now?: Date) => string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AreaChartSeries {
|
|
3
|
+
data: number[];
|
|
4
|
+
label?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
stack?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AreaChartProps {
|
|
9
|
+
series: AreaChartSeries[];
|
|
10
|
+
xAxisData?: (number | string)[];
|
|
11
|
+
xAxisLabel?: string;
|
|
12
|
+
yAxisLabel?: string;
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
showMarks?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const AreaChart: React.FC<AreaChartProps>;
|
|
19
|
+
export default AreaChart;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BarChartSeries {
|
|
3
|
+
data: number[];
|
|
4
|
+
label?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
stack?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface BarChartProps {
|
|
9
|
+
series: BarChartSeries[];
|
|
10
|
+
categories: (number | string)[];
|
|
11
|
+
layout?: 'vertical' | 'horizontal';
|
|
12
|
+
xAxisLabel?: string;
|
|
13
|
+
yAxisLabel?: string;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const BarChart: React.FC<BarChartProps>;
|
|
19
|
+
export default BarChart;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps as MuiButtonProps } from '@mui/material';
|
|
3
|
+
export interface ButtonProps extends Omit<MuiButtonProps, 'variant'> {
|
|
4
|
+
variant?: 'contained' | 'outlined' | 'text';
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Button: React.FC<ButtonProps>;
|
|
8
|
+
export default Button;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GridColDef, GridRowsProp, GridSortModel } from '@mui/x-data-grid';
|
|
2
|
+
export type DataTableColumn<R extends object = object> = GridColDef<R>;
|
|
3
|
+
export interface DataTableProps<R extends {
|
|
4
|
+
id: string | number;
|
|
5
|
+
} = {
|
|
6
|
+
id: string | number;
|
|
7
|
+
}> {
|
|
8
|
+
rows: GridRowsProp<R>;
|
|
9
|
+
columns: DataTableColumn<R>[];
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
pageSize?: number;
|
|
12
|
+
pageSizeOptions?: number[];
|
|
13
|
+
initialSort?: GridSortModel;
|
|
14
|
+
height?: number | string;
|
|
15
|
+
density?: 'compact' | 'standard' | 'comfortable';
|
|
16
|
+
checkboxSelection?: boolean;
|
|
17
|
+
disablePagination?: boolean;
|
|
18
|
+
onRowClick?: (row: R) => void;
|
|
19
|
+
}
|
|
20
|
+
declare const DataTable: <R extends {
|
|
21
|
+
id: string | number;
|
|
22
|
+
}>({ rows, columns, loading, pageSize, pageSizeOptions, initialSort, height, density, checkboxSelection, disablePagination, onRowClick, }: DataTableProps<R>) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default DataTable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DonutChartSlice {
|
|
3
|
+
id: number | string;
|
|
4
|
+
value: number;
|
|
5
|
+
label?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DonutChartProps {
|
|
9
|
+
data: DonutChartSlice[];
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
innerRadius?: number;
|
|
13
|
+
outerRadius?: number;
|
|
14
|
+
paddingAngle?: number;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
hideLegend?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const DonutChart: React.FC<DonutChartProps>;
|
|
19
|
+
export default DonutChart;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'leaflet/dist/leaflet.css';
|
|
3
|
+
export interface GeoPoint {
|
|
4
|
+
id: string | number;
|
|
5
|
+
lat: number;
|
|
6
|
+
lng: number;
|
|
7
|
+
label?: string;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
color?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GeoPointsProps {
|
|
12
|
+
points: GeoPoint[];
|
|
13
|
+
center?: [number, number];
|
|
14
|
+
zoom?: number;
|
|
15
|
+
height?: number | string;
|
|
16
|
+
width?: number | string;
|
|
17
|
+
variant?: 'marker' | 'circle';
|
|
18
|
+
fitBounds?: boolean;
|
|
19
|
+
tileUrl?: string;
|
|
20
|
+
tileAttribution?: string;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const GeoPoints: React.FC<GeoPointsProps>;
|
|
24
|
+
export default GeoPoints;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type KpiStatusColor = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
3
|
+
export interface KpiStatsCardProps {
|
|
4
|
+
title: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
unit?: string;
|
|
7
|
+
delta?: number;
|
|
8
|
+
deltaSuffix?: string;
|
|
9
|
+
status?: {
|
|
10
|
+
label: string;
|
|
11
|
+
color?: KpiStatusColor;
|
|
12
|
+
};
|
|
13
|
+
icon?: React.ReactNode;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const KpiStatsCard: React.FC<KpiStatsCardProps>;
|
|
17
|
+
export default KpiStatsCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LineChartSeries {
|
|
3
|
+
data: number[];
|
|
4
|
+
label?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LineChartProps {
|
|
8
|
+
series: LineChartSeries[];
|
|
9
|
+
xAxisData?: (number | string)[];
|
|
10
|
+
xAxisLabel?: string;
|
|
11
|
+
yAxisLabel?: string;
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const LineChart: React.FC<LineChartProps>;
|
|
17
|
+
export default LineChart;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ScatterChartPoint {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
id: number | string;
|
|
6
|
+
}
|
|
7
|
+
export interface ScatterChartSeries {
|
|
8
|
+
data: ScatterChartPoint[];
|
|
9
|
+
label?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ScatterChartProps {
|
|
13
|
+
series: ScatterChartSeries[];
|
|
14
|
+
xAxisLabel?: string;
|
|
15
|
+
yAxisLabel?: string;
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const ScatterChart: React.FC<ScatterChartProps>;
|
|
21
|
+
export default ScatterChart;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { default as Button } from './components/Button';
|
|
2
|
+
export type { ButtonProps } from './components/Button';
|
|
3
|
+
export { default as LineChart } from './components/LineChart';
|
|
4
|
+
export type { LineChartProps, LineChartSeries } from './components/LineChart';
|
|
5
|
+
export { default as ScatterChart } from './components/ScatterChart';
|
|
6
|
+
export type { ScatterChartProps, ScatterChartSeries, ScatterChartPoint, } from './components/ScatterChart';
|
|
7
|
+
export { default as BarChart } from './components/BarChart';
|
|
8
|
+
export type { BarChartProps, BarChartSeries } from './components/BarChart';
|
|
9
|
+
export { default as DonutChart } from './components/DonutChart';
|
|
10
|
+
export type { DonutChartProps, DonutChartSlice } from './components/DonutChart';
|
|
11
|
+
export { default as KpiStatsCard } from './components/KpiStatsCard';
|
|
12
|
+
export type { KpiStatsCardProps, KpiStatusColor, } from './components/KpiStatsCard';
|
|
13
|
+
export { default as ActivityFeed } from './components/ActivityFeed';
|
|
14
|
+
export type { ActivityFeedProps, ActivityFeedItem, } from './components/ActivityFeed';
|
|
15
|
+
export { formatRelativeTime } from './components/ActivityFeed';
|
|
16
|
+
export { default as DataTable } from './components/DataTable';
|
|
17
|
+
export type { DataTableProps, DataTableColumn } from './components/DataTable';
|
|
18
|
+
export { default as GeoPoints } from './components/GeoPoints';
|
|
19
|
+
export type { GeoPointsProps, GeoPoint } from './components/GeoPoints';
|
|
20
|
+
export { default as AreaChart } from './components/AreaChart';
|
|
21
|
+
export type { AreaChartProps, AreaChartSeries } from './components/AreaChart';
|