cdslibrary 1.2.63 → 1.2.65

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.
@@ -66,7 +66,7 @@ const bottomSheetRender = ({
66
66
  })
67
67
  .onEnd((event) => {
68
68
  // Si arrastra más de 100px o hace un "flick" rápido -> CERRAR
69
- if (event.translationY > 100 || event.velocityY > 600) {
69
+ if (event.translationY > 200 || event.velocityY > 2000) {
70
70
  handleClose();
71
71
  } else {
72
72
  // Si no, rebota a posición original
@@ -82,7 +82,7 @@ const bottomSheetRender = ({
82
82
  duration: 300,
83
83
  easing: Easing.out(Easing.exp),
84
84
  });
85
- opacity.value = withTiming(1, { duration: 300 });
85
+ opacity.value = withTiming(1, { duration: 200 });
86
86
  }
87
87
  }, [isVisible]);
88
88
 
@@ -127,7 +127,7 @@ const bottomSheetRender = ({
127
127
  {
128
128
  backgroundColor: theme.surface.neutral.primary,
129
129
  // Mantenemos tu lógica exacta de padding y gaps
130
- paddingTop: (hasClose ? theme.space['2xl'] : theme.space.lg),
130
+ paddingTop: (hasClose ? theme.space['2xl'] : theme.space.xl),
131
131
  gap: theme.space.md,
132
132
  ...(isMobile ? {
133
133
  borderTopLeftRadius: theme.radius.lg,
@@ -161,11 +161,11 @@ const bottomSheetRender = ({
161
161
 
162
162
  {!!title && <Text style={[theme.typography.h3, {marginHorizontal: theme.space.md}]}>{title}</Text>}
163
163
 
164
- <View style={styles.scrollWrapper}>
164
+ <View style={[styles.scrollWrapper, ]}>
165
165
  <ScrollView
166
166
  ref={ref}
167
167
  style={styles.scrollArea}
168
- contentContainerStyle={[styles.scrollContent, { paddingBottom: theme.space.sm }]}
168
+ contentContainerStyle={[styles.scrollContent, { paddingBottom: theme.space.xl }]}
169
169
  showsVerticalScrollIndicator={true}
170
170
  bounces={true}
171
171
  alwaysBounceVertical={false}
@@ -241,6 +241,7 @@ const styles = StyleSheet.create({
241
241
  flex: 1,
242
242
  position: 'relative',
243
243
  width: '100%',
244
+ paddingBottom: 1
244
245
  },
245
246
  scrollArea: {
246
247
  flex: 1,
@@ -254,7 +255,7 @@ const styles = StyleSheet.create({
254
255
  bottom: 0,
255
256
  left: 0,
256
257
  right: 0,
257
- height: 40,
258
+ height: 24,
258
259
  },
259
260
  actionsContainer: {
260
261
  typeBottomSheet: {
@@ -33,6 +33,7 @@ export const CDSImageButtonGroup = ({ array, onSelect, isCentered }) => {
33
33
  }),
34
34
  opacity: animatedValue,
35
35
  };
36
+ console.log(array.length)
36
37
 
37
38
  return (
38
39
  <Animated.View style={[
@@ -46,11 +47,10 @@ export const CDSImageButtonGroup = ({ array, onSelect, isCentered }) => {
46
47
  contentContainerStyle={[
47
48
  styles.scrollContent,
48
49
  {
49
- justifyContent: (isCentered ? 'center' : 'flex-start'),
50
-
50
+ justifyContent: (isCentered || !isMobile || (isMobile && array.length <= 2) ? 'center' : 'flex-start'),
51
51
  gap: theme.space.sm,
52
52
  padding: theme.space.md,
53
- width: (isMobile ? 'auto' : '100%')
53
+ minWidth: '100%'
54
54
  }
55
55
  ]}
56
56
  >
@@ -73,7 +73,6 @@ const styles = StyleSheet.create({
73
73
  overflow: 'visible',
74
74
  },
75
75
  scrollContent: {
76
- width: '100%',
77
76
  flexDirection: 'row',
78
77
  alignItems: 'center',
79
78
  }
@@ -55,9 +55,17 @@ export const CDSSnackBar = ({ message, visible, onDismiss, action }) => {
55
55
  }
56
56
  });
57
57
 
58
- const animatedStyle = useAnimatedStyle(() => ({
59
- transform: [{ translateY: translateY.value }],
60
- }));
58
+ const animatedStyle = useAnimatedStyle(() => {
59
+ return {
60
+ transform: [
61
+ { translateY: translateY.value }
62
+ ],
63
+ };
64
+ });
65
+
66
+ useEffect(() => {
67
+ translateY.value = withTiming(visible ? 0 : 150, { duration: 400 });
68
+ }, [visible]);
61
69
 
62
70
  if (!visible && translateY.value >= 100) return null;
63
71
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cdslibrary",
3
3
  "license": "0BSD",
4
- "version": "1.2.63",
4
+ "version": "1.2.65",
5
5
  "main": "index.js",
6
6
  "author": "Nat Viramontes",
7
7
  "description": "A library of components for the CDS project",