@retray-dev/ui-kit 2.8.0 → 3.0.0
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/COMPONENTS.md +71 -15
- package/README.md +23 -3
- package/dist/index.d.mts +16 -5
- package/dist/index.d.ts +16 -5
- package/dist/index.js +441 -327
- package/dist/index.mjs +442 -328
- package/package.json +6 -3
- package/src/assets/fonts/Poppins-Black.ttf +0 -0
- package/src/assets/fonts/Poppins-BlackItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Bold.ttf +0 -0
- package/src/assets/fonts/Poppins-BoldItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraBoldItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraLight.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraLightItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Italic.ttf +0 -0
- package/src/assets/fonts/Poppins-Light.ttf +0 -0
- package/src/assets/fonts/Poppins-LightItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Medium.ttf +0 -0
- package/src/assets/fonts/Poppins-MediumItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Regular.ttf +0 -0
- package/src/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/src/assets/fonts/Poppins-SemiBoldItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Thin.ttf +0 -0
- package/src/assets/fonts/Poppins-ThinItalic.ttf +0 -0
- package/src/components/Accordion/Accordion.tsx +16 -9
- package/src/components/AlertBanner/AlertBanner.tsx +35 -35
- package/src/components/Avatar/Avatar.tsx +1 -1
- package/src/components/Badge/Badge.tsx +12 -8
- package/src/components/Button/Button.tsx +8 -8
- package/src/components/Card/Card.tsx +12 -9
- package/src/components/Checkbox/Checkbox.tsx +8 -8
- package/src/components/Chip/Chip.tsx +22 -6
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +86 -38
- package/src/components/CurrencyDisplay/CurrencyDisplay.tsx +1 -1
- package/src/components/CurrencyInput/CurrencyInput.tsx +11 -4
- package/src/components/EmptyState/EmptyState.tsx +2 -1
- package/src/components/Input/Input.tsx +12 -8
- package/src/components/LabelValue/LabelValue.tsx +4 -3
- package/src/components/ListItem/ListItem.tsx +10 -9
- package/src/components/MonthPicker/MonthPicker.tsx +1 -1
- package/src/components/RadioGroup/RadioGroup.tsx +36 -36
- package/src/components/Select/Select.tsx +17 -19
- package/src/components/Sheet/Sheet.tsx +2 -1
- package/src/components/Slider/Slider.tsx +3 -3
- package/src/components/Spinner/Spinner.tsx +36 -2
- package/src/components/Switch/Switch.tsx +4 -4
- package/src/components/Tabs/Tabs.tsx +9 -16
- package/src/components/Text/Text.tsx +6 -6
- package/src/components/Textarea/Textarea.tsx +8 -6
- package/src/components/Toast/Toast.tsx +27 -21
- package/src/components/Toggle/Toggle.tsx +6 -4
- package/src/fonts.ts +30 -0
- package/src/theme/colors.ts +22 -14
- package/src/theme/types.ts +4 -0
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import Feather from '@expo/vector-icons/Feather';
|
|
|
7
7
|
import FontAwesome5 from '@expo/vector-icons/FontAwesome5';
|
|
8
8
|
import MaterialIcons from '@expo/vector-icons/MaterialIcons';
|
|
9
9
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
10
|
-
import { AntDesign as AntDesign$1, Entypo as Entypo$1, FontAwesome5 as FontAwesome5$1, MaterialIcons as MaterialIcons$1 } from '@expo/vector-icons';
|
|
10
|
+
import { AntDesign as AntDesign$1, Entypo as Entypo$1, Feather as Feather$1, FontAwesome5 as FontAwesome5$1, MaterialIcons as MaterialIcons$1 } from '@expo/vector-icons';
|
|
11
11
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
12
12
|
import Animated11, { useSharedValue, useDerivedValue, withTiming, Easing as Easing$1, useAnimatedStyle, withSpring } from 'react-native-reanimated';
|
|
13
13
|
import RNSlider from '@react-native-community/slider';
|
|
@@ -35,33 +35,41 @@ var defaultLight = {
|
|
|
35
35
|
accent: "#e4e4e4",
|
|
36
36
|
accentForeground: "#171717",
|
|
37
37
|
destructive: "#ef4444",
|
|
38
|
-
destructiveForeground: "#
|
|
38
|
+
destructiveForeground: "#ffffff",
|
|
39
39
|
border: "#e5e5e5",
|
|
40
40
|
input: "#e5e5e5",
|
|
41
41
|
ring: "#1a1a1a",
|
|
42
|
-
success: "#
|
|
43
|
-
successForeground: "#
|
|
42
|
+
success: "#1a7a45",
|
|
43
|
+
successForeground: "#ffffff",
|
|
44
|
+
destructiveTint: "#fff5f5",
|
|
45
|
+
destructiveBorder: "#fecaca",
|
|
46
|
+
successTint: "#f0fdf4",
|
|
47
|
+
successBorder: "#bbf7d0"
|
|
44
48
|
};
|
|
45
49
|
var defaultDark = {
|
|
46
|
-
background: "#
|
|
50
|
+
background: "#0f0f0f",
|
|
47
51
|
foreground: "#fafafa",
|
|
48
|
-
card: "#
|
|
52
|
+
card: "#1c1c1c",
|
|
49
53
|
cardForeground: "#fafafa",
|
|
50
54
|
primary: "#fafafa",
|
|
51
|
-
primaryForeground: "#
|
|
52
|
-
secondary: "#
|
|
55
|
+
primaryForeground: "#0f0f0f",
|
|
56
|
+
secondary: "#272727",
|
|
53
57
|
secondaryForeground: "#fafafa",
|
|
54
|
-
muted: "#
|
|
55
|
-
mutedForeground: "#
|
|
56
|
-
accent: "#
|
|
58
|
+
muted: "#272727",
|
|
59
|
+
mutedForeground: "#9a9a9a",
|
|
60
|
+
accent: "#2e2e2e",
|
|
57
61
|
accentForeground: "#fafafa",
|
|
58
62
|
destructive: "#dc2626",
|
|
59
|
-
destructiveForeground: "#
|
|
60
|
-
border: "#
|
|
63
|
+
destructiveForeground: "#ffffff",
|
|
64
|
+
border: "#303030",
|
|
61
65
|
input: "#2a2a2a",
|
|
62
66
|
ring: "#fafafa",
|
|
63
|
-
success: "#
|
|
64
|
-
successForeground: "#
|
|
67
|
+
success: "#166534",
|
|
68
|
+
successForeground: "#ffffff",
|
|
69
|
+
destructiveTint: "#3b0a0a",
|
|
70
|
+
destructiveBorder: "#7f1d1d",
|
|
71
|
+
successTint: "#052e16",
|
|
72
|
+
successBorder: "#166534"
|
|
65
73
|
};
|
|
66
74
|
|
|
67
75
|
// src/theme/ThemeProvider.tsx
|
|
@@ -158,14 +166,14 @@ function renderIcon(name, size, color) {
|
|
|
158
166
|
// src/components/Button/Button.tsx
|
|
159
167
|
var nativeDriver = Platform.OS !== "web";
|
|
160
168
|
var containerSizeStyles = {
|
|
161
|
-
sm: { paddingHorizontal: s(
|
|
162
|
-
md: { paddingHorizontal: s(
|
|
163
|
-
lg: { paddingHorizontal: s(
|
|
169
|
+
sm: { paddingHorizontal: s(12), paddingVertical: vs(10), minHeight: 44 },
|
|
170
|
+
md: { paddingHorizontal: s(16), paddingVertical: vs(10), minHeight: 44 },
|
|
171
|
+
lg: { paddingHorizontal: s(20), paddingVertical: vs(12), minHeight: 48 }
|
|
164
172
|
};
|
|
165
173
|
var labelSizeStyles = {
|
|
166
|
-
sm: { fontSize: ms(
|
|
167
|
-
md: { fontSize: ms(
|
|
168
|
-
lg: { fontSize: ms(
|
|
174
|
+
sm: { fontSize: ms(13) },
|
|
175
|
+
md: { fontSize: ms(15) },
|
|
176
|
+
lg: { fontSize: ms(16) }
|
|
169
177
|
};
|
|
170
178
|
var iconSizeMap = { sm: 16, md: 18, lg: 20 };
|
|
171
179
|
function Button({
|
|
@@ -242,7 +250,7 @@ function Button({
|
|
|
242
250
|
}
|
|
243
251
|
var styles = StyleSheet.create({
|
|
244
252
|
base: {
|
|
245
|
-
borderRadius:
|
|
253
|
+
borderRadius: 8,
|
|
246
254
|
alignItems: "center",
|
|
247
255
|
justifyContent: "center",
|
|
248
256
|
flexDirection: "row"
|
|
@@ -254,7 +262,7 @@ var styles = StyleSheet.create({
|
|
|
254
262
|
opacity: 0.5
|
|
255
263
|
},
|
|
256
264
|
label: {
|
|
257
|
-
|
|
265
|
+
fontFamily: "Poppins-SemiBold"
|
|
258
266
|
},
|
|
259
267
|
labelWithIcon: {
|
|
260
268
|
marginHorizontal: s(8)
|
|
@@ -351,12 +359,12 @@ var styles2 = StyleSheet.create({
|
|
|
351
359
|
}
|
|
352
360
|
});
|
|
353
361
|
var variantStyles = {
|
|
354
|
-
h1: { fontSize: ms(40),
|
|
355
|
-
h2: { fontSize: ms(28),
|
|
356
|
-
h3: { fontSize: ms(22),
|
|
357
|
-
body: { fontSize: ms(17),
|
|
358
|
-
caption: { fontSize: ms(13),
|
|
359
|
-
label: { fontSize: ms(15),
|
|
362
|
+
h1: { fontFamily: "Poppins-Bold", fontSize: ms(40), lineHeight: mvs(52) },
|
|
363
|
+
h2: { fontFamily: "Poppins-Bold", fontSize: ms(28), lineHeight: mvs(36) },
|
|
364
|
+
h3: { fontFamily: "Poppins-SemiBold", fontSize: ms(22), lineHeight: mvs(30) },
|
|
365
|
+
body: { fontFamily: "Poppins-Regular", fontSize: ms(17), lineHeight: mvs(26) },
|
|
366
|
+
caption: { fontFamily: "Poppins-Regular", fontSize: ms(13), lineHeight: mvs(20) },
|
|
367
|
+
label: { fontFamily: "Poppins-Medium", fontSize: ms(15), lineHeight: mvs(22) }
|
|
360
368
|
};
|
|
361
369
|
function Text2({ variant = "body", color, style, children, ...props }) {
|
|
362
370
|
const { colors } = useTheme();
|
|
@@ -425,40 +433,44 @@ var styles3 = StyleSheet.create({
|
|
|
425
433
|
gap: vs(8)
|
|
426
434
|
},
|
|
427
435
|
label: {
|
|
428
|
-
|
|
429
|
-
|
|
436
|
+
fontFamily: "Poppins-Medium",
|
|
437
|
+
fontSize: ms(13)
|
|
430
438
|
},
|
|
431
439
|
inputWrapper: {
|
|
432
440
|
flexDirection: "row",
|
|
433
441
|
alignItems: "center",
|
|
434
|
-
borderWidth: 1
|
|
442
|
+
borderWidth: 1,
|
|
435
443
|
borderRadius: ms(8),
|
|
436
|
-
paddingHorizontal: s(
|
|
437
|
-
paddingVertical: vs(
|
|
444
|
+
paddingHorizontal: s(14),
|
|
445
|
+
paddingVertical: vs(11)
|
|
438
446
|
},
|
|
439
447
|
input: {
|
|
448
|
+
fontFamily: "Poppins-Regular",
|
|
440
449
|
flex: 1,
|
|
441
|
-
fontSize: ms(
|
|
450
|
+
fontSize: ms(15),
|
|
442
451
|
paddingVertical: 0
|
|
443
452
|
},
|
|
444
453
|
prefixContainer: {
|
|
445
454
|
marginRight: s(8)
|
|
446
455
|
},
|
|
447
456
|
prefixText: {
|
|
448
|
-
|
|
457
|
+
fontFamily: "Poppins-Regular",
|
|
458
|
+
fontSize: ms(15),
|
|
449
459
|
marginRight: s(8)
|
|
450
460
|
},
|
|
451
461
|
suffixContainer: {
|
|
452
462
|
marginLeft: s(8)
|
|
453
463
|
},
|
|
454
464
|
suffixText: {
|
|
455
|
-
|
|
465
|
+
fontFamily: "Poppins-Regular",
|
|
466
|
+
fontSize: ms(15),
|
|
456
467
|
marginLeft: s(8)
|
|
457
468
|
},
|
|
458
469
|
passwordToggle: {
|
|
459
470
|
padding: s(4)
|
|
460
471
|
},
|
|
461
472
|
helperText: {
|
|
473
|
+
fontFamily: "Poppins-Regular",
|
|
462
474
|
fontSize: ms(13)
|
|
463
475
|
}
|
|
464
476
|
});
|
|
@@ -484,31 +496,35 @@ function Badge({ label, children, variant = "default", size = "md", icon, iconNa
|
|
|
484
496
|
default: { backgroundColor: colors.primary },
|
|
485
497
|
secondary: { backgroundColor: colors.secondary },
|
|
486
498
|
destructive: { backgroundColor: colors.destructive },
|
|
487
|
-
outline: { backgroundColor: "transparent", borderWidth: 1, borderColor: colors.border }
|
|
499
|
+
outline: { backgroundColor: "transparent", borderWidth: 1, borderColor: colors.border },
|
|
500
|
+
success: { backgroundColor: colors.success },
|
|
501
|
+
warning: { backgroundColor: "#f59e0b" },
|
|
502
|
+
successOutline: { backgroundColor: colors.successTint, borderWidth: 1, borderColor: colors.successBorder },
|
|
503
|
+
destructiveOutline: { backgroundColor: colors.destructiveTint, borderWidth: 1, borderColor: colors.destructiveBorder }
|
|
488
504
|
}[variant];
|
|
489
505
|
const textColor = {
|
|
490
506
|
default: colors.primaryForeground,
|
|
491
507
|
secondary: colors.secondaryForeground,
|
|
492
508
|
destructive: colors.destructiveForeground,
|
|
493
|
-
outline: colors.foreground
|
|
509
|
+
outline: colors.foreground,
|
|
510
|
+
success: colors.successForeground,
|
|
511
|
+
warning: "#ffffff",
|
|
512
|
+
successOutline: colors.success,
|
|
513
|
+
destructiveOutline: colors.destructive
|
|
494
514
|
}[variant];
|
|
495
515
|
const effectiveIcon = iconName ? renderIcon(iconName, sizeIconSize[size], iconColor ?? textColor) : icon;
|
|
496
516
|
const content = children ?? label;
|
|
497
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [styles4.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style] }, effectiveIcon
|
|
517
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles4.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style] }, effectiveIcon, typeof content === "string" ? /* @__PURE__ */ React25.createElement(Text, { style: [styles4.label, { color: textColor }, sizeFontSize[size]], allowFontScaling: true }, content) : content);
|
|
498
518
|
}
|
|
499
519
|
var styles4 = StyleSheet.create({
|
|
500
520
|
container: {
|
|
501
|
-
borderRadius:
|
|
521
|
+
borderRadius: 9999,
|
|
502
522
|
alignSelf: "flex-start",
|
|
503
523
|
flexDirection: "row",
|
|
504
524
|
alignItems: "center"
|
|
505
525
|
},
|
|
506
|
-
iconContainer: {
|
|
507
|
-
justifyContent: "center",
|
|
508
|
-
alignItems: "center"
|
|
509
|
-
},
|
|
510
526
|
label: {
|
|
511
|
-
|
|
527
|
+
fontFamily: "Poppins-Medium"
|
|
512
528
|
}
|
|
513
529
|
});
|
|
514
530
|
var nativeDriver3 = Platform.OS !== "web";
|
|
@@ -600,24 +616,27 @@ var styles5 = StyleSheet.create({
|
|
|
600
616
|
borderWidth: 1
|
|
601
617
|
},
|
|
602
618
|
header: {
|
|
603
|
-
padding: s(
|
|
619
|
+
padding: s(16),
|
|
604
620
|
paddingBottom: 0,
|
|
605
|
-
gap: vs(
|
|
621
|
+
gap: vs(4)
|
|
606
622
|
},
|
|
607
623
|
title: {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
lineHeight: mvs(
|
|
624
|
+
fontFamily: "Poppins-SemiBold",
|
|
625
|
+
fontSize: ms(16),
|
|
626
|
+
lineHeight: mvs(22)
|
|
611
627
|
},
|
|
612
628
|
description: {
|
|
613
|
-
|
|
614
|
-
|
|
629
|
+
fontFamily: "Poppins-Regular",
|
|
630
|
+
fontSize: ms(13),
|
|
631
|
+
lineHeight: mvs(18)
|
|
615
632
|
},
|
|
616
633
|
content: {
|
|
617
|
-
padding: s(
|
|
634
|
+
padding: s(16),
|
|
635
|
+
paddingTop: s(12)
|
|
618
636
|
},
|
|
619
637
|
footer: {
|
|
620
|
-
|
|
638
|
+
paddingHorizontal: s(16),
|
|
639
|
+
paddingBottom: vs(14),
|
|
621
640
|
paddingTop: 0,
|
|
622
641
|
flexDirection: "row",
|
|
623
642
|
alignItems: "center"
|
|
@@ -651,10 +670,35 @@ var sizeMap2 = {
|
|
|
651
670
|
md: "small",
|
|
652
671
|
lg: "large"
|
|
653
672
|
};
|
|
654
|
-
|
|
673
|
+
var labelFontSize = {
|
|
674
|
+
sm: ms(11),
|
|
675
|
+
md: ms(13),
|
|
676
|
+
lg: ms(14)
|
|
677
|
+
};
|
|
678
|
+
function Spinner({ size = "md", color, label, ...props }) {
|
|
655
679
|
const { colors } = useTheme();
|
|
680
|
+
if (label) {
|
|
681
|
+
return /* @__PURE__ */ React25.createElement(View, { style: styles7.wrapper }, /* @__PURE__ */ React25.createElement(ActivityIndicator, { size: sizeMap2[size], color: color ?? colors.primary, ...props }), /* @__PURE__ */ React25.createElement(
|
|
682
|
+
Text,
|
|
683
|
+
{
|
|
684
|
+
style: [styles7.label, { color: colors.mutedForeground, fontSize: labelFontSize[size] }],
|
|
685
|
+
allowFontScaling: true
|
|
686
|
+
},
|
|
687
|
+
label
|
|
688
|
+
));
|
|
689
|
+
}
|
|
656
690
|
return /* @__PURE__ */ React25.createElement(ActivityIndicator, { size: sizeMap2[size], color: color ?? colors.primary, ...props });
|
|
657
691
|
}
|
|
692
|
+
var styles7 = StyleSheet.create({
|
|
693
|
+
wrapper: {
|
|
694
|
+
alignItems: "center",
|
|
695
|
+
gap: vs(6)
|
|
696
|
+
},
|
|
697
|
+
label: {
|
|
698
|
+
fontFamily: "Poppins-Regular",
|
|
699
|
+
lineHeight: mvs(18)
|
|
700
|
+
}
|
|
701
|
+
});
|
|
658
702
|
function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
659
703
|
const { colors, colorScheme } = useTheme();
|
|
660
704
|
const shimmerAnim = useRef(new Animated.Value(0)).current;
|
|
@@ -679,7 +723,7 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
679
723
|
View,
|
|
680
724
|
{
|
|
681
725
|
style: [
|
|
682
|
-
|
|
726
|
+
styles8.base,
|
|
683
727
|
{ width, height, borderRadius, backgroundColor: colors.muted },
|
|
684
728
|
style
|
|
685
729
|
],
|
|
@@ -696,7 +740,7 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
696
740
|
))
|
|
697
741
|
);
|
|
698
742
|
}
|
|
699
|
-
var
|
|
743
|
+
var styles8 = StyleSheet.create({
|
|
700
744
|
base: {
|
|
701
745
|
overflow: "hidden"
|
|
702
746
|
}
|
|
@@ -725,7 +769,7 @@ function Avatar({ src, fallback, size = "md", style }) {
|
|
|
725
769
|
backgroundColor: colors.muted,
|
|
726
770
|
overflow: "hidden"
|
|
727
771
|
};
|
|
728
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
772
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles9.base, containerStyle, style] }, !showFallback ? /* @__PURE__ */ React25.createElement(
|
|
729
773
|
Image,
|
|
730
774
|
{
|
|
731
775
|
source: { uri: src },
|
|
@@ -735,56 +779,59 @@ function Avatar({ src, fallback, size = "md", style }) {
|
|
|
735
779
|
) : /* @__PURE__ */ React25.createElement(
|
|
736
780
|
Text,
|
|
737
781
|
{
|
|
738
|
-
style: [
|
|
782
|
+
style: [styles9.fallback, { color: colors.mutedForeground, fontSize: fontSizeMap[size] }],
|
|
739
783
|
allowFontScaling: true
|
|
740
784
|
},
|
|
741
785
|
fallback?.slice(0, 2).toUpperCase() ?? "?"
|
|
742
786
|
));
|
|
743
787
|
}
|
|
744
|
-
var
|
|
788
|
+
var styles9 = StyleSheet.create({
|
|
745
789
|
base: {
|
|
746
790
|
alignItems: "center",
|
|
747
791
|
justifyContent: "center"
|
|
748
792
|
},
|
|
749
793
|
fallback: {
|
|
750
|
-
|
|
794
|
+
fontFamily: "Poppins-Medium"
|
|
751
795
|
}
|
|
752
796
|
});
|
|
753
797
|
function AlertBanner({ title, description, variant = "default", icon, iconName, iconColor, style }) {
|
|
754
798
|
const { colors } = useTheme();
|
|
755
|
-
const
|
|
756
|
-
const
|
|
757
|
-
const
|
|
758
|
-
const defaultIcon = variant === "success" ? /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "check-circle", size: 18, color:
|
|
759
|
-
const effectiveIcon = iconName ? renderIcon(iconName, 18, iconColor ??
|
|
760
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
799
|
+
const bgColor = variant === "destructive" ? colors.destructiveBorder : variant === "success" ? colors.successBorder : colors.card;
|
|
800
|
+
const textColor = variant === "destructive" ? "#991b1b" : variant === "success" ? "#166534" : colors.foreground;
|
|
801
|
+
const borderColor = textColor;
|
|
802
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "check-circle", size: 18, color: textColor }) : variant === "destructive" ? /* @__PURE__ */ React25.createElement(MaterialIcons$1, { name: "error-outline", size: 20, color: textColor }) : /* @__PURE__ */ React25.createElement(Entypo$1, { name: "info-with-circle", size: 18, color: textColor });
|
|
803
|
+
const effectiveIcon = iconName ? renderIcon(iconName, 18, iconColor ?? textColor) : icon ?? defaultIcon;
|
|
804
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles10.container, { backgroundColor: bgColor, borderColor }, style] }, /* @__PURE__ */ React25.createElement(View, { style: styles10.header }, /* @__PURE__ */ React25.createElement(View, { style: styles10.icon }, effectiveIcon), title ? /* @__PURE__ */ React25.createElement(Text, { style: [styles10.title, { color: textColor }], allowFontScaling: true }, title) : null), description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles10.description, { color: textColor, opacity: 0.85 }], allowFontScaling: true }, description) : null);
|
|
761
805
|
}
|
|
762
|
-
var
|
|
806
|
+
var styles10 = StyleSheet.create({
|
|
763
807
|
container: {
|
|
764
|
-
flexDirection: "row",
|
|
765
808
|
borderWidth: 1,
|
|
766
809
|
borderRadius: ms(12),
|
|
767
|
-
|
|
768
|
-
|
|
810
|
+
paddingHorizontal: s(14),
|
|
811
|
+
paddingVertical: vs(12),
|
|
812
|
+
gap: vs(8),
|
|
769
813
|
shadowColor: "#000",
|
|
770
|
-
shadowOffset: { width: 0, height:
|
|
771
|
-
shadowOpacity: 0.
|
|
772
|
-
shadowRadius:
|
|
773
|
-
elevation:
|
|
814
|
+
shadowOffset: { width: 0, height: 3 },
|
|
815
|
+
shadowOpacity: 0.1,
|
|
816
|
+
shadowRadius: 8,
|
|
817
|
+
elevation: 5
|
|
818
|
+
},
|
|
819
|
+
header: {
|
|
820
|
+
flexDirection: "row",
|
|
821
|
+
alignItems: "center",
|
|
822
|
+
gap: s(10)
|
|
774
823
|
},
|
|
775
824
|
icon: {
|
|
776
825
|
marginTop: 0
|
|
777
826
|
},
|
|
778
|
-
content: {
|
|
779
|
-
flex: 1,
|
|
780
|
-
gap: vs(4)
|
|
781
|
-
},
|
|
782
827
|
title: {
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
lineHeight: mvs(20)
|
|
828
|
+
fontFamily: "Poppins-Bold",
|
|
829
|
+
fontSize: ms(15),
|
|
830
|
+
lineHeight: mvs(20),
|
|
831
|
+
flex: 1
|
|
786
832
|
},
|
|
787
833
|
description: {
|
|
834
|
+
fontFamily: "Poppins-Regular",
|
|
788
835
|
fontSize: ms(14),
|
|
789
836
|
lineHeight: mvs(20)
|
|
790
837
|
}
|
|
@@ -806,18 +853,18 @@ function Progress({ value = 0, max = 100, style }) {
|
|
|
806
853
|
return /* @__PURE__ */ React25.createElement(
|
|
807
854
|
View,
|
|
808
855
|
{
|
|
809
|
-
style: [
|
|
856
|
+
style: [styles11.track, { backgroundColor: colors.muted }, style],
|
|
810
857
|
onLayout: (e) => setTrackWidth(e.nativeEvent.layout.width)
|
|
811
858
|
},
|
|
812
859
|
/* @__PURE__ */ React25.createElement(
|
|
813
860
|
Animated.View,
|
|
814
861
|
{
|
|
815
|
-
style: [
|
|
862
|
+
style: [styles11.indicator, { width: animatedWidth, backgroundColor: colors.primary }]
|
|
816
863
|
}
|
|
817
864
|
)
|
|
818
865
|
);
|
|
819
866
|
}
|
|
820
|
-
var
|
|
867
|
+
var styles11 = StyleSheet.create({
|
|
821
868
|
track: {
|
|
822
869
|
height: vs(8),
|
|
823
870
|
borderRadius: 999,
|
|
@@ -837,8 +884,8 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, siz
|
|
|
837
884
|
View,
|
|
838
885
|
{
|
|
839
886
|
style: [
|
|
840
|
-
|
|
841
|
-
isCompact &&
|
|
887
|
+
styles12.container,
|
|
888
|
+
isCompact && styles12.containerCompact,
|
|
842
889
|
{ borderColor: colors.border },
|
|
843
890
|
style
|
|
844
891
|
]
|
|
@@ -847,25 +894,25 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, siz
|
|
|
847
894
|
View,
|
|
848
895
|
{
|
|
849
896
|
style: [
|
|
850
|
-
|
|
851
|
-
isCompact &&
|
|
897
|
+
styles12.iconWrapper,
|
|
898
|
+
isCompact && styles12.iconWrapperCompact,
|
|
852
899
|
{ backgroundColor: colors.muted }
|
|
853
900
|
]
|
|
854
901
|
},
|
|
855
902
|
effectiveIcon
|
|
856
903
|
) : null,
|
|
857
|
-
/* @__PURE__ */ React25.createElement(View, { style:
|
|
904
|
+
/* @__PURE__ */ React25.createElement(View, { style: styles12.textWrapper }, /* @__PURE__ */ React25.createElement(
|
|
858
905
|
Text,
|
|
859
906
|
{
|
|
860
|
-
style: [
|
|
907
|
+
style: [styles12.title, isCompact && styles12.titleCompact, { color: colors.foreground }],
|
|
861
908
|
allowFontScaling: true
|
|
862
909
|
},
|
|
863
910
|
title
|
|
864
|
-
), description && !isCompact ? /* @__PURE__ */ React25.createElement(Text, { style: [
|
|
865
|
-
action && !isCompact ? /* @__PURE__ */ React25.createElement(View, { style:
|
|
911
|
+
), description && !isCompact ? /* @__PURE__ */ React25.createElement(Text, { style: [styles12.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null),
|
|
912
|
+
action && !isCompact ? /* @__PURE__ */ React25.createElement(View, { style: styles12.action }, action) : null
|
|
866
913
|
);
|
|
867
914
|
}
|
|
868
|
-
var
|
|
915
|
+
var styles12 = StyleSheet.create({
|
|
869
916
|
container: {
|
|
870
917
|
alignItems: "center",
|
|
871
918
|
justifyContent: "center",
|
|
@@ -897,14 +944,15 @@ var styles11 = StyleSheet.create({
|
|
|
897
944
|
maxWidth: s(320)
|
|
898
945
|
},
|
|
899
946
|
title: {
|
|
947
|
+
fontFamily: "Poppins-Medium",
|
|
900
948
|
fontSize: ms(18),
|
|
901
|
-
fontWeight: "500",
|
|
902
949
|
textAlign: "center"
|
|
903
950
|
},
|
|
904
951
|
titleCompact: {
|
|
905
952
|
fontSize: ms(15)
|
|
906
953
|
},
|
|
907
954
|
description: {
|
|
955
|
+
fontFamily: "Poppins-Regular",
|
|
908
956
|
fontSize: ms(14),
|
|
909
957
|
lineHeight: mvs(20),
|
|
910
958
|
textAlign: "center"
|
|
@@ -927,14 +975,14 @@ function Textarea({
|
|
|
927
975
|
}) {
|
|
928
976
|
const { colors } = useTheme();
|
|
929
977
|
const [focused, setFocused] = useState(false);
|
|
930
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
978
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles13.container, containerStyle] }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles13.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React25.createElement(
|
|
931
979
|
TextInput,
|
|
932
980
|
{
|
|
933
981
|
multiline: true,
|
|
934
982
|
numberOfLines: rows,
|
|
935
983
|
textAlignVertical: "top",
|
|
936
984
|
style: [
|
|
937
|
-
|
|
985
|
+
styles13.input,
|
|
938
986
|
{
|
|
939
987
|
borderColor: error ? colors.destructive : focused ? colors.ring ?? colors.primary : colors.border,
|
|
940
988
|
color: colors.foreground,
|
|
@@ -956,24 +1004,26 @@ function Textarea({
|
|
|
956
1004
|
allowFontScaling: true,
|
|
957
1005
|
...props
|
|
958
1006
|
}
|
|
959
|
-
), error ? /* @__PURE__ */ React25.createElement(Text, { style: [
|
|
1007
|
+
), error ? /* @__PURE__ */ React25.createElement(Text, { style: [styles13.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null, !error && hint ? /* @__PURE__ */ React25.createElement(Text, { style: [styles13.helperText, { color: colors.mutedForeground }], allowFontScaling: true }, hint) : null);
|
|
960
1008
|
}
|
|
961
|
-
var
|
|
1009
|
+
var styles13 = StyleSheet.create({
|
|
962
1010
|
container: {
|
|
963
1011
|
gap: vs(8)
|
|
964
1012
|
},
|
|
965
1013
|
label: {
|
|
966
|
-
|
|
967
|
-
|
|
1014
|
+
fontFamily: "Poppins-Medium",
|
|
1015
|
+
fontSize: ms(13)
|
|
968
1016
|
},
|
|
969
1017
|
input: {
|
|
970
|
-
|
|
1018
|
+
fontFamily: "Poppins-Regular",
|
|
1019
|
+
borderWidth: 1,
|
|
971
1020
|
borderRadius: ms(8),
|
|
972
|
-
paddingHorizontal: s(
|
|
973
|
-
paddingVertical: vs(
|
|
974
|
-
fontSize: ms(
|
|
1021
|
+
paddingHorizontal: s(14),
|
|
1022
|
+
paddingVertical: vs(11),
|
|
1023
|
+
fontSize: ms(15)
|
|
975
1024
|
},
|
|
976
1025
|
helperText: {
|
|
1026
|
+
fontFamily: "Poppins-Regular",
|
|
977
1027
|
fontSize: ms(13)
|
|
978
1028
|
}
|
|
979
1029
|
});
|
|
@@ -992,12 +1042,12 @@ function Checkbox({
|
|
|
992
1042
|
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver4, speed: 40, bounciness: 0 }).start();
|
|
993
1043
|
};
|
|
994
1044
|
const handlePressOut = () => {
|
|
995
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver4, speed: 40, bounciness:
|
|
1045
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver4, speed: 40, bounciness: 0 }).start();
|
|
996
1046
|
};
|
|
997
|
-
return /* @__PURE__ */ React25.createElement(
|
|
1047
|
+
return /* @__PURE__ */ React25.createElement(
|
|
998
1048
|
TouchableOpacity,
|
|
999
1049
|
{
|
|
1000
|
-
style: [
|
|
1050
|
+
style: [styles14.row, style],
|
|
1001
1051
|
onPress: () => {
|
|
1002
1052
|
selectionAsync();
|
|
1003
1053
|
onCheckedChange?.(!checked);
|
|
@@ -1009,30 +1059,31 @@ function Checkbox({
|
|
|
1009
1059
|
touchSoundDisabled: true
|
|
1010
1060
|
},
|
|
1011
1061
|
/* @__PURE__ */ React25.createElement(
|
|
1012
|
-
View,
|
|
1062
|
+
Animated.View,
|
|
1013
1063
|
{
|
|
1014
1064
|
style: [
|
|
1015
|
-
|
|
1065
|
+
styles14.box,
|
|
1016
1066
|
{
|
|
1017
1067
|
borderColor: checked ? colors.primary : colors.border,
|
|
1018
1068
|
backgroundColor: checked ? colors.primary : "transparent",
|
|
1019
|
-
opacity: disabled ? 0.45 : 1
|
|
1069
|
+
opacity: disabled ? 0.45 : 1,
|
|
1070
|
+
transform: [{ scale: scale2 }]
|
|
1020
1071
|
}
|
|
1021
1072
|
]
|
|
1022
1073
|
},
|
|
1023
|
-
checked ? /* @__PURE__ */ React25.createElement(View, { style: [
|
|
1074
|
+
checked ? /* @__PURE__ */ React25.createElement(View, { style: [styles14.checkmark, { borderColor: colors.primaryForeground }] }) : null
|
|
1024
1075
|
),
|
|
1025
1076
|
label ? /* @__PURE__ */ React25.createElement(
|
|
1026
1077
|
Text,
|
|
1027
1078
|
{
|
|
1028
|
-
style: [
|
|
1079
|
+
style: [styles14.label, { color: disabled ? colors.mutedForeground : colors.foreground }],
|
|
1029
1080
|
allowFontScaling: true
|
|
1030
1081
|
},
|
|
1031
1082
|
label
|
|
1032
1083
|
) : null
|
|
1033
|
-
)
|
|
1084
|
+
);
|
|
1034
1085
|
}
|
|
1035
|
-
var
|
|
1086
|
+
var styles14 = StyleSheet.create({
|
|
1036
1087
|
row: {
|
|
1037
1088
|
flexDirection: "row",
|
|
1038
1089
|
alignItems: "center",
|
|
@@ -1041,7 +1092,7 @@ var styles13 = StyleSheet.create({
|
|
|
1041
1092
|
box: {
|
|
1042
1093
|
width: s(24),
|
|
1043
1094
|
height: s(24),
|
|
1044
|
-
borderRadius: ms(
|
|
1095
|
+
borderRadius: ms(4),
|
|
1045
1096
|
borderWidth: 1.5,
|
|
1046
1097
|
alignItems: "center",
|
|
1047
1098
|
justifyContent: "center"
|
|
@@ -1054,15 +1105,16 @@ var styles13 = StyleSheet.create({
|
|
|
1054
1105
|
transform: [{ rotate: "-45deg" }, { translateY: -1 }]
|
|
1055
1106
|
},
|
|
1056
1107
|
label: {
|
|
1057
|
-
|
|
1058
|
-
|
|
1108
|
+
fontFamily: "Poppins-Regular",
|
|
1109
|
+
fontSize: ms(14),
|
|
1110
|
+
lineHeight: mvs(20)
|
|
1059
1111
|
}
|
|
1060
1112
|
});
|
|
1061
1113
|
var nativeDriver5 = Platform.OS !== "web";
|
|
1062
|
-
var TRACK_WIDTH = s(
|
|
1063
|
-
var TRACK_HEIGHT =
|
|
1064
|
-
var THUMB_SIZE = s(
|
|
1065
|
-
var THUMB_OFFSET = s(
|
|
1114
|
+
var TRACK_WIDTH = s(52);
|
|
1115
|
+
var TRACK_HEIGHT = s(30);
|
|
1116
|
+
var THUMB_SIZE = s(24);
|
|
1117
|
+
var THUMB_OFFSET = s(3);
|
|
1066
1118
|
var THUMB_TRAVEL = TRACK_WIDTH - THUMB_SIZE - THUMB_OFFSET * 2;
|
|
1067
1119
|
function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
1068
1120
|
const { colors } = useTheme();
|
|
@@ -1096,20 +1148,20 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
1096
1148
|
disabled,
|
|
1097
1149
|
activeOpacity: 0.8,
|
|
1098
1150
|
touchSoundDisabled: true,
|
|
1099
|
-
style:
|
|
1151
|
+
style: styles15.wrapper
|
|
1100
1152
|
},
|
|
1101
|
-
/* @__PURE__ */ React25.createElement(Animated.View, { style: [
|
|
1153
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: [styles15.track, { backgroundColor: trackColor }] }, /* @__PURE__ */ React25.createElement(
|
|
1102
1154
|
Animated.View,
|
|
1103
1155
|
{
|
|
1104
1156
|
style: [
|
|
1105
|
-
|
|
1157
|
+
styles15.thumb,
|
|
1106
1158
|
{ backgroundColor: colors.primaryForeground, transform: [{ translateX }] }
|
|
1107
1159
|
]
|
|
1108
1160
|
}
|
|
1109
1161
|
))
|
|
1110
1162
|
));
|
|
1111
1163
|
}
|
|
1112
|
-
var
|
|
1164
|
+
var styles15 = StyleSheet.create({
|
|
1113
1165
|
wrapper: {},
|
|
1114
1166
|
track: {
|
|
1115
1167
|
width: TRACK_WIDTH,
|
|
@@ -1132,6 +1184,7 @@ var styles14 = StyleSheet.create({
|
|
|
1132
1184
|
elevation: 2
|
|
1133
1185
|
}
|
|
1134
1186
|
});
|
|
1187
|
+
var nativeDriver6 = Platform.OS !== "web";
|
|
1135
1188
|
var sizeStyles = {
|
|
1136
1189
|
sm: { paddingHorizontal: s(12), paddingVertical: vs(8), minWidth: s(40), minHeight: vs(40) },
|
|
1137
1190
|
md: { paddingHorizontal: s(16), paddingVertical: vs(12), minWidth: s(44), minHeight: vs(44) },
|
|
@@ -1167,10 +1220,10 @@ function Toggle({
|
|
|
1167
1220
|
}, [pressed, pressAnim]);
|
|
1168
1221
|
const handlePressIn = () => {
|
|
1169
1222
|
if (disabled) return;
|
|
1170
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1223
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver6, speed: 40, bounciness: 0 }).start();
|
|
1171
1224
|
};
|
|
1172
1225
|
const handlePressOut = () => {
|
|
1173
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1226
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver6, speed: 40, bounciness: 4 }).start();
|
|
1174
1227
|
};
|
|
1175
1228
|
const borderColor = pressAnim.interpolate({
|
|
1176
1229
|
inputRange: [0, 1],
|
|
@@ -1202,7 +1255,7 @@ function Toggle({
|
|
|
1202
1255
|
if (custom) return /* @__PURE__ */ React25.createElement(React25.Fragment, null, custom);
|
|
1203
1256
|
return /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "circle", size: iconSize, color: colors.mutedForeground });
|
|
1204
1257
|
};
|
|
1205
|
-
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled &&
|
|
1258
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles16.disabled, style] }, /* @__PURE__ */ React25.createElement(
|
|
1206
1259
|
TouchableOpacity,
|
|
1207
1260
|
{
|
|
1208
1261
|
onPress: () => {
|
|
@@ -1220,16 +1273,16 @@ function Toggle({
|
|
|
1220
1273
|
Animated.View,
|
|
1221
1274
|
{
|
|
1222
1275
|
style: [
|
|
1223
|
-
|
|
1276
|
+
styles16.base,
|
|
1224
1277
|
sizeStyles[size],
|
|
1225
1278
|
{ borderColor, backgroundColor, borderWidth: 2 }
|
|
1226
1279
|
]
|
|
1227
1280
|
},
|
|
1228
|
-
/* @__PURE__ */ React25.createElement(View, { style:
|
|
1281
|
+
/* @__PURE__ */ React25.createElement(View, { style: styles16.inner }, /* @__PURE__ */ React25.createElement(LeftIcon, null), label ? /* @__PURE__ */ React25.createElement(Animated.Text, { style: [styles16.label, { color: textColor }], allowFontScaling: true }, label) : null)
|
|
1229
1282
|
)
|
|
1230
1283
|
));
|
|
1231
1284
|
}
|
|
1232
|
-
var
|
|
1285
|
+
var styles16 = StyleSheet.create({
|
|
1233
1286
|
base: {
|
|
1234
1287
|
borderRadius: ms(8)
|
|
1235
1288
|
},
|
|
@@ -1243,11 +1296,11 @@ var styles15 = StyleSheet.create({
|
|
|
1243
1296
|
opacity: 0.45
|
|
1244
1297
|
},
|
|
1245
1298
|
label: {
|
|
1246
|
-
|
|
1247
|
-
|
|
1299
|
+
fontFamily: "Poppins-Medium",
|
|
1300
|
+
fontSize: ms(14)
|
|
1248
1301
|
}
|
|
1249
1302
|
});
|
|
1250
|
-
var
|
|
1303
|
+
var nativeDriver7 = Platform.OS !== "web";
|
|
1251
1304
|
function RadioItem({
|
|
1252
1305
|
option,
|
|
1253
1306
|
selected,
|
|
@@ -1257,15 +1310,15 @@ function RadioItem({
|
|
|
1257
1310
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
1258
1311
|
const handlePressIn = () => {
|
|
1259
1312
|
if (option.disabled) return;
|
|
1260
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1313
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver7, speed: 40, bounciness: 0 }).start();
|
|
1261
1314
|
};
|
|
1262
1315
|
const handlePressOut = () => {
|
|
1263
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1316
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver7, speed: 40, bounciness: 4 }).start();
|
|
1264
1317
|
};
|
|
1265
|
-
return /* @__PURE__ */ React25.createElement(
|
|
1318
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1266
1319
|
TouchableOpacity,
|
|
1267
1320
|
{
|
|
1268
|
-
style:
|
|
1321
|
+
style: styles17.row,
|
|
1269
1322
|
onPress: () => {
|
|
1270
1323
|
if (!option.disabled) {
|
|
1271
1324
|
selectionAsync();
|
|
@@ -1279,30 +1332,31 @@ function RadioItem({
|
|
|
1279
1332
|
disabled: option.disabled
|
|
1280
1333
|
},
|
|
1281
1334
|
/* @__PURE__ */ React25.createElement(
|
|
1282
|
-
View,
|
|
1335
|
+
Animated.View,
|
|
1283
1336
|
{
|
|
1284
1337
|
style: [
|
|
1285
|
-
|
|
1338
|
+
styles17.radio,
|
|
1286
1339
|
{
|
|
1287
1340
|
borderColor: selected ? colors.primary : colors.border,
|
|
1288
|
-
opacity: option.disabled ? 0.45 : 1
|
|
1341
|
+
opacity: option.disabled ? 0.45 : 1,
|
|
1342
|
+
transform: [{ scale: scale2 }]
|
|
1289
1343
|
}
|
|
1290
1344
|
]
|
|
1291
1345
|
},
|
|
1292
|
-
selected ? /* @__PURE__ */ React25.createElement(View, { style: [
|
|
1346
|
+
selected ? /* @__PURE__ */ React25.createElement(View, { style: [styles17.dot, { backgroundColor: colors.primary }] }) : null
|
|
1293
1347
|
),
|
|
1294
1348
|
/* @__PURE__ */ React25.createElement(
|
|
1295
1349
|
Text,
|
|
1296
1350
|
{
|
|
1297
1351
|
style: [
|
|
1298
|
-
|
|
1352
|
+
styles17.label,
|
|
1299
1353
|
{ color: option.disabled ? colors.mutedForeground : colors.foreground }
|
|
1300
1354
|
],
|
|
1301
1355
|
allowFontScaling: true
|
|
1302
1356
|
},
|
|
1303
1357
|
option.label
|
|
1304
1358
|
)
|
|
1305
|
-
)
|
|
1359
|
+
);
|
|
1306
1360
|
}
|
|
1307
1361
|
function RadioGroup({
|
|
1308
1362
|
options,
|
|
@@ -1311,7 +1365,7 @@ function RadioGroup({
|
|
|
1311
1365
|
orientation = "vertical",
|
|
1312
1366
|
style
|
|
1313
1367
|
}) {
|
|
1314
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
1368
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles17.container, orientation === "horizontal" && styles17.horizontal, style] }, options.map((option) => /* @__PURE__ */ React25.createElement(
|
|
1315
1369
|
RadioItem,
|
|
1316
1370
|
{
|
|
1317
1371
|
key: option.value,
|
|
@@ -1321,7 +1375,7 @@ function RadioGroup({
|
|
|
1321
1375
|
}
|
|
1322
1376
|
)));
|
|
1323
1377
|
}
|
|
1324
|
-
var
|
|
1378
|
+
var styles17 = StyleSheet.create({
|
|
1325
1379
|
container: {
|
|
1326
1380
|
gap: vs(12)
|
|
1327
1381
|
},
|
|
@@ -1348,11 +1402,12 @@ var styles16 = StyleSheet.create({
|
|
|
1348
1402
|
borderRadius: s(5)
|
|
1349
1403
|
},
|
|
1350
1404
|
label: {
|
|
1405
|
+
fontFamily: "Poppins-Regular",
|
|
1351
1406
|
fontSize: ms(14),
|
|
1352
1407
|
lineHeight: mvs(20)
|
|
1353
1408
|
}
|
|
1354
1409
|
});
|
|
1355
|
-
var
|
|
1410
|
+
var nativeDriver8 = Platform.OS !== "web";
|
|
1356
1411
|
function TabTrigger({
|
|
1357
1412
|
tab,
|
|
1358
1413
|
isActive,
|
|
@@ -1362,15 +1417,15 @@ function TabTrigger({
|
|
|
1362
1417
|
const { colors } = useTheme();
|
|
1363
1418
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
1364
1419
|
const handlePressIn = () => {
|
|
1365
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1420
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver8, speed: 40, bounciness: 0 }).start();
|
|
1366
1421
|
};
|
|
1367
1422
|
const handlePressOut = () => {
|
|
1368
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1423
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver8, speed: 40, bounciness: 4 }).start();
|
|
1369
1424
|
};
|
|
1370
1425
|
return /* @__PURE__ */ React25.createElement(
|
|
1371
1426
|
TouchableOpacity,
|
|
1372
1427
|
{
|
|
1373
|
-
style:
|
|
1428
|
+
style: styles18.trigger,
|
|
1374
1429
|
onPress,
|
|
1375
1430
|
onPressIn: handlePressIn,
|
|
1376
1431
|
onPressOut: handlePressOut,
|
|
@@ -1378,13 +1433,13 @@ function TabTrigger({
|
|
|
1378
1433
|
activeOpacity: 1,
|
|
1379
1434
|
touchSoundDisabled: true
|
|
1380
1435
|
},
|
|
1381
|
-
/* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25.createElement(View, { style:
|
|
1436
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25.createElement(View, { style: styles18.triggerInner }, tab.icon ? typeof tab.icon === "function" ? tab.icon(isActive) : tab.icon : null, /* @__PURE__ */ React25.createElement(
|
|
1382
1437
|
Text,
|
|
1383
1438
|
{
|
|
1384
1439
|
style: [
|
|
1385
|
-
|
|
1440
|
+
styles18.triggerLabel,
|
|
1386
1441
|
{ color: isActive ? colors.foreground : colors.mutedForeground },
|
|
1387
|
-
isActive &&
|
|
1442
|
+
isActive && styles18.activeTriggerLabel
|
|
1388
1443
|
],
|
|
1389
1444
|
allowFontScaling: true
|
|
1390
1445
|
},
|
|
@@ -1433,11 +1488,11 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1433
1488
|
if (!value) setInternal(v);
|
|
1434
1489
|
onValueChange?.(v);
|
|
1435
1490
|
};
|
|
1436
|
-
return /* @__PURE__ */ React25.createElement(View, { style }, /* @__PURE__ */ React25.createElement(View, { style: [
|
|
1491
|
+
return /* @__PURE__ */ React25.createElement(View, { style }, /* @__PURE__ */ React25.createElement(View, { style: [styles18.list, { backgroundColor: colors.muted }] }, /* @__PURE__ */ React25.createElement(
|
|
1437
1492
|
Animated.View,
|
|
1438
1493
|
{
|
|
1439
1494
|
style: [
|
|
1440
|
-
|
|
1495
|
+
styles18.pill,
|
|
1441
1496
|
{
|
|
1442
1497
|
backgroundColor: colors.background,
|
|
1443
1498
|
position: "absolute",
|
|
@@ -1476,7 +1531,7 @@ function TabsContent({ value, activeValue, children, style }) {
|
|
|
1476
1531
|
if (value !== activeValue) return null;
|
|
1477
1532
|
return /* @__PURE__ */ React25.createElement(View, { style }, children);
|
|
1478
1533
|
}
|
|
1479
|
-
var
|
|
1534
|
+
var styles18 = StyleSheet.create({
|
|
1480
1535
|
list: {
|
|
1481
1536
|
flexDirection: "row",
|
|
1482
1537
|
borderRadius: ms(12),
|
|
@@ -1486,9 +1541,9 @@ var styles17 = StyleSheet.create({
|
|
|
1486
1541
|
pill: {},
|
|
1487
1542
|
trigger: {
|
|
1488
1543
|
flex: 1,
|
|
1489
|
-
paddingVertical: vs(
|
|
1490
|
-
paddingHorizontal: s(
|
|
1491
|
-
borderRadius: ms(
|
|
1544
|
+
paddingVertical: vs(7),
|
|
1545
|
+
paddingHorizontal: s(10),
|
|
1546
|
+
borderRadius: ms(6),
|
|
1492
1547
|
alignItems: "center",
|
|
1493
1548
|
justifyContent: "center",
|
|
1494
1549
|
zIndex: 1
|
|
@@ -1497,19 +1552,14 @@ var styles17 = StyleSheet.create({
|
|
|
1497
1552
|
flexDirection: "row",
|
|
1498
1553
|
alignItems: "center",
|
|
1499
1554
|
justifyContent: "center",
|
|
1500
|
-
gap: s(
|
|
1501
|
-
},
|
|
1502
|
-
triggerIcon: {
|
|
1503
|
-
marginRight: s(6),
|
|
1504
|
-
alignItems: "center",
|
|
1505
|
-
justifyContent: "center"
|
|
1555
|
+
gap: s(4)
|
|
1506
1556
|
},
|
|
1507
1557
|
triggerLabel: {
|
|
1508
|
-
|
|
1509
|
-
|
|
1558
|
+
fontFamily: "Poppins-Regular",
|
|
1559
|
+
fontSize: ms(13)
|
|
1510
1560
|
},
|
|
1511
1561
|
activeTriggerLabel: {
|
|
1512
|
-
|
|
1562
|
+
fontFamily: "Poppins-Medium"
|
|
1513
1563
|
}
|
|
1514
1564
|
});
|
|
1515
1565
|
function AccordionItemComponent({
|
|
@@ -1542,21 +1592,21 @@ function AccordionItemComponent({
|
|
|
1542
1592
|
const rotationStyle = useAnimatedStyle(() => ({
|
|
1543
1593
|
transform: [{ rotate: `${derivedRotation.value * 180}deg` }]
|
|
1544
1594
|
}));
|
|
1545
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
1595
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles19.item, { backgroundColor: colors.card, borderColor: colors.border }] }, /* @__PURE__ */ React25.createElement(
|
|
1546
1596
|
Pressable,
|
|
1547
1597
|
{
|
|
1548
|
-
style: ({ pressed }) => [
|
|
1598
|
+
style: ({ pressed }) => [styles19.trigger, { opacity: pressed ? 0.6 : 1 }],
|
|
1549
1599
|
onPress: () => {
|
|
1550
1600
|
selectionAsync();
|
|
1551
1601
|
onToggle();
|
|
1552
1602
|
}
|
|
1553
1603
|
},
|
|
1554
|
-
/* @__PURE__ */ React25.createElement(Text, { style: [
|
|
1555
|
-
/* @__PURE__ */ React25.createElement(Animated11.View, { style: [
|
|
1604
|
+
/* @__PURE__ */ React25.createElement(Text, { style: [styles19.triggerText, { color: colors.foreground }], allowFontScaling: true }, item.trigger),
|
|
1605
|
+
/* @__PURE__ */ React25.createElement(Animated11.View, { style: [styles19.chevron, rotationStyle] }, /* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-down", size: 18, color: colors.mutedForeground }))
|
|
1556
1606
|
), /* @__PURE__ */ React25.createElement(Animated11.View, { style: bodyStyle }, /* @__PURE__ */ React25.createElement(
|
|
1557
1607
|
View,
|
|
1558
1608
|
{
|
|
1559
|
-
style:
|
|
1609
|
+
style: styles19.content,
|
|
1560
1610
|
onLayout: (e) => {
|
|
1561
1611
|
height.value = e.nativeEvent.layout.height;
|
|
1562
1612
|
}
|
|
@@ -1578,7 +1628,7 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
1578
1628
|
);
|
|
1579
1629
|
}
|
|
1580
1630
|
};
|
|
1581
|
-
return /* @__PURE__ */ React25.createElement(View, { style }, items.map((item) => /* @__PURE__ */ React25.createElement(
|
|
1631
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles19.list, style] }, items.map((item) => /* @__PURE__ */ React25.createElement(
|
|
1582
1632
|
AccordionItemComponent,
|
|
1583
1633
|
{
|
|
1584
1634
|
key: item.value,
|
|
@@ -1588,19 +1638,25 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
1588
1638
|
}
|
|
1589
1639
|
)));
|
|
1590
1640
|
}
|
|
1591
|
-
var
|
|
1641
|
+
var styles19 = StyleSheet.create({
|
|
1642
|
+
list: {
|
|
1643
|
+
gap: s(6)
|
|
1644
|
+
},
|
|
1592
1645
|
item: {
|
|
1593
|
-
|
|
1646
|
+
borderWidth: 1,
|
|
1647
|
+
borderRadius: ms(10),
|
|
1648
|
+
overflow: "hidden"
|
|
1594
1649
|
},
|
|
1595
1650
|
trigger: {
|
|
1596
1651
|
flexDirection: "row",
|
|
1597
1652
|
justifyContent: "space-between",
|
|
1598
1653
|
alignItems: "center",
|
|
1599
|
-
|
|
1654
|
+
paddingHorizontal: s(14),
|
|
1655
|
+
paddingVertical: vs(12)
|
|
1600
1656
|
},
|
|
1601
1657
|
triggerText: {
|
|
1602
|
-
|
|
1603
|
-
|
|
1658
|
+
fontFamily: "Poppins-Medium",
|
|
1659
|
+
fontSize: ms(14),
|
|
1604
1660
|
flex: 1
|
|
1605
1661
|
},
|
|
1606
1662
|
chevron: {
|
|
@@ -1609,7 +1665,8 @@ var styles18 = StyleSheet.create({
|
|
|
1609
1665
|
// position:'absolute' is the key — the inner View escapes the animated wrapper's
|
|
1610
1666
|
// clipped height so onLayout always reports the true content height.
|
|
1611
1667
|
content: {
|
|
1612
|
-
|
|
1668
|
+
paddingHorizontal: s(14),
|
|
1669
|
+
paddingBottom: vs(12),
|
|
1613
1670
|
position: "absolute",
|
|
1614
1671
|
width: "100%"
|
|
1615
1672
|
}
|
|
@@ -1637,7 +1694,7 @@ function Slider({
|
|
|
1637
1694
|
}
|
|
1638
1695
|
onValueChange?.(v);
|
|
1639
1696
|
};
|
|
1640
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
1697
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles20.wrapper, style], accessibilityLabel }, label || showValue ? /* @__PURE__ */ React25.createElement(View, { style: styles20.header }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles20.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, showValue ? /* @__PURE__ */ React25.createElement(Text, { style: [styles20.valueText, { color: colors.mutedForeground }], allowFontScaling: true }, formatValue2(value)) : null) : null, /* @__PURE__ */ React25.createElement(View, { style: disabled ? styles20.disabled : void 0 }, /* @__PURE__ */ React25.createElement(
|
|
1641
1698
|
RNSlider,
|
|
1642
1699
|
{
|
|
1643
1700
|
value,
|
|
@@ -1650,12 +1707,12 @@ function Slider({
|
|
|
1650
1707
|
minimumTrackTintColor: colors.primary,
|
|
1651
1708
|
maximumTrackTintColor: colors.muted,
|
|
1652
1709
|
thumbTintColor: colors.primary,
|
|
1653
|
-
style:
|
|
1710
|
+
style: styles20.slider,
|
|
1654
1711
|
accessibilityLabel
|
|
1655
1712
|
}
|
|
1656
1713
|
)));
|
|
1657
1714
|
}
|
|
1658
|
-
var
|
|
1715
|
+
var styles20 = StyleSheet.create({
|
|
1659
1716
|
wrapper: {
|
|
1660
1717
|
gap: vs(8)
|
|
1661
1718
|
},
|
|
@@ -1665,16 +1722,16 @@ var styles19 = StyleSheet.create({
|
|
|
1665
1722
|
alignItems: "center"
|
|
1666
1723
|
},
|
|
1667
1724
|
label: {
|
|
1668
|
-
|
|
1669
|
-
|
|
1725
|
+
fontFamily: "Poppins-Medium",
|
|
1726
|
+
fontSize: ms(15)
|
|
1670
1727
|
},
|
|
1671
1728
|
valueText: {
|
|
1672
|
-
|
|
1673
|
-
|
|
1729
|
+
fontFamily: "Poppins-Medium",
|
|
1730
|
+
fontSize: ms(14)
|
|
1674
1731
|
},
|
|
1675
1732
|
slider: {
|
|
1676
1733
|
width: "100%",
|
|
1677
|
-
height: vs(
|
|
1734
|
+
height: vs(60)
|
|
1678
1735
|
},
|
|
1679
1736
|
disabled: {
|
|
1680
1737
|
opacity: 0.45
|
|
@@ -1715,14 +1772,14 @@ function Sheet({
|
|
|
1715
1772
|
snapPoints,
|
|
1716
1773
|
onDismiss: onClose,
|
|
1717
1774
|
backdropComponent: renderBackdrop,
|
|
1718
|
-
backgroundStyle: [
|
|
1719
|
-
handleIndicatorStyle: [
|
|
1775
|
+
backgroundStyle: [styles21.background, { backgroundColor: colors.card }],
|
|
1776
|
+
handleIndicatorStyle: [styles21.handle, { backgroundColor: colors.border }],
|
|
1720
1777
|
enablePanDownToClose: true
|
|
1721
1778
|
},
|
|
1722
|
-
/* @__PURE__ */ React25.createElement(BottomSheetView, { style: [
|
|
1779
|
+
/* @__PURE__ */ React25.createElement(BottomSheetView, { style: [styles21.content, style] }, title || description ? /* @__PURE__ */ React25.createElement(View, { style: styles21.header }, title ? /* @__PURE__ */ React25.createElement(Text, { style: [styles21.title, { color: colors.cardForeground }], allowFontScaling: true }, title) : null, description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles21.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null) : null, children)
|
|
1723
1780
|
);
|
|
1724
1781
|
}
|
|
1725
|
-
var
|
|
1782
|
+
var styles21 = StyleSheet.create({
|
|
1726
1783
|
background: {
|
|
1727
1784
|
borderTopLeftRadius: ms(16),
|
|
1728
1785
|
borderTopRightRadius: ms(16)
|
|
@@ -1741,10 +1798,11 @@ var styles20 = StyleSheet.create({
|
|
|
1741
1798
|
marginBottom: vs(16)
|
|
1742
1799
|
},
|
|
1743
1800
|
title: {
|
|
1744
|
-
|
|
1745
|
-
|
|
1801
|
+
fontFamily: "Poppins-SemiBold",
|
|
1802
|
+
fontSize: ms(18)
|
|
1746
1803
|
},
|
|
1747
1804
|
description: {
|
|
1805
|
+
fontFamily: "Poppins-Regular",
|
|
1748
1806
|
fontSize: ms(14),
|
|
1749
1807
|
lineHeight: mvs(20)
|
|
1750
1808
|
}
|
|
@@ -1752,6 +1810,7 @@ var styles20 = StyleSheet.create({
|
|
|
1752
1810
|
var isIOS = Platform.OS === "ios";
|
|
1753
1811
|
var isAndroid = Platform.OS === "android";
|
|
1754
1812
|
var isWeb2 = Platform.OS === "web";
|
|
1813
|
+
var nativeDriver9 = Platform.OS !== "web";
|
|
1755
1814
|
function Select({
|
|
1756
1815
|
options,
|
|
1757
1816
|
value,
|
|
@@ -1770,10 +1829,10 @@ function Select({
|
|
|
1770
1829
|
const selected = options.find((o) => o.value === value);
|
|
1771
1830
|
const handlePressIn = () => {
|
|
1772
1831
|
if (disabled) return;
|
|
1773
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1832
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver9, speed: 40, bounciness: 0 }).start();
|
|
1774
1833
|
};
|
|
1775
1834
|
const handlePressOut = () => {
|
|
1776
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1835
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver9, speed: 40, bounciness: 4 }).start();
|
|
1777
1836
|
};
|
|
1778
1837
|
const handleOpen = () => {
|
|
1779
1838
|
if (disabled) return;
|
|
@@ -1795,11 +1854,11 @@ function Select({
|
|
|
1795
1854
|
}
|
|
1796
1855
|
setPickerVisible(false);
|
|
1797
1856
|
};
|
|
1798
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
1857
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles22.container, style] }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles22.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, !isWeb2 ? /* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }], opacity: disabled ? 0.45 : 1 } }, /* @__PURE__ */ React25.createElement(
|
|
1799
1858
|
TouchableOpacity,
|
|
1800
1859
|
{
|
|
1801
1860
|
style: [
|
|
1802
|
-
|
|
1861
|
+
styles22.trigger,
|
|
1803
1862
|
{
|
|
1804
1863
|
borderColor: error ? colors.destructive : colors.border,
|
|
1805
1864
|
backgroundColor: colors.background
|
|
@@ -1815,7 +1874,7 @@ function Select({
|
|
|
1815
1874
|
Text,
|
|
1816
1875
|
{
|
|
1817
1876
|
style: [
|
|
1818
|
-
|
|
1877
|
+
styles22.triggerText,
|
|
1819
1878
|
{ color: selected ? colors.foreground : colors.mutedForeground }
|
|
1820
1879
|
],
|
|
1821
1880
|
numberOfLines: 1,
|
|
@@ -1832,8 +1891,8 @@ function Select({
|
|
|
1832
1891
|
animationType: "slide",
|
|
1833
1892
|
onRequestClose: handleDismiss
|
|
1834
1893
|
},
|
|
1835
|
-
/* @__PURE__ */ React25.createElement(TouchableOpacity, { style:
|
|
1836
|
-
/* @__PURE__ */ React25.createElement(View, { style: [
|
|
1894
|
+
/* @__PURE__ */ React25.createElement(TouchableOpacity, { style: styles22.iosBackdrop, activeOpacity: 1, onPress: handleDismiss }),
|
|
1895
|
+
/* @__PURE__ */ React25.createElement(View, { style: [styles22.iosSheet, { backgroundColor: colors.card }] }, /* @__PURE__ */ React25.createElement(View, { style: [styles22.iosToolbar, { borderBottomColor: colors.border }] }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles22.iosToolbarTitle, { color: colors.foreground }], allowFontScaling: true }, label) : /* @__PURE__ */ React25.createElement(View, null), /* @__PURE__ */ React25.createElement(TouchableOpacity, { onPress: handleConfirm, style: styles22.iosDoneBtn, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 } }, /* @__PURE__ */ React25.createElement(Text, { style: [styles22.iosDoneBtnText, { color: colors.primary }], allowFontScaling: true }, "Done"))), /* @__PURE__ */ React25.createElement(
|
|
1837
1896
|
Picker,
|
|
1838
1897
|
{
|
|
1839
1898
|
selectedValue: pendingValue ?? "",
|
|
@@ -1866,7 +1925,7 @@ function Select({
|
|
|
1866
1925
|
mode: "dialog",
|
|
1867
1926
|
enabled: !disabled,
|
|
1868
1927
|
prompt: label,
|
|
1869
|
-
style:
|
|
1928
|
+
style: styles22.androidHiddenPicker
|
|
1870
1929
|
},
|
|
1871
1930
|
!value ? /* @__PURE__ */ React25.createElement(Picker.Item, { label: placeholder, value: "", enabled: false }) : null,
|
|
1872
1931
|
options.map((o) => /* @__PURE__ */ React25.createElement(
|
|
@@ -1889,7 +1948,7 @@ function Select({
|
|
|
1889
1948
|
},
|
|
1890
1949
|
enabled: !disabled,
|
|
1891
1950
|
style: [
|
|
1892
|
-
|
|
1951
|
+
styles22.webPicker,
|
|
1893
1952
|
{
|
|
1894
1953
|
borderColor: error ? colors.destructive : colors.border,
|
|
1895
1954
|
color: selected ? colors.foreground : colors.mutedForeground,
|
|
@@ -1908,38 +1967,35 @@ function Select({
|
|
|
1908
1967
|
enabled: !o.disabled
|
|
1909
1968
|
}
|
|
1910
1969
|
))
|
|
1911
|
-
) : null, error ? /* @__PURE__ */ React25.createElement(Text, { style: [
|
|
1970
|
+
) : null, error ? /* @__PURE__ */ React25.createElement(Text, { style: [styles22.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null);
|
|
1912
1971
|
}
|
|
1913
|
-
var
|
|
1972
|
+
var styles22 = StyleSheet.create({
|
|
1914
1973
|
container: {
|
|
1915
1974
|
gap: vs(8)
|
|
1916
1975
|
},
|
|
1917
1976
|
label: {
|
|
1918
|
-
|
|
1919
|
-
|
|
1977
|
+
fontFamily: "Poppins-Medium",
|
|
1978
|
+
fontSize: ms(13)
|
|
1920
1979
|
},
|
|
1921
1980
|
trigger: {
|
|
1922
1981
|
flexDirection: "row",
|
|
1923
1982
|
alignItems: "center",
|
|
1924
1983
|
justifyContent: "space-between",
|
|
1925
|
-
borderWidth: 1
|
|
1984
|
+
borderWidth: 1,
|
|
1926
1985
|
borderRadius: ms(8),
|
|
1927
|
-
paddingHorizontal: s(
|
|
1928
|
-
paddingVertical: vs(
|
|
1929
|
-
shadowColor: "#000",
|
|
1930
|
-
shadowOffset: { width: 0, height: 1 },
|
|
1931
|
-
shadowOpacity: 0.04,
|
|
1932
|
-
shadowRadius: 2,
|
|
1933
|
-
elevation: 1
|
|
1986
|
+
paddingHorizontal: s(14),
|
|
1987
|
+
paddingVertical: vs(11)
|
|
1934
1988
|
},
|
|
1935
1989
|
triggerText: {
|
|
1936
|
-
|
|
1990
|
+
fontFamily: "Poppins-Regular",
|
|
1991
|
+
fontSize: ms(15),
|
|
1937
1992
|
flex: 1
|
|
1938
1993
|
},
|
|
1939
1994
|
chevron: {
|
|
1940
1995
|
marginLeft: s(8)
|
|
1941
1996
|
},
|
|
1942
1997
|
helperText: {
|
|
1998
|
+
fontFamily: "Poppins-Regular",
|
|
1943
1999
|
fontSize: ms(13)
|
|
1944
2000
|
},
|
|
1945
2001
|
iosBackdrop: {
|
|
@@ -1960,15 +2016,15 @@ var styles21 = StyleSheet.create({
|
|
|
1960
2016
|
borderBottomWidth: 1
|
|
1961
2017
|
},
|
|
1962
2018
|
iosToolbarTitle: {
|
|
1963
|
-
|
|
1964
|
-
|
|
2019
|
+
fontFamily: "Poppins-SemiBold",
|
|
2020
|
+
fontSize: ms(17)
|
|
1965
2021
|
},
|
|
1966
2022
|
iosDoneBtn: {
|
|
1967
2023
|
padding: s(4)
|
|
1968
2024
|
},
|
|
1969
2025
|
iosDoneBtnText: {
|
|
1970
|
-
|
|
1971
|
-
|
|
2026
|
+
fontFamily: "Poppins-SemiBold",
|
|
2027
|
+
fontSize: ms(17)
|
|
1972
2028
|
},
|
|
1973
2029
|
androidHiddenPicker: {
|
|
1974
2030
|
height: 0,
|
|
@@ -1976,11 +2032,11 @@ var styles21 = StyleSheet.create({
|
|
|
1976
2032
|
position: "absolute"
|
|
1977
2033
|
},
|
|
1978
2034
|
webPicker: {
|
|
1979
|
-
borderWidth: 1
|
|
2035
|
+
borderWidth: 1,
|
|
1980
2036
|
borderRadius: ms(8),
|
|
1981
|
-
paddingHorizontal: s(
|
|
1982
|
-
paddingVertical: vs(
|
|
1983
|
-
fontSize: ms(
|
|
2037
|
+
paddingHorizontal: s(14),
|
|
2038
|
+
paddingVertical: vs(11),
|
|
2039
|
+
fontSize: ms(15)
|
|
1984
2040
|
}
|
|
1985
2041
|
});
|
|
1986
2042
|
var ToastContext = createContext({
|
|
@@ -2028,19 +2084,21 @@ function ToastNotification({ item, onDismiss }) {
|
|
|
2028
2084
|
opacity: opacity.value,
|
|
2029
2085
|
transform: [{ translateY: translateY.value }, { translateX: translateX.value }]
|
|
2030
2086
|
}));
|
|
2087
|
+
const variant = item.variant ?? "default";
|
|
2031
2088
|
const bgColor = {
|
|
2032
2089
|
default: colors.foreground,
|
|
2033
|
-
destructive: colors.
|
|
2034
|
-
success: colors.
|
|
2035
|
-
}[
|
|
2090
|
+
destructive: colors.destructiveBorder,
|
|
2091
|
+
success: colors.successBorder
|
|
2092
|
+
}[variant];
|
|
2036
2093
|
const textColor = {
|
|
2037
2094
|
default: colors.background,
|
|
2038
|
-
destructive:
|
|
2039
|
-
success:
|
|
2040
|
-
}[
|
|
2041
|
-
const
|
|
2095
|
+
destructive: "#991b1b",
|
|
2096
|
+
success: "#166534"
|
|
2097
|
+
}[variant];
|
|
2098
|
+
const borderColor = textColor;
|
|
2099
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "check-circle", size: 18, color: textColor }) : variant === "destructive" ? /* @__PURE__ */ React25.createElement(AntDesign$1, { name: "exclamation-circle", size: 18, color: textColor }) : /* @__PURE__ */ React25.createElement(Entypo$1, { name: "info-with-circle", size: 18, color: textColor });
|
|
2042
2100
|
const leftIcon = item.iconName ? renderIcon(item.iconName, 22, item.iconColor ?? textColor) : item.icon ?? defaultIcon;
|
|
2043
|
-
return /* @__PURE__ */ React25.createElement(GestureDetector, { gesture: panGesture }, /* @__PURE__ */ React25.createElement(Animated11.View, { style: [
|
|
2101
|
+
return /* @__PURE__ */ React25.createElement(GestureDetector, { gesture: panGesture }, /* @__PURE__ */ React25.createElement(Animated11.View, { style: [styles23.toast, { backgroundColor: bgColor, borderColor }, animatedStyle] }, /* @__PURE__ */ React25.createElement(View, { style: styles23.leftIconContainer }, leftIcon), /* @__PURE__ */ React25.createElement(View, { style: styles23.toastContent }, item.title ? /* @__PURE__ */ React25.createElement(Text, { style: [styles23.toastTitle, { color: textColor }], allowFontScaling: true }, item.title) : null, item.description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles23.toastDescription, { color: textColor, opacity: 0.85 }], allowFontScaling: true }, item.description) : null), /* @__PURE__ */ React25.createElement(TouchableOpacity, { onPress: onDismiss, style: styles23.dismissButton, touchSoundDisabled: true }, /* @__PURE__ */ React25.createElement(AntDesign$1, { name: "close-circle", size: 18, color: textColor }))));
|
|
2044
2102
|
}
|
|
2045
2103
|
function ToastProvider({ children }) {
|
|
2046
2104
|
const [toasts, setToasts] = useState([]);
|
|
@@ -2059,9 +2117,9 @@ function ToastProvider({ children }) {
|
|
|
2059
2117
|
const dismiss = useCallback((id) => {
|
|
2060
2118
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
2061
2119
|
}, []);
|
|
2062
|
-
return /* @__PURE__ */ React25.createElement(ToastContext.Provider, { value: { toast, dismiss } }, children, /* @__PURE__ */ React25.createElement(View, { style: [
|
|
2120
|
+
return /* @__PURE__ */ React25.createElement(ToastContext.Provider, { value: { toast, dismiss } }, children, /* @__PURE__ */ React25.createElement(View, { style: [styles23.container, Platform.OS === "web" && styles23.containerWeb, { top: insets.top + 8 }], pointerEvents: "box-none" }, toasts.map((item) => /* @__PURE__ */ React25.createElement(ToastNotification, { key: item.id, item, onDismiss: () => dismiss(item.id) }))));
|
|
2063
2121
|
}
|
|
2064
|
-
var
|
|
2122
|
+
var styles23 = StyleSheet.create({
|
|
2065
2123
|
container: {
|
|
2066
2124
|
position: "absolute",
|
|
2067
2125
|
left: s(16),
|
|
@@ -2078,30 +2136,32 @@ var styles22 = StyleSheet.create({
|
|
|
2078
2136
|
toast: {
|
|
2079
2137
|
flexDirection: "row",
|
|
2080
2138
|
alignItems: "center",
|
|
2081
|
-
borderRadius: ms(
|
|
2082
|
-
|
|
2083
|
-
|
|
2139
|
+
borderRadius: ms(12),
|
|
2140
|
+
borderWidth: 1,
|
|
2141
|
+
paddingHorizontal: s(14),
|
|
2142
|
+
paddingVertical: vs(12),
|
|
2084
2143
|
shadowColor: "#000",
|
|
2085
|
-
shadowOffset: { width: 0, height:
|
|
2086
|
-
shadowOpacity: 0.
|
|
2144
|
+
shadowOffset: { width: 0, height: 3 },
|
|
2145
|
+
shadowOpacity: 0.1,
|
|
2087
2146
|
shadowRadius: 8,
|
|
2088
|
-
elevation:
|
|
2147
|
+
elevation: 5
|
|
2089
2148
|
},
|
|
2090
2149
|
toastContent: {
|
|
2091
2150
|
flex: 1,
|
|
2092
2151
|
gap: vs(4)
|
|
2093
2152
|
},
|
|
2094
2153
|
leftIconContainer: {
|
|
2095
|
-
width: s(
|
|
2154
|
+
width: s(28),
|
|
2096
2155
|
alignItems: "center",
|
|
2097
2156
|
justifyContent: "center",
|
|
2098
|
-
marginRight: s(
|
|
2157
|
+
marginRight: s(10)
|
|
2099
2158
|
},
|
|
2100
2159
|
toastTitle: {
|
|
2101
|
-
|
|
2102
|
-
|
|
2160
|
+
fontFamily: "Poppins-SemiBold",
|
|
2161
|
+
fontSize: ms(15)
|
|
2103
2162
|
},
|
|
2104
2163
|
toastDescription: {
|
|
2164
|
+
fontFamily: "Poppins-Regular",
|
|
2105
2165
|
fontSize: ms(14)
|
|
2106
2166
|
},
|
|
2107
2167
|
dismissButton: {
|
|
@@ -2126,30 +2186,33 @@ function CurrencyInput({
|
|
|
2126
2186
|
hint,
|
|
2127
2187
|
placeholder,
|
|
2128
2188
|
editable,
|
|
2189
|
+
prefixIcon,
|
|
2129
2190
|
containerStyle,
|
|
2130
2191
|
style
|
|
2131
2192
|
}) {
|
|
2132
2193
|
const handleChange = (text) => {
|
|
2133
2194
|
const withoutPrefix = prefix && text.startsWith(prefix) ? text.slice(prefix.length) : text;
|
|
2134
2195
|
const formatted = formatCurrency(withoutPrefix, thousandsSeparator);
|
|
2135
|
-
const display = formatted
|
|
2196
|
+
const display = formatted;
|
|
2136
2197
|
onChangeText?.(display);
|
|
2137
2198
|
const separatorRegex = new RegExp(`\\${thousandsSeparator}`, "g");
|
|
2138
2199
|
const raw = parseFloat(formatted.replace(separatorRegex, "") || "0");
|
|
2139
2200
|
onChangeValue?.(isNaN(raw) ? 0 : raw);
|
|
2140
2201
|
};
|
|
2141
|
-
const inputStyle = size === "large" ? { fontSize: ms(36) } : {};
|
|
2202
|
+
const inputStyle = size === "large" ? { fontFamily: "Poppins-Regular", fontSize: ms(36) } : { fontFamily: "Poppins-Regular" };
|
|
2203
|
+
const displayValue = value && prefix && value.startsWith(prefix) ? value.slice(prefix.length) : value;
|
|
2142
2204
|
return /* @__PURE__ */ React25.createElement(
|
|
2143
2205
|
Input,
|
|
2144
2206
|
{
|
|
2145
|
-
value,
|
|
2207
|
+
value: displayValue,
|
|
2146
2208
|
onChangeText: handleChange,
|
|
2147
2209
|
keyboardType: "numeric",
|
|
2148
2210
|
label,
|
|
2149
2211
|
error,
|
|
2150
2212
|
hint,
|
|
2151
|
-
placeholder: placeholder ??
|
|
2213
|
+
placeholder: placeholder ?? "0",
|
|
2152
2214
|
editable,
|
|
2215
|
+
prefix: prefixIcon,
|
|
2153
2216
|
containerStyle,
|
|
2154
2217
|
style: [inputStyle, style]
|
|
2155
2218
|
}
|
|
@@ -2170,16 +2233,16 @@ function formatValue(value, prefix, showDecimals) {
|
|
|
2170
2233
|
function CurrencyDisplay({ value, prefix = "$", showDecimals = false, textColor, style }) {
|
|
2171
2234
|
const { colors } = useTheme();
|
|
2172
2235
|
const formatted = formatValue(value, prefix, showDecimals);
|
|
2173
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
2236
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles24.container, style] }, /* @__PURE__ */ React25.createElement(Text, { style: [styles24.amount, { color: textColor ?? colors.foreground }], allowFontScaling: true }, formatted));
|
|
2174
2237
|
}
|
|
2175
|
-
var
|
|
2238
|
+
var styles24 = StyleSheet.create({
|
|
2176
2239
|
container: {},
|
|
2177
2240
|
amount: {
|
|
2178
|
-
|
|
2179
|
-
|
|
2241
|
+
fontFamily: "Poppins-Bold",
|
|
2242
|
+
fontSize: ms(56)
|
|
2180
2243
|
}
|
|
2181
2244
|
});
|
|
2182
|
-
var
|
|
2245
|
+
var nativeDriver10 = Platform.OS !== "web";
|
|
2183
2246
|
function ListItem({
|
|
2184
2247
|
leftRender,
|
|
2185
2248
|
rightRender,
|
|
@@ -2208,7 +2271,7 @@ function ListItem({
|
|
|
2208
2271
|
if (!onPress || disabled) return;
|
|
2209
2272
|
Animated.spring(scale2, {
|
|
2210
2273
|
toValue: 0.97,
|
|
2211
|
-
useNativeDriver:
|
|
2274
|
+
useNativeDriver: nativeDriver10,
|
|
2212
2275
|
speed: 40,
|
|
2213
2276
|
bounciness: 0
|
|
2214
2277
|
}).start();
|
|
@@ -2216,7 +2279,7 @@ function ListItem({
|
|
|
2216
2279
|
const handlePressOut = () => {
|
|
2217
2280
|
Animated.spring(scale2, {
|
|
2218
2281
|
toValue: 1,
|
|
2219
|
-
useNativeDriver:
|
|
2282
|
+
useNativeDriver: nativeDriver10,
|
|
2220
2283
|
speed: 40,
|
|
2221
2284
|
bounciness: 4
|
|
2222
2285
|
}).start();
|
|
@@ -2238,10 +2301,10 @@ function ListItem({
|
|
|
2238
2301
|
shadowRadius: 6,
|
|
2239
2302
|
elevation: 2
|
|
2240
2303
|
} : {};
|
|
2241
|
-
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled &&
|
|
2304
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles25.disabled] }, /* @__PURE__ */ React25.createElement(
|
|
2242
2305
|
TouchableOpacity,
|
|
2243
2306
|
{
|
|
2244
|
-
style: [
|
|
2307
|
+
style: [styles25.container, cardStyle, style],
|
|
2245
2308
|
onPress: onPress ? handlePress : void 0,
|
|
2246
2309
|
onPressIn: handlePressIn,
|
|
2247
2310
|
onPressOut: handlePressOut,
|
|
@@ -2249,11 +2312,11 @@ function ListItem({
|
|
|
2249
2312
|
activeOpacity: 1,
|
|
2250
2313
|
touchSoundDisabled: true
|
|
2251
2314
|
},
|
|
2252
|
-
effectiveLeft ? /* @__PURE__ */ React25.createElement(View, { style:
|
|
2253
|
-
/* @__PURE__ */ React25.createElement(View, { style:
|
|
2315
|
+
effectiveLeft ? /* @__PURE__ */ React25.createElement(View, { style: styles25.leftContainer }, effectiveLeft) : null,
|
|
2316
|
+
/* @__PURE__ */ React25.createElement(View, { style: styles25.content }, /* @__PURE__ */ React25.createElement(
|
|
2254
2317
|
Text,
|
|
2255
2318
|
{
|
|
2256
|
-
style: [
|
|
2319
|
+
style: [styles25.title, { color: colors.foreground }, titleStyle],
|
|
2257
2320
|
numberOfLines: 2,
|
|
2258
2321
|
allowFontScaling: true
|
|
2259
2322
|
},
|
|
@@ -2261,7 +2324,7 @@ function ListItem({
|
|
|
2261
2324
|
), subtitle ? /* @__PURE__ */ React25.createElement(
|
|
2262
2325
|
Text,
|
|
2263
2326
|
{
|
|
2264
|
-
style: [
|
|
2327
|
+
style: [styles25.subtitle, { color: colors.mutedForeground }, subtitleStyle],
|
|
2265
2328
|
numberOfLines: 2,
|
|
2266
2329
|
allowFontScaling: true
|
|
2267
2330
|
},
|
|
@@ -2269,16 +2332,16 @@ function ListItem({
|
|
|
2269
2332
|
) : null, caption ? /* @__PURE__ */ React25.createElement(
|
|
2270
2333
|
Text,
|
|
2271
2334
|
{
|
|
2272
|
-
style: [
|
|
2335
|
+
style: [styles25.caption, { color: colors.mutedForeground }, captionStyle],
|
|
2273
2336
|
numberOfLines: 1,
|
|
2274
2337
|
allowFontScaling: true
|
|
2275
2338
|
},
|
|
2276
2339
|
caption
|
|
2277
2340
|
) : null),
|
|
2278
|
-
effectiveRight !== void 0 ? /* @__PURE__ */ React25.createElement(View, { style:
|
|
2341
|
+
effectiveRight !== void 0 ? /* @__PURE__ */ React25.createElement(View, { style: styles25.rightContainer }, typeof effectiveRight === "string" ? /* @__PURE__ */ React25.createElement(
|
|
2279
2342
|
Text,
|
|
2280
2343
|
{
|
|
2281
|
-
style: [
|
|
2344
|
+
style: [styles25.rightText, { color: colors.mutedForeground }],
|
|
2282
2345
|
allowFontScaling: true
|
|
2283
2346
|
},
|
|
2284
2347
|
effectiveRight
|
|
@@ -2287,18 +2350,18 @@ function ListItem({
|
|
|
2287
2350
|
View,
|
|
2288
2351
|
{
|
|
2289
2352
|
style: [
|
|
2290
|
-
|
|
2353
|
+
styles25.separator,
|
|
2291
2354
|
{ backgroundColor: colors.border, marginLeft: effectiveLeft ? s(16) + s(44) + s(12) : s(16) }
|
|
2292
2355
|
]
|
|
2293
2356
|
}
|
|
2294
2357
|
) : null);
|
|
2295
2358
|
}
|
|
2296
|
-
var
|
|
2359
|
+
var styles25 = StyleSheet.create({
|
|
2297
2360
|
container: {
|
|
2298
2361
|
flexDirection: "row",
|
|
2299
2362
|
alignItems: "center",
|
|
2300
2363
|
paddingHorizontal: s(16),
|
|
2301
|
-
paddingVertical: vs(
|
|
2364
|
+
paddingVertical: vs(10),
|
|
2302
2365
|
gap: s(12)
|
|
2303
2366
|
},
|
|
2304
2367
|
leftContainer: {
|
|
@@ -2313,18 +2376,18 @@ var styles24 = StyleSheet.create({
|
|
|
2313
2376
|
gap: vs(4)
|
|
2314
2377
|
},
|
|
2315
2378
|
title: {
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
lineHeight: mvs(
|
|
2379
|
+
fontFamily: "Poppins-Medium",
|
|
2380
|
+
fontSize: ms(15),
|
|
2381
|
+
lineHeight: mvs(22)
|
|
2319
2382
|
},
|
|
2320
2383
|
subtitle: {
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
lineHeight: mvs(
|
|
2384
|
+
fontFamily: "Poppins-Regular",
|
|
2385
|
+
fontSize: ms(13),
|
|
2386
|
+
lineHeight: mvs(18)
|
|
2324
2387
|
},
|
|
2325
2388
|
caption: {
|
|
2389
|
+
fontFamily: "Poppins-Regular",
|
|
2326
2390
|
fontSize: ms(12),
|
|
2327
|
-
fontWeight: "400",
|
|
2328
2391
|
lineHeight: mvs(16),
|
|
2329
2392
|
opacity: 0.7
|
|
2330
2393
|
},
|
|
@@ -2335,7 +2398,8 @@ var styles24 = StyleSheet.create({
|
|
|
2335
2398
|
maxWidth: s(160)
|
|
2336
2399
|
},
|
|
2337
2400
|
rightText: {
|
|
2338
|
-
|
|
2401
|
+
fontFamily: "Poppins-Regular",
|
|
2402
|
+
fontSize: ms(14)
|
|
2339
2403
|
},
|
|
2340
2404
|
chevron: {
|
|
2341
2405
|
marginLeft: s(4)
|
|
@@ -2348,8 +2412,8 @@ var styles24 = StyleSheet.create({
|
|
|
2348
2412
|
opacity: 0.45
|
|
2349
2413
|
}
|
|
2350
2414
|
});
|
|
2351
|
-
var
|
|
2352
|
-
function Chip({ label, selected = false, onPress, style }) {
|
|
2415
|
+
var nativeDriver11 = Platform.OS !== "web";
|
|
2416
|
+
function Chip({ label, selected = false, onPress, icon, iconName, style }) {
|
|
2353
2417
|
const { colors } = useTheme();
|
|
2354
2418
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
2355
2419
|
const pressAnim = useRef(new Animated.Value(selected ? 1 : 0)).current;
|
|
@@ -2364,7 +2428,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2364
2428
|
const handlePressIn = () => {
|
|
2365
2429
|
Animated.spring(scale2, {
|
|
2366
2430
|
toValue: 0.95,
|
|
2367
|
-
useNativeDriver:
|
|
2431
|
+
useNativeDriver: nativeDriver11,
|
|
2368
2432
|
speed: 40,
|
|
2369
2433
|
bounciness: 0
|
|
2370
2434
|
}).start();
|
|
@@ -2372,7 +2436,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2372
2436
|
const handlePressOut = () => {
|
|
2373
2437
|
Animated.spring(scale2, {
|
|
2374
2438
|
toValue: 1,
|
|
2375
|
-
useNativeDriver:
|
|
2439
|
+
useNativeDriver: nativeDriver11,
|
|
2376
2440
|
speed: 40,
|
|
2377
2441
|
bounciness: 4
|
|
2378
2442
|
}).start();
|
|
@@ -2393,7 +2457,8 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2393
2457
|
inputRange: [0, 1],
|
|
2394
2458
|
outputRange: [colors.border, colors.primary]
|
|
2395
2459
|
});
|
|
2396
|
-
|
|
2460
|
+
const resolvedIcon = iconName ? renderIcon(iconName, ms(13), selected ? colors.primaryForeground : colors.foreground) : icon;
|
|
2461
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [styles26.wrapper, { transform: [{ scale: scale2 }] }, style] }, /* @__PURE__ */ React25.createElement(
|
|
2397
2462
|
TouchableOpacity,
|
|
2398
2463
|
{
|
|
2399
2464
|
onPress: handlePress,
|
|
@@ -2402,7 +2467,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2402
2467
|
activeOpacity: 1,
|
|
2403
2468
|
touchSoundDisabled: true
|
|
2404
2469
|
},
|
|
2405
|
-
/* @__PURE__ */ React25.createElement(Animated.View, { style: [
|
|
2470
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: [styles26.chip, { backgroundColor, borderColor }] }, resolvedIcon ? /* @__PURE__ */ React25.createElement(View, { style: styles26.chipIcon }, resolvedIcon) : null, /* @__PURE__ */ React25.createElement(Animated.Text, { style: [styles26.label, { color: textColor }], allowFontScaling: true }, label))
|
|
2406
2471
|
));
|
|
2407
2472
|
}
|
|
2408
2473
|
function ChipGroup({ options, value, onValueChange, multiSelect = false, style }) {
|
|
@@ -2427,7 +2492,7 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
2427
2492
|
}
|
|
2428
2493
|
return optionValue === value;
|
|
2429
2494
|
};
|
|
2430
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
2495
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles26.group, style] }, options.map((opt) => /* @__PURE__ */ React25.createElement(
|
|
2431
2496
|
Chip,
|
|
2432
2497
|
{
|
|
2433
2498
|
key: opt.value,
|
|
@@ -2437,20 +2502,26 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
2437
2502
|
}
|
|
2438
2503
|
)));
|
|
2439
2504
|
}
|
|
2440
|
-
var
|
|
2505
|
+
var styles26 = StyleSheet.create({
|
|
2441
2506
|
wrapper: {},
|
|
2442
2507
|
chip: {
|
|
2443
2508
|
borderRadius: 999,
|
|
2444
2509
|
paddingHorizontal: s(14),
|
|
2445
|
-
paddingVertical: vs(
|
|
2446
|
-
borderWidth: 1
|
|
2510
|
+
paddingVertical: vs(5),
|
|
2511
|
+
borderWidth: 1,
|
|
2512
|
+
alignItems: "center",
|
|
2513
|
+
justifyContent: "center",
|
|
2514
|
+
flexDirection: "row",
|
|
2515
|
+
gap: s(5)
|
|
2516
|
+
},
|
|
2517
|
+
chipIcon: {
|
|
2447
2518
|
alignItems: "center",
|
|
2448
2519
|
justifyContent: "center"
|
|
2449
2520
|
},
|
|
2450
2521
|
label: {
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
lineHeight: mvs(
|
|
2522
|
+
fontFamily: "Poppins-Medium",
|
|
2523
|
+
fontSize: ms(13),
|
|
2524
|
+
lineHeight: mvs(18)
|
|
2454
2525
|
},
|
|
2455
2526
|
group: {
|
|
2456
2527
|
flexDirection: "row",
|
|
@@ -2469,43 +2540,85 @@ function ConfirmDialog({
|
|
|
2469
2540
|
onCancel
|
|
2470
2541
|
}) {
|
|
2471
2542
|
const { colors } = useTheme();
|
|
2472
|
-
|
|
2473
|
-
|
|
2543
|
+
const ref = useRef(null);
|
|
2544
|
+
useEffect(() => {
|
|
2545
|
+
if (visible) {
|
|
2546
|
+
impactLight();
|
|
2547
|
+
ref.current?.present();
|
|
2548
|
+
} else {
|
|
2549
|
+
ref.current?.dismiss();
|
|
2550
|
+
}
|
|
2551
|
+
}, [visible]);
|
|
2552
|
+
const renderBackdrop = (props) => /* @__PURE__ */ React25.createElement(
|
|
2553
|
+
BottomSheetBackdrop,
|
|
2474
2554
|
{
|
|
2475
|
-
|
|
2476
|
-
|
|
2555
|
+
...props,
|
|
2556
|
+
disappearsOnIndex: -1,
|
|
2557
|
+
appearsOnIndex: 0,
|
|
2558
|
+
pressBehavior: "close"
|
|
2559
|
+
}
|
|
2560
|
+
);
|
|
2561
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2562
|
+
BottomSheetModal,
|
|
2563
|
+
{
|
|
2564
|
+
ref,
|
|
2565
|
+
snapPoints: ["35%"],
|
|
2566
|
+
onDismiss: onCancel,
|
|
2567
|
+
backdropComponent: renderBackdrop,
|
|
2568
|
+
backgroundStyle: [styles27.background, { backgroundColor: colors.card }],
|
|
2569
|
+
handleIndicatorStyle: [styles27.handle, { backgroundColor: colors.border }],
|
|
2570
|
+
enablePanDownToClose: true
|
|
2477
2571
|
},
|
|
2478
|
-
/* @__PURE__ */ React25.createElement(Text, { style: [
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2572
|
+
/* @__PURE__ */ React25.createElement(BottomSheetView, { style: styles27.content }, /* @__PURE__ */ React25.createElement(Text, { style: [styles27.title, { color: colors.cardForeground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles27.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null, /* @__PURE__ */ React25.createElement(View, { style: styles27.actions }, /* @__PURE__ */ React25.createElement(
|
|
2573
|
+
Button,
|
|
2574
|
+
{
|
|
2575
|
+
label: cancelLabel,
|
|
2576
|
+
variant: "outline",
|
|
2577
|
+
fullWidth: true,
|
|
2578
|
+
onPress: onCancel,
|
|
2579
|
+
icon: /* @__PURE__ */ React25.createElement(Feather$1, { name: "x", size: 15, color: colors.foreground })
|
|
2580
|
+
}
|
|
2581
|
+
), /* @__PURE__ */ React25.createElement(
|
|
2582
|
+
Button,
|
|
2583
|
+
{
|
|
2584
|
+
label: confirmLabel,
|
|
2585
|
+
variant: confirmVariant,
|
|
2586
|
+
fullWidth: true,
|
|
2587
|
+
onPress: onConfirm,
|
|
2588
|
+
icon: /* @__PURE__ */ React25.createElement(
|
|
2589
|
+
Feather$1,
|
|
2590
|
+
{
|
|
2591
|
+
name: confirmVariant === "destructive" ? "trash-2" : "check",
|
|
2592
|
+
size: 15,
|
|
2593
|
+
color: confirmVariant === "destructive" ? colors.destructiveForeground : colors.primaryForeground
|
|
2594
|
+
}
|
|
2595
|
+
)
|
|
2596
|
+
}
|
|
2597
|
+
)))
|
|
2598
|
+
);
|
|
2482
2599
|
}
|
|
2483
|
-
var
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
justifyContent: "center",
|
|
2488
|
-
alignItems: "center",
|
|
2489
|
-
padding: s(24)
|
|
2600
|
+
var styles27 = StyleSheet.create({
|
|
2601
|
+
background: {
|
|
2602
|
+
borderTopLeftRadius: ms(16),
|
|
2603
|
+
borderTopRightRadius: ms(16)
|
|
2490
2604
|
},
|
|
2491
|
-
|
|
2492
|
-
width:
|
|
2493
|
-
|
|
2494
|
-
borderRadius: ms(
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
shadowRadius: 16,
|
|
2501
|
-
elevation: 8
|
|
2605
|
+
handle: {
|
|
2606
|
+
width: s(36),
|
|
2607
|
+
height: vs(4),
|
|
2608
|
+
borderRadius: ms(2)
|
|
2609
|
+
},
|
|
2610
|
+
content: {
|
|
2611
|
+
paddingHorizontal: s(24),
|
|
2612
|
+
paddingBottom: vs(32),
|
|
2613
|
+
gap: vs(12)
|
|
2502
2614
|
},
|
|
2503
2615
|
title: {
|
|
2616
|
+
fontFamily: "Poppins-SemiBold",
|
|
2504
2617
|
fontSize: ms(18),
|
|
2505
|
-
fontWeight: "600",
|
|
2506
2618
|
lineHeight: mvs(26)
|
|
2507
2619
|
},
|
|
2508
2620
|
description: {
|
|
2621
|
+
fontFamily: "Poppins-Regular",
|
|
2509
2622
|
fontSize: ms(15),
|
|
2510
2623
|
lineHeight: mvs(22)
|
|
2511
2624
|
},
|
|
@@ -2516,9 +2629,9 @@ var styles26 = StyleSheet.create({
|
|
|
2516
2629
|
});
|
|
2517
2630
|
function LabelValue({ label, value, style }) {
|
|
2518
2631
|
const { colors } = useTheme();
|
|
2519
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
2632
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles28.container, style] }, /* @__PURE__ */ React25.createElement(Text, { style: [styles28.label, { color: colors.mutedForeground }], allowFontScaling: true }, label), typeof value === "string" ? /* @__PURE__ */ React25.createElement(Text, { style: [styles28.value, { color: colors.foreground }], allowFontScaling: true }, value) : value);
|
|
2520
2633
|
}
|
|
2521
|
-
var
|
|
2634
|
+
var styles28 = StyleSheet.create({
|
|
2522
2635
|
container: {
|
|
2523
2636
|
flexDirection: "row",
|
|
2524
2637
|
justifyContent: "space-between",
|
|
@@ -2526,13 +2639,14 @@ var styles27 = StyleSheet.create({
|
|
|
2526
2639
|
gap: s(12)
|
|
2527
2640
|
},
|
|
2528
2641
|
label: {
|
|
2642
|
+
fontFamily: "Poppins-Regular",
|
|
2529
2643
|
fontSize: ms(13),
|
|
2530
2644
|
lineHeight: mvs(18)
|
|
2531
2645
|
},
|
|
2532
2646
|
value: {
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
lineHeight: mvs(
|
|
2647
|
+
fontFamily: "Poppins-Medium",
|
|
2648
|
+
fontSize: ms(14),
|
|
2649
|
+
lineHeight: mvs(20),
|
|
2536
2650
|
textAlign: "right"
|
|
2537
2651
|
}
|
|
2538
2652
|
});
|
|
@@ -2568,19 +2682,19 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2568
2682
|
onChange({ month: value.month + 1, year: value.year });
|
|
2569
2683
|
}
|
|
2570
2684
|
};
|
|
2571
|
-
return /* @__PURE__ */ React25.createElement(View, { style: [
|
|
2685
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles29.container, style] }, /* @__PURE__ */ React25.createElement(
|
|
2572
2686
|
TouchableOpacity,
|
|
2573
2687
|
{
|
|
2574
|
-
style:
|
|
2688
|
+
style: styles29.arrow,
|
|
2575
2689
|
onPress: handlePrev,
|
|
2576
2690
|
activeOpacity: 0.6,
|
|
2577
2691
|
touchSoundDisabled: true
|
|
2578
2692
|
},
|
|
2579
2693
|
/* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-left", size: 22, color: colors.foreground })
|
|
2580
|
-
), /* @__PURE__ */ React25.createElement(Text, { style: [
|
|
2694
|
+
), /* @__PURE__ */ React25.createElement(Text, { style: [styles29.label, { color: colors.foreground }], allowFontScaling: true }, MONTH_NAMES[value.month - 1], " ", value.year), /* @__PURE__ */ React25.createElement(
|
|
2581
2695
|
TouchableOpacity,
|
|
2582
2696
|
{
|
|
2583
|
-
style:
|
|
2697
|
+
style: styles29.arrow,
|
|
2584
2698
|
onPress: handleNext,
|
|
2585
2699
|
activeOpacity: 0.6,
|
|
2586
2700
|
touchSoundDisabled: true
|
|
@@ -2588,7 +2702,7 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2588
2702
|
/* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-right", size: 22, color: colors.foreground })
|
|
2589
2703
|
));
|
|
2590
2704
|
}
|
|
2591
|
-
var
|
|
2705
|
+
var styles29 = StyleSheet.create({
|
|
2592
2706
|
container: {
|
|
2593
2707
|
flexDirection: "row",
|
|
2594
2708
|
alignItems: "center",
|
|
@@ -2601,8 +2715,8 @@ var styles28 = StyleSheet.create({
|
|
|
2601
2715
|
justifyContent: "center"
|
|
2602
2716
|
},
|
|
2603
2717
|
label: {
|
|
2718
|
+
fontFamily: "Poppins-Medium",
|
|
2604
2719
|
fontSize: ms(17),
|
|
2605
|
-
fontWeight: "500",
|
|
2606
2720
|
lineHeight: mvs(24),
|
|
2607
2721
|
textAlign: "center",
|
|
2608
2722
|
minWidth: s(160)
|