@hoddy-ui/core 2.5.7 → 2.5.9

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/next/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/next",
3
- "version": "2.0.48",
3
+ "version": "2.0.51",
4
4
  "description": "Core rich react native components written in typescript, with support for expo-router",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/core",
3
- "version": "2.5.7",
3
+ "version": "2.5.9",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -17,12 +17,13 @@ import Animated, {
17
17
  useSharedValue,
18
18
  withTiming,
19
19
  } from "react-native-reanimated";
20
- import { ScaledSheet } from "react-native-size-matters";
20
+ import { ms, ScaledSheet } from "react-native-size-matters";
21
21
  import { useColors, useTheme } from "../hooks";
22
22
  import { UIThemeProvider } from "../theme";
23
23
  import { PopupProps } from "../types";
24
24
  import { IconButton } from "./Button";
25
25
  import Typography from "./Typography";
26
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
26
27
 
27
28
  export const Popup: React.FC<PopupProps> = ({
28
29
  title,
@@ -39,6 +40,7 @@ export const Popup: React.FC<PopupProps> = ({
39
40
  const theme = useTheme();
40
41
  const colors = useColors();
41
42
  const [modalVisible, setModalVisible] = useState(false);
43
+ const { bottom } = useSafeAreaInsets();
42
44
 
43
45
  // Animation values
44
46
  const backdropOpacity = useSharedValue(0);
@@ -94,13 +96,14 @@ export const Popup: React.FC<PopupProps> = ({
94
96
  width: sheet ? "100%" : undefined,
95
97
  },
96
98
  container: {
97
- paddingBottom: sheet ? "30@ms" : undefined,
99
+ paddingBottom: sheet && !bare ? bottom + ms(10) : undefined,
98
100
  backgroundColor: theme === "dark" ? "#111" : colors.white[1],
99
101
  borderTopLeftRadius: 20,
100
102
  borderTopRightRadius: 20,
101
103
  borderBottomRightRadius: sheet ? 0 : 20,
102
104
  borderBottomLeftRadius: sheet ? 0 : 20,
103
105
  width: "100%",
106
+ overflow: "hidden",
104
107
  ...style,
105
108
  },
106
109
  content: {
@@ -140,7 +143,7 @@ export const Popup: React.FC<PopupProps> = ({
140
143
  <UIThemeProvider>
141
144
  <KeyboardAvoidingView
142
145
  style={styles.keyboardView}
143
- behavior={Platform.OS === "ios" ? "padding" : undefined}
146
+ behavior={Platform.OS === "ios" ? "padding" : "height"}
144
147
  keyboardVerticalOffset={keyboardVerticalOffset}
145
148
  >
146
149
  <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
@@ -158,7 +161,7 @@ export const Popup: React.FC<PopupProps> = ({
158
161
  layout={LinearTransition}
159
162
  >
160
163
  <Animated.View
161
- layout={LinearTransition}
164
+ // layout={LinearTransition}
162
165
  style={styles.container}
163
166
  >
164
167
  {!bare && (