@retray-dev/ui-kit 2.5.2 → 2.7.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 +245 -5
- package/README.md +18 -0
- package/dist/index.d.mts +173 -8
- package/dist/index.d.ts +173 -8
- package/dist/index.js +319 -179
- package/dist/index.mjs +259 -132
- package/package.json +1 -1
- package/src/components/AlertBanner/AlertBanner.tsx +14 -2
- package/src/components/Badge/Badge.tsx +16 -2
- package/src/components/Button/Button.tsx +20 -3
- package/src/components/EmptyState/EmptyState.tsx +15 -3
- package/src/components/Input/Input.tsx +29 -8
- package/src/components/ListItem/ListItem.tsx +26 -3
- package/src/components/Toast/Toast.tsx +11 -1
- package/src/components/Toggle/Toggle.tsx +27 -2
- package/src/index.ts +21 -0
- package/src/tokens.ts +69 -0
- package/src/utils/haptics.ts +18 -12
- package/src/utils/icons.ts +73 -0
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React24, { 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
|
-
import
|
|
4
|
+
import AntDesign from '@expo/vector-icons/AntDesign';
|
|
5
|
+
import Entypo from '@expo/vector-icons/Entypo';
|
|
6
|
+
import Feather from '@expo/vector-icons/Feather';
|
|
7
|
+
import FontAwesome5 from '@expo/vector-icons/FontAwesome5';
|
|
8
|
+
import MaterialIcons from '@expo/vector-icons/MaterialIcons';
|
|
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';
|
|
5
11
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
6
12
|
import Animated10, { useSharedValue, useDerivedValue, withTiming, Easing as Easing$1, useAnimatedStyle, withSpring } from 'react-native-reanimated';
|
|
7
13
|
import RNSlider from '@react-native-community/slider';
|
|
@@ -12,12 +18,7 @@ import { scheduleOnRN } from 'react-native-worklets';
|
|
|
12
18
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
13
19
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
17
|
-
}) : x)(function(x) {
|
|
18
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
19
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
20
|
-
});
|
|
21
|
+
// src/theme/ThemeProvider.tsx
|
|
21
22
|
|
|
22
23
|
// src/theme/colors.ts
|
|
23
24
|
var defaultLight = {
|
|
@@ -76,7 +77,7 @@ function ThemeProvider({ children, theme, colorScheme = "system" }) {
|
|
|
76
77
|
const override = resolvedScheme === "dark" ? theme?.dark : theme?.light;
|
|
77
78
|
return override ? { ...base, ...override } : base;
|
|
78
79
|
}, [resolvedScheme, theme]);
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ React24.createElement(ThemeContext.Provider, { value: { colors, colorScheme: resolvedScheme } }, children);
|
|
80
81
|
}
|
|
81
82
|
function useTheme() {
|
|
82
83
|
const context = useContext(ThemeContext);
|
|
@@ -85,27 +86,74 @@ function useTheme() {
|
|
|
85
86
|
}
|
|
86
87
|
return context;
|
|
87
88
|
}
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
var _haptics = null;
|
|
90
|
+
async function getHaptics() {
|
|
91
|
+
if (Platform.OS === "web") return null;
|
|
92
|
+
if (!_haptics) {
|
|
93
|
+
_haptics = await import('expo-haptics');
|
|
94
|
+
}
|
|
95
|
+
return _haptics;
|
|
91
96
|
}
|
|
92
97
|
function selectionAsync() {
|
|
93
|
-
|
|
98
|
+
if (Platform.OS === "web") return;
|
|
99
|
+
getHaptics().then((h) => h?.selectionAsync());
|
|
94
100
|
}
|
|
95
101
|
function impactLight() {
|
|
96
|
-
|
|
102
|
+
if (Platform.OS === "web") return;
|
|
103
|
+
getHaptics().then((h) => h?.impactAsync(h.ImpactFeedbackStyle.Light));
|
|
97
104
|
}
|
|
98
105
|
function notificationSuccess() {
|
|
99
|
-
|
|
106
|
+
if (Platform.OS === "web") return;
|
|
107
|
+
getHaptics().then((h) => h?.notificationAsync(h.NotificationFeedbackType.Success));
|
|
100
108
|
}
|
|
101
109
|
function notificationError() {
|
|
102
|
-
|
|
110
|
+
if (Platform.OS === "web") return;
|
|
111
|
+
getHaptics().then((h) => h?.notificationAsync(h.NotificationFeedbackType.Error));
|
|
103
112
|
}
|
|
104
113
|
var isWeb = Platform.OS === "web";
|
|
105
114
|
var s = isWeb ? (n) => n : scale;
|
|
106
115
|
var vs = isWeb ? (n) => n : verticalScale;
|
|
107
116
|
var ms = isWeb ? (n, _factor) => n : moderateScale;
|
|
108
117
|
var mvs = isWeb ? (n, _factor) => n : moderateVerticalScale;
|
|
118
|
+
var ICON_FAMILIES = [
|
|
119
|
+
{ name: "Ionicons", component: Ionicons, glyphMap: Ionicons.glyphMap },
|
|
120
|
+
{ name: "MaterialIcons", component: MaterialIcons, glyphMap: MaterialIcons.glyphMap },
|
|
121
|
+
{ name: "FontAwesome5", component: FontAwesome5, glyphMap: FontAwesome5.glyphMap },
|
|
122
|
+
{ name: "Entypo", component: Entypo, glyphMap: Entypo.glyphMap },
|
|
123
|
+
{ name: "AntDesign", component: AntDesign, glyphMap: AntDesign.glyphMap },
|
|
124
|
+
{ name: "Feather", component: Feather, glyphMap: Feather.glyphMap }
|
|
125
|
+
];
|
|
126
|
+
var resolvedCache = null;
|
|
127
|
+
function buildCache() {
|
|
128
|
+
const cache = /* @__PURE__ */ new Map();
|
|
129
|
+
for (const family of ICON_FAMILIES) {
|
|
130
|
+
if (!family.glyphMap) continue;
|
|
131
|
+
for (const iconName of Object.keys(family.glyphMap)) {
|
|
132
|
+
cache.set(iconName, family);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return cache;
|
|
136
|
+
}
|
|
137
|
+
function resolveFamily(name) {
|
|
138
|
+
if (!resolvedCache) {
|
|
139
|
+
resolvedCache = buildCache();
|
|
140
|
+
}
|
|
141
|
+
return resolvedCache.get(name) ?? null;
|
|
142
|
+
}
|
|
143
|
+
function Icon({ name, size, color, family }) {
|
|
144
|
+
let resolved = null;
|
|
145
|
+
if (family) {
|
|
146
|
+
resolved = ICON_FAMILIES.find((f) => f.name === family) ?? null;
|
|
147
|
+
} else {
|
|
148
|
+
resolved = resolveFamily(name);
|
|
149
|
+
}
|
|
150
|
+
if (!resolved) return null;
|
|
151
|
+
const Component = resolved.component;
|
|
152
|
+
return React24.createElement(Component, { name, size, color });
|
|
153
|
+
}
|
|
154
|
+
function renderIcon(name, size, color) {
|
|
155
|
+
return React24.createElement(Icon, { name, size, color });
|
|
156
|
+
}
|
|
109
157
|
|
|
110
158
|
// src/components/Button/Button.tsx
|
|
111
159
|
var nativeDriver = Platform.OS !== "web";
|
|
@@ -119,6 +167,7 @@ var labelSizeStyles = {
|
|
|
119
167
|
md: { fontSize: ms(17) },
|
|
120
168
|
lg: { fontSize: ms(18) }
|
|
121
169
|
};
|
|
170
|
+
var iconSizeMap = { sm: 16, md: 18, lg: 20 };
|
|
122
171
|
function Button({
|
|
123
172
|
label,
|
|
124
173
|
variant = "primary",
|
|
@@ -126,6 +175,8 @@ function Button({
|
|
|
126
175
|
loading = false,
|
|
127
176
|
fullWidth = false,
|
|
128
177
|
icon,
|
|
178
|
+
iconName,
|
|
179
|
+
iconColor,
|
|
129
180
|
iconPosition = "left",
|
|
130
181
|
disabled,
|
|
131
182
|
style,
|
|
@@ -165,8 +216,9 @@ function Button({
|
|
|
165
216
|
ghost: { color: colors.foreground },
|
|
166
217
|
destructive: { color: colors.destructiveForeground }
|
|
167
218
|
}[variant];
|
|
219
|
+
const effectiveIcon = iconName ? renderIcon(iconName, iconSizeMap[size], iconColor ?? labelVariantStyle.color) : typeof icon === "function" ? icon({ label, size, variant }) : icon;
|
|
168
220
|
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" || variant === "secondary" ? colors.primaryForeground : colors.foreground;
|
|
169
|
-
return /* @__PURE__ */
|
|
221
|
+
return /* @__PURE__ */ React24.createElement(Animated.View, { style: [fullWidth && styles.fullWidth, { transform: [{ scale: scale2 }] }] }, /* @__PURE__ */ React24.createElement(
|
|
170
222
|
TouchableOpacity,
|
|
171
223
|
{
|
|
172
224
|
style: [
|
|
@@ -185,7 +237,7 @@ function Button({
|
|
|
185
237
|
onPressOut: handlePressOut,
|
|
186
238
|
...props
|
|
187
239
|
},
|
|
188
|
-
loading ? /* @__PURE__ */
|
|
240
|
+
loading ? /* @__PURE__ */ React24.createElement(ActivityIndicator, { size: "small", color: spinnerColor }) : /* @__PURE__ */ React24.createElement(React24.Fragment, null, effectiveIcon && iconPosition === "left" && /* @__PURE__ */ React24.createElement(React24.Fragment, null, effectiveIcon), /* @__PURE__ */ React24.createElement(Text, { style: [styles.label, labelVariantStyle, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : void 0] }, label), effectiveIcon && iconPosition === "right" && /* @__PURE__ */ React24.createElement(React24.Fragment, null, effectiveIcon))
|
|
189
241
|
));
|
|
190
242
|
}
|
|
191
243
|
var styles = StyleSheet.create({
|
|
@@ -219,7 +271,7 @@ var variantStyles = {
|
|
|
219
271
|
function Text2({ variant = "body", color, style, children, ...props }) {
|
|
220
272
|
const { colors } = useTheme();
|
|
221
273
|
const defaultColor = variant === "caption" ? colors.mutedForeground : colors.foreground;
|
|
222
|
-
return /* @__PURE__ */
|
|
274
|
+
return /* @__PURE__ */ React24.createElement(
|
|
223
275
|
Text,
|
|
224
276
|
{
|
|
225
277
|
style: [variantStyles[variant], { color: color ?? defaultColor }, style],
|
|
@@ -230,14 +282,15 @@ function Text2({ variant = "body", color, style, children, ...props }) {
|
|
|
230
282
|
);
|
|
231
283
|
}
|
|
232
284
|
var webInputResetStyle = Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
233
|
-
function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, type = "text", containerStyle, style, onFocus, onBlur, secureTextEntry, ...props }) {
|
|
285
|
+
function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, prefixIcon, suffixIcon, prefixIconColor, suffixIconColor, type = "text", containerStyle, style, onFocus, onBlur, secureTextEntry, ...props }) {
|
|
234
286
|
const { colors } = useTheme();
|
|
235
287
|
const [focused, setFocused] = useState(false);
|
|
236
288
|
const [showPassword, setShowPassword] = useState(false);
|
|
237
289
|
const isPassword = type === "password";
|
|
238
290
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
239
|
-
const
|
|
240
|
-
|
|
291
|
+
const effectivePrefix = prefixIcon ? renderIcon(prefixIcon, 20, prefixIconColor ?? colors.mutedForeground) : prefix;
|
|
292
|
+
const effectiveSuffix = isPassword && !suffix && !suffixIcon ? /* @__PURE__ */ React24.createElement(TouchableOpacity, { onPress: () => setShowPassword(!showPassword), style: styles2.passwordToggle, activeOpacity: 0.6 }, /* @__PURE__ */ React24.createElement(AntDesign$1, { name: showPassword ? "eye" : "eye-invisible", size: 20, color: colors.mutedForeground })) : suffixIcon ? renderIcon(suffixIcon, 20, suffixIconColor ?? colors.mutedForeground) : suffix;
|
|
293
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles2.container, containerStyle] }, label ? /* @__PURE__ */ React24.createElement(Text, { style: [styles2.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React24.createElement(
|
|
241
294
|
View,
|
|
242
295
|
{
|
|
243
296
|
style: [
|
|
@@ -248,8 +301,8 @@ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, t
|
|
|
248
301
|
}
|
|
249
302
|
]
|
|
250
303
|
},
|
|
251
|
-
|
|
252
|
-
/* @__PURE__ */
|
|
304
|
+
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */ React24.createElement(Text, { style: [styles2.prefixText, { color: colors.mutedForeground }, prefixStyle], allowFontScaling: true }, effectivePrefix) : /* @__PURE__ */ React24.createElement(View, { style: styles2.prefixContainer }, effectivePrefix) : null,
|
|
305
|
+
/* @__PURE__ */ React24.createElement(
|
|
253
306
|
TextInput,
|
|
254
307
|
{
|
|
255
308
|
style: [
|
|
@@ -274,8 +327,8 @@ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, t
|
|
|
274
327
|
...props
|
|
275
328
|
}
|
|
276
329
|
),
|
|
277
|
-
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */
|
|
278
|
-
), error ? /* @__PURE__ */
|
|
330
|
+
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */ React24.createElement(Text, { style: [styles2.suffixText, { color: colors.mutedForeground }, suffixStyle], allowFontScaling: true }, effectiveSuffix) : /* @__PURE__ */ React24.createElement(View, { style: styles2.suffixContainer }, effectiveSuffix) : null
|
|
331
|
+
), error ? /* @__PURE__ */ React24.createElement(Text, { style: [styles2.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null, !error && hint ? /* @__PURE__ */ React24.createElement(Text, { style: [styles2.helperText, { color: colors.mutedForeground }], allowFontScaling: true }, hint) : null);
|
|
279
332
|
}
|
|
280
333
|
var styles2 = StyleSheet.create({
|
|
281
334
|
container: {
|
|
@@ -334,7 +387,8 @@ var sizeIconGap = {
|
|
|
334
387
|
md: s(6),
|
|
335
388
|
lg: s(6)
|
|
336
389
|
};
|
|
337
|
-
|
|
390
|
+
var sizeIconSize = { sm: 10, md: 12, lg: 14 };
|
|
391
|
+
function Badge({ label, children, variant = "default", size = "md", icon, iconName, iconColor, style }) {
|
|
338
392
|
const { colors } = useTheme();
|
|
339
393
|
const containerStyle = {
|
|
340
394
|
default: { backgroundColor: colors.primary },
|
|
@@ -348,8 +402,9 @@ function Badge({ label, children, variant = "default", size = "md", icon, style
|
|
|
348
402
|
destructive: colors.destructiveForeground,
|
|
349
403
|
outline: colors.foreground
|
|
350
404
|
}[variant];
|
|
405
|
+
const effectiveIcon = iconName ? renderIcon(iconName, sizeIconSize[size], iconColor ?? textColor) : icon;
|
|
351
406
|
const content = children ?? label;
|
|
352
|
-
return /* @__PURE__ */
|
|
407
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles3.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style] }, effectiveIcon ? /* @__PURE__ */ React24.createElement(View, { style: styles3.iconContainer }, effectiveIcon) : null, typeof content === "string" ? /* @__PURE__ */ React24.createElement(Text, { style: [styles3.label, { color: textColor }, sizeFontSize[size]], allowFontScaling: true }, content) : content);
|
|
353
408
|
}
|
|
354
409
|
var styles3 = StyleSheet.create({
|
|
355
410
|
container: {
|
|
@@ -416,9 +471,9 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
416
471
|
elevation: 0
|
|
417
472
|
}
|
|
418
473
|
}[variant];
|
|
419
|
-
const cardContent = /* @__PURE__ */
|
|
474
|
+
const cardContent = /* @__PURE__ */ React24.createElement(View, { style: [styles4.card, variantStyle, style] }, children);
|
|
420
475
|
if (onPress) {
|
|
421
|
-
return /* @__PURE__ */
|
|
476
|
+
return /* @__PURE__ */ React24.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React24.createElement(
|
|
422
477
|
TouchableOpacity,
|
|
423
478
|
{
|
|
424
479
|
onPress: handlePress,
|
|
@@ -433,21 +488,21 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
433
488
|
return cardContent;
|
|
434
489
|
}
|
|
435
490
|
function CardHeader({ children, style }) {
|
|
436
|
-
return /* @__PURE__ */
|
|
491
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles4.header, style] }, children);
|
|
437
492
|
}
|
|
438
493
|
function CardTitle({ children, style }) {
|
|
439
494
|
const { colors } = useTheme();
|
|
440
|
-
return /* @__PURE__ */
|
|
495
|
+
return /* @__PURE__ */ React24.createElement(Text, { style: [styles4.title, { color: colors.cardForeground }, style], allowFontScaling: true }, children);
|
|
441
496
|
}
|
|
442
497
|
function CardDescription({ children, style }) {
|
|
443
498
|
const { colors } = useTheme();
|
|
444
|
-
return /* @__PURE__ */
|
|
499
|
+
return /* @__PURE__ */ React24.createElement(Text, { style: [styles4.description, { color: colors.mutedForeground }, style], allowFontScaling: true }, children);
|
|
445
500
|
}
|
|
446
501
|
function CardContent({ children, style }) {
|
|
447
|
-
return /* @__PURE__ */
|
|
502
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles4.content, style] }, children);
|
|
448
503
|
}
|
|
449
504
|
function CardFooter({ children, style }) {
|
|
450
|
-
return /* @__PURE__ */
|
|
505
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles4.footer, style] }, children);
|
|
451
506
|
}
|
|
452
507
|
var styles4 = StyleSheet.create({
|
|
453
508
|
card: {
|
|
@@ -480,7 +535,7 @@ var styles4 = StyleSheet.create({
|
|
|
480
535
|
});
|
|
481
536
|
function Separator({ orientation = "horizontal", style }) {
|
|
482
537
|
const { colors } = useTheme();
|
|
483
|
-
return /* @__PURE__ */
|
|
538
|
+
return /* @__PURE__ */ React24.createElement(
|
|
484
539
|
View,
|
|
485
540
|
{
|
|
486
541
|
style: [
|
|
@@ -508,7 +563,7 @@ var sizeMap = {
|
|
|
508
563
|
};
|
|
509
564
|
function Spinner({ size = "md", color, ...props }) {
|
|
510
565
|
const { colors } = useTheme();
|
|
511
|
-
return /* @__PURE__ */
|
|
566
|
+
return /* @__PURE__ */ React24.createElement(ActivityIndicator, { size: sizeMap[size], color: color ?? colors.primary, ...props });
|
|
512
567
|
}
|
|
513
568
|
function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
514
569
|
const { colors, colorScheme } = useTheme();
|
|
@@ -530,7 +585,7 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
530
585
|
inputRange: [0, 1],
|
|
531
586
|
outputRange: [-containerWidth, containerWidth]
|
|
532
587
|
});
|
|
533
|
-
return /* @__PURE__ */
|
|
588
|
+
return /* @__PURE__ */ React24.createElement(
|
|
534
589
|
View,
|
|
535
590
|
{
|
|
536
591
|
style: [
|
|
@@ -540,7 +595,7 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
540
595
|
],
|
|
541
596
|
onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width)
|
|
542
597
|
},
|
|
543
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ React24.createElement(Animated.View, { style: [StyleSheet.absoluteFill, { transform: [{ translateX }] }] }, /* @__PURE__ */ React24.createElement(
|
|
544
599
|
LinearGradient,
|
|
545
600
|
{
|
|
546
601
|
colors: ["transparent", shimmerHighlight, "transparent"],
|
|
@@ -580,14 +635,14 @@ function Avatar({ src, fallback, size = "md", style }) {
|
|
|
580
635
|
backgroundColor: colors.muted,
|
|
581
636
|
overflow: "hidden"
|
|
582
637
|
};
|
|
583
|
-
return /* @__PURE__ */
|
|
638
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles7.base, containerStyle, style] }, !showFallback ? /* @__PURE__ */ React24.createElement(
|
|
584
639
|
Image,
|
|
585
640
|
{
|
|
586
641
|
source: { uri: src },
|
|
587
642
|
style: { width: dimension, height: dimension },
|
|
588
643
|
onError: () => setImageError(true)
|
|
589
644
|
}
|
|
590
|
-
) : /* @__PURE__ */
|
|
645
|
+
) : /* @__PURE__ */ React24.createElement(
|
|
591
646
|
Text,
|
|
592
647
|
{
|
|
593
648
|
style: [styles7.fallback, { color: colors.mutedForeground, fontSize: fontSizeMap[size] }],
|
|
@@ -605,13 +660,14 @@ var styles7 = StyleSheet.create({
|
|
|
605
660
|
fontWeight: "500"
|
|
606
661
|
}
|
|
607
662
|
});
|
|
608
|
-
function AlertBanner({ title, description, variant = "default", icon, style }) {
|
|
663
|
+
function AlertBanner({ title, description, variant = "default", icon, iconName, iconColor, style }) {
|
|
609
664
|
const { colors } = useTheme();
|
|
610
665
|
const borderColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.border;
|
|
611
666
|
const titleColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.foreground;
|
|
612
667
|
const descColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.mutedForeground;
|
|
613
|
-
const defaultIcon = variant === "success" ? /* @__PURE__ */
|
|
614
|
-
|
|
668
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React24.createElement(FontAwesome5$1, { name: "check-circle", size: 18, color: titleColor }) : variant === "destructive" ? /* @__PURE__ */ React24.createElement(MaterialIcons$1, { name: "error-outline", size: 20, color: titleColor }) : /* @__PURE__ */ React24.createElement(Entypo$1, { name: "info-with-circle", size: 18, color: titleColor });
|
|
669
|
+
const effectiveIcon = iconName ? renderIcon(iconName, 18, iconColor ?? titleColor) : icon ?? defaultIcon;
|
|
670
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles8.container, { backgroundColor: colors.card, borderColor }, style] }, /* @__PURE__ */ React24.createElement(View, { style: styles8.icon }, effectiveIcon), /* @__PURE__ */ React24.createElement(View, { style: styles8.content }, title ? /* @__PURE__ */ React24.createElement(Text, { style: [styles8.title, { color: titleColor }], allowFontScaling: true }, title) : null, description ? /* @__PURE__ */ React24.createElement(Text, { style: [styles8.description, { color: descColor }], allowFontScaling: true }, description) : null));
|
|
615
671
|
}
|
|
616
672
|
var styles8 = StyleSheet.create({
|
|
617
673
|
container: {
|
|
@@ -657,13 +713,13 @@ function Progress({ value = 0, max = 100, style }) {
|
|
|
657
713
|
bounciness: 0
|
|
658
714
|
}).start();
|
|
659
715
|
}, [percent, trackWidth]);
|
|
660
|
-
return /* @__PURE__ */
|
|
716
|
+
return /* @__PURE__ */ React24.createElement(
|
|
661
717
|
View,
|
|
662
718
|
{
|
|
663
719
|
style: [styles9.track, { backgroundColor: colors.muted }, style],
|
|
664
720
|
onLayout: (e) => setTrackWidth(e.nativeEvent.layout.width)
|
|
665
721
|
},
|
|
666
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ React24.createElement(
|
|
667
723
|
Animated.View,
|
|
668
724
|
{
|
|
669
725
|
style: [styles9.indicator, { width: animatedWidth, backgroundColor: colors.primary }]
|
|
@@ -683,10 +739,11 @@ var styles9 = StyleSheet.create({
|
|
|
683
739
|
borderRadius: 999
|
|
684
740
|
}
|
|
685
741
|
});
|
|
686
|
-
function EmptyState({ icon, title, description, action, size = "default", style }) {
|
|
742
|
+
function EmptyState({ icon, iconName, iconColor, title, description, action, size = "default", style }) {
|
|
687
743
|
const { colors } = useTheme();
|
|
688
744
|
const isCompact = size === "compact";
|
|
689
|
-
|
|
745
|
+
const effectiveIcon = iconName ? renderIcon(iconName, isCompact ? 32 : 48, iconColor ?? colors.mutedForeground) : icon;
|
|
746
|
+
return /* @__PURE__ */ React24.createElement(
|
|
690
747
|
View,
|
|
691
748
|
{
|
|
692
749
|
style: [
|
|
@@ -696,7 +753,7 @@ function EmptyState({ icon, title, description, action, size = "default", style
|
|
|
696
753
|
style
|
|
697
754
|
]
|
|
698
755
|
},
|
|
699
|
-
|
|
756
|
+
effectiveIcon ? /* @__PURE__ */ React24.createElement(
|
|
700
757
|
View,
|
|
701
758
|
{
|
|
702
759
|
style: [
|
|
@@ -705,17 +762,17 @@ function EmptyState({ icon, title, description, action, size = "default", style
|
|
|
705
762
|
{ backgroundColor: colors.muted }
|
|
706
763
|
]
|
|
707
764
|
},
|
|
708
|
-
|
|
765
|
+
effectiveIcon
|
|
709
766
|
) : null,
|
|
710
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ React24.createElement(View, { style: styles10.textWrapper }, /* @__PURE__ */ React24.createElement(
|
|
711
768
|
Text,
|
|
712
769
|
{
|
|
713
770
|
style: [styles10.title, isCompact && styles10.titleCompact, { color: colors.foreground }],
|
|
714
771
|
allowFontScaling: true
|
|
715
772
|
},
|
|
716
773
|
title
|
|
717
|
-
), description && !isCompact ? /* @__PURE__ */
|
|
718
|
-
action && !isCompact ? /* @__PURE__ */
|
|
774
|
+
), description && !isCompact ? /* @__PURE__ */ React24.createElement(Text, { style: [styles10.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null),
|
|
775
|
+
action && !isCompact ? /* @__PURE__ */ React24.createElement(View, { style: styles10.action }, action) : null
|
|
719
776
|
);
|
|
720
777
|
}
|
|
721
778
|
var styles10 = StyleSheet.create({
|
|
@@ -780,7 +837,7 @@ function Textarea({
|
|
|
780
837
|
}) {
|
|
781
838
|
const { colors } = useTheme();
|
|
782
839
|
const [focused, setFocused] = useState(false);
|
|
783
|
-
return /* @__PURE__ */
|
|
840
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles11.container, containerStyle] }, label ? /* @__PURE__ */ React24.createElement(Text, { style: [styles11.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React24.createElement(
|
|
784
841
|
TextInput,
|
|
785
842
|
{
|
|
786
843
|
multiline: true,
|
|
@@ -809,7 +866,7 @@ function Textarea({
|
|
|
809
866
|
allowFontScaling: true,
|
|
810
867
|
...props
|
|
811
868
|
}
|
|
812
|
-
), error ? /* @__PURE__ */
|
|
869
|
+
), error ? /* @__PURE__ */ React24.createElement(Text, { style: [styles11.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null, !error && hint ? /* @__PURE__ */ React24.createElement(Text, { style: [styles11.helperText, { color: colors.mutedForeground }], allowFontScaling: true }, hint) : null);
|
|
813
870
|
}
|
|
814
871
|
var styles11 = StyleSheet.create({
|
|
815
872
|
container: {
|
|
@@ -847,7 +904,7 @@ function Checkbox({
|
|
|
847
904
|
const handlePressOut = () => {
|
|
848
905
|
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver3, speed: 40, bounciness: 4 }).start();
|
|
849
906
|
};
|
|
850
|
-
return /* @__PURE__ */
|
|
907
|
+
return /* @__PURE__ */ React24.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React24.createElement(
|
|
851
908
|
TouchableOpacity,
|
|
852
909
|
{
|
|
853
910
|
style: [styles12.row, style],
|
|
@@ -861,7 +918,7 @@ function Checkbox({
|
|
|
861
918
|
activeOpacity: 1,
|
|
862
919
|
touchSoundDisabled: true
|
|
863
920
|
},
|
|
864
|
-
/* @__PURE__ */
|
|
921
|
+
/* @__PURE__ */ React24.createElement(
|
|
865
922
|
View,
|
|
866
923
|
{
|
|
867
924
|
style: [
|
|
@@ -873,9 +930,9 @@ function Checkbox({
|
|
|
873
930
|
}
|
|
874
931
|
]
|
|
875
932
|
},
|
|
876
|
-
checked ? /* @__PURE__ */
|
|
933
|
+
checked ? /* @__PURE__ */ React24.createElement(View, { style: [styles12.checkmark, { borderColor: colors.primaryForeground }] }) : null
|
|
877
934
|
),
|
|
878
|
-
label ? /* @__PURE__ */
|
|
935
|
+
label ? /* @__PURE__ */ React24.createElement(
|
|
879
936
|
Text,
|
|
880
937
|
{
|
|
881
938
|
style: [styles12.label, { color: disabled ? colors.mutedForeground : colors.foreground }]
|
|
@@ -938,7 +995,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
938
995
|
inputRange: [0, 1],
|
|
939
996
|
outputRange: [colors.muted, colors.primary]
|
|
940
997
|
});
|
|
941
|
-
return /* @__PURE__ */
|
|
998
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [{ opacity: disabled ? 0.45 : 1 }, style] }, /* @__PURE__ */ React24.createElement(
|
|
942
999
|
TouchableOpacity,
|
|
943
1000
|
{
|
|
944
1001
|
onPress: () => {
|
|
@@ -950,7 +1007,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
950
1007
|
touchSoundDisabled: true,
|
|
951
1008
|
style: styles13.wrapper
|
|
952
1009
|
},
|
|
953
|
-
/* @__PURE__ */
|
|
1010
|
+
/* @__PURE__ */ React24.createElement(Animated.View, { style: [styles13.track, { backgroundColor: trackColor }] }, /* @__PURE__ */ React24.createElement(
|
|
954
1011
|
Animated.View,
|
|
955
1012
|
{
|
|
956
1013
|
style: [
|
|
@@ -989,6 +1046,7 @@ var sizeStyles = {
|
|
|
989
1046
|
md: { paddingHorizontal: s(16), paddingVertical: vs(12), minWidth: s(44), minHeight: vs(44) },
|
|
990
1047
|
lg: { paddingHorizontal: s(20), paddingVertical: vs(14), minWidth: s(48), minHeight: vs(48) }
|
|
991
1048
|
};
|
|
1049
|
+
var iconSizeMap2 = { sm: 16, md: 18, lg: 20 };
|
|
992
1050
|
function Toggle({
|
|
993
1051
|
pressed = false,
|
|
994
1052
|
onPressedChange,
|
|
@@ -997,6 +1055,10 @@ function Toggle({
|
|
|
997
1055
|
label,
|
|
998
1056
|
icon,
|
|
999
1057
|
activeIcon,
|
|
1058
|
+
iconName,
|
|
1059
|
+
activeIconName,
|
|
1060
|
+
iconColor,
|
|
1061
|
+
activeIconColor,
|
|
1000
1062
|
disabled,
|
|
1001
1063
|
style,
|
|
1002
1064
|
...props
|
|
@@ -1031,6 +1093,7 @@ function Toggle({
|
|
|
1031
1093
|
inputRange: [0, 1],
|
|
1032
1094
|
outputRange: [colors.foreground, colors.primary]
|
|
1033
1095
|
});
|
|
1096
|
+
const iconSize = iconSizeMap2[size];
|
|
1034
1097
|
const LeftIcon = () => {
|
|
1035
1098
|
const renderProp = (prop) => {
|
|
1036
1099
|
if (!prop) return null;
|
|
@@ -1038,15 +1101,17 @@ function Toggle({
|
|
|
1038
1101
|
return prop;
|
|
1039
1102
|
};
|
|
1040
1103
|
if (pressed) {
|
|
1104
|
+
if (activeIconName) return /* @__PURE__ */ React24.createElement(React24.Fragment, null, renderIcon(activeIconName, iconSize, activeIconColor ?? colors.primary));
|
|
1041
1105
|
const active = renderProp(activeIcon);
|
|
1042
|
-
if (active) return /* @__PURE__ */
|
|
1043
|
-
return /* @__PURE__ */
|
|
1106
|
+
if (active) return /* @__PURE__ */ React24.createElement(React24.Fragment, null, active);
|
|
1107
|
+
return /* @__PURE__ */ React24.createElement(FontAwesome5$1, { name: "check-circle", size: iconSize, color: colors.primary });
|
|
1044
1108
|
}
|
|
1109
|
+
if (iconName) return /* @__PURE__ */ React24.createElement(React24.Fragment, null, renderIcon(iconName, iconSize, iconColor ?? colors.mutedForeground));
|
|
1045
1110
|
const custom = renderProp(icon);
|
|
1046
|
-
if (custom) return /* @__PURE__ */
|
|
1047
|
-
return /* @__PURE__ */
|
|
1111
|
+
if (custom) return /* @__PURE__ */ React24.createElement(React24.Fragment, null, custom);
|
|
1112
|
+
return /* @__PURE__ */ React24.createElement(FontAwesome5$1, { name: "circle", size: iconSize, color: colors.mutedForeground });
|
|
1048
1113
|
};
|
|
1049
|
-
return /* @__PURE__ */
|
|
1114
|
+
return /* @__PURE__ */ React24.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles14.disabled, style] }, /* @__PURE__ */ React24.createElement(
|
|
1050
1115
|
TouchableOpacity,
|
|
1051
1116
|
{
|
|
1052
1117
|
onPress: () => {
|
|
@@ -1060,7 +1125,7 @@ function Toggle({
|
|
|
1060
1125
|
touchSoundDisabled: true,
|
|
1061
1126
|
...props
|
|
1062
1127
|
},
|
|
1063
|
-
/* @__PURE__ */
|
|
1128
|
+
/* @__PURE__ */ React24.createElement(
|
|
1064
1129
|
Animated.View,
|
|
1065
1130
|
{
|
|
1066
1131
|
style: [
|
|
@@ -1069,7 +1134,7 @@ function Toggle({
|
|
|
1069
1134
|
{ borderColor, backgroundColor, borderWidth: 2 }
|
|
1070
1135
|
]
|
|
1071
1136
|
},
|
|
1072
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ React24.createElement(View, { style: styles14.inner }, /* @__PURE__ */ React24.createElement(LeftIcon, null), label ? /* @__PURE__ */ React24.createElement(Animated.Text, { style: [styles14.label, { color: textColor }] }, label) : null)
|
|
1073
1138
|
)
|
|
1074
1139
|
));
|
|
1075
1140
|
}
|
|
@@ -1106,7 +1171,7 @@ function RadioItem({
|
|
|
1106
1171
|
const handlePressOut = () => {
|
|
1107
1172
|
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver5, speed: 40, bounciness: 4 }).start();
|
|
1108
1173
|
};
|
|
1109
|
-
return /* @__PURE__ */
|
|
1174
|
+
return /* @__PURE__ */ React24.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React24.createElement(
|
|
1110
1175
|
TouchableOpacity,
|
|
1111
1176
|
{
|
|
1112
1177
|
style: styles15.row,
|
|
@@ -1122,7 +1187,7 @@ function RadioItem({
|
|
|
1122
1187
|
touchSoundDisabled: true,
|
|
1123
1188
|
disabled: option.disabled
|
|
1124
1189
|
},
|
|
1125
|
-
/* @__PURE__ */
|
|
1190
|
+
/* @__PURE__ */ React24.createElement(
|
|
1126
1191
|
View,
|
|
1127
1192
|
{
|
|
1128
1193
|
style: [
|
|
@@ -1133,9 +1198,9 @@ function RadioItem({
|
|
|
1133
1198
|
}
|
|
1134
1199
|
]
|
|
1135
1200
|
},
|
|
1136
|
-
selected ? /* @__PURE__ */
|
|
1201
|
+
selected ? /* @__PURE__ */ React24.createElement(View, { style: [styles15.dot, { backgroundColor: colors.primary }] }) : null
|
|
1137
1202
|
),
|
|
1138
|
-
/* @__PURE__ */
|
|
1203
|
+
/* @__PURE__ */ React24.createElement(
|
|
1139
1204
|
Text,
|
|
1140
1205
|
{
|
|
1141
1206
|
style: [
|
|
@@ -1154,7 +1219,7 @@ function RadioGroup({
|
|
|
1154
1219
|
orientation = "vertical",
|
|
1155
1220
|
style
|
|
1156
1221
|
}) {
|
|
1157
|
-
return /* @__PURE__ */
|
|
1222
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles15.container, orientation === "horizontal" && styles15.horizontal, style] }, options.map((option) => /* @__PURE__ */ React24.createElement(
|
|
1158
1223
|
RadioItem,
|
|
1159
1224
|
{
|
|
1160
1225
|
key: option.value,
|
|
@@ -1210,7 +1275,7 @@ function TabTrigger({
|
|
|
1210
1275
|
const handlePressOut = () => {
|
|
1211
1276
|
Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver6, speed: 40, bounciness: 4 }).start();
|
|
1212
1277
|
};
|
|
1213
|
-
return /* @__PURE__ */
|
|
1278
|
+
return /* @__PURE__ */ React24.createElement(
|
|
1214
1279
|
TouchableOpacity,
|
|
1215
1280
|
{
|
|
1216
1281
|
style: styles16.trigger,
|
|
@@ -1221,7 +1286,7 @@ function TabTrigger({
|
|
|
1221
1286
|
activeOpacity: 1,
|
|
1222
1287
|
touchSoundDisabled: true
|
|
1223
1288
|
},
|
|
1224
|
-
/* @__PURE__ */
|
|
1289
|
+
/* @__PURE__ */ React24.createElement(Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React24.createElement(View, { style: styles16.triggerInner }, tab.icon ? /* @__PURE__ */ React24.createElement(View, { style: styles16.triggerIcon }, typeof tab.icon === "function" ? tab.icon(isActive) : tab.icon) : null, /* @__PURE__ */ React24.createElement(
|
|
1225
1290
|
Text,
|
|
1226
1291
|
{
|
|
1227
1292
|
style: [
|
|
@@ -1275,7 +1340,7 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1275
1340
|
if (!value) setInternal(v);
|
|
1276
1341
|
onValueChange?.(v);
|
|
1277
1342
|
};
|
|
1278
|
-
return /* @__PURE__ */
|
|
1343
|
+
return /* @__PURE__ */ React24.createElement(View, { style }, /* @__PURE__ */ React24.createElement(View, { style: [styles16.list, { backgroundColor: colors.muted }] }, /* @__PURE__ */ React24.createElement(
|
|
1279
1344
|
Animated.View,
|
|
1280
1345
|
{
|
|
1281
1346
|
style: [
|
|
@@ -1296,7 +1361,7 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1296
1361
|
}
|
|
1297
1362
|
]
|
|
1298
1363
|
}
|
|
1299
|
-
), tabs.map((tab) => /* @__PURE__ */
|
|
1364
|
+
), tabs.map((tab) => /* @__PURE__ */ React24.createElement(
|
|
1300
1365
|
TabTrigger,
|
|
1301
1366
|
{
|
|
1302
1367
|
key: tab.value,
|
|
@@ -1316,7 +1381,7 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1316
1381
|
}
|
|
1317
1382
|
function TabsContent({ value, activeValue, children, style }) {
|
|
1318
1383
|
if (value !== activeValue) return null;
|
|
1319
|
-
return /* @__PURE__ */
|
|
1384
|
+
return /* @__PURE__ */ React24.createElement(View, { style }, children);
|
|
1320
1385
|
}
|
|
1321
1386
|
var styles16 = StyleSheet.create({
|
|
1322
1387
|
list: {
|
|
@@ -1362,7 +1427,7 @@ function AccordionItemComponent({
|
|
|
1362
1427
|
const { colors } = useTheme();
|
|
1363
1428
|
const isExpanded = useSharedValue(isOpen);
|
|
1364
1429
|
const height = useSharedValue(0);
|
|
1365
|
-
|
|
1430
|
+
React24.useEffect(() => {
|
|
1366
1431
|
isExpanded.value = isOpen;
|
|
1367
1432
|
}, [isOpen]);
|
|
1368
1433
|
const derivedHeight = useDerivedValue(
|
|
@@ -1384,7 +1449,7 @@ function AccordionItemComponent({
|
|
|
1384
1449
|
const rotationStyle = useAnimatedStyle(() => ({
|
|
1385
1450
|
transform: [{ rotate: `${derivedRotation.value * 180}deg` }]
|
|
1386
1451
|
}));
|
|
1387
|
-
return /* @__PURE__ */
|
|
1452
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles17.item, { borderBottomColor: colors.border }] }, /* @__PURE__ */ React24.createElement(
|
|
1388
1453
|
Pressable,
|
|
1389
1454
|
{
|
|
1390
1455
|
style: ({ pressed }) => [styles17.trigger, { opacity: pressed ? 0.6 : 1 }],
|
|
@@ -1393,9 +1458,9 @@ function AccordionItemComponent({
|
|
|
1393
1458
|
onToggle();
|
|
1394
1459
|
}
|
|
1395
1460
|
},
|
|
1396
|
-
/* @__PURE__ */
|
|
1397
|
-
/* @__PURE__ */
|
|
1398
|
-
), /* @__PURE__ */
|
|
1461
|
+
/* @__PURE__ */ React24.createElement(Text, { style: [styles17.triggerText, { color: colors.foreground }] }, item.trigger),
|
|
1462
|
+
/* @__PURE__ */ React24.createElement(Animated10.View, { style: [styles17.chevron, rotationStyle] }, /* @__PURE__ */ React24.createElement(Entypo$1, { name: "chevron-down", size: 20, color: colors.foreground }))
|
|
1463
|
+
), /* @__PURE__ */ React24.createElement(Animated10.View, { style: bodyStyle }, /* @__PURE__ */ React24.createElement(
|
|
1399
1464
|
View,
|
|
1400
1465
|
{
|
|
1401
1466
|
style: styles17.content,
|
|
@@ -1420,7 +1485,7 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
1420
1485
|
);
|
|
1421
1486
|
}
|
|
1422
1487
|
};
|
|
1423
|
-
return /* @__PURE__ */
|
|
1488
|
+
return /* @__PURE__ */ React24.createElement(View, { style }, items.map((item) => /* @__PURE__ */ React24.createElement(
|
|
1424
1489
|
AccordionItemComponent,
|
|
1425
1490
|
{
|
|
1426
1491
|
key: item.value,
|
|
@@ -1479,7 +1544,7 @@ function Slider({
|
|
|
1479
1544
|
}
|
|
1480
1545
|
onValueChange?.(v);
|
|
1481
1546
|
};
|
|
1482
|
-
return /* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles18.wrapper, style], accessibilityLabel }, label || showValue ? /* @__PURE__ */ React24.createElement(View, { style: styles18.header }, label ? /* @__PURE__ */ React24.createElement(Text, { style: [styles18.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, showValue ? /* @__PURE__ */ React24.createElement(Text, { style: [styles18.valueText, { color: colors.mutedForeground }], allowFontScaling: true }, formatValue2(value)) : null) : null, /* @__PURE__ */ React24.createElement(View, { style: disabled ? styles18.disabled : void 0 }, /* @__PURE__ */ React24.createElement(
|
|
1483
1548
|
RNSlider,
|
|
1484
1549
|
{
|
|
1485
1550
|
value,
|
|
@@ -1541,7 +1606,7 @@ function Sheet({
|
|
|
1541
1606
|
ref.current?.dismiss();
|
|
1542
1607
|
}
|
|
1543
1608
|
}, [open]);
|
|
1544
|
-
const renderBackdrop = (props) => /* @__PURE__ */
|
|
1609
|
+
const renderBackdrop = (props) => /* @__PURE__ */ React24.createElement(
|
|
1545
1610
|
BottomSheetBackdrop,
|
|
1546
1611
|
{
|
|
1547
1612
|
...props,
|
|
@@ -1550,7 +1615,7 @@ function Sheet({
|
|
|
1550
1615
|
pressBehavior: "close"
|
|
1551
1616
|
}
|
|
1552
1617
|
);
|
|
1553
|
-
return /* @__PURE__ */
|
|
1618
|
+
return /* @__PURE__ */ React24.createElement(
|
|
1554
1619
|
BottomSheetModal,
|
|
1555
1620
|
{
|
|
1556
1621
|
ref,
|
|
@@ -1561,7 +1626,7 @@ function Sheet({
|
|
|
1561
1626
|
handleIndicatorStyle: [styles19.handle, { backgroundColor: colors.border }],
|
|
1562
1627
|
enablePanDownToClose: true
|
|
1563
1628
|
},
|
|
1564
|
-
/* @__PURE__ */
|
|
1629
|
+
/* @__PURE__ */ React24.createElement(BottomSheetView, { style: [styles19.content, style] }, title || description ? /* @__PURE__ */ React24.createElement(View, { style: styles19.header }, title ? /* @__PURE__ */ React24.createElement(Text, { style: [styles19.title, { color: colors.cardForeground }] }, title) : null, description ? /* @__PURE__ */ React24.createElement(Text, { style: [styles19.description, { color: colors.mutedForeground }] }, description) : null) : null, children)
|
|
1565
1630
|
);
|
|
1566
1631
|
}
|
|
1567
1632
|
var styles19 = StyleSheet.create({
|
|
@@ -1637,7 +1702,7 @@ function Select({
|
|
|
1637
1702
|
}
|
|
1638
1703
|
setPickerVisible(false);
|
|
1639
1704
|
};
|
|
1640
|
-
return /* @__PURE__ */
|
|
1705
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles20.container, style] }, label ? /* @__PURE__ */ React24.createElement(Text, { style: [styles20.label, { color: colors.foreground }] }, label) : null, !isWeb2 ? /* @__PURE__ */ React24.createElement(Animated.View, { style: { transform: [{ scale: scale2 }], opacity: disabled ? 0.45 : 1 } }, /* @__PURE__ */ React24.createElement(
|
|
1641
1706
|
TouchableOpacity,
|
|
1642
1707
|
{
|
|
1643
1708
|
style: [
|
|
@@ -1653,7 +1718,7 @@ function Select({
|
|
|
1653
1718
|
activeOpacity: 1,
|
|
1654
1719
|
touchSoundDisabled: true
|
|
1655
1720
|
},
|
|
1656
|
-
/* @__PURE__ */
|
|
1721
|
+
/* @__PURE__ */ React24.createElement(
|
|
1657
1722
|
Text,
|
|
1658
1723
|
{
|
|
1659
1724
|
style: [
|
|
@@ -1665,8 +1730,8 @@ function Select({
|
|
|
1665
1730
|
},
|
|
1666
1731
|
selected?.label ?? placeholder
|
|
1667
1732
|
),
|
|
1668
|
-
/* @__PURE__ */
|
|
1669
|
-
)) : null, isIOS ? /* @__PURE__ */
|
|
1733
|
+
/* @__PURE__ */ React24.createElement(Entypo$1, { name: "chevron-with-circle-down", size: 20, color: colors.mutedForeground })
|
|
1734
|
+
)) : null, isIOS ? /* @__PURE__ */ React24.createElement(
|
|
1670
1735
|
Modal,
|
|
1671
1736
|
{
|
|
1672
1737
|
visible: pickerVisible,
|
|
@@ -1674,16 +1739,16 @@ function Select({
|
|
|
1674
1739
|
animationType: "slide",
|
|
1675
1740
|
onRequestClose: handleDismiss
|
|
1676
1741
|
},
|
|
1677
|
-
/* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
1742
|
+
/* @__PURE__ */ React24.createElement(TouchableOpacity, { style: styles20.iosBackdrop, activeOpacity: 1, onPress: handleDismiss }),
|
|
1743
|
+
/* @__PURE__ */ React24.createElement(View, { style: [styles20.iosSheet, { backgroundColor: colors.card }] }, /* @__PURE__ */ React24.createElement(View, { style: [styles20.iosToolbar, { borderBottomColor: colors.border }] }, label ? /* @__PURE__ */ React24.createElement(Text, { style: [styles20.iosToolbarTitle, { color: colors.foreground }], allowFontScaling: true }, label) : /* @__PURE__ */ React24.createElement(View, null), /* @__PURE__ */ React24.createElement(TouchableOpacity, { onPress: handleConfirm, style: styles20.iosDoneBtn, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 } }, /* @__PURE__ */ React24.createElement(Text, { style: [styles20.iosDoneBtnText, { color: colors.primary }], allowFontScaling: true }, "Done"))), /* @__PURE__ */ React24.createElement(
|
|
1679
1744
|
Picker,
|
|
1680
1745
|
{
|
|
1681
1746
|
selectedValue: pendingValue ?? "",
|
|
1682
1747
|
onValueChange: (val) => setPendingValue(val),
|
|
1683
1748
|
itemStyle: { color: colors.foreground }
|
|
1684
1749
|
},
|
|
1685
|
-
!value ? /* @__PURE__ */
|
|
1686
|
-
options.map((o) => /* @__PURE__ */
|
|
1750
|
+
!value ? /* @__PURE__ */ React24.createElement(Picker.Item, { label: placeholder, value: "", color: colors.mutedForeground, enabled: false }) : null,
|
|
1751
|
+
options.map((o) => /* @__PURE__ */ React24.createElement(
|
|
1687
1752
|
Picker.Item,
|
|
1688
1753
|
{
|
|
1689
1754
|
key: o.value,
|
|
@@ -1694,7 +1759,7 @@ function Select({
|
|
|
1694
1759
|
}
|
|
1695
1760
|
))
|
|
1696
1761
|
))
|
|
1697
|
-
) : null, isAndroid ? /* @__PURE__ */
|
|
1762
|
+
) : null, isAndroid ? /* @__PURE__ */ React24.createElement(
|
|
1698
1763
|
Picker,
|
|
1699
1764
|
{
|
|
1700
1765
|
ref: pickerRef,
|
|
@@ -1710,8 +1775,8 @@ function Select({
|
|
|
1710
1775
|
prompt: label,
|
|
1711
1776
|
style: styles20.androidHiddenPicker
|
|
1712
1777
|
},
|
|
1713
|
-
!value ? /* @__PURE__ */
|
|
1714
|
-
options.map((o) => /* @__PURE__ */
|
|
1778
|
+
!value ? /* @__PURE__ */ React24.createElement(Picker.Item, { label: placeholder, value: "", enabled: false }) : null,
|
|
1779
|
+
options.map((o) => /* @__PURE__ */ React24.createElement(
|
|
1715
1780
|
Picker.Item,
|
|
1716
1781
|
{
|
|
1717
1782
|
key: o.value,
|
|
@@ -1720,7 +1785,7 @@ function Select({
|
|
|
1720
1785
|
enabled: !o.disabled
|
|
1721
1786
|
}
|
|
1722
1787
|
))
|
|
1723
|
-
) : null, isWeb2 ? /* @__PURE__ */
|
|
1788
|
+
) : null, isWeb2 ? /* @__PURE__ */ React24.createElement(
|
|
1724
1789
|
Picker,
|
|
1725
1790
|
{
|
|
1726
1791
|
selectedValue: value ?? "",
|
|
@@ -1740,8 +1805,8 @@ function Select({
|
|
|
1740
1805
|
}
|
|
1741
1806
|
]
|
|
1742
1807
|
},
|
|
1743
|
-
/* @__PURE__ */
|
|
1744
|
-
options.map((o) => /* @__PURE__ */
|
|
1808
|
+
/* @__PURE__ */ React24.createElement(Picker.Item, { label: placeholder, value: "", enabled: false }),
|
|
1809
|
+
options.map((o) => /* @__PURE__ */ React24.createElement(
|
|
1745
1810
|
Picker.Item,
|
|
1746
1811
|
{
|
|
1747
1812
|
key: o.value,
|
|
@@ -1750,7 +1815,7 @@ function Select({
|
|
|
1750
1815
|
enabled: !o.disabled
|
|
1751
1816
|
}
|
|
1752
1817
|
))
|
|
1753
|
-
) : null, error ? /* @__PURE__ */
|
|
1818
|
+
) : null, error ? /* @__PURE__ */ React24.createElement(Text, { style: [styles20.helperText, { color: colors.destructive }] }, error) : null);
|
|
1754
1819
|
}
|
|
1755
1820
|
var styles20 = StyleSheet.create({
|
|
1756
1821
|
container: {
|
|
@@ -1880,9 +1945,9 @@ function ToastNotification({ item, onDismiss }) {
|
|
|
1880
1945
|
destructive: colors.destructiveForeground,
|
|
1881
1946
|
success: colors.successForeground
|
|
1882
1947
|
}[item.variant ?? "default"];
|
|
1883
|
-
const defaultIcon = item.variant === "success" ? /* @__PURE__ */
|
|
1884
|
-
const leftIcon = item.icon ?? defaultIcon;
|
|
1885
|
-
return /* @__PURE__ */
|
|
1948
|
+
const defaultIcon = item.variant === "success" ? /* @__PURE__ */ React24.createElement(FontAwesome5$1, { name: "check-circle", size: 22, color: textColor }) : item.variant === "destructive" ? /* @__PURE__ */ React24.createElement(MaterialIcons$1, { name: "error-outline", size: 24, color: textColor }) : /* @__PURE__ */ React24.createElement(Entypo$1, { name: "info-with-circle", size: 22, color: textColor });
|
|
1949
|
+
const leftIcon = item.iconName ? renderIcon(item.iconName, 22, item.iconColor ?? textColor) : item.icon ?? defaultIcon;
|
|
1950
|
+
return /* @__PURE__ */ React24.createElement(GestureDetector, { gesture: panGesture }, /* @__PURE__ */ React24.createElement(Animated10.View, { style: [styles21.toast, { backgroundColor: bgColor }, animatedStyle] }, /* @__PURE__ */ React24.createElement(View, { style: styles21.leftIconContainer }, leftIcon), /* @__PURE__ */ React24.createElement(View, { style: styles21.toastContent }, item.title ? /* @__PURE__ */ React24.createElement(Text, { style: [styles21.toastTitle, { color: textColor }] }, item.title) : null, item.description ? /* @__PURE__ */ React24.createElement(Text, { style: [styles21.toastDescription, { color: textColor, opacity: 0.85 }] }, item.description) : null), /* @__PURE__ */ React24.createElement(TouchableOpacity, { onPress: onDismiss, style: styles21.dismissButton, touchSoundDisabled: true }, /* @__PURE__ */ React24.createElement(AntDesign$1, { name: "close-circle", size: 18, color: textColor }))));
|
|
1886
1951
|
}
|
|
1887
1952
|
function ToastProvider({ children }) {
|
|
1888
1953
|
const [toasts, setToasts] = useState([]);
|
|
@@ -1901,7 +1966,7 @@ function ToastProvider({ children }) {
|
|
|
1901
1966
|
const dismiss = useCallback((id) => {
|
|
1902
1967
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
1903
1968
|
}, []);
|
|
1904
|
-
return /* @__PURE__ */
|
|
1969
|
+
return /* @__PURE__ */ React24.createElement(ToastContext.Provider, { value: { toast, dismiss } }, children, /* @__PURE__ */ React24.createElement(View, { style: [styles21.container, Platform.OS === "web" && styles21.containerWeb, { top: insets.top + 8 }], pointerEvents: "box-none" }, toasts.map((item) => /* @__PURE__ */ React24.createElement(ToastNotification, { key: item.id, item, onDismiss: () => dismiss(item.id) }))));
|
|
1905
1970
|
}
|
|
1906
1971
|
var styles21 = StyleSheet.create({
|
|
1907
1972
|
container: {
|
|
@@ -1981,7 +2046,7 @@ function CurrencyInput({
|
|
|
1981
2046
|
onChangeValue?.(isNaN(raw) ? 0 : raw);
|
|
1982
2047
|
};
|
|
1983
2048
|
const inputStyle = size === "large" ? { fontSize: ms(36) } : {};
|
|
1984
|
-
return /* @__PURE__ */
|
|
2049
|
+
return /* @__PURE__ */ React24.createElement(
|
|
1985
2050
|
Input,
|
|
1986
2051
|
{
|
|
1987
2052
|
value,
|
|
@@ -2012,7 +2077,7 @@ function formatValue(value, prefix, showDecimals) {
|
|
|
2012
2077
|
function CurrencyDisplay({ value, prefix = "$", showDecimals = false, textColor, style }) {
|
|
2013
2078
|
const { colors } = useTheme();
|
|
2014
2079
|
const formatted = formatValue(value, prefix, showDecimals);
|
|
2015
|
-
return /* @__PURE__ */
|
|
2080
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles22.container, style] }, /* @__PURE__ */ React24.createElement(Text, { style: [styles22.amount, { color: textColor ?? colors.foreground }], allowFontScaling: true }, formatted));
|
|
2016
2081
|
}
|
|
2017
2082
|
var styles22 = StyleSheet.create({
|
|
2018
2083
|
container: {},
|
|
@@ -2027,6 +2092,10 @@ function ListItem({
|
|
|
2027
2092
|
rightRender,
|
|
2028
2093
|
trailing,
|
|
2029
2094
|
icon,
|
|
2095
|
+
leftIcon,
|
|
2096
|
+
rightIcon,
|
|
2097
|
+
leftIconColor,
|
|
2098
|
+
rightIconColor,
|
|
2030
2099
|
title,
|
|
2031
2100
|
subtitle,
|
|
2032
2101
|
caption,
|
|
@@ -2063,8 +2132,8 @@ function ListItem({
|
|
|
2063
2132
|
selectionAsync();
|
|
2064
2133
|
onPress?.();
|
|
2065
2134
|
};
|
|
2066
|
-
const effectiveLeft = leftRender ?? icon;
|
|
2067
|
-
const effectiveRight = rightRender ?? trailing;
|
|
2135
|
+
const effectiveLeft = leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender ?? icon;
|
|
2136
|
+
const effectiveRight = rightIcon ? renderIcon(rightIcon, 24, rightIconColor ?? colors.mutedForeground) : rightRender ?? trailing;
|
|
2068
2137
|
const cardStyle = variant === "card" ? {
|
|
2069
2138
|
backgroundColor: colors.card,
|
|
2070
2139
|
borderRadius: 12,
|
|
@@ -2076,7 +2145,7 @@ function ListItem({
|
|
|
2076
2145
|
shadowRadius: 6,
|
|
2077
2146
|
elevation: 2
|
|
2078
2147
|
} : {};
|
|
2079
|
-
return /* @__PURE__ */
|
|
2148
|
+
return /* @__PURE__ */ React24.createElement(Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles23.disabled] }, /* @__PURE__ */ React24.createElement(
|
|
2080
2149
|
TouchableOpacity,
|
|
2081
2150
|
{
|
|
2082
2151
|
style: [styles23.container, cardStyle, style],
|
|
@@ -2087,8 +2156,8 @@ function ListItem({
|
|
|
2087
2156
|
activeOpacity: 1,
|
|
2088
2157
|
touchSoundDisabled: true
|
|
2089
2158
|
},
|
|
2090
|
-
effectiveLeft ? /* @__PURE__ */
|
|
2091
|
-
/* @__PURE__ */
|
|
2159
|
+
effectiveLeft ? /* @__PURE__ */ React24.createElement(View, { style: styles23.leftContainer }, effectiveLeft) : null,
|
|
2160
|
+
/* @__PURE__ */ React24.createElement(View, { style: styles23.content }, /* @__PURE__ */ React24.createElement(
|
|
2092
2161
|
Text,
|
|
2093
2162
|
{
|
|
2094
2163
|
style: [styles23.title, { color: colors.foreground }, titleStyle],
|
|
@@ -2096,7 +2165,7 @@ function ListItem({
|
|
|
2096
2165
|
allowFontScaling: true
|
|
2097
2166
|
},
|
|
2098
2167
|
title
|
|
2099
|
-
), subtitle ? /* @__PURE__ */
|
|
2168
|
+
), subtitle ? /* @__PURE__ */ React24.createElement(
|
|
2100
2169
|
Text,
|
|
2101
2170
|
{
|
|
2102
2171
|
style: [styles23.subtitle, { color: colors.mutedForeground }, subtitleStyle],
|
|
@@ -2104,7 +2173,7 @@ function ListItem({
|
|
|
2104
2173
|
allowFontScaling: true
|
|
2105
2174
|
},
|
|
2106
2175
|
subtitle
|
|
2107
|
-
) : null, caption ? /* @__PURE__ */
|
|
2176
|
+
) : null, caption ? /* @__PURE__ */ React24.createElement(
|
|
2108
2177
|
Text,
|
|
2109
2178
|
{
|
|
2110
2179
|
style: [styles23.caption, { color: colors.mutedForeground }, captionStyle],
|
|
@@ -2113,15 +2182,15 @@ function ListItem({
|
|
|
2113
2182
|
},
|
|
2114
2183
|
caption
|
|
2115
2184
|
) : null),
|
|
2116
|
-
effectiveRight !== void 0 ? /* @__PURE__ */
|
|
2185
|
+
effectiveRight !== void 0 ? /* @__PURE__ */ React24.createElement(View, { style: styles23.rightContainer }, typeof effectiveRight === "string" ? /* @__PURE__ */ React24.createElement(
|
|
2117
2186
|
Text,
|
|
2118
2187
|
{
|
|
2119
2188
|
style: [styles23.rightText, { color: colors.mutedForeground }],
|
|
2120
2189
|
allowFontScaling: true
|
|
2121
2190
|
},
|
|
2122
2191
|
effectiveRight
|
|
2123
|
-
) : effectiveRight) : showChevron ? /* @__PURE__ */
|
|
2124
|
-
), showSeparator ? /* @__PURE__ */
|
|
2192
|
+
) : effectiveRight) : showChevron ? /* @__PURE__ */ React24.createElement(Entypo$1, { name: "chevron-with-circle-right", size: 20, color: colors.mutedForeground }) : null
|
|
2193
|
+
), showSeparator ? /* @__PURE__ */ React24.createElement(
|
|
2125
2194
|
View,
|
|
2126
2195
|
{
|
|
2127
2196
|
style: [
|
|
@@ -2231,7 +2300,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2231
2300
|
inputRange: [0, 1],
|
|
2232
2301
|
outputRange: [colors.border, colors.primary]
|
|
2233
2302
|
});
|
|
2234
|
-
return /* @__PURE__ */
|
|
2303
|
+
return /* @__PURE__ */ React24.createElement(Animated.View, { style: [styles24.wrapper, { transform: [{ scale: scale2 }] }, style] }, /* @__PURE__ */ React24.createElement(
|
|
2235
2304
|
TouchableOpacity,
|
|
2236
2305
|
{
|
|
2237
2306
|
onPress: handlePress,
|
|
@@ -2240,7 +2309,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2240
2309
|
activeOpacity: 1,
|
|
2241
2310
|
touchSoundDisabled: true
|
|
2242
2311
|
},
|
|
2243
|
-
/* @__PURE__ */
|
|
2312
|
+
/* @__PURE__ */ React24.createElement(Animated.View, { style: [styles24.chip, { backgroundColor, borderColor }] }, /* @__PURE__ */ React24.createElement(Animated.Text, { style: [styles24.label, { color: textColor }], allowFontScaling: true }, label))
|
|
2244
2313
|
));
|
|
2245
2314
|
}
|
|
2246
2315
|
function ChipGroup({ options, value, onValueChange, multiSelect = false, style }) {
|
|
@@ -2265,7 +2334,7 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
2265
2334
|
}
|
|
2266
2335
|
return optionValue === value;
|
|
2267
2336
|
};
|
|
2268
|
-
return /* @__PURE__ */
|
|
2337
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles24.group, style] }, options.map((opt) => /* @__PURE__ */ React24.createElement(
|
|
2269
2338
|
Chip,
|
|
2270
2339
|
{
|
|
2271
2340
|
key: opt.value,
|
|
@@ -2307,15 +2376,15 @@ function ConfirmDialog({
|
|
|
2307
2376
|
onCancel
|
|
2308
2377
|
}) {
|
|
2309
2378
|
const { colors } = useTheme();
|
|
2310
|
-
return /* @__PURE__ */
|
|
2379
|
+
return /* @__PURE__ */ React24.createElement(Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onCancel }, /* @__PURE__ */ React24.createElement(TouchableOpacity, { style: styles25.overlay, activeOpacity: 1, onPress: onCancel }, /* @__PURE__ */ React24.createElement(
|
|
2311
2380
|
View,
|
|
2312
2381
|
{
|
|
2313
2382
|
style: [styles25.dialog, { backgroundColor: colors.card }],
|
|
2314
2383
|
onStartShouldSetResponder: () => true
|
|
2315
2384
|
},
|
|
2316
|
-
/* @__PURE__ */
|
|
2317
|
-
description ? /* @__PURE__ */
|
|
2318
|
-
/* @__PURE__ */
|
|
2385
|
+
/* @__PURE__ */ React24.createElement(Text, { style: [styles25.title, { color: colors.cardForeground }], allowFontScaling: true }, title),
|
|
2386
|
+
description ? /* @__PURE__ */ React24.createElement(Text, { style: [styles25.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null,
|
|
2387
|
+
/* @__PURE__ */ React24.createElement(View, { style: styles25.actions }, /* @__PURE__ */ React24.createElement(Button, { label: cancelLabel, variant: "outline", fullWidth: true, onPress: onCancel }), /* @__PURE__ */ React24.createElement(Button, { label: confirmLabel, variant: confirmVariant, fullWidth: true, onPress: onConfirm }))
|
|
2319
2388
|
)));
|
|
2320
2389
|
}
|
|
2321
2390
|
var styles25 = StyleSheet.create({
|
|
@@ -2354,7 +2423,7 @@ var styles25 = StyleSheet.create({
|
|
|
2354
2423
|
});
|
|
2355
2424
|
function LabelValue({ label, value, style }) {
|
|
2356
2425
|
const { colors } = useTheme();
|
|
2357
|
-
return /* @__PURE__ */
|
|
2426
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles26.container, style] }, /* @__PURE__ */ React24.createElement(Text, { style: [styles26.label, { color: colors.mutedForeground }], allowFontScaling: true }, label), typeof value === "string" ? /* @__PURE__ */ React24.createElement(Text, { style: [styles26.value, { color: colors.foreground }], allowFontScaling: true }, value) : value);
|
|
2358
2427
|
}
|
|
2359
2428
|
var styles26 = StyleSheet.create({
|
|
2360
2429
|
container: {
|
|
@@ -2406,7 +2475,7 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2406
2475
|
onChange({ month: value.month + 1, year: value.year });
|
|
2407
2476
|
}
|
|
2408
2477
|
};
|
|
2409
|
-
return /* @__PURE__ */
|
|
2478
|
+
return /* @__PURE__ */ React24.createElement(View, { style: [styles27.container, style] }, /* @__PURE__ */ React24.createElement(
|
|
2410
2479
|
TouchableOpacity,
|
|
2411
2480
|
{
|
|
2412
2481
|
style: styles27.arrow,
|
|
@@ -2414,8 +2483,8 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2414
2483
|
activeOpacity: 0.6,
|
|
2415
2484
|
touchSoundDisabled: true
|
|
2416
2485
|
},
|
|
2417
|
-
/* @__PURE__ */
|
|
2418
|
-
), /* @__PURE__ */
|
|
2486
|
+
/* @__PURE__ */ React24.createElement(Entypo$1, { name: "chevron-left", size: 22, color: colors.foreground })
|
|
2487
|
+
), /* @__PURE__ */ React24.createElement(Text, { style: [styles27.label, { color: colors.foreground }], allowFontScaling: true }, MONTH_NAMES[value.month - 1], " ", value.year), /* @__PURE__ */ React24.createElement(
|
|
2419
2488
|
TouchableOpacity,
|
|
2420
2489
|
{
|
|
2421
2490
|
style: styles27.arrow,
|
|
@@ -2423,7 +2492,7 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2423
2492
|
activeOpacity: 0.6,
|
|
2424
2493
|
touchSoundDisabled: true
|
|
2425
2494
|
},
|
|
2426
|
-
/* @__PURE__ */
|
|
2495
|
+
/* @__PURE__ */ React24.createElement(Entypo$1, { name: "chevron-right", size: 22, color: colors.foreground })
|
|
2427
2496
|
));
|
|
2428
2497
|
}
|
|
2429
2498
|
var styles27 = StyleSheet.create({
|
|
@@ -2447,4 +2516,62 @@ var styles27 = StyleSheet.create({
|
|
|
2447
2516
|
}
|
|
2448
2517
|
});
|
|
2449
2518
|
|
|
2450
|
-
|
|
2519
|
+
// src/tokens.ts
|
|
2520
|
+
var SPACING = {
|
|
2521
|
+
xs: 4,
|
|
2522
|
+
sm: 8,
|
|
2523
|
+
md: 12,
|
|
2524
|
+
lg: 16,
|
|
2525
|
+
xl: 24,
|
|
2526
|
+
"2xl": 32,
|
|
2527
|
+
"3xl": 48
|
|
2528
|
+
};
|
|
2529
|
+
var ICON_SIZES = {
|
|
2530
|
+
sm: 14,
|
|
2531
|
+
md: 18,
|
|
2532
|
+
lg: 22,
|
|
2533
|
+
xl: 28,
|
|
2534
|
+
"2xl": 32
|
|
2535
|
+
};
|
|
2536
|
+
var RADIUS = {
|
|
2537
|
+
sm: 4,
|
|
2538
|
+
md: 8,
|
|
2539
|
+
lg: 12,
|
|
2540
|
+
xl: 16,
|
|
2541
|
+
full: 9999
|
|
2542
|
+
};
|
|
2543
|
+
var SHADOWS = {
|
|
2544
|
+
sm: {
|
|
2545
|
+
shadowColor: "#000",
|
|
2546
|
+
shadowOffset: { width: 0, height: 1 },
|
|
2547
|
+
shadowOpacity: 0.08,
|
|
2548
|
+
shadowRadius: 4,
|
|
2549
|
+
elevation: 2
|
|
2550
|
+
},
|
|
2551
|
+
md: {
|
|
2552
|
+
shadowColor: "#000",
|
|
2553
|
+
shadowOffset: { width: 0, height: 3 },
|
|
2554
|
+
shadowOpacity: 0.12,
|
|
2555
|
+
shadowRadius: 8,
|
|
2556
|
+
elevation: 5
|
|
2557
|
+
},
|
|
2558
|
+
lg: {
|
|
2559
|
+
shadowColor: "#000",
|
|
2560
|
+
shadowOffset: { width: 0, height: 6 },
|
|
2561
|
+
shadowOpacity: 0.2,
|
|
2562
|
+
shadowRadius: 16,
|
|
2563
|
+
elevation: 10
|
|
2564
|
+
},
|
|
2565
|
+
xl: {
|
|
2566
|
+
shadowColor: "#000",
|
|
2567
|
+
shadowOffset: { width: 0, height: 12 },
|
|
2568
|
+
shadowOpacity: 0.28,
|
|
2569
|
+
shadowRadius: 24,
|
|
2570
|
+
elevation: 18
|
|
2571
|
+
}
|
|
2572
|
+
};
|
|
2573
|
+
var BREAKPOINTS = {
|
|
2574
|
+
wide: 700
|
|
2575
|
+
};
|
|
2576
|
+
|
|
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 };
|