@retray-dev/ui-kit 5.4.0 → 6.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 +261 -126
- package/dist/index.d.mts +147 -44
- package/dist/index.d.ts +147 -44
- package/dist/index.js +429 -305
- package/dist/index.mjs +419 -303
- package/package.json +7 -2
- package/src/components/Accordion/Accordion.tsx +6 -2
- package/src/components/AlertBanner/AlertBanner.tsx +16 -33
- package/src/components/Button/Button.tsx +18 -6
- package/src/components/Card/Card.tsx +12 -9
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +4 -4
- package/src/components/CurrencyDisplay/CurrencyDisplay.tsx +14 -3
- package/src/components/EmptyState/EmptyState.tsx +21 -6
- package/src/components/Input/Input.tsx +21 -10
- package/src/components/ListItem/ListItem.tsx +14 -8
- package/src/components/MediaCard/MediaCard.tsx +1 -0
- package/src/components/MenuItem/MenuItem.tsx +206 -0
- package/src/components/MenuItem/index.ts +2 -0
- package/src/components/Select/Select.tsx +1 -1
- package/src/components/Separator/Separator.tsx +2 -0
- package/src/components/Sheet/Sheet.tsx +164 -51
- package/src/components/Sheet/index.ts +1 -1
- package/src/components/Tabs/Tabs.tsx +4 -4
- package/src/components/Toast/Toast.tsx +41 -267
- package/src/components/Toast/index.ts +1 -2
- package/src/components/Toggle/Toggle.tsx +2 -2
- package/src/index.ts +1 -0
- package/src/theme/colors.ts +3 -0
- package/src/theme/types.ts +11 -0
- package/src/tokens.ts +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React26, { createContext, useMemo, useContext, useRef, useState, useEffect, useCallback } from 'react';
|
|
2
|
-
import { Platform, StyleSheet, useColorScheme, Animated, TouchableOpacity, ActivityIndicator, Text, View, TextInput,
|
|
2
|
+
import { Platform, StyleSheet, Dimensions, useColorScheme, Animated, TouchableOpacity, ActivityIndicator, Text, View, TextInput, Easing as Easing$1, Image, Modal, ScrollView, Pressable } from 'react-native';
|
|
3
3
|
import { verticalScale, scale, moderateVerticalScale, moderateScale } from 'react-native-size-matters';
|
|
4
4
|
import AntDesign from '@expo/vector-icons/AntDesign';
|
|
5
5
|
import Entypo from '@expo/vector-icons/Entypo';
|
|
@@ -7,16 +7,16 @@ 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,
|
|
10
|
+
import { AntDesign as AntDesign$1, FontAwesome5 as FontAwesome5$1, MaterialIcons as MaterialIcons$1, Entypo as Entypo$1, Feather as Feather$1 } from '@expo/vector-icons';
|
|
11
11
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
12
|
-
import
|
|
12
|
+
import Animated12, { Easing, useSharedValue, useDerivedValue, withTiming, useAnimatedStyle } from 'react-native-reanimated';
|
|
13
13
|
import RNSlider from '@react-native-community/slider';
|
|
14
|
-
import {
|
|
15
|
-
export { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
|
|
16
|
-
import { Picker } from '@react-native-picker/picker';
|
|
17
|
-
import { scheduleOnRN } from 'react-native-worklets';
|
|
18
|
-
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
14
|
+
import { BottomSheetBackdrop, BottomSheetFooter, BottomSheetModal, BottomSheetScrollView, BottomSheetView } from '@gorhom/bottom-sheet';
|
|
15
|
+
export { BottomSheetModalProvider, BottomSheetTextInput as SheetTextInput } from '@gorhom/bottom-sheet';
|
|
19
16
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
17
|
+
import { Picker } from '@react-native-picker/picker';
|
|
18
|
+
import { toast, Toaster } from 'sonner-native';
|
|
19
|
+
export { toast } from 'sonner-native';
|
|
20
20
|
|
|
21
21
|
// src/theme/ThemeProvider.tsx
|
|
22
22
|
|
|
@@ -129,6 +129,9 @@ function deriveColors(t, scheme) {
|
|
|
129
129
|
successBorder,
|
|
130
130
|
warningTint,
|
|
131
131
|
warningBorder,
|
|
132
|
+
overlay: t.overlay ?? "rgba(0,0,0,0.45)",
|
|
133
|
+
accentResolved: t.accent ?? t.primary,
|
|
134
|
+
accentForegroundResolved: t.accentForeground ?? t.primaryForeground,
|
|
132
135
|
ring: t.primary,
|
|
133
136
|
// focus ring always = primary
|
|
134
137
|
input: t.border
|
|
@@ -175,13 +178,13 @@ function impactLight() {
|
|
|
175
178
|
if (Platform.OS === "web") return;
|
|
176
179
|
getHaptics().then((h) => h?.impactAsync(h.ImpactFeedbackStyle.Light));
|
|
177
180
|
}
|
|
178
|
-
function
|
|
181
|
+
function impactMedium() {
|
|
179
182
|
if (Platform.OS === "web") return;
|
|
180
|
-
getHaptics().then((h) => h?.
|
|
183
|
+
getHaptics().then((h) => h?.impactAsync(h.ImpactFeedbackStyle.Medium));
|
|
181
184
|
}
|
|
182
|
-
function
|
|
185
|
+
function notificationSuccess() {
|
|
183
186
|
if (Platform.OS === "web") return;
|
|
184
|
-
getHaptics().then((h) => h?.notificationAsync(h.NotificationFeedbackType.
|
|
187
|
+
getHaptics().then((h) => h?.notificationAsync(h.NotificationFeedbackType.Success));
|
|
185
188
|
}
|
|
186
189
|
var isWeb = Platform.OS === "web";
|
|
187
190
|
var s = isWeb ? (n) => n : scale;
|
|
@@ -383,10 +386,10 @@ var TYPOGRAPHY = {
|
|
|
383
386
|
},
|
|
384
387
|
"uppercase-tag": {
|
|
385
388
|
fontFamily: "Poppins-Bold",
|
|
386
|
-
fontSize:
|
|
389
|
+
fontSize: 10,
|
|
387
390
|
fontWeight: "700",
|
|
388
|
-
lineHeight:
|
|
389
|
-
letterSpacing: 0.
|
|
391
|
+
lineHeight: 13,
|
|
392
|
+
letterSpacing: 0.8,
|
|
390
393
|
textTransform: "uppercase"
|
|
391
394
|
},
|
|
392
395
|
"button-lg": {
|
|
@@ -438,13 +441,13 @@ function Button({
|
|
|
438
441
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
439
442
|
const handlePressIn = () => {
|
|
440
443
|
if (isDisabled) return;
|
|
441
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver,
|
|
444
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver, stiffness: 600, damping: 35, mass: 0.8 }).start();
|
|
442
445
|
};
|
|
443
446
|
const handlePressOut = () => {
|
|
444
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver,
|
|
447
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver, stiffness: 280, damping: 22, mass: 0.8 }).start();
|
|
445
448
|
};
|
|
446
449
|
const handlePress = (e) => {
|
|
447
|
-
|
|
450
|
+
impactMedium();
|
|
448
451
|
onPress?.(e);
|
|
449
452
|
};
|
|
450
453
|
const containerVariantStyle = {
|
|
@@ -484,7 +487,15 @@ function Button({
|
|
|
484
487
|
onPressOut: handlePressOut,
|
|
485
488
|
...props
|
|
486
489
|
},
|
|
487
|
-
loading ? /* @__PURE__ */ React26.createElement(
|
|
490
|
+
loading ? /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(ActivityIndicator, { size: "small", color: spinnerColor, style: { marginRight: s(6) } }), /* @__PURE__ */ React26.createElement(
|
|
491
|
+
Text,
|
|
492
|
+
{
|
|
493
|
+
style: [styles.label, labelVariantStyle, labelSizeStyles[size], styles.labelLoading],
|
|
494
|
+
allowFontScaling: true,
|
|
495
|
+
numberOfLines: 1
|
|
496
|
+
},
|
|
497
|
+
label
|
|
498
|
+
)) : /* @__PURE__ */ React26.createElement(React26.Fragment, null, effectiveIcon && iconPosition === "left" && /* @__PURE__ */ React26.createElement(React26.Fragment, null, effectiveIcon), /* @__PURE__ */ React26.createElement(
|
|
488
499
|
Text,
|
|
489
500
|
{
|
|
490
501
|
style: [styles.label, labelVariantStyle, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : void 0],
|
|
@@ -497,8 +508,8 @@ function Button({
|
|
|
497
508
|
}
|
|
498
509
|
var styles = StyleSheet.create({
|
|
499
510
|
base: {
|
|
500
|
-
borderRadius: RADIUS.
|
|
501
|
-
//
|
|
511
|
+
borderRadius: RADIUS.md,
|
|
512
|
+
// 14px — Airbnb-aligned rounded rect (not pill)
|
|
502
513
|
alignItems: "center",
|
|
503
514
|
justifyContent: "center",
|
|
504
515
|
flexDirection: "row"
|
|
@@ -515,6 +526,9 @@ var styles = StyleSheet.create({
|
|
|
515
526
|
},
|
|
516
527
|
labelWithIcon: {
|
|
517
528
|
marginHorizontal: s(6)
|
|
529
|
+
},
|
|
530
|
+
labelLoading: {
|
|
531
|
+
opacity: 0.6
|
|
518
532
|
}
|
|
519
533
|
});
|
|
520
534
|
function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
@@ -716,22 +730,27 @@ function Text3({ variant = "body-md", color, style, children, ...props }) {
|
|
|
716
730
|
);
|
|
717
731
|
}
|
|
718
732
|
var webInputResetStyle = Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
719
|
-
function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, prefixIcon, suffixIcon, prefixIconColor, suffixIconColor, type = "text", containerStyle, inputWrapperStyle, style, onFocus, onBlur, secureTextEntry, ...props }) {
|
|
733
|
+
function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suffixStyle, prefixIcon, suffixIcon, prefixIconColor, suffixIconColor, type = "text", containerStyle, inputWrapperStyle, style, onFocus, onBlur, secureTextEntry, editable, ...props }) {
|
|
720
734
|
const { colors } = useTheme();
|
|
721
735
|
const [focused, setFocused] = useState(false);
|
|
722
736
|
const [showPassword, setShowPassword] = useState(false);
|
|
737
|
+
const focusAnim = useRef(new Animated.Value(0)).current;
|
|
738
|
+
const isDisabled = disabled || editable === false;
|
|
723
739
|
const isPassword = type === "password";
|
|
724
740
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
725
741
|
const effectivePrefix = prefixIcon ? renderIcon(prefixIcon, 20, prefixIconColor ?? colors.foregroundMuted) : prefix;
|
|
726
742
|
const effectiveSuffix = isPassword && !suffix && !suffixIcon ? /* @__PURE__ */ React26.createElement(TouchableOpacity, { onPress: () => setShowPassword(!showPassword), style: styles4.passwordToggle, activeOpacity: 0.6 }, /* @__PURE__ */ React26.createElement(AntDesign$1, { name: showPassword ? "eye" : "eye-invisible", size: 20, color: colors.foregroundMuted })) : suffixIcon ? renderIcon(suffixIcon, 20, suffixIconColor ?? colors.foregroundMuted) : suffix;
|
|
727
|
-
return /* @__PURE__ */ React26.createElement(View, { style: [styles4.container, containerStyle] }, label ? /* @__PURE__ */ React26.createElement(Text, { style: [styles4.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React26.createElement(
|
|
728
|
-
View,
|
|
743
|
+
return /* @__PURE__ */ React26.createElement(View, { style: [styles4.container, isDisabled && styles4.containerDisabled, containerStyle] }, label ? /* @__PURE__ */ React26.createElement(Text, { style: [styles4.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React26.createElement(
|
|
744
|
+
Animated.View,
|
|
729
745
|
{
|
|
730
746
|
style: [
|
|
731
747
|
styles4.inputWrapper,
|
|
732
748
|
{
|
|
733
|
-
borderColor: error ? colors.destructive :
|
|
734
|
-
|
|
749
|
+
borderColor: error ? colors.destructive : focusAnim.interpolate({
|
|
750
|
+
inputRange: [0, 1],
|
|
751
|
+
outputRange: [colors.border, colors.primary]
|
|
752
|
+
}),
|
|
753
|
+
backgroundColor: isDisabled ? colors.surface : colors.background
|
|
735
754
|
},
|
|
736
755
|
inputWrapperStyle
|
|
737
756
|
]
|
|
@@ -750,15 +769,18 @@ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, p
|
|
|
750
769
|
],
|
|
751
770
|
onFocus: (e) => {
|
|
752
771
|
setFocused(true);
|
|
772
|
+
Animated.timing(focusAnim, { toValue: 1, duration: 120, easing: Easing$1.out(Easing$1.ease), useNativeDriver: false }).start();
|
|
753
773
|
onFocus?.(e);
|
|
754
774
|
},
|
|
755
775
|
onBlur: (e) => {
|
|
756
776
|
setFocused(false);
|
|
777
|
+
Animated.timing(focusAnim, { toValue: 0, duration: 80, easing: Easing$1.out(Easing$1.ease), useNativeDriver: false }).start();
|
|
757
778
|
onBlur?.(e);
|
|
758
779
|
},
|
|
759
780
|
placeholderTextColor: colors.foregroundMuted,
|
|
760
781
|
allowFontScaling: true,
|
|
761
782
|
secureTextEntry: effectiveSecure,
|
|
783
|
+
editable: isDisabled ? false : editable,
|
|
762
784
|
...props
|
|
763
785
|
}
|
|
764
786
|
),
|
|
@@ -769,6 +791,9 @@ var styles4 = StyleSheet.create({
|
|
|
769
791
|
container: {
|
|
770
792
|
gap: vs(8)
|
|
771
793
|
},
|
|
794
|
+
containerDisabled: {
|
|
795
|
+
opacity: 0.6
|
|
796
|
+
},
|
|
772
797
|
label: {
|
|
773
798
|
fontFamily: "Poppins-Medium",
|
|
774
799
|
fontSize: ms(14)
|
|
@@ -878,8 +903,9 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
878
903
|
Animated.spring(scale2, {
|
|
879
904
|
toValue: 0.98,
|
|
880
905
|
useNativeDriver: nativeDriver3,
|
|
881
|
-
|
|
882
|
-
|
|
906
|
+
stiffness: 400,
|
|
907
|
+
damping: 30,
|
|
908
|
+
mass: 1
|
|
883
909
|
}).start();
|
|
884
910
|
};
|
|
885
911
|
const handlePressOut = () => {
|
|
@@ -887,8 +913,9 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
887
913
|
Animated.spring(scale2, {
|
|
888
914
|
toValue: 1,
|
|
889
915
|
useNativeDriver: nativeDriver3,
|
|
890
|
-
|
|
891
|
-
|
|
916
|
+
stiffness: 250,
|
|
917
|
+
damping: 24,
|
|
918
|
+
mass: 1
|
|
892
919
|
}).start();
|
|
893
920
|
};
|
|
894
921
|
const handlePress = () => {
|
|
@@ -901,10 +928,10 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
901
928
|
backgroundColor: colors.card,
|
|
902
929
|
borderColor: colors.border,
|
|
903
930
|
shadowColor: "#000",
|
|
904
|
-
shadowOffset: { width: 0, height:
|
|
905
|
-
shadowOpacity: 0.
|
|
906
|
-
shadowRadius:
|
|
907
|
-
elevation:
|
|
931
|
+
shadowOffset: { width: 0, height: 6 },
|
|
932
|
+
shadowOpacity: 0.1,
|
|
933
|
+
shadowRadius: 16,
|
|
934
|
+
elevation: 4
|
|
908
935
|
},
|
|
909
936
|
outlined: {
|
|
910
937
|
backgroundColor: colors.card,
|
|
@@ -954,8 +981,8 @@ function CardFooter({ children, style }) {
|
|
|
954
981
|
}
|
|
955
982
|
var styles6 = StyleSheet.create({
|
|
956
983
|
card: {
|
|
957
|
-
borderRadius:
|
|
958
|
-
//
|
|
984
|
+
borderRadius: RADIUS.md,
|
|
985
|
+
// 14px — Airbnb property card spec
|
|
959
986
|
borderWidth: 1
|
|
960
987
|
},
|
|
961
988
|
header: {
|
|
@@ -1001,11 +1028,13 @@ function Separator({ orientation = "horizontal", style }) {
|
|
|
1001
1028
|
var styles7 = StyleSheet.create({
|
|
1002
1029
|
horizontal: {
|
|
1003
1030
|
height: 1,
|
|
1004
|
-
width: "100%"
|
|
1031
|
+
width: "100%",
|
|
1032
|
+
opacity: 0.7
|
|
1005
1033
|
},
|
|
1006
1034
|
vertical: {
|
|
1007
1035
|
width: 1,
|
|
1008
|
-
height: "100%"
|
|
1036
|
+
height: "100%",
|
|
1037
|
+
opacity: 0.7
|
|
1009
1038
|
}
|
|
1010
1039
|
});
|
|
1011
1040
|
var sizeMap2 = {
|
|
@@ -1192,24 +1221,19 @@ var styles10 = StyleSheet.create({
|
|
|
1192
1221
|
});
|
|
1193
1222
|
function AlertBanner({ title, description, variant = "default", icon, iconName, iconColor, style }) {
|
|
1194
1223
|
const { colors } = useTheme();
|
|
1195
|
-
const bgColor = variant === "destructive" ? colors.destructiveTint : variant === "success" ? colors.successTint : variant === "warning" ? colors.warningTint : colors.card;
|
|
1196
|
-
const borderColor = variant === "destructive" ? colors.destructiveBorder : variant === "success" ? colors.successBorder : variant === "warning" ? colors.warningBorder : colors.border;
|
|
1197
1224
|
const accentColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : variant === "warning" ? colors.warning : colors.primary;
|
|
1198
|
-
const
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1201
|
-
const effectiveIcon = iconName ? renderIcon(iconName, 16, iconColor ?? accentColor) : icon ?? defaultIcon;
|
|
1202
|
-
return /* @__PURE__ */ React26.createElement(View, { style: [styles11.container, { backgroundColor: bgColor, borderColor }, style] }, /* @__PURE__ */ React26.createElement(View, { style: styles11.iconSlot }, effectiveIcon), /* @__PURE__ */ React26.createElement(View, { style: styles11.content }, /* @__PURE__ */ React26.createElement(Text, { style: [styles11.title, { color: titleColor }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React26.createElement(Text, { style: [styles11.description, { color: descColor }], allowFontScaling: true }, description) : null));
|
|
1225
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React26.createElement(FontAwesome5$1, { name: "check-circle", size: ms(16), color: accentColor }) : variant === "destructive" ? /* @__PURE__ */ React26.createElement(MaterialIcons$1, { name: "error-outline", size: ms(17), color: accentColor }) : variant === "warning" ? /* @__PURE__ */ React26.createElement(MaterialIcons$1, { name: "warning-amber", size: ms(17), color: accentColor }) : /* @__PURE__ */ React26.createElement(Entypo$1, { name: "info-with-circle", size: ms(16), color: accentColor });
|
|
1226
|
+
const effectiveIcon = iconName ? renderIcon(iconName, ms(16), iconColor ?? accentColor) : icon ?? defaultIcon;
|
|
1227
|
+
return /* @__PURE__ */ React26.createElement(View, { style: [styles11.container, { backgroundColor: colors.card }, style] }, /* @__PURE__ */ React26.createElement(View, { style: styles11.iconSlot }, effectiveIcon), /* @__PURE__ */ React26.createElement(View, { style: styles11.content }, /* @__PURE__ */ React26.createElement(Text, { style: [styles11.title, { color: colors.foreground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React26.createElement(Text, { style: [styles11.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null));
|
|
1203
1228
|
}
|
|
1204
1229
|
var styles11 = StyleSheet.create({
|
|
1205
1230
|
container: {
|
|
1206
1231
|
flexDirection: "row",
|
|
1207
1232
|
alignItems: "flex-start",
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
gap: s(10)
|
|
1233
|
+
borderRadius: RADIUS.lg,
|
|
1234
|
+
gap: s(8),
|
|
1235
|
+
paddingVertical: vs(8),
|
|
1236
|
+
paddingHorizontal: s(10)
|
|
1213
1237
|
},
|
|
1214
1238
|
iconSlot: {
|
|
1215
1239
|
marginTop: vs(1)
|
|
@@ -1221,13 +1245,12 @@ var styles11 = StyleSheet.create({
|
|
|
1221
1245
|
title: {
|
|
1222
1246
|
fontFamily: "Poppins-Medium",
|
|
1223
1247
|
fontSize: ms(13),
|
|
1224
|
-
lineHeight: ms(
|
|
1248
|
+
lineHeight: ms(19)
|
|
1225
1249
|
},
|
|
1226
1250
|
description: {
|
|
1227
1251
|
fontFamily: "Poppins-Regular",
|
|
1228
1252
|
fontSize: ms(12),
|
|
1229
|
-
lineHeight: ms(17)
|
|
1230
|
-
opacity: 0.85
|
|
1253
|
+
lineHeight: ms(17)
|
|
1231
1254
|
}
|
|
1232
1255
|
});
|
|
1233
1256
|
function Progress({ value = 0, max = 100, variant = "default", style }) {
|
|
@@ -1271,7 +1294,7 @@ var styles12 = StyleSheet.create({
|
|
|
1271
1294
|
borderRadius: 9999
|
|
1272
1295
|
}
|
|
1273
1296
|
});
|
|
1274
|
-
function EmptyState({ icon, iconName, iconColor, title, description, action, size = "default", style }) {
|
|
1297
|
+
function EmptyState({ icon, iconName, iconColor, title, description, action, actionLabel, onAction, size = "default", style }) {
|
|
1275
1298
|
const { colors } = useTheme();
|
|
1276
1299
|
const isCompact = size === "compact";
|
|
1277
1300
|
const effectiveIcon = iconName ? renderIcon(iconName, isCompact ? 32 : 48, iconColor ?? colors.foregroundMuted) : icon;
|
|
@@ -1304,7 +1327,7 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, siz
|
|
|
1304
1327
|
},
|
|
1305
1328
|
title
|
|
1306
1329
|
), description && !isCompact ? /* @__PURE__ */ React26.createElement(Text, { style: [styles13.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null),
|
|
1307
|
-
|
|
1330
|
+
!isCompact && (action ? /* @__PURE__ */ React26.createElement(View, { style: styles13.action }, action) : actionLabel && onAction ? /* @__PURE__ */ React26.createElement(View, { style: styles13.action }, /* @__PURE__ */ React26.createElement(Button, { label: actionLabel, variant: "primary", onPress: onAction })) : null)
|
|
1308
1331
|
);
|
|
1309
1332
|
}
|
|
1310
1333
|
var styles13 = StyleSheet.create({
|
|
@@ -1313,30 +1336,29 @@ var styles13 = StyleSheet.create({
|
|
|
1313
1336
|
justifyContent: "center",
|
|
1314
1337
|
borderWidth: 1,
|
|
1315
1338
|
borderStyle: "dashed",
|
|
1316
|
-
borderRadius: ms(12)
|
|
1317
|
-
padding: s(32),
|
|
1318
|
-
gap: vs(16)
|
|
1319
|
-
},
|
|
1320
|
-
containerCompact: {
|
|
1321
|
-
padding: s(20),
|
|
1322
|
-
gap: vs(10)
|
|
1339
|
+
borderRadius: ms(12)
|
|
1323
1340
|
},
|
|
1341
|
+
containerCompact: {},
|
|
1324
1342
|
iconWrapper: {
|
|
1325
1343
|
width: s(80),
|
|
1326
1344
|
height: s(80),
|
|
1327
1345
|
borderRadius: ms(20),
|
|
1328
1346
|
alignItems: "center",
|
|
1329
|
-
justifyContent: "center"
|
|
1347
|
+
justifyContent: "center",
|
|
1348
|
+
marginTop: s(32)
|
|
1330
1349
|
},
|
|
1331
1350
|
iconWrapperCompact: {
|
|
1332
1351
|
width: s(56),
|
|
1333
1352
|
height: s(56),
|
|
1334
|
-
borderRadius: ms(14)
|
|
1353
|
+
borderRadius: ms(14),
|
|
1354
|
+
marginTop: s(20)
|
|
1335
1355
|
},
|
|
1336
1356
|
textWrapper: {
|
|
1337
1357
|
alignItems: "center",
|
|
1338
1358
|
gap: vs(8),
|
|
1339
|
-
maxWidth: s(320)
|
|
1359
|
+
maxWidth: s(320),
|
|
1360
|
+
paddingHorizontal: s(32),
|
|
1361
|
+
marginTop: vs(16)
|
|
1340
1362
|
},
|
|
1341
1363
|
title: {
|
|
1342
1364
|
fontFamily: "Poppins-Medium",
|
|
@@ -1344,7 +1366,8 @@ var styles13 = StyleSheet.create({
|
|
|
1344
1366
|
textAlign: "center"
|
|
1345
1367
|
},
|
|
1346
1368
|
titleCompact: {
|
|
1347
|
-
fontSize: ms(15)
|
|
1369
|
+
fontSize: ms(15),
|
|
1370
|
+
marginTop: vs(10)
|
|
1348
1371
|
},
|
|
1349
1372
|
description: {
|
|
1350
1373
|
fontFamily: "Poppins-Regular",
|
|
@@ -1353,7 +1376,9 @@ var styles13 = StyleSheet.create({
|
|
|
1353
1376
|
textAlign: "center"
|
|
1354
1377
|
},
|
|
1355
1378
|
action: {
|
|
1356
|
-
marginTop: vs(8)
|
|
1379
|
+
marginTop: vs(8),
|
|
1380
|
+
marginBottom: s(32),
|
|
1381
|
+
paddingHorizontal: s(32)
|
|
1357
1382
|
}
|
|
1358
1383
|
});
|
|
1359
1384
|
var webInputResetStyle2 = Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
@@ -1682,16 +1707,16 @@ function Toggle({
|
|
|
1682
1707
|
Animated.timing(pressAnim, {
|
|
1683
1708
|
toValue: pressed ? 1 : 0,
|
|
1684
1709
|
duration: 150,
|
|
1685
|
-
easing: Easing.out(Easing.ease),
|
|
1710
|
+
easing: Easing$1.out(Easing$1.ease),
|
|
1686
1711
|
useNativeDriver: false
|
|
1687
1712
|
}).start();
|
|
1688
1713
|
}, [pressed, pressAnim]);
|
|
1689
1714
|
const handlePressIn = () => {
|
|
1690
1715
|
if (disabled) return;
|
|
1691
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver6,
|
|
1716
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver6, stiffness: 600, damping: 35, mass: 0.8 }).start();
|
|
1692
1717
|
};
|
|
1693
1718
|
const handlePressOut = () => {
|
|
1694
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver6,
|
|
1719
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver6, stiffness: 280, damping: 22, mass: 0.8 }).start();
|
|
1695
1720
|
};
|
|
1696
1721
|
const borderColor = pressAnim.interpolate({
|
|
1697
1722
|
inputRange: [0, 1],
|
|
@@ -1886,10 +1911,10 @@ function TabTrigger({
|
|
|
1886
1911
|
const { colors } = useTheme();
|
|
1887
1912
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
1888
1913
|
const handlePressIn = () => {
|
|
1889
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver8,
|
|
1914
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver8, stiffness: 600, damping: 35, mass: 0.8 }).start();
|
|
1890
1915
|
};
|
|
1891
1916
|
const handlePressOut = () => {
|
|
1892
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver8,
|
|
1917
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver8, stiffness: 280, damping: 22, mass: 0.8 }).start();
|
|
1893
1918
|
};
|
|
1894
1919
|
const isUnderline = variant === "underline";
|
|
1895
1920
|
return /* @__PURE__ */ React26.createElement(
|
|
@@ -1934,8 +1959,8 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
1934
1959
|
if (!layout) return;
|
|
1935
1960
|
if (animate) {
|
|
1936
1961
|
Animated.parallel([
|
|
1937
|
-
Animated.spring(pillX, { toValue: layout.x, useNativeDriver: false,
|
|
1938
|
-
Animated.spring(pillWidth, { toValue: layout.width, useNativeDriver: false,
|
|
1962
|
+
Animated.spring(pillX, { toValue: layout.x, useNativeDriver: false, stiffness: 380, damping: 38, mass: 1 }),
|
|
1963
|
+
Animated.spring(pillWidth, { toValue: layout.width, useNativeDriver: false, stiffness: 380, damping: 38, mass: 1 })
|
|
1939
1964
|
]).start();
|
|
1940
1965
|
} else {
|
|
1941
1966
|
pillX.setValue(layout.x);
|
|
@@ -2043,6 +2068,8 @@ var styles19 = StyleSheet.create({
|
|
|
2043
2068
|
fontSize: ms(14)
|
|
2044
2069
|
}
|
|
2045
2070
|
});
|
|
2071
|
+
var easingExpand = Easing.bezier(0.23, 1, 0.32, 1);
|
|
2072
|
+
var easingCollapse = Easing.in(Easing.ease);
|
|
2046
2073
|
function AccordionItemComponent({
|
|
2047
2074
|
item,
|
|
2048
2075
|
isOpen,
|
|
@@ -2058,13 +2085,13 @@ function AccordionItemComponent({
|
|
|
2058
2085
|
const derivedHeight = useDerivedValue(
|
|
2059
2086
|
() => withTiming(height.value * Number(isExpanded.value), {
|
|
2060
2087
|
duration: 220,
|
|
2061
|
-
easing: isExpanded.value ?
|
|
2088
|
+
easing: isExpanded.value ? easingExpand : easingCollapse
|
|
2062
2089
|
})
|
|
2063
2090
|
);
|
|
2064
2091
|
const derivedRotation = useDerivedValue(
|
|
2065
2092
|
() => withTiming(isExpanded.value ? 1 : 0, {
|
|
2066
2093
|
duration: 220,
|
|
2067
|
-
easing: isExpanded.value ?
|
|
2094
|
+
easing: isExpanded.value ? easingExpand : easingCollapse
|
|
2068
2095
|
})
|
|
2069
2096
|
);
|
|
2070
2097
|
const bodyStyle = useAnimatedStyle(() => ({
|
|
@@ -2084,8 +2111,8 @@ function AccordionItemComponent({
|
|
|
2084
2111
|
}
|
|
2085
2112
|
},
|
|
2086
2113
|
/* @__PURE__ */ React26.createElement(View, { style: styles20.triggerContent }, resolvedIcon ? /* @__PURE__ */ React26.createElement(View, { style: styles20.icon }, resolvedIcon) : null, /* @__PURE__ */ React26.createElement(Text, { style: [styles20.triggerText, { color: colors.foreground }], allowFontScaling: true }, item.trigger)),
|
|
2087
|
-
/* @__PURE__ */ React26.createElement(
|
|
2088
|
-
), /* @__PURE__ */ React26.createElement(
|
|
2114
|
+
/* @__PURE__ */ React26.createElement(Animated12.View, { style: [styles20.chevron, rotationStyle] }, /* @__PURE__ */ React26.createElement(Entypo$1, { name: "chevron-down", size: 18, color: colors.foregroundMuted }))
|
|
2115
|
+
), /* @__PURE__ */ React26.createElement(Animated12.View, { style: bodyStyle }, /* @__PURE__ */ React26.createElement(
|
|
2089
2116
|
View,
|
|
2090
2117
|
{
|
|
2091
2118
|
style: styles20.content,
|
|
@@ -2228,29 +2255,41 @@ var styles21 = StyleSheet.create({
|
|
|
2228
2255
|
opacity: 0.45
|
|
2229
2256
|
}
|
|
2230
2257
|
});
|
|
2258
|
+
var SCREEN_HEIGHT = Dimensions.get("window").height;
|
|
2259
|
+
var DEFAULT_MAX_HEIGHT = SCREEN_HEIGHT * 0.85;
|
|
2260
|
+
var isAndroid = Platform.OS === "android";
|
|
2231
2261
|
function Sheet({
|
|
2232
2262
|
open,
|
|
2233
2263
|
onClose,
|
|
2234
2264
|
title,
|
|
2265
|
+
subtitle,
|
|
2235
2266
|
description,
|
|
2267
|
+
showCloseButton = false,
|
|
2236
2268
|
children,
|
|
2237
2269
|
style,
|
|
2270
|
+
contentStyle,
|
|
2238
2271
|
scrollable,
|
|
2239
2272
|
maxHeight,
|
|
2240
2273
|
keyboardBehavior,
|
|
2241
|
-
|
|
2274
|
+
keyboardBlurBehavior = "restore",
|
|
2275
|
+
enableBlurKeyboardOnGesture = true,
|
|
2276
|
+
android_keyboardInputMode = "adjustPan",
|
|
2277
|
+
footer,
|
|
2278
|
+
snapPoints
|
|
2242
2279
|
}) {
|
|
2243
2280
|
const { colors } = useTheme();
|
|
2281
|
+
const insets = useSafeAreaInsets();
|
|
2244
2282
|
const ref = useRef(null);
|
|
2283
|
+
const effectiveKeyboardBehavior = keyboardBehavior ?? "interactive";
|
|
2245
2284
|
useEffect(() => {
|
|
2246
2285
|
if (open) {
|
|
2247
|
-
|
|
2286
|
+
impactMedium();
|
|
2248
2287
|
ref.current?.present();
|
|
2249
2288
|
} else {
|
|
2250
2289
|
ref.current?.dismiss();
|
|
2251
2290
|
}
|
|
2252
2291
|
}, [open]);
|
|
2253
|
-
const renderBackdrop = (props) => /* @__PURE__ */ React26.createElement(
|
|
2292
|
+
const renderBackdrop = useCallback((props) => /* @__PURE__ */ React26.createElement(
|
|
2254
2293
|
BottomSheetBackdrop,
|
|
2255
2294
|
{
|
|
2256
2295
|
...props,
|
|
@@ -2258,26 +2297,60 @@ function Sheet({
|
|
|
2258
2297
|
appearsOnIndex: 0,
|
|
2259
2298
|
pressBehavior: "close"
|
|
2260
2299
|
}
|
|
2261
|
-
);
|
|
2262
|
-
const
|
|
2300
|
+
), []);
|
|
2301
|
+
const renderFooter = useCallback((props) => {
|
|
2302
|
+
if (!footer) return null;
|
|
2303
|
+
return /* @__PURE__ */ React26.createElement(BottomSheetFooter, { ...props }, footer);
|
|
2304
|
+
}, [footer]);
|
|
2305
|
+
const effectiveSubtitle = subtitle ?? description;
|
|
2306
|
+
const showHeader = !!(title || effectiveSubtitle || showCloseButton);
|
|
2307
|
+
const headerNode = showHeader ? /* @__PURE__ */ React26.createElement(View, { style: styles22.header }, /* @__PURE__ */ React26.createElement(View, { style: styles22.headerRow }, title ? /* @__PURE__ */ React26.createElement(Text, { style: [styles22.title, { color: colors.foreground }], allowFontScaling: true }, title) : /* @__PURE__ */ React26.createElement(View, { style: { flex: 1 } }), showCloseButton ? /* @__PURE__ */ React26.createElement(
|
|
2308
|
+
TouchableOpacity,
|
|
2309
|
+
{
|
|
2310
|
+
onPress: onClose,
|
|
2311
|
+
style: styles22.closeButton,
|
|
2312
|
+
activeOpacity: 0.6,
|
|
2313
|
+
touchSoundDisabled: true
|
|
2314
|
+
},
|
|
2315
|
+
/* @__PURE__ */ React26.createElement(AntDesign$1, { name: "close", size: ms(18), color: colors.foregroundMuted })
|
|
2316
|
+
) : null), effectiveSubtitle ? /* @__PURE__ */ React26.createElement(Text, { style: [styles22.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, effectiveSubtitle) : null) : null;
|
|
2263
2317
|
const useScroll = scrollable || !!maxHeight;
|
|
2264
|
-
const
|
|
2265
|
-
|
|
2266
|
-
const behavior = keyboardBehavior ?? Platform.select({ ios: "padding", android: "height" });
|
|
2267
|
-
return /* @__PURE__ */ React26.createElement(KeyboardAvoidingView, { behavior, keyboardVerticalOffset: keyboardOffset }, node);
|
|
2268
|
-
};
|
|
2318
|
+
const effectiveMaxHeight = maxHeight ?? DEFAULT_MAX_HEIGHT;
|
|
2319
|
+
const useDynamicSizing = !snapPoints;
|
|
2269
2320
|
return /* @__PURE__ */ React26.createElement(
|
|
2270
2321
|
BottomSheetModal,
|
|
2271
2322
|
{
|
|
2272
2323
|
ref,
|
|
2273
|
-
enableDynamicSizing:
|
|
2324
|
+
enableDynamicSizing: useDynamicSizing,
|
|
2325
|
+
snapPoints,
|
|
2326
|
+
maxDynamicContentSize: useDynamicSizing ? effectiveMaxHeight : void 0,
|
|
2274
2327
|
onDismiss: onClose,
|
|
2275
2328
|
backdropComponent: renderBackdrop,
|
|
2329
|
+
footerComponent: footer ? renderFooter : void 0,
|
|
2276
2330
|
backgroundStyle: [styles22.background, { backgroundColor: colors.card }],
|
|
2277
2331
|
handleIndicatorStyle: [styles22.handle, { backgroundColor: colors.border }],
|
|
2278
|
-
enablePanDownToClose: true
|
|
2332
|
+
enablePanDownToClose: true,
|
|
2333
|
+
topInset: insets.top,
|
|
2334
|
+
keyboardBehavior: effectiveKeyboardBehavior,
|
|
2335
|
+
keyboardBlurBehavior,
|
|
2336
|
+
android_keyboardInputMode,
|
|
2337
|
+
enableBlurKeyboardOnGesture
|
|
2279
2338
|
},
|
|
2280
|
-
|
|
2339
|
+
useScroll ? /* @__PURE__ */ React26.createElement(
|
|
2340
|
+
BottomSheetScrollView,
|
|
2341
|
+
{
|
|
2342
|
+
contentContainerStyle: [
|
|
2343
|
+
styles22.scrollContent,
|
|
2344
|
+
style
|
|
2345
|
+
],
|
|
2346
|
+
style: contentStyle,
|
|
2347
|
+
showsVerticalScrollIndicator: true,
|
|
2348
|
+
indicatorStyle: "black",
|
|
2349
|
+
persistentScrollbar: isAndroid
|
|
2350
|
+
},
|
|
2351
|
+
headerNode,
|
|
2352
|
+
children
|
|
2353
|
+
) : /* @__PURE__ */ React26.createElement(BottomSheetView, { style: [styles22.content, contentStyle, style] }, headerNode, children)
|
|
2281
2354
|
);
|
|
2282
2355
|
}
|
|
2283
2356
|
var styles22 = StyleSheet.create({
|
|
@@ -2290,26 +2363,43 @@ var styles22 = StyleSheet.create({
|
|
|
2290
2363
|
height: vs(4),
|
|
2291
2364
|
borderRadius: ms(2)
|
|
2292
2365
|
},
|
|
2293
|
-
content: {
|
|
2294
|
-
paddingHorizontal: s(24),
|
|
2295
|
-
paddingBottom: vs(32)
|
|
2296
|
-
},
|
|
2297
2366
|
header: {
|
|
2298
|
-
|
|
2299
|
-
|
|
2367
|
+
paddingHorizontal: s(16),
|
|
2368
|
+
paddingTop: vs(4),
|
|
2369
|
+
paddingBottom: vs(12),
|
|
2370
|
+
gap: vs(4)
|
|
2371
|
+
},
|
|
2372
|
+
headerRow: {
|
|
2373
|
+
flexDirection: "row",
|
|
2374
|
+
alignItems: "center",
|
|
2375
|
+
justifyContent: "space-between"
|
|
2300
2376
|
},
|
|
2301
2377
|
title: {
|
|
2302
2378
|
fontFamily: "Poppins-SemiBold",
|
|
2303
|
-
fontSize: ms(18)
|
|
2379
|
+
fontSize: ms(18),
|
|
2380
|
+
flex: 1
|
|
2304
2381
|
},
|
|
2305
|
-
|
|
2382
|
+
subtitle: {
|
|
2306
2383
|
fontFamily: "Poppins-Regular",
|
|
2307
2384
|
fontSize: ms(14),
|
|
2308
2385
|
lineHeight: mvs(20)
|
|
2386
|
+
},
|
|
2387
|
+
closeButton: {
|
|
2388
|
+
padding: s(4),
|
|
2389
|
+
marginLeft: s(8)
|
|
2390
|
+
},
|
|
2391
|
+
content: {
|
|
2392
|
+
paddingHorizontal: s(16),
|
|
2393
|
+
paddingBottom: vs(32)
|
|
2394
|
+
},
|
|
2395
|
+
scrollContent: {
|
|
2396
|
+
paddingHorizontal: s(16),
|
|
2397
|
+
paddingBottom: vs(32),
|
|
2398
|
+
paddingRight: s(16)
|
|
2309
2399
|
}
|
|
2310
2400
|
});
|
|
2311
2401
|
var isIOS = Platform.OS === "ios";
|
|
2312
|
-
var
|
|
2402
|
+
var isAndroid2 = Platform.OS === "android";
|
|
2313
2403
|
var isWeb2 = Platform.OS === "web";
|
|
2314
2404
|
var nativeDriver9 = Platform.OS !== "web";
|
|
2315
2405
|
function Select({
|
|
@@ -2341,7 +2431,7 @@ function Select({
|
|
|
2341
2431
|
if (isIOS) {
|
|
2342
2432
|
setPendingValue(value);
|
|
2343
2433
|
setPickerVisible(true);
|
|
2344
|
-
} else if (
|
|
2434
|
+
} else if (isAndroid2) {
|
|
2345
2435
|
pickerRef.current?.focus();
|
|
2346
2436
|
}
|
|
2347
2437
|
};
|
|
@@ -2383,7 +2473,7 @@ function Select({
|
|
|
2383
2473
|
},
|
|
2384
2474
|
selected?.label ?? placeholder
|
|
2385
2475
|
),
|
|
2386
|
-
/* @__PURE__ */ React26.createElement(Entypo$1, { name: "chevron-
|
|
2476
|
+
/* @__PURE__ */ React26.createElement(Entypo$1, { name: "chevron-down", size: 20, color: colors.foregroundMuted })
|
|
2387
2477
|
)) : null, isIOS ? /* @__PURE__ */ React26.createElement(
|
|
2388
2478
|
Modal,
|
|
2389
2479
|
{
|
|
@@ -2412,7 +2502,7 @@ function Select({
|
|
|
2412
2502
|
}
|
|
2413
2503
|
))
|
|
2414
2504
|
))
|
|
2415
|
-
) : null,
|
|
2505
|
+
) : null, isAndroid2 ? /* @__PURE__ */ React26.createElement(
|
|
2416
2506
|
Picker,
|
|
2417
2507
|
{
|
|
2418
2508
|
ref: pickerRef,
|
|
@@ -2540,172 +2630,46 @@ var styles23 = StyleSheet.create({
|
|
|
2540
2630
|
fontSize: ms(15)
|
|
2541
2631
|
}
|
|
2542
2632
|
});
|
|
2543
|
-
var ToastContext = createContext({
|
|
2544
|
-
toast: () => {
|
|
2545
|
-
},
|
|
2546
|
-
dismiss: () => {
|
|
2547
|
-
}
|
|
2548
|
-
});
|
|
2549
2633
|
function useToast() {
|
|
2550
|
-
return
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
function ToastNotification({ item, onDismiss }) {
|
|
2555
|
-
const { colors } = useTheme();
|
|
2556
|
-
const translateY = useSharedValue(-80);
|
|
2557
|
-
const translateX = useSharedValue(0);
|
|
2558
|
-
const opacity = useSharedValue(0);
|
|
2559
|
-
useEffect(() => {
|
|
2560
|
-
translateY.value = withTiming(0, { duration: 120, easing: Easing$1.out(Easing$1.exp) });
|
|
2561
|
-
opacity.value = withTiming(1, { duration: 100 });
|
|
2562
|
-
const timer = setTimeout(() => {
|
|
2563
|
-
translateY.value = withTiming(-80, { duration: 200 });
|
|
2564
|
-
opacity.value = withTiming(0, { duration: 200 }, (done) => {
|
|
2565
|
-
if (done) scheduleOnRN(onDismiss);
|
|
2566
|
-
});
|
|
2567
|
-
}, item.duration ?? 3e3);
|
|
2568
|
-
return () => clearTimeout(timer);
|
|
2569
|
-
}, []);
|
|
2570
|
-
const panGesture = Gesture.Pan().onUpdate((e) => {
|
|
2571
|
-
translateX.value = e.translationX;
|
|
2572
|
-
}).onEnd((e) => {
|
|
2573
|
-
const shouldDismiss = Math.abs(translateX.value) > SWIPE_THRESHOLD || Math.abs(e.velocityX) > VELOCITY_THRESHOLD;
|
|
2574
|
-
if (shouldDismiss) {
|
|
2575
|
-
const direction = translateX.value > 0 ? 1 : -1;
|
|
2576
|
-
translateX.value = withTiming(direction * 500, { duration: 200 }, (done) => {
|
|
2577
|
-
if (done) scheduleOnRN(onDismiss);
|
|
2578
|
-
});
|
|
2579
|
-
opacity.value = withTiming(0, { duration: 150 });
|
|
2580
|
-
} else {
|
|
2581
|
-
translateX.value = withSpring(0, { damping: 20, stiffness: 300 });
|
|
2582
|
-
}
|
|
2583
|
-
});
|
|
2584
|
-
const animatedStyle = useAnimatedStyle(() => ({
|
|
2585
|
-
opacity: opacity.value,
|
|
2586
|
-
transform: [{ translateY: translateY.value }, { translateX: translateX.value }]
|
|
2587
|
-
}));
|
|
2588
|
-
const variant = item.variant ?? "default";
|
|
2589
|
-
const bgColor = {
|
|
2590
|
-
default: colors.card,
|
|
2591
|
-
destructive: colors.destructiveTint,
|
|
2592
|
-
success: colors.successTint,
|
|
2593
|
-
warning: colors.warningTint
|
|
2594
|
-
}[variant];
|
|
2595
|
-
const borderColor = {
|
|
2596
|
-
default: colors.border,
|
|
2597
|
-
destructive: colors.destructiveBorder,
|
|
2598
|
-
success: colors.successBorder,
|
|
2599
|
-
warning: colors.warningBorder
|
|
2600
|
-
}[variant];
|
|
2601
|
-
const accentColor = {
|
|
2602
|
-
default: colors.primary,
|
|
2603
|
-
destructive: colors.destructive,
|
|
2604
|
-
success: colors.success,
|
|
2605
|
-
warning: colors.warning
|
|
2606
|
-
}[variant];
|
|
2607
|
-
const titleColor = variant === "default" ? colors.foreground : accentColor;
|
|
2608
|
-
const descColor = variant === "default" ? colors.foregroundMuted : accentColor;
|
|
2609
|
-
const defaultIcon = variant === "success" ? /* @__PURE__ */ React26.createElement(FontAwesome5$1, { name: "check-circle", size: 16, color: accentColor }) : variant === "destructive" ? /* @__PURE__ */ React26.createElement(AntDesign$1, { name: "exclamation-circle", size: 16, color: accentColor }) : variant === "warning" ? /* @__PURE__ */ React26.createElement(MaterialIcons$1, { name: "warning-amber", size: 17, color: accentColor }) : /* @__PURE__ */ React26.createElement(Entypo$1, { name: "info-with-circle", size: 16, color: accentColor });
|
|
2610
|
-
const leftIcon = item.iconName ? renderIcon(item.iconName, 16, item.iconColor ?? accentColor) : item.icon ?? defaultIcon;
|
|
2611
|
-
return /* @__PURE__ */ React26.createElement(GestureDetector, { gesture: panGesture }, /* @__PURE__ */ React26.createElement(Animated11.View, { style: [styles24.toast, { backgroundColor: bgColor, borderColor }, animatedStyle] }, /* @__PURE__ */ React26.createElement(View, { style: styles24.leftIconContainer }, leftIcon), /* @__PURE__ */ React26.createElement(View, { style: styles24.toastContent }, item.title ? /* @__PURE__ */ React26.createElement(Text, { style: [styles24.toastTitle, { color: titleColor }], allowFontScaling: true }, item.title) : null, item.description ? /* @__PURE__ */ React26.createElement(Text, { style: [styles24.toastDescription, { color: descColor }], allowFontScaling: true }, item.description) : null), item.action && /* @__PURE__ */ React26.createElement(
|
|
2612
|
-
TouchableOpacity,
|
|
2613
|
-
{
|
|
2614
|
-
onPress: () => {
|
|
2615
|
-
item.action.onPress();
|
|
2616
|
-
onDismiss();
|
|
2617
|
-
},
|
|
2618
|
-
style: styles24.actionButton,
|
|
2619
|
-
touchSoundDisabled: true
|
|
2620
|
-
},
|
|
2621
|
-
/* @__PURE__ */ React26.createElement(Text, { style: [styles24.actionLabel, { color: accentColor }], allowFontScaling: true }, item.action.label)
|
|
2622
|
-
), /* @__PURE__ */ React26.createElement(TouchableOpacity, { onPress: onDismiss, style: styles24.dismissButton, touchSoundDisabled: true }, /* @__PURE__ */ React26.createElement(AntDesign$1, { name: "close-circle", size: 16, color: descColor }))));
|
|
2634
|
+
return {
|
|
2635
|
+
toast: toast,
|
|
2636
|
+
dismiss: toast.dismiss
|
|
2637
|
+
};
|
|
2623
2638
|
}
|
|
2624
2639
|
function ToastProvider({ children }) {
|
|
2625
|
-
const
|
|
2640
|
+
const { colorScheme } = useTheme();
|
|
2626
2641
|
const insets = useSafeAreaInsets();
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2642
|
+
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, children, /* @__PURE__ */ React26.createElement(
|
|
2643
|
+
Toaster,
|
|
2644
|
+
{
|
|
2645
|
+
theme: colorScheme,
|
|
2646
|
+
position: "top-center",
|
|
2647
|
+
richColors: false,
|
|
2648
|
+
gap: vs(8),
|
|
2649
|
+
offset: insets.top + vs(8),
|
|
2650
|
+
visibleToasts: 3,
|
|
2651
|
+
closeButton: false,
|
|
2652
|
+
swipeToDismissDirection: "up",
|
|
2653
|
+
duration: 4e3,
|
|
2654
|
+
toastOptions: {
|
|
2655
|
+
style: {
|
|
2656
|
+
borderRadius: ms(12),
|
|
2657
|
+
paddingHorizontal: s(12),
|
|
2658
|
+
paddingVertical: vs(10)
|
|
2659
|
+
},
|
|
2660
|
+
titleStyle: {
|
|
2661
|
+
fontFamily: "Poppins-Medium",
|
|
2662
|
+
fontSize: ms(13)
|
|
2663
|
+
},
|
|
2664
|
+
descriptionStyle: {
|
|
2665
|
+
fontFamily: "Poppins-Regular",
|
|
2666
|
+
fontSize: ms(12),
|
|
2667
|
+
opacity: 0.85
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2637
2670
|
}
|
|
2638
|
-
|
|
2639
|
-
}, []);
|
|
2640
|
-
const dismiss = useCallback((id) => {
|
|
2641
|
-
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
2642
|
-
}, []);
|
|
2643
|
-
return /* @__PURE__ */ React26.createElement(ToastContext.Provider, { value: { toast, dismiss } }, children, /* @__PURE__ */ React26.createElement(View, { style: [styles24.container, Platform.OS === "web" && styles24.containerWeb, { top: insets.top + 8 }], pointerEvents: "box-none" }, toasts.map((item) => /* @__PURE__ */ React26.createElement(ToastNotification, { key: item.id, item, onDismiss: () => dismiss(item.id) }))));
|
|
2671
|
+
));
|
|
2644
2672
|
}
|
|
2645
|
-
var styles24 = StyleSheet.create({
|
|
2646
|
-
container: {
|
|
2647
|
-
position: "absolute",
|
|
2648
|
-
left: s(16),
|
|
2649
|
-
right: s(16),
|
|
2650
|
-
gap: vs(8),
|
|
2651
|
-
zIndex: 9999
|
|
2652
|
-
},
|
|
2653
|
-
containerWeb: {
|
|
2654
|
-
left: void 0,
|
|
2655
|
-
right: void 0,
|
|
2656
|
-
alignSelf: "center",
|
|
2657
|
-
width: s(400)
|
|
2658
|
-
},
|
|
2659
|
-
toast: {
|
|
2660
|
-
flexDirection: "row",
|
|
2661
|
-
alignItems: "flex-start",
|
|
2662
|
-
borderRadius: ms(10),
|
|
2663
|
-
borderWidth: 0.5,
|
|
2664
|
-
paddingHorizontal: s(12),
|
|
2665
|
-
paddingVertical: vs(10),
|
|
2666
|
-
shadowColor: "#000",
|
|
2667
|
-
shadowOffset: { width: 0, height: 2 },
|
|
2668
|
-
shadowOpacity: 0.06,
|
|
2669
|
-
shadowRadius: 4,
|
|
2670
|
-
elevation: 3
|
|
2671
|
-
},
|
|
2672
|
-
toastContent: {
|
|
2673
|
-
flex: 1,
|
|
2674
|
-
gap: vs(2)
|
|
2675
|
-
},
|
|
2676
|
-
leftIconContainer: {
|
|
2677
|
-
marginTop: vs(1),
|
|
2678
|
-
alignItems: "center",
|
|
2679
|
-
justifyContent: "center",
|
|
2680
|
-
marginRight: s(10)
|
|
2681
|
-
},
|
|
2682
|
-
toastTitle: {
|
|
2683
|
-
fontFamily: "Poppins-Medium",
|
|
2684
|
-
fontSize: ms(13),
|
|
2685
|
-
lineHeight: ms(18)
|
|
2686
|
-
},
|
|
2687
|
-
toastDescription: {
|
|
2688
|
-
fontFamily: "Poppins-Regular",
|
|
2689
|
-
fontSize: ms(12),
|
|
2690
|
-
lineHeight: ms(17),
|
|
2691
|
-
opacity: 0.85
|
|
2692
|
-
},
|
|
2693
|
-
actionButton: {
|
|
2694
|
-
paddingHorizontal: s(8),
|
|
2695
|
-
paddingVertical: vs(4),
|
|
2696
|
-
marginLeft: s(4)
|
|
2697
|
-
},
|
|
2698
|
-
actionLabel: {
|
|
2699
|
-
fontFamily: "Poppins-Medium",
|
|
2700
|
-
fontSize: ms(12),
|
|
2701
|
-
textDecorationLine: "underline"
|
|
2702
|
-
},
|
|
2703
|
-
dismissButton: {
|
|
2704
|
-
padding: s(6),
|
|
2705
|
-
marginLeft: s(2),
|
|
2706
|
-
marginTop: vs(0)
|
|
2707
|
-
}
|
|
2708
|
-
});
|
|
2709
2673
|
function formatCurrency(raw, separator) {
|
|
2710
2674
|
const digits = raw.replace(/\D/g, "");
|
|
2711
2675
|
if (!digits) return "";
|
|
@@ -2763,6 +2727,12 @@ var variantFontSize = {
|
|
|
2763
2727
|
medium: ms(18),
|
|
2764
2728
|
small: ms(14)
|
|
2765
2729
|
};
|
|
2730
|
+
var variantLetterSpacing = {
|
|
2731
|
+
hero: -2,
|
|
2732
|
+
large: -1,
|
|
2733
|
+
medium: -0.5,
|
|
2734
|
+
small: 0
|
|
2735
|
+
};
|
|
2766
2736
|
function formatValue(value, prefix, showDecimals) {
|
|
2767
2737
|
const num = typeof value === "string" ? parseFloat(value.replace(/[^0-9.-]/g, "")) : value;
|
|
2768
2738
|
if (isNaN(num)) return `${prefix}0`;
|
|
@@ -2780,10 +2750,11 @@ function CurrencyDisplay({ value, prefix = "$", showDecimals = false, textColor,
|
|
|
2780
2750
|
const formatted = formatValue(value, prefix, showDecimals);
|
|
2781
2751
|
const baseFontSize = variant ? variantFontSize[variant] : ms(56);
|
|
2782
2752
|
const fontSize = maxFontSize ?? baseFontSize;
|
|
2783
|
-
|
|
2753
|
+
const letterSpacing = variant ? variantLetterSpacing[variant] : -2;
|
|
2754
|
+
return /* @__PURE__ */ React26.createElement(View, { style: [styles24.container, style] }, /* @__PURE__ */ React26.createElement(
|
|
2784
2755
|
Text,
|
|
2785
2756
|
{
|
|
2786
|
-
style: [
|
|
2757
|
+
style: [styles24.amount, { color: textColor ?? colors.foreground, fontSize, letterSpacing }],
|
|
2787
2758
|
allowFontScaling: true,
|
|
2788
2759
|
numberOfLines: autoScale ? 1 : void 0,
|
|
2789
2760
|
adjustsFontSizeToFit: autoScale,
|
|
@@ -2792,11 +2763,14 @@ function CurrencyDisplay({ value, prefix = "$", showDecimals = false, textColor,
|
|
|
2792
2763
|
formatted
|
|
2793
2764
|
));
|
|
2794
2765
|
}
|
|
2795
|
-
var
|
|
2796
|
-
container: {
|
|
2766
|
+
var styles24 = StyleSheet.create({
|
|
2767
|
+
container: {
|
|
2768
|
+
alignSelf: "flex-start"
|
|
2769
|
+
},
|
|
2797
2770
|
amount: {
|
|
2798
2771
|
fontFamily: "Poppins-Bold",
|
|
2799
|
-
|
|
2772
|
+
includeFontPadding: false,
|
|
2773
|
+
textAlignVertical: "top"
|
|
2800
2774
|
}
|
|
2801
2775
|
});
|
|
2802
2776
|
var nativeDriver10 = Platform.OS !== "web";
|
|
@@ -2829,16 +2803,18 @@ function ListItem({
|
|
|
2829
2803
|
Animated.spring(scale2, {
|
|
2830
2804
|
toValue: 0.97,
|
|
2831
2805
|
useNativeDriver: nativeDriver10,
|
|
2832
|
-
|
|
2833
|
-
|
|
2806
|
+
stiffness: 350,
|
|
2807
|
+
damping: 28,
|
|
2808
|
+
mass: 0.9
|
|
2834
2809
|
}).start();
|
|
2835
2810
|
};
|
|
2836
2811
|
const handlePressOut = () => {
|
|
2837
2812
|
Animated.spring(scale2, {
|
|
2838
2813
|
toValue: 1,
|
|
2839
2814
|
useNativeDriver: nativeDriver10,
|
|
2840
|
-
|
|
2841
|
-
|
|
2815
|
+
stiffness: 220,
|
|
2816
|
+
damping: 20,
|
|
2817
|
+
mass: 0.9
|
|
2842
2818
|
}).start();
|
|
2843
2819
|
};
|
|
2844
2820
|
const handlePress = () => {
|
|
@@ -2849,7 +2825,7 @@ function ListItem({
|
|
|
2849
2825
|
const effectiveRight = rightIcon ? renderIcon(rightIcon, 24, rightIconColor ?? colors.foregroundMuted) : rightRender ?? trailing;
|
|
2850
2826
|
const cardStyle = variant === "card" ? {
|
|
2851
2827
|
backgroundColor: colors.card,
|
|
2852
|
-
borderRadius:
|
|
2828
|
+
borderRadius: RADIUS.md,
|
|
2853
2829
|
borderWidth: 1,
|
|
2854
2830
|
borderColor: colors.border,
|
|
2855
2831
|
shadowColor: "#000",
|
|
@@ -2858,10 +2834,10 @@ function ListItem({
|
|
|
2858
2834
|
shadowRadius: 6,
|
|
2859
2835
|
elevation: 2
|
|
2860
2836
|
} : {};
|
|
2861
|
-
return /* @__PURE__ */ React26.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled &&
|
|
2837
|
+
return /* @__PURE__ */ React26.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles25.disabled] }, /* @__PURE__ */ React26.createElement(
|
|
2862
2838
|
TouchableOpacity,
|
|
2863
2839
|
{
|
|
2864
|
-
style: [
|
|
2840
|
+
style: [styles25.container, cardStyle, style],
|
|
2865
2841
|
onPress: onPress ? handlePress : void 0,
|
|
2866
2842
|
onPressIn: handlePressIn,
|
|
2867
2843
|
onPressOut: handlePressOut,
|
|
@@ -2869,11 +2845,11 @@ function ListItem({
|
|
|
2869
2845
|
activeOpacity: 1,
|
|
2870
2846
|
touchSoundDisabled: true
|
|
2871
2847
|
},
|
|
2872
|
-
effectiveLeft ? /* @__PURE__ */ React26.createElement(View, { style:
|
|
2873
|
-
/* @__PURE__ */ React26.createElement(View, { style:
|
|
2848
|
+
effectiveLeft ? /* @__PURE__ */ React26.createElement(View, { style: styles25.leftContainer }, effectiveLeft) : null,
|
|
2849
|
+
/* @__PURE__ */ React26.createElement(View, { style: styles25.content }, /* @__PURE__ */ React26.createElement(
|
|
2874
2850
|
Text,
|
|
2875
2851
|
{
|
|
2876
|
-
style: [
|
|
2852
|
+
style: [styles25.title, { color: colors.foreground }, titleStyle],
|
|
2877
2853
|
numberOfLines: 2,
|
|
2878
2854
|
allowFontScaling: true
|
|
2879
2855
|
},
|
|
@@ -2881,7 +2857,7 @@ function ListItem({
|
|
|
2881
2857
|
), subtitle ? /* @__PURE__ */ React26.createElement(
|
|
2882
2858
|
Text,
|
|
2883
2859
|
{
|
|
2884
|
-
style: [
|
|
2860
|
+
style: [styles25.subtitle, { color: colors.foregroundMuted }, subtitleStyle],
|
|
2885
2861
|
numberOfLines: 2,
|
|
2886
2862
|
allowFontScaling: true
|
|
2887
2863
|
},
|
|
@@ -2889,16 +2865,16 @@ function ListItem({
|
|
|
2889
2865
|
) : null, caption ? /* @__PURE__ */ React26.createElement(
|
|
2890
2866
|
Text,
|
|
2891
2867
|
{
|
|
2892
|
-
style: [
|
|
2868
|
+
style: [styles25.caption, { color: colors.foregroundMuted }, captionStyle],
|
|
2893
2869
|
numberOfLines: 1,
|
|
2894
2870
|
allowFontScaling: true
|
|
2895
2871
|
},
|
|
2896
2872
|
caption
|
|
2897
2873
|
) : null),
|
|
2898
|
-
effectiveRight !== void 0 ? /* @__PURE__ */ React26.createElement(View, { style:
|
|
2874
|
+
effectiveRight !== void 0 ? /* @__PURE__ */ React26.createElement(View, { style: styles25.rightContainer }, typeof effectiveRight === "string" ? /* @__PURE__ */ React26.createElement(
|
|
2899
2875
|
Text,
|
|
2900
2876
|
{
|
|
2901
|
-
style: [
|
|
2877
|
+
style: [styles25.rightText, { color: colors.foregroundMuted }],
|
|
2902
2878
|
allowFontScaling: true
|
|
2903
2879
|
},
|
|
2904
2880
|
effectiveRight
|
|
@@ -2907,17 +2883,20 @@ function ListItem({
|
|
|
2907
2883
|
View,
|
|
2908
2884
|
{
|
|
2909
2885
|
style: [
|
|
2910
|
-
|
|
2911
|
-
{
|
|
2886
|
+
styles25.separator,
|
|
2887
|
+
{
|
|
2888
|
+
backgroundColor: colors.border,
|
|
2889
|
+
marginLeft: effectiveLeft ? s(44) + s(12) : 0
|
|
2890
|
+
}
|
|
2912
2891
|
]
|
|
2913
2892
|
}
|
|
2914
2893
|
) : null);
|
|
2915
2894
|
}
|
|
2916
|
-
var
|
|
2895
|
+
var styles25 = StyleSheet.create({
|
|
2917
2896
|
container: {
|
|
2918
2897
|
flexDirection: "row",
|
|
2919
2898
|
alignItems: "center",
|
|
2920
|
-
paddingHorizontal:
|
|
2899
|
+
paddingHorizontal: 0,
|
|
2921
2900
|
paddingVertical: vs(10),
|
|
2922
2901
|
gap: s(12)
|
|
2923
2902
|
},
|
|
@@ -2963,13 +2942,143 @@ var styles26 = StyleSheet.create({
|
|
|
2963
2942
|
},
|
|
2964
2943
|
separator: {
|
|
2965
2944
|
height: StyleSheet.hairlineWidth,
|
|
2966
|
-
marginRight:
|
|
2945
|
+
marginRight: 0
|
|
2967
2946
|
},
|
|
2968
2947
|
disabled: {
|
|
2969
2948
|
opacity: 0.45
|
|
2970
2949
|
}
|
|
2971
2950
|
});
|
|
2972
2951
|
var nativeDriver11 = Platform.OS !== "web";
|
|
2952
|
+
function MenuItem({
|
|
2953
|
+
label,
|
|
2954
|
+
iconName,
|
|
2955
|
+
icon,
|
|
2956
|
+
iconColor,
|
|
2957
|
+
rightRender,
|
|
2958
|
+
showChevron = true,
|
|
2959
|
+
onPress,
|
|
2960
|
+
disabled = false,
|
|
2961
|
+
variant = "plain",
|
|
2962
|
+
showSeparator = false,
|
|
2963
|
+
style,
|
|
2964
|
+
labelStyle
|
|
2965
|
+
}) {
|
|
2966
|
+
const { colors } = useTheme();
|
|
2967
|
+
const scale2 = useRef(new Animated.Value(1)).current;
|
|
2968
|
+
const handlePressIn = () => {
|
|
2969
|
+
if (disabled) return;
|
|
2970
|
+
Animated.spring(scale2, {
|
|
2971
|
+
toValue: 0.97,
|
|
2972
|
+
useNativeDriver: nativeDriver11,
|
|
2973
|
+
stiffness: 350,
|
|
2974
|
+
damping: 28,
|
|
2975
|
+
mass: 0.9
|
|
2976
|
+
}).start();
|
|
2977
|
+
};
|
|
2978
|
+
const handlePressOut = () => {
|
|
2979
|
+
Animated.spring(scale2, {
|
|
2980
|
+
toValue: 1,
|
|
2981
|
+
useNativeDriver: nativeDriver11,
|
|
2982
|
+
stiffness: 220,
|
|
2983
|
+
damping: 20,
|
|
2984
|
+
mass: 0.9
|
|
2985
|
+
}).start();
|
|
2986
|
+
};
|
|
2987
|
+
const handlePress = () => {
|
|
2988
|
+
selectionAsync();
|
|
2989
|
+
onPress();
|
|
2990
|
+
};
|
|
2991
|
+
const resolvedIcon = iconName ? renderIcon(iconName, 22, iconColor ?? colors.foreground) : icon;
|
|
2992
|
+
const cardStyle = variant === "card" ? {
|
|
2993
|
+
backgroundColor: colors.card,
|
|
2994
|
+
borderRadius: RADIUS.md,
|
|
2995
|
+
borderWidth: 1,
|
|
2996
|
+
borderColor: colors.border,
|
|
2997
|
+
shadowColor: "#000",
|
|
2998
|
+
shadowOffset: { width: 0, height: 2 },
|
|
2999
|
+
shadowOpacity: 0.06,
|
|
3000
|
+
shadowRadius: 6,
|
|
3001
|
+
elevation: 2
|
|
3002
|
+
} : {};
|
|
3003
|
+
return /* @__PURE__ */ React26.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles26.disabled] }, /* @__PURE__ */ React26.createElement(
|
|
3004
|
+
TouchableOpacity,
|
|
3005
|
+
{
|
|
3006
|
+
style: [styles26.container, cardStyle, style],
|
|
3007
|
+
onPress: handlePress,
|
|
3008
|
+
onPressIn: handlePressIn,
|
|
3009
|
+
onPressOut: handlePressOut,
|
|
3010
|
+
disabled,
|
|
3011
|
+
activeOpacity: 1,
|
|
3012
|
+
touchSoundDisabled: true
|
|
3013
|
+
},
|
|
3014
|
+
resolvedIcon ? /* @__PURE__ */ React26.createElement(View, { style: styles26.iconContainer }, resolvedIcon) : null,
|
|
3015
|
+
/* @__PURE__ */ React26.createElement(
|
|
3016
|
+
Text,
|
|
3017
|
+
{
|
|
3018
|
+
style: [styles26.label, { color: colors.foreground }, labelStyle],
|
|
3019
|
+
numberOfLines: 1,
|
|
3020
|
+
allowFontScaling: true
|
|
3021
|
+
},
|
|
3022
|
+
label
|
|
3023
|
+
),
|
|
3024
|
+
rightRender !== void 0 ? /* @__PURE__ */ React26.createElement(
|
|
3025
|
+
View,
|
|
3026
|
+
{
|
|
3027
|
+
style: styles26.rightContainer,
|
|
3028
|
+
onStartShouldSetResponder: () => true,
|
|
3029
|
+
onResponderRelease: () => {
|
|
3030
|
+
}
|
|
3031
|
+
},
|
|
3032
|
+
rightRender
|
|
3033
|
+
) : showChevron ? /* @__PURE__ */ React26.createElement(Entypo$1, { name: "chevron-right", size: 18, color: colors.foregroundMuted }) : null
|
|
3034
|
+
), showSeparator ? /* @__PURE__ */ React26.createElement(
|
|
3035
|
+
View,
|
|
3036
|
+
{
|
|
3037
|
+
style: [
|
|
3038
|
+
styles26.separator,
|
|
3039
|
+
{
|
|
3040
|
+
backgroundColor: colors.border,
|
|
3041
|
+
marginLeft: resolvedIcon ? s(22) + s(12) : 0,
|
|
3042
|
+
opacity: 0.6
|
|
3043
|
+
}
|
|
3044
|
+
]
|
|
3045
|
+
}
|
|
3046
|
+
) : null);
|
|
3047
|
+
}
|
|
3048
|
+
var styles26 = StyleSheet.create({
|
|
3049
|
+
container: {
|
|
3050
|
+
flexDirection: "row",
|
|
3051
|
+
alignItems: "center",
|
|
3052
|
+
paddingHorizontal: 0,
|
|
3053
|
+
paddingVertical: vs(16),
|
|
3054
|
+
minHeight: vs(54),
|
|
3055
|
+
gap: s(12)
|
|
3056
|
+
},
|
|
3057
|
+
iconContainer: {
|
|
3058
|
+
width: s(22),
|
|
3059
|
+
alignItems: "center",
|
|
3060
|
+
justifyContent: "center",
|
|
3061
|
+
flexShrink: 0
|
|
3062
|
+
},
|
|
3063
|
+
label: {
|
|
3064
|
+
fontFamily: "Poppins-Medium",
|
|
3065
|
+
fontSize: ms(15),
|
|
3066
|
+
flex: 1
|
|
3067
|
+
},
|
|
3068
|
+
rightContainer: {
|
|
3069
|
+
alignItems: "flex-end",
|
|
3070
|
+
justifyContent: "center",
|
|
3071
|
+
flexShrink: 0
|
|
3072
|
+
},
|
|
3073
|
+
separator: {
|
|
3074
|
+
height: StyleSheet.hairlineWidth,
|
|
3075
|
+
marginRight: 0
|
|
3076
|
+
},
|
|
3077
|
+
disabled: {
|
|
3078
|
+
opacity: 0.45
|
|
3079
|
+
}
|
|
3080
|
+
});
|
|
3081
|
+
var nativeDriver12 = Platform.OS !== "web";
|
|
2973
3082
|
function Chip({ label, selected = false, onPress, icon, iconName, style }) {
|
|
2974
3083
|
const { colors } = useTheme();
|
|
2975
3084
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
@@ -2978,14 +3087,14 @@ function Chip({ label, selected = false, onPress, icon, iconName, style }) {
|
|
|
2978
3087
|
Animated.timing(pressAnim, {
|
|
2979
3088
|
toValue: selected ? 1 : 0,
|
|
2980
3089
|
duration: 150,
|
|
2981
|
-
easing: Easing.out(Easing.ease),
|
|
3090
|
+
easing: Easing$1.out(Easing$1.ease),
|
|
2982
3091
|
useNativeDriver: false
|
|
2983
3092
|
}).start();
|
|
2984
3093
|
}, [selected, pressAnim]);
|
|
2985
3094
|
const handlePressIn = () => {
|
|
2986
3095
|
Animated.spring(scale2, {
|
|
2987
3096
|
toValue: 0.95,
|
|
2988
|
-
useNativeDriver:
|
|
3097
|
+
useNativeDriver: nativeDriver12,
|
|
2989
3098
|
speed: 40,
|
|
2990
3099
|
bounciness: 0
|
|
2991
3100
|
}).start();
|
|
@@ -2993,7 +3102,7 @@ function Chip({ label, selected = false, onPress, icon, iconName, style }) {
|
|
|
2993
3102
|
const handlePressOut = () => {
|
|
2994
3103
|
Animated.spring(scale2, {
|
|
2995
3104
|
toValue: 1,
|
|
2996
|
-
useNativeDriver:
|
|
3105
|
+
useNativeDriver: nativeDriver12,
|
|
2997
3106
|
speed: 40,
|
|
2998
3107
|
bounciness: 4
|
|
2999
3108
|
}).start();
|
|
@@ -3102,7 +3211,7 @@ function ConfirmDialog({
|
|
|
3102
3211
|
const ref = useRef(null);
|
|
3103
3212
|
useEffect(() => {
|
|
3104
3213
|
if (visible) {
|
|
3105
|
-
|
|
3214
|
+
impactMedium();
|
|
3106
3215
|
ref.current?.present();
|
|
3107
3216
|
} else {
|
|
3108
3217
|
ref.current?.dismiss();
|
|
@@ -3134,7 +3243,10 @@ function ConfirmDialog({
|
|
|
3134
3243
|
label: confirmLabel,
|
|
3135
3244
|
variant: confirmVariant,
|
|
3136
3245
|
fullWidth: true,
|
|
3137
|
-
onPress:
|
|
3246
|
+
onPress: () => {
|
|
3247
|
+
notificationSuccess();
|
|
3248
|
+
onConfirm();
|
|
3249
|
+
},
|
|
3138
3250
|
icon: /* @__PURE__ */ React26.createElement(
|
|
3139
3251
|
Feather$1,
|
|
3140
3252
|
{
|
|
@@ -3150,7 +3262,10 @@ function ConfirmDialog({
|
|
|
3150
3262
|
label: cancelLabel,
|
|
3151
3263
|
variant: "secondary",
|
|
3152
3264
|
fullWidth: true,
|
|
3153
|
-
onPress:
|
|
3265
|
+
onPress: () => {
|
|
3266
|
+
selectionAsync();
|
|
3267
|
+
onCancel();
|
|
3268
|
+
},
|
|
3154
3269
|
icon: /* @__PURE__ */ React26.createElement(Feather$1, { name: "x", size: 15, color: colors.foreground })
|
|
3155
3270
|
}
|
|
3156
3271
|
)))
|
|
@@ -3299,7 +3414,7 @@ function useHover() {
|
|
|
3299
3414
|
}
|
|
3300
3415
|
|
|
3301
3416
|
// src/components/MediaCard/MediaCard.tsx
|
|
3302
|
-
var
|
|
3417
|
+
var nativeDriver13 = Platform.OS !== "web";
|
|
3303
3418
|
var aspectRatioMap = {
|
|
3304
3419
|
"1:1": 1,
|
|
3305
3420
|
"4:3": 3 / 4,
|
|
@@ -3328,11 +3443,11 @@ function MediaCard({
|
|
|
3328
3443
|
const { hovered, hoverHandlers } = useHover();
|
|
3329
3444
|
const handlePressIn = () => {
|
|
3330
3445
|
if (!onPress) return;
|
|
3331
|
-
Animated.spring(scale2, { toValue: 0.98, useNativeDriver:
|
|
3446
|
+
Animated.spring(scale2, { toValue: 0.98, useNativeDriver: nativeDriver13, speed: 40, bounciness: 0 }).start();
|
|
3332
3447
|
};
|
|
3333
3448
|
const handlePressOut = () => {
|
|
3334
3449
|
if (!onPress) return;
|
|
3335
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
3450
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver13, speed: 40, bounciness: 4 }).start();
|
|
3336
3451
|
};
|
|
3337
3452
|
const handlePress = () => {
|
|
3338
3453
|
if (!onPress) return;
|
|
@@ -3428,6 +3543,7 @@ var styles31 = StyleSheet.create({
|
|
|
3428
3543
|
},
|
|
3429
3544
|
meta: {
|
|
3430
3545
|
paddingTop: vs(8),
|
|
3546
|
+
paddingBottom: vs(4),
|
|
3431
3547
|
gap: vs(2)
|
|
3432
3548
|
},
|
|
3433
3549
|
title: {
|
|
@@ -3446,7 +3562,7 @@ var styles31 = StyleSheet.create({
|
|
|
3446
3562
|
lineHeight: mvs(16)
|
|
3447
3563
|
}
|
|
3448
3564
|
});
|
|
3449
|
-
var
|
|
3565
|
+
var nativeDriver14 = Platform.OS !== "web";
|
|
3450
3566
|
function CategoryChip({
|
|
3451
3567
|
item,
|
|
3452
3568
|
selected,
|
|
@@ -3455,10 +3571,10 @@ function CategoryChip({
|
|
|
3455
3571
|
const { colors } = useTheme();
|
|
3456
3572
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
3457
3573
|
const handlePressIn = () => {
|
|
3458
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
3574
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver14, speed: 40, bounciness: 0 }).start();
|
|
3459
3575
|
};
|
|
3460
3576
|
const handlePressOut = () => {
|
|
3461
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
3577
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver14, speed: 40, bounciness: 4 }).start();
|
|
3462
3578
|
};
|
|
3463
3579
|
const bgColor = selected ? colors.primary : colors.surface;
|
|
3464
3580
|
const textColor = selected ? colors.primaryForeground : colors.foregroundSubtle;
|
|
@@ -3563,7 +3679,7 @@ var styles32 = StyleSheet.create({
|
|
|
3563
3679
|
lineHeight: 14
|
|
3564
3680
|
}
|
|
3565
3681
|
});
|
|
3566
|
-
var
|
|
3682
|
+
var nativeDriver15 = Platform.OS !== "web";
|
|
3567
3683
|
function Pressable2({
|
|
3568
3684
|
children,
|
|
3569
3685
|
onPress,
|
|
@@ -3581,7 +3697,7 @@ function Pressable2({
|
|
|
3581
3697
|
if (disabled) return;
|
|
3582
3698
|
Animated.spring(scale2, {
|
|
3583
3699
|
toValue: pressScale,
|
|
3584
|
-
useNativeDriver:
|
|
3700
|
+
useNativeDriver: nativeDriver15,
|
|
3585
3701
|
speed: 40,
|
|
3586
3702
|
bounciness: 0
|
|
3587
3703
|
}).start();
|
|
@@ -3590,7 +3706,7 @@ function Pressable2({
|
|
|
3590
3706
|
if (disabled) return;
|
|
3591
3707
|
Animated.spring(scale2, {
|
|
3592
3708
|
toValue: 1,
|
|
3593
|
-
useNativeDriver:
|
|
3709
|
+
useNativeDriver: nativeDriver15,
|
|
3594
3710
|
speed: 40,
|
|
3595
3711
|
bounciness
|
|
3596
3712
|
}).start();
|
|
@@ -3723,4 +3839,4 @@ function getResponsiveFontSize(text, maxSize, steps = [
|
|
|
3723
3839
|
return maxSize - 8;
|
|
3724
3840
|
}
|
|
3725
3841
|
|
|
3726
|
-
export { Accordion, AlertBanner, Avatar, BREAKPOINTS, Badge, Button, ButtonGroup, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryStrip, Checkbox, Chip, ChipGroup, ConfirmDialog, CurrencyDisplay, CurrencyInput, CurrencyInput as CurrencyInputLarge, DetailRow, EmptyState, ICON_SIZES, Icon, IconButton, Input, LabelValue, ListItem, MediaCard, MonthPicker, Pressable2 as Pressable, Progress, RADIUS, RadioGroup, SHADOWS, SPACING, Select, Separator, Sheet, Skeleton, Slider, Spinner, Switch, TYPOGRAPHY, Tabs, TabsContent, Text3 as Text, Textarea, ThemeProvider, ToastProvider, Toggle, defaultDark, defaultLight, deriveColors, getResponsiveFontSize, renderIcon, useTheme, useToast };
|
|
3842
|
+
export { Accordion, AlertBanner, Avatar, BREAKPOINTS, Badge, Button, ButtonGroup, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryStrip, Checkbox, Chip, ChipGroup, ConfirmDialog, CurrencyDisplay, CurrencyInput, CurrencyInput as CurrencyInputLarge, DetailRow, EmptyState, ICON_SIZES, Icon, IconButton, Input, LabelValue, ListItem, MediaCard, MenuItem, MonthPicker, Pressable2 as Pressable, Progress, RADIUS, RadioGroup, SHADOWS, SPACING, Select, Separator, Sheet, Skeleton, Slider, Spinner, Switch, TYPOGRAPHY, Tabs, TabsContent, Text3 as Text, Textarea, ThemeProvider, ToastProvider, Toggle, defaultDark, defaultLight, deriveColors, getResponsiveFontSize, renderIcon, useTheme, useToast };
|