@fluentui-react-native/tester 0.75.2 → 0.77.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 +242 -1
- package/CHANGELOG.md +64 -2
- package/lib/E2E/Avatar/specs/Avatar.spec.win.js +5 -3
- package/lib/E2E/Avatar/specs/Avatar.spec.win.js.map +1 -1
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.js +10 -13
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Callout/CalloutTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Callout/CalloutTest.js +15 -3
- package/lib/FluentTester/TestComponents/Callout/CalloutTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Common/AlignmentPicker.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Common/AlignmentPicker.js +7 -1
- package/lib/FluentTester/TestComponents/Common/AlignmentPicker.js.map +1 -1
- package/lib/FluentTester/TestComponents/Common/MenuPicker.d.ts +7 -4
- package/lib/FluentTester/TestComponents/Common/MenuPicker.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Common/MenuPicker.desktop.d.ts +1 -8
- package/lib/FluentTester/TestComponents/Common/MenuPicker.desktop.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Common/MenuPicker.desktop.js +11 -2
- package/lib/FluentTester/TestComponents/Common/MenuPicker.desktop.js.map +1 -1
- package/lib/FluentTester/TestComponents/Common/MenuPicker.js +7 -1
- package/lib/FluentTester/TestComponents/Common/MenuPicker.js.map +1 -1
- package/lib/FluentTester/TestComponents/Common/MenuPicker.windows.d.ts +1 -7
- package/lib/FluentTester/TestComponents/Common/MenuPicker.windows.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Common/MenuPicker.windows.js +1 -1
- package/lib/FluentTester/TestComponents/Common/MenuPicker.windows.js.map +1 -1
- package/lib/FluentTester/TestComponents/Common/StyledPicker.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Common/StyledPicker.js +7 -1
- package/lib/FluentTester/TestComponents/Common/StyledPicker.js.map +1 -1
- package/lib/FluentTester/TestComponents/Notification/NotificationTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Notification/NotificationTest.js +2 -2
- package/lib/FluentTester/TestComponents/Notification/NotificationTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Persona/StandardUsage.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Persona/StandardUsage.js +7 -1
- package/lib/FluentTester/TestComponents/Persona/StandardUsage.js.map +1 -1
- package/lib/FluentTester/TestComponents/Shadow/ShadowButtonTestSection.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Shadow/ShadowButtonTestSection.js +4 -2
- package/lib/FluentTester/TestComponents/Shadow/ShadowButtonTestSection.js.map +1 -1
- package/lib/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.js +17 -17
- package/lib/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.js.map +1 -1
- package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js +1 -1
- package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js.map +1 -1
- package/lib/FluentTester/TestComponents/TextExperimental/PressableUsage.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/TextExperimental/PressableUsage.js +5 -2
- package/lib/FluentTester/TestComponents/TextExperimental/PressableUsage.js.map +1 -1
- package/lib/FluentTester/theme/ThemePickers.d.ts.map +1 -1
- package/lib/FluentTester/theme/ThemePickers.js +6 -9
- package/lib/FluentTester/theme/ThemePickers.js.map +1 -1
- package/lib-commonjs/E2E/Avatar/specs/Avatar.spec.win.js +5 -3
- package/lib-commonjs/E2E/Avatar/specs/Avatar.spec.win.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.js +9 -12
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Callout/CalloutTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Callout/CalloutTest.js +15 -3
- package/lib-commonjs/FluentTester/TestComponents/Callout/CalloutTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/AlignmentPicker.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/AlignmentPicker.js +7 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/AlignmentPicker.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.d.ts +7 -4
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.desktop.d.ts +1 -8
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.desktop.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.desktop.js +11 -2
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.desktop.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.js +7 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.windows.d.ts +1 -7
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.windows.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.windows.js +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/MenuPicker.windows.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/StyledPicker.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/StyledPicker.js +7 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/StyledPicker.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Notification/NotificationTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Notification/NotificationTest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/Notification/NotificationTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Persona/StandardUsage.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Persona/StandardUsage.js +7 -1
- package/lib-commonjs/FluentTester/TestComponents/Persona/StandardUsage.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Shadow/ShadowButtonTestSection.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Shadow/ShadowButtonTestSection.js +4 -2
- package/lib-commonjs/FluentTester/TestComponents/Shadow/ShadowButtonTestSection.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.js +17 -17
- package/lib-commonjs/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js +1 -1
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/PressableUsage.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/PressableUsage.js +5 -2
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/PressableUsage.js.map +1 -1
- package/lib-commonjs/FluentTester/theme/ThemePickers.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/theme/ThemePickers.js +6 -9
- package/lib-commonjs/FluentTester/theme/ThemePickers.js.map +1 -1
- package/package.json +14 -14
- package/src/E2E/Avatar/specs/Avatar.spec.win.ts +5 -3
- package/src/FluentTester/TestComponents/Badge/BadgeTest.tsx +10 -13
- package/src/FluentTester/TestComponents/Callout/CalloutTest.tsx +15 -3
- package/src/FluentTester/TestComponents/Common/AlignmentPicker.tsx +7 -2
- package/src/FluentTester/TestComponents/Common/MenuPicker.desktop.tsx +13 -12
- package/src/FluentTester/TestComponents/Common/MenuPicker.tsx +19 -7
- package/src/FluentTester/TestComponents/Common/MenuPicker.windows.tsx +3 -10
- package/src/FluentTester/TestComponents/Common/StyledPicker.tsx +7 -1
- package/src/FluentTester/TestComponents/Notification/NotificationTest.tsx +1 -3
- package/src/FluentTester/TestComponents/Persona/StandardUsage.tsx +8 -1
- package/src/FluentTester/TestComponents/Shadow/ShadowButtonTestSection.tsx +4 -2
- package/src/FluentTester/TestComponents/Shadow/ShadowDepthTestSection.tsx +45 -20
- package/src/FluentTester/TestComponents/TextExperimental/CustomizeUsage.tsx +1 -1
- package/src/FluentTester/TestComponents/TextExperimental/PressableUsage.tsx +13 -1
- package/src/FluentTester/theme/ThemePickers.tsx +7 -9
|
@@ -18,6 +18,9 @@ var PressableUsage = function () {
|
|
|
18
18
|
var _onPress2 = function () {
|
|
19
19
|
react_native_1.Alert.alert('Alert', 'Success!');
|
|
20
20
|
};
|
|
21
|
+
var _onPress3 = function () {
|
|
22
|
+
react_native_1.Alert.alert('Alert', 'onAccessibilityTap invoked!');
|
|
23
|
+
};
|
|
21
24
|
var _onKeyDown2 = function (ev) {
|
|
22
25
|
if (ev.nativeEvent.key === 'Enter' || ev.nativeEvent.key == ' ')
|
|
23
26
|
react_native_1.Alert.alert('Alert', 'Success!');
|
|
@@ -28,13 +31,13 @@ var PressableUsage = function () {
|
|
|
28
31
|
React.createElement(experimental_text_1.Text, { variant: 'bodyStandard' },
|
|
29
32
|
"To learn more about microsoft, visit this",
|
|
30
33
|
' ',
|
|
31
|
-
React.createElement(experimental_text_1.Text, { variant: 'bodyStandard', color: "blue", keyDownEvents: handledNativeKeyboardEvents, onPress: _onPress, onKeyDown: _onKeyDown }, "webpage"),
|
|
34
|
+
React.createElement(experimental_text_1.Text, { focusable: true, variant: 'bodyStandard', color: "blue", keyDownEvents: handledNativeKeyboardEvents, onPress: _onPress, onKeyDown: _onKeyDown }, "webpage"),
|
|
32
35
|
' ',
|
|
33
36
|
"for more details."),
|
|
34
37
|
React.createElement(experimental_text_1.Text, { variant: 'bodyStandard' },
|
|
35
38
|
"Press",
|
|
36
39
|
' ',
|
|
37
|
-
React.createElement(experimental_text_1.Text, { variant: 'bodyStandard', color: "blue", keyDownEvents: handledNativeKeyboardEvents, onPress: _onPress2, onKeyDown: _onKeyDown2 }, "here"),
|
|
40
|
+
React.createElement(experimental_text_1.Text, { variant: 'bodyStandard', color: "blue", keyDownEvents: handledNativeKeyboardEvents, onPress: _onPress2, onKeyDown: _onKeyDown2, onAccessibilityTap: _onPress3 }, "here"),
|
|
38
41
|
' ',
|
|
39
42
|
"to view an alert."))));
|
|
40
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PressableUsage.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/TextExperimental/PressableUsage.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,6CAAoD;AACpD,sDAAqD;AACrD,8EAAgE;AAChE,2CAA8C;AAGvC,IAAM,cAAc,GAA4B;IACrD,IAAM,QAAQ,GAAG;QACf,sBAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC/C,CAAC,CAAC;IAEF,IAAM,UAAU,GAAG,UAAC,EAAkB;QACpC,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,KAAK,OAAO,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,IAAI,OAAO;YAAE,sBAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACpH,CAAC,CAAC;IAEF,IAAM,SAAS,GAAG;QAChB,oBAAK,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,IAAM,WAAW,GAAG,UAAC,EAAkB;QACrC,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,KAAK,OAAO,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG;YAAE,oBAAK,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACpG,CAAC,CAAC;IAEF,IAAM,2BAA2B,GAA4B,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IAElG,OAAO,CACL,oBAAC,mBAAI;QACH,oBAAC,aAAK,IAAC,KAAK,EAAE,mBAAU,EAAE,GAAG,EAAE,CAAC;YAC9B,oBAAC,wBAAI,IAAC,OAAO,EAAE,cAAc;;gBACe,GAAG;gBAC7C,oBAAC,wBAAI,
|
|
1
|
+
{"version":3,"file":"PressableUsage.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/TextExperimental/PressableUsage.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,6CAAoD;AACpD,sDAAqD;AACrD,8EAAgE;AAChE,2CAA8C;AAGvC,IAAM,cAAc,GAA4B;IACrD,IAAM,QAAQ,GAAG;QACf,sBAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC/C,CAAC,CAAC;IAEF,IAAM,UAAU,GAAG,UAAC,EAAkB;QACpC,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,KAAK,OAAO,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,IAAI,OAAO;YAAE,sBAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACpH,CAAC,CAAC;IAEF,IAAM,SAAS,GAAG;QAChB,oBAAK,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,IAAM,SAAS,GAAG;QAChB,oBAAK,CAAC,KAAK,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAC;IACtD,CAAC,CAAC;IAEF,IAAM,WAAW,GAAG,UAAC,EAAkB;QACrC,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,KAAK,OAAO,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG;YAAE,oBAAK,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACpG,CAAC,CAAC;IAEF,IAAM,2BAA2B,GAA4B,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IAElG,OAAO,CACL,oBAAC,mBAAI;QACH,oBAAC,aAAK,IAAC,KAAK,EAAE,mBAAU,EAAE,GAAG,EAAE,CAAC;YAC9B,oBAAC,wBAAI,IAAC,OAAO,EAAE,cAAc;;gBACe,GAAG;gBAC7C,oBAAC,wBAAI,IACH,SAAS,QACT,OAAO,EAAE,cAAc,EACvB,KAAK,EAAC,MAAM,EACZ,aAAa,EAAE,2BAA2B,EAC1C,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,UAAU,cAGhB;gBAAC,GAAG;oCAEN;YACP,oBAAC,wBAAI,IAAC,OAAO,EAAE,cAAc;;gBACrB,GAAG;gBACT,oBAAC,wBAAI,IACH,OAAO,EAAE,cAAc,EACvB,KAAK,EAAC,MAAM,EACZ,aAAa,EAAE,2BAA2B,EAC1C,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,WAAW,EACtB,kBAAkB,EAAE,SAAS,WAGxB;gBAAC,GAAG;oCAEN,CACD,CACH,CACR,CAAC;AACJ,CAAC,CAAC;AAzDW,QAAA,cAAc,kBAyDzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemePickers.d.ts","sourceRoot":"","sources":["../../../src/FluentTester/theme/ThemePickers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;CAgB5B,CAAC;AAEH,aAAK,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD,aAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"ThemePickers.d.ts","sourceRoot":"","sources":["../../../src/FluentTester/theme/ThemePickers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;CAgB5B,CAAC;AAEH,aAAK,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD,aAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAY/D,CAAC;AAIF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBA+BhC,CAAC"}
|
|
@@ -26,15 +26,12 @@ exports.themePickerStyles = react_native_1.StyleSheet.create({
|
|
|
26
26
|
});
|
|
27
27
|
var PartPicker = function (props) {
|
|
28
28
|
var initial = props.initial, contents = props.contents, onChange = props.onChange;
|
|
29
|
-
var _a = React.useState(initial),
|
|
30
|
-
var onValueChange = React.useCallback(function (
|
|
31
|
-
|
|
32
|
-
onChange(
|
|
33
|
-
}, [
|
|
34
|
-
|
|
35
|
-
return entry.label;
|
|
36
|
-
});
|
|
37
|
-
return React.createElement(MenuPicker_1.MenuPicker, { selected: value, style: exports.themePickerStyles.dropdown, onChange: onValueChange, collection: MenuPickerCollection });
|
|
29
|
+
var _a = React.useState(initial), selected = _a[0], setSelected = _a[1];
|
|
30
|
+
var onValueChange = React.useCallback(function (value) {
|
|
31
|
+
setSelected(value);
|
|
32
|
+
onChange(value);
|
|
33
|
+
}, [setSelected, onChange]);
|
|
34
|
+
return React.createElement(MenuPicker_1.MenuPicker, { selected: selected, style: exports.themePickerStyles.dropdown, onChange: onValueChange, collection: contents });
|
|
38
35
|
};
|
|
39
36
|
exports.PartPicker = PartPicker;
|
|
40
37
|
var PickerLabel = experimental_text_1.Text.customize({ variant: 'bodySemibold' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemePickers.js","sourceRoot":"","sources":["../../../src/FluentTester/theme/ThemePickers.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,6CAAgD;AAChD,8EAAgE;AAChE,+CAA+D;AAC/D,2CAAwD;AACxD,2CAAyD;AAEzD,kEAAiE;AAEpD,QAAA,iBAAiB,GAAG,yBAAU,CAAC,MAAM,CAAC;IACjD,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;KACrB;IAED,MAAM,EAAE;QACN,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,CAAC;KACX;IAED,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAUI,IAAM,UAAU,GAA6C,UAAC,KAAsB;IACjF,IAAA,OAAO,GAAyB,KAAK,QAA9B,EAAE,QAAQ,GAAe,KAAK,SAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;IACxC,IAAA,
|
|
1
|
+
{"version":3,"file":"ThemePickers.js","sourceRoot":"","sources":["../../../src/FluentTester/theme/ThemePickers.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,6CAAgD;AAChD,8EAAgE;AAChE,+CAA+D;AAC/D,2CAAwD;AACxD,2CAAyD;AAEzD,kEAAiE;AAEpD,QAAA,iBAAiB,GAAG,yBAAU,CAAC,MAAM,CAAC;IACjD,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;KACrB;IAED,MAAM,EAAE;QACN,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,CAAC;KACX;IAED,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAUI,IAAM,UAAU,GAA6C,UAAC,KAAsB;IACjF,IAAA,OAAO,GAAyB,KAAK,QAA9B,EAAE,QAAQ,GAAe,KAAK,SAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;IACxC,IAAA,KAA0B,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAhD,QAAQ,QAAA,EAAE,WAAW,QAA2B,CAAC;IACxD,IAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CACrC,UAAC,KAAa;QACZ,WAAW,CAAC,KAAK,CAAC,CAAC;QACnB,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC,EACD,CAAC,WAAW,EAAE,QAAQ,CAAC,CACxB,CAAC;IAEF,OAAO,oBAAC,uBAAU,IAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,yBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,GAAI,CAAC;AAC9H,CAAC,CAAC;AAZW,QAAA,UAAU,cAYrB;AAEF,IAAM,WAAW,GAAG,wBAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;AAEzD,IAAM,YAAY,GAA4B;IACnD,IAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CAAC,UAAC,QAAgB;QACvD,0BAAW,CAAC,KAAK,GAAG,QAAuB,CAAC;IAC9C,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,UAAC,QAAgB;QACzD,0BAAW,CAAC,SAAS,GAAG,QAAsB,CAAC;IACjD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAM,kBAAkB,GAAG,KAAK,CAAC,WAAW,CAAC,UAAC,aAAqB;QACjE,0BAAW,CAAC,UAAU,GAAG,aAA2C,CAAC;IACvE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,mBAAI,IAAC,KAAK,EAAE,yBAAiB,CAAC,UAAU;QACvC,oBAAC,mBAAI,IAAC,KAAK,EAAE,yBAAiB,CAAC,MAAM;YACnC,oBAAC,WAAW,kBAAsB;YAClC,oBAAC,kBAAU,IAAC,OAAO,EAAE,0BAAW,CAAC,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,yBAAY,GAAI,CAC5F;QAEP,oBAAC,mBAAI,IAAC,KAAK,EAAE,yBAAiB,CAAC,MAAM;YACnC,oBAAC,WAAW,uBAA2B;YACvC,oBAAC,kBAAU,IAAC,OAAO,EAAE,0BAAW,CAAC,UAAU,EAAE,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAE,+BAAgB,GAAI,CACpG;QAEP,oBAAC,mBAAI,IAAC,KAAK,EAAE,yBAAiB,CAAC,MAAM;YACnC,oBAAC,WAAW,kBAAsB;YAClC,oBAAC,kBAAU,IAAC,OAAO,EAAE,0BAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,yBAAY,GAAI,CACtF,CACF,CACR,CAAC;AACJ,CAAC,CAAC;AA/BW,QAAA,YAAY,gBA+BvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.77.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>",
|
|
@@ -26,35 +26,35 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@fluentui-react-native/android-theme": ">=0.11.0 <1.0.0",
|
|
29
|
-
"@fluentui-react-native/apple-theme": ">=0.13.
|
|
30
|
-
"@fluentui-react-native/avatar": "^1.1.
|
|
31
|
-
"@fluentui-react-native/badge": ">=0.1.
|
|
32
|
-
"@fluentui-react-native/button": ">=0.24.
|
|
29
|
+
"@fluentui-react-native/apple-theme": ">=0.13.1 <1.0.0",
|
|
30
|
+
"@fluentui-react-native/avatar": "^1.1.15",
|
|
31
|
+
"@fluentui-react-native/badge": ">=0.1.3 <1.0.0",
|
|
32
|
+
"@fluentui-react-native/button": ">=0.24.5 <1.0.0",
|
|
33
33
|
"@fluentui-react-native/default-theme": ">=0.14.0 <1.0.0",
|
|
34
34
|
"@fluentui-react-native/experimental-activity-indicator": ">=0.6.0 <1.0.0",
|
|
35
35
|
"@fluentui-react-native/experimental-avatar": ">=0.16.0 <1.0.0",
|
|
36
|
-
"@fluentui-react-native/experimental-button": "0.16.
|
|
37
|
-
"@fluentui-react-native/experimental-checkbox": "0.12.
|
|
36
|
+
"@fluentui-react-native/experimental-button": "0.16.5",
|
|
37
|
+
"@fluentui-react-native/experimental-checkbox": "0.12.2",
|
|
38
38
|
"@fluentui-react-native/experimental-drawer": ">=0.2.0 <1.0.0",
|
|
39
39
|
"@fluentui-react-native/experimental-native-date-picker": ">=0.6.0 <1.0.0",
|
|
40
40
|
"@fluentui-react-native/experimental-expander": "0.4.0",
|
|
41
|
-
"@fluentui-react-native/experimental-menu-button": ">=0.4.
|
|
42
|
-
"@fluentui-react-native/experimental-shadow": "0.2.
|
|
41
|
+
"@fluentui-react-native/experimental-menu-button": ">=0.4.5 <1.0.0",
|
|
42
|
+
"@fluentui-react-native/experimental-shadow": "0.2.9",
|
|
43
43
|
"@fluentui-react-native/experimental-shimmer": "0.7.0",
|
|
44
|
-
"@fluentui-react-native/experimental-tabs": "0.5.
|
|
45
|
-
"@fluentui-react-native/experimental-text": ">=0.10.
|
|
44
|
+
"@fluentui-react-native/experimental-tabs": "0.5.2",
|
|
45
|
+
"@fluentui-react-native/experimental-text": ">=0.10.2 <1.0.0",
|
|
46
46
|
"@fluentui-react-native/framework": ">=0.8.0 <1.0.0",
|
|
47
47
|
"@fluentui-react-native/icon": "0.13.0",
|
|
48
48
|
"@fluentui-react-native/interactive-hooks": ">=0.17.0 <1.0.0",
|
|
49
|
-
"@fluentui-react-native/menu": "^1.0.
|
|
50
|
-
"@fluentui-react-native/notification": "0.
|
|
49
|
+
"@fluentui-react-native/menu": "^1.0.14",
|
|
50
|
+
"@fluentui-react-native/notification": "0.7.1",
|
|
51
51
|
"@fluentui-react-native/stack": ">=0.7.0 <1.0.0",
|
|
52
52
|
"@fluentui-react-native/theme": ">=0.7.0 <1.0.0",
|
|
53
53
|
"@fluentui-react-native/theme-types": ">=0.18.0 <1.0.0",
|
|
54
54
|
"@fluentui-react-native/themed-stylesheet": "^1.4.0",
|
|
55
55
|
"@fluentui-react-native/theming-utils": ">=0.14.0 <1.0.0",
|
|
56
56
|
"@fluentui-react-native/win32-theme": ">=0.20.0 <1.0.0",
|
|
57
|
-
"@fluentui/react-native": ">=0.31.
|
|
57
|
+
"@fluentui/react-native": ">=0.31.5 <1.0.0",
|
|
58
58
|
"@react-native-community/slider": "^4.2.0",
|
|
59
59
|
"@react-native-menu/menu": "^0.1.2",
|
|
60
60
|
"@react-native-picker/picker": "^2.2.1",
|
|
@@ -38,22 +38,24 @@ describe('Avatar Accessibility Testing', () => {
|
|
|
38
38
|
AvatarPageObject.scrollToTestElement();
|
|
39
39
|
AvatarPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
40
40
|
});
|
|
41
|
-
afterEach(() => {
|
|
42
|
-
expect(AvatarPageObject.didAssertPopup()).toBeFalsy(AvatarPageObject.ERRORMESSAGE_ASSERT);
|
|
43
|
-
});
|
|
44
41
|
it('Validate accessibilityLabel', () => {
|
|
45
42
|
expect(AvatarPageObject.getPrimaryComponentAttribute(ACCESSIBILITY_LABEL_ATTR)).toEqual(AVATAR_ACCESSIBILITY_LABEL);
|
|
43
|
+
expect(AvatarPageObject.didAssertPopup()).toBeFalsy(AvatarPageObject.ERRORMESSAGE_ASSERT);
|
|
46
44
|
});
|
|
47
45
|
it('Validate accessibilityLabel from `name` prop', () => {
|
|
48
46
|
expect(AvatarPageObject.getSecondaryComponentAttribute(ACCESSIBILITY_LABEL_ATTR)).toEqual(AVATAR_ACCESSIBILITY_LABEL_BY_NAME);
|
|
47
|
+
expect(AvatarPageObject.didAssertPopup()).toBeFalsy(AvatarPageObject.ERRORMESSAGE_ASSERT);
|
|
49
48
|
});
|
|
50
49
|
it('Validate accessibilityHint', () => {
|
|
51
50
|
expect(AvatarPageObject.getPrimaryComponentAttribute(ACCESSIBILITY_HINT_ATTRIBUTE)).toEqual(AVATAR_ACCESSIBILITY_HINT);
|
|
51
|
+
expect(AvatarPageObject.didAssertPopup()).toBeFalsy(AvatarPageObject.ERRORMESSAGE_ASSERT);
|
|
52
52
|
});
|
|
53
53
|
it('Validate accessibilityRole', () => {
|
|
54
54
|
expect(AvatarPageObject.getPrimaryComponentAttribute(ACCESSIBILITY_ROLE_ATTRIBUTE)).toEqual(ACCESSIBILITY_ROLE_LINK);
|
|
55
|
+
expect(AvatarPageObject.didAssertPopup()).toBeFalsy(AvatarPageObject.ERRORMESSAGE_ASSERT);
|
|
55
56
|
});
|
|
56
57
|
it('Validate default accessibilityRole', () => {
|
|
57
58
|
expect(AvatarPageObject.getSecondaryComponentAttribute(ACCESSIBILITY_ROLE_ATTRIBUTE)).toEqual(ACCESSIBILITY_ROLE_IMAGE);
|
|
59
|
+
expect(AvatarPageObject.didAssertPopup()).toBeFalsy(AvatarPageObject.ERRORMESSAGE_ASSERT);
|
|
58
60
|
});
|
|
59
61
|
});
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { BADGE_TESTPAGE } from './consts';
|
|
4
4
|
import { Test, TestSection, PlatformStatus } from '../Test';
|
|
5
5
|
import { View, Platform, Text } from 'react-native';
|
|
6
|
-
import { Badge,
|
|
6
|
+
import { Badge, PresenceBadge } from '@fluentui-react-native/badge';
|
|
7
7
|
import BadgeSvg from './oof.svg';
|
|
8
8
|
|
|
9
9
|
import { SvgIconProps } from '@fluentui-react-native/icon';
|
|
@@ -38,18 +38,18 @@ export const BasicBadge: React.FunctionComponent = () => {
|
|
|
38
38
|
<View>
|
|
39
39
|
<Badge />
|
|
40
40
|
<Text>Appearance</Text>
|
|
41
|
-
<Badge appearance="outline"
|
|
41
|
+
<Badge appearance="outline">Outline badge</Badge>
|
|
42
42
|
<Text>Shape</Text>
|
|
43
|
-
<Badge shape="circular"
|
|
44
|
-
<Badge shape="rounded"
|
|
45
|
-
<Badge shape="square"
|
|
43
|
+
<Badge shape="circular">Circular badge</Badge>
|
|
44
|
+
<Badge shape="rounded">Rounded badge</Badge>
|
|
45
|
+
<Badge shape="square">Square badge</Badge>
|
|
46
46
|
<Text>Size</Text>
|
|
47
47
|
<Badge size="smallest" shape="circular" />
|
|
48
48
|
<Badge size="smaller" shape="circular" />
|
|
49
|
-
<Badge size="small"
|
|
50
|
-
<Badge size="medium"
|
|
51
|
-
<Badge size="large"
|
|
52
|
-
<Badge size="largest"
|
|
49
|
+
<Badge size="small">Small</Badge>
|
|
50
|
+
<Badge size="medium">Medium</Badge>
|
|
51
|
+
<Badge size="large">Large</Badge>
|
|
52
|
+
<Badge size="largest">Largest</Badge>
|
|
53
53
|
{svgIconsEnabled && (
|
|
54
54
|
<>
|
|
55
55
|
<Text>Badge with icon</Text>
|
|
@@ -61,10 +61,7 @@ export const BasicBadge: React.FunctionComponent = () => {
|
|
|
61
61
|
<BadgeNoBorder appearance="outline" icon={iconProps} />
|
|
62
62
|
</>
|
|
63
63
|
)}
|
|
64
|
-
<StyledBadge appearance="outline"
|
|
65
|
-
<Text>Compressible badge</Text>
|
|
66
|
-
<CompressibleBadge />
|
|
67
|
-
<CompressibleBadge text="Basic compressible" />
|
|
64
|
+
<StyledBadge appearance="outline">Styled badge</StyledBadge>
|
|
68
65
|
{svgIconsEnabled && (
|
|
69
66
|
<>
|
|
70
67
|
<Text>Presence Badge</Text>
|
|
@@ -173,12 +173,24 @@ const StandardCallout: React.FunctionComponent = () => {
|
|
|
173
173
|
|
|
174
174
|
const colorDefault: string = 'default';
|
|
175
175
|
const colorSelections: string[] = [colorDefault, 'red', 'green', 'blue'];
|
|
176
|
+
const menuPickerColorCollection = colorSelections.map((color) => {
|
|
177
|
+
return {
|
|
178
|
+
label: color,
|
|
179
|
+
value: color,
|
|
180
|
+
};
|
|
181
|
+
});
|
|
176
182
|
|
|
177
183
|
const [selectedBackgroundColor, setSelectedBackgroundColor] = React.useState<string | undefined>(undefined);
|
|
178
184
|
const [selectedBorderColor, setSelectedBorderColor] = React.useState<string | undefined>(undefined);
|
|
179
185
|
|
|
180
186
|
const borderWidthDefault: string = '1';
|
|
181
187
|
const borderWidthSelections: string[] = ['1', '2', '4', '10'];
|
|
188
|
+
const menuPickerBorderWidthCollection = borderWidthSelections.map((width) => {
|
|
189
|
+
return {
|
|
190
|
+
label: width,
|
|
191
|
+
value: width,
|
|
192
|
+
};
|
|
193
|
+
});
|
|
182
194
|
|
|
183
195
|
const [selectedBorderWidth, setSelectedBorderWidth] = React.useState<string | undefined>(undefined);
|
|
184
196
|
|
|
@@ -238,19 +250,19 @@ const StandardCallout: React.FunctionComponent = () => {
|
|
|
238
250
|
prompt="Background Color"
|
|
239
251
|
selected={selectedBackgroundColor || colorDefault}
|
|
240
252
|
onChange={(color) => setSelectedBackgroundColor(color === colorDefault ? undefined : color)}
|
|
241
|
-
collection={
|
|
253
|
+
collection={menuPickerColorCollection}
|
|
242
254
|
/>
|
|
243
255
|
<MenuPicker
|
|
244
256
|
prompt="Border Color"
|
|
245
257
|
selected={selectedBorderColor || colorDefault}
|
|
246
258
|
onChange={(color) => setSelectedBorderColor(color === colorDefault ? undefined : color)}
|
|
247
|
-
collection={
|
|
259
|
+
collection={menuPickerColorCollection}
|
|
248
260
|
/>
|
|
249
261
|
<MenuPicker
|
|
250
262
|
prompt="Border Width"
|
|
251
263
|
selected={selectedBorderWidth || borderWidthDefault}
|
|
252
264
|
onChange={(color) => setSelectedBorderWidth(color === colorDefault ? undefined : color)}
|
|
253
|
-
collection={
|
|
265
|
+
collection={menuPickerBorderWidthCollection}
|
|
254
266
|
/>
|
|
255
267
|
</View>
|
|
256
268
|
|
|
@@ -15,7 +15,12 @@ interface IAlignmentPickerProps {
|
|
|
15
15
|
export const AlignmentPicker: React.FunctionComponent<IAlignmentPickerProps> = (props: IAlignmentPickerProps) => {
|
|
16
16
|
const { label, onSelectionChange, style } = props;
|
|
17
17
|
const [selectedValue, setSelectedValue] = React.useState<IconAlignment>();
|
|
18
|
-
|
|
18
|
+
const alignmentCollection = alignmentValues.map((value) => {
|
|
19
|
+
return {
|
|
20
|
+
label: value,
|
|
21
|
+
value: value,
|
|
22
|
+
};
|
|
23
|
+
});
|
|
19
24
|
return (
|
|
20
25
|
<MenuPicker
|
|
21
26
|
style={style}
|
|
@@ -26,7 +31,7 @@ export const AlignmentPicker: React.FunctionComponent<IAlignmentPickerProps> = (
|
|
|
26
31
|
onSelectionChange(alignmentValue);
|
|
27
32
|
setSelectedValue(alignmentValue);
|
|
28
33
|
}}
|
|
29
|
-
collection={
|
|
34
|
+
collection={alignmentCollection}
|
|
30
35
|
/>
|
|
31
36
|
);
|
|
32
37
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Text, View, StyleSheet } from 'react-native';
|
|
3
3
|
import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from '@fluentui-react-native/menu';
|
|
4
|
+
import { MenuPickerProps, collectionItem } from './MenuPicker';
|
|
4
5
|
import { ButtonV1 as Button } from '@fluentui/react-native';
|
|
5
6
|
import { SvgXml } from 'react-native-svg';
|
|
6
7
|
|
|
@@ -9,23 +10,23 @@ const chevronXml = `
|
|
|
9
10
|
<path fill='currentColor' d='M0.646447 0.646447C0.841709 0.451184 1.15829 0.451184 1.35355 0.646447L5.5 4.79289L9.64645 0.646447C9.84171 0.451185 10.1583 0.451185 10.3536 0.646447C10.5488 0.841709 10.5488 1.15829 10.3536 1.35355L5.85355 5.85355C5.65829 6.04882 5.34171 6.04882 5.14645 5.85355L0.646447 1.35355C0.451184 1.15829 0.451184 0.841709 0.646447 0.646447Z' />
|
|
10
11
|
</svg>`;
|
|
11
12
|
|
|
12
|
-
interface MenuPickerProps {
|
|
13
|
-
prompt?: string;
|
|
14
|
-
selected?: any;
|
|
15
|
-
onChange?: (value: any, index?: number) => void;
|
|
16
|
-
collection?: any[];
|
|
17
|
-
style?: any;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
13
|
export const MenuPicker: React.FunctionComponent<MenuPickerProps> = (props: MenuPickerProps) => {
|
|
21
14
|
const { prompt, selected, onChange, collection } = props;
|
|
15
|
+
|
|
16
|
+
let label;
|
|
17
|
+
collection.forEach((item) => {
|
|
18
|
+
if (item.value == selected) {
|
|
19
|
+
label = item.label;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
22
23
|
return (
|
|
23
24
|
<View style={menuPickerStyles.container}>
|
|
24
25
|
<Text style={menuPickerStyles.prompt}>{prompt}</Text>
|
|
25
26
|
<Menu>
|
|
26
27
|
<MenuTrigger>
|
|
27
28
|
<Button>
|
|
28
|
-
<Text>{
|
|
29
|
+
<Text>{label}</Text>
|
|
29
30
|
<View style={menuPickerStyles.chevronContainer}>
|
|
30
31
|
<SvgXml xml={chevronXml} />
|
|
31
32
|
</View>
|
|
@@ -33,9 +34,9 @@ export const MenuPicker: React.FunctionComponent<MenuPickerProps> = (props: Menu
|
|
|
33
34
|
</MenuTrigger>
|
|
34
35
|
<MenuPopover>
|
|
35
36
|
<MenuList>
|
|
36
|
-
{collection.map((
|
|
37
|
-
<MenuItem onClick={() => onChange(value, index)} key={index}>
|
|
38
|
-
{
|
|
37
|
+
{collection.map((collectionItem: collectionItem, index: number) => (
|
|
38
|
+
<MenuItem onClick={() => onChange(collectionItem.value, index)} key={collectionItem.value ?? index}>
|
|
39
|
+
{collectionItem.label}
|
|
39
40
|
</MenuItem>
|
|
40
41
|
))}
|
|
41
42
|
</MenuList>
|
|
@@ -6,26 +6,38 @@ import { Picker } from '@react-native-picker/picker';
|
|
|
6
6
|
* MenuPicker uses the community Picker package for iOS/Win32 and our own Picker for Win32/MacOS.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
interface
|
|
9
|
+
export interface collectionItem {
|
|
10
|
+
label: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface MenuPickerProps {
|
|
10
15
|
prompt?: string;
|
|
11
|
-
selected?:
|
|
16
|
+
selected?: string;
|
|
12
17
|
onChange?: (value: any, index?: number) => void;
|
|
13
|
-
collection?:
|
|
18
|
+
collection?: collectionItem[];
|
|
14
19
|
style?: any;
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
export const MenuPicker: React.FunctionComponent<MenuPickerProps> = (props: MenuPickerProps) => {
|
|
18
23
|
const { prompt, selected, onChange, collection, style } = props;
|
|
24
|
+
let selectedItemKey;
|
|
25
|
+
|
|
26
|
+
collection.forEach((item) => {
|
|
27
|
+
if (item.value == selected) {
|
|
28
|
+
selectedItemKey = item.value;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
19
31
|
|
|
20
32
|
return (
|
|
21
33
|
<Picker
|
|
22
34
|
prompt={prompt}
|
|
23
|
-
selectedValue={
|
|
24
|
-
onValueChange={(
|
|
35
|
+
selectedValue={selectedItemKey}
|
|
36
|
+
onValueChange={(value: string, index: number) => onChange(value, index)}
|
|
25
37
|
style={{ ...style }}
|
|
26
38
|
>
|
|
27
|
-
{collection.map((
|
|
28
|
-
<Picker.Item label={
|
|
39
|
+
{collection.map((item, index) => (
|
|
40
|
+
<Picker.Item label={item.label} key={index} value={item.value} />
|
|
29
41
|
))}
|
|
30
42
|
</Picker>
|
|
31
43
|
);
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
export * from './MenuPicker.desktop';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Button, Text, View, StyleSheet } from 'react-native';
|
|
4
|
-
|
|
5
|
-
interface MenuPickerProps {
|
|
6
|
-
prompt?: string;
|
|
7
|
-
selected?: any;
|
|
8
|
-
onChange?: (value: any, index?: number) => void;
|
|
9
|
-
collection?: any[];
|
|
10
|
-
style?: any;
|
|
11
|
-
}
|
|
4
|
+
import { MenuPickerProps, collectionItem } from './MenuPicker';
|
|
12
5
|
|
|
13
6
|
export const MenuPicker: React.FunctionComponent<MenuPickerProps> = (props: MenuPickerProps) => {
|
|
14
7
|
const { prompt, onChange, collection } = props;
|
|
15
8
|
return (
|
|
16
9
|
<View style={menuPickerStyles.container}>
|
|
17
10
|
<Text style={menuPickerStyles.prompt}>{prompt}</Text>
|
|
18
|
-
{collection.map((
|
|
19
|
-
<Button onPress={() => onChange(value, index)} key={index} title={
|
|
11
|
+
{collection.map((item: collectionItem, index: number) => (
|
|
12
|
+
<Button onPress={() => onChange(item.value, index)} key={index} title={item.label} />
|
|
20
13
|
))}
|
|
21
14
|
</View>
|
|
22
15
|
);
|
|
@@ -8,5 +8,11 @@ export const StyledPicker = (props) => {
|
|
|
8
8
|
const { prompt, selected, onChange, collection } = props;
|
|
9
9
|
const theme = useTheme();
|
|
10
10
|
const pickerStyles = { color: theme.colors.inputText as ColorValue, ...commonStyles.header };
|
|
11
|
-
|
|
11
|
+
const styleCollection = collection.map((value) => {
|
|
12
|
+
return {
|
|
13
|
+
label: value,
|
|
14
|
+
value: value,
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
return <MenuPicker prompt={prompt} style={pickerStyles} selected={selected} onChange={onChange} collection={styleCollection} />;
|
|
12
18
|
};
|
|
@@ -28,8 +28,7 @@ const PrimaryTestWithTitleAndIcon: React.FunctionComponent = () => {
|
|
|
28
28
|
<Notification
|
|
29
29
|
variant={'primary'}
|
|
30
30
|
icon={iconProps}
|
|
31
|
-
title="Kat's
|
|
32
|
-
action="X"
|
|
31
|
+
title="Kat's iPhoneX"
|
|
33
32
|
onPress={() => {
|
|
34
33
|
console.log('Notification tapped');
|
|
35
34
|
}}
|
|
@@ -71,7 +70,6 @@ const WarningTest: React.FunctionComponent = () => {
|
|
|
71
70
|
return (
|
|
72
71
|
<Notification
|
|
73
72
|
variant={'warning'}
|
|
74
|
-
action="X"
|
|
75
73
|
onPress={() => {
|
|
76
74
|
console.log('Notification tapped');
|
|
77
75
|
}}
|
|
@@ -21,6 +21,13 @@ const allSizes: WithUndefined<PersonaSize>[] = [
|
|
|
21
21
|
'size120',
|
|
22
22
|
];
|
|
23
23
|
|
|
24
|
+
const allSizesCollection = allSizes.map((size) => {
|
|
25
|
+
return {
|
|
26
|
+
label: size,
|
|
27
|
+
value: size,
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
|
|
24
31
|
interface ISwitchWithLabelProps {
|
|
25
32
|
label: string;
|
|
26
33
|
value: boolean;
|
|
@@ -59,7 +66,7 @@ export const StandardUsage: React.FunctionComponent = () => {
|
|
|
59
66
|
style={commonStyles.header}
|
|
60
67
|
selected={imageSize || undefinedText}
|
|
61
68
|
onChange={(size: PersonaSize | typeof undefinedText) => setImageSize(size === undefinedText ? undefined : size)}
|
|
62
|
-
collection={
|
|
69
|
+
collection={allSizesCollection}
|
|
63
70
|
/>
|
|
64
71
|
</View>
|
|
65
72
|
|
|
@@ -3,8 +3,10 @@ import { Platform, View } from 'react-native';
|
|
|
3
3
|
import { FAB, Text } from '@fluentui/react-native';
|
|
4
4
|
import { commonTestStyles, stackStyle } from '../Common/styles';
|
|
5
5
|
|
|
6
|
-
const CustomFABNoShadow = FAB.customize({
|
|
7
|
-
const CustomFABShadow64 = FAB.customize({
|
|
6
|
+
const CustomFABNoShadow = FAB.customize({ shadowToken: undefined });
|
|
7
|
+
const CustomFABShadow64 = FAB.customize({
|
|
8
|
+
shadowToken: { ambient: { x: 0, y: 0, blur: 8, color: '#00000033' }, key: { x: 0, y: 32, blur: 64, color: '#0000003d' } },
|
|
9
|
+
});
|
|
8
10
|
|
|
9
11
|
export const ShadowButtonTestSection: React.FunctionComponent = () => {
|
|
10
12
|
if (Platform.OS === 'ios') {
|
|
@@ -2,8 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { commonTestStyles } from '../Common/styles';
|
|
3
3
|
import { ColorValue, View } from 'react-native';
|
|
4
4
|
import { Text } from '@fluentui/react-native';
|
|
5
|
-
import { Shadow,
|
|
6
|
-
import {
|
|
5
|
+
import { Shadow, getShadowTokenStyleSet } from '@fluentui-react-native/experimental-shadow';
|
|
6
|
+
import { ShadowToken, useTheme } from '@fluentui-react-native/theme-types';
|
|
7
7
|
import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
|
|
8
8
|
import { useFluentTheme } from '@fluentui-react-native/framework';
|
|
9
9
|
|
|
@@ -25,7 +25,8 @@ const getThemedStyles = themedStyleSheet(() => {
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
interface ShadowTestBoxProps {
|
|
28
|
-
|
|
28
|
+
shadowDepthText: string;
|
|
29
|
+
shadowToken: ShadowToken;
|
|
29
30
|
backgroundColor: ColorValue;
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -34,7 +35,7 @@ const ShadowTestBox: React.FunctionComponent<ShadowTestBoxProps> = (props: Shado
|
|
|
34
35
|
const themedStyles = getThemedStyles(theme);
|
|
35
36
|
|
|
36
37
|
return (
|
|
37
|
-
<Shadow
|
|
38
|
+
<Shadow shadowToken={props.shadowToken}>
|
|
38
39
|
<View
|
|
39
40
|
style={[
|
|
40
41
|
commonTestStyles.view,
|
|
@@ -44,8 +45,8 @@ const ShadowTestBox: React.FunctionComponent<ShadowTestBoxProps> = (props: Shado
|
|
|
44
45
|
{ backgroundColor: props.backgroundColor },
|
|
45
46
|
]}
|
|
46
47
|
>
|
|
47
|
-
<Text variant="bodySemibold">{props.
|
|
48
|
-
<Text>{getShadowDescription(props.
|
|
48
|
+
<Text variant="bodySemibold">{props.shadowDepthText}</Text>
|
|
49
|
+
<Text>{getShadowDescription(props.shadowToken)}</Text>
|
|
49
50
|
</View>
|
|
50
51
|
</Shadow>
|
|
51
52
|
);
|
|
@@ -56,24 +57,48 @@ export const ShadowDepthTestSection: React.FunctionComponent = () => {
|
|
|
56
57
|
|
|
57
58
|
return (
|
|
58
59
|
<View>
|
|
59
|
-
<ShadowTestBox
|
|
60
|
-
<ShadowTestBox
|
|
61
|
-
<ShadowTestBox
|
|
62
|
-
<ShadowTestBox
|
|
63
|
-
<ShadowTestBox
|
|
64
|
-
<ShadowTestBox
|
|
65
|
-
<ShadowTestBox
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<ShadowTestBox
|
|
60
|
+
<ShadowTestBox shadowDepthText="Shadow 2" shadowToken={theme.shadows.shadow2} backgroundColor={theme.colors.background} />
|
|
61
|
+
<ShadowTestBox shadowDepthText="Shadow 4" shadowToken={theme.shadows.shadow4} backgroundColor={theme.colors.background} />
|
|
62
|
+
<ShadowTestBox shadowDepthText="Shadow 8" shadowToken={theme.shadows.shadow8} backgroundColor={theme.colors.background} />
|
|
63
|
+
<ShadowTestBox shadowDepthText="Shadow 16" shadowToken={theme.shadows.shadow16} backgroundColor={theme.colors.background} />
|
|
64
|
+
<ShadowTestBox shadowDepthText="Shadow 28" shadowToken={theme.shadows.shadow28} backgroundColor={theme.colors.background} />
|
|
65
|
+
<ShadowTestBox shadowDepthText="Shadow 64" shadowToken={theme.shadows.shadow64} backgroundColor={theme.colors.background} />
|
|
66
|
+
<ShadowTestBox
|
|
67
|
+
shadowDepthText="Brand Shadow 2"
|
|
68
|
+
shadowToken={theme.shadows.shadow2brand}
|
|
69
|
+
backgroundColor={theme.colors.brandBackground}
|
|
70
|
+
/>
|
|
71
|
+
<ShadowTestBox
|
|
72
|
+
shadowDepthText="Brand Shadow 4"
|
|
73
|
+
shadowToken={theme.shadows.shadow4brand}
|
|
74
|
+
backgroundColor={theme.colors.brandBackground}
|
|
75
|
+
/>
|
|
76
|
+
<ShadowTestBox
|
|
77
|
+
shadowDepthText="Brand Shadow 8"
|
|
78
|
+
shadowToken={theme.shadows.shadow8brand}
|
|
79
|
+
backgroundColor={theme.colors.brandBackground}
|
|
80
|
+
/>
|
|
81
|
+
<ShadowTestBox
|
|
82
|
+
shadowDepthText="Brand Shadow 16"
|
|
83
|
+
shadowToken={theme.shadows.shadow16brand}
|
|
84
|
+
backgroundColor={theme.colors.brandBackground}
|
|
85
|
+
/>
|
|
86
|
+
<ShadowTestBox
|
|
87
|
+
shadowDepthText="Brand Shadow 28"
|
|
88
|
+
shadowToken={theme.shadows.shadow28brand}
|
|
89
|
+
backgroundColor={theme.colors.brandBackground}
|
|
90
|
+
/>
|
|
91
|
+
<ShadowTestBox
|
|
92
|
+
shadowDepthText="Brand Shadow 64"
|
|
93
|
+
shadowToken={theme.shadows.shadow64brand}
|
|
94
|
+
backgroundColor={theme.colors.brandBackground}
|
|
95
|
+
/>
|
|
71
96
|
</View>
|
|
72
97
|
);
|
|
73
98
|
};
|
|
74
99
|
|
|
75
|
-
function getShadowDescription(
|
|
76
|
-
const shadowStyle = getShadowTokenStyleSet(
|
|
100
|
+
function getShadowDescription(shadowToken: ShadowToken): string {
|
|
101
|
+
const shadowStyle = getShadowTokenStyleSet(shadowToken);
|
|
77
102
|
|
|
78
103
|
return (
|
|
79
104
|
'\nAmbient: ' +
|
|
@@ -50,7 +50,7 @@ export const CustomizeUsage: React.FunctionComponent = () => {
|
|
|
50
50
|
const BlockText = () => {
|
|
51
51
|
return (
|
|
52
52
|
<>
|
|
53
|
-
<Text style={{ textTransform: 'uppercase' }} font="base" weight="medium">
|
|
53
|
+
<Text style={{ textTransform: 'uppercase' }} font="base" weight="medium" truncate>
|
|
54
54
|
I am going to be truncated since I am a very very very very very very very very very very very very very very very very very very
|
|
55
55
|
very very very very very very very very very very very very very very very very very very very very very very very very very very
|
|
56
56
|
very very very very very very very very very very very very very very very very long block text.
|
|
@@ -18,6 +18,10 @@ export const PressableUsage: React.FunctionComponent = () => {
|
|
|
18
18
|
Alert.alert('Alert', 'Success!');
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
const _onPress3 = (): void => {
|
|
22
|
+
Alert.alert('Alert', 'onAccessibilityTap invoked!');
|
|
23
|
+
};
|
|
24
|
+
|
|
21
25
|
const _onKeyDown2 = (ev: IKeyboardEvent) => {
|
|
22
26
|
if (ev.nativeEvent.key === 'Enter' || ev.nativeEvent.key == ' ') Alert.alert('Alert', 'Success!');
|
|
23
27
|
};
|
|
@@ -29,7 +33,14 @@ export const PressableUsage: React.FunctionComponent = () => {
|
|
|
29
33
|
<Stack style={stackStyle} gap={5}>
|
|
30
34
|
<Text variant={'bodyStandard'}>
|
|
31
35
|
To learn more about microsoft, visit this{' '}
|
|
32
|
-
<Text
|
|
36
|
+
<Text
|
|
37
|
+
focusable
|
|
38
|
+
variant={'bodyStandard'}
|
|
39
|
+
color="blue"
|
|
40
|
+
keyDownEvents={handledNativeKeyboardEvents}
|
|
41
|
+
onPress={_onPress}
|
|
42
|
+
onKeyDown={_onKeyDown}
|
|
43
|
+
>
|
|
33
44
|
webpage
|
|
34
45
|
</Text>{' '}
|
|
35
46
|
for more details.
|
|
@@ -42,6 +53,7 @@ export const PressableUsage: React.FunctionComponent = () => {
|
|
|
42
53
|
keyDownEvents={handledNativeKeyboardEvents}
|
|
43
54
|
onPress={_onPress2}
|
|
44
55
|
onKeyDown={_onKeyDown2}
|
|
56
|
+
onAccessibilityTap={_onPress3}
|
|
45
57
|
>
|
|
46
58
|
here
|
|
47
59
|
</Text>{' '}
|