react-native-ui-lib 8.3.3 → 8.3.4-snapshot.7783
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/lib/android/build.gradle +3 -3
- 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/KeyboardRegistry/index.js +5 -1
- package/lib/components/Keyboard/KeyboardAccessoryView/index.d.ts +2 -2
- package/lib/components/Keyboard/KeyboardAccessoryView/index.js +3 -1
- package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.js +3 -1
- package/lib/components/Keyboard/KeyboardTrackingView/index.d.ts +6 -2
- package/lib/components/Keyboard/KeyboardTrackingView/index.js +5 -4
- package/lib/components/Keyboard/index.d.ts +2 -1
- package/lib/package.json +20 -21
- package/lib/react-native.config.js +1 -1
- package/package.json +161 -164
- package/screenFooter.d.ts +2 -0
- package/screenFooter.js +1 -0
- package/scripts/release/prReleaseNotesCommon.js +2 -1
- package/src/assets/internal/images/bottomGradient.png +0 -0
- package/src/assets/internal/images/bottomGradient@1.5x.png +0 -0
- package/src/assets/internal/images/bottomGradient@2x.png +0 -0
- package/src/assets/internal/images/bottomGradient@3x.png +0 -0
- package/src/assets/internal/images/bottomGradient@4x.png +0 -0
- package/src/assets/internal/images/index.js +3 -0
- package/src/commons/asBaseComponent.js +2 -1
- package/src/commons/baseComponent.js +0 -8
- package/src/commons/forwardRef.js +1 -4
- package/src/commons/modifiers.d.ts +0 -6
- package/src/commons/modifiers.js +0 -18
- package/src/commons/withScrollEnabler.js +0 -4
- package/src/commons/withScrollReached.js +0 -4
- package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +0 -7
- package/src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js +0 -6
- package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +0 -6
- 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 +0 -37
- 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 +0 -1
- package/src/components/baseInput/index.js +1 -49
- 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 +4 -1
- package/src/components/carousel/types.js +0 -2
- package/src/components/checkbox/index.d.ts +1 -1
- 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/dialog/useDialogContent.d.ts +1 -1
- 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 +5 -7
- 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 +0 -3
- package/src/components/image/index.d.ts +1 -1
- package/src/components/image/index.js +20 -17
- 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 +21 -4
- package/src/components/maskedInput/index.js +78 -16
- package/src/components/maskedInput/maskedInput.api.json +0 -1
- 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 +0 -15
- package/src/components/picker/PickerDialog.js +0 -7
- 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 +2 -2
- package/src/components/screenFooter/index.d.ts +8 -0
- package/src/components/screenFooter/index.js +211 -0
- package/src/components/screenFooter/screenFooter.api.json +262 -0
- package/src/components/screenFooter/types.d.ts +100 -0
- package/src/components/screenFooter/types.js +39 -0
- package/src/components/scrollBar/index.d.ts +11 -4
- 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 +0 -6
- 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 +36 -36
- package/src/components/timeline/index.js +1 -1
- package/src/components/toast/index.js +0 -69
- package/src/components/view/index.js +9 -6
- 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/hooks/index.d.ts +1 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/useCombinedRefs/index.js +1 -2
- 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/hooks/useScrollToHide/index.d.ts +24 -0
- package/src/hooks/useScrollToHide/index.js +48 -0
- 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/expandableOverlay/index.js +7 -3
- 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/index.d.ts +1 -0
- package/src/index.js +70 -0
- package/src/testkit/Component.driver.d.ts +1 -1
- package/src/testkit/drivers/TestingLibraryDriver.d.ts +1 -1
- package/src/typings/module.d.ts +12 -3
- package/ReactNativeUiLib.podspec +0 -22
- package/src/components/maskedInput/new.d.ts +0 -22
- package/src/components/maskedInput/new.js +0 -85
- package/src/components/maskedInput/old.js +0 -95
- package/src/components/textFieldOld/index.d.ts +0 -71
- package/src/components/textFieldOld/index.js +0 -807
- package/src/helpers/DocsGenerator.js +0 -61
- package/textFieldOld.d.ts +0 -2
- package/textFieldOld.js +0 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export let ScreenFooterLayouts = /*#__PURE__*/function (ScreenFooterLayouts) {
|
|
2
|
+
ScreenFooterLayouts["HORIZONTAL"] = "horizontal";
|
|
3
|
+
ScreenFooterLayouts["VERTICAL"] = "vertical";
|
|
4
|
+
return ScreenFooterLayouts;
|
|
5
|
+
}({});
|
|
6
|
+
export let ScreenFooterBackgrounds = /*#__PURE__*/function (ScreenFooterBackgrounds) {
|
|
7
|
+
ScreenFooterBackgrounds["FADING"] = "fading";
|
|
8
|
+
ScreenFooterBackgrounds["SOLID"] = "solid";
|
|
9
|
+
ScreenFooterBackgrounds["TRANSPARENT"] = "transparent";
|
|
10
|
+
return ScreenFooterBackgrounds;
|
|
11
|
+
}({});
|
|
12
|
+
export let FooterAlignment = /*#__PURE__*/function (FooterAlignment) {
|
|
13
|
+
FooterAlignment["START"] = "start";
|
|
14
|
+
FooterAlignment["CENTER"] = "center";
|
|
15
|
+
FooterAlignment["END"] = "end";
|
|
16
|
+
return FooterAlignment;
|
|
17
|
+
}({});
|
|
18
|
+
export let HorizontalItemsDistribution = /*#__PURE__*/function (HorizontalItemsDistribution) {
|
|
19
|
+
HorizontalItemsDistribution["STACK"] = "stack";
|
|
20
|
+
HorizontalItemsDistribution["SPREAD"] = "spread";
|
|
21
|
+
return HorizontalItemsDistribution;
|
|
22
|
+
}({});
|
|
23
|
+
export let ItemsFit = /*#__PURE__*/function (ItemsFit) {
|
|
24
|
+
ItemsFit["FIT"] = "fit";
|
|
25
|
+
ItemsFit["STRETCH"] = "stretch";
|
|
26
|
+
ItemsFit["FIXED"] = "fixed";
|
|
27
|
+
return ItemsFit;
|
|
28
|
+
}({});
|
|
29
|
+
export let KeyboardBehavior = /*#__PURE__*/function (KeyboardBehavior) {
|
|
30
|
+
KeyboardBehavior["STICKY"] = "sticky";
|
|
31
|
+
KeyboardBehavior["HOISTED"] = "hoisted";
|
|
32
|
+
return KeyboardBehavior;
|
|
33
|
+
}({});
|
|
34
|
+
export let ScreenFooterShadow = /*#__PURE__*/function (ScreenFooterShadow) {
|
|
35
|
+
ScreenFooterShadow["SH10"] = "sh10";
|
|
36
|
+
ScreenFooterShadow["SH20"] = "sh20";
|
|
37
|
+
ScreenFooterShadow["SH30"] = "sh30";
|
|
38
|
+
return ScreenFooterShadow;
|
|
39
|
+
}({});
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { Animated, FlatListProps, ImageSourcePropType, NativeSyntheticEvent, NativeScrollEvent, LayoutChangeEvent } from 'react-native';
|
|
2
|
+
import { Animated, FlatListProps, ScrollViewProps, ImageSourcePropType, NativeSyntheticEvent, NativeScrollEvent, LayoutChangeEvent } from 'react-native';
|
|
3
3
|
import { ForwardRefInjectedProps } from '../../commons/new';
|
|
4
4
|
import { ComponentStatics } from '../../typings/common';
|
|
5
|
-
export
|
|
5
|
+
export type ListProps = (FlatListProps<any> & {
|
|
6
6
|
/**
|
|
7
7
|
* Whether to use a FlatList. NOTE: you must pass 'data' and 'renderItem' props as well
|
|
8
8
|
*/
|
|
9
|
-
useList
|
|
9
|
+
useList: true;
|
|
10
|
+
}) | (ScrollViewProps & {
|
|
11
|
+
/**
|
|
12
|
+
* Whether to use a ScrollView. NOTE: you must pass 'contentContainerStyle' prop as well
|
|
13
|
+
*/
|
|
14
|
+
useList?: false;
|
|
15
|
+
});
|
|
16
|
+
export type ScrollBarProps = ListProps & {
|
|
10
17
|
/**
|
|
11
18
|
* The element to use as a container, instead of a View
|
|
12
19
|
*/
|
|
@@ -44,7 +51,7 @@ export interface ScrollBarProps extends FlatListProps<any> {
|
|
|
44
51
|
* The index to currently focus on
|
|
45
52
|
*/
|
|
46
53
|
focusIndex?: number;
|
|
47
|
-
}
|
|
54
|
+
};
|
|
48
55
|
type Props = ScrollBarProps & ForwardRefInjectedProps;
|
|
49
56
|
type State = {
|
|
50
57
|
gradientOpacity: Animated.Value;
|
|
@@ -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(undefined);
|
|
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<any>;
|
|
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<any>;
|
|
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;
|
|
12
10
|
layoutMeasurement: import("react-native/types").NativeScrollSize;
|
|
13
11
|
contentSize: import("react-native/types").NativeScrollSize;
|
|
14
12
|
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 | undefined;
|
|
38
|
+
renderEndContent?: () => React.ReactElement<any> | 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 | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
159
|
-
renderSkeleton(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
158
|
+
renderWithFading: (skeleton: any) => string | number | bigint | boolean | React.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
159
|
+
renderSkeleton(): string | number | bigint | boolean | React.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
160
160
|
renderNothing: () => null;
|
|
161
|
-
render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
161
|
+
render(): string | number | bigint | boolean | React.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | 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 | null>;
|
|
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 | ReactElement[];
|
|
47
|
+
renderTrack?: () => ReactElement<any> | ReactElement<any>[];
|
|
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<any>;
|
|
51
51
|
/**
|
|
52
52
|
* Pass to render a trailing element
|
|
53
53
|
*/
|
|
54
|
-
trailingAccessory?: ReactElement
|
|
54
|
+
trailingAccessory?: ReactElement<any>;
|
|
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(undefined);
|
|
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
|
|
1
|
+
import { PropsWithChildren, type JSX } 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>):
|
|
33
|
+
export default function TabPage({ testID, index, lazy, renderLoading, style, lazyLoadTime, ...props }: PropsWithChildren<TabControllerPageProps>): 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<import("react").ReactNode>;
|
|
5
|
+
getTextContent: () => Promise<string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined>;
|
|
6
6
|
isPressable: () => Promise<boolean | null>;
|
|
7
7
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
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';
|
|
4
3
|
import BaseInput from '../baseInput';
|
|
5
4
|
import {Colors} from '../../style';
|
|
6
5
|
|
|
@@ -15,11 +14,6 @@ import {Colors} from '../../style';
|
|
|
15
14
|
export default class TextArea extends BaseInput {
|
|
16
15
|
static displayName = 'TextArea';
|
|
17
16
|
|
|
18
|
-
static propTypes = {
|
|
19
|
-
...TextInputPropTypes,
|
|
20
|
-
...BaseInput.propTypes
|
|
21
|
-
};
|
|
22
|
-
|
|
23
17
|
generateStyles() {
|
|
24
18
|
this.styles = createStyles(this.props);
|
|
25
19
|
}
|
|
@@ -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<any>;
|
|
175
175
|
/**
|
|
176
176
|
* Pass to render a trailing element
|
|
177
177
|
*/
|
|
178
|
-
trailingAccessory?: ReactElement
|
|
178
|
+
trailingAccessory?: ReactElement<any>;
|
|
179
179
|
/**
|
|
180
180
|
* Pass to render a top trailing element
|
|
181
181
|
*/
|
|
182
|
-
topTrailingAccessory?: ReactElement
|
|
182
|
+
topTrailingAccessory?: ReactElement<any>;
|
|
183
183
|
/**
|
|
184
184
|
* Pass to render a bottom element below the input
|
|
185
185
|
*/
|
|
186
|
-
bottomAccessory?: ReactElement
|
|
186
|
+
bottomAccessory?: ReactElement<any>;
|
|
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.RefObject<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(undefined);
|
|
6
6
|
const context = useContext(FieldContext);
|
|
7
7
|
useImperativeHandle(ref, () => {
|
|
8
8
|
return {
|
|
@@ -31,19 +31,15 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
31
31
|
start: number;
|
|
32
32
|
end?: number | undefined;
|
|
33
33
|
} | undefined;
|
|
34
|
-
children?: import("react").ReactNode;
|
|
35
34
|
style?: import("react-native/types").StyleProp<import("react-native/types").TextStyle>;
|
|
36
|
-
|
|
37
|
-
removeClippedSubviews?: boolean | undefined;
|
|
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;
|
|
35
|
+
children?: import("react").ReactNode;
|
|
42
36
|
hitSlop?: number | import("react-native/types").Insets | null | undefined;
|
|
43
37
|
id?: string | undefined;
|
|
44
38
|
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
39
|
+
onLayout?: ((event: import("react-native/types").LayoutChangeEvent) => void) | undefined;
|
|
40
|
+
removeClippedSubviews?: boolean | undefined;
|
|
41
|
+
testID?: string | undefined;
|
|
45
42
|
nativeID?: string | undefined;
|
|
46
|
-
experimental_layoutConformance?: "strict" | "classic" | undefined;
|
|
47
43
|
collapsable?: boolean | undefined;
|
|
48
44
|
collapsableChildren?: boolean | undefined;
|
|
49
45
|
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
@@ -123,6 +119,8 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
123
119
|
accessibilityLanguage?: string | undefined;
|
|
124
120
|
accessibilityShowsLargeContentViewer?: boolean | undefined;
|
|
125
121
|
accessibilityLargeContentTitle?: string | undefined;
|
|
122
|
+
scrollEnabled?: boolean | undefined;
|
|
123
|
+
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
126
124
|
onPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
127
125
|
onPressIn?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
128
126
|
onPressOut?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
@@ -136,7 +134,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
136
134
|
selectionColor?: import("react-native/types").ColorValue | undefined;
|
|
137
135
|
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
138
136
|
autoCapitalize?: "none" | "sentences" | "words" | "characters" | undefined;
|
|
139
|
-
autoComplete?: "
|
|
137
|
+
autoComplete?: "off" | "name" | "email" | "url" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "username" | "username-new" | undefined;
|
|
140
138
|
autoCorrect?: boolean | undefined;
|
|
141
139
|
autoFocus?: boolean | undefined;
|
|
142
140
|
blurOnSubmit?: boolean | undefined;
|
|
@@ -154,6 +152,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
154
152
|
onEndEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputEndEditingEventData>) => void) | undefined;
|
|
155
153
|
onSelectionChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSelectionChangeEventData>) => void) | undefined;
|
|
156
154
|
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;
|
|
157
156
|
onKeyPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputKeyPressEventData>) => void) | undefined;
|
|
158
157
|
placeholder?: string | undefined;
|
|
159
158
|
readOnly?: boolean | undefined;
|
|
@@ -162,6 +161,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
162
161
|
secureTextEntry?: boolean | undefined;
|
|
163
162
|
selectTextOnFocus?: boolean | undefined;
|
|
164
163
|
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;
|
|
@@ -502,19 +502,15 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
502
502
|
start: number;
|
|
503
503
|
end?: number | undefined;
|
|
504
504
|
} | undefined;
|
|
505
|
-
children?: import("react").ReactNode;
|
|
506
505
|
style?: import("react-native/types").StyleProp<import("react-native/types").TextStyle>;
|
|
507
|
-
|
|
508
|
-
removeClippedSubviews?: boolean | undefined;
|
|
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;
|
|
506
|
+
children?: import("react").ReactNode;
|
|
513
507
|
hitSlop?: number | import("react-native/types").Insets | null | undefined;
|
|
514
508
|
id?: string | undefined;
|
|
515
509
|
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
510
|
+
onLayout?: ((event: import("react-native/types").LayoutChangeEvent) => void) | undefined;
|
|
511
|
+
removeClippedSubviews?: boolean | undefined;
|
|
512
|
+
testID?: string | undefined;
|
|
516
513
|
nativeID?: string | undefined;
|
|
517
|
-
experimental_layoutConformance?: "strict" | "classic" | undefined;
|
|
518
514
|
collapsable?: boolean | undefined;
|
|
519
515
|
collapsableChildren?: boolean | undefined;
|
|
520
516
|
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
@@ -594,6 +590,8 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
594
590
|
accessibilityLanguage?: string | undefined;
|
|
595
591
|
accessibilityShowsLargeContentViewer?: boolean | undefined;
|
|
596
592
|
accessibilityLargeContentTitle?: string | undefined;
|
|
593
|
+
scrollEnabled?: boolean | undefined;
|
|
594
|
+
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
597
595
|
onPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
598
596
|
onPressIn?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
599
597
|
onPressOut?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
@@ -607,7 +605,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
607
605
|
selectionColor?: import("react-native/types").ColorValue | undefined;
|
|
608
606
|
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
609
607
|
autoCapitalize?: "none" | "sentences" | "words" | "characters" | undefined;
|
|
610
|
-
autoComplete?: "
|
|
608
|
+
autoComplete?: "off" | "name" | "email" | "url" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "username" | "username-new" | undefined;
|
|
611
609
|
autoCorrect?: boolean | undefined;
|
|
612
610
|
autoFocus?: boolean | undefined;
|
|
613
611
|
blurOnSubmit?: boolean | undefined;
|
|
@@ -625,6 +623,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
625
623
|
onEndEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputEndEditingEventData>) => void) | undefined;
|
|
626
624
|
onSelectionChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSelectionChangeEventData>) => void) | undefined;
|
|
627
625
|
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;
|
|
628
627
|
onKeyPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputKeyPressEventData>) => void) | undefined;
|
|
629
628
|
placeholder?: string | undefined;
|
|
630
629
|
readOnly?: boolean | undefined;
|
|
@@ -633,6 +632,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
633
632
|
secureTextEntry?: boolean | undefined;
|
|
634
633
|
selectTextOnFocus?: boolean | undefined;
|
|
635
634
|
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;
|
|
@@ -989,19 +989,15 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
989
989
|
start: number;
|
|
990
990
|
end?: number | undefined;
|
|
991
991
|
} | undefined;
|
|
992
|
-
children?: import("react").ReactNode;
|
|
993
992
|
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
|
-
|
|
995
|
-
removeClippedSubviews?: boolean | undefined;
|
|
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;
|
|
993
|
+
children?: import("react").ReactNode;
|
|
1000
994
|
hitSlop?: number | import("react-native/types").Insets | null | undefined;
|
|
1001
995
|
id?: string | undefined;
|
|
1002
996
|
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
997
|
+
onLayout?: ((event: import("react-native/types").LayoutChangeEvent) => void) | undefined;
|
|
998
|
+
removeClippedSubviews?: boolean | undefined;
|
|
999
|
+
testID?: string | undefined;
|
|
1003
1000
|
nativeID?: string | undefined;
|
|
1004
|
-
experimental_layoutConformance?: "strict" | "classic" | undefined;
|
|
1005
1001
|
collapsable?: boolean | undefined;
|
|
1006
1002
|
collapsableChildren?: boolean | undefined;
|
|
1007
1003
|
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
@@ -1081,6 +1077,8 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1081
1077
|
accessibilityLanguage?: string | undefined;
|
|
1082
1078
|
accessibilityShowsLargeContentViewer?: boolean | undefined;
|
|
1083
1079
|
accessibilityLargeContentTitle?: string | undefined;
|
|
1080
|
+
scrollEnabled?: boolean | undefined;
|
|
1081
|
+
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
1084
1082
|
onPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
1085
1083
|
onPressIn?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
1086
1084
|
onPressOut?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
@@ -1094,7 +1092,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1094
1092
|
selectionColor?: import("react-native/types").ColorValue | undefined;
|
|
1095
1093
|
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
1096
1094
|
autoCapitalize?: "none" | "sentences" | "words" | "characters" | undefined;
|
|
1097
|
-
autoComplete?: "
|
|
1095
|
+
autoComplete?: "off" | "name" | "email" | "url" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "username" | "username-new" | undefined;
|
|
1098
1096
|
autoCorrect?: boolean | undefined;
|
|
1099
1097
|
autoFocus?: boolean | undefined;
|
|
1100
1098
|
blurOnSubmit?: boolean | undefined;
|
|
@@ -1112,6 +1110,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1112
1110
|
onEndEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputEndEditingEventData>) => void) | undefined;
|
|
1113
1111
|
onSelectionChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSelectionChangeEventData>) => void) | undefined;
|
|
1114
1112
|
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;
|
|
1115
1114
|
onKeyPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputKeyPressEventData>) => void) | undefined;
|
|
1116
1115
|
placeholder?: string | undefined;
|
|
1117
1116
|
readOnly?: boolean | undefined;
|
|
@@ -1120,6 +1119,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1120
1119
|
secureTextEntry?: boolean | undefined;
|
|
1121
1120
|
selectTextOnFocus?: boolean | undefined;
|
|
1122
1121
|
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;
|
|
@@ -1487,19 +1487,15 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1487
1487
|
start: number;
|
|
1488
1488
|
end?: number | undefined;
|
|
1489
1489
|
} | undefined;
|
|
1490
|
-
children?: import("react").ReactNode;
|
|
1491
1490
|
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
|
-
|
|
1493
|
-
removeClippedSubviews?: boolean | undefined;
|
|
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;
|
|
1491
|
+
children?: import("react").ReactNode;
|
|
1498
1492
|
hitSlop?: number | import("react-native/types").Insets | null | undefined;
|
|
1499
1493
|
id?: string | undefined;
|
|
1500
1494
|
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
1495
|
+
onLayout?: ((event: import("react-native/types").LayoutChangeEvent) => void) | undefined;
|
|
1496
|
+
removeClippedSubviews?: boolean | undefined;
|
|
1497
|
+
testID?: string | undefined;
|
|
1501
1498
|
nativeID?: string | undefined;
|
|
1502
|
-
experimental_layoutConformance?: "strict" | "classic" | undefined;
|
|
1503
1499
|
collapsable?: boolean | undefined;
|
|
1504
1500
|
collapsableChildren?: boolean | undefined;
|
|
1505
1501
|
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
@@ -1579,6 +1575,8 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1579
1575
|
accessibilityLanguage?: string | undefined;
|
|
1580
1576
|
accessibilityShowsLargeContentViewer?: boolean | undefined;
|
|
1581
1577
|
accessibilityLargeContentTitle?: string | undefined;
|
|
1578
|
+
scrollEnabled?: boolean | undefined;
|
|
1579
|
+
onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
1582
1580
|
onPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
1583
1581
|
onPressIn?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
1584
1582
|
onPressOut?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
|
|
@@ -1592,7 +1590,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1592
1590
|
selectionColor?: import("react-native/types").ColorValue | undefined;
|
|
1593
1591
|
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
1594
1592
|
autoCapitalize?: "none" | "sentences" | "words" | "characters" | undefined;
|
|
1595
|
-
autoComplete?: "
|
|
1593
|
+
autoComplete?: "off" | "name" | "email" | "url" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "username" | "username-new" | undefined;
|
|
1596
1594
|
autoCorrect?: boolean | undefined;
|
|
1597
1595
|
autoFocus?: boolean | undefined;
|
|
1598
1596
|
blurOnSubmit?: boolean | undefined;
|
|
@@ -1610,6 +1608,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1610
1608
|
onEndEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputEndEditingEventData>) => void) | undefined;
|
|
1611
1609
|
onSelectionChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSelectionChangeEventData>) => void) | undefined;
|
|
1612
1610
|
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;
|
|
1613
1612
|
onKeyPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputKeyPressEventData>) => void) | undefined;
|
|
1614
1613
|
placeholder?: string | undefined;
|
|
1615
1614
|
readOnly?: boolean | undefined;
|
|
@@ -1618,6 +1617,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
|
|
|
1618
1617
|
secureTextEntry?: boolean | undefined;
|
|
1619
1618
|
selectTextOnFocus?: boolean | undefined;
|
|
1620
1619
|
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;
|
|
@@ -21,7 +21,7 @@ const Timeline = props => {
|
|
|
21
21
|
const [anchorMeasurements, setAnchorMeasurements] = useState();
|
|
22
22
|
const [contentContainerMeasurements, setContentContainerMeasurements] = useState();
|
|
23
23
|
const [pointMeasurements, setPointMeasurements] = useState();
|
|
24
|
-
const contentContainerRef = useRef();
|
|
24
|
+
const contentContainerRef = useRef(undefined);
|
|
25
25
|
const onMeasure = (x, y, width, height) => {
|
|
26
26
|
setAnchorMeasurements({
|
|
27
27
|
x,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import {AccessibilityInfo, findNodeHandle, StyleSheet, Animated, Easing, ActivityIndicator} from 'react-native';
|
|
5
4
|
import {PureBaseComponent} from '../../commons';
|
|
@@ -21,74 +20,6 @@ const COLOR = Colors.white;
|
|
|
21
20
|
export default class Toast extends PureBaseComponent {
|
|
22
21
|
static displayName = 'Toast';
|
|
23
22
|
|
|
24
|
-
static propTypes = {
|
|
25
|
-
/**
|
|
26
|
-
* Whether to show or hide the toast
|
|
27
|
-
*/
|
|
28
|
-
visible: PropTypes.bool,
|
|
29
|
-
/**
|
|
30
|
-
* The position of the toast. 'top' or 'bottom'.
|
|
31
|
-
*/
|
|
32
|
-
position: PropTypes.oneOf(['top', 'bottom']),
|
|
33
|
-
/**
|
|
34
|
-
* custom zIndex for toast
|
|
35
|
-
*/
|
|
36
|
-
zIndex: PropTypes.number,
|
|
37
|
-
/**
|
|
38
|
-
* The background color of the toast
|
|
39
|
-
*/
|
|
40
|
-
backgroundColor: PropTypes.string,
|
|
41
|
-
/**
|
|
42
|
-
* the toast content color (message, actions labels)
|
|
43
|
-
*/
|
|
44
|
-
color: PropTypes.string,
|
|
45
|
-
/**
|
|
46
|
-
* the toast message
|
|
47
|
-
*/
|
|
48
|
-
message: PropTypes.string,
|
|
49
|
-
/**
|
|
50
|
-
* should message be centered in the toast
|
|
51
|
-
*/
|
|
52
|
-
centerMessage: PropTypes.bool,
|
|
53
|
-
/**
|
|
54
|
-
* a left icon
|
|
55
|
-
*/
|
|
56
|
-
icon: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
|
|
57
|
-
/**
|
|
58
|
-
* a single action for the user
|
|
59
|
-
*/
|
|
60
|
-
action: PropTypes.shape(Button.propTypes),
|
|
61
|
-
/**
|
|
62
|
-
* should show a loader (showDismiss must be false)
|
|
63
|
-
*/
|
|
64
|
-
showLoader: PropTypes.bool,
|
|
65
|
-
/**
|
|
66
|
-
* callback for dismiss action
|
|
67
|
-
*/
|
|
68
|
-
onDismiss: PropTypes.func,
|
|
69
|
-
/**
|
|
70
|
-
* number of milliseconds to automatically invoke the onDismiss callback
|
|
71
|
-
*/
|
|
72
|
-
autoDismiss: PropTypes.number,
|
|
73
|
-
/**
|
|
74
|
-
* show dismiss action (right 'X' button)
|
|
75
|
-
*/
|
|
76
|
-
showDismiss: PropTypes.bool,
|
|
77
|
-
/**
|
|
78
|
-
* callback for end of component animation
|
|
79
|
-
*/
|
|
80
|
-
onAnimationEnd: PropTypes.func,
|
|
81
|
-
/**
|
|
82
|
-
* render a custom view that will appear permanently above or below a Toast,
|
|
83
|
-
* depends on the Toast's position, and animate with it when the Toast is made visible or dismissed
|
|
84
|
-
*/
|
|
85
|
-
renderAttachment: PropTypes.elementType,
|
|
86
|
-
/**
|
|
87
|
-
* render a custom loader component instead of the default when passing showLoader
|
|
88
|
-
*/
|
|
89
|
-
customLoader: PropTypes.func
|
|
90
|
-
};
|
|
91
|
-
|
|
92
23
|
static defaultProps = {
|
|
93
24
|
position: 'top',
|
|
94
25
|
zIndex: 100
|