@retray-dev/ui-kit 1.8.0 → 2.3.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/dist/index.js CHANGED
@@ -2,10 +2,12 @@
2
2
 
3
3
  var React23 = require('react');
4
4
  var reactNative = require('react-native');
5
- var Haptics11 = require('expo-haptics');
5
+ var Haptics12 = require('expo-haptics');
6
6
  var expoLinearGradient = require('expo-linear-gradient');
7
7
  var ReanimatedAnimated = require('react-native-reanimated');
8
+ var RNSlider = require('@react-native-community/slider');
8
9
  var bottomSheet = require('@gorhom/bottom-sheet');
10
+ var picker = require('@react-native-picker/picker');
9
11
  var reactNativeWorklets = require('react-native-worklets');
10
12
  var reactNativeGestureHandler = require('react-native-gesture-handler');
11
13
  var reactNativeSafeAreaContext = require('react-native-safe-area-context');
@@ -31,8 +33,9 @@ function _interopNamespace(e) {
31
33
  }
32
34
 
33
35
  var React23__default = /*#__PURE__*/_interopDefault(React23);
34
- var Haptics11__namespace = /*#__PURE__*/_interopNamespace(Haptics11);
36
+ var Haptics12__namespace = /*#__PURE__*/_interopNamespace(Haptics12);
35
37
  var ReanimatedAnimated__default = /*#__PURE__*/_interopDefault(ReanimatedAnimated);
38
+ var RNSlider__default = /*#__PURE__*/_interopDefault(RNSlider);
36
39
 
37
40
  // src/theme/ThemeProvider.tsx
38
41
 
@@ -43,41 +46,41 @@ var defaultLight = {
43
46
  card: "#ffffff",
44
47
  cardForeground: "#171717",
45
48
  primary: "#1a1a1a",
46
- primaryForeground: "#fafafa",
47
- secondary: "#f5f5f5",
48
- secondaryForeground: "#1a1a1a",
49
- muted: "#f5f5f5",
50
- mutedForeground: "#646464",
51
- accent: "#f5f5f5",
52
- accentForeground: "#1a1a1a",
49
+ primaryForeground: "#ffffff",
50
+ secondary: "#f1f1f1",
51
+ secondaryForeground: "#171717",
52
+ muted: "#f1f1f1",
53
+ mutedForeground: "#a2a2a2",
54
+ accent: "#e4e4e4",
55
+ accentForeground: "#171717",
53
56
  destructive: "#ef4444",
54
- destructiveForeground: "#fafafa",
57
+ destructiveForeground: "#1a1a1a",
55
58
  border: "#e5e5e5",
56
59
  input: "#e5e5e5",
57
- ring: "#a3a3a3",
60
+ ring: "#1a1a1a",
58
61
  success: "#16a34a",
59
- successForeground: "#ffffff"
62
+ successForeground: "#1a1a1a"
60
63
  };
61
64
  var defaultDark = {
62
65
  background: "#171717",
63
66
  foreground: "#fafafa",
64
- card: "#1f1f1f",
67
+ card: "#222222",
65
68
  cardForeground: "#fafafa",
66
69
  primary: "#fafafa",
67
70
  primaryForeground: "#1a1a1a",
68
- secondary: "#2a2a2a",
71
+ secondary: "#323232",
69
72
  secondaryForeground: "#fafafa",
70
- muted: "#2a2a2a",
71
- mutedForeground: "#a3a3a3",
72
- accent: "#2a2a2a",
73
+ muted: "#323232",
74
+ mutedForeground: "#888888",
75
+ accent: "#323232",
73
76
  accentForeground: "#fafafa",
74
77
  destructive: "#dc2626",
75
- destructiveForeground: "#fafafa",
78
+ destructiveForeground: "#1a1a1a",
76
79
  border: "#2a2a2a",
77
80
  input: "#2a2a2a",
78
- ring: "#d4d4d4",
81
+ ring: "#fafafa",
79
82
  success: "#22c55e",
80
- successForeground: "#ffffff"
83
+ successForeground: "#1a1a1a"
81
84
  };
82
85
 
83
86
  // src/theme/ThemeProvider.tsx
@@ -90,13 +93,17 @@ function ThemeProvider({ children, theme, colorScheme = "system" }) {
90
93
  const resolvedScheme = colorScheme === "system" ? systemScheme : colorScheme;
91
94
  const colors = React23.useMemo(() => {
92
95
  const base = resolvedScheme === "dark" ? defaultDark : defaultLight;
93
- const overrides = resolvedScheme === "dark" ? theme?.dark : theme?.light;
94
- return { ...base, ...overrides };
96
+ const override = resolvedScheme === "dark" ? theme?.dark : theme?.light;
97
+ return override ? { ...base, ...override } : base;
95
98
  }, [resolvedScheme, theme]);
96
99
  return /* @__PURE__ */ React23__default.default.createElement(ThemeContext.Provider, { value: { colors, colorScheme: resolvedScheme } }, children);
97
100
  }
98
101
  function useTheme() {
99
- return React23.useContext(ThemeContext);
102
+ const context = React23.useContext(ThemeContext);
103
+ if (!context) {
104
+ throw new Error("useTheme must be used within a ThemeProvider");
105
+ }
106
+ return context;
100
107
  }
101
108
  var nativeDriver = reactNative.Platform.OS !== "web";
