@fluentui-react-native/tester 0.170.21 → 0.170.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/tester",
3
- "version": "0.170.21",
3
+ "version": "0.170.23",
4
4
  "description": "A test app to test FluentUI React Native Components during development",
5
5
  "license": "MIT",
6
6
  "author": "Microsoft <fluentuinativeowners@microsoft.com>",
@@ -38,6 +38,7 @@
38
38
  "@fluentui-react-native/avatar": "1.12.8",
39
39
  "@fluentui-react-native/badge": "0.11.2",
40
40
  "@fluentui-react-native/button": "0.39.4",
41
+ "@fluentui-react-native/callout": "0.27.2",
41
42
  "@fluentui-react-native/chip": "0.4.8",
42
43
  "@fluentui-react-native/default-theme": "0.26.2",
43
44
  "@fluentui-react-native/divider": "0.7.8",
@@ -48,7 +49,7 @@
48
49
  "@fluentui-react-native/experimental-avatar": "0.21.4",
49
50
  "@fluentui-react-native/experimental-checkbox": "0.17.9",
50
51
  "@fluentui-react-native/experimental-expander": "0.8.3",
51
- "@fluentui-react-native/experimental-menu-button": "0.10.17",
52
+ "@fluentui-react-native/experimental-menu-button": "0.10.18",
52
53
  "@fluentui-react-native/experimental-native-date-picker": "0.11.0",
53
54
  "@fluentui-react-native/experimental-shadow": "0.6.4",
54
55
  "@fluentui-react-native/experimental-shimmer": "0.13.5",
@@ -56,16 +57,16 @@
56
57
  "@fluentui-react-native/icon": "0.21.8",
57
58
  "@fluentui-react-native/input": "0.7.8",
58
59
  "@fluentui-react-native/interactive-hooks": "0.27.4",
59
- "@fluentui-react-native/menu": "1.14.20",
60
+ "@fluentui-react-native/menu": "1.14.21",
60
61
  "@fluentui-react-native/merge-props": "0.9.1",
61
62
  "@fluentui-react-native/notification": "0.25.11",
62
- "@fluentui-react-native/overflow": "0.3.20",
63
- "@fluentui-react-native/radio-group": "0.21.14",
63
+ "@fluentui-react-native/overflow": "0.3.21",
64
+ "@fluentui-react-native/radio-group": "0.21.15",
64
65
  "@fluentui-react-native/separator": "0.18.2",
65
66
  "@fluentui-react-native/spinner": "0.9.9",
66
67
  "@fluentui-react-native/stack": "0.10.7",
67
68
  "@fluentui-react-native/switch": "0.13.7",
68
- "@fluentui-react-native/tablist": "0.7.2",
69
+ "@fluentui-react-native/tablist": "0.7.3",
69
70
  "@fluentui-react-native/text": "0.24.6",
70
71
  "@fluentui-react-native/theme": "0.11.1",
71
72
  "@fluentui-react-native/theme-tokens": "0.27.1",
@@ -75,7 +76,7 @@
75
76
  "@fluentui-react-native/tooltip": "0.4.11",
76
77
  "@fluentui-react-native/vibrancy-view": "0.2.2",
77
78
  "@fluentui-react-native/win32-theme": "0.34.5",
78
- "@fluentui/react-native": "0.42.11",
79
+ "@fluentui/react-native": "0.42.12",
79
80
  "@fortawesome/fontawesome-svg-core": "^6.2.0",
80
81
  "@fortawesome/free-solid-svg-icons": "^6.2.0",
81
82
  "@fortawesome/react-native-fontawesome": "^0.3.0",
@@ -94,7 +95,7 @@
94
95
  "@babel/core": "^7.8.0",
95
96
  "@babel/runtime": "^7.8.0",
96
97
  "@fluentui-react-native/eslint-config-rules": "0.1.1",
97
- "@fluentui-react-native/focus-zone": "0.19.6",
98
+ "@fluentui-react-native/focus-zone": "0.20.0",
98
99
  "@fluentui-react-native/scripts": "0.1.1",
99
100
  "@react-native/babel-preset": "^0.73.0",
100
101
  "@react-native/metro-babel-transformer": "^0.73.0",
@@ -2,8 +2,10 @@ import * as React from 'react';
2
2
  import type { KeyboardMetrics } from 'react-native';
