@majoo-ui/react 1.56.2 → 1.57.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/components/barChart/BarChart.d.ts +82 -0
- package/components/barChart/index.d.ts +1 -0
- package/components/editableTable/EditableTable.d.ts +1 -9
- package/components/editableTable/index.d.ts +1 -0
- package/components/index.d.ts +2 -0
- package/components/pieChart/PieChart.d.ts +78 -0
- package/components/pieChart/index.d.ts +1 -0
- package/index.esm.css +4 -0
- package/index.esm.js +18152 -436
- package/index.umd.css +4 -0
- package/index.umd.js +18157 -431
- package/package.json +1 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LabelProps } from 'recharts';
|
|
3
|
+
import { CSS } from '../../config/stitches.config';
|
|
4
|
+
interface BarChartData {
|
|
5
|
+
name: string;
|
|
6
|
+
total: number;
|
|
7
|
+
color: string;
|
|
8
|
+
}
|
|
9
|
+
interface BarChartLegend {
|
|
10
|
+
show: boolean;
|
|
11
|
+
showTotal: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface BarChartTooltip {
|
|
14
|
+
label?: (number: any) => string;
|
|
15
|
+
render?: () => JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
interface BarChartLabel {
|
|
18
|
+
show?: boolean;
|
|
19
|
+
dataKey?: string;
|
|
20
|
+
position?: LabelProps['position'];
|
|
21
|
+
formatter?: (string: any) => string;
|
|
22
|
+
render?: () => JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
interface YAxisProps {
|
|
25
|
+
show?: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface BarChartProps {
|
|
28
|
+
/**
|
|
29
|
+
* Additional css property.
|
|
30
|
+
*/
|
|
31
|
+
css?: CSS;
|
|
32
|
+
/**
|
|
33
|
+
* Datasets of chart.
|
|
34
|
+
*/
|
|
35
|
+
data: BarChartData[];
|
|
36
|
+
/**
|
|
37
|
+
* Legend config of chart.
|
|
38
|
+
*/
|
|
39
|
+
legend?: BarChartLegend;
|
|
40
|
+
/**
|
|
41
|
+
* Title section of chart.
|
|
42
|
+
*/
|
|
43
|
+
title?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Subtitle section of chart.
|
|
46
|
+
*/
|
|
47
|
+
subtitle?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Tooltip config of chart.
|
|
50
|
+
*/
|
|
51
|
+
tooltip?: BarChartTooltip;
|
|
52
|
+
/**
|
|
53
|
+
* Direction of Bar Chart layout.
|
|
54
|
+
*/
|
|
55
|
+
direction?: 'vertical' | 'horizontal';
|
|
56
|
+
/**
|
|
57
|
+
* Format axis label.
|
|
58
|
+
*/
|
|
59
|
+
tickFormatter?: (number: any) => string;
|
|
60
|
+
/**
|
|
61
|
+
* Label config of chart.
|
|
62
|
+
*/
|
|
63
|
+
label?: BarChartLabel;
|
|
64
|
+
/**
|
|
65
|
+
* Y Axis config of chart.
|
|
66
|
+
*/
|
|
67
|
+
yAxis?: YAxisProps;
|
|
68
|
+
}
|
|
69
|
+
declare function BarChartComponent({ css, data, legend, title, subtitle, tooltip, direction, tickFormatter, label, yAxis, }: BarChartProps): JSX.Element;
|
|
70
|
+
declare namespace BarChartComponent {
|
|
71
|
+
var defaultProps: {
|
|
72
|
+
data: never[];
|
|
73
|
+
legend: {
|
|
74
|
+
show: boolean;
|
|
75
|
+
showTotal: boolean;
|
|
76
|
+
};
|
|
77
|
+
yAxis: {
|
|
78
|
+
show: boolean;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export default BarChartComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BarChart } from './BarChart';
|
|
@@ -124,9 +124,6 @@ declare namespace EditableTable {
|
|
|
124
124
|
mb: (value: {
|
|
125
125
|
readonly [$$ScaleValue]: "space";
|
|
126
126
|
}) => {
|
|
127
|
-
/**
|
|
128
|
-
* Show checkbox table selection.
|
|
129
|
-
*/
|
|
130
127
|
marginBottom: {
|
|
131
128
|
readonly [$$ScaleValue]: "space";
|
|
132
129
|
};
|
|
@@ -227,9 +224,6 @@ declare namespace EditableTable {
|
|
|
227
224
|
mb: (value: {
|
|
228
225
|
readonly [$$ScaleValue]: "space";
|
|
229
226
|
}) => {
|
|
230
|
-
/**
|
|
231
|
-
* Show checkbox table selection.
|
|
232
|
-
*/
|
|
233
227
|
marginBottom: {
|
|
234
228
|
readonly [$$ScaleValue]: "space";
|
|
235
229
|
};
|
|
@@ -328,9 +322,6 @@ declare namespace EditableTable {
|
|
|
328
322
|
mb: (value: {
|
|
329
323
|
readonly [$$ScaleValue]: "space";
|
|
330
324
|
}) => {
|
|
331
|
-
/**
|
|
332
|
-
* Show checkbox table selection.
|
|
333
|
-
*/
|
|
334
325
|
marginBottom: {
|
|
335
326
|
readonly [$$ScaleValue]: "space";
|
|
336
327
|
};
|
|
@@ -378,4 +369,5 @@ declare namespace EditableTable {
|
|
|
378
369
|
};
|
|
379
370
|
}>>;
|
|
380
371
|
}
|
|
372
|
+
export declare const MemoizedEditableTable: React.MemoExoticComponent<typeof EditableTable>;
|
|
381
373
|
export default EditableTable;
|
package/components/index.d.ts
CHANGED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CSS } from '../../config/stitches.config';
|
|
3
|
+
import './styles.css';
|
|
4
|
+
interface PieChartData {
|
|
5
|
+
name: string;
|
|
6
|
+
total: number;
|
|
7
|
+
color: string;
|
|
8
|
+
}
|
|
9
|
+
interface PieChartLegend {
|
|
10
|
+
show?: boolean;
|
|
11
|
+
showTotal?: boolean;
|
|
12
|
+
position?: 'right' | 'bottom' | 'left';
|
|
13
|
+
}
|
|
14
|
+
interface PieChartTooltip {
|
|
15
|
+
label?: (number: any) => string;
|
|
16
|
+
render?: () => JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
interface PieChartProps {
|
|
19
|
+
/**
|
|
20
|
+
* Section title of the chart.
|
|
21
|
+
*/
|
|
22
|
+
title?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Subtitle of the chart.
|
|
25
|
+
*/
|
|
26
|
+
subtitle?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Datasets of the chart.
|
|
29
|
+
*/
|
|
30
|
+
data: PieChartData[];
|
|
31
|
+
/**
|
|
32
|
+
* Additional css property.
|
|
33
|
+
*/
|
|
34
|
+
css?: CSS;
|
|
35
|
+
/**
|
|
36
|
+
* Avatar url address.
|
|
37
|
+
*/
|
|
38
|
+
avatarURL?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Acronym text if avatar not valid.
|
|
41
|
+
*/
|
|
42
|
+
avatarAcronym?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Validitiy of avatar.
|
|
45
|
+
*/
|
|
46
|
+
validAvatar?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Datasets of chart legend.
|
|
49
|
+
*/
|
|
50
|
+
legend?: PieChartLegend;
|
|
51
|
+
/**
|
|
52
|
+
* Responsive state.
|
|
53
|
+
*/
|
|
54
|
+
isMobile?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Customize tooltip label.
|
|
57
|
+
*/
|
|
58
|
+
tooltip?: PieChartTooltip;
|
|
59
|
+
/**
|
|
60
|
+
* Show datasets percentage.
|
|
61
|
+
*/
|
|
62
|
+
showPercentage?: boolean;
|
|
63
|
+
}
|
|
64
|
+
declare const PieChartComponent: {
|
|
65
|
+
({ data, css, avatarURL, avatarAcronym, validAvatar, legend, isMobile, tooltip, showPercentage, title, subtitle, }: PieChartProps): JSX.Element;
|
|
66
|
+
defaultProps: {
|
|
67
|
+
data: never[];
|
|
68
|
+
avatarURL: undefined;
|
|
69
|
+
avatarAcronym: string;
|
|
70
|
+
validAvatar: boolean;
|
|
71
|
+
legend: {
|
|
72
|
+
data: never[];
|
|
73
|
+
position: string;
|
|
74
|
+
};
|
|
75
|
+
isMobile: boolean;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export default PieChartComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as PieChart } from './PieChart';
|