@tecsinapse/react-charts 1.3.7 → 1.4.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/dist/types/components/Dot/Dot.d.ts +5 -0
- package/dist/types/components/Dot/index.d.ts +1 -0
- package/dist/types/components/Dot/styled.d.ts +16 -0
- package/dist/types/components/Label/Label.d.ts +11 -0
- package/dist/types/components/Label/index.d.ts +1 -0
- package/dist/types/components/Label/styled.d.ts +23 -0
- package/dist/types/components/PieChart/PieChart.d.ts +17 -0
- package/dist/types/components/PieChart/functions.d.ts +26 -0
- package/dist/types/components/PieChart/index.d.ts +1 -0
- package/dist/types/components/PieChart/styled.d.ts +14 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/styles/constants.d.ts +49 -0
- package/dist/types/styles/functions.d.ts +6 -0
- package/dist/types/styles/index.d.ts +2 -0
- package/dist/types/types/font.d.ts +6 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/types/pie.d.ts +7 -0
- package/dist/types/types/svg.d.ts +11 -0
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Dot } from './Dot';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
export declare const Circle: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
color: string;
|
|
8
|
+
}, {}, {
|
|
9
|
+
ref?: import("react").Ref<View> | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const CircleDot: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
}, {}, {
|
|
15
|
+
ref?: import("react").Ref<View> | undefined;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FontFamily, PieChartData } from '../../types';
|
|
3
|
+
interface LabelProps {
|
|
4
|
+
columns: number;
|
|
5
|
+
data: PieChartData;
|
|
6
|
+
chartConfig?: {
|
|
7
|
+
fontFamily: FontFamily;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
declare const Label: React.FC<LabelProps>;
|
|
11
|
+
export default Label;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Label } from './Label';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Text as RNText, View } from 'react-native';
|
|
3
|
+
export declare const Container: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
columns: number;
|
|
8
|
+
}, {}, {
|
|
9
|
+
ref?: import("react").Ref<View> | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const Text: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
font: {
|
|
16
|
+
fontFamily: string;
|
|
17
|
+
fontWeight: string;
|
|
18
|
+
};
|
|
19
|
+
expand?: boolean | undefined;
|
|
20
|
+
flexEnd?: boolean | undefined;
|
|
21
|
+
}, {}, {
|
|
22
|
+
ref?: import("react").Ref<RNText> | undefined;
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FontFamily, PieChartData, SvgTextType } from '../../types';
|
|
3
|
+
export interface PieChartProps {
|
|
4
|
+
data: PieChartData[];
|
|
5
|
+
dimension?: number;
|
|
6
|
+
radius?: number;
|
|
7
|
+
label?: string;
|
|
8
|
+
labelProps?: SvgTextType;
|
|
9
|
+
sub?: string;
|
|
10
|
+
subProps?: SvgTextType;
|
|
11
|
+
columns?: number;
|
|
12
|
+
chartConfig?: {
|
|
13
|
+
fontFamily: FontFamily;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare const PieChart: React.FC<PieChartProps>;
|
|
17
|
+
export default PieChart;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AlignmentBaseline, FontFamily, FontWeight, SvgTextType, TextAnchor } from '../../types';
|
|
2
|
+
type CallbackReturn = Record<string, unknown> | {
|
|
3
|
+
onClick: () => undefined;
|
|
4
|
+
} | {
|
|
5
|
+
onPress: () => undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare const getCallback: (value: number, label?: string, fn?: ((value: number, label?: string) => void) | undefined) => CallbackReturn;
|
|
8
|
+
type FeaturedType = {
|
|
9
|
+
arc: {
|
|
10
|
+
outerRadius: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const getFeatured: (featured: boolean) => FeaturedType;
|
|
14
|
+
type TextStylesReturn = {
|
|
15
|
+
fontFamily: string;
|
|
16
|
+
y: number | undefined;
|
|
17
|
+
fontSize: number | undefined;
|
|
18
|
+
textAnchor: TextAnchor;
|
|
19
|
+
fill: string;
|
|
20
|
+
alignmentBaseline: AlignmentBaseline;
|
|
21
|
+
fontWeight: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const getTextStyles: (styles: SvgTextType | undefined, defaultFontWeight: FontWeight, chartConfig: {
|
|
24
|
+
fontFamily: FontFamily;
|
|
25
|
+
} | undefined) => TextStylesReturn;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as PieChart } from './PieChart';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
export declare const Container: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
}, {}, {
|
|
7
|
+
ref?: import("react").Ref<View> | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const LabelsContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
10
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
+
as?: import("react").ElementType<any> | undefined;
|
|
12
|
+
}, {}, {
|
|
13
|
+
ref?: import("react").Ref<View> | undefined;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PieChart } from './PieChart';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare const fontColor: {
|
|
2
|
+
light: string;
|
|
3
|
+
medium: string;
|
|
4
|
+
dark: string;
|
|
5
|
+
orange: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const spacing: {
|
|
8
|
+
nano: string;
|
|
9
|
+
micro: string;
|
|
10
|
+
mili: string;
|
|
11
|
+
centi: string;
|
|
12
|
+
deca: string;
|
|
13
|
+
kilo: string;
|
|
14
|
+
mega: string;
|
|
15
|
+
giga: string;
|
|
16
|
+
tera: string;
|
|
17
|
+
peta: string;
|
|
18
|
+
hexa: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const iconSize: {
|
|
21
|
+
micro: string;
|
|
22
|
+
mili: string;
|
|
23
|
+
centi: string;
|
|
24
|
+
deca: string;
|
|
25
|
+
kilo: string;
|
|
26
|
+
mega: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const borderRadius: {
|
|
29
|
+
nano: string;
|
|
30
|
+
micro: string;
|
|
31
|
+
mili: string;
|
|
32
|
+
centi: string;
|
|
33
|
+
deca: string;
|
|
34
|
+
pill: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const fontStack: {
|
|
37
|
+
default: string;
|
|
38
|
+
mono: string;
|
|
39
|
+
};
|
|
40
|
+
export declare const fontWeight: {
|
|
41
|
+
regular: string;
|
|
42
|
+
bold: string;
|
|
43
|
+
black: string;
|
|
44
|
+
};
|
|
45
|
+
export declare const nativeFontStack: {
|
|
46
|
+
black: string;
|
|
47
|
+
bold: string;
|
|
48
|
+
regular: string;
|
|
49
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FontWeight } from './font';
|
|
2
|
+
export type AlignmentBaseline = 'baseline' | 'text-bottom' | 'alphabetic' | 'ideographic' | 'middle' | 'central' | 'mathematical' | 'text-top' | 'bottom' | 'center' | 'top' | 'text-before-edge' | 'text-after-edge' | 'before-edge' | 'after-edge' | 'hanging';
|
|
3
|
+
export type TextAnchor = 'start' | 'middle' | 'end';
|
|
4
|
+
export type SvgTextType = {
|
|
5
|
+
textAnchor?: TextAnchor;
|
|
6
|
+
alignmentBaseline?: AlignmentBaseline;
|
|
7
|
+
fontSize?: number;
|
|
8
|
+
fontWeight?: FontWeight;
|
|
9
|
+
fill?: string;
|
|
10
|
+
y?: number;
|
|
11
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/react-charts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Charts for React and React Native",
|
|
5
5
|
"homepage": "https://github.com/tecsinapse/design-system/",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"react-native-svg": "13.9.0"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
|
-
"dev": "
|
|
27
|
+
"dev": "rollup --config --watch",
|
|
28
|
+
"dev:dts": "tsc --project tsconfig.build.json --watch",
|
|
28
29
|
"build:es": "rollup --config",
|
|
29
|
-
"build:
|
|
30
|
-
"build:declaration:watch": "tsc --project tsconfig.build.json --watch"
|
|
30
|
+
"build:dts": "tsc --project tsconfig.build.json"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=16.8.0",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"bugs": {
|
|
38
38
|
"url": "https://github.com/tecsinapse/design-system/issues"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "68c1b2e4efabf493290234c3d97754f39e82b861"
|
|
41
41
|
}
|