cdslibrary 1.2.59 → 1.2.61

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.
@@ -89,7 +89,7 @@ const bottomSheetRender = ({
89
89
  translation.value = withTiming(startPos, { duration: 300 });
90
90
  opacity.value = withTiming(0, { duration: 300 });
91
91
  }
92
- }, [isVisible, isMobile]);
92
+ }, [isVisible]);
93
93
 
94
94
  // --- 5. Estilos Animados ---
95
95
  const animatedStyle = useAnimatedStyle(() => {
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect } from "react";
2
- import { StyleSheet, Text, TouchableOpacity, } from "react-native";
2
+ import { StyleSheet, Text, TouchableOpacity, } from "react-native";
3
3
  import Animated, {
4
4
  useSharedValue,
5
5
  useAnimatedStyle,
@@ -18,17 +18,11 @@ export const CDSSnackBar = ({ message, visible, onDismiss, action }) => {
18
18
  // Sincronizar visibilidad con animación
19
19
  useEffect(() => {
20
20
  if (visible) {
21
- translateY.value = withSpring(0, {
22
- damping: 25,
23
- stiffness: 90,
24
- overshootClamping: true
25
- });
26
- opacity.value = withTiming(1, { duration: 300 });
21
+ translateY.value = withSpring(0, { damping: 15 });
27
22
  } else {
28
- translation.value = withTiming(startPos, { duration: 300 });
29
- opacity.value = withTiming(0, { duration: 300 });
23
+ translateY.value = withTiming(150);
30
24
  }
31
- }, [visible, isMobile]);
25
+ }, [visible]);
32
26
 
33
27
  // Lógica de auto-ocultado
34
28
  useEffect(() => {
@@ -61,17 +55,9 @@ export const CDSSnackBar = ({ message, visible, onDismiss, action }) => {
61
55
  }
62
56
  });
63
57
 
64
- const animatedStyle = useAnimatedStyle(() => {
65
- return {
66
- transform: [
67
- { translateY: translateY.value }
68
- ],
69
- };
70
- });
71
-
72
- useEffect(() => {
73
- translateY.value = withTiming(visible ? 0 : 150, { duration: 400 });
74
- }, [visible]);
58
+ const animatedStyle = useAnimatedStyle(() => ({
59
+ transform: [{ translateY: translateY.value }],
60
+ }));
75
61
 
76
62
  if (!visible && translateY.value >= 100) return null;
77
63
 
@@ -119,8 +105,8 @@ const styles = StyleSheet.create({
119
105
  flexDirection: 'row',
120
106
  alignItems: 'center',
121
107
  justifyContent: 'space-between',
122
- bottom: 40,
123
- zIndex: 9999,
108
+ bottom: 40,
109
+ zIndex: 9999,
124
110
  elevation: 10,
125
111
  },
126
112
  actionButton: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cdslibrary",
3
3
  "license": "0BSD",
4
- "version": "1.2.59",
4
+ "version": "1.2.61",
5
5
  "main": "index.js",
6
6
  "author": "Nat Viramontes",
7
7
  "description": "A library of components for the CDS project",