@particle-network/ui-native 0.1.1 → 0.1.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.
@@ -27,9 +27,12 @@ const ProgressWrapper = ({ style, svgStyle, value = 0, width, height, radius = '
27
27
  height
28
28
  ]);
29
29
  const clampedProgress = Math.max(0, Math.min(100, value));
30
+ const padding = strokeWidth;
31
+ const svgWidth = widthValue + padding;
32
+ const svgHeight = heightValue + padding;
30
33
  const rectWidth = widthValue - strokeWidth;
31
34
  const rectHeight = heightValue - strokeWidth;
32
- const rectXY = strokeWidth / 2;
35
+ const rectXY = strokeWidth / 2 + padding / 2;
33
36
  const perimeter = 2 * (rectWidth + rectHeight);
34
37
  const strokeDashoffset = perimeter * (1 - clampedProgress / 100);
35
38
  const colorValue = 'transparent' === color ? 'transparent' : getColor(color);
@@ -64,8 +67,8 @@ const ProgressWrapper = ({ style, svgStyle, value = 0, width, height, radius = '
64
67
  },
65
68
  svg: {
66
69
  position: 'absolute',
67
- left: 0,
68
- top: 0
70
+ left: -padding / 2,
71
+ top: -padding / 2
69
72
  }
70
73
  });
71
74
  const handleLayout = (event)=>{
@@ -84,12 +87,12 @@ const ProgressWrapper = ({ style, svgStyle, value = 0, width, height, radius = '
84
87
  ...restProps,
85
88
  children: [
86
89
  /*#__PURE__*/ jsxs(react_native_svg, {
87
- height: heightValue,
90
+ height: svgHeight,
88
91
  style: [
89
92
  styles.svg,
90
93
  svgStyle
91
94
  ],
92
- width: widthValue,
95
+ width: svgWidth,
93
96
  children: [
94
97
  /*#__PURE__*/ jsx(Path, {
95
98
  d: pathData,
@@ -103,8 +106,8 @@ const ProgressWrapper = ({ style, svgStyle, value = 0, width, height, radius = '
103
106
  stroke: colorValue,
104
107
  strokeDasharray: perimeter,
105
108
  strokeDashoffset: strokeDashoffset,
106
- strokeLinecap: "round",
107
- strokeLinejoin: "round",
109
+ strokeLinecap: "butt",
110
+ strokeLinejoin: "miter",
108
111
  strokeWidth: strokeWidth
109
112
  })
110
113
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-native",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "license": "MIT",
5
5
  "main": "./entry.js",
6
6
  "react-native": "./dist/index.js",