@hoddy-ui/next 2.0.46 → 2.0.48
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 +102 -37
- package/dist/index.d.ts +102 -37
- package/dist/index.js +165 -101
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +204 -133
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
package/dist/index.mjs
CHANGED
|
@@ -161,7 +161,7 @@ function initialize(config2) {
|
|
|
161
161
|
try {
|
|
162
162
|
setConfig({
|
|
163
163
|
GOOGLE_MAP_API_KEY: config2.googleMapApiKey,
|
|
164
|
-
|
|
164
|
+
TYPOGRAPHY: config2.typography,
|
|
165
165
|
EDGE_TO_EDGE: config2.edgeToEdge ?? false
|
|
166
166
|
});
|
|
167
167
|
if (config2.colors)
|
|
@@ -185,42 +185,51 @@ import { vs } from "react-native-size-matters";
|
|
|
185
185
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
186
186
|
import * as NavigationBar from "expo-navigation-bar";
|
|
187
187
|
import * as SystemUI from "expo-system-ui";
|
|
188
|
-
import React4, { createContext, useEffect
|
|
188
|
+
import React4, { createContext, useEffect, useReducer } from "react";
|
|
189
189
|
import { Platform, useColorScheme } from "react-native";
|
|
190
190
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
191
191
|
|
|
192
192
|
// ../src/Components/FlashMessage.tsx
|
|
193
|
-
import React3, {
|
|
194
|
-
import {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
193
|
+
import React3, { useRef, useState } from "react";
|
|
194
|
+
import { TouchableOpacity, View } from "react-native";
|
|
195
|
+
import Animated, {
|
|
196
|
+
runOnJS,
|
|
197
|
+
useAnimatedStyle,
|
|
198
|
+
useSharedValue,
|
|
199
|
+
withTiming
|
|
200
|
+
} from "react-native-reanimated";
|
|
199
201
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
200
202
|
import { ScaledSheet } from "react-native-size-matters";
|
|
201
203
|
|
|
202
204
|
// ../src/Components/Typography.tsx
|
|
203
205
|
import React2, { forwardRef } from "react";
|
|
204
206
|
import { StyleSheet, Text } from "react-native";
|
|
205
|
-
import { moderateScale,
|
|
207
|
+
import { moderateScale, ms } from "react-native-size-matters";
|
|
208
|
+
|
|
209
|
+
// ../src/utility.ts
|
|
210
|
+
var getFontFamily = (fontWeight) => {
|
|
211
|
+
return getConfig().TYPOGRAPHY?.fontWeights?.[fontWeight] || getConfig().TYPOGRAPHY?.fontFamily || void 0;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
// ../src/Components/Typography.tsx
|
|
206
215
|
var Typography = forwardRef(
|
|
207
216
|
({
|
|
208
217
|
children,
|
|
209
218
|
color = "dark",
|
|
210
219
|
style = {},
|
|
211
|
-
textCase
|
|
220
|
+
textCase,
|
|
212
221
|
variant = "body1",
|
|
213
222
|
align = "left",
|
|
214
223
|
gutterBottom = 0,
|
|
215
|
-
numberOfLines,
|
|
216
224
|
adjustsFontSizeToFit,
|
|
217
225
|
fontWeight = 400,
|
|
218
226
|
fontFamily,
|
|
219
227
|
// NEW PROP ADDED
|
|
228
|
+
fontSize,
|
|
220
229
|
...props
|
|
221
230
|
}, ref) => {
|
|
222
231
|
const colors2 = useColors();
|
|
223
|
-
const
|
|
232
|
+
const _fontSize = {
|
|
224
233
|
h1: moderateScale(42),
|
|
225
234
|
h2: moderateScale(37),
|
|
226
235
|
h3: moderateScale(32),
|
|
@@ -233,15 +242,14 @@ var Typography = forwardRef(
|
|
|
233
242
|
};
|
|
234
243
|
const styles2 = StyleSheet.create({
|
|
235
244
|
text: {
|
|
236
|
-
fontSize: fontSize[variant],
|
|
237
|
-
marginBottom:
|
|
245
|
+
fontSize: fontSize || _fontSize[variant],
|
|
246
|
+
marginBottom: ms(gutterBottom) || 0,
|
|
238
247
|
color: colors2[color]?.main || color,
|
|
239
248
|
textTransform: textCase,
|
|
240
249
|
alignItems: "center",
|
|
241
250
|
textAlign: align,
|
|
242
251
|
fontWeight,
|
|
243
|
-
fontFamily: fontFamily ||
|
|
244
|
-
// Use custom font if provided, else default
|
|
252
|
+
fontFamily: fontFamily || getFontFamily(fontWeight)
|
|
245
253
|
}
|
|
246
254
|
});
|
|
247
255
|
return /* @__PURE__ */ React2.createElement(
|
|
@@ -264,28 +272,53 @@ var showFlashMessage = () => {
|
|
|
264
272
|
var FlashMessage = () => {
|
|
265
273
|
const { top } = useSafeAreaInsets();
|
|
266
274
|
const [message, setMessage] = useState(null);
|
|
267
|
-
const [show, setShow] = useState(false);
|
|
268
275
|
const colors2 = useColors();
|
|
269
276
|
const type = message?.type || "success";
|
|
277
|
+
const timeoutRef = useRef(null);
|
|
278
|
+
const translateY = useSharedValue(-200);
|
|
279
|
+
const opacity = useSharedValue(0);
|
|
280
|
+
const hideMessage = () => {
|
|
281
|
+
setMessage(null);
|
|
282
|
+
};
|
|
283
|
+
const closeMessage = () => {
|
|
284
|
+
if (timeoutRef.current) {
|
|
285
|
+
clearTimeout(timeoutRef.current);
|
|
286
|
+
timeoutRef.current = null;
|
|
287
|
+
}
|
|
288
|
+
translateY.value = withTiming(-200, { duration: 300 });
|
|
289
|
+
opacity.value = withTiming(0, { duration: 300 }, () => {
|
|
290
|
+
runOnJS(hideMessage)();
|
|
291
|
+
});
|
|
292
|
+
};
|
|
270
293
|
showFlashMessage = (msg) => {
|
|
294
|
+
if (timeoutRef.current) {
|
|
295
|
+
clearTimeout(timeoutRef.current);
|
|
296
|
+
timeoutRef.current = null;
|
|
297
|
+
}
|
|
298
|
+
translateY.value = -200;
|
|
299
|
+
opacity.value = 0;
|
|
271
300
|
setMessage(msg);
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
setTimeout(() => {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
280
|
-
|
|
301
|
+
translateY.value = withTiming(0, { duration: 300 });
|
|
302
|
+
opacity.value = withTiming(1, { duration: 300 });
|
|
303
|
+
const duration = msg.duration || 3e3;
|
|
304
|
+
timeoutRef.current = setTimeout(() => {
|
|
305
|
+
translateY.value = withTiming(-200, { duration: 300 });
|
|
306
|
+
opacity.value = withTiming(0, { duration: 300 }, () => {
|
|
307
|
+
runOnJS(hideMessage)();
|
|
308
|
+
});
|
|
309
|
+
timeoutRef.current = null;
|
|
310
|
+
}, duration);
|
|
281
311
|
};
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
312
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
313
|
+
return {
|
|
314
|
+
transform: [{ translateY: translateY.value }],
|
|
315
|
+
opacity: opacity.value
|
|
316
|
+
};
|
|
317
|
+
});
|
|
285
318
|
const styles2 = ScaledSheet.create({
|
|
286
319
|
root: {
|
|
287
320
|
position: "absolute",
|
|
288
|
-
top:
|
|
321
|
+
top: 0,
|
|
289
322
|
zIndex: 1e3,
|
|
290
323
|
left: 0,
|
|
291
324
|
paddingTop: top + 10,
|
|
@@ -306,7 +339,9 @@ var FlashMessage = () => {
|
|
|
306
339
|
backgroundColor: "#fff3"
|
|
307
340
|
}
|
|
308
341
|
});
|
|
309
|
-
|
|
342
|
+
if (!message)
|
|
343
|
+
return null;
|
|
344
|
+
return /* @__PURE__ */ React3.createElement(Animated.View, { style: [styles2.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(
|
|
310
345
|
Typography_default,
|
|
311
346
|
{
|
|
312
347
|
variant: "h6",
|
|
@@ -315,7 +350,18 @@ var FlashMessage = () => {
|
|
|
315
350
|
style: { color: "#fff" }
|
|
316
351
|
},
|
|
317
352
|
message?.title
|
|
318
|
-
), /* @__PURE__ */ React3.createElement(Typography_default, { style: { color: "#fff" } }, message?.message))), message?.actions?.map((cur, i) => /* @__PURE__ */ React3.createElement(
|
|
353
|
+
), /* @__PURE__ */ React3.createElement(Typography_default, { style: { color: "#fff" } }, message?.message)))), message?.actions?.map((cur, i) => /* @__PURE__ */ React3.createElement(
|
|
354
|
+
TouchableOpacity,
|
|
355
|
+
{
|
|
356
|
+
key: i,
|
|
357
|
+
style: styles2.action,
|
|
358
|
+
onPress: () => {
|
|
359
|
+
cur.onPress?.();
|
|
360
|
+
closeMessage();
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
/* @__PURE__ */ React3.createElement(Typography_default, { fontWeight: 700, style: { color: "#fff" } }, cur.title)
|
|
364
|
+
)));
|
|
319
365
|
};
|
|
320
366
|
var FlashMessage_default = FlashMessage;
|
|
321
367
|
|
|
@@ -338,7 +384,7 @@ function themeReducer(state, { type, payload }) {
|
|
|
338
384
|
var ConfigureSystemUI = () => {
|
|
339
385
|
const theme = useTheme();
|
|
340
386
|
const colors2 = useColors();
|
|
341
|
-
|
|
387
|
+
useEffect(() => {
|
|
342
388
|
const config2 = getConfig();
|
|
343
389
|
if (colors2) {
|
|
344
390
|
SystemUI.setBackgroundColorAsync(colors2.white[1]);
|
|
@@ -494,7 +540,7 @@ var AdaptiveStatusBarNext_default = AdaptiveStatusBar;
|
|
|
494
540
|
import { MaterialIcons } from "@expo/vector-icons";
|
|
495
541
|
import React6 from "react";
|
|
496
542
|
import { View as View2 } from "react-native";
|
|
497
|
-
import { ScaledSheet as ScaledSheet2 } from "react-native-size-matters";
|
|
543
|
+
import { ms as ms2, ScaledSheet as ScaledSheet2 } from "react-native-size-matters";
|
|
498
544
|
var AlertX = ({
|
|
499
545
|
type = "info",
|
|
500
546
|
variant = "contained",
|
|
@@ -512,7 +558,7 @@ var AlertX = ({
|
|
|
512
558
|
borderRadius: 8,
|
|
513
559
|
alignItems: "center",
|
|
514
560
|
flexDirection: "row",
|
|
515
|
-
marginBottom: gutterBottom
|
|
561
|
+
marginBottom: ms2(gutterBottom),
|
|
516
562
|
backgroundColor: colors2[type].main + (variant === "contained" ? "" : "3")
|
|
517
563
|
},
|
|
518
564
|
title: {
|
|
@@ -522,7 +568,7 @@ var AlertX = ({
|
|
|
522
568
|
color: variant === "contained" ? "#fff" : colors2[type].main
|
|
523
569
|
}
|
|
524
570
|
});
|
|
525
|
-
return /* @__PURE__ */ React6.createElement(View2, { style:
|
|
571
|
+
return /* @__PURE__ */ React6.createElement(View2, { style: [styles2.container, style] }, /* @__PURE__ */ React6.createElement(View2, { style: { width: "80%" } }, /* @__PURE__ */ React6.createElement(Typography_default, { style: styles2.title, gutterBottom: 3, fontWeight: 700 }, title), body && /* @__PURE__ */ React6.createElement(Typography_default, { fontWeight: 700, variant: "body2", style: styles2.body }, body)), /* @__PURE__ */ React6.createElement(View2, { style: { marginLeft: "auto" } }, /* @__PURE__ */ React6.createElement(
|
|
526
572
|
MaterialIcons,
|
|
527
573
|
{
|
|
528
574
|
color: variant === "contained" ? "#fff" : colors2[type].main,
|
|
@@ -537,7 +583,7 @@ var AlertX_default = AlertX;
|
|
|
537
583
|
import { AntDesign } from "@expo/vector-icons";
|
|
538
584
|
import React7 from "react";
|
|
539
585
|
import { Image, View as View3 } from "react-native";
|
|
540
|
-
import { ScaledSheet as ScaledSheet3 } from "react-native-size-matters";
|
|
586
|
+
import { ms as ms3, ScaledSheet as ScaledSheet3 } from "react-native-size-matters";
|
|
541
587
|
var Avatar = ({
|
|
542
588
|
color = "dark",
|
|
543
589
|
label,
|
|
@@ -550,14 +596,14 @@ var Avatar = ({
|
|
|
550
596
|
const styles2 = ScaledSheet3.create({
|
|
551
597
|
root: {
|
|
552
598
|
borderRadius: 150,
|
|
553
|
-
height: size
|
|
554
|
-
width: size
|
|
599
|
+
height: ms3(size),
|
|
600
|
+
width: ms3(size),
|
|
555
601
|
alignItems: "center",
|
|
556
602
|
justifyContent: "center",
|
|
557
603
|
overflow: "hidden",
|
|
558
604
|
borderWidth: variant === "outlined" ? 5 : 0,
|
|
559
605
|
borderColor: variant === "outlined" ? "#fff" : "#0000",
|
|
560
|
-
backgroundColor: variant === "outlined" ?
|
|
606
|
+
backgroundColor: variant === "outlined" ? void 0 : label ? colors2[color].main : colors2.white[4],
|
|
561
607
|
...style
|
|
562
608
|
},
|
|
563
609
|
image: {
|
|
@@ -573,13 +619,13 @@ var Avatar_default = Avatar;
|
|
|
573
619
|
import { Ionicons, MaterialIcons as MaterialIcons2 } from "@expo/vector-icons";
|
|
574
620
|
import React8, { forwardRef as forwardRef2 } from "react";
|
|
575
621
|
import { ActivityIndicator, Text as Text2, TouchableOpacity as TouchableOpacity2 } from "react-native";
|
|
576
|
-
import { ScaledSheet as ScaledSheet4, moderateScale as moderateScale2 } from "react-native-size-matters";
|
|
622
|
+
import { ScaledSheet as ScaledSheet4, moderateScale as moderateScale2, ms as ms4 } from "react-native-size-matters";
|
|
577
623
|
var LinkButton = ({
|
|
578
624
|
title,
|
|
579
625
|
style = {},
|
|
580
626
|
color = "blue",
|
|
581
627
|
fontSize = 12,
|
|
582
|
-
fontWeight =
|
|
628
|
+
fontWeight = 400,
|
|
583
629
|
disabled,
|
|
584
630
|
onPress = () => {
|
|
585
631
|
}
|
|
@@ -588,8 +634,8 @@ var LinkButton = ({
|
|
|
588
634
|
const styles2 = ScaledSheet4.create({
|
|
589
635
|
text: {
|
|
590
636
|
fontSize: moderateScale2(fontSize),
|
|
591
|
-
fontWeight,
|
|
592
|
-
fontFamily:
|
|
637
|
+
fontWeight: fontWeight.toString(),
|
|
638
|
+
fontFamily: getFontFamily(fontWeight),
|
|
593
639
|
color: disabled ? "#777" : colors2[color].main
|
|
594
640
|
}
|
|
595
641
|
});
|
|
@@ -615,7 +661,7 @@ var IconButton = ({
|
|
|
615
661
|
container: {
|
|
616
662
|
alignSelf: "flex-start",
|
|
617
663
|
flexGrow: 0,
|
|
618
|
-
backgroundColor: bg ? bgColor : elevation > 0 ? bgColor :
|
|
664
|
+
backgroundColor: bg ? bgColor : elevation > 0 ? bgColor : void 0,
|
|
619
665
|
padding: "5@ms",
|
|
620
666
|
shadowColor: "#000",
|
|
621
667
|
shadowOpacity: 0.1,
|
|
@@ -623,8 +669,8 @@ var IconButton = ({
|
|
|
623
669
|
height: 1,
|
|
624
670
|
width: 0
|
|
625
671
|
},
|
|
626
|
-
height: bg ? size + 20
|
|
627
|
-
width: bg ? size + 20
|
|
672
|
+
height: bg ? ms4(size + 20) : void 0,
|
|
673
|
+
width: bg ? ms4(size + 20) : void 0,
|
|
628
674
|
alignItems: "center",
|
|
629
675
|
justifyContent: "center",
|
|
630
676
|
shadowRadius: elevation,
|
|
@@ -675,10 +721,10 @@ var Button = forwardRef2(
|
|
|
675
721
|
alignItems: "center",
|
|
676
722
|
alignSelf: "flex-start",
|
|
677
723
|
justifyContent: "center",
|
|
678
|
-
backgroundColor: variant === "text" || variant === "outlined" ?
|
|
724
|
+
backgroundColor: variant === "text" || variant === "outlined" ? void 0 : translucent ? translucent === "dark" ? colors2.white[3] + "22" : colors2.black[3] + "22" : loading ? colors2[color].light : disabled ? colors2.white[4] : colors2[color].main,
|
|
679
725
|
borderRadius: rounded ? 30 : 10,
|
|
680
726
|
elevation: variant === "text" ? 0 : elevation,
|
|
681
|
-
paddingVertical: size === "small" ? 8 : size === "large" ? "15@
|
|
727
|
+
paddingVertical: size === "small" ? 8 : size === "large" ? "15@mvs" : "13@mvs",
|
|
682
728
|
paddingHorizontal: size === "small" ? "10@ms" : "18@ms",
|
|
683
729
|
borderColor: colors2[color].main,
|
|
684
730
|
borderWidth: variant === "outlined" ? 1 : 0,
|
|
@@ -690,14 +736,14 @@ var Button = forwardRef2(
|
|
|
690
736
|
width: 0
|
|
691
737
|
},
|
|
692
738
|
shadowOpacity: variant === "text" ? 0 : 0.3,
|
|
693
|
-
width: fullWidth ? "100%" :
|
|
739
|
+
width: fullWidth ? "100%" : void 0,
|
|
694
740
|
...style
|
|
695
741
|
},
|
|
696
742
|
text: {
|
|
697
743
|
color: disabled ? variant === "text" || variant === "outlined" ? colors2.black[1] : colors2[color].text : colors2[color][variant === "text" || variant === "outlined" ? "main" : "text"],
|
|
698
744
|
fontWeight: variant === "outlined" ? "700" : "500",
|
|
699
|
-
fontSize: size === "small" ? "12@ms" : "
|
|
700
|
-
fontFamily:
|
|
745
|
+
fontSize: size === "small" ? "12@ms" : "13@ms",
|
|
746
|
+
fontFamily: getFontFamily(variant === "outlined" ? 700 : 500)
|
|
701
747
|
}
|
|
702
748
|
});
|
|
703
749
|
return /* @__PURE__ */ React8.createElement(
|
|
@@ -836,7 +882,14 @@ import {
|
|
|
836
882
|
TouchableWithoutFeedback as TouchableWithoutFeedback2,
|
|
837
883
|
View as View5
|
|
838
884
|
} from "react-native";
|
|
839
|
-
import React11, { useState as useState3 } from "react";
|
|
885
|
+
import React11, { useEffect as useEffect2, useState as useState3 } from "react";
|
|
886
|
+
import Animated2, {
|
|
887
|
+
LinearTransition,
|
|
888
|
+
runOnJS as runOnJS2,
|
|
889
|
+
useAnimatedStyle as useAnimatedStyle2,
|
|
890
|
+
useSharedValue as useSharedValue2,
|
|
891
|
+
withTiming as withTiming2
|
|
892
|
+
} from "react-native-reanimated";
|
|
840
893
|
import { ScaledSheet as ScaledSheet7 } from "react-native-size-matters";
|
|
841
894
|
var Popup = ({
|
|
842
895
|
title,
|
|
@@ -847,12 +900,40 @@ var Popup = ({
|
|
|
847
900
|
open,
|
|
848
901
|
onClose = () => {
|
|
849
902
|
},
|
|
850
|
-
style
|
|
903
|
+
style,
|
|
904
|
+
onModalShow,
|
|
905
|
+
onModalHide
|
|
851
906
|
}) => {
|
|
852
907
|
const theme = useTheme();
|
|
853
908
|
const colors2 = useColors();
|
|
854
|
-
const [
|
|
855
|
-
const
|
|
909
|
+
const [modalVisible, setModalVisible] = useState3(false);
|
|
910
|
+
const backdropOpacity = useSharedValue2(0);
|
|
911
|
+
const contentTranslateY = useSharedValue2(1e3);
|
|
912
|
+
useEffect2(() => {
|
|
913
|
+
if (open) {
|
|
914
|
+
setModalVisible(true);
|
|
915
|
+
backdropOpacity.value = withTiming2(1, { duration: 300 });
|
|
916
|
+
contentTranslateY.value = withTiming2(0, { duration: 300 }, () => {
|
|
917
|
+
if (onModalShow) {
|
|
918
|
+
runOnJS2(onModalShow)();
|
|
919
|
+
}
|
|
920
|
+
});
|
|
921
|
+
} else {
|
|
922
|
+
backdropOpacity.value = withTiming2(0, { duration: 200 });
|
|
923
|
+
contentTranslateY.value = withTiming2(1e3, { duration: 200 }, () => {
|
|
924
|
+
runOnJS2(setModalVisible)(false);
|
|
925
|
+
if (onModalHide) {
|
|
926
|
+
runOnJS2(onModalHide)();
|
|
927
|
+
}
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
}, [open]);
|
|
931
|
+
const backdropAnimatedStyle = useAnimatedStyle2(() => ({
|
|
932
|
+
opacity: backdropOpacity.value
|
|
933
|
+
}));
|
|
934
|
+
const contentAnimatedStyle = useAnimatedStyle2(() => ({
|
|
935
|
+
transform: [{ translateY: contentTranslateY.value }]
|
|
936
|
+
}));
|
|
856
937
|
const styles2 = ScaledSheet7.create({
|
|
857
938
|
root: {
|
|
858
939
|
height: "100%",
|
|
@@ -868,7 +949,7 @@ var Popup = ({
|
|
|
868
949
|
width: sheet ? "100%" : void 0
|
|
869
950
|
},
|
|
870
951
|
container: {
|
|
871
|
-
paddingBottom: sheet ? "30@ms" : 0,
|
|
952
|
+
paddingBottom: sheet ? "30@ms" : void 0,
|
|
872
953
|
backgroundColor: theme === "dark" ? "#111" : colors2.white[2],
|
|
873
954
|
borderTopLeftRadius: 20,
|
|
874
955
|
borderTopRightRadius: 20,
|
|
@@ -879,7 +960,6 @@ var Popup = ({
|
|
|
879
960
|
},
|
|
880
961
|
content: {
|
|
881
962
|
paddingHorizontal: bare ? void 0 : "15@ms"
|
|
882
|
-
// flex: 1,
|
|
883
963
|
},
|
|
884
964
|
title: {
|
|
885
965
|
flexDirection: "row",
|
|
@@ -894,71 +974,53 @@ var Popup = ({
|
|
|
894
974
|
backdrop: {
|
|
895
975
|
position: "absolute",
|
|
896
976
|
height: "100%",
|
|
897
|
-
zIndex:
|
|
977
|
+
zIndex: 1,
|
|
898
978
|
width: "100%",
|
|
899
979
|
backgroundColor: "#000b"
|
|
900
980
|
}
|
|
901
981
|
});
|
|
902
|
-
React11.useEffect(() => {
|
|
903
|
-
if (open) {
|
|
904
|
-
setShow(open);
|
|
905
|
-
setTimeout(() => {
|
|
906
|
-
setShowSecondary(open);
|
|
907
|
-
}, 500);
|
|
908
|
-
} else {
|
|
909
|
-
closeAction();
|
|
910
|
-
}
|
|
911
|
-
}, [open]);
|
|
912
982
|
const closeAction = () => {
|
|
913
|
-
|
|
914
|
-
setTimeout(() => {
|
|
915
|
-
setShow(false);
|
|
916
|
-
onClose();
|
|
917
|
-
}, 300);
|
|
983
|
+
onClose();
|
|
918
984
|
};
|
|
919
|
-
return /* @__PURE__ */ React11.createElement(
|
|
985
|
+
return /* @__PURE__ */ React11.createElement(
|
|
920
986
|
Modal,
|
|
921
987
|
{
|
|
922
988
|
transparent: true,
|
|
923
|
-
animationType: "
|
|
989
|
+
animationType: "none",
|
|
924
990
|
statusBarTranslucent: true,
|
|
925
|
-
visible:
|
|
991
|
+
visible: modalVisible,
|
|
926
992
|
onRequestClose: closeAction
|
|
927
993
|
},
|
|
928
|
-
/* @__PURE__ */ React11.createElement(View5, { style: styles2.backdrop }),
|
|
929
|
-
|
|
930
|
-
Modal,
|
|
994
|
+
/* @__PURE__ */ React11.createElement(UIThemeProvider, null, /* @__PURE__ */ React11.createElement(TouchableWithoutFeedback2, { onPress: Keyboard2.dismiss }, /* @__PURE__ */ React11.createElement(View5, { style: styles2.root }, /* @__PURE__ */ React11.createElement(Animated2.View, { style: [styles2.backdrop, backdropAnimatedStyle] }), open && /* @__PURE__ */ React11.createElement(
|
|
995
|
+
Pressable,
|
|
931
996
|
{
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
997
|
+
style: [StyleSheet2.absoluteFill, { zIndex: 2 }],
|
|
998
|
+
onPress: closeAction
|
|
999
|
+
}
|
|
1000
|
+
), /* @__PURE__ */ React11.createElement(Animated2.View, { style: [styles2.avoidingView, contentAnimatedStyle] }, /* @__PURE__ */ React11.createElement(
|
|
1001
|
+
KeyboardAvoidingView2,
|
|
1002
|
+
{
|
|
1003
|
+
keyboardVerticalOffset,
|
|
1004
|
+
behavior: Platform5.OS === "ios" ? "padding" : "padding"
|
|
937
1005
|
},
|
|
938
|
-
/* @__PURE__ */ React11.createElement(
|
|
939
|
-
|
|
940
|
-
{
|
|
941
|
-
style: StyleSheet2.absoluteFill,
|
|
942
|
-
onPress: closeAction
|
|
943
|
-
}
|
|
944
|
-
), /* @__PURE__ */ React11.createElement(
|
|
945
|
-
KeyboardAvoidingView2,
|
|
1006
|
+
/* @__PURE__ */ React11.createElement(
|
|
1007
|
+
Animated2.View,
|
|
946
1008
|
{
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
behavior: Platform5.OS === "ios" ? "position" : "padding"
|
|
1009
|
+
layout: LinearTransition,
|
|
1010
|
+
style: styles2.container
|
|
950
1011
|
},
|
|
951
|
-
|
|
1012
|
+
!bare && /* @__PURE__ */ React11.createElement(View5, { style: styles2.title }, /* @__PURE__ */ React11.createElement(View5, { style: styles2.titleIcon }, /* @__PURE__ */ React11.createElement(
|
|
952
1013
|
IconButton,
|
|
953
1014
|
{
|
|
954
1015
|
size: 20,
|
|
955
1016
|
icon: "close",
|
|
956
1017
|
onPress: closeAction
|
|
957
1018
|
}
|
|
958
|
-
)), /* @__PURE__ */ React11.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
1019
|
+
)), /* @__PURE__ */ React11.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
|
|
1020
|
+
/* @__PURE__ */ React11.createElement(View5, { style: styles2.content }, children)
|
|
1021
|
+
)
|
|
1022
|
+
)))))
|
|
1023
|
+
);
|
|
962
1024
|
};
|
|
963
1025
|
|
|
964
1026
|
// ../src/Components/StarRating.tsx
|
|
@@ -1099,9 +1161,9 @@ var RatingInput = ({
|
|
|
1099
1161
|
};
|
|
1100
1162
|
|
|
1101
1163
|
// ../src/Components/Grid.tsx
|
|
1102
|
-
import { View as View7 } from "react-native";
|
|
1103
1164
|
import React12 from "react";
|
|
1104
|
-
import {
|
|
1165
|
+
import { View as View7 } from "react-native";
|
|
1166
|
+
import { ms as ms5, ScaledSheet as ScaledSheet9 } from "react-native-size-matters";
|
|
1105
1167
|
var GridItem = ({
|
|
1106
1168
|
children,
|
|
1107
1169
|
col = 2,
|
|
@@ -1111,8 +1173,8 @@ var GridItem = ({
|
|
|
1111
1173
|
}) => {
|
|
1112
1174
|
const styles2 = ScaledSheet9.create({
|
|
1113
1175
|
gridItem: {
|
|
1114
|
-
width: 100 / col
|
|
1115
|
-
padding: spacing * 10
|
|
1176
|
+
width: `${100 / col}%`,
|
|
1177
|
+
padding: ms5(spacing * 10),
|
|
1116
1178
|
alignItems
|
|
1117
1179
|
}
|
|
1118
1180
|
});
|
|
@@ -1126,7 +1188,7 @@ var Grid = ({
|
|
|
1126
1188
|
const styles2 = ScaledSheet9.create({
|
|
1127
1189
|
grid: {
|
|
1128
1190
|
flexWrap: "wrap",
|
|
1129
|
-
margin: -spacing * 10
|
|
1191
|
+
margin: `${-spacing * 10}@ms`,
|
|
1130
1192
|
flexDirection: "row"
|
|
1131
1193
|
}
|
|
1132
1194
|
});
|
|
@@ -1179,12 +1241,12 @@ var ListItem = ({
|
|
|
1179
1241
|
|
|
1180
1242
|
// ../src/Components/TextField.tsx
|
|
1181
1243
|
import { Ionicons as Ionicons3, MaterialIcons as MaterialIcons5 } from "@expo/vector-icons";
|
|
1182
|
-
import React15, { useRef, useState as useState6 } from "react";
|
|
1183
|
-
import { Animated, TextInput as TextInput2, TouchableOpacity as TouchableOpacity7, View as View10 } from "react-native";
|
|
1244
|
+
import React15, { useRef as useRef2, useState as useState6 } from "react";
|
|
1245
|
+
import { Animated as Animated3, TextInput as TextInput2, TouchableOpacity as TouchableOpacity7, View as View10 } from "react-native";
|
|
1184
1246
|
import {
|
|
1185
1247
|
ScaledSheet as ScaledSheet12,
|
|
1186
1248
|
moderateScale as moderateScale3,
|
|
1187
|
-
ms,
|
|
1249
|
+
ms as ms6,
|
|
1188
1250
|
verticalScale as verticalScale2
|
|
1189
1251
|
} from "react-native-size-matters";
|
|
1190
1252
|
|
|
@@ -1345,18 +1407,18 @@ var TextField = ({
|
|
|
1345
1407
|
const colors2 = useColors();
|
|
1346
1408
|
const [focused, setFocused] = useState6(false);
|
|
1347
1409
|
const height = moderateScale3(variant === "text" ? 50 : 45) * (size === "large" ? 1.2 : size === "small" ? 0.8 : 1);
|
|
1348
|
-
const labelAnim =
|
|
1349
|
-
new
|
|
1410
|
+
const labelAnim = useRef2(
|
|
1411
|
+
new Animated3.Value(height / moderateScale3(variant === "text" ? 2.5 : 3.2))
|
|
1350
1412
|
).current;
|
|
1351
1413
|
React15.useEffect(() => {
|
|
1352
1414
|
if (focused || value) {
|
|
1353
|
-
|
|
1415
|
+
Animated3.timing(labelAnim, {
|
|
1354
1416
|
toValue: verticalScale2(variant === "text" ? 2 : 4),
|
|
1355
1417
|
duration: 300,
|
|
1356
1418
|
useNativeDriver: false
|
|
1357
1419
|
}).start();
|
|
1358
1420
|
} else {
|
|
1359
|
-
|
|
1421
|
+
Animated3.timing(labelAnim, {
|
|
1360
1422
|
toValue: height / moderateScale3(variant === "text" ? 2.5 : 3.2),
|
|
1361
1423
|
duration: 300,
|
|
1362
1424
|
useNativeDriver: false
|
|
@@ -1365,7 +1427,7 @@ var TextField = ({
|
|
|
1365
1427
|
}, [focused, value]);
|
|
1366
1428
|
const styles2 = ScaledSheet12.create({
|
|
1367
1429
|
root: {
|
|
1368
|
-
marginBottom: gutterBottom
|
|
1430
|
+
marginBottom: ms6(gutterBottom),
|
|
1369
1431
|
width: "100%",
|
|
1370
1432
|
...style
|
|
1371
1433
|
},
|
|
@@ -1389,7 +1451,7 @@ var TextField = ({
|
|
|
1389
1451
|
paddingLeft: variant === "text" ? 0 : moderateScale3(15),
|
|
1390
1452
|
paddingRight: moderateScale3(10),
|
|
1391
1453
|
paddingTop: "11@vs",
|
|
1392
|
-
fontFamily:
|
|
1454
|
+
fontFamily: getFontFamily(400),
|
|
1393
1455
|
color: colors2.black[1],
|
|
1394
1456
|
zIndex: 10
|
|
1395
1457
|
// backgroundColor: "#284",
|
|
@@ -1401,7 +1463,7 @@ var TextField = ({
|
|
|
1401
1463
|
paddingTop: "13@ms"
|
|
1402
1464
|
},
|
|
1403
1465
|
label: {
|
|
1404
|
-
fontFamily:
|
|
1466
|
+
fontFamily: getFontFamily(400),
|
|
1405
1467
|
position: "absolute",
|
|
1406
1468
|
left: variant === "text" ? 0 : moderateScale3(15),
|
|
1407
1469
|
fontSize: focused || value ? "10@s" : "13@s",
|
|
@@ -1451,7 +1513,7 @@ var TextField = ({
|
|
|
1451
1513
|
onPress: () => setFocused(true),
|
|
1452
1514
|
style: styles2.container
|
|
1453
1515
|
},
|
|
1454
|
-
/* @__PURE__ */ React15.createElement(
|
|
1516
|
+
/* @__PURE__ */ React15.createElement(Animated3.Text, { style: { ...styles2.label, top: labelAnim } }, label),
|
|
1455
1517
|
start,
|
|
1456
1518
|
options ? /* @__PURE__ */ React15.createElement(
|
|
1457
1519
|
View10,
|
|
@@ -1462,7 +1524,7 @@ var TextField = ({
|
|
|
1462
1524
|
View10,
|
|
1463
1525
|
{
|
|
1464
1526
|
style: {
|
|
1465
|
-
paddingTop: variant !== "outlined" ?
|
|
1527
|
+
paddingTop: variant !== "outlined" ? ms6(13) : 0,
|
|
1466
1528
|
paddingRight: 10
|
|
1467
1529
|
}
|
|
1468
1530
|
},
|
|
@@ -1497,7 +1559,7 @@ var TextField = ({
|
|
|
1497
1559
|
{
|
|
1498
1560
|
style: {
|
|
1499
1561
|
marginRight: 20,
|
|
1500
|
-
paddingTop: variant === "text" ?
|
|
1562
|
+
paddingTop: variant === "text" ? ms6(13) : 0
|
|
1501
1563
|
}
|
|
1502
1564
|
},
|
|
1503
1565
|
end
|
|
@@ -1507,7 +1569,7 @@ var TextField = ({
|
|
|
1507
1569
|
{
|
|
1508
1570
|
style: {
|
|
1509
1571
|
marginRight: variant === "text" ? 0 : 20,
|
|
1510
|
-
paddingTop: variant === "text" ?
|
|
1572
|
+
paddingTop: variant === "text" ? ms6(13) : 0
|
|
1511
1573
|
}
|
|
1512
1574
|
},
|
|
1513
1575
|
/* @__PURE__ */ React15.createElement(
|
|
@@ -1543,6 +1605,7 @@ var TextField = ({
|
|
|
1543
1605
|
var TextField2 = React15.forwardRef(
|
|
1544
1606
|
({
|
|
1545
1607
|
label,
|
|
1608
|
+
labelProps,
|
|
1546
1609
|
keyboardType,
|
|
1547
1610
|
color = "primary",
|
|
1548
1611
|
value,
|
|
@@ -1579,7 +1642,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1579
1642
|
};
|
|
1580
1643
|
const styles2 = ScaledSheet12.create({
|
|
1581
1644
|
root: {
|
|
1582
|
-
marginBottom: gutterBottom
|
|
1645
|
+
marginBottom: ms6(gutterBottom),
|
|
1583
1646
|
...style
|
|
1584
1647
|
},
|
|
1585
1648
|
container: {
|
|
@@ -1652,7 +1715,16 @@ var TextField2 = React15.forwardRef(
|
|
|
1652
1715
|
autoCapitalize: "none",
|
|
1653
1716
|
textContentType: "password"
|
|
1654
1717
|
} : {};
|
|
1655
|
-
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(View10, { style: styles2.root }, label && /* @__PURE__ */ React15.createElement(
|
|
1718
|
+
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(View10, { style: styles2.root }, label && /* @__PURE__ */ React15.createElement(
|
|
1719
|
+
Typography_default,
|
|
1720
|
+
{
|
|
1721
|
+
variant: "body1",
|
|
1722
|
+
color: "textSecondary",
|
|
1723
|
+
gutterBottom: 7,
|
|
1724
|
+
...labelProps
|
|
1725
|
+
},
|
|
1726
|
+
label
|
|
1727
|
+
), /* @__PURE__ */ React15.createElement(
|
|
1656
1728
|
TouchableOpacity7,
|
|
1657
1729
|
{
|
|
1658
1730
|
onPress: () => setFocused(true),
|
|
@@ -1689,7 +1761,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1689
1761
|
selectTextOnFocus: !disabled,
|
|
1690
1762
|
onSubmitEditing,
|
|
1691
1763
|
multiline,
|
|
1692
|
-
|
|
1764
|
+
extAlignVertical: multiline ? "top" : "center",
|
|
1693
1765
|
...formProps,
|
|
1694
1766
|
...props,
|
|
1695
1767
|
style: styles2.input
|
|
@@ -1807,7 +1879,8 @@ var Locator = ({
|
|
|
1807
1879
|
shadowOpacity: 0.1,
|
|
1808
1880
|
shadowRadius: float ? 15 : 0,
|
|
1809
1881
|
shadowOffset: {
|
|
1810
|
-
height: 10
|
|
1882
|
+
height: 10,
|
|
1883
|
+
width: 0
|
|
1811
1884
|
},
|
|
1812
1885
|
borderRadius: 10,
|
|
1813
1886
|
marginBottom: 10,
|
|
@@ -1955,7 +2028,7 @@ var SafeAreaView = ({
|
|
|
1955
2028
|
|
|
1956
2029
|
// ../src/Components/Divider.tsx
|
|
1957
2030
|
import { View as View12 } from "react-native";
|
|
1958
|
-
import { ScaledSheet as ScaledSheet14, ms as
|
|
2031
|
+
import { ScaledSheet as ScaledSheet14, ms as ms7 } from "react-native-size-matters";
|
|
1959
2032
|
var Divider = ({
|
|
1960
2033
|
height = 1,
|
|
1961
2034
|
color = "textSecondary",
|
|
@@ -1967,7 +2040,7 @@ var Divider = ({
|
|
|
1967
2040
|
root: {
|
|
1968
2041
|
height,
|
|
1969
2042
|
backgroundColor: colors2[color].main,
|
|
1970
|
-
marginBottom:
|
|
2043
|
+
marginBottom: ms7(gutterBottom),
|
|
1971
2044
|
...style
|
|
1972
2045
|
}
|
|
1973
2046
|
});
|
|
@@ -2022,7 +2095,7 @@ import {
|
|
|
2022
2095
|
TextInput as TextInput3,
|
|
2023
2096
|
View as View14
|
|
2024
2097
|
} from "react-native";
|
|
2025
|
-
import { ScaledSheet as ScaledSheet16, ms as
|
|
2098
|
+
import { ScaledSheet as ScaledSheet16, ms as ms8 } from "react-native-size-matters";
|
|
2026
2099
|
var OTPInput = ({
|
|
2027
2100
|
length = 6,
|
|
2028
2101
|
onChange = () => {
|
|
@@ -2036,12 +2109,10 @@ var OTPInput = ({
|
|
|
2036
2109
|
() => Array(length).fill(0).map((_) => React19.createRef()),
|
|
2037
2110
|
[length]
|
|
2038
2111
|
);
|
|
2039
|
-
console.log("v", value);
|
|
2040
2112
|
const onChangeHandler = (val, index) => {
|
|
2041
2113
|
if (value.length >= length && val.length > 0)
|
|
2042
2114
|
return;
|
|
2043
2115
|
if (val.length > 1) {
|
|
2044
|
-
console.log("reached", val);
|
|
2045
2116
|
const digits = val.replace(/\D/g, "").slice(0, length);
|
|
2046
2117
|
onChange(digits);
|
|
2047
2118
|
if (digits.length === length) {
|
|
@@ -2071,17 +2142,17 @@ var OTPInput = ({
|
|
|
2071
2142
|
root: {},
|
|
2072
2143
|
container: { flexDirection: "row" },
|
|
2073
2144
|
input: {
|
|
2074
|
-
height:
|
|
2075
|
-
width:
|
|
2145
|
+
height: ms8(size),
|
|
2146
|
+
width: ms8(size),
|
|
2076
2147
|
borderColor: colors2.white[5],
|
|
2077
2148
|
backgroundColor: variant === "contained" ? colors2.white[3] : void 0,
|
|
2078
2149
|
borderWidth: variant === "outlined" ? 1 : 0,
|
|
2079
2150
|
borderBottomWidth: variant === "contained" ? 0 : 1,
|
|
2080
|
-
marginHorizontal:
|
|
2151
|
+
marginHorizontal: ms8(spacing * 5),
|
|
2081
2152
|
textAlign: "center",
|
|
2082
2153
|
borderRadius: variant === "text" ? 0 : 10,
|
|
2083
2154
|
color: colors2.dark.main,
|
|
2084
|
-
fontSize:
|
|
2155
|
+
fontSize: ms8(size * 0.5)
|
|
2085
2156
|
}
|
|
2086
2157
|
});
|
|
2087
2158
|
return /* @__PURE__ */ React19.createElement(View14, { style: styles2.root }, /* @__PURE__ */ React19.createElement(View14, { style: styles2.container }, [...Array(length)].map((_, index) => /* @__PURE__ */ React19.createElement(
|