radix-native-ui 0.1.0 → 0.1.2

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.mjs CHANGED
@@ -3116,7 +3116,7 @@ const ToastRoot = forwardRef(({ toast, onDismiss, config, index, style }, ref) =
3116
3116
  opacity,
3117
3117
  transform: [{ translateY }, { translateX }],
3118
3118
  backgroundColor: colors.backgroundColor,
3119
- borderColor: colors.borderColor,
3119
+ borderColor: "transparent",
3120
3120
  borderWidth: 1,
3121
3121
  borderRadius: theme.radii.large,
3122
3122
  padding: theme.space[4],
@@ -3141,23 +3141,23 @@ const ToastRoot = forwardRef(({ toast, onDismiss, config, index, style }, ref) =
3141
3141
  accessibilityLiveRegion: "polite",
3142
3142
  accessibilityLabel: toast.accessibilityLabel || toast.title,
3143
3143
  children: /* @__PURE__ */ jsxs(View, {
3144
- style: [styles$32.contentContainer, { alignItems: toast.description ? "flex-start" : "center" }],
3144
+ style: [styles$34.contentContainer, { alignItems: toast.description ? "flex-start" : "center" }],
3145
3145
  children: [
3146
3146
  toast.icon && /* @__PURE__ */ jsx(View, {
3147
- style: styles$32.iconContainer,
3147
+ style: styles$34.iconContainer,
3148
3148
  children: toast.icon
3149
3149
  }),
3150
3150
  /* @__PURE__ */ jsxs(View, {
3151
- style: styles$32.textContainer,
3152
- children: [/* @__PURE__ */ jsx(Text, {
3153
- style: [styles$32.title, {
3151
+ style: styles$34.textContainer,
3152
+ children: [/* @__PURE__ */ jsx(TextComponent, {
3153
+ style: [styles$34.title, {
3154
3154
  color: colors.textColor,
3155
3155
  fontSize: theme.typography.fontSizes[3].fontSize
3156
3156
  }],
3157
3157
  numberOfLines: 1,
3158
3158
  children: toast.title
3159
- }), toast.description && /* @__PURE__ */ jsx(Text, {
3160
- style: [styles$32.description, {
3159
+ }), toast.description && /* @__PURE__ */ jsx(TextComponent, {
3160
+ style: [styles$34.description, {
3161
3161
  fontSize: theme.typography.fontSizes[2].fontSize,
3162
3162
  lineHeight: theme.typography.fontSizes[2].fontSize * 1.5,
3163
3163
  opacity: .8
@@ -3168,14 +3168,14 @@ const ToastRoot = forwardRef(({ toast, onDismiss, config, index, style }, ref) =
3168
3168
  }),
3169
3169
  toast.action && /* @__PURE__ */ jsx(Pressable, {
3170
3170
  onPress: toast.action.onPress,
3171
- style: ({ pressed }) => [styles$32.actionButton, { opacity: pressed ? .7 : 1 }],
3172
- children: /* @__PURE__ */ jsx(Text, {
3173
- style: [styles$32.actionText, { color: colors.accentColor }],
3171
+ style: ({ pressed }) => [styles$34.actionButton, { opacity: pressed ? .7 : 1 }],
3172
+ children: /* @__PURE__ */ jsx(TextComponent, {
3173
+ style: [styles$34.actionText, { color: colors.accentColor }],
3174
3174
  children: toast.action.label
3175
3175
  })
3176
3176
  }),
3177
3177
  toast.showClose && /* @__PURE__ */ jsx(Button, {
3178
- style: { backgroundColor: colors.textColor },
3178
+ color: getVariantColorName(toast.variant),
3179
3179
  radius: "large",
3180
3180
  size: 1,
3181
3181
  onPress: () => handleDismiss(true),
@@ -3194,10 +3194,10 @@ const ToastViewport = forwardRef(({ style }, ref) => {
3194
3194
  if (toasts.length === 0) return null;
3195
3195
  return /* @__PURE__ */ jsxs(View, {
3196
3196
  ref,
3197
- style: [styles$32.viewport, style],
3197
+ style: [styles$34.viewport, style],
3198
3198
  pointerEvents: "box-none",
3199
3199
  children: [topToasts.length > 0 && /* @__PURE__ */ jsx(SafeAreaView, {
3200
- style: styles$32.topContainer,
3200
+ style: styles$34.topContainer,
3201
3201
  pointerEvents: "box-none",
3202
3202
  children: topToasts.map((toast, index) => /* @__PURE__ */ jsx(ToastRoot, {
3203
3203
  toast,
@@ -3206,7 +3206,7 @@ const ToastViewport = forwardRef(({ style }, ref) => {
3206
3206
  index
3207
3207
  }, toast.id))
3208
3208
  }), bottomToasts.length > 0 && /* @__PURE__ */ jsx(SafeAreaView, {
3209
- style: styles$32.bottomContainer,
3209
+ style: styles$34.bottomContainer,
3210
3210
  pointerEvents: "box-none",
3211
3211
  children: bottomToasts.map((toast, index) => /* @__PURE__ */ jsx(ToastRoot, {
3212
3212
  toast,
@@ -3220,10 +3220,10 @@ const ToastViewport = forwardRef(({ style }, ref) => {
3220
3220
  ToastViewport.displayName = "Toast.Viewport";
3221
3221
  const ToastTitle = forwardRef(({ children, style }, ref) => {
3222
3222
  const theme = useTheme$1();
3223
- return /* @__PURE__ */ jsx(Text, {
3223
+ return /* @__PURE__ */ jsx(TextComponent, {
3224
3224
  ref,
3225
3225
  style: [
3226
- styles$32.title,
3226
+ styles$34.title,
3227
3227
  { fontSize: theme.typography.fontSizes[2].fontSize },
3228
3228
  style
3229
3229
  ],
@@ -3233,10 +3233,10 @@ const ToastTitle = forwardRef(({ children, style }, ref) => {
3233
3233
  ToastTitle.displayName = "Toast.Title";
3234
3234
  const ToastDescription = forwardRef(({ children, style }, ref) => {
3235
3235
  const theme = useTheme$1();
3236
- return /* @__PURE__ */ jsx(Text, {
3236
+ return /* @__PURE__ */ jsx(TextComponent, {
3237
3237
  ref,
3238
3238
  style: [
3239
- styles$32.description,
3239
+ styles$34.description,
3240
3240
  { fontSize: theme.typography.fontSizes[1].fontSize },
3241
3241
  style
3242
3242
  ],
@@ -3249,7 +3249,7 @@ const ToastClose = forwardRef(({ children, onPress, style }, ref) => {
3249
3249
  ref,
3250
3250
  onPress,
3251
3251
  style: ({ pressed }) => [
3252
- styles$32.closeButton,
3252
+ styles$34.closeButton,
3253
3253
  { opacity: pressed ? .7 : 1 },
3254
3254
  style
3255
3255
  ],
@@ -3259,7 +3259,7 @@ const ToastClose = forwardRef(({ children, onPress, style }, ref) => {
3259
3259
  left: 8,
3260
3260
  right: 8
3261
3261
  },
3262
- children: children || /* @__PURE__ */ jsx(Text, { children: "✕" })
3262
+ children: children || /* @__PURE__ */ jsx(TextComponent, { children: "✕" })
3263
3263
  });
3264
3264
  });
3265
3265
  ToastClose.displayName = "Toast.Close";
@@ -3269,18 +3269,18 @@ const ToastAction = forwardRef(({ label, onPress, style }, ref) => {
3269
3269
  ref,
3270
3270
  onPress,
3271
3271
  style: ({ pressed }) => [
3272
- styles$32.actionButton,
3272
+ styles$34.actionButton,
3273
3273
  { opacity: pressed ? .7 : 1 },
3274
3274
  style
3275
3275
  ],
3276
- children: /* @__PURE__ */ jsx(Text, {
3277
- style: [styles$32.actionText, { color: theme.accentColor === "indigo" ? theme.colors.indigo[9] : theme.colors[theme.accentColor]?.[9] || theme.colors.indigo[9] }],
3276
+ children: /* @__PURE__ */ jsx(TextComponent, {
3277
+ style: [styles$34.actionText, { color: theme.accentColor === "indigo" ? theme.colors.indigo[9] : theme.colors[theme.accentColor]?.[9] || theme.colors.indigo[9] }],
3278
3278
  children: label
3279
3279
  })
3280
3280
  });
3281
3281
  });
3282
3282
  ToastAction.displayName = "Toast.Action";
3283
- const styles$32 = StyleSheet.create({
3283
+ const styles$34 = StyleSheet.create({
3284
3284
  viewport: {
3285
3285
  ...StyleSheet.absoluteFillObject,
3286
3286
  pointerEvents: "box-none"
@@ -3314,7 +3314,7 @@ const styles$32 = StyleSheet.create({
3314
3314
  },
3315
3315
  title: { fontWeight: "500" },
3316
3316
  description: {
3317
- marginTop: 2,
3317
+ marginTop: 1,
3318
3318
  opacity: .8
3319
3319
  },
3320
3320
  actionButton: {
@@ -3380,7 +3380,7 @@ const useThemeContext = () => {
3380
3380
  * 2. themeOptions object (legacy support)
3381
3381
  * 3. Default values
3382
3382
  */
3383
- const ThemeProvider = ({ children, accentColor, grayColor, radius, scaling, panelBackground, mode: initialMode, appearance, forcedMode, onModeChange, themeOptions = {}, toastConfig: userToastConfig }) => {
3383
+ const ThemeProvider = ({ children, accentColor, grayColor, radius, scaling, panelBackground, mode: initialMode, appearance, forcedMode, onModeChange, themeOptions = {}, toastConfig: userToastConfig, haptics: globalHaptics }) => {
3384
3384
  const parentContext = useContext(ThemeContext);
3385
3385
  const deviceColorScheme = useDeviceColorScheme();
3386
3386
  const resolvedInitialMode = appearance === "inherit" ? void 0 : appearance ?? initialMode;
@@ -3398,9 +3398,10 @@ const ThemeProvider = ({ children, accentColor, grayColor, radius, scaling, pane
3398
3398
  parentContext?.mode,
3399
3399
  deviceColorScheme
3400
3400
  ]);
3401
- const handleSetMode = (newMode) => {
3402
- setMode(newMode);
3403
- onModeChange?.(newMode);
3401
+ const handleSetMode = (newAppearance) => {
3402
+ if (newAppearance === "inherit") setMode(deviceColorScheme ?? "light");
3403
+ else setMode(newAppearance);
3404
+ onModeChange?.(newAppearance === "inherit" ? deviceColorScheme ?? "light" : newAppearance);
3404
3405
  };
3405
3406
  const toggleMode = () => {
3406
3407
  handleSetMode(mode === "light" ? "dark" : "light");
@@ -3471,11 +3472,14 @@ const ThemeProvider = ({ children, accentColor, grayColor, radius, scaling, pane
3471
3472
  ...options
3472
3473
  } : t));
3473
3474
  }, []);
3475
+ const resolvedHaptics = globalHaptics ?? true;
3474
3476
  const value = useMemo(() => ({
3475
3477
  theme,
3476
3478
  mode,
3479
+ appearance: appearance ?? "inherit",
3477
3480
  setMode: handleSetMode,
3478
3481
  toggleMode,
3482
+ haptics: resolvedHaptics,
3479
3483
  toastConfig,
3480
3484
  toasts,
3481
3485
  showToast,
@@ -3485,7 +3489,9 @@ const ThemeProvider = ({ children, accentColor, grayColor, radius, scaling, pane
3485
3489
  }), [
3486
3490
  theme,
3487
3491
  mode,
3492
+ appearance,
3488
3493
  toggleMode,
3494
+ resolvedHaptics,
3489
3495
  toastConfig,
3490
3496
  toasts,
3491
3497
  showToast,
@@ -3514,14 +3520,22 @@ const useThemeMode = () => {
3514
3520
  * Hook to access theme mode setter and toggle
3515
3521
  */
3516
3522
  const useThemeActions = () => {
3517
- const { setMode, toggleMode, mode } = useThemeContext();
3523
+ const { setMode, toggleMode, mode, appearance } = useThemeContext();
3518
3524
  return {
3519
3525
  setMode,
3520
3526
  toggleMode,
3521
- mode
3527
+ mode,
3528
+ appearance
3522
3529
  };
3523
3530
  };
3524
3531
  /**
3532
+ * Hook to access the global haptics setting
3533
+ * @returns boolean - whether haptics are enabled globally
3534
+ */
3535
+ const useHaptics = () => {
3536
+ return useThemeContext().haptics;
3537
+ };
3538
+ /**
3525
3539
  * Hook to access toast functionality
3526
3540
  */
3527
3541
  const useToast = () => {
@@ -3593,6 +3607,15 @@ const useThemeColors = () => {
3593
3607
  panel: isDark ? theme.colors.gray.dark[2] : "#ffffff"
3594
3608
  };
3595
3609
  };
3610
+ /**
3611
+ * Hook to access the global haptics setting
3612
+ * @returns boolean - whether haptics are enabled globally
3613
+ */
3614
+ const useHaptics$1 = () => {
3615
+ const context = useContext(ThemeContext);
3616
+ if (!context) throw new Error("useHaptics must be used within a ThemeProvider");
3617
+ return context.haptics;
3618
+ };
3596
3619
 
3597
3620
  //#endregion
3598
3621
  //#region src/components/primitives/View.tsx
@@ -3610,7 +3633,6 @@ const RnView = React.memo(React.forwardRef(({ style, wrap, ...rest }, ref) => {
3610
3633
  });
3611
3634
  }));
3612
3635
  RnView.displayName = "RnView";
3613
- var View_default = RnView;
3614
3636
 
3615
3637
  //#endregion
3616
3638
  //#region src/components/primitives/Text.tsx
@@ -3662,7 +3684,6 @@ const RnPressable = React.memo(React.forwardRef(({ style, onPressIn, onPressOut,
3662
3684
  });
3663
3685
  }));
3664
3686
  RnPressable.displayName = "RnPressable";
3665
- var Pressable_default = RnPressable;
3666
3687
 
3667
3688
  //#endregion
3668
3689
  //#region src/components/primitives/TouchableOpacity.tsx
@@ -3782,10 +3803,67 @@ const RnActivityIndicator = React.memo(React.forwardRef(({ color, ...rest }, ref
3782
3803
  }));
3783
3804
  RnActivityIndicator.displayName = "RnActivityIndicator";
3784
3805
 
3806
+ //#endregion
3807
+ //#region src/utils/haptics.ts
3808
+ /**
3809
+ * Try to import expo-haptics, fallback to null if not available
3810
+ */
3811
+ let Haptics = null;
3812
+ (async () => {
3813
+ try {
3814
+ Haptics = await import("expo-haptics");
3815
+ } catch {}
3816
+ })();
3817
+ /**
3818
+ * Triggers haptic feedback with graceful fallback
3819
+ *
3820
+ * On iOS with expo-haptics:
3821
+ * - Uses Taptic Engine for precise, varied feedback (10-20ms)
3822
+ *
3823
+ * On Android or without expo-haptics:
3824
+ * - Falls back to basic vibration (10ms on Android, 400ms on iOS)
3825
+ *
3826
+ * @param type - The type of haptic feedback to trigger (default: 'selection')
3827
+ */
3828
+ const triggerHaptic = (type = "selection") => {
3829
+ if (Haptics) try {
3830
+ switch (type) {
3831
+ case "selection":
3832
+ Haptics.selectionAsync();
3833
+ break;
3834
+ case "press":
3835
+ Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
3836
+ break;
3837
+ case "impactLight":
3838
+ Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
3839
+ break;
3840
+ case "impactMedium":
3841
+ Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium);
3842
+ break;
3843
+ case "impactHeavy":
3844
+ Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Heavy);
3845
+ break;
3846
+ case "notificationSuccess":
3847
+ Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success);
3848
+ break;
3849
+ case "notificationWarning":
3850
+ Haptics.notificationAsync(Haptics.NotificationFeedbackType.Warning);
3851
+ break;
3852
+ case "notificationError":
3853
+ Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
3854
+ break;
3855
+ }
3856
+ } catch (error) {
3857
+ Platform.OS === "android" && Vibration.vibrate(10);
3858
+ }
3859
+ else Platform.OS === "android" && Vibration.vibrate(10);
3860
+ };
3861
+
3785
3862
  //#endregion
3786
3863
  //#region src/components/primitives/AnimatedPressable.tsx
3787
- const AnimatedPressableComponent = Animated.createAnimatedComponent(Pressable_default);
3864
+ const AnimatedPressableComponent = Animated.createAnimatedComponent(RnPressable);
3788
3865
  const AnimatedPressable = React.memo(React.forwardRef(({ children, onPressIn, onPressOut, disabled, pressedScale = .97, pressedOpacity = .9, animationDuration = 100, hapticFeedback = true, style, ...rest }, ref) => {
3866
+ const globalHaptics = useHaptics$1();
3789
3867
  const scaleAnim = useRef(new Animated.Value(1)).current;
3790
3868
  const opacityAnim = useRef(new Animated.Value(1)).current;
3791
3869
  const animatePressIn = useCallback(() => {
@@ -3825,12 +3903,13 @@ const AnimatedPressable = React.memo(React.forwardRef(({ children, onPressIn, on
3825
3903
  return /* @__PURE__ */ jsx(AnimatedPressableComponent, {
3826
3904
  ref,
3827
3905
  onPressIn: useCallback((event) => {
3828
- if (hapticFeedback && !disabled) Vibration.vibrate(10);
3906
+ if (globalHaptics && hapticFeedback && !disabled) triggerHaptic("press");
3829
3907
  animatePressIn();
3830
3908
  onPressIn?.(event);
3831
3909
  }, [
3832
3910
  animatePressIn,
3833
3911
  onPressIn,
3912
+ globalHaptics,
3834
3913
  hapticFeedback,
3835
3914
  disabled
3836
3915
  ]),
@@ -3849,15 +3928,14 @@ const AnimatedPressable = React.memo(React.forwardRef(({ children, onPressIn, on
3849
3928
  });
3850
3929
  }));
3851
3930
  AnimatedPressable.displayName = "AnimatedPressable";
3852
- var AnimatedPressable_default = AnimatedPressable;
3853
3931
 
3854
3932
  //#endregion
3855
3933
  //#region src/components/layout/Box.tsx
3856
3934
  const areEqual$12 = (prevProps, nextProps) => {
3857
- if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.backgroundColor === nextProps.backgroundColor && prevProps.display === nextProps.display && prevProps.flexDirection === nextProps.flexDirection && prevProps.opacity === nextProps.opacity && prevProps.radius === nextProps.radius) return true;
3935
+ if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.backgroundColor === nextProps.backgroundColor && prevProps.display === nextProps.display && prevProps.flexDirection === nextProps.flexDirection && prevProps.flex === nextProps.flex && prevProps.opacity === nextProps.opacity && prevProps.radius === nextProps.radius) return true;
3858
3936
  return false;
3859
3937
  };
3860
- const Box = React.memo(React.forwardRef(({ asChild = false, children, style, backgroundColor, radius, display, flexDirection, justifyContent, alignItems, flexWrap, flexGrow, flexShrink, flexBasis, alignSelf, width, height, minWidth, maxWidth, minHeight, maxHeight, position, top, right, bottom, left, zIndex, overflow, margin, marginTop, marginBottom, marginLeft, marginRight, marginHorizontal, marginVertical, padding, paddingTop, paddingBottom, paddingLeft, paddingRight, paddingHorizontal, paddingVertical, borderWidth, borderRadius: borderRadiusProp, borderColor, opacity, elevation, ...rest }, ref) => {
3938
+ const Box = React.memo(React.forwardRef(({ asChild = false, children, style, backgroundColor, radius, display, flexDirection, justifyContent, alignItems, flexWrap, flex, flexGrow, flexShrink, flexBasis, alignSelf, width, height, minWidth, maxWidth, minHeight, maxHeight, position, top, right, bottom, left, zIndex, overflow, margin, marginTop, marginBottom, marginLeft, marginRight, marginHorizontal, marginVertical, padding, paddingTop, paddingBottom, paddingLeft, paddingRight, paddingHorizontal, paddingVertical, borderWidth, borderRadius: borderRadiusProp, borderColor, opacity, elevation, ...rest }, ref) => {
3861
3939
  const theme = useTheme$1();
3862
3940
  const colors = theme.colors.gray;
3863
3941
  const radii = theme.radii;
@@ -3881,6 +3959,7 @@ const Box = React.memo(React.forwardRef(({ asChild = false, children, style, bac
3881
3959
  justifyContent,
3882
3960
  alignItems,
3883
3961
  flexWrap,
3962
+ flex,
3884
3963
  flexGrow,
3885
3964
  flexShrink,
3886
3965
  flexBasis,
@@ -3923,6 +4002,7 @@ const Box = React.memo(React.forwardRef(({ asChild = false, children, style, bac
3923
4002
  justifyContent,
3924
4003
  alignItems,
3925
4004
  flexWrap,
4005
+ flex,
3926
4006
  flexGrow,
3927
4007
  flexShrink,
3928
4008
  flexBasis,
@@ -4721,12 +4801,12 @@ const Strong = React.memo(React.forwardRef(({ children, style = {}, color, ...re
4721
4801
  const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
4722
4802
  const strongFont = theme.typography.fonts.strong;
4723
4803
  return /* @__PURE__ */ jsx(TextComponent, {
4804
+ color,
4724
4805
  ref,
4725
4806
  style: [useMemo(() => ({
4726
4807
  fontFamily: strongFont.fontFamily,
4727
4808
  fontWeight: strongFont.fontWeight,
4728
- fontStyle: strongFont.fontStyle,
4729
- color: color || colors[12]
4809
+ fontStyle: strongFont.fontStyle
4730
4810
  }), [
4731
4811
  strongFont,
4732
4812
  color,
@@ -4987,7 +5067,7 @@ const areEqual = (prevProps, nextProps) => {
4987
5067
  if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.variant === nextProps.variant && prevProps.color === nextProps.color && prevProps.radius === nextProps.radius && prevProps.size === nextProps.size && prevProps.disabled === nextProps.disabled && prevProps.loading === nextProps.loading && prevProps.onPress === nextProps.onPress && prevProps.onLongPress === nextProps.onLongPress && prevProps.delayLongPress === nextProps.delayLongPress && prevProps.width === nextProps.width && prevProps.highContrast === nextProps.highContrast) return true;
4988
5068
  return false;
4989
5069
  };
4990
- const Button = React.memo(React.forwardRef(({ children, style, variant = "classic", color, radius, size = 2, disabled, loading, onPress, accessibilityLabel, width, highContrast, hapticFeedback, ...rest }, ref) => {
5070
+ const Button = React.memo(React.forwardRef(({ children, style, variant = "solid", color, radius, size = 2, disabled, loading, onPress, accessibilityLabel, width, highContrast, hapticFeedback, ...rest }, ref) => {
4991
5071
  const theme = useTheme$1();
4992
5072
  const mode = useThemeMode$1();
4993
5073
  const isDark = mode === "dark";
@@ -5141,7 +5221,7 @@ const Button = React.memo(React.forwardRef(({ children, style, variant = "classi
5141
5221
  children: labelProps.children
5142
5222
  }, "label");
5143
5223
  };
5144
- return /* @__PURE__ */ jsx(AnimatedPressable_default, {
5224
+ return /* @__PURE__ */ jsx(AnimatedPressable, {
5145
5225
  ref,
5146
5226
  style: [buttonStyle, style],
5147
5227
  onPress: handlePress,
@@ -5174,52 +5254,48 @@ Button.Label = ButtonLabel;
5174
5254
 
5175
5255
  //#endregion
5176
5256
  //#region src/components/forms/IconButton.tsx
5177
- const IconButton = React.forwardRef(({ children, style = {}, variant = "classic", color, size = 2, radius, asChild = false, disabled, loading, onPress, accessibilityLabel, highContrast, hapticFeedback, ...rest }, ref) => {
5257
+ const IconButton = React.forwardRef(({ children, style = {}, variant = "solid", color, size = 2, radius, asChild = false, disabled, loading, onPress, accessibilityLabel, highContrast, hapticFeedback, ...rest }, ref) => {
5178
5258
  const theme = useTheme$1();
5179
5259
  const mode = useThemeMode$1();
5180
5260
  mode === "dark" ? theme.colors.gray.dark : theme.colors.gray;
5181
5261
  const grayAlpha = getGrayAlpha(theme);
5182
5262
  getAccentColor(theme, mode);
5183
5263
  getAccentAlpha(theme);
5184
- const radii = theme.radii;
5185
- const activeColor = color || theme.accentColor;
5186
- const getBorderRadius = () => {
5187
- if (radius) return radius === "full" ? 9999 : radii[radius];
5188
- };
5189
- const variantColors = getVariantColors(theme, activeColor, mode, variant, highContrast);
5264
+ const radii = theme.radii[radius || theme.radius] ?? theme.radii.medium;
5265
+ const selectedRadius = radius || theme.radius;
5266
+ const variantColors = getVariantColors(theme, color || theme.accentColor, mode, variant, highContrast);
5190
5267
  const getSizeValues = () => {
5191
5268
  switch (size) {
5192
5269
  case 1: return {
5193
5270
  size: 32,
5194
5271
  iconSize: 16,
5195
- borderRadius: radii.small
5272
+ borderRadius: selectedRadius === "full" ? 9999 : radii
5196
5273
  };
5197
5274
  case 3: return {
5198
5275
  size: 56,
5199
5276
  iconSize: 24,
5200
- borderRadius: radii.medium
5277
+ borderRadius: selectedRadius === "full" ? 9999 : radii
5201
5278
  };
5202
5279
  case 4: return {
5203
5280
  size: 64,
5204
5281
  iconSize: 28,
5205
- borderRadius: radii.large
5282
+ borderRadius: selectedRadius === "full" ? 9999 : radii
5206
5283
  };
5207
5284
  default: return {
5208
5285
  size: 40,
5209
5286
  iconSize: 20,
5210
- borderRadius: radii.medium
5287
+ borderRadius: selectedRadius === "full" ? 9999 : radii
5211
5288
  };
5212
5289
  }
5213
5290
  };
5214
5291
  const sizeValues = getSizeValues();
5215
- const customBorderRadius = getBorderRadius();
5216
5292
  const buttonStyle = {
5217
5293
  width: sizeValues.size,
5218
5294
  height: sizeValues.size,
5219
5295
  backgroundColor: disabled ? grayAlpha["3"] : variantColors.backgroundColor,
5220
5296
  borderColor: variantColors.borderColor,
5221
5297
  borderWidth: variant === "outline" ? 1 : 0,
5222
- borderRadius: customBorderRadius !== void 0 ? customBorderRadius : sizeValues.borderRadius,
5298
+ borderRadius: sizeValues.borderRadius,
5223
5299
  opacity: disabled ? .5 : 1,
5224
5300
  alignItems: "center",
5225
5301
  justifyContent: "center"
@@ -5242,7 +5318,7 @@ const IconButton = React.forwardRef(({ children, style = {}, variant = "classic"
5242
5318
  ...child.props
5243
5319
  });
5244
5320
  }
5245
- return /* @__PURE__ */ jsx(AnimatedPressable_default, {
5321
+ return /* @__PURE__ */ jsx(AnimatedPressable, {
5246
5322
  ref,
5247
5323
  style: [buttonStyle, style],
5248
5324
  onPress,
@@ -5259,8 +5335,8 @@ const IconButton = React.forwardRef(({ children, style = {}, variant = "classic"
5259
5335
  size: "small",
5260
5336
  color: variantColors.textColor
5261
5337
  }) : React.isValidElement(children) ? React.cloneElement(children, {
5262
- size: sizeValues.iconSize,
5263
- color: variantColors.textColor
5338
+ size: children.props?.size || sizeValues.iconSize,
5339
+ color: children.props?.color || variantColors.textColor
5264
5340
  }) : children
5265
5341
  });
5266
5342
  });
@@ -5390,7 +5466,6 @@ const TextFieldRoot = React.forwardRef(({ children, ...props }, ref) => {
5390
5466
  };
5391
5467
  const inputContainerStyle = {
5392
5468
  width: "100%",
5393
- flex: 1,
5394
5469
  flexDirection: "row",
5395
5470
  alignItems: "center",
5396
5471
  justifyContent: "space-between",
@@ -5414,7 +5489,8 @@ const TextFieldRoot = React.forwardRef(({ children, ...props }, ref) => {
5414
5489
  paddingHorizontal: sizeValues.paddingHorizontal / 2,
5415
5490
  minHeight: multiline ? sizeValues.height : void 0,
5416
5491
  height: multiline ? void 0 : sizeValues.height,
5417
- textAlignVertical: multiline ? "top" : "center"
5492
+ textAlignVertical: multiline ? "top" : "center",
5493
+ borderRadius: sizeValues.borderRadius
5418
5494
  };
5419
5495
  const errorStyle = {
5420
5496
  color: theme.colors.ruby[10],
@@ -5440,7 +5516,7 @@ const TextFieldRoot = React.forwardRef(({ children, ...props }, ref) => {
5440
5516
  };
5441
5517
  return /* @__PURE__ */ jsxs(View, {
5442
5518
  style: [
5443
- styles$31.container,
5519
+ styles$33.container,
5444
5520
  containerStyle,
5445
5521
  style
5446
5522
  ],
@@ -5458,7 +5534,7 @@ const TextFieldRoot = React.forwardRef(({ children, ...props }, ref) => {
5458
5534
  style: inputInnerContainerStyle,
5459
5535
  children: [
5460
5536
  leftSlots.length > 0 && /* @__PURE__ */ jsx(View, {
5461
- style: [styles$31.leftSlots, slotWrapperStyle],
5537
+ style: [styles$33.leftSlots, slotWrapperStyle],
5462
5538
  children: leftSlots.map((child, index) => isValidElement(child) ? React.cloneElement(child, {
5463
5539
  key: index,
5464
5540
  side: "left"
@@ -5469,11 +5545,11 @@ const TextFieldRoot = React.forwardRef(({ children, ...props }, ref) => {
5469
5545
  style: { flex: 1 },
5470
5546
  children: /* @__PURE__ */ jsx(RnTextInput, {
5471
5547
  ...commonInputProps,
5472
- style: [styles$31.input, inputStyle]
5548
+ style: [styles$33.input, inputStyle]
5473
5549
  })
5474
5550
  }),
5475
5551
  rightSlots.length > 0 && /* @__PURE__ */ jsx(View, {
5476
- style: [styles$31.rightSlots, slotWrapperStyle],
5552
+ style: [styles$33.rightSlots, slotWrapperStyle],
5477
5553
  children: rightSlots.map((child, index) => isValidElement(child) ? React.cloneElement(child, {
5478
5554
  key: index,
5479
5555
  side: "right"
@@ -5499,11 +5575,8 @@ const TextField = React.forwardRef((props, ref) => {
5499
5575
  TextField.displayName = "TextField";
5500
5576
  TextField.Root = TextFieldRoot;
5501
5577
  TextField.Slot = TextFieldSlot;
5502
- const styles$31 = StyleSheet.create({
5503
- container: {
5504
- flex: 1,
5505
- width: "100%"
5506
- },
5578
+ const styles$33 = StyleSheet.create({
5579
+ container: { width: "100%" },
5507
5580
  leftSlots: {
5508
5581
  flexDirection: "row",
5509
5582
  alignItems: "center"
@@ -5515,25 +5588,73 @@ const styles$31 = StyleSheet.create({
5515
5588
  input: {
5516
5589
  flexDirection: "row",
5517
5590
  width: "100%",
5518
- minWidth: "100%",
5519
- flex: 1
5591
+ minWidth: "100%"
5520
5592
  }
5521
5593
  });
5522
5594
 
5523
5595
  //#endregion
5524
5596
  //#region src/components/forms/TextArea.tsx
5525
- const TextAreaRoot = React.forwardRef((props, ref) => {
5597
+ const TextAreaSlot = React.forwardRef(({ side, color, gap, paddingHorizontal, paddingLeft, paddingRight, children, ...props }, ref) => {
5598
+ const theme = useTheme$1();
5599
+ const isDark = useThemeMode$1() === "dark";
5600
+ const slotStyle = {
5601
+ ...props.style,
5602
+ gap: gap !== void 0 ? gap : void 0,
5603
+ paddingHorizontal: paddingHorizontal !== void 0 ? paddingHorizontal : void 0,
5604
+ paddingLeft: paddingLeft !== void 0 ? paddingLeft : void 0,
5605
+ paddingRight: paddingRight !== void 0 ? paddingRight : void 0
5606
+ };
5607
+ const coloredChild = useMemo(() => {
5608
+ if (!color || !isValidElement(children)) return children;
5609
+ return React.cloneElement(children, { color: theme.colors[color][9] });
5610
+ }, [
5611
+ children,
5612
+ color,
5613
+ theme,
5614
+ isDark
5615
+ ]);
5616
+ return /* @__PURE__ */ jsx(Slot, {
5617
+ ref,
5618
+ style: slotStyle,
5619
+ ...props,
5620
+ children: coloredChild
5621
+ });
5622
+ });
5623
+ TextAreaSlot.displayName = "TextAreaSlot";
5624
+ const TextAreaRoot = React.forwardRef(({ children, ...props }, ref) => {
5526
5625
  const theme = useTheme$1();
5527
5626
  const mode = useThemeMode$1();
5528
5627
  const isDark = mode === "dark";
5529
5628
  const grayScale = isDark ? theme.colors.gray.dark : theme.colors.gray;
5530
5629
  const grayAlpha = getGrayAlpha(theme);
5531
5630
  const { value, onChangeText, placeholder, label, error, disabled = false, color = "gray", highContrast = false, radius = "medium", size = "2", variant = "outline", rows = 4, autoGrow = false, accessibilityLabel, accessibilityHint, style, ...rest } = props;
5631
+ const { leftSlots, rightSlots } = useMemo(() => {
5632
+ const slotChildren = [];
5633
+ Children.forEach(children, (child) => {
5634
+ if (!isValidElement(child)) return;
5635
+ if (child.type?.displayName === "TextAreaSlot") slotChildren.push(child);
5636
+ });
5637
+ const leftSlots = [];
5638
+ const rightSlots = [];
5639
+ slotChildren.forEach((child) => {
5640
+ if (!isValidElement(child)) return;
5641
+ const explicitSide = child.props.side;
5642
+ if (explicitSide === "left") leftSlots.push(child);
5643
+ else if (explicitSide === "right") rightSlots.push(child);
5644
+ else if (slotChildren.filter((c) => isValidElement(c) && !c.props?.side).indexOf(child) === 0) leftSlots.push(child);
5645
+ else rightSlots.push(child);
5646
+ });
5647
+ return {
5648
+ leftSlots,
5649
+ rightSlots
5650
+ };
5651
+ }, [children]);
5532
5652
  const [isFocused, setIsFocused] = useState(false);
5533
5653
  const activeColor = color || theme.accentColor;
5534
5654
  const radii = theme.radii[radius] ?? theme.radii.medium;
5535
5655
  const selectedRadius = radius || theme.radius;
5536
5656
  const variantColors = getVariantColors(theme, activeColor, mode, variant, highContrast);
5657
+ const accentColorScale = getColorScale(theme, activeColor, mode);
5537
5658
  const getSizeValues = () => {
5538
5659
  switch (size) {
5539
5660
  case "1": return {
@@ -5562,10 +5683,10 @@ const TextAreaRoot = React.forwardRef((props, ref) => {
5562
5683
  };
5563
5684
  const inputContainerBorderColor = () => {
5564
5685
  if (error) return theme.colors.ruby[9];
5565
- else return isFocused ? theme.colors[activeColor]["8"] : "transparent";
5686
+ else return isFocused ? accentColorScale["8"] : "transparent";
5566
5687
  };
5567
5688
  const inputContainerBackgroundColor = () => {
5568
- if (disabled) return isDark ? grayAlpha["3"] : grayAlpha["2"];
5689
+ if (disabled) return isDark ? grayAlpha["2"] : grayAlpha["2"];
5569
5690
  else return variantColors.backgroundColor;
5570
5691
  };
5571
5692
  const inputBorderColor = () => {
@@ -5574,16 +5695,21 @@ const TextAreaRoot = React.forwardRef((props, ref) => {
5574
5695
  };
5575
5696
  const inputContainerStyle = {
5576
5697
  width: "100%",
5577
- borderWidth: 2,
5698
+ flexDirection: "row",
5699
+ alignItems: "flex-start",
5700
+ justifyContent: "space-between",
5701
+ borderWidth: variant === "soft" ? 1.4 : 2,
5578
5702
  borderColor: inputContainerBorderColor(),
5579
5703
  backgroundColor: inputContainerBackgroundColor(),
5580
5704
  borderRadius: selectedRadius === "full" ? theme.radii.large : radii,
5581
5705
  opacity: disabled ? .6 : 1
5582
5706
  };
5583
- const inputStyle = {
5707
+ const inputInnerContainerStyle = {
5584
5708
  borderWidth: 1,
5585
5709
  borderColor: inputBorderColor(),
5586
- borderRadius: selectedRadius === "full" ? theme.radii.large : radii,
5710
+ borderRadius: selectedRadius === "full" ? theme.radii.large : radii
5711
+ };
5712
+ const inputStyle = {
5587
5713
  fontSize: sizeValues.fontSize,
5588
5714
  color: color !== "gray" ? variantColors.textColor : grayScale[12],
5589
5715
  padding: sizeValues.padding,
@@ -5597,7 +5723,7 @@ const TextAreaRoot = React.forwardRef((props, ref) => {
5597
5723
  };
5598
5724
  return /* @__PURE__ */ jsxs(View, {
5599
5725
  style: [
5600
- styles$30.container,
5726
+ styles$32.container,
5601
5727
  containerStyle,
5602
5728
  style
5603
5729
  ],
@@ -5609,21 +5735,47 @@ const TextAreaRoot = React.forwardRef((props, ref) => {
5609
5735
  }),
5610
5736
  /* @__PURE__ */ jsx(View, {
5611
5737
  style: inputContainerStyle,
5612
- children: /* @__PURE__ */ jsx(RnTextInput, {
5613
- ref,
5614
- value,
5615
- onChangeText,
5616
- placeholder,
5617
- placeholderTextColor: color !== "gray" ? theme.colors[color][12] + "99" : theme.colors.gray[9],
5618
- editable: !disabled,
5619
- multiline: true,
5620
- accessibilityLabel: accessibilityLabel || label,
5621
- accessibilityHint,
5622
- accessibilityState: { disabled },
5623
- style: [styles$30.input, inputStyle],
5624
- onFocus: () => setIsFocused(true),
5625
- onBlur: () => setIsFocused(false),
5626
- ...rest
5738
+ children: /* @__PURE__ */ jsxs(Flex, {
5739
+ align: "stretch",
5740
+ direction: "row",
5741
+ style: inputInnerContainerStyle,
5742
+ children: [
5743
+ leftSlots.length > 0 && /* @__PURE__ */ jsx(View, {
5744
+ style: styles$32.leftSlots,
5745
+ children: leftSlots.map((child, index) => isValidElement(child) ? React.cloneElement(child, {
5746
+ key: index,
5747
+ side: "left"
5748
+ }) : child)
5749
+ }),
5750
+ /* @__PURE__ */ jsx(Flex, {
5751
+ direction: "row",
5752
+ style: { flex: 1 },
5753
+ wrap: "wrap",
5754
+ children: /* @__PURE__ */ jsx(RnTextInput, {
5755
+ ref,
5756
+ value,
5757
+ onChangeText,
5758
+ placeholder,
5759
+ placeholderTextColor: color !== "gray" ? theme.colors[color][12] + "99" : theme.colors.gray[9],
5760
+ editable: !disabled,
5761
+ multiline: true,
5762
+ accessibilityLabel: accessibilityLabel || label,
5763
+ accessibilityHint,
5764
+ accessibilityState: { disabled },
5765
+ style: [styles$32.input, inputStyle],
5766
+ onFocus: () => setIsFocused(true),
5767
+ onBlur: () => setIsFocused(false),
5768
+ ...rest
5769
+ })
5770
+ }),
5771
+ rightSlots.length > 0 && /* @__PURE__ */ jsx(View, {
5772
+ style: styles$32.rightSlots,
5773
+ children: rightSlots.map((child, index) => isValidElement(child) ? React.cloneElement(child, {
5774
+ key: index,
5775
+ side: "right"
5776
+ }) : child)
5777
+ })
5778
+ ]
5627
5779
  })
5628
5780
  }),
5629
5781
  error && /* @__PURE__ */ jsx(RnText, {
@@ -5641,12 +5793,19 @@ const TextArea = React.forwardRef((props, ref) => {
5641
5793
  });
5642
5794
  });
5643
5795
  TextArea.displayName = "TextArea";
5644
- const styles$30 = StyleSheet.create({
5796
+ TextArea.Root = TextAreaRoot;
5797
+ TextArea.Slot = TextAreaSlot;
5798
+ const styles$32 = StyleSheet.create({
5645
5799
  container: { width: "100%" },
5646
- input: {
5647
- width: "100%",
5648
- minHeight: 100
5649
- }
5800
+ leftSlots: {
5801
+ flexDirection: "row",
5802
+ alignItems: "flex-start"
5803
+ },
5804
+ rightSlots: {
5805
+ flexDirection: "row",
5806
+ alignItems: "flex-start"
5807
+ },
5808
+ input: { minWidth: "100%" }
5650
5809
  });
5651
5810
 
5652
5811
  //#endregion
@@ -5657,6 +5816,7 @@ const Checkbox = React.forwardRef(({ checked, defaultChecked = false, onCheckedC
5657
5816
  const isChecked = isControlled ? checked : internalChecked;
5658
5817
  const theme = useTheme$1();
5659
5818
  const mode = useThemeMode$1();
5819
+ const globalHaptics = useHaptics$1();
5660
5820
  const isDark = mode === "dark";
5661
5821
  const grayScale = isDark ? theme.colors.gray.dark : theme.colors.gray;
5662
5822
  const grayAlpha = getGrayAlpha(theme);
@@ -5702,7 +5862,7 @@ const Checkbox = React.forwardRef(({ checked, defaultChecked = false, onCheckedC
5702
5862
  setInternalChecked(newChecked);
5703
5863
  onCheckedChange?.(newChecked);
5704
5864
  }
5705
- if (hapticFeedback) Vibration.vibrate(10);
5865
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
5706
5866
  }
5707
5867
  };
5708
5868
  const boxStyle = {
@@ -5724,9 +5884,9 @@ const Checkbox = React.forwardRef(({ checked, defaultChecked = false, onCheckedC
5724
5884
  color: theme.colors.gray || grayScale[12],
5725
5885
  fontSize: sizeValues.fontSize
5726
5886
  };
5727
- return /* @__PURE__ */ jsxs(AnimatedPressable_default, {
5887
+ return /* @__PURE__ */ jsxs(AnimatedPressable, {
5728
5888
  ref,
5729
- style: styles$29.container,
5889
+ style: styles$31.container,
5730
5890
  onPress: handlePress,
5731
5891
  disabled,
5732
5892
  accessibilityRole: "checkbox",
@@ -5742,9 +5902,9 @@ const Checkbox = React.forwardRef(({ checked, defaultChecked = false, onCheckedC
5742
5902
  hapticFeedback: false,
5743
5903
  ...rest,
5744
5904
  children: [/* @__PURE__ */ jsx(RnView, {
5745
- style: [styles$29.checkbox, boxStyle],
5905
+ style: [styles$31.checkbox, boxStyle],
5746
5906
  children: (isChecked || indeterminate) && /* @__PURE__ */ jsx(RnView, {
5747
- style: [styles$29.icon, iconStyle],
5907
+ style: [styles$31.icon, iconStyle],
5748
5908
  children: indeterminate ? /* @__PURE__ */ jsx(RnView, { style: {
5749
5909
  width: sizeValues.iconSize * .9,
5750
5910
  height: 2.8,
@@ -5775,13 +5935,13 @@ const Checkbox = React.forwardRef(({ checked, defaultChecked = false, onCheckedC
5775
5935
  } })] })
5776
5936
  })
5777
5937
  }), label && /* @__PURE__ */ jsx(TextComponent, {
5778
- style: [styles$29.label, labelStyle],
5938
+ style: [styles$31.label, labelStyle],
5779
5939
  children: label
5780
5940
  })]
5781
5941
  });
5782
5942
  });
5783
5943
  Checkbox.displayName = "Checkbox";
5784
- const styles$29 = StyleSheet.create({
5944
+ const styles$31 = StyleSheet.create({
5785
5945
  container: {
5786
5946
  flexDirection: "row",
5787
5947
  alignItems: "center"
@@ -5811,7 +5971,7 @@ const CheckboxGroup = React.forwardRef(({ value, onValueChange, items, disabled
5811
5971
  return /* @__PURE__ */ jsx(RnView, {
5812
5972
  ref,
5813
5973
  style: [
5814
- styles$28.container,
5974
+ styles$30.container,
5815
5975
  containerStyle,
5816
5976
  style
5817
5977
  ],
@@ -5830,7 +5990,7 @@ const CheckboxGroup = React.forwardRef(({ value, onValueChange, items, disabled
5830
5990
  });
5831
5991
  });
5832
5992
  CheckboxGroup.displayName = "CheckboxGroup";
5833
- const styles$28 = StyleSheet.create({ container: { width: "100%" } });
5993
+ const styles$30 = StyleSheet.create({ container: { width: "100%" } });
5834
5994
 
5835
5995
  //#endregion
5836
5996
  //#region src/components/forms/CheckboxCards.tsx
@@ -5868,7 +6028,7 @@ const CheckboxCardsRoot = React.forwardRef(({ value: controlledValue, defaultVal
5868
6028
  children: /* @__PURE__ */ jsx(RnView, {
5869
6029
  ref,
5870
6030
  style: [
5871
- styles$27.rootContainer,
6031
+ styles$29.rootContainer,
5872
6032
  containerStyle,
5873
6033
  style
5874
6034
  ],
@@ -5882,6 +6042,7 @@ const CheckboxCardsItem = React.forwardRef(({ value, side: itemSide, disabled: i
5882
6042
  const context = useCheckboxCardsContext();
5883
6043
  const theme = useTheme$1();
5884
6044
  const mode = useThemeMode$1();
6045
+ const globalHaptics = useHaptics$1();
5885
6046
  const isDark = mode === "dark";
5886
6047
  const { value: selectedValues, onValueChange, variant, size, color, highContrast, radius, side: rootSide, disabled: rootDisabled } = context;
5887
6048
  const isChecked = selectedValues.includes(value);
@@ -5921,7 +6082,7 @@ const CheckboxCardsItem = React.forwardRef(({ value, side: itemSide, disabled: i
5921
6082
  if (!isDisabled) {
5922
6083
  if (isChecked) onValueChange(selectedValues.filter((v) => v !== value));
5923
6084
  else onValueChange([...selectedValues, value]);
5924
- Vibration.vibrate(10);
6085
+ if (globalHaptics) triggerHaptic("press");
5925
6086
  }
5926
6087
  };
5927
6088
  const cardStyle = {
@@ -5936,10 +6097,10 @@ const CheckboxCardsItem = React.forwardRef(({ value, side: itemSide, disabled: i
5936
6097
  gap: theme.space[3]
5937
6098
  };
5938
6099
  sizeValues.indicatorSize, sizeValues.indicatorSize, sizeValues.borderWidth, isChecked ? variantColors.borderColor : grayAlpha["8"], isChecked && variantColors.backgroundColor;
5939
- return /* @__PURE__ */ jsxs(AnimatedPressable_default, {
6100
+ return /* @__PURE__ */ jsxs(AnimatedPressable, {
5940
6101
  ref,
5941
6102
  style: [
5942
- styles$27.itemContainer,
6103
+ styles$29.itemContainer,
5943
6104
  cardStyle,
5944
6105
  style
5945
6106
  ],
@@ -5966,13 +6127,13 @@ const CheckboxCardsItem = React.forwardRef(({ value, side: itemSide, disabled: i
5966
6127
  size,
5967
6128
  onCheckedChange: handlePress
5968
6129
  }), /* @__PURE__ */ jsx(RnView, {
5969
- style: styles$27.content,
6130
+ style: styles$29.content,
5970
6131
  children
5971
6132
  })]
5972
6133
  });
5973
6134
  });
5974
6135
  CheckboxCardsItem.displayName = "CheckboxCards.Item";
5975
- const styles$27 = StyleSheet.create({
6136
+ const styles$29 = StyleSheet.create({
5976
6137
  rootContainer: { width: "100%" },
5977
6138
  itemContainer: { flex: 1 },
5978
6139
  content: { flex: 1 }
@@ -5987,6 +6148,7 @@ const CheckboxCards = {
5987
6148
  const Radio = React.forwardRef(({ defaultChecked, value, selected, onSelect, disabled = false, size = "2", variant = "solid", color, label, children, highContrast = false, accessibilityLabel, accessibilityHint, hapticFeedback = true, ...rest }, ref) => {
5988
6149
  const theme = useTheme$1();
5989
6150
  const mode = useThemeMode$1();
6151
+ const globalHaptics = useHaptics$1();
5990
6152
  const grayScale = mode === "dark" ? theme.colors.gray.dark : theme.colors.gray;
5991
6153
  getGrayAlpha(theme);
5992
6154
  const accentScale = getAccentColor(theme, mode);
@@ -6026,7 +6188,7 @@ const Radio = React.forwardRef(({ defaultChecked, value, selected, onSelect, dis
6026
6188
  if (!disabled) {
6027
6189
  if (onSelect) onSelect(value);
6028
6190
  if (selected === void 0) setIsInternallySelected(true);
6029
- if (hapticFeedback) Vibration.vibrate(10);
6191
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
6030
6192
  }
6031
6193
  };
6032
6194
  const outerStyle = {
@@ -6050,9 +6212,9 @@ const Radio = React.forwardRef(({ defaultChecked, value, selected, onSelect, dis
6050
6212
  color: grayScale[12],
6051
6213
  fontSize: sizeValues.fontSize
6052
6214
  };
6053
- return /* @__PURE__ */ jsxs(AnimatedPressable_default, {
6215
+ return /* @__PURE__ */ jsxs(AnimatedPressable, {
6054
6216
  ref,
6055
- style: styles$26.container,
6217
+ style: styles$28.container,
6056
6218
  onPress: handlePress,
6057
6219
  disabled,
6058
6220
  accessibilityRole: "radio",
@@ -6068,19 +6230,19 @@ const Radio = React.forwardRef(({ defaultChecked, value, selected, onSelect, dis
6068
6230
  hapticFeedback: false,
6069
6231
  ...rest,
6070
6232
  children: [/* @__PURE__ */ jsx(RnView, {
6071
- style: [styles$26.radioOuter, outerStyle],
6072
- children: /* @__PURE__ */ jsx(RnView, { style: [styles$26.radioInner, innerStyle] })
6233
+ style: [styles$28.radioOuter, outerStyle],
6234
+ children: /* @__PURE__ */ jsx(RnView, { style: [styles$28.radioInner, innerStyle] })
6073
6235
  }), children ? /* @__PURE__ */ jsx(RnView, {
6074
- style: styles$26.content,
6236
+ style: styles$28.content,
6075
6237
  children
6076
6238
  }) : label ? /* @__PURE__ */ jsx(TextComponent, {
6077
- style: [styles$26.label, labelStyle],
6239
+ style: [styles$28.label, labelStyle],
6078
6240
  children: label
6079
6241
  }) : null]
6080
6242
  });
6081
6243
  });
6082
6244
  Radio.displayName = "Radio";
6083
- const styles$26 = StyleSheet.create({
6245
+ const styles$28 = StyleSheet.create({
6084
6246
  container: {
6085
6247
  flexDirection: "row",
6086
6248
  alignItems: "center"
@@ -6131,7 +6293,7 @@ const RadioGroupRoot = React.forwardRef(({ value: controlledValue, defaultValue,
6131
6293
  children: /* @__PURE__ */ jsx(RnView, {
6132
6294
  ref,
6133
6295
  style: [
6134
- styles$25.container,
6296
+ styles$27.container,
6135
6297
  containerStyle,
6136
6298
  style
6137
6299
  ],
@@ -6162,7 +6324,7 @@ const RadioGroupItem = React.forwardRef(({ value, disabled: itemDisabled, ...pro
6162
6324
  });
6163
6325
  });
6164
6326
  RadioGroupItem.displayName = "RadioGroup.Item";
6165
- const styles$25 = StyleSheet.create({ container: { width: "100%" } });
6327
+ const styles$27 = StyleSheet.create({ container: { width: "100%" } });
6166
6328
  const RadioGroup = {
6167
6329
  Root: RadioGroupRoot,
6168
6330
  Item: RadioGroupItem
@@ -6204,7 +6366,7 @@ const RadioCardsRoot = React.forwardRef(({ value: controlledValue, defaultValue,
6204
6366
  children: /* @__PURE__ */ jsx(RnView, {
6205
6367
  ref,
6206
6368
  style: [
6207
- styles$24.rootContainer,
6369
+ styles$26.rootContainer,
6208
6370
  containerStyle,
6209
6371
  style
6210
6372
  ],
@@ -6218,6 +6380,7 @@ const RadioCardsItem = React.forwardRef(({ value, side: itemSide, disabled: item
6218
6380
  const context = useRadioCardsContext();
6219
6381
  const theme = useTheme$1();
6220
6382
  const mode = useThemeMode$1();
6383
+ const globalHaptics = useHaptics$1();
6221
6384
  const isDark = mode === "dark";
6222
6385
  const { value: selectedValue, onValueChange, variant, size, color, highContrast, radius, side: rootSide, disabled: rootDisabled } = context;
6223
6386
  const isSelected = selectedValue === value;
@@ -6253,14 +6416,14 @@ const RadioCardsItem = React.forwardRef(({ value, side: itemSide, disabled: item
6253
6416
  const handlePress = () => {
6254
6417
  if (!isDisabled) {
6255
6418
  onValueChange(value);
6256
- Vibration.vibrate(10);
6419
+ if (globalHaptics) triggerHaptic("press");
6257
6420
  }
6258
6421
  };
6259
6422
  const cardStyle = {
6260
6423
  padding: sizeValues.padding,
6261
6424
  borderRadius: radius === "full" ? 9999 : radii,
6262
6425
  borderWidth: isSelected ? 1.5 : 1,
6263
- borderColor: isSelected ? variantColors.borderColor : isDark ? grayAlpha["6"] : grayAlpha["6"],
6426
+ borderColor: isSelected ? variantColors.borderColor : ["outline", "surface"].includes(variant) ? isDark ? grayAlpha["6"] : grayAlpha["6"] : "transparent",
6264
6427
  backgroundColor: isSelected ? variantColors.backgroundColor : isDark ? grayAlpha["2"] : grayAlpha["2"],
6265
6428
  opacity: isDisabled ? .5 : 1,
6266
6429
  flexDirection: indicatorSide === "left" ? "row" : "row-reverse",
@@ -6283,10 +6446,10 @@ const RadioCardsItem = React.forwardRef(({ value, side: itemSide, disabled: item
6283
6446
  borderRadius: sizeValues.innerIndicatorSize / 2,
6284
6447
  backgroundColor: variantColors.textColor
6285
6448
  };
6286
- return /* @__PURE__ */ jsxs(AnimatedPressable_default, {
6449
+ return /* @__PURE__ */ jsxs(AnimatedPressable, {
6287
6450
  ref,
6288
6451
  style: [
6289
- styles$24.itemContainer,
6452
+ styles$26.itemContainer,
6290
6453
  cardStyle,
6291
6454
  style
6292
6455
  ],
@@ -6311,15 +6474,15 @@ const RadioCardsItem = React.forwardRef(({ value, side: itemSide, disabled: item
6311
6474
  style: indicatorStyle,
6312
6475
  children: isSelected && /* @__PURE__ */ jsx(RnView, { style: innerDotStyle })
6313
6476
  }), /* @__PURE__ */ jsx(RnView, {
6314
- style: styles$24.content,
6477
+ style: styles$26.content,
6315
6478
  children
6316
6479
  })]
6317
6480
  });
6318
6481
  });
6319
6482
  RadioCardsItem.displayName = "RadioCards.Item";
6320
- const styles$24 = StyleSheet.create({
6483
+ const styles$26 = StyleSheet.create({
6321
6484
  rootContainer: { width: "100%" },
6322
- itemContainer: { flex: 1 },
6485
+ itemContainer: {},
6323
6486
  content: { flex: 1 }
6324
6487
  });
6325
6488
  const RadioCards = {
@@ -6332,6 +6495,7 @@ const RadioCards = {
6332
6495
  const Switch = React.forwardRef(({ defaultChecked, checked, onCheckedChange, disabled = false, radius = "full", size = "2", color, variant = "solid", thumbColor, label, highContrast, accessibilityLabel, accessibilityHint, hapticFeedback = true, ...rest }, ref) => {
6333
6496
  const theme = useTheme$1();
6334
6497
  const mode = useThemeMode$1();
6498
+ const globalHaptics = useHaptics$1();
6335
6499
  const isDark = mode === "dark";
6336
6500
  const grayScale = isDark ? theme.colors.gray.dark : theme.colors.gray;
6337
6501
  const grayAlpha = getGrayAlpha(theme);
@@ -6349,7 +6513,7 @@ const Switch = React.forwardRef(({ defaultChecked, checked, onCheckedChange, dis
6349
6513
  const setChecked = (value) => {
6350
6514
  if (checked === void 0) setInternalChecked(value);
6351
6515
  if (onCheckedChange) onCheckedChange(value);
6352
- if (hapticFeedback && !disabled) Vibration.vibrate(10);
6516
+ if (globalHaptics && hapticFeedback && !disabled) triggerHaptic("press");
6353
6517
  };
6354
6518
  const animatedValue = useRef(new Animated.Value(isChecked ? 1 : 0));
6355
6519
  useEffect(() => {
@@ -6415,9 +6579,9 @@ const Switch = React.forwardRef(({ defaultChecked, checked, onCheckedChange, dis
6415
6579
  color: grayScale[12],
6416
6580
  fontSize: sizeValues.fontSize
6417
6581
  };
6418
- return /* @__PURE__ */ jsxs(AnimatedPressable_default, {
6582
+ return /* @__PURE__ */ jsxs(AnimatedPressable, {
6419
6583
  ref,
6420
- style: styles$23.container,
6584
+ style: styles$25.container,
6421
6585
  onPress: handlePress,
6422
6586
  disabled,
6423
6587
  accessibilityRole: "switch",
@@ -6433,16 +6597,16 @@ const Switch = React.forwardRef(({ defaultChecked, checked, onCheckedChange, dis
6433
6597
  hapticFeedback: false,
6434
6598
  ...rest,
6435
6599
  children: [/* @__PURE__ */ jsx(RnView, {
6436
- style: [styles$23.track, trackStyle],
6437
- children: /* @__PURE__ */ jsx(Animated.View, { style: [styles$23.thumb, thumbStyle] })
6600
+ style: [styles$25.track, trackStyle],
6601
+ children: /* @__PURE__ */ jsx(Animated.View, { style: [styles$25.thumb, thumbStyle] })
6438
6602
  }), label && /* @__PURE__ */ jsx(TextComponent, {
6439
- style: [styles$23.label, labelStyle],
6603
+ style: [styles$25.label, labelStyle],
6440
6604
  children: label
6441
6605
  })]
6442
6606
  });
6443
6607
  });
6444
6608
  Switch.displayName = "Switch";
6445
- const styles$23 = StyleSheet.create({
6609
+ const styles$25 = StyleSheet.create({
6446
6610
  container: {
6447
6611
  flexDirection: "row",
6448
6612
  alignItems: "center"
@@ -6640,25 +6804,25 @@ function calculateContextMenuPosition(touchPoint, contentSize, screenSize, side
6640
6804
  * ChevronDownIcon - A chevron pointing down using React Native View
6641
6805
  * Can be rotated to point in different directions
6642
6806
  */
6643
- const ChevronDownIcon$1 = React.forwardRef(({ width = 9, height = 9, style, color = "currentColor" }, _forwardedRef) => {
6807
+ const ChevronDownIcon = React.forwardRef(({ width = 9, height = 9, style, color = "currentColor" }, _forwardedRef) => {
6644
6808
  const armWidth = width * .55;
6645
6809
  const armHeight = 2;
6646
6810
  const armOffset = width * .22;
6647
6811
  return /* @__PURE__ */ jsxs(View, {
6648
6812
  style: [
6649
- styles$22.chevronContainer,
6813
+ styles$24.chevronContainer,
6650
6814
  {
6651
6815
  width,
6652
6816
  height
6653
6817
  },
6654
6818
  style
6655
6819
  ],
6656
- children: [/* @__PURE__ */ jsx(View, { style: [styles$22.chevronArm, {
6820
+ children: [/* @__PURE__ */ jsx(View, { style: [styles$24.chevronArm, {
6657
6821
  width: armWidth,
6658
6822
  height: armHeight,
6659
6823
  backgroundColor: color,
6660
6824
  transform: [{ rotate: "45deg" }, { translateX: -armOffset }]
6661
- }] }), /* @__PURE__ */ jsx(View, { style: [styles$22.chevronArm, {
6825
+ }] }), /* @__PURE__ */ jsx(View, { style: [styles$24.chevronArm, {
6662
6826
  width: armWidth,
6663
6827
  height: armHeight,
6664
6828
  backgroundColor: color,
@@ -6666,7 +6830,7 @@ const ChevronDownIcon$1 = React.forwardRef(({ width = 9, height = 9, style, colo
6666
6830
  }] })]
6667
6831
  });
6668
6832
  });
6669
- ChevronDownIcon$1.displayName = "ChevronDownIcon";
6833
+ ChevronDownIcon.displayName = "ChevronDownIcon";
6670
6834
  /**
6671
6835
  * ThickChevronRightIcon - A thick chevron pointing right using React Native View
6672
6836
  */
@@ -6675,19 +6839,19 @@ const ThickChevronRightIcon = React.forwardRef(({ width = 9, height = 9, style,
6675
6839
  const armHeight = 2.5;
6676
6840
  return /* @__PURE__ */ jsxs(View, {
6677
6841
  style: [
6678
- styles$22.chevronContainer,
6842
+ styles$24.chevronContainer,
6679
6843
  {
6680
6844
  width,
6681
6845
  height
6682
6846
  },
6683
6847
  style
6684
6848
  ],
6685
- children: [/* @__PURE__ */ jsx(View, { style: [styles$22.chevronArm, {
6849
+ children: [/* @__PURE__ */ jsx(View, { style: [styles$24.chevronArm, {
6686
6850
  width: armWidth,
6687
6851
  height: armHeight,
6688
6852
  backgroundColor: color,
6689
6853
  transform: [{ rotate: "45deg" }, { translateY: -1 }]
6690
- }] }), /* @__PURE__ */ jsx(View, { style: [styles$22.chevronArm, {
6854
+ }] }), /* @__PURE__ */ jsx(View, { style: [styles$24.chevronArm, {
6691
6855
  width: armWidth,
6692
6856
  height: armHeight,
6693
6857
  backgroundColor: color,
@@ -6702,14 +6866,14 @@ ThickChevronRightIcon.displayName = "ThickChevronRightIcon";
6702
6866
  const ThickCheckIcon = React.forwardRef(({ width = 9, height = 9, style, color = "currentColor" }, _forwardedRef) => {
6703
6867
  return /* @__PURE__ */ jsxs(View, {
6704
6868
  style: [
6705
- styles$22.checkContainer,
6869
+ styles$24.checkContainer,
6706
6870
  {
6707
6871
  width,
6708
6872
  height
6709
6873
  },
6710
6874
  style
6711
6875
  ],
6712
- children: [/* @__PURE__ */ jsx(View, { style: [styles$22.checkShortArm, { backgroundColor: color }] }), /* @__PURE__ */ jsx(View, { style: [styles$22.checkLongArm, { backgroundColor: color }] })]
6876
+ children: [/* @__PURE__ */ jsx(View, { style: [styles$24.checkShortArm, { backgroundColor: color }] }), /* @__PURE__ */ jsx(View, { style: [styles$24.checkLongArm, { backgroundColor: color }] })]
6713
6877
  });
6714
6878
  });
6715
6879
  ThickCheckIcon.displayName = "ThickCheckIcon";
@@ -6719,21 +6883,21 @@ ThickCheckIcon.displayName = "ThickCheckIcon";
6719
6883
  const ThickDividerHorizontalIcon = React.forwardRef(({ width = 9, height = 9, style, color = "currentColor" }, _forwardedRef) => {
6720
6884
  return /* @__PURE__ */ jsx(View, {
6721
6885
  style: [
6722
- styles$22.dividerContainer,
6886
+ styles$24.dividerContainer,
6723
6887
  {
6724
6888
  width,
6725
6889
  height
6726
6890
  },
6727
6891
  style
6728
6892
  ],
6729
- children: /* @__PURE__ */ jsx(View, { style: [styles$22.dividerLine, {
6893
+ children: /* @__PURE__ */ jsx(View, { style: [styles$24.dividerLine, {
6730
6894
  width: width * .9,
6731
6895
  backgroundColor: color
6732
6896
  }] })
6733
6897
  });
6734
6898
  });
6735
6899
  ThickDividerHorizontalIcon.displayName = "ThickDividerHorizontalIcon";
6736
- const styles$22 = StyleSheet.create({
6900
+ const styles$24 = StyleSheet.create({
6737
6901
  chevronContainer: {
6738
6902
  alignItems: "center",
6739
6903
  justifyContent: "center"
@@ -6887,10 +7051,11 @@ const SelectRoot = ({ defaultValue, value: controlledValue, onValueChange, open:
6887
7051
  };
6888
7052
  const SelectTrigger = ({ children, asChild = false }) => {
6889
7053
  const { onOpenChange, open, anchorRef, measureAnchor, disabled } = useSelect();
7054
+ const globalHaptics = useHaptics$1();
6890
7055
  const handlePress = () => {
6891
7056
  measureAnchor();
6892
7057
  onOpenChange(!open);
6893
- Vibration.vibrate(10);
7058
+ if (globalHaptics) triggerHaptic("press");
6894
7059
  };
6895
7060
  if (asChild && React.isValidElement(children)) {
6896
7061
  const child = children;
@@ -6943,7 +7108,7 @@ const SelectValue = ({ placeholder = "Select an option", style }) => {
6943
7108
  flexShrink: 1
6944
7109
  }, style || {}],
6945
7110
  children: selectedText || placeholder
6946
- }), /* @__PURE__ */ jsx(ChevronDownIcon$1, {
7111
+ }), /* @__PURE__ */ jsx(ChevronDownIcon, {
6947
7112
  color: selectedText ? variantColors.textColor : grayAlpha[9],
6948
7113
  width: sizeStyles(),
6949
7114
  height: sizeStyles(),
@@ -6967,7 +7132,7 @@ const SelectOverlay = ({ style }) => {
6967
7132
  const { onOpenChange } = useSelect();
6968
7133
  return /* @__PURE__ */ jsx(TouchableWithoutFeedback, {
6969
7134
  onPress: () => onOpenChange(false),
6970
- children: /* @__PURE__ */ jsx(View, { style: [styles$21.overlay, style] })
7135
+ children: /* @__PURE__ */ jsx(View, { style: [styles$23.overlay, style] })
6971
7136
  });
6972
7137
  };
6973
7138
  const SelectContent = ({ children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, avoidCollisions = true, size = 2, style }) => {
@@ -7052,7 +7217,7 @@ const SelectContent = ({ children, side = "bottom", sideOffset = 4, align = "sta
7052
7217
  ref: contentRef,
7053
7218
  onLayout: handleLayout,
7054
7219
  style: [
7055
- styles$21.content,
7220
+ styles$23.content,
7056
7221
  {
7057
7222
  backgroundColor: isDark ? colors[3] : colors[1],
7058
7223
  borderRadius: radii.medium,
@@ -7089,6 +7254,7 @@ const SelectItem = ({ children, value: itemValue, disabled = false, style }) =>
7089
7254
  const { value, onValueChange, colors, onOpenChange, size, registerItem, unregisterItem, setSelectedItemText, color } = useSelect();
7090
7255
  const theme = useTheme$1();
7091
7256
  const mode = useThemeMode$1();
7257
+ const globalHaptics = useHaptics$1();
7092
7258
  const isSelected = value === itemValue;
7093
7259
  const extractText = useCallback((node) => {
7094
7260
  if (typeof node === "string") return node;
@@ -7169,7 +7335,7 @@ const SelectItem = ({ children, value: itemValue, disabled = false, style }) =>
7169
7335
  if (!disabled) {
7170
7336
  setSelectedItemText(extractText(children));
7171
7337
  onValueChange(itemValue);
7172
- Vibration.vibrate(10);
7338
+ if (globalHaptics) triggerHaptic("press");
7173
7339
  }
7174
7340
  };
7175
7341
  const itemPadding = getItemPadding();
@@ -7184,8 +7350,8 @@ const SelectItem = ({ children, value: itemValue, disabled = false, style }) =>
7184
7350
  onPress: handlePress,
7185
7351
  disabled,
7186
7352
  style: [
7187
- styles$21.item,
7188
- disabled && styles$21.itemDisabled,
7353
+ styles$23.item,
7354
+ disabled && styles$23.itemDisabled,
7189
7355
  itemPadding,
7190
7356
  style,
7191
7357
  {
@@ -7249,7 +7415,7 @@ const SelectItem = ({ children, value: itemValue, disabled = false, style }) =>
7249
7415
  const SelectSeparator = ({ style }) => {
7250
7416
  const { colors } = useSelect();
7251
7417
  return /* @__PURE__ */ jsx(View, { style: [
7252
- styles$21.separator,
7418
+ styles$23.separator,
7253
7419
  { backgroundColor: colors[6] },
7254
7420
  style
7255
7421
  ] });
@@ -7293,7 +7459,7 @@ const SelectLabel = ({ children, style = {} }) => {
7293
7459
  children
7294
7460
  });
7295
7461
  };
7296
- const styles$21 = StyleSheet.create({
7462
+ const styles$23 = StyleSheet.create({
7297
7463
  overlay: {
7298
7464
  flex: 1,
7299
7465
  backgroundColor: "rgba(0, 0, 0, 0.01)"
@@ -7351,6 +7517,7 @@ const isRangeValue = (value) => {
7351
7517
  const Slider = React.forwardRef(({ value: controlledValue, defaultValue, onValueChange, onValueChangeEnd, min = 0, max = 100, step = 1, disabled = false, size = "2", variant = "solid", color, radius = "full", highContrast = false, minStepsBetweenThumbs = 0, label, showValueLabel = false, valueLabelFormatter = (v) => v.toString(), accessibilityLabel, accessibilityHint, style, hapticFeedback = true, ...rest }, ref) => {
7352
7518
  const theme = useTheme$1();
7353
7519
  const mode = useThemeMode$1();
7520
+ const globalHaptics = useHaptics$1();
7354
7521
  const isDark = mode === "dark";
7355
7522
  const grayScale = isDark ? theme.colors.gray.dark : theme.colors.gray;
7356
7523
  const grayAlpha = getGrayAlpha(theme);
@@ -7499,7 +7666,7 @@ const Slider = React.forwardRef(({ value: controlledValue, defaultValue, onValue
7499
7666
  const touchX = event.nativeEvent.locationX;
7500
7667
  const position = Math.max(0, Math.min(1, touchX / currentTrackLayout.width));
7501
7668
  const newValue = positionToValue(position);
7502
- if (hapticFeedback) Vibration.vibrate(10);
7669
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
7503
7670
  if (valuesRef.current.length === 1) {
7504
7671
  updateValue([newValue]);
7505
7672
  handleValueChangeEnd([newValue]);
@@ -7555,7 +7722,7 @@ const Slider = React.forwardRef(({ value: controlledValue, defaultValue, onValue
7555
7722
  const nearestIndex = getNearestThumbIndex(Math.max(0, Math.min(1, touchX / trackLayoutRef2.current.width)));
7556
7723
  setActiveThumbIndex(nearestIndex);
7557
7724
  activeThumbIndexRef.current = nearestIndex;
7558
- if (hapticFeedback) Vibration.vibrate(10);
7725
+ if (globalHaptics && hapticFeedback) triggerHaptic("selection");
7559
7726
  },
7560
7727
  onPanResponderMove: (_event, gestureState) => {
7561
7728
  if (activeThumbIndexRef.current !== null) handleDrag(gestureState, activeThumbIndexRef.current);
@@ -7564,13 +7731,13 @@ const Slider = React.forwardRef(({ value: controlledValue, defaultValue, onValue
7564
7731
  setActiveThumbIndex(null);
7565
7732
  activeThumbIndexRef.current = null;
7566
7733
  handleValueChangeEnd(valuesRef.current);
7567
- if (hapticFeedback) Vibration.vibrate(10);
7734
+ if (globalHaptics && hapticFeedback) triggerHaptic("selection");
7568
7735
  },
7569
7736
  onPanResponderTerminate: () => {
7570
7737
  setActiveThumbIndex(null);
7571
7738
  activeThumbIndexRef.current = null;
7572
7739
  handleValueChangeEnd(valuesRef.current);
7573
- if (hapticFeedback) Vibration.vibrate(10);
7740
+ if (globalHaptics && hapticFeedback) triggerHaptic("selection");
7574
7741
  },
7575
7742
  onPanResponderTerminationRequest: () => false
7576
7743
  })).current;
@@ -7716,7 +7883,7 @@ const Slider = React.forwardRef(({ value: controlledValue, defaultValue, onValue
7716
7883
  ]);
7717
7884
  return /* @__PURE__ */ jsxs(RnView, {
7718
7885
  ref,
7719
- style: [styles$20.container, style],
7886
+ style: [styles$22.container, style],
7720
7887
  accessibilityRole: "adjustable",
7721
7888
  accessibilityLabel: accessibilityLabel || label || "Slider",
7722
7889
  accessibilityHint: accessibilityHint || `Value: ${formatValueLabel()}, range: ${min} to ${max}`,
@@ -7724,17 +7891,17 @@ const Slider = React.forwardRef(({ value: controlledValue, defaultValue, onValue
7724
7891
  accessibilityState: { disabled },
7725
7892
  ...rest,
7726
7893
  children: [(label || showValueLabel) && /* @__PURE__ */ jsxs(RnView, {
7727
- style: styles$20.labelContainer,
7894
+ style: styles$22.labelContainer,
7728
7895
  children: [label && /* @__PURE__ */ jsx(TextComponent, {
7729
- style: [styles$20.label, labelStyle],
7896
+ style: [styles$22.label, labelStyle],
7730
7897
  children: label
7731
7898
  }), showValueLabel && /* @__PURE__ */ jsx(TextComponent, {
7732
- style: [styles$20.valueLabel, labelStyle],
7899
+ style: [styles$22.valueLabel, labelStyle],
7733
7900
  children: formatValueLabel()
7734
7901
  })]
7735
7902
  }), /* @__PURE__ */ jsxs(RnView, {
7736
7903
  ref: trackLayoutRef,
7737
- style: [styles$20.track, {
7904
+ style: [styles$22.track, {
7738
7905
  height: sizeValues.trackHeight,
7739
7906
  borderRadius,
7740
7907
  backgroundColor: trackBackgroundColor,
@@ -7747,15 +7914,15 @@ const Slider = React.forwardRef(({ value: controlledValue, defaultValue, onValue
7747
7914
  values.length === 1 && thumbAnimations[0] && /* @__PURE__ */ jsx(Animated.View, { style: getFilledTrackStyle(thumbAnimations[0], 0) }),
7748
7915
  values.length === 2 && thumbAnimations[0] && thumbAnimations[1] && /* @__PURE__ */ jsx(Animated.View, { style: getFilledTrackStyle(thumbAnimations[1], 1) }),
7749
7916
  thumbAnimations.slice(0, values.length).map((animatedValue, index) => /* @__PURE__ */ jsx(Animated.View, {
7750
- style: [styles$20.thumb, getThumbStyle(animatedValue)],
7751
- children: !disabled && /* @__PURE__ */ jsx(RnView, { style: [styles$20.thumbInner, thumbInnerStyle] })
7917
+ style: [styles$22.thumb, getThumbStyle(animatedValue)],
7918
+ children: !disabled && /* @__PURE__ */ jsx(RnView, { style: [styles$22.thumbInner, thumbInnerStyle] })
7752
7919
  }, index))
7753
7920
  ]
7754
7921
  })]
7755
7922
  });
7756
7923
  });
7757
7924
  Slider.displayName = "Slider";
7758
- const styles$20 = StyleSheet.create({
7925
+ const styles$22 = StyleSheet.create({
7759
7926
  container: { width: "100%" },
7760
7927
  labelContainer: {
7761
7928
  flexDirection: "row",
@@ -7835,7 +8002,7 @@ const DialogOverlay = ({ style }) => {
7835
8002
  const { grayAlpha } = useDialog();
7836
8003
  const overlayColor = useThemeMode$1() === "dark" ? "rgba(0, 0, 0, 0.6)" : "rgba(10, 10, 10, 0.6)";
7837
8004
  return /* @__PURE__ */ jsx(TouchableWithoutFeedback, { children: /* @__PURE__ */ jsx(View, { style: [
7838
- styles$19.overlay,
8005
+ styles$21.overlay,
7839
8006
  { backgroundColor: overlayColor },
7840
8007
  style
7841
8008
  ] }) });
@@ -7877,7 +8044,7 @@ const DialogContent = ({ children, style, hideCloseButton = false, size = 2 }) =
7877
8044
  const maxWidth = size <= 2 ? Math.min(screenWidth - 64, 400) : Math.min(screenWidth - 64, 500);
7878
8045
  return /* @__PURE__ */ jsxs(View, {
7879
8046
  style: [
7880
- styles$19.content,
8047
+ styles$21.content,
7881
8048
  {
7882
8049
  backgroundColor: isDark ? theme.colors.gray.dark[2] : "#ffffff",
7883
8050
  borderRadius: sizeStyles.radius,
@@ -7891,14 +8058,14 @@ const DialogContent = ({ children, style, hideCloseButton = false, size = 2 }) =
7891
8058
  style
7892
8059
  ],
7893
8060
  children: [/* @__PURE__ */ jsx(ScrollView, {
7894
- style: styles$19.scrollContent,
7895
- contentContainerStyle: styles$19.scrollContentContainer,
8061
+ style: styles$21.scrollContent,
8062
+ contentContainerStyle: styles$21.scrollContentContainer,
7896
8063
  showsVerticalScrollIndicator: true,
7897
8064
  bounces: true,
7898
8065
  children
7899
8066
  }), !hideCloseButton && /* @__PURE__ */ jsx(Pressable, {
7900
8067
  onPress: handleClose,
7901
- style: [styles$19.closeButton, { backgroundColor: isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.1)" }],
8068
+ style: [styles$21.closeButton, { backgroundColor: isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.1)" }],
7902
8069
  accessibilityRole: "button",
7903
8070
  accessibilityLabel: "Close dialog",
7904
8071
  children: /* @__PURE__ */ jsx(TextComponent, {
@@ -7983,7 +8150,7 @@ const DialogAction = ({ children, onPress, ...buttonProps }) => {
7983
8150
  children
7984
8151
  });
7985
8152
  };
7986
- const styles$19 = StyleSheet.create({
8153
+ const styles$21 = StyleSheet.create({
7987
8154
  overlay: {
7988
8155
  flex: 1,
7989
8156
  backgroundColor: "rgba(0, 0, 0, 0.5)"
@@ -8080,7 +8247,7 @@ const AlertDialogPortal = ({ children, hostId }) => {
8080
8247
  const AlertDialogOverlay = ({ style }) => {
8081
8248
  const overlayColor = useThemeMode$1() === "dark" ? "rgba(0, 0, 0, 0.6)" : "rgba(10, 10, 10, 0.6)";
8082
8249
  return /* @__PURE__ */ jsx(TouchableWithoutFeedback, { children: /* @__PURE__ */ jsx(View, { style: [
8083
- styles$18.overlay,
8250
+ styles$20.overlay,
8084
8251
  { backgroundColor: overlayColor },
8085
8252
  style
8086
8253
  ] }) });
@@ -8121,7 +8288,7 @@ const AlertDialogContent = ({ children, style, hideCloseButton = true, size = 2
8121
8288
  };
8122
8289
  return /* @__PURE__ */ jsxs(View, {
8123
8290
  style: [
8124
- styles$18.content,
8291
+ styles$20.content,
8125
8292
  {
8126
8293
  backgroundColor: isDark ? theme.colors.gray.dark[2] : theme.colors.gray[1],
8127
8294
  borderRadius: sizeStyles.radius,
@@ -8135,14 +8302,14 @@ const AlertDialogContent = ({ children, style, hideCloseButton = true, size = 2
8135
8302
  style
8136
8303
  ],
8137
8304
  children: [/* @__PURE__ */ jsx(ScrollView, {
8138
- style: styles$18.scrollContent,
8139
- contentContainerStyle: styles$18.scrollContentContainer,
8305
+ style: styles$20.scrollContent,
8306
+ contentContainerStyle: styles$20.scrollContentContainer,
8140
8307
  showsVerticalScrollIndicator: true,
8141
8308
  bounces: true,
8142
8309
  children
8143
8310
  }), !hideCloseButton && /* @__PURE__ */ jsx(Pressable, {
8144
8311
  onPress: handleClose,
8145
- style: [styles$18.closeButton, { backgroundColor: isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.1)" }],
8312
+ style: [styles$20.closeButton, { backgroundColor: isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.1)" }],
8146
8313
  accessibilityRole: "button",
8147
8314
  accessibilityLabel: "Close dialog",
8148
8315
  children: /* @__PURE__ */ jsx(TextComponent, {
@@ -8232,7 +8399,7 @@ const AlertDialog = ({ open, onOpenChange, title, description, cancel, action, c
8232
8399
  description && /* @__PURE__ */ jsx(AlertDialogDescription, { children: description }),
8233
8400
  children,
8234
8401
  /* @__PURE__ */ jsxs(View, {
8235
- style: styles$18.actionRow,
8402
+ style: styles$20.actionRow,
8236
8403
  children: [cancel && /* @__PURE__ */ jsx(AlertDialogCancel, {
8237
8404
  variant: "ghost",
8238
8405
  children: cancel.label || "Cancel"
@@ -8246,7 +8413,7 @@ const AlertDialog = ({ open, onOpenChange, title, description, cancel, action, c
8246
8413
  ] })] })
8247
8414
  });
8248
8415
  };
8249
- const styles$18 = StyleSheet.create({
8416
+ const styles$20 = StyleSheet.create({
8250
8417
  overlay: {
8251
8418
  flex: 1,
8252
8419
  backgroundColor: "rgba(0, 0, 0, 0.5)"
@@ -8440,7 +8607,7 @@ const PopoverOverlay = ({ style }) => {
8440
8607
  const { onOpenChange } = usePopover();
8441
8608
  return /* @__PURE__ */ jsx(TouchableWithoutFeedback, {
8442
8609
  onPress: () => onOpenChange(false),
8443
- children: /* @__PURE__ */ jsx(View, { style: [styles$17.overlay, style] })
8610
+ children: /* @__PURE__ */ jsx(View, { style: [styles$19.overlay, style] })
8444
8611
  });
8445
8612
  };
8446
8613
  const PopoverContent = ({ children, side = "bottom", sideOffset = 4, align = "center", alignOffset = 0, avoidCollisions = true, size = 2, style }) => {
@@ -8509,7 +8676,7 @@ const PopoverContent = ({ children, side = "bottom", sideOffset = 4, align = "ce
8509
8676
  ref: contentRef,
8510
8677
  onLayout: handleLayout,
8511
8678
  style: [
8512
- styles$17.content,
8679
+ styles$19.content,
8513
8680
  {
8514
8681
  backgroundColor: colors["1"] || grayAlpha["12"],
8515
8682
  borderRadius: radii.medium,
@@ -8575,7 +8742,7 @@ const PopoverClose = ({ children, ariaLabel = "Close popover" }) => {
8575
8742
  const { onOpenChange, colors } = usePopover();
8576
8743
  return /* @__PURE__ */ jsx(Pressable, {
8577
8744
  onPress: () => onOpenChange(false),
8578
- style: styles$17.closeButton,
8745
+ style: styles$19.closeButton,
8579
8746
  accessibilityLabel: ariaLabel,
8580
8747
  accessibilityRole: "button",
8581
8748
  children: children || /* @__PURE__ */ jsx(TextComponent, {
@@ -8587,7 +8754,7 @@ const PopoverClose = ({ children, ariaLabel = "Close popover" }) => {
8587
8754
  })
8588
8755
  });
8589
8756
  };
8590
- const styles$17 = StyleSheet.create({
8757
+ const styles$19 = StyleSheet.create({
8591
8758
  overlay: {
8592
8759
  flex: 1,
8593
8760
  backgroundColor: "rgba(0, 0, 0, 0.01)"
@@ -8748,7 +8915,7 @@ const TooltipPortal = ({ children }) => {
8748
8915
  children: /* @__PURE__ */ jsx(TouchableWithoutFeedback, {
8749
8916
  onPress: () => onOpenChange(false),
8750
8917
  children: /* @__PURE__ */ jsx(View, {
8751
- style: styles$16.overlay,
8918
+ style: styles$18.overlay,
8752
8919
  children
8753
8920
  })
8754
8921
  })
@@ -8809,7 +8976,7 @@ const TooltipContent = ({ children, side = "top", sideOffset = 8, align = "cente
8809
8976
  ref: contentRef,
8810
8977
  onLayout: handleLayout,
8811
8978
  style: [
8812
- styles$16.content,
8979
+ styles$18.content,
8813
8980
  {
8814
8981
  backgroundColor: tooltipBackground,
8815
8982
  borderRadius,
@@ -8835,15 +9002,15 @@ const TooltipContent = ({ children, side = "top", sideOffset = 8, align = "cente
8835
9002
  },
8836
9003
  children
8837
9004
  }), /* @__PURE__ */ jsx(View, { style: [
8838
- styles$16.arrow,
8839
- actualSide === "top" && [styles$16.arrowBottom, { borderTopColor: arrowColor }],
8840
- actualSide === "bottom" && [styles$16.arrowTop, { borderBottomColor: arrowColor }],
8841
- actualSide === "left" && [styles$16.arrowRight, {
9005
+ styles$18.arrow,
9006
+ actualSide === "top" && [styles$18.arrowBottom, { borderTopColor: arrowColor }],
9007
+ actualSide === "bottom" && [styles$18.arrowTop, { borderBottomColor: arrowColor }],
9008
+ actualSide === "left" && [styles$18.arrowRight, {
8842
9009
  borderLeftColor: arrowColor,
8843
9010
  borderTopColor: "transparent",
8844
9011
  borderBottomColor: "transparent"
8845
9012
  }],
8846
- actualSide === "right" && [styles$16.arrowLeft, {
9013
+ actualSide === "right" && [styles$18.arrowLeft, {
8847
9014
  borderRightColor: arrowColor,
8848
9015
  borderTopColor: "transparent",
8849
9016
  borderBottomColor: "transparent"
@@ -8882,7 +9049,7 @@ const Tooltip = ({ children, content, side = "top", sideOffset = 8, align = "cen
8882
9049
  }) })]
8883
9050
  });
8884
9051
  };
8885
- const styles$16 = StyleSheet.create({
9052
+ const styles$18 = StyleSheet.create({
8886
9053
  overlay: {
8887
9054
  flex: 1,
8888
9055
  backgroundColor: "rgba(0, 0, 0, 0.01)"
@@ -8993,10 +9160,11 @@ const DropdownMenuRoot = ({ children, open: controlledOpen, onOpenChange, defaul
8993
9160
  };
8994
9161
  const DropdownMenuTrigger = ({ children, asChild = false, hapticFeedback = true }) => {
8995
9162
  const { onOpenChange, open, anchorRef, measureAnchor } = useDropdownMenu();
9163
+ const globalHaptics = useHaptics$1();
8996
9164
  const handlePress = () => {
8997
9165
  measureAnchor();
8998
9166
  onOpenChange(!open);
8999
- if (hapticFeedback) Vibration.vibrate(10);
9167
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
9000
9168
  };
9001
9169
  if (asChild && React.isValidElement(children)) {
9002
9170
  const child = children;
@@ -9008,7 +9176,7 @@ const DropdownMenuTrigger = ({ children, asChild = false, hapticFeedback = true
9008
9176
  }
9009
9177
  });
9010
9178
  }
9011
- return /* @__PURE__ */ jsx(AnimatedPressable_default, {
9179
+ return /* @__PURE__ */ jsx(AnimatedPressable, {
9012
9180
  ref: anchorRef,
9013
9181
  onPress: handlePress,
9014
9182
  pressedScale: .98,
@@ -9018,18 +9186,6 @@ const DropdownMenuTrigger = ({ children, asChild = false, hapticFeedback = true
9018
9186
  children
9019
9187
  });
9020
9188
  };
9021
- /**
9022
- * Default down chevron icon for dropdown menu trigger
9023
- * Uses Unicode character for React Native compatibility
9024
- */
9025
- const ChevronDownIcon = ({ size, color }) => /* @__PURE__ */ jsx(TextComponent, {
9026
- style: {
9027
- fontSize: size || 16,
9028
- color: color || "currentColor",
9029
- lineHeight: size ? size + 2 : 18
9030
- },
9031
- children: "▾"
9032
- });
9033
9189
  const DropdownMenuTriggerIcon = ({ icon, variant = "ghost", color, size = 2, disabled, accessibilityLabel = "Open menu", highContrast, style }) => {
9034
9190
  const { onOpenChange, open, anchorRef, measureAnchor } = useDropdownMenu();
9035
9191
  const handlePress = () => {
@@ -9065,7 +9221,7 @@ const DropdownMenuOverlay = ({ style }) => {
9065
9221
  const { onOpenChange } = useDropdownMenu();
9066
9222
  return /* @__PURE__ */ jsx(TouchableWithoutFeedback, {
9067
9223
  onPress: () => onOpenChange(false),
9068
- children: /* @__PURE__ */ jsx(View, { style: [styles$15.overlay, style] })
9224
+ children: /* @__PURE__ */ jsx(View, { style: [styles$17.overlay, style] })
9069
9225
  });
9070
9226
  };
9071
9227
  const DropdownMenuContent = ({ children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, avoidCollisions = true, size = 2, style }) => {
@@ -9149,7 +9305,7 @@ const DropdownMenuContent = ({ children, side = "bottom", sideOffset = 4, align
9149
9305
  ref: contentRef,
9150
9306
  onLayout: handleLayout,
9151
9307
  style: [
9152
- styles$15.content,
9308
+ styles$17.content,
9153
9309
  {
9154
9310
  backgroundColor: colors[1],
9155
9311
  borderRadius: radii.medium,
@@ -9180,6 +9336,7 @@ const DropdownMenuGroup = ({ children }) => {
9180
9336
  };
9181
9337
  const DropdownMenuItem = ({ children, color, onSelect, disabled = false, shortcut, style, hapticFeedback = true }) => {
9182
9338
  const { colors, onOpenChange, size } = useDropdownMenu();
9339
+ const globalHaptics = useHaptics$1();
9183
9340
  const theme = useTheme$1();
9184
9341
  const mode = useThemeMode$1();
9185
9342
  const activeColor = color || theme.accentColor;
@@ -9224,17 +9381,17 @@ const DropdownMenuItem = ({ children, color, onSelect, disabled = false, shortcu
9224
9381
  if (!disabled) {
9225
9382
  onSelect?.();
9226
9383
  onOpenChange(false);
9227
- if (hapticFeedback) Vibration.vibrate(10);
9384
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
9228
9385
  }
9229
9386
  };
9230
9387
  const itemPadding = getItemPadding();
9231
9388
  const fontSize = getFontSize();
9232
- return /* @__PURE__ */ jsxs(AnimatedPressable_default, {
9389
+ return /* @__PURE__ */ jsxs(AnimatedPressable, {
9233
9390
  onPress: handlePress,
9234
9391
  disabled,
9235
9392
  style: [
9236
- styles$15.item,
9237
- disabled && styles$15.itemDisabled,
9393
+ styles$17.item,
9394
+ disabled && styles$17.itemDisabled,
9238
9395
  { backgroundColor: disabled ? "transparent" : "transparent" },
9239
9396
  itemPadding,
9240
9397
  style
@@ -9264,7 +9421,7 @@ const DropdownMenuItem = ({ children, color, onSelect, disabled = false, shortcu
9264
9421
  const DropdownMenuSeparator = ({ style }) => {
9265
9422
  const { colors } = useDropdownMenu();
9266
9423
  return /* @__PURE__ */ jsx(View, { style: [
9267
- styles$15.separator,
9424
+ styles$17.separator,
9268
9425
  { backgroundColor: colors[6] },
9269
9426
  style
9270
9427
  ] });
@@ -9337,7 +9494,7 @@ const DropdownMenuCheckboxItem = ({ children, checked, onCheckedChange, disabled
9337
9494
  alignItems: "center"
9338
9495
  },
9339
9496
  children: [/* @__PURE__ */ jsx(View, {
9340
- style: [styles$15.checkbox, {
9497
+ style: [styles$17.checkbox, {
9341
9498
  width: checkboxSize,
9342
9499
  height: checkboxSize,
9343
9500
  borderColor: colors[9],
@@ -9364,6 +9521,7 @@ const DropdownMenuCheckboxItem = ({ children, checked, onCheckedChange, disabled
9364
9521
  };
9365
9522
  const DropdownMenuRadioItem = ({ children, value, checked, onCheckedChange, disabled = false, hapticFeedback = true }) => {
9366
9523
  const { colors, size } = useDropdownMenu();
9524
+ const globalHaptics = useHaptics$1();
9367
9525
  const theme = useTheme$1();
9368
9526
  const getFontSize = useCallback(() => {
9369
9527
  switch (size) {
@@ -9384,7 +9542,7 @@ const DropdownMenuRadioItem = ({ children, value, checked, onCheckedChange, disa
9384
9542
  const handlePress = () => {
9385
9543
  if (!disabled) {
9386
9544
  onCheckedChange(value);
9387
- if (hapticFeedback) Vibration.vibrate(10);
9545
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
9388
9546
  }
9389
9547
  };
9390
9548
  const itemPadding = useCallback(() => {
@@ -9403,12 +9561,12 @@ const DropdownMenuRadioItem = ({ children, value, checked, onCheckedChange, disa
9403
9561
  };
9404
9562
  }
9405
9563
  }, [size, theme.space])();
9406
- return /* @__PURE__ */ jsx(AnimatedPressable_default, {
9564
+ return /* @__PURE__ */ jsx(AnimatedPressable, {
9407
9565
  onPress: handlePress,
9408
9566
  disabled,
9409
9567
  style: [
9410
- styles$15.item,
9411
- disabled && styles$15.itemDisabled,
9568
+ styles$17.item,
9569
+ disabled && styles$17.itemDisabled,
9412
9570
  itemPadding
9413
9571
  ],
9414
9572
  accessibilityRole: "menuitem",
@@ -9427,7 +9585,7 @@ const DropdownMenuRadioItem = ({ children, value, checked, onCheckedChange, disa
9427
9585
  flex: 1
9428
9586
  },
9429
9587
  children: [/* @__PURE__ */ jsx(View, {
9430
- style: [styles$15.radio, {
9588
+ style: [styles$17.radio, {
9431
9589
  width: radioSize,
9432
9590
  height: radioSize,
9433
9591
  borderRadius: radioSize / 2,
@@ -9456,6 +9614,7 @@ const DropdownMenuSub = ({ children }) => {
9456
9614
  };
9457
9615
  const DropdownMenuSubTrigger = ({ children, hapticFeedback = true }) => {
9458
9616
  const { colors, openSubmenu, onOpenSubmenu, size } = useDropdownMenu();
9617
+ const globalHaptics = useHaptics$1();
9459
9618
  const theme = useTheme$1();
9460
9619
  const submenuId = "submenu";
9461
9620
  const getFontSize = useCallback(() => {
@@ -9483,13 +9642,13 @@ const DropdownMenuSubTrigger = ({ children, hapticFeedback = true }) => {
9483
9642
  }, [size, theme.space]);
9484
9643
  const handlePress = () => {
9485
9644
  onOpenSubmenu(openSubmenu === submenuId ? null : submenuId);
9486
- if (hapticFeedback) Vibration.vibrate(10);
9645
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
9487
9646
  };
9488
9647
  const itemPadding = getItemPadding();
9489
9648
  const fontSize = getFontSize();
9490
- return /* @__PURE__ */ jsxs(AnimatedPressable_default, {
9649
+ return /* @__PURE__ */ jsxs(AnimatedPressable, {
9491
9650
  onPress: handlePress,
9492
- style: [styles$15.item, itemPadding],
9651
+ style: [styles$17.item, itemPadding],
9493
9652
  pressedScale: .98,
9494
9653
  pressedOpacity: .95,
9495
9654
  animationDuration: 100,
@@ -9530,7 +9689,7 @@ const DropdownMenuSubContent = ({ children }) => {
9530
9689
  }
9531
9690
  }, [size, theme.space])();
9532
9691
  return /* @__PURE__ */ jsx(View, {
9533
- style: [styles$15.content, {
9692
+ style: [styles$17.content, {
9534
9693
  backgroundColor: colors[1],
9535
9694
  borderRadius: radii.medium,
9536
9695
  borderWidth: 1,
@@ -9545,7 +9704,7 @@ const DropdownMenuSubContent = ({ children }) => {
9545
9704
  children
9546
9705
  });
9547
9706
  };
9548
- const styles$15 = StyleSheet.create({
9707
+ const styles$17 = StyleSheet.create({
9549
9708
  overlay: {
9550
9709
  flex: 1,
9551
9710
  backgroundColor: "rgba(0, 0, 0, 0.01)"
@@ -9639,6 +9798,7 @@ const ContextMenuRoot = ({ children, open: controlledOpen, onOpenChange, default
9639
9798
  };
9640
9799
  const ContextMenuTrigger = ({ children, onLongPress, asChild = false, hapticFeedback = true }) => {
9641
9800
  const { setPosition, onOpenChange } = useContextMenuContext();
9801
+ const globalHaptics = useHaptics$1();
9642
9802
  const handleLongPress = (event) => {
9643
9803
  const { pageX, pageY } = event.nativeEvent;
9644
9804
  setPosition({
@@ -9647,7 +9807,7 @@ const ContextMenuTrigger = ({ children, onLongPress, asChild = false, hapticFeed
9647
9807
  });
9648
9808
  onOpenChange(true);
9649
9809
  onLongPress?.(event);
9650
- if (hapticFeedback) Vibration.vibrate(10);
9810
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
9651
9811
  };
9652
9812
  if (asChild && React.isValidElement(children)) {
9653
9813
  const child = children;
@@ -9656,7 +9816,7 @@ const ContextMenuTrigger = ({ children, onLongPress, asChild = false, hapticFeed
9656
9816
  handleLongPress(e);
9657
9817
  } });
9658
9818
  }
9659
- return /* @__PURE__ */ jsx(AnimatedPressable_default, {
9819
+ return /* @__PURE__ */ jsx(AnimatedPressable, {
9660
9820
  onLongPress: handleLongPress,
9661
9821
  pressedScale: .98,
9662
9822
  pressedOpacity: .95,
@@ -9681,7 +9841,7 @@ const ContextMenuOverlay = ({ style }) => {
9681
9841
  const { onOpenChange } = useContextMenuContext();
9682
9842
  return /* @__PURE__ */ jsx(TouchableWithoutFeedback, {
9683
9843
  onPress: () => onOpenChange(false),
9684
- children: /* @__PURE__ */ jsx(View, { style: [styles$14.overlay, style] })
9844
+ children: /* @__PURE__ */ jsx(View, { style: [styles$16.overlay, style] })
9685
9845
  });
9686
9846
  };
9687
9847
  /**
@@ -9718,6 +9878,7 @@ const getSizeStyles$2 = (size, theme) => {
9718
9878
  const ContextMenuContent = ({ children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, avoidCollisions = true, size = 2, style }) => {
9719
9879
  const { colors, radii, position } = useContextMenuContext();
9720
9880
  const theme = useTheme$1();
9881
+ const mode = useThemeMode$1();
9721
9882
  const contentRef = useRef(null);
9722
9883
  const [contentSize, setContentSize] = useState({
9723
9884
  width: 0,
@@ -9763,12 +9924,11 @@ const ContextMenuContent = ({ children, side = "bottom", sideOffset = 4, align =
9763
9924
  ref: contentRef,
9764
9925
  onLayout: handleLayout,
9765
9926
  style: [
9766
- styles$14.content,
9927
+ styles$16.content,
9767
9928
  {
9768
- backgroundColor: colors[1],
9769
- borderRadius: radii.medium,
9770
- borderWidth: 1,
9771
- borderColor: colors[6],
9929
+ backgroundColor: mode === "dark" ? colors[3] : colors[1],
9930
+ borderRadius: theme.radii[theme.radius] || radii.medium,
9931
+ borderColor: colors[2],
9772
9932
  paddingVertical: sizeStyles.paddingVertical,
9773
9933
  paddingHorizontal: sizeStyles.paddingHorizontal,
9774
9934
  minWidth: sizeStyles.minWidth,
@@ -9798,11 +9958,12 @@ const ContextMenuGroup = ({ children }) => {
9798
9958
  const ContextMenuItem = ({ children, color, onSelect, disabled = false, destructive = false, icon, shortcut, style, hapticFeedback = true }) => {
9799
9959
  const { colors, onOpenChange, size } = useContextMenuContext();
9800
9960
  const theme = useTheme$1();
9961
+ const globalHaptics = useHaptics$1();
9801
9962
  const handlePress = () => {
9802
9963
  if (!disabled) {
9803
9964
  onSelect?.();
9804
9965
  onOpenChange(false);
9805
- if (hapticFeedback) Vibration.vibrate(10);
9966
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
9806
9967
  }
9807
9968
  };
9808
9969
  const getFontSize = useCallback(() => {
@@ -9837,12 +9998,12 @@ const ContextMenuItem = ({ children, color, onSelect, disabled = false, destruct
9837
9998
  const itemPadding = getItemPadding();
9838
9999
  const destructiveColor = theme.colors.red[11];
9839
10000
  const textColor = disabled ? colors[8] : destructive ? destructiveColor : colors[12];
9840
- return /* @__PURE__ */ jsxs(AnimatedPressable_default, {
10001
+ return /* @__PURE__ */ jsxs(AnimatedPressable, {
9841
10002
  onPress: handlePress,
9842
10003
  disabled,
9843
10004
  style: [
9844
- styles$14.item,
9845
- disabled && styles$14.itemDisabled,
10005
+ styles$16.item,
10006
+ disabled && styles$16.itemDisabled,
9846
10007
  itemPadding,
9847
10008
  style
9848
10009
  ],
@@ -9878,7 +10039,7 @@ const ContextMenuItem = ({ children, color, onSelect, disabled = false, destruct
9878
10039
  const ContextMenuSeparator = ({ style }) => {
9879
10040
  const { colors } = useContextMenuContext();
9880
10041
  return /* @__PURE__ */ jsx(View, { style: [
9881
- styles$14.separator,
10042
+ styles$16.separator,
9882
10043
  { backgroundColor: colors[6] },
9883
10044
  style
9884
10045
  ] });
@@ -9952,7 +10113,7 @@ const ContextMenuCheckboxItem = ({ children, checked, onCheckedChange, disabled
9952
10113
  flex: 1
9953
10114
  },
9954
10115
  children: [/* @__PURE__ */ jsx(View, {
9955
- style: [styles$14.checkbox, {
10116
+ style: [styles$16.checkbox, {
9956
10117
  width: checkboxSize,
9957
10118
  height: checkboxSize,
9958
10119
  borderColor: colors[9],
@@ -9977,9 +10138,10 @@ const ContextMenuCheckboxItem = ({ children, checked, onCheckedChange, disabled
9977
10138
  })
9978
10139
  });
9979
10140
  };
9980
- const ContextMenuRadioItem = ({ children, value, checked, onCheckedChange, disabled = false }) => {
10141
+ const ContextMenuRadioItem = ({ children, value, checked, onCheckedChange, disabled = false, hapticFeedback = true }) => {
9981
10142
  const { colors, size } = useContextMenuContext();
9982
10143
  const theme = useTheme$1();
10144
+ const globalHaptics = useHaptics$1();
9983
10145
  const getFontSize = useCallback(() => {
9984
10146
  switch (size) {
9985
10147
  case 1: return theme.typography.fontSizes[1].fontSize;
@@ -9999,7 +10161,7 @@ const ContextMenuRadioItem = ({ children, value, checked, onCheckedChange, disab
9999
10161
  const handlePress = () => {
10000
10162
  if (!disabled) {
10001
10163
  onCheckedChange(value);
10002
- Vibration.vibrate(10);
10164
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
10003
10165
  }
10004
10166
  };
10005
10167
  const itemPadding = useCallback(() => {
@@ -10018,12 +10180,12 @@ const ContextMenuRadioItem = ({ children, value, checked, onCheckedChange, disab
10018
10180
  };
10019
10181
  }
10020
10182
  }, [size, theme.space])();
10021
- return /* @__PURE__ */ jsx(AnimatedPressable_default, {
10183
+ return /* @__PURE__ */ jsx(AnimatedPressable, {
10022
10184
  onPress: handlePress,
10023
10185
  disabled,
10024
10186
  style: [
10025
- styles$14.item,
10026
- disabled && styles$14.itemDisabled,
10187
+ styles$16.item,
10188
+ disabled && styles$16.itemDisabled,
10027
10189
  itemPadding
10028
10190
  ],
10029
10191
  accessibilityRole: "menuitem",
@@ -10042,7 +10204,7 @@ const ContextMenuRadioItem = ({ children, value, checked, onCheckedChange, disab
10042
10204
  flex: 1
10043
10205
  },
10044
10206
  children: [/* @__PURE__ */ jsx(View, {
10045
- style: [styles$14.radio, {
10207
+ style: [styles$16.radio, {
10046
10208
  width: radioSize,
10047
10209
  height: radioSize,
10048
10210
  borderRadius: radioSize / 2,
@@ -10066,7 +10228,7 @@ const ContextMenuRadioItem = ({ children, value, checked, onCheckedChange, disab
10066
10228
  })
10067
10229
  });
10068
10230
  };
10069
- const styles$14 = StyleSheet.create({
10231
+ const styles$16 = StyleSheet.create({
10070
10232
  overlay: {
10071
10233
  flex: 1,
10072
10234
  backgroundColor: "rgba(0, 0, 0, 0.01)"
@@ -10231,7 +10393,7 @@ const BottomSheetRoot = ({ children, open: controlledOpen, onOpenChange, snapPoi
10231
10393
  },
10232
10394
  onPanResponderRelease: (_, gestureState) => {
10233
10395
  if (gestureState.dy > 100 || gestureState.vy > 500 / 1e3) {
10234
- Vibration.vibrate(10);
10396
+ if (globalHaptics) triggerHaptic("selection");
10235
10397
  Animated.timing(translateY, {
10236
10398
  toValue: targetSnapHeight,
10237
10399
  duration: 200,
@@ -10263,7 +10425,9 @@ const BottomSheetRoot = ({ children, open: controlledOpen, onOpenChange, snapPoi
10263
10425
  }
10264
10426
  }, [open]);
10265
10427
  const theme = useTheme$1();
10266
- const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
10428
+ const mode = useThemeMode$1();
10429
+ const globalHaptics = useHaptics$1();
10430
+ const colors = mode === "dark" ? theme.colors.gray.dark : theme.colors.gray;
10267
10431
  const grayAlpha = getGrayAlpha(theme);
10268
10432
  const radii = theme.radii;
10269
10433
  return /* @__PURE__ */ jsx(BottomSheetContext.Provider, {
@@ -10287,15 +10451,16 @@ const BottomSheetRoot = ({ children, open: controlledOpen, onOpenChange, snapPoi
10287
10451
  };
10288
10452
  const BottomSheetTrigger = ({ children, asChild = true, hapticFeedback = false }) => {
10289
10453
  const { onOpenChange, open } = useBottomSheet();
10454
+ const globalHaptics = useHaptics$1();
10290
10455
  const handlePress = () => {
10291
10456
  onOpenChange(true);
10292
- if (hapticFeedback) Vibration.vibrate(10);
10457
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
10293
10458
  };
10294
10459
  if (asChild && React.isValidElement(children)) return React.cloneElement(children, { onPress: (e) => {
10295
10460
  children.props?.onPress?.(e);
10296
10461
  handlePress();
10297
10462
  } });
10298
- return /* @__PURE__ */ jsx(AnimatedPressable_default, {
10463
+ return /* @__PURE__ */ jsx(AnimatedPressable, {
10299
10464
  onPress: handlePress,
10300
10465
  pressedScale: .98,
10301
10466
  pressedOpacity: .95,
@@ -10317,15 +10482,17 @@ const BottomSheetPortal = ({ children, hostId }) => {
10317
10482
  };
10318
10483
  const BottomSheetOverlay = ({ style, hapticFeedback = true }) => {
10319
10484
  const { onOpenChange } = useBottomSheet();
10320
- const overlayColor = useThemeMode$1() === "dark" ? "rgba(0, 0, 0, 0.6)" : "rgba(10, 10, 10, 0.6)";
10485
+ const mode = useThemeMode$1();
10486
+ const globalHaptics = useHaptics$1();
10487
+ const overlayColor = mode === "dark" ? "rgba(0, 0, 0, 0.6)" : "rgba(10, 10, 10, 0.6)";
10321
10488
  const handlePress = () => {
10322
10489
  onOpenChange(false);
10323
- if (hapticFeedback) Vibration.vibrate(10);
10490
+ if (globalHaptics && hapticFeedback) triggerHaptic("selection");
10324
10491
  };
10325
10492
  return /* @__PURE__ */ jsx(TouchableWithoutFeedback, {
10326
10493
  onPress: handlePress,
10327
10494
  children: /* @__PURE__ */ jsx(View, { style: [
10328
- styles$13.overlay,
10495
+ styles$15.overlay,
10329
10496
  { backgroundColor: overlayColor },
10330
10497
  style
10331
10498
  ] })
@@ -10336,10 +10503,10 @@ const BottomSheetHandle = ({ style }) => {
10336
10503
  const theme = useTheme$1();
10337
10504
  const handleColor = useThemeMode$1() === "dark" ? theme.colors.gray.dark[8] : theme.colors.gray[8];
10338
10505
  return /* @__PURE__ */ jsx(Pressable, {
10339
- style: styles$13.handleContainer,
10506
+ style: styles$15.handleContainer,
10340
10507
  ...panHandlers,
10341
10508
  children: /* @__PURE__ */ jsx(View, { style: [
10342
- styles$13.handle,
10509
+ styles$15.handle,
10343
10510
  { backgroundColor: handleColor },
10344
10511
  style
10345
10512
  ] })
@@ -10349,7 +10516,9 @@ const BottomSheetContent = ({ children, style, snapPoints: localSnapPoints, size
10349
10516
  const { radii, snapPoints: contextSnapPoints, currentSnapIndex, translateY, snapHeights, panHandlers } = useBottomSheet();
10350
10517
  const theme = useTheme$1();
10351
10518
  const isDark = useThemeMode$1() === "dark";
10519
+ const effectiveSnapPoints = localSnapPoints || contextSnapPoints;
10352
10520
  const targetSnapHeight = snapHeights[currentSnapIndex] || snapHeights[0];
10521
+ const maxTargetSnapHeight = snapHeights[effectiveSnapPoints.length - 1] || snapHeights[0];
10353
10522
  const sizeStyles = getSizeStyles$1(size, theme.space, radii);
10354
10523
  const shadow = getShadow(6, isDark);
10355
10524
  const backgroundColor = isDark ? theme.colors.gray.dark[2] : "#ffffff";
@@ -10357,27 +10526,22 @@ const BottomSheetContent = ({ children, style, snapPoints: localSnapPoints, size
10357
10526
  const borderTopRightRadius = radii.large;
10358
10527
  return /* @__PURE__ */ jsxs(Animated.View, {
10359
10528
  style: [
10360
- styles$13.content,
10529
+ styles$15.content,
10361
10530
  {
10362
10531
  backgroundColor,
10363
10532
  borderTopLeftRadius,
10364
10533
  borderTopRightRadius,
10365
10534
  flex: 1,
10366
10535
  paddingHorizontal: sizeStyles.paddingHorizontal,
10367
- height: targetSnapHeight,
10536
+ minHeight: targetSnapHeight,
10537
+ maxHeight: maxTargetSnapHeight,
10368
10538
  transform: [{ translateY }],
10369
10539
  ...shadow || {}
10370
10540
  },
10371
10541
  style
10372
10542
  ],
10373
10543
  ...panHandlers,
10374
- children: [!hideHandle && /* @__PURE__ */ jsx(BottomSheetHandle, {}), /* @__PURE__ */ jsx(ScrollView, {
10375
- style: styles$13.scrollContent,
10376
- contentContainerStyle: styles$13.scrollContentContainer,
10377
- showsVerticalScrollIndicator: true,
10378
- bounces: true,
10379
- children
10380
- })]
10544
+ children: [!hideHandle && /* @__PURE__ */ jsx(BottomSheetHandle, {}), children]
10381
10545
  });
10382
10546
  };
10383
10547
  const BottomSheetTitle = ({ children, style = {}, size = 4, weight = "bold", align, color, truncate, numberOfLines, fontFamily, opacity, asChild = false, ...rest }) => {
@@ -10427,7 +10591,7 @@ const BottomSheetFooter = ({ children, style, withBorder = true, withPadding = t
10427
10591
  const borderColor = useThemeMode$1() === "dark" ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.1)";
10428
10592
  return /* @__PURE__ */ jsx(View, {
10429
10593
  style: [
10430
- styles$13.footer,
10594
+ styles$15.footer,
10431
10595
  withBorder && {
10432
10596
  borderTopWidth: 1,
10433
10597
  borderTopColor: borderColor
@@ -10439,16 +10603,17 @@ const BottomSheetFooter = ({ children, style, withBorder = true, withPadding = t
10439
10603
  style
10440
10604
  ],
10441
10605
  children: /* @__PURE__ */ jsx(View, {
10442
- style: styles$13.footerContent,
10606
+ style: styles$15.footerContent,
10443
10607
  children
10444
10608
  })
10445
10609
  });
10446
10610
  };
10447
10611
  const BottomSheetClose = ({ children, asChild = true, hapticFeedback = false, ...buttonProps }) => {
10448
10612
  const { onOpenChange } = useBottomSheet();
10613
+ const globalHaptics = useHaptics$1();
10449
10614
  const handlePress = () => {
10450
10615
  onOpenChange(false);
10451
- if (hapticFeedback) Vibration.vibrate(10);
10616
+ if (globalHaptics && hapticFeedback) triggerHaptic("selection");
10452
10617
  };
10453
10618
  if (asChild && children && React.isValidElement(children)) return React.cloneElement(children, { onPress: (e) => {
10454
10619
  children.props?.onPress?.(e);
@@ -10463,10 +10628,11 @@ const BottomSheetClose = ({ children, asChild = true, hapticFeedback = false, ..
10463
10628
  };
10464
10629
  const BottomSheetAction = ({ children, onPress, hapticFeedback = true, ...buttonProps }) => {
10465
10630
  const { onOpenChange } = useBottomSheet();
10631
+ const globalHaptics = useHaptics$1();
10466
10632
  const handlePress = () => {
10467
10633
  onPress?.();
10468
10634
  onOpenChange(false);
10469
- if (hapticFeedback) Vibration.vibrate(10);
10635
+ if (globalHaptics && hapticFeedback) triggerHaptic("selection");
10470
10636
  };
10471
10637
  return /* @__PURE__ */ jsx(Button, {
10472
10638
  ...buttonProps,
@@ -10474,7 +10640,7 @@ const BottomSheetAction = ({ children, onPress, hapticFeedback = true, ...button
10474
10640
  children
10475
10641
  });
10476
10642
  };
10477
- const styles$13 = StyleSheet.create({
10643
+ const styles$15 = StyleSheet.create({
10478
10644
  overlay: {
10479
10645
  flex: 1,
10480
10646
  backgroundColor: "rgba(0, 0, 0, 0.5)"
@@ -10484,7 +10650,8 @@ const styles$13 = StyleSheet.create({
10484
10650
  left: 0,
10485
10651
  right: 0,
10486
10652
  bottom: 0,
10487
- elevation: 4
10653
+ elevation: 4,
10654
+ paddingBottom: 16
10488
10655
  },
10489
10656
  handleContainer: {
10490
10657
  alignItems: "center",
@@ -10503,8 +10670,7 @@ const styles$13 = StyleSheet.create({
10503
10670
  footer: {
10504
10671
  flexDirection: "row",
10505
10672
  justifyContent: "flex-end",
10506
- alignItems: "center",
10507
- marginTop: 8
10673
+ alignItems: "center"
10508
10674
  },
10509
10675
  footerContent: {
10510
10676
  flexDirection: "row",
@@ -10526,49 +10692,617 @@ const BottomSheet = {
10526
10692
  };
10527
10693
 
10528
10694
  //#endregion
10529
- //#region src/components/data-display/Avatar.tsx
10530
- const Avatar = React.forwardRef(({ src, alt = "Avatar", color, variant = "solid", highContrast, radius, size = 2, fallback, fallbackBehavior = "character", style, accessibilityLabel, children }, ref) => {
10531
- const theme = useTheme$1();
10532
- const mode = useThemeMode$1();
10533
- const isDark = mode === "dark";
10534
- const grayScale = isDark ? theme.colors.gray.dark : theme.colors.gray;
10535
- const grayAlpha = getGrayAlpha(theme);
10536
- const activeColor = color || theme.accentColor;
10537
- const radii = theme.radii[radius] ?? theme.radii.medium;
10538
- const selectedRadius = radius || theme.radius;
10539
- const [imageError, setImageError] = useState(false);
10540
- const variantColors = useMemo(() => getVariantColors(theme, activeColor, mode, variant, highContrast), [
10541
- getVariantColors,
10542
- color,
10543
- variant,
10544
- highContrast,
10545
- isDark,
10546
- theme
10547
- ]);
10548
- const getSizeValues = () => {
10549
- switch (size) {
10550
- case 1: return {
10551
- size: 24,
10552
- fontSize: 10,
10553
- borderWidth: 0,
10554
- borderRadius: selectedRadius === "full" ? 9999 : radii
10555
- };
10556
- case 2: return {
10557
- size: 32,
10558
- fontSize: 12,
10559
- borderWidth: 0,
10560
- borderRadius: selectedRadius === "full" ? 9999 : radii
10561
- };
10562
- case 3: return {
10563
- size: 48,
10564
- fontSize: 18,
10565
- borderWidth: 0,
10566
- borderRadius: selectedRadius === "full" ? 9999 : radii
10567
- };
10568
- case 4: return {
10569
- size: 64,
10570
- fontSize: 24,
10571
- borderWidth: 0,
10695
+ //#region src/components/overlays/Sidebar.tsx
10696
+ const SidebarContext = createContext(null);
10697
+ const useSidebar = () => {
10698
+ const context = useContext(SidebarContext);
10699
+ if (!context) throw new Error("Sidebar components must be used within a Sidebar.Root");
10700
+ return context;
10701
+ };
10702
+ const { width: SCREEN_WIDTH } = Dimensions.get("window");
10703
+ const SidebarRoot = ({ children, open: controlledOpen, onOpenChange, side = "left", variant = "overlay", width = 280, animationDuration = 300 }) => {
10704
+ const [internalOpen, setInternalOpen] = useState(false);
10705
+ const open = controlledOpen !== void 0 ? controlledOpen : internalOpen;
10706
+ const initialTranslateX = side === "left" ? -width : width;
10707
+ const translateX = useRef(new Animated.Value(open ? 0 : initialTranslateX)).current;
10708
+ const mainTranslateX = useRef(new Animated.Value(0)).current;
10709
+ const skipAnimationRef = useRef(false);
10710
+ const swipeDistance = useRef(0);
10711
+ const isSwiping = useRef(false);
10712
+ const startX = useRef(0);
10713
+ const handleOpenChange = useCallback((newOpen, skipAnimation = false) => {
10714
+ skipAnimationRef.current = skipAnimation;
10715
+ if (controlledOpen === void 0) setInternalOpen(newOpen);
10716
+ onOpenChange?.(newOpen);
10717
+ }, [controlledOpen, onOpenChange]);
10718
+ const panResponder = useMemo(() => {
10719
+ return PanResponder.create({
10720
+ onStartShouldSetPanResponder: () => false,
10721
+ onMoveShouldSetPanResponder: (_, gestureState) => {
10722
+ return Math.abs(gestureState.dx) > 10 && Math.abs(gestureState.dx) > Math.abs(gestureState.dy);
10723
+ },
10724
+ onPanResponderGrant: () => {
10725
+ startX.current = 0;
10726
+ isSwiping.current = true;
10727
+ },
10728
+ onPanResponderMove: (_, gestureState) => {
10729
+ isSwiping.current = true;
10730
+ swipeDistance.current = gestureState.dx;
10731
+ if (side === "left") {
10732
+ const newTranslateX = initialTranslateX + gestureState.dx;
10733
+ const clampedValue = Math.max(-width, Math.min(0, newTranslateX));
10734
+ translateX.setValue(clampedValue);
10735
+ } else {
10736
+ const newTranslateX = initialTranslateX + gestureState.dx;
10737
+ const clampedValue = Math.max(0, Math.min(width, newTranslateX));
10738
+ translateX.setValue(clampedValue);
10739
+ }
10740
+ },
10741
+ onPanResponderRelease: (_, gestureState) => {
10742
+ const threshold = width * .25;
10743
+ const velocityThreshold = 500;
10744
+ if (side === "left") if (gestureState.dx > threshold || gestureState.vx > velocityThreshold / 1e3) Animated.timing(translateX, {
10745
+ toValue: 0,
10746
+ duration: animationDuration,
10747
+ useNativeDriver: true
10748
+ }).start();
10749
+ else if (gestureState.dx < -threshold || gestureState.vx < -velocityThreshold / 1e3) {
10750
+ if (globalHaptics) triggerHaptic("selection");
10751
+ Animated.timing(translateX, {
10752
+ toValue: -width,
10753
+ duration: animationDuration,
10754
+ useNativeDriver: true
10755
+ }).start();
10756
+ } else Animated.spring(translateX, {
10757
+ toValue: open ? 0 : -width,
10758
+ tension: 65,
10759
+ friction: 11,
10760
+ useNativeDriver: true
10761
+ }).start();
10762
+ else if (gestureState.dx < -threshold || gestureState.vx < -velocityThreshold / 1e3) Animated.timing(translateX, {
10763
+ toValue: 0,
10764
+ duration: animationDuration,
10765
+ useNativeDriver: true
10766
+ }).start();
10767
+ else if (gestureState.dx > threshold || gestureState.vx > velocityThreshold / 1e3) {
10768
+ if (globalHaptics) triggerHaptic("selection");
10769
+ Animated.timing(translateX, {
10770
+ toValue: width,
10771
+ duration: animationDuration,
10772
+ useNativeDriver: true
10773
+ }).start();
10774
+ } else Animated.spring(translateX, {
10775
+ toValue: open ? 0 : width,
10776
+ tension: 65,
10777
+ friction: 11,
10778
+ useNativeDriver: true
10779
+ }).start();
10780
+ isSwiping.current = false;
10781
+ }
10782
+ });
10783
+ }, [
10784
+ translateX,
10785
+ width,
10786
+ side,
10787
+ open,
10788
+ initialTranslateX,
10789
+ handleOpenChange,
10790
+ globalHaptics
10791
+ ]);
10792
+ useEffect(() => {
10793
+ if (skipAnimationRef.current) {
10794
+ skipAnimationRef.current = false;
10795
+ return;
10796
+ }
10797
+ if (open) {
10798
+ translateX.setValue(side === "left" ? -width : width);
10799
+ Animated.timing(translateX, {
10800
+ toValue: 0,
10801
+ duration: animationDuration,
10802
+ useNativeDriver: true
10803
+ }).start();
10804
+ } else Animated.timing(translateX, {
10805
+ toValue: side === "left" ? -width : width,
10806
+ duration: animationDuration,
10807
+ useNativeDriver: true
10808
+ }).start();
10809
+ }, [
10810
+ open,
10811
+ width,
10812
+ side,
10813
+ translateX,
10814
+ animationDuration
10815
+ ]);
10816
+ useEffect(() => {
10817
+ if (skipAnimationRef.current) return;
10818
+ if (variant === "push") if (open) Animated.timing(mainTranslateX, {
10819
+ toValue: side === "left" ? width : -width,
10820
+ duration: animationDuration,
10821
+ useNativeDriver: true
10822
+ }).start();
10823
+ else Animated.timing(mainTranslateX, {
10824
+ toValue: 0,
10825
+ duration: animationDuration,
10826
+ useNativeDriver: true
10827
+ }).start();
10828
+ }, [
10829
+ open,
10830
+ width,
10831
+ side,
10832
+ variant,
10833
+ mainTranslateX,
10834
+ animationDuration
10835
+ ]);
10836
+ const theme = useTheme$1();
10837
+ const mode = useThemeMode$1();
10838
+ const globalHaptics = useHaptics$1();
10839
+ const colors = mode === "dark" ? theme.colors.gray.dark : theme.colors.gray;
10840
+ const grayAlpha = getGrayAlpha(theme);
10841
+ const radii = theme.radii;
10842
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, {
10843
+ value: {
10844
+ open,
10845
+ onOpenChange: handleOpenChange,
10846
+ side,
10847
+ variant,
10848
+ width,
10849
+ animationDuration,
10850
+ colors,
10851
+ grayAlpha,
10852
+ radii,
10853
+ translateX,
10854
+ mainTranslateX,
10855
+ panHandlers: panResponder.panHandlers,
10856
+ globalHaptics
10857
+ },
10858
+ children
10859
+ });
10860
+ };
10861
+ const SidebarTrigger = ({ children, asChild = true, hapticFeedback = false }) => {
10862
+ const { onOpenChange, globalHaptics } = useSidebar();
10863
+ const handlePress = () => {
10864
+ onOpenChange(true);
10865
+ if (globalHaptics && hapticFeedback) triggerHaptic("selection");
10866
+ };
10867
+ if (asChild && React.isValidElement(children)) return React.cloneElement(children, { onPress: (e) => {
10868
+ children.props?.onPress?.(e);
10869
+ handlePress();
10870
+ } });
10871
+ return /* @__PURE__ */ jsx(AnimatedPressable, {
10872
+ onPress: handlePress,
10873
+ pressedScale: .98,
10874
+ pressedOpacity: .95,
10875
+ animationDuration: 100,
10876
+ hapticFeedback: false,
10877
+ children
10878
+ });
10879
+ };
10880
+ const SidebarPortal = ({ children }) => {
10881
+ const { open, variant } = useSidebar();
10882
+ if (variant === "push") return null;
10883
+ return /* @__PURE__ */ jsx(Modal, {
10884
+ transparent: true,
10885
+ visible: open,
10886
+ animationType: "none",
10887
+ supportedOrientations: ["portrait", "landscape"],
10888
+ onRequestClose: () => {},
10889
+ children
10890
+ });
10891
+ };
10892
+ const SidebarOverlay = ({ style, hapticFeedback = true }) => {
10893
+ const { onOpenChange, variant, globalHaptics } = useSidebar();
10894
+ const isDark = useThemeMode$1() === "dark";
10895
+ if (variant === "push") return null;
10896
+ const overlayColor = isDark ? "rgba(0, 0, 0, 0.6)" : "rgba(10, 10, 10, 0.6)";
10897
+ const handlePress = () => {
10898
+ onOpenChange(false);
10899
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
10900
+ };
10901
+ return /* @__PURE__ */ jsx(TouchableWithoutFeedback, {
10902
+ onPress: handlePress,
10903
+ children: /* @__PURE__ */ jsx(View, { style: [
10904
+ styles$14.overlay,
10905
+ { backgroundColor: overlayColor },
10906
+ style
10907
+ ] })
10908
+ });
10909
+ };
10910
+ const SidebarContent = ({ children, style }) => {
10911
+ const { side, variant, width, translateX, panHandlers, radii, colors } = useSidebar();
10912
+ const theme = useTheme$1();
10913
+ const isDark = useThemeMode$1() === "dark";
10914
+ const backgroundColor = isDark ? theme.colors.gray.dark[2] : "#ffffff";
10915
+ const shadow = getShadow(6, isDark);
10916
+ const borderRadius = side === "left" ? {
10917
+ borderTopRightRadius: radii.large,
10918
+ borderBottomRightRadius: radii.large
10919
+ } : {
10920
+ borderTopLeftRadius: radii.large,
10921
+ borderBottomLeftRadius: radii.large
10922
+ };
10923
+ if (variant === "push") {
10924
+ const positionStyle = side === "left" ? { marginRight: -width } : { marginLeft: -width };
10925
+ return /* @__PURE__ */ jsx(Animated.View, {
10926
+ style: [{
10927
+ backgroundColor,
10928
+ width,
10929
+ ...borderRadius,
10930
+ transform: [{ translateX }],
10931
+ ...shadow || {},
10932
+ ...positionStyle
10933
+ }, style],
10934
+ ...panHandlers,
10935
+ children
10936
+ });
10937
+ }
10938
+ const positionStyle = side === "left" ? { left: 0 } : { right: 0 };
10939
+ return /* @__PURE__ */ jsx(Animated.View, {
10940
+ style: [
10941
+ styles$14.content,
10942
+ {
10943
+ backgroundColor,
10944
+ width,
10945
+ ...borderRadius,
10946
+ ...positionStyle,
10947
+ transform: [{ translateX }],
10948
+ ...shadow || {}
10949
+ },
10950
+ style
10951
+ ],
10952
+ ...panHandlers,
10953
+ children
10954
+ });
10955
+ };
10956
+ const SidebarHeader = ({ children, style }) => {
10957
+ const theme = useTheme$1();
10958
+ const borderColor = useThemeMode$1() === "dark" ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.1)";
10959
+ return /* @__PURE__ */ jsx(View, {
10960
+ style: [
10961
+ styles$14.header,
10962
+ {
10963
+ paddingHorizontal: theme.space[4],
10964
+ paddingVertical: theme.space[3],
10965
+ borderBottomWidth: 1,
10966
+ borderBottomColor: borderColor
10967
+ },
10968
+ style
10969
+ ],
10970
+ children
10971
+ });
10972
+ };
10973
+ const SidebarItem = ({ children, onPress, style, hapticFeedback = true }) => {
10974
+ const { onOpenChange, globalHaptics } = useSidebar();
10975
+ const theme = useTheme$1();
10976
+ const isDark = useThemeMode$1() === "dark";
10977
+ const handlePress = () => {
10978
+ onPress?.();
10979
+ onOpenChange(false);
10980
+ if (globalHaptics && hapticFeedback) triggerHaptic("selection");
10981
+ };
10982
+ return /* @__PURE__ */ jsx(Pressable, {
10983
+ style: ({ pressed }) => [
10984
+ styles$14.item,
10985
+ {
10986
+ paddingHorizontal: theme.space[4],
10987
+ paddingVertical: theme.space[3],
10988
+ backgroundColor: pressed ? isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)" : "transparent"
10989
+ },
10990
+ style
10991
+ ],
10992
+ onPress: handlePress,
10993
+ children
10994
+ });
10995
+ };
10996
+ const SidebarSeparator = ({ style }) => {
10997
+ const theme = useTheme$1();
10998
+ const borderColor = useThemeMode$1() === "dark" ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.1)";
10999
+ return /* @__PURE__ */ jsx(View, { style: [
11000
+ styles$14.separator,
11001
+ {
11002
+ marginHorizontal: theme.space[4],
11003
+ borderBottomWidth: 1,
11004
+ borderBottomColor: borderColor
11005
+ },
11006
+ style
11007
+ ] });
11008
+ };
11009
+ const SidebarBackdrop = ({ style, hapticFeedback = true }) => {
11010
+ const { onOpenChange, variant, globalHaptics } = useSidebar();
11011
+ const isDark = useThemeMode$1() === "dark";
11012
+ if (variant === "overlay") return null;
11013
+ const overlayColor = isDark ? "rgba(0, 0, 0, 0.3)" : "rgba(0, 0, 0, 0.2)";
11014
+ const handlePress = () => {
11015
+ onOpenChange(false);
11016
+ if (globalHaptics && hapticFeedback) triggerHaptic("selection");
11017
+ };
11018
+ return /* @__PURE__ */ jsx(TouchableWithoutFeedback, {
11019
+ onPress: handlePress,
11020
+ children: /* @__PURE__ */ jsx(Animated.View, { style: [
11021
+ styles$14.backdrop,
11022
+ { backgroundColor: overlayColor },
11023
+ style
11024
+ ] })
11025
+ });
11026
+ };
11027
+ const SidebarContainer = ({ children }) => {
11028
+ const { animationDuration, variant, side, width, open, onOpenChange, translateX, mainTranslateX } = useSidebar();
11029
+ if (variant !== "push") return /* @__PURE__ */ jsx(Fragment, { children });
11030
+ const containerPanResponder = useMemo(() => {
11031
+ return PanResponder.create({
11032
+ onStartShouldSetPanResponder: () => false,
11033
+ onMoveShouldSetPanResponder: (_, gestureState) => {
11034
+ if (Math.abs(gestureState.dx) <= 10 || Math.abs(gestureState.dx) <= Math.abs(gestureState.dy)) return false;
11035
+ if (!open) if (side === "left") return gestureState.dx > 10;
11036
+ else return gestureState.dx < -10;
11037
+ return true;
11038
+ },
11039
+ onPanResponderGrant: () => {},
11040
+ onPanResponderMove: (_, gestureState) => {
11041
+ if (side === "left") if (open) {
11042
+ const newTranslateX = gestureState.dx;
11043
+ const clampedValue = Math.max(-width, Math.min(0, newTranslateX));
11044
+ translateX.setValue(clampedValue);
11045
+ mainTranslateX.setValue(clampedValue + width);
11046
+ } else {
11047
+ const newTranslateX = -width + gestureState.dx;
11048
+ const clampedValue = Math.max(-width, Math.min(0, newTranslateX));
11049
+ translateX.setValue(clampedValue);
11050
+ mainTranslateX.setValue(gestureState.dx);
11051
+ }
11052
+ else if (open) {
11053
+ const newTranslateX = width + gestureState.dx;
11054
+ const clampedValue = Math.max(0, Math.min(width, newTranslateX));
11055
+ translateX.setValue(clampedValue);
11056
+ mainTranslateX.setValue(clampedValue - width);
11057
+ } else {
11058
+ const newTranslateX = width + gestureState.dx;
11059
+ const clampedValue = Math.max(0, Math.min(width, newTranslateX));
11060
+ translateX.setValue(clampedValue);
11061
+ mainTranslateX.setValue(gestureState.dx);
11062
+ }
11063
+ },
11064
+ onPanResponderRelease: (_, gestureState) => {
11065
+ const threshold = width * .25;
11066
+ const velocityThreshold = 500;
11067
+ if (side === "left") if (open) if (gestureState.dx < -threshold || gestureState.vx < -velocityThreshold / 1e3) {
11068
+ triggerHaptic("selection");
11069
+ onOpenChange(false, true);
11070
+ Animated.timing(translateX, {
11071
+ toValue: -width,
11072
+ duration: animationDuration,
11073
+ useNativeDriver: true
11074
+ }).start();
11075
+ Animated.timing(mainTranslateX, {
11076
+ toValue: 0,
11077
+ duration: animationDuration,
11078
+ useNativeDriver: true
11079
+ }).start();
11080
+ } else {
11081
+ Animated.spring(translateX, {
11082
+ toValue: 0,
11083
+ tension: 65,
11084
+ friction: 11,
11085
+ useNativeDriver: true
11086
+ }).start();
11087
+ Animated.spring(mainTranslateX, {
11088
+ toValue: width,
11089
+ tension: 65,
11090
+ friction: 11,
11091
+ useNativeDriver: true
11092
+ }).start();
11093
+ }
11094
+ else if (gestureState.dx > threshold || gestureState.vx > velocityThreshold / 1e3) {
11095
+ Animated.timing(translateX, {
11096
+ toValue: 0,
11097
+ duration: animationDuration,
11098
+ useNativeDriver: true
11099
+ }).start();
11100
+ Animated.timing(mainTranslateX, {
11101
+ toValue: width,
11102
+ duration: animationDuration,
11103
+ useNativeDriver: true
11104
+ }).start();
11105
+ onOpenChange(true, true);
11106
+ } else {
11107
+ Animated.spring(translateX, {
11108
+ toValue: -width,
11109
+ tension: 65,
11110
+ friction: 11,
11111
+ useNativeDriver: true
11112
+ }).start();
11113
+ Animated.spring(mainTranslateX, {
11114
+ toValue: 0,
11115
+ tension: 65,
11116
+ friction: 11,
11117
+ useNativeDriver: true
11118
+ }).start();
11119
+ }
11120
+ else if (open) if (gestureState.dx > threshold || gestureState.vx > velocityThreshold / 1e3) {
11121
+ triggerHaptic("selection");
11122
+ onOpenChange(false, true);
11123
+ Animated.timing(translateX, {
11124
+ toValue: width,
11125
+ duration: animationDuration,
11126
+ useNativeDriver: true
11127
+ }).start();
11128
+ Animated.timing(mainTranslateX, {
11129
+ toValue: 0,
11130
+ duration: animationDuration,
11131
+ useNativeDriver: true
11132
+ }).start();
11133
+ } else {
11134
+ Animated.spring(translateX, {
11135
+ toValue: 0,
11136
+ tension: 65,
11137
+ friction: 11,
11138
+ useNativeDriver: true
11139
+ }).start();
11140
+ Animated.spring(mainTranslateX, {
11141
+ toValue: -width,
11142
+ tension: 65,
11143
+ friction: 11,
11144
+ useNativeDriver: true
11145
+ }).start();
11146
+ }
11147
+ else if (gestureState.dx < -threshold || gestureState.vx < -velocityThreshold / 1e3) {
11148
+ Animated.timing(translateX, {
11149
+ toValue: 0,
11150
+ duration: animationDuration,
11151
+ useNativeDriver: true
11152
+ }).start();
11153
+ Animated.timing(mainTranslateX, {
11154
+ toValue: -width,
11155
+ duration: animationDuration,
11156
+ useNativeDriver: true
11157
+ }).start();
11158
+ onOpenChange(true, true);
11159
+ } else {
11160
+ Animated.spring(translateX, {
11161
+ toValue: width,
11162
+ tension: 65,
11163
+ friction: 11,
11164
+ useNativeDriver: true
11165
+ }).start();
11166
+ Animated.spring(mainTranslateX, {
11167
+ toValue: 0,
11168
+ tension: 65,
11169
+ friction: 11,
11170
+ useNativeDriver: true
11171
+ }).start();
11172
+ }
11173
+ }
11174
+ });
11175
+ }, [
11176
+ side,
11177
+ width,
11178
+ open,
11179
+ onOpenChange,
11180
+ translateX,
11181
+ mainTranslateX,
11182
+ animationDuration
11183
+ ]);
11184
+ const childArray = React.Children.toArray(children);
11185
+ let contentChild = null;
11186
+ let mainChild = null;
11187
+ childArray.forEach((child) => {
11188
+ if (React.isValidElement(child) && child.type === SidebarContent) contentChild = child;
11189
+ else if (React.isValidElement(child) && child.type === SidebarMain) mainChild = child;
11190
+ });
11191
+ if (side === "right" && mainChild && contentChild) return /* @__PURE__ */ jsxs(View, {
11192
+ style: styles$14.container,
11193
+ ...containerPanResponder.panHandlers,
11194
+ children: [mainChild, contentChild]
11195
+ });
11196
+ return /* @__PURE__ */ jsx(View, {
11197
+ style: styles$14.container,
11198
+ ...containerPanResponder.panHandlers,
11199
+ children
11200
+ });
11201
+ };
11202
+ const SidebarMain = ({ children, style }) => {
11203
+ const { side, variant, width, open, mainTranslateX } = useSidebar();
11204
+ useTheme$1();
11205
+ if (variant === "push") return /* @__PURE__ */ jsx(Animated.View, {
11206
+ style: [
11207
+ styles$14.mainContent,
11208
+ {
11209
+ flex: 1,
11210
+ transform: [{ translateX: mainTranslateX }]
11211
+ },
11212
+ style
11213
+ ],
11214
+ children
11215
+ });
11216
+ return /* @__PURE__ */ jsx(Fragment, { children });
11217
+ };
11218
+ const styles$14 = StyleSheet.create({
11219
+ container: {
11220
+ flexDirection: "row",
11221
+ flex: 1
11222
+ },
11223
+ overlay: {
11224
+ ...StyleSheet.absoluteFillObject,
11225
+ zIndex: 1
11226
+ },
11227
+ backdrop: {
11228
+ ...StyleSheet.absoluteFillObject,
11229
+ zIndex: 1
11230
+ },
11231
+ content: {
11232
+ position: "absolute",
11233
+ top: 0,
11234
+ bottom: 0,
11235
+ zIndex: 2,
11236
+ elevation: 4
11237
+ },
11238
+ scrollContent: { flex: 1 },
11239
+ scrollContentContainer: {
11240
+ flexGrow: 1,
11241
+ paddingBottom: 4
11242
+ },
11243
+ header: {},
11244
+ item: {},
11245
+ separator: { height: 1 },
11246
+ mainContent: {}
11247
+ });
11248
+ const Sidebar = {
11249
+ Root: SidebarRoot,
11250
+ Trigger: SidebarTrigger,
11251
+ Portal: SidebarPortal,
11252
+ Overlay: SidebarOverlay,
11253
+ Content: SidebarContent,
11254
+ Header: SidebarHeader,
11255
+ Item: SidebarItem,
11256
+ Separator: SidebarSeparator,
11257
+ Main: SidebarMain,
11258
+ Backdrop: SidebarBackdrop,
11259
+ Container: SidebarContainer
11260
+ };
11261
+
11262
+ //#endregion
11263
+ //#region src/components/data-display/Avatar.tsx
11264
+ const Avatar = React.forwardRef(({ src, alt = "Avatar", color, variant = "solid", highContrast, radius, size = 2, fallback, fallbackBehavior = "character", style, accessibilityLabel, children }, ref) => {
11265
+ const theme = useTheme$1();
11266
+ const mode = useThemeMode$1();
11267
+ const isDark = mode === "dark";
11268
+ const grayScale = isDark ? theme.colors.gray.dark : theme.colors.gray;
11269
+ const grayAlpha = getGrayAlpha(theme);
11270
+ const activeColor = color || theme.accentColor;
11271
+ const radii = theme.radii[radius] ?? theme.radii.medium;
11272
+ const selectedRadius = radius || theme.radius;
11273
+ const [imageError, setImageError] = useState(false);
11274
+ const variantColors = useMemo(() => getVariantColors(theme, activeColor, mode, variant, highContrast), [
11275
+ getVariantColors,
11276
+ color,
11277
+ variant,
11278
+ highContrast,
11279
+ isDark,
11280
+ theme
11281
+ ]);
11282
+ const getSizeValues = () => {
11283
+ switch (size) {
11284
+ case 1: return {
11285
+ size: 24,
11286
+ fontSize: 10,
11287
+ borderWidth: 0,
11288
+ borderRadius: selectedRadius === "full" ? 9999 : radii
11289
+ };
11290
+ case 2: return {
11291
+ size: 32,
11292
+ fontSize: 12,
11293
+ borderWidth: 0,
11294
+ borderRadius: selectedRadius === "full" ? 9999 : radii
11295
+ };
11296
+ case 3: return {
11297
+ size: 48,
11298
+ fontSize: 18,
11299
+ borderWidth: 0,
11300
+ borderRadius: selectedRadius === "full" ? 9999 : radii
11301
+ };
11302
+ case 4: return {
11303
+ size: 64,
11304
+ fontSize: 24,
11305
+ borderWidth: 0,
10572
11306
  borderRadius: selectedRadius === "full" ? 9999 : radii
10573
11307
  };
10574
11308
  case 5: return {
@@ -10620,10 +11354,10 @@ const Avatar = React.forwardRef(({ src, alt = "Avatar", color, variant = "solid"
10620
11354
  if (!trimmed) return null;
10621
11355
  return trimmed.split(/\s+/).map((word) => word[0]).join("").slice(0, 2).toUpperCase() || null;
10622
11356
  })();
10623
- return /* @__PURE__ */ jsxs(View_default, {
11357
+ return /* @__PURE__ */ jsxs(RnView, {
10624
11358
  ref,
10625
11359
  style: [
10626
- styles$12.avatar,
11360
+ styles$13.avatar,
10627
11361
  {
10628
11362
  width: sizeValues.size,
10629
11363
  height: sizeValues.size,
@@ -10648,8 +11382,8 @@ const Avatar = React.forwardRef(({ src, alt = "Avatar", color, variant = "solid"
10648
11382
  onError: () => setImageError(true),
10649
11383
  accessibilityLabel: alt,
10650
11384
  testID: "avatar-image"
10651
- }) : /* @__PURE__ */ jsx(View_default, {
10652
- style: [styles$12.fallback, {
11385
+ }) : /* @__PURE__ */ jsx(RnView, {
11386
+ style: [styles$13.fallback, {
10653
11387
  backgroundColor: variantColors.backgroundColor,
10654
11388
  flex: 1,
10655
11389
  width: "100%",
@@ -10673,7 +11407,7 @@ const AvatarFallback = ({ children }) => {
10673
11407
  return /* @__PURE__ */ jsx(Fragment, { children });
10674
11408
  };
10675
11409
  Avatar.Fallback = AvatarFallback;
10676
- const styles$12 = StyleSheet.create({
11410
+ const styles$13 = StyleSheet.create({
10677
11411
  avatar: {
10678
11412
  alignItems: "center",
10679
11413
  justifyContent: "center"
@@ -10741,7 +11475,7 @@ const Badge = React.forwardRef(({ children, variant = "soft", color, radius = "m
10741
11475
  return /* @__PURE__ */ jsx(RnView, {
10742
11476
  ref,
10743
11477
  style: [
10744
- styles$11.badge,
11478
+ styles$12.badge,
10745
11479
  badgeStyle,
10746
11480
  style
10747
11481
  ],
@@ -10749,13 +11483,13 @@ const Badge = React.forwardRef(({ children, variant = "soft", color, radius = "m
10749
11483
  accessibilityRole: "none",
10750
11484
  ...rest,
10751
11485
  children: typeof children === "string" ? /* @__PURE__ */ jsx(TextComponent, {
10752
- style: [styles$11.text, textStyle],
11486
+ style: [styles$12.text, textStyle],
10753
11487
  children
10754
11488
  }) : children
10755
11489
  });
10756
11490
  });
10757
11491
  Badge.displayName = "Badge";
10758
- const styles$11 = StyleSheet.create({
11492
+ const styles$12 = StyleSheet.create({
10759
11493
  badge: {
10760
11494
  flexDirection: "row",
10761
11495
  alignItems: "center"
@@ -10991,14 +11725,14 @@ const Card = React.forwardRef(({ asChild = false, children, color, radius = "med
10991
11725
  style,
10992
11726
  ...rest,
10993
11727
  children: /* @__PURE__ */ jsx(RnView, {
10994
- style: [styles$10.card, cardStyle],
11728
+ style: [styles$11.card, cardStyle],
10995
11729
  children
10996
11730
  })
10997
11731
  });
10998
11732
  return /* @__PURE__ */ jsx(RnView, {
10999
11733
  ref,
11000
11734
  style: [
11001
- styles$10.card,
11735
+ styles$11.card,
11002
11736
  cardStyle,
11003
11737
  style
11004
11738
  ],
@@ -11012,7 +11746,7 @@ const CardFooter = ({ children, separate = true }) => {
11012
11746
  useThemeMode$1();
11013
11747
  const grayAlpha = getGrayAlpha(theme);
11014
11748
  return /* @__PURE__ */ jsx(RnView, {
11015
- style: [styles$10.footer, separate && {
11749
+ style: [styles$11.footer, separate && {
11016
11750
  borderTopWidth: 1,
11017
11751
  borderTopColor: grayAlpha["6"],
11018
11752
  marginTop: theme.space[4],
@@ -11022,7 +11756,7 @@ const CardFooter = ({ children, separate = true }) => {
11022
11756
  });
11023
11757
  };
11024
11758
  Card.Footer = CardFooter;
11025
- const styles$10 = StyleSheet.create({
11759
+ const styles$11 = StyleSheet.create({
11026
11760
  card: { overflow: "hidden" },
11027
11761
  footer: {
11028
11762
  flexDirection: "row",
@@ -11069,7 +11803,7 @@ const DataListRoot = ({ children, orientation = "horizontal", size = 2, trim = "
11069
11803
  },
11070
11804
  children: /* @__PURE__ */ jsx(View, {
11071
11805
  style: [
11072
- styles$9.root,
11806
+ styles$10.root,
11073
11807
  rootStyle,
11074
11808
  trimStyles,
11075
11809
  style
@@ -11093,7 +11827,7 @@ const DataListItem = ({ children, align = "baseline", style }) => {
11093
11827
  };
11094
11828
  return /* @__PURE__ */ jsx(View, {
11095
11829
  style: [
11096
- styles$9.item,
11830
+ styles$10.item,
11097
11831
  itemStyle,
11098
11832
  style
11099
11833
  ],
@@ -11163,7 +11897,7 @@ const DataListValue = ({ children, style }) => {
11163
11897
  });
11164
11898
  };
11165
11899
  DataListValue.displayName = "DataList.Value";
11166
- const styles$9 = StyleSheet.create({
11900
+ const styles$10 = StyleSheet.create({
11167
11901
  root: { width: "100%" },
11168
11902
  item: { width: "100%" }
11169
11903
  });
@@ -11185,7 +11919,7 @@ const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true,
11185
11919
  const backgroundColor = isDark ? grayAlpha["2"] : grayAlpha["1"];
11186
11920
  const defaultKeyExtractor = (item, index) => {
11187
11921
  if (keyExtractor) return keyExtractor(item, index);
11188
- if ("id" in item) return String(item.id);
11922
+ if (item && typeof item === "object" && "id" in item) return String(item.id);
11189
11923
  return String(index);
11190
11924
  };
11191
11925
  const renderListItem = (info) => {
@@ -11195,7 +11929,7 @@ const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true,
11195
11929
  borderBottomColor: dividerColor
11196
11930
  };
11197
11931
  return /* @__PURE__ */ jsx(RnView, {
11198
- style: [styles$8.item, itemStyle],
11932
+ style: [styles$9.item, itemStyle],
11199
11933
  children: renderItem({
11200
11934
  item: info.item,
11201
11935
  index: info.index,
@@ -11210,14 +11944,14 @@ const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true,
11210
11944
  };
11211
11945
  if (!scrollable) return /* @__PURE__ */ jsxs(RnView, {
11212
11946
  style: [
11213
- styles$8.container,
11947
+ styles$9.container,
11214
11948
  listContainerStyle,
11215
11949
  style
11216
11950
  ],
11217
11951
  children: [
11218
11952
  ListHeaderComponent,
11219
11953
  data.map((item, index) => /* @__PURE__ */ jsx(RnView, {
11220
- style: styles$8.nonScrollableItem,
11954
+ style: styles$9.nonScrollableItem,
11221
11955
  children: renderItem({
11222
11956
  item,
11223
11957
  index,
@@ -11228,28 +11962,28 @@ const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true,
11228
11962
  ]
11229
11963
  });
11230
11964
  return /* @__PURE__ */ jsx(RnView, {
11231
- style: [styles$8.container, style],
11965
+ style: [styles$9.container, style],
11232
11966
  children: /* @__PURE__ */ jsx(RnFlatList, {
11233
11967
  data,
11234
11968
  renderItem: renderListItem,
11235
11969
  keyExtractor: defaultKeyExtractor,
11236
- style: [styles$8.flatList, listContainerStyle],
11237
- contentContainerStyle: styles$8.contentContainer,
11970
+ style: [styles$9.flatList, listContainerStyle],
11971
+ contentContainerStyle: styles$9.contentContainer,
11238
11972
  showsVerticalScrollIndicator: true,
11239
11973
  ListEmptyComponent,
11240
11974
  ListHeaderComponent,
11241
11975
  ListFooterComponent,
11242
- ItemSeparatorComponent: () => showDividers ? /* @__PURE__ */ jsx(RnView, { style: [styles$8.divider, {
11976
+ ItemSeparatorComponent: () => showDividers ? /* @__PURE__ */ jsx(RnView, { style: [styles$9.divider, {
11243
11977
  backgroundColor: dividerColor,
11244
11978
  marginHorizontal: theme.space[4]
11245
11979
  }] }) : null,
11246
- ListHeaderComponentStyle: styles$8.listHeaderFooter,
11247
- ListFooterComponentStyle: styles$8.listHeaderFooter
11980
+ ListHeaderComponentStyle: styles$9.listHeaderFooter,
11981
+ ListFooterComponentStyle: styles$9.listHeaderFooter
11248
11982
  })
11249
11983
  });
11250
11984
  };
11251
11985
  FancyList.displayName = "FancyList";
11252
- const styles$8 = StyleSheet.create({
11986
+ const styles$9 = StyleSheet.create({
11253
11987
  container: { width: "100%" },
11254
11988
  flatList: { flex: 1 },
11255
11989
  contentContainer: { flexGrow: 1 },
@@ -11353,7 +12087,7 @@ const Progress = forwardRef(({ value, max = 100, size = 2, variant = "solid", co
11353
12087
  return /* @__PURE__ */ jsx(RnView, {
11354
12088
  ref,
11355
12089
  style: [
11356
- styles$7.track,
12090
+ styles$8.track,
11357
12091
  {
11358
12092
  backgroundColor: trackBackgroundColor,
11359
12093
  borderColor: trackBorder.borderColor,
@@ -11372,7 +12106,7 @@ const Progress = forwardRef(({ value, max = 100, size = 2, variant = "solid", co
11372
12106
  },
11373
12107
  accessibilityRole: "progressbar",
11374
12108
  testID,
11375
- children: /* @__PURE__ */ jsx(Animated.View, { style: [styles$7.indicator, {
12109
+ children: /* @__PURE__ */ jsx(Animated.View, { style: [styles$8.indicator, {
11376
12110
  width: animatedWidth,
11377
12111
  backgroundColor: indicatorColor,
11378
12112
  borderRadius: selectedRadius
@@ -11380,7 +12114,7 @@ const Progress = forwardRef(({ value, max = 100, size = 2, variant = "solid", co
11380
12114
  });
11381
12115
  });
11382
12116
  Progress.displayName = "Progress";
11383
- const styles$7 = StyleSheet.create({
12117
+ const styles$8 = StyleSheet.create({
11384
12118
  track: {
11385
12119
  width: "100%",
11386
12120
  overflow: "hidden"
@@ -11413,7 +12147,7 @@ const Spinner = React.forwardRef(({ size = "medium", color, highContrast = false
11413
12147
  return /* @__PURE__ */ jsx(RnView, {
11414
12148
  ref,
11415
12149
  style: [
11416
- styles$6.container,
12150
+ styles$7.container,
11417
12151
  {
11418
12152
  width: sizeConfig.dimension,
11419
12153
  height: sizeConfig.dimension
@@ -11430,148 +12164,312 @@ const Spinner = React.forwardRef(({ size = "medium", color, highContrast = false
11430
12164
  });
11431
12165
  });
11432
12166
  Spinner.displayName = "Spinner";
11433
- const styles$6 = StyleSheet.create({ container: {
12167
+ const styles$7 = StyleSheet.create({ container: {
11434
12168
  justifyContent: "center",
11435
12169
  alignItems: "center"
11436
12170
  } });
11437
12171
 
12172
+ //#endregion
12173
+ //#region src/components/data-display/Skeleton.tsx
12174
+ const PULSE_ANIMATION = {
12175
+ duration: 1e3,
12176
+ useNativeDriver: true
12177
+ };
12178
+ const SKELEON_COLORS = {
12179
+ light: "#E5E7EB",
12180
+ dark: "#D1D5DB"
12181
+ };
12182
+ const Skeleton = React.forwardRef(({ children, loading = true, style, textStyle, width, height, accessibilityLabel = "Loading", testID }, ref) => {
12183
+ const pulseAnim = useRef(new Animated.Value(0)).current;
12184
+ useEffect(() => {
12185
+ const animation = Animated.loop(Animated.sequence([Animated.timing(pulseAnim, {
12186
+ toValue: 1,
12187
+ ...PULSE_ANIMATION
12188
+ }), Animated.timing(pulseAnim, {
12189
+ toValue: 0,
12190
+ ...PULSE_ANIMATION
12191
+ })]));
12192
+ animation.start();
12193
+ return () => {
12194
+ animation.stop();
12195
+ };
12196
+ }, [pulseAnim]);
12197
+ const pulseStyle = { backgroundColor: pulseAnim.interpolate({
12198
+ inputRange: [0, 1],
12199
+ outputRange: [SKELEON_COLORS.light, SKELEON_COLORS.dark]
12200
+ }) };
12201
+ if (!loading) return /* @__PURE__ */ jsx(Fragment, { children });
12202
+ if (!React.isValidElement(children) && typeof children === "string") return /* @__PURE__ */ jsx(Animated.Text, {
12203
+ ref,
12204
+ style: [
12205
+ textStyle,
12206
+ pulseStyle,
12207
+ width !== void 0 ? { width } : void 0,
12208
+ height !== void 0 ? { height } : void 0
12209
+ ],
12210
+ accessibilityLabel,
12211
+ accessibilityRole: "progressbar",
12212
+ testID,
12213
+ children
12214
+ });
12215
+ return /* @__PURE__ */ jsx(Animated.View, {
12216
+ ref,
12217
+ style: [
12218
+ styles$6.blockContainer,
12219
+ pulseStyle,
12220
+ width !== void 0 ? { width } : void 0,
12221
+ height !== void 0 ? { height } : void 0,
12222
+ style
12223
+ ],
12224
+ accessibilityLabel,
12225
+ accessibilityRole: "progressbar",
12226
+ testID,
12227
+ children: children && /* @__PURE__ */ jsx(View, {
12228
+ style: styles$6.hiddenChildren,
12229
+ pointerEvents: "none",
12230
+ children
12231
+ })
12232
+ });
12233
+ });
12234
+ Skeleton.displayName = "Skeleton";
12235
+ const styles$6 = StyleSheet.create({
12236
+ inlineText: {
12237
+ color: "transparent",
12238
+ fontSize: 14,
12239
+ lineHeight: 20,
12240
+ overflow: "hidden"
12241
+ },
12242
+ blockContainer: {
12243
+ minHeight: 20,
12244
+ overflow: "hidden"
12245
+ },
12246
+ hiddenChildren: { opacity: 0 }
12247
+ });
12248
+
11438
12249
  //#endregion
11439
12250
  //#region src/components/data-display/Table.tsx
11440
- const Table = ({ columns, data, style, scrollable = true }) => {
12251
+ const TableContext = createContext(null);
12252
+ const useTableContext = () => {
12253
+ const context = useContext(TableContext);
12254
+ if (!context) throw new Error("Table sub-components must be used within Table.Root");
12255
+ return context;
12256
+ };
12257
+ const TableRoot = React.forwardRef(({ children, size = "2", scrollable = true, style }, ref) => {
11441
12258
  const theme = useTheme$1();
11442
- useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
11443
- getGrayAlpha(theme);
12259
+ const mode = useThemeMode$1();
12260
+ const isDark = mode === "dark";
12261
+ const grayAlpha = getGrayAlpha(theme, mode);
11444
12262
  const tableStyle = {
11445
12263
  borderRadius: theme.radii.medium,
11446
- overflow: "hidden"
12264
+ overflow: "hidden",
12265
+ backgroundColor: isDark ? grayAlpha["2"] : grayAlpha["1"]
12266
+ };
12267
+ const contextValue = {
12268
+ size,
12269
+ isRoot: true
11447
12270
  };
11448
- const TableContent = () => /* @__PURE__ */ jsxs(RnView, {
11449
- style: [styles$5.table, tableStyle],
11450
- children: [/* @__PURE__ */ jsx(Thead, { children: /* @__PURE__ */ jsx(Tr, {
11451
- isHeader: true,
11452
- children: columns.map((column) => /* @__PURE__ */ jsx(Th, {
11453
- width: column.width,
11454
- align: column.align,
11455
- children: column.title
11456
- }, column.key))
11457
- }) }), /* @__PURE__ */ jsx(Tbody, { children: data.map((row, rowIndex) => /* @__PURE__ */ jsx(Tr, { children: columns.map((column) => /* @__PURE__ */ jsx(Td, {
11458
- align: column.align,
11459
- children: column.render ? column.render(row, rowIndex) : String(row[column.key] ?? "")
11460
- }, column.key)) }, rowIndex)) })]
11461
- });
11462
- if (scrollable) return /* @__PURE__ */ jsx(RnScrollView, {
12271
+ const content = /* @__PURE__ */ jsx(TableContext.Provider, {
12272
+ value: contextValue,
12273
+ children: /* @__PURE__ */ jsx(View, {
12274
+ ref,
12275
+ style: [
12276
+ styles$5.root,
12277
+ tableStyle,
12278
+ style
12279
+ ],
12280
+ children
12281
+ })
12282
+ });
12283
+ if (scrollable) return /* @__PURE__ */ jsx(ScrollView, {
11463
12284
  horizontal: true,
11464
- style: [styles$5.scrollContainer, style],
11465
12285
  showsHorizontalScrollIndicator: false,
11466
- children: /* @__PURE__ */ jsx(TableContent, {})
11467
- });
11468
- return /* @__PURE__ */ jsx(RnView, {
11469
- style: [styles$5.container, style],
11470
- children: /* @__PURE__ */ jsx(TableContent, {})
12286
+ contentContainerStyle: styles$5.scrollContent,
12287
+ children: content
11471
12288
  });
11472
- };
11473
- Table.displayName = "Table";
11474
- const Thead = ({ children }) => {
11475
- return /* @__PURE__ */ jsx(RnView, {
11476
- style: styles$5.thead,
12289
+ return content;
12290
+ });
12291
+ TableRoot.displayName = "Table.Root";
12292
+ const TableHeader = React.forwardRef(({ children, style }, ref) => {
12293
+ const theme = useTheme$1();
12294
+ const mode = useThemeMode$1();
12295
+ const isDark = mode === "dark";
12296
+ const grayAlpha = getGrayAlpha(theme, mode);
12297
+ return /* @__PURE__ */ jsx(View, {
12298
+ ref,
12299
+ style: [
12300
+ styles$5.header,
12301
+ {
12302
+ backgroundColor: isDark ? grayAlpha["3"] : grayAlpha["2"],
12303
+ borderBottomWidth: 0,
12304
+ borderBottomColor: isDark ? grayAlpha["6"] : grayAlpha["5"]
12305
+ },
12306
+ style
12307
+ ],
11477
12308
  children
11478
12309
  });
11479
- };
11480
- const Tbody = ({ children }) => {
11481
- return /* @__PURE__ */ jsx(RnView, {
11482
- style: styles$5.tbody,
12310
+ });
12311
+ TableHeader.displayName = "Table.Header";
12312
+ const TableBody = React.forwardRef(({ children, style }, ref) => {
12313
+ return /* @__PURE__ */ jsx(View, {
12314
+ ref,
12315
+ style: [styles$5.body, style],
11483
12316
  children
11484
12317
  });
11485
- };
11486
- const Tr = ({ children, isHeader = false }) => {
12318
+ });
12319
+ TableBody.displayName = "Table.Body";
12320
+ const TableRow = React.forwardRef(({ children, style }, ref) => {
11487
12321
  const theme = useTheme$1();
11488
- const isDark = useThemeMode$1() === "dark";
11489
- isDark ? theme.colors.gray.dark : theme.colors.gray;
11490
- const grayAlpha = getGrayAlpha(theme);
11491
- const headerBackground = isDark ? grayAlpha["3"] : grayAlpha["2"];
11492
- const borderColor = isDark ? grayAlpha["6"] : grayAlpha["5"];
11493
- return /* @__PURE__ */ jsx(RnView, {
12322
+ const mode = useThemeMode$1();
12323
+ const isDark = mode === "dark";
12324
+ const grayAlpha = getGrayAlpha(theme, mode);
12325
+ return /* @__PURE__ */ jsx(View, {
12326
+ ref,
11494
12327
  style: [
11495
- styles$5.tr,
11496
- isHeader && {
11497
- backgroundColor: headerBackground,
12328
+ styles$5.row,
12329
+ {
12330
+ flex: 1,
11498
12331
  borderBottomWidth: 1,
11499
- borderBottomColor: borderColor
12332
+ borderBottomColor: isDark ? grayAlpha["6"] : grayAlpha["5"]
11500
12333
  },
11501
- !isHeader && {
11502
- borderBottomWidth: 1,
11503
- borderBottomColor: borderColor
11504
- }
12334
+ style
11505
12335
  ],
11506
12336
  children
11507
12337
  });
11508
- };
11509
- const Th = ({ children, width, align = "left" }) => {
12338
+ });
12339
+ TableRow.displayName = "Table.Row";
12340
+ const TableColumnHeaderCell = React.forwardRef(({ children, width, align = "left", style }, ref) => {
12341
+ const context = useTableContext();
11510
12342
  const theme = useTheme$1();
11511
12343
  const grayScale = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
11512
- const thStyle = { width };
11513
- return /* @__PURE__ */ jsx(RnView, {
12344
+ const getSizePadding = () => {
12345
+ switch (context.size) {
12346
+ case "1": return {
12347
+ paddingVertical: theme.space[2],
12348
+ paddingHorizontal: theme.space[3]
12349
+ };
12350
+ case "3": return {
12351
+ paddingVertical: theme.space[4],
12352
+ paddingHorizontal: theme.space[5]
12353
+ };
12354
+ default: return {
12355
+ paddingVertical: theme.space[3],
12356
+ paddingHorizontal: theme.space[4]
12357
+ };
12358
+ }
12359
+ };
12360
+ const getSizeFont = () => {
12361
+ switch (context.size) {
12362
+ case "1": return { fontSize: theme.typography.fontSizes[1].fontSize };
12363
+ case "3": return { fontSize: theme.typography.fontSizes[3].fontSize };
12364
+ default: return { fontSize: theme.typography.fontSizes[2].fontSize };
12365
+ }
12366
+ };
12367
+ const padding = getSizePadding();
12368
+ const fontSize = getSizeFont();
12369
+ return /* @__PURE__ */ jsx(View, {
12370
+ ref,
11514
12371
  style: [
11515
- styles$5.th,
11516
- thStyle,
11517
- justifyContentMap[align]
12372
+ styles$5.cell,
12373
+ {
12374
+ width,
12375
+ alignItems: {
12376
+ left: "flex-start",
12377
+ center: "center",
12378
+ right: "flex-end"
12379
+ }[align],
12380
+ ...padding
12381
+ },
12382
+ style
11518
12383
  ],
11519
12384
  children: /* @__PURE__ */ jsx(TextComponent, {
11520
12385
  style: {
11521
12386
  color: grayScale[12],
11522
12387
  fontWeight: "600",
11523
- fontSize: theme.typography.fontSizes[1].fontSize
12388
+ ...fontSize
11524
12389
  },
11525
12390
  children
11526
12391
  })
11527
12392
  });
11528
- };
11529
- const Td = ({ children, align = "left" }) => {
12393
+ });
12394
+ TableColumnHeaderCell.displayName = "Table.ColumnHeaderCell";
12395
+ const TableCell = React.forwardRef(({ children, align = "left", style }, ref) => {
12396
+ const context = useTableContext();
11530
12397
  const theme = useTheme$1();
11531
12398
  const grayScale = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
11532
- return /* @__PURE__ */ jsx(RnView, {
11533
- style: [styles$5.td, justifyContentMap[align]],
12399
+ const getSizePadding = () => {
12400
+ switch (context.size) {
12401
+ case "1": return {
12402
+ paddingVertical: theme.space[2],
12403
+ paddingHorizontal: theme.space[3]
12404
+ };
12405
+ case "3": return {
12406
+ paddingVertical: theme.space[4],
12407
+ paddingHorizontal: theme.space[5]
12408
+ };
12409
+ default: return {
12410
+ paddingVertical: theme.space[3],
12411
+ paddingHorizontal: theme.space[4]
12412
+ };
12413
+ }
12414
+ };
12415
+ const getSizeFont = () => {
12416
+ switch (context.size) {
12417
+ case "1": return { fontSize: theme.typography.fontSizes[1].fontSize };
12418
+ case "3": return { fontSize: theme.typography.fontSizes[3].fontSize };
12419
+ default: return { fontSize: theme.typography.fontSizes[2].fontSize };
12420
+ }
12421
+ };
12422
+ const padding = getSizePadding();
12423
+ const fontSize = getSizeFont();
12424
+ return /* @__PURE__ */ jsx(View, {
12425
+ ref,
12426
+ style: [
12427
+ styles$5.cell,
12428
+ {
12429
+ alignItems: {
12430
+ left: "flex-start",
12431
+ center: "center",
12432
+ right: "flex-end"
12433
+ }[align],
12434
+ ...padding
12435
+ },
12436
+ style
12437
+ ],
11534
12438
  children: /* @__PURE__ */ jsx(TextComponent, {
11535
12439
  style: {
11536
12440
  color: grayScale[11],
11537
- fontSize: theme.typography.fontSizes[1].fontSize
12441
+ ...fontSize
11538
12442
  },
11539
12443
  children
11540
12444
  })
11541
12445
  });
11542
- };
11543
- const justifyContentMap = {
11544
- left: { justifyContent: "flex-start" },
11545
- center: { justifyContent: "center" },
11546
- right: { justifyContent: "flex-end" }
11547
- };
11548
- Table.Thead = Thead;
11549
- Table.Tbody = Tbody;
11550
- Table.Tr = Tr;
11551
- Table.Th = Th;
11552
- Table.Td = Td;
12446
+ });
12447
+ TableCell.displayName = "Table.Cell";
11553
12448
  const styles$5 = StyleSheet.create({
11554
- container: { width: "100%" },
11555
- scrollContainer: { flex: 1 },
11556
- table: { minWidth: "100%" },
11557
- thead: { flexDirection: "row" },
11558
- tbody: { flexDirection: "column" },
11559
- tr: {
12449
+ scrollContent: { flexGrow: 1 },
12450
+ root: { minWidth: "100%" },
12451
+ header: {
11560
12452
  flexDirection: "row",
11561
- minHeight: 44,
11562
- alignItems: "center",
11563
- borderBottomWidth: 1,
11564
- borderBottomColor: "transparent"
11565
- },
11566
- th: {
11567
- padding: 12,
11568
12453
  minHeight: 44
11569
12454
  },
11570
- td: {
11571
- padding: 12,
12455
+ body: { flexDirection: "column" },
12456
+ row: {
12457
+ flexDirection: "row",
11572
12458
  minHeight: 44
12459
+ },
12460
+ cell: {
12461
+ flex: 1,
12462
+ minWidth: 80
11573
12463
  }
11574
12464
  });
12465
+ const Table = {
12466
+ Root: TableRoot,
12467
+ Header: TableHeader,
12468
+ Body: TableBody,
12469
+ Row: TableRow,
12470
+ ColumnHeaderCell: TableColumnHeaderCell,
12471
+ Cell: TableCell
12472
+ };
11575
12473
 
11576
12474
  //#endregion
11577
12475
  //#region src/components/navigation/SegmentedControl.tsx
@@ -11581,19 +12479,57 @@ function useSegmentedControlContext() {
11581
12479
  if (!context) throw new Error("SegmentedControl.Item must be used within SegmentedControl.Root");
11582
12480
  return context;
11583
12481
  }
12482
+ const SegmentedControlValue = ({ children }) => {
12483
+ const { value: selectedValue, color, isDark, grayScale, activeColor, solidVariantColors, softVariantColors, sizeValues, theme, itemValue, isItemSelected, itemDisabled } = useSegmentedControlContext();
12484
+ return /* @__PURE__ */ jsx(TextComponent, {
12485
+ style: {
12486
+ color: itemDisabled ? grayScale["9"] : color ? isItemSelected ? solidVariantColors.textColor : softVariantColors.textColor : isItemSelected ? grayScale[12] : grayScale[10],
12487
+ fontWeight: isItemSelected ? theme.typography.fontWeights.semibold : theme.typography.fontWeights.regular,
12488
+ fontSize: sizeValues.fontSize
12489
+ },
12490
+ children
12491
+ });
12492
+ };
12493
+ SegmentedControlValue.displayName = "SegmentedControlValue";
12494
+ const SegmentedControlIcon = ({ children }) => {
12495
+ const { color, isDark, grayScale, activeColor, solidVariantColors, softVariantColors, sizeValues, itemValue, isItemSelected, itemDisabled } = useSegmentedControlContext();
12496
+ const iconColor = itemDisabled ? grayScale["9"] : color ? isItemSelected ? solidVariantColors.textColor : softVariantColors.textColor : isItemSelected ? grayScale[12] : grayScale[10];
12497
+ const iconSize = sizeValues.fontSize;
12498
+ return React.cloneElement(children, {
12499
+ ...children.props,
12500
+ color: iconColor,
12501
+ size: children.props.size ?? iconSize
12502
+ });
12503
+ };
12504
+ SegmentedControlIcon.displayName = "SegmentedControlIcon";
12505
+ const SegmentedControlItemContext = createContext(null);
11584
12506
  const SegmentedControlItem = ({ value, disabled: itemDisabled, children }) => {
11585
- const { value: selectedValue, onValueChange, disabled, sizeValues, isDark, grayScale, grayAlpha, activeColor, radii, selectedRadius, softVariantColors, solidVariantColors, color, onItemLayout, theme, pillBackgroundColor, hapticFeedback } = useSegmentedControlContext();
12507
+ const { value: selectedValue, onValueChange, disabled, sizeValues, isDark, grayScale, grayAlpha, activeColor, radii, selectedRadius, softVariantColors, solidVariantColors, color, onItemLayout, theme, pillBackgroundColor, hapticFeedback, globalHaptics } = useSegmentedControlContext();
11586
12508
  const isSelected = value === selectedValue;
11587
12509
  const isDisabled = disabled || itemDisabled;
12510
+ const hasValueChild = isValidElement(children) && children.type?.displayName === "SegmentedControlValue";
12511
+ const hasIconChild = isValidElement(children) && children.type?.displayName === "SegmentedControlIcon";
12512
+ const itemContextValue = {
12513
+ itemValue: value,
12514
+ isSelected,
12515
+ isDisabled
12516
+ };
12517
+ const mergedContext = {
12518
+ ...useSegmentedControlContext(),
12519
+ itemValue: value,
12520
+ isItemSelected: isSelected,
12521
+ itemDisabled: isDisabled
12522
+ };
11588
12523
  const handlePress = useCallback(() => {
11589
12524
  if (!isDisabled) {
11590
12525
  onValueChange(value);
11591
- if (hapticFeedback) Vibration.vibrate(10);
12526
+ if (globalHaptics && hapticFeedback) triggerHaptic("press");
11592
12527
  }
11593
12528
  }, [
11594
12529
  isDisabled,
11595
12530
  onValueChange,
11596
12531
  value,
12532
+ globalHaptics,
11597
12533
  hapticFeedback
11598
12534
  ]);
11599
12535
  const handleLayout = useCallback((event) => {
@@ -11613,23 +12549,29 @@ const SegmentedControlItem = ({ value, disabled: itemDisabled, children }) => {
11613
12549
  fontWeight: isSelected ? theme.typography.fontWeights.semibold : theme.typography.fontWeights.regular,
11614
12550
  fontSize: sizeValues.fontSize
11615
12551
  };
11616
- return /* @__PURE__ */ jsx(AnimatedPressable_default, {
11617
- style: optionStyle,
11618
- onPress: handlePress,
11619
- onLayout: handleLayout,
11620
- disabled: isDisabled,
11621
- accessibilityRole: "radio",
11622
- accessibilityState: {
11623
- checked: isSelected,
11624
- disabled: isDisabled
11625
- },
11626
- pressedScale: .975,
11627
- pressedOpacity: .9,
11628
- animationDuration: 100,
11629
- hapticFeedback: false,
11630
- children: /* @__PURE__ */ jsx(TextComponent, {
11631
- style: textStyle,
11632
- children
12552
+ return /* @__PURE__ */ jsx(SegmentedControlItemContext.Provider, {
12553
+ value: itemContextValue,
12554
+ children: /* @__PURE__ */ jsx(SegmentedControlContext.Provider, {
12555
+ value: mergedContext,
12556
+ children: /* @__PURE__ */ jsx(AnimatedPressable, {
12557
+ style: optionStyle,
12558
+ onPress: handlePress,
12559
+ onLayout: handleLayout,
12560
+ disabled: isDisabled,
12561
+ accessibilityRole: "radio",
12562
+ accessibilityState: {
12563
+ checked: isSelected,
12564
+ disabled: isDisabled
12565
+ },
12566
+ pressedScale: .975,
12567
+ pressedOpacity: .9,
12568
+ animationDuration: 100,
12569
+ hapticFeedback: false,
12570
+ children: hasValueChild || hasIconChild ? children : /* @__PURE__ */ jsx(TextComponent, {
12571
+ style: textStyle,
12572
+ children
12573
+ })
12574
+ })
11633
12575
  })
11634
12576
  });
11635
12577
  };
@@ -11637,6 +12579,7 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
11637
12579
  const SegmentedControlRoot = ({ defaultValue, value: controlledValue, onValueChange, disabled = false, color, radius, size = 3, style, highContrast = false, children, hapticFeedback = true }) => {
11638
12580
  const theme = useTheme$1();
11639
12581
  const mode = useThemeMode$1();
12582
+ const globalHaptics = useHaptics$1();
11640
12583
  const isDark = mode === "dark";
11641
12584
  const grayScale = isDark ? theme.colors.gray.dark : theme.colors.gray;
11642
12585
  const grayAlpha = getGrayAlpha(theme);
@@ -11733,7 +12676,11 @@ const SegmentedControlRoot = ({ defaultValue, value: controlledValue, onValueCha
11733
12676
  onItemLayout: handleItemLayout,
11734
12677
  theme,
11735
12678
  pillBackgroundColor,
11736
- hapticFeedback
12679
+ hapticFeedback,
12680
+ globalHaptics,
12681
+ itemValue: null,
12682
+ isItemSelected: false,
12683
+ itemDisabled: false
11737
12684
  };
11738
12685
  const pillWidth = itemLayouts[currentValue]?.width || 0;
11739
12686
  const pillInnerRadius = selectedRadius === "full" ? 9999 : radii;
@@ -11762,7 +12709,9 @@ const SegmentedControlRoot = ({ defaultValue, value: controlledValue, onValueCha
11762
12709
  SegmentedControlRoot.displayName = "SegmentedControlRoot";
11763
12710
  const SegmentedControl = {
11764
12711
  Item: SegmentedControlItem,
11765
- Root: SegmentedControlRoot
12712
+ Root: SegmentedControlRoot,
12713
+ Value: SegmentedControlValue,
12714
+ Icon: SegmentedControlIcon
11766
12715
  };
11767
12716
  const styles$4 = StyleSheet.create({
11768
12717
  container: {
@@ -12121,6 +13070,7 @@ const AccordionTrigger = React.forwardRef(({ children, style, icon, hapticFeedba
12121
13070
  const itemContext = useAccordionItemContext();
12122
13071
  const theme = useTheme$1();
12123
13072
  const mode = useThemeMode$1();
13073
+ const globalHaptics = useHaptics$1();
12124
13074
  const { value, open, disabled } = itemContext;
12125
13075
  const { size, dir, collapsible, type, onValueChange } = accordionContext;
12126
13076
  const grayAlpha = getGrayAlpha(theme, mode);
@@ -12168,7 +13118,7 @@ const AccordionTrigger = React.forwardRef(({ children, style, icon, hapticFeedba
12168
13118
  if (open) onValueChange(currentValue.filter((v) => v !== value));
12169
13119
  else onValueChange([...currentValue, value]);
12170
13120
  }
12171
- if (hapticFeedback) Vibration.vibrate(10);
13121
+ if (globalHaptics && hapticFeedback) triggerHaptic("selection");
12172
13122
  };
12173
13123
  const rtlRotationInterpolate = rotationAnim.interpolate({
12174
13124
  inputRange: [0, 1],
@@ -12188,7 +13138,7 @@ const AccordionTrigger = React.forwardRef(({ children, style, icon, hapticFeedba
12188
13138
  const getIconColor = () => {
12189
13139
  return grayAlpha["11"];
12190
13140
  };
12191
- return /* @__PURE__ */ jsxs(AnimatedPressable_default, {
13141
+ return /* @__PURE__ */ jsxs(AnimatedPressable, {
12192
13142
  ref,
12193
13143
  style: [triggerStyle, style],
12194
13144
  onPress: handlePress,
@@ -12226,7 +13176,7 @@ const AccordionTrigger = React.forwardRef(({ children, style, icon, hapticFeedba
12226
13176
  transform: [{ rotate: rtlRotationInterpolate }],
12227
13177
  marginLeft: theme.space[2]
12228
13178
  },
12229
- children: /* @__PURE__ */ jsx(ChevronDownIcon$1, {
13179
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, {
12230
13180
  width: sizeStyles.iconSize,
12231
13181
  height: sizeStyles.iconSize,
12232
13182
  color: getIconColor()
@@ -12376,4 +13326,4 @@ const useResponsive = (breakpoints = defaultBreakpoints) => {
12376
13326
  };
12377
13327
 
12378
13328
  //#endregion
12379
- export { AbsoluteCenter, Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionRoot, AccordionTrigger, RnActivityIndicator as ActivityIndicator, AlertDialogComponent as AlertDialog, AnimatedPressable, AspectRatio, Avatar, Badge, Blockquote, BottomSheet, Box, Button, ButtonIcon, ButtonLabel, Callout, CalloutIcon, CalloutRoot, CalloutText, Card, Center, Checkbox, CheckboxCards, CheckboxCardsItem, CheckboxCardsRoot, CheckboxGroup, Code, Container, ContextMenu, DataList, DataListItem, DataListLabel, DataListRoot, DataListValue, Dialog, DropdownMenu, Em, FancyList, RnFlatList as FlatList, Flex, Grid, HCenter, HStack, Heading, IconButton, RnImage as Image, Inset, Kbd, Link, ManagedPortal, Popover, Portal, PortalProvider, RnPressable as Pressable, RnText as PrimitiveText, Progress, Radio, RadioCards, RadioCardsItem, RadioCardsRoot, RadioGroup, RadioGroupItem, RadioGroupRoot, ScrollArea, RnScrollView as ScrollView, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectOverlay, SelectPortal, SelectRoot, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Slot, Spacer, Spinner, Stack, Strong, Switch, TabNav, Table, Tabs, TextComponent as Text, TextArea, TextField, RnTextInput as TextInput, ThemeProvider, Toast, TooltipExport as Tooltip, RnTouchableHighlight as TouchableHighlight, RnTouchableOpacity as TouchableOpacity, VCenter, VStack, RnView as View, VisuallyHidden, addColorSchemeListener, amber, amberAlpha, black, blackAlpha, blue, blueAlpha, bronze, bronzeAlpha, brown, brownAlpha, calculatePopoverPosition, createTheme, crimson, crimsonAlpha, cyan, cyanAlpha, defaultTheme, fontFamilies, getAccentAlpha, getAccentAlphaScale, getAccentColor, getAccentContrast, getAccentScale, getAccentTextColor, getActiveColors, getColorAlpha, getColorScale, getColorScheme, getContrast, getDisabledColors, getExtendedAccentScale, getFocusColor, getForegroundColor, getGrayAlpha, getGrayScale, getHighContrastBackground, getHighContrastTextColor, getHoverColors, getRadii, getSelectionColor, getShadow, getShadows, getSpace, getThemeColors, getThemeShadow, getTypography, getVariantColors, gold, goldAlpha, grass, grassAlpha, gray, grayAlpha, green, greenAlpha, indigo, indigoAlpha, iris, irisAlpha, jade, jadeAlpha, lime, limeAlpha, mauve, mauveAlpha, mint, mintAlpha, needsDarkText, olive, oliveAlpha, orange, orangeAlpha, pink, pinkAlpha, plum, plumAlpha, purple, purpleAlpha, radii, radiusFactors, red, redAlpha, ruby, rubyAlpha, sage, sageAlpha, sand, sandAlpha, scalingOptions, shadows, sky, skyAlpha, slate, slateAlpha, space, teal, tealAlpha, tomato, tomatoAlpha, typography, useAnchorPosition, useDeviceColorScheme, usePortal, useResponsive, useTheme, useThemeActions, useThemeColors, useThemeContext, useThemeMode, useToast, useToastContext, violet, violetAlpha, white, whiteAlpha, yellow, yellowAlpha };
13329
+ export { AbsoluteCenter, Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionRoot, AccordionTrigger, RnActivityIndicator as ActivityIndicator, AlertDialogComponent as AlertDialog, AnimatedPressable, AspectRatio, Avatar, Badge, Blockquote, BottomSheet, Box, Button, ButtonIcon, ButtonLabel, Callout, CalloutIcon, CalloutRoot, CalloutText, Card, Center, Checkbox, CheckboxCards, CheckboxCardsItem, CheckboxCardsRoot, CheckboxGroup, Code, Container, ContextMenu, DataList, DataListItem, DataListLabel, DataListRoot, DataListValue, Dialog, DropdownMenu, Em, FancyList, RnFlatList as FlatList, Flex, Grid, HCenter, HStack, Heading, IconButton, RnImage as Image, Inset, Kbd, Link, ManagedPortal, Popover, Portal, PortalProvider, RnPressable as Pressable, RnText as PrimitiveText, Progress, Radio, RadioCards, RadioCardsItem, RadioCardsRoot, RadioGroup, RadioGroupItem, RadioGroupRoot, ScrollArea, RnScrollView as ScrollView, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectOverlay, SelectPortal, SelectRoot, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, Skeleton, Slider, Slot, Spacer, Spinner, Stack, Strong, Switch, TabNav, Table, Tabs, TextComponent as Text, TextArea, TextField, RnTextInput as TextInput, ThemeProvider, Toast, TooltipExport as Tooltip, RnTouchableHighlight as TouchableHighlight, RnTouchableOpacity as TouchableOpacity, VCenter, VStack, RnView as View, VisuallyHidden, addColorSchemeListener, amber, amberAlpha, black, blackAlpha, blue, blueAlpha, bronze, bronzeAlpha, brown, brownAlpha, calculatePopoverPosition, createTheme, crimson, crimsonAlpha, cyan, cyanAlpha, defaultTheme, fontFamilies, getAccentAlpha, getAccentAlphaScale, getAccentColor, getAccentContrast, getAccentScale, getAccentTextColor, getActiveColors, getColorAlpha, getColorScale, getColorScheme, getContrast, getDisabledColors, getExtendedAccentScale, getFocusColor, getForegroundColor, getGrayAlpha, getGrayScale, getHighContrastBackground, getHighContrastTextColor, getHoverColors, getRadii, getSelectionColor, getShadow, getShadows, getSpace, getThemeColors, getThemeShadow, getTypography, getVariantColors, gold, goldAlpha, grass, grassAlpha, gray, grayAlpha, green, greenAlpha, indigo, indigoAlpha, iris, irisAlpha, jade, jadeAlpha, lime, limeAlpha, mauve, mauveAlpha, mint, mintAlpha, needsDarkText, olive, oliveAlpha, orange, orangeAlpha, pink, pinkAlpha, plum, plumAlpha, purple, purpleAlpha, radii, radiusFactors, red, redAlpha, ruby, rubyAlpha, sage, sageAlpha, sand, sandAlpha, scalingOptions, shadows, sky, skyAlpha, slate, slateAlpha, space, teal, tealAlpha, tomato, tomatoAlpha, typography, useAnchorPosition, useDeviceColorScheme, useHaptics, usePortal, useResponsive, useTheme, useThemeActions, useThemeColors, useThemeContext, useThemeMode, useToast, useToastContext, violet, violetAlpha, white, whiteAlpha, yellow, yellowAlpha };