@fluentui-react-native/tester 0.71.1 → 0.71.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 CHANGED
@@ -2,7 +2,28 @@
2
2
  "name": "@fluentui-react-native/tester",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 08 Jul 2022 17:53:15 GMT",
5
+ "date": "Fri, 08 Jul 2022 18:26:38 GMT",
6
+ "tag": "@fluentui-react-native/tester_v0.71.2",
7
+ "version": "0.71.2",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "78454019+lyzhan7@users.noreply.github.com",
12
+ "package": "@fluentui-react-native/tester",
13
+ "commit": "ef2a18b53bbc59178c30d1250ff89e64bb2ca5be",
14
+ "comment": "Change shadowDepth type from '2' to 'shadow2'"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui-react-native/tester",
19
+ "comment": "Bump @fluentui-react-native/experimental-shadow to v0.2.1",
20
+ "commit": "ef2a18b53bbc59178c30d1250ff89e64bb2ca5be"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Fri, 08 Jul 2022 17:53:30 GMT",
6
27
  "tag": "@fluentui-react-native/tester_v0.71.1",
7
28
  "version": "0.71.1",
8
29
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui-react-native/tester
2
2
 
3
- This log was last generated on Fri, 08 Jul 2022 17:53:15 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 08 Jul 2022 18:26:38 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.71.2
8
+
9
+ Fri, 08 Jul 2022 18:26:38 GMT
10
+
11
+ ### Patches
12
+
13
+ - Change shadowDepth type from '2' to 'shadow2' (78454019+lyzhan7@users.noreply.github.com)
14
+ - Bump @fluentui-react-native/experimental-shadow to v0.2.1
15
+
7
16
  ## 0.71.1
8
17
 
9
- Fri, 08 Jul 2022 17:53:15 GMT
18
+ Fri, 08 Jul 2022 17:53:30 GMT
10
19
 
11
20
  ### Patches
12
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"ShadowDepthTestSection.d.ts","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyC/B,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAW1C,CAAC"}
1
+ {"version":3,"file":"ShadowDepthTestSection.d.ts","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqD/B,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAmB1C,CAAC"}
@@ -2,22 +2,23 @@ import * as React from 'react';
2
2
  import { commonTestStyles } from '../Common/styles';
3
3
  import { View } from 'react-native';
4
4
  import { Text } from '@fluentui/react-native';
5
- import { Shadow } from '@fluentui-react-native/experimental-shadow';
5
+ import { Shadow, getShadowTokenStyleSet } from '@fluentui-react-native/experimental-shadow';
6
6
  import { useTheme } from '@fluentui-react-native/theme-types';
7
7
  import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
8
- var getThemedStyles = themedStyleSheet(function (t) {
8
+ import { useFluentTheme } from '@fluentui-react-native/framework';
9
+ var getThemedStyles = themedStyleSheet(function () {
9
10
  return {
10
11
  effectBox: {
11
12
  width: 366,
12
13
  minHeight: 64,
13
- backgroundColor: t.colors.background,
14
14
  },
15
15
  padding: {
16
16
  padding: 20,
17
17
  paddingHorizontal: 24,
18
18
  },
19
19
  vmargin: {
20
- marginVertical: 32,
20
+ marginVertical: 16,
21
+ marginHorizontal: 32,
21
22
  },
22
23
  };
23
24
  });
@@ -25,17 +26,37 @@ var ShadowTestBox = function (props) {
25
26
  var theme = useTheme();
26
27
  var themedStyles = getThemedStyles(theme);
27
28
  return (React.createElement(Shadow, { depth: props.depth },
28
- React.createElement(Text, { style: [commonTestStyles.view, themedStyles.effectBox, themedStyles.vmargin, themedStyles.padding], variant: "bodySemibold" },
29
- "Shadow Depth: ",
30
- props.depth)));
29
+ React.createElement(View, { style: [
30
+ commonTestStyles.view,
31
+ themedStyles.effectBox,
32
+ themedStyles.vmargin,
33
+ themedStyles.padding,
34
+ { backgroundColor: props.backgroundColor },
35
+ ] },
36
+ React.createElement(Text, { variant: "bodySemibold" }, props.depth),
37
+ React.createElement(Text, null, getShadowDescription(props.depth, theme)))));
31
38
  };
