@tecsinapse/react-charts 1.4.8 → 1.4.9-beta.1

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.
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var React = require('react');
3
+ var jsxRuntime = require('react/jsx-runtime');
4
4
  var styled = require('./styled.js');
5
5
 
6
6
  const Dot = ({ color }) => {
7
- return /* @__PURE__ */ React.createElement(styled.Circle, { color }, /* @__PURE__ */ React.createElement(styled.CircleDot, null));
7
+ return /* @__PURE__ */ jsxRuntime.jsx(styled.Circle, { color, children: /* @__PURE__ */ jsxRuntime.jsx(styled.CircleDot, {}) });
8
8
  };
9
9
 
10
10
  module.exports = Dot;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var React = require('react');
3
+ var jsxRuntime = require('react/jsx-runtime');
4
4
  var Dot = require('../Dot/Dot.js');
5
5
  var styled = require('./styled.js');
6
6
  var functions = require('../../styles/functions.js');
@@ -8,7 +8,11 @@ var functions = require('../../styles/functions.js');
8
8
  const Label = ({ columns, data, chartConfig }) => {
9
9
  const valueFont = functions.getFontFamilyAndWeight(chartConfig?.fontFamily, "bold");
10
10
  const labelFont = functions.getFontFamilyAndWeight(chartConfig?.fontFamily, "regular");
11
- return /* @__PURE__ */ React.createElement(styled.Container, { columns }, /* @__PURE__ */ React.createElement(Dot, { color: data.color }), /* @__PURE__ */ React.createElement(styled.Text, { font: labelFont, expand: true }, data.label), /* @__PURE__ */ React.createElement(styled.Text, { font: valueFont, flexEnd: true }, data.value));
11
+ return /* @__PURE__ */ jsxRuntime.jsxs(styled.Container, { columns, children: [
12
+ /* @__PURE__ */ jsxRuntime.jsx(Dot, { color: data.color }),
13
+ /* @__PURE__ */ jsxRuntime.jsx(styled.Text, { font: labelFont, expand: true, children: data.label }),
14
+ /* @__PURE__ */ jsxRuntime.jsx(styled.Text, { font: valueFont, flexEnd: true, children: data.value })
15
+ ] });
12
16
  };
13
17
 
14
18
  module.exports = Label;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var jsxRuntime = require('react/jsx-runtime');
3
4
  var reactNativeSvg = require('react-native-svg');
4
- var React = require('react');
5
5
  var reactNativeSvgCharts = require('react-native-svg-charts');
6
6
  var Label = require('../Label/Label.js');
7
7
  var functions = require('./functions.js');
@@ -47,49 +47,54 @@ const PieChart = ({
47
47
  fill: fillSub,
48
48
  y: ySub = 16
49
49
  } = functions.getTextStyles(subProps, "bold", chartConfig);
50
- return /* @__PURE__ */ React.createElement(styled.Container, null, /* @__PURE__ */ React.createElement(
51
- reactNativeSvgCharts.PieChart,
52
- {
53
- style: { width: dimension, height: dimension, flex: 1 },
54
- data: chart,
55
- padAngle: 0,
56
- innerRadius: `${inner}%`
57
- },
58
- /* @__PURE__ */ React.createElement(
59
- reactNativeSvg.Text,
50
+ return /* @__PURE__ */ jsxRuntime.jsxs(styled.Container, { children: [
51
+ /* @__PURE__ */ jsxRuntime.jsxs(
52
+ reactNativeSvgCharts.PieChart,
60
53
  {
61
- textAnchor,
62
- alignmentBaseline,
63
- fontSize,
64
- fontWeight,
65
- fontFamily,
66
- fill,
67
- y
68
- },
69
- label ?? sum
54
+ style: { width: dimension, height: dimension, flex: 1 },
55
+ data: chart,
56
+ padAngle: 0,
57
+ innerRadius: `${inner}%`,
58
+ children: [
59
+ /* @__PURE__ */ jsxRuntime.jsx(
60
+ reactNativeSvg.Text,
61
+ {
62
+ textAnchor,
63
+ alignmentBaseline,
64
+ fontSize,
65
+ fontWeight,
66
+ fontFamily,
67
+ fill,
68
+ y,
69
+ children: label ?? sum
70
+ }
71
+ ),
72
+ sub && /* @__PURE__ */ jsxRuntime.jsx(
73
+ reactNativeSvg.Text,
74
+ {
75
+ textAnchor: textAnchorSub,
76
+ alignmentBaseline: alignmentBaselineSub,
77
+ fontSize: fontSizeSub,
78
+ fontWeight: fontWeightSub,
79
+ fontFamily: fontFamilySub,
80
+ fill: fillSub,
81
+ y: ySub,
82
+ children: sub
83
+ }
84
+ )
85
+ ]
86
+ }
70
87
  ),
71
- sub && /* @__PURE__ */ React.createElement(
72
- reactNativeSvg.Text,
88
+ /* @__PURE__ */ jsxRuntime.jsx(styled.LabelsContainer, { children: data.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
89
+ Label,
73
90
  {
74
- textAnchor: textAnchorSub,
75
- alignmentBaseline: alignmentBaselineSub,
76
- fontSize: fontSizeSub,
77
- fontWeight: fontWeightSub,
78
- fontFamily: fontFamilySub,
79
- fill: fillSub,
80
- y: ySub
91
+ data: item,
92
+ columns,
93
+ chartConfig
81
94
  },
82
- sub
83
- )
84
- ), /* @__PURE__ */ React.createElement(styled.LabelsContainer, null, data.map((item) => /* @__PURE__ */ React.createElement(
85
- Label,
86
- {
87
- data: item,
88
- columns,
89
- key: item.label,
90
- chartConfig
91
- }
92
- ))));
95
+ item.label
96
+ )) })
97
+ ] });
93
98
  };