102
109
  var containerSizeStyles = {
@@ -138,7 +145,7 @@ function Button({
138
145
  reactNative.Animated.spring(scale, { toValue: 1, useNativeDriver: nativeDriver, speed: 40, bounciness: 4 }).start();
139
146
  };
140
147
  const handlePress = (e) => {
141
- Haptics11__namespace.impactAsync(Haptics11__namespace.ImpactFeedbackStyle.Light);
148
+ Haptics12__namespace.impactAsync(Haptics12__namespace.ImpactFeedbackStyle.Light);
142
149
  onPress?.(e);
143
150
  };
144
151
  const containerVariantStyle = {
@@ -189,7 +196,7 @@ var styles = reactNative.StyleSheet.create({
189
196
  width: "100%"
190
197
  },
191
198
  disabled: {
192
- opacity: 0.45
199
+ opacity: 0.5
193
200
  },
194
201
  label: {
195
202
  fontWeight: "600"
@@ -219,33 +226,52 @@ function Text2({ variant = "body", color, style, children, ...props }) {
219
226
  children
220
227
  );
221
228
  }
222
- function Input({ label, error, hint, containerStyle, style, onFocus, onBlur, ...props }) {
229
+ var webInputResetStyle = reactNative.Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
230
+ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, type = "text", containerStyle, style, onFocus, onBlur, secureTextEntry, ...props }) {
223
231
  const { colors } = useTheme();
224
232
  const [focused, setFocused] = React23.useState(false);
233
+ const [showPassword, setShowPassword] = React23.useState(false);
234
+ const isPassword = type === "password";
235
+ const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
236
+ const effectiveSuffix = isPassword && !suffix ? /* @__PURE__ */ React23__default.default.createElement(reactNative.TouchableOpacity, { onPress: () => setShowPassword(!showPassword), style: styles2.passwordToggle, activeOpacity: 0.6 }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles2.suffixText, { color: colors.mutedForeground }] }, showPassword ? "\u{1F441}" : "\u{1F441}\u200D\u{1F5E8}")) : suffix;
225
237
  return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles2.container, containerStyle] }, label ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles2.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React23__default.default.createElement(
226
- reactNative.TextInput,
238
+ reactNative.View,
227
239
  {
228
240
  style: [
229
- styles2.input,
241
+ styles2.inputWrapper,
230
242
  {
231
- borderColor: error ? colors.destructive : focused ? colors.ring : colors.border,
232
- color: colors.foreground,
243
+ borderColor: error ? colors.destructive : focused ? colors.ring ?? colors.primary : colors.border,
233
244
  backgroundColor: colors.background
245
+ }
246
+ ]
247
+ },
248
+ prefix ? typeof prefix === "string" ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles2.prefixText, { color: colors.mutedForeground }, prefixStyle], allowFontScaling: true }, prefix) : /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles2.prefixContainer }, prefix) : null,
249
+ /* @__PURE__ */ React23__default.default.createElement(
250
+ reactNative.TextInput,
251
+ {
252
+ style: [
253
+ styles2.input,
254
+ {
255
+ color: colors.foreground
256
+ },
257
+ webInputResetStyle,
258
+ style
259
+ ],
260
+ onFocus: (e) => {
261
+ setFocused(true);
262
+ onFocus?.(e);
234
263
  },
235
- style
236
- ],
237
- onFocus: (e) => {
238
- setFocused(true);
239
- onFocus?.(e);
240
- },
241
- onBlur: (e) => {
242
- setFocused(false);
243
- onBlur?.(e);
244
- },
245
- placeholderTextColor: colors.mutedForeground,
246
- allowFontScaling: true,
247
- ...props
248
- }
264
+ onBlur: (e) => {
265
+ setFocused(false);
266
+ onBlur?.(e);
267
+ },
268
+ placeholderTextColor: colors.mutedForeground,
269
+ allowFontScaling: true,
270
+ secureTextEntry: effectiveSecure,
271
+ ...props
272
+ }
273
+ ),
274
+ effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles2.suffixText, { color: colors.mutedForeground }, suffixStyle], allowFontScaling: true }, effectiveSuffix) : /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles2.suffixContainer }, effectiveSuffix) : null
249
275
  ), error ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles2.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null, !error && hint ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles2.helperText, { color: colors.mutedForeground }], allowFontScaling: true }, hint) : null);
250
276
  }
251
277
  var styles2 = reactNative.StyleSheet.create({
@@ -257,18 +283,56 @@ var styles2 = reactNative.StyleSheet.create({
257
283
  fontWeight: "500",
258
284
  marginBottom: 6
259
285
  },
260
- input: {
286
+ inputWrapper: {
287
+ flexDirection: "row",
288
+ alignItems: "center",
261
289
  borderWidth: 1.5,
262
290
  borderRadius: 14,
263
291
  paddingHorizontal: 20,
264
- paddingVertical: 16,
265
- fontSize: 17
292
+ paddingVertical: 16
293
+ },
294
+ input: {
295
+ flex: 1,
296
+ fontSize: 17,
297
+ paddingVertical: 0
298
+ },
299
+ prefixContainer: {
300
+ marginRight: 8
301
+ },
302
+ prefixText: {
303
+ fontSize: 17,
304
+ marginRight: 8
305
+ },
306
+ suffixContainer: {
307
+ marginLeft: 8
308
+ },
309
+ suffixText: {
310
+ fontSize: 17,
311
+ marginLeft: 8
312
+ },
313
+ passwordToggle: {
314
+ padding: 4
266
315
  },
267
316
  helperText: {
268
317
  fontSize: 13
269
318
  }
270
319
  });
271
- function Badge({ label, variant = "default", style }) {
320
+ var sizePadding = {
321
+ sm: { paddingHorizontal: 8, paddingVertical: 2 },
322
+ md: { paddingHorizontal: 10, paddingVertical: 4 },
323
+ lg: { paddingHorizontal: 12, paddingVertical: 6 }
324
+ };
325
+ var sizeFontSize = {
326
+ sm: { fontSize: 11 },
327
+ md: { fontSize: 13 },
328
+ lg: { fontSize: 15 }
329
+ };
330
+ var sizeIconGap = {
331
+ sm: 4,
332
+ md: 6,
333
+ lg: 6
334
+ };
335
+ function Badge({ label, children, variant = "default", size = "md", icon, style }) {
272
336
  const { colors } = useTheme();
273
337
  const containerStyle = {
274
338
  default: { backgroundColor: colors.primary },
@@ -282,40 +346,100 @@ function Badge({ label, variant = "default", style }) {
282
346
  destructive: colors.destructiveForeground,
283
347
  outline: colors.foreground
284
348
  }[variant];
285
- return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles3.container, containerStyle, style] }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles3.label, { color: textColor }], allowFontScaling: true }, label));
349
+ const content = children ?? label;
350
+ return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles3.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style] }, icon ? /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles3.iconContainer }, icon) : null, typeof content === "string" ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles3.label, { color: textColor }, sizeFontSize[size]], allowFontScaling: true }, content) : content);
286
351
  }
287
352
  var styles3 = reactNative.StyleSheet.create({
288
353
  container: {
289
354
  borderRadius: 8,
290
- paddingHorizontal: 10,
291
- paddingVertical: 4,
292
- alignSelf: "flex-start"
355
+ alignSelf: "flex-start",
356
+ flexDirection: "row",
357
+ alignItems: "center"
358
+ },
359
+ iconContainer: {
360
+ justifyContent: "center",
361
+ alignItems: "center"
293
362
  },
294
363
  label: {
295
- fontSize: 13,
296
364
  fontWeight: "500"
297
365
  }
298
366
  });
299
- function Card({ children, style }) {
367
+ var nativeDriver2 = reactNative.Platform.OS !== "web";
368
+ function Card({ children, variant = "elevated", onPress, style }) {
300
369
  const { colors } = useTheme();
301
- return /* @__PURE__ */ React23__default.default.createElement(
302
- reactNative.View,
303
- {
304
- style: [styles4.card, { backgroundColor: colors.card, borderColor: colors.border }, style]
370
+ const scale = React23.useRef(new reactNative.Animated.Value(1)).current;
371
+ const handlePressIn = () => {
372
+ if (!onPress) return;
373
+ reactNative.Animated.spring(scale, {
374
+ toValue: 0.98,
375
+ useNativeDriver: nativeDriver2,
376
+ speed: 40,
377
+ bounciness: 0
378
+ }).start();
379
+ };
380
+ const handlePressOut = () => {
381
+ if (!onPress) return;
382
+ reactNative.Animated.spring(scale, {
383
+ toValue: 1,
384
+ useNativeDriver: nativeDriver2,
385
+ speed: 40,
386
+ bounciness: 4
387
+ }).start();
388
+ };
389
+ const handlePress = () => {
390
+ if (!onPress) return;
391
+ Haptics12__namespace.impactAsync(Haptics12__namespace.ImpactFeedbackStyle.Light);
392
+ onPress();
393
+ };
394
+ const variantStyle = {
395
+ elevated: {
396
+ backgroundColor: colors.card,
397
+ borderColor: colors.border,
398
+ shadowColor: "#000",
399
+ shadowOffset: { width: 0, height: 1 },
400
+ shadowOpacity: 0.05,
401
+ shadowRadius: 2,
402
+ elevation: 1
305
403
  },
306
- children
307
- );
404
+ outlined: {
405
+ backgroundColor: colors.card,
406
+ borderColor: colors.border,
407
+ shadowOpacity: 0,
408
+ elevation: 0
409
+ },
410
+ filled: {
411
+ backgroundColor: colors.accent,
412
+ borderColor: colors.border,
413
+ shadowOpacity: 0,
414
+ elevation: 0
415
+ }
416
+ }[variant];
417
+ const cardContent = /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles4.card, variantStyle, style] }, children);
418
+ if (onPress) {
419
+ return /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale }] } }, /* @__PURE__ */ React23__default.default.createElement(
420
+ reactNative.TouchableOpacity,
421
+ {
422
+ onPress: handlePress,
423
+ onPressIn: handlePressIn,
424
+ onPressOut: handlePressOut,
425
+ activeOpacity: 1,
426
+ touchSoundDisabled: true
427
+ },
428
+ cardContent
429
+ ));
430
+ }
431
+ return cardContent;
308
432
  }
