@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.
@@ -890,12 +890,13 @@ import Animated2, {
890
890
  useSharedValue as useSharedValue2,
891
891
  withTiming as withTiming2
892
892
  } from "react-native-reanimated";
893
- import { ScaledSheet as ScaledSheet7 } from "react-native-size-matters";
893
+ import { ms as ms5, ScaledSheet as ScaledSheet7 } from "react-native-size-matters";
894
+ import { useSafeAreaInsets as useSafeAreaInsets2 } from "react-native-safe-area-context";
894
895
  var Popup = ({
895
896
  title,
896
897
  sheet,
897
898
  bare = false,
898
- keyboardVerticalOffset,
899
+ keyboardVerticalOffset = -10,
899
900
  children,
900
901
  open,
901
902
  onClose = () => {
@@ -907,6 +908,7 @@ var Popup = ({
907
908
  const theme = useTheme();
908
909
  const colors2 = useColors();
909
910
  const [modalVisible, setModalVisible] = useState3(false);
911
+ const { bottom } = useSafeAreaInsets2();
910
912
  const backdropOpacity = useSharedValue2(0);
911
913
  const contentTranslateY = useSharedValue2(1e3);
912
914
  useEffect2(() => {
@@ -940,22 +942,26 @@ var Popup = ({
940
942
  width: "100%",
941
943
  justifyContent: sheet ? "flex-end" : "center"
942
944
  },
945
+ keyboardView: {
946
+ flex: 1
947
+ },
943
948
  avoidingView: {
944
949
  minHeight: typeof sheet === "number" ? sheet : void 0,
945
- maxHeight: "80%",
950
+ maxHeight: "90%",
946
951
  zIndex: 1e3,
947
952
  alignSelf: "center",
948
953
  maxWidth: sheet ? void 0 : "90%",
949
954
  width: sheet ? "100%" : void 0
950
955
  },
951
956
  container: {
952
- paddingBottom: sheet ? "30@ms" : void 0,
953
- backgroundColor: theme === "dark" ? "#111" : colors2.white[2],
957
+ paddingBottom: sheet && !bare ? bottom + ms5(10) : void 0,
958
+ backgroundColor: theme === "dark" ? "#111" : colors2.white[1],
954
959
  borderTopLeftRadius: 20,
955
960
  borderTopRightRadius: 20,
956
961
  borderBottomRightRadius: sheet ? 0 : 20,
957
962
  borderBottomLeftRadius: sheet ? 0 : 20,
958
963
  width: "100%",
964
+ overflow: "hidden",
959
965
  ...style
960
966
  },
961
967
  content: {
@@ -991,35 +997,42 @@ var Popup = ({
991
997
  visible: modalVisible,
992
998
  onRequestClose: closeAction
993
999
  },
994
- /* @__PURE__ */ React11.createElement(UIThemeProvider, null, /* @__PURE__ */ React11.createElement(TouchableWithoutFeedback2, { onPress: Keyboard2.dismiss }, /* @__PURE__ */ React11.createElement(View5, { style: styles2.root }, /* @__PURE__ */ React11.createElement(Animated2.View, { style: [styles2.backdrop, backdropAnimatedStyle] }), open && /* @__PURE__ */ React11.createElement(
995
- Pressable,
996
- {
997
- style: [StyleSheet2.absoluteFill, { zIndex: 2 }],
998
- onPress: closeAction
999
- }
1000
- ), /* @__PURE__ */ React11.createElement(Animated2.View, { style: [styles2.avoidingView, contentAnimatedStyle] }, /* @__PURE__ */ React11.createElement(
1000
+ /* @__PURE__ */ React11.createElement(UIThemeProvider, null, /* @__PURE__ */ React11.createElement(
1001
1001
  KeyboardAvoidingView2,
1002
1002
  {
1003
- keyboardVerticalOffset,
1004
- behavior: Platform5.OS === "ios" ? "padding" : "padding"
1003
+ style: styles2.keyboardView,
1004
+ behavior: Platform5.OS === "ios" ? "padding" : "height",
1005
+ keyboardVerticalOffset
1005
1006
  },
1006
- /* @__PURE__ */ React11.createElement(
1007
+ /* @__PURE__ */ React11.createElement(TouchableWithoutFeedback2, { onPress: Keyboard2.dismiss }, /* @__PURE__ */ React11.createElement(View5, { style: styles2.root }, /* @__PURE__ */ React11.createElement(Animated2.View, { style: [styles2.backdrop, backdropAnimatedStyle] }), open && /* @__PURE__ */ React11.createElement(
1008
+ Pressable,
1009
+ {
1010
+ style: [StyleSheet2.absoluteFill, { zIndex: 2 }],
1011
+ onPress: closeAction
1012
+ }
1013
+ ), /* @__PURE__ */ React11.createElement(
1007
1014
  Animated2.View,
1008
1015
  {
1009
- layout: LinearTransition,
1010
- style: styles2.container
1016
+ style: [styles2.avoidingView, contentAnimatedStyle],
1017
+ layout: LinearTransition
1011
1018
  },
1012
- !bare && /* @__PURE__ */ React11.createElement(View5, { style: styles2.title }, /* @__PURE__ */ React11.createElement(View5, { style: styles2.titleIcon }, /* @__PURE__ */ React11.createElement(
1013
- IconButton,
1019
+ /* @__PURE__ */ React11.createElement(
1020
+ Animated2.View,
1014
1021
  {
1015
- size: 20,
1016
- icon: "close",
1017
- onPress: closeAction
1018
- }
1019
- )), /* @__PURE__ */ React11.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
1020
- /* @__PURE__ */ React11.createElement(View5, { style: styles2.content }, children)
1021
- )
1022
- )))))
1022
+ style: styles2.container
1023
+ },
1024
+ !bare && /* @__PURE__ */ React11.createElement(View5, { style: styles2.title }, /* @__PURE__ */ React11.createElement(View5, { style: styles2.titleIcon }, /* @__PURE__ */ React11.createElement(
1025
+ IconButton,
1026
+ {
1027
+ size: 20,
1028
+ icon: "close",
1029
+ onPress: closeAction
1030
+ }
1031
+ )), /* @__PURE__ */ React11.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
1032
+ /* @__PURE__ */ React11.createElement(View5, { style: styles2.content }, children)
1033
+ )
1034
+ )))
1035
+ ))
1023
1036
  );
1024
1037
  };
1025
1038
 
@@ -1163,7 +1176,7 @@ var RatingInput = ({
1163
1176
  // ../src/Components/Grid.tsx
1164
1177
  import React12 from "react";
1165
1178
  import { View as View7 } from "react-native";
1166
- import { ms as ms5, ScaledSheet as ScaledSheet9 } from "react-native-size-matters";
1179
+ import { ms as ms6, ScaledSheet as ScaledSheet9 } from "react-native-size-matters";
1167
1180
  var GridItem = ({
1168
1181
  children,
1169
1182
  col = 2,
@@ -1174,7 +1187,7 @@ var GridItem = ({
1174
1187
  const styles2 = ScaledSheet9.create({
1175
1188
  gridItem: {
1176
1189
  width: `${100 / col}%`,
1177
- padding: ms5(spacing * 10),
1190
+ padding: ms6(spacing * 10),
1178
1191
  alignItems
1179
1192
  }
1180
1193
  });
@@ -1246,7 +1259,7 @@ import { Animated as Animated3, TextInput as TextInput2, TouchableOpacity as Tou
1246
1259
  import {
1247
1260
  ScaledSheet as ScaledSheet12,
1248
1261
  moderateScale as moderateScale3,
1249
- ms as ms6,
1262
+ ms as ms7,
1250
1263
  verticalScale as verticalScale2
1251
1264
  } from "react-native-size-matters";
1252
1265
 
@@ -1254,7 +1267,7 @@ import {
1254
1267
  import { MaterialIcons as MaterialIcons4 } from "@expo/vector-icons";
1255
1268
  import React14, { useCallback, useState as useState5 } from "react";
1256
1269
  import { FlatList, Modal as Modal2, TouchableOpacity as TouchableOpacity6, View as View9 } from "react-native";
1257
- import { useSafeAreaInsets as useSafeAreaInsets2 } from "react-native-safe-area-context";
1270
+ import { useSafeAreaInsets as useSafeAreaInsets3 } from "react-native-safe-area-context";
1258
1271
  import { ScaledSheet as ScaledSheet11 } from "react-native-size-matters";
1259
1272
  var SelectMenu = ({
1260
1273
  open = false,
@@ -1268,7 +1281,7 @@ var SelectMenu = ({
1268
1281
  helperText
1269
1282
  }) => {
1270
1283
  const colors2 = useColors();
1271
- const { bottom } = useSafeAreaInsets2();
1284
+ const { bottom } = useSafeAreaInsets3();
1272
1285
  const [search, setSearch] = useState5("");
1273
1286
  const styles2 = ScaledSheet11.create({
1274
1287
  root: {
@@ -1427,7 +1440,7 @@ var TextField = ({
1427
1440
  }, [focused, value]);
1428
1441
  const styles2 = ScaledSheet12.create({
1429
1442
  root: {
1430
- marginBottom: ms6(gutterBottom),
1443
+ marginBottom: ms7(gutterBottom),
1431
1444
  width: "100%",
1432
1445
  ...style
1433
1446
  },
@@ -1524,7 +1537,7 @@ var TextField = ({
1524
1537
  View10,
1525
1538
  {
1526
1539
  style: {
1527
- paddingTop: variant !== "outlined" ? ms6(13) : 0,
1540
+ paddingTop: variant !== "outlined" ? ms7(13) : 0,
1528
1541
  paddingRight: 10
1529
1542
  }
1530
1543
  },
@@ -1559,7 +1572,7 @@ var TextField = ({
1559
1572
  {
1560
1573
  style: {
1561
1574
  marginRight: 20,
1562
- paddingTop: variant === "text" ? ms6(13) : 0
1575
+ paddingTop: variant === "text" ? ms7(13) : 0
1563
1576
  }
1564
1577
  },
1565
1578
  end
@@ -1569,7 +1582,7 @@ var TextField = ({
1569
1582
  {
1570
1583
  style: {
1571
1584
  marginRight: variant === "text" ? 0 : 20,
1572
- paddingTop: variant === "text" ? ms6(13) : 0
1585
+ paddingTop: variant === "text" ? ms7(13) : 0
1573
1586
  }
1574
1587
  },
1575
1588
  /* @__PURE__ */ React15.createElement(
@@ -1642,7 +1655,7 @@ var TextField2 = React15.forwardRef(
1642
1655
  };
1643
1656
  const styles2 = ScaledSheet12.create({
1644
1657
  root: {
1645
- marginBottom: ms6(gutterBottom),
1658
+ marginBottom: ms7(gutterBottom),
1646
1659
  ...style
1647
1660
  },
1648
1661
  container: {
@@ -1718,7 +1731,7 @@ var TextField2 = React15.forwardRef(
1718
1731
  return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(View10, { style: styles2.root }, label && /* @__PURE__ */ React15.createElement(
1719
1732
  Typography_default,
1720
1733
  {
1721
- variant: "body1",
1734
+ variant: "body2",
1722
1735
  color: "textSecondary",
1723
1736
  gutterBottom: 7,
1724
1737
  ...labelProps
@@ -2028,7 +2041,7 @@ var SafeAreaView = ({
2028
2041
 
2029
2042
  // ../src/Components/Divider.tsx
2030
2043
  import { View as View12 } from "react-native";
2031
- import { ScaledSheet as ScaledSheet14, ms as ms7 } from "react-native-size-matters";
2044
+ import { ScaledSheet as ScaledSheet14, ms as ms8 } from "react-native-size-matters";
2032
2045
  var Divider = ({
2033
2046
  height = 1,
2034
2047
  color = "textSecondary",
@@ -2040,7 +2053,7 @@ var Divider = ({
2040
2053
  root: {
2041
2054
  height,
2042
2055
  backgroundColor: colors2[color].main,
2043
- marginBottom: ms7(gutterBottom),
2056
+ marginBottom: ms8(gutterBottom),
2044
2057
  ...style
2045
2058
  }
2046
2059
  });
@@ -2095,7 +2108,7 @@ import {
2095
2108
  TextInput as TextInput3,
2096
2109
  View as View14
2097
2110
  } from "react-native";
2098
- import { ScaledSheet as ScaledSheet16, ms as ms8 } from "react-native-size-matters";
2111
+ import { ScaledSheet as ScaledSheet16, ms as ms9 } from "react-native-size-matters";
2099
2112
  var OTPInput = ({
2100
2113
  length = 6,
2101
2114
  onChange = () => {
@@ -2142,17 +2155,17 @@ var OTPInput = ({
2142
2155
  root: {},
2143
2156
  container: { flexDirection: "row" },
2144
2157
  input: {
2145
- height: ms8(size),
2146
- width: ms8(size),
2158
+ height: ms9(size),
2159
+ width: ms9(size),
2147
2160
  borderColor: colors2.white[5],
2148
2161
  backgroundColor: variant === "contained" ? colors2.white[3] : void 0,
2149
2162
  borderWidth: variant === "outlined" ? 1 : 0,
2150
2163
  borderBottomWidth: variant === "contained" ? 0 : 1,
2151
- marginHorizontal: ms8(spacing * 5),
2164
+ marginHorizontal: ms9(spacing * 5),
2152
2165
  textAlign: "center",
2153
2166
  borderRadius: variant === "text" ? 0 : 10,
2154
2167
  color: colors2.dark.main,
2155
- fontSize: ms8(size * 0.5)
2168
+ fontSize: ms9(size * 0.5)
2156
2169
  }
2157
2170
  });
2158
2171
  return /* @__PURE__ */ React19.createElement(View14, { style: styles2.root }, /* @__PURE__ */ React19.createElement(View14, { style: styles2.container }, [...Array(length)].map((_, index) => /* @__PURE__ */ React19.createElement(