@tecsinapse/react-native-kit 4.0.0-beta.2 → 4.0.0-beta.5
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.
|
@@ -29,15 +29,6 @@ const ModalView = ({
|
|
|
29
29
|
const translationCarrier = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
30
30
|
const opacityCarrier = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
31
31
|
const offset = isLastShown && keyboardOpened > 0 ? 0 : bottom;
|
|
32
|
-
const getKeyboardHeight = (keyboard) => {
|
|
33
|
-
if (keyboard === 0) return 0;
|
|
34
|
-
const wHeight = Math.ceil(reactNative.Dimensions.get("window").height);
|
|
35
|
-
const sHeight = Math.ceil(reactNative.Dimensions.get("screen").height);
|
|
36
|
-
if (wHeight !== sHeight) {
|
|
37
|
-
return keyboard + (sHeight - wHeight - (reactNative.StatusBar.currentHeight || 0));
|
|
38
|
-
}
|
|
39
|
-
return keyboard;
|
|
40
|
-
};
|
|
41
32
|
const show = React.useCallback(() => {
|
|
42
33
|
reactNative.Animated.sequence([
|
|
43
34
|
reactNative.Animated.timing(backgroundCarrier, {
|
|
@@ -126,7 +117,6 @@ const ModalView = ({
|
|
|
126
117
|
reactNative.Animated.View,
|
|
127
118
|
{
|
|
128
119
|
style: {
|
|
129
|
-
paddingBottom: isLastShown ? getKeyboardHeight(keyboardOpened) : 0,
|
|
130
120
|
opacity: opacityCarrier,
|
|
131
121
|
transform: [{ translateY: translationCarrier }]
|
|
132
122
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { BoxContent } from '@tecsinapse/react-core';
|
|
3
3
|
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
4
|
-
import { Animated, Easing, Keyboard, Pressable
|
|
4
|
+
import { Animated, Easing, Keyboard, Pressable } from 'react-native';
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
6
|
import { StyledPressableBackDrop, BackDropView, CloseBar } from './styled.js';
|
|
7
7
|
|
|
@@ -27,15 +27,6 @@ const ModalView = ({
|
|
|
27
27
|
const translationCarrier = useRef(new Animated.Value(0)).current;
|
|
28
28
|
const opacityCarrier = useRef(new Animated.Value(0)).current;
|
|
29
29
|
const offset = isLastShown && keyboardOpened > 0 ? 0 : bottom;
|
|
30
|
-
const getKeyboardHeight = (keyboard) => {
|
|
31
|
-
if (keyboard === 0) return 0;
|
|
32
|
-
const wHeight = Math.ceil(Dimensions.get("window").height);
|
|
33
|
-
const sHeight = Math.ceil(Dimensions.get("screen").height);
|
|
34
|
-
if (wHeight !== sHeight) {
|
|
35
|
-
return keyboard + (sHeight - wHeight - (StatusBar.currentHeight || 0));
|
|
36
|
-
}
|
|
37
|
-
return keyboard;
|
|
38
|
-
};
|
|
39
30
|
const show = useCallback(() => {
|
|
40
31
|
Animated.sequence([
|
|
41
32
|
Animated.timing(backgroundCarrier, {
|
|
@@ -124,7 +115,6 @@ const ModalView = ({
|
|
|
124
115
|
Animated.View,
|
|
125
116
|
{
|
|
126
117
|
style: {
|
|
127
|
-
paddingBottom: isLastShown ? getKeyboardHeight(keyboardOpened) : 0,
|
|
128
118
|
opacity: opacityCarrier,
|
|
129
119
|
transform: [{ translateY: translationCarrier }]
|
|
130
120
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/react-native-kit",
|
|
3
3
|
"description": "React Native components library",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@emotion/native": "~11.11.0",
|
|
20
20
|
"@emotion/react": "~11.11.0",
|
|
21
|
-
"@tecsinapse/react-core": "4.0.0-beta.
|
|
21
|
+
"@tecsinapse/react-core": "4.0.0-beta.5",
|
|
22
22
|
"react-native-linear-gradient": "~2.8.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://tecsinapse.github.io/design-system/",
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"react": ">=18.
|
|
38
|
-
"react-native": ">=0.
|
|
37
|
+
"react": ">=18.2.0",
|
|
38
|
+
"react-native": ">=0.74.0",
|
|
39
39
|
"react-native-linear-gradient": "^2.5.6",
|
|
40
40
|
"react-native-safe-area-context": "^4.0.0",
|
|
41
41
|
"react-native-vector-icons": "^9.2.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "efb59880531ec51a7e64d29ead2cc8bf53095d71"
|
|
44
44
|
}
|