@fluentui-react-native/tester 0.151.23 → 0.153.0
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 +61 -1
- package/CHANGELOG.md +23 -2
- package/ios/Podfile.lock +247 -239
- package/lib/E2E/src/VibrancyView/consts.d.ts +4 -0
- package/lib/E2E/src/VibrancyView/consts.d.ts.map +1 -0
- package/lib/E2E/src/VibrancyView/consts.js +4 -0
- package/lib/E2E/src/VibrancyView/consts.js.map +1 -0
- package/lib/E2E/src/index.consts.d.ts +1 -0
- package/lib/E2E/src/index.consts.d.ts.map +1 -1
- package/lib/E2E/src/index.consts.js +1 -0
- package/lib/E2E/src/index.consts.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.js +4 -1
- package/lib/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.js +1 -0
- package/lib/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/VibrancyView/VibrancyViewTest.d.ts +3 -0
- package/lib/fluent-tester/src/TestComponents/VibrancyView/VibrancyViewTest.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/VibrancyView/VibrancyViewTest.js +184 -0
- package/lib/fluent-tester/src/TestComponents/VibrancyView/VibrancyViewTest.js.map +1 -0
- package/lib/fluent-tester/src/TestComponents/VibrancyView/index.d.ts +2 -0
- package/lib/fluent-tester/src/TestComponents/VibrancyView/index.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/VibrancyView/index.js +2 -0
- package/lib/fluent-tester/src/TestComponents/VibrancyView/index.js.map +1 -0
- package/lib/fluent-tester/src/testPages.d.ts.map +1 -1
- package/lib/fluent-tester/src/testPages.js +7 -0
- package/lib/fluent-tester/src/testPages.js.map +1 -1
- package/lib-commonjs/E2E/src/VibrancyView/consts.d.ts +4 -0
- package/lib-commonjs/E2E/src/VibrancyView/consts.d.ts.map +1 -0
- package/lib-commonjs/E2E/src/VibrancyView/consts.js +7 -0
- package/lib-commonjs/E2E/src/VibrancyView/consts.js.map +1 -0
- package/lib-commonjs/E2E/src/index.consts.d.ts +1 -0
- package/lib-commonjs/E2E/src/index.consts.d.ts.map +1 -1
- package/lib-commonjs/E2E/src/index.consts.js +1 -0
- package/lib-commonjs/E2E/src/index.consts.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.js +4 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.js +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/VibrancyView/VibrancyViewTest.d.ts +3 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/VibrancyView/VibrancyViewTest.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/VibrancyView/VibrancyViewTest.js +188 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/VibrancyView/VibrancyViewTest.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/VibrancyView/index.d.ts +2 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/VibrancyView/index.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/VibrancyView/index.js +5 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/VibrancyView/index.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/testPages.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/testPages.js +7 -0
- package/lib-commonjs/fluent-tester/src/testPages.js.map +1 -1
- package/macos/Podfile.lock +248 -242
- package/package.json +6 -5
- package/src/TestComponents/CheckboxV1/CheckboxV1Test.tsx +4 -1
- package/src/TestComponents/RadioGroupV1/RadioGroupV1Test.tsx +1 -0
- package/src/TestComponents/VibrancyView/VibrancyViewTest.tsx +231 -0
- package/src/TestComponents/VibrancyView/index.ts +1 -0
- package/src/testPages.ts +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.153.0",
|
|
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>",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"@fluentui-react-native/experimental-appearance-additions": "^0.5.7",
|
|
48
48
|
"@fluentui-react-native/experimental-avatar": ">=0.19.6 <1.0.0",
|
|
49
49
|
"@fluentui-react-native/experimental-button": "0.18.10",
|
|
50
|
-
"@fluentui-react-native/experimental-checkbox": "0.15.
|
|
50
|
+
"@fluentui-react-native/experimental-checkbox": "0.15.10",
|
|
51
51
|
"@fluentui-react-native/experimental-expander": "0.6.8",
|
|
52
52
|
"@fluentui-react-native/experimental-menu-button": ">=0.7.17 <1.0.0",
|
|
53
53
|
"@fluentui-react-native/experimental-native-date-picker": ">=0.8.0 <1.0.0",
|
|
54
54
|
"@fluentui-react-native/experimental-shadow": "0.4.7",
|
|
55
|
-
"@fluentui-react-native/experimental-shimmer": "0.
|
|
55
|
+
"@fluentui-react-native/experimental-shimmer": "0.11.0",
|
|
56
56
|
"@fluentui-react-native/experimental-tabs": "0.9.10",
|
|
57
57
|
"@fluentui-react-native/experimental-text": ">=0.13.7 <1.0.0",
|
|
58
58
|
"@fluentui-react-native/framework": ">=0.11.5 <1.0.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@fluentui-react-native/menu": "^1.11.16",
|
|
63
63
|
"@fluentui-react-native/merge-props": ">=0.7.1 <1.0.0",
|
|
64
64
|
"@fluentui-react-native/notification": "0.23.10",
|
|
65
|
-
"@fluentui-react-native/radio-group": ">=0.
|
|
65
|
+
"@fluentui-react-native/radio-group": ">=0.19.0 <1.0.0",
|
|
66
66
|
"@fluentui-react-native/separator": "^0.16.5",
|
|
67
67
|
"@fluentui-react-native/spinner": "^0.7.8",
|
|
68
68
|
"@fluentui-react-native/stack": ">=0.8.9 <1.0.0",
|
|
@@ -74,8 +74,9 @@
|
|
|
74
74
|
"@fluentui-react-native/theme-types": ">=0.32.0 <1.0.0",
|
|
75
75
|
"@fluentui-react-native/themed-stylesheet": "^1.5.2",
|
|
76
76
|
"@fluentui-react-native/theming-utils": ">=0.24.3 <1.0.0",
|
|
77
|
+
"@fluentui-react-native/vibrancy-view": ">=0.0.2 <1.0.0",
|
|
77
78
|
"@fluentui-react-native/win32-theme": ">=0.27.5 <1.0.0",
|
|
78
|
-
"@fluentui/react-native": ">=0.37.
|
|
79
|
+
"@fluentui/react-native": ">=0.37.19 <1.0.0",
|
|
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",
|
|
@@ -185,6 +185,7 @@ const checkboxSections: TestSection[] = [
|
|
|
185
185
|
},
|
|
186
186
|
Platform.select({
|
|
187
187
|
android: null,
|
|
188
|
+
ios: null,
|
|
188
189
|
default: {
|
|
189
190
|
name: 'Size Checkboxes',
|
|
190
191
|
component: SizeCheckbox,
|
|
@@ -192,6 +193,7 @@ const checkboxSections: TestSection[] = [
|
|
|
192
193
|
}),
|
|
193
194
|
Platform.select({
|
|
194
195
|
android: null,
|
|
196
|
+
ios: null,
|
|
195
197
|
default: {
|
|
196
198
|
name: 'Desktop Specific Checkboxes',
|
|
197
199
|
component: DesktopSpecificCheckbox,
|
|
@@ -203,6 +205,7 @@ const checkboxSections: TestSection[] = [
|
|
|
203
205
|
},
|
|
204
206
|
Platform.select({
|
|
205
207
|
android: null,
|
|
208
|
+
ios: null,
|
|
206
209
|
default: {
|
|
207
210
|
name: 'Token Customized Checkboxes',
|
|
208
211
|
component: TokenCheckbox,
|
|
@@ -221,7 +224,7 @@ export const CheckboxV1Test: React.FunctionComponent = () => {
|
|
|
221
224
|
const status: PlatformStatus = {
|
|
222
225
|
win32Status: 'Production',
|
|
223
226
|
uwpStatus: 'N/A',
|
|
224
|
-
iosStatus: '
|
|
227
|
+
iosStatus: 'Experimental',
|
|
225
228
|
macosStatus: 'Experimental',
|
|
226
229
|
androidStatus: 'Experimental',
|
|
227
230
|
};
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Alert, StyleSheet, View } from 'react-native';
|
|
3
|
+
import type { ViewProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { ButtonV1 as Button, Text } from '@fluentui/react-native';
|
|
6
|
+
import { Stack } from '@fluentui-react-native/stack';
|
|
7
|
+
import type { Material, BlendingMode, State } from '@fluentui-react-native/vibrancy-view';
|
|
8
|
+
import { VibrancyView } from '@fluentui-react-native/vibrancy-view';
|
|
9
|
+
|
|
10
|
+
import { VIBRANCYVIEW_TESTPAGE } from '../../../../E2E/src/VibrancyView/consts';
|
|
11
|
+
import { MenuPicker } from '../Common/MenuPicker';
|
|
12
|
+
import { stackStyle, commonTestStyles as commonStyles } from '../Common/styles';
|
|
13
|
+
import type { TestSection, PlatformStatus } from '../Test';
|
|
14
|
+
import { Test } from '../Test';
|
|
15
|
+
|
|
16
|
+
const styles = StyleSheet.create({
|
|
17
|
+
row: {
|
|
18
|
+
flex: 1,
|
|
19
|
+
flexDirection: 'row',
|
|
20
|
+
},
|
|
21
|
+
box: {
|
|
22
|
+
width: 100,
|
|
23
|
+
height: 100,
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
},
|
|
27
|
+
bigBox: {
|
|
28
|
+
width: 200,
|
|
29
|
+
height: 200,
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
},
|
|
33
|
+
biggerBox: {
|
|
34
|
+
backgroundColor: 'yellow',
|
|
35
|
+
width: 300,
|
|
36
|
+
height: 300,
|
|
37
|
+
justifyContent: 'center',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
},
|
|
40
|
+
Rectangle1: {
|
|
41
|
+
backgroundColor: 'yellow',
|
|
42
|
+
width: 300,
|
|
43
|
+
height: 300,
|
|
44
|
+
},
|
|
45
|
+
Rectangle2: {
|
|
46
|
+
position: 'absolute',
|
|
47
|
+
top: 50,
|
|
48
|
+
width: 400,
|
|
49
|
+
height: 200,
|
|
50
|
+
},
|
|
51
|
+
centeredBox: {
|
|
52
|
+
backgroundColor: 'green',
|
|
53
|
+
width: 100,
|
|
54
|
+
height: 100,
|
|
55
|
+
justifyContent: 'center',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
},
|
|
58
|
+
borderProps: {
|
|
59
|
+
backgroundColor: 'blue',
|
|
60
|
+
borderColor: 'red',
|
|
61
|
+
borderWidth: 1,
|
|
62
|
+
borderRadius: 8,
|
|
63
|
+
},
|
|
64
|
+
rootWithSpacing: { ...commonStyles.root, gap: 8 },
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const VibrancyViewDefault: React.FunctionComponent = () => {
|
|
68
|
+
return (
|
|
69
|
+
<Stack style={stackStyle}>
|
|
70
|
+
<View style={styles.rootWithSpacing}>
|
|
71
|
+
<Text>Vibrancy View with no props set</Text>
|
|
72
|
+
<VibrancyView style={styles.box} />
|
|
73
|
+
</View>
|
|
74
|
+
</Stack>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const VibrancyViewWithViewProps: React.FunctionComponent = () => {
|
|
79
|
+
const descriptionString = '<View> and <VibrancyView> with the backgroundColor, borderColor, borderWidth, borderRadius set';
|
|
80
|
+
const viewProps: ViewProps = React.useMemo(() => {
|
|
81
|
+
return {
|
|
82
|
+
focusable: true,
|
|
83
|
+
style: [styles.box, styles.borderProps],
|
|
84
|
+
};
|
|
85
|
+
}, []);
|
|
86
|
+
return (
|
|
87
|
+
<Stack style={stackStyle}>
|
|
88
|
+
<View style={styles.rootWithSpacing}>
|
|
89
|
+
<Text>{descriptionString}</Text>
|
|
90
|
+
<View style={styles.row}>
|
|
91
|
+
<View {...viewProps} />
|
|
92
|
+
<VibrancyView {...viewProps} />
|
|
93
|
+
</View>
|
|
94
|
+
</View>
|
|
95
|
+
</Stack>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const materialSelections: Material[] = [
|
|
100
|
+
'titlebar',
|
|
101
|
+
'selection',
|
|
102
|
+
'menu',
|
|
103
|
+
'popover',
|
|
104
|
+
'sidebar',
|
|
105
|
+
'headerview',
|
|
106
|
+
'sheet',
|
|
107
|
+
'windowbackground',
|
|
108
|
+
'hudWindow',
|
|
109
|
+
'fullScreenUI',
|
|
110
|
+
'toolTip',
|
|
111
|
+
'contentBackground',
|
|
112
|
+
'underWindowBackground',
|
|
113
|
+
'underPageBackground',
|
|
114
|
+
];
|
|
115
|
+
const materialsCollection = materialSelections.map((material) => {
|
|
116
|
+
return {
|
|
117
|
+
label: material,
|
|
118
|
+
value: material,
|
|
119
|
+
};
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const blendingModeSelections: BlendingMode[] = ['withinWindow', 'behindWindow'];
|
|
123
|
+
const blendingModeCollection = blendingModeSelections.map((material) => {
|
|
124
|
+
return {
|
|
125
|
+
label: material,
|
|
126
|
+
value: material,
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
const stateSelections: State[] = ['followsWindowActiveState', 'active', 'inactive'];
|
|
131
|
+
const stateCollection = stateSelections.map((material) => {
|
|
132
|
+
return {
|
|
133
|
+
label: material,
|
|
134
|
+
value: material,
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
const VibrancyViewWithVibrancyViewProps: React.FunctionComponent = () => {
|
|
139
|
+
const [material, setMaterial] = React.useState<Material>(undefined);
|
|
140
|
+
const [blendingMode, setBlendingMode] = React.useState<BlendingMode>(undefined);
|
|
141
|
+
const [state, setState] = React.useState<State>(undefined);
|
|
142
|
+
|
|
143
|
+
const onMaterialChange = React.useCallback((material: Material) => {
|
|
144
|
+
setMaterial(material);
|
|
145
|
+
}, []);
|
|
146
|
+
|
|
147
|
+
const onBlendingModeChange = React.useCallback((blendingMode: BlendingMode) => {
|
|
148
|
+
setBlendingMode(blendingMode);
|
|
149
|
+
}, []);
|
|
150
|
+
|
|
151
|
+
const onStateChange = React.useCallback((state: State) => {
|
|
152
|
+
setState(state);
|
|
153
|
+
}, []);
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<Stack style={stackStyle}>
|
|
157
|
+
<View style={styles.Rectangle1}>
|
|
158
|
+
<VibrancyView material={material} blendingMode={blendingMode} state={state} style={styles.Rectangle2}>
|
|
159
|
+
<MenuPicker prompt="Material" selected={material || 'undefined'} onChange={onMaterialChange} collection={materialsCollection} />
|
|
160
|
+
<MenuPicker
|
|
161
|
+
prompt="Blending Mode"
|
|
162
|
+
selected={blendingMode || 'undefined'}
|
|
163
|
+
onChange={onBlendingModeChange}
|
|
164
|
+
collection={blendingModeCollection}
|
|
165
|
+
/>
|
|
166
|
+
<MenuPicker prompt="State" selected={state || 'undefined'} onChange={onStateChange} collection={stateCollection} />
|
|
167
|
+
</VibrancyView>
|
|
168
|
+
</View>
|
|
169
|
+
</Stack>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const HitTestButton = (props: { title: string }) => {
|
|
174
|
+
const onClick = React.useCallback(
|
|
175
|
+
(_e) => {
|
|
176
|
+
Alert.alert(props.title);
|
|
177
|
+
},
|
|
178
|
+
[props],
|
|
179
|
+
);
|
|
180
|
+
return <Button onClick={onClick}>{props.title}</Button>;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const VibrancyViewHitTest: React.FunctionComponent = () => {
|
|
184
|
+
return (
|
|
185
|
+
<View style={commonStyles.root}>
|
|
186
|
+
<HitTestButton title={'Button 1'} />
|
|
187
|
+
<VibrancyView style={styles.biggerBox}>
|
|
188
|
+
<HitTestButton title={'Button 2'} />
|
|
189
|
+
<View style={styles.centeredBox}>
|
|
190
|
+
<HitTestButton title={'Button 3'} />
|
|
191
|
+
</View>
|
|
192
|
+
<HitTestButton title={'Button 4'} />
|
|
193
|
+
</VibrancyView>
|
|
194
|
+
<HitTestButton title={'Button 5'} />
|
|
195
|
+
</View>
|
|
196
|
+
);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
const VibrancyViewSections: TestSection[] = [
|
|
200
|
+
{
|
|
201
|
+
name: 'VibrancyView Default',
|
|
202
|
+
testID: VIBRANCYVIEW_TESTPAGE,
|
|
203
|
+
component: VibrancyViewDefault,
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'VibrancyView with View props',
|
|
207
|
+
component: VibrancyViewWithViewProps,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'VibrancyView with VibrancyView props',
|
|
211
|
+
component: VibrancyViewWithVibrancyViewProps,
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'VibrancyView Hit Test',
|
|
215
|
+
component: VibrancyViewHitTest,
|
|
216
|
+
},
|
|
217
|
+
];
|
|
218
|
+
|
|
219
|
+
export const VibrancyViewTest: React.FunctionComponent = () => {
|
|
220
|
+
const status: PlatformStatus = {
|
|
221
|
+
win32Status: 'N/A',
|
|
222
|
+
uwpStatus: 'N/A',
|
|
223
|
+
iosStatus: 'Backlog',
|
|
224
|
+
macosStatus: 'Beta',
|
|
225
|
+
androidStatus: 'N/A',
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
const description = 'VibrancyView is a native module that exposes NSVisualEffectView to React Native on macOS';
|
|
229
|
+
|
|
230
|
+
return <Test name="VibrancyView Test" description={description} sections={VibrancyViewSections} status={status}></Test>;
|
|
231
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VibrancyViewTest';
|
package/src/testPages.ts
CHANGED
|
@@ -44,6 +44,7 @@ import { TabsV1Test } from './TestComponents/TabsV1';
|
|
|
44
44
|
import { TextLegacyTest } from './TestComponents/TextLegacy';
|
|
45
45
|
import { TextV1Test } from './TestComponents/TextV1';
|
|
46
46
|
import { ThemeTest } from './TestComponents/Theme';
|
|
47
|
+
import { VibrancyViewTest } from './TestComponents/VibrancyView';
|
|
47
48
|
import * as Constants from '../../E2E/src/index.consts';
|
|
48
49
|
|
|
49
50
|
export const tests: TestDescription[] = [
|
|
@@ -330,4 +331,10 @@ export const tests: TestDescription[] = [
|
|
|
330
331
|
testPageButton: Constants.HOMEPAGE_THEME_BUTTON,
|
|
331
332
|
platforms: ['android', 'ios', 'macos', 'win32', 'windows'],
|
|
332
333
|
},
|
|
334
|
+
{
|
|
335
|
+
name: 'Vibrancy View',
|
|
336
|
+
component: VibrancyViewTest,
|
|
337
|
+
testPageButton: Constants.HOMEPAGE_VIBRANCYVIEW_BUTTON,
|
|
338
|
+
platforms: ['macos'],
|
|
339
|
+
},
|
|
333
340
|
];
|