@office-iss/react-native-win32 0.72.0-preview.4 → 0.72.0-preview.5
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/CHANGELOG.json +34 -1
- package/CHANGELOG.md +15 -4
- package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
- package/Libraries/Components/Text/TextWin32.Props.d.ts +1 -1
- package/Libraries/Components/Text/TextWin32.Props.js.map +1 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +5 -0
- package/Libraries/Components/Touchable/TouchableWin32.Props.d.ts +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.Props.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/View/ViewAccessibility.d.ts +158 -4
- package/Libraries/Components/View/ViewPropTypes.d.ts +146 -6
- package/Libraries/Components/View/ViewWin32.d.ts +1 -1
- package/Libraries/Text/TextNativeComponent.win32.js +31 -5
- package/Libraries/platform-types.d.ts +5 -5
- package/overrides.json +3 -11
- package/package.json +3 -4
- package/src/Libraries/Components/Button/ButtonWin32.tsx +1 -1
- package/src/Libraries/Components/Text/TextWin32.Props.ts +1 -1
- package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +1 -1
- package/src/Libraries/Components/Touchable/TouchableWin32.Props.tsx +1 -1
- package/src/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
- package/{Libraries/Components/View/ViewPropTypes.win32.d.ts → src/Libraries/Components/View/ViewPropTypes.d.ts} +14 -1
- package/src/Libraries/Components/View/ViewWin32.d.ts +1 -1
- package/src/Libraries/platform-types.d.ts +5 -5
- package/Libraries/Components/Text/Tests/TextWin32Test.d.ts +0 -8
- package/Libraries/Components/Text/Tests/TextWin32Test.js +0 -120
- package/Libraries/Components/Text/Tests/TextWin32Test.js.map +0 -1
- package/Libraries/Components/View/Tests/ViewWin32Test.d.ts +0 -8
- package/Libraries/Components/View/Tests/ViewWin32Test.js +0 -233
- package/Libraries/Components/View/Tests/ViewWin32Test.js.map +0 -1
- package/src/Libraries/Components/Text/Tests/TextWin32Test.tsx +0 -164
- package/src/Libraries/Components/Touchable/TouchableNativeFeedback.win32.d.ts +0 -119
- package/src/Libraries/Components/View/Tests/ViewWin32Test.tsx +0 -333
- package/src/Libraries/Components/View/ViewAccessibility.win32.d.ts +0 -527
- package/src/Libraries/Components/View/ViewPropTypes.win32.d.ts +0 -372
- /package/{Libraries/Components/Touchable/TouchableNativeFeedback.win32.d.ts → src/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts} +0 -0
- /package/{Libraries/Components/View/ViewAccessibility.win32.d.ts → src/Libraries/Components/View/ViewAccessibility.d.ts} +0 -0
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import type * as React from 'react';
|
|
11
|
-
import {Constructor} from '../../../types/private/Utilities';
|
|
12
|
-
import {ColorValue} from '../../StyleSheet/StyleSheet';
|
|
13
|
-
import {TouchableMixin} from './Touchable';
|
|
14
|
-
|
|
15
|
-
import type {TVProps} from './TouchableOpacity';
|
|
16
|
-
import {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback';
|
|
17
|
-
|
|
18
|
-
interface BaseBackgroundPropType {
|
|
19
|
-
type: string;
|
|
20
|
-
rippleRadius?: number | null | undefined;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
interface RippleBackgroundPropType extends BaseBackgroundPropType {
|
|
24
|
-
type: 'RippleAndroid';
|
|
25
|
-
borderless: boolean;
|
|
26
|
-
color?: number | null | undefined;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface ThemeAttributeBackgroundPropType extends BaseBackgroundPropType {
|
|
30
|
-
type: 'ThemeAttrAndroid';
|
|
31
|
-
attribute: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
type BackgroundPropType =
|
|
35
|
-
| RippleBackgroundPropType
|
|
36
|
-
| ThemeAttributeBackgroundPropType;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @see https://reactnative.dev/docs/touchablenativefeedback#props
|
|
40
|
-
*/
|
|
41
|
-
export interface TouchableNativeFeedbackProps
|
|
42
|
-
extends TouchableWithoutFeedbackProps,
|
|
43
|
-
TVProps {
|
|
44
|
-
/**
|
|
45
|
-
* Determines the type of background drawable that's going to be used to display feedback.
|
|
46
|
-
* It takes an object with type property and extra data depending on the type.
|
|
47
|
-
* It's recommended to use one of the following static methods to generate that dictionary:
|
|
48
|
-
* 1) TouchableNativeFeedback.SelectableBackground() - will create object that represents android theme's
|
|
49
|
-
* default background for selectable elements (?android:attr/selectableItemBackground)
|
|
50
|
-
* 2) TouchableNativeFeedback.SelectableBackgroundBorderless() - will create object that represent android
|
|
51
|
-
* theme's default background for borderless selectable elements
|
|
52
|
-
* (?android:attr/selectableItemBackgroundBorderless). Available on android API level 21+
|
|
53
|
-
* 3) TouchableNativeFeedback.Ripple(color, borderless) - will create object that represents ripple drawable
|
|
54
|
-
* with specified color (as a string). If property borderless evaluates to true the ripple will render
|
|
55
|
-
* outside of the view bounds (see native actionbar buttons as an example of that behavior). This background
|
|
56
|
-
* type is available on Android API level 21+
|
|
57
|
-
*/
|
|
58
|
-
background?: BackgroundPropType | undefined;
|
|
59
|
-
useForeground?: boolean | undefined;
|
|
60
|
-
|
|
61
|
-
tooltip?: string; // Win32
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* A wrapper for making views respond properly to touches (Android only).
|
|
66
|
-
* On Android this component uses native state drawable to display touch feedback.
|
|
67
|
-
* At the moment it only supports having a single View instance as a child node,
|
|
68
|
-
* as it's implemented by replacing that View with another instance of RCTView node with some additional properties set.
|
|
69
|
-
*
|
|
70
|
-
* Background drawable of native feedback touchable can be customized with background property.
|
|
71
|
-
*
|
|
72
|
-
* @see https://reactnative.dev/docs/touchablenativefeedback#content
|
|
73
|
-
*/
|
|
74
|
-
declare class TouchableNativeFeedbackComponent extends React.Component<TouchableNativeFeedbackProps> {}
|
|
75
|
-
declare const TouchableNativeFeedbackBase: Constructor<TouchableMixin> &
|
|
76
|
-
typeof TouchableNativeFeedbackComponent;
|
|
77
|
-
export class TouchableNativeFeedback extends TouchableNativeFeedbackBase {
|
|
78
|
-
/**
|
|
79
|
-
* Creates an object that represents android theme's default background for
|
|
80
|
-
* selectable elements (?android:attr/selectableItemBackground).
|
|
81
|
-
*
|
|
82
|
-
* @param rippleRadius The radius of ripple effect
|
|
83
|
-
*/
|
|
84
|
-
static SelectableBackground(
|
|
85
|
-
rippleRadius?: number | null,
|
|
86
|
-
): ThemeAttributeBackgroundPropType;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Creates an object that represent android theme's default background for borderless
|
|
90
|
-
* selectable elements (?android:attr/selectableItemBackgroundBorderless).
|
|
91
|
-
* Available on android API level 21+.
|
|
92
|
-
*
|
|
93
|
-
* @param rippleRadius The radius of ripple effect
|
|
94
|
-
*/
|
|
95
|
-
static SelectableBackgroundBorderless(
|
|
96
|
-
rippleRadius?: number | null,
|
|
97
|
-
): ThemeAttributeBackgroundPropType;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Creates an object that represents ripple drawable with specified color (as a
|
|
101
|
-
* string). If property `borderless` evaluates to true the ripple will
|
|
102
|
-
* render outside of the view bounds (see native actionbar buttons as an
|
|
103
|
-
* example of that behavior). This background type is available on Android
|
|
104
|
-
* API level 21+.
|
|
105
|
-
*
|
|
106
|
-
* @param color The ripple color
|
|
107
|
-
* @param borderless If the ripple can render outside it's bounds
|
|
108
|
-
* @param rippleRadius The radius of ripple effect
|
|
109
|
-
*/
|
|
110
|
-
static Ripple(
|
|
111
|
-
color: ColorValue,
|
|
112
|
-
borderless: boolean,
|
|
113
|
-
rippleRadius?: number | null,
|
|
114
|
-
): RippleBackgroundPropType;
|
|
115
|
-
static canUseNativeForeground(): boolean;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// For backcompat
|
|
119
|
-
export type ITouchableNativeFeedbackProps = TouchableNativeFeedbackProps;
|
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { StyleSheet, Text, TouchableHighlight } from 'react-native';
|
|
4
|
-
import { Cursor, IKeyboardEvent, IHandledKeyboardEvent, ViewWin32 } from '@office-iss/react-native-win32';
|
|
5
|
-
|
|
6
|
-
const styles = StyleSheet.create({
|
|
7
|
-
border: {
|
|
8
|
-
borderStyle: 'dotted',
|
|
9
|
-
borderColor: 'black',
|
|
10
|
-
},
|
|
11
|
-
keyComponentRoot: {
|
|
12
|
-
borderWidth: 2,
|
|
13
|
-
flexDirection: 'row',
|
|
14
|
-
marginVertical: 5,
|
|
15
|
-
backgroundColor: 'whitesmoke',
|
|
16
|
-
justifyContent: 'space-around',
|
|
17
|
-
},
|
|
18
|
-
keyEnterVisualizer: {
|
|
19
|
-
margin: 5,
|
|
20
|
-
alignItems: 'center',
|
|
21
|
-
minWidth: 100,
|
|
22
|
-
minHeight: 30,
|
|
23
|
-
},
|
|
24
|
-
blackbox: { height: 30, width: 30, borderColor: 'black', borderWidth: 3 },
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
interface IFocusableComponentState {
|
|
28
|
-
hasFocus: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function FocusMoverTestComponent() {
|
|
32
|
-
const [hasFocus, setHasFocus] = React.useState<boolean>(false);
|
|
33
|
-
|
|
34
|
-
const labelId = React.useId();
|
|
35
|
-
|
|
36
|
-
const ref = React.useRef<ViewWin32>(null);
|
|
37
|
-
const onBtnPress = () => {
|
|
38
|
-
if (ref.current) {
|
|
39
|
-
ref.current.focus();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<ViewWin32>
|
|
45
|
-
<ViewWin32 nativeID={labelId} accessibilityLabel="separate label for test" accessibilityItemType="Comment" />
|
|
46
|
-
<ViewWin32 style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-around', marginVertical: 5 }}>
|
|
47
|
-
<TouchableHighlight onPress={onBtnPress}>
|
|
48
|
-
<ViewWin32 accessibilityLabelledBy={labelId} style={styles.blackbox} />
|
|
49
|
-
</TouchableHighlight>
|
|
50
|
-
<ViewWin32
|
|
51
|
-
ref={ref}
|
|
52
|
-
focusable
|
|
53
|
-
style={hasFocus ? { backgroundColor: '#aee8fcff' } : { backgroundColor: '#00000000' }}
|
|
54
|
-
onFocus={() => setHasFocus(true)}
|
|
55
|
-
onBlur={() => setHasFocus(false)}
|
|
56
|
-
enableFocusRing={false}
|
|
57
|
-
>
|
|
58
|
-
<Text>{hasFocus ? 'Focus: Yes' : 'Focus: No'}</Text>
|
|
59
|
-
</ViewWin32>
|
|
60
|
-
</ViewWin32>
|
|
61
|
-
</ViewWin32>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
interface IKeyboardableComponentState {
|
|
66
|
-
lastKeyDown: string;
|
|
67
|
-
lastKeyUp: string;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const handledNativeKeyboardEvents: IHandledKeyboardEvent[] = [
|
|
71
|
-
{ key: 'ArrowDown' },
|
|
72
|
-
{ key: 'ArrowUp' },
|
|
73
|
-
{ key: 'ArrowLeft' },
|
|
74
|
-
{ key: 'ArrowRight' },
|
|
75
|
-
{ key: 'Tab' },
|
|
76
|
-
];
|
|
77
|
-
|
|
78
|
-
class KeyboardTestComponent extends React.Component<{}, IFocusableComponentState & IKeyboardableComponentState> {
|
|
79
|
-
public constructor(props) {
|
|
80
|
-
super(props);
|
|
81
|
-
this.state = {
|
|
82
|
-
hasFocus: false,
|
|
83
|
-
lastKeyDown: null,
|
|
84
|
-
lastKeyUp: null,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
public render() {
|
|
89
|
-
return (
|
|
90
|
-
<ViewWin32 keyDownEvents={handledNativeKeyboardEvents} keyUpEvents={handledNativeKeyboardEvents}>
|
|
91
|
-
<ViewWin32
|
|
92
|
-
style={this.state.hasFocus ? [styles.keyComponentRoot, styles.border] : styles.keyComponentRoot}
|
|
93
|
-
focusable
|
|
94
|
-
onKeyUp={this._onKeyUp}
|
|
95
|
-
onKeyDown={this._onKeyDown}
|
|
96
|
-
onFocus={this._onFocus}
|
|
97
|
-
onBlur={this._onBlur}
|
|
98
|
-
enableFocusRing={false}
|
|
99
|
-
>
|
|
100
|
-
<ViewWin32 style={styles.keyEnterVisualizer}>
|
|
101
|
-
<Text>OnKeyDown</Text>
|
|
102
|
-
<Text>----</Text>
|
|
103
|
-
<Text>{this.state.lastKeyDown !== null ? this.state.lastKeyDown : ' '}</Text>
|
|
104
|
-
</ViewWin32>
|
|
105
|
-
<ViewWin32 style={styles.keyEnterVisualizer}>
|
|
106
|
-
<Text>OnKeyUp</Text>
|
|
107
|
-
<Text>----</Text>
|
|
108
|
-
<Text>{this.state.lastKeyUp !== null ? this.state.lastKeyUp : ' '}</Text>
|
|
109
|
-
</ViewWin32>
|
|
110
|
-
</ViewWin32>
|
|
111
|
-
</ViewWin32>
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
private readonly _onFocus = () => {
|
|
116
|
-
this.setState({
|
|
117
|
-
hasFocus: true,
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
private readonly _onBlur = () => {
|
|
122
|
-
this.setState({
|
|
123
|
-
hasFocus: false,
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
private readonly _onKeyUp = (ev: IKeyboardEvent) => {
|
|
128
|
-
this.setState({ lastKeyUp: ev.nativeEvent.key, lastKeyDown: null });
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
private readonly _onKeyDown = (ev: IKeyboardEvent) => {
|
|
132
|
-
this.setState({ lastKeyDown: ev.nativeEvent.key, lastKeyUp: null });
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
interface IHoverComponentProps {
|
|
137
|
-
color: string;
|
|
138
|
-
}
|
|
139
|
-
class HoverTestComponent extends React.Component<IHoverComponentProps, IFocusableComponentState> {
|
|
140
|
-
public constructor(props) {
|
|
141
|
-
super(props);
|
|
142
|
-
this.state = {
|
|
143
|
-
hasFocus: false,
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
public render() {
|
|
148
|
-
return (
|
|
149
|
-
<ViewWin32
|
|
150
|
-
onMouseEnter={this._onMouseEnter}
|
|
151
|
-
onMouseLeave={this._onMouseLeave}
|
|
152
|
-
style={this.state.hasFocus ? [styles.blackbox, { backgroundColor: this.props.color }] : styles.blackbox}
|
|
153
|
-
/>
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
private readonly _onMouseLeave = () => {
|
|
157
|
-
this.setState({ hasFocus: false });
|
|
158
|
-
};
|
|
159
|
-
private readonly _onMouseEnter = () => {
|
|
160
|
-
this.setState({ hasFocus: true });
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
class HoverExample extends React.Component {
|
|
165
|
-
public render() {
|
|
166
|
-
return (
|
|
167
|
-
<ViewWin32 style={{ flexDirection: 'row', marginHorizontal: 75, justifyContent: 'space-around' }}>
|
|
168
|
-
<HoverTestComponent color="red" />
|
|
169
|
-
<HoverTestComponent color="orange" />
|
|
170
|
-
<HoverTestComponent color="yellow" />
|
|
171
|
-
<HoverTestComponent color="green" />
|
|
172
|
-
<HoverTestComponent color="blue" />
|
|
173
|
-
<HoverTestComponent color="indigo" />
|
|
174
|
-
<HoverTestComponent color="violet" />
|
|
175
|
-
</ViewWin32>
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
const ToolTipExample: React.FunctionComponent<{}> = () => {
|
|
181
|
-
return (
|
|
182
|
-
<ViewWin32
|
|
183
|
-
style={{
|
|
184
|
-
backgroundColor: 'red',
|
|
185
|
-
height: 100,
|
|
186
|
-
width: 100,
|
|
187
|
-
}}
|
|
188
|
-
tooltip="Example tooltip"
|
|
189
|
-
cursor="pointer"
|
|
190
|
-
/>
|
|
191
|
-
);
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
interface ICursorTestComponentProps {
|
|
195
|
-
cursor: Cursor
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
const CursorTestComponent: React.FunctionComponent<ICursorTestComponentProps> = (props) => {
|
|
199
|
-
return (
|
|
200
|
-
<ViewWin32 style={{flexDirection: 'column'}}>
|
|
201
|
-
<Text>{props.cursor}</Text>
|
|
202
|
-
<ViewWin32 cursor={props.cursor} style={styles.blackbox} />
|
|
203
|
-
</ViewWin32>
|
|
204
|
-
)
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
const CursorExample: React.FunctionComponent = () => {
|
|
208
|
-
return (
|
|
209
|
-
<ViewWin32 style={{ flexDirection: 'row', justifyContent: 'space-around' }}>
|
|
210
|
-
<CursorTestComponent cursor='auto' />
|
|
211
|
-
<CursorTestComponent cursor='default' />
|
|
212
|
-
<CursorTestComponent cursor='help' />
|
|
213
|
-
<CursorTestComponent cursor='nesw-resize' />
|
|
214
|
-
<CursorTestComponent cursor='not-allowed' />
|
|
215
|
-
<CursorTestComponent cursor='ns-resize' />
|
|
216
|
-
<CursorTestComponent cursor='nwse-resize' />
|
|
217
|
-
<CursorTestComponent cursor='pointer' />
|
|
218
|
-
<CursorTestComponent cursor='wait' />
|
|
219
|
-
<CursorTestComponent cursor='move' />
|
|
220
|
-
<CursorTestComponent cursor='text' />
|
|
221
|
-
<CursorTestComponent cursor='we-resize' />
|
|
222
|
-
</ViewWin32>
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
class EnableFocusRingExample extends React.Component<{}, IFocusableComponentState> {
|
|
226
|
-
public constructor(props) {
|
|
227
|
-
super(props);
|
|
228
|
-
this.state = {
|
|
229
|
-
hasFocus: false,
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
public render() {
|
|
234
|
-
return (
|
|
235
|
-
<ViewWin32 style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-around', marginVertical: 5 }}>
|
|
236
|
-
<ViewWin32
|
|
237
|
-
style={{
|
|
238
|
-
backgroundColor: 'pink',
|
|
239
|
-
height: 100,
|
|
240
|
-
width: 100,
|
|
241
|
-
}}
|
|
242
|
-
enableFocusRing={true}
|
|
243
|
-
focusable
|
|
244
|
-
>
|
|
245
|
-
<Text>enableFocusRing set to true</Text>
|
|
246
|
-
</ViewWin32>
|
|
247
|
-
<ViewWin32
|
|
248
|
-
style={{
|
|
249
|
-
backgroundColor: 'pink',
|
|
250
|
-
height: 100,
|
|
251
|
-
width: 100,
|
|
252
|
-
}}
|
|
253
|
-
enableFocusRing={false}
|
|
254
|
-
focusable
|
|
255
|
-
onFocus={this._onFocus}
|
|
256
|
-
onBlur={this._onBlur}
|
|
257
|
-
>
|
|
258
|
-
<>
|
|
259
|
-
<Text>enableFocusRing set to false</Text>
|
|
260
|
-
<Text>{this.state.hasFocus ? 'Focus: Yes' : 'Focus: No'}</Text>
|
|
261
|
-
</>
|
|
262
|
-
</ViewWin32>
|
|
263
|
-
</ViewWin32>
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
private readonly _onFocus = () => {
|
|
268
|
-
this.setState({
|
|
269
|
-
hasFocus: true,
|
|
270
|
-
});
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
private readonly _onBlur = () => {
|
|
274
|
-
this.setState({
|
|
275
|
-
hasFocus: false,
|
|
276
|
-
});
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
export const title = 'ViewWin32';
|
|
282
|
-
export const displayName = 'ViewWin32 Example';
|
|
283
|
-
export const description = 'All the stock View props plus Win32 specific ones';
|
|
284
|
-
export const examples = [
|
|
285
|
-
{
|
|
286
|
-
title: 'focus() method example',
|
|
287
|
-
description: 'Each of these black boxes moves focus to the ViewWin32 on the right',
|
|
288
|
-
render(): JSX.Element {
|
|
289
|
-
return (
|
|
290
|
-
<ViewWin32>
|
|
291
|
-
<FocusMoverTestComponent />
|
|
292
|
-
<FocusMoverTestComponent />
|
|
293
|
-
<FocusMoverTestComponent />
|
|
294
|
-
</ViewWin32>
|
|
295
|
-
);
|
|
296
|
-
},
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
title: 'KeyboardEvents example',
|
|
300
|
-
description: 'Native keyboarding has been prevented',
|
|
301
|
-
render(): JSX.Element {
|
|
302
|
-
return <KeyboardTestComponent />;
|
|
303
|
-
},
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
title: 'Hover example',
|
|
307
|
-
description: 'Hover a rainbow',
|
|
308
|
-
render(): JSX.Element {
|
|
309
|
-
return <HoverExample />;
|
|
310
|
-
},
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
title: 'Tooltip example',
|
|
314
|
-
description: 'Displays a tooltip on hover',
|
|
315
|
-
render(): JSX.Element {
|
|
316
|
-
return <ToolTipExample />;
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
title: 'Cursor example',
|
|
321
|
-
description: 'Each of these boxes should display a different cursor',
|
|
322
|
-
render(): JSX.Element {
|
|
323
|
-
return <CursorExample />;
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
title: 'EnableFocusRing example',
|
|
328
|
-
description: 'Displays focus visuals that are driven by native',
|
|
329
|
-
render(): JSX.Element {
|
|
330
|
-
return <EnableFocusRingExample />;
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
];
|