32
39
  export var ShadowDepthTestSection = function () {
33
- return (React.createElement(View, { style: { padding: 20 } },
34
- React.createElement(ShadowTestBox, { depth: "2" }),
35
- React.createElement(ShadowTestBox, { depth: "4" }),
36
- React.createElement(ShadowTestBox, { depth: "8" }),
37
- React.createElement(ShadowTestBox, { depth: "16" }),
38
- React.createElement(ShadowTestBox, { depth: "28" }),
39
- React.createElement(ShadowTestBox, { depth: "64" })));
40
+ var theme = useFluentTheme();
41
+ return (React.createElement(View, null,
42
+ React.createElement(ShadowTestBox, { depth: "shadow2", backgroundColor: theme.colors.background }),
43
+ React.createElement(ShadowTestBox, { depth: "shadow4", backgroundColor: theme.colors.background }),
44
+ React.createElement(ShadowTestBox, { depth: "shadow8", backgroundColor: theme.colors.background }),
45
+ React.createElement(ShadowTestBox, { depth: "shadow16", backgroundColor: theme.colors.background }),
46
+ React.createElement(ShadowTestBox, { depth: "shadow28", backgroundColor: theme.colors.background }),
47
+ React.createElement(ShadowTestBox, { depth: "shadow64", backgroundColor: theme.colors.background }),
48
+ React.createElement(ShadowTestBox, { depth: "shadow2brand", backgroundColor: theme.colors.brandBackground }),
49
+ React.createElement(ShadowTestBox, { depth: "shadow4brand", backgroundColor: theme.colors.brandBackground }),
50
+ React.createElement(ShadowTestBox, { depth: "shadow8brand", backgroundColor: theme.colors.brandBackground }),
51
+ React.createElement(ShadowTestBox, { depth: "shadow16brand", backgroundColor: theme.colors.brandBackground }),
52
+ React.createElement(ShadowTestBox, { depth: "shadow28brand", backgroundColor: theme.colors.brandBackground }),
53
+ React.createElement(ShadowTestBox, { depth: "shadow64brand", backgroundColor: theme.colors.brandBackground })));
40
54
  };
