@retray-dev/ui-kit 2.8.0 → 3.1.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 +73 -17
- package/README.md +23 -3
- package/dist/index.d.mts +17 -6
- package/dist/index.d.ts +17 -6
- package/dist/index.js +446 -329
- package/dist/index.mjs +447 -330
- 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 +36 -36
- 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 +14 -4
- package/src/components/EmptyState/EmptyState.tsx +2 -1
- package/src/components/Input/Input.tsx +16 -9
- 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.js
CHANGED
|
@@ -48,33 +48,41 @@ var defaultLight = {
|
|
|
48
48
|
accent: "#e4e4e4",
|
|
49
49
|
accentForeground: "#171717",
|
|
50
50
|
destructive: "#ef4444",
|
|
51
|
-
destructiveForeground: "#
|
|
51
|
+
destructiveForeground: "#ffffff",
|
|
52
52
|
border: "#e5e5e5",
|
|
53
53
|
input: "#e5e5e5",
|
|
54
54
|
ring: "#1a1a1a",
|
|
55
|
-
success: "#
|
|
56
|
-
successForeground: "#
|
|
55
|
+
success: "#1a7a45",
|
|
56
|
+
successForeground: "#ffffff",
|
|
57
|
+
destructiveTint: "#fff5f5",
|
|
58
|
+
destructiveBorder: "#fecaca",
|
|
59
|
+
successTint: "#f0fdf4",
|
|
60
|
+
successBorder: "#bbf7d0"
|
|
57
61
|
};
|
|
58
62
|
var defaultDark = {
|
|
59
|
-
background: "#
|
|
63
|
+
background: "#0f0f0f",
|
|
60
64
|
foreground: "#fafafa",
|
|
61
|
-
card: "#
|
|
65
|
+
card: "#1c1c1c",
|
|
62
66
|
cardForeground: "#fafafa",
|
|
63
67
|
primary: "#fafafa",
|
|
64
|
-
primaryForeground: "#
|
|
65
|
-
secondary: "#
|
|
68
|
+
primaryForeground: "#0f0f0f",
|
|
69
|
+
secondary: "#272727",
|
|
66
70
|
secondaryForeground: "#fafafa",
|
|
67
|
-
muted: "#
|
|
68
|
-
mutedForeground: "#
|
|
69
|
-
accent: "#
|
|
71
|
+
muted: "#272727",
|
|
72
|
+
mutedForeground: "#9a9a9a",
|
|
73
|
+
accent: "#2e2e2e",
|
|
70
74
|
accentForeground: "#fafafa",
|
|
71
75
|
destructive: "#dc2626",
|
|
72
|
-
destructiveForeground: "#
|
|
73
|
-
border: "#
|
|
76
|
+
destructiveForeground: "#ffffff",
|
|
77
|
+
border: "#303030",
|
|
74
78
|
input: "#2a2a2a",
|
|
75
79
|
ring: "#fafafa",
|
|
76
|
-
success: "#
|
|
77
|
-
successForeground: "#
|
|
80
|
+
success: "#166534",
|
|
81
|
+
successForeground: "#ffffff",
|
|
82
|
+
destructiveTint: "#3b0a0a",
|
|
83
|
+
destructiveBorder: "#7f1d1d",
|
|
84
|
+
successTint: "#052e16",
|
|
85
|
+
successBorder: "#166534"
|
|
78
86
|
};
|
|
79
87
|
|
|
80
88
|
// src/theme/ThemeProvider.tsx
|
|
@@ -171,14 +179,14 @@ function renderIcon(name, size, color) {
|
|
|
171
179
|
// src/components/Button/Button.tsx
|
|
172
180
|
var nativeDriver = reactNative.Platform.OS !== "web";
|
|
173
181
|
var containerSizeStyles = {
|
|
174
|
-
sm: { paddingHorizontal: s(
|
|
175
|
-
md: { paddingHorizontal: s(
|
|
176
|
-
lg: { paddingHorizontal: s(
|
|
182
|
+
sm: { paddingHorizontal: s(12), paddingVertical: vs(10), minHeight: 44 },
|
|
183
|
+
md: { paddingHorizontal: s(16), paddingVertical: vs(10), minHeight: 44 },
|
|
184
|
+
lg: { paddingHorizontal: s(20), paddingVertical: vs(12), minHeight: 48 }
|
|
177
185
|
};
|
|
178
186
|
var labelSizeStyles = {
|
|
179
|
-
sm: { fontSize: ms(
|
|
180
|
-
md: { fontSize: ms(
|
|
181
|
-
lg: { fontSize: ms(
|
|
187
|
+
sm: { fontSize: ms(13) },
|
|
188
|
+
md: { fontSize: ms(15) },
|
|
189
|
+
lg: { fontSize: ms(16) }
|
|
182
190
|
};
|
|
183
191
|
var iconSizeMap = { sm: 16, md: 18, lg: 20 };
|
|
184
192
|
function Button({
|
|
@@ -255,7 +263,7 @@ function Button({
|
|
|
255
263
|
}
|
|
256
264
|
var styles = reactNative.StyleSheet.create({
|
|
257
265
|
base: {
|
|
258
|
-
borderRadius:
|
|
266
|
+
borderRadius: 8,
|
|
259
267
|
alignItems: "center",
|
|
260
268
|
justifyContent: "center",
|
|
261
269
|
flexDirection: "row"
|
|
@@ -267,7 +275,7 @@ var styles = reactNative.StyleSheet.create({
|
|
|
267
275
|
opacity: 0.5
|
|
268
276
|
},
|
|
269
277
|
label: {
|
|
270
|
-
|
|
278
|
+
fontFamily: "Poppins-SemiBold"
|
|
271
279
|
},
|
|
272
280
|
labelWithIcon: {
|
|
273
281
|
marginHorizontal: s(8)
|
|
@@ -364,12 +372,12 @@ var styles2 = reactNative.StyleSheet.create({
|
|
|
364
372
|
}
|
|
365
373
|
});
|
|
366
374
|
var variantStyles = {
|
|
367
|
-
h1: { fontSize: ms(40),
|
|
368
|
-
h2: { fontSize: ms(28),
|
|
369
|
-
h3: { fontSize: ms(22),
|
|
370
|
-
body: { fontSize: ms(17),
|
|
371
|
-
caption: { fontSize: ms(13),
|
|
372
|
-
label: { fontSize: ms(15),
|
|
375
|
+
h1: { fontFamily: "Poppins-Bold", fontSize: ms(40), lineHeight: mvs(52) },
|
|
376
|
+
h2: { fontFamily: "Poppins-Bold", fontSize: ms(28), lineHeight: mvs(36) },
|
|
377
|
+
h3: { fontFamily: "Poppins-SemiBold", fontSize: ms(22), lineHeight: mvs(30) },
|
|
378
|
+
body: { fontFamily: "Poppins-Regular", fontSize: ms(17), lineHeight: mvs(26) },
|
|
379
|
+
caption: { fontFamily: "Poppins-Regular", fontSize: ms(13), lineHeight: mvs(20) },
|
|
380
|
+
label: { fontFamily: "Poppins-Medium", fontSize: ms(15), lineHeight: mvs(22) }
|
|
373
381
|
};
|
|
374
382
|
function Text2({ variant = "body", color, style, children, ...props }) {
|
|
375
383
|
const { colors } = useTheme();
|
|
@@ -385,7 +393,7 @@ function Text2({ variant = "body", color, style, children, ...props }) {
|
|
|
385
393
|
);
|
|
386
394
|
}
|
|
387
395
|
var webInputResetStyle = reactNative.Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
388
|
-
function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, prefixIcon, suffixIcon, prefixIconColor, suffixIconColor, type = "text", containerStyle, style, onFocus, onBlur, secureTextEntry, ...props }) {
|
|
396
|
+
function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, prefixIcon, suffixIcon, prefixIconColor, suffixIconColor, type = "text", containerStyle, inputWrapperStyle, style, onFocus, onBlur, secureTextEntry, ...props }) {
|
|
389
397
|
const { colors } = useTheme();
|
|
390
398
|
const [focused, setFocused] = React25.useState(false);
|
|
391
399
|
const [showPassword, setShowPassword] = React25.useState(false);
|
|
@@ -401,7 +409,8 @@ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, p
|
|
|
401
409
|
{
|
|
402
410
|
borderColor: error ? colors.destructive : focused ? colors.ring ?? colors.primary : colors.border,
|
|
403
411
|
backgroundColor: colors.background
|
|
404
|
-
}
|
|
412
|
+
},
|
|
413
|
+
inputWrapperStyle
|
|
405
414
|
]
|
|
406
415
|
},
|
|
407
416
|
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles3.prefixText, { color: colors.mutedForeground }, prefixStyle], allowFontScaling: true }, effectivePrefix) : /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles3.prefixContainer }, effectivePrefix) : null,
|
|
@@ -438,40 +447,44 @@ var styles3 = reactNative.StyleSheet.create({
|
|
|
438
447
|
gap: vs(8)
|
|
439
448
|
},
|
|
440
449
|
label: {
|
|
441
|
-
|
|
442
|
-
|
|
450
|
+
fontFamily: "Poppins-Medium",
|
|
451
|
+
fontSize: ms(13)
|
|
443
452
|
},
|
|
444
453
|
inputWrapper: {
|
|
445
454
|
flexDirection: "row",
|
|
446
455
|
alignItems: "center",
|
|
447
|
-
borderWidth: 1
|
|
456
|
+
borderWidth: 1,
|
|
448
457
|
borderRadius: ms(8),
|
|
449
|
-
paddingHorizontal: s(
|
|
450
|
-
paddingVertical: vs(
|
|
458
|
+
paddingHorizontal: s(14),
|
|
459
|
+
paddingVertical: vs(11)
|
|
451
460
|
},
|
|
452
461
|
input: {
|
|
462
|
+
fontFamily: "Poppins-Regular",
|
|
453
463
|
flex: 1,
|
|
454
|
-
fontSize: ms(
|
|
464
|
+
fontSize: ms(15),
|
|
455
465
|
paddingVertical: 0
|
|
456
466
|
},
|
|
457
467
|
prefixContainer: {
|
|
458
468
|
marginRight: s(8)
|
|
459
469
|
},
|
|
460
470
|
prefixText: {
|
|
461
|
-
|
|
471
|
+
fontFamily: "Poppins-Regular",
|
|
472
|
+
fontSize: ms(15),
|
|
462
473
|
marginRight: s(8)
|
|
463
474
|
},
|
|
464
475
|
suffixContainer: {
|
|
465
476
|
marginLeft: s(8)
|
|
466
477
|
},
|
|
467
478
|
suffixText: {
|
|
468
|
-
|
|
479
|
+
fontFamily: "Poppins-Regular",
|
|
480
|
+
fontSize: ms(15),
|
|
469
481
|
marginLeft: s(8)
|
|
470
482
|
},
|
|
471
483
|
passwordToggle: {
|
|
472
484
|
padding: s(4)
|
|
473
485
|
},
|
|
474
486
|
helperText: {
|
|
487
|
+
fontFamily: "Poppins-Regular",
|
|
475
488
|
fontSize: ms(13)
|
|
476
489
|
}
|
|
477
490
|
});
|
|
@@ -497,31 +510,35 @@ function Badge({ label, children, variant = "default", size = "md", icon, iconNa
|
|
|
497
510
|
default: { backgroundColor: colors.primary },
|
|
498
511
|
secondary: { backgroundColor: colors.secondary },
|
|
499
512
|
destructive: { backgroundColor: colors.destructive },
|
|
500
|
-
outline: { backgroundColor: "transparent", borderWidth: 1, borderColor: colors.border }
|
|
513
|
+
outline: { backgroundColor: "transparent", borderWidth: 1, borderColor: colors.border },
|
|
514
|
+
success: { backgroundColor: colors.success },
|
|
515
|
+
warning: { backgroundColor: "#f59e0b" },
|
|
516
|
+
successOutline: { backgroundColor: colors.successTint, borderWidth: 1, borderColor: colors.successBorder },
|
|
517
|
+
destructiveOutline: { backgroundColor: colors.destructiveTint, borderWidth: 1, borderColor: colors.destructiveBorder }
|
|
501
518
|
}[variant];
|
|
502
519
|
const textColor = {
|
|
503
520
|
default: colors.primaryForeground,
|
|
504
521
|
secondary: colors.secondaryForeground,
|
|
505
522
|
destructive: colors.destructiveForeground,
|
|
506
|
-
outline: colors.foreground
|
|
523
|
+
outline: colors.foreground,
|
|
524
|
+
success: colors.successForeground,
|
|
525
|
+
warning: "#ffffff",
|
|
526
|
+
successOutline: colors.success,
|
|
527
|
+
destructiveOutline: colors.destructive
|
|
507
528
|
}[variant];
|
|
508
529
|
const effectiveIcon = iconName ? renderIcon(iconName, sizeIconSize[size], iconColor ?? textColor) : icon;
|
|
509
530
|
const content = children ?? label;
|
|
510
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles4.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style] }, effectiveIcon
|
|
531
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles4.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style] }, effectiveIcon, typeof content === "string" ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles4.label, { color: textColor }, sizeFontSize[size]], allowFontScaling: true }, content) : content);
|
|
511
532
|
}
|
|
512
533
|
var styles4 = reactNative.StyleSheet.create({
|
|
513
534
|
container: {
|
|
514
|
-
borderRadius:
|
|
535
|
+
borderRadius: 9999,
|
|
515
536
|
alignSelf: "flex-start",
|
|
516
537
|
flexDirection: "row",
|
|
517
538
|
alignItems: "center"
|
|
518
539
|
},
|
|
519
|
-
iconContainer: {
|
|
520
|
-
justifyContent: "center",
|
|
521
|
-
alignItems: "center"
|
|
522
|
-
},
|
|
523
540
|
label: {
|
|
524
|
-
|
|
541
|
+
fontFamily: "Poppins-Medium"
|
|
525
542
|
}
|
|
526
543
|
});
|
|
527
544
|
var nativeDriver3 = reactNative.Platform.OS !== "web";
|
|
@@ -613,24 +630,27 @@ var styles5 = reactNative.StyleSheet.create({
|
|
|
613
630
|
borderWidth: 1
|
|
614
631
|
},
|
|
615
632
|
header: {
|
|
616
|
-
padding: s(
|
|
633
|
+
padding: s(16),
|
|
617
634
|
paddingBottom: 0,
|
|
618
|
-
gap: vs(
|
|
635
|
+
gap: vs(4)
|
|
619
636
|
},
|
|
620
637
|
title: {
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
lineHeight: mvs(
|
|
638
|
+
fontFamily: "Poppins-SemiBold",
|
|
639
|
+
fontSize: ms(16),
|
|
640
|
+
lineHeight: mvs(22)
|
|
624
641
|
},
|
|
625
642
|
description: {
|
|
626
|
-
|
|
627
|
-
|
|
643
|
+
fontFamily: "Poppins-Regular",
|
|
644
|
+
fontSize: ms(13),
|
|
645
|
+
lineHeight: mvs(18)
|
|
628
646
|
},
|
|
629
647
|
content: {
|
|
630
|
-
padding: s(
|
|
648
|
+
padding: s(16),
|
|
649
|
+
paddingTop: s(12)
|
|
631
650
|
},
|
|
632
651
|
footer: {
|
|
633
|
-
|
|
652
|
+
paddingHorizontal: s(16),
|
|
653
|
+
paddingBottom: vs(14),
|
|
634
654
|
paddingTop: 0,
|
|
635
655
|
flexDirection: "row",
|
|
636
656
|
alignItems: "center"
|
|
@@ -664,10 +684,35 @@ var sizeMap2 = {
|
|
|
664
684
|
md: "small",
|
|
665
685
|
lg: "large"
|
|
666
686
|
};
|
|
667
|
-
|
|
687
|
+
var labelFontSize = {
|
|
688
|
+
sm: ms(11),
|
|
689
|
+
md: ms(13),
|
|
690
|
+
lg: ms(14)
|
|
691
|
+
};
|
|
692
|
+
function Spinner({ size = "md", color, label, ...props }) {
|
|
668
693
|
const { colors } = useTheme();
|
|
694
|
+
if (label) {
|
|
695
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles7.wrapper }, /* @__PURE__ */ React25__default.default.createElement(reactNative.ActivityIndicator, { size: sizeMap2[size], color: color ?? colors.primary, ...props }), /* @__PURE__ */ React25__default.default.createElement(
|
|
696
|
+
reactNative.Text,
|
|
697
|
+
{
|
|
698
|
+
style: [styles7.label, { color: colors.mutedForeground, fontSize: labelFontSize[size] }],
|
|
699
|
+
allowFontScaling: true
|
|
700
|
+
},
|
|
701
|
+
label
|
|
702
|
+
));
|
|
703
|
+
}
|
|
669
704
|
return /* @__PURE__ */ React25__default.default.createElement(reactNative.ActivityIndicator, { size: sizeMap2[size], color: color ?? colors.primary, ...props });
|
|
670
705
|
}
|
|
706
|
+
var styles7 = reactNative.StyleSheet.create({
|
|
707
|
+
wrapper: {
|
|
708
|
+
alignItems: "center",
|
|
709
|
+
gap: vs(6)
|
|
710
|
+
},
|
|
711
|
+
label: {
|
|
712
|
+
fontFamily: "Poppins-Regular",
|
|
713
|
+
lineHeight: mvs(18)
|
|
714
|
+
}
|
|
715
|
+
});
|
|
671
716
|
function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
672
717
|
const { colors, colorScheme } = useTheme();
|
|
673
718
|
const shimmerAnim = React25.useRef(new reactNative.Animated.Value(0)).current;
|
|
@@ -692,7 +737,7 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
692
737
|
reactNative.View,
|
|
693
738
|
{
|
|
694
739
|
style: [
|
|
695
|
-
|
|
740
|
+
styles8.base,
|
|
696
741
|
{ width, height, borderRadius, backgroundColor: colors.muted },
|
|
697
742
|
style
|
|
698
743
|
],
|
|
@@ -709,7 +754,7 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
709
754
|
))
|
|
710
755
|
);
|
|
711
756
|
}
|
|
712
|
-
var
|
|
757
|
+
var styles8 = reactNative.StyleSheet.create({
|
|
713
758
|
base: {
|
|
714
759
|
overflow: "hidden"
|
|
715
760
|
}
|
|
@@ -738,7 +783,7 @@ function Avatar({ src, fallback, size = "md", style }) {
|
|
|
738
783
|
backgroundColor: colors.muted,
|
|
739
784
|
overflow: "hidden"
|
|
740
785
|
};
|
|
741
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
786
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles9.base, containerStyle, style] }, !showFallback ? /* @__PURE__ */ React25__default.default.createElement(
|
|
742
787
|
reactNative.Image,
|
|
743
788
|
{
|
|
744
789
|
source: { uri: src },
|
|
@@ -748,56 +793,59 @@ function Avatar({ src, fallback, size = "md", style }) {
|
|
|
748
793
|
) : /* @__PURE__ */ React25__default.default.createElement(
|
|
749
794
|
reactNative.Text,
|
|
750
795
|
{
|
|
751
|
-
style: [
|
|
796
|
+
style: [styles9.fallback, { color: colors.mutedForeground, fontSize: fontSizeMap[size] }],
|
|
752
797
|
allowFontScaling: true
|
|
753
798
|
},
|
|
754
799
|
fallback?.slice(0, 2).toUpperCase() ?? "?"
|
|
755
800
|
));
|
|
756
801
|
}
|
|
757
|
-
var
|
|
802
|
+
var styles9 = reactNative.StyleSheet.create({
|
|
758
803
|
base: {
|
|
759
804
|
alignItems: "center",
|
|
760
805
|
justifyContent: "center"
|
|
761
806
|
},
|
|
762
807
|
fallback: {
|
|
763
|
-
|
|
808
|
+
fontFamily: "Poppins-Medium"
|
|
764
809
|
}
|
|
765
810
|
});
|
|
766
811
|
function AlertBanner({ title, description, variant = "default", icon, iconName, iconColor, style }) {
|
|
767
812
|
const { colors } = useTheme();
|
|
768
|
-
const
|
|
769
|
-
const
|
|
770
|
-
const
|
|
771
|
-
const defaultIcon = variant === "success" ? /* @__PURE__ */ React25__default.default.createElement(vectorIcons.FontAwesome5, { name: "check-circle", size: 18, color:
|
|
772
|
-
const effectiveIcon = iconName ? renderIcon(iconName, 18, iconColor ??
|
|
773
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
813
|
+
const bgColor = variant === "destructive" ? colors.destructiveBorder : variant === "success" ? colors.successBorder : colors.card;
|
|
814
|
+
const textColor = variant === "destructive" ? "#991b1b" : variant === "success" ? "#166534" : colors.foreground;
|
|
815
|
+
const borderColor = textColor;
|
|
816
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React25__default.default.createElement(vectorIcons.FontAwesome5, { name: "check-circle", size: 18, color: textColor }) : variant === "destructive" ? /* @__PURE__ */ React25__default.default.createElement(vectorIcons.MaterialIcons, { name: "error-outline", size: 20, color: textColor }) : /* @__PURE__ */ React25__default.default.createElement(vectorIcons.Entypo, { name: "info-with-circle", size: 18, color: textColor });
|
|
817
|
+
const effectiveIcon = iconName ? renderIcon(iconName, 18, iconColor ?? textColor) : icon ?? defaultIcon;
|
|
818
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles10.container, { backgroundColor: bgColor, borderColor }, style] }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles10.header }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles10.icon }, effectiveIcon), title ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles10.title, { color: textColor }], allowFontScaling: true }, title) : null), description ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles10.description, { color: textColor, opacity: 0.85 }], allowFontScaling: true }, description) : null);
|
|
774
819
|
}
|
|
775
|
-
var
|
|
820
|
+
var styles10 = reactNative.StyleSheet.create({
|
|
776
821
|
container: {
|
|
777
|
-
flexDirection: "row",
|
|
778
822
|
borderWidth: 1,
|
|
779
823
|
borderRadius: ms(12),
|
|
780
|
-
|
|
781
|
-
|
|
824
|
+
paddingHorizontal: s(14),
|
|
825
|
+
paddingVertical: vs(12),
|
|
826
|
+
gap: vs(8),
|
|
782
827
|
shadowColor: "#000",
|
|
783
|
-
shadowOffset: { width: 0, height:
|
|
784
|
-
shadowOpacity: 0.
|
|
785
|
-
shadowRadius:
|
|
786
|
-
elevation:
|
|
828
|
+
shadowOffset: { width: 0, height: 3 },
|
|
829
|
+
shadowOpacity: 0.1,
|
|
830
|
+
shadowRadius: 8,
|
|
831
|
+
elevation: 5
|
|
832
|
+
},
|
|
833
|
+
header: {
|
|
834
|
+
flexDirection: "row",
|
|
835
|
+
alignItems: "center",
|
|
836
|
+
gap: s(10)
|
|
787
837
|
},
|
|
788
838
|
icon: {
|
|
789
839
|
marginTop: 0
|
|
790
840
|
},
|
|
791
|
-
content: {
|
|
792
|
-
flex: 1,
|
|
793
|
-
gap: vs(4)
|
|
794
|
-
},
|
|
795
841
|
title: {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
lineHeight: mvs(20)
|
|
842
|
+
fontFamily: "Poppins-Bold",
|
|
843
|
+
fontSize: ms(15),
|
|
844
|
+
lineHeight: mvs(20),
|
|
845
|
+
flex: 1
|
|
799
846
|
},
|
|
800
847
|
description: {
|
|
848
|
+
fontFamily: "Poppins-Regular",
|
|
801
849
|
fontSize: ms(14),
|
|
802
850
|
lineHeight: mvs(20)
|
|
803
851
|
}
|
|
@@ -819,18 +867,18 @@ function Progress({ value = 0, max = 100, style }) {
|
|
|
819
867
|
return /* @__PURE__ */ React25__default.default.createElement(
|
|
820
868
|
reactNative.View,
|
|
821
869
|
{
|
|
822
|
-
style: [
|
|
870
|
+
style: [styles11.track, { backgroundColor: colors.muted }, style],
|
|
823
871
|
onLayout: (e) => setTrackWidth(e.nativeEvent.layout.width)
|
|
824
872
|
},
|
|
825
873
|
/* @__PURE__ */ React25__default.default.createElement(
|
|
826
874
|
reactNative.Animated.View,
|
|
827
875
|
{
|
|
828
|
-
style: [
|
|
876
|
+
style: [styles11.indicator, { width: animatedWidth, backgroundColor: colors.primary }]
|
|
829
877
|
}
|
|
830
878
|
)
|
|
831
879
|
);
|
|
832
880
|
}
|
|
833
|
-
var
|
|
881
|
+
var styles11 = reactNative.StyleSheet.create({
|
|
834
882
|
track: {
|
|
835
883
|
height: vs(8),
|
|
836
884
|
borderRadius: 999,
|
|
@@ -850,8 +898,8 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, siz
|
|
|
850
898
|
reactNative.View,
|
|
851
899
|
{
|
|
852
900
|
style: [
|
|
853
|
-
|
|
854
|
-
isCompact &&
|
|
901
|
+
styles12.container,
|
|
902
|
+
isCompact && styles12.containerCompact,
|
|
855
903
|
{ borderColor: colors.border },
|
|
856
904
|
style
|
|
857
905
|
]
|
|
@@ -860,25 +908,25 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, siz
|
|
|
860
908
|
reactNative.View,
|
|
861
909
|
{
|
|
862
910
|
style: [
|
|
863
|
-
|
|
864
|
-
isCompact &&
|
|
911
|
+
styles12.iconWrapper,
|
|
912
|
+
isCompact && styles12.iconWrapperCompact,
|
|
865
913
|
{ backgroundColor: colors.muted }
|
|
866
914
|
]
|
|
867
915
|
},
|
|
868
916
|
effectiveIcon
|
|
869
917
|
) : null,
|
|
870
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style:
|
|
918
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles12.textWrapper }, /* @__PURE__ */ React25__default.default.createElement(
|
|
871
919
|
reactNative.Text,
|
|
872
920
|
{
|
|
873
|
-
style: [
|
|
921
|
+
style: [styles12.title, isCompact && styles12.titleCompact, { color: colors.foreground }],
|
|
874
922
|
allowFontScaling: true
|
|
875
923
|
},
|
|
876
924
|
title
|
|
877
|
-
), description && !isCompact ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [
|
|
878
|
-
action && !isCompact ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style:
|
|
925
|
+
), description && !isCompact ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles12.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null),
|
|
926
|
+
action && !isCompact ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles12.action }, action) : null
|
|
879
927
|
);
|
|
880
928
|
}
|
|
881
|
-
var
|
|
929
|
+
var styles12 = reactNative.StyleSheet.create({
|
|
882
930
|
container: {
|
|
883
931
|
alignItems: "center",
|
|
884
932
|
justifyContent: "center",
|
|
@@ -910,14 +958,15 @@ var styles11 = reactNative.StyleSheet.create({
|
|
|
910
958
|
maxWidth: s(320)
|
|
911
959
|
},
|
|
912
960
|
title: {
|
|
961
|
+
fontFamily: "Poppins-Medium",
|
|
913
962
|
fontSize: ms(18),
|
|
914
|
-
fontWeight: "500",
|
|
915
963
|
textAlign: "center"
|
|
916
964
|
},
|
|
917
965
|
titleCompact: {
|
|
918
966
|
fontSize: ms(15)
|
|
919
967
|
},
|
|
920
968
|
description: {
|
|
969
|
+
fontFamily: "Poppins-Regular",
|
|
921
970
|
fontSize: ms(14),
|
|
922
971
|
lineHeight: mvs(20),
|
|
923
972
|
textAlign: "center"
|
|
@@ -940,14 +989,14 @@ function Textarea({
|
|
|
940
989
|
}) {
|
|
941
990
|
const { colors } = useTheme();
|
|
942
991
|
const [focused, setFocused] = React25.useState(false);
|
|
943
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
992
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles13.container, containerStyle] }, label ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles13.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React25__default.default.createElement(
|
|
944
993
|
reactNative.TextInput,
|
|
945
994
|
{
|
|
946
995
|
multiline: true,
|
|
947
996
|
numberOfLines: rows,
|
|
948
997
|
textAlignVertical: "top",
|
|
949
998
|
style: [
|
|
950
|
-
|
|
999
|
+
styles13.input,
|
|
951
1000
|
{
|
|
952
1001
|
borderColor: error ? colors.destructive : focused ? colors.ring ?? colors.primary : colors.border,
|
|
953
1002
|
color: colors.foreground,
|
|
@@ -969,24 +1018,26 @@ function Textarea({
|
|
|
969
1018
|
allowFontScaling: true,
|
|
970
1019
|
...props
|
|
971
1020
|
}
|
|
972
|
-
), error ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [
|
|
1021
|
+
), error ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles13.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null, !error && hint ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles13.helperText, { color: colors.mutedForeground }], allowFontScaling: true }, hint) : null);
|
|
973
1022
|
}
|
|
974
|
-
var
|
|
1023
|
+
var styles13 = reactNative.StyleSheet.create({
|
|
975
1024
|
container: {
|
|
976
1025
|
gap: vs(8)
|
|
977
1026
|
},
|
|
978
1027
|
label: {
|
|
979
|
-
|
|
980
|
-
|
|
1028
|
+
fontFamily: "Poppins-Medium",
|
|
1029
|
+
fontSize: ms(13)
|
|
981
1030
|
},
|
|
982
1031
|
input: {
|
|
983
|
-
|
|
1032
|
+
fontFamily: "Poppins-Regular",
|
|
1033
|
+
borderWidth: 1,
|
|
984
1034
|
borderRadius: ms(8),
|
|
985
|
-
paddingHorizontal: s(
|
|
986
|
-
paddingVertical: vs(
|
|
987
|
-
fontSize: ms(
|
|
1035
|
+
paddingHorizontal: s(14),
|
|
1036
|
+
paddingVertical: vs(11),
|
|
1037
|
+
fontSize: ms(15)
|
|
988
1038
|
},
|
|
989
1039
|
helperText: {
|
|
1040
|
+
fontFamily: "Poppins-Regular",
|
|
990
1041
|
fontSize: ms(13)
|
|
991
1042
|
}
|
|
992
1043
|
});
|
|
@@ -1005,12 +1056,12 @@ function Checkbox({
|
|
|
1005
1056
|
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver4, speed: 40, bounciness: 0 }).start();
|
|
1006
1057
|
};
|
|
1007
1058
|
const handlePressOut = () => {
|
|
1008
|
-
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver4, speed: 40, bounciness:
|
|
1059
|
+
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver4, speed: 40, bounciness: 0 }).start();
|
|
1009
1060
|
};
|
|
1010
|
-
return /* @__PURE__ */ React25__default.default.createElement(
|
|
1061
|
+
return /* @__PURE__ */ React25__default.default.createElement(
|
|
1011
1062
|
reactNative.TouchableOpacity,
|
|
1012
1063
|
{
|
|
1013
|
-
style: [
|
|
1064
|
+
style: [styles14.row, style],
|
|
1014
1065
|
onPress: () => {
|
|
1015
1066
|
selectionAsync();
|
|
1016
1067
|
onCheckedChange?.(!checked);
|
|
@@ -1022,30 +1073,31 @@ function Checkbox({
|
|
|
1022
1073
|
touchSoundDisabled: true
|
|
1023
1074
|
},
|
|
1024
1075
|
/* @__PURE__ */ React25__default.default.createElement(
|
|
1025
|
-
reactNative.View,
|
|
1076
|
+
reactNative.Animated.View,
|
|
1026
1077
|
{
|
|
1027
1078
|
style: [
|
|
1028
|
-
|
|
1079
|
+
styles14.box,
|
|
1029
1080
|
{
|
|
1030
1081
|
borderColor: checked ? colors.primary : colors.border,
|
|
1031
1082
|
backgroundColor: checked ? colors.primary : "transparent",
|
|
1032
|
-
opacity: disabled ? 0.45 : 1
|
|
1083
|
+
opacity: disabled ? 0.45 : 1,
|
|
1084
|
+
transform: [{ scale: scale2 }]
|
|
1033
1085
|
}
|
|
1034
1086
|
]
|
|
1035
1087
|
},
|
|
1036
|
-
checked ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
1088
|
+
checked ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles14.checkmark, { borderColor: colors.primaryForeground }] }) : null
|
|
1037
1089
|
),
|
|
1038
1090
|
label ? /* @__PURE__ */ React25__default.default.createElement(
|
|
1039
1091
|
reactNative.Text,
|
|
1040
1092
|
{
|
|
1041
|
-
style: [
|
|
1093
|
+
style: [styles14.label, { color: disabled ? colors.mutedForeground : colors.foreground }],
|
|
1042
1094
|
allowFontScaling: true
|
|
1043
1095
|
},
|
|
1044
1096
|
label
|
|
1045
1097
|
) : null
|
|
1046
|
-
)
|
|
1098
|
+
);
|
|
1047
1099
|
}
|
|
1048
|
-
var
|
|
1100
|
+
var styles14 = reactNative.StyleSheet.create({
|
|
1049
1101
|
row: {
|
|
1050
1102
|
flexDirection: "row",
|
|
1051
1103
|
alignItems: "center",
|
|
@@ -1054,7 +1106,7 @@ var styles13 = reactNative.StyleSheet.create({
|
|
|
1054
1106
|
box: {
|
|
1055
1107
|
width: s(24),
|
|
1056
1108
|
height: s(24),
|
|
1057
|
-
borderRadius: ms(
|
|
1109
|
+
borderRadius: ms(4),
|
|
1058
1110
|
borderWidth: 1.5,
|
|
1059
1111
|
alignItems: "center",
|
|
1060
1112
|
justifyContent: "center"
|
|
@@ -1067,15 +1119,16 @@ var styles13 = reactNative.StyleSheet.create({
|
|
|
1067
1119
|
transform: [{ rotate: "-45deg" }, { translateY: -1 }]
|
|
1068
1120
|
},
|
|
1069
1121
|
label: {
|
|
1070
|
-
|
|
1071
|
-
|
|
1122
|
+
fontFamily: "Poppins-Regular",
|
|
1123
|
+
fontSize: ms(14),
|
|
1124
|
+
lineHeight: mvs(20)
|
|
1072
1125
|
}
|
|
1073
1126
|
});
|
|
1074
1127
|
var nativeDriver5 = reactNative.Platform.OS !== "web";
|
|
1075
|
-
var TRACK_WIDTH = s(
|
|
1076
|
-
var TRACK_HEIGHT =
|
|
1077
|
-
var THUMB_SIZE = s(
|
|
1078
|
-
var THUMB_OFFSET = s(
|
|
1128
|
+
var TRACK_WIDTH = s(52);
|
|
1129
|
+
var TRACK_HEIGHT = s(30);
|
|
1130
|
+
var THUMB_SIZE = s(24);
|
|
1131
|
+
var THUMB_OFFSET = s(3);
|
|
1079
1132
|
var THUMB_TRAVEL = TRACK_WIDTH - THUMB_SIZE - THUMB_OFFSET * 2;
|
|
1080
1133
|
function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
1081
1134
|
const { colors } = useTheme();
|
|
@@ -1109,20 +1162,20 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
1109
1162
|
disabled,
|
|
1110
1163
|
activeOpacity: 0.8,
|
|
1111
1164
|
touchSoundDisabled: true,
|
|
1112
|
-
style:
|
|
1165
|
+
style: styles15.wrapper
|
|
1113
1166
|
},
|
|
1114
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: [
|
|
1167
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: [styles15.track, { backgroundColor: trackColor }] }, /* @__PURE__ */ React25__default.default.createElement(
|
|
1115
1168
|
reactNative.Animated.View,
|
|
1116
1169
|
{
|
|
1117
1170
|
style: [
|
|
1118
|
-
|
|
1171
|
+
styles15.thumb,
|
|
1119
1172
|
{ backgroundColor: colors.primaryForeground, transform: [{ translateX }] }
|
|
1120
1173
|
]
|
|
1121
1174
|
}
|
|
1122
1175
|
))
|
|
1123
1176
|
));
|
|
1124
1177
|
}
|
|
1125
|
-
var
|
|
1178
|
+
var styles15 = reactNative.StyleSheet.create({
|
|
1126
1179
|
wrapper: {},
|
|
1127
1180
|
track: {
|
|
1128
1181
|
width: TRACK_WIDTH,
|
|
@@ -1145,6 +1198,7 @@ var styles14 = reactNative.StyleSheet.create({
|
|
|
1145
1198
|
elevation: 2
|
|
1146
1199
|
}
|
|
1147
1200
|
});
|
|
1201
|
+
var nativeDriver6 = reactNative.Platform.OS !== "web";
|
|
1148
1202
|
var sizeStyles = {
|
|
1149
1203
|
sm: { paddingHorizontal: s(12), paddingVertical: vs(8), minWidth: s(40), minHeight: vs(40) },
|
|
1150
1204
|
md: { paddingHorizontal: s(16), paddingVertical: vs(12), minWidth: s(44), minHeight: vs(44) },
|
|
@@ -1180,10 +1234,10 @@ function Toggle({
|
|
|
1180
1234
|
}, [pressed, pressAnim]);
|
|
1181
1235
|
const handlePressIn = () => {
|
|
1182
1236
|
if (disabled) return;
|
|
1183
|
-
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1237
|
+
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver6, speed: 40, bounciness: 0 }).start();
|
|
1184
1238
|
};
|
|
1185
1239
|
const handlePressOut = () => {
|
|
1186
|
-
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1240
|
+
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver6, speed: 40, bounciness: 4 }).start();
|
|
1187
1241
|
};
|
|
1188
1242
|
const borderColor = pressAnim.interpolate({
|
|
1189
1243
|
inputRange: [0, 1],
|
|
@@ -1215,7 +1269,7 @@ function Toggle({
|
|
|
1215
1269
|
if (custom) return /* @__PURE__ */ React25__default.default.createElement(React25__default.default.Fragment, null, custom);
|
|
1216
1270
|
return /* @__PURE__ */ React25__default.default.createElement(vectorIcons.FontAwesome5, { name: "circle", size: iconSize, color: colors.mutedForeground });
|
|
1217
1271
|
};
|
|
1218
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled &&
|
|
1272
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles16.disabled, style] }, /* @__PURE__ */ React25__default.default.createElement(
|
|
1219
1273
|
reactNative.TouchableOpacity,
|
|
1220
1274
|
{
|
|
1221
1275
|
onPress: () => {
|
|
@@ -1233,16 +1287,16 @@ function Toggle({
|
|
|
1233
1287
|
reactNative.Animated.View,
|
|
1234
1288
|
{
|
|
1235
1289
|
style: [
|
|
1236
|
-
|
|
1290
|
+
styles16.base,
|
|
1237
1291
|
sizeStyles[size],
|
|
1238
1292
|
{ borderColor, backgroundColor, borderWidth: 2 }
|
|
1239
1293
|
]
|
|
1240
1294
|
},
|
|
1241
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style:
|
|
1295
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles16.inner }, /* @__PURE__ */ React25__default.default.createElement(LeftIcon, null), label ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.Text, { style: [styles16.label, { color: textColor }], allowFontScaling: true }, label) : null)
|
|
1242
1296
|
)
|
|
1243
1297
|
));
|
|
1244
1298
|
}
|
|
1245
|
-
var
|
|
1299
|
+
var styles16 = reactNative.StyleSheet.create({
|
|
1246
1300
|
base: {
|
|
1247
1301
|
borderRadius: ms(8)
|
|
1248
1302
|
},
|
|
@@ -1256,11 +1310,11 @@ var styles15 = reactNative.StyleSheet.create({
|
|
|
1256
1310
|
opacity: 0.45
|
|
1257
1311
|
},
|
|
1258
1312
|
label: {
|
|
1259
|
-
|
|
1260
|
-
|
|
1313
|
+
fontFamily: "Poppins-Medium",
|
|
1314
|
+
fontSize: ms(14)
|
|
1261
1315
|
}
|
|
1262
1316
|
});
|
|
1263
|
-
var
|
|
1317
|
+
var nativeDriver7 = reactNative.Platform.OS !== "web";
|
|
1264
1318
|
function RadioItem({
|
|
1265
1319
|
option,
|
|
1266
1320
|
selected,
|
|
@@ -1270,15 +1324,15 @@ function RadioItem({
|
|
|
1270
1324
|
const scale2 = React25.useRef(new reactNative.Animated.Value(1)).current;
|
|
1271
1325
|
const handlePressIn = () => {
|
|
1272
1326
|
if (option.disabled) return;
|
|
1273
|
-
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1327
|
+
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver7, speed: 40, bounciness: 0 }).start();
|
|
1274
1328
|
};
|
|
1275
1329
|
const handlePressOut = () => {
|
|
1276
|
-
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1330
|
+
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver7, speed: 40, bounciness: 4 }).start();
|
|
1277
1331
|
};
|
|
1278
|
-
return /* @__PURE__ */ React25__default.default.createElement(
|
|
1332
|
+
return /* @__PURE__ */ React25__default.default.createElement(
|
|
1279
1333
|
reactNative.TouchableOpacity,
|
|
1280
1334
|
{
|
|
1281
|
-
style:
|
|
1335
|
+
style: styles17.row,
|
|
1282
1336
|
onPress: () => {
|
|
1283
1337
|
if (!option.disabled) {
|
|
1284
1338
|
selectionAsync();
|
|
@@ -1292,30 +1346,31 @@ function RadioItem({
|
|
|
1292
1346
|
disabled: option.disabled
|
|
1293
1347
|
},
|
|
1294
1348
|
/* @__PURE__ */ React25__default.default.createElement(
|
|
1295
|
-
reactNative.View,
|
|
1349
|
+
reactNative.Animated.View,
|
|
1296
1350
|
{
|
|
1297
1351
|
style: [
|
|
1298
|
-
|
|
1352
|
+
styles17.radio,
|
|
1299
1353
|
{
|
|
1300
1354
|
borderColor: selected ? colors.primary : colors.border,
|
|
1301
|
-
opacity: option.disabled ? 0.45 : 1
|
|
1355
|
+
opacity: option.disabled ? 0.45 : 1,
|
|
1356
|
+
transform: [{ scale: scale2 }]
|
|
1302
1357
|
}
|
|
1303
1358
|
]
|
|
1304
1359
|
},
|
|
1305
|
-
selected ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
1360
|
+
selected ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles17.dot, { backgroundColor: colors.primary }] }) : null
|
|
1306
1361
|
),
|
|
1307
1362
|
/* @__PURE__ */ React25__default.default.createElement(
|
|
1308
1363
|
reactNative.Text,
|
|
1309
1364
|
{
|
|
1310
1365
|
style: [
|
|
1311
|
-
|
|
1366
|
+
styles17.label,
|
|
1312
1367
|
{ color: option.disabled ? colors.mutedForeground : colors.foreground }
|
|
1313
1368
|
],
|
|
1314
1369
|
allowFontScaling: true
|
|
1315
1370
|
},
|
|
1316
1371
|
option.label
|
|
1317
1372
|
)
|
|
1318
|
-
)
|
|
1373
|
+
);
|
|
1319
1374
|
}
|
|
1320
1375
|
function RadioGroup({
|
|
1321
1376
|
options,
|
|
@@ -1324,7 +1379,7 @@ function RadioGroup({
|
|
|
1324
1379
|
orientation = "vertical",
|
|
1325
1380
|
style
|
|
1326
1381
|
}) {
|
|
1327
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
1382
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles17.container, orientation === "horizontal" && styles17.horizontal, style] }, options.map((option) => /* @__PURE__ */ React25__default.default.createElement(
|
|
1328
1383
|
RadioItem,
|
|
1329
1384
|
{
|
|
1330
1385
|
key: option.value,
|
|
@@ -1334,7 +1389,7 @@ function RadioGroup({
|
|
|
1334
1389
|
}
|
|
1335
1390
|
)));
|
|
1336
1391
|
}
|
|
1337
|
-
var
|
|
1392
|
+
var styles17 = reactNative.StyleSheet.create({
|
|
1338
1393
|
container: {
|
|
1339
1394
|
gap: vs(12)
|
|
1340
1395
|
},
|
|
@@ -1361,11 +1416,12 @@ var styles16 = reactNative.StyleSheet.create({
|
|
|
1361
1416
|
borderRadius: s(5)
|
|
1362
1417
|
},
|
|
1363
1418
|
label: {
|
|
1419
|
+
fontFamily: "Poppins-Regular",
|
|
1364
1420
|
fontSize: ms(14),
|
|
1365
1421
|
lineHeight: mvs(20)
|
|
1366
1422
|
}
|
|
1367
1423
|
});
|
|
1368
|
-
var
|
|
1424
|
+
var nativeDriver8 = reactNative.Platform.OS !== "web";
|
|
1369
1425
|
function TabTrigger({
|
|
1370
1426
|
tab,
|
|
1371
1427
|
isActive,
|
|
@@ -1375,15 +1431,15 @@ function TabTrigger({
|
|
|
1375
1431
|
const { colors } = useTheme();
|
|
1376
1432
|
const scale2 = React25.useRef(new reactNative.Animated.Value(1)).current;
|
|
1377
1433
|
const handlePressIn = () => {
|
|
1378
|
-
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1434
|
+
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver8, speed: 40, bounciness: 0 }).start();
|
|
1379
1435
|
};
|
|
1380
1436
|
const handlePressOut = () => {
|
|
1381
|
-
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1437
|
+
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver8, speed: 40, bounciness: 4 }).start();
|
|
1382
1438
|
};
|
|
1383
1439
|
return /* @__PURE__ */ React25__default.default.createElement(
|
|
1384
1440
|
reactNative.TouchableOpacity,
|
|
1385
1441
|
{
|
|
1386
|
-
style:
|
|
1442
|
+
style: styles18.trigger,
|
|
1387
1443
|
onPress,
|
|
1388
1444
|
onPressIn: handlePressIn,
|
|
1389
1445
|
onPressOut: handlePressOut,
|
|
@@ -1391,13 +1447,13 @@ function TabTrigger({
|
|
|
1391
1447
|
activeOpacity: 1,
|
|
1392
1448
|
touchSoundDisabled: true
|
|
1393
1449
|
},
|
|
1394
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style:
|
|
1450
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles18.triggerInner }, tab.icon ? typeof tab.icon === "function" ? tab.icon(isActive) : tab.icon : null, /* @__PURE__ */ React25__default.default.createElement(
|
|
1395
1451
|
reactNative.Text,
|
|
1396
1452
|
{
|
|
1397
1453
|
style: [
|
|
1398
|
-
|
|
1454
|
+
styles18.triggerLabel,
|
|
1399
1455
|
{ color: isActive ? colors.foreground : colors.mutedForeground },
|
|
1400
|
-
isActive &&
|
|
1456
|
+
isActive && styles18.activeTriggerLabel
|
|
1401
1457
|
],
|
|
1402
1458
|
allowFontScaling: true
|
|
1403
1459
|
},
|
|
@@ -1446,11 +1502,11 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1446
1502
|
if (!value) setInternal(v);
|
|
1447
1503
|
onValueChange?.(v);
|
|
1448
1504
|
};
|
|
1449
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
1505
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles18.list, { backgroundColor: colors.muted }] }, /* @__PURE__ */ React25__default.default.createElement(
|
|
1450
1506
|
reactNative.Animated.View,
|
|
1451
1507
|
{
|
|
1452
1508
|
style: [
|
|
1453
|
-
|
|
1509
|
+
styles18.pill,
|
|
1454
1510
|
{
|
|
1455
1511
|
backgroundColor: colors.background,
|
|
1456
1512
|
position: "absolute",
|
|
@@ -1489,7 +1545,7 @@ function TabsContent({ value, activeValue, children, style }) {
|
|
|
1489
1545
|
if (value !== activeValue) return null;
|
|
1490
1546
|
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style }, children);
|
|
1491
1547
|
}
|
|
1492
|
-
var
|
|
1548
|
+
var styles18 = reactNative.StyleSheet.create({
|
|
1493
1549
|
list: {
|
|
1494
1550
|
flexDirection: "row",
|
|
1495
1551
|
borderRadius: ms(12),
|
|
@@ -1499,9 +1555,9 @@ var styles17 = reactNative.StyleSheet.create({
|
|
|
1499
1555
|
pill: {},
|
|
1500
1556
|
trigger: {
|
|
1501
1557
|
flex: 1,
|
|
1502
|
-
paddingVertical: vs(
|
|
1503
|
-
paddingHorizontal: s(
|
|
1504
|
-
borderRadius: ms(
|
|
1558
|
+
paddingVertical: vs(7),
|
|
1559
|
+
paddingHorizontal: s(10),
|
|
1560
|
+
borderRadius: ms(6),
|
|
1505
1561
|
alignItems: "center",
|
|
1506
1562
|
justifyContent: "center",
|
|
1507
1563
|
zIndex: 1
|
|
@@ -1510,19 +1566,14 @@ var styles17 = reactNative.StyleSheet.create({
|
|
|
1510
1566
|
flexDirection: "row",
|
|
1511
1567
|
alignItems: "center",
|
|
1512
1568
|
justifyContent: "center",
|
|
1513
|
-
gap: s(
|
|
1514
|
-
},
|
|
1515
|
-
triggerIcon: {
|
|
1516
|
-
marginRight: s(6),
|
|
1517
|
-
alignItems: "center",
|
|
1518
|
-
justifyContent: "center"
|
|
1569
|
+
gap: s(4)
|
|
1519
1570
|
},
|
|
1520
1571
|
triggerLabel: {
|
|
1521
|
-
|
|
1522
|
-
|
|
1572
|
+
fontFamily: "Poppins-Regular",
|
|
1573
|
+
fontSize: ms(13)
|
|
1523
1574
|
},
|
|
1524
1575
|
activeTriggerLabel: {
|
|
1525
|
-
|
|
1576
|
+
fontFamily: "Poppins-Medium"
|
|
1526
1577
|
}
|
|
1527
1578
|
});
|
|
1528
1579
|
function AccordionItemComponent({
|
|
@@ -1555,21 +1606,21 @@ function AccordionItemComponent({
|
|
|
1555
1606
|
const rotationStyle = Animated11.useAnimatedStyle(() => ({
|
|
1556
1607
|
transform: [{ rotate: `${derivedRotation.value * 180}deg` }]
|
|
1557
1608
|
}));
|
|
1558
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
1609
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles19.item, { backgroundColor: colors.card, borderColor: colors.border }] }, /* @__PURE__ */ React25__default.default.createElement(
|
|
1559
1610
|
reactNative.Pressable,
|
|
1560
1611
|
{
|
|
1561
|
-
style: ({ pressed }) => [
|
|
1612
|
+
style: ({ pressed }) => [styles19.trigger, { opacity: pressed ? 0.6 : 1 }],
|
|
1562
1613
|
onPress: () => {
|
|
1563
1614
|
selectionAsync();
|
|
1564
1615
|
onToggle();
|
|
1565
1616
|
}
|
|
1566
1617
|
},
|
|
1567
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [
|
|
1568
|
-
/* @__PURE__ */ React25__default.default.createElement(Animated11__default.default.View, { style: [
|
|
1618
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles19.triggerText, { color: colors.foreground }], allowFontScaling: true }, item.trigger),
|
|
1619
|
+
/* @__PURE__ */ React25__default.default.createElement(Animated11__default.default.View, { style: [styles19.chevron, rotationStyle] }, /* @__PURE__ */ React25__default.default.createElement(vectorIcons.Entypo, { name: "chevron-down", size: 18, color: colors.mutedForeground }))
|
|
1569
1620
|
), /* @__PURE__ */ React25__default.default.createElement(Animated11__default.default.View, { style: bodyStyle }, /* @__PURE__ */ React25__default.default.createElement(
|
|
1570
1621
|
reactNative.View,
|
|
1571
1622
|
{
|
|
1572
|
-
style:
|
|
1623
|
+
style: styles19.content,
|
|
1573
1624
|
onLayout: (e) => {
|
|
1574
1625
|
height.value = e.nativeEvent.layout.height;
|
|
1575
1626
|
}
|
|
@@ -1591,7 +1642,7 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
1591
1642
|
);
|
|
1592
1643
|
}
|
|
1593
1644
|
};
|
|
1594
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style }, items.map((item) => /* @__PURE__ */ React25__default.default.createElement(
|
|
1645
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles19.list, style] }, items.map((item) => /* @__PURE__ */ React25__default.default.createElement(
|
|
1595
1646
|
AccordionItemComponent,
|
|
1596
1647
|
{
|
|
1597
1648
|
key: item.value,
|
|
@@ -1601,19 +1652,25 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
1601
1652
|
}
|
|
1602
1653
|
)));
|
|
1603
1654
|
}
|
|
1604
|
-
var
|
|
1655
|
+
var styles19 = reactNative.StyleSheet.create({
|
|
1656
|
+
list: {
|
|
1657
|
+
gap: s(6)
|
|
1658
|
+
},
|
|
1605
1659
|
item: {
|
|
1606
|
-
|
|
1660
|
+
borderWidth: 1,
|
|
1661
|
+
borderRadius: ms(10),
|
|
1662
|
+
overflow: "hidden"
|
|
1607
1663
|
},
|
|
1608
1664
|
trigger: {
|
|
1609
1665
|
flexDirection: "row",
|
|
1610
1666
|
justifyContent: "space-between",
|
|
1611
1667
|
alignItems: "center",
|
|
1612
|
-
|
|
1668
|
+
paddingHorizontal: s(14),
|
|
1669
|
+
paddingVertical: vs(12)
|
|
1613
1670
|
},
|
|
1614
1671
|
triggerText: {
|
|
1615
|
-
|
|
1616
|
-
|
|
1672
|
+
fontFamily: "Poppins-Medium",
|
|
1673
|
+
fontSize: ms(14),
|
|
1617
1674
|
flex: 1
|
|
1618
1675
|
},
|
|
1619
1676
|
chevron: {
|
|
@@ -1622,7 +1679,8 @@ var styles18 = reactNative.StyleSheet.create({
|
|
|
1622
1679
|
// position:'absolute' is the key — the inner View escapes the animated wrapper's
|
|
1623
1680
|
// clipped height so onLayout always reports the true content height.
|
|
1624
1681
|
content: {
|
|
1625
|
-
|
|
1682
|
+
paddingHorizontal: s(14),
|
|
1683
|
+
paddingBottom: vs(12),
|
|
1626
1684
|
position: "absolute",
|
|
1627
1685
|
width: "100%"
|
|
1628
1686
|
}
|
|
@@ -1650,7 +1708,7 @@ function Slider({
|
|
|
1650
1708
|
}
|
|
1651
1709
|
onValueChange?.(v);
|
|
1652
1710
|
};
|
|
1653
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
1711
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles20.wrapper, style], accessibilityLabel }, label || showValue ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles20.header }, label ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles20.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, showValue ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles20.valueText, { color: colors.mutedForeground }], allowFontScaling: true }, formatValue2(value)) : null) : null, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: disabled ? styles20.disabled : void 0 }, /* @__PURE__ */ React25__default.default.createElement(
|
|
1654
1712
|
RNSlider__default.default,
|
|
1655
1713
|
{
|
|
1656
1714
|
value,
|
|
@@ -1663,12 +1721,12 @@ function Slider({
|
|
|
1663
1721
|
minimumTrackTintColor: colors.primary,
|
|
1664
1722
|
maximumTrackTintColor: colors.muted,
|
|
1665
1723
|
thumbTintColor: colors.primary,
|
|
1666
|
-
style:
|
|
1724
|
+
style: styles20.slider,
|
|
1667
1725
|
accessibilityLabel
|
|
1668
1726
|
}
|
|
1669
1727
|
)));
|
|
1670
1728
|
}
|
|
1671
|
-
var
|
|
1729
|
+
var styles20 = reactNative.StyleSheet.create({
|
|
1672
1730
|
wrapper: {
|
|
1673
1731
|
gap: vs(8)
|
|
1674
1732
|
},
|
|
@@ -1678,16 +1736,16 @@ var styles19 = reactNative.StyleSheet.create({
|
|
|
1678
1736
|
alignItems: "center"
|
|
1679
1737
|
},
|
|
1680
1738
|
label: {
|
|
1681
|
-
|
|
1682
|
-
|
|
1739
|
+
fontFamily: "Poppins-Medium",
|
|
1740
|
+
fontSize: ms(15)
|
|
1683
1741
|
},
|
|
1684
1742
|
valueText: {
|
|
1685
|
-
|
|
1686
|
-
|
|
1743
|
+
fontFamily: "Poppins-Medium",
|
|
1744
|
+
fontSize: ms(14)
|
|
1687
1745
|
},
|
|
1688
1746
|
slider: {
|
|
1689
1747
|
width: "100%",
|
|
1690
|
-
height: vs(
|
|
1748
|
+
height: vs(60)
|
|
1691
1749
|
},
|
|
1692
1750
|
disabled: {
|
|
1693
1751
|
opacity: 0.45
|
|
@@ -1728,14 +1786,14 @@ function Sheet({
|
|
|
1728
1786
|
snapPoints,
|
|
1729
1787
|
onDismiss: onClose,
|
|
1730
1788
|
backdropComponent: renderBackdrop,
|
|
1731
|
-
backgroundStyle: [
|
|
1732
|
-
handleIndicatorStyle: [
|
|
1789
|
+
backgroundStyle: [styles21.background, { backgroundColor: colors.card }],
|
|
1790
|
+
handleIndicatorStyle: [styles21.handle, { backgroundColor: colors.border }],
|
|
1733
1791
|
enablePanDownToClose: true
|
|
1734
1792
|
},
|
|
1735
|
-
/* @__PURE__ */ React25__default.default.createElement(bottomSheet.BottomSheetView, { style: [
|
|
1793
|
+
/* @__PURE__ */ React25__default.default.createElement(bottomSheet.BottomSheetView, { style: [styles21.content, style] }, title || description ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles21.header }, title ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles21.title, { color: colors.cardForeground }], allowFontScaling: true }, title) : null, description ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles21.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null) : null, children)
|
|
1736
1794
|
);
|
|
1737
1795
|
}
|
|
1738
|
-
var
|
|
1796
|
+
var styles21 = reactNative.StyleSheet.create({
|
|
1739
1797
|
background: {
|
|
1740
1798
|
borderTopLeftRadius: ms(16),
|
|
1741
1799
|
borderTopRightRadius: ms(16)
|
|
@@ -1754,10 +1812,11 @@ var styles20 = reactNative.StyleSheet.create({
|
|
|
1754
1812
|
marginBottom: vs(16)
|
|
1755
1813
|
},
|
|
1756
1814
|
title: {
|
|
1757
|
-
|
|
1758
|
-
|
|
1815
|
+
fontFamily: "Poppins-SemiBold",
|
|
1816
|
+
fontSize: ms(18)
|
|
1759
1817
|
},
|
|
1760
1818
|
description: {
|
|
1819
|
+
fontFamily: "Poppins-Regular",
|
|
1761
1820
|
fontSize: ms(14),
|
|
1762
1821
|
lineHeight: mvs(20)
|
|
1763
1822
|
}
|
|
@@ -1765,6 +1824,7 @@ var styles20 = reactNative.StyleSheet.create({
|
|
|
1765
1824
|
var isIOS = reactNative.Platform.OS === "ios";
|
|
1766
1825
|
var isAndroid = reactNative.Platform.OS === "android";
|
|
1767
1826
|
var isWeb2 = reactNative.Platform.OS === "web";
|
|
1827
|
+
var nativeDriver9 = reactNative.Platform.OS !== "web";
|
|
1768
1828
|
function Select({
|
|
1769
1829
|
options,
|
|
1770
1830
|
value,
|
|
@@ -1783,10 +1843,10 @@ function Select({
|
|
|
1783
1843
|
const selected = options.find((o) => o.value === value);
|
|
1784
1844
|
const handlePressIn = () => {
|
|
1785
1845
|
if (disabled) return;
|
|
1786
|
-
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1846
|
+
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver9, speed: 40, bounciness: 0 }).start();
|
|
1787
1847
|
};
|
|
1788
1848
|
const handlePressOut = () => {
|
|
1789
|
-
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1849
|
+
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver9, speed: 40, bounciness: 4 }).start();
|
|
1790
1850
|
};
|
|
1791
1851
|
const handleOpen = () => {
|
|
1792
1852
|
if (disabled) return;
|
|
@@ -1808,11 +1868,11 @@ function Select({
|
|
|
1808
1868
|
}
|
|
1809
1869
|
setPickerVisible(false);
|
|
1810
1870
|
};
|
|
1811
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
1871
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles22.container, style] }, label ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles22.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, !isWeb2 ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale: scale2 }], opacity: disabled ? 0.45 : 1 } }, /* @__PURE__ */ React25__default.default.createElement(
|
|
1812
1872
|
reactNative.TouchableOpacity,
|
|
1813
1873
|
{
|
|
1814
1874
|
style: [
|
|
1815
|
-
|
|
1875
|
+
styles22.trigger,
|
|
1816
1876
|
{
|
|
1817
1877
|
borderColor: error ? colors.destructive : colors.border,
|
|
1818
1878
|
backgroundColor: colors.background
|
|
@@ -1828,7 +1888,7 @@ function Select({
|
|
|
1828
1888
|
reactNative.Text,
|
|
1829
1889
|
{
|
|
1830
1890
|
style: [
|
|
1831
|
-
|
|
1891
|
+
styles22.triggerText,
|
|
1832
1892
|
{ color: selected ? colors.foreground : colors.mutedForeground }
|
|
1833
1893
|
],
|
|
1834
1894
|
numberOfLines: 1,
|
|
@@ -1845,8 +1905,8 @@ function Select({
|
|
|
1845
1905
|
animationType: "slide",
|
|
1846
1906
|
onRequestClose: handleDismiss
|
|
1847
1907
|
},
|
|
1848
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.TouchableOpacity, { style:
|
|
1849
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
1908
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.TouchableOpacity, { style: styles22.iosBackdrop, activeOpacity: 1, onPress: handleDismiss }),
|
|
1909
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles22.iosSheet, { backgroundColor: colors.card }] }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles22.iosToolbar, { borderBottomColor: colors.border }] }, label ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles22.iosToolbarTitle, { color: colors.foreground }], allowFontScaling: true }, label) : /* @__PURE__ */ React25__default.default.createElement(reactNative.View, null), /* @__PURE__ */ React25__default.default.createElement(reactNative.TouchableOpacity, { onPress: handleConfirm, style: styles22.iosDoneBtn, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 } }, /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles22.iosDoneBtnText, { color: colors.primary }], allowFontScaling: true }, "Done"))), /* @__PURE__ */ React25__default.default.createElement(
|
|
1850
1910
|
picker.Picker,
|
|
1851
1911
|
{
|
|
1852
1912
|
selectedValue: pendingValue ?? "",
|
|
@@ -1879,7 +1939,7 @@ function Select({
|
|
|
1879
1939
|
mode: "dialog",
|
|
1880
1940
|
enabled: !disabled,
|
|
1881
1941
|
prompt: label,
|
|
1882
|
-
style:
|
|
1942
|
+
style: styles22.androidHiddenPicker
|
|
1883
1943
|
},
|
|
1884
1944
|
!value ? /* @__PURE__ */ React25__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", enabled: false }) : null,
|
|
1885
1945
|
options.map((o) => /* @__PURE__ */ React25__default.default.createElement(
|
|
@@ -1902,7 +1962,7 @@ function Select({
|
|
|
1902
1962
|
},
|
|
1903
1963
|
enabled: !disabled,
|
|
1904
1964
|
style: [
|
|
1905
|
-
|
|
1965
|
+
styles22.webPicker,
|
|
1906
1966
|
{
|
|
1907
1967
|
borderColor: error ? colors.destructive : colors.border,
|
|
1908
1968
|
color: selected ? colors.foreground : colors.mutedForeground,
|
|
@@ -1921,38 +1981,35 @@ function Select({
|
|
|
1921
1981
|
enabled: !o.disabled
|
|
1922
1982
|
}
|
|
1923
1983
|
))
|
|
1924
|
-
) : null, error ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [
|
|
1984
|
+
) : null, error ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles22.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null);
|
|
1925
1985
|
}
|
|
1926
|
-
var
|
|
1986
|
+
var styles22 = reactNative.StyleSheet.create({
|
|
1927
1987
|
container: {
|
|
1928
1988
|
gap: vs(8)
|
|
1929
1989
|
},
|
|
1930
1990
|
label: {
|
|
1931
|
-
|
|
1932
|
-
|
|
1991
|
+
fontFamily: "Poppins-Medium",
|
|
1992
|
+
fontSize: ms(13)
|
|
1933
1993
|
},
|
|
1934
1994
|
trigger: {
|
|
1935
1995
|
flexDirection: "row",
|
|
1936
1996
|
alignItems: "center",
|
|
1937
1997
|
justifyContent: "space-between",
|
|
1938
|
-
borderWidth: 1
|
|
1998
|
+
borderWidth: 1,
|
|
1939
1999
|
borderRadius: ms(8),
|
|
1940
|
-
paddingHorizontal: s(
|
|
1941
|
-
paddingVertical: vs(
|
|
1942
|
-
shadowColor: "#000",
|
|
1943
|
-
shadowOffset: { width: 0, height: 1 },
|
|
1944
|
-
shadowOpacity: 0.04,
|
|
1945
|
-
shadowRadius: 2,
|
|
1946
|
-
elevation: 1
|
|
2000
|
+
paddingHorizontal: s(14),
|
|
2001
|
+
paddingVertical: vs(11)
|
|
1947
2002
|
},
|
|
1948
2003
|
triggerText: {
|
|
1949
|
-
|
|
2004
|
+
fontFamily: "Poppins-Regular",
|
|
2005
|
+
fontSize: ms(15),
|
|
1950
2006
|
flex: 1
|
|
1951
2007
|
},
|
|
1952
2008
|
chevron: {
|
|
1953
2009
|
marginLeft: s(8)
|
|
1954
2010
|
},
|
|
1955
2011
|
helperText: {
|
|
2012
|
+
fontFamily: "Poppins-Regular",
|
|
1956
2013
|
fontSize: ms(13)
|
|
1957
2014
|
},
|
|
1958
2015
|
iosBackdrop: {
|
|
@@ -1973,15 +2030,15 @@ var styles21 = reactNative.StyleSheet.create({
|
|
|
1973
2030
|
borderBottomWidth: 1
|
|
1974
2031
|
},
|
|
1975
2032
|
iosToolbarTitle: {
|
|
1976
|
-
|
|
1977
|
-
|
|
2033
|
+
fontFamily: "Poppins-SemiBold",
|
|
2034
|
+
fontSize: ms(17)
|
|
1978
2035
|
},
|
|
1979
2036
|
iosDoneBtn: {
|
|
1980
2037
|
padding: s(4)
|
|
1981
2038
|
},
|
|
1982
2039
|
iosDoneBtnText: {
|
|
1983
|
-
|
|
1984
|
-
|
|
2040
|
+
fontFamily: "Poppins-SemiBold",
|
|
2041
|
+
fontSize: ms(17)
|
|
1985
2042
|
},
|
|
1986
2043
|
androidHiddenPicker: {
|
|
1987
2044
|
height: 0,
|
|
@@ -1989,11 +2046,11 @@ var styles21 = reactNative.StyleSheet.create({
|
|
|
1989
2046
|
position: "absolute"
|
|
1990
2047
|
},
|
|
1991
2048
|
webPicker: {
|
|
1992
|
-
borderWidth: 1
|
|
2049
|
+
borderWidth: 1,
|
|
1993
2050
|
borderRadius: ms(8),
|
|
1994
|
-
paddingHorizontal: s(
|
|
1995
|
-
paddingVertical: vs(
|
|
1996
|
-
fontSize: ms(
|
|
2051
|
+
paddingHorizontal: s(14),
|
|
2052
|
+
paddingVertical: vs(11),
|
|
2053
|
+
fontSize: ms(15)
|
|
1997
2054
|
}
|
|
1998
2055
|
});
|
|
1999
2056
|
var ToastContext = React25.createContext({
|
|
@@ -2041,19 +2098,21 @@ function ToastNotification({ item, onDismiss }) {
|
|
|
2041
2098
|
opacity: opacity.value,
|
|
2042
2099
|
transform: [{ translateY: translateY.value }, { translateX: translateX.value }]
|
|
2043
2100
|
}));
|
|
2101
|
+
const variant = item.variant ?? "default";
|
|
2044
2102
|
const bgColor = {
|
|
2045
2103
|
default: colors.foreground,
|
|
2046
|
-
destructive: colors.
|
|
2047
|
-
success: colors.
|
|
2048
|
-
}[
|
|
2104
|
+
destructive: colors.destructiveBorder,
|
|
2105
|
+
success: colors.successBorder
|
|
2106
|
+
}[variant];
|
|
2049
2107
|
const textColor = {
|
|
2050
2108
|
default: colors.background,
|
|
2051
|
-
destructive:
|
|
2052
|
-
success:
|
|
2053
|
-
}[
|
|
2054
|
-
const
|
|
2109
|
+
destructive: "#991b1b",
|
|
2110
|
+
success: "#166534"
|
|
2111
|
+
}[variant];
|
|
2112
|
+
const borderColor = textColor;
|
|
2113
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React25__default.default.createElement(vectorIcons.FontAwesome5, { name: "check-circle", size: 18, color: textColor }) : variant === "destructive" ? /* @__PURE__ */ React25__default.default.createElement(vectorIcons.AntDesign, { name: "exclamation-circle", size: 18, color: textColor }) : /* @__PURE__ */ React25__default.default.createElement(vectorIcons.Entypo, { name: "info-with-circle", size: 18, color: textColor });
|
|
2055
2114
|
const leftIcon = item.iconName ? renderIcon(item.iconName, 22, item.iconColor ?? textColor) : item.icon ?? defaultIcon;
|
|
2056
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: panGesture }, /* @__PURE__ */ React25__default.default.createElement(Animated11__default.default.View, { style: [
|
|
2115
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: panGesture }, /* @__PURE__ */ React25__default.default.createElement(Animated11__default.default.View, { style: [styles23.toast, { backgroundColor: bgColor, borderColor }, animatedStyle] }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles23.leftIconContainer }, leftIcon), /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles23.toastContent }, item.title ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles23.toastTitle, { color: textColor }], allowFontScaling: true }, item.title) : null, item.description ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles23.toastDescription, { color: textColor, opacity: 0.85 }], allowFontScaling: true }, item.description) : null), /* @__PURE__ */ React25__default.default.createElement(reactNative.TouchableOpacity, { onPress: onDismiss, style: styles23.dismissButton, touchSoundDisabled: true }, /* @__PURE__ */ React25__default.default.createElement(vectorIcons.AntDesign, { name: "close-circle", size: 18, color: textColor }))));
|
|
2057
2116
|
}
|
|
2058
2117
|
function ToastProvider({ children }) {
|
|
2059
2118
|
const [toasts, setToasts] = React25.useState([]);
|
|
@@ -2072,9 +2131,9 @@ function ToastProvider({ children }) {
|
|
|
2072
2131
|
const dismiss = React25.useCallback((id) => {
|
|
2073
2132
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
2074
2133
|
}, []);
|
|
2075
|
-
return /* @__PURE__ */ React25__default.default.createElement(ToastContext.Provider, { value: { toast, dismiss } }, children, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
2134
|
+
return /* @__PURE__ */ React25__default.default.createElement(ToastContext.Provider, { value: { toast, dismiss } }, children, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles23.container, reactNative.Platform.OS === "web" && styles23.containerWeb, { top: insets.top + 8 }], pointerEvents: "box-none" }, toasts.map((item) => /* @__PURE__ */ React25__default.default.createElement(ToastNotification, { key: item.id, item, onDismiss: () => dismiss(item.id) }))));
|
|
2076
2135
|
}
|
|
2077
|
-
var
|
|
2136
|
+
var styles23 = reactNative.StyleSheet.create({
|
|
2078
2137
|
container: {
|
|
2079
2138
|
position: "absolute",
|
|
2080
2139
|
left: s(16),
|
|
@@ -2091,30 +2150,32 @@ var styles22 = reactNative.StyleSheet.create({
|
|
|
2091
2150
|
toast: {
|
|
2092
2151
|
flexDirection: "row",
|
|
2093
2152
|
alignItems: "center",
|
|
2094
|
-
borderRadius: ms(
|
|
2095
|
-
|
|
2096
|
-
|
|
2153
|
+
borderRadius: ms(12),
|
|
2154
|
+
borderWidth: 1,
|
|
2155
|
+
paddingHorizontal: s(14),
|
|
2156
|
+
paddingVertical: vs(12),
|
|
2097
2157
|
shadowColor: "#000",
|
|
2098
|
-
shadowOffset: { width: 0, height:
|
|
2099
|
-
shadowOpacity: 0.
|
|
2158
|
+
shadowOffset: { width: 0, height: 3 },
|
|
2159
|
+
shadowOpacity: 0.1,
|
|
2100
2160
|
shadowRadius: 8,
|
|
2101
|
-
elevation:
|
|
2161
|
+
elevation: 5
|
|
2102
2162
|
},
|
|
2103
2163
|
toastContent: {
|
|
2104
2164
|
flex: 1,
|
|
2105
2165
|
gap: vs(4)
|
|
2106
2166
|
},
|
|
2107
2167
|
leftIconContainer: {
|
|
2108
|
-
width: s(
|
|
2168
|
+
width: s(28),
|
|
2109
2169
|
alignItems: "center",
|
|
2110
2170
|
justifyContent: "center",
|
|
2111
|
-
marginRight: s(
|
|
2171
|
+
marginRight: s(10)
|
|
2112
2172
|
},
|
|
2113
2173
|
toastTitle: {
|
|
2114
|
-
|
|
2115
|
-
|
|
2174
|
+
fontFamily: "Poppins-SemiBold",
|
|
2175
|
+
fontSize: ms(15)
|
|
2116
2176
|
},
|
|
2117
2177
|
toastDescription: {
|
|
2178
|
+
fontFamily: "Poppins-Regular",
|
|
2118
2179
|
fontSize: ms(14)
|
|
2119
2180
|
},
|
|
2120
2181
|
dismissButton: {
|
|
@@ -2142,28 +2203,33 @@ function CurrencyInput({
|
|
|
2142
2203
|
containerStyle,
|
|
2143
2204
|
style
|
|
2144
2205
|
}) {
|
|
2206
|
+
const { colors } = useTheme();
|
|
2145
2207
|
const handleChange = (text) => {
|
|
2146
2208
|
const withoutPrefix = prefix && text.startsWith(prefix) ? text.slice(prefix.length) : text;
|
|
2147
2209
|
const formatted = formatCurrency(withoutPrefix, thousandsSeparator);
|
|
2148
|
-
const display = formatted
|
|
2210
|
+
const display = formatted;
|
|
2149
2211
|
onChangeText?.(display);
|
|
2150
2212
|
const separatorRegex = new RegExp(`\\${thousandsSeparator}`, "g");
|
|
2151
2213
|
const raw = parseFloat(formatted.replace(separatorRegex, "") || "0");
|
|
2152
2214
|
onChangeValue?.(isNaN(raw) ? 0 : raw);
|
|
2153
2215
|
};
|
|
2154
|
-
const inputStyle = size === "large" ? { fontSize: ms(36) } : {};
|
|
2216
|
+
const inputStyle = size === "large" ? { fontFamily: "Poppins-Regular", fontSize: ms(36) } : { fontFamily: "Poppins-Regular" };
|
|
2217
|
+
const dollarIcon = renderIcon("dollar-sign", size === "large" ? 24 : 16, colors.mutedForeground);
|
|
2218
|
+
const displayValue = value && prefix && value.startsWith(prefix) ? value.slice(prefix.length) : value;
|
|
2155
2219
|
return /* @__PURE__ */ React25__default.default.createElement(
|
|
2156
2220
|
Input,
|
|
2157
2221
|
{
|
|
2158
|
-
value,
|
|
2222
|
+
value: displayValue,
|
|
2159
2223
|
onChangeText: handleChange,
|
|
2160
2224
|
keyboardType: "numeric",
|
|
2161
2225
|
label,
|
|
2162
2226
|
error,
|
|
2163
2227
|
hint,
|
|
2164
|
-
placeholder: placeholder ??
|
|
2228
|
+
placeholder: placeholder ?? "0",
|
|
2165
2229
|
editable,
|
|
2230
|
+
prefix: dollarIcon,
|
|
2166
2231
|
containerStyle,
|
|
2232
|
+
inputWrapperStyle: size === "large" ? { paddingVertical: 10 } : void 0,
|
|
2167
2233
|
style: [inputStyle, style]
|
|
2168
2234
|
}
|
|
2169
2235
|
);
|
|
@@ -2183,16 +2249,16 @@ function formatValue(value, prefix, showDecimals) {
|
|
|
2183
2249
|
function CurrencyDisplay({ value, prefix = "$", showDecimals = false, textColor, style }) {
|
|
2184
2250
|
const { colors } = useTheme();
|
|
2185
2251
|
const formatted = formatValue(value, prefix, showDecimals);
|
|
2186
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
2252
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles24.container, style] }, /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles24.amount, { color: textColor ?? colors.foreground }], allowFontScaling: true }, formatted));
|
|
2187
2253
|
}
|
|
2188
|
-
var
|
|
2254
|
+
var styles24 = reactNative.StyleSheet.create({
|
|
2189
2255
|
container: {},
|
|
2190
2256
|
amount: {
|
|
2191
|
-
|
|
2192
|
-
|
|
2257
|
+
fontFamily: "Poppins-Bold",
|
|
2258
|
+
fontSize: ms(56)
|
|
2193
2259
|
}
|
|
2194
2260
|
});
|
|
2195
|
-
var
|
|
2261
|
+
var nativeDriver10 = reactNative.Platform.OS !== "web";
|
|
2196
2262
|
function ListItem({
|
|
2197
2263
|
leftRender,
|
|
2198
2264
|
rightRender,
|
|
@@ -2221,7 +2287,7 @@ function ListItem({
|
|
|
2221
2287
|
if (!onPress || disabled) return;
|
|
2222
2288
|
reactNative.Animated.spring(scale2, {
|
|
2223
2289
|
toValue: 0.97,
|
|
2224
|
-
useNativeDriver:
|
|
2290
|
+
useNativeDriver: nativeDriver10,
|
|
2225
2291
|
speed: 40,
|
|
2226
2292
|
bounciness: 0
|
|
2227
2293
|
}).start();
|
|
@@ -2229,7 +2295,7 @@ function ListItem({
|
|
|
2229
2295
|
const handlePressOut = () => {
|
|
2230
2296
|
reactNative.Animated.spring(scale2, {
|
|
2231
2297
|
toValue: 1,
|
|
2232
|
-
useNativeDriver:
|
|
2298
|
+
useNativeDriver: nativeDriver10,
|
|
2233
2299
|
speed: 40,
|
|
2234
2300
|
bounciness: 4
|
|
2235
2301
|
}).start();
|
|
@@ -2251,10 +2317,10 @@ function ListItem({
|
|
|
2251
2317
|
shadowRadius: 6,
|
|
2252
2318
|
elevation: 2
|
|
2253
2319
|
} : {};
|
|
2254
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled &&
|
|
2320
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles25.disabled] }, /* @__PURE__ */ React25__default.default.createElement(
|
|
2255
2321
|
reactNative.TouchableOpacity,
|
|
2256
2322
|
{
|
|
2257
|
-
style: [
|
|
2323
|
+
style: [styles25.container, cardStyle, style],
|
|
2258
2324
|
onPress: onPress ? handlePress : void 0,
|
|
2259
2325
|
onPressIn: handlePressIn,
|
|
2260
2326
|
onPressOut: handlePressOut,
|
|
@@ -2262,11 +2328,11 @@ function ListItem({
|
|
|
2262
2328
|
activeOpacity: 1,
|
|
2263
2329
|
touchSoundDisabled: true
|
|
2264
2330
|
},
|
|
2265
|
-
effectiveLeft ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style:
|
|
2266
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style:
|
|
2331
|
+
effectiveLeft ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles25.leftContainer }, effectiveLeft) : null,
|
|
2332
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles25.content }, /* @__PURE__ */ React25__default.default.createElement(
|
|
2267
2333
|
reactNative.Text,
|
|
2268
2334
|
{
|
|
2269
|
-
style: [
|
|
2335
|
+
style: [styles25.title, { color: colors.foreground }, titleStyle],
|
|
2270
2336
|
numberOfLines: 2,
|
|
2271
2337
|
allowFontScaling: true
|
|
2272
2338
|
},
|
|
@@ -2274,7 +2340,7 @@ function ListItem({
|
|
|
2274
2340
|
), subtitle ? /* @__PURE__ */ React25__default.default.createElement(
|
|
2275
2341
|
reactNative.Text,
|
|
2276
2342
|
{
|
|
2277
|
-
style: [
|
|
2343
|
+
style: [styles25.subtitle, { color: colors.mutedForeground }, subtitleStyle],
|
|
2278
2344
|
numberOfLines: 2,
|
|
2279
2345
|
allowFontScaling: true
|
|
2280
2346
|
},
|
|
@@ -2282,16 +2348,16 @@ function ListItem({
|
|
|
2282
2348
|
) : null, caption ? /* @__PURE__ */ React25__default.default.createElement(
|
|
2283
2349
|
reactNative.Text,
|
|
2284
2350
|
{
|
|
2285
|
-
style: [
|
|
2351
|
+
style: [styles25.caption, { color: colors.mutedForeground }, captionStyle],
|
|
2286
2352
|
numberOfLines: 1,
|
|
2287
2353
|
allowFontScaling: true
|
|
2288
2354
|
},
|
|
2289
2355
|
caption
|
|
2290
2356
|
) : null),
|
|
2291
|
-
effectiveRight !== void 0 ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style:
|
|
2357
|
+
effectiveRight !== void 0 ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles25.rightContainer }, typeof effectiveRight === "string" ? /* @__PURE__ */ React25__default.default.createElement(
|
|
2292
2358
|
reactNative.Text,
|
|
2293
2359
|
{
|
|
2294
|
-
style: [
|
|
2360
|
+
style: [styles25.rightText, { color: colors.mutedForeground }],
|
|
2295
2361
|
allowFontScaling: true
|
|
2296
2362
|
},
|
|
2297
2363
|
effectiveRight
|
|
@@ -2300,18 +2366,18 @@ function ListItem({
|
|
|
2300
2366
|
reactNative.View,
|
|
2301
2367
|
{
|
|
2302
2368
|
style: [
|
|
2303
|
-
|
|
2369
|
+
styles25.separator,
|
|
2304
2370
|
{ backgroundColor: colors.border, marginLeft: effectiveLeft ? s(16) + s(44) + s(12) : s(16) }
|
|
2305
2371
|
]
|
|
2306
2372
|
}
|
|
2307
2373
|
) : null);
|
|
2308
2374
|
}
|
|
2309
|
-
var
|
|
2375
|
+
var styles25 = reactNative.StyleSheet.create({
|
|
2310
2376
|
container: {
|
|
2311
2377
|
flexDirection: "row",
|
|
2312
2378
|
alignItems: "center",
|
|
2313
2379
|
paddingHorizontal: s(16),
|
|
2314
|
-
paddingVertical: vs(
|
|
2380
|
+
paddingVertical: vs(10),
|
|
2315
2381
|
gap: s(12)
|
|
2316
2382
|
},
|
|
2317
2383
|
leftContainer: {
|
|
@@ -2326,18 +2392,18 @@ var styles24 = reactNative.StyleSheet.create({
|
|
|
2326
2392
|
gap: vs(4)
|
|
2327
2393
|
},
|
|
2328
2394
|
title: {
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
lineHeight: mvs(
|
|
2395
|
+
fontFamily: "Poppins-Medium",
|
|
2396
|
+
fontSize: ms(15),
|
|
2397
|
+
lineHeight: mvs(22)
|
|
2332
2398
|
},
|
|
2333
2399
|
subtitle: {
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
lineHeight: mvs(
|
|
2400
|
+
fontFamily: "Poppins-Regular",
|
|
2401
|
+
fontSize: ms(13),
|
|
2402
|
+
lineHeight: mvs(18)
|
|
2337
2403
|
},
|
|
2338
2404
|
caption: {
|
|
2405
|
+
fontFamily: "Poppins-Regular",
|
|
2339
2406
|
fontSize: ms(12),
|
|
2340
|
-
fontWeight: "400",
|
|
2341
2407
|
lineHeight: mvs(16),
|
|
2342
2408
|
opacity: 0.7
|
|
2343
2409
|
},
|
|
@@ -2348,7 +2414,8 @@ var styles24 = reactNative.StyleSheet.create({
|
|
|
2348
2414
|
maxWidth: s(160)
|
|
2349
2415
|
},
|
|
2350
2416
|
rightText: {
|
|
2351
|
-
|
|
2417
|
+
fontFamily: "Poppins-Regular",
|
|
2418
|
+
fontSize: ms(14)
|
|
2352
2419
|
},
|
|
2353
2420
|
chevron: {
|
|
2354
2421
|
marginLeft: s(4)
|
|
@@ -2361,8 +2428,8 @@ var styles24 = reactNative.StyleSheet.create({
|
|
|
2361
2428
|
opacity: 0.45
|
|
2362
2429
|
}
|
|
2363
2430
|
});
|
|
2364
|
-
var
|
|
2365
|
-
function Chip({ label, selected = false, onPress, style }) {
|
|
2431
|
+
var nativeDriver11 = reactNative.Platform.OS !== "web";
|
|
2432
|
+
function Chip({ label, selected = false, onPress, icon, iconName, style }) {
|
|
2366
2433
|
const { colors } = useTheme();
|
|
2367
2434
|
const scale2 = React25.useRef(new reactNative.Animated.Value(1)).current;
|
|
2368
2435
|
const pressAnim = React25.useRef(new reactNative.Animated.Value(selected ? 1 : 0)).current;
|
|
@@ -2377,7 +2444,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2377
2444
|
const handlePressIn = () => {
|
|
2378
2445
|
reactNative.Animated.spring(scale2, {
|
|
2379
2446
|
toValue: 0.95,
|
|
2380
|
-
useNativeDriver:
|
|
2447
|
+
useNativeDriver: nativeDriver11,
|
|
2381
2448
|
speed: 40,
|
|
2382
2449
|
bounciness: 0
|
|
2383
2450
|
}).start();
|
|
@@ -2385,7 +2452,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2385
2452
|
const handlePressOut = () => {
|
|
2386
2453
|
reactNative.Animated.spring(scale2, {
|
|
2387
2454
|
toValue: 1,
|
|
2388
|
-
useNativeDriver:
|
|
2455
|
+
useNativeDriver: nativeDriver11,
|
|
2389
2456
|
speed: 40,
|
|
2390
2457
|
bounciness: 4
|
|
2391
2458
|
}).start();
|
|
@@ -2406,7 +2473,8 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2406
2473
|
inputRange: [0, 1],
|
|
2407
2474
|
outputRange: [colors.border, colors.primary]
|
|
2408
2475
|
});
|
|
2409
|
-
|
|
2476
|
+
const resolvedIcon = iconName ? renderIcon(iconName, ms(13), selected ? colors.primaryForeground : colors.foreground) : icon;
|
|
2477
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: [styles26.wrapper, { transform: [{ scale: scale2 }] }, style] }, /* @__PURE__ */ React25__default.default.createElement(
|
|
2410
2478
|
reactNative.TouchableOpacity,
|
|
2411
2479
|
{
|
|
2412
2480
|
onPress: handlePress,
|
|
@@ -2415,7 +2483,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2415
2483
|
activeOpacity: 1,
|
|
2416
2484
|
touchSoundDisabled: true
|
|
2417
2485
|
},
|
|
2418
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: [
|
|
2486
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.View, { style: [styles26.chip, { backgroundColor, borderColor }] }, resolvedIcon ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles26.chipIcon }, resolvedIcon) : null, /* @__PURE__ */ React25__default.default.createElement(reactNative.Animated.Text, { style: [styles26.label, { color: textColor }], allowFontScaling: true }, label))
|
|
2419
2487
|
));
|
|
2420
2488
|
}
|
|
2421
2489
|
function ChipGroup({ options, value, onValueChange, multiSelect = false, style }) {
|
|
@@ -2440,7 +2508,7 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
2440
2508
|
}
|
|
2441
2509
|
return optionValue === value;
|
|
2442
2510
|
};
|
|
2443
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
2511
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles26.group, style] }, options.map((opt) => /* @__PURE__ */ React25__default.default.createElement(
|
|
2444
2512
|
Chip,
|
|
2445
2513
|
{
|
|
2446
2514
|
key: opt.value,
|
|
@@ -2450,20 +2518,26 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
2450
2518
|
}
|
|
2451
2519
|
)));
|
|
2452
2520
|
}
|
|
2453
|
-
var
|
|
2521
|
+
var styles26 = reactNative.StyleSheet.create({
|
|
2454
2522
|
wrapper: {},
|
|
2455
2523
|
chip: {
|
|
2456
2524
|
borderRadius: 999,
|
|
2457
2525
|
paddingHorizontal: s(14),
|
|
2458
|
-
paddingVertical: vs(
|
|
2459
|
-
borderWidth: 1
|
|
2526
|
+
paddingVertical: vs(5),
|
|
2527
|
+
borderWidth: 1,
|
|
2528
|
+
alignItems: "center",
|
|
2529
|
+
justifyContent: "center",
|
|
2530
|
+
flexDirection: "row",
|
|
2531
|
+
gap: s(5)
|
|
2532
|
+
},
|
|
2533
|
+
chipIcon: {
|
|
2460
2534
|
alignItems: "center",
|
|
2461
2535
|
justifyContent: "center"
|
|
2462
2536
|
},
|
|
2463
2537
|
label: {
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
lineHeight: mvs(
|
|
2538
|
+
fontFamily: "Poppins-Medium",
|
|
2539
|
+
fontSize: ms(13),
|
|
2540
|
+
lineHeight: mvs(18)
|
|
2467
2541
|
},
|
|
2468
2542
|
group: {
|
|
2469
2543
|
flexDirection: "row",
|
|
@@ -2482,43 +2556,85 @@ function ConfirmDialog({
|
|
|
2482
2556
|
onCancel
|
|
2483
2557
|
}) {
|
|
2484
2558
|
const { colors } = useTheme();
|
|
2485
|
-
|
|
2486
|
-
|
|
2559
|
+
const ref = React25.useRef(null);
|
|
2560
|
+
React25.useEffect(() => {
|
|
2561
|
+
if (visible) {
|
|
2562
|
+
impactLight();
|
|
2563
|
+
ref.current?.present();
|
|
2564
|
+
} else {
|
|
2565
|
+
ref.current?.dismiss();
|
|
2566
|
+
}
|
|
2567
|
+
}, [visible]);
|
|
2568
|
+
const renderBackdrop = (props) => /* @__PURE__ */ React25__default.default.createElement(
|
|
2569
|
+
bottomSheet.BottomSheetBackdrop,
|
|
2570
|
+
{
|
|
2571
|
+
...props,
|
|
2572
|
+
disappearsOnIndex: -1,
|
|
2573
|
+
appearsOnIndex: 0,
|
|
2574
|
+
pressBehavior: "close"
|
|
2575
|
+
}
|
|
2576
|
+
);
|
|
2577
|
+
return /* @__PURE__ */ React25__default.default.createElement(
|
|
2578
|
+
bottomSheet.BottomSheetModal,
|
|
2487
2579
|
{
|
|
2488
|
-
|
|
2489
|
-
|
|
2580
|
+
ref,
|
|
2581
|
+
snapPoints: ["35%"],
|
|
2582
|
+
onDismiss: onCancel,
|
|
2583
|
+
backdropComponent: renderBackdrop,
|
|
2584
|
+
backgroundStyle: [styles27.background, { backgroundColor: colors.card }],
|
|
2585
|
+
handleIndicatorStyle: [styles27.handle, { backgroundColor: colors.border }],
|
|
2586
|
+
enablePanDownToClose: true
|
|
2490
2587
|
},
|
|
2491
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2588
|
+
/* @__PURE__ */ React25__default.default.createElement(bottomSheet.BottomSheetView, { style: styles27.content }, /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles27.title, { color: colors.cardForeground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles27.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles27.actions }, /* @__PURE__ */ React25__default.default.createElement(
|
|
2589
|
+
Button,
|
|
2590
|
+
{
|
|
2591
|
+
label: cancelLabel,
|
|
2592
|
+
variant: "outline",
|
|
2593
|
+
fullWidth: true,
|
|
2594
|
+
onPress: onCancel,
|
|
2595
|
+
icon: /* @__PURE__ */ React25__default.default.createElement(vectorIcons.Feather, { name: "x", size: 15, color: colors.foreground })
|
|
2596
|
+
}
|
|
2597
|
+
), /* @__PURE__ */ React25__default.default.createElement(
|
|
2598
|
+
Button,
|
|
2599
|
+
{
|
|
2600
|
+
label: confirmLabel,
|
|
2601
|
+
variant: confirmVariant,
|
|
2602
|
+
fullWidth: true,
|
|
2603
|
+
onPress: onConfirm,
|
|
2604
|
+
icon: /* @__PURE__ */ React25__default.default.createElement(
|
|
2605
|
+
vectorIcons.Feather,
|
|
2606
|
+
{
|
|
2607
|
+
name: confirmVariant === "destructive" ? "trash-2" : "check",
|
|
2608
|
+
size: 15,
|
|
2609
|
+
color: confirmVariant === "destructive" ? colors.destructiveForeground : colors.primaryForeground
|
|
2610
|
+
}
|
|
2611
|
+
)
|
|
2612
|
+
}
|
|
2613
|
+
)))
|
|
2614
|
+
);
|
|
2495
2615
|
}
|
|
2496
|
-
var
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
justifyContent: "center",
|
|
2501
|
-
alignItems: "center",
|
|
2502
|
-
padding: s(24)
|
|
2616
|
+
var styles27 = reactNative.StyleSheet.create({
|
|
2617
|
+
background: {
|
|
2618
|
+
borderTopLeftRadius: ms(16),
|
|
2619
|
+
borderTopRightRadius: ms(16)
|
|
2503
2620
|
},
|
|
2504
|
-
|
|
2505
|
-
width:
|
|
2506
|
-
|
|
2507
|
-
borderRadius: ms(
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
shadowRadius: 16,
|
|
2514
|
-
elevation: 8
|
|
2621
|
+
handle: {
|
|
2622
|
+
width: s(36),
|
|
2623
|
+
height: vs(4),
|
|
2624
|
+
borderRadius: ms(2)
|
|
2625
|
+
},
|
|
2626
|
+
content: {
|
|
2627
|
+
paddingHorizontal: s(24),
|
|
2628
|
+
paddingBottom: vs(32),
|
|
2629
|
+
gap: vs(12)
|
|
2515
2630
|
},
|
|
2516
2631
|
title: {
|
|
2632
|
+
fontFamily: "Poppins-SemiBold",
|
|
2517
2633
|
fontSize: ms(18),
|
|
2518
|
-
fontWeight: "600",
|
|
2519
2634
|
lineHeight: mvs(26)
|
|
2520
2635
|
},
|
|
2521
2636
|
description: {
|
|
2637
|
+
fontFamily: "Poppins-Regular",
|
|
2522
2638
|
fontSize: ms(15),
|
|
2523
2639
|
lineHeight: mvs(22)
|
|
2524
2640
|
},
|
|
@@ -2529,9 +2645,9 @@ var styles26 = reactNative.StyleSheet.create({
|
|
|
2529
2645
|
});
|
|
2530
2646
|
function LabelValue({ label, value, style }) {
|
|
2531
2647
|
const { colors } = useTheme();
|
|
2532
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
2648
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles28.container, style] }, /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles28.label, { color: colors.mutedForeground }], allowFontScaling: true }, label), typeof value === "string" ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles28.value, { color: colors.foreground }], allowFontScaling: true }, value) : value);
|
|
2533
2649
|
}
|
|
2534
|
-
var
|
|
2650
|
+
var styles28 = reactNative.StyleSheet.create({
|
|
2535
2651
|
container: {
|
|
2536
2652
|
flexDirection: "row",
|
|
2537
2653
|
justifyContent: "space-between",
|
|
@@ -2539,13 +2655,14 @@ var styles27 = reactNative.StyleSheet.create({
|
|
|
2539
2655
|
gap: s(12)
|
|
2540
2656
|
},
|
|
2541
2657
|
label: {
|
|
2658
|
+
fontFamily: "Poppins-Regular",
|
|
2542
2659
|
fontSize: ms(13),
|
|
2543
2660
|
lineHeight: mvs(18)
|
|
2544
2661
|
},
|
|
2545
2662
|
value: {
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
lineHeight: mvs(
|
|
2663
|
+
fontFamily: "Poppins-Medium",
|
|
2664
|
+
fontSize: ms(14),
|
|
2665
|
+
lineHeight: mvs(20),
|
|
2549
2666
|
textAlign: "right"
|
|
2550
2667
|
}
|
|
2551
2668
|
});
|
|
@@ -2581,19 +2698,19 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2581
2698
|
onChange({ month: value.month + 1, year: value.year });
|
|
2582
2699
|
}
|
|
2583
2700
|
};
|
|
2584
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [
|
|
2701
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles29.container, style] }, /* @__PURE__ */ React25__default.default.createElement(
|
|
2585
2702
|
reactNative.TouchableOpacity,
|
|
2586
2703
|
{
|
|
2587
|
-
style:
|
|
2704
|
+
style: styles29.arrow,
|
|
2588
2705
|
onPress: handlePrev,
|
|
2589
2706
|
activeOpacity: 0.6,
|
|
2590
2707
|
touchSoundDisabled: true
|
|
2591
2708
|
},
|
|
2592
2709
|
/* @__PURE__ */ React25__default.default.createElement(vectorIcons.Entypo, { name: "chevron-left", size: 22, color: colors.foreground })
|
|
2593
|
-
), /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [
|
|
2710
|
+
), /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles29.label, { color: colors.foreground }], allowFontScaling: true }, MONTH_NAMES[value.month - 1], " ", value.year), /* @__PURE__ */ React25__default.default.createElement(
|
|
2594
2711
|
reactNative.TouchableOpacity,
|
|
2595
2712
|
{
|
|
2596
|
-
style:
|
|
2713
|
+
style: styles29.arrow,
|
|
2597
2714
|
onPress: handleNext,
|
|
2598
2715
|
activeOpacity: 0.6,
|
|
2599
2716
|
touchSoundDisabled: true
|
|
@@ -2601,7 +2718,7 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2601
2718
|
/* @__PURE__ */ React25__default.default.createElement(vectorIcons.Entypo, { name: "chevron-right", size: 22, color: colors.foreground })
|
|
2602
2719
|
));
|
|
2603
2720
|
}
|
|
2604
|
-
var
|
|
2721
|
+
var styles29 = reactNative.StyleSheet.create({
|
|
2605
2722
|
container: {
|
|
2606
2723
|
flexDirection: "row",
|
|
2607
2724
|
alignItems: "center",
|
|
@@ -2614,8 +2731,8 @@ var styles28 = reactNative.StyleSheet.create({
|
|
|
2614
2731
|
justifyContent: "center"
|
|
2615
2732
|
},
|
|
2616
2733
|
label: {
|
|
2734
|
+
fontFamily: "Poppins-Medium",
|
|
2617
2735
|
fontSize: ms(17),
|
|
2618
|
-
fontWeight: "500",
|
|
2619
2736
|
lineHeight: mvs(24),
|
|
2620
2737
|
textAlign: "center",
|
|
2621
2738
|
minWidth: s(160)
|