@fluentui-react-native/tester 0.95.4 → 0.95.6
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 +85 -1
- package/CHANGELOG.md +27 -2
- package/ios/Podfile.lock +101 -102
- package/lib/TestComponents/Shadow/ShadowDepthTestSection.d.ts.map +1 -1
- package/lib/TestComponents/Shadow/ShadowDepthTestSection.js +11 -16
- package/lib/TestComponents/Shadow/ShadowDepthTestSection.js.map +1 -1
- package/lib/TestComponents/Shadow/ShadowTest.d.ts.map +1 -1
- package/lib/TestComponents/Shadow/ShadowTest.js +6 -0
- package/lib/TestComponents/Shadow/ShadowTest.js.map +1 -1
- package/lib/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.d.ts +3 -0
- package/lib/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.d.ts.map +1 -0
- package/lib/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.js +61 -0
- package/lib/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.js.map +1 -0
- package/lib-commonjs/TestComponents/Shadow/ShadowDepthTestSection.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Shadow/ShadowDepthTestSection.js +11 -16
- package/lib-commonjs/TestComponents/Shadow/ShadowDepthTestSection.js.map +1 -1
- package/lib-commonjs/TestComponents/Shadow/ShadowTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Shadow/ShadowTest.js +6 -0
- package/lib-commonjs/TestComponents/Shadow/ShadowTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.d.ts +3 -0
- package/lib-commonjs/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.d.ts.map +1 -0
- package/lib-commonjs/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.js +65 -0
- package/lib-commonjs/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.js.map +1 -0
- package/macos/Podfile.lock +280 -281
- package/package.json +11 -10
- package/src/TestComponents/Shadow/ShadowDepthTestSection.tsx +13 -19
- package/src/TestComponents/Shadow/ShadowTest.tsx +6 -0
- package/src/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.tsx +89 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
|
-
"version": "0.95.
|
|
3
|
+
"version": "0.95.6",
|
|
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>",
|
|
@@ -40,26 +40,27 @@
|
|
|
40
40
|
"@fluentui-react-native/apple-theme": ">=0.14.1 <1.0.0",
|
|
41
41
|
"@fluentui-react-native/avatar": "^1.2.9",
|
|
42
42
|
"@fluentui-react-native/badge": ">=0.1.32 <1.0.0",
|
|
43
|
-
"@fluentui-react-native/button": ">=0.24.
|
|
43
|
+
"@fluentui-react-native/button": ">=0.24.25 <1.0.0",
|
|
44
44
|
"@fluentui-react-native/default-theme": ">=0.15.1 <1.0.0",
|
|
45
45
|
"@fluentui-react-native/dropdown": ">=0.4.0 <1.0.0",
|
|
46
46
|
"@fluentui-react-native/experimental-activity-indicator": ">=0.6.3 <1.0.0",
|
|
47
|
-
"@fluentui-react-native/experimental-avatar": ">=0.16.
|
|
48
|
-
"@fluentui-react-native/experimental-button": "0.16.
|
|
47
|
+
"@fluentui-react-native/experimental-avatar": ">=0.16.5 <1.0.0",
|
|
48
|
+
"@fluentui-react-native/experimental-button": "0.16.25",
|
|
49
49
|
"@fluentui-react-native/experimental-checkbox": "0.12.16",
|
|
50
50
|
"@fluentui-react-native/experimental-expander": "0.4.3",
|
|
51
|
-
"@fluentui-react-native/experimental-menu-button": ">=0.4.
|
|
52
|
-
"@fluentui-react-native/experimental-native-date-picker": ">=0.7.
|
|
51
|
+
"@fluentui-react-native/experimental-menu-button": ">=0.4.29 <1.0.0",
|
|
52
|
+
"@fluentui-react-native/experimental-native-date-picker": ">=0.7.1 <1.0.0",
|
|
53
53
|
"@fluentui-react-native/experimental-radio-group": "^0.3.3",
|
|
54
|
-
"@fluentui-react-native/experimental-shadow": "0.2.
|
|
54
|
+
"@fluentui-react-native/experimental-shadow": "0.2.19",
|
|
55
55
|
"@fluentui-react-native/experimental-shimmer": "0.7.3",
|
|
56
56
|
"@fluentui-react-native/experimental-tabs": "0.5.14",
|
|
57
57
|
"@fluentui-react-native/experimental-text": ">=0.11.5 <1.0.0",
|
|
58
58
|
"@fluentui-react-native/framework": ">=0.8.3 <1.0.0",
|
|
59
59
|
"@fluentui-react-native/icon": "0.13.8",
|
|
60
60
|
"@fluentui-react-native/interactive-hooks": ">=0.18.5 <1.0.0",
|
|
61
|
-
"@fluentui-react-native/menu": "^1.0.
|
|
62
|
-
"@fluentui-react-native/
|
|
61
|
+
"@fluentui-react-native/menu": "^1.0.35",
|
|
62
|
+
"@fluentui-react-native/merge-props": ">=0.5.0 <1.0.0",
|
|
63
|
+
"@fluentui-react-native/notification": "0.17.8",
|
|
63
64
|
"@fluentui-react-native/stack": ">=0.7.7 <1.0.0",
|
|
64
65
|
"@fluentui-react-native/switch": "^0.6.7",
|
|
65
66
|
"@fluentui-react-native/text": ">=0.14.4 <1.0.0",
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
"@fluentui-react-native/themed-stylesheet": "^1.4.0",
|
|
69
70
|
"@fluentui-react-native/theming-utils": ">=0.15.1 <1.0.0",
|
|
70
71
|
"@fluentui-react-native/win32-theme": ">=0.21.1 <1.0.0",
|
|
71
|
-
"@fluentui/react-native": ">=0.32.
|
|
72
|
+
"@fluentui/react-native": ">=0.32.19 <1.0.0",
|
|
72
73
|
"@react-native-community/slider": "^4.2.0",
|
|
73
74
|
"@react-native-menu/menu": "^0.1.2",
|
|
74
75
|
"@react-native-picker/picker": "^2.2.1",
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { commonTestStyles } from '../Common/styles';
|
|
3
2
|
import { View } from 'react-native';
|
|
4
3
|
import { Text } from '@fluentui/react-native';
|
|
5
4
|
import { Shadow, getShadowTokenStyleSet } from '@fluentui-react-native/experimental-shadow';
|
|
6
|
-
import { ShadowToken, useTheme } from '@fluentui-react-native/theme-types';
|
|
5
|
+
import { ShadowToken, Theme, useTheme } from '@fluentui-react-native/theme-types';
|
|
6
|
+
import { mergeStyles, useFluentTheme } from '@fluentui-react-native/framework';
|
|
7
7
|
import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
|
|
8
|
-
import { useFluentTheme } from '@fluentui-react-native/framework';
|
|
9
8
|
|
|
10
|
-
const getThemedStyles = themedStyleSheet(() => {
|
|
9
|
+
const getThemedStyles = themedStyleSheet((t: Theme) => {
|
|
11
10
|
return {
|
|
12
|
-
|
|
11
|
+
shadowTestBox: {
|
|
13
12
|
maxWidth: 732,
|
|
14
13
|
minHeight: 64,
|
|
15
14
|
borderRadius: 8,
|
|
16
|
-
},
|
|
17
|
-
padding: {
|
|
18
15
|
padding: 20,
|
|
19
|
-
},
|
|
20
|
-
vmargin: {
|
|
21
16
|
marginVertical: 16,
|
|
22
17
|
marginHorizontal: 32,
|
|
23
18
|
},
|
|
19
|
+
defaultBackground: {
|
|
20
|
+
backgroundColor: t.colors.background,
|
|
21
|
+
},
|
|
22
|
+
brandedBackground: {
|
|
23
|
+
backgroundColor: t.colors.brandedBackground,
|
|
24
|
+
},
|
|
24
25
|
};
|
|
25
26
|
});
|
|
26
27
|
|
|
@@ -33,20 +34,13 @@ interface ShadowTestBoxProps {
|
|
|
33
34
|
const ShadowTestBox: React.FunctionComponent<ShadowTestBoxProps> = (props: ShadowTestBoxProps) => {
|
|
34
35
|
const theme = useTheme();
|
|
35
36
|
const themedStyles = getThemedStyles(theme);
|
|
36
|
-
|
|
37
|
+
|
|
38
|
+
const backgroundColor = props.isBrand ? themedStyles.brandedBackground : themedStyles.defaultBackground;
|
|
37
39
|
const textColor = props.isBrand ? theme.colors.primaryButtonText : theme.colors.bodyText;
|
|
38
40
|
|
|
39
41
|
return (
|
|
40
42
|
<Shadow shadowToken={props.shadowToken}>
|
|
41
|
-
<View
|
|
42
|
-
style={[
|
|
43
|
-
commonTestStyles.view,
|
|
44
|
-
themedStyles.effectBox,
|
|
45
|
-
themedStyles.vmargin,
|
|
46
|
-
themedStyles.padding,
|
|
47
|
-
{ backgroundColor: backgroundColor },
|
|
48
|
-
]}
|
|
49
|
-
>
|
|
43
|
+
<View style={mergeStyles(themedStyles.shadowTestBox, backgroundColor)}>
|
|
50
44
|
<Text variant="bodySemibold" color={textColor}>
|
|
51
45
|
{props.shadowDepthText}
|
|
52
46
|
</Text>
|
|
@@ -3,6 +3,7 @@ import { Test, TestSection, PlatformStatus } from '../Test';
|
|
|
3
3
|
import { SHADOW_TESTPAGE } from './consts';
|
|
4
4
|
import { ShadowDepthTestSection } from './ShadowDepthTestSection';
|
|
5
5
|
import { ShadowButtonTestSection } from './ShadowButtonTestSection';
|
|
6
|
+
import { ShadowWithDifferentPropsTestSection } from './ShadowWithDifferentPropsTestSection';
|
|
6
7
|
|
|
7
8
|
const shadowSections: TestSection[] = [
|
|
8
9
|
{
|
|
@@ -15,6 +16,11 @@ const shadowSections: TestSection[] = [
|
|
|
15
16
|
testID: SHADOW_TESTPAGE,
|
|
16
17
|
component: ShadowButtonTestSection,
|
|
17
18
|
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Shadows with Different Props Test',
|
|
21
|
+
testID: SHADOW_TESTPAGE,
|
|
22
|
+
component: ShadowWithDifferentPropsTestSection,
|
|
23
|
+
},
|
|
18
24
|
];
|
|
19
25
|
|
|
20
26
|
export const ShadowTest: React.FunctionComponent = () => {
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text } from '@fluentui/react-native';
|
|
3
|
+
import { Shadow } from '@fluentui-react-native/experimental-shadow';
|
|
4
|
+
import { Theme, useFluentTheme } from '@fluentui-react-native/framework';
|
|
5
|
+
import { View } from 'react-native';
|
|
6
|
+
import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
|
|
7
|
+
import { mergeStyles } from '@fluentui-react-native/merge-props';
|
|
8
|
+
|
|
9
|
+
const getThemedStyles = themedStyleSheet((t: Theme) => {
|
|
10
|
+
const defaultShadowTestBoxPropsWithoutSpacing = {
|
|
11
|
+
maxWidth: 732,
|
|
12
|
+
minHeight: 64,
|
|
13
|
+
backgroundColor: t.colors.background,
|
|
14
|
+
};
|
|
15
|
+
const marginTestProps = {
|
|
16
|
+
marginVertical: 16,
|
|
17
|
+
marginHorizontal: 32,
|
|
18
|
+
};
|
|
19
|
+
const paddingTestProps = {
|
|
20
|
+
padding: 20,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
headerTextPadding: {
|
|
25
|
+
padding: 16,
|
|
26
|
+
},
|
|
27
|
+
defaultShadowTestBoxPropsWithoutSpacing,
|
|
28
|
+
defaultShadowTestBoxProps: {
|
|
29
|
+
...defaultShadowTestBoxPropsWithoutSpacing,
|
|
30
|
+
...marginTestProps,
|
|
31
|
+
...paddingTestProps,
|
|
32
|
+
},
|
|
33
|
+
marginTestProps,
|
|
34
|
+
paddingTestProps,
|
|
35
|
+
borderRadiusTestProps: {
|
|
36
|
+
borderRadius: 8,
|
|
37
|
+
},
|
|
38
|
+
borderWidthTestProps: {
|
|
39
|
+
borderWidth: 2,
|
|
40
|
+
borderColor: 'black',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export const ShadowWithDifferentPropsTestSection: React.FunctionComponent = () => {
|
|
46
|
+
const theme = useFluentTheme();
|
|
47
|
+
const themedStyles = getThemedStyles(theme);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<View>
|
|
51
|
+
<Text style={themedStyles.headerTextPadding}>
|
|
52
|
+
The following tests have a Shadow16 set on a child view that has some specific props.
|
|
53
|
+
</Text>
|
|
54
|
+
<View>
|
|
55
|
+
<Shadow shadowToken={theme.shadows.shadow16}>
|
|
56
|
+
<View style={themedStyles.defaultShadowTestBoxProps}>
|
|
57
|
+
<Text variant="bodySemibold">padding: 20, marginVertical: 16, marginHorizontal: 32</Text>
|
|
58
|
+
</View>
|
|
59
|
+
</Shadow>
|
|
60
|
+
<Shadow shadowToken={theme.shadows.shadow16}>
|
|
61
|
+
<View style={mergeStyles(themedStyles.defaultShadowTestBoxPropsWithoutSpacing, themedStyles.paddingTestProps)}>
|
|
62
|
+
<Text variant="bodySemibold">padding only</Text>
|
|
63
|
+
</View>
|
|
64
|
+
</Shadow>
|
|
65
|
+
<Shadow shadowToken={theme.shadows.shadow16}>
|
|
66
|
+
<View style={mergeStyles(themedStyles.defaultShadowTestBoxPropsWithoutSpacing, themedStyles.marginTestProps)}>
|
|
67
|
+
<Text variant="bodySemibold">margins only</Text>
|
|
68
|
+
</View>
|
|
69
|
+
</Shadow>
|
|
70
|
+
<Shadow shadowToken={theme.shadows.shadow16}>
|
|
71
|
+
<View style={mergeStyles(themedStyles.defaultShadowTestBoxProps, themedStyles.borderRadiusTestProps)}>
|
|
72
|
+
<Text variant="bodySemibold">borderRadius: 8</Text>
|
|
73
|
+
</View>
|
|
74
|
+
</Shadow>
|
|
75
|
+
<Shadow shadowToken={theme.shadows.shadow16}>
|
|
76
|
+
<View
|
|
77
|
+
style={mergeStyles(
|
|
78
|
+
themedStyles.defaultShadowTestBoxProps,
|
|
79
|
+
themedStyles.borderRadiusTestProps,
|
|
80
|
+
themedStyles.borderWidthTestProps,
|
|
81
|
+
)}
|
|
82
|
+
>
|
|
83
|
+
<Text variant="bodySemibold">borderWidth: 2</Text>
|
|
84
|
+
</View>
|
|
85
|
+
</Shadow>
|
|
86
|
+
</View>
|
|
87
|
+
</View>
|
|
88
|
+
);
|
|
89
|
+
};
|