1 |
|
2 | import type { TextInput as NativeTextInput, Animated, TextStyle, LayoutChangeEvent, ColorValue } from 'react-native';
|
3 | import type { TextInputProps } from './TextInput';
|
4 | import type { $Omit } from './../../types';
|
5 | export declare type TextInputLabelProp = string | React.ReactElement;
|
6 | export declare type RenderProps = {
|
7 | ref: (a?: NativeTextInput | null) => void;
|
8 | onChangeText?: (a: string) => void;
|
9 | placeholder?: string;
|
10 | placeholderTextColor?: ColorValue;
|
11 | editable?: boolean;
|
12 | selectionColor?: string;
|
13 | onFocus?: (args: any) => void;
|
14 | onBlur?: (args: any) => void;
|
15 | underlineColorAndroid?: string;
|
16 | style: any;
|
17 | multiline?: boolean;
|
18 | numberOfLines?: number;
|
19 | value?: string;
|
20 | adjustsFontSizeToFit?: boolean;
|
21 | };
|
22 | declare type TextInputTypesWithoutMode = $Omit<TextInputProps, 'mode'>;
|
23 | export declare type State = {
|
24 | labeled: Animated.Value;
|
25 | error: Animated.Value;
|
26 | focused: boolean;
|
27 | placeholder?: string;
|
28 | value?: string;
|
29 | labelLayout: {
|
30 | measured: boolean;
|
31 | width: number;
|
32 | height: number;
|
33 | };
|
34 | leftLayout: {
|
35 | height: number | null;
|
36 | width: number | null;
|
37 | };
|
38 | rightLayout: {
|
39 | height: number | null;
|
40 | width: number | null;
|
41 | };
|
42 | };
|
43 | export declare type ChildTextInputProps = {
|
44 | parentState: State;
|
45 | innerRef: (ref?: NativeTextInput | null) => void;
|
46 | onFocus?: (args: any) => void;
|
47 | onBlur?: (args: any) => void;
|
48 | forceFocus: () => void;
|
49 | onChangeText?: (value: string) => void;
|
50 | onLayoutAnimatedText: (args: any) => void;
|
51 | onLeftAffixLayoutChange: (event: LayoutChangeEvent) => void;
|
52 | onRightAffixLayoutChange: (event: LayoutChangeEvent) => void;
|
53 | } & TextInputTypesWithoutMode;
|
54 | export declare type LabelProps = {
|
55 | mode?: 'flat' | 'outlined';
|
56 | placeholderStyle: any;
|
57 | placeholderOpacity: number | Animated.Value | Animated.AnimatedInterpolation;
|
58 | baseLabelTranslateX: number;
|
59 | baseLabelTranslateY: number;
|
60 | wiggleOffsetX: number;
|
61 | labelScale: number;
|
62 | fontSize: number;
|
63 | fontWeight: TextStyle['fontWeight'];
|
64 | font: any;
|
65 | topPosition: number;
|
66 | paddingOffset?: {
|
67 | paddingLeft: number;
|
68 | paddingRight: number;
|
69 | } | null;
|
70 | labelTranslationXOffset?: number;
|
71 | placeholderColor: string | null;
|
72 | backgroundColor?: ColorValue;
|
73 | label?: TextInputLabelProp | null;
|
74 | hasActiveOutline?: boolean | null;
|
75 | activeColor: string;
|
76 | errorColor?: string;
|
77 | error?: boolean | null;
|
78 | onLayoutAnimatedText: (args: any) => void;
|
79 | roundness: number;
|
80 | maxFontSizeMultiplier?: number | undefined | null;
|
81 | };
|
82 | export declare type InputLabelProps = {
|
83 | parentState: State;
|
84 | labelProps: LabelProps;
|
85 | labelBackground?: any;
|
86 | maxFontSizeMultiplier?: number | undefined | null;
|
87 | };
|
88 | export declare type LabelBackgroundProps = {
|
89 | labelProps: LabelProps;
|
90 | labelStyle: any;
|
91 | parentState: State;
|
92 | maxFontSizeMultiplier?: number | undefined | null;
|
93 | };
|
94 | export {};
|