@fluentui-react-native/tester 0.51.2 → 0.51.3
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 +64 -1
- package/CHANGELOG.md +18 -2
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.d.ts +3 -0
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.d.ts.map +1 -0
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.js +32 -0
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.js.map +1 -0
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonTest.js +5 -0
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.d.ts +3 -0
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.d.ts.map +1 -0
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.js +37 -0
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.js.map +1 -0
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonTest.js +5 -0
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonTest.js.map +1 -1
- package/package.json +9 -9
- package/src/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.tsx +43 -0
- package/src/FluentTester/TestComponents/ButtonExperimental/ButtonTest.tsx +5 -0
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,70 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Wed, 26 Jan 2022
|
|
5
|
+
"date": "Wed, 26 Jan 2022 20:29:31 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/tester_v0.51.3",
|
|
7
|
+
"version": "0.51.3",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "ruaraki@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/tester",
|
|
13
|
+
"commit": "1f6a66699e8a06bfd55a613ee9019ba8ca27d0b4",
|
|
14
|
+
"comment": "Let's add some tests"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/tester",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/badge to v0.0.6",
|
|
20
|
+
"commit": "1f6a66699e8a06bfd55a613ee9019ba8ca27d0b4"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui-react-native/tester",
|
|
25
|
+
"comment": "Bump @fluentui-react-native/button to v0.21.18",
|
|
26
|
+
"commit": "1f6a66699e8a06bfd55a613ee9019ba8ca27d0b4"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui-react-native/tester",
|
|
31
|
+
"comment": "Bump @fluentui-react-native/experimental-button to v0.12.0",
|
|
32
|
+
"commit": "1f6a66699e8a06bfd55a613ee9019ba8ca27d0b4"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui-react-native/tester",
|
|
37
|
+
"comment": "Bump @fluentui-react-native/experimental-checkbox to v0.6.4",
|
|
38
|
+
"commit": "1f6a66699e8a06bfd55a613ee9019ba8ca27d0b4"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui-react-native/tester",
|
|
43
|
+
"comment": "Bump @fluentui-react-native/experimental-menu-button to v0.3.0",
|
|
44
|
+
"commit": "1f6a66699e8a06bfd55a613ee9019ba8ca27d0b4"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui-react-native/tester",
|
|
49
|
+
"comment": "Bump @fluentui-react-native/experimental-tabs to v0.4.17",
|
|
50
|
+
"commit": "1f6a66699e8a06bfd55a613ee9019ba8ca27d0b4"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "beachball",
|
|
54
|
+
"package": "@fluentui-react-native/tester",
|
|
55
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.12.1",
|
|
56
|
+
"commit": "1f6a66699e8a06bfd55a613ee9019ba8ca27d0b4"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "beachball",
|
|
60
|
+
"package": "@fluentui-react-native/tester",
|
|
61
|
+
"comment": "Bump @fluentui/react-native to v0.27.22",
|
|
62
|
+
"commit": "1f6a66699e8a06bfd55a613ee9019ba8ca27d0b4"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"date": "Wed, 26 Jan 2022 17:02:27 GMT",
|
|
6
69
|
"tag": "@fluentui-react-native/tester_v0.51.2",
|
|
7
70
|
"version": "0.51.2",
|
|
8
71
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/tester
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed, 26 Jan 2022
|
|
3
|
+
This log was last generated on Wed, 26 Jan 2022 20:29:31 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.51.3
|
|
8
|
+
|
|
9
|
+
Wed, 26 Jan 2022 20:29:31 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Let's add some tests (ruaraki@microsoft.com)
|
|
14
|
+
- Bump @fluentui-react-native/badge to v0.0.6
|
|
15
|
+
- Bump @fluentui-react-native/button to v0.21.18
|
|
16
|
+
- Bump @fluentui-react-native/experimental-button to v0.12.0
|
|
17
|
+
- Bump @fluentui-react-native/experimental-checkbox to v0.6.4
|
|
18
|
+
- Bump @fluentui-react-native/experimental-menu-button to v0.3.0
|
|
19
|
+
- Bump @fluentui-react-native/experimental-tabs to v0.4.17
|
|
20
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.12.1
|
|
21
|
+
- Bump @fluentui/react-native to v0.27.22
|
|
22
|
+
|
|
7
23
|
## 0.51.2
|
|
8
24
|
|
|
9
|
-
Wed, 26 Jan 2022 17:
|
|
25
|
+
Wed, 26 Jan 2022 17:02:27 GMT
|
|
10
26
|
|
|
11
27
|
### Patches
|
|
12
28
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonHOCTestSection.d.ts","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAmCjC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Button } from '@fluentui-react-native/experimental-button';
|
|
2
|
+
import { Text } from '@fluentui-react-native/experimental-text';
|
|
3
|
+
import { Icon } from '@fluentui-react-native/icon';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { View } from 'react-native';
|
|
6
|
+
import { commonTestStyles, stackStyle } from '../Common/styles';
|
|
7
|
+
export var ButtonHOCTest = function () {
|
|
8
|
+
var buttonRef = React.useRef(null);
|
|
9
|
+
var CustomText = Text.customize({ fontSize: 'header', color: 'hotpink' });
|
|
10
|
+
var CustomButton = Button.customize({ backgroundColor: 'pink' });
|
|
11
|
+
var ComposedButton = Button.compose({
|
|
12
|
+
slots: {
|
|
13
|
+
root: View,
|
|
14
|
+
icon: Icon,
|
|
15
|
+
content: CustomText,
|
|
16
|
+
},
|
|
17
|
+
slotProps: {
|
|
18
|
+
content: {
|
|
19
|
+
style: { marginTop: -1, marginBottom: 1, marginStart: 0, marginEnd: -2 },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
return (React.createElement(View, { style: stackStyle },
|
|
24
|
+
React.createElement(CustomButton, { style: commonTestStyles.vmargin, componentRef: buttonRef }, "Customized Button with ref"),
|
|
25
|
+
React.createElement(Button, { style: commonTestStyles.vmargin, onClick: function () {
|
|
26
|
+
if (buttonRef.current) {
|
|
27
|
+
buttonRef.current.focus();
|
|
28
|
+
}
|
|
29
|
+
} }, "Press to focus Customized Button"),
|
|
30
|
+
React.createElement(ComposedButton, { style: commonTestStyles.vmargin }, "Composed button using customized Text for text slot")));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=ButtonHOCTestSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonHOCTestSection.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEhE,MAAM,CAAC,IAAM,aAAa,GAA4B;IACpD,IAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5E,IAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC,CAAC;IACnE,IAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC;QACpC,KAAK,EAAE;YACL,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,UAAU;SACpB;QACD,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE;aACzE;SACF;KACF,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,UAAU;QACrB,oBAAC,YAAY,IAAC,KAAK,EAAE,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,iCAEvD;QACf,oBAAC,MAAM,IACL,KAAK,EAAE,gBAAgB,CAAC,OAAO,EAC/B,OAAO,EAAE;gBACP,IAAI,SAAS,CAAC,OAAO,EAAE;oBACrB,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;iBAC3B;YACH,CAAC,uCAGM;QACT,oBAAC,cAAc,IAAC,KAAK,EAAE,gBAAgB,CAAC,OAAO,0DAAsE,CAChH,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTest.d.ts","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonTest.d.ts","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2C/B,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAa1C,CAAC"}
|
|
@@ -7,6 +7,7 @@ import { ButtonIconTest } from './ButtonIconTestSection';
|
|
|
7
7
|
import { ButtonSizeTest } from './ButtonSizeTestSection';
|
|
8
8
|
import { ButtonShapeTest } from './ButtonShapeTestSection';
|
|
9
9
|
import { E2EButtonExperimentalTest } from './E2EButtonTest';
|
|
10
|
+
import { ButtonHOCTest } from './ButtonHOCTestSection';
|
|
10
11
|
var buttonSections = [
|
|
11
12
|
{
|
|
12
13
|
name: 'Button Variants',
|
|
@@ -29,6 +30,10 @@ var buttonSections = [
|
|
|
29
30
|
name: 'Sizes',
|
|
30
31
|
component: ButtonSizeTest,
|
|
31
32
|
},
|
|
33
|
+
{
|
|
34
|
+
name: 'Customize, Compose, and Ref',
|
|
35
|
+
component: ButtonHOCTest,
|
|
36
|
+
},
|
|
32
37
|
{
|
|
33
38
|
name: 'E2E Button Testing',
|
|
34
39
|
component: E2EButtonExperimentalTest,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTest.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,IAAI,EAA+B,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonTest.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,IAAI,EAA+B,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,IAAM,cAAc,GAAkB;IACpC;QACE,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,6BAA6B;QACrC,SAAS,EAAE,iBAAiB;KAC7B;IACD;QACE,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,eAAe;KAC3B;IACD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,cAAc;KAC1B;IACD;QACE,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,gBAAgB;KAC5B;IACD;QACE,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,cAAc;KAC1B;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,SAAS,EAAE,aAAa;KACzB;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,SAAS,EAAE,yBAAyB;KACrC;CACF,CAAC;AAEF,MAAM,CAAC,IAAM,sBAAsB,GAA4B;IAC7D,IAAM,MAAM,GAAmB;QAC7B,WAAW,EAAE,cAAc;QAC3B,SAAS,EAAE,cAAc;QACzB,SAAS,EAAE,cAAc;QACzB,WAAW,EAAE,cAAc;QAC3B,aAAa,EAAE,SAAS;KACzB,CAAC;IAEF,IAAM,WAAW,GACf,qyBAAqyB,CAAC;IAExyB,OAAO,oBAAC,IAAI,IAAC,IAAI,EAAC,0BAA0B,EAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;AACtH,CAAC,CAAC"}
|
package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonHOCTestSection.d.ts","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAmCjC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ButtonHOCTest = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var experimental_button_1 = require("@fluentui-react-native/experimental-button");
|
|
6
|
+
var experimental_text_1 = require("@fluentui-react-native/experimental-text");
|
|
7
|
+
var icon_1 = require("@fluentui-react-native/icon");
|
|
8
|
+
var React = (0, tslib_1.__importStar)(require("react"));
|
|
9
|
+
var react_native_1 = require("react-native");
|
|
10
|
+
var styles_1 = require("../Common/styles");
|
|
11
|
+
var ButtonHOCTest = function () {
|
|
12
|
+
var buttonRef = React.useRef(null);
|
|
13
|
+
var CustomText = experimental_text_1.Text.customize({ fontSize: 'header', color: 'hotpink' });
|
|
14
|
+
var CustomButton = experimental_button_1.Button.customize({ backgroundColor: 'pink' });
|
|
15
|
+
var ComposedButton = experimental_button_1.Button.compose({
|
|
16
|
+
slots: {
|
|
17
|
+
root: react_native_1.View,
|
|
18
|
+
icon: icon_1.Icon,
|
|
19
|
+
content: CustomText,
|
|
20
|
+
},
|
|
21
|
+
slotProps: {
|
|
22
|
+
content: {
|
|
23
|
+
style: { marginTop: -1, marginBottom: 1, marginStart: 0, marginEnd: -2 },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
return (React.createElement(react_native_1.View, { style: styles_1.stackStyle },
|
|
28
|
+
React.createElement(CustomButton, { style: styles_1.commonTestStyles.vmargin, componentRef: buttonRef }, "Customized Button with ref"),
|
|
29
|
+
React.createElement(experimental_button_1.Button, { style: styles_1.commonTestStyles.vmargin, onClick: function () {
|
|
30
|
+
if (buttonRef.current) {
|
|
31
|
+
buttonRef.current.focus();
|
|
32
|
+
}
|
|
33
|
+
} }, "Press to focus Customized Button"),
|
|
34
|
+
React.createElement(ComposedButton, { style: styles_1.commonTestStyles.vmargin }, "Composed button using customized Text for text slot")));
|
|
35
|
+
};
|
|
36
|
+
exports.ButtonHOCTest = ButtonHOCTest;
|
|
37
|
+
//# sourceMappingURL=ButtonHOCTestSection.js.map
|
package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonHOCTestSection.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonHOCTestSection.tsx"],"names":[],"mappings":";;;;AAAA,kFAAoE;AACpE,8EAAgE;AAChE,oDAAmD;AACnD,wDAA+B;AAC/B,6CAAoC;AACpC,2CAAgE;AAEzD,IAAM,aAAa,GAA4B;IACpD,IAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,UAAU,GAAG,wBAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5E,IAAM,YAAY,GAAG,4BAAM,CAAC,SAAS,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC,CAAC;IACnE,IAAM,cAAc,GAAG,4BAAM,CAAC,OAAO,CAAC;QACpC,KAAK,EAAE;YACL,IAAI,EAAE,mBAAI;YACV,IAAI,EAAE,WAAI;YACV,OAAO,EAAE,UAAU;SACpB;QACD,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE;aACzE;SACF;KACF,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,mBAAI,IAAC,KAAK,EAAE,mBAAU;QACrB,oBAAC,YAAY,IAAC,KAAK,EAAE,yBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,iCAEvD;QACf,oBAAC,4BAAM,IACL,KAAK,EAAE,yBAAgB,CAAC,OAAO,EAC/B,OAAO,EAAE;gBACP,IAAI,SAAS,CAAC,OAAO,EAAE;oBACrB,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;iBAC3B;YACH,CAAC,uCAGM;QACT,oBAAC,cAAc,IAAC,KAAK,EAAE,yBAAgB,CAAC,OAAO,0DAAsE,CAChH,CACR,CAAC;AACJ,CAAC,CAAC;AAnCW,QAAA,aAAa,iBAmCxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTest.d.ts","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonTest.d.ts","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2C/B,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAa1C,CAAC"}
|
|
@@ -11,6 +11,7 @@ var ButtonIconTestSection_1 = require("./ButtonIconTestSection");
|
|
|
11
11
|
var ButtonSizeTestSection_1 = require("./ButtonSizeTestSection");
|
|
12
12
|
var ButtonShapeTestSection_1 = require("./ButtonShapeTestSection");
|
|
13
13
|
var E2EButtonTest_1 = require("./E2EButtonTest");
|
|
14
|
+
var ButtonHOCTestSection_1 = require("./ButtonHOCTestSection");
|
|
14
15
|
var buttonSections = [
|
|
15
16
|
{
|
|
16
17
|
name: 'Button Variants',
|
|
@@ -33,6 +34,10 @@ var buttonSections = [
|
|
|
33
34
|
name: 'Sizes',
|
|
34
35
|
component: ButtonSizeTestSection_1.ButtonSizeTest,
|
|
35
36
|
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Customize, Compose, and Ref',
|
|
39
|
+
component: ButtonHOCTestSection_1.ButtonHOCTest,
|
|
40
|
+
},
|
|
36
41
|
{
|
|
37
42
|
name: 'E2E Button Testing',
|
|
38
43
|
component: E2EButtonTest_1.E2EButtonExperimentalTest,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTest.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonTest.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,uEAA+D;AAC/D,qEAA6D;AAC7D,mCAAyD;AACzD,gCAA4D;AAC5D,iEAAyD;AACzD,iEAAyD;AACzD,mEAA2D;AAC3D,iDAA4D;
|
|
1
|
+
{"version":3,"file":"ButtonTest.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/ButtonExperimental/ButtonTest.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,uEAA+D;AAC/D,qEAA6D;AAC7D,mCAAyD;AACzD,gCAA4D;AAC5D,iEAAyD;AACzD,iEAAyD;AACzD,mEAA2D;AAC3D,iDAA4D;AAC5D,+DAAuD;AAEvD,IAAM,cAAc,GAAkB;IACpC;QACE,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,sCAA6B;QACrC,SAAS,EAAE,4CAAiB;KAC7B;IACD;QACE,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,wCAAe;KAC3B;IACD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,sCAAc;KAC1B;IACD;QACE,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,0CAAgB;KAC5B;IACD;QACE,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,sCAAc;KAC1B;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,SAAS,EAAE,oCAAa;KACzB;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,SAAS,EAAE,yCAAyB;KACrC;CACF,CAAC;AAEK,IAAM,sBAAsB,GAA4B;IAC7D,IAAM,MAAM,GAAmB;QAC7B,WAAW,EAAE,cAAc;QAC3B,SAAS,EAAE,cAAc;QACzB,SAAS,EAAE,cAAc;QACzB,WAAW,EAAE,cAAc;QAC3B,aAAa,EAAE,SAAS;KACzB,CAAC;IAEF,IAAM,WAAW,GACf,qyBAAqyB,CAAC;IAExyB,OAAO,oBAAC,WAAI,IAAC,IAAI,EAAC,0BAA0B,EAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;AACtH,CAAC,CAAC;AAbW,QAAA,sBAAsB,0BAajC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
|
-
"version": "0.51.
|
|
3
|
+
"version": "0.51.3",
|
|
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>",
|
|
@@ -29,29 +29,29 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@fluentui-react-native/android-theme": ">=0.5.4 <1.0.0",
|
|
31
31
|
"@fluentui-react-native/apple-theme": ">=0.9.8 <1.0.0",
|
|
32
|
-
"@fluentui-react-native/badge": ">=0.0.
|
|
33
|
-
"@fluentui-react-native/button": ">=0.21.
|
|
32
|
+
"@fluentui-react-native/badge": ">=0.0.6 <1.0.0",
|
|
33
|
+
"@fluentui-react-native/button": ">=0.21.18 <1.0.0",
|
|
34
34
|
"@fluentui-react-native/default-theme": ">=0.9.8 <1.0.0",
|
|
35
35
|
"@fluentui-react-native/experimental-activity-indicator": ">=0.5.10 <1.0.0",
|
|
36
36
|
"@fluentui-react-native/experimental-avatar": ">=0.14.2 <1.0.0",
|
|
37
|
-
"@fluentui-react-native/experimental-button": "0.
|
|
38
|
-
"@fluentui-react-native/experimental-checkbox": "0.6.
|
|
37
|
+
"@fluentui-react-native/experimental-button": "0.12.0",
|
|
38
|
+
"@fluentui-react-native/experimental-checkbox": "0.6.4",
|
|
39
39
|
"@fluentui-react-native/experimental-native-date-picker": ">=0.4.1 <1.0.0",
|
|
40
40
|
"@fluentui-react-native/experimental-expander": "0.3.11",
|
|
41
|
-
"@fluentui-react-native/experimental-menu-button": ">=0.
|
|
41
|
+
"@fluentui-react-native/experimental-menu-button": ">=0.3.0 <1.0.0",
|
|
42
42
|
"@fluentui-react-native/experimental-shimmer": "0.6.13",
|
|
43
|
-
"@fluentui-react-native/experimental-tabs": "0.4.
|
|
43
|
+
"@fluentui-react-native/experimental-tabs": "0.4.17",
|
|
44
44
|
"@fluentui-react-native/experimental-text": ">=0.7.11 <1.0.0",
|
|
45
45
|
"@fluentui-react-native/framework": ">=0.7.11 <1.0.0",
|
|
46
46
|
"@fluentui-react-native/icon": "0.11.5",
|
|
47
|
-
"@fluentui-react-native/interactive-hooks": ">=0.12.
|
|
47
|
+
"@fluentui-react-native/interactive-hooks": ">=0.12.1 <1.0.0",
|
|
48
48
|
"@fluentui-react-native/stack": ">=0.6.11 <1.0.0",
|
|
49
49
|
"@fluentui-react-native/theme": ">=0.6.4 <1.0.0",
|
|
50
50
|
"@fluentui-react-native/theme-types": ">=0.13.3 <1.0.0",
|
|
51
51
|
"@fluentui-react-native/themed-stylesheet": "^1.3.2",
|
|
52
52
|
"@fluentui-react-native/theming-utils": ">=0.8.8 <1.0.0",
|
|
53
53
|
"@fluentui-react-native/win32-theme": ">=0.14.9 <1.0.0",
|
|
54
|
-
"@fluentui/react-native": ">=0.27.
|
|
54
|
+
"@fluentui/react-native": ">=0.27.22 <1.0.0",
|
|
55
55
|
"@react-native-community/slider": "^4.1.12",
|
|
56
56
|
"@react-native-menu/menu": "^0.1.2",
|
|
57
57
|
"@react-native-picker/picker": "^1.16.7",
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Button } from '@fluentui-react-native/experimental-button';
|
|
2
|
+
import { Text } from '@fluentui-react-native/experimental-text';
|
|
3
|
+
import { Icon } from '@fluentui-react-native/icon';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { View } from 'react-native';
|
|
6
|
+
import { commonTestStyles, stackStyle } from '../Common/styles';
|
|
7
|
+
|
|
8
|
+
export const ButtonHOCTest: React.FunctionComponent = () => {
|
|
9
|
+
const buttonRef = React.useRef(null);
|
|
10
|
+
const CustomText = Text.customize({ fontSize: 'header', color: 'hotpink' });
|
|
11
|
+
const CustomButton = Button.customize({ backgroundColor: 'pink' });
|
|
12
|
+
const ComposedButton = Button.compose({
|
|
13
|
+
slots: {
|
|
14
|
+
root: View,
|
|
15
|
+
icon: Icon,
|
|
16
|
+
content: CustomText,
|
|
17
|
+
},
|
|
18
|
+
slotProps: {
|
|
19
|
+
content: {
|
|
20
|
+
style: { marginTop: -1, marginBottom: 1, marginStart: 0, marginEnd: -2 },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<View style={stackStyle}>
|
|
27
|
+
<CustomButton style={commonTestStyles.vmargin} componentRef={buttonRef}>
|
|
28
|
+
Customized Button with ref
|
|
29
|
+
</CustomButton>
|
|
30
|
+
<Button
|
|
31
|
+
style={commonTestStyles.vmargin}
|
|
32
|
+
onClick={() => {
|
|
33
|
+
if (buttonRef.current) {
|
|
34
|
+
buttonRef.current.focus();
|
|
35
|
+
}
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
38
|
+
Press to focus Customized Button
|
|
39
|
+
</Button>
|
|
40
|
+
<ComposedButton style={commonTestStyles.vmargin}>Composed button using customized Text for text slot</ComposedButton>
|
|
41
|
+
</View>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -7,6 +7,7 @@ import { ButtonIconTest } from './ButtonIconTestSection';
|
|
|
7
7
|
import { ButtonSizeTest } from './ButtonSizeTestSection';
|
|
8
8
|
import { ButtonShapeTest } from './ButtonShapeTestSection';
|
|
9
9
|
import { E2EButtonExperimentalTest } from './E2EButtonTest';
|
|
10
|
+
import { ButtonHOCTest } from './ButtonHOCTestSection';
|
|
10
11
|
|
|
11
12
|
const buttonSections: TestSection[] = [
|
|
12
13
|
{
|
|
@@ -30,6 +31,10 @@ const buttonSections: TestSection[] = [
|
|
|
30
31
|
name: 'Sizes',
|
|
31
32
|
component: ButtonSizeTest,
|
|
32
33
|
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Customize, Compose, and Ref',
|
|
36
|
+
component: ButtonHOCTest,
|
|
37
|
+
},
|
|
33
38
|
{
|
|
34
39
|
name: 'E2E Button Testing',
|
|
35
40
|
component: E2EButtonExperimentalTest,
|