react-native-ui-lib 8.1.8-snapshot.7635 → 8.1.8-snapshot.7643
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/ReactNativeUiLib.podspec +22 -0
- package/lib/components/HighlighterOverlayView/index.d.ts +2 -2
- package/lib/components/HighlighterOverlayView/index.web.d.ts +2 -2
- package/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardViewBase.d.ts +1 -1
- package/lib/components/Keyboard/KeyboardAccessoryView/index.d.ts +2 -2
- package/lib/components/Keyboard/KeyboardAccessoryView/index.js +1 -3
- package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.js +1 -3
- package/lib/components/Keyboard/KeyboardTrackingView/index.d.ts +2 -6
- package/lib/components/Keyboard/KeyboardTrackingView/index.js +4 -5
- package/lib/components/Keyboard/index.d.ts +1 -2
- package/lib/package.json +5 -4
- package/package.json +19 -17
- package/src/commons/asBaseComponent.js +1 -2
- package/src/commons/baseComponent.js +8 -0
- package/src/commons/forwardRef.js +5 -0
- package/src/commons/modifiers.d.ts +6 -0
- package/src/commons/modifiers.js +18 -0
- package/src/commons/withScrollEnabler.js +4 -0
- package/src/commons/withScrollReached.js +4 -0
- package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +7 -0
- package/src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js +6 -0
- package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +6 -0
- package/src/components/WheelPicker/WheelPicker.driver.d.ts +2 -2
- package/src/components/WheelPicker/index.d.ts +2 -2
- package/src/components/WheelPicker/index.js +1 -1
- package/src/components/WheelPicker/usePresenter.d.ts +1 -1
- package/src/components/actionSheet/index.d.ts +1 -1
- package/src/components/animatedImage/index.d.ts +1 -1
- package/src/components/animatedScanner/index.js +37 -0
- package/src/components/avatar/index.d.ts +1 -1
- package/src/components/badge/index.d.ts +4 -4
- package/src/components/baseInput/index.d.ts +1 -0
- package/src/components/baseInput/index.js +49 -1
- package/src/components/button/index.d.ts +4 -4
- package/src/components/button/types.d.ts +2 -2
- package/src/components/carousel/index.d.ts +8 -8
- package/src/components/carousel/types.d.ts +1 -4
- package/src/components/carousel/types.js +2 -0
- package/src/components/chip/index.d.ts +1 -1
- package/src/components/colorPalette/index.d.ts +1 -1
- package/src/components/dateTimePicker/index.d.ts +2 -2
- package/src/components/dateTimePicker/index.js +2 -2
- package/src/components/dialog/types.d.ts +4 -4
- package/src/components/drawer/index.d.ts +1 -1
- package/src/components/expandableSection/index.d.ts +2 -2
- package/src/components/fadedScrollView/index.js +1 -1
- package/src/components/featureHighlight/index.js +7 -5
- package/src/components/gridListItem/index.d.ts +7 -7
- package/src/components/gridView/index.d.ts +1 -1
- package/src/components/hint/HintBubble.d.ts +1 -1
- package/src/components/hint/HintOld.d.ts +10 -10
- package/src/components/hint/hooks/useHintLayout.d.ts +1 -1
- package/src/components/hint/index.d.ts +2 -2
- package/src/components/hint/types.d.ts +2 -2
- package/src/components/icon/index.js +3 -0
- package/src/components/image/index.d.ts +1 -1
- package/src/components/image/index.js +17 -20
- package/src/components/loaderScreen/index.d.ts +1 -1
- package/src/components/loaderScreen/types.d.ts +1 -1
- package/src/components/maskedInput/index.d.ts +4 -21
- package/src/components/maskedInput/index.js +16 -78
- package/src/components/maskedInput/maskedInput.api.json +1 -0
- package/src/components/maskedInput/new.d.ts +22 -0
- package/src/components/maskedInput/new.js +85 -0
- package/src/components/maskedInput/old.js +95 -0
- package/src/components/modal/index.d.ts +3 -3
- package/src/components/numberInput/index.js +2 -2
- package/src/components/overlay/index.d.ts +1 -1
- package/src/components/picker/PickerDialog.android.js +15 -0
- package/src/components/picker/PickerDialog.js +7 -0
- package/src/components/picker/helpers/useImperativePickerHandle.d.ts +1 -1
- package/src/components/picker/helpers/useImperativePickerHandle.js +1 -1
- package/src/components/picker/types.d.ts +9 -9
- package/src/components/progressBar/index.d.ts +11 -2
- package/src/components/progressBar/index.js +10 -7
- package/src/components/progressBar/progressBar.api.json +6 -1
- package/src/components/scrollBar/index.d.ts +4 -11
- package/src/components/searchInput/index.js +1 -1
- package/src/components/searchInput/types.d.ts +2 -2
- package/src/components/sectionsWheelPicker/SectionsWheelPicker.driver.d.ts +2 -2
- package/src/components/skeletonView/index.d.ts +4 -4
- package/src/components/slider/Thumb.d.ts +1 -1
- package/src/components/slider/types.d.ts +1 -1
- package/src/components/stackAggregator/index.d.ts +1 -1
- package/src/components/tabController/TabBarItem.d.ts +2 -2
- package/src/components/tabController/TabBarItem.js +1 -1
- package/src/components/tabController/TabPage.d.ts +2 -2
- package/src/components/tabController/useScrollToItem.d.ts +1 -1
- package/src/components/text/Text.driver.d.ts +1 -1
- package/src/components/textArea/index.js +6 -0
- package/src/components/textField/types.d.ts +4 -4
- package/src/components/textField/useImperativeInputHandle.d.ts +1 -1
- package/src/components/textField/useImperativeInputHandle.js +1 -1
- package/src/components/textField/usePreset.d.ts +20 -20
- package/src/components/textFieldOld/index.d.ts +71 -0
- package/src/components/textFieldOld/index.js +807 -0
- package/src/components/timeline/index.js +1 -1
- package/src/components/toast/index.js +69 -0
- package/src/components/view/index.js +5 -2
- package/src/components/wizard/index.d.ts +1 -1
- package/src/components/wizard/types.d.ts +1 -1
- package/src/components/wizard/wizard.api.json +1 -1
- package/src/helpers/DocsGenerator.js +61 -0
- package/src/hooks/useCombinedRefs/index.js +2 -1
- package/src/hooks/useDebounce/index.js +1 -1
- package/src/hooks/useHiddenLocation/index.js +2 -2
- package/src/hooks/useHiddenLocation/index.web.js +2 -2
- package/src/hooks/useMeasure/index.d.ts +1 -1
- package/src/hooks/useMeasure/index.js +1 -1
- package/src/hooks/useScrollTo/index.d.ts +2 -2
- package/src/incubator/calendar/index.js +1 -1
- package/src/incubator/calendar/types.d.ts +2 -2
- package/src/incubator/expandableOverlay/index.d.ts +2 -2
- package/src/incubator/slider/Track.d.ts +1 -1
- package/src/incubator/slider/index.d.ts +1 -1
- package/src/incubator/toast/helpers/useToastTimer.js +1 -1
- package/src/incubator/toast/index.js +1 -1
- package/src/incubator/toast/types.d.ts +2 -2
- package/src/testkit/Component.driver.d.ts +1 -1
- package/src/testkit/drivers/TestingLibraryDriver.d.ts +1 -1
- package/src/typings/module.d.ts +3 -12
- package/textFieldOld.d.ts +2 -0
- package/textFieldOld.js +1 -0
|
@@ -32,7 +32,7 @@ const SearchInput = forwardRef((props, ref) => {
|
|
|
32
32
|
style,
|
|
33
33
|
inaccessible
|
|
34
34
|
} = props;
|
|
35
|
-
const currentAnimatedValue = useRef(
|
|
35
|
+
const currentAnimatedValue = useRef();
|
|
36
36
|
const searchInputRef = useRef(null);
|
|
37
37
|
const [hasValue, setHasValue] = useState(Boolean(controlledValue));
|
|
38
38
|
const [value, setValue] = useState(controlledValue);
|
|
@@ -26,7 +26,7 @@ export type SearchInputProps = TextInputProps & {
|
|
|
26
26
|
/**
|
|
27
27
|
* Custom right element
|
|
28
28
|
*/
|
|
29
|
-
customRightElement?: React.ReactElement
|
|
29
|
+
customRightElement?: React.ReactElement;
|
|
30
30
|
/**
|
|
31
31
|
* Whether to show a loader instead of the left search icon
|
|
32
32
|
*/
|
|
@@ -38,7 +38,7 @@ export type SearchInputProps = TextInputProps & {
|
|
|
38
38
|
/**
|
|
39
39
|
* custom loader element
|
|
40
40
|
*/
|
|
41
|
-
customLoader?: React.ReactElement
|
|
41
|
+
customLoader?: React.ReactElement;
|
|
42
42
|
/**
|
|
43
43
|
* converts the colors of the search's input elements, icons and button to white
|
|
44
44
|
*/
|
|
@@ -7,11 +7,11 @@ export declare const SectionsWheelPickerDriver: (props: ComponentProps) => {
|
|
|
7
7
|
moveToItem: (index: number, itemHeight?: number, numberOfRows?: number) => void;
|
|
8
8
|
getLabel: () => string | (string | ReactTestInstance)[];
|
|
9
9
|
scroll: (contentOffset: Partial<import("react-native/types").NativeScrollPoint>, options?: {
|
|
10
|
+
contentInset: import("react-native/types").NativeScrollRectangle;
|
|
11
|
+
zoomScale: number;
|
|
10
12
|
layoutMeasurement: import("react-native/types").NativeScrollSize;
|
|
11
13
|
contentSize: import("react-native/types").NativeScrollSize;
|
|
12
14
|
velocity?: import("react-native/types").NativeScrollVelocity | undefined;
|
|
13
|
-
contentInset: import("react-native/types").NativeScrollRectangle;
|
|
14
|
-
zoomScale: number;
|
|
15
15
|
targetContentOffset?: import("react-native/types").NativeScrollPoint | undefined;
|
|
16
16
|
} | undefined) => void;
|
|
17
17
|
triggerEvent: (eventName?: string | undefined, event?: Partial<import("react-native/types").NativeScrollEvent> | undefined) => void;
|
|
@@ -35,7 +35,7 @@ export interface SkeletonListProps {
|
|
|
35
35
|
/**
|
|
36
36
|
* Extra content to be rendered on the end of the list item
|
|
37
37
|
*/
|
|
38
|
-
renderEndContent?: () => React.ReactElement
|
|
38
|
+
renderEndContent?: () => React.ReactElement | undefined;
|
|
39
39
|
}
|
|
40
40
|
export interface SkeletonViewProps extends AccessibilityProps, AlignmentModifiers, PaddingModifiers, MarginModifiers {
|
|
41
41
|
/**
|
|
@@ -155,9 +155,9 @@ declare class SkeletonView extends Component<SkeletonViewProps, SkeletonState> {
|
|
|
155
155
|
renderTextContentTemplate: () => React.JSX.Element;
|
|
156
156
|
renderTemplate: () => React.JSX.Element;
|
|
157
157
|
renderAdvanced: () => React.JSX.Element;
|
|
158
|
-
renderWithFading: (skeleton: any) => string | number |
|
|
159
|
-
renderSkeleton(): string | number |
|
|
158
|
+
renderWithFading: (skeleton: any) => string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
159
|
+
renderSkeleton(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
160
160
|
renderNothing: () => null;
|
|
161
|
-
render(): string | number |
|
|
161
|
+
render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
162
162
|
}
|
|
163
163
|
export default SkeletonView;
|
|
@@ -26,7 +26,7 @@ export interface ThumbProps extends ViewProps {
|
|
|
26
26
|
*/
|
|
27
27
|
disabled?: boolean;
|
|
28
28
|
/** ref to thumb component */
|
|
29
|
-
ref?: React.RefObject<RNView
|
|
29
|
+
ref?: React.RefObject<RNView>;
|
|
30
30
|
}
|
|
31
31
|
declare const Thumb: React.ForwardRefExoticComponent<Omit<ThumbProps, "ref"> & React.RefAttributes<unknown>>;
|
|
32
32
|
export default Thumb;
|
|
@@ -44,7 +44,7 @@ export type SliderProps = Omit<ThumbProps, 'ref'> & {
|
|
|
44
44
|
/**
|
|
45
45
|
* Custom render instead of rendering the track
|
|
46
46
|
*/
|
|
47
|
-
renderTrack?: () => ReactElement
|
|
47
|
+
renderTrack?: () => ReactElement | ReactElement[];
|
|
48
48
|
/**
|
|
49
49
|
* Callback for onValueChange
|
|
50
50
|
*/
|
|
@@ -47,11 +47,11 @@ export interface TabControllerItemProps extends Pick<TabControllerBarProps, 'spr
|
|
|
47
47
|
/**
|
|
48
48
|
* Pass to render a leading element
|
|
49
49
|
*/
|
|
50
|
-
leadingAccessory?: ReactElement
|
|
50
|
+
leadingAccessory?: ReactElement;
|
|
51
51
|
/**
|
|
52
52
|
* Pass to render a trailing element
|
|
53
53
|
*/
|
|
54
|
-
trailingAccessory?: ReactElement
|
|
54
|
+
trailingAccessory?: ReactElement;
|
|
55
55
|
/**
|
|
56
56
|
* A fixed width for the item
|
|
57
57
|
*/
|
|
@@ -46,7 +46,7 @@ export default function TabBarItem({
|
|
|
46
46
|
currentPage,
|
|
47
47
|
setCurrentIndex
|
|
48
48
|
} = useContext(TabBarContext);
|
|
49
|
-
const itemRef = useRef(
|
|
49
|
+
const itemRef = useRef();
|
|
50
50
|
const itemWidth = useRef(props.width);
|
|
51
51
|
const isPressed = useSharedValue(false);
|
|
52
52
|
// JSON.parse(JSON.stringify is due to an issue with reanimated
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
export interface TabControllerPageProps {
|
|
4
4
|
/**
|
|
@@ -30,4 +30,4 @@ export interface TabControllerPageProps {
|
|
|
30
30
|
* @description: TabController's TabPage
|
|
31
31
|
* @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/TabControllerScreen/index.tsx
|
|
32
32
|
*/
|
|
33
|
-
export default function TabPage({ testID, index, lazy, renderLoading, style, lazyLoadTime, ...props }: PropsWithChildren<TabControllerPageProps>): JSX.Element;
|
|
33
|
+
export default function TabPage({ testID, index, lazy, renderLoading, style, lazyLoadTime, ...props }: PropsWithChildren<TabControllerPageProps>): React.JSX.Element;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { TextProps } from './index';
|
|
3
3
|
import { ComponentDriver } from '../../testkit/Component.driver';
|
|
4
4
|
export declare class TextDriver extends ComponentDriver<TextProps> {
|
|
5
|
-
getTextContent: () => Promise<
|
|
5
|
+
getTextContent: () => Promise<import("react").ReactNode>;
|
|
6
6
|
isPressable: () => Promise<boolean | null>;
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {View, TextInput as RNTextInput, StyleSheet} from 'react-native';
|
|
3
|
+
import {TextInputPropTypes} from 'deprecated-react-native-prop-types';
|
|
3
4
|
import BaseInput from '../baseInput';
|
|
4
5
|
import {Colors} from '../../style';
|
|
5
6
|
|
|
@@ -14,6 +15,11 @@ import {Colors} from '../../style';
|
|
|
14
15
|
export default class TextArea extends BaseInput {
|
|
15
16
|
static displayName = 'TextArea';
|
|
16
17
|
|
|
18
|
+
static propTypes = {
|
|
19
|
+
...TextInputPropTypes,
|
|
20
|
+
...BaseInput.propTypes
|
|
21
|
+
};
|
|
22
|
+
|
|
17
23
|
generateStyles() {
|
|
18
24
|
this.styles = createStyles(this.props);
|
|
19
25
|
}
|
|
@@ -171,19 +171,19 @@ export type TextFieldProps = MarginModifiers & PaddingModifiers & TypographyModi
|
|
|
171
171
|
/**
|
|
172
172
|
* Pass to render a leading element
|
|
173
173
|
*/
|
|
174
|
-
leadingAccessory?: ReactElement
|
|
174
|
+
leadingAccessory?: ReactElement;
|
|
175
175
|
/**
|
|
176
176
|
* Pass to render a trailing element
|
|
177
177
|
*/
|
|
178
|
-
trailingAccessory?: ReactElement
|
|
178
|
+
trailingAccessory?: ReactElement;
|
|
179
179
|
/**
|
|
180
180
|
* Pass to render a top trailing element
|
|
181
181
|
*/
|
|
182
|
-
topTrailingAccessory?: ReactElement
|
|
182
|
+
topTrailingAccessory?: ReactElement;
|
|
183
183
|
/**
|
|
184
184
|
* Pass to render a bottom element below the input
|
|
185
185
|
*/
|
|
186
|
-
bottomAccessory?: ReactElement
|
|
186
|
+
bottomAccessory?: ReactElement;
|
|
187
187
|
/**
|
|
188
188
|
* Should show a clear button when there is a value
|
|
189
189
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextInput, TextInputProps } from 'react-native';
|
|
3
|
-
declare const useImperativeInputHandle: (ref: React.Ref<any>, props: Pick<TextInputProps, 'onChangeText'>) => React.
|
|
3
|
+
declare const useImperativeInputHandle: (ref: React.Ref<any>, props: Pick<TextInputProps, 'onChangeText'>) => React.MutableRefObject<TextInput | undefined>;
|
|
4
4
|
export default useImperativeInputHandle;
|
|
@@ -2,7 +2,7 @@ import { useContext, useImperativeHandle, useRef } from 'react';
|
|
|
2
2
|
import { findNodeHandle } from 'react-native';
|
|
3
3
|
import FieldContext from "./FieldContext";
|
|
4
4
|
const useImperativeInputHandle = (ref, props) => {
|
|
5
|
-
const inputRef = useRef(
|
|
5
|
+
const inputRef = useRef();
|
|
6
6
|
const context = useContext(FieldContext);
|
|
7
7
|
useImperativeHandle(ref, () => {
|
|
8
8
|
return {
|
|
@@ -34,14 +34,16 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
34
34
|
children?: import("react").ReactNode;
|
|
35
35
|
style?: import("react-native/types").StyleProp<import("react-native/types").TextStyle>;
|
|
36
36
|
testID?: string | undefined;
|
|
37
|
-
|
|
38
|
-
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
37
|
+
removeClippedSubviews?: boolean | undefined;
|
|
39
38
|
onLayout?: ((event: import("react-native/types").LayoutChangeEvent) => void) | undefined;
|
|
39
|
+
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
40
|
+
onScroll?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputScrollEventData>) => void) | undefined;
|
|
41
|
+
scrollEnabled?: boolean | undefined;
|
|
40
42
|
hitSlop?: number | import("react-native/types").Insets | null | undefined;
|
|
41
43
|
id?: string | undefined;
|
|
42
44
|
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
43
|
-
removeClippedSubviews?: boolean | undefined;
|
|
44
45
|
nativeID?: string | undefined;
|
|
46
|
+
experimental_layoutConformance?: "strict" | "classic" | undefined;
|
|
45
47
|
collapsable?: boolean | undefined;
|
|
46
48
|
collapsableChildren?: boolean | undefined;
|
|
47
49
|
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
@@ -152,7 +154,6 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
152
154
|
onEndEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputEndEditingEventData>) => void) | undefined;
|
|
153
155
|
onSelectionChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSelectionChangeEventData>) => void) | undefined;
|
|
154
156
|
onSubmitEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSubmitEditingEventData>) => void) | undefined;
|
|
155
|
-
onScroll?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputScrollEventData>) => void) | undefined;
|
|
156
157
|
onKeyPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputKeyPressEventData>) => void) | undefined;
|
|
157
158
|
placeholder?: string | undefined;
|
|
158
159
|
readOnly?: boolean | undefined;
|
|
@@ -161,7 +162,6 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
161
162
|
secureTextEntry?: boolean | undefined;
|
|
162
163
|
selectTextOnFocus?: boolean | undefined;
|
|
163
164
|
inputAccessoryViewID?: string | undefined;
|
|
164
|
-
disableKeyboardShortcuts?: boolean | undefined;
|
|
165
165
|
clearButtonMode?: "always" | "never" | "while-editing" | "unless-editing" | undefined;
|
|
166
166
|
clearTextOnFocus?: boolean | undefined;
|
|
167
167
|
dataDetectorTypes?: import("react-native/types").DataDetectorTypes | import("react-native/types").DataDetectorTypes[] | undefined;
|
|
@@ -505,14 +505,16 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
505
505
|
children?: import("react").ReactNode;
|
|
506
506
|
style?: import("react-native/types").StyleProp<import("react-native/types").TextStyle>;
|
|
507
507
|
testID?: string | undefined;
|
|
508
|
-
|
|
509
|
-
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
508
|
+
removeClippedSubviews?: boolean | undefined;
|
|
510
509
|
onLayout?: ((event: import("react-native/types").LayoutChangeEvent) => void) | undefined;
|
|
510
|
+
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
511
|
+
onScroll?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputScrollEventData>) => void) | undefined;
|
|
512
|
+
scrollEnabled?: boolean | undefined;
|
|
511
513
|
hitSlop?: number | import("react-native/types").Insets | null | undefined;
|
|
512
514
|
id?: string | undefined;
|
|
513
515
|
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
514
|
-
removeClippedSubviews?: boolean | undefined;
|
|
515
516
|
nativeID?: string | undefined;
|
|
517
|
+
experimental_layoutConformance?: "strict" | "classic" | undefined;
|
|
516
518
|
collapsable?: boolean | undefined;
|
|
517
519
|
collapsableChildren?: boolean | undefined;
|
|
518
520
|
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
@@ -623,7 +625,6 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
623
625
|
onEndEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputEndEditingEventData>) => void) | undefined;
|
|
624
626
|
onSelectionChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSelectionChangeEventData>) => void) | undefined;
|
|
625
627
|
onSubmitEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSubmitEditingEventData>) => void) | undefined;
|
|
626
|
-
onScroll?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputScrollEventData>) => void) | undefined;
|
|
627
628
|
onKeyPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputKeyPressEventData>) => void) | undefined;
|
|
628
629
|
placeholder?: string | undefined;
|
|
629
630
|
readOnly?: boolean | undefined;
|
|
@@ -632,7 +633,6 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
632
633
|
secureTextEntry?: boolean | undefined;
|
|
633
634
|
selectTextOnFocus?: boolean | undefined;
|
|
634
635
|
inputAccessoryViewID?: string | undefined;
|
|
635
|
-
disableKeyboardShortcuts?: boolean | undefined;
|
|
636
636
|
clearButtonMode?: "always" | "never" | "while-editing" | "unless-editing" | undefined;
|
|
637
637
|
clearTextOnFocus?: boolean | undefined;
|
|
638
638
|
dataDetectorTypes?: import("react-native/types").DataDetectorTypes | import("react-native/types").DataDetectorTypes[] | undefined;
|
|
@@ -992,14 +992,16 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
992
992
|
children?: import("react").ReactNode;
|
|
993
993
|
style: false | "" | import("react-native/types").TextStyle | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle> | import("react-native/types").RecursiveArray<import("react-native/types").TextStyle | import("react-native/types").Falsy | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle>> | null;
|
|
994
994
|
testID?: string | undefined;
|
|
995
|
-
|
|
996
|
-
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
995
|
+
removeClippedSubviews?: boolean | undefined;
|
|
997
996
|
onLayout?: ((event: import("react-native/types").LayoutChangeEvent) => void) | undefined;
|
|
997
|
+
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
998
|
+
onScroll?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputScrollEventData>) => void) | undefined;
|
|
999
|
+
scrollEnabled?: boolean | undefined;
|
|
998
1000
|
hitSlop?: number | import("react-native/types").Insets | null | undefined;
|
|
999
1001
|
id?: string | undefined;
|
|
1000
1002
|
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
1001
|
-
removeClippedSubviews?: boolean | undefined;
|
|
1002
1003
|
nativeID?: string | undefined;
|
|
1004
|
+
experimental_layoutConformance?: "strict" | "classic" | undefined;
|
|
1003
1005
|
collapsable?: boolean | undefined;
|
|
1004
1006
|
collapsableChildren?: boolean | undefined;
|
|
1005
1007
|
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
@@ -1110,7 +1112,6 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1110
1112
|
onEndEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputEndEditingEventData>) => void) | undefined;
|
|
1111
1113
|
onSelectionChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSelectionChangeEventData>) => void) | undefined;
|
|
1112
1114
|
onSubmitEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSubmitEditingEventData>) => void) | undefined;
|
|
1113
|
-
onScroll?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputScrollEventData>) => void) | undefined;
|
|
1114
1115
|
onKeyPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputKeyPressEventData>) => void) | undefined;
|
|
1115
1116
|
placeholder?: string | undefined;
|
|
1116
1117
|
readOnly?: boolean | undefined;
|
|
@@ -1119,7 +1120,6 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1119
1120
|
secureTextEntry?: boolean | undefined;
|
|
1120
1121
|
selectTextOnFocus?: boolean | undefined;
|
|
1121
1122
|
inputAccessoryViewID?: string | undefined;
|
|
1122
|
-
disableKeyboardShortcuts?: boolean | undefined;
|
|
1123
1123
|
clearButtonMode?: "always" | "never" | "while-editing" | "unless-editing" | undefined;
|
|
1124
1124
|
clearTextOnFocus?: boolean | undefined;
|
|
1125
1125
|
dataDetectorTypes?: import("react-native/types").DataDetectorTypes | import("react-native/types").DataDetectorTypes[] | undefined;
|
|
@@ -1490,14 +1490,16 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1490
1490
|
children?: import("react").ReactNode;
|
|
1491
1491
|
style: false | "" | import("react-native/types").TextStyle | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle> | import("react-native/types").RecursiveArray<import("react-native/types").TextStyle | import("react-native/types").Falsy | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle>> | null;
|
|
1492
1492
|
testID?: string | undefined;
|
|
1493
|
-
|
|
1494
|
-
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
1493
|
+
removeClippedSubviews?: boolean | undefined;
|
|
1495
1494
|
onLayout?: ((event: import("react-native/types").LayoutChangeEvent) => void) | undefined;
|
|
1495
|
+
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
1496
|
+
onScroll?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputScrollEventData>) => void) | undefined;
|
|
1497
|
+
scrollEnabled?: boolean | undefined;
|
|
1496
1498
|
hitSlop?: number | import("react-native/types").Insets | null | undefined;
|
|
1497
1499
|
id?: string | undefined;
|
|
1498
1500
|
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
1499
|
-
removeClippedSubviews?: boolean | undefined;
|
|
1500
1501
|
nativeID?: string | undefined;
|
|
1502
|
+
experimental_layoutConformance?: "strict" | "classic" | undefined;
|
|
1501
1503
|
collapsable?: boolean | undefined;
|
|
1502
1504
|
collapsableChildren?: boolean | undefined;
|
|
1503
1505
|
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
@@ -1608,7 +1610,6 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1608
1610
|
onEndEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputEndEditingEventData>) => void) | undefined;
|
|
1609
1611
|
onSelectionChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSelectionChangeEventData>) => void) | undefined;
|
|
1610
1612
|
onSubmitEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSubmitEditingEventData>) => void) | undefined;
|
|
1611
|
-
onScroll?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputScrollEventData>) => void) | undefined;
|
|
1612
1613
|
onKeyPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputKeyPressEventData>) => void) | undefined;
|
|
1613
1614
|
placeholder?: string | undefined;
|
|
1614
1615
|
readOnly?: boolean | undefined;
|
|
@@ -1617,7 +1618,6 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1617
1618
|
secureTextEntry?: boolean | undefined;
|
|
1618
1619
|
selectTextOnFocus?: boolean | undefined;
|
|
1619
1620
|
inputAccessoryViewID?: string | undefined;
|
|
1620
|
-
disableKeyboardShortcuts?: boolean | undefined;
|
|
1621
1621
|
clearButtonMode?: "always" | "never" | "while-editing" | "unless-editing" | undefined;
|
|
1622
1622
|
clearTextOnFocus?: boolean | undefined;
|
|
1623
1623
|
dataDetectorTypes?: import("react-native/types").DataDetectorTypes | import("react-native/types").DataDetectorTypes[] | undefined;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import BaseInput from '../baseInput';
|
|
3
|
+
/**
|
|
4
|
+
* @description: A wrapper for TextInput component with extra functionality like floating placeholder and validations (This is an uncontrolled component)
|
|
5
|
+
* @modifiers: Typography
|
|
6
|
+
* @extends: TextInput
|
|
7
|
+
* @extendsLink: https://reactnative.dev/docs/textinput
|
|
8
|
+
* @gif: https://media.giphy.com/media/xULW8su8Cs5Z9Fq4PS/giphy.gif, https://media.giphy.com/media/3ohc1dhDcLS9FvWLJu/giphy.gif, https://media.giphy.com/media/oNUSOxnHdMP5ZnKYsh/giphy.gif
|
|
9
|
+
* @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/TextFieldScreen/BasicTextFieldScreen.js
|
|
10
|
+
*/
|
|
11
|
+
export default class TextField extends BaseInput {
|
|
12
|
+
static displayName: string;
|
|
13
|
+
static propTypes: any;
|
|
14
|
+
static defaultProps: {
|
|
15
|
+
enableErrors: boolean;
|
|
16
|
+
validateOnBlur: boolean;
|
|
17
|
+
};
|
|
18
|
+
constructor(props: any);
|
|
19
|
+
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
20
|
+
componentDidUpdate(_prevProps: any, prevState: any): void;
|
|
21
|
+
onPlaceholderLayout: (event: any) => void;
|
|
22
|
+
/** Actions */
|
|
23
|
+
generatePropsWarnings(props: any): void;
|
|
24
|
+
generateStyles(): void;
|
|
25
|
+
getAccessibilityInfo(): {
|
|
26
|
+
accessibilityLabel: any;
|
|
27
|
+
accessibilityState: {
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
} | undefined;
|
|
30
|
+
};
|
|
31
|
+
toggleExpandableModal: (value: any) => void;
|
|
32
|
+
updateFloatingPlaceholderState: (withoutAnimation: any) => void;
|
|
33
|
+
getPlaceholderText: (this: any, placeholder: any, helperText: any) => any;
|
|
34
|
+
getStateColor(colorProp?: {}): any;
|
|
35
|
+
getCharCount(): any;
|
|
36
|
+
setCharCountColor(key: any): void;
|
|
37
|
+
getCharCountColor(): any;
|
|
38
|
+
getTopPaddings(): 25 | undefined;
|
|
39
|
+
getTopErrorsPosition(): {
|
|
40
|
+
top: number;
|
|
41
|
+
} | undefined;
|
|
42
|
+
isDisabled(): boolean;
|
|
43
|
+
isCounterLimit(): boolean;
|
|
44
|
+
hasText(value: any): boolean;
|
|
45
|
+
shouldShowHelperText(): any;
|
|
46
|
+
shouldFloatOnFocus(): any;
|
|
47
|
+
shouldFloatPlaceholder(text: any): any;
|
|
48
|
+
shouldFakePlaceholder(): boolean;
|
|
49
|
+
shouldShowError(): any;
|
|
50
|
+
getErrorMessage(): any;
|
|
51
|
+
shouldShowTopError(): any;
|
|
52
|
+
shouldDisplayRightButton(): any;
|
|
53
|
+
shouldRenderTitle(): any;
|
|
54
|
+
onPressRightButton: () => void;
|
|
55
|
+
/** Renders */
|
|
56
|
+
renderPlaceholder(): React.JSX.Element | undefined;
|
|
57
|
+
renderPrefix(): React.JSX.Element | undefined;
|
|
58
|
+
renderTitle(): React.JSX.Element | undefined;
|
|
59
|
+
renderCharCounter(): React.JSX.Element | undefined;
|
|
60
|
+
renderError(visible: any): React.JSX.Element | undefined;
|
|
61
|
+
renderExpandableModal(): any;
|
|
62
|
+
renderExpandableInput(): any;
|
|
63
|
+
renderTextInput(): React.JSX.Element;
|
|
64
|
+
renderRightButton(): React.JSX.Element | undefined;
|
|
65
|
+
renderRightIcon(): React.JSX.Element | undefined;
|
|
66
|
+
render(): React.JSX.Element;
|
|
67
|
+
/** Events */
|
|
68
|
+
onDoneEditingExpandableInput: () => void;
|
|
69
|
+
onKeyPress: (event: any) => void;
|
|
70
|
+
onChangeText: (text: any) => void;
|
|
71
|
+
}
|