cdslibrary 1.2.26 → 1.2.28

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.
@@ -14,7 +14,7 @@ export const CDSAccordion = ({ title, description, children, defaultExpanded = f
14
14
  const { theme } = useTheme();
15
15
  const [expanded, setExpanded] = useState(defaultExpanded);
16
16
  const [contentHeight, setContentHeight] = useState(0); // Altura real medida
17
-
17
+
18
18
  const animation = useSharedValue(defaultExpanded ? 1 : 0);
19
19
 
20
20
  const toggleAccordion = () => {
@@ -84,12 +84,12 @@ export const CDSAccordion = ({ title, description, children, defaultExpanded = f
84
84
 
85
85
  <Animated.View style={[styles.content, bodyStyle, { overflow: 'hidden' }]}>
86
86
  {/* CONTENEDOR DE MEDICIÓN: Es invisible y absoluto, solo sirve para saber cuánto mide el children */}
87
- <View
88
- onLayout={onLayout}
87
+ <View
88
+ onLayout={onLayout}
89
89
  style={styles.measureContainer}
90
90
  pointerEvents="none"
91
91
  >
92
- <View style={styles.paddingWrapper}>
92
+ <View style={{ paddingVertical: theme.space.sm, gap: theme.space.md }}>
93
93
  {description && (
94
94
  <Text style={[styles.description, theme.typography.regular.sm]}>
95
95
  {description}
@@ -100,7 +100,7 @@ export const CDSAccordion = ({ title, description, children, defaultExpanded = f
100
100
  </View>
101
101
 
102
102
  {/* CONTENEDOR VISIBLE: El que el usuario realmente ve animarse */}
103
- <View style={styles.paddingWrapper}>
103
+ <View style={{ paddingVertical: theme.space.sm, gap: theme.space.md }}>
104
104
  {description && (
105
105
  <Text style={[styles.description, theme.typography.regular.sm]}>
106
106
  {description}
@@ -124,8 +124,8 @@ const styles = StyleSheet.create({
124
124
  padding: 16,
125
125
  minHeight: 56,
126
126
  },
127
- title: {
128
- flex: 1
127
+ title: {
128
+ flex: 1
129
129
  },
130
130
  content: {
131
131
  paddingHorizontal: 16,
@@ -12,19 +12,19 @@ export const CDSOffer = ({ description, minValue, maxValue }) => {
12
12
  const { theme } = useTheme();
13
13
  console.log(theme)
14
14
  return (
15
- <View style={[styles.mainContainer, { gap: theme.space.xs }]}>
15
+ <View style={[styles.mainContainer, { gap: theme.space.sm }]}>
16
16
  <Text style={theme.typography.regular.md}>Por tu</Text>
17
17
  <Text style={theme.typography.semiBold.lg}>{description}</Text>
18
18
  <Text style={theme.typography.regular.md}>Hoy podrías obtener:</Text>
19
19
  <View style={[styles.minMaxContainer, { flexDirection: isMobile ? 'column' : 'row' }]}>
20
- <View style={[styles.containerMin, { backgroundColor: theme.surface.neutral.secondary, borderColor: theme.outline.neutral.tertiaryVariant, gap: theme.space.xs, padding: theme.space.sm, borderRadius: theme.radius.lg }]}>
20
+ <View style={[styles.containerMin, { backgroundColor: theme.surface.neutral.secondary, borderColor: theme.outline.neutral.tertiaryVariant, gap: theme.space.xs, padding: theme.space.sm, borderRadius: theme.radius.md }]}>
21
21
  <Text style={[theme.typography.regular.md, { color: theme.text.neutral.primary }]}>Desde</Text>
22
22
  <Text style={[theme.typography.h3, { textAlign: 'center', color: theme.text.neutral.primary }]}>{`$${parseFloat(minValue).toLocaleString('en-US', {
23
23
  minimumFractionDigits: 2,
24
24
  maximumFractionDigits: 2
25
25
  })}`}</Text>
26
26
  </View>
27
- <View style={[styles.containerMax, { marginTop: isMobile ? -theme.space.xs : 0, marginLeft: isMobile ? 0 : -theme.space.xl, backgroundColor: theme.surface.brand.primaryVariant, borderColor: theme.outline.brand.secondary, gap: theme.space.xs, padding: theme.space.sm, borderRadius: theme.radius.lg }]}>
27
+ <View style={[styles.containerMax, { marginTop: isMobile ? -theme.space.xs : 0, marginLeft: isMobile ? 0 : -theme.space.xl, backgroundColor: theme.surface.brand.primaryVariant, borderColor: theme.outline.brand.secondary, gap: theme.space.xs, padding: theme.space.sm, borderRadius: theme.radius.md }]}>
28
28
  <Text style={[theme.typography.regular.md, { color: theme.text.brand.primary }]}>Hasta</Text>
29
29
  <Text style={[theme.typography.h1, { textAlign: 'center', color: theme.text.brand.primary }]}>{`$${parseFloat(maxValue).toLocaleString('en-US', {
30
30
  minimumFractionDigits: 2,
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
- // import { registerRootComponent } from 'expo';
2
+ import { registerRootComponent } from 'expo';
3
3
 
4
- // import App from './App';
5
- // registerRootComponent(App);
4
+ import App from './App';
5
+ registerRootComponent(App);
6
6
 
7
7
  export {CDSBottomSheet} from './components/CDSBottomSheet';
8
8
  export {CDSButton} from './components/CDSButton';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cdslibrary",
3
3
  "license": "0BSD",
4
- "version": "1.2.26",
4
+ "version": "1.2.28",
5
5
  "main": "index.js",
6
6
  "author": "Nat Viramontes",
7
7
  "description": "A library of components for the CDS project",