cdslibrary 1.2.13 → 1.2.15

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.
@@ -43,6 +43,7 @@ export const CDSBottomSheet = ({
43
43
  ]).start(() => {
44
44
  // Importante: onFinish se ejecuta SOLO cuando la animación termina
45
45
  if (onFinish) onFinish();
46
+ if (primaryButtonOnPress) primaryButtonOnPress();
46
47
  setModalVisible(false);
47
48
  });
48
49
  };
@@ -126,17 +127,13 @@ export const CDSBottomSheet = ({
126
127
  <CDSButton
127
128
  label={primaryButtonLabel}
128
129
  onPress={() => {
129
- if (primaryButtonOnPress) primaryButtonOnPress();
130
130
  handleClose();
131
131
  }}
132
132
  />
133
133
  <CDSButton
134
134
  label={secondaryButtonLabel}
135
135
  type="ghost"
136
- onPress={() => {
137
- onFinish && onFinish();
138
- handleClose;
139
- }}
136
+ onPress={handleClose}
140
137
  />
141
138
  </View>
142
139
  )}
@@ -151,10 +148,7 @@ export const CDSBottomSheet = ({
151
148
  },
152
149
  ]}
153
150
  >
154
- <Pressable onPress={() => {
155
- onFinish && onFinish();
156
- handleClose;
157
- }} style={{ flex: 1 }} />
151
+ <Pressable onPress={handleClose} style={{ flex: 1 }} />
158
152
  </Animated.View>
159
153
  </>
160
154
  );
@@ -212,7 +206,7 @@ const styles = StyleSheet.create({
212
206
  },
213
207
  actionsContainer: {
214
208
  typeBottomSheet: {
215
- flexDirection: "row",
209
+ flexDirection: "column",
216
210
  width: "100%",
217
211
  gap: 8,
218
212
  paddingBottom: 20,
@@ -18,6 +18,7 @@ export const CDSButton = ({
18
18
  }) => {
19
19
  const { theme } = useTheme();
20
20
 
21
+ console.log(isMobile)
21
22
 
22
23
  const backgroundColor =
23
24
  type === "disabled"
@@ -39,7 +40,7 @@ export const CDSButton = ({
39
40
  activeOpacity={0.7}
40
41
  style={[
41
42
  styles.container,
42
- { flexGrow: (variant === "fill" ? 1 : 0), paddingHorizontal: theme.space.sm, paddingVertical: theme.space.xs, backgroundColor, borderRadius: theme.radius.full, gap: theme.space.xs },
43
+ { flexGrow: (variant === "fill" || isMobile ? 1 : 0), alignSelf: (variant === "fill" || isMobile) ? "stretch" : "center", paddingHorizontal: theme.space.sm, paddingVertical: theme.space.xs, backgroundColor, borderRadius: theme.radius.full, gap: theme.space.xs },
43
44
  flexend && { justifyContent: "flex-end", paddingHorizontal: 0 },
44
45
  {
45
46
  paddingHorizontal: type === "icon" ? theme.space.xs : theme.space.sm,
@@ -82,7 +83,6 @@ export const CDSButton = ({
82
83
 
83
84
  const styles = StyleSheet.create({
84
85
  container: {
85
- alignSelf: "center",
86
86
  flexDirection: "row",
87
87
  alignItems: "center",
88
88
  justifyContent: "center",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cdslibrary",
3
3
  "license": "0BSD",
4
- "version": "1.2.13",
4
+ "version": "1.2.15",
5
5
  "main": "index.js",
6
6
  "author": "Nat Viramontes",
7
7
  "description": "A library of components for the CDS project",
@@ -11,29 +11,31 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@expo-google-fonts/inter": "^0.2.3",
14
+ "@expo/metro-runtime": "^6.1.2",
14
15
  "@expo/vector-icons": "^15.0.3",
15
16
  "@lottiefiles/dotlottie-react": "^0.13.5",
17
+ "cli": "^1.0.1",
16
18
  "expo-linear-gradient": "~15.0.8",
17
19
  "lottie-react-native": "^7.3.5",
18
- "cli": "^1.0.1"
20
+ "react-native-web": "^0.21.2"
19
21
  },
20
22
  "peerDependencies": {
23
+ "@react-navigation/native": "*",
24
+ "expo": ">=54.0.0",
21
25
  "react": "*",
22
26
  "react-dom": "*",
23
27
  "react-native": "*",
24
- "expo": ">=54.0.0",
25
- "react-native-reanimated": ">=3.0.0",
26
28
  "react-native-gesture-handler": "*",
29
+ "react-native-reanimated": ">=3.0.0",
27
30
  "react-native-safe-area-context": "*",
28
- "react-native-screens": "*",
29
- "@react-navigation/native": "*"
31
+ "react-native-screens": "*"
30
32
  },
31
33
  "devDependencies": {
32
34
  "@babel/core": "^7.28.6",
35
+ "expo": "^54.0.31",
33
36
  "react": "19.1.0",
34
37
  "react-dom": "19.1.0",
35
38
  "react-native": "0.81.5",
36
- "expo": "^54.0.31",
37
39
  "react-native-reanimated": "~3.16.1"
38
40
  }
39
41
  }