@artsy/palette-mobile 11.0.21 → 11.0.23
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
# v11.0.23 (Thu May 04 2023)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- fix: no more implicit returns in reanimated hooks [#97](https://github.com/artsy/palette-mobile/pull/97) ([@brainbicycle](https://github.com/brainbicycle))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Brian Beckerle ([@brainbicycle](https://github.com/brainbicycle))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v11.0.22 (Wed May 03 2023)
|
|
14
|
+
|
|
15
|
+
:tada: This release contains work from a new contributor! :tada:
|
|
16
|
+
|
|
17
|
+
Thank you, Brian Beckerle ([@brainbicycle](https://github.com/brainbicycle)), for all your work!
|
|
18
|
+
|
|
19
|
+
#### 🐛 Bug Fix
|
|
20
|
+
|
|
21
|
+
- fix: crash in eigen caused by tooltip [#96](https://github.com/artsy/palette-mobile/pull/96) ([@brainbicycle](https://github.com/brainbicycle))
|
|
22
|
+
|
|
23
|
+
#### Authors: 1
|
|
24
|
+
|
|
25
|
+
- Brian Beckerle ([@brainbicycle](https://github.com/brainbicycle))
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
1
29
|
# v11.0.21 (Wed May 03 2023)
|
|
2
30
|
|
|
3
31
|
#### 🐛 Bug Fix
|
|
@@ -45,8 +45,12 @@ const Button = ({ children, disabled: disabledProp, haptic, icon, iconPosition =
|
|
|
45
45
|
const [loading, setLoading, loadingV] = useStateWithProp(!!loadingProp);
|
|
46
46
|
const [pressed, setPressed, pressedV] = useStateWithProp(!!testOnly_pressed);
|
|
47
47
|
const pressAnimationProgress = (0, react_native_reanimated_1.useSharedValue)(0);
|
|
48
|
-
(0, react_native_reanimated_1.useAnimatedReaction)(() =>
|
|
49
|
-
|
|
48
|
+
(0, react_native_reanimated_1.useAnimatedReaction)(() => {
|
|
49
|
+
return pressedV.value;
|
|
50
|
+
}, (pressedVal) => {
|
|
51
|
+
return (pressAnimationProgress.value = (0, react_native_reanimated_1.withTiming)(pressedVal, {
|
|
52
|
+
duration: ANIMATION_DURATION,
|
|
53
|
+
}));
|
|
50
54
|
});
|
|
51
55
|
const textStyle = (0, Text_1.useTextStyleForPalette)(size === "small" ? "xs" : "sm");
|
|
52
56
|
const [longestTextMeasurements, setLongestTextMeasurements] = (0, react_1.useState)({
|
|
@@ -34,7 +34,9 @@ const ProgressBar = ({ animationDuration = 200, backgroundColor = "black30", hei
|
|
|
34
34
|
const color = (0, useColor_1.useColor)();
|
|
35
35
|
const width = (0, react_native_reanimated_1.useSharedValue)("0%");
|
|
36
36
|
const progress = clamp(unclampedProgress, 0, 100);
|
|
37
|
-
const progressAnim = (0, react_native_reanimated_1.useAnimatedStyle)(() =>
|
|
37
|
+
const progressAnim = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
38
|
+
return { width: width.value };
|
|
39
|
+
});
|
|
38
40
|
const [onCompletionCalled, setOnCompletionCalled] = (0, react_1.useState)(false);
|
|
39
41
|
(0, react_1.useEffect)(() => {
|
|
40
42
|
width.value = (0, react_native_reanimated_1.withTiming)(`${progress}%`, { duration: animationDuration });
|
|
@@ -42,7 +42,9 @@ const Text_1 = require("../Text");
|
|
|
42
42
|
const Skeleton = ({ children }) => {
|
|
43
43
|
const opacity = (0, react_native_reanimated_1.useSharedValue)(0.5);
|
|
44
44
|
opacity.value = (0, react_native_reanimated_1.withRepeat)((0, react_native_reanimated_1.withTiming)(1, { duration: 1000, easing: react_native_reanimated_1.Easing.ease }), -1, true);
|
|
45
|
-
const fadeLoopAnim = (0, react_native_reanimated_1.useAnimatedStyle)(() =>
|
|
45
|
+
const fadeLoopAnim = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
46
|
+
return { opacity: opacity.value };
|
|
47
|
+
}, []);
|
|
46
48
|
return (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: fadeLoopAnim, children: children });
|
|
47
49
|
};
|
|
48
50
|
exports.Skeleton = Skeleton;
|
|
@@ -34,14 +34,17 @@ const Text_1 = require("../Text");
|
|
|
34
34
|
const ToolTipFlyout = ({ containerStyle, tapToDismiss, height, width, onClose, onToolTipPress, testID, text, }) => {
|
|
35
35
|
const initialBoxDimensions = { height: 0, width: 0 };
|
|
36
36
|
const boxDimensions = (0, react_native_reanimated_1.useSharedValue)(initialBoxDimensions);
|
|
37
|
-
const animationStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() =>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
const animationStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
38
|
+
"worklet";
|
|
39
|
+
return {
|
|
40
|
+
height: (0, react_native_reanimated_1.withTiming)(boxDimensions.value.height, {
|
|
41
|
+
duration: 500,
|
|
42
|
+
}),
|
|
43
|
+
width: (0, react_native_reanimated_1.withTiming)(boxDimensions.value.width, {
|
|
44
|
+
duration: 500,
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
47
|
+
});
|
|
45
48
|
(0, react_1.useEffect)(() => {
|
|
46
49
|
if (text) {
|
|
47
50
|
boxDimensions.value = {
|