@hoddy-ui/core 2.5.5 → 2.5.6
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 +102 -37
- package/next/dist/index.d.ts +102 -37
- package/next/dist/index.js +165 -100
- package/next/dist/index.js.map +1 -1
- package/next/dist/index.mjs +204 -132
- package/next/dist/index.mjs.map +1 -1
- package/next/package.json +4 -3
- package/package.json +2 -2
- package/src/Components/AlertX.tsx +4 -4
- package/src/Components/Avatar.tsx +4 -4
- package/src/Components/Button.tsx +5 -4
- package/src/Components/Grid.tsx +5 -5
- package/src/Components/Locator.tsx +1 -0
- package/src/Components/Popup.tsx +7 -3
- package/src/Components/TextField.tsx +13 -5
- package/src/Components/Typography.tsx +2 -5
- package/src/types.ts +4 -2
- package/src/utility.ts +11 -0
package/next/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,7 +882,14 @@ 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,
|
|
@@ -846,12 +900,40 @@ var Popup = ({
|
|
|
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%",
|
|
@@ -867,7 +949,7 @@ var Popup = ({
|
|
|
867
949
|
width: sheet ? "100%" : void 0
|
|
868
950
|
},
|
|
869
951
|
container: {
|
|
870
|
-
paddingBottom: sheet ? "30@ms" : 0,
|
|
952
|
+
paddingBottom: sheet ? "30@ms" : void 0,
|
|
871
953
|
backgroundColor: theme === "dark" ? "#111" : colors2.white[2],
|
|
872
954
|
borderTopLeftRadius: 20,
|
|
873
955
|
borderTopRightRadius: 20,
|
|
@@ -878,7 +960,6 @@ var Popup = ({
|
|
|
878
960
|
},
|
|
879
961
|
content: {
|
|
880
962
|
paddingHorizontal: bare ? void 0 : "15@ms"
|
|
881
|
-
// flex: 1,
|
|
882
963
|
},
|
|
883
964
|
title: {
|
|
884
965
|
flexDirection: "row",
|
|
@@ -893,71 +974,53 @@ var Popup = ({
|
|
|
893
974
|
backdrop: {
|
|
894
975
|
position: "absolute",
|
|
895
976
|
height: "100%",
|
|
896
|
-
zIndex:
|
|
977
|
+
zIndex: 1,
|
|
897
978
|
width: "100%",
|
|
898
979
|
backgroundColor: "#000b"
|
|
899
980
|
}
|
|
900
981
|
});
|
|
901
|
-
React11.useEffect(() => {
|
|
902
|
-
if (open) {
|
|
903
|
-
setShow(open);
|
|
904
|
-
setTimeout(() => {
|
|
905
|
-
setShowSecondary(open);
|
|
906
|
-
}, 500);
|
|
907
|
-
} else {
|
|
908
|
-
closeAction();
|
|
909
|
-
}
|
|
910
|
-
}, [open]);
|
|
911
982
|
const closeAction = () => {
|
|
912
|
-
|
|
913
|
-
setTimeout(() => {
|
|
914
|
-
setShow(false);
|
|
915
|
-
onClose();
|
|
916
|
-
}, 300);
|
|
983
|
+
onClose();
|
|
917
984
|
};
|
|
918
|
-
return /* @__PURE__ */ React11.createElement(
|
|
985
|
+
return /* @__PURE__ */ React11.createElement(
|
|
919
986
|
Modal,
|
|
920
987
|
{
|
|
921
988
|
transparent: true,
|
|
922
|
-
animationType: "
|
|
989
|
+
animationType: "none",
|
|
923
990
|
statusBarTranslucent: true,
|
|
924
|
-
visible:
|
|
991
|
+
visible: modalVisible,
|
|
925
992
|
onRequestClose: closeAction
|
|
926
993
|
},
|
|
927
|
-
/* @__PURE__ */ React11.createElement(View5, { style: styles2.backdrop }),
|
|
928
|
-
|
|
929
|
-
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,
|
|
930
996
|
{
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
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"
|
|
936
1005
|
},
|
|
937
|
-
/* @__PURE__ */ React11.createElement(
|
|
938
|
-
|
|
939
|
-
{
|
|
940
|
-
style: StyleSheet2.absoluteFill,
|
|
941
|
-
onPress: closeAction
|
|
942
|
-
}
|
|
943
|
-
), /* @__PURE__ */ React11.createElement(
|
|
944
|
-
KeyboardAvoidingView2,
|
|
1006
|
+
/* @__PURE__ */ React11.createElement(
|
|
1007
|
+
Animated2.View,
|
|
945
1008
|
{
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
behavior: Platform5.OS === "ios" ? "position" : "padding"
|
|
1009
|
+
layout: LinearTransition,
|
|
1010
|
+
style: styles2.container
|
|
949
1011
|
},
|
|
950
|
-
|
|
1012
|
+
!bare && /* @__PURE__ */ React11.createElement(View5, { style: styles2.title }, /* @__PURE__ */ React11.createElement(View5, { style: styles2.titleIcon }, /* @__PURE__ */ React11.createElement(
|
|
951
1013
|
IconButton,
|
|
952
1014
|
{
|
|
953
1015
|
size: 20,
|
|
954
1016
|
icon: "close",
|
|
955
1017
|
onPress: closeAction
|
|
956
1018
|
}
|
|
957
|
-
)), /* @__PURE__ */ React11.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1019
|
+
)), /* @__PURE__ */ React11.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
|
|
1020
|
+
/* @__PURE__ */ React11.createElement(View5, { style: styles2.content }, children)
|
|
1021
|
+
)
|
|
1022
|
+
)))))
|
|
1023
|
+
);
|
|
961
1024
|
};
|
|
962
1025
|
|
|
963
1026
|
// ../src/Components/StarRating.tsx
|
|
@@ -1098,9 +1161,9 @@ var RatingInput = ({
|
|
|
1098
1161
|
};
|
|
1099
1162
|
|
|
1100
1163
|
// ../src/Components/Grid.tsx
|
|
1101
|
-
import { View as View7 } from "react-native";
|
|
1102
1164
|
import React12 from "react";
|
|
1103
|
-
import {
|
|
1165
|
+
import { View as View7 } from "react-native";
|
|
1166
|
+
import { ms as ms5, ScaledSheet as ScaledSheet9 } from "react-native-size-matters";
|
|
1104
1167
|
var GridItem = ({
|
|
1105
1168
|
children,
|
|
1106
1169
|
col = 2,
|
|
@@ -1110,8 +1173,8 @@ var GridItem = ({
|
|
|
1110
1173
|
}) => {
|
|
1111
1174
|
const styles2 = ScaledSheet9.create({
|
|
1112
1175
|
gridItem: {
|
|
1113
|
-
width: 100 / col
|
|
1114
|
-
padding: spacing * 10
|
|
1176
|
+
width: `${100 / col}%`,
|
|
1177
|
+
padding: ms5(spacing * 10),
|
|
1115
1178
|
alignItems
|
|
1116
1179
|
}
|
|
1117
1180
|
});
|
|
@@ -1125,7 +1188,7 @@ var Grid = ({
|
|
|
1125
1188
|
const styles2 = ScaledSheet9.create({
|
|
1126
1189
|
grid: {
|
|
1127
1190
|
flexWrap: "wrap",
|
|
1128
|
-
margin: -spacing * 10
|
|
1191
|
+
margin: `${-spacing * 10}@ms`,
|
|
1129
1192
|
flexDirection: "row"
|
|
1130
1193
|
}
|
|
1131
1194
|
});
|
|
@@ -1178,12 +1241,12 @@ var ListItem = ({
|
|
|
1178
1241
|
|
|
1179
1242
|
// ../src/Components/TextField.tsx
|
|
1180
1243
|
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";
|
|
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";
|
|
1183
1246
|
import {
|
|
1184
1247
|
ScaledSheet as ScaledSheet12,
|
|
1185
1248
|
moderateScale as moderateScale3,
|
|
1186
|
-
ms,
|
|
1249
|
+
ms as ms6,
|
|
1187
1250
|
verticalScale as verticalScale2
|
|
1188
1251
|
} from "react-native-size-matters";
|
|
1189
1252
|
|
|
@@ -1344,18 +1407,18 @@ var TextField = ({
|
|
|
1344
1407
|
const colors2 = useColors();
|
|
1345
1408
|
const [focused, setFocused] = useState6(false);
|
|
1346
1409
|
const height = moderateScale3(variant === "text" ? 50 : 45) * (size === "large" ? 1.2 : size === "small" ? 0.8 : 1);
|
|
1347
|
-
const labelAnim =
|
|
1348
|
-
new
|
|
1410
|
+
const labelAnim = useRef2(
|
|
1411
|
+
new Animated3.Value(height / moderateScale3(variant === "text" ? 2.5 : 3.2))
|
|
1349
1412
|
).current;
|
|
1350
1413
|
React15.useEffect(() => {
|
|
1351
1414
|
if (focused || value) {
|
|
1352
|
-
|
|
1415
|
+
Animated3.timing(labelAnim, {
|
|
1353
1416
|
toValue: verticalScale2(variant === "text" ? 2 : 4),
|
|
1354
1417
|
duration: 300,
|
|
1355
1418
|
useNativeDriver: false
|
|
1356
1419
|
}).start();
|
|
1357
1420
|
} else {
|
|
1358
|
-
|
|
1421
|
+
Animated3.timing(labelAnim, {
|
|
1359
1422
|
toValue: height / moderateScale3(variant === "text" ? 2.5 : 3.2),
|
|
1360
1423
|
duration: 300,
|
|
1361
1424
|
useNativeDriver: false
|
|
@@ -1364,7 +1427,7 @@ var TextField = ({
|
|
|
1364
1427
|
}, [focused, value]);
|
|
1365
1428
|
const styles2 = ScaledSheet12.create({
|
|
1366
1429
|
root: {
|
|
1367
|
-
marginBottom: gutterBottom
|
|
1430
|
+
marginBottom: ms6(gutterBottom),
|
|
1368
1431
|
width: "100%",
|
|
1369
1432
|
...style
|
|
1370
1433
|
},
|
|
@@ -1388,7 +1451,7 @@ var TextField = ({
|
|
|
1388
1451
|
paddingLeft: variant === "text" ? 0 : moderateScale3(15),
|
|
1389
1452
|
paddingRight: moderateScale3(10),
|
|
1390
1453
|
paddingTop: "11@vs",
|
|
1391
|
-
fontFamily:
|
|
1454
|
+
fontFamily: getFontFamily(400),
|
|
1392
1455
|
color: colors2.black[1],
|
|
1393
1456
|
zIndex: 10
|
|
1394
1457
|
// backgroundColor: "#284",
|
|
@@ -1400,7 +1463,7 @@ var TextField = ({
|
|
|
1400
1463
|
paddingTop: "13@ms"
|
|
1401
1464
|
},
|
|
1402
1465
|
label: {
|
|
1403
|
-
fontFamily:
|
|
1466
|
+
fontFamily: getFontFamily(400),
|
|
1404
1467
|
position: "absolute",
|
|
1405
1468
|
left: variant === "text" ? 0 : moderateScale3(15),
|
|
1406
1469
|
fontSize: focused || value ? "10@s" : "13@s",
|
|
@@ -1450,7 +1513,7 @@ var TextField = ({
|
|
|
1450
1513
|
onPress: () => setFocused(true),
|
|
1451
1514
|
style: styles2.container
|
|
1452
1515
|
},
|
|
1453
|
-
/* @__PURE__ */ React15.createElement(
|
|
1516
|
+
/* @__PURE__ */ React15.createElement(Animated3.Text, { style: { ...styles2.label, top: labelAnim } }, label),
|
|
1454
1517
|
start,
|
|
1455
1518
|
options ? /* @__PURE__ */ React15.createElement(
|
|
1456
1519
|
View10,
|
|
@@ -1461,7 +1524,7 @@ var TextField = ({
|
|
|
1461
1524
|
View10,
|
|
1462
1525
|
{
|
|
1463
1526
|
style: {
|
|
1464
|
-
paddingTop: variant !== "outlined" ?
|
|
1527
|
+
paddingTop: variant !== "outlined" ? ms6(13) : 0,
|
|
1465
1528
|
paddingRight: 10
|
|
1466
1529
|
}
|
|
1467
1530
|
},
|
|
@@ -1496,7 +1559,7 @@ var TextField = ({
|
|
|
1496
1559
|
{
|
|
1497
1560
|
style: {
|
|
1498
1561
|
marginRight: 20,
|
|
1499
|
-
paddingTop: variant === "text" ?
|
|
1562
|
+
paddingTop: variant === "text" ? ms6(13) : 0
|
|
1500
1563
|
}
|
|
1501
1564
|
},
|
|
1502
1565
|
end
|
|
@@ -1506,7 +1569,7 @@ var TextField = ({
|
|
|
1506
1569
|
{
|
|
1507
1570
|
style: {
|
|
1508
1571
|
marginRight: variant === "text" ? 0 : 20,
|
|
1509
|
-
paddingTop: variant === "text" ?
|
|
1572
|
+
paddingTop: variant === "text" ? ms6(13) : 0
|
|
1510
1573
|
}
|
|
1511
1574
|
},
|
|
1512
1575
|
/* @__PURE__ */ React15.createElement(
|
|
@@ -1542,6 +1605,7 @@ var TextField = ({
|
|
|
1542
1605
|
var TextField2 = React15.forwardRef(
|
|
1543
1606
|
({
|
|
1544
1607
|
label,
|
|
1608
|
+
labelProps,
|
|
1545
1609
|
keyboardType,
|
|
1546
1610
|
color = "primary",
|
|
1547
1611
|
value,
|
|
@@ -1578,7 +1642,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1578
1642
|
};
|
|
1579
1643
|
const styles2 = ScaledSheet12.create({
|
|
1580
1644
|
root: {
|
|
1581
|
-
marginBottom: gutterBottom
|
|
1645
|
+
marginBottom: ms6(gutterBottom),
|
|
1582
1646
|
...style
|
|
1583
1647
|
},
|
|
1584
1648
|
container: {
|
|
@@ -1651,7 +1715,16 @@ var TextField2 = React15.forwardRef(
|
|
|
1651
1715
|
autoCapitalize: "none",
|
|
1652
1716
|
textContentType: "password"
|
|
1653
1717
|
} : {};
|
|
1654
|
-
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(
|
|
1655
1728
|
TouchableOpacity7,
|
|
1656
1729
|
{
|
|
1657
1730
|
onPress: () => setFocused(true),
|
|
@@ -1688,7 +1761,7 @@ var TextField2 = React15.forwardRef(
|
|
|
1688
1761
|
selectTextOnFocus: !disabled,
|
|
1689
1762
|
onSubmitEditing,
|
|
1690
1763
|
multiline,
|
|
1691
|
-
|
|
1764
|
+
extAlignVertical: multiline ? "top" : "center",
|
|
1692
1765
|
...formProps,
|
|
1693
1766
|
...props,
|
|
1694
1767
|
style: styles2.input
|
|
@@ -1806,7 +1879,8 @@ var Locator = ({
|
|
|
1806
1879
|
shadowOpacity: 0.1,
|
|
1807
1880
|
shadowRadius: float ? 15 : 0,
|
|
1808
1881
|
shadowOffset: {
|
|
1809
|
-
height: 10
|
|
1882
|
+
height: 10,
|
|
1883
|
+
width: 0
|
|
1810
1884
|
},
|
|
1811
1885
|
borderRadius: 10,
|
|
1812
1886
|
marginBottom: 10,
|
|
@@ -1954,7 +2028,7 @@ var SafeAreaView = ({
|
|
|
1954
2028
|
|
|
1955
2029
|
// ../src/Components/Divider.tsx
|
|
1956
2030
|
import { View as View12 } from "react-native";
|
|
1957
|
-
import { ScaledSheet as ScaledSheet14, ms as
|
|
2031
|
+
import { ScaledSheet as ScaledSheet14, ms as ms7 } from "react-native-size-matters";
|
|
1958
2032
|
var Divider = ({
|
|
1959
2033
|
height = 1,
|
|
1960
2034
|
color = "textSecondary",
|
|
@@ -1966,7 +2040,7 @@ var Divider = ({
|
|
|
1966
2040
|
root: {
|
|
1967
2041
|
height,
|
|
1968
2042
|
backgroundColor: colors2[color].main,
|
|
1969
|
-
marginBottom:
|
|
2043
|
+
marginBottom: ms7(gutterBottom),
|
|
1970
2044
|
...style
|
|
1971
2045
|
}
|
|
1972
2046
|
});
|
|
@@ -2021,7 +2095,7 @@ import {
|
|
|
2021
2095
|
TextInput as TextInput3,
|
|
2022
2096
|
View as View14
|
|
2023
2097
|
} from "react-native";
|
|
2024
|
-
import { ScaledSheet as ScaledSheet16, ms as
|
|
2098
|
+
import { ScaledSheet as ScaledSheet16, ms as ms8 } from "react-native-size-matters";
|
|
2025
2099
|
var OTPInput = ({
|
|
2026
2100
|
length = 6,
|
|
2027
2101
|
onChange = () => {
|
|
@@ -2035,12 +2109,10 @@ var OTPInput = ({
|
|
|
2035
2109
|
() => Array(length).fill(0).map((_) => React19.createRef()),
|
|
2036
2110
|
[length]
|
|
2037
2111
|
);
|
|
2038
|
-
console.log("v", value);
|
|
2039
2112
|
const onChangeHandler = (val, index) => {
|
|
2040
2113
|
if (value.length >= length && val.length > 0)
|
|
2041
2114
|
return;
|
|
2042
2115
|
if (val.length > 1) {
|
|
2043
|
-
console.log("reached", val);
|
|
2044
2116
|
const digits = val.replace(/\D/g, "").slice(0, length);
|
|
2045
2117
|
onChange(digits);
|
|
2046
2118
|
if (digits.length === length) {
|
|
@@ -2070,17 +2142,17 @@ var OTPInput = ({
|
|
|
2070
2142
|
root: {},
|
|
2071
2143
|
container: { flexDirection: "row" },
|
|
2072
2144
|
input: {
|
|
2073
|
-
height:
|
|
2074
|
-
width:
|
|
2145
|
+
height: ms8(size),
|
|
2146
|
+
width: ms8(size),
|
|
2075
2147
|
borderColor: colors2.white[5],
|
|
2076
2148
|
backgroundColor: variant === "contained" ? colors2.white[3] : void 0,
|
|
2077
2149
|
borderWidth: variant === "outlined" ? 1 : 0,
|
|
2078
2150
|
borderBottomWidth: variant === "contained" ? 0 : 1,
|
|
2079
|
-
marginHorizontal:
|
|
2151
|
+
marginHorizontal: ms8(spacing * 5),
|
|
2080
2152
|
textAlign: "center",
|
|
2081
2153
|
borderRadius: variant === "text" ? 0 : 10,
|
|
2082
2154
|
color: colors2.dark.main,
|
|
2083
|
-
fontSize:
|
|
2155
|
+
fontSize: ms8(size * 0.5)
|
|
2084
2156
|
}
|
|
2085
2157
|
});
|
|
2086
2158
|
return /* @__PURE__ */ React19.createElement(View14, { style: styles2.root }, /* @__PURE__ */ React19.createElement(View14, { style: styles2.container }, [...Array(length)].map((_, index) => /* @__PURE__ */ React19.createElement(
|