@hoddy-ui/core 2.5.29 → 2.5.31
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 +11 -5
- package/next/dist/index.d.ts +11 -5
- package/next/dist/index.js +242 -220
- package/next/dist/index.js.map +1 -1
- package/next/dist/index.mjs +206 -185
- 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 -1
- package/src/Components/SelectMenu.tsx +6 -1
- package/src/hooks.ts +0 -2
- package/src/theme/index.tsx +1 -1
- package/src/types.ts +1 -1
package/next/dist/index.mjs
CHANGED
|
@@ -178,19 +178,18 @@ import { Platform as Platform3, StatusBar } from "react-native";
|
|
|
178
178
|
|
|
179
179
|
// ../src/hooks.ts
|
|
180
180
|
import { useContext } from "react";
|
|
181
|
-
import {
|
|
182
|
-
import { vs } from "react-native-size-matters";
|
|
181
|
+
import { Platform as Platform2, useColorScheme as useColorScheme2 } from "react-native";
|
|
183
182
|
|
|
184
183
|
// ../src/theme/index.tsx
|
|
185
184
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
186
185
|
import * as NavigationBar from "expo-navigation-bar";
|
|
187
186
|
import * as SystemUI from "expo-system-ui";
|
|
188
|
-
import React4, { createContext, useEffect, useReducer } from "react";
|
|
187
|
+
import React4, { createContext, useEffect as useEffect2, useReducer } from "react";
|
|
189
188
|
import { Platform, useColorScheme } from "react-native";
|
|
190
189
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
191
190
|
|
|
192
191
|
// ../src/Components/FlashMessage.tsx
|
|
193
|
-
import React3, { useRef, useState } from "react";
|
|
192
|
+
import React3, { useEffect, useRef, useState } from "react";
|
|
194
193
|
import { TouchableOpacity, View } from "react-native";
|
|
195
194
|
import Animated, {
|
|
196
195
|
runOnJS,
|
|
@@ -204,7 +203,7 @@ import { ScaledSheet } from "react-native-size-matters";
|
|
|
204
203
|
// ../src/Components/Typography.tsx
|
|
205
204
|
import React2, { forwardRef } from "react";
|
|
206
205
|
import { StyleSheet, Text } from "react-native";
|
|
207
|
-
import {
|
|
206
|
+
import { ms } from "react-native-size-matters";
|
|
208
207
|
|
|
209
208
|
// ../src/utility.ts
|
|
210
209
|
var getFontFamily = (fontWeight) => {
|
|
@@ -230,19 +229,21 @@ var Typography = forwardRef(
|
|
|
230
229
|
}, ref) => {
|
|
231
230
|
const colors2 = useColors();
|
|
232
231
|
const _fontSize = {
|
|
233
|
-
h1:
|
|
234
|
-
h2:
|
|
235
|
-
h3:
|
|
236
|
-
h4:
|
|
237
|
-
h5:
|
|
238
|
-
h6:
|
|
239
|
-
body1:
|
|
240
|
-
body2:
|
|
241
|
-
caption:
|
|
232
|
+
h1: ms(42),
|
|
233
|
+
h2: ms(37),
|
|
234
|
+
h3: ms(32),
|
|
235
|
+
h4: ms(27),
|
|
236
|
+
h5: ms(22),
|
|
237
|
+
h6: ms(17),
|
|
238
|
+
body1: ms(15),
|
|
239
|
+
body2: ms(12),
|
|
240
|
+
caption: ms(10)
|
|
242
241
|
};
|
|
243
|
-
const
|
|
242
|
+
const f = fontSize || _fontSize[variant];
|
|
243
|
+
const styles = StyleSheet.create({
|
|
244
244
|
text: {
|
|
245
|
-
|
|
245
|
+
lineHeight: f * 1.2,
|
|
246
|
+
fontSize: f,
|
|
246
247
|
marginBottom: ms(gutterBottom) || 0,
|
|
247
248
|
color: colors2[color]?.main || color,
|
|
248
249
|
textTransform: textCase,
|
|
@@ -257,7 +258,7 @@ var Typography = forwardRef(
|
|
|
257
258
|
{
|
|
258
259
|
ref,
|
|
259
260
|
adjustsFontSizeToFit,
|
|
260
|
-
style: [
|
|
261
|
+
style: [styles.text, style],
|
|
261
262
|
...props
|
|
262
263
|
},
|
|
263
264
|
children
|
|
@@ -267,7 +268,15 @@ var Typography = forwardRef(
|
|
|
267
268
|
var Typography_default = Typography;
|
|
268
269
|
|
|
269
270
|
// ../src/Components/FlashMessage.tsx
|
|
270
|
-
var
|
|
271
|
+
var flashListeners = /* @__PURE__ */ new Set();
|
|
272
|
+
var showFlashMessage = (msg) => {
|
|
273
|
+
flashListeners.forEach((listener) => listener(msg));
|
|
274
|
+
};
|
|
275
|
+
var subscribeToFlashMessages = (listener) => {
|
|
276
|
+
flashListeners.add(listener);
|
|
277
|
+
return () => {
|
|
278
|
+
flashListeners.delete(listener);
|
|
279
|
+
};
|
|
271
280
|
};
|
|
272
281
|
var FlashMessage = () => {
|
|
273
282
|
const { top } = useSafeAreaInsets();
|
|
@@ -290,32 +299,42 @@ var FlashMessage = () => {
|
|
|
290
299
|
runOnJS(hideMessage)();
|
|
291
300
|
});
|
|
292
301
|
};
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
302
|
+
useEffect(() => {
|
|
303
|
+
const listener = (msg) => {
|
|
304
|
+
if (timeoutRef.current) {
|
|
305
|
+
clearTimeout(timeoutRef.current);
|
|
306
|
+
timeoutRef.current = null;
|
|
307
|
+
}
|
|
308
|
+
translateY.value = -200;
|
|
309
|
+
opacity.value = 0;
|
|
310
|
+
setMessage(msg);
|
|
311
|
+
translateY.value = withTiming(0, { duration: 300 });
|
|
312
|
+
opacity.value = withTiming(1, { duration: 300 });
|
|
313
|
+
const duration = msg.duration || 3e3;
|
|
314
|
+
timeoutRef.current = setTimeout(() => {
|
|
315
|
+
translateY.value = withTiming(-200, { duration: 300 });
|
|
316
|
+
opacity.value = withTiming(0, { duration: 300 }, () => {
|
|
317
|
+
runOnJS(hideMessage)();
|
|
318
|
+
});
|
|
319
|
+
timeoutRef.current = null;
|
|
320
|
+
}, duration);
|
|
321
|
+
};
|
|
322
|
+
const unsubscribe = subscribeToFlashMessages(listener);
|
|
323
|
+
return () => {
|
|
324
|
+
if (timeoutRef.current) {
|
|
325
|
+
clearTimeout(timeoutRef.current);
|
|
326
|
+
timeoutRef.current = null;
|
|
327
|
+
}
|
|
328
|
+
unsubscribe();
|
|
329
|
+
};
|
|
330
|
+
}, []);
|
|
312
331
|
const animatedStyle = useAnimatedStyle(() => {
|
|
313
332
|
return {
|
|
314
333
|
transform: [{ translateY: translateY.value }],
|
|
315
334
|
opacity: opacity.value
|
|
316
335
|
};
|
|
317
336
|
});
|
|
318
|
-
const
|
|
337
|
+
const styles = ScaledSheet.create({
|
|
319
338
|
root: {
|
|
320
339
|
position: "absolute",
|
|
321
340
|
top: 0,
|
|
@@ -341,7 +360,7 @@ var FlashMessage = () => {
|
|
|
341
360
|
});
|
|
342
361
|
if (!message)
|
|
343
362
|
return null;
|
|
344
|
-
return /* @__PURE__ */ React3.createElement(Animated.View, { style: [
|
|
363
|
+
return /* @__PURE__ */ React3.createElement(Animated.View, { style: [styles.root, animatedStyle] }, /* @__PURE__ */ React3.createElement(TouchableOpacity, { onPress: closeMessage, activeOpacity: 0.9 }, /* @__PURE__ */ React3.createElement(View, { style: { flexDirection: "row" } }, /* @__PURE__ */ React3.createElement(View, { style: { flex: 1, marginRight: 10 } }, message?.title && /* @__PURE__ */ React3.createElement(
|
|
345
364
|
Typography_default,
|
|
346
365
|
{
|
|
347
366
|
variant: "h6",
|
|
@@ -354,7 +373,7 @@ var FlashMessage = () => {
|
|
|
354
373
|
TouchableOpacity,
|
|
355
374
|
{
|
|
356
375
|
key: i,
|
|
357
|
-
style:
|
|
376
|
+
style: styles.action,
|
|
358
377
|
onPress: () => {
|
|
359
378
|
cur.onPress?.();
|
|
360
379
|
closeMessage();
|
|
@@ -384,7 +403,7 @@ function themeReducer(state, { type, payload }) {
|
|
|
384
403
|
var ConfigureSystemUI = () => {
|
|
385
404
|
const theme = useTheme();
|
|
386
405
|
const colors2 = useColors();
|
|
387
|
-
|
|
406
|
+
useEffect2(() => {
|
|
388
407
|
const config2 = getConfig();
|
|
389
408
|
if (colors2) {
|
|
390
409
|
SystemUI.setBackgroundColorAsync(colors2.white[1]);
|
|
@@ -441,6 +460,7 @@ var UIThemeProvider = ({ children }) => {
|
|
|
441
460
|
};
|
|
442
461
|
|
|
443
462
|
// ../src/hooks.ts
|
|
463
|
+
import AsyncStorage2 from "@react-native-async-storage/async-storage";
|
|
444
464
|
var useColors = () => {
|
|
445
465
|
const { themeState } = useContext(UIThemeContext);
|
|
446
466
|
return colors(themeState.value);
|
|
@@ -449,9 +469,22 @@ var useTheme = () => {
|
|
|
449
469
|
const { themeState } = useContext(UIThemeContext);
|
|
450
470
|
return themeState.value;
|
|
451
471
|
};
|
|
472
|
+
var useThemeContext = () => {
|
|
473
|
+
const { themeState: theme, themeDispatch } = useContext(UIThemeContext);
|
|
474
|
+
const colorScheme = useColorScheme2();
|
|
475
|
+
const setTheme = (theme2) => {
|
|
476
|
+
if (theme2 === "default") {
|
|
477
|
+
themeDispatch?.({ type: "default", payload: colorScheme });
|
|
478
|
+
AsyncStorage2.setItem("theme", "default");
|
|
479
|
+
} else {
|
|
480
|
+
themeDispatch?.({ type: theme2 });
|
|
481
|
+
AsyncStorage2.setItem("theme", theme2);
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
return { theme, setTheme };
|
|
485
|
+
};
|
|
452
486
|
var useNavScreenOptions = (type) => {
|
|
453
487
|
const colors2 = useColors();
|
|
454
|
-
const theme = useTheme();
|
|
455
488
|
const options = {
|
|
456
489
|
stack: {
|
|
457
490
|
headerShown: false,
|
|
@@ -471,15 +504,12 @@ var useNavScreenOptions = (type) => {
|
|
|
471
504
|
headerShown: false,
|
|
472
505
|
headerTintColor: colors2.dark.main,
|
|
473
506
|
tabBarStyle: {
|
|
474
|
-
borderTopColor:
|
|
507
|
+
borderTopColor: colors2.white[2],
|
|
508
|
+
borderColor: colors2.white[2],
|
|
475
509
|
borderTopWidth: 1,
|
|
476
|
-
// shadowColor: "#000",
|
|
477
|
-
// shadowOffset: { height: -3, width: 0 },
|
|
478
|
-
// shadowRadius: 7,
|
|
479
|
-
// shadowOpacity: 0.1,
|
|
480
510
|
backgroundColor: colors2.white[1]
|
|
481
511
|
},
|
|
482
|
-
tabBarActiveTintColor: colors2.
|
|
512
|
+
tabBarActiveTintColor: colors2.primary.main,
|
|
483
513
|
tabBarInactiveTintColor: colors2.textSecondary.main,
|
|
484
514
|
tabBarLabelStyle: {
|
|
485
515
|
// fontSize: ms(12),
|
|
@@ -503,10 +533,6 @@ var useNavScreenOptions = (type) => {
|
|
|
503
533
|
}
|
|
504
534
|
}
|
|
505
535
|
};
|
|
506
|
-
if (Platform2.OS === "android") {
|
|
507
|
-
options.tab.tabBarStyle.height = Dimensions.get("screen").height * 0.08;
|
|
508
|
-
options.tab.tabBarStyle.paddingBottom = vs(15);
|
|
509
|
-
}
|
|
510
536
|
return options[type];
|
|
511
537
|
};
|
|
512
538
|
|
|
@@ -550,7 +576,7 @@ var AlertX = ({
|
|
|
550
576
|
style = {}
|
|
551
577
|
}) => {
|
|
552
578
|
const colors2 = useColors();
|
|
553
|
-
const
|
|
579
|
+
const styles = ScaledSheet2.create({
|
|
554
580
|
container: {
|
|
555
581
|
padding: 20,
|
|
556
582
|
paddingTop: 10,
|
|
@@ -568,7 +594,7 @@ var AlertX = ({
|
|
|
568
594
|
color: variant === "contained" ? "#fff" : colors2[type].main
|
|
569
595
|
}
|
|
570
596
|
});
|
|
571
|
-
return /* @__PURE__ */ React6.createElement(View2, { style: [
|
|
597
|
+
return /* @__PURE__ */ React6.createElement(View2, { style: [styles.container, style] }, /* @__PURE__ */ React6.createElement(View2, { style: { width: "80%" } }, /* @__PURE__ */ React6.createElement(Typography_default, { style: styles.title, gutterBottom: 3, fontWeight: 700 }, title), body && /* @__PURE__ */ React6.createElement(Typography_default, { fontWeight: 700, variant: "body2", style: styles.body }, body)), /* @__PURE__ */ React6.createElement(View2, { style: { marginLeft: "auto" } }, /* @__PURE__ */ React6.createElement(
|
|
572
598
|
MaterialIcons,
|
|
573
599
|
{
|
|
574
600
|
color: variant === "contained" ? "#fff" : colors2[type].main,
|
|
@@ -593,7 +619,7 @@ var Avatar = ({
|
|
|
593
619
|
style = {}
|
|
594
620
|
}) => {
|
|
595
621
|
const colors2 = useColors();
|
|
596
|
-
const
|
|
622
|
+
const styles = ScaledSheet3.create({
|
|
597
623
|
root: {
|
|
598
624
|
borderRadius: 150,
|
|
599
625
|
height: ms3(size),
|
|
@@ -611,7 +637,7 @@ var Avatar = ({
|
|
|
611
637
|
width: "110%"
|
|
612
638
|
}
|
|
613
639
|
});
|
|
614
|
-
return /* @__PURE__ */ React7.createElement(View3, { style:
|
|
640
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: styles.root }, source ? /* @__PURE__ */ React7.createElement(Image, { resizeMode: "cover", style: styles.image, source }) : label ? /* @__PURE__ */ React7.createElement(Typography_default, { style: { color: colors2[color].text } }, label[0]) : /* @__PURE__ */ React7.createElement(AntDesign, { name: "user", color: "#fff", size: Math.round(size / 1.5) }));
|
|
615
641
|
};
|
|
616
642
|
var Avatar_default = Avatar;
|
|
617
643
|
|
|
@@ -631,7 +657,7 @@ var LinkButton = ({
|
|
|
631
657
|
}
|
|
632
658
|
}) => {
|
|
633
659
|
const colors2 = useColors();
|
|
634
|
-
const
|
|
660
|
+
const styles = ScaledSheet4.create({
|
|
635
661
|
text: {
|
|
636
662
|
fontSize: moderateScale2(fontSize),
|
|
637
663
|
fontWeight: fontWeight.toString(),
|
|
@@ -639,7 +665,7 @@ var LinkButton = ({
|
|
|
639
665
|
color: disabled ? "#777" : colors2[color].main
|
|
640
666
|
}
|
|
641
667
|
});
|
|
642
|
-
return /* @__PURE__ */ React8.createElement(TouchableOpacity2, { onPress, disabled }, /* @__PURE__ */ React8.createElement(Text2, { style: { ...
|
|
668
|
+
return /* @__PURE__ */ React8.createElement(TouchableOpacity2, { onPress, disabled }, /* @__PURE__ */ React8.createElement(Text2, { style: { ...styles.text, ...style } }, title));
|
|
643
669
|
};
|
|
644
670
|
var IconButton = ({
|
|
645
671
|
style = {},
|
|
@@ -657,7 +683,7 @@ var IconButton = ({
|
|
|
657
683
|
const colors2 = useColors();
|
|
658
684
|
const theme = useTheme();
|
|
659
685
|
const bgColor = theme === "light" ? "#fff" : "#222";
|
|
660
|
-
const
|
|
686
|
+
const styles = ScaledSheet4.create({
|
|
661
687
|
container: {
|
|
662
688
|
alignSelf: "flex-start",
|
|
663
689
|
flexGrow: 0,
|
|
@@ -690,9 +716,9 @@ var IconButton = ({
|
|
|
690
716
|
{
|
|
691
717
|
onPress,
|
|
692
718
|
activeOpacity: 0.3,
|
|
693
|
-
style: { ...
|
|
719
|
+
style: { ...styles.container, ...containerStyles }
|
|
694
720
|
},
|
|
695
|
-
/* @__PURE__ */ React8.createElement(IconComp, { style: { ...
|
|
721
|
+
/* @__PURE__ */ React8.createElement(IconComp, { style: { ...styles.text, ...style }, name: icon, size })
|
|
696
722
|
);
|
|
697
723
|
};
|
|
698
724
|
var Button = forwardRef2(
|
|
@@ -715,7 +741,7 @@ var Button = forwardRef2(
|
|
|
715
741
|
end
|
|
716
742
|
}, ref) => {
|
|
717
743
|
const colors2 = useColors();
|
|
718
|
-
const
|
|
744
|
+
const styles = ScaledSheet4.create({
|
|
719
745
|
con: {
|
|
720
746
|
flexDirection: "row",
|
|
721
747
|
alignItems: "center",
|
|
@@ -752,7 +778,7 @@ var Button = forwardRef2(
|
|
|
752
778
|
ref,
|
|
753
779
|
onPress,
|
|
754
780
|
disabled,
|
|
755
|
-
style:
|
|
781
|
+
style: styles.con
|
|
756
782
|
},
|
|
757
783
|
start,
|
|
758
784
|
loading && /* @__PURE__ */ React8.createElement(
|
|
@@ -763,7 +789,7 @@ var Button = forwardRef2(
|
|
|
763
789
|
style: { marginRight: 10 }
|
|
764
790
|
}
|
|
765
791
|
),
|
|
766
|
-
/* @__PURE__ */ React8.createElement(Text2, { style:
|
|
792
|
+
/* @__PURE__ */ React8.createElement(Text2, { style: styles.text }, title),
|
|
767
793
|
end
|
|
768
794
|
);
|
|
769
795
|
}
|
|
@@ -785,14 +811,14 @@ var CheckBox = ({
|
|
|
785
811
|
}) => {
|
|
786
812
|
const iconName = checked ? "checkbox-marked" : "checkbox-blank-outline";
|
|
787
813
|
const colors2 = useColors();
|
|
788
|
-
const
|
|
814
|
+
const styles = ScaledSheet5.create({
|
|
789
815
|
container: {
|
|
790
816
|
alignItems: "center",
|
|
791
817
|
flexDirection: "row",
|
|
792
818
|
...style
|
|
793
819
|
}
|
|
794
820
|
});
|
|
795
|
-
return /* @__PURE__ */ React9.createElement(View4, { style:
|
|
821
|
+
return /* @__PURE__ */ React9.createElement(View4, { style: styles.container }, /* @__PURE__ */ React9.createElement(TouchableOpacity3, { onPress: onChange }, /* @__PURE__ */ React9.createElement(
|
|
796
822
|
MaterialCommunityIcons,
|
|
797
823
|
{
|
|
798
824
|
name: iconName,
|
|
@@ -812,6 +838,7 @@ import {
|
|
|
812
838
|
TouchableWithoutFeedback
|
|
813
839
|
} from "react-native";
|
|
814
840
|
import { ScaledSheet as ScaledSheet6 } from "react-native-size-matters";
|
|
841
|
+
import { useSafeAreaInsets as useSafeAreaInsets2 } from "react-native-safe-area-context";
|
|
815
842
|
var FormWrapper = ({
|
|
816
843
|
children,
|
|
817
844
|
behavior = Platform4.OS === "ios" ? "padding" : "height",
|
|
@@ -821,7 +848,9 @@ var FormWrapper = ({
|
|
|
821
848
|
style = {},
|
|
822
849
|
onScroll
|
|
823
850
|
}) => {
|
|
824
|
-
const
|
|
851
|
+
const { bottom } = useSafeAreaInsets2();
|
|
852
|
+
const defaultOffset = Platform4.OS === "ios" ? -bottom : -bottom * 2;
|
|
853
|
+
const styles = ScaledSheet6.create({
|
|
825
854
|
root: {
|
|
826
855
|
width: "100%",
|
|
827
856
|
flex: 1,
|
|
@@ -831,18 +860,18 @@ var FormWrapper = ({
|
|
|
831
860
|
return mode === "static" ? /* @__PURE__ */ React10.createElement(TouchableWithoutFeedback, { onPress: Keyboard.dismiss, accessible: false }, /* @__PURE__ */ React10.createElement(
|
|
832
861
|
KeyboardAvoidingView,
|
|
833
862
|
{
|
|
834
|
-
style:
|
|
863
|
+
style: styles.root,
|
|
835
864
|
behavior,
|
|
836
|
-
contentContainerStyle:
|
|
837
|
-
keyboardVerticalOffset
|
|
865
|
+
contentContainerStyle: styles.root,
|
|
866
|
+
keyboardVerticalOffset: keyboardVerticalOffset || defaultOffset
|
|
838
867
|
},
|
|
839
868
|
children
|
|
840
869
|
)) : /* @__PURE__ */ React10.createElement(
|
|
841
870
|
KeyboardAvoidingView,
|
|
842
871
|
{
|
|
843
872
|
behavior,
|
|
844
|
-
style:
|
|
845
|
-
keyboardVerticalOffset
|
|
873
|
+
style: styles.root,
|
|
874
|
+
keyboardVerticalOffset: keyboardVerticalOffset || defaultOffset
|
|
846
875
|
},
|
|
847
876
|
/* @__PURE__ */ React10.createElement(
|
|
848
877
|
ScrollView,
|
|
@@ -862,7 +891,7 @@ var FormWrapper = ({
|
|
|
862
891
|
// ../src/Components/StarRating.tsx
|
|
863
892
|
import { Ionicons as Ionicons2 } from "@expo/vector-icons";
|
|
864
893
|
import * as Haptics from "expo-haptics";
|
|
865
|
-
import { useEffect as
|
|
894
|
+
import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
866
895
|
import {
|
|
867
896
|
ActivityIndicator as ActivityIndicator2,
|
|
868
897
|
TextInput,
|
|
@@ -882,7 +911,7 @@ import {
|
|
|
882
911
|
TouchableWithoutFeedback as TouchableWithoutFeedback2,
|
|
883
912
|
View as View5
|
|
884
913
|
} from "react-native";
|
|
885
|
-
import React11, { useEffect as
|
|
914
|
+
import React11, { useEffect as useEffect3, useState as useState3 } from "react";
|
|
886
915
|
import Animated2, {
|
|
887
916
|
LinearTransition,
|
|
888
917
|
runOnJS as runOnJS2,
|
|
@@ -890,11 +919,11 @@ import Animated2, {
|
|
|
890
919
|
useSharedValue as useSharedValue2,
|
|
891
920
|
withTiming as withTiming2
|
|
892
921
|
} from "react-native-reanimated";
|
|
893
|
-
import { useSafeAreaInsets as
|
|
922
|
+
import { useSafeAreaInsets as useSafeAreaInsets3 } from "react-native-safe-area-context";
|
|
894
923
|
import { ms as ms5, ScaledSheet as ScaledSheet7 } from "react-native-size-matters";
|
|
895
924
|
var Popup = ({
|
|
896
925
|
title,
|
|
897
|
-
sheet,
|
|
926
|
+
sheet = true,
|
|
898
927
|
bare = false,
|
|
899
928
|
keyboardVerticalOffset,
|
|
900
929
|
children,
|
|
@@ -908,12 +937,13 @@ var Popup = ({
|
|
|
908
937
|
const theme = useTheme();
|
|
909
938
|
const colors2 = useColors();
|
|
910
939
|
const [modalVisible, setModalVisible] = useState3(false);
|
|
940
|
+
const [modalOpen, setModalOpen] = useState3(false);
|
|
911
941
|
const [keyboardVisible, setKeyboardVisible] = useState3(false);
|
|
912
|
-
const { bottom } =
|
|
942
|
+
const { bottom } = useSafeAreaInsets3();
|
|
913
943
|
const backdropOpacity = useSharedValue2(0);
|
|
914
944
|
const contentTranslateY = useSharedValue2(1e3);
|
|
915
945
|
const keyboardVerticalOffsetValue = Platform5.OS === "ios" ? -bottom : -bottom * 2;
|
|
916
|
-
|
|
946
|
+
useEffect3(() => {
|
|
917
947
|
const keyboardDidShowListener = Keyboard2.addListener(
|
|
918
948
|
"keyboardDidShow",
|
|
919
949
|
() => {
|
|
@@ -931,22 +961,26 @@ var Popup = ({
|
|
|
931
961
|
keyboardDidShowListener?.remove();
|
|
932
962
|
};
|
|
933
963
|
}, []);
|
|
934
|
-
|
|
964
|
+
const _onModalShow = () => {
|
|
965
|
+
setModalVisible(true);
|
|
966
|
+
onModalShow?.();
|
|
967
|
+
};
|
|
968
|
+
const _onModalHide = () => {
|
|
969
|
+
onModalHide?.();
|
|
970
|
+
setModalOpen(false);
|
|
971
|
+
};
|
|
972
|
+
useEffect3(() => {
|
|
935
973
|
if (open) {
|
|
936
|
-
|
|
974
|
+
setModalOpen(true);
|
|
937
975
|
backdropOpacity.value = withTiming2(1, { duration: 300 });
|
|
938
976
|
contentTranslateY.value = withTiming2(0, { duration: 300 }, () => {
|
|
939
|
-
|
|
940
|
-
runOnJS2(onModalShow)();
|
|
941
|
-
}
|
|
977
|
+
runOnJS2(_onModalShow)();
|
|
942
978
|
});
|
|
943
979
|
} else {
|
|
980
|
+
setModalVisible(false);
|
|
944
981
|
backdropOpacity.value = withTiming2(0, { duration: 200 });
|
|
945
982
|
contentTranslateY.value = withTiming2(1e3, { duration: 200 }, () => {
|
|
946
|
-
runOnJS2(
|
|
947
|
-
if (onModalHide) {
|
|
948
|
-
runOnJS2(onModalHide)();
|
|
949
|
-
}
|
|
983
|
+
runOnJS2(_onModalHide)();
|
|
950
984
|
});
|
|
951
985
|
}
|
|
952
986
|
}, [open]);
|
|
@@ -956,7 +990,7 @@ var Popup = ({
|
|
|
956
990
|
const contentAnimatedStyle = useAnimatedStyle2(() => ({
|
|
957
991
|
transform: [{ translateY: contentTranslateY.value }]
|
|
958
992
|
}));
|
|
959
|
-
const
|
|
993
|
+
const styles = ScaledSheet7.create({
|
|
960
994
|
root: {
|
|
961
995
|
height: "100%",
|
|
962
996
|
width: "100%",
|
|
@@ -1016,17 +1050,17 @@ var Popup = ({
|
|
|
1016
1050
|
transparent: true,
|
|
1017
1051
|
animationType: "none",
|
|
1018
1052
|
statusBarTranslucent: true,
|
|
1019
|
-
visible:
|
|
1053
|
+
visible: modalOpen,
|
|
1020
1054
|
onRequestClose: closeAction
|
|
1021
1055
|
},
|
|
1022
|
-
/* @__PURE__ */ React11.createElement(UIThemeProvider, null, /* @__PURE__ */ React11.createElement(Animated2.View, { style: [
|
|
1056
|
+
/* @__PURE__ */ React11.createElement(UIThemeProvider, null, /* @__PURE__ */ React11.createElement(Animated2.View, { style: [styles.backdrop, backdropAnimatedStyle] }), /* @__PURE__ */ React11.createElement(
|
|
1023
1057
|
KeyboardAvoidingView2,
|
|
1024
1058
|
{
|
|
1025
|
-
style:
|
|
1059
|
+
style: styles.keyboardView,
|
|
1026
1060
|
behavior: Platform5.OS === "ios" ? "padding" : "height",
|
|
1027
1061
|
keyboardVerticalOffset: keyboardVerticalOffset || keyboardVerticalOffsetValue
|
|
1028
1062
|
},
|
|
1029
|
-
/* @__PURE__ */ React11.createElement(TouchableWithoutFeedback2, { onPress: Keyboard2.dismiss }, /* @__PURE__ */ React11.createElement(View5, { style:
|
|
1063
|
+
/* @__PURE__ */ React11.createElement(TouchableWithoutFeedback2, { onPress: Keyboard2.dismiss }, /* @__PURE__ */ React11.createElement(View5, { style: styles.root }, modalOpen && /* @__PURE__ */ React11.createElement(
|
|
1030
1064
|
Pressable,
|
|
1031
1065
|
{
|
|
1032
1066
|
style: [StyleSheet2.absoluteFill, { zIndex: 1 }],
|
|
@@ -1035,17 +1069,17 @@ var Popup = ({
|
|
|
1035
1069
|
), /* @__PURE__ */ React11.createElement(
|
|
1036
1070
|
Animated2.View,
|
|
1037
1071
|
{
|
|
1038
|
-
style: [
|
|
1039
|
-
layout: LinearTransition.springify().stiffness(200).mass(0.5).damping(100)
|
|
1072
|
+
style: [styles.avoidingView, contentAnimatedStyle],
|
|
1073
|
+
layout: modalVisible ? LinearTransition.springify().stiffness(200).mass(0.5).damping(100) : void 0
|
|
1040
1074
|
},
|
|
1041
|
-
/* @__PURE__ */ React11.createElement(View5, { style:
|
|
1075
|
+
/* @__PURE__ */ React11.createElement(View5, { style: styles.container }, !bare && /* @__PURE__ */ React11.createElement(View5, { style: styles.title }, /* @__PURE__ */ React11.createElement(View5, { style: styles.titleIcon }, /* @__PURE__ */ React11.createElement(
|
|
1042
1076
|
IconButton,
|
|
1043
1077
|
{
|
|
1044
1078
|
size: 20,
|
|
1045
1079
|
icon: "close",
|
|
1046
1080
|
onPress: closeAction
|
|
1047
1081
|
}
|
|
1048
|
-
)), /* @__PURE__ */ React11.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)), /* @__PURE__ */ React11.createElement(View5, { style:
|
|
1082
|
+
)), /* @__PURE__ */ React11.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)), /* @__PURE__ */ React11.createElement(View5, { style: styles.content }, children))
|
|
1049
1083
|
)))
|
|
1050
1084
|
))
|
|
1051
1085
|
);
|
|
@@ -1057,13 +1091,13 @@ var RatingStars = ({
|
|
|
1057
1091
|
size = 16
|
|
1058
1092
|
}) => {
|
|
1059
1093
|
const colors2 = useColors();
|
|
1060
|
-
const
|
|
1094
|
+
const styles = ScaledSheet8.create({
|
|
1061
1095
|
root: {
|
|
1062
1096
|
flexDirection: "row",
|
|
1063
1097
|
alignItems: "center"
|
|
1064
1098
|
}
|
|
1065
1099
|
});
|
|
1066
|
-
return /* @__PURE__ */ React.createElement(View6, { style:
|
|
1100
|
+
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(
|
|
1067
1101
|
Ionicons2,
|
|
1068
1102
|
{
|
|
1069
1103
|
key: index,
|
|
@@ -1083,7 +1117,7 @@ var RatingInput = ({
|
|
|
1083
1117
|
const colors2 = useColors();
|
|
1084
1118
|
const [loading, setLoading] = useState4(false);
|
|
1085
1119
|
const [review, setReview] = useState4("");
|
|
1086
|
-
const
|
|
1120
|
+
const styles = ScaledSheet8.create({
|
|
1087
1121
|
root: {
|
|
1088
1122
|
flexDirection: "row",
|
|
1089
1123
|
alignItems: "center"
|
|
@@ -1100,7 +1134,7 @@ var RatingInput = ({
|
|
|
1100
1134
|
height: "100@vs"
|
|
1101
1135
|
}
|
|
1102
1136
|
});
|
|
1103
|
-
|
|
1137
|
+
useEffect4(() => {
|
|
1104
1138
|
setRate(rating);
|
|
1105
1139
|
}, [rating]);
|
|
1106
1140
|
const onRate = (index) => {
|
|
@@ -1116,7 +1150,7 @@ var RatingInput = ({
|
|
|
1116
1150
|
_onSubmit && await _onSubmit({ rating: rate, review });
|
|
1117
1151
|
setLoading(false);
|
|
1118
1152
|
};
|
|
1119
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(View6, { style:
|
|
1153
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(View6, { style: styles.root }, loading ? /* @__PURE__ */ React.createElement(ActivityIndicator2, null) : [...Array(5)].map((_, index) => /* @__PURE__ */ React.createElement(
|
|
1120
1154
|
TouchableOpacity4,
|
|
1121
1155
|
{
|
|
1122
1156
|
key: index,
|
|
@@ -1163,10 +1197,10 @@ var RatingInput = ({
|
|
|
1163
1197
|
},
|
|
1164
1198
|
"Add to your review"
|
|
1165
1199
|
),
|
|
1166
|
-
/* @__PURE__ */ React.createElement(View6, { style:
|
|
1200
|
+
/* @__PURE__ */ React.createElement(View6, { style: styles.inputCon }, /* @__PURE__ */ React.createElement(
|
|
1167
1201
|
TextInput,
|
|
1168
1202
|
{
|
|
1169
|
-
style:
|
|
1203
|
+
style: styles.input,
|
|
1170
1204
|
multiline: true,
|
|
1171
1205
|
value: review,
|
|
1172
1206
|
onChangeText: (text) => setReview(text),
|
|
@@ -1199,33 +1233,33 @@ var GridItem = ({
|
|
|
1199
1233
|
spacing = 1,
|
|
1200
1234
|
style = {}
|
|
1201
1235
|
}) => {
|
|
1202
|
-
const
|
|
1236
|
+
const styles = ScaledSheet9.create({
|
|
1203
1237
|
gridItem: {
|
|
1204
1238
|
width: `${100 / col}%`,
|
|
1205
1239
|
padding: ms6(spacing * 10),
|
|
1206
1240
|
alignItems
|
|
1207
1241
|
}
|
|
1208
1242
|
});
|
|
1209
|
-
return /* @__PURE__ */ React12.createElement(View7, { children, style: [
|
|
1243
|
+
return /* @__PURE__ */ React12.createElement(View7, { children, style: [styles.gridItem, style] });
|
|
1210
1244
|
};
|
|
1211
1245
|
var Grid = ({
|
|
1212
1246
|
children,
|
|
1213
1247
|
spacing = 1,
|
|
1214
1248
|
style = {}
|
|
1215
1249
|
}) => {
|
|
1216
|
-
const
|
|
1250
|
+
const styles = ScaledSheet9.create({
|
|
1217
1251
|
grid: {
|
|
1218
1252
|
flexWrap: "wrap",
|
|
1219
1253
|
margin: `${-spacing * 10}@ms`,
|
|
1220
1254
|
flexDirection: "row"
|
|
1221
1255
|
}
|
|
1222
1256
|
});
|
|
1223
|
-
return /* @__PURE__ */ React12.createElement(View7, { children, style: [
|
|
1257
|
+
return /* @__PURE__ */ React12.createElement(View7, { children, style: [styles.grid, style] });
|
|
1224
1258
|
};
|
|
1225
1259
|
|
|
1226
1260
|
// ../src/Components/Locator.tsx
|
|
1227
1261
|
import { Ionicons as Ionicons4 } from "@expo/vector-icons";
|
|
1228
|
-
import React16, { useEffect as
|
|
1262
|
+
import React16, { useEffect as useEffect5, useState as useState7 } from "react";
|
|
1229
1263
|
import { Alert, TouchableOpacity as TouchableOpacity8, View as View11 } from "react-native";
|
|
1230
1264
|
|
|
1231
1265
|
// ../src/Components/List.tsx
|
|
@@ -1242,7 +1276,7 @@ var ListItem = ({
|
|
|
1242
1276
|
children
|
|
1243
1277
|
}) => {
|
|
1244
1278
|
const colors2 = useColors();
|
|
1245
|
-
const
|
|
1279
|
+
const styles = ScaledSheet10.create({
|
|
1246
1280
|
root: {
|
|
1247
1281
|
flexDirection: "row",
|
|
1248
1282
|
alignItems: "center",
|
|
@@ -1255,7 +1289,7 @@ var ListItem = ({
|
|
|
1255
1289
|
return /* @__PURE__ */ React13.createElement(
|
|
1256
1290
|
View8,
|
|
1257
1291
|
null,
|
|
1258
|
-
/* @__PURE__ */ React13.createElement(TouchableOpacity5, { disabled: Boolean(!onPress), onPress }, /* @__PURE__ */ React13.createElement(View8, { style: { ...
|
|
1292
|
+
/* @__PURE__ */ React13.createElement(TouchableOpacity5, { disabled: Boolean(!onPress), onPress }, /* @__PURE__ */ React13.createElement(View8, { style: { ...styles.root, ...style } }, children, link && /* @__PURE__ */ React13.createElement(
|
|
1259
1293
|
MaterialIcons3,
|
|
1260
1294
|
{
|
|
1261
1295
|
color: colors2.white[5],
|
|
@@ -1281,8 +1315,8 @@ import {
|
|
|
1281
1315
|
// ../src/Components/SelectMenu.tsx
|
|
1282
1316
|
import { MaterialIcons as MaterialIcons4 } from "@expo/vector-icons";
|
|
1283
1317
|
import React14, { useCallback, useState as useState5 } from "react";
|
|
1284
|
-
import { FlatList,
|
|
1285
|
-
import { useSafeAreaInsets as
|
|
1318
|
+
import { FlatList, TouchableOpacity as TouchableOpacity6, View as View9 } from "react-native";
|
|
1319
|
+
import { useSafeAreaInsets as useSafeAreaInsets4 } from "react-native-safe-area-context";
|
|
1286
1320
|
import { ScaledSheet as ScaledSheet11 } from "react-native-size-matters";
|
|
1287
1321
|
var SelectMenu = ({
|
|
1288
1322
|
open = false,
|
|
@@ -1293,22 +1327,15 @@ var SelectMenu = ({
|
|
|
1293
1327
|
disableAutoClose = false,
|
|
1294
1328
|
label,
|
|
1295
1329
|
secondary,
|
|
1296
|
-
helperText
|
|
1330
|
+
helperText,
|
|
1331
|
+
searchEnabled = false,
|
|
1332
|
+
searchPlaceholder = "Search"
|
|
1297
1333
|
}) => {
|
|
1298
1334
|
const colors2 = useColors();
|
|
1299
|
-
const { bottom } =
|
|
1335
|
+
const { bottom } = useSafeAreaInsets4();
|
|
1300
1336
|
const [search, setSearch] = useState5("");
|
|
1301
|
-
const
|
|
1302
|
-
root: {
|
|
1303
|
-
backgroundColor: colors2.white[1],
|
|
1304
|
-
flex: 1
|
|
1305
|
-
},
|
|
1306
|
-
content: {
|
|
1307
|
-
flex: 1,
|
|
1308
|
-
paddingHorizontal: "10@ms"
|
|
1309
|
-
},
|
|
1337
|
+
const styles = ScaledSheet11.create({
|
|
1310
1338
|
header: {
|
|
1311
|
-
paddingTop: "80@ms",
|
|
1312
1339
|
marginBottom: "20@vs"
|
|
1313
1340
|
},
|
|
1314
1341
|
option: {
|
|
@@ -1318,11 +1345,6 @@ var SelectMenu = ({
|
|
|
1318
1345
|
flexDirection: "row",
|
|
1319
1346
|
alignItems: "center",
|
|
1320
1347
|
marginBottom: "10@vs"
|
|
1321
|
-
},
|
|
1322
|
-
footer: {
|
|
1323
|
-
paddingBottom: bottom,
|
|
1324
|
-
paddingHorizontal: "15@ms",
|
|
1325
|
-
paddingTop: "15@ms"
|
|
1326
1348
|
}
|
|
1327
1349
|
});
|
|
1328
1350
|
const renderItem = useCallback(
|
|
@@ -1330,7 +1352,7 @@ var SelectMenu = ({
|
|
|
1330
1352
|
TouchableOpacity6,
|
|
1331
1353
|
{
|
|
1332
1354
|
style: {
|
|
1333
|
-
...
|
|
1355
|
+
...styles.option,
|
|
1334
1356
|
backgroundColor: item.value === value ? colors2.blue.light + "22" : colors2.white[2]
|
|
1335
1357
|
},
|
|
1336
1358
|
onPress: () => {
|
|
@@ -1344,6 +1366,7 @@ var SelectMenu = ({
|
|
|
1344
1366
|
/* @__PURE__ */ React14.createElement(View9, { style: { flex: 1 } }, /* @__PURE__ */ React14.createElement(
|
|
1345
1367
|
Typography_default,
|
|
1346
1368
|
{
|
|
1369
|
+
variant: "body2",
|
|
1347
1370
|
style: {
|
|
1348
1371
|
color: item.value === value ? colors2.blue.light : colors2.black[2]
|
|
1349
1372
|
}
|
|
@@ -1372,10 +1395,10 @@ var SelectMenu = ({
|
|
|
1372
1395
|
),
|
|
1373
1396
|
[value, colors2]
|
|
1374
1397
|
);
|
|
1375
|
-
return /* @__PURE__ */ React14.createElement(
|
|
1398
|
+
return /* @__PURE__ */ React14.createElement(Popup, { open, onClose, title: label }, /* @__PURE__ */ React14.createElement(View9, { style: styles.content }, /* @__PURE__ */ React14.createElement(View9, { style: styles.header }, helperText && /* @__PURE__ */ React14.createElement(Typography_default, { variant: "body2", color: "textSecondary", gutterBottom: 5 }, helperText), searchEnabled && /* @__PURE__ */ React14.createElement(
|
|
1376
1399
|
TextField_default,
|
|
1377
1400
|
{
|
|
1378
|
-
label:
|
|
1401
|
+
label: searchPlaceholder,
|
|
1379
1402
|
value: search,
|
|
1380
1403
|
type: "search",
|
|
1381
1404
|
onChangeText: setSearch,
|
|
@@ -1386,21 +1409,13 @@ var SelectMenu = ({
|
|
|
1386
1409
|
{
|
|
1387
1410
|
removeClippedSubviews: true,
|
|
1388
1411
|
keyExtractor: (item) => item.value,
|
|
1412
|
+
bounces: false,
|
|
1389
1413
|
renderItem,
|
|
1390
1414
|
data: options.filter(
|
|
1391
1415
|
(item) => search.length > 1 ? item.label.toLowerCase().indexOf(search.toLowerCase()) > -1 : item
|
|
1392
1416
|
).sort((a, b) => a.label.localeCompare(b.label))
|
|
1393
1417
|
}
|
|
1394
|
-
))
|
|
1395
|
-
Button_default,
|
|
1396
|
-
{
|
|
1397
|
-
color: "error",
|
|
1398
|
-
variant: "outlined",
|
|
1399
|
-
fullWidth: true,
|
|
1400
|
-
title: "Close",
|
|
1401
|
-
onPress: onClose
|
|
1402
|
-
}
|
|
1403
|
-
))));
|
|
1418
|
+
)));
|
|
1404
1419
|
};
|
|
1405
1420
|
var SelectMenu_default = SelectMenu;
|
|
1406
1421
|
|
|
@@ -1430,6 +1445,7 @@ var TextField = ({
|
|
|
1430
1445
|
gutterBottom = 0,
|
|
1431
1446
|
end,
|
|
1432
1447
|
options,
|
|
1448
|
+
selectMenuProps,
|
|
1433
1449
|
...props
|
|
1434
1450
|
}) => {
|
|
1435
1451
|
const colors2 = useColors();
|
|
@@ -1453,7 +1469,7 @@ var TextField = ({
|
|
|
1453
1469
|
}).start();
|
|
1454
1470
|
}
|
|
1455
1471
|
}, [focused, value]);
|
|
1456
|
-
const
|
|
1472
|
+
const styles = ScaledSheet12.create({
|
|
1457
1473
|
root: {
|
|
1458
1474
|
marginBottom: ms7(gutterBottom),
|
|
1459
1475
|
width: "100%",
|
|
@@ -1535,13 +1551,13 @@ var TextField = ({
|
|
|
1535
1551
|
autoCapitalize: "none",
|
|
1536
1552
|
textContentType: "password"
|
|
1537
1553
|
} : {};
|
|
1538
|
-
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(View10, { style:
|
|
1554
|
+
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(View10, { style: styles.root }, /* @__PURE__ */ React15.createElement(
|
|
1539
1555
|
TouchableOpacity7,
|
|
1540
1556
|
{
|
|
1541
1557
|
onPress: () => setFocused(true),
|
|
1542
|
-
style:
|
|
1558
|
+
style: styles.container
|
|
1543
1559
|
},
|
|
1544
|
-
/* @__PURE__ */ React15.createElement(Animated3.Text, { style: { ...
|
|
1560
|
+
/* @__PURE__ */ React15.createElement(Animated3.Text, { style: { ...styles.label, top: labelAnim } }, label),
|
|
1545
1561
|
start,
|
|
1546
1562
|
options ? /* @__PURE__ */ React15.createElement(
|
|
1547
1563
|
View10,
|
|
@@ -1558,7 +1574,7 @@ var TextField = ({
|
|
|
1558
1574
|
},
|
|
1559
1575
|
options.find((cur) => cur.value === value)?.start
|
|
1560
1576
|
),
|
|
1561
|
-
/* @__PURE__ */ React15.createElement(Typography_default, { style:
|
|
1577
|
+
/* @__PURE__ */ React15.createElement(Typography_default, { style: styles.inputText }, options.find((cur) => cur.value === value)?.label)
|
|
1562
1578
|
) : /* @__PURE__ */ React15.createElement(
|
|
1563
1579
|
TextInput2,
|
|
1564
1580
|
{
|
|
@@ -1579,7 +1595,7 @@ var TextField = ({
|
|
|
1579
1595
|
placeholderTextColor: colors2.textSecondary.main,
|
|
1580
1596
|
...formProps,
|
|
1581
1597
|
...props,
|
|
1582
|
-
style:
|
|
1598
|
+
style: styles.input
|
|
1583
1599
|
}
|
|
1584
1600
|
),
|
|
1585
1601
|
end && /* @__PURE__ */ React15.createElement(
|
|
@@ -1613,11 +1629,11 @@ var TextField = ({
|
|
|
1613
1629
|
Typography_default,
|
|
1614
1630
|
{
|
|
1615
1631
|
color: "textSecondary",
|
|
1616
|
-
style:
|
|
1632
|
+
style: styles.helperText,
|
|
1617
1633
|
variant: "caption"
|
|
1618
1634
|
},
|
|
1619
1635
|
helperText
|
|
1620
|
-
), error && /* @__PURE__ */ React15.createElement(View10, { style:
|
|
1636
|
+
), error && /* @__PURE__ */ React15.createElement(View10, { style: styles.error }, /* @__PURE__ */ React15.createElement(MaterialIcons5, { name: "error", color: colors2.error.main, size: 16 }), /* @__PURE__ */ React15.createElement(Typography_default, { style: styles.errorText, color: "error" }, error))), options && /* @__PURE__ */ React15.createElement(
|
|
1621
1637
|
SelectMenu_default,
|
|
1622
1638
|
{
|
|
1623
1639
|
options,
|
|
@@ -1626,7 +1642,8 @@ var TextField = ({
|
|
|
1626
1642
|
onClose: () => setFocused(false),
|
|
1627
1643
|
label,
|
|
1628
1644
|
helperText,
|
|
1629
|
-
onChange: onChangeText
|
|
1645
|
+
onChange: onChangeText,
|
|
1646
|
+
...selectMenuProps
|
|
1630
1647
|
}
|
|
1631
1648
|
));
|
|
1632
1649
|
};
|
|
@@ -1657,6 +1674,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1657
1674
|
end,
|
|
1658
1675
|
options,
|
|
1659
1676
|
multiline,
|
|
1677
|
+
selectMenuProps,
|
|
1660
1678
|
...props
|
|
1661
1679
|
}, ref) => {
|
|
1662
1680
|
const colors2 = useColors();
|
|
@@ -1668,7 +1686,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1668
1686
|
const setFocused = (value2) => {
|
|
1669
1687
|
_setFocused(value2);
|
|
1670
1688
|
};
|
|
1671
|
-
const
|
|
1689
|
+
const styles = ScaledSheet12.create({
|
|
1672
1690
|
root: {
|
|
1673
1691
|
marginBottom: ms7(gutterBottom),
|
|
1674
1692
|
...style
|
|
@@ -1743,7 +1761,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1743
1761
|
autoCapitalize: "none",
|
|
1744
1762
|
textContentType: "password"
|
|
1745
1763
|
} : {};
|
|
1746
|
-
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(View10, { style:
|
|
1764
|
+
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(View10, { style: styles.root }, label && /* @__PURE__ */ React15.createElement(
|
|
1747
1765
|
Typography_default,
|
|
1748
1766
|
{
|
|
1749
1767
|
variant: "body2",
|
|
@@ -1756,10 +1774,10 @@ var TextField2 = React15.forwardRef(
|
|
|
1756
1774
|
TouchableOpacity7,
|
|
1757
1775
|
{
|
|
1758
1776
|
onPress: () => setFocused(true),
|
|
1759
|
-
style:
|
|
1777
|
+
style: styles.container
|
|
1760
1778
|
},
|
|
1761
1779
|
/* @__PURE__ */ React15.createElement(View10, { style: { marginTop: multiline ? 5 : 0 } }, start),
|
|
1762
|
-
options ? /* @__PURE__ */ React15.createElement(React15.Fragment, null, value ? /* @__PURE__ */ React15.createElement(Typography_default, { style:
|
|
1780
|
+
options ? /* @__PURE__ */ React15.createElement(React15.Fragment, null, value ? /* @__PURE__ */ React15.createElement(Typography_default, { style: styles.inputText }, options.find((cur) => cur.value === value)?.label) : /* @__PURE__ */ React15.createElement(Typography_default, { style: styles.placeholder }, placeholder), /* @__PURE__ */ React15.createElement(
|
|
1763
1781
|
Ionicons3,
|
|
1764
1782
|
{
|
|
1765
1783
|
name: "chevron-down",
|
|
@@ -1792,7 +1810,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1792
1810
|
extAlignVertical: multiline ? "top" : "center",
|
|
1793
1811
|
...formProps,
|
|
1794
1812
|
...props,
|
|
1795
|
-
style:
|
|
1813
|
+
style: styles.input
|
|
1796
1814
|
}
|
|
1797
1815
|
),
|
|
1798
1816
|
end ? /* @__PURE__ */ React15.createElement(View10, { style: { marginRight: 20 } }, end) : type === "password" && /* @__PURE__ */ React15.createElement(
|
|
@@ -1814,11 +1832,11 @@ var TextField2 = React15.forwardRef(
|
|
|
1814
1832
|
Typography_default,
|
|
1815
1833
|
{
|
|
1816
1834
|
color: "textSecondary",
|
|
1817
|
-
style:
|
|
1835
|
+
style: styles.helperText,
|
|
1818
1836
|
variant: "caption"
|
|
1819
1837
|
},
|
|
1820
1838
|
helperText
|
|
1821
|
-
), error && /* @__PURE__ */ React15.createElement(View10, { style:
|
|
1839
|
+
), error && /* @__PURE__ */ React15.createElement(View10, { style: styles.error }, /* @__PURE__ */ React15.createElement(MaterialIcons5, { name: "error", color: colors2.error.main, size: 16 }), /* @__PURE__ */ React15.createElement(Typography_default, { style: styles.errorText, color: "error" }, error))), options && /* @__PURE__ */ React15.createElement(
|
|
1822
1840
|
SelectMenu_default,
|
|
1823
1841
|
{
|
|
1824
1842
|
options,
|
|
@@ -1827,7 +1845,8 @@ var TextField2 = React15.forwardRef(
|
|
|
1827
1845
|
onClose: () => setFocused(false),
|
|
1828
1846
|
label,
|
|
1829
1847
|
helperText,
|
|
1830
|
-
onChange: onChangeText
|
|
1848
|
+
onChange: onChangeText,
|
|
1849
|
+
...selectMenuProps
|
|
1831
1850
|
}
|
|
1832
1851
|
));
|
|
1833
1852
|
}
|
|
@@ -1899,7 +1918,7 @@ var Locator = ({
|
|
|
1899
1918
|
const [value, setValue] = useState7("");
|
|
1900
1919
|
const [prediction, setPrediction] = useState7([]);
|
|
1901
1920
|
const colors2 = useColors();
|
|
1902
|
-
const
|
|
1921
|
+
const styles = ScaledSheet13.create({
|
|
1903
1922
|
list: {
|
|
1904
1923
|
backgroundColor: colors2.white[2],
|
|
1905
1924
|
elevation: 10,
|
|
@@ -1967,7 +1986,7 @@ var Locator = ({
|
|
|
1967
1986
|
setChanged(false);
|
|
1968
1987
|
setPrediction([]);
|
|
1969
1988
|
};
|
|
1970
|
-
|
|
1989
|
+
useEffect5(() => {
|
|
1971
1990
|
if (!GOOGLE_MAP_API_KEY)
|
|
1972
1991
|
console.error(
|
|
1973
1992
|
"Google map api key needs to be set to use this component \nMake sure to run initialize() with a valid google map api key"
|
|
@@ -2013,7 +2032,7 @@ var Locator = ({
|
|
|
2013
2032
|
}
|
|
2014
2033
|
)), /* @__PURE__ */ React16.createElement(TouchableOpacity8, { onPress: clear }, /* @__PURE__ */ React16.createElement(Ionicons4, { color: colors2.dark.main, size: 18, name: "close" })))
|
|
2015
2034
|
}
|
|
2016
|
-
), prediction.length > 0 && /* @__PURE__ */ React16.createElement(View11, { style:
|
|
2035
|
+
), prediction.length > 0 && /* @__PURE__ */ React16.createElement(View11, { style: styles.list }, prediction.map(
|
|
2017
2036
|
(cur, i) => i < 5 && /* @__PURE__ */ React16.createElement(
|
|
2018
2037
|
ListItem,
|
|
2019
2038
|
{
|
|
@@ -2037,25 +2056,26 @@ var Locator = ({
|
|
|
2037
2056
|
};
|
|
2038
2057
|
|
|
2039
2058
|
// ../src/Components/SafeAreaView.tsx
|
|
2040
|
-
import { SafeAreaView as Safe } from "react-native";
|
|
2041
2059
|
import React17 from "react";
|
|
2042
|
-
import {
|
|
2043
|
-
import {
|
|
2044
|
-
var styles = StyleSheet3.create({
|
|
2045
|
-
droidSafeArea: {
|
|
2046
|
-
flex: 1,
|
|
2047
|
-
paddingTop: Platform6.OS === "android" ? moderateScale4(35) : 0
|
|
2048
|
-
}
|
|
2049
|
-
});
|
|
2060
|
+
import { useSafeAreaInsets as useSafeAreaInsets5 } from "react-native-safe-area-context";
|
|
2061
|
+
import { StyleSheet as StyleSheet3, View as View12 } from "react-native";
|
|
2050
2062
|
var SafeAreaView = ({
|
|
2051
2063
|
children,
|
|
2052
2064
|
style
|
|
2053
2065
|
}) => {
|
|
2054
|
-
|
|
2066
|
+
const { top, bottom } = useSafeAreaInsets5();
|
|
2067
|
+
const styles = StyleSheet3.create({
|
|
2068
|
+
root: {
|
|
2069
|
+
paddingTop: top,
|
|
2070
|
+
paddingBottom: bottom,
|
|
2071
|
+
flex: 1
|
|
2072
|
+
}
|
|
2073
|
+
});
|
|
2074
|
+
return /* @__PURE__ */ React17.createElement(View12, { style: [styles.root, style] }, children);
|
|
2055
2075
|
};
|
|
2056
2076
|
|
|
2057
2077
|
// ../src/Components/Divider.tsx
|
|
2058
|
-
import { View as
|
|
2078
|
+
import { View as View13 } from "react-native";
|
|
2059
2079
|
import { ScaledSheet as ScaledSheet14, ms as ms8 } from "react-native-size-matters";
|
|
2060
2080
|
var Divider = ({
|
|
2061
2081
|
height = 1,
|
|
@@ -2064,7 +2084,7 @@ var Divider = ({
|
|
|
2064
2084
|
style
|
|
2065
2085
|
}) => {
|
|
2066
2086
|
const colors2 = useColors();
|
|
2067
|
-
const
|
|
2087
|
+
const styles = ScaledSheet14.create({
|
|
2068
2088
|
root: {
|
|
2069
2089
|
height,
|
|
2070
2090
|
backgroundColor: colors2[color].main,
|
|
@@ -2072,12 +2092,12 @@ var Divider = ({
|
|
|
2072
2092
|
...style
|
|
2073
2093
|
}
|
|
2074
2094
|
});
|
|
2075
|
-
return /* @__PURE__ */ React.createElement(
|
|
2095
|
+
return /* @__PURE__ */ React.createElement(View13, { style: styles.root });
|
|
2076
2096
|
};
|
|
2077
2097
|
|
|
2078
2098
|
// ../src/Components/Spinner.tsx
|
|
2079
2099
|
import React18 from "react";
|
|
2080
|
-
import { ActivityIndicator as ActivityIndicator3, Dimensions
|
|
2100
|
+
import { ActivityIndicator as ActivityIndicator3, Dimensions, View as View14 } from "react-native";
|
|
2081
2101
|
import { ScaledSheet as ScaledSheet15 } from "react-native-size-matters";
|
|
2082
2102
|
var Spinner = ({
|
|
2083
2103
|
label,
|
|
@@ -2087,10 +2107,10 @@ var Spinner = ({
|
|
|
2087
2107
|
style = {}
|
|
2088
2108
|
}) => {
|
|
2089
2109
|
const colors2 = useColors();
|
|
2090
|
-
const
|
|
2110
|
+
const styles = ScaledSheet15.create({
|
|
2091
2111
|
root: {
|
|
2092
|
-
width: fullscreen ?
|
|
2093
|
-
height: fullscreen ?
|
|
2112
|
+
width: fullscreen ? Dimensions.get("screen").width : "100%",
|
|
2113
|
+
height: fullscreen ? Dimensions.get("screen").height : "100%",
|
|
2094
2114
|
left: 0,
|
|
2095
2115
|
bottom: 0,
|
|
2096
2116
|
zIndex: 100,
|
|
@@ -2113,7 +2133,7 @@ var Spinner = ({
|
|
|
2113
2133
|
color: color === "light" ? colors2.white[2] : colors2.black[4]
|
|
2114
2134
|
}
|
|
2115
2135
|
});
|
|
2116
|
-
return /* @__PURE__ */ React18.createElement(
|
|
2136
|
+
return /* @__PURE__ */ React18.createElement(View14, { style: styles.root }, /* @__PURE__ */ React18.createElement(View14, { style: styles.content }, /* @__PURE__ */ React18.createElement(ActivityIndicator3, { color: colors2[color].dark, size }), label && /* @__PURE__ */ React18.createElement(Typography_default, { style: styles.label }, label)));
|
|
2117
2137
|
};
|
|
2118
2138
|
var Spinner_default = Spinner;
|
|
2119
2139
|
|
|
@@ -2121,7 +2141,7 @@ var Spinner_default = Spinner;
|
|
|
2121
2141
|
import React19, { useMemo } from "react";
|
|
2122
2142
|
import {
|
|
2123
2143
|
TextInput as TextInput3,
|
|
2124
|
-
View as
|
|
2144
|
+
View as View15
|
|
2125
2145
|
} from "react-native";
|
|
2126
2146
|
import { ScaledSheet as ScaledSheet16, ms as ms9 } from "react-native-size-matters";
|
|
2127
2147
|
var OTPInput = ({
|
|
@@ -2166,7 +2186,7 @@ var OTPInput = ({
|
|
|
2166
2186
|
}
|
|
2167
2187
|
};
|
|
2168
2188
|
const colors2 = useColors();
|
|
2169
|
-
const
|
|
2189
|
+
const styles = ScaledSheet16.create({
|
|
2170
2190
|
root: {},
|
|
2171
2191
|
container: { flexDirection: "row" },
|
|
2172
2192
|
input: {
|
|
@@ -2183,7 +2203,7 @@ var OTPInput = ({
|
|
|
2183
2203
|
fontSize: ms9(size * 0.5)
|
|
2184
2204
|
}
|
|
2185
2205
|
});
|
|
2186
|
-
return /* @__PURE__ */ React19.createElement(
|
|
2206
|
+
return /* @__PURE__ */ React19.createElement(View15, { style: styles.root }, /* @__PURE__ */ React19.createElement(View15, { style: styles.container }, [...Array(length)].map((_, index) => /* @__PURE__ */ React19.createElement(
|
|
2187
2207
|
TextInput3,
|
|
2188
2208
|
{
|
|
2189
2209
|
ref: inputRefs[index],
|
|
@@ -2192,7 +2212,7 @@ var OTPInput = ({
|
|
|
2192
2212
|
blurOnSubmit: false,
|
|
2193
2213
|
keyboardType: "number-pad",
|
|
2194
2214
|
key: index,
|
|
2195
|
-
style: [
|
|
2215
|
+
style: [styles.input]
|
|
2196
2216
|
}
|
|
2197
2217
|
))));
|
|
2198
2218
|
};
|
|
@@ -2234,6 +2254,7 @@ export {
|
|
|
2234
2254
|
showFlashMessage,
|
|
2235
2255
|
useColors,
|
|
2236
2256
|
useNavScreenOptions,
|
|
2237
|
-
useTheme
|
|
2257
|
+
useTheme,
|
|
2258
|
+
useThemeContext
|
|
2238
2259
|
};
|
|
2239
2260
|
//# sourceMappingURL=index.mjs.map
|