@tecsinapse/react-native-kit 4.0.0-beta.6 → 4.0.0-beta.8

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.
@@ -17,7 +17,7 @@ const ModalView = ({
17
17
  BoxComponent = reactCore.BoxContent,
18
18
  frozen,
19
19
  isLastShown,
20
- isRaiseKeyboard = true,
20
+ isRaiseKeyboard,
21
21
  showCloseBar = true,
22
22
  close,
23
23
  onClose
@@ -123,20 +123,16 @@ const ModalView = ({
123
123
  hideEvent.remove();
124
124
  };
125
125
  }, []);
126
- const viewStyle = React.useMemo(
127
- () => [
128
- {
129
- opacity: opacityCarrier,
130
- transform: [{ translateY: translationCarrier }]
131
- },
132
- isLastShown && isRaiseKeyboard ? { paddingBottom: getKeyboardHeight(keyboardOpened) } : null
133
- ],
134
- [opacityCarrier, translationCarrier, isLastShown, isRaiseKeyboard, keyboardOpened]
135
- );
136
126
  return /* @__PURE__ */ jsxRuntime.jsx(styled.StyledPressableBackDrop, { onPress: !frozen ? close : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(styled.BackDropView, { style: { backgroundColor: backgroundInterpolation }, children: /* @__PURE__ */ jsxRuntime.jsx(
137
127
  reactNative.Animated.View,
138
128
  {
139
- style: viewStyle,
129
+ style: {
130
+ ...isLastShown && isRaiseKeyboard && {
131
+ paddingBottom: getKeyboardHeight(keyboardOpened)
132
+ },
133
+ opacity: opacityCarrier,
134
+ transform: [{ translateY: translationCarrier }]
135
+ },
140
136
  children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { children: /* @__PURE__ */ jsxRuntime.jsxs(
141
137
  BoxComponent,
142
138
  {
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { BoxContent } from '@tecsinapse/react-core';
3
- import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
3
+ import { useState, useRef, useCallback, useEffect } from 'react';
4
4
  import { Animated, Easing, Keyboard, Pressable, Dimensions, StatusBar } from 'react-native';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
6
  import { StyledPressableBackDrop, BackDropView, CloseBar } from './styled.js';
@@ -15,7 +15,7 @@ const ModalView = ({
15
15
  BoxComponent = BoxContent,
16
16
  frozen,
17
17
  isLastShown,
18
- isRaiseKeyboard = true,
18
+ isRaiseKeyboard,
19
19
  showCloseBar = true,
20
20
  close,
21
21
  onClose
@@ -121,20 +121,16 @@ const ModalView = ({
121
121
  hideEvent.remove();
122
122
  };
123
123
  }, []);
124
- const viewStyle = useMemo(
125
- () => [
126
- {
127
- opacity: opacityCarrier,
128
- transform: [{ translateY: translationCarrier }]
129
- },
130
- isLastShown && isRaiseKeyboard ? { paddingBottom: getKeyboardHeight(keyboardOpened) } : null
131
- ],
132
- [opacityCarrier, translationCarrier, isLastShown, isRaiseKeyboard, keyboardOpened]
133
- );
134
124
  return /* @__PURE__ */ jsx(StyledPressableBackDrop, { onPress: !frozen ? close : void 0, children: /* @__PURE__ */ jsx(BackDropView, { style: { backgroundColor: backgroundInterpolation }, children: /* @__PURE__ */ jsx(
135
125
  Animated.View,
136
126
  {
137
- style: viewStyle,
127
+ style: {
128
+ ...isLastShown && isRaiseKeyboard && {
129
+ paddingBottom: getKeyboardHeight(keyboardOpened)
130
+ },
131
+ opacity: opacityCarrier,
132
+ transform: [{ translateY: translationCarrier }]
133
+ },
138
134
  children: /* @__PURE__ */ jsx(Pressable, { children: /* @__PURE__ */ jsxs(
139
135
  BoxComponent,
140
136
  {
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.6",
4
+ "version": "4.0.0-beta.8",
5
5
  "license": "MIT",
6
6
  "main": "dist/esm/index.js",
7
7
  "module": "dist/esm/index.js",
@@ -40,5 +40,5 @@
40
40
  "react-native-safe-area-context": "^4.0.0",
41
41
  "react-native-vector-icons": "^9.2.0"
42
42
  },
43
- "gitHead": "c12a0719e81731c8248d9310b98025a58d69e1a6"
43
+ "gitHead": "d7afd1bf1ecb9cbf5095a1dd42ffceb3063184c8"
44
44
  }