@retray-dev/ui-kit 2.7.0 → 2.8.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 +32 -1
- package/README.md +2 -2
- package/dist/index.d.mts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +374 -280
- package/dist/index.mjs +303 -210
- package/package.json +1 -1
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Checkbox/Checkbox.tsx +1 -0
- package/src/components/IconButton/IconButton.tsx +147 -0
- package/src/components/IconButton/index.ts +2 -0
- package/src/components/RadioGroup/RadioGroup.tsx +1 -0
- package/src/components/Select/Select.tsx +2 -2
- package/src/components/Sheet/Sheet.tsx +2 -2
- package/src/components/Tabs/Tabs.tsx +1 -0
- package/src/components/Toast/Toast.tsx +2 -2
- package/src/components/Toggle/Toggle.tsx +1 -1
- package/src/index.ts +1 -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';
|
|
@@ -9,7 +9,7 @@ import MaterialIcons from '@expo/vector-icons/MaterialIcons';
|
|
|
9
9
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
10
10
|
import { AntDesign as AntDesign$1, Entypo as Entypo$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';
|
|
@@ -77,7 +77,7 @@ function ThemeProvider({ children, theme, colorScheme = "system" }) {
|
|
|
77
77
|
const override = resolvedScheme === "dark" ? theme?.dark : theme?.light;
|
|
78
78
|
return override ? { ...base, ...override } : base;
|
|
79
79
|
}, [resolvedScheme, theme]);
|
|
80
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ React25.createElement(ThemeContext.Provider, { value: { colors, colorScheme: resolvedScheme } }, children);
|
|
81
81
|
}
|
|
82
82
|
function useTheme() {
|
|
83
83
|
const context = useContext(ThemeContext);
|
|
@@ -149,10 +149,10 @@ function Icon({ name, size, color, family }) {
|
|
|
149
149
|
}
|
|
150
150
|
if (!resolved) return null;
|
|
151
151
|
const Component = resolved.component;
|
|
152
|
-
return
|
|
152
|
+
return React25.createElement(Component, { name, size, color });
|
|
153
153
|
}
|
|
154
154
|
function renderIcon(name, size, color) {
|
|
155
|
-
return
|
|
155
|
+
return React25.createElement(Icon, { name, size, color });
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
// src/components/Button/Button.tsx
|
|
@@ -218,7 +218,7 @@ function Button({
|
|
|
218
218
|
}[variant];
|
|
219
219
|
const effectiveIcon = iconName ? renderIcon(iconName, iconSizeMap[size], iconColor ?? labelVariantStyle.color) : typeof icon === "function" ? icon({ label, size, variant }) : icon;
|
|
220
220
|
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" || variant === "secondary" ? colors.primaryForeground : colors.foreground;
|
|
221
|
-
return /* @__PURE__ */
|
|
221
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [fullWidth && styles.fullWidth, { transform: [{ scale: scale2 }] }] }, /* @__PURE__ */ React25.createElement(
|
|
222
222
|
TouchableOpacity,
|
|
223
223
|
{
|
|
224
224
|
style: [
|
|
@@ -237,7 +237,7 @@ function Button({
|
|
|
237
237
|
onPressOut: handlePressOut,
|
|
238
238
|
...props
|
|
239
239
|
},
|
|
240
|
-
loading ? /* @__PURE__ */
|
|
240
|
+
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
241
|
));
|
|
242
242
|
}
|
|
243
243
|
var styles = StyleSheet.create({
|
|
@@ -260,6 +260,96 @@ var styles = StyleSheet.create({
|
|
|
260
260
|
marginHorizontal: s(8)
|
|
261
261
|
}
|
|
262
262
|
});
|
|
263
|
+
var nativeDriver2 = Platform.OS !== "web";
|
|
264
|
+
var sizeMap = {
|
|
265
|
+
sm: { container: s(40), icon: 18 },
|
|
266
|
+
md: { container: s(44), icon: 20 },
|
|
267
|
+
lg: { container: s(52), icon: 24 }
|
|
268
|
+
};
|
|
269
|
+
function IconButton({
|
|
270
|
+
iconName,
|
|
271
|
+
icon,
|
|
272
|
+
iconColor,
|
|
273
|
+
variant = "primary",
|
|
274
|
+
size = "md",
|
|
275
|
+
loading = false,
|
|
276
|
+
disabled,
|
|
277
|
+
style,
|
|
278
|
+
onPress,
|
|
279
|
+
...props
|
|
280
|
+
}) {
|
|
281
|
+
const { colors } = useTheme();
|
|
282
|
+
const isDisabled = disabled || loading;
|
|
283
|
+
const scale2 = useRef(new Animated.Value(1)).current;
|
|
284
|
+
const handlePressIn = () => {
|
|
285
|
+
if (isDisabled) return;
|
|
286
|
+
Animated.spring(scale2, {
|
|
287
|
+
toValue: 0.95,
|
|
288
|
+
useNativeDriver: nativeDriver2,
|
|
289
|
+
speed: 40,
|
|
290
|
+
bounciness: 0
|
|
291
|
+
}).start();
|
|
292
|
+
};
|
|
293
|
+
const handlePressOut = () => {
|
|
294
|
+
Animated.spring(scale2, {
|
|
295
|
+
toValue: 1,
|
|
296
|
+
useNativeDriver: nativeDriver2,
|
|
297
|
+
speed: 40,
|
|
298
|
+
bounciness: 4
|
|
299
|
+
}).start();
|
|
300
|
+
};
|
|
301
|
+
const handlePress = (e) => {
|
|
302
|
+
impactLight();
|
|
303
|
+
onPress?.(e);
|
|
304
|
+
};
|
|
305
|
+
const containerVariantStyle = {
|
|
306
|
+
primary: { backgroundColor: colors.primary },
|
|
307
|
+
secondary: { backgroundColor: colors.secondary },
|
|
308
|
+
outline: { backgroundColor: "transparent", borderWidth: 1.5, borderColor: colors.border },
|
|
309
|
+
ghost: { backgroundColor: "transparent" },
|
|
310
|
+
destructive: { backgroundColor: colors.destructive }
|
|
311
|
+
}[variant];
|
|
312
|
+
const defaultIconColor = {
|
|
313
|
+
primary: colors.primaryForeground,
|
|
314
|
+
secondary: colors.secondaryForeground,
|
|
315
|
+
outline: colors.foreground,
|
|
316
|
+
ghost: colors.foreground,
|
|
317
|
+
destructive: colors.destructiveForeground
|
|
318
|
+
}[variant];
|
|
319
|
+
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" || variant === "secondary" ? colors.primaryForeground : colors.foreground;
|
|
320
|
+
const { container: containerSize, icon: iconSize } = sizeMap[size];
|
|
321
|
+
const resolvedIcon = iconName ? renderIcon(iconName, iconSize, iconColor ?? defaultIconColor) : icon;
|
|
322
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25.createElement(
|
|
323
|
+
TouchableOpacity,
|
|
324
|
+
{
|
|
325
|
+
style: [
|
|
326
|
+
styles2.base,
|
|
327
|
+
containerVariantStyle,
|
|
328
|
+
{ width: containerSize, height: containerSize },
|
|
329
|
+
isDisabled && styles2.disabled,
|
|
330
|
+
style
|
|
331
|
+
],
|
|
332
|
+
disabled: isDisabled,
|
|
333
|
+
activeOpacity: 1,
|
|
334
|
+
touchSoundDisabled: true,
|
|
335
|
+
onPress: handlePress,
|
|
336
|
+
onPressIn: handlePressIn,
|
|
337
|
+
onPressOut: handlePressOut,
|
|
338
|
+
...props
|
|
339
|
+
},
|
|
340
|
+
loading ? /* @__PURE__ */ React25.createElement(ActivityIndicator, { size: "small", color: spinnerColor }) : resolvedIcon
|
|
341
|
+
));
|
|
342
|
+
}
|
|
343
|
+
var styles2 = StyleSheet.create({
|
|
344
|
+
base: {
|
|
345
|
+
borderRadius: 999,
|
|
346
|
+
alignItems: "center",
|
|
347
|
+
justifyContent: "center"
|
|
348
|
+
},
|
|
349
|
+
disabled: {
|
|
350
|
+
opacity: 0.5
|
|
351
|
+
}
|
|
352
|
+
});
|
|
263
353
|
var variantStyles = {
|
|
264
354
|
h1: { fontSize: ms(40), fontWeight: "700", lineHeight: mvs(52) },
|
|
265
355
|
h2: { fontSize: ms(28), fontWeight: "700", lineHeight: mvs(36) },
|
|
@@ -271,7 +361,7 @@ var variantStyles = {
|
|
|
271
361
|
function Text2({ variant = "body", color, style, children, ...props }) {
|
|
272
362
|
const { colors } = useTheme();
|
|
273
363
|
const defaultColor = variant === "caption" ? colors.mutedForeground : colors.foreground;
|
|
274
|
-
return /* @__PURE__ */
|
|
364
|
+
return /* @__PURE__ */ React25.createElement(
|
|
275
365
|
Text,
|
|
276
366
|
{
|
|
277
367
|
style: [variantStyles[variant], { color: color ?? defaultColor }, style],
|
|
@@ -289,24 +379,24 @@ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, p
|
|
|
289
379
|
const isPassword = type === "password";
|
|
290
380
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
291
381
|
const effectivePrefix = prefixIcon ? renderIcon(prefixIcon, 20, prefixIconColor ?? colors.mutedForeground) : prefix;
|
|
292
|
-
const effectiveSuffix = isPassword && !suffix && !suffixIcon ? /* @__PURE__ */
|
|
293
|
-
return /* @__PURE__ */
|
|
382
|
+
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;
|
|
383
|
+
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
384
|
View,
|
|
295
385
|
{
|
|
296
386
|
style: [
|
|
297
|
-
|
|
387
|
+
styles3.inputWrapper,
|
|
298
388
|
{
|
|
299
389
|
borderColor: error ? colors.destructive : focused ? colors.ring ?? colors.primary : colors.border,
|
|
300
390
|
backgroundColor: colors.background
|
|
301
391
|
}
|
|
302
392
|
]
|
|
303
393
|
},
|
|
304
|
-
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */
|
|
305
|
-
/* @__PURE__ */
|
|
394
|
+
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,
|
|
395
|
+
/* @__PURE__ */ React25.createElement(
|
|
306
396
|
TextInput,
|
|
307
397
|
{
|
|
308
398
|
style: [
|
|
309
|
-
|
|
399
|
+
styles3.input,
|
|
310
400
|
{
|
|
311
401
|
color: colors.foreground
|
|
312
402
|
},
|
|
@@ -327,10 +417,10 @@ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, p
|
|
|
327
417
|
...props
|
|
328
418
|
}
|
|
329
419
|
),
|
|
330
|
-
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */
|
|
331
|
-
), error ? /* @__PURE__ */
|
|
420
|
+
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
|
|
421
|
+
), 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
422
|
}
|
|
333
|
-
var
|
|
423
|
+
var styles3 = StyleSheet.create({
|
|
334
424
|
container: {
|
|
335
425
|
gap: vs(8)
|
|
336
426
|
},
|
|
@@ -404,9 +494,9 @@ function Badge({ label, children, variant = "default", size = "md", icon, iconNa
|
|
|
404
494
|
}[variant];
|
|
405
495
|
const effectiveIcon = iconName ? renderIcon(iconName, sizeIconSize[size], iconColor ?? textColor) : icon;
|
|
406
496
|
const content = children ?? label;
|
|
407
|
-
return /* @__PURE__ */
|
|
497
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles4.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style] }, effectiveIcon ? /* @__PURE__ */ React25.createElement(View, { style: styles4.iconContainer }, effectiveIcon) : null, typeof content === "string" ? /* @__PURE__ */ React25.createElement(Text, { style: [styles4.label, { color: textColor }, sizeFontSize[size]], allowFontScaling: true }, content) : content);
|
|
408
498
|
}
|
|
409
|
-
var
|
|
499
|
+
var styles4 = StyleSheet.create({
|
|
410
500
|
container: {
|
|
411
501
|
borderRadius: ms(6),
|
|
412
502
|
alignSelf: "flex-start",
|
|
@@ -421,7 +511,7 @@ var styles3 = StyleSheet.create({
|
|
|
421
511
|
fontWeight: "500"
|
|
422
512
|
}
|
|
423
513
|
});
|
|
424
|
-
var
|
|
514
|
+
var nativeDriver3 = Platform.OS !== "web";
|
|
425
515
|
function Card({ children, variant = "elevated", onPress, style }) {
|
|
426
516
|
const { colors } = useTheme();
|
|
427
517
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
@@ -429,7 +519,7 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
429
519
|
if (!onPress) return;
|
|
430
520
|
Animated.spring(scale2, {
|
|
431
521
|
toValue: 0.98,
|
|
432
|
-
useNativeDriver:
|
|
522
|
+
useNativeDriver: nativeDriver3,
|
|
433
523
|
speed: 40,
|
|
434
524
|
bounciness: 0
|
|
435
525
|
}).start();
|
|
@@ -438,7 +528,7 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
438
528
|
if (!onPress) return;
|
|
439
529
|
Animated.spring(scale2, {
|
|
440
530
|
toValue: 1,
|
|
441
|
-
useNativeDriver:
|
|
531
|
+
useNativeDriver: nativeDriver3,
|
|
442
532
|
speed: 40,
|
|
443
533
|
bounciness: 4
|
|
444
534
|
}).start();
|
|
@@ -471,9 +561,9 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
471
561
|
elevation: 0
|
|
472
562
|
}
|
|
473
563
|
}[variant];
|
|
474
|
-
const cardContent = /* @__PURE__ */
|
|
564
|
+
const cardContent = /* @__PURE__ */ React25.createElement(View, { style: [styles5.card, variantStyle, style] }, children);
|
|
475
565
|
if (onPress) {
|
|
476
|
-
return /* @__PURE__ */
|
|
566
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25.createElement(
|
|
477
567
|
TouchableOpacity,
|
|
478
568
|
{
|
|
479
569
|
onPress: handlePress,
|
|
@@ -488,23 +578,23 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
488
578
|
return cardContent;
|
|
489
579
|
}
|
|
490
580
|
function CardHeader({ children, style }) {
|
|
491
|
-
return /* @__PURE__ */
|
|
581
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles5.header, style] }, children);
|
|
492
582
|
}
|
|
493
583
|
function CardTitle({ children, style }) {
|
|
494
584
|
const { colors } = useTheme();
|
|
495
|
-
return /* @__PURE__ */
|
|
585
|
+
return /* @__PURE__ */ React25.createElement(Text, { style: [styles5.title, { color: colors.cardForeground }, style], allowFontScaling: true }, children);
|
|
496
586
|
}
|
|
497
587
|
function CardDescription({ children, style }) {
|
|
498
588
|
const { colors } = useTheme();
|
|
499
|
-
return /* @__PURE__ */
|
|
589
|
+
return /* @__PURE__ */ React25.createElement(Text, { style: [styles5.description, { color: colors.mutedForeground }, style], allowFontScaling: true }, children);
|
|
500
590
|
}
|
|
501
591
|
function CardContent({ children, style }) {
|
|
502
|
-
return /* @__PURE__ */
|
|
592
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles5.content, style] }, children);
|
|
503
593
|
}
|
|
504
594
|
function CardFooter({ children, style }) {
|
|
505
|
-
return /* @__PURE__ */
|
|
595
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles5.footer, style] }, children);
|
|
506
596
|
}
|
|
507
|
-
var
|
|
597
|
+
var styles5 = StyleSheet.create({
|
|
508
598
|
card: {
|
|
509
599
|
borderRadius: ms(12),
|
|
510
600
|
borderWidth: 1
|
|
@@ -535,18 +625,18 @@ var styles4 = StyleSheet.create({
|
|
|
535
625
|
});
|
|
536
626
|
function Separator({ orientation = "horizontal", style }) {
|
|
537
627
|
const { colors } = useTheme();
|
|
538
|
-
return /* @__PURE__ */
|
|
628
|
+
return /* @__PURE__ */ React25.createElement(
|
|
539
629
|
View,
|
|
540
630
|
{
|
|
541
631
|
style: [
|
|
542
|
-
orientation === "horizontal" ?
|
|
632
|
+
orientation === "horizontal" ? styles6.horizontal : styles6.vertical,
|
|
543
633
|
{ backgroundColor: colors.border },
|
|
544
634
|
style
|
|
545
635
|
]
|
|
546
636
|
}
|
|
547
637
|
);
|
|
548
638
|
}
|
|
549
|
-
var
|
|
639
|
+
var styles6 = StyleSheet.create({
|
|
550
640
|
horizontal: {
|
|
551
641
|
height: 1,
|
|
552
642
|
width: "100%"
|
|
@@ -556,14 +646,14 @@ var styles5 = StyleSheet.create({
|
|
|
556
646
|
height: "100%"
|
|
557
647
|
}
|
|
558
648
|
});
|
|
559
|
-
var
|
|
649
|
+
var sizeMap2 = {
|
|
560
650
|
sm: "small",
|
|
561
651
|
md: "small",
|
|
562
652
|
lg: "large"
|
|
563
653
|
};
|
|
564
654
|
function Spinner({ size = "md", color, ...props }) {
|
|
565
655
|
const { colors } = useTheme();
|
|
566
|
-
return /* @__PURE__ */
|
|
656
|
+
return /* @__PURE__ */ React25.createElement(ActivityIndicator, { size: sizeMap2[size], color: color ?? colors.primary, ...props });
|
|
567
657
|
}
|
|
568
658
|
function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
569
659
|
const { colors, colorScheme } = useTheme();
|
|
@@ -585,17 +675,17 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
585
675
|
inputRange: [0, 1],
|
|
586
676
|
outputRange: [-containerWidth, containerWidth]
|
|
587
677
|
});
|
|
588
|
-
return /* @__PURE__ */
|
|
678
|
+
return /* @__PURE__ */ React25.createElement(
|
|
589
679
|
View,
|
|
590
680
|
{
|
|
591
681
|
style: [
|
|
592
|
-
|
|
682
|
+
styles7.base,
|
|
593
683
|
{ width, height, borderRadius, backgroundColor: colors.muted },
|
|
594
684
|
style
|
|
595
685
|
],
|
|
596
686
|
onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width)
|
|
597
687
|
},
|
|
598
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: [StyleSheet.absoluteFill, { transform: [{ translateX }] }] }, /* @__PURE__ */ React25.createElement(
|
|
599
689
|
LinearGradient,
|
|
600
690
|
{
|
|
601
691
|
colors: ["transparent", shimmerHighlight, "transparent"],
|
|
@@ -606,12 +696,12 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
606
696
|
))
|
|
607
697
|
);
|
|
608
698
|
}
|
|
609
|
-
var
|
|
699
|
+
var styles7 = StyleSheet.create({
|
|
610
700
|
base: {
|
|
611
701
|
overflow: "hidden"
|
|
612
702
|
}
|
|
613
703
|
});
|
|
614
|
-
var
|
|
704
|
+
var sizeMap3 = {
|
|
615
705
|
sm: s(28),
|
|
616
706
|
md: s(40),
|
|
617
707
|
lg: s(56),
|
|
@@ -626,7 +716,7 @@ var fontSizeMap = {
|
|
|
626
716
|
function Avatar({ src, fallback, size = "md", style }) {
|
|
627
717
|
const { colors } = useTheme();
|
|
628
718
|
const [imageError, setImageError] = useState(false);
|
|
629
|
-
const dimension =
|
|
719
|
+
const dimension = sizeMap3[size];
|
|
630
720
|
const showFallback = !src || imageError;
|
|
631
721
|
const containerStyle = {
|
|
632
722
|
width: dimension,
|
|
@@ -635,23 +725,23 @@ function Avatar({ src, fallback, size = "md", style }) {
|
|
|
635
725
|
backgroundColor: colors.muted,
|
|
636
726
|
overflow: "hidden"
|
|
637
727
|
};
|
|
638
|
-
return /* @__PURE__ */
|
|
728
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles8.base, containerStyle, style] }, !showFallback ? /* @__PURE__ */ React25.createElement(
|
|
639
729
|
Image,
|
|
640
730
|
{
|
|
641
731
|
source: { uri: src },
|
|
642
732
|
style: { width: dimension, height: dimension },
|
|
643
733
|
onError: () => setImageError(true)
|
|
644
734
|
}
|
|
645
|
-
) : /* @__PURE__ */
|
|
735
|
+
) : /* @__PURE__ */ React25.createElement(
|
|
646
736
|
Text,
|
|
647
737
|
{
|
|
648
|
-
style: [
|
|
738
|
+
style: [styles8.fallback, { color: colors.mutedForeground, fontSize: fontSizeMap[size] }],
|
|
649
739
|
allowFontScaling: true
|
|
650
740
|
},
|
|
651
741
|
fallback?.slice(0, 2).toUpperCase() ?? "?"
|
|
652
742
|
));
|
|
653
743
|
}
|
|
654
|
-
var
|
|
744
|
+
var styles8 = StyleSheet.create({
|
|
655
745
|
base: {
|
|
656
746
|
alignItems: "center",
|
|
657
747
|
justifyContent: "center"
|
|
@@ -665,11 +755,11 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
665
755
|
const borderColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.border;
|
|
666
756
|
const titleColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.foreground;
|
|
667
757
|
const descColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.mutedForeground;
|
|
668
|
-
const defaultIcon = variant === "success" ? /* @__PURE__ */
|
|
758
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "check-circle", size: 18, color: titleColor }) : variant === "destructive" ? /* @__PURE__ */ React25.createElement(MaterialIcons$1, { name: "error-outline", size: 20, color: titleColor }) : /* @__PURE__ */ React25.createElement(Entypo$1, { name: "info-with-circle", size: 18, color: titleColor });
|
|
669
759
|
const effectiveIcon = iconName ? renderIcon(iconName, 18, iconColor ?? titleColor) : icon ?? defaultIcon;
|
|
670
|
-
return /* @__PURE__ */
|
|
760
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles9.container, { backgroundColor: colors.card, borderColor }, style] }, /* @__PURE__ */ React25.createElement(View, { style: styles9.icon }, effectiveIcon), /* @__PURE__ */ React25.createElement(View, { style: styles9.content }, title ? /* @__PURE__ */ React25.createElement(Text, { style: [styles9.title, { color: titleColor }], allowFontScaling: true }, title) : null, description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles9.description, { color: descColor }], allowFontScaling: true }, description) : null));
|
|
671
761
|
}
|
|
672
|
-
var
|
|
762
|
+
var styles9 = StyleSheet.create({
|
|
673
763
|
container: {
|
|
674
764
|
flexDirection: "row",
|
|
675
765
|
borderWidth: 1,
|
|
@@ -713,21 +803,21 @@ function Progress({ value = 0, max = 100, style }) {
|
|
|
713
803
|
bounciness: 0
|
|
714
804
|
}).start();
|
|
715
805
|
}, [percent, trackWidth]);
|
|
716
|
-
return /* @__PURE__ */
|
|
806
|
+
return /* @__PURE__ */ React25.createElement(
|
|
717
807
|
View,
|
|
718
808
|
{
|
|
719
|
-
style: [
|
|
809
|
+
style: [styles10.track, { backgroundColor: colors.muted }, style],
|
|
720
810
|
onLayout: (e) => setTrackWidth(e.nativeEvent.layout.width)
|
|
721
811
|
},
|
|
722
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ React25.createElement(
|
|
723
813
|
Animated.View,
|
|
724
814
|
{
|
|
725
|
-
style: [
|
|
815
|
+
style: [styles10.indicator, { width: animatedWidth, backgroundColor: colors.primary }]
|
|
726
816
|
}
|
|
727
817
|
)
|
|
728
818
|
);
|
|
729
819
|
}
|
|
730
|
-
var
|
|
820
|
+
var styles10 = StyleSheet.create({
|
|
731
821
|
track: {
|
|
732
822
|
height: vs(8),
|
|
733
823
|
borderRadius: 999,
|
|
@@ -743,39 +833,39 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, siz
|
|
|
743
833
|
const { colors } = useTheme();
|
|
744
834
|
const isCompact = size === "compact";
|
|
745
835
|
const effectiveIcon = iconName ? renderIcon(iconName, isCompact ? 32 : 48, iconColor ?? colors.mutedForeground) : icon;
|
|
746
|
-
return /* @__PURE__ */
|
|
836
|
+
return /* @__PURE__ */ React25.createElement(
|
|
747
837
|
View,
|
|
748
838
|
{
|
|
749
839
|
style: [
|
|
750
|
-
|
|
751
|
-
isCompact &&
|
|
840
|
+
styles11.container,
|
|
841
|
+
isCompact && styles11.containerCompact,
|
|
752
842
|
{ borderColor: colors.border },
|
|
753
843
|
style
|
|
754
844
|
]
|
|
755
845
|
},
|
|
756
|
-
effectiveIcon ? /* @__PURE__ */
|
|
846
|
+
effectiveIcon ? /* @__PURE__ */ React25.createElement(
|
|
757
847
|
View,
|
|
758
848
|
{
|
|
759
849
|
style: [
|
|
760
|
-
|
|
761
|
-
isCompact &&
|
|
850
|
+
styles11.iconWrapper,
|
|
851
|
+
isCompact && styles11.iconWrapperCompact,
|
|
762
852
|
{ backgroundColor: colors.muted }
|
|
763
853
|
]
|
|
764
854
|
},
|
|
765
855
|
effectiveIcon
|
|
766
856
|
) : null,
|
|
767
|
-
/* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ React25.createElement(View, { style: styles11.textWrapper }, /* @__PURE__ */ React25.createElement(
|
|
768
858
|
Text,
|
|
769
859
|
{
|
|
770
|
-
style: [
|
|
860
|
+
style: [styles11.title, isCompact && styles11.titleCompact, { color: colors.foreground }],
|
|
771
861
|
allowFontScaling: true
|
|
772
862
|
},
|
|
773
863
|
title
|
|
774
|
-
), description && !isCompact ? /* @__PURE__ */
|
|
775
|
-
action && !isCompact ? /* @__PURE__ */
|
|
864
|
+
), description && !isCompact ? /* @__PURE__ */ React25.createElement(Text, { style: [styles11.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null),
|
|
865
|
+
action && !isCompact ? /* @__PURE__ */ React25.createElement(View, { style: styles11.action }, action) : null
|
|
776
866
|
);
|
|
777
867
|
}
|
|
778
|
-
var
|
|
868
|
+
var styles11 = StyleSheet.create({
|
|
779
869
|
container: {
|
|
780
870
|
alignItems: "center",
|
|
781
871
|
justifyContent: "center",
|
|
@@ -837,14 +927,14 @@ function Textarea({
|
|
|
837
927
|
}) {
|
|
838
928
|
const { colors } = useTheme();
|
|
839
929
|
const [focused, setFocused] = useState(false);
|
|
840
|
-
return /* @__PURE__ */
|
|
930
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles12.container, containerStyle] }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles12.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React25.createElement(
|
|
841
931
|
TextInput,
|
|
842
932
|
{
|
|
843
933
|
multiline: true,
|
|
844
934
|
numberOfLines: rows,
|
|
845
935
|
textAlignVertical: "top",
|
|
846
936
|
style: [
|
|
847
|
-
|
|
937
|
+
styles12.input,
|
|
848
938
|
{
|
|
849
939
|
borderColor: error ? colors.destructive : focused ? colors.ring ?? colors.primary : colors.border,
|
|
850
940
|
color: colors.foreground,
|
|
@@ -866,9 +956,9 @@ function Textarea({
|
|
|
866
956
|
allowFontScaling: true,
|
|
867
957
|
...props
|
|
868
958
|
}
|
|
869
|
-
), error ? /* @__PURE__ */
|
|
959
|
+
), error ? /* @__PURE__ */ React25.createElement(Text, { style: [styles12.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null, !error && hint ? /* @__PURE__ */ React25.createElement(Text, { style: [styles12.helperText, { color: colors.mutedForeground }], allowFontScaling: true }, hint) : null);
|
|
870
960
|
}
|
|
871
|
-
var
|
|
961
|
+
var styles12 = StyleSheet.create({
|
|
872
962
|
container: {
|
|
873
963
|
gap: vs(8)
|
|
874
964
|
},
|
|
@@ -887,7 +977,7 @@ var styles11 = StyleSheet.create({
|
|
|
887
977
|
fontSize: ms(13)
|
|
888
978
|
}
|
|
889
979
|
});
|
|
890
|
-
var
|
|
980
|
+
var nativeDriver4 = Platform.OS !== "web";
|
|
891
981
|
function Checkbox({
|
|
892
982
|
checked = false,
|
|
893
983
|
onCheckedChange,
|
|
@@ -899,15 +989,15 @@ function Checkbox({
|
|
|
899
989
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
900
990
|
const handlePressIn = () => {
|
|
901
991
|
if (disabled) return;
|
|
902
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
992
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver4, speed: 40, bounciness: 0 }).start();
|
|
903
993
|
};
|
|
904
994
|
const handlePressOut = () => {
|
|
905
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
995
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver4, speed: 40, bounciness: 4 }).start();
|
|
906
996
|
};
|
|
907
|
-
return /* @__PURE__ */
|
|
997
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25.createElement(
|
|
908
998
|
TouchableOpacity,
|
|
909
999
|
{
|
|
910
|
-
style: [
|
|
1000
|
+
style: [styles13.row, style],
|
|
911
1001
|
onPress: () => {
|
|
912
1002
|
selectionAsync();
|
|
913
1003
|
onCheckedChange?.(!checked);
|
|
@@ -918,11 +1008,11 @@ function Checkbox({
|
|
|
918
1008
|
activeOpacity: 1,
|
|
919
1009
|
touchSoundDisabled: true
|
|
920
1010
|
},
|
|
921
|
-
/* @__PURE__ */
|
|
1011
|
+
/* @__PURE__ */ React25.createElement(
|
|
922
1012
|
View,
|
|
923
1013
|
{
|
|
924
1014
|
style: [
|
|
925
|
-
|
|
1015
|
+
styles13.box,
|
|
926
1016
|
{
|
|
927
1017
|
borderColor: checked ? colors.primary : colors.border,
|
|
928
1018
|
backgroundColor: checked ? colors.primary : "transparent",
|
|
@@ -930,18 +1020,19 @@ function Checkbox({
|
|
|
930
1020
|
}
|
|
931
1021
|
]
|
|
932
1022
|
},
|
|
933
|
-
checked ? /* @__PURE__ */
|
|
1023
|
+
checked ? /* @__PURE__ */ React25.createElement(View, { style: [styles13.checkmark, { borderColor: colors.primaryForeground }] }) : null
|
|
934
1024
|
),
|
|
935
|
-
label ? /* @__PURE__ */
|
|
1025
|
+
label ? /* @__PURE__ */ React25.createElement(
|
|
936
1026
|
Text,
|
|
937
1027
|
{
|
|
938
|
-
style: [
|
|
1028
|
+
style: [styles13.label, { color: disabled ? colors.mutedForeground : colors.foreground }],
|
|
1029
|
+
allowFontScaling: true
|
|
939
1030
|
},
|
|
940
1031
|
label
|
|
941
1032
|
) : null
|
|
942
1033
|
));
|
|
943
1034
|
}
|
|
944
|
-
var
|
|
1035
|
+
var styles13 = StyleSheet.create({
|
|
945
1036
|
row: {
|
|
946
1037
|
flexDirection: "row",
|
|
947
1038
|
alignItems: "center",
|
|
@@ -967,7 +1058,7 @@ var styles12 = StyleSheet.create({
|
|
|
967
1058
|
lineHeight: mvs(22)
|
|
968
1059
|
}
|
|
969
1060
|
});
|
|
970
|
-
var
|
|
1061
|
+
var nativeDriver5 = Platform.OS !== "web";
|
|
971
1062
|
var TRACK_WIDTH = s(60);
|
|
972
1063
|
var TRACK_HEIGHT = vs(36);
|
|
973
1064
|
var THUMB_SIZE = s(28);
|
|
@@ -981,7 +1072,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
981
1072
|
Animated.parallel([
|
|
982
1073
|
Animated.spring(translateX, {
|
|
983
1074
|
toValue: checked ? THUMB_TRAVEL : 0,
|
|
984
|
-
useNativeDriver:
|
|
1075
|
+
useNativeDriver: nativeDriver5,
|
|
985
1076
|
bounciness: 4
|
|
986
1077
|
}),
|
|
987
1078
|
Animated.timing(trackOpacity, {
|
|
@@ -995,7 +1086,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
995
1086
|
inputRange: [0, 1],
|
|
996
1087
|
outputRange: [colors.muted, colors.primary]
|
|
997
1088
|
});
|
|
998
|
-
return /* @__PURE__ */
|
|
1089
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [{ opacity: disabled ? 0.45 : 1 }, style] }, /* @__PURE__ */ React25.createElement(
|
|
999
1090
|
TouchableOpacity,
|
|
1000
1091
|
{
|
|
1001
1092
|
onPress: () => {
|
|
@@ -1005,20 +1096,20 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
1005
1096
|
disabled,
|
|
1006
1097
|
activeOpacity: 0.8,
|
|
1007
1098
|
touchSoundDisabled: true,
|
|
1008
|
-
style:
|
|
1099
|
+
style: styles14.wrapper
|
|
1009
1100
|
},
|
|
1010
|
-
/* @__PURE__ */
|
|
1101
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: [styles14.track, { backgroundColor: trackColor }] }, /* @__PURE__ */ React25.createElement(
|
|
1011
1102
|
Animated.View,
|
|
1012
1103
|
{
|
|
1013
1104
|
style: [
|
|
1014
|
-
|
|
1105
|
+
styles14.thumb,
|
|
1015
1106
|
{ backgroundColor: colors.primaryForeground, transform: [{ translateX }] }
|
|
1016
1107
|
]
|
|
1017
1108
|
}
|
|
1018
1109
|
))
|
|
1019
1110
|
));
|
|
1020
1111
|
}
|
|
1021
|
-
var
|
|
1112
|
+
var styles14 = StyleSheet.create({
|
|
1022
1113
|
wrapper: {},
|
|
1023
1114
|
track: {
|
|
1024
1115
|
width: TRACK_WIDTH,
|
|
@@ -1101,17 +1192,17 @@ function Toggle({
|
|
|
1101
1192
|
return prop;
|
|
1102
1193
|
};
|
|
1103
1194
|
if (pressed) {
|
|
1104
|
-
if (activeIconName) return /* @__PURE__ */
|
|
1195
|
+
if (activeIconName) return /* @__PURE__ */ React25.createElement(React25.Fragment, null, renderIcon(activeIconName, iconSize, activeIconColor ?? colors.primary));
|
|
1105
1196
|
const active = renderProp(activeIcon);
|
|
1106
|
-
if (active) return /* @__PURE__ */
|
|
1107
|
-
return /* @__PURE__ */
|
|
1197
|
+
if (active) return /* @__PURE__ */ React25.createElement(React25.Fragment, null, active);
|
|
1198
|
+
return /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "check-circle", size: iconSize, color: colors.primary });
|
|
1108
1199
|
}
|
|
1109
|
-
if (iconName) return /* @__PURE__ */
|
|
1200
|
+
if (iconName) return /* @__PURE__ */ React25.createElement(React25.Fragment, null, renderIcon(iconName, iconSize, iconColor ?? colors.mutedForeground));
|
|
1110
1201
|
const custom = renderProp(icon);
|
|
1111
|
-
if (custom) return /* @__PURE__ */
|
|
1112
|
-
return /* @__PURE__ */
|
|
1202
|
+
if (custom) return /* @__PURE__ */ React25.createElement(React25.Fragment, null, custom);
|
|
1203
|
+
return /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "circle", size: iconSize, color: colors.mutedForeground });
|
|
1113
1204
|
};
|
|
1114
|
-
return /* @__PURE__ */
|
|
1205
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles15.disabled, style] }, /* @__PURE__ */ React25.createElement(
|
|
1115
1206
|
TouchableOpacity,
|
|
1116
1207
|
{
|
|
1117
1208
|
onPress: () => {
|
|
@@ -1125,20 +1216,20 @@ function Toggle({
|
|
|
1125
1216
|
touchSoundDisabled: true,
|
|
1126
1217
|
...props
|
|
1127
1218
|
},
|
|
1128
|
-
/* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ React25.createElement(
|
|
1129
1220
|
Animated.View,
|
|
1130
1221
|
{
|
|
1131
1222
|
style: [
|
|
1132
|
-
|
|
1223
|
+
styles15.base,
|
|
1133
1224
|
sizeStyles[size],
|
|
1134
1225
|
{ borderColor, backgroundColor, borderWidth: 2 }
|
|
1135
1226
|
]
|
|
1136
1227
|
},
|
|
1137
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ React25.createElement(View, { style: styles15.inner }, /* @__PURE__ */ React25.createElement(LeftIcon, null), label ? /* @__PURE__ */ React25.createElement(Animated.Text, { style: [styles15.label, { color: textColor }], allowFontScaling: true }, label) : null)
|
|
1138
1229
|
)
|
|
1139
1230
|
));
|
|
1140
1231
|
}
|
|
1141
|
-
var
|
|
1232
|
+
var styles15 = StyleSheet.create({
|
|
1142
1233
|
base: {
|
|
1143
1234
|
borderRadius: ms(8)
|
|
1144
1235
|
},
|
|
@@ -1156,7 +1247,7 @@ var styles14 = StyleSheet.create({
|
|
|
1156
1247
|
fontWeight: "500"
|
|
1157
1248
|
}
|
|
1158
1249
|
});
|
|
1159
|
-
var
|
|
1250
|
+
var nativeDriver6 = Platform.OS !== "web";
|
|
1160
1251
|
function RadioItem({
|
|
1161
1252
|
option,
|
|
1162
1253
|
selected,
|
|
@@ -1166,15 +1257,15 @@ function RadioItem({
|
|
|
1166
1257
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
1167
1258
|
const handlePressIn = () => {
|
|
1168
1259
|
if (option.disabled) return;
|
|
1169
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1260
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver6, speed: 40, bounciness: 0 }).start();
|
|
1170
1261
|
};
|
|
1171
1262
|
const handlePressOut = () => {
|
|
1172
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1263
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver6, speed: 40, bounciness: 4 }).start();
|
|
1173
1264
|
};
|
|
1174
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25.createElement(
|
|
1175
1266
|
TouchableOpacity,
|
|
1176
1267
|
{
|
|
1177
|
-
style:
|
|
1268
|
+
style: styles16.row,
|
|
1178
1269
|
onPress: () => {
|
|
1179
1270
|
if (!option.disabled) {
|
|
1180
1271
|
selectionAsync();
|
|
@@ -1187,26 +1278,27 @@ function RadioItem({
|
|
|
1187
1278
|
touchSoundDisabled: true,
|
|
1188
1279
|
disabled: option.disabled
|
|
1189
1280
|
},
|
|
1190
|
-
/* @__PURE__ */
|
|
1281
|
+
/* @__PURE__ */ React25.createElement(
|
|
1191
1282
|
View,
|
|
1192
1283
|
{
|
|
1193
1284
|
style: [
|
|
1194
|
-
|
|
1285
|
+
styles16.radio,
|
|
1195
1286
|
{
|
|
1196
1287
|
borderColor: selected ? colors.primary : colors.border,
|
|
1197
1288
|
opacity: option.disabled ? 0.45 : 1
|
|
1198
1289
|
}
|
|
1199
1290
|
]
|
|
1200
1291
|
},
|
|
1201
|
-
selected ? /* @__PURE__ */
|
|
1292
|
+
selected ? /* @__PURE__ */ React25.createElement(View, { style: [styles16.dot, { backgroundColor: colors.primary }] }) : null
|
|
1202
1293
|
),
|
|
1203
|
-
/* @__PURE__ */
|
|
1294
|
+
/* @__PURE__ */ React25.createElement(
|
|
1204
1295
|
Text,
|
|
1205
1296
|
{
|
|
1206
1297
|
style: [
|
|
1207
|
-
|
|
1298
|
+
styles16.label,
|
|
1208
1299
|
{ color: option.disabled ? colors.mutedForeground : colors.foreground }
|
|
1209
|
-
]
|
|
1300
|
+
],
|
|
1301
|
+
allowFontScaling: true
|
|
1210
1302
|
},
|
|
1211
1303
|
option.label
|
|
1212
1304
|
)
|
|
@@ -1219,7 +1311,7 @@ function RadioGroup({
|
|
|
1219
1311
|
orientation = "vertical",
|
|
1220
1312
|
style
|
|
1221
1313
|
}) {
|
|
1222
|
-
return /* @__PURE__ */
|
|
1314
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles16.container, orientation === "horizontal" && styles16.horizontal, style] }, options.map((option) => /* @__PURE__ */ React25.createElement(
|
|
1223
1315
|
RadioItem,
|
|
1224
1316
|
{
|
|
1225
1317
|
key: option.value,
|
|
@@ -1229,7 +1321,7 @@ function RadioGroup({
|
|
|
1229
1321
|
}
|
|
1230
1322
|
)));
|
|
1231
1323
|
}
|
|
1232
|
-
var
|
|
1324
|
+
var styles16 = StyleSheet.create({
|
|
1233
1325
|
container: {
|
|
1234
1326
|
gap: vs(12)
|
|
1235
1327
|
},
|
|
@@ -1260,7 +1352,7 @@ var styles15 = StyleSheet.create({
|
|
|
1260
1352
|
lineHeight: mvs(20)
|
|
1261
1353
|
}
|
|
1262
1354
|
});
|
|
1263
|
-
var
|
|
1355
|
+
var nativeDriver7 = Platform.OS !== "web";
|
|
1264
1356
|
function TabTrigger({
|
|
1265
1357
|
tab,
|
|
1266
1358
|
isActive,
|
|
@@ -1270,15 +1362,15 @@ function TabTrigger({
|
|
|
1270
1362
|
const { colors } = useTheme();
|
|
1271
1363
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
1272
1364
|
const handlePressIn = () => {
|
|
1273
|
-
Animated.spring(scale2, { toValue: 0.95, useNativeDriver:
|
|
1365
|
+
Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver7, speed: 40, bounciness: 0 }).start();
|
|
1274
1366
|
};
|
|
1275
1367
|
const handlePressOut = () => {
|
|
1276
|
-
Animated.spring(scale2, { toValue: 1, useNativeDriver:
|
|
1368
|
+
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver7, speed: 40, bounciness: 4 }).start();
|
|
1277
1369
|
};
|
|
1278
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1279
1371
|
TouchableOpacity,
|
|
1280
1372
|
{
|
|
1281
|
-
style:
|
|
1373
|
+
style: styles17.trigger,
|
|
1282
1374
|
onPress,
|
|
1283
1375
|
onPressIn: handlePressIn,
|
|
1284
1376
|
onPressOut: handlePressOut,
|
|
@@ -1286,14 +1378,15 @@ function TabTrigger({
|
|
|
1286
1378
|
activeOpacity: 1,
|
|
1287
1379
|
touchSoundDisabled: true
|
|
1288
1380
|
},
|
|
1289
|
-
/* @__PURE__ */
|
|
1381
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React25.createElement(View, { style: styles17.triggerInner }, tab.icon ? /* @__PURE__ */ React25.createElement(View, { style: styles17.triggerIcon }, typeof tab.icon === "function" ? tab.icon(isActive) : tab.icon) : null, /* @__PURE__ */ React25.createElement(
|
|
1290
1382
|
Text,
|
|
1291
1383
|
{
|
|
1292
1384
|
style: [
|
|
1293
|
-
|
|
1385
|
+
styles17.triggerLabel,
|
|
1294
1386
|
{ color: isActive ? colors.foreground : colors.mutedForeground },
|
|
1295
|
-
isActive &&
|
|
1296
|
-
]
|
|
1387
|
+
isActive && styles17.activeTriggerLabel
|
|
1388
|
+
],
|
|
1389
|
+
allowFontScaling: true
|
|
1297
1390
|
},
|
|
1298
1391
|
tab.label
|
|
1299
1392
|
)))
|
|
@@ -1340,11 +1433,11 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1340
1433
|
if (!value) setInternal(v);
|
|
1341
1434
|
onValueChange?.(v);
|
|
1342
1435
|
};
|
|
1343
|
-
return /* @__PURE__ */
|
|
1436
|
+
return /* @__PURE__ */ React25.createElement(View, { style }, /* @__PURE__ */ React25.createElement(View, { style: [styles17.list, { backgroundColor: colors.muted }] }, /* @__PURE__ */ React25.createElement(
|
|
1344
1437
|
Animated.View,
|
|
1345
1438
|
{
|
|
1346
1439
|
style: [
|
|
1347
|
-
|
|
1440
|
+
styles17.pill,
|
|
1348
1441
|
{
|
|
1349
1442
|
backgroundColor: colors.background,
|
|
1350
1443
|
position: "absolute",
|
|
@@ -1361,7 +1454,7 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1361
1454
|
}
|
|
1362
1455
|
]
|
|
1363
1456
|
}
|
|
1364
|
-
), tabs.map((tab) => /* @__PURE__ */
|
|
1457
|
+
), tabs.map((tab) => /* @__PURE__ */ React25.createElement(
|
|
1365
1458
|
TabTrigger,
|
|
1366
1459
|
{
|
|
1367
1460
|
key: tab.value,
|
|
@@ -1381,9 +1474,9 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1381
1474
|
}
|
|
1382
1475
|
function TabsContent({ value, activeValue, children, style }) {
|
|
1383
1476
|
if (value !== activeValue) return null;
|
|
1384
|
-
return /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ React25.createElement(View, { style }, children);
|
|
1385
1478
|
}
|
|
1386
|
-
var
|
|
1479
|
+
var styles17 = StyleSheet.create({
|
|
1387
1480
|
list: {
|
|
1388
1481
|
flexDirection: "row",
|
|
1389
1482
|
borderRadius: ms(12),
|
|
@@ -1427,7 +1520,7 @@ function AccordionItemComponent({
|
|
|
1427
1520
|
const { colors } = useTheme();
|
|
1428
1521
|
const isExpanded = useSharedValue(isOpen);
|
|
1429
1522
|
const height = useSharedValue(0);
|
|
1430
|
-
|
|
1523
|
+
React25.useEffect(() => {
|
|
1431
1524
|
isExpanded.value = isOpen;
|
|
1432
1525
|
}, [isOpen]);
|
|
1433
1526
|
const derivedHeight = useDerivedValue(
|
|
@@ -1449,21 +1542,21 @@ function AccordionItemComponent({
|
|
|
1449
1542
|
const rotationStyle = useAnimatedStyle(() => ({
|
|
1450
1543
|
transform: [{ rotate: `${derivedRotation.value * 180}deg` }]
|
|
1451
1544
|
}));
|
|
1452
|
-
return /* @__PURE__ */
|
|
1545
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles18.item, { borderBottomColor: colors.border }] }, /* @__PURE__ */ React25.createElement(
|
|
1453
1546
|
Pressable,
|
|
1454
1547
|
{
|
|
1455
|
-
style: ({ pressed }) => [
|
|
1548
|
+
style: ({ pressed }) => [styles18.trigger, { opacity: pressed ? 0.6 : 1 }],
|
|
1456
1549
|
onPress: () => {
|
|
1457
1550
|
selectionAsync();
|
|
1458
1551
|
onToggle();
|
|
1459
1552
|
}
|
|
1460
1553
|
},
|
|
1461
|
-
/* @__PURE__ */
|
|
1462
|
-
/* @__PURE__ */
|
|
1463
|
-
), /* @__PURE__ */
|
|
1554
|
+
/* @__PURE__ */ React25.createElement(Text, { style: [styles18.triggerText, { color: colors.foreground }] }, item.trigger),
|
|
1555
|
+
/* @__PURE__ */ React25.createElement(Animated11.View, { style: [styles18.chevron, rotationStyle] }, /* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-down", size: 20, color: colors.foreground }))
|
|
1556
|
+
), /* @__PURE__ */ React25.createElement(Animated11.View, { style: bodyStyle }, /* @__PURE__ */ React25.createElement(
|
|
1464
1557
|
View,
|
|
1465
1558
|
{
|
|
1466
|
-
style:
|
|
1559
|
+
style: styles18.content,
|
|
1467
1560
|
onLayout: (e) => {
|
|
1468
1561
|
height.value = e.nativeEvent.layout.height;
|
|
1469
1562
|
}
|
|
@@ -1485,7 +1578,7 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
1485
1578
|
);
|
|
1486
1579
|
}
|
|
1487
1580
|
};
|
|
1488
|
-
return /* @__PURE__ */
|
|
1581
|
+
return /* @__PURE__ */ React25.createElement(View, { style }, items.map((item) => /* @__PURE__ */ React25.createElement(
|
|
1489
1582
|
AccordionItemComponent,
|
|
1490
1583
|
{
|
|
1491
1584
|
key: item.value,
|
|
@@ -1495,7 +1588,7 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
1495
1588
|
}
|
|
1496
1589
|
)));
|
|
1497
1590
|
}
|
|
1498
|
-
var
|
|
1591
|
+
var styles18 = StyleSheet.create({
|
|
1499
1592
|
item: {
|
|
1500
1593
|
borderBottomWidth: 1
|
|
1501
1594
|
},
|
|
@@ -1544,7 +1637,7 @@ function Slider({
|
|
|
1544
1637
|
}
|
|
1545
1638
|
onValueChange?.(v);
|
|
1546
1639
|
};
|
|
1547
|
-
return /* @__PURE__ */
|
|
1640
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles19.wrapper, style], accessibilityLabel }, label || showValue ? /* @__PURE__ */ React25.createElement(View, { style: styles19.header }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles19.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, showValue ? /* @__PURE__ */ React25.createElement(Text, { style: [styles19.valueText, { color: colors.mutedForeground }], allowFontScaling: true }, formatValue2(value)) : null) : null, /* @__PURE__ */ React25.createElement(View, { style: disabled ? styles19.disabled : void 0 }, /* @__PURE__ */ React25.createElement(
|
|
1548
1641
|
RNSlider,
|
|
1549
1642
|
{
|
|
1550
1643
|
value,
|
|
@@ -1557,12 +1650,12 @@ function Slider({
|
|
|
1557
1650
|
minimumTrackTintColor: colors.primary,
|
|
1558
1651
|
maximumTrackTintColor: colors.muted,
|
|
1559
1652
|
thumbTintColor: colors.primary,
|
|
1560
|
-
style:
|
|
1653
|
+
style: styles19.slider,
|
|
1561
1654
|
accessibilityLabel
|
|
1562
1655
|
}
|
|
1563
1656
|
)));
|
|
1564
1657
|
}
|
|
1565
|
-
var
|
|
1658
|
+
var styles19 = StyleSheet.create({
|
|
1566
1659
|
wrapper: {
|
|
1567
1660
|
gap: vs(8)
|
|
1568
1661
|
},
|
|
@@ -1606,7 +1699,7 @@ function Sheet({
|
|
|
1606
1699
|
ref.current?.dismiss();
|
|
1607
1700
|
}
|
|
1608
1701
|
}, [open]);
|
|
1609
|
-
const renderBackdrop = (props) => /* @__PURE__ */
|
|
1702
|
+
const renderBackdrop = (props) => /* @__PURE__ */ React25.createElement(
|
|
1610
1703
|
BottomSheetBackdrop,
|
|
1611
1704
|
{
|
|
1612
1705
|
...props,
|
|
@@ -1615,21 +1708,21 @@ function Sheet({
|
|
|
1615
1708
|
pressBehavior: "close"
|
|
1616
1709
|
}
|
|
1617
1710
|
);
|
|
1618
|
-
return /* @__PURE__ */
|
|
1711
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1619
1712
|
BottomSheetModal,
|
|
1620
1713
|
{
|
|
1621
1714
|
ref,
|
|
1622
1715
|
snapPoints,
|
|
1623
1716
|
onDismiss: onClose,
|
|
1624
1717
|
backdropComponent: renderBackdrop,
|
|
1625
|
-
backgroundStyle: [
|
|
1626
|
-
handleIndicatorStyle: [
|
|
1718
|
+
backgroundStyle: [styles20.background, { backgroundColor: colors.card }],
|
|
1719
|
+
handleIndicatorStyle: [styles20.handle, { backgroundColor: colors.border }],
|
|
1627
1720
|
enablePanDownToClose: true
|
|
1628
1721
|
},
|
|
1629
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ React25.createElement(BottomSheetView, { style: [styles20.content, style] }, title || description ? /* @__PURE__ */ React25.createElement(View, { style: styles20.header }, title ? /* @__PURE__ */ React25.createElement(Text, { style: [styles20.title, { color: colors.cardForeground }], allowFontScaling: true }, title) : null, description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles20.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null) : null, children)
|
|
1630
1723
|
);
|
|
1631
1724
|
}
|
|
1632
|
-
var
|
|
1725
|
+
var styles20 = StyleSheet.create({
|
|
1633
1726
|
background: {
|
|
1634
1727
|
borderTopLeftRadius: ms(16),
|
|
1635
1728
|
borderTopRightRadius: ms(16)
|
|
@@ -1702,11 +1795,11 @@ function Select({
|
|
|
1702
1795
|
}
|
|
1703
1796
|
setPickerVisible(false);
|
|
1704
1797
|
};
|
|
1705
|
-
return /* @__PURE__ */
|
|
1798
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles21.container, style] }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles21.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
1799
|
TouchableOpacity,
|
|
1707
1800
|
{
|
|
1708
1801
|
style: [
|
|
1709
|
-
|
|
1802
|
+
styles21.trigger,
|
|
1710
1803
|
{
|
|
1711
1804
|
borderColor: error ? colors.destructive : colors.border,
|
|
1712
1805
|
backgroundColor: colors.background
|
|
@@ -1718,11 +1811,11 @@ function Select({
|
|
|
1718
1811
|
activeOpacity: 1,
|
|
1719
1812
|
touchSoundDisabled: true
|
|
1720
1813
|
},
|
|
1721
|
-
/* @__PURE__ */
|
|
1814
|
+
/* @__PURE__ */ React25.createElement(
|
|
1722
1815
|
Text,
|
|
1723
1816
|
{
|
|
1724
1817
|
style: [
|
|
1725
|
-
|
|
1818
|
+
styles21.triggerText,
|
|
1726
1819
|
{ color: selected ? colors.foreground : colors.mutedForeground }
|
|
1727
1820
|
],
|
|
1728
1821
|
numberOfLines: 1,
|
|
@@ -1730,8 +1823,8 @@ function Select({
|
|
|
1730
1823
|
},
|
|
1731
1824
|
selected?.label ?? placeholder
|
|
1732
1825
|
),
|
|
1733
|
-
/* @__PURE__ */
|
|
1734
|
-
)) : null, isIOS ? /* @__PURE__ */
|
|
1826
|
+
/* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-with-circle-down", size: 20, color: colors.mutedForeground })
|
|
1827
|
+
)) : null, isIOS ? /* @__PURE__ */ React25.createElement(
|
|
1735
1828
|
Modal,
|
|
1736
1829
|
{
|
|
1737
1830
|
visible: pickerVisible,
|
|
@@ -1739,16 +1832,16 @@ function Select({
|
|
|
1739
1832
|
animationType: "slide",
|
|
1740
1833
|
onRequestClose: handleDismiss
|
|
1741
1834
|
},
|
|
1742
|
-
/* @__PURE__ */
|
|
1743
|
-
/* @__PURE__ */
|
|
1835
|
+
/* @__PURE__ */ React25.createElement(TouchableOpacity, { style: styles21.iosBackdrop, activeOpacity: 1, onPress: handleDismiss }),
|
|
1836
|
+
/* @__PURE__ */ React25.createElement(View, { style: [styles21.iosSheet, { backgroundColor: colors.card }] }, /* @__PURE__ */ React25.createElement(View, { style: [styles21.iosToolbar, { borderBottomColor: colors.border }] }, label ? /* @__PURE__ */ React25.createElement(Text, { style: [styles21.iosToolbarTitle, { color: colors.foreground }], allowFontScaling: true }, label) : /* @__PURE__ */ React25.createElement(View, null), /* @__PURE__ */ React25.createElement(TouchableOpacity, { onPress: handleConfirm, style: styles21.iosDoneBtn, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 } }, /* @__PURE__ */ React25.createElement(Text, { style: [styles21.iosDoneBtnText, { color: colors.primary }], allowFontScaling: true }, "Done"))), /* @__PURE__ */ React25.createElement(
|
|
1744
1837
|
Picker,
|
|
1745
1838
|
{
|
|
1746
1839
|
selectedValue: pendingValue ?? "",
|
|
1747
1840
|
onValueChange: (val) => setPendingValue(val),
|
|
1748
1841
|
itemStyle: { color: colors.foreground }
|
|
1749
1842
|
},
|
|
1750
|
-
!value ? /* @__PURE__ */
|
|
1751
|
-
options.map((o) => /* @__PURE__ */
|
|
1843
|
+
!value ? /* @__PURE__ */ React25.createElement(Picker.Item, { label: placeholder, value: "", color: colors.mutedForeground, enabled: false }) : null,
|
|
1844
|
+
options.map((o) => /* @__PURE__ */ React25.createElement(
|
|
1752
1845
|
Picker.Item,
|
|
1753
1846
|
{
|
|
1754
1847
|
key: o.value,
|
|
@@ -1759,7 +1852,7 @@ function Select({
|
|
|
1759
1852
|
}
|
|
1760
1853
|
))
|
|
1761
1854
|
))
|
|
1762
|
-
) : null, isAndroid ? /* @__PURE__ */
|
|
1855
|
+
) : null, isAndroid ? /* @__PURE__ */ React25.createElement(
|
|
1763
1856
|
Picker,
|
|
1764
1857
|
{
|
|
1765
1858
|
ref: pickerRef,
|
|
@@ -1773,10 +1866,10 @@ function Select({
|
|
|
1773
1866
|
mode: "dialog",
|
|
1774
1867
|
enabled: !disabled,
|
|
1775
1868
|
prompt: label,
|
|
1776
|
-
style:
|
|
1869
|
+
style: styles21.androidHiddenPicker
|
|
1777
1870
|
},
|
|
1778
|
-
!value ? /* @__PURE__ */
|
|
1779
|
-
options.map((o) => /* @__PURE__ */
|
|
1871
|
+
!value ? /* @__PURE__ */ React25.createElement(Picker.Item, { label: placeholder, value: "", enabled: false }) : null,
|
|
1872
|
+
options.map((o) => /* @__PURE__ */ React25.createElement(
|
|
1780
1873
|
Picker.Item,
|
|
1781
1874
|
{
|
|
1782
1875
|
key: o.value,
|
|
@@ -1785,7 +1878,7 @@ function Select({
|
|
|
1785
1878
|
enabled: !o.disabled
|
|
1786
1879
|
}
|
|
1787
1880
|
))
|
|
1788
|
-
) : null, isWeb2 ? /* @__PURE__ */
|
|
1881
|
+
) : null, isWeb2 ? /* @__PURE__ */ React25.createElement(
|
|
1789
1882
|
Picker,
|
|
1790
1883
|
{
|
|
1791
1884
|
selectedValue: value ?? "",
|
|
@@ -1796,7 +1889,7 @@ function Select({
|
|
|
1796
1889
|
},
|
|
1797
1890
|
enabled: !disabled,
|
|
1798
1891
|
style: [
|
|
1799
|
-
|
|
1892
|
+
styles21.webPicker,
|
|
1800
1893
|
{
|
|
1801
1894
|
borderColor: error ? colors.destructive : colors.border,
|
|
1802
1895
|
color: selected ? colors.foreground : colors.mutedForeground,
|
|
@@ -1805,8 +1898,8 @@ function Select({
|
|
|
1805
1898
|
}
|
|
1806
1899
|
]
|
|
1807
1900
|
},
|
|
1808
|
-
/* @__PURE__ */
|
|
1809
|
-
options.map((o) => /* @__PURE__ */
|
|
1901
|
+
/* @__PURE__ */ React25.createElement(Picker.Item, { label: placeholder, value: "", enabled: false }),
|
|
1902
|
+
options.map((o) => /* @__PURE__ */ React25.createElement(
|
|
1810
1903
|
Picker.Item,
|
|
1811
1904
|
{
|
|
1812
1905
|
key: o.value,
|
|
@@ -1815,9 +1908,9 @@ function Select({
|
|
|
1815
1908
|
enabled: !o.disabled
|
|
1816
1909
|
}
|
|
1817
1910
|
))
|
|
1818
|
-
) : null, error ? /* @__PURE__ */
|
|
1911
|
+
) : null, error ? /* @__PURE__ */ React25.createElement(Text, { style: [styles21.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null);
|
|
1819
1912
|
}
|
|
1820
|
-
var
|
|
1913
|
+
var styles21 = StyleSheet.create({
|
|
1821
1914
|
container: {
|
|
1822
1915
|
gap: vs(8)
|
|
1823
1916
|
},
|
|
@@ -1945,9 +2038,9 @@ function ToastNotification({ item, onDismiss }) {
|
|
|
1945
2038
|
destructive: colors.destructiveForeground,
|
|
1946
2039
|
success: colors.successForeground
|
|
1947
2040
|
}[item.variant ?? "default"];
|
|
1948
|
-
const defaultIcon = item.variant === "success" ? /* @__PURE__ */
|
|
2041
|
+
const defaultIcon = item.variant === "success" ? /* @__PURE__ */ React25.createElement(FontAwesome5$1, { name: "check-circle", size: 22, color: textColor }) : item.variant === "destructive" ? /* @__PURE__ */ React25.createElement(MaterialIcons$1, { name: "error-outline", size: 24, color: textColor }) : /* @__PURE__ */ React25.createElement(Entypo$1, { name: "info-with-circle", size: 22, color: textColor });
|
|
1949
2042
|
const leftIcon = item.iconName ? renderIcon(item.iconName, 22, item.iconColor ?? textColor) : item.icon ?? defaultIcon;
|
|
1950
|
-
return /* @__PURE__ */
|
|
2043
|
+
return /* @__PURE__ */ React25.createElement(GestureDetector, { gesture: panGesture }, /* @__PURE__ */ React25.createElement(Animated11.View, { style: [styles22.toast, { backgroundColor: bgColor }, animatedStyle] }, /* @__PURE__ */ React25.createElement(View, { style: styles22.leftIconContainer }, leftIcon), /* @__PURE__ */ React25.createElement(View, { style: styles22.toastContent }, item.title ? /* @__PURE__ */ React25.createElement(Text, { style: [styles22.toastTitle, { color: textColor }], allowFontScaling: true }, item.title) : null, item.description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles22.toastDescription, { color: textColor, opacity: 0.85 }], allowFontScaling: true }, item.description) : null), /* @__PURE__ */ React25.createElement(TouchableOpacity, { onPress: onDismiss, style: styles22.dismissButton, touchSoundDisabled: true }, /* @__PURE__ */ React25.createElement(AntDesign$1, { name: "close-circle", size: 18, color: textColor }))));
|
|
1951
2044
|
}
|
|
1952
2045
|
function ToastProvider({ children }) {
|
|
1953
2046
|
const [toasts, setToasts] = useState([]);
|
|
@@ -1966,9 +2059,9 @@ function ToastProvider({ children }) {
|
|
|
1966
2059
|
const dismiss = useCallback((id) => {
|
|
1967
2060
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
1968
2061
|
}, []);
|
|
1969
|
-
return /* @__PURE__ */
|
|
2062
|
+
return /* @__PURE__ */ React25.createElement(ToastContext.Provider, { value: { toast, dismiss } }, children, /* @__PURE__ */ React25.createElement(View, { style: [styles22.container, Platform.OS === "web" && styles22.containerWeb, { top: insets.top + 8 }], pointerEvents: "box-none" }, toasts.map((item) => /* @__PURE__ */ React25.createElement(ToastNotification, { key: item.id, item, onDismiss: () => dismiss(item.id) }))));
|
|
1970
2063
|
}
|
|
1971
|
-
var
|
|
2064
|
+
var styles22 = StyleSheet.create({
|
|
1972
2065
|
container: {
|
|
1973
2066
|
position: "absolute",
|
|
1974
2067
|
left: s(16),
|
|
@@ -2046,7 +2139,7 @@ function CurrencyInput({
|
|
|
2046
2139
|
onChangeValue?.(isNaN(raw) ? 0 : raw);
|
|
2047
2140
|
};
|
|
2048
2141
|
const inputStyle = size === "large" ? { fontSize: ms(36) } : {};
|
|
2049
|
-
return /* @__PURE__ */
|
|
2142
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2050
2143
|
Input,
|
|
2051
2144
|
{
|
|
2052
2145
|
value,
|
|
@@ -2077,16 +2170,16 @@ function formatValue(value, prefix, showDecimals) {
|
|
|
2077
2170
|
function CurrencyDisplay({ value, prefix = "$", showDecimals = false, textColor, style }) {
|
|
2078
2171
|
const { colors } = useTheme();
|
|
2079
2172
|
const formatted = formatValue(value, prefix, showDecimals);
|
|
2080
|
-
return /* @__PURE__ */
|
|
2173
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles23.container, style] }, /* @__PURE__ */ React25.createElement(Text, { style: [styles23.amount, { color: textColor ?? colors.foreground }], allowFontScaling: true }, formatted));
|
|
2081
2174
|
}
|
|
2082
|
-
var
|
|
2175
|
+
var styles23 = StyleSheet.create({
|
|
2083
2176
|
container: {},
|
|
2084
2177
|
amount: {
|
|
2085
2178
|
fontSize: ms(56),
|
|
2086
2179
|
fontWeight: "700"
|
|
2087
2180
|
}
|
|
2088
2181
|
});
|
|
2089
|
-
var
|
|
2182
|
+
var nativeDriver8 = Platform.OS !== "web";
|
|
2090
2183
|
function ListItem({
|
|
2091
2184
|
leftRender,
|
|
2092
2185
|
rightRender,
|
|
@@ -2115,7 +2208,7 @@ function ListItem({
|
|
|
2115
2208
|
if (!onPress || disabled) return;
|
|
2116
2209
|
Animated.spring(scale2, {
|
|
2117
2210
|
toValue: 0.97,
|
|
2118
|
-
useNativeDriver:
|
|
2211
|
+
useNativeDriver: nativeDriver8,
|
|
2119
2212
|
speed: 40,
|
|
2120
2213
|
bounciness: 0
|
|
2121
2214
|
}).start();
|
|
@@ -2123,7 +2216,7 @@ function ListItem({
|
|
|
2123
2216
|
const handlePressOut = () => {
|
|
2124
2217
|
Animated.spring(scale2, {
|
|
2125
2218
|
toValue: 1,
|
|
2126
|
-
useNativeDriver:
|
|
2219
|
+
useNativeDriver: nativeDriver8,
|
|
2127
2220
|
speed: 40,
|
|
2128
2221
|
bounciness: 4
|
|
2129
2222
|
}).start();
|
|
@@ -2145,10 +2238,10 @@ function ListItem({
|
|
|
2145
2238
|
shadowRadius: 6,
|
|
2146
2239
|
elevation: 2
|
|
2147
2240
|
} : {};
|
|
2148
|
-
return /* @__PURE__ */
|
|
2241
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles24.disabled] }, /* @__PURE__ */ React25.createElement(
|
|
2149
2242
|
TouchableOpacity,
|
|
2150
2243
|
{
|
|
2151
|
-
style: [
|
|
2244
|
+
style: [styles24.container, cardStyle, style],
|
|
2152
2245
|
onPress: onPress ? handlePress : void 0,
|
|
2153
2246
|
onPressIn: handlePressIn,
|
|
2154
2247
|
onPressOut: handlePressOut,
|
|
@@ -2156,51 +2249,51 @@ function ListItem({
|
|
|
2156
2249
|
activeOpacity: 1,
|
|
2157
2250
|
touchSoundDisabled: true
|
|
2158
2251
|
},
|
|
2159
|
-
effectiveLeft ? /* @__PURE__ */
|
|
2160
|
-
/* @__PURE__ */
|
|
2252
|
+
effectiveLeft ? /* @__PURE__ */ React25.createElement(View, { style: styles24.leftContainer }, effectiveLeft) : null,
|
|
2253
|
+
/* @__PURE__ */ React25.createElement(View, { style: styles24.content }, /* @__PURE__ */ React25.createElement(
|
|
2161
2254
|
Text,
|
|
2162
2255
|
{
|
|
2163
|
-
style: [
|
|
2256
|
+
style: [styles24.title, { color: colors.foreground }, titleStyle],
|
|
2164
2257
|
numberOfLines: 2,
|
|
2165
2258
|
allowFontScaling: true
|
|
2166
2259
|
},
|
|
2167
2260
|
title
|
|
2168
|
-
), subtitle ? /* @__PURE__ */
|
|
2261
|
+
), subtitle ? /* @__PURE__ */ React25.createElement(
|
|
2169
2262
|
Text,
|
|
2170
2263
|
{
|
|
2171
|
-
style: [
|
|
2264
|
+
style: [styles24.subtitle, { color: colors.mutedForeground }, subtitleStyle],
|
|
2172
2265
|
numberOfLines: 2,
|
|
2173
2266
|
allowFontScaling: true
|
|
2174
2267
|
},
|
|
2175
2268
|
subtitle
|
|
2176
|
-
) : null, caption ? /* @__PURE__ */
|
|
2269
|
+
) : null, caption ? /* @__PURE__ */ React25.createElement(
|
|
2177
2270
|
Text,
|
|
2178
2271
|
{
|
|
2179
|
-
style: [
|
|
2272
|
+
style: [styles24.caption, { color: colors.mutedForeground }, captionStyle],
|
|
2180
2273
|
numberOfLines: 1,
|
|
2181
2274
|
allowFontScaling: true
|
|
2182
2275
|
},
|
|
2183
2276
|
caption
|
|
2184
2277
|
) : null),
|
|
2185
|
-
effectiveRight !== void 0 ? /* @__PURE__ */
|
|
2278
|
+
effectiveRight !== void 0 ? /* @__PURE__ */ React25.createElement(View, { style: styles24.rightContainer }, typeof effectiveRight === "string" ? /* @__PURE__ */ React25.createElement(
|
|
2186
2279
|
Text,
|
|
2187
2280
|
{
|
|
2188
|
-
style: [
|
|
2281
|
+
style: [styles24.rightText, { color: colors.mutedForeground }],
|
|
2189
2282
|
allowFontScaling: true
|
|
2190
2283
|
},
|
|
2191
2284
|
effectiveRight
|
|
2192
|
-
) : effectiveRight) : showChevron ? /* @__PURE__ */
|
|
2193
|
-
), showSeparator ? /* @__PURE__ */
|
|
2285
|
+
) : effectiveRight) : showChevron ? /* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-with-circle-right", size: 20, color: colors.mutedForeground }) : null
|
|
2286
|
+
), showSeparator ? /* @__PURE__ */ React25.createElement(
|
|
2194
2287
|
View,
|
|
2195
2288
|
{
|
|
2196
2289
|
style: [
|
|
2197
|
-
|
|
2290
|
+
styles24.separator,
|
|
2198
2291
|
{ backgroundColor: colors.border, marginLeft: effectiveLeft ? s(16) + s(44) + s(12) : s(16) }
|
|
2199
2292
|
]
|
|
2200
2293
|
}
|
|
2201
2294
|
) : null);
|
|
2202
2295
|
}
|
|
2203
|
-
var
|
|
2296
|
+
var styles24 = StyleSheet.create({
|
|
2204
2297
|
container: {
|
|
2205
2298
|
flexDirection: "row",
|
|
2206
2299
|
alignItems: "center",
|
|
@@ -2255,7 +2348,7 @@ var styles23 = StyleSheet.create({
|
|
|
2255
2348
|
opacity: 0.45
|
|
2256
2349
|
}
|
|
2257
2350
|
});
|
|
2258
|
-
var
|
|
2351
|
+
var nativeDriver9 = Platform.OS !== "web";
|
|
2259
2352
|
function Chip({ label, selected = false, onPress, style }) {
|
|
2260
2353
|
const { colors } = useTheme();
|
|
2261
2354
|
const scale2 = useRef(new Animated.Value(1)).current;
|
|
@@ -2271,7 +2364,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2271
2364
|
const handlePressIn = () => {
|
|
2272
2365
|
Animated.spring(scale2, {
|
|
2273
2366
|
toValue: 0.95,
|
|
2274
|
-
useNativeDriver:
|
|
2367
|
+
useNativeDriver: nativeDriver9,
|
|
2275
2368
|
speed: 40,
|
|
2276
2369
|
bounciness: 0
|
|
2277
2370
|
}).start();
|
|
@@ -2279,7 +2372,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2279
2372
|
const handlePressOut = () => {
|
|
2280
2373
|
Animated.spring(scale2, {
|
|
2281
2374
|
toValue: 1,
|
|
2282
|
-
useNativeDriver:
|
|
2375
|
+
useNativeDriver: nativeDriver9,
|
|
2283
2376
|
speed: 40,
|
|
2284
2377
|
bounciness: 4
|
|
2285
2378
|
}).start();
|
|
@@ -2300,7 +2393,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2300
2393
|
inputRange: [0, 1],
|
|
2301
2394
|
outputRange: [colors.border, colors.primary]
|
|
2302
2395
|
});
|
|
2303
|
-
return /* @__PURE__ */
|
|
2396
|
+
return /* @__PURE__ */ React25.createElement(Animated.View, { style: [styles25.wrapper, { transform: [{ scale: scale2 }] }, style] }, /* @__PURE__ */ React25.createElement(
|
|
2304
2397
|
TouchableOpacity,
|
|
2305
2398
|
{
|
|
2306
2399
|
onPress: handlePress,
|
|
@@ -2309,7 +2402,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2309
2402
|
activeOpacity: 1,
|
|
2310
2403
|
touchSoundDisabled: true
|
|
2311
2404
|
},
|
|
2312
|
-
/* @__PURE__ */
|
|
2405
|
+
/* @__PURE__ */ React25.createElement(Animated.View, { style: [styles25.chip, { backgroundColor, borderColor }] }, /* @__PURE__ */ React25.createElement(Animated.Text, { style: [styles25.label, { color: textColor }], allowFontScaling: true }, label))
|
|
2313
2406
|
));
|
|
2314
2407
|
}
|
|
2315
2408
|
function ChipGroup({ options, value, onValueChange, multiSelect = false, style }) {
|
|
@@ -2334,7 +2427,7 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
2334
2427
|
}
|
|
2335
2428
|
return optionValue === value;
|
|
2336
2429
|
};
|
|
2337
|
-
return /* @__PURE__ */
|
|
2430
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles25.group, style] }, options.map((opt) => /* @__PURE__ */ React25.createElement(
|
|
2338
2431
|
Chip,
|
|
2339
2432
|
{
|
|
2340
2433
|
key: opt.value,
|
|
@@ -2344,7 +2437,7 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
2344
2437
|
}
|
|
2345
2438
|
)));
|
|
2346
2439
|
}
|
|
2347
|
-
var
|
|
2440
|
+
var styles25 = StyleSheet.create({
|
|
2348
2441
|
wrapper: {},
|
|
2349
2442
|
chip: {
|
|
2350
2443
|
borderRadius: 999,
|
|
@@ -2376,18 +2469,18 @@ function ConfirmDialog({
|
|
|
2376
2469
|
onCancel
|
|
2377
2470
|
}) {
|
|
2378
2471
|
const { colors } = useTheme();
|
|
2379
|
-
return /* @__PURE__ */
|
|
2472
|
+
return /* @__PURE__ */ React25.createElement(Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onCancel }, /* @__PURE__ */ React25.createElement(TouchableOpacity, { style: styles26.overlay, activeOpacity: 1, onPress: onCancel }, /* @__PURE__ */ React25.createElement(
|
|
2380
2473
|
View,
|
|
2381
2474
|
{
|
|
2382
|
-
style: [
|
|
2475
|
+
style: [styles26.dialog, { backgroundColor: colors.card }],
|
|
2383
2476
|
onStartShouldSetResponder: () => true
|
|
2384
2477
|
},
|
|
2385
|
-
/* @__PURE__ */
|
|
2386
|
-
description ? /* @__PURE__ */
|
|
2387
|
-
/* @__PURE__ */
|
|
2478
|
+
/* @__PURE__ */ React25.createElement(Text, { style: [styles26.title, { color: colors.cardForeground }], allowFontScaling: true }, title),
|
|
2479
|
+
description ? /* @__PURE__ */ React25.createElement(Text, { style: [styles26.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null,
|
|
2480
|
+
/* @__PURE__ */ React25.createElement(View, { style: styles26.actions }, /* @__PURE__ */ React25.createElement(Button, { label: cancelLabel, variant: "outline", fullWidth: true, onPress: onCancel }), /* @__PURE__ */ React25.createElement(Button, { label: confirmLabel, variant: confirmVariant, fullWidth: true, onPress: onConfirm }))
|
|
2388
2481
|
)));
|
|
2389
2482
|
}
|
|
2390
|
-
var
|
|
2483
|
+
var styles26 = StyleSheet.create({
|
|
2391
2484
|
overlay: {
|
|
2392
2485
|
flex: 1,
|
|
2393
2486
|
backgroundColor: "rgba(0,0,0,0.5)",
|
|
@@ -2423,9 +2516,9 @@ var styles25 = StyleSheet.create({
|
|
|
2423
2516
|
});
|
|
2424
2517
|
function LabelValue({ label, value, style }) {
|
|
2425
2518
|
const { colors } = useTheme();
|
|
2426
|
-
return /* @__PURE__ */
|
|
2519
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles27.container, style] }, /* @__PURE__ */ React25.createElement(Text, { style: [styles27.label, { color: colors.mutedForeground }], allowFontScaling: true }, label), typeof value === "string" ? /* @__PURE__ */ React25.createElement(Text, { style: [styles27.value, { color: colors.foreground }], allowFontScaling: true }, value) : value);
|
|
2427
2520
|
}
|
|
2428
|
-
var
|
|
2521
|
+
var styles27 = StyleSheet.create({
|
|
2429
2522
|
container: {
|
|
2430
2523
|
flexDirection: "row",
|
|
2431
2524
|
justifyContent: "space-between",
|
|
@@ -2475,27 +2568,27 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2475
2568
|
onChange({ month: value.month + 1, year: value.year });
|
|
2476
2569
|
}
|
|
2477
2570
|
};
|
|
2478
|
-
return /* @__PURE__ */
|
|
2571
|
+
return /* @__PURE__ */ React25.createElement(View, { style: [styles28.container, style] }, /* @__PURE__ */ React25.createElement(
|
|
2479
2572
|
TouchableOpacity,
|
|
2480
2573
|
{
|
|
2481
|
-
style:
|
|
2574
|
+
style: styles28.arrow,
|
|
2482
2575
|
onPress: handlePrev,
|
|
2483
2576
|
activeOpacity: 0.6,
|
|
2484
2577
|
touchSoundDisabled: true
|
|
2485
2578
|
},
|
|
2486
|
-
/* @__PURE__ */
|
|
2487
|
-
), /* @__PURE__ */
|
|
2579
|
+
/* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-left", size: 22, color: colors.foreground })
|
|
2580
|
+
), /* @__PURE__ */ React25.createElement(Text, { style: [styles28.label, { color: colors.foreground }], allowFontScaling: true }, MONTH_NAMES[value.month - 1], " ", value.year), /* @__PURE__ */ React25.createElement(
|
|
2488
2581
|
TouchableOpacity,
|
|
2489
2582
|
{
|
|
2490
|
-
style:
|
|
2583
|
+
style: styles28.arrow,
|
|
2491
2584
|
onPress: handleNext,
|
|
2492
2585
|
activeOpacity: 0.6,
|
|
2493
2586
|
touchSoundDisabled: true
|
|
2494
2587
|
},
|
|
2495
|
-
/* @__PURE__ */
|
|
2588
|
+
/* @__PURE__ */ React25.createElement(Entypo$1, { name: "chevron-right", size: 22, color: colors.foreground })
|
|
2496
2589
|
));
|
|
2497
2590
|
}
|
|
2498
|
-
var
|
|
2591
|
+
var styles28 = StyleSheet.create({
|
|
2499
2592
|
container: {
|
|
2500
2593
|
flexDirection: "row",
|
|
2501
2594
|
alignItems: "center",
|
|
@@ -2574,4 +2667,4 @@ var BREAKPOINTS = {
|
|
|
2574
2667
|
wide: 700
|
|
2575
2668
|
};
|
|
2576
2669
|
|
|
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 };
|
|
2670
|
+
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 };
|