@hoddy-ui/core 2.5.6 → 2.5.7

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": "2.5.6",
3
+ "version": "2.5.7",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -28,7 +28,7 @@ export const Popup: React.FC<PopupProps> = ({
28
28
  title,
29
29
  sheet,
30
30
  bare = false,
31
- keyboardVerticalOffset,
31
+ keyboardVerticalOffset = -10,
32
32
  children,
33
33
  open,
34
34
  onClose = () => {},
@@ -82,9 +82,12 @@ export const Popup: React.FC<PopupProps> = ({
82
82
  width: "100%",
83
83
  justifyContent: sheet ? "flex-end" : "center",
84
84
  },
85
+ keyboardView: {
86
+ flex: 1,
87
+ },
85
88
  avoidingView: {
86
89
  minHeight: typeof sheet === "number" ? sheet : undefined,
87
- maxHeight: "80%",
90
+ maxHeight: "90%",
88
91
  zIndex: 1000,
89
92
  alignSelf: "center",
90
93
  maxWidth: sheet ? undefined : "90%",
@@ -92,7 +95,7 @@ export const Popup: React.FC<PopupProps> = ({
92
95
  },
93
96
  container: {
94
97
  paddingBottom: sheet ? "30@ms" : undefined,
95
- backgroundColor: theme === "dark" ? "#111" : colors.white[2],
98
+ backgroundColor: theme === "dark" ? "#111" : colors.white[1],
96
99
  borderTopLeftRadius: 20,
97
100
  borderTopRightRadius: 20,
98
101
  borderBottomRightRadius: sheet ? 0 : 20,
@@ -135,20 +138,24 @@ export const Popup: React.FC<PopupProps> = ({
135
138
  onRequestClose={closeAction}
136
139
  >
137
140
  <UIThemeProvider>
138
- <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
139
- <View style={styles.root}>
140
- <Animated.View style={[styles.backdrop, backdropAnimatedStyle]} />
141
- {open && (
142
- <Pressable
143
- style={[StyleSheet.absoluteFill, { zIndex: 2 }]}
144
- onPress={closeAction}
145
- />
146
- )}
141
+ <KeyboardAvoidingView
142
+ style={styles.keyboardView}
143
+ behavior={Platform.OS === "ios" ? "padding" : undefined}
144
+ keyboardVerticalOffset={keyboardVerticalOffset}
145
+ >
146
+ <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
147
+ <View style={styles.root}>
148
+ <Animated.View style={[styles.backdrop, backdropAnimatedStyle]} />
149
+ {open && (
150
+ <Pressable
151
+ style={[StyleSheet.absoluteFill, { zIndex: 2 }]}
152
+ onPress={closeAction}
153
+ />
154
+ )}
147
155
 
148
- <Animated.View style={[styles.avoidingView, contentAnimatedStyle]}>
149
- <KeyboardAvoidingView
150
- keyboardVerticalOffset={keyboardVerticalOffset}
151
- behavior={Platform.OS === "ios" ? "padding" : "padding"}
156
+ <Animated.View
157
+ style={[styles.avoidingView, contentAnimatedStyle]}
158
+ layout={LinearTransition}
152
159
  >
153
160
  <Animated.View
154
161
  layout={LinearTransition}
@@ -171,10 +178,10 @@ export const Popup: React.FC<PopupProps> = ({
171
178
 
172
179
  <View style={styles.content}>{children}</View>
173
180
  </Animated.View>
174
- </KeyboardAvoidingView>
175
- </Animated.View>
176
- </View>
177
- </TouchableWithoutFeedback>
181
+ </Animated.View>
182
+ </View>
183
+ </TouchableWithoutFeedback>
184
+ </KeyboardAvoidingView>
178
185
  </UIThemeProvider>
179
186
  </Modal>
180
187
  );
@@ -413,7 +413,7 @@ export const TextField2 = React.forwardRef<TextInput, TextFieldProps>(
413
413
  <View style={styles.root}>
414
414
  {label && (
415
415
  <Typography
416
- variant="body1"
416
+ variant="body2"
417
417
  color="textSecondary"
418
418
  gutterBottom={7}
419
419
  {...labelProps}