cdslibrary 1.2.69 → 1.2.71

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.
@@ -59,9 +59,9 @@ export const CDSAccordion = ({ title, description, children, defaultExpanded = f
59
59
  style={[
60
60
  styles.header,
61
61
  {
62
+ padding: theme.space.md,
62
63
  borderTopRightRadius: theme.radius.md,
63
64
  borderTopLeftRadius: theme.radius.md,
64
- // Si no está expandido, redondeamos también abajo
65
65
  borderBottomRightRadius: expanded ? 0 : theme.radius.md,
66
66
  borderBottomLeftRadius: expanded ? 0 : theme.radius.md,
67
67
  },
@@ -72,12 +72,14 @@ export const CDSAccordion = ({ title, description, children, defaultExpanded = f
72
72
  }
73
73
  ]}
74
74
  >
75
- <Text style={[styles.title, theme.typography.semiBold.md]}>
76
- {title}
77
- </Text>
75
+ <View style={styles.title}>
76
+ <Text style={[theme.typography.label]}>
77
+ {title}
78
+ </Text>
79
+ </View>
78
80
  <MaterialCommunityIcons
79
81
  name={expanded ? "minus" : "plus"}
80
- size={24}
82
+ size={theme.typography.icon.xl}
81
83
  color={theme.text.neutral.primary}
82
84
  />
83
85
  </Pressable>
@@ -86,12 +88,11 @@ export const CDSAccordion = ({ title, description, children, defaultExpanded = f
86
88
  {/* CONTENEDOR DE MEDICIÓN: Es invisible y absoluto, solo sirve para saber cuánto mide el children */}
87
89
  <View
88
90
  onLayout={onLayout}
89
- style={styles.measureContainer}
90
- pointerEvents="none"
91
+ style={[styles.measureContainer, {pointerEvents: 'none'}]}
91
92
  >
92
93
  <View style={{ paddingVertical: theme.space.md, gap: theme.space.md }}>
93
94
  {description && (
94
- <Text style={[styles.description, theme.typography.regular.sm]}>
95
+ <Text style={[styles.description, theme.typography.regular.md]}>
95
96
  {description}
96
97
  </Text>
97
98
  )}
@@ -102,7 +103,7 @@ export const CDSAccordion = ({ title, description, children, defaultExpanded = f
102
103
  {/* CONTENEDOR VISIBLE: El que el usuario realmente ve animarse */}
103
104
  <View style={{ paddingVertical: theme.space.md, gap: theme.space.md }}>
104
105
  {description && (
105
- <Text style={[styles.description, theme.typography.regular.sm]}>
106
+ <Text style={[styles.description, theme.typography.regular.md]}>
106
107
  {description}
107
108
  </Text>
108
109
  )}
@@ -118,14 +119,15 @@ const styles = StyleSheet.create({
118
119
  width: "100%",
119
120
  },
120
121
  header: {
122
+ width: '100%',
121
123
  flexDirection: "row",
122
- justifyContent: "space-between",
123
124
  alignItems: "center",
124
- padding: 16,
125
- minHeight: 56,
125
+ minHeight: 72,
126
+ justifyContent: 'space-between'
127
+
126
128
  },
127
129
  title: {
128
- flex: 1
130
+ flex: 1,
129
131
  },
130
132
  content: {
131
133
  paddingHorizontal: 16,
@@ -182,8 +182,7 @@ const bottomSheetRender = ({
182
182
  </ScrollView>
183
183
  <LinearGradient
184
184
  colors={['transparent', theme.surface.neutral.primary]}
185
- style={styles.fadeGradient}
186
- pointerEvents="none"
185
+ style={[styles.fadeGradient, {pointerEvents: 'none'}]}
187
186
  />
188
187
  </View>
189
188
 
@@ -58,7 +58,7 @@ export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeTe
58
58
  borderWidth: 1 + flashValue.value * 1,
59
59
  };
60
60
  });
61
-
61
+ console.log(theme.surface.neutral)
62
62
  return (
63
63
  <View style={[styles.container, { gap: theme.space.sm }]}>
64
64
  {label && (
@@ -71,18 +71,17 @@ export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeTe
71
71
  styles.wrapper,
72
72
  animatedBoxStyle,
73
73
  {
74
- backgroundColor: type === 'readOnly' ? theme.surface.action.disabled : theme.surface.neutral.primary,
74
+ backgroundColor: type === 'readOnly' ? theme.surface.neutral.primaryVariant : theme.surface.neutral.primary,
75
75
  borderRadius: theme.radius.sm,
76
76
  }
77
77
  ]}>
78
78
  <TextInput
79
- pointerEvents={type === 'readOnly' ? 'none' : 'auto'}
80
79
  style={[
81
80
  styles.textBox,
82
81
  theme.typography.inputText.value,
83
- {
82
+ { pointerEvents: (type === 'readOnly' ? 'none' : 'auto'),
84
83
  paddingHorizontal: theme.space.sm,
85
- color: theme.text.neutral.primary,
84
+ color: (type === 'readOnly' ? theme.text.neutral.secondary :theme.text.neutral.primary),
86
85
  // @ts-ignore
87
86
  outlineStyle: 'none',
88
87
  },
@@ -12,7 +12,7 @@ export const CDSOffer = ({ description, minValue, maxValue }) => {
12
12
  return (
13
13
  <View style={[styles.mainContainer, { gap: theme.space.md }]}>
14
14
  <Text style={theme.typography.regular.md}>Por tu</Text>
15
- <Text style={theme.typography.semiBold.lg}>{description}</Text>
15
+ <Text style={[theme.typography.semiBold.lg, {textAlign: 'center'}]}>{description}</Text>
16
16
  <Text style={theme.typography.regular.md}>Hoy podrías obtener:</Text>
17
17
  <View style={[styles.minMaxContainer, { flexDirection: isMobile ? 'column' : 'row' }]}>
18
18
  <View style={[styles.containerMin, { backgroundColor: theme.surface.neutral.secondary, borderColor: theme.outline.neutral.tertiaryVariant, gap: theme.space.sm, padding: theme.space.md, borderRadius: theme.radius.md }]}>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cdslibrary",
3
3
  "license": "0BSD",
4
- "version": "1.2.69",
4
+ "version": "1.2.71",
5
5
  "main": "index.js",
6
6
  "author": "Nat Viramontes",
7
7
  "description": "A library of components for the CDS project",
@@ -180,18 +180,13 @@ export const getSemanticTextStyles = (theme, isMobile) => {
180
180
  sm: getVal('size', 'sm'),
181
181
  md: getVal('size', 'md'),
182
182
  lg: getVal('size', 'lg'),
183
+ xl: getVal('size', 'xl'),
184
+ '2xl': getVal('size', '2xl'),
185
+ '3xl': getVal('size', '3xl'),
183
186
  },
184
187
  highlightText: {
185
188
  color: theme.text.brand.primary,
186
189
  },
187
- // h5: {
188
- // fontFamily: primitiveFontValues.family.interBold,
189
- // fontSize: isMobile ? primitiveFontValues.size.typography.mobile.md : primitiveFontValues.size.typography.desktop.md,
190
- // },
191
- // h6: {
192
- // fontFamily: primitiveFontValues.family.interBold,
193
- // fontSize: isMobile ? primitiveFontValues.size.typography.mobile.sm : primitiveFontValues.size.typography.desktop.sm,
194
- // },
195
190
  }
196
191
  }
197
192