@retray-dev/ui-kit 2.7.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +102 -15
- package/README.md +25 -5
- package/dist/index.d.mts +36 -6
- package/dist/index.d.ts +36 -6
- package/dist/index.js +692 -484
- package/dist/index.mjs +622 -415
- package/package.json +6 -3
- package/src/assets/fonts/Poppins-Black.ttf +0 -0
- package/src/assets/fonts/Poppins-BlackItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Bold.ttf +0 -0
- package/src/assets/fonts/Poppins-BoldItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraBoldItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraLight.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraLightItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Italic.ttf +0 -0
- package/src/assets/fonts/Poppins-Light.ttf +0 -0
- package/src/assets/fonts/Poppins-LightItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Medium.ttf +0 -0
- package/src/assets/fonts/Poppins-MediumItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Regular.ttf +0 -0
- package/src/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/src/assets/fonts/Poppins-SemiBoldItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Thin.ttf +0 -0
- package/src/assets/fonts/Poppins-ThinItalic.ttf +0 -0
- package/src/components/Accordion/Accordion.tsx +16 -9
- package/src/components/AlertBanner/AlertBanner.tsx +35 -35
- package/src/components/Avatar/Avatar.tsx +1 -1
- package/src/components/Badge/Badge.tsx +12 -8
- package/src/components/Button/Button.tsx +9 -9
- package/src/components/Card/Card.tsx +12 -9
- package/src/components/Checkbox/Checkbox.tsx +9 -8
- package/src/components/Chip/Chip.tsx +22 -6
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +86 -38
- package/src/components/CurrencyDisplay/CurrencyDisplay.tsx +1 -1
- package/src/components/CurrencyInput/CurrencyInput.tsx +11 -4
- package/src/components/EmptyState/EmptyState.tsx +2 -1
- package/src/components/IconButton/IconButton.tsx +147 -0
- package/src/components/IconButton/index.ts +2 -0
- package/src/components/Input/Input.tsx +12 -8
- package/src/components/LabelValue/LabelValue.tsx +4 -3
- package/src/components/ListItem/ListItem.tsx +10 -9
- package/src/components/MonthPicker/MonthPicker.tsx +1 -1
- package/src/components/RadioGroup/RadioGroup.tsx +36 -35
- package/src/components/Select/Select.tsx +19 -21
- package/src/components/Sheet/Sheet.tsx +4 -3
- 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 +10 -16
- package/src/components/Text/Text.tsx +6 -6
- package/src/components/Textarea/Textarea.tsx +8 -6
- package/src/components/Toast/Toast.tsx +29 -23
- package/src/components/Toggle/Toggle.tsx +7 -5
- package/src/fonts.ts +30 -0
- package/src/index.ts +1 -0
- package/src/theme/colors.ts +22 -14
- package/src/theme/types.ts +4 -0
- package/src/components/Alert/Alert.tsx +0 -84
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React25, { createContext, useMemo, useContext, useRef, useState, useEffect, useCallback } from 'react';
|
|
2
2
|
import { Platform, StyleSheet, useColorScheme, Animated, TouchableOpacity, ActivityIndicator, Text, View, TextInput, Image, Easing, Modal, Pressable } from 'react-native';
|
|
3
3
|
import { verticalScale, scale, moderateScale, moderateVerticalScale } from 'react-native-size-matters';
|
|
4
4
|
import AntDesign from '@expo/vector-icons/AntDesign';
|
|
@@ -7,9 +7,9 @@ import Feather from '@expo/vector-icons/Feather';
|
|
|
7
7
|
import FontAwesome5 from '@expo/vector-icons/FontAwesome5';
|
|
8
8
|
import MaterialIcons from '@expo/vector-icons/MaterialIcons';
|
|
9
9
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
10
|
-
import { AntDesign as AntDesign$1, Entypo as Entypo$1, FontAwesome5 as FontAwesome5$1, MaterialIcons as MaterialIcons$1 } from '@expo/vector-icons';
|
|
10
|
+
import { AntDesign as AntDesign$1, Entypo as Entypo$1, Feather as Feather$1, FontAwesome5 as FontAwesome5$1, MaterialIcons as MaterialIcons$1 } from '@expo/vector-icons';
|
|
11
11
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
12
|
-
import
|
|
12
|
+
import Animated11, { useSharedValue, useDerivedValue, withTiming, Easing as Easing$1, useAnimatedStyle, withSpring } from 'react-native-reanimated';
|
|
13
13
|
import RNSlider from '@react-native-community/slider';
|
|
14
14
|
import { BottomSheetModal, BottomSheetView, BottomSheetBackdrop } from '@gorhom/bottom-sheet';
|
|
15
15
|
export { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
|
|
@@ -35,33 +35,41 @@ var defaultLight = {
|
|
|
35
35
|
accent: "#e4e4e4",
|
|
36
36
|
accentForeground: "#171717",
|
|
37
37
|
destructive: "#ef4444",
|
|
38
|
-
destructiveForeground: "#
|
|
38
|
+
destructiveForeground: "#ffffff",
|
|
39
39
|
border: "#e5e5e5",
|
|
40
40
|
input: "#e5e5e5",
|
|
41
41
|
ring: "#1a1a1a",
|
|
42
|
-
success: "#
|
|
43
|
-
successForeground: "#
|
|
42
|
+
success: "#1a7a45",
|
|
43
|
+
successForeground: "#ffffff",
|
|
44
|
+
destructiveTint: "#fff5f5",
|
|
45
|
+
destructiveBorder: "#fecaca",
|
|
46
|
+
successTint: "#f0fdf4",
|
|
47
|
+
successBorder: "#bbf7d0"
|
|
44
48
|
};
|
|
45
49
|
var defaultDark = {
|
|
46
|
-
background: "#
|
|
50
|
+
background: "#0f0f0f",
|
|
47
51
|
foreground: "#fafafa",
|
|
48
|
-
card: "#
|
|
52
|
+
card: "#1c1c1c",
|
|
49
53
|
cardForeground: "#fafafa",
|
|
50
54
|
primary: "#fafafa",
|
|
51
|
-
primaryForeground: "#
|
|
52
|
-
secondary: "#
|
|
55
|
+
primaryForeground: "#0f0f0f",
|
|
56
|
+
secondary: "#272727",
|
|
53
57
|
secondaryForeground: "#fafafa",
|
|
54
|
-
muted: "#
|
|
55
|
-
mutedForeground: "#
|
|
56
|
-
accent: "#
|
|
58
|
+
muted: "#272727",
|
|
59
|
+
mutedForeground: "#9a9a9a",
|
|
60
|
+
accent: "#2e2e2e",
|
|
57
61
|
accentForeground: "#fafafa",
|
|
58
62
|
destructive: "#dc2626",
|
|
59
|
-
destructiveForeground: "#
|
|
60
|
-
border: "#
|
|
63
|
+
destructiveForeground: "#ffffff",
|
|
64
|
+
border: "#303030",
|
|
61
65
|
input: "#2a2a2a",
|
|
62
66
|
ring: "#fafafa",
|
|
63
|
-
success: "#
|
|
64
|
-
successForeground: "#
|
|
67
|
+
success: "#166534",
|
|
68
|
+
successForeground: "#ffffff",
|
|
69
|
+
destructiveTint: "#3b0a0a",
|
|
70
|
+
destructiveBorder: "#7f1d1d",
|
|
71
|
+
successTint: "#052e16",
|
|
72
|
+
successBorder: "#166534"
|
|
65
73
|
};
|
|
66
74
|
|
|
67
75
|
// src/theme/ThemeProvider.tsx
|
|
@@ -77,7 +85,7 @@ function ThemeProvider({ children, theme, colorScheme = "system" }) {
|
|
|
77
85
|
const override = resolvedScheme === "dark" ? theme?.dark : theme?.light;
|
|
78
86
|
return override ? { ...base, ...override } : base;
|
|
79
87
|
}, [resolvedScheme, theme]);
|
|
80
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ React25.createElement(ThemeContext.Provider, { value: { colors, colorScheme: resolvedScheme } }, children);
|
|
81
89
|
}
|
|
82
90
|
function useTheme() {
|
|
83
91
|
const context = useContext(ThemeContext);
|
|
@@ -149,23 +157,23 @@ function Icon({ name, size, color, family }) {
|
|
|
149
157
|
}
|
|
150
158
|
if (!resolved) return null;
|
|
151
159
|
const Component = resolved.component;
|
|
152
|
-
return
|
|
160
|
+
return React25.createElement(Component, { name, size, color });
|
|
153
161
|
}
|
|
154
162
|
function renderIcon(name, size, color) {
|
|
155
|
-
return
|
|
163
|
+
return React25.createElement(Icon, { name, size, color });
|
|
156
164
|
}
|
|
157
165
|
|
|
158
166
|
// src/components/Button/Button.tsx
|
|
159
167
|
var nativeDriver = Platform.OS !== "web";
|
|
160
168
|
var containerSizeStyles = {
|
|
161
|
-
sm: { paddingHorizontal: s(
|
|
162
|
-
md: { paddingHorizontal: s(
|
|
163
|
-
lg: { paddingHorizontal: s(
|
|
169
|
+
sm: { paddingHorizontal: s(12), paddingVertical: vs(10), minHeight: 44 },
|
|
170
|
+
md: { paddingHorizontal: s(16), paddingVertical: vs(10), minHeight: 44 },
|
|
171
|
+
lg: { paddingHorizontal: s(20), paddingVertical: vs(12), minHeight: 48 }
|
|
164
172
|
};
|
|
165
173
|
var labelSizeStyles = {
|
|
166
|
-
sm: { fontSize: ms(
|
|
167
|
-
md: { fontSize: ms(
|
|
168
|
-
lg: { fontSize: ms(
|
|
174
|
+
sm: { fontSize: ms(13) },
|
|
175
|
+
md: { fontSize: ms(15) },
|
|
176
|
+
lg: { fontSize: ms(16) }
|
|
169
177
|
};
|
|
170
178
|
var iconSizeMap = { sm: 16, md: 18, lg: 20 };
|
|
171
179
|
function Button({
|
|
@@ -218,7 +226,7 @@ function Button({
|
|
|
218
226
|
}[variant];
|
|
219
227
|
const effectiveIcon = iconName ? renderIcon(iconName, iconSizeMap[size], iconColor ?? labelVariantStyle.color) : typeof icon === "function" ? icon({ label, size, variant }) : icon;
|
|
220
228
|
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" || variant === "secondary" ? colors.primaryForeground : colors.foreground;
|
|
221
|
-
return /* @__PURE__ */
|
|
229
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [fullWidth && styles.fullWidth, { transform: [{ scale: scale2 }] }] }, /* @__PURE__ */ React25.createElement(
|
|
222
230
|
TouchableOpacity,
|
|
223
231
|
{
|
|
224
232
|
style: [
|
|
@@ -237,12 +245,12 @@ function Button({
|
|
|
237
245
|
onPressOut: handlePressOut,
|
|
238
246
|
...props
|
|
239
247
|
},
|
|
240
|
-
loading ? /* @__PURE__ */
|
|
248
|
+
loading ? /* @__PURE__ */ React25.createElement(ActivityIndicator, { size: "small", color: spinnerColor }) : /* @__PURE__ */ React25.createElement(React25.Fragment, null, effectiveIcon && iconPosition === "left" && /* @__PURE__ */ React25.createElement(React25.Fragment, null, effectiveIcon), /* @__PURE__ */ React25.createElement(Text, { style: [styles.label, labelVariantStyle, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : void 0], allowFontScaling: true }, label), effectiveIcon && iconPosition === "right" && /* @__PURE__ */ React25.createElement(React25.Fragment, null, effectiveIcon))
|
|
241
249
|
));
|
|
242
250
|
}
|
|
243
251
|
var styles = StyleSheet.create({
|
|
244
252
|
base: {
|
|
245
|
-
borderRadius:
|
|
253
|
+
borderRadius: 8,
|
|
246
254
|
alignItems: "center",
|
|
247
255
|
justifyContent: "center",
|
|
248
256
|
flexDirection: "row"
|
|
@@ -254,24 +262,114 @@ var styles = StyleSheet.create({
|
|
|
254
262
|
opacity: 0.5
|
|
255
263
|
},
|
|
256
264
|
label: {
|
|
257
|
-
|
|
265
|
+
fontFamily: "Poppins-SemiBold"
|
|
258
266
|
},
|
|
259
267
|
labelWithIcon: {
|
|
260
268
|
marginHorizontal: s(8)
|
|
261
269
|
}
|
|
262
270
|
});
|
|
271
|
+
var nativeDriver2 = Platform.OS !== "web";
|
|
272
|
+
var sizeMap = {
|
|
273
|
+
sm: { container: s(40), icon: 18 },
|
|
274
|
+
md: { container: s(44), icon: 20 },
|
|
275
|
+
lg: { container: s(52), icon: 24 }
|
|
276
|
+
};
|
|
277
|
+
function IconButton({
|
|
278
|
+
iconName,
|
|
279
|
+
icon,
|
|
280
|
+
iconColor,
|
|
281
|
+
variant = "primary",
|
|
282
|
+
size = "md",
|
|
283
|
+
loading = false,
|
|
284
|
+
disabled,
|
|
285
|
+
style,
|
|
286
|
+
onPress,
|
|
287
|
+
...props
|
|
288
|
+
}) {
|
|
289
|
+
const { colors } = useTheme();
|
|
290
|
+
const isDisabled = disabled || loading;
|
|
291
|
+
const scale2 = useRef(new Animated.Value(1)).current;
|
|
292
|
+
const handlePressIn = () => {
|
|
293
|
+
if (isDisabled) return;
|
|
294
|
+
Animated.spring(scale2, {
|
|
295
|
+
toValue: 0.95,
|
|
296
|
+
useNativeDriver: nativeDriver2,
|
|
297
|
+
speed: 40,
|
|
298
|
+
bounciness: 0
|
|
299
|
+
}).start();
|
|
300
|
+
};
|
|
301
|
+
const handlePressOut = () => {
|
|
302
|
+
Animated.spring(scale2, {
|
|
303
|
+
toValue: 1,
|
|
304
|
+
useNativeDriver: nativeDriver2,
|
|
305
|
+
speed: 40,
|
|
306
|
+
bounciness: 4
|
|
307
|
+
}).start();
|
|
308
|
+
};
|
|
309
|
+
const handlePress = (e) => {
|
|
310
|
+
impactLight();
|
|
311
|
+
onPress?.(e);
|
|
312
|
+
};
|
|
313
|
+
const containerVariantStyle = {
|
|
314
|
+
primary: { backgroundColor: colors.primary },
|
|
315
|
+
secondary: { backgroundColor: colors.secondary },
|
|
316
|
+
outline: { backgroundColor: "transparent", borderWidth: 1.5, borderColor: colors.border },
|
|
317
|
+
ghost: { backgroundColor: "transparent" },
|
|
318
|
+
destructive: { backgroundColor: colors.destructive }
|
|
319
|
+
}[variant];
|
|
320
|
+
const defaultIconColor = {
|
|
321
|
+
primary: colors.primaryForeground,
|
|
322
|
+
secondary: colors.secondaryForeground,
|
|
323
|
+
outline: colors.foreground,
|
|
324
|
+
ghost: colors.foreground,
|
|
325
|
+
destructive: colors.destructiveForeground
|
|
326
|
+
}[variant];
|
|
327
|
+
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" || variant === "secondary" ? colors.primaryForeground : colors.foreground;
|
|
328
|
+
const { container: containerSize, icon: iconSize } = sizeMap[size];
|
|
329
|
+
const resolvedIcon = iconName ? renderIcon(iconName, iconSize, iconColor ?? defaultIconColor) : icon;
|
|
330
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25.createElement(
|
|
331
|
+
TouchableOpacity,
|
|
332
|
+
{
|
|
333
|
+
style: [
|
|
334
|
+
styles2.base,
|
|
335
|
+
containerVariantStyle,
|
|
336
|
+
{ width: containerSize, height: containerSize },
|
|
337
|
+
isDisabled && styles2.disabled,
|
|
338
|
+
style
|
|
339
|
+
],
|
|
340
|
+
disabled: isDisabled,
|
|
341
|
+
activeOpacity: 1,
|
|
342
|
+
touchSoundDisabled: true,
|
|
343
|
+
onPress: handlePress,
|
|
344
|
+
onPressIn: handlePressIn,
|
|
345
|
+
onPressOut: handlePressOut,
|
|
346
|
+
...props
|
|
347
|
+
},
|
|
348
|
+
loading ? /* @__PURE__ */ React25.createElement(ActivityIndicator, { size: "small", color: spinnerColor }) : resolvedIcon
|
|
349
|
+
));
|
|
350
|
+
}
|
|
351
|
+
var styles2 = StyleSheet.create({
|
|
352
|
+
base: {
|
|
353
|
+
borderRadius: 999,
|
|
354
|
+
alignItems: "center",
|
|
355
|
+
justifyContent: "center"
|
|
356
|
+
},
|
|
357
|
+
disabled: {
|
|
358
|
+
opacity: 0.5
|
|
359
|
+
}
|
|
360
|
+
});
|
|
263
361
|
var variantStyles = {
|
|
264
|
-
h1: { fontSize: ms(40),
|
|
265
|
-
h2: { fontSize: ms(28),
|
|
266
|
-
h3: { fontSize: ms(22),
|
|
267
|
-
body: { fontSize: ms(17),
|
|
268
|
-
caption: { fontSize: ms(13),
|
|
269
|
-
label: { fontSize: ms(15),
|
|
362
|
+
h1: { fontFamily: "Poppins-Bold", fontSize: ms(40), lineHeight: mvs(52) },
|
|
363
|
+
h2: { fontFamily: "Poppins-Bold", fontSize: ms(28), lineHeight: mvs(36) },
|
|
364
|
+
h3: { fontFamily: "Poppins-SemiBold", fontSize: ms(22), lineHeight: mvs(30) },
|
|
365
|
+
body: { fontFamily: "Poppins-Regular", fontSize: ms(17), lineHeight: mvs(26) },
|
|
366
|
+
caption: { fontFamily: "Poppins-Regular", fontSize: ms(13), lineHeight: mvs(20) },
|
|
367
|
+
label: { fontFamily: "Poppins-Medium", fontSize: ms(15), lineHeight: mvs(22) }
|
|
270
368
|
};
|
|
271
369
|
function Text2({ variant = "body", color, style, children, ...props }) {
|
|
272
370
|
const { colors } = useTheme();
|
|
273
371
|
const defaultColor = variant === "caption" ? colors.mutedForeground : colors.foreground;
|
|
274
|
-
return /* @__PURE__ */
|
|
372
|
+
return /* @__PURE__ */ React25.createElement(
|
|
275
373
|
Text,
|
|
276
374
|
{
|
|
277
375
|
style: [variantStyles[variant], { color: color ?? defaultColor }, style],
|
|
@@ -289,24 +387,24 @@ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, p
|
|
|
289
387
|
const isPassword = type === "password";
|
|
290
388
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
291
389
|
const effectivePrefix = prefixIcon ? renderIcon(prefixIcon, 20, prefixIconColor ?? colors.mutedForeground) : prefix;
|
|
292
|
-
const effectiveSuffix = isPassword && !suffix && !suffixIcon ? /* @__PURE__ */
|
|
293
|
-
return /* @__PURE__ */
|
|
390
|
+
const effectiveSuffix = isPassword && !suffix && !suffixIcon ? /* @__PURE__ */ React25.createElement(TouchableOpacity, { onPress: () => setShowPassword(!showPassword), style: styles3.passwordToggle, activeOpacity: 0.6 }, /* @__PURE__ */ React25.createElement(AntDesign$1, { name: showPassword ? "eye" : "eye-invisible", size: 20, color: colors.mutedForeground })) : suffixIcon ? renderIcon(suffixIcon, 20, suffixIconColor ?? colors.mutedForeground) : suffix;
|
|
391
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles3.container, containerStyle] }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles3.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React25.createElement(
|
|
294
392
|
View,
|
|
295
393
|
{
|
|
296
394
|
style: [
|
|
297
|
-
|
|
395
|
+
styles3.inputWrapper,
|
|
298
396
|
{
|
|
299
397
|
borderColor: error ? colors.destructive : focused ? colors.ring ?? colors.primary : colors.border,
|
|
300
398
|
backgroundColor: colors.background
|
|
301
399
|
}
|
|
302
400
|
]
|
|
303
401
|
},
|
|
304
|
-
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */
|
|
305
|
-
/* @__PURE__ */
|
|
402
|
+
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */ React25.createElement(Text, { style: [styles3.prefixText, { color: colors.mutedForeground }, prefixStyle], allowFontScaling: true }, effectivePrefix) : /* @__PURE__ */ React25.createElement(View, { style: styles3.prefixContainer }, effectivePrefix) : null,
|
|
403
|
+
/* @__PURE__ */ React25.createElement(
|
|
306
404
|
TextInput,
|
|
307
405
|
{
|
|
308
406
|
style: [
|
|
309
|
-
|
|
407
|
+
styles3.input,
|
|
310
408
|
{
|
|
311
409
|
color: colors.foreground
|
|
312
410
|
},
|
|
@@ -327,48 +425,52 @@ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, p
|
|
|
327
425
|
...props
|
|
328
426
|
}
|
|
329
427
|
),
|
|
330
|
-
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */
|
|
331
|
-
), error ? /* @__PURE__ */
|
|
428
|
+
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */ React25.createElement(Text, { style: [styles3.suffixText, { color: colors.mutedForeground }, suffixStyle], allowFontScaling: true }, effectiveSuffix) : /* @__PURE__ */ React25.createElement(View, { style: styles3.suffixContainer }, effectiveSuffix) : null
|
|
429
|
+
), error ? /* @__PURE__ */ React25.createElement(Text, { style: [styles3.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null, !error && hint ? /* @__PURE__ */ React25.createElement(Text, { style: [styles3.helperText, { color: colors.mutedForeground }], allowFontScaling: true }, hint) : null);
|
|
332
430
|
}
|
|
333
|
-
var
|
|
431
|
+
var styles3 = StyleSheet.create({
|
|
334
432
|
container: {
|
|
335
433
|
gap: vs(8)
|
|
336
434
|
},
|
|
337
435
|
label: {
|
|
338
|
-
|
|
339
|
-
|
|
436
|
+
fontFamily: "Poppins-Medium",
|
|
437
|
+
fontSize: ms(13)
|
|
340
438
|
},
|
|
341
439
|
inputWrapper: {
|
|
342
440
|
flexDirection: "row",
|
|
343
441
|
alignItems: "center",
|
|
344
|
-
borderWidth: 1
|
|
442
|
+
borderWidth: 1,
|
|
345
443
|
borderRadius: ms(8),
|
|
346
|
-
paddingHorizontal: s(
|
|
347
|
-
paddingVertical: vs(
|
|
444
|
+
paddingHorizontal: s(14),
|
|
445
|
+
paddingVertical: vs(11)
|
|
348
446
|
},
|
|
349
447
|
input: {
|
|
448
|
+
fontFamily: "Poppins-Regular",
|
|
350
449
|
flex: 1,
|
|
351
|
-
fontSize: ms(
|
|
450
|
+
fontSize: ms(15),
|
|
352
451
|
paddingVertical: 0
|
|
353
452
|
},
|
|
354
453
|
prefixContainer: {
|
|
355
454
|
marginRight: s(8)
|
|
356
455
|
},
|
|
357
456
|
prefixText: {
|
|
358
|
-
|
|
457
|
+
fontFamily: "Poppins-Regular",
|
|
458
|
+
fontSize: ms(15),
|
|
359
459
|
marginRight: s(8)
|
|
360
460
|
},
|
|
361
461
|
suffixContainer: {
|
|
362
462
|
marginLeft: s(8)
|
|
363
463
|
},
|
|
364
464
|
suffixText: {
|
|
365
|
-
|
|
465
|
+
fontFamily: "Poppins-Regular",
|
|
466
|
+
fontSize: ms(15),
|
|
366
467
|
marginLeft: s(8)
|
|
367
468
|
},
|
|
368
469
|
passwordToggle: {
|
|
369
470
|
padding: s(4)
|
|
370
471
|
},
|
|
371
472
|
helperText: {
|
|
473
|
+
fontFamily: "Poppins-Regular",
|
|
372
474
|
fontSize: ms(13)
|
|
373
475
|
}
|
|
374
476
|
});
|
|
@@ -394,34 +496,38 @@ function Badge({ label, children, variant = "default", size = "md", icon, iconNa
|
|
|
394
496
|
default: { backgroundColor: colors.primary },
|
|
395
497
|
secondary: { backgroundColor: colors.secondary },
|
|
396
498
|
destructive: { backgroundColor: colors.destructive },
|
|
397
|
-
outline: { backgroundColor: "transparent", borderWidth: 1, borderColor: colors.border }
|
|
499
|
+
outline: { backgroundColor: "transparent", borderWidth: 1, borderColor: colors.border },
|
|
500
|
+
success: { backgroundColor: colors.success },
|
|
501
|
+
warning: { backgroundColor: "#f59e0b" },
|
|
502
|
+
successOutline: { backgroundColor: colors.successTint, borderWidth: 1, borderColor: colors.successBorder },
|
|
503
|
+
destructiveOutline: { backgroundColor: colors.destructiveTint, borderWidth: 1, borderColor: colors.destructiveBorder }
|
|
398
504
|
}[variant];
|
|
399
505
|
const textColor = {
|
|
400
506
|
default: colors.primaryForeground,
|
|
401
507
|
secondary: colors.secondaryForeground,
|
|
402
508
|
destructive: colors.destructiveForeground,
|
|
403
|
-
outline: colors.foreground
|
|
509
|
+
outline: colors.foreground,
|
|
510
|
+
success: colors.successForeground,
|
|
511
|
+
warning: "#ffffff",
|
|
512
|
+
successOutline: colors.success,
|
|
513
|
+
destructiveOutline: colors.destructive
|
|
404
514
|
}[variant];
|
|
405
515
|
const effectiveIcon = iconName ? renderIcon(iconName, sizeIconSize[size], iconColor ?? textColor) : icon;
|
|
406
516
|
const content = children ?? label;
|
|
407
|
-
return /* @__PURE__ */
|
|
517
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles4.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style] }, effectiveIcon, typeof content === "string" ? /* @__PURE__ */ React25.createElement(Text, { style: [styles4.label, { color: textColor }, sizeFontSize[size]], allowFontScaling: true }, content) : content);
|
|
408
518
|
}
|
|
409
|
-
var
|
|
519
|
+
var styles4 = StyleSheet.create({
|
|
410
520
|
container: {
|
|
411
|
-
borderRadius:
|
|
521
|
+
borderRadius: 9999,
|
|
412
522
|
alignSelf: "flex-start",
|
|
413
523
|
flexDirection: "row",
|
|
414
524
|
alignItems: "center"
|
|
415
525
|
},
|
|
416
|
-
iconContainer: {
|
|
417
|
-
justifyContent: "center",
|
|
418
|
-
alignItems: "center"
|
|
419
|
-
},
|
|
420
526
|
label: {
|
|
421
|
-
|
|
527
|
+
fontFamily: "Poppins-Medium"
|
|
422
528
|
}
|
|
423
529
|
});
|
|
424
|
-
var
|
|
530
|
+
var nativeDriver3 = Platform.OS !== "web";
|
|
425
531
|
function Card({ children, variant = "elevated", onPress, style }) {
|
|
426
532
|
const { colors } = useTheme();
|
|
427
533
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
@@ -429,7 +535,7 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
429
535
|
if (!onPress) return;
|
|
430
536
|
Animated.spring(scale2, {
|
|
431
537
|
toValue: 0.98,
|
|
432
|
-
useNativeDriver:
|
|
538
|
+
useNativeDriver: nativeDriver3,
|
|
433
539
|
speed: 40,
|
|
434
540
|
bounciness: 0
|
|
435
541
|
}).start();
|
|
@@ -438,7 +544,7 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
438
544
|
if (!onPress) return;
|
|
439
545
|
Animated.spring(scale2, {
|
|
440
546
|
toValue: 1,
|
|
441
|
-
useNativeDriver:
|
|
547
|
+
useNativeDriver: nativeDriver3,
|
|
442
548
|
speed: 40,
|
|
443
549
|
bounciness: 4
|
|
444
550
|
}).start();
|
|
@@ -471,9 +577,9 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
471
577
|
elevation: 0
|
|
472
578
|
}
|
|
473
579
|
}[variant];
|
|
474
|
-
const cardContent = /* @__PURE__ */
|
|
580
|
+
const cardContent = /* @__PURE__ */ React25.createElement(View, { style: [styles5.card, variantStyle, style] }, children);
|
|
475
581
|
if (onPress) {
|
|
476
|
-
return /* @__PURE__ */
|
|
582
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25.createElement(
|
|
477
583
|
TouchableOpacity,
|
|
478
584
|
{
|
|
479
585
|
onPress: handlePress,
|
|
@@ -488,46 +594,49 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
488
594
|
return cardContent;
|
|
489
595
|
}
|
|
490
596
|
function CardHeader({ children, style }) {
|
|
491
|
-
return /* @__PURE__ */
|
|
597
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles5.header, style] }, children);
|
|
492
598
|
}
|
|
493
599
|
function CardTitle({ children, style }) {
|
|
494
600
|
const { colors } = useTheme();
|
|
495
|
-
return /* @__PURE__ */
|
|
601
|
+
return /* @__PURE__ */ React25.createElement(Text, { style: [styles5.title, { color: colors.cardForeground }, style], allowFontScaling: true }, children);
|
|
496
602
|
}
|
|
497
603
|
function CardDescription({ children, style }) {
|
|
498
604
|
const { colors } = useTheme();
|
|
499
|
-
return /* @__PURE__ */
|
|
605
|
+
return /* @__PURE__ */ React25.createElement(Text, { style: [styles5.description, { color: colors.mutedForeground }, style], allowFontScaling: true }, children);
|
|
500
606
|
}
|
|
501
607
|
function CardContent({ children, style }) {
|
|
502
|
-
return /* @__PURE__ */
|
|
608
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles5.content, style] }, children);
|
|
503
609
|
}
|
|
504
610
|
function CardFooter({ children, style }) {
|
|
505
|
-
return /* @__PURE__ */
|
|
611
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles5.footer, style] }, children);
|
|
506
612
|
}
|
|
507
|
-
var
|
|
613
|
+
var styles5 = StyleSheet.create({
|
|
508
614
|
card: {
|
|
509
615
|
borderRadius: ms(12),
|
|
510
616
|
borderWidth: 1
|
|
511
617
|
},
|
|
512
618
|
header: {
|
|
513
|
-
padding: s(
|
|
619
|
+
padding: s(16),
|
|
514
620
|
paddingBottom: 0,
|
|
515
|
-
gap: vs(
|
|
621
|
+
gap: vs(4)
|
|
516
622
|
},
|
|
517
623
|
title: {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
lineHeight: mvs(
|
|
624
|
+
fontFamily: "Poppins-SemiBold",
|
|
625
|
+
fontSize: ms(16),
|
|
626
|
+
lineHeight: mvs(22)
|
|
521
627
|
},
|
|
522
628
|
description: {
|
|
523
|
-
|
|
524
|
-
|
|
629
|
+
fontFamily: "Poppins-Regular",
|
|
630
|
+
fontSize: ms(13),
|
|
631
|
+
lineHeight: mvs(18)
|
|
525
632
|
},
|
|
526
633
|
content: {
|
|
527
|
-
padding: s(
|
|
634
|
+
padding: s(16),
|
|
635
|
+
paddingTop: s(12)
|
|
528
636
|
},
|
|
529
637
|
footer: {
|
|
530
|
-
|
|
638
|
+
paddingHorizontal: s(16),
|
|
639
|
+
paddingBottom: vs(14),
|
|
531
640
|
paddingTop: 0,
|
|
532
641
|
flexDirection: "row",
|
|
533
642
|
alignItems: "center"
|
|
@@ -535,18 +644,18 @@ var styles4 = StyleSheet.create({
|
|
|
535
644
|
});
|
|
536
645
|
function Separator({ orientation = "horizontal", style }) {
|
|
537
646
|
const { colors } = useTheme();
|
|
538
|
-
return /* @__PURE__ */
|
|
647
|
+
return /* @__PURE__ */ React25.createElement(
|
|
539
648
|
View,
|
|
540
649
|
{
|
|
541
650
|
style: [
|
|
542
|
-
orientation === "horizontal" ?
|
|
651
|
+
orientation === "horizontal" ? styles6.horizontal : styles6.vertical,
|
|
543
652
|
{ backgroundColor: colors.border },
|
|
544
653
|
style
|
|
545
654
|
]
|
|
546
655
|
}
|
|
547
656
|
);
|
|
548
657
|
}
|
|
549
|
-
var
|
|
658
|
+
var styles6 = StyleSheet.create({
|
|
550
659
|
horizontal: {
|
|
551
660
|
height: 1,
|
|
552
661
|
width: "100%"
|
|
@@ -556,15 +665,40 @@ var styles5 = StyleSheet.create({
|
|
|
556
665
|
height: "100%"
|
|
557
666
|
}
|
|
558
667
|
});
|
|
559
|
-
var
|
|
668
|
+
var sizeMap2 = {
|
|
560
669
|
sm: "small",
|
|
561
670
|
md: "small",
|
|
562
671
|
lg: "large"
|
|
563
672
|
};
|
|
564
|
-
|
|
673
|
+
var labelFontSize = {
|
|
674
|
+
sm: ms(11),
|
|
675
|
+
md: ms(13),
|
|
676
|
+
lg: ms(14)
|
|
677
|
+
};
|
|
678
|
+
function Spinner({ size = "md", color, label, ...props }) {
|
|
565
679
|
const { colors } = useTheme();
|
|
566
|
-
|
|
680
|
+
if (label) {
|
|
681
|
+
return /* @__PURE__ */ React25.createElement(View, { style: styles7.wrapper }, /* @__PURE__ */ React25.createElement(ActivityIndicator, { size: sizeMap2[size], color: color ?? colors.primary, ...props }), /* @__PURE__ */ React25.createElement(
|
|
682
|
+
Text,
|
|
683
|
+
{
|
|
684
|
+
style: [styles7.label, { color: colors.mutedForeground, fontSize: labelFontSize[size] }],
|
|
685
|
+
allowFontScaling: true
|
|
686
|
+
},
|
|
687
|
+
label
|
|
688
|
+
));
|
|
689
|
+
}
|
|
690
|
+
return /* @__PURE__ */ React25.createElement(ActivityIndicator, { size: sizeMap2[size], color: color ?? colors.primary, ...props });
|
|
567
691
|
}
|
|
692
|
+
var styles7 = StyleSheet.create({
|
|
693
|
+
wrapper: {
|
|
694
|
+
alignItems: "center",
|
|
695
|
+
gap: vs(6)
|
|
696
|
+
},
|
|
697
|
+
label: {
|
|
698
|
+
fontFamily: "Poppins-Regular",
|
|
699
|
+
lineHeight: mvs(18)
|
|
700
|
+
}
|
|
701
|
+
});
|
|
568
702
|
function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
569
703
|
const { colors, colorScheme } = useTheme();
|
|
570
704
|
const shimmerAnim = useRef(new Animated.Value(0)).current;
|
|
@@ -585,17 +719,17 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
585
719
|
inputRange: [0, 1],
|
|
586
720
|
outputRange: [-containerWidth, containerWidth]
|
|
587
721
|
});
|
|
588
|
-
return /* @__PURE__ */
|
|
722
|
+
return /* @__PURE__ */ React25.createElement(
|
|
589
723
|
View,
|
|
590
724
|
{
|
|
591
725
|
style: [
|
|
592
|
-
|
|
726
|
+
styles8.base,
|
|
593
727
|
{ width, height, borderRadius, backgroundColor: colors.muted },
|
|
594
728
|
style
|
|
595
729
|
],
|
|
596
730
|
onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width)
|
|
597
731
|
},
|
|
598
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: [StyleSheet.absoluteFill, { transform: [{ translateX }] }] }, /* @__PURE__ */ React25.createElement(
|
|
599
733
|
LinearGradient,
|
|
600
734
|
{
|
|
601
735
|
colors: ["transparent", shimmerHighlight, "transparent"],
|
|
@@ -606,12 +740,12 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
606
740
|
))
|
|
607
741
|
);
|
|
608
742
|
}
|
|
609
|
-
var
|
|
743
|
+
var styles8 = StyleSheet.create({
|
|
610
744
|
base: {
|
|
611
745
|
overflow: "hidden"
|
|
612
746
|
}
|
|
613
747
|
});
|
|
614
|
-
var
|
|
748
|
+
var sizeMap3 = {
|
|
615
749
|
sm: s(28),
|
|
616
750
|
md: s(40),
|
|
617
751
|
lg: s(56),
|
|
@@ -626,7 +760,7 @@ var fontSizeMap = {
|
|
|
626
760
|
function Avatar({ src, fallback, size = "md", style }) {
|
|
627
761
|
const { colors } = useTheme();
|
|
628
762
|
const [imageError, setImageError] = useState(false);
|
|
629
|
-
const dimension =
|
|
763
|
+
const dimension = sizeMap3[size];
|
|
630
764
|
const showFallback = !src || imageError;
|
|
631
765
|
const containerStyle = {
|
|
632
766
|
width: dimension,
|
|
@@ -635,66 +769,69 @@ function Avatar({ src, fallback, size = "md", style }) {
|
|
|
635
769
|
backgroundColor: colors.muted,
|
|
636
770
|
overflow: "hidden"
|
|
637
771
|
};
|
|
638
|
-
return /* @__PURE__ */
|
|
772
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles9.base, containerStyle, style] }, !showFallback ? /* @__PURE__ */ React25.createElement(
|
|
639
773
|
Image,
|
|
640
774
|
{
|
|
641
775
|
source: { uri: src },
|
|
642
776
|
style: { width: dimension, height: dimension },
|
|
643
777
|
onError: () => setImageError(true)
|
|
644
778
|
}
|
|
645
|
-
) : /* @__PURE__ */
|
|
779
|
+
) : /* @__PURE__ */ React25.createElement(
|
|
646
780
|
Text,
|
|
647
781
|
{
|
|
648
|
-
style: [
|
|
782
|
+
style: [styles9.fallback, { color: colors.mutedForeground, fontSize: fontSizeMap[size] }],
|
|
649
783
|
allowFontScaling: true
|
|
650
784
|
},
|
|
651
785
|
fallback?.slice(0, 2).toUpperCase() ?? "?"
|
|
652
786
|
));
|
|
653
787
|
}
|
|
654
|
-
var
|
|
788
|
+
var styles9 = StyleSheet.create({
|
|
655
789
|
base: {
|
|
656
790
|
alignItems: "center",
|
|
657
791
|
justifyContent: "center"
|
|
658
792
|
},
|
|
659
793
|
fallback: {
|
|
660
|
-
|
|
794
|
+
fontFamily: "Poppins-Medium"
|
|
661
795
|
}
|
|
662
796
|
});
|
|
663
797
|
function AlertBanner({ title, description, variant = "default", icon, iconName, iconColor, style }) {
|
|
664
798
|
const { colors } = useTheme();
|
|
665
|
-
const
|
|
666
|
-
const
|
|
667
|
-
const
|
|
668
|
-
const defaultIcon = variant === "success" ? /* @__PURE__ */
|
|
669
|
-
const effectiveIcon = iconName ? renderIcon(iconName, 18, iconColor ??
|
|
670
|
-
return /* @__PURE__ */
|
|
799
|
+
const bgColor = variant === "destructive" ? colors.destructiveBorder : variant === "success" ? colors.successBorder : colors.card;
|
|
800
|
+
const textColor = variant === "destructive" ? "#991b1b" : variant === "success" ? "#166534" : colors.foreground;
|
|
801
|
+
const borderColor = textColor;
|
|
802
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "check-circle", size: 18, color: textColor }) : variant === "destructive" ? /* @__PURE__ */ React25.createElement(MaterialIcons$1, { name: "error-outline", size: 20, color: textColor }) : /* @__PURE__ */ React25.createElement(Entypo$1, { name: "info-with-circle", size: 18, color: textColor });
|
|
803
|
+
const effectiveIcon = iconName ? renderIcon(iconName, 18, iconColor ?? textColor) : icon ?? defaultIcon;
|
|
804
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles10.container, { backgroundColor: bgColor, borderColor }, style] }, /* @__PURE__ */ React25.createElement(View, { style: styles10.header }, /* @__PURE__ */ React25.createElement(View, { style: styles10.icon }, effectiveIcon), title ? /* @__PURE__ */ React25.createElement(Text, { style: [styles10.title, { color: textColor }], allowFontScaling: true }, title) : null), description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles10.description, { color: textColor, opacity: 0.85 }], allowFontScaling: true }, description) : null);
|
|
671
805
|
}
|
|
672
|
-
var
|
|
806
|
+
var styles10 = StyleSheet.create({
|
|
673
807
|
container: {
|
|
674
|
-
flexDirection: "row",
|
|
675
808
|
borderWidth: 1,
|
|
676
809
|
borderRadius: ms(12),
|
|
677
|
-
|
|
678
|
-
|
|
810
|
+
paddingHorizontal: s(14),
|
|
811
|
+
paddingVertical: vs(12),
|
|
812
|
+
gap: vs(8),
|
|
679
813
|
shadowColor: "#000",
|
|
680
|
-
shadowOffset: { width: 0, height:
|
|
681
|
-
shadowOpacity: 0.
|
|
682
|
-
shadowRadius:
|
|
683
|
-
elevation:
|
|
814
|
+
shadowOffset: { width: 0, height: 3 },
|
|
815
|
+
shadowOpacity: 0.1,
|
|
816
|
+
shadowRadius: 8,
|
|
817
|
+
elevation: 5
|
|
818
|
+
},
|
|
819
|
+
header: {
|
|
820
|
+
flexDirection: "row",
|
|
821
|
+
alignItems: "center",
|
|
822
|
+
gap: s(10)
|
|
684
823
|
},
|
|
685
824
|
icon: {
|
|
686
825
|
marginTop: 0
|
|
687
826
|
},
|
|
688
|
-
content: {
|
|
689
|
-
flex: 1,
|
|
690
|
-
gap: vs(4)
|
|
691
|
-
},
|
|
692
827
|
title: {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
lineHeight: mvs(20)
|
|
828
|
+
fontFamily: "Poppins-Bold",
|
|
829
|
+
fontSize: ms(15),
|
|
830
|
+
lineHeight: mvs(20),
|
|
831
|
+
flex: 1
|
|
696
832
|
},
|
|
697
833
|
description: {
|
|
834
|
+
fontFamily: "Poppins-Regular",
|
|
698
835
|
fontSize: ms(14),
|
|
699
836
|
lineHeight: mvs(20)
|
|
700
837
|
}
|
|
@@ -713,21 +850,21 @@ function Progress({ value = 0, max = 100, style }) {
|
|
|
713
850
|
bounciness: 0
|
|
714
851
|
}).start();
|
|
715
852
|
}, [percent, trackWidth]);
|
|
716
|
-
return /* @__PURE__ */
|
|
853
|
+
return /* @__PURE__ */ React25.createElement(
|
|
717
854
|
View,
|
|
718
855
|
{
|
|
719
|
-
style: [
|
|
856
|
+
style: [styles11.track, { backgroundColor: colors.muted }, style],
|
|
720
857
|
onLayout: (e) => setTrackWidth(e.nativeEvent.layout.width)
|
|
721
858
|
},
|
|
722
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ React25.createElement(
|
|
723
860
|
Animated.View,
|
|
724
861
|
{
|
|
725
|
-
style: [
|
|
862
|
+
style: [styles11.indicator, { width: animatedWidth, backgroundColor: colors.primary }]
|
|
726
863
|
}
|
|
727
864
|
)
|
|
728
865
|
);
|
|
729
866
|
}
|
|
730
|
-
var
|
|
867
|
+
var styles11 = StyleSheet.create({
|
|
731
868
|
track: {
|
|
732
869
|
height: vs(8),
|
|
733
870
|
borderRadius: 999,
|
|
@@ -743,39 +880,39 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, siz
|
|
|
743
880
|
const { colors } = useTheme();
|
|
744
881
|
const isCompact = size === "compact";
|
|
745
882
|
const effectiveIcon = iconName ? renderIcon(iconName, isCompact ? 32 : 48, iconColor ?? colors.mutedForeground) : icon;
|
|
746
|
-
return /* @__PURE__ */
|
|
883
|
+
return /* @__PURE__ */ React25.createElement(
|
|
747
884
|
View,
|
|
748
885
|
{
|
|
749
886
|
style: [
|
|
750
|
-
|
|
751
|
-
isCompact &&
|
|
887
|
+
styles12.container,
|
|
888
|
+
isCompact && styles12.containerCompact,
|
|
752
889
|
{ borderColor: colors.border },
|
|
753
890
|
style
|
|
754
891
|
]
|
|
755
892
|
},
|
|
756
|
-
effectiveIcon ? /* @__PURE__ */
|
|
893
|
+
effectiveIcon ? /* @__PURE__ */ React25.createElement(
|
|
757
894
|
View,
|
|
758
895
|
{
|
|
759
896
|
style: [
|
|
760
|
-
|
|
761
|
-
isCompact &&
|
|
897
|
+
styles12.iconWrapper,
|
|
898
|
+
isCompact && styles12.iconWrapperCompact,
|
|
762
899
|
{ backgroundColor: colors.muted }
|
|
763
900
|
]
|
|
764
901
|
},
|
|
765
902
|
effectiveIcon
|
|
766
903
|
) : null,
|
|
767
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ React25.createElement(View, { style: styles12.textWrapper }, /* @__PURE__ */ React25.createElement(
|
|
768
905
|
Text,
|
|
769
906
|
{
|
|
770
|
-
style: [
|
|
907
|
+
style: [styles12.title, isCompact && styles12.titleCompact, { color: colors.foreground }],
|
|
771
908
|
allowFontScaling: true
|
|
772
909
|
},
|
|
773
910
|
title
|
|
774
|
-
), description && !isCompact ? /* @__PURE__ */
|
|
775
|
-
action && !isCompact ? /* @__PURE__ */
|
|
911
|
+
), description && !isCompact ? /* @__PURE__ */ React25.createElement(Text, { style: [styles12.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null),
|
|
912
|
+
action && !isCompact ? /* @__PURE__ */ React25.createElement(View, { style: styles12.action }, action) : null
|
|
776
913
|
);
|
|
777
914
|
}
|
|
778
|
-
var
|
|
915
|
+
var styles12 = StyleSheet.create({
|
|
779
916
|
container: {
|
|
780
917
|
alignItems: "center",
|
|
781
918
|
justifyContent: "center",
|
|
@@ -807,14 +944,15 @@ var styles10 = StyleSheet.create({
|
|
|
807
944
|
maxWidth: s(320)
|
|
808
945
|
},
|
|
809
946
|
title: {
|
|
947
|
+
fontFamily: "Poppins-Medium",
|
|
810
948
|
fontSize: ms(18),
|
|
811
|
-
fontWeight: "500",
|
|
812
949
|
textAlign: "center"
|
|
813
950
|
},
|
|
814
951
|
titleCompact: {
|
|
815
952
|
fontSize: ms(15)
|
|
816
953
|
},
|
|
817
954
|
description: {
|
|
955
|
+
fontFamily: "Poppins-Regular",
|
|
818
956
|
fontSize: ms(14),
|
|
819
957
|
lineHeight: mvs(20),
|
|
820
958
|
textAlign: "center"
|
|
@@ -837,14 +975,14 @@ function Textarea({
|
|
|
837
975
|
}) {
|
|
838
976
|
const { colors } = useTheme();
|
|
839
977
|
const [focused, setFocused] = useState(false);
|
|
840
|
-
return /* @__PURE__ */
|
|
978
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles13.container, containerStyle] }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles13.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React25.createElement(
|
|
841
979
|
TextInput,
|
|
842
980
|
{
|
|
843
981
|
multiline: true,
|
|
844
982
|
numberOfLines: rows,
|
|
845
983
|
textAlignVertical: "top",
|
|
846
984
|
style: [
|
|
847
|
-
|
|
985
|
+
styles13.input,
|
|
848
986
|
{
|
|
849
987
|
borderColor: error ? colors.destructive : focused ? colors.ring ?? colors.primary : colors.border,
|
|
850
988
|
color: colors.foreground,
|
|
@@ -866,28 +1004,30 @@ function Textarea({
|
|
|
866
1004
|
allowFontScaling: true,
|
|
867
1005
|
...props
|
|
868
1006
|
}
|
|
869
|
-
), error ? /* @__PURE__ */
|
|
1007
|
+
), error ? /* @__PURE__ */ React25.createElement(Text, { style: [styles13.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null, !error && hint ? /* @__PURE__ */ React25.createElement(Text, { style: [styles13.helperText, { color: colors.mutedForeground }], allowFontScaling: true }, hint) : null);
|
|
870
1008
|
}
|
|
871
|
-
var
|
|
1009
|
+
var styles13 = StyleSheet.create({
|
|
872
1010
|
container: {
|
|
873
1011
|
gap: vs(8)
|
|
874
1012
|
},
|
|
875
1013
|
label: {
|
|
876
|
-
|
|
877
|
-
|
|
1014
|
+
fontFamily: "Poppins-Medium",
|
|
1015
|
+
fontSize: ms(13)
|
|
878
1016
|
},
|
|
879
1017
|
input: {
|
|
880
|
-
|
|
1018
|
+
fontFamily: "Poppins-Regular",
|
|
1019
|
+
borderWidth: 1,
|
|
881
1020
|
borderRadius: ms(8),
|
|
882
|
-
paddingHorizontal: s(
|
|
883
|
-
paddingVertical: vs(
|
|
884
|
-
fontSize: ms(
|
|
1021
|
+
paddingHorizontal: s(14),
|
|
1022
|
+
paddingVertical: vs(11),
|
|
1023
|
+
fontSize: ms(15)
|
|
885
1024
|
},
|
|
886
1025
|
helperText: {
|
|
1026
|
+
fontFamily: "Poppins-Regular",
|
|
887
1027
|
fontSize: ms(13)
|
|
888
1028
|
}
|
|
889
1029
|
});
|
|
890
|
-
var
|
|
1030
|
+
var nativeDriver4 = Platform.OS !== "web";
|
|
891
1031
|
function Checkbox({
|
|
892
1032
|
checked = false,
|
|
893
1033
|
onCheckedChange,
|
|
@@ -899,15 +1039,15 @@ function Checkbox({
|
|
|
899
1039
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
900
1040
|
const handlePressIn = () => {
|
|
901
1041
|
if (disabled) return;
|
|
902
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1042
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver4, speed: 40, bounciness: 0 }).start();
|
|
903
1043
|
};
|
|
904
1044
|
const handlePressOut = () => {
|
|
905
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1045
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver4, speed: 40, bounciness: 0 }).start();
|
|
906
1046
|
};
|
|
907
|
-
return /* @__PURE__ */
|
|
1047
|
+
return /* @__PURE__ */ React25.createElement(
|
|
908
1048
|
TouchableOpacity,
|
|
909
1049
|
{
|
|
910
|
-
style: [
|
|
1050
|
+
style: [styles14.row, style],
|
|
911
1051
|
onPress: () => {
|
|
912
1052
|
selectionAsync();
|
|
913
1053
|
onCheckedChange?.(!checked);
|
|
@@ -918,30 +1058,32 @@ function Checkbox({
|
|
|
918
1058
|
activeOpacity: 1,
|
|
919
1059
|
touchSoundDisabled: true
|
|
920
1060
|
},
|
|
921
|
-
/* @__PURE__ */
|
|
922
|
-
View,
|
|
1061
|
+
/* @__PURE__ */ React25.createElement(
|
|
1062
|
+
Animated.View,
|
|
923
1063
|
{
|
|
924
1064
|
style: [
|
|
925
|
-
|
|
1065
|
+
styles14.box,
|
|
926
1066
|
{
|
|
927
1067
|
borderColor: checked ? colors.primary : colors.border,
|
|
928
1068
|
backgroundColor: checked ? colors.primary : "transparent",
|
|
929
|
-
opacity: disabled ? 0.45 : 1
|
|
1069
|
+
opacity: disabled ? 0.45 : 1,
|
|
1070
|
+
transform: [{ scale: scale2 }]
|
|
930
1071
|
}
|
|
931
1072
|
]
|
|
932
1073
|
},
|
|
933
|
-
checked ? /* @__PURE__ */
|
|
1074
|
+
checked ? /* @__PURE__ */ React25.createElement(View, { style: [styles14.checkmark, { borderColor: colors.primaryForeground }] }) : null
|
|
934
1075
|
),
|
|
935
|
-
label ? /* @__PURE__ */
|
|
1076
|
+
label ? /* @__PURE__ */ React25.createElement(
|
|
936
1077
|
Text,
|
|
937
1078
|
{
|
|
938
|
-
style: [
|
|
1079
|
+
style: [styles14.label, { color: disabled ? colors.mutedForeground : colors.foreground }],
|
|
1080
|
+
allowFontScaling: true
|
|
939
1081
|
},
|
|
940
1082
|
label
|
|
941
1083
|
) : null
|
|
942
|
-
)
|
|
1084
|
+
);
|
|
943
1085
|
}
|
|
944
|
-
var
|
|
1086
|
+
var styles14 = StyleSheet.create({
|
|
945
1087
|
row: {
|
|
946
1088
|
flexDirection: "row",
|
|
947
1089
|
alignItems: "center",
|
|
@@ -950,7 +1092,7 @@ var styles12 = StyleSheet.create({
|
|
|
950
1092
|
box: {
|
|
951
1093
|
width: s(24),
|
|
952
1094
|
height: s(24),
|
|
953
|
-
borderRadius: ms(
|
|
1095
|
+
borderRadius: ms(4),
|
|
954
1096
|
borderWidth: 1.5,
|
|
955
1097
|
alignItems: "center",
|
|
956
1098
|
justifyContent: "center"
|
|
@@ -963,15 +1105,16 @@ var styles12 = StyleSheet.create({
|
|
|
963
1105
|
transform: [{ rotate: "-45deg" }, { translateY: -1 }]
|
|
964
1106
|
},
|
|
965
1107
|
label: {
|
|
966
|
-
|
|
967
|
-
|
|
1108
|
+
fontFamily: "Poppins-Regular",
|
|
1109
|
+
fontSize: ms(14),
|
|
1110
|
+
lineHeight: mvs(20)
|
|
968
1111
|
}
|
|
969
1112
|
});
|
|
970
|
-
var
|
|
971
|
-
var TRACK_WIDTH = s(
|
|
972
|
-
var TRACK_HEIGHT =
|
|
973
|
-
var THUMB_SIZE = s(
|
|
974
|
-
var THUMB_OFFSET = s(
|
|
1113
|
+
var nativeDriver5 = Platform.OS !== "web";
|
|
1114
|
+
var TRACK_WIDTH = s(52);
|
|
1115
|
+
var TRACK_HEIGHT = s(30);
|
|
1116
|
+
var THUMB_SIZE = s(24);
|
|
1117
|
+
var THUMB_OFFSET = s(3);
|
|
975
1118
|
var THUMB_TRAVEL = TRACK_WIDTH - THUMB_SIZE - THUMB_OFFSET * 2;
|
|
976
1119
|
function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
977
1120
|
const { colors } = useTheme();
|
|
@@ -981,7 +1124,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
981
1124
|
Animated.parallel([
|
|
982
1125
|
Animated.spring(translateX, {
|
|
983
1126
|
toValue: checked ? THUMB_TRAVEL : 0,
|
|
984
|
-
useNativeDriver:
|
|
1127
|
+
useNativeDriver: nativeDriver5,
|
|
985
1128
|
bounciness: 4
|
|
986
1129
|
}),
|
|
987
1130
|
Animated.timing(trackOpacity, {
|
|
@@ -995,7 +1138,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
995
1138
|
inputRange: [0, 1],
|
|
996
1139
|
outputRange: [colors.muted, colors.primary]
|
|
997
1140
|
});
|
|
998
|
-
return /* @__PURE__ */
|
|
1141
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [{ opacity: disabled ? 0.45 : 1 }, style] }, /* @__PURE__ */ React25.createElement(
|
|
999
1142
|
TouchableOpacity,
|
|
1000
1143
|
{
|
|
1001
1144
|
onPress: () => {
|
|
@@ -1005,20 +1148,20 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
1005
1148
|
disabled,
|
|
1006
1149
|
activeOpacity: 0.8,
|
|
1007
1150
|
touchSoundDisabled: true,
|
|
1008
|
-
style:
|
|
1151
|
+
style: styles15.wrapper
|
|
1009
1152
|
},
|
|
1010
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: [styles15.track, { backgroundColor: trackColor }] }, /* @__PURE__ */ React25.createElement(
|
|
1011
1154
|
Animated.View,
|
|
1012
1155
|
{
|
|
1013
1156
|
style: [
|
|
1014
|
-
|
|
1157
|
+
styles15.thumb,
|
|
1015
1158
|
{ backgroundColor: colors.primaryForeground, transform: [{ translateX }] }
|
|
1016
1159
|
]
|
|
1017
1160
|
}
|
|
1018
1161
|
))
|
|
1019
1162
|
));
|
|
1020
1163
|
}
|
|
1021
|
-
var
|
|
1164
|
+
var styles15 = StyleSheet.create({
|
|
1022
1165
|
wrapper: {},
|
|
1023
1166
|
track: {
|
|
1024
1167
|
width: TRACK_WIDTH,
|
|
@@ -1041,6 +1184,7 @@ var styles13 = StyleSheet.create({
|
|
|
1041
1184
|
elevation: 2
|
|
1042
1185
|
}
|
|
1043
1186
|
});
|
|
1187
|
+
var nativeDriver6 = Platform.OS !== "web";
|
|
1044
1188
|
var sizeStyles = {
|
|
1045
1189
|
sm: { paddingHorizontal: s(12), paddingVertical: vs(8), minWidth: s(40), minHeight: vs(40) },
|
|
1046
1190
|
md: { paddingHorizontal: s(16), paddingVertical: vs(12), minWidth: s(44), minHeight: vs(44) },
|
|
@@ -1076,10 +1220,10 @@ function Toggle({
|
|
|
1076
1220
|
}, [pressed, pressAnim]);
|
|
1077
1221
|
const handlePressIn = () => {
|
|
1078
1222
|
if (disabled) return;
|
|
1079
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1223
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver6, speed: 40, bounciness: 0 }).start();
|
|
1080
1224
|
};
|
|
1081
1225
|
const handlePressOut = () => {
|
|
1082
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1226
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver6, speed: 40, bounciness: 4 }).start();
|
|
1083
1227
|
};
|
|
1084
1228
|
const borderColor = pressAnim.interpolate({
|
|
1085
1229
|
inputRange: [0, 1],
|
|
@@ -1101,17 +1245,17 @@ function Toggle({
|
|
|
1101
1245
|
return prop;
|
|
1102
1246
|
};
|
|
1103
1247
|
if (pressed) {
|
|
1104
|
-
if (activeIconName) return /* @__PURE__ */
|
|
1248
|
+
if (activeIconName) return /* @__PURE__ */ React25.createElement(React25.Fragment, null, renderIcon(activeIconName, iconSize, activeIconColor ?? colors.primary));
|
|
1105
1249
|
const active = renderProp(activeIcon);
|
|
1106
|
-
if (active) return /* @__PURE__ */
|
|
1107
|
-
return /* @__PURE__ */
|
|
1250
|
+
if (active) return /* @__PURE__ */ React25.createElement(React25.Fragment, null, active);
|
|
1251
|
+
return /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "check-circle", size: iconSize, color: colors.primary });
|
|
1108
1252
|
}
|
|
1109
|
-
if (iconName) return /* @__PURE__ */
|
|
1253
|
+
if (iconName) return /* @__PURE__ */ React25.createElement(React25.Fragment, null, renderIcon(iconName, iconSize, iconColor ?? colors.mutedForeground));
|
|
1110
1254
|
const custom = renderProp(icon);
|
|
1111
|
-
if (custom) return /* @__PURE__ */
|
|
1112
|
-
return /* @__PURE__ */
|
|
1255
|
+
if (custom) return /* @__PURE__ */ React25.createElement(React25.Fragment, null, custom);
|
|
1256
|
+
return /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "circle", size: iconSize, color: colors.mutedForeground });
|
|
1113
1257
|
};
|
|
1114
|
-
return /* @__PURE__ */
|
|
1258
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles16.disabled, style] }, /* @__PURE__ */ React25.createElement(
|
|
1115
1259
|
TouchableOpacity,
|
|
1116
1260
|
{
|
|
1117
1261
|
onPress: () => {
|
|
@@ -1125,20 +1269,20 @@ function Toggle({
|
|
|
1125
1269
|
touchSoundDisabled: true,
|
|
1126
1270
|
...props
|
|
1127
1271
|
},
|
|
1128
|
-
/* @__PURE__ */
|
|
1272
|
+
/* @__PURE__ */ React25.createElement(
|
|
1129
1273
|
Animated.View,
|
|
1130
1274
|
{
|
|
1131
1275
|
style: [
|
|
1132
|
-
|
|
1276
|
+
styles16.base,
|
|
1133
1277
|
sizeStyles[size],
|
|
1134
1278
|
{ borderColor, backgroundColor, borderWidth: 2 }
|
|
1135
1279
|
]
|
|
1136
1280
|
},
|
|
1137
|
-
/* @__PURE__ */
|
|
1281
|
+
/* @__PURE__ */ React25.createElement(View, { style: styles16.inner }, /* @__PURE__ */ React25.createElement(LeftIcon, null), label ? /* @__PURE__ */ React25.createElement(Animated.Text, { style: [styles16.label, { color: textColor }], allowFontScaling: true }, label) : null)
|
|
1138
1282
|
)
|
|
1139
1283
|
));
|
|
1140
1284
|
}
|
|
1141
|
-
var
|
|
1285
|
+
var styles16 = StyleSheet.create({
|
|
1142
1286
|
base: {
|
|
1143
1287
|
borderRadius: ms(8)
|
|
1144
1288
|
},
|
|
@@ -1152,11 +1296,11 @@ var styles14 = StyleSheet.create({
|
|
|
1152
1296
|
opacity: 0.45
|
|
1153
1297
|
},
|
|
1154
1298
|
label: {
|
|
1155
|
-
|
|
1156
|
-
|
|
1299
|
+
fontFamily: "Poppins-Medium",
|
|
1300
|
+
fontSize: ms(14)
|
|
1157
1301
|
}
|
|
1158
1302
|
});
|
|
1159
|
-
var
|
|
1303
|
+
var nativeDriver7 = Platform.OS !== "web";
|
|
1160
1304
|
function RadioItem({
|
|
1161
1305
|
option,
|
|
1162
1306
|
selected,
|
|
@@ -1166,15 +1310,15 @@ function RadioItem({
|
|
|
1166
1310
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
1167
1311
|
const handlePressIn = () => {
|
|
1168
1312
|
if (option.disabled) return;
|
|
1169
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1313
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver7, speed: 40, bounciness: 0 }).start();
|
|
1170
1314
|
};
|
|
1171
1315
|
const handlePressOut = () => {
|
|
1172
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1316
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver7, speed: 40, bounciness: 4 }).start();
|
|
1173
1317
|
};
|
|
1174
|
-
return /* @__PURE__ */
|
|
1318
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1175
1319
|
TouchableOpacity,
|
|
1176
1320
|
{
|
|
1177
|
-
style:
|
|
1321
|
+
style: styles17.row,
|
|
1178
1322
|
onPress: () => {
|
|
1179
1323
|
if (!option.disabled) {
|
|
1180
1324
|
selectionAsync();
|
|
@@ -1187,30 +1331,32 @@ function RadioItem({
|
|
|
1187
1331
|
touchSoundDisabled: true,
|
|
1188
1332
|
disabled: option.disabled
|
|
1189
1333
|
},
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
View,
|
|
1334
|
+
/* @__PURE__ */ React25.createElement(
|
|
1335
|
+
Animated.View,
|
|
1192
1336
|
{
|
|
1193
1337
|
style: [
|
|
1194
|
-
|
|
1338
|
+
styles17.radio,
|
|
1195
1339
|
{
|
|
1196
1340
|
borderColor: selected ? colors.primary : colors.border,
|
|
1197
|
-
opacity: option.disabled ? 0.45 : 1
|
|
1341
|
+
opacity: option.disabled ? 0.45 : 1,
|
|
1342
|
+
transform: [{ scale: scale2 }]
|
|
1198
1343
|
}
|
|
1199
1344
|
]
|
|
1200
1345
|
},
|
|
1201
|
-
selected ? /* @__PURE__ */
|
|
1346
|
+
selected ? /* @__PURE__ */ React25.createElement(View, { style: [styles17.dot, { backgroundColor: colors.primary }] }) : null
|
|
1202
1347
|
),
|
|
1203
|
-
/* @__PURE__ */
|
|
1348
|
+
/* @__PURE__ */ React25.createElement(
|
|
1204
1349
|
Text,
|
|
1205
1350
|
{
|
|
1206
1351
|
style: [
|
|
1207
|
-
|
|
1352
|
+
styles17.label,
|
|
1208
1353
|
{ color: option.disabled ? colors.mutedForeground : colors.foreground }
|
|
1209
|
-
]
|
|
1354
|
+
],
|
|
1355
|
+
allowFontScaling: true
|
|
1210
1356
|
},
|
|
1211
1357
|
option.label
|
|
1212
1358
|
)
|
|
1213
|
-
)
|
|
1359
|
+
);
|
|
1214
1360
|
}
|
|
1215
1361
|
function RadioGroup({
|
|
1216
1362
|
options,
|
|
@@ -1219,7 +1365,7 @@ function RadioGroup({
|
|
|
1219
1365
|
orientation = "vertical",
|
|
1220
1366
|
style
|
|
1221
1367
|
}) {
|
|
1222
|
-
return /* @__PURE__ */
|
|
1368
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles17.container, orientation === "horizontal" && styles17.horizontal, style] }, options.map((option) => /* @__PURE__ */ React25.createElement(
|
|
1223
1369
|
RadioItem,
|
|
1224
1370
|
{
|
|
1225
1371
|
key: option.value,
|
|
@@ -1229,7 +1375,7 @@ function RadioGroup({
|
|
|
1229
1375
|
}
|
|
1230
1376
|
)));
|
|
1231
1377
|
}
|
|
1232
|
-
var
|
|
1378
|
+
var styles17 = StyleSheet.create({
|
|
1233
1379
|
container: {
|
|
1234
1380
|
gap: vs(12)
|
|
1235
1381
|
},
|
|
@@ -1256,11 +1402,12 @@ var styles15 = StyleSheet.create({
|
|
|
1256
1402
|
borderRadius: s(5)
|
|
1257
1403
|
},
|
|
1258
1404
|
label: {
|
|
1405
|
+
fontFamily: "Poppins-Regular",
|
|
1259
1406
|
fontSize: ms(14),
|
|
1260
1407
|
lineHeight: mvs(20)
|
|
1261
1408
|
}
|
|
1262
1409
|
});
|
|
1263
|
-
var
|
|
1410
|
+
var nativeDriver8 = Platform.OS !== "web";
|
|
1264
1411
|
function TabTrigger({
|
|
1265
1412
|
tab,
|
|
1266
1413
|
isActive,
|
|
@@ -1270,15 +1417,15 @@ function TabTrigger({
|
|
|
1270
1417
|
const { colors } = useTheme();
|
|
1271
1418
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
1272
1419
|
const handlePressIn = () => {
|
|
1273
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1420
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver8, speed: 40, bounciness: 0 }).start();
|
|
1274
1421
|
};
|
|
1275
1422
|
const handlePressOut = () => {
|
|
1276
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1423
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver8, speed: 40, bounciness: 4 }).start();
|
|
1277
1424
|
};
|
|
1278
|
-
return /* @__PURE__ */
|
|
1425
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1279
1426
|
TouchableOpacity,
|
|
1280
1427
|
{
|
|
1281
|
-
style:
|
|
1428
|
+
style: styles18.trigger,
|
|
1282
1429
|
onPress,
|
|
1283
1430
|
onPressIn: handlePressIn,
|
|
1284
1431
|
onPressOut: handlePressOut,
|
|
@@ -1286,14 +1433,15 @@ function TabTrigger({
|
|
|
1286
1433
|
activeOpacity: 1,
|
|
1287
1434
|
touchSoundDisabled: true
|
|
1288
1435
|
},
|
|
1289
|
-
/* @__PURE__ */
|
|
1436
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25.createElement(View, { style: styles18.triggerInner }, tab.icon ? typeof tab.icon === "function" ? tab.icon(isActive) : tab.icon : null, /* @__PURE__ */ React25.createElement(
|
|
1290
1437
|
Text,
|
|
1291
1438
|
{
|
|
1292
1439
|
style: [
|
|
1293
|
-
|
|
1440
|
+
styles18.triggerLabel,
|
|
1294
1441
|
{ color: isActive ? colors.foreground : colors.mutedForeground },
|
|
1295
|
-
isActive &&
|
|
1296
|
-
]
|
|
1442
|
+
isActive && styles18.activeTriggerLabel
|
|
1443
|
+
],
|
|
1444
|
+
allowFontScaling: true
|
|
1297
1445
|
},
|
|
1298
1446
|
tab.label
|
|
1299
1447
|
)))
|
|
@@ -1340,11 +1488,11 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1340
1488
|
if (!value) setInternal(v);
|
|
1341
1489
|
onValueChange?.(v);
|
|
1342
1490
|
};
|
|
1343
|
-
return /* @__PURE__ */
|
|
1491
|
+
return /* @__PURE__ */ React25.createElement(View, { style }, /* @__PURE__ */ React25.createElement(View, { style: [styles18.list, { backgroundColor: colors.muted }] }, /* @__PURE__ */ React25.createElement(
|
|
1344
1492
|
Animated.View,
|
|
1345
1493
|
{
|
|
1346
1494
|
style: [
|
|
1347
|
-
|
|
1495
|
+
styles18.pill,
|
|
1348
1496
|
{
|
|
1349
1497
|
backgroundColor: colors.background,
|
|
1350
1498
|
position: "absolute",
|
|
@@ -1361,7 +1509,7 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1361
1509
|
}
|
|
1362
1510
|
]
|
|
1363
1511
|
}
|
|
1364
|
-
), tabs.map((tab) => /* @__PURE__ */
|
|
1512
|
+
), tabs.map((tab) => /* @__PURE__ */ React25.createElement(
|
|
1365
1513
|
TabTrigger,
|
|
1366
1514
|
{
|
|
1367
1515
|
key: tab.value,
|
|
@@ -1381,9 +1529,9 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1381
1529
|
}
|
|
1382
1530
|
function TabsContent({ value, activeValue, children, style }) {
|
|
1383
1531
|
if (value !== activeValue) return null;
|
|
1384
|
-
return /* @__PURE__ */
|
|
1532
|
+
return /* @__PURE__ */ React25.createElement(View, { style }, children);
|
|
1385
1533
|
}
|
|
1386
|
-
var
|
|
1534
|
+
var styles18 = StyleSheet.create({
|
|
1387
1535
|
list: {
|
|
1388
1536
|
flexDirection: "row",
|
|
1389
1537
|
borderRadius: ms(12),
|
|
@@ -1393,9 +1541,9 @@ var styles16 = StyleSheet.create({
|
|
|
1393
1541
|
pill: {},
|
|
1394
1542
|
trigger: {
|
|
1395
1543
|
flex: 1,
|
|
1396
|
-
paddingVertical: vs(
|
|
1397
|
-
paddingHorizontal: s(
|
|
1398
|
-
borderRadius: ms(
|
|
1544
|
+
paddingVertical: vs(7),
|
|
1545
|
+
paddingHorizontal: s(10),
|
|
1546
|
+
borderRadius: ms(6),
|
|
1399
1547
|
alignItems: "center",
|
|
1400
1548
|
justifyContent: "center",
|
|
1401
1549
|
zIndex: 1
|
|
@@ -1404,19 +1552,14 @@ var styles16 = StyleSheet.create({
|
|
|
1404
1552
|
flexDirection: "row",
|
|
1405
1553
|
alignItems: "center",
|
|
1406
1554
|
justifyContent: "center",
|
|
1407
|
-
gap: s(
|
|
1408
|
-
},
|
|
1409
|
-
triggerIcon: {
|
|
1410
|
-
marginRight: s(6),
|
|
1411
|
-
alignItems: "center",
|
|
1412
|
-
justifyContent: "center"
|
|
1555
|
+
gap: s(4)
|
|
1413
1556
|
},
|
|
1414
1557
|
triggerLabel: {
|
|
1415
|
-
|
|
1416
|
-
|
|
1558
|
+
fontFamily: "Poppins-Regular",
|
|
1559
|
+
fontSize: ms(13)
|
|
1417
1560
|
},
|
|
1418
1561
|
activeTriggerLabel: {
|
|
1419
|
-
|
|
1562
|
+
fontFamily: "Poppins-Medium"
|
|
1420
1563
|
}
|
|
1421
1564
|
});
|
|
1422
1565
|
function AccordionItemComponent({
|
|
@@ -1427,7 +1570,7 @@ function AccordionItemComponent({
|
|
|
1427
1570
|
const { colors } = useTheme();
|
|
1428
1571
|
const isExpanded = useSharedValue(isOpen);
|
|
1429
1572
|
const height = useSharedValue(0);
|
|
1430
|
-
|
|
1573
|
+
React25.useEffect(() => {
|
|
1431
1574
|
isExpanded.value = isOpen;
|
|
1432
1575
|
}, [isOpen]);
|
|
1433
1576
|
const derivedHeight = useDerivedValue(
|
|
@@ -1449,21 +1592,21 @@ function AccordionItemComponent({
|
|
|
1449
1592
|
const rotationStyle = useAnimatedStyle(() => ({
|
|
1450
1593
|
transform: [{ rotate: `${derivedRotation.value * 180}deg` }]
|
|
1451
1594
|
}));
|
|
1452
|
-
return /* @__PURE__ */
|
|
1595
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles19.item, { backgroundColor: colors.card, borderColor: colors.border }] }, /* @__PURE__ */ React25.createElement(
|
|
1453
1596
|
Pressable,
|
|
1454
1597
|
{
|
|
1455
|
-
style: ({ pressed }) => [
|
|
1598
|
+
style: ({ pressed }) => [styles19.trigger, { opacity: pressed ? 0.6 : 1 }],
|
|
1456
1599
|
onPress: () => {
|
|
1457
1600
|
selectionAsync();
|
|
1458
1601
|
onToggle();
|
|
1459
1602
|
}
|
|
1460
1603
|
},
|
|
1461
|
-
/* @__PURE__ */
|
|
1462
|
-
/* @__PURE__ */
|
|
1463
|
-
), /* @__PURE__ */
|
|
1604
|
+
/* @__PURE__ */ React25.createElement(Text, { style: [styles19.triggerText, { color: colors.foreground }], allowFontScaling: true }, item.trigger),
|
|
1605
|
+
/* @__PURE__ */ React25.createElement(Animated11.View, { style: [styles19.chevron, rotationStyle] }, /* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-down", size: 18, color: colors.mutedForeground }))
|
|
1606
|
+
), /* @__PURE__ */ React25.createElement(Animated11.View, { style: bodyStyle }, /* @__PURE__ */ React25.createElement(
|
|
1464
1607
|
View,
|
|
1465
1608
|
{
|
|
1466
|
-
style:
|
|
1609
|
+
style: styles19.content,
|
|
1467
1610
|
onLayout: (e) => {
|
|
1468
1611
|
height.value = e.nativeEvent.layout.height;
|
|
1469
1612
|
}
|
|
@@ -1485,7 +1628,7 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
1485
1628
|
);
|
|
1486
1629
|
}
|
|
1487
1630
|
};
|
|
1488
|
-
return /* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles19.list, style] }, items.map((item) => /* @__PURE__ */ React25.createElement(
|
|
1489
1632
|
AccordionItemComponent,
|
|
1490
1633
|
{
|
|
1491
1634
|
key: item.value,
|
|
@@ -1495,19 +1638,25 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
1495
1638
|
}
|
|
1496
1639
|
)));
|
|
1497
1640
|
}
|
|
1498
|
-
var
|
|
1641
|
+
var styles19 = StyleSheet.create({
|
|
1642
|
+
list: {
|
|
1643
|
+
gap: s(6)
|
|
1644
|
+
},
|
|
1499
1645
|
item: {
|
|
1500
|
-
|
|
1646
|
+
borderWidth: 1,
|
|
1647
|
+
borderRadius: ms(10),
|
|
1648
|
+
overflow: "hidden"
|
|
1501
1649
|
},
|
|
1502
1650
|
trigger: {
|
|
1503
1651
|
flexDirection: "row",
|
|
1504
1652
|
justifyContent: "space-between",
|
|
1505
1653
|
alignItems: "center",
|
|
1506
|
-
|
|
1654
|
+
paddingHorizontal: s(14),
|
|
1655
|
+
paddingVertical: vs(12)
|
|
1507
1656
|
},
|
|
1508
1657
|
triggerText: {
|
|
1509
|
-
|
|
1510
|
-
|
|
1658
|
+
fontFamily: "Poppins-Medium",
|
|
1659
|
+
fontSize: ms(14),
|
|
1511
1660
|
flex: 1
|
|
1512
1661
|
},
|
|
1513
1662
|
chevron: {
|
|
@@ -1516,7 +1665,8 @@ var styles17 = StyleSheet.create({
|
|
|
1516
1665
|
// position:'absolute' is the key — the inner View escapes the animated wrapper's
|
|
1517
1666
|
// clipped height so onLayout always reports the true content height.
|
|
1518
1667
|
content: {
|
|
1519
|
-
|
|
1668
|
+
paddingHorizontal: s(14),
|
|
1669
|
+
paddingBottom: vs(12),
|
|
1520
1670
|
position: "absolute",
|
|
1521
1671
|
width: "100%"
|
|
1522
1672
|
}
|
|
@@ -1544,7 +1694,7 @@ function Slider({
|
|
|
1544
1694
|
}
|
|
1545
1695
|
onValueChange?.(v);
|
|
1546
1696
|
};
|
|
1547
|
-
return /* @__PURE__ */
|
|
1697
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles20.wrapper, style], accessibilityLabel }, label || showValue ? /* @__PURE__ */ React25.createElement(View, { style: styles20.header }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles20.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, showValue ? /* @__PURE__ */ React25.createElement(Text, { style: [styles20.valueText, { color: colors.mutedForeground }], allowFontScaling: true }, formatValue2(value)) : null) : null, /* @__PURE__ */ React25.createElement(View, { style: disabled ? styles20.disabled : void 0 }, /* @__PURE__ */ React25.createElement(
|
|
1548
1698
|
RNSlider,
|
|
1549
1699
|
{
|
|
1550
1700
|
value,
|
|
@@ -1557,12 +1707,12 @@ function Slider({
|
|
|
1557
1707
|
minimumTrackTintColor: colors.primary,
|
|
1558
1708
|
maximumTrackTintColor: colors.muted,
|
|
1559
1709
|
thumbTintColor: colors.primary,
|
|
1560
|
-
style:
|
|
1710
|
+
style: styles20.slider,
|
|
1561
1711
|
accessibilityLabel
|
|
1562
1712
|
}
|
|
1563
1713
|
)));
|
|
1564
1714
|
}
|
|
1565
|
-
var
|
|
1715
|
+
var styles20 = StyleSheet.create({
|
|
1566
1716
|
wrapper: {
|
|
1567
1717
|
gap: vs(8)
|
|
1568
1718
|
},
|
|
@@ -1572,16 +1722,16 @@ var styles18 = StyleSheet.create({
|
|
|
1572
1722
|
alignItems: "center"
|
|
1573
1723
|
},
|
|
1574
1724
|
label: {
|
|
1575
|
-
|
|
1576
|
-
|
|
1725
|
+
fontFamily: "Poppins-Medium",
|
|
1726
|
+
fontSize: ms(15)
|
|
1577
1727
|
},
|
|
1578
1728
|
valueText: {
|
|
1579
|
-
|
|
1580
|
-
|
|
1729
|
+
fontFamily: "Poppins-Medium",
|
|
1730
|
+
fontSize: ms(14)
|
|
1581
1731
|
},
|
|
1582
1732
|
slider: {
|
|
1583
1733
|
width: "100%",
|
|
1584
|
-
height: vs(
|
|
1734
|
+
height: vs(60)
|
|
1585
1735
|
},
|
|
1586
1736
|
disabled: {
|
|
1587
1737
|
opacity: 0.45
|
|
@@ -1606,7 +1756,7 @@ function Sheet({
|
|
|
1606
1756
|
ref.current?.dismiss();
|
|
1607
1757
|
}
|
|
1608
1758
|
}, [open]);
|
|
1609
|
-
const renderBackdrop = (props) => /* @__PURE__ */
|
|
1759
|
+
const renderBackdrop = (props) => /* @__PURE__ */ React25.createElement(
|
|
1610
1760
|
BottomSheetBackdrop,
|
|
1611
1761
|
{
|
|
1612
1762
|
...props,
|
|
@@ -1615,21 +1765,21 @@ function Sheet({
|
|
|
1615
1765
|
pressBehavior: "close"
|
|
1616
1766
|
}
|
|
1617
1767
|
);
|
|
1618
|
-
return /* @__PURE__ */
|
|
1768
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1619
1769
|
BottomSheetModal,
|
|
1620
1770
|
{
|
|
1621
1771
|
ref,
|
|
1622
1772
|
snapPoints,
|
|
1623
1773
|
onDismiss: onClose,
|
|
1624
1774
|
backdropComponent: renderBackdrop,
|
|
1625
|
-
backgroundStyle: [
|
|
1626
|
-
handleIndicatorStyle: [
|
|
1775
|
+
backgroundStyle: [styles21.background, { backgroundColor: colors.card }],
|
|
1776
|
+
handleIndicatorStyle: [styles21.handle, { backgroundColor: colors.border }],
|
|
1627
1777
|
enablePanDownToClose: true
|
|
1628
1778
|
},
|
|
1629
|
-
/* @__PURE__ */
|
|
1779
|
+
/* @__PURE__ */ React25.createElement(BottomSheetView, { style: [styles21.content, style] }, title || description ? /* @__PURE__ */ React25.createElement(View, { style: styles21.header }, title ? /* @__PURE__ */ React25.createElement(Text, { style: [styles21.title, { color: colors.cardForeground }], allowFontScaling: true }, title) : null, description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles21.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null) : null, children)
|
|
1630
1780
|
);
|
|
1631
1781
|
}
|
|
1632
|
-
var
|
|
1782
|
+
var styles21 = StyleSheet.create({
|
|
1633
1783
|
background: {
|
|
1634
1784
|
borderTopLeftRadius: ms(16),
|
|
1635
1785
|
borderTopRightRadius: ms(16)
|
|
@@ -1648,10 +1798,11 @@ var styles19 = StyleSheet.create({
|
|
|
1648
1798
|
marginBottom: vs(16)
|
|
1649
1799
|
},
|
|
1650
1800
|
title: {
|
|
1651
|
-
|
|
1652
|
-
|
|
1801
|
+
fontFamily: "Poppins-SemiBold",
|
|
1802
|
+
fontSize: ms(18)
|
|
1653
1803
|
},
|
|
1654
1804
|
description: {
|
|
1805
|
+
fontFamily: "Poppins-Regular",
|
|
1655
1806
|
fontSize: ms(14),
|
|
1656
1807
|
lineHeight: mvs(20)
|
|
1657
1808
|
}
|
|
@@ -1659,6 +1810,7 @@ var styles19 = StyleSheet.create({
|
|
|
1659
1810
|
var isIOS = Platform.OS === "ios";
|
|
1660
1811
|
var isAndroid = Platform.OS === "android";
|
|
1661
1812
|
var isWeb2 = Platform.OS === "web";
|
|
1813
|
+
var nativeDriver9 = Platform.OS !== "web";
|
|
1662
1814
|
function Select({
|
|
1663
1815
|
options,
|
|
1664
1816
|
value,
|
|
@@ -1677,10 +1829,10 @@ function Select({
|
|
|
1677
1829
|
const selected = options.find((o) => o.value === value);
|
|
1678
1830
|
const handlePressIn = () => {
|
|
1679
1831
|
if (disabled) return;
|
|
1680
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1832
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver9, speed: 40, bounciness: 0 }).start();
|
|
1681
1833
|
};
|
|
1682
1834
|
const handlePressOut = () => {
|
|
1683
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1835
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver9, speed: 40, bounciness: 4 }).start();
|
|
1684
1836
|
};
|
|
1685
1837
|
const handleOpen = () => {
|
|
1686
1838
|
if (disabled) return;
|
|
@@ -1702,11 +1854,11 @@ function Select({
|
|
|
1702
1854
|
}
|
|
1703
1855
|
setPickerVisible(false);
|
|
1704
1856
|
};
|
|
1705
|
-
return /* @__PURE__ */
|
|
1857
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles22.container, style] }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles22.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, !isWeb2 ? /* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }], opacity: disabled ? 0.45 : 1 } }, /* @__PURE__ */ React25.createElement(
|
|
1706
1858
|
TouchableOpacity,
|
|
1707
1859
|
{
|
|
1708
1860
|
style: [
|
|
1709
|
-
|
|
1861
|
+
styles22.trigger,
|
|
1710
1862
|
{
|
|
1711
1863
|
borderColor: error ? colors.destructive : colors.border,
|
|
1712
1864
|
backgroundColor: colors.background
|
|
@@ -1718,11 +1870,11 @@ function Select({
|
|
|
1718
1870
|
activeOpacity: 1,
|
|
1719
1871
|
touchSoundDisabled: true
|
|
1720
1872
|
},
|
|
1721
|
-
/* @__PURE__ */
|
|
1873
|
+
/* @__PURE__ */ React25.createElement(
|
|
1722
1874
|
Text,
|
|
1723
1875
|
{
|
|
1724
1876
|
style: [
|
|
1725
|
-
|
|
1877
|
+
styles22.triggerText,
|
|
1726
1878
|
{ color: selected ? colors.foreground : colors.mutedForeground }
|
|
1727
1879
|
],
|
|
1728
1880
|
numberOfLines: 1,
|
|
@@ -1730,8 +1882,8 @@ function Select({
|
|
|
1730
1882
|
},
|
|
1731
1883
|
selected?.label ?? placeholder
|
|
1732
1884
|
),
|
|
1733
|
-
/* @__PURE__ */
|
|
1734
|
-
)) : null, isIOS ? /* @__PURE__ */
|
|
1885
|
+
/* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-with-circle-down", size: 20, color: colors.mutedForeground })
|
|
1886
|
+
)) : null, isIOS ? /* @__PURE__ */ React25.createElement(
|
|
1735
1887
|
Modal,
|
|
1736
1888
|
{
|
|
1737
1889
|
visible: pickerVisible,
|
|
@@ -1739,16 +1891,16 @@ function Select({
|
|
|
1739
1891
|
animationType: "slide",
|
|
1740
1892
|
onRequestClose: handleDismiss
|
|
1741
1893
|
},
|
|
1742
|
-
/* @__PURE__ */
|
|
1743
|
-
/* @__PURE__ */
|
|
1894
|
+
/* @__PURE__ */ React25.createElement(TouchableOpacity, { style: styles22.iosBackdrop, activeOpacity: 1, onPress: handleDismiss }),
|
|
1895
|
+
/* @__PURE__ */ React25.createElement(View, { style: [styles22.iosSheet, { backgroundColor: colors.card }] }, /* @__PURE__ */ React25.createElement(View, { style: [styles22.iosToolbar, { borderBottomColor: colors.border }] }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles22.iosToolbarTitle, { color: colors.foreground }], allowFontScaling: true }, label) : /* @__PURE__ */ React25.createElement(View, null), /* @__PURE__ */ React25.createElement(TouchableOpacity, { onPress: handleConfirm, style: styles22.iosDoneBtn, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 } }, /* @__PURE__ */ React25.createElement(Text, { style: [styles22.iosDoneBtnText, { color: colors.primary }], allowFontScaling: true }, "Done"))), /* @__PURE__ */ React25.createElement(
|
|
1744
1896
|
Picker,
|
|
1745
1897
|
{
|
|
1746
1898
|
selectedValue: pendingValue ?? "",
|
|
1747
1899
|
onValueChange: (val) => setPendingValue(val),
|
|
1748
1900
|
itemStyle: { color: colors.foreground }
|
|
1749
1901
|
},
|
|
1750
|
-
!value ? /* @__PURE__ */
|
|
1751
|
-
options.map((o) => /* @__PURE__ */
|
|
1902
|
+
!value ? /* @__PURE__ */ React25.createElement(Picker.Item, { label: placeholder, value: "", color: colors.mutedForeground, enabled: false }) : null,
|
|
1903
|
+
options.map((o) => /* @__PURE__ */ React25.createElement(
|
|
1752
1904
|
Picker.Item,
|
|
1753
1905
|
{
|
|
1754
1906
|
key: o.value,
|
|
@@ -1759,7 +1911,7 @@ function Select({
|
|
|
1759
1911
|
}
|
|
1760
1912
|
))
|
|
1761
1913
|
))
|
|
1762
|
-
) : null, isAndroid ? /* @__PURE__ */
|
|
1914
|
+
) : null, isAndroid ? /* @__PURE__ */ React25.createElement(
|
|
1763
1915
|
Picker,
|
|
1764
1916
|
{
|
|
1765
1917
|
ref: pickerRef,
|
|
@@ -1773,10 +1925,10 @@ function Select({
|
|
|
1773
1925
|
mode: "dialog",
|
|
1774
1926
|
enabled: !disabled,
|
|
1775
1927
|
prompt: label,
|
|
1776
|
-
style:
|
|
1928
|
+
style: styles22.androidHiddenPicker
|
|
1777
1929
|
},
|
|
1778
|
-
!value ? /* @__PURE__ */
|
|
1779
|
-
options.map((o) => /* @__PURE__ */
|
|
1930
|
+
!value ? /* @__PURE__ */ React25.createElement(Picker.Item, { label: placeholder, value: "", enabled: false }) : null,
|
|
1931
|
+
options.map((o) => /* @__PURE__ */ React25.createElement(
|
|
1780
1932
|
Picker.Item,
|
|
1781
1933
|
{
|
|
1782
1934
|
key: o.value,
|
|
@@ -1785,7 +1937,7 @@ function Select({
|
|
|
1785
1937
|
enabled: !o.disabled
|
|
1786
1938
|
}
|
|
1787
1939
|
))
|
|
1788
|
-
) : null, isWeb2 ? /* @__PURE__ */
|
|
1940
|
+
) : null, isWeb2 ? /* @__PURE__ */ React25.createElement(
|
|
1789
1941
|
Picker,
|
|
1790
1942
|
{
|
|
1791
1943
|
selectedValue: value ?? "",
|
|
@@ -1796,7 +1948,7 @@ function Select({
|
|
|
1796
1948
|
},
|
|
1797
1949
|
enabled: !disabled,
|
|
1798
1950
|
style: [
|
|
1799
|
-
|
|
1951
|
+
styles22.webPicker,
|
|
1800
1952
|
{
|
|
1801
1953
|
borderColor: error ? colors.destructive : colors.border,
|
|
1802
1954
|
color: selected ? colors.foreground : colors.mutedForeground,
|
|
@@ -1805,8 +1957,8 @@ function Select({
|
|
|
1805
1957
|
}
|
|
1806
1958
|
]
|
|
1807
1959
|
},
|
|
1808
|
-
/* @__PURE__ */
|
|
1809
|
-
options.map((o) => /* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ React25.createElement(Picker.Item, { label: placeholder, value: "", enabled: false }),
|
|
1961
|
+
options.map((o) => /* @__PURE__ */ React25.createElement(
|
|
1810
1962
|
Picker.Item,
|
|
1811
1963
|
{
|
|
1812
1964
|
key: o.value,
|
|
@@ -1815,38 +1967,35 @@ function Select({
|
|
|
1815
1967
|
enabled: !o.disabled
|
|
1816
1968
|
}
|
|
1817
1969
|
))
|
|
1818
|
-
) : null, error ? /* @__PURE__ */
|
|
1970
|
+
) : null, error ? /* @__PURE__ */ React25.createElement(Text, { style: [styles22.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null);
|
|
1819
1971
|
}
|
|
1820
|
-
var
|
|
1972
|
+
var styles22 = StyleSheet.create({
|
|
1821
1973
|
container: {
|
|
1822
1974
|
gap: vs(8)
|
|
1823
1975
|
},
|
|
1824
1976
|
label: {
|
|
1825
|
-
|
|
1826
|
-
|
|
1977
|
+
fontFamily: "Poppins-Medium",
|
|
1978
|
+
fontSize: ms(13)
|
|
1827
1979
|
},
|
|
1828
1980
|
trigger: {
|
|
1829
1981
|
flexDirection: "row",
|
|
1830
1982
|
alignItems: "center",
|
|
1831
1983
|
justifyContent: "space-between",
|
|
1832
|
-
borderWidth: 1
|
|
1984
|
+
borderWidth: 1,
|
|
1833
1985
|
borderRadius: ms(8),
|
|
1834
|
-
paddingHorizontal: s(
|
|
1835
|
-
paddingVertical: vs(
|
|
1836
|
-
shadowColor: "#000",
|
|
1837
|
-
shadowOffset: { width: 0, height: 1 },
|
|
1838
|
-
shadowOpacity: 0.04,
|
|
1839
|
-
shadowRadius: 2,
|
|
1840
|
-
elevation: 1
|
|
1986
|
+
paddingHorizontal: s(14),
|
|
1987
|
+
paddingVertical: vs(11)
|
|
1841
1988
|
},
|
|
1842
1989
|
triggerText: {
|
|
1843
|
-
|
|
1990
|
+
fontFamily: "Poppins-Regular",
|
|
1991
|
+
fontSize: ms(15),
|
|
1844
1992
|
flex: 1
|
|
1845
1993
|
},
|
|
1846
1994
|
chevron: {
|
|
1847
1995
|
marginLeft: s(8)
|
|
1848
1996
|
},
|
|
1849
1997
|
helperText: {
|
|
1998
|
+
fontFamily: "Poppins-Regular",
|
|
1850
1999
|
fontSize: ms(13)
|
|
1851
2000
|
},
|
|
1852
2001
|
iosBackdrop: {
|
|
@@ -1867,15 +2016,15 @@ var styles20 = StyleSheet.create({
|
|
|
1867
2016
|
borderBottomWidth: 1
|
|
1868
2017
|
},
|
|
1869
2018
|
iosToolbarTitle: {
|
|
1870
|
-
|
|
1871
|
-
|
|
2019
|
+
fontFamily: "Poppins-SemiBold",
|
|
2020
|
+
fontSize: ms(17)
|
|
1872
2021
|
},
|
|
1873
2022
|
iosDoneBtn: {
|
|
1874
2023
|
padding: s(4)
|
|
1875
2024
|
},
|
|
1876
2025
|
iosDoneBtnText: {
|
|
1877
|
-
|
|
1878
|
-
|
|
2026
|
+
fontFamily: "Poppins-SemiBold",
|
|
2027
|
+
fontSize: ms(17)
|
|
1879
2028
|
},
|
|
1880
2029
|
androidHiddenPicker: {
|
|
1881
2030
|
height: 0,
|
|
@@ -1883,11 +2032,11 @@ var styles20 = StyleSheet.create({
|
|
|
1883
2032
|
position: "absolute"
|
|
1884
2033
|
},
|
|
1885
2034
|
webPicker: {
|
|
1886
|
-
borderWidth: 1
|
|
2035
|
+
borderWidth: 1,
|
|
1887
2036
|
borderRadius: ms(8),
|
|
1888
|
-
paddingHorizontal: s(
|
|
1889
|
-
paddingVertical: vs(
|
|
1890
|
-
fontSize: ms(
|
|
2037
|
+
paddingHorizontal: s(14),
|
|
2038
|
+
paddingVertical: vs(11),
|
|
2039
|
+
fontSize: ms(15)
|
|
1891
2040
|
}
|
|
1892
2041
|
});
|
|
1893
2042
|
var ToastContext = createContext({
|
|
@@ -1935,19 +2084,21 @@ function ToastNotification({ item, onDismiss }) {
|
|
|
1935
2084
|
opacity: opacity.value,
|
|
1936
2085
|
transform: [{ translateY: translateY.value }, { translateX: translateX.value }]
|
|
1937
2086
|
}));
|
|
2087
|
+
const variant = item.variant ?? "default";
|
|
1938
2088
|
const bgColor = {
|
|
1939
2089
|
default: colors.foreground,
|
|
1940
|
-
destructive: colors.
|
|
1941
|
-
success: colors.
|
|
1942
|
-
}[
|
|
2090
|
+
destructive: colors.destructiveBorder,
|
|
2091
|
+
success: colors.successBorder
|
|
2092
|
+
}[variant];
|
|
1943
2093
|
const textColor = {
|
|
1944
2094
|
default: colors.background,
|
|
1945
|
-
destructive:
|
|
1946
|
-
success:
|
|
1947
|
-
}[
|
|
1948
|
-
const
|
|
2095
|
+
destructive: "#991b1b",
|
|
2096
|
+
success: "#166534"
|
|
2097
|
+
}[variant];
|
|
2098
|
+
const borderColor = textColor;
|
|
2099
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "check-circle", size: 18, color: textColor }) : variant === "destructive" ? /* @__PURE__ */ React25.createElement(AntDesign$1, { name: "exclamation-circle", size: 18, color: textColor }) : /* @__PURE__ */ React25.createElement(Entypo$1, { name: "info-with-circle", size: 18, color: textColor });
|
|
1949
2100
|
const leftIcon = item.iconName ? renderIcon(item.iconName, 22, item.iconColor ?? textColor) : item.icon ?? defaultIcon;
|
|
1950
|
-
return /* @__PURE__ */
|
|
2101
|
+
return /* @__PURE__ */ React25.createElement(GestureDetector, { gesture: panGesture }, /* @__PURE__ */ React25.createElement(Animated11.View, { style: [styles23.toast, { backgroundColor: bgColor, borderColor }, animatedStyle] }, /* @__PURE__ */ React25.createElement(View, { style: styles23.leftIconContainer }, leftIcon), /* @__PURE__ */ React25.createElement(View, { style: styles23.toastContent }, item.title ? /* @__PURE__ */ React25.createElement(Text, { style: [styles23.toastTitle, { color: textColor }], allowFontScaling: true }, item.title) : null, item.description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles23.toastDescription, { color: textColor, opacity: 0.85 }], allowFontScaling: true }, item.description) : null), /* @__PURE__ */ React25.createElement(TouchableOpacity, { onPress: onDismiss, style: styles23.dismissButton, touchSoundDisabled: true }, /* @__PURE__ */ React25.createElement(AntDesign$1, { name: "close-circle", size: 18, color: textColor }))));
|
|
1951
2102
|
}
|
|
1952
2103
|
function ToastProvider({ children }) {
|
|
1953
2104
|
const [toasts, setToasts] = useState([]);
|
|
@@ -1966,9 +2117,9 @@ function ToastProvider({ children }) {
|
|
|
1966
2117
|
const dismiss = useCallback((id) => {
|
|
1967
2118
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
1968
2119
|
}, []);
|
|
1969
|
-
return /* @__PURE__ */
|
|
2120
|
+
return /* @__PURE__ */ React25.createElement(ToastContext.Provider, { value: { toast, dismiss } }, children, /* @__PURE__ */ React25.createElement(View, { style: [styles23.container, Platform.OS === "web" && styles23.containerWeb, { top: insets.top + 8 }], pointerEvents: "box-none" }, toasts.map((item) => /* @__PURE__ */ React25.createElement(ToastNotification, { key: item.id, item, onDismiss: () => dismiss(item.id) }))));
|
|
1970
2121
|
}
|
|
1971
|
-
var
|
|
2122
|
+
var styles23 = StyleSheet.create({
|
|
1972
2123
|
container: {
|
|
1973
2124
|
position: "absolute",
|
|
1974
2125
|
left: s(16),
|
|
@@ -1985,30 +2136,32 @@ var styles21 = StyleSheet.create({
|
|
|
1985
2136
|
toast: {
|
|
1986
2137
|
flexDirection: "row",
|
|
1987
2138
|
alignItems: "center",
|
|
1988
|
-
borderRadius: ms(
|
|
1989
|
-
|
|
1990
|
-
|
|
2139
|
+
borderRadius: ms(12),
|
|
2140
|
+
borderWidth: 1,
|
|
2141
|
+
paddingHorizontal: s(14),
|
|
2142
|
+
paddingVertical: vs(12),
|
|
1991
2143
|
shadowColor: "#000",
|
|
1992
|
-
shadowOffset: { width: 0, height:
|
|
1993
|
-
shadowOpacity: 0.
|
|
2144
|
+
shadowOffset: { width: 0, height: 3 },
|
|
2145
|
+
shadowOpacity: 0.1,
|
|
1994
2146
|
shadowRadius: 8,
|
|
1995
|
-
elevation:
|
|
2147
|
+
elevation: 5
|
|
1996
2148
|
},
|
|
1997
2149
|
toastContent: {
|
|
1998
2150
|
flex: 1,
|
|
1999
2151
|
gap: vs(4)
|
|
2000
2152
|
},
|
|
2001
2153
|
leftIconContainer: {
|
|
2002
|
-
width: s(
|
|
2154
|
+
width: s(28),
|
|
2003
2155
|
alignItems: "center",
|
|
2004
2156
|
justifyContent: "center",
|
|
2005
|
-
marginRight: s(
|
|
2157
|
+
marginRight: s(10)
|
|
2006
2158
|
},
|
|
2007
2159
|
toastTitle: {
|
|
2008
|
-
|
|
2009
|
-
|
|
2160
|
+
fontFamily: "Poppins-SemiBold",
|
|
2161
|
+
fontSize: ms(15)
|
|
2010
2162
|
},
|
|
2011
2163
|
toastDescription: {
|
|
2164
|
+
fontFamily: "Poppins-Regular",
|
|
2012
2165
|
fontSize: ms(14)
|
|
2013
2166
|
},
|
|
2014
2167
|
dismissButton: {
|
|
@@ -2033,30 +2186,33 @@ function CurrencyInput({
|
|
|
2033
2186
|
hint,
|
|
2034
2187
|
placeholder,
|
|
2035
2188
|
editable,
|
|
2189
|
+
prefixIcon,
|
|
2036
2190
|
containerStyle,
|
|
2037
2191
|
style
|
|
2038
2192
|
}) {
|
|
2039
2193
|
const handleChange = (text) => {
|
|
2040
2194
|
const withoutPrefix = prefix && text.startsWith(prefix) ? text.slice(prefix.length) : text;
|
|
2041
2195
|
const formatted = formatCurrency(withoutPrefix, thousandsSeparator);
|
|
2042
|
-
const display = formatted
|
|
2196
|
+
const display = formatted;
|
|
2043
2197
|
onChangeText?.(display);
|
|
2044
2198
|
const separatorRegex = new RegExp(`\\${thousandsSeparator}`, "g");
|
|
2045
2199
|
const raw = parseFloat(formatted.replace(separatorRegex, "") || "0");
|
|
2046
2200
|
onChangeValue?.(isNaN(raw) ? 0 : raw);
|
|
2047
2201
|
};
|
|
2048
|
-
const inputStyle = size === "large" ? { fontSize: ms(36) } : {};
|
|
2049
|
-
|
|
2202
|
+
const inputStyle = size === "large" ? { fontFamily: "Poppins-Regular", fontSize: ms(36) } : { fontFamily: "Poppins-Regular" };
|
|
2203
|
+
const displayValue = value && prefix && value.startsWith(prefix) ? value.slice(prefix.length) : value;
|
|
2204
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2050
2205
|
Input,
|
|
2051
2206
|
{
|
|
2052
|
-
value,
|
|
2207
|
+
value: displayValue,
|
|
2053
2208
|
onChangeText: handleChange,
|
|
2054
2209
|
keyboardType: "numeric",
|
|
2055
2210
|
label,
|
|
2056
2211
|
error,
|
|
2057
2212
|
hint,
|
|
2058
|
-
placeholder: placeholder ??
|
|
2213
|
+
placeholder: placeholder ?? "0",
|
|
2059
2214
|
editable,
|
|
2215
|
+
prefix: prefixIcon,
|
|
2060
2216
|
containerStyle,
|
|
2061
2217
|
style: [inputStyle, style]
|
|
2062
2218
|
}
|
|
@@ -2077,16 +2233,16 @@ function formatValue(value, prefix, showDecimals) {
|
|
|
2077
2233
|
function CurrencyDisplay({ value, prefix = "$", showDecimals = false, textColor, style }) {
|
|
2078
2234
|
const { colors } = useTheme();
|
|
2079
2235
|
const formatted = formatValue(value, prefix, showDecimals);
|
|
2080
|
-
return /* @__PURE__ */
|
|
2236
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles24.container, style] }, /* @__PURE__ */ React25.createElement(Text, { style: [styles24.amount, { color: textColor ?? colors.foreground }], allowFontScaling: true }, formatted));
|
|
2081
2237
|
}
|
|
2082
|
-
var
|
|
2238
|
+
var styles24 = StyleSheet.create({
|
|
2083
2239
|
container: {},
|
|
2084
2240
|
amount: {
|
|
2085
|
-
|
|
2086
|
-
|
|
2241
|
+
fontFamily: "Poppins-Bold",
|
|
2242
|
+
fontSize: ms(56)
|
|
2087
2243
|
}
|
|
2088
2244
|
});
|
|
2089
|
-
var
|
|
2245
|
+
var nativeDriver10 = Platform.OS !== "web";
|
|
2090
2246
|
function ListItem({
|
|
2091
2247
|
leftRender,
|
|
2092
2248
|
rightRender,
|
|
@@ -2115,7 +2271,7 @@ function ListItem({
|
|
|
2115
2271
|
if (!onPress || disabled) return;
|
|
2116
2272
|
Animated.spring(scale2, {
|
|
2117
2273
|
toValue: 0.97,
|
|
2118
|
-
useNativeDriver:
|
|
2274
|
+
useNativeDriver: nativeDriver10,
|
|
2119
2275
|
speed: 40,
|
|
2120
2276
|
bounciness: 0
|
|
2121
2277
|
}).start();
|
|
@@ -2123,7 +2279,7 @@ function ListItem({
|
|
|
2123
2279
|
const handlePressOut = () => {
|
|
2124
2280
|
Animated.spring(scale2, {
|
|
2125
2281
|
toValue: 1,
|
|
2126
|
-
useNativeDriver:
|
|
2282
|
+
useNativeDriver: nativeDriver10,
|
|
2127
2283
|
speed: 40,
|
|
2128
2284
|
bounciness: 4
|
|
2129
2285
|
}).start();
|
|
@@ -2145,10 +2301,10 @@ function ListItem({
|
|
|
2145
2301
|
shadowRadius: 6,
|
|
2146
2302
|
elevation: 2
|
|
2147
2303
|
} : {};
|
|
2148
|
-
return /* @__PURE__ */
|
|
2304
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles25.disabled] }, /* @__PURE__ */ React25.createElement(
|
|
2149
2305
|
TouchableOpacity,
|
|
2150
2306
|
{
|
|
2151
|
-
style: [
|
|
2307
|
+
style: [styles25.container, cardStyle, style],
|
|
2152
2308
|
onPress: onPress ? handlePress : void 0,
|
|
2153
2309
|
onPressIn: handlePressIn,
|
|
2154
2310
|
onPressOut: handlePressOut,
|
|
@@ -2156,56 +2312,56 @@ function ListItem({
|
|
|
2156
2312
|
activeOpacity: 1,
|
|
2157
2313
|
touchSoundDisabled: true
|
|
2158
2314
|
},
|
|
2159
|
-
effectiveLeft ? /* @__PURE__ */
|
|
2160
|
-
/* @__PURE__ */
|
|
2315
|
+
effectiveLeft ? /* @__PURE__ */ React25.createElement(View, { style: styles25.leftContainer }, effectiveLeft) : null,
|
|
2316
|
+
/* @__PURE__ */ React25.createElement(View, { style: styles25.content }, /* @__PURE__ */ React25.createElement(
|
|
2161
2317
|
Text,
|
|
2162
2318
|
{
|
|
2163
|
-
style: [
|
|
2319
|
+
style: [styles25.title, { color: colors.foreground }, titleStyle],
|
|
2164
2320
|
numberOfLines: 2,
|
|
2165
2321
|
allowFontScaling: true
|
|
2166
2322
|
},
|
|
2167
2323
|
title
|
|
2168
|
-
), subtitle ? /* @__PURE__ */
|
|
2324
|
+
), subtitle ? /* @__PURE__ */ React25.createElement(
|
|
2169
2325
|
Text,
|
|
2170
2326
|
{
|
|
2171
|
-
style: [
|
|
2327
|
+
style: [styles25.subtitle, { color: colors.mutedForeground }, subtitleStyle],
|
|
2172
2328
|
numberOfLines: 2,
|
|
2173
2329
|
allowFontScaling: true
|
|
2174
2330
|
},
|
|
2175
2331
|
subtitle
|
|
2176
|
-
) : null, caption ? /* @__PURE__ */
|
|
2332
|
+
) : null, caption ? /* @__PURE__ */ React25.createElement(
|
|
2177
2333
|
Text,
|
|
2178
2334
|
{
|
|
2179
|
-
style: [
|
|
2335
|
+
style: [styles25.caption, { color: colors.mutedForeground }, captionStyle],
|
|
2180
2336
|
numberOfLines: 1,
|
|
2181
2337
|
allowFontScaling: true
|
|
2182
2338
|
},
|
|
2183
2339
|
caption
|
|
2184
2340
|
) : null),
|
|
2185
|
-
effectiveRight !== void 0 ? /* @__PURE__ */
|
|
2341
|
+
effectiveRight !== void 0 ? /* @__PURE__ */ React25.createElement(View, { style: styles25.rightContainer }, typeof effectiveRight === "string" ? /* @__PURE__ */ React25.createElement(
|
|
2186
2342
|
Text,
|
|
2187
2343
|
{
|
|
2188
|
-
style: [
|
|
2344
|
+
style: [styles25.rightText, { color: colors.mutedForeground }],
|
|
2189
2345
|
allowFontScaling: true
|
|
2190
2346
|
},
|
|
2191
2347
|
effectiveRight
|
|
2192
|
-
) : effectiveRight) : showChevron ? /* @__PURE__ */
|
|
2193
|
-
), showSeparator ? /* @__PURE__ */
|
|
2348
|
+
) : effectiveRight) : showChevron ? /* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-with-circle-right", size: 20, color: colors.mutedForeground }) : null
|
|
2349
|
+
), showSeparator ? /* @__PURE__ */ React25.createElement(
|
|
2194
2350
|
View,
|
|
2195
2351
|
{
|
|
2196
2352
|
style: [
|
|
2197
|
-
|
|
2353
|
+
styles25.separator,
|
|
2198
2354
|
{ backgroundColor: colors.border, marginLeft: effectiveLeft ? s(16) + s(44) + s(12) : s(16) }
|
|
2199
2355
|
]
|
|
2200
2356
|
}
|
|
2201
2357
|
) : null);
|
|
2202
2358
|
}
|
|
2203
|
-
var
|
|
2359
|
+
var styles25 = StyleSheet.create({
|
|
2204
2360
|
container: {
|
|
2205
2361
|
flexDirection: "row",
|
|
2206
2362
|
alignItems: "center",
|
|
2207
2363
|
paddingHorizontal: s(16),
|
|
2208
|
-
paddingVertical: vs(
|
|
2364
|
+
paddingVertical: vs(10),
|
|
2209
2365
|
gap: s(12)
|
|
2210
2366
|
},
|
|
2211
2367
|
leftContainer: {
|
|
@@ -2220,18 +2376,18 @@ var styles23 = StyleSheet.create({
|
|
|
2220
2376
|
gap: vs(4)
|
|
2221
2377
|
},
|
|
2222
2378
|
title: {
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
lineHeight: mvs(
|
|
2379
|
+
fontFamily: "Poppins-Medium",
|
|
2380
|
+
fontSize: ms(15),
|
|
2381
|
+
lineHeight: mvs(22)
|
|
2226
2382
|
},
|
|
2227
2383
|
subtitle: {
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
lineHeight: mvs(
|
|
2384
|
+
fontFamily: "Poppins-Regular",
|
|
2385
|
+
fontSize: ms(13),
|
|
2386
|
+
lineHeight: mvs(18)
|
|
2231
2387
|
},
|
|
2232
2388
|
caption: {
|
|
2389
|
+
fontFamily: "Poppins-Regular",
|
|
2233
2390
|
fontSize: ms(12),
|
|
2234
|
-
fontWeight: "400",
|
|
2235
2391
|
lineHeight: mvs(16),
|
|
2236
2392
|
opacity: 0.7
|
|
2237
2393
|
},
|
|
@@ -2242,7 +2398,8 @@ var styles23 = StyleSheet.create({
|
|
|
2242
2398
|
maxWidth: s(160)
|
|
2243
2399
|
},
|
|
2244
2400
|
rightText: {
|
|
2245
|
-
|
|
2401
|
+
fontFamily: "Poppins-Regular",
|
|
2402
|
+
fontSize: ms(14)
|
|
2246
2403
|
},
|
|
2247
2404
|
chevron: {
|
|
2248
2405
|
marginLeft: s(4)
|
|
@@ -2255,8 +2412,8 @@ var styles23 = StyleSheet.create({
|
|
|
2255
2412
|
opacity: 0.45
|
|
2256
2413
|
}
|
|
2257
2414
|
});
|
|
2258
|
-
var
|
|
2259
|
-
function Chip({ label, selected = false, onPress, style }) {
|
|
2415
|
+
var nativeDriver11 = Platform.OS !== "web";
|
|
2416
|
+
function Chip({ label, selected = false, onPress, icon, iconName, style }) {
|
|
2260
2417
|
const { colors } = useTheme();
|
|
2261
2418
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
2262
2419
|
const pressAnim = useRef(new Animated.Value(selected ? 1 : 0)).current;
|
|
@@ -2271,7 +2428,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2271
2428
|
const handlePressIn = () => {
|
|
2272
2429
|
Animated.spring(scale2, {
|
|
2273
2430
|
toValue: 0.95,
|
|
2274
|
-
useNativeDriver:
|
|
2431
|
+
useNativeDriver: nativeDriver11,
|
|
2275
2432
|
speed: 40,
|
|
2276
2433
|
bounciness: 0
|
|
2277
2434
|
}).start();
|
|
@@ -2279,7 +2436,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2279
2436
|
const handlePressOut = () => {
|
|
2280
2437
|
Animated.spring(scale2, {
|
|
2281
2438
|
toValue: 1,
|
|
2282
|
-
useNativeDriver:
|
|
2439
|
+
useNativeDriver: nativeDriver11,
|
|
2283
2440
|
speed: 40,
|
|
2284
2441
|
bounciness: 4
|
|
2285
2442
|
}).start();
|
|
@@ -2300,7 +2457,8 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2300
2457
|
inputRange: [0, 1],
|
|
2301
2458
|
outputRange: [colors.border, colors.primary]
|
|
2302
2459
|
});
|
|
2303
|
-
|
|
2460
|
+
const resolvedIcon = iconName ? renderIcon(iconName, ms(13), selected ? colors.primaryForeground : colors.foreground) : icon;
|
|
2461
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [styles26.wrapper, { transform: [{ scale: scale2 }] }, style] }, /* @__PURE__ */ React25.createElement(
|
|
2304
2462
|
TouchableOpacity,
|
|
2305
2463
|
{
|
|
2306
2464
|
onPress: handlePress,
|
|
@@ -2309,7 +2467,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2309
2467
|
activeOpacity: 1,
|
|
2310
2468
|
touchSoundDisabled: true
|
|
2311
2469
|
},
|
|
2312
|
-
/* @__PURE__ */
|
|
2470
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: [styles26.chip, { backgroundColor, borderColor }] }, resolvedIcon ? /* @__PURE__ */ React25.createElement(View, { style: styles26.chipIcon }, resolvedIcon) : null, /* @__PURE__ */ React25.createElement(Animated.Text, { style: [styles26.label, { color: textColor }], allowFontScaling: true }, label))
|
|
2313
2471
|
));
|
|
2314
2472
|
}
|
|
2315
2473
|
function ChipGroup({ options, value, onValueChange, multiSelect = false, style }) {
|
|
@@ -2334,7 +2492,7 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
2334
2492
|
}
|
|
2335
2493
|
return optionValue === value;
|
|
2336
2494
|
};
|
|
2337
|
-
return /* @__PURE__ */
|
|
2495
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles26.group, style] }, options.map((opt) => /* @__PURE__ */ React25.createElement(
|
|
2338
2496
|
Chip,
|
|
2339
2497
|
{
|
|
2340
2498
|
key: opt.value,
|
|
@@ -2344,20 +2502,26 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
2344
2502
|
}
|
|
2345
2503
|
)));
|
|
2346
2504
|
}
|
|
2347
|
-
var
|
|
2505
|
+
var styles26 = StyleSheet.create({
|
|
2348
2506
|
wrapper: {},
|
|
2349
2507
|
chip: {
|
|
2350
2508
|
borderRadius: 999,
|
|
2351
2509
|
paddingHorizontal: s(14),
|
|
2352
|
-
paddingVertical: vs(
|
|
2353
|
-
borderWidth: 1
|
|
2510
|
+
paddingVertical: vs(5),
|
|
2511
|
+
borderWidth: 1,
|
|
2512
|
+
alignItems: "center",
|
|
2513
|
+
justifyContent: "center",
|
|
2514
|
+
flexDirection: "row",
|
|
2515
|
+
gap: s(5)
|
|
2516
|
+
},
|
|
2517
|
+
chipIcon: {
|
|
2354
2518
|
alignItems: "center",
|
|
2355
2519
|
justifyContent: "center"
|
|
2356
2520
|
},
|
|
2357
2521
|
label: {
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
lineHeight: mvs(
|
|
2522
|
+
fontFamily: "Poppins-Medium",
|
|
2523
|
+
fontSize: ms(13),
|
|
2524
|
+
lineHeight: mvs(18)
|
|
2361
2525
|
},
|
|
2362
2526
|
group: {
|
|
2363
2527
|
flexDirection: "row",
|
|
@@ -2376,43 +2540,85 @@ function ConfirmDialog({
|
|
|
2376
2540
|
onCancel
|
|
2377
2541
|
}) {
|
|
2378
2542
|
const { colors } = useTheme();
|
|
2379
|
-
|
|
2380
|
-
|
|
2543
|
+
const ref = useRef(null);
|
|
2544
|
+
useEffect(() => {
|
|
2545
|
+
if (visible) {
|
|
2546
|
+
impactLight();
|
|
2547
|
+
ref.current?.present();
|
|
2548
|
+
} else {
|
|
2549
|
+
ref.current?.dismiss();
|
|
2550
|
+
}
|
|
2551
|
+
}, [visible]);
|
|
2552
|
+
const renderBackdrop = (props) => /* @__PURE__ */ React25.createElement(
|
|
2553
|
+
BottomSheetBackdrop,
|
|
2554
|
+
{
|
|
2555
|
+
...props,
|
|
2556
|
+
disappearsOnIndex: -1,
|
|
2557
|
+
appearsOnIndex: 0,
|
|
2558
|
+
pressBehavior: "close"
|
|
2559
|
+
}
|
|
2560
|
+
);
|
|
2561
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2562
|
+
BottomSheetModal,
|
|
2381
2563
|
{
|
|
2382
|
-
|
|
2383
|
-
|
|
2564
|
+
ref,
|
|
2565
|
+
snapPoints: ["35%"],
|
|
2566
|
+
onDismiss: onCancel,
|
|
2567
|
+
backdropComponent: renderBackdrop,
|
|
2568
|
+
backgroundStyle: [styles27.background, { backgroundColor: colors.card }],
|
|
2569
|
+
handleIndicatorStyle: [styles27.handle, { backgroundColor: colors.border }],
|
|
2570
|
+
enablePanDownToClose: true
|
|
2384
2571
|
},
|
|
2385
|
-
/* @__PURE__ */
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2572
|
+
/* @__PURE__ */ React25.createElement(BottomSheetView, { style: styles27.content }, /* @__PURE__ */ React25.createElement(Text, { style: [styles27.title, { color: colors.cardForeground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles27.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null, /* @__PURE__ */ React25.createElement(View, { style: styles27.actions }, /* @__PURE__ */ React25.createElement(
|
|
2573
|
+
Button,
|
|
2574
|
+
{
|
|
2575
|
+
label: cancelLabel,
|
|
2576
|
+
variant: "outline",
|
|
2577
|
+
fullWidth: true,
|
|
2578
|
+
onPress: onCancel,
|
|
2579
|
+
icon: /* @__PURE__ */ React25.createElement(Feather$1, { name: "x", size: 15, color: colors.foreground })
|
|
2580
|
+
}
|
|
2581
|
+
), /* @__PURE__ */ React25.createElement(
|
|
2582
|
+
Button,
|
|
2583
|
+
{
|
|
2584
|
+
label: confirmLabel,
|
|
2585
|
+
variant: confirmVariant,
|
|
2586
|
+
fullWidth: true,
|
|
2587
|
+
onPress: onConfirm,
|
|
2588
|
+
icon: /* @__PURE__ */ React25.createElement(
|
|
2589
|
+
Feather$1,
|
|
2590
|
+
{
|
|
2591
|
+
name: confirmVariant === "destructive" ? "trash-2" : "check",
|
|
2592
|
+
size: 15,
|
|
2593
|
+
color: confirmVariant === "destructive" ? colors.destructiveForeground : colors.primaryForeground
|
|
2594
|
+
}
|
|
2595
|
+
)
|
|
2596
|
+
}
|
|
2597
|
+
)))
|
|
2598
|
+
);
|
|
2389
2599
|
}
|
|
2390
|
-
var
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
justifyContent: "center",
|
|
2395
|
-
alignItems: "center",
|
|
2396
|
-
padding: s(24)
|
|
2600
|
+
var styles27 = StyleSheet.create({
|
|
2601
|
+
background: {
|
|
2602
|
+
borderTopLeftRadius: ms(16),
|
|
2603
|
+
borderTopRightRadius: ms(16)
|
|
2397
2604
|
},
|
|
2398
|
-
|
|
2399
|
-
width:
|
|
2400
|
-
|
|
2401
|
-
borderRadius: ms(
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
shadowRadius: 16,
|
|
2408
|
-
elevation: 8
|
|
2605
|
+
handle: {
|
|
2606
|
+
width: s(36),
|
|
2607
|
+
height: vs(4),
|
|
2608
|
+
borderRadius: ms(2)
|
|
2609
|
+
},
|
|
2610
|
+
content: {
|
|
2611
|
+
paddingHorizontal: s(24),
|
|
2612
|
+
paddingBottom: vs(32),
|
|
2613
|
+
gap: vs(12)
|
|
2409
2614
|
},
|
|
2410
2615
|
title: {
|
|
2616
|
+
fontFamily: "Poppins-SemiBold",
|
|
2411
2617
|
fontSize: ms(18),
|
|
2412
|
-
fontWeight: "600",
|
|
2413
2618
|
lineHeight: mvs(26)
|
|
2414
2619
|
},
|
|
2415
2620
|
description: {
|
|
2621
|
+
fontFamily: "Poppins-Regular",
|
|
2416
2622
|
fontSize: ms(15),
|
|
2417
2623
|
lineHeight: mvs(22)
|
|
2418
2624
|
},
|
|
@@ -2423,9 +2629,9 @@ var styles25 = StyleSheet.create({
|
|
|
2423
2629
|
});
|
|
2424
2630
|
function LabelValue({ label, value, style }) {
|
|
2425
2631
|
const { colors } = useTheme();
|
|
2426
|
-
return /* @__PURE__ */
|
|
2632
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles28.container, style] }, /* @__PURE__ */ React25.createElement(Text, { style: [styles28.label, { color: colors.mutedForeground }], allowFontScaling: true }, label), typeof value === "string" ? /* @__PURE__ */ React25.createElement(Text, { style: [styles28.value, { color: colors.foreground }], allowFontScaling: true }, value) : value);
|
|
2427
2633
|
}
|
|
2428
|
-
var
|
|
2634
|
+
var styles28 = StyleSheet.create({
|
|
2429
2635
|
container: {
|
|
2430
2636
|
flexDirection: "row",
|
|
2431
2637
|
justifyContent: "space-between",
|
|
@@ -2433,13 +2639,14 @@ var styles26 = StyleSheet.create({
|
|
|
2433
2639
|
gap: s(12)
|
|
2434
2640
|
},
|
|
2435
2641
|
label: {
|
|
2642
|
+
fontFamily: "Poppins-Regular",
|
|
2436
2643
|
fontSize: ms(13),
|
|
2437
2644
|
lineHeight: mvs(18)
|
|
2438
2645
|
},
|
|
2439
2646
|
value: {
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
lineHeight: mvs(
|
|
2647
|
+
fontFamily: "Poppins-Medium",
|
|
2648
|
+
fontSize: ms(14),
|
|
2649
|
+
lineHeight: mvs(20),
|
|
2443
2650
|
textAlign: "right"
|
|
2444
2651
|
}
|
|
2445
2652
|
});
|
|
@@ -2475,27 +2682,27 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2475
2682
|
onChange({ month: value.month + 1, year: value.year });
|
|
2476
2683
|
}
|
|
2477
2684
|
};
|
|
2478
|
-
return /* @__PURE__ */
|
|
2685
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles29.container, style] }, /* @__PURE__ */ React25.createElement(
|
|
2479
2686
|
TouchableOpacity,
|
|
2480
2687
|
{
|
|
2481
|
-
style:
|
|
2688
|
+
style: styles29.arrow,
|
|
2482
2689
|
onPress: handlePrev,
|
|
2483
2690
|
activeOpacity: 0.6,
|
|
2484
2691
|
touchSoundDisabled: true
|
|
2485
2692
|
},
|
|
2486
|
-
/* @__PURE__ */
|
|
2487
|
-
), /* @__PURE__ */
|
|
2693
|
+
/* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-left", size: 22, color: colors.foreground })
|
|
2694
|
+
), /* @__PURE__ */ React25.createElement(Text, { style: [styles29.label, { color: colors.foreground }], allowFontScaling: true }, MONTH_NAMES[value.month - 1], " ", value.year), /* @__PURE__ */ React25.createElement(
|
|
2488
2695
|
TouchableOpacity,
|
|
2489
2696
|
{
|
|
2490
|
-
style:
|
|
2697
|
+
style: styles29.arrow,
|
|
2491
2698
|
onPress: handleNext,
|
|
2492
2699
|
activeOpacity: 0.6,
|
|
2493
2700
|
touchSoundDisabled: true
|
|
2494
2701
|
},
|
|
2495
|
-
/* @__PURE__ */
|
|
2702
|
+
/* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-right", size: 22, color: colors.foreground })
|
|
2496
2703
|
));
|
|
2497
2704
|
}
|
|
2498
|
-
var
|
|
2705
|
+
var styles29 = StyleSheet.create({
|
|
2499
2706
|
container: {
|
|
2500
2707
|
flexDirection: "row",
|
|
2501
2708
|
alignItems: "center",
|
|
@@ -2508,8 +2715,8 @@ var styles27 = StyleSheet.create({
|
|
|
2508
2715
|
justifyContent: "center"
|
|
2509
2716
|
},
|
|
2510
2717
|
label: {
|
|
2718
|
+
fontFamily: "Poppins-Medium",
|
|
2511
2719
|
fontSize: ms(17),
|
|
2512
|
-
fontWeight: "500",
|
|
2513
2720
|
lineHeight: mvs(24),
|
|
2514
2721
|
textAlign: "center",
|
|
2515
2722
|
minWidth: s(160)
|
|
@@ -2574,4 +2781,4 @@ var BREAKPOINTS = {
|
|
|
2574
2781
|
wide: 700
|
|
2575
2782
|
};
|
|
2576
2783
|
|
|
2577
|
-
export { Accordion, AlertBanner, Avatar, BREAKPOINTS, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Chip, ChipGroup, ConfirmDialog, CurrencyDisplay, CurrencyInput, CurrencyInput as CurrencyInputLarge, EmptyState, ICON_SIZES, Icon, Input, LabelValue, ListItem, MonthPicker, Progress, RADIUS, RadioGroup, SHADOWS, SPACING, Select, Separator, Sheet, Skeleton, Slider, Spinner, Switch, Tabs, TabsContent, Text2 as Text, Textarea, ThemeProvider, ToastProvider, Toggle, defaultDark, defaultLight, renderIcon, useTheme, useToast };
|
|
2784
|
+
export { Accordion, AlertBanner, Avatar, BREAKPOINTS, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Chip, ChipGroup, ConfirmDialog, CurrencyDisplay, CurrencyInput, CurrencyInput as CurrencyInputLarge, EmptyState, ICON_SIZES, Icon, IconButton, Input, LabelValue, ListItem, MonthPicker, Progress, RADIUS, RadioGroup, SHADOWS, SPACING, Select, Separator, Sheet, Skeleton, Slider, Spinner, Switch, Tabs, TabsContent, Text2 as Text, Textarea, ThemeProvider, ToastProvider, Toggle, defaultDark, defaultLight, renderIcon, useTheme, useToast };
|