@jobber/components-native 0.105.0 → 0.105.1-MIKEfix-c-fe51c3e.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.
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.105.
|
|
3
|
+
"version": "0.105.1-MIKEfix-c-fe51c3e.2+fe51c3e5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -122,5 +122,5 @@
|
|
|
122
122
|
"react-native-screens": ">=4.18.0",
|
|
123
123
|
"react-native-svg": ">=12.0.0"
|
|
124
124
|
},
|
|
125
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "fe51c3e523604cb28481aa3e483371721dac684b"
|
|
126
126
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
|
-
import { AccessibilityInfo } from "react-native";
|
|
2
|
+
import { AccessibilityInfo, StyleSheet, View } from "react-native";
|
|
3
3
|
import Animated, { Easing, ReduceMotion, useAnimatedProps, useAnimatedStyle, useReducedMotion, useSharedValue, withRepeat, withSequence, withTiming, } from "react-native-reanimated";
|
|
4
4
|
import Svg, { Circle } from "react-native-svg";
|
|
5
5
|
import { tokens } from "../utils/design";
|
|
@@ -19,6 +19,9 @@ const RADIUS = 20;
|
|
|
19
19
|
// "200" used as the gap value exceeds the circumference, ensuring only
|
|
20
20
|
// one stroke segment is visible at a time.
|
|
21
21
|
const GAP = 200;
|
|
22
|
+
const ContainerStyle = StyleSheet.create({
|
|
23
|
+
container: { justifyContent: "center", alignItems: "center" },
|
|
24
|
+
});
|
|
22
25
|
function resolveLegacySize(size) {
|
|
23
26
|
if (size === "large") {
|
|
24
27
|
if (__DEV__) {
|
|
@@ -123,12 +126,18 @@ function FullMotionRing({ pixelSize, strokeWidth, arcColor, trackColor, style, t
|
|
|
123
126
|
strokeDashoffset: offset,
|
|
124
127
|
};
|
|
125
128
|
});
|
|
126
|
-
return (React.createElement(
|
|
127
|
-
React.createElement(Animated.View, { style: [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
return (React.createElement(View, { style: [ContainerStyle.container, style] },
|
|
130
|
+
React.createElement(Animated.View, Object.assign({ style: [
|
|
131
|
+
{
|
|
132
|
+
width: pixelSize,
|
|
133
|
+
height: pixelSize,
|
|
134
|
+
},
|
|
135
|
+
], testID: testID }, a11yProps),
|
|
136
|
+
React.createElement(Animated.View, { style: [{ width: pixelSize, height: pixelSize }, outerStyle] },
|
|
137
|
+
React.createElement(Animated.View, { style: [{ width: pixelSize, height: pixelSize }, innerStyle] },
|
|
138
|
+
React.createElement(Svg, { width: pixelSize, height: pixelSize, viewBox: `0 0 ${VIEWBOX} ${VIEWBOX}` },
|
|
139
|
+
React.createElement(Circle, { cx: CENTER, cy: CENTER, r: RADIUS, fill: "none", stroke: trackColor, strokeWidth: strokeWidth }),
|
|
140
|
+
React.createElement(AnimatedCircle, { cx: CENTER, cy: CENTER, r: RADIUS, fill: "none", stroke: arcColor, strokeWidth: strokeWidth, strokeLinecap: "round", animatedProps: arcAnimatedProps })))))));
|
|
132
141
|
}
|
|
133
142
|
function ReducedMotionRing({ pixelSize, strokeWidth, ringColor, style, testID, a11yProps, }) {
|
|
134
143
|
// Reduced motion: hide rotation entirely, render one static ring in the
|
|
@@ -164,7 +173,8 @@ function ReducedMotionRing({ pixelSize, strokeWidth, ringColor, style, testID, a
|
|
|
164
173
|
const animatedStyle = useAnimatedStyle(() => ({
|
|
165
174
|
opacity: pulse.value,
|
|
166
175
|
}));
|
|
167
|
-
return (React.createElement(
|
|
168
|
-
React.createElement(
|
|
169
|
-
React.createElement(
|
|
176
|
+
return (React.createElement(View, { style: [ContainerStyle.container, style] },
|
|
177
|
+
React.createElement(Animated.View, Object.assign({ style: [{ width: pixelSize, height: pixelSize }, animatedStyle], testID: testID }, a11yProps),
|
|
178
|
+
React.createElement(Svg, { width: pixelSize, height: pixelSize, viewBox: `0 0 ${VIEWBOX} ${VIEWBOX}` },
|
|
179
|
+
React.createElement(Circle, { cx: CENTER, cy: CENTER, r: RADIUS, fill: "none", stroke: ringColor, strokeWidth: strokeWidth })))));
|
|
170
180
|
}
|