@hoddy-ui/core 1.0.79 → 1.0.81

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.79",
3
+ "version": "1.0.81",
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 = () => {},
@@ -99,34 +103,41 @@ export const Popup: React.FC<PopupProps> = ({
99
103
  visible={showSecondary}
100
104
  onRequestClose={closeAction}
101
105
  >
102
- <View style={styles.root}>
103
- {open && (
104
- <Pressable
105
- style={StyleSheet.absoluteFill}
106
- onPress={closeAction}
107
- />
108
- )}
106
+ <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
107
+ <View style={styles.root}>
108
+ {open && (
109
+ <Pressable
110
+ style={StyleSheet.absoluteFill}
111
+ onPress={closeAction}
112
+ />
113
+ )}
109
114
 
110
- <KeyboardAvoidingView
111
- style={styles.avoidingView}
112
- behavior="position"
113
- >
114
- <View style={styles.container}>
115
- {!bare && (
116
- <View style={styles.title}>
117
- <IconButton size={20} icon="close" onPress={closeAction} />
118
- <View style={{ flex: 1 }}>
119
- <Typography color="textSecondary" align="center">
120
- {title}
121
- </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>
122
133
  </View>
123
- </View>
124
- )}
134
+ )}
125
135
 
126
- <View style={styles.content}>{children}</View>
127
- </View>
128
- </KeyboardAvoidingView>
129
- </View>
136
+ <View style={styles.content}>{children}</View>
137
+ </View>
138
+ </KeyboardAvoidingView>
139
+ </View>
140
+ </TouchableWithoutFeedback>
130
141
  </Modal>
131
142
  </Modal>
132
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;
@@ -253,7 +254,7 @@ export interface TextFieldProps extends TextInputProps {
253
254
 
254
255
  export interface TypographyProps {
255
256
  children: ReactNode;
256
- color?: colorTypes;
257
+ color?: colorTypes & string;
257
258
  style?: TextStyle | ViewStyle;
258
259
  textCase?: "capitalize" | "uppercase" | "lowercase" | null;
259
260
  variant?: