@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.js
CHANGED
|
@@ -228,7 +228,7 @@ function initialize(config2) {
|
|
|
228
228
|
try {
|
|
229
229
|
setConfig({
|
|
230
230
|
GOOGLE_MAP_API_KEY: config2.googleMapApiKey,
|
|
231
|
-
|
|
231
|
+
TYPOGRAPHY: config2.typography,
|
|
232
232
|
EDGE_TO_EDGE: config2.edgeToEdge ?? false
|
|
233
233
|
});
|
|
234
234
|
if (config2.colors)
|
|
@@ -259,6 +259,7 @@ var import_react_native_safe_area_context2 = require("react-native-safe-area-con
|
|
|
259
259
|
// ../src/Components/FlashMessage.tsx
|
|
260
260
|
var import_react2 = __toESM(require("react"));
|
|
261
261
|
var import_react_native2 = require("react-native");
|
|
262
|
+
var import_react_native_reanimated = __toESM(require("react-native-reanimated"));
|
|
262
263
|
var import_react_native_safe_area_context = require("react-native-safe-area-context");
|
|
263
264
|
var import_react_native_size_matters2 = require("react-native-size-matters");
|
|
264
265
|
|
|
@@ -266,12 +267,19 @@ var import_react_native_size_matters2 = require("react-native-size-matters");
|
|
|
266
267
|
var import_react = __toESM(require("react"));
|
|
267
268
|
var import_react_native = require("react-native");
|
|
268
269
|
var import_react_native_size_matters = require("react-native-size-matters");
|
|
270
|
+
|
|
271
|
+
// ../src/utility.ts
|
|
272
|
+
var getFontFamily = (fontWeight) => {
|
|
273
|
+
return getConfig().TYPOGRAPHY?.fontWeights?.[fontWeight] || getConfig().TYPOGRAPHY?.fontFamily || void 0;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
// ../src/Components/Typography.tsx
|
|
269
277
|
var Typography = (0, import_react.forwardRef)(
|
|
270
278
|
({
|
|
271
279
|
children,
|
|
272
280
|
color = "dark",
|
|
273
281
|
style = {},
|
|
274
|
-
textCase
|
|
282
|
+
textCase,
|
|
275
283
|
variant = "body1",
|
|
276
284
|
align = "left",
|
|
277
285
|
gutterBottom = 0,
|
|
@@ -279,10 +287,11 @@ var Typography = (0, import_react.forwardRef)(
|
|
|
279
287
|
fontWeight = 400,
|
|
280
288
|
fontFamily,
|
|
281
289
|
// NEW PROP ADDED
|
|
290
|
+
fontSize,
|
|
282
291
|
...props
|
|
283
292
|
}, ref) => {
|
|
284
293
|
const colors2 = useColors();
|
|
285
|
-
const
|
|
294
|
+
const _fontSize = {
|
|
286
295
|
h1: (0, import_react_native_size_matters.moderateScale)(42),
|
|
287
296
|
h2: (0, import_react_native_size_matters.moderateScale)(37),
|
|
288
297
|
h3: (0, import_react_native_size_matters.moderateScale)(32),
|
|
@@ -295,15 +304,14 @@ var Typography = (0, import_react.forwardRef)(
|
|
|
295
304
|
};
|
|
296
305
|
const styles2 = import_react_native.StyleSheet.create({
|
|
297
306
|
text: {
|
|
298
|
-
fontSize: fontSize[variant],
|
|
299
|
-
marginBottom: (0, import_react_native_size_matters.
|
|
307
|
+
fontSize: fontSize || _fontSize[variant],
|
|
308
|
+
marginBottom: (0, import_react_native_size_matters.ms)(gutterBottom) || 0,
|
|
300
309
|
color: colors2[color]?.main || color,
|
|
301
310
|
textTransform: textCase,
|
|
302
311
|
alignItems: "center",
|
|
303
312
|
textAlign: align,
|
|
304
313
|
fontWeight,
|
|
305
|
-
fontFamily: fontFamily ||
|
|
306
|
-
// Use custom font if provided, else default
|
|
314
|
+
fontFamily: fontFamily || getFontFamily(fontWeight)
|
|
307
315
|
}
|
|
308
316
|
});
|
|
309
317
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -326,28 +334,53 @@ var showFlashMessage = () => {
|
|
|
326
334
|
var FlashMessage = () => {
|
|
327
335
|
const { top } = (0, import_react_native_safe_area_context.useSafeAreaInsets)();
|
|
328
336
|
const [message, setMessage] = (0, import_react2.useState)(null);
|
|
329
|
-
const [show, setShow] = (0, import_react2.useState)(false);
|
|
330
337
|
const colors2 = useColors();
|
|
331
338
|
const type = message?.type || "success";
|
|
339
|
+
const timeoutRef = (0, import_react2.useRef)(null);
|
|
340
|
+
const translateY = (0, import_react_native_reanimated.useSharedValue)(-200);
|
|
341
|
+
const opacity = (0, import_react_native_reanimated.useSharedValue)(0);
|
|
342
|
+
const hideMessage = () => {
|
|
343
|
+
setMessage(null);
|
|
344
|
+
};
|
|
345
|
+
const closeMessage = () => {
|
|
346
|
+
if (timeoutRef.current) {
|
|
347
|
+
clearTimeout(timeoutRef.current);
|
|
348
|
+
timeoutRef.current = null;
|
|
349
|
+
}
|
|
350
|
+
translateY.value = (0, import_react_native_reanimated.withTiming)(-200, { duration: 300 });
|
|
351
|
+
opacity.value = (0, import_react_native_reanimated.withTiming)(0, { duration: 300 }, () => {
|
|
352
|
+
(0, import_react_native_reanimated.runOnJS)(hideMessage)();
|
|
353
|
+
});
|
|
354
|
+
};
|
|
332
355
|
showFlashMessage = (msg) => {
|
|
356
|
+
if (timeoutRef.current) {
|
|
357
|
+
clearTimeout(timeoutRef.current);
|
|
358
|
+
timeoutRef.current = null;
|
|
359
|
+
}
|
|
360
|
+
translateY.value = -200;
|
|
361
|
+
opacity.value = 0;
|
|
333
362
|
setMessage(msg);
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
setTimeout(() => {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
|
|
363
|
+
translateY.value = (0, import_react_native_reanimated.withTiming)(0, { duration: 300 });
|
|
364
|
+
opacity.value = (0, import_react_native_reanimated.withTiming)(1, { duration: 300 });
|
|
365
|
+
const duration = msg.duration || 3e3;
|
|
366
|
+
timeoutRef.current = setTimeout(() => {
|
|
367
|
+
translateY.value = (0, import_react_native_reanimated.withTiming)(-200, { duration: 300 });
|
|
368
|
+
opacity.value = (0, import_react_native_reanimated.withTiming)(0, { duration: 300 }, () => {
|
|
369
|
+
(0, import_react_native_reanimated.runOnJS)(hideMessage)();
|
|
370
|
+
});
|
|
371
|
+
timeoutRef.current = null;
|
|
372
|
+
}, duration);
|
|
343
373
|
};
|
|
344
|
-
(0,
|
|
345
|
-
|
|
346
|
-
|
|
374
|
+
const animatedStyle = (0, import_react_native_reanimated.useAnimatedStyle)(() => {
|
|
375
|
+
return {
|
|
376
|
+
transform: [{ translateY: translateY.value }],
|
|
377
|
+
opacity: opacity.value
|
|
378
|
+
};
|
|
379
|
+
});
|
|
347
380
|
const styles2 = import_react_native_size_matters2.ScaledSheet.create({
|
|
348
381
|
root: {
|
|
349
382
|
position: "absolute",
|
|
350
|
-
top:
|
|
383
|
+
top: 0,
|
|
351
384
|
zIndex: 1e3,
|
|
352
385
|
left: 0,
|
|
353
386
|
paddingTop: top + 10,
|
|
@@ -368,7 +401,9 @@ var FlashMessage = () => {
|
|
|
368
401
|
backgroundColor: "#fff3"
|
|
369
402
|
}
|
|
370
403
|
});
|
|
371
|
-
|
|
404
|
+
if (!message)
|
|
405
|
+
return null;
|
|
406
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react_native_reanimated.default.View, { style: [styles2.root, animatedStyle] }, /* @__PURE__ */ import_react2.default.createElement(import_react_native2.TouchableOpacity, { onPress: closeMessage, activeOpacity: 0.9 }, /* @__PURE__ */ import_react2.default.createElement(import_react_native2.View, { style: { flexDirection: "row" } }, /* @__PURE__ */ import_react2.default.createElement(import_react_native2.View, { style: { flex: 1, marginRight: 10 } }, message?.title && /* @__PURE__ */ import_react2.default.createElement(
|
|
372
407
|
Typography_default,
|
|
373
408
|
{
|
|
374
409
|
variant: "h6",
|
|
@@ -377,7 +412,18 @@ var FlashMessage = () => {
|
|
|
377
412
|
style: { color: "#fff" }
|
|
378
413
|
},
|
|
379
414
|
message?.title
|
|
380
|
-
), /* @__PURE__ */ import_react2.default.createElement(Typography_default, { style: { color: "#fff" } }, message?.message))), message?.actions?.map((cur, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
415
|
+
), /* @__PURE__ */ import_react2.default.createElement(Typography_default, { style: { color: "#fff" } }, message?.message)))), message?.actions?.map((cur, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
416
|
+
import_react_native2.TouchableOpacity,
|
|
417
|
+
{
|
|
418
|
+
key: i,
|
|
419
|
+
style: styles2.action,
|
|
420
|
+
onPress: () => {
|
|
421
|
+
cur.onPress?.();
|
|
422
|
+
closeMessage();
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
/* @__PURE__ */ import_react2.default.createElement(Typography_default, { fontWeight: 700, style: { color: "#fff" } }, cur.title)
|
|
426
|
+
)));
|
|
381
427
|
};
|
|
382
428
|
var FlashMessage_default = FlashMessage;
|
|
383
429
|
|
|
@@ -574,7 +620,7 @@ var AlertX = ({
|
|
|
574
620
|
borderRadius: 8,
|
|
575
621
|
alignItems: "center",
|
|
576
622
|
flexDirection: "row",
|
|
577
|
-
marginBottom:
|
|
623
|
+
marginBottom: (0, import_react_native_size_matters4.ms)(gutterBottom),
|
|
578
624
|
backgroundColor: colors2[type].main + (variant === "contained" ? "" : "3")
|
|
579
625
|
},
|
|
580
626
|
title: {
|
|
@@ -584,7 +630,7 @@ var AlertX = ({
|
|
|
584
630
|
color: variant === "contained" ? "#fff" : colors2[type].main
|
|
585
631
|
}
|
|
586
632
|
});
|
|
587
|
-
return /* @__PURE__ */ import_react6.default.createElement(import_react_native6.View, { style:
|
|
633
|
+
return /* @__PURE__ */ import_react6.default.createElement(import_react_native6.View, { style: [styles2.container, style] }, /* @__PURE__ */ import_react6.default.createElement(import_react_native6.View, { style: { width: "80%" } }, /* @__PURE__ */ import_react6.default.createElement(Typography_default, { style: styles2.title, gutterBottom: 3, fontWeight: 700 }, title), body && /* @__PURE__ */ import_react6.default.createElement(Typography_default, { fontWeight: 700, variant: "body2", style: styles2.body }, body)), /* @__PURE__ */ import_react6.default.createElement(import_react_native6.View, { style: { marginLeft: "auto" } }, /* @__PURE__ */ import_react6.default.createElement(
|
|
588
634
|
import_vector_icons.MaterialIcons,
|
|
589
635
|
{
|
|
590
636
|
color: variant === "contained" ? "#fff" : colors2[type].main,
|
|
@@ -612,14 +658,14 @@ var Avatar = ({
|
|
|
612
658
|
const styles2 = import_react_native_size_matters5.ScaledSheet.create({
|
|
613
659
|
root: {
|
|
614
660
|
borderRadius: 150,
|
|
615
|
-
height:
|
|
616
|
-
width:
|
|
661
|
+
height: (0, import_react_native_size_matters5.ms)(size),
|
|
662
|
+
width: (0, import_react_native_size_matters5.ms)(size),
|
|
617
663
|
alignItems: "center",
|
|
618
664
|
justifyContent: "center",
|
|
619
665
|
overflow: "hidden",
|
|
620
666
|
borderWidth: variant === "outlined" ? 5 : 0,
|
|
621
667
|
borderColor: variant === "outlined" ? "#fff" : "#0000",
|
|
622
|
-
backgroundColor: variant === "outlined" ?
|
|
668
|
+
backgroundColor: variant === "outlined" ? void 0 : label ? colors2[color].main : colors2.white[4],
|
|
623
669
|
...style
|
|
624
670
|
},
|
|
625
671
|
image: {
|
|
@@ -641,7 +687,7 @@ var LinkButton = ({
|
|
|
641
687
|
style = {},
|
|
642
688
|
color = "blue",
|
|
643
689
|
fontSize = 12,
|
|
644
|
-
fontWeight =
|
|
690
|
+
fontWeight = 400,
|
|
645
691
|
disabled,
|
|
646
692
|
onPress = () => {
|
|
647
693
|
}
|
|
@@ -650,8 +696,8 @@ var LinkButton = ({
|
|
|
650
696
|
const styles2 = import_react_native_size_matters6.ScaledSheet.create({
|
|
651
697
|
text: {
|
|
652
698
|
fontSize: (0, import_react_native_size_matters6.moderateScale)(fontSize),
|
|
653
|
-
fontWeight,
|
|
654
|
-
fontFamily:
|
|
699
|
+
fontWeight: fontWeight.toString(),
|
|
700
|
+
fontFamily: getFontFamily(fontWeight),
|
|
655
701
|
color: disabled ? "#777" : colors2[color].main
|
|
656
702
|
}
|
|
657
703
|
});
|
|
@@ -677,7 +723,7 @@ var IconButton = ({
|
|
|
677
723
|
container: {
|
|
678
724
|
alignSelf: "flex-start",
|
|
679
725
|
flexGrow: 0,
|
|
680
|
-
backgroundColor: bg ? bgColor : elevation > 0 ? bgColor :
|
|
726
|
+
backgroundColor: bg ? bgColor : elevation > 0 ? bgColor : void 0,
|
|
681
727
|
padding: "5@ms",
|
|
682
728
|
shadowColor: "#000",
|
|
683
729
|
shadowOpacity: 0.1,
|
|
@@ -685,8 +731,8 @@ var IconButton = ({
|
|
|
685
731
|
height: 1,
|
|
686
732
|
width: 0
|
|
687
733
|
},
|
|
688
|
-
height: bg ? size + 20
|
|
689
|
-
width: bg ? size + 20
|
|
734
|
+
height: bg ? (0, import_react_native_size_matters6.ms)(size + 20) : void 0,
|
|
735
|
+
width: bg ? (0, import_react_native_size_matters6.ms)(size + 20) : void 0,
|
|
690
736
|
alignItems: "center",
|
|
691
737
|
justifyContent: "center",
|
|
692
738
|
shadowRadius: elevation,
|
|
@@ -737,10 +783,10 @@ var Button = (0, import_react8.forwardRef)(
|
|
|
737
783
|
alignItems: "center",
|
|
738
784
|
alignSelf: "flex-start",
|
|
739
785
|
justifyContent: "center",
|
|
740
|
-
backgroundColor: variant === "text" || variant === "outlined" ?
|
|
786
|
+
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,
|
|
741
787
|
borderRadius: rounded ? 30 : 10,
|
|
742
788
|
elevation: variant === "text" ? 0 : elevation,
|
|
743
|
-
paddingVertical: size === "small" ? 8 : size === "large" ? "15@
|
|
789
|
+
paddingVertical: size === "small" ? 8 : size === "large" ? "15@mvs" : "13@mvs",
|
|
744
790
|
paddingHorizontal: size === "small" ? "10@ms" : "18@ms",
|
|
745
791
|
borderColor: colors2[color].main,
|
|
746
792
|
borderWidth: variant === "outlined" ? 1 : 0,
|
|
@@ -752,14 +798,14 @@ var Button = (0, import_react8.forwardRef)(
|
|
|
752
798
|
width: 0
|
|
753
799
|
},
|
|
754
800
|
shadowOpacity: variant === "text" ? 0 : 0.3,
|
|
755
|
-
width: fullWidth ? "100%" :
|
|
801
|
+
width: fullWidth ? "100%" : void 0,
|
|
756
802
|
...style
|
|
757
803
|
},
|
|
758
804
|
text: {
|
|
759
805
|
color: disabled ? variant === "text" || variant === "outlined" ? colors2.black[1] : colors2[color].text : colors2[color][variant === "text" || variant === "outlined" ? "main" : "text"],
|
|
760
806
|
fontWeight: variant === "outlined" ? "700" : "500",
|
|
761
|
-
fontSize: size === "small" ? "12@ms" : "
|
|
762
|
-
fontFamily:
|
|
807
|
+
fontSize: size === "small" ? "12@ms" : "13@ms",
|
|
808
|
+
fontFamily: getFontFamily(variant === "outlined" ? 700 : 500)
|
|
763
809
|
}
|
|
764
810
|
});
|
|
765
811
|
return /* @__PURE__ */ import_react8.default.createElement(
|
|
@@ -879,39 +925,71 @@ var import_react_native_size_matters10 = require("react-native-size-matters");
|
|
|
879
925
|
// ../src/Components/Popup.tsx
|
|
880
926
|
var import_react_native11 = require("react-native");
|
|
881
927
|
var import_react11 = __toESM(require("react"));
|
|
928
|
+
var import_react_native_reanimated2 = __toESM(require("react-native-reanimated"));
|
|
882
929
|
var import_react_native_size_matters9 = require("react-native-size-matters");
|
|
883
930
|
var Popup = ({
|
|
884
931
|
title,
|
|
885
932
|
sheet,
|
|
886
933
|
bare = false,
|
|
887
|
-
keyboardVerticalOffset,
|
|
934
|
+
keyboardVerticalOffset = -10,
|
|
888
935
|
children,
|
|
889
936
|
open,
|
|
890
937
|
onClose = () => {
|
|
891
938
|
},
|
|
892
|
-
style
|
|
939
|
+
style,
|
|
940
|
+
onModalShow,
|
|
941
|
+
onModalHide
|
|
893
942
|
}) => {
|
|
894
943
|
const theme = useTheme();
|
|
895
944
|
const colors2 = useColors();
|
|
896
|
-
const [
|
|
897
|
-
const
|
|
945
|
+
const [modalVisible, setModalVisible] = (0, import_react11.useState)(false);
|
|
946
|
+
const backdropOpacity = (0, import_react_native_reanimated2.useSharedValue)(0);
|
|
947
|
+
const contentTranslateY = (0, import_react_native_reanimated2.useSharedValue)(1e3);
|
|
948
|
+
(0, import_react11.useEffect)(() => {
|
|
949
|
+
if (open) {
|
|
950
|
+
setModalVisible(true);
|
|
951
|
+
backdropOpacity.value = (0, import_react_native_reanimated2.withTiming)(1, { duration: 300 });
|
|
952
|
+
contentTranslateY.value = (0, import_react_native_reanimated2.withTiming)(0, { duration: 300 }, () => {
|
|
953
|
+
if (onModalShow) {
|
|
954
|
+
(0, import_react_native_reanimated2.runOnJS)(onModalShow)();
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
} else {
|
|
958
|
+
backdropOpacity.value = (0, import_react_native_reanimated2.withTiming)(0, { duration: 200 });
|
|
959
|
+
contentTranslateY.value = (0, import_react_native_reanimated2.withTiming)(1e3, { duration: 200 }, () => {
|
|
960
|
+
(0, import_react_native_reanimated2.runOnJS)(setModalVisible)(false);
|
|
961
|
+
if (onModalHide) {
|
|
962
|
+
(0, import_react_native_reanimated2.runOnJS)(onModalHide)();
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
}, [open]);
|
|
967
|
+
const backdropAnimatedStyle = (0, import_react_native_reanimated2.useAnimatedStyle)(() => ({
|
|
968
|
+
opacity: backdropOpacity.value
|
|
969
|
+
}));
|
|
970
|
+
const contentAnimatedStyle = (0, import_react_native_reanimated2.useAnimatedStyle)(() => ({
|
|
971
|
+
transform: [{ translateY: contentTranslateY.value }]
|
|
972
|
+
}));
|
|
898
973
|
const styles2 = import_react_native_size_matters9.ScaledSheet.create({
|
|
899
974
|
root: {
|
|
900
975
|
height: "100%",
|
|
901
976
|
width: "100%",
|
|
902
977
|
justifyContent: sheet ? "flex-end" : "center"
|
|
903
978
|
},
|
|
979
|
+
keyboardView: {
|
|
980
|
+
flex: 1
|
|
981
|
+
},
|
|
904
982
|
avoidingView: {
|
|
905
983
|
minHeight: typeof sheet === "number" ? sheet : void 0,
|
|
906
|
-
maxHeight: "
|
|
984
|
+
maxHeight: "90%",
|
|
907
985
|
zIndex: 1e3,
|
|
908
986
|
alignSelf: "center",
|
|
909
987
|
maxWidth: sheet ? void 0 : "90%",
|
|
910
988
|
width: sheet ? "100%" : void 0
|
|
911
989
|
},
|
|
912
990
|
container: {
|
|
913
|
-
paddingBottom: sheet ? "30@ms" : 0,
|
|
914
|
-
backgroundColor: theme === "dark" ? "#111" : colors2.white[
|
|
991
|
+
paddingBottom: sheet ? "30@ms" : void 0,
|
|
992
|
+
backgroundColor: theme === "dark" ? "#111" : colors2.white[1],
|
|
915
993
|
borderTopLeftRadius: 20,
|
|
916
994
|
borderTopRightRadius: 20,
|
|
917
995
|
borderBottomRightRadius: sheet ? 0 : 20,
|
|
@@ -921,7 +999,6 @@ var Popup = ({
|
|
|
921
999
|
},
|
|
922
1000
|
content: {
|
|
923
1001
|
paddingHorizontal: bare ? void 0 : "15@ms"
|
|
924
|
-
// flex: 1,
|
|
925
1002
|
},
|
|
926
1003
|
title: {
|
|
927
1004
|
flexDirection: "row",
|
|
@@ -936,71 +1013,61 @@ var Popup = ({
|
|
|
936
1013
|
backdrop: {
|
|
937
1014
|
position: "absolute",
|
|
938
1015
|
height: "100%",
|
|
939
|
-
zIndex:
|
|
1016
|
+
zIndex: 1,
|
|
940
1017
|
width: "100%",
|
|
941
1018
|
backgroundColor: "#000b"
|
|
942
1019
|
}
|
|
943
1020
|
});
|
|
944
|
-
import_react11.default.useEffect(() => {
|
|
945
|
-
if (open) {
|
|
946
|
-
setShow(open);
|
|
947
|
-
setTimeout(() => {
|
|
948
|
-
setShowSecondary(open);
|
|
949
|
-
}, 500);
|
|
950
|
-
} else {
|
|
951
|
-
closeAction();
|
|
952
|
-
}
|
|
953
|
-
}, [open]);
|
|
954
1021
|
const closeAction = () => {
|
|
955
|
-
|
|
956
|
-
setTimeout(() => {
|
|
957
|
-
setShow(false);
|
|
958
|
-
onClose();
|
|
959
|
-
}, 300);
|
|
1022
|
+
onClose();
|
|
960
1023
|
};
|
|
961
|
-
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1024
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
962
1025
|
import_react_native11.Modal,
|
|
963
1026
|
{
|
|
964
1027
|
transparent: true,
|
|
965
|
-
animationType: "
|
|
1028
|
+
animationType: "none",
|
|
966
1029
|
statusBarTranslucent: true,
|
|
967
|
-
visible:
|
|
1030
|
+
visible: modalVisible,
|
|
968
1031
|
onRequestClose: closeAction
|
|
969
1032
|
},
|
|
970
|
-
/* @__PURE__ */ import_react11.default.createElement(import_react_native11.View, { style: styles2.backdrop }),
|
|
971
1033
|
/* @__PURE__ */ import_react11.default.createElement(UIThemeProvider, null, /* @__PURE__ */ import_react11.default.createElement(
|
|
972
|
-
import_react_native11.
|
|
1034
|
+
import_react_native11.KeyboardAvoidingView,
|
|
973
1035
|
{
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
visible: showSecondary,
|
|
978
|
-
onRequestClose: closeAction
|
|
1036
|
+
style: styles2.keyboardView,
|
|
1037
|
+
behavior: import_react_native11.Platform.OS === "ios" ? "padding" : void 0,
|
|
1038
|
+
keyboardVerticalOffset
|
|
979
1039
|
},
|
|
980
|
-
/* @__PURE__ */ import_react11.default.createElement(import_react_native11.TouchableWithoutFeedback, { onPress: import_react_native11.Keyboard.dismiss }, /* @__PURE__ */ import_react11.default.createElement(import_react_native11.View, { style: styles2.root }, open && /* @__PURE__ */ import_react11.default.createElement(
|
|
1040
|
+
/* @__PURE__ */ import_react11.default.createElement(import_react_native11.TouchableWithoutFeedback, { onPress: import_react_native11.Keyboard.dismiss }, /* @__PURE__ */ import_react11.default.createElement(import_react_native11.View, { style: styles2.root }, /* @__PURE__ */ import_react11.default.createElement(import_react_native_reanimated2.default.View, { style: [styles2.backdrop, backdropAnimatedStyle] }), open && /* @__PURE__ */ import_react11.default.createElement(
|
|
981
1041
|
import_react_native11.Pressable,
|
|
982
1042
|
{
|
|
983
|
-
style: import_react_native11.StyleSheet.absoluteFill,
|
|
1043
|
+
style: [import_react_native11.StyleSheet.absoluteFill, { zIndex: 2 }],
|
|
984
1044
|
onPress: closeAction
|
|
985
1045
|
}
|
|
986
1046
|
), /* @__PURE__ */ import_react11.default.createElement(
|
|
987
|
-
|
|
1047
|
+
import_react_native_reanimated2.default.View,
|
|
988
1048
|
{
|
|
989
|
-
style: styles2.avoidingView,
|
|
990
|
-
|
|
991
|
-
behavior: import_react_native11.Platform.OS === "ios" ? "position" : "padding"
|
|
1049
|
+
style: [styles2.avoidingView, contentAnimatedStyle],
|
|
1050
|
+
layout: import_react_native_reanimated2.LinearTransition
|
|
992
1051
|
},
|
|
993
|
-
/* @__PURE__ */ import_react11.default.createElement(
|
|
994
|
-
|
|
1052
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
1053
|
+
import_react_native_reanimated2.default.View,
|
|
995
1054
|
{
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
}
|
|
1000
|
-
|
|
1055
|
+
layout: import_react_native_reanimated2.LinearTransition,
|
|
1056
|
+
style: styles2.container
|
|
1057
|
+
},
|
|
1058
|
+
!bare && /* @__PURE__ */ import_react11.default.createElement(import_react_native11.View, { style: styles2.title }, /* @__PURE__ */ import_react11.default.createElement(import_react_native11.View, { style: styles2.titleIcon }, /* @__PURE__ */ import_react11.default.createElement(
|
|
1059
|
+
IconButton,
|
|
1060
|
+
{
|
|
1061
|
+
size: 20,
|
|
1062
|
+
icon: "close",
|
|
1063
|
+
onPress: closeAction
|
|
1064
|
+
}
|
|
1065
|
+
)), /* @__PURE__ */ import_react11.default.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
|
|
1066
|
+
/* @__PURE__ */ import_react11.default.createElement(import_react_native11.View, { style: styles2.content }, children)
|
|
1067
|
+
)
|
|
1001
1068
|
)))
|
|
1002
1069
|
))
|
|
1003
|
-
)
|
|
1070
|
+
);
|
|
1004
1071
|
};
|
|
1005
1072
|
|
|
1006
1073
|
// ../src/Components/StarRating.tsx
|
|
@@ -1141,8 +1208,8 @@ var RatingInput = ({
|
|
|
1141
1208
|
};
|
|
1142
1209
|
|
|
1143
1210
|
// ../src/Components/Grid.tsx
|
|
1144
|
-
var import_react_native13 = require("react-native");
|
|
1145
1211
|
var import_react13 = __toESM(require("react"));
|
|
1212
|
+
var import_react_native13 = require("react-native");
|
|
1146
1213
|
var import_react_native_size_matters11 = require("react-native-size-matters");
|
|
1147
1214
|
var GridItem = ({
|
|
1148
1215
|
children,
|
|
@@ -1153,8 +1220,8 @@ var GridItem = ({
|
|
|
1153
1220
|
}) => {
|
|
1154
1221
|
const styles2 = import_react_native_size_matters11.ScaledSheet.create({
|
|
1155
1222
|
gridItem: {
|
|
1156
|
-
width: 100 / col
|
|
1157
|
-
padding: spacing * 10
|
|
1223
|
+
width: `${100 / col}%`,
|
|
1224
|
+
padding: (0, import_react_native_size_matters11.ms)(spacing * 10),
|
|
1158
1225
|
alignItems
|
|
1159
1226
|
}
|
|
1160
1227
|
});
|
|
@@ -1168,7 +1235,7 @@ var Grid = ({
|
|
|
1168
1235
|
const styles2 = import_react_native_size_matters11.ScaledSheet.create({
|
|
1169
1236
|
grid: {
|
|
1170
1237
|
flexWrap: "wrap",
|
|
1171
|
-
margin: -spacing * 10
|
|
1238
|
+
margin: `${-spacing * 10}@ms`,
|
|
1172
1239
|
flexDirection: "row"
|
|
1173
1240
|
}
|
|
1174
1241
|
});
|
|
@@ -1402,7 +1469,7 @@ var TextField = ({
|
|
|
1402
1469
|
}, [focused, value]);
|
|
1403
1470
|
const styles2 = import_react_native_size_matters14.ScaledSheet.create({
|
|
1404
1471
|
root: {
|
|
1405
|
-
marginBottom: gutterBottom
|
|
1472
|
+
marginBottom: (0, import_react_native_size_matters14.ms)(gutterBottom),
|
|
1406
1473
|
width: "100%",
|
|
1407
1474
|
...style
|
|
1408
1475
|
},
|
|
@@ -1426,7 +1493,7 @@ var TextField = ({
|
|
|
1426
1493
|
paddingLeft: variant === "text" ? 0 : (0, import_react_native_size_matters14.moderateScale)(15),
|
|
1427
1494
|
paddingRight: (0, import_react_native_size_matters14.moderateScale)(10),
|
|
1428
1495
|
paddingTop: "11@vs",
|
|
1429
|
-
fontFamily:
|
|
1496
|
+
fontFamily: getFontFamily(400),
|
|
1430
1497
|
color: colors2.black[1],
|
|
1431
1498
|
zIndex: 10
|
|
1432
1499
|
// backgroundColor: "#284",
|
|
@@ -1438,7 +1505,7 @@ var TextField = ({
|
|
|
1438
1505
|
paddingTop: "13@ms"
|
|
1439
1506
|
},
|
|
1440
1507
|
label: {
|
|
1441
|
-
fontFamily:
|
|
1508
|
+
fontFamily: getFontFamily(400),
|
|
1442
1509
|
position: "absolute",
|
|
1443
1510
|
left: variant === "text" ? 0 : (0, import_react_native_size_matters14.moderateScale)(15),
|
|
1444
1511
|
fontSize: focused || value ? "10@s" : "13@s",
|
|
@@ -1580,6 +1647,7 @@ var TextField = ({
|
|
|
1580
1647
|
var TextField2 = import_react16.default.forwardRef(
|
|
1581
1648
|
({
|
|
1582
1649
|
label,
|
|
1650
|
+
labelProps,
|
|
1583
1651
|
keyboardType,
|
|
1584
1652
|
color = "primary",
|
|
1585
1653
|
value,
|
|
@@ -1616,7 +1684,7 @@ var TextField2 = import_react16.default.forwardRef(
|
|
|
1616
1684
|
};
|
|
1617
1685
|
const styles2 = import_react_native_size_matters14.ScaledSheet.create({
|
|
1618
1686
|
root: {
|
|
1619
|
-
marginBottom: gutterBottom
|
|
1687
|
+
marginBottom: (0, import_react_native_size_matters14.ms)(gutterBottom),
|
|
1620
1688
|
...style
|
|
1621
1689
|
},
|
|
1622
1690
|
container: {
|
|
@@ -1689,7 +1757,16 @@ var TextField2 = import_react16.default.forwardRef(
|
|
|
1689
1757
|
autoCapitalize: "none",
|
|
1690
1758
|
textContentType: "password"
|
|
1691
1759
|
} : {};
|
|
1692
|
-
return /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement(import_react_native16.View, { style: styles2.root }, label && /* @__PURE__ */ import_react16.default.createElement(
|
|
1760
|
+
return /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement(import_react_native16.View, { style: styles2.root }, label && /* @__PURE__ */ import_react16.default.createElement(
|
|
1761
|
+
Typography_default,
|
|
1762
|
+
{
|
|
1763
|
+
variant: "body2",
|
|
1764
|
+
color: "textSecondary",
|
|
1765
|
+
gutterBottom: 7,
|
|
1766
|
+
...labelProps
|
|
1767
|
+
},
|
|
1768
|
+
label
|
|
1769
|
+
), /* @__PURE__ */ import_react16.default.createElement(
|
|
1693
1770
|
import_react_native16.TouchableOpacity,
|
|
1694
1771
|
{
|
|
1695
1772
|
onPress: () => setFocused(true),
|
|
@@ -1726,7 +1803,7 @@ var TextField2 = import_react16.default.forwardRef(
|
|
|
1726
1803
|
selectTextOnFocus: !disabled,
|
|
1727
1804
|
onSubmitEditing,
|
|
1728
1805
|
multiline,
|
|
1729
|
-
|
|
1806
|
+
extAlignVertical: multiline ? "top" : "center",
|
|
1730
1807
|
...formProps,
|
|
1731
1808
|
...props,
|
|
1732
1809
|
style: styles2.input
|
|
@@ -1844,7 +1921,8 @@ var Locator = ({
|
|
|
1844
1921
|
shadowOpacity: 0.1,
|
|
1845
1922
|
shadowRadius: float ? 15 : 0,
|
|
1846
1923
|
shadowOffset: {
|
|
1847
|
-
height: 10
|
|
1924
|
+
height: 10,
|
|
1925
|
+
width: 0
|
|
1848
1926
|
},
|
|
1849
1927
|
borderRadius: 10,
|
|
1850
1928
|
marginBottom: 10,
|
|
@@ -2070,12 +2148,10 @@ var OTPInput = ({
|
|
|
2070
2148
|
() => Array(length).fill(0).map((_) => import_react20.default.createRef()),
|
|
2071
2149
|
[length]
|
|
2072
2150
|
);
|
|
2073
|
-
console.log("v", value);
|
|
2074
2151
|
const onChangeHandler = (val, index) => {
|
|
2075
2152
|
if (value.length >= length && val.length > 0)
|
|
2076
2153
|
return;
|
|
2077
2154
|
if (val.length > 1) {
|
|
2078
|
-
console.log("reached", val);
|
|
2079
2155
|
const digits = val.replace(/\D/g, "").slice(0, length);
|
|
2080
2156
|
onChange(digits);
|
|
2081
2157
|
if (digits.length === length) {
|