@artsy/palette-mobile 19.7.0 → 19.9.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.
|
@@ -10,7 +10,7 @@ describe("Input", () => {
|
|
|
10
10
|
});
|
|
11
11
|
it("uses correct font family", () => {
|
|
12
12
|
renderWithWrappers(_jsx(Input, { testID: testID, placeholder: "input" }));
|
|
13
|
-
expect(screen.getByPlaceholderText("input")).
|
|
13
|
+
expect(screen.getByPlaceholderText("input").props.style["0"].fontFamily).toEqual("Unica77LL-Regular");
|
|
14
14
|
});
|
|
15
15
|
it("mutates given text as value", () => {
|
|
16
16
|
renderWithWrappers(_jsx(Input, { testID: testID }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect } from "react";
|
|
3
|
-
import
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { Animated } from "react-native";
|
|
4
4
|
import { useColor } from "../../utils/hooks";
|
|
5
5
|
import { Flex } from "../Flex";
|
|
6
6
|
import { Text } from "../Text";
|
|
@@ -15,14 +15,17 @@ import { Text } from "../Text";
|
|
|
15
15
|
* </Skeleton>
|
|
16
16
|
*/
|
|
17
17
|
export const Skeleton = ({ children }) => {
|
|
18
|
-
const opacity =
|
|
18
|
+
const opacity = useRef(new Animated.Value(0.5));
|
|
19
19
|
useEffect(() => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
Animated.loop(Animated.timing(opacity.current, {
|
|
21
|
+
toValue: 1,
|
|
22
|
+
duration: 1000,
|
|
23
|
+
useNativeDriver: true,
|
|
24
|
+
})).start();
|
|
24
25
|
}, []);
|
|
25
|
-
return _jsx(Animated.View, { style:
|
|
26
|
+
return (_jsx(Animated.View, { style: {
|
|
27
|
+
opacity: opacity.current,
|
|
28
|
+
}, children: children }));
|
|
26
29
|
};
|
|
27
30
|
export const SkeletonText = ({ children, ...rest }) => {
|
|
28
31
|
const color = useColor();
|
package/dist/setupJest.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artsy/palette-mobile",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.9.0",
|
|
4
4
|
"description": "Artsy's design system for React Native",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"android": "expo run:android --port 8082",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"react-native-device-info": "14.0.4",
|
|
127
127
|
"react-native-haptic-feedback": "1.14.0",
|
|
128
128
|
"react-native-linear-gradient": "2.6.2",
|
|
129
|
-
"react-native-reanimated": "3.
|
|
129
|
+
"react-native-reanimated": "3.19.1",
|
|
130
130
|
"react-native-safe-area-context": "5.4.1",
|
|
131
131
|
"react-native-svg": "15.10.1",
|
|
132
132
|
"react-test-renderer": "18.3.1",
|