@cdek-it/react-native-ui-kit 0.4.1 → 0.4.2
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 @@ import { useStyles } from './useStyles';
|
|
|
14
14
|
*/
|
|
15
15
|
export const InputTextBase = memo(
|
|
16
16
|
// eslint-disable-next-line max-lines-per-function
|
|
17
|
-
({ state, clearable = true, secureTextEntry: secureTextEntryProp = false, inputRef: propsInputRef, disabled, containerStyle, loading, renderTextInput, clearButtonAccessibilityLabel, floatLabel = false, placeholder, ...otherProps
|
|
17
|
+
({ state, clearable = true, secureTextEntry: secureTextEntryProp = false, inputRef: propsInputRef, disabled, containerStyle, loading, renderTextInput, clearButtonAccessibilityLabel, floatLabel = false, placeholder, editable = true, ...otherProps
|
|
18
18
|
// TODO: разделить float label и обычный инпут -> добавить во float label поддержку font scale
|
|
19
19
|
// eslint-disable-next-line complexity
|
|
20
20
|
}) => {
|
|
@@ -80,7 +80,7 @@ export const InputTextBase = memo(
|
|
|
80
80
|
allowFontScaling: floatLabel ? false : otherProps.allowFontScaling,
|
|
81
81
|
placeholder: '',
|
|
82
82
|
testID: makeTestId(),
|
|
83
|
-
editable:
|
|
83
|
+
editable: disabled ? false : editable,
|
|
84
84
|
secureTextEntry,
|
|
85
85
|
style: [
|
|
86
86
|
styles.inputFont,
|
|
@@ -97,6 +97,7 @@ export const InputTextBase = memo(
|
|
|
97
97
|
floatLabel,
|
|
98
98
|
makeTestId,
|
|
99
99
|
disabled,
|
|
100
|
+
editable,
|
|
100
101
|
secureTextEntry,
|
|
101
102
|
styles.inputFont,
|
|
102
103
|
styles.floatLabelInput,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Ref, ReactNode } from 'react';
|
|
2
2
|
import type { TextInputProps, ViewStyle, TextInput } from 'react-native';
|
|
3
3
|
/** @see TextInputProps */
|
|
4
|
-
export interface InputTextBaseProps extends Omit<TextInputProps, 'style' | '
|
|
4
|
+
export interface InputTextBaseProps extends Omit<TextInputProps, 'style' | 'secureTextEntry'> {
|
|
5
5
|
/**
|
|
6
6
|
* Управление отображения иконки очистки поля
|
|
7
7
|
* @default true
|
|
@@ -65,6 +65,7 @@ export const useStyles = makeStyles(({ theme, border, typography, spacing, fonts
|
|
|
65
65
|
paddingHorizontal: theme.Form.InputText.inputPaddingLeftRight,
|
|
66
66
|
gap: theme.Form.InputText.inputPaddingLeftRight,
|
|
67
67
|
overflow: 'hidden',
|
|
68
|
+
alignItems: 'center',
|
|
68
69
|
},
|
|
69
70
|
rightButtonContainer: { justifyContent: 'center' },
|
|
70
71
|
rightIcon: { color: theme.Form.InputText.inputIconColor },
|
package/package.json
CHANGED