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