@hoddy-ui/core 1.0.78 → 1.0.80

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/core",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -1,8 +1,11 @@
1
1
  import {
2
+ Keyboard,
2
3
  KeyboardAvoidingView,
3
4
  Modal,
5
+ Platform,
4
6
  Pressable,
5
7
  StyleSheet,
8
+ TouchableWithoutFeedback,
6
9
  View,
7
10
  } from "react-native";
8
11
 
@@ -17,6 +20,7 @@ export const Popup: React.FC<PopupProps> = ({
17
20
  title,
18
21
  sheet,
19
22
  bare = false,
23
+ keyboardVerticalOffset,
20
24
  children,
21
25
  open,
22
26
  onClose = () => {},
@@ -86,6 +90,7 @@ export const Popup: React.FC<PopupProps> = ({
86
90
  <Modal
87
91
  transparent
88
92
  animationType="fade"
93
+ statusBarTranslucent
89
94
  visible={show}
90
95
  onRequestClose={closeAction}
91
96
  >
@@ -94,37 +99,45 @@ export const Popup: React.FC<PopupProps> = ({
94
99
  <Modal
95
100
  transparent
96
101
  animationType="slide"
102
+ statusBarTranslucent
97
103
  visible={showSecondary}
98
104
  onRequestClose={closeAction}
99
105
  >
100
- <View style={styles.root}>
101
- {open && (
102
- <Pressable
103
- style={StyleSheet.absoluteFill}
104
- onPress={closeAction}
105
- />
106
- )}
106
+ <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
107
+ <View style={styles.root}>
108
+ {open && (
109
+ <Pressable
110
+ style={StyleSheet.absoluteFill}
111
+ onPress={closeAction}
112
+ />
113
+ )}
107
114
 
108
- <KeyboardAvoidingView
109
- style={styles.avoidingView}
110
- behavior="position"
111
- >
112
- <View style={styles.container}>
113
- {!bare && (
114
- <View style={styles.title}>
115
- <IconButton size={20} icon="close" onPress={closeAction} />
116
- <View style={{ flex: 1 }}>
117
- <Typography color="textSecondary" align="center">
118
- {title}
119
- </Typography>
115
+ <KeyboardAvoidingView
116
+ style={styles.avoidingView}
117
+ keyboardVerticalOffset={keyboardVerticalOffset}
118
+ behavior={Platform.OS === "ios" ? "position" : "padding"}
119
+ >
120
+ <View style={styles.container}>
121
+ {!bare && (
122
+ <View style={styles.title}>
123
+ <IconButton
124
+ size={20}
125
+ icon="close"
126
+ onPress={closeAction}
127
+ />
128
+ <View style={{ flex: 1 }}>
129
+ <Typography color="textSecondary" align="center">
130
+ {title}
131
+ </Typography>
132
+ </View>
120
133
  </View>
121
- </View>
122
- )}
134
+ )}
123
135
 
124
- <View style={styles.content}>{children}</View>
125
- </View>
126
- </KeyboardAvoidingView>
127
- </View>
136
+ <View style={styles.content}>{children}</View>
137
+ </View>
138
+ </KeyboardAvoidingView>
139
+ </View>
140
+ </TouchableWithoutFeedback>
128
141
  </Modal>
129
142
  </Modal>
130
143
  </>
package/src/types.ts CHANGED
@@ -210,6 +210,7 @@ export interface GridProps {
210
210
  }
211
211
  export interface PopupProps {
212
212
  title?: string;
213
+ keyboardVerticalOffset?: number;
213
214
  sheet?: number | boolean;
214
215
  bare?: boolean;
215
216
  children: ReactNode;