309
433
  function CardHeader({ children, style }) {
310
434
  return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles4.header, style] }, children);
311
435
  }
312
436
  function CardTitle({ children, style }) {
313
437
  const { colors } = useTheme();
314
- return /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles4.title, { color: colors.cardForeground }, style] }, children);
438
+ return /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles4.title, { color: colors.cardForeground }, style], allowFontScaling: true }, children);
315
439
  }
316
440
  function CardDescription({ children, style }) {
317
441
  const { colors } = useTheme();
318
- return /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles4.description, { color: colors.mutedForeground }, style] }, children);
442
+ return /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles4.description, { color: colors.mutedForeground }, style], allowFontScaling: true }, children);
319
443
  }
320
444
  function CardContent({ children, style }) {
321
445
  return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles4.content, style] }, children);
@@ -469,7 +593,8 @@ function Avatar({ src, fallback, size = "md", style }) {
469
593
  ) : /* @__PURE__ */ React23__default.default.createElement(
470
594
  reactNative.Text,
471
595
  {
472
- style: [styles7.fallback, { color: colors.mutedForeground, fontSize: fontSizeMap[size] }]
596
+ style: [styles7.fallback, { color: colors.mutedForeground, fontSize: fontSizeMap[size] }],
597
+ allowFontScaling: true
473
598
  },
474
599
  fallback?.slice(0, 2).toUpperCase() ?? "?"
475
600
  ));
@@ -489,7 +614,7 @@ function AlertBanner({ title, description, variant = "default", icon, style }) {
489
614
  const titleColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.foreground;
490
615
  const descColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.mutedForeground;
491
616
  const defaultIcon = variant === "destructive" ? "\u26A0" : variant === "success" ? "\u2713" : "\u2139";
492
- return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles8.container, { backgroundColor: colors.card, borderColor }, style] }, icon ? /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles8.icon }, icon) : /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles8.icon }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles8.defaultIcon, { color: titleColor }] }, defaultIcon)), /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles8.content }, title ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles8.title, { color: titleColor }] }, title) : null, description ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles8.description, { color: descColor }] }, description) : null));
617
+ return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles8.container, { backgroundColor: colors.card, borderColor }, style] }, icon ? /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles8.icon }, icon) : /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles8.icon }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles8.defaultIcon, { color: titleColor }], allowFontScaling: true }, defaultIcon)), /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles8.content }, title ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles8.title, { color: titleColor }], allowFontScaling: true }, title) : null, description ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles8.description, { color: descColor }], allowFontScaling: true }, description) : null));
493
618
  }
494
619
  var styles8 = reactNative.StyleSheet.create({
495
620
  container: {
@@ -587,10 +712,11 @@ function EmptyState({ icon, title, description, action, size = "default", style
587
712
  /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles10.textWrapper }, /* @__PURE__ */ React23__default.default.createElement(
588
713
  reactNative.Text,
589
714
  {
590
- style: [styles10.title, isCompact && styles10.titleCompact, { color: colors.foreground }]
715
+ style: [styles10.title, isCompact && styles10.titleCompact, { color: colors.foreground }],
716
+ allowFontScaling: true
591
717
  },
592
718
  title
593
- ), description && !isCompact ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles10.description, { color: colors.mutedForeground }] }, description) : null),
719
+ ), description && !isCompact ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles10.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null),
594
720
  action && !isCompact ? /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles10.action }, action) : null
595
721
  );
596
722
  }
@@ -642,6 +768,7 @@ var styles10 = reactNative.StyleSheet.create({
642
768
  marginTop: 8
643
769
  }
644
770
  });
771
+ var webInputResetStyle2 = reactNative.Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
645
772
  function Textarea({
646
773
  label,
647
774
  error,
@@ -664,11 +791,12 @@ function Textarea({
664
791
  style: [
665
792
  styles11.input,
666
793
  {
667
- borderColor: error ? colors.destructive : focused ? colors.ring : colors.border,
794
+ borderColor: error ? colors.destructive : focused ? colors.ring ?? colors.primary : colors.border,
668
795
  color: colors.foreground,
669
796
  backgroundColor: colors.background,
670
797
  minHeight: rows * 30
671
798
  },
799
+ webInputResetStyle2,
672
800
  style
673
801
  ],
674
802
  onFocus: (e) => {
@@ -726,7 +854,7 @@ function Checkbox({
726
854
  {
727
855
  style: [styles12.row, style],
728
856
  onPress: () => {
729
- Haptics11__namespace.selectionAsync();
857
+ Haptics12__namespace.selectionAsync();
730
858
  onCheckedChange?.(!checked);
731
859
  },
732
860
  onPressIn: handlePressIn,
@@ -784,7 +912,7 @@ var styles12 = reactNative.StyleSheet.create({
784
912
  lineHeight: 22
785
913
  }
786
914
  });
787
- var nativeDriver2 = reactNative.Platform.OS !== "web";
915
+ var nativeDriver3 = reactNative.Platform.OS !== "web";
788
916
  var TRACK_WIDTH = 60;
789
917
  var TRACK_HEIGHT = 36;
790
918
  var THUMB_SIZE = 28;
@@ -798,7 +926,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
798
926
  reactNative.Animated.parallel([
799
927
  reactNative.Animated.spring(translateX, {
800
928
  toValue: checked ? THUMB_TRAVEL : 0,
801
- useNativeDriver: nativeDriver2,
929
+ useNativeDriver: nativeDriver3,
802
930
  bounciness: 4
803
931
  }),
804
932
  reactNative.Animated.timing(trackOpacity, {
@@ -812,17 +940,17 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
812
940
  inputRange: [0, 1],
813
941
  outputRange: [colors.muted, colors.primary]
814
942
  });
815
- return /* @__PURE__ */ React23__default.default.createElement(
943
+ return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [{ opacity: disabled ? 0.45 : 1 }, style] }, /* @__PURE__ */ React23__default.default.createElement(
816
944
  reactNative.TouchableOpacity,
817
945
  {
818
946
  onPress: () => {
819
- Haptics11__namespace.selectionAsync();
947
+ Haptics12__namespace.selectionAsync();
820
948
  onCheckedChange?.(!checked);
821
949
  },
822
950
  disabled,
823
951
  activeOpacity: 0.8,
824
952
  touchSoundDisabled: true,
825
- style: [styles13.wrapper, { opacity: disabled ? 0.45 : 1 }, style]
953
+ style: styles13.wrapper
826
954
  },
827
955
  /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: [styles13.track, { backgroundColor: trackColor }] }, /* @__PURE__ */ React23__default.default.createElement(
828
956
  reactNative.Animated.View,
@@ -833,7 +961,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
833
961
  ]
834
962
  }
835
963
  ))
836
- );
964
+ ));
837
965
  }
838
966
  var styles13 = reactNative.StyleSheet.create({
839
967
  wrapper: {},
@@ -911,10 +1039,14 @@ function Toggle({
911
1039
  if (typeof prop === "function") return prop(pressed);
912
1040
  return prop;
913
1041
  };
914
- if (!pressed) return renderProp(icon);
915
- const active = renderProp(activeIcon);
916
- if (active) return /* @__PURE__ */ React23__default.default.createElement(React23__default.default.Fragment, null, active);
917
- return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles14.checkContainer, { borderColor: colors.primary }] }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles14.checkMark, { color: colors.primary }] }, "\u2713"));
1042
+ if (pressed) {
1043
+ const active = renderProp(activeIcon);
1044
+ if (active) return /* @__PURE__ */ React23__default.default.createElement(React23__default.default.Fragment, null, active);
1045
+ return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles14.checkContainer, { borderColor: colors.primary, backgroundColor: colors.primary }] }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles14.checkMark, { color: colors.primaryForeground }] }, "\u2713"));
1046
+ }
1047
+ const custom = renderProp(icon);
1048
+ if (custom) return /* @__PURE__ */ React23__default.default.createElement(React23__default.default.Fragment, null, custom);
1049
+ return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles14.checkContainer, { borderColor: colors.mutedForeground }] });
918
1050
  };