94
99
 
95
100
  module.exports = PieChart;
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { Circle, CircleDot } from './styled.js';
3
3
 
4
4
  const Dot = ({ color }) => {
5
- return /* @__PURE__ */ React.createElement(Circle, { color }, /* @__PURE__ */ React.createElement(CircleDot, null));
5
+ return /* @__PURE__ */ jsx(Circle, { color, children: /* @__PURE__ */ jsx(CircleDot, {}) });
6
6
  };
7
7
 
8
8
  export { Dot as default };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import Dot from '../Dot/Dot.js';
3
3
  import { Container, Text } from './styled.js';
4
4
  import { getFontFamilyAndWeight } from '../../styles/functions.js';
@@ -6,7 +6,11 @@ import { getFontFamilyAndWeight } from '../../styles/functions.js';
6
6
  const Label = ({ columns, data, chartConfig }) => {
7
7
  const valueFont = getFontFamilyAndWeight(chartConfig?.fontFamily, "bold");
8
8
  const labelFont = getFontFamilyAndWeight(chartConfig?.fontFamily, "regular");
9
- return /* @__PURE__ */ React.createElement(Container, { columns }, /* @__PURE__ */ React.createElement(Dot, { color: data.color }), /* @__PURE__ */ React.createElement(Text, { font: labelFont, expand: true }, data.label), /* @__PURE__ */ React.createElement(Text, { font: valueFont, flexEnd: true }, data.value));
9
+ return /* @__PURE__ */ jsxs(Container, { columns, children: [
10
+ /* @__PURE__ */ jsx(Dot, { color: data.color }),
11
+ /* @__PURE__ */ jsx(Text, { font: labelFont, expand: true, children: data.label }),
12
+ /* @__PURE__ */ jsx(Text, { font: valueFont, flexEnd: true, children: data.value })
13
+ ] });
10
14
  };
11
15
 
12
16
  export { Label as default };
@@ -1,5 +1,5 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import { Text } from 'react-native-svg';
2
- import React from 'react';
3
3
  import { PieChart as PieChart$1 } from 'react-native-svg-charts';
4
4
  import Label from '../Label/Label.js';
5
5
  import { getCallback, getFeatured, getTextStyles } from './functions.js';
@@ -45,49 +45,54 @@ const PieChart = ({
45
45
  fill: fillSub,
46
46
  y: ySub = 16
47
47
  } = getTextStyles(subProps, "bold", chartConfig);
48
- return /* @__PURE__ */ React.createElement(Container, null, /* @__PURE__ */ React.createElement(
49
- PieChart$1,
50
- {
51
- style: { width: dimension, height: dimension, flex: 1 },
52
- data: chart,
53
- padAngle: 0,
54
- innerRadius: `${inner}%`
55
- },
56
- /* @__PURE__ */ React.createElement(
57
- Text,
48
+ return /* @__PURE__ */ jsxs(Container, { children: [
49
+ /* @__PURE__ */ jsxs(
50
+ PieChart$1,
58
51
  {
59
- textAnchor,
60
- alignmentBaseline,
61
- fontSize,
62
- fontWeight,
63
- fontFamily,
64
- fill,
65
- y
66
- },
67
- label ?? sum
52
+ style: { width: dimension, height: dimension, flex: 1 },
53
+ data: chart,
54
+ padAngle: 0,
55
+ innerRadius: `${inner}%`,
56
+ children: [
57
+ /* @__PURE__ */ jsx(
58
+ Text,
59
+ {
60
+ textAnchor,
61
+ alignmentBaseline,
62
+ fontSize,
63
+ fontWeight,
64
+ fontFamily,
65
+ fill,
66
+ y,
67
+ children: label ?? sum
68
+ }
69
+ ),
70
+ sub && /* @__PURE__ */ jsx(
71
+ Text,
72
+ {
73
+ textAnchor: textAnchorSub,
74
+ alignmentBaseline: alignmentBaselineSub,
75
+ fontSize: fontSizeSub,
76
+ fontWeight: fontWeightSub,
77
+ fontFamily: fontFamilySub,
78
+ fill: fillSub,
79
+ y: ySub,
80
+ children: sub
81
+ }
82
+ )
83
+ ]
84
+ }
68
85
  ),
69
- sub && /* @__PURE__ */ React.createElement(
70
- Text,
86
+ /* @__PURE__ */ jsx(LabelsContainer, { children: data.map((item) => /* @__PURE__ */ jsx(
87
+ Label,
71
88
  {
72
- textAnchor: textAnchorSub,
73
- alignmentBaseline: alignmentBaselineSub,
74
- fontSize: fontSizeSub,
75
- fontWeight: fontWeightSub,
76
- fontFamily: fontFamilySub,
77
- fill: fillSub,
78
- y: ySub
89
+ data: item,
90
+ columns,
91
+ chartConfig
79
92
  },
80
- sub
81
- )
82
- ), /* @__PURE__ */ React.createElement(LabelsContainer, null, data.map((item) => /* @__PURE__ */ React.createElement(
83
- Label,
84
- {
85
- data: item,
86
- columns,
87
- key: item.label,
88
- chartConfig
89
- }
90
- ))));
93
+ item.label
94
+ )) })
95
+ ] });
91
96
  };
