@hoddy-ui/next 2.0.47 → 2.0.49
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 +176 -100
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +215 -132
- 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,30 +185,39 @@ 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,
|
|
@@ -216,10 +225,11 @@ var Typography = forwardRef(
|
|
|
216
225
|
fontWeight = 400,
|
|
217
226
|
fontFamily,
|
|
218
227
|
// NEW PROP ADDED
|
|
228
|
+
fontSize,
|
|
219
229
|
...props
|
|
220
230
|
}, ref) => {
|
|
221
231
|
const colors2 = useColors();
|
|
222
|
-
const
|
|
232
|
+
const _fontSize = {
|
|
223
233
|
h1: moderateScale(42),
|
|
224
234
|
h2: moderateScale(37),
|
|
225
235
|
h3: moderateScale(32),
|
|
@@ -232,15 +242,14 @@ var Typography = forwardRef(
|
|
|
232
242
|
};
|
|
233
243
|
const styles2 = StyleSheet.create({
|
|
234
244
|
text: {
|
|
235
|
-
fontSize: fontSize[variant],
|
|
236
|
-
marginBottom:
|
|
245
|
+
fontSize: fontSize || _fontSize[variant],
|
|
246
|
+
marginBottom: ms(gutterBottom) || 0,
|
|
237
247
|
color: colors2[color]?.main || color,
|
|
238
248
|
textTransform: textCase,
|
|
239
249
|
alignItems: "center",
|
|
240
250
|
textAlign: align,
|
|
241
251
|
fontWeight,
|
|
242
|
-
fontFamily: fontFamily ||
|
|
243
|
-
// Use custom font if provided, else default
|
|
252
|
+
fontFamily: fontFamily || getFontFamily(fontWeight)
|
|
244
253
|
}
|
|
245
254
|
});
|
|
246
255
|
return /* @__PURE__ */ React2.createElement(
|
|
@@ -263,28 +272,53 @@ var showFlashMessage = () => {
|
|
|
263
272
|
var FlashMessage = () => {
|
|
264
273
|
const { top } = useSafeAreaInsets();
|
|
265
274
|
const [message, setMessage] = useState(null);
|
|
266
|
-
const [show, setShow] = useState(false);
|
|
267
275
|
const colors2 = useColors();
|
|
268
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
|
+
};
|
|
269
293
|
showFlashMessage = (msg) => {
|
|
294
|
+
if (timeoutRef.current) {
|
|
295
|
+
clearTimeout(timeoutRef.current);
|
|
296
|
+
timeoutRef.current = null;
|
|
297
|
+
}
|
|
298
|
+
translateY.value = -200;
|
|
299
|
+
opacity.value = 0;
|
|
270
300
|
setMessage(msg);
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
setTimeout(() => {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
|
|
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);
|
|
280
311
|
};
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
312
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
313
|
+
return {
|
|
314
|
+
transform: [{ translateY: translateY.value }],
|
|
315
|
+
opacity: opacity.value
|
|
316
|
+
};
|
|
317
|
+
});
|
|
284
318
|
const styles2 = ScaledSheet.create({
|
|
285
319
|
root: {
|
|
286
320
|
position: "absolute",
|
|
287
|
-
top:
|
|
321
|
+
top: 0,
|
|
288
322
|
zIndex: 1e3,
|
|
289
323
|
left: 0,
|
|
290
324
|
paddingTop: top + 10,
|
|
@@ -305,7 +339,9 @@ var FlashMessage = () => {
|
|
|
305
339
|
backgroundColor: "#fff3"
|
|
306
340
|
}
|
|
307
341
|
});
|
|
308
|
-
|
|
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(
|
|
309
345
|
Typography_default,
|
|
310
346
|
{
|
|
311
347
|
variant: "h6",
|
|
@@ -314,7 +350,18 @@ var FlashMessage = () => {
|
|
|
314
350
|
style: { color: "#fff" }
|
|
315
351
|
},
|
|
316
352
|
message?.title
|
|
317
|
-
), /* @__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
|
+
)));
|
|
318
365
|
};
|
|
319
366
|
var FlashMessage_default = FlashMessage;
|
|
320
367
|
|
|
@@ -337,7 +384,7 @@ function themeReducer(state, { type, payload }) {
|
|
|
337
384
|
var ConfigureSystemUI = () => {
|
|
338
385
|
const theme = useTheme();
|
|
339
386
|
const colors2 = useColors();
|
|
340
|
-
|
|
387
|
+
useEffect(() => {
|
|
341
388
|
const config2 = getConfig();
|
|
342
389
|
if (colors2) {
|
|
343
390
|
SystemUI.setBackgroundColorAsync(colors2.white[1]);
|
|
@@ -493,7 +540,7 @@ var AdaptiveStatusBarNext_default = AdaptiveStatusBar;
|
|
|
493
540
|
import { MaterialIcons } from "@expo/vector-icons";
|
|
494
541
|
import React6 from "react";
|
|
495
542
|
import { View as View2 } from "react-native";
|
|
496
|
-
import { ScaledSheet as ScaledSheet2 } from "react-native-size-matters";
|
|
543
|
+
import { ms as ms2, ScaledSheet as ScaledSheet2 } from "react-native-size-matters";
|
|
497
544
|
var AlertX = ({
|
|
498
545
|
type = "info",
|
|
499
546
|
variant = "contained",
|
|
@@ -511,7 +558,7 @@ var AlertX = ({
|
|
|
511
558
|
borderRadius: 8,
|
|
512
559
|
alignItems: "center",
|
|
513
560
|
flexDirection: "row",
|
|
514
|
-
marginBottom: gutterBottom
|
|
561
|
+
marginBottom: ms2(gutterBottom),
|
|
515
562
|
backgroundColor: colors2[type].main + (variant === "contained" ? "" : "3")
|
|
516
563
|
},
|
|
517
564
|
title: {
|
|
@@ -521,7 +568,7 @@ var AlertX = ({
|
|
|
521
568
|
color: variant === "contained" ? "#fff" : colors2[type].main
|
|
522
569
|
}
|
|
523
570
|
});
|
|
524
|
-
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(
|
|
525
572
|
MaterialIcons,
|
|
526
573
|
{
|
|
527
574
|
color: variant === "contained" ? "#fff" : colors2[type].main,
|
|
@@ -536,7 +583,7 @@ var AlertX_default = AlertX;
|
|
|
536
583
|
import { AntDesign } from "@expo/vector-icons";
|
|
537
584
|
import React7 from "react";
|
|
538
585
|
import { Image, View as View3 } from "react-native";
|
|
539
|
-
import { ScaledSheet as ScaledSheet3 } from "react-native-size-matters";
|
|
586
|
+
import { ms as ms3, ScaledSheet as ScaledSheet3 } from "react-native-size-matters";
|
|
540
587
|
var Avatar = ({
|
|
541
588
|
color = "dark",
|
|
542
589
|
label,
|
|
@@ -549,14 +596,14 @@ var Avatar = ({
|
|
|
549
596
|
const styles2 = ScaledSheet3.create({
|
|
550
597
|
root: {
|
|
551
598
|
borderRadius: 150,
|
|
552
|
-
height: size
|
|
553
|
-
width: size
|
|
599
|
+
height: ms3(size),
|
|
600
|
+
width: ms3(size),
|
|
554
601
|
alignItems: "center",
|
|
555
602
|
justifyContent: "center",
|
|
556
603
|
overflow: "hidden",
|
|
557
604
|
borderWidth: variant === "outlined" ? 5 : 0,
|
|
558
605
|
borderColor: variant === "outlined" ? "#fff" : "#0000",
|
|
559
|
-
backgroundColor: variant === "outlined" ?
|
|
606
|
+
backgroundColor: variant === "outlined" ? void 0 : label ? colors2[color].main : colors2.white[4],
|
|
560
607
|
...style
|
|
561
608
|
},
|
|
562
609
|
image: {
|
|
@@ -572,13 +619,13 @@ var Avatar_default = Avatar;
|
|
|
572
619
|
import { Ionicons, MaterialIcons as MaterialIcons2 } from "@expo/vector-icons";
|
|
573
620
|
import React8, { forwardRef as forwardRef2 } from "react";
|
|
574
621
|
import { ActivityIndicator, Text as Text2, TouchableOpacity as TouchableOpacity2 } from "react-native";
|
|
575
|
-
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";
|
|
576
623
|
var LinkButton = ({
|
|
577
624
|
title,
|
|
578
625
|
style = {},
|
|
579
626
|
color = "blue",
|
|
580
627
|
fontSize = 12,
|
|
581
|
-
fontWeight =
|
|
628
|
+
fontWeight = 400,
|
|
582
629
|
disabled,
|
|
583
630
|
onPress = () => {
|
|
584
631
|
}
|
|
@@ -587,8 +634,8 @@ var LinkButton = ({
|
|
|
587
634
|
const styles2 = ScaledSheet4.create({
|
|
588
635
|
text: {
|
|
589
636
|
fontSize: moderateScale2(fontSize),
|
|
590
|
-
fontWeight,
|
|
591
|
-
fontFamily:
|
|
637
|
+
fontWeight: fontWeight.toString(),
|
|
638
|
+
fontFamily: getFontFamily(fontWeight),
|
|
592
639
|
color: disabled ? "#777" : colors2[color].main
|
|
593
640
|
}
|
|
594
641
|
});
|
|
@@ -614,7 +661,7 @@ var IconButton = ({
|
|
|
614
661
|
container: {
|
|
615
662
|
alignSelf: "flex-start",
|
|
616
663
|
flexGrow: 0,
|
|
617
|
-
backgroundColor: bg ? bgColor : elevation > 0 ? bgColor :
|
|
664
|
+
backgroundColor: bg ? bgColor : elevation > 0 ? bgColor : void 0,
|
|
618
665
|
padding: "5@ms",
|
|
619
666
|
shadowColor: "#000",
|
|
620
667
|
shadowOpacity: 0.1,
|
|
@@ -622,8 +669,8 @@ var IconButton = ({
|
|
|
622
669
|
height: 1,
|
|
623
670
|
width: 0
|
|
624
671
|
},
|
|
625
|
-
height: bg ? size + 20
|
|
626
|
-
width: bg ? size + 20
|
|
672
|
+
height: bg ? ms4(size + 20) : void 0,
|
|
673
|
+
width: bg ? ms4(size + 20) : void 0,
|
|
627
674
|
alignItems: "center",
|
|
628
675
|
justifyContent: "center",
|
|
629
676
|
shadowRadius: elevation,
|
|
@@ -674,10 +721,10 @@ var Button = forwardRef2(
|
|
|
674
721
|
alignItems: "center",
|
|
675
722
|
alignSelf: "flex-start",
|
|
676
723
|
justifyContent: "center",
|
|
677
|
-
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,
|
|
678
725
|
borderRadius: rounded ? 30 : 10,
|
|
679
726
|
elevation: variant === "text" ? 0 : elevation,
|
|
680
|
-
paddingVertical: size === "small" ? 8 : size === "large" ? "15@
|
|
727
|
+
paddingVertical: size === "small" ? 8 : size === "large" ? "15@mvs" : "13@mvs",
|
|
681
728
|
paddingHorizontal: size === "small" ? "10@ms" : "18@ms",
|
|
682
729
|
borderColor: colors2[color].main,
|
|
683
730
|
borderWidth: variant === "outlined" ? 1 : 0,
|
|
@@ -689,14 +736,14 @@ var Button = forwardRef2(
|
|
|
689
736
|
width: 0
|
|
690
737
|
},
|
|
691
738
|
shadowOpacity: variant === "text" ? 0 : 0.3,
|
|
692
|
-
width: fullWidth ? "100%" :
|
|
739
|
+
width: fullWidth ? "100%" : void 0,
|
|
693
740
|
...style
|
|
694
741
|
},
|
|
695
742
|
text: {
|
|
696
743
|
color: disabled ? variant === "text" || variant === "outlined" ? colors2.black[1] : colors2[color].text : colors2[color][variant === "text" || variant === "outlined" ? "main" : "text"],
|
|
697
744
|
fontWeight: variant === "outlined" ? "700" : "500",
|
|
698
|
-
fontSize: size === "small" ? "12@ms" : "
|
|
699
|
-
fontFamily:
|
|
745
|
+
fontSize: size === "small" ? "12@ms" : "13@ms",
|
|
746
|
+
fontFamily: getFontFamily(variant === "outlined" ? 700 : 500)
|
|
700
747
|
}
|
|
701
748
|
});
|
|
702
749
|
return /* @__PURE__ */ React8.createElement(
|
|
@@ -835,40 +882,78 @@ import {
|
|
|
835
882
|
TouchableWithoutFeedback as TouchableWithoutFeedback2,
|
|
836
883
|
View as View5
|
|
837
884
|
} from "react-native";
|
|
838
|
-
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";
|
|
839
893
|
import { ScaledSheet as ScaledSheet7 } from "react-native-size-matters";
|
|
840
894
|
var Popup = ({
|
|
841
895
|
title,
|
|
842
896
|
sheet,
|
|
843
897
|
bare = false,
|
|
844
|
-
keyboardVerticalOffset,
|
|
898
|
+
keyboardVerticalOffset = -10,
|
|
845
899
|
children,
|
|
846
900
|
open,
|
|
847
901
|
onClose = () => {
|
|
848
902
|
},
|
|
849
|
-
style
|
|
903
|
+
style,
|
|
904
|
+
onModalShow,
|
|
905
|
+
onModalHide
|
|
850
906
|
}) => {
|
|
851
907
|
const theme = useTheme();
|
|
852
908
|
const colors2 = useColors();
|
|
853
|
-
const [
|
|
854
|
-
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
|
+
}));
|
|
855
937
|
const styles2 = ScaledSheet7.create({
|
|
856
938
|
root: {
|
|
857
939
|
height: "100%",
|
|
858
940
|
width: "100%",
|
|
859
941
|
justifyContent: sheet ? "flex-end" : "center"
|
|
860
942
|
},
|
|
943
|
+
keyboardView: {
|
|
944
|
+
flex: 1
|
|
945
|
+
},
|
|
861
946
|
avoidingView: {
|
|
862
947
|
minHeight: typeof sheet === "number" ? sheet : void 0,
|
|
863
|
-
maxHeight: "
|
|
948
|
+
maxHeight: "90%",
|
|
864
949
|
zIndex: 1e3,
|
|
865
950
|
alignSelf: "center",
|
|
866
951
|
maxWidth: sheet ? void 0 : "90%",
|
|
867
952
|
width: sheet ? "100%" : void 0
|
|
868
953
|
},
|
|
869
954
|
container: {
|
|
870
|
-
paddingBottom: sheet ? "30@ms" : 0,
|
|
871
|
-
backgroundColor: theme === "dark" ? "#111" : colors2.white[
|
|
955
|
+
paddingBottom: sheet ? "30@ms" : void 0,
|
|
956
|
+
backgroundColor: theme === "dark" ? "#111" : colors2.white[1],
|
|
872
957
|
borderTopLeftRadius: 20,
|
|
873
958
|
borderTopRightRadius: 20,
|
|
874
959
|
borderBottomRightRadius: sheet ? 0 : 20,
|
|
@@ -878,7 +963,6 @@ var Popup = ({
|
|
|
878
963
|
},
|
|
879
964
|
content: {
|
|
880
965
|
paddingHorizontal: bare ? void 0 : "15@ms"
|
|
881
|
-
// flex: 1,
|
|
882
966
|
},
|
|
883
967
|
title: {
|
|
884
968
|
flexDirection: "row",
|
|
@@ -893,71 +977,61 @@ var Popup = ({
|
|
|
893
977
|
backdrop: {
|
|
894
978
|
position: "absolute",
|
|
895
979
|
height: "100%",
|
|
896
|
-
zIndex:
|
|
980
|
+
zIndex: 1,
|
|
897
981
|
width: "100%",
|
|
898
982
|
backgroundColor: "#000b"
|
|
899
983
|
}
|
|
900
984
|
});
|
|
901
|
-
React11.useEffect(() => {
|
|
902
|
-
if (open) {
|
|
903
|
-
setShow(open);
|
|
904
|
-
setTimeout(() => {
|
|
905
|
-
setShowSecondary(open);
|
|
906
|
-
}, 500);
|
|
907
|
-
} else {
|
|
908
|
-
closeAction();
|
|
909
|
-
}
|
|
910
|
-
}, [open]);
|
|
911
985
|
const closeAction = () => {
|
|
912
|
-
|
|
913
|
-
setTimeout(() => {
|
|
914
|
-
setShow(false);
|
|
915
|
-
onClose();
|
|
916
|
-
}, 300);
|
|
986
|
+
onClose();
|
|
917
987
|
};
|
|
918
|
-
return /* @__PURE__ */ React11.createElement(
|
|
988
|
+
return /* @__PURE__ */ React11.createElement(
|
|
919
989
|
Modal,
|
|
920
990
|
{
|
|
921
991
|
transparent: true,
|
|
922
|
-
animationType: "
|
|
992
|
+
animationType: "none",
|
|
923
993
|
statusBarTranslucent: true,
|
|
924
|
-
visible:
|
|
994
|
+
visible: modalVisible,
|
|
925
995
|
onRequestClose: closeAction
|
|
926
996
|
},
|
|
927
|
-
/* @__PURE__ */ React11.createElement(View5, { style: styles2.backdrop }),
|
|
928
997
|
/* @__PURE__ */ React11.createElement(UIThemeProvider, null, /* @__PURE__ */ React11.createElement(
|
|
929
|
-
|
|
998
|
+
KeyboardAvoidingView2,
|
|
930
999
|
{
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
visible: showSecondary,
|
|
935
|
-
onRequestClose: closeAction
|
|
1000
|
+
style: styles2.keyboardView,
|
|
1001
|
+
behavior: Platform5.OS === "ios" ? "padding" : void 0,
|
|
1002
|
+
keyboardVerticalOffset
|
|
936
1003
|
},
|
|
937
|
-
/* @__PURE__ */ React11.createElement(TouchableWithoutFeedback2, { onPress: Keyboard2.dismiss }, /* @__PURE__ */ React11.createElement(View5, { style: styles2.root }, open && /* @__PURE__ */ React11.createElement(
|
|
1004
|
+
/* @__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(
|
|
938
1005
|
Pressable,
|
|
939
1006
|
{
|
|
940
|
-
style: StyleSheet2.absoluteFill,
|
|
1007
|
+
style: [StyleSheet2.absoluteFill, { zIndex: 2 }],
|
|
941
1008
|
onPress: closeAction
|
|
942
1009
|
}
|
|
943
1010
|
), /* @__PURE__ */ React11.createElement(
|
|
944
|
-
|
|
1011
|
+
Animated2.View,
|
|
945
1012
|
{
|
|
946
|
-
style: styles2.avoidingView,
|
|
947
|
-
|
|
948
|
-
behavior: Platform5.OS === "ios" ? "position" : "padding"
|
|
1013
|
+
style: [styles2.avoidingView, contentAnimatedStyle],
|
|
1014
|
+
layout: LinearTransition
|
|
949
1015
|
},
|
|
950
|
-
/* @__PURE__ */ React11.createElement(
|
|
951
|
-
|
|
1016
|
+
/* @__PURE__ */ React11.createElement(
|
|
1017
|
+
Animated2.View,
|
|
952
1018
|
{
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
}
|
|
957
|
-
|
|
1019
|
+
layout: LinearTransition,
|
|
1020
|
+
style: styles2.container
|
|
1021
|
+
},
|
|
1022
|
+
!bare && /* @__PURE__ */ React11.createElement(View5, { style: styles2.title }, /* @__PURE__ */ React11.createElement(View5, { style: styles2.titleIcon }, /* @__PURE__ */ React11.createElement(
|
|
1023
|
+
IconButton,
|
|
1024
|
+
{
|
|
1025
|
+
size: 20,
|
|
1026
|
+
icon: "close",
|
|
1027
|
+
onPress: closeAction
|
|
1028
|
+
}
|
|
1029
|
+
)), /* @__PURE__ */ React11.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
|
|
1030
|
+
/* @__PURE__ */ React11.createElement(View5, { style: styles2.content }, children)
|
|
1031
|
+
)
|
|
958
1032
|
)))
|
|
959
1033
|
))
|
|
960
|
-
)
|
|
1034
|
+
);
|
|
961
1035
|
};
|
|
962
1036
|
|
|
963
1037
|
// ../src/Components/StarRating.tsx
|
|
@@ -1098,9 +1172,9 @@ var RatingInput = ({
|
|
|
1098
1172
|
};
|
|
1099
1173
|
|
|
1100
1174
|
// ../src/Components/Grid.tsx
|
|
1101
|
-
import { View as View7 } from "react-native";
|
|
1102
1175
|
import React12 from "react";
|
|
1103
|
-
import {
|
|
1176
|
+
import { View as View7 } from "react-native";
|
|
1177
|
+
import { ms as ms5, ScaledSheet as ScaledSheet9 } from "react-native-size-matters";
|
|
1104
1178
|
var GridItem = ({
|
|
1105
1179
|
children,
|
|
1106
1180
|
col = 2,
|
|
@@ -1110,8 +1184,8 @@ var GridItem = ({
|
|
|
1110
1184
|
}) => {
|
|
1111
1185
|
const styles2 = ScaledSheet9.create({
|
|
1112
1186
|
gridItem: {
|
|
1113
|
-
width: 100 / col
|
|
1114
|
-
padding: spacing * 10
|
|
1187
|
+
width: `${100 / col}%`,
|
|
1188
|
+
padding: ms5(spacing * 10),
|
|
1115
1189
|
alignItems
|
|
1116
1190
|
}
|
|
1117
1191
|
});
|
|
@@ -1125,7 +1199,7 @@ var Grid = ({
|
|
|
1125
1199
|
const styles2 = ScaledSheet9.create({
|
|
1126
1200
|
grid: {
|
|
1127
1201
|
flexWrap: "wrap",
|
|
1128
|
-
margin: -spacing * 10
|
|
1202
|
+
margin: `${-spacing * 10}@ms`,
|
|
1129
1203
|
flexDirection: "row"
|
|
1130
1204
|
}
|
|
1131
1205
|
});
|
|
@@ -1178,12 +1252,12 @@ var ListItem = ({
|
|
|
1178
1252
|
|
|
1179
1253
|
// ../src/Components/TextField.tsx
|
|
1180
1254
|
import { Ionicons as Ionicons3, MaterialIcons as MaterialIcons5 } from "@expo/vector-icons";
|
|
1181
|
-
import React15, { useRef, useState as useState6 } from "react";
|
|
1182
|
-
import { Animated, TextInput as TextInput2, TouchableOpacity as TouchableOpacity7, View as View10 } from "react-native";
|
|
1255
|
+
import React15, { useRef as useRef2, useState as useState6 } from "react";
|
|
1256
|
+
import { Animated as Animated3, TextInput as TextInput2, TouchableOpacity as TouchableOpacity7, View as View10 } from "react-native";
|
|
1183
1257
|
import {
|
|
1184
1258
|
ScaledSheet as ScaledSheet12,
|
|
1185
1259
|
moderateScale as moderateScale3,
|
|
1186
|
-
ms,
|
|
1260
|
+
ms as ms6,
|
|
1187
1261
|
verticalScale as verticalScale2
|
|
1188
1262
|
} from "react-native-size-matters";
|
|
1189
1263
|
|
|
@@ -1344,18 +1418,18 @@ var TextField = ({
|
|
|
1344
1418
|
const colors2 = useColors();
|
|
1345
1419
|
const [focused, setFocused] = useState6(false);
|
|
1346
1420
|
const height = moderateScale3(variant === "text" ? 50 : 45) * (size === "large" ? 1.2 : size === "small" ? 0.8 : 1);
|
|
1347
|
-
const labelAnim =
|
|
1348
|
-
new
|
|
1421
|
+
const labelAnim = useRef2(
|
|
1422
|
+
new Animated3.Value(height / moderateScale3(variant === "text" ? 2.5 : 3.2))
|
|
1349
1423
|
).current;
|
|
1350
1424
|
React15.useEffect(() => {
|
|
1351
1425
|
if (focused || value) {
|
|
1352
|
-
|
|
1426
|
+
Animated3.timing(labelAnim, {
|
|
1353
1427
|
toValue: verticalScale2(variant === "text" ? 2 : 4),
|
|
1354
1428
|
duration: 300,
|
|
1355
1429
|
useNativeDriver: false
|
|
1356
1430
|
}).start();
|
|
1357
1431
|
} else {
|
|
1358
|
-
|
|
1432
|
+
Animated3.timing(labelAnim, {
|
|
1359
1433
|
toValue: height / moderateScale3(variant === "text" ? 2.5 : 3.2),
|
|
1360
1434
|
duration: 300,
|
|
1361
1435
|
useNativeDriver: false
|
|
@@ -1364,7 +1438,7 @@ var TextField = ({
|
|
|
1364
1438
|
}, [focused, value]);
|
|
1365
1439
|
const styles2 = ScaledSheet12.create({
|
|
1366
1440
|
root: {
|
|
1367
|
-
marginBottom: gutterBottom
|
|
1441
|
+
marginBottom: ms6(gutterBottom),
|
|
1368
1442
|
width: "100%",
|
|
1369
1443
|
...style
|
|
1370
1444
|
},
|
|
@@ -1388,7 +1462,7 @@ var TextField = ({
|
|
|
1388
1462
|
paddingLeft: variant === "text" ? 0 : moderateScale3(15),
|
|
1389
1463
|
paddingRight: moderateScale3(10),
|
|
1390
1464
|
paddingTop: "11@vs",
|
|
1391
|
-
fontFamily:
|
|
1465
|
+
fontFamily: getFontFamily(400),
|
|
1392
1466
|
color: colors2.black[1],
|
|
1393
1467
|
zIndex: 10
|
|
1394
1468
|
// backgroundColor: "#284",
|
|
@@ -1400,7 +1474,7 @@ var TextField = ({
|
|
|
1400
1474
|
paddingTop: "13@ms"
|
|
1401
1475
|
},
|
|
1402
1476
|
label: {
|
|
1403
|
-
fontFamily:
|
|
1477
|
+
fontFamily: getFontFamily(400),
|
|
1404
1478
|
position: "absolute",
|
|
1405
1479
|
left: variant === "text" ? 0 : moderateScale3(15),
|
|
1406
1480
|
fontSize: focused || value ? "10@s" : "13@s",
|
|
@@ -1450,7 +1524,7 @@ var TextField = ({
|
|
|
1450
1524
|
onPress: () => setFocused(true),
|
|
1451
1525
|
style: styles2.container
|
|
1452
1526
|
},
|
|
1453
|
-
/* @__PURE__ */ React15.createElement(
|
|
1527
|
+
/* @__PURE__ */ React15.createElement(Animated3.Text, { style: { ...styles2.label, top: labelAnim } }, label),
|
|
1454
1528
|
start,
|
|
1455
1529
|
options ? /* @__PURE__ */ React15.createElement(
|
|
1456
1530
|
View10,
|
|
@@ -1461,7 +1535,7 @@ var TextField = ({
|
|
|
1461
1535
|
View10,
|
|
1462
1536
|
{
|
|
1463
1537
|
style: {
|
|
1464
|
-
paddingTop: variant !== "outlined" ?
|
|
1538
|
+
paddingTop: variant !== "outlined" ? ms6(13) : 0,
|
|
1465
1539
|
paddingRight: 10
|
|
1466
1540
|
}
|
|
1467
1541
|
},
|
|
@@ -1496,7 +1570,7 @@ var TextField = ({
|
|
|
1496
1570
|
{
|
|
1497
1571
|
style: {
|
|
1498
1572
|
marginRight: 20,
|
|
1499
|
-
paddingTop: variant === "text" ?
|
|
1573
|
+
paddingTop: variant === "text" ? ms6(13) : 0
|
|
1500
1574
|
}
|
|
1501
1575
|
},
|
|
1502
1576
|
end
|
|
@@ -1506,7 +1580,7 @@ var TextField = ({
|
|
|
1506
1580
|
{
|
|
1507
1581
|
style: {
|
|
1508
1582
|
marginRight: variant === "text" ? 0 : 20,
|
|
1509
|
-
paddingTop: variant === "text" ?
|
|
1583
|
+
paddingTop: variant === "text" ? ms6(13) : 0
|
|
1510
1584
|
}
|
|
1511
1585
|
},
|
|
1512
1586
|
/* @__PURE__ */ React15.createElement(
|
|
@@ -1542,6 +1616,7 @@ var TextField = ({
|
|
|
1542
1616
|
var TextField2 = React15.forwardRef(
|
|
1543
1617
|
({
|
|
1544
1618
|
label,
|
|
1619
|
+
labelProps,
|
|
1545
1620
|
keyboardType,
|
|
1546
1621
|
color = "primary",
|
|
1547
1622
|
value,
|
|
@@ -1578,7 +1653,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1578
1653
|
};
|
|
1579
1654
|
const styles2 = ScaledSheet12.create({
|
|
1580
1655
|
root: {
|
|
1581
|
-
marginBottom: gutterBottom
|
|
1656
|
+
marginBottom: ms6(gutterBottom),
|
|
1582
1657
|
...style
|
|
1583
1658
|
},
|
|
1584
1659
|
container: {
|
|
@@ -1651,7 +1726,16 @@ var TextField2 = React15.forwardRef(
|
|
|
1651
1726
|
autoCapitalize: "none",
|
|
1652
1727
|
textContentType: "password"
|
|
1653
1728
|
} : {};
|
|
1654
|
-
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(View10, { style: styles2.root }, label && /* @__PURE__ */ React15.createElement(
|
|
1729
|
+
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(View10, { style: styles2.root }, label && /* @__PURE__ */ React15.createElement(
|
|
1730
|
+
Typography_default,
|
|
1731
|
+
{
|
|
1732
|
+
variant: "body2",
|
|
1733
|
+
color: "textSecondary",
|
|
1734
|
+
gutterBottom: 7,
|
|
1735
|
+
...labelProps
|
|
1736
|
+
},
|
|
1737
|
+
label
|
|
1738
|
+
), /* @__PURE__ */ React15.createElement(
|
|
1655
1739
|
TouchableOpacity7,
|
|
1656
1740
|
{
|
|
1657
1741
|
onPress: () => setFocused(true),
|
|
@@ -1688,7 +1772,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1688
1772
|
selectTextOnFocus: !disabled,
|
|
1689
1773
|
onSubmitEditing,
|
|
1690
1774
|
multiline,
|
|
1691
|
-
|
|
1775
|
+
extAlignVertical: multiline ? "top" : "center",
|
|
1692
1776
|
...formProps,
|
|
1693
1777
|
...props,
|
|
1694
1778
|
style: styles2.input
|
|
@@ -1806,7 +1890,8 @@ var Locator = ({
|
|
|
1806
1890
|
shadowOpacity: 0.1,
|
|
1807
1891
|
shadowRadius: float ? 15 : 0,
|
|
1808
1892
|
shadowOffset: {
|
|
1809
|
-
height: 10
|
|
1893
|
+
height: 10,
|
|
1894
|
+
width: 0
|
|
1810
1895
|
},
|
|
1811
1896
|
borderRadius: 10,
|
|
1812
1897
|
marginBottom: 10,
|
|
@@ -1954,7 +2039,7 @@ var SafeAreaView = ({
|
|
|
1954
2039
|
|
|
1955
2040
|
// ../src/Components/Divider.tsx
|
|
1956
2041
|
import { View as View12 } from "react-native";
|
|
1957
|
-
import { ScaledSheet as ScaledSheet14, ms as
|
|
2042
|
+
import { ScaledSheet as ScaledSheet14, ms as ms7 } from "react-native-size-matters";
|
|
1958
2043
|
var Divider = ({
|
|
1959
2044
|
height = 1,
|
|
1960
2045
|
color = "textSecondary",
|
|
@@ -1966,7 +2051,7 @@ var Divider = ({
|
|
|
1966
2051
|
root: {
|
|
1967
2052
|
height,
|
|
1968
2053
|
backgroundColor: colors2[color].main,
|
|
1969
|
-
marginBottom:
|
|
2054
|
+
marginBottom: ms7(gutterBottom),
|
|
1970
2055
|
...style
|
|
1971
2056
|
}
|
|
1972
2057
|
});
|
|
@@ -2021,7 +2106,7 @@ import {
|
|
|
2021
2106
|
TextInput as TextInput3,
|
|
2022
2107
|
View as View14
|
|
2023
2108
|
} from "react-native";
|
|
2024
|
-
import { ScaledSheet as ScaledSheet16, ms as
|
|
2109
|
+
import { ScaledSheet as ScaledSheet16, ms as ms8 } from "react-native-size-matters";
|
|
2025
2110
|
var OTPInput = ({
|
|
2026
2111
|
length = 6,
|
|
2027
2112
|
onChange = () => {
|
|
@@ -2035,12 +2120,10 @@ var OTPInput = ({
|
|
|
2035
2120
|
() => Array(length).fill(0).map((_) => React19.createRef()),
|
|
2036
2121
|
[length]
|
|
2037
2122
|
);
|
|
2038
|
-
console.log("v", value);
|
|
2039
2123
|
const onChangeHandler = (val, index) => {
|
|
2040
2124
|
if (value.length >= length && val.length > 0)
|
|
2041
2125
|
return;
|
|
2042
2126
|
if (val.length > 1) {
|
|
2043
|
-
console.log("reached", val);
|
|
2044
2127
|
const digits = val.replace(/\D/g, "").slice(0, length);
|
|
2045
2128
|
onChange(digits);
|
|
2046
2129
|
if (digits.length === length) {
|
|
@@ -2070,17 +2153,17 @@ var OTPInput = ({
|
|
|
2070
2153
|
root: {},
|
|
2071
2154
|
container: { flexDirection: "row" },
|
|
2072
2155
|
input: {
|
|
2073
|
-
height:
|
|
2074
|
-
width:
|
|
2156
|
+
height: ms8(size),
|
|
2157
|
+
width: ms8(size),
|
|
2075
2158
|
borderColor: colors2.white[5],
|
|
2076
2159
|
backgroundColor: variant === "contained" ? colors2.white[3] : void 0,
|
|
2077
2160
|
borderWidth: variant === "outlined" ? 1 : 0,
|
|
2078
2161
|
borderBottomWidth: variant === "contained" ? 0 : 1,
|
|
2079
|
-
marginHorizontal:
|
|
2162
|
+
marginHorizontal: ms8(spacing * 5),
|
|
2080
2163
|
textAlign: "center",
|
|
2081
2164
|
borderRadius: variant === "text" ? 0 : 10,
|
|
2082
2165
|
color: colors2.dark.main,
|
|
2083
|
-
fontSize:
|
|
2166
|
+
fontSize: ms8(size * 0.5)
|
|
2084
2167
|
}
|
|
2085
2168
|
});
|
|
2086
2169
|
return /* @__PURE__ */ React19.createElement(View14, { style: styles2.root }, /* @__PURE__ */ React19.createElement(View14, { style: styles2.container }, [...Array(length)].map((_, index) => /* @__PURE__ */ React19.createElement(
|