@hoddy-ui/core 2.5.29 → 2.5.30

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.58",
3
+ "version": "2.0.59",
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.29",
3
+ "version": "2.5.30",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -38,6 +38,7 @@ export const Popup: React.FC<PopupProps> = ({
38
38
  style,
39
39
  onModalShow,
40
40
  onModalHide,
41
+ disableAutoKeyboardManagement = false,
41
42
  }) => {
42
43
  const theme = useTheme();
43
44
  const colors = useColors();
@@ -186,7 +187,10 @@ export const Popup: React.FC<PopupProps> = ({
186
187
  keyboardVerticalOffset || keyboardVerticalOffsetValue
187
188
  }
188
189
  >
189
- <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
190
+ <TouchableWithoutFeedback
191
+ onPress={Keyboard.dismiss}
192
+ disabled={disableAutoKeyboardManagement}
193
+ >
190
194
  <View style={styles.root}>
191
195
  {modalOpen && (
192
196
  <Pressable
package/src/hooks.ts CHANGED
@@ -22,10 +22,8 @@ export const useThemeContext = () => {
22
22
  const setTheme = (theme: ThemeModes) => {
23
23
  if (theme === "default") {
24
24
  themeDispatch?.({ type: "default", payload: colorScheme });
25
- AsyncStorage.setItem("theme", "default");
26
25
  } else {
27
26
  themeDispatch?.({ type: theme });
28
- AsyncStorage.setItem("theme", theme);
29
27
  }
30
28
  };
31
29
  return { theme, setTheme };
@@ -24,7 +24,7 @@ function themeReducer(
24
24
  { type, payload }: ThemeActionTypes
25
25
  ): ThemeState {
26
26
  // Platform
27
-
27
+ AsyncStorage.setItem("theme", type);
28
28
  switch (type) {
29
29
  case "dark":
30
30
  return { mode: "dark", value: "dark" };
package/src/types.ts CHANGED
@@ -215,7 +215,7 @@ export interface PopupProps {
215
215
  open: boolean;
216
216
  onClose?: () => void;
217
217
  style?: ViewStyle;
218
-
218
+ disableAutoKeyboardManagement?: boolean;
219
219
  onModalShow?: () => void;
220
220
  onModalHide?: () => void;
221
221
  }