919
1051
  return /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale }] } }, /* @__PURE__ */ React23__default.default.createElement(
920
1052
  reactNative.Animated.View,
@@ -932,7 +1064,7 @@ function Toggle({
932
1064
  {
933
1065
  style: styles14.touchable,
934
1066
  onPress: () => {
935
- Haptics11__namespace.selectionAsync();
1067
+ Haptics12__namespace.selectionAsync();
936
1068
  onPressedChange?.(!pressed);
937
1069
  },
938
1070
  onPressIn: handlePressIn,
@@ -999,7 +1131,7 @@ function RadioItem({
999
1131
  style: styles15.row,
1000
1132
  onPress: () => {
1001
1133
  if (!option.disabled) {
1002
- Haptics11__namespace.selectionAsync();
1134
+ Haptics12__namespace.selectionAsync();
1003
1135
  onSelect();
1004
1136
  }
1005
1137
  },
@@ -1157,7 +1289,7 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
1157
1289
  }
1158
1290
  }, [active]);
1159
1291
  const handlePress = (v) => {
1160
- Haptics11__namespace.selectionAsync();
1292
+ Haptics12__namespace.selectionAsync();
1161
1293
  if (!value) setInternal(v);
1162
1294
  onValueChange?.(v);
1163
1295
  };
@@ -1282,7 +1414,7 @@ function AccordionItemComponent({
1282
1414
  {
1283
1415
  style: styles17.trigger,
1284
1416
  onPress: () => {
1285
- Haptics11__namespace.selectionAsync();
1417
+ Haptics12__namespace.selectionAsync();
1286
1418
  onToggle();
1287
1419
  },
1288
1420
  onPressIn: handlePressIn,
@@ -1356,116 +1488,63 @@ function Slider({
1356
1488
  step = 0,
1357
1489
  onValueChange,
1358
1490
  onSlidingComplete,
1491
+ label,
1492
+ showValue = false,
1493
+ formatValue: formatValue2 = (v) => v.toFixed(2),
1494
+ accessibilityLabel,
1359
1495
  disabled,
1360
1496
  style
1361
1497
  }) {
1362
1498
  const { colors } = useTheme();
1363
- const trackWidth = React23.useRef(0);
1364
1499
  const lastSteppedValue = React23.useRef(value);
1365
- const [internalValue, setInternalValue] = React23.useState(value);
1366
- const currentValue = value ?? internalValue;
1367
- const clamp = (v) => Math.min(Math.max(v, minimumValue), maximumValue);
1368
- const snapToStep = (v) => {
1369
- if (!step) return v;
1370
- return Math.round((v - minimumValue) / step) * step + minimumValue;
1371
- };
1372
- const xToValue = (x) => {
1373
- const ratio = Math.min(Math.max(x / trackWidth.current, 0), 1);
1374
- const raw = ratio * (maximumValue - minimumValue) + minimumValue;
1375
- return clamp(snapToStep(raw));
1376
- };
1377
- const panResponder = React23.useRef(
1378
- reactNative.PanResponder.create({
1379
- onStartShouldSetPanResponder: () => !disabled,
1380
- onMoveShouldSetPanResponder: () => !disabled,
1381
- onPanResponderGrant: (e) => {
1382
- const x = e.nativeEvent.locationX;
1383
- const newValue = xToValue(x);
1384
- setInternalValue(newValue);
1385
- onValueChange?.(newValue);
1386
- },
1387
- onPanResponderMove: (e) => {
1388
- const x = e.nativeEvent.locationX;
1389
- const newValue = xToValue(x);
1390
- if (newValue !== lastSteppedValue.current) {
1391
- lastSteppedValue.current = newValue;
1392
- Haptics11__namespace.selectionAsync();
1393
- }
1394
- setInternalValue(newValue);
1395
- onValueChange?.(newValue);
1396
- },
1397
- onPanResponderRelease: (e) => {
1398
- const x = e.nativeEvent.locationX;
1399
- const newValue = xToValue(x);
1400
- setInternalValue(newValue);
1401
- onSlidingComplete?.(newValue);
1402
- }
1403
- })
1404
- ).current;
1405
- const onLayout = (e) => {
1406
- trackWidth.current = e.nativeEvent.layout.width;
1500
+ const handleValueChange = (v) => {
1501
+ if (step && v !== lastSteppedValue.current) {
1502
+ lastSteppedValue.current = v;
1503
+ Haptics12__namespace.selectionAsync();
1504
+ }
1505
+ onValueChange?.(v);
1407
1506
  };
1408
- const percent = (currentValue - minimumValue) / (maximumValue - minimumValue) * 100;
1409
- return /* @__PURE__ */ React23__default.default.createElement(
1410
- reactNative.View,
1507
+ return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles18.wrapper, style], accessibilityLabel }, label || showValue ? /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles18.header }, label ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles18.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, showValue ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles18.valueText, { color: colors.mutedForeground }], allowFontScaling: true }, formatValue2(value)) : null) : null, /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: disabled ? styles18.disabled : void 0 }, /* @__PURE__ */ React23__default.default.createElement(
1508
+ RNSlider__default.default,
1411
1509
  {
1412
- style: [styles18.container, disabled && styles18.disabled, style],
1413
- ...panResponder.panHandlers,
1414
- onLayout
1415
- },
1416
- /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles18.track, { backgroundColor: colors.muted }] }, /* @__PURE__ */ React23__default.default.createElement(
1417
- reactNative.View,
1418
- {
1419
- style: [styles18.range, { width: `${percent}%`, backgroundColor: colors.primary }]
1420
- }
1421
- )),
1422
- /* @__PURE__ */ React23__default.default.createElement(
1423
- reactNative.View,
1424
- {
1425
- style: [
1426
- styles18.thumb,
1427
- {
1428
- left: `${percent}%`,
1429
- backgroundColor: colors.primary,
1430
- borderColor: colors.background,
1431
- transform: [{ translateX: -14 }]
1432
- }
1433
- ],
1434
- pointerEvents: "none"
1435
- }
1436
- )
1437
- );
1510
+ value,
1511
+ minimumValue,
1512
+ maximumValue,
1513
+ step: step || 0,
1514
+ disabled,
1515
+ onValueChange: handleValueChange,
1516
+ onSlidingComplete,
1517
+ minimumTrackTintColor: colors.primary,
1518
+ maximumTrackTintColor: colors.muted,
1519
+ thumbTintColor: colors.primary,
1520
+ style: styles18.slider,
1521
+ accessibilityLabel
1522
+ }
1523
+ )));
1438
1524
  }
