cdslibrary 1.2.31 → 1.2.32
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.
- package/components/CDSInput.jsx +6 -5
- package/package.json +1 -1
package/components/CDSInput.jsx
CHANGED
|
@@ -16,7 +16,7 @@ export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeTe
|
|
|
16
16
|
if (parts.length > 2) {
|
|
17
17
|
cleaned = parts[0] + '.' + parts.slice(1).join('');
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
// Enviamos el valor limpio al padre (index.js)
|
|
21
21
|
onChangeText && onChangeText(cleaned);
|
|
22
22
|
} else {
|
|
@@ -33,20 +33,21 @@ export const CDSInput = ({ label, type, keyboard, placeholder, value, onChangeTe
|
|
|
33
33
|
)}
|
|
34
34
|
|
|
35
35
|
<TextInput
|
|
36
|
+
pointerEvents={type === 'readOnly' && 'none'}
|
|
36
37
|
style={[
|
|
37
38
|
styles.textBox,
|
|
38
39
|
theme.typography.inputText.value,
|
|
39
40
|
{
|
|
40
|
-
backgroundColor: theme.surface.neutral.primary,
|
|
41
|
-
// Usamos 'value' (la prop) para decidir el color del borde
|
|
41
|
+
backgroundColor: type === 'readOnly' ? theme.surface.action.disabled : theme.surface.neutral.primary,
|
|
42
42
|
borderColor: isFocused
|
|
43
|
-
? theme.outline.neutral.focus
|
|
43
|
+
? theme.outline.neutral.focus
|
|
44
44
|
: value ? theme.outline.neutral.tertiaryVariant // Cambiado 'text' por 'value'
|
|
45
|
-
|
|
45
|
+
: theme.outline.neutral.primary,
|
|
46
46
|
borderRadius: theme.radius.sm,
|
|
47
47
|
paddingHorizontal: theme.space.xs,
|
|
48
48
|
color: theme.text.neutral.primary,
|
|
49
49
|
outlineStyle: 'none',
|
|
50
|
+
|
|
50
51
|
},
|
|
51
52
|
]}
|
|
52
53
|
placeholder={placeholder}
|