@fluentui-react-native/tester 0.167.0 → 0.167.2
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 +247 -1
- package/CHANGELOG.md +54 -2
- package/lib/fluent-tester/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.js +46 -23
- package/lib/fluent-tester/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.js +46 -23
- package/lib-commonjs/fluent-tester/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.js.map +1 -1
- package/package.json +38 -38
- package/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx +55 -32
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,253 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 22 Jan 2024 22:05:23 GMT",
|
|
6
|
+
"version": "0.167.2",
|
|
7
|
+
"tag": "@fluentui-react-native/tester_v0.167.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui-react-native/tester",
|
|
13
|
+
"comment": "Bump @fluentui-react-native/android-theme to v0.24.1",
|
|
14
|
+
"commit": "not available"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/tester",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/apple-theme to v0.27.1",
|
|
20
|
+
"commit": "not available"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui-react-native/tester",
|
|
25
|
+
"comment": "Bump @fluentui-react-native/avatar to v1.11.8",
|
|
26
|
+
"commit": "not available"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui-react-native/tester",
|
|
31
|
+
"comment": "Bump @fluentui-react-native/badge to v0.8.8",
|
|
32
|
+
"commit": "not available"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui-react-native/tester",
|
|
37
|
+
"comment": "Bump @fluentui-react-native/button to v0.36.10",
|
|
38
|
+
"commit": "not available"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui-react-native/tester",
|
|
43
|
+
"comment": "Bump @fluentui-react-native/chip to v0.3.8",
|
|
44
|
+
"commit": "not available"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui-react-native/tester",
|
|
49
|
+
"comment": "Bump @fluentui-react-native/default-theme to v0.25.1",
|
|
50
|
+
"commit": "not available"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "beachball",
|
|
54
|
+
"package": "@fluentui-react-native/tester",
|
|
55
|
+
"comment": "Bump @fluentui-react-native/divider to v0.6.8",
|
|
56
|
+
"commit": "not available"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "beachball",
|
|
60
|
+
"package": "@fluentui-react-native/tester",
|
|
61
|
+
"comment": "Bump @fluentui-react-native/drawer to v0.3.7",
|
|
62
|
+
"commit": "not available"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"author": "beachball",
|
|
66
|
+
"package": "@fluentui-react-native/tester",
|
|
67
|
+
"comment": "Bump @fluentui-react-native/dropdown to v0.9.10",
|
|
68
|
+
"commit": "not available"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"author": "beachball",
|
|
72
|
+
"package": "@fluentui-react-native/tester",
|
|
73
|
+
"comment": "Bump @fluentui-react-native/experimental-activity-indicator to v0.9.7",
|
|
74
|
+
"commit": "not available"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"author": "beachball",
|
|
78
|
+
"package": "@fluentui-react-native/tester",
|
|
79
|
+
"comment": "Bump @fluentui-react-native/experimental-appearance-additions to v0.6.7",
|
|
80
|
+
"commit": "not available"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"author": "beachball",
|
|
84
|
+
"package": "@fluentui-react-native/tester",
|
|
85
|
+
"comment": "Bump @fluentui-react-native/experimental-avatar to v0.20.7",
|
|
86
|
+
"commit": "not available"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"author": "beachball",
|
|
90
|
+
"package": "@fluentui-react-native/tester",
|
|
91
|
+
"comment": "Bump @fluentui-react-native/experimental-checkbox to v0.16.7",
|
|
92
|
+
"commit": "not available"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"author": "beachball",
|
|
96
|
+
"package": "@fluentui-react-native/tester",
|
|
97
|
+
"comment": "Bump @fluentui-react-native/experimental-expander to v0.7.7",
|
|
98
|
+
"commit": "not available"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"author": "beachball",
|
|
102
|
+
"package": "@fluentui-react-native/tester",
|
|
103
|
+
"comment": "Bump @fluentui-react-native/experimental-menu-button to v0.9.11",
|
|
104
|
+
"commit": "not available"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"author": "beachball",
|
|
108
|
+
"package": "@fluentui-react-native/tester",
|
|
109
|
+
"comment": "Bump @fluentui-react-native/experimental-shadow to v0.5.7",
|
|
110
|
+
"commit": "not available"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"author": "beachball",
|
|
114
|
+
"package": "@fluentui-react-native/tester",
|
|
115
|
+
"comment": "Bump @fluentui-react-native/experimental-shimmer to v0.12.9",
|
|
116
|
+
"commit": "not available"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"author": "beachball",
|
|
120
|
+
"package": "@fluentui-react-native/tester",
|
|
121
|
+
"comment": "Bump @fluentui-react-native/experimental-text to v0.14.7",
|
|
122
|
+
"commit": "not available"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"author": "beachball",
|
|
126
|
+
"package": "@fluentui-react-native/tester",
|
|
127
|
+
"comment": "Bump @fluentui-react-native/framework to v0.13.6",
|
|
128
|
+
"commit": "not available"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"author": "beachball",
|
|
132
|
+
"package": "@fluentui-react-native/tester",
|
|
133
|
+
"comment": "Bump @fluentui-react-native/icon to v0.20.8",
|
|
134
|
+
"commit": "not available"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"author": "beachball",
|
|
138
|
+
"package": "@fluentui-react-native/tester",
|
|
139
|
+
"comment": "Bump @fluentui-react-native/input to v0.5.8",
|
|
140
|
+
"commit": "not available"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"author": "beachball",
|
|
144
|
+
"package": "@fluentui-react-native/tester",
|
|
145
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.25.7",
|
|
146
|
+
"commit": "not available"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"author": "beachball",
|
|
150
|
+
"package": "@fluentui-react-native/tester",
|
|
151
|
+
"comment": "Bump @fluentui-react-native/menu to v1.12.12",
|
|
152
|
+
"commit": "not available"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"author": "beachball",
|
|
156
|
+
"package": "@fluentui-react-native/tester",
|
|
157
|
+
"comment": "Bump @fluentui-react-native/notification to v0.24.10",
|
|
158
|
+
"commit": "not available"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"author": "beachball",
|
|
162
|
+
"package": "@fluentui-react-native/tester",
|
|
163
|
+
"comment": "Bump @fluentui-react-native/radio-group to v0.20.9",
|
|
164
|
+
"commit": "not available"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"author": "beachball",
|
|
168
|
+
"package": "@fluentui-react-native/tester",
|
|
169
|
+
"comment": "Bump @fluentui-react-native/separator to v0.17.7",
|
|
170
|
+
"commit": "not available"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"author": "beachball",
|
|
174
|
+
"package": "@fluentui-react-native/tester",
|
|
175
|
+
"comment": "Bump @fluentui-react-native/spinner to v0.8.7",
|
|
176
|
+
"commit": "not available"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"author": "beachball",
|
|
180
|
+
"package": "@fluentui-react-native/tester",
|
|
181
|
+
"comment": "Bump @fluentui-react-native/stack to v0.9.7",
|
|
182
|
+
"commit": "not available"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"author": "beachball",
|
|
186
|
+
"package": "@fluentui-react-native/tester",
|
|
187
|
+
"comment": "Bump @fluentui-react-native/switch to v0.12.7",
|
|
188
|
+
"commit": "not available"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"author": "beachball",
|
|
192
|
+
"package": "@fluentui-react-native/tester",
|
|
193
|
+
"comment": "Bump @fluentui-react-native/tablist to v0.5.14",
|
|
194
|
+
"commit": "not available"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"author": "beachball",
|
|
198
|
+
"package": "@fluentui-react-native/tester",
|
|
199
|
+
"comment": "Bump @fluentui-react-native/text to v0.22.7",
|
|
200
|
+
"commit": "not available"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"author": "beachball",
|
|
204
|
+
"package": "@fluentui-react-native/tester",
|
|
205
|
+
"comment": "Bump @fluentui-react-native/theme to v0.10.6",
|
|
206
|
+
"commit": "not available"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"author": "beachball",
|
|
210
|
+
"package": "@fluentui-react-native/tester",
|
|
211
|
+
"comment": "Bump @fluentui-react-native/tooltip to v0.2.9",
|
|
212
|
+
"commit": "not available"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"author": "beachball",
|
|
216
|
+
"package": "@fluentui-react-native/tester",
|
|
217
|
+
"comment": "Bump @fluentui-react-native/win32-theme to v0.33.1",
|
|
218
|
+
"commit": "not available"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"author": "beachball",
|
|
222
|
+
"package": "@fluentui-react-native/tester",
|
|
223
|
+
"comment": "Bump @fluentui/react-native to v0.40.1",
|
|
224
|
+
"commit": "not available"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"author": "beachball",
|
|
228
|
+
"package": "@fluentui-react-native/tester",
|
|
229
|
+
"comment": "Bump @fluentui-react-native/focus-zone to v0.16.7",
|
|
230
|
+
"commit": "not available"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"date": "Fri, 19 Jan 2024 16:18:22 GMT",
|
|
237
|
+
"version": "0.167.1",
|
|
238
|
+
"tag": "@fluentui-react-native/tester_v0.167.1",
|
|
239
|
+
"comments": {
|
|
240
|
+
"patch": [
|
|
241
|
+
{
|
|
242
|
+
"author": "krsiler@microsoft.com",
|
|
243
|
+
"package": "@fluentui-react-native/tester",
|
|
244
|
+
"commit": "fce80d28a4e9ebd28e23f5ebf84ce80909f49b75",
|
|
245
|
+
"comment": "use themed colors for FocusTrapZone test"
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"date": "Wed, 17 Jan 2024 01:26:39 GMT",
|
|
6
252
|
"version": "0.167.0",
|
|
7
253
|
"tag": "@fluentui-react-native/tester_v0.167.0",
|
|
8
254
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,64 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/tester
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 22 Jan 2024 22:05:23 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.167.2
|
|
8
|
+
|
|
9
|
+
Mon, 22 Jan 2024 22:05:23 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @fluentui-react-native/android-theme to v0.24.1
|
|
14
|
+
- Bump @fluentui-react-native/apple-theme to v0.27.1
|
|
15
|
+
- Bump @fluentui-react-native/avatar to v1.11.8
|
|
16
|
+
- Bump @fluentui-react-native/badge to v0.8.8
|
|
17
|
+
- Bump @fluentui-react-native/button to v0.36.10
|
|
18
|
+
- Bump @fluentui-react-native/chip to v0.3.8
|
|
19
|
+
- Bump @fluentui-react-native/default-theme to v0.25.1
|
|
20
|
+
- Bump @fluentui-react-native/divider to v0.6.8
|
|
21
|
+
- Bump @fluentui-react-native/drawer to v0.3.7
|
|
22
|
+
- Bump @fluentui-react-native/dropdown to v0.9.10
|
|
23
|
+
- Bump @fluentui-react-native/experimental-activity-indicator to v0.9.7
|
|
24
|
+
- Bump @fluentui-react-native/experimental-appearance-additions to v0.6.7
|
|
25
|
+
- Bump @fluentui-react-native/experimental-avatar to v0.20.7
|
|
26
|
+
- Bump @fluentui-react-native/experimental-checkbox to v0.16.7
|
|
27
|
+
- Bump @fluentui-react-native/experimental-expander to v0.7.7
|
|
28
|
+
- Bump @fluentui-react-native/experimental-menu-button to v0.9.11
|
|
29
|
+
- Bump @fluentui-react-native/experimental-shadow to v0.5.7
|
|
30
|
+
- Bump @fluentui-react-native/experimental-shimmer to v0.12.9
|
|
31
|
+
- Bump @fluentui-react-native/experimental-text to v0.14.7
|
|
32
|
+
- Bump @fluentui-react-native/framework to v0.13.6
|
|
33
|
+
- Bump @fluentui-react-native/icon to v0.20.8
|
|
34
|
+
- Bump @fluentui-react-native/input to v0.5.8
|
|
35
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.25.7
|
|
36
|
+
- Bump @fluentui-react-native/menu to v1.12.12
|
|
37
|
+
- Bump @fluentui-react-native/notification to v0.24.10
|
|
38
|
+
- Bump @fluentui-react-native/radio-group to v0.20.9
|
|
39
|
+
- Bump @fluentui-react-native/separator to v0.17.7
|
|
40
|
+
- Bump @fluentui-react-native/spinner to v0.8.7
|
|
41
|
+
- Bump @fluentui-react-native/stack to v0.9.7
|
|
42
|
+
- Bump @fluentui-react-native/switch to v0.12.7
|
|
43
|
+
- Bump @fluentui-react-native/tablist to v0.5.14
|
|
44
|
+
- Bump @fluentui-react-native/text to v0.22.7
|
|
45
|
+
- Bump @fluentui-react-native/theme to v0.10.6
|
|
46
|
+
- Bump @fluentui-react-native/tooltip to v0.2.9
|
|
47
|
+
- Bump @fluentui-react-native/win32-theme to v0.33.1
|
|
48
|
+
- Bump @fluentui/react-native to v0.40.1
|
|
49
|
+
- Bump @fluentui-react-native/focus-zone to v0.16.7
|
|
50
|
+
|
|
51
|
+
## 0.167.1
|
|
52
|
+
|
|
53
|
+
Fri, 19 Jan 2024 16:18:22 GMT
|
|
54
|
+
|
|
55
|
+
### Patches
|
|
56
|
+
|
|
57
|
+
- use themed colors for FocusTrapZone test (krsiler@microsoft.com)
|
|
58
|
+
|
|
7
59
|
## 0.167.0
|
|
8
60
|
|
|
9
|
-
Wed, 17 Jan 2024 01:26:
|
|
61
|
+
Wed, 17 Jan 2024 01:26:39 GMT
|
|
10
62
|
|
|
11
63
|
### Minor changes
|
|
12
64
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusTrapZoneTest.d.ts","sourceRoot":"","sources":["../../../../../src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"FocusTrapZoneTest.d.ts","sourceRoot":"","sources":["../../../../../src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAsD5D,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC,uBAAuB,CAkB9E,CAAC;AA0FF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAajC,CAAC"}
|
|
@@ -4,36 +4,59 @@ import { TouchableHighlight, View } from 'react-native';
|
|
|
4
4
|
import { FocusTrapZone, Text } from '@fluentui/react-native';
|
|
5
5
|
import { useFocusState } from '@fluentui-react-native/interactive-hooks';
|
|
6
6
|
import { Stack } from '@fluentui-react-native/stack';
|
|
7
|
+
import { useTheme } from '@fluentui-react-native/theme-types';
|
|
8
|
+
import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
|
|
7
9
|
import { FOCUSTRAPZONE_TESTPAGE } from '../../../../E2E/src/FocusTrapZone/consts';
|
|
8
10
|
import { stackStyle } from '../Common/styles';
|
|
9
11
|
import { Test } from '../Test';
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
12
|
+
var getThemedStyles = themedStyleSheet(function (t) {
|
|
13
|
+
return {
|
|
14
|
+
trapZoneStyle: {
|
|
15
|
+
padding: 10,
|
|
16
|
+
borderWidth: 2,
|
|
17
|
+
borderColor: t.colors.neutralStroke1,
|
|
18
|
+
borderStyle: 'dashed',
|
|
19
|
+
},
|
|
20
|
+
activeTrapZoneStyle: {
|
|
21
|
+
padding: 10,
|
|
22
|
+
borderColor: t.colors.neutralStroke1,
|
|
23
|
+
borderWidth: 2,
|
|
24
|
+
borderStyle: 'solid',
|
|
25
|
+
},
|
|
26
|
+
componentTwiddlerStyle: {
|
|
27
|
+
borderWidth: 1,
|
|
28
|
+
padding: 8,
|
|
29
|
+
margin: 4,
|
|
30
|
+
borderColor: t.colors.neutralStroke1,
|
|
31
|
+
borderStyle: 'solid',
|
|
32
|
+
},
|
|
33
|
+
focusedComponentTwiddlerStyle: {
|
|
34
|
+
borderWidth: 1,
|
|
35
|
+
padding: 8,
|
|
36
|
+
margin: 4,
|
|
37
|
+
borderStyle: 'solid',
|
|
38
|
+
borderColor: t.colors.strokeFocus2,
|
|
39
|
+
backgroundColor: t.colors.neutralBackground1Hover,
|
|
40
|
+
},
|
|
41
|
+
componentTwiddlerText: {
|
|
42
|
+
color: t.colors.neutralForeground1,
|
|
43
|
+
},
|
|
44
|
+
focusedComponentTwiddlerText: {
|
|
45
|
+
color: t.colors.neutralForeground1Hover,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
});
|
|
30
49
|
export var ComponentTwiddler = function (props) {
|
|
31
50
|
var _a = useFocusState({}), focusProps = _a[0], focusState = _a[1];
|
|
51
|
+
var theme = useTheme();
|
|
52
|
+
var themedStyles = getThemedStyles(theme);
|
|
32
53
|
return (React.createElement(TouchableHighlight, __assign({}, { focusable: false }, { onPress: props.onPress }),
|
|
33
|
-
React.createElement(View, __assign({ focusable: true }, focusProps, { style: focusState.focused ? focusedComponentTwiddlerStyle : componentTwiddlerStyle }),
|
|
34
|
-
React.createElement(Text,
|
|
54
|
+
React.createElement(View, __assign({ focusable: true }, focusProps, { style: focusState.focused ? themedStyles.focusedComponentTwiddlerStyle : themedStyles.componentTwiddlerStyle }),
|
|
55
|
+
React.createElement(Text, { style: focusState.focused ? themedStyles.focusedComponentTwiddlerText : themedStyles.componentTwiddlerText }, props.label))));
|
|
35
56
|
};
|
|
36
57
|
var BasicFocusTrapZone = function () {
|
|
58
|
+
var theme = useTheme();
|
|
59
|
+
var themedStyles = getThemedStyles(theme);
|
|
37
60
|
var _a = React.useState({
|
|
38
61
|
useTrapZone: false,
|
|
39
62
|
renderTrapZone: true,
|
|
@@ -70,7 +93,7 @@ var BasicFocusTrapZone = function () {
|
|
|
70
93
|
? 'focusPreviouslyFocusedInnerElement: true'
|
|
71
94
|
: 'focusPreviouslyFocusedInnerElement: false', onPress: onTwiddleFocusPrevious }),
|
|
72
95
|
React.createElement(ComponentTwiddler, { label: state.disableFirstFocus ? 'disableFirstFocus: true' : 'disableFirstFocus: false', onPress: onTwiddleFirstFocus }),
|
|
73
|
-
state.renderTrapZone && (React.createElement(FocusTrapZone, { componentRef: ftzRef, disableFirstFocus: state.disableFirstFocus, ignoreExternalFocusing: state.ignoreExternalFocusing, focusPreviouslyFocusedInnerElement: state.focusPreviouslyFocusedInnerElement, disabled: !state.useTrapZone, style: state.useTrapZone ? activeTrapZoneStyle : trapZoneStyle },
|
|
96
|
+
state.renderTrapZone && (React.createElement(FocusTrapZone, { componentRef: ftzRef, disableFirstFocus: state.disableFirstFocus, ignoreExternalFocusing: state.ignoreExternalFocusing, focusPreviouslyFocusedInnerElement: state.focusPreviouslyFocusedInnerElement, disabled: !state.useTrapZone, style: state.useTrapZone ? themedStyles.activeTrapZoneStyle : themedStyles.trapZoneStyle },
|
|
74
97
|
React.createElement(Text, null, state.useTrapZone ? 'Trap Active' : 'Trap Active'),
|
|
75
98
|
React.createElement(ComponentTwiddler, { label: "trapped" }),
|
|
76
99
|
React.createElement(ComponentTwiddler, { label: "trapped" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusTrapZoneTest.js","sourceRoot":"","sources":["../../../../../src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"FocusTrapZoneTest.js","sourceRoot":"","sources":["../../../../../src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAE5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,IAAM,eAAe,GAAG,gBAAgB,CAAC,UAAC,CAAQ;IAChD,OAAO;QACL,aAAa,EAAE;YACb,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;YACpC,WAAW,EAAE,QAAQ;SACtB;QACD,mBAAmB,EAAE;YACnB,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;YACpC,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,OAAO;SACrB;QACD,sBAAsB,EAAE;YACtB,WAAW,EAAE,CAAC;YACd,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,CAAC;YACT,WAAW,EAAE,CAAC,CAAC,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CAAC,CAAC,YAAY,CAAC,aAAa;gBAExF,oBAAC,IAAI,QAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAQ;gBAChE,oBAAC,iBAAiB,IAAC,KAAK,EAAC,SAAS,GAAG;gBACrC,oBAAC,iBAAiB,IAAC,KAAK,EAAC,SAAS,GAAG;gBACrC,oBAAC,iBAAiB,IAAC,KAAK,EAAC,SAAS,GAAG;gBACrC,oBAAC,iBAAiB,IAAC,KAAK,EAAC,SAAS,GAAG,CACvB,CACjB,CACK,CACH,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,qBAAqB,GAAkB;IAC3C;QACE,IAAI,EAAE,2BAA2B;QACjC,MAAM,EAAE,sBAAsB;QAC9B,SAAS,EAAE,kBAAkB;KAC9B;CACF,CAAC;AAEF,MAAM,CAAC,IAAM,aAAa,GAA4B;IACpD,IAAM,MAAM,GAAmB;QAC7B,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,KAAK;QAClB,aAAa,EAAE,KAAK;KACrB,CAAC;IAEF,IAAM,WAAW,GACf,uJAAuJ,CAAC;IAE1J,OAAO,oBAAC,IAAI,IAAC,IAAI,EAAC,sBAAsB,EAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,GAAS,CAAC;AAC9H,CAAC,CAAC"}
|
package/lib-commonjs/fluent-tester/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusTrapZoneTest.d.ts","sourceRoot":"","sources":["../../../../../src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"FocusTrapZoneTest.d.ts","sourceRoot":"","sources":["../../../../../src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAsD5D,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC,uBAAuB,CAkB9E,CAAC;AA0FF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAajC,CAAC"}
|
|
@@ -7,37 +7,60 @@ var react_native_1 = require("react-native");
|
|
|
7
7
|
var react_native_2 = require("@fluentui/react-native");
|
|
8
8
|
var interactive_hooks_1 = require("@fluentui-react-native/interactive-hooks");
|
|
9
9
|
var stack_1 = require("@fluentui-react-native/stack");
|
|
10
|
+
var theme_types_1 = require("@fluentui-react-native/theme-types");
|
|
11
|
+
var themed_stylesheet_1 = require("@fluentui-react-native/themed-stylesheet");
|
|
10
12
|
var consts_1 = require("../../../../E2E/src/FocusTrapZone/consts");
|
|
11
13
|
var styles_1 = require("../Common/styles");
|
|
12
14
|
var Test_1 = require("../Test");
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
var getThemedStyles = (0, themed_stylesheet_1.themedStyleSheet)(function (t) {
|
|
16
|
+
return {
|
|
17
|
+
trapZoneStyle: {
|
|
18
|
+
padding: 10,
|
|
19
|
+
borderWidth: 2,
|
|
20
|
+
borderColor: t.colors.neutralStroke1,
|
|
21
|
+
borderStyle: 'dashed',
|
|
22
|
+
},
|
|
23
|
+
activeTrapZoneStyle: {
|
|
24
|
+
padding: 10,
|
|
25
|
+
borderColor: t.colors.neutralStroke1,
|
|
26
|
+
borderWidth: 2,
|
|
27
|
+
borderStyle: 'solid',
|
|
28
|
+
},
|
|
29
|
+
componentTwiddlerStyle: {
|
|
30
|
+
borderWidth: 1,
|
|
31
|
+
padding: 8,
|
|
32
|
+
margin: 4,
|
|
33
|
+
borderColor: t.colors.neutralStroke1,
|
|
34
|
+
borderStyle: 'solid',
|
|
35
|
+
},
|
|
36
|
+
focusedComponentTwiddlerStyle: {
|
|
37
|
+
borderWidth: 1,
|
|
38
|
+
padding: 8,
|
|
39
|
+
margin: 4,
|
|
40
|
+
borderStyle: 'solid',
|
|
41
|
+
borderColor: t.colors.strokeFocus2,
|
|
42
|
+
backgroundColor: t.colors.neutralBackground1Hover,
|
|
43
|
+
},
|
|
44
|
+
componentTwiddlerText: {
|
|
45
|
+
color: t.colors.neutralForeground1,
|
|
46
|
+
},
|
|
47
|
+
focusedComponentTwiddlerText: {
|
|
48
|
+
color: t.colors.neutralForeground1Hover,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
});
|
|
33
52
|
var ComponentTwiddler = function (props) {
|
|
34
53
|
var _a = (0, interactive_hooks_1.useFocusState)({}), focusProps = _a[0], focusState = _a[1];
|
|
54
|
+
var theme = (0, theme_types_1.useTheme)();
|
|
55
|
+
var themedStyles = getThemedStyles(theme);
|
|
35
56
|
return (React.createElement(react_native_1.TouchableHighlight, tslib_1.__assign({}, { focusable: false }, { onPress: props.onPress }),
|
|
36
|
-
React.createElement(react_native_1.View, tslib_1.__assign({ focusable: true }, focusProps, { style: focusState.focused ? focusedComponentTwiddlerStyle : componentTwiddlerStyle }),
|
|
37
|
-
React.createElement(react_native_2.Text,
|
|
57
|
+
React.createElement(react_native_1.View, tslib_1.__assign({ focusable: true }, focusProps, { style: focusState.focused ? themedStyles.focusedComponentTwiddlerStyle : themedStyles.componentTwiddlerStyle }),
|
|
58
|
+
React.createElement(react_native_2.Text, { style: focusState.focused ? themedStyles.focusedComponentTwiddlerText : themedStyles.componentTwiddlerText }, props.label))));
|
|
38
59
|
};
|
|
39
60
|
exports.ComponentTwiddler = ComponentTwiddler;
|
|
40
61
|
var BasicFocusTrapZone = function () {
|
|
62
|
+
var theme = (0, theme_types_1.useTheme)();
|
|
63
|
+
var themedStyles = getThemedStyles(theme);
|
|
41
64
|
var _a = React.useState({
|
|
42
65
|
useTrapZone: false,
|
|
43
66
|
renderTrapZone: true,
|
|
@@ -74,7 +97,7 @@ var BasicFocusTrapZone = function () {
|
|
|
74
97
|
? 'focusPreviouslyFocusedInnerElement: true'
|
|
75
98
|
: 'focusPreviouslyFocusedInnerElement: false', onPress: onTwiddleFocusPrevious }),
|
|
76
99
|
React.createElement(exports.ComponentTwiddler, { label: state.disableFirstFocus ? 'disableFirstFocus: true' : 'disableFirstFocus: false', onPress: onTwiddleFirstFocus }),
|
|
77
|
-
state.renderTrapZone && (React.createElement(react_native_2.FocusTrapZone, { componentRef: ftzRef, disableFirstFocus: state.disableFirstFocus, ignoreExternalFocusing: state.ignoreExternalFocusing, focusPreviouslyFocusedInnerElement: state.focusPreviouslyFocusedInnerElement, disabled: !state.useTrapZone, style: state.useTrapZone ? activeTrapZoneStyle : trapZoneStyle },
|
|
100
|
+
state.renderTrapZone && (React.createElement(react_native_2.FocusTrapZone, { componentRef: ftzRef, disableFirstFocus: state.disableFirstFocus, ignoreExternalFocusing: state.ignoreExternalFocusing, focusPreviouslyFocusedInnerElement: state.focusPreviouslyFocusedInnerElement, disabled: !state.useTrapZone, style: state.useTrapZone ? themedStyles.activeTrapZoneStyle : themedStyles.trapZoneStyle },
|
|
78
101
|
React.createElement(react_native_2.Text, null, state.useTrapZone ? 'Trap Active' : 'Trap Active'),
|
|
79
102
|
React.createElement(exports.ComponentTwiddler, { label: "trapped" }),
|
|
80
103
|
React.createElement(exports.ComponentTwiddler, { label: "trapped" }),
|
package/lib-commonjs/fluent-tester/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusTrapZoneTest.js","sourceRoot":"","sources":["../../../../../src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx"],"names":[],"mappings":";;;;AAAA,mDAA+B;AAE/B,6CAAwD;
|
|
1
|
+
{"version":3,"file":"FocusTrapZoneTest.js","sourceRoot":"","sources":["../../../../../src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx"],"names":[],"mappings":";;;;AAAA,mDAA+B;AAE/B,6CAAwD;AAExD,uDAA6D;AAG7D,8EAAyE;AACzE,sDAAqD;AACrD,kEAA8D;AAC9D,8EAA4E;AAE5E,mEAAkF;AAClF,2CAA8C;AAE9C,gCAA+B;AAE/B,IAAM,eAAe,GAAG,IAAA,oCAAgB,EAAC,UAAC,CAAQ;IAChD,OAAO;QACL,aAAa,EAAE;YACb,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;YACpC,WAAW,EAAE,QAAQ;SACtB;QACD,mBAAmB,EAAE;YACnB,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;YACpC,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,OAAO;SACrB;QACD,sBAAsB,EAAE;YACtB,WAAW,EAAE,CAAC;YACd,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,CAAC;YACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;YACpC,WAAW,EAAE,OAAO;SACrB;QACD,6BAA6B,EAAE;YAC7B,WAAW,EAAE,CAAC;YACd,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,CAAC;YACT,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,CAAC,CAAC,MAA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,yBAAiB,IAAC,KAAK,EAAC,SAAS,GAAG;gBACrC,oBAAC,yBAAiB,IAAC,KAAK,EAAC,SAAS,GAAG;gBACrC,oBAAC,yBAAiB,IAAC,KAAK,EAAC,SAAS,GAAG;gBACrC,oBAAC,yBAAiB,IAAC,KAAK,EAAC,SAAS,GAAG,CACvB,CACjB,CACK,CACH,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,qBAAqB,GAAkB;IAC3C;QACE,IAAI,EAAE,2BAA2B;QACjC,MAAM,EAAE,+BAAsB;QAC9B,SAAS,EAAE,kBAAkB;KAC9B;CACF,CAAC;AAEK,IAAM,aAAa,GAA4B;IACpD,IAAM,MAAM,GAAmB;QAC7B,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,KAAK;QAClB,aAAa,EAAE,KAAK;KACrB,CAAC;IAEF,IAAM,WAAW,GACf,uJAAuJ,CAAC;IAE1J,OAAO,oBAAC,WAAI,IAAC,IAAI,EAAC,sBAAsB,EAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,GAAS,CAAC;AAC9H,CAAC,CAAC;AAbW,QAAA,aAAa,iBAaxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
|
-
"version": "0.167.
|
|
3
|
+
"version": "0.167.2",
|
|
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>",
|
|
@@ -33,49 +33,49 @@
|
|
|
33
33
|
"directory": "apps/fluent-tester"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui-react-native/android-theme": ">=0.24.
|
|
37
|
-
"@fluentui-react-native/apple-theme": ">=0.27.
|
|
38
|
-
"@fluentui-react-native/avatar": "^1.11.
|
|
39
|
-
"@fluentui-react-native/badge": ">=0.8.
|
|
40
|
-
"@fluentui-react-native/button": ">=0.36.
|
|
41
|
-
"@fluentui-react-native/chip": "^0.3.
|
|
42
|
-
"@fluentui-react-native/default-theme": ">=0.25.
|
|
43
|
-
"@fluentui-react-native/divider": "^0.6.
|
|
44
|
-
"@fluentui-react-native/drawer": "^0.3.
|
|
45
|
-
"@fluentui-react-native/dropdown": ">=0.9.
|
|
46
|
-
"@fluentui-react-native/experimental-activity-indicator": ">=0.9.
|
|
47
|
-
"@fluentui-react-native/experimental-appearance-additions": "^0.6.
|
|
48
|
-
"@fluentui-react-native/experimental-avatar": ">=0.20.
|
|
49
|
-
"@fluentui-react-native/experimental-checkbox": "0.16.
|
|
50
|
-
"@fluentui-react-native/experimental-expander": "0.7.
|
|
51
|
-
"@fluentui-react-native/experimental-menu-button": ">=0.9.
|
|
36
|
+
"@fluentui-react-native/android-theme": ">=0.24.1 <1.0.0",
|
|
37
|
+
"@fluentui-react-native/apple-theme": ">=0.27.1 <1.0.0",
|
|
38
|
+
"@fluentui-react-native/avatar": "^1.11.8",
|
|
39
|
+
"@fluentui-react-native/badge": ">=0.8.8 <1.0.0",
|
|
40
|
+
"@fluentui-react-native/button": ">=0.36.10 <1.0.0",
|
|
41
|
+
"@fluentui-react-native/chip": "^0.3.8",
|
|
42
|
+
"@fluentui-react-native/default-theme": ">=0.25.1 <1.0.0",
|
|
43
|
+
"@fluentui-react-native/divider": "^0.6.8",
|
|
44
|
+
"@fluentui-react-native/drawer": "^0.3.7",
|
|
45
|
+
"@fluentui-react-native/dropdown": ">=0.9.10 <1.0.0",
|
|
46
|
+
"@fluentui-react-native/experimental-activity-indicator": ">=0.9.7 <1.0.0",
|
|
47
|
+
"@fluentui-react-native/experimental-appearance-additions": "^0.6.7",
|
|
48
|
+
"@fluentui-react-native/experimental-avatar": ">=0.20.7 <1.0.0",
|
|
49
|
+
"@fluentui-react-native/experimental-checkbox": "0.16.7",
|
|
50
|
+
"@fluentui-react-native/experimental-expander": "0.7.7",
|
|
51
|
+
"@fluentui-react-native/experimental-menu-button": ">=0.9.11 <1.0.0",
|
|
52
52
|
"@fluentui-react-native/experimental-native-date-picker": ">=0.10.0 <1.0.0",
|
|
53
|
-
"@fluentui-react-native/experimental-shadow": "0.5.
|
|
54
|
-
"@fluentui-react-native/experimental-shimmer": "0.12.
|
|
55
|
-
"@fluentui-react-native/experimental-text": ">=0.14.
|
|
56
|
-
"@fluentui-react-native/framework": ">=0.13.
|
|
57
|
-
"@fluentui-react-native/icon": "0.20.
|
|
58
|
-
"@fluentui-react-native/input": "^0.5.
|
|
59
|
-
"@fluentui-react-native/interactive-hooks": ">=0.25.
|
|
60
|
-
"@fluentui-react-native/menu": "^1.12.
|
|
53
|
+
"@fluentui-react-native/experimental-shadow": "0.5.7",
|
|
54
|
+
"@fluentui-react-native/experimental-shimmer": "0.12.9",
|
|
55
|
+
"@fluentui-react-native/experimental-text": ">=0.14.7 <1.0.0",
|
|
56
|
+
"@fluentui-react-native/framework": ">=0.13.6 <1.0.0",
|
|
57
|
+
"@fluentui-react-native/icon": "0.20.8",
|
|
58
|
+
"@fluentui-react-native/input": "^0.5.8",
|
|
59
|
+
"@fluentui-react-native/interactive-hooks": ">=0.25.7 <1.0.0",
|
|
60
|
+
"@fluentui-react-native/menu": "^1.12.12",
|
|
61
61
|
"@fluentui-react-native/merge-props": ">=0.8.0 <1.0.0",
|
|
62
|
-
"@fluentui-react-native/notification": "0.24.
|
|
63
|
-
"@fluentui-react-native/radio-group": ">=0.20.
|
|
64
|
-
"@fluentui-react-native/separator": "^0.17.
|
|
65
|
-
"@fluentui-react-native/spinner": "^0.8.
|
|
66
|
-
"@fluentui-react-native/stack": ">=0.9.
|
|
67
|
-
"@fluentui-react-native/switch": "^0.12.
|
|
68
|
-
"@fluentui-react-native/tablist": "0.5.
|
|
69
|
-
"@fluentui-react-native/text": ">=0.22.
|
|
70
|
-
"@fluentui-react-native/theme": ">=0.10.
|
|
62
|
+
"@fluentui-react-native/notification": "0.24.10",
|
|
63
|
+
"@fluentui-react-native/radio-group": ">=0.20.9 <1.0.0",
|
|
64
|
+
"@fluentui-react-native/separator": "^0.17.7",
|
|
65
|
+
"@fluentui-react-native/spinner": "^0.8.7",
|
|
66
|
+
"@fluentui-react-native/stack": ">=0.9.7 <1.0.0",
|
|
67
|
+
"@fluentui-react-native/switch": "^0.12.7",
|
|
68
|
+
"@fluentui-react-native/tablist": "0.5.14",
|
|
69
|
+
"@fluentui-react-native/text": ">=0.22.7 <1.0.0",
|
|
70
|
+
"@fluentui-react-native/theme": ">=0.10.6 <1.0.0",
|
|
71
71
|
"@fluentui-react-native/theme-tokens": "^0.26.5",
|
|
72
72
|
"@fluentui-react-native/theme-types": ">=0.38.0 <1.0.0",
|
|
73
73
|
"@fluentui-react-native/themed-stylesheet": "^1.6.0",
|
|
74
74
|
"@fluentui-react-native/theming-utils": ">=0.25.5 <1.0.0",
|
|
75
|
-
"@fluentui-react-native/tooltip": "0.2.
|
|
75
|
+
"@fluentui-react-native/tooltip": "0.2.9",
|
|
76
76
|
"@fluentui-react-native/vibrancy-view": ">=0.1.0 <1.0.0",
|
|
77
|
-
"@fluentui-react-native/win32-theme": ">=0.33.
|
|
78
|
-
"@fluentui/react-native": ">=0.40.
|
|
77
|
+
"@fluentui-react-native/win32-theme": ">=0.33.1 <1.0.0",
|
|
78
|
+
"@fluentui/react-native": ">=0.40.1 <1.0.0",
|
|
79
79
|
"@fortawesome/fontawesome-svg-core": "^6.2.0",
|
|
80
80
|
"@fortawesome/free-solid-svg-icons": "^6.2.0",
|
|
81
81
|
"@fortawesome/react-native-fontawesome": "^0.3.0",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@babel/core": "^7.8.0",
|
|
95
95
|
"@babel/runtime": "^7.8.0",
|
|
96
96
|
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
|
|
97
|
-
"@fluentui-react-native/focus-zone": "^0.16.
|
|
97
|
+
"@fluentui-react-native/focus-zone": "^0.16.7",
|
|
98
98
|
"@fluentui-react-native/scripts": "^0.1.1",
|
|
99
99
|
"@react-native/metro-config": "^0.72.0",
|
|
100
100
|
"@rnx-kit/cli": "^0.16.2",
|
|
@@ -1,45 +1,57 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { TouchableHighlightProps
|
|
2
|
+
import type { TouchableHighlightProps } from 'react-native';
|
|
3
3
|
import { TouchableHighlight, View } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import type { IFocusTrapZoneProps } from '@fluentui/react-native';
|
|
6
5
|
import { FocusTrapZone, Text } from '@fluentui/react-native';
|
|
6
|
+
import type { Theme } from '@fluentui-react-native/framework';
|
|
7
7
|
import type { KeyPressEvent } from '@fluentui-react-native/interactive-hooks';
|
|
8
8
|
import { useFocusState } from '@fluentui-react-native/interactive-hooks';
|
|
9
9
|
import { Stack } from '@fluentui-react-native/stack';
|
|
10
|
+
import { useTheme } from '@fluentui-react-native/theme-types';
|
|
11
|
+
import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
|
|
10
12
|
|
|
11
13
|
import { FOCUSTRAPZONE_TESTPAGE } from '../../../../E2E/src/FocusTrapZone/consts';
|
|
12
14
|
import { stackStyle } from '../Common/styles';
|
|
13
15
|
import type { TestSection, PlatformStatus } from '../Test';
|
|
14
16
|
import { Test } from '../Test';
|
|
15
17
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
18
|
+
const getThemedStyles = themedStyleSheet((t: Theme) => {
|
|
19
|
+
return {
|
|
20
|
+
trapZoneStyle: {
|
|
21
|
+
padding: 10,
|
|
22
|
+
borderWidth: 2,
|
|
23
|
+
borderColor: t.colors.neutralStroke1,
|
|
24
|
+
borderStyle: 'dashed',
|
|
25
|
+
},
|
|
26
|
+
activeTrapZoneStyle: {
|
|
27
|
+
padding: 10,
|
|
28
|
+
borderColor: t.colors.neutralStroke1,
|
|
29
|
+
borderWidth: 2,
|
|
30
|
+
borderStyle: 'solid',
|
|
31
|
+
},
|
|
32
|
+
componentTwiddlerStyle: {
|
|
33
|
+
borderWidth: 1,
|
|
34
|
+
padding: 8,
|
|
35
|
+
margin: 4,
|
|
36
|
+
borderColor: t.colors.neutralStroke1,
|
|
37
|
+
borderStyle: 'solid',
|
|
38
|
+
},
|
|
39
|
+
focusedComponentTwiddlerStyle: {
|
|
40
|
+
borderWidth: 1,
|
|
41
|
+
padding: 8,
|
|
42
|
+
margin: 4,
|
|
43
|
+
borderStyle: 'solid',
|
|
44
|
+
borderColor: t.colors.strokeFocus2,
|
|
45
|
+
backgroundColor: t.colors.neutralBackground1Hover,
|
|
46
|
+
},
|
|
47
|
+
componentTwiddlerText: {
|
|
48
|
+
color: t.colors.neutralForeground1,
|
|
49
|
+
},
|
|
50
|
+
focusedComponentTwiddlerText: {
|
|
51
|
+
color: t.colors.neutralForeground1Hover,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
});
|
|
43
55
|
|
|
44
56
|
interface IComponentTwiddlerProps {
|
|
45
57
|
label?: string;
|
|
@@ -48,17 +60,28 @@ interface IComponentTwiddlerProps {
|
|
|
48
60
|
|
|
49
61
|
export const ComponentTwiddler: React.FunctionComponent<IComponentTwiddlerProps> = (props: IComponentTwiddlerProps) => {
|
|
50
62
|
const [focusProps, focusState] = useFocusState({});
|
|
63
|
+
const theme = useTheme();
|
|
64
|
+
const themedStyles = getThemedStyles(theme);
|
|
51
65
|
|
|
52
66
|
return (
|
|
53
67
|
<TouchableHighlight {...{ focusable: false }} onPress={props.onPress}>
|
|
54
|
-
<View
|
|
55
|
-
|
|
68
|
+
<View
|
|
69
|
+
focusable={true}
|
|
70
|
+
{...(focusProps as any)}
|
|
71
|
+
style={focusState.focused ? themedStyles.focusedComponentTwiddlerStyle : themedStyles.componentTwiddlerStyle}
|
|
72
|
+
>
|
|
73
|
+
<Text style={focusState.focused ? themedStyles.focusedComponentTwiddlerText : themedStyles.componentTwiddlerText}>
|
|
74
|
+
{props.label}
|
|
75
|
+
</Text>
|
|
56
76
|
</View>
|
|
57
77
|
</TouchableHighlight>
|
|
58
78
|
);
|
|
59
79
|
};
|
|
60
80
|
|
|
61
81
|
const BasicFocusTrapZone: React.FunctionComponent = () => {
|
|
82
|
+
const theme = useTheme();
|
|
83
|
+
const themedStyles = getThemedStyles(theme);
|
|
84
|
+
|
|
62
85
|
const [state, setState] = React.useState({
|
|
63
86
|
useTrapZone: false,
|
|
64
87
|
renderTrapZone: true,
|
|
@@ -121,7 +144,7 @@ const BasicFocusTrapZone: React.FunctionComponent = () => {
|
|
|
121
144
|
ignoreExternalFocusing={state.ignoreExternalFocusing}
|
|
122
145
|
focusPreviouslyFocusedInnerElement={state.focusPreviouslyFocusedInnerElement}
|
|
123
146
|
disabled={!state.useTrapZone}
|
|
124
|
-
style={state.useTrapZone ? activeTrapZoneStyle : trapZoneStyle}
|
|
147
|
+
style={state.useTrapZone ? themedStyles.activeTrapZoneStyle : themedStyles.trapZoneStyle}
|
|
125
148
|
>
|
|
126
149
|
<Text>{state.useTrapZone ? 'Trap Active' : 'Trap Active'}</Text>
|
|
127
150
|
<ComponentTwiddler label="trapped" />
|