55
+ function getShadowDescription(depth, t) {
56
+ var shadowStyle = getShadowTokenStyleSet(t, depth);
57
+ return ('\nAmbient: ' +
58
+ JSON.stringify(shadowStyle.ambient, undefined, ' ').split('\n').join('').replace(/['"]+/g, '') +
59
+ '\n\nKey: ' +
60
+ JSON.stringify(shadowStyle.key, undefined, ' ').split('\n').join('').replace(/['"]+/g, ''));
61
+ }
41
62
  //# sourceMappingURL=ShadowDepthTestSection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShadowDepthTestSection.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAe,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAS,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAE5E,IAAM,eAAe,GAAG,gBAAgB,CAAC,UAAC,CAAQ;IAChD,OAAO;QACL,SAAS,EAAE;YACT,KAAK,EAAE,GAAG;YACV,SAAS,EAAE,EAAE;YACb,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU;SACrC;QACD,OAAO,EAAE;YACP,OAAO,EAAE,EAAE;YACX,iBAAiB,EAAE,EAAE;SACtB;QACD,OAAO,EAAE;YACP,cAAc,EAAE,EAAE;SACnB;KACF,CAAC;AACJ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AE,CAAQ;IACxD,IAAM,WAAW,GAAG,sBAAsB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAErD,OAAO,CACL,aAAa;QACb,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;QAC9F,WAAW;QACX,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC3F,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ShadowDepthTestSection.d.ts","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyC/B,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAW1C,CAAC"}
1
+ {"version":3,"file":"ShadowDepthTestSection.d.ts","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqD/B,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAmB1C,CAAC"}
@@ -9,19 +9,20 @@ var react_native_2 = require("@fluentui/react-native");
9
9
  var experimental_shadow_1 = require("@fluentui-react-native/experimental-shadow");
10
10
  var theme_types_1 = require("@fluentui-react-native/theme-types");
11
11
  var themed_stylesheet_1 = require("@fluentui-react-native/themed-stylesheet");
12
- var getThemedStyles = (0, themed_stylesheet_1.themedStyleSheet)(function (t) {
12
+ var framework_1 = require("@fluentui-react-native/framework");
13
+ var getThemedStyles = (0, themed_stylesheet_1.themedStyleSheet)(function () {
13
14
  return {
14
15
  effectBox: {
15
16
  width: 366,
16
17
  minHeight: 64,
17
- backgroundColor: t.colors.background,
18
18
  },
19
19
  padding: {
20
20
  padding: 20,
21
21
  paddingHorizontal: 24,
22
22
  },
23
23
  vmargin: {
24
- marginVertical: 32,
24
+ marginVertical: 16,
25
+ marginHorizontal: 32,
25
26
  },
26
27
  };
27
28
  });
@@ -29,18 +30,38 @@ var ShadowTestBox = function (props) {
29
30
  var theme = (0, theme_types_1.useTheme)();
30
31
  var themedStyles = getThemedStyles(theme);
31
32
  return (React.createElement(experimental_shadow_1.Shadow, { depth: props.depth },
32
- React.createElement(react_native_2.Text, { style: [styles_1.commonTestStyles.view, themedStyles.effectBox, themedStyles.vmargin, themedStyles.padding], variant: "bodySemibold" },
33
- "Shadow Depth: ",
34
- props.depth)));
33
+ React.createElement(react_native_1.View, { style: [
34
+ styles_1.commonTestStyles.view,
35
+ themedStyles.effectBox,
36
+ themedStyles.vmargin,
37
+ themedStyles.padding,
38
+ { backgroundColor: props.backgroundColor },
39
+ ] },
40
+ React.createElement(react_native_2.Text, { variant: "bodySemibold" }, props.depth),
41
+ React.createElement(react_native_2.Text, null, getShadowDescription(props.depth, theme)))));
35
42
  };
36
43
  var ShadowDepthTestSection = function () {
37
- return (React.createElement(react_native_1.View, { style: { padding: 20 } },
38
- React.createElement(ShadowTestBox, { depth: "2" }),
39
- React.createElement(ShadowTestBox, { depth: "4" }),
40
- React.createElement(ShadowTestBox, { depth: "8" }),
41
- React.createElement(ShadowTestBox, { depth: "16" }),
42
- React.createElement(ShadowTestBox, { depth: "28" }),
43
- React.createElement(ShadowTestBox, { depth: "64" })));
44
+ var theme = (0, framework_1.useFluentTheme)();
45
+ return (React.createElement(react_native_1.View, null,
46
+ React.createElement(ShadowTestBox, { depth: "shadow2", backgroundColor: theme.colors.background }),
47
+ React.createElement(ShadowTestBox, { depth: "shadow4", backgroundColor: theme.colors.background }),
48
+ React.createElement(ShadowTestBox, { depth: "shadow8", backgroundColor: theme.colors.background }),
49
+ React.createElement(ShadowTestBox, { depth: "shadow16", backgroundColor: theme.colors.background }),
50
+ React.createElement(ShadowTestBox, { depth: "shadow28", backgroundColor: theme.colors.background }),
51
+ React.createElement(ShadowTestBox, { depth: "shadow64", backgroundColor: theme.colors.background }),
52
+ React.createElement(ShadowTestBox, { depth: "shadow2brand", backgroundColor: theme.colors.brandBackground }),
53
+ React.createElement(ShadowTestBox, { depth: "shadow4brand", backgroundColor: theme.colors.brandBackground }),
54
+ React.createElement(ShadowTestBox, { depth: "shadow8brand", backgroundColor: theme.colors.brandBackground }),
55
+ React.createElement(ShadowTestBox, { depth: "shadow16brand", backgroundColor: theme.colors.brandBackground }),
56
+ React.createElement(ShadowTestBox, { depth: "shadow28brand", backgroundColor: theme.colors.brandBackground }),
57
+ React.createElement(ShadowTestBox, { depth: "shadow64brand", backgroundColor: theme.colors.brandBackground })));
44
58
  };
45
59
  exports.ShadowDepthTestSection = ShadowDepthTestSection;
60
+ function getShadowDescription(depth, t) {
61
+ var shadowStyle = (0, experimental_shadow_1.getShadowTokenStyleSet)(t, depth);
62
+ return ('\nAmbient: ' +
63
+ JSON.stringify(shadowStyle.ambient, undefined, ' ').split('\n').join('').replace(/['"]+/g, '') +
64
+ '\n\nKey: ' +
65
+ JSON.stringify(shadowStyle.key, undefined, ' ').split('\n').join('').replace(/['"]+/g, ''));
66
+ }
46
67
  //# sourceMappingURL=ShadowDepthTestSection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShadowDepthTestSection.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,2CAAoD;AACpD,6CAAoC;AACpC,uDAA8C;AAC9C,kFAAiF;AACjF,kEAAqE;AACrE,8EAA4E;AAE5E,IAAM,eAAe,GAAG,IAAA,oCAAgB,EAAC,UAAC,CAAQ;IAChD,OAAO;Q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,oBAAoB,CAAC,KAAkB,EAAE,CAAQ;IACxD,IAAM,WAAW,GAAG,IAAA,4CAAsB,EAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAErD,OAAO,CACL,aAAa;QACb,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;QAC9F,WAAW;QACX,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC3F,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/tester",
3
- "version": "0.71.1",
3
+ "version": "0.71.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>",
@@ -39,7 +39,7 @@
39
39
  "@fluentui-react-native/experimental-native-date-picker": ">=0.5.0 <1.0.0",
40
40
  "@fluentui-react-native/experimental-expander": "0.3.34",
41
41
  "@fluentui-react-native/experimental-menu-button": ">=0.3.52 <1.0.0",
42
- "@fluentui-react-native/experimental-shadow": "0.2.0",
42
+ "@fluentui-react-native/experimental-shadow": "0.2.1",
43
43
  "@fluentui-react-native/experimental-shimmer": "0.6.34",
44
44
  "@fluentui-react-native/experimental-tabs": "0.4.53",
45
45
  "@fluentui-react-native/experimental-text": ">=0.9.1 <1.0.0",
@@ -1,53 +1,84 @@
1
1
  import * as React from 'react';
2
2
  import { commonTestStyles } from '../Common/styles';
3
- import { View } from 'react-native';
3
+ import { ColorValue, View } from 'react-native';
4
4
  import { Text } from '@fluentui/react-native';
5
- import { Shadow, ShadowDepth } from '@fluentui-react-native/experimental-shadow';
5
+ import { Shadow, ShadowDepth, getShadowTokenStyleSet } from '@fluentui-react-native/experimental-shadow';
6
6
  import { Theme, useTheme } from '@fluentui-react-native/theme-types';
7
7
  import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
8
+ import { useFluentTheme } from '@fluentui-react-native/framework';
8
9
 
9
- const getThemedStyles = themedStyleSheet((t: Theme) => {
10
+ const getThemedStyles = themedStyleSheet(() => {
10
11
  return {
11
12
  effectBox: {
12
13
  width: 366,
13
14
  minHeight: 64,
14
- backgroundColor: t.colors.background,
15
15
  },
16
16
  padding: {
17
17
  padding: 20,
18
18
  paddingHorizontal: 24,
19
19
  },
20
20
  vmargin: {
21
- marginVertical: 32,
21
+ marginVertical: 16,
22
+ marginHorizontal: 32,
22
23
  },
23
24
  };
24
25
  });
25
26
 
26
27
  interface ShadowTestBoxProps {
27
28
  depth: ShadowDepth;
29
+ backgroundColor: ColorValue;
28
30
  }
29
31
 
30
32
  const ShadowTestBox: React.FunctionComponent<ShadowTestBoxProps> = (props: ShadowTestBoxProps) => {
31
33
  const theme = useTheme();
32
34
  const themedStyles = getThemedStyles(theme);
35
+
33
36
  return (
34
37
  <Shadow depth={props.depth}>
35
- <Text style={[commonTestStyles.view, themedStyles.effectBox, themedStyles.vmargin, themedStyles.padding]} variant="bodySemibold">
36
- Shadow Depth: {props.depth}
37
- </Text>
38
+ <View
39
+ style={[
40
+ commonTestStyles.view,
41
+ themedStyles.effectBox,
42
+ themedStyles.vmargin,
43
+ themedStyles.padding,
44
+ { backgroundColor: props.backgroundColor },
45
+ ]}
46
+ >
47
+ <Text variant="bodySemibold">{props.depth}</Text>
48
+ <Text>{getShadowDescription(props.depth, theme)}</Text>
49
+ </View>
38
50
  </Shadow>
39
51
  );
40
52
  };
41
53
 
42
54
  export const ShadowDepthTestSection: React.FunctionComponent = () => {
55
+ const theme = useFluentTheme();
56
+
43
57
  return (
44
- <View style={{ padding: 20 }}>
45
- <ShadowTestBox depth="2" />
46
- <ShadowTestBox depth="4" />
47
- <ShadowTestBox depth="8" />
48
- <ShadowTestBox depth="16" />
49
- <ShadowTestBox depth="28" />
50
- <ShadowTestBox depth="64" />
58
+ <View>
59
+ <ShadowTestBox depth="shadow2" backgroundColor={theme.colors.background} />
60
+ <ShadowTestBox depth="shadow4" backgroundColor={theme.colors.background} />
61
+ <ShadowTestBox depth="shadow8" backgroundColor={theme.colors.background} />
62
+ <ShadowTestBox depth="shadow16" backgroundColor={theme.colors.background} />
63
+ <ShadowTestBox depth="shadow28" backgroundColor={theme.colors.background} />
64
+ <ShadowTestBox depth="shadow64" backgroundColor={theme.colors.background} />
65
+ <ShadowTestBox depth="shadow2brand" backgroundColor={theme.colors.brandBackground} />
66
+ <ShadowTestBox depth="shadow4brand" backgroundColor={theme.colors.brandBackground} />
67
+ <ShadowTestBox depth="shadow8brand" backgroundColor={theme.colors.brandBackground} />
68
+ <ShadowTestBox depth="shadow16brand" backgroundColor={theme.colors.brandBackground} />
69
+ <ShadowTestBox depth="shadow28brand" backgroundColor={theme.colors.brandBackground} />
70
+ <ShadowTestBox depth="shadow64brand" backgroundColor={theme.colors.brandBackground} />
51
71
  </View>
52
72
  );
53
73
  };
74
+
75
+ function getShadowDescription(depth: ShadowDepth, t: Theme): string {
76
+ const shadowStyle = getShadowTokenStyleSet(t, depth);
77
+
78
+ return (
79
+ '\nAmbient: ' +
80
+ JSON.stringify(shadowStyle.ambient, undefined, ' ').split('\n').join('').replace(/['"]+/g, '') +
81
+ '\n\nKey: ' +
82
+ JSON.stringify(shadowStyle.key, undefined, ' ').split('\n').join('').replace(/['"]+/g, '')
83
+ );
84
+ }