@office-iss/react-native-win32 0.72.12 → 0.72.14
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 +31 -1
- package/CHANGELOG.md +20 -4
- package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
- package/Libraries/Components/Text/TextWin32.d.ts +3 -3
- package/Libraries/Components/Text/TextWin32.js.map +1 -1
- package/Libraries/Text/Text.d.ts +85 -0
- package/Libraries/platform-types.d.ts +2 -2
- package/overrides.json +6 -4
- package/package.json +1 -1
- package/src/Libraries/Components/Button/ButtonWin32.tsx +2 -2
- package/src/Libraries/Components/Text/TextWin32.tsx +6 -6
- package/src/Libraries/Text/Text.d.ts +304 -0
- package/src/Libraries/platform-types.d.ts +2 -2
- package/Libraries/Components/Text/TextWin32.Props.d.ts +0 -63
- package/Libraries/Components/Text/TextWin32.Props.js +0 -3
- package/Libraries/Components/Text/TextWin32.Props.js.map +0 -1
- package/src/Libraries/Components/Text/TextWin32.Props.ts +0 -82
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 18 Mar 2024 20:19:17 GMT",
|
|
6
|
+
"tag": "@office-iss/react-native-win32_v0.72.14",
|
|
7
|
+
"version": "0.72.14",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "f40c11b5ba8c6ccb5b9d2a9f8cdbe4dd9748197e",
|
|
14
|
+
"comment": "Missed property when adding win32 specific text type info"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Fri, 15 Mar 2024 22:28:10 GMT",
|
|
21
|
+
"tag": "@office-iss/react-native-win32_v0.72.13",
|
|
22
|
+
"version": "0.72.13",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
27
|
+
"package": "@office-iss/react-native-win32",
|
|
28
|
+
"commit": "6a915591746c71b0ecbf7cb96bc3d0f1d704c03e",
|
|
29
|
+
"comment": "TextProps from rn-win32 should include win32 properties"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Thu, 08 Feb 2024 21:50:06 GMT",
|
|
6
36
|
"tag": "@office-iss/react-native-win32_v0.72.12",
|
|
7
37
|
"version": "0.72.12",
|
|
8
38
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 18 Mar 2024 20:19:17 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.72.
|
|
7
|
+
## 0.72.14
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Mon, 18 Mar 2024 20:19:17 GMT
|
|
10
10
|
|
|
11
11
|
### Patches
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- Missed property when adding win32 specific text type info (30809111+acoates-ms@users.noreply.github.com)
|
|
14
14
|
|
|
15
|
+
## 0.72.13
|
|
16
|
+
|
|
17
|
+
Fri, 15 Mar 2024 22:28:10 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- TextProps from rn-win32 should include win32 properties (30809111+acoates-ms@users.noreply.github.com)
|
|
22
|
+
|
|
23
|
+
## 0.72.12
|
|
24
|
+
|
|
25
|
+
Thu, 08 Feb 2024 21:50:06 GMT
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- [Win32] view.focus sometimes skips setting focus (30809111+acoates-ms@users.noreply.github.com)
|
|
30
|
+
|
|
15
31
|
## 0.72.11
|
|
16
32
|
|
|
17
33
|
Fri, 08 Dec 2023 00:49:15 GMT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Button/ButtonWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAAoC;AAKpC,IAAW,WAGV;AAHD,WAAW,WAAW;IACpB,2DAAW,CAAA;IACX,qDAAQ,CAAA;AACV,CAAC,EAHU,WAAW,KAAX,WAAW,QAGrB;AAMD;;GAEG;AACH,MAAa,WAAY,SAAQ,eAAK,CAAC,SAA+C;IACpF,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAqCE,eAAU,GAAG,CAAC,MAAmB,EAAqB,EAAE;YACvE,OAAO;gBACL,kBAAkB,EAAE;oBAClB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;oBAC7B,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC,QAAQ;iBAC1C;aACF,CAAC;QACJ,CAAC,CAAC;QAEe,cAAS,GAAG,CAAC,MAAmB,EAAQ,EAAE;YACzD,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC;QAEe,aAAQ,GAAG,GAAS,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;gBACtB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;aACtB;QACH,CAAC,CAAC;QAEe,YAAO,GAAG,GAAS,EAAE;YACpC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AK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;SAC/C;QAED,OAAO;QACL,aAAa;QACb,8BAAC,EAAE,CAAC,SAAS,OAAK,SAAS;YACzB,8BAAC,EAAE,CAAC,SAAS,OAAK,SAAS,IAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAgB,CACjD,CAChB,CAAC;IACJ,CAAC;CAwCF;AA7ED,kCA6EC","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport type { IViewWin32Props } from '../View/ViewPropTypes';\nimport type { TextProps } from '../../Text/Text';\nimport type { IButtonWin32Props } from './ButtonWin32.Props';\n\nconst enum SelectState {\n NotSelected,\n Selected\n}\n\ninterface IButtonWin32State {\n accessibilityState: RN.AccessibilityState;\n}\n\n/**\n * React-native <Button> control with additional Win32-specific functionality.\n */\nexport class ButtonWin32 extends React.Component<IButtonWin32Props, IButtonWin32State> {\n constructor(props: IButtonWin32Props) {\n super(props);\n this.state = this._makeState(SelectState.NotSelected);\n }\n\n public render() {\n const viewProps: IViewWin32Props = {\n accessible: true,\n accessibilityLabel: this.props.accessibilityLabel || this.props.title,\n accessibilityRole: 'button',\n accessibilityState: this.state.accessibilityState,\n focusable: true,\n onFocus: this._onFocus,\n onBlur: this._onBlur,\n onMouseEnter: this.props.onMouseEnter,\n onMouseLeave: this.props.onMouseLeave,\n // @ts-ignore\n onTouchStart: this.props.onTouchStart,\n onTouchEnd: this._onTouchEnd,\n testID: this.props.testID,\n style: this.props.style as RN.StyleProp<RN.ViewStyle>,\n };\n\n const textProps: TextProps = {\n textStyle: 'None',\n };\n if (this.props.color) {\n textProps.style = { color: this.props.color };\n }\n\n return (\n // @ts-ignore\n <RN.ViewWin32 {...viewProps}>\n <RN.TextWin32 {...textProps}>{this.props.title}</RN.TextWin32>\n </RN.ViewWin32>\n );\n }\n\n private readonly _makeState = (select: SelectState): IButtonWin32State => {\n return {\n accessibilityState: {\n disabled: this.props.disabled,\n selected: select === SelectState.Selected,\n },\n };\n };\n\n private readonly _setState = (select: SelectState): void => {\n const state = this._makeState(select);\n this.setState(state);\n };\n\n private readonly _onFocus = (): void => {\n this._setState(SelectState.Selected);\n if (this.props.onFocus) {\n this.props.onFocus();\n }\n };\n\n private readonly _onBlur = (): void => {\n this._setState(SelectState.NotSelected);\n if (this.props.onBlur) {\n this.props.onBlur();\n }\n };\n\n private readonly _onTouchEnd = (event: RN.GestureResponderEvent): void => {\n if (!this.props.disabled) {\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n if (this.props.onTouchEnd) {\n this.props.onTouchEnd(event);\n }\n };\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
export declare class TextWin32 extends React.Component<
|
|
4
|
-
constructor(props:
|
|
2
|
+
import type { TextProps } from '../../Text/Text';
|
|
3
|
+
export declare class TextWin32 extends React.Component<TextProps, {}> {
|
|
4
|
+
constructor(props: TextProps);
|
|
5
5
|
render(): JSX.Element;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAAoC;AAepC,MAAa,SAAU,SAAQ,eAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"TextWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAAoC;AAepC,MAAa,SAAU,SAAQ,eAAK,CAAC,SAAwB;IAC3D,YAAY,KAAgB;QAC1B,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEM,MAAM;QACX,OAAO,8BAAC,EAAE,CAAC,IAAI,OAAM,IAAI,CAAC,KAAwB,GAAI,CAAC;IACzD,CAAC;CACF;AARD,8BAQC","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport type { TextProps } from '../../Text/Text';\n\n/**\n * All of TOrigin except Key from TUse\n */\ntype UseFrom<TOrigin, TUse, Key extends keyof TUse> = Pick<TOrigin, Exclude<keyof TOrigin, Key>> & Pick<TUse, Key>;\n\n/**\n * React-native <Text> control with additional Win32-specific functionality.\n */\n\ntype InnerViewProps = UseFrom<TextProps, RN.TextProps, 'accessibilityRole'> &\n UseFrom<TextProps, RN.TextProps, 'accessibilityState'> &\n UseFrom<TextProps, RN.TextProps, 'accessibilityActions'>;\nexport class TextWin32 extends React.Component<TextProps, {}> {\n constructor(props: TextProps) {\n super(props);\n }\n\n public render() {\n return <RN.Text {...(this.props as InnerViewProps)} />;\n }\n}\n"]}
|
package/Libraries/Text/Text.d.ts
CHANGED
|
@@ -19,6 +19,10 @@ import {
|
|
|
19
19
|
NativeSyntheticEvent,
|
|
20
20
|
TextLayoutEventData,
|
|
21
21
|
} from '../Types/CoreEventTypes';
|
|
22
|
+
import type {
|
|
23
|
+
IKeyboardEvent,
|
|
24
|
+
IHandledKeyboardEvent,
|
|
25
|
+
} from '../Components/View/ViewPropTypes';
|
|
22
26
|
|
|
23
27
|
export interface TextPropsIOS {
|
|
24
28
|
/**
|
|
@@ -106,10 +110,91 @@ export interface TextPropsAndroid {
|
|
|
106
110
|
android_hyphenationFrequency?: 'normal' | 'none' | 'full' | undefined;
|
|
107
111
|
}
|
|
108
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Role-based text style names.
|
|
115
|
+
*/
|
|
116
|
+
export type TextWin32TextStyle =
|
|
117
|
+
| 'None'
|
|
118
|
+
| 'SmallStandard'
|
|
119
|
+
| 'SmallSecondary'
|
|
120
|
+
| 'MediumStandard'
|
|
121
|
+
| 'MediumSecondary'
|
|
122
|
+
| 'MediumApp'
|
|
123
|
+
| 'MediumBold'
|
|
124
|
+
| 'MediumBoldApp'
|
|
125
|
+
| 'LargeStandard'
|
|
126
|
+
| 'LargePlusStandard'
|
|
127
|
+
| 'ExtraLargeStandard'
|
|
128
|
+
| 'HugeStandard';
|
|
129
|
+
|
|
130
|
+
export interface TextPropsWin32 {
|
|
131
|
+
onKeyDown?: (args: IKeyboardEvent) => void;
|
|
132
|
+
onKeyDownCapture?: (args: IKeyboardEvent) => void;
|
|
133
|
+
onKeyUp?: (args: IKeyboardEvent) => void;
|
|
134
|
+
onKeyUpCapture?: (args: IKeyboardEvent) => void;
|
|
135
|
+
|
|
136
|
+
keyDownEvents?: IHandledKeyboardEvent[];
|
|
137
|
+
keyUpEvents?: IHandledKeyboardEvent[];
|
|
138
|
+
|
|
139
|
+
/** Enables a focusable label with copyability but without character selectability (property:selectable) */
|
|
140
|
+
focusable?: boolean;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
144
|
+
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
145
|
+
*
|
|
146
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
147
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
148
|
+
*/
|
|
149
|
+
onBlur?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
150
|
+
/**
|
|
151
|
+
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
152
|
+
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
153
|
+
*
|
|
154
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
155
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
156
|
+
*/
|
|
157
|
+
onBlurCapture?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
158
|
+
/**
|
|
159
|
+
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
160
|
+
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
161
|
+
*
|
|
162
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
163
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
164
|
+
*/
|
|
165
|
+
onFocus?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
166
|
+
/**
|
|
167
|
+
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
168
|
+
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
169
|
+
*
|
|
170
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
171
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
172
|
+
*/
|
|
173
|
+
onFocusCapture?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Role-based styling of the text control. The styles applied include
|
|
177
|
+
* font face, size, weight and color. These styles take precedence over
|
|
178
|
+
* the `style` property.
|
|
179
|
+
*
|
|
180
|
+
* @remarks
|
|
181
|
+
* The default value is `MediumStandard`.
|
|
182
|
+
*
|
|
183
|
+
* When set to `None`, role-based styling is disabled.
|
|
184
|
+
*
|
|
185
|
+
* @deprecated Use `style` instead.
|
|
186
|
+
*/
|
|
187
|
+
textStyle?: TextWin32TextStyle;
|
|
188
|
+
|
|
189
|
+
/** Tooltip displayed on mouse hover of this element */
|
|
190
|
+
tooltip?: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
109
193
|
// https://reactnative.dev/docs/text#props
|
|
110
194
|
export interface TextProps
|
|
111
195
|
extends TextPropsIOS,
|
|
112
196
|
TextPropsAndroid,
|
|
197
|
+
TextPropsWin32,
|
|
113
198
|
AccessibilityProps {
|
|
114
199
|
/**
|
|
115
200
|
* Specifies whether fonts should scale to respect Text Size accessibility settings.
|
|
@@ -11,9 +11,9 @@ export { AccessibilityPropsWin32 } from '@office-iss/react-native-win32/Librarie
|
|
|
11
11
|
export type IViewWin32Props = IViewWin32PropsOnly & AccessibilityPropsWin32;
|
|
12
12
|
export {ViewWin32} from './Components/View/ViewWin32';
|
|
13
13
|
export {IKeyboardEvent, IHandledKeyboardEvent, EventPhase} from './Components/View/ViewPropTypes';
|
|
14
|
-
import {
|
|
14
|
+
import {TextPropsWin32 as ITextWin32PropsOnly} from './Text/Text';
|
|
15
15
|
export type ITextWin32Props = ITextWin32PropsOnly & AccessibilityPropsWin32;
|
|
16
|
-
export {TextWin32TextStyle } from './
|
|
16
|
+
export {TextWin32TextStyle } from './Text/Text';
|
|
17
17
|
export {TextWin32} from './Components/Text/TextWin32';
|
|
18
18
|
export {IButtonWin32Props, IButtonWin32Style} from './Components/Button/ButtonWin32.Props';
|
|
19
19
|
export {ButtonWin32} from './Components/Button/ButtonWin32';
|
package/overrides.json
CHANGED
|
@@ -114,10 +114,6 @@
|
|
|
114
114
|
"baseFile": "packages/react-native/Libraries/Components/ScrollView/ScrollView.js",
|
|
115
115
|
"baseHash": "7d162bb43bce3f9da78b7c304530b3f804d21658"
|
|
116
116
|
},
|
|
117
|
-
{
|
|
118
|
-
"type": "platform",
|
|
119
|
-
"file": "src/Libraries/Components/Text/TextWin32.Props.ts"
|
|
120
|
-
},
|
|
121
117
|
{
|
|
122
118
|
"type": "platform",
|
|
123
119
|
"file": "src/Libraries/Components/Text/TextWin32.tsx"
|
|
@@ -446,6 +442,12 @@
|
|
|
446
442
|
"baseFile": "packages/react-native/Libraries/StyleSheet/StyleSheet.js",
|
|
447
443
|
"baseHash": "b279b836217a0870546010c935fb53e6a889f0dd"
|
|
448
444
|
},
|
|
445
|
+
{
|
|
446
|
+
"type": "derived",
|
|
447
|
+
"file": "src/Libraries/Text/Text.d.ts",
|
|
448
|
+
"baseFile": "packages/react-native/Libraries/Text/Text.d.ts",
|
|
449
|
+
"baseHash": "9e85e4822b99786481f22d4bac2fd0f24be40d78"
|
|
450
|
+
},
|
|
449
451
|
{
|
|
450
452
|
"type": "derived",
|
|
451
453
|
"file": "src/Libraries/Text/TextNativeComponent.win32.js",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import RN = require('react-native');
|
|
3
3
|
import type { IViewWin32Props } from '../View/ViewPropTypes';
|
|
4
|
-
import type {
|
|
4
|
+
import type { TextProps } from '../../Text/Text';
|
|
5
5
|
import type { IButtonWin32Props } from './ButtonWin32.Props';
|
|
6
6
|
|
|
7
7
|
const enum SelectState {
|
|
@@ -40,7 +40,7 @@ export class ButtonWin32 extends React.Component<IButtonWin32Props, IButtonWin32
|
|
|
40
40
|
style: this.props.style as RN.StyleProp<RN.ViewStyle>,
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
const textProps:
|
|
43
|
+
const textProps: TextProps = {
|
|
44
44
|
textStyle: 'None',
|
|
45
45
|
};
|
|
46
46
|
if (this.props.color) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import RN = require('react-native');
|
|
3
|
-
import type {
|
|
3
|
+
import type { TextProps } from '../../Text/Text';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* All of TOrigin except Key from TUse
|
|
@@ -11,11 +11,11 @@ type UseFrom<TOrigin, TUse, Key extends keyof TUse> = Pick<TOrigin, Exclude<keyo
|
|
|
11
11
|
* React-native <Text> control with additional Win32-specific functionality.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
type InnerViewProps = UseFrom<
|
|
15
|
-
UseFrom<
|
|
16
|
-
UseFrom<
|
|
17
|
-
export class TextWin32 extends React.Component<
|
|
18
|
-
constructor(props:
|
|
14
|
+
type InnerViewProps = UseFrom<TextProps, RN.TextProps, 'accessibilityRole'> &
|
|
15
|
+
UseFrom<TextProps, RN.TextProps, 'accessibilityState'> &
|
|
16
|
+
UseFrom<TextProps, RN.TextProps, 'accessibilityActions'>;
|
|
17
|
+
export class TextWin32 extends React.Component<TextProps, {}> {
|
|
18
|
+
constructor(props: TextProps) {
|
|
19
19
|
super(props);
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type * as React from 'react';
|
|
11
|
+
import {Constructor} from '../../types/private/Utilities';
|
|
12
|
+
import {AccessibilityProps} from '../Components/View/ViewAccessibility';
|
|
13
|
+
import {NativeMethods} from '../../types/public/ReactNativeTypes';
|
|
14
|
+
import {ColorValue, StyleProp} from '../StyleSheet/StyleSheet';
|
|
15
|
+
import {TextStyle} from '../StyleSheet/StyleSheetTypes';
|
|
16
|
+
import {
|
|
17
|
+
GestureResponderEvent,
|
|
18
|
+
LayoutChangeEvent,
|
|
19
|
+
NativeSyntheticEvent,
|
|
20
|
+
TextLayoutEventData,
|
|
21
|
+
} from '../Types/CoreEventTypes';
|
|
22
|
+
import type {
|
|
23
|
+
IKeyboardEvent,
|
|
24
|
+
IHandledKeyboardEvent,
|
|
25
|
+
} from '../Components/View/ViewPropTypes';
|
|
26
|
+
|
|
27
|
+
export interface TextPropsIOS {
|
|
28
|
+
/**
|
|
29
|
+
* Specifies whether font should be scaled down automatically to fit given style constraints.
|
|
30
|
+
*/
|
|
31
|
+
adjustsFontSizeToFit?: boolean | undefined;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The Dynamic Type scale ramp to apply to this element on iOS.
|
|
35
|
+
*/
|
|
36
|
+
dynamicTypeRamp?:
|
|
37
|
+
| 'caption2'
|
|
38
|
+
| 'caption1'
|
|
39
|
+
| 'footnote'
|
|
40
|
+
| 'subheadline'
|
|
41
|
+
| 'callout'
|
|
42
|
+
| 'body'
|
|
43
|
+
| 'headline'
|
|
44
|
+
| 'title3'
|
|
45
|
+
| 'title2'
|
|
46
|
+
| 'title1'
|
|
47
|
+
| 'largeTitle'
|
|
48
|
+
| undefined;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).
|
|
52
|
+
*/
|
|
53
|
+
minimumFontScale?: number | undefined;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* When `true`, no visual change is made when text is pressed down. By
|
|
57
|
+
* default, a gray oval highlights the text on press down.
|
|
58
|
+
*/
|
|
59
|
+
suppressHighlighting?: boolean | undefined;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Set line break strategy on iOS.
|
|
63
|
+
*/
|
|
64
|
+
lineBreakStrategyIOS?:
|
|
65
|
+
| 'none'
|
|
66
|
+
| 'standard'
|
|
67
|
+
| 'hangul-word'
|
|
68
|
+
| 'push-out'
|
|
69
|
+
| undefined;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface TextPropsAndroid {
|
|
73
|
+
/**
|
|
74
|
+
* Specifies the disabled state of the text view for testing purposes.
|
|
75
|
+
*/
|
|
76
|
+
disabled?: boolean | undefined;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Lets the user select text, to use the native copy and paste functionality.
|
|
80
|
+
*/
|
|
81
|
+
selectable?: boolean | undefined;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The highlight color of the text.
|
|
85
|
+
*/
|
|
86
|
+
selectionColor?: ColorValue | undefined;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Set text break strategy on Android API Level 23+
|
|
90
|
+
* default is `highQuality`.
|
|
91
|
+
*/
|
|
92
|
+
textBreakStrategy?: 'simple' | 'highQuality' | 'balanced' | undefined;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Determines the types of data converted to clickable URLs in the text element.
|
|
96
|
+
* By default no data types are detected.
|
|
97
|
+
*/
|
|
98
|
+
dataDetectorType?:
|
|
99
|
+
| null
|
|
100
|
+
| 'phoneNumber'
|
|
101
|
+
| 'link'
|
|
102
|
+
| 'email'
|
|
103
|
+
| 'none'
|
|
104
|
+
| 'all'
|
|
105
|
+
| undefined;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Hyphenation strategy
|
|
109
|
+
*/
|
|
110
|
+
android_hyphenationFrequency?: 'normal' | 'none' | 'full' | undefined;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Role-based text style names.
|
|
115
|
+
*/
|
|
116
|
+
export type TextWin32TextStyle =
|
|
117
|
+
| 'None'
|
|
118
|
+
| 'SmallStandard'
|
|
119
|
+
| 'SmallSecondary'
|
|
120
|
+
| 'MediumStandard'
|
|
121
|
+
| 'MediumSecondary'
|
|
122
|
+
| 'MediumApp'
|
|
123
|
+
| 'MediumBold'
|
|
124
|
+
| 'MediumBoldApp'
|
|
125
|
+
| 'LargeStandard'
|
|
126
|
+
| 'LargePlusStandard'
|
|
127
|
+
| 'ExtraLargeStandard'
|
|
128
|
+
| 'HugeStandard';
|
|
129
|
+
|
|
130
|
+
export interface TextPropsWin32 {
|
|
131
|
+
onKeyDown?: (args: IKeyboardEvent) => void;
|
|
132
|
+
onKeyDownCapture?: (args: IKeyboardEvent) => void;
|
|
133
|
+
onKeyUp?: (args: IKeyboardEvent) => void;
|
|
134
|
+
onKeyUpCapture?: (args: IKeyboardEvent) => void;
|
|
135
|
+
|
|
136
|
+
keyDownEvents?: IHandledKeyboardEvent[];
|
|
137
|
+
keyUpEvents?: IHandledKeyboardEvent[];
|
|
138
|
+
|
|
139
|
+
/** Enables a focusable label with copyability but without character selectability (property:selectable) */
|
|
140
|
+
focusable?: boolean;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
144
|
+
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
145
|
+
*
|
|
146
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
147
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
148
|
+
*/
|
|
149
|
+
onBlur?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
150
|
+
/**
|
|
151
|
+
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
152
|
+
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
153
|
+
*
|
|
154
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
155
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
156
|
+
*/
|
|
157
|
+
onBlurCapture?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
158
|
+
/**
|
|
159
|
+
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
160
|
+
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
161
|
+
*
|
|
162
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
163
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
164
|
+
*/
|
|
165
|
+
onFocus?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
166
|
+
/**
|
|
167
|
+
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
168
|
+
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
169
|
+
*
|
|
170
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
171
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
172
|
+
*/
|
|
173
|
+
onFocusCapture?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Role-based styling of the text control. The styles applied include
|
|
177
|
+
* font face, size, weight and color. These styles take precedence over
|
|
178
|
+
* the `style` property.
|
|
179
|
+
*
|
|
180
|
+
* @remarks
|
|
181
|
+
* The default value is `MediumStandard`.
|
|
182
|
+
*
|
|
183
|
+
* When set to `None`, role-based styling is disabled.
|
|
184
|
+
*
|
|
185
|
+
* @deprecated Use `style` instead.
|
|
186
|
+
*/
|
|
187
|
+
textStyle?: TextWin32TextStyle;
|
|
188
|
+
|
|
189
|
+
/** Tooltip displayed on mouse hover of this element */
|
|
190
|
+
tooltip?: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// https://reactnative.dev/docs/text#props
|
|
194
|
+
export interface TextProps
|
|
195
|
+
extends TextPropsIOS,
|
|
196
|
+
TextPropsAndroid,
|
|
197
|
+
TextPropsWin32,
|
|
198
|
+
AccessibilityProps {
|
|
199
|
+
/**
|
|
200
|
+
* Specifies whether fonts should scale to respect Text Size accessibility settings.
|
|
201
|
+
* The default is `true`.
|
|
202
|
+
*/
|
|
203
|
+
allowFontScaling?: boolean | undefined;
|
|
204
|
+
|
|
205
|
+
children?: React.ReactNode | undefined;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* This can be one of the following values:
|
|
209
|
+
*
|
|
210
|
+
* - `head` - The line is displayed so that the end fits in the container and the missing text
|
|
211
|
+
* at the beginning of the line is indicated by an ellipsis glyph. e.g., "...wxyz"
|
|
212
|
+
* - `middle` - The line is displayed so that the beginning and end fit in the container and the
|
|
213
|
+
* missing text in the middle is indicated by an ellipsis glyph. "ab...yz"
|
|
214
|
+
* - `tail` - The line is displayed so that the beginning fits in the container and the
|
|
215
|
+
* missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..."
|
|
216
|
+
* - `clip` - Lines are not drawn past the edge of the text container.
|
|
217
|
+
*
|
|
218
|
+
* The default is `tail`.
|
|
219
|
+
*
|
|
220
|
+
* `numberOfLines` must be set in conjunction with this prop.
|
|
221
|
+
*
|
|
222
|
+
* > `clip` is working only for iOS
|
|
223
|
+
*/
|
|
224
|
+
ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip' | undefined;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Used to reference react managed views from native code.
|
|
228
|
+
*/
|
|
229
|
+
id?: string | undefined;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Line Break mode. Works only with numberOfLines.
|
|
233
|
+
* clip is working only for iOS
|
|
234
|
+
*/
|
|
235
|
+
lineBreakMode?: 'head' | 'middle' | 'tail' | 'clip' | undefined;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Used to truncate the text with an ellipsis after computing the text
|
|
239
|
+
* layout, including line wrapping, such that the total number of lines
|
|
240
|
+
* does not exceed this number.
|
|
241
|
+
*
|
|
242
|
+
* This prop is commonly used with `ellipsizeMode`.
|
|
243
|
+
*/
|
|
244
|
+
numberOfLines?: number | undefined;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Invoked on mount and layout changes with
|
|
248
|
+
*
|
|
249
|
+
* {nativeEvent: { layout: {x, y, width, height}}}.
|
|
250
|
+
*/
|
|
251
|
+
onLayout?: ((event: LayoutChangeEvent) => void) | undefined;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Invoked on Text layout
|
|
255
|
+
*/
|
|
256
|
+
onTextLayout?:
|
|
257
|
+
| ((event: NativeSyntheticEvent<TextLayoutEventData>) => void)
|
|
258
|
+
| undefined;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* This function is called on press.
|
|
262
|
+
* Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting).
|
|
263
|
+
*/
|
|
264
|
+
onPress?: ((event: GestureResponderEvent) => void) | undefined;
|
|
265
|
+
|
|
266
|
+
onPressIn?: ((event: GestureResponderEvent) => void) | undefined;
|
|
267
|
+
onPressOut?: ((event: GestureResponderEvent) => void) | undefined;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* This function is called on long press.
|
|
271
|
+
* e.g., `onLongPress={this.increaseSize}>``
|
|
272
|
+
*/
|
|
273
|
+
onLongPress?: ((event: GestureResponderEvent) => void) | undefined;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* @see https://reactnative.dev/docs/text#style
|
|
277
|
+
*/
|
|
278
|
+
style?: StyleProp<TextStyle> | undefined;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Used to locate this view in end-to-end tests.
|
|
282
|
+
*/
|
|
283
|
+
testID?: string | undefined;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Used to reference react managed views from native code.
|
|
287
|
+
*/
|
|
288
|
+
nativeID?: string | undefined;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values:
|
|
292
|
+
* - null/undefined (default): inherit from the parent node or the global default (0)
|
|
293
|
+
* - 0: no max, ignore parent/global default
|
|
294
|
+
* - >= 1: sets the maxFontSizeMultiplier of this node to this value
|
|
295
|
+
*/
|
|
296
|
+
maxFontSizeMultiplier?: number | null | undefined;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* A React component for displaying text which supports nesting, styling, and touch handling.
|
|
301
|
+
*/
|
|
302
|
+
declare class TextComponent extends React.Component<TextProps> {}
|
|
303
|
+
declare const TextBase: Constructor<NativeMethods> & typeof TextComponent;
|
|
304
|
+
export class Text extends TextBase {}
|
|
@@ -11,9 +11,9 @@ export { AccessibilityPropsWin32 } from '@office-iss/react-native-win32/Librarie
|
|
|
11
11
|
export type IViewWin32Props = IViewWin32PropsOnly & AccessibilityPropsWin32;
|
|
12
12
|
export {ViewWin32} from './Components/View/ViewWin32';
|
|
13
13
|
export {IKeyboardEvent, IHandledKeyboardEvent, EventPhase} from './Components/View/ViewPropTypes';
|
|
14
|
-
import {
|
|
14
|
+
import {TextPropsWin32 as ITextWin32PropsOnly} from './Text/Text';
|
|
15
15
|
export type ITextWin32Props = ITextWin32PropsOnly & AccessibilityPropsWin32;
|
|
16
|
-
export {TextWin32TextStyle } from './
|
|
16
|
+
export {TextWin32TextStyle } from './Text/Text';
|
|
17
17
|
export {TextWin32} from './Components/Text/TextWin32';
|
|
18
18
|
export {IButtonWin32Props, IButtonWin32Style} from './Components/Button/ButtonWin32.Props';
|
|
19
19
|
export {ButtonWin32} from './Components/Button/ButtonWin32';
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import RN = require('react-native');
|
|
2
|
-
import type { IKeyboardEvent, IHandledKeyboardEvent } from '../View/ViewPropTypes';
|
|
3
|
-
/**
|
|
4
|
-
* Role-based text style names.
|
|
5
|
-
*/
|
|
6
|
-
export type TextWin32TextStyle = 'None' | 'SmallStandard' | 'SmallSecondary' | 'MediumStandard' | 'MediumSecondary' | 'MediumApp' | 'MediumBold' | 'MediumBoldApp' | 'LargeStandard' | 'LargePlusStandard' | 'ExtraLargeStandard' | 'HugeStandard';
|
|
7
|
-
export interface ITextWin32Props extends RN.TextProps {
|
|
8
|
-
onKeyDown?: (args: IKeyboardEvent) => void;
|
|
9
|
-
onKeyDownCapture?: (args: IKeyboardEvent) => void;
|
|
10
|
-
onKeyUp?: (args: IKeyboardEvent) => void;
|
|
11
|
-
onKeyUpCapture?: (args: IKeyboardEvent) => void;
|
|
12
|
-
keyDownEvents?: IHandledKeyboardEvent[];
|
|
13
|
-
keyUpEvents?: IHandledKeyboardEvent[];
|
|
14
|
-
/** Enables a focusable label with copyability but without character selectability (property:selectable) */
|
|
15
|
-
focusable?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
18
|
-
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
19
|
-
*
|
|
20
|
-
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
21
|
-
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
22
|
-
*/
|
|
23
|
-
onBlur?: (ev: RN.NativeSyntheticEvent<{}>) => void;
|
|
24
|
-
/**
|
|
25
|
-
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
26
|
-
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
27
|
-
*
|
|
28
|
-
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
29
|
-
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
30
|
-
*/
|
|
31
|
-
onBlurCapture?: (ev: RN.NativeSyntheticEvent<{}>) => void;
|
|
32
|
-
/**
|
|
33
|
-
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
34
|
-
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
35
|
-
*
|
|
36
|
-
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
37
|
-
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
38
|
-
*/
|
|
39
|
-
onFocus?: (ev: RN.NativeSyntheticEvent<{}>) => void;
|
|
40
|
-
/**
|
|
41
|
-
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
42
|
-
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
43
|
-
*
|
|
44
|
-
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
45
|
-
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
46
|
-
*/
|
|
47
|
-
onFocusCapture?: (ev: RN.NativeSyntheticEvent<{}>) => void;
|
|
48
|
-
/**
|
|
49
|
-
* Role-based styling of the text control. The styles applied include
|
|
50
|
-
* font face, size, weight and color. These styles take precedence over
|
|
51
|
-
* the `style` property.
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* The default value is `MediumStandard`.
|
|
55
|
-
*
|
|
56
|
-
* When set to `None`, role-based styling is disabled.
|
|
57
|
-
*
|
|
58
|
-
* @deprecated Use `style` instead.
|
|
59
|
-
*/
|
|
60
|
-
textStyle?: TextWin32TextStyle;
|
|
61
|
-
/** Tooltip displayed on mouse hover of this element */
|
|
62
|
-
tooltip?: string;
|
|
63
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextWin32.Props.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.Props.ts"],"names":[],"mappings":"","sourcesContent":["import RN = require('react-native');\nimport type { IKeyboardEvent, IHandledKeyboardEvent } from '../View/ViewPropTypes';\n\n/**\n * Role-based text style names.\n */\nexport type TextWin32TextStyle =\n | 'None'\n | 'SmallStandard'\n | 'SmallSecondary'\n | 'MediumStandard'\n | 'MediumSecondary'\n | 'MediumApp'\n | 'MediumBold'\n | 'MediumBoldApp'\n | 'LargeStandard'\n | 'LargePlusStandard'\n | 'ExtraLargeStandard'\n | 'HugeStandard';\n\nexport interface ITextWin32Props extends RN.TextProps {\n onKeyDown?: (args: IKeyboardEvent) => void;\n onKeyDownCapture?: (args: IKeyboardEvent) => void;\n onKeyUp?: (args: IKeyboardEvent) => void;\n onKeyUpCapture?: (args: IKeyboardEvent) => void;\n\n keyDownEvents?: IHandledKeyboardEvent[];\n keyUpEvents?: IHandledKeyboardEvent[];\n\n /** Enables a focusable label with copyability but without character selectability (property:selectable) */\n focusable?: boolean;\n\n /**\n * The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React\n * Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onBlur?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n /**\n * The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React\n * Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onBlurCapture?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n /**\n * The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React\n * Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onFocus?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n /**\n * The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React\n * Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onFocusCapture?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n \n /**\n * Role-based styling of the text control. The styles applied include\n * font face, size, weight and color. These styles take precedence over\n * the `style` property.\n *\n * @remarks\n * The default value is `MediumStandard`.\n *\n * When set to `None`, role-based styling is disabled.\n *\n * @deprecated Use `style` instead.\n */\n textStyle?: TextWin32TextStyle;\n\n /** Tooltip displayed on mouse hover of this element */\n tooltip?: string;\n}\n"]}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import RN = require('react-native');
|
|
2
|
-
import type { IKeyboardEvent, IHandledKeyboardEvent } from '../View/ViewPropTypes';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Role-based text style names.
|
|
6
|
-
*/
|
|
7
|
-
export type TextWin32TextStyle =
|
|
8
|
-
| 'None'
|
|
9
|
-
| 'SmallStandard'
|
|
10
|
-
| 'SmallSecondary'
|
|
11
|
-
| 'MediumStandard'
|
|
12
|
-
| 'MediumSecondary'
|
|
13
|
-
| 'MediumApp'
|
|
14
|
-
| 'MediumBold'
|
|
15
|
-
| 'MediumBoldApp'
|
|
16
|
-
| 'LargeStandard'
|
|
17
|
-
| 'LargePlusStandard'
|
|
18
|
-
| 'ExtraLargeStandard'
|
|
19
|
-
| 'HugeStandard';
|
|
20
|
-
|
|
21
|
-
export interface ITextWin32Props extends RN.TextProps {
|
|
22
|
-
onKeyDown?: (args: IKeyboardEvent) => void;
|
|
23
|
-
onKeyDownCapture?: (args: IKeyboardEvent) => void;
|
|
24
|
-
onKeyUp?: (args: IKeyboardEvent) => void;
|
|
25
|
-
onKeyUpCapture?: (args: IKeyboardEvent) => void;
|
|
26
|
-
|
|
27
|
-
keyDownEvents?: IHandledKeyboardEvent[];
|
|
28
|
-
keyUpEvents?: IHandledKeyboardEvent[];
|
|
29
|
-
|
|
30
|
-
/** Enables a focusable label with copyability but without character selectability (property:selectable) */
|
|
31
|
-
focusable?: boolean;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
35
|
-
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
36
|
-
*
|
|
37
|
-
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
38
|
-
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
39
|
-
*/
|
|
40
|
-
onBlur?: (ev: RN.NativeSyntheticEvent<{}>) => void;
|
|
41
|
-
/**
|
|
42
|
-
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
43
|
-
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
44
|
-
*
|
|
45
|
-
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
46
|
-
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
47
|
-
*/
|
|
48
|
-
onBlurCapture?: (ev: RN.NativeSyntheticEvent<{}>) => void;
|
|
49
|
-
/**
|
|
50
|
-
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
51
|
-
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
52
|
-
*
|
|
53
|
-
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
54
|
-
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
55
|
-
*/
|
|
56
|
-
onFocus?: (ev: RN.NativeSyntheticEvent<{}>) => void;
|
|
57
|
-
/**
|
|
58
|
-
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
59
|
-
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
60
|
-
*
|
|
61
|
-
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
62
|
-
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
63
|
-
*/
|
|
64
|
-
onFocusCapture?: (ev: RN.NativeSyntheticEvent<{}>) => void;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Role-based styling of the text control. The styles applied include
|
|
68
|
-
* font face, size, weight and color. These styles take precedence over
|
|
69
|
-
* the `style` property.
|
|
70
|
-
*
|
|
71
|
-
* @remarks
|
|
72
|
-
* The default value is `MediumStandard`.
|
|
73
|
-
*
|
|
74
|
-
* When set to `None`, role-based styling is disabled.
|
|
75
|
-
*
|
|
76
|
-
* @deprecated Use `style` instead.
|
|
77
|
-
*/
|
|
78
|
-
textStyle?: TextWin32TextStyle;
|
|
79
|
-
|
|
80
|
-
/** Tooltip displayed on mouse hover of this element */
|
|
81
|
-
tooltip?: string;
|
|
82
|
-
}
|