1439
1525
  var styles18 = reactNative.StyleSheet.create({
1440
- container: {
1441
- height: 32,
1442
- justifyContent: "center",
1443
- position: "relative"
1526
+ wrapper: {
1527
+ gap: 8
1444
1528
  },
1445
- disabled: {
1446
- opacity: 0.45
1529
+ header: {
1530
+ flexDirection: "row",
1531
+ justifyContent: "space-between",
1532
+ alignItems: "center"
1447
1533
  },
1448
- track: {
1449
- height: 6,
1450
- borderRadius: 3,
1451
- overflow: "hidden",
1452
- width: "100%"
1534
+ label: {
1535
+ fontSize: 15,
1536
+ fontWeight: "500"
1453
1537
  },
1454
- range: {
1455
- height: "100%",
1456
- borderRadius: 3
1538
+ valueText: {
1539
+ fontSize: 14,
1540
+ fontWeight: "500"
1457
1541
  },
1458
- thumb: {
1459
- position: "absolute",
1460
- width: 28,
1461
- height: 28,
1462
- borderRadius: 14,
1463
- borderWidth: 2,
1464
- shadowColor: "#000",
1465
- shadowOffset: { width: 0, height: 1 },
1466
- shadowOpacity: 0.2,
1467
- shadowRadius: 2,
1468
- elevation: 2
1542
+ slider: {
1543
+ width: "100%",
1544
+ height: 40
1545
+ },
1546
+ disabled: {
1547
+ opacity: 0.45
1469
1548
  }
1470
1549
  });
1471
1550
  function Sheet({
@@ -1481,7 +1560,7 @@ function Sheet({
1481
1560
  const ref = React23.useRef(null);
1482
1561
  React23.useEffect(() => {
1483
1562
  if (open) {
1484
- Haptics11__namespace.impactAsync(Haptics11__namespace.ImpactFeedbackStyle.Light);
1563
+ Haptics12__namespace.impactAsync(Haptics12__namespace.ImpactFeedbackStyle.Light);
1485
1564
  ref.current?.present();
1486
1565
  } else {
1487
1566
  ref.current?.dismiss();
@@ -1537,6 +1616,9 @@ var styles19 = reactNative.StyleSheet.create({
1537
1616
  lineHeight: 20
1538
1617
  }
1539
1618
  });
1619
+ var isIOS = reactNative.Platform.OS === "ios";
1620
+ var isAndroid = reactNative.Platform.OS === "android";
1621
+ var isWeb = reactNative.Platform.OS === "web";
1540
1622
  function Select({
1541
1623
  options,
1542
1624
  value,
@@ -1548,8 +1630,10 @@ function Select({
1548
1630
  style
1549
1631
  }) {
1550
1632
  const { colors } = useTheme();
1551
- const bottomSheetRef = React23.useRef(null);
1552
1633
  const scale = React23.useRef(new reactNative.Animated.Value(1)).current;
1634
+ const [pickerVisible, setPickerVisible] = React23.useState(false);
1635
+ const [pendingValue, setPendingValue] = React23.useState(value);
1636
+ const pickerRef = React23.useRef(null);
1553
1637
  const selected = options.find((o) => o.value === value);
1554
1638
  const handlePressIn = () => {
1555
1639
  if (disabled) return;
@@ -1559,24 +1643,26 @@ function Select({
1559
1643
  reactNative.Animated.spring(scale, { toValue: 1, useNativeDriver: true, speed: 40, bounciness: 4 }).start();
1560
1644
  };
1561
1645
  const handleOpen = () => {
1562
- if (!disabled) {
1563
- Haptics11__namespace.selectionAsync();
1564
- bottomSheetRef.current?.present();
1646
+ if (disabled) return;
1647
+ Haptics12__namespace.selectionAsync();
1648
+ if (isIOS) {
1649
+ setPendingValue(value);
1650
+ setPickerVisible(true);
1651
+ } else if (isAndroid) {
1652
+ pickerRef.current?.focus();
1565
1653
  }
1566
1654
  };
1567
- const renderBackdrop = React23.useCallback(
1568
- (props) => /* @__PURE__ */ React23__default.default.createElement(
1569
- bottomSheet.BottomSheetBackdrop,
1570
- {
1571
- ...props,
1572
- disappearsOnIndex: -1,
1573
- appearsOnIndex: 0,
1574
- pressBehavior: "close"
1575
- }
1576
- ),
1577
- []
1578
- );
1579
- return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles20.container, style] }, label ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles20.label, { color: colors.foreground }] }, label) : null, /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale }], opacity: disabled ? 0.45 : 1 } }, /* @__PURE__ */ React23__default.default.createElement(
1655
+ const handleDismiss = () => {
1656
+ setPickerVisible(false);
1657
+ };
1658
+ const handleConfirm = () => {
1659
+ if (pendingValue !== void 0 && pendingValue !== "") {
1660
+ Haptics12__namespace.selectionAsync();
1661
+ onValueChange?.(pendingValue);
1662
+ }
1663
+ setPickerVisible(false);
1664
+ };
1665
+ return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles20.container, style] }, label ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles20.label, { color: colors.foreground }] }, label) : null, !isWeb ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale }], opacity: disabled ? 0.45 : 1 } }, /* @__PURE__ */ React23__default.default.createElement(
1580
1666
  reactNative.TouchableOpacity,
1581
1667
  {
1582
1668
  style: [
@@ -1599,57 +1685,97 @@ function Select({
1599
1685
  styles20.triggerText,
1600
1686
  { color: selected ? colors.foreground : colors.mutedForeground }
1601
1687
  ],
1602
- numberOfLines: 1
1688
+ numberOfLines: 1,
1689
+ allowFontScaling: true
1603
1690
  },
1604
1691
  selected?.label ?? placeholder
1605
1692
  ),
1606
1693
  /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles20.chevron, { color: colors.mutedForeground }] }, "\u25BE")
