react-native 0.88.0-rc.3 → 0.88.0-rc.4
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/Libraries/Animated/components/AnimatedScrollView.js +2 -2
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +8 -5
- package/Libraries/Components/Button.js +4 -2
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +7 -4
- package/Libraries/Components/Pressable/Pressable.js +4 -2
- package/Libraries/Components/TextInput/InputAccessoryView.js +8 -6
- package/Libraries/Components/TextInput/TextInput.js +5 -5
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +85 -84
- package/Libraries/Components/View/ViewAccessibility.js +8 -4
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/ImageProps.js +38 -18
- package/Libraries/Modal/Modal.js +4 -2
- package/Libraries/StyleSheet/StyleSheet.js +3 -9
- package/Libraries/StyleSheet/StyleSheet.js.flow +3 -9
- package/Libraries/StyleSheet/StyleSheetTypes.js +12 -9
- package/Libraries/StyleSheet/splitLayoutProps.js +6 -6
- package/Libraries/Text/Text.js +6 -6
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +16 -2
- package/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +3 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +7 -7
- package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +7 -6
- package/types_generated/Libraries/Components/Button.d.ts +30 -29
- package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +8 -7
- package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +5 -4
- package/types_generated/Libraries/Components/TextInput/InputAccessoryView.d.ts +7 -6
- package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +26 -25
- package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +23 -22
- package/types_generated/Libraries/Image/ImageProps.d.ts +39 -36
- package/types_generated/Libraries/Modal/Modal.d.ts +4 -3
- package/types_generated/Libraries/StyleSheet/StyleSheet.d.ts +5 -8
- package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +10 -10
package/Libraries/Text/Text.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import type {HostInstance} from '../../src/private/types/HostInstance';
|
|
12
12
|
import type {TextStyleProp} from '../StyleSheet/StyleSheet';
|
|
13
|
-
import type {
|
|
13
|
+
import type {TextStyle} from '../StyleSheet/StyleSheetTypes';
|
|
14
14
|
import type {GestureResponderEvent} from '../Types/CoreEventTypes';
|
|
15
15
|
import type {NativeTextProps} from './TextNativeComponent';
|
|
16
16
|
import type {PressRetentionOffset, TextProps} from './TextProps';
|
|
@@ -186,22 +186,22 @@ const TextImpl: component(
|
|
|
186
186
|
|
|
187
187
|
let processedStyle = flattenStyle<TextStyleProp>(_style);
|
|
188
188
|
if (processedStyle != null) {
|
|
189
|
-
let overrides: ?{...
|
|
189
|
+
let overrides: ?{...TextStyle} = null;
|
|
190
190
|
if (typeof processedStyle.fontWeight === 'number') {
|
|
191
|
-
overrides = overrides || ({} as {...
|
|
191
|
+
overrides = overrides || ({} as {...TextStyle});
|
|
192
192
|
overrides.fontWeight =
|
|
193
193
|
// $FlowFixMe[incompatible-type]
|
|
194
|
-
String(processedStyle.fontWeight) as
|
|
194
|
+
String(processedStyle.fontWeight) as TextStyle['fontWeight'];
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
if (processedStyle.userSelect != null) {
|
|
198
198
|
_selectable = userSelectToSelectableMap[processedStyle.userSelect];
|
|
199
|
-
overrides = overrides || ({} as {...
|
|
199
|
+
overrides = overrides || ({} as {...TextStyle});
|
|
200
200
|
overrides.userSelect = undefined;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
if (processedStyle.verticalAlign != null) {
|
|
204
|
-
overrides = overrides || ({} as {...
|
|
204
|
+
overrides = overrides || ({} as {...TextStyle});
|
|
205
205
|
overrides.textAlignVertical =
|
|
206
206
|
verticalAlignToTextAlignVerticalMap[processedStyle.verticalAlign];
|
|
207
207
|
overrides.verticalAlign = undefined;
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -88,6 +88,8 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
|
|
88
88
|
view.setTag(R.id.accessibility_actions, null);
|
|
89
89
|
view.setTag(R.id.accessibility_value, null);
|
|
90
90
|
view.setTag(R.id.accessibility_state_expanded, null);
|
|
91
|
+
view.setTag(R.id.accessibility_state_disabled, null);
|
|
92
|
+
view.setEnabled(true);
|
|
91
93
|
view.setTag(R.id.view_clipped, null);
|
|
92
94
|
|
|
93
95
|
// This indirectly calls (and resets):
|
|
@@ -360,6 +362,7 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
|
|
360
362
|
@ReactProp(name = ViewProps.ACCESSIBILITY_STATE)
|
|
361
363
|
public void setViewState(@NonNull T view, @Nullable ReadableMap accessibilityState) {
|
|
362
364
|
if (accessibilityState == null) {
|
|
365
|
+
resetDisabledFromAccessibilityState(view);
|
|
363
366
|
return;
|
|
364
367
|
}
|
|
365
368
|
if (accessibilityState.hasKey("expanded")) {
|
|
@@ -381,8 +384,12 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
|
|
381
384
|
view.setSelected(false);
|
|
382
385
|
}
|
|
383
386
|
view.setTag(R.id.accessibility_state, accessibilityState);
|
|
384
|
-
if (accessibilityState.hasKey("disabled")) {
|
|
385
|
-
|
|
387
|
+
if (accessibilityState.hasKey("disabled") && !accessibilityState.isNull("disabled")) {
|
|
388
|
+
boolean disabled = accessibilityState.getBoolean("disabled");
|
|
389
|
+
view.setEnabled(!disabled);
|
|
390
|
+
view.setTag(R.id.accessibility_state_disabled, disabled);
|
|
391
|
+
} else {
|
|
392
|
+
resetDisabledFromAccessibilityState(view);
|
|
386
393
|
}
|
|
387
394
|
|
|
388
395
|
// For states which don't have corresponding methods in
|
|
@@ -409,6 +416,13 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
418
|
|
|
419
|
+
private static void resetDisabledFromAccessibilityState(@NonNull View view) {
|
|
420
|
+
if (Boolean.TRUE.equals(view.getTag(R.id.accessibility_state_disabled))) {
|
|
421
|
+
view.setEnabled(true);
|
|
422
|
+
}
|
|
423
|
+
view.setTag(R.id.accessibility_state_disabled, null);
|
|
424
|
+
}
|
|
425
|
+
|
|
412
426
|
private void updateViewContentDescription(@NonNull T view) {
|
|
413
427
|
final String accessibilityLabel = (String) view.getTag(R.id.accessibility_label);
|
|
414
428
|
final ReadableMap accessibilityState = (ReadableMap) view.getTag(R.id.accessibility_state);
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
<!--tag is used to store accessibilityStateExpanded -->
|
|
37
37
|
<item type="id" name="accessibility_state_expanded"/>
|
|
38
38
|
|
|
39
|
+
<!--tag is used to store whether accessibilityState.disabled disabled the view -->
|
|
40
|
+
<item type="id" name="accessibility_state_disabled"/>
|
|
41
|
+
|
|
39
42
|
<!--tag is used to store accessibilityLabel tag-->
|
|
40
43
|
<item type="id" name="accessibility_label"/>
|
|
41
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.88.0-rc.
|
|
3
|
+
"version": "0.88.0-rc.4",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -154,12 +154,12 @@
|
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
156
|
"dependencies": {
|
|
157
|
-
"@react-native/asset-utils": "0.88.0-rc.
|
|
158
|
-
"@react-native/codegen": "0.88.0-rc.
|
|
159
|
-
"@react-native/community-cli-plugin": "0.88.0-rc.
|
|
160
|
-
"@react-native/gradle-plugin": "0.88.0-rc.
|
|
161
|
-
"@react-native/normalize-colors": "0.88.0-rc.
|
|
162
|
-
"@react-native/virtualized-lists": "0.88.0-rc.
|
|
157
|
+
"@react-native/asset-utils": "0.88.0-rc.4",
|
|
158
|
+
"@react-native/codegen": "0.88.0-rc.4",
|
|
159
|
+
"@react-native/community-cli-plugin": "0.88.0-rc.4",
|
|
160
|
+
"@react-native/gradle-plugin": "0.88.0-rc.4",
|
|
161
|
+
"@react-native/normalize-colors": "0.88.0-rc.4",
|
|
162
|
+
"@react-native/virtualized-lists": "0.88.0-rc.4",
|
|
163
163
|
"anser": "^1.4.9",
|
|
164
164
|
"ansi-regex": "^5.0.0",
|
|
165
165
|
"flow-parser": "0.327.0",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<da0efc5527249ef2db97b8f22dcf8101>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
10
|
* Original file: packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js
|
|
@@ -24,18 +24,18 @@ type ActivityIndicatorIOSProps = Readonly<{
|
|
|
24
24
|
*/
|
|
25
25
|
hidesWhenStopped?: boolean | undefined;
|
|
26
26
|
}>;
|
|
27
|
-
|
|
27
|
+
type ActivityIndicatorPropsCore = Readonly<{
|
|
28
28
|
/**
|
|
29
29
|
* Whether to show the indicator (`true`) or hide it (`false`).
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
animating?: boolean | undefined;
|
|
32
32
|
/**
|
|
33
33
|
* The foreground color of the spinner.
|
|
34
34
|
*
|
|
35
35
|
* @default {@platform android} `null` (system accent default color)
|
|
36
36
|
* @default {@platform ios} '#999999'
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
color?: ColorValue | undefined;
|
|
39
39
|
/**
|
|
40
40
|
* Size of the indicator.
|
|
41
41
|
*
|
|
@@ -44,8 +44,9 @@ export interface ActivityIndicatorProps extends Readonly<Omit<ViewProps, keyof A
|
|
|
44
44
|
* @type enum(`'small'`, `'large'`)
|
|
45
45
|
* @type {@platform android} number
|
|
46
46
|
*/
|
|
47
|
-
|
|
48
|
-
}
|
|
47
|
+
size?: IndicatorSize | undefined;
|
|
48
|
+
}>;
|
|
49
|
+
export interface ActivityIndicatorProps extends Readonly<Omit<ViewProps, keyof ActivityIndicatorIOSProps | keyof ActivityIndicatorPropsCore | keyof {}> & Omit<ActivityIndicatorIOSProps, keyof ActivityIndicatorPropsCore | keyof {}> & Omit<ActivityIndicatorPropsCore, keyof {}>> {}
|
|
49
50
|
declare const ActivityIndicator: (props: Omit<ActivityIndicatorProps, "ref"> & {
|
|
50
51
|
ref?: React.Ref<ActivityIndicatorInstance> | undefined;
|
|
51
52
|
}) => React.ReactNode;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<191f6fea9c73a3fda442163b2cebbf72>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
10
|
* Original file: packages/react-native/Libraries/Components/Button.js
|
|
@@ -16,16 +16,16 @@ import { type ColorValue } from "../StyleSheet/StyleSheet";
|
|
|
16
16
|
import TouchableNativeFeedback from "./Touchable/TouchableNativeFeedback";
|
|
17
17
|
import TouchableOpacity from "./Touchable/TouchableOpacity";
|
|
18
18
|
import * as React from "react";
|
|
19
|
-
|
|
19
|
+
type ButtonPropsCore = Readonly<{
|
|
20
20
|
/**
|
|
21
21
|
* Text to display inside the button. On Android the given title will be
|
|
22
22
|
* converted to the uppercased form.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
title: string;
|
|
25
25
|
/**
|
|
26
26
|
* Handler called when the user taps the button.
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
onPress?: ((event?: GestureResponderEvent) => unknown) | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* If `true`, doesn't play system sound on touch.
|
|
31
31
|
*
|
|
@@ -33,14 +33,14 @@ export interface ButtonProps {
|
|
|
33
33
|
*
|
|
34
34
|
* @default `false`
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
touchSoundDisabled?: boolean | undefined;
|
|
37
37
|
/**
|
|
38
38
|
* Color of the text (iOS), or background color of the button (Android).
|
|
39
39
|
*
|
|
40
40
|
* @default {@platform android} `'#2196F3'`
|
|
41
41
|
* @default {@platform ios} `'#007AFF'`
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
color?: ColorValue | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* TV preferred focus.
|
|
46
46
|
*
|
|
@@ -49,7 +49,7 @@ export interface ButtonProps {
|
|
|
49
49
|
* @default `false`
|
|
50
50
|
* @deprecated Use `focusable` instead
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
hasTVPreferredFocus?: boolean | undefined;
|
|
53
53
|
/**
|
|
54
54
|
* Designates the next view to receive focus when the user navigates down. See
|
|
55
55
|
* the [Android documentation][android:nextFocusDown].
|
|
@@ -59,7 +59,7 @@ export interface ButtonProps {
|
|
|
59
59
|
*
|
|
60
60
|
* @platform android, tv
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
nextFocusDown?: number | undefined;
|
|
63
63
|
/**
|
|
64
64
|
* Designates the next view to receive focus when the user navigates forward.
|
|
65
65
|
* See the [Android documentation][android:nextFocusForward].
|
|
@@ -69,7 +69,7 @@ export interface ButtonProps {
|
|
|
69
69
|
*
|
|
70
70
|
* @platform android, tv
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
nextFocusForward?: number | undefined;
|
|
73
73
|
/**
|
|
74
74
|
* Designates the next view to receive focus when the user navigates left. See
|
|
75
75
|
* the [Android documentation][android:nextFocusLeft].
|
|
@@ -79,7 +79,7 @@ export interface ButtonProps {
|
|
|
79
79
|
*
|
|
80
80
|
* @platform android, tv
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
nextFocusLeft?: number | undefined;
|
|
83
83
|
/**
|
|
84
84
|
* Designates the next view to receive focus when the user navigates right. See
|
|
85
85
|
* the [Android documentation][android:nextFocusRight].
|
|
@@ -89,7 +89,7 @@ export interface ButtonProps {
|
|
|
89
89
|
*
|
|
90
90
|
* @platform android, tv
|
|
91
91
|
*/
|
|
92
|
-
|
|
92
|
+
nextFocusRight?: number | undefined;
|
|
93
93
|
/**
|
|
94
94
|
* Designates the next view to receive focus when the user navigates up. See
|
|
95
95
|
* the [Android documentation][android:nextFocusUp].
|
|
@@ -99,44 +99,45 @@ export interface ButtonProps {
|
|
|
99
99
|
*
|
|
100
100
|
* @platform android, tv
|
|
101
101
|
*/
|
|
102
|
-
|
|
102
|
+
nextFocusUp?: number | undefined;
|
|
103
103
|
/**
|
|
104
104
|
* Text to display for blindness accessibility features.
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
accessibilityLabel?: string | undefined;
|
|
107
107
|
/**
|
|
108
108
|
* Alias for `accessibilityLabel`.
|
|
109
109
|
*/
|
|
110
|
-
|
|
110
|
+
"aria-label"?: string | undefined;
|
|
111
111
|
/**
|
|
112
112
|
* If `true`, disable all interactions for this component.
|
|
113
113
|
*
|
|
114
114
|
* @default `false`
|
|
115
115
|
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
disabled?: boolean | undefined;
|
|
117
|
+
testID?: string | undefined;
|
|
118
|
+
accessible?: boolean | undefined;
|
|
119
|
+
accessibilityActions?: ReadonlyArray<AccessibilityActionInfo> | undefined;
|
|
120
|
+
onAccessibilityAction?: ((event: AccessibilityActionEvent) => unknown) | undefined;
|
|
121
|
+
accessibilityState?: AccessibilityState | undefined;
|
|
122
122
|
/**
|
|
123
123
|
* Alias for `accessibilityState`.
|
|
124
124
|
*/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
125
|
+
"aria-busy"?: boolean | undefined;
|
|
126
|
+
"aria-checked"?: (boolean | undefined) | "mixed" | undefined;
|
|
127
|
+
"aria-disabled"?: boolean | undefined;
|
|
128
|
+
"aria-expanded"?: boolean | undefined;
|
|
129
|
+
"aria-selected"?: boolean | undefined;
|
|
130
|
+
importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
|
|
131
|
+
accessibilityHint?: string | undefined;
|
|
132
132
|
/**
|
|
133
133
|
* A BCP 47 language tag for the screen reader to use when reading text
|
|
134
134
|
* content.
|
|
135
135
|
*
|
|
136
136
|
* @platform ios
|
|
137
137
|
*/
|
|
138
|
-
|
|
139
|
-
}
|
|
138
|
+
accessibilityLanguage?: string | undefined;
|
|
139
|
+
}>;
|
|
140
|
+
export interface ButtonProps extends ButtonPropsCore {}
|
|
140
141
|
declare const NativeTouchable: typeof TouchableNativeFeedback | typeof TouchableOpacity;
|
|
141
142
|
export type ButtonInstance = React.ComponentRef<typeof NativeTouchable>;
|
|
142
143
|
declare const Button: (props: Omit<ButtonProps, "ref"> & {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<04d678da86d68f6cdaf135c50ad68fdc>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
10
|
* Original file: packages/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
|
|
@@ -14,29 +14,30 @@ import type { ViewStyleProp } from "../../StyleSheet/StyleSheet";
|
|
|
14
14
|
import type { ViewProps } from "../View/ViewPropTypes";
|
|
15
15
|
import View from "../View/View";
|
|
16
16
|
import * as React from "react";
|
|
17
|
-
|
|
17
|
+
type KeyboardAvoidingViewPropsCore = Readonly<{
|
|
18
18
|
/**
|
|
19
19
|
* Specify how to react to the presence of the keyboard.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
behavior?: ("height" | "position" | "padding") | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* The style of the content container (View) when `behavior` is 'position'.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
contentContainerStyle?: ViewStyleProp | undefined;
|
|
26
26
|
/**
|
|
27
27
|
* Whether the `KeyboardAvoidingView` is enabled.
|
|
28
28
|
*
|
|
29
29
|
* @default `true`
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
enabled?: boolean | undefined;
|
|
32
32
|
/**
|
|
33
33
|
* Distance between the top of the user screen and the React Native view,
|
|
34
34
|
* may be non-zero in some use cases.
|
|
35
35
|
*
|
|
36
36
|
* @default `0`
|
|
37
37
|
*/
|
|
38
|
-
|
|
39
|
-
}
|
|
38
|
+
keyboardVerticalOffset?: number | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export interface KeyboardAvoidingViewProps extends Readonly<Omit<ViewProps, keyof KeyboardAvoidingViewPropsCore | keyof {}> & Omit<KeyboardAvoidingViewPropsCore, keyof {}>> {}
|
|
40
41
|
type KeyboardAvoidingViewState = {
|
|
41
42
|
bottom: number;
|
|
42
43
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<f107db6ba92c1303aae7d7b76b434dcd>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
10
|
* Original file: packages/react-native/Libraries/Components/Pressable/Pressable.js
|
|
@@ -19,9 +19,10 @@ import { type PressableAndroidRippleConfig } from "./useAndroidRippleForView";
|
|
|
19
19
|
import * as React from "react";
|
|
20
20
|
export type PressableInstance = HostInstance;
|
|
21
21
|
export type { PressableAndroidRippleConfig };
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
22
|
+
type PressableStateCallbackTypeCore = Readonly<{
|
|
23
|
+
pressed: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
export interface PressableStateCallbackType extends PressableStateCallbackTypeCore {}
|
|
25
26
|
type PressableBaseProps = Readonly<{
|
|
26
27
|
/**
|
|
27
28
|
* Whether a press gesture can be interrupted by a parent gesture such as a
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<77b194017f6f3ea0dbc2d05267d4c10e>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
10
|
* Original file: packages/react-native/Libraries/Components/TextInput/InputAccessoryView.js
|
|
@@ -12,15 +12,16 @@
|
|
|
12
12
|
|
|
13
13
|
import { type ColorValue, type ViewStyleProp } from "../../StyleSheet/StyleSheet";
|
|
14
14
|
import * as React from "react";
|
|
15
|
-
|
|
15
|
+
type InputAccessoryViewPropsCore = Readonly<{
|
|
16
16
|
readonly children: React.ReactNode;
|
|
17
17
|
/**
|
|
18
18
|
* An ID used to associate this `InputAccessoryView` to specified `TextInput`(s).
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
20
|
+
nativeID?: string | undefined;
|
|
21
|
+
style?: ViewStyleProp | undefined;
|
|
22
|
+
backgroundColor?: ColorValue | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export interface InputAccessoryViewProps extends InputAccessoryViewPropsCore {}
|
|
24
25
|
declare const InputAccessoryView: React.ComponentType<InputAccessoryViewProps>;
|
|
25
26
|
/**
|
|
26
27
|
* A component which enables customization of the keyboard input accessory view on iOS. The input accessory view is displayed above the keyboard whenever a `TextInput` has focus. This component can be used to create custom toolbars.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<420229eb9219d3c861552b994d9df718>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
10
|
* Original file: packages/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.js
|
|
@@ -25,29 +25,29 @@ export type TouchableWithoutFeedbackPropsAndroid = {
|
|
|
25
25
|
*/
|
|
26
26
|
touchSoundDisabled?: boolean | undefined;
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
type TouchableWithoutFeedbackPropsCore = {
|
|
29
|
+
children?: React.ReactNode | undefined;
|
|
30
30
|
/**
|
|
31
31
|
* Delay in ms, from onPressIn, before onLongPress is called.
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
delayLongPress?: number | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* Delay in ms, from the start of the touch, before onPressIn is called.
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
delayPressIn?: number | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* Delay in ms, from the release of the touch, before onPressOut is called.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
delayPressOut?: number | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* If true, disable all interactions for this component.
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
disabled?: boolean | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* Whether this View should be focusable with a non-touch input device,
|
|
48
48
|
* eg. receive focus with a hardware keyboard / TV remote.
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
focusable?: boolean | undefined;
|
|
51
51
|
/**
|
|
52
52
|
* This defines how far your touch can start away from the button.
|
|
53
53
|
* This is added to pressRetentionOffset when moving off of the button.
|
|
@@ -55,39 +55,39 @@ export interface TouchableWithoutFeedbackProps extends Readonly<TouchableWithout
|
|
|
55
55
|
* the Z-index of sibling views always takes precedence if a touch hits
|
|
56
56
|
* two overlapping views.
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
hitSlop?: EdgeInsetsOrSizeProp | undefined;
|
|
59
59
|
/**
|
|
60
60
|
* Used to reference react managed views from native code.
|
|
61
61
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
id?: string | undefined;
|
|
63
|
+
importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
|
|
64
|
+
nativeID?: string | undefined;
|
|
65
|
+
onAccessibilityAction?: ((event: AccessibilityActionEvent) => unknown) | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* When `accessible` is true (which is the default) this may be called when
|
|
68
68
|
* the OS-specific concept of "blur" occurs, meaning the element lost focus.
|
|
69
69
|
* Some platforms may not have the concept of blur.
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
onBlur?: ((event: BlurEvent) => unknown) | undefined;
|
|
72
72
|
/**
|
|
73
73
|
* When `accessible` is true (which is the default) this may be called when
|
|
74
74
|
* the OS-specific concept of "focus" occurs. Some platforms may not have
|
|
75
75
|
* the concept of focus.
|
|
76
76
|
*/
|
|
77
|
-
|
|
77
|
+
onFocus?: ((event: FocusEvent) => unknown) | undefined;
|
|
78
78
|
/**
|
|
79
79
|
* Invoked on mount and layout changes with
|
|
80
80
|
* {nativeEvent: {layout: {x, y, width, height}}}
|
|
81
81
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined;
|
|
83
|
+
onLongPress?: ((event: GestureResponderEvent) => unknown) | undefined;
|
|
84
84
|
/**
|
|
85
85
|
* Called when the touch is released,
|
|
86
86
|
* but not if cancelled (e.g. by a scroll that steals the responder lock).
|
|
87
87
|
*/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
onPress?: ((event: GestureResponderEvent) => unknown) | undefined;
|
|
89
|
+
onPressIn?: ((event: GestureResponderEvent) => unknown) | undefined;
|
|
90
|
+
onPressOut?: ((event: GestureResponderEvent) => unknown) | undefined;
|
|
91
91
|
/**
|
|
92
92
|
* When the scroll view is disabled, this defines how far your
|
|
93
93
|
* touch may move off of the button, before deactivating the button.
|
|
@@ -96,17 +96,18 @@ export interface TouchableWithoutFeedbackProps extends Readonly<TouchableWithout
|
|
|
96
96
|
* while the scroll view is disabled. Ensure you pass in a constant
|
|
97
97
|
* to reduce memory allocations.
|
|
98
98
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
pressRetentionOffset?: EdgeInsetsOrSizeProp | undefined;
|
|
100
|
+
rejectResponderTermination?: boolean | undefined;
|
|
101
101
|
/**
|
|
102
102
|
* Used to locate this view in end-to-end tests.
|
|
103
103
|
*/
|
|
104
|
-
|
|
104
|
+
testID?: string | undefined;
|
|
105
105
|
/**
|
|
106
106
|
* //FIXME: not in doc but available in examples
|
|
107
107
|
*/
|
|
108
|
-
|
|
109
|
-
}
|
|
108
|
+
style?: ViewStyleProp | undefined;
|
|
109
|
+
};
|
|
110
|
+
export interface TouchableWithoutFeedbackProps extends Readonly<TouchableWithoutFeedbackPropsCore & TouchableWithoutFeedbackPropsAndroid & TouchableWithoutFeedbackPropsIOS & AccessibilityProps> {}
|
|
110
111
|
/**
|
|
111
112
|
* Do not use unless you have a very good reason. All elements that respond to press should have a visual feedback when touched.
|
|
112
113
|
*
|