3
3
  import { Text, View, Switch, ScrollView, Platform } from 'react-native';
4
4
 
5
- import { ButtonV1 as Button, Callout, Separator, Pressable } from '@fluentui/react-native';
6
- import type { CalloutNativeCommands, IFocusable, RestoreFocusEvent, DismissBehaviors, ICalloutProps } from '@fluentui/react-native';
5
+ import { ButtonV1 as Button, Separator, Pressable } from '@fluentui/react-native';
6
+ import type { IFocusable, RestoreFocusEvent, DismissBehaviors } from '@fluentui/react-native';
7
+ import type { CalloutNativeCommands, ICalloutProps } from '@fluentui-react-native/callout';
8
+ import { Callout } from '@fluentui-react-native/callout';
7
9
 
8
10
  import { E2ECalloutTest } from './CalloutE2ETest';
9
11
  import { CALLOUT_TESTPAGE } from '../../../../E2E/src/Callout/consts';
@@ -220,7 +220,54 @@ const FocusZoneTextInput: React.FunctionComponent = () => {
220
220
  );
221
221
  };
222
222
 
223
+ export const FirstFocusTest = () => {
224
+ const outerNormalRef = React.useRef(null);
225
+ const innerNormalRef = React.useRef(null);
226
+ const innerDirectRef = React.useRef(null);
227
+ const innerFZRef = React.useRef(null);
228
+ const outerNativeID = 'nativeIDToOuterButton';
229
+ const innerNativeID = 'nativeIDToInnerButton';
230
+ const innerDirectNativeID = 'nativeIDDirectToInnerButton';
231
+ const [outerFocusZoneTabbableElement, setOuterFocusZoneTabbableElement] = React.useState<React.RefObject<View> | string>();
232
+ const [innerFocusZoneTabbableElement, setInnerFocusZoneTabbableElement] = React.useState<React.RefObject<View> | string>();
233
+
234
+ return (
235
+ <FocusZone defaultTabbableElement={outerFocusZoneTabbableElement} tabKeyNavigation="Normal">
236
+ <View>
237
+ <Button onClick={() => setOuterFocusZoneTabbableElement(undefined)}>clear OuterFocusZone</Button>
238
+ <Button componentRef={outerNormalRef} onClick={() => setOuterFocusZoneTabbableElement(outerNormalRef)}>
239
+ Test ref
240
+ </Button>
241
+ <Button nativeID={outerNativeID} onClick={() => setOuterFocusZoneTabbableElement(outerNativeID)}>
242
+ Test nativeId
243
+ </Button>
244
+ </View>
245
+ <FocusZone componentRef={innerFZRef} defaultTabbableElement={innerFocusZoneTabbableElement}>
246
+ <Button onClick={() => setInnerFocusZoneTabbableElement(undefined)}>clear InnerFocusZone</Button>
247
+ <Button componentRef={innerDirectRef} onClick={() => setOuterFocusZoneTabbableElement(innerDirectRef)}>
248
+ Test nested (direct ref)
249
+ </Button>
250
+ <Button nativeID={innerDirectNativeID} onClick={() => setOuterFocusZoneTabbableElement(innerDirectNativeID)}>
251
+ Test nested (direct nativeID)
252
+ </Button>
253
+ <Button componentRef={innerNormalRef} onClick={() => setInnerFocusZoneTabbableElement(innerNormalRef)}>
254
+ Test inner zone (ref)
255
+ </Button>
256
+ <Button nativeID={innerNativeID} onClick={() => setInnerFocusZoneTabbableElement(innerNativeID)}>
257
+ Test inner zone (nativeID)
258
+ </Button>
259
+ <Button onClick={() => setOuterFocusZoneTabbableElement(innerFZRef)}>Test nested (transitive)</Button>
260
+ </FocusZone>
261
+ </FocusZone>
262
+ );
263
+ };
264
+
223
265
  const focusZoneSections: TestSection[] = [
266
+ {
267
+ name: 'First Focus FocusZone Usage',
268
+ component: FirstFocusTest,
269
+ testID: FOCUSZONE_TESTPAGE,
270
+ },
224
271
  {
225
272
  name: 'Common FocusZone Usage',
226
273
  component: CommonUsageFocusZone,