@hoddy-ui/next 2.0.61 → 2.0.65
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/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +61 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +102 -84
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -173,7 +173,7 @@ function initialize(config2) {
|
|
|
173
173
|
|
|
174
174
|
// components/AdaptiveStatusBarNext.tsx
|
|
175
175
|
import { useFocusEffect } from "expo-router";
|
|
176
|
-
import
|
|
176
|
+
import React4, { useState as useState2 } from "react";
|
|
177
177
|
import { Platform as Platform3, StatusBar } from "react-native";
|
|
178
178
|
|
|
179
179
|
// ../src/hooks.ts
|
|
@@ -184,12 +184,12 @@ import { Platform as Platform2, useColorScheme as useColorScheme2 } from "react-
|
|
|
184
184
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
185
185
|
import * as NavigationBar from "expo-navigation-bar";
|
|
186
186
|
import * as SystemUI from "expo-system-ui";
|
|
187
|
-
import
|
|
187
|
+
import React3, { createContext, useEffect as useEffect2, useReducer } from "react";
|
|
188
188
|
import { Platform, useColorScheme } from "react-native";
|
|
189
189
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
190
190
|
|
|
191
191
|
// ../src/Components/FlashMessage.tsx
|
|
192
|
-
import
|
|
192
|
+
import React2, { useEffect, useRef, useState } from "react";
|
|
193
193
|
import { TouchableOpacity, View } from "react-native";
|
|
194
194
|
import Animated, {
|
|
195
195
|
runOnJS,
|
|
@@ -201,7 +201,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
|
201
201
|
import { ScaledSheet } from "react-native-size-matters";
|
|
202
202
|
|
|
203
203
|
// ../src/Components/Typography.tsx
|
|
204
|
-
import
|
|
204
|
+
import React, { forwardRef } from "react";
|
|
205
205
|
import { StyleSheet, Text } from "react-native";
|
|
206
206
|
import { ms } from "react-native-size-matters";
|
|
207
207
|
|
|
@@ -253,7 +253,7 @@ var Typography = forwardRef(
|
|
|
253
253
|
fontFamily: fontFamily || getFontFamily(fontWeight)
|
|
254
254
|
}
|
|
255
255
|
});
|
|
256
|
-
return /* @__PURE__ */
|
|
256
|
+
return /* @__PURE__ */ React.createElement(
|
|
257
257
|
Text,
|
|
258
258
|
{
|
|
259
259
|
ref,
|
|
@@ -360,7 +360,7 @@ var FlashMessage = () => {
|
|
|
360
360
|
});
|
|
361
361
|
if (!message)
|
|
362
362
|
return null;
|
|
363
|
-
return /* @__PURE__ */
|
|
363
|
+
return /* @__PURE__ */ React2.createElement(Animated.View, { style: [styles.root, animatedStyle] }, /* @__PURE__ */ React2.createElement(TouchableOpacity, { onPress: closeMessage, activeOpacity: 0.9 }, /* @__PURE__ */ React2.createElement(View, { style: { flexDirection: "row" } }, /* @__PURE__ */ React2.createElement(View, { style: { flex: 1, marginRight: 10 } }, message?.title && /* @__PURE__ */ React2.createElement(
|
|
364
364
|
Typography_default,
|
|
365
365
|
{
|
|
366
366
|
variant: "h6",
|
|
@@ -369,7 +369,7 @@ var FlashMessage = () => {
|
|
|
369
369
|
style: { color: "#fff" }
|
|
370
370
|
},
|
|
371
371
|
message?.title
|
|
372
|
-
), /* @__PURE__ */
|
|
372
|
+
), /* @__PURE__ */ React2.createElement(Typography_default, { style: { color: "#fff" } }, message?.message)))), message?.actions?.map((cur, i) => /* @__PURE__ */ React2.createElement(
|
|
373
373
|
TouchableOpacity,
|
|
374
374
|
{
|
|
375
375
|
key: i,
|
|
@@ -379,7 +379,7 @@ var FlashMessage = () => {
|
|
|
379
379
|
closeMessage();
|
|
380
380
|
}
|
|
381
381
|
},
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ React2.createElement(Typography_default, { fontWeight: 700, style: { color: "#fff" } }, cur.title)
|
|
383
383
|
)));
|
|
384
384
|
};
|
|
385
385
|
var FlashMessage_default = FlashMessage;
|
|
@@ -426,7 +426,7 @@ var ConfigureSystemUI = () => {
|
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
}, [colors2, theme]);
|
|
429
|
-
return /* @__PURE__ */
|
|
429
|
+
return /* @__PURE__ */ React3.createElement(React3.Fragment, null);
|
|
430
430
|
};
|
|
431
431
|
var UIThemeProvider = ({ children }) => {
|
|
432
432
|
const [themeState, themeDispatch] = useReducer(themeReducer, {
|
|
@@ -434,7 +434,7 @@ var UIThemeProvider = ({ children }) => {
|
|
|
434
434
|
value: "light"
|
|
435
435
|
});
|
|
436
436
|
const colorScheme = useColorScheme();
|
|
437
|
-
|
|
437
|
+
React3.useEffect(() => {
|
|
438
438
|
AsyncStorage.getItem("theme").then((val) => {
|
|
439
439
|
if (val) {
|
|
440
440
|
if (val === "default") {
|
|
@@ -454,7 +454,7 @@ var UIThemeProvider = ({ children }) => {
|
|
|
454
454
|
}
|
|
455
455
|
});
|
|
456
456
|
}, [colorScheme]);
|
|
457
|
-
return /* @__PURE__ */
|
|
457
|
+
return /* @__PURE__ */ React3.createElement(SafeAreaProvider, null, /* @__PURE__ */ React3.createElement(
|
|
458
458
|
UIThemeContext.Provider,
|
|
459
459
|
{
|
|
460
460
|
value: {
|
|
@@ -463,8 +463,8 @@ var UIThemeProvider = ({ children }) => {
|
|
|
463
463
|
}
|
|
464
464
|
},
|
|
465
465
|
children,
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ React3.createElement(FlashMessage_default, null),
|
|
467
|
+
/* @__PURE__ */ React3.createElement(ConfigureSystemUI, null)
|
|
468
468
|
));
|
|
469
469
|
};
|
|
470
470
|
|
|
@@ -557,20 +557,20 @@ var AdaptiveStatusBar = ({ translucent = false }) => {
|
|
|
557
557
|
}
|
|
558
558
|
};
|
|
559
559
|
useFocusEffect(
|
|
560
|
-
|
|
560
|
+
React4.useCallback(() => {
|
|
561
561
|
statusbarHandler();
|
|
562
562
|
}, [theme])
|
|
563
563
|
);
|
|
564
|
-
|
|
564
|
+
React4.useEffect(() => {
|
|
565
565
|
statusbarHandler();
|
|
566
566
|
}, [theme]);
|
|
567
|
-
return /* @__PURE__ */
|
|
567
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null);
|
|
568
568
|
};
|
|
569
569
|
var AdaptiveStatusBarNext_default = AdaptiveStatusBar;
|
|
570
570
|
|
|
571
571
|
// ../src/Components/AlertX.tsx
|
|
572
572
|
import { MaterialIcons } from "@expo/vector-icons";
|
|
573
|
-
import
|
|
573
|
+
import React5 from "react";
|
|
574
574
|
import { View as View2 } from "react-native";
|
|
575
575
|
import { ms as ms2, ScaledSheet as ScaledSheet2 } from "react-native-size-matters";
|
|
576
576
|
var AlertX = ({
|
|
@@ -600,7 +600,7 @@ var AlertX = ({
|
|
|
600
600
|
color: variant === "contained" ? "#fff" : colors2[type].main
|
|
601
601
|
}
|
|
602
602
|
});
|
|
603
|
-
return /* @__PURE__ */
|
|
603
|
+
return /* @__PURE__ */ React5.createElement(View2, { style: [styles.container, style] }, /* @__PURE__ */ React5.createElement(View2, { style: { width: "80%" } }, /* @__PURE__ */ React5.createElement(Typography_default, { style: styles.title, gutterBottom: 3, fontWeight: 700 }, title), body && /* @__PURE__ */ React5.createElement(Typography_default, { fontWeight: 700, variant: "body2", style: styles.body }, body)), /* @__PURE__ */ React5.createElement(View2, { style: { marginLeft: "auto" } }, /* @__PURE__ */ React5.createElement(
|
|
604
604
|
MaterialIcons,
|
|
605
605
|
{
|
|
606
606
|
color: variant === "contained" ? "#fff" : colors2[type].main,
|
|
@@ -613,7 +613,7 @@ var AlertX_default = AlertX;
|
|
|
613
613
|
|
|
614
614
|
// ../src/Components/Avatar.tsx
|
|
615
615
|
import { AntDesign } from "@expo/vector-icons";
|
|
616
|
-
import
|
|
616
|
+
import React6, { useState as useState3 } from "react";
|
|
617
617
|
import { Image, View as View3 } from "react-native";
|
|
618
618
|
import { ms as ms3, ScaledSheet as ScaledSheet3 } from "react-native-size-matters";
|
|
619
619
|
var Avatar = ({
|
|
@@ -644,7 +644,7 @@ var Avatar = ({
|
|
|
644
644
|
width: "110%"
|
|
645
645
|
}
|
|
646
646
|
});
|
|
647
|
-
return /* @__PURE__ */
|
|
647
|
+
return /* @__PURE__ */ React6.createElement(View3, { style: styles.root }, source && !imageError ? /* @__PURE__ */ React6.createElement(
|
|
648
648
|
Image,
|
|
649
649
|
{
|
|
650
650
|
resizeMode: "cover",
|
|
@@ -652,13 +652,13 @@ var Avatar = ({
|
|
|
652
652
|
source,
|
|
653
653
|
onError: () => setImageError(true)
|
|
654
654
|
}
|
|
655
|
-
) : label ? /* @__PURE__ */
|
|
655
|
+
) : label ? /* @__PURE__ */ React6.createElement(Typography_default, { style: { color: colors2[color].text } }, label[0]) : /* @__PURE__ */ React6.createElement(AntDesign, { name: "user", color: "#fff", size: Math.round(size / 1.5) }));
|
|
656
656
|
};
|
|
657
657
|
var Avatar_default = Avatar;
|
|
658
658
|
|
|
659
659
|
// ../src/Components/Button.tsx
|
|
660
660
|
import { Ionicons, MaterialIcons as MaterialIcons2 } from "@expo/vector-icons";
|
|
661
|
-
import
|
|
661
|
+
import React7, { forwardRef as forwardRef2 } from "react";
|
|
662
662
|
import { ActivityIndicator, Text as Text2, TouchableOpacity as TouchableOpacity2 } from "react-native";
|
|
663
663
|
import { ScaledSheet as ScaledSheet4, moderateScale as moderateScale2, ms as ms4 } from "react-native-size-matters";
|
|
664
664
|
var LinkButton = ({
|
|
@@ -680,7 +680,7 @@ var LinkButton = ({
|
|
|
680
680
|
color: disabled ? "#777" : colors2[color].main
|
|
681
681
|
}
|
|
682
682
|
});
|
|
683
|
-
return /* @__PURE__ */
|
|
683
|
+
return /* @__PURE__ */ React7.createElement(TouchableOpacity2, { onPress, disabled }, /* @__PURE__ */ React7.createElement(Text2, { style: { ...styles.text, ...style } }, title));
|
|
684
684
|
};
|
|
685
685
|
var IconButton = ({
|
|
686
686
|
style = {},
|
|
@@ -726,14 +726,14 @@ var IconButton = ({
|
|
|
726
726
|
material: MaterialIcons2,
|
|
727
727
|
ion: Ionicons
|
|
728
728
|
}[iconType];
|
|
729
|
-
return /* @__PURE__ */
|
|
729
|
+
return /* @__PURE__ */ React7.createElement(
|
|
730
730
|
TouchableOpacity2,
|
|
731
731
|
{
|
|
732
732
|
onPress,
|
|
733
733
|
activeOpacity: 0.3,
|
|
734
734
|
style: { ...styles.container, ...containerStyles }
|
|
735
735
|
},
|
|
736
|
-
/* @__PURE__ */
|
|
736
|
+
/* @__PURE__ */ React7.createElement(IconComp, { style: { ...styles.text, ...style }, name: icon, size })
|
|
737
737
|
);
|
|
738
738
|
};
|
|
739
739
|
var Button = forwardRef2(
|
|
@@ -787,7 +787,7 @@ var Button = forwardRef2(
|
|
|
787
787
|
fontFamily: getFontFamily(variant === "outlined" ? 700 : 500)
|
|
788
788
|
}
|
|
789
789
|
});
|
|
790
|
-
return /* @__PURE__ */
|
|
790
|
+
return /* @__PURE__ */ React7.createElement(
|
|
791
791
|
TouchableOpacity2,
|
|
792
792
|
{
|
|
793
793
|
ref,
|
|
@@ -796,7 +796,7 @@ var Button = forwardRef2(
|
|
|
796
796
|
style: styles.con
|
|
797
797
|
},
|
|
798
798
|
start,
|
|
799
|
-
loading && /* @__PURE__ */
|
|
799
|
+
loading && /* @__PURE__ */ React7.createElement(
|
|
800
800
|
ActivityIndicator,
|
|
801
801
|
{
|
|
802
802
|
size: "small",
|
|
@@ -804,7 +804,7 @@ var Button = forwardRef2(
|
|
|
804
804
|
style: { marginRight: 10 }
|
|
805
805
|
}
|
|
806
806
|
),
|
|
807
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ React7.createElement(Text2, { style: styles.text }, title),
|
|
808
808
|
end
|
|
809
809
|
);
|
|
810
810
|
}
|
|
@@ -813,7 +813,7 @@ var Button_default = Button;
|
|
|
813
813
|
|
|
814
814
|
// ../src/Components/Checkbox.tsx
|
|
815
815
|
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
|
816
|
-
import
|
|
816
|
+
import React8 from "react";
|
|
817
817
|
import { TouchableOpacity as TouchableOpacity3, View as View4 } from "react-native";
|
|
818
818
|
import { ScaledSheet as ScaledSheet5 } from "react-native-size-matters";
|
|
819
819
|
var CheckBox = ({
|
|
@@ -833,7 +833,7 @@ var CheckBox = ({
|
|
|
833
833
|
...style
|
|
834
834
|
}
|
|
835
835
|
});
|
|
836
|
-
return /* @__PURE__ */
|
|
836
|
+
return /* @__PURE__ */ React8.createElement(View4, { style: styles.container }, /* @__PURE__ */ React8.createElement(TouchableOpacity3, { onPress: onChange }, /* @__PURE__ */ React8.createElement(
|
|
837
837
|
MaterialCommunityIcons,
|
|
838
838
|
{
|
|
839
839
|
name: iconName,
|
|
@@ -844,7 +844,7 @@ var CheckBox = ({
|
|
|
844
844
|
};
|
|
845
845
|
|
|
846
846
|
// ../src/Components/FormWrapper.tsx
|
|
847
|
-
import
|
|
847
|
+
import React9 from "react";
|
|
848
848
|
import {
|
|
849
849
|
Keyboard,
|
|
850
850
|
KeyboardAvoidingView,
|
|
@@ -872,7 +872,7 @@ var FormWrapper = ({
|
|
|
872
872
|
...style
|
|
873
873
|
}
|
|
874
874
|
});
|
|
875
|
-
return mode === "static" ? /* @__PURE__ */
|
|
875
|
+
return mode === "static" ? /* @__PURE__ */ React9.createElement(TouchableWithoutFeedback, { onPress: Keyboard.dismiss, accessible: false }, /* @__PURE__ */ React9.createElement(
|
|
876
876
|
KeyboardAvoidingView,
|
|
877
877
|
{
|
|
878
878
|
style: styles.root,
|
|
@@ -881,14 +881,14 @@ var FormWrapper = ({
|
|
|
881
881
|
keyboardVerticalOffset: keyboardVerticalOffset || defaultOffset
|
|
882
882
|
},
|
|
883
883
|
children
|
|
884
|
-
)) : /* @__PURE__ */
|
|
884
|
+
)) : /* @__PURE__ */ React9.createElement(
|
|
885
885
|
KeyboardAvoidingView,
|
|
886
886
|
{
|
|
887
887
|
behavior,
|
|
888
888
|
style: styles.root,
|
|
889
889
|
keyboardVerticalOffset: keyboardVerticalOffset || defaultOffset
|
|
890
890
|
},
|
|
891
|
-
/* @__PURE__ */
|
|
891
|
+
/* @__PURE__ */ React9.createElement(
|
|
892
892
|
ScrollView,
|
|
893
893
|
{
|
|
894
894
|
onScroll,
|
|
@@ -906,7 +906,7 @@ var FormWrapper = ({
|
|
|
906
906
|
// ../src/Components/StarRating.tsx
|
|
907
907
|
import { Ionicons as Ionicons2 } from "@expo/vector-icons";
|
|
908
908
|
import * as Haptics from "expo-haptics";
|
|
909
|
-
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
909
|
+
import React11, { useEffect as useEffect4, useState as useState5 } from "react";
|
|
910
910
|
import {
|
|
911
911
|
ActivityIndicator as ActivityIndicator2,
|
|
912
912
|
TextInput,
|
|
@@ -926,7 +926,7 @@ import {
|
|
|
926
926
|
TouchableWithoutFeedback as TouchableWithoutFeedback2,
|
|
927
927
|
View as View5
|
|
928
928
|
} from "react-native";
|
|
929
|
-
import
|
|
929
|
+
import React10, { useEffect as useEffect3, useState as useState4 } from "react";
|
|
930
930
|
import Animated2, {
|
|
931
931
|
LinearTransition,
|
|
932
932
|
runOnJS as runOnJS2,
|
|
@@ -1060,7 +1060,7 @@ var Popup = ({
|
|
|
1060
1060
|
const closeAction = () => {
|
|
1061
1061
|
onClose();
|
|
1062
1062
|
};
|
|
1063
|
-
return /* @__PURE__ */
|
|
1063
|
+
return /* @__PURE__ */ React10.createElement(
|
|
1064
1064
|
Modal,
|
|
1065
1065
|
{
|
|
1066
1066
|
transparent: true,
|
|
@@ -1069,39 +1069,39 @@ var Popup = ({
|
|
|
1069
1069
|
visible: modalOpen,
|
|
1070
1070
|
onRequestClose: closeAction
|
|
1071
1071
|
},
|
|
1072
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ React10.createElement(UIThemeProvider, null, /* @__PURE__ */ React10.createElement(Animated2.View, { style: [styles.backdrop, backdropAnimatedStyle] }), /* @__PURE__ */ React10.createElement(
|
|
1073
1073
|
KeyboardAvoidingView2,
|
|
1074
1074
|
{
|
|
1075
1075
|
style: styles.keyboardView,
|
|
1076
1076
|
behavior: Platform5.OS === "ios" ? "padding" : "height",
|
|
1077
1077
|
keyboardVerticalOffset: keyboardVerticalOffset || keyboardVerticalOffsetValue
|
|
1078
1078
|
},
|
|
1079
|
-
/* @__PURE__ */
|
|
1079
|
+
/* @__PURE__ */ React10.createElement(
|
|
1080
1080
|
TouchableWithoutFeedback2,
|
|
1081
1081
|
{
|
|
1082
1082
|
onPress: Keyboard2.dismiss,
|
|
1083
1083
|
disabled: disableAutoKeyboardManagement
|
|
1084
1084
|
},
|
|
1085
|
-
/* @__PURE__ */
|
|
1085
|
+
/* @__PURE__ */ React10.createElement(View5, { style: styles.root }, modalOpen && /* @__PURE__ */ React10.createElement(
|
|
1086
1086
|
Pressable,
|
|
1087
1087
|
{
|
|
1088
1088
|
style: [StyleSheet2.absoluteFill, { zIndex: 1 }],
|
|
1089
1089
|
onPress: closeAction
|
|
1090
1090
|
}
|
|
1091
|
-
), /* @__PURE__ */
|
|
1091
|
+
), /* @__PURE__ */ React10.createElement(
|
|
1092
1092
|
Animated2.View,
|
|
1093
1093
|
{
|
|
1094
1094
|
style: [styles.avoidingView, contentAnimatedStyle],
|
|
1095
1095
|
layout: modalVisible ? LinearTransition.springify().stiffness(200).mass(0.5).damping(100) : void 0
|
|
1096
1096
|
},
|
|
1097
|
-
/* @__PURE__ */
|
|
1097
|
+
/* @__PURE__ */ React10.createElement(View5, { style: styles.container }, !bare && /* @__PURE__ */ React10.createElement(View5, { style: styles.title }, /* @__PURE__ */ React10.createElement(View5, { style: styles.titleIcon }, /* @__PURE__ */ React10.createElement(
|
|
1098
1098
|
IconButton,
|
|
1099
1099
|
{
|
|
1100
1100
|
size: 20,
|
|
1101
1101
|
icon: "close",
|
|
1102
1102
|
onPress: closeAction
|
|
1103
1103
|
}
|
|
1104
|
-
)), /* @__PURE__ */
|
|
1104
|
+
)), /* @__PURE__ */ React10.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)), /* @__PURE__ */ React10.createElement(View5, { style: styles.content }, children))
|
|
1105
1105
|
))
|
|
1106
1106
|
)
|
|
1107
1107
|
))
|
|
@@ -1109,31 +1109,11 @@ var Popup = ({
|
|
|
1109
1109
|
};
|
|
1110
1110
|
|
|
1111
1111
|
// ../src/Components/StarRating.tsx
|
|
1112
|
-
var RatingStars = ({
|
|
1113
|
-
rating = 0,
|
|
1114
|
-
size = 16
|
|
1115
|
-
}) => {
|
|
1116
|
-
const colors2 = useColors();
|
|
1117
|
-
const styles = ScaledSheet8.create({
|
|
1118
|
-
root: {
|
|
1119
|
-
flexDirection: "row",
|
|
1120
|
-
alignItems: "center"
|
|
1121
|
-
}
|
|
1122
|
-
});
|
|
1123
|
-
return /* @__PURE__ */ React.createElement(View6, { style: styles.root }, [...Array(Math.floor(rating))].map((_, index) => /* @__PURE__ */ React.createElement(Ionicons2, { key: index, name: "star", size, color: "#FFD700" })), [...Array(5 - Math.floor(rating))].map((_, index) => /* @__PURE__ */ React.createElement(
|
|
1124
|
-
Ionicons2,
|
|
1125
|
-
{
|
|
1126
|
-
key: index,
|
|
1127
|
-
name: "star",
|
|
1128
|
-
size,
|
|
1129
|
-
color: colors2.textSecondary.light
|
|
1130
|
-
}
|
|
1131
|
-
)));
|
|
1132
|
-
};
|
|
1133
1112
|
var RatingInput = ({
|
|
1134
1113
|
onSubmit: _onSubmit,
|
|
1135
1114
|
rating = 0,
|
|
1136
|
-
size = 16
|
|
1115
|
+
size = 16,
|
|
1116
|
+
color = "primary"
|
|
1137
1117
|
}) => {
|
|
1138
1118
|
const [showReviewsModal, setShowReviewsModal] = useState5(false);
|
|
1139
1119
|
const [rate, setRate] = useState5(0);
|
|
@@ -1173,7 +1153,7 @@ var RatingInput = ({
|
|
|
1173
1153
|
_onSubmit && await _onSubmit({ rating: rate, review });
|
|
1174
1154
|
setLoading(false);
|
|
1175
1155
|
};
|
|
1176
|
-
return /* @__PURE__ */
|
|
1156
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(View6, { style: styles.root }, loading ? /* @__PURE__ */ React11.createElement(ActivityIndicator2, null) : [...Array(5)].map((_, index) => /* @__PURE__ */ React11.createElement(
|
|
1177
1157
|
TouchableOpacity4,
|
|
1178
1158
|
{
|
|
1179
1159
|
key: index,
|
|
@@ -1182,16 +1162,16 @@ var RatingInput = ({
|
|
|
1182
1162
|
onRate(index);
|
|
1183
1163
|
}
|
|
1184
1164
|
},
|
|
1185
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ React11.createElement(
|
|
1186
1166
|
Ionicons2,
|
|
1187
1167
|
{
|
|
1188
1168
|
style: { marginLeft: 10 },
|
|
1189
1169
|
name: index < rate ? "star" : "star-outline",
|
|
1190
1170
|
size,
|
|
1191
|
-
color: colors2
|
|
1171
|
+
color: colors2[color]?.main || color
|
|
1192
1172
|
}
|
|
1193
1173
|
)
|
|
1194
|
-
))), /* @__PURE__ */
|
|
1174
|
+
))), /* @__PURE__ */ React11.createElement(
|
|
1195
1175
|
Popup,
|
|
1196
1176
|
{
|
|
1197
1177
|
sheet: true,
|
|
@@ -1200,7 +1180,7 @@ var RatingInput = ({
|
|
|
1200
1180
|
setShowReviewsModal(false);
|
|
1201
1181
|
}
|
|
1202
1182
|
},
|
|
1203
|
-
/* @__PURE__ */
|
|
1183
|
+
/* @__PURE__ */ React11.createElement(
|
|
1204
1184
|
View6,
|
|
1205
1185
|
{
|
|
1206
1186
|
style: {
|
|
@@ -1208,9 +1188,9 @@ var RatingInput = ({
|
|
|
1208
1188
|
marginBottom: 5
|
|
1209
1189
|
}
|
|
1210
1190
|
},
|
|
1211
|
-
/* @__PURE__ */
|
|
1191
|
+
/* @__PURE__ */ React11.createElement(RatingStars, { rating: rate, size: 24 })
|
|
1212
1192
|
),
|
|
1213
|
-
/* @__PURE__ */
|
|
1193
|
+
/* @__PURE__ */ React11.createElement(
|
|
1214
1194
|
Typography_default,
|
|
1215
1195
|
{
|
|
1216
1196
|
align: "center",
|
|
@@ -1220,17 +1200,18 @@ var RatingInput = ({
|
|
|
1220
1200
|
},
|
|
1221
1201
|
"Add to your review"
|
|
1222
1202
|
),
|
|
1223
|
-
/* @__PURE__ */
|
|
1203
|
+
/* @__PURE__ */ React11.createElement(View6, { style: styles.inputCon }, /* @__PURE__ */ React11.createElement(
|
|
1224
1204
|
TextInput,
|
|
1225
1205
|
{
|
|
1226
1206
|
style: styles.input,
|
|
1227
1207
|
multiline: true,
|
|
1228
1208
|
value: review,
|
|
1229
1209
|
onChangeText: (text) => setReview(text),
|
|
1230
|
-
placeholder: "Type review here.."
|
|
1210
|
+
placeholder: "Type review here..",
|
|
1211
|
+
verticalAlign: "top"
|
|
1231
1212
|
}
|
|
1232
1213
|
)),
|
|
1233
|
-
/* @__PURE__ */
|
|
1214
|
+
/* @__PURE__ */ React11.createElement(
|
|
1234
1215
|
Button_default,
|
|
1235
1216
|
{
|
|
1236
1217
|
gutterBottom: 40,
|
|
@@ -1244,6 +1225,36 @@ var RatingInput = ({
|
|
|
1244
1225
|
)
|
|
1245
1226
|
));
|
|
1246
1227
|
};
|
|
1228
|
+
var RatingStars = ({
|
|
1229
|
+
rating = 0,
|
|
1230
|
+
size = 16,
|
|
1231
|
+
color = "#FFD700"
|
|
1232
|
+
}) => {
|
|
1233
|
+
const colors2 = useColors();
|
|
1234
|
+
const styles = ScaledSheet8.create({
|
|
1235
|
+
root: {
|
|
1236
|
+
flexDirection: "row",
|
|
1237
|
+
alignItems: "center"
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
return /* @__PURE__ */ React11.createElement(View6, { style: styles.root }, [...Array(Math.floor(rating))].map((_, index) => /* @__PURE__ */ React11.createElement(
|
|
1241
|
+
Ionicons2,
|
|
1242
|
+
{
|
|
1243
|
+
key: index,
|
|
1244
|
+
name: "star",
|
|
1245
|
+
size,
|
|
1246
|
+
color: colors2[color]?.main || color
|
|
1247
|
+
}
|
|
1248
|
+
)), [...Array(5 - Math.floor(rating))].map((_, index) => /* @__PURE__ */ React11.createElement(
|
|
1249
|
+
Ionicons2,
|
|
1250
|
+
{
|
|
1251
|
+
key: index,
|
|
1252
|
+
name: "star",
|
|
1253
|
+
size,
|
|
1254
|
+
color: colors2.textSecondary.light
|
|
1255
|
+
}
|
|
1256
|
+
)));
|
|
1257
|
+
};
|
|
1247
1258
|
|
|
1248
1259
|
// ../src/Components/Grid.tsx
|
|
1249
1260
|
import React12 from "react";
|
|
@@ -1901,10 +1912,15 @@ var getPredictionsFromCoords = async (coords) => {
|
|
|
1901
1912
|
)).json();
|
|
1902
1913
|
const p = [];
|
|
1903
1914
|
for (let key in res.results) {
|
|
1904
|
-
const {
|
|
1915
|
+
const {
|
|
1916
|
+
formatted_address: description,
|
|
1917
|
+
place_id,
|
|
1918
|
+
types
|
|
1919
|
+
} = res.results[key];
|
|
1905
1920
|
p.push({
|
|
1906
1921
|
description,
|
|
1907
1922
|
id: place_id,
|
|
1923
|
+
types,
|
|
1908
1924
|
latLng: { lst: coords.latitude, lng: coords.longitude }
|
|
1909
1925
|
});
|
|
1910
1926
|
}
|
|
@@ -1916,10 +1932,11 @@ var getPredictionsFromQuery = async (query, country) => {
|
|
|
1916
1932
|
const res = await (await fetch(endpoint)).json();
|
|
1917
1933
|
const p = [];
|
|
1918
1934
|
for (let key in res.predictions) {
|
|
1919
|
-
const { description, place_id } = res.predictions[key];
|
|
1935
|
+
const { description, place_id, types } = res.predictions[key];
|
|
1920
1936
|
p.push({
|
|
1921
1937
|
description,
|
|
1922
|
-
id: place_id
|
|
1938
|
+
id: place_id,
|
|
1939
|
+
types
|
|
1923
1940
|
});
|
|
1924
1941
|
}
|
|
1925
1942
|
return p;
|
|
@@ -2107,6 +2124,7 @@ var SafeAreaView = ({
|
|
|
2107
2124
|
};
|
|
2108
2125
|
|
|
2109
2126
|
// ../src/Components/Divider.tsx
|
|
2127
|
+
import React18 from "react";
|
|
2110
2128
|
import { View as View13 } from "react-native";
|
|
2111
2129
|
import { ScaledSheet as ScaledSheet14, ms as ms8 } from "react-native-size-matters";
|
|
2112
2130
|
var Divider = ({
|
|
@@ -2124,11 +2142,11 @@ var Divider = ({
|
|
|
2124
2142
|
...style
|
|
2125
2143
|
}
|
|
2126
2144
|
});
|
|
2127
|
-
return /* @__PURE__ */
|
|
2145
|
+
return /* @__PURE__ */ React18.createElement(View13, { style: styles.root });
|
|
2128
2146
|
};
|
|
2129
2147
|
|
|
2130
2148
|
// ../src/Components/Spinner.tsx
|
|
2131
|
-
import
|
|
2149
|
+
import React19 from "react";
|
|
2132
2150
|
import { ActivityIndicator as ActivityIndicator3, Dimensions, View as View14 } from "react-native";
|
|
2133
2151
|
import { ScaledSheet as ScaledSheet15 } from "react-native-size-matters";
|
|
2134
2152
|
var Spinner = ({
|
|
@@ -2165,12 +2183,12 @@ var Spinner = ({
|
|
|
2165
2183
|
color: color === "light" ? colors2.white[2] : colors2.black[4]
|
|
2166
2184
|
}
|
|
2167
2185
|
});
|
|
2168
|
-
return /* @__PURE__ */
|
|
2186
|
+
return /* @__PURE__ */ React19.createElement(View14, { style: styles.root }, /* @__PURE__ */ React19.createElement(View14, { style: styles.content }, /* @__PURE__ */ React19.createElement(ActivityIndicator3, { color: colors2[color].dark, size }), label && /* @__PURE__ */ React19.createElement(Typography_default, { style: styles.label }, label)));
|
|
2169
2187
|
};
|
|
2170
2188
|
var Spinner_default = Spinner;
|
|
2171
2189
|
|
|
2172
2190
|
// ../src/Components/OTPInput.tsx
|
|
2173
|
-
import
|
|
2191
|
+
import React20, { useMemo } from "react";
|
|
2174
2192
|
import {
|
|
2175
2193
|
TextInput as TextInput3,
|
|
2176
2194
|
View as View15
|
|
@@ -2186,7 +2204,7 @@ var OTPInput = ({
|
|
|
2186
2204
|
size = 45
|
|
2187
2205
|
}) => {
|
|
2188
2206
|
const inputRefs = useMemo(
|
|
2189
|
-
() => Array(length).fill(0).map((_) =>
|
|
2207
|
+
() => Array(length).fill(0).map((_) => React20.createRef()),
|
|
2190
2208
|
[length]
|
|
2191
2209
|
);
|
|
2192
2210
|
const onChangeHandler = (val, index) => {
|
|
@@ -2235,7 +2253,7 @@ var OTPInput = ({
|
|
|
2235
2253
|
fontSize: ms9(size * 0.5)
|
|
2236
2254
|
}
|
|
2237
2255
|
});
|
|
2238
|
-
return /* @__PURE__ */
|
|
2256
|
+
return /* @__PURE__ */ React20.createElement(View15, { style: styles.root }, /* @__PURE__ */ React20.createElement(View15, { style: styles.container }, [...Array(length)].map((_, index) => /* @__PURE__ */ React20.createElement(
|
|
2239
2257
|
TextInput3,
|
|
2240
2258
|
{
|
|
2241
2259
|
ref: inputRefs[index],
|