1607
- )), error ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles20.helperText, { color: colors.destructive }] }, error) : null, /* @__PURE__ */ React23__default.default.createElement(
1608
- bottomSheet.BottomSheetModal,
1694
+ )) : null, isIOS ? /* @__PURE__ */ React23__default.default.createElement(
1695
+ reactNative.Modal,
1609
1696
  {
1610
- ref: bottomSheetRef,
1611
- enableDynamicSizing: true,
1612
- enablePanDownToClose: true,
1613
- backdropComponent: renderBackdrop,
1614
- backgroundStyle: [styles20.sheetBackground, { backgroundColor: colors.card }],
1615
- handleIndicatorStyle: [styles20.sheetHandle, { backgroundColor: colors.border }]
1697
+ visible: pickerVisible,
1698
+ transparent: true,
1699
+ animationType: "slide",
1700
+ onRequestClose: handleDismiss
1616
1701
  },
1617
- /* @__PURE__ */ React23__default.default.createElement(bottomSheet.BottomSheetView, { style: styles20.sheetContent }, label ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles20.sheetTitle, { color: colors.foreground }] }, label) : null, options.map((item) => {
1618
- const isSelected = item.value === value;
1619
- return /* @__PURE__ */ React23__default.default.createElement(
1620
- reactNative.TouchableOpacity,
1702
+ /* @__PURE__ */ React23__default.default.createElement(reactNative.TouchableOpacity, { style: styles20.iosBackdrop, activeOpacity: 1, onPress: handleDismiss }),
1703
+ /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles20.iosSheet, { backgroundColor: colors.card }] }, /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles20.iosToolbar, { borderBottomColor: colors.border }] }, label ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles20.iosToolbarTitle, { color: colors.foreground }], allowFontScaling: true }, label) : /* @__PURE__ */ React23__default.default.createElement(reactNative.View, null), /* @__PURE__ */ React23__default.default.createElement(reactNative.TouchableOpacity, { onPress: handleConfirm, style: styles20.iosDoneBtn, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 } }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles20.iosDoneBtnText, { color: colors.primary }], allowFontScaling: true }, "Done"))), /* @__PURE__ */ React23__default.default.createElement(
1704
+ picker.Picker,
1705
+ {
1706
+ selectedValue: pendingValue ?? "",
1707
+ onValueChange: (val) => setPendingValue(val),
1708
+ itemStyle: { color: colors.foreground }
1709
+ },
1710
+ !value ? /* @__PURE__ */ React23__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", color: colors.mutedForeground, enabled: false }) : null,
1711
+ options.map((o) => /* @__PURE__ */ React23__default.default.createElement(
1712
+ picker.Picker.Item,
1621
1713
  {
1622
- key: item.value,
1623
- style: [
1624
- styles20.option,
1625
- isSelected && { backgroundColor: colors.accent },
1626
- item.disabled && styles20.disabledOption
1627
- ],
1628
- onPress: () => {
1629
- if (!item.disabled) {
1630
- Haptics11__namespace.selectionAsync();
1631
- onValueChange?.(item.value);
1632
- bottomSheetRef.current?.dismiss();
1633
- }
1634
- },
1635
- activeOpacity: 0.7,
1636
- touchSoundDisabled: true
1637
- },
1638
- /* @__PURE__ */ React23__default.default.createElement(
1639
- reactNative.Text,
1640
- {
1641
- style: [
1642
- styles20.optionText,
1643
- { color: item.disabled ? colors.mutedForeground : colors.foreground },
1644
- isSelected && { fontWeight: "500" }
1645
- ]
1646
- },
1647
- item.label
1648
- ),
1649
- isSelected ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles20.checkmark, { color: colors.primary }] }, "\u2713") : null
1650
- );
1651
- }))
1652
- ));
1714
+ key: o.value,
1715
+ label: o.label,
1716
+ value: o.value,
1717
+ enabled: !o.disabled,
1718
+ color: o.disabled ? colors.mutedForeground : colors.foreground
1719
+ }
1720
+ ))
1721
+ ))
1722
+ ) : null, isAndroid ? /* @__PURE__ */ React23__default.default.createElement(
1723
+ picker.Picker,
1724
+ {
1725
+ ref: pickerRef,
1726
+ selectedValue: value ?? "",
1727
+ onValueChange: (val) => {
1728
+ if (val !== "") {
1729
+ Haptics12__namespace.selectionAsync();
1730
+ onValueChange?.(val);
1731
+ }
1732
+ },
1733
+ mode: "dialog",
1734
+ enabled: !disabled,
1735
+ prompt: label,
1736
+ style: styles20.androidHiddenPicker
1737
+ },
1738
+ !value ? /* @__PURE__ */ React23__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", enabled: false }) : null,
1739
+ options.map((o) => /* @__PURE__ */ React23__default.default.createElement(
1740
+ picker.Picker.Item,
1741
+ {
1742
+ key: o.value,
1743
+ label: o.label,
1744
+ value: o.value,
1745
+ enabled: !o.disabled
1746
+ }
1747
+ ))
1748
+ ) : null, isWeb ? /* @__PURE__ */ React23__default.default.createElement(
1749
+ picker.Picker,
1750
+ {
1751
+ selectedValue: value ?? "",
1752
+ onValueChange: (val) => {
1753
+ if (val !== "") {
1754
+ onValueChange?.(val);
1755
+ }
1756
+ },
1757
+ enabled: !disabled,
1758
+ style: [
1759
+ styles20.webPicker,
1760
+ {
1761
+ borderColor: error ? colors.destructive : colors.border,
1762
+ color: selected ? colors.foreground : colors.mutedForeground,
1763
+ backgroundColor: colors.background,
1764
+ opacity: disabled ? 0.45 : 1
1765
+ }
1766
+ ]
1767
+ },
1768
+ /* @__PURE__ */ React23__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", enabled: false }),
1769
+ options.map((o) => /* @__PURE__ */ React23__default.default.createElement(
1770
+ picker.Picker.Item,
1771
+ {
1772
+ key: o.value,
1773
+ label: o.label,
1774
+ value: o.value,
1775
+ enabled: !o.disabled
1776
+ }
1777
+ ))
1778
+ ) : null, error ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles20.helperText, { color: colors.destructive }] }, error) : null);
1653
1779
  }
