cdslibrary 1.2.91 → 1.2.93
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.
|
@@ -35,7 +35,7 @@ export const CDSImageButtonGroup = ({ array, onSelect, isCentered }) => {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
|
-
<View style={[
|
|
38
|
+
<Animated.View style={[
|
|
39
39
|
animatedLayout,
|
|
40
40
|
{ width: '100%' } // Asegura que el contenedor ocupe todo el ancho disponible
|
|
41
41
|
]}>
|
|
@@ -65,7 +65,7 @@ export const CDSImageButtonGroup = ({ array, onSelect, isCentered }) => {
|
|
|
65
65
|
/>
|
|
66
66
|
))}
|
|
67
67
|
</ScrollView>
|
|
68
|
-
</View>
|
|
68
|
+
</Animated.View>
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
|
package/components/CDSInput.jsx
CHANGED
|
@@ -12,7 +12,7 @@ import { useTheme } from "../context/CDSThemeContext";
|
|
|
12
12
|
|
|
13
13
|
const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
|
|
14
14
|
|
|
15
|
-
export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeText, animationTrigger,
|
|
15
|
+
export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeText, animationTrigger, onBlur, onFocus }) => {
|
|
16
16
|
const { theme } = useTheme();
|
|
17
17
|
const [isFocused, setIsFocused] = useState(false);
|
|
18
18
|
|
|
@@ -54,13 +54,13 @@ export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeTe
|
|
|
54
54
|
useEffect(() => {
|
|
55
55
|
// ELIMINAMOS la restricción de !isReadOnly para que se anime siempre
|
|
56
56
|
if (!isInternalChange.current && value) {
|
|
57
|
-
flashValue.value = withDelay(
|
|
58
|
-
withTiming(1, { duration:
|
|
57
|
+
flashValue.value = withDelay(300, withSequence(
|
|
58
|
+
withTiming(1, { duration: 300 }),
|
|
59
59
|
withTiming(0, { duration: 600 })
|
|
60
60
|
));
|
|
61
61
|
|
|
62
62
|
textHighlight.value = withSequence(
|
|
63
|
-
withTiming(1, { duration:
|
|
63
|
+
withTiming(1, { duration: 300 }),
|
|
64
64
|
withTiming(0, { duration: 600 })
|
|
65
65
|
);
|
|
66
66
|
}
|
|
@@ -79,8 +79,7 @@ export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeTe
|
|
|
79
79
|
|
|
80
80
|
return {
|
|
81
81
|
borderColor,
|
|
82
|
-
borderWidth: 1 + (flashValue.value *
|
|
83
|
-
transform: [{ scale: 1 + (flashValue.value * 0.02) }]
|
|
82
|
+
borderWidth: 1 + (flashValue.value * 3),
|
|
84
83
|
};
|
|
85
84
|
});
|
|
86
85
|
|
|
@@ -114,7 +113,8 @@ export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeTe
|
|
|
114
113
|
animatedBoxStyle,
|
|
115
114
|
{
|
|
116
115
|
backgroundColor: isReadOnly ? theme.surface.neutral.primaryVariant : theme.surface.neutral.primary,
|
|
117
|
-
borderRadius: theme.radius?.sm
|
|
116
|
+
borderRadius: theme.radius?.sm,
|
|
117
|
+
pointerEvents: isReadOnly ? 'none' : 'auto',
|
|
118
118
|
}
|
|
119
119
|
]}>
|
|
120
120
|
<AnimatedTextInput
|
|
@@ -136,7 +136,10 @@ export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeTe
|
|
|
136
136
|
editable={!isReadOnly}
|
|
137
137
|
secureTextEntry={type === "password"}
|
|
138
138
|
onFocus={() => { setIsFocused(true); onFocus && onFocus(); }}
|
|
139
|
-
onBlur={() =>
|
|
139
|
+
onBlur={() => {
|
|
140
|
+
setIsFocused(false);
|
|
141
|
+
onBlur && onBlur();
|
|
142
|
+
}}
|
|
140
143
|
underlineColorAndroid="transparent"
|
|
141
144
|
/>
|
|
142
145
|
</Animated.View>
|
|
@@ -145,14 +148,17 @@ export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeTe
|
|
|
145
148
|
};
|
|
146
149
|
|
|
147
150
|
const styles = StyleSheet.create({
|
|
148
|
-
container: {
|
|
151
|
+
container: {
|
|
152
|
+
width: "100%", alignSelf: 'stretch',
|
|
153
|
+
|
|
154
|
+
},
|
|
149
155
|
wrapper: {
|
|
150
156
|
width: '100%',
|
|
151
157
|
height: 48,
|
|
152
158
|
flexDirection: 'row',
|
|
153
159
|
alignItems: 'center',
|
|
154
|
-
borderWidth: 1,
|
|
155
160
|
overflow: 'hidden'
|
|
161
|
+
|
|
156
162
|
},
|
|
157
|
-
textBox: { flex: 1, height: '100%', width: '100%' },
|
|
163
|
+
textBox: { flex: 1, height: '100%', width: '100%', },
|
|
158
164
|
});
|
package/components/CDSTable.jsx
CHANGED
|
@@ -69,7 +69,6 @@ export const CDSTable = ({ columns, data, breakpoint = 500 }) => {
|
|
|
69
69
|
styles.cell,
|
|
70
70
|
{ padding: theme.space.sm },
|
|
71
71
|
col.width ? { width: col.width } : { flex: 1 },
|
|
72
|
-
// Alinea el contenedor para móvil (Expo Go)
|
|
73
72
|
col.align === 'right' ? { alignItems: 'flex-end' } : { alignItems: 'flex-start' }
|
|
74
73
|
]}
|
|
75
74
|
>
|
|
@@ -78,7 +77,6 @@ export const CDSTable = ({ columns, data, breakpoint = 500 }) => {
|
|
|
78
77
|
{
|
|
79
78
|
color: theme.text.neutral.secondary,
|
|
80
79
|
textAlign: col.align || 'left',
|
|
81
|
-
// Tabular-nums asegura que los números tengan el mismo ancho (perfecto para precios)
|
|
82
80
|
fontVariant: col.align === 'right' ? ['tabular-nums'] : [],
|
|
83
81
|
}
|
|
84
82
|
]}>
|