@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.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,6 +925,7 @@ 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,
|
|
@@ -889,12 +936,40 @@ var Popup = ({
|
|
|
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%",
|
|
@@ -910,7 +985,7 @@ var Popup = ({
|
|
|
910
985
|
width: sheet ? "100%" : void 0
|
|
911
986
|
},
|
|
912
987
|
container: {
|
|
913
|
-
paddingBottom: sheet ? "30@ms" : 0,
|
|
988
|
+
paddingBottom: sheet ? "30@ms" : void 0,
|
|
914
989
|
backgroundColor: theme === "dark" ? "#111" : colors2.white[2],
|
|
915
990
|
borderTopLeftRadius: 20,
|
|
916
991
|
borderTopRightRadius: 20,
|
|
@@ -921,7 +996,6 @@ var Popup = ({
|
|
|
921
996
|
},
|
|
922
997
|
content: {
|
|
923
998
|
paddingHorizontal: bare ? void 0 : "15@ms"
|
|
924
|
-
// flex: 1,
|
|
925
999
|
},
|
|
926
1000
|
title: {
|
|
927
1001
|
flexDirection: "row",
|
|
@@ -936,71 +1010,53 @@ var Popup = ({
|
|
|
936
1010
|
backdrop: {
|
|
937
1011
|
position: "absolute",
|
|
938
1012
|
height: "100%",
|
|
939
|
-
zIndex:
|
|
1013
|
+
zIndex: 1,
|
|
940
1014
|
width: "100%",
|
|
941
1015
|
backgroundColor: "#000b"
|
|
942
1016
|
}
|
|
943
1017
|
});
|
|
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
1018
|
const closeAction = () => {
|
|
955
|
-
|
|
956
|
-
setTimeout(() => {
|
|
957
|
-
setShow(false);
|
|
958
|
-
onClose();
|
|
959
|
-
}, 300);
|
|
1019
|
+
onClose();
|
|
960
1020
|
};
|
|
961
|
-
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1021
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
962
1022
|
import_react_native11.Modal,
|
|
963
1023
|
{
|
|
964
1024
|
transparent: true,
|
|
965
|
-
animationType: "
|
|
1025
|
+
animationType: "none",
|
|
966
1026
|
statusBarTranslucent: true,
|
|
967
|
-
visible:
|
|
1027
|
+
visible: modalVisible,
|
|
968
1028
|
onRequestClose: closeAction
|
|
969
1029
|
},
|
|
970
|
-
/* @__PURE__ */ import_react11.default.createElement(import_react_native11.View, { style: styles2.backdrop }),
|
|
971
|
-
|
|
972
|
-
import_react_native11.Modal,
|
|
1030
|
+
/* @__PURE__ */ import_react11.default.createElement(UIThemeProvider, null, /* @__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(
|
|
1031
|
+
import_react_native11.Pressable,
|
|
973
1032
|
{
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1033
|
+
style: [import_react_native11.StyleSheet.absoluteFill, { zIndex: 2 }],
|
|
1034
|
+
onPress: closeAction
|
|
1035
|
+
}
|
|
1036
|
+
), /* @__PURE__ */ import_react11.default.createElement(import_react_native_reanimated2.default.View, { style: [styles2.avoidingView, contentAnimatedStyle] }, /* @__PURE__ */ import_react11.default.createElement(
|
|
1037
|
+
import_react_native11.KeyboardAvoidingView,
|
|
1038
|
+
{
|
|
1039
|
+
keyboardVerticalOffset,
|
|
1040
|
+
behavior: import_react_native11.Platform.OS === "ios" ? "padding" : "padding"
|
|
979
1041
|
},
|
|
980
|
-
/* @__PURE__ */ import_react11.default.createElement(
|
|
981
|
-
|
|
982
|
-
{
|
|
983
|
-
style: import_react_native11.StyleSheet.absoluteFill,
|
|
984
|
-
onPress: closeAction
|
|
985
|
-
}
|
|
986
|
-
), /* @__PURE__ */ import_react11.default.createElement(
|
|
987
|
-
import_react_native11.KeyboardAvoidingView,
|
|
1042
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
1043
|
+
import_react_native_reanimated2.default.View,
|
|
988
1044
|
{
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
behavior: import_react_native11.Platform.OS === "ios" ? "position" : "padding"
|
|
1045
|
+
layout: import_react_native_reanimated2.LinearTransition,
|
|
1046
|
+
style: styles2.container
|
|
992
1047
|
},
|
|
993
|
-
|
|
1048
|
+
!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(
|
|
994
1049
|
IconButton,
|
|
995
1050
|
{
|
|
996
1051
|
size: 20,
|
|
997
1052
|
icon: "close",
|
|
998
1053
|
onPress: closeAction
|
|
999
1054
|
}
|
|
1000
|
-
)), /* @__PURE__ */ import_react11.default.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1055
|
+
)), /* @__PURE__ */ import_react11.default.createElement(Typography_default, { align: "center", fontWeight: 500 }, title)),
|
|
1056
|
+
/* @__PURE__ */ import_react11.default.createElement(import_react_native11.View, { style: styles2.content }, children)
|
|
1057
|
+
)
|
|
1058
|
+
)))))
|
|
1059
|
+
);
|
|
1004
1060
|
};
|
|
1005
1061
|
|
|
1006
1062
|
// ../src/Components/StarRating.tsx
|
|
@@ -1141,8 +1197,8 @@ var RatingInput = ({
|
|
|
1141
1197
|
};
|
|
1142
1198
|
|
|
1143
1199
|
// ../src/Components/Grid.tsx
|
|
1144
|
-
var import_react_native13 = require("react-native");
|
|
1145
1200
|
var import_react13 = __toESM(require("react"));
|
|
1201
|
+
var import_react_native13 = require("react-native");
|
|
1146
1202
|
var import_react_native_size_matters11 = require("react-native-size-matters");
|
|
1147
1203
|
var GridItem = ({
|
|
1148
1204
|
children,
|
|
@@ -1153,8 +1209,8 @@ var GridItem = ({
|
|
|
1153
1209
|
}) => {
|
|
1154
1210
|
const styles2 = import_react_native_size_matters11.ScaledSheet.create({
|
|
1155
1211
|
gridItem: {
|
|
1156
|
-
width: 100 / col
|
|
1157
|
-
padding: spacing * 10
|
|
1212
|
+
width: `${100 / col}%`,
|
|
1213
|
+
padding: (0, import_react_native_size_matters11.ms)(spacing * 10),
|
|
1158
1214
|
alignItems
|
|
1159
1215
|
}
|
|
1160
1216
|
});
|
|
@@ -1168,7 +1224,7 @@ var Grid = ({
|
|
|
1168
1224
|
const styles2 = import_react_native_size_matters11.ScaledSheet.create({
|
|
1169
1225
|
grid: {
|
|
1170
1226
|
flexWrap: "wrap",
|
|
1171
|
-
margin: -spacing * 10
|
|
1227
|
+
margin: `${-spacing * 10}@ms`,
|
|
1172
1228
|
flexDirection: "row"
|
|
1173
1229
|
}
|
|
1174
1230
|
});
|
|
@@ -1402,7 +1458,7 @@ var TextField = ({
|
|
|
1402
1458
|
}, [focused, value]);
|
|
1403
1459
|
const styles2 = import_react_native_size_matters14.ScaledSheet.create({
|
|
1404
1460
|
root: {
|
|
1405
|
-
marginBottom: gutterBottom
|
|
1461
|
+
marginBottom: (0, import_react_native_size_matters14.ms)(gutterBottom),
|
|
1406
1462
|
width: "100%",
|
|
1407
1463
|
...style
|
|
1408
1464
|
},
|
|
@@ -1426,7 +1482,7 @@ var TextField = ({
|
|
|
1426
1482
|
paddingLeft: variant === "text" ? 0 : (0, import_react_native_size_matters14.moderateScale)(15),
|
|
1427
1483
|
paddingRight: (0, import_react_native_size_matters14.moderateScale)(10),
|
|
1428
1484
|
paddingTop: "11@vs",
|
|
1429
|
-
fontFamily:
|
|
1485
|
+
fontFamily: getFontFamily(400),
|
|
1430
1486
|
color: colors2.black[1],
|
|
1431
1487
|
zIndex: 10
|
|
1432
1488
|
// backgroundColor: "#284",
|
|
@@ -1438,7 +1494,7 @@ var TextField = ({
|
|
|
1438
1494
|
paddingTop: "13@ms"
|
|
1439
1495
|
},
|
|
1440
1496
|
label: {
|
|
1441
|
-
fontFamily:
|
|
1497
|
+
fontFamily: getFontFamily(400),
|
|
1442
1498
|
position: "absolute",
|
|
1443
1499
|
left: variant === "text" ? 0 : (0, import_react_native_size_matters14.moderateScale)(15),
|
|
1444
1500
|
fontSize: focused || value ? "10@s" : "13@s",
|
|
@@ -1580,6 +1636,7 @@ var TextField = ({
|
|
|
1580
1636
|
var TextField2 = import_react16.default.forwardRef(
|
|
1581
1637
|
({
|
|
1582
1638
|
label,
|
|
1639
|
+
labelProps,
|
|
1583
1640
|
keyboardType,
|
|
1584
1641
|
color = "primary",
|
|
1585
1642
|
value,
|
|
@@ -1616,7 +1673,7 @@ var TextField2 = import_react16.default.forwardRef(
|
|
|
1616
1673
|
};
|
|
1617
1674
|
const styles2 = import_react_native_size_matters14.ScaledSheet.create({
|
|
1618
1675
|
root: {
|
|
1619
|
-
marginBottom: gutterBottom
|
|
1676
|
+
marginBottom: (0, import_react_native_size_matters14.ms)(gutterBottom),
|
|
1620
1677
|
...style
|
|
1621
1678
|
},
|
|
1622
1679
|
container: {
|
|
@@ -1689,7 +1746,16 @@ var TextField2 = import_react16.default.forwardRef(
|
|
|
1689
1746
|
autoCapitalize: "none",
|
|
1690
1747
|
textContentType: "password"
|
|
1691
1748
|
} : {};
|
|
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(
|
|
1749
|
+
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(
|
|
1750
|
+
Typography_default,
|
|
1751
|
+
{
|
|
1752
|
+
variant: "body1",
|
|
1753
|
+
color: "textSecondary",
|
|
1754
|
+
gutterBottom: 7,
|
|
1755
|
+
...labelProps
|
|
1756
|
+
},
|
|
1757
|
+
label
|
|
1758
|
+
), /* @__PURE__ */ import_react16.default.createElement(
|
|
1693
1759
|
import_react_native16.TouchableOpacity,
|
|
1694
1760
|
{
|
|
1695
1761
|
onPress: () => setFocused(true),
|
|
@@ -1726,7 +1792,7 @@ var TextField2 = import_react16.default.forwardRef(
|
|
|
1726
1792
|
selectTextOnFocus: !disabled,
|
|
1727
1793
|
onSubmitEditing,
|
|
1728
1794
|
multiline,
|
|
1729
|
-
|
|
1795
|
+
extAlignVertical: multiline ? "top" : "center",
|
|
1730
1796
|
...formProps,
|
|
1731
1797
|
...props,
|
|
1732
1798
|
style: styles2.input
|
|
@@ -1844,7 +1910,8 @@ var Locator = ({
|
|
|
1844
1910
|
shadowOpacity: 0.1,
|
|
1845
1911
|
shadowRadius: float ? 15 : 0,
|
|
1846
1912
|
shadowOffset: {
|
|
1847
|
-
height: 10
|
|
1913
|
+
height: 10,
|
|
1914
|
+
width: 0
|
|
1848
1915
|
},
|
|
1849
1916
|
borderRadius: 10,
|
|
1850
1917
|
marginBottom: 10,
|
|
@@ -2070,12 +2137,10 @@ var OTPInput = ({
|
|
|
2070
2137
|
() => Array(length).fill(0).map((_) => import_react20.default.createRef()),
|
|
2071
2138
|
[length]
|
|
2072
2139
|
);
|
|
2073
|
-
console.log("v", value);
|
|
2074
2140
|
const onChangeHandler = (val, index) => {
|
|
2075
2141
|
if (value.length >= length && val.length > 0)
|
|
2076
2142
|
return;
|
|
2077
2143
|
if (val.length > 1) {
|
|
2078
|
-
console.log("reached", val);
|
|
2079
2144
|
const digits = val.replace(/\D/g, "").slice(0, length);
|
|
2080
2145
|
onChange(digits);
|
|
2081
2146
|
if (digits.length === length) {
|