1654
1780
  var styles20 = reactNative.StyleSheet.create({
1655
1781
  container: {
@@ -1680,44 +1806,45 @@ var styles20 = reactNative.StyleSheet.create({
1680
1806
  helperText: {
1681
1807
  fontSize: 13
1682
1808
  },
1683
- sheetBackground: {
1684
- borderTopLeftRadius: 24,
1685
- borderTopRightRadius: 24
1809
+ iosBackdrop: {
1810
+ flex: 1,
1811
+ backgroundColor: "rgba(0,0,0,0.4)"
1686
1812
  },
1687
- sheetHandle: {
1688
- width: 36,
1689
- height: 4,
1690
- borderRadius: 2
1813
+ iosSheet: {
1814
+ borderTopLeftRadius: 24,
1815
+ borderTopRightRadius: 24,
1816
+ paddingBottom: 32
1691
1817
  },
1692
- sheetContent: {
1818
+ iosToolbar: {
1819
+ flexDirection: "row",
1820
+ alignItems: "center",
1821
+ justifyContent: "space-between",
1693
1822
  paddingHorizontal: 20,
1694
- paddingBottom: 36
1823
+ paddingVertical: 12,
1824
+ borderBottomWidth: 1
1695
1825
  },
1696
- sheetTitle: {
1826
+ iosToolbarTitle: {
1697
1827
  fontSize: 17,
1698
- fontWeight: "600",
1699
- paddingVertical: 16,
1700
- paddingHorizontal: 4
1828
+ fontWeight: "600"
1701
1829
  },
1702
- option: {
1703
- flexDirection: "row",
1704
- alignItems: "center",
1705
- justifyContent: "space-between",
1706
- paddingHorizontal: 16,
1707
- paddingVertical: 16,
1708
- borderRadius: 12
1830
+ iosDoneBtn: {
1831
+ padding: 4
1709
1832
  },
1710
- optionText: {
1833
+ iosDoneBtnText: {
1711
1834
  fontSize: 17,
1712
- flex: 1
1835
+ fontWeight: "600"
1713
1836
  },
1714
- disabledOption: {
1715
- opacity: 0.45
1837
+ androidHiddenPicker: {
1838
+ height: 0,
1839
+ opacity: 0,
1840
+ position: "absolute"
1716
1841
  },
1717
- checkmark: {
1718
- fontSize: 16,
1719
- fontWeight: "600",
1720
- marginLeft: 8
1842
+ webPicker: {
1843
+ borderWidth: 1.5,
1844
+ borderRadius: 14,
1845
+ paddingHorizontal: 20,
1846
+ paddingVertical: 16,
1847
+ fontSize: 17
1721
1848
  }
1722
1849
  });
1723
1850
  var ToastContext = React23.createContext({
@@ -1784,11 +1911,11 @@ function ToastProvider({ children }) {
1784
1911
  const toast = React23.useCallback((item) => {
1785
1912
  const id = Math.random().toString(36).slice(2);
1786
1913
  if (item.variant === "success") {
1787
- Haptics11__namespace.notificationAsync(Haptics11__namespace.NotificationFeedbackType.Success);
1914
+ Haptics12__namespace.notificationAsync(Haptics12__namespace.NotificationFeedbackType.Success);
1788
1915
  } else if (item.variant === "destructive") {
1789
- Haptics11__namespace.notificationAsync(Haptics11__namespace.NotificationFeedbackType.Error);
1916
+ Haptics12__namespace.notificationAsync(Haptics12__namespace.NotificationFeedbackType.Error);
1790
1917
  } else {
1791
- Haptics11__namespace.impactAsync(Haptics11__namespace.ImpactFeedbackStyle.Light);
1918
+ Haptics12__namespace.impactAsync(Haptics12__namespace.ImpactFeedbackStyle.Light);
1792
1919
  }
1793
1920
  setToasts((prev) => [{ ...item, id }, ...prev].slice(0, 3));
1794
1921
  }, []);
@@ -1857,12 +1984,14 @@ function CurrencyInput({
1857
1984
  onChangeValue,
1858
1985
  prefix = "$",
1859
1986
  thousandsSeparator = ".",
1987
+ size = "default",
1860
1988
  label,
1861
1989
  error,
1862
1990
  hint,
1863
1991
  placeholder,
1864
1992
  editable,
1865
- containerStyle
1993
+ containerStyle,
1994
+ style
1866
1995
  }) {
1867
1996
  const handleChange = (text) => {
1868
1997
  const withoutPrefix = prefix && text.startsWith(prefix) ? text.slice(prefix.length) : text;
@@ -1873,6 +2002,7 @@ function CurrencyInput({
1873
2002
  const raw = parseFloat(formatted.replace(separatorRegex, "") || "0");
1874
2003
  onChangeValue?.(isNaN(raw) ? 0 : raw);
1875
2004
  };
2005
+ const inputStyle = size === "large" ? { fontSize: 36 } : {};
1876
2006
  return /* @__PURE__ */ React23__default.default.createElement(
1877
2007
  Input,
1878
2008
  {
@@ -1884,7 +2014,8 @@ function CurrencyInput({
1884
2014
  hint,
1885
2015
  placeholder: placeholder ?? `${prefix}0`,
1886
2016
  editable,
1887
- containerStyle
2017
+ containerStyle,
2018
+ style: [inputStyle, style]
1888
2019
  }
1889
2020
  );
1890
2021
  }
@@ -1912,50 +2043,7 @@ var styles22 = reactNative.StyleSheet.create({
1912
2043
  fontWeight: "700"
1913
2044
  }
1914
2045
  });
1915
- function formatCurrency2(raw, separator) {
1916
- const digits = raw.replace(/\D/g, "");
1917
- if (!digits) return "";
1918
- return digits.replace(/\B(?=(\d{3})+(?!\d))/g, separator);
1919
- }
1920
- function CurrencyInputLarge({
1921
- value,
1922
- onChangeText,
1923
- onChangeValue,
1924
- prefix = "$",
1925
- thousandsSeparator = ".",
1926
- label,
1927
- error,
1928
- hint,
1929
- placeholder,
1930
- editable,
1931
- containerStyle
1932
- }) {
1933
- const handleChange = (text) => {
1934
- const withoutPrefix = prefix && text.startsWith(prefix) ? text.slice(prefix.length) : text;
1935
- const formatted = formatCurrency2(withoutPrefix, thousandsSeparator);
1936
- const display = formatted ? `${prefix}${formatted}` : "";
1937
- onChangeText?.(display);
1938
- const separatorRegex = new RegExp(`\\${thousandsSeparator}`, "g");
1939
- const raw = parseFloat(formatted.replace(separatorRegex, "") || "0");
1940
- onChangeValue?.(isNaN(raw) ? 0 : raw);
1941
- };
1942
- return /* @__PURE__ */ React23__default.default.createElement(
1943
- Input,
1944
- {
1945
- value,
1946
- onChangeText: handleChange,
1947
- keyboardType: "numeric",
1948
- label,
1949
- error,
1950
- hint,
1951
- placeholder: placeholder ?? `${prefix}0`,
1952
- editable,
1953
- containerStyle,
1954
- style: { fontSize: 36 }
1955
- }
1956
- );
1957
- }
1958
- var nativeDriver3 = reactNative.Platform.OS !== "web";
2046
+ var nativeDriver4 = reactNative.Platform.OS !== "web";
1959
2047
  function ListItem({ icon, title, subtitle, trailing, onPress, disabled, style }) {
1960
2048
  const { colors } = useTheme();
1961
2049
  const scale = React23.useRef(new reactNative.Animated.Value(1)).current;
@@ -1963,7 +2051,7 @@ function ListItem({ icon, title, subtitle, trailing, onPress, disabled, style })
1963
2051
  if (!onPress || disabled) return;
1964
2052
  reactNative.Animated.spring(scale, {
1965
2053
  toValue: 0.97,
1966
- useNativeDriver: nativeDriver3,
2054
+ useNativeDriver: nativeDriver4,
1967
2055
  speed: 40,
1968
2056
  bounciness: 0
1969
2057
  }).start();
@@ -1971,13 +2059,13 @@ function ListItem({ icon, title, subtitle, trailing, onPress, disabled, style })
1971
2059
  const handlePressOut = () => {
1972
2060
  reactNative.Animated.spring(scale, {
1973
2061
  toValue: 1,
1974
- useNativeDriver: nativeDriver3,
2062
+ useNativeDriver: nativeDriver4,
1975
2063
  speed: 40,
1976
2064
  bounciness: 4
1977
2065
  }).start();
1978
2066
  };
1979
2067
  const handlePress = () => {
1980
- Haptics11__namespace.selectionAsync();
2068
+ Haptics12__namespace.selectionAsync();
1981
2069
  onPress?.();
1982
2070
  };
1983
2071
  return /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: [{ transform: [{ scale }] }, disabled && styles23.disabled] }, /* @__PURE__ */ React23__default.default.createElement(
@@ -2028,7 +2116,7 @@ var styles23 = reactNative.StyleSheet.create({
2028
2116
  opacity: 0.45
2029
2117
  }
2030
2118
  });
2031
- var nativeDriver4 = reactNative.Platform.OS !== "web";
2119
+ var nativeDriver5 = reactNative.Platform.OS !== "web";
2032
2120
  function Chip({ label, selected = false, onPress, style }) {
2033
2121
  const { colors } = useTheme();
2034
2122
  const scale = React23.useRef(new reactNative.Animated.Value(1)).current;
@@ -2044,7 +2132,7 @@ function Chip({ label, selected = false, onPress, style }) {
2044
2132
  const handlePressIn = () => {
2045
2133
  reactNative.Animated.spring(scale, {
2046
2134
  toValue: 0.95,
2047
- useNativeDriver: nativeDriver4,
2135
+ useNativeDriver: nativeDriver5,
2048
2136
  speed: 40,
2049
2137
  bounciness: 0
2050
2138
  }).start();
@@ -2052,13 +2140,13 @@ function Chip({ label, selected = false, onPress, style }) {
2052
2140
  const handlePressOut = () => {
2053
2141
  reactNative.Animated.spring(scale, {
2054
2142
  toValue: 1,
2055
- useNativeDriver: nativeDriver4,
2143
+ useNativeDriver: nativeDriver5,
2056
2144
  speed: 40,
2057
2145
  bounciness: 4
2058
2146
  }).start();
2059
2147
  };
2060
2148
  const handlePress = () => {
2061
- Haptics11__namespace.selectionAsync();
2149
+ Haptics12__namespace.selectionAsync();
2062
2150
  onPress?.();
2063
2151
  };
2064
2152
  const backgroundColor = pressAnim.interpolate({
@@ -2085,14 +2173,35 @@ function Chip({ label, selected = false, onPress, style }) {
2085
2173
  /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: [styles24.chip, { backgroundColor, borderColor }] }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.Text, { style: [styles24.label, { color: textColor }], allowFontScaling: true }, label))
2086
2174
  ));
2087
2175
  }
2088
- function ChipGroup({ options, value, onValueChange, style }) {
2176
+ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }) {
2177
+ const handlePress = (optionValue) => {
2178
+ if (!multiSelect) {
2179
+ onValueChange?.(optionValue);
2180
+ return;
2181
+ }
2182
+ const currentArray = Array.isArray(value) ? value : value ? [value] : [];
2183
+ const isSelected2 = currentArray.includes(optionValue);
2184
+ let newArray;
2185
+ if (isSelected2) {
2186
+ newArray = currentArray.filter((v) => v !== optionValue);
2187
+ } else {
2188
+ newArray = [...currentArray, optionValue];
2189
+ }
2190
+ onValueChange?.(newArray);
2191
+ };
2192
+ const isSelected = (optionValue) => {
2193
+ if (Array.isArray(value)) {
2194
+ return value.includes(optionValue);
2195
+ }
2196
+ return optionValue === value;
2197
+ };
2089
2198
  return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles24.group, style] }, options.map((opt) => /* @__PURE__ */ React23__default.default.createElement(
2090
2199
  Chip,
2091
2200
  {
2092
2201
  key: opt.value,
2093
2202
  label: opt.label,
2094
- selected: opt.value === value,
2095
- onPress: () => onValueChange?.(opt.value)
2203
+ selected: isSelected(opt.value),
2204
+ onPress: () => handlePress(opt.value)
2096
2205
  }
2097
2206
  )));
2098
2207
  }
@@ -2212,7 +2321,7 @@ var MONTH_NAMES = [
2212
2321
  function MonthPicker({ value, onChange, style }) {
2213
2322
  const { colors } = useTheme();
2214
2323
  const handlePrev = () => {
2215
- Haptics11__namespace.selectionAsync();
2324
+ Haptics12__namespace.selectionAsync();
2216
2325
  if (value.month === 1) {
2217
2326
  onChange({ month: 12, year: value.year - 1 });
2218
2327
  } else {
@@ -2220,7 +2329,7 @@ function MonthPicker({ value, onChange, style }) {
2220
2329
  }
2221
2330
  };
2222
2331
  const handleNext = () => {
2223
- Haptics11__namespace.selectionAsync();
2332
+ Haptics12__namespace.selectionAsync();
2224
2333
  if (value.month === 12) {
2225
2334
  onChange({ month: 1, year: value.year + 1 });
2226
2335
  } else {
@@ -2235,7 +2344,7 @@ function MonthPicker({ value, onChange, style }) {
2235
2344
  activeOpacity: 0.6,
2236
2345
  touchSoundDisabled: true
2237
2346
  },
2238
- /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles27.arrowText, { color: colors.foreground }] }, "\u2039")
2347
+ /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles27.arrowText, { color: colors.foreground }], allowFontScaling: true }, "\u2039")
2239
2348
  ), /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles27.label, { color: colors.foreground }], allowFontScaling: true }, MONTH_NAMES[value.month - 1], " ", value.year), /* @__PURE__ */ React23__default.default.createElement(
2240
2349
  reactNative.TouchableOpacity,
2241
2350
  {
@@ -2244,7 +2353,7 @@ function MonthPicker({ value, onChange, style }) {
2244
2353
  activeOpacity: 0.6,
2245
2354
  touchSoundDisabled: true
2246
2355
  },
2247
- /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles27.arrowText, { color: colors.foreground }] }, "\u203A")
2356
+ /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles27.arrowText, { color: colors.foreground }], allowFontScaling: true }, "\u203A")
2248
2357
  ));
2249
2358
  }
2250
2359
  var styles27 = reactNative.StyleSheet.create({
@@ -2293,7 +2402,7 @@ exports.ChipGroup = ChipGroup;
2293
2402
  exports.ConfirmDialog = ConfirmDialog;
2294
2403
  exports.CurrencyDisplay = CurrencyDisplay;
2295
2404
  exports.CurrencyInput = CurrencyInput;
2296
- exports.CurrencyInputLarge = CurrencyInputLarge;
2405
+ exports.CurrencyInputLarge = CurrencyInput;
2297
2406
  exports.EmptyState = EmptyState;
2298
2407
  exports.Input = Input;
2299
2408
  exports.LabelValue = LabelValue;