@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.
@@ -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;
@@ -1 +1,2 @@
1
1
  export { default as EditableTable } from './EditableTable';
2
+ export { MemoizedEditableTable } from './EditableTable';
@@ -48,3 +48,5 @@ export * from './contentEditor';
48
48
  export * from './contextMenu';
49
49
  export * from './skeleton';
50
50
  export * from './tagList';
51
+ export * from './barChart';
52
+ export * from './pieChart';
@@ -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';
package/index.esm.css CHANGED
@@ -1295,3 +1295,7 @@
1295
1295
  .public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset {
1296
1296
  counter-reset: ol4;
1297
1297
  }
1298
+
1299
+ .recharts-pie-sector {
1300
+ outline: none;
1301
+ }