@office-iss/react-native-win32 0.71.8 → 0.71.9
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 +16 -1
- package/CHANGELOG.md +12 -4
- package/Libraries/Text/TextNativeComponent.win32.js +31 -5
- package/overrides.json +0 -4
- package/package.json +3 -3
- package/Libraries/Components/Text/Tests/TextWin32Test.d.ts +0 -8
- package/Libraries/Components/Text/Tests/TextWin32Test.js +0 -120
- package/Libraries/Components/Text/Tests/TextWin32Test.js.map +0 -1
- package/src/Libraries/Components/Text/Tests/TextWin32Test.tsx +0 -164
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Thu, 08 Jun 2023
|
|
5
|
+
"date": "Thu, 08 Jun 2023 17:58:35 GMT",
|
|
6
|
+
"tag": "@office-iss/react-native-win32_v0.71.9",
|
|
7
|
+
"version": "0.71.9",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "202f2e9fdb03deb76dbbd7efe7facdfab62a23ab",
|
|
14
|
+
"comment": "Fix various text properties not being forwarded to native"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Thu, 08 Jun 2023 02:10:56 GMT",
|
|
6
21
|
"tag": "@office-iss/react-native-win32_v0.71.8",
|
|
7
22
|
"version": "0.71.8",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu, 08 Jun 2023
|
|
3
|
+
This log was last generated on Thu, 08 Jun 2023 17:58:35 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.71.
|
|
7
|
+
## 0.71.9
|
|
8
8
|
|
|
9
|
-
Thu, 08 Jun 2023
|
|
9
|
+
Thu, 08 Jun 2023 17:58:35 GMT
|
|
10
10
|
|
|
11
11
|
### Patches
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- Fix various text properties not being forwarded to native (30809111+acoates-ms@users.noreply.github.com)
|
|
14
14
|
|
|
15
|
+
## 0.71.8
|
|
16
|
+
|
|
17
|
+
Thu, 08 Jun 2023 02:10:56 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Add missing eventPhase on IHandledKeyboardEvent (30809111+acoates-ms@users.noreply.github.com)
|
|
22
|
+
|
|
15
23
|
## 0.71.7
|
|
16
24
|
|
|
17
25
|
Tue, 06 Jun 2023 23:29:48 GMT
|
|
@@ -48,12 +48,38 @@ const textViewConfig = {
|
|
|
48
48
|
android_hyphenationFrequency: true,
|
|
49
49
|
lineBreakStrategyIOS: true,
|
|
50
50
|
// [Windows
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
accessibilityAccessKey: true,
|
|
52
|
+
accessibilityAnnotation: true,
|
|
53
|
+
accessibilityControls: true,
|
|
54
|
+
accessibilityDescribedBy: true,
|
|
55
|
+
accessibilityDescription: true,
|
|
56
|
+
accessibilityItemType: true,
|
|
56
57
|
accessibilityLevel: true,
|
|
58
|
+
accessibilityPositionInSet: true,
|
|
59
|
+
accessibilitySetSize: true,
|
|
60
|
+
animationClass: true,
|
|
61
|
+
cursor: true,
|
|
62
|
+
draggedTypes: true,
|
|
63
|
+
enableFocusRing: true,
|
|
64
|
+
focusable: true,
|
|
65
|
+
keyDownEvents: true,
|
|
66
|
+
keyUpEvents: true,
|
|
67
|
+
onBlur: true,
|
|
68
|
+
onBlurCapture: true,
|
|
69
|
+
onDragEnter: true,
|
|
70
|
+
onDragLeave: true,
|
|
71
|
+
onDrop: true,
|
|
72
|
+
onFocus: true,
|
|
73
|
+
onFocusCapture: true,
|
|
74
|
+
onKeyDown: true,
|
|
75
|
+
onKeyDownCapture: true,
|
|
76
|
+
onKeyUp: true,
|
|
77
|
+
onKeyUpCapture: true,
|
|
78
|
+
onMouseEnter: true,
|
|
79
|
+
onMouseLeave: true,
|
|
80
|
+
tabIndex: true,
|
|
81
|
+
textStyle: true,
|
|
82
|
+
tooltip: true,
|
|
57
83
|
// Windows]
|
|
58
84
|
},
|
|
59
85
|
directEventTypes: {
|
package/overrides.json
CHANGED
|
@@ -97,10 +97,6 @@
|
|
|
97
97
|
"baseFile": "Libraries/Components/SafeAreaView/SafeAreaView.js",
|
|
98
98
|
"baseHash": "bde271c753be96e28b5f1b539d0d9a0cbeee77ab"
|
|
99
99
|
},
|
|
100
|
-
{
|
|
101
|
-
"type": "platform",
|
|
102
|
-
"file": "src/Libraries/Components/Text/Tests/TextWin32Test.tsx"
|
|
103
|
-
},
|
|
104
100
|
{
|
|
105
101
|
"type": "platform",
|
|
106
102
|
"file": "src/Libraries/Components/Text/TextWin32.Props.ts"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.9",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./index.win32.js",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"flow-check": "flow check",
|
|
13
13
|
"lint:fix": "rnw-scripts lint:fix",
|
|
14
14
|
"lint": "rnw-scripts lint",
|
|
15
|
-
"run-win32-devmain": "npx @office-iss/rex-win32@0.
|
|
16
|
-
"run-win32": "npx @office-iss/rex-win32@0.
|
|
15
|
+
"run-win32-devmain": "npx @office-iss/rex-win32@0.71.15-devmain.16607.10000 --bundle js/RNTesterApp --component RNTesterApp --basePath ./dist/win32/dev --jsEngine v8 --useDevMain --useDirectDebugger --useFastRefresh",
|
|
16
|
+
"run-win32": "npx @office-iss/rex-win32@0.71.15-devmain.16607.10000 --bundle js/RNTesterApp --component RNTesterApp --basePath ./dist/win32/dev --jsEngine v8 --useDirectDebugger --useFastRefresh",
|
|
17
17
|
"start": "react-native start --projectRoot ../react-native-win32-tester",
|
|
18
18
|
"test": "jest",
|
|
19
19
|
"validate-overrides": "react-native-platform-override validate"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const title = "TextWin32";
|
|
2
|
-
export declare const displayName = "TextWin32";
|
|
3
|
-
export declare const description = "TextWin32 Examples and Tests";
|
|
4
|
-
export declare const examples: {
|
|
5
|
-
title: string;
|
|
6
|
-
description: string;
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
-
}[];
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.examples = exports.description = exports.displayName = exports.title = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const react_native_1 = require("react-native");
|
|
9
|
-
const TextWin32_1 = require("../../Text/TextWin32");
|
|
10
|
-
const ViewWin32_1 = require("../../View/ViewWin32");
|
|
11
|
-
// Disabling no-jsx-lambda so functional components are more convenient to use
|
|
12
|
-
const TextRunsTest = () => {
|
|
13
|
-
return (react_1.default.createElement(react_native_1.View, { focusable: true },
|
|
14
|
-
react_1.default.createElement(TextWin32_1.TextWin32, null,
|
|
15
|
-
react_1.default.createElement(TextWin32_1.TextWin32, null, "Text With "),
|
|
16
|
-
react_1.default.createElement(TextWin32_1.TextWin32, null, "Multiple Text "),
|
|
17
|
-
react_1.default.createElement(TextWin32_1.TextWin32, null, "Children [Runs]"))));
|
|
18
|
-
};
|
|
19
|
-
const FocusableTextTest = () => {
|
|
20
|
-
return (react_1.default.createElement(ViewWin32_1.ViewWin32, null,
|
|
21
|
-
react_1.default.createElement(TextWin32_1.TextWin32, { focusable: true }, "This TextWin32 demonstrates focusable")));
|
|
22
|
-
};
|
|
23
|
-
const SelectableTextTest = () => {
|
|
24
|
-
return (react_1.default.createElement(ViewWin32_1.ViewWin32, null,
|
|
25
|
-
react_1.default.createElement(TextWin32_1.TextWin32, { selectable: true }, "This TextWin32 demonstrates selectable")));
|
|
26
|
-
};
|
|
27
|
-
const TextStyleTest = () => {
|
|
28
|
-
return (react_1.default.createElement(ViewWin32_1.ViewWin32, null,
|
|
29
|
-
react_1.default.createElement(TextWin32_1.TextWin32, { textStyle: 'MediumBold' }, "Normal Text Display")));
|
|
30
|
-
};
|
|
31
|
-
const TooltipTextTest = () => {
|
|
32
|
-
return (react_1.default.createElement(ViewWin32_1.ViewWin32, null,
|
|
33
|
-
react_1.default.createElement(TextWin32_1.TextWin32, { tooltip: "Example Tooltip" }, "This TextWin32 demonstrates a tooltip")));
|
|
34
|
-
};
|
|
35
|
-
const TextPromotionTest = () => {
|
|
36
|
-
let FocusabilityState;
|
|
37
|
-
(function (FocusabilityState) {
|
|
38
|
-
FocusabilityState[FocusabilityState["NoFocus"] = 0] = "NoFocus";
|
|
39
|
-
FocusabilityState[FocusabilityState["Focusable"] = 1] = "Focusable";
|
|
40
|
-
FocusabilityState[FocusabilityState["Selectable"] = 2] = "Selectable";
|
|
41
|
-
})(FocusabilityState || (FocusabilityState = {}));
|
|
42
|
-
const [focusabilityState, setFocusabilityState] = react_1.default.useState(FocusabilityState.NoFocus);
|
|
43
|
-
return (react_1.default.createElement(ViewWin32_1.ViewWin32, null,
|
|
44
|
-
react_1.default.createElement(react_native_1.Button, { title: "Click to Promote Focusability", onPress: () => {
|
|
45
|
-
if (focusabilityState === FocusabilityState.NoFocus) {
|
|
46
|
-
setFocusabilityState(FocusabilityState.Focusable);
|
|
47
|
-
}
|
|
48
|
-
else if (focusabilityState === FocusabilityState.Focusable) {
|
|
49
|
-
setFocusabilityState(FocusabilityState.Selectable);
|
|
50
|
-
}
|
|
51
|
-
} }),
|
|
52
|
-
react_1.default.createElement(TextWin32_1.TextWin32, { focusable: focusabilityState === FocusabilityState.Focusable, selectable: focusabilityState === FocusabilityState.Selectable }, "This text is currently..."),
|
|
53
|
-
react_1.default.createElement(TextWin32_1.TextWin32, null, (focusabilityState === FocusabilityState.NoFocus) ? 'No Focusability' :
|
|
54
|
-
(focusabilityState === FocusabilityState.Focusable) ? 'Focusable' :
|
|
55
|
-
'Selectable')));
|
|
56
|
-
};
|
|
57
|
-
const BlurringAndFocusingTextTest = () => {
|
|
58
|
-
const [isFocusableFocused, setIsFocusableFocused] = react_1.default.useState(false);
|
|
59
|
-
const [isSelectableFocused, setIsSelectableFocused] = react_1.default.useState(false);
|
|
60
|
-
return (react_1.default.createElement(react_native_1.View, null,
|
|
61
|
-
react_1.default.createElement(TextWin32_1.TextWin32, { focusable: true, onBlur: () => setIsFocusableFocused(false), onFocus: () => setIsFocusableFocused(true) }, "Focusable text is focused:"),
|
|
62
|
-
react_1.default.createElement(TextWin32_1.TextWin32, { textStyle: isFocusableFocused ? 'MediumBold' : 'MediumStandard' }, isFocusableFocused ? 'true' : 'false'),
|
|
63
|
-
react_1.default.createElement(TextWin32_1.TextWin32, { selectable: true, onBlur: () => setIsSelectableFocused(false), onFocus: () => setIsSelectableFocused(true) }, "Selectable text is focused:"),
|
|
64
|
-
react_1.default.createElement(TextWin32_1.TextWin32, { textStyle: isSelectableFocused ? 'MediumBold' : 'MediumStandard' }, isSelectableFocused ? 'true' : 'false')));
|
|
65
|
-
};
|
|
66
|
-
exports.title = 'TextWin32';
|
|
67
|
-
exports.displayName = 'TextWin32';
|
|
68
|
-
exports.description = 'TextWin32 Examples and Tests';
|
|
69
|
-
exports.examples = [
|
|
70
|
-
{
|
|
71
|
-
title: 'Text Runs Example',
|
|
72
|
-
description: 'text runs in action',
|
|
73
|
-
render() {
|
|
74
|
-
return (react_1.default.createElement(TextRunsTest, null));
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
title: 'Focusable Example',
|
|
79
|
-
description: 'focusable in action',
|
|
80
|
-
render() {
|
|
81
|
-
return (react_1.default.createElement(FocusableTextTest, null));
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
title: 'Selectable Example',
|
|
86
|
-
description: 'selectable in action',
|
|
87
|
-
render() {
|
|
88
|
-
return (react_1.default.createElement(SelectableTextTest, null));
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
title: 'TextStyle Example',
|
|
93
|
-
description: 'TextStyles in action',
|
|
94
|
-
render() {
|
|
95
|
-
return (react_1.default.createElement(TextStyleTest, null));
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
title: 'Tooltip Example',
|
|
100
|
-
description: 'tooltips in action',
|
|
101
|
-
render() {
|
|
102
|
-
return (react_1.default.createElement(TooltipTextTest, null));
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
title: 'TextPromotion Example',
|
|
107
|
-
description: 'dynamic increases in focusability in action',
|
|
108
|
-
render() {
|
|
109
|
-
return (react_1.default.createElement(TextPromotionTest, null));
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
title: 'Focus and Blur Example',
|
|
114
|
-
description: 'onFocus/onBlur in action',
|
|
115
|
-
render() {
|
|
116
|
-
return (react_1.default.createElement(BlurringAndFocusingTextTest, null));
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
];
|
|
120
|
-
//# sourceMappingURL=TextWin32Test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextWin32Test.js","sour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AAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,oBAAoB;QACjC,MAAM;YACJ,OAAO,CAAC,8BAAC,eAAe,OAAG,CAAC,CAAC;QAC/B,CAAC;KACF;IACD;QACE,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,6CAA6C;QAC1D,MAAM;YACJ,OAAO,CAAC,8BAAC,iBAAiB,OAAG,CAAC,CAAC;QACjC,CAAC;KACF;IACD;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,0BAA0B;QACvC,MAAM;YACJ,OAAO,CAAC,8BAAC,2BAA2B,OAAG,CAAC,CAAC;QAC3C,CAAC;KACF;CACF,CAAC","sourcesContent":["'use strict';\nimport React from 'react'\nimport { Button, View } from 'react-native';\nimport { TextWin32 } from '../../Text/TextWin32';\nimport { ViewWin32 } from '../../View/ViewWin32';\n\n// Disabling no-jsx-lambda so functional components are more convenient to use\n\nconst TextRunsTest: React.FC<{}> = () => {\n return (\n <View focusable>\n <TextWin32>\n <TextWin32>Text With </TextWin32>\n <TextWin32>Multiple Text </TextWin32>\n <TextWin32>Children [Runs]</TextWin32>\n </TextWin32>\n </View>\n );\n};\n\nconst FocusableTextTest: React.FC<{}> = () => {\n return (\n <ViewWin32>\n <TextWin32 focusable>This TextWin32 demonstrates focusable</TextWin32>\n </ViewWin32>\n );\n};\n\nconst SelectableTextTest: React.FC<{}> = () => {\n return (\n <ViewWin32>\n <TextWin32 selectable>This TextWin32 demonstrates selectable</TextWin32>\n </ViewWin32>\n );\n};\n\nconst TextStyleTest: React.FC<{}> = () => {\n return (\n <ViewWin32>\n <TextWin32 textStyle={'MediumBold'}>Normal Text Display</TextWin32>\n </ViewWin32>\n );\n};\n\nconst TooltipTextTest: React.FC<{}> = () => {\n return (\n <ViewWin32>\n <TextWin32 tooltip=\"Example Tooltip\">This TextWin32 demonstrates a tooltip</TextWin32>\n </ViewWin32>\n );\n};\n\nconst TextPromotionTest: React.FC<{}> = () => {\n enum FocusabilityState {\n NoFocus,\n Focusable,\n Selectable,\n }\n const [focusabilityState, setFocusabilityState] = React.useState(FocusabilityState.NoFocus);\n return (\n <ViewWin32>\n <Button\n title=\"Click to Promote Focusability\"\n onPress={() => \n {\n if (focusabilityState === FocusabilityState.NoFocus)\n {\n setFocusabilityState(FocusabilityState.Focusable);\n }\n else if (focusabilityState === FocusabilityState.Focusable)\n {\n setFocusabilityState(FocusabilityState.Selectable);\n }\n }} />\n <TextWin32\n focusable={focusabilityState === FocusabilityState.Focusable}\n selectable={focusabilityState === FocusabilityState.Selectable}\n >\n This text is currently...\n </TextWin32>\n <TextWin32>\n {(focusabilityState === FocusabilityState.NoFocus) ? 'No Focusability' : \n (focusabilityState === FocusabilityState.Focusable) ? 'Focusable' :\n 'Selectable'}\n </TextWin32>\n </ViewWin32>\n );\n};\n\nconst BlurringAndFocusingTextTest: React.FC<{}> = () => {\n const [isFocusableFocused, setIsFocusableFocused] = React.useState(false);\n const [isSelectableFocused, setIsSelectableFocused] = React.useState(false);\n return (\n <View>\n <TextWin32\n focusable\n onBlur={() => setIsFocusableFocused(false)}\n onFocus={() => setIsFocusableFocused(true)}>Focusable text is focused:</TextWin32>\n <TextWin32\n textStyle={isFocusableFocused ? 'MediumBold' : 'MediumStandard'}>{isFocusableFocused ? 'true' : 'false'}</TextWin32>\n <TextWin32\n selectable\n onBlur={() => setIsSelectableFocused(false)}\n onFocus={() => setIsSelectableFocused(true)}>Selectable text is focused:</TextWin32>\n <TextWin32\n textStyle={isSelectableFocused ? 'MediumBold' : 'MediumStandard'}>{isSelectableFocused ? 'true' : 'false'}</TextWin32>\n </View>\n );\n};\n\nexport const title = 'TextWin32';\nexport const displayName = 'TextWin32';\nexport const description = 'TextWin32 Examples and Tests';\nexport const examples = [\n {\n title: 'Text Runs Example',\n description: 'text runs in action',\n render(): JSX.Element {\n return (<TextRunsTest />);\n },\n },\n {\n title: 'Focusable Example',\n description: 'focusable in action',\n render(): JSX.Element {\n return (<FocusableTextTest />);\n },\n },\n {\n title: 'Selectable Example',\n description: 'selectable in action',\n render(): JSX.Element {\n return (<SelectableTextTest />);\n },\n },\n {\n title: 'TextStyle Example',\n description: 'TextStyles in action',\n render(): JSX.Element {\n return (<TextStyleTest />);\n },\n },\n {\n title: 'Tooltip Example',\n description: 'tooltips in action',\n render(): JSX.Element {\n return (<TooltipTextTest />);\n },\n },\n {\n title: 'TextPromotion Example',\n description: 'dynamic increases in focusability in action',\n render(): JSX.Element {\n return (<TextPromotionTest />);\n },\n },\n {\n title: 'Focus and Blur Example',\n description: 'onFocus/onBlur in action',\n render(): JSX.Element {\n return (<BlurringAndFocusingTextTest />);\n },\n },\n ];"]}
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { Button, View } from 'react-native';
|
|
4
|
-
import { TextWin32 } from '../../Text/TextWin32';
|
|
5
|
-
import { ViewWin32 } from '../../View/ViewWin32';
|
|
6
|
-
|
|
7
|
-
// Disabling no-jsx-lambda so functional components are more convenient to use
|
|
8
|
-
|
|
9
|
-
const TextRunsTest: React.FC<{}> = () => {
|
|
10
|
-
return (
|
|
11
|
-
<View focusable>
|
|
12
|
-
<TextWin32>
|
|
13
|
-
<TextWin32>Text With </TextWin32>
|
|
14
|
-
<TextWin32>Multiple Text </TextWin32>
|
|
15
|
-
<TextWin32>Children [Runs]</TextWin32>
|
|
16
|
-
</TextWin32>
|
|
17
|
-
</View>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const FocusableTextTest: React.FC<{}> = () => {
|
|
22
|
-
return (
|
|
23
|
-
<ViewWin32>
|
|
24
|
-
<TextWin32 focusable>This TextWin32 demonstrates focusable</TextWin32>
|
|
25
|
-
</ViewWin32>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const SelectableTextTest: React.FC<{}> = () => {
|
|
30
|
-
return (
|
|
31
|
-
<ViewWin32>
|
|
32
|
-
<TextWin32 selectable>This TextWin32 demonstrates selectable</TextWin32>
|
|
33
|
-
</ViewWin32>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const TextStyleTest: React.FC<{}> = () => {
|
|
38
|
-
return (
|
|
39
|
-
<ViewWin32>
|
|
40
|
-
<TextWin32 textStyle={'MediumBold'}>Normal Text Display</TextWin32>
|
|
41
|
-
</ViewWin32>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const TooltipTextTest: React.FC<{}> = () => {
|
|
46
|
-
return (
|
|
47
|
-
<ViewWin32>
|
|
48
|
-
<TextWin32 tooltip="Example Tooltip">This TextWin32 demonstrates a tooltip</TextWin32>
|
|
49
|
-
</ViewWin32>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const TextPromotionTest: React.FC<{}> = () => {
|
|
54
|
-
enum FocusabilityState {
|
|
55
|
-
NoFocus,
|
|
56
|
-
Focusable,
|
|
57
|
-
Selectable,
|
|
58
|
-
}
|
|
59
|
-
const [focusabilityState, setFocusabilityState] = React.useState(FocusabilityState.NoFocus);
|
|
60
|
-
return (
|
|
61
|
-
<ViewWin32>
|
|
62
|
-
<Button
|
|
63
|
-
title="Click to Promote Focusability"
|
|
64
|
-
onPress={() =>
|
|
65
|
-
{
|
|
66
|
-
if (focusabilityState === FocusabilityState.NoFocus)
|
|
67
|
-
{
|
|
68
|
-
setFocusabilityState(FocusabilityState.Focusable);
|
|
69
|
-
}
|
|
70
|
-
else if (focusabilityState === FocusabilityState.Focusable)
|
|
71
|
-
{
|
|
72
|
-
setFocusabilityState(FocusabilityState.Selectable);
|
|
73
|
-
}
|
|
74
|
-
}} />
|
|
75
|
-
<TextWin32
|
|
76
|
-
focusable={focusabilityState === FocusabilityState.Focusable}
|
|
77
|
-
selectable={focusabilityState === FocusabilityState.Selectable}
|
|
78
|
-
>
|
|
79
|
-
This text is currently...
|
|
80
|
-
</TextWin32>
|
|
81
|
-
<TextWin32>
|
|
82
|
-
{(focusabilityState === FocusabilityState.NoFocus) ? 'No Focusability' :
|
|
83
|
-
(focusabilityState === FocusabilityState.Focusable) ? 'Focusable' :
|
|
84
|
-
'Selectable'}
|
|
85
|
-
</TextWin32>
|
|
86
|
-
</ViewWin32>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const BlurringAndFocusingTextTest: React.FC<{}> = () => {
|
|
91
|
-
const [isFocusableFocused, setIsFocusableFocused] = React.useState(false);
|
|
92
|
-
const [isSelectableFocused, setIsSelectableFocused] = React.useState(false);
|
|
93
|
-
return (
|
|
94
|
-
<View>
|
|
95
|
-
<TextWin32
|
|
96
|
-
focusable
|
|
97
|
-
onBlur={() => setIsFocusableFocused(false)}
|
|
98
|
-
onFocus={() => setIsFocusableFocused(true)}>Focusable text is focused:</TextWin32>
|
|
99
|
-
<TextWin32
|
|
100
|
-
textStyle={isFocusableFocused ? 'MediumBold' : 'MediumStandard'}>{isFocusableFocused ? 'true' : 'false'}</TextWin32>
|
|
101
|
-
<TextWin32
|
|
102
|
-
selectable
|
|
103
|
-
onBlur={() => setIsSelectableFocused(false)}
|
|
104
|
-
onFocus={() => setIsSelectableFocused(true)}>Selectable text is focused:</TextWin32>
|
|
105
|
-
<TextWin32
|
|
106
|
-
textStyle={isSelectableFocused ? 'MediumBold' : 'MediumStandard'}>{isSelectableFocused ? 'true' : 'false'}</TextWin32>
|
|
107
|
-
</View>
|
|
108
|
-
);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export const title = 'TextWin32';
|
|
112
|
-
export const displayName = 'TextWin32';
|
|
113
|
-
export const description = 'TextWin32 Examples and Tests';
|
|
114
|
-
export const examples = [
|
|
115
|
-
{
|
|
116
|
-
title: 'Text Runs Example',
|
|
117
|
-
description: 'text runs in action',
|
|
118
|
-
render(): JSX.Element {
|
|
119
|
-
return (<TextRunsTest />);
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
title: 'Focusable Example',
|
|
124
|
-
description: 'focusable in action',
|
|
125
|
-
render(): JSX.Element {
|
|
126
|
-
return (<FocusableTextTest />);
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
title: 'Selectable Example',
|
|
131
|
-
description: 'selectable in action',
|
|
132
|
-
render(): JSX.Element {
|
|
133
|
-
return (<SelectableTextTest />);
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
title: 'TextStyle Example',
|
|
138
|
-
description: 'TextStyles in action',
|
|
139
|
-
render(): JSX.Element {
|
|
140
|
-
return (<TextStyleTest />);
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
title: 'Tooltip Example',
|
|
145
|
-
description: 'tooltips in action',
|
|
146
|
-
render(): JSX.Element {
|
|
147
|
-
return (<TooltipTextTest />);
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
title: 'TextPromotion Example',
|
|
152
|
-
description: 'dynamic increases in focusability in action',
|
|
153
|
-
render(): JSX.Element {
|
|
154
|
-
return (<TextPromotionTest />);
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
title: 'Focus and Blur Example',
|
|
159
|
-
description: 'onFocus/onBlur in action',
|
|
160
|
-
render(): JSX.Element {
|
|
161
|
-
return (<BlurringAndFocusingTextTest />);
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
];
|