@fto-consult/expo-ui 6.27.4 → 6.27.6
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/package.json +3 -3
- package/src/components/Animations/index.js +2 -4
- package/src/components/Animations/index.native.js +3 -0
- package/src/components/Animations/{Animation → native}/index.js +1 -4
- package/src/components/Animations/{OpacityAnimation → web}/index.js +3 -3
- package/src/components/Modal/index.js +4 -4
- /package/src/components/Animations/{Animation → native}/utils.js +0 -0
- /package/src/components/Animations/{OpacityAnimation → web}/utils.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "6.27.
|
|
3
|
+
"version": "6.27.6",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@expo/html-elements": "^0.5.1",
|
|
69
69
|
"@expo/vector-icons": "^13.0.0",
|
|
70
70
|
"@faker-js/faker": "^8.0.2",
|
|
71
|
-
"@fto-consult/common": "^3.29.
|
|
71
|
+
"@fto-consult/common": "^3.29.5",
|
|
72
72
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
|
73
73
|
"@react-native-async-storage/async-storage": "1.18.2",
|
|
74
74
|
"@react-native-community/datetimepicker": "7.2.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@react-navigation/native": "^6.1.7",
|
|
78
78
|
"@react-navigation/native-stack": "^6.9.13",
|
|
79
79
|
"@shopify/flash-list": "1.4.3",
|
|
80
|
-
"apexcharts": "^3.
|
|
80
|
+
"apexcharts": "^3.42.0",
|
|
81
81
|
"expo": "^49.0.8",
|
|
82
82
|
"expo-camera": "~13.4.2",
|
|
83
83
|
"expo-clipboard": "~4.3.1",
|
|
@@ -5,13 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
export const ANIMATION_DURATION = 300;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
const AnimationComponent = React.forwardRef(function AnimationComponent(props,ref) {
|
|
10
|
-
let { animationType,animationPosition,enteringCallback,exitingCallback,animationDuration,...rest} = props;
|
|
8
|
+
const AnimationComponent = React.forwardRef(function AnimationComponent({animationType,animationPosition,enteringCallback,exitingCallback,animationDuration,...rest},ref) {
|
|
11
9
|
const rProps = defaultObj(rest);
|
|
12
10
|
const duration = animationDuration || ANIMATION_DURATION;
|
|
13
11
|
let animations = getAnimations(animationType,animationPosition);
|
|
14
|
-
|
|
15
12
|
const style = useAnimatedStyle(() => {
|
|
16
13
|
return {};
|
|
17
14
|
});
|
|
@@ -3,7 +3,7 @@ import { Animated} from "react-native";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import {translateByAppearFrom,inputRangeByAppearFrom,animationType,outputRangeByAppearFrom,initialPositionByAppearFrom} from "./utils";
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const WebAnimationComponent = React.forwardRef(({ delay,children,style, animationPosition,animationDuration,enteringCallback,exitingCallback,...viewProps},ref) => {
|
|
7
7
|
if(!animationPosition || !initialPositionByAppearFrom[animationPosition]){
|
|
8
8
|
animationPosition = 'up';
|
|
9
9
|
}
|
|
@@ -42,7 +42,7 @@ const OpacityAnimationComponent = React.forwardRef(({ delay,children,style, anim
|
|
|
42
42
|
);
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
WebAnimationComponent.propTypes = {
|
|
46
46
|
delay: PropTypes.number,
|
|
47
47
|
enteringCallback : PropTypes.func,
|
|
48
48
|
animationPosition: PropTypes.oneOf([
|
|
@@ -50,4 +50,4 @@ OpacityAnimationComponent.propTypes = {
|
|
|
50
50
|
]),
|
|
51
51
|
animationDuration: PropTypes.number
|
|
52
52
|
}
|
|
53
|
-
export default
|
|
53
|
+
export default WebAnimationComponent;
|
|
@@ -7,9 +7,7 @@ import {
|
|
|
7
7
|
import BackHandler from "$ecomponents/BackHandler";
|
|
8
8
|
import PropTypes from "prop-types";
|
|
9
9
|
import theme,{StyleProp} from "$theme";
|
|
10
|
-
|
|
11
|
-
//import Animation,{OpacityAnimation} from "$ecomponents/Animations";
|
|
12
|
-
import OpacityAnimation from "$ecomponents/Animations/OpacityAnimation";
|
|
10
|
+
import Animation from "$ecomponents/Animation";
|
|
13
11
|
import { Surface } from "react-native-paper";
|
|
14
12
|
import { Platform } from "react-native";
|
|
15
13
|
import Portal from "$ecomponents/Portal";
|
|
@@ -99,7 +97,9 @@ const ModalComponent = React.forwardRef((props,ref)=>{
|
|
|
99
97
|
}
|
|
100
98
|
},100);
|
|
101
99
|
},[visible]);
|
|
102
|
-
const Anim =
|
|
100
|
+
const Anim = React.useMemo(()=>{
|
|
101
|
+
return animate !== false ? Animation : View;
|
|
102
|
+
},[animate]);
|
|
103
103
|
const wrapperProps = animate !== false ? {enteringCallback:callback,exitingCallback:callback} : {};
|
|
104
104
|
return !visible?null: <Portal>
|
|
105
105
|
<Anim
|
|
File without changes
|
|
File without changes
|