@hoddy-ui/core 2.5.7 → 2.5.8
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/dist/index.js +43 -29
- package/next/dist/index.js.map +1 -1
- package/next/dist/index.mjs +59 -45
- package/next/dist/index.mjs.map +1 -1
- package/next/package.json +1 -1
- package/package.json +1 -1
- package/src/Components/Popup.tsx +5 -2
package/next/dist/index.mjs
CHANGED
|
@@ -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: "
|
|
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 ?
|
|
953
|
-
backgroundColor: theme === "dark" ? "#111" : colors2.white[
|
|
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,43 @@ var Popup = ({
|
|
|
991
997
|
visible: modalVisible,
|
|
992
998
|
onRequestClose: closeAction
|
|
993
999
|
},
|
|
994
|
-
/* @__PURE__ */ React11.createElement(UIThemeProvider, null, /* @__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
|
-
|
|
1004
|
-
behavior: Platform5.OS === "ios" ? "padding" :
|
|
1003
|
+
style: styles2.keyboardView,
|
|
1004
|
+
behavior: Platform5.OS === "ios" ? "padding" : void 0,
|
|
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
|
-
|
|
1010
|
-
|
|
1016
|
+
style: [styles2.avoidingView, contentAnimatedStyle],
|
|
1017
|
+
layout: LinearTransition
|
|
1011
1018
|
},
|
|
1012
|
-
|
|
1013
|
-
|
|
1019
|
+
/* @__PURE__ */ React11.createElement(
|
|
1020
|
+
Animated2.View,
|
|
1014
1021
|
{
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1022
|
+
layout: LinearTransition,
|
|
1023
|
+
style: styles2.container
|
|
1024
|
+
},
|
|
1025
|
+
!bare && /* @__PURE__ */ React11.createElement(View5, { style: styles2.title }, /* @__PURE__ */ React11.createElement(View5, { style: styles2.titleIcon }, /* @__PURE__ */ React11.createElement(
|
|
1026
|
+
IconButton,
|
|
1027
|
+
{
|
|
1028
|
+
size: 20,
|
|
1029
|
+
icon: "close",
|
|
1030
|
+
onPress: closeAction
|
|
1031
|
+
}
|
|
1032
|
+
)), /* @__PURE__ */ React11.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
|
|
1033
|
+
/* @__PURE__ */ React11.createElement(View5, { style: styles2.content }, children)
|
|
1034
|
+
)
|
|
1035
|
+
)))
|
|
1036
|
+
))
|
|
1023
1037
|
);
|
|
1024
1038
|
};
|
|
1025
1039
|
|
|
@@ -1163,7 +1177,7 @@ var RatingInput = ({
|
|
|
1163
1177
|
// ../src/Components/Grid.tsx
|
|
1164
1178
|
import React12 from "react";
|
|
1165
1179
|
import { View as View7 } from "react-native";
|
|
1166
|
-
import { ms as
|
|
1180
|
+
import { ms as ms6, ScaledSheet as ScaledSheet9 } from "react-native-size-matters";
|
|
1167
1181
|
var GridItem = ({
|
|
1168
1182
|
children,
|
|
1169
1183
|
col = 2,
|
|
@@ -1174,7 +1188,7 @@ var GridItem = ({
|
|
|
1174
1188
|
const styles2 = ScaledSheet9.create({
|
|
1175
1189
|
gridItem: {
|
|
1176
1190
|
width: `${100 / col}%`,
|
|
1177
|
-
padding:
|
|
1191
|
+
padding: ms6(spacing * 10),
|
|
1178
1192
|
alignItems
|
|
1179
1193
|
}
|
|
1180
1194
|
});
|
|
@@ -1246,7 +1260,7 @@ import { Animated as Animated3, TextInput as TextInput2, TouchableOpacity as Tou
|
|
|
1246
1260
|
import {
|
|
1247
1261
|
ScaledSheet as ScaledSheet12,
|
|
1248
1262
|
moderateScale as moderateScale3,
|
|
1249
|
-
ms as
|
|
1263
|
+
ms as ms7,
|
|
1250
1264
|
verticalScale as verticalScale2
|
|
1251
1265
|
} from "react-native-size-matters";
|
|
1252
1266
|
|
|
@@ -1254,7 +1268,7 @@ import {
|
|
|
1254
1268
|
import { MaterialIcons as MaterialIcons4 } from "@expo/vector-icons";
|
|
1255
1269
|
import React14, { useCallback, useState as useState5 } from "react";
|
|
1256
1270
|
import { FlatList, Modal as Modal2, TouchableOpacity as TouchableOpacity6, View as View9 } from "react-native";
|
|
1257
|
-
import { useSafeAreaInsets as
|
|
1271
|
+
import { useSafeAreaInsets as useSafeAreaInsets3 } from "react-native-safe-area-context";
|
|
1258
1272
|
import { ScaledSheet as ScaledSheet11 } from "react-native-size-matters";
|
|
1259
1273
|
var SelectMenu = ({
|
|
1260
1274
|
open = false,
|
|
@@ -1268,7 +1282,7 @@ var SelectMenu = ({
|
|
|
1268
1282
|
helperText
|
|
1269
1283
|
}) => {
|
|
1270
1284
|
const colors2 = useColors();
|
|
1271
|
-
const { bottom } =
|
|
1285
|
+
const { bottom } = useSafeAreaInsets3();
|
|
1272
1286
|
const [search, setSearch] = useState5("");
|
|
1273
1287
|
const styles2 = ScaledSheet11.create({
|
|
1274
1288
|
root: {
|
|
@@ -1427,7 +1441,7 @@ var TextField = ({
|
|
|
1427
1441
|
}, [focused, value]);
|
|
1428
1442
|
const styles2 = ScaledSheet12.create({
|
|
1429
1443
|
root: {
|
|
1430
|
-
marginBottom:
|
|
1444
|
+
marginBottom: ms7(gutterBottom),
|
|
1431
1445
|
width: "100%",
|
|
1432
1446
|
...style
|
|
1433
1447
|
},
|
|
@@ -1524,7 +1538,7 @@ var TextField = ({
|
|
|
1524
1538
|
View10,
|
|
1525
1539
|
{
|
|
1526
1540
|
style: {
|
|
1527
|
-
paddingTop: variant !== "outlined" ?
|
|
1541
|
+
paddingTop: variant !== "outlined" ? ms7(13) : 0,
|
|
1528
1542
|
paddingRight: 10
|
|
1529
1543
|
}
|
|
1530
1544
|
},
|
|
@@ -1559,7 +1573,7 @@ var TextField = ({
|
|
|
1559
1573
|
{
|
|
1560
1574
|
style: {
|
|
1561
1575
|
marginRight: 20,
|
|
1562
|
-
paddingTop: variant === "text" ?
|
|
1576
|
+
paddingTop: variant === "text" ? ms7(13) : 0
|
|
1563
1577
|
}
|
|
1564
1578
|
},
|
|
1565
1579
|
end
|
|
@@ -1569,7 +1583,7 @@ var TextField = ({
|
|
|
1569
1583
|
{
|
|
1570
1584
|
style: {
|
|
1571
1585
|
marginRight: variant === "text" ? 0 : 20,
|
|
1572
|
-
paddingTop: variant === "text" ?
|
|
1586
|
+
paddingTop: variant === "text" ? ms7(13) : 0
|
|
1573
1587
|
}
|
|
1574
1588
|
},
|
|
1575
1589
|
/* @__PURE__ */ React15.createElement(
|
|
@@ -1642,7 +1656,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1642
1656
|
};
|
|
1643
1657
|
const styles2 = ScaledSheet12.create({
|
|
1644
1658
|
root: {
|
|
1645
|
-
marginBottom:
|
|
1659
|
+
marginBottom: ms7(gutterBottom),
|
|
1646
1660
|
...style
|
|
1647
1661
|
},
|
|
1648
1662
|
container: {
|
|
@@ -1718,7 +1732,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1718
1732
|
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(View10, { style: styles2.root }, label && /* @__PURE__ */ React15.createElement(
|
|
1719
1733
|
Typography_default,
|
|
1720
1734
|
{
|
|
1721
|
-
variant: "
|
|
1735
|
+
variant: "body2",
|
|
1722
1736
|
color: "textSecondary",
|
|
1723
1737
|
gutterBottom: 7,
|
|
1724
1738
|
...labelProps
|
|
@@ -2028,7 +2042,7 @@ var SafeAreaView = ({
|
|
|
2028
2042
|
|
|
2029
2043
|
// ../src/Components/Divider.tsx
|
|
2030
2044
|
import { View as View12 } from "react-native";
|
|
2031
|
-
import { ScaledSheet as ScaledSheet14, ms as
|
|
2045
|
+
import { ScaledSheet as ScaledSheet14, ms as ms8 } from "react-native-size-matters";
|
|
2032
2046
|
var Divider = ({
|
|
2033
2047
|
height = 1,
|
|
2034
2048
|
color = "textSecondary",
|
|
@@ -2040,7 +2054,7 @@ var Divider = ({
|
|
|
2040
2054
|
root: {
|
|
2041
2055
|
height,
|
|
2042
2056
|
backgroundColor: colors2[color].main,
|
|
2043
|
-
marginBottom:
|
|
2057
|
+
marginBottom: ms8(gutterBottom),
|
|
2044
2058
|
...style
|
|
2045
2059
|
}
|
|
2046
2060
|
});
|
|
@@ -2095,7 +2109,7 @@ import {
|
|
|
2095
2109
|
TextInput as TextInput3,
|
|
2096
2110
|
View as View14
|
|
2097
2111
|
} from "react-native";
|
|
2098
|
-
import { ScaledSheet as ScaledSheet16, ms as
|
|
2112
|
+
import { ScaledSheet as ScaledSheet16, ms as ms9 } from "react-native-size-matters";
|
|
2099
2113
|
var OTPInput = ({
|
|
2100
2114
|
length = 6,
|
|
2101
2115
|
onChange = () => {
|
|
@@ -2142,17 +2156,17 @@ var OTPInput = ({
|
|
|
2142
2156
|
root: {},
|
|
2143
2157
|
container: { flexDirection: "row" },
|
|
2144
2158
|
input: {
|
|
2145
|
-
height:
|
|
2146
|
-
width:
|
|
2159
|
+
height: ms9(size),
|
|
2160
|
+
width: ms9(size),
|
|
2147
2161
|
borderColor: colors2.white[5],
|
|
2148
2162
|
backgroundColor: variant === "contained" ? colors2.white[3] : void 0,
|
|
2149
2163
|
borderWidth: variant === "outlined" ? 1 : 0,
|
|
2150
2164
|
borderBottomWidth: variant === "contained" ? 0 : 1,
|
|
2151
|
-
marginHorizontal:
|
|
2165
|
+
marginHorizontal: ms9(spacing * 5),
|
|
2152
2166
|
textAlign: "center",
|
|
2153
2167
|
borderRadius: variant === "text" ? 0 : 10,
|
|
2154
2168
|
color: colors2.dark.main,
|
|
2155
|
-
fontSize:
|
|
2169
|
+
fontSize: ms9(size * 0.5)
|
|
2156
2170
|
}
|
|
2157
2171
|
});
|
|
2158
2172
|
return /* @__PURE__ */ React19.createElement(View14, { style: styles2.root }, /* @__PURE__ */ React19.createElement(View14, { style: styles2.container }, [...Array(length)].map((_, index) => /* @__PURE__ */ React19.createElement(
|