@fluentui-react-native/tester 0.56.1 → 0.58.1
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 +278 -1
- package/CHANGELOG.md +70 -2
- package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts +11 -0
- package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts.map +1 -0
- package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js +57 -0
- package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js.map +1 -0
- package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts +2 -0
- package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts.map +1 -0
- package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js +26 -0
- package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js.map +1 -0
- package/lib/FluentTester/FluentTester.d.ts.map +1 -1
- package/lib/FluentTester/FluentTester.js +8 -8
- package/lib/FluentTester/FluentTester.js.map +1 -1
- package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js +28 -23
- package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Avatar/CustomizedAvatar.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Avatar/CustomizedAvatar.js +24 -29
- package/lib/FluentTester/TestComponents/Avatar/CustomizedAvatar.js.map +1 -1
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.js +9 -9
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Button/ButtonHOCTestSection.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Button/ButtonHOCTestSection.js +6 -1
- package/lib/FluentTester/TestComponents/Button/ButtonHOCTestSection.js.map +1 -1
- package/lib/FluentTester/TestComponents/Checkbox/CheckboxTest.js +27 -27
- package/lib/FluentTester/TestComponents/Checkbox/CheckboxTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +27 -25
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.js +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js +2 -2
- package/lib/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Expander/ExpanderTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Expander/ExpanderTest.js +22 -22
- package/lib/FluentTester/TestComponents/Expander/ExpanderTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js +11 -11
- package/lib/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js +11 -11
- package/lib/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Persona/CustomizeUsage.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Persona/CustomizeUsage.js +13 -26
- package/lib/FluentTester/TestComponents/Persona/CustomizeUsage.js.map +1 -1
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js +24 -29
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js.map +1 -1
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +11 -20
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
- package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts +2 -0
- package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.js +21 -9
- package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Text/CustomizeUsage.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Text/CustomizeUsage.js +36 -36
- package/lib/FluentTester/TestComponents/Text/CustomizeUsage.js.map +1 -1
- package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js +36 -36
- package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js.map +1 -1
- package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts +11 -0
- package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts.map +1 -0
- package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js +59 -0
- package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js.map +1 -0
- package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts +2 -0
- package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts.map +1 -0
- package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js +29 -0
- package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js.map +1 -0
- package/lib-commonjs/FluentTester/FluentTester.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/FluentTester.js +8 -8
- package/lib-commonjs/FluentTester/FluentTester.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js +28 -23
- package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Avatar/CustomizedAvatar.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Avatar/CustomizedAvatar.js +24 -29
- package/lib-commonjs/FluentTester/TestComponents/Avatar/CustomizedAvatar.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.js +9 -9
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Button/ButtonHOCTestSection.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Button/ButtonHOCTestSection.js +6 -1
- package/lib-commonjs/FluentTester/TestComponents/Button/ButtonHOCTestSection.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Checkbox/CheckboxTest.js +27 -27
- package/lib-commonjs/FluentTester/TestComponents/Checkbox/CheckboxTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +27 -25
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.js +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.js +22 -22
- package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js +11 -11
- package/lib-commonjs/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js +11 -11
- package/lib-commonjs/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Persona/CustomizeUsage.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Persona/CustomizeUsage.js +13 -26
- package/lib-commonjs/FluentTester/TestComponents/Persona/CustomizeUsage.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js +24 -29
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +11 -20
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts +2 -0
- package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.js +24 -10
- package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Text/CustomizeUsage.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Text/CustomizeUsage.js +36 -36
- package/lib-commonjs/FluentTester/TestComponents/Text/CustomizeUsage.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js +36 -36
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js.map +1 -1
- package/package.json +24 -24
- package/src/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.ts +56 -0
- package/src/E2E/common/NativeTesting/specs/NativeTesting.spec.win.ts +28 -0
- package/src/FluentTester/FluentTester.tsx +10 -10
- package/src/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.tsx +36 -26
- package/src/FluentTester/TestComponents/Avatar/CustomizedAvatar.tsx +25 -31
- package/src/FluentTester/TestComponents/Badge/BadgeTest.tsx +11 -11
- package/src/FluentTester/TestComponents/Button/ButtonHOCTestSection.tsx +8 -1
- package/src/FluentTester/TestComponents/Checkbox/CheckboxTest.tsx +29 -29
- package/src/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.tsx +34 -26
- package/src/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.tsx +1 -1
- package/src/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.tsx +3 -3
- package/src/FluentTester/TestComponents/Expander/ExpanderTest.tsx +23 -22
- package/src/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.tsx +12 -11
- package/src/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.tsx +12 -11
- package/src/FluentTester/TestComponents/Persona/CustomizeUsage.tsx +15 -28
- package/src/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.tsx +12 -22
- package/src/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.tsx +25 -31
- package/src/FluentTester/TestComponents/Shimmer/ShimmerTest.tsx +50 -10
- package/src/FluentTester/TestComponents/Text/CustomizeUsage.tsx +42 -42
- package/src/FluentTester/TestComponents/TextExperimental/CustomizeUsage.tsx +42 -42
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { View, Text, Switch, TextInput, TextStyle } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { Persona } from '@fluentui/react-native';
|
|
4
4
|
import { michaelImageUrl } from './styles';
|
|
5
5
|
import { commonTestStyles as commonStyles } from '../Common/styles';
|
|
6
6
|
import { useTheme } from '@fluentui-react-native/theme-types';
|
|
@@ -19,38 +19,25 @@ export const CustomizeUsage: React.FunctionComponent = () => {
|
|
|
19
19
|
const [horizontalGap, setHorizontalGap] = React.useState<number>();
|
|
20
20
|
const [verticalGap, setVerticalGap] = React.useState<number>();
|
|
21
21
|
|
|
22
|
-
const tokens: Partial<IPersonaTokens> = {};
|
|
23
|
-
if (coinColor) {
|
|
24
|
-
tokens.coinBackgroundColor = coinColor;
|
|
25
|
-
}
|
|
26
|
-
if (textColor) {
|
|
27
|
-
tokens.color = textColor;
|
|
28
|
-
}
|
|
29
|
-
if (textSize) {
|
|
30
|
-
tokens.textFont = { fontSize: textSize };
|
|
31
|
-
}
|
|
32
|
-
if (secondarySize) {
|
|
33
|
-
tokens.secondaryFont = { fontSize: secondarySize };
|
|
34
|
-
}
|
|
35
|
-
if (tertiarySize) {
|
|
36
|
-
tokens.tertiaryFont = { fontSize: tertiarySize };
|
|
37
|
-
}
|
|
38
|
-
if (optionalSize) {
|
|
39
|
-
tokens.optionalFont = { fontSize: optionalSize };
|
|
40
|
-
}
|
|
41
|
-
if (horizontalGap !== undefined) {
|
|
42
|
-
tokens.horizontalGap = horizontalGap;
|
|
43
|
-
}
|
|
44
|
-
if (verticalGap !== undefined) {
|
|
45
|
-
tokens.verticalGap = verticalGap;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
22
|
const theme = useTheme();
|
|
49
23
|
const textBoxBorderStyle: TextStyle = {
|
|
50
24
|
borderColor: theme.colors.inputBorder,
|
|
51
25
|
};
|
|
52
26
|
|
|
53
|
-
const CustomizedPersona =
|
|
27
|
+
const CustomizedPersona = React.useMemo(() => {
|
|
28
|
+
const tokens = {
|
|
29
|
+
backgroundColor: coinColor,
|
|
30
|
+
color: textColor,
|
|
31
|
+
textFont: { fontSize: textSize },
|
|
32
|
+
secondaryFont: { fontSize: secondarySize },
|
|
33
|
+
tertiaryFont: { fontSize: tertiarySize },
|
|
34
|
+
optionalFont: { fontSize: optionalSize },
|
|
35
|
+
horizontalGap: horizontalGap,
|
|
36
|
+
verticalGap: verticalGap,
|
|
37
|
+
};
|
|
38
|
+
return Persona.customize({ tokens });
|
|
39
|
+
}, [coinColor, textColor, textSize, secondarySize, tertiarySize, optionalSize, horizontalGap, verticalGap]);
|
|
40
|
+
|
|
54
41
|
return (
|
|
55
42
|
<View style={commonStyles.root}>
|
|
56
43
|
{/* settings */}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { PersonaCoin
|
|
2
|
+
import { PersonaCoin } from '@fluentui/react-native';
|
|
3
3
|
import { Switch, View, Text, TextInput } from 'react-native';
|
|
4
4
|
import Slider from '@react-native-community/slider';
|
|
5
5
|
import { steveBallmerPhotoUrl, undefinedText } from './styles';
|
|
@@ -63,27 +63,17 @@ export const CustomizeUsage: React.FunctionComponent = () => {
|
|
|
63
63
|
const [ringColor, setRingColor] = React.useState<string>('green');
|
|
64
64
|
const [ringBackgroundColor, setRingBackgroundColor] = React.useState<string>(undefined);
|
|
65
65
|
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
if (coinSize) {
|
|
79
|
-
tokens.coinSize = coinSize;
|
|
80
|
-
}
|
|
81
|
-
if (iconSize) {
|
|
82
|
-
tokens.iconSize = iconSize;
|
|
83
|
-
}
|
|
84
|
-
if (iconStrokeWidth) {
|
|
85
|
-
tokens.iconStrokeWidth = iconStrokeWidth;
|
|
86
|
-
}
|
|
66
|
+
const CustomizedPersonaCoin = React.useMemo(() => {
|
|
67
|
+
const tokens = {
|
|
68
|
+
backgroundColor: coinColor,
|
|
69
|
+
color: textColor,
|
|
70
|
+
ring: { ringColor: 'red' },
|
|
71
|
+
coinSize: coinSize,
|
|
72
|
+
iconSize: iconSize,
|
|
73
|
+
iconStrokeWidth: iconStrokeWidth,
|
|
74
|
+
};
|
|
75
|
+
return PersonaCoin.customize({ tokens });
|
|
76
|
+
}, [coinColor, textColor, showRings, coinSize, iconSize, iconStrokeWidth]);
|
|
87
77
|
|
|
88
78
|
return (
|
|
89
79
|
<View style={{ flexDirection: 'column', padding: 10, backgroundColor: showColoredBackground ? 'gray' : 'transparent' }}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { PersonaCoin, IconAlignment
|
|
2
|
+
import { PersonaCoin, IconAlignment } from '@fluentui/react-native';
|
|
3
3
|
import { Switch, View, Text, TextInput, TextStyle } from 'react-native';
|
|
4
4
|
import { Slider } from '../Common/Slider';
|
|
5
5
|
import { steveBallmerPhotoUrl } from './styles';
|
|
@@ -29,36 +29,30 @@ export const CustomizeUsage: React.FunctionComponent = () => {
|
|
|
29
29
|
borderColor: theme.colors.inputBorder,
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
if (physicalSize) {
|
|
58
|
-
tokens.coinSize = physicalSize;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const CustomizedPersonaCoin = PersonaCoin.customize({ tokens });
|
|
32
|
+
const CustomizedPersonaCoin = React.useMemo(() => {
|
|
33
|
+
const tokens = {
|
|
34
|
+
backgroundColor: coinColor,
|
|
35
|
+
color: textColor,
|
|
36
|
+
horizontalIconAlignment: horizontalAlignment,
|
|
37
|
+
verticalIconAlignment: verticalAlignment,
|
|
38
|
+
iconSize: iconSize,
|
|
39
|
+
iconStrokeWidth: iconStrokeWidth,
|
|
40
|
+
iconStrokeColor: iconStrokeColor,
|
|
41
|
+
initialsSize: initialsSize,
|
|
42
|
+
coinSize: physicalSize,
|
|
43
|
+
};
|
|
44
|
+
return PersonaCoin.customize({ tokens });
|
|
45
|
+
}, [
|
|
46
|
+
coinColor,
|
|
47
|
+
textColor,
|
|
48
|
+
horizontalAlignment,
|
|
49
|
+
verticalAlignment,
|
|
50
|
+
iconSize,
|
|
51
|
+
iconStrokeWidth,
|
|
52
|
+
iconStrokeColor,
|
|
53
|
+
initialsSize,
|
|
54
|
+
physicalSize,
|
|
55
|
+
]);
|
|
62
56
|
|
|
63
57
|
return (
|
|
64
58
|
<View style={commonStyles.root}>
|
|
@@ -7,6 +7,49 @@ import { stackStyle } from '../Common/styles';
|
|
|
7
7
|
import { shimmerBorderRadiusTests, shimmerRectsAndRect, shimmerRectsAndCircle } from './ShimmerTestElementSets';
|
|
8
8
|
import { E2ETestingShimmer } from './ShimmerE2ETest';
|
|
9
9
|
|
|
10
|
+
const TestCompareCustomizeShimmer = Shimmer.customize({
|
|
11
|
+
shimmerWaveColor: 'blue',
|
|
12
|
+
shimmerColor: 'orange',
|
|
13
|
+
backgroundColor: 'red',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const CustomizeAndTokenPropsShimmers: React.FunctionComponent = () => {
|
|
17
|
+
return (
|
|
18
|
+
<Stack style={{ margin: 4 }}>
|
|
19
|
+
<TestCompareCustomizeShimmer
|
|
20
|
+
elements={shimmerRectsAndCircle()}
|
|
21
|
+
duration={2000}
|
|
22
|
+
delay={1000}
|
|
23
|
+
style={{ height: 100, width: '50%', borderWidth: 2, borderColor: 'black' }}
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
<Shimmer
|
|
27
|
+
elements={shimmerRectsAndCircle()}
|
|
28
|
+
duration={2000}
|
|
29
|
+
delay={1000}
|
|
30
|
+
style={{ height: 100, width: '50%', borderWidth: 2, borderColor: 'black' }}
|
|
31
|
+
shimmerWaveColor="blue"
|
|
32
|
+
shimmerColor="orange"
|
|
33
|
+
backgroundColor="red"
|
|
34
|
+
/>
|
|
35
|
+
</Stack>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const RoundedCornerClipCheckShimmer: React.FunctionComponent = () => {
|
|
40
|
+
return (
|
|
41
|
+
<Stack style={{ margin: 4 }}>
|
|
42
|
+
<Shimmer
|
|
43
|
+
elements={shimmerRectsAndCircle()}
|
|
44
|
+
duration={2000}
|
|
45
|
+
delay={1000}
|
|
46
|
+
style={{ height: 100, width: 150, borderRadius: 16, borderWidth: 2, borderColor: 'black' }}
|
|
47
|
+
backgroundColor="teal"
|
|
48
|
+
/>
|
|
49
|
+
</Stack>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
10
53
|
const RectShimmers: React.FunctionComponent<Record<string, never>> = () => {
|
|
11
54
|
return (
|
|
12
55
|
<Stack style={stackStyle}>
|
|
@@ -24,13 +67,10 @@ const RectCircleShimmers: React.FunctionComponent<Record<string, never>> = () =>
|
|
|
24
67
|
};
|
|
25
68
|
|
|
26
69
|
const CustomizedShimmer: React.FunctionComponent<Record<string, never>> = () => {
|
|
27
|
-
const PinkShimmer = Shimmer.customize({
|
|
28
|
-
shimmerWaveColor: 'pink',
|
|
29
|
-
});
|
|
30
|
-
|
|
31
70
|
return (
|
|
32
71
|
<Stack style={stackStyle}>
|
|
33
|
-
<
|
|
72
|
+
<CustomizeAndTokenPropsShimmers />
|
|
73
|
+
<RoundedCornerClipCheckShimmer />
|
|
34
74
|
</Stack>
|
|
35
75
|
);
|
|
36
76
|
};
|
|
@@ -44,11 +84,6 @@ const ShimmerBorderRadii: React.FunctionComponent<Record<string, never>> = () =>
|
|
|
44
84
|
};
|
|
45
85
|
|
|
46
86
|
const shimmerSections: TestSection[] = [
|
|
47
|
-
{
|
|
48
|
-
name: 'Customized Shimmer',
|
|
49
|
-
testID: SHIMMER_TESTPAGE,
|
|
50
|
-
component: CustomizedShimmer,
|
|
51
|
-
},
|
|
52
87
|
{
|
|
53
88
|
name: 'Shimmer Rects',
|
|
54
89
|
testID: SHIMMER_TESTPAGE,
|
|
@@ -64,6 +99,11 @@ const shimmerSections: TestSection[] = [
|
|
|
64
99
|
testID: SHIMMER_TESTPAGE,
|
|
65
100
|
component: ShimmerBorderRadii,
|
|
66
101
|
},
|
|
102
|
+
{
|
|
103
|
+
name: 'Customized Shimmer',
|
|
104
|
+
testID: SHIMMER_TESTPAGE,
|
|
105
|
+
component: CustomizedShimmer,
|
|
106
|
+
},
|
|
67
107
|
{
|
|
68
108
|
name: 'Shimmer for E2E Testing',
|
|
69
109
|
component: E2ETestingShimmer,
|
|
@@ -4,15 +4,49 @@ import { Stack } from '@fluentui-react-native/stack';
|
|
|
4
4
|
import { Text } from '@fluentui/react-native';
|
|
5
5
|
import { stackStyle } from '../Common/styles';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
const RedCaptionBold = Text.customize({ tokens: { variant: 'captionStandard', fontWeight: '700', color: '#ff0000' } });
|
|
8
|
+
const OrangeSecondaryBold = Text.customize({ tokens: { variant: 'secondaryStandard', fontWeight: '700', color: '#ff9900' } });
|
|
9
|
+
const YellowBodyBold = Text.customize({ tokens: { variant: 'bodyStandard', fontWeight: '700', color: '#f3ce00' } });
|
|
10
|
+
const GreenSubheaderBold = Text.customize({ tokens: { variant: 'subheaderStandard', fontWeight: '700', color: '#02c440' } });
|
|
11
|
+
const BlueHeaderBold = Text.customize({ tokens: { variant: 'headerStandard', fontWeight: '700', color: '#0229c4' } });
|
|
12
|
+
const IndigoHeroBold = Text.customize({ tokens: { variant: 'heroStandard', fontWeight: '700', color: '#4b0082' } });
|
|
13
|
+
const PurpleHeroLargeBold = Text.customize({ tokens: { variant: 'heroLargeStandard', fontWeight: '700', color: '#8402c4' } });
|
|
14
|
+
|
|
15
|
+
// Android has a limited fontFamily support and unknown fonts fallback to sans-serif (Roboto).
|
|
16
|
+
// Custom fonts (ttf, otf) are supported but need to be linked using 'react-native link'
|
|
17
|
+
// The supported font families can be found as <aliases> at https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/fonts.xml
|
|
18
|
+
const CustomFontNames = {
|
|
19
|
+
...Platform.select({
|
|
20
|
+
android: {
|
|
21
|
+
CourierNew: 'courier new',
|
|
22
|
+
Georgia: 'georgia',
|
|
23
|
+
TimesNewRoman: 'times new roman',
|
|
24
|
+
},
|
|
25
|
+
default: {
|
|
26
|
+
CourierNew: 'Courier New',
|
|
27
|
+
Georgia: 'Georgia',
|
|
28
|
+
TimesNewRoman: 'Times New Roman',
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const ArialBlack = Text.customize({ tokens: { variant: 'heroLargeStandard', fontFamily: 'Arial Black' } });
|
|
34
|
+
const BrushScriptMT = Text.customize({ tokens: { variant: 'heroStandard', fontFamily: 'Brush Script MT' } });
|
|
35
|
+
const CourierNew = Text.customize({ tokens: { variant: 'headerStandard', fontFamily: CustomFontNames.CourierNew } });
|
|
36
|
+
const Georgia = Text.customize({ tokens: { variant: 'subheaderStandard', fontFamily: CustomFontNames.Georgia } });
|
|
37
|
+
const TimesNewRoman = Text.customize({ tokens: { variant: 'secondaryStandard', fontFamily: CustomFontNames.TimesNewRoman } });
|
|
38
|
+
const Wingdings = Text.customize({ tokens: { variant: 'captionStandard', fontFamily: 'Wingdings' } });
|
|
39
|
+
|
|
40
|
+
// Examples of supported Android fonts.
|
|
41
|
+
const Casual = Text.customize({ tokens: { variant: 'heroStandard', fontFamily: 'casual' } });
|
|
42
|
+
const Cursive = Text.customize({ tokens: { variant: 'heroStandard', fontFamily: 'cursive' } });
|
|
43
|
+
// Examples of iOS fonts.
|
|
44
|
+
const Papyrus = Text.customize({ tokens: { variant: 'heroLargeStandard', fontFamily: 'Papyrus' } });
|
|
45
|
+
const Helvetica = Text.customize({ tokens: { variant: 'heroLargeStandard', fontFamily: 'Helvetica' } });
|
|
46
|
+
// Fonts supported on Android and iOS
|
|
47
|
+
const Arial = Text.customize({ tokens: { variant: 'heroLargeStandard', fontFamily: 'arial' } });
|
|
15
48
|
|
|
49
|
+
export const CustomizeUsage: React.FunctionComponent = () => {
|
|
16
50
|
const CustomUsageStack = () => {
|
|
17
51
|
return (
|
|
18
52
|
<Stack style={stackStyle} gap={5}>
|
|
@@ -27,40 +61,6 @@ export const CustomizeUsage: React.FunctionComponent = () => {
|
|
|
27
61
|
);
|
|
28
62
|
};
|
|
29
63
|
|
|
30
|
-
// Android has a limited fontFamily support and unknown fonts fallback to sans-serif (Roboto).
|
|
31
|
-
// Custom fonts (ttf, otf) are supported but need to be linked using 'react-native link'
|
|
32
|
-
// The supported font families can be found as <aliases> at https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/fonts.xml
|
|
33
|
-
const CustomFontNames = {
|
|
34
|
-
...Platform.select({
|
|
35
|
-
android: {
|
|
36
|
-
CourierNew: 'courier new',
|
|
37
|
-
Georgia: 'georgia',
|
|
38
|
-
TimesNewRoman: 'times new roman',
|
|
39
|
-
},
|
|
40
|
-
default: {
|
|
41
|
-
CourierNew: 'Courier New',
|
|
42
|
-
Georgia: 'Georgia',
|
|
43
|
-
TimesNewRoman: 'Times New Roman',
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const ArialBlack = Text.customize({ tokens: { variant: 'heroLargeStandard', fontFamily: 'Arial Black' } });
|
|
49
|
-
const BrushScriptMT = Text.customize({ tokens: { variant: 'heroStandard', fontFamily: 'Brush Script MT' } });
|
|
50
|
-
const CourierNew = Text.customize({ tokens: { variant: 'headerStandard', fontFamily: CustomFontNames.CourierNew } });
|
|
51
|
-
const Georgia = Text.customize({ tokens: { variant: 'subheaderStandard', fontFamily: CustomFontNames.Georgia } });
|
|
52
|
-
const TimesNewRoman = Text.customize({ tokens: { variant: 'secondaryStandard', fontFamily: CustomFontNames.TimesNewRoman } });
|
|
53
|
-
const Wingdings = Text.customize({ tokens: { variant: 'captionStandard', fontFamily: 'Wingdings' } });
|
|
54
|
-
|
|
55
|
-
// Examples of supported Android fonts.
|
|
56
|
-
const Casual = Text.customize({ tokens: { variant: 'heroStandard', fontFamily: 'casual' } });
|
|
57
|
-
const Cursive = Text.customize({ tokens: { variant: 'heroStandard', fontFamily: 'cursive' } });
|
|
58
|
-
// Examples of iOS fonts.
|
|
59
|
-
const Papyrus = Text.customize({ tokens: { variant: 'heroLargeStandard', fontFamily: 'Papyrus' } });
|
|
60
|
-
const Helvetica = Text.customize({ tokens: { variant: 'heroLargeStandard', fontFamily: 'Helvetica' } });
|
|
61
|
-
// Fonts supported on Android and iOS
|
|
62
|
-
const Arial = Text.customize({ tokens: { variant: 'heroLargeStandard', fontFamily: 'arial' } });
|
|
63
|
-
|
|
64
64
|
const CustomFontStack = () => {
|
|
65
65
|
return (
|
|
66
66
|
<Stack style={stackStyle} gap={5}>
|
|
@@ -4,15 +4,49 @@ import { Stack } from '@fluentui-react-native/stack';
|
|
|
4
4
|
import { Text } from '@fluentui-react-native/experimental-text';
|
|
5
5
|
import { stackStyle } from '../Common/styles';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
const RedCaptionBold = Text.customize({ variant: 'captionStandard', fontWeight: '700', color: '#ff0000' });
|
|
8
|
+
const OrangeSecondaryBold = Text.customize({ variant: 'secondaryStandard', fontWeight: '700', color: '#ff9900' });
|
|
9
|
+
const YellowBodyBold = Text.customize({ variant: 'bodyStandard', fontWeight: '700', color: '#f3ce00' });
|
|
10
|
+
const GreenSubheaderBold = Text.customize({ variant: 'subheaderStandard', fontWeight: '700', color: '#02c440' });
|
|
11
|
+
const BlueHeaderBold = Text.customize({ variant: 'headerStandard', fontWeight: '700', color: '#0229c4' });
|
|
12
|
+
const IndigoHeroBold = Text.customize({ variant: 'heroStandard', fontWeight: '700', color: '#4b0082' });
|
|
13
|
+
const PurpleHeroLargeBold = Text.customize({ variant: 'heroLargeStandard', fontWeight: '700', color: '#8402c4' });
|
|
14
|
+
|
|
15
|
+
// Android has a limited fontFamily support and unknown fonts fallback to sans-serif (Roboto).
|
|
16
|
+
// Custom fonts (ttf, otf) are supported but need to be linked using 'react-native link'
|
|
17
|
+
// The supported font families can be found as <aliases> at https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/fonts.xml
|
|
18
|
+
const CustomFontNames = {
|
|
19
|
+
...Platform.select({
|
|
20
|
+
android: {
|
|
21
|
+
CourierNew: 'courier new',
|
|
22
|
+
Georgia: 'georgia',
|
|
23
|
+
TimesNewRoman: 'times new roman',
|
|
24
|
+
},
|
|
25
|
+
default: {
|
|
26
|
+
CourierNew: 'Courier New',
|
|
27
|
+
Georgia: 'Georgia',
|
|
28
|
+
TimesNewRoman: 'Times New Roman',
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const ArialBlack = Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Arial Black' });
|
|
34
|
+
const BrushScriptMT = Text.customize({ variant: 'heroStandard', fontFamily: 'Brush Script MT' });
|
|
35
|
+
const CourierNew = Text.customize({ variant: 'headerStandard', fontFamily: CustomFontNames.CourierNew });
|
|
36
|
+
const Georgia = Text.customize({ variant: 'subheaderStandard', fontFamily: CustomFontNames.Georgia });
|
|
37
|
+
const TimesNewRoman = Text.customize({ variant: 'secondaryStandard', fontFamily: CustomFontNames.TimesNewRoman });
|
|
38
|
+
const Wingdings = Text.customize({ variant: 'captionStandard', fontFamily: 'Wingdings' });
|
|
39
|
+
|
|
40
|
+
// Examples of supported Android fonts.
|
|
41
|
+
const Casual = Text.customize({ variant: 'heroStandard', fontFamily: 'casual' });
|
|
42
|
+
const Cursive = Text.customize({ variant: 'heroStandard', fontFamily: 'cursive' });
|
|
43
|
+
// Examples of iOS fonts.
|
|
44
|
+
const Papyrus = Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Papyrus' });
|
|
45
|
+
const Helvetica = Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Helvetica' });
|
|
46
|
+
// Fonts supported on Android and iOS
|
|
47
|
+
const Arial = Text.customize({ variant: 'heroLargeStandard', fontFamily: 'arial' });
|
|
15
48
|
|
|
49
|
+
export const CustomizeUsage: React.FunctionComponent = () => {
|
|
16
50
|
const CustomUsageStack = () => {
|
|
17
51
|
return (
|
|
18
52
|
<Stack style={stackStyle} gap={5}>
|
|
@@ -27,40 +61,6 @@ export const CustomizeUsage: React.FunctionComponent = () => {
|
|
|
27
61
|
);
|
|
28
62
|
};
|
|
29
63
|
|
|
30
|
-
// Android has a limited fontFamily support and unknown fonts fallback to sans-serif (Roboto).
|
|
31
|
-
// Custom fonts (ttf, otf) are supported but need to be linked using 'react-native link'
|
|
32
|
-
// The supported font families can be found as <aliases> at https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/fonts.xml
|
|
33
|
-
const CustomFontNames = {
|
|
34
|
-
...Platform.select({
|
|
35
|
-
android: {
|
|
36
|
-
CourierNew: 'courier new',
|
|
37
|
-
Georgia: 'georgia',
|
|
38
|
-
TimesNewRoman: 'times new roman',
|
|
39
|
-
},
|
|
40
|
-
default: {
|
|
41
|
-
CourierNew: 'Courier New',
|
|
42
|
-
Georgia: 'Georgia',
|
|
43
|
-
TimesNewRoman: 'Times New Roman',
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const ArialBlack = Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Arial Black' });
|
|
49
|
-
const BrushScriptMT = Text.customize({ variant: 'heroStandard', fontFamily: 'Brush Script MT' });
|
|
50
|
-
const CourierNew = Text.customize({ variant: 'headerStandard', fontFamily: CustomFontNames.CourierNew });
|
|
51
|
-
const Georgia = Text.customize({ variant: 'subheaderStandard', fontFamily: CustomFontNames.Georgia });
|
|
52
|
-
const TimesNewRoman = Text.customize({ variant: 'secondaryStandard', fontFamily: CustomFontNames.TimesNewRoman });
|
|
53
|
-
const Wingdings = Text.customize({ variant: 'captionStandard', fontFamily: 'Wingdings' });
|
|
54
|
-
|
|
55
|
-
// Examples of supported Android fonts.
|
|
56
|
-
const Casual = Text.customize({ variant: 'heroStandard', fontFamily: 'casual' });
|
|
57
|
-
const Cursive = Text.customize({ variant: 'heroStandard', fontFamily: 'cursive' });
|
|
58
|
-
// Examples of iOS fonts.
|
|
59
|
-
const Papyrus = Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Papyrus' });
|
|
60
|
-
const Helvetica = Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Helvetica' });
|
|
61
|
-
// Fonts supported on Android and iOS
|
|
62
|
-
const Arial = Text.customize({ variant: 'heroLargeStandard', fontFamily: 'arial' });
|
|
63
|
-
|
|
64
64
|
const CustomFontStack = () => {
|
|
65
65
|
return (
|
|
66
66
|
<Stack style={stackStyle} gap={5}>
|