uilib-native 5.0.1 → 5.1.0-snapshot.7635
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/HighlighterOverlayView/index.d.ts +2 -2
- package/components/HighlighterOverlayView/index.web.d.ts +2 -2
- package/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardViewBase.d.ts +1 -1
- package/components/Keyboard/KeyboardAccessoryView/index.d.ts +2 -2
- package/components/Keyboard/KeyboardAccessoryView/index.js +3 -1
- package/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.js +3 -1
- package/components/Keyboard/KeyboardTrackingView/index.d.ts +6 -2
- package/components/Keyboard/KeyboardTrackingView/index.js +5 -4
- package/components/Keyboard/index.d.ts +2 -1
- package/package.json +4 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
3
|
type HighlightFrameType = {
|
|
4
4
|
x: number;
|
|
@@ -28,7 +28,7 @@ export type HighlighterOverlayViewProps = {
|
|
|
28
28
|
testID?: string;
|
|
29
29
|
};
|
|
30
30
|
declare const HighlighterOverlayView: {
|
|
31
|
-
(props: HighlighterOverlayViewProps):
|
|
31
|
+
(props: HighlighterOverlayViewProps): JSX.Element;
|
|
32
32
|
displayName: string;
|
|
33
33
|
};
|
|
34
34
|
export default HighlighterOverlayView;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
3
|
type HighlightFrameType = {
|
|
4
4
|
x: number;
|
|
@@ -28,7 +28,7 @@ export type HighlighterOverlayViewProps = {
|
|
|
28
28
|
testID?: string;
|
|
29
29
|
};
|
|
30
30
|
declare const HighlighterOverlayView: {
|
|
31
|
-
(props: HighlighterOverlayViewProps):
|
|
31
|
+
(props: HighlighterOverlayViewProps): JSX.Element;
|
|
32
32
|
displayName: string;
|
|
33
33
|
};
|
|
34
34
|
export default HighlighterOverlayView;
|
package/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardViewBase.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type CustomKeyboardViewBaseProps = {
|
|
|
9
9
|
component?: string;
|
|
10
10
|
onItemSelected?: (component?: string, args?: any) => void;
|
|
11
11
|
onRequestShowKeyboard?: (keyboardId: string) => void;
|
|
12
|
-
children?: React.
|
|
12
|
+
children?: React.ReactNode;
|
|
13
13
|
};
|
|
14
14
|
export default class CustomKeyboardViewBase<T extends CustomKeyboardViewBaseProps> extends Component<T> {
|
|
15
15
|
static defaultProps: {
|
|
@@ -6,7 +6,7 @@ export type KeyboardAccessoryViewProps = kbTrackingViewProps & {
|
|
|
6
6
|
/**
|
|
7
7
|
* Content to be rendered above the keyboard
|
|
8
8
|
*/
|
|
9
|
-
renderContent?: () => React.ReactElement
|
|
9
|
+
renderContent?: () => React.ReactElement<any>;
|
|
10
10
|
/**
|
|
11
11
|
* iOS only.
|
|
12
12
|
* The reference to the actual text input (or the keyboard may not reset when instructed to, etc.).
|
|
@@ -37,7 +37,7 @@ export type KeyboardAccessoryViewProps = kbTrackingViewProps & {
|
|
|
37
37
|
* Callback that will be called once the keyboard has been closed
|
|
38
38
|
*/
|
|
39
39
|
onKeyboardResigned?: () => void;
|
|
40
|
-
children?: React.
|
|
40
|
+
children?: React.ReactNode;
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
43
|
* @description: View that allows replacing the default keyboard with other components
|
|
@@ -141,7 +141,9 @@ class KeyboardAccessoryView extends Component {
|
|
|
141
141
|
scrollBehavior,
|
|
142
142
|
...others
|
|
143
143
|
} = this.props;
|
|
144
|
-
return <KeyboardTrackingView {...others} scrollBehavior={scrollBehavior} ref={r =>
|
|
144
|
+
return <KeyboardTrackingView {...others} scrollBehavior={scrollBehavior} ref={r => {
|
|
145
|
+
this.trackingViewRef = r;
|
|
146
|
+
}} style={styles.trackingToolbarContainer} onLayout={this.onContainerComponentHeightChanged}>
|
|
145
147
|
<KeyboardHeightListener id={`${this.id}`} onDismiss={this.onDismiss} onKeyboardHeightChange={this.onKeyboardHeightChange} />
|
|
146
148
|
<>{renderContent?.()}</>
|
|
147
149
|
<CustomKeyboardView keyboardHeight={keyboardHeight} shouldFocus={shouldFocus} onKeyboardDismiss={this.onKeyboardDismiss} inputRef={kbInputRef} component={kbComponent} initialProps={this.processInitialProps()} onItemSelected={onItemSelected} onRequestShowKeyboard={onRequestShowKeyboard} useSafeArea={others.useSafeArea} />
|
|
@@ -18,7 +18,9 @@ class KeyboardTrackingView extends PureComponent {
|
|
|
18
18
|
useSafeArea: false
|
|
19
19
|
};
|
|
20
20
|
render() {
|
|
21
|
-
return <KeyboardTrackingViewNativeComponent {...this.props} ref={r =>
|
|
21
|
+
return <KeyboardTrackingViewNativeComponent {...this.props} ref={r => {
|
|
22
|
+
this.ref = r;
|
|
23
|
+
}} />;
|
|
22
24
|
}
|
|
23
25
|
async getNativeProps() {
|
|
24
26
|
if (this.ref && KeyboardTrackingViewTempManager && KeyboardTrackingViewTempManager.getNativeProps) {
|
|
@@ -73,9 +73,13 @@ export type KeyboardTrackingViewProps = ViewProps & {
|
|
|
73
73
|
usesBottomTabs?: boolean;
|
|
74
74
|
ref?: any;
|
|
75
75
|
style?: StyleProp<ViewStyle>;
|
|
76
|
-
children?: React.
|
|
76
|
+
children?: React.ReactNode;
|
|
77
77
|
};
|
|
78
|
-
declare const
|
|
78
|
+
declare const defaultProps: {};
|
|
79
|
+
declare const KeyboardTrackingView: React.ForwardRefExoticComponent<Omit<KeyboardTrackingViewProps, "ref"> & React.RefAttributes<unknown>>;
|
|
80
|
+
type KeyboardTrackingViewType = typeof KeyboardTrackingView & {
|
|
79
81
|
scrollBehaviors: typeof SCROLL_BEHAVIORS;
|
|
82
|
+
defaultProps: typeof defaultProps;
|
|
80
83
|
};
|
|
84
|
+
declare const _default: KeyboardTrackingViewType;
|
|
81
85
|
export default _default;
|
|
@@ -8,15 +8,16 @@ const SCROLL_BEHAVIORS = {
|
|
|
8
8
|
SCROLL_TO_BOTTOM_INVERTED_ONLY: NativeModules.KeyboardTrackingViewTempManager?.KeyboardTrackingScrollBehaviorScrollToBottomInvertedOnly,
|
|
9
9
|
FIXED_OFFSET: NativeModules.KeyboardTrackingViewTempManager?.KeyboardTrackingScrollBehaviorFixedOffset
|
|
10
10
|
};
|
|
11
|
+
const defaultProps = {};
|
|
11
12
|
const KeyboardTrackingView = forwardRef(({
|
|
12
13
|
children,
|
|
13
14
|
...others
|
|
14
15
|
}, ref) => {
|
|
15
16
|
const KeyboardTrackingViewContainer = isAndroid ? KeyboardTrackingViewAndroid : KeyboardTrackingViewIOS;
|
|
16
|
-
return <KeyboardTrackingViewContainer {...others} ref={ref}>
|
|
17
|
+
return <KeyboardTrackingViewContainer {...defaultProps} {...others} ref={ref}>
|
|
17
18
|
{children}
|
|
18
19
|
</KeyboardTrackingViewContainer>;
|
|
19
20
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
KeyboardTrackingView.defaultProps = defaultProps;
|
|
22
|
+
KeyboardTrackingView.scrollBehaviors = SCROLL_BEHAVIORS;
|
|
23
|
+
export default KeyboardTrackingView;
|
|
@@ -11,6 +11,7 @@ declare const _default: {
|
|
|
11
11
|
SCROLL_TO_BOTTOM_INVERTED_ONLY: any;
|
|
12
12
|
FIXED_OFFSET: any;
|
|
13
13
|
};
|
|
14
|
+
defaultProps: {};
|
|
14
15
|
};
|
|
15
16
|
KeyboardAwareInsetsView: {
|
|
16
17
|
(props: import("react-native/types").ViewProps & {
|
|
@@ -27,7 +28,7 @@ declare const _default: {
|
|
|
27
28
|
usesBottomTabs?: boolean | undefined;
|
|
28
29
|
ref?: any;
|
|
29
30
|
style?: import("react-native/types").StyleProp<import("react-native/types").ViewStyle>;
|
|
30
|
-
children?: import("react").
|
|
31
|
+
children?: import("react").ReactNode;
|
|
31
32
|
} & {
|
|
32
33
|
offset?: number | undefined;
|
|
33
34
|
}): import("react").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uilib-native",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.1.0-snapshot.7635",
|
|
4
4
|
"homepage": "https://github.com/wix/react-native-ui-lib",
|
|
5
5
|
"description": "uilib native components (separated from js components)",
|
|
6
6
|
"main": "components/index",
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"author": "Ethan Sharabi <ethan.shar@gmail.com>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"lodash": "^4.17.21"
|
|
14
|
-
"prop-types": "^15.5.10"
|
|
13
|
+
"lodash": "^4.17.21"
|
|
15
14
|
},
|
|
16
15
|
"devDependencies": {
|
|
17
16
|
"shell-utils": "^1.0.10"
|
|
18
17
|
},
|
|
19
18
|
"peerDependencies": {
|
|
20
|
-
"react": ">=
|
|
21
|
-
"react-native": ">=0.
|
|
19
|
+
"react": ">=19.0.0",
|
|
20
|
+
"react-native": ">=0.78.3"
|
|
22
21
|
}
|
|
23
22
|
}
|