@fluentui-react-native/tester 0.87.0 → 0.90.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 +138 -1
- package/CHANGELOG.md +44 -2
- package/lib/TestComponents/Avatar/AvatarTest.d.ts.map +1 -1
- package/lib/TestComponents/Avatar/AvatarTest.js +2 -1
- package/lib/TestComponents/Avatar/AvatarTest.js.map +1 -1
- package/lib/TestComponents/Avatar/CustomizedAvatar.d.ts.map +1 -1
- package/lib/TestComponents/Avatar/CustomizedAvatar.js +7 -2
- package/lib/TestComponents/Avatar/CustomizedAvatar.js.map +1 -1
- package/lib/TestComponents/Badge/BadgeTest.d.ts.map +1 -1
- package/lib/TestComponents/Badge/BadgeTest.js +2 -1
- package/lib/TestComponents/Badge/BadgeTest.js.map +1 -1
- package/lib/TestComponents/Badge/BasicBadgeTest.d.ts.map +1 -1
- package/lib/TestComponents/Badge/BasicBadgeTest.js +12 -11
- package/lib/TestComponents/Badge/BasicBadgeTest.js.map +1 -1
- package/lib/TestComponents/Badge/CounterBadgeTest.js +3 -3
- package/lib/TestComponents/Badge/CounterBadgeTest.js.map +1 -1
- package/lib/TestComponents/Badge/E2EBadgeTest.js +1 -1
- package/lib/TestComponents/Badge/E2EBadgeTest.js.map +1 -1
- package/lib/TestComponents/Badge/PresenceBadgeTest.d.ts.map +1 -1
- package/lib/TestComponents/Badge/PresenceBadgeTest.js +25 -12
- package/lib/TestComponents/Badge/PresenceBadgeTest.js.map +1 -1
- package/lib/TestComponents/Button/ButtonTest.d.ts.map +1 -1
- package/lib/TestComponents/Button/ButtonTest.js +2 -1
- package/lib/TestComponents/Button/ButtonTest.js.map +1 -1
- package/lib/TestComponents/Checkbox/CheckboxTest.d.ts.map +1 -1
- package/lib/TestComponents/Checkbox/CheckboxTest.js +2 -1
- package/lib/TestComponents/Checkbox/CheckboxTest.js.map +1 -1
- package/lib/TestComponents/Menu/MenuTest.d.ts.map +1 -1
- package/lib/TestComponents/Menu/MenuTest.js +2 -1
- package/lib/TestComponents/Menu/MenuTest.js.map +1 -1
- package/lib/TestComponents/Notification/NotificationTest.d.ts.map +1 -1
- package/lib/TestComponents/Notification/NotificationTest.js +2 -1
- package/lib/TestComponents/Notification/NotificationTest.js.map +1 -1
- package/lib/TestComponents/RadioGroupExperimental/RadioGroupExperimentalTest.d.ts.map +1 -1
- package/lib/TestComponents/RadioGroupExperimental/RadioGroupExperimentalTest.js +2 -1
- package/lib/TestComponents/RadioGroupExperimental/RadioGroupExperimentalTest.js.map +1 -1
- package/lib/TestComponents/Shadow/ShadowTest.d.ts.map +1 -1
- package/lib/TestComponents/Shadow/ShadowTest.js +2 -1
- package/lib/TestComponents/Shadow/ShadowTest.js.map +1 -1
- package/lib/TestComponents/Switch/Switch.d.ts.map +1 -1
- package/lib/TestComponents/Switch/Switch.js +2 -1
- package/lib/TestComponents/Switch/Switch.js.map +1 -1
- package/lib/TestComponents/Test.d.ts +1 -0
- package/lib/TestComponents/Test.d.ts.map +1 -1
- package/lib/TestComponents/Test.js +73 -46
- package/lib/TestComponents/Test.js.map +1 -1
- package/lib/TestComponents/Text/TextTest.d.ts.map +1 -1
- package/lib/TestComponents/Text/TextTest.js +2 -1
- package/lib/TestComponents/Text/TextTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Avatar/AvatarTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Avatar/AvatarTest.js +2 -1
- package/lib-commonjs/TestComponents/Avatar/AvatarTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Avatar/CustomizedAvatar.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Avatar/CustomizedAvatar.js +6 -1
- package/lib-commonjs/TestComponents/Avatar/CustomizedAvatar.js.map +1 -1
- package/lib-commonjs/TestComponents/Badge/BadgeTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Badge/BadgeTest.js +2 -1
- package/lib-commonjs/TestComponents/Badge/BadgeTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Badge/BasicBadgeTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Badge/BasicBadgeTest.js +12 -11
- package/lib-commonjs/TestComponents/Badge/BasicBadgeTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Badge/CounterBadgeTest.js +3 -3
- package/lib-commonjs/TestComponents/Badge/CounterBadgeTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Badge/E2EBadgeTest.js +1 -1
- package/lib-commonjs/TestComponents/Badge/E2EBadgeTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Badge/PresenceBadgeTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Badge/PresenceBadgeTest.js +23 -11
- package/lib-commonjs/TestComponents/Badge/PresenceBadgeTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Button/ButtonTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Button/ButtonTest.js +2 -1
- package/lib-commonjs/TestComponents/Button/ButtonTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Checkbox/CheckboxTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Checkbox/CheckboxTest.js +2 -1
- package/lib-commonjs/TestComponents/Checkbox/CheckboxTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Menu/MenuTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Menu/MenuTest.js +2 -1
- package/lib-commonjs/TestComponents/Menu/MenuTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Notification/NotificationTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Notification/NotificationTest.js +2 -1
- package/lib-commonjs/TestComponents/Notification/NotificationTest.js.map +1 -1
- package/lib-commonjs/TestComponents/RadioGroupExperimental/RadioGroupExperimentalTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/RadioGroupExperimental/RadioGroupExperimentalTest.js +2 -1
- package/lib-commonjs/TestComponents/RadioGroupExperimental/RadioGroupExperimentalTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Shadow/ShadowTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Shadow/ShadowTest.js +2 -1
- package/lib-commonjs/TestComponents/Shadow/ShadowTest.js.map +1 -1
- package/lib-commonjs/TestComponents/Switch/Switch.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Switch/Switch.js +2 -1
- package/lib-commonjs/TestComponents/Switch/Switch.js.map +1 -1
- package/lib-commonjs/TestComponents/Test.d.ts +1 -0
- package/lib-commonjs/TestComponents/Test.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Test.js +71 -44
- package/lib-commonjs/TestComponents/Test.js.map +1 -1
- package/lib-commonjs/TestComponents/Text/TextTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Text/TextTest.js +2 -1
- package/lib-commonjs/TestComponents/Text/TextTest.js.map +1 -1
- package/package.json +12 -12
- package/src/TestComponents/Avatar/AvatarTest.tsx +3 -1
- package/src/TestComponents/Avatar/CustomizedAvatar.tsx +22 -1
- package/src/TestComponents/Badge/BadgeTest.tsx +3 -1
- package/src/TestComponents/Badge/BasicBadgeTest.tsx +18 -17
- package/src/TestComponents/Badge/CounterBadgeTest.tsx +3 -3
- package/src/TestComponents/Badge/E2EBadgeTest.tsx +1 -1
- package/src/TestComponents/Badge/PresenceBadgeTest.tsx +22 -10
- package/src/TestComponents/Button/ButtonTest.tsx +3 -1
- package/src/TestComponents/Checkbox/CheckboxTest.tsx +3 -1
- package/src/TestComponents/Menu/MenuTest.tsx +3 -1
- package/src/TestComponents/Notification/NotificationTest.tsx +3 -1
- package/src/TestComponents/RadioGroupExperimental/RadioGroupExperimentalTest.tsx +9 -1
- package/src/TestComponents/Shadow/ShadowTest.tsx +3 -1
- package/src/TestComponents/Switch/Switch.tsx +3 -1
- package/src/TestComponents/Test.tsx +97 -61
- package/src/TestComponents/Text/TextTest.tsx +3 -1
|
@@ -7,25 +7,40 @@ var react_native_1 = require("react-native");
|
|
|
7
7
|
var react_native_2 = require("@fluentui/react-native");
|
|
8
8
|
var stack_1 = require("@fluentui-react-native/stack");
|
|
9
9
|
var styles_1 = require("./Common/styles");
|
|
10
|
+
var theme_types_1 = require("@fluentui-react-native/theme-types");
|
|
11
|
+
var react_native_svg_1 = (0, tslib_1.__importStar)(require("react-native-svg"));
|
|
12
|
+
var definitions = {
|
|
13
|
+
Production: 'Control is ready for broad partner use and to be used in production-ready scenarios.',
|
|
14
|
+
Beta: 'Control is ready for partner consumption, but not ready for production release (e.g. fixing bugs).',
|
|
15
|
+
Experimental: 'Control code checked into repo, but not ready for partner use.',
|
|
16
|
+
Backlog: 'Control is in plan and on our backlog to deliver.',
|
|
17
|
+
'N/A': 'Control is not in current plan.',
|
|
18
|
+
};
|
|
10
19
|
var styles = react_native_1.StyleSheet.create({
|
|
11
20
|
name: {
|
|
12
21
|
marginTop: 4,
|
|
13
22
|
},
|
|
23
|
+
definitionHeader: {
|
|
24
|
+
marginTop: 12,
|
|
25
|
+
marginBottom: 6,
|
|
26
|
+
},
|
|
14
27
|
description: {
|
|
15
28
|
alignItems: 'flex-start',
|
|
16
29
|
flexWrap: 'wrap',
|
|
17
30
|
},
|
|
31
|
+
header: {
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
flexDirection: 'row',
|
|
34
|
+
justifyContent: 'space-between',
|
|
35
|
+
},
|
|
18
36
|
section: {
|
|
19
37
|
marginTop: 12,
|
|
20
38
|
},
|
|
21
39
|
statusView: {
|
|
22
40
|
flexDirection: 'row',
|
|
23
|
-
alignItems: '
|
|
41
|
+
alignItems: 'center',
|
|
24
42
|
justifyContent: 'space-between',
|
|
25
43
|
},
|
|
26
|
-
statusHeader: {
|
|
27
|
-
marginBottom: 6,
|
|
28
|
-
},
|
|
29
44
|
statusLabel: {
|
|
30
45
|
marginTop: 2,
|
|
31
46
|
marginStart: 4,
|
|
@@ -34,52 +49,64 @@ var styles = react_native_1.StyleSheet.create({
|
|
|
34
49
|
fontWeight: 'normal',
|
|
35
50
|
},
|
|
36
51
|
});
|
|
37
|
-
// mobile platform check to not render status components.
|
|
38
|
-
var isMobile = react_native_1.Platform.OS == 'android' || (react_native_1.Platform.OS == 'ios' && !react_native_1.Platform.isPad);
|
|
39
52
|
var Test = function (props) {
|
|
53
|
+
var _a = React.useState(false), showStatus = _a[0], setShowStatus = _a[1];
|
|
54
|
+
var toggleSvg = function () {
|
|
55
|
+
var plusPath = 'M6.5 1.75C6.5 1.33579 6.16421 1 5.75 1C5.33579 1 5 1.33579 5 1.75V5H1.75C1.33579 5 1 5.33579 1 5.75C1 6.16421 1.33579 6.5 1.75 6.5H5V9.75C5 10.1642 5.33579 10.5 5.75 10.5C6.16421 10.5 6.5 10.1642 6.5 9.75V6.5H9.75C10.1642 6.5 10.5 6.16421 10.5 5.75C10.5 5.33579 10.1642 5 9.75 5H6.5V1.75Z';
|
|
56
|
+
var minusPath = 'M2.75 5.25h6.5s0.75 0 0.75 0.75v0s0 0.75 -0.75 0.75h-6.5s-0.75 0 -0.75 -0.75v0s0 -0.75 0.75 -0.75';
|
|
57
|
+
var path = showStatus ? minusPath : plusPath;
|
|
58
|
+
return (React.createElement(react_native_svg_1.default, null,
|
|
59
|
+
React.createElement(react_native_svg_1.G, null,
|
|
60
|
+
React.createElement(react_native_svg_1.Path, { d: path, fill: "black" }))));
|
|
61
|
+
};
|
|
62
|
+
var svgProps = {
|
|
63
|
+
src: toggleSvg,
|
|
64
|
+
};
|
|
65
|
+
var theme = (0, theme_types_1.useTheme)();
|
|
66
|
+
var fontFamily = theme.typography.families.primary;
|
|
67
|
+
var plusCodepoint = 0x2795;
|
|
68
|
+
var minusCodepoint = 0x2796;
|
|
69
|
+
var fontIconProps = {
|
|
70
|
+
fontFamily: fontFamily,
|
|
71
|
+
codepoint: showStatus ? minusCodepoint : plusCodepoint,
|
|
72
|
+
fontSize: 10,
|
|
73
|
+
};
|
|
74
|
+
var toggleIconProps = react_native_1.Platform.OS === 'windows' ? { fontSource: fontIconProps } : { svgSource: svgProps, width: 12, height: 12 };
|
|
40
75
|
return (React.createElement(react_native_1.View, { testID: "ScrollViewAreaForComponents" },
|
|
41
|
-
React.createElement(
|
|
76
|
+
React.createElement(react_native_1.View, { style: styles.header },
|
|
77
|
+
React.createElement(react_native_2.Text, { style: [styles.name], variant: "heroSemibold" }, props.name),
|
|
78
|
+
props.spec && React.createElement(react_native_2.Link, { url: props.spec, content: "SPEC" })),
|
|
42
79
|
React.createElement(react_native_2.Separator, null),
|
|
43
80
|
React.createElement(stack_1.Stack, { style: styles_1.stackStyle },
|
|
44
81
|
React.createElement(react_native_2.Text, { style: styles.description }, props.description)),
|
|
45
|
-
|
|
82
|
+
React.createElement(stack_1.Stack, { style: styles_1.stackStyle },
|
|
46
83
|
React.createElement(react_native_1.View, { style: styles.statusView },
|
|
47
|
-
React.createElement(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
React.createElement(react_native_2.Text, { style:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
React.createElement(react_native_2.Text, { style:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
React.createElement(react_native_2.Text, { style:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
React.createElement(react_native_2.Text, { style:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
React.createElement(react_native_2.Text, { style: styles.status }, "Control is ready for partner consumption, but not ready for production release (e.g. fixing bugs).")),
|
|
74
|
-
React.createElement(react_native_2.Text, { style: [styles.statusLabel], variant: "bodySemibold" },
|
|
75
|
-
"Experimental: ",
|
|
76
|
-
React.createElement(react_native_2.Text, { style: styles.status }, "Control code checked into repo, but not ready for partner use.")),
|
|
77
|
-
React.createElement(react_native_2.Text, { style: [styles.statusLabel], variant: "bodySemibold" },
|
|
78
|
-
"Backlog: ",
|
|
79
|
-
React.createElement(react_native_2.Text, { style: styles.status }, "Control is in plan and on our backlog to deliver.")),
|
|
80
|
-
React.createElement(react_native_2.Text, { style: [styles.statusLabel], variant: "bodySemibold" },
|
|
81
|
-
"N/A: ",
|
|
82
|
-
React.createElement(react_native_2.Text, { style: styles.status }, "Control is not in current plan.")))))),
|
|
84
|
+
React.createElement(react_native_2.Text, { variant: "headerStandard" }, "Platform Status"),
|
|
85
|
+
React.createElement(react_native_2.ToggleButton, { iconOnly: true, icon: toggleIconProps, onClick: function () { return setShowStatus(!showStatus); } })),
|
|
86
|
+
showStatus && (React.createElement(React.Fragment, null,
|
|
87
|
+
React.createElement(react_native_2.Text, { style: [styles.statusLabel], variant: "bodySemibold" },
|
|
88
|
+
"Win32: ",
|
|
89
|
+
React.createElement(react_native_2.Text, { style: styles.status }, props.status.win32Status)),
|
|
90
|
+
React.createElement(react_native_2.Text, { style: [styles.statusLabel], variant: "bodySemibold" },
|
|
91
|
+
"UWP: ",
|
|
92
|
+
React.createElement(react_native_2.Text, { style: styles.status }, props.status.uwpStatus)),
|
|
93
|
+
React.createElement(react_native_2.Text, { style: [styles.statusLabel], variant: "bodySemibold" },
|
|
94
|
+
"iOS: ",
|
|
95
|
+
React.createElement(react_native_2.Text, { style: styles.status }, props.status.iosStatus)),
|
|
96
|
+
React.createElement(react_native_2.Text, { style: [styles.statusLabel], variant: "bodySemibold" },
|
|
97
|
+
"macOS: ",
|
|
98
|
+
React.createElement(react_native_2.Text, { style: styles.status }, props.status.macosStatus)),
|
|
99
|
+
React.createElement(react_native_2.Text, { style: [styles.statusLabel], variant: "bodySemibold" },
|
|
100
|
+
"Android: ",
|
|
101
|
+
React.createElement(react_native_2.Text, { style: styles.status }, props.status.androidStatus)),
|
|
102
|
+
React.createElement(react_native_2.Text, { style: [styles.definitionHeader], variant: "headerStandard" }, "Status Definitions"),
|
|
103
|
+
Object.entries(definitions).map(function (_a) {
|
|
104
|
+
var key = _a[0], value = _a[1];
|
|
105
|
+
return (React.createElement(react_native_2.Text, { style: [styles.statusLabel], variant: "bodySemibold", key: key },
|
|
106
|
+
key,
|
|
107
|
+
": ",
|
|
108
|
+
React.createElement(react_native_2.Text, { style: styles.status }, value)));
|
|
109
|
+
})))),
|
|
83
110
|
props.sections.map(function (section, index) {
|
|
84
111
|
var TestComponent = section.component;
|
|
85
112
|
return (React.createElement(react_native_1.View, { key: index },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Test.js","sourceRoot":"","sources":["../../src/TestComponents/Test.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,6CAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"Test.js","sourceRoot":"","sources":["../../src/TestComponents/Test.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,6CAA0D;AAC1D,uDAA6E;AAC7E,sDAAqD;AACrD,0CAA6C;AAC7C,kEAA8D;AAC9D,gFAA0D;AA0B1D,IAAM,WAAW,GAAG;IAClB,UAAU,EAAE,sFAAsF;IAClG,IAAI,EAAE,oGAAoG;IAC1G,YAAY,EAAE,gEAAgE;IAC9E,OAAO,EAAE,mDAAmD;IAC5D,KAAK,EAAE,iCAAiC;CACzC,CAAC;AAEF,IAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,SAAS,EAAE,CAAC;KACb;IACD,gBAAgB,EAAE;QAChB,SAAS,EAAE,EAAE;QACb,YAAY,EAAE,CAAC;KAChB;IACD,WAAW,EAAE;QACX,UAAU,EAAE,YAAY;QACxB,QAAQ,EAAE,MAAM;KACjB;IACD,MAAM,EAAE;QACN,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;KAChC;IACD,OAAO,EAAE;QACP,SAAS,EAAE,EAAE;KACd;IACD,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,eAAe;KAChC;IACD,WAAW,EAAE;QACX,SAAS,EAAE,CAAC;QACZ,WAAW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AC,mBAAI,IAAC,GAAG,EAAE,KAAK;gBACd,oBAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,EAAC,gBAAgB,EAAC,MAAM,EAAE,OAAO,CAAC,MAAM,IAC3E,OAAO,CAAC,IAAI,CACR;gBACP,oBAAC,wBAAS,OAAG;gBACb,oBAAC,aAAa,OAAG,CACZ,CACR,CAAC;QACJ,CAAC,CAAC,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AAhGW,QAAA,IAAI,QAgGf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextTest.d.ts","sourceRoot":"","sources":["../../../src/TestComponents/Text/TextTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0B/B,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"TextTest.d.ts","sourceRoot":"","sources":["../../../src/TestComponents/Text/TextTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0B/B,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAc5B,CAAC"}
|
|
@@ -35,7 +35,8 @@ var TextTest = function () {
|
|
|
35
35
|
androidStatus: 'Beta',
|
|
36
36
|
};
|
|
37
37
|
var description = 'Text is a component for displaying text. You can use Text to standardize text across your app.';
|
|
38
|
-
|
|
38
|
+
var spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/components/text/SPEC.md';
|
|
39
|
+
return React.createElement(Test_1.Test, { name: "Text Test", description: description, spec: spec, sections: textSections, status: status });
|
|
39
40
|
};
|
|
40
41
|
exports.TextTest = TextTest;
|
|
41
42
|
//# sourceMappingURL=TextTest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextTest.js","sourceRoot":"","sources":["../../../src/TestComponents/Text/TextTest.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,iDAAgD;AAChD,mDAAkD;AAClD,mDAAkD;AAClD,6CAA4C;AAC5C,gCAA4D;AAE5D,IAAM,YAAY,GAAkB;IAClC;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,6BAAa;KACzB;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE,+BAAc;KAC1B;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE,+BAAc;KAC1B;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,yBAAW;KACvB;CACF,CAAC;AAEK,IAAM,QAAQ,GAA4B;IAC/C,IAAM,MAAM,GAAmB;QAC7B,WAAW,EAAE,cAAc;QAC3B,SAAS,EAAE,cAAc;QACzB,SAAS,EAAE,cAAc;QACzB,WAAW,EAAE,cAAc;QAC3B,aAAa,EAAE,MAAM;KACtB,CAAC;IAEF,IAAM,WAAW,GAAG,gGAAgG,CAAC;IAErH,OAAO,oBAAC,WAAI,IAAC,IAAI,EAAC,WAAW,EAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"TextTest.js","sourceRoot":"","sources":["../../../src/TestComponents/Text/TextTest.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,iDAAgD;AAChD,mDAAkD;AAClD,mDAAkD;AAClD,6CAA4C;AAC5C,gCAA4D;AAE5D,IAAM,YAAY,GAAkB;IAClC;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,6BAAa;KACzB;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE,+BAAc;KAC1B;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE,+BAAc;KAC1B;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,yBAAW;KACvB;CACF,CAAC;AAEK,IAAM,QAAQ,GAA4B;IAC/C,IAAM,MAAM,GAAmB;QAC7B,WAAW,EAAE,cAAc;QAC3B,SAAS,EAAE,cAAc;QACzB,SAAS,EAAE,cAAc;QACzB,WAAW,EAAE,cAAc;QAC3B,aAAa,EAAE,MAAM;KACtB,CAAC;IAEF,IAAM,WAAW,GAAG,gGAAgG,CAAC;IAErH,IAAM,IAAI,GAAG,+FAA+F,CAAC;IAE7G,OAAO,oBAAC,WAAI,IAAC,IAAI,EAAC,WAAW,EAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;AACjH,CAAC,CAAC;AAdW,QAAA,QAAQ,YAcnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.90.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>",
|
|
@@ -37,36 +37,36 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fluentui-react-native/android-theme": ">=0.11.0 <1.0.0",
|
|
39
39
|
"@fluentui-react-native/apple-theme": ">=0.13.2 <1.0.0",
|
|
40
|
-
"@fluentui-react-native/avatar": "^1.
|
|
41
|
-
"@fluentui-react-native/badge": ">=0.1.
|
|
42
|
-
"@fluentui-react-native/button": ">=0.24.
|
|
40
|
+
"@fluentui-react-native/avatar": "^1.2.0",
|
|
41
|
+
"@fluentui-react-native/badge": ">=0.1.24 <1.0.0",
|
|
42
|
+
"@fluentui-react-native/button": ">=0.24.17 <1.0.0",
|
|
43
43
|
"@fluentui-react-native/default-theme": ">=0.14.0 <1.0.0",
|
|
44
44
|
"@fluentui-react-native/experimental-activity-indicator": ">=0.6.0 <1.0.0",
|
|
45
45
|
"@fluentui-react-native/experimental-avatar": ">=0.16.1 <1.0.0",
|
|
46
|
-
"@fluentui-react-native/experimental-button": "0.16.
|
|
46
|
+
"@fluentui-react-native/experimental-button": "0.16.17",
|
|
47
47
|
"@fluentui-react-native/experimental-checkbox": "0.12.10",
|
|
48
48
|
"@fluentui-react-native/experimental-expander": "0.4.0",
|
|
49
|
-
"@fluentui-react-native/experimental-menu-button": ">=0.4.
|
|
49
|
+
"@fluentui-react-native/experimental-menu-button": ">=0.4.20 <1.0.0",
|
|
50
50
|
"@fluentui-react-native/experimental-native-date-picker": ">=0.7.0 <1.0.0",
|
|
51
|
-
"@fluentui-react-native/experimental-shadow": "0.2.
|
|
51
|
+
"@fluentui-react-native/experimental-shadow": "0.2.13",
|
|
52
52
|
"@fluentui-react-native/experimental-shimmer": "0.7.0",
|
|
53
53
|
"@fluentui-react-native/experimental-tabs": "0.5.9",
|
|
54
54
|
"@fluentui-react-native/experimental-text": ">=0.11.1 <1.0.0",
|
|
55
|
-
"@fluentui-react-native/experimental-radio-group": "^0.2.
|
|
55
|
+
"@fluentui-react-native/experimental-radio-group": "^0.2.1",
|
|
56
56
|
"@fluentui-react-native/framework": ">=0.8.0 <1.0.0",
|
|
57
57
|
"@fluentui-react-native/icon": "0.13.4",
|
|
58
58
|
"@fluentui-react-native/interactive-hooks": ">=0.18.1 <1.0.0",
|
|
59
|
-
"@fluentui-react-native/menu": "^1.0.
|
|
60
|
-
"@fluentui-react-native/notification": "0.
|
|
59
|
+
"@fluentui-react-native/menu": "^1.0.26",
|
|
60
|
+
"@fluentui-react-native/notification": "0.17.0",
|
|
61
61
|
"@fluentui-react-native/stack": ">=0.7.3 <1.0.0",
|
|
62
|
-
"@fluentui-react-native/switch": "^0.6.
|
|
62
|
+
"@fluentui-react-native/switch": "^0.6.2",
|
|
63
63
|
"@fluentui-react-native/text": ">=0.14.0 <1.0.0",
|
|
64
64
|
"@fluentui-react-native/theme": ">=0.7.0 <1.0.0",
|
|
65
65
|
"@fluentui-react-native/theme-types": ">=0.18.0 <1.0.0",
|
|
66
66
|
"@fluentui-react-native/themed-stylesheet": "^1.4.0",
|
|
67
67
|
"@fluentui-react-native/theming-utils": ">=0.14.0 <1.0.0",
|
|
68
68
|
"@fluentui-react-native/win32-theme": ">=0.20.1 <1.0.0",
|
|
69
|
-
"@fluentui/react-native": ">=0.32.
|
|
69
|
+
"@fluentui/react-native": ">=0.32.8 <1.0.0",
|
|
70
70
|
"@react-native-community/slider": "^4.2.0",
|
|
71
71
|
"@react-native-menu/menu": "^0.1.2",
|
|
72
72
|
"@react-native-picker/picker": "^2.2.1",
|
|
@@ -33,5 +33,7 @@ export const AvatarTest: React.FunctionComponent = () => {
|
|
|
33
33
|
const description =
|
|
34
34
|
'AvatarView is a visual representation of a user, entity, or group. If an image is supplied, it is cropped to a circle of the requested size. If an image is not supplied, initials are extracted from the given name and email address provided and displayed on a colorful background.';
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
const spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/components/Avatar/SPEC.md';
|
|
37
|
+
|
|
38
|
+
return <Test name="Avatar Test" description={description} spec={spec} sections={avatarSections} status={status} />;
|
|
37
39
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useMemo } from 'react';
|
|
2
|
-
import { Avatar, AvatarSize } from '@fluentui-react-native/avatar';
|
|
2
|
+
import { Avatar, AvatarColors, AvatarSize, getJavaHashCode } from '@fluentui-react-native/avatar';
|
|
3
3
|
import { View, Text, TextInput, Platform } from 'react-native';
|
|
4
4
|
import { steveBallmerPhotoUrl } from './../PersonaCoin/styles';
|
|
5
5
|
import { commonTestStyles as commonStyles } from '../Common/styles';
|
|
@@ -65,6 +65,9 @@ export const CustomizeUsage: React.FunctionComponent = () => {
|
|
|
65
65
|
viewBox: '0 0 500 500',
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
+
const useJavaHashCode = ['ios', 'macos', 'android'].includes(Platform.OS);
|
|
69
|
+
const hashedColor = AvatarColors[getJavaHashCode(name) % (AvatarColors.length - 3)];
|
|
70
|
+
|
|
68
71
|
return (
|
|
69
72
|
<View style={commonStyles.root}>
|
|
70
73
|
<View style={commonStyles.settings}>
|
|
@@ -247,6 +250,24 @@ export const CustomizeUsage: React.FunctionComponent = () => {
|
|
|
247
250
|
ringInnerGap={parseInt(ringInnerGap)}
|
|
248
251
|
/>
|
|
249
252
|
</View>
|
|
253
|
+
{useJavaHashCode && (
|
|
254
|
+
<View style={{ marginLeft: 20 }}>
|
|
255
|
+
<Text>Avatar with hashed color</Text>
|
|
256
|
+
<Avatar
|
|
257
|
+
active="active"
|
|
258
|
+
activeAppearance="ring"
|
|
259
|
+
avatarColor={hashedColor}
|
|
260
|
+
initials={showInitials ? initials : undefined}
|
|
261
|
+
name={showInitials ? name : undefined}
|
|
262
|
+
ringBackgroundColor={ringBackgroundColor}
|
|
263
|
+
ringColor={ringColor}
|
|
264
|
+
ringThickness={parseInt(ringThickness)}
|
|
265
|
+
size={parseInt(size) as AvatarSize}
|
|
266
|
+
transparentRing={!showRing}
|
|
267
|
+
ringInnerGap={parseInt(ringInnerGap)}
|
|
268
|
+
/>
|
|
269
|
+
</View>
|
|
270
|
+
)}
|
|
250
271
|
</View>
|
|
251
272
|
);
|
|
252
273
|
};
|
|
@@ -38,5 +38,7 @@ export const BadgeTest: React.FunctionComponent = () => {
|
|
|
38
38
|
const description =
|
|
39
39
|
'A badge is an additional visual descriptor for UI elements. It can be used to denote numerical value, status or general information.\n Included in this spec are base properties for usage in all badge scenarios. Reference properties for other badge types i.e. size, layout, and style variations';
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
const spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/experimental/Badge/SPEC.md';
|
|
42
|
+
|
|
43
|
+
return <Test name="Badge Test" description={description} spec={spec} sections={badgeSections} status={status} />;
|
|
42
44
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
2
|
import React, { useState, useCallback } from 'react';
|
|
3
|
-
import { View, Platform, Text, Image } from 'react-native';
|
|
3
|
+
import { View, Platform, Text, Image, FlexStyle } from 'react-native';
|
|
4
4
|
import {
|
|
5
5
|
Badge,
|
|
6
6
|
BadgeAppearance,
|
|
@@ -25,15 +25,12 @@ const badgeSizes: BadgeSize[] = [...BadgeSizes];
|
|
|
25
25
|
const badgeAppearances: BadgeAppearance[] = [...BadgeAppearances];
|
|
26
26
|
const badgeIconPositions = ['before', 'after'];
|
|
27
27
|
|
|
28
|
-
const BadgeNoBorder = Badge.customize({
|
|
29
|
-
borderColor: 'transparent',
|
|
30
|
-
borderWidth: 0,
|
|
31
|
-
});
|
|
32
|
-
|
|
33
28
|
const StyledBadge = Badge.customize({
|
|
34
29
|
backgroundColor: 'yellow',
|
|
35
30
|
borderColor: '#f09',
|
|
36
31
|
borderWidth: 4,
|
|
32
|
+
color: '#f07',
|
|
33
|
+
fontWeight: 'bold',
|
|
37
34
|
});
|
|
38
35
|
|
|
39
36
|
export const BasicBadge: React.FunctionComponent = () => {
|
|
@@ -65,10 +62,12 @@ export const BasicBadge: React.FunctionComponent = () => {
|
|
|
65
62
|
const iconProps = { svgSource: svgProps, width: 20, height: 20 };
|
|
66
63
|
const badgeConfig = {
|
|
67
64
|
appearance: badgeAppearance,
|
|
68
|
-
|
|
65
|
+
badgeColor,
|
|
66
|
+
position: 'absolute' as FlexStyle['position'],
|
|
69
67
|
size,
|
|
70
68
|
shape,
|
|
71
69
|
};
|
|
70
|
+
const badgeContent = size === 'tiny' || size === 'extraSmall' ? '' : 'Basic badge';
|
|
72
71
|
|
|
73
72
|
return (
|
|
74
73
|
<View>
|
|
@@ -85,17 +84,20 @@ export const BasicBadge: React.FunctionComponent = () => {
|
|
|
85
84
|
</>
|
|
86
85
|
)}
|
|
87
86
|
|
|
88
|
-
{
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
<View style={{ position: 'relative', backgroundColor: 'yellow', padding: 20, width: 200 }}>
|
|
88
|
+
<Text>Parent component for the Badge</Text>
|
|
89
|
+
{svgIconsEnabled && showIcon ? (
|
|
90
|
+
<Badge {...badgeConfig} icon={{ svgSource: svgProps }} iconPosition={iconPosition}>
|
|
91
|
+
{badgeContent}
|
|
92
|
+
</Badge>
|
|
93
|
+
) : (
|
|
94
|
+
<Badge {...badgeConfig}>{badgeContent}</Badge>
|
|
95
|
+
)}
|
|
96
|
+
</View>
|
|
95
97
|
|
|
96
98
|
<Text>Size</Text>
|
|
97
99
|
<Badge size="tiny" shape="circular" />
|
|
98
|
-
<Badge size="extraSmall" shape="circular" />
|
|
100
|
+
<Badge size="extraSmall" shape="circular" badgeColor="red" />
|
|
99
101
|
<Badge size="small">Small</Badge>
|
|
100
102
|
<Badge size="medium">Medium</Badge>
|
|
101
103
|
<Badge size="large">Large</Badge>
|
|
@@ -110,11 +112,10 @@ export const BasicBadge: React.FunctionComponent = () => {
|
|
|
110
112
|
</Badge>
|
|
111
113
|
<Badge appearance="outline" icon={iconProps} />
|
|
112
114
|
<Badge icon={{ fontSource: { ...fontBuiltInProps }, color: '#fff' }}>Badge with icon</Badge>
|
|
113
|
-
<Text>Customized Badge</Text>
|
|
114
|
-
<BadgeNoBorder appearance="outline" icon={iconProps} />
|
|
115
115
|
</>
|
|
116
116
|
)}
|
|
117
117
|
<StyledBadge appearance="outline">Styled badge</StyledBadge>
|
|
118
|
+
<StyledBadge>Styled badge</StyledBadge>
|
|
118
119
|
</View>
|
|
119
120
|
);
|
|
120
121
|
};
|
|
@@ -22,9 +22,9 @@ export const CounterBadgeTest: React.FunctionComponent = () => {
|
|
|
22
22
|
<CounterBadge count={0}></CounterBadge>
|
|
23
23
|
<Text>And here is the Badge with showZero = true</Text>
|
|
24
24
|
<CounterBadge count={0} showZero={true}></CounterBadge>
|
|
25
|
-
<CounterBadge
|
|
26
|
-
<CounterBadge
|
|
27
|
-
<CounterBadge
|
|
25
|
+
<CounterBadge badgeColor="informative" count={777}></CounterBadge>
|
|
26
|
+
<CounterBadge badgeColor="important" overflowCount={1000} count={777}></CounterBadge>
|
|
27
|
+
<CounterBadge badgeColor="danger" overflowCount={1000} count={1500}></CounterBadge>
|
|
28
28
|
<CounterBadge count={13}></CounterBadge>
|
|
29
29
|
<CounterBadge count={13}>CounterBadge</CounterBadge>
|
|
30
30
|
{svgIconsEnabled && <CounterBadge count={17} icon={{ svgSource: svgProps }} iconPosition="after" />}
|
|
@@ -6,7 +6,7 @@ import { BADGE_TEST_COMPONENT, BADGE_SECONDARY_TEST_COMPONENT } from './consts';
|
|
|
6
6
|
export const E2EBadgeTest: React.FunctionComponent = () => {
|
|
7
7
|
return (
|
|
8
8
|
<View>
|
|
9
|
-
<Badge testID={BADGE_TEST_COMPONENT} appearance="outline" size="extraLarge"
|
|
9
|
+
<Badge testID={BADGE_TEST_COMPONENT} appearance="outline" size="extraLarge" badgeColor="success" shape="square">
|
|
10
10
|
Basic Badge
|
|
11
11
|
</Badge>
|
|
12
12
|
<PresenceBadge testID={BADGE_SECONDARY_TEST_COMPONENT} status="available" outOfOffice={true} />
|
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { useState, useCallback } from 'react';
|
|
3
3
|
import { View, Platform, Text } from 'react-native';
|
|
4
|
-
import { PresenceBadge } from '@fluentui-react-native/badge';
|
|
4
|
+
import { PresenceBadge, BadgeSize, BadgeSizes } from '@fluentui-react-native/badge';
|
|
5
|
+
import { StyledPicker } from '../Common/StyledPicker';
|
|
6
|
+
import { ToggleButton } from '@fluentui/react-native';
|
|
5
7
|
|
|
8
|
+
const badgeSizes: BadgeSize[] = [...BadgeSizes];
|
|
6
9
|
export const PresenceBadgeTest: React.FunctionComponent = () => {
|
|
10
|
+
const [size, setSize] = useState<BadgeSize>('medium');
|
|
11
|
+
const [outOfOffice, setOutOfOffice] = useState(false);
|
|
7
12
|
const svgIconsEnabled = ['ios', 'macos', 'win32', 'android'].includes(Platform.OS as string);
|
|
8
13
|
|
|
14
|
+
const onSizeChange = useCallback((value) => setSize(value), []);
|
|
9
15
|
return (
|
|
10
16
|
<View>
|
|
17
|
+
<StyledPicker prompt="Size" selected={size} onChange={onSizeChange} collection={badgeSizes} />
|
|
18
|
+
<ToggleButton onClick={() => setOutOfOffice(!outOfOffice)} checked={outOfOffice}>
|
|
19
|
+
Set {outOfOffice ? ' In office' : ' Out of office'}
|
|
20
|
+
</ToggleButton>
|
|
11
21
|
{svgIconsEnabled && (
|
|
12
22
|
<>
|
|
13
23
|
<Text>Presence Badge</Text>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
<View style={{ flexDirection: 'row', marginEnd: 8 }}>
|
|
25
|
+
<PresenceBadge status="available" size={size} outOfOffice={outOfOffice} />
|
|
26
|
+
<PresenceBadge status="blocked" size={size} outOfOffice={outOfOffice} />
|
|
27
|
+
<PresenceBadge status="doNotDisturb" size={size} outOfOffice={outOfOffice} />
|
|
28
|
+
<PresenceBadge status="away" size={size} outOfOffice={outOfOffice} />
|
|
29
|
+
<PresenceBadge status="busy" size={size} outOfOffice={outOfOffice} />
|
|
30
|
+
<PresenceBadge status="offline" size={size} outOfOffice={outOfOffice} />
|
|
31
|
+
<PresenceBadge status="outOfOffice" size={size} outOfOffice={outOfOffice} />
|
|
32
|
+
<PresenceBadge status="unknown" size={size} outOfOffice={outOfOffice} />
|
|
33
|
+
</View>
|
|
22
34
|
</>
|
|
23
35
|
)}
|
|
24
36
|
</View>
|
|
@@ -68,5 +68,7 @@ export const ButtonTest: React.FunctionComponent = () => {
|
|
|
68
68
|
const description =
|
|
69
69
|
'Buttons are best used to enable a user to commit a change or complete steps in a task. They are typically found inside forms, dialogs, panels or pages. An example of their usage is confirming the deletion of a file in a confirmation dialog.\n\nWhen considering their place in a layout, contemplate the order in which a user will flow through the UI. As an example, in a form, the individual will need to read and interact with the form fields before submiting the form. Therefore, as a general rule, the button should be placed at the bottom of the UI container (a dialog, panel, or page) which holds the related UI elements.\n\nWhile buttons can technically be used to navigate a user to another part of the experience, this is not recommended unless that navigation is part of an action or their flow.';
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
const spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/components/Button/SPEC.md';
|
|
72
|
+
|
|
73
|
+
return <Test name="Button Test" description={description} spec={spec} sections={buttonSections} status={status} />;
|
|
72
74
|
};
|
|
@@ -178,5 +178,7 @@ export const CheckboxTest: React.FunctionComponent = () => {
|
|
|
178
178
|
const description =
|
|
179
179
|
'Checkboxes give people a way to select one or more items from a group, or switch between two mutually exclusive options (checked or unchecked, on or off).';
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
const spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/components/Checkbox/SPEC.md';
|
|
182
|
+
|
|
183
|
+
return <Test name="Checkbox Test" description={description} spec={spec} sections={checkboxSections} status={status} />;
|
|
182
184
|
};
|
|
@@ -283,5 +283,7 @@ export const MenuTest: React.FunctionComponent = () => {
|
|
|
283
283
|
const description =
|
|
284
284
|
'A Menu is an component that displays a list of options on a temporary surface. They are invoked when users interact with a button, action, or other control.';
|
|
285
285
|
|
|
286
|
-
|
|
286
|
+
const spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/components/Menu/SPEC.md';
|
|
287
|
+
|
|
288
|
+
return <Test name="Menu Test" description={description} spec={spec} sections={menuSections} status={status} />;
|
|
287
289
|
};
|
|
@@ -282,5 +282,7 @@ export const NotificationTest: React.FunctionComponent = () => {
|
|
|
282
282
|
|
|
283
283
|
const description = 'Testing notification component';
|
|
284
284
|
|
|
285
|
-
|
|
285
|
+
const spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/components/Notification/SPEC.md';
|
|
286
|
+
|
|
287
|
+
return <Test name="Notification Test" description={description} spec={spec} sections={notificationSections} status={status} />;
|
|
286
288
|
};
|
|
@@ -23,7 +23,15 @@ export const RadioGroupExperimentalTest: React.FunctionComponent = () => {
|
|
|
23
23
|
const description =
|
|
24
24
|
'RadioGroup lets users select a single option from two or more choices. Each option is represented by one Radio; a user can select only one Radio in a RadioGroup.';
|
|
25
25
|
|
|
26
|
+
const spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/experimental/RadioGroup/SPEC.md';
|
|
27
|
+
|
|
26
28
|
return (
|
|
27
|
-
<Test
|
|
29
|
+
<Test
|
|
30
|
+
name="Experimental RadioGroup Test"
|
|
31
|
+
description={description}
|
|
32
|
+
spec={spec}
|
|
33
|
+
sections={radioGroupExperimentalSections}
|
|
34
|
+
status={status}
|
|
35
|
+
/>
|
|
28
36
|
);
|
|
29
37
|
};
|
|
@@ -28,5 +28,7 @@ export const ShadowTest: React.FunctionComponent = () => {
|
|
|
28
28
|
|
|
29
29
|
const description = 'A Shadow component using the Fluent Design System. Shadow components can be added to other components.';
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
const spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/experimental/Shadow/SPEC.md';
|
|
32
|
+
|
|
33
|
+
return <Test name="Shadow Test" description={description} spec={spec} sections={shadowSections} status={status} />;
|
|
32
34
|
};
|
|
@@ -125,5 +125,7 @@ export const SwitchTest: React.FunctionComponent = () => {
|
|
|
125
125
|
|
|
126
126
|
const description = 'Switch is a control that has two mutually exclusive states.';
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
const spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/experimental/Switch/SPEC.md';
|
|
129
|
+
|
|
130
|
+
return <Test name="Switch Test" description={description} spec={spec} sections={toggleSections} status={status} />;
|
|
129
131
|
};
|