92
97
 
93
98
  export { PieChart as default };
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  declare const Dot: ({ color }: {
3
3
  color: string;
4
- }) => JSX.Element;
4
+ }) => React.ReactElement;
5
5
  export default Dot;
@@ -1,16 +1,15 @@
1
- /// <reference types="react" />
2
1
  import { View } from 'react-native';
3
2
  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;
3
+ theme?: import("@emotion/react").Theme;
4
+ as?: React.ElementType;
6
5
  } & {
7
6
  color: string;
8
7
  }, {}, {
9
8
  ref?: import("react").Ref<View> | undefined;
10
9
  }>;
11
10
  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;
11
+ theme?: import("@emotion/react").Theme;
12
+ as?: React.ElementType;
14
13
  }, {}, {
15
14
  ref?: import("react").Ref<View> | undefined;
16
15
  }>;
@@ -1,23 +1,22 @@
1
- /// <reference types="react" />
2
1
  import { Text as RNText, View } from 'react-native';
3
2
  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;
3
+ theme?: import("@emotion/react").Theme;
4
+ as?: React.ElementType;
6
5
  } & {
7
6
  columns: number;
8
7
  }, {}, {
9
8
  ref?: import("react").Ref<View> | undefined;
10
9
  }>;
11
10
  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;
11
+ theme?: import("@emotion/react").Theme;
12
+ as?: React.ElementType;
14
13
  } & {
15
14
  font: {
16
15
  fontFamily: string;
17
16
  fontWeight: string;
18
17
  };
19
- expand?: boolean | undefined;
20
- flexEnd?: boolean | undefined;
18
+ expand?: boolean;
19
+ flexEnd?: boolean;
21
20
  }, {}, {
22
21
  ref?: import("react").Ref<RNText> | undefined;
23
22
  }>;
@@ -1,14 +1,13 @@
1
- /// <reference types="react" />
2
1
  import { View } from 'react-native';
3
2
  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;
3
+ theme?: import("@emotion/react").Theme;
4
+ as?: React.ElementType;
6
5
  }, {}, {
7
6
  ref?: import("react").Ref<View> | undefined;
8
7
  }>;
9
8
  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;
9
+ theme?: import("@emotion/react").Theme;
10
+ as?: React.ElementType;
12
11
  }, {}, {
13
12
  ref?: import("react").Ref<View> | undefined;
14
13
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tecsinapse/react-charts",
3
- "version": "1.4.8",
3
+ "version": "1.4.9-beta.1",
4
4
  "description": "Charts for React and React Native",
5
5
  "homepage": "https://github.com/tecsinapse/design-system/",
6
6
  "license": "MIT",
@@ -30,12 +30,12 @@
30
30
  "build:dts": "tsc --project tsconfig.build.json"
31
31
  },
32
32
  "peerDependencies": {
33
- "react": ">=16.8.0",
33
+ "react": ">=19.0.0",
34
34
  "react-native": ">=0.64.0",
35
35
  "react-native-svg": ">=12.0.0"
36
36
  },
37
37
  "bugs": {
38
38
  "url": "https://github.com/tecsinapse/design-system/issues"
39
39
  },
40
- "gitHead": "cf0f1a6cda80b413d079a13c2545a0b9244d0805"
40
+ "gitHead": "b7e6698f18e533fa52aa672c4cad4ec9b140751